Importing rustc-1.45.2

Change-Id: Idd187dd729f3089d9529753a17db5fbb40bacdeb
diff --git a/src/llvm-project/lldb/CMakeLists.txt b/src/llvm-project/lldb/CMakeLists.txt
index 5d52f64..573b855 100644
--- a/src/llvm-project/lldb/CMakeLists.txt
+++ b/src/llvm-project/lldb/CMakeLists.txt
@@ -1,4 +1,7 @@
 cmake_minimum_required(VERSION 3.4.3)
+if(CMAKE_SYSTEM_NAME STREQUAL Windows)
+  cmake_minimum_required(VERSION 3.13)
+endif()
 
 if(POLICY CMP0075)
   cmake_policy(SET CMP0075 NEW)
@@ -14,7 +17,12 @@
 # If we are not building as part of LLVM, build LLDB as a standalone project,
 # using LLVM as an external library.
 if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+  project(lldb)
   include(LLDBStandalone)
+
+  set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
+  set(CMAKE_CXX_STANDARD_REQUIRED YES)
+  set(CMAKE_CXX_EXTENSIONS NO)
 endif()
 
 include(LLDBConfig)
@@ -35,10 +43,31 @@
   add_definitions(-D_ENABLE_EXTENDED_ALIGNED_STORAGE)
 endif()
 
-if (NOT LLDB_DISABLE_PYTHON)
-  add_subdirectory(scripts)
+if (LLDB_ENABLE_PYTHON)
+  execute_process(
+    COMMAND ${PYTHON_EXECUTABLE}
+        -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(True, False, ''))"
+    OUTPUT_VARIABLE LLDB_PYTHON_DEFAULT_RELATIVE_PATH
+    OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+  file(TO_CMAKE_PATH ${LLDB_PYTHON_DEFAULT_RELATIVE_PATH} LLDB_PYTHON_DEFAULT_RELATIVE_PATH)
+  set(LLDB_PYTHON_RELATIVE_PATH ${LLDB_PYTHON_DEFAULT_RELATIVE_PATH}
+    CACHE STRING "Path where Python modules are installed, relative to install prefix")
 endif ()
 
+if (LLDB_ENABLE_PYTHON OR LLDB_ENABLE_LUA)
+  add_subdirectory(bindings)
+endif ()
+
+# We need the headers generated by instrinsics_gen before we can compile
+# any source file in LLDB as the imported Clang modules might include
+# some of these generated headers. This approach is copied from Clang's main
+# CMakeLists.txt, so it should kept in sync the code in Clang which was added
+# in llvm-svn 308844.
+if(LLVM_ENABLE_MODULES AND NOT LLDB_BUILT_STANDALONE)
+  list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
+endif()
+
 if(CMAKE_CROSSCOMPILING AND LLDB_BUILT_STANDALONE)
   set(LLVM_USE_HOST_TOOLS ON)
   include(CrossCompile)
@@ -52,187 +81,175 @@
     -DClang_DIR=${NATIVE_Clang_DIR})
 endif()
 
+# TableGen
 add_subdirectory(utils/TableGen)
+
 add_subdirectory(source)
 add_subdirectory(tools)
 add_subdirectory(docs)
 
 option(LLDB_INCLUDE_TESTS "Generate build targets for the LLDB unit tests." ${LLVM_INCLUDE_TESTS})
-option(LLDB_TEST_USE_CUSTOM_C_COMPILER "Use the C compiler provided via LLDB_TEST_C_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF)
-option(LLDB_TEST_USE_CUSTOM_CXX_COMPILER "Use the C++ compiler provided via LLDB_TEST_CXX_COMPILER for building test inferiors (instead of the just-built compiler). Defaults to OFF." OFF)
 if(LLDB_INCLUDE_TESTS)
-
-  # Set the path to the default lldb test executable.
-  set(LLDB_DEFAULT_TEST_EXECUTABLE "${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb${CMAKE_EXECUTABLE_SUFFIX}")
-
-  # Set the paths to default llvm tools.
-  set(LLDB_DEFAULT_TEST_DSYMUTIL "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/dsymutil${CMAKE_EXECUTABLE_SUFFIX}")
-  set(LLDB_DEFAULT_TEST_FILECHECK "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/FileCheck${CMAKE_EXECUTABLE_SUFFIX}")
-
-  if (NOT LLDB_TEST_USE_CUSTOM_C_COMPILER AND TARGET clang)
-    set(LLDB_DEFAULT_TEST_C_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
-  else()
-    set(LLDB_DEFAULT_TEST_C_COMPILER "")
-  endif()
-
-  if (NOT LLDB_TEST_USE_CUSTOM_CXX_COMPILER AND TARGET clang)
-    set(LLDB_DEFAULT_TEST_CXX_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang++${CMAKE_EXECUTABLE_SUFFIX}")
-  else()
-    set(LLDB_DEFAULT_TEST_CXX_COMPILER "")
-  endif()
-
-  set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb executable used for testing")
-  set(LLDB_TEST_C_COMPILER "${LLDB_DEFAULT_TEST_C_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors")
-  set(LLDB_TEST_CXX_COMPILER "${LLDB_DEFAULT_TEST_CXX_COMPILER}" CACHE PATH "C++ Compiler to use for building LLDB test inferiors")
-  set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil used for generating dSYM bundles")
-  set(LLDB_TEST_FILECHECK "${LLDB_DEFAULT_TEST_FILECHECK}" CACHE PATH "FileCheck used for testing purposes")
-
-  if (("${LLDB_TEST_C_COMPILER}" STREQUAL "") OR
-      ("${LLDB_TEST_CXX_COMPILER}" STREQUAL ""))
-    message(FATAL_ERROR "LLDB test compilers not specified.  Tests will not run")
-  endif()
-
-  set(LLDB_TEST_DEPS lldb)
-
-  # darwin-debug is an hard dependency for the testsuite.
-  if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
-    list(APPEND LLDB_TEST_DEPS darwin-debug)
-  endif()
-
-  # lldb-test is an hard dependency for the testsuite.
-  list(APPEND LLDB_TEST_DEPS lldb-test)
-
-  if(TARGET lldb-server)
-    list(APPEND LLDB_TEST_DEPS lldb-server)
-  endif()
-
-  if(TARGET lldb-mi)
-    list(APPEND LLDB_TEST_DEPS lldb-mi)
-  endif()
-
-  if(TARGET lldb-vscode)
-    list(APPEND LLDB_TEST_DEPS lldb-vscode)
-  endif()
-
-  if(TARGET lldb-instr)
-    list(APPEND LLDB_TEST_DEPS lldb-instr)
-  endif()
-
-  if(NOT LLDB_BUILT_STANDALONE)
-    list(APPEND LLDB_TEST_DEPS yaml2obj)
-  endif()
-
-  if(TARGET liblldb)
-    list(APPEND LLDB_TEST_DEPS liblldb)
-  endif()
-
-  # Add dependencies if we test with the in-tree clang.
-  # This works with standalone builds as they import the clang target.
-  if(TARGET clang)
-    list(APPEND LLDB_TEST_DEPS clang)
-    if(APPLE)
-      # If we build clang, we should build libcxx.
-      # FIXME: Standalone builds should import the cxx target as well.
-      if(LLDB_BUILT_STANDALONE)
-        # For now check that the include directory exists.
-        set(cxx_dir "${LLVM_BINARY_DIR}/include/c++")
-        if(NOT EXISTS ${cxx_dir})
-          message(WARNING "LLDB test suite requires libc++ in llvm/projects/libcxx or an existing build symlinked to ${cxx_dir}")
-        endif()
-      else()
-        # We require libcxx for the test suite, so if we aren't building it,
-        # try to provide a helpful error about how to resolve the situation.
-        if(NOT TARGET cxx)
-          if(LLVM_ENABLE_PROJECTS STREQUAL "")
-            # If `LLVM_ENABLE_PROJECTS` is not being used (implying that we are
-            # using the old layout), suggest checking it out.
-            message(FATAL_ERROR
-              "LLDB test suite requires libc++, but it is currently disabled. "
-              "Please checkout `libcxx` in `llvm/projects` or disable tests "
-              "via `LLDB_INCLUDE_TESTS=OFF`.")
-          else()
-            # If `LLVM_ENABLE_PROJECTS` is being used, suggest adding it.
-            message(FATAL_ERROR
-              "LLDB test suite requires libc++, but it is currently disabled. "
-              "Please add `libcxx` to `LLVM_ENABLE_PROJECTS` or disable tests "
-              "via `LLDB_INCLUDE_TESTS=OFF`.")
-          endif()
-        endif()
-        list(APPEND LLDB_TEST_DEPS cxx)
-      endif()
-    endif()
-  endif()
-
-  if(TARGET dsymutil)
-    list(APPEND LLDB_TEST_DEPS dsymutil)
-  endif()
-
-  if(TARGET lldb-framework)
-    list(APPEND LLDB_TEST_DEPS lldb-framework)
-  endif()
-
-  add_custom_target(lldb-test-deps)
-  add_dependencies(lldb-test-deps ${LLDB_TEST_DEPS})
-  set_target_properties(lldb-test-deps PROPERTIES FOLDER "lldb misc")
-
   add_subdirectory(test)
   add_subdirectory(unittests)
-  add_subdirectory(lit)
   add_subdirectory(utils/lit-cpuid)
   add_subdirectory(utils/lldb-dotest)
 endif()
 
-if (NOT LLDB_DISABLE_PYTHON)
-    if(NOT LLDB_BUILD_FRAMEWORK)
-      set(use_python_wrapper_from_src_dir -m)
+if (LLDB_ENABLE_PYTHON)
+  get_target_property(lldb_bindings_dir swig_wrapper BINARY_DIR)
+
+  if(LLDB_BUILD_FRAMEWORK)
+    set(lldb_python_build_path "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Resources/Python/lldb")
+  else()
+    set(lldb_python_build_path "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${LLDB_PYTHON_RELATIVE_PATH}/lldb")
+  endif()
+
+  # Add a Post-Build Event to copy over Python files and create the symlink
+  # to liblldb.so for the Python API(hardlink on Windows).
+  add_custom_target(finish_swig ALL VERBATIM
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${lldb_python_build_path}
+    DEPENDS ${lldb_bindings_dir}/lldb.py
+    COMMENT "Python script sym-linking LLDB Python API")
+
+  if(NOT LLDB_USE_SYSTEM_SIX)
+    add_custom_command(TARGET finish_swig POST_BUILD VERBATIM
+      COMMAND ${CMAKE_COMMAND} -E copy
+        "${LLDB_SOURCE_DIR}/third_party/Python/module/six/six.py"
+        "${lldb_python_build_path}/../six.py")
+  endif()
+
+  add_custom_command(TARGET finish_swig POST_BUILD VERBATIM
+    COMMAND ${CMAKE_COMMAND} -E copy
+      "${lldb_bindings_dir}/lldb.py"
+      "${lldb_python_build_path}/__init__.py")
+
+  function(create_python_package pkg_dir)
+    cmake_parse_arguments(ARG "NOINIT" "" "FILES" ${ARGN})
+    if(ARG_FILES)
+      set(copy_cmd COMMAND ${CMAKE_COMMAND} -E copy ${ARG_FILES} ${pkg_dir})
     endif()
-    if(LLDB_USE_SYSTEM_SIX)
-      set(use_six_py_from_system --useSystemSix)
+    if(NOT ARG_NOINIT)
+      set(init_cmd COMMAND ${PYTHON_EXECUTABLE}
+          "${LLDB_SOURCE_DIR}/bindings/python/createPythonInit.py"
+          "${pkg_dir}" ${ARG_FILES})
     endif()
-    get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR)
-    get_target_property(liblldb_build_dir liblldb LIBRARY_OUTPUT_DIRECTORY)
+    add_custom_command(TARGET finish_swig POST_BUILD VERBATIM
+      COMMAND ${CMAKE_COMMAND} -E make_directory ${pkg_dir}
+      ${copy_cmd}
+      ${init_cmd}
+      WORKING_DIRECTORY ${lldb_python_build_path})
+  endfunction()
 
-    # Add a Post-Build Event to copy over Python files and create the symlink
-    # to liblldb.so for the Python API(hardlink on Windows).
-    add_custom_target(finish_swig ALL
-        COMMAND
-           ${PYTHON_EXECUTABLE} ${LLDB_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
-               --srcRoot=${LLDB_SOURCE_DIR}
-               --targetDir=${liblldb_build_dir}
-               --cfgBldDir=${lldb_scripts_dir}
-               --prefix=${CMAKE_BINARY_DIR}
-               --cmakeBuildConfiguration=${CMAKE_CFG_INTDIR}
-               --lldbLibDir=lib${LLVM_LIBDIR_SUFFIX}
-               ${use_python_wrapper_from_src_dir}
-               ${use_six_py_from_system}
-        VERBATIM
-        DEPENDS ${LLDB_SOURCE_DIR}/scripts/finishSwigWrapperClasses.py
-        DEPENDS ${lldb_scripts_dir}/lldb.py
-        COMMENT "Python script sym-linking LLDB Python API")
+  add_custom_command(TARGET finish_swig POST_BUILD VERBATIM
+    COMMAND ${CMAKE_COMMAND} -E copy
+      "${LLDB_SOURCE_DIR}/source/Interpreter/embedded_interpreter.py" ${lldb_python_build_path})
 
-    if (TARGET readline)
-      set(readline_dep readline)
+  # Distribute the examples as python packages.
+  create_python_package("formatters/cpp"
+    FILES "${LLDB_SOURCE_DIR}/examples/synthetic/gnu_libstdcpp.py"
+          "${LLDB_SOURCE_DIR}/examples/synthetic/libcxx.py")
+
+  create_python_package("formatters"
+    FILES "${LLDB_SOURCE_DIR}/examples/summaries/cocoa/cache.py"
+          "${LLDB_SOURCE_DIR}/examples/summaries/synth.py"
+          "${LLDB_SOURCE_DIR}/examples/summaries/cocoa/metrics.py"
+          "${LLDB_SOURCE_DIR}/examples/summaries/cocoa/attrib_fromdict.py"
+          "${LLDB_SOURCE_DIR}/examples/summaries/cocoa/Logger.py")
+
+  create_python_package("utils"
+    FILES "${LLDB_SOURCE_DIR}/examples/python/in_call_stack.py"
+          "${LLDB_SOURCE_DIR}/examples/python/symbolication.py")
+
+  if(APPLE)
+    create_python_package("macosx"
+      FILES "${LLDB_SOURCE_DIR}/examples/python/crashlog.py"
+            "${LLDB_SOURCE_DIR}/examples/darwin/heap_find/heap.py")
+
+    create_python_package("macosx/heap"
+      FILES "${LLDB_SOURCE_DIR}/examples/darwin/heap_find/heap/heap_find.cpp"
+            "${LLDB_SOURCE_DIR}/examples/darwin/heap_find/heap/Makefile"
+            NOINIT)
+
+    create_python_package("diagnose"
+      FILES "${LLDB_SOURCE_DIR}/examples/python/diagnose_unwind.py"
+            "${LLDB_SOURCE_DIR}/examples/python/diagnose_nsstring.py")
+  endif()
+
+  function(create_relative_symlink target dest_file output_dir output_name)
+    get_filename_component(dest_file ${dest_file} ABSOLUTE)
+    get_filename_component(output_dir ${output_dir} ABSOLUTE)
+    file(RELATIVE_PATH rel_dest_file ${output_dir} ${dest_file})
+    if(CMAKE_HOST_UNIX)
+      set(LLVM_LINK_OR_COPY create_symlink)
+    else()
+      set(LLVM_LINK_OR_COPY copy)
     endif()
-    add_dependencies(finish_swig swig_wrapper liblldb lldb-argdumper ${readline_dep})
-    set_target_properties(finish_swig swig_wrapper PROPERTIES FOLDER "lldb misc")
+    add_custom_command(TARGET ${target} POST_BUILD VERBATIM
+      COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} ${rel_dest_file} ${output_name}
+      WORKING_DIRECTORY ${output_dir})
+  endfunction()
 
-    # Ensure we do the python post-build step when building lldb.
-    add_dependencies(lldb finish_swig)
+  if(LLDB_BUILD_FRAMEWORK)
+    set(LIBLLDB_SYMLINK_DEST "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/LLDB")
+  else()
+    set(LIBLLDB_SYMLINK_DEST "${LLVM_SHLIB_OUTPUT_INTDIR}/liblldb${CMAKE_SHARED_LIBRARY_SUFFIX}")
+  endif()
+  if(WIN32)
+    if(CMAKE_BUILD_TYPE STREQUAL Debug)
+      set(LIBLLDB_SYMLINK_OUTPUT_FILE "_lldb_d.pyd")
+    else()
+      set(LIBLLDB_SYMLINK_OUTPUT_FILE "_lldb.pyd")
+    endif()
+  else()
+    set(LIBLLDB_SYMLINK_OUTPUT_FILE "_lldb.so")
+  endif()
+  create_relative_symlink(finish_swig ${LIBLLDB_SYMLINK_DEST}
+                          ${lldb_python_build_path} ${LIBLLDB_SYMLINK_OUTPUT_FILE})
 
-    # Add a Post-Build Event to copy the custom Python DLL to the lldb binaries dir so that Windows can find it when launching
-    # lldb.exe or any other executables that were linked with liblldb.
-    if (WIN32 AND NOT "${PYTHON_DLL}" STREQUAL "")
-        # When using the Visual Studio CMake generator the lldb binaries end up in Release/bin, Debug/bin etc.
-        file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin" LLDB_BIN_DIR)
-        file(TO_NATIVE_PATH "${PYTHON_DLL}" PYTHON_DLL_NATIVE_PATH)
-        add_custom_command(
-            TARGET finish_swig
-            POST_BUILD
-            COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_DLL_NATIVE_PATH} ${LLDB_BIN_DIR} VERBATIM
-            COMMENT "Copying Python DLL to LLDB binaries directory.")
-    endif ()
+  if(NOT LLDB_BUILD_FRAMEWORK)
+    set(LLDB_ARGDUMPER_FILENAME "lldb-argdumper${CMAKE_EXECUTABLE_SUFFIX}")
+    create_relative_symlink(finish_swig "${LLVM_RUNTIME_OUTPUT_INTDIR}/${LLDB_ARGDUMPER_FILENAME}"
+                            ${lldb_python_build_path} ${LLDB_ARGDUMPER_FILENAME})
+  endif()
+
+  add_dependencies(finish_swig swig_wrapper liblldb lldb-argdumper)
+  set_target_properties(finish_swig swig_wrapper PROPERTIES FOLDER "lldb misc")
+
+  # Ensure we do the python post-build step when building lldb.
+  add_dependencies(lldb finish_swig)
+
+  # Install the LLDB python module
+  if(LLDB_BUILD_FRAMEWORK)
+    set(LLDB_PYTHON_INSTALL_PATH ${LLDB_FRAMEWORK_INSTALL_DIR}/LLDB.framework/Resources/Python)
+  else()
+    set(LLDB_PYTHON_INSTALL_PATH ${LLDB_PYTHON_RELATIVE_PATH})
+  endif()
+  add_custom_target(lldb-python-scripts)
+  add_dependencies(lldb-python-scripts finish_swig)
+  install(DIRECTORY ${lldb_python_build_path}/../
+          DESTINATION ${LLDB_PYTHON_INSTALL_PATH}
+          COMPONENT lldb-python-scripts)
+  if (NOT LLVM_ENABLE_IDE)
+    add_llvm_install_targets(install-lldb-python-scripts
+                             COMPONENT lldb-python-scripts
+                             DEPENDS lldb-python-scripts)
+  endif()
+
+  # Add a Post-Build Event to copy the custom Python DLL to the lldb binaries dir so that Windows can find it when launching
+  # lldb.exe or any other executables that were linked with liblldb.
+  if (WIN32 AND NOT "${PYTHON_DLL}" STREQUAL "")
+    # When using the Visual Studio CMake generator the lldb binaries end up in Release/bin, Debug/bin etc.
+    file(TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin" LLDB_BIN_DIR)
+    file(TO_NATIVE_PATH "${PYTHON_DLL}" PYTHON_DLL_NATIVE_PATH)
+    add_custom_command(
+      TARGET finish_swig
+      POST_BUILD
+      COMMAND ${CMAKE_COMMAND} -E copy ${PYTHON_DLL_NATIVE_PATH} ${LLDB_BIN_DIR} VERBATIM
+      COMMENT "Copying Python DLL to LLDB binaries directory.")
+  endif ()
 endif ()
 
-if(LLDB_BUILT_STANDALONE)
+if(LLDB_BUILT_STANDALONE AND NOT LLVM_ENABLE_IDE)
   llvm_distribution_add_targets()
 endif()
diff --git a/src/llvm-project/lldb/CODE_OWNERS.txt b/src/llvm-project/lldb/CODE_OWNERS.txt
index 8ee0455..1af1061 100644
--- a/src/llvm-project/lldb/CODE_OWNERS.txt
+++ b/src/llvm-project/lldb/CODE_OWNERS.txt
@@ -21,10 +21,6 @@
 D: Expression evaluator, IR interpreter, Clang integration
 D: Data Formatters
 
-N: Ilia K
-E: [email protected]
-D: lldb-mi
-
 N: Ed Maste
 E: [email protected]
 D: FreeBSD
@@ -34,10 +30,6 @@
 D: ABI, Disassembler, Unwinding, iOS, debugserver, Platform, ObjectFile, SymbolFile, 
 D: SymbolVendor, DWARF, gdb-remote
 
-N: Hafiz Abid Qadeer
-E: [email protected]
-D: lldb-mi
-
 N: Kamil Rytarowski
 E: [email protected]
 D: NetBSD
diff --git a/src/llvm-project/lldb/INSTALL.txt b/src/llvm-project/lldb/INSTALL.txt
deleted file mode 100644
index 59294bd..0000000
--- a/src/llvm-project/lldb/INSTALL.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-LLDB Installation Instructions
-==============================
-
-LLDB builds on Mac OS X (with Xcode) and Linux (with GCC or Clang).
-
-On Mac OS X, in addition to using Xcode you'll need to enable code signing
-on your system to either build lldb or debug using lldb.  Please see the code
-signing documentation in docs/code-signing.txt for more detailed directions.
-
-If you are building on Mac OS X and LLVM is not present in llvm/, then LLDB
-will check it out automatically.  The files in scripts/Xcode/repos determine
-which branches of LLVM/Clang are checked out, depending on the current
-LLDB branch, according to the algorithm in scripts/Xcode/repo.py.
-
-For instructions to build LLDB on Linux, or more details about supported
-compiler versions, other dependencies, and build flags, see:
-
-    https://lldb.llvm.org/resources/build.html
diff --git a/src/llvm-project/lldb/bindings/CMakeLists.txt b/src/llvm-project/lldb/bindings/CMakeLists.txt
new file mode 100644
index 0000000..92ae402
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/CMakeLists.txt
@@ -0,0 +1,77 @@
+file(GLOB SWIG_INTERFACES interfaces/*.i)
+file(GLOB_RECURSE SWIG_SOURCES *.swig)
+file(GLOB SWIG_HEADERS
+  ${LLDB_SOURCE_DIR}/include/lldb/API/*.h
+  ${LLDB_SOURCE_DIR}/include/lldb/*.h
+)
+file(GLOB SWIG_PRIVATE_HEADERS
+  ${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h
+)
+foreach(private_header ${SWIG_PRIVATE_HEADERS})
+  list(REMOVE_ITEM SWIG_HEADERS ${private_header})
+endforeach()
+
+if(LLDB_BUILD_FRAMEWORK)
+  set(framework_arg --framework --target-platform Darwin)
+endif()
+
+if(APPLE)
+  set(DARWIN_EXTRAS "-D__APPLE__")
+else()
+  set(DARWIN_EXTRAS "")
+endif()
+
+set(SWIG_COMMON_FLAGS
+  -c++
+  -features autodoc
+  -I${LLDB_SOURCE_DIR}/include
+  -I${CMAKE_CURRENT_SOURCE_DIR}
+  -D__STDC_LIMIT_MACROS
+  -D__STDC_CONSTANT_MACROS
+  ${DARWIN_EXTRAS}
+  -outdir ${CMAKE_CURRENT_BINARY_DIR}
+)
+
+if (LLDB_ENABLE_PYTHON)
+  add_custom_command(
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
+    DEPENDS ${SWIG_SOURCES}
+    DEPENDS ${SWIG_INTERFACES}
+    DEPENDS ${SWIG_HEADERS}
+    COMMAND ${SWIG_EXECUTABLE}
+        ${SWIG_COMMON_FLAGS}
+        -c++
+        -shadow
+        -python
+        -threads
+        -o ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
+        ${LLDB_SOURCE_DIR}/bindings/python.swig
+    VERBATIM
+    COMMENT "Builds LLDB Python wrapper")
+
+  add_custom_target(swig_wrapper ALL DEPENDS
+    ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
+    ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
+  )
+endif()
+
+if (LLDB_ENABLE_LUA)
+  add_custom_command(
+    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapLua.cpp
+    DEPENDS ${SWIG_SOURCES}
+    DEPENDS ${SWIG_INTERFACES}
+    DEPENDS ${SWIG_HEADERS}
+    COMMAND ${SWIG_EXECUTABLE}
+        ${SWIG_COMMON_FLAGS}
+        -lua
+        -w503
+        -o ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapLua.cpp
+        ${LLDB_SOURCE_DIR}/bindings/lua.swig
+    VERBATIM
+    COMMENT "Builds LLDB Lua wrapper")
+
+  add_custom_target(swig_wrapper_lua ALL DEPENDS
+    ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapLua.cpp
+  )
+endif()
diff --git a/src/llvm-project/lldb/bindings/headers.swig b/src/llvm-project/lldb/bindings/headers.swig
new file mode 100644
index 0000000..69fd28e
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/headers.swig
@@ -0,0 +1,76 @@
+/* C++ headers to be included. */
+%{
+#include <algorithm>
+#include <string>
+%}
+
+/* The liblldb header files to be included. */
+%{
+#include "lldb/lldb-public.h"
+#include "lldb/API/SBAddress.h"
+#include "lldb/API/SBAttachInfo.h"
+#include "lldb/API/SBBlock.h"
+#include "lldb/API/SBBreakpoint.h"
+#include "lldb/API/SBBreakpointLocation.h"
+#include "lldb/API/SBBreakpointName.h"
+#include "lldb/API/SBBroadcaster.h"
+#include "lldb/API/SBCommandInterpreter.h"
+#include "lldb/API/SBCommandReturnObject.h"
+#include "lldb/API/SBCommunication.h"
+#include "lldb/API/SBCompileUnit.h"
+#include "lldb/API/SBData.h"
+#include "lldb/API/SBDebugger.h"
+#include "lldb/API/SBDeclaration.h"
+#include "lldb/API/SBError.h"
+#include "lldb/API/SBEvent.h"
+#include "lldb/API/SBExecutionContext.h"
+#include "lldb/API/SBExpressionOptions.h"
+#include "lldb/API/SBFileSpec.h"
+#include "lldb/API/SBFile.h"
+#include "lldb/API/SBFileSpecList.h"
+#include "lldb/API/SBFrame.h"
+#include "lldb/API/SBFunction.h"
+#include "lldb/API/SBHostOS.h"
+#include "lldb/API/SBInstruction.h"
+#include "lldb/API/SBInstructionList.h"
+#include "lldb/API/SBLanguageRuntime.h"
+#include "lldb/API/SBLaunchInfo.h"
+#include "lldb/API/SBLineEntry.h"
+#include "lldb/API/SBListener.h"
+#include "lldb/API/SBMemoryRegionInfo.h"
+#include "lldb/API/SBMemoryRegionInfoList.h"
+#include "lldb/API/SBModule.h"
+#include "lldb/API/SBModuleSpec.h"
+#include "lldb/API/SBPlatform.h"
+#include "lldb/API/SBProcess.h"
+#include "lldb/API/SBProcessInfo.h"
+#include "lldb/API/SBQueue.h"
+#include "lldb/API/SBQueueItem.h"
+#include "lldb/API/SBSection.h"
+#include "lldb/API/SBSourceManager.h"
+#include "lldb/API/SBStream.h"
+#include "lldb/API/SBStringList.h"
+#include "lldb/API/SBStructuredData.h"
+#include "lldb/API/SBSymbol.h"
+#include "lldb/API/SBSymbolContext.h"
+#include "lldb/API/SBSymbolContextList.h"
+#include "lldb/API/SBTarget.h"
+#include "lldb/API/SBThread.h"
+#include "lldb/API/SBThreadCollection.h"
+#include "lldb/API/SBThreadPlan.h"
+#include "lldb/API/SBTrace.h"
+#include "lldb/API/SBTraceOptions.h"
+#include "lldb/API/SBType.h"
+#include "lldb/API/SBTypeCategory.h"
+#include "lldb/API/SBTypeEnumMember.h"
+#include "lldb/API/SBTypeFilter.h"
+#include "lldb/API/SBTypeFormat.h"
+#include "lldb/API/SBTypeNameSpecifier.h"
+#include "lldb/API/SBTypeSummary.h"
+#include "lldb/API/SBTypeSynthetic.h"
+#include "lldb/API/SBValue.h"
+#include "lldb/API/SBValueList.h"
+#include "lldb/API/SBVariablesOptions.h"
+#include "lldb/API/SBWatchpoint.h"
+#include "lldb/API/SBUnixSignals.h"
+%}
diff --git a/src/llvm-project/lldb/bindings/interface/SBAddress.i b/src/llvm-project/lldb/bindings/interface/SBAddress.i
new file mode 100644
index 0000000..4658534
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBAddress.i
@@ -0,0 +1,185 @@
+//===-- SWIG Interface for SBAddress ----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"A section + offset based address class.
+
+The SBAddress class allows addresses to be relative to a section
+that can move during runtime due to images (executables, shared
+libraries, bundles, frameworks) being loaded at different
+addresses than the addresses found in the object file that
+represents them on disk. There are currently two types of addresses
+for a section:
+    o file addresses
+    o load addresses
+
+File addresses represents the virtual addresses that are in the 'on
+disk' object files. These virtual addresses are converted to be
+relative to unique sections scoped to the object file so that
+when/if the addresses slide when the images are loaded/unloaded
+in memory, we can easily track these changes without having to
+update every object (compile unit ranges, line tables, function
+address ranges, lexical block and inlined subroutine address
+ranges, global and static variables) each time an image is loaded or
+unloaded.
+
+Load addresses represents the virtual addresses where each section
+ends up getting loaded at runtime. Before executing a program, it
+is common for all of the load addresses to be unresolved. When a
+DynamicLoader plug-in receives notification that shared libraries
+have been loaded/unloaded, the load addresses of the main executable
+and any images (shared libraries) will be  resolved/unresolved. When
+this happens, breakpoints that are in one of these sections can be
+set/cleared.
+
+See docstring of SBFunction for example usage of SBAddress."
+) SBAddress;
+class SBAddress
+{
+public:
+
+    SBAddress ();
+
+    SBAddress (const lldb::SBAddress &rhs);
+
+    SBAddress (lldb::SBSection section,
+               lldb::addr_t offset);
+
+    %feature("docstring", "
+    Create an address by resolving a load address using the supplied target.") SBAddress;
+    SBAddress (lldb::addr_t load_addr, lldb::SBTarget &target);
+
+    ~SBAddress ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+#ifdef SWIGPYTHON
+    // operator== is a free function, which swig does not handle, so we inject
+    // our own equality operator here
+    %pythoncode%{
+    def __eq__(self, other):
+      return not self.__ne__(other)
+    %}
+#endif
+
+    bool operator!=(const SBAddress &rhs) const;
+
+    void
+    Clear ();
+
+    addr_t
+    GetFileAddress () const;
+
+    addr_t
+    GetLoadAddress (const lldb::SBTarget &target) const;
+
+    void
+    SetLoadAddress (lldb::addr_t load_addr,
+                    lldb::SBTarget &target);
+
+    bool
+    OffsetAddress (addr_t offset);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    lldb::SBSection
+    GetSection ();
+
+    lldb::addr_t
+    SBAddress::GetOffset ();
+
+    void
+    SetAddress (lldb::SBSection section,
+                lldb::addr_t offset);
+
+    %feature("docstring", "
+    GetSymbolContext() and the following can lookup symbol information for a given address.
+    An address might refer to code or data from an existing module, or it
+    might refer to something on the stack or heap. The following functions
+    will only return valid values if the address has been resolved to a code
+    or data address using 'void SBAddress::SetLoadAddress(...)' or
+    'lldb::SBAddress SBTarget::ResolveLoadAddress (...)'.") GetSymbolContext;
+    lldb::SBSymbolContext
+    GetSymbolContext (uint32_t resolve_scope);
+
+    %feature("docstring", "
+    GetModule() and the following grab individual objects for a given address and
+    are less efficient if you want more than one symbol related objects.
+    Use one of the following when you want multiple debug symbol related
+    objects for an address:
+       lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope);
+       lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope);
+    One or more bits from the SymbolContextItem enumerations can be logically
+    OR'ed together to more efficiently retrieve multiple symbol objects.") GetModule;
+    lldb::SBModule
+    GetModule ();
+
+    lldb::SBCompileUnit
+    GetCompileUnit ();
+
+    lldb::SBFunction
+    GetFunction ();
+
+    lldb::SBBlock
+    GetBlock ();
+
+    lldb::SBSymbol
+    GetSymbol ();
+
+    lldb::SBLineEntry
+    GetLineEntry ();
+
+    STRING_EXTENSION(SBAddress)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __get_load_addr_property__ (self):
+            '''Get the load address for a lldb.SBAddress using the current target.'''
+            return self.GetLoadAddress (target)
+
+        def __set_load_addr_property__ (self, load_addr):
+            '''Set the load address for a lldb.SBAddress using the current target.'''
+            return self.SetLoadAddress (load_addr, target)
+
+        def __int__(self):
+            '''Convert an address to a load address if there is a process and that process is alive, or to a file address otherwise.'''
+            if process.is_alive:
+                return self.GetLoadAddress (target)
+            else:
+                return self.GetFileAddress ()
+
+        def __oct__(self):
+            '''Convert the address to an octal string'''
+            return '%o' % int(self)
+
+        def __hex__(self):
+            '''Convert the address to an hex string'''
+            return '0x%x' % int(self)
+
+        module = property(GetModule, None, doc='''A read only property that returns an lldb object that represents the module (lldb.SBModule) that this address resides within.''')
+        compile_unit = property(GetCompileUnit, None, doc='''A read only property that returns an lldb object that represents the compile unit (lldb.SBCompileUnit) that this address resides within.''')
+        line_entry = property(GetLineEntry, None, doc='''A read only property that returns an lldb object that represents the line entry (lldb.SBLineEntry) that this address resides within.''')
+        function = property(GetFunction, None, doc='''A read only property that returns an lldb object that represents the function (lldb.SBFunction) that this address resides within.''')
+        block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the block (lldb.SBBlock) that this address resides within.''')
+        symbol = property(GetSymbol, None, doc='''A read only property that returns an lldb object that represents the symbol (lldb.SBSymbol) that this address resides within.''')
+        offset = property(GetOffset, None, doc='''A read only property that returns the section offset in bytes as an integer.''')
+        section = property(GetSection, None, doc='''A read only property that returns an lldb object that represents the section (lldb.SBSection) that this address resides within.''')
+        file_addr = property(GetFileAddress, None, doc='''A read only property that returns file address for the section as an integer. This is the address that represents the address as it is found in the object file that defines it.''')
+        load_addr = property(__get_load_addr_property__, __set_load_addr_property__, doc='''A read/write property that gets/sets the SBAddress using load address. The setter resolves SBAddress using the SBTarget from lldb.target so this property can ONLY be used in the interactive script interpreter (i.e. under the lldb script command) and not in Python based commands, or breakpoint commands.''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBAttachInfo.i b/src/llvm-project/lldb/bindings/interface/SBAttachInfo.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBAttachInfo.i
rename to src/llvm-project/lldb/bindings/interface/SBAttachInfo.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBBlock.i b/src/llvm-project/lldb/bindings/interface/SBBlock.i
new file mode 100644
index 0000000..8bd8e37
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBBlock.i
@@ -0,0 +1,163 @@
+//===-- SWIG Interface for SBBlock ------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a lexical block. SBFunction contains SBBlock(s)."
+) SBBlock;
+class SBBlock
+{
+public:
+
+    SBBlock ();
+
+    SBBlock (const lldb::SBBlock &rhs);
+
+    ~SBBlock ();
+
+    %feature("docstring",
+    "Does this block represent an inlined function?"
+    ) IsInlined;
+    bool
+    IsInlined () const;
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    %feature("docstring", "
+    Get the function name if this block represents an inlined function;
+    otherwise, return None.") GetInlinedName;
+    const char *
+    GetInlinedName () const;
+
+    %feature("docstring", "
+    Get the call site file if this block represents an inlined function;
+    otherwise, return an invalid file spec.") GetInlinedCallSiteFile;
+    lldb::SBFileSpec
+    GetInlinedCallSiteFile () const;
+
+    %feature("docstring", "
+    Get the call site line if this block represents an inlined function;
+    otherwise, return 0.") GetInlinedCallSiteLine;
+    uint32_t
+    GetInlinedCallSiteLine () const;
+
+    %feature("docstring", "
+    Get the call site column if this block represents an inlined function;
+    otherwise, return 0.") GetInlinedCallSiteColumn;
+    uint32_t
+    GetInlinedCallSiteColumn () const;
+
+    %feature("docstring", "Get the parent block.") GetParent;
+    lldb::SBBlock
+    GetParent ();
+
+    %feature("docstring", "Get the inlined block that is or contains this block.") GetContainingInlinedBlock;
+    lldb::SBBlock
+    GetContainingInlinedBlock ();
+
+    %feature("docstring", "Get the sibling block for this block.") GetSibling;
+    lldb::SBBlock
+    GetSibling ();
+
+    %feature("docstring", "Get the first child block.") GetFirstChild;
+    lldb::SBBlock
+    GetFirstChild ();
+
+    uint32_t
+    GetNumRanges ();
+
+    lldb::SBAddress
+    GetRangeStartAddress (uint32_t idx);
+
+    lldb::SBAddress
+    GetRangeEndAddress (uint32_t idx);
+
+    uint32_t
+    GetRangeIndexForBlockAddress (lldb::SBAddress block_addr);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    lldb::SBValueList
+    GetVariables (lldb::SBFrame& frame,
+                  bool arguments,
+                  bool locals,
+                  bool statics,
+                  lldb::DynamicValueType use_dynamic);
+
+     lldb::SBValueList
+     GetVariables (lldb::SBTarget& target,
+                   bool arguments,
+                   bool locals,
+                   bool statics);
+
+    STRING_EXTENSION(SBBlock)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def get_range_at_index(self, idx):
+            if idx < self.GetNumRanges():
+                return [self.GetRangeStartAddress(idx), self.GetRangeEndAddress(idx)]
+            return []
+
+        class ranges_access(object):
+            '''A helper object that will lazily hand out an array of lldb.SBAddress that represent address ranges for a block.'''
+            def __init__(self, sbblock):
+                self.sbblock = sbblock
+
+            def __len__(self):
+                if self.sbblock:
+                    return int(self.sbblock.GetNumRanges())
+                return 0
+
+            def __getitem__(self, key):
+                count = len(self)
+                if type(key) is int:
+                    return self.sbblock.get_range_at_index (key);
+                if isinstance(key, SBAddress):
+                    range_idx = self.sbblock.GetRangeIndexForBlockAddress(key);
+                    if range_idx < len(self):
+                        return [self.sbblock.GetRangeStartAddress(range_idx), self.sbblock.GetRangeEndAddress(range_idx)]
+                else:
+                    print("error: unsupported item type: %s" % type(key))
+                return None
+
+        def get_ranges_access_object(self):
+            '''An accessor function that returns a ranges_access() object which allows lazy block address ranges access.'''
+            return self.ranges_access (self)
+
+        def get_ranges_array(self):
+            '''An accessor function that returns an array object that contains all ranges in this block object.'''
+            if not hasattr(self, 'ranges_array'):
+                self.ranges_array = []
+                for idx in range(self.num_ranges):
+                    self.ranges_array.append ([self.GetRangeStartAddress(idx), self.GetRangeEndAddress(idx)])
+            return self.ranges_array
+
+        def get_call_site(self):
+            return declaration(self.GetInlinedCallSiteFile(), self.GetInlinedCallSiteLine(), self.GetInlinedCallSiteColumn())
+
+        parent = property(GetParent, None, doc='''A read only property that returns the same result as GetParent().''')
+        first_child = property(GetFirstChild, None, doc='''A read only property that returns the same result as GetFirstChild().''')
+        call_site = property(get_call_site, None, doc='''A read only property that returns a lldb.declaration object that contains the inlined call site file, line and column.''')
+        sibling = property(GetSibling, None, doc='''A read only property that returns the same result as GetSibling().''')
+        name = property(GetInlinedName, None, doc='''A read only property that returns the same result as GetInlinedName().''')
+        inlined_block = property(GetContainingInlinedBlock, None, doc='''A read only property that returns the same result as GetContainingInlinedBlock().''')
+        range = property(get_ranges_access_object, None, doc='''A read only property that allows item access to the address ranges for a block by integer (range = block.range[0]) and by lldb.SBAdddress (find the range that contains the specified lldb.SBAddress like "pc_range = lldb.frame.block.range[frame.addr]").''')
+        ranges = property(get_ranges_array, None, doc='''A read only property that returns a list() object that contains all of the address ranges for the block.''')
+        num_ranges = property(GetNumRanges, None, doc='''A read only property that returns the same result as GetNumRanges().''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBBreakpoint.i b/src/llvm-project/lldb/bindings/interface/SBBreakpoint.i
new file mode 100644
index 0000000..2035434
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBBreakpoint.i
@@ -0,0 +1,334 @@
+//===-- SWIG Interface for SBBreakpoint -------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+namespace lldb {
+
+%feature("docstring",
+"Represents a logical breakpoint and its associated settings.
+
+For example (from test/functionalities/breakpoint/breakpoint_ignore_count/
+TestBreakpointIgnoreCount.py),
+
+    def breakpoint_ignore_count_python(self):
+        '''Use Python APIs to set breakpoint ignore count.'''
+        exe = os.path.join(os.getcwd(), 'a.out')
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Now create a breakpoint on main.c by name 'c'.
+        breakpoint = target.BreakpointCreateByName('c', 'a.out')
+        self.assertTrue(breakpoint and
+                        breakpoint.GetNumLocations() == 1,
+                        VALID_BREAKPOINT)
+
+        # Get the breakpoint location from breakpoint after we verified that,
+        # indeed, it has one location.
+        location = breakpoint.GetLocationAtIndex(0)
+        self.assertTrue(location and
+                        location.IsEnabled(),
+                        VALID_BREAKPOINT_LOCATION)
+
+        # Set the ignore count on the breakpoint location.
+        location.SetIgnoreCount(2)
+        self.assertTrue(location.GetIgnoreCount() == 2,
+                        'SetIgnoreCount() works correctly')
+
+        # Now launch the process, and do not stop at entry point.
+        process = target.LaunchSimple(None, None, os.getcwd())
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+        # Frame#0 should be on main.c:37, frame#1 should be on main.c:25, and
+        # frame#2 should be on main.c:48.
+        #lldbutil.print_stacktraces(process)
+        from lldbutil import get_stopped_thread
+        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(thread != None, 'There should be a thread stopped due to breakpoint')
+        frame0 = thread.GetFrameAtIndex(0)
+        frame1 = thread.GetFrameAtIndex(1)
+        frame2 = thread.GetFrameAtIndex(2)
+        self.assertTrue(frame0.GetLineEntry().GetLine() == self.line1 and
+                        frame1.GetLineEntry().GetLine() == self.line3 and
+                        frame2.GetLineEntry().GetLine() == self.line4,
+                        STOPPED_DUE_TO_BREAKPOINT_IGNORE_COUNT)
+
+        # The hit count for the breakpoint should be 3.
+        self.assertTrue(breakpoint.GetHitCount() == 3)
+
+        process.Continue()
+
+SBBreakpoint supports breakpoint location iteration, for example,
+
+    for bl in breakpoint:
+        print('breakpoint location load addr: %s' % hex(bl.GetLoadAddress()))
+        print('breakpoint location condition: %s' % hex(bl.GetCondition()))
+
+and rich comparison methods which allow the API program to use,
+
+    if aBreakpoint == bBreakpoint:
+        ...
+
+to compare two breakpoints for equality."
+) SBBreakpoint;
+class SBBreakpoint
+{
+public:
+
+    SBBreakpoint ();
+
+    SBBreakpoint (const lldb::SBBreakpoint& rhs);
+
+    ~SBBreakpoint();
+
+    bool operator==(const lldb::SBBreakpoint &rhs);
+
+    bool operator!=(const lldb::SBBreakpoint &rhs);
+
+    break_id_t
+    GetID () const;
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    void
+    ClearAllBreakpointSites ();
+
+    lldb::SBBreakpointLocation
+    FindLocationByAddress (lldb::addr_t vm_addr);
+
+    lldb::break_id_t
+    FindLocationIDByAddress (lldb::addr_t vm_addr);
+
+    lldb::SBBreakpointLocation
+    FindLocationByID (lldb::break_id_t bp_loc_id);
+
+    lldb::SBBreakpointLocation
+    GetLocationAtIndex (uint32_t index);
+
+    void
+    SetEnabled (bool enable);
+
+    bool
+    IsEnabled ();
+
+    void
+    SetOneShot (bool one_shot);
+
+    bool
+    IsOneShot ();
+
+    bool
+    IsInternal ();
+
+    uint32_t
+    GetHitCount () const;
+
+    void
+    SetIgnoreCount (uint32_t count);
+
+    uint32_t
+    GetIgnoreCount () const;
+
+    %feature("docstring", "
+    The breakpoint stops only if the condition expression evaluates to true.") SetCondition;
+    void
+    SetCondition (const char *condition);
+
+    %feature("docstring", "
+    Get the condition expression for the breakpoint.") GetCondition;
+    const char *
+    GetCondition ();
+
+    void SetAutoContinue(bool auto_continue);
+
+    bool GetAutoContinue();
+
+    void
+    SetThreadID (lldb::tid_t sb_thread_id);
+
+    lldb::tid_t
+    GetThreadID ();
+
+    void
+    SetThreadIndex (uint32_t index);
+
+    uint32_t
+    GetThreadIndex() const;
+
+    void
+    SetThreadName (const char *thread_name);
+
+    const char *
+    GetThreadName () const;
+
+    void
+    SetQueueName (const char *queue_name);
+
+    const char *
+    GetQueueName () const;
+
+    %feature("docstring", "
+    Set the name of the script function to be called when the breakpoint is hit.") SetScriptCallbackFunction;
+    void
+    SetScriptCallbackFunction (const char *callback_function_name);
+
+    %feature("docstring", "
+    Set the name of the script function to be called when the breakpoint is hit.
+    To use this variant, the function should take (frame, bp_loc, extra_args, dict) and
+    when the breakpoint is hit the extra_args will be passed to the callback function.") SetScriptCallbackFunction;
+    SBError
+    SetScriptCallbackFunction (const char *callback_function_name,
+                               SBStructuredData &extra_args);
+
+    %feature("docstring", "
+    Provide the body for the script function to be called when the breakpoint is hit.
+    The body will be wrapped in a function, which be passed two arguments:
+    'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint
+    'bpno'  - which is the SBBreakpointLocation to which the callback was attached.
+
+    The error parameter is currently ignored, but will at some point hold the Python
+    compilation diagnostics.
+    Returns true if the body compiles successfully, false if not.") SetScriptCallbackBody;
+    SBError
+    SetScriptCallbackBody (const char *script_body_text);
+
+    void SetCommandLineCommands(SBStringList &commands);
+
+    bool GetCommandLineCommands(SBStringList &commands);
+
+    bool
+    AddName (const char *new_name);
+
+    void
+    RemoveName (const char *name_to_remove);
+
+    bool
+    MatchesName (const char *name);
+
+    void
+    GetNames (SBStringList &names);
+
+    size_t
+    GetNumResolvedLocations() const;
+
+    size_t
+    GetNumLocations() const;
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    bool
+    GetDescription(lldb::SBStream &description, bool include_locations);
+
+    // Can only be called from a ScriptedBreakpointResolver...
+    SBError
+    AddLocation(SBAddress &address);
+
+    static bool
+    EventIsBreakpointEvent (const lldb::SBEvent &event);
+
+    static lldb::BreakpointEventType
+    GetBreakpointEventTypeFromEvent (const lldb::SBEvent& event);
+
+    static lldb::SBBreakpoint
+    GetBreakpointFromEvent (const lldb::SBEvent& event);
+
+    static lldb::SBBreakpointLocation
+    GetBreakpointLocationAtIndexFromEvent (const lldb::SBEvent& event, uint32_t loc_idx);
+
+    static uint32_t
+    GetNumBreakpointLocationsFromEvent (const lldb::SBEvent &event_sp);
+
+    bool
+    IsHardware ();
+
+    STRING_EXTENSION(SBBreakpoint)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+
+        class locations_access(object):
+            '''A helper object that will lazily hand out locations for a breakpoint when supplied an index.'''
+            def __init__(self, sbbreakpoint):
+                self.sbbreakpoint = sbbreakpoint
+
+            def __len__(self):
+                if self.sbbreakpoint:
+                    return int(self.sbbreakpoint.GetNumLocations())
+                return 0
+
+            def __getitem__(self, key):
+                if type(key) is int and key < len(self):
+                    return self.sbbreakpoint.GetLocationAtIndex(key)
+                return None
+
+        def get_locations_access_object(self):
+            '''An accessor function that returns a locations_access() object which allows lazy location access from a lldb.SBBreakpoint object.'''
+            return self.locations_access (self)
+
+        def get_breakpoint_location_list(self):
+            '''An accessor function that returns a list() that contains all locations in a lldb.SBBreakpoint object.'''
+            locations = []
+            accessor = self.get_locations_access_object()
+            for idx in range(len(accessor)):
+                locations.append(accessor[idx])
+            return locations
+
+        def __iter__(self):
+            '''Iterate over all breakpoint locations in a lldb.SBBreakpoint
+            object.'''
+            return lldb_iter(self, 'GetNumLocations', 'GetLocationAtIndex')
+
+        def __len__(self):
+            '''Return the number of breakpoint locations in a lldb.SBBreakpoint
+            object.'''
+            return self.GetNumLocations()
+
+        locations = property(get_breakpoint_location_list, None, doc='''A read only property that returns a list() of lldb.SBBreakpointLocation objects for this breakpoint.''')
+        location = property(get_locations_access_object, None, doc='''A read only property that returns an object that can access locations by index (not location ID) (location = bkpt.location[12]).''')
+        id = property(GetID, None, doc='''A read only property that returns the ID of this breakpoint.''')
+        enabled = property(IsEnabled, SetEnabled, doc='''A read/write property that configures whether this breakpoint is enabled or not.''')
+        one_shot = property(IsOneShot, SetOneShot, doc='''A read/write property that configures whether this breakpoint is one-shot (deleted when hit) or not.''')
+        num_locations = property(GetNumLocations, None, doc='''A read only property that returns the count of locations of this breakpoint.''')
+    %}
+#endif
+
+
+};
+
+class SBBreakpointListImpl;
+
+class LLDB_API SBBreakpointList
+{
+public:
+  SBBreakpointList(SBTarget &target);
+
+  ~SBBreakpointList();
+
+  size_t GetSize() const;
+
+  SBBreakpoint
+  GetBreakpointAtIndex(size_t idx);
+
+  SBBreakpoint
+  FindBreakpointByID(lldb::break_id_t);
+
+  void Append(const SBBreakpoint &sb_bkpt);
+
+  bool AppendIfUnique(const SBBreakpoint &sb_bkpt);
+
+  void AppendByID (lldb::break_id_t id);
+
+  void Clear();
+private:
+  std::shared_ptr<SBBreakpointListImpl> m_opaque_sp;
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBBreakpointLocation.i b/src/llvm-project/lldb/bindings/interface/SBBreakpointLocation.i
new file mode 100644
index 0000000..dc39c83
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBBreakpointLocation.i
@@ -0,0 +1,141 @@
+//===-- SWIG Interface for SBBreakpointLocation -----------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents one unique instance (by address) of a logical breakpoint.
+
+A breakpoint location is defined by the breakpoint that produces it,
+and the address that resulted in this particular instantiation.
+Each breakpoint location has its settable options.
+
+SBBreakpoint contains SBBreakpointLocation(s). See docstring of SBBreakpoint
+for retrieval of an SBBreakpointLocation from an SBBreakpoint."
+) SBBreakpointLocation;
+class SBBreakpointLocation
+{
+public:
+
+    SBBreakpointLocation ();
+
+    SBBreakpointLocation (const lldb::SBBreakpointLocation &rhs);
+
+    ~SBBreakpointLocation ();
+
+    break_id_t
+    GetID ();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    lldb::SBAddress
+    GetAddress();
+
+    lldb::addr_t
+    GetLoadAddress ();
+
+    void
+    SetEnabled(bool enabled);
+
+    bool
+    IsEnabled ();
+
+    uint32_t
+    GetHitCount ();
+
+    uint32_t
+    GetIgnoreCount ();
+
+    void
+    SetIgnoreCount (uint32_t n);
+
+    %feature("docstring", "
+    The breakpoint location stops only if the condition expression evaluates
+    to true.") SetCondition;
+    void
+    SetCondition (const char *condition);
+
+    %feature("docstring", "
+    Get the condition expression for the breakpoint location.") GetCondition;
+    const char *
+    GetCondition ();
+
+    bool GetAutoContinue();
+
+    void SetAutoContinue(bool auto_continue);
+
+    %feature("docstring", "
+    Set the callback to the given Python function name.
+    The function takes three arguments (frame, bp_loc, dict).") SetScriptCallbackFunction;
+    void
+    SetScriptCallbackFunction (const char *callback_function_name);
+
+    %feature("docstring", "
+    Set the name of the script function to be called when the breakpoint is hit.
+    To use this variant, the function should take (frame, bp_loc, extra_args, dict) and
+    when the breakpoint is hit the extra_args will be passed to the callback function.") SetScriptCallbackFunction;
+    SBError
+    SetScriptCallbackFunction (const char *callback_function_name,
+                               SBStructuredData &extra_args);
+
+    %feature("docstring", "
+    Provide the body for the script function to be called when the breakpoint location is hit.
+    The body will be wrapped in a function, which be passed two arguments:
+    'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint
+    'bpno'  - which is the SBBreakpointLocation to which the callback was attached.
+
+    The error parameter is currently ignored, but will at some point hold the Python
+    compilation diagnostics.
+    Returns true if the body compiles successfully, false if not.") SetScriptCallbackBody;
+    SBError
+    SetScriptCallbackBody (const char *script_body_text);
+
+    void SetCommandLineCommands(SBStringList &commands);
+
+    bool GetCommandLineCommands(SBStringList &commands);
+
+    void
+    SetThreadID (lldb::tid_t sb_thread_id);
+
+    lldb::tid_t
+    GetThreadID ();
+
+    void
+    SetThreadIndex (uint32_t index);
+
+    uint32_t
+    GetThreadIndex() const;
+
+    void
+    SetThreadName (const char *thread_name);
+
+    const char *
+    GetThreadName () const;
+
+    void
+    SetQueueName (const char *queue_name);
+
+    const char *
+    GetQueueName () const;
+
+    bool
+    IsResolved ();
+
+    bool
+    GetDescription (lldb::SBStream &description, DescriptionLevel level);
+
+    SBBreakpoint
+    GetBreakpoint ();
+
+    STRING_EXTENSION_LEVEL(SBBreakpointLocation, lldb::eDescriptionLevelFull)
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBBreakpointName.i b/src/llvm-project/lldb/bindings/interface/SBBreakpointName.i
new file mode 100644
index 0000000..e280d42
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBBreakpointName.i
@@ -0,0 +1,115 @@
+//===-- SWIG interface for SBBreakpointName.h -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+%feature("docstring",
+"Represents a breakpoint name registered in a given SBTarget.
+
+Breakpoint names provide a way to act on groups of breakpoints.  When you add a
+name to a group of breakpoints, you can then use the name in all the command
+line lldb commands for that name.  You can also configure the SBBreakpointName
+options and those options will be propagated to any SBBreakpoints currently
+using that name.  Adding a name to a breakpoint will also apply any of the
+set options to that breakpoint.
+
+You can also set permissions on a breakpoint name to disable listing, deleting
+and disabling breakpoints.  That will disallow the given operation for breakpoints
+except when the breakpoint is mentioned by ID.  So for instance deleting all the
+breakpoints won't delete breakpoints so marked."
+) SBBreakpointName;
+class LLDB_API SBBreakpointName {
+public:
+  SBBreakpointName();
+
+  SBBreakpointName(SBTarget &target, const char *name);
+
+  SBBreakpointName(SBBreakpoint &bkpt, const char *name);
+
+  SBBreakpointName(const lldb::SBBreakpointName &rhs);
+
+  ~SBBreakpointName();
+
+  // Tests to see if the opaque breakpoint object in this object matches the
+  // opaque breakpoint object in "rhs".
+  bool operator==(const lldb::SBBreakpointName &rhs);
+
+  bool operator!=(const lldb::SBBreakpointName &rhs);
+
+  explicit operator bool() const;
+
+  bool IsValid() const;
+
+  const char *GetName() const;
+
+  void SetEnabled(bool enable);
+
+  bool IsEnabled();
+
+  void SetOneShot(bool one_shot);
+
+  bool IsOneShot() const;
+
+  void SetIgnoreCount(uint32_t count);
+
+  uint32_t GetIgnoreCount() const;
+
+  void SetCondition(const char *condition);
+
+  const char *GetCondition();
+
+  void SetAutoContinue(bool auto_continue);
+
+  bool GetAutoContinue();
+
+  void SetThreadID(lldb::tid_t sb_thread_id);
+
+  lldb::tid_t GetThreadID();
+
+  void SetThreadIndex(uint32_t index);
+
+  uint32_t GetThreadIndex() const;
+
+  void SetThreadName(const char *thread_name);
+
+  const char *GetThreadName() const;
+
+  void SetQueueName(const char *queue_name);
+
+  const char *GetQueueName() const;
+
+  void SetScriptCallbackFunction(const char *callback_function_name);
+
+  SBError
+  SetScriptCallbackFunction (const char *callback_function_name,
+                             SBStructuredData &extra_args);
+
+  void SetCommandLineCommands(SBStringList &commands);
+
+  bool GetCommandLineCommands(SBStringList &commands);
+
+  SBError SetScriptCallbackBody(const char *script_body_text);
+
+  const char *GetHelpString() const;
+  void SetHelpString(const char *help_string);
+
+  bool GetAllowList() const;
+  void SetAllowList(bool value);
+
+  bool GetAllowDelete();
+  void SetAllowDelete(bool value);
+
+  bool GetAllowDisable();
+  void SetAllowDisable(bool value);
+
+  bool GetDescription(lldb::SBStream &description);
+
+  STRING_EXTENSION(SBBreakpointName)
+};
+
+} // namespace lldb
+
diff --git a/src/llvm-project/lldb/scripts/interface/SBBroadcaster.i b/src/llvm-project/lldb/bindings/interface/SBBroadcaster.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBBroadcaster.i
rename to src/llvm-project/lldb/bindings/interface/SBBroadcaster.i
diff --git a/src/llvm-project/lldb/scripts/interface/SBCommandInterpreter.i b/src/llvm-project/lldb/bindings/interface/SBCommandInterpreter.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBCommandInterpreter.i
rename to src/llvm-project/lldb/bindings/interface/SBCommandInterpreter.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBCommandReturnObject.i b/src/llvm-project/lldb/bindings/interface/SBCommandReturnObject.i
new file mode 100644
index 0000000..affa165
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBCommandReturnObject.i
@@ -0,0 +1,127 @@
+//===-- SWIG Interface for SBCommandReturnObject ----------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a container which holds the result from command execution.
+It works with SBCommandInterpreter.HandleCommand() to encapsulate the result
+of command execution.
+
+See SBCommandInterpreter for example usage of SBCommandReturnObject."
+) SBCommandReturnObject;
+class SBCommandReturnObject
+{
+public:
+
+    SBCommandReturnObject ();
+
+    SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs);
+
+    ~SBCommandReturnObject ();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    const char *
+    GetOutput ();
+
+    const char *
+    GetError ();
+
+    size_t
+    GetOutputSize ();
+
+    size_t
+    GetErrorSize ();
+
+    const char *
+    GetOutput (bool only_if_no_immediate);
+
+    const char *
+    GetError (bool if_no_immediate);
+
+    size_t
+    PutOutput (lldb::SBFile file);
+
+    size_t
+    PutError (lldb::SBFile file);
+
+    size_t
+    PutOutput (lldb::FileSP BORROWED);
+
+    size_t
+    PutError (lldb::FileSP BORROWED);
+
+    void
+    Clear();
+
+    void
+    SetStatus (lldb::ReturnStatus status);
+
+    void
+    SetError (lldb::SBError &error,
+              const char *fallback_error_cstr = NULL);
+
+    void
+    SetError (const char *error_cstr);
+
+    lldb::ReturnStatus
+    GetStatus();
+
+    bool
+    Succeeded ();
+
+    bool
+    HasResult ();
+
+    void
+    AppendMessage (const char *message);
+
+    void
+    AppendWarning (const char *message);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    void SetImmediateOutputFile(lldb::SBFile file);
+    void SetImmediateErrorFile(lldb::SBFile file);
+    void SetImmediateOutputFile(lldb::FileSP BORROWED);
+    void SetImmediateErrorFile(lldb::FileSP BORROWED);
+
+    STRING_EXTENSION(SBCommandReturnObject)
+
+    %extend {
+        // transfer_ownership does nothing, and is here for compatibility with
+        // old scripts.  Ownership is tracked by reference count in the ordinary way.
+
+        void SetImmediateOutputFile(lldb::FileSP BORROWED, bool transfer_ownership) {
+            self->SetImmediateOutputFile(BORROWED);
+        }
+        void SetImmediateErrorFile(lldb::FileSP BORROWED, bool transfer_ownership) {
+            self->SetImmediateErrorFile(BORROWED);
+        }
+    }
+
+	void
+	PutCString(const char* string, int len);
+
+    // wrapping the variadic Printf() with a plain Print()
+    // because it is hard to support varargs in SWIG bridgings
+    %extend {
+        void Print (const char* str)
+        {
+            self->Printf("%s", str);
+        }
+    }
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBCommunication.i b/src/llvm-project/lldb/bindings/interface/SBCommunication.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBCommunication.i
rename to src/llvm-project/lldb/bindings/interface/SBCommunication.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBCompileUnit.i b/src/llvm-project/lldb/bindings/interface/SBCompileUnit.i
new file mode 100644
index 0000000..d6a4c07
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBCompileUnit.i
@@ -0,0 +1,138 @@
+//===-- SWIG Interface for SBCompileUnit ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a compilation unit, or compiled source file.
+
+SBCompileUnit supports line entry iteration. For example,
+
+    # Now get the SBSymbolContext from this frame.  We want everything. :-)
+    context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
+    ...
+
+    compileUnit = context.GetCompileUnit()
+
+    for lineEntry in compileUnit:
+        print('line entry: %s:%d' % (str(lineEntry.GetFileSpec()),
+                                    lineEntry.GetLine()))
+        print('start addr: %s' % str(lineEntry.GetStartAddress()))
+        print('end   addr: %s' % str(lineEntry.GetEndAddress()))
+
+produces:
+
+line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
+start addr: a.out[0x100000d98]
+end   addr: a.out[0x100000da3]
+line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
+start addr: a.out[0x100000da3]
+end   addr: a.out[0x100000da9]
+line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
+start addr: a.out[0x100000da9]
+end   addr: a.out[0x100000db6]
+line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
+start addr: a.out[0x100000db6]
+end   addr: a.out[0x100000dbc]
+...
+
+See also SBSymbolContext and SBLineEntry"
+) SBCompileUnit;
+class SBCompileUnit
+{
+public:
+
+    SBCompileUnit ();
+
+    SBCompileUnit (const lldb::SBCompileUnit &rhs);
+
+    ~SBCompileUnit ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    lldb::SBFileSpec
+    GetFileSpec () const;
+
+    uint32_t
+    GetNumLineEntries () const;
+
+    lldb::SBLineEntry
+    GetLineEntryAtIndex (uint32_t idx) const;
+
+    uint32_t
+    FindLineEntryIndex (uint32_t start_idx,
+                        uint32_t line,
+                        lldb::SBFileSpec *inline_file_spec) const;
+
+    uint32_t
+    FindLineEntryIndex (uint32_t start_idx,
+                        uint32_t line,
+                        lldb::SBFileSpec *inline_file_spec,
+			bool exact) const;
+
+    SBFileSpec
+    GetSupportFileAtIndex (uint32_t idx) const;
+
+    uint32_t
+    GetNumSupportFiles () const;
+
+    uint32_t
+    FindSupportFileIndex (uint32_t start_idx, const SBFileSpec &sb_file, bool full);
+
+    %feature("docstring", "
+     Get all types matching type_mask from debug info in this
+     compile unit.
+
+     @param[in] type_mask
+        A bitfield that consists of one or more bits logically OR'ed
+        together from the lldb::TypeClass enumeration. This allows
+        you to request only structure types, or only class, struct
+        and union types. Passing in lldb::eTypeClassAny will return
+        all types found in the debug information for this compile
+        unit.
+
+     @return
+        A list of types in this compile unit that match type_mask") GetTypes;
+    lldb::SBTypeList
+    GetTypes (uint32_t type_mask = lldb::eTypeClassAny);
+
+     lldb::LanguageType
+     GetLanguage ();
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    bool
+    operator == (const lldb::SBCompileUnit &rhs) const;
+
+    bool
+    operator != (const lldb::SBCompileUnit &rhs) const;
+
+    STRING_EXTENSION(SBCompileUnit)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __iter__(self):
+            '''Iterate over all line entries in a lldb.SBCompileUnit object.'''
+            return lldb_iter(self, 'GetNumLineEntries', 'GetLineEntryAtIndex')
+
+        def __len__(self):
+            '''Return the number of line entries in a lldb.SBCompileUnit
+            object.'''
+            return self.GetNumLineEntries()
+
+        file = property(GetFileSpec, None, doc='''A read only property that returns the same result an lldb object that represents the source file (lldb.SBFileSpec) for the compile unit.''')
+        num_line_entries = property(GetNumLineEntries, None, doc='''A read only property that returns the number of line entries in a compile unit as an integer.''')
+    %}
+#endif
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBData.i b/src/llvm-project/lldb/bindings/interface/SBData.i
new file mode 100644
index 0000000..3e74240
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBData.i
@@ -0,0 +1,297 @@
+//===-- SWIG Interface for SBData -------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+
+namespace lldb {
+
+class SBData
+{
+public:
+
+    SBData ();
+
+    SBData (const SBData &rhs);
+
+    ~SBData ();
+
+    uint8_t
+    GetAddressByteSize ();
+
+    void
+    SetAddressByteSize (uint8_t addr_byte_size);
+
+    void
+    Clear ();
+
+    bool
+    IsValid();
+
+    explicit operator bool() const;
+
+    size_t
+    GetByteSize ();
+
+    lldb::ByteOrder
+    GetByteOrder();
+
+    void
+    SetByteOrder (lldb::ByteOrder endian);
+
+    float
+    GetFloat (lldb::SBError& error, lldb::offset_t offset);
+
+    double
+    GetDouble (lldb::SBError& error, lldb::offset_t offset);
+
+    long double
+    GetLongDouble (lldb::SBError& error, lldb::offset_t offset);
+
+    lldb::addr_t
+    GetAddress (lldb::SBError& error, lldb::offset_t offset);
+
+    uint8_t
+    GetUnsignedInt8 (lldb::SBError& error, lldb::offset_t offset);
+
+    uint16_t
+    GetUnsignedInt16 (lldb::SBError& error, lldb::offset_t offset);
+
+    uint32_t
+    GetUnsignedInt32 (lldb::SBError& error, lldb::offset_t offset);
+
+    uint64_t
+    GetUnsignedInt64 (lldb::SBError& error, lldb::offset_t offset);
+
+    int8_t
+    GetSignedInt8 (lldb::SBError& error, lldb::offset_t offset);
+
+    int16_t
+    GetSignedInt16 (lldb::SBError& error, lldb::offset_t offset);
+
+    int32_t
+    GetSignedInt32 (lldb::SBError& error, lldb::offset_t offset);
+
+    int64_t
+    GetSignedInt64 (lldb::SBError& error, lldb::offset_t offset);
+
+    const char*
+    GetString (lldb::SBError& error, lldb::offset_t offset);
+
+    bool
+    GetDescription (lldb::SBStream &description, lldb::addr_t base_addr);
+
+    size_t
+    ReadRawData (lldb::SBError& error,
+                 lldb::offset_t offset,
+                 void *buf,
+                 size_t size);
+
+    void
+    SetData (lldb::SBError& error, const void *buf, size_t size, lldb::ByteOrder endian, uint8_t addr_size);
+
+    bool
+    Append (const SBData& rhs);
+
+    static lldb::SBData
+    CreateDataFromCString (lldb::ByteOrder endian, uint32_t addr_byte_size, const char* data);
+
+    // in the following CreateData*() and SetData*() prototypes, the two parameters array and array_len
+    // should not be renamed or rearranged, because doing so will break the SWIG typemap
+    static lldb::SBData
+    CreateDataFromUInt64Array (lldb::ByteOrder endian, uint32_t addr_byte_size, uint64_t* array, size_t array_len);
+
+    static lldb::SBData
+    CreateDataFromUInt32Array (lldb::ByteOrder endian, uint32_t addr_byte_size, uint32_t* array, size_t array_len);
+
+    static lldb::SBData
+    CreateDataFromSInt64Array (lldb::ByteOrder endian, uint32_t addr_byte_size, int64_t* array, size_t array_len);
+
+    static lldb::SBData
+    CreateDataFromSInt32Array (lldb::ByteOrder endian, uint32_t addr_byte_size, int32_t* array, size_t array_len);
+
+    static lldb::SBData
+    CreateDataFromDoubleArray (lldb::ByteOrder endian, uint32_t addr_byte_size, double* array, size_t array_len);
+
+    bool
+    SetDataFromCString (const char* data);
+
+    bool
+    SetDataFromUInt64Array (uint64_t* array, size_t array_len);
+
+    bool
+    SetDataFromUInt32Array (uint32_t* array, size_t array_len);
+
+    bool
+    SetDataFromSInt64Array (int64_t* array, size_t array_len);
+
+    bool
+    SetDataFromSInt32Array (int32_t* array, size_t array_len);
+
+    bool
+    SetDataFromDoubleArray (double* array, size_t array_len);
+
+    STRING_EXTENSION(SBData)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+
+        class read_data_helper:
+            def __init__(self, sbdata, readerfunc, item_size):
+                self.sbdata = sbdata
+                self.readerfunc = readerfunc
+                self.item_size = item_size
+            def __getitem__(self,key):
+                if isinstance(key,slice):
+                    list = []
+                    for x in range(*key.indices(self.__len__())):
+                        list.append(self.__getitem__(x))
+                    return list
+                if not (isinstance(key,six.integer_types)):
+                    raise TypeError('must be int')
+                key = key * self.item_size # SBData uses byte-based indexes, but we want to use itemsize-based indexes here
+                error = SBError()
+                my_data = self.readerfunc(self.sbdata,error,key)
+                if error.Fail():
+                    raise IndexError(error.GetCString())
+                else:
+                    return my_data
+            def __len__(self):
+                return int(self.sbdata.GetByteSize()/self.item_size)
+            def all(self):
+                return self[0:len(self)]
+
+        @classmethod
+        def CreateDataFromInt (cls, value, size = None, target = None, ptr_size = None, endian = None):
+            import sys
+            lldbmodule = sys.modules[cls.__module__]
+            lldbdict = lldbmodule.__dict__
+            if 'target' in lldbdict:
+                lldbtarget = lldbdict['target']
+            else:
+                lldbtarget = None
+            if target == None and lldbtarget != None and lldbtarget.IsValid():
+                target = lldbtarget
+            if ptr_size == None:
+                if target and target.IsValid():
+                    ptr_size = target.addr_size
+                else:
+                    ptr_size = 8
+            if endian == None:
+                if target and target.IsValid():
+                    endian = target.byte_order
+                else:
+                    endian = lldbdict['eByteOrderLittle']
+            if size == None:
+                if value > 2147483647:
+                    size = 8
+                elif value < -2147483648:
+                    size = 8
+                elif value > 4294967295:
+                    size = 8
+                else:
+                    size = 4
+            if size == 4:
+                if value < 0:
+                    return SBData().CreateDataFromSInt32Array(endian, ptr_size, [value])
+                return SBData().CreateDataFromUInt32Array(endian, ptr_size, [value])
+            if size == 8:
+                if value < 0:
+                    return SBData().CreateDataFromSInt64Array(endian, ptr_size, [value])
+                return SBData().CreateDataFromUInt64Array(endian, ptr_size, [value])
+            return None
+
+        def _make_helper(self, sbdata, getfunc, itemsize):
+            return self.read_data_helper(sbdata, getfunc, itemsize)
+
+        def _make_helper_uint8(self):
+            return self._make_helper(self, SBData.GetUnsignedInt8, 1)
+
+        def _make_helper_uint16(self):
+            return self._make_helper(self, SBData.GetUnsignedInt16, 2)
+
+        def _make_helper_uint32(self):
+            return self._make_helper(self, SBData.GetUnsignedInt32, 4)
+
+        def _make_helper_uint64(self):
+            return self._make_helper(self, SBData.GetUnsignedInt64, 8)
+
+        def _make_helper_sint8(self):
+            return self._make_helper(self, SBData.GetSignedInt8, 1)
+
+        def _make_helper_sint16(self):
+            return self._make_helper(self, SBData.GetSignedInt16, 2)
+
+        def _make_helper_sint32(self):
+            return self._make_helper(self, SBData.GetSignedInt32, 4)
+
+        def _make_helper_sint64(self):
+            return self._make_helper(self, SBData.GetSignedInt64, 8)
+
+        def _make_helper_float(self):
+            return self._make_helper(self, SBData.GetFloat, 4)
+
+        def _make_helper_double(self):
+            return self._make_helper(self, SBData.GetDouble, 8)
+
+        def _read_all_uint8(self):
+            return self._make_helper_uint8().all()
+
+        def _read_all_uint16(self):
+            return self._make_helper_uint16().all()
+
+        def _read_all_uint32(self):
+            return self._make_helper_uint32().all()
+
+        def _read_all_uint64(self):
+            return self._make_helper_uint64().all()
+
+        def _read_all_sint8(self):
+            return self._make_helper_sint8().all()
+
+        def _read_all_sint16(self):
+            return self._make_helper_sint16().all()
+
+        def _read_all_sint32(self):
+            return self._make_helper_sint32().all()
+
+        def _read_all_sint64(self):
+            return self._make_helper_sint64().all()
+
+        def _read_all_float(self):
+            return self._make_helper_float().all()
+
+        def _read_all_double(self):
+            return self._make_helper_double().all()
+
+        uint8 = property(_make_helper_uint8, None, doc='''A read only property that returns an array-like object out of which you can read uint8 values.''')
+        uint16 = property(_make_helper_uint16, None, doc='''A read only property that returns an array-like object out of which you can read uint16 values.''')
+        uint32 = property(_make_helper_uint32, None, doc='''A read only property that returns an array-like object out of which you can read uint32 values.''')
+        uint64 = property(_make_helper_uint64, None, doc='''A read only property that returns an array-like object out of which you can read uint64 values.''')
+        sint8 = property(_make_helper_sint8, None, doc='''A read only property that returns an array-like object out of which you can read sint8 values.''')
+        sint16 = property(_make_helper_sint16, None, doc='''A read only property that returns an array-like object out of which you can read sint16 values.''')
+        sint32 = property(_make_helper_sint32, None, doc='''A read only property that returns an array-like object out of which you can read sint32 values.''')
+        sint64 = property(_make_helper_sint64, None, doc='''A read only property that returns an array-like object out of which you can read sint64 values.''')
+        float = property(_make_helper_float, None, doc='''A read only property that returns an array-like object out of which you can read float values.''')
+        double = property(_make_helper_double, None, doc='''A read only property that returns an array-like object out of which you can read double values.''')
+        uint8s = property(_read_all_uint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint8 values.''')
+        uint16s = property(_read_all_uint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint16 values.''')
+        uint32s = property(_read_all_uint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint32 values.''')
+        uint64s = property(_read_all_uint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint64 values.''')
+        sint8s = property(_read_all_sint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint8 values.''')
+        sint16s = property(_read_all_sint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint16 values.''')
+        sint32s = property(_read_all_sint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint32 values.''')
+        sint64s = property(_read_all_sint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint64 values.''')
+        floats = property(_read_all_float, None, doc='''A read only property that returns an array with all the contents of this SBData represented as float values.''')
+        doubles = property(_read_all_double, None, doc='''A read only property that returns an array with all the contents of this SBData represented as double values.''')
+        byte_order = property(GetByteOrder, SetByteOrder, doc='''A read/write property getting and setting the endianness of this SBData (data.byte_order = lldb.eByteOrderLittle).''')
+        size = property(GetByteSize, None, doc='''A read only property that returns the size the same result as GetByteSize().''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBDebugger.i b/src/llvm-project/lldb/bindings/interface/SBDebugger.i
new file mode 100644
index 0000000..f2e23a7
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBDebugger.i
@@ -0,0 +1,535 @@
+//===-- SWIG Interface for SBDebugger ---------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"SBDebugger is the primordial object that creates SBTargets and provides
+access to them.  It also manages the overall debugging experiences.
+
+For example (from example/disasm.py),
+
+import lldb
+import os
+import sys
+
+def disassemble_instructions (insts):
+    for i in insts:
+        print i
+
+...
+
+# Create a new debugger instance
+debugger = lldb.SBDebugger.Create()
+
+# When we step or continue, don't return from the function until the process
+# stops. We do this by setting the async mode to false.
+debugger.SetAsync (False)
+
+# Create a target from a file and arch
+print('Creating a target for \'%s\'' % exe)
+
+target = debugger.CreateTargetWithFileAndArch (exe, lldb.LLDB_ARCH_DEFAULT)
+
+if target:
+    # If the target is valid set a breakpoint at main
+    main_bp = target.BreakpointCreateByName (fname, target.GetExecutable().GetFilename());
+
+    print main_bp
+
+    # Launch the process. Since we specified synchronous mode, we won't return
+    # from this function until we hit the breakpoint at main
+    process = target.LaunchSimple (None, None, os.getcwd())
+
+    # Make sure the launch went ok
+    if process:
+        # Print some simple process info
+        state = process.GetState ()
+        print process
+        if state == lldb.eStateStopped:
+            # Get the first thread
+            thread = process.GetThreadAtIndex (0)
+            if thread:
+                # Print some simple thread info
+                print thread
+                # Get the first frame
+                frame = thread.GetFrameAtIndex (0)
+                if frame:
+                    # Print some simple frame info
+                    print frame
+                    function = frame.GetFunction()
+                    # See if we have debug info (a function)
+                    if function:
+                        # We do have a function, print some info for the function
+                        print function
+                        # Now get all instructions for this function and print them
+                        insts = function.GetInstructions(target)
+                        disassemble_instructions (insts)
+                    else:
+                        # See if we have a symbol in the symbol table for where we stopped
+                        symbol = frame.GetSymbol();
+                        if symbol:
+                            # We do have a symbol, print some info for the symbol
+                            print symbol
+                            # Now get all instructions for this symbol and print them
+                            insts = symbol.GetInstructions(target)
+                            disassemble_instructions (insts)
+
+                    registerList = frame.GetRegisters()
+                    print('Frame registers (size of register set = %d):' % registerList.GetSize())
+                    for value in registerList:
+                        #print value
+                        print('%s (number of children = %d):' % (value.GetName(), value.GetNumChildren()))
+                        for child in value:
+                            print('Name: ', child.GetName(), ' Value: ', child.GetValue())
+
+            print('Hit the breakpoint at main, enter to continue and wait for program to exit or \'Ctrl-D\'/\'quit\' to terminate the program')
+            next = sys.stdin.readline()
+            if not next or next.rstrip('\n') == 'quit':
+                print('Terminating the inferior process...')
+                process.Kill()
+            else:
+                # Now continue to the program exit
+                process.Continue()
+                # When we return from the above function we will hopefully be at the
+                # program exit. Print out some process info
+                print process
+        elif state == lldb.eStateExited:
+            print('Didn\'t hit the breakpoint at main, program has exited...')
+        else:
+            print('Unexpected process state: %s, killing process...' % debugger.StateAsCString (state))
+            process.Kill()
+
+Sometimes you need to create an empty target that will get filled in later.  The most common use for this
+is to attach to a process by name or pid where you don't know the executable up front.  The most convenient way
+to do this is:
+
+target = debugger.CreateTarget('')
+error = lldb.SBError()
+process = target.AttachToProcessWithName(debugger.GetListener(), 'PROCESS_NAME', False, error)
+
+or the equivalent arguments for AttachToProcessWithID.") SBDebugger;
+class SBDebugger
+{
+public:
+
+    static void
+    Initialize();
+
+    static SBError
+    InitializeWithErrorHandling();
+
+    static void
+    Terminate();
+
+    static lldb::SBDebugger
+    Create();
+
+    static lldb::SBDebugger
+    Create(bool source_init_files);
+
+    static lldb::SBDebugger
+    Create(bool source_init_files, lldb::LogOutputCallback log_callback, void *baton);
+
+    static void
+    Destroy (lldb::SBDebugger &debugger);
+
+    static void
+    MemoryPressureDetected();
+
+    SBDebugger();
+
+    SBDebugger(const lldb::SBDebugger &rhs);
+
+    ~SBDebugger();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    void
+    Clear ();
+
+    void
+    SetAsync (bool b);
+
+    bool
+    GetAsync ();
+
+    void
+    SkipLLDBInitFiles (bool b);
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def SetOutputFileHandle(self, file, transfer_ownership):
+            "DEPRECATED, use SetOutputFile"
+            if file is None:
+                import sys
+                file = sys.stdout
+            self.SetOutputFile(SBFile.Create(file, borrow=True))
+
+        def SetInputFileHandle(self, file, transfer_ownership):
+            "DEPRECATED, use SetInputFile"
+            if file is None:
+                import sys
+                file = sys.stdin
+            self.SetInputFile(SBFile.Create(file, borrow=True))
+
+        def SetErrorFileHandle(self, file, transfer_ownership):
+            "DEPRECATED, use SetErrorFile"
+            if file is None:
+                import sys
+                file = sys.stderr
+            self.SetErrorFile(SBFile.Create(file, borrow=True))
+    %}
+#endif
+
+
+    %extend {
+
+        lldb::FileSP GetInputFileHandle() {
+            return self->GetInputFile().GetFile();
+        }
+
+        lldb::FileSP GetOutputFileHandle() {
+            return self->GetOutputFile().GetFile();
+        }
+
+        lldb::FileSP GetErrorFileHandle() {
+            return self->GetErrorFile().GetFile();
+        }
+    }
+
+    SBError
+    SetInputFile (SBFile file);
+
+    SBError
+    SetOutputFile (SBFile file);
+
+    SBError
+    SetErrorFile (SBFile file);
+
+    SBError
+    SetInputFile (FileSP file);
+
+    SBError
+    SetOutputFile (FileSP file);
+
+    SBError
+    SetErrorFile (FileSP file);
+
+    SBFile
+    GetInputFile ();
+
+    SBFile
+    GetOutputFile ();
+
+    SBFile
+    GetErrorFile ();
+
+    lldb::SBCommandInterpreter
+    GetCommandInterpreter ();
+
+    void
+    HandleCommand (const char *command);
+
+    lldb::SBListener
+    GetListener ();
+
+    void
+    HandleProcessEvent (const lldb::SBProcess &process,
+                        const lldb::SBEvent &event,
+                        SBFile out,
+                        SBFile err);
+
+    void
+    HandleProcessEvent (const lldb::SBProcess &process,
+                        const lldb::SBEvent &event,
+                        FileSP BORROWED,
+                        FileSP BORROWED);
+
+    lldb::SBTarget
+    CreateTarget (const char *filename,
+                  const char *target_triple,
+                  const char *platform_name,
+                  bool add_dependent_modules,
+                  lldb::SBError& sb_error);
+
+    lldb::SBTarget
+    CreateTargetWithFileAndTargetTriple (const char *filename,
+                                         const char *target_triple);
+
+    lldb::SBTarget
+    CreateTargetWithFileAndArch (const char *filename,
+                                 const char *archname);
+
+    lldb::SBTarget
+    CreateTarget (const char *filename);
+
+    %feature("docstring",
+    "The dummy target holds breakpoints and breakpoint names that will prime newly created targets."
+    ) GetDummyTarget;
+    lldb::SBTarget GetDummyTarget();
+
+    %feature("docstring",
+    "Return true if target is deleted from the target list of the debugger."
+    ) DeleteTarget;
+    bool
+    DeleteTarget (lldb::SBTarget &target);
+
+    lldb::SBTarget
+    GetTargetAtIndex (uint32_t idx);
+
+    uint32_t
+    GetIndexOfTarget (lldb::SBTarget target);
+
+    lldb::SBTarget
+    FindTargetWithProcessID (pid_t pid);
+
+    lldb::SBTarget
+    FindTargetWithFileAndArch (const char *filename,
+                               const char *arch);
+
+    uint32_t
+    GetNumTargets ();
+
+    lldb::SBTarget
+    GetSelectedTarget ();
+
+    void
+    SetSelectedTarget (lldb::SBTarget &target);
+
+    lldb::SBPlatform
+    GetSelectedPlatform();
+
+    void
+    SetSelectedPlatform(lldb::SBPlatform &platform);
+
+    %feature("docstring",
+    "Get the number of currently active platforms."
+    ) GetNumPlatforms;
+    uint32_t
+    GetNumPlatforms ();
+
+    %feature("docstring",
+    "Get one of the currently active platforms."
+    ) GetPlatformAtIndex;
+    lldb::SBPlatform
+    GetPlatformAtIndex (uint32_t idx);
+
+    %feature("docstring",
+    "Get the number of available platforms."
+    ) GetNumAvailablePlatforms;
+    uint32_t
+    GetNumAvailablePlatforms ();
+
+    %feature("docstring", "
+    Get the name and description of one of the available platforms.
+
+    @param idx Zero-based index of the platform for which info should be
+               retrieved, must be less than the value returned by
+               GetNumAvailablePlatforms().") GetAvailablePlatformInfoAtIndex;
+    lldb::SBStructuredData
+    GetAvailablePlatformInfoAtIndex (uint32_t idx);
+
+    lldb::SBSourceManager
+    GetSourceManager ();
+
+    // REMOVE: just for a quick fix, need to expose platforms through
+    // SBPlatform from this class.
+    lldb::SBError
+    SetCurrentPlatform (const char *platform_name);
+
+    bool
+    SetCurrentPlatformSDKRoot (const char *sysroot);
+
+    // FIXME: Once we get the set show stuff in place, the driver won't need
+    // an interface to the Set/Get UseExternalEditor.
+    bool
+    SetUseExternalEditor (bool input);
+
+    bool
+    GetUseExternalEditor ();
+
+    bool
+    SetUseColor (bool use_color);
+
+    bool
+    GetUseColor () const;
+
+    static bool
+    GetDefaultArchitecture (char *arch_name, size_t arch_name_len);
+
+    static bool
+    SetDefaultArchitecture (const char *arch_name);
+
+    lldb::ScriptLanguage
+    GetScriptingLanguage (const char *script_language_name);
+
+    static const char *
+    GetVersionString ();
+
+    static const char *
+    StateAsCString (lldb::StateType state);
+
+    static SBStructuredData GetBuildConfiguration();
+
+    static bool
+    StateIsRunningState (lldb::StateType state);
+
+    static bool
+    StateIsStoppedState (lldb::StateType state);
+
+    bool
+    EnableLog (const char *channel, const char ** types);
+
+    void
+    SetLoggingCallback (lldb::LogOutputCallback log_callback, void *baton);
+
+    void
+    DispatchInput (const void *data, size_t data_len);
+
+    void
+    DispatchInputInterrupt ();
+
+    void
+    DispatchInputEndOfFile ();
+
+    const char *
+    GetInstanceName  ();
+
+    static SBDebugger
+    FindDebuggerWithID (int id);
+
+    static lldb::SBError
+    SetInternalVariable (const char *var_name, const char *value, const char *debugger_instance_name);
+
+    static lldb::SBStringList
+    GetInternalVariableValue (const char *var_name, const char *debugger_instance_name);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    uint32_t
+    GetTerminalWidth () const;
+
+    void
+    SetTerminalWidth (uint32_t term_width);
+
+    lldb::user_id_t
+    GetID ();
+
+    const char *
+    GetPrompt() const;
+
+    void
+    SetPrompt (const char *prompt);
+
+    const char *
+    GetReproducerPath() const;
+
+    lldb::ScriptLanguage
+    GetScriptLanguage() const;
+
+    void
+    SetScriptLanguage (lldb::ScriptLanguage script_lang);
+
+    bool
+    GetCloseInputOnEOF () const;
+
+    void
+    SetCloseInputOnEOF (bool b);
+
+    lldb::SBTypeCategory
+    GetCategory (const char* category_name);
+
+    SBTypeCategory
+    GetCategory (lldb::LanguageType lang_type);
+
+    lldb::SBTypeCategory
+    CreateCategory (const char* category_name);
+
+    bool
+    DeleteCategory (const char* category_name);
+
+    uint32_t
+    GetNumCategories ();
+
+    lldb::SBTypeCategory
+    GetCategoryAtIndex (uint32_t);
+
+    lldb::SBTypeCategory
+    GetDefaultCategory();
+
+    lldb::SBTypeFormat
+    GetFormatForType (lldb::SBTypeNameSpecifier);
+
+    lldb::SBTypeSummary
+    GetSummaryForType (lldb::SBTypeNameSpecifier);
+
+    lldb::SBTypeFilter
+    GetFilterForType (lldb::SBTypeNameSpecifier);
+
+    lldb::SBTypeSynthetic
+    GetSyntheticForType (lldb::SBTypeNameSpecifier);
+
+    STRING_EXTENSION(SBDebugger)
+
+    %feature("docstring",
+"Launch a command interpreter session. Commands are read from standard input or
+from the input handle specified for the debugger object. Output/errors are
+similarly redirected to standard output/error or the configured handles.
+
+@param[in] auto_handle_events If true, automatically handle resulting events.
+@param[in] spawn_thread If true, start a new thread for IO handling.
+@param[in] options Parameter collection of type SBCommandInterpreterRunOptions.
+@param[in] num_errors Initial error counter.
+@param[in] quit_requested Initial quit request flag.
+@param[in] stopped_for_crash Initial crash flag.
+
+@return
+A tuple with the number of errors encountered by the interpreter, a boolean
+indicating whether quitting the interpreter was requested and another boolean
+set to True in case of a crash.
+
+Example:
+
+# Start an interactive lldb session from a script (with a valid debugger object
+# created beforehand):
+n_errors, quit_requested, has_crashed = debugger.RunCommandInterpreter(True,
+    False, lldb.SBCommandInterpreterRunOptions(), 0, False, False)") RunCommandInterpreter;
+    %apply int& INOUT { int& num_errors };
+    %apply bool& INOUT { bool& quit_requested };
+    %apply bool& INOUT { bool& stopped_for_crash };
+    void
+    RunCommandInterpreter (bool auto_handle_events,
+                           bool spawn_thread,
+                           SBCommandInterpreterRunOptions &options,
+                           int  &num_errors,
+                           bool &quit_requested,
+                           bool &stopped_for_crash);
+
+    lldb::SBError
+    RunREPL (lldb::LanguageType language, const char *repl_options);
+
+#ifdef SWIGPYTHON
+    %pythoncode%{
+    def __iter__(self):
+        '''Iterate over all targets in a lldb.SBDebugger object.'''
+        return lldb_iter(self, 'GetNumTargets', 'GetTargetAtIndex')
+
+    def __len__(self):
+        '''Return the number of targets in a lldb.SBDebugger object.'''
+        return self.GetNumTargets()
+    %}
+#endif
+
+}; // class SBDebugger
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBDeclaration.i b/src/llvm-project/lldb/bindings/interface/SBDeclaration.i
new file mode 100644
index 0000000..621c1a0
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBDeclaration.i
@@ -0,0 +1,67 @@
+//===-- SWIG Interface for SBDeclaration --------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+    %feature("docstring",
+    "Specifies an association with a line and column for a variable."
+    ) SBDeclaration;
+    class SBDeclaration
+    {
+        public:
+
+        SBDeclaration ();
+
+        SBDeclaration (const lldb::SBDeclaration &rhs);
+
+        ~SBDeclaration ();
+
+        bool
+        IsValid () const;
+
+        explicit operator bool() const;
+
+        lldb::SBFileSpec
+        GetFileSpec () const;
+
+        uint32_t
+        GetLine () const;
+
+        uint32_t
+        GetColumn () const;
+
+        bool
+        GetDescription (lldb::SBStream &description);
+
+        void
+        SetFileSpec (lldb::SBFileSpec filespec);
+
+        void
+        SetLine (uint32_t line);
+
+        void
+        SetColumn (uint32_t column);
+
+        bool
+        operator == (const lldb::SBDeclaration &rhs) const;
+
+        bool
+        operator != (const lldb::SBDeclaration &rhs) const;
+
+        STRING_EXTENSION(SBDeclaration)
+
+#ifdef SWIGPYTHON
+        %pythoncode %{
+            file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''')
+            line = property(GetLine, None, doc='''A read only property that returns the 1 based line number for this line entry, a return value of zero indicates that no line information is available.''')
+            column = property(GetColumn, None, doc='''A read only property that returns the 1 based column number for this line entry, a return value of zero indicates that no column information is available.''')
+        %}
+#endif
+    };
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBError.i b/src/llvm-project/lldb/bindings/interface/SBError.i
new file mode 100644
index 0000000..ea48e22
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBError.i
@@ -0,0 +1,122 @@
+//===-- SWIG Interface for SBError ------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a container for holding any error code.
+
+For example (from test/python_api/hello_world/TestHelloWorld.py),
+
+    def hello_world_attach_with_id_api(self):
+        '''Create target, spawn a process, and attach to it by id.'''
+
+        target = self.dbg.CreateTarget(self.exe)
+
+        # Spawn a new process and don't display the stdout if not in TraceOn() mode.
+        import subprocess
+        popen = subprocess.Popen([self.exe, 'abc', 'xyz'],
+                                 stdout = open(os.devnull, 'w') if not self.TraceOn() else None)
+
+        listener = lldb.SBListener('my.attach.listener')
+        error = lldb.SBError()
+        process = target.AttachToProcessWithID(listener, popen.pid, error)
+
+        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
+
+        # Let's check the stack traces of the attached process.
+        import lldbutil
+        stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
+        self.expect(stacktraces, exe=False,
+            substrs = ['main.c:%d' % self.line2,
+                       '(int)argc=3'])
+
+        listener = lldb.SBListener('my.attach.listener')
+        error = lldb.SBError()
+        process = target.AttachToProcessWithID(listener, popen.pid, error)
+
+        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
+
+checks that after the attach, there is no error condition by asserting
+that error.Success() is True and we get back a valid process object.
+
+And (from test/python_api/event/TestEvent.py),
+
+        # Now launch the process, and do not stop at entry point.
+        error = lldb.SBError()
+        process = target.Launch(listener, None, None, None, None, None, None, 0, False, error)
+        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
+
+checks that after calling the target.Launch() method there's no error
+condition and we get back a void process object.") SBError;
+
+class SBError {
+public:
+    SBError ();
+
+    SBError (const lldb::SBError &rhs);
+
+    ~SBError();
+
+    const char *
+    GetCString () const;
+
+    void
+    Clear ();
+
+    bool
+    Fail () const;
+
+    bool
+    Success () const;
+
+    uint32_t
+    GetError () const;
+
+    lldb::ErrorType
+    GetType () const;
+
+    void
+    SetError (uint32_t err, lldb::ErrorType type);
+
+    void
+    SetErrorToErrno ();
+
+    void
+    SetErrorToGenericError ();
+
+    void
+    SetErrorString (const char *err_str);
+
+    %varargs(3, char *str = NULL) SetErrorStringWithFormat;
+    int
+    SetErrorStringWithFormat (const char *format, ...);
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    STRING_EXTENSION(SBError)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        value = property(GetError, None, doc='''A read only property that returns the same result as GetError().''')
+        fail = property(Fail, None, doc='''A read only property that returns the same result as Fail().''')
+        success = property(Success, None, doc='''A read only property that returns the same result as Success().''')
+        description = property(GetCString, None, doc='''A read only property that returns the same result as GetCString().''')
+        type = property(GetType, None, doc='''A read only property that returns the same result as GetType().''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBEvent.i b/src/llvm-project/lldb/bindings/interface/SBEvent.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBEvent.i
rename to src/llvm-project/lldb/bindings/interface/SBEvent.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBExecutionContext.i b/src/llvm-project/lldb/bindings/interface/SBExecutionContext.i
new file mode 100644
index 0000000..46968d0
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBExecutionContext.i
@@ -0,0 +1,51 @@
+//===-- SWIG Interface for SBExecutionContext ---------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBExecutionContext
+{
+public:
+    SBExecutionContext();
+
+    SBExecutionContext (const lldb::SBExecutionContext &rhs);
+
+    SBExecutionContext (const lldb::SBTarget &target);
+
+    SBExecutionContext (const lldb::SBProcess &process);
+
+    SBExecutionContext (lldb::SBThread thread); // can't be a const& because SBThread::get() isn't itself a const function
+
+    SBExecutionContext (const lldb::SBFrame &frame);
+
+    ~SBExecutionContext();
+
+    SBTarget
+    GetTarget () const;
+
+    SBProcess
+    GetProcess () const;
+
+    SBThread
+    GetThread () const;
+
+    SBFrame
+    GetFrame () const;
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        target = property(GetTarget, None, doc='''A read only property that returns the same result as GetTarget().''')
+        process = property(GetProcess, None, doc='''A read only property that returns the same result as GetProcess().''')
+        thread = property(GetThread, None, doc='''A read only property that returns the same result as GetThread().''')
+        frame = property(GetFrame, None, doc='''A read only property that returns the same result as GetFrame().''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBExpressionOptions.i b/src/llvm-project/lldb/bindings/interface/SBExpressionOptions.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBExpressionOptions.i
rename to src/llvm-project/lldb/bindings/interface/SBExpressionOptions.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBFile.i b/src/llvm-project/lldb/bindings/interface/SBFile.i
new file mode 100644
index 0000000..a196669
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBFile.i
@@ -0,0 +1,101 @@
+//===-- SWIG Interface for SBFile -----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a file."
+) SBFile;
+
+class SBFile
+{
+public:
+
+    SBFile();
+
+    %feature("docstring", "
+    Initialize a SBFile from a file descriptor.  mode is
+    'r', 'r+', or 'w', like fdopen.");
+    SBFile(int fd, const char *mode, bool transfer_ownership);
+
+    %feature("docstring", "initialize a SBFile from a python file object");
+    SBFile(FileSP file);
+
+    %extend {
+        static lldb::SBFile MakeBorrowed(lldb::FileSP BORROWED) {
+            return lldb::SBFile(BORROWED);
+        }
+        static lldb::SBFile MakeForcingIOMethods(lldb::FileSP FORCE_IO_METHODS) {
+            return lldb::SBFile(FORCE_IO_METHODS);
+        }
+        static lldb::SBFile MakeBorrowedForcingIOMethods(lldb::FileSP BORROWED_FORCE_IO_METHODS) {
+            return lldb::SBFile(BORROWED_FORCE_IO_METHODS);
+        }
+    }
+
+#ifdef SWIGPYTHON
+    %pythoncode {
+        @classmethod
+        def Create(cls, file, borrow=False, force_io_methods=False):
+            """
+            Create a SBFile from a python file object, with options.
+
+            If borrow is set then the underlying file will
+            not be closed when the SBFile is closed or destroyed.
+
+            If force_scripting_io is set then the python read/write
+            methods will be called even if a file descriptor is available.
+            """
+            if borrow:
+                if force_io_methods:
+                    return cls.MakeBorrowedForcingIOMethods(file)
+                else:
+                    return cls.MakeBorrowed(file)
+            else:
+                if force_io_methods:
+                    return cls.MakeForcingIOMethods(file)
+                else:
+                    return cls(file)
+    }
+#endif
+
+    ~SBFile ();
+
+    %feature("autodoc", "Read(buffer) -> SBError, bytes_read") Read;
+    SBError Read(uint8_t *buf, size_t num_bytes, size_t *OUTPUT);
+
+    %feature("autodoc", "Write(buffer) -> SBError, written_read") Write;
+    SBError Write(const uint8_t *buf, size_t num_bytes, size_t *OUTPUT);
+
+    void Flush();
+
+    bool IsValid() const;
+
+    operator bool() const;
+
+    SBError Close();
+
+    %feature("docstring", "
+    Convert this SBFile into a python io.IOBase file object.
+
+    If the SBFile is itself a wrapper around a python file object,
+    this will return that original object.
+
+    The file returned from here should be considered borrowed,
+    in the sense that you may read and write to it, and flush it,
+    etc, but you should not close it.   If you want to close the
+    SBFile, call SBFile.Close().
+
+    If there is no underlying python file to unwrap, GetFile will
+    use the file descriptor, if availble to create a new python
+    file object using `open(fd, mode=..., closefd=False)`
+    ");
+    FileSP GetFile();
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBFileSpec.i b/src/llvm-project/lldb/bindings/interface/SBFileSpec.i
new file mode 100644
index 0000000..d287a94
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBFileSpec.i
@@ -0,0 +1,107 @@
+//===-- SWIG Interface for SBFileSpec ---------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a file specification that divides the path into a directory and
+basename.  The string values of the paths are put into uniqued string pools
+for fast comparisons and efficient memory usage.
+
+For example, the following code
+
+        lineEntry = context.GetLineEntry()
+        self.expect(lineEntry.GetFileSpec().GetDirectory(), 'The line entry should have the correct directory',
+                    exe=False,
+            substrs = [self.mydir])
+        self.expect(lineEntry.GetFileSpec().GetFilename(), 'The line entry should have the correct filename',
+                    exe=False,
+            substrs = ['main.c'])
+        self.assertTrue(lineEntry.GetLine() == self.line,
+                        'The line entry's line number should match ')
+
+gets the line entry from the symbol context when a thread is stopped.
+It gets the file spec corresponding to the line entry and checks that
+the filename and the directory matches what we expect.") SBFileSpec;
+class SBFileSpec
+{
+public:
+    SBFileSpec ();
+
+    SBFileSpec (const lldb::SBFileSpec &rhs);
+
+    SBFileSpec (const char *path);// Deprecated, use SBFileSpec (const char *path, bool resolve)
+
+    SBFileSpec (const char *path, bool resolve);
+
+    ~SBFileSpec ();
+
+    bool operator==(const SBFileSpec &rhs) const;
+
+    bool operator!=(const SBFileSpec &rhs) const;
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    bool
+    Exists () const;
+
+    bool
+    ResolveExecutableLocation ();
+
+    const char *
+    GetFilename() const;
+
+    const char *
+    GetDirectory() const;
+
+    void
+    SetFilename(const char *filename);
+
+    void
+    SetDirectory(const char *directory);
+
+    uint32_t
+    GetPath (char *dst_path, size_t dst_len) const;
+
+    static int
+    ResolvePath (const char *src_path, char *dst_path, size_t dst_len);
+
+    bool
+    GetDescription (lldb::SBStream &description) const;
+
+    void
+    AppendPathComponent (const char *file_or_directory);
+
+    STRING_EXTENSION(SBFileSpec)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __get_fullpath__(self):
+            spec_dir = self.GetDirectory()
+            spec_file = self.GetFilename()
+            if spec_dir and spec_file:
+                return '%s/%s' % (spec_dir, spec_file)
+            elif spec_dir:
+                return spec_dir
+            elif spec_file:
+                return spec_file
+            return None
+
+        fullpath = property(__get_fullpath__, None, doc='''A read only property that returns the fullpath as a python string.''')
+        basename = property(GetFilename, None, doc='''A read only property that returns the path basename as a python string.''')
+        dirname = property(GetDirectory, None, doc='''A read only property that returns the path directory name as a python string.''')
+        exists = property(Exists, None, doc='''A read only property that returns a boolean value that indicates if the file exists.''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBFileSpecList.i b/src/llvm-project/lldb/bindings/interface/SBFileSpecList.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBFileSpecList.i
rename to src/llvm-project/lldb/bindings/interface/SBFileSpecList.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBFrame.i b/src/llvm-project/lldb/bindings/interface/SBFrame.i
new file mode 100644
index 0000000..c65b88f
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBFrame.i
@@ -0,0 +1,364 @@
+//===-- SWIG Interface for SBFrame ------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents one of the stack frames associated with a thread.
+SBThread contains SBFrame(s). For example (from test/lldbutil.py),
+
+def print_stacktrace(thread, string_buffer = False):
+    '''Prints a simple stack trace of this thread.'''
+
+    ...
+
+    for i in range(depth):
+        frame = thread.GetFrameAtIndex(i)
+        function = frame.GetFunction()
+
+        load_addr = addrs[i].GetLoadAddress(target)
+        if not function:
+            file_addr = addrs[i].GetFileAddress()
+            start_addr = frame.GetSymbol().GetStartAddress().GetFileAddress()
+            symbol_offset = file_addr - start_addr
+            print >> output, '  frame #{num}: {addr:#016x} {mod}`{symbol} + {offset}'.format(
+                num=i, addr=load_addr, mod=mods[i], symbol=symbols[i], offset=symbol_offset)
+        else:
+            print >> output, '  frame #{num}: {addr:#016x} {mod}`{func} at {file}:{line} {args}'.format(
+                num=i, addr=load_addr, mod=mods[i],
+                func='%s [inlined]' % funcs[i] if frame.IsInlined() else funcs[i],
+                file=files[i], line=lines[i],
+                args=get_args_as_string(frame, showFuncName=False) if not frame.IsInlined() else '()')
+
+    ...
+
+And,
+
+    for frame in thread:
+        print frame
+
+See also SBThread."
+) SBFrame;
+class SBFrame
+{
+public:
+    SBFrame ();
+
+    SBFrame (const lldb::SBFrame &rhs);
+
+   ~SBFrame();
+
+    bool
+    IsEqual (const lldb::SBFrame &rhs) const;
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    uint32_t
+    GetFrameID () const;
+
+    %feature("docstring", "
+    Get the Canonical Frame Address for this stack frame.
+    This is the DWARF standard's definition of a CFA, a stack address
+    that remains constant throughout the lifetime of the function.
+    Returns an lldb::addr_t stack address, or LLDB_INVALID_ADDRESS if
+    the CFA cannot be determined.") GetCFA;
+    lldb::addr_t
+    GetCFA () const;
+
+    lldb::addr_t
+    GetPC () const;
+
+    bool
+    SetPC (lldb::addr_t new_pc);
+
+    lldb::addr_t
+    GetSP () const;
+
+    lldb::addr_t
+    GetFP () const;
+
+    lldb::SBAddress
+    GetPCAddress () const;
+
+    lldb::SBSymbolContext
+    GetSymbolContext (uint32_t resolve_scope) const;
+
+    lldb::SBModule
+    GetModule () const;
+
+    lldb::SBCompileUnit
+    GetCompileUnit () const;
+
+    lldb::SBFunction
+    GetFunction () const;
+
+    lldb::SBSymbol
+    GetSymbol () const;
+
+    %feature("docstring", "
+    Gets the deepest block that contains the frame PC.
+
+    See also GetFrameBlock().") GetBlock;
+    lldb::SBBlock
+    GetBlock () const;
+
+    %feature("docstring", "
+    Get the appropriate function name for this frame. Inlined functions in
+    LLDB are represented by Blocks that have inlined function information, so
+    just looking at the SBFunction or SBSymbol for a frame isn't enough.
+    This function will return the appropriate function, symbol or inlined
+    function name for the frame.
+
+    This function returns:
+    - the name of the inlined function (if there is one)
+    - the name of the concrete function (if there is one)
+    - the name of the symbol (if there is one)
+    - NULL
+
+    See also IsInlined().") GetFunctionName;
+    const char *
+    GetFunctionName();
+
+     const char *
+     GetDisplayFunctionName ();
+
+    const char *
+    GetFunctionName() const;
+
+    %feature("docstring", "
+    Returns the language of the frame's SBFunction, or if there.
+    is no SBFunction, guess the language from the mangled name.
+    .") GuessLanguage;
+    lldb::LanguageType
+    GuessLanguage() const;
+
+    %feature("docstring", "
+    Return true if this frame represents an inlined function.
+
+    See also GetFunctionName().") IsInlined;
+    bool
+    IsInlined();
+
+    bool
+    IsInlined() const;
+
+    %feature("docstring", "
+    Return true if this frame is artificial (e.g a frame synthesized to
+    capture a tail call). Local variables may not be available in an artificial
+    frame.") IsArtificial;
+    bool
+    IsArtificial();
+
+    bool
+    IsArtificial() const;
+
+    %feature("docstring", "
+    The version that doesn't supply a 'use_dynamic' value will use the
+    target's default.") EvaluateExpression;
+    lldb::SBValue
+    EvaluateExpression (const char *expr);
+
+    lldb::SBValue
+    EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic);
+
+    lldb::SBValue
+    EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic, bool unwind_on_error);
+
+    lldb::SBValue
+    EvaluateExpression (const char *expr, SBExpressionOptions &options);
+
+    %feature("docstring", "
+    Gets the lexical block that defines the stack frame. Another way to think
+    of this is it will return the block that contains all of the variables
+    for a stack frame. Inlined functions are represented as SBBlock objects
+    that have inlined function information: the name of the inlined function,
+    where it was called from. The block that is returned will be the first
+    block at or above the block for the PC (SBFrame::GetBlock()) that defines
+    the scope of the frame. When a function contains no inlined functions,
+    this will be the top most lexical block that defines the function.
+    When a function has inlined functions and the PC is currently
+    in one of those inlined functions, this method will return the inlined
+    block that defines this frame. If the PC isn't currently in an inlined
+    function, the lexical block that defines the function is returned.") GetFrameBlock;
+    lldb::SBBlock
+    GetFrameBlock () const;
+
+    lldb::SBLineEntry
+    GetLineEntry () const;
+
+    lldb::SBThread
+    GetThread () const;
+
+    const char *
+    Disassemble () const;
+
+    void
+    Clear();
+
+    bool
+    operator == (const lldb::SBFrame &rhs) const;
+
+    bool
+    operator != (const lldb::SBFrame &rhs) const;
+
+    %feature("docstring", "
+    The version that doesn't supply a 'use_dynamic' value will use the
+    target's default.") GetVariables;
+    lldb::SBValueList
+    GetVariables (bool arguments,
+                  bool locals,
+                  bool statics,
+                  bool in_scope_only);
+
+    lldb::SBValueList
+    GetVariables (bool arguments,
+                  bool locals,
+                  bool statics,
+                  bool in_scope_only,
+                  lldb::DynamicValueType  use_dynamic);
+
+    lldb::SBValueList
+    GetVariables (const lldb::SBVariablesOptions& options);
+
+    lldb::SBValueList
+    GetRegisters ();
+
+    %feature("docstring", "
+    The version that doesn't supply a 'use_dynamic' value will use the
+    target's default.") FindVariable;
+    lldb::SBValue
+    FindVariable (const char *var_name);
+
+    lldb::SBValue
+    FindVariable (const char *var_name, lldb::DynamicValueType use_dynamic);
+
+    lldb::SBValue
+    FindRegister (const char *name);
+
+    %feature("docstring", "
+    Get a lldb.SBValue for a variable path.
+
+    Variable paths can include access to pointer or instance members:
+        rect_ptr->origin.y
+        pt.x
+    Pointer dereferences:
+        *this->foo_ptr
+        **argv
+    Address of:
+        &pt
+        &my_array[3].x
+    Array accesses and treating pointers as arrays:
+        int_array[1]
+        pt_ptr[22].x
+
+    Unlike EvaluateExpression() which returns lldb.SBValue objects
+    with constant copies of the values at the time of evaluation,
+    the result of this function is a value that will continue to
+    track the current value of the value as execution progresses
+    in the current frame.") GetValueForVariablePath;
+    lldb::SBValue
+    GetValueForVariablePath (const char *var_path);
+
+    lldb::SBValue
+    GetValueForVariablePath (const char *var_path, lldb::DynamicValueType use_dynamic);
+
+    %feature("docstring", "
+    Find variables, register sets, registers, or persistent variables using
+    the frame as the scope.
+
+    The version that doesn't supply a 'use_dynamic' value will use the
+    target's default.") FindValue;
+    lldb::SBValue
+    FindValue (const char *name, ValueType value_type);
+
+    lldb::SBValue
+    FindValue (const char *name, ValueType value_type, lldb::DynamicValueType use_dynamic);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    STRING_EXTENSION(SBFrame)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def get_all_variables(self):
+            return self.GetVariables(True,True,True,True)
+
+        def get_parent_frame(self):
+            parent_idx = self.idx + 1
+            if parent_idx >= 0 and parent_idx < len(self.thread.frame):
+                return self.thread.frame[parent_idx]
+            else:
+                return SBFrame()
+
+        def get_arguments(self):
+            return self.GetVariables(True,False,False,False)
+
+        def get_locals(self):
+            return self.GetVariables(False,True,False,False)
+
+        def get_statics(self):
+            return self.GetVariables(False,False,True,False)
+
+        def var(self, var_expr_path):
+            '''Calls through to lldb.SBFrame.GetValueForVariablePath() and returns
+            a value that represents the variable expression path'''
+            return self.GetValueForVariablePath(var_expr_path)
+
+        def get_registers_access(self):
+            class registers_access(object):
+                '''A helper object that exposes a flattened view of registers, masking away the notion of register sets for easy scripting.'''
+                def __init__(self, regs):
+                    self.regs = regs
+
+                def __getitem__(self, key):
+                    if type(key) is str:
+                        for i in range(0,len(self.regs)):
+                            rs = self.regs[i]
+                            for j in range (0,rs.num_children):
+                                reg = rs.GetChildAtIndex(j)
+                                if reg.name == key: return reg
+                    else:
+                        return lldb.SBValue()
+
+            return registers_access(self.registers)
+
+        pc = property(GetPC, SetPC)
+        addr = property(GetPCAddress, None, doc='''A read only property that returns the program counter (PC) as a section offset address (lldb.SBAddress).''')
+        fp = property(GetFP, None, doc='''A read only property that returns the frame pointer (FP) as an unsigned integer.''')
+        sp = property(GetSP, None, doc='''A read only property that returns the stack pointer (SP) as an unsigned integer.''')
+        module = property(GetModule, None, doc='''A read only property that returns an lldb object that represents the module (lldb.SBModule) for this stack frame.''')
+        compile_unit = property(GetCompileUnit, None, doc='''A read only property that returns an lldb object that represents the compile unit (lldb.SBCompileUnit) for this stack frame.''')
+        function = property(GetFunction, None, doc='''A read only property that returns an lldb object that represents the function (lldb.SBFunction) for this stack frame.''')
+        symbol = property(GetSymbol, None, doc='''A read only property that returns an lldb object that represents the symbol (lldb.SBSymbol) for this stack frame.''')
+        block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the block (lldb.SBBlock) for this stack frame.''')
+        is_inlined = property(IsInlined, None, doc='''A read only property that returns an boolean that indicates if the block frame is an inlined function.''')
+        name = property(GetFunctionName, None, doc='''A read only property that retuns the name for the function that this frame represents. Inlined stack frame might have a concrete function that differs from the name of the inlined function (a named lldb.SBBlock).''')
+        line_entry = property(GetLineEntry, None, doc='''A read only property that returns an lldb object that represents the line table entry (lldb.SBLineEntry) for this stack frame.''')
+        thread = property(GetThread, None, doc='''A read only property that returns an lldb object that represents the thread (lldb.SBThread) for this stack frame.''')
+        disassembly = property(Disassemble, None, doc='''A read only property that returns the disassembly for this stack frame as a python string.''')
+        idx = property(GetFrameID, None, doc='''A read only property that returns the zero based stack frame index.''')
+        variables = property(get_all_variables, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the variables in this stack frame.''')
+        vars = property(get_all_variables, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the variables in this stack frame.''')
+        locals = property(get_locals, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the local variables in this stack frame.''')
+        args = property(get_arguments, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the argument variables in this stack frame.''')
+        arguments = property(get_arguments, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the argument variables in this stack frame.''')
+        statics = property(get_statics, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the static variables in this stack frame.''')
+        registers = property(GetRegisters, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the CPU registers for this stack frame.''')
+        regs = property(GetRegisters, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the CPU registers for this stack frame.''')
+        register = property(get_registers_access, None, doc='''A read only property that returns an helper object providing a flattened indexable view of the CPU registers for this stack frame.''')
+        reg = property(get_registers_access, None, doc='''A read only property that returns an helper object providing a flattened indexable view of the CPU registers for this stack frame''')
+        parent = property(get_parent_frame, None, doc='''A read only property that returns the parent (caller) frame of the current frame.''')
+    %}
+#endif
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBFunction.i b/src/llvm-project/lldb/bindings/interface/SBFunction.i
new file mode 100644
index 0000000..630c4db
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBFunction.i
@@ -0,0 +1,134 @@
+//===-- SWIG Interface for SBFunction ---------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a generic function, which can be inlined or not.
+
+For example (from test/lldbutil.py, but slightly modified for doc purpose),
+
+        ...
+
+        frame = thread.GetFrameAtIndex(i)
+        addr = frame.GetPCAddress()
+        load_addr = addr.GetLoadAddress(target)
+        function = frame.GetFunction()
+        mod_name = frame.GetModule().GetFileSpec().GetFilename()
+
+        if not function:
+            # No debug info for 'function'.
+            symbol = frame.GetSymbol()
+            file_addr = addr.GetFileAddress()
+            start_addr = symbol.GetStartAddress().GetFileAddress()
+            symbol_name = symbol.GetName()
+            symbol_offset = file_addr - start_addr
+            print >> output, '  frame #{num}: {addr:#016x} {mod}`{symbol} + {offset}'.format(
+                num=i, addr=load_addr, mod=mod_name, symbol=symbol_name, offset=symbol_offset)
+        else:
+            # Debug info is available for 'function'.
+            func_name = frame.GetFunctionName()
+            file_name = frame.GetLineEntry().GetFileSpec().GetFilename()
+            line_num = frame.GetLineEntry().GetLine()
+            print >> output, '  frame #{num}: {addr:#016x} {mod}`{func} at {file}:{line} {args}'.format(
+                num=i, addr=load_addr, mod=mod_name,
+                func='%s [inlined]' % func_name] if frame.IsInlined() else func_name,
+                file=file_name, line=line_num, args=get_args_as_string(frame, showFuncName=False))
+
+        ...") SBFunction;
+class SBFunction
+{
+public:
+
+    SBFunction ();
+
+    SBFunction (const lldb::SBFunction &rhs);
+
+    ~SBFunction ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    const char *
+    GetName() const;
+
+    const char *
+    GetDisplayName() const;
+
+    const char *
+    GetMangledName () const;
+
+    lldb::SBInstructionList
+    GetInstructions (lldb::SBTarget target);
+
+    lldb::SBInstructionList
+    GetInstructions (lldb::SBTarget target, const char *flavor);
+
+    lldb::SBAddress
+    GetStartAddress ();
+
+    lldb::SBAddress
+    GetEndAddress ();
+
+    const char *
+    GetArgumentName (uint32_t arg_idx);
+
+    uint32_t
+    GetPrologueByteSize ();
+
+    lldb::SBType
+    GetType ();
+
+    lldb::SBBlock
+    GetBlock ();
+
+    lldb::LanguageType
+    GetLanguage ();
+
+    %feature("docstring", "
+    Returns true if the function was compiled with optimization.
+    Optimization, in this case, is meant to indicate that the debugger
+    experience may be confusing for the user -- variables optimized away,
+    stepping jumping between source lines -- and the driver may want to
+    provide some guidance to the user about this.
+    Returns false if unoptimized, or unknown.") GetIsOptimized;
+    bool
+    GetIsOptimized();
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    bool
+    operator == (const lldb::SBFunction &rhs) const;
+
+    bool
+    operator != (const lldb::SBFunction &rhs) const;
+
+    STRING_EXTENSION(SBFunction)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def get_instructions_from_current_target (self):
+            return self.GetInstructions (target)
+
+        addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this function.''')
+        end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this function.''')
+        block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the top level lexical block (lldb.SBBlock) for this function.''')
+        instructions = property(get_instructions_from_current_target, None, doc='''A read only property that returns an lldb object that represents the instructions (lldb.SBInstructionList) for this function.''')
+        mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this function as a string.''')
+        name = property(GetName, None, doc='''A read only property that returns the name for this function as a string.''')
+        prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''')
+        type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the return type (lldb.SBType) for this function.''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBHostOS.i b/src/llvm-project/lldb/bindings/interface/SBHostOS.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBHostOS.i
rename to src/llvm-project/lldb/bindings/interface/SBHostOS.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBInstruction.i b/src/llvm-project/lldb/bindings/interface/SBInstruction.i
new file mode 100644
index 0000000..d50a080
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBInstruction.i
@@ -0,0 +1,104 @@
+//===-- SWIG Interface for SBInstruction ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+
+// There's a lot to be fixed here, but need to wait for underlying insn implementation
+// to be revised & settle down first.
+
+namespace lldb {
+
+class SBInstruction
+{
+public:
+
+    SBInstruction ();
+
+    SBInstruction (const SBInstruction &rhs);
+
+    ~SBInstruction ();
+
+    bool
+    IsValid();
+
+    explicit operator bool() const;
+
+    lldb::SBAddress
+    GetAddress();
+
+
+    const char *
+    GetMnemonic (lldb::SBTarget target);
+
+    const char *
+    GetOperands (lldb::SBTarget target);
+
+    const char *
+    GetComment (lldb::SBTarget target);
+
+    lldb::SBData
+    GetData (lldb::SBTarget target);
+
+    size_t
+    GetByteSize ();
+
+    bool
+    DoesBranch ();
+
+    bool
+    HasDelaySlot ();
+
+    bool
+    CanSetBreakpoint ();
+
+    void
+    Print (lldb::SBFile out);
+
+    void
+    Print (lldb::FileSP BORROWED);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    bool
+    EmulateWithFrame (lldb::SBFrame &frame, uint32_t evaluate_options);
+
+    bool
+    DumpEmulation (const char * triple); // triple is to specify the architecture, e.g. 'armv6' or 'armv7-apple-ios'
+
+    bool
+    TestEmulation (lldb::SBStream &output_stream, const char *test_file);
+
+    STRING_EXTENSION(SBInstruction)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __mnemonic_property__ (self):
+            return self.GetMnemonic (target)
+        def __operands_property__ (self):
+            return self.GetOperands (target)
+        def __comment_property__ (self):
+            return self.GetComment (target)
+        def __file_addr_property__ (self):
+            return self.GetAddress ().GetFileAddress()
+        def __load_adrr_property__ (self):
+            return self.GetComment (target)
+
+        mnemonic = property(__mnemonic_property__, None, doc='''A read only property that returns the mnemonic for this instruction as a string.''')
+        operands = property(__operands_property__, None, doc='''A read only property that returns the operands for this instruction as a string.''')
+        comment = property(__comment_property__, None, doc='''A read only property that returns the comment for this instruction as a string.''')
+        addr = property(GetAddress, None, doc='''A read only property that returns an lldb object that represents the address (lldb.SBAddress) for this instruction.''')
+        size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes for this instruction as an integer.''')
+        is_branch = property(DoesBranch, None, doc='''A read only property that returns a boolean value that indicates if this instruction is a branch instruction.''')
+    %}
+#endif
+
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBInstructionList.i b/src/llvm-project/lldb/bindings/interface/SBInstructionList.i
new file mode 100644
index 0000000..1357323
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBInstructionList.i
@@ -0,0 +1,107 @@
+//===-- SWIG Interface for SBInstructionList --------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a list of machine instructions.  SBFunction and SBSymbol have
+GetInstructions() methods which return SBInstructionList instances.
+
+SBInstructionList supports instruction (SBInstruction instance) iteration.
+For example (see also SBDebugger for a more complete example),
+
+def disassemble_instructions (insts):
+    for i in insts:
+        print i
+
+defines a function which takes an SBInstructionList instance and prints out
+the machine instructions in assembly format."
+) SBInstructionList;
+class SBInstructionList
+{
+public:
+
+    SBInstructionList ();
+
+    SBInstructionList (const SBInstructionList &rhs);
+
+    ~SBInstructionList ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    size_t
+    GetSize ();
+
+    lldb::SBInstruction
+    GetInstructionAtIndex (uint32_t idx);
+
+    size_t GetInstructionsCount(const SBAddress &start, const SBAddress &end,
+                                bool canSetBreakpoint);
+
+    void
+    Clear ();
+
+    void
+    AppendInstruction (lldb::SBInstruction inst);
+
+    void
+    Print (lldb::SBFile out);
+
+    void
+    Print (lldb::FileSP BORROWED);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    bool
+    DumpEmulationForAllInstructions (const char *triple);
+
+    STRING_EXTENSION(SBInstructionList)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __iter__(self):
+            '''Iterate over all instructions in a lldb.SBInstructionList
+            object.'''
+            return lldb_iter(self, 'GetSize', 'GetInstructionAtIndex')
+
+        def __len__(self):
+            '''Access len of the instruction list.'''
+            return int(self.GetSize())
+
+        def __getitem__(self, key):
+            '''Access instructions by integer index for array access or by lldb.SBAddress to find an instruction that matches a section offset address object.'''
+            if type(key) is int:
+                # Find an instruction by index
+                if key < len(self):
+                    return self.GetInstructionAtIndex(key)
+            elif type(key) is SBAddress:
+                # Find an instruction using a lldb.SBAddress object
+                lookup_file_addr = key.file_addr
+                closest_inst = None
+                for idx in range(self.GetSize()):
+                    inst = self.GetInstructionAtIndex(idx)
+                    inst_file_addr = inst.addr.file_addr
+                    if inst_file_addr == lookup_file_addr:
+                        return inst
+                    elif inst_file_addr > lookup_file_addr:
+                        return closest_inst
+                    else:
+                        closest_inst = inst
+            return None
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBLanguageRuntime.i b/src/llvm-project/lldb/bindings/interface/SBLanguageRuntime.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBLanguageRuntime.i
rename to src/llvm-project/lldb/bindings/interface/SBLanguageRuntime.i
diff --git a/src/llvm-project/lldb/scripts/interface/SBLaunchInfo.i b/src/llvm-project/lldb/bindings/interface/SBLaunchInfo.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBLaunchInfo.i
rename to src/llvm-project/lldb/bindings/interface/SBLaunchInfo.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBLineEntry.i b/src/llvm-project/lldb/bindings/interface/SBLineEntry.i
new file mode 100644
index 0000000..be36537
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBLineEntry.i
@@ -0,0 +1,100 @@
+//===-- SWIG Interface for SBLineEntry --------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Specifies an association with a contiguous range of instructions and
+a source file location. SBCompileUnit contains SBLineEntry(s). For example,
+
+    for lineEntry in compileUnit:
+        print('line entry: %s:%d' % (str(lineEntry.GetFileSpec()),
+                                    lineEntry.GetLine()))
+        print('start addr: %s' % str(lineEntry.GetStartAddress()))
+        print('end   addr: %s' % str(lineEntry.GetEndAddress()))
+
+produces:
+
+line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
+start addr: a.out[0x100000d98]
+end   addr: a.out[0x100000da3]
+line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
+start addr: a.out[0x100000da3]
+end   addr: a.out[0x100000da9]
+line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
+start addr: a.out[0x100000da9]
+end   addr: a.out[0x100000db6]
+line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
+start addr: a.out[0x100000db6]
+end   addr: a.out[0x100000dbc]
+...
+
+See also SBCompileUnit."
+) SBLineEntry;
+class SBLineEntry
+{
+public:
+
+    SBLineEntry ();
+
+    SBLineEntry (const lldb::SBLineEntry &rhs);
+
+    ~SBLineEntry ();
+
+    lldb::SBAddress
+    GetStartAddress () const;
+
+    lldb::SBAddress
+    GetEndAddress () const;
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    lldb::SBFileSpec
+    GetFileSpec () const;
+
+    uint32_t
+    GetLine () const;
+
+    uint32_t
+    GetColumn () const;
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    void
+    SetFileSpec (lldb::SBFileSpec filespec);
+
+    void
+    SetLine (uint32_t line);
+
+    void
+    SetColumn (uint32_t column);
+
+    bool
+    operator == (const lldb::SBLineEntry &rhs) const;
+
+    bool
+    operator != (const lldb::SBLineEntry &rhs) const;
+
+    STRING_EXTENSION(SBLineEntry)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''')
+        line = property(GetLine, None, doc='''A read only property that returns the 1 based line number for this line entry, a return value of zero indicates that no line information is available.''')
+        column = property(GetColumn, None, doc='''A read only property that returns the 1 based column number for this line entry, a return value of zero indicates that no column information is available.''')
+        addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this line entry.''')
+        end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this line entry.''')
+    %}
+#endif
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBListener.i b/src/llvm-project/lldb/bindings/interface/SBListener.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBListener.i
rename to src/llvm-project/lldb/bindings/interface/SBListener.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBMemoryRegionInfo.i b/src/llvm-project/lldb/bindings/interface/SBMemoryRegionInfo.i
new file mode 100644
index 0000000..6a2ad6a
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBMemoryRegionInfo.i
@@ -0,0 +1,61 @@
+//===-- SWIG Interface for SBMemoryRegionInfo -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"API clients can get information about memory regions in processes."
+) SBMemoryRegionInfo;
+
+class SBMemoryRegionInfo
+{
+public:
+
+    SBMemoryRegionInfo ();
+
+    SBMemoryRegionInfo (const lldb::SBMemoryRegionInfo &rhs);
+
+    ~SBMemoryRegionInfo ();
+
+    void
+    Clear();
+
+    lldb::addr_t
+    GetRegionBase ();
+
+    lldb::addr_t
+    GetRegionEnd ();
+
+    bool
+    IsReadable ();
+
+    bool
+    IsWritable ();
+
+    bool
+    IsExecutable ();
+
+    bool
+    IsMapped ();
+
+    const char *
+    GetName ();
+
+    bool
+    operator == (const lldb::SBMemoryRegionInfo &rhs) const;
+
+    bool
+    operator != (const lldb::SBMemoryRegionInfo &rhs) const;
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    STRING_EXTENSION(SBMemoryRegionInfo)
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBMemoryRegionInfoList.i b/src/llvm-project/lldb/bindings/interface/SBMemoryRegionInfoList.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBMemoryRegionInfoList.i
rename to src/llvm-project/lldb/bindings/interface/SBMemoryRegionInfoList.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBModule.i b/src/llvm-project/lldb/bindings/interface/SBModule.i
new file mode 100644
index 0000000..a9d9480
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBModule.i
@@ -0,0 +1,554 @@
+//===-- SWIG Interface for SBModule -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+#ifdef SWIGPYTHON
+%pythoncode%{
+# ==================================
+# Helper function for SBModule class
+# ==================================
+def in_range(symbol, section):
+    """Test whether a symbol is within the range of a section."""
+    symSA = symbol.GetStartAddress().GetFileAddress()
+    symEA = symbol.GetEndAddress().GetFileAddress()
+    secSA = section.GetFileAddress()
+    secEA = secSA + section.GetByteSize()
+
+    if symEA != LLDB_INVALID_ADDRESS:
+        if secSA <= symSA and symEA <= secEA:
+            return True
+        else:
+            return False
+    else:
+        if secSA <= symSA and symSA < secEA:
+            return True
+        else:
+            return False
+%}
+#endif
+
+%feature("docstring",
+"Represents an executable image and its associated object and symbol files.
+
+The module is designed to be able to select a single slice of an
+executable image as it would appear on disk and during program
+execution.
+
+You can retrieve SBModule from SBSymbolContext, which in turn is available
+from SBFrame.
+
+SBModule supports symbol iteration, for example,
+
+    for symbol in module:
+        name = symbol.GetName()
+        saddr = symbol.GetStartAddress()
+        eaddr = symbol.GetEndAddress()
+
+and rich comparison methods which allow the API program to use,
+
+    if thisModule == thatModule:
+        print('This module is the same as that module')
+
+to test module equality.  A module also contains object file sections, namely
+SBSection.  SBModule supports section iteration through section_iter(), for
+example,
+
+    print('Number of sections: %d' % module.GetNumSections())
+    for sec in module.section_iter():
+        print(sec)
+
+And to iterate the symbols within a SBSection, use symbol_in_section_iter(),
+
+    # Iterates the text section and prints each symbols within each sub-section.
+    for subsec in text_sec:
+        print(INDENT + repr(subsec))
+        for sym in exe_module.symbol_in_section_iter(subsec):
+            print(INDENT2 + repr(sym))
+            print(INDENT2 + 'symbol type: %s' % symbol_type_to_str(sym.GetType()))
+
+produces this following output:
+
+    [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
+        id = {0x00000004}, name = 'mask_access(MaskAction, unsigned int)', range = [0x00000001000017c0-0x0000000100001870)
+        symbol type: code
+        id = {0x00000008}, name = 'thread_func(void*)', range = [0x0000000100001870-0x00000001000019b0)
+        symbol type: code
+        id = {0x0000000c}, name = 'main', range = [0x00000001000019b0-0x0000000100001d5c)
+        symbol type: code
+        id = {0x00000023}, name = 'start', address = 0x0000000100001780
+        symbol type: code
+    [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
+        id = {0x00000024}, name = '__stack_chk_fail', range = [0x0000000100001d5c-0x0000000100001d62)
+        symbol type: trampoline
+        id = {0x00000028}, name = 'exit', range = [0x0000000100001d62-0x0000000100001d68)
+        symbol type: trampoline
+        id = {0x00000029}, name = 'fflush', range = [0x0000000100001d68-0x0000000100001d6e)
+        symbol type: trampoline
+        id = {0x0000002a}, name = 'fgets', range = [0x0000000100001d6e-0x0000000100001d74)
+        symbol type: trampoline
+        id = {0x0000002b}, name = 'printf', range = [0x0000000100001d74-0x0000000100001d7a)
+        symbol type: trampoline
+        id = {0x0000002c}, name = 'pthread_create', range = [0x0000000100001d7a-0x0000000100001d80)
+        symbol type: trampoline
+        id = {0x0000002d}, name = 'pthread_join', range = [0x0000000100001d80-0x0000000100001d86)
+        symbol type: trampoline
+        id = {0x0000002e}, name = 'pthread_mutex_lock', range = [0x0000000100001d86-0x0000000100001d8c)
+        symbol type: trampoline
+        id = {0x0000002f}, name = 'pthread_mutex_unlock', range = [0x0000000100001d8c-0x0000000100001d92)
+        symbol type: trampoline
+        id = {0x00000030}, name = 'rand', range = [0x0000000100001d92-0x0000000100001d98)
+        symbol type: trampoline
+        id = {0x00000031}, name = 'strtoul', range = [0x0000000100001d98-0x0000000100001d9e)
+        symbol type: trampoline
+        id = {0x00000032}, name = 'usleep', range = [0x0000000100001d9e-0x0000000100001da4)
+        symbol type: trampoline
+    [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
+    [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
+    [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
+    [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame
+"
+) SBModule;
+class SBModule
+{
+public:
+
+    SBModule ();
+
+    SBModule (const lldb::SBModule &rhs);
+
+    SBModule (const lldb::SBModuleSpec &module_spec);
+
+    SBModule (lldb::SBProcess &process,
+              lldb::addr_t header_addr);
+
+    ~SBModule ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    void
+    Clear();
+
+    %feature("docstring", "
+    Get const accessor for the module file specification.
+
+    This function returns the file for the module on the host system
+    that is running LLDB. This can differ from the path on the
+    platform since we might be doing remote debugging.
+
+    @return
+        A const reference to the file specification object.") GetFileSpec;
+    lldb::SBFileSpec
+    GetFileSpec () const;
+
+    %feature("docstring", "
+    Get accessor for the module platform file specification.
+
+    Platform file refers to the path of the module as it is known on
+    the remote system on which it is being debugged. For local
+    debugging this is always the same as Module::GetFileSpec(). But
+    remote debugging might mention a file '/usr/lib/liba.dylib'
+    which might be locally downloaded and cached. In this case the
+    platform file could be something like:
+    '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib'
+    The file could also be cached in a local developer kit directory.
+
+    @return
+        A const reference to the file specification object.") GetPlatformFileSpec;
+    lldb::SBFileSpec
+    GetPlatformFileSpec () const;
+
+    bool
+    SetPlatformFileSpec (const lldb::SBFileSpec &platform_file);
+
+    lldb::SBFileSpec
+    GetRemoteInstallFileSpec ();
+
+    bool
+    SetRemoteInstallFileSpec (lldb::SBFileSpec &file);
+
+    %feature("docstring", "Returns the UUID of the module as a Python string."
+    ) GetUUIDString;
+    const char *
+    GetUUIDString () const;
+
+    bool operator==(const lldb::SBModule &rhs) const;
+
+    bool operator!=(const lldb::SBModule &rhs) const;
+
+    lldb::SBSection
+    FindSection (const char *sect_name);
+
+    lldb::SBAddress
+    ResolveFileAddress (lldb::addr_t vm_addr);
+
+    lldb::SBSymbolContext
+    ResolveSymbolContextForAddress (const lldb::SBAddress& addr,
+                                    uint32_t resolve_scope);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    uint32_t
+    GetNumCompileUnits();
+
+    lldb::SBCompileUnit
+    GetCompileUnitAtIndex (uint32_t);
+
+    %feature("docstring", "
+    Find compile units related to *this module and passed source
+    file.
+
+    @param[in] sb_file_spec
+        A lldb::SBFileSpec object that contains source file
+        specification.
+
+    @return
+        A lldb::SBSymbolContextList that gets filled in with all of
+        the symbol contexts for all the matches.") FindCompileUnits;
+    lldb::SBSymbolContextList
+    FindCompileUnits (const lldb::SBFileSpec &sb_file_spec);
+
+    size_t
+    GetNumSymbols ();
+
+    lldb::SBSymbol
+    GetSymbolAtIndex (size_t idx);
+
+    lldb::SBSymbol
+    FindSymbol (const char *name,
+                lldb::SymbolType type = eSymbolTypeAny);
+
+    lldb::SBSymbolContextList
+    FindSymbols (const char *name,
+                 lldb::SymbolType type = eSymbolTypeAny);
+
+
+    size_t
+    GetNumSections ();
+
+    lldb::SBSection
+    GetSectionAtIndex (size_t idx);
+
+
+    %feature("docstring", "
+    Find functions by name.
+
+    @param[in] name
+        The name of the function we are looking for.
+
+    @param[in] name_type_mask
+        A logical OR of one or more FunctionNameType enum bits that
+        indicate what kind of names should be used when doing the
+        lookup. Bits include fully qualified names, base names,
+        C++ methods, or ObjC selectors.
+        See FunctionNameType for more details.
+
+    @return
+        A symbol context list that gets filled in with all of the
+        matches.") FindFunctions;
+    lldb::SBSymbolContextList
+    FindFunctions (const char *name,
+                   uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
+
+    lldb::SBType
+    FindFirstType (const char* name);
+
+    lldb::SBTypeList
+    FindTypes (const char* type);
+
+    lldb::SBType
+    GetTypeByID (lldb::user_id_t uid);
+
+    lldb::SBType
+    GetBasicType(lldb::BasicType type);
+
+    %feature("docstring", "
+    Get all types matching type_mask from debug info in this
+    module.
+
+    @param[in] type_mask
+        A bitfield that consists of one or more bits logically OR'ed
+        together from the lldb::TypeClass enumeration. This allows
+        you to request only structure types, or only class, struct
+        and union types. Passing in lldb::eTypeClassAny will return
+        all types found in the debug information for this module.
+
+    @return
+        A list of types in this module that match type_mask") GetTypes;
+    lldb::SBTypeList
+    GetTypes (uint32_t type_mask = lldb::eTypeClassAny);
+
+    %feature("docstring", "
+    Find global and static variables by name.
+
+    @param[in] target
+        A valid SBTarget instance representing the debuggee.
+
+    @param[in] name
+        The name of the global or static variable we are looking
+        for.
+
+    @param[in] max_matches
+        Allow the number of matches to be limited to max_matches.
+
+    @return
+        A list of matched variables in an SBValueList.") FindGlobalVariables;
+    lldb::SBValueList
+    FindGlobalVariables (lldb::SBTarget &target,
+                         const char *name,
+                         uint32_t max_matches);
+
+    %feature("docstring", "
+    Find the first global (or static) variable by name.
+
+    @param[in] target
+        A valid SBTarget instance representing the debuggee.
+
+    @param[in] name
+        The name of the global or static variable we are looking
+        for.
+
+    @return
+        An SBValue that gets filled in with the found variable (if any).") FindFirstGlobalVariable;
+    lldb::SBValue
+    FindFirstGlobalVariable (lldb::SBTarget &target, const char *name);
+
+    lldb::ByteOrder
+    GetByteOrder ();
+
+    uint32_t
+    GetAddressByteSize();
+
+    const char *
+    GetTriple ();
+
+    uint32_t
+    GetVersion (uint32_t *versions,
+                uint32_t num_versions);
+
+    lldb::SBFileSpec
+    GetSymbolFileSpec() const;
+
+    lldb::SBAddress
+    GetObjectFileHeaderAddress() const;
+
+    lldb::SBAddress
+    GetObjectFileEntryPointAddress() const;
+
+    STRING_EXTENSION(SBModule)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __len__(self):
+            '''Return the number of symbols in a lldb.SBModule object.'''
+            return self.GetNumSymbols()
+
+        def __iter__(self):
+            '''Iterate over all symbols in a lldb.SBModule object.'''
+            return lldb_iter(self, 'GetNumSymbols', 'GetSymbolAtIndex')
+
+        def section_iter(self):
+            '''Iterate over all sections in a lldb.SBModule object.'''
+            return lldb_iter(self, 'GetNumSections', 'GetSectionAtIndex')
+
+        def compile_unit_iter(self):
+            '''Iterate over all compile units in a lldb.SBModule object.'''
+            return lldb_iter(self, 'GetNumCompileUnits', 'GetCompileUnitAtIndex')
+
+        def symbol_in_section_iter(self, section):
+            '''Given a module and its contained section, returns an iterator on the
+            symbols within the section.'''
+            for sym in self:
+                if in_range(sym, section):
+                    yield sym
+
+        class symbols_access(object):
+            re_compile_type = type(re.compile('.'))
+            '''A helper object that will lazily hand out lldb.SBSymbol objects for a module when supplied an index, name, or regular expression.'''
+            def __init__(self, sbmodule):
+                self.sbmodule = sbmodule
+
+            def __len__(self):
+                if self.sbmodule:
+                    return int(self.sbmodule.GetNumSymbols())
+                return 0
+
+            def __getitem__(self, key):
+                count = len(self)
+                if type(key) is int:
+                    if key < count:
+                        return self.sbmodule.GetSymbolAtIndex(key)
+                elif type(key) is str:
+                    matches = []
+                    sc_list = self.sbmodule.FindSymbols(key)
+                    for sc in sc_list:
+                        symbol = sc.symbol
+                        if symbol:
+                            matches.append(symbol)
+                    return matches
+                elif isinstance(key, self.re_compile_type):
+                    matches = []
+                    for idx in range(count):
+                        symbol = self.sbmodule.GetSymbolAtIndex(idx)
+                        added = False
+                        name = symbol.name
+                        if name:
+                            re_match = key.search(name)
+                            if re_match:
+                                matches.append(symbol)
+                                added = True
+                        if not added:
+                            mangled = symbol.mangled
+                            if mangled:
+                                re_match = key.search(mangled)
+                                if re_match:
+                                    matches.append(symbol)
+                    return matches
+                else:
+                    print("error: unsupported item type: %s" % type(key))
+                return None
+
+        def get_symbols_access_object(self):
+            '''An accessor function that returns a symbols_access() object which allows lazy symbol access from a lldb.SBModule object.'''
+            return self.symbols_access (self)
+
+        def get_compile_units_access_object (self):
+            '''An accessor function that returns a compile_units_access() object which allows lazy compile unit access from a lldb.SBModule object.'''
+            return self.compile_units_access (self)
+
+        def get_symbols_array(self):
+            '''An accessor function that returns a list() that contains all symbols in a lldb.SBModule object.'''
+            symbols = []
+            for idx in range(self.num_symbols):
+                symbols.append(self.GetSymbolAtIndex(idx))
+            return symbols
+
+        class sections_access(object):
+            re_compile_type = type(re.compile('.'))
+            '''A helper object that will lazily hand out lldb.SBSection objects for a module when supplied an index, name, or regular expression.'''
+            def __init__(self, sbmodule):
+                self.sbmodule = sbmodule
+
+            def __len__(self):
+                if self.sbmodule:
+                    return int(self.sbmodule.GetNumSections())
+                return 0
+
+            def __getitem__(self, key):
+                count = len(self)
+                if type(key) is int:
+                    if key < count:
+                        return self.sbmodule.GetSectionAtIndex(key)
+                elif type(key) is str:
+                    for idx in range(count):
+                        section = self.sbmodule.GetSectionAtIndex(idx)
+                        if section.name == key:
+                            return section
+                elif isinstance(key, self.re_compile_type):
+                    matches = []
+                    for idx in range(count):
+                        section = self.sbmodule.GetSectionAtIndex(idx)
+                        name = section.name
+                        if name:
+                            re_match = key.search(name)
+                            if re_match:
+                                matches.append(section)
+                    return matches
+                else:
+                    print("error: unsupported item type: %s" % type(key))
+                return None
+
+        class compile_units_access(object):
+            re_compile_type = type(re.compile('.'))
+            '''A helper object that will lazily hand out lldb.SBCompileUnit objects for a module when supplied an index, full or partial path, or regular expression.'''
+            def __init__(self, sbmodule):
+                self.sbmodule = sbmodule
+
+            def __len__(self):
+                if self.sbmodule:
+                    return int(self.sbmodule.GetNumCompileUnits())
+                return 0
+
+            def __getitem__(self, key):
+                count = len(self)
+                if type(key) is int:
+                    if key < count:
+                        return self.sbmodule.GetCompileUnitAtIndex(key)
+                elif type(key) is str:
+                    is_full_path = key[0] == '/'
+                    for idx in range(count):
+                        comp_unit = self.sbmodule.GetCompileUnitAtIndex(idx)
+                        if is_full_path:
+                            if comp_unit.file.fullpath == key:
+                                return comp_unit
+                        else:
+                            if comp_unit.file.basename == key:
+                                return comp_unit
+                elif isinstance(key, self.re_compile_type):
+                    matches = []
+                    for idx in range(count):
+                        comp_unit = self.sbmodule.GetCompileUnitAtIndex(idx)
+                        fullpath = comp_unit.file.fullpath
+                        if fullpath:
+                            re_match = key.search(fullpath)
+                            if re_match:
+                                matches.append(comp_unit)
+                    return matches
+                else:
+                    print("error: unsupported item type: %s" % type(key))
+                return None
+
+        def get_sections_access_object(self):
+            '''An accessor function that returns a sections_access() object which allows lazy section array access.'''
+            return self.sections_access (self)
+
+        def get_sections_array(self):
+            '''An accessor function that returns an array object that contains all sections in this module object.'''
+            if not hasattr(self, 'sections_array'):
+                self.sections_array = []
+                for idx in range(self.num_sections):
+                    self.sections_array.append(self.GetSectionAtIndex(idx))
+            return self.sections_array
+
+        def get_compile_units_array(self):
+            '''An accessor function that returns an array object that contains all compile_units in this module object.'''
+            if not hasattr(self, 'compile_units_array'):
+                self.compile_units_array = []
+                for idx in range(self.GetNumCompileUnits()):
+                    self.compile_units_array.append(self.GetCompileUnitAtIndex(idx))
+            return self.compile_units_array
+
+        symbols = property(get_symbols_array, None, doc='''A read only property that returns a list() of lldb.SBSymbol objects contained in this module.''')
+        symbol = property(get_symbols_access_object, None, doc='''A read only property that can be used to access symbols by index ("symbol = module.symbol[0]"), name ("symbols = module.symbol['main']"), or using a regular expression ("symbols = module.symbol[re.compile(...)]"). The return value is a single lldb.SBSymbol object for array access, and a list() of lldb.SBSymbol objects for name and regular expression access''')
+        sections = property(get_sections_array, None, doc='''A read only property that returns a list() of lldb.SBSection objects contained in this module.''')
+        compile_units = property(get_compile_units_array, None, doc='''A read only property that returns a list() of lldb.SBCompileUnit objects contained in this module.''')
+        section = property(get_sections_access_object, None, doc='''A read only property that can be used to access symbols by index ("section = module.section[0]"), name ("sections = module.section[\'main\']"), or using a regular expression ("sections = module.section[re.compile(...)]"). The return value is a single lldb.SBSection object for array access, and a list() of lldb.SBSection objects for name and regular expression access''')
+        section = property(get_sections_access_object, None, doc='''A read only property that can be used to access compile units by index ("compile_unit = module.compile_unit[0]"), name ("compile_unit = module.compile_unit[\'main.cpp\']"), or using a regular expression ("compile_unit = module.compile_unit[re.compile(...)]"). The return value is a single lldb.SBCompileUnit object for array access or by full or partial path, and a list() of lldb.SBCompileUnit objects regular expressions.''')
+
+        def get_uuid(self):
+            return uuid.UUID (self.GetUUIDString())
+
+        uuid = property(get_uuid, None, doc='''A read only property that returns a standard python uuid.UUID object that represents the UUID of this module.''')
+        file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this object file for this module as it is represented where it is being debugged.''')
+        platform_file = property(GetPlatformFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this object file for this module as it is represented on the current host system.''')
+        byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this module.''')
+        addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this module.''')
+        triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this module.''')
+        num_symbols = property(GetNumSymbols, None, doc='''A read only property that returns number of symbols in the module symbol table as an integer.''')
+        num_sections = property(GetNumSections, None, doc='''A read only property that returns number of sections in the module as an integer.''')
+
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBModuleSpec.i b/src/llvm-project/lldb/bindings/interface/SBModuleSpec.i
new file mode 100644
index 0000000..64d0aa6
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBModuleSpec.i
@@ -0,0 +1,134 @@
+//===-- SWIG Interface for SBModule -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBModuleSpec
+{
+public:
+
+    SBModuleSpec ();
+
+    SBModuleSpec (const lldb::SBModuleSpec &rhs);
+
+    ~SBModuleSpec ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    void
+    Clear();
+
+    %feature("docstring", "
+    Get const accessor for the module file.
+
+    This function returns the file for the module on the host system
+    that is running LLDB. This can differ from the path on the
+    platform since we might be doing remote debugging.
+
+    @return
+        A const reference to the file specification object.") GetFileSpec;
+    lldb::SBFileSpec
+    GetFileSpec ();
+
+    void
+    SetFileSpec (const lldb::SBFileSpec &fspec);
+
+    %feature("docstring", "
+    Get accessor for the module platform file.
+
+    Platform file refers to the path of the module as it is known on
+    the remote system on which it is being debugged. For local
+    debugging this is always the same as Module::GetFileSpec(). But
+    remote debugging might mention a file '/usr/lib/liba.dylib'
+    which might be locally downloaded and cached. In this case the
+    platform file could be something like:
+    '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib'
+    The file could also be cached in a local developer kit directory.
+
+    @return
+        A const reference to the file specification object.") GetPlatformFileSpec;
+    lldb::SBFileSpec
+    GetPlatformFileSpec ();
+
+    void
+    SetPlatformFileSpec (const lldb::SBFileSpec &fspec);
+
+    lldb::SBFileSpec
+    GetSymbolFileSpec ();
+
+    void
+    SetSymbolFileSpec (const lldb::SBFileSpec &fspec);
+
+    const char *
+    GetObjectName ();
+
+    void
+    SetObjectName (const char *name);
+
+    const char *
+    GetTriple ();
+
+    void
+    SetTriple (const char *triple);
+
+    const uint8_t *
+    GetUUIDBytes ();
+
+    size_t
+    GetUUIDLength ();
+
+    bool
+    SetUUIDBytes (const uint8_t *uuid, size_t uuid_len);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    STRING_EXTENSION(SBModuleSpec)
+};
+
+
+class SBModuleSpecList
+{
+public:
+    SBModuleSpecList();
+
+    SBModuleSpecList (const SBModuleSpecList &rhs);
+
+    ~SBModuleSpecList();
+
+    static SBModuleSpecList
+    GetModuleSpecifications (const char *path);
+
+    void
+    Append (const lldb::SBModuleSpec &spec);
+
+    void
+    Append (const lldb::SBModuleSpecList &spec_list);
+
+    lldb::SBModuleSpec
+    FindFirstMatchingSpec (const lldb::SBModuleSpec &match_spec);
+
+    lldb::SBModuleSpecList
+    FindMatchingSpecs (const lldb::SBModuleSpec &match_spec);
+
+    size_t
+    GetSize();
+
+    lldb::SBModuleSpec
+    GetSpecAtIndex (size_t i);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    STRING_EXTENSION(SBModuleSpecList)
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBPlatform.i b/src/llvm-project/lldb/bindings/interface/SBPlatform.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBPlatform.i
rename to src/llvm-project/lldb/bindings/interface/SBPlatform.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBProcess.i b/src/llvm-project/lldb/bindings/interface/SBProcess.i
new file mode 100644
index 0000000..ac6a265
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBProcess.i
@@ -0,0 +1,505 @@
+//===-- SWIG Interface for SBProcess ----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents the process associated with the target program.
+
+SBProcess supports thread iteration. For example (from test/lldbutil.py),
+
+# ==================================================
+# Utility functions related to Threads and Processes
+# ==================================================
+
+def get_stopped_threads(process, reason):
+    '''Returns the thread(s) with the specified stop reason in a list.
+
+    The list can be empty if no such thread exists.
+    '''
+    threads = []
+    for t in process:
+        if t.GetStopReason() == reason:
+            threads.append(t)
+    return threads
+
+...
+"
+) SBProcess;
+class SBProcess
+{
+public:
+    enum
+    {
+        eBroadcastBitStateChanged   = (1 << 0),
+        eBroadcastBitInterrupt      = (1 << 1),
+        eBroadcastBitSTDOUT         = (1 << 2),
+        eBroadcastBitSTDERR         = (1 << 3),
+        eBroadcastBitProfileData    = (1 << 4),
+        eBroadcastBitStructuredData = (1 << 5)
+    };
+
+    SBProcess ();
+
+    SBProcess (const lldb::SBProcess& rhs);
+
+    ~SBProcess();
+
+    static const char *
+    GetBroadcasterClassName ();
+
+    const char *
+    GetPluginName ();
+
+    const char *
+    GetShortPluginName ();
+
+    void
+    Clear ();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    lldb::SBTarget
+    GetTarget() const;
+
+    lldb::ByteOrder
+    GetByteOrder() const;
+
+    %feature("autodoc", "
+    Writes data into the current process's stdin. API client specifies a Python
+    string as the only argument.") PutSTDIN;
+    size_t
+    PutSTDIN (const char *src, size_t src_len);
+
+    %feature("autodoc", "
+    Reads data from the current process's stdout stream. API client specifies
+    the size of the buffer to read data into. It returns the byte buffer in a
+    Python string.") GetSTDOUT;
+    size_t
+    GetSTDOUT (char *dst, size_t dst_len) const;
+
+    %feature("autodoc", "
+    Reads data from the current process's stderr stream. API client specifies
+    the size of the buffer to read data into. It returns the byte buffer in a
+    Python string.") GetSTDERR;
+    size_t
+    GetSTDERR (char *dst, size_t dst_len) const;
+
+    size_t
+    GetAsyncProfileData(char *dst, size_t dst_len) const;
+
+    void
+    ReportEventState (const lldb::SBEvent &event, SBFile out) const;
+
+    void
+    ReportEventState (const lldb::SBEvent &event, FileSP BORROWED) const;
+
+    void
+    AppendEventStateReport (const lldb::SBEvent &event, lldb::SBCommandReturnObject &result);
+
+    %feature("docstring", "
+    Remote connection related functions. These will fail if the
+    process is not in eStateConnected. They are intended for use
+    when connecting to an externally managed debugserver instance.") RemoteAttachToProcessWithID;
+    bool
+    RemoteAttachToProcessWithID (lldb::pid_t pid,
+                                 lldb::SBError& error);
+
+    %feature("docstring",
+    "See SBTarget.Launch for argument description and usage."
+    ) RemoteLaunch;
+    bool
+    RemoteLaunch (char const **argv,
+                  char const **envp,
+                  const char *stdin_path,
+                  const char *stdout_path,
+                  const char *stderr_path,
+                  const char *working_directory,
+                  uint32_t launch_flags,
+                  bool stop_at_entry,
+                  lldb::SBError& error);
+
+    //------------------------------------------------------------------
+    // Thread related functions
+    //------------------------------------------------------------------
+    uint32_t
+    GetNumThreads ();
+
+    %feature("autodoc", "
+    Returns the INDEX'th thread from the list of current threads.  The index
+    of a thread is only valid for the current stop.  For a persistent thread
+    identifier use either the thread ID or the IndexID.  See help on SBThread
+    for more details.") GetThreadAtIndex;
+    lldb::SBThread
+    GetThreadAtIndex (size_t index);
+
+    %feature("autodoc", "
+    Returns the thread with the given thread ID.") GetThreadByID;
+    lldb::SBThread
+    GetThreadByID (lldb::tid_t sb_thread_id);
+
+    %feature("autodoc", "
+    Returns the thread with the given thread IndexID.") GetThreadByIndexID;
+    lldb::SBThread
+    GetThreadByIndexID (uint32_t index_id);
+
+    %feature("autodoc", "
+    Returns the currently selected thread.") GetSelectedThread;
+    lldb::SBThread
+    GetSelectedThread () const;
+
+    %feature("autodoc", "
+    Lazily create a thread on demand through the current OperatingSystem plug-in, if the current OperatingSystem plug-in supports it.") CreateOSPluginThread;
+    lldb::SBThread
+    CreateOSPluginThread (lldb::tid_t tid, lldb::addr_t context);
+
+    bool
+    SetSelectedThread (const lldb::SBThread &thread);
+
+    bool
+    SetSelectedThreadByID (lldb::tid_t tid);
+
+    bool
+    SetSelectedThreadByIndexID (uint32_t index_id);
+
+    //------------------------------------------------------------------
+    // Queue related functions
+    //------------------------------------------------------------------
+    uint32_t
+    GetNumQueues ();
+
+    lldb::SBQueue
+    GetQueueAtIndex (uint32_t index);
+
+    //------------------------------------------------------------------
+    // Stepping related functions
+    //------------------------------------------------------------------
+
+    lldb::StateType
+    GetState ();
+
+    int
+    GetExitStatus ();
+
+    const char *
+    GetExitDescription ();
+
+    %feature("autodoc", "
+    Returns the process ID of the process.") GetProcessID;
+    lldb::pid_t
+    GetProcessID ();
+
+    %feature("autodoc", "
+    Returns an integer ID that is guaranteed to be unique across all process instances. This is not the process ID, just a unique integer for comparison and caching purposes.") GetUniqueID;
+    uint32_t
+    GetUniqueID();
+
+    uint32_t
+    GetAddressByteSize() const;
+
+    %feature("docstring", "
+    Kills the process and shuts down all threads that were spawned to
+    track and monitor process.") Destroy;
+    lldb::SBError
+    Destroy ();
+
+    lldb::SBError
+    Continue ();
+
+    lldb::SBError
+    Stop ();
+
+    %feature("docstring", "Same as Destroy(self).") Destroy;
+    lldb::SBError
+    Kill ();
+
+    lldb::SBError
+    Detach ();
+
+    %feature("docstring", "Sends the process a unix signal.") Signal;
+    lldb::SBError
+    Signal (int signal);
+
+    lldb::SBUnixSignals
+    GetUnixSignals();
+
+    %feature("docstring", "
+    Returns a stop id that will increase every time the process executes.  If
+    include_expression_stops is true, then stops caused by expression evaluation
+    will cause the returned value to increase, otherwise the counter returned will
+    only increase when execution is continued explicitly by the user.  Note, the value
+    will always increase, but may increase by more than one per stop.") GetStopID;
+    uint32_t
+    GetStopID(bool include_expression_stops = false);
+
+    void
+    SendAsyncInterrupt();
+
+    %feature("autodoc", "
+    Reads memory from the current process's address space and removes any
+    traps that may have been inserted into the memory. It returns the byte
+    buffer in a Python string. Example:
+
+    # Read 4 bytes from address 'addr' and assume error.Success() is True.
+    content = process.ReadMemory(addr, 4, error)
+    new_bytes = bytearray(content)") ReadMemory;
+    size_t
+    ReadMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error);
+
+    %feature("autodoc", "
+    Writes memory to the current process's address space and maintains any
+    traps that might be present due to software breakpoints. Example:
+
+    # Create a Python string from the byte array.
+    new_value = str(bytes)
+    result = process.WriteMemory(addr, new_value, error)
+    if not error.Success() or result != len(bytes):
+        print('SBProcess.WriteMemory() failed!')") WriteMemory;
+    size_t
+    WriteMemory (addr_t addr, const void *buf, size_t size, lldb::SBError &error);
+
+    %feature("autodoc", "
+    Reads a NULL terminated C string from the current process's address space.
+    It returns a python string of the exact length, or truncates the string if
+    the maximum character limit is reached. Example:
+
+    # Read a C string of at most 256 bytes from address '0x1000'
+    error = lldb.SBError()
+    cstring = process.ReadCStringFromMemory(0x1000, 256, error)
+    if error.Success():
+        print('cstring: ', cstring)
+    else
+        print('error: ', error)") ReadCStringFromMemory;
+
+    size_t
+    ReadCStringFromMemory (addr_t addr, void *char_buf, size_t size, lldb::SBError &error);
+
+    %feature("autodoc", "
+    Reads an unsigned integer from memory given a byte size and an address.
+    Returns the unsigned integer that was read. Example:
+
+    # Read a 4 byte unsigned integer from address 0x1000
+    error = lldb.SBError()
+    uint = ReadUnsignedFromMemory(0x1000, 4, error)
+    if error.Success():
+        print('integer: %u' % uint)
+    else
+        print('error: ', error)") ReadUnsignedFromMemory;
+
+    uint64_t
+    ReadUnsignedFromMemory (addr_t addr, uint32_t byte_size, lldb::SBError &error);
+
+    %feature("autodoc", "
+    Reads a pointer from memory from an address and returns the value. Example:
+
+    # Read a pointer from address 0x1000
+    error = lldb.SBError()
+    ptr = ReadPointerFromMemory(0x1000, error)
+    if error.Success():
+        print('pointer: 0x%x' % ptr)
+    else
+        print('error: ', error)") ReadPointerFromMemory;
+
+    lldb::addr_t
+    ReadPointerFromMemory (addr_t addr, lldb::SBError &error);
+
+
+    // Events
+    static lldb::StateType
+    GetStateFromEvent (const lldb::SBEvent &event);
+
+    static bool
+    GetRestartedFromEvent (const lldb::SBEvent &event);
+
+    static size_t
+    GetNumRestartedReasonsFromEvent (const lldb::SBEvent &event);
+
+    static const char *
+    GetRestartedReasonAtIndexFromEvent (const lldb::SBEvent &event, size_t idx);
+
+    static lldb::SBProcess
+    GetProcessFromEvent (const lldb::SBEvent &event);
+
+    static bool
+    GetInterruptedFromEvent (const lldb::SBEvent &event);
+
+    static lldb::SBStructuredData
+    GetStructuredDataFromEvent (const lldb::SBEvent &event);
+
+    static bool
+    EventIsProcessEvent (const lldb::SBEvent &event);
+
+    static bool
+    EventIsStructuredDataEvent (const lldb::SBEvent &event);
+
+    lldb::SBBroadcaster
+    GetBroadcaster () const;
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    uint32_t
+    GetNumSupportedHardwareWatchpoints (lldb::SBError &error) const;
+
+    uint32_t
+    LoadImage (lldb::SBFileSpec &image_spec, lldb::SBError &error);
+
+    %feature("autodoc", "
+    Load the library whose filename is given by image_spec looking in all the
+    paths supplied in the paths argument.  If successful, return a token that
+    can be passed to UnloadImage and fill loaded_path with the path that was
+    successfully loaded.  On failure, return
+    lldb.LLDB_INVALID_IMAGE_TOKEN.") LoadImageUsingPaths;
+    uint32_t
+    LoadImageUsingPaths(const lldb::SBFileSpec &image_spec,
+                        SBStringList &paths,
+                        lldb::SBFileSpec &loaded_path,
+                        SBError &error);
+
+    lldb::SBError
+    UnloadImage (uint32_t image_token);
+
+    lldb::SBError
+    SendEventData (const char *event_data);
+
+    %feature("autodoc", "
+    Return the number of different thread-origin extended backtraces
+    this process can support as a uint32_t.
+    When the process is stopped and you have an SBThread, lldb may be
+    able to show a backtrace of when that thread was originally created,
+    or the work item was enqueued to it (in the case of a libdispatch
+    queue).") GetNumExtendedBacktraceTypes;
+
+    uint32_t
+    GetNumExtendedBacktraceTypes ();
+
+    %feature("autodoc", "
+    Takes an index argument, returns the name of one of the thread-origin
+    extended backtrace methods as a str.") GetExtendedBacktraceTypeAtIndex;
+
+    const char *
+    GetExtendedBacktraceTypeAtIndex (uint32_t idx);
+
+    lldb::SBThreadCollection
+    GetHistoryThreads (addr_t addr);
+
+    bool
+    IsInstrumentationRuntimePresent(lldb::InstrumentationRuntimeType type);
+
+    lldb::SBError
+    SaveCore(const char *file_name);
+
+    lldb::SBTrace
+    StartTrace(SBTraceOptions &options, lldb::SBError &error);
+
+    lldb::SBError
+    GetMemoryRegionInfo(lldb::addr_t load_addr, lldb::SBMemoryRegionInfo &region_info);
+
+    lldb::SBMemoryRegionInfoList
+    GetMemoryRegions();
+
+    %feature("autodoc", "
+    Get information about the process.
+    Valid process info will only be returned when the process is alive,
+    use IsValid() to check if the info returned is valid.
+
+    process_info = process.GetProcessInfo()
+    if process_info.IsValid():
+        process_info.GetProcessID()") GetProcessInfo;
+    lldb::SBProcessInfo
+    GetProcessInfo();
+
+    STRING_EXTENSION(SBProcess)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __get_is_alive__(self):
+            '''Returns "True" if the process is currently alive, "False" otherwise'''
+            s = self.GetState()
+            if (s == eStateAttaching or
+                s == eStateLaunching or
+                s == eStateStopped or
+                s == eStateRunning or
+                s == eStateStepping or
+                s == eStateCrashed or
+                s == eStateSuspended):
+                return True
+            return False
+
+        def __get_is_running__(self):
+            '''Returns "True" if the process is currently running, "False" otherwise'''
+            state = self.GetState()
+            if state == eStateRunning or state == eStateStepping:
+                return True
+            return False
+
+        def __get_is_stopped__(self):
+            '''Returns "True" if the process is currently stopped, "False" otherwise'''
+            state = self.GetState()
+            if state == eStateStopped or state == eStateCrashed or state == eStateSuspended:
+                return True
+            return False
+
+        class threads_access(object):
+            '''A helper object that will lazily hand out thread for a process when supplied an index.'''
+            def __init__(self, sbprocess):
+                self.sbprocess = sbprocess
+
+            def __len__(self):
+                if self.sbprocess:
+                    return int(self.sbprocess.GetNumThreads())
+                return 0
+
+            def __getitem__(self, key):
+                if type(key) is int and key < len(self):
+                    return self.sbprocess.GetThreadAtIndex(key)
+                return None
+
+        def get_threads_access_object(self):
+            '''An accessor function that returns a modules_access() object which allows lazy thread access from a lldb.SBProcess object.'''
+            return self.threads_access (self)
+
+        def get_process_thread_list(self):
+            '''An accessor function that returns a list() that contains all threads in a lldb.SBProcess object.'''
+            threads = []
+            accessor = self.get_threads_access_object()
+            for idx in range(len(accessor)):
+                threads.append(accessor[idx])
+            return threads
+
+        def __iter__(self):
+            '''Iterate over all threads in a lldb.SBProcess object.'''
+            return lldb_iter(self, 'GetNumThreads', 'GetThreadAtIndex')
+
+        def __len__(self):
+            '''Return the number of threads in a lldb.SBProcess object.'''
+            return self.GetNumThreads()
+
+
+        threads = property(get_process_thread_list, None, doc='''A read only property that returns a list() of lldb.SBThread objects for this process.''')
+        thread = property(get_threads_access_object, None, doc='''A read only property that returns an object that can access threads by thread index (thread = lldb.process.thread[12]).''')
+        is_alive = property(__get_is_alive__, None, doc='''A read only property that returns a boolean value that indicates if this process is currently alive.''')
+        is_running = property(__get_is_running__, None, doc='''A read only property that returns a boolean value that indicates if this process is currently running.''')
+        is_stopped = property(__get_is_stopped__, None, doc='''A read only property that returns a boolean value that indicates if this process is currently stopped.''')
+        id = property(GetProcessID, None, doc='''A read only property that returns the process ID as an integer.''')
+        target = property(GetTarget, None, doc='''A read only property that an lldb object that represents the target (lldb.SBTarget) that owns this process.''')
+        num_threads = property(GetNumThreads, None, doc='''A read only property that returns the number of threads in this process as an integer.''')
+        selected_thread = property(GetSelectedThread, SetSelectedThread, doc='''A read/write property that gets/sets the currently selected thread in this process. The getter returns a lldb.SBThread object and the setter takes an lldb.SBThread object.''')
+        state = property(GetState, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eState") that represents the current state of this process (running, stopped, exited, etc.).''')
+        exit_state = property(GetExitStatus, None, doc='''A read only property that returns an exit status as an integer of this process when the process state is lldb.eStateExited.''')
+        exit_description = property(GetExitDescription, None, doc='''A read only property that returns an exit description as a string of this process when the process state is lldb.eStateExited.''')
+        broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this process.''')
+    %}
+#endif
+
+};
+
+}  // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBProcessInfo.i b/src/llvm-project/lldb/bindings/interface/SBProcessInfo.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBProcessInfo.i
rename to src/llvm-project/lldb/bindings/interface/SBProcessInfo.i
diff --git a/src/llvm-project/lldb/scripts/interface/SBQueue.i b/src/llvm-project/lldb/bindings/interface/SBQueue.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBQueue.i
rename to src/llvm-project/lldb/bindings/interface/SBQueue.i
diff --git a/src/llvm-project/lldb/scripts/interface/SBQueueItem.i b/src/llvm-project/lldb/bindings/interface/SBQueueItem.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBQueueItem.i
rename to src/llvm-project/lldb/bindings/interface/SBQueueItem.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBSection.i b/src/llvm-project/lldb/bindings/interface/SBSection.i
new file mode 100644
index 0000000..3d1c900
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBSection.i
@@ -0,0 +1,149 @@
+//===-- SWIG Interface for SBSection ----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents an executable image section.
+
+SBSection supports iteration through its subsection, represented as SBSection
+as well.  For example,
+
+    for sec in exe_module:
+        if sec.GetName() == '__TEXT':
+            print sec
+            break
+    print INDENT + 'Number of subsections: %d' % sec.GetNumSubSections()
+    for subsec in sec:
+        print INDENT + repr(subsec)
+
+produces:
+
+[0x0000000100000000-0x0000000100002000) a.out.__TEXT
+    Number of subsections: 6
+    [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
+    [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
+    [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
+    [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
+    [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
+    [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame
+
+See also SBModule."
+) SBSection;
+
+class SBSection
+{
+public:
+
+    SBSection ();
+
+    SBSection (const lldb::SBSection &rhs);
+
+    ~SBSection ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    const char *
+    GetName ();
+
+    lldb::SBSection
+    GetParent();
+
+    lldb::SBSection
+    FindSubSection (const char *sect_name);
+
+    size_t
+    GetNumSubSections ();
+
+    lldb::SBSection
+    GetSubSectionAtIndex (size_t idx);
+
+    lldb::addr_t
+    GetFileAddress ();
+
+    lldb::addr_t
+    GetLoadAddress (lldb::SBTarget &target);
+
+    lldb::addr_t
+    GetByteSize ();
+
+    uint64_t
+    GetFileOffset ();
+
+    uint64_t
+    GetFileByteSize ();
+
+    lldb::SBData
+    GetSectionData ();
+
+    lldb::SBData
+    GetSectionData (uint64_t offset,
+                    uint64_t size);
+
+    SectionType
+    GetSectionType ();
+
+    uint32_t
+    GetPermissions() const;
+
+    %feature("docstring", "
+    Return the size of a target's byte represented by this section
+    in numbers of host bytes. Note that certain architectures have
+    varying minimum addressable unit (i.e. byte) size for their
+    CODE or DATA buses.
+
+    @return
+        The number of host (8-bit) bytes needed to hold a target byte") GetTargetByteSize;
+    uint32_t
+    GetTargetByteSize ();
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    bool
+    operator == (const lldb::SBSection &rhs);
+
+    bool
+    operator != (const lldb::SBSection &rhs);
+
+    STRING_EXTENSION(SBSection)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __iter__(self):
+            '''Iterate over all subsections in a lldb.SBSection object.'''
+            return lldb_iter(self, 'GetNumSubSections', 'GetSubSectionAtIndex')
+
+        def __len__(self):
+            '''Return the number of subsections in a lldb.SBSection object.'''
+            return self.GetNumSubSections()
+
+        def get_addr(self):
+            return SBAddress(self, 0)
+
+        name = property(GetName, None, doc='''A read only property that returns the name of this section as a string.''')
+        addr = property(get_addr, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this section.''')
+        file_addr = property(GetFileAddress, None, doc='''A read only property that returns an integer that represents the starting "file" address for this section, or the address of the section in the object file in which it is defined.''')
+        size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes of this section as an integer.''')
+        file_offset = property(GetFileOffset, None, doc='''A read only property that returns the file offset in bytes of this section as an integer.''')
+        file_size = property(GetFileByteSize, None, doc='''A read only property that returns the file size in bytes of this section as an integer.''')
+        data = property(GetSectionData, None, doc='''A read only property that returns an lldb object that represents the bytes for this section (lldb.SBData) for this section.''')
+        type = property(GetSectionType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSectionType") that represents the type of this section (code, data, etc.).''')
+        target_byte_size = property(GetTargetByteSize, None, doc='''A read only property that returns the size of a target byte represented by this section as a number of host bytes.''')
+    %}
+#endif
+
+private:
+
+    std::unique_ptr<lldb_private::SectionImpl> m_opaque_ap;
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBSourceManager.i b/src/llvm-project/lldb/bindings/interface/SBSourceManager.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBSourceManager.i
rename to src/llvm-project/lldb/bindings/interface/SBSourceManager.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBStream.i b/src/llvm-project/lldb/bindings/interface/SBStream.i
new file mode 100644
index 0000000..31fb380
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBStream.i
@@ -0,0 +1,102 @@
+//===-- SWIG Interface for SBStream -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a destination for streaming data output to. By default, a string
+stream is created.
+
+For example (from test/source-manager/TestSourceManager.py),
+
+        # Create the filespec for 'main.c'.
+        filespec = lldb.SBFileSpec('main.c', False)
+        source_mgr = self.dbg.GetSourceManager()
+        # Use a string stream as the destination.
+        stream = lldb.SBStream()
+        source_mgr.DisplaySourceLinesWithLineNumbers(filespec,
+                                                     self.line,
+                                                     2, # context before
+                                                     2, # context after
+                                                     '=>', # prefix for current line
+                                                     stream)
+
+        #    2
+        #    3    int main(int argc, char const *argv[]) {
+        # => 4        printf('Hello world.\\n'); // Set break point at this line.
+        #    5        return 0;
+        #    6    }
+        self.expect(stream.GetData(), 'Source code displayed correctly',
+                    exe=False,
+            patterns = ['=> %d.*Hello world' % self.line])") SBStream;
+class SBStream
+{
+public:
+
+    SBStream ();
+
+    ~SBStream ();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    %feature("docstring", "
+    If this stream is not redirected to a file, it will maintain a local
+    cache for the stream data which can be accessed using this accessor.") GetData;
+    const char *
+    GetData ();
+
+    %feature("docstring", "
+    If this stream is not redirected to a file, it will maintain a local
+    cache for the stream output whose length can be accessed using this
+    accessor.") GetSize;
+    size_t
+    GetSize();
+
+    // wrapping the variadic Printf() with a plain Print()
+    // because it is hard to support varargs in SWIG bridgings
+    %extend {
+        void Print (const char* str)
+        {
+            self->Printf("%s", str);
+        }
+    }
+
+    void
+    RedirectToFile (const char *path, bool append);
+
+    void
+    RedirectToFile (lldb::SBFile file);
+
+    void
+    RedirectToFile (lldb::FileSP file);
+
+    %extend {
+        %feature("autodoc", "DEPRECATED, use RedirectToFile");
+        void
+        RedirectToFileHandle (lldb::FileSP file, bool transfer_fh_ownership) {
+            self->RedirectToFile(file);
+        }
+    }
+
+    void
+    RedirectToFileDescriptor (int fd, bool transfer_fh_ownership);
+
+    %feature("docstring", "
+    If the stream is redirected to a file, forget about the file and if
+    ownership of the file was transferred to this object, close the file.
+    If the stream is backed by a local cache, clear this cache.") Clear;
+    void
+    Clear ();
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBStringList.i b/src/llvm-project/lldb/bindings/interface/SBStringList.i
new file mode 100644
index 0000000..c8e1e35
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBStringList.i
@@ -0,0 +1,57 @@
+//===-- SWIG Interface for SBStringList -------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+class SBStringList
+{
+public:
+
+    SBStringList ();
+
+    SBStringList (const lldb::SBStringList &rhs);
+
+    ~SBStringList ();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    void
+    AppendString (const char *str);
+
+    void
+    AppendList (const char **strv, int strc);
+
+    void
+    AppendList (const lldb::SBStringList &strings);
+
+    uint32_t
+    GetSize () const;
+
+    const char *
+    GetStringAtIndex (size_t idx);
+
+    void
+    Clear ();
+
+#ifdef SWIGPYTHON
+    %pythoncode%{
+    def __iter__(self):
+        '''Iterate over all strings in a lldb.SBStringList object.'''
+        return lldb_iter(self, 'GetSize', 'GetStringAtIndex')
+
+    def __len__(self):
+        '''Return the number of strings in a lldb.SBStringList object.'''
+        return self.GetSize()
+    %}
+#endif
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBStructuredData.i b/src/llvm-project/lldb/bindings/interface/SBStructuredData.i
new file mode 100644
index 0000000..c7601bf
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBStructuredData.i
@@ -0,0 +1,63 @@
+//===-- SWIG Interface for SBStructuredData ---------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+    %feature("docstring",
+             "A class representing a StructuredData event.
+
+              This class wraps the event type generated by StructuredData
+              features."
+             ) SBStructuredData;
+    class SBStructuredData
+    {
+    public:
+        SBStructuredData();
+
+        SBStructuredData(const lldb::SBStructuredData &rhs);
+
+        SBStructuredData(const lldb::EventSP &event_sp);
+
+        ~SBStructuredData();
+
+        bool
+        IsValid() const;
+
+        explicit operator bool() const;
+
+        void
+        Clear();
+
+        lldb::StructuredDataType GetType() const;
+
+        size_t GetSize() const;
+
+        bool GetKeys(lldb::SBStringList &keys) const;
+
+        lldb::SBStructuredData GetValueForKey(const char *key) const;
+
+        lldb::SBStructuredData GetItemAtIndex(size_t idx) const;
+
+        uint64_t GetIntegerValue(uint64_t fail_value = 0) const;
+
+        double GetFloatValue(double fail_value = 0.0) const;
+
+        bool GetBooleanValue(bool fail_value = false) const;
+
+        size_t GetStringValue(char *dst, size_t dst_len) const;
+
+        lldb::SBError
+        GetAsJSON(lldb::SBStream &stream) const;
+
+        lldb::SBError
+        GetDescription(lldb::SBStream &stream) const;
+
+        lldb::SBError
+        SetFromJSON(lldb::SBStream &stream);
+    };
+}
diff --git a/src/llvm-project/lldb/bindings/interface/SBSymbol.i b/src/llvm-project/lldb/bindings/interface/SBSymbol.i
new file mode 100644
index 0000000..4e17ab5
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBSymbol.i
@@ -0,0 +1,96 @@
+//===-- SWIG Interface for SBSymbol -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents the symbol possibly associated with a stack frame.
+SBModule contains SBSymbol(s). SBSymbol can also be retrieved from SBFrame.
+
+See also SBModule and SBFrame."
+) SBSymbol;
+class SBSymbol
+{
+public:
+
+    SBSymbol ();
+
+    ~SBSymbol ();
+
+    SBSymbol (const lldb::SBSymbol &rhs);
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+
+    const char *
+    GetName() const;
+
+    const char *
+    GetDisplayName() const;
+
+    const char *
+    GetMangledName () const;
+
+    lldb::SBInstructionList
+    GetInstructions (lldb::SBTarget target);
+
+    lldb::SBInstructionList
+    GetInstructions (lldb::SBTarget target, const char *flavor_string);
+
+    SBAddress
+    GetStartAddress ();
+
+    SBAddress
+    GetEndAddress ();
+
+    uint32_t
+    GetPrologueByteSize ();
+
+    SymbolType
+    GetType ();
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    bool
+    IsExternal();
+
+    bool
+    IsSynthetic();
+
+    bool
+    operator == (const lldb::SBSymbol &rhs) const;
+
+    bool
+    operator != (const lldb::SBSymbol &rhs) const;
+
+    STRING_EXTENSION(SBSymbol)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def get_instructions_from_current_target (self):
+            return self.GetInstructions (target)
+
+        name = property(GetName, None, doc='''A read only property that returns the name for this symbol as a string.''')
+        mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this symbol as a string.''')
+        type = property(GetType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSymbolType") that represents the type of this symbol.''')
+        addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this symbol.''')
+        end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this symbol.''')
+        prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''')
+        instructions = property(get_instructions_from_current_target, None, doc='''A read only property that returns an lldb object that represents the instructions (lldb.SBInstructionList) for this symbol.''')
+        external = property(IsExternal, None, doc='''A read only property that returns a boolean value that indicates if this symbol is externally visiable (exported) from the module that contains it.''')
+        synthetic = property(IsSynthetic, None, doc='''A read only property that returns a boolean value that indicates if this symbol was synthetically created from information in module that contains it.''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBSymbolContext.i b/src/llvm-project/lldb/bindings/interface/SBSymbolContext.i
new file mode 100644
index 0000000..b6b3365
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBSymbolContext.i
@@ -0,0 +1,99 @@
+//===-- SWIG Interface for SBSymbolContext ----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"A context object that provides access to core debugger entities.
+
+Many debugger functions require a context when doing lookups. This class
+provides a common structure that can be used as the result of a query that
+can contain a single result.
+
+For example,
+
+        exe = os.path.join(os.getcwd(), 'a.out')
+
+        # Create a target for the debugger.
+        target = self.dbg.CreateTarget(exe)
+
+        # Now create a breakpoint on main.c by name 'c'.
+        breakpoint = target.BreakpointCreateByName('c', 'a.out')
+
+        # Now launch the process, and do not stop at entry point.
+        process = target.LaunchSimple(None, None, os.getcwd())
+
+        # The inferior should stop on 'c'.
+        from lldbutil import get_stopped_thread
+        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        frame0 = thread.GetFrameAtIndex(0)
+
+        # Now get the SBSymbolContext from this frame.  We want everything. :-)
+        context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
+
+        # Get the module.
+        module = context.GetModule()
+        ...
+
+        # And the compile unit associated with the frame.
+        compileUnit = context.GetCompileUnit()
+        ...
+"
+) SBSymbolContext;
+class SBSymbolContext
+{
+public:
+    SBSymbolContext ();
+
+    SBSymbolContext (const lldb::SBSymbolContext& rhs);
+
+    ~SBSymbolContext ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    lldb::SBModule        GetModule ();
+    lldb::SBCompileUnit   GetCompileUnit ();
+    lldb::SBFunction      GetFunction ();
+    lldb::SBBlock         GetBlock ();
+    lldb::SBLineEntry     GetLineEntry ();
+    lldb::SBSymbol        GetSymbol ();
+
+    void SetModule      (lldb::SBModule module);
+    void SetCompileUnit (lldb::SBCompileUnit compile_unit);
+    void SetFunction    (lldb::SBFunction function);
+    void SetBlock       (lldb::SBBlock block);
+    void SetLineEntry   (lldb::SBLineEntry line_entry);
+    void SetSymbol      (lldb::SBSymbol symbol);
+
+    lldb::SBSymbolContext
+    GetParentOfInlinedScope (const lldb::SBAddress &curr_frame_pc,
+                             lldb::SBAddress &parent_frame_addr) const;
+
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    STRING_EXTENSION(SBSymbolContext)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        module = property(GetModule, SetModule, doc='''A read/write property that allows the getting/setting of the module (lldb.SBModule) in this symbol context.''')
+        compile_unit = property(GetCompileUnit, SetCompileUnit, doc='''A read/write property that allows the getting/setting of the compile unit (lldb.SBCompileUnit) in this symbol context.''')
+        function = property(GetFunction, SetFunction, doc='''A read/write property that allows the getting/setting of the function (lldb.SBFunction) in this symbol context.''')
+        block = property(GetBlock, SetBlock, doc='''A read/write property that allows the getting/setting of the block (lldb.SBBlock) in this symbol context.''')
+        symbol = property(GetSymbol, SetSymbol, doc='''A read/write property that allows the getting/setting of the symbol (lldb.SBSymbol) in this symbol context.''')
+        line_entry = property(GetLineEntry, SetLineEntry, doc='''A read/write property that allows the getting/setting of the line entry (lldb.SBLineEntry) in this symbol context.''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBSymbolContextList.i b/src/llvm-project/lldb/bindings/interface/SBSymbolContextList.i
new file mode 100644
index 0000000..f5adcfc
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBSymbolContextList.i
@@ -0,0 +1,139 @@
+//===-- SWIG Interface for SBSymbolContextList ------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a list of symbol context object. See also SBSymbolContext.
+
+For example (from test/python_api/target/TestTargetAPI.py),
+
+    def find_functions(self, exe_name):
+        '''Exercise SBTaget.FindFunctions() API.'''
+        exe = os.path.join(os.getcwd(), exe_name)
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        list = lldb.SBSymbolContextList()
+        num = target.FindFunctions('c', lldb.eFunctionNameTypeAuto, False, list)
+        self.assertTrue(num == 1 and list.GetSize() == 1)
+
+        for sc in list:
+            self.assertTrue(sc.GetModule().GetFileSpec().GetFilename() == exe_name)
+            self.assertTrue(sc.GetSymbol().GetName() == 'c')") SBSymbolContextList;
+class SBSymbolContextList
+{
+public:
+    SBSymbolContextList ();
+
+    SBSymbolContextList (const lldb::SBSymbolContextList& rhs);
+
+    ~SBSymbolContextList ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    uint32_t
+    GetSize() const;
+
+    SBSymbolContext
+    GetContextAtIndex (uint32_t idx);
+
+    void
+    Append (lldb::SBSymbolContext &sc);
+
+    void
+    Append (lldb::SBSymbolContextList &sc_list);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    void
+    Clear();
+
+    STRING_EXTENSION(SBSymbolContextList)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __iter__(self):
+            '''Iterate over all symbol contexts in a lldb.SBSymbolContextList
+            object.'''
+            return lldb_iter(self, 'GetSize', 'GetContextAtIndex')
+
+        def __len__(self):
+            return int(self.GetSize())
+
+        def __getitem__(self, key):
+            count = len(self)
+            if type(key) is int:
+                if key < count:
+                    return self.GetContextAtIndex(key)
+                else:
+                    raise IndexError
+            raise TypeError
+
+        def get_module_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).module
+                if obj:
+                    a.append(obj)
+            return a
+
+        def get_compile_unit_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).compile_unit
+                if obj:
+                    a.append(obj)
+            return a
+        def get_function_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).function
+                if obj:
+                    a.append(obj)
+            return a
+        def get_block_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).block
+                if obj:
+                    a.append(obj)
+            return a
+        def get_symbol_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).symbol
+                if obj:
+                    a.append(obj)
+            return a
+        def get_line_entry_array(self):
+            a = []
+            for i in range(len(self)):
+                obj = self.GetContextAtIndex(i).line_entry
+                if obj:
+                    a.append(obj)
+            return a
+
+        modules = property(get_module_array, None, doc='''Returns a list() of lldb.SBModule objects, one for each module in each SBSymbolContext object in this list.''')
+        compile_units = property(get_compile_unit_array, None, doc='''Returns a list() of lldb.SBCompileUnit objects, one for each compile unit in each SBSymbolContext object in this list.''')
+        functions = property(get_function_array, None, doc='''Returns a list() of lldb.SBFunction objects, one for each function in each SBSymbolContext object in this list.''')
+        blocks = property(get_block_array, None, doc='''Returns a list() of lldb.SBBlock objects, one for each block in each SBSymbolContext object in this list.''')
+        line_entries = property(get_line_entry_array, None, doc='''Returns a list() of lldb.SBLineEntry objects, one for each line entry in each SBSymbolContext object in this list.''')
+        symbols = property(get_symbol_array, None, doc='''Returns a list() of lldb.SBSymbol objects, one for each symbol in each SBSymbolContext object in this list.''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBTarget.i b/src/llvm-project/lldb/bindings/interface/SBTarget.i
new file mode 100644
index 0000000..371bf5c
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBTarget.i
@@ -0,0 +1,1070 @@
+//===-- SWIG Interface for SBTarget -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents the target program running under the debugger.
+
+SBTarget supports module, breakpoint, and watchpoint iterations. For example,
+
+    for m in target.module_iter():
+        print m
+
+produces:
+
+(x86_64) /Volumes/data/lldb/svn/trunk/test/python_api/lldbutil/iter/a.out
+(x86_64) /usr/lib/dyld
+(x86_64) /usr/lib/libstdc++.6.dylib
+(x86_64) /usr/lib/libSystem.B.dylib
+(x86_64) /usr/lib/system/libmathCommon.A.dylib
+(x86_64) /usr/lib/libSystem.B.dylib(__commpage)
+
+and,
+
+    for b in target.breakpoint_iter():
+        print b
+
+produces:
+
+SBBreakpoint: id = 1, file ='main.cpp', line = 66, locations = 1
+SBBreakpoint: id = 2, file ='main.cpp', line = 85, locations = 1
+
+and,
+
+    for wp_loc in target.watchpoint_iter():
+        print wp_loc
+
+produces:
+
+Watchpoint 1: addr = 0x1034ca048 size = 4 state = enabled type = rw
+    declare @ '/Volumes/data/lldb/svn/trunk/test/python_api/watchpoint/main.c:12'
+    hw_index = 0  hit_count = 2     ignore_count = 0"
+) SBTarget;
+class SBTarget
+{
+public:
+    //------------------------------------------------------------------
+    // Broadcaster bits.
+    //------------------------------------------------------------------
+    enum
+    {
+        eBroadcastBitBreakpointChanged  = (1 << 0),
+        eBroadcastBitModulesLoaded      = (1 << 1),
+        eBroadcastBitModulesUnloaded    = (1 << 2),
+        eBroadcastBitWatchpointChanged  = (1 << 3),
+        eBroadcastBitSymbolsLoaded      = (1 << 4)
+    };
+
+    //------------------------------------------------------------------
+    // Constructors
+    //------------------------------------------------------------------
+    SBTarget ();
+
+    SBTarget (const lldb::SBTarget& rhs);
+
+    //------------------------------------------------------------------
+    // Destructor
+    //------------------------------------------------------------------
+    ~SBTarget();
+
+    static const char *
+    GetBroadcasterClassName ();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    static bool
+    EventIsTargetEvent (const lldb::SBEvent &event);
+
+    static lldb::SBTarget
+    GetTargetFromEvent (const lldb::SBEvent &event);
+
+    static uint32_t
+    GetNumModulesFromEvent (const lldb::SBEvent &event);
+
+    static lldb::SBModule
+    GetModuleAtIndexFromEvent (const uint32_t idx, const lldb::SBEvent &event);
+
+    lldb::SBProcess
+    GetProcess ();
+
+
+    %feature("docstring", "
+    Return the platform object associated with the target.
+
+    After return, the platform object should be checked for
+    validity.
+
+    @return
+        A platform object.") GetPlatform;
+    lldb::SBPlatform
+    GetPlatform ();
+
+    %feature("docstring", "
+    Install any binaries that need to be installed.
+
+    This function does nothing when debugging on the host system.
+    When connected to remote platforms, the target's main executable
+    and any modules that have their install path set will be
+    installed on the remote platform. If the main executable doesn't
+    have an install location set, it will be installed in the remote
+    platform's working directory.
+
+    @return
+        An error describing anything that went wrong during
+        installation.") Install;
+    lldb::SBError
+    Install();
+
+    %feature("docstring", "
+    Launch a new process.
+
+    Launch a new process by spawning a new process using the
+    target object's executable module's file as the file to launch.
+    Arguments are given in argv, and the environment variables
+    are in envp. Standard input and output files can be
+    optionally re-directed to stdin_path, stdout_path, and
+    stderr_path.
+
+    @param[in] listener
+        An optional listener that will receive all process events.
+        If listener is valid then listener will listen to all
+        process events. If not valid, then this target's debugger
+        (SBTarget::GetDebugger()) will listen to all process events.
+
+    @param[in] argv
+        The argument array.
+
+    @param[in] envp
+        The environment array.
+
+    @param[in] launch_flags
+        Flags to modify the launch (@see lldb::LaunchFlags)
+
+    @param[in] stdin_path
+        The path to use when re-directing the STDIN of the new
+        process. If all stdXX_path arguments are NULL, a pseudo
+        terminal will be used.
+
+    @param[in] stdout_path
+        The path to use when re-directing the STDOUT of the new
+        process. If all stdXX_path arguments are NULL, a pseudo
+        terminal will be used.
+
+    @param[in] stderr_path
+        The path to use when re-directing the STDERR of the new
+        process. If all stdXX_path arguments are NULL, a pseudo
+        terminal will be used.
+
+    @param[in] working_directory
+        The working directory to have the child process run in
+
+    @param[in] launch_flags
+        Some launch options specified by logical OR'ing
+        lldb::LaunchFlags enumeration values together.
+
+    @param[in] stop_at_entry
+        If false do not stop the inferior at the entry point.
+
+    @param[out]
+        An error object. Contains the reason if there is some failure.
+
+    @return
+         A process object for the newly created process.
+
+    For example,
+
+        process = target.Launch(self.dbg.GetListener(), None, None,
+                                None, '/tmp/stdout.txt', None,
+                                None, 0, False, error)
+
+    launches a new process by passing nothing for both the args and the envs
+    and redirect the standard output of the inferior to the /tmp/stdout.txt
+    file. It does not specify a working directory so that the debug server
+    will use its idea of what the current working directory is for the
+    inferior. Also, we ask the debugger not to stop the inferior at the
+    entry point. If no breakpoint is specified for the inferior, it should
+    run to completion if no user interaction is required.") Launch;
+    lldb::SBProcess
+    Launch (SBListener &listener,
+            char const **argv,
+            char const **envp,
+            const char *stdin_path,
+            const char *stdout_path,
+            const char *stderr_path,
+            const char *working_directory,
+            uint32_t launch_flags,   // See LaunchFlags
+            bool stop_at_entry,
+            lldb::SBError& error);
+
+    %feature("docstring", "
+    Launch a new process with sensible defaults.
+
+    @param[in] argv
+        The argument array.
+
+    @param[in] envp
+        The environment array.
+
+    @param[in] working_directory
+        The working directory to have the child process run in
+
+    Default: listener
+        Set to the target's debugger (SBTarget::GetDebugger())
+
+    Default: launch_flags
+        Empty launch flags
+
+    Default: stdin_path
+    Default: stdout_path
+    Default: stderr_path
+        A pseudo terminal will be used.
+
+    @return
+         A process object for the newly created process.
+
+    For example,
+
+        process = target.LaunchSimple(['X', 'Y', 'Z'], None, os.getcwd())
+
+    launches a new process by passing 'X', 'Y', 'Z' as the args to the
+    executable.") LaunchSimple;
+    lldb::SBProcess
+    LaunchSimple (const char **argv,
+                  const char **envp,
+                  const char *working_directory);
+
+    lldb::SBProcess
+    Launch (lldb::SBLaunchInfo &launch_info, lldb::SBError& error);
+
+    %feature("docstring", "
+    Load a core file
+
+    @param[in] core_file
+        File path of the core dump.
+
+    @param[out] error
+        An error explaining what went wrong if the operation fails.
+        (Optional)
+
+    @return
+         A process object for the newly created core file.
+
+    For example,
+
+        process = target.LoadCore('./a.out.core')
+
+    loads a new core file and returns the process object.") LoadCore;
+    lldb::SBProcess
+    LoadCore(const char *core_file);
+
+    lldb::SBProcess
+    LoadCore(const char *core_file, lldb::SBError &error);
+
+    lldb::SBProcess
+    Attach(lldb::SBAttachInfo &attach_info, lldb::SBError& error);
+
+    %feature("docstring", "
+    Attach to process with pid.
+
+    @param[in] listener
+        An optional listener that will receive all process events.
+        If listener is valid then listener will listen to all
+        process events. If not valid, then this target's debugger
+        (SBTarget::GetDebugger()) will listen to all process events.
+
+    @param[in] pid
+        The process ID to attach to.
+
+    @param[out]
+        An error explaining what went wrong if attach fails.
+
+    @return
+         A process object for the attached process.") AttachToProcessWithID;
+    lldb::SBProcess
+    AttachToProcessWithID (SBListener &listener,
+                           lldb::pid_t pid,
+                           lldb::SBError& error);
+
+    %feature("docstring", "
+    Attach to process with name.
+
+    @param[in] listener
+        An optional listener that will receive all process events.
+        If listener is valid then listener will listen to all
+        process events. If not valid, then this target's debugger
+        (SBTarget::GetDebugger()) will listen to all process events.
+
+    @param[in] name
+        Basename of process to attach to.
+
+    @param[in] wait_for
+        If true wait for a new instance of 'name' to be launched.
+
+    @param[out]
+        An error explaining what went wrong if attach fails.
+
+    @return
+         A process object for the attached process.") AttachToProcessWithName;
+    lldb::SBProcess
+    AttachToProcessWithName (SBListener &listener,
+                             const char *name,
+                             bool wait_for,
+                             lldb::SBError& error);
+
+    %feature("docstring", "
+    Connect to a remote debug server with url.
+
+    @param[in] listener
+        An optional listener that will receive all process events.
+        If listener is valid then listener will listen to all
+        process events. If not valid, then this target's debugger
+        (SBTarget::GetDebugger()) will listen to all process events.
+
+    @param[in] url
+        The url to connect to, e.g., 'connect://localhost:12345'.
+
+    @param[in] plugin_name
+        The plugin name to be used; can be NULL.
+
+    @param[out]
+        An error explaining what went wrong if the connect fails.
+
+    @return
+         A process object for the connected process.") ConnectRemote;
+    lldb::SBProcess
+    ConnectRemote (SBListener &listener,
+                   const char *url,
+                   const char *plugin_name,
+                   SBError& error);
+
+    lldb::SBFileSpec
+    GetExecutable ();
+
+    %feature("docstring", "
+    Append the path mapping (from -> to) to the target's paths mapping list.") AppendImageSearchPath;
+    void
+    AppendImageSearchPath (const char *from,
+                           const char *to,
+                           SBError &error);
+
+    bool
+    AddModule (lldb::SBModule &module);
+
+    lldb::SBModule
+    AddModule (const char *path,
+               const char *triple,
+               const char *uuid);
+
+    lldb::SBModule
+    AddModule (const char *path,
+               const char *triple,
+               const char *uuid_cstr,
+               const char *symfile);
+
+    lldb::SBModule
+    AddModule (const SBModuleSpec &module_spec);
+
+    uint32_t
+    GetNumModules () const;
+
+    lldb::SBModule
+    GetModuleAtIndex (uint32_t idx);
+
+    bool
+    RemoveModule (lldb::SBModule module);
+
+    lldb::SBDebugger
+    GetDebugger() const;
+
+    lldb::SBModule
+    FindModule (const lldb::SBFileSpec &file_spec);
+
+    %feature("docstring", "
+    Find compile units related to *this target and passed source
+    file.
+
+    @param[in] sb_file_spec
+        A lldb::SBFileSpec object that contains source file
+        specification.
+
+    @return
+        A lldb::SBSymbolContextList that gets filled in with all of
+        the symbol contexts for all the matches.") FindCompileUnits;
+    lldb::SBSymbolContextList
+    FindCompileUnits (const lldb::SBFileSpec &sb_file_spec);
+
+    lldb::ByteOrder
+    GetByteOrder ();
+
+    uint32_t
+    GetAddressByteSize();
+
+    const char *
+    GetTriple ();
+
+    %feature("docstring", "
+    Architecture data byte width accessor
+
+    @return
+    The size in 8-bit (host) bytes of a minimum addressable
+    unit from the Architecture's data bus") GetDataByteSize;
+    uint32_t
+    GetDataByteSize ();
+
+    %feature("docstring", "
+    Architecture code byte width accessor
+
+    @return
+    The size in 8-bit (host) bytes of a minimum addressable
+    unit from the Architecture's code bus") GetCodeByteSize;
+    uint32_t
+    GetCodeByteSize ();
+
+    lldb::SBError
+    SetSectionLoadAddress (lldb::SBSection section,
+                           lldb::addr_t section_base_addr);
+
+    lldb::SBError
+    ClearSectionLoadAddress (lldb::SBSection section);
+
+    lldb::SBError
+    SetModuleLoadAddress (lldb::SBModule module,
+                          int64_t sections_offset);
+
+    lldb::SBError
+    ClearModuleLoadAddress (lldb::SBModule module);
+
+    %feature("docstring", "
+    Find functions by name.
+
+    @param[in] name
+        The name of the function we are looking for.
+
+    @param[in] name_type_mask
+        A logical OR of one or more FunctionNameType enum bits that
+        indicate what kind of names should be used when doing the
+        lookup. Bits include fully qualified names, base names,
+        C++ methods, or ObjC selectors.
+        See FunctionNameType for more details.
+
+    @return
+        A lldb::SBSymbolContextList that gets filled in with all of
+        the symbol contexts for all the matches.") FindFunctions;
+    lldb::SBSymbolContextList
+    FindFunctions (const char *name,
+                   uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
+
+    lldb::SBType
+    FindFirstType (const char* type);
+
+    lldb::SBTypeList
+    FindTypes (const char* type);
+
+    lldb::SBType
+    GetBasicType(lldb::BasicType type);
+
+    lldb::SBSourceManager
+    GetSourceManager ();
+
+    %feature("docstring", "
+    Find global and static variables by name.
+
+    @param[in] name
+        The name of the global or static variable we are looking
+        for.
+
+    @param[in] max_matches
+        Allow the number of matches to be limited to max_matches.
+
+    @return
+        A list of matched variables in an SBValueList.") FindGlobalVariables;
+    lldb::SBValueList
+    FindGlobalVariables (const char *name,
+                         uint32_t max_matches);
+
+     %feature("docstring", "
+    Find the first global (or static) variable by name.
+
+    @param[in] name
+        The name of the global or static variable we are looking
+        for.
+
+    @return
+        An SBValue that gets filled in with the found variable (if any).") FindFirstGlobalVariable;
+    lldb::SBValue
+    FindFirstGlobalVariable (const char* name);
+
+
+    lldb::SBValueList
+    FindGlobalVariables(const char *name,
+                        uint32_t max_matches,
+                        MatchType matchtype);
+
+    lldb::SBSymbolContextList
+    FindGlobalFunctions(const char *name,
+                        uint32_t max_matches,
+                        MatchType matchtype);
+
+    void
+    Clear ();
+
+     %feature("docstring", "
+    Resolve a current file address into a section offset address.
+
+    @param[in] file_addr
+
+    @return
+        An SBAddress which will be valid if...") ResolveFileAddress;
+    lldb::SBAddress
+    ResolveFileAddress (lldb::addr_t file_addr);
+
+    lldb::SBAddress
+    ResolveLoadAddress (lldb::addr_t vm_addr);
+
+    lldb::SBAddress
+    ResolvePastLoadAddress (uint32_t stop_id, lldb::addr_t vm_addr);
+
+    SBSymbolContext
+    ResolveSymbolContextForAddress (const SBAddress& addr,
+                                    uint32_t resolve_scope);
+
+     %feature("docstring", "
+    Read target memory. If a target process is running then memory
+    is read from here. Otherwise the memory is read from the object
+    files. For a target whose bytes are sized as a multiple of host
+    bytes, the data read back will preserve the target's byte order.
+
+    @param[in] addr
+        A target address to read from.
+
+    @param[out] buf
+        The buffer to read memory into.
+
+    @param[in] size
+        The maximum number of host bytes to read in the buffer passed
+        into this call
+
+    @param[out] error
+        Error information is written here if the memory read fails.
+
+    @return
+        The amount of data read in host bytes.") ReadMemory;
+    size_t
+    ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByLocation (const char *file, uint32_t line);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line, lldb::addr_t offset);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line,
+                                lldb::addr_t offset, SBFileSpecList &module_list);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line,
+                                uint32_t column, lldb::addr_t offset,
+                                SBFileSpecList &module_list);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByName (const char *symbol_name,
+                            uint32_t func_name_type,           // Logical OR one or more FunctionNameType enum bits
+                            const SBFileSpecList &module_list,
+                            const SBFileSpecList &comp_unit_list);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByName (const char *symbol_name,
+                            uint32_t func_name_type,           // Logical OR one or more FunctionNameType enum bits
+                            lldb::LanguageType symbol_language,
+                            const SBFileSpecList &module_list,
+                            const SBFileSpecList &comp_unit_list);
+
+#ifdef SWIGPYTHON
+%typemap(in) (const char **symbol_name, uint32_t num_names) {
+  using namespace lldb_private;
+  /* Check if is a list  */
+  if (PythonList::Check($input)) {
+    PythonList list(PyRefType::Borrowed, $input);
+    $2 = list.GetSize();
+    int i = 0;
+    $1 = (char**)malloc(($2+1)*sizeof(char*));
+    for (i = 0; i < $2; i++) {
+      PythonString py_str = list.GetItemAtIndex(i).AsType<PythonString>();
+      if (!py_str.IsAllocated()) {
+        PyErr_SetString(PyExc_TypeError,"list must contain strings and blubby");
+        free($1);
+        return nullptr;
+      }
+
+      $1[i] = const_cast<char*>(py_str.GetString().data());
+    }
+    $1[i] = 0;
+  } else if ($input == Py_None) {
+    $1 =  NULL;
+  } else {
+    PyErr_SetString(PyExc_TypeError,"not a list");
+    return NULL;
+  }
+}
+#endif
+
+    lldb::SBBreakpoint
+    BreakpointCreateByNames (const char **symbol_name,
+                             uint32_t num_names,
+                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
+                             const SBFileSpecList &module_list,
+                             const SBFileSpecList &comp_unit_list);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByNames (const char **symbol_name,
+                             uint32_t num_names,
+                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
+                             lldb::LanguageType symbol_language,
+                             const SBFileSpecList &module_list,
+                             const SBFileSpecList &comp_unit_list);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByNames (const char **symbol_name,
+                             uint32_t num_names,
+                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
+                             lldb::LanguageType symbol_language,
+                             lldb::addr_t offset,
+                             const SBFileSpecList &module_list,
+                             const SBFileSpecList &comp_unit_list);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByRegex (const char *symbol_name_regex,
+                             lldb::LanguageType symbol_language,
+                             const SBFileSpecList &module_list,
+                             const SBFileSpecList &comp_unit_list);
+
+    lldb::SBBreakpoint
+    BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpec &source_file, const char *module_name = NULL);
+
+    lldb::SBBreakpoint
+    BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpecList &module_list, const lldb::SBFileSpecList &file_list);
+
+    lldb::SBBreakpoint
+    BreakpointCreateBySourceRegex (const char *source_regex,
+                                   const SBFileSpecList &module_list,
+                                   const SBFileSpecList &source_file,
+                                   const SBStringList  &func_names);
+
+    lldb::SBBreakpoint
+    BreakpointCreateForException  (lldb::LanguageType language,
+                                   bool catch_bp,
+                                   bool throw_bp);
+
+    lldb::SBBreakpoint
+    BreakpointCreateByAddress (addr_t address);
+
+    lldb::SBBreakpoint
+    BreakpointCreateBySBAddress (SBAddress &sb_address);
+
+    %feature("docstring", "
+    Create a breakpoint using a scripted resolver.
+
+    @param[in] class_name
+       This is the name of the class that implements a scripted resolver.
+       The class should have the following signature:
+       class Resolver:
+           def __init__(self, bkpt, extra_args):
+               # bkpt - the breakpoint for which this is the resolver.  When
+               # the resolver finds an interesting address, call AddLocation
+               # on this breakpoint to add it.
+               #
+               # extra_args - an SBStructuredData that can be used to
+               # parametrize this instance.  Same as the extra_args passed
+               # to BreakpointCreateFromScript.
+
+           def __get_depth__ (self):
+               # This is optional, but if defined, you should return the
+               # depth at which you want the callback to be called.  The
+               # available options are:
+               #    lldb.eSearchDepthModule
+               #    lldb.eSearchDepthCompUnit
+               # The default if you don't implement this method is
+               # eSearchDepthModule.
+
+           def __callback__(self, sym_ctx):
+               # sym_ctx - an SBSymbolContext that is the cursor in the
+               # search through the program to resolve breakpoints.
+               # The sym_ctx will be filled out to the depth requested in
+               # __get_depth__.
+               # Look in this sym_ctx for new breakpoint locations,
+               # and if found use bkpt.AddLocation to add them.
+               # Note, you will only get called for modules/compile_units that
+               # pass the SearchFilter provided by the module_list & file_list
+               # passed into BreakpointCreateFromScript.
+
+           def get_short_help(self):
+               # Optional, but if implemented return a short string that will
+               # be printed at the beginning of the break list output for the
+               # breakpoint.
+
+    @param[in] extra_args
+       This is an SBStructuredData object that will get passed to the
+       constructor of the class in class_name.  You can use this to
+       reuse the same class, parametrizing it with entries from this
+       dictionary.
+
+    @param module_list
+       If this is non-empty, this will be used as the module filter in the
+       SearchFilter created for this breakpoint.
+
+    @param file_list
+       If this is non-empty, this will be used as the comp unit filter in the
+       SearchFilter created for this breakpoint.
+
+    @return
+        An SBBreakpoint that will set locations based on the logic in the
+        resolver's search callback.") BreakpointCreateFromScript;
+    lldb::SBBreakpoint BreakpointCreateFromScript(
+      const char *class_name,
+      SBStructuredData &extra_args,
+      const SBFileSpecList &module_list,
+      const SBFileSpecList &file_list,
+      bool request_hardware = false);
+
+    uint32_t
+    GetNumBreakpoints () const;
+
+    lldb::SBBreakpoint
+    GetBreakpointAtIndex (uint32_t idx) const;
+
+    bool
+    BreakpointDelete (break_id_t break_id);
+
+    lldb::SBBreakpoint
+    FindBreakpointByID (break_id_t break_id);
+
+
+    bool FindBreakpointsByName(const char *name, SBBreakpointList &bkpt_list);
+
+    void DeleteBreakpointName(const char *name);
+
+    void GetBreakpointNames(SBStringList &names);
+
+    bool
+    EnableAllBreakpoints ();
+
+    bool
+    DisableAllBreakpoints ();
+
+    bool
+    DeleteAllBreakpoints ();
+
+     %feature("docstring", "
+    Read breakpoints from source_file and return the newly created
+    breakpoints in bkpt_list.
+
+    @param[in] source_file
+       The file from which to read the breakpoints
+
+    @param[out] bkpt_list
+       A list of the newly created breakpoints.
+
+    @return
+        An SBError detailing any errors in reading in the breakpoints.") BreakpointsCreateFromFile;
+    lldb::SBError
+    BreakpointsCreateFromFile(SBFileSpec &source_file,
+                              SBBreakpointList &bkpt_list);
+
+     %feature("docstring", "
+    Read breakpoints from source_file and return the newly created
+    breakpoints in bkpt_list.
+
+    @param[in] source_file
+       The file from which to read the breakpoints
+
+    @param[in] matching_names
+       Only read in breakpoints whose names match one of the names in this
+       list.
+
+    @param[out] bkpt_list
+       A list of the newly created breakpoints.
+
+    @return
+        An SBError detailing any errors in reading in the breakpoints.") BreakpointsCreateFromFile;
+    lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file,
+                                          SBStringList &matching_names,
+                                          SBBreakpointList &new_bps);
+
+     %feature("docstring", "
+    Write breakpoints to dest_file.
+
+    @param[in] dest_file
+       The file to which to write the breakpoints.
+
+    @return
+        An SBError detailing any errors in writing in the breakpoints.") BreakpointsCreateFromFile;
+    lldb::SBError
+    BreakpointsWriteToFile(SBFileSpec &dest_file);
+
+     %feature("docstring", "
+    Write breakpoints listed in bkpt_list to dest_file.
+
+    @param[in] dest_file
+       The file to which to write the breakpoints.
+
+    @param[in] bkpt_list
+       Only write breakpoints from this list.
+
+    @param[in] append
+       If true, append the breakpoints in bkpt_list to the others
+       serialized in dest_file.  If dest_file doesn't exist, then a new
+       file will be created and the breakpoints in bkpt_list written to it.
+
+    @return
+        An SBError detailing any errors in writing in the breakpoints.") BreakpointsCreateFromFile;
+    lldb::SBError
+    BreakpointsWriteToFile(SBFileSpec &dest_file,
+                           SBBreakpointList &bkpt_list,
+                           bool append = false);
+
+    uint32_t
+    GetNumWatchpoints () const;
+
+    lldb::SBWatchpoint
+    GetWatchpointAtIndex (uint32_t idx) const;
+
+    bool
+    DeleteWatchpoint (lldb::watch_id_t watch_id);
+
+    lldb::SBWatchpoint
+    FindWatchpointByID (lldb::watch_id_t watch_id);
+
+    bool
+    EnableAllWatchpoints ();
+
+    bool
+    DisableAllWatchpoints ();
+
+    bool
+    DeleteAllWatchpoints ();
+
+    lldb::SBWatchpoint
+    WatchAddress (lldb::addr_t addr,
+                  size_t size,
+                  bool read,
+                  bool write,
+                  SBError &error);
+
+
+    lldb::SBBroadcaster
+    GetBroadcaster () const;
+
+     %feature("docstring", "
+    Create an SBValue with the given name by treating the memory starting at addr as an entity of type.
+
+    @param[in] name
+        The name of the resultant SBValue
+
+    @param[in] addr
+        The address of the start of the memory region to be used.
+
+    @param[in] type
+        The type to use to interpret the memory starting at addr.
+
+    @return
+        An SBValue of the given type, may be invalid if there was an error reading
+        the underlying memory.") CreateValueFromAddress;
+    lldb::SBValue
+    CreateValueFromAddress (const char *name, lldb::SBAddress addr, lldb::SBType type);
+
+    lldb::SBValue
+    CreateValueFromData (const char *name, lldb::SBData data, lldb::SBType type);
+
+    lldb::SBValue
+    CreateValueFromExpression (const char *name, const char* expr);
+
+    %feature("docstring", "
+    Disassemble a specified number of instructions starting at an address.
+    Parameters:
+       base_addr       -- the address to start disassembly from
+       count           -- the number of instructions to disassemble
+       flavor_string   -- may be 'intel' or 'att' on x86 targets to specify that style of disassembly
+    Returns an SBInstructionList.")
+    ReadInstructions;
+    lldb::SBInstructionList
+    ReadInstructions (lldb::SBAddress base_addr, uint32_t count);
+
+    lldb::SBInstructionList
+    ReadInstructions (lldb::SBAddress base_addr, uint32_t count, const char *flavor_string);
+
+    %feature("docstring", "
+    Disassemble the bytes in a buffer and return them in an SBInstructionList.
+    Parameters:
+       base_addr -- used for symbolicating the offsets in the byte stream when disassembling
+       buf       -- bytes to be disassembled
+       size      -- (C++) size of the buffer
+    Returns an SBInstructionList.")
+    GetInstructions;
+    lldb::SBInstructionList
+    GetInstructions (lldb::SBAddress base_addr, const void *buf, size_t size);
+
+    %feature("docstring", "
+    Disassemble the bytes in a buffer and return them in an SBInstructionList, with a supplied flavor.
+    Parameters:
+       base_addr -- used for symbolicating the offsets in the byte stream when disassembling
+       flavor    -- may be 'intel' or 'att' on x86 targets to specify that style of disassembly
+       buf       -- bytes to be disassembled
+       size      -- (C++) size of the buffer
+    Returns an SBInstructionList.")
+    GetInstructionsWithFlavor;
+    lldb::SBInstructionList
+    GetInstructionsWithFlavor (lldb::SBAddress base_addr, const char *flavor_string, const void *buf, size_t size);
+
+    lldb::SBSymbolContextList
+    FindSymbols (const char *name, lldb::SymbolType type = eSymbolTypeAny);
+
+    bool
+    GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level);
+
+    lldb::addr_t
+    GetStackRedZoneSize();
+
+    lldb::SBLaunchInfo
+    GetLaunchInfo () const;
+
+    void
+    SetLaunchInfo (const lldb::SBLaunchInfo &launch_info);
+
+    void SetCollectingStats(bool v);
+
+    bool GetCollectingStats();
+
+    lldb::SBStructuredData GetStatistics();
+
+    bool
+    operator == (const lldb::SBTarget &rhs) const;
+
+    bool
+    operator != (const lldb::SBTarget &rhs) const;
+
+    lldb::SBValue
+    EvaluateExpression (const char *expr);
+
+    lldb::SBValue
+    EvaluateExpression (const char *expr, const lldb::SBExpressionOptions &options);
+
+    STRING_EXTENSION_LEVEL(SBTarget, lldb::eDescriptionLevelBrief)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        class modules_access(object):
+            '''A helper object that will lazily hand out lldb.SBModule objects for a target when supplied an index, or by full or partial path.'''
+            def __init__(self, sbtarget):
+                self.sbtarget = sbtarget
+
+            def __len__(self):
+                if self.sbtarget:
+                    return int(self.sbtarget.GetNumModules())
+                return 0
+
+            def __getitem__(self, key):
+                num_modules = self.sbtarget.GetNumModules()
+                if type(key) is int:
+                    if key < num_modules:
+                        return self.sbtarget.GetModuleAtIndex(key)
+                elif type(key) is str:
+                    if key.find('/') == -1:
+                        for idx in range(num_modules):
+                            module = self.sbtarget.GetModuleAtIndex(idx)
+                            if module.file.basename == key:
+                                return module
+                    else:
+                        for idx in range(num_modules):
+                            module = self.sbtarget.GetModuleAtIndex(idx)
+                            if module.file.fullpath == key:
+                                return module
+                    # See if the string is a UUID
+                    try:
+                        the_uuid = uuid.UUID(key)
+                        if the_uuid:
+                            for idx in range(num_modules):
+                                module = self.sbtarget.GetModuleAtIndex(idx)
+                                if module.uuid == the_uuid:
+                                    return module
+                    except:
+                        return None
+                elif type(key) is uuid.UUID:
+                    for idx in range(num_modules):
+                        module = self.sbtarget.GetModuleAtIndex(idx)
+                        if module.uuid == key:
+                            return module
+                elif type(key) is re.SRE_Pattern:
+                    matching_modules = []
+                    for idx in range(num_modules):
+                        module = self.sbtarget.GetModuleAtIndex(idx)
+                        re_match = key.search(module.path.fullpath)
+                        if re_match:
+                            matching_modules.append(module)
+                    return matching_modules
+                else:
+                    print("error: unsupported item type: %s" % type(key))
+                return None
+
+        def get_modules_access_object(self):
+            '''An accessor function that returns a modules_access() object which allows lazy module access from a lldb.SBTarget object.'''
+            return self.modules_access (self)
+
+        def get_modules_array(self):
+            '''An accessor function that returns a list() that contains all modules in a lldb.SBTarget object.'''
+            modules = []
+            for idx in range(self.GetNumModules()):
+                modules.append(self.GetModuleAtIndex(idx))
+            return modules
+
+        def module_iter(self):
+            '''Returns an iterator over all modules in a lldb.SBTarget
+            object.'''
+            return lldb_iter(self, 'GetNumModules', 'GetModuleAtIndex')
+
+        def breakpoint_iter(self):
+            '''Returns an iterator over all breakpoints in a lldb.SBTarget
+            object.'''
+            return lldb_iter(self, 'GetNumBreakpoints', 'GetBreakpointAtIndex')
+
+        def watchpoint_iter(self):
+            '''Returns an iterator over all watchpoints in a lldb.SBTarget
+            object.'''
+            return lldb_iter(self, 'GetNumWatchpoints', 'GetWatchpointAtIndex')
+
+        modules = property(get_modules_array, None, doc='''A read only property that returns a list() of lldb.SBModule objects contained in this target. This list is a list all modules that the target currently is tracking (the main executable and all dependent shared libraries).''')
+        module = property(get_modules_access_object, None, doc=r'''A read only property that returns an object that implements python operator overloading with the square brackets().\n    target.module[<int>] allows array access to any modules.\n    target.module[<str>] allows access to modules by basename, full path, or uuid string value.\n    target.module[uuid.UUID()] allows module access by UUID.\n    target.module[re] allows module access using a regular expression that matches the module full path.''')
+        process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that this target owns.''')
+        executable = property(GetExecutable, None, doc='''A read only property that returns an lldb object that represents the main executable module (lldb.SBModule) for this target.''')
+        debugger = property(GetDebugger, None, doc='''A read only property that returns an lldb object that represents the debugger (lldb.SBDebugger) that owns this target.''')
+        num_breakpoints = property(GetNumBreakpoints, None, doc='''A read only property that returns the number of breakpoints that this target has as an integer.''')
+        num_watchpoints = property(GetNumWatchpoints, None, doc='''A read only property that returns the number of watchpoints that this target has as an integer.''')
+        broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this target.''')
+        byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this target.''')
+        addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this target.''')
+        triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this target as a string.''')
+        data_byte_size = property(GetDataByteSize, None, doc='''A read only property that returns the size in host bytes of a byte in the data address space for this target.''')
+        code_byte_size = property(GetCodeByteSize, None, doc='''A read only property that returns the size in host bytes of a byte in the code address space for this target.''')
+        platform = property(GetPlatform, None, doc='''A read only property that returns the platform associated with with this target.''')
+    %}
+#endif
+};
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBThread.i b/src/llvm-project/lldb/bindings/interface/SBThread.i
new file mode 100644
index 0000000..66466b7
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBThread.i
@@ -0,0 +1,461 @@
+//===-- SWIG Interface for SBThread -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a thread of execution. SBProcess contains SBThread(s).
+
+SBThreads can be referred to by their ID, which maps to the system specific thread
+identifier, or by IndexID.  The ID may or may not be unique depending on whether the
+system reuses its thread identifiers.  The IndexID is a monotonically increasing identifier
+that will always uniquely reference a particular thread, and when that thread goes
+away it will not be reused.
+
+SBThread supports frame iteration. For example (from test/python_api/
+lldbutil/iter/TestLLDBIterator.py),
+
+        from lldbutil import print_stacktrace
+        stopped_due_to_breakpoint = False
+        for thread in process:
+            if self.TraceOn():
+                print_stacktrace(thread)
+            ID = thread.GetThreadID()
+            if thread.GetStopReason() == lldb.eStopReasonBreakpoint:
+                stopped_due_to_breakpoint = True
+            for frame in thread:
+                self.assertTrue(frame.GetThread().GetThreadID() == ID)
+                if self.TraceOn():
+                    print frame
+
+        self.assertTrue(stopped_due_to_breakpoint)
+
+See also SBProcess and SBFrame."
+) SBThread;
+class SBThread
+{
+public:
+    //------------------------------------------------------------------
+    // Broadcaster bits.
+    //------------------------------------------------------------------
+    enum
+    {
+        eBroadcastBitStackChanged           = (1 << 0),
+        eBroadcastBitThreadSuspended        = (1 << 1),
+        eBroadcastBitThreadResumed          = (1 << 2),
+        eBroadcastBitSelectedFrameChanged   = (1 << 3),
+        eBroadcastBitThreadSelected         = (1 << 4)
+    };
+
+
+    SBThread ();
+
+    SBThread (const lldb::SBThread &thread);
+
+   ~SBThread();
+
+    static const char *
+    GetBroadcasterClassName ();
+
+    static bool
+    EventIsThreadEvent (const SBEvent &event);
+
+    static SBFrame
+    GetStackFrameFromEvent (const SBEvent &event);
+
+    static SBThread
+    GetThreadFromEvent (const SBEvent &event);
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    void
+    Clear ();
+
+    lldb::StopReason
+    GetStopReason();
+
+    %feature("docstring", "
+    Get the number of words associated with the stop reason.
+    See also GetStopReasonDataAtIndex().") GetStopReasonDataCount;
+    size_t
+    GetStopReasonDataCount();
+
+    %feature("docstring", "
+    Get information associated with a stop reason.
+
+    Breakpoint stop reasons will have data that consists of pairs of
+    breakpoint IDs followed by the breakpoint location IDs (they always come
+    in pairs).
+
+    Stop Reason              Count Data Type
+    ======================== ===== =========================================
+    eStopReasonNone          0
+    eStopReasonTrace         0
+    eStopReasonBreakpoint    N     duple: {breakpoint id, location id}
+    eStopReasonWatchpoint    1     watchpoint id
+    eStopReasonSignal        1     unix signal number
+    eStopReasonException     N     exception data
+    eStopReasonExec          0
+    eStopReasonPlanComplete  0") GetStopReasonDataAtIndex;
+    uint64_t
+    GetStopReasonDataAtIndex(uint32_t idx);
+
+    %feature("autodoc", "
+    Collects a thread's stop reason extended information dictionary and prints it
+    into the SBStream in a JSON format. The format of this JSON dictionary depends
+    on the stop reason and is currently used only for instrumentation plugins.") GetStopReasonExtendedInfoAsJSON;
+    bool
+    GetStopReasonExtendedInfoAsJSON (lldb::SBStream &stream);
+
+    %feature("autodoc", "
+    Returns a collection of historical stack traces that are significant to the
+    current stop reason. Used by ThreadSanitizer, where we provide various stack
+    traces that were involved in a data race or other type of detected issue.") GetStopReasonExtendedBacktraces;
+    SBThreadCollection
+    GetStopReasonExtendedBacktraces (InstrumentationRuntimeType type);
+
+
+    %feature("autodoc", "
+    Pass only an (int)length and expect to get a Python string describing the
+    stop reason.") GetStopDescription;
+    size_t
+    GetStopDescription (char *dst_or_null, size_t dst_len);
+
+    SBValue
+    GetStopReturnValue ();
+
+    %feature("autodoc", "
+    Returns a unique thread identifier (type lldb::tid_t, typically a 64-bit type)
+    for the current SBThread that will remain constant throughout the thread's
+    lifetime in this process and will not be reused by another thread during this
+    process lifetime.  On Mac OS X systems, this is a system-wide unique thread
+    identifier; this identifier is also used by other tools like sample which helps
+    to associate data from those tools with lldb.  See related GetIndexID.")
+    GetThreadID;
+    lldb::tid_t
+    GetThreadID () const;
+
+    %feature("autodoc", "
+    Return the index number for this SBThread.  The index number is the same thing
+    that a user gives as an argument to 'thread select' in the command line lldb.
+    These numbers start at 1 (for the first thread lldb sees in a debug session)
+    and increments up throughout the process lifetime.  An index number will not be
+    reused for a different thread later in a process - thread 1 will always be
+    associated with the same thread.  See related GetThreadID.
+    This method returns a uint32_t index number, takes no arguments.")
+    GetIndexID;
+    uint32_t
+    GetIndexID () const;
+
+    const char *
+    GetName () const;
+
+    %feature("autodoc", "
+    Return the queue name associated with this thread, if any, as a str.
+    For example, with a libdispatch (aka Grand Central Dispatch) queue.") GetQueueName;
+
+    const char *
+    GetQueueName() const;
+
+    %feature("autodoc", "
+    Return the dispatch_queue_id for this thread, if any, as a lldb::queue_id_t.
+    For example, with a libdispatch (aka Grand Central Dispatch) queue.") GetQueueID;
+
+    lldb::queue_id_t
+    GetQueueID() const;
+
+    %feature("docstring", "
+    Takes a path string and a SBStream reference as parameters, returns a bool.
+    Collects the thread's 'info' dictionary from the remote system, uses the path
+    argument to descend into the dictionary to an item of interest, and prints
+    it into the SBStream in a natural format.  Return bool is to indicate if
+    anything was printed into the stream (true) or not (false).") GetInfoItemByPathAsString;
+
+    bool
+    GetInfoItemByPathAsString (const char *path, lldb::SBStream &strm);
+
+    %feature("autodoc", "
+    Return the SBQueue for this thread.  If this thread is not currently associated
+    with a libdispatch queue, the SBQueue object's IsValid() method will return false.
+    If this SBThread is actually a HistoryThread, we may be able to provide QueueID
+    and QueueName, but not provide an SBQueue.  Those individual attributes may have
+    been saved for the HistoryThread without enough information to reconstitute the
+    entire SBQueue at that time.
+    This method takes no arguments, returns an SBQueue.") GetQueue;
+
+    lldb::SBQueue
+    GetQueue () const;
+
+    void
+    StepOver (lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
+
+    %feature("autodoc",
+    "Do a source level single step over in the currently selected thread.") StepOver;
+    void
+    StepOver (lldb::RunMode stop_other_threads, SBError &error);
+
+    void
+    StepInto (lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
+
+    void
+    StepInto (const char *target_name, lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
+
+    %feature("autodoc", "
+    Step the current thread from the current source line to the line given by end_line, stopping if
+    the thread steps into the function given by target_name.  If target_name is None, then stepping will stop
+    in any of the places we would normally stop.") StepInto;
+    void
+    StepInto (const char *target_name,
+              uint32_t end_line,
+              SBError &error,
+              lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
+
+    void
+    StepOut ();
+
+    %feature("autodoc",
+    "Step out of the currently selected thread.") StepOut;
+    void
+    StepOut (SBError &error);
+
+    void
+    StepOutOfFrame (SBFrame &frame);
+
+    %feature("autodoc",
+    "Step out of the specified frame.") StepOutOfFrame;
+    void
+    StepOutOfFrame (SBFrame &frame, SBError &error);
+
+    void
+    StepInstruction(bool step_over);
+
+    %feature("autodoc",
+    "Do an instruction level single step in the currently selected thread.") StepInstruction;
+    void
+    StepInstruction(bool step_over, SBError &error);
+
+    SBError
+    StepOverUntil (lldb::SBFrame &frame,
+                   lldb::SBFileSpec &file_spec,
+                   uint32_t line);
+
+    SBError
+    StepUsingScriptedThreadPlan (const char *script_class_name);
+
+    SBError
+    StepUsingScriptedThreadPlan (const char *script_class_name, bool resume_immediately);
+
+    SBError
+    StepUsingScriptedThreadPlan(const char *script_class_name,
+                                lldb::SBStructuredData &args_data,
+                                bool resume_immediately);
+
+    SBError
+    JumpToLine (lldb::SBFileSpec &file_spec, uint32_t line);
+
+    void
+    RunToAddress (lldb::addr_t addr);
+
+    void
+    RunToAddress (lldb::addr_t addr, SBError &error);
+
+    %feature("autodoc", "
+    Force a return from the frame passed in (and any frames younger than it)
+    without executing any more code in those frames.  If return_value contains
+    a valid SBValue, that will be set as the return value from frame.  Note, at
+    present only scalar return values are supported.") ReturnFromFrame;
+
+    SBError
+    ReturnFromFrame (SBFrame &frame, SBValue &return_value);
+
+    %feature("autodoc", "
+    Unwind the stack frames from the innermost expression evaluation.
+    This API is equivalent to 'thread return -x'.") UnwindInnermostExpression;
+
+    SBError
+    UnwindInnermostExpression();
+
+    %feature("docstring", "
+    LLDB currently supports process centric debugging which means when any
+    thread in a process stops, all other threads are stopped. The Suspend()
+    call here tells our process to suspend a thread and not let it run when
+    the other threads in a process are allowed to run. So when
+    SBProcess::Continue() is called, any threads that aren't suspended will
+    be allowed to run. If any of the SBThread functions for stepping are
+    called (StepOver, StepInto, StepOut, StepInstruction, RunToAddres), the
+    thread will now be allowed to run and these functions will simply return.
+
+    Eventually we plan to add support for thread centric debugging where
+    each thread is controlled individually and each thread would broadcast
+    its state, but we haven't implemented this yet.
+
+    Likewise the SBThread::Resume() call will again allow the thread to run
+    when the process is continued.
+
+    Suspend() and Resume() functions are not currently reference counted, if
+    anyone has the need for them to be reference counted, please let us
+    know.") Suspend;
+    bool
+    Suspend();
+
+    bool
+    Suspend(SBError &error);
+
+    bool
+    Resume ();
+
+    bool
+    Resume (SBError &error);
+
+    bool
+    IsSuspended();
+
+    bool
+    IsStopped();
+
+    uint32_t
+    GetNumFrames ();
+
+    lldb::SBFrame
+    GetFrameAtIndex (uint32_t idx);
+
+    lldb::SBFrame
+    GetSelectedFrame ();
+
+    lldb::SBFrame
+    SetSelectedFrame (uint32_t frame_idx);
+
+    lldb::SBProcess
+    GetProcess ();
+
+    bool
+    GetDescription (lldb::SBStream &description) const;
+
+    %feature("docstring", "
+    Get the description strings for this thread that match what the
+    lldb driver will present, using the thread-format (stop_format==false)
+    or thread-stop-format (stop_format = true).") GetDescription;
+    bool GetDescription(lldb::SBStream &description, bool stop_format) const;
+
+    bool
+    GetStatus (lldb::SBStream &status) const;
+
+    bool
+    operator == (const lldb::SBThread &rhs) const;
+
+    bool
+    operator != (const lldb::SBThread &rhs) const;
+
+    %feature("autodoc","
+    Given an argument of str to specify the type of thread-origin extended
+    backtrace to retrieve, query whether the origin of this thread is
+    available.  An SBThread is retured; SBThread.IsValid will return true
+    if an extended backtrace was available.  The returned SBThread is not
+    a part of the SBProcess' thread list and it cannot be manipulated like
+    normal threads -- you cannot step or resume it, for instance -- it is
+    intended to used primarily for generating a backtrace.  You may request
+    the returned thread's own thread origin in turn.") GetExtendedBacktraceThread;
+    lldb::SBThread
+    GetExtendedBacktraceThread (const char *type);
+
+    %feature("autodoc","
+    Takes no arguments, returns a uint32_t.
+    If this SBThread is an ExtendedBacktrace thread, get the IndexID of the
+    original thread that this ExtendedBacktrace thread represents, if
+    available.  The thread that was running this backtrace in the past may
+    not have been registered with lldb's thread index (if it was created,
+    did its work, and was destroyed without lldb ever stopping execution).
+    In that case, this ExtendedBacktrace thread's IndexID will be returned.") GetExtendedBacktraceOriginatingIndexID;
+    uint32_t
+    GetExtendedBacktraceOriginatingIndexID();
+
+    %feature("autodoc","
+    Returns an SBValue object represeting the current exception for the thread,
+    if there is any. Currently, this works for Obj-C code and returns an SBValue
+    representing the NSException object at the throw site or that's currently
+    being processes.") GetCurrentException;
+    lldb::SBValue
+    GetCurrentException();
+
+    %feature("autodoc","
+    Returns a historical (fake) SBThread representing the stack trace of an
+    exception, if there is one for the thread. Currently, this works for Obj-C
+    code, and can retrieve the throw-site backtrace of an NSException object
+    even when the program is no longer at the throw site.") GetCurrentExceptionBacktrace;
+    lldb::SBThread
+    GetCurrentExceptionBacktrace();
+
+    %feature("autodoc","
+    Takes no arguments, returns a bool.
+    lldb may be able to detect that function calls should not be executed
+    on a given thread at a particular point in time.  It is recommended that
+    this is checked before performing an inferior function call on a given
+    thread.") SafeToCallFunctions;
+    bool
+    SafeToCallFunctions ();
+
+    STRING_EXTENSION(SBThread)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __iter__(self):
+            '''Iterate over all frames in a lldb.SBThread object.'''
+            return lldb_iter(self, 'GetNumFrames', 'GetFrameAtIndex')
+
+        def __len__(self):
+            '''Return the number of frames in a lldb.SBThread object.'''
+            return self.GetNumFrames()
+
+        class frames_access(object):
+            '''A helper object that will lazily hand out frames for a thread when supplied an index.'''
+            def __init__(self, sbthread):
+                self.sbthread = sbthread
+
+            def __len__(self):
+                if self.sbthread:
+                    return int(self.sbthread.GetNumFrames())
+                return 0
+
+            def __getitem__(self, key):
+                if type(key) is int and key < self.sbthread.GetNumFrames():
+                    return self.sbthread.GetFrameAtIndex(key)
+                return None
+
+        def get_frames_access_object(self):
+            '''An accessor function that returns a frames_access() object which allows lazy frame access from a lldb.SBThread object.'''
+            return self.frames_access (self)
+
+        def get_thread_frames(self):
+            '''An accessor function that returns a list() that contains all frames in a lldb.SBThread object.'''
+            frames = []
+            for frame in self:
+                frames.append(frame)
+            return frames
+
+        id = property(GetThreadID, None, doc='''A read only property that returns the thread ID as an integer.''')
+        idx = property(GetIndexID, None, doc='''A read only property that returns the thread index ID as an integer. Thread index ID values start at 1 and increment as threads come and go and can be used to uniquely identify threads.''')
+        return_value = property(GetStopReturnValue, None, doc='''A read only property that returns an lldb object that represents the return value from the last stop (lldb.SBValue) if we just stopped due to stepping out of a function.''')
+        process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that owns this thread.''')
+        num_frames = property(GetNumFrames, None, doc='''A read only property that returns the number of stack frames in this thread as an integer.''')
+        frames = property(get_thread_frames, None, doc='''A read only property that returns a list() of lldb.SBFrame objects for all frames in this thread.''')
+        frame = property(get_frames_access_object, None, doc='''A read only property that returns an object that can be used to access frames as an array ("frame_12 = lldb.thread.frame[12]").''')
+        name = property(GetName, None, doc='''A read only property that returns the name of this thread as a string.''')
+        queue = property(GetQueueName, None, doc='''A read only property that returns the dispatch queue name of this thread as a string.''')
+        queue_id = property(GetQueueID, None, doc='''A read only property that returns the dispatch queue id of this thread as an integer.''')
+        stop_reason = property(GetStopReason, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eStopReason") that represents the reason this thread stopped.''')
+        is_suspended = property(IsSuspended, None, doc='''A read only property that returns a boolean value that indicates if this thread is suspended.''')
+        is_stopped = property(IsStopped, None, doc='''A read only property that returns a boolean value that indicates if this thread is stopped but not exited.''')
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBThreadCollection.i b/src/llvm-project/lldb/bindings/interface/SBThreadCollection.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBThreadCollection.i
rename to src/llvm-project/lldb/bindings/interface/SBThreadCollection.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBThreadPlan.i b/src/llvm-project/lldb/bindings/interface/SBThreadPlan.i
new file mode 100644
index 0000000..36131d5
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBThreadPlan.i
@@ -0,0 +1,137 @@
+//===-- SBThread.h ----------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_SBThreadPlan_h_
+#define LLDB_SBThreadPlan_h_
+
+#include "lldb/API/SBDefines.h"
+
+#include <stdio.h>
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a plan for the execution control of a given thread.
+
+See also SBThread and SBFrame."
+) SBThread;
+
+class SBThreadPlan
+{
+
+friend class lldb_private::ThreadPlan;
+
+public:
+    SBThreadPlan ();
+
+    SBThreadPlan (const lldb::SBThreadPlan &threadPlan);
+
+    SBThreadPlan (const lldb::ThreadPlanSP& lldb_object_sp);
+
+    SBThreadPlan (lldb::SBThread &thread, const char *class_name);
+
+   ~SBThreadPlan ();
+
+    bool
+    IsValid();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    void
+    Clear ();
+
+    lldb::StopReason
+    GetStopReason();
+
+    %feature("docstring", "
+    Get the number of words associated with the stop reason.
+    See also GetStopReasonDataAtIndex().") GetStopReasonDataCount;
+    size_t
+    GetStopReasonDataCount();
+
+    %feature("docstring", "
+    Get information associated with a stop reason.
+
+    Breakpoint stop reasons will have data that consists of pairs of
+    breakpoint IDs followed by the breakpoint location IDs (they always come
+    in pairs).
+
+    Stop Reason              Count Data Type
+    ======================== ===== =========================================
+    eStopReasonNone          0
+    eStopReasonTrace         0
+    eStopReasonBreakpoint    N     duple: {breakpoint id, location id}
+    eStopReasonWatchpoint    1     watchpoint id
+    eStopReasonSignal        1     unix signal number
+    eStopReasonException     N     exception data
+    eStopReasonExec          0
+    eStopReasonPlanComplete  0") GetStopReasonDataAtIndex;
+    uint64_t
+    GetStopReasonDataAtIndex(uint32_t idx);
+
+    SBThread
+    GetThread () const;
+
+    bool
+    GetDescription (lldb::SBStream &description) const;
+
+    void
+    SetPlanComplete (bool success);
+
+    bool
+    IsPlanComplete();
+
+    bool
+    IsPlanStale();
+
+    SBThreadPlan
+    QueueThreadPlanForStepOverRange (SBAddress &start_address,
+                                     lldb::addr_t range_size);
+
+    SBThreadPlan
+    QueueThreadPlanForStepInRange (SBAddress &start_address,
+                                   lldb::addr_t range_size);
+
+    SBThreadPlan
+    QueueThreadPlanForStepOut (uint32_t frame_idx_to_step_to, bool first_insn = false);
+
+    SBThreadPlan
+    QueueThreadPlanForRunToAddress (SBAddress address);
+
+    SBThreadPlan
+    QueueThreadPlanForStepScripted(const char *script_class_name);
+
+    SBThreadPlan
+    QueueThreadPlanForStepScripted(const char *script_class_name,
+                                   SBError &error);
+    SBThreadPlan
+    QueueThreadPlanForStepScripted(const char *script_class_name,
+                                   SBStructuredData &args_data,
+                                   SBError &error);
+
+
+protected:
+    friend class SBBreakpoint;
+    friend class SBBreakpointLocation;
+    friend class SBFrame;
+    friend class SBProcess;
+    friend class SBDebugger;
+    friend class SBValue;
+    friend class lldb_private::QueueImpl;
+    friend class SBQueueItem;
+
+private:
+    lldb::ThreadPlanSP m_opaque_sp;
+};
+
+} // namespace lldb
+
+#endif  // LLDB_SBThreadPlan_h_
diff --git a/src/llvm-project/lldb/scripts/interface/SBTrace.i b/src/llvm-project/lldb/bindings/interface/SBTrace.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBTrace.i
rename to src/llvm-project/lldb/bindings/interface/SBTrace.i
diff --git a/src/llvm-project/lldb/scripts/interface/SBTraceOptions.i b/src/llvm-project/lldb/bindings/interface/SBTraceOptions.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBTraceOptions.i
rename to src/llvm-project/lldb/bindings/interface/SBTraceOptions.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBType.i b/src/llvm-project/lldb/bindings/interface/SBType.i
new file mode 100644
index 0000000..3cd8245
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBType.i
@@ -0,0 +1,487 @@
+//===-- SWIG Interface for SBType -------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+    %feature("docstring",
+"Represents a member of a type in lldb.") SBTypeMember;
+
+class SBTypeMember
+{
+public:
+    SBTypeMember ();
+
+    SBTypeMember (const lldb::SBTypeMember& rhs);
+
+    ~SBTypeMember();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    const char *
+    GetName ();
+
+    lldb::SBType
+    GetType ();
+
+    uint64_t
+    GetOffsetInBytes();
+
+    uint64_t
+    GetOffsetInBits();
+
+    bool
+    IsBitfield();
+
+    uint32_t
+    GetBitfieldSizeInBits();
+
+    STRING_EXTENSION_LEVEL(SBTypeMember, lldb::eDescriptionLevelBrief)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        name = property(GetName, None, doc='''A read only property that returns the name for this member as a string.''')
+        type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the type (lldb.SBType) for this member.''')
+        byte_offset = property(GetOffsetInBytes, None, doc='''A read only property that returns offset in bytes for this member as an integer.''')
+        bit_offset = property(GetOffsetInBits, None, doc='''A read only property that returns offset in bits for this member as an integer.''')
+        is_bitfield = property(IsBitfield, None, doc='''A read only property that returns true if this member is a bitfield.''')
+        bitfield_bit_size = property(GetBitfieldSizeInBits, None, doc='''A read only property that returns the bitfield size in bits for this member as an integer, or zero if this member is not a bitfield.''')
+    %}
+#endif
+
+protected:
+    std::unique_ptr<lldb_private::TypeMemberImpl> m_opaque_ap;
+};
+
+class SBTypeMemberFunction
+{
+public:
+    SBTypeMemberFunction ();
+
+    SBTypeMemberFunction (const lldb::SBTypeMemberFunction& rhs);
+
+    ~SBTypeMemberFunction();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    const char *
+    GetName ();
+
+    const char *
+    GetDemangledName ();
+
+    const char *
+    GetMangledName ();
+
+    lldb::SBType
+    GetType ();
+
+    lldb::SBType
+    GetReturnType ();
+
+    uint32_t
+    GetNumberOfArguments ();
+
+    lldb::SBType
+    GetArgumentTypeAtIndex (uint32_t);
+
+    lldb::MemberFunctionKind
+    GetKind();
+
+    bool
+    GetDescription (lldb::SBStream &description,
+                    lldb::DescriptionLevel description_level);
+
+    STRING_EXTENSION_LEVEL(SBTypeMemberFunction, lldb::eDescriptionLevelBrief)
+protected:
+    lldb::TypeMemberFunctionImplSP m_opaque_sp;
+};
+
+%feature("docstring",
+"Represents a data type in lldb.  The FindFirstType() method of SBTarget/SBModule
+returns a SBType.
+
+SBType supports the eq/ne operator. For example,
+
+main.cpp:
+
+class Task {
+public:
+    int id;
+    Task *next;
+    Task(int i, Task *n):
+        id(i),
+        next(n)
+    {}
+};
+
+int main (int argc, char const *argv[])
+{
+    Task *task_head = new Task(-1, NULL);
+    Task *task1 = new Task(1, NULL);
+    Task *task2 = new Task(2, NULL);
+    Task *task3 = new Task(3, NULL); // Orphaned.
+    Task *task4 = new Task(4, NULL);
+    Task *task5 = new Task(5, NULL);
+
+    task_head->next = task1;
+    task1->next = task2;
+    task2->next = task4;
+    task4->next = task5;
+
+    int total = 0;
+    Task *t = task_head;
+    while (t != NULL) {
+        if (t->id >= 0)
+            ++total;
+        t = t->next;
+    }
+    printf('We have a total number of %d tasks\\n', total);
+
+    // This corresponds to an empty task list.
+    Task *empty_task_head = new Task(-1, NULL);
+
+    return 0; // Break at this line
+}
+
+find_type.py:
+
+        # Get the type 'Task'.
+        task_type = target.FindFirstType('Task')
+        self.assertTrue(task_type)
+
+        # Get the variable 'task_head'.
+        frame0.FindVariable('task_head')
+        task_head_type = task_head.GetType()
+        self.assertTrue(task_head_type.IsPointerType())
+
+        # task_head_type is 'Task *'.
+        task_pointer_type = task_type.GetPointerType()
+        self.assertTrue(task_head_type == task_pointer_type)
+
+        # Get the child mmember 'id' from 'task_head'.
+        id = task_head.GetChildMemberWithName('id')
+        id_type = id.GetType()
+
+        # SBType.GetBasicType() takes an enum 'BasicType' (lldb-enumerations.h).
+        int_type = id_type.GetBasicType(lldb.eBasicTypeInt)
+        # id_type and int_type should be the same type!
+        self.assertTrue(id_type == int_type)
+
+...") SBType;
+class SBType
+{
+public:
+    SBType ();
+
+    SBType (const lldb::SBType &rhs);
+
+    ~SBType ();
+
+    bool
+    IsValid();
+
+    explicit operator bool() const;
+
+    uint64_t
+    GetByteSize();
+
+    bool
+    IsPointerType();
+
+    bool
+    IsReferenceType();
+
+    bool
+    IsFunctionType ();
+
+    bool
+    IsPolymorphicClass ();
+
+    bool
+    IsArrayType ();
+
+    bool
+    IsVectorType ();
+
+    bool
+    IsTypedefType ();
+
+    bool
+    IsAnonymousType ();
+
+    lldb::SBType
+    GetPointerType();
+
+    lldb::SBType
+    GetPointeeType();
+
+    lldb::SBType
+    GetReferenceType();
+
+    lldb::SBType
+    SBType::GetTypedefedType();
+
+    lldb::SBType
+    GetDereferencedType();
+
+    lldb::SBType
+    GetUnqualifiedType();
+
+    lldb::SBType
+    GetCanonicalType();
+
+    lldb::SBType
+    GetArrayElementType ();
+
+    lldb::SBType
+    GetArrayType (uint64_t size);
+
+    lldb::SBType
+    GetVectorElementType ();
+
+    lldb::BasicType
+    GetBasicType();
+
+    lldb::SBType
+    GetBasicType (lldb::BasicType type);
+
+    uint32_t
+    GetNumberOfFields ();
+
+    uint32_t
+    GetNumberOfDirectBaseClasses ();
+
+    uint32_t
+    GetNumberOfVirtualBaseClasses ();
+
+    lldb::SBTypeMember
+    GetFieldAtIndex (uint32_t idx);
+
+    lldb::SBTypeMember
+    GetDirectBaseClassAtIndex (uint32_t idx);
+
+    lldb::SBTypeMember
+    GetVirtualBaseClassAtIndex (uint32_t idx);
+
+    lldb::SBTypeEnumMemberList
+    GetEnumMembers();
+
+    const char*
+    GetName();
+
+    const char *
+    GetDisplayTypeName ();
+
+    lldb::TypeClass
+    GetTypeClass ();
+
+    uint32_t
+    GetNumberOfTemplateArguments ();
+
+    lldb::SBType
+    GetTemplateArgumentType (uint32_t idx);
+
+    lldb::TemplateArgumentKind
+    GetTemplateArgumentKind (uint32_t idx);
+
+    lldb::SBType
+    GetFunctionReturnType ();
+
+    lldb::SBTypeList
+    GetFunctionArgumentTypes ();
+
+    uint32_t
+    GetNumberOfMemberFunctions ();
+
+    lldb::SBTypeMemberFunction
+    GetMemberFunctionAtIndex (uint32_t idx);
+
+    bool
+    IsTypeComplete ();
+
+    uint32_t
+    GetTypeFlags ();
+
+    bool operator==(lldb::SBType &rhs);
+
+    bool operator!=(lldb::SBType &rhs);
+
+    STRING_EXTENSION_LEVEL(SBType, lldb::eDescriptionLevelBrief)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def template_arg_array(self):
+            num_args = self.num_template_args
+            if num_args:
+                template_args = []
+                for i in range(num_args):
+                    template_args.append(self.GetTemplateArgumentType(i))
+                return template_args
+            return None
+
+        name = property(GetName, None, doc='''A read only property that returns the name for this type as a string.''')
+        size = property(GetByteSize, None, doc='''A read only property that returns size in bytes for this type as an integer.''')
+        is_pointer = property(IsPointerType, None, doc='''A read only property that returns a boolean value that indicates if this type is a pointer type.''')
+        is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a reference type.''')
+        is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a function type.''')
+        num_fields = property(GetNumberOfFields, None, doc='''A read only property that returns number of fields in this type as an integer.''')
+        num_bases = property(GetNumberOfDirectBaseClasses, None, doc='''A read only property that returns number of direct base classes in this type as an integer.''')
+        num_vbases = property(GetNumberOfVirtualBaseClasses, None, doc='''A read only property that returns number of virtual base classes in this type as an integer.''')
+        num_template_args = property(GetNumberOfTemplateArguments, None, doc='''A read only property that returns number of template arguments in this type as an integer.''')
+        template_args = property(template_arg_array, None, doc='''A read only property that returns a list() of lldb.SBType objects that represent all template arguments in this type.''')
+        type = property(GetTypeClass, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eTypeClass") that represents a classification for this type.''')
+        is_complete = property(IsTypeComplete, None, doc='''A read only property that returns a boolean value that indicates if this type is a complete type (True) or a forward declaration (False).''')
+
+        def get_bases_array(self):
+            '''An accessor function that returns a list() that contains all direct base classes in a lldb.SBType object.'''
+            bases = []
+            for idx in range(self.GetNumberOfDirectBaseClasses()):
+                bases.append(self.GetDirectBaseClassAtIndex(idx))
+            return bases
+
+        def get_vbases_array(self):
+            '''An accessor function that returns a list() that contains all fields in a lldb.SBType object.'''
+            vbases = []
+            for idx in range(self.GetNumberOfVirtualBaseClasses()):
+                vbases.append(self.GetVirtualBaseClassAtIndex(idx))
+            return vbases
+
+        def get_fields_array(self):
+            '''An accessor function that returns a list() that contains all fields in a lldb.SBType object.'''
+            fields = []
+            for idx in range(self.GetNumberOfFields()):
+                fields.append(self.GetFieldAtIndex(idx))
+            return fields
+
+        def get_members_array(self):
+            '''An accessor function that returns a list() that contains all members (base classes and fields) in a lldb.SBType object in ascending bit offset order.'''
+            members = []
+            bases = self.get_bases_array()
+            fields = self.get_fields_array()
+            vbases = self.get_vbases_array()
+            for base in bases:
+                bit_offset = base.bit_offset
+                added = False
+                for idx, member in enumerate(members):
+                    if member.bit_offset > bit_offset:
+                        members.insert(idx, base)
+                        added = True
+                        break
+                if not added:
+                    members.append(base)
+            for vbase in vbases:
+                bit_offset = vbase.bit_offset
+                added = False
+                for idx, member in enumerate(members):
+                    if member.bit_offset > bit_offset:
+                        members.insert(idx, vbase)
+                        added = True
+                        break
+                if not added:
+                    members.append(vbase)
+            for field in fields:
+                bit_offset = field.bit_offset
+                added = False
+                for idx, member in enumerate(members):
+                    if member.bit_offset > bit_offset:
+                        members.insert(idx, field)
+                        added = True
+                        break
+                if not added:
+                    members.append(field)
+            return members
+
+        def get_enum_members_array(self):
+            '''An accessor function that returns a list() that contains all enum members in an lldb.SBType object.'''
+            enum_members_list = []
+            sb_enum_members = self.GetEnumMembers()
+            for idx in range(sb_enum_members.GetSize()):
+                enum_members_list.append(sb_enum_members.GetTypeEnumMemberAtIndex(idx))
+            return enum_members_list
+
+        bases = property(get_bases_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the direct base classes for this type.''')
+        vbases = property(get_vbases_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the virtual base classes for this type.''')
+        fields = property(get_fields_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the fields for this type.''')
+        members = property(get_members_array, None, doc='''A read only property that returns a list() of all lldb.SBTypeMember objects that represent all of the base classes, virtual base classes and fields for this type in ascending bit offset order.''')
+        enum_members = property(get_enum_members_array, None, doc='''A read only property that returns a list() of all lldb.SBTypeEnumMember objects that represent the enum members for this type.''')
+        %}
+#endif
+
+};
+
+%feature("docstring",
+"Represents a list of SBTypes.  The FindTypes() method of SBTarget/SBModule
+returns a SBTypeList.
+
+SBTypeList supports SBType iteration. For example,
+
+main.cpp:
+
+class Task {
+public:
+    int id;
+    Task *next;
+    Task(int i, Task *n):
+        id(i),
+        next(n)
+    {}
+};
+
+...
+
+find_type.py:
+
+        # Get the type 'Task'.
+        type_list = target.FindTypes('Task')
+        self.assertTrue(len(type_list) == 1)
+        # To illustrate the SBType iteration.
+        for type in type_list:
+            # do something with type
+
+...") SBTypeList;
+class SBTypeList
+{
+public:
+    SBTypeList();
+
+    bool
+    IsValid();
+
+    explicit operator bool() const;
+
+    void
+    Append (lldb::SBType type);
+
+    lldb::SBType
+    GetTypeAtIndex (uint32_t index);
+
+    uint32_t
+    GetSize();
+
+    ~SBTypeList();
+
+#ifdef SWIGPYTHON
+    %pythoncode%{
+    def __iter__(self):
+        '''Iterate over all types in a lldb.SBTypeList object.'''
+        return lldb_iter(self, 'GetSize', 'GetTypeAtIndex')
+
+    def __len__(self):
+        '''Return the number of types in a lldb.SBTypeList object.'''
+        return self.GetSize()
+    %}
+#endif
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBTypeCategory.i b/src/llvm-project/lldb/bindings/interface/SBTypeCategory.i
new file mode 100644
index 0000000..b762bf8
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBTypeCategory.i
@@ -0,0 +1,225 @@
+//===-- SWIG Interface for SBTypeCategory---------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+    %feature("docstring",
+    "Represents a category that can contain formatters for types.") SBTypeCategory;
+
+    class SBTypeCategory
+    {
+    public:
+
+        SBTypeCategory();
+
+        SBTypeCategory (const lldb::SBTypeCategory &rhs);
+
+        ~SBTypeCategory ();
+
+        bool
+        IsValid() const;
+
+        explicit operator bool() const;
+
+        bool
+        GetEnabled ();
+
+        void
+        SetEnabled (bool);
+
+        const char*
+        GetName();
+
+        lldb::LanguageType
+        GetLanguageAtIndex (uint32_t idx);
+
+        uint32_t
+        GetNumLanguages ();
+
+        void
+        AddLanguage (lldb::LanguageType language);
+
+        bool
+        GetDescription (lldb::SBStream &description,
+                        lldb::DescriptionLevel description_level);
+
+        uint32_t
+        GetNumFormats ();
+
+        uint32_t
+        GetNumSummaries ();
+
+        uint32_t
+        GetNumFilters ();
+
+        uint32_t
+        GetNumSynthetics ();
+
+        lldb::SBTypeNameSpecifier
+        GetTypeNameSpecifierForFilterAtIndex (uint32_t);
+
+        lldb::SBTypeNameSpecifier
+        GetTypeNameSpecifierForFormatAtIndex (uint32_t);
+
+        lldb::SBTypeNameSpecifier
+        GetTypeNameSpecifierForSummaryAtIndex (uint32_t);
+
+        lldb::SBTypeNameSpecifier
+        GetTypeNameSpecifierForSyntheticAtIndex (uint32_t);
+
+        lldb::SBTypeFilter
+        GetFilterForType (lldb::SBTypeNameSpecifier);
+
+        lldb::SBTypeFormat
+        GetFormatForType (lldb::SBTypeNameSpecifier);
+
+        lldb::SBTypeSummary
+        GetSummaryForType (lldb::SBTypeNameSpecifier);
+
+        lldb::SBTypeSynthetic
+        GetSyntheticForType (lldb::SBTypeNameSpecifier);
+
+        lldb::SBTypeFilter
+        GetFilterAtIndex (uint32_t);
+
+        lldb::SBTypeFormat
+        GetFormatAtIndex (uint32_t);
+
+        lldb::SBTypeSummary
+        GetSummaryAtIndex (uint32_t);
+
+        lldb::SBTypeSynthetic
+        GetSyntheticAtIndex (uint32_t);
+
+        bool
+        AddTypeFormat (lldb::SBTypeNameSpecifier,
+                       lldb::SBTypeFormat);
+
+        bool
+        DeleteTypeFormat (lldb::SBTypeNameSpecifier);
+
+        bool
+        AddTypeSummary (lldb::SBTypeNameSpecifier,
+                        lldb::SBTypeSummary);
+
+        bool
+        DeleteTypeSummary (lldb::SBTypeNameSpecifier);
+
+        bool
+        AddTypeFilter (lldb::SBTypeNameSpecifier,
+                       lldb::SBTypeFilter);
+
+        bool
+        DeleteTypeFilter (lldb::SBTypeNameSpecifier);
+
+        bool
+        AddTypeSynthetic (lldb::SBTypeNameSpecifier,
+                          lldb::SBTypeSynthetic);
+
+        bool
+        DeleteTypeSynthetic (lldb::SBTypeNameSpecifier);
+
+        STRING_EXTENSION_LEVEL(SBTypeCategory, lldb::eDescriptionLevelBrief)
+
+#ifdef SWIGPYTHON
+        %pythoncode %{
+
+            class formatters_access_class(object):
+                '''A helper object that will lazily hand out formatters for a specific category.'''
+                def __init__(self, sbcategory, get_count_function, get_at_index_function, get_by_name_function):
+                    self.sbcategory = sbcategory
+                    self.get_count_function = get_count_function
+                    self.get_at_index_function = get_at_index_function
+                    self.get_by_name_function = get_by_name_function
+                    self.regex_type = type(re.compile('.'))
+
+
+                def __len__(self):
+                    if self.sbcategory and self.get_count_function:
+                        return int(self.get_count_function(self.sbcategory))
+                    return 0
+
+                def __getitem__(self, key):
+                    num_items = len(self)
+                    if type(key) is int:
+                        if key < num_items:
+                            return self.get_at_index_function(self.sbcategory,key)
+                    elif type(key) is str:
+                        return self.get_by_name_function(self.sbcategory,SBTypeNameSpecifier(key))
+                    elif isinstance(key,self.regex_type):
+                        return self.get_by_name_function(self.sbcategory,SBTypeNameSpecifier(key.pattern,True))
+                    else:
+                        print("error: unsupported item type: %s" % type(key))
+                    return None
+
+            def get_formats_access_object(self):
+                '''An accessor function that returns an accessor object which allows lazy format access from a lldb.SBTypeCategory object.'''
+                return self.formatters_access_class (self,self.__class__.GetNumFormats,self.__class__.GetFormatAtIndex,self.__class__.GetFormatForType)
+
+            def get_formats_array(self):
+                '''An accessor function that returns a list() that contains all formats in a lldb.SBCategory object.'''
+                formats = []
+                for idx in range(self.GetNumFormats()):
+                    formats.append(self.GetFormatAtIndex(idx))
+                return formats
+
+            def get_summaries_access_object(self):
+                '''An accessor function that returns an accessor object which allows lazy summary access from a lldb.SBTypeCategory object.'''
+                return self.formatters_access_class (self,self.__class__.GetNumSummaries,self.__class__.GetSummaryAtIndex,self.__class__.GetSummaryForType)
+
+            def get_summaries_array(self):
+                '''An accessor function that returns a list() that contains all summaries in a lldb.SBCategory object.'''
+                summaries = []
+                for idx in range(self.GetNumSummaries()):
+                    summaries.append(self.GetSummaryAtIndex(idx))
+                return summaries
+
+            def get_synthetics_access_object(self):
+                '''An accessor function that returns an accessor object which allows lazy synthetic children provider access from a lldb.SBTypeCategory object.'''
+                return self.formatters_access_class (self,self.__class__.GetNumSynthetics,self.__class__.GetSyntheticAtIndex,self.__class__.GetSyntheticForType)
+
+            def get_synthetics_array(self):
+                '''An accessor function that returns a list() that contains all synthetic children providers in a lldb.SBCategory object.'''
+                synthetics = []
+                for idx in range(self.GetNumSynthetics()):
+                    synthetics.append(self.GetSyntheticAtIndex(idx))
+                return synthetics
+
+            def get_filters_access_object(self):
+                '''An accessor function that returns an accessor object which allows lazy filter access from a lldb.SBTypeCategory object.'''
+                return self.formatters_access_class (self,self.__class__.GetNumFilters,self.__class__.GetFilterAtIndex,self.__class__.GetFilterForType)
+
+            def get_filters_array(self):
+                '''An accessor function that returns a list() that contains all filters in a lldb.SBCategory object.'''
+                filters = []
+                for idx in range(self.GetNumFilters()):
+                    filters.append(self.GetFilterAtIndex(idx))
+                return filters
+
+            formats = property(get_formats_array, None, doc='''A read only property that returns a list() of lldb.SBTypeFormat objects contained in this category''')
+            format = property(get_formats_access_object, None, doc=r'''A read only property that returns an object that you can use to look for formats by index or type name.''')
+            summaries = property(get_summaries_array, None, doc='''A read only property that returns a list() of lldb.SBTypeSummary objects contained in this category''')
+            summary = property(get_summaries_access_object, None, doc=r'''A read only property that returns an object that you can use to look for summaries by index or type name or regular expression.''')
+            filters = property(get_filters_array, None, doc='''A read only property that returns a list() of lldb.SBTypeFilter objects contained in this category''')
+            filter = property(get_filters_access_object, None, doc=r'''A read only property that returns an object that you can use to look for filters by index or type name or regular expression.''')
+            synthetics = property(get_synthetics_array, None, doc='''A read only property that returns a list() of lldb.SBTypeSynthetic objects contained in this category''')
+            synthetic = property(get_synthetics_access_object, None, doc=r'''A read only property that returns an object that you can use to look for synthetic children provider by index or type name or regular expression.''')
+            num_formats = property(GetNumFormats, None)
+            num_summaries = property(GetNumSummaries, None)
+            num_filters = property(GetNumFilters, None)
+            num_synthetics = property(GetNumSynthetics, None)
+            name = property(GetName, None)
+            enabled = property(GetEnabled, SetEnabled)
+        %}
+#endif
+
+    };
+
+
+} // namespace lldb
+
diff --git a/src/llvm-project/lldb/bindings/interface/SBTypeEnumMember.i b/src/llvm-project/lldb/bindings/interface/SBTypeEnumMember.i
new file mode 100644
index 0000000..006bdea
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBTypeEnumMember.i
@@ -0,0 +1,107 @@
+//===-- SWIG Interface for SBTypeEnumMember ---------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature(
+    "docstring",
+    "Represents a member of an enum in lldb."
+) SBTypeEnumMember;
+
+class SBTypeEnumMember
+{
+public:
+    SBTypeEnumMember ();
+
+    SBTypeEnumMember (const SBTypeEnumMember& rhs);
+
+    ~SBTypeEnumMember();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    int64_t
+    GetValueAsSigned();
+
+    uint64_t
+    GetValueAsUnsigned();
+
+    const char *
+    GetName ();
+
+    lldb::SBType
+    GetType ();
+
+    bool
+    GetDescription (lldb::SBStream &description,
+                    lldb::DescriptionLevel description_level);
+
+    STRING_EXTENSION_LEVEL(SBTypeEnumMember, lldb::eDescriptionLevelBrief)
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        name = property(GetName, None, doc='''A read only property that returns the name for this enum member as a string.''')
+        type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the type (lldb.SBType) for this enum member.''')
+        signed = property(GetValueAsSigned, None, doc='''A read only property that returns the value of this enum member as a signed integer.''')
+        unsigned = property(GetValueAsUnsigned, None, doc='''A read only property that returns the value of this enum member as a unsigned integer.''')
+    %}
+#endif
+
+protected:
+    friend class SBType;
+    friend class SBTypeEnumMemberList;
+
+    void
+    reset (lldb_private::TypeEnumMemberImpl *);
+
+    lldb_private::TypeEnumMemberImpl &
+    ref ();
+
+    const lldb_private::TypeEnumMemberImpl &
+    ref () const;
+
+    lldb::TypeEnumMemberImplSP m_opaque_sp;
+
+    SBTypeEnumMember (const lldb::TypeEnumMemberImplSP &);
+};
+
+%feature(
+    "docstring",
+    "Represents a list of SBTypeEnumMembers."
+) SBTypeEnumMemberList;
+
+class SBTypeEnumMemberList
+{
+public:
+    SBTypeEnumMemberList();
+
+    SBTypeEnumMemberList(const SBTypeEnumMemberList& rhs);
+
+    ~SBTypeEnumMemberList();
+
+    bool
+    IsValid();
+
+    explicit operator bool() const;
+
+    void
+    Append (SBTypeEnumMember entry);
+
+    SBTypeEnumMember
+    GetTypeEnumMemberAtIndex (uint32_t index);
+
+    uint32_t
+    GetSize();
+
+
+private:
+    std::unique_ptr<lldb_private::TypeEnumMemberListImpl> m_opaque_ap;
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBTypeFilter.i b/src/llvm-project/lldb/bindings/interface/SBTypeFilter.i
new file mode 100644
index 0000000..c1d282c
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBTypeFilter.i
@@ -0,0 +1,75 @@
+//===-- SWIG Interface for SBTypeFilter----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+    %feature("docstring",
+    "Represents a filter that can be associated to one or more types.") SBTypeFilter;
+
+    class SBTypeFilter
+    {
+        public:
+
+        SBTypeFilter();
+
+        SBTypeFilter (uint32_t options);
+
+        SBTypeFilter (const lldb::SBTypeFilter &rhs);
+
+        ~SBTypeFilter ();
+
+        bool
+        IsValid() const;
+
+        explicit operator bool() const;
+
+        bool
+        IsEqualTo (lldb::SBTypeFilter &rhs);
+
+        uint32_t
+        GetNumberOfExpressionPaths ();
+
+        const char*
+        GetExpressionPathAtIndex (uint32_t i);
+
+        bool
+        ReplaceExpressionPathAtIndex (uint32_t i, const char* item);
+
+        void
+        AppendExpressionPath (const char* item);
+
+        void
+        Clear();
+
+        uint32_t
+        GetOptions();
+
+        void
+        SetOptions (uint32_t);
+
+        bool
+        GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level);
+
+        bool
+        operator == (lldb::SBTypeFilter &rhs);
+
+        bool
+        operator != (lldb::SBTypeFilter &rhs);
+
+        STRING_EXTENSION_LEVEL(SBTypeFilter, lldb::eDescriptionLevelBrief)
+
+#ifdef SWIGPYTHON
+        %pythoncode %{
+            options = property(GetOptions, SetOptions)
+            count = property(GetNumberOfExpressionPaths)
+        %}
+#endif
+
+    };
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBTypeFormat.i b/src/llvm-project/lldb/bindings/interface/SBTypeFormat.i
new file mode 100644
index 0000000..765a2a7
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBTypeFormat.i
@@ -0,0 +1,77 @@
+//===-- SWIG Interface for SBTypeFormat----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+    %feature("docstring",
+             "Represents a format that can be associated to one or more types.") SBTypeFormat;
+
+    class SBTypeFormat
+    {
+    public:
+
+        SBTypeFormat();
+
+        SBTypeFormat (lldb::Format format, uint32_t options = 0);
+
+        SBTypeFormat (const char* type, uint32_t options = 0);
+
+        SBTypeFormat (const lldb::SBTypeFormat &rhs);
+
+        ~SBTypeFormat ();
+
+        bool
+        IsValid() const;
+
+        explicit operator bool() const;
+
+        bool
+        IsEqualTo (lldb::SBTypeFormat &rhs);
+
+        lldb::Format
+        GetFormat ();
+
+        const char*
+        GetTypeName ();
+
+        uint32_t
+        GetOptions();
+
+        void
+        SetFormat (lldb::Format);
+
+        void
+        SetTypeName (const char*);
+
+        void
+        SetOptions (uint32_t);
+
+        bool
+        GetDescription (lldb::SBStream &description,
+                        lldb::DescriptionLevel description_level);
+
+        bool
+        operator == (lldb::SBTypeFormat &rhs);
+
+        bool
+        operator != (lldb::SBTypeFormat &rhs);
+
+        STRING_EXTENSION_LEVEL(SBTypeFormat, lldb::eDescriptionLevelBrief)
+
+#ifdef SWIGPYTHON
+        %pythoncode %{
+            format = property(GetFormat, SetFormat)
+            options = property(GetOptions, SetOptions)
+        %}
+#endif
+
+    };
+
+
+} // namespace lldb
+
diff --git a/src/llvm-project/lldb/bindings/interface/SBTypeNameSpecifier.i b/src/llvm-project/lldb/bindings/interface/SBTypeNameSpecifier.i
new file mode 100644
index 0000000..772f7c1
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBTypeNameSpecifier.i
@@ -0,0 +1,69 @@
+//===-- SWIG Interface for SBTypeNameSpecifier---------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+    %feature("docstring",
+    "Represents a general way to provide a type name to LLDB APIs.") SBTypeNameSpecifier;
+
+    class SBTypeNameSpecifier
+    {
+    public:
+
+        SBTypeNameSpecifier();
+
+        SBTypeNameSpecifier (const char* name,
+                             bool is_regex = false);
+
+        SBTypeNameSpecifier (SBType type);
+
+        SBTypeNameSpecifier (const lldb::SBTypeNameSpecifier &rhs);
+
+        ~SBTypeNameSpecifier ();
+
+        bool
+        IsValid() const;
+
+        explicit operator bool() const;
+
+        bool
+        IsEqualTo (lldb::SBTypeNameSpecifier &rhs);
+
+        const char*
+        GetName();
+
+        lldb::SBType
+        GetType ();
+
+        bool
+        IsRegex();
+
+        bool
+        GetDescription (lldb::SBStream &description,
+                        lldb::DescriptionLevel description_level);
+
+        bool
+        operator == (lldb::SBTypeNameSpecifier &rhs);
+
+        bool
+        operator != (lldb::SBTypeNameSpecifier &rhs);
+
+        STRING_EXTENSION_LEVEL(SBTypeNameSpecifier, lldb::eDescriptionLevelBrief)
+
+#ifdef SWIGPYTHON
+        %pythoncode %{
+            name = property(GetName)
+            is_regex = property(IsRegex)
+        %}
+#endif
+
+
+    };
+
+} // namespace lldb
+
diff --git a/src/llvm-project/lldb/bindings/interface/SBTypeSummary.i b/src/llvm-project/lldb/bindings/interface/SBTypeSummary.i
new file mode 100644
index 0000000..adcc79b
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBTypeSummary.i
@@ -0,0 +1,119 @@
+//===-- SWIG Interface for SBTypeSummary---------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+    class SBTypeSummaryOptions
+    {
+    public:
+        SBTypeSummaryOptions();
+
+        SBTypeSummaryOptions (const lldb::SBTypeSummaryOptions &rhs);
+
+        ~SBTypeSummaryOptions ();
+
+        bool
+        IsValid ();
+
+        explicit operator bool() const;
+
+        lldb::LanguageType
+        GetLanguage ();
+
+        lldb::TypeSummaryCapping
+        GetCapping ();
+
+        void
+        SetLanguage (lldb::LanguageType);
+
+        void
+        SetCapping (lldb::TypeSummaryCapping);
+    };
+
+    %feature("docstring",
+    "Represents a summary that can be associated to one or more types.") SBTypeSummary;
+
+    class SBTypeSummary
+    {
+    public:
+
+        SBTypeSummary();
+
+        static SBTypeSummary
+        CreateWithSummaryString (const char* data, uint32_t options = 0);
+
+        static SBTypeSummary
+        CreateWithFunctionName (const char* data, uint32_t options = 0);
+
+        static SBTypeSummary
+        CreateWithScriptCode (const char* data, uint32_t options = 0);
+
+        SBTypeSummary (const lldb::SBTypeSummary &rhs);
+
+        ~SBTypeSummary ();
+
+        bool
+        IsValid() const;
+
+        explicit operator bool() const;
+
+        bool
+        IsEqualTo (lldb::SBTypeSummary &rhs);
+
+        bool
+        IsFunctionCode();
+
+        bool
+        IsFunctionName();
+
+        bool
+        IsSummaryString();
+
+        const char*
+        GetData ();
+
+        void
+        SetSummaryString (const char* data);
+
+        void
+        SetFunctionName (const char* data);
+
+        void
+        SetFunctionCode (const char* data);
+
+        uint32_t
+        GetOptions ();
+
+        void
+        SetOptions (uint32_t);
+
+        bool
+        GetDescription (lldb::SBStream &description,
+                        lldb::DescriptionLevel description_level);
+
+        bool
+        operator == (lldb::SBTypeSummary &rhs);
+
+        bool
+        operator != (lldb::SBTypeSummary &rhs);
+
+        STRING_EXTENSION_LEVEL(SBTypeSummary, lldb::eDescriptionLevelBrief)
+
+#ifdef SWIGPYTHON
+        %pythoncode %{
+            options = property(GetOptions, SetOptions)
+            is_summary_string = property(IsSummaryString)
+            is_function_name = property(IsFunctionName)
+            is_function_name = property(IsFunctionCode)
+            summary_data = property(GetData)
+        %}
+#endif
+
+    };
+
+} // namespace lldb
+
diff --git a/src/llvm-project/lldb/bindings/interface/SBTypeSynthetic.i b/src/llvm-project/lldb/bindings/interface/SBTypeSynthetic.i
new file mode 100644
index 0000000..f57139e
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBTypeSynthetic.i
@@ -0,0 +1,78 @@
+//===-- SWIG Interface for SBTypeSynthetic-------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+    %feature("docstring",
+    "Represents a summary that can be associated to one or more types.") SBTypeSynthetic;
+
+    class SBTypeSynthetic
+    {
+    public:
+
+        SBTypeSynthetic();
+
+        static lldb::SBTypeSynthetic
+        CreateWithClassName (const char* data, uint32_t options = 0);
+
+        static lldb::SBTypeSynthetic
+        CreateWithScriptCode (const char* data, uint32_t options = 0);
+
+        SBTypeSynthetic (const lldb::SBTypeSynthetic &rhs);
+
+        ~SBTypeSynthetic ();
+
+        bool
+        IsValid() const;
+
+        explicit operator bool() const;
+
+        bool
+        IsEqualTo (lldb::SBTypeSynthetic &rhs);
+
+        bool
+        IsClassCode();
+
+        const char*
+        GetData ();
+
+        void
+        SetClassName (const char* data);
+
+        void
+        SetClassCode (const char* data);
+
+        uint32_t
+        GetOptions ();
+
+        void
+        SetOptions (uint32_t);
+
+        bool
+        GetDescription (lldb::SBStream &description,
+                        lldb::DescriptionLevel description_level);
+
+        bool
+        operator == (lldb::SBTypeSynthetic &rhs);
+
+        bool
+        operator != (lldb::SBTypeSynthetic &rhs);
+
+        STRING_EXTENSION_LEVEL(SBTypeSynthetic, lldb::eDescriptionLevelBrief)
+
+#ifdef SWIGPYTHON
+        %pythoncode %{
+            options = property(GetOptions, SetOptions)
+            contains_code = property(IsClassCode, None)
+            synthetic_data = property(GetData, None)
+        %}
+#endif
+
+    };
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBUnixSignals.i b/src/llvm-project/lldb/bindings/interface/SBUnixSignals.i
new file mode 100644
index 0000000..8fe3e2a
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBUnixSignals.i
@@ -0,0 +1,76 @@
+//===-- SWIG Interface for SBUnixSignals ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Allows you to manipulate LLDB's signal disposition"
+) SBUnixSignals;
+class SBUnixSignals
+{
+public:
+    SBUnixSignals ();
+
+    SBUnixSignals (const lldb::SBUnixSignals &rhs);
+
+    ~SBUnixSignals();
+
+    void
+    Clear ();
+
+    bool
+    IsValid () const;
+
+    explicit operator bool() const;
+
+    const char *
+    GetSignalAsCString (int32_t signo) const;
+
+    int32_t
+    GetSignalNumberFromName (const char *name) const;
+
+    bool
+    GetShouldSuppress (int32_t signo) const;
+
+    bool
+    SetShouldSuppress (int32_t signo,
+                       bool value);
+
+    bool
+    GetShouldStop (int32_t signo) const;
+
+    bool
+    SetShouldStop (int32_t signo,
+                   bool value);
+
+    bool
+    GetShouldNotify (int32_t signo) const;
+
+    bool
+    SetShouldNotify (int32_t signo, bool value);
+
+    int32_t
+    GetNumSignals () const;
+
+    int32_t
+    GetSignalAtIndex (int32_t index) const;
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def get_unix_signals_list(self):
+            signals = []
+            for idx in range(0, self.GetNumSignals()):
+                signals.append(self.GetSignalAtIndex(sig))
+            return signals
+
+        threads = property(get_unix_signals_list, None, doc='''A read only property that returns a list() of valid signal numbers for this platform.''')
+    %}
+#endif
+};
+
+}  // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBValue.i b/src/llvm-project/lldb/bindings/interface/SBValue.i
new file mode 100644
index 0000000..fb89980
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBValue.i
@@ -0,0 +1,598 @@
+//===-- SWIG Interface for SBValue ------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents the value of a variable, a register, or an expression.
+
+SBValue supports iteration through its child, which in turn is represented
+as an SBValue.  For example, we can get the general purpose registers of a
+frame as an SBValue, and iterate through all the registers,
+
+    registerSet = frame.registers # Returns an SBValueList.
+    for regs in registerSet:
+        if 'general purpose registers' in regs.name.lower():
+            GPRs = regs
+            break
+
+    print('%s (number of children = %d):' % (GPRs.name, GPRs.num_children))
+    for reg in GPRs:
+        print('Name: ', reg.name, ' Value: ', reg.value)
+
+produces the output:
+
+General Purpose Registers (number of children = 21):
+Name:  rax  Value:  0x0000000100000c5c
+Name:  rbx  Value:  0x0000000000000000
+Name:  rcx  Value:  0x00007fff5fbffec0
+Name:  rdx  Value:  0x00007fff5fbffeb8
+Name:  rdi  Value:  0x0000000000000001
+Name:  rsi  Value:  0x00007fff5fbffea8
+Name:  rbp  Value:  0x00007fff5fbffe80
+Name:  rsp  Value:  0x00007fff5fbffe60
+Name:  r8  Value:  0x0000000008668682
+Name:  r9  Value:  0x0000000000000000
+Name:  r10  Value:  0x0000000000001200
+Name:  r11  Value:  0x0000000000000206
+Name:  r12  Value:  0x0000000000000000
+Name:  r13  Value:  0x0000000000000000
+Name:  r14  Value:  0x0000000000000000
+Name:  r15  Value:  0x0000000000000000
+Name:  rip  Value:  0x0000000100000dae
+Name:  rflags  Value:  0x0000000000000206
+Name:  cs  Value:  0x0000000000000027
+Name:  fs  Value:  0x0000000000000010
+Name:  gs  Value:  0x0000000000000048
+
+See also linked_list_iter() for another perspective on how to iterate through an
+SBValue instance which interprets the value object as representing the head of a
+linked list."
+) SBValue;
+class SBValue
+{
+public:
+    SBValue ();
+
+    SBValue (const SBValue &rhs);
+
+    ~SBValue ();
+
+    bool
+    IsValid();
+
+    explicit operator bool() const;
+
+    void
+    Clear();
+
+    SBError
+    GetError();
+
+    lldb::user_id_t
+    GetID ();
+
+    const char *
+    GetName();
+
+    const char *
+    GetTypeName ();
+
+    const char *
+    GetDisplayTypeName ();
+
+    size_t
+    GetByteSize ();
+
+    bool
+    IsInScope ();
+
+    lldb::Format
+    GetFormat ();
+
+    void
+    SetFormat (lldb::Format format);
+
+    const char *
+    GetValue ();
+
+    int64_t
+    GetValueAsSigned(SBError& error, int64_t fail_value=0);
+
+    uint64_t
+    GetValueAsUnsigned(SBError& error, uint64_t fail_value=0);
+
+    int64_t
+    GetValueAsSigned(int64_t fail_value=0);
+
+    uint64_t
+    GetValueAsUnsigned(uint64_t fail_value=0);
+
+    ValueType
+    GetValueType ();
+
+    bool
+    GetValueDidChange ();
+
+    const char *
+    GetSummary ();
+
+    const char *
+    GetSummary (lldb::SBStream& stream,
+                lldb::SBTypeSummaryOptions& options);
+
+    const char *
+    GetObjectDescription ();
+
+    lldb::SBValue
+    GetDynamicValue (lldb::DynamicValueType use_dynamic);
+
+    lldb::SBValue
+    GetStaticValue ();
+
+    lldb::SBValue
+    GetNonSyntheticValue ();
+
+    lldb::DynamicValueType
+    GetPreferDynamicValue ();
+
+    void
+    SetPreferDynamicValue (lldb::DynamicValueType use_dynamic);
+
+    bool
+    GetPreferSyntheticValue ();
+
+    void
+    SetPreferSyntheticValue (bool use_synthetic);
+
+    bool
+    IsDynamic();
+
+    bool
+    IsSynthetic ();
+
+    bool
+    IsSyntheticChildrenGenerated ();
+
+    void
+    SetSyntheticChildrenGenerated (bool);
+
+    const char *
+    GetLocation ();
+
+    bool
+    SetValueFromCString (const char *value_str);
+
+    bool
+    SetValueFromCString (const char *value_str, lldb::SBError& error);
+
+    lldb::SBTypeFormat
+    GetTypeFormat ();
+
+    lldb::SBTypeSummary
+    GetTypeSummary ();
+
+    lldb::SBTypeFilter
+    GetTypeFilter ();
+
+    lldb::SBTypeSynthetic
+    GetTypeSynthetic ();
+
+    lldb::SBValue
+    GetChildAtIndex (uint32_t idx);
+
+    %feature("docstring", "
+    Get a child value by index from a value.
+
+    Structs, unions, classes, arrays and pointers have child
+    values that can be access by index.
+
+    Structs and unions access child members using a zero based index
+    for each child member. For
+
+    Classes reserve the first indexes for base classes that have
+    members (empty base classes are omitted), and all members of the
+    current class will then follow the base classes.
+
+    Pointers differ depending on what they point to. If the pointer
+    points to a simple type, the child at index zero
+    is the only child value available, unless synthetic_allowed
+    is true, in which case the pointer will be used as an array
+    and can create 'synthetic' child values using positive or
+    negative indexes. If the pointer points to an aggregate type
+    (an array, class, union, struct), then the pointee is
+    transparently skipped and any children are going to be the indexes
+    of the child values within the aggregate type. For example if
+    we have a 'Point' type and we have a SBValue that contains a
+    pointer to a 'Point' type, then the child at index zero will be
+    the 'x' member, and the child at index 1 will be the 'y' member
+    (the child at index zero won't be a 'Point' instance).
+
+    If you actually need an SBValue that represents the type pointed
+    to by a SBValue for which GetType().IsPointeeType() returns true,
+    regardless of the pointee type, you can do that with the SBValue.Dereference
+    method (or the equivalent deref property).
+
+    Arrays have a preset number of children that can be accessed by
+    index and will returns invalid child values for indexes that are
+    out of bounds unless the synthetic_allowed is true. In this
+    case the array can create 'synthetic' child values for indexes
+    that aren't in the array bounds using positive or negative
+    indexes.
+
+    @param[in] idx
+        The index of the child value to get
+
+    @param[in] use_dynamic
+        An enumeration that specifies whether to get dynamic values,
+        and also if the target can be run to figure out the dynamic
+        type of the child value.
+
+    @param[in] synthetic_allowed
+        If true, then allow child values to be created by index
+        for pointers and arrays for indexes that normally wouldn't
+        be allowed.
+
+    @return
+        A new SBValue object that represents the child member value.") GetChildAtIndex;
+    lldb::SBValue
+    GetChildAtIndex (uint32_t idx,
+                     lldb::DynamicValueType use_dynamic,
+                     bool can_create_synthetic);
+
+    lldb::SBValue
+    CreateChildAtOffset (const char *name, uint32_t offset, lldb::SBType type);
+
+    lldb::SBValue
+    SBValue::Cast (lldb::SBType type);
+
+    lldb::SBValue
+    CreateValueFromExpression (const char *name, const char* expression);
+
+    lldb::SBValue
+    CreateValueFromExpression (const char *name, const char* expression, SBExpressionOptions &options);
+
+    lldb::SBValue
+    CreateValueFromAddress(const char* name, lldb::addr_t address, lldb::SBType type);
+
+  lldb::SBValue
+  CreateValueFromData (const char* name,
+                       lldb::SBData data,
+                       lldb::SBType type);
+
+    lldb::SBType
+    GetType();
+
+    %feature("docstring", "
+    Returns the child member index.
+
+    Matches children of this object only and will match base classes and
+    member names if this is a clang typed object.
+
+    @param[in] name
+        The name of the child value to get
+
+    @return
+        An index to the child member value.") GetIndexOfChildWithName;
+    uint32_t
+    GetIndexOfChildWithName (const char *name);
+
+    lldb::SBValue
+    GetChildMemberWithName (const char *name);
+
+    %feature("docstring", "
+    Returns the child member value.
+
+    Matches child members of this object and child members of any base
+    classes.
+
+    @param[in] name
+        The name of the child value to get
+
+    @param[in] use_dynamic
+        An enumeration that specifies whether to get dynamic values,
+        and also if the target can be run to figure out the dynamic
+        type of the child value.
+
+    @return
+        A new SBValue object that represents the child member value.") GetChildMemberWithName;
+    lldb::SBValue
+    GetChildMemberWithName (const char *name, lldb::DynamicValueType use_dynamic);
+
+    %feature("docstring", "Expands nested expressions like .a->b[0].c[1]->d."
+    ) GetValueForExpressionPath;
+    lldb::SBValue
+    GetValueForExpressionPath(const char* expr_path);
+
+    lldb::SBDeclaration
+    GetDeclaration ();
+
+    bool
+    MightHaveChildren ();
+
+    bool
+    IsRuntimeSupportValue ();
+
+    uint32_t
+    GetNumChildren ();
+
+    %feature("doctstring", "
+    Returns the number for children.
+
+    @param[in] max
+        If max is less the lldb.UINT32_MAX, then the returned value is
+        capped to max.
+
+    @return
+        An integer value capped to the argument max.") GetNumChildren;
+    uint32_t
+    GetNumChildren (uint32_t max);
+
+    void *
+    GetOpaqueType();
+
+    lldb::SBValue
+    Dereference ();
+
+    lldb::SBValue
+    AddressOf();
+
+    bool
+    TypeIsPointerType ();
+
+    lldb::SBTarget
+    GetTarget();
+
+    lldb::SBProcess
+    GetProcess();
+
+    lldb::SBThread
+    GetThread();
+
+    lldb::SBFrame
+    GetFrame();
+
+    %feature("docstring", "
+    Find and watch a variable.
+    It returns an SBWatchpoint, which may be invalid.") Watch;
+    lldb::SBWatchpoint
+    Watch (bool resolve_location, bool read, bool write, SBError &error);
+
+    %feature("docstring", "
+    Find and watch the location pointed to by a variable.
+    It returns an SBWatchpoint, which may be invalid.") WatchPointee;
+    lldb::SBWatchpoint
+    WatchPointee (bool resolve_location, bool read, bool write, SBError &error);
+
+    bool
+    GetDescription (lldb::SBStream &description);
+
+    bool
+    GetExpressionPath (lldb::SBStream &description);
+
+  %feature("docstring", "
+    Get an SBData wrapping what this SBValue points to.
+
+    This method will dereference the current SBValue, if its
+    data type is a T* or T[], and extract item_count elements
+    of type T from it, copying their contents in an SBData.
+
+    @param[in] item_idx
+        The index of the first item to retrieve. For an array
+        this is equivalent to array[item_idx], for a pointer
+        to *(pointer + item_idx). In either case, the measurement
+        unit for item_idx is the sizeof(T) rather than the byte
+
+    @param[in] item_count
+        How many items should be copied into the output. By default
+        only one item is copied, but more can be asked for.
+
+    @return
+        An SBData with the contents of the copied items, on success.
+        An empty SBData otherwise.") GetPointeeData;
+  lldb::SBData
+  GetPointeeData (uint32_t item_idx = 0,
+          uint32_t item_count = 1);
+
+    %feature("docstring", "
+    Get an SBData wrapping the contents of this SBValue.
+
+    This method will read the contents of this object in memory
+    and copy them into an SBData for future use.
+
+    @return
+        An SBData with the contents of this SBValue, on success.
+        An empty SBData otherwise.") GetData;
+    lldb::SBData
+    GetData ();
+
+    bool
+    SetData (lldb::SBData &data, lldb::SBError& error);
+
+  lldb::addr_t
+  GetLoadAddress();
+
+  lldb::SBAddress
+  GetAddress();
+
+    lldb::SBValue
+    Persist ();
+
+    %feature("docstring", "Returns an expression path for this value."
+    ) GetExpressionPath;
+    bool
+    GetExpressionPath (lldb::SBStream &description, bool qualify_cxx_base_classes);
+
+    lldb::SBValue
+    EvaluateExpression(const char *expr) const;
+
+    lldb::SBValue
+    EvaluateExpression(const char *expr,
+                       const SBExpressionOptions &options) const;
+
+    lldb::SBValue
+    EvaluateExpression(const char *expr,
+                       const SBExpressionOptions &options,
+                       const char *name) const;
+
+    STRING_EXTENSION(SBValue)
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __get_dynamic__ (self):
+            '''Helper function for the "SBValue.dynamic" property.'''
+            return self.GetDynamicValue (eDynamicCanRunTarget)
+
+        class children_access(object):
+            '''A helper object that will lazily hand out thread for a process when supplied an index.'''
+
+            def __init__(self, sbvalue):
+                self.sbvalue = sbvalue
+
+            def __len__(self):
+                if self.sbvalue:
+                    return int(self.sbvalue.GetNumChildren())
+                return 0
+
+            def __getitem__(self, key):
+                if type(key) is int and key < len(self):
+                    return self.sbvalue.GetChildAtIndex(key)
+                return None
+
+        def get_child_access_object(self):
+            '''An accessor function that returns a children_access() object which allows lazy member variable access from a lldb.SBValue object.'''
+            return self.children_access (self)
+
+        def get_value_child_list(self):
+            '''An accessor function that returns a list() that contains all children in a lldb.SBValue object.'''
+            children = []
+            accessor = self.get_child_access_object()
+            for idx in range(len(accessor)):
+                children.append(accessor[idx])
+            return children
+
+        def __iter__(self):
+            '''Iterate over all child values of a lldb.SBValue object.'''
+            return lldb_iter(self, 'GetNumChildren', 'GetChildAtIndex')
+
+        def __len__(self):
+            '''Return the number of child values of a lldb.SBValue object.'''
+            return self.GetNumChildren()
+
+        children = property(get_value_child_list, None, doc='''A read only property that returns a list() of lldb.SBValue objects for the children of the value.''')
+        child = property(get_child_access_object, None, doc='''A read only property that returns an object that can access children of a variable by index (child_value = value.children[12]).''')
+        name = property(GetName, None, doc='''A read only property that returns the name of this value as a string.''')
+        type = property(GetType, None, doc='''A read only property that returns a lldb.SBType object that represents the type for this value.''')
+        size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes of this value.''')
+        is_in_scope = property(IsInScope, None, doc='''A read only property that returns a boolean value that indicates whether this value is currently lexically in scope.''')
+        format = property(GetName, SetFormat, doc='''A read/write property that gets/sets the format used for lldb.SBValue().GetValue() for this value. See enumerations that start with "lldb.eFormat".''')
+        value = property(GetValue, SetValueFromCString, doc='''A read/write property that gets/sets value from a string.''')
+        value_type = property(GetValueType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eValueType") that represents the type of this value (local, argument, global, register, etc.).''')
+        changed = property(GetValueDidChange, None, doc='''A read only property that returns a boolean value that indicates if this value has changed since it was last updated.''')
+        data = property(GetData, None, doc='''A read only property that returns an lldb object (lldb.SBData) that represents the bytes that make up the value for this object.''')
+        load_addr = property(GetLoadAddress, None, doc='''A read only property that returns the load address of this value as an integer.''')
+        addr = property(GetAddress, None, doc='''A read only property that returns an lldb.SBAddress that represents the address of this value if it is in memory.''')
+        deref = property(Dereference, None, doc='''A read only property that returns an lldb.SBValue that is created by dereferencing this value.''')
+        address_of = property(AddressOf, None, doc='''A read only property that returns an lldb.SBValue that represents the address-of this value.''')
+        error = property(GetError, None, doc='''A read only property that returns the lldb.SBError that represents the error from the last time the variable value was calculated.''')
+        summary = property(GetSummary, None, doc='''A read only property that returns the summary for this value as a string''')
+        description = property(GetObjectDescription, None, doc='''A read only property that returns the language-specific description of this value as a string''')
+        dynamic = property(__get_dynamic__, None, doc='''A read only property that returns an lldb.SBValue that is created by finding the dynamic type of this value.''')
+        location = property(GetLocation, None, doc='''A read only property that returns the location of this value as a string.''')
+        target = property(GetTarget, None, doc='''A read only property that returns the lldb.SBTarget that this value is associated with.''')
+        process = property(GetProcess, None, doc='''A read only property that returns the lldb.SBProcess that this value is associated with, the returned value might be invalid and should be tested.''')
+        thread = property(GetThread, None, doc='''A read only property that returns the lldb.SBThread that this value is associated with, the returned value might be invalid and should be tested.''')
+        frame = property(GetFrame, None, doc='''A read only property that returns the lldb.SBFrame that this value is associated with, the returned value might be invalid and should be tested.''')
+        num_children = property(GetNumChildren, None, doc='''A read only property that returns the number of child lldb.SBValues that this value has.''')
+        unsigned = property(GetValueAsUnsigned, None, doc='''A read only property that returns the value of this SBValue as an usigned integer.''')
+        signed = property(GetValueAsSigned, None, doc='''A read only property that returns the value of this SBValue as a signed integer.''')
+
+        def get_expr_path(self):
+            s = SBStream()
+            self.GetExpressionPath (s)
+            return s.GetData()
+
+        path = property(get_expr_path, None, doc='''A read only property that returns the expression path that one can use to reach this value in an expression.''')
+
+        def synthetic_child_from_expression(self, name, expr, options=None):
+            if options is None: options = lldb.SBExpressionOptions()
+            child = self.CreateValueFromExpression(name, expr, options)
+            child.SetSyntheticChildrenGenerated(True)
+            return child
+
+        def synthetic_child_from_data(self, name, data, type):
+            child = self.CreateValueFromData(name, data, type)
+            child.SetSyntheticChildrenGenerated(True)
+            return child
+
+        def synthetic_child_from_address(self, name, addr, type):
+            child = self.CreateValueFromAddress(name, addr, type)
+            child.SetSyntheticChildrenGenerated(True)
+            return child
+
+        def __eol_test(val):
+            """Default function for end of list test takes an SBValue object.
+
+            Return True if val is invalid or it corresponds to a null pointer.
+            Otherwise, return False.
+            """
+            if not val or val.GetValueAsUnsigned() == 0:
+                return True
+            else:
+                return False
+
+        # ==================================================
+        # Iterator for lldb.SBValue treated as a linked list
+        # ==================================================
+        def linked_list_iter(self, next_item_name, end_of_list_test=__eol_test):
+            """Generator adaptor to support iteration for SBValue as a linked list.
+
+            linked_list_iter() is a special purpose iterator to treat the SBValue as
+            the head of a list data structure, where you specify the child member
+            name which points to the next item on the list and you specify the
+            end-of-list test function which takes an SBValue for an item and returns
+            True if EOL is reached and False if not.
+
+            linked_list_iter() also detects infinite loop and bails out early.
+
+            The end_of_list_test arg, if omitted, defaults to the __eol_test
+            function above.
+
+            For example,
+
+            # Get Frame #0.
+            ...
+
+            # Get variable 'task_head'.
+            task_head = frame0.FindVariable('task_head')
+            ...
+
+            for t in task_head.linked_list_iter('next'):
+                print t
+            """
+            if end_of_list_test(self):
+                return
+            item = self
+            visited = set()
+            try:
+                while not end_of_list_test(item) and not item.GetValueAsUnsigned() in visited:
+                    visited.add(item.GetValueAsUnsigned())
+                    yield item
+                    # Prepare for the next iteration.
+                    item = item.GetChildMemberWithName(next_item_name)
+            except:
+                # Exception occurred.  Stop the generator.
+                pass
+
+            return
+    %}
+#endif
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interface/SBValueList.i b/src/llvm-project/lldb/bindings/interface/SBValueList.i
new file mode 100644
index 0000000..17ba205
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBValueList.i
@@ -0,0 +1,172 @@
+//===-- SWIG Interface for SBValueList --------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents a collection of SBValues.  Both SBFrame's GetVariables() and
+GetRegisters() return a SBValueList.
+
+SBValueList supports SBValue iteration. For example (from test/lldbutil.py),
+
+def get_registers(frame, kind):
+    '''Returns the registers given the frame and the kind of registers desired.
+
+    Returns None if there's no such kind.
+    '''
+    registerSet = frame.GetRegisters() # Return type of SBValueList.
+    for value in registerSet:
+        if kind.lower() in value.GetName().lower():
+            return value
+
+    return None
+
+def get_GPRs(frame):
+    '''Returns the general purpose registers of the frame as an SBValue.
+
+    The returned SBValue object is iterable.  An example:
+        ...
+        from lldbutil import get_GPRs
+        regs = get_GPRs(frame)
+        for reg in regs:
+            print('%s => %s' % (reg.GetName(), reg.GetValue()))
+        ...
+    '''
+    return get_registers(frame, 'general purpose')
+
+def get_FPRs(frame):
+    '''Returns the floating point registers of the frame as an SBValue.
+
+    The returned SBValue object is iterable.  An example:
+        ...
+        from lldbutil import get_FPRs
+        regs = get_FPRs(frame)
+        for reg in regs:
+            print('%s => %s' % (reg.GetName(), reg.GetValue()))
+        ...
+    '''
+    return get_registers(frame, 'floating point')
+
+def get_ESRs(frame):
+    '''Returns the exception state registers of the frame as an SBValue.
+
+    The returned SBValue object is iterable.  An example:
+        ...
+        from lldbutil import get_ESRs
+        regs = get_ESRs(frame)
+        for reg in regs:
+            print('%s => %s' % (reg.GetName(), reg.GetValue()))
+        ...
+    '''
+    return get_registers(frame, 'exception state')"
+) SBValueList;
+class SBValueList
+{
+public:
+
+    SBValueList ();
+
+    SBValueList (const lldb::SBValueList &rhs);
+
+    ~SBValueList();
+
+    bool
+    IsValid() const;
+
+    explicit operator bool() const;
+
+    void
+    Clear();
+
+    void
+    Append (const lldb::SBValue &val_obj);
+
+    void
+    Append (const lldb::SBValueList& value_list);
+
+    uint32_t
+    GetSize() const;
+
+    lldb::SBValue
+    GetValueAtIndex (uint32_t idx) const;
+
+    lldb::SBValue
+    FindValueObjectByUID (lldb::user_id_t uid);
+
+    lldb::SBValue
+    GetFirstValueByName (const char* name) const;
+
+    %extend {
+       %nothreadallow;
+       std::string lldb::SBValueList::__str__ (){
+           lldb::SBStream description;
+           const size_t n = $self->GetSize();
+           if (n)
+           {
+               for (size_t i=0; i<n; ++i)
+                   $self->GetValueAtIndex(i).GetDescription(description);
+           }
+           else
+           {
+               description.Printf("<empty> lldb.SBValueList()");
+           }
+           const char *desc = description.GetData();
+           size_t desc_len = description.GetSize();
+           if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
+               --desc_len;
+           return std::string(desc, desc_len);
+       }
+       %clearnothreadallow;
+    }
+
+#ifdef SWIGPYTHON
+    %pythoncode %{
+        def __iter__(self):
+            '''Iterate over all values in a lldb.SBValueList object.'''
+            return lldb_iter(self, 'GetSize', 'GetValueAtIndex')
+
+        def __len__(self):
+            return int(self.GetSize())
+
+        def __getitem__(self, key):
+            count = len(self)
+            #------------------------------------------------------------
+            # Access with "int" to get Nth item in the list
+            #------------------------------------------------------------
+            if type(key) is int:
+                if key < count:
+                    return self.GetValueAtIndex(key)
+            #------------------------------------------------------------
+            # Access with "str" to get values by name
+            #------------------------------------------------------------
+            elif type(key) is str:
+                matches = []
+                for idx in range(count):
+                    value = self.GetValueAtIndex(idx)
+                    if value.name == key:
+                        matches.append(value)
+                return matches
+            #------------------------------------------------------------
+            # Match with regex
+            #------------------------------------------------------------
+            elif isinstance(key, type(re.compile('.'))):
+                matches = []
+                for idx in range(count):
+                    value = self.GetValueAtIndex(idx)
+                    re_match = key.search(value.name)
+                    if re_match:
+                        matches.append(value)
+                return matches
+
+    %}
+#endif
+
+
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBVariablesOptions.i b/src/llvm-project/lldb/bindings/interface/SBVariablesOptions.i
similarity index 100%
rename from src/llvm-project/lldb/scripts/interface/SBVariablesOptions.i
rename to src/llvm-project/lldb/bindings/interface/SBVariablesOptions.i
diff --git a/src/llvm-project/lldb/bindings/interface/SBWatchpoint.i b/src/llvm-project/lldb/bindings/interface/SBWatchpoint.i
new file mode 100644
index 0000000..cb0bc5f
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interface/SBWatchpoint.i
@@ -0,0 +1,96 @@
+//===-- SWIG Interface for SBWatchpoint -----------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+namespace lldb {
+
+%feature("docstring",
+"Represents an instance of watchpoint for a specific target program.
+
+A watchpoint is determined by the address and the byte size that resulted in
+this particular instantiation.  Each watchpoint has its settable options.
+
+See also SBTarget.watchpoint_iter() for example usage of iterating through the
+watchpoints of the target."
+) SBWatchpoint;
+class SBWatchpoint
+{
+public:
+
+    SBWatchpoint ();
+
+    SBWatchpoint (const lldb::SBWatchpoint &rhs);
+
+    ~SBWatchpoint ();
+
+    bool
+    IsValid();
+
+    explicit operator bool() const;
+
+    bool operator==(const SBWatchpoint &rhs) const;
+
+    bool operator!=(const SBWatchpoint &rhs) const;
+
+    SBError
+    GetError();
+
+    watch_id_t
+    GetID ();
+
+    %feature("docstring", "
+    With -1 representing an invalid hardware index.") GetHardwareIndex;
+    int32_t
+    GetHardwareIndex ();
+
+    lldb::addr_t
+    GetWatchAddress ();
+
+    size_t
+    GetWatchSize();
+
+    void
+    SetEnabled(bool enabled);
+
+    bool
+    IsEnabled ();
+
+    uint32_t
+    GetHitCount ();
+
+    uint32_t
+    GetIgnoreCount ();
+
+    void
+    SetIgnoreCount (uint32_t n);
+
+    %feature("docstring", "
+    Get the condition expression for the watchpoint.") GetCondition;
+    const char *
+    GetCondition ();
+
+    %feature("docstring", "
+    The watchpoint stops only if the condition expression evaluates to true.") SetCondition;
+    void
+    SetCondition (const char *condition);
+
+    bool
+    GetDescription (lldb::SBStream &description, DescriptionLevel level);
+
+    static bool
+    EventIsWatchpointEvent (const lldb::SBEvent &event);
+
+    static lldb::WatchpointEventType
+    GetWatchpointEventTypeFromEvent (const lldb::SBEvent& event);
+
+    static lldb::SBWatchpoint
+    GetWatchpointFromEvent (const lldb::SBEvent& event);
+
+    STRING_EXTENSION_LEVEL(SBWatchpoint, lldb::eDescriptionLevelVerbose)
+};
+
+} // namespace lldb
diff --git a/src/llvm-project/lldb/bindings/interfaces.swig b/src/llvm-project/lldb/bindings/interfaces.swig
new file mode 100644
index 0000000..780fe34
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/interfaces.swig
@@ -0,0 +1,82 @@
+/* Various liblldb typedefs that SWIG needs to know about.  */
+#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */
+/* The ISO C99 standard specifies that in C++ implementations limit macros such
+   as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */
+#define __STDC_LIMIT_MACROS
+%include "stdint.i"
+
+%include "lldb/lldb-defines.h"
+%include "lldb/lldb-enumerations.h"
+%include "lldb/lldb-forward.h"
+%include "lldb/lldb-types.h"
+
+/* Forward declaration of SB classes. */
+%include "lldb/API/SBDefines.h"
+
+/* Python interface files with docstrings. */
+%include "./interface/SBAddress.i"
+%include "./interface/SBAttachInfo.i"
+%include "./interface/SBBlock.i"
+%include "./interface/SBBreakpoint.i"
+%include "./interface/SBBreakpointLocation.i"
+%include "./interface/SBBreakpointName.i"
+%include "./interface/SBBroadcaster.i"
+%include "./interface/SBCommandInterpreter.i"
+%include "./interface/SBCommandReturnObject.i"
+%include "./interface/SBCommunication.i"
+%include "./interface/SBCompileUnit.i"
+%include "./interface/SBData.i"
+%include "./interface/SBDebugger.i"
+%include "./interface/SBDeclaration.i"
+%include "./interface/SBError.i"
+%include "./interface/SBEvent.i"
+%include "./interface/SBExecutionContext.i"
+%include "./interface/SBExpressionOptions.i"
+%include "./interface/SBFile.i"
+%include "./interface/SBFileSpec.i"
+%include "./interface/SBFileSpecList.i"
+%include "./interface/SBFrame.i"
+%include "./interface/SBFunction.i"
+%include "./interface/SBHostOS.i"
+%include "./interface/SBInstruction.i"
+%include "./interface/SBInstructionList.i"
+%include "./interface/SBLanguageRuntime.i"
+%include "./interface/SBLaunchInfo.i"
+%include "./interface/SBLineEntry.i"
+%include "./interface/SBListener.i"
+%include "./interface/SBMemoryRegionInfo.i"
+%include "./interface/SBMemoryRegionInfoList.i"
+%include "./interface/SBModule.i"
+%include "./interface/SBModuleSpec.i"
+%include "./interface/SBPlatform.i"
+%include "./interface/SBProcess.i"
+%include "./interface/SBProcessInfo.i"
+%include "./interface/SBQueue.i"
+%include "./interface/SBQueueItem.i"
+%include "./interface/SBSection.i"
+%include "./interface/SBSourceManager.i"
+%include "./interface/SBStream.i"
+%include "./interface/SBStringList.i"
+%include "./interface/SBStructuredData.i"
+%include "./interface/SBSymbol.i"
+%include "./interface/SBSymbolContext.i"
+%include "./interface/SBSymbolContextList.i"
+%include "./interface/SBTarget.i"
+%include "./interface/SBThread.i"
+%include "./interface/SBThreadCollection.i"
+%include "./interface/SBThreadPlan.i"
+%include "./interface/SBTrace.i"
+%include "./interface/SBTraceOptions.i"
+%include "./interface/SBType.i"
+%include "./interface/SBTypeCategory.i"
+%include "./interface/SBTypeEnumMember.i"
+%include "./interface/SBTypeFilter.i"
+%include "./interface/SBTypeFormat.i"
+%include "./interface/SBTypeNameSpecifier.i"
+%include "./interface/SBTypeSummary.i"
+%include "./interface/SBTypeSynthetic.i"
+%include "./interface/SBUnixSignals.i"
+%include "./interface/SBValue.i"
+%include "./interface/SBValueList.i"
+%include "./interface/SBVariablesOptions.i"
+%include "./interface/SBWatchpoint.i"
diff --git a/src/llvm-project/lldb/bindings/lua.swig b/src/llvm-project/lldb/bindings/lua.swig
new file mode 100644
index 0000000..9bfc49b
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/lua.swig
@@ -0,0 +1,21 @@
+/*
+   lldb.swig
+
+   This is the input file for SWIG, to create the appropriate C++ wrappers and
+   functions for various scripting languages, to enable them to call the
+   liblldb Script Bridge functions.
+*/
+
+%module lldb
+
+%include <std_string.i>
+%include "./lua/lua-typemaps.swig"
+%include "./macros.swig"
+%include "./headers.swig"
+
+%{
+using namespace lldb_private;
+using namespace lldb;
+%}
+
+%include "./interfaces.swig"
diff --git a/src/llvm-project/lldb/bindings/lua/lua-typemaps.swig b/src/llvm-project/lldb/bindings/lua/lua-typemaps.swig
new file mode 100644
index 0000000..28d63fa
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/lua/lua-typemaps.swig
@@ -0,0 +1 @@
+%include <typemaps.i>
diff --git a/src/llvm-project/lldb/bindings/macros.swig b/src/llvm-project/lldb/bindings/macros.swig
new file mode 100644
index 0000000..0387f27
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/macros.swig
@@ -0,0 +1,33 @@
+%define STRING_EXTENSION_LEVEL(Class, Level)
+%extend {
+  %nothreadallow;
+  std::string lldb:: ## Class ## ::__str__(){
+    lldb::SBStream stream;
+    $self->GetDescription (stream, Level);
+    const char *desc = stream.GetData();
+    size_t desc_len = stream.GetSize();
+    if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r')) {
+      --desc_len;
+    }
+    return std::string(desc, desc_len);
+  }
+  %clearnothreadallow;
+}
+%enddef
+
+%define STRING_EXTENSION(Class)
+%extend {
+  %nothreadallow;
+  std::string lldb:: ## Class ## ::__str__(){
+    lldb::SBStream stream;
+    $self->GetDescription (stream);
+    const char *desc = stream.GetData();
+    size_t desc_len = stream.GetSize();
+    if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r')) {
+      --desc_len;
+    }
+    return std::string(desc, desc_len);
+  }
+  %clearnothreadallow;
+}
+%enddef
diff --git a/src/llvm-project/lldb/bindings/python.swig b/src/llvm-project/lldb/bindings/python.swig
new file mode 100644
index 0000000..b086d43
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/python.swig
@@ -0,0 +1,138 @@
+/*
+   lldb.swig
+
+   This is the input file for SWIG, to create the appropriate C++ wrappers and
+   functions for various scripting languages, to enable them to call the
+   liblldb Script Bridge functions.
+*/
+
+/* Define our module docstring. */
+%define DOCSTRING
+"The lldb module contains the public APIs for Python binding.
+
+Some of the important classes are described here:
+
+o SBTarget: Represents the target program running under the debugger.
+o SBProcess: Represents the process associated with the target program.
+o SBThread: Represents a thread of execution. SBProcess contains SBThread(s).
+o SBFrame: Represents one of the stack frames associated with a thread. SBThread
+      contains SBFrame(s).
+o SBSymbolContext: A container that stores various debugger related info.
+o SBValue: Represents the value of a variable, a register, or an expression.
+o SBModule: Represents an executable image and its associated object and symbol
+      files.  SBTarget contains SBModule(s).
+o SBBreakpoint: Represents a logical breakpoint and its associated settings.
+      SBTarget contains SBBreakpoint(s).
+o SBSymbol: Represents the symbol possibly associated with a stack frame.
+o SBCompileUnit: Represents a compilation unit, or compiled source file.
+o SBFunction: Represents a generic function, which can be inlined or not.
+o SBBlock: Represents a lexical block. SBFunction contains SBBlock(s).
+o SBLineEntry: Specifies an association with a contiguous range of instructions
+      and a source file location. SBCompileUnit contains SBLineEntry(s)."
+%enddef
+
+/*
+Since version 3.0.9, swig's logic for importing the native module has changed in
+a way that is incompatible with our usage of the python module as __init__.py
+(See swig bug #769).  Fortunately, since version 3.0.11, swig provides a way for
+us to override the module import logic to suit our needs. This does that.
+
+Older swig versions will simply ignore this setting.
+*/
+%define MODULEIMPORT
+"try:
+    # Try an absolute import first.  If we're being loaded from lldb,
+    # _lldb should be a built-in module.
+    import $module
+except ImportError:
+    # Relative import should work if we are being loaded by Python.
+    from . import $module"
+%enddef
+// These versions will not generate working python modules, so error out early.
+#if SWIG_VERSION >= 0x030009 && SWIG_VERSION < 0x030011
+#error Swig versions 3.0.9 and 3.0.10 are incompatible with lldb.
+#endif
+
+// The name of the module to be created.
+%module(docstring=DOCSTRING, moduleimport=MODULEIMPORT) lldb
+
+// Parameter types will be used in the autodoc string.
+%feature("autodoc", "1");
+
+%define ARRAYHELPER(type,name)
+%inline %{
+type *new_ ## name (int nitems) {
+   return (type *) malloc(sizeof(type)*nitems);
+}
+void delete_ ## name(type *t) {
+   free(t);
+}
+type name ## _get(type *t, int index) {
+   return t[index];
+}
+void name ## _set(type *t, int index, type val) {
+   t[index] = val;
+}
+%}
+%enddef
+
+%pythoncode%{
+import uuid
+import re
+import os
+
+import six
+%}
+
+// Include the version of swig that was used to generate this interface.
+%define EMBED_VERSION(VERSION)
+%pythoncode%{
+# SWIG_VERSION is written as a single hex number, but the components of it are
+# meant to be interpreted in decimal. So, 0x030012 is swig 3.0.12, and not
+# 3.0.18.
+def _to_int(hex):
+    return hex // 0x10 % 0x10 * 10 + hex % 0x10
+swig_version = (_to_int(VERSION // 0x10000), _to_int(VERSION // 0x100), _to_int(VERSION))
+del _to_int
+%}
+%enddef
+EMBED_VERSION(SWIG_VERSION)
+
+%pythoncode%{
+# ===================================
+# Iterator for lldb container objects
+# ===================================
+def lldb_iter(obj, getsize, getelem):
+    """A generator adaptor to support iteration for lldb container objects."""
+    size = getattr(obj, getsize)
+    elem = getattr(obj, getelem)
+    for i in range(size()):
+        yield elem(i)
+%}
+
+%include <std_string.i>
+%include "./python/python-typemaps.swig"
+%include "./macros.swig"
+%include "./headers.swig"
+
+%{
+#include "../source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h"
+#include "../bindings/python/python-swigsafecast.swig"
+using namespace lldb_private;
+using namespace lldb_private::python;
+using namespace lldb;
+%}
+
+%include "./interfaces.swig"
+%include "./python/python-extensions.swig"
+%include "./python/python-wrapper.swig"
+
+%pythoncode%{
+debugger_unique_id = 0
+SBDebugger.Initialize()
+debugger = None
+target = None
+process = None
+thread = None
+frame = None
+%}
diff --git a/src/llvm-project/lldb/bindings/python/createPythonInit.py b/src/llvm-project/lldb/bindings/python/createPythonInit.py
new file mode 100644
index 0000000..3deb915
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/python/createPythonInit.py
@@ -0,0 +1,17 @@
+import os
+import sys
+
+pkgRelDir = sys.argv[1]
+pkgFiles = sys.argv[2:]
+
+getFileName = lambda f: os.path.splitext(os.path.basename(f))[0]
+importNames = ', '.join('"{}"'.format(getFileName(f)) for f in pkgFiles)
+
+script = """__all__ = [{import_names}]
+for x in __all__:
+  __import__('lldb.{pkg_name}.' + x)
+""".format(import_names=importNames, pkg_name=pkgRelDir.replace("/", "."))
+
+pkgIniFile = os.path.normpath(os.path.join(pkgRelDir, "__init__.py"))
+with open(pkgIniFile, "w") as f:
+    f.write(script)
diff --git a/src/llvm-project/lldb/bindings/python/python-extensions.swig b/src/llvm-project/lldb/bindings/python/python-extensions.swig
new file mode 100644
index 0000000..0b23fdd
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/python/python-extensions.swig
@@ -0,0 +1,592 @@
+%extend lldb::SBBreakpoint {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBBroadcaster {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBCommandReturnObject {
+        /* the write() and flush() calls are not part of the SB API proper, and are solely for Python usage
+        they are meant to make an SBCommandReturnObject into a file-like object so that instructions of the sort
+        print >>sb_command_return_object, "something"
+        will work correctly */
+
+        void lldb::SBCommandReturnObject::write (const char* str)
+        {
+            if (str)
+                $self->Printf("%s",str);
+        }
+        void lldb::SBCommandReturnObject::flush ()
+        {}
+}
+
+%extend lldb::SBCompileUnit {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBDeclaration {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBFunction {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBLineEntry {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBModule {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBSection {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+%extend lldb::SBStream {
+        /* the write() and flush() calls are not part of the SB API proper, and are solely for Python usage
+        they are meant to make an SBStream into a file-like object so that instructions of the sort
+        print >>sb_stream, "something"
+        will work correctly */
+
+        void lldb::SBStream::write (const char* str)
+        {
+            if (str)
+                $self->Printf("%s",str);
+        }
+        void lldb::SBStream::flush ()
+        {}
+}
+%extend lldb::SBSymbol {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBTarget {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBTypeFilter {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBTypeNameSpecifier {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBTypeSummary {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBTypeSynthetic {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%extend lldb::SBThread {
+    %pythoncode %{
+        def __eq__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return False
+
+            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
+
+        def __ne__(self, rhs):
+            if not isinstance(rhs, type(self)):
+                return True
+
+            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
+    %}
+}
+
+%pythoncode %{
+
+def command(command_name=None, doc=None):
+    import lldb
+    """A decorator function that registers an LLDB command line
+        command that is bound to the function it is attached to."""
+    def callable(function):
+        """Registers an lldb command for the decorated function."""
+        command = "command script add -f %s.%s %s" % (function.__module__, function.__name__, command_name or function.__name__)
+        lldb.debugger.HandleCommand(command)
+        if doc:
+            function.__doc__ = doc
+        return function
+
+    return callable
+
+class declaration(object):
+    '''A class that represents a source declaration location with file, line and column.'''
+    def __init__(self, file, line, col):
+        self.file = file
+        self.line = line
+        self.col = col
+
+class value_iter(object):
+    def __iter__(self):
+        return self
+
+    def __next__(self):
+        if self.index >= self.length:
+            raise StopIteration()
+        child_sbvalue = self.sbvalue.GetChildAtIndex(self.index)
+        self.index += 1
+        return value(child_sbvalue)
+
+    def next(self):
+        return self.__next__()
+
+    def __init__(self,value):
+        self.index = 0
+        self.sbvalue = value
+        if type(self.sbvalue) is value:
+            self.sbvalue = self.sbvalue.sbvalue
+        self.length = self.sbvalue.GetNumChildren()
+
+class value(object):
+    '''A class designed to wrap lldb.SBValue() objects so the resulting object
+    can be used as a variable would be in code. So if you have a Point structure
+    variable in your code in the current frame named "pt", you can initialize an instance
+    of this class with it:
+
+    pt = lldb.value(lldb.frame.FindVariable("pt"))
+    print pt
+    print pt.x
+    print pt.y
+
+    pt = lldb.value(lldb.frame.FindVariable("rectangle_array"))
+    print rectangle_array[12]
+    print rectangle_array[5].origin.x'''
+    def __init__(self, sbvalue):
+        self.sbvalue = sbvalue
+
+    def __nonzero__(self):
+        return self.sbvalue.__nonzero__()
+
+    def __bool__(self):
+        return self.sbvalue.__bool__()
+
+    def __str__(self):
+        return self.sbvalue.__str__()
+
+    def __getitem__(self, key):
+        # Allow array access if this value has children...
+        if type(key) is value:
+            key = int(key)
+        if type(key) is int:
+            child_sbvalue = (self.sbvalue.GetValueForExpressionPath("[%i]" % key))
+            if child_sbvalue and child_sbvalue.IsValid():
+                return value(child_sbvalue)
+            raise IndexError("Index '%d' is out of range" % key)
+        raise TypeError("No array item of type %s" % str(type(key)))
+
+    def __iter__(self):
+        return value_iter(self.sbvalue)
+
+    def __getattr__(self, name):
+        child_sbvalue = self.sbvalue.GetChildMemberWithName (name)
+        if child_sbvalue and child_sbvalue.IsValid():
+            return value(child_sbvalue)
+        raise AttributeError("Attribute '%s' is not defined" % name)
+
+    def __add__(self, other):
+        return int(self) + int(other)
+
+    def __sub__(self, other):
+        return int(self) - int(other)
+
+    def __mul__(self, other):
+        return int(self) * int(other)
+
+    def __floordiv__(self, other):
+        return int(self) // int(other)
+
+    def __mod__(self, other):
+        return int(self) % int(other)
+
+    def __divmod__(self, other):
+        return int(self) % int(other)
+
+    def __pow__(self, other):
+        return int(self) ** int(other)
+
+    def __lshift__(self, other):
+        return int(self) << int(other)
+
+    def __rshift__(self, other):
+        return int(self) >> int(other)
+
+    def __and__(self, other):
+        return int(self) & int(other)
+
+    def __xor__(self, other):
+        return int(self) ^ int(other)
+
+    def __or__(self, other):
+        return int(self) | int(other)
+
+    def __div__(self, other):
+        return int(self) / int(other)
+
+    def __truediv__(self, other):
+        return int(self) / int(other)
+
+    def __iadd__(self, other):
+        result = self.__add__(other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __isub__(self, other):
+        result = self.__sub__(other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __imul__(self, other):
+        result = self.__mul__(other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __idiv__(self, other):
+        result = self.__div__(other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __itruediv__(self, other):
+        result = self.__truediv__(other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __ifloordiv__(self, other):
+        result =  self.__floordiv__(self, other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __imod__(self, other):
+        result =  self.__and__(self, other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __ipow__(self, other):
+        result = self.__pow__(self, other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __ipow__(self, other, modulo):
+        result = self.__pow__(self, other, modulo)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __ilshift__(self, other):
+        result = self.__lshift__(other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __irshift__(self, other):
+        result =  self.__rshift__(other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __iand__(self, other):
+        result =  self.__and__(self, other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __ixor__(self, other):
+        result =  self.__xor__(self, other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __ior__(self, other):
+        result =  self.__ior__(self, other)
+        self.sbvalue.SetValueFromCString (str(result))
+        return result
+
+    def __neg__(self):
+        return -int(self)
+
+    def __pos__(self):
+        return +int(self)
+
+    def __abs__(self):
+        return abs(int(self))
+
+    def __invert__(self):
+        return ~int(self)
+
+    def __complex__(self):
+        return complex (int(self))
+
+    def __int__(self):
+        is_num,is_sign = is_numeric_type(self.sbvalue.GetType().GetCanonicalType().GetBasicType())
+        if is_num and not is_sign: return self.sbvalue.GetValueAsUnsigned()
+        return self.sbvalue.GetValueAsSigned()
+
+    def __long__(self):
+        return self.__int__()
+
+    def __float__(self):
+        return float (self.sbvalue.GetValueAsSigned())
+
+    def __oct__(self):
+        return '0%o' % self.sbvalue.GetValueAsUnsigned()
+
+    def __hex__(self):
+        return '0x%x' % self.sbvalue.GetValueAsUnsigned()
+
+    def __len__(self):
+        return self.sbvalue.GetNumChildren()
+
+    def __eq__(self, other):
+        if type(other) is int:
+                return int(self) == other
+        elif type(other) is str:
+                return str(self) == other
+        elif type(other) is value:
+                self_err = SBError()
+                other_err = SBError()
+                self_val = self.sbvalue.GetValueAsUnsigned(self_err)
+                if self_err.fail:
+                        raise ValueError("unable to extract value of self")
+                other_val = other.sbvalue.GetValueAsUnsigned(other_err)
+                if other_err.fail:
+                        raise ValueError("unable to extract value of other")
+                return self_val == other_val
+        raise TypeError("Unknown type %s, No equality operation defined." % str(type(other)))
+
+    def __ne__(self, other):
+        return not self.__eq__(other)
+%}
+
+%pythoncode %{
+
+class SBSyntheticValueProvider(object):
+    def __init__(self,valobj):
+        pass
+
+    def num_children(self):
+        return 0
+
+    def get_child_index(self,name):
+        return None
+
+    def get_child_at_index(self,idx):
+        return None
+
+    def update(self):
+        pass
+
+    def has_children(self):
+        return False
+
+
+%}
+
+%pythoncode %{
+
+# given an lldb.SBBasicType it returns a tuple
+# (is_numeric, is_signed)
+# the value of is_signed is undefined if is_numeric == false
+def is_numeric_type(basic_type):
+    if basic_type == eBasicTypeInvalid: return (False,False)
+    if basic_type == eBasicTypeVoid: return (False,False)
+    if basic_type == eBasicTypeChar: return (True,False)
+    if basic_type == eBasicTypeSignedChar: return (True,True)
+    if basic_type == eBasicTypeUnsignedChar: return (True,False)
+    if basic_type == eBasicTypeWChar: return (True,False)
+    if basic_type == eBasicTypeSignedWChar: return (True,True)
+    if basic_type == eBasicTypeUnsignedWChar: return (True,False)
+    if basic_type == eBasicTypeChar16: return (True,False)
+    if basic_type == eBasicTypeChar32: return (True,False)
+    if basic_type == eBasicTypeShort: return (True,True)
+    if basic_type == eBasicTypeUnsignedShort: return (True,False)
+    if basic_type == eBasicTypeInt: return (True,True)
+    if basic_type == eBasicTypeUnsignedInt: return (True,False)
+    if basic_type == eBasicTypeLong: return (True,True)
+    if basic_type == eBasicTypeUnsignedLong: return (True,False)
+    if basic_type == eBasicTypeLongLong: return (True,True)
+    if basic_type == eBasicTypeUnsignedLongLong: return (True,False)
+    if basic_type == eBasicTypeInt128: return (True,True)
+    if basic_type == eBasicTypeUnsignedInt128: return (True,False)
+    if basic_type == eBasicTypeBool: return (False,False)
+    if basic_type == eBasicTypeHalf: return (True,True)
+    if basic_type == eBasicTypeFloat: return (True,True)
+    if basic_type == eBasicTypeDouble: return (True,True)
+    if basic_type == eBasicTypeLongDouble: return (True,True)
+    if basic_type == eBasicTypeFloatComplex: return (True,True)
+    if basic_type == eBasicTypeDoubleComplex: return (True,True)
+    if basic_type == eBasicTypeLongDoubleComplex: return (True,True)
+    if basic_type == eBasicTypeObjCID: return (False,False)
+    if basic_type == eBasicTypeObjCClass: return (False,False)
+    if basic_type == eBasicTypeObjCSel: return (False,False)
+    if basic_type == eBasicTypeNullPtr: return (False,False)
+    #if basic_type == eBasicTypeOther:
+    return (False,False)
+
+%}
diff --git a/src/llvm-project/lldb/scripts/Python/python-swigsafecast.swig b/src/llvm-project/lldb/bindings/python/python-swigsafecast.swig
similarity index 100%
rename from src/llvm-project/lldb/scripts/Python/python-swigsafecast.swig
rename to src/llvm-project/lldb/bindings/python/python-swigsafecast.swig
diff --git a/src/llvm-project/lldb/bindings/python/python-typemaps.swig b/src/llvm-project/lldb/bindings/python/python-typemaps.swig
new file mode 100644
index 0000000..bfd7ef9
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/python/python-typemaps.swig
@@ -0,0 +1,530 @@
+/* Typemap definitions, to allow SWIG to properly handle 'char**' data types. */
+
+%typemap(in) char ** {
+  /* Check if is a list  */
+  if (PythonList::Check($input)) {
+    PythonList list(PyRefType::Borrowed, $input);
+    int size = list.GetSize();
+    int i = 0;
+    $1 = (char**)malloc((size+1)*sizeof(char*));
+    for (i = 0; i < size; i++) {
+      PythonString py_str = list.GetItemAtIndex(i).AsType<PythonString>();
+      if (!py_str.IsAllocated()) {
+        PyErr_SetString(PyExc_TypeError,"list must contain strings");
+        free($1);
+        return nullptr;
+      }
+
+      $1[i] = const_cast<char*>(py_str.GetString().data());
+    }
+    $1[i] = 0;
+  } else if ($input == Py_None) {
+    $1 =  NULL;
+  } else {
+    PyErr_SetString(PyExc_TypeError,"not a list");
+    return NULL;
+  }
+}
+
+%typemap(typecheck) char ** {
+  /* Check if is a list  */
+  $1 = 1;
+  if (PythonList::Check($input)) {
+    PythonList list(PyRefType::Borrowed, $input);
+    int size = list.GetSize();
+    int i = 0;
+    for (i = 0; i < size; i++) {
+      PythonString s = list.GetItemAtIndex(i).AsType<PythonString>();
+      if (!s.IsAllocated()) { $1 = 0; }
+    }
+  }
+  else
+  {
+    $1 = ( ($input == Py_None) ? 1 : 0);
+  }
+}
+
+%typemap(freearg) char** {
+  free((char *) $1);
+}
+
+%typemap(out) char** {
+  int len;
+  int i;
+  len = 0;
+  while ($1[len]) len++;
+  PythonList list(len);
+  for (i = 0; i < len; i++)
+    list.SetItemAtIndex(i, PythonString($1[i]));
+  $result = list.release();
+}
+
+
+%typemap(in) lldb::tid_t {
+  if (PythonInteger::Check($input))
+  {
+    PythonInteger py_int(PyRefType::Borrowed, $input);
+    $1 = static_cast<lldb::tid_t>(py_int.GetInteger());
+  }
+  else
+  {
+    PyErr_SetString(PyExc_ValueError, "Expecting an integer");
+    return nullptr;
+  }
+}
+
+%typemap(in) lldb::StateType {
+  if (PythonInteger::Check($input))
+  {
+    PythonInteger py_int(PyRefType::Borrowed, $input);
+    int64_t state_type_value = py_int.GetInteger() ;
+
+    if (state_type_value > lldb::StateType::kLastStateType) {
+      PyErr_SetString(PyExc_ValueError, "Not a valid StateType value");
+      return nullptr;
+    }
+    $1 = static_cast<lldb::StateType>(state_type_value);
+  }
+  else
+  {
+    PyErr_SetString(PyExc_ValueError, "Expecting an integer");
+    return nullptr;
+  }
+}
+
+/* Typemap definitions to allow SWIG to properly handle char buffer. */
+
+// typemap for a char buffer
+%typemap(in) (char *dst, size_t dst_len) {
+   if (!PyInt_Check($input)) {
+       PyErr_SetString(PyExc_ValueError, "Expecting an integer");
+       return NULL;
+   }
+   $2 = PyInt_AsLong($input);
+   if ($2 <= 0) {
+       PyErr_SetString(PyExc_ValueError, "Positive integer expected");
+       return NULL;
+   }
+   $1 = (char *) malloc($2);
+}
+// SBProcess::ReadCStringFromMemory() uses a void*, but needs to be treated
+// as char data instead of byte data.
+%typemap(in) (void *char_buf, size_t size) = (char *dst, size_t dst_len);
+
+// Return the char buffer.  Discarding any previous return result
+%typemap(argout) (char *dst, size_t dst_len) {
+   Py_XDECREF($result);   /* Blow away any previous result */
+   if (result == 0) {
+      PythonString string("");
+      $result = string.release();
+      Py_INCREF($result);
+   } else {
+      llvm::StringRef ref(static_cast<const char*>($1), result);
+      PythonString string(ref);
+      $result = string.release();
+   }
+   free($1);
+}
+// SBProcess::ReadCStringFromMemory() uses a void*, but needs to be treated
+// as char data instead of byte data.
+%typemap(argout) (void *char_buf, size_t size) = (char *dst, size_t dst_len);
+
+
+// typemap for handling an snprintf-like API like SBThread::GetStopDescription.
+%typemap(in) (char *dst_or_null, size_t dst_len) {
+   if (!PyInt_Check($input)) {
+       PyErr_SetString(PyExc_ValueError, "Expecting an integer");
+       return NULL;
+   }
+   $2 = PyInt_AsLong($input);
+   if ($2 <= 0) {
+       PyErr_SetString(PyExc_ValueError, "Positive integer expected");
+       return NULL;
+   }
+   $1 = (char *) malloc($2);
+}
+%typemap(argout) (char *dst_or_null, size_t dst_len) {
+   Py_XDECREF($result);   /* Blow away any previous result */
+   llvm::StringRef ref($1);
+   PythonString string(ref);
+   $result = string.release();
+   free($1);
+}
+
+
+// typemap for an outgoing buffer
+// See also SBEvent::SBEvent(uint32_t event, const char *cstr, uint32_t cstr_len).
+// Ditto for SBProcess::PutSTDIN(const char *src, size_t src_len).
+%typemap(in) (const char *cstr, uint32_t cstr_len),
+             (const char *src, size_t src_len) {
+   if (PythonString::Check($input)) {
+      PythonString str(PyRefType::Borrowed, $input);
+      $1 = (char*)str.GetString().data();
+      $2 = str.GetSize();
+   }
+   else if(PythonByteArray::Check($input)) {
+      PythonByteArray bytearray(PyRefType::Borrowed, $input);
+      $1 = (char*)bytearray.GetBytes().data();
+      $2 = bytearray.GetSize();
+   }
+   else if (PythonBytes::Check($input)) {
+      PythonBytes bytes(PyRefType::Borrowed, $input);
+      $1 = (char*)bytes.GetBytes().data();
+      $2 = bytes.GetSize();
+   }
+   else {
+      PyErr_SetString(PyExc_ValueError, "Expecting a string");
+      return NULL;
+   }
+}
+// For SBProcess::WriteMemory, SBTarget::GetInstructions and SBDebugger::DispatchInput.
+%typemap(in) (const void *buf, size_t size),
+             (const void *data, size_t data_len) {
+   if (PythonString::Check($input)) {
+      PythonString str(PyRefType::Borrowed, $input);
+      $1 = (void*)str.GetString().data();
+      $2 = str.GetSize();
+   }
+   else if(PythonByteArray::Check($input)) {
+      PythonByteArray bytearray(PyRefType::Borrowed, $input);
+      $1 = (void*)bytearray.GetBytes().data();
+      $2 = bytearray.GetSize();
+   }
+   else if (PythonBytes::Check($input)) {
+      PythonBytes bytes(PyRefType::Borrowed, $input);
+      $1 = (void*)bytes.GetBytes().data();
+      $2 = bytes.GetSize();
+   }
+   else {
+      PyErr_SetString(PyExc_ValueError, "Expecting a buffer");
+      return NULL;
+   }
+}
+
+// typemap for an incoming buffer
+// See also SBProcess::ReadMemory.
+%typemap(in) (void *buf, size_t size) {
+   if (PyInt_Check($input)) {
+      $2 = PyInt_AsLong($input);
+   } else if (PyLong_Check($input)) {
+      $2 = PyLong_AsLong($input);
+   } else {
+      PyErr_SetString(PyExc_ValueError, "Expecting an integer or long object");
+      return NULL;
+   }
+   if ($2 <= 0) {
+       PyErr_SetString(PyExc_ValueError, "Positive integer expected");
+       return NULL;
+   }
+   $1 = (void *) malloc($2);
+}
+
+// Return the buffer.  Discarding any previous return result
+// See also SBProcess::ReadMemory.
+%typemap(argout) (void *buf, size_t size) {
+   Py_XDECREF($result);   /* Blow away any previous result */
+   if (result == 0) {
+      $result = Py_None;
+      Py_INCREF($result);
+   } else {
+      PythonBytes bytes(static_cast<const uint8_t*>($1), result);
+      $result = bytes.release();
+   }
+   free($1);
+}
+
+%{
+namespace {
+template <class T>
+T PyLongAsT(PyObject *obj) {
+  static_assert(true, "unsupported type");
+}
+
+template <> uint64_t PyLongAsT<uint64_t>(PyObject *obj) {
+  return static_cast<uint64_t>(PyLong_AsUnsignedLongLong(obj));
+}
+
+template <> uint32_t PyLongAsT<uint32_t>(PyObject *obj) {
+  return static_cast<uint32_t>(PyLong_AsUnsignedLong(obj));
+}
+
+template <> int64_t PyLongAsT<int64_t>(PyObject *obj) {
+  return static_cast<int64_t>(PyLong_AsLongLong(obj));
+}
+
+template <> int32_t PyLongAsT<int32_t>(PyObject *obj) {
+  return static_cast<int32_t>(PyLong_AsLong(obj));
+}
+
+template <class T>
+bool SetNumberFromPyObject(T &number, PyObject *obj) {
+  if (PyInt_Check(obj))
+    number = static_cast<T>(PyInt_AsLong(obj));
+  else if (PyLong_Check(obj))
+    number = PyLongAsT<T>(obj);
+  else return false;
+
+  return true;
+}
+
+template <>
+bool SetNumberFromPyObject<double>(double &number, PyObject *obj) {
+  if (PyFloat_Check(obj)) {
+    number = PyFloat_AsDouble(obj);
+    return true;
+  }
+
+  return false;
+}
+
+} // namespace
+%}
+
+// these typemaps allow Python users to pass list objects
+// and have them turn into C++ arrays (this is useful, for instance
+// when creating SBData objects from lists of numbers)
+%typemap(in) (uint64_t* array, size_t array_len),
+             (uint32_t* array, size_t array_len),
+             (int64_t* array, size_t array_len),
+             (int32_t* array, size_t array_len),
+             (double* array, size_t array_len) {
+  /* Check if is a list  */
+  if (PyList_Check($input)) {
+    int size = PyList_Size($input);
+    int i = 0;
+    $2 = size;
+    $1 = ($1_type) malloc(size * sizeof($*1_type));
+    for (i = 0; i < size; i++) {
+      PyObject *o = PyList_GetItem($input,i);
+      if (!SetNumberFromPyObject($1[i], o)) {
+        PyErr_SetString(PyExc_TypeError,"list must contain numbers");
+        free($1);
+        return NULL;
+      }
+
+      if (PyErr_Occurred()) {
+        free($1);
+        return NULL;
+      }
+    }
+  } else if ($input == Py_None) {
+    $1 =  NULL;
+    $2 = 0;
+  } else {
+    PyErr_SetString(PyExc_TypeError,"not a list");
+    return NULL;
+  }
+}
+
+%typemap(freearg) (uint64_t* array, size_t array_len),
+                  (uint32_t* array, size_t array_len),
+                  (int64_t* array, size_t array_len),
+                  (int32_t* array, size_t array_len),
+                  (double* array, size_t array_len) {
+  free($1);
+}
+
+// these typemaps wrap SBModule::GetVersion() from requiring a memory buffer
+// to the more Pythonic style where a list is returned and no previous allocation
+// is necessary - this will break if more than 50 versions are ever returned
+%typemap(typecheck) (uint32_t *versions, uint32_t num_versions) {
+    $1 = ($input == Py_None ? 1 : 0);
+}
+
+%typemap(in, numinputs=0) (uint32_t *versions) {
+    $1 = (uint32_t*)malloc(sizeof(uint32_t) * 50);
+}
+
+%typemap(in, numinputs=0) (uint32_t num_versions) {
+    $1 = 50;
+}
+
+%typemap(argout) (uint32_t *versions, uint32_t num_versions) {
+    uint32_t count = result;
+    if (count >= $2)
+        count = $2;
+    PyObject* list = PyList_New(count);
+    for (uint32_t j = 0; j < count; j++)
+    {
+        PyObject* item = PyInt_FromLong($1[j]);
+        int ok = PyList_SetItem(list,j,item);
+        if (ok != 0)
+        {
+            $result = Py_None;
+            break;
+        }
+    }
+    $result = list;
+}
+
+%typemap(freearg) (uint32_t *versions) {
+    free($1);
+}
+
+
+// For Log::LogOutputCallback
+%typemap(in) (lldb::LogOutputCallback log_callback, void *baton) {
+  if (!($input == Py_None || PyCallable_Check(reinterpret_cast<PyObject*>($input)))) {
+    PyErr_SetString(PyExc_TypeError, "Need a callable object or None!");
+    return NULL;
+  }
+
+  // FIXME (filcab): We can't currently check if our callback is already
+  // LLDBSwigPythonCallPythonLogOutputCallback (to DECREF the previous
+  // baton) nor can we just remove all traces of a callback, if we want to
+  // revert to a file logging mechanism.
+
+  // Don't lose the callback reference
+  Py_INCREF($input);
+  $1 = LLDBSwigPythonCallPythonLogOutputCallback;
+  $2 = $input;
+}
+
+%typemap(typecheck) (lldb::LogOutputCallback log_callback, void *baton) {
+  $1 = $input == Py_None;
+  $1 = $1 || PyCallable_Check(reinterpret_cast<PyObject*>($input));
+}
+
+
+%typemap(in) lldb::FileSP {
+  PythonFile py_file(PyRefType::Borrowed, $input);
+  if (!py_file) {
+    PyErr_SetString(PyExc_TypeError, "not a file");
+    return nullptr;
+  }
+  auto sp = unwrapOrSetPythonException(py_file.ConvertToFile());
+  if (!sp)
+    return nullptr;
+  $1 = sp;
+}
+
+%typemap(in) lldb::FileSP FORCE_IO_METHODS {
+  PythonFile py_file(PyRefType::Borrowed, $input);
+  if (!py_file) {
+    PyErr_SetString(PyExc_TypeError, "not a file");
+    return nullptr;
+  }
+  auto sp = unwrapOrSetPythonException(py_file.ConvertToFileForcingUseOfScriptingIOMethods());
+  if (!sp)
+    return nullptr;
+  $1 = sp;
+}
+
+%typemap(in) lldb::FileSP BORROWED {
+  PythonFile py_file(PyRefType::Borrowed, $input);
+  if (!py_file) {
+    PyErr_SetString(PyExc_TypeError, "not a file");
+    return nullptr;
+  }
+  auto sp = unwrapOrSetPythonException(py_file.ConvertToFile(/*borrowed=*/true));
+  if (!sp)
+    return nullptr;
+  $1 = sp;
+}
+
+%typemap(in) lldb::FileSP BORROWED_FORCE_IO_METHODS {
+  PythonFile py_file(PyRefType::Borrowed, $input);
+  if (!py_file) {
+    PyErr_SetString(PyExc_TypeError, "not a file");
+    return nullptr;
+  }
+  auto sp = unwrapOrSetPythonException(py_file.ConvertToFileForcingUseOfScriptingIOMethods(/*borrowed=*/true));
+  if (!sp)
+    return nullptr;
+  $1 = sp;
+}
+
+%typecheck(SWIG_TYPECHECK_POINTER) lldb::FileSP {
+  if (PythonFile::Check($input)) {
+    $1 = 1;
+  } else {
+    PyErr_Clear();
+    $1 = 0;
+  }
+}
+
+%typemap(out) lldb::FileSP {
+  $result = nullptr;
+  lldb::FileSP &sp = $1;
+  if (sp) {
+    PythonFile pyfile = unwrapOrSetPythonException(PythonFile::FromFile(*sp));
+    if (!pyfile.IsValid())
+      return nullptr;
+    $result = pyfile.release();
+  }
+  if (!$result)
+  {
+      $result = Py_None;
+      Py_INCREF(Py_None);
+  }
+}
+
+%typemap(in) (const char* string, int len) {
+    if ($input == Py_None)
+    {
+        $1 = NULL;
+        $2 = 0;
+    }
+    else if (PythonString::Check($input))
+    {
+        PythonString py_str(PyRefType::Borrowed, $input);
+        llvm::StringRef str = py_str.GetString();
+        $1 = const_cast<char*>(str.data());
+        $2 = str.size();
+        // In Python 2, if $input is a PyUnicode object then this
+        // will trigger a Unicode -> String conversion, in which
+        // case the `PythonString` will now own the PyString.  Thus
+        // if it goes out of scope, the data will be deleted.  The
+        // only way to avoid this is to leak the Python object in
+        // that case.  Note that if there was no conversion, then
+        // releasing the string will not leak anything, since we
+        // created this as a borrowed reference.
+        py_str.release();
+    }
+    else
+    {
+        PyErr_SetString(PyExc_TypeError,"not a string-like object");
+        return NULL;
+    }
+}
+
+// These two pybuffer macros are copied out of swig/Lib/python/pybuffer.i,
+// and fixed so they will not crash if PyObject_GetBuffer fails.
+// https://github.com/swig/swig/issues/1640
+
+%define %pybuffer_mutable_binary(TYPEMAP, SIZE)
+%typemap(in) (TYPEMAP, SIZE) {
+  int res; Py_ssize_t size = 0; void *buf = 0;
+  Py_buffer view;
+  res = PyObject_GetBuffer($input, &view, PyBUF_WRITABLE);
+  if (res < 0) {
+    PyErr_Clear();
+    %argument_fail(res, "(TYPEMAP, SIZE)", $symname, $argnum);
+  }
+  size = view.len;
+  buf = view.buf;
+  PyBuffer_Release(&view);
+  $1 = ($1_ltype) buf;
+  $2 = ($2_ltype) (size/sizeof($*1_type));
+}
+%enddef
+
+%define %pybuffer_binary(TYPEMAP, SIZE)
+%typemap(in) (TYPEMAP, SIZE) {
+  int res; Py_ssize_t size = 0; const void *buf = 0;
+  Py_buffer view;
+  res = PyObject_GetBuffer($input, &view, PyBUF_CONTIG_RO);
+  if (res < 0) {
+    PyErr_Clear();
+    %argument_fail(res, "(TYPEMAP, SIZE)", $symname, $argnum);
+  }
+  size = view.len;
+  buf = view.buf;
+  PyBuffer_Release(&view);
+  $1 = ($1_ltype) buf;
+  $2 = ($2_ltype) (size / sizeof($*1_type));
+}
+%enddef
+
+%pybuffer_binary(const uint8_t *buf, size_t num_bytes);
+%pybuffer_mutable_binary(uint8_t *buf, size_t num_bytes);
diff --git a/src/llvm-project/lldb/bindings/python/python-wrapper.swig b/src/llvm-project/lldb/bindings/python/python-wrapper.swig
new file mode 100644
index 0000000..3a63165
--- /dev/null
+++ b/src/llvm-project/lldb/bindings/python/python-wrapper.swig
@@ -0,0 +1,1074 @@
+%header %{
+
+template <typename T>
+PyObject *
+SBTypeToSWIGWrapper (T* item);
+
+class PyErr_Cleaner
+{
+public:
+    PyErr_Cleaner(bool print=false) :
+    m_print(print)
+    {
+    }
+
+    ~PyErr_Cleaner()
+    {
+        if (PyErr_Occurred())
+        {
+            if(m_print && !PyErr_ExceptionMatches(PyExc_SystemExit))
+                PyErr_Print();
+            PyErr_Clear();
+        }
+    }
+
+private:
+    bool m_print;
+};
+
+%}
+
+%wrapper %{
+
+// resolve a dotted Python name in the form
+// foo.bar.baz.Foobar to an actual Python object
+// if pmodule is NULL, the __main__ module will be used
+// as the starting point for the search
+
+
+// This function is called by lldb_private::ScriptInterpreterPython::BreakpointCallbackFunction(...)
+// and is used when a script command is attached to a breakpoint for execution.
+
+SWIGEXPORT llvm::Expected<bool>
+LLDBSwigPythonBreakpointCallbackFunction
+(
+    const char *python_function_name,
+    const char *session_dictionary_name,
+    const lldb::StackFrameSP& frame_sp,
+    const lldb::BreakpointLocationSP& bp_loc_sp,
+    lldb_private::StructuredDataImpl *args_impl
+)
+{
+    using namespace llvm;
+
+    lldb::SBFrame sb_frame (frame_sp);
+    lldb::SBBreakpointLocation sb_bp_loc(bp_loc_sp);
+
+    PyErr_Cleaner py_err_cleaner(true);
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
+
+    unsigned max_positional_args;
+    if (auto arg_info = pfunc.GetArgInfo())
+        max_positional_args = arg_info.get().max_positional_args;
+    else
+        return arg_info.takeError();
+
+    PythonObject frame_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_frame));
+    PythonObject bp_loc_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_bp_loc));
+
+    auto result = [&] () -> Expected<PythonObject> {
+        // If the called function doesn't take extra_args, drop them here:
+        if (max_positional_args < 4) {
+            return pfunc.Call(frame_arg, bp_loc_arg, dict);
+        } else {
+            lldb::SBStructuredData *args_value = new lldb::SBStructuredData(args_impl);
+            PythonObject args_arg(PyRefType::Owned, SBTypeToSWIGWrapper(args_value));
+            return pfunc.Call(frame_arg, bp_loc_arg, args_arg, dict);
+        }
+    } ();
+
+    if (!result)
+        return result.takeError();
+
+    // Only False counts as false!
+    return result.get().get() != Py_False;
+}
+
+// This function is called by lldb_private::ScriptInterpreterPython::WatchpointCallbackFunction(...)
+// and is used when a script command is attached to a watchpoint for execution.
+
+SWIGEXPORT bool
+LLDBSwigPythonWatchpointCallbackFunction
+(
+    const char *python_function_name,
+    const char *session_dictionary_name,
+    const lldb::StackFrameSP& frame_sp,
+    const lldb::WatchpointSP& wp_sp
+)
+{
+    lldb::SBFrame sb_frame (frame_sp);
+    lldb::SBWatchpoint sb_wp(wp_sp);
+
+    bool stop_at_watchpoint = true;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
+
+    if (!pfunc.IsAllocated())
+        return stop_at_watchpoint;
+
+    PythonObject frame_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_frame));
+    PythonObject wp_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_wp));
+    PythonObject result = pfunc(frame_arg, wp_arg, dict);
+
+    if (result.get() == Py_False)
+        stop_at_watchpoint = false;
+
+    return stop_at_watchpoint;
+}
+
+SWIGEXPORT bool
+LLDBSwigPythonCallTypeScript
+(
+    const char *python_function_name,
+    const void *session_dictionary,
+    const lldb::ValueObjectSP& valobj_sp,
+    void** pyfunct_wrapper,
+    const lldb::TypeSummaryOptionsSP& options_sp,
+    std::string& retval
+)
+{
+    lldb::SBValue sb_value (valobj_sp);
+    lldb::SBTypeSummaryOptions sb_options(options_sp.get());
+
+    retval.clear();
+
+    if (!python_function_name || !session_dictionary)
+        return false;
+
+    PyObject *pfunc_impl = nullptr;
+
+    if (pyfunct_wrapper && *pyfunct_wrapper && PyFunction_Check (*pyfunct_wrapper))
+    {
+        pfunc_impl = (PyObject*)(*pyfunct_wrapper);
+        if (pfunc_impl->ob_refcnt == 1)
+        {
+            Py_XDECREF(pfunc_impl);
+            pfunc_impl = NULL;
+        }
+    }
+
+    PyObject *py_dict = (PyObject*)session_dictionary;
+    if (!PythonDictionary::Check(py_dict))
+        return true;
+
+    PythonDictionary dict(PyRefType::Borrowed, py_dict);
+
+    PyErr_Cleaner pyerr_cleanup(true);  // show Python errors
+
+    PythonCallable pfunc(PyRefType::Borrowed, pfunc_impl);
+
+    if (!pfunc.IsAllocated())
+    {
+        pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
+        if (!pfunc.IsAllocated())
+            return false;
+
+        if (pyfunct_wrapper)
+        {
+            *pyfunct_wrapper = pfunc.get();
+            Py_XINCREF(pfunc.get());
+        }
+    }
+
+    PythonObject result;
+    auto argc = pfunc.GetArgInfo();
+    if (!argc) {
+        llvm::consumeError(argc.takeError());
+        return false;
+    }
+
+    PythonObject value_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_value));
+    PythonObject options_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_options));
+
+    if (argc.get().max_positional_args < 3)
+        result = pfunc(value_arg,dict);
+    else
+        result = pfunc(value_arg,dict,options_arg);
+
+    retval = result.Str().GetString().str();
+
+    return true;
+}
+
+SWIGEXPORT void*
+LLDBSwigPythonCreateSyntheticProvider
+(
+    const char *python_class_name,
+    const char *session_dictionary_name,
+    const lldb::ValueObjectSP& valobj_sp
+)
+{
+    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
+        Py_RETURN_NONE;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name,dict);
+
+    if (!pfunc.IsAllocated())
+        Py_RETURN_NONE;
+
+    // I do not want the SBValue to be deallocated when going out of scope because python
+    // has ownership of it and will manage memory for this object by itself
+    lldb::SBValue *sb_value = new lldb::SBValue(valobj_sp);
+    sb_value->SetPreferSyntheticValue(false);
+
+    PythonObject val_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_value));
+    if (!val_arg.IsAllocated())
+        Py_RETURN_NONE;
+
+    PythonObject result = pfunc(val_arg, dict);
+
+    if (result.IsAllocated())
+        return result.release();
+
+    Py_RETURN_NONE;
+}
+
+SWIGEXPORT void*
+LLDBSwigPythonCreateCommandObject
+(
+    const char *python_class_name,
+    const char *session_dictionary_name,
+    const lldb::DebuggerSP debugger_sp
+)
+{
+    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
+        Py_RETURN_NONE;
+
+    PyErr_Cleaner py_err_cleaner(true);
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
+
+    if (!pfunc.IsAllocated())
+        return nullptr;
+
+    lldb::SBDebugger debugger_sb(debugger_sp);
+    PythonObject debugger_arg(PyRefType::Owned, SBTypeToSWIGWrapper(debugger_sb));
+    PythonObject result = pfunc(debugger_arg, dict);
+
+    if (result.IsAllocated())
+        return result.release();
+
+    Py_RETURN_NONE;
+}
+
+SWIGEXPORT void*
+LLDBSwigPythonCreateScriptedThreadPlan
+(
+    const char *python_class_name,
+    const char *session_dictionary_name,
+    lldb_private::StructuredDataImpl *args_impl,
+    std::string &error_string,
+    const lldb::ThreadPlanSP& thread_plan_sp
+)
+{
+    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
+        Py_RETURN_NONE;
+
+    // I do not want the SBThreadPlan to be deallocated when going out of scope because python
+    // has ownership of it and will manage memory for this object by itself
+    lldb::SBThreadPlan *tp_value = new lldb::SBThreadPlan(thread_plan_sp);
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
+
+    if (!pfunc.IsAllocated()) {
+        error_string.append("could not find script class: ");
+        error_string.append(python_class_name);
+        return nullptr;
+    }
+
+    PythonObject tp_arg(PyRefType::Owned, SBTypeToSWIGWrapper(tp_value));
+
+    if (!tp_arg.IsAllocated())
+        Py_RETURN_NONE;
+
+    llvm::Expected<PythonCallable::ArgInfo> arg_info = pfunc.GetArgInfo();
+    if (!arg_info) {
+        llvm::handleAllErrors(
+            arg_info.takeError(),
+            [&](PythonException &E) {
+                error_string.append(E.ReadBacktrace());
+            },
+            [&](const llvm::ErrorInfoBase &E) {
+                error_string.append(E.message());
+            });
+        Py_RETURN_NONE;
+    }
+
+    PythonObject result = {};
+    if (arg_info.get().max_positional_args == 2) {
+        if (args_impl != nullptr) {
+           error_string.assign("args passed, but __init__ does not take an args dictionary");
+           Py_RETURN_NONE;
+        }
+        result = pfunc(tp_arg, dict);
+    } else if (arg_info.get().max_positional_args >= 3) {
+        lldb::SBStructuredData *args_value = new lldb::SBStructuredData(args_impl);
+        PythonObject args_arg(PyRefType::Owned, SBTypeToSWIGWrapper(args_value));
+        result = pfunc(tp_arg, args_arg, dict);
+    } else {
+        error_string.assign("wrong number of arguments in __init__, should be 2 or 3 (not including self)");
+        Py_RETURN_NONE;
+    }
+
+    // FIXME: At this point we should check that the class we found supports all the methods
+    // that we need.
+
+    if (result.IsAllocated())
+        return result.release();
+    Py_RETURN_NONE;
+}
+
+SWIGEXPORT bool
+LLDBSWIGPythonCallThreadPlan
+(
+    void *implementor,
+    const char *method_name,
+    lldb_private::Event *event,
+    bool &got_error
+)
+{
+    got_error = false;
+
+    PyErr_Cleaner py_err_cleaner(false);
+    PythonObject self(PyRefType::Borrowed, static_cast<PyObject*>(implementor));
+    auto pfunc = self.ResolveName<PythonCallable>(method_name);
+
+    if (!pfunc.IsAllocated())
+        return false;
+
+    PythonObject result;
+    if (event != nullptr)
+    {
+        lldb::SBEvent sb_event(event);
+        PythonObject event_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_event));
+        result = pfunc(event_arg);
+    }
+    else
+        result = pfunc();
+
+    if (PyErr_Occurred())
+    {
+        got_error = true;
+        printf ("Return value was neither false nor true for call to %s.\n", method_name);
+        PyErr_Print();
+        return false;
+    }
+
+    if (result.get() == Py_True)
+        return true;
+    else if (result.get() == Py_False)
+        return false;
+
+    // Somebody returned the wrong thing...
+    got_error = true;
+    printf ("Wrong return value type for call to %s.\n", method_name);
+    return false;
+}
+
+SWIGEXPORT void *
+LLDBSwigPythonCreateScriptedBreakpointResolver
+(
+    const char *python_class_name,
+    const char *session_dictionary_name,
+    lldb_private::StructuredDataImpl *args_impl,
+    lldb::BreakpointSP &breakpoint_sp
+)
+{
+    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
+        Py_RETURN_NONE;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
+
+    if (!pfunc.IsAllocated())
+        return nullptr;
+
+    lldb::SBBreakpoint *bkpt_value = new lldb::SBBreakpoint(breakpoint_sp);
+
+    PythonObject bkpt_arg(PyRefType::Owned, SBTypeToSWIGWrapper(bkpt_value));
+
+    lldb::SBStructuredData *args_value = new lldb::SBStructuredData(args_impl);
+    PythonObject args_arg(PyRefType::Owned, SBTypeToSWIGWrapper(args_value));
+
+    PythonObject result = pfunc(bkpt_arg, args_arg, dict);
+    // FIXME: At this point we should check that the class we found supports all the methods
+    // that we need.
+
+    if (result.IsAllocated())
+    {
+        // Check that __callback__ is defined:
+        auto callback_func = result.ResolveName<PythonCallable>("__callback__");
+        if (callback_func.IsAllocated())
+            return result.release();
+        else
+            result.release();
+    }
+    Py_RETURN_NONE;
+}
+
+SWIGEXPORT unsigned int
+LLDBSwigPythonCallBreakpointResolver
+(
+    void *implementor,
+    const char *method_name,
+    lldb_private::SymbolContext *sym_ctx
+)
+{
+    PyErr_Cleaner py_err_cleaner(false);
+    PythonObject self(PyRefType::Borrowed, static_cast<PyObject*>(implementor));
+    auto pfunc = self.ResolveName<PythonCallable>(method_name);
+
+    if (!pfunc.IsAllocated())
+        return 0;
+
+    PythonObject result;
+    if (sym_ctx != nullptr) {
+      lldb::SBSymbolContext sb_sym_ctx(sym_ctx);
+      PythonObject sym_ctx_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_sym_ctx));
+      result = pfunc(sym_ctx_arg);
+    } else
+      result = pfunc();
+
+    if (PyErr_Occurred())
+    {
+        PyErr_Print();
+        return 0;
+    }
+
+    // The callback will return a bool, but we're need to also return ints
+    // so we're squirrelling the bool through as an int...  And if you return
+    // nothing, we'll continue.
+    if (strcmp(method_name, "__callback__") == 0) {
+        if (result.get() == Py_False)
+          return 0;
+        else
+          return 1;
+    }
+
+    PythonInteger int_result = result.AsType<PythonInteger>();
+    if (!int_result.IsAllocated())
+        return 0;
+
+    unsigned int ret_val = int_result.GetInteger();
+
+    return ret_val;
+}
+
+// wrapper that calls an optional instance member of an object taking no arguments
+static PyObject*
+LLDBSwigPython_CallOptionalMember
+(
+    PyObject* implementor,
+    char* callee_name,
+    PyObject* ret_if_not_found = Py_None,
+    bool* was_found = NULL
+)
+{
+    PyErr_Cleaner py_err_cleaner(false);
+
+    PythonObject self(PyRefType::Borrowed, static_cast<PyObject*>(implementor));
+    auto pfunc = self.ResolveName<PythonCallable>(callee_name);
+
+    if (!pfunc.IsAllocated())
+    {
+        if (was_found)
+            *was_found = false;
+        Py_XINCREF(ret_if_not_found);
+        return ret_if_not_found;
+    }
+
+    if (was_found)
+        *was_found = true;
+
+    PythonObject result = pfunc();
+    return result.release();
+}
+
+SWIGEXPORT size_t
+LLDBSwigPython_CalculateNumChildren
+(
+    PyObject *implementor,
+    uint32_t max
+)
+{
+    PythonObject self(PyRefType::Borrowed, implementor);
+    auto pfunc = self.ResolveName<PythonCallable>("num_children");
+
+    if (!pfunc.IsAllocated())
+        return 0;
+
+    auto arg_info = pfunc.GetArgInfo();
+    if (!arg_info) {
+        llvm::consumeError(arg_info.takeError());
+        return 0;
+    }
+
+    PythonObject result;
+
+    if (arg_info.get().max_positional_args < 1)
+        result = pfunc();
+    else
+        result = pfunc(PythonInteger(max));
+
+    if (!result.IsAllocated())
+        return 0;
+
+    PythonInteger int_result = result.AsType<PythonInteger>();
+    if (!int_result.IsAllocated())
+        return 0;
+
+    size_t ret_val = int_result.GetInteger();
+
+    if (PyErr_Occurred()) //FIXME use Expected to catch python exceptions
+    {
+        PyErr_Print();
+        PyErr_Clear();
+    }
+
+    if (arg_info.get().max_positional_args < 1)
+        ret_val = std::min(ret_val, static_cast<size_t>(max));
+
+    return ret_val;
+}
+
+SWIGEXPORT PyObject*
+LLDBSwigPython_GetChildAtIndex
+(
+    PyObject *implementor,
+    uint32_t idx
+)
+{
+    PyErr_Cleaner py_err_cleaner(true);
+
+    PythonObject self(PyRefType::Borrowed, implementor);
+    auto pfunc = self.ResolveName<PythonCallable>("get_child_at_index");
+
+    if (!pfunc.IsAllocated())
+        return nullptr;
+
+    PythonObject result = pfunc(PythonInteger(idx));
+
+    if (!result.IsAllocated())
+        return nullptr;
+
+    lldb::SBValue* sbvalue_ptr = nullptr;
+    if (SWIG_ConvertPtr(result.get(), (void**)&sbvalue_ptr, SWIGTYPE_p_lldb__SBValue, 0) == -1)
+        return nullptr;
+
+    if (sbvalue_ptr == nullptr)
+        return nullptr;
+
+    return result.release();
+}
+
+SWIGEXPORT int
+LLDBSwigPython_GetIndexOfChildWithName
+(
+    PyObject *implementor,
+    const char* child_name
+)
+{
+    PyErr_Cleaner py_err_cleaner(true);
+
+    PythonObject self(PyRefType::Borrowed, implementor);
+    auto pfunc = self.ResolveName<PythonCallable>("get_child_index");
+
+    if (!pfunc.IsAllocated())
+        return UINT32_MAX;
+
+    PythonObject result = pfunc(PythonString(child_name));
+
+    if (!result.IsAllocated())
+        return UINT32_MAX;
+
+    PythonInteger int_result = result.AsType<PythonInteger>();
+    if (!int_result.IsAllocated())
+        return UINT32_MAX;
+
+    int64_t retval = int_result.GetInteger();
+    if (retval >= 0)
+        return (uint32_t)retval;
+
+    return UINT32_MAX;
+}
+
+SWIGEXPORT bool
+LLDBSwigPython_UpdateSynthProviderInstance
+(
+    PyObject *implementor
+)
+{
+    bool ret_val = false;
+
+    static char callee_name[] = "update";
+
+    PyObject* py_return = LLDBSwigPython_CallOptionalMember(implementor,callee_name);
+
+    if (py_return == Py_True)
+        ret_val = true;
+
+    Py_XDECREF(py_return);
+
+    return ret_val;
+}
+
+SWIGEXPORT bool
+LLDBSwigPython_MightHaveChildrenSynthProviderInstance
+(
+    PyObject *implementor
+)
+{
+    bool ret_val = false;
+
+    static char callee_name[] = "has_children";
+
+    PyObject* py_return = LLDBSwigPython_CallOptionalMember(implementor,callee_name, Py_True);
+
+    if (py_return == Py_True)
+        ret_val = true;
+
+    Py_XDECREF(py_return);
+
+    return ret_val;
+}
+
+SWIGEXPORT PyObject*
+LLDBSwigPython_GetValueSynthProviderInstance
+(
+    PyObject *implementor
+)
+{
+    PyObject* ret_val = nullptr;
+
+    static char callee_name[] = "get_value";
+
+    PyObject* py_return = LLDBSwigPython_CallOptionalMember(implementor,callee_name, Py_None);
+
+    if (py_return == Py_None || py_return == nullptr)
+        ret_val = nullptr;
+
+    lldb::SBValue* sbvalue_ptr = NULL;
+
+    if (SWIG_ConvertPtr(py_return, (void**)&sbvalue_ptr, SWIGTYPE_p_lldb__SBValue, 0) == -1)
+        ret_val = nullptr;
+    else if (sbvalue_ptr == NULL)
+        ret_val = nullptr;
+    else
+        ret_val = py_return;
+
+    Py_XDECREF(py_return);
+    return ret_val;
+}
+
+SWIGEXPORT void*
+LLDBSWIGPython_CastPyObjectToSBValue
+(
+    PyObject* data
+)
+{
+    lldb::SBValue* sb_ptr = NULL;
+
+    int valid_cast = SWIG_ConvertPtr(data, (void**)&sb_ptr, SWIGTYPE_p_lldb__SBValue, 0);
+
+    if (valid_cast == -1)
+        return NULL;
+
+    return sb_ptr;
+}
+
+SWIGEXPORT bool
+LLDBSwigPythonCallCommand
+(
+    const char *python_function_name,
+    const char *session_dictionary_name,
+    lldb::DebuggerSP& debugger,
+    const char* args,
+    lldb_private::CommandReturnObject& cmd_retobj,
+    lldb::ExecutionContextRefSP exe_ctx_ref_sp
+)
+{
+    lldb::SBCommandReturnObject cmd_retobj_sb(cmd_retobj);
+    lldb::SBDebugger debugger_sb(debugger);
+    lldb::SBExecutionContext exe_ctx_sb(exe_ctx_ref_sp);
+
+    PyErr_Cleaner py_err_cleaner(true);
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
+
+    if (!pfunc.IsAllocated())
+        return false;
+
+    // pass the pointer-to cmd_retobj_sb or watch the underlying object disappear from under you
+    // see comment above for SBCommandReturnObjectReleaser for further details
+    auto argc = pfunc.GetArgInfo();
+    if (!argc) {
+        llvm::consumeError(argc.takeError());
+        return false;
+    }
+    PythonObject debugger_arg(PyRefType::Owned, SBTypeToSWIGWrapper(debugger_sb));
+    PythonObject exe_ctx_arg(PyRefType::Owned, SBTypeToSWIGWrapper(exe_ctx_sb));
+    PythonObject cmd_retobj_arg(PyRefType::Owned, SBTypeToSWIGWrapper(&cmd_retobj_sb));
+
+    if (argc.get().max_positional_args < 5u)
+        pfunc(debugger_arg, PythonString(args), cmd_retobj_arg, dict);
+    else
+        pfunc(debugger_arg, PythonString(args), exe_ctx_arg, cmd_retobj_arg, dict);
+
+    return true;
+}
+
+SWIGEXPORT bool
+LLDBSwigPythonCallCommandObject
+(
+    PyObject *implementor,
+    lldb::DebuggerSP& debugger,
+    const char* args,
+    lldb_private::CommandReturnObject& cmd_retobj,
+    lldb::ExecutionContextRefSP exe_ctx_ref_sp
+)
+{
+    lldb::SBCommandReturnObject cmd_retobj_sb(cmd_retobj);
+    lldb::SBDebugger debugger_sb(debugger);
+    lldb::SBExecutionContext exe_ctx_sb(exe_ctx_ref_sp);
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    PythonObject self(PyRefType::Borrowed, implementor);
+    auto pfunc = self.ResolveName<PythonCallable>("__call__");
+
+    if (!pfunc.IsAllocated())
+        return false;
+
+    // pass the pointer-to cmd_retobj_sb or watch the underlying object disappear from under you
+    // see comment above for SBCommandReturnObjectReleaser for further details
+    PythonObject debugger_arg(PyRefType::Owned, SBTypeToSWIGWrapper(debugger_sb));
+    PythonObject exe_ctx_arg(PyRefType::Owned, SBTypeToSWIGWrapper(exe_ctx_sb));
+    PythonObject cmd_retobj_arg(PyRefType::Owned, SBTypeToSWIGWrapper(&cmd_retobj_sb));
+
+    pfunc(debugger_arg, PythonString(args), exe_ctx_arg, cmd_retobj_arg);
+
+    return true;
+}
+
+SWIGEXPORT void*
+LLDBSWIGPythonCreateOSPlugin
+(
+    const char *python_class_name,
+    const char *session_dictionary_name,
+    const lldb::ProcessSP& process_sp
+)
+{
+    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
+        Py_RETURN_NONE;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
+
+    if (!pfunc.IsAllocated())
+        Py_RETURN_NONE;
+
+    // I do not want the SBProcess to be deallocated when going out of scope because python
+    // has ownership of it and will manage memory for this object by itself
+    lldb::SBProcess *process_sb = new lldb::SBProcess(process_sp);
+    PythonObject process_arg(PyRefType::Owned, SBTypeToSWIGWrapper(process_sb));
+    if (!process_arg.IsAllocated())
+        Py_RETURN_NONE;
+
+    auto result = pfunc(process_arg);
+
+    if (result.IsAllocated())
+        return result.release();
+
+    Py_RETURN_NONE;
+}
+
+SWIGEXPORT void*
+LLDBSWIGPython_CreateFrameRecognizer
+(
+    const char *python_class_name,
+    const char *session_dictionary_name
+)
+{
+    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
+        Py_RETURN_NONE;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
+
+    if (!pfunc.IsAllocated())
+        Py_RETURN_NONE;
+
+    auto result = pfunc();
+
+    if (result.IsAllocated())
+        return result.release();
+
+    Py_RETURN_NONE;
+}
+
+SWIGEXPORT PyObject*
+LLDBSwigPython_GetRecognizedArguments
+(
+    PyObject *implementor,
+    const lldb::StackFrameSP& frame_sp
+)
+{
+    static char callee_name[] = "get_recognized_arguments";
+
+    lldb::SBFrame frame_sb(frame_sp);
+    PyObject *arg = SBTypeToSWIGWrapper(frame_sb);
+
+    PythonString str(callee_name);
+    PyObject* result = PyObject_CallMethodObjArgs(implementor, str.get(), arg,
+                                                  NULL);
+    return result;
+}
+
+SWIGEXPORT void*
+LLDBSWIGPython_GetDynamicSetting (void* module, const char* setting, const lldb::TargetSP& target_sp)
+{
+    if (!module || !setting)
+        Py_RETURN_NONE;
+
+    PyErr_Cleaner py_err_cleaner(true);
+    PythonObject py_module(PyRefType::Borrowed, (PyObject *)module);
+    auto pfunc = py_module.ResolveName<PythonCallable>("get_dynamic_setting");
+
+    if (!pfunc.IsAllocated())
+        Py_RETURN_NONE;
+
+    lldb::SBTarget target_sb(target_sp);
+    PythonObject target_arg(PyRefType::Owned, SBTypeToSWIGWrapper(target_sb));
+    auto result = pfunc(target_arg, PythonString(setting));
+
+    return result.release();
+}
+
+SWIGEXPORT bool
+LLDBSWIGPythonRunScriptKeywordProcess
+(const char* python_function_name,
+const char* session_dictionary_name,
+lldb::ProcessSP& process,
+std::string& output)
+
+{
+    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
+        return false;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
+
+    if (!pfunc.IsAllocated())
+        return false;
+
+    lldb::SBProcess process_sb(process);
+    PythonObject process_arg(PyRefType::Owned, SBTypeToSWIGWrapper(process_sb));
+    auto result = pfunc(process_arg, dict);
+
+    output = result.Str().GetString().str();
+
+    return true;
+}
+
+SWIGEXPORT bool
+LLDBSWIGPythonRunScriptKeywordThread
+(const char* python_function_name,
+const char* session_dictionary_name,
+lldb::ThreadSP& thread,
+std::string& output)
+
+{
+    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
+        return false;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
+
+    if (!pfunc.IsAllocated())
+        return false;
+
+    lldb::SBThread thread_sb(thread);
+    PythonObject thread_arg(PyRefType::Owned, SBTypeToSWIGWrapper(thread_sb));
+    auto result = pfunc(thread_arg, dict);
+
+    output = result.Str().GetString().str();
+
+    return true;
+}
+
+SWIGEXPORT bool
+LLDBSWIGPythonRunScriptKeywordTarget
+(const char* python_function_name,
+const char* session_dictionary_name,
+lldb::TargetSP& target,
+std::string& output)
+
+{
+    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
+        return false;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name,dict);
+
+    if (!pfunc.IsAllocated())
+        return false;
+
+    lldb::SBTarget target_sb(target);
+    PythonObject target_arg(PyRefType::Owned, SBTypeToSWIGWrapper(target_sb));
+    auto result = pfunc(target_arg, dict);
+
+    output = result.Str().GetString().str();
+
+    return true;
+}
+
+SWIGEXPORT bool
+LLDBSWIGPythonRunScriptKeywordFrame
+(const char* python_function_name,
+const char* session_dictionary_name,
+lldb::StackFrameSP& frame,
+std::string& output)
+
+{
+    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
+        return false;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name,dict);
+
+    if (!pfunc.IsAllocated())
+        return false;
+
+    lldb::SBFrame frame_sb(frame);
+    PythonObject frame_arg(PyRefType::Owned, SBTypeToSWIGWrapper(frame_sb));
+    auto result = pfunc(frame_arg, dict);
+
+    output = result.Str().GetString().str();
+
+    return true;
+}
+
+SWIGEXPORT bool
+LLDBSWIGPythonRunScriptKeywordValue
+(const char* python_function_name,
+const char* session_dictionary_name,
+lldb::ValueObjectSP& value,
+std::string& output)
+
+{
+    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
+        return false;
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
+
+    if (!pfunc.IsAllocated())
+        return false;
+
+    lldb::SBValue value_sb(value);
+    PythonObject value_arg(PyRefType::Owned, SBTypeToSWIGWrapper(value_sb));
+    auto result = pfunc(value_arg, dict);
+
+    output = result.Str().GetString().str();
+
+    return true;
+}
+
+SWIGEXPORT bool
+LLDBSwigPythonCallModuleInit
+(
+    const char *python_module_name,
+    const char *session_dictionary_name,
+    lldb::DebuggerSP& debugger
+)
+{
+    std::string python_function_name_string = python_module_name;
+    python_function_name_string += ".__lldb_init_module";
+    const char* python_function_name = python_function_name_string.c_str();
+
+    PyErr_Cleaner py_err_cleaner(true);
+
+    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
+    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
+
+    // This method is optional and need not exist.  So if we don't find it,
+    // it's actually a success, not a failure.
+    if (!pfunc.IsAllocated())
+        return true;
+
+    lldb::SBDebugger debugger_sb(debugger);
+    PythonObject debugger_arg(PyRefType::Owned, SBTypeToSWIGWrapper(debugger_sb));
+    pfunc(debugger_arg, dict);
+
+    return true;
+}
+%}
+
+
+%runtime %{
+// Forward declaration to be inserted at the start of LLDBWrapPython.h
+#include "lldb/API/SBDebugger.h"
+#include "lldb/API/SBValue.h"
+
+SWIGEXPORT lldb::ValueObjectSP
+LLDBSWIGPython_GetValueObjectSPFromSBValue (void* data)
+{
+    lldb::ValueObjectSP valobj_sp;
+    if (data)
+    {
+        lldb::SBValue* sb_ptr = (lldb::SBValue *)data;
+        valobj_sp = sb_ptr->GetSP();
+    }
+    return valobj_sp;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton);
+
+#ifdef __cplusplus
+}
+#endif
+%}
+
+%wrapper %{
+
+
+// For the LogOutputCallback functions
+void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton) {
+    if (baton != Py_None) {
+      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
+      PyObject *result = PyObject_CallFunction(reinterpret_cast<PyObject*>(baton), const_cast<char*>("s"), str);
+	  Py_XDECREF(result);
+      SWIG_PYTHON_THREAD_END_BLOCK;
+    }
+}
+%}
diff --git a/src/llvm-project/lldb/cmake/XcodeHeaderGenerator/CMakeLists.txt b/src/llvm-project/lldb/cmake/XcodeHeaderGenerator/CMakeLists.txt
deleted file mode 100644
index f515c5f..0000000
--- a/src/llvm-project/lldb/cmake/XcodeHeaderGenerator/CMakeLists.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-cmake_minimum_required(VERSION 3.4.3)
-
-project(XcodeConfig C CXX)
-
-set(CMAKE_MODULE_PATH
-  ${CMAKE_MODULE_PATH}
-  "${CMAKE_CURRENT_SOURCE_DIR}/.."
-  "${CMAKE_CURRENT_SOURCE_DIR}/../modules"
-  )
-
-set(LLDB_CONFIG_HEADER_INPUT
-    ${CMAKE_CURRENT_SOURCE_DIR}/../../include/lldb/Host/Config.h.cmake)
-
-include(LLDBGenerateConfig)
diff --git a/src/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake b/src/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake
index 6602b07..98d68b1 100644
--- a/src/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake
+++ b/src/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake
@@ -1,4 +1,14 @@
 include(${CMAKE_CURRENT_LIST_DIR}/Apple-lldb-base.cmake)
 
+set(CMAKE_GENERATOR Xcode CACHE STRING "")
+set(CMAKE_OSX_DEPLOYMENT_TARGET 10.12 CACHE STRING "")
+set(CMAKE_XCODE_GENERATE_SCHEME ON CACHE BOOL "")
+
 set(LLDB_BUILD_FRAMEWORK ON CACHE BOOL "")
-set(CMAKE_OSX_DEPLOYMENT_TARGET 10.11 CACHE STRING "")
+
+# Apparently, module-enabled builds clash with Xcode's analysis.
+set(LLVM_ENABLE_MODULES OFF CACHE BOOL "" FORCE)
+
+# Print a warning with instructions, if we
+# build with Xcode and didn't use this cache.
+set(LLDB_EXPLICIT_XCODE_CACHE_USED ON CACHE INTERNAL "")
diff --git a/src/llvm-project/lldb/cmake/modules/AddLLDB.cmake b/src/llvm-project/lldb/cmake/modules/AddLLDB.cmake
index 4c99278..ecf0b66 100644
--- a/src/llvm-project/lldb/cmake/modules/AddLLDB.cmake
+++ b/src/llvm-project/lldb/cmake/modules/AddLLDB.cmake
@@ -35,9 +35,9 @@
   # only supported parameters to this macro are the optional
   # MODULE;SHARED;STATIC library type and source files
   cmake_parse_arguments(PARAM
-    "MODULE;SHARED;STATIC;OBJECT;PLUGIN"
+    "MODULE;SHARED;STATIC;OBJECT;PLUGIN;FRAMEWORK"
     "INSTALL_PREFIX;ENTITLEMENTS"
-    "EXTRA_CXXFLAGS;DEPENDS;LINK_LIBS;LINK_COMPONENTS"
+    "EXTRA_CXXFLAGS;DEPENDS;LINK_LIBS;LINK_COMPONENTS;CLANG_LIBS"
     ${ARGN})
   llvm_process_sources(srcs ${PARAM_UNPARSED_ARGUMENTS})
   list(APPEND LLVM_LINK_COMPONENTS ${PARAM_LINK_COMPONENTS})
@@ -91,6 +91,19 @@
       ${pass_ENTITLEMENTS}
       ${pass_NO_INSTALL_RPATH}
     )
+
+    if(CLANG_LINK_CLANG_DYLIB)
+      target_link_libraries(${name} PRIVATE clang-cpp)
+    else()
+      target_link_libraries(${name} PRIVATE ${PARAM_CLANG_LIBS})
+    endif()
+  endif()
+
+  # A target cannot be changed to a FRAMEWORK after calling install() because
+  # this may result in the wrong install DESTINATION. The FRAMEWORK property
+  # must be set earlier.
+  if(PARAM_FRAMEWORK)
+    set_target_properties(liblldb PROPERTIES FRAMEWORK ON)
   endif()
 
   if(PARAM_SHARED)
@@ -122,7 +135,11 @@
   target_compile_options(${name} PRIVATE ${PARAM_EXTRA_CXXFLAGS})
 
   if(PARAM_PLUGIN)
-    set_target_properties(${name} PROPERTIES FOLDER "lldb plugins")
+    get_property(parent_dir DIRECTORY PROPERTY PARENT_DIRECTORY)
+    if(EXISTS ${parent_dir})
+      get_filename_component(category ${parent_dir} NAME)
+      set_target_properties(${name} PROPERTIES FOLDER "lldb plugins/${category}")
+    endif()
   else()
     set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
   endif()
@@ -132,7 +149,7 @@
   cmake_parse_arguments(ARG
     "GENERATE_INSTALL"
     "INSTALL_PREFIX;ENTITLEMENTS"
-    "LINK_LIBS;LINK_COMPONENTS"
+    "LINK_LIBS;CLANG_LIBS;LINK_COMPONENTS;BUILD_RPATH;INSTALL_RPATH"
     ${ARGN}
     )
 
@@ -152,15 +169,33 @@
   )
 
   target_link_libraries(${name} PRIVATE ${ARG_LINK_LIBS})
+  if(CLANG_LINK_CLANG_DYLIB)
+    target_link_libraries(${name} PRIVATE clang-cpp)
+  else()
+    target_link_libraries(${name} PRIVATE ${ARG_CLANG_LIBS})
+  endif()
   set_target_properties(${name} PROPERTIES FOLDER "lldb executables")
 
+  if (ARG_BUILD_RPATH)
+    set_target_properties(${name} PROPERTIES BUILD_RPATH "${ARG_BUILD_RPATH}")
+  endif()
+
+  if (ARG_INSTALL_RPATH)
+    set_target_properties(${name} PROPERTIES
+      BUILD_WITH_INSTALL_RPATH OFF
+      INSTALL_RPATH "${ARG_INSTALL_RPATH}")
+  endif()
+
   if(ARG_GENERATE_INSTALL)
     set(install_dest bin)
     if(ARG_INSTALL_PREFIX)
       set(install_dest ${ARG_INSTALL_PREFIX})
     endif()
     install(TARGETS ${name} COMPONENT ${name}
-            RUNTIME DESTINATION ${install_dest})
+            RUNTIME DESTINATION ${install_dest}
+            LIBRARY DESTINATION ${install_dest}
+            BUNDLE DESTINATION ${install_dest}
+            FRAMEWORK DESTINATION ${install_dest})
     if (NOT CMAKE_CONFIGURATION_TYPES)
       add_llvm_install_targets(install-${name}
                                DEPENDS ${name}
@@ -199,8 +234,7 @@
 function(lldb_add_to_buildtree_lldb_framework name subdir)
   # Destination for the copy in the build-tree. While the framework target may
   # not exist yet, it will exist when the generator expression gets expanded.
-  get_target_property(framework_build_dir liblldb LIBRARY_OUTPUT_DIRECTORY)
-  set(copy_dest "${framework_build_dir}/${subdir}")
+  set(copy_dest "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/${subdir}/$<TARGET_FILE_NAME:${name}>")
 
   # Copy into the given subdirectory for testing.
   add_custom_command(TARGET ${name} POST_BUILD
@@ -256,13 +290,15 @@
   install(CODE "execute_process(COMMAND xcrun dsymutil -o=${dsym_name} ${buildtree_name})"
           COMPONENT ${name})
 
-  # Strip distribution binary with -ST (removing debug symbol table entries and
-  # Swift symbols). Avoid CMAKE_INSTALL_DO_STRIP and llvm_externalize_debuginfo()
-  # as they can't be configured sufficiently.
-  set(installtree_name "\$ENV\{DESTDIR\}${install_prefix}/${bundle_subdir}${output_name}")
-  install(CODE "message(STATUS \"Stripping: ${installtree_name}\")" COMPONENT ${name})
-  install(CODE "execute_process(COMMAND xcrun strip -ST ${installtree_name})"
-          COMPONENT ${name})
+  if(NOT LLDB_SKIP_STRIP)
+    # Strip distribution binary with -ST (removing debug symbol table entries and
+    # Swift symbols). Avoid CMAKE_INSTALL_DO_STRIP and llvm_externalize_debuginfo()
+    # as they can't be configured sufficiently.
+    set(installtree_name "\$ENV\{DESTDIR\}${install_prefix}/${bundle_subdir}${output_name}")
+    install(CODE "message(STATUS \"Stripping: ${installtree_name}\")" COMPONENT ${name})
+    install(CODE "execute_process(COMMAND xcrun strip -ST ${installtree_name})"
+            COMPONENT ${name})
+  endif()
 endfunction()
 
 # CMake's set_target_properties() doesn't allow to pass lists for RPATH
diff --git a/src/llvm-project/lldb/cmake/modules/FindCursesAndPanel.cmake b/src/llvm-project/lldb/cmake/modules/FindCursesAndPanel.cmake
new file mode 100644
index 0000000..aaadf214
--- /dev/null
+++ b/src/llvm-project/lldb/cmake/modules/FindCursesAndPanel.cmake
@@ -0,0 +1,24 @@
+#.rst:
+# FindCursesAndPanel
+# -----------
+#
+# Find the curses and panel library as a whole.
+
+if(CURSES_INCLUDE_DIRS AND CURSES_LIBRARIES AND PANEL_LIBRARIES)
+  set(CURSESANDPANEL_FOUND TRUE)
+else()
+  find_package(Curses QUIET)
+  find_library(PANEL_LIBRARIES NAMES panel DOC "The curses panel library" QUIET)
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(CursesAndPanel
+                                    FOUND_VAR
+                                      CURSESANDPANEL_FOUND
+                                    REQUIRED_VARS
+                                      CURSES_INCLUDE_DIRS
+                                      CURSES_LIBRARIES
+                                      PANEL_LIBRARIES)
+  if(CURSES_FOUND AND PANEL_LIBRARIES)
+    mark_as_advanced(CURSES_INCLUDE_DIRS CURSES_LIBRARIES PANEL_LIBRARIES)
+  endif()
+endif()
+
diff --git a/src/llvm-project/lldb/cmake/modules/FindLibEdit.cmake b/src/llvm-project/lldb/cmake/modules/FindLibEdit.cmake
index df8f2ab..b4f0cb3 100644
--- a/src/llvm-project/lldb/cmake/modules/FindLibEdit.cmake
+++ b/src/llvm-project/lldb/cmake/modules/FindLibEdit.cmake
@@ -8,25 +8,25 @@
 #
 # ::
 #
-#   libedit_FOUND         - true if libedit was found
-#   libedit_INCLUDE_DIRS  - include search path
-#   libedit_LIBRARIES     - libraries to link
-#   libedit_VERSION       - version number
+#   LibEdit_FOUND          - true if libedit was found
+#   LibEdit_INCLUDE_DIRS   - include search path
+#   LibEdit_LIBRARIES      - libraries to link
+#   LibEdit_VERSION_STRING - version number
 
-if(libedit_INCLUDE_DIRS AND libedit_LIBRARIES)
-  set(libedit_FOUND TRUE)
+if(LibEdit_INCLUDE_DIRS AND LibEdit_LIBRARIES)
+  set(LibEdit_FOUND TRUE)
 else()
   find_package(PkgConfig QUIET)
   pkg_check_modules(PC_LIBEDIT QUIET libedit)
 
-  find_path(libedit_INCLUDE_DIRS
+  find_path(LibEdit_INCLUDE_DIRS
             NAMES
               histedit.h
             HINTS
               ${PC_LIBEDIT_INCLUDEDIR}
               ${PC_LIBEDIT_INCLUDE_DIRS}
               ${CMAKE_INSTALL_FULL_INCLUDEDIR})
-  find_library(libedit_LIBRARIES
+  find_library(LibEdit_LIBRARIES
                NAMES
                  edit libedit
                HINTS
@@ -34,29 +34,31 @@
                  ${PC_LIBEDIT_LIBRARY_DIRS}
                  ${CMAKE_INSTALL_FULL_LIBDIR})
 
-  if(libedit_INCLUDE_DIRS AND EXISTS "${libedit_INCLUDE_DIRS}/histedit.h")
-    file(STRINGS "${libedit_INCLUDE_DIRS}/histedit.h"
+  if(LibEdit_INCLUDE_DIRS AND EXISTS "${LibEdit_INCLUDE_DIRS}/histedit.h")
+    file(STRINGS "${LibEdit_INCLUDE_DIRS}/histedit.h"
          libedit_major_version_str
          REGEX "^#define[ \t]+LIBEDIT_MAJOR[ \t]+[0-9]+")
     string(REGEX REPLACE "^#define[ \t]+LIBEDIT_MAJOR[ \t]+([0-9]+)" "\\1"
            LIBEDIT_MAJOR_VERSION "${libedit_major_version_str}")
 
-    file(STRINGS "${libedit_INCLUDE_DIRS}/histedit.h"
+    file(STRINGS "${LibEdit_INCLUDE_DIRS}/histedit.h"
          libedit_minor_version_str
          REGEX "^#define[ \t]+LIBEDIT_MINOR[ \t]+[0-9]+")
     string(REGEX REPLACE "^#define[ \t]+LIBEDIT_MINOR[ \t]+([0-9]+)" "\\1"
            LIBEDIT_MINOR_VERSION "${libedit_minor_version_str}")
 
-    set(libedit_VERSION_STRING "${libedit_major_version}.${libedit_minor_version}")
+    set(LibEdit_VERSION_STRING "${libedit_major_version}.${libedit_minor_version}")
   endif()
 
   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(LibEdit
+                                    FOUND_VAR
+                                      LibEdit_FOUND
                                     REQUIRED_VARS
-                                      libedit_INCLUDE_DIRS
-                                      libedit_LIBRARIES
+                                      LibEdit_INCLUDE_DIRS
+                                      LibEdit_LIBRARIES
                                     VERSION_VAR
-                                      libedit_VERSION_STRING)
-  mark_as_advanced(libedit_INCLUDE_DIRS libedit_LIBRARIES)
+                                      LibEdit_VERSION_STRING)
+  mark_as_advanced(LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
 endif()
 
diff --git a/src/llvm-project/lldb/cmake/modules/FindLuaAndSwig.cmake b/src/llvm-project/lldb/cmake/modules/FindLuaAndSwig.cmake
new file mode 100644
index 0000000..2e99933
--- /dev/null
+++ b/src/llvm-project/lldb/cmake/modules/FindLuaAndSwig.cmake
@@ -0,0 +1,31 @@
+#.rst:
+# FindLuaAndSwig
+# --------------
+#
+# Find Lua and SWIG as a whole.
+
+if(LUA_LIBRARIES AND LUA_INCLUDE_DIR AND SWIG_EXECUTABLE)
+  set(LUAANDSWIG_FOUND TRUE)
+else()
+  find_package(SWIG 2.0 QUIET)
+  if (SWIG_FOUND)
+    find_package(Lua QUIET)
+    if(LUA_FOUND AND SWIG_FOUND)
+      mark_as_advanced(
+        LUA_LIBRARIES
+        LUA_INCLUDE_DIR
+        SWIG_EXECUTABLE)
+    endif()
+  else()
+    message(STATUS "SWIG 2 or later is required for Lua support in LLDB but could not be found")
+  endif()
+
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(LuaAndSwig
+                                    FOUND_VAR
+                                      LUAANDSWIG_FOUND
+                                    REQUIRED_VARS
+                                      LUA_LIBRARIES
+                                      LUA_INCLUDE_DIR
+                                      SWIG_EXECUTABLE)
+endif()
diff --git a/src/llvm-project/lldb/cmake/modules/FindPythonInterpAndLibs.cmake b/src/llvm-project/lldb/cmake/modules/FindPythonInterpAndLibs.cmake
new file mode 100644
index 0000000..8586225
--- /dev/null
+++ b/src/llvm-project/lldb/cmake/modules/FindPythonInterpAndLibs.cmake
@@ -0,0 +1,59 @@
+#.rst:
+# FindPythonInterpAndLibs
+# -----------
+#
+# Find the python interpreter and libraries as a whole.
+
+if(PYTHON_LIBRARIES AND PYTHON_INCLUDE_DIRS AND PYTHON_EXECUTABLE AND SWIG_EXECUTABLE)
+  set(PYTHONINTERPANDLIBS_FOUND TRUE)
+else()
+  find_package(SWIG 2.0 QUIET)
+  if (SWIG_FOUND)
+    if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
+      find_package(Python3 COMPONENTS Interpreter Development QUIET)
+      if (Python3_FOUND AND Python3_Interpreter_FOUND)
+        set(PYTHON_LIBRARIES ${Python3_LIBRARIES})
+        set(PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
+        set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
+        mark_as_advanced(
+          PYTHON_LIBRARIES
+          PYTHON_INCLUDE_DIRS
+          PYTHON_EXECUTABLE
+          SWIG_EXECUTABLE)
+      endif()
+    else()
+      find_package(PythonInterp QUIET)
+      find_package(PythonLibs QUIET)
+      if(PYTHONINTERP_FOUND AND PYTHONLIBS_FOUND AND SWIG_FOUND)
+        if (NOT CMAKE_CROSSCOMPILING)
+          string(REPLACE "." ";" pythonlibs_version_list ${PYTHONLIBS_VERSION_STRING})
+          list(GET pythonlibs_version_list 0 pythonlibs_major)
+          list(GET pythonlibs_version_list 1 pythonlibs_minor)
+
+          # Ignore the patch version. Some versions of macOS report a different
+          # patch version for the system provided interpreter and libraries.
+          if (CMAKE_CROSSCOMPILING OR (PYTHON_VERSION_MAJOR VERSION_EQUAL pythonlibs_major AND
+              PYTHON_VERSION_MINOR VERSION_EQUAL pythonlibs_minor))
+            mark_as_advanced(
+              PYTHON_LIBRARIES
+              PYTHON_INCLUDE_DIRS
+              PYTHON_EXECUTABLE
+              SWIG_EXECUTABLE)
+          endif()
+        endif()
+      endif()
+    endif()
+  else()
+    message(STATUS "SWIG 2 or later is required for Python support in LLDB but could not be found")
+  endif()
+
+  include(FindPackageHandleStandardArgs)
+  find_package_handle_standard_args(PythonInterpAndLibs
+                                    FOUND_VAR
+                                      PYTHONINTERPANDLIBS_FOUND
+                                    REQUIRED_VARS
+                                      PYTHON_LIBRARIES
+                                      PYTHON_INCLUDE_DIRS
+                                      PYTHON_EXECUTABLE
+                                      SWIG_EXECUTABLE)
+endif()
diff --git a/src/llvm-project/lldb/cmake/modules/LLDBConfig.cmake b/src/llvm-project/lldb/cmake/modules/LLDBConfig.cmake
index e1a1337..4a15a34 100644
--- a/src/llvm-project/lldb/cmake/modules/LLDBConfig.cmake
+++ b/src/llvm-project/lldb/cmake/modules/LLDBConfig.cmake
@@ -1,6 +1,6 @@
-include(CheckIncludeFileCXX)
 include(CheckCXXSymbolExists)
 include(CheckTypeSize)
+include(CMakeDependentOption)
 
 set(LLDB_PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
 set(LLDB_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/source")
@@ -24,34 +24,58 @@
   set(LLDB_LINKER_SUPPORTS_GROUPS ON)
 endif()
 
-set(default_disable_python OFF)
-set(default_disable_curses OFF)
-set(default_disable_libedit OFF)
+macro(add_optional_dependency variable description package found)
+  cmake_parse_arguments(ARG
+    ""
+    "VERSION"
+    ""
+    ${ARGN})
 
-if(DEFINED LLVM_ENABLE_LIBEDIT AND NOT LLVM_ENABLE_LIBEDIT)
-  set(default_disable_libedit ON)
-endif()
+  set(${variable} "Auto" CACHE STRING "${description} On, Off or Auto (default)")
+  string(TOUPPER "${${variable}}" ${variable})
 
-if(CMAKE_SYSTEM_NAME MATCHES "Windows")
-  set(default_disable_curses ON)
-  set(default_disable_libedit ON)
-elseif(CMAKE_SYSTEM_NAME MATCHES "Android")
-  set(default_disable_python ON)
-  set(default_disable_curses ON)
-  set(default_disable_libedit ON)
-elseif(IOS)
-  set(default_disable_python ON)
-endif()
+  if("${${variable}}" STREQUAL "AUTO")
+    set(find_package TRUE)
+    set(maybe_required)
+  elseif(${${variable}})
+    set(find_package TRUE)
+    set(maybe_required REQUIRED)
+  else()
+    set(find_package FALSE)
+    set(${variable} FALSE)
+  endif()
 
-option(LLDB_DISABLE_PYTHON "Disable Python scripting integration." ${default_disable_python})
-option(LLDB_DISABLE_CURSES "Disable Curses integration." ${default_disable_curses})
-option(LLDB_DISABLE_LIBEDIT "Disable the use of editline." ${default_disable_libedit})
+  if(${find_package})
+    find_package(${package} ${ARG_VERSION} ${maybe_required})
+    set(${variable} "${${found}}")
+  endif()
+
+  message(STATUS "${description}: ${${variable}}")
+endmacro()
+
+add_optional_dependency(LLDB_ENABLE_LIBEDIT "Enable editline support in LLDB" LibEdit LibEdit_FOUND)
+add_optional_dependency(LLDB_ENABLE_CURSES "Enable curses support in LLDB" CursesAndPanel CURSESANDPANEL_FOUND)
+add_optional_dependency(LLDB_ENABLE_LZMA "Enable LZMA compression support in LLDB" LibLZMA LIBLZMA_FOUND)
+add_optional_dependency(LLDB_ENABLE_LUA "Enable Lua scripting support in LLDB" LuaAndSwig LUAANDSWIG_FOUND)
+add_optional_dependency(LLDB_ENABLE_PYTHON "Enable Python scripting support in LLDB" PythonInterpAndLibs PYTHONINTERPANDLIBS_FOUND)
+add_optional_dependency(LLDB_ENABLE_LIBXML2 "Enable Libxml 2 support in LLDB" LibXml2 LIBXML2_FOUND VERSION 2.8)
+
 option(LLDB_RELOCATABLE_PYTHON "Use the PYTHONHOME environment variable to locate Python." OFF)
 option(LLDB_USE_SYSTEM_SIX "Use six.py shipped with system and do not install a copy of it" OFF)
 option(LLDB_USE_ENTITLEMENTS "When codesigning, use entitlements if available" ON)
 option(LLDB_BUILD_FRAMEWORK "Build LLDB.framework (Darwin only)" OFF)
 option(LLDB_NO_INSTALL_DEFAULT_RPATH "Disable default RPATH settings in binaries" OFF)
 option(LLDB_USE_SYSTEM_DEBUGSERVER "Use the system's debugserver for testing (Darwin only)." OFF)
+option(LLDB_SKIP_STRIP "Whether to skip stripping of binaries when installing lldb." OFF)
+
+if (LLDB_USE_SYSTEM_DEBUGSERVER)
+  # The custom target for the system debugserver has no install target, so we
+  # need to remove it from the LLVM_DISTRIBUTION_COMPONENTS list.
+  if (LLVM_DISTRIBUTION_COMPONENTS)
+    list(REMOVE_ITEM LLVM_DISTRIBUTION_COMPONENTS debugserver)
+    set(LLVM_DISTRIBUTION_COMPONENTS ${LLVM_DISTRIBUTION_COMPONENTS} CACHE STRING "" FORCE)
+  endif()
+endif()
 
 if(LLDB_BUILD_FRAMEWORK)
   if(NOT APPLE)
@@ -67,11 +91,24 @@
   set(LLDB_FRAMEWORK_BUILD_DIR bin CACHE STRING "Output directory for LLDB.framework")
   set(LLDB_FRAMEWORK_INSTALL_DIR Library/Frameworks CACHE STRING "Install directory for LLDB.framework")
 
+  get_filename_component(LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR ${LLDB_FRAMEWORK_BUILD_DIR} ABSOLUTE
+    BASE_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR})
+
   # Essentially, emit the framework's dSYM outside of the framework directory.
   set(LLDB_DEBUGINFO_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin CACHE STRING
       "Directory to emit dSYM files stripped from executables and libraries (Darwin Only)")
 endif()
 
+if(APPLE AND CMAKE_GENERATOR STREQUAL Xcode)
+  if(NOT LLDB_EXPLICIT_XCODE_CACHE_USED)
+    message(WARNING
+      "When building with Xcode, we recommend using the corresponding cache script. "
+      "If this was a mistake, clean your build directory and re-run CMake with:\n"
+      "  -C ${CMAKE_SOURCE_DIR}/cmake/caches/Apple-lldb-Xcode.cmake\n"
+      "See: https://lldb.llvm.org/resources/build.html#cmakegeneratedxcodeproject\n")
+  endif()
+endif()
+
 if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
   set(LLDB_EXPORT_ALL_SYMBOLS 0 CACHE BOOL
     "Causes lldb to export all symbols when building liblldb.")
@@ -85,24 +122,12 @@
   add_definitions( -DHAVE_ROUND )
 endif()
 
-if (LLDB_DISABLE_CURSES)
-  add_definitions( -DLLDB_DISABLE_CURSES )
-endif()
-
-if (LLDB_DISABLE_LIBEDIT)
-  add_definitions( -DLLDB_DISABLE_LIBEDIT )
-else()
-  find_package(LibEdit REQUIRED)
-
-  # Check if we libedit capable of handling wide characters (built with
-  # '--enable-widec'), and have the <codecvt> standard library we use to
-  # process them.
-  set(CMAKE_REQUIRED_LIBRARIES ${libedit_LIBRARIES})
-  set(CMAKE_REQUIRED_INCLUDES ${libedit_INCLUDE_DIRS})
-  check_symbol_exists(el_winsertstr histedit.h HAVE_WIDEC_LIBEDIT)
-  if (HAVE_WIDEC_LIBEDIT)
-    check_include_file_cxx(codecvt LLDB_EDITLINE_USE_WCHAR)
-  endif()
+# Check if we libedit capable of handling wide characters (built with
+# '--enable-widec').
+if (LLDB_ENABLE_LIBEDIT)
+  set(CMAKE_REQUIRED_LIBRARIES ${LibEdit_LIBRARIES})
+  set(CMAKE_REQUIRED_INCLUDES ${LibEdit_INCLUDE_DIRS})
+  check_symbol_exists(el_winsertstr histedit.h LLDB_EDITLINE_USE_WCHAR)
   set(CMAKE_EXTRA_INCLUDE_FILES histedit.h)
   check_type_size(el_rfunc_t LLDB_EL_RFUNC_T_SIZE)
   if (LLDB_EL_RFUNC_T_SIZE STREQUAL "")
@@ -115,137 +140,12 @@
   set(CMAKE_EXTRA_INCLUDE_FILES)
 endif()
 
-
-# On Windows, we can't use the normal FindPythonLibs module that comes with CMake,
-# for a number of reasons.
-# 1) Prior to MSVC 2015, it is only possible to embed Python if python itself was
-#    compiled with an identical version (and build configuration) of MSVC as LLDB.
-#    The standard algorithm does not take into account the differences between
-#    a binary release distribution of python and a custom built distribution.
-# 2) From MSVC 2015 and onwards, it is only possible to use Python 3.5 or later.
-# 3) FindPythonLibs queries the registry to locate Python, and when looking for a
-#    64-bit version of Python, since cmake.exe is a 32-bit executable, it will see
-#    a 32-bit view of the registry.  As such, it is impossible for FindPythonLibs to
-#    locate 64-bit Python libraries.
-# This function is designed to address those limitations.  Currently it only partially
-# addresses them, but it can be improved and extended on an as-needed basis.
-function(find_python_libs_windows)
-  if ("${PYTHON_HOME}" STREQUAL "")
-    message(WARNING "LLDB embedded Python on Windows requires specifying a value for PYTHON_HOME.  Python support disabled.")
-    set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
-    return()
+if (LLDB_ENABLE_PYTHON)
+  include_directories(${PYTHON_INCLUDE_DIRS})
+  if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" AND NOT LLDB_RELOCATABLE_PYTHON)
+    get_filename_component(PYTHON_HOME "${PYTHON_EXECUTABLE}" DIRECTORY)
+    file(TO_CMAKE_PATH "${PYTHON_HOME}" LLDB_PYTHON_HOME)
   endif()
-
-  file(TO_CMAKE_PATH "${PYTHON_HOME}/Include" PYTHON_INCLUDE_DIR)
-
-  if(EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h")
-    file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str
-         REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"")
-    string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"+]+)[+]?\".*" "\\1"
-         PYTHONLIBS_VERSION_STRING "${python_version_str}")
-    message(STATUS "Found Python library version ${PYTHONLIBS_VERSION_STRING}")
-    string(REGEX REPLACE "([0-9]+)[.]([0-9]+)[.][0-9]+" "python\\1\\2" PYTHONLIBS_BASE_NAME "${PYTHONLIBS_VERSION_STRING}")
-    unset(python_version_str)
-  else()
-    message(WARNING "Unable to find ${PYTHON_INCLUDE_DIR}/patchlevel.h, Python installation is corrupt.")
-    message(WARNING "Python support will be disabled for this build.")
-    set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
-    return()
-  endif()
-
-  file(TO_CMAKE_PATH "${PYTHON_HOME}" PYTHON_HOME)
-  # TODO(compnerd) when CMake Policy `CMP0091` is set to NEW, we should use
-  # if(CMAKE_MSVC_RUNTIME_LIBRARY MATCHES MultiThreadedDebug)
-  if(CMAKE_BUILD_TYPE STREQUAL Debug)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/python_d.exe" PYTHON_EXE)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}_d.lib" PYTHON_LIB)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}_d.dll" PYTHON_DLL)
-  else()
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/python.exe" PYTHON_EXE)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/libs/${PYTHONLIBS_BASE_NAME}.lib" PYTHON_LIB)
-    file(TO_CMAKE_PATH "${PYTHON_HOME}/${PYTHONLIBS_BASE_NAME}.dll" PYTHON_DLL)
-  endif()
-
-  foreach(component PYTHON_EXE;PYTHON_LIB;PYTHON_DLL)
-    if(NOT EXISTS ${${component}})
-      message(WARNING "unable to find ${component}")
-      unset(${component})
-    endif()
-  endforeach()
-
-  if (NOT PYTHON_EXE OR NOT PYTHON_LIB OR NOT PYTHON_DLL)
-    message(WARNING "Unable to find all Python components.  Python support will be disabled for this build.")
-    set(LLDB_DISABLE_PYTHON 1 PARENT_SCOPE)
-    return()
-  endif()
-
-  # Find the version of the Python interpreter.
-  execute_process(COMMAND "${PYTHON_EXE}" -c
-                  "import sys; sys.stdout.write(';'.join([str(x) for x in sys.version_info[:3]]))"
-                  OUTPUT_VARIABLE PYTHON_VERSION_OUTPUT
-                  RESULT_VARIABLE PYTHON_VERSION_RESULT
-                  ERROR_QUIET)
-  if(NOT PYTHON_VERSION_RESULT)
-    string(REPLACE ";" "." PYTHON_VERSION_STRING "${PYTHON_VERSION_OUTPUT}")
-    list(GET PYTHON_VERSION_OUTPUT 0 PYTHON_VERSION_MAJOR)
-    list(GET PYTHON_VERSION_OUTPUT 1 PYTHON_VERSION_MINOR)
-    list(GET PYTHON_VERSION_OUTPUT 2 PYTHON_VERSION_PATCH)
-  endif()
-
-  # Set the same variables as FindPythonInterp and FindPythonLibs.
-  set(PYTHON_EXECUTABLE ${PYTHON_EXE} PARENT_SCOPE)
-  set(PYTHON_LIBRARY ${PYTHON_LIB} PARENT_SCOPE)
-  set(PYTHON_DLL ${PYTHON_DLL} PARENT_SCOPE)
-  set(PYTHON_INCLUDE_DIR ${PYTHON_INCLUDE_DIR} PARENT_SCOPE)
-  set(PYTHONLIBS_VERSION_STRING "${PYTHONLIBS_VERSION_STRING}" PARENT_SCOPE)
-  set(PYTHON_VERSION_STRING ${PYTHON_VERSION_STRING} PARENT_SCOPE)
-  set(PYTHON_VERSION_MAJOR ${PYTHON_VERSION_MAJOR} PARENT_SCOPE)
-  set(PYTHON_VERSION_MINOR ${PYTHON_VERSION_MINOR} PARENT_SCOPE)
-  set(PYTHON_VERSION_PATCH ${PYTHON_VERSION_PATCH} PARENT_SCOPE)
-
-  message(STATUS "LLDB Found PythonExecutable: ${PYTHON_EXECUTABLE} (${PYTHON_VERSION_STRING})")
-  message(STATUS "LLDB Found PythonLibs: ${PYTHON_LIB} (${PYTHONLIBS_VERSION_STRING})")
-  message(STATUS "LLDB Found PythonDLL: ${PYTHON_DLL}")
-  message(STATUS "LLDB Found PythonIncludeDirs: ${PYTHON_INCLUDE_DIR}")
-endfunction(find_python_libs_windows)
-
-if (NOT LLDB_DISABLE_PYTHON)
-  if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
-    find_python_libs_windows()
-
-    if (NOT LLDB_RELOCATABLE_PYTHON)
-      file(TO_CMAKE_PATH "${PYTHON_HOME}" LLDB_PYTHON_HOME)
-      add_definitions( -DLLDB_PYTHON_HOME="${LLDB_PYTHON_HOME}" )
-    endif()
-  else()
-    find_package(PythonInterp REQUIRED)
-    find_package(PythonLibs REQUIRED)
-  endif()
-
-  if (NOT CMAKE_CROSSCOMPILING)
-    string(REPLACE "." ";" pythonlibs_version_list ${PYTHONLIBS_VERSION_STRING})
-    list(GET pythonlibs_version_list 0 pythonlibs_major)
-    list(GET pythonlibs_version_list 1 pythonlibs_minor)
-
-    # Ignore the patch version. Some versions of macOS report a different patch
-    # version for the system provided interpreter and libraries.
-    if (NOT PYTHON_VERSION_MAJOR VERSION_EQUAL pythonlibs_major OR
-        NOT PYTHON_VERSION_MINOR VERSION_EQUAL pythonlibs_minor)
-      message(FATAL_ERROR "Found incompatible Python interpreter (${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})"
-                          " and Python libraries (${pythonlibs_major}.${pythonlibs_minor})")
-    endif()
-  endif()
-
-  if (PYTHON_INCLUDE_DIR)
-    include_directories(${PYTHON_INCLUDE_DIR})
-  endif()
-endif()
-
-if (LLDB_DISABLE_PYTHON)
-  unset(PYTHON_INCLUDE_DIR)
-  unset(PYTHON_LIBRARY)
-  unset(PYTHON_EXECUTABLE)
-  add_definitions( -DLLDB_DISABLE_PYTHON )
 endif()
 
 if (LLVM_EXTERNAL_CLANG_SOURCE_DIR)
@@ -287,12 +187,6 @@
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-vla-extension")
 endif ()
 
-check_cxx_compiler_flag("-Wno-gnu-anonymous-struct"
-                        CXX_SUPPORTS_NO_GNU_ANONYMOUS_STRUCT)
-
-check_cxx_compiler_flag("-Wno-nested-anon-types"
-                        CXX_SUPPORTS_NO_NESTED_ANON_TYPES)
-
 # Disable MSVC warnings
 if( MSVC )
   add_definitions(
@@ -327,9 +221,18 @@
 set(LLDB_VERSION "${LLDB_VERSION_MAJOR}.${LLDB_VERSION_MINOR}.${LLDB_VERSION_PATCH}${LLDB_VERSION_SUFFIX}")
 message(STATUS "LLDB version: ${LLDB_VERSION}")
 
+if (LLDB_ENABLE_LZMA)
+  include_directories(${LIBLZMA_INCLUDE_DIRS})
+endif()
+
+if (LLDB_ENABLE_LIBXML2)
+  list(APPEND system_libs ${LIBXML2_LIBRARIES})
+  include_directories(${LIBXML2_INCLUDE_DIR})
+endif()
+
 include_directories(BEFORE
-  ${CMAKE_CURRENT_SOURCE_DIR}/include
   ${CMAKE_CURRENT_BINARY_DIR}/include
+  ${CMAKE_CURRENT_SOURCE_DIR}/include
   )
 
 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
@@ -340,7 +243,6 @@
     PATTERN "*.h"
     PATTERN ".svn" EXCLUDE
     PATTERN ".cmake" EXCLUDE
-    PATTERN "Config.h" EXCLUDE
     )
 
   install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
@@ -361,11 +263,7 @@
   endif()
 endif()
 
-if (NOT LIBXML2_FOUND)
-  find_package(LibXml2)
-endif()
-
-# Find libraries or frameworks that may be needed
+# Find Apple-specific libraries or frameworks that may be needed.
 if (APPLE)
   if(NOT IOS)
     find_library(CARBON_LIBRARY Carbon)
@@ -374,20 +272,13 @@
   find_library(FOUNDATION_LIBRARY Foundation)
   find_library(CORE_FOUNDATION_LIBRARY CoreFoundation)
   find_library(SECURITY_LIBRARY Security)
-
-  add_definitions( -DLIBXML2_DEFINED )
-  list(APPEND system_libs xml2
-       ${CURSES_LIBRARIES}
+  list(APPEND system_libs
        ${FOUNDATION_LIBRARY}
        ${CORE_FOUNDATION_LIBRARY}
        ${CORE_SERVICES_LIBRARY}
        ${SECURITY_LIBRARY}
        ${DEBUG_SYMBOLS_LIBRARY})
   include_directories(${LIBXML2_INCLUDE_DIR})
-elseif(LIBXML2_FOUND AND LIBXML2_VERSION_STRING VERSION_GREATER 2.8)
-  add_definitions( -DLIBXML2_DEFINED )
-  list(APPEND system_libs ${LIBXML2_LIBRARIES})
-  include_directories(${LIBXML2_INCLUDE_DIR})
 endif()
 
 if( WIN32 AND NOT CYGWIN )
@@ -404,55 +295,18 @@
 
 # Figure out if lldb could use lldb-server.  If so, then we'll
 # ensure we build lldb-server when an lldb target is being built.
-if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD")
-  set(LLDB_CAN_USE_LLDB_SERVER 1)
+if (CMAKE_SYSTEM_NAME MATCHES "Android|Darwin|FreeBSD|Linux|NetBSD|Windows")
+  set(LLDB_CAN_USE_LLDB_SERVER ON)
 else()
-  set(LLDB_CAN_USE_LLDB_SERVER 0)
+  set(LLDB_CAN_USE_LLDB_SERVER OFF)
 endif()
 
 # Figure out if lldb could use debugserver.  If so, then we'll
 # ensure we build debugserver when we build lldb.
-if ( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
-    set(LLDB_CAN_USE_DEBUGSERVER 1)
+if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
+    set(LLDB_CAN_USE_DEBUGSERVER ON)
 else()
-    set(LLDB_CAN_USE_DEBUGSERVER 0)
-endif()
-
-if (NOT LLDB_DISABLE_CURSES)
-    find_package(Curses REQUIRED)
-
-    find_library(CURSES_PANEL_LIBRARY NAMES panel DOC "The curses panel library")
-    if (NOT CURSES_PANEL_LIBRARY)
-        message(FATAL_ERROR "A required curses' panel library not found.")
-    endif ()
-
-    # Add panels to the library path
-    set (CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_PANEL_LIBRARY})
-
-    list(APPEND system_libs ${CURSES_LIBRARIES})
-    include_directories(${CURSES_INCLUDE_DIR})
-endif ()
-
-check_cxx_symbol_exists("__GLIBCXX__" "string" LLDB_USING_LIBSTDCXX)
-if(LLDB_USING_LIBSTDCXX)
-    # There doesn't seem to be an easy way to check the library version. Instead, we rely on the
-    # fact that std::set did not have the allocator constructor available until version 4.9
-    check_cxx_source_compiles("
-            #include <set>
-            std::set<int> s = std::set<int>(std::allocator<int>());
-            int main() { return 0; }"
-            LLDB_USING_LIBSTDCXX_4_9)
-    if (NOT LLDB_USING_LIBSTDCXX_4_9 AND NOT LLVM_ENABLE_EH)
-        message(WARNING
-            "You appear to be linking to libstdc++ version lesser than 4.9 without exceptions "
-            "enabled. These versions of the library have an issue, which causes occasional "
-            "lldb crashes. See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59656> for "
-            "details. Possible courses of action are:\n"
-            "- use libstdc++ version 4.9 or newer\n"
-            "- use libc++ (via LLVM_ENABLE_LIBCXX)\n"
-            "- enable exceptions (via LLVM_ENABLE_EH)\n"
-            "- ignore this warning and accept occasional instability")
-    endif()
+    set(LLDB_CAN_USE_DEBUGSERVER OFF)
 endif()
 
 if ((CMAKE_SYSTEM_NAME MATCHES "Android") AND LLVM_BUILD_STATIC AND
diff --git a/src/llvm-project/lldb/cmake/modules/LLDBFramework.cmake b/src/llvm-project/lldb/cmake/modules/LLDBFramework.cmake
index f5f3cd4..fd4c2e4 100644
--- a/src/llvm-project/lldb/cmake/modules/LLDBFramework.cmake
+++ b/src/llvm-project/lldb/cmake/modules/LLDBFramework.cmake
@@ -1,10 +1,4 @@
-# Path relative to the root binary directory
-get_filename_component(
-  framework_target_dir ${LLDB_FRAMEWORK_BUILD_DIR} ABSOLUTE
-  BASE_DIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}
-)
-
-message(STATUS "LLDB.framework: build path is '${framework_target_dir}'")
+message(STATUS "LLDB.framework: build path is '${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}'")
 message(STATUS "LLDB.framework: install path is '${LLDB_FRAMEWORK_INSTALL_DIR}'")
 message(STATUS "LLDB.framework: resources subdirectory is 'Versions/${LLDB_FRAMEWORK_VERSION}/Resources'")
 
@@ -15,7 +9,7 @@
 
   OUTPUT_NAME LLDB
   VERSION ${LLDB_VERSION}
-  LIBRARY_OUTPUT_DIRECTORY ${framework_target_dir}
+  LIBRARY_OUTPUT_DIRECTORY ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
 
   # Compatibility version
   SOVERSION "1.0.0"
@@ -29,8 +23,8 @@
 # Used in llvm_add_library() to set default output directories for multi-config
 # generators. Overwrite to account for special framework output directory.
 set_output_directory(liblldb
-  BINARY_DIR ${framework_target_dir}
-  LIBRARY_DIR ${framework_target_dir}
+  BINARY_DIR ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
+  LIBRARY_DIR ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}
 )
 
 lldb_add_post_install_steps_darwin(liblldb ${LLDB_FRAMEWORK_INSTALL_DIR})
@@ -44,11 +38,14 @@
     XCODE_ATTRIBUTE_MACOSX_DEPLOYMENT_TARGET "${MACOSX_DEPLOYMENT_TARGET}")
 endif()
 
+# Add -Wdocumentation parameter
+set(CMAKE_XCODE_ATTRIBUTE_CLANG_WARN_DOCUMENTATION_COMMENTS "YES")
+
 # Apart from this one, CMake creates all required symlinks in the framework bundle.
 add_custom_command(TARGET liblldb POST_BUILD
   COMMAND ${CMAKE_COMMAND} -E create_symlink
           Versions/Current/Headers
-          ${framework_target_dir}/LLDB.framework/Headers
+          ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Headers
   COMMENT "LLDB.framework: create Headers symlink"
 )
 
@@ -78,15 +75,18 @@
 
 # Wrap output in a target, so lldb-framework can depend on it.
 add_custom_target(liblldb-resource-headers DEPENDS ${lldb_staged_headers})
+set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "lldb misc")
 add_dependencies(liblldb liblldb-resource-headers)
 
 # At build time, copy the staged headers into the framework bundle (and do
 # some post-processing in-place).
+if (NOT IOS)
 add_custom_command(TARGET liblldb POST_BUILD
   COMMAND ${CMAKE_COMMAND} -E copy_directory ${lldb_header_staging} $<TARGET_FILE_DIR:liblldb>/Headers
   COMMAND ${LLDB_SOURCE_DIR}/scripts/framework-header-fix.sh $<TARGET_FILE_DIR:liblldb>/Headers ${LLDB_VERSION}
   COMMENT "LLDB.framework: copy framework headers"
 )
+endif()
 
 # Copy vendor-specific headers from clang (without staging).
 if(NOT IOS)
@@ -120,3 +120,8 @@
     COMMENT "LLDB.framework: copy clang vendor-specific headers"
   )
 endif()
+
+# Add an rpath pointing to the directory where LLDB.framework is installed.
+# This allows frameworks (relying on @rpath) to be installed in the same folder and found at runtime.
+set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH
+  "@loader_path/../../../")
diff --git a/src/llvm-project/lldb/cmake/modules/LLDBGenerateConfig.cmake b/src/llvm-project/lldb/cmake/modules/LLDBGenerateConfig.cmake
index 33b7e98..0d3a7fd 100644
--- a/src/llvm-project/lldb/cmake/modules/LLDBGenerateConfig.cmake
+++ b/src/llvm-project/lldb/cmake/modules/LLDBGenerateConfig.cmake
@@ -12,6 +12,7 @@
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)
+check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
 check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
 
 check_cxx_symbol_exists(process_vm_readv "sys/uio.h" HAVE_PROCESS_VM_READV)
@@ -22,9 +23,11 @@
 # These checks exist in LLVM's configuration, so I want to match the LLVM names
 # so that the check isn't duplicated, but we translate them into the LLDB names
 # so that I don't have to change all the uses at the moment.
-set(LLDB_CONFIG_TERMIOS_SUPPORTED ${HAVE_TERMIOS_H})
-if(NOT UNIX)
-  set(LLDB_DISABLE_POSIX 1)
+set(LLDB_ENABLE_TERMIOS ${HAVE_TERMIOS_H})
+if (UNIX)
+  set(LLDB_ENABLE_POSIX ON)
+else()
+  set(LLDB_ENABLE_POSIX OFF)
 endif()
 
 if(NOT LLDB_CONFIG_HEADER_INPUT)
diff --git a/src/llvm-project/lldb/cmake/modules/LLDBStandalone.cmake b/src/llvm-project/lldb/cmake/modules/LLDBStandalone.cmake
index b726797..752113b 100644
--- a/src/llvm-project/lldb/cmake/modules/LLDBStandalone.cmake
+++ b/src/llvm-project/lldb/cmake/modules/LLDBStandalone.cmake
@@ -1,9 +1,7 @@
-project(lldb)
-
 option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
 
-find_package(LLVM REQUIRED CONFIG HINTS "${LLVM_DIR}" NO_CMAKE_FIND_ROOT_PATH)
-find_package(Clang REQUIRED CONFIG HINTS "${Clang_DIR}" NO_CMAKE_FIND_ROOT_PATH)
+find_package(LLVM REQUIRED CONFIG HINTS ${LLVM_DIR} NO_CMAKE_FIND_ROOT_PATH)
+find_package(Clang REQUIRED CONFIG HINTS ${Clang_DIR} ${LLVM_DIR}/../clang NO_CMAKE_FIND_ROOT_PATH)
 
 # We set LLVM_CMAKE_PATH so that GetSVN.cmake is found correctly when building SVNVersion.inc
 set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR} CACHE PATH "Path to LLVM CMake modules")
@@ -31,31 +29,35 @@
 find_program(lit_full_path ${lit_file_name} ${config_dirs} NO_DEFAULT_PATH)
 set(LLVM_DEFAULT_EXTERNAL_LIT ${lit_full_path} CACHE PATH "Path to llvm-lit")
 
-if(CMAKE_CROSSCOMPILING)
-  set(LLVM_NATIVE_BUILD "${LLVM_BINARY_DIR}/NATIVE")
-  if (NOT EXISTS "${LLVM_NATIVE_BUILD}")
-    message(FATAL_ERROR
-      "Attempting to cross-compile LLDB standalone but no native LLVM build
-      found. Please cross-compile LLVM as well.")
-  endif()
-
-  if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
-    set(HOST_EXECUTABLE_SUFFIX ".exe")
-  endif()
-
-  if (NOT CMAKE_CONFIGURATION_TYPES)
-    set(LLVM_TABLEGEN_EXE
-      "${LLVM_NATIVE_BUILD}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
-  else()
-    # NOTE: LLVM NATIVE build is always built Release, as is specified in
-    # CrossCompile.cmake
-    set(LLVM_TABLEGEN_EXE
-      "${LLVM_NATIVE_BUILD}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
-  endif()
+if(LLVM_TABLEGEN)
+  set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN})
 else()
-  set(tblgen_file_name "llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
-  append_configuration_directories(${LLVM_TOOLS_BINARY_DIR} config_dirs)
-  find_program(LLVM_TABLEGEN_EXE ${tblgen_file_name} ${config_dirs} NO_DEFAULT_PATH)
+  if(CMAKE_CROSSCOMPILING)
+    set(LLVM_NATIVE_BUILD "${LLVM_BINARY_DIR}/NATIVE")
+    if (NOT EXISTS "${LLVM_NATIVE_BUILD}")
+      message(FATAL_ERROR
+        "Attempting to cross-compile LLDB standalone but no native LLVM build
+        found. Please cross-compile LLVM as well.")
+    endif()
+
+    if (CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
+      set(HOST_EXECUTABLE_SUFFIX ".exe")
+    endif()
+
+    if (NOT CMAKE_CONFIGURATION_TYPES)
+      set(LLVM_TABLEGEN_EXE
+        "${LLVM_NATIVE_BUILD}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+    else()
+      # NOTE: LLVM NATIVE build is always built Release, as is specified in
+      # CrossCompile.cmake
+      set(LLVM_TABLEGEN_EXE
+        "${LLVM_NATIVE_BUILD}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
+    endif()
+  else()
+    set(tblgen_file_name "llvm-tblgen${CMAKE_EXECUTABLE_SUFFIX}")
+    append_configuration_directories(${LLVM_TOOLS_BINARY_DIR} config_dirs)
+    find_program(LLVM_TABLEGEN_EXE ${tblgen_file_name} ${config_dirs} NO_DEFAULT_PATH)
+  endif()
 endif()
 
 # They are used as destination of target generators.
diff --git a/src/llvm-project/lldb/docs/.htaccess b/src/llvm-project/lldb/docs/.htaccess
index aa63b1e..596f448 100644
--- a/src/llvm-project/lldb/docs/.htaccess
+++ b/src/llvm-project/lldb/docs/.htaccess
@@ -1,4 +1,4 @@
-Redirect 301 /architecture/index.html https://lldb.llvm.org/use/architecture.html
+Redirect 301 /architecture/index.html https://lldb.llvm.org/resources/architecture.html
 Redirect 301 /cpp_reference/html/index.html https://lldb.llvm.org/cpp_reference/index.html
 Redirect 301 /features.html https://lldb.llvm.org/status/features.html
 Redirect 301 /formats.html https://lldb.llvm.org/use/formatting.html
@@ -6,6 +6,11 @@
 Redirect 301 /lldb-gdb.html https://lldb.llvm.org/use/map.html
 Redirect 301 /projects.html https://lldb.llvm.org/status/projects.html
 Redirect 301 /remote.html https://lldb.llvm.org/use/remote.html
-Redirect 301 /source.html https://lldb.llvm.org/resources/source.html
+Redirect 301 /source.html https://lldb.llvm.org/resources/contributing.html
 Redirect 301 /tutorial.html https://lldb.llvm.org/use/tutorial.html
 Redirect 301 /varformats.html https://lldb.llvm.org/use/variable.html
+
+# Sphinx redirects
+Redirect 301 /resources/source.html https://lldb.llvm.org/resources/contributing.html
+Redirect 301 /resources/download.html https://lldb.llvm.org/status/releases.html
+Redirect 301 /use/architecture.html https://lldb.llvm.org/resources/architecture.html
diff --git a/src/llvm-project/lldb/docs/CMakeLists.txt b/src/llvm-project/lldb/docs/CMakeLists.txt
index bfdd50b..8fa4686 100644
--- a/src/llvm-project/lldb/docs/CMakeLists.txt
+++ b/src/llvm-project/lldb/docs/CMakeLists.txt
@@ -15,43 +15,45 @@
   )
 endif()
 
-find_program(EPYDOC_EXECUTABLE NAMES epydoc epydoc.py)
-if(EPYDOC_EXECUTABLE)
-  message(STATUS "Found epydoc - ${EPYDOC_EXECUTABLE}")
+if (LLDB_ENABLE_PYTHON)
+  find_program(EPYDOC_EXECUTABLE NAMES epydoc epydoc.py)
+  if(EPYDOC_EXECUTABLE)
+    message(STATUS "Found epydoc - ${EPYDOC_EXECUTABLE}")
 
-  find_program(DOT_EXECUTABLE dot)
-  if(DOT_EXECUTABLE)
-    set(EPYDOC_OPTIONS ${EPYDOC_OPTIONS} --graph all --dotpath ${DOT_EXECUTABLE})
-    message(STATUS "Found dot - ${DOT_EXECUTABLE}")
+    find_program(DOT_EXECUTABLE dot)
+    if(DOT_EXECUTABLE)
+      set(EPYDOC_OPTIONS ${EPYDOC_OPTIONS} --graph all --dotpath ${DOT_EXECUTABLE})
+      message(STATUS "Found dot - ${DOT_EXECUTABLE}")
+    endif()
+
+    # Pretend to make a python package so that we can generate the reference.
+    # Because we don't build liblldb, epydoc will complain that the import of
+    # _lldb.so failed, but that doesn't prevent it from generating the docs.
+    file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lldb)
+    get_target_property(lldb_bindings_dir swig_wrapper BINARY_DIR)
+    add_custom_target(lldb-python-doc-package
+      COMMAND "${CMAKE_COMMAND}" -E copy "${lldb_bindings_dir}/lldb.py" "${CMAKE_CURRENT_BINARY_DIR}/lldb/__init__.py"
+      COMMENT "Copying lldb.py to pretend package.")
+    add_dependencies(lldb-python-doc-package swig_wrapper)
+
+    set(DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc")
+    file(MAKE_DIRECTORY "${DOC_DIR}")
+    add_custom_target(lldb-python-doc
+      ${EPYDOC_EXECUTABLE}
+      --html
+      lldb
+      -o ${CMAKE_CURRENT_BINARY_DIR}/python_reference
+      --name "LLDB python API"
+      --url "http://lldb.llvm.org"
+      ${EPYDOC_OPTIONS}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+      COMMENT "Generating LLDB Python API reference with epydoc" VERBATIM
+    )
+    add_dependencies(lldb-python-doc swig_wrapper lldb-python-doc-package)
+  else()
+    message(STATUS "Could NOT find epydoc")
   endif()
-
-  # Pretend to make a python package so that we can generate the reference.
-  # Because we don't build liblldb, epydoc will complain that the import of
-  # _lldb.so failed, but that doesn't prevent it from generating the docs.
-  file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lldb)
-  get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR)
-  add_custom_target(lldb-python-doc-package
-    COMMAND "${CMAKE_COMMAND}" -E copy "${lldb_scripts_dir}/lldb.py" "${CMAKE_CURRENT_BINARY_DIR}/lldb/__init__.py"
-    COMMENT "Copying lldb.py to pretend package.")
-  add_dependencies(lldb-python-doc-package swig_wrapper)
-
-  set(DOC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/doc")
-  file(MAKE_DIRECTORY "${DOC_DIR}")
-  add_custom_target(lldb-python-doc
-    ${EPYDOC_EXECUTABLE}
-    --html
-    lldb
-    -o ${CMAKE_CURRENT_BINARY_DIR}/python_reference
-    --name "LLDB python API"
-    --url "http://lldb.llvm.org"
-    ${EPYDOC_OPTIONS}
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-    COMMENT "Generating LLDB Python API reference with epydoc" VERBATIM
-  )
-  add_dependencies(lldb-python-doc swig_wrapper lldb-python-doc-package)
-else()
-  message(STATUS "Could NOT find epydoc")
-endif()
+endif ()
 
 if (LLVM_ENABLE_SPHINX)
   include(AddSphinxTarget)
@@ -64,5 +66,9 @@
         remove_directory ${CMAKE_CURRENT_BINARY_DIR}/html)
       add_dependencies(docs-lldb-html clean-lldb-html)
     endif()
+
+    if (${SPHINX_OUTPUT_MAN})
+      add_sphinx_target(man lldb)
+    endif()
   endif()
 endif()
diff --git a/src/llvm-project/lldb/docs/_static/lldb.css b/src/llvm-project/lldb/docs/_static/lldb.css
index aef51a1..53b7259 100644
--- a/src/llvm-project/lldb/docs/_static/lldb.css
+++ b/src/llvm-project/lldb/docs/_static/lldb.css
@@ -10,6 +10,14 @@
   max-width: 90%;
 }
 
+div.note {
+  padding: 20px 20px 10px 20px;
+}
+
+div.note p.admonition-title {
+  font-size: 130%;
+}
+
 table.mapping {
   width: 100%;
 }
diff --git a/src/llvm-project/lldb/docs/conf.py b/src/llvm-project/lldb/docs/conf.py
index ccabcfb..bd95cbe 100644
--- a/src/llvm-project/lldb/docs/conf.py
+++ b/src/llvm-project/lldb/docs/conf.py
@@ -226,7 +226,7 @@
 
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
-man_pages = []
+man_pages = [('man/lldb', 'lldb', u'LLDB Documentation', [u'LLVM project'], 1)]
 
 # If true, show URL addresses after external links.
 #man_show_urls = False
diff --git a/src/llvm-project/lldb/docs/doxygen.cfg.in b/src/llvm-project/lldb/docs/doxygen.cfg.in
index c882b36..7228a1e 100644
--- a/src/llvm-project/lldb/docs/doxygen.cfg.in
+++ b/src/llvm-project/lldb/docs/doxygen.cfg.in
@@ -303,7 +303,7 @@
 # If the EXTRACT_PRIVATE tag is set to YES all private members of a class
 # will be included in the documentation.
 
-EXTRACT_PRIVATE        = NO
+EXTRACT_PRIVATE        = YES
 
 # If the EXTRACT_STATIC tag is set to YES all static members of a file
 # will be included in the documentation.
diff --git a/src/llvm-project/lldb/docs/index.rst b/src/llvm-project/lldb/docs/index.rst
index 595a121..f1e1eda 100644
--- a/src/llvm-project/lldb/docs/index.rst
+++ b/src/llvm-project/lldb/docs/index.rst
@@ -15,23 +15,25 @@
 All of the code in the LLDB project is available under the
 `"Apache 2.0 License with LLVM exceptions"`_.
 
-.. _"Apache 2.0 License with LLVM exceptions": http://llvm.org/docs/DeveloperPolicy.html#new-llvm-project-license-framework
+.. _"Apache 2.0 License with LLVM exceptions": https://llvm.org/docs/DeveloperPolicy.html#new-llvm-project-license-framework
 
-Why a New Debugger?
--------------------
+Using LLDB
+----------
 
-In order to achieve our goals we decided to start with a fresh architecture
-that would support modern multi-threaded programs, handle debugging symbols in
-an efficient manner, use compiler based code knowledge and have plug-in support
-for functionality and extensions. Additionally we want the debugger
-capabilities to be available to other analysis tools, be they scripts or
-compiled programs, without requiring them to be GPL.
+For an introduction into the LLDB command language, head over to the `LLDB
+Tutorial <https://lldb.llvm.org/use/tutorial.html>`_. For users already familiar
+with GDB there is a cheat sheet listing common tasks and their LLDB equivalent
+in the `GDB to LLDB command map <https://lldb.llvm.org/use/map.html>`_.
+
+There are also multiple resources on how to script LLDB using Python `Python
+Reference <https://lldb.llvm.org/use/python-reference.html>`_ is a great
+starting point for that.
 
 Compiler Integration Benefits
 -----------------------------
 
-LLDB currently converts debug information into clang types so that it can
-leverage the clang compiler infrastructure. This allows LLDB to support the
+LLDB converts debug information into Clang types so that it can
+leverage the Clang compiler infrastructure. This allows LLDB to support the
 latest C, C++, Objective-C and Objective-C++ language features and runtimes in
 expressions without having to reimplement any of this functionality. It also
 leverages the compiler to take care of all ABI details when making functions
@@ -51,7 +53,7 @@
 The LLDB debugger APIs are exposed as a C++ object oriented interface in a
 shared library. The lldb command line tool links to, and uses this public API.
 On macOS the shared library is exposed as a framework named LLDB.framework,
-and unix systems expose it as lldb.so. The entire API is also then exposed
+and Unix systems expose it as lldb.so. The entire API is also then exposed
 through Python script bindings which allow the API to be used within the LLDB
 embedded script interpreter, and also in any python script that loads the
 lldb.py module in standard python script files. See the Python Reference page
@@ -68,8 +70,8 @@
 are welcome:
 
 * macOS desktop user space debugging for i386 and x86_64
-* iOS simulator debugging on i386 and x86_64
-* iOS device debugging on ARM and AArch64
+* iOS, tvOS, and watchOS simulator debugging on i386 and x86_64
+* iOS, tvOS, and watchOS device debugging on ARM and AArch64
 * Linux local user-space debugging for i386, x86_64 and PPC64le
 * FreeBSD local user-space debugging for i386 and x86_64
 * Windows local user-space debugging for i386 (*)
@@ -80,37 +82,42 @@
 Get Involved
 ------------
 
-To check out the code, use:
+Check out the LLVM source-tree with git and find the sources in the `lldb`
+subdirectory:
 
-svn co http://llvm.org/svn/llvm-project/lldb/trunk lldb
+::
 
-Note that LLDB generally builds from top-of-trunk
+  > git clone https://github.com/llvm/llvm-project.git
 
-* On macOS with Xcode
-* On Linux and FreeBSD (with clang and libstdc++/libc++)
-* On NetBSD (with GCC and clang and libstdc++/libc++)
-* On Windows with VS 2012 or higher using CMake
+Note that LLDB generally builds from top-of-trunk using CMake and Ninja.
+Additionally it builds:
 
-See the LLDB Build Page for platform-specific build instructions.
+* on macOS with a :ref:`generated Xcode project <CMakeGeneratedXcodeProject>`
+* on Linux and FreeBSD with Clang and libstdc++/libc++
+* on NetBSD with GCC/Clang and libstdc++/libc++
+* on Windows with a generated project for VS 2017 or higher
+
+See the :doc:`LLDB Build Page <resources/build>` for build instructions.
 
 Discussions about LLDB should go to the `lldb-dev
 <http://lists.llvm.org/mailman/listinfo/lldb-dev>`__ mailing list. Commit
-messages for the lldb SVN module are automatically sent to the `lldb-commits
+messages are automatically sent to the `lldb-commits
 <http://lists.llvm.org/mailman/listinfo/lldb-commits>`__ mailing list , and
 this is also the preferred mailing list for patch submissions.
 
-See the Projects page if you are looking for some interesting areas to
-contribute to lldb.
+See the :doc:`Projects page <status/projects>` if you are looking for some
+interesting areas to contribute to lldb.
 
 .. toctree::
    :hidden:
    :maxdepth: 1
-   :caption: Goals & Status
+   :caption: Project
 
    status/goals
    status/features
    status/status
    status/projects
+   status/releases
 
 .. toctree::
    :hidden:
@@ -127,34 +134,36 @@
    use/python-reference
    use/remote
    use/troubleshooting
-   use/architecture
 
 .. toctree::
    :hidden:
    :maxdepth: 1
-   :caption: Resources
+   :caption: Development
 
-   resources/download
-   resources/source
+   resources/architecture
+   resources/contributing
    resources/build
    resources/test
    resources/bots
+   resources/reproducers
    resources/sbapi
+   resources/caveats
 
 .. toctree::
    :hidden:
    :maxdepth: 1
-   :caption: API Documentation
+   :caption: Reference
 
-   Public Python API Reference <https://lldb.llvm.org/python_reference/index.html>
-   Public C++ API Reference <https://lldb.llvm.org/cpp_reference/namespacelldb.html>
-   Private C++ Reference <https://lldb.llvm.org/cpp_reference/index.html>
+   Public Python API <https://lldb.llvm.org/python_reference/index.html>
+   Public C++ API <https://lldb.llvm.org/cpp_reference/namespacelldb.html>
+   Private C++ API <https://lldb.llvm.org/cpp_reference/index.html>
+   Man Page <man/lldb>
 
 .. toctree::
    :hidden:
    :maxdepth: 1
    :caption: External Links
 
-   Source Code <http://llvm.org/viewvc/llvm-project/lldb/trunk/>
+   Source Code <https://github.com/llvm/llvm-project>
    Code Reviews <https://reviews.llvm.org>
    Bug Reports <https://bugs.llvm.org/>
diff --git a/src/llvm-project/lldb/docs/lldb-gdb-remote.txt b/src/llvm-project/lldb/docs/lldb-gdb-remote.txt
index c327477..06cd09d 100644
--- a/src/llvm-project/lldb/docs/lldb-gdb-remote.txt
+++ b/src/llvm-project/lldb/docs/lldb-gdb-remote.txt
@@ -1,15 +1,15 @@
 LLDB has added new GDB server packets to better support multi-threaded and
 remote debugging. Why? Normally you need to start the correct GDB and the
 correct GDB server when debugging. If you have mismatch, then things go wrong
-very quickly. LLDB makes extensive use of the GDB remote protocol and we 
+very quickly. LLDB makes extensive use of the GDB remote protocol and we
 wanted to make sure that the experience was a bit more dynamic where we can
 discover information about a remote target with having to know anything up
-front. We also ran into performance issues with the existing GDB remote 
+front. We also ran into performance issues with the existing GDB remote
 protocol that can be overcome when using a reliable communications layer.
 Some packets improve performance, others allow for remote process launching
 (if you have an OS), and others allow us to dynamically figure out what
 registers a thread might have. Again with GDB, both sides pre-agree on how the
-registers will look (how many, their register number,name and offsets). We 
+registers will look (how many, their register number,name and offsets). We
 prefer to be able to dynamically determine what kind of architecture, OS and
 vendor we are debugging, as well as how things are laid out when it comes to
 the thread register contexts. Below are the details on the new packets we have
@@ -79,10 +79,10 @@
 //  launched using the "A" packet.
 //
 // NB: key/value pairs are sent as-is so gdb-remote protocol meta characters
-//     (e.g. '#' or '$') are not acceptable.  If any non-printable or 
+//     (e.g. '#' or '$') are not acceptable.  If any non-printable or
 //     metacharacters are present in the strings, QEnvironmentHexEncoded
 //     should be used instead if it is available.  If you don't want to
-//     scan the environment strings before sending, prefer 
+//     scan the environment strings before sending, prefer
 //     the QEnvironmentHexEncoded packet over QEnvironment, if it is
 //     available.
 //
@@ -142,7 +142,7 @@
 //  It must be noted that even if the client has enabled reporting
 //  strings in error replies, it must not expect error strings to all
 //  error replies.
-// 
+//
 // PRIORITY TO IMPLEMENT
 //  Low. Only needed if the remote target wants to provide strings that
 //  are human readable along with an error code.
@@ -157,7 +157,7 @@
 // "QSetSTDERR:<ascii-hex-path>"
 //
 // BRIEF
-//  Setup where STDIN, STDOUT, and STDERR go prior to sending an "A" 
+//  Setup where STDIN, STDOUT, and STDERR go prior to sending an "A"
 //  packet.
 //
 // PRIORITY TO IMPLEMENT
@@ -221,7 +221,7 @@
 //
 // BRIEF
 //  Enable the threads: and thread-pcs: data in the question-mark packet
-//  ("T packet") responses when the stub reports that a program has 
+//  ("T packet") responses when the stub reports that a program has
 //  stopped executing.
 //
 // PRIORITY TO IMPLEMENT
@@ -404,7 +404,7 @@
 //  will get picked up automatically, and allows registers to change
 //  depending on the actual CPU type that is used.
 //
-//  NB: As of summer 2015, lldb can get register information from the 
+//  NB: As of summer 2015, lldb can get register information from the
 //  "qXfer:features:read:target.xml" FSF gdb standard register packet
 //  where the stub provides register definitions in an XML file.
 //  If qXfer:features:read:target.xml is supported, qRegisterInfo does
@@ -539,11 +539,11 @@
 
 As we see above we keep making subsequent calls to the remote server to
 discover all registers by increasing the number appended to qRegisterInfo and
-we get a response back that is a series of "key=value;" strings. 
+we get a response back that is a series of "key=value;" strings.
 
 The offset: fields should not leave a gap anywhere in the g/G packet -- the
 register values should be appended one after another.  For instance, if the
-register context for a thread looks like 
+register context for a thread looks like
 
 struct rctx {
     uint32_t gpr1;  // offset 0
@@ -554,8 +554,8 @@
 
 You may end up with a 4-byte gap between gpr3 and fp1 on architectures
 that align values like this.  The correct offset: value for fp1 is 12 -
-in the g/G packet fp1 will immediately follow gpr3, even though the 
-in-memory thread structure has an empty 4 bytes for alignment between 
+in the g/G packet fp1 will immediately follow gpr3, even though the
+in-memory thread structure has an empty 4 bytes for alignment between
 these two registers.
 
 The keys and values are detailed below:
@@ -571,10 +571,10 @@
 
 offset      The offset within the "g" and "G" packet of the register data for
             this register.  This is the byte offset once the data has been
-            transformed into binary, not the character offset into the g/G 
+            transformed into binary, not the character offset into the g/G
             packet.  Base 10.
 
-encoding    The encoding type of the register which must be one of: 
+encoding    The encoding type of the register which must be one of:
 
                  uint (unsigned integer)
                  sint (signed integer)
@@ -589,7 +589,7 @@
                 hex
                 float
                 vector-sint8
-                vector-uint8 
+                vector-uint8
                 vector-sint16
                 vector-uint16
                 vector-sint32
@@ -605,7 +605,7 @@
             string passed to strtoul() with a base of zero, so the number
             can be decimal, or hex if it is prefixed with "0x".
 
-            NOTE: If the compiler doesn't have a register number for this 
+            NOTE: If the compiler doesn't have a register number for this
             register, this key/value pair should be omitted.
 
 dwarf       The DWARF register number for this register that is used for this
@@ -613,30 +613,30 @@
             like a string passed to strtoul() with a base of zero, so the number
             can be decimal, or hex if it is prefixed with "0x".
 
-            NOTE: If the compiler doesn't have a register number for this 
+            NOTE: If the compiler doesn't have a register number for this
             register, this key/value pair should be omitted.
 
 generic     If the register is a generic register that most CPUs have, classify
             it correctly so the debugger knows. Valid values are one of:
-             pc  (a program counter register. for example "name=eip;" (i386), 
-                  "name=rip;" (x86_64), "name=r15;" (32 bit arm) would 
+             pc  (a program counter register. for example "name=eip;" (i386),
+                  "name=rip;" (x86_64), "name=r15;" (32 bit arm) would
                   include a "generic=pc;" key value pair)
-             sp  (a stack pointer register. for example "name=esp;" (i386), 
-                  "name=rsp;" (x86_64), "name=r13;" (32 bit arm) would 
+             sp  (a stack pointer register. for example "name=esp;" (i386),
+                  "name=rsp;" (x86_64), "name=r13;" (32 bit arm) would
                   include a "generic=sp;" key value pair)
-             fp  (a frame pointer register. for example "name=ebp;" (i386), 
-                   "name=rbp;" (x86_64), "name=r7;" (32 bit arm with macosx 
+             fp  (a frame pointer register. for example "name=ebp;" (i386),
+                   "name=rbp;" (x86_64), "name=r7;" (32 bit arm with macosx
                    ABI) would include a "generic=fp;" key value pair)
-             ra  (a return address register. for example "name=lr;" (32 bit ARM) 
+             ra  (a return address register. for example "name=lr;" (32 bit ARM)
                   would include a "generic=ra;" key value pair)
-             fp  (a CPU flags register. for example "name=eflags;" (i386), 
-                  "name=rflags;" (x86_64), "name=cpsr;" (32 bit ARM) 
+             fp  (a CPU flags register. for example "name=eflags;" (i386),
+                  "name=rflags;" (x86_64), "name=cpsr;" (32 bit ARM)
                   would include a "generic=flags;" key value pair)
-             arg1 - arg8 (specified for registers that contain function 
+             arg1 - arg8 (specified for registers that contain function
                       arguments when the argument fits into a register)
 
 container-regs
-            The value for this key is a comma separated list of raw hex (optional 
+            The value for this key is a comma separated list of raw hex (optional
             leading "0x") register numbers.
 
             This specifies that this register is contained in other concrete
@@ -644,25 +644,25 @@
             "rax" register value for x86_64, so "eax" could specify that it is
             contained in "rax" by specifying the register number for "rax" (whose
             register number is 0x00)
-            
+
             "container-regs:00;"
-            
+
             If a register is comprised of one or more registers, like "d0" is ARM
             which is a 64 bit register, it might be made up of "s0" and "s1". If
             the register number for "s0" is 0x20, and the register number of "s1"
             is "0x21", the "container-regs" key/value pair would be:
-            
+
             "container-regs:20,21;"
-            
+
             This is handy for defining what GDB used to call "pseudo" registers.
             These registers are never requested by LLDB via the register read
             or write packets, the container registers will be requested on behalf
             of this register.
-            
+
 invalidate-regs
-            The value for this key is a comma separated list of raw hex (optional 
+            The value for this key is a comma separated list of raw hex (optional
             leading "0x") register numbers.
-            
+
             This specifies which register values should be invalidated when this
             register is modified. For example if modifying "eax" would cause "rax",
             "eax", "ax", "ah", and "al" to be modified where rax is 0x0, eax is 0x15,
@@ -670,16 +670,16 @@
             pair would be:
 
             "invalidate-regs:0,15,25,35,39;"
-            
+
             If there is a single register that gets invalidated, then omit the comma
             and just list a single register:
-            
+
             "invalidate-regs:0;"
-            
+
             This is handy when modifying a specific register can cause other
             register values to change. For example, when debugging an ARM target,
             modifying the CPSR register can cause the r8 - r14 and cpsr value to
-            change depending on if the mode has changed. 
+            change depending on if the mode has changed.
 
 //----------------------------------------------------------------------
 // "qPlatform_shell"
@@ -790,17 +790,24 @@
 osmajor: optional, specifies the major version number of the OS (e.g. for macOS 10.12.2, it would be 10)
 osminor: optional, specifies the minor version number of the OS (e.g. for macOS 10.12.2, it would be 12)
 ospatch: optional, specifies the patch level number of the OS (e.g. for macOS 10.12.2, it would be 2)
+addressing_bits: optional, specifies how many bits in addresses are
+		 significant for addressing, base 10.  If bits 38..0
+		 in a 64-bit pointer are significant for addressing,
+		 then the value is 39.  This is needed on e.g. Aarch64
+		 v8.3 ABIs that use pointer authentication, so lldb
+		 knows which bits to clear/set to get the actual
+		 addresses.
 
 //----------------------------------------------------------------------
 // "qGDBServerVersion"
 //
 // BRIEF
-//  Get version information about this implementation of the gdb-remote 
+//  Get version information about this implementation of the gdb-remote
 //  protocol.
 //
 // PRIORITY TO IMPLEMENT
 //  High. This packet is usually very easy to implement and can help
-//  LLDB to work around bugs in a server's implementation when they 
+//  LLDB to work around bugs in a server's implementation when they
 //  are found.
 //----------------------------------------------------------------------
 
@@ -819,8 +826,8 @@
 read packet: $name:debugserver;version:310.2;#00
 
 Other clients may find other key-value pairs to be useful for identifying
-a gdb stub.  Patch level, release name, build number may all be keys that 
-better describe your implementation's version.  
+a gdb stub.  Patch level, release name, build number may all be keys that
+better describe your implementation's version.
 Suggested key names:
 
   name   : the name of your remote server - "debugserver" is the lldb standard
@@ -846,10 +853,10 @@
 //
 // PRIORITY TO IMPLEMENT
 //  Medium.  On systems which can launch multiple different architecture processes,
-//  the qHostInfo may not disambiguate sufficiently to know what kind of 
+//  the qHostInfo may not disambiguate sufficiently to know what kind of
 //  process is being debugged.
 //  e.g. on a 64-bit x86 Mac system both 32-bit and 64-bit user processes are possible,
-//  and with Mach-O universal files, the executable file may contain both 32- and 
+//  and with Mach-O universal files, the executable file may contain both 32- and
 //  64-bit slices so it may be impossible to know until you're attached to a real
 //  process to know what you're working with.
 //
@@ -886,17 +893,17 @@
 // "qShlibInfoAddr"
 //
 // BRIEF
-//  Get an address where the dynamic linker stores information about 
+//  Get an address where the dynamic linker stores information about
 //  where shared libraries are loaded.
 //
 // PRIORITY TO IMPLEMENT
 //  High if you have a dynamic loader plug-in in LLDB for your target
 //  triple (see the "qHostInfo" packet) that can use this information.
-//  Many times address load randomization can make it hard to detect 
+//  Many times address load randomization can make it hard to detect
 //  where the dynamic loader binary and data structures are located and
 //  some platforms know, or can find out where this information is.
 //
-//  Low if you have a debug target where all object and symbol files 
+//  Low if you have a debug target where all object and symbol files
 //  contain static load addresses.
 //----------------------------------------------------------------------
 
@@ -923,11 +930,11 @@
 //  Many times one thread will hit a breakpoint and while the debugger
 //  is in the process of suspending the other threads, other threads
 //  will also hit a breakpoint. This packet allows LLDB to know why all
-//  threads (live system debug) / cores (JTAG) in your program have 
-//  stopped and allows LLDB to display and control your program 
+//  threads (live system debug) / cores (JTAG) in your program have
+//  stopped and allows LLDB to display and control your program
 //  correctly.
 //----------------------------------------------------------------------
-    
+
 LLDB tries to use the "qThreadStopInfo" packet which is formatted as
 "qThreadStopInfo%x" where %x is the hex thread ID. This requests information
 about why a thread is stopped. The response is the same as the stop reply
@@ -1009,9 +1016,9 @@
 char packet[256];
 int packet_len;
 packet_len = ::snprintf (
-    packet, 
-    sizeof(packet), 
-    "_M%zx,%s%s%s", 
+    packet,
+    sizeof(packet),
+    "_M%zx,%s%s%s",
     (size_t)size,
     permissions & lldb::ePermissionsReadable ? "r" : "",
     permissions & lldb::ePermissionsWritable ? "w" : "",
@@ -1059,17 +1066,17 @@
 We added a way to get information for a memory region. The packet is:
 
     qMemoryRegionInfo:<addr>
-    
+
 Where <addr> is a big endian hex address. The response is returned in a series
 of tuples like the data returned in a stop reply packet. The currently valid
 tuples to return are:
 
-    start:<start-addr>; // <start-addr> is a big endian hex address that is 
+    start:<start-addr>; // <start-addr> is a big endian hex address that is
                         // the start address of the range that contains <addr>
-    
+
     size:<size>;    // <size> is a big endian hex byte size of the address
                     // of the range that contains <addr>
-    
+
     permissions:<permissions>;  // <permissions> is a string that contains one
                                 // or more of the characters from "rwx"
 
@@ -1078,13 +1085,13 @@
                  // regions backed by a file it have to be the absolute path of
                  // the file while for anonymous regions it have to be the name
                  // associated to the region if that is available.
-                                
+
     error:<ascii-byte-error-string>; // where <ascii-byte-error-string> is
-                                     // a hex encoded string value that 
+                                     // a hex encoded string value that
                                      // contains an error string
-                                    
+
 If the address requested is not in a mapped region (e.g. we've jumped through
-a NULL pointer and are at 0x0) currently lldb expects to get back the size 
+a NULL pointer and are at 0x0) currently lldb expects to get back the size
 of the unmapped region -- that is, the distance to the next valid region.
 For instance, with a macOS process which has nothing mapped in the first
 4GB of its address space, if we're asking about address 0x2,
@@ -1124,8 +1131,8 @@
 //
 // The "0x" prefixes are optional - like most of the gdb-remote packets,
 // omitting them will work fine; these numbers are always base 16.
-// 
-// The length of the payload is not provided.  A reliable, 8-bit clean, 
+//
+// The length of the payload is not provided.  A reliable, 8-bit clean,
 // transport layer is assumed.
 //----------------------------------------------------------------------
 
@@ -1141,7 +1148,7 @@
 // to query whether the monitor supports the extended detach, and if it does,
 // when we want the monitor to detach but not resume the target, we will
 // send:
-// 
+//
 //   D1
 //
 // In any case, if we want the normal detach behavior we will just send:
@@ -1155,13 +1162,13 @@
 //
 // BRIEF
 //  The QSaveRegisterState packet tells the remote debugserver to save
-//  all registers and return a non-zero unique integer ID that 
+//  all registers and return a non-zero unique integer ID that
 //  represents these save registers. If thread suffixes are enabled the
-//  second form of this packet is used, otherwise the first form is 
+//  second form of this packet is used, otherwise the first form is
 //  used. This packet is called prior to executing an expression, so
-//  the remote GDB server should do anything it needs to in order to 
+//  the remote GDB server should do anything it needs to in order to
 //  ensure the registers that are saved are correct. On macOS this
-//  involves calling "thread_abort_safely(mach_port_t thread)" to 
+//  involves calling "thread_abort_safely(mach_port_t thread)" to
 //  ensure we get the correct registers for a thread in case it is
 //  currently having code run on its behalf in the kernel.
 //
@@ -1184,14 +1191,14 @@
 // QRestoreRegisterState:<save_id>;thread:XXXX;
 //
 // BRIEF
-//  The QRestoreRegisterState packet tells the remote debugserver to 
+//  The QRestoreRegisterState packet tells the remote debugserver to
 //  restore all registers using the "save_id" which is an unsigned
-//  integer that was returned from a previous call to 
+//  integer that was returned from a previous call to
 //  QSaveRegisterState. The restoration process can only be done once
-//  as the data backing the register state will be freed upon the 
+//  as the data backing the register state will be freed upon the
 //  completion of the QRestoreRegisterState command.
 //
-//  If thread suffixes are enabled the second form of this packet is 
+//  If thread suffixes are enabled the second form of this packet is
 //  used, otherwise the first form is used.
 //
 // RESPONSE
@@ -1273,13 +1280,13 @@
 //  following forms:
 //
 //  "SAA"
-//  "S" means signal and "AA" is a hex signal number that describes why 
+//  "S" means signal and "AA" is a hex signal number that describes why
 //  the thread or stopped. It doesn't specify which thread, so the "T"
 //  packet is recommended to use instead of the "S" packet.
 //
 //  "TAAkey1:value1;key2:value2;..."
-//  "T" means a thread stopped due to a unix signal where "AA" is a hex 
-//  signal number that describes why the program stopped. This is 
+//  "T" means a thread stopped due to a unix signal where "AA" is a hex
+//  signal number that describes why the program stopped. This is
 //  followed by a series of key/value pairs:
 //      - If key is a hex number, it is a register number and value is
 //        the hex value of the register in debuggee endian byte order.
@@ -1313,14 +1320,14 @@
 //  KEY           VALUE     DESCRIPTION
 //  ===========   ========  ================================================
 //  "metype"      unsigned  mach exception type (the value of the EXC_XXX enumerations)
-//                          as an unsigned integer. For targets with mach 
+//                          as an unsigned integer. For targets with mach
 //                          kernels only.
 //
 //  "mecount"     unsigned  mach exception data count as an unsigned integer
 //                          For targets with mach kernels only.
 //
 //  "medata"      unsigned  There should be "mecount" of these and it is the data
-//                          that goes along with a mach exception (as an unsigned 
+//                          that goes along with a mach exception (as an unsigned
 //                          integer). For targets with mach kernels only.
 //
 //  "name"        string    The name of the thread as a plain string. The string
@@ -1342,7 +1349,7 @@
 //                          "signal" stopped due to an actual unix signal, not
 //                              just the debugger using a unix signal to keep
 //                              the GDB remote client happy.
-//                          "watchpoint". Should be used in conjunction with 
+//                          "watchpoint". Should be used in conjunction with
 //                              the "watch"/"rwatch"/"awatch" key value pairs.
 //                          "exception" an exception stop reason. Use with
 //                              the "description" key/value pair to describe the
@@ -1359,7 +1366,7 @@
 //                                  request that this be included in the T packet via
 //                                  the QListThreadsInStopReply packet earlier in
 //                                  the debug session.
-//                                  
+//
 //                                  Example:
 //                                  threads:63387,633b2,63424,63462,63486;
 //
@@ -1370,12 +1377,12 @@
 //                                  "threads" key is already included in the T packet.
 //                                  The pc values correspond to the threads reported
 //                                  in the "threads" list.  The number of pcs in the
-//                                  "thread-pcs" list will be the same as the number of 
+//                                  "thread-pcs" list will be the same as the number of
 //                                  threads in the "threads" list.
-//                                  lldb may request that this be included in the T 
-//                                  packet via the QListThreadsInStopReply packet 
+//                                  lldb may request that this be included in the T
+//                                  packet via the QListThreadsInStopReply packet
 //                                  earlier in the debug session.
-//                                  
+//
 //                                  Example:
 //                                  thread-pcs:dec14,2cf872b0,2cf8681c,2d02d68c,2cf716a8;
 //
@@ -1386,11 +1393,11 @@
 //  thread.
 //
 //  If a thread is stopped for no reason (like just because another thread
-//  stopped, or because when one core stops all cores should stop), use a 
-//  "T" packet with "00" as the signal number and fill in as many key values 
+//  stopped, or because when one core stops all cores should stop), use a
+//  "T" packet with "00" as the signal number and fill in as many key values
 //  and registers as possible.
 //
-//  LLDB likes to know why a thread stopped since many thread control 
+//  LLDB likes to know why a thread stopped since many thread control
 //  operations like stepping over a source line, actually are implemented
 //  by running the process multiple times. If a breakpoint is hit while
 //  trying to step over a source line and LLDB finds out that a breakpoint
@@ -1399,12 +1406,12 @@
 //  do the step. If we are at a breakpoint and we disable the breakpoint
 //  at the current PC and do an instruction single step, knowing that
 //  we stopped due to a "trace" helps us know that we can continue
-//  running versus stopping due to a "breakpoint" (if we have two 
+//  running versus stopping due to a "breakpoint" (if we have two
 //  breakpoint instruction on consecutive instructions). So the more info
 //  we can get about the reason a thread stops, the better job LLDB can
-//  do when controlling your process. A typical GDB server behavior is 
+//  do when controlling your process. A typical GDB server behavior is
 //  to send a SIGTRAP for breakpoints _and_ also when instruction single
-//  stepping, in this case the debugger doesn't really know why we 
+//  stepping, in this case the debugger doesn't really know why we
 //  stopped and it can make it hard for the debugger to control your
 //  program correctly. What if a real SIGTRAP was delivered to a thread
 //  while we were trying to single step? We wouldn't know the difference
@@ -1414,7 +1421,7 @@
 //  High. Having the extra information in your stop reply packets makes
 //  your debug session more reliable and informative.
 //----------------------------------------------------------------------
- 
+
 
 //----------------------------------------------------------------------
 // PLATFORM EXTENSION - for use as a GDB remote platform
@@ -1424,7 +1431,7 @@
 //
 // BRIEF
 //  Get the first process info (qfProcessInfo) or subsequent process
-//  info (qsProcessInfo) for one or more processes on the remote 
+//  info (qsProcessInfo) for one or more processes on the remote
 //  platform. The first call gets the first match and subsequent calls
 //  to qsProcessInfo gets the subsequent matches. Return an error EXX,
 //  where XX are two hex digits, when no more matches are available.
@@ -1435,22 +1442,25 @@
 //
 //  KEY           VALUE     DESCRIPTION
 //  ===========   ========  ================================================
-//  "name"        ascii-hex An ASCII hex string that contains the name of 
+//  "name"        ascii-hex An ASCII hex string that contains the name of
 //                          the process that will be matched.
-//  "name_match"  enum      One of: "equals", "starts_with", "ends_with", 
+//  "name_match"  enum      One of: "equals", "starts_with", "ends_with",
 //                          "contains" or "regex"
 //  "pid"         integer   A string value containing the decimal process ID
-//  "parent_pid"  integer   A string value containing the decimal parent 
+//  "parent_pid"  integer   A string value containing the decimal parent
 //                          process ID
 //  "uid"         integer   A string value containing the decimal user ID
 //  "gid"         integer   A string value containing the decimal group ID
 //  "euid"        integer   A string value containing the decimal effective user ID
 //  "egid"        integer   A string value containing the decimal effective group ID
 //  "all_users"   bool      A boolean value that specifies if processes should
-//                          be listed for all users, not just the user that the 
+//                          be listed for all users, not just the user that the
 //                          platform is running as
-//  "triple"      string    An ASCII triple string ("x86_64", 
+//  "triple"      string    An ASCII triple string ("x86_64",
 //                          "x86_64-apple-macosx", "armv7-apple-ios")
+//  "args"        string    A string value containing the process arguments
+//                          separated by the character '-', where each argument is
+//                          hex-encoded. It includes argv[0].
 //
 // The response consists of key/value pairs where the key is separated from the
 // values with colons and each pair is terminated with a semi colon. For a list
@@ -1513,7 +1523,7 @@
 //  ID. PID is specified as a decimal integer.
 //
 // PRIORITY TO IMPLEMENT
-//  Optional. 
+//  Optional.
 //
 // The response consists of key/value pairs where the key is separated from the
 // values with colons and each pair is terminated with a semi colon.
@@ -1541,7 +1551,7 @@
 //
 // BRIEF
 //  Same as vAttach, except instead of a "pid" you send a process name.
-//  
+//
 // PRIORITY TO IMPLEMENT
 //  Low. Only needed for "process attach -n".  If the packet isn't supported
 //  then "process attach -n" will fail gracefully.  So you need only to support
@@ -1586,7 +1596,7 @@
 //  you don't implement it but do implement -n AND lldb can somehow get
 //  a process list from your device, it will fall back on scanning the
 //  process list, and sending vAttach or vAttachWait depending on
-//  whether the requested process exists already.  This is racy, 
+//  whether the requested process exists already.  This is racy,
 //  however, so if you want to support this behavior it is better to
 //  support this packet.
 //----------------------------------------------------------------------
@@ -1596,11 +1606,11 @@
 //
 // BRIEF
 //  This packet, which takes its arguments as JSON and sends its reply as
-//  JSON, allows the gdb remote stub to provide additional information 
+//  JSON, allows the gdb remote stub to provide additional information
 //  about a given thread.
 //
 // PRIORITY TO IMPLEMENT
-//  Low.  This packet is only needed if the gdb remote stub wants to 
+//  Low.  This packet is only needed if the gdb remote stub wants to
 //  provide interesting additional information about a thread for the
 //  user.
 //
@@ -1619,7 +1629,7 @@
 //
 //   jThreadExtendedInfo:{"plo_pthread_tsd_base_address_offset":0,"plo_pthread_tsd_base_offset":224,"plo_pthread_tsd_entry_size":8,"thread":612910}
 //
-// There are no requirements for what is included in the response.  A simple 
+// There are no requirements for what is included in the response.  A simple
 // reply on a OS X Yosemite / iOS 8 may include the pthread_t value, the
 // Thread Specific Data (TSD) address, the dispatch_queue_t value if the thread
 // is associated with a GCD queue, and the requested Quality of Service (QoS)
@@ -1627,12 +1637,12 @@
 //
 //  {"tsd_address":4371349728,"requested_qos":{"enum_value":33,"constant_name":"QOS_CLASS_USER_INTERACTIVE","printable_name":"User Interactive"},"pthread_t":4371349504,"dispatch_queue_t":140735087127872}
 //
-// tsd_address, pthread_t, and dispatch_queue_t are all simple key-value pairs.  
-// The JSON standard requires that numbers be expressed in base 10 - so all of 
-// these are.  requested_qos is a dictionary with three key-value pairs in it - 
+// tsd_address, pthread_t, and dispatch_queue_t are all simple key-value pairs.
+// The JSON standard requires that numbers be expressed in base 10 - so all of
+// these are.  requested_qos is a dictionary with three key-value pairs in it -
 // so the UI layer may choose the form most appropriate for displaying to the user.
 //
-// Sending JSON over gdb-remote protocol introduces some problems.  We may be 
+// Sending JSON over gdb-remote protocol introduces some problems.  We may be
 // sending strings with arbitrary contents in them, including the '#', '$', and '*'
 // characters that have special meaning in gdb-remote protocol and cannot occur
 // in the middle of the string.  The standard solution for this would be to require
@@ -1655,13 +1665,13 @@
 //
 // BRIEF
 //  This packet enables compression of the packets that the debug stub sends to lldb.
-//  If the debug stub can support compression, it indictes this in the reply of the 
+//  If the debug stub can support compression, it indictes this in the reply of the
 //  "qSupported" packet.  e.g.
 //   LLDB SENDS:    qSupported:xmlRegisters=i386,arm,mips
 //   STUB REPLIES:  qXfer:features:read+;SupportedCompressions=lzfse,zlib-deflate,lz4,lzma;DefaultCompressionMinSize=384
 //
 //  If lldb knows how to use any of these compression algorithms, it can ask that this
-//  compression mode be enabled.  It may optionally change the minimum packet size 
+//  compression mode be enabled.  It may optionally change the minimum packet size
 //  where compression is used.  Typically small packets do not benefit from compression,
 //  as well as compression headers -- compression is most beneficial with larger packets.
 //
@@ -1672,7 +1682,7 @@
 //  The debug stub should reply with an uncompressed "OK" packet to indicate that the
 //  request was accepted.  All further packets the stub sends will use this compression.
 //
-//  Packets are compressed as the last step before they are sent from the stub, and 
+//  Packets are compressed as the last step before they are sent from the stub, and
 //  decompressed as the first step after they are received.  The packet format in compressed
 //  mode becomes one of two:
 //
@@ -1681,7 +1691,7 @@
 //   $C<size of uncompressed payload in base10>:<compressed payload>#00
 //
 //  Where "#00" is the actual checksum value if noack mode is not enabled.  The checksum
-//  value is for the "N<uncompressed payload>" or 
+//  value is for the "N<uncompressed payload>" or
 //  "C<size of uncompressed payload in base10>:<compressed payload>" bytes in the packet.
 //
 //  The size of the uncompressed payload in base10 is provided because it will simplify
@@ -1695,7 +1705,7 @@
 //
 //    zlib-deflate
 //       The raw DEFLATE format as described in IETF RFC 1951.  With the ZLIB library, you
-//       can compress to this format with an initialization like 
+//       can compress to this format with an initialization like
 //           deflateInit2 (&stream, 5, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY)
 //       and you can decompress with an initialization like
 //           inflateInit2 (&stream, -15)
@@ -1737,9 +1747,9 @@
 //       jGetLoadedDynamicLibrariesInfos:{"solib_addresses":[8382824135,3258302053,830202858503]}
 //
 //  The second call is both a performance optimization (instead of having lldb read the mach-o header/load commands
-//  out of memory with generic read packets) but also adds additional information in the form of the 
+//  out of memory with generic read packets) but also adds additional information in the form of the
 //  filename of the shared libraries (which is not available in the mach-o header/load commands.)
-//  
+//
 //  An example using the OS X 10.11 style call:
 //
 //  LLDB SENDS: jGetLoadedDynamicLibrariesInfos:{"image_count":1,"image_list_address":140734800075128}
@@ -1797,7 +1807,7 @@
 // would need to work correctly on this platform.
 //
 // PRIORITY TO IMPLEMENT
-//  On OS X 10.11, iOS 9, tvOS 9, watchOS 2 and older: Low.  If this packet is absent, 
+//  On OS X 10.11, iOS 9, tvOS 9, watchOS 2 and older: Low.  If this packet is absent,
 //  lldb will read the Mach-O headers/load commands out of memory.
 //  On macOS 10.12, iOS 10, tvOS 10, watchOS 3 and newer: High.  If this packet is absent,
 //  lldb will not know anything about shared libraries in the inferior, or where the main
diff --git a/src/llvm-project/lldb/docs/lldb-platform-packets.txt b/src/llvm-project/lldb/docs/lldb-platform-packets.txt
index 3258e4c..ed5d717 100644
--- a/src/llvm-project/lldb/docs/lldb-platform-packets.txt
+++ b/src/llvm-project/lldb/docs/lldb-platform-packets.txt
@@ -181,10 +181,31 @@
 //  send:    pid:3500;name:612e6f7574;
 //
 //  The request packet has a criteria to search for, followed by
-//  a specific name.  Other name_match: values include
-//  starts_with, ends_with, contains, regex.  You can specify a pid
-//  to search for, a uid, all_users, triple, etc etc.  The testsuite
-//  only ever searches for name_match:equals.
+//  a specific name.  
+//
+//  KEY           VALUE     DESCRIPTION
+//  ===========   ========  ================================================
+//  "name"        ascii-hex An ASCII hex string that contains the name of 
+//                          the process that will be matched.
+//  "name_match"  enum      One of: "equals", "starts_with", "ends_with", 
+//                          "contains" or "regex"
+//  "pid"         integer   A string value containing the decimal process ID
+//  "parent_pid"  integer   A string value containing the decimal parent 
+//                          process ID
+//  "uid"         integer   A string value containing the decimal user ID
+//  "gid"         integer   A string value containing the decimal group ID
+//  "euid"        integer   A string value containing the decimal effective user ID
+//  "egid"        integer   A string value containing the decimal effective group ID
+//  "all_users"   bool      A boolean value that specifies if processes should
+//                          be listed for all users, not just the user that the 
+//                          platform is running as
+//  "triple"      ascii-hex An ASCII hex target triple string ("x86_64", 
+//                          "x86_64-apple-macosx", "armv7-apple-ios")
+//
+//  If no criteria is given, qfProcessInfo will request a list of every process.
+//
+//  The lldb testsuite currently only uses name_match:equals and the
+//  no-criteria mode to list every process.
 //
 //  The response should include any information about the process that
 //  can be retrieved in semicolon-separated name:value fields.
@@ -195,6 +216,14 @@
 //  the search, qsProcessInfo should be sent.
 //
 //  If no process match is found, Exx should be returned.
+//
+//  Sample packet/response:
+//  send packet: $qfProcessInfo#00
+//  read packet: $pid:60001;ppid:59948;uid:7746;gid:11;euid:7746;egid:11;name:6c6c6462;triple:7838365f36342d6170706c652d6d61636f7378;#00
+//  send packet: $qsProcessInfo#00
+//  read packet: $pid:59992;ppid:192;uid:7746;gid:11;euid:7746;egid:11;name:6d64776f726b6572;triple:7838365f36342d6170706c652d6d61636f7378;#00
+//  send packet: $qsProcessInfo#00
+//  read packet: $E04#00
 
 //----------------------------------------------------------------------
 // qsProcessInfo
diff --git a/src/llvm-project/lldb/docs/lldb.1 b/src/llvm-project/lldb/docs/lldb.1
deleted file mode 100644
index a28cabe..0000000
--- a/src/llvm-project/lldb/docs/lldb.1
+++ /dev/null
@@ -1,154 +0,0 @@
-.Dd December 16, 2015   \" DATE
-.Dt LLDB 1           \" Program name and manual section number
-.Os
-.Sh NAME             \" Section Header - required - do not modify
-.Nm lldb
-.Nd The debugger
-.Sh SYNOPSIS         \" Section Header - required - do not modify
-.Nm lldb
-.Op Fl hvdexw
-.Op Fl a Ar arch
-.Op Fl c Ar core-file
-.Op Fl l Ar script-language
-.Op Fl s Ar lldb-commands
-.Op Fl n Ar process-name
-.Op Fl p Ar pid
-.Ar [[--] <PROGRAM-ARG1> <PROGRAM-ARG2> ...]
-.Sh DESCRIPTION      \" Section Header - required - do not modify
-.Nm
-is the command line interface for the LLDB debugger library.
-.Nm
-can debug C, C++, Objective-C, and Objective-C++ programs.
-.Pp
-The following options are available:
-.Bl -tag -width indent
-.It Fl h, -help
-Prints out the usage information for the
-.Nm
-debugger.
-The
-.Fl -help
-text may be more up-to-date and
-authoritative than the command line options described in this man
-page.
-.It Fl v, -version
-Prints out the version number of the
-.Nm
-debugger.
-.It Fl a, -arch Ar arch
-Specifies which architecture
-.Nm
-will use when launching the specified program (assuming the provided
-executable is built for multiple architectures.)
-.It Fl f, -file Ar filename
-Specifies the executable file that
-.Nm
-will be launching / attaching to.
-.It Fl n, -attach-name Ar process-name
-Specifies the name of a currently-running process to attach to.
-(or the name of a process to wait for if
-.Fl w
-is used.)
-.It Fl w, -wait-for
-When used in concert with
-.Fl n Ar process-name ,
-indicates that
-.Nm
-should wait for a new process of that name to be started -- and attach
-to it as early in the process-launch as possible.
-.It Fl p, -attach-pid Ar pid
-Specifies a currently running process that
-.Nm
-should attach to.
-.It Fl c, -core Ar core-file
-Specifies the core file to examine.
-.It Fl l, -script-language Ar language
-Tells the debugger to use the specified scripting language for
-user-defined scripts, rather than the default.
-Valid scripting
-languages that can be specified include Python, Perl, Ruby and Tcl.
-Currently only the Python extensions have been implemented.
-.It Fl d, -debug
-Tells the debugger to print out extra information for debugging itself.
-.It Fl s, -source Ar filename
-Tells
-.Nm
-to read in and execute the file
-.Qq Ar filename ,
-which should contain
-.Nm
-commands.
-.It Fl e, -editor
-Instructs
-.Nm
-to open source files using the host's "external editor" mechanism.
-.It Fl x, -no-lldbinit
-Do not automatically parse any '.lldbinit' files.
-.Pp
-(If you do not provide -f then the first argument will be the file to
-be debugged
-so 'lldb -- <filename> [<ARG1> [<ARG2>]]' also works.
-Remember to end the options with "--" if any of your arguments have
-a "-" in them.)
-.El
-.Sh USING LLDB
-In
-.Nm
-there is a
-.Cm help
-command which can be used to find descriptions and examples of all
-.Nm
-commands.
-To get help on
-.Qq Cm breakpoint set
-you would type
-.Qq Cm help breakpoint set .
-.Pp
-There is also an
-.Cm apropos
-command which will search the help text of all commands
-for a given term -- this is useful for locating a command by topic.
-For instance,
-.Qq Cm apropos breakpoint
-will list any command that has the word
-.Qq Cm breakpoint
-in its help text.
-.Sh FILES
-.Nm
-will read settings/aliases/commands from three files at startup, if they exist.
-.Pp
-First, it will read a
-.Pa ~/.lldbinit-debugger
-command file.
-If you are using the
-.Nm
-command line interface, this is
-.Pa ~/.lldbinit-lldb .
-If you are using
-.Nm
-inside a GUI debugger like
-.Nm Xcode
-this will be
-.Pa ~/.lldbinit-Xcode .
-This is a useful place to put settings that you want to apply only when a given
-.Nm
-command interpreter is used.
-.Pp
-Second,
-.Pa ~/.lldbinit
-is read.
-.Pp
-Third, an
-.Pa .lldbinit
-file in the current working directory (where
-.Nm
-is started) will be read.
-.Sh SEE ALSO
-The LLDB project page http://lldb.llvm.org/ has many different resources for
-.Nm
-users -- the gdb/lldb command equivalence page http://lldb.llvm.org/lldb-gdb.html can
-be especially helpful for users coming from gdb.
-.Sh BUGS
-To report bugs, please visit http://llvm.org/bugs/
-.Sh AUTHOR
-Maintained by the LLDB Team, http://lldb.llvm.org/
diff --git a/src/llvm-project/lldb/docs/man/lldb.rst b/src/llvm-project/lldb/docs/man/lldb.rst
new file mode 100644
index 0000000..b4972df
--- /dev/null
+++ b/src/llvm-project/lldb/docs/man/lldb.rst
@@ -0,0 +1,323 @@
+:orphan:
+
+lldb -- The Debugger
+====================
+
+.. program:: lldb
+
+SYNOPSIS
+--------
+
+| :program:`lldb` [*options*] *executable*
+
+DESCRIPTION
+-----------
+
+:program:`lldb` is a next generation, high-performance debugger. It is built as
+a set of reusable components which highly leverage existing libraries in the
+larger LLVM Project, such as the Clang expression parser and LLVM disassembler.
+
+:program:`lldb` is the default debugger in Xcode on macOS and supports
+debugging C, Objective-C and C++ on the desktop and iOS devices and simulator.
+
+All of the code in the LLDB project is available under the Apache 2.0 License
+with LLVM exceptions.
+
+ATTACHING
+---------
+
+.. option:: --attach-name <name>
+
+ Tells the debugger to attach to a process with the given name.
+
+.. option:: --attach-pid <pid>
+
+ Tells the debugger to attach to a process with the given pid.
+
+.. option:: -n <value>
+
+ Alias for --attach-name
+
+.. option:: -p <value>
+
+ Alias for --attach-pid
+
+.. option:: --wait-for
+
+ Tells the debugger to wait for a process with the given pid or name to launch before attaching.
+
+.. option:: -w
+
+ Alias for --wait-for
+
+COMMANDS
+--------
+
+.. option:: --batch
+
+ Tells the debugger to run the commands from -s, -S, -o & -O, and then quit.
+
+.. option:: -b
+
+ Alias for --batch
+
+.. option:: -K <value>
+
+ Alias for --source-on-crash
+
+.. option:: -k <value>
+
+ Alias for --one-line-on-crash
+
+.. option:: --local-lldbinit
+
+ Allow the debugger to parse the .lldbinit files in the current working directory, unless --no-lldbinit is passed.
+
+.. option:: --no-lldbinit
+
+ Do not automatically parse any '.lldbinit' files.
+
+.. option:: --one-line-before-file <command>
+
+ Tells the debugger to execute this one-line lldb command before any file provided on the command line has been loaded.
+
+.. option::  --one-line-on-crash <command>
+
+ When in batch mode, tells the debugger to run this one-line lldb command if the target crashes.
+
+.. option:: --one-line <command>
+
+ Tells the debugger to execute this one-line lldb command after any file provided on the command line has been loaded.
+
+.. option:: -O <value>
+
+ Alias for --one-line-before-file
+
+.. option:: -o <value>
+
+ Alias for --one-line
+
+.. option:: -Q
+
+ Alias for --source-quietly
+
+.. option:: --source-before-file <file>
+
+ Tells the debugger to read in and execute the lldb commands in the given file, before any file has been loaded.
+
+.. option:: --source-on-crash <file>
+
+ When in batch mode, tells the debugger to source this file of lldb commands if the target crashes.
+
+.. option:: --source-quietly
+
+ Tells the debugger to execute this one-line lldb command before any file has been loaded.
+
+.. option:: --source <file>
+
+ Tells the debugger to read in and execute the lldb commands in the given file, after any file has been loaded.
+
+.. option:: -S <value>
+
+ Alias for --source-before-file
+
+.. option:: -s <value>
+
+ Alias for --source
+
+.. option:: -x
+
+ Alias for --no-lldbinit
+
+OPTIONS
+-------
+
+.. option:: --arch <architecture>
+
+ Tells the debugger to use the specified architecture when starting and running the program.
+
+.. option:: -a <value>
+
+ Alias for --arch
+
+.. option:: --capture-path <filename>
+
+ Tells the debugger to use the given filename for the reproducer.
+
+.. option:: --capture
+
+ Tells the debugger to capture a reproducer.
+
+.. option:: --core <filename>
+
+ Tells the debugger to use the full path to <filename> as the core file.
+
+.. option:: -c <value>
+
+ Alias for --core
+
+.. option:: --debug
+
+ Tells the debugger to print out extra information for debugging itself.
+
+.. option:: -d
+
+ Alias for --debug
+
+.. option:: --editor
+
+ Tells the debugger to open source files using the host's "external editor" mechanism.
+
+.. option:: -e
+
+ Alias for --editor
+
+.. option:: --file <filename>
+
+ Tells the debugger to use the file <filename> as the program to be debugged.
+
+.. option:: -f <value>
+
+ Alias for --file
+
+.. option:: --help
+
+ Prints out the usage information for the LLDB debugger.
+
+.. option:: -h
+
+ Alias for --help
+
+.. option:: --no-use-colors
+
+ Do not use colors.
+
+.. option:: --replay <filename>
+
+ Tells the debugger to replay a reproducer from <filename>.
+
+.. option:: --version
+
+ Prints out the current version number of the LLDB debugger.
+
+.. option:: -v
+
+ Alias for --version
+
+.. option:: -X
+
+ Alias for --no-use-color
+
+REPL
+----
+
+.. option:: -r=<flags>
+
+ Alias for --repl=<flags>
+
+.. option:: --repl-language <language>
+
+ Chooses the language for the REPL.
+
+.. option:: --repl=<flags>
+
+ Runs lldb in REPL mode with a stub process with the given flags.
+
+.. option:: -R <value>
+
+ Alias for --repl-language
+
+SCRIPTING
+---------
+
+.. option:: -l <value>
+
+ Alias for --script-language
+
+.. option:: --python-path
+
+ Prints out the path to the lldb.py file for this version of lldb.
+
+.. option:: -P
+
+ Alias for --python-path
+
+.. option:: --script-language <language>
+
+ Tells the debugger to use the specified scripting language for user-defined scripts.
+
+EXAMPLES
+--------
+
+The debugger can be started in several modes.
+
+Passing an executable as a positional argument prepares :program:`lldb` to
+debug the given executable. Arguments passed after -- are considered arguments
+to the debugged executable.
+
+  lldb --arch x86_64 /path/to/program -- --arch arvm7
+
+Passing one of the attach options causes :program:`lldb` to immediately attach
+to the given process.
+
+  lldb -p <pid>
+  lldb -n <process-name>
+
+Passing --repl starts :program:`lldb` in REPL mode.
+
+  lldb -r
+
+Passing --core causes :program:`lldb` to debug the core file.
+
+  lldb -c /path/to/core
+
+Command options can be combined with these modes and cause :program:`lldb` to
+run the specified commands before or after events, like loading the file or
+crashing, in the order provided on the command line.
+
+  lldb -O 'settings set stop-disassembly-count 20' -o 'run' -o 'bt'
+  lldb -S /source/before/file -s /source/after/file
+  lldb -K /source/before/crash -k /source/after/crash
+
+Note: In REPL mode no file is loaded, so commands specified to run after
+loading the file (via -o or -s) will be ignored.
+
+USING LLDB
+----------
+
+In :program:`lldb` there is a help command which can be used to find
+descriptions and examples of all :program:`lldb` commands.  To get help on
+"breakpoint set" you would type "help breakpoint set".
+
+There is also an apropos command which will search the help text of all
+commands for a given term ‐‐ this is useful for locating a command by topic.
+For instance, "apropos breakpoint" will list any command that has the word
+"breakpoint" in its help text.
+
+CONFIGURATION FILES
+-------------------
+
+:program:`lldb` reads things like settings, aliases and commands from the
+.lldbinit file. It will first look for ~/.lldbinit and load that first.
+Secondly, it will look for an .lldbinit file in the current working directory.
+For security reasons, :program:`lldb` will print a warning and not source this
+file by default. This behavior can be changed by changing the
+target.load-cwd-lldbinit setting.
+
+To always load the .lldbinit file in the current working directory, add the
+following command to ~/.lldbinit:
+
+  settings set target.load-cwd-lldbinit true
+
+To never load the .lldbinit file in the current working directory and silence
+the warning, add the following command to ~/.lldbinit:
+
+  settings set target.load-cwd-lldbinit false
+
+SEE ALSO
+--------
+
+The LLDB project page https://lldb.llvm.org has many different resources
+for :program:`lldb` users ‐‐ the gdb/lldb command equivalence page
+https://lldb.llvm.org/use/map.html can be especially helpful for users
+coming from gdb.
diff --git a/src/llvm-project/lldb/docs/use/architecture.rst b/src/llvm-project/lldb/docs/resources/architecture.rst
similarity index 100%
rename from src/llvm-project/lldb/docs/use/architecture.rst
rename to src/llvm-project/lldb/docs/resources/architecture.rst
diff --git a/src/llvm-project/lldb/docs/resources/bots.rst b/src/llvm-project/lldb/docs/resources/bots.rst
index 20ce69c..ed2d75a 100644
--- a/src/llvm-project/lldb/docs/resources/bots.rst
+++ b/src/llvm-project/lldb/docs/resources/bots.rst
@@ -11,7 +11,7 @@
 
 * `lldb-x64-windows-ninja <http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja>`_
 * `lldb-x86_64-debian <http://lab.llvm.org:8011/builders/lldb-x86_64-debian>`_
-* `lldb-x86_64-fedora <http://lab.llvm.org:8011/builders/lldb-x86_64-fedora>`_
+* `lldb-x86_64-fedora <http://lab.llvm.org:8014/builders/lldb-x86_64-fedora>`_
 
 Documentation
 -------------
@@ -31,6 +31,5 @@
 * `lldb-cmake-matrix <http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-matrix/>`_
 * `lldb-cmake-python3 <http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-python3/>`_
 * `lldb-cmake-standalone <http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-standalone/>`_
-* `lldb-sanitized <http://green.lab.llvm.org/green/view/LLDB/job/lldb-sanitized/>`_
-* `lldb-xcode <http://green.lab.llvm.org/green/view/LLDB/job/lldb-xcode/>`_
+* `lldb-cmake-sanitized <http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-sanitized/>`_
 
diff --git a/src/llvm-project/lldb/docs/resources/build.rst b/src/llvm-project/lldb/docs/resources/build.rst
index 8d45f63..41586e2 100644
--- a/src/llvm-project/lldb/docs/resources/build.rst
+++ b/src/llvm-project/lldb/docs/resources/build.rst
@@ -1,9 +1,19 @@
-Build
-=====
+Building
+========
 
 .. contents::
    :local:
 
+Getting the Sources
+-------------------
+
+Please refer to the `LLVM Getting Started Guide
+<https://llvm.org/docs/GettingStarted.html#getting-started-with-llvm>`_ for
+general instructions on how to check out the LLVM monorepo, which contains the
+LLDB sources.
+
+Git browser: https://github.com/llvm/llvm-project/tree/master/lldb
+
 Preliminaries
 -------------
 
@@ -12,16 +22,49 @@
 this tight integration the Getting Started guides for both of these projects
 come as prerequisite reading:
 
-* `LLVM <http://llvm.org/docs/GettingStarted.html>`_
+* `LLVM <https://llvm.org/docs/GettingStarted.html>`_
 * `Clang <http://clang.llvm.org/get_started.html>`_
 
 The following requirements are shared on all platforms.
 
 * `CMake <https://cmake.org>`_
 * `Ninja <https://ninja-build.org>`_ (strongly recommended)
+
+If you want to run the test suite, you'll need to build LLDB with Python
+scripting support.
+
 * `Python <http://www.python.org/>`_
 * `SWIG <http://swig.org/>`_
 
+Optional Dependencies
+*********************
+
+Although the following dependencies are optional, they have a big impact on
+LLDB's functionality. It is strongly encouraged to build LLDB with these
+dependencies enabled.
+
+By default they are auto-detected: if CMake can find the dependency it will be
+used. It is possible to override this behavior by setting the corresponding
+CMake flag to ``On`` or ``Off`` to force the dependency to be enabled or
+disabled. When a dependency is set to ``On`` and can't be found it will cause a
+CMake configuration error.
+
++-------------------+------------------------------------------------------+--------------------------+
+| Feature           | Description                                          | CMake Flag               |
++===================+======================================================+==========================+
+| Editline          | Generic line editing, history, Emacs and Vi bindings | ``LLDB_ENABLE_LIBEDIT``  |
++-------------------+------------------------------------------------------+--------------------------+
+| Curses            | Text user interface                                  | ``LLDB_ENABLE_CURSES``   |
++-------------------+------------------------------------------------------+--------------------------+
+| LZMA              | Lossless data compression                            | ``LLDB_ENABLE_LZMA``     |
++-------------------+------------------------------------------------------+--------------------------+
+| Libxml2           | XML                                                  | ``LLDB_ENABLE_LIBXML2``  |
++-------------------+------------------------------------------------------+--------------------------+
+| Python            | Python scripting                                     | ``LLDB_ENABLE_PYTHON``   |
++-------------------+------------------------------------------------------+--------------------------+
+| Lua               | Lua scripting                                        | ``LLDB_ENABLE_LUA``      |
++-------------------+------------------------------------------------------+--------------------------+
+
 Depending on your platform and package manager, one might run any of the
 commands below.
 
@@ -65,11 +108,6 @@
 appropriate Visual Studio Command Prompt corresponding to the version you wish
 to use.
 
-Linux
-*****
-
-* `libedit <http://www.thrysoee.dk/editline>`_
-
 macOS
 *****
 
@@ -78,23 +116,91 @@
 * If you are building both Clang and LLDB together, be sure to also check out
   libc++, which is a required for testing on macOS.
 
-Building LLDB with CMake & Ninja
---------------------------------
+Building LLDB with CMake
+------------------------
 
-CMake is a cross-platform build-generator tool. CMake does not build the
-project, it generates the files needed by your build tool. Assuming you're
-using Ninja, the invocation looks like this:
+The LLVM project is migrating to a single monolithic respository for LLVM and
+its subprojects. This is the recommended way to build LLDB. Check out the
+source-tree with git:
 
 ::
 
-  > cmake -G Ninja <cmake variables> <path to root of llvm source tree>
+  > git clone https://github.com/llvm/llvm-project.git
 
-Once CMake has configured your build, you can run ``ninja`` to build LLDB.
+CMake is a cross-platform build-generator tool. CMake does not build the
+project, it generates the files needed by your build tool. The recommended
+build tool for LLVM is Ninja, but other generators like Xcode or Visual Studio
+may be used as well. Please also read `Building LLVM with CMake
+<https://llvm.org/docs/CMake.html>`_.
+
+Regular in-tree builds
+**********************
+
+Create a new directory for your build-tree. From there run CMake and point it
+to the ``llvm`` directory in the source-tree:
+
+::
+
+  > cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb" [<cmake options>] path/to/llvm-project/llvm
+
+We used the ``LLVM_ENABLE_PROJECTS`` option here to tell the build-system which
+subprojects to build in addition to LLVM (for more options see
+:ref:`CommonCMakeOptions` and :ref:`CMakeCaches`). Parts of the LLDB test suite
+require ``lld``. Add it to the list in order to run all tests. Once CMake is done,
+run ninja to perform the actual build. We pass ``lldb`` here as the target, so
+it only builds what is necessary to run the lldb driver:
 
 ::
 
   > ninja lldb
 
+Standalone builds
+*****************
+
+This is another way to build LLDB. We can use the same source-tree as we
+checked out above, but now we will have multiple build-trees:
+
+* the main build-tree for LLDB in ``/path/to/lldb-build``
+* one or more provided build-trees for LLVM and Clang; for simplicity we use a
+  single one in ``/path/to/llvm-build``
+
+Run CMake with ``-B`` pointing to a new directory for the provided
+build-tree\ :sup:`1` and the positional argument pointing to the ``llvm``
+directory in the source-tree. Note that we leave out LLDB here and only include
+Clang. Then we build the ``ALL`` target with ninja:
+
+::
+
+  > cmake -B /path/to/llvm-build -G Ninja \
+          -DLLVM_ENABLE_PROJECTS=clang \
+          [<more cmake options>] /path/to/llvm-project/llvm
+  > ninja
+
+Now run CMake a second time with ``-B`` pointing to a new directory for the
+main build-tree and the positional argument pointing to the ``lldb`` directory
+in the source-tree. In order to find the provided build-tree, the build system
+looks for the path to its CMake modules in ``LLVM_DIR``. If you use a separate
+build directory for Clang, remember to pass its module path via ``Clang_DIR``
+(CMake variables are case-sensitive!):
+
+::
+
+  > cmake -B /path/to/lldb-build -G Ninja \
+          -DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
+          [<more cmake options>] /path/to/llvm-project/lldb
+  > ninja lldb
+
+.. note::
+
+   #. The ``-B`` argument was undocumented for a while and is only officially
+      supported since `CMake version 3.14
+      <https://cmake.org/cmake/help/v3.14/release/3.14.html#command-line>`_
+
+.. _CommonCMakeOptions:
+
+Common CMake options
+********************
+
 Following is a description of some of the most important CMake variables which
 you are likely to encounter. A variable FOO is set by adding ``-DFOO=value`` to
 the CMake command line.
@@ -118,17 +224,18 @@
 ::
 
   > cmake -G Ninja \
-      -DLLDB_TEST_USE_CUSTOM_C_COMPILER=On \
-      -DLLDB_TEST_USE_CUSTOM_CXX_COMPILER=On \
-      -DLLDB_TEST_C_COMPILER=<path to C compiler> \
-      -DLLDB_TEST_CXX_COMPILER=<path to C++ compiler> \
+      -DLLDB_TEST_COMPILER=<path to C compiler> \
       <path to root of llvm source tree>
 
 It is strongly recommend to use a release build for the compiler to speed up
 test execution.
 
 Windows
-*******
+^^^^^^^
+
+On Windows the LLDB test suite requires lld. Either add ``lld`` to
+``LLVM_ENABLE_PROJECTS`` or disable the test suite with
+``LLDB_ENABLE_TESTS=OFF``.
 
 Although the following CMake variables are by no means Windows specific, they
 are commonly used on Windows.
@@ -157,64 +264,112 @@
   > cmake -G Ninja^
       -DLLDB_TEST_DEBUG_TEST_CRASHES=1^
       -DPYTHON_HOME=C:\Python35^
-      -DLLDB_TEST_USE_CUSTOM_C_COMPILER=ON^
-      -DLLDB_TEST_C_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe^
+      -DLLDB_TEST_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe^
       <path to root of llvm source tree>
 
-NetBSD
-******
 
-Current stable NetBSD release doesn't ship with libpanel(3), therefore it's
-required to disable curses(3) support with the
-``-DLLDB_DISABLE_CURSES:BOOL=TRUE`` option. To make sure check if
-``/usr/include/panel.h`` exists in your system.
-
-macOS
-*****
-
-Here are some commonly used LLDB-specific CMake variables on macOS.
-
-* ``LLDB_BUILD_FRAMEWORK:BOOL`` : Builds the LLDB.framework.
-* ``LLDB_CODESIGN_IDENTITY:STRING`` : Determines the codesign identity to use.
-  An empty string means skip building debugserver to avoid codesigning.
-
-Building LLDB with CMake and Other Generators
----------------------------------------------
-
-Compiling with ninja is both faster and simpler than compiling with MSVC or
-Xcode, but chances are you still want to debug LLDB with those IDEs. One
-solution to this is to run cmake twice and generate the output into two
-different folders. One for compiling (the ninja folder), and one for editing,
-browsing and debugging.
-
-
-Visual Studio
-*************
+Building with ninja is both faster and simpler than building with Visual Studio,
+but chances are you still want to debug LLDB with an IDE. One solution is to run
+cmake twice and generate the output into two different folders. One for
+compiling (the ninja folder), and one for editing, browsing and debugging.
 
 Follow the previous instructions in one directory, and generate a Visual Studio
 project in another directory.
 
 ::
 
-  > cmake -G "Visual Studio 14 2015" <cmake variables> <path to root of llvm source tree>
+  > cmake -G "Visual Studio 15 2017 Win64" -Thost=x64 <cmake variables> <path to root of llvm source tree>
 
 Then you can open the .sln file in Visual Studio, set lldb as the startup
 project, and use F5 to run it. You need only edit the project settings to set
 the executable and the working directory to point to binaries inside of the
 ninja tree.
 
-Xcode
-*****
 
-Follow the previous instructions in one directory, and generate an Xcode
-project in another directory.
+NetBSD
+^^^^^^
+
+Current stable NetBSD release doesn't ship with libpanel(3), therefore it's
+required to disable curses(3) support with the
+``-DLLDB_ENABLE_CURSES:BOOL=FALSE`` option. To make sure check if
+``/usr/include/panel.h`` exists in your system.
+
+macOS
+^^^^^
+
+On macOS the LLDB test suite requires libc++. Either add ``libcxx`` to
+``LLVM_ENABLE_PROJECTS`` or disable the test suite with
+``LLDB_ENABLE_TESTS=OFF``. Further useful options:
+
+* ``LLDB_BUILD_FRAMEWORK:BOOL``: Builds the LLDB.framework.
+* ``LLDB_CODESIGN_IDENTITY:STRING``: Set the identity to use for code-signing
+  all executables. If not explicitly specified, only ``debugserver`` will be
+  code-signed with identity ``lldb_codesign`` (see :ref:`CodeSigning`).
+* ``LLDB_USE_SYSTEM_DEBUGSERVER:BOOL``: Use the system's debugserver, so lldb is
+  functional without setting up code-signing.
+
+
+.. _CMakeCaches:
+
+CMake caches
+************
+
+CMake caches allow to store common sets of configuration options in the form of
+CMake scripts and can be useful to reproduce builds for particular use-cases
+(see by analogy `usage in LLVM and Clang <https://llvm.org/docs/AdvancedBuilds.html>`_).
+A cache is passed to CMake with the ``-C`` flag, following the absolute path to
+the file on disk. Subsequent ``-D`` options are still allowed. Please find the
+currently available caches in the `lldb/cmake/caches/
+<https://github.com/llvm/llvm-project/tree/master/lldb/cmake/caches>`_
+directory.
+
+Common configurations on macOS
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Build, test and install a distribution of LLDB from the `monorepo
+<https://github.com/llvm/llvm-project>`_ (see also `Building a Distribution of
+LLVM <https://llvm.org/docs/BuildingADistribution.html>`_):
 
 ::
 
-  > cmake -G Xcode <cmake variables> <path to root of llvm source tree>
+  > git clone https://github.com/llvm/llvm-project
+
+  > cmake -B /path/to/lldb-build -G Ninja \
+          -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-macOS.cmake \
+          -DLLVM_ENABLE_PROJECTS="clang;libcxx;lldb" \
+          llvm-project/llvm
+
+  > DESTDIR=/path/to/lldb-install ninja -C /path/to/lldb-build check-lldb install-distribution
+
+.. _CMakeGeneratedXcodeProject:
+
+Build LLDB standalone for development with Xcode:
+
+::
+
+  > git clone https://github.com/llvm/llvm-project
+
+  > cmake -B /path/to/llvm-build -G Ninja \
+          -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-base.cmake \
+          -DLLVM_ENABLE_PROJECTS="clang;libcxx" \
+          llvm-project/llvm
+  > ninja -C /path/to/llvm-build
+
+  > cmake -B /path/to/lldb-build \
+          -C /path/to/llvm-project/lldb/cmake/caches/Apple-lldb-Xcode.cmake \
+          -DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
+          llvm-project/lldb
+  > open lldb.xcodeproj
+  > cmake --build /path/to/lldb-build --target check-lldb
+
+.. note::
+
+   The ``-B`` argument was undocumented for a while and is only officially
+   supported since `CMake version 3.14
+   <https://cmake.org/cmake/help/v3.14/release/3.14.html#command-line>`_
 
 
-Building The Documentation
+Building the Documentation
 --------------------------
 
 If you wish to build the optional (reference) documentation, additional
@@ -233,11 +388,12 @@
   > sudo apt-get install doxygen graphviz python3-sphinx
   > sudo pip install epydoc
 
-To build the documentation, build the desired target(s).
+To build the documentation, configure with ``LLVM_ENABLE_SPHINX=ON`` and build the desired target(s).
 
 ::
 
   > ninja docs-lldb-html
+  > ninja docs-lldb-man
   > ninja lldb-cpp-doc
   > ninja lldb-python-doc
 
@@ -274,9 +430,9 @@
 
 ::
 
-  -DLLDB_DISABLE_LIBEDIT=1
-  -DLLDB_DISABLE_CURSES=1
-  -DLLDB_DISABLE_PYTHON=1
+  -DLLDB_ENABLE_PYTHON=0
+  -DLLDB_ENABLE_LIBEDIT=0
+  -DLLDB_ENABLE_CURSES=0
   -DLLVM_ENABLE_TERMINFO=0
 
 In this case you, will often not need anything other than the standard C and
@@ -326,9 +482,9 @@
   -DLLVM_HOST_TRIPLE=aarch64-unknown-linux-gnu \
   -DLLVM_TABLEGEN=<path-to-host>/bin/llvm-tblgen \
   -DCLANG_TABLEGEN=<path-to-host>/bin/clang-tblgen \
-  -DLLDB_DISABLE_PYTHON=1 \
-  -DLLDB_DISABLE_LIBEDIT=1 \
-  -DLLDB_DISABLE_CURSES=1
+  -DLLDB_ENABLE_PYTHON=0 \
+  -DLLDB_ENABLE_LIBEDIT=0 \
+  -DLLDB_ENABLE_CURSES=0
 
 An alternative (and recommended) way to compile LLDB is with clang.
 Unfortunately, clang is not able to find all the include paths necessary for a
@@ -344,7 +500,7 @@
   -I /usr/aarch64-linux-gnu/include
 
 If you wanted to build a full version of LLDB and avoid passing
-``-DLLDB_DISABLE_PYTHON`` and other options, you would need to obtain the
+``-DLLDB_ENABLE_PYTHON=0`` and other options, you would need to obtain the
 target versions of the respective libraries. The easiest way to achieve this is
 to use the qemu-debootstrap utility, which can prepare a system image using
 qemu and chroot to simulate the target environment. Then you can install the
@@ -406,6 +562,11 @@
 
   > python -c 'import lldb'
 
+
+Make sure you're using the Python interpreter that matches the Python library
+you linked against. For more details please refer to the :ref:`caveats
+<python_caveat>`.
+
 .. _CodeSigning:
 
 Code Signing on macOS
@@ -418,7 +579,7 @@
 
 Note that it's possible to build and use lldb on macOS without setting up code
 signing by using the system's debug server. To configure lldb in this way with
-cmake, specify ``-DLLDB_CODESIGN_IDENTITY=''``.
+cmake, specify ``-DLLDB_USE_SYSTEM_DEBUGSERVER=ON``.
 
 If you have re-installed a new OS, please delete all old ``lldb_codesign`` items
 from your keychain. There will be a code signing certification and a public
diff --git a/src/llvm-project/lldb/docs/resources/caveats.rst b/src/llvm-project/lldb/docs/resources/caveats.rst
new file mode 100644
index 0000000..780fb34
--- /dev/null
+++ b/src/llvm-project/lldb/docs/resources/caveats.rst
@@ -0,0 +1,37 @@
+Caveats
+=======
+
+.. contents::
+   :local:
+
+.. _python_caveat:
+
+Python
+------
+
+LLDB has a powerful scripting interface which is accessible through Python.
+Python is available either from withing LLDB through a (interactive) script
+interpreter, or as a Python module which you can import from the Python
+interpreter.
+
+To make this possible, LLDB links against the Python shared library. Linking
+against Python comes with some constraints to be aware of.
+
+1.  It is not possible to build and link LLDB against a Python 3 library and
+    use it from Python 2 and vice versa.
+
+2.  It is not possible to build and link LLDB against one distribution on
+    Python and use it through a interpreter coming from another distribution.
+    For example, on macOS, if you build and link against Python from
+    python.org, you cannot import the lldb module from the Python interpreter
+    installed with Homebrew.
+
+3.  To use third party Python packages from inside LLDB, you need to install
+    them using a utility (such as ``pip``) from the same Python distribution as
+    the one used to build and link LLDB.
+
+The previous considerations are especially important during development, but
+apply to binary distributions of LLDB as well. For example, the LLDB that comes
+with Xcode links against the Python 3 that's part of Xcode. Therefore you
+should always use the Python in Xcode (through ``xcrun python3`` or
+``/usr/bin/python3``) to import the lldb module or install packages.
diff --git a/src/llvm-project/lldb/docs/resources/contributing.rst b/src/llvm-project/lldb/docs/resources/contributing.rst
new file mode 100644
index 0000000..81171ec
--- /dev/null
+++ b/src/llvm-project/lldb/docs/resources/contributing.rst
@@ -0,0 +1,86 @@
+Contributing
+============
+
+Getting Started
+---------------
+
+Please refer to the `LLVM Getting Started Guide
+<https://llvm.org/docs/GettingStarted.html>`_ for general information on how to
+get started on the LLVM project. A detailed explanation on how to build and
+test LLDB can be found in the `build instructions <build.html>`_ and `test
+instructions <test.html>`_ respecitvely.
+
+Contributing to LLDB
+--------------------
+
+Please refer to the `LLVM Developer Policy
+<https://llvm.org/docs/DeveloperPolicy.html>`_ for information about
+authoring and uploading a patch. LLDB differs from the LLVM Developer
+Policy in the following respects.
+
+ - **Test infrastructure**: Like LLVM it is  important to submit tests with your
+   patches, but note that LLDB uses a different system for tests. Refer to the
+   `test documentation <test.html>`_ for more details and the `lldb/test`
+   folder on disk for examples.
+
+ - **Coding Style**: LLDB's code style differs from LLVM's coding style.
+   Unfortunately there is no document describing the differences. Please be
+   consistent with the existing code.
+
+For anything not explicitly listed here, assume that LLDB follows the LLVM
+policy.
+
+
+Error handling and use of assertions in LLDB
+--------------------------------------------
+
+Contrary to Clang, which is typically a short-lived process, LLDB
+debuggers stay up and running for a long time, often serving multiple
+debug sessions initiated by an IDE. For this reason LLDB code needs to
+be extra thoughtful about how to handle errors. Below are a couple
+rules of thumb:
+
+* Invalid input.  To deal with invalid input, such as malformed DWARF,
+  missing object files, or otherwise inconsistent debug info, LLVM's
+  error handling types such as `llvm::Expected<T>
+  <https://llvm.org/doxygen/classllvm_1_1Expected.html>`_ or
+  `llvm::Optional<T>
+  <https://llvm.org/doxygen/classllvm_1_1Optional.html>`_ should be
+  used. Functions that may fail should return their result using these
+  wrapper types instead of using a bool to indicate success. Returning
+  a default value when an error occurred is also discouraged.
+
+* Assertions.  Assertions (from `assert.h`) should be used liberally
+  to assert internal consistency.  Assertions shall **never** be
+  used to detect invalid user input, such as malformed DWARF.  An
+  assertion should be placed to assert invariants that the developer
+  is convinced will always hold, regardless what an end-user does with
+  LLDB. Because assertions are not present in release builds, the
+  checks in an assertion may be more expensive than otherwise
+  permissible. In combination with the LLDB test suite, assertions are
+  what allows us to refactor and evolve the LLDB code base.
+
+* Logging. LLDB provides a very rich logging API. When recoverable
+  errors cannot reasonably be surfaced to the end user, the error may
+  be written to a topical log channel.
+
+* Soft assertions.  LLDB provides `lldb_assert()` as a soft
+  alternative to cover the middle ground of situations that indicate a
+  recoverable bug in LLDB.  In a Debug configuration `lldb_assert()`
+  behaves like `assert()`. In a Release configuration it will print a
+  warning and encourage the user to file a bug report, similar to
+  LLVM's crash handler, and then return execution. Use these sparingly
+  and only if error handling is not otherwise feasible.  Specifically,
+  new code should not be using `lldb_assert()` and existing
+  uses should be replaced by other means of error handling.
+
+* Fatal errors.  Aborting LLDB's process using
+  `llvm::report_fatal_error()` or `abort()` should be avoided at all
+  costs.  It's acceptable to use `llvm_unreachable()
+  <https://llvm.org/doxygen/Support_2ErrorHandling_8h.html>`_ for
+  actually unreachable code such as the default in an otherwise
+  exhaustive switch statement.
+
+Overall, please keep in mind that the debugger is often used as a last
+resort, and a crash in the debugger is rarely appreciated by the
+end-user.
diff --git a/src/llvm-project/lldb/docs/resources/download.rst b/src/llvm-project/lldb/docs/resources/download.rst
deleted file mode 100644
index ccc0caa..0000000
--- a/src/llvm-project/lldb/docs/resources/download.rst
+++ /dev/null
@@ -1,34 +0,0 @@
-Releases
-========
-
-Nightly Builds
---------------
-
-Nightly builds of LLDB are packaged and tested from trunk:
-
-Debian and Ubuntu: llvm.org/apt
-
-The pkgsrc framework offers a package with recent LLDB in the wip repository:
-
-::
-
-  cd pkgsrc/wip/lldb-git
-  make install clean
-
-Releases
---------
-
-Debian packages are available for LLDB 3.5 and later.
-
-* `Jessie - LLDB 3.5 <https://packages.debian.org/jessie/lldb>`_
-* `Stretch - LLDB 3.8 <https://packages.debian.org/stretch/lldb>`_
-* `Buster - LLDB 6.0 <https://packages.debian.org/buster/lldb>`_
-* `Sid - LLDB 6.0 <https://packages.debian.org/sid/lldb>`_
-
-Ubuntu packages are available for LLDB 3.8 and later.
-
-* `Ubuntu 16.04LTS - LLDB 3.8 <https://packages.ubuntu.com/xenial/lldb>`_
-* `Ubuntu 18.04LTS - LLDB 6.0 <https://packages.ubuntu.com/bionic/lldb>`_
-
-Arch Linux packages the latest `LLDB 6.0
-<https://www.archlinux.org/packages/extra/x86_64/lldb/>`_.
diff --git a/src/llvm-project/lldb/docs/resources/reproducers.rst b/src/llvm-project/lldb/docs/resources/reproducers.rst
new file mode 100644
index 0000000..d28cade
--- /dev/null
+++ b/src/llvm-project/lldb/docs/resources/reproducers.rst
@@ -0,0 +1,116 @@
+Reproducers
+===========
+
+As unbelievable as it may sound, the debugger has bugs. These bugs might
+manifest themselves as errors, missing results or even a crash. Quite often
+these bugs don't reproduce in simple, isolated scenarios. The debugger deals
+with a lot of moving parts and subtle differences can easily add up.
+
+Reproducers in LLDB improve the experience for both the users encountering bugs
+and the developers working on resolving them. The general idea consists of
+*capturing* all the information necessary to later *replay* a debug session
+while debugging the debugger.
+
+.. contents::
+   :local:
+
+Usage
+-----
+
+Reproducers are a generic concept in LLDB and are not inherently coupled with
+the command line driver. The functionality can be used for anything that uses
+the SB API and the driver is just one example. However, because it's probably
+the most common way users interact with lldb, that's the workflow described in
+this section.
+
+Capture
+```````
+
+Until reproducer capture is enabled by default, you need to launch LLDB in
+capture mode. For the command line driver, this means passing ``--capture``.
+You cannot enable reproducer capture from within LLDB, as this would be too
+late to capture initialization of the debugger.
+
+.. code-block:: bash
+
+  > lldb --capture
+
+In capture mode, LLDB will keep track of all the information it needs to replay
+the current debug session. Most data is captured lazily to limit the impact on
+performance. To create the reproducer, use the ``reproducer generate``
+sub-command. It's always possible to check the status of the reproducers with
+the ``reproducer status`` sub-command. Note that generating the reproducer
+terminates the debug session.
+
+.. code-block:: none
+
+  (lldb) reproducer status
+  Reproducer is in capture mode.
+  (lldb) reproducer generate
+  Reproducer written to '/path/to/reproducer'
+  Please have a look at the directory to assess if you're willing to share the contained information.
+
+
+The resulting reproducer is a directory. It was a conscious decision to not
+compress and archive it automatically. The reproducer can contain potentially
+sensitive information like object and symbol files, their paths on disk, debug
+information, memory excerpts of the inferior process, etc.
+
+Replay
+``````
+
+It is strongly recommended to replay the reproducer locally to ensure it
+actually reproduces the expected behavior. If the reproducer doesn't behave
+correctly locally, it means there's a bug in the reproducer implementation that
+should be addressed.
+
+To replay a reproducer, simply pass its path to LLDB through the ``--replay``
+flag. It is unnecessary to pass any other command line flags. The flags that
+were passed to LLDB during capture are already part of the reproducer.
+
+.. code-block:: bash
+
+ > lldb --replay /path/to/reproducer
+
+
+During replay LLDB will behave similar to batch mode. The session should be
+identical to the recorded debug session. The only expected differences are that
+the binary being debugged doesn't actually run during replay. That means that
+you won't see any of its side effects, like things being printed to the
+terminal. Another expected difference is the behavior of the ``reproducer
+generate`` command, which becomes a NOOP during replay.
+
+Augmenting a Bug Report with a Reproducer
+`````````````````````````````````````````
+
+A reproducer can significantly improve a bug report, but it in itself is not
+sufficient. Always describe the expected and unexpected behavior. Just like the
+debugger can have bugs, the reproducer can have bugs too.
+
+
+Design
+------
+
+Coming soon.
+
+Knows Issues
+------------
+
+The reproducers are still a work in progress. Here's a non-exhaustive list of
+outstanding work, limitations and known issues.
+
+ - The VFS cannot deal with more than one current working directory. Changing
+   the current working directory during the debug session will break relative
+   paths.
+ - Not all SB APIs are properly instrumented. We need customer serialization
+   for APIs that take buffers and lengths.
+ - We leak memory during replay because the reproducer doesn't capture the end
+   of an object's life time. We need to add instrumentation to the destructor
+   of SB API objects.
+ - The reproducer includes every file opened by LLDB. This is overkill. For
+   example we do not need to capture source files for code listings. There's
+   currently no way to say that some file shouldn't be included in the
+   reproducer.
+ - We do not yet automatically generate a reproducer on a crash. The reason is
+   that generating the reproducer is too expensive to do in a signal handler.
+   We should re-invoke lldb after a crash and do the heavy lifting.
diff --git a/src/llvm-project/lldb/docs/resources/sbapi.rst b/src/llvm-project/lldb/docs/resources/sbapi.rst
index 20c3329..048f6c1 100644
--- a/src/llvm-project/lldb/docs/resources/sbapi.rst
+++ b/src/llvm-project/lldb/docs/resources/sbapi.rst
@@ -53,3 +53,43 @@
 decidedly low-tech way, by maintaining the two files in parallel. That
 simplifies the build process, but it does mean that if you add a method to the
 C++ API's for an SB class, you have to copy the interface to the .i file.
+
+API Instrumentation
+-------------------
+
+The reproducer infrastructure requires API methods to be instrumented so that
+they can be captured and replayed. Instrumentation consists of two macros,
+``LLDB_REGISTER`` and ``LLDB_RECORD``. Both can be automatically generated with
+the ``lldb-instr`` utility.
+
+To add instrumentation for a given file, pass it to the ``lldb-instr`` tool.
+Like other clang-based tools it requires a compilation database
+(``compile_commands.json``) to be present in the current working directory.
+
+::
+
+    ./bin/lldb-instr /path/to/lldb/source/API/SBDebugger.cpp
+
+
+The tool will automatically insert ``LLDB_RECORD`` macros inline, however you
+will need to run ``clang-format`` over the processed file, as the tool
+(intentionally) makes no attempt to get that right.
+
+The ``LLDB_REGISTER`` macros are printed to standard out between curly braces.
+You'll have to copy-paste those into the corresponding `RegsiterMethods`
+function in the implementation file. This function is fully specialized in the
+corresponding type.
+
+::
+
+  template <> void RegisterMethods<SBDebugger>(Registry &R) {
+    ...
+  }
+
+
+When adding a new class, you'll also have to add a call to ``RegisterMethods``
+in the ``SBRegistry`` constructor.
+
+The tool can be used incrementally. However, it will ignore existing macros
+even if their signature is wrong. It will only generate a ``LLDB_REGISTER`` if
+it emitted a corresponding ``LLDB_RECORD`` macro.
diff --git a/src/llvm-project/lldb/docs/resources/source.rst b/src/llvm-project/lldb/docs/resources/source.rst
deleted file mode 100644
index 1185638..0000000
--- a/src/llvm-project/lldb/docs/resources/source.rst
+++ /dev/null
@@ -1,102 +0,0 @@
-Getting the Sources
-===================
-
-Refer to the `LLVM Getting Started Guide
-<http://llvm.org/docs/GettingStarted.html#getting-started-with-llvm>`_
-for general instructions on how to check out source. Note that LLDB
-depends on having a working checkout of LLVM and Clang, so the first
-step is to download and build as described at the above URL. The same
-repository also contains LLDB.
-
-Git browser: https://github.com/llvm/llvm-project/tree/master/lldb
-
-For macOS building from Xcode, simply checkout LLDB and then build
-from Xcode. The Xcode project will automatically detect that it is a
-fresh checkout, and checkout LLVM and Clang automatically. Unlike
-other platforms / build systems, it will use the following directory
-structure.
-
- ::
-
-                  lldb
-                  |
-                  `-- llvm
-                      |
-                      +-- tools
-                          |
-                          `-- clang
-
-
-So updating your checkout will consist of updating LLDB, LLV<, and
-Clang in these locations.  Refer to the `Build Instructions
-<build.html>`_ for more detailed instructions on how to build for a
-particular platform / build system combination.
-
-Contributing to LLDB
---------------------
-
-Please refer to the `LLVM Developer Policy
-<http://llvm.org/docs/DeveloperPolicy.html>`_ for information about
-authoring and uploading a patch. LLDB differs from the LLVM Developer
-Policy in the following respects.
-
-Test infrastructure. It is still important to submit tests with your
-patches, but LLDB uses a different system for tests. Refer to the
-`lldb/test` folder on disk for examples of how to write tests.  For
-anything not explicitly listed here, assume that LLDB follows the LLVM
-policy.
-
-
-Error handling and use of assertions in LLDB
---------------------------------------------
-
-Contrary to Clang, which is typically a short-lived process, LLDB
-debuggers stay up and running for a long time, often serving multiple
-debug sessions initiated by an IDE. For this reason LLDB code needs to
-be extra thoughtful about how to handle errors. Below are a couple
-rules of thumb:
-
-* Invalid input.  To deal with invalid input, such as malformed DWARF,
-  missing object files, or otherwise inconsistent debug info, LLVM's
-  error handling types such as `llvm::Expected<T>
-  <http://llvm.org/doxygen/classllvm_1_1Expected.html>`_ or
-  `llvm::Optional<T>
-  <http://llvm.org/doxygen/classllvm_1_1Optional.html>`_ should be
-  used. Functions that may fail should return their result using these
-  wrapper types instead of using a bool to indicate success. Returning
-  a default value when an error occurred is also discouraged.
-
-* Assertions.  Assertions (from `assert.h`) should be used liberally
-  to assert internal consistency.  Assertions shall **never** be
-  used to detect invalid user input, such as malformed DWARF.  An
-  assertion should be placed to assert invariants that the developer
-  is convinced will always hold, regardless what an end-user does with
-  LLDB. Because assertions are not present in release builds, the
-  checks in an assertion may be more expensive than otherwise
-  permissible. In combination with the LLDB test suite, assertions are
-  what allows us to refactor and evolve the LLDB code base.
-
-* Logging. LLDB provides a very rich logging API. When recoverable
-  errors cannot reasonably by surfaced to the end user, the error may
-  be written to a topical log channel.
-
-* Soft assertions.  LLDB provides `lldb_assert()` as a soft
-  alternative to cover the middle ground of situations that indicate a
-  recoverable bug in LLDB.  In a Debug configuration `lldb_assert()`
-  behaves like `assert()`. In a Release configuration it will print a
-  warning and encourage the user to file a bug report, similar to
-  LLVM's crash handler, and then return execution. Use these sparingly
-  and only if error handling is not otherwise feasible.  Specifically,
-  new code should not be using `lldb_assert()` and existing
-  uses should be replaced by other means of error handling.
-
-* Fatal errors.  Aborting LLDB's process using
-  `llvm::report_fatal_error()` or `abort()` should be avoided at all
-  costs.  It's acceptable to use `llvm_unreachable()
-  <http://llvm.org/doxygen/Support_2ErrorHandling_8h.html>`_ for
-  actually unreachable code such as the default in an otherwise
-  exhaustive switch statement.
-
-Overall, please keep in mind that the debugger is often used as a last
-resort, and a crash in the debugger is rarely appreciated by the
-end-user.
diff --git a/src/llvm-project/lldb/docs/resources/test.rst b/src/llvm-project/lldb/docs/resources/test.rst
index d1089f2..9966ad1 100644
--- a/src/llvm-project/lldb/docs/resources/test.rst
+++ b/src/llvm-project/lldb/docs/resources/test.rst
@@ -1,11 +1,24 @@
 Testing
 =======
 
-The LLDB test suite consists of Python scripts located under the test
-directory. Each script contains a number of test cases and is usually
-accompanied by a C (C++, ObjC, etc.) source file. Each test first compiles the
-source file and then uses LLDB to debug the resulting executable. The tests
-verify both the LLDB command line interface and the scripting API.
+The LLDB test suite consists of three different kinds of test:
+
+* Unit test. These are located under ``lldb/unittests`` and are written in C++
+  using googletest.
+* Integration tests that test the debugger through the SB API. These are
+  located under ``lldb/packages/Python/lldbsuite`` and are written in Python
+  using ``dotest`` (LLDB's custom testing framework on top of unittest2).
+* Integration tests that test the debugger through the command line. These are
+  locarted under `lldb/tests/Shell` and are written in a shell-style format
+  using FileCheck to verify its output.
+
+All three test suites use the `LLVM Integrated Tester
+<https://llvm.org/docs/CommandGuide/lit.html>`_ (lit) as their test driver. The
+test suites can be run as a whole or separately.
+
+Many of the tests are accompanied by a C (C++, ObjC, etc.) source file. Each
+test first compiles the source file and then uses LLDB to debug the resulting
+executable.
 
 .. contents::
    :local:
@@ -29,10 +42,7 @@
 
 By default, the ``check-lldb`` target builds the test programs with the same
 compiler that was used to build LLDB. To build the tests with a different
-compiler, you can set the ``LLDB_TEST_C_COMPILER`` or the
-``LLDB_TEST_CXX_COMPILER`` CMake variables. These variables are ignored unless
-the respective ``LLDB_TEST_USE_CUSTOM_C_COMPILER`` and
-``LLDB_TEST_USE_CUSTOM_CXX_COMPILER`` are set to ``ON``.
+compiler, you can set the ``LLDB_TEST_COMPILER`` CMake variable.
 
 It is possible to customize the architecture of the test binaries and compiler
 used by appending ``-A`` and ``-C`` options respectively to the CMake variable
@@ -47,23 +57,69 @@
 Note that multiple ``-A`` and ``-C`` flags can be specified to
 ``LLDB_TEST_USER_ARGS``.
 
+Running a Single Test Suite
+---------------------------
 
-Running a Specific Test or Set of Tests
----------------------------------------
+Each test suite can be run separately, similar to running the whole test suite
+with ``check-lldb``.
+
+* Use ``check-lldb-unit`` to run just the unit tests.
+* Use ``check-lldb-api`` to run just the SB API tests.
+* Use ``check-lldb-shell`` to run just the shell tests.
+
+You can run specific subdirectories by appending the directory name to the
+target. For example, to run all the tests in ``ObjectFile``, you can use the
+target ``check-lldb-shell-objectfile``. However, because the unit tests and API
+tests don't actually live under ``lldb/test``, this convenience is only
+available for the shell tests.
+
+Running a Single Test
+---------------------
+
+The recommended way to run a single test is by invoking the lit driver with a
+filter. This ensures that the test is run with the same configuration as when
+run as part of a test suite.
+
+::
+
+   > ./bin/llvm-lit -sv lldb/test --filter <test>
+
+
+Because lit automatically scans a directory for tests, it's also possible to
+pass a subdirectory to run a specific subset of the tests.
+
+::
+
+   > ./bin/llvm-lit -sv tools/lldb/test/Shell/Commands/CommandScriptImmediateOutput
+
+
+For the SB API tests it is possible to forward arguments to ``dotest.py`` by
+passing ``--param`` to lit and setting a value for ``dotest-args``.
+
+::
+
+   > ./bin/llvm-lit -sv tools/lldb/test --param dotest-args='-C gcc'
+
+
+Below is an overview of running individual test in the unit and API test suites
+without going through the lit driver.
+
+Running a Specific Test or Set of Tests: API Tests
+--------------------------------------------------
 
 In addition to running all the LLDB test suites with the ``check-lldb`` CMake
 target above, it is possible to run individual LLDB tests. If you have a CMake
 build you can use the ``lldb-dotest`` binary, which is a wrapper around
-``dotest.py`` that passes all the arguments configured by CMake. Alternatively,
-you can use ``dotest.py`` directly, if you want to run a test one-off with a
-different configuration.
+``dotest.py`` that passes all the arguments configured by CMake.
 
+Alternatively, you can use ``dotest.py`` directly, if you want to run a test
+one-off with a different configuration.
 
 For example, to run the test cases defined in TestInferiorCrashing.py, run:
 
 ::
 
-   > lldb-dotest -p TestInferiorCrashing.py
+   > ./bin/lldb-dotest -p TestInferiorCrashing.py
 
 ::
 
@@ -76,7 +132,7 @@
 
 ::
 
-   > lldb-dotest functionalities/data-formatter
+   > ./bin/lldb-dotest functionalities/data-formatter
 
 ::
 
@@ -88,21 +144,25 @@
 
    > python dotest.py -h
 
-The ``dotest.py`` script runs tests in parallel by default. To disable the
-parallel test running feature, use the ``--no-multiprocess`` flag. The number
-of concurrent tests is controlled by the ``LLDB_TEST_THREADS`` environment
-variable or the ``--threads command`` line parameter. The default value is the
-number of CPU cores on your system.
 
-The parallel test running feature will handle an additional ``--test-subdir
-SUBDIR`` arg. When specified, ``SUBDIR`` is relative to the root test directory
-and will limit all parallel test running to that subdirectory's tree of tests.
+Running a Specific Test or Set of Tests: Unit Tests
+---------------------------------------------------
 
-The parallel test runner will run all tests within a given directory serially,
-but will run multiple directories concurrently. Thus, as a test writer, we
-provide serialized test run semantics within a directory. Note child
-directories are considered entirely separate, so two child directories could be
-running in parallel with a parent directory.
+The unit tests are simple executables, located in the build directory under ``tools/lldb/unittests``.
+
+To run them, just run the test binary, for example, to run all the Host tests:
+
+::
+
+   > ./tools/lldb/unittests/Host/HostTests
+
+
+To run a specific test, pass a filter, for example:
+
+::
+
+   > ./tools/lldb/unittests/Host/HostTests --gtest_filter=SocketTest.DomainListenConnectAccept
+
 
 Running the Test Suite Remotely
 -------------------------------
@@ -157,13 +217,11 @@
     #. If you want to enabled mixed mode debugging, check Enable native code debugging (this slows down debugging, so enable it only on an as-needed basis.)
 #. Set the command line for the test suite to run.
     #. Right click the project in solution explorer and choose the Debug tab.
-    #. Enter the arguments to dotest.py. Note you must add --no-multiprocess
+    #. Enter the arguments to dotest.py.
     #. Example command options:
 
 ::
 
-   # quiet mode
-   -q
    --arch=i686
    # Path to debug lldb.exe
    --executable D:/src/llvmbuild/ninja/bin/lldb.exe
@@ -178,12 +236,10 @@
    -p TestPaths.py
    # Root of test tree
    D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test
-   # Required in order to be able to debug the test.
-   --no-multiprocess
 
 ::
 
-   -q --arch=i686 --executable D:/src/llvmbuild/ninja/bin/lldb.exe -s D:/src/llvmbuild/ninja/lldb-test-traces -u CXXFLAGS -u CFLAGS --enable-crash-dialog -C d:\src\llvmbuild\ninja_release\bin\clang.exe -p TestPaths.py D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test --no-multiprocess
+   --arch=i686 --executable D:/src/llvmbuild/ninja/bin/lldb.exe -s D:/src/llvmbuild/ninja/lldb-test-traces -u CXXFLAGS -u CFLAGS --enable-crash-dialog -C d:\src\llvmbuild\ninja_release\bin\clang.exe -p TestPaths.py D:\src\llvm\tools\lldb\packages\Python\lldbsuite\test --no-multiprocess
 
 
 
diff --git a/src/llvm-project/lldb/docs/status/goals.rst b/src/llvm-project/lldb/docs/status/goals.rst
index e25b945..c5c236c 100644
--- a/src/llvm-project/lldb/docs/status/goals.rst
+++ b/src/llvm-project/lldb/docs/status/goals.rst
@@ -31,3 +31,14 @@
 * Great support for C, Objective-C and C++
 * Retargetable to support multiple platforms
 * Provide a base for debugger research and other innovation
+
+Why a New Debugger?
+-------------------
+
+In order to achieve our goals we decided to start with a fresh architecture
+that would support modern multi-threaded programs, handle debugging symbols in
+an efficient manner, use compiler based code knowledge and have plug-in support
+for functionality and extensions. Additionally we want the debugger
+capabilities to be available to other analysis tools, be they scripts or
+compiled programs, without requiring them to be GPL.
+
diff --git a/src/llvm-project/lldb/docs/status/projects.rst b/src/llvm-project/lldb/docs/status/projects.rst
index e32b9b0..48081da 100644
--- a/src/llvm-project/lldb/docs/status/projects.rst
+++ b/src/llvm-project/lldb/docs/status/projects.rst
@@ -185,12 +185,6 @@
 them when we know we've fetched the whole thread list and ensured they are no
 longer alive.
 
-Add an extension point in the breakpoint search machinery
----------------------------------------------------------
-
-This would allow highly customizable, algorithmic breakpoint types, like "break
-on every use of some particular instruction, or instruction pattern, etc."
-
 Make Python-backed commands first class citizens
 ------------------------------------------------
 
@@ -297,21 +291,6 @@
 reactions to complex threading problems & the like, and also for simulating
 hard-to-test environments (like bare board debugging).
 
-A Bug-Trapper infrastructure
-----------------------------
-
-We very often have bugs that can't be reproduced locally. So having a
-bug-report-trapper that can gather enough information from the surroundings of
-a bug so that we can replay the session locally would be a big help tracking
-down issues in this situation. This is tricky because you can't necessarily
-require folks to leak information about their code in order to file bug
-reports. So not only will you have to figure out what state to gather, you're
-also going to have to anonymize it somehow. But we very often have bugs from
-people that can't reduce the problem to a simple test case and can't give us
-our code, and we often just can't help them as things stand now. Note that
-adding the ProcessMock would be a good first stage towards this, since you
-could make a ProcessMock creator/serializer from the current lldb state.
-
 Expression parser needs syntax for "{symbol,type} A in CU B.cpp"
 ----------------------------------------------------------------
 
@@ -399,19 +378,42 @@
 -------------------------------------------------------------
 
 There are a bunch of places in lldb where we need to know at the point where an
-exception is thrown, what frame will catch the exception.  
+exception is thrown, what frame will catch the exception.
 
-For instance, if an expression throws an exception, we need to know whether the 
-exception will be caught in the course of the expression evaluation.  If so it 
-would be safe to let the expression continue.  But since we would destroy the 
-state of the thread if we let the exception escape the expression, we currently 
+For instance, if an expression throws an exception, we need to know whether the
+exception will be caught in the course of the expression evaluation.  If so it
+would be safe to let the expression continue.  But since we would destroy the
+state of the thread if we let the exception escape the expression, we currently
 stop the expression evaluation if we see a throw.  If we knew where it would be
 caught we could distinguish these two cases.
 
-Similarly, when you step over a call that throws, you want to stop at the throw 
+Similarly, when you step over a call that throws, you want to stop at the throw
 point if you know the exception will unwind past the frame you were stepping in,
 but it would annoying to have the step abort every time an exception was thrown.
 If we could predict the catching frame, we could do this right.
 
-And of course, this would be a useful piece of information to display when stopped 
+And of course, this would be a useful piece of information to display when stopped
 at a throw point.
+
+Add predicates to the nodes of settings
+---------------------------------------
+
+It would be very useful to be able to give values to settings that are dependent
+on the triple, or executable name, for targets, or on whether a process is local
+or remote, or on the name of a thread, etc.  The original intent (and there is
+a sketch of this in the settings parsing code) was to be able to say:
+
+::
+
+  (lldb) settings set target{arch=x86_64}.process.thread{name=foo}...
+
+The exact details are still to be worked out, however.
+
+Resurrect Type Validators
+-------------------------
+
+This half-implemented feature was removed in
+https://reviews.llvm.org/D71310 but the general idea might still be
+useful: Type Validators look at a ValueObject, and make sure that
+there is nothing semantically wrong with the object's contents to
+easily catch corrupted data.
diff --git a/src/llvm-project/lldb/docs/status/releases.rst b/src/llvm-project/lldb/docs/status/releases.rst
new file mode 100644
index 0000000..de397f2
--- /dev/null
+++ b/src/llvm-project/lldb/docs/status/releases.rst
@@ -0,0 +1,21 @@
+Releases
+========
+
+Nightly Builds
+--------------
+
+Nightly builds of LLDB are packaged and tested from trunk:
+
+Debian and Ubuntu: https://apt.llvm.org
+
+The pkgsrc framework offers a package with recent LLDB in the wip repository:
+
+::
+
+  cd pkgsrc/wip/lldb-git
+  make install clean
+
+Releases
+--------
+
+LLDB is packaged in most of the Debian & Ubuntu releases.
diff --git a/src/llvm-project/lldb/docs/use/formatting.rst b/src/llvm-project/lldb/docs/use/formatting.rst
index f0b4f4a..939c4e1 100644
--- a/src/llvm-project/lldb/docs/use/formatting.rst
+++ b/src/llvm-project/lldb/docs/use/formatting.rst
@@ -92,6 +92,8 @@
 +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | ``function.name-without-args``                    | The name of the current function without arguments and values (used to include a function name in-line in the ``disassembly-format``)                                                                                                                                                       |
 +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| ``function.mangled-name``                         | The mangled name of the current function or symbol.                                                                                                                                                                                                                                         |
++---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | ``function.pc-offset``                            | The program counter offset within the current function or symbol                                                                                                                                                                                                                            |
 +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | ``function.addr-offset``                          | The offset in bytes of the current function, formatted as " + dddd"                                                                                                                                                                                                                         |
diff --git a/src/llvm-project/lldb/docs/use/map.rst b/src/llvm-project/lldb/docs/use/map.rst
index d878b56..3c6c6e6 100644
--- a/src/llvm-project/lldb/docs/use/map.rst
+++ b/src/llvm-project/lldb/docs/use/map.rst
@@ -880,6 +880,20 @@
                </td>
          </tr>
 
+         <tr>
+               <td class="header" colspan="2">Print an array of integers in memory, assuming we have a pointer like "int *ptr".</td>
+         </tr>
+         <tr>
+               <td class="content">
+                  <b>(gdb)</b> p *ptr@10
+                  <br>
+               </td>
+               <td class="content">
+                  <b>(lldb)</b> parray 10 ptr
+                  <br>
+               </td>
+         </tr>
+
       </tbody>
    </table>
 
diff --git a/src/llvm-project/lldb/docs/use/symbolication.rst b/src/llvm-project/lldb/docs/use/symbolication.rst
index 9d31b36..2c10a88 100644
--- a/src/llvm-project/lldb/docs/use/symbolication.rst
+++ b/src/llvm-project/lldb/docs/use/symbolication.rst
@@ -15,7 +15,7 @@
 
 The simplest form of symbolication is to load an executable:
 
-::
+.. code-block:: text
 
    (lldb) target create --no-dependents --arch x86_64 /tmp/a.out
 
@@ -30,7 +30,7 @@
 associated with the current target. As expected, we currently only have a
 single binary:
 
-::
+.. code-block:: text
 
    (lldb) image list
    [  0] 73431214-6B76-3489-9557-5075F03E36B4 0x0000000100000000 /tmp/a.out
@@ -38,7 +38,7 @@
 
 Now we can look up an address:
 
-::
+.. code-block:: text
 
    (lldb) image lookup --address 0x100000aa3
          Address: a.out[0x0000000100000aa3] (a.out.__TEXT.__text + 131)
@@ -51,7 +51,7 @@
 If we didn't use the ``--no-dependents`` option with ``target create``, we
 would have loaded all dependent shared libraries:
 
-::
+.. code-block:: text
 
    (lldb) image list
    [  0] 73431214-6B76-3489-9557-5075F03E36B4 0x0000000100000000 /tmp/a.out
@@ -64,7 +64,7 @@
 Now if we do a lookup using a file address, this can result in multiple matches
 since most shared libraries have a virtual address space that starts at zero:
 
-::
+.. code-block:: text
 
    (lldb) image lookup -a 0x1000
          Address: a.out[0x0000000000001000] (a.out.__PAGEZERO + 4096)
@@ -82,7 +82,7 @@
 To avoid getting multiple file address matches, you can specify the name of the
 shared library to limit the search:
 
-::
+.. code-block:: text
 
    (lldb) image lookup -a 0x1000 a.out
          Address: a.out[0x0000000000001000] (a.out.__PAGEZERO + 4096)
@@ -101,7 +101,7 @@
 Below is an example of sliding all sections in a.out by adding 0x123000 to each
 section's file address:
 
-::
+.. code-block:: text
 
    (lldb) target create --no-dependents --arch x86_64 /tmp/a.out
    (lldb) target modules load --file a.out --slide 0x123000
@@ -116,7 +116,7 @@
 calculations. To specify the load addresses of sections we can specify one or
 more section name + address pairs in the ``target modules load`` command:
 
-::
+.. code-block:: text
 
    (lldb) target create --no-dependents --arch x86_64 /tmp/a.out
    (lldb) target modules load --file a.out __TEXT 0x100123000
@@ -126,7 +126,7 @@
 now use load addresses so we don't have to do any math on the addresses in the
 crashlog backtraces, we can just use the raw addresses:
 
-::
+.. code-block:: text
 
    (lldb) image lookup --address 0x100123aa3
          Address: a.out[0x0000000100000aa3] (a.out.__TEXT.__text + 131)
@@ -142,7 +142,7 @@
 
 Lets say we have a Darwin crash log that contains the following images:
 
-::
+.. code-block:: text
 
    Binary Images:
       0x100000000 -    0x100000ff7 <A866975B-CA1E-3649-98D0-6C5FAA444ECF> /tmp/a.out
@@ -153,7 +153,7 @@
 First we create the target using the main executable and then add any extra
 shared libraries we want:
 
-::
+.. code-block:: text
 
    (lldb) target create --no-dependents --arch x86_64 /tmp/a.out
    (lldb) target modules add /usr/lib/system/libsystem_c.dylib
@@ -165,7 +165,7 @@
 you can specify their paths using the --symfile option for the ``target create``
 (recent LLDB releases only) and ``target modules add`` commands:
 
-::
+.. code-block:: text
 
    (lldb) target create --no-dependents --arch x86_64 /tmp/a.out --symfile /tmp/a.out.dSYM
    (lldb) target modules add /usr/lib/system/libsystem_c.dylib --symfile /build/server/a/libsystem_c.dylib.dSYM
@@ -176,7 +176,7 @@
 load addresses above and below) using the first address from the Binary Images
 section for each image:
 
-::
+.. code-block:: text
 
    (lldb) target modules load --file a.out 0x100000000
    (lldb) target modules load --file libsystem_c.dylib 0x7fff83f32000
@@ -189,7 +189,7 @@
 
 Given the following raw backtrace:
 
-::
+.. code-block:: text
 
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   libsystem_kernel.dylib        	0x00007fff8a1e6d46 __kill + 10
@@ -200,7 +200,7 @@
 
 We can now symbolicate the load addresses:
 
-::
+.. code-block:: text
 
    (lldb) image lookup -a 0x00007fff8a1e6d46
    (lldb) image lookup -a 0x00007fff84597df0
@@ -215,8 +215,7 @@
 can get verbose information which can often include the locations of some of
 your local variables:
 
-::
-
+.. code-block:: text
 
    (lldb) image lookup --address 0x100123aa3 --verbose
          Address: a.out[0x0000000100000aa3] (a.out.__TEXT.__text + 110)
@@ -225,16 +224,17 @@
    CompileUnit: id = {0x00000000}, file = "/tmp/main.c", language = "ISO C:1999"
       Function: id = {0x0000004f}, name = "main", range = [0x0000000100000bc0-0x0000000100000dc9)
       FuncType: id = {0x0000004f}, decl = main.c:9, compiler_type = "int (int, const char **, const char **, const char **)"
-         Blocks: id = {0x0000004f}, range = [0x100000bc0-0x100000dc9)
-                  id = {0x000000ae}, range = [0x100000bf2-0x100000dc4)
+        Blocks: id = {0x0000004f}, range = [0x100000bc0-0x100000dc9)
+                id = {0x000000ae}, range = [0x100000bf2-0x100000dc4)
       LineEntry: [0x0000000100000bf2-0x0000000100000bfa): /tmp/main.c:13:23
-         Symbol: id = {0x00000004}, range = [0x0000000100000bc0-0x0000000100000dc9), name="main"
+        Symbol: id = {0x00000004}, range = [0x0000000100000bc0-0x0000000100000dc9), name="main"
       Variable: id = {0x000000bf}, name = "path", type= "char [1024]", location = DW_OP_fbreg(-1072), decl = main.c:28
       Variable: id = {0x00000072}, name = "argc", type= "int", location = r13, decl = main.c:8
       Variable: id = {0x00000081}, name = "argv", type= "const char **", location = r12, decl = main.c:8
       Variable: id = {0x00000090}, name = "envp", type= "const char **", location = r15, decl = main.c:8
       Variable: id = {0x0000009f}, name = "aapl", type= "const char **", location = rbx, decl = main.c:8
 
+
 The interesting part is the variables that are listed. The variables are the
 parameters and local variables that are in scope for the address that was
 specified. These variable entries have locations which are shown in bold above.
@@ -251,7 +251,7 @@
 code below will recreate the target and add the three shared libraries that we
 added in the darwin crash log example above:
 
-::
+.. code-block:: python
 
    triple = "x86_64-apple-macosx"
    platform_name = None
@@ -316,7 +316,7 @@
 Subclasses of this class will want to override the
 locate_module_and_debug_symbols method:
 
-::
+.. code-block:: text
 
    class CustomImage(lldb.utils.symbolication.Image):
       def locate_module_and_debug_symbols (self):
@@ -343,7 +343,7 @@
 interpreter so that you can use it to parse and symbolicate macOS crash
 logs:
 
-::
+.. code-block:: text
 
    (lldb) command script import lldb.macosx.crashlog
    "crashlog" and "save_crashlog" command installed, use the "--help" option for detailed help
@@ -353,7 +353,7 @@
 The command that is installed has built in help that shows the options that can
 be used when symbolicating:
 
-::
+.. code-block:: text
 
    (lldb) crashlog --help
    Usage: crashlog [options]  [FILE ...]
@@ -370,7 +370,7 @@
 can  be disassembled and lookups can be performed using the addresses found in
 the crash log.
 
-::
+.. code-block:: text
 
    Options:
    -h, --help            show this help message and exit
diff --git a/src/llvm-project/lldb/examples/python/crashlog.py b/src/llvm-project/lldb/examples/python/crashlog.py
index 9a8ec8c..b7b62ac 100755
--- a/src/llvm-project/lldb/examples/python/crashlog.py
+++ b/src/llvm-project/lldb/examples/python/crashlog.py
@@ -101,10 +101,22 @@
     thread_regex = re.compile('^Thread ([0-9]+)([^:]*):(.*)')
     app_backtrace_regex = re.compile(
         '^Application Specific Backtrace ([0-9]+)([^:]*):(.*)')
-    frame_regex = re.compile('^([0-9]+)\s+(.+?)\s+(0x[0-9a-fA-F]{7}[0-9a-fA-F]+) +(.*)')
-    null_frame_regex = re.compile('^([0-9]+)\s+\?\?\?\s+(0{7}0+) +(.*)')
-    image_regex_uuid = re.compile(
-        '(0x[0-9a-fA-F]+)[-\s]+(0x[0-9a-fA-F]+)\s+[+]?(.+?)\s+(\(.+\))?\s?(<([-0-9a-fA-F]+)>)? (.*)')
+    version = r'(\(.+\)|(arm|x86_)[0-9a-z]+)\s+'
+    frame_regex = re.compile(r'^([0-9]+)' r'\s'                # id
+                             r'+(.+?)'    r'\s+'               # img_name
+                             r'(' +version+ r')?'              # img_version
+                             r'(0x[0-9a-fA-F]{7}[0-9a-fA-F]+)' # addr
+                             r' +(.*)'                         # offs
+                            )
+    null_frame_regex = re.compile(r'^([0-9]+)\s+\?\?\?\s+(0{7}0+) +(.*)')
+    image_regex_uuid = re.compile(r'(0x[0-9a-fA-F]+)'            # img_lo
+                                  r'\s+' '-' r'\s+'              #   -
+                                  r'(0x[0-9a-fA-F]+)'     r'\s+' # img_hi
+                                  r'[+]?(.+?)'            r'\s+' # img_name
+                                  r'(' +version+ ')?'            # img_version
+                                  r'(<([-0-9a-fA-F]+)>\s+)?'     # img_uuid
+                                  r'(/.*)'                       # img_path
+                                 )
     empty_line_regex = re.compile('^$')
 
     class Thread:
@@ -489,18 +501,20 @@
                     continue
                 frame_match = self.frame_regex.search(line)
                 if frame_match:
-                    ident = frame_match.group(2)
+                    (frame_id, frame_img_name, _, frame_img_version, _,
+                     frame_addr, frame_ofs) = frame_match.groups()
+                    ident = frame_img_name
                     thread.add_ident(ident)
                     if ident not in self.idents:
                         self.idents.append(ident)
-                    thread.frames.append(CrashLog.Frame(int(frame_match.group(1)), int(
-                        frame_match.group(3), 0), frame_match.group(4)))
+                    thread.frames.append(CrashLog.Frame(int(frame_id), int(
+                        frame_addr, 0), frame_ofs))
                 else:
                     print('error: frame regex failed for line: "%s"' % line)
             elif parse_mode == PARSE_MODE_IMAGES:
                 image_match = self.image_regex_uuid.search(line)
                 if image_match:
-                    (img_lo, img_hi, img_name, img_version,
+                    (img_lo, img_hi, img_name, _, img_version, _,
                      _, img_uuid, img_path) = image_match.groups()
                     image = CrashLog.DarwinImage(int(img_lo, 0), int(img_hi, 0),
                                                  img_name.strip(),
diff --git a/src/llvm-project/lldb/examples/python/in_call_stack.py b/src/llvm-project/lldb/examples/python/in_call_stack.py
new file mode 100755
index 0000000..0647f2c
--- /dev/null
+++ b/src/llvm-project/lldb/examples/python/in_call_stack.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+
+def __lldb_init_module(debugger, internal_dict):
+  debugger.HandleCommand(
+      'command alias in_call_stack breakpoint command add --python-function in_call_stack.in_call_stack -k name -v %1'
+  )
+
+
+def in_call_stack(frame, bp_loc, arg_dict, _):
+  """Only break if the given name is in the current call stack."""
+  name = arg_dict.GetValueForKey('name').GetStringValue(1000)
+  thread = frame.GetThread()
+  found = False
+  for frame in thread.frames:
+    # Check the symbol.
+    symbol = frame.GetSymbol()
+    if symbol and name in frame.GetSymbol().GetName():
+      return True
+    # Check the function.
+    function = frame.GetFunction()
+    if function and name in function.GetName():
+      return True
+  return False
diff --git a/src/llvm-project/lldb/examples/python/symbolication.py b/src/llvm-project/lldb/examples/python/symbolication.py
index dac9305..a6daa802 100755
--- a/src/llvm-project/lldb/examples/python/symbolication.py
+++ b/src/llvm-project/lldb/examples/python/symbolication.py
@@ -248,7 +248,6 @@
         obj = cls(module.file.fullpath, module.uuid)
         obj.resolved_path = module.platform_file.fullpath
         obj.resolved = True
-        obj.arch = module.triple
         for section in module.sections:
             symb_section = Section.InitWithSBTargetAndSBSection(
                 target, section)
@@ -380,7 +379,7 @@
                     return None
                 resolved_path = self.get_resolved_path()
                 self.module = target.AddModule(
-                    resolved_path, self.arch, uuid_str, self.symfile)
+                    resolved_path, str(self.arch), uuid_str, self.symfile)
             if not self.module:
                 return 'error: unable to get module for (%s) "%s"' % (
                     self.arch, self.get_resolved_path())
@@ -419,7 +418,6 @@
         if self.locate_module_and_debug_symbols():
             resolved_path = self.get_resolved_path()
             path_spec = lldb.SBFileSpec(resolved_path)
-            #result.PutCString ('plist[%s] = %s' % (uuid, self.plist))
             error = lldb.SBError()
             target = lldb.debugger.CreateTarget(
                 resolved_path, self.arch, None, False, error)
@@ -575,7 +573,6 @@
         mnemonic = inst.GetMnemonic(target)
         operands = inst.GetOperands(target)
         comment = inst.GetComment(target)
-        #data = inst.GetData (target)
         lines.append("%#16.16x: %8s %s" % (inst_pc, mnemonic, operands))
         if comment:
             line_len = len(lines[-1])
diff --git a/src/llvm-project/lldb/include/lldb/API/LLDB.h b/src/llvm-project/lldb/include/lldb/API/LLDB.h
index 0806ab7..75e2d70 100644
--- a/src/llvm-project/lldb/include/lldb/API/LLDB.h
+++ b/src/llvm-project/lldb/include/lldb/API/LLDB.h
@@ -13,8 +13,8 @@
 #include "lldb/API/SBAttachInfo.h"
 #include "lldb/API/SBBlock.h"
 #include "lldb/API/SBBreakpoint.h"
-#include "lldb/API/SBBreakpointName.h"
 #include "lldb/API/SBBreakpointLocation.h"
+#include "lldb/API/SBBreakpointName.h"
 #include "lldb/API/SBBroadcaster.h"
 #include "lldb/API/SBCommandInterpreter.h"
 #include "lldb/API/SBCommandReturnObject.h"
@@ -28,6 +28,7 @@
 #include "lldb/API/SBEvent.h"
 #include "lldb/API/SBExecutionContext.h"
 #include "lldb/API/SBExpressionOptions.h"
+#include "lldb/API/SBFile.h"
 #include "lldb/API/SBFileSpec.h"
 #include "lldb/API/SBFileSpecList.h"
 #include "lldb/API/SBFrame.h"
diff --git a/src/llvm-project/lldb/include/lldb/API/SBBreakpoint.h b/src/llvm-project/lldb/include/lldb/API/SBBreakpoint.h
index 75c0e69..a5ce91d 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBBreakpoint.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBBreakpoint.h
@@ -94,6 +94,9 @@
 
   void SetScriptCallbackFunction(const char *callback_function_name);
 
+  SBError SetScriptCallbackFunction(const char *callback_function_name,
+                                 SBStructuredData &extra_args);
+
   void SetCommandLineCommands(SBStringList &commands);
 
   bool GetCommandLineCommands(SBStringList &commands);
diff --git a/src/llvm-project/lldb/include/lldb/API/SBBreakpointLocation.h b/src/llvm-project/lldb/include/lldb/API/SBBreakpointLocation.h
index 085bed9..a9e2ef1 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBBreakpointLocation.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBBreakpointLocation.h
@@ -55,11 +55,14 @@
 
   void SetScriptCallbackFunction(const char *callback_function_name);
 
+  SBError SetScriptCallbackFunction(const char *callback_function_name,
+                                    lldb::SBStructuredData &extra_args);
+
   SBError SetScriptCallbackBody(const char *script_body_text);
   
-  void SetCommandLineCommands(SBStringList &commands);
+  void SetCommandLineCommands(lldb::SBStringList &commands);
 
-  bool GetCommandLineCommands(SBStringList &commands);
+  bool GetCommandLineCommands(lldb::SBStringList &commands);
  
   void SetThreadID(lldb::tid_t sb_thread_id);
 
diff --git a/src/llvm-project/lldb/include/lldb/API/SBBreakpointName.h b/src/llvm-project/lldb/include/lldb/API/SBBreakpointName.h
index 018238b..3a5f1ac 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBBreakpointName.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBBreakpointName.h
@@ -85,9 +85,12 @@
 
   void SetScriptCallbackFunction(const char *callback_function_name);
 
-  void SetCommandLineCommands(SBStringList &commands);
+  SBError SetScriptCallbackFunction(const char *callback_function_name,
+                                    SBStructuredData &extra_args);
 
-  bool GetCommandLineCommands(SBStringList &commands);
+  void SetCommandLineCommands(lldb::SBStringList &commands);
+
+  bool GetCommandLineCommands(lldb::SBStringList &commands);
 
   SBError SetScriptCallbackBody(const char *script_body_text);
   
diff --git a/src/llvm-project/lldb/include/lldb/API/SBCommandReturnObject.h b/src/llvm-project/lldb/include/lldb/API/SBCommandReturnObject.h
index 2877afb..e3fbacf 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBCommandReturnObject.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBCommandReturnObject.h
@@ -15,23 +15,27 @@
 
 #include "lldb/API/SBDefines.h"
 
+namespace lldb_private {
+class SBCommandReturnObjectImpl;
+}
+
 namespace lldb {
 
 class LLDB_API SBCommandReturnObject {
 public:
   SBCommandReturnObject();
 
+  SBCommandReturnObject(lldb_private::CommandReturnObject &ref);
+
+  // rvalue ctor+assignment are incompatible with Reproducers.
+
   SBCommandReturnObject(const lldb::SBCommandReturnObject &rhs);
 
   ~SBCommandReturnObject();
 
-  const lldb::SBCommandReturnObject &
+  lldb::SBCommandReturnObject &
   operator=(const lldb::SBCommandReturnObject &rhs);
 
-  SBCommandReturnObject(lldb_private::CommandReturnObject *ptr);
-
-  lldb_private::CommandReturnObject *Release();
-
   explicit operator bool() const;
 
   bool IsValid() const;
@@ -40,13 +44,21 @@
 
   const char *GetError();
 
-  size_t PutOutput(FILE *fh);
+  size_t PutOutput(FILE *fh); // DEPRECATED
+
+  size_t PutOutput(SBFile file);
+
+  size_t PutOutput(FileSP file);
 
   size_t GetOutputSize();
 
   size_t GetErrorSize();
 
-  size_t PutError(FILE *fh);
+  size_t PutError(FILE *fh); // DEPRECATED
+
+  size_t PutError(SBFile file);
+
+  size_t PutError(FileSP file);
 
   void Clear();
 
@@ -64,14 +76,21 @@
 
   bool GetDescription(lldb::SBStream &description);
 
-  // deprecated, these two functions do not take ownership of file handle
-  void SetImmediateOutputFile(FILE *fh);
+  void SetImmediateOutputFile(FILE *fh); // DEPRECATED
 
-  void SetImmediateErrorFile(FILE *fh);
+  void SetImmediateErrorFile(FILE *fh); // DEPRECATED
 
-  void SetImmediateOutputFile(FILE *fh, bool transfer_ownership);
+  void SetImmediateOutputFile(FILE *fh, bool transfer_ownership); // DEPRECATED
 
-  void SetImmediateErrorFile(FILE *fh, bool transfer_ownership);
+  void SetImmediateErrorFile(FILE *fh, bool transfer_ownership); // DEPRECATED
+
+  void SetImmediateOutputFile(SBFile file);
+
+  void SetImmediateErrorFile(SBFile file);
+
+  void SetImmediateOutputFile(FileSP file);
+
+  void SetImmediateErrorFile(FileSP file);
 
   void PutCString(const char *string, int len = -1);
 
@@ -86,6 +105,9 @@
 
   void SetError(const char *error_cstr);
 
+  // ref() is internal for LLDB only.
+  lldb_private::CommandReturnObject &ref() const;
+
 protected:
   friend class SBCommandInterpreter;
   friend class SBOptions;
@@ -96,12 +118,8 @@
 
   lldb_private::CommandReturnObject &operator*() const;
 
-  lldb_private::CommandReturnObject &ref() const;
-
-  void SetLLDBObjectPtr(lldb_private::CommandReturnObject *ptr);
-
 private:
-  std::unique_ptr<lldb_private::CommandReturnObject> m_opaque_up;
+  std::unique_ptr<lldb_private::SBCommandReturnObjectImpl> m_opaque_up;
 };
 
 } // namespace lldb
diff --git a/src/llvm-project/lldb/include/lldb/API/SBDebugger.h b/src/llvm-project/lldb/include/lldb/API/SBDebugger.h
index 417cead..580f628 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBDebugger.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBDebugger.h
@@ -88,6 +88,24 @@
 
   FILE *GetErrorFileHandle();
 
+  SBError SetInputFile(SBFile file);
+
+  SBError SetOutputFile(SBFile file);
+
+  SBError SetErrorFile(SBFile file);
+
+  SBError SetInputFile(FileSP file);
+
+  SBError SetOutputFile(FileSP file);
+
+  SBError SetErrorFile(FileSP file);
+
+  SBFile GetInputFile();
+
+  SBFile GetOutputFile();
+
+  SBFile GetErrorFile();
+
   void SaveInputTerminalState();
 
   void RestoreInputTerminalState();
@@ -99,7 +117,14 @@
   lldb::SBListener GetListener();
 
   void HandleProcessEvent(const lldb::SBProcess &process,
-                          const lldb::SBEvent &event, FILE *out, FILE *err);
+                          const lldb::SBEvent &event, FILE *out,
+                          FILE *err); // DEPRECATED
+
+  void HandleProcessEvent(const lldb::SBProcess &process,
+                          const lldb::SBEvent &event, SBFile out, SBFile err);
+
+  void HandleProcessEvent(const lldb::SBProcess &process,
+                          const lldb::SBEvent &event, FileSP out, FileSP err);
 
   lldb::SBTarget CreateTarget(const char *filename, const char *target_triple,
                               const char *platform_name,
diff --git a/src/llvm-project/lldb/include/lldb/API/SBDefines.h b/src/llvm-project/lldb/include/lldb/API/SBDefines.h
index 838c84c..68aca93 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBDefines.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBDefines.h
@@ -41,6 +41,7 @@
 class LLDB_API SBEventList;
 class LLDB_API SBExecutionContext;
 class LLDB_API SBExpressionOptions;
+class LLDB_API SBFile;
 class LLDB_API SBFileSpec;
 class LLDB_API SBFileSpecList;
 class LLDB_API SBFrame;
diff --git a/src/llvm-project/lldb/include/lldb/API/SBError.h b/src/llvm-project/lldb/include/lldb/API/SBError.h
index b076f87..3db2658 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBError.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBError.h
@@ -70,6 +70,7 @@
   friend class SBTrace;
   friend class SBValue;
   friend class SBWatchpoint;
+  friend class SBFile;
 
   lldb_private::Status *get();
 
diff --git a/src/llvm-project/lldb/include/lldb/API/SBFile.h b/src/llvm-project/lldb/include/lldb/API/SBFile.h
new file mode 100644
index 0000000..7d6c148
--- /dev/null
+++ b/src/llvm-project/lldb/include/lldb/API/SBFile.h
@@ -0,0 +1,47 @@
+//===-- SBFile.h --------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_SBFile_h_
+#define LLDB_SBFile_h_
+
+#include "lldb/API/SBDefines.h"
+
+namespace lldb {
+
+class LLDB_API SBFile {
+  friend class SBInstruction;
+  friend class SBInstructionList;
+  friend class SBDebugger;
+  friend class SBCommandReturnObject;
+  friend class SBProcess;
+
+public:
+  SBFile();
+  SBFile(FileSP file_sp);
+  SBFile(FILE *file, bool transfer_ownership);
+  SBFile(int fd, const char *mode, bool transfer_ownership);
+  ~SBFile();
+
+  SBError Read(uint8_t *buf, size_t num_bytes, size_t *bytes_read);
+  SBError Write(const uint8_t *buf, size_t num_bytes, size_t *bytes_written);
+  SBError Flush();
+  bool IsValid() const;
+  SBError Close();
+
+  operator bool() const;
+  bool operator!() const;
+
+  FileSP GetFile() const;
+
+private:
+  FileSP m_opaque_sp;
+};
+
+} // namespace lldb
+
+#endif // LLDB_SBFile_h_
diff --git a/src/llvm-project/lldb/include/lldb/API/SBInstruction.h b/src/llvm-project/lldb/include/lldb/API/SBInstruction.h
index 0bb5877..7d83a37 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBInstruction.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBInstruction.h
@@ -55,6 +55,10 @@
 
   void Print(FILE *out);
 
+  void Print(SBFile out);
+
+  void Print(FileSP out);
+
   bool GetDescription(lldb::SBStream &description);
 
   bool EmulateWithFrame(lldb::SBFrame &frame, uint32_t evaluate_options);
diff --git a/src/llvm-project/lldb/include/lldb/API/SBInstructionList.h b/src/llvm-project/lldb/include/lldb/API/SBInstructionList.h
index 4434d50..e203d0b 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBInstructionList.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBInstructionList.h
@@ -46,6 +46,10 @@
 
   void Print(FILE *out);
 
+  void Print(SBFile out);
+
+  void Print(FileSP out);
+
   bool GetDescription(lldb::SBStream &description);
 
   bool DumpEmulationForAllInstructions(const char *triple);
@@ -56,6 +60,8 @@
   friend class SBTarget;
 
   void SetDisassembler(const lldb::DisassemblerSP &opaque_sp);
+  bool GetDescription(lldb_private::Stream &description);
+
 
 private:
   lldb::DisassemblerSP m_opaque_sp;
diff --git a/src/llvm-project/lldb/include/lldb/API/SBProcess.h b/src/llvm-project/lldb/include/lldb/API/SBProcess.h
index 863cb3c..8ab8bfa 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBProcess.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBProcess.h
@@ -67,6 +67,10 @@
 
   void ReportEventState(const lldb::SBEvent &event, FILE *out) const;
 
+  void ReportEventState(const lldb::SBEvent &event, SBFile file) const;
+
+  void ReportEventState(const lldb::SBEvent &event, FileSP file) const;
+
   void AppendEventStateReport(const lldb::SBEvent &event,
                               lldb::SBCommandReturnObject &result);
 
diff --git a/src/llvm-project/lldb/include/lldb/API/SBReproducer.h b/src/llvm-project/lldb/include/lldb/API/SBReproducer.h
index 0f1739d..93d78f5 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBReproducer.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBReproducer.h
@@ -21,6 +21,9 @@
   static const char *Capture();
   static const char *Capture(const char *path);
   static const char *Replay(const char *path);
+  static const char *Replay(const char *path, bool skip_version_check);
+  static const char *GetPath();
+  static bool Generate();
 };
 
 } // namespace lldb
diff --git a/src/llvm-project/lldb/include/lldb/API/SBStream.h b/src/llvm-project/lldb/include/lldb/API/SBStream.h
index 8afbf45..b78c498 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBStream.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBStream.h
@@ -39,6 +39,10 @@
 
   void RedirectToFile(const char *path, bool append);
 
+  void RedirectToFile(lldb::SBFile file);
+
+  void RedirectToFile(lldb::FileSP file);
+
   void RedirectToFileHandle(FILE *fh, bool transfer_fh_ownership);
 
   void RedirectToFileDescriptor(int fd, bool transfer_fh_ownership);
diff --git a/src/llvm-project/lldb/include/lldb/API/SBStructuredData.h b/src/llvm-project/lldb/include/lldb/API/SBStructuredData.h
index 5b10133..785e910 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBStructuredData.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBStructuredData.h
@@ -91,6 +91,11 @@
   friend class SBTraceOptions;
   friend class SBDebugger;
   friend class SBTarget;
+  friend class SBThread;
+  friend class SBThreadPlan;
+  friend class SBBreakpoint;
+  friend class SBBreakpointLocation;
+  friend class SBBreakpointName;
 
   StructuredDataImplUP m_impl_up;
 };
diff --git a/src/llvm-project/lldb/include/lldb/API/SBThread.h b/src/llvm-project/lldb/include/lldb/API/SBThread.h
index da8726a..b5f1794 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBThread.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBThread.h
@@ -122,6 +122,10 @@
   SBError StepUsingScriptedThreadPlan(const char *script_class_name,
                                       bool resume_immediately);
 
+  SBError StepUsingScriptedThreadPlan(const char *script_class_name,
+                                      lldb::SBStructuredData &args_data,
+                                      bool resume_immediately);
+
   SBError JumpToLine(lldb::SBFileSpec &file_spec, uint32_t line);
 
   void RunToAddress(lldb::addr_t addr);
diff --git a/src/llvm-project/lldb/include/lldb/API/SBThreadPlan.h b/src/llvm-project/lldb/include/lldb/API/SBThreadPlan.h
index 007e9e2..dbe417e63 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBThreadPlan.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBThreadPlan.h
@@ -28,6 +28,9 @@
 
   SBThreadPlan(lldb::SBThread &thread, const char *class_name);
 
+  SBThreadPlan(lldb::SBThread &thread, const char *class_name, 
+               lldb::SBStructuredData &args_data);
+
   ~SBThreadPlan();
 
   explicit operator bool() const;
@@ -100,6 +103,9 @@
   SBThreadPlan QueueThreadPlanForStepScripted(const char *script_class_name);
   SBThreadPlan QueueThreadPlanForStepScripted(const char *script_class_name,
                                               SBError &error);
+  SBThreadPlan QueueThreadPlanForStepScripted(const char *script_class_name,
+                                              lldb::SBStructuredData &args_data,
+                                              SBError &error);
 
 private:
   friend class SBBreakpoint;
diff --git a/src/llvm-project/lldb/include/lldb/API/SBValue.h b/src/llvm-project/lldb/include/lldb/API/SBValue.h
index c36ba20..5f8d17f 100644
--- a/src/llvm-project/lldb/include/lldb/API/SBValue.h
+++ b/src/llvm-project/lldb/include/lldb/API/SBValue.h
@@ -75,8 +75,6 @@
 
   const char *GetObjectDescription();
 
-  const char *GetTypeValidatorResult();
-
   lldb::SBValue GetDynamicValue(lldb::DynamicValueType use_dynamic);
 
   lldb::SBValue GetStaticValue();
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/Breakpoint.h b/src/llvm-project/lldb/include/lldb/Breakpoint/Breakpoint.h
index f561b6d..94411bd 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/Breakpoint.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/Breakpoint.h
@@ -193,7 +193,7 @@
   /// Tell this breakpoint to scan a given module list and resolve any new
   /// locations that match the breakpoint's specifications.
   ///
-  /// \param[in] changed_modules
+  /// \param[in] module_list
   ///    The list of modules to look in for new locations.
   ///
   /// \param[in]  new_locations
@@ -205,7 +205,7 @@
   /// which case we will remove any locations that are in modules that got
   /// unloaded.
   ///
-  /// \param[in] changedModules
+  /// \param[in] changed_modules
   ///    The list of modules to look in for new locations.
   /// \param[in] load_event
   ///    If \b true then the modules were loaded, if \b false, unloaded.
@@ -372,10 +372,6 @@
   ///    If \b true the callback will be run on the private event thread
   ///    before the stop event gets reported.  If false, the callback will get
   ///    handled on the public event thread after the stop has been posted.
-  ///
-  /// \return
-  ///    \b true if the process should stop when you hit the breakpoint.
-  ///    \b false if it should continue.
   void SetCallback(BreakpointHitCallback callback, void *baton,
                    bool is_synchronous = false);
 
@@ -522,7 +518,7 @@
     if (name_to_remove)
       m_name_list.erase(name_to_remove);
   }
-  
+
 public:
   bool MatchesName(const char *name) {
     return m_name_list.find(name) != m_name_list.end();
@@ -554,14 +550,14 @@
   lldb::BreakpointPreconditionSP GetPrecondition() { return m_precondition_sp; }
 
   // Produces the OR'ed values for all the names assigned to this breakpoint.
-  const BreakpointName::Permissions &GetPermissions() const { 
-      return m_permissions; 
+  const BreakpointName::Permissions &GetPermissions() const {
+      return m_permissions;
   }
 
-  BreakpointName::Permissions &GetPermissions() { 
-      return m_permissions; 
+  BreakpointName::Permissions &GetPermissions() {
+      return m_permissions;
   }
-  
+
   bool AllowList() const {
     return GetPermissions().GetAllowList();
   }
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointID.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointID.h
index 0951329..9daa5b6 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointID.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointID.h
@@ -65,7 +65,7 @@
   /// If it is a mal-formed breakpoint name, error will be set to an appropriate
   /// error string.
   ///
-  /// \param[in] input
+  /// \param[in] str
   ///     A string containing JUST the breakpoint description.
   /// \param[out] error
   ///     If the name is a well-formed breakpoint name, set to success,
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointList.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointList.h
index fe10adb..ad68151 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointList.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointList.h
@@ -67,8 +67,10 @@
   ///   The breakpoint name for which to search.
   ///
   /// \result
-  ///   \bfalse if the input name was not a legal breakpoint name.
-  bool FindBreakpointsByName(const char *name, BreakpointList &matching_bps);
+  ///   error if the input name was not a legal breakpoint name, vector
+  ///   of breakpoints otherwise.
+  llvm::Expected<std::vector<lldb::BreakpointSP>>
+  FindBreakpointsByName(const char *name);
 
   /// Returns the number of elements in this breakpoint list.
   ///
@@ -138,7 +140,7 @@
 
   /// Sets the passed in Locker to hold the Breakpoint List mutex.
   ///
-  /// \param[in] locker
+  /// \param[in] lock
   ///   The locker object that is set.
   void GetListMutex(std::unique_lock<std::recursive_mutex> &lock);
 
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocation.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocation.h
index 7b27160..86bb164 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocation.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocation.h
@@ -67,7 +67,7 @@
 
   // The next section deals with various breakpoint options.
 
-  /// If \a enable is \b true, enable the breakpoint, if \b false disable it.
+  /// If \a enabled is \b true, enable the breakpoint, if \b false disable it.
   void SetEnabled(bool enabled);
 
   /// Check the Enable/Disable state.
@@ -93,7 +93,7 @@
 
   /// Set the breakpoint to ignore the next \a count breakpoint hits.
   ///
-  /// \param[in] count
+  /// \param[in] n
   ///    The number of breakpoint hits to ignore.
   void SetIgnoreCount(uint32_t n);
 
@@ -224,9 +224,6 @@
   /// \param[in] context
   ///    Described the breakpoint event.
   ///
-  /// \param[in] bp_loc_id
-  ///    Which breakpoint location hit this breakpoint.
-  ///
   /// \return
   ///     \b true if the target should stop at this breakpoint and \b
   ///     false not.
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h
index 3da52eb..be40063 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h
@@ -22,17 +22,14 @@
   BreakpointLocationCollection();
 
   ~BreakpointLocationCollection();
-  
+
   BreakpointLocationCollection &operator=(const BreakpointLocationCollection &rhs);
 
   /// Add the breakpoint \a bp_loc_sp to the list.
   ///
-  /// \param[in] bp_sp
+  /// \param[in] bp_loc_sp
   ///     Shared pointer to the breakpoint location that will get added
   ///     to the list.
-  ///
-  /// \result
-  ///     Returns breakpoint location id.
   void Add(const lldb::BreakpointLocationSP &bp_loc_sp);
 
   /// Removes the breakpoint location given by \b breakID from this
@@ -66,7 +63,7 @@
   /// Returns a shared pointer to the breakpoint location with id \a
   /// breakID, const version.
   ///
-  /// \param[in] breakID
+  /// \param[in] break_id
   ///     The breakpoint location ID to seek for.
   ///
   /// \param[in] break_loc_id
@@ -112,9 +109,6 @@
   /// \param[in] context
   ///    This contains the information about this stop.
   ///
-  /// \param[in] breakID
-  ///    This break ID that we hit.
-  ///
   /// \return
   ///    \b true if we should stop, \b false otherwise.
   bool ShouldStop(StoppointCallbackContext *context);
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocationList.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocationList.h
index b7e0e49..89ad2f5 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocationList.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointLocationList.h
@@ -75,7 +75,7 @@
   /// \param[in] module
   ///     The module to seek in.
   ///
-  /// \param[in]
+  /// \param[in] bp_loc_list
   ///     A breakpoint collection that gets any breakpoint locations
   ///     that match \a module appended to.
   ///
@@ -166,14 +166,6 @@
   /// list.
   BreakpointLocationList(Breakpoint &owner);
 
-  /// Add the breakpoint \a bp_loc_sp to the list.
-  ///
-  /// \param[in] bp_sp
-  ///     Shared pointer to the breakpoint location that will get
-  ///     added to the list.
-  ///
-  /// \result
-  ///     Returns breakpoint location id.
   lldb::BreakpointLocationSP Create(const Address &addr,
                                     bool resolve_indirect_symbols);
 
@@ -189,7 +181,7 @@
                     lldb::BreakpointLocationSP from_location_sp);
 
   bool RemoveLocation(const lldb::BreakpointLocationSP &bp_loc_sp);
-  
+
   void RemoveLocationByIndex(size_t idx);
 
   void RemoveInvalidLocations(const ArchSpec &arch);
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointOptions.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointOptions.h
index cdac5d3..2c52170 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointOptions.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointOptions.h
@@ -88,7 +88,8 @@
     explicit CommandBaton(std::unique_ptr<CommandData> Data)
         : TypedBaton(std::move(Data)) {}
 
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) const override;
+    void GetDescription(llvm::raw_ostream &s, lldb::DescriptionLevel level,
+                        unsigned indentation) const override;
   };
 
   typedef std::shared_ptr<CommandBaton> CommandBatonSP;
@@ -107,6 +108,12 @@
   /// \param[in] ignore
   ///    How many breakpoint hits we should ignore before stopping.
   ///
+  /// \param[in] one_shot
+  ///    Should this breakpoint delete itself after being hit once.
+  ///
+  /// \param[in] auto_continue
+  ///    Should this breakpoint auto-continue after running its commands.
+  ///
   BreakpointOptions(const char *condition, bool enabled = true,
                     int32_t ignore = 0, bool one_shot = false,
                     bool auto_continue = false);
@@ -129,7 +136,7 @@
 
   // Operators
   const BreakpointOptions &operator=(const BreakpointOptions &rhs);
-  
+
   /// Copy over only the options set in the incoming BreakpointOptions.
   void CopyOverSetOptions(const BreakpointOptions &rhs);
 
@@ -261,7 +268,7 @@
   bool IsEnabled() const { return m_enabled; }
 
   /// If \a enable is \b true, enable the breakpoint, if \b false disable it.
-  void SetEnabled(bool enabled) { 
+  void SetEnabled(bool enabled) {
     m_enabled = enabled;
     m_set_flags.Set(eEnabled);
   }
@@ -272,7 +279,7 @@
   bool IsAutoContinue() const { return m_auto_continue; }
 
   /// Set the auto-continue state.
-  void SetAutoContinue(bool auto_continue) { 
+  void SetAutoContinue(bool auto_continue) {
     m_auto_continue = auto_continue;
     m_set_flags.Set(eAutoContinue);
   }
@@ -283,17 +290,16 @@
   bool IsOneShot() const { return m_one_shot; }
 
   /// If \a enable is \b true, enable the breakpoint, if \b false disable it.
-  void SetOneShot(bool one_shot) { 
-    m_one_shot = one_shot; 
-    m_set_flags.Set(eOneShot); 
+  void SetOneShot(bool one_shot) {
+    m_one_shot = one_shot;
+    m_set_flags.Set(eOneShot);
   }
 
   /// Set the breakpoint to ignore the next \a count breakpoint hits.
-  /// \param[in] count
+  /// \param[in] n
   ///    The number of breakpoint hits to ignore.
-
-  void SetIgnoreCount(uint32_t n) { 
-    m_ignore_count = n; 
+  void SetIgnoreCount(uint32_t n) {
+    m_ignore_count = n;
     m_set_flags.Set(eIgnoreCount);
   }
 
@@ -319,7 +325,10 @@
 
   void GetDescription(Stream *s, lldb::DescriptionLevel level) const;
 
-  /// Returns true if the breakpoint option has a callback set.
+  /// Check if the breakpoint option has a callback set.
+  ///
+  /// \return
+  ///    If the breakpoint option has a callback, \b true otherwise \b false.
   bool HasCallback() const;
 
   /// This is the default empty callback.
@@ -332,13 +341,13 @@
   ///     A UP holding the new'ed CommandData object.
   ///     The breakpoint will take ownership of pointer held by this object.
   void SetCommandDataCallback(std::unique_ptr<CommandData> &cmd_data);
-  
+
   void Clear();
-  
+
   bool AnySet() const {
     return m_set_flags.AnySet(eAllOptions);
   }
-  
+
 protected:
   // Classes that inherit from BreakpointOptions can see and modify these
   bool IsOptionSet(OptionKind kind)
@@ -367,22 +376,32 @@
   void SetThreadSpec(std::unique_ptr<ThreadSpec> &thread_spec_up);
 
 private:
-  // For BreakpointOptions only
-  BreakpointHitCallback m_callback;  // This is the callback function pointer
-  lldb::BatonSP m_callback_baton_sp; // This is the client data for the callback
+  /// For BreakpointOptions only
+
+  /// This is the callback function pointer
+  BreakpointHitCallback m_callback;
+  /// This is the client data for the callback
+  lldb::BatonSP m_callback_baton_sp;
   bool m_baton_is_command_baton;
   bool m_callback_is_synchronous;
   bool m_enabled;
+  /// If set, the breakpoint delete itself after being hit once.
   bool m_one_shot;
-  uint32_t m_ignore_count; // Number of times to ignore this breakpoint
-  std::unique_ptr<ThreadSpec>
-      m_thread_spec_up;         // Thread for which this breakpoint will take
-  std::string m_condition_text; // The condition to test.
-  size_t m_condition_text_hash; // Its hash, so that locations know when the
-                                // condition is updated.
-  bool m_auto_continue;         // If set, auto-continue from breakpoint.
-  Flags m_set_flags;            // Which options are set at this level.  Drawn
-                                // from BreakpointOptions::SetOptionsFlags.
+  /// Number of times to ignore this breakpoint.
+  uint32_t m_ignore_count;
+  /// Thread for which this breakpoint will stop.
+  std::unique_ptr<ThreadSpec> m_thread_spec_up;
+  /// The condition to test.
+  std::string m_condition_text;
+  /// Its hash, so that locations know when the condition is updated.
+  size_t m_condition_text_hash;
+  /// If set, inject breakpoint condition into process.
+  bool m_inject_condition;
+  /// If set, auto-continue from breakpoint.
+  bool m_auto_continue;
+  /// Which options are set at this level.
+  /// Drawn from BreakpointOptions::SetOptionsFlags.
+  Flags m_set_flags;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolver.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolver.h
index 11e183b..c1dbf9a 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolver.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolver.h
@@ -44,9 +44,6 @@
   ///   The breakpoint that owns this resolver.
   /// \param[in] resolverType
   ///   The concrete breakpoint resolver type for this breakpoint.
-  ///
-  /// \result
-  ///   Returns breakpoint location id.
   BreakpointResolver(Breakpoint *bkpt, unsigned char resolverType,
                      lldb::addr_t offset = 0);
 
@@ -186,7 +183,7 @@
   };
   static const char
       *g_option_names[static_cast<uint32_t>(OptionNames::LastOptionName)];
-  
+
   virtual void NotifyBreakpointSet() {};
 
 public:
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
index 949a788..3df8964 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverAddress.h
@@ -41,8 +41,8 @@
                                   ModuleList &modules) override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
index f146a70..9ca48ec 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h
@@ -35,8 +35,8 @@
   ~BreakpointResolverFileLine() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
index 9631457..df4c13e 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h
@@ -24,7 +24,7 @@
 class BreakpointResolverFileRegex : public BreakpointResolver {
 public:
   BreakpointResolverFileRegex(
-      Breakpoint *bkpt, RegularExpression &regex,
+      Breakpoint *bkpt, RegularExpression regex,
       const std::unordered_set<std::string> &func_name_set, bool exact_match);
 
   static BreakpointResolver *
@@ -37,8 +37,8 @@
   ~BreakpointResolverFileRegex() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverName.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverName.h
index 85a41b6..196d88d 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverName.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverName.h
@@ -44,7 +44,7 @@
 
   // Creates a function breakpoint by regular expression.  Takes over control
   // of the lifespan of func_regex.
-  BreakpointResolverName(Breakpoint *bkpt, RegularExpression &func_regex,
+  BreakpointResolverName(Breakpoint *bkpt, RegularExpression func_regex,
                          lldb::LanguageType language, lldb::addr_t offset,
                          bool skip_prologue);
 
@@ -58,8 +58,8 @@
   ~BreakpointResolverName() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
index 980bb46..89a7d03 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointResolverScripted.h
@@ -26,8 +26,7 @@
   BreakpointResolverScripted(Breakpoint *bkpt,
                              const llvm::StringRef class_name,
                              lldb::SearchDepth depth,
-                             StructuredDataImpl *args_data,
-                             ScriptInterpreter &script_interp);
+                             StructuredDataImpl *args_data);
 
   ~BreakpointResolverScripted() override;
 
@@ -39,8 +38,8 @@
   StructuredData::ObjectSP SerializeToStructuredData() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointSite.h b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointSite.h
index 51ed84f..5c9f79a 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointSite.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/BreakpointSite.h
@@ -99,15 +99,12 @@
   bool ShouldStop(StoppointCallbackContext *context) override;
 
   /// Standard Dump method
-  ///
-  /// \param[in] context
-  ///    The stream to dump this output.
   void Dump(Stream *s) const override;
 
   /// The "Owners" are the breakpoint locations that share this breakpoint
   /// site. The method adds the \a owner to this breakpoint site's owner list.
   ///
-  /// \param[in] context
+  /// \param[in] owner
   ///    \a owner is the Breakpoint Location to add.
   void AddOwner(const lldb::BreakpointLocationSP &owner);
 
@@ -123,8 +120,9 @@
   /// GetNumberOfOwners() - 1 so you can use this method to iterate over the
   /// owners
   ///
-  /// \param[in] index
+  /// \param[in] idx
   ///     The index in the list of owners for which you wish the owner location.
+  ///
   /// \return
   ///    A shared pointer to the breakpoint location at that index.
   lldb::BreakpointLocationSP GetOwnerAtIndex(size_t idx);
@@ -201,9 +199,6 @@
 
   /// The method removes the owner at \a break_loc_id from this breakpoint
   /// list.
-  ///
-  /// \param[in] context
-  ///    \a break_loc_id is the Breakpoint Location to remove.
   size_t RemoveOwner(lldb::break_id_t break_id, lldb::break_id_t break_loc_id);
 
   BreakpointSite::Type m_type; ///< The type of this breakpoint site.
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/Watchpoint.h b/src/llvm-project/lldb/include/lldb/Breakpoint/Watchpoint.h
index e71f89b..2cc74bb 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/Watchpoint.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/Watchpoint.h
@@ -69,7 +69,6 @@
   // This doesn't really enable/disable the watchpoint.   It is currently just
   // for use in the Process plugin's {Enable,Disable}Watchpoint, which should
   // be used instead.
-  
   void SetEnabled(bool enabled, bool notify = true);
 
   bool IsHardware() const override;
@@ -113,10 +112,6 @@
   ///    If \b true the callback will be run on the private event thread
   ///    before the stop event gets reported.  If false, the callback will get
   ///    handled on the public event thread after the stop has been posted.
-  ///
-  /// \return
-  ///    \b true if the process should stop when you hit the watchpoint.
-  ///    \b false if it should continue.
   void SetCallback(WatchpointHitCallback callback, void *callback_baton,
                    bool is_synchronous = false);
 
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/WatchpointList.h b/src/llvm-project/lldb/include/lldb/Breakpoint/WatchpointList.h
index 98c6483..bb73d4a 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/WatchpointList.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/WatchpointList.h
@@ -180,7 +180,7 @@
 
   /// Sets the passed in Locker to hold the Watchpoint List mutex.
   ///
-  /// \param[in] locker
+  /// \param[in] lock
   ///   The locker object that is set.
   void GetListMutex(std::unique_lock<std::recursive_mutex> &lock);
 
diff --git a/src/llvm-project/lldb/include/lldb/Breakpoint/WatchpointOptions.h b/src/llvm-project/lldb/include/lldb/Breakpoint/WatchpointOptions.h
index b395dde..0dc34d4 100644
--- a/src/llvm-project/lldb/include/lldb/Breakpoint/WatchpointOptions.h
+++ b/src/llvm-project/lldb/include/lldb/Breakpoint/WatchpointOptions.h
@@ -180,7 +180,8 @@
     CommandBaton(std::unique_ptr<CommandData> Data)
         : TypedBaton(std::move(Data)) {}
 
-    void GetDescription(Stream *s, lldb::DescriptionLevel level) const override;
+    void GetDescription(llvm::raw_ostream &s, lldb::DescriptionLevel level,
+                        unsigned indentation) const override;
   };
 
 protected:
diff --git a/src/llvm-project/lldb/include/lldb/Core/Address.h b/src/llvm-project/lldb/include/lldb/Core/Address.h
index 080c00e..70a7f79 100644
--- a/src/llvm-project/lldb/include/lldb/Core/Address.h
+++ b/src/llvm-project/lldb/include/lldb/Core/Address.h
@@ -61,45 +61,55 @@
   /// Dump styles allow the Address::Dump(Stream *,DumpStyle) const function
   /// to display Address contents in a variety of ways.
   enum DumpStyle {
-    DumpStyleInvalid,           ///< Invalid dump style
-    DumpStyleSectionNameOffset, ///< Display as the section name + offset.
-                                ///< \code
+    /// Invalid dump style.
+    DumpStyleInvalid,
+    /// Display as the section name + offset.
+    /// \code
     /// // address for printf in libSystem.B.dylib as a section name + offset
-    /// libSystem.B.dylib.__TEXT.__text + 0x0005cfdf \endcode
-    DumpStyleSectionPointerOffset, ///< Display as the section pointer + offset
-                                   ///(debug output).
-                                   ///< \code
+    /// libSystem.B.dylib.__TEXT.__text + 0x0005cfdf
+    /// \endcode
+    DumpStyleSectionNameOffset,
+    /// Display as the section pointer + offset (debug output).
+    /// \code
     /// // address for printf in libSystem.B.dylib as a section pointer +
-    /// offset (lldb::Section *)0x35cc50 + 0x000000000005cfdf \endcode
-    DumpStyleFileAddress, ///< Display as the file address (if any).
-                          ///< \code
+    /// offset (lldb::Section *)0x35cc50 + 0x000000000005cfdf
+    /// \endcode
+    DumpStyleSectionPointerOffset,
+    /// Display as the file address (if any).
+    /// \code
     /// // address for printf in libSystem.B.dylib as a file address
-    /// 0x000000000005dcff \endcode
-    DumpStyleModuleWithFileAddress, ///< Display as the file address with the
-                                    /// module name prepended (if any).
-                                    ///< \code
+    /// 0x000000000005dcff
+    /// \endcode
+    ///
+    DumpStyleFileAddress,
+    /// Display as the file address with the module name prepended (if any).
+    /// \code
     /// // address for printf in libSystem.B.dylib as a file address
-    /// libSystem.B.dylib[0x000000000005dcff] \endcode
-    DumpStyleLoadAddress, ///< Display as the load address (if resolved).
-                          ///< \code
+    /// libSystem.B.dylib[0x000000000005dcff]
+    /// \endcode
+    DumpStyleModuleWithFileAddress,
+    /// Display as the load address (if resolved).
+    /// \code
     /// // address for printf in libSystem.B.dylib as a load address
-    /// 0x00007fff8306bcff \endcode
-    DumpStyleResolvedDescription, ///< Display the details about what an address
-                                  /// resolves to. This can
-    ///< be anything from a symbol context summary (module, function/symbol,
-    ///< and file and line), to information about what the pointer points to
-    ///< if the address is in a section (section of pointers, c strings, etc).
+    /// 0x00007fff8306bcff
+    /// \endcode
+    DumpStyleLoadAddress,
+    /// Display the details about what an address resolves to. This can be
+    /// anything from a symbol context summary (module, function/symbol, and
+    /// file and line), to information about what the pointer points to if the
+    /// address is in a section (section of pointers, c strings, etc).
+    DumpStyleResolvedDescription,
     DumpStyleResolvedDescriptionNoModule,
     DumpStyleResolvedDescriptionNoFunctionArguments,
-    DumpStyleNoFunctionName, ///< Elide the function name; display an offset
-                             /// into the current function.
-                             ///< Used primarily in disassembly symbolication
-    DumpStyleDetailedSymbolContext, ///< Detailed symbol context information for
-                                    /// an address for all symbol
-                                    ///< context members.
-    DumpStyleResolvedPointerDescription ///< Dereference a pointer at the
-                                        /// current address and then lookup the
-    ///< dereferenced address using DumpStyleResolvedDescription
+    /// Elide the function name; display an offset into the current function.
+    /// Used primarily in disassembly symbolication
+    DumpStyleNoFunctionName,
+    /// Detailed symbol context information for an address for all symbol
+    /// context members.
+    DumpStyleDetailedSymbolContext,
+    /// Dereference a pointer at the current address and then lookup the
+    /// dereferenced address using DumpStyleResolvedDescription
+    DumpStyleResolvedPointerDescription
   };
 
   /// Default constructor.
@@ -121,7 +131,7 @@
   ///
   /// Initialize the address with the supplied \a section and \a offset.
   ///
-  /// \param[in] section
+  /// \param[in] section_sp
   ///     A section pointer to a valid lldb::Section, or NULL if the
   ///     address doesn't have a section or will get resolved later.
   ///
@@ -179,9 +189,9 @@
   ///     The Right Hand Side const Address object reference.
   ///
   /// \return
-  ///     \li -1 if lhs < rhs
-  ///     \li 0 if lhs == rhs
-  ///     \li 1 if lhs > rhs
+  ///     -1 if lhs < rhs
+  ///     0 if lhs == rhs
+  ///     1 if lhs > rhs
   static int CompareFileAddress(const Address &lhs, const Address &rhs);
 
   static int CompareLoadAddress(const Address &lhs, const Address &rhs,
@@ -338,6 +348,23 @@
   bool ResolveAddressUsingFileSections(lldb::addr_t addr,
                                        const SectionList *sections);
 
+  /// Resolve this address to its containing function and optionally get
+  /// that function's address range.
+  ///
+  /// \param[out] sym_ctx
+  ///     The symbol context describing the function in which this address lies
+  ///
+  /// \parm[out] addr_range_ptr
+  ///     Pointer to the AddressRange to fill in with the function's address
+  ///     range.  Caller may pass null if they don't need the address range.
+  ///
+  /// \return
+  ///     Returns \b false if the function/symbol could not be resolved
+  ///     or if the address range was requested and could not be resolved;
+  ///     returns \b true otherwise.
+  bool ResolveFunctionScope(lldb_private::SymbolContext &sym_ctx,
+                            lldb_private::AddressRange *addr_range_ptr = nullptr);
+
   /// Set the address to represent \a load_addr.
   ///
   /// The address will attempt to find a loaded section within \a target that
@@ -416,7 +443,7 @@
 
   /// Set accessor for the section.
   ///
-  /// \param[in] section
+  /// \param[in] section_sp
   ///     A new lldb::Section pointer to use as the section base. Can
   ///     be NULL for absolute addresses that are not relative to
   ///     any section.
diff --git a/src/llvm-project/lldb/include/lldb/Core/AddressRange.h b/src/llvm-project/lldb/include/lldb/Core/AddressRange.h
index 4a019bf..ac74871 100644
--- a/src/llvm-project/lldb/include/lldb/Core/AddressRange.h
+++ b/src/llvm-project/lldb/include/lldb/Core/AddressRange.h
@@ -123,7 +123,7 @@
   /// Check if the resolved file address \a file_addr is contained within this
   /// object's file address range.
   ///
-  /// \param[in] so_addr
+  /// \param[in] file_addr
   ///     A section offset address object reference.
   ///
   /// \return
@@ -147,9 +147,6 @@
   /// Check if the resolved load address \a load_addr is contained within this
   /// object's load address range.
   ///
-  /// \param[in] so_addr
-  ///     A section offset address object reference.
-  ///
   /// \return
   ///     Returns \b true if both \a this has a resolvable load
   ///     address value and \a so_addr is contained in the address
diff --git a/src/llvm-project/lldb/include/lldb/Core/AddressResolverFileLine.h b/src/llvm-project/lldb/include/lldb/Core/AddressResolverFileLine.h
index b98e7d4..efbe3de 100644
--- a/src/llvm-project/lldb/include/lldb/Core/AddressResolverFileLine.h
+++ b/src/llvm-project/lldb/include/lldb/Core/AddressResolverFileLine.h
@@ -34,8 +34,8 @@
   ~AddressResolverFileLine() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
diff --git a/src/llvm-project/lldb/include/lldb/Core/AddressResolverName.h b/src/llvm-project/lldb/include/lldb/Core/AddressResolverName.h
index ad14ef6..8a039f9 100644
--- a/src/llvm-project/lldb/include/lldb/Core/AddressResolverName.h
+++ b/src/llvm-project/lldb/include/lldb/Core/AddressResolverName.h
@@ -31,7 +31,7 @@
 
   // Creates a function breakpoint by regular expression.  Takes over control
   // of the lifespan of func_regex.
-  AddressResolverName(RegularExpression &func_regex);
+  AddressResolverName(RegularExpression func_regex);
 
   AddressResolverName(const char *class_name, const char *method,
                       AddressResolver::MatchType type);
@@ -39,8 +39,8 @@
   ~AddressResolverName() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
diff --git a/src/llvm-project/lldb/include/lldb/Core/ClangForward.h b/src/llvm-project/lldb/include/lldb/Core/ClangForward.h
index 6b24b47..0bc3314 100644
--- a/src/llvm-project/lldb/include/lldb/Core/ClangForward.h
+++ b/src/llvm-project/lldb/include/lldb/Core/ClangForward.h
@@ -17,7 +17,6 @@
 class Context;
 }
 
-class Action;
 class ASTConsumer;
 class ASTContext;
 class ASTRecordLayout;
diff --git a/src/llvm-project/lldb/include/lldb/Core/Debugger.h b/src/llvm-project/lldb/include/lldb/Core/Debugger.h
index 8e60871..a804842 100644
--- a/src/llvm-project/lldb/include/lldb/Core/Debugger.h
+++ b/src/llvm-project/lldb/include/lldb/Core/Debugger.h
@@ -17,6 +17,7 @@
 #include "lldb/Core/FormatEntity.h"
 #include "lldb/Core/IOHandler.h"
 #include "lldb/Core/SourceManager.h"
+#include "lldb/Core/StreamFile.h"
 #include "lldb/Core/UserSettingsController.h"
 #include "lldb/Host/HostThread.h"
 #include "lldb/Host/Terminal.h"
@@ -113,20 +114,29 @@
 
   void SetAsyncExecution(bool async);
 
-  lldb::StreamFileSP GetInputFile() { return m_input_file_sp; }
+  lldb::FileSP GetInputFileSP() { return m_input_file_sp; }
 
-  lldb::StreamFileSP GetOutputFile() { return m_output_file_sp; }
+  lldb::StreamFileSP GetOutputStreamSP() { return m_output_stream_sp; }
 
-  lldb::StreamFileSP GetErrorFile() { return m_error_file_sp; }
+  lldb::StreamFileSP GetErrorStreamSP() { return m_error_stream_sp; }
+
+  File &GetInputFile() { return *m_input_file_sp; }
+
+  File &GetOutputFile() { return m_output_stream_sp->GetFile(); }
+
+  File &GetErrorFile() { return m_error_stream_sp->GetFile(); }
+
+  StreamFile &GetOutputStream() { return *m_output_stream_sp; }
+
+  StreamFile &GetErrorStream() { return *m_error_stream_sp; }
 
   repro::DataRecorder *GetInputRecorder();
 
-  void SetInputFileHandle(FILE *fh, bool tranfer_ownership,
-                          repro::DataRecorder *recorder = nullptr);
+  void SetInputFile(lldb::FileSP file, repro::DataRecorder *recorder = nullptr);
 
-  void SetOutputFileHandle(FILE *fh, bool tranfer_ownership);
+  void SetOutputFile(lldb::FileSP file);
 
-  void SetErrorFileHandle(FILE *fh, bool tranfer_ownership);
+  void SetErrorFile(lldb::FileSP file);
 
   void SaveInputTerminalState();
 
@@ -141,7 +151,9 @@
     return *m_command_interpreter_up;
   }
 
-  ScriptInterpreter *GetScriptInterpreter(bool can_create = true);
+  ScriptInterpreter *
+  GetScriptInterpreter(bool can_create = true,
+                       llvm::Optional<lldb::ScriptLanguage> language = {});
 
   lldb::ListenerSP GetListener() { return m_listener_sp; }
 
@@ -174,7 +186,7 @@
 
   // If any of the streams are not set, set them to the in/out/err stream of
   // the top most input reader to ensure they at least have something
-  void AdoptTopIOHandlerFilesIfInvalid(lldb::StreamFileSP &in,
+  void AdoptTopIOHandlerFilesIfInvalid(lldb::FileSP &in,
                                        lldb::StreamFileSP &out,
                                        lldb::StreamFileSP &err);
 
@@ -311,7 +323,7 @@
   // selected target, or if no target is present you want to prime the dummy
   // target with entities that will be copied over to new targets.
   Target *GetSelectedOrDummyTarget(bool prefer_dummy = false);
-  Target *GetDummyTarget();
+  Target *GetDummyTarget() { return m_dummy_target_sp.get(); }
 
   lldb::BroadcasterManagerSP GetBroadcasterManager() {
     return m_broadcaster_manager_sp;
@@ -345,9 +357,10 @@
 
   void HandleThreadEvent(const lldb::EventSP &event_sp);
 
-  size_t GetProcessSTDOUT(Process *process, Stream *stream);
-
-  size_t GetProcessSTDERR(Process *process, Stream *stream);
+  // Ensures two threads don't attempt to flush process output in parallel.
+  std::mutex m_output_flush_mutex;
+  void FlushProcessOutput(Process &process, bool flush_stdout,
+                          bool flush_stderr);
 
   SourceManager::SourceFileCache &GetSourceFileCache() {
     return m_source_file_cache;
@@ -355,9 +368,10 @@
 
   void InstanceInitialize();
 
-  lldb::StreamFileSP m_input_file_sp;
-  lldb::StreamFileSP m_output_file_sp;
-  lldb::StreamFileSP m_error_file_sp;
+  // these should never be NULL
+  lldb::FileSP m_input_file_sp;
+  lldb::StreamFileSP m_output_stream_sp;
+  lldb::StreamFileSP m_error_stream_sp;
 
   /// Used for shadowing the input file when capturing a reproducer.
   repro::DataRecorder *m_input_recorder;
@@ -384,8 +398,9 @@
                                                       // source file cache.
   std::unique_ptr<CommandInterpreter> m_command_interpreter_up;
 
-  lldb::ScriptInterpreterSP m_script_interpreter_sp;
   std::recursive_mutex m_script_interpreter_mutex;
+  std::array<lldb::ScriptInterpreterSP, lldb::eScriptLanguageUnknown>
+      m_script_interpreters;
 
   IOHandlerStack m_input_reader_stack;
   llvm::StringMap<std::weak_ptr<llvm::raw_ostream>> m_log_streams;
@@ -399,6 +414,7 @@
   Broadcaster m_sync_broadcaster;
   lldb::ListenerSP m_forward_listener_sp;
   llvm::once_flag m_clear_once;
+  lldb::TargetSP m_dummy_target_sp;
 
   // Events for m_sync_broadcaster
   enum {
diff --git a/src/llvm-project/lldb/include/lldb/Core/Disassembler.h b/src/llvm-project/lldb/include/lldb/Core/Disassembler.h
index ba9ca87..7ece0ee 100644
--- a/src/llvm-project/lldb/include/lldb/Core/Disassembler.h
+++ b/src/llvm-project/lldb/include/lldb/Core/Disassembler.h
@@ -287,6 +287,10 @@
   ///     a function call (a branch that calls and returns to the next
   ///     instruction). If false, find the instruction index of any 
   ///     branch in the list.
+  ///     
+  /// @param[out] found_calls
+  ///     If non-null, this will be set to true if any calls were found in 
+  ///     extending the range.
   ///    
   /// @return
   ///     The instruction index of the first branch that is at or past
@@ -295,7 +299,8 @@
   //------------------------------------------------------------------
   uint32_t GetIndexOfNextBranchInstruction(uint32_t start,
                                            Target &target,
-                                           bool ignore_calls) const;
+                                           bool ignore_calls,
+                                           bool *found_calls) const;
 
   uint32_t GetIndexOfInstructionAtLoadAddress(lldb::addr_t load_addr,
                                               Target &target);
diff --git a/src/llvm-project/lldb/include/lldb/Core/FileLineResolver.h b/src/llvm-project/lldb/include/lldb/Core/FileLineResolver.h
index 1967ed5..d6525b7 100644
--- a/src/llvm-project/lldb/include/lldb/Core/FileLineResolver.h
+++ b/src/llvm-project/lldb/include/lldb/Core/FileLineResolver.h
@@ -37,8 +37,8 @@
   ~FileLineResolver() override;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override;
 
diff --git a/src/llvm-project/lldb/include/lldb/Core/FileSpecList.h b/src/llvm-project/lldb/include/lldb/Core/FileSpecList.h
index 79623ef..8edc328 100644
--- a/src/llvm-project/lldb/include/lldb/Core/FileSpecList.h
+++ b/src/llvm-project/lldb/include/lldb/Core/FileSpecList.h
@@ -25,6 +25,9 @@
 /// A class that contains a mutable list of FileSpec objects.
 class FileSpecList {
 public:
+  typedef std::vector<FileSpec> collection;
+  typedef collection::const_iterator const_iterator;
+
   /// Default constructor.
   ///
   /// Initialize this object with an empty file list.
@@ -76,6 +79,15 @@
   ///     \b true if the file was appended, \b false otherwise.
   bool AppendIfUnique(const FileSpec &file);
 
+  /// Inserts a new FileSpec into the FileSpecList constructed in-place with
+  /// the given arguments.
+  ///
+  /// \param[in] args
+  ///     Arguments to create the FileSpec
+  template <class... Args> void EmplaceBack(Args &&... args) {
+    m_files.emplace_back(std::forward<Args>(args)...);
+  }
+
   /// Clears the file list.
   void Clear();
 
@@ -182,9 +194,10 @@
   static size_t GetFilesMatchingPartialPath(const char *path, bool dir_okay,
                                             FileSpecList &matches);
 
+  const_iterator begin() const { return m_files.begin(); }
+  const_iterator end() const { return m_files.end(); }
+
 protected:
-  typedef std::vector<FileSpec>
-      collection;     ///< The collection type for the file list.
   collection m_files; ///< A collection of FileSpec objects.
 };
 
diff --git a/src/llvm-project/lldb/include/lldb/Core/FormatEntity.h b/src/llvm-project/lldb/include/lldb/Core/FormatEntity.h
index 634d9df..8ee320b 100644
--- a/src/llvm-project/lldb/include/lldb/Core/FormatEntity.h
+++ b/src/llvm-project/lldb/include/lldb/Core/FormatEntity.h
@@ -85,6 +85,7 @@
       FunctionName,
       FunctionNameWithArgs,
       FunctionNameNoArgs,
+      FunctionMangledName,
       FunctionAddrOffset,
       FunctionAddrOffsetConcrete,
       FunctionLineOffset,
@@ -199,7 +200,7 @@
                                     llvm::StringRef &variable_name,
                                     llvm::StringRef &variable_format);
 
-  static size_t AutoComplete(lldb_private::CompletionRequest &request);
+  static void AutoComplete(lldb_private::CompletionRequest &request);
 
   // Format the current elements into the stream \a s.
   //
diff --git a/src/llvm-project/lldb/include/lldb/Core/Highlighter.h b/src/llvm-project/lldb/include/lldb/Core/Highlighter.h
index 88d3bb3..8a268ec 100644
--- a/src/llvm-project/lldb/include/lldb/Core/Highlighter.h
+++ b/src/llvm-project/lldb/include/lldb/Core/Highlighter.h
@@ -43,8 +43,6 @@
     void Apply(Stream &s, llvm::StringRef value) const;
 
     /// Sets the prefix and suffix strings.
-    /// \param prefix
-    /// \param suffix
     void Set(llvm::StringRef prefix, llvm::StringRef suffix);
   };
 
@@ -100,6 +98,7 @@
 
   /// Highlights the given line
   /// \param options
+  ///     The highlight options.
   /// \param line
   ///     The user supplied line that needs to be highlighted.
   /// \param cursor_pos
diff --git a/src/llvm-project/lldb/include/lldb/Core/IOHandler.h b/src/llvm-project/lldb/include/lldb/Core/IOHandler.h
index b718067..9ab5eaa 100644
--- a/src/llvm-project/lldb/include/lldb/Core/IOHandler.h
+++ b/src/llvm-project/lldb/include/lldb/Core/IOHandler.h
@@ -10,6 +10,8 @@
 #define liblldb_IOHandler_h_
 
 #include "lldb/Core/ValueObjectList.h"
+#include "lldb/Host/Config.h"
+#include "lldb/Utility/CompletionRequest.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/Flags.h"
 #include "lldb/Utility/Predicate.h"
@@ -50,6 +52,7 @@
     REPL,
     ProcessIO,
     PythonInterpreter,
+    LuaInterpreter,
     PythonCode,
     Other
   };
@@ -57,8 +60,7 @@
   IOHandler(Debugger &debugger, IOHandler::Type type);
 
   IOHandler(Debugger &debugger, IOHandler::Type type,
-            const lldb::StreamFileSP &input_sp,
-            const lldb::StreamFileSP &output_sp,
+            const lldb::FileSP &input_sp, const lldb::StreamFileSP &output_sp,
             const lldb::StreamFileSP &error_sp, uint32_t flags,
             repro::DataRecorder *data_recorder);
 
@@ -122,11 +124,11 @@
 
   FILE *GetErrorFILE();
 
-  lldb::StreamFileSP &GetInputStreamFile();
+  lldb::FileSP &GetInputFileSP();
 
-  lldb::StreamFileSP &GetOutputStreamFile();
+  lldb::StreamFileSP &GetOutputStreamFileSP();
 
-  lldb::StreamFileSP &GetErrorStreamFile();
+  lldb::StreamFileSP &GetErrorStreamFileSP();
 
   Debugger &GetDebugger() { return m_debugger; }
 
@@ -164,7 +166,7 @@
 
 protected:
   Debugger &m_debugger;
-  lldb::StreamFileSP m_input_sp;
+  lldb::FileSP m_input_sp;
   lldb::StreamFileSP m_output_sp;
   lldb::StreamFileSP m_error_sp;
   repro::DataRecorder *m_data_recorder;
@@ -198,10 +200,8 @@
 
   virtual void IOHandlerDeactivated(IOHandler &io_handler) {}
 
-  virtual int IOHandlerComplete(IOHandler &io_handler, const char *current_line,
-                                const char *cursor, const char *last_char,
-                                int skip_first_n_matches, int max_matches,
-                                StringList &matches, StringList &descriptions);
+  virtual void IOHandlerComplete(IOHandler &io_handler,
+                                 CompletionRequest &request);
 
   virtual const char *IOHandlerGetFixIndentationCharacters() { return nullptr; }
 
@@ -334,7 +334,7 @@
                     repro::DataRecorder *data_recorder);
 
   IOHandlerEditline(Debugger &debugger, IOHandler::Type type,
-                    const lldb::StreamFileSP &input_sp,
+                    const lldb::FileSP &input_sp,
                     const lldb::StreamFileSP &output_sp,
                     const lldb::StreamFileSP &error_sp, uint32_t flags,
                     const char *editline_name, // Used for saving history files
@@ -350,7 +350,7 @@
                     const char *, bool, bool, uint32_t,
                     IOHandlerDelegate &) = delete;
 
-  IOHandlerEditline(Debugger &, IOHandler::Type, const lldb::StreamFileSP &,
+  IOHandlerEditline(Debugger &, IOHandler::Type, const lldb::FileSP &,
                     const lldb::StreamFileSP &, const lldb::StreamFileSP &,
                     uint32_t, const char *, const char *, const char *, bool,
                     bool, uint32_t, IOHandlerDelegate &) = delete;
@@ -408,22 +408,18 @@
   void PrintAsync(Stream *stream, const char *s, size_t len) override;
 
 private:
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   static bool IsInputCompleteCallback(Editline *editline, StringList &lines,
                                       void *baton);
 
   static int FixIndentationCallback(Editline *editline, const StringList &lines,
                                     int cursor_position, void *baton);
 
-  static int AutoCompleteCallback(const char *current_line, const char *cursor,
-                                  const char *last_char,
-                                  int skip_first_n_matches, int max_matches,
-                                  StringList &matches, StringList &descriptions,
-                                  void *baton);
+  static void AutoCompleteCallback(CompletionRequest &request, void *baton);
 #endif
 
 protected:
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   std::unique_ptr<Editline> m_editline_up;
 #endif
   IOHandlerDelegate &m_delegate;
@@ -437,6 +433,7 @@
   bool m_interrupt_exits;
   bool m_editing; // Set to true when fetching a line manually (not using
                   // libedit)
+  std::string m_line_buffer;
 };
 
 // The order of base classes is important. Look at the constructor of
@@ -450,10 +447,8 @@
 
   bool GetResponse() const { return m_user_response; }
 
-  int IOHandlerComplete(IOHandler &io_handler, const char *current_line,
-                        const char *cursor, const char *last_char,
-                        int skip_first_n_matches, int max_matches,
-                        StringList &matches, StringList &descriptions) override;
+  void IOHandlerComplete(IOHandler &io_handler,
+                         CompletionRequest &request) override;
 
   void IOHandlerInputComplete(IOHandler &io_handler,
                               std::string &data) override;
@@ -463,48 +458,9 @@
   bool m_user_response;
 };
 
-class IOHandlerCursesGUI : public IOHandler {
-public:
-  IOHandlerCursesGUI(Debugger &debugger);
-
-  ~IOHandlerCursesGUI() override;
-
-  void Run() override;
-
-  void Cancel() override;
-
-  bool Interrupt() override;
-
-  void GotEOF() override;
-
-  void Activate() override;
-
-  void Deactivate() override;
-
-protected:
-  curses::ApplicationAP m_app_ap;
-};
-
-class IOHandlerCursesValueObjectList : public IOHandler {
-public:
-  IOHandlerCursesValueObjectList(Debugger &debugger,
-                                 ValueObjectList &valobj_list);
-
-  ~IOHandlerCursesValueObjectList() override;
-
-  void Run() override;
-
-  void GotEOF() override;
-
-protected:
-  ValueObjectList m_valobj_list;
-};
-
 class IOHandlerStack {
 public:
-  IOHandlerStack() : m_stack(), m_mutex(), m_top(nullptr) {}
-
-  ~IOHandlerStack() = default;
+  IOHandlerStack() = default;
 
   size_t GetSize() const {
     std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -581,7 +537,7 @@
   typedef std::vector<lldb::IOHandlerSP> collection;
   collection m_stack;
   mutable std::recursive_mutex m_mutex;
-  IOHandler *m_top;
+  IOHandler *m_top = nullptr;
 
 private:
   DISALLOW_COPY_AND_ASSIGN(IOHandlerStack);
diff --git a/src/llvm-project/lldb/include/lldb/Core/IOHandlerCursesGUI.h b/src/llvm-project/lldb/include/lldb/Core/IOHandlerCursesGUI.h
new file mode 100644
index 0000000..afa4352
--- /dev/null
+++ b/src/llvm-project/lldb/include/lldb/Core/IOHandlerCursesGUI.h
@@ -0,0 +1,40 @@
+//===-- IOHandlerCursesGUI.h ------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_IOHandlerCursesGUI_h_
+#define liblldb_IOHandlerCursesGUI_h_
+
+#include "lldb/Core/IOHandler.h"
+
+namespace lldb_private {
+
+class IOHandlerCursesGUI : public IOHandler {
+public:
+  IOHandlerCursesGUI(Debugger &debugger);
+
+  ~IOHandlerCursesGUI() override;
+
+  void Run() override;
+
+  void Cancel() override;
+
+  bool Interrupt() override;
+
+  void GotEOF() override;
+
+  void Activate() override;
+
+  void Deactivate() override;
+
+protected:
+  curses::ApplicationAP m_app_ap;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_IOHandlerCursesGUI_h_
diff --git a/src/llvm-project/lldb/include/lldb/Core/LoadedModuleInfoList.h b/src/llvm-project/lldb/include/lldb/Core/LoadedModuleInfoList.h
index f7f8360..04e58fc 100644
--- a/src/llvm-project/lldb/include/lldb/Core/LoadedModuleInfoList.h
+++ b/src/llvm-project/lldb/include/lldb/Core/LoadedModuleInfoList.h
@@ -84,9 +84,6 @@
     }
 
     bool operator==(LoadedModuleInfo const &rhs) const {
-      if (e_num != rhs.e_num)
-        return false;
-
       for (size_t i = 0; i < e_num; ++i) {
         if (m_has[i] != rhs.m_has[i])
           return false;
diff --git a/src/llvm-project/lldb/include/lldb/Core/Mangled.h b/src/llvm-project/lldb/include/lldb/Core/Mangled.h
index fb52afd..6af68c3 100644
--- a/src/llvm-project/lldb/include/lldb/Core/Mangled.h
+++ b/src/llvm-project/lldb/include/lldb/Core/Mangled.h
@@ -49,21 +49,7 @@
   /// Default constructor.
   ///
   /// Initialize with both mangled and demangled names empty.
-  Mangled();
-
-  /// Construct with name.
-  ///
-  /// Constructor with an optional string and a boolean indicating if it is
-  /// the mangled version.
-  ///
-  /// \param[in] name
-  ///     The already const name to copy into this object.
-  ///
-  /// \param[in] is_mangled
-  ///     If \b true then \a name is a mangled name, if \b false then
-  ///     \a name is demangled.
-  Mangled(ConstString name, bool is_mangled);
-  Mangled(llvm::StringRef name, bool is_mangled);
+  Mangled() = default;
 
   /// Construct with name.
   ///
@@ -76,12 +62,6 @@
 
   explicit Mangled(llvm::StringRef name);
 
-  /// Destructor
-  ///
-  /// Releases its ref counts on the mangled and demangled strings that live
-  /// in the global string pool.
-  ~Mangled();
-
   /// Convert to pointer operator.
   ///
   /// This allows code to check a Mangled object to see if it contains a valid
@@ -128,9 +108,9 @@
   ///     A const reference to the Right Hand Side object to compare.
   ///
   /// \return
-  ///     \li -1 if \a lhs is less than \a rhs
-  ///     \li 0 if \a lhs is equal to \a rhs
-  ///     \li 1 if \a lhs is greater than \a rhs
+  ///     -1 if \a lhs is less than \a rhs
+  ///     0 if \a lhs is equal to \a rhs
+  ///     1 if \a lhs is greater than \a rhs
   static int Compare(const Mangled &lhs, const Mangled &rhs);
 
   /// Dump a description of this object to a Stream \a s.
@@ -281,6 +261,15 @@
   bool DemangleWithRichManglingInfo(RichManglingContext &context,
                                     SkipMangledNameFn *skip_mangled_name);
 
+  /// Try to identify the mangling scheme used.
+  /// \param[in] name
+  ///     The name we are attempting to identify the mangling scheme for.
+  ///
+  /// \return
+  ///     eManglingSchemeNone if no known mangling scheme could be identified
+  ///     for s, otherwise the enumerator for the mangling scheme detected.
+  static Mangled::ManglingScheme GetManglingScheme(llvm::StringRef const name);
+
 private:
   /// Mangled member variables.
   ConstString m_mangled;           ///< The mangled version of the name
diff --git a/src/llvm-project/lldb/include/lldb/Core/Module.h b/src/llvm-project/lldb/include/lldb/Core/Module.h
index 544895e..2af18c8 100644
--- a/src/llvm-project/lldb/include/lldb/Core/Module.h
+++ b/src/llvm-project/lldb/include/lldb/Core/Module.h
@@ -49,7 +49,6 @@
 class SymbolContext;
 class SymbolContextList;
 class SymbolFile;
-class SymbolVendor;
 class Symtab;
 class Target;
 class TypeList;
@@ -67,8 +66,8 @@
 /// accessors are called. For example the object file (ObjectFile)
 /// representation will only be parsed if the object file is requested using
 /// the Module::GetObjectFile() is called. The debug symbols will only be
-/// parsed if the symbol vendor (SymbolVendor) is requested using the
-/// Module::GetSymbolVendor() is called.
+/// parsed if the symbol file (SymbolFile) is requested using the
+/// Module::GetSymbolFile() method.
 ///
 /// The module will parse more detailed information as more queries are made.
 class Module : public std::enable_shared_from_this<Module>,
@@ -191,7 +190,7 @@
   lldb::ModuleSP CalculateSymbolContextModule() override;
 
   void
-  GetDescription(Stream *s,
+  GetDescription(llvm::raw_ostream &s,
                  lldb::DescriptionLevel level = lldb::eDescriptionLevelFull);
 
   /// Get the module path and object name.
@@ -247,13 +246,13 @@
       ConstString name,
       lldb::SymbolType symbol_type = lldb::eSymbolTypeAny);
 
-  size_t FindSymbolsWithNameAndType(ConstString name,
-                                    lldb::SymbolType symbol_type,
-                                    SymbolContextList &sc_list);
+  void FindSymbolsWithNameAndType(ConstString name,
+                                  lldb::SymbolType symbol_type,
+                                  SymbolContextList &sc_list);
 
-  size_t FindSymbolsMatchingRegExAndType(const RegularExpression &regex,
-                                         lldb::SymbolType symbol_type,
-                                         SymbolContextList &sc_list);
+  void FindSymbolsMatchingRegExAndType(const RegularExpression &regex,
+                                       lldb::SymbolType symbol_type,
+                                       SymbolContextList &sc_list);
 
   /// Find a function symbols in the object file's symbol table.
   ///
@@ -267,11 +266,8 @@
   ///
   /// \param[out] sc_list
   ///     A list to append any matching symbol contexts to.
-  ///
-  /// \return
-  ///     The number of symbol contexts that were added to \a sc_list
-  size_t FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
-                             SymbolContextList &sc_list);
+  void FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
+                           SymbolContextList &sc_list);
 
   /// Find compile units by partial or full path.
   ///
@@ -281,19 +277,10 @@
   /// \param[in] path
   ///     The name of the function we are looking for.
   ///
-  /// \param[in] append
-  ///     If \b true, then append any compile units that were found
-  ///     to \a sc_list. If \b false, then the \a sc_list is cleared
-  ///     and the contents of \a sc_list are replaced.
-  ///
   /// \param[out] sc_list
   ///     A symbol context list that gets filled in with all of the
   ///     matches.
-  ///
-  /// \return
-  ///     The number of matches added to \a sc_list.
-  size_t FindCompileUnits(const FileSpec &path, bool append,
-                          SymbolContextList &sc_list);
+  void FindCompileUnits(const FileSpec &path, SymbolContextList &sc_list);
 
   /// Find functions by name.
   ///
@@ -304,30 +291,19 @@
   /// \param[in] name
   ///     The name of the compile unit we are looking for.
   ///
-  /// \param[in] namespace_decl
-  ///     If valid, a namespace to search in.
-  ///
   /// \param[in] name_type_mask
   ///     A bit mask of bits that indicate what kind of names should
   ///     be used when doing the lookup. Bits include fully qualified
   ///     names, base names, C++ methods, or ObjC selectors.
   ///     See FunctionNameType for more details.
   ///
-  /// \param[in] append
-  ///     If \b true, any matches will be appended to \a sc_list, else
-  ///     matches replace the contents of \a sc_list.
-  ///
   /// \param[out] sc_list
   ///     A symbol context list that gets filled in with all of the
   ///     matches.
-  ///
-  /// \return
-  ///     The number of matches added to \a sc_list.
-  size_t FindFunctions(ConstString name,
-                       const CompilerDeclContext *parent_decl_ctx,
-                       lldb::FunctionNameType name_type_mask, bool symbols_ok,
-                       bool inlines_ok, bool append,
-                       SymbolContextList &sc_list);
+  void FindFunctions(ConstString name,
+                     const CompilerDeclContext *parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask, bool symbols_ok,
+                     bool inlines_ok, SymbolContextList &sc_list);
 
   /// Find functions by name.
   ///
@@ -338,19 +314,11 @@
   /// \param[in] regex
   ///     A regular expression to use when matching the name.
   ///
-  /// \param[in] append
-  ///     If \b true, any matches will be appended to \a sc_list, else
-  ///     matches replace the contents of \a sc_list.
-  ///
   /// \param[out] sc_list
   ///     A symbol context list that gets filled in with all of the
   ///     matches.
-  ///
-  /// \return
-  ///     The number of matches added to \a sc_list.
-  size_t FindFunctions(const RegularExpression &regex, bool symbols_ok,
-                       bool inlines_ok, bool append,
-                       SymbolContextList &sc_list);
+  void FindFunctions(const RegularExpression &regex, bool symbols_ok,
+                     bool inlines_ok, SymbolContextList &sc_list);
 
   /// Find addresses by file/line
   ///
@@ -395,11 +363,9 @@
   /// \param[in] variable_list
   ///     A list of variables that gets the matches appended to.
   ///
-  /// \return
-  ///     The number of matches added to \a variable_list.
-  size_t FindGlobalVariables(ConstString name,
-                             const CompilerDeclContext *parent_decl_ctx,
-                             size_t max_matches, VariableList &variable_list);
+  void FindGlobalVariables(ConstString name,
+                           const CompilerDeclContext *parent_decl_ctx,
+                           size_t max_matches, VariableList &variable_list);
 
   /// Find global and static variables by regular expression.
   ///
@@ -413,17 +379,14 @@
   /// \param[in] variable_list
   ///     A list of variables that gets the matches appended to.
   ///
-  /// \return
-  ///     The number of matches added to \a variable_list.
-  size_t FindGlobalVariables(const RegularExpression &regex, size_t max_matches,
-                             VariableList &variable_list);
+  void FindGlobalVariables(const RegularExpression &regex, size_t max_matches,
+                           VariableList &variable_list);
 
   /// Find types by name.
   ///
-  /// Type lookups in modules go through the SymbolVendor (which will use one
-  /// or more SymbolFile subclasses). The SymbolFile needs to be able to
-  /// lookup types by basename and not the fully qualified typename. This
-  /// allows the type accelerator tables to stay small, even with heavily
+  /// Type lookups in modules go through the SymbolFile. The SymbolFile needs to
+  /// be able to lookup types by basename and not the fully qualified typename.
+  /// This allows the type accelerator tables to stay small, even with heavily
   /// templatized C++. The type search will then narrow down the search
   /// results. If "exact_match" is true, then the type search will only match
   /// exact type name matches. If "exact_match" is false, the type will match
@@ -446,16 +409,26 @@
   ///     omitted to make finding types that a user may type
   ///     easier.
   ///
-  /// \param[out] type_list
+  /// \param[out] types
   ///     A type list gets populated with any matches.
   ///
-  /// \return
-  ///     The number of matches added to \a type_list.
-  size_t
+  void
   FindTypes(ConstString type_name, bool exact_match, size_t max_matches,
             llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
             TypeList &types);
 
+  /// Find types by name.
+  ///
+  /// This behaves like the other FindTypes method but allows to
+  /// specify a DeclContext and a language for the type being searched
+  /// for.
+  ///
+  /// \param searched_symbol_files
+  ///     Prevents one file from being visited multiple times.
+  void FindTypes(llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+                 llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
+                 TypeMap &types);
+
   lldb::TypeSP FindFirstType(const SymbolContext &sc,
                              ConstString type_name, bool exact_match);
 
@@ -467,17 +440,11 @@
   ///     The name of a type within a namespace that should not include
   ///     any qualifying namespaces (just a type basename).
   ///
-  /// \param[in] namespace_decl
-  ///     The namespace declaration that this type must exist in.
-  ///
   /// \param[out] type_list
   ///     A type list gets populated with any matches.
-  ///
-  /// \return
-  ///     The number of matches added to \a type_list.
-  size_t FindTypesInNamespace(ConstString type_name,
-                              const CompilerDeclContext *parent_decl_ctx,
-                              size_t max_matches, TypeList &type_list);
+  void FindTypesInNamespace(ConstString type_name,
+                            const CompilerDeclContext *parent_decl_ctx,
+                            size_t max_matches, TypeList &type_list);
 
   /// Get const accessor for the module architecture.
   ///
@@ -638,27 +605,19 @@
   ObjectFile *GetMemoryObjectFile(const lldb::ProcessSP &process_sp,
                                   lldb::addr_t header_addr, Status &error,
                                   size_t size_to_read = 512);
-  /// Get the symbol vendor interface for the current architecture.
-  ///
-  /// If the symbol vendor file has not been located yet, this function will
-  /// find the best SymbolVendor plug-in that can use the current object file.
-  ///
-  /// \return
-  ///     If this module does not have a valid object file, or no
-  ///     plug-in can be found that can use the object file, nullptr will
-  ///     be returned, else a valid symbol vendor plug-in interface
-  ///     will be returned. The returned pointer is owned by this
-  ///     object and remains valid as long as the object is around.
-  virtual SymbolVendor *
-  GetSymbolVendor(bool can_create = true,
-                  lldb_private::Stream *feedback_strm = nullptr);
 
-  /// Get accessor the type list for this module.
+  /// Get the module's symbol file
   ///
-  /// \return
-  ///     A valid type list pointer, or nullptr if there is no valid
-  ///     symbol vendor for this module.
-  TypeList *GetTypeList();
+  /// If the symbol file has already been loaded, this function returns it. All
+  /// arguments are ignored. If the symbol file has not been located yet, and
+  /// the can_create argument is false, the function returns nullptr. If
+  /// can_create is true, this function will find the best SymbolFile plug-in
+  /// that can use the current object file. feedback_strm, if not null, is used
+  /// to report the details of the search process.
+  virtual SymbolFile *GetSymbolFile(bool can_create = true,
+                                    Stream *feedback_strm = nullptr);
+
+  Symtab *GetSymtab();
 
   /// Get a reference to the UUID value contained in this object.
   ///
@@ -819,7 +778,8 @@
 
   bool GetIsDynamicLinkEditor();
 
-  TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language);
+  llvm::Expected<TypeSystem &>
+  GetTypeSystemForLanguage(lldb::LanguageType language);
 
   // Special error functions that can do printf style formatting that will
   // prepend the message with something appropriate for this module (like the
@@ -848,7 +808,7 @@
   // when the module first gets created.
   bool FileHasChanged() const;
 
-  // SymbolVendor, SymbolFile and ObjectFile member objects should lock the
+  // SymbolFile and ObjectFile member objects should lock the
   // module mutex to avoid deadlocks.
   std::recursive_mutex &GetMutex() const { return m_mutex; }
 
@@ -896,16 +856,19 @@
   bool RemapSourceFile(llvm::StringRef path, std::string &new_path) const;
   bool RemapSourceFile(const char *, std::string &) const = delete;
 
+  /// Update the ArchSpec to a more specific variant.
+  bool MergeArchitecture(const ArchSpec &arch_spec);
+
   /// \class LookupInfo Module.h "lldb/Core/Module.h"
   /// A class that encapsulates name lookup information.
   ///
   /// Users can type a wide variety of partial names when setting breakpoints
-  /// by name or when looking for functions by name. SymbolVendor and
-  /// SymbolFile objects are only required to implement name lookup for
-  /// function basenames and for fully mangled names. This means if the user
-  /// types in a partial name, we must reduce this to a name lookup that will
-  /// work with all SymbolFile objects. So we might reduce a name lookup to
-  /// look for a basename, and then prune out any results that don't match.
+  /// by name or when looking for functions by name. The SymbolFile object is
+  /// only required to implement name lookup for function basenames and for
+  /// fully mangled names. This means if the user types in a partial name, we
+  /// must reduce this to a name lookup that will work with all SymbolFile
+  /// objects. So we might reduce a name lookup to look for a basename, and then
+  /// prune out any results that don't match.
   ///
   /// The "m_name" member variable represents the name as it was typed by the
   /// user. "m_lookup_name" will be the name we actually search for through
@@ -1012,7 +975,7 @@
                                      /// ObjectFile instances for the debug info
 
   std::atomic<bool> m_did_load_objfile{false};
-  std::atomic<bool> m_did_load_symbol_vendor{false};
+  std::atomic<bool> m_did_load_symfile{false};
   std::atomic<bool> m_did_set_uuid{false};
   mutable bool m_file_has_changed : 1,
       m_first_file_changed_log : 1; /// See if the module was modified after it
@@ -1072,9 +1035,9 @@
 private:
   Module(); // Only used internally by CreateJITModule ()
 
-  size_t FindTypes_Impl(
+  void FindTypes_Impl(
       ConstString name, const CompilerDeclContext *parent_decl_ctx,
-      bool append, size_t max_matches,
+      size_t max_matches,
       llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
       TypeMap &types);
 
diff --git a/src/llvm-project/lldb/include/lldb/Core/ModuleChild.h b/src/llvm-project/lldb/include/lldb/Core/ModuleChild.h
index 8a81c1a..0d59e4f 100644
--- a/src/llvm-project/lldb/include/lldb/Core/ModuleChild.h
+++ b/src/llvm-project/lldb/include/lldb/Core/ModuleChild.h
@@ -20,7 +20,7 @@
 public:
   /// Construct with owning module.
   ///
-  /// \param[in] module
+  /// \param[in] module_sp
   ///     The module that owns the object that inherits from this
   ///     class.
   ModuleChild(const lldb::ModuleSP &module_sp);
@@ -46,15 +46,14 @@
 
   /// Set accessor for the module pointer.
   ///
-  /// \param[in] module
+  /// \param[in] module_sp
   ///     A new module that owns the object that inherits from this
-  ///      class.
+  ///     class.
   void SetModule(const lldb::ModuleSP &module_sp);
 
 protected:
-  // Member variables
-  lldb::ModuleWP m_module_wp; ///< The Module that owns the object that inherits
-                              ///< from this class.
+  /// The Module that owns the object that inherits from this class.
+  lldb::ModuleWP m_module_wp;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Core/ModuleList.h b/src/llvm-project/lldb/include/lldb/Core/ModuleList.h
index 1e26c35..a6e80ed 100644
--- a/src/llvm-project/lldb/include/lldb/Core/ModuleList.h
+++ b/src/llvm-project/lldb/include/lldb/Core/ModuleList.h
@@ -53,7 +53,7 @@
   bool SetClangModulesCachePath(llvm::StringRef path);
   bool GetEnableExternalLookup() const;
   bool SetEnableExternalLookup(bool new_value);
-}; 
+};
 
 /// \class ModuleList ModuleList.h "lldb/Core/ModuleList.h"
 /// A collection class for Module objects.
@@ -116,10 +116,10 @@
   ///     If true, and a notifier function is set, the notifier function
   ///     will be called.  Defaults to true.
   ///
-  ///     When this ModuleList is the Target's ModuleList, the notifier 
-  ///     function is Target::ModulesDidLoad -- the call to 
-  ///     ModulesDidLoad may be deferred when adding multiple Modules 
-  ///     to the Target, but it must be called at the end, 
+  ///     When this ModuleList is the Target's ModuleList, the notifier
+  ///     function is Target::ModulesDidLoad -- the call to
+  ///     ModulesDidLoad may be deferred when adding multiple Modules
+  ///     to the Target, but it must be called at the end,
   ///     before resuming execution.
   void Append(const lldb::ModuleSP &module_sp, bool notify = true);
 
@@ -135,16 +135,14 @@
 
   /// Append a module to the module list, if it is not already there.
   ///
-  /// \param[in] module_sp
-  ///
   /// \param[in] notify
   ///     If true, and a notifier function is set, the notifier function
   ///     will be called.  Defaults to true.
   ///
-  ///     When this ModuleList is the Target's ModuleList, the notifier 
-  ///     function is Target::ModulesDidLoad -- the call to 
-  ///     ModulesDidLoad may be deferred when adding multiple Modules 
-  ///     to the Target, but it must be called at the end, 
+  ///     When this ModuleList is the Target's ModuleList, the notifier
+  ///     function is Target::ModulesDidLoad -- the call to
+  ///     ModulesDidLoad may be deferred when adding multiple Modules
+  ///     to the Target, but it must be called at the end,
   ///     before resuming execution.
   bool AppendIfNeeded(const lldb::ModuleSP &module_sp, bool notify = true);
 
@@ -247,35 +245,24 @@
   /// \param[in] path
   ///     The name of the compile unit we are looking for.
   ///
-  /// \param[in] append
-  ///     If \b true, then append any compile units that were found
-  ///     to \a sc_list. If \b false, then the \a sc_list is cleared
-  ///     and the contents of \a sc_list are replaced.
-  ///
   /// \param[out] sc_list
   ///     A symbol context list that gets filled in with all of the
   ///     matches.
-  ///
-  /// \return
-  ///     The number of matches added to \a sc_list.
-  size_t FindCompileUnits(const FileSpec &path, bool append,
-                          SymbolContextList &sc_list) const;
+  void FindCompileUnits(const FileSpec &path, SymbolContextList &sc_list) const;
 
   /// \see Module::FindFunctions ()
-  size_t FindFunctions(ConstString name,
-                       lldb::FunctionNameType name_type_mask,
-                       bool include_symbols, bool include_inlines, bool append,
-                       SymbolContextList &sc_list) const;
+  void FindFunctions(ConstString name, lldb::FunctionNameType name_type_mask,
+                     bool include_symbols, bool include_inlines,
+                     SymbolContextList &sc_list) const;
 
   /// \see Module::FindFunctionSymbols ()
-  size_t FindFunctionSymbols(ConstString name,
-                             lldb::FunctionNameType name_type_mask,
-                             SymbolContextList &sc_list);
+  void FindFunctionSymbols(ConstString name,
+                           lldb::FunctionNameType name_type_mask,
+                           SymbolContextList &sc_list);
 
   /// \see Module::FindFunctions ()
-  size_t FindFunctions(const RegularExpression &name, bool include_symbols,
-                       bool include_inlines, bool append,
-                       SymbolContextList &sc_list);
+  void FindFunctions(const RegularExpression &name, bool include_symbols,
+                     bool include_inlines, SymbolContextList &sc_list);
 
   /// Find global and static variables by name.
   ///
@@ -289,11 +276,8 @@
   ///
   /// \param[in] variable_list
   ///     A list of variables that gets the matches appended to.
-  ///
-  /// \return
-  ///     The number of matches added to \a variable_list.
-  size_t FindGlobalVariables(ConstString name, size_t max_matches,
-                             VariableList &variable_list) const;
+  void FindGlobalVariables(ConstString name, size_t max_matches,
+                           VariableList &variable_list) const;
 
   /// Find global and static variables by regular expression.
   ///
@@ -306,15 +290,12 @@
   ///
   /// \param[in] variable_list
   ///     A list of variables that gets the matches appended to.
-  ///
-  /// \return
-  ///     The number of matches added to \a variable_list.
-  size_t FindGlobalVariables(const RegularExpression &regex, size_t max_matches,
-                             VariableList &variable_list) const;
+  void FindGlobalVariables(const RegularExpression &regex, size_t max_matches,
+                           VariableList &variable_list) const;
 
   /// Finds the first module whose file specification matches \a file_spec.
   ///
-  /// \param[in] file_spec_ptr
+  /// \param[in] module_spec
   ///     A file specification object to match against the Module's
   ///     file specifications. If \a file_spec does not have
   ///     directory information, matches will occur by matching only
@@ -322,26 +303,11 @@
   ///     NULL, then file specifications won't be compared when
   ///     searching for matching modules.
   ///
-  /// \param[in] arch_ptr
-  ///     The architecture to search for if non-NULL. If this value
-  ///     is NULL no architecture matching will be performed.
-  ///
-  /// \param[in] uuid_ptr
-  ///     The uuid to search for if non-NULL. If this value is NULL
-  ///     no uuid matching will be performed.
-  ///
-  /// \param[in] object_name
-  ///     An optional object name that must match as well. This value
-  ///     can be NULL.
-  ///
   /// \param[out] matching_module_list
   ///     A module list that gets filled in with any modules that
   ///     match the search criteria.
-  ///
-  /// \return
-  ///     The number of matching modules found by the search.
-  size_t FindModules(const ModuleSpec &module_spec,
-                     ModuleList &matching_module_list) const;
+  void FindModules(const ModuleSpec &module_spec,
+                   ModuleList &matching_module_list) const;
 
   lldb::ModuleSP FindModule(const Module *module_ptr) const;
 
@@ -354,15 +320,13 @@
 
   lldb::ModuleSP FindFirstModule(const ModuleSpec &module_spec) const;
 
-  size_t FindSymbolsWithNameAndType(ConstString name,
-                                    lldb::SymbolType symbol_type,
-                                    SymbolContextList &sc_list,
-                                    bool append = false) const;
+  void FindSymbolsWithNameAndType(ConstString name,
+                                  lldb::SymbolType symbol_type,
+                                  SymbolContextList &sc_list) const;
 
-  size_t FindSymbolsMatchingRegExAndType(const RegularExpression &regex,
-                                         lldb::SymbolType symbol_type,
-                                         SymbolContextList &sc_list,
-                                         bool append = false) const;
+  void FindSymbolsMatchingRegExAndType(const RegularExpression &regex,
+                                       lldb::SymbolType symbol_type,
+                                       SymbolContextList &sc_list) const;
 
   /// Find types by name.
   ///
@@ -373,32 +337,17 @@
   /// \param[in] name
   ///     The name of the type we are looking for.
   ///
-  /// \param[in] append
-  ///     If \b true, any matches will be appended to \a
-  ///     variable_list, else matches replace the contents of
-  ///     \a variable_list.
-  ///
   /// \param[in] max_matches
   ///     Allow the number of matches to be limited to \a
   ///     max_matches. Specify UINT32_MAX to get all possible matches.
   ///
-  /// \param[in] encoding
-  ///     Limit the search to specific types, or get all types if
-  ///     set to Type::invalid.
-  ///
-  /// \param[in] udt_name
-  ///     If the encoding is a user defined type, specify the name
-  ///     of the user defined type ("struct", "union", "class", etc).
-  ///
-  /// \param[out] type_list
+  /// \param[out] types
   ///     A type list gets populated with any matches.
   ///
-  /// \return
-  ///     The number of matches added to \a type_list.
-  size_t FindTypes(Module *search_first, ConstString name,
-                   bool name_is_fully_qualified, size_t max_matches,
-                   llvm::DenseSet<SymbolFile *> &searched_symbol_files,
-                   TypeList &types) const;
+  void FindTypes(Module *search_first, ConstString name,
+                 bool name_is_fully_qualified, size_t max_matches,
+                 llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+                 TypeList &types) const;
 
   bool FindSourceFile(const FileSpec &orig_spec, FileSpec &new_spec) const;
 
@@ -438,10 +387,10 @@
   ///     If true, and a notifier function is set, the notifier function
   ///     will be called.  Defaults to true.
   ///
-  ///     When this ModuleList is the Target's ModuleList, the notifier 
-  ///     function is Target::ModulesDidUnload -- the call to 
-  ///     ModulesDidUnload may be deferred when removing multiple Modules 
-  ///     from the Target, but it must be called at the end, 
+  ///     When this ModuleList is the Target's ModuleList, the notifier
+  ///     function is Target::ModulesDidUnload -- the call to
+  ///     ModulesDidUnload may be deferred when removing multiple Modules
+  ///     from the Target, but it must be called at the end,
   ///     before resuming execution.
   bool Remove(const lldb::ModuleSP &module_sp, bool notify = true);
 
@@ -476,6 +425,7 @@
   /// \return
   ///     The number of modules in the module list.
   size_t GetSize() const;
+  bool IsEmpty() const { return !GetSize(); }
 
   bool LoadScriptingResourcesInTarget(Target *target, std::list<Status> &errors,
                                       Stream *feedback_stream = nullptr,
@@ -494,13 +444,13 @@
 
   static bool RemoveSharedModule(lldb::ModuleSP &module_sp);
 
-  static size_t FindSharedModules(const ModuleSpec &module_spec,
-                                  ModuleList &matching_module_list);
+  static void FindSharedModules(const ModuleSpec &module_spec,
+                                ModuleList &matching_module_list);
 
   static size_t RemoveOrphanSharedModules(bool mandatory);
 
   static bool RemoveSharedModuleIfOrphaned(const Module *module_ptr);
-  
+
   void ForEach(std::function<bool(const lldb::ModuleSP &module_sp)> const
                    &callback) const;
 
diff --git a/src/llvm-project/lldb/include/lldb/Core/ModuleSpec.h b/src/llvm-project/lldb/include/lldb/Core/ModuleSpec.h
index ab0f4e9..6d024fe 100644
--- a/src/llvm-project/lldb/include/lldb/Core/ModuleSpec.h
+++ b/src/llvm-project/lldb/include/lldb/Core/ModuleSpec.h
@@ -207,7 +207,7 @@
       if (dumped_something)
         strm.PutCString(", ");
       strm.Printf("arch = ");
-      m_arch.DumpTriple(strm);
+      m_arch.DumpTriple(strm.AsRawOstream());
       dumped_something = true;
     }
     if (m_uuid.IsValid()) {
@@ -251,24 +251,18 @@
     if (match_module_spec.GetObjectName() &&
         match_module_spec.GetObjectName() != GetObjectName())
       return false;
-    if (match_module_spec.GetFileSpecPtr()) {
-      const FileSpec &fspec = match_module_spec.GetFileSpec();
-      if (!FileSpec::Equal(fspec, GetFileSpec(),
-                           !fspec.GetDirectory().IsEmpty()))
-        return false;
-    }
-    if (GetPlatformFileSpec() && match_module_spec.GetPlatformFileSpecPtr()) {
-      const FileSpec &fspec = match_module_spec.GetPlatformFileSpec();
-      if (!FileSpec::Equal(fspec, GetPlatformFileSpec(),
-                           !fspec.GetDirectory().IsEmpty()))
-        return false;
+    if (!FileSpec::Match(match_module_spec.GetFileSpec(), GetFileSpec()))
+      return false;
+    if (GetPlatformFileSpec() &&
+        !FileSpec::Match(match_module_spec.GetPlatformFileSpec(),
+                         GetPlatformFileSpec())) {
+      return false;
     }
     // Only match the symbol file spec if there is one in this ModuleSpec
-    if (GetSymbolFileSpec() && match_module_spec.GetSymbolFileSpecPtr()) {
-      const FileSpec &fspec = match_module_spec.GetSymbolFileSpec();
-      if (!FileSpec::Equal(fspec, GetSymbolFileSpec(),
-                           !fspec.GetDirectory().IsEmpty()))
-        return false;
+    if (GetSymbolFileSpec() &&
+        !FileSpec::Match(match_module_spec.GetSymbolFileSpec(),
+                         GetSymbolFileSpec())) {
+      return false;
     }
     if (match_module_spec.GetArchitecturePtr()) {
       if (exact_arch_match) {
@@ -380,8 +374,8 @@
     return false;
   }
 
-  size_t FindMatchingModuleSpecs(const ModuleSpec &module_spec,
-                                 ModuleSpecList &matching_list) const {
+  void FindMatchingModuleSpecs(const ModuleSpec &module_spec,
+                               ModuleSpecList &matching_list) const {
     std::lock_guard<std::recursive_mutex> guard(m_mutex);
     bool exact_arch_match = true;
     const size_t initial_match_count = matching_list.GetSize();
@@ -400,7 +394,6 @@
           matching_list.Append(spec);
       }
     }
-    return matching_list.GetSize() - initial_match_count;
   }
 
   void Dump(Stream &strm) {
diff --git a/src/llvm-project/lldb/include/lldb/Core/PluginManager.h b/src/llvm-project/lldb/include/lldb/Core/PluginManager.h
index 1bac1e5..5b85975 100644
--- a/src/llvm-project/lldb/include/lldb/Core/PluginManager.h
+++ b/src/llvm-project/lldb/include/lldb/Core/PluginManager.h
@@ -10,6 +10,8 @@
 #define liblldb_PluginManager_h_
 
 #include "lldb/Core/Architecture.h"
+#include "lldb/Symbol/TypeSystem.h"
+#include "lldb/Utility/CompletionRequest.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Status.h"
 #include "lldb/lldb-enumerations.h"
@@ -228,8 +230,8 @@
 
   static const char *GetPlatformPluginDescriptionAtIndex(uint32_t idx);
 
-  static size_t AutoCompletePlatformName(llvm::StringRef partial_name,
-                                         StringList &matches);
+  static void AutoCompletePlatformName(llvm::StringRef partial_name,
+                                       CompletionRequest &request);
   // Process
   static bool
   RegisterPlugin(ConstString name, const char *description,
@@ -383,10 +385,10 @@
   GetInstrumentationRuntimeCreateCallbackForPluginName(ConstString name);
 
   // TypeSystem
-  static bool RegisterPlugin(
-      ConstString name, const char *description,
-      TypeSystemCreateInstance create_callback,
-      TypeSystemEnumerateSupportedLanguages enumerate_languages_callback);
+  static bool RegisterPlugin(ConstString name, const char *description,
+                             TypeSystemCreateInstance create_callback,
+                             LanguageSet supported_languages_for_types,
+                             LanguageSet supported_languages_for_expressions);
 
   static bool UnregisterPlugin(TypeSystemCreateInstance create_callback);
 
@@ -396,18 +398,14 @@
   static TypeSystemCreateInstance
   GetTypeSystemCreateCallbackForPluginName(ConstString name);
 
-  static TypeSystemEnumerateSupportedLanguages
-  GetTypeSystemEnumerateSupportedLanguagesCallbackAtIndex(uint32_t idx);
+  static LanguageSet GetAllTypeSystemSupportedLanguagesForTypes();
 
-  static TypeSystemEnumerateSupportedLanguages
-  GetTypeSystemEnumerateSupportedLanguagesCallbackForPluginName(
-      ConstString name);
+  static LanguageSet GetAllTypeSystemSupportedLanguagesForExpressions();
 
   // REPL
-  static bool
-  RegisterPlugin(ConstString name, const char *description,
-                 REPLCreateInstance create_callback,
-                 REPLEnumerateSupportedLanguages enumerate_languages_callback);
+  static bool RegisterPlugin(ConstString name, const char *description,
+                             REPLCreateInstance create_callback,
+                             LanguageSet supported_languages);
 
   static bool UnregisterPlugin(REPLCreateInstance create_callback);
 
@@ -416,12 +414,7 @@
   static REPLCreateInstance
   GetREPLCreateCallbackForPluginName(ConstString name);
 
-  static REPLEnumerateSupportedLanguages
-  GetREPLEnumerateSupportedLanguagesCallbackAtIndex(uint32_t idx);
-
-  static REPLEnumerateSupportedLanguages
-  GetREPLSystemEnumerateSupportedLanguagesCallbackForPluginName(
-      ConstString name);
+  static LanguageSet GetREPLAllTypeSystemSupportedLanguages();
 
   // Some plug-ins might register a DebuggerInitializeCallback callback when
   // registering the plug-in. After a new Debugger instance is created, this
@@ -439,32 +432,28 @@
       ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
-  GetSettingForPlatformPlugin(Debugger &debugger,
-                              ConstString setting_name);
+  GetSettingForPlatformPlugin(Debugger &debugger, ConstString setting_name);
 
   static bool CreateSettingForPlatformPlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
       ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
-  GetSettingForProcessPlugin(Debugger &debugger,
-                             ConstString setting_name);
+  GetSettingForProcessPlugin(Debugger &debugger, ConstString setting_name);
 
   static bool CreateSettingForProcessPlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
       ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
-  GetSettingForSymbolFilePlugin(Debugger &debugger,
-                                ConstString setting_name);
+  GetSettingForSymbolFilePlugin(Debugger &debugger, ConstString setting_name);
 
   static bool CreateSettingForSymbolFilePlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
       ConstString description, bool is_global_property);
 
   static lldb::OptionValuePropertiesSP
-  GetSettingForJITLoaderPlugin(Debugger &debugger,
-                               ConstString setting_name);
+  GetSettingForJITLoaderPlugin(Debugger &debugger, ConstString setting_name);
 
   static bool CreateSettingForJITLoaderPlugin(
       Debugger &debugger, const lldb::OptionValuePropertiesSP &properties_sp,
diff --git a/src/llvm-project/lldb/include/lldb/Core/PropertiesBase.td b/src/llvm-project/lldb/include/lldb/Core/PropertiesBase.td
new file mode 100644
index 0000000..6e95ceb
--- /dev/null
+++ b/src/llvm-project/lldb/include/lldb/Core/PropertiesBase.td
@@ -0,0 +1,51 @@
+// Base class for all options.
+class Property<string name, string type> {
+  string Name = name;
+  string Type = type;
+  string Definition;
+}
+
+// Sets the description for the property that should be displayed to the user.
+class Desc<string description> {
+  string Description = description;
+}
+
+// Marks the property as global.
+class Global {
+  bit Global = 1;
+}
+
+class DefaultTrue {
+  int DefaultUnsignedValue = 1;
+  bit HasDefaultUnsignedValue = 1;
+  bit HasDefaultBooleanValue = 1;
+}
+
+class DefaultFalse {
+  int DefaultUnsignedValue = 0;
+  bit HasDefaultUnsignedValue = 1;
+  bit HasDefaultBooleanValue = 1;
+}
+
+// Gives the property a default string value.
+class DefaultStringValue<string value> {
+  string DefaultStringValue = value;
+  bit HasDefaultStringValue = 1;
+}
+
+// Gives the property a default enum value.
+class DefaultEnumValue<string value> {
+  string DefaultEnumValue = value;
+  bit HasDefaultEnumValue = 1;
+}
+
+// Gives the property a default string value.
+class DefaultUnsignedValue<int value> {
+  int DefaultUnsignedValue = value;
+  bit HasDefaultUnsignedValue = 1;
+}
+
+// Gives the property enum values.
+class EnumValues<string enum> {
+  string EnumValues = enum;
+}
diff --git a/src/llvm-project/lldb/include/lldb/Core/STLUtils.h b/src/llvm-project/lldb/include/lldb/Core/STLUtils.h
deleted file mode 100644
index 830aca3..0000000
--- a/src/llvm-project/lldb/include/lldb/Core/STLUtils.h
+++ /dev/null
@@ -1,74 +0,0 @@
-//===-- STLUtils.h ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_STLUtils_h_
-#define liblldb_STLUtils_h_
-
-#include <string.h>
-
-#include <map>
-#include <ostream>
-#include <vector>
-
-
-// C string less than compare function object
-struct CStringCompareFunctionObject {
-  bool operator()(const char *s1, const char *s2) const {
-    return strcmp(s1, s2) < 0;
-  }
-};
-
-// C string equality function object (binary predicate).
-struct CStringEqualBinaryPredicate {
-  bool operator()(const char *s1, const char *s2) const {
-    return strcmp(s1, s2) == 0;
-  }
-};
-
-// Templated type for finding an entry in a std::map<F,S> whose value is equal
-// to something
-template <class F, class S> class ValueEquals {
-public:
-  ValueEquals(const S &val) : second_value(val) {}
-
-  // Compare the second item
-  bool operator()(std::pair<const F, S> elem) {
-    return elem.second == second_value;
-  }
-
-private:
-  S second_value;
-};
-
-template <class T>
-inline void PrintAllCollectionElements(std::ostream &s, const T &coll,
-                                       const char *header_cstr = nullptr,
-                                       const char *separator_cstr = " ") {
-  typename T::const_iterator pos;
-
-  if (header_cstr)
-    s << header_cstr;
-  for (pos = coll.begin(); pos != coll.end(); ++pos) {
-    s << *pos << separator_cstr;
-  }
-  s << std::endl;
-}
-
-// The function object below can be used to delete a STL container that
-// contains C++ object pointers.
-//
-// Usage: std::for_each(vector.begin(), vector.end(), for_each_delete());
-
-struct for_each_cplusplus_delete {
-  template <typename T> void operator()(T *ptr) { delete ptr; }
-};
-
-typedef std::vector<std::string> STLStringArray;
-typedef std::vector<const char *> CStringArray;
-
-#endif // liblldb_STLUtils_h_
diff --git a/src/llvm-project/lldb/include/lldb/Core/SearchFilter.h b/src/llvm-project/lldb/include/lldb/Core/SearchFilter.h
index f38690c..74c4f31 100644
--- a/src/llvm-project/lldb/include/lldb/Core/SearchFilter.h
+++ b/src/llvm-project/lldb/include/lldb/Core/SearchFilter.h
@@ -52,8 +52,8 @@
   virtual ~Searcher();
 
   virtual CallbackReturn SearchCallback(SearchFilter &filter,
-                                        SymbolContext &context, Address *addr,
-                                        bool complete) = 0;
+                                        SymbolContext &context,
+                                        Address *addr) = 0;
 
   virtual lldb::SearchDepth GetDepth() = 0;
 
@@ -84,7 +84,7 @@
 public:
   /// The basic constructor takes a Target, which gives the space to search.
   ///
-  /// \param[in] target
+  /// \param[in] target_sp
   ///    The Target that provides the module list to search.
   SearchFilter(const lldb::TargetSP &target_sp);
 
@@ -102,7 +102,7 @@
 
   /// Call this method with a Module to see if that module passes the filter.
   ///
-  /// \param[in] module
+  /// \param[in] module_sp
   ///    The Module to check against the filter.
   ///
   /// \return
@@ -306,7 +306,7 @@
   /// The basic constructor takes a Target, which gives the space to search,
   /// and the module to restrict the search to.
   ///
-  /// \param[in] target
+  /// \param[in] targetSP
   ///    The Target that provides the module list to search.
   ///
   /// \param[in] module
@@ -352,10 +352,10 @@
   /// The basic constructor takes a Target, which gives the space to search,
   /// and the module list to restrict the search to.
   ///
-  /// \param[in] target
+  /// \param[in] targetSP
   ///    The Target that provides the module list to search.
   ///
-  /// \param[in] module
+  /// \param[in] module_list
   ///    The Module that limits the search.
   SearchFilterByModuleList(const lldb::TargetSP &targetSP,
                            const FileSpecList &module_list);
@@ -366,8 +366,6 @@
 
   ~SearchFilterByModuleList() override;
 
-  SearchFilterByModuleList &operator=(const SearchFilterByModuleList &rhs);
-
   bool ModulePasses(const lldb::ModuleSP &module_sp) override;
 
   bool ModulePasses(const FileSpec &spec) override;
@@ -406,23 +404,12 @@
 public:
   /// The basic constructor takes a Target, which gives the space to search,
   /// and the module list to restrict the search to.
-  ///
-  /// \param[in] target
-  ///    The Target that provides the module list to search.
-  ///
-  /// \param[in] module
-  ///    The Module that limits the search.
   SearchFilterByModuleListAndCU(const lldb::TargetSP &targetSP,
                                 const FileSpecList &module_list,
                                 const FileSpecList &cu_list);
 
-  SearchFilterByModuleListAndCU(const SearchFilterByModuleListAndCU &rhs);
-
   ~SearchFilterByModuleListAndCU() override;
 
-  SearchFilterByModuleListAndCU &
-  operator=(const SearchFilterByModuleListAndCU &rhs);
-
   bool AddressPasses(Address &address) override;
 
   bool CompUnitPasses(FileSpec &fileSpec) override;
diff --git a/src/llvm-project/lldb/include/lldb/Core/Section.h b/src/llvm-project/lldb/include/lldb/Core/Section.h
index 881d437..509a076 100644
--- a/src/llvm-project/lldb/include/lldb/Core/Section.h
+++ b/src/llvm-project/lldb/include/lldb/Core/Section.h
@@ -43,9 +43,8 @@
   const_iterator begin() { return m_sections.begin(); }
   const_iterator end() { return m_sections.end(); }
 
-  SectionList();
-
-  ~SectionList();
+  /// Create an empty list.
+  SectionList() = default;
 
   SectionList &operator=(const SectionList &rhs);
 
diff --git a/src/llvm-project/lldb/include/lldb/Core/SourceManager.h b/src/llvm-project/lldb/include/lldb/Core/SourceManager.h
index bca8177..f1f56d0 100644
--- a/src/llvm-project/lldb/include/lldb/Core/SourceManager.h
+++ b/src/llvm-project/lldb/include/lldb/Core/SourceManager.h
@@ -54,8 +54,6 @@
 
     bool LineIsValid(uint32_t line);
 
-    bool FileSpecMatches(const FileSpec &file_spec);
-
     const FileSpec &GetFileSpec() { return m_file_spec; }
 
     uint32_t GetSourceMapModificationID() const { return m_source_map_mod_id; }
diff --git a/src/llvm-project/lldb/include/lldb/Core/StreamFile.h b/src/llvm-project/lldb/include/lldb/Core/StreamFile.h
index 54aeab1..bd7d6e8 100644
--- a/src/llvm-project/lldb/include/lldb/Core/StreamFile.h
+++ b/src/llvm-project/lldb/include/lldb/Core/StreamFile.h
@@ -21,32 +21,30 @@
 
 class StreamFile : public Stream {
 public:
-  // Constructors and Destructors
-  StreamFile();
-
   StreamFile(uint32_t flags, uint32_t addr_size, lldb::ByteOrder byte_order);
 
   StreamFile(int fd, bool transfer_ownership);
 
-  StreamFile(const char *path);
-
-  StreamFile(const char *path, uint32_t options,
+  StreamFile(const char *path, File::OpenOptions options,
              uint32_t permissions = lldb::eFilePermissionsFileDefault);
 
   StreamFile(FILE *fh, bool transfer_ownership);
 
+  StreamFile(std::shared_ptr<File> file) : m_file_sp(file) { assert(file); };
+
   ~StreamFile() override;
 
-  File &GetFile() { return m_file; }
+  File &GetFile() { return *m_file_sp; }
 
-  const File &GetFile() const { return m_file; }
+  const File &GetFile() const { return *m_file_sp; }
+
+  std::shared_ptr<File> GetFileSP() { return m_file_sp; }
 
   void Flush() override;
 
-
 protected:
   // Classes that inherit from StreamFile can see and modify these
-  File m_file;
+  std::shared_ptr<File> m_file_sp; // never NULL
   size_t WriteImpl(const void *s, size_t length) override;
 
 private:
diff --git a/src/llvm-project/lldb/include/lldb/Core/StructuredDataImpl.h b/src/llvm-project/lldb/include/lldb/Core/StructuredDataImpl.h
index 79a709a..c66e473 100644
--- a/src/llvm-project/lldb/include/lldb/Core/StructuredDataImpl.h
+++ b/src/llvm-project/lldb/include/lldb/Core/StructuredDataImpl.h
@@ -54,7 +54,8 @@
       return error;
     }
 
-    m_data_sp->Dump(stream);
+    llvm::json::OStream s(stream.AsRawOstream());
+    m_data_sp->Serialize(s);
     return error;
   }
 
diff --git a/src/llvm-project/lldb/include/lldb/Core/ThreadSafeDenseMap.h b/src/llvm-project/lldb/include/lldb/Core/ThreadSafeDenseMap.h
index c485b91..420cb57 100644
--- a/src/llvm-project/lldb/include/lldb/Core/ThreadSafeDenseMap.h
+++ b/src/llvm-project/lldb/include/lldb/Core/ThreadSafeDenseMap.h
@@ -62,4 +62,4 @@
 
 } // namespace lldb_private
 
-#endif // liblldb_ThreadSafeSTLMap_h_
+#endif // liblldb_ThreadSafeDenseMap_h_
diff --git a/src/llvm-project/lldb/include/lldb/Core/ThreadSafeSTLMap.h b/src/llvm-project/lldb/include/lldb/Core/ThreadSafeSTLMap.h
deleted file mode 100644
index df0208c..0000000
--- a/src/llvm-project/lldb/include/lldb/Core/ThreadSafeSTLMap.h
+++ /dev/null
@@ -1,128 +0,0 @@
-//===-- ThreadSafeSTLMap.h --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ThreadSafeSTLMap_h_
-#define liblldb_ThreadSafeSTLMap_h_
-
-#include <map>
-#include <mutex>
-
-#include "lldb/lldb-defines.h"
-
-namespace lldb_private {
-
-template <typename _Key, typename _Tp> class ThreadSafeSTLMap {
-public:
-  typedef std::map<_Key, _Tp> collection;
-  typedef typename collection::iterator iterator;
-  typedef typename collection::const_iterator const_iterator;
-  // Constructors and Destructors
-  ThreadSafeSTLMap() : m_collection(), m_mutex() {}
-
-  ~ThreadSafeSTLMap() {}
-
-  bool IsEmpty() const {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return m_collection.empty();
-  }
-
-  void Clear() {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return m_collection.clear();
-  }
-
-  size_t Erase(const _Key &key) {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return EraseNoLock(key);
-  }
-
-  size_t EraseNoLock(const _Key &key) { return m_collection.erase(key); }
-
-  bool GetValueForKey(const _Key &key, _Tp &value) const {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return GetValueForKeyNoLock(key, value);
-  }
-
-  // Call this if you have already manually locked the mutex using the
-  // GetMutex() accessor
-  bool GetValueForKeyNoLock(const _Key &key, _Tp &value) const {
-    const_iterator pos = m_collection.find(key);
-    if (pos != m_collection.end()) {
-      value = pos->second;
-      return true;
-    }
-    return false;
-  }
-
-  bool GetFirstKeyForValue(const _Tp &value, _Key &key) const {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return GetFirstKeyForValueNoLock(value, key);
-  }
-
-  bool GetFirstKeyForValueNoLock(const _Tp &value, _Key &key) const {
-    const_iterator pos, end = m_collection.end();
-    for (pos = m_collection.begin(); pos != end; ++pos) {
-      if (pos->second == value) {
-        key = pos->first;
-        return true;
-      }
-    }
-    return false;
-  }
-
-  bool LowerBound(const _Key &key, _Key &match_key, _Tp &match_value,
-                  bool decrement_if_not_equal) const {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return LowerBoundNoLock(key, match_key, match_value,
-                            decrement_if_not_equal);
-  }
-
-  bool LowerBoundNoLock(const _Key &key, _Key &match_key, _Tp &match_value,
-                        bool decrement_if_not_equal) const {
-    const_iterator pos = m_collection.lower_bound(key);
-    if (pos != m_collection.end()) {
-      match_key = pos->first;
-      if (decrement_if_not_equal && key != match_key &&
-          pos != m_collection.begin()) {
-        --pos;
-        match_key = pos->first;
-      }
-      match_value = pos->second;
-      return true;
-    }
-    return false;
-  }
-
-  iterator lower_bound_unsafe(const _Key &key) {
-    return m_collection.lower_bound(key);
-  }
-
-  void SetValueForKey(const _Key &key, const _Tp &value) {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    SetValueForKeyNoLock(key, value);
-  }
-
-  // Call this if you have already manually locked the mutex using the
-  // GetMutex() accessor
-  void SetValueForKeyNoLock(const _Key &key, const _Tp &value) {
-    m_collection[key] = value;
-  }
-
-  std::recursive_mutex &GetMutex() { return m_mutex; }
-
-private:
-  collection m_collection;
-  mutable std::recursive_mutex m_mutex;
-
-  // For ThreadSafeSTLMap only
-  DISALLOW_COPY_AND_ASSIGN(ThreadSafeSTLMap);
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_ThreadSafeSTLMap_h_
diff --git a/src/llvm-project/lldb/include/lldb/Core/ThreadSafeSTLVector.h b/src/llvm-project/lldb/include/lldb/Core/ThreadSafeSTLVector.h
deleted file mode 100644
index e1666a6..0000000
--- a/src/llvm-project/lldb/include/lldb/Core/ThreadSafeSTLVector.h
+++ /dev/null
@@ -1,72 +0,0 @@
-//===-- ThreadSafeSTLVector.h ------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ThreadSafeSTLVector_h_
-#define liblldb_ThreadSafeSTLVector_h_
-
-#include <mutex>
-#include <vector>
-
-#include "lldb/lldb-defines.h"
-
-namespace lldb_private {
-
-template <typename _Object> class ThreadSafeSTLVector {
-public:
-  typedef std::vector<_Object> collection;
-  typedef typename collection::iterator iterator;
-  typedef typename collection::const_iterator const_iterator;
-  // Constructors and Destructors
-  ThreadSafeSTLVector() : m_collection(), m_mutex() {}
-
-  ~ThreadSafeSTLVector() = default;
-
-  bool IsEmpty() const {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return m_collection.empty();
-  }
-
-  void Clear() {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return m_collection.clear();
-  }
-
-  size_t GetCount() {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return m_collection.size();
-  }
-
-  void AppendObject(_Object &object) {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    m_collection.push_back(object);
-  }
-
-  _Object GetObject(size_t index) {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    return m_collection.at(index);
-  }
-
-  void SetObject(size_t index, const _Object &object) {
-    std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    m_collection.at(index) = object;
-  }
-
-  std::recursive_mutex &GetMutex() { return m_mutex; }
-
-private:
-  collection m_collection;
-  mutable std::recursive_mutex m_mutex;
-
-  // For ThreadSafeSTLVector only
-  DISALLOW_COPY_AND_ASSIGN(ThreadSafeSTLVector);
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_ThreadSafeSTLVector_h_
diff --git a/src/llvm-project/lldb/include/lldb/Core/Value.h b/src/llvm-project/lldb/include/lldb/Core/Value.h
index b786e48..7b4cc3b 100644
--- a/src/llvm-project/lldb/include/lldb/Core/Value.h
+++ b/src/llvm-project/lldb/include/lldb/Core/Value.h
@@ -210,7 +210,6 @@
   uint64_t GetValueByteSize(Status *error_ptr, ExecutionContext *exe_ctx);
 
   Status GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data,
-                        uint32_t data_offset,
                         Module *module); // Can be nullptr
 
   static const char *GetValueTypeAsCString(ValueType context_type);
diff --git a/src/llvm-project/lldb/include/lldb/Core/ValueObject.h b/src/llvm-project/lldb/include/lldb/Core/ValueObject.h
index 0808b86..1b000e6 100644
--- a/src/llvm-project/lldb/include/lldb/Core/ValueObject.h
+++ b/src/llvm-project/lldb/include/lldb/Core/ValueObject.h
@@ -179,7 +179,6 @@
     eClearUserVisibleDataItemsLocation = 1u << 3,
     eClearUserVisibleDataItemsDescription = 1u << 4,
     eClearUserVisibleDataItemsSyntheticChildren = 1u << 5,
-    eClearUserVisibleDataItemsValidator = 1u << 6,
     eClearUserVisibleDataItemsAllStrings =
         eClearUserVisibleDataItemsValue | eClearUserVisibleDataItemsSummary |
         eClearUserVisibleDataItemsLocation |
@@ -510,8 +509,6 @@
                            std::string &destination,
                            const TypeSummaryOptions &options);
 
-  std::pair<TypeValidatorResult, std::string> GetValidationStatus();
-
   const char *GetObjectDescription();
 
   bool HasSpecialPrintableRepresentation(
@@ -711,16 +708,6 @@
     ClearUserVisibleData(eClearUserVisibleDataItemsSummary);
   }
 
-  lldb::TypeValidatorImplSP GetValidator() {
-    UpdateFormatsIfNeeded();
-    return m_type_validator_sp;
-  }
-
-  void SetValidator(lldb::TypeValidatorImplSP format) {
-    m_type_validator_sp = format;
-    ClearUserVisibleData(eClearUserVisibleDataItemsValidator);
-  }
-
   void SetValueFormat(lldb::TypeFormatImplSP format) {
     m_type_format_sp = format;
     ClearUserVisibleData(eClearUserVisibleDataItemsValue);
@@ -857,9 +844,6 @@
                                  // differs from the summary
   // in that the summary is consed up by us, the object_desc_string is builtin.
 
-  llvm::Optional<std::pair<TypeValidatorResult, std::string>>
-      m_validation_result;
-
   CompilerType m_override_type; // If the type of the value object should be
                                 // overridden, the type to impose.
 
@@ -888,7 +872,6 @@
   lldb::TypeSummaryImplSP m_type_summary_sp;
   lldb::TypeFormatImplSP m_type_format_sp;
   lldb::SyntheticChildrenSP m_synthetic_children_sp;
-  lldb::TypeValidatorImplSP m_type_validator_sp;
   ProcessModID m_user_id_of_forced_summary;
   AddressType m_address_type_of_ptr_or_ref_children;
 
@@ -985,6 +968,7 @@
 
 private:
   virtual CompilerType MaybeCalculateCompleteType();
+  void UpdateChildrenAddressType();
 
   lldb::ValueObjectSP GetValueForExpressionPath_Impl(
       llvm::StringRef expression_cstr,
diff --git a/src/llvm-project/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h b/src/llvm-project/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
index 3b14a3e..ec39509 100644
--- a/src/llvm-project/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
+++ b/src/llvm-project/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h
@@ -9,8 +9,6 @@
 #ifndef liblldb_ValueObjectSyntheticFilter_h_
 #define liblldb_ValueObjectSyntheticFilter_h_
 
-#include "lldb/Core/ThreadSafeSTLMap.h"
-#include "lldb/Core/ThreadSafeSTLVector.h"
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/ConstString.h"
@@ -135,19 +133,24 @@
   lldb::SyntheticChildrenSP m_synth_sp;
   std::unique_ptr<SyntheticChildrenFrontEnd> m_synth_filter_up;
 
-  typedef ThreadSafeSTLMap<uint32_t, ValueObject *> ByIndexMap;
-  typedef ThreadSafeSTLMap<const char *, uint32_t> NameToIndexMap;
-  typedef ThreadSafeSTLVector<lldb::ValueObjectSP> SyntheticChildrenCache;
+  typedef std::map<uint32_t, ValueObject *> ByIndexMap;
+  typedef std::map<const char *, uint32_t> NameToIndexMap;
+  typedef std::vector<lldb::ValueObjectSP> SyntheticChildrenCache;
 
   typedef ByIndexMap::iterator ByIndexIterator;
   typedef NameToIndexMap::iterator NameToIndexIterator;
 
+  std::mutex m_child_mutex;
+  /// Guarded by m_child_mutex;
   ByIndexMap m_children_byindex;
+  /// Guarded by m_child_mutex;
   NameToIndexMap m_name_toindex;
+  /// Guarded by m_child_mutex;
+  SyntheticChildrenCache m_synthetic_children_cache;
+
   uint32_t m_synthetic_children_count; // FIXME use the ValueObject's
                                        // ChildrenManager instead of a special
                                        // purpose solution
-  SyntheticChildrenCache m_synthetic_children_cache;
 
   ConstString m_parent_type_name;
 
diff --git a/src/llvm-project/lldb/include/lldb/Core/dwarf.h b/src/llvm-project/lldb/include/lldb/Core/dwarf.h
index afe62e0..832109e 100644
--- a/src/llvm-project/lldb/include/lldb/Core/dwarf.h
+++ b/src/llvm-project/lldb/include/lldb/Core/dwarf.h
@@ -22,7 +22,7 @@
 typedef int32_t dw_sleb128_t;
 typedef uint16_t dw_attr_t;
 typedef uint16_t dw_form_t;
-typedef uint16_t dw_tag_t;
+typedef llvm::dwarf::Tag dw_tag_t;
 typedef uint64_t dw_addr_t; // Dwarf address define that must be big enough for
                             // any addresses in the compile units that get
                             // parsed
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/DataVisualization.h b/src/llvm-project/lldb/include/lldb/DataFormatters/DataVisualization.h
index cdb2eab..f5c3487 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/DataVisualization.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/DataVisualization.h
@@ -51,12 +51,6 @@
   static lldb::SyntheticChildrenSP
   GetSyntheticChildren(ValueObject &valobj, lldb::DynamicValueType use_dynamic);
 
-  static lldb::TypeValidatorImplSP
-  GetValidator(ValueObject &valobj, lldb::DynamicValueType use_dynamic);
-
-  static lldb::TypeValidatorImplSP
-  GetValidatorForType(lldb::TypeNameSpecifierImplSP type_sp);
-
   static bool
   AnyMatches(ConstString type_name,
              TypeCategoryImpl::FormatCategoryItems items =
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/FormatCache.h b/src/llvm-project/lldb/include/lldb/DataFormatters/FormatCache.h
index 7a6774b..f9dbe41 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/FormatCache.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/FormatCache.h
@@ -24,45 +24,26 @@
     bool m_format_cached : 1;
     bool m_summary_cached : 1;
     bool m_synthetic_cached : 1;
-    bool m_validator_cached : 1;
 
     lldb::TypeFormatImplSP m_format_sp;
     lldb::TypeSummaryImplSP m_summary_sp;
     lldb::SyntheticChildrenSP m_synthetic_sp;
-    lldb::TypeValidatorImplSP m_validator_sp;
 
   public:
     Entry();
-    Entry(lldb::TypeFormatImplSP);
-    Entry(lldb::TypeSummaryImplSP);
-    Entry(lldb::SyntheticChildrenSP);
-    Entry(lldb::TypeValidatorImplSP);
-    Entry(lldb::TypeFormatImplSP, lldb::TypeSummaryImplSP,
-          lldb::SyntheticChildrenSP, lldb::TypeValidatorImplSP);
 
+    template<typename ImplSP> bool IsCached();
     bool IsFormatCached();
-
     bool IsSummaryCached();
-
     bool IsSyntheticCached();
 
-    bool IsValidatorCached();
+    void Get(lldb::TypeFormatImplSP &);
+    void Get(lldb::TypeSummaryImplSP &);
+    void Get(lldb::SyntheticChildrenSP &);
 
-    lldb::TypeFormatImplSP GetFormat();
-
-    lldb::TypeSummaryImplSP GetSummary();
-
-    lldb::SyntheticChildrenSP GetSynthetic();
-
-    lldb::TypeValidatorImplSP GetValidator();
-
-    void SetFormat(lldb::TypeFormatImplSP);
-
-    void SetSummary(lldb::TypeSummaryImplSP);
-
-    void SetSynthetic(lldb::SyntheticChildrenSP);
-
-    void SetValidator(lldb::TypeValidatorImplSP);
+    void Set(lldb::TypeFormatImplSP);
+    void Set(lldb::TypeSummaryImplSP);
+    void Set(lldb::SyntheticChildrenSP);
   };
   typedef std::map<ConstString, Entry> CacheMap;
   CacheMap m_map;
@@ -76,25 +57,10 @@
 public:
   FormatCache();
 
-  bool GetFormat(ConstString type, lldb::TypeFormatImplSP &format_sp);
-
-  bool GetSummary(ConstString type, lldb::TypeSummaryImplSP &summary_sp);
-
-  bool GetSynthetic(ConstString type,
-                    lldb::SyntheticChildrenSP &synthetic_sp);
-
-  bool GetValidator(ConstString type,
-                    lldb::TypeValidatorImplSP &summary_sp);
-
-  void SetFormat(ConstString type, lldb::TypeFormatImplSP &format_sp);
-
-  void SetSummary(ConstString type, lldb::TypeSummaryImplSP &summary_sp);
-
-  void SetSynthetic(ConstString type,
-                    lldb::SyntheticChildrenSP &synthetic_sp);
-
-  void SetValidator(ConstString type,
-                    lldb::TypeValidatorImplSP &synthetic_sp);
+  template <typename ImplSP> bool Get(ConstString type, ImplSP &format_impl_sp);
+  void Set(ConstString type, lldb::TypeFormatImplSP &format_sp);
+  void Set(ConstString type, lldb::TypeSummaryImplSP &summary_sp);
+  void Set(ConstString type, lldb::SyntheticChildrenSP &synthetic_sp);
 
   void Clear();
 
@@ -102,6 +68,7 @@
 
   uint64_t GetCacheMisses() { return m_cache_misses; }
 };
+
 } // namespace lldb_private
 
 #endif // lldb_FormatCache_h_
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/FormatClasses.h b/src/llvm-project/lldb/include/lldb/DataFormatters/FormatClasses.h
index 5144bc6..91ce444 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/FormatClasses.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/FormatClasses.h
@@ -17,7 +17,6 @@
 #include "lldb/DataFormatters/TypeFormat.h"
 #include "lldb/DataFormatters/TypeSummary.h"
 #include "lldb/DataFormatters/TypeSynthetic.h"
-#include "lldb/DataFormatters/TypeValidator.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Symbol/Type.h"
 #include "lldb/lldb-enumerations.h"
@@ -40,7 +39,6 @@
   typedef HardcodedFormatterFinders<TypeFormatImpl> HardcodedFormatFinder;
   typedef HardcodedFormatterFinders<TypeSummaryImpl> HardcodedSummaryFinder;
   typedef HardcodedFormatterFinders<SyntheticChildren> HardcodedSyntheticFinder;
-  typedef HardcodedFormatterFinders<TypeValidatorImpl> HardcodedValidatorFinder;
 };
 
 class FormattersMatchCandidate {
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/FormatManager.h b/src/llvm-project/lldb/include/lldb/DataFormatters/FormatManager.h
index afaafda..dd522c4 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/FormatManager.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/FormatManager.h
@@ -52,24 +52,15 @@
   void
   EnableCategory(ConstString category_name,
                  TypeCategoryMap::Position pos = TypeCategoryMap::Default) {
-    EnableCategory(category_name, pos,
-                   std::initializer_list<lldb::LanguageType>());
+    EnableCategory(category_name, pos, {});
   }
 
   void EnableCategory(ConstString category_name,
                       TypeCategoryMap::Position pos, lldb::LanguageType lang) {
-    std::initializer_list<lldb::LanguageType> langs = {lang};
-    EnableCategory(category_name, pos, langs);
-  }
-
-  void EnableCategory(ConstString category_name,
-                      TypeCategoryMap::Position pos = TypeCategoryMap::Default,
-                      std::initializer_list<lldb::LanguageType> langs = {}) {
     TypeCategoryMap::ValueSP category_sp;
     if (m_categories_map.Get(category_name, category_sp) && category_sp) {
       m_categories_map.Enable(category_sp, pos);
-      for (const lldb::LanguageType lang : langs)
-        category_sp->AddLanguage(lang);
+      category_sp->AddLanguage(lang);
     }
   }
 
@@ -127,9 +118,6 @@
   lldb::ScriptedSyntheticChildrenSP
   GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp);
 
-  lldb::TypeValidatorImplSP
-  GetValidatorForType(lldb::TypeNameSpecifierImplSP type_sp);
-
   lldb::TypeFormatImplSP GetFormat(ValueObject &valobj,
                                    lldb::DynamicValueType use_dynamic);
 
@@ -139,9 +127,6 @@
   lldb::SyntheticChildrenSP
   GetSyntheticChildren(ValueObject &valobj, lldb::DynamicValueType use_dynamic);
 
-  lldb::TypeValidatorImplSP GetValidator(ValueObject &valobj,
-                                         lldb::DynamicValueType use_dynamic);
-
   bool
   AnyMatches(ConstString type_name,
              TypeCategoryImpl::FormatCategoryItems items =
@@ -198,9 +183,6 @@
   GetCandidateLanguages(lldb::LanguageType lang_type);
 
 private:
-  static std::vector<lldb::LanguageType>
-  GetCandidateLanguages(ValueObject &valobj);
-
   static void GetPossibleMatches(ValueObject &valobj,
                                  CompilerType compiler_type, uint32_t reason,
                                  lldb::DynamicValueType use_dynamic,
@@ -220,14 +202,10 @@
   ConstString m_system_category_name;
   ConstString m_vectortypes_category_name;
 
-  lldb::TypeFormatImplSP GetHardcodedFormat(FormattersMatchData &);
-
-  lldb::TypeSummaryImplSP GetHardcodedSummaryFormat(FormattersMatchData &);
-
-  lldb::SyntheticChildrenSP
-  GetHardcodedSyntheticChildren(FormattersMatchData &);
-
-  lldb::TypeValidatorImplSP GetHardcodedValidator(FormattersMatchData &);
+  template <typename ImplSP>
+  ImplSP Get(ValueObject &valobj, lldb::DynamicValueType use_dynamic);
+  template <typename ImplSP> ImplSP GetCached(FormattersMatchData &match_data);
+  template <typename ImplSP> ImplSP GetHardcoded(FormattersMatchData &);
 
   TypeCategoryMap &GetCategories() { return m_categories_map; }
 
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/FormattersContainer.h b/src/llvm-project/lldb/include/lldb/DataFormatters/FormattersContainer.h
index 9d7d373..86023dd 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/FormattersContainer.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/FormattersContainer.h
@@ -22,7 +22,6 @@
 #include "lldb/DataFormatters/TypeFormat.h"
 #include "lldb/DataFormatters/TypeSummary.h"
 #include "lldb/DataFormatters/TypeSynthetic.h"
-#include "lldb/DataFormatters/TypeValidator.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/StringLexer.h"
@@ -47,7 +46,7 @@
     return type;
 
   std::string type_cstr(type.AsCString());
-  lldb_utility::StringLexer type_lexer(type_cstr);
+  StringLexer type_lexer(type_cstr);
 
   type_lexer.AdvanceIf("class ");
   type_lexer.AdvanceIf("enum ");
@@ -65,9 +64,9 @@
 template <typename KeyType, typename ValueType> class FormatMap {
 public:
   typedef typename ValueType::SharedPointer ValueSP;
-  typedef std::map<KeyType, ValueSP> MapType;
+  typedef std::vector<std::pair<KeyType, ValueSP>> MapType;
   typedef typename MapType::iterator MapIterator;
-  typedef std::function<bool(KeyType, const ValueSP &)> ForEachCallback;
+  typedef std::function<bool(const KeyType &, const ValueSP &)> ForEachCallback;
 
   FormatMap(IFormatChangeListener *lst)
       : m_map(), m_map_mutex(), listener(lst) {}
@@ -79,20 +78,22 @@
       entry->GetRevision() = 0;
 
     std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
-    m_map[name] = entry;
+    Delete(name);
+    m_map.emplace_back(std::move(name), std::move(entry));
     if (listener)
       listener->Changed();
   }
 
-  bool Delete(KeyType name) {
+  bool Delete(const KeyType &name) {
     std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
-    MapIterator iter = m_map.find(name);
-    if (iter == m_map.end())
-      return false;
-    m_map.erase(name);
-    if (listener)
-      listener->Changed();
-    return true;
+    for (MapIterator iter = m_map.begin(); iter != m_map.end(); ++iter)
+      if (iter->first == name) {
+        m_map.erase(iter);
+        if (listener)
+          listener->Changed();
+        return true;
+      }
+    return false;
   }
 
   void Clear() {
@@ -102,22 +103,22 @@
       listener->Changed();
   }
 
-  bool Get(KeyType name, ValueSP &entry) {
+  bool Get(const KeyType &name, ValueSP &entry) {
     std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
-    MapIterator iter = m_map.find(name);
-    if (iter == m_map.end())
-      return false;
-    entry = iter->second;
-    return true;
+    for (const auto &pos : m_map)
+      if (pos.first == name) {
+        entry = pos.second;
+        return true;
+      }
+    return false;
   }
 
   void ForEach(ForEachCallback callback) {
     if (callback) {
       std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
-      MapIterator pos, end = m_map.end();
-      for (pos = m_map.begin(); pos != end; pos++) {
-        KeyType type = pos->first;
-        if (!callback(type, pos->second))
+      for (const auto &pos : m_map) {
+        const KeyType &type = pos.first;
+        if (!callback(type, pos.second))
           break;
       }
     }
@@ -127,28 +128,17 @@
 
   ValueSP GetValueAtIndex(size_t index) {
     std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
-    MapIterator iter = m_map.begin();
-    MapIterator end = m_map.end();
-    while (index > 0) {
-      iter++;
-      index--;
-      if (end == iter)
-        return ValueSP();
-    }
-    return iter->second;
+    if (index >= m_map.size())
+      return ValueSP();
+    return m_map[index].second;
   }
 
+  // If caller holds the mutex we could return a reference without copy ctor.
   KeyType GetKeyAtIndex(size_t index) {
     std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
-    MapIterator iter = m_map.begin();
-    MapIterator end = m_map.end();
-    while (index > 0) {
-      iter++;
-      index--;
-      if (end == iter)
-        return KeyType();
-    }
-    return iter->first;
+    if (index >= m_map.size())
+      return {};
+    return m_map[index].first;
   }
 
 protected:
@@ -171,8 +161,8 @@
 public:
   typedef typename BackEndType::MapType MapType;
   typedef typename MapType::iterator MapIterator;
-  typedef typename MapType::key_type MapKeyType;
-  typedef typename MapType::mapped_type MapValueType;
+  typedef KeyType MapKeyType;
+  typedef std::shared_ptr<ValueType> MapValueType;
   typedef typename BackEndType::ForEachCallback ForEachCallback;
   typedef typename std::shared_ptr<FormattersContainer<KeyType, ValueType>>
       SharedPointer;
@@ -182,8 +172,8 @@
   FormattersContainer(std::string name, IFormatChangeListener *lst)
       : m_format_map(lst), m_name(name) {}
 
-  void Add(const MapKeyType &type, const MapValueType &entry) {
-    Add_Impl(type, entry, static_cast<KeyType *>(nullptr));
+  void Add(MapKeyType type, const MapValueType &entry) {
+    Add_Impl(std::move(type), entry, static_cast<KeyType *>(nullptr));
   }
 
   bool Delete(ConstString type) {
@@ -233,9 +223,9 @@
 
   DISALLOW_COPY_AND_ASSIGN(FormattersContainer);
 
-  void Add_Impl(const MapKeyType &type, const MapValueType &entry,
-                lldb::RegularExpressionSP *dummy) {
-    m_format_map.Add(type, entry);
+  void Add_Impl(MapKeyType type, const MapValueType &entry,
+                RegularExpression *dummy) {
+    m_format_map.Add(std::move(type), entry);
   }
 
   void Add_Impl(ConstString type, const MapValueType &entry,
@@ -247,12 +237,12 @@
     return m_format_map.Delete(type);
   }
 
-  bool Delete_Impl(ConstString type, lldb::RegularExpressionSP *dummy) {
+  bool Delete_Impl(ConstString type, RegularExpression *dummy) {
     std::lock_guard<std::recursive_mutex> guard(m_format_map.mutex());
     MapIterator pos, end = m_format_map.map().end();
     for (pos = m_format_map.map().begin(); pos != end; pos++) {
-      lldb::RegularExpressionSP regex = pos->first;
-      if (type.GetStringRef() == regex->GetText()) {
+      const RegularExpression &regex = pos->first;
+      if (type.GetStringRef() == regex.GetText()) {
         m_format_map.map().erase(pos);
         if (m_format_map.listener)
           m_format_map.listener->Changed();
@@ -282,24 +272,23 @@
   }
 
   lldb::TypeNameSpecifierImplSP
-  GetTypeNameSpecifierAtIndex_Impl(size_t index,
-                                   lldb::RegularExpressionSP *dummy) {
-    lldb::RegularExpressionSP regex = m_format_map.GetKeyAtIndex(index);
-    if (regex.get() == nullptr)
+  GetTypeNameSpecifierAtIndex_Impl(size_t index, RegularExpression *dummy) {
+    RegularExpression regex = m_format_map.GetKeyAtIndex(index);
+    if (regex == RegularExpression())
       return lldb::TypeNameSpecifierImplSP();
     return lldb::TypeNameSpecifierImplSP(
-        new TypeNameSpecifierImpl(regex->GetText().str().c_str(), true));
+        new TypeNameSpecifierImpl(regex.GetText().str().c_str(), true));
   }
 
   bool Get_Impl(ConstString key, MapValueType &value,
-                lldb::RegularExpressionSP *dummy) {
+                RegularExpression *dummy) {
     llvm::StringRef key_str = key.GetStringRef();
     std::lock_guard<std::recursive_mutex> guard(m_format_map.mutex());
-    MapIterator pos, end = m_format_map.map().end();
-    for (pos = m_format_map.map().begin(); pos != end; pos++) {
-      lldb::RegularExpressionSP regex = pos->first;
-      if (regex->Execute(key_str)) {
-        value = pos->second;
+    // Patterns are matched in reverse-chronological order.
+    for (const auto &pos : llvm::reverse(m_format_map.map())) {
+      const RegularExpression &regex = pos.first;
+      if (regex.Execute(key_str)) {
+        value = pos.second;
         return true;
       }
     }
@@ -307,13 +296,12 @@
   }
 
   bool GetExact_Impl(ConstString key, MapValueType &value,
-                     lldb::RegularExpressionSP *dummy) {
+                     RegularExpression *dummy) {
     std::lock_guard<std::recursive_mutex> guard(m_format_map.mutex());
-    MapIterator pos, end = m_format_map.map().end();
-    for (pos = m_format_map.map().begin(); pos != end; pos++) {
-      lldb::RegularExpressionSP regex = pos->first;
-      if (regex->GetText() == key.GetStringRef()) {
-        value = pos->second;
+    for (const auto &pos : m_format_map.map()) {
+      const RegularExpression &regex = pos.first;
+      if (regex.GetText() == key.GetStringRef()) {
+        value = pos.second;
         return true;
       }
     }
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/LanguageCategory.h b/src/llvm-project/lldb/include/lldb/DataFormatters/LanguageCategory.h
index f109d46..1cffff9 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/LanguageCategory.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/LanguageCategory.h
@@ -25,27 +25,11 @@
 
   LanguageCategory(lldb::LanguageType lang_type);
 
-  bool Get(FormattersMatchData &match_data, lldb::TypeFormatImplSP &format_sp);
-
-  bool Get(FormattersMatchData &match_data, lldb::TypeSummaryImplSP &format_sp);
-
-  bool Get(FormattersMatchData &match_data,
-           lldb::SyntheticChildrenSP &format_sp);
-
-  bool Get(FormattersMatchData &match_data,
-           lldb::TypeValidatorImplSP &format_sp);
-
+  template <typename ImplSP>
+  bool Get(FormattersMatchData &match_data, ImplSP &format_sp);
+  template <typename ImplSP>
   bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
-                    lldb::TypeFormatImplSP &format_sp);
-
-  bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
-                    lldb::TypeSummaryImplSP &format_sp);
-
-  bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
-                    lldb::SyntheticChildrenSP &format_sp);
-
-  bool GetHardcoded(FormatManager &fmt_mgr, FormattersMatchData &match_data,
-                    lldb::TypeValidatorImplSP &format_sp);
+                    ImplSP &format_sp);
 
   lldb::TypeCategoryImplSP GetCategory() const;
 
@@ -63,7 +47,9 @@
   HardcodedFormatters::HardcodedFormatFinder m_hardcoded_formats;
   HardcodedFormatters::HardcodedSummaryFinder m_hardcoded_summaries;
   HardcodedFormatters::HardcodedSyntheticFinder m_hardcoded_synthetics;
-  HardcodedFormatters::HardcodedValidatorFinder m_hardcoded_validators;
+
+  template <typename ImplSP>
+  auto &GetHardcodedFinder();
 
   lldb_private::FormatCache m_format_cache;
 
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/StringPrinter.h b/src/llvm-project/lldb/include/lldb/DataFormatters/StringPrinter.h
index 41d5edd..43b9201 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/StringPrinter.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/StringPrinter.h
@@ -24,238 +24,121 @@
 
   enum class GetPrintableElementType { ASCII, UTF8 };
 
-  class ReadStringAndDumpToStreamOptions {
+  class DumpToStreamOptions {
   public:
-    ReadStringAndDumpToStreamOptions()
-        : m_location(0), m_process_sp(), m_stream(nullptr), m_prefix_token(),
-          m_suffix_token(), m_quote('"'), m_source_size(0),
-          m_needs_zero_termination(true), m_escape_non_printables(true),
-          m_ignore_max_length(false), m_zero_is_terminator(true),
-          m_language_type(lldb::eLanguageTypeUnknown) {}
+    DumpToStreamOptions() = default;
 
-    ReadStringAndDumpToStreamOptions(ValueObject &valobj);
-
-    ReadStringAndDumpToStreamOptions &SetLocation(uint64_t l) {
-      m_location = l;
-      return *this;
-    }
-
-    uint64_t GetLocation() const { return m_location; }
-
-    ReadStringAndDumpToStreamOptions &SetProcessSP(lldb::ProcessSP p) {
-      m_process_sp = p;
-      return *this;
-    }
-
-    lldb::ProcessSP GetProcessSP() const { return m_process_sp; }
-
-    ReadStringAndDumpToStreamOptions &SetStream(Stream *s) {
-      m_stream = s;
-      return *this;
-    }
+    void SetStream(Stream *s) { m_stream = s; }
 
     Stream *GetStream() const { return m_stream; }
 
-    ReadStringAndDumpToStreamOptions &SetPrefixToken(const std::string &p) {
-      m_prefix_token = p;
-      return *this;
-    }
+    void SetPrefixToken(const std::string &p) { m_prefix_token = p; }
 
-    ReadStringAndDumpToStreamOptions &SetPrefixToken(std::nullptr_t) {
-      m_prefix_token.clear();
-      return *this;
-    }
+    void SetPrefixToken(std::nullptr_t) { m_prefix_token.clear(); }
 
     const char *GetPrefixToken() const { return m_prefix_token.c_str(); }
 
-    ReadStringAndDumpToStreamOptions &SetSuffixToken(const std::string &p) {
-      m_suffix_token = p;
-      return *this;
-    }
+    void SetSuffixToken(const std::string &p) { m_suffix_token = p; }
 
-    ReadStringAndDumpToStreamOptions &SetSuffixToken(std::nullptr_t) {
-      m_suffix_token.clear();
-      return *this;
-    }
+    void SetSuffixToken(std::nullptr_t) { m_suffix_token.clear(); }
 
     const char *GetSuffixToken() const { return m_suffix_token.c_str(); }
 
-    ReadStringAndDumpToStreamOptions &SetQuote(char q) {
-      m_quote = q;
-      return *this;
-    }
+    void SetQuote(char q) { m_quote = q; }
 
     char GetQuote() const { return m_quote; }
 
-    ReadStringAndDumpToStreamOptions &SetSourceSize(uint32_t s) {
-      m_source_size = s;
-      return *this;
-    }
+    void SetSourceSize(uint32_t s) { m_source_size = s; }
 
     uint32_t GetSourceSize() const { return m_source_size; }
 
-    ReadStringAndDumpToStreamOptions &SetNeedsZeroTermination(bool z) {
-      m_needs_zero_termination = z;
-      return *this;
-    }
+    void SetNeedsZeroTermination(bool z) { m_needs_zero_termination = z; }
 
     bool GetNeedsZeroTermination() const { return m_needs_zero_termination; }
 
-    ReadStringAndDumpToStreamOptions &SetBinaryZeroIsTerminator(bool e) {
-      m_zero_is_terminator = e;
-      return *this;
-    }
+    void SetBinaryZeroIsTerminator(bool e) { m_zero_is_terminator = e; }
 
     bool GetBinaryZeroIsTerminator() const { return m_zero_is_terminator; }
 
-    ReadStringAndDumpToStreamOptions &SetEscapeNonPrintables(bool e) {
-      m_escape_non_printables = e;
-      return *this;
-    }
+    void SetEscapeNonPrintables(bool e) { m_escape_non_printables = e; }
 
     bool GetEscapeNonPrintables() const { return m_escape_non_printables; }
 
-    ReadStringAndDumpToStreamOptions &SetIgnoreMaxLength(bool e) {
-      m_ignore_max_length = e;
-      return *this;
-    }
+    void SetIgnoreMaxLength(bool e) { m_ignore_max_length = e; }
 
     bool GetIgnoreMaxLength() const { return m_ignore_max_length; }
 
-    ReadStringAndDumpToStreamOptions &SetLanguage(lldb::LanguageType l) {
-      m_language_type = l;
-      return *this;
-    }
+    void SetLanguage(lldb::LanguageType l) { m_language_type = l; }
 
-    lldb::LanguageType GetLanguage() const
-
-    {
-      return m_language_type;
-    }
+    lldb::LanguageType GetLanguage() const { return m_language_type; }
 
   private:
-    uint64_t m_location;
-    lldb::ProcessSP m_process_sp;
-    Stream *m_stream;
+    /// The used output stream.
+    Stream *m_stream = nullptr;
+    /// String that should be printed before the heading quote character.
     std::string m_prefix_token;
+    /// String that should be printed after the trailing quote character.
     std::string m_suffix_token;
-    char m_quote;
-    uint32_t m_source_size;
-    bool m_needs_zero_termination;
-    bool m_escape_non_printables;
-    bool m_ignore_max_length;
-    bool m_zero_is_terminator;
-    lldb::LanguageType m_language_type;
+    /// The quote character that should surround the string.
+    char m_quote = '"';
+    /// The length of the memory region that should be dumped in bytes.
+    uint32_t m_source_size = 0;
+    bool m_needs_zero_termination = true;
+    /// True iff non-printable characters should be escaped when dumping
+    /// them to the stream.
+    bool m_escape_non_printables = true;
+    /// True iff the max-string-summary-length setting of the target should
+    /// be ignored.
+    bool m_ignore_max_length = false;
+    /// True iff a zero bytes ('\0') should terminate the memory region that
+    /// is being dumped.
+    bool m_zero_is_terminator = true;
+    /// The language that the generated string literal is supposed to be valid
+    /// for. This changes for example what and how certain characters are
+    /// escaped.
+    /// For example, printing the a string containing only a quote (") char
+    /// with eLanguageTypeC would escape the quote character.
+    lldb::LanguageType m_language_type = lldb::eLanguageTypeUnknown;
   };
 
-  class ReadBufferAndDumpToStreamOptions {
+  class ReadStringAndDumpToStreamOptions : public DumpToStreamOptions {
   public:
-    ReadBufferAndDumpToStreamOptions()
-        : m_data(), m_stream(nullptr), m_prefix_token(), m_suffix_token(),
-          m_quote('"'), m_source_size(0), m_escape_non_printables(true),
-          m_zero_is_terminator(true), m_is_truncated(false),
-          m_language_type(lldb::eLanguageTypeUnknown) {}
+    ReadStringAndDumpToStreamOptions() = default;
+
+    ReadStringAndDumpToStreamOptions(ValueObject &valobj);
+
+    void SetLocation(uint64_t l) { m_location = l; }
+
+    uint64_t GetLocation() const { return m_location; }
+
+    void SetProcessSP(lldb::ProcessSP p) { m_process_sp = p; }
+
+    lldb::ProcessSP GetProcessSP() const { return m_process_sp; }
+
+  private:
+    uint64_t m_location = 0;
+    lldb::ProcessSP m_process_sp;
+  };
+
+  class ReadBufferAndDumpToStreamOptions : public DumpToStreamOptions {
+  public:
+    ReadBufferAndDumpToStreamOptions() = default;
 
     ReadBufferAndDumpToStreamOptions(ValueObject &valobj);
 
     ReadBufferAndDumpToStreamOptions(
         const ReadStringAndDumpToStreamOptions &options);
 
-    ReadBufferAndDumpToStreamOptions &SetData(DataExtractor d) {
-      m_data = d;
-      return *this;
-    }
+    void SetData(DataExtractor d) { m_data = d; }
 
     lldb_private::DataExtractor GetData() const { return m_data; }
 
-    ReadBufferAndDumpToStreamOptions &SetStream(Stream *s) {
-      m_stream = s;
-      return *this;
-    }
-
-    Stream *GetStream() const { return m_stream; }
-
-    ReadBufferAndDumpToStreamOptions &SetPrefixToken(const std::string &p) {
-      m_prefix_token = p;
-      return *this;
-    }
-
-    ReadBufferAndDumpToStreamOptions &SetPrefixToken(std::nullptr_t) {
-      m_prefix_token.clear();
-      return *this;
-    }
-
-    const char *GetPrefixToken() const { return m_prefix_token.c_str(); }
-
-    ReadBufferAndDumpToStreamOptions &SetSuffixToken(const std::string &p) {
-      m_suffix_token = p;
-      return *this;
-    }
-
-    ReadBufferAndDumpToStreamOptions &SetSuffixToken(std::nullptr_t) {
-      m_suffix_token.clear();
-      return *this;
-    }
-
-    const char *GetSuffixToken() const { return m_suffix_token.c_str(); }
-
-    ReadBufferAndDumpToStreamOptions &SetQuote(char q) {
-      m_quote = q;
-      return *this;
-    }
-
-    char GetQuote() const { return m_quote; }
-
-    ReadBufferAndDumpToStreamOptions &SetSourceSize(uint32_t s) {
-      m_source_size = s;
-      return *this;
-    }
-
-    uint32_t GetSourceSize() const { return m_source_size; }
-
-    ReadBufferAndDumpToStreamOptions &SetEscapeNonPrintables(bool e) {
-      m_escape_non_printables = e;
-      return *this;
-    }
-
-    bool GetEscapeNonPrintables() const { return m_escape_non_printables; }
-
-    ReadBufferAndDumpToStreamOptions &SetBinaryZeroIsTerminator(bool e) {
-      m_zero_is_terminator = e;
-      return *this;
-    }
-
-    bool GetBinaryZeroIsTerminator() const { return m_zero_is_terminator; }
-
-    ReadBufferAndDumpToStreamOptions &SetIsTruncated(bool t) {
-      m_is_truncated = t;
-      return *this;
-    }
+    void SetIsTruncated(bool t) { m_is_truncated = t; }
 
     bool GetIsTruncated() const { return m_is_truncated; }
-
-    ReadBufferAndDumpToStreamOptions &SetLanguage(lldb::LanguageType l) {
-      m_language_type = l;
-      return *this;
-    }
-
-    lldb::LanguageType GetLanguage() const
-
-    {
-      return m_language_type;
-    }
-
   private:
     DataExtractor m_data;
-    Stream *m_stream;
-    std::string m_prefix_token;
-    std::string m_suffix_token;
-    char m_quote;
-    uint32_t m_source_size;
-    bool m_escape_non_printables;
-    bool m_zero_is_terminator;
-    bool m_is_truncated;
-    lldb::LanguageType m_language_type;
+    bool m_is_truncated = false;
   };
 
   // I can't use a std::unique_ptr for this because the Deleter is a template
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h b/src/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h
index bdb393a..d5aab6d 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/TypeCategory.h
@@ -26,7 +26,7 @@
 template <typename FormatterImpl> class FormatterContainerPair {
 public:
   typedef FormattersContainer<ConstString, FormatterImpl> ExactMatchContainer;
-  typedef FormattersContainer<lldb::RegularExpressionSP, FormatterImpl>
+  typedef FormattersContainer<RegularExpression, FormatterImpl>
       RegexMatchContainer;
 
   typedef typename ExactMatchContainer::MapType ExactMatchMap;
@@ -67,7 +67,6 @@
   typedef FormatterContainerPair<TypeFormatImpl> FormatContainer;
   typedef FormatterContainerPair<TypeSummaryImpl> SummaryContainer;
   typedef FormatterContainerPair<TypeFilterImpl> FilterContainer;
-  typedef FormatterContainerPair<TypeValidatorImpl> ValidatorContainer;
   typedef FormatterContainerPair<SyntheticChildren> SynthContainer;
 
 public:
@@ -86,9 +85,6 @@
   typedef SynthContainer::ExactMatchContainerSP SynthContainerSP;
   typedef SynthContainer::RegexMatchContainerSP RegexSynthContainerSP;
 
-  typedef ValidatorContainer::ExactMatchContainerSP ValidatorContainerSP;
-  typedef ValidatorContainer::RegexMatchContainerSP RegexValidatorContainerSP;
-
   template <typename T> class ForEachCallbacks {
   public:
     ForEachCallbacks() = default;
@@ -145,18 +141,6 @@
       m_synth_regex = callback;
       return *this;
     }
-    template <typename U = TypeValidatorImpl>
-    typename std::enable_if<std::is_same<U, T>::value, ForEachCallbacks &>::type
-    SetExact(ValidatorContainer::ExactMatchForEachCallback callback) {
-      m_validator_exact = callback;
-      return *this;
-    }
-    template <typename U = TypeValidatorImpl>
-    typename std::enable_if<std::is_same<U, T>::value, ForEachCallbacks &>::type
-    SetWithRegex(ValidatorContainer::RegexMatchForEachCallback callback) {
-      m_validator_regex = callback;
-      return *this;
-    }
 
     FormatContainer::ExactMatchForEachCallback GetFormatExactCallback() const {
       return m_format_exact;
@@ -188,15 +172,6 @@
       return m_synth_regex;
     }
 
-    ValidatorContainer::ExactMatchForEachCallback
-    GetValidatorExactCallback() const {
-      return m_validator_exact;
-    }
-    ValidatorContainer::RegexMatchForEachCallback
-    GetValidatorRegexCallback() const {
-      return m_validator_regex;
-    }
-
   private:
     FormatContainer::ExactMatchForEachCallback m_format_exact;
     FormatContainer::RegexMatchForEachCallback m_format_regex;
@@ -209,13 +184,9 @@
 
     SynthContainer::ExactMatchForEachCallback m_synth_exact;
     SynthContainer::RegexMatchForEachCallback m_synth_regex;
-
-    ValidatorContainer::ExactMatchForEachCallback m_validator_exact;
-    ValidatorContainer::RegexMatchForEachCallback m_validator_regex;
   };
 
-  TypeCategoryImpl(IFormatChangeListener *clist, ConstString name,
-                   std::initializer_list<lldb::LanguageType> langs = {});
+  TypeCategoryImpl(IFormatChangeListener *clist, ConstString name);
 
   template <typename T> void ForEach(const ForEachCallbacks<T> &foreach) {
     GetTypeFormatsContainer()->ForEach(foreach.GetFormatExactCallback());
@@ -230,10 +201,6 @@
 
     GetTypeSyntheticsContainer()->ForEach(foreach.GetSynthExactCallback());
     GetRegexTypeSyntheticsContainer()->ForEach(foreach.GetSynthRegexCallback());
-
-    GetTypeValidatorsContainer()->ForEach(foreach.GetValidatorExactCallback());
-    GetRegexTypeValidatorsContainer()->ForEach(
-        foreach.GetValidatorRegexCallback());
   }
 
   FormatContainerSP GetTypeFormatsContainer() {
@@ -278,9 +245,6 @@
   SynthContainer::MapValueType
   GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp);
 
-  ValidatorContainer::MapValueType
-  GetValidatorForType(lldb::TypeNameSpecifierImplSP type_sp);
-
   lldb::TypeNameSpecifierImplSP
   GetTypeNameSpecifierForFormatAtIndex(size_t index);
 
@@ -311,19 +275,6 @@
   lldb::TypeNameSpecifierImplSP
   GetTypeNameSpecifierForSyntheticAtIndex(size_t index);
 
-  ValidatorContainerSP GetTypeValidatorsContainer() {
-    return m_validator_cont.GetExactMatch();
-  }
-
-  RegexValidatorContainerSP GetRegexTypeValidatorsContainer() {
-    return m_validator_cont.GetRegexMatch();
-  }
-
-  ValidatorContainer::MapValueType GetValidatorAtIndex(size_t index);
-
-  lldb::TypeNameSpecifierImplSP
-  GetTypeNameSpecifierForValidatorAtIndex(size_t index);
-
   bool IsEnabled() const { return m_enabled; }
 
   uint32_t GetEnabledPosition() {
@@ -333,18 +284,15 @@
       return m_enabled_position;
   }
 
-  bool Get(ValueObject &valobj, const FormattersMatchVector &candidates,
+  bool Get(lldb::LanguageType lang, const FormattersMatchVector &candidates,
            lldb::TypeFormatImplSP &entry, uint32_t *reason = nullptr);
 
-  bool Get(ValueObject &valobj, const FormattersMatchVector &candidates,
+  bool Get(lldb::LanguageType lang, const FormattersMatchVector &candidates,
            lldb::TypeSummaryImplSP &entry, uint32_t *reason = nullptr);
 
-  bool Get(ValueObject &valobj, const FormattersMatchVector &candidates,
+  bool Get(lldb::LanguageType lang, const FormattersMatchVector &candidates,
            lldb::SyntheticChildrenSP &entry, uint32_t *reason = nullptr);
 
-  bool Get(ValueObject &valobj, const FormattersMatchVector &candidates,
-           lldb::TypeValidatorImplSP &entry, uint32_t *reason = nullptr);
-
   void Clear(FormatCategoryItems items = ALL_ITEM_TYPES);
 
   bool Delete(ConstString name, FormatCategoryItems items = ALL_ITEM_TYPES);
@@ -359,8 +307,6 @@
 
   void AddLanguage(lldb::LanguageType lang);
 
-  bool HasLanguage(lldb::LanguageType lang);
-
   std::string GetDescription();
 
   bool AnyMatches(ConstString type_name,
@@ -376,7 +322,6 @@
   SummaryContainer m_summary_cont;
   FilterContainer m_filter_cont;
   SynthContainer m_synth_cont;
-  ValidatorContainer m_validator_cont;
 
   bool m_enabled;
 
@@ -394,7 +339,7 @@
 
   void Disable() { Enable(false, UINT32_MAX); }
 
-  bool IsApplicable(ValueObject &valobj);
+  bool IsApplicable(lldb::LanguageType lang);
 
   uint32_t GetLastEnabledPosition() { return m_enabled_position; }
 
@@ -417,9 +362,6 @@
   friend class FormattersContainer<lldb::RegularExpressionSP,
                                    ScriptedSyntheticChildren>;
 
-  friend class FormattersContainer<ConstString, TypeValidatorImpl>;
-  friend class FormattersContainer<lldb::RegularExpressionSP,
-                                   TypeValidatorImpl>;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/TypeCategoryMap.h b/src/llvm-project/lldb/include/lldb/DataFormatters/TypeCategoryMap.h
index 753b58c..ae577a3 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/TypeCategoryMap.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/TypeCategoryMap.h
@@ -77,14 +77,7 @@
 
   uint32_t GetCount() { return m_map.size(); }
 
-  lldb::TypeFormatImplSP GetFormat(FormattersMatchData &match_data);
-
-  lldb::TypeSummaryImplSP GetSummaryFormat(FormattersMatchData &match_data);
-
-  lldb::SyntheticChildrenSP
-  GetSyntheticChildren(FormattersMatchData &match_data);
-
-  lldb::TypeValidatorImplSP GetValidator(FormattersMatchData &match_data);
+  template <typename ImplSP> void Get(FormattersMatchData &, ImplSP &);
 
 private:
   class delete_matching_categories {
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/TypeValidator.h b/src/llvm-project/lldb/include/lldb/DataFormatters/TypeValidator.h
deleted file mode 100644
index 531812e..0000000
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/TypeValidator.h
+++ /dev/null
@@ -1,201 +0,0 @@
-//===-- TypeValidator.h ------------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_TypeValidator_h_
-#define lldb_TypeValidator_h_
-
-
-#include <functional>
-#include <string>
-
-
-#include "lldb/lldb-enumerations.h"
-#include "lldb/lldb-private-enumerations.h"
-#include "lldb/lldb-public.h"
-
-namespace lldb_private {
-
-class TypeValidatorImpl {
-public:
-  class Flags {
-  public:
-    Flags() : m_flags(lldb::eTypeOptionCascade) {}
-
-    Flags(const Flags &other) : m_flags(other.m_flags) {}
-
-    Flags(uint32_t value) : m_flags(value) {}
-
-    Flags &operator=(const Flags &rhs) {
-      if (&rhs != this)
-        m_flags = rhs.m_flags;
-
-      return *this;
-    }
-
-    Flags &operator=(const uint32_t &rhs) {
-      m_flags = rhs;
-      return *this;
-    }
-
-    Flags &Clear() {
-      m_flags = 0;
-      return *this;
-    }
-
-    bool GetCascades() const {
-      return (m_flags & lldb::eTypeOptionCascade) == lldb::eTypeOptionCascade;
-    }
-
-    Flags &SetCascades(bool value = true) {
-      if (value)
-        m_flags |= lldb::eTypeOptionCascade;
-      else
-        m_flags &= ~lldb::eTypeOptionCascade;
-      return *this;
-    }
-
-    bool GetSkipPointers() const {
-      return (m_flags & lldb::eTypeOptionSkipPointers) ==
-             lldb::eTypeOptionSkipPointers;
-    }
-
-    Flags &SetSkipPointers(bool value = true) {
-      if (value)
-        m_flags |= lldb::eTypeOptionSkipPointers;
-      else
-        m_flags &= ~lldb::eTypeOptionSkipPointers;
-      return *this;
-    }
-
-    bool GetSkipReferences() const {
-      return (m_flags & lldb::eTypeOptionSkipReferences) ==
-             lldb::eTypeOptionSkipReferences;
-    }
-
-    Flags &SetSkipReferences(bool value = true) {
-      if (value)
-        m_flags |= lldb::eTypeOptionSkipReferences;
-      else
-        m_flags &= ~lldb::eTypeOptionSkipReferences;
-      return *this;
-    }
-
-    bool GetNonCacheable() const {
-      return (m_flags & lldb::eTypeOptionNonCacheable) ==
-             lldb::eTypeOptionNonCacheable;
-    }
-
-    Flags &SetNonCacheable(bool value = true) {
-      if (value)
-        m_flags |= lldb::eTypeOptionNonCacheable;
-      else
-        m_flags &= ~lldb::eTypeOptionNonCacheable;
-      return *this;
-    }
-
-    uint32_t GetValue() { return m_flags; }
-
-    void SetValue(uint32_t value) { m_flags = value; }
-
-  private:
-    uint32_t m_flags;
-  };
-
-  TypeValidatorImpl(const Flags &flags = Flags());
-
-  typedef std::shared_ptr<TypeValidatorImpl> SharedPointer;
-
-  virtual ~TypeValidatorImpl();
-
-  bool Cascades() const { return m_flags.GetCascades(); }
-  bool SkipsPointers() const { return m_flags.GetSkipPointers(); }
-  bool SkipsReferences() const { return m_flags.GetSkipReferences(); }
-  bool NonCacheable() const { return m_flags.GetNonCacheable(); }
-
-  void SetCascades(bool value) { m_flags.SetCascades(value); }
-
-  void SetSkipsPointers(bool value) { m_flags.SetSkipPointers(value); }
-
-  void SetSkipsReferences(bool value) { m_flags.SetSkipReferences(value); }
-
-  void SetNonCacheable(bool value) { m_flags.SetNonCacheable(value); }
-
-  uint32_t GetOptions() { return m_flags.GetValue(); }
-
-  void SetOptions(uint32_t value) { m_flags.SetValue(value); }
-
-  uint32_t &GetRevision() { return m_my_revision; }
-
-  enum class Type { eTypeUnknown, eTypeCXX };
-
-  struct ValidationResult {
-    TypeValidatorResult m_result;
-    std::string m_message;
-  };
-
-  virtual Type GetType() { return Type::eTypeUnknown; }
-
-  // we are using a ValueObject* instead of a ValueObjectSP because we do not
-  // need to hold on to this for extended periods of time and we trust the
-  // ValueObject to stay around for as long as it is required for us to
-  // generate its value
-  virtual ValidationResult FormatObject(ValueObject *valobj) const = 0;
-
-  virtual std::string GetDescription() = 0;
-
-  static ValidationResult Success();
-
-  static ValidationResult Failure(std::string message);
-
-protected:
-  Flags m_flags;
-  uint32_t m_my_revision;
-
-private:
-  DISALLOW_COPY_AND_ASSIGN(TypeValidatorImpl);
-};
-
-class TypeValidatorImpl_CXX : public TypeValidatorImpl {
-public:
-  typedef std::function<TypeValidatorImpl::ValidationResult(
-      ValueObject *valobj)>
-      ValidatorFunction;
-
-  TypeValidatorImpl_CXX(ValidatorFunction f, std::string d,
-                        const TypeValidatorImpl::Flags &flags = Flags());
-
-  typedef std::shared_ptr<TypeValidatorImpl_CXX> SharedPointer;
-
-  ~TypeValidatorImpl_CXX() override;
-
-  ValidatorFunction GetValidatorFunction() const {
-    return m_validator_function;
-  }
-
-  void SetValidatorFunction(ValidatorFunction f) { m_validator_function = f; }
-
-  TypeValidatorImpl::Type GetType() override {
-    return TypeValidatorImpl::Type::eTypeCXX;
-  }
-
-  ValidationResult FormatObject(ValueObject *valobj) const override;
-
-  std::string GetDescription() override;
-
-protected:
-  std::string m_description;
-  ValidatorFunction m_validator_function;
-
-private:
-  DISALLOW_COPY_AND_ASSIGN(TypeValidatorImpl_CXX);
-};
-
-} // namespace lldb_private
-
-#endif // lldb_TypeValidator_h_
diff --git a/src/llvm-project/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h b/src/llvm-project/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
index 41adc2d..33813b3 100644
--- a/src/llvm-project/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
+++ b/src/llvm-project/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
@@ -62,8 +62,6 @@
 
   bool ShouldPrintValueObject();
 
-  bool ShouldPrintValidation();
-
   bool IsNil();
 
   bool IsUninitialized();
@@ -76,10 +74,6 @@
 
   bool IsAggregate();
 
-  bool PrintValidationMarkerIfNeeded();
-
-  bool PrintValidationErrorIfNeeded();
-
   bool PrintLocationIfNeeded();
 
   void PrintDecl();
@@ -145,7 +139,6 @@
   std::string m_summary;
   std::string m_error;
   bool m_val_summary_ok;
-  std::pair<TypeValidatorResult, std::string> m_validation;
 
   friend struct StringSummaryFormat;
 
diff --git a/src/llvm-project/lldb/include/lldb/Expression/DWARFExpression.h b/src/llvm-project/lldb/include/lldb/Expression/DWARFExpression.h
index 21830a5..bfae142 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/DWARFExpression.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/DWARFExpression.h
@@ -34,15 +34,6 @@
 /// location expression or a location list and interprets it.
 class DWARFExpression {
 public:
-  enum LocationListFormat : uint8_t {
-    NonLocationList,     // Not a location list
-    RegularLocationList, // Location list format used in non-split dwarf files
-    SplitDwarfLocationList, // Location list format used in pre-DWARF v5 split
-                            // dwarf files (.debug_loc.dwo)
-    LocLists,               // Location list format used in DWARF v5
-                            // (.debug_loclists/.debug_loclists.dwo).
-  };
-
   DWARFExpression();
 
   /// Constructor
@@ -50,15 +41,8 @@
   /// \param[in] data
   ///     A data extractor configured to read the DWARF location expression's
   ///     bytecode.
-  ///
-  /// \param[in] data_offset
-  ///     The offset of the location expression in the extractor.
-  ///
-  /// \param[in] data_length
-  ///     The byte length of the location expression.
   DWARFExpression(lldb::ModuleSP module, const DataExtractor &data,
-                  const DWARFUnit *dwarf_cu, lldb::offset_t data_offset,
-                  lldb::offset_t data_length);
+                  const DWARFUnit *dwarf_cu);
 
   /// Destructor
   virtual ~DWARFExpression();
@@ -92,8 +76,8 @@
 
   /// Search for a load address in the location list
   ///
-  /// \param[in] process
-  ///     The process to use when resolving the load address
+  /// \param[in] func_load_addr
+  ///     The actual address of the function containing this location list.
   ///
   /// \param[in] addr
   ///     The address to resolve
@@ -105,7 +89,7 @@
   //    LocationListContainsLoadAddress (Process* process, const Address &addr)
   //    const;
   //
-  bool LocationListContainsAddress(lldb::addr_t loclist_base_addr,
+  bool LocationListContainsAddress(lldb::addr_t func_load_addr,
                                    lldb::addr_t addr) const;
 
   /// If a location is not a location list, return true if the location
@@ -145,13 +129,15 @@
 
   /// Tells the expression that it refers to a location list.
   ///
-  /// \param[in] slide
-  ///     This value should be a slide that is applied to any values
-  ///     in the location list data so the values become zero based
-  ///     offsets into the object that owns the location list. We need
-  ///     to make location lists relative to the objects that own them
-  ///     so we can relink addresses on the fly.
-  void SetLocationListSlide(lldb::addr_t slide);
+  /// \param[in] cu_file_addr
+  ///     The base address to use for interpreting relative location list
+  ///     entries.
+  /// \param[in] func_file_addr
+  ///     The file address of the function containing this location list. This
+  ///     address will be used to relocate the location list on the fly (in
+  ///     conjuction with the func_load_addr arguments).
+  void SetLocationListAddresses(lldb::addr_t cu_file_addr,
+                                lldb::addr_t func_file_addr);
 
   /// Return the call-frame-info style register kind
   int GetRegisterKind();
@@ -165,8 +151,7 @@
   /// Wrapper for the static evaluate function that accepts an
   /// ExecutionContextScope instead of an ExecutionContext and uses member
   /// variables to populate many operands
-  bool Evaluate(ExecutionContextScope *exe_scope,
-                lldb::addr_t loclist_base_load_addr,
+  bool Evaluate(ExecutionContextScope *exe_scope, lldb::addr_t func_load_addr,
                 const Value *initial_value_ptr, const Value *object_address_ptr,
                 Value &result, Status *error_ptr) const;
 
@@ -191,19 +176,6 @@
   ///     This is a static method so the opcodes need to be provided
   ///     explicitly.
   ///
-  /// \param[in] expr_locals
-  ///     If the location expression was produced by the expression parser,
-  ///     the list of local variables referenced by the DWARF expression.
-  ///     This list should already have been populated during parsing;
-  ///     the DWARF expression refers to variables by index.  Can be NULL if
-  ///     the location expression uses no locals.
-  ///
-  /// \param[in] decl_map
-  ///     If the location expression was produced by the expression parser,
-  ///     the list of external variables referenced by the location
-  ///     expression.  Can be NULL if the location expression uses no
-  ///     external variables.
-  ///
   ///  \param[in] reg_ctx
   ///     An optional parameter which provides a RegisterContext for use
   ///     when evaluating the expression (i.e. for fetching register values).
@@ -211,12 +183,6 @@
   ///     in the case where an expression needs to be evaluated while building
   ///     the stack frame list, this short-cut is available.
   ///
-  /// \param[in] offset
-  ///     The offset of the location expression in the data extractor.
-  ///
-  /// \param[in] length
-  ///     The length in bytes of the location expression.
-  ///
   /// \param[in] reg_set
   ///     The call-frame-info style register kind.
   ///
@@ -236,8 +202,7 @@
   ///     details of the failure are provided through it.
   static bool Evaluate(ExecutionContext *exe_ctx, RegisterContext *reg_ctx,
                        lldb::ModuleSP opcode_ctx, const DataExtractor &opcodes,
-                       const DWARFUnit *dwarf_cu, const lldb::offset_t offset,
-                       const lldb::offset_t length,
+                       const DWARFUnit *dwarf_cu,
                        const lldb::RegisterKind reg_set,
                        const Value *initial_value_ptr,
                        const Value *object_address_ptr, Value &result,
@@ -249,12 +214,8 @@
   }
 
   bool DumpLocationForAddress(Stream *s, lldb::DescriptionLevel level,
-                              lldb::addr_t loclist_base_load_addr,
-                              lldb::addr_t address, ABI *abi);
-
-  static size_t LocationListSize(const DWARFUnit *dwarf_cu,
-                                 const DataExtractor &debug_loc_data,
-                                 lldb::offset_t offset);
+                              lldb::addr_t func_load_addr, lldb::addr_t address,
+                              ABI *abi);
 
   static bool PrintDWARFExpression(Stream &s, const DataExtractor &data,
                                    int address_size, int dwarf_ref_size,
@@ -269,7 +230,7 @@
 private:
   /// Pretty-prints the location expression to a stream
   ///
-  /// \param[in] stream
+  /// \param[in] s
   ///     The stream to use for pretty-printing.
   ///
   /// \param[in] offset
@@ -284,18 +245,12 @@
   /// \param[in] abi
   ///     An optional ABI plug-in that can be used to resolve register
   ///     names.
-  void DumpLocation(Stream *s, lldb::offset_t offset, lldb::offset_t length,
+  void DumpLocation(Stream *s, const DataExtractor &data,
                     lldb::DescriptionLevel level, ABI *abi) const;
 
-  bool GetLocation(lldb::addr_t base_addr, lldb::addr_t pc,
-                   lldb::offset_t &offset, lldb::offset_t &len);
-
-  static bool AddressRangeForLocationListEntry(
-      const DWARFUnit *dwarf_cu, const DataExtractor &debug_loc_data,
-      lldb::offset_t *offset_ptr, lldb::addr_t &low_pc, lldb::addr_t &high_pc);
-
-  bool GetOpAndEndOffsets(StackFrame &frame, lldb::offset_t &op_offset,
-                          lldb::offset_t &end_offset);
+  llvm::Optional<DataExtractor>
+  GetLocationExpression(lldb::addr_t load_function_start,
+                        lldb::addr_t addr) const;
 
   /// Module which defined this expression.
   lldb::ModuleWP m_module_wp;
@@ -311,10 +266,11 @@
   /// One of the defines that starts with LLDB_REGKIND_
   lldb::RegisterKind m_reg_kind;
 
-  /// A value used to slide the location list offsets so that m_c they are
-  /// relative to the object that owns the location list (the function for
-  /// frame base and variable location lists)
-  lldb::addr_t m_loclist_slide;
+  struct LoclistAddresses {
+    lldb::addr_t cu_file_addr;
+    lldb::addr_t func_file_addr;
+  };
+  llvm::Optional<LoclistAddresses> m_loclist_addresses;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Expression/DiagnosticManager.h b/src/llvm-project/lldb/include/lldb/Expression/DiagnosticManager.h
index 7e3e2bb..e5aecce 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/DiagnosticManager.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/DiagnosticManager.h
@@ -12,6 +12,7 @@
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-types.h"
 
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringRef.h"
 
 #include <string>
@@ -23,7 +24,6 @@
   eDiagnosticOriginUnknown = 0,
   eDiagnosticOriginLLDB,
   eDiagnosticOriginClang,
-  eDiagnosticOriginGo,
   eDiagnosticOriginSwift,
   eDiagnosticOriginLLVM
 };
@@ -47,7 +47,6 @@
     switch (kind) {
     case eDiagnosticOriginUnknown:
     case eDiagnosticOriginLLDB:
-    case eDiagnosticOriginGo:
     case eDiagnosticOriginLLVM:
       return true;
     case eDiagnosticOriginClang:
@@ -89,7 +88,7 @@
   uint32_t m_compiler_id; // Compiler-specific diagnostic ID
 };
 
-typedef std::vector<Diagnostic *> DiagnosticList;
+typedef std::vector<std::unique_ptr<Diagnostic>> DiagnosticList;
 
 class DiagnosticManager {
 public:
@@ -98,45 +97,33 @@
     m_fixed_expression.clear();
   }
 
-  // The diagnostic manager holds a list of diagnostics, which are owned by the
-  // manager.
   const DiagnosticList &Diagnostics() { return m_diagnostics; }
 
-  ~DiagnosticManager() {
-    for (Diagnostic *diag : m_diagnostics) {
-      delete diag;
-    }
-  }
-
-  bool HasFixIts() {
-    for (Diagnostic *diag : m_diagnostics) {
-      if (diag->HasFixIts())
-        return true;
-    }
-    return false;
+  bool HasFixIts() const {
+    return llvm::any_of(m_diagnostics,
+                        [](const std::unique_ptr<Diagnostic> &diag) {
+                          return diag->HasFixIts();
+                        });
   }
 
   void AddDiagnostic(llvm::StringRef message, DiagnosticSeverity severity,
                      DiagnosticOrigin origin,
                      uint32_t compiler_id = LLDB_INVALID_COMPILER_ID) {
-    m_diagnostics.push_back(
-        new Diagnostic(message, severity, origin, compiler_id));
+    m_diagnostics.emplace_back(
+        std::make_unique<Diagnostic>(message, severity, origin, compiler_id));
   }
 
-  void AddDiagnostic(Diagnostic *diagnostic) {
-    m_diagnostics.push_back(diagnostic);
+  void AddDiagnostic(std::unique_ptr<Diagnostic> diagnostic) {
+    m_diagnostics.push_back(std::move(diagnostic));
   }
 
-  void CopyDiagnostics(DiagnosticManager &otherDiagnostics);
-
   size_t Printf(DiagnosticSeverity severity, const char *format, ...)
       __attribute__((format(printf, 3, 4)));
-  size_t PutString(DiagnosticSeverity severity, llvm::StringRef str);
+  void PutString(DiagnosticSeverity severity, llvm::StringRef str);
 
   void AppendMessageToDiagnostic(llvm::StringRef str) {
-    if (!m_diagnostics.empty()) {
+    if (!m_diagnostics.empty())
       m_diagnostics.back()->AppendMessage(str);
-    }
   }
 
   // Returns a string containing errors in this format:
@@ -153,7 +140,6 @@
   // Moves fixed_expression to the internal storage.
   void SetFixedExpression(std::string fixed_expression) {
     m_fixed_expression = std::move(fixed_expression);
-    fixed_expression.clear();
   }
 
 protected:
diff --git a/src/llvm-project/lldb/include/lldb/Expression/Expression.h b/src/llvm-project/lldb/include/lldb/Expression/Expression.h
index 2f0183c..e0ea7e9 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/Expression.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/Expression.h
@@ -32,22 +32,11 @@
 /// LLVM IR from the expression.
 class Expression {
 public:
-  /// Discriminator for LLVM-style RTTI (dyn_cast<> et al.)
-  enum ExpressionKind {
-    eKindFunctionCaller,
-    eKindClangFunctionCaller,
-    eKindUserExpression,
-    eKindLLVMUserExpression,
-    eKindClangUserExpression,
-    eKindUtilityFunction,
-    eKindClangUtilityFunction,
-  };
-
   enum ResultType { eResultTypeAny, eResultTypeId };
 
-  Expression(Target &target, ExpressionKind kind);
+  Expression(Target &target);
 
-  Expression(ExecutionContextScope &exe_scope, ExpressionKind kind);
+  Expression(ExecutionContextScope &exe_scope);
 
   /// Destructor
   virtual ~Expression() {}
@@ -64,6 +53,10 @@
   /// default, return eLanguageTypeUnknown.
   virtual lldb::LanguageType Language() { return lldb::eLanguageTypeUnknown; }
 
+  /// Return the Materializer that the parser should use when registering
+  /// external values.
+  virtual Materializer *GetMaterializer() { return nullptr; }
+
   /// Return the desired result type of the function, or eResultTypeAny if
   /// indifferent.
   virtual ResultType DesiredResultType() { return eResultTypeAny; }
@@ -90,12 +83,9 @@
 
   virtual ExpressionTypeSystemHelper *GetTypeSystemHelper() { return nullptr; }
 
-  /// LLVM-style RTTI support.
-  ExpressionKind getKind() const { return m_kind; }
-  
-private:
-  /// LLVM-style RTTI support.
-  const ExpressionKind m_kind;
+  // LLVM RTTI support
+  virtual bool isA(const void *ClassID) const = 0;
+
 protected:
   lldb::TargetWP m_target_wp; /// Expression's always have to have a target...
   lldb::ProcessWP m_jit_process_wp; /// An expression might have a process, but
diff --git a/src/llvm-project/lldb/include/lldb/Expression/ExpressionParser.h b/src/llvm-project/lldb/include/lldb/Expression/ExpressionParser.h
index 59f7c15..2e7b307 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/ExpressionParser.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/ExpressionParser.h
@@ -29,7 +29,7 @@
   ///
   /// Initializes class variables.
   ///
-  /// \param[in] exe_scope,
+  /// \param[in] exe_scope
   ///     If non-NULL, an execution context scope that can help to
   ///     correctly create an expression with a valid process for
   ///     optional tuning Objective-C runtime support. Can be NULL.
@@ -76,17 +76,6 @@
   virtual bool Complete(CompletionRequest &request, unsigned line, unsigned pos,
                         unsigned typed_pos) = 0;
 
-  /// Parse a single expression and convert it to IR using Clang.  Don't wrap
-  /// the expression in anything at all.
-  ///
-  /// \param[in] diagnostic_manager
-  ///     The diagnostic manager in which to store the errors and warnings.
-  ///
-  /// \return
-  ///     The number of errors encountered during parsing.  0 means
-  ///     success.
-  virtual unsigned Parse(DiagnosticManager &diagnostic_manager) = 0;
-
   /// Try to use the FixIts in the diagnostic_manager to rewrite the
   /// expression.  If successful, the rewritten expression is stored in the
   /// diagnostic_manager, get it out with GetFixedExpression.
diff --git a/src/llvm-project/lldb/include/lldb/Expression/ExpressionSourceCode.h b/src/llvm-project/lldb/include/lldb/Expression/ExpressionSourceCode.h
index d0d01b5..db8ef96 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/ExpressionSourceCode.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/ExpressionSourceCode.h
@@ -11,26 +11,34 @@
 
 #include "lldb/lldb-enumerations.h"
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/StringRef.h"
 
 #include <string>
 
 namespace lldb_private {
 
 class ExpressionSourceCode {
+protected:
+  enum Wrapping : bool {
+    Wrap = true,
+    NoWrap = false,
+  };
+
 public:
-  bool NeedsWrapping() const { return m_wrap; }
+  bool NeedsWrapping() const { return m_wrap == Wrap; }
 
   const char *GetName() const { return m_name.c_str(); }
 
 protected:
-  ExpressionSourceCode(const char *name, const char *prefix, const char *body,
-                       bool wrap)
-      : m_name(name), m_prefix(prefix), m_body(body), m_wrap(wrap) {}
+  ExpressionSourceCode(llvm::StringRef name, llvm::StringRef prefix,
+                       llvm::StringRef body, Wrapping wrap)
+      : m_name(name.str()), m_prefix(prefix.str()), m_body(body.str()),
+        m_wrap(wrap) {}
 
   std::string m_name;
   std::string m_prefix;
   std::string m_body;
-  bool m_wrap;
+  Wrapping m_wrap;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Expression/ExpressionVariable.h b/src/llvm-project/lldb/include/lldb/Expression/ExpressionVariable.h
index 08c9872..c20c230 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/ExpressionVariable.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/ExpressionVariable.h
@@ -98,9 +98,7 @@
     EVTypeIsReference = 1 << 6, ///< The original type of this variable is a
                                 ///reference, so materialize the value rather
                                 ///than the location
-    EVUnknownType = 1 << 7, ///< This is a symbol of unknown type, and the type
-                            ///must be resolved after parsing is complete
-    EVBareRegister = 1 << 8 ///< This variable is a direct reference to $pc or
+    EVBareRegister = 1 << 7 ///< This variable is a direct reference to $pc or
                             ///some other entity.
   };
 
diff --git a/src/llvm-project/lldb/include/lldb/Expression/FunctionCaller.h b/src/llvm-project/lldb/include/lldb/Expression/FunctionCaller.h
index ea9d020..1303655 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/FunctionCaller.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/FunctionCaller.h
@@ -54,22 +54,20 @@
 /// Any of the methods that take arg_addr_ptr can be passed nullptr, and the
 /// argument space will be managed for you.
 class FunctionCaller : public Expression {
+  // LLVM RTTI support
+  static char ID;
+
 public:
-  /// LLVM-style RTTI support.
-  static bool classof(const Expression *E) {
-    return E->getKind() == eKindFunctionCaller;
-  }
-  
+  bool isA(const void *ClassID) const override { return ClassID == &ID; }
+  static bool classof(const Expression *obj) { return obj->isA(&ID); }
+
   /// Constructor
   ///
   /// \param[in] exe_scope
   ///     An execution context scope that gets us at least a target and
   ///     process.
   ///
-  /// \param[in] ast_context
-  ///     The AST context to evaluate argument types in.
-  ///
-  /// \param[in] return_qualtype
+  /// \param[in] return_type
   ///     An opaque Clang QualType for the function result.  Should be
   ///     defined in ast_context.
   ///
@@ -223,21 +221,12 @@
   ///     The execution context to insert the function and its arguments
   ///     into.
   ///
-  /// \param[in] func_addr
-  ///     The address of the function in the target process.
-  ///
   /// \param[in] args_addr
   ///     The address of the argument struct.
   ///
   /// \param[in] diagnostic_manager
   ///     The diagnostic manager to report errors to.
   ///
-  /// \param[in] stop_others
-  ///     True if other threads should pause during execution.
-  ///
-  /// \param[in] unwind_on_error
-  ///     True if the thread plan may simply be discarded if an error occurs.
-  ///
   /// \return
   ///     A ThreadPlan shared pointer for executing the function.
   lldb::ThreadPlanSP
diff --git a/src/llvm-project/lldb/include/lldb/Expression/IRExecutionUnit.h b/src/llvm-project/lldb/include/lldb/Expression/IRExecutionUnit.h
index beff44d..05f2f84 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/IRExecutionUnit.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/IRExecutionUnit.h
@@ -173,6 +173,8 @@
   ///     The address in the target process.
   lldb::addr_t GetRemoteAddressForLocal(lldb::addr_t local_address);
 
+  typedef std::pair<lldb::addr_t, uintptr_t> AddrRange;
+
   /// Look up the object in m_address_map that contains a given address, find
   /// where it was copied to, and return its address range in the target
   /// process
@@ -182,12 +184,11 @@
   ///
   /// \return
   ///     The range of the containing object in the target process.
-  typedef std::pair<lldb::addr_t, uintptr_t> AddrRange;
   AddrRange GetRemoteRangeForLocal(lldb::addr_t local_address);
 
   /// Commit all allocations to the process and record where they were stored.
   ///
-  /// \param[in] process
+  /// \param[in] process_sp
   ///     The process to allocate memory in.
   ///
   /// \return
@@ -204,7 +205,7 @@
 
   /// Write the contents of all allocations to the process.
   ///
-  /// \param[in] local_address
+  /// \param[in] process_sp
   ///     The process containing the allocations.
   ///
   /// \return
@@ -298,16 +299,18 @@
       return false;
     }
 
+    // Ignore any EHFrame registration.
     void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr,
                           size_t Size) override {}
+    void deregisterEHFrames() override {}
 
     uint64_t getSymbolAddress(const std::string &Name) override;
-    
+
     // Find the address of the symbol Name.  If Name is a missing weak symbol
     // then missing_weak will be true.
-    uint64_t GetSymbolAddressAndPresence(const std::string &Name, 
+    uint64_t GetSymbolAddressAndPresence(const std::string &Name,
                                          bool &missing_weak);
-    
+
     llvm::JITSymbol findSymbol(const std::string &Name) override;
 
     void *getPointerToNamedFunction(const std::string &Name,
@@ -326,18 +329,16 @@
 
   static const unsigned eSectionIDInvalid = (unsigned)-1;
 
-  /// \class AllocationRecord IRExecutionUnit.h
-  /// "lldb/Expression/IRExecutionUnit.h" Encapsulates a single allocation
-  /// request made by the JIT.
-  ///
-  /// Allocations made by the JIT are first queued up and then applied in bulk
-  /// to the underlying process.
   enum class AllocationKind { Stub, Code, Data, Global, Bytes };
 
   static lldb::SectionType
   GetSectionTypeFromSectionName(const llvm::StringRef &name,
                                 AllocationKind alloc_kind);
 
+  /// Encapsulates a single allocation request made by the JIT.
+  ///
+  /// Allocations made by the JIT are first queued up and then applied in bulk
+  /// to the underlying process.
   struct AllocationRecord {
     std::string m_name;
     lldb::addr_t m_process_address;
diff --git a/src/llvm-project/lldb/include/lldb/Expression/LLVMUserExpression.h b/src/llvm-project/lldb/include/lldb/Expression/LLVMUserExpression.h
index c2af723..2679c01 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/LLVMUserExpression.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/LLVMUserExpression.h
@@ -30,11 +30,14 @@
 /// implementations of LLVMUserExpression - which will be vended through the
 /// appropriate TypeSystem.
 class LLVMUserExpression : public UserExpression {
+  // LLVM RTTI support
+  static char ID;
+
 public:
-  /// LLVM-style RTTI support.
-  static bool classof(const Expression *E) {
-    return E->getKind() == eKindLLVMUserExpression;
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || UserExpression::isA(ClassID);
   }
+  static bool classof(const Expression *obj) { return obj->isA(&ID); }
 
   // The IRPasses struct is filled in by a runtime after an expression is
   // compiled and can be used to to run fixups/analysis passes as required.
@@ -51,8 +54,7 @@
   LLVMUserExpression(ExecutionContextScope &exe_scope, llvm::StringRef expr,
                      llvm::StringRef prefix, lldb::LanguageType language,
                      ResultType desired_type,
-                     const EvaluateExpressionOptions &options,
-                     ExpressionKind kind);
+                     const EvaluateExpressionOptions &options);
   ~LLVMUserExpression() override;
 
   bool FinalizeJITExecution(
@@ -63,6 +65,8 @@
 
   bool CanInterpret() override { return m_can_interpret; }
 
+  Materializer *GetMaterializer() override { return m_materializer_up.get(); }
+
   /// Return the string that the parser should parse.  Must be a full
   /// translation unit.
   const char *Text() override { return m_transformed_text.c_str(); }
@@ -103,22 +107,6 @@
                                                    /// when running the
                                                    /// expression.
   lldb::ModuleWP m_jit_module_wp;
-  bool m_enforce_valid_object; ///< True if the expression parser should enforce
-                               ///the presence of a valid class pointer
-  /// in order to generate the expression as a method.
-  bool m_in_cplusplus_method;  ///< True if the expression is compiled as a C++
-                               ///member function (true if it was parsed
-                               /// when exe_ctx was in a C++ method).
-  bool m_in_objectivec_method; ///< True if the expression is compiled as an
-                               ///Objective-C method (true if it was parsed
-                               /// when exe_ctx was in an Objective-C method).
-  bool m_in_static_method; ///< True if the expression is compiled as a static
-                           ///(or class) method (currently true if it
-  /// was parsed when exe_ctx was in an Objective-C class method).
-  bool m_needs_object_ptr; ///< True if "this" or "self" must be looked up and
-                           ///passed in.  False if the expression
-                           /// doesn't really use them and they can be NULL.
-  bool m_const_object;     ///< True if "this" is const.
   Target *m_target; ///< The target for storing persistent data like types and
                     ///variables.
 
diff --git a/src/llvm-project/lldb/include/lldb/Expression/Materializer.h b/src/llvm-project/lldb/include/lldb/Expression/Materializer.h
index 603b4e0..70f622e 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/Materializer.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/Materializer.h
@@ -115,8 +115,6 @@
     void SetOffset(uint32_t offset) { m_offset = offset; }
 
   protected:
-    void SetSizeAndAlignmentFromType(CompilerType &type);
-
     uint32_t m_alignment;
     uint32_t m_size;
     uint32_t m_offset;
diff --git a/src/llvm-project/lldb/include/lldb/Expression/REPL.h b/src/llvm-project/lldb/include/lldb/Expression/REPL.h
index 850d2f6..035ad63 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/REPL.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/REPL.h
@@ -32,7 +32,7 @@
   /// Get a REPL with an existing target (or, failing that, a debugger to use),
   /// and (optional) extra arguments for the compiler.
   ///
-  /// \param[out] error
+  /// \param[out] Status
   ///     If this language is supported but the REPL couldn't be created, this
   ///     error is populated with the reason.
   ///
@@ -103,10 +103,8 @@
   void IOHandlerInputComplete(IOHandler &io_handler,
                               std::string &line) override;
 
-  int IOHandlerComplete(IOHandler &io_handler, const char *current_line,
-                        const char *cursor, const char *last_char,
-                        int skip_first_n_matches, int max_matches,
-                        StringList &matches, StringList &descriptions) override;
+  void IOHandlerComplete(IOHandler &io_handler,
+                         CompletionRequest &request) override;
 
 protected:
   static int CalculateActualIndentation(const StringList &lines);
diff --git a/src/llvm-project/lldb/include/lldb/Expression/UserExpression.h b/src/llvm-project/lldb/include/lldb/Expression/UserExpression.h
index b1d52f8..83122d8 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/UserExpression.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/UserExpression.h
@@ -33,12 +33,13 @@
 /// implementations of UserExpression - which will be vended through the
 /// appropriate TypeSystem.
 class UserExpression : public Expression {
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
-  /// LLVM-style RTTI support.
-  static bool classof(const Expression *E) {
-    return E->getKind() == eKindUserExpression;
-  }
-  
+  bool isA(const void *ClassID) const override { return ClassID == &ID; }
+  static bool classof(const Expression *obj) { return obj->isA(&ID); }
+
   enum { kDefaultTimeout = 500000u };
 
   /// Constructor
@@ -46,10 +47,6 @@
   /// \param[in] expr
   ///     The expression to parse.
   ///
-  /// \param[in] expr_prefix
-  ///     If non-nullptr, a C string containing translation-unit level
-  ///     definitions to be included when the expression is parsed.
-  ///
   /// \param[in] language
   ///     If not eLanguageTypeUnknown, a language to use when parsing
   ///     the expression.  Currently restricted to those languages
@@ -61,8 +58,7 @@
   UserExpression(ExecutionContextScope &exe_scope, llvm::StringRef expr,
                  llvm::StringRef prefix, lldb::LanguageType language,
                  ResultType desired_type,
-                 const EvaluateExpressionOptions &options,
-                 ExpressionKind kind);
+                 const EvaluateExpressionOptions &options);
 
   /// Destructor
   ~UserExpression() override;
@@ -166,8 +162,14 @@
   ///     A pointer to direct at the persistent variable in which the
   ///     expression's result is stored.
   ///
-  /// \param[in] function_stack_pointer
-  ///     A pointer to the base of the function's stack frame.  This
+  /// \param[in] function_stack_bottom
+  ///     A pointer to the bottom of the function's stack frame.  This
+  ///     is used to determine whether the expression result resides in
+  ///     memory that will still be valid, or whether it needs to be
+  ///     treated as homeless for the purpose of future expressions.
+  ///
+  /// \param[in] function_stack_top
+  ///     A pointer to the top of the function's stack frame.  This
   ///     is used to determine whether the expression result resides in
   ///     memory that will still be valid, or whether it needs to be
   ///     treated as homeless for the purpose of future expressions.
diff --git a/src/llvm-project/lldb/include/lldb/Expression/UtilityFunction.h b/src/llvm-project/lldb/include/lldb/Expression/UtilityFunction.h
index 26da081..c3d1858 100644
--- a/src/llvm-project/lldb/include/lldb/Expression/UtilityFunction.h
+++ b/src/llvm-project/lldb/include/lldb/Expression/UtilityFunction.h
@@ -28,12 +28,13 @@
 /// self-contained function meant to be used from other code.  Utility
 /// functions can perform error-checking for ClangUserExpressions,
 class UtilityFunction : public Expression {
+  // LLVM RTTI support
+  static char ID;
+
 public:
-  /// LLVM-style RTTI support.
-  static bool classof(const Expression *E) {
-    return E->getKind() == eKindUtilityFunction;
-  }
-  
+  bool isA(const void *ClassID) const override { return ClassID == &ID; }
+  static bool classof(const Expression *obj) { return obj->isA(&ID); }
+
   /// Constructor
   ///
   /// \param[in] text
@@ -42,7 +43,7 @@
   /// \param[in] name
   ///     The name of the function, as used in the text.
   UtilityFunction(ExecutionContextScope &exe_scope, const char *text,
-                  const char *name, ExpressionKind kind);
+                  const char *name);
 
   ~UtilityFunction() override;
 
@@ -59,16 +60,16 @@
   virtual bool Install(DiagnosticManager &diagnostic_manager,
                        ExecutionContext &exe_ctx) = 0;
 
-  /// Check whether the given PC is inside the function
+  /// Check whether the given address is inside the function
   ///
   /// Especially useful if the function dereferences nullptr to indicate a
   /// failed assert.
   ///
-  /// \param[in] pc
-  ///     The program counter to check.
+  /// \param[in] address
+  ///     The address to check.
   ///
   /// \return
-  ///     True if the program counter falls within the function's bounds;
+  ///     True if the address falls within the function's bounds;
   ///     false if not (or the function is not JIT compiled)
   bool ContainsAddress(lldb::addr_t address) {
     // nothing is both >= LLDB_INVALID_ADDRESS and < LLDB_INVALID_ADDRESS, so
diff --git a/src/llvm-project/lldb/include/lldb/Host/Config.h b/src/llvm-project/lldb/include/lldb/Host/Config.h
deleted file mode 100644
index ff94ffc..0000000
--- a/src/llvm-project/lldb/include/lldb/Host/Config.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//===-- Config.h ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_HOST_CONFIG_H
-#define LLDB_HOST_CONFIG_H
- 
-#if defined(__APPLE__)
-
-// This block of code only exists to keep the Xcode project working in the
-// absence of a configuration step.
-#define LLDB_LIBDIR_SUFFIX ""
-
-#define LLDB_CONFIG_TERMIOS_SUPPORTED 1
-
-#define LLDB_EDITLINE_USE_WCHAR 1
-
-#define LLDB_HAVE_EL_RFUNC_T 1
-
-#define HAVE_SYS_EVENT_H 1
-
-#define HAVE_PPOLL 0
-
-#define HAVE_SIGACTION 1
-
-#define HAVE_LIBCOMPRESSION 1
-
-#else
-
-#error This file is only used by the Xcode build.
-
-#endif
-
-#endif // #ifndef LLDB_HOST_CONFIG_H
diff --git a/src/llvm-project/lldb/include/lldb/Host/Config.h.cmake b/src/llvm-project/lldb/include/lldb/Host/Config.h.cmake
index b8fb9e9..e9065ed 100644
--- a/src/llvm-project/lldb/include/lldb/Host/Config.h.cmake
+++ b/src/llvm-project/lldb/include/lldb/Host/Config.h.cmake
@@ -9,15 +9,12 @@
 #ifndef LLDB_HOST_CONFIG_H
 #define LLDB_HOST_CONFIG_H
 
-#cmakedefine LLDB_CONFIG_TERMIOS_SUPPORTED
-
 #cmakedefine01 LLDB_EDITLINE_USE_WCHAR
 
 #cmakedefine01 LLDB_HAVE_EL_RFUNC_T
 
-#cmakedefine LLDB_DISABLE_POSIX
 
-#define LLDB_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}"
+#cmakedefine01 HAVE_SYS_TYPES_H
 
 #cmakedefine01 HAVE_SYS_EVENT_H
 
@@ -33,4 +30,24 @@
 #cmakedefine HAVE_LIBCOMPRESSION
 #endif
 
+#cmakedefine01 LLDB_ENABLE_POSIX
+
+#cmakedefine01 LLDB_ENABLE_TERMIOS
+
+#cmakedefine01 LLDB_ENABLE_LZMA
+
+#cmakedefine01 LLDB_ENABLE_CURSES
+
+#cmakedefine01 LLDB_ENABLE_LIBEDIT
+
+#cmakedefine01 LLDB_ENABLE_LIBXML2
+
+#cmakedefine01 LLDB_ENABLE_LUA
+
+#cmakedefine01 LLDB_ENABLE_PYTHON
+
+#cmakedefine LLDB_PYTHON_HOME "${LLDB_PYTHON_HOME}"
+
+#define LLDB_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}"
+
 #endif // #ifndef LLDB_HOST_CONFIG_H
diff --git a/src/llvm-project/lldb/include/lldb/Host/Editline.h b/src/llvm-project/lldb/include/lldb/Host/Editline.h
index a942ede..db3d9e4 100644
--- a/src/llvm-project/lldb/include/lldb/Host/Editline.h
+++ b/src/llvm-project/lldb/include/lldb/Host/Editline.h
@@ -32,6 +32,8 @@
 #define liblldb_Editline_h_
 #if defined(__cplusplus)
 
+#include "lldb/Host/Config.h"
+
 #if LLDB_EDITLINE_USE_WCHAR
 #include <codecvt>
 #endif
@@ -53,6 +55,7 @@
 #include <vector>
 
 #include "lldb/Host/ConnectionFileDescriptor.h"
+#include "lldb/Utility/CompletionRequest.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Predicate.h"
 
@@ -97,11 +100,7 @@
                                           const StringList &lines,
                                           int cursor_position, void *baton);
 
-typedef int (*CompleteCallbackType)(const char *current_line,
-                                    const char *cursor, const char *last_char,
-                                    int skip_first_n_matches, int max_matches,
-                                    StringList &matches,
-                                    StringList &descriptions, void *baton);
+typedef void (*CompleteCallbackType)(CompletionRequest &request, void *baton);
 
 /// Status used to decide when and how to start editing another line in
 /// multi-line sessions
@@ -136,6 +135,15 @@
   /// session
   BlockEnd
 };
+
+/// Operation for the history.
+enum class HistoryOperation {
+  Oldest,
+  Older,
+  Current,
+  Newer,
+  Newest
+};
 }
 
 using namespace line_editor;
@@ -261,11 +269,7 @@
   StringList GetInputAsStringList(int line_count = UINT32_MAX);
 
   /// Replaces the current multi-line session with the next entry from history.
-  /// When the parameter is
-  /// true it will take the next earlier entry from history, when it is false it
-  /// takes the next most
-  /// recent.
-  unsigned char RecallHistory(bool earlier);
+  unsigned char RecallHistory(HistoryOperation op);
 
   /// Character reading implementation for EditLine that supports our multi-line
   /// editing trickery.
diff --git a/src/llvm-project/lldb/include/lldb/Host/File.h b/src/llvm-project/lldb/include/lldb/Host/File.h
index eb28c4a..9beb205 100644
--- a/src/llvm-project/lldb/include/lldb/Host/File.h
+++ b/src/llvm-project/lldb/include/lldb/Host/File.h
@@ -13,6 +13,7 @@
 #include "lldb/Utility/IOObject.h"
 #include "lldb/Utility/Status.h"
 #include "lldb/lldb-private.h"
+#include "llvm/ADT/BitmaskEnum.h"
 
 #include <mutex>
 #include <stdarg.h>
@@ -21,11 +22,15 @@
 
 namespace lldb_private {
 
+LLVM_ENABLE_BITMASK_ENUMS_IN_NAMESPACE();
+
 /// \class File File.h "lldb/Host/File.h"
-/// A file class.
+/// An abstract base class for files.
 ///
-/// A file class that divides abstracts the LLDB core from host file
-/// functionality.
+/// Files will often be NativeFiles, which provides a wrapper
+/// around host OS file functionality.   But it
+/// is also possible to subclass file to provide objects that have file
+/// or stream functionality but are not backed by any host OS file.
 class File : public IOObject {
 public:
   static int kInvalidDescriptor;
@@ -33,7 +38,12 @@
 
   // NB this enum is used in the lldb platform gdb-remote packet
   // vFile:open: and existing values cannot be modified.
-  enum OpenOptions {
+  //
+  // FIXME
+  // These values do not match the values used by GDB
+  // * https://sourceware.org/gdb/onlinedocs/gdb/Open-Flags.html#Open-Flags
+  // * rdar://problem/46788934
+  enum OpenOptions : uint32_t {
     eOpenOptionRead = (1u << 0),  // Open file for reading
     eOpenOptionWrite = (1u << 1), // Open file for writing
     eOpenOptionAppend =
@@ -45,129 +55,102 @@
         (1u << 6), // Can create file only if it doesn't already exist
     eOpenOptionDontFollowSymlinks = (1u << 7),
     eOpenOptionCloseOnExec =
-        (1u << 8) // Close the file when executing a new process
+        (1u << 8), // Close the file when executing a new process
+    LLVM_MARK_AS_BITMASK_ENUM(/* largest_value= */ eOpenOptionCloseOnExec)
   };
 
-  static mode_t ConvertOpenOptionsForPOSIXOpen(uint32_t open_options);
+  static mode_t ConvertOpenOptionsForPOSIXOpen(OpenOptions open_options);
+  static llvm::Expected<OpenOptions> GetOptionsFromMode(llvm::StringRef mode);
+  static bool DescriptorIsValid(int descriptor) { return descriptor >= 0; };
+  static llvm::Expected<const char *>
+  GetStreamOpenModeFromOptions(OpenOptions options);
 
   File()
-      : IOObject(eFDTypeFile, false), m_descriptor(kInvalidDescriptor),
-        m_stream(kInvalidStream), m_options(0), m_own_stream(false),
-        m_is_interactive(eLazyBoolCalculate),
+      : IOObject(eFDTypeFile), m_is_interactive(eLazyBoolCalculate),
         m_is_real_terminal(eLazyBoolCalculate),
-        m_supports_colors(eLazyBoolCalculate) {}
+        m_supports_colors(eLazyBoolCalculate){};
 
-  File(FILE *fh, bool transfer_ownership)
-      : IOObject(eFDTypeFile, false), m_descriptor(kInvalidDescriptor),
-        m_stream(fh), m_options(0), m_own_stream(transfer_ownership),
-        m_is_interactive(eLazyBoolCalculate),
-        m_is_real_terminal(eLazyBoolCalculate),
-        m_supports_colors(eLazyBoolCalculate) {}
-
-  File(int fd, bool transfer_ownership)
-      : IOObject(eFDTypeFile, transfer_ownership), m_descriptor(fd),
-        m_stream(kInvalidStream), m_options(0), m_own_stream(false),
-        m_is_interactive(eLazyBoolCalculate),
-        m_is_real_terminal(eLazyBoolCalculate) {}
-
-  /// Destructor.
-  ///
-  /// The destructor is virtual in case this class is subclassed.
-  ~File() override;
-
-  bool IsValid() const override {
-    return DescriptorIsValid() || StreamIsValid();
-  }
-
-  /// Convert to pointer operator.
-  ///
-  /// This allows code to check a File object to see if it contains anything
-  /// valid using code such as:
-  ///
-  /// \code
-  /// File file(...);
-  /// if (file)
-  /// { ...
-  /// \endcode
-  ///
-  /// \return
-  ///     A pointer to this object if either the directory or filename
-  ///     is valid, nullptr otherwise.
-  operator bool() const { return DescriptorIsValid() || StreamIsValid(); }
-
-  /// Logical NOT operator.
-  ///
-  /// This allows code to check a File object to see if it is invalid using
-  /// code such as:
-  ///
-  /// \code
-  /// File file(...);
-  /// if (!file)
-  /// { ...
-  /// \endcode
-  ///
-  /// \return
-  ///     Returns \b true if the object has an empty directory and
-  ///     filename, \b false otherwise.
-  bool operator!() const { return !DescriptorIsValid() && !StreamIsValid(); }
-
-  /// Get the file spec for this file.
-  ///
-  /// \return
-  ///     A reference to the file specification object.
-  Status GetFileSpec(FileSpec &file_spec) const;
-
-  Status Close() override;
-
-  void Clear();
-
-  int GetDescriptor() const;
-
-  WaitableHandle GetWaitableHandle() override;
-
-  void SetDescriptor(int fd, bool transfer_ownership);
-
-  FILE *GetStream();
-
-  void SetStream(FILE *fh, bool transfer_ownership);
-
-  /// Read bytes from a file from the current file position.
+  /// Read bytes from a file from the current file position into buf.
   ///
   /// NOTE: This function is NOT thread safe. Use the read function
   /// that takes an "off_t &offset" to ensure correct operation in multi-
   /// threaded environments.
   ///
-  /// \param[in] buf
-  ///     A buffer where to put the bytes that are read.
-  ///
   /// \param[in,out] num_bytes
-  ///     The number of bytes to read form the current file position
-  ///     which gets modified with the number of bytes that were read.
+  ///    Pass in the size of buf.  Read will pass out the number
+  ///    of bytes read.   Zero bytes read with no error indicates
+  ///    EOF.
   ///
   /// \return
-  ///     An error object that indicates success or the reason for
-  ///     failure.
+  ///    success, ENOTSUP, or another error.
   Status Read(void *buf, size_t &num_bytes) override;
 
-  /// Write bytes to a file at the current file position.
+  /// Write bytes from buf to a file at the current file position.
   ///
   /// NOTE: This function is NOT thread safe. Use the write function
   /// that takes an "off_t &offset" to ensure correct operation in multi-
   /// threaded environments.
   ///
-  /// \param[in] buf
-  ///     A buffer where to put the bytes that are read.
-  ///
   /// \param[in,out] num_bytes
-  ///     The number of bytes to write to the current file position
-  ///     which gets modified with the number of bytes that were
-  ///     written.
+  ///    Pass in the size of buf.  Write will pass out the number
+  ///    of bytes written.   Write will attempt write the full number
+  ///    of bytes and will not return early except on error.
   ///
   /// \return
-  ///     An error object that indicates success or the reason for
-  ///     failure.
+  ///    success, ENOTSUP, or another error.
   Status Write(const void *buf, size_t &num_bytes) override;
 
+  /// IsValid
+  ///
+  /// \return
+  ///    true iff the file is valid.
+  bool IsValid() const override;
+
+  /// Flush any buffers and release any resources owned by the file.
+  /// After Close() the file will be invalid.
+  ///
+  /// \return
+  ///     success or an error.
+  Status Close() override;
+
+  /// Get a handle that can be used for OS polling interfaces, such
+  /// as WaitForMultipleObjects, select, or epoll.   This may return
+  /// IOObject::kInvalidHandleValue if none is available.   This will
+  /// generally be the same as the file descriptor, this function
+  /// is not interchangeable with GetDescriptor().   A WaitableHandle
+  /// must only be used for polling, not actual I/O.
+  ///
+  /// \return
+  ///     a valid handle or IOObject::kInvalidHandleValue
+  WaitableHandle GetWaitableHandle() override;
+
+  /// Get the file specification for this file, if possible.
+  ///
+  /// \param[out] file_spec
+  ///     the file specification.
+  /// \return
+  ///     ENOTSUP, success, or another error.
+  virtual Status GetFileSpec(FileSpec &file_spec) const;
+
+  /// Get underlying OS file descriptor for this file, or kInvalidDescriptor.
+  /// If the descriptor is valid, then it may be used directly for I/O
+  /// However, the File may also perform it's own buffering, so avoid using
+  /// this if it is not necessary, or use Flush() appropriately.
+  ///
+  /// \return
+  ///    a valid file descriptor for this file or kInvalidDescriptor
+  virtual int GetDescriptor() const;
+
+  /// Get the underlying libc stream for this file, or NULL.
+  ///
+  /// Not all valid files will have a FILE* stream.   This should only be
+  /// used if absolutely necessary, such as to interact with 3rd party
+  /// libraries that need FILE* streams.
+  ///
+  /// \return
+  ///    a valid stream or NULL;
+  virtual FILE *GetStream();
+
   /// Seek to an offset relative to the beginning of the file.
   ///
   /// NOTE: This function is NOT thread safe, other threads that
@@ -186,7 +169,7 @@
   ///
   /// \return
   ///     The resulting seek offset, or -1 on error.
-  off_t SeekFromStart(off_t offset, Status *error_ptr = nullptr);
+  virtual off_t SeekFromStart(off_t offset, Status *error_ptr = nullptr);
 
   /// Seek to an offset relative to the current file position.
   ///
@@ -206,7 +189,7 @@
   ///
   /// \return
   ///     The resulting seek offset, or -1 on error.
-  off_t SeekFromCurrent(off_t offset, Status *error_ptr = nullptr);
+  virtual off_t SeekFromCurrent(off_t offset, Status *error_ptr = nullptr);
 
   /// Seek to an offset relative to the end of the file.
   ///
@@ -227,7 +210,7 @@
   ///
   /// \return
   ///     The resulting seek offset, or -1 on error.
-  off_t SeekFromEnd(off_t offset, Status *error_ptr = nullptr);
+  virtual off_t SeekFromEnd(off_t offset, Status *error_ptr = nullptr);
 
   /// Read bytes from a file from the specified file offset.
   ///
@@ -250,37 +233,7 @@
   /// \return
   ///     An error object that indicates success or the reason for
   ///     failure.
-  Status Read(void *dst, size_t &num_bytes, off_t &offset);
-
-  /// Read bytes from a file from the specified file offset.
-  ///
-  /// NOTE: This function is thread safe in that clients manager their
-  /// own file position markers and reads on other threads won't mess up the
-  /// current read.
-  ///
-  /// \param[in,out] num_bytes
-  ///     The number of bytes to read form the current file position
-  ///     which gets modified with the number of bytes that were read.
-  ///
-  /// \param[in,out] offset
-  ///     The offset within the file from which to read \a num_bytes
-  ///     bytes. This offset gets incremented by the number of bytes
-  ///     that were read.
-  ///
-  /// \param[in] null_terminate
-  ///     Ensure that the data that is read is terminated with a NULL
-  ///     character so that the data can be used as a C string.
-  ///
-  /// \param[out] data_buffer_sp
-  ///     A data buffer to create and fill in that will contain any
-  ///     data that is read from the file. This buffer will be reset
-  ///     if an error occurs.
-  ///
-  /// \return
-  ///     An error object that indicates success or the reason for
-  ///     failure.
-  Status Read(size_t &num_bytes, off_t &offset, bool null_terminate,
-              lldb::DataBufferSP &data_buffer_sp);
+  virtual Status Read(void *dst, size_t &num_bytes, off_t &offset);
 
   /// Write bytes to a file at the specified file offset.
   ///
@@ -305,21 +258,67 @@
   /// \return
   ///     An error object that indicates success or the reason for
   ///     failure.
-  Status Write(const void *src, size_t &num_bytes, off_t &offset);
+  virtual Status Write(const void *src, size_t &num_bytes, off_t &offset);
 
   /// Flush the current stream
   ///
   /// \return
   ///     An error object that indicates success or the reason for
   ///     failure.
-  Status Flush();
+  virtual Status Flush();
 
   /// Sync to disk.
   ///
   /// \return
   ///     An error object that indicates success or the reason for
   ///     failure.
-  Status Sync();
+  virtual Status Sync();
+
+  /// Output printf formatted output to the stream.
+  ///
+  /// NOTE: this is not virtual, because it just calls the va_list
+  /// version of the function.
+  ///
+  /// Print some formatted output to the stream.
+  ///
+  /// \param[in] format
+  ///     A printf style format string.
+  ///
+  /// \param[in] ...
+  ///     Variable arguments that are needed for the printf style
+  ///     format string \a format.
+  size_t Printf(const char *format, ...) __attribute__((format(printf, 2, 3)));
+
+  /// Output printf formatted output to the stream.
+  ///
+  /// Print some formatted output to the stream.
+  ///
+  /// \param[in] format
+  ///     A printf style format string.
+  ///
+  /// \param[in] args
+  ///     Variable arguments that are needed for the printf style
+  ///     format string \a format.
+  virtual size_t PrintfVarArg(const char *format, va_list args);
+
+  /// Return the OpenOptions for this file.
+  ///
+  /// Some options like eOpenOptionDontFollowSymlinks only make
+  /// sense when a file is being opened (or not at all)
+  /// and may not be preserved for this method.  But any valid
+  /// File should return either or both of eOpenOptionRead and
+  /// eOpenOptionWrite here.
+  ///
+  /// \return
+  ///    OpenOptions flags for this file, or an error.
+  virtual llvm::Expected<OpenOptions> GetOptions() const;
+
+  llvm::Expected<const char *> GetOpenMode() const {
+    auto opts = GetOptions();
+    if (!opts)
+      return opts.takeError();
+    return GetStreamOpenModeFromOptions(opts.get());
+  }
 
   /// Get the permissions for a this file.
   ///
@@ -346,47 +345,92 @@
   ///     a non-zero width and height, false otherwise.
   bool GetIsRealTerminal();
 
+  /// Return true if this file is a terminal which supports colors.
+  ///
+  /// \return
+  ///    True iff this is a terminal and it supports colors.
   bool GetIsTerminalWithColors();
 
-  /// Output printf formatted output to the stream.
-  ///
-  /// Print some formatted output to the stream.
-  ///
-  /// \param[in] format
-  ///     A printf style format string.
-  ///
-  /// \param[in] ...
-  ///     Variable arguments that are needed for the printf style
-  ///     format string \a format.
-  size_t Printf(const char *format, ...) __attribute__((format(printf, 2, 3)));
+  operator bool() const { return IsValid(); };
 
-  size_t PrintfVarArg(const char *format, va_list args);
+  bool operator!() const { return !IsValid(); };
 
-  void SetOptions(uint32_t options) { m_options = options; }
-
-  static bool DescriptorIsValid(int descriptor) { return descriptor >= 0; };
+  static char ID;
+  virtual bool isA(const void *classID) const { return classID == &ID; }
+  static bool classof(const File *file) { return file->isA(&ID); }
 
 protected:
-  bool DescriptorIsValid() const { return DescriptorIsValid(m_descriptor); }
-
-  bool StreamIsValid() const { return m_stream != kInvalidStream; }
-
-  void CalculateInteractiveAndTerminal();
-
-  // Member variables
-  int m_descriptor;
-  FILE *m_stream;
-  uint32_t m_options;
-  bool m_own_stream;
   LazyBool m_is_interactive;
   LazyBool m_is_real_terminal;
   LazyBool m_supports_colors;
-  std::mutex offset_access_mutex;
+
+  void CalculateInteractiveAndTerminal();
 
 private:
   DISALLOW_COPY_AND_ASSIGN(File);
 };
 
+class NativeFile : public File {
+public:
+  NativeFile()
+      : m_descriptor(kInvalidDescriptor), m_own_descriptor(false),
+        m_stream(kInvalidStream), m_options(), m_own_stream(false) {}
+
+  NativeFile(FILE *fh, bool transfer_ownership)
+      : m_descriptor(kInvalidDescriptor), m_own_descriptor(false), m_stream(fh),
+        m_options(), m_own_stream(transfer_ownership) {}
+
+  NativeFile(int fd, OpenOptions options, bool transfer_ownership)
+      : m_descriptor(fd), m_own_descriptor(transfer_ownership),
+        m_stream(kInvalidStream), m_options(options), m_own_stream(false) {}
+
+  ~NativeFile() override { Close(); }
+
+  bool IsValid() const override {
+    return DescriptorIsValid() || StreamIsValid();
+  }
+
+  Status Read(void *buf, size_t &num_bytes) override;
+  Status Write(const void *buf, size_t &num_bytes) override;
+  Status Close() override;
+  WaitableHandle GetWaitableHandle() override;
+  Status GetFileSpec(FileSpec &file_spec) const override;
+  int GetDescriptor() const override;
+  FILE *GetStream() override;
+  off_t SeekFromStart(off_t offset, Status *error_ptr = nullptr) override;
+  off_t SeekFromCurrent(off_t offset, Status *error_ptr = nullptr) override;
+  off_t SeekFromEnd(off_t offset, Status *error_ptr = nullptr) override;
+  Status Read(void *dst, size_t &num_bytes, off_t &offset) override;
+  Status Write(const void *src, size_t &num_bytes, off_t &offset) override;
+  Status Flush() override;
+  Status Sync() override;
+  size_t PrintfVarArg(const char *format, va_list args) override;
+  llvm::Expected<OpenOptions> GetOptions() const override;
+
+  static char ID;
+  virtual bool isA(const void *classID) const override {
+    return classID == &ID || File::isA(classID);
+  }
+  static bool classof(const File *file) { return file->isA(&ID); }
+
+protected:
+  bool DescriptorIsValid() const {
+    return File::DescriptorIsValid(m_descriptor);
+  }
+  bool StreamIsValid() const { return m_stream != kInvalidStream; }
+
+  // Member variables
+  int m_descriptor;
+  bool m_own_descriptor;
+  FILE *m_stream;
+  OpenOptions m_options;
+  bool m_own_stream;
+  std::mutex offset_access_mutex;
+
+private:
+  DISALLOW_COPY_AND_ASSIGN(NativeFile);
+};
+
 } // namespace lldb_private
 
 #endif // liblldb_File_h_
diff --git a/src/llvm-project/lldb/include/lldb/Host/FileCache.h b/src/llvm-project/lldb/include/lldb/Host/FileCache.h
index 0c1ef19..c769167 100644
--- a/src/llvm-project/lldb/include/lldb/Host/FileCache.h
+++ b/src/llvm-project/lldb/include/lldb/Host/FileCache.h
@@ -14,6 +14,7 @@
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-types.h"
 
+#include "lldb/Host/File.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Status.h"
 
@@ -22,12 +23,12 @@
 private:
   FileCache() {}
 
-  typedef std::map<lldb::user_id_t, lldb::FileSP> FDToFileMap;
+  typedef std::map<lldb::user_id_t, lldb::FileUP> FDToFileMap;
 
 public:
   static FileCache &GetInstance();
 
-  lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags,
+  lldb::user_id_t OpenFile(const FileSpec &file_spec, File::OpenOptions flags,
                            uint32_t mode, Status &error);
   bool CloseFile(lldb::user_id_t fd, Status &error);
 
diff --git a/src/llvm-project/lldb/include/lldb/Host/FileSystem.h b/src/llvm-project/lldb/include/lldb/Host/FileSystem.h
index 865b09b..528c435 100644
--- a/src/llvm-project/lldb/include/lldb/Host/FileSystem.h
+++ b/src/llvm-project/lldb/include/lldb/Host/FileSystem.h
@@ -11,12 +11,12 @@
 
 #include "lldb/Host/File.h"
 #include "lldb/Utility/DataBufferLLVM.h"
-#include "lldb/Utility/FileCollector.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Status.h"
 
 #include "llvm/ADT/Optional.h"
 #include "llvm/Support/Chrono.h"
+#include "llvm/Support/FileCollector.h"
 #include "llvm/Support/VirtualFileSystem.h"
 
 #include "lldb/lldb-types.h"
@@ -34,8 +34,8 @@
   FileSystem()
       : m_fs(llvm::vfs::getRealFileSystem()), m_collector(nullptr),
         m_mapped(false) {}
-  FileSystem(FileCollector &collector)
-      : m_fs(llvm::vfs::getRealFileSystem()), m_collector(&collector),
+  FileSystem(std::shared_ptr<llvm::FileCollector> collector)
+      : m_fs(llvm::vfs::getRealFileSystem()), m_collector(collector),
         m_mapped(false) {}
   FileSystem(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs,
              bool mapped = false)
@@ -47,7 +47,7 @@
   static FileSystem &Instance();
 
   static void Initialize();
-  static void Initialize(FileCollector &collector);
+  static void Initialize(std::shared_ptr<llvm::FileCollector> collector);
   static llvm::Error Initialize(const FileSpec &mapping);
   static void Initialize(llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> fs);
   static void Terminate();
@@ -63,9 +63,10 @@
   /// Wraps ::open in a platform-independent way.
   int Open(const char *path, int flags, int mode);
 
-  Status Open(File &File, const FileSpec &file_spec, uint32_t options,
-              uint32_t permissions = lldb::eFilePermissionsFileDefault,
-              bool should_close_fd = true);
+  llvm::Expected<std::unique_ptr<File>>
+  Open(const FileSpec &file_spec, File::OpenOptions options,
+       uint32_t permissions = lldb::eFilePermissionsFileDefault,
+       bool should_close_fd = true);
 
   /// Get a directory iterator.
   /// \{
@@ -188,7 +189,7 @@
 private:
   static llvm::Optional<FileSystem> &InstanceImpl();
   llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem> m_fs;
-  FileCollector *m_collector;
+  std::shared_ptr<llvm::FileCollector> m_collector;
   bool m_mapped;
 };
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Host/HostInfoBase.h b/src/llvm-project/lldb/include/lldb/Host/HostInfoBase.h
index 6f66889..c59050c 100644
--- a/src/llvm-project/lldb/include/lldb/Host/HostInfoBase.h
+++ b/src/llvm-project/lldb/include/lldb/Host/HostInfoBase.h
@@ -33,17 +33,12 @@
   static void Initialize();
   static void Terminate();
 
-  /// Gets the host target triple as a const string.
+  /// Gets the host target triple.
   ///
   /// \return
-  ///     A const string object containing the host target triple.
-  static llvm::StringRef GetTargetTriple();
+  ///     The host target triple.
+  static llvm::Triple GetTargetTriple();
 
-  /// Gets the host architecture.
-  ///
-  /// \return
-  ///     A const architecture object that represents the host
-  ///     architecture.
   enum ArchitectureKind {
     eArchKindDefault, // The overall default architecture that applications will
                       // run on this host
diff --git a/src/llvm-project/lldb/include/lldb/Host/HostProcess.h b/src/llvm-project/lldb/include/lldb/Host/HostProcess.h
index d48ff1f..fcea52a 100644
--- a/src/llvm-project/lldb/include/lldb/Host/HostProcess.h
+++ b/src/llvm-project/lldb/include/lldb/Host/HostProcess.h
@@ -12,7 +12,6 @@
 #include "lldb/Host/Host.h"
 #include "lldb/lldb-types.h"
 
-/// \class HostInfo HostInfo.h "lldb/Host/HostProcess.h"
 /// A class that represents a running process on the host machine.
 ///
 /// HostProcess allows querying and manipulation of processes running on the
diff --git a/src/llvm-project/lldb/include/lldb/Host/LZMA.h b/src/llvm-project/lldb/include/lldb/Host/LZMA.h
new file mode 100644
index 0000000..c741cc3
--- /dev/null
+++ b/src/llvm-project/lldb/include/lldb/Host/LZMA.h
@@ -0,0 +1,34 @@
+//===-- LZMA.h --------------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_Host_LZMA_h_
+#define liblldb_Host_LZMA_h_
+
+#include "llvm/ADT/ArrayRef.h"
+
+namespace llvm {
+class Error;
+} // End of namespace llvm
+
+namespace lldb_private {
+
+namespace lzma {
+	
+bool isAvailable();
+
+llvm::Expected<uint64_t>
+getUncompressedSize(llvm::ArrayRef<uint8_t> InputBuffer);
+
+llvm::Error uncompress(llvm::ArrayRef<uint8_t> InputBuffer,
+                       llvm::SmallVectorImpl<uint8_t> &Uncompressed);
+
+} // End of namespace lzma
+
+} // End of namespace lldb_private
+
+#endif // liblldb_Host_LZMA_h_
diff --git a/src/llvm-project/lldb/include/lldb/Host/PseudoTerminal.h b/src/llvm-project/lldb/include/lldb/Host/PseudoTerminal.h
index 8b27890..18679b6 100644
--- a/src/llvm-project/lldb/include/lldb/Host/PseudoTerminal.h
+++ b/src/llvm-project/lldb/include/lldb/Host/PseudoTerminal.h
@@ -61,14 +61,14 @@
   /// PseudoTerminal::ReleaseMasterFileDescriptor() @li
   /// PseudoTerminal::ReleaseSaveFileDescriptor()
   ///
-  /// \param[out] error
+  /// \param[out] error_str
   ///     An pointer to an error that can describe any errors that
   ///     occur. This can be NULL if no error status is desired.
   ///
   /// \return
-  ///     \li \b Parent process: a child process ID that is greater
+  ///     \b Parent process: a child process ID that is greater
   ///         than zero, or -1 if the fork fails.
-  ///     \li \b Child process: zero.
+  ///     \b Child process: zero.
   lldb::pid_t Fork(char *error_str, size_t error_len);
 
   /// The master file descriptor accessor.
@@ -104,7 +104,7 @@
   /// A master pseudo terminal should already be valid prior to
   /// calling this function.
   ///
-  /// \param[out] error
+  /// \param[out] error_str
   ///     An pointer to an error that can describe any errors that
   ///     occur. This can be NULL if no error status is desired.
   ///
@@ -136,14 +136,14 @@
   ///     Flags to use when calling \c posix_openpt(\a oflag).
   ///     A value of "O_RDWR|O_NOCTTY" is suggested.
   ///
-  /// \param[out] error
+  /// \param[out] error_str
   ///     An pointer to an error that can describe any errors that
   ///     occur. This can be NULL if no error status is desired.
   ///
   /// \return
-  ///     \li \b true when the master files descriptor is
+  ///     \b true when the master files descriptor is
   ///         successfully opened.
-  ///     \li \b false if anything goes wrong.
+  ///     \b false if anything goes wrong.
   ///
   /// \see PseudoTerminal::GetMasterFileDescriptor() @see
   /// PseudoTerminal::ReleaseMasterFileDescriptor()
@@ -165,14 +165,14 @@
   /// \param[in] oflag
   ///     Flags to use when calling \c open(\a oflag).
   ///
-  /// \param[out] error
+  /// \param[out] error_str
   ///     An pointer to an error that can describe any errors that
   ///     occur. This can be NULL if no error status is desired.
   ///
   /// \return
-  ///     \li \b true when the master files descriptor is
+  ///     \b true when the master files descriptor is
   ///         successfully opened.
-  ///     \li \b false if anything goes wrong.
+  ///     \b false if anything goes wrong.
   ///
   /// \see PseudoTerminal::OpenFirstAvailableMaster() @see
   /// PseudoTerminal::GetSlaveFileDescriptor() @see
diff --git a/src/llvm-project/lldb/include/lldb/Host/Socket.h b/src/llvm-project/lldb/include/lldb/Host/Socket.h
index 6f96bd7..c6df563 100644
--- a/src/llvm-project/lldb/include/lldb/Host/Socket.h
+++ b/src/llvm-project/lldb/include/lldb/Host/Socket.h
@@ -31,7 +31,7 @@
 
 namespace lldb_private {
 
-#if defined(_MSC_VER)
+#if defined(_WIN32)
 typedef SOCKET NativeSocket;
 #else
 typedef int NativeSocket;
@@ -122,6 +122,7 @@
   SocketProtocol m_protocol;
   NativeSocket m_socket;
   bool m_child_processes_inherit;
+  bool m_should_close_fd;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Host/SocketAddress.h b/src/llvm-project/lldb/include/lldb/Host/SocketAddress.h
index 620827f..766303a 100644
--- a/src/llvm-project/lldb/include/lldb/Host/SocketAddress.h
+++ b/src/llvm-project/lldb/include/lldb/Host/SocketAddress.h
@@ -48,8 +48,6 @@
   ~SocketAddress();
 
   // Operators
-  const SocketAddress &operator=(const SocketAddress &rhs);
-
   const SocketAddress &operator=(const struct addrinfo *addr_info);
 
   const SocketAddress &operator=(const struct sockaddr &s);
diff --git a/src/llvm-project/lldb/include/lldb/Host/Terminal.h b/src/llvm-project/lldb/include/lldb/Host/Terminal.h
index e5e96ee..671f8d6 100644
--- a/src/llvm-project/lldb/include/lldb/Host/Terminal.h
+++ b/src/llvm-project/lldb/include/lldb/Host/Terminal.h
@@ -117,7 +117,7 @@
   // Member variables
   Terminal m_tty; ///< A terminal
   int m_tflags;   ///< Cached tflags information.
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
   std::unique_ptr<struct termios>
       m_termios_up; ///< Cached terminal state information.
 #endif
diff --git a/src/llvm-project/lldb/include/lldb/Host/XML.h b/src/llvm-project/lldb/include/lldb/Host/XML.h
index 625cf43..ca51d30 100644
--- a/src/llvm-project/lldb/include/lldb/Host/XML.h
+++ b/src/llvm-project/lldb/include/lldb/Host/XML.h
@@ -9,7 +9,9 @@
 #ifndef liblldb_XML_h_
 #define liblldb_XML_h_
 
-#if defined(LIBXML2_DEFINED)
+#include "lldb/Host/Config.h"
+
+#if LLDB_ENABLE_LIBXML2
 #include <libxml/xmlreader.h>
 #endif
 
@@ -25,7 +27,7 @@
 
 namespace lldb_private {
 
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 typedef xmlNodePtr XMLNodeImpl;
 typedef xmlDocPtr XMLDocumentImpl;
 #else
diff --git a/src/llvm-project/lldb/include/lldb/Host/common/NativeProcessProtocol.h b/src/llvm-project/lldb/include/lldb/Host/common/NativeProcessProtocol.h
index f05b8d0..2d48717 100644
--- a/src/llvm-project/lldb/include/lldb/Host/common/NativeProcessProtocol.h
+++ b/src/llvm-project/lldb/include/lldb/Host/common/NativeProcessProtocol.h
@@ -32,6 +32,14 @@
 class MemoryRegionInfo;
 class ResumeActionList;
 
+struct SVR4LibraryInfo {
+  std::string name;
+  lldb::addr_t link_map;
+  lldb::addr_t base_addr;
+  lldb::addr_t ld_addr;
+  lldb::addr_t next;
+};
+
 // NativeProcessProtocol
 class NativeProcessProtocol {
 public:
@@ -76,6 +84,31 @@
   Status ReadMemoryWithoutTrap(lldb::addr_t addr, void *buf, size_t size,
                                size_t &bytes_read);
 
+  /// Reads a null terminated string from memory.
+  ///
+  /// Reads up to \p max_size bytes of memory until it finds a '\0'.
+  /// If a '\0' is not found then it reads max_size-1 bytes as a string and a
+  /// '\0' is added as the last character of the \p buffer.
+  ///
+  /// \param[in] addr
+  ///     The address in memory to read from.
+  ///
+  /// \param[in] buffer
+  ///     An allocated buffer with at least \p max_size size.
+  ///
+  /// \param[in] max_size
+  ///     The maximum number of bytes to read from memory until it reads the
+  ///     string.
+  ///
+  /// \param[out] total_bytes_read
+  ///     The number of bytes read from memory into \p buffer.
+  ///
+  /// \return
+  ///     Returns a StringRef backed up by the \p buffer passed in.
+  llvm::Expected<llvm::StringRef>
+  ReadCStringFromMemory(lldb::addr_t addr, char *buffer, size_t max_size,
+                        size_t &total_bytes_read);
+
   virtual Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
                              size_t &bytes_written) = 0;
 
@@ -86,6 +119,12 @@
 
   virtual lldb::addr_t GetSharedLibraryInfoAddress() = 0;
 
+  virtual llvm::Expected<std::vector<SVR4LibraryInfo>>
+  GetLoadedSVR4Libraries() {
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "Not implemented");
+  }
+
   virtual bool IsAlive() const;
 
   virtual size_t UpdateThreads() = 0;
@@ -391,6 +430,8 @@
   NativeProcessProtocol(lldb::pid_t pid, int terminal_fd,
                         NativeDelegate &delegate);
 
+  void SetID(lldb::pid_t pid) { m_pid = pid; }
+
   // interface for state handling
   void SetState(lldb::StateType state, bool notify_delegates = true);
 
diff --git a/src/llvm-project/lldb/include/lldb/Host/macosx/HostInfoMacOSX.h b/src/llvm-project/lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
index d49e27a..217ca5b 100644
--- a/src/llvm-project/lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
+++ b/src/llvm-project/lldb/include/lldb/Host/macosx/HostInfoMacOSX.h
@@ -27,6 +27,7 @@
 
 public:
   static llvm::VersionTuple GetOSVersion();
+  static llvm::VersionTuple GetMacCatalystVersion();
   static bool GetOSBuildString(std::string &s);
   static bool GetOSKernelDescription(std::string &s);
   static FileSpec GetProgramFileSpec();
diff --git a/src/llvm-project/lldb/include/lldb/Host/windows/PosixApi.h b/src/llvm-project/lldb/include/lldb/Host/windows/PosixApi.h
index 977dd76..a4c3dcd 100644
--- a/src/llvm-project/lldb/include/lldb/Host/windows/PosixApi.h
+++ b/src/llvm-project/lldb/include/lldb/Host/windows/PosixApi.h
@@ -9,6 +9,7 @@
 #ifndef liblldb_Host_windows_PosixApi_h
 #define liblldb_Host_windows_PosixApi_h
 
+#include "lldb/Host/Config.h"
 #include "llvm/Support/Compiler.h"
 #if !defined(_WIN32)
 #error "windows/PosixApi.h being #included on non Windows system!"
@@ -30,20 +31,39 @@
 #define SIGKILL 9
 #define SIGSTOP 20
 
-#if defined(_MSC_VER)
+#ifndef S_IRUSR
 #define S_IRUSR S_IREAD  /* read, user */
 #define S_IWUSR S_IWRITE /* write, user */
 #define S_IXUSR 0        /* execute, user */
 #endif
+#ifndef S_IRGRP
 #define S_IRGRP 0 /* read, group */
 #define S_IWGRP 0 /* write, group */
 #define S_IXGRP 0 /* execute, group */
+#endif
+#ifndef S_IROTH
 #define S_IROTH 0 /* read, others */
 #define S_IWOTH 0 /* write, others */
 #define S_IXOTH 0 /* execute, others */
+#endif
+#ifndef S_IRWXU
 #define S_IRWXU 0
+#endif
+#ifndef S_IRWXG
 #define S_IRWXG 0
+#endif
+#ifndef S_IRWXO
 #define S_IRWXO 0
+#endif
+
+#if HAVE_SYS_TYPES_H
+// pyconfig.h typedefs this.  We require python headers to be included before
+// any LLDB headers, but there's no way to prevent python's pid_t definition
+// from leaking, so this is the best option.
+#ifndef NO_PID_T
+#include <sys/types.h>
+#endif
+#endif // HAVE_SYS_TYPES_H
 
 #ifdef _MSC_VER
 
@@ -80,13 +100,16 @@
 char *strcasestr(const char *s, const char *find);
 char *realpath(const char *name, char *resolved);
 
-int usleep(uint32_t useconds);
+#ifdef _MSC_VER
+
 char *basename(char *path);
 char *dirname(char *path);
 
 int strcasecmp(const char *s1, const char *s2);
 int strncasecmp(const char *s1, const char *s2, size_t n);
 
+#endif // _MSC_VER
+
 // empty functions
 inline int posix_openpt(int flag) { LLVM_BUILTIN_UNREACHABLE; }
 
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/CommandAlias.h b/src/llvm-project/lldb/include/lldb/Interpreter/CommandAlias.h
index c2a7a38..1e186d7 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/CommandAlias.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/CommandAlias.h
@@ -36,11 +36,11 @@
 
   bool WantsCompletion() override;
 
-  int HandleCompletion(CompletionRequest &request) override;
+  void HandleCompletion(CompletionRequest &request) override;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override;
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override;
 
   Options *GetOptions() override;
 
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/CommandCompletions.h b/src/llvm-project/lldb/include/lldb/Interpreter/CommandCompletions.h
index 3d09db5..275cc7e 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/CommandCompletions.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/CommandCompletions.h
@@ -26,10 +26,10 @@
   // This is the command completion callback that is used to complete the
   // argument of the option it is bound to (in the OptionDefinition table
   // below).  Return the total number of matches.
-  typedef int (*CompletionCallback)(CommandInterpreter &interpreter,
-                                    CompletionRequest &request,
-                                    // A search filter to limit the search...
-                                    lldb_private::SearchFilter *searcher);
+  typedef void (*CompletionCallback)(CommandInterpreter &interpreter,
+                                     CompletionRequest &request,
+                                     // A search filter to limit the search...
+                                     lldb_private::SearchFilter *searcher);
   enum CommonCompletionTypes {
     eNoCompletion = 0u,
     eSourceFileCompletion = (1u << 0),
@@ -57,43 +57,43 @@
       lldb_private::CompletionRequest &request, SearchFilter *searcher);
 
   // These are the generic completer functions:
-  static int DiskFiles(CommandInterpreter &interpreter,
-                       CompletionRequest &request, SearchFilter *searcher);
+  static void DiskFiles(CommandInterpreter &interpreter,
+                        CompletionRequest &request, SearchFilter *searcher);
 
-  static int DiskFiles(const llvm::Twine &partial_file_name,
-                       StringList &matches, TildeExpressionResolver &Resolver);
+  static void DiskFiles(const llvm::Twine &partial_file_name,
+                        StringList &matches, TildeExpressionResolver &Resolver);
 
-  static int DiskDirectories(CommandInterpreter &interpreter,
-                             CompletionRequest &request,
-                             SearchFilter *searcher);
+  static void DiskDirectories(CommandInterpreter &interpreter,
+                              CompletionRequest &request,
+                              SearchFilter *searcher);
 
-  static int DiskDirectories(const llvm::Twine &partial_file_name,
-                             StringList &matches,
-                             TildeExpressionResolver &Resolver);
+  static void DiskDirectories(const llvm::Twine &partial_file_name,
+                              StringList &matches,
+                              TildeExpressionResolver &Resolver);
 
-  static int SourceFiles(CommandInterpreter &interpreter,
-                         CompletionRequest &request, SearchFilter *searcher);
-
-  static int Modules(CommandInterpreter &interpreter,
-                     CompletionRequest &request, SearchFilter *searcher);
-
-  static int Symbols(CommandInterpreter &interpreter,
-                     CompletionRequest &request, SearchFilter *searcher);
-
-  static int SettingsNames(CommandInterpreter &interpreter,
-                           CompletionRequest &request, SearchFilter *searcher);
-
-  static int PlatformPluginNames(CommandInterpreter &interpreter,
-                                 CompletionRequest &request,
-                                 SearchFilter *searcher);
-
-  static int ArchitectureNames(CommandInterpreter &interpreter,
-                               CompletionRequest &request,
-                               SearchFilter *searcher);
-
-  static int VariablePath(CommandInterpreter &interpreter,
+  static void SourceFiles(CommandInterpreter &interpreter,
                           CompletionRequest &request, SearchFilter *searcher);
 
+  static void Modules(CommandInterpreter &interpreter,
+                      CompletionRequest &request, SearchFilter *searcher);
+
+  static void Symbols(CommandInterpreter &interpreter,
+                      CompletionRequest &request, SearchFilter *searcher);
+
+  static void SettingsNames(CommandInterpreter &interpreter,
+                            CompletionRequest &request, SearchFilter *searcher);
+
+  static void PlatformPluginNames(CommandInterpreter &interpreter,
+                                  CompletionRequest &request,
+                                  SearchFilter *searcher);
+
+  static void ArchitectureNames(CommandInterpreter &interpreter,
+                                CompletionRequest &request,
+                                SearchFilter *searcher);
+
+  static void VariablePath(CommandInterpreter &interpreter,
+                           CompletionRequest &request, SearchFilter *searcher);
+
   // The Completer class is a convenient base class for building searchers that
   // go along with the SearchFilter passed to the standard Completer functions.
   class Completer : public Searcher {
@@ -103,11 +103,11 @@
     ~Completer() override;
 
     CallbackReturn SearchCallback(SearchFilter &filter, SymbolContext &context,
-                                  Address *addr, bool complete) override = 0;
+                                  Address *addr) override = 0;
 
     lldb::SearchDepth GetDepth() override = 0;
 
-    virtual size_t DoCompletion(SearchFilter *filter) = 0;
+    virtual void DoCompletion(SearchFilter *filter) = 0;
 
   protected:
     CommandInterpreter &m_interpreter;
@@ -127,10 +127,9 @@
 
     Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
                                             SymbolContext &context,
-                                            Address *addr,
-                                            bool complete) override;
+                                            Address *addr) override;
 
-    size_t DoCompletion(SearchFilter *filter) override;
+    void DoCompletion(SearchFilter *filter) override;
 
   private:
     bool m_include_support_files;
@@ -151,10 +150,9 @@
 
     Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
                                             SymbolContext &context,
-                                            Address *addr,
-                                            bool complete) override;
+                                            Address *addr) override;
 
-    size_t DoCompletion(SearchFilter *filter) override;
+    void DoCompletion(SearchFilter *filter) override;
 
   private:
     const char *m_file_name;
@@ -173,20 +171,11 @@
 
     Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
                                             SymbolContext &context,
-                                            Address *addr,
-                                            bool complete) override;
+                                            Address *addr) override;
 
-    size_t DoCompletion(SearchFilter *filter) override;
+    void DoCompletion(SearchFilter *filter) override;
 
   private:
-    //        struct NameCmp {
-    //            bool operator() (const ConstString& lhs, const ConstString&
-    //            rhs) const
-    //            {
-    //                return lhs < rhs;
-    //            }
-    //        };
-
     RegularExpression m_regex;
     typedef std::set<ConstString> collection;
     collection m_match_set;
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/CommandInterpreter.h b/src/llvm-project/lldb/include/lldb/Interpreter/CommandInterpreter.h
index c3dd660..d08951e 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/CommandInterpreter.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/CommandInterpreter.h
@@ -51,7 +51,7 @@
   /// \param[in] echo_comments
   ///    If \b true, echo command even if it is a pure comment line. If
   ///    \b false, print no ouput in this case. This setting has an effect only
-  ///    if \param echo_commands is \b true.
+  ///    if echo_commands is \b true.
   /// \param[in] print_results
   ///    If \b true and the command succeeds, print the results of the command
   ///    after executing it. If \b false, execute silently.
@@ -308,31 +308,12 @@
 
   CommandObject *GetCommandObjectForCommand(llvm::StringRef &command_line);
 
-  // This handles command line completion.  You are given a pointer to the
-  // command string buffer, to the current cursor, and to the end of the string
-  // (in case it is not NULL terminated). You also passed in an StringList
-  // object to fill with the returns. The first element of the array will be
-  // filled with the string that you would need to insert at the cursor point
-  // to complete the cursor point to the longest common matching prefix. If you
-  // want to limit the number of elements returned, set max_return_elements to
-  // the number of elements you want returned.  Otherwise set
-  // max_return_elements to -1. If you want to start some way into the match
-  // list, then set match_start_point to the desired start point. Returns: -1
-  // if the completion character should be inserted -2 if the entire command
-  // line should be deleted and replaced with matches.GetStringAtIndex(0)
-  // INT_MAX if the number of matches is > max_return_elements, but it is
-  // expensive to compute. Otherwise, returns the number of matches.
-  //
-  // FIXME: Only max_return_elements == -1 is supported at present.
-  int HandleCompletion(const char *current_line, const char *cursor,
-                       const char *last_char, int match_start_point,
-                       int max_return_elements, StringList &matches,
-                       StringList &descriptions);
+  // This handles command line completion.
+  void HandleCompletion(CompletionRequest &request);
 
-  // This version just returns matches, and doesn't compute the substring.  It
-  // is here so the Help command can call it for the first argument. It uses
-  // a CompletionRequest for simplicity reasons.
-  int HandleCompletionMatches(CompletionRequest &request);
+  // This version just returns matches, and doesn't compute the substring. It
+  // is here so the Help command can call it for the first argument.
+  void HandleCompletionMatches(CompletionRequest &request);
 
   int GetCommandNamesMatchingPartialString(const char *cmd_cstr,
                                            bool include_aliases,
@@ -447,13 +428,14 @@
 
   void RunCommandInterpreter(bool auto_handle_events, bool spawn_thread,
                              CommandInterpreterRunOptions &options);
+
   void GetLLDBCommandsFromIOHandler(const char *prompt,
                                     IOHandlerDelegate &delegate,
-                                    bool asynchronously, void *baton);
+                                    void *baton = nullptr);
 
   void GetPythonCommandsFromIOHandler(const char *prompt,
                                       IOHandlerDelegate &delegate,
-                                      bool asynchronously, void *baton);
+                                      void *baton = nullptr);
 
   const char *GetCommandPrefix();
 
@@ -462,13 +444,13 @@
 
   bool GetPromptOnQuit() const;
 
-  void SetPromptOnQuit(bool b);
+  void SetPromptOnQuit(bool enable);
 
   bool GetEchoCommands() const;
-  void SetEchoCommands(bool b);
+  void SetEchoCommands(bool enable);
 
   bool GetEchoCommentCommands() const;
-  void SetEchoCommentCommands(bool b);
+  void SetEchoCommentCommands(bool enable);
 
   /// Specify if the command interpreter should allow that the user can
   /// specify a custom exit code when calling 'quit'.
@@ -519,7 +501,9 @@
 
   bool IOHandlerInterrupt(IOHandler &io_handler) override;
 
-  size_t GetProcessOutput();
+  void GetProcessOutput();
+
+  bool DidProcessStopAbnormally() const;
 
   void SetSynchronous(bool value);
 
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/CommandObject.h b/src/llvm-project/lldb/include/lldb/Interpreter/CommandObject.h
index 31f7f12..f4dc2d6 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/CommandObject.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/CommandObject.h
@@ -226,38 +226,20 @@
   /// option. Don't override this method, override HandleArgumentCompletion
   /// instead unless you have special reasons.
   ///
-  /// \param[in/out] request
+  /// \param[in,out] request
   ///    The completion request that needs to be answered.
-  ///
-  /// FIXME: This is the wrong return value, since we also need to make a
-  /// distinction between
-  /// total number of matches, and the window the user wants returned.
-  ///
-  /// \return
-  ///     \btrue if we were in an option, \bfalse otherwise.
-  virtual int HandleCompletion(CompletionRequest &request);
+  virtual void HandleCompletion(CompletionRequest &request);
 
-  /// The input array contains a parsed version of the line.  The insertion
-  /// point is given by cursor_index (the index in input of the word containing
-  /// the cursor) and cursor_char_position (the position of the cursor in that
-  /// word.)
+  /// The input array contains a parsed version of the line.
+  ///
   /// We've constructed the map of options and their arguments as well if that
   /// is helpful for the completion.
   ///
-  /// \param[in/out] request
+  /// \param[in,out] request
   ///    The completion request that needs to be answered.
-  ///
-  /// FIXME: This is the wrong return value, since we also need to make a
-  /// distinction between
-  /// total number of matches, and the window the user wants returned.
-  ///
-  /// \return
-  ///     The number of completions.
-  virtual int
+  virtual void
   HandleArgumentCompletion(CompletionRequest &request,
-                           OptionElementVector &opt_element_vector) {
-    return 0;
-  }
+                           OptionElementVector &opt_element_vector) {}
 
   bool HelpTextContainsWord(llvm::StringRef search_word,
                             bool search_short_help = true,
@@ -279,8 +261,8 @@
 
   /// Get the command that appropriate for a "repeat" of the current command.
   ///
-  /// \param[in] current_command_line
-  ///    The complete current command line.
+  /// \param[in] current_command_args
+  ///    The command arguments.
   ///
   /// \return
   ///     nullptr if there is no special repeat command - it will use the
@@ -348,8 +330,9 @@
   // This is for use in the command interpreter, when you either want the
   // selected target, or if no target is present you want to prime the dummy
   // target with entities that will be copied over to new targets.
-  Target *GetSelectedOrDummyTarget(bool prefer_dummy = false);
-  Target *GetDummyTarget();
+  Target &GetSelectedOrDummyTarget(bool prefer_dummy = false);
+  Target &GetSelectedTarget();
+  Target &GetDummyTarget();
 
   // If a command needs to use the "current" thread, use this call. Command
   // objects will have an ExecutionContext to use, and that may or may not have
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/CommandObjectMultiword.h b/src/llvm-project/lldb/include/lldb/Interpreter/CommandObjectMultiword.h
index 660e9d4..72ec8a9 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/CommandObjectMultiword.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/CommandObjectMultiword.h
@@ -50,7 +50,7 @@
 
   bool WantsRawCommandString() override { return false; }
 
-  int HandleCompletion(CompletionRequest &request) override;
+  void HandleCompletion(CompletionRequest &request) override;
 
   const char *GetRepeatCommand(Args &current_command_args,
                                uint32_t index) override;
@@ -112,11 +112,11 @@
 
   Options *GetOptions() override;
 
-  int HandleCompletion(CompletionRequest &request) override;
+  void HandleCompletion(CompletionRequest &request) override;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override;
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override;
 
   const char *GetRepeatCommand(Args &current_command_args,
                                uint32_t index) override;
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h b/src/llvm-project/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h
index 7f06e26..7800d5d 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/CommandObjectRegexCommand.h
@@ -34,7 +34,7 @@
 
   bool HasRegexEntries() const { return !m_entries.empty(); }
 
-  int HandleCompletion(CompletionRequest &request) override;
+  void HandleCompletion(CompletionRequest &request) override;
 
 protected:
   bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/CommandReturnObject.h b/src/llvm-project/lldb/include/lldb/Interpreter/CommandReturnObject.h
index a5f6126..8af76e0 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/CommandReturnObject.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/CommandReturnObject.h
@@ -9,7 +9,6 @@
 #ifndef liblldb_CommandReturnObject_h_
 #define liblldb_CommandReturnObject_h_
 
-#include "lldb/Core/STLUtils.h"
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StreamTee.h"
@@ -62,13 +61,13 @@
     return m_err_stream;
   }
 
-  void SetImmediateOutputFile(FILE *fh, bool transfer_fh_ownership = false) {
-    lldb::StreamSP stream_sp(new StreamFile(fh, transfer_fh_ownership));
+  void SetImmediateOutputFile(lldb::FileSP file_sp) {
+    lldb::StreamSP stream_sp(new StreamFile(file_sp));
     m_out_stream.SetStreamAtIndex(eImmediateStreamIndex, stream_sp);
   }
 
-  void SetImmediateErrorFile(FILE *fh, bool transfer_fh_ownership = false) {
-    lldb::StreamSP stream_sp(new StreamFile(fh, transfer_fh_ownership));
+  void SetImmediateErrorFile(lldb::FileSP file_sp) {
+    lldb::StreamSP stream_sp(new StreamFile(file_sp));
     m_err_stream.SetStreamAtIndex(eImmediateStreamIndex, stream_sp);
   }
 
@@ -144,14 +143,6 @@
 
   void SetInteractive(bool b);
 
-  bool GetAbnormalStopWasExpected() const {
-    return m_abnormal_stop_was_expected;
-  }
-
-  void SetAbnormalStopWasExpected(bool signal_was_expected) {
-    m_abnormal_stop_was_expected = signal_was_expected;
-  }
-
 private:
   enum { eStreamStringIndex = 0, eImmediateStreamIndex = 1 };
 
@@ -162,14 +153,6 @@
   bool m_did_change_process_state;
   bool m_interactive; // If true, then the input handle from the debugger will
                       // be hooked up
-  bool m_abnormal_stop_was_expected; // This is to support
-                                     // eHandleCommandFlagStopOnCrash vrs.
-                                     // attach.
-  // The attach command often ends up with the process stopped due to a signal.
-  // Normally that would mean stop on crash should halt batch execution, but we
-  // obviously don't want that for attach.  Using this flag, the attach command
-  // (and anything else for which this is relevant) can say that the signal is
-  // expected, and batch command execution can continue.
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h
new file mode 100644
index 0000000..2229c1a
--- /dev/null
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionGroupPythonClassWithDict.h
@@ -0,0 +1,63 @@
+//===-- OptionGroupPythonClassWithDict.h -------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_OptionGroupPythonClassWithDict_h_
+#define liblldb_OptionGroupPythonClassWithDict_h_
+
+#include "lldb/lldb-types.h"
+#include "lldb/Interpreter/Options.h"
+#include "lldb/Utility/StructuredData.h"
+
+namespace lldb_private {
+
+// Use this Option group if you have a python class that implements some
+// Python extension point, and you pass a SBStructuredData to the class 
+// __init__ method.  
+// class_option specifies the class name
+// the key and value options are read in in pairs, and a 
+// StructuredData::Dictionary is constructed with those pairs.
+class OptionGroupPythonClassWithDict : public OptionGroup {
+public:
+  OptionGroupPythonClassWithDict(const char *class_use,
+                                 bool is_class = true,
+                                 int class_option = 'C',
+                                 int key_option = 'k', 
+                                 int value_option = 'v');
+                      
+  ~OptionGroupPythonClassWithDict() override;
+
+  llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
+    return llvm::ArrayRef<OptionDefinition>(m_option_definition);
+  }
+
+  Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
+                        ExecutionContext *execution_context) override;
+  Status SetOptionValue(uint32_t, const char *, ExecutionContext *) = delete;
+
+  void OptionParsingStarting(ExecutionContext *execution_context) override;
+  Status OptionParsingFinished(ExecutionContext *execution_context) override;
+  
+  const StructuredData::DictionarySP GetStructuredData() {
+    return m_dict_sp;
+  }
+  const std::string &GetName() {
+    return m_name;
+  }
+
+protected:
+  std::string m_name;
+  std::string m_current_key;
+  StructuredData::DictionarySP m_dict_sp;
+  std::string m_class_usage_text, m_key_usage_text, m_value_usage_text;
+  bool m_is_class;
+  OptionDefinition m_option_definition[4];
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_OptionGroupPythonClassWithDict_h_
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValue.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValue.h
index 0b85bc1..44c7f62 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValue.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValue.h
@@ -58,12 +58,7 @@
     eDumpGroupExport = (eDumpOptionCommand | eDumpOptionName | eDumpOptionValue)
   };
 
-  OptionValue()
-      : m_callback(nullptr), m_baton(nullptr), m_value_was_set(false) {}
-
-  OptionValue(const OptionValue &rhs)
-      : m_callback(rhs.m_callback), m_baton(rhs.m_baton),
-        m_value_was_set(rhs.m_value_was_set) {}
+  OptionValue() : m_value_was_set(false) {}
 
   virtual ~OptionValue() = default;
 
@@ -93,8 +88,8 @@
 
   virtual lldb::OptionValueSP DeepCopy() const = 0;
 
-  virtual size_t AutoComplete(CommandInterpreter &interpreter,
-                              CompletionRequest &request);
+  virtual void AutoComplete(CommandInterpreter &interpreter,
+                            CompletionRequest &request);
 
   // Subclasses can override these functions
   virtual lldb::OptionValueSP GetSubValue(const ExecutionContext *exe_ctx,
@@ -308,22 +303,19 @@
     m_parent_wp = parent_sp;
   }
 
-  void SetValueChangedCallback(OptionValueChangedCallback callback,
-                               void *baton) {
-    assert(m_callback == nullptr);
-    m_callback = callback;
-    m_baton = baton;
+  void SetValueChangedCallback(std::function<void()> callback) {
+    assert(!m_callback);
+    m_callback = std::move(callback);
   }
 
   void NotifyValueChanged() {
     if (m_callback)
-      m_callback(m_baton, this);
+      m_callback();
   }
 
 protected:
   lldb::OptionValueWP m_parent_wp;
-  OptionValueChangedCallback m_callback;
-  void *m_baton;
+  std::function<void()> m_callback;
   bool m_value_was_set; // This can be used to see if a value has been set
                         // by a call to SetValueFromCString(). It is often
                         // handy to know if an option value was set from the
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueArch.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueArch.h
index f8f4068..3923e3d 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueArch.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueArch.h
@@ -55,8 +55,8 @@
 
   lldb::OptionValueSP DeepCopy() const override;
 
-  size_t AutoComplete(CommandInterpreter &interpreter,
-                      lldb_private::CompletionRequest &request) override;
+  void AutoComplete(CommandInterpreter &interpreter,
+                    lldb_private::CompletionRequest &request) override;
 
   // Subclass specific functions
 
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueBoolean.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueBoolean.h
index 2fc97d4..42b2ca4 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueBoolean.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueBoolean.h
@@ -43,8 +43,8 @@
     return true;
   }
 
-  size_t AutoComplete(CommandInterpreter &interpreter,
-                      CompletionRequest &request) override;
+  void AutoComplete(CommandInterpreter &interpreter,
+                    CompletionRequest &request) override;
 
   // Subclass specific functions
 
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueEnumeration.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueEnumeration.h
index 71f3ab53..eb19737 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueEnumeration.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueEnumeration.h
@@ -55,8 +55,8 @@
 
   lldb::OptionValueSP DeepCopy() const override;
 
-  size_t AutoComplete(CommandInterpreter &interpreter,
-                      CompletionRequest &request) override;
+  void AutoComplete(CommandInterpreter &interpreter,
+                    CompletionRequest &request) override;
 
   // Subclass specific functions
 
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueFileSpec.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueFileSpec.h
index aa1022a..a6df181 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueFileSpec.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueFileSpec.h
@@ -51,8 +51,8 @@
 
   lldb::OptionValueSP DeepCopy() const override;
 
-  size_t AutoComplete(CommandInterpreter &interpreter,
-                      CompletionRequest &request) override;
+  void AutoComplete(CommandInterpreter &interpreter,
+                    CompletionRequest &request) override;
 
   // Subclass specific functions
 
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h
index b05be95..419ff5c 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueFormatEntity.h
@@ -38,8 +38,8 @@
 
   lldb::OptionValueSP DeepCopy() const override;
 
-  size_t AutoComplete(CommandInterpreter &interpreter,
-                      CompletionRequest &request) override;
+  void AutoComplete(CommandInterpreter &interpreter,
+                    CompletionRequest &request) override;
 
   // Subclass specific functions
 
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueProperties.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueProperties.h
index bea2b3c..980f011 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueProperties.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueProperties.h
@@ -198,8 +198,7 @@
                                                ConstString name);
 
   void SetValueChangedCallback(uint32_t property_idx,
-                               OptionValueChangedCallback callback,
-                               void *baton);
+                               std::function<void()> callback);
 
 protected:
   Property *ProtectedGetPropertyAtIndex(uint32_t idx) {
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueRegex.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueRegex.h
index f5b2557..8c10dac 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueRegex.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueRegex.h
@@ -36,7 +36,7 @@
                      VarSetOperationType = eVarSetOperationAssign) = delete;
 
   bool Clear() override {
-    m_regex.Clear();
+    m_regex = RegularExpression();
     m_value_was_set = false;
     return true;
   }
@@ -50,9 +50,9 @@
 
   void SetCurrentValue(const char *value) {
     if (value && value[0])
-      m_regex.Compile(llvm::StringRef(value));
+      m_regex = RegularExpression(llvm::StringRef(value));
     else
-      m_regex.Clear();
+      m_regex = RegularExpression();
   }
 
   bool IsValid() const { return m_regex.IsValid(); }
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueUUID.h b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueUUID.h
index 7273e35b..576440d 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueUUID.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/OptionValueUUID.h
@@ -52,8 +52,8 @@
 
   void SetCurrentValue(const UUID &value) { m_uuid = value; }
 
-  size_t AutoComplete(CommandInterpreter &interpreter,
-                      CompletionRequest &request) override;
+  void AutoComplete(CommandInterpreter &interpreter,
+                    CompletionRequest &request) override;
 
 protected:
   UUID m_uuid;
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/Options.h b/src/llvm-project/lldb/include/lldb/Interpreter/Options.h
index a008d51..d07c256 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/Options.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/Options.h
@@ -163,7 +163,7 @@
   /// Handles the generic bits of figuring out whether we are in an option,
   /// and if so completing it.
   ///
-  /// \param[in/out] request
+  /// \param[in,out] request
   ///    The completion request that we need to act upon.
   ///
   /// \param[in] interpreter
@@ -182,19 +182,12 @@
   /// Handles the generic bits of figuring out whether we are in an option,
   /// and if so completing it.
   ///
-  /// \param[in/out] request
+  /// \param[in,out] request
   ///    The completion request that we need to act upon.
   ///
   /// \param[in] interpreter
   ///    The command interpreter doing the completion.
-  ///
-  /// FIXME: This is the wrong return value, since we also need to
-  /// make a distinction between total number of matches, and the window the
-  /// user wants returned.
-  ///
-  /// \return
-  ///     \btrue if we were in an option, \bfalse otherwise.
-  virtual bool
+  virtual void
   HandleOptionArgumentCompletion(lldb_private::CompletionRequest &request,
                                  OptionElementVector &opt_element_vector,
                                  int opt_element_index,
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/Property.h b/src/llvm-project/lldb/include/lldb/Interpreter/Property.h
index 797aee4..7626483 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/Property.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/Property.h
@@ -64,8 +64,7 @@
                        uint32_t output_width,
                        bool display_qualified_name) const;
 
-  void SetValueChangedCallback(OptionValueChangedCallback callback,
-                               void *baton);
+  void SetValueChangedCallback(std::function<void()> callback);
 
 protected:
   ConstString m_name;
diff --git a/src/llvm-project/lldb/include/lldb/Interpreter/ScriptInterpreter.h b/src/llvm-project/lldb/include/lldb/Interpreter/ScriptInterpreter.h
index c8fa390..1784c93 100644
--- a/src/llvm-project/lldb/include/lldb/Interpreter/ScriptInterpreter.h
+++ b/src/llvm-project/lldb/include/lldb/Interpreter/ScriptInterpreter.h
@@ -65,6 +65,9 @@
 
     bool GetSetLLDBGlobals() const { return m_set_lldb_globals; }
 
+    // If this is true then any exceptions raised by the script will be
+    // cleared with PyErr_Clear().   If false then they will be left for
+    // the caller to clean up
     bool GetMaskoutErrors() const { return m_maskout_errors; }
 
     ExecuteScriptOptions &SetEnableIO(bool enable) {
@@ -117,8 +120,10 @@
     return error;
   }
 
-  virtual Status GenerateBreakpointCommandCallbackData(StringList &input,
-                                                       std::string &output) {
+  virtual Status GenerateBreakpointCommandCallbackData(
+      StringList &input,
+      std::string &output,
+      bool has_extra_args) {
     Status error;
     error.SetErrorString("not implemented");
     return error;
@@ -208,6 +213,8 @@
 
   virtual StructuredData::ObjectSP
   CreateScriptedThreadPlan(const char *class_name,
+                           StructuredDataImpl *args_data,
+                           std::string &error_str,
                            lldb::ThreadPlanSP thread_plan_sp) {
     return StructuredData::ObjectSP();
   }
@@ -306,14 +313,20 @@
     return error;
   }
 
-  void SetBreakpointCommandCallbackFunction(
+  Status SetBreakpointCommandCallbackFunction(
       std::vector<BreakpointOptions *> &bp_options_vec,
-      const char *function_name);
+      const char *function_name, StructuredData::ObjectSP extra_args_sp);
 
-  /// Set a one-liner as the callback for the breakpoint.
-  virtual void
-  SetBreakpointCommandCallbackFunction(BreakpointOptions *bp_options,
-                                       const char *function_name) {}
+  /// Set a script function as the callback for the breakpoint.
+  virtual Status
+  SetBreakpointCommandCallbackFunction(
+      BreakpointOptions *bp_options,
+      const char *function_name,
+      StructuredData::ObjectSP extra_args_sp) {
+    Status error;
+    error.SetErrorString("unimplemented");
+    return error;
+  }
 
   /// Set a one-liner as the callback for the watchpoint.
   virtual void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
@@ -444,12 +457,9 @@
   virtual bool CheckObjectExists(const char *name) { return false; }
 
   virtual bool
-  LoadScriptingModule(const char *filename, bool can_reload, bool init_session,
+  LoadScriptingModule(const char *filename, bool init_session,
                       lldb_private::Status &error,
-                      StructuredData::ObjectSP *module_sp = nullptr) {
-    error.SetErrorString("loading unimplemented");
-    return false;
-  }
+                      StructuredData::ObjectSP *module_sp = nullptr);
 
   virtual bool IsReservedWord(const char *word) { return false; }
 
@@ -459,12 +469,16 @@
 
   int GetMasterFileDescriptor();
 
+  virtual llvm::Expected<unsigned>
+  GetMaxPositionalArgumentsForCallable(const llvm::StringRef &callable_name) {
+    return llvm::createStringError(
+    llvm::inconvertibleErrorCode(), "Unimplemented function");
+  }
+
   static std::string LanguageToString(lldb::ScriptLanguage language);
 
   static lldb::ScriptLanguage StringToLanguage(const llvm::StringRef &string);
 
-  virtual void ResetOutputFileHandle(FILE *new_fh) {} // By default, do nothing.
-
   lldb::ScriptLanguage GetLanguage() { return m_script_lang; }
 
 protected:
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/Block.h b/src/llvm-project/lldb/include/lldb/Symbol/Block.h
index 36d0944..c2760dd 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/Block.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/Block.h
@@ -57,12 +57,6 @@
   ///     depth parsing. Common values would be the index into a
   ///     table, or an offset into the debug information.
   ///
-  /// \param[in] depth
-  ///     The integer depth of this block in the block list hierarchy.
-  ///
-  /// \param[in] block_list
-  ///     The block list that this object belongs to.
-  ///
   /// \see BlockList
   Block(lldb::user_id_t uid);
 
@@ -77,14 +71,6 @@
   void AddChild(const lldb::BlockSP &child_block_sp);
 
   /// Add a new offset range to this block.
-  ///
-  /// \param[in] start_offset
-  ///     An offset into this Function's address range that
-  ///     describes the start address of a range for this block.
-  ///
-  /// \param[in] end_offset
-  ///     An offset into this Function's address range that
-  ///     describes the end address of a range for this block.
   void AddRange(const Range &range);
 
   void FinalizeRanges();
@@ -232,10 +218,6 @@
   /// Get the variable list for this block and optionally all child blocks if
   /// \a get_child_variables is \b true.
   ///
-  /// \param[in] get_child_variables
-  ///     If \b true, all variables from all child blocks will be
-  ///     added to the variable list.
-  ///
   /// \param[in] can_create
   ///     If \b true, the variables can be parsed if they already
   ///     haven't been, else the current state of the block will be
@@ -243,11 +225,9 @@
   ///     to see the current state of what has been parsed up to this
   ///     point.
   ///
-  /// \param[in] add_inline_child_block_variables
-  ///     If this is \b false, no child variables of child blocks
-  ///     that are inlined functions will be gotten. If \b true then
-  ///     all child variables will be added regardless of whether they
-  ///     come from inlined functions or not.
+  /// \param[in] get_child_block_variables
+  ///     If \b true, all variables from all child blocks will be
+  ///     added to the variable list.
   ///
   /// \return
   ///     A variable list shared pointer that contains all variables
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/CallFrameInfo.h b/src/llvm-project/lldb/include/lldb/Symbol/CallFrameInfo.h
new file mode 100644
index 0000000..765ddb4
--- /dev/null
+++ b/src/llvm-project/lldb/include/lldb/Symbol/CallFrameInfo.h
@@ -0,0 +1,28 @@
+//===-- CallFrameInfo.h -----------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_CallFrameInfo_h_
+#define liblldb_CallFrameInfo_h_
+
+#include "lldb/Core/Address.h"
+
+namespace lldb_private {
+
+class CallFrameInfo {
+public:
+  virtual ~CallFrameInfo() = default;
+
+  virtual bool GetAddressRange(Address addr, AddressRange &range) = 0;
+
+  virtual bool GetUnwindPlan(const Address &addr, UnwindPlan &unwind_plan) = 0;
+  virtual bool GetUnwindPlan(const AddressRange &range, UnwindPlan &unwind_plan) = 0;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_CallFrameInfo_h_
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/ClangASTContext.h b/src/llvm-project/lldb/include/lldb/Symbol/ClangASTContext.h
index d0a834e..338417b 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/ClangASTContext.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/ClangASTContext.h
@@ -21,16 +21,18 @@
 #include <vector>
 
 #include "clang/AST/ASTContext.h"
-#include "clang/AST/ExternalASTMerger.h"
 #include "clang/AST/TemplateBase.h"
 #include "llvm/ADT/APSInt.h"
 #include "llvm/ADT/SmallVector.h"
 
-#include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h"
 #include "lldb/Core/ClangForward.h"
+#include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Symbol/TypeSystem.h"
+#include "lldb/Target/Target.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/Logging.h"
 #include "lldb/lldb-enumerations.h"
 
 class DWARFASTParserClang;
@@ -41,18 +43,31 @@
 class Declaration;
 
 class ClangASTContext : public TypeSystem {
+  // LLVM RTTI support
+  static char ID;
+
 public:
   typedef void (*CompleteTagDeclCallback)(void *baton, clang::TagDecl *);
   typedef void (*CompleteObjCInterfaceDeclCallback)(void *baton,
                                                     clang::ObjCInterfaceDecl *);
 
   // llvm casting support
-  static bool classof(const TypeSystem *ts) {
-    return ts->getKind() == TypeSystem::eKindClang;
-  }
+  bool isA(const void *ClassID) const override { return ClassID == &ID; }
+  static bool classof(const TypeSystem *ts) { return ts->isA(&ID); }
 
-  // Constructors and Destructors
-  ClangASTContext(const char *triple = nullptr);
+  /// Constructs a ClangASTContext with an ASTContext using the given triple.
+  ///
+  /// \param triple The llvm::Triple used for the ASTContext. The triple defines
+  ///               certain characteristics of the ASTContext and its types
+  ///               (e.g., whether certain primitive types exist or what their
+  ///               signedness is).
+  explicit ClangASTContext(llvm::Triple triple);
+
+  /// Constructs a ClangASTContext that uses an existing ASTContext internally.
+  /// Useful when having an existing ASTContext created by Clang.
+  ///
+  /// \param existing_ctxt An existing ASTContext.
+  explicit ClangASTContext(clang::ASTContext &existing_ctxt);
 
   ~ClangASTContext() override;
 
@@ -68,9 +83,8 @@
   static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language,
                                            Module *module, Target *target);
 
-  static void EnumerateSupportedLanguages(
-      std::set<lldb::LanguageType> &languages_for_types,
-      std::set<lldb::LanguageType> &languages_for_expressions);
+  static LanguageSet GetSupportedLanguagesForTypes();
+  static LanguageSet GetSupportedLanguagesForExpressions();
 
   static void Initialize();
 
@@ -78,25 +92,19 @@
 
   static ClangASTContext *GetASTContext(clang::ASTContext *ast_ctx);
 
-  clang::ASTContext *getASTContext();
+  static ClangASTContext *GetScratch(Target &target,
+                                     bool create_on_demand = true) {
+    auto type_system_or_err = target.GetScratchTypeSystemForLanguage(
+        lldb::eLanguageTypeC, create_on_demand);
+    if (auto err = type_system_or_err.takeError()) {
+      LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET),
+                     std::move(err), "Couldn't get scratch ClangASTContext");
+      return nullptr;
+    }
+    return llvm::dyn_cast<ClangASTContext>(&type_system_or_err.get());
+  }
 
-  void setASTContext(clang::ASTContext *ast_ctx);
-
-  clang::Builtin::Context *getBuiltinContext();
-
-  clang::IdentifierTable *getIdentifierTable();
-
-  clang::LangOptions *getLanguageOptions();
-
-  clang::SelectorTable *getSelectorTable();
-
-  clang::FileManager *getFileManager();
-
-  clang::SourceManager *getSourceManager();
-
-  clang::DiagnosticsEngine *getDiagnosticsEngine();
-
-  clang::DiagnosticConsumer *getDiagnosticConsumer();
+  clang::ASTContext &getASTContext();
 
   clang::MangleContext *getMangleContext();
 
@@ -107,23 +115,13 @@
   void setSema(clang::Sema *s);
   clang::Sema *getSema() { return m_sema; }
 
-  void Clear();
-
   const char *GetTargetTriple();
 
-  void SetTargetTriple(const char *target_triple);
-
-  void SetArchitecture(const ArchSpec &arch);
-
-  bool HasExternalSource();
-
   void SetExternalSource(
       llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> &ast_source_up);
 
-  void RemoveExternalSource();
-
   bool GetCompleteDecl(clang::Decl *decl) {
-    return ClangASTContext::GetCompleteDecl(getASTContext(), decl);
+    return ClangASTContext::GetCompleteDecl(&getASTContext(), decl);
   }
 
   static void DumpDeclHiearchy(clang::Decl *decl);
@@ -134,75 +132,63 @@
 
   static bool GetCompleteDecl(clang::ASTContext *ast, clang::Decl *decl);
 
-  void SetMetadataAsUserID(const void *object, lldb::user_id_t user_id);
+  void SetMetadataAsUserID(const clang::Decl *decl, lldb::user_id_t user_id);
+  void SetMetadataAsUserID(const clang::Type *type, lldb::user_id_t user_id);
 
-  void SetMetadata(const void *object, ClangASTMetadata &meta_data) {
-    SetMetadata(getASTContext(), object, meta_data);
-  }
+  void SetMetadata(const clang::Decl *object, ClangASTMetadata &meta_data);
 
-  static void SetMetadata(clang::ASTContext *ast, const void *object,
-                          ClangASTMetadata &meta_data);
-
-  ClangASTMetadata *GetMetadata(const void *object) {
-    return GetMetadata(getASTContext(), object);
-  }
-
-  static ClangASTMetadata *GetMetadata(clang::ASTContext *ast,
-                                       const void *object);
+  void SetMetadata(const clang::Type *object, ClangASTMetadata &meta_data);
+  ClangASTMetadata *GetMetadata(const clang::Decl *object);
+  ClangASTMetadata *GetMetadata(const clang::Type *object);
 
   // Basic Types
   CompilerType GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding,
                                                    size_t bit_size) override;
 
-  static CompilerType GetBuiltinTypeForEncodingAndBitSize(
-      clang::ASTContext *ast, lldb::Encoding encoding, uint32_t bit_size);
-
   CompilerType GetBasicType(lldb::BasicType type);
 
-  static CompilerType GetBasicType(clang::ASTContext *ast,
-                                   lldb::BasicType type);
-
-  static CompilerType GetBasicType(clang::ASTContext *ast,
-                                   ConstString name);
-
   static lldb::BasicType GetBasicTypeEnumeration(ConstString name);
 
-  CompilerType GetBuiltinTypeForDWARFEncodingAndBitSize(const char *type_name,
-                                                        uint32_t dw_ate,
-                                                        uint32_t bit_size);
+  CompilerType
+  GetBuiltinTypeForDWARFEncodingAndBitSize(llvm::StringRef type_name,
+                                           uint32_t dw_ate, uint32_t bit_size);
 
   CompilerType GetCStringType(bool is_const);
 
-  static CompilerType GetUnknownAnyType(clang::ASTContext *ast);
-
-  CompilerType GetUnknownAnyType() {
-    return ClangASTContext::GetUnknownAnyType(getASTContext());
-  }
-
   static clang::DeclContext *GetDeclContextForType(clang::QualType type);
 
   static clang::DeclContext *GetDeclContextForType(const CompilerType &type);
 
   uint32_t GetPointerByteSize() override;
 
-  static clang::DeclContext *GetTranslationUnitDecl(clang::ASTContext *ast);
-
-  clang::DeclContext *GetTranslationUnitDecl() {
-    return GetTranslationUnitDecl(getASTContext());
+  clang::TranslationUnitDecl *GetTranslationUnitDecl() {
+    return getASTContext().getTranslationUnitDecl();
   }
 
-  static clang::Decl *CopyDecl(clang::ASTContext *dest_context,
-                               clang::ASTContext *source_context,
-                               clang::Decl *source_decl);
-
   static bool AreTypesSame(CompilerType type1, CompilerType type2,
                            bool ignore_qualifiers = false);
 
-  static CompilerType GetTypeForDecl(clang::NamedDecl *decl);
+  /// Creates a CompilerType form the given QualType with the current
+  /// ClangASTContext instance as the CompilerType's typesystem.
+  /// \param qt The QualType for a type that belongs to the ASTContext of this
+  ///           ClangASTContext.
+  /// \return The CompilerType representing the given QualType. If the
+  ///         QualType's type pointer is a nullptr then the function returns an
+  ///         invalid CompilerType.
+  CompilerType GetType(clang::QualType qt) {
+    if (qt.getTypePtrOrNull() == nullptr)
+      return CompilerType();
+    // Check that the type actually belongs to this ClangASTContext.
+    assert(qt->getAsTagDecl() == nullptr ||
+           &qt->getAsTagDecl()->getASTContext() == &getASTContext());
+    return CompilerType(this, qt.getAsOpaquePtr());
+  }
 
-  static CompilerType GetTypeForDecl(clang::TagDecl *decl);
+  CompilerType GetTypeForDecl(clang::NamedDecl *decl);
 
-  static CompilerType GetTypeForDecl(clang::ObjCInterfaceDecl *objc_decl);
+  CompilerType GetTypeForDecl(clang::TagDecl *decl);
+
+  CompilerType GetTypeForDecl(clang::ObjCInterfaceDecl *objc_decl);
 
   template <typename RecordDeclType>
   CompilerType
@@ -211,26 +197,23 @@
     CompilerType compiler_type;
 
     if (type_name.GetLength()) {
-      clang::ASTContext *ast = getASTContext();
-      if (ast) {
-        if (!decl_context)
-          decl_context = ast->getTranslationUnitDecl();
+      clang::ASTContext &ast = getASTContext();
+      if (!decl_context)
+        decl_context = ast.getTranslationUnitDecl();
 
-        clang::IdentifierInfo &myIdent =
-            ast->Idents.get(type_name.GetCString());
-        clang::DeclarationName myName =
-            ast->DeclarationNames.getIdentifier(&myIdent);
+      clang::IdentifierInfo &myIdent = ast.Idents.get(type_name.GetCString());
+      clang::DeclarationName myName =
+          ast.DeclarationNames.getIdentifier(&myIdent);
 
-        clang::DeclContext::lookup_result result =
-            decl_context->lookup(myName);
+      clang::DeclContext::lookup_result result = decl_context->lookup(myName);
 
-        if (!result.empty()) {
-          clang::NamedDecl *named_decl = result[0];
-          if (const RecordDeclType *record_decl =
-                  llvm::dyn_cast<RecordDeclType>(named_decl))
-            compiler_type.SetCompilerType(
-                ast, clang::QualType(record_decl->getTypeForDecl(), 0));
-        }
+      if (!result.empty()) {
+        clang::NamedDecl *named_decl = result[0];
+        if (const RecordDeclType *record_decl =
+                llvm::dyn_cast<RecordDeclType>(named_decl))
+          compiler_type.SetCompilerType(
+              this, clang::QualType(record_decl->getTypeForDecl(), 0)
+                        .getAsOpaquePtr());
       }
     }
 
@@ -249,7 +232,7 @@
           &type_fields,
       bool packed = false);
 
-  static bool IsOperator(const char *name,
+  static bool IsOperator(llvm::StringRef name,
                          clang::OverloadedOperatorKind &op_kind);
 
   // Structure, Unions, Classes
@@ -264,9 +247,11 @@
                                     bool omit_empty_base_classes);
 
   CompilerType CreateRecordType(clang::DeclContext *decl_ctx,
-                                lldb::AccessType access_type, const char *name,
-                                int kind, lldb::LanguageType language,
-                                ClangASTMetadata *metadata = nullptr);
+                                lldb::AccessType access_type,
+                                llvm::StringRef name, int kind,
+                                lldb::LanguageType language,
+                                ClangASTMetadata *metadata = nullptr,
+                                bool exports_symbols = false);
 
   class TemplateParameterInfos {
   public:
@@ -312,10 +297,7 @@
                                             class_template_specialization_decl);
 
   static clang::DeclContext *
-  GetAsDeclContext(clang::CXXMethodDecl *cxx_method_decl);
-
-  static clang::DeclContext *
-  GetAsDeclContext(clang::ObjCMethodDecl *objc_method_decl);
+  GetAsDeclContext(clang::FunctionDecl *function_decl);
 
   static bool CheckOverloadedOperatorKindParameterCount(
       bool is_method, clang::OverloadedOperatorKind op_kind,
@@ -323,13 +305,11 @@
 
   bool FieldIsBitfield(clang::FieldDecl *field, uint32_t &bitfield_bit_size);
 
-  static bool FieldIsBitfield(clang::ASTContext *ast, clang::FieldDecl *field,
-                              uint32_t &bitfield_bit_size);
-
   static bool RecordHasFields(const clang::RecordDecl *record_decl);
 
-  CompilerType CreateObjCClass(const char *name, clang::DeclContext *decl_ctx,
-                               bool isForwardDecl, bool isInternal,
+  CompilerType CreateObjCClass(llvm::StringRef name,
+                               clang::DeclContext *decl_ctx, bool isForwardDecl,
+                               bool isInternal,
                                ClangASTMetadata *metadata = nullptr);
 
   bool SetTagTypeKind(clang::QualType type, int kind) const;
@@ -348,11 +328,6 @@
   GetUniqueNamespaceDeclaration(const char *name, clang::DeclContext *decl_ctx,
                                 bool is_inline = false);
 
-  static clang::NamespaceDecl *
-  GetUniqueNamespaceDeclaration(clang::ASTContext *ast, const char *name,
-                                clang::DeclContext *decl_ctx,
-                                bool is_inline = false);
-
   // Function Types
 
   clang::FunctionDecl *
@@ -360,42 +335,23 @@
                             const CompilerType &function_Type, int storage,
                             bool is_inline);
 
-  static CompilerType CreateFunctionType(clang::ASTContext *ast,
-                                         const CompilerType &result_type,
-                                         const CompilerType *args,
-                                         unsigned num_args, bool is_variadic,
-                                         unsigned type_quals,
-                                         clang::CallingConv cc);
-
-  static CompilerType CreateFunctionType(clang::ASTContext *ast,
-                                         const CompilerType &result_type,
-                                         const CompilerType *args,
-                                         unsigned num_args, bool is_variadic,
-                                         unsigned type_quals) {
-    return ClangASTContext::CreateFunctionType(
-        ast, result_type, args, num_args, is_variadic, type_quals, clang::CC_C);
-  }
+  CompilerType CreateFunctionType(const CompilerType &result_type,
+                                  const CompilerType *args, unsigned num_args,
+                                  bool is_variadic, unsigned type_quals,
+                                  clang::CallingConv cc);
 
   CompilerType CreateFunctionType(const CompilerType &result_type,
                                   const CompilerType *args, unsigned num_args,
                                   bool is_variadic, unsigned type_quals) {
-    return ClangASTContext::CreateFunctionType(
-        getASTContext(), result_type, args, num_args, is_variadic, type_quals);
-  }
-
-  CompilerType CreateFunctionType(const CompilerType &result_type,
-                                  const CompilerType *args, unsigned num_args,
-                                  bool is_variadic, unsigned type_quals,
-                                  clang::CallingConv cc) {
-    return ClangASTContext::CreateFunctionType(getASTContext(), result_type,
-                                               args, num_args, is_variadic,
-                                               type_quals, cc);
+    return CreateFunctionType(result_type, args, num_args, is_variadic,
+                              type_quals, clang::CC_C);
   }
 
   clang::ParmVarDecl *CreateParameterDeclaration(clang::DeclContext *decl_ctx,
                                                  const char *name,
                                                  const CompilerType &param_type,
-                                                 int storage);
+                                                 int storage,
+                                                 bool add_decl=false);
 
   void SetFunctionParameters(clang::FunctionDecl *function_decl,
                              clang::ParmVarDecl **params, unsigned num_params);
@@ -416,15 +372,9 @@
 
   // Integer type functions
 
-  static CompilerType GetIntTypeFromBitSize(clang::ASTContext *ast,
-                                            size_t bit_size, bool is_signed);
+  CompilerType GetIntTypeFromBitSize(size_t bit_size, bool is_signed);
 
-  CompilerType GetPointerSizedIntType(bool is_signed) {
-    return GetPointerSizedIntType(getASTContext(), is_signed);
-  }
-
-  static CompilerType GetPointerSizedIntType(clang::ASTContext *ast,
-                                             bool is_signed);
+  CompilerType GetPointerSizedIntType(bool is_signed);
 
   // Floating point functions
 
@@ -436,14 +386,12 @@
   PDBASTParser *GetPDBParser() override;
 
   // ClangASTContext callbacks for external source lookups.
-  static void CompleteTagDecl(void *baton, clang::TagDecl *);
+  void CompleteTagDecl(clang::TagDecl *);
 
-  static void CompleteObjCInterfaceDecl(void *baton,
-                                        clang::ObjCInterfaceDecl *);
+  void CompleteObjCInterfaceDecl(clang::ObjCInterfaceDecl *);
 
-  static bool LayoutRecordType(
-      void *baton, const clang::RecordDecl *record_decl, uint64_t &size,
-      uint64_t &alignment,
+  bool LayoutRecordType(
+      const clang::RecordDecl *record_decl, uint64_t &size, uint64_t &alignment,
       llvm::DenseMap<const clang::FieldDecl *, uint64_t> &field_offsets,
       llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
           &base_offsets,
@@ -464,14 +412,20 @@
   CompilerType DeclGetFunctionArgumentType(void *opaque_decl,
                                            size_t arg_idx) override;
 
+  CompilerType GetTypeForDecl(void *opaque_decl) override;
+
   // CompilerDeclContext override functions
 
+  /// Creates a CompilerDeclContext from the given DeclContext
+  /// with the current ClangASTContext instance as its typesystem.
+  /// The DeclContext has to come from the ASTContext of this
+  /// ClangASTContext.
+  CompilerDeclContext CreateDeclContext(clang::DeclContext *ctx);
+
   std::vector<CompilerDecl>
   DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
                             const bool ignore_using_decls) override;
 
-  bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) override;
-
   ConstString DeclContextGetName(void *opaque_decl_ctx) override;
 
   ConstString DeclContextGetScopeQualifiedName(void *opaque_decl_ctx) override;
@@ -502,7 +456,7 @@
   DeclContextGetAsNamespaceDecl(const CompilerDeclContext &dc);
 
   static ClangASTMetadata *DeclContextGetMetaData(const CompilerDeclContext &dc,
-                                                  const void *object);
+                                                  const clang::Decl *object);
 
   static clang::ASTContext *
   DeclContextGetClangASTContext(const CompilerDeclContext &dc);
@@ -602,11 +556,7 @@
 
   bool SupportsLanguage(lldb::LanguageType language) override;
 
-  static bool GetCXXClassName(const CompilerType &type,
-                              std::string &class_name);
-
-  static bool GetObjCClassName(const CompilerType &type,
-                               std::string &class_name);
+  static llvm::Optional<std::string> GetCXXClassName(const CompilerType &type);
 
   // Type Completion
 
@@ -673,6 +623,8 @@
   CompilerType
   GetRValueReferenceType(lldb::opaque_compiler_type_t type) override;
 
+  CompilerType GetAtomicType(lldb::opaque_compiler_type_t type) override;
+
   CompilerType AddConstModifier(lldb::opaque_compiler_type_t type) override;
 
   CompilerType AddVolatileModifier(lldb::opaque_compiler_type_t type) override;
@@ -691,6 +643,8 @@
 
   // Exploring the type
 
+  const llvm::fltSemantics &GetFloatTypeSemantics(size_t byte_size) override;
+
   llvm::Optional<uint64_t> GetByteSize(lldb::opaque_compiler_type_t type,
                        ExecutionContextScope *exe_scope) {
     if (llvm::Optional<uint64_t> bit_size = GetBitSize(type, exe_scope))
@@ -707,7 +661,9 @@
 
   lldb::Format GetFormat(lldb::opaque_compiler_type_t type) override;
 
-  size_t GetTypeBitAlign(lldb::opaque_compiler_type_t type) override;
+  llvm::Optional<size_t>
+  GetTypeBitAlign(lldb::opaque_compiler_type_t type,
+                  ExecutionContextScope *exe_scope) override;
 
   uint32_t GetNumChildren(lldb::opaque_compiler_type_t type,
                           bool omit_empty_base_classes,
@@ -812,13 +768,11 @@
                                                  const CompilerType &var_type,
                                                  lldb::AccessType access);
 
-  clang::CXXMethodDecl *
-  AddMethodToCXXRecordType(lldb::opaque_compiler_type_t type, const char *name,
-                           const char *mangled_name,
-                           const CompilerType &method_type,
-                           lldb::AccessType access, bool is_virtual,
-                           bool is_static, bool is_inline, bool is_explicit,
-                           bool is_attr_used, bool is_artificial);
+  clang::CXXMethodDecl *AddMethodToCXXRecordType(
+      lldb::opaque_compiler_type_t type, llvm::StringRef name,
+      const char *mangled_name, const CompilerType &method_type,
+      lldb::AccessType access, bool is_virtual, bool is_static, bool is_inline,
+      bool is_explicit, bool is_attr_used, bool is_artificial);
 
   void AddMethodOverridesForCXXRecordType(lldb::opaque_compiler_type_t type);
 
@@ -850,12 +804,11 @@
                         // (lldb::opaque_compiler_type_t type, "-[NString
                         // stringWithCString:]")
       const CompilerType &method_compiler_type, lldb::AccessType access,
-      bool is_artificial, bool is_variadic);
+      bool is_artificial, bool is_variadic, bool is_objc_direct_call);
 
   static bool SetHasExternalStorage(lldb::opaque_compiler_type_t type,
                                     bool has_extern);
 
-  static bool GetHasExternalStorage(const CompilerType &type);
   // Tag Declarations
   static bool StartTagDeclarationDefinition(const CompilerType &type);
 
@@ -878,12 +831,6 @@
   static CompilerType CreateMemberPointerType(const CompilerType &type,
                                               const CompilerType &pointee_type);
 
-  // Converts "s" to a floating point value and place resulting floating point
-  // bytes in the "dst" buffer.
-  size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
-                                   const char *s, uint8_t *dst,
-                                   size_t dst_size) override;
-
   // Dumping types
 #ifndef NDEBUG
   /// Convenience LLVM-style dump method for use in the debugger only.
@@ -894,6 +841,14 @@
 
   void Dump(Stream &s);
 
+  /// Dump clang AST types from the symbol file.
+  ///
+  /// \param[in] s
+  ///       A stream to send the dumped AST node(s) to
+  /// \param[in] symbol_name
+  ///       The name of the symbol to dump, if it is empty dump all the symbols
+  void DumpFromSymbolFile(Stream &s, llvm::StringRef symbol_name);
+
   void DumpValue(lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx,
                  Stream *s, lldb::Format format, const DataExtractor &data,
                  lldb::offset_t data_offset, size_t data_byte_size,
@@ -927,7 +882,8 @@
 
   static clang::TypedefNameDecl *GetAsTypedefDecl(const CompilerType &type);
 
-  clang::CXXRecordDecl *GetAsCXXRecordDecl(lldb::opaque_compiler_type_t type);
+  static clang::CXXRecordDecl *
+  GetAsCXXRecordDecl(lldb::opaque_compiler_type_t type);
 
   static clang::ObjCInterfaceDecl *
   GetAsObjCInterfaceDecl(const CompilerType &type);
@@ -968,55 +924,59 @@
 
   clang::DeclarationName
   GetDeclarationName(const char *name, const CompilerType &function_clang_type);
-  
-  virtual const clang::ExternalASTMerger::OriginMap &GetOriginMap() {
-    return m_origins;
-  }
-protected:
+
+private:
   const clang::ClassTemplateSpecializationDecl *
   GetAsTemplateSpecialization(lldb::opaque_compiler_type_t type);
 
   // Classes that inherit from ClangASTContext can see and modify these
-  // clang-format off
-    std::string                                     m_target_triple;
-    std::unique_ptr<clang::ASTContext>              m_ast_up;
-    std::unique_ptr<clang::LangOptions>             m_language_options_up;
-    std::unique_ptr<clang::FileManager>             m_file_manager_up;
-    std::unique_ptr<clang::SourceManager>           m_source_manager_up;
-    std::unique_ptr<clang::DiagnosticsEngine>       m_diagnostics_engine_up;
-    std::unique_ptr<clang::DiagnosticConsumer>      m_diagnostic_consumer_up;
-    std::shared_ptr<clang::TargetOptions>           m_target_options_rp;
-    std::unique_ptr<clang::TargetInfo>              m_target_info_up;
-    std::unique_ptr<clang::IdentifierTable>         m_identifier_table_up;
-    std::unique_ptr<clang::SelectorTable>           m_selector_table_up;
-    std::unique_ptr<clang::Builtin::Context>        m_builtins_up;
-    std::unique_ptr<DWARFASTParserClang>            m_dwarf_ast_parser_up;
-    std::unique_ptr<PDBASTParser>                   m_pdb_ast_parser_up;
-    std::unique_ptr<ClangASTSource>                 m_scratch_ast_source_up;
-    std::unique_ptr<clang::MangleContext>           m_mangle_ctx_up;
-    CompleteTagDeclCallback                         m_callback_tag_decl;
-    CompleteObjCInterfaceDeclCallback               m_callback_objc_decl;
-    void *                                          m_callback_baton;
-    clang::ExternalASTMerger::OriginMap             m_origins;
-    uint32_t                                        m_pointer_byte_size;
-    bool                                            m_ast_owned;
-    /// The sema associated that is currently used to build this ASTContext.
-    /// May be null if we are already done parsing this ASTContext or the
-    /// ASTContext wasn't created by parsing source code.
-    clang::Sema *                                   m_sema = nullptr;
-  // clang-format on
-private:
+  std::string m_target_triple;
+  std::unique_ptr<clang::ASTContext> m_ast_up;
+  std::unique_ptr<clang::LangOptions> m_language_options_up;
+  std::unique_ptr<clang::FileManager> m_file_manager_up;
+  std::unique_ptr<clang::SourceManager> m_source_manager_up;
+  std::unique_ptr<clang::DiagnosticsEngine> m_diagnostics_engine_up;
+  std::unique_ptr<clang::DiagnosticConsumer> m_diagnostic_consumer_up;
+  std::shared_ptr<clang::TargetOptions> m_target_options_rp;
+  std::unique_ptr<clang::TargetInfo> m_target_info_up;
+  std::unique_ptr<clang::IdentifierTable> m_identifier_table_up;
+  std::unique_ptr<clang::SelectorTable> m_selector_table_up;
+  std::unique_ptr<clang::Builtin::Context> m_builtins_up;
+  std::unique_ptr<DWARFASTParserClang> m_dwarf_ast_parser_up;
+  std::unique_ptr<PDBASTParser> m_pdb_ast_parser_up;
+  std::unique_ptr<clang::MangleContext> m_mangle_ctx_up;
+  uint32_t m_pointer_byte_size = 0;
+  bool m_ast_owned = false;
+
+  typedef llvm::DenseMap<const clang::Decl *, ClangASTMetadata> DeclMetadataMap;
+  /// Maps Decls to their associated ClangASTMetadata.
+  DeclMetadataMap m_decl_metadata;
+
+  typedef llvm::DenseMap<const clang::Type *, ClangASTMetadata> TypeMetadataMap;
+  /// Maps Types to their associated ClangASTMetadata.
+  TypeMetadataMap m_type_metadata;
+
+  /// The sema associated that is currently used to build this ASTContext.
+  /// May be null if we are already done parsing this ASTContext or the
+  /// ASTContext wasn't created by parsing source code.
+  clang::Sema *m_sema = nullptr;
+
   // For ClangASTContext only
   ClangASTContext(const ClangASTContext &);
   const ClangASTContext &operator=(const ClangASTContext &);
+  /// Creates the internal ASTContext.
+  void CreateASTContext();
+  void SetTargetTriple(llvm::StringRef target_triple);
 };
 
 class ClangASTContextForExpressions : public ClangASTContext {
 public:
-  ClangASTContextForExpressions(Target &target);
+  ClangASTContextForExpressions(Target &target, llvm::Triple triple);
 
   ~ClangASTContextForExpressions() override = default;
 
+  void Finalize() override;
+
   UserExpression *
   GetUserExpression(llvm::StringRef expr, llvm::StringRef prefix,
                     lldb::LanguageType language,
@@ -1033,21 +993,12 @@
                                       const char *name) override;
 
   PersistentExpressionState *GetPersistentExpressionState() override;
-  
-  clang::ExternalASTMerger &GetMergerUnchecked();
-  
-  const clang::ExternalASTMerger::OriginMap &GetOriginMap() override {
-    return GetMergerUnchecked().GetOrigins();
-  }
 private:
   lldb::TargetWP m_target_wp;
-  lldb::ClangPersistentVariablesUP m_persistent_variables; ///< These are the
-                                                           ///persistent
-                                                           ///variables
-                                                           ///associated with
-                                                           ///this process for
-                                                           ///the expression
-                                                           ///parser.
+  std::unique_ptr<PersistentExpressionState>
+      m_persistent_variables; // These are the persistent variables associated
+                              // with this process for the expression parser
+  std::unique_ptr<ClangASTSource> m_scratch_ast_source_up;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/ClangASTImporter.h b/src/llvm-project/lldb/include/lldb/Symbol/ClangASTImporter.h
index 353b123..faec3a7 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/ClangASTImporter.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/ClangASTImporter.h
@@ -30,57 +30,6 @@
 
 namespace lldb_private {
 
-class ClangASTMetrics {
-public:
-  static void DumpCounters(Log *log);
-  static void ClearLocalCounters() { local_counters = {0, 0, 0, 0, 0, 0}; }
-
-  static void RegisterVisibleQuery() {
-    ++global_counters.m_visible_query_count;
-    ++local_counters.m_visible_query_count;
-  }
-
-  static void RegisterLexicalQuery() {
-    ++global_counters.m_lexical_query_count;
-    ++local_counters.m_lexical_query_count;
-  }
-
-  static void RegisterLLDBImport() {
-    ++global_counters.m_lldb_import_count;
-    ++local_counters.m_lldb_import_count;
-  }
-
-  static void RegisterClangImport() {
-    ++global_counters.m_clang_import_count;
-    ++local_counters.m_clang_import_count;
-  }
-
-  static void RegisterDeclCompletion() {
-    ++global_counters.m_decls_completed_count;
-    ++local_counters.m_decls_completed_count;
-  }
-
-  static void RegisterRecordLayout() {
-    ++global_counters.m_record_layout_count;
-    ++local_counters.m_record_layout_count;
-  }
-
-private:
-  struct Counters {
-    uint64_t m_visible_query_count;
-    uint64_t m_lexical_query_count;
-    uint64_t m_lldb_import_count;
-    uint64_t m_clang_import_count;
-    uint64_t m_decls_completed_count;
-    uint64_t m_record_layout_count;
-  };
-
-  static Counters global_counters;
-  static Counters local_counters;
-
-  static void DumpCounters(Log *log, Counters &counters);
-};
-
 class ClangASTImporter {
 public:
   struct LayoutInfo {
@@ -99,26 +48,22 @@
       : m_file_manager(clang::FileSystemOptions(),
                        FileSystem::Instance().GetVirtualFileSystem()) {}
 
-  clang::QualType CopyType(clang::ASTContext *dst_ctx,
-                           clang::ASTContext *src_ctx, clang::QualType type);
-
-  lldb::opaque_compiler_type_t CopyType(clang::ASTContext *dst_ctx,
-                                        clang::ASTContext *src_ctx,
-                                        lldb::opaque_compiler_type_t type);
-
   CompilerType CopyType(ClangASTContext &dst, const CompilerType &src_type);
 
-  clang::Decl *CopyDecl(clang::ASTContext *dst_ctx, clang::ASTContext *src_ctx,
-                        clang::Decl *decl);
+  clang::Decl *CopyDecl(clang::ASTContext *dst_ctx, clang::Decl *decl);
 
-  lldb::opaque_compiler_type_t DeportType(clang::ASTContext *dst_ctx,
-                                          clang::ASTContext *src_ctx,
-                                          lldb::opaque_compiler_type_t type);
+  CompilerType DeportType(ClangASTContext &dst, const CompilerType &src_type);
 
-  clang::Decl *DeportDecl(clang::ASTContext *dst_ctx,
-                          clang::ASTContext *src_ctx, clang::Decl *decl);
+  clang::Decl *DeportDecl(clang::ASTContext *dst_ctx, clang::Decl *decl);
 
-  void InsertRecordDecl(clang::RecordDecl *decl, const LayoutInfo &layout);
+  /// Sets the layout for the given RecordDecl. The layout will later be
+  /// used by Clang's during code generation. Not calling this function for
+  /// a RecordDecl will cause that Clang's codegen tries to layout the
+  /// record by itself.
+  ///
+  /// \param decl The RecordDecl to set the layout for.
+  /// \param layout The layout for the record.
+  void SetRecordLayout(clang::RecordDecl *decl, const LayoutInfo &layout);
 
   bool LayoutRecordType(
       const clang::RecordDecl *record_decl, uint64_t &bit_size,
@@ -147,19 +92,6 @@
 
   bool RequireCompleteType(clang::QualType type);
 
-  bool ResolveDeclOrigin(const clang::Decl *decl, clang::Decl **original_decl,
-                         clang::ASTContext **original_ctx) {
-    DeclOrigin origin = GetDeclOrigin(decl);
-
-    if (original_decl)
-      *original_decl = origin.decl;
-
-    if (original_ctx)
-      *original_ctx = origin.ctx;
-
-    return origin.Valid();
-  }
-
   void SetDeclOrigin(const clang::Decl *decl, clang::Decl *original_decl);
 
   ClangASTMetadata *GetDeclMetadata(const clang::Decl *decl);
@@ -210,7 +142,7 @@
   void ForgetDestination(clang::ASTContext *dst_ctx);
   void ForgetSource(clang::ASTContext *dst_ctx, clang::ASTContext *src_ctx);
 
-private:
+public:
   struct DeclOrigin {
     DeclOrigin() : ctx(nullptr), decl(nullptr) {}
 
@@ -233,26 +165,34 @@
     clang::Decl *decl;
   };
 
-  typedef std::map<const clang::Decl *, DeclOrigin> OriginMap;
+  typedef llvm::DenseMap<const clang::Decl *, DeclOrigin> OriginMap;
+
+  /// Listener interface used by the ASTImporterDelegate to inform other code
+  /// about decls that have been imported the first time.
+  struct NewDeclListener {
+    virtual ~NewDeclListener() = default;
+    /// A decl has been imported for the first time.
+    virtual void NewDeclImported(clang::Decl *from, clang::Decl *to) = 0;
+  };
 
   /// ASTImporter that intercepts and records the import process of the
   /// underlying ASTImporter.
   ///
   /// This class updates the map from declarations to their original
-  /// declarations and can record and complete declarations that have been
-  /// imported in a certain interval.
+  /// declarations and can record declarations that have been imported in a
+  /// certain interval.
   ///
   /// When intercepting a declaration import, the ASTImporterDelegate uses the
   /// CxxModuleHandler to replace any missing or malformed declarations with
   /// their counterpart from a C++ module.
-  class ASTImporterDelegate : public clang::ASTImporter {
-  public:
+  struct ASTImporterDelegate : public clang::ASTImporter {
     ASTImporterDelegate(ClangASTImporter &master, clang::ASTContext *target_ctx,
                         clang::ASTContext *source_ctx)
         : clang::ASTImporter(*target_ctx, master.m_file_manager, *source_ctx,
                              master.m_file_manager, true /*minimal*/),
-          m_decls_to_deport(nullptr), m_decls_already_deported(nullptr),
-          m_master(master), m_source_ctx(source_ctx) {}
+          m_master(master), m_source_ctx(source_ctx) {
+      setODRHandling(clang::ASTImporter::ODRHandlingType::Liberal);
+    }
 
     /// Scope guard that attaches a CxxModuleHandler to an ASTImporterDelegate
     /// and deattaches it at the end of the scope. Supports being used multiple
@@ -285,48 +225,37 @@
       }
     };
 
-  protected:
-    llvm::Expected<clang::Decl *> ImportImpl(clang::Decl *From) override;
-
-  public:
-    // A call to "InitDeportWorkQueues" puts the delegate into deport mode.
-    // In deport mode, every copied Decl that could require completion is
-    // recorded and placed into the decls_to_deport set.
-    //
-    // A call to "ExecuteDeportWorkQueues" completes all the Decls that
-    // are in decls_to_deport, adding any Decls it sees along the way that it
-    // hasn't already deported.  It proceeds until decls_to_deport is empty.
-    //
-    // These calls must be paired.  Leaving a delegate in deport mode or trying
-    // to start deport delegate with a new pair of queues will result in an
-    // assertion failure.
-
-    void
-    InitDeportWorkQueues(std::set<clang::NamedDecl *> *decls_to_deport,
-                         std::set<clang::NamedDecl *> *decls_already_deported);
-    void ExecuteDeportWorkQueues();
-
     void ImportDefinitionTo(clang::Decl *to, clang::Decl *from);
 
     void Imported(clang::Decl *from, clang::Decl *to) override;
 
     clang::Decl *GetOriginalDecl(clang::Decl *To) override;
 
+    void SetImportListener(NewDeclListener *listener) {
+      assert(m_new_decl_listener == nullptr && "Already attached a listener?");
+      m_new_decl_listener = listener;
+    }
+    void RemoveImportListener() { m_new_decl_listener = nullptr; }
+
+  protected:
+    llvm::Expected<clang::Decl *> ImportImpl(clang::Decl *From) override;
+
+  private:
     /// Decls we should ignore when mapping decls back to their original
     /// ASTContext. Used by the CxxModuleHandler to mark declarations that
     /// were created from the 'std' C++ module to prevent that the Importer
     /// tries to sync them with the broken equivalent in the debug info AST.
-    std::set<clang::Decl *> m_decls_to_ignore;
-    std::set<clang::NamedDecl *> *m_decls_to_deport;
-    std::set<clang::NamedDecl *> *m_decls_already_deported;
+    llvm::SmallPtrSet<clang::Decl *, 16> m_decls_to_ignore;
     ClangASTImporter &m_master;
     clang::ASTContext *m_source_ctx;
     CxxModuleHandler *m_std_handler = nullptr;
+    /// The currently attached listener.
+    NewDeclListener *m_new_decl_listener = nullptr;
   };
 
   typedef std::shared_ptr<ASTImporterDelegate> ImporterDelegateSP;
-  typedef std::map<clang::ASTContext *, ImporterDelegateSP> DelegateMap;
-  typedef std::map<const clang::NamespaceDecl *, NamespaceMapSP>
+  typedef llvm::DenseMap<clang::ASTContext *, ImporterDelegateSP> DelegateMap;
+  typedef llvm::DenseMap<const clang::NamespaceDecl *, NamespaceMapSP>
       NamespaceMetaMap;
 
   struct ASTContextMetadata {
@@ -343,7 +272,7 @@
   };
 
   typedef std::shared_ptr<ASTContextMetadata> ASTContextMetadataSP;
-  typedef std::map<const clang::ASTContext *, ASTContextMetadataSP>
+  typedef llvm::DenseMap<const clang::ASTContext *, ASTContextMetadataSP>
       ContextMetadataMap;
 
   ContextMetadataMap m_metadata_map;
@@ -356,9 +285,8 @@
           ASTContextMetadataSP(new ASTContextMetadata(dst_ctx));
       m_metadata_map[dst_ctx] = context_md;
       return context_md;
-    } else {
-      return context_md_iter->second;
     }
+    return context_md_iter->second;
   }
 
   ASTContextMetadataSP MaybeGetContextMetadata(clang::ASTContext *dst_ctx) {
@@ -366,8 +294,7 @@
 
     if (context_md_iter != m_metadata_map.end())
       return context_md_iter->second;
-    else
-      return ASTContextMetadataSP();
+    return ASTContextMetadataSP();
   }
 
   ImporterDelegateSP GetDelegate(clang::ASTContext *dst_ctx,
@@ -382,11 +309,11 @@
           ImporterDelegateSP(new ASTImporterDelegate(*this, dst_ctx, src_ctx));
       delegates[src_ctx] = delegate;
       return delegate;
-    } else {
-      return delegate_iter->second;
     }
+    return delegate_iter->second;
   }
 
+public:
   DeclOrigin GetDeclOrigin(const clang::Decl *decl);
 
   clang::FileManager m_file_manager;
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/ClangASTMetadata.h b/src/llvm-project/lldb/include/lldb/Symbol/ClangASTMetadata.h
new file mode 100644
index 0000000..fdf4388
--- /dev/null
+++ b/src/llvm-project/lldb/include/lldb/Symbol/ClangASTMetadata.h
@@ -0,0 +1,100 @@
+//===-- ClangASTMetadata.h --------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_ClangASTMetadata_h
+#define liblldb_ClangASTMetadata_h
+
+#include "lldb/Core/dwarf.h"
+#include "lldb/lldb-defines.h"
+#include "lldb/lldb-enumerations.h"
+
+namespace lldb_private {
+
+class ClangASTMetadata {
+public:
+  ClangASTMetadata()
+      : m_user_id(0), m_union_is_user_id(false), m_union_is_isa_ptr(false),
+        m_has_object_ptr(false), m_is_self(false), m_is_dynamic_cxx(true) {}
+
+  bool GetIsDynamicCXXType() const { return m_is_dynamic_cxx; }
+
+  void SetIsDynamicCXXType(bool b) { m_is_dynamic_cxx = b; }
+
+  void SetUserID(lldb::user_id_t user_id) {
+    m_user_id = user_id;
+    m_union_is_user_id = true;
+    m_union_is_isa_ptr = false;
+  }
+
+  lldb::user_id_t GetUserID() const {
+    if (m_union_is_user_id)
+      return m_user_id;
+    else
+      return LLDB_INVALID_UID;
+  }
+
+  void SetISAPtr(uint64_t isa_ptr) {
+    m_isa_ptr = isa_ptr;
+    m_union_is_user_id = false;
+    m_union_is_isa_ptr = true;
+  }
+
+  uint64_t GetISAPtr() const {
+    if (m_union_is_isa_ptr)
+      return m_isa_ptr;
+    else
+      return 0;
+  }
+
+  void SetObjectPtrName(const char *name) {
+    m_has_object_ptr = true;
+    if (strcmp(name, "self") == 0)
+      m_is_self = true;
+    else if (strcmp(name, "this") == 0)
+      m_is_self = false;
+    else
+      m_has_object_ptr = false;
+  }
+
+  lldb::LanguageType GetObjectPtrLanguage() const {
+    if (m_has_object_ptr) {
+      if (m_is_self)
+        return lldb::eLanguageTypeObjC;
+      else
+        return lldb::eLanguageTypeC_plus_plus;
+    }
+    return lldb::eLanguageTypeUnknown;
+  }
+
+  const char *GetObjectPtrName() const {
+    if (m_has_object_ptr) {
+      if (m_is_self)
+        return "self";
+      else
+        return "this";
+    } else
+      return nullptr;
+  }
+
+  bool HasObjectPtr() const { return m_has_object_ptr; }
+
+  void Dump(Stream *s);
+
+private:
+  union {
+    lldb::user_id_t m_user_id;
+    uint64_t m_isa_ptr;
+  };
+
+  bool m_union_is_user_id : 1, m_union_is_isa_ptr : 1, m_has_object_ptr : 1,
+      m_is_self : 1, m_is_dynamic_cxx : 1;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_ClangASTMetadata_h
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h b/src/llvm-project/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
index a2d4f81..290ecc9 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h
@@ -9,86 +9,22 @@
 #ifndef liblldb_ClangExternalASTSourceCallbacks_h_
 #define liblldb_ClangExternalASTSourceCallbacks_h_
 
-#include <stdint.h>
-
-#include "clang/AST/CharUnits.h"
-#include "llvm/ADT/DenseMap.h"
-
-#include "lldb/Core/ClangForward.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
-#include "lldb/Symbol/CompilerType.h"
-#include "lldb/lldb-enumerations.h"
+#include "lldb/Symbol/ClangASTContext.h"
+#include "clang/AST/ExternalASTSource.h"
 
 namespace lldb_private {
 
-class ClangExternalASTSourceCallbacks : public ClangExternalASTSourceCommon {
+class ClangASTContext;
+
+class ClangExternalASTSourceCallbacks : public clang::ExternalASTSource {
 public:
-  typedef void (*CompleteTagDeclCallback)(void *baton, clang::TagDecl *);
-  typedef void (*CompleteObjCInterfaceDeclCallback)(void *baton,
-                                                    clang::ObjCInterfaceDecl *);
-  typedef void (*FindExternalVisibleDeclsByNameCallback)(
-      void *baton, const clang::DeclContext *DC, clang::DeclarationName Name,
-      llvm::SmallVectorImpl<clang::NamedDecl *> *results);
-  typedef bool (*LayoutRecordTypeCallback)(
-      void *baton, const clang::RecordDecl *Record, uint64_t &Size,
-      uint64_t &Alignment,
-      llvm::DenseMap<const clang::FieldDecl *, uint64_t> &FieldOffsets,
-      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-          &BaseOffsets,
-      llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
-          &VirtualBaseOffsets);
-
-  ClangExternalASTSourceCallbacks(
-      CompleteTagDeclCallback tag_decl_callback,
-      CompleteObjCInterfaceDeclCallback objc_decl_callback,
-      FindExternalVisibleDeclsByNameCallback find_by_name_callback,
-      LayoutRecordTypeCallback layout_record_type_callback,
-      void *callback_baton)
-      : m_callback_tag_decl(tag_decl_callback),
-        m_callback_objc_decl(objc_decl_callback),
-        m_callback_find_by_name(find_by_name_callback),
-        m_callback_layout_record_type(layout_record_type_callback),
-        m_callback_baton(callback_baton) {}
-
-  // clang::ExternalASTSource
-
-  clang::Decl *GetExternalDecl(uint32_t ID) override {
-    // This method only needs to be implemented if the AST source ever passes
-    // back decl sets as VisibleDeclaration objects.
-    return nullptr;
-  }
-
-  clang::Stmt *GetExternalDeclStmt(uint64_t Offset) override {
-    // This operation is meant to be used via a LazyOffsetPtr.  It only needs
-    // to be implemented if the AST source uses methods like
-    // FunctionDecl::setLazyBody when building decls.
-    return nullptr;
-  }
-
-  clang::Selector GetExternalSelector(uint32_t ID) override {
-    // This operation only needs to be implemented if the AST source returns
-    // non-zero for GetNumKnownSelectors().
-    return clang::Selector();
-  }
-
-  uint32_t GetNumExternalSelectors() override { return 0; }
-
-  clang::CXXBaseSpecifier *
-  GetExternalCXXBaseSpecifiers(uint64_t Offset) override {
-    return nullptr;
-  }
-
-  virtual void MaterializeVisibleDecls(const clang::DeclContext *decl_ctx) {}
+  ClangExternalASTSourceCallbacks(ClangASTContext &ast) : m_ast(ast) {}
 
   void FindExternalLexicalDecls(
       const clang::DeclContext *DC,
       llvm::function_ref<bool(clang::Decl::Kind)> IsKindWeWant,
       llvm::SmallVectorImpl<clang::Decl *> &Result) override;
 
-  bool
-  FindExternalVisibleDeclsByName(const clang::DeclContext *decl_ctx,
-                                 clang::DeclarationName decl_name) override;
-
   void CompleteType(clang::TagDecl *tag_decl) override;
 
   void CompleteType(clang::ObjCInterfaceDecl *objc_decl) override;
@@ -101,36 +37,8 @@
       llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
           &VirtualBaseOffsets) override;
 
-  void SetExternalSourceCallbacks(
-      CompleteTagDeclCallback tag_decl_callback,
-      CompleteObjCInterfaceDeclCallback objc_decl_callback,
-      FindExternalVisibleDeclsByNameCallback find_by_name_callback,
-      LayoutRecordTypeCallback layout_record_type_callback,
-      void *callback_baton) {
-    m_callback_tag_decl = tag_decl_callback;
-    m_callback_objc_decl = objc_decl_callback;
-    m_callback_find_by_name = find_by_name_callback;
-    m_callback_layout_record_type = layout_record_type_callback;
-    m_callback_baton = callback_baton;
-  }
-
-  void RemoveExternalSourceCallbacks(void *callback_baton) {
-    if (callback_baton == m_callback_baton) {
-      m_callback_tag_decl = nullptr;
-      m_callback_objc_decl = nullptr;
-      m_callback_find_by_name = nullptr;
-      m_callback_layout_record_type = nullptr;
-    }
-  }
-
-protected:
-  // Classes that inherit from ClangExternalASTSourceCallbacks can see and
-  // modify these
-  CompleteTagDeclCallback m_callback_tag_decl;
-  CompleteObjCInterfaceDeclCallback m_callback_objc_decl;
-  FindExternalVisibleDeclsByNameCallback m_callback_find_by_name;
-  LayoutRecordTypeCallback m_callback_layout_record_type;
-  void *m_callback_baton;
+private:
+  ClangASTContext &m_ast;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/ClangExternalASTSourceCommon.h b/src/llvm-project/lldb/include/lldb/Symbol/ClangExternalASTSourceCommon.h
deleted file mode 100644
index 8e69f6d..0000000
--- a/src/llvm-project/lldb/include/lldb/Symbol/ClangExternalASTSourceCommon.h
+++ /dev/null
@@ -1,143 +0,0 @@
-//===-- ClangExternalASTSourceCommon.h --------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ClangExternalASTSourceCommon_h
-#define liblldb_ClangExternalASTSourceCommon_h
-
-// Clang headers like to use NDEBUG inside of them to enable/disable debug
-// related features using "#ifndef NDEBUG" preprocessor blocks to do one thing
-// or another. This is bad because it means that if clang was built in release
-// mode, it assumes that you are building in release mode which is not always
-// the case. You can end up with functions that are defined as empty in header
-// files when NDEBUG is not defined, and this can cause link errors with the
-// clang .a files that you have since you might be missing functions in the .a
-// file. So we have to define NDEBUG when including clang headers to avoid any
-// mismatches. This is covered by rdar://problem/8691220
-
-#if !defined(NDEBUG) && !defined(LLVM_NDEBUG_OFF)
-#define LLDB_DEFINED_NDEBUG_FOR_CLANG
-#define NDEBUG
-// Need to include assert.h so it is as clang would expect it to be (disabled)
-#include <assert.h>
-#endif
-
-#ifdef LLDB_DEFINED_NDEBUG_FOR_CLANG
-#undef NDEBUG
-#undef LLDB_DEFINED_NDEBUG_FOR_CLANG
-// Need to re-include assert.h so it is as _we_ would expect it to be (enabled)
-#include <assert.h>
-#endif
-
-#include "clang/AST/ExternalASTSource.h"
-
-#include "lldb/Core/dwarf.h"
-#include "lldb/lldb-defines.h"
-#include "lldb/lldb-enumerations.h"
-
-namespace lldb_private {
-
-class ClangASTMetadata {
-public:
-  ClangASTMetadata()
-      : m_user_id(0), m_union_is_user_id(false), m_union_is_isa_ptr(false),
-        m_has_object_ptr(false), m_is_self(false), m_is_dynamic_cxx(true) {}
-
-  bool GetIsDynamicCXXType() const { return m_is_dynamic_cxx; }
-
-  void SetIsDynamicCXXType(bool b) { m_is_dynamic_cxx = b; }
-
-  void SetUserID(lldb::user_id_t user_id) {
-    m_user_id = user_id;
-    m_union_is_user_id = true;
-    m_union_is_isa_ptr = false;
-  }
-
-  lldb::user_id_t GetUserID() const {
-    if (m_union_is_user_id)
-      return m_user_id;
-    else
-      return LLDB_INVALID_UID;
-  }
-
-  void SetISAPtr(uint64_t isa_ptr) {
-    m_isa_ptr = isa_ptr;
-    m_union_is_user_id = false;
-    m_union_is_isa_ptr = true;
-  }
-
-  uint64_t GetISAPtr() const {
-    if (m_union_is_isa_ptr)
-      return m_isa_ptr;
-    else
-      return 0;
-  }
-
-  void SetObjectPtrName(const char *name) {
-    m_has_object_ptr = true;
-    if (strcmp(name, "self") == 0)
-      m_is_self = true;
-    else if (strcmp(name, "this") == 0)
-      m_is_self = false;
-    else
-      m_has_object_ptr = false;
-  }
-
-  lldb::LanguageType GetObjectPtrLanguage() const {
-    if (m_has_object_ptr) {
-      if (m_is_self)
-        return lldb::eLanguageTypeObjC;
-      else
-        return lldb::eLanguageTypeC_plus_plus;
-    }
-    return lldb::eLanguageTypeUnknown;
-  }
-
-  const char *GetObjectPtrName() const {
-    if (m_has_object_ptr) {
-      if (m_is_self)
-        return "self";
-      else
-        return "this";
-    } else
-      return nullptr;
-  }
-
-  bool HasObjectPtr() const { return m_has_object_ptr; }
-
-  void Dump(Stream *s);
-
-private:
-  union {
-    lldb::user_id_t m_user_id;
-    uint64_t m_isa_ptr;
-  };
-
-  bool m_union_is_user_id : 1, m_union_is_isa_ptr : 1, m_has_object_ptr : 1,
-      m_is_self : 1, m_is_dynamic_cxx : 1;
-};
-
-class ClangExternalASTSourceCommon : public clang::ExternalASTSource {
-public:
-  ClangExternalASTSourceCommon();
-  ~ClangExternalASTSourceCommon() override;
-
-  ClangASTMetadata *GetMetadata(const void *object);
-  void SetMetadata(const void *object, ClangASTMetadata &metadata);
-  bool HasMetadata(const void *object);
-
-  static ClangExternalASTSourceCommon *Lookup(clang::ExternalASTSource *source);
-
-private:
-  typedef llvm::DenseMap<const void *, ClangASTMetadata> MetadataMap;
-
-  MetadataMap m_metadata;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_ClangExternalASTSourceCommon_h
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/ClangUtil.h b/src/llvm-project/lldb/include/lldb/Symbol/ClangUtil.h
index d610603..5ffbce3 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/ClangUtil.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/ClangUtil.h
@@ -11,6 +11,7 @@
 #ifndef LLDB_SYMBOL_CLANGUTIL_H
 #define LLDB_SYMBOL_CLANGUTIL_H
 
+#include "clang/AST/DeclBase.h"
 #include "clang/AST/Type.h"
 
 #include "lldb/Symbol/CompilerType.h"
@@ -30,6 +31,15 @@
   static CompilerType RemoveFastQualifiers(const CompilerType &ct);
 
   static clang::TagDecl *GetAsTagDecl(const CompilerType &type);
+
+  /// Returns a textual representation of the given Decl's AST. Does not
+  /// deserialize any child nodes.
+  static std::string DumpDecl(const clang::Decl *d);
+  /// Returns a textual representation of the given type.
+  static std::string ToString(const clang::Type *t);
+  /// Returns a textual representation of the given CompilerType (assuming
+  /// its underlying type is a Clang type).
+  static std::string ToString(const CompilerType &c);
 };
 }
 
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h b/src/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h
index c3ba2e2..aec5cc7 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/CompileUnit.h
@@ -13,12 +13,14 @@
 #include "lldb/Core/ModuleChild.h"
 #include "lldb/Symbol/DebugMacros.h"
 #include "lldb/Symbol/Function.h"
+#include "lldb/Symbol/LineTable.h"
 #include "lldb/Symbol/SourceModule.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/UserID.h"
 #include "lldb/lldb-enumerations.h"
 
 #include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/DenseSet.h"
 
 namespace lldb_private {
 /// \class CompileUnit CompileUnit.h "lldb/Symbol/CompileUnit.h"
@@ -34,7 +36,6 @@
 /// table.
 class CompileUnit : public std::enable_shared_from_this<CompileUnit>,
                     public ModuleChild,
-                    public FileSpec,
                     public UserID,
                     public SymbolContextScope {
 public:
@@ -44,7 +45,7 @@
   /// convert into a FileSpec, the SymbolFile plug-in supplied \a uid, and the
   /// source language type.
   ///
-  /// \param[in] module
+  /// \param[in] module_sp
   ///     The parent module that owns this compile unit. This value
   ///     must be a valid pointer value.
   ///
@@ -82,7 +83,7 @@
   /// convert into a FileSpec, the SymbolFile plug-in supplied \a uid, and the
   /// source language type.
   ///
-  /// \param[in] module
+  /// \param[in] module_sp
   ///     The parent module that owns this compile unit. This value
   ///     must be a valid pointer value.
   ///
@@ -115,9 +116,6 @@
               const FileSpec &file_spec, lldb::user_id_t uid,
               lldb::LanguageType language, lldb_private::LazyBool is_optimized);
 
-  /// Destructor
-  ~CompileUnit() override;
-
   /// Add a function to this compile unit.
   ///
   /// Typically called by the SymbolFile plug-ins as they partially parse the
@@ -163,6 +161,18 @@
   void ForeachFunction(
       llvm::function_ref<bool(const lldb::FunctionSP &)> lambda) const;
 
+  /// Find a function in the compile unit based on the predicate matching_lambda
+  ///
+  /// \param[in] matching_lambda
+  ///     A predicate that will be used within FindFunction to evaluate each
+  ///     FunctionSP in m_functions_by_uid. When the predicate returns true
+  ///     FindFunction will return the corresponding FunctionSP.
+  ///
+  /// \return
+  ///   The first FunctionSP that the matching_lambda prediate returns true for.
+  lldb::FunctionSP FindFunction(
+      llvm::function_ref<bool(const lldb::FunctionSP &)> matching_lambda);
+
   /// Dump the compile unit contents to the stream \a s.
   ///
   /// \param[in] s
@@ -212,6 +222,9 @@
                          const FileSpec *file_spec_ptr, bool exact,
                          LineEntry *line_entry);
 
+  /// Return the primary source file associated with this compile unit.
+  const FileSpec &GetPrimaryFile() const { return m_file_spec; }
+
   /// Get the line table for the compile unit.
   ///
   /// Called by clients and the SymbolFile plug-in. The SymbolFile plug-ins
@@ -225,6 +238,25 @@
 
   DebugMacros *GetDebugMacros();
 
+  /// Apply a lambda to each external lldb::Module referenced by this
+  /// compilation unit. Recursively also descends into the referenced external
+  /// modules of any encountered compilation unit.
+  ///
+  /// \param visited_symbol_files
+  ///     A set of SymbolFiles that were already visited to avoid
+  ///     visiting one file more than once.
+  ///
+  /// \param[in] lambda
+  ///     The lambda that should be applied to every function. The lambda can
+  ///     return true if the iteration should be aborted earlier.
+  ///
+  /// \return
+  ///     If the lambda early-exited, this function returns true to
+  ///     propagate the early exit.
+  virtual bool ForEachExternalModule(
+      llvm::DenseSet<lldb_private::SymbolFile *> &visited_symbol_files,
+      llvm::function_ref<bool(Module &)> lambda);
+
   /// Get the compile unit's support file list.
   ///
   /// The support file list is used by the line table, and any objects that
@@ -298,6 +330,8 @@
   ///     A line table object pointer that this object now owns.
   void SetLineTable(LineTable *line_table);
 
+  void SetSupportFiles(const FileSpecList &support_files);
+
   void SetDebugMacros(const DebugMacrosSP &debug_macros);
 
   /// Set accessor for the variable list.
@@ -347,14 +381,11 @@
   ///     A SymbolContext list class that will get any matching
   ///     entries appended to.
   ///
-  /// \return
-  ///     The number of new matches that were added to \a sc_list.
-  ///
   /// \see enum SymbolContext::Scope
-  uint32_t ResolveSymbolContext(const FileSpec &file_spec, uint32_t line,
-                                bool check_inlines, bool exact,
-                                lldb::SymbolContextItem resolve_scope,
-                                SymbolContextList &sc_list);
+  void ResolveSymbolContext(const FileSpec &file_spec, uint32_t line,
+                            bool check_inlines, bool exact,
+                            lldb::SymbolContextItem resolve_scope,
+                            SymbolContextList &sc_list);
 
   /// Get whether compiler optimizations were enabled for this compile unit
   ///
@@ -384,6 +415,8 @@
   /// All modules, including the current module, imported by this
   /// compile unit.
   std::vector<SourceModule> m_imported_modules;
+  /// The primary file associated with this compile unit.
+  FileSpec m_file_spec;
   /// Files associated with this compile unit's line table and
   /// declarations.
   FileSpecList m_support_files;
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/CompilerDecl.h b/src/llvm-project/lldb/include/lldb/Symbol/CompilerDecl.h
index 4817ec4..4fd269d 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/CompilerDecl.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/CompilerDecl.h
@@ -15,16 +15,28 @@
 
 namespace lldb_private {
 
+/// Represents a generic declaration such as a function declaration.
+///
+/// This class serves as an abstraction for a declaration inside one of the
+/// TypeSystems implemented by the language plugins. It does not have any actual
+/// logic in it but only stores an opaque pointer and a pointer to the
+/// TypeSystem that gives meaning to this opaque pointer. All methods of this
+/// class should call their respective method in the TypeSystem interface and
+/// pass the opaque pointer along.
+///
+/// \see lldb_private::TypeSystem
 class CompilerDecl {
 public:
   // Constructors and Destructors
-  CompilerDecl() : m_type_system(nullptr), m_opaque_decl(nullptr) {}
+  CompilerDecl() = default;
 
+  /// Creates a CompilerDecl with the given TypeSystem and opaque pointer.
+  ///
+  /// This constructor should only be called from the respective TypeSystem
+  /// implementation.
   CompilerDecl(TypeSystem *type_system, void *decl)
       : m_type_system(type_system), m_opaque_decl(decl) {}
 
-  ~CompilerDecl() {}
-
   // Tests
 
   explicit operator bool() const { return IsValid(); }
@@ -39,8 +51,6 @@
     return m_type_system != nullptr && m_opaque_decl != nullptr;
   }
 
-  bool IsClang() const;
-
   // Accessors
 
   TypeSystem *GetTypeSystem() const { return m_type_system; }
@@ -75,8 +85,8 @@
   CompilerType GetFunctionArgumentType(size_t arg_idx) const;
 
 private:
-  TypeSystem *m_type_system;
-  void *m_opaque_decl;
+  TypeSystem *m_type_system = nullptr;
+  void *m_opaque_decl = nullptr;
 };
 
 bool operator==(const CompilerDecl &lhs, const CompilerDecl &rhs);
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/CompilerDeclContext.h b/src/llvm-project/lldb/include/lldb/Symbol/CompilerDeclContext.h
index e7958c0..6db6f4d 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/CompilerDeclContext.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/CompilerDeclContext.h
@@ -16,16 +16,32 @@
 
 namespace lldb_private {
 
+/// Represents a generic declaration context in a program. A declaration context
+/// is data structure that contains declarations (e.g. namespaces).
+///
+/// This class serves as an abstraction for a declaration context inside one of
+/// the TypeSystems implemented by the language plugins. It does not have any
+/// actual logic in it but only stores an opaque pointer and a pointer to the
+/// TypeSystem that gives meaning to this opaque pointer. All methods of this
+/// class should call their respective method in the TypeSystem interface and
+/// pass the opaque pointer along.
+///
+/// \see lldb_private::TypeSystem
 class CompilerDeclContext {
 public:
-  // Constructors and Destructors
-  CompilerDeclContext() : m_type_system(nullptr), m_opaque_decl_ctx(nullptr) {}
+  /// Constructs an invalid CompilerDeclContext.
+  CompilerDeclContext() = default;
 
+  /// Constructs a CompilerDeclContext with the given opaque decl context
+  /// and its respective TypeSystem instance.
+  ///
+  /// This constructor should only be called from the respective TypeSystem
+  /// implementation.
+  ///
+  /// \see lldb_private::ClangASTContext::CreateDeclContext(clang::DeclContext*)
   CompilerDeclContext(TypeSystem *type_system, void *decl_ctx)
       : m_type_system(type_system), m_opaque_decl_ctx(decl_ctx) {}
 
-  ~CompilerDeclContext() {}
-
   // Tests
 
   explicit operator bool() const { return IsValid(); }
@@ -40,8 +56,6 @@
     return m_type_system != nullptr && m_opaque_decl_ctx != nullptr;
   }
 
-  bool IsClang() const;
-
   std::vector<CompilerDecl> FindDeclByName(ConstString name,
                                            const bool ignore_using_decls);
 
@@ -102,11 +116,9 @@
 
   ConstString GetScopeQualifiedName() const;
 
-  bool IsStructUnionOrClass() const;
-
 private:
-  TypeSystem *m_type_system;
-  void *m_opaque_decl_ctx;
+  TypeSystem *m_type_system = nullptr;
+  void *m_opaque_decl_ctx = nullptr;
 };
 
 bool operator==(const CompilerDeclContext &lhs, const CompilerDeclContext &rhs);
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/CompilerType.h b/src/llvm-project/lldb/include/lldb/Symbol/CompilerType.h
index 98d9165..37e8262 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/CompilerType.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/CompilerType.h
@@ -13,7 +13,6 @@
 #include <string>
 #include <vector>
 
-#include "lldb/Core/ClangForward.h"
 #include "lldb/lldb-private.h"
 #include "llvm/ADT/APSInt.h"
 
@@ -21,25 +20,31 @@
 
 class DataExtractor;
 
-// A class that can carry around a clang ASTContext and a opaque clang
-// QualType. A clang::QualType can be easily reconstructed from an opaque clang
-// type and often the ASTContext is needed when doing various type related
-// tasks, so this class allows both items to travel in a single very
-// lightweight class that can be used. There are many static equivalents of the
-// member functions that allow the ASTContext and the opaque clang QualType to
-// be specified for ease of use and to avoid code duplication.
+/// Represents a generic type in a programming language.
+///
+/// This class serves as an abstraction for a type inside one of the TypeSystems
+/// implemented by the language plugins. It does not have any actual logic in it
+/// but only stores an opaque pointer and a pointer to the TypeSystem that
+/// gives meaning to this opaque pointer. All methods of this class should call
+/// their respective method in the TypeSystem interface and pass the opaque
+/// pointer along.
+///
+/// \see lldb_private::TypeSystem
 class CompilerType {
 public:
-  // Constructors and Destructors
-  CompilerType(TypeSystem *type_system, lldb::opaque_compiler_type_t type);
-  CompilerType(clang::ASTContext *ast_context, clang::QualType qual_type);
+  /// Creates a CompilerType with the given TypeSystem and opaque compiler type.
+  ///
+  /// This constructor should only be called from the respective TypeSystem
+  /// implementation.
+  ///
+  /// \see lldb_private::ClangASTContext::GetType(clang::QualType)
+  CompilerType(TypeSystem *type_system, lldb::opaque_compiler_type_t type)
+      : m_type(type), m_type_system(type_system) {}
 
   CompilerType(const CompilerType &rhs)
       : m_type(rhs.m_type), m_type_system(rhs.m_type_system) {}
 
-  CompilerType() : m_type(nullptr), m_type_system(nullptr) {}
-
-  ~CompilerType();
+  CompilerType() = default;
 
   // Operators
 
@@ -110,11 +115,6 @@
 
   bool IsPolymorphicClass() const;
 
-  bool
-  IsPossibleCPlusPlusDynamicType(CompilerType *target_type = nullptr) const {
-    return IsPossibleDynamicType(target_type, true, false);
-  }
-
   bool IsPossibleDynamicType(CompilerType *target_type, // Can pass nullptr
                              bool check_cplusplus, bool check_objc) const;
 
@@ -169,8 +169,6 @@
   void SetCompilerType(TypeSystem *type_system,
                        lldb::opaque_compiler_type_t type);
 
-  void SetCompilerType(clang::ASTContext *ast, clang::QualType qual_type);
-
   unsigned GetTypeQualifiers() const;
 
   // Creating related types
@@ -227,6 +225,11 @@
   // an invalid type.
   CompilerType AddVolatileModifier() const;
 
+  // Return a new CompilerType that is the atomic type of this type. If this
+  // type is not valid or the type system doesn't support atomic types, this
+  // returns an invalid type.
+  CompilerType GetAtomicType() const;
+
   // Return a new CompilerType adds a restrict modifier to this type if this
   // type is valid and the type system supports restrict modifiers, else return
   // an invalid type.
@@ -257,7 +260,7 @@
 
   lldb::Format GetFormat() const;
 
-  size_t GetTypeBitAlign() const;
+  llvm::Optional<size_t> GetTypeBitAlign(ExecutionContextScope *exe_scope) const;
 
   uint32_t GetNumChildren(bool omit_empty_base_classes,
                           const ExecutionContext *exe_ctx) const;
@@ -336,13 +339,6 @@
 
   bool IsMeaninglessWithoutDynamicResolution() const;
 
-  // Pointers & References
-
-  // Converts "s" to a floating point value and place resulting floating point
-  // bytes in the "dst" buffer.
-  size_t ConvertStringToFloatValue(const char *s, uint8_t *dst,
-                                   size_t dst_size) const;
-
   // Dumping types
 
 #ifndef NDEBUG
@@ -373,22 +369,14 @@
   bool GetValueAsScalar(const DataExtractor &data, lldb::offset_t data_offset,
                         size_t data_byte_size, Scalar &value) const;
 
-  bool SetValueFromScalar(const Scalar &value, Stream &strm);
-
-  bool ReadFromMemory(ExecutionContext *exe_ctx, lldb::addr_t addr,
-                      AddressType address_type, DataExtractor &data);
-
-  bool WriteToMemory(ExecutionContext *exe_ctx, lldb::addr_t addr,
-                     AddressType address_type, StreamString &new_value);
-
   void Clear() {
     m_type = nullptr;
     m_type_system = nullptr;
   }
 
 private:
-  lldb::opaque_compiler_type_t m_type;
-  TypeSystem *m_type_system;
+  lldb::opaque_compiler_type_t m_type = nullptr;
+  TypeSystem *m_type_system = nullptr;
 };
 
 bool operator==(const CompilerType &lhs, const CompilerType &rhs);
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/DebugMacros.h b/src/llvm-project/lldb/include/lldb/Symbol/DebugMacros.h
index d364299..da46c8b 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/DebugMacros.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/DebugMacros.h
@@ -23,7 +23,9 @@
 
 class DebugMacroEntry {
 public:
-  enum EntryType { INVALID, DEFINE, UNDEF, START_FILE, END_FILE, INDIRECT };
+  enum EntryType : uint8_t {
+      INVALID, DEFINE, UNDEF, START_FILE, END_FILE, INDIRECT
+  };
 
 public:
   static DebugMacroEntry CreateDefineEntry(uint32_t line, const char *str);
@@ -42,7 +44,7 @@
 
   ~DebugMacroEntry() = default;
 
-  EntryType GetType() const { return m_type; }
+  EntryType GetType() const { return static_cast<EntryType>(m_type); }
 
   uint64_t GetLineNumber() const { return m_line; }
 
@@ -60,7 +62,7 @@
 
   DebugMacroEntry(EntryType type, const DebugMacrosSP &debug_macros_sp);
 
-  EntryType m_type : 3;
+  uint32_t m_type : 3;
   uint32_t m_line : 29;
   uint32_t m_debug_line_file_idx;
   ConstString m_str;
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/DeclVendor.h b/src/llvm-project/lldb/include/lldb/Symbol/DeclVendor.h
index 9c10fe1..748c0c8 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/DeclVendor.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/DeclVendor.h
@@ -9,11 +9,8 @@
 #ifndef liblldb_DeclVendor_h_
 #define liblldb_DeclVendor_h_
 
-#include "lldb/Core/ClangForward.h"
 #include "lldb/lldb-defines.h"
 
-#include "clang/AST/ExternalASTMerger.h"
-
 #include <vector>
 
 namespace lldb_private {
@@ -22,11 +19,19 @@
 // declarations that are not necessarily backed by a specific symbol file.
 class DeclVendor {
 public:
+  enum DeclVendorKind {
+    eClangDeclVendor,
+    eClangModuleDeclVendor,
+    eAppleObjCDeclVendor,
+    eLastClangDeclVendor,
+  };
   // Constructors and Destructors
-  DeclVendor() {}
+  DeclVendor(DeclVendorKind kind) : m_kind(kind) {}
 
   virtual ~DeclVendor() {}
 
+  DeclVendorKind GetKind() const { return m_kind; }
+
   /// Look up the set of Decls that the DeclVendor currently knows about
   /// matching a given name.
   ///
@@ -45,7 +50,7 @@
   ///     max_matches.
   virtual uint32_t FindDecls(ConstString name, bool append,
                              uint32_t max_matches,
-                             std::vector<clang::NamedDecl *> &decls) = 0;
+                             std::vector<CompilerDecl> &decls) = 0;
 
   /// Look up the types that the DeclVendor currently knows about matching a
   /// given name.
@@ -60,16 +65,11 @@
   ///     The vector of CompilerTypes that was found.
   std::vector<CompilerType> FindTypes(ConstString name, uint32_t max_matches);
 
-  /// Interface for ExternalASTMerger.  Returns an ImporterSource 
-  /// allowing type completion.
-  ///
-  /// \return
-  ///     An ImporterSource for this DeclVendor.
-  virtual clang::ExternalASTMerger::ImporterSource GetImporterSource() = 0;
-
 private:
   // For DeclVendor only
   DISALLOW_COPY_AND_ASSIGN(DeclVendor);
+
+  const DeclVendorKind m_kind;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/Declaration.h b/src/llvm-project/lldb/include/lldb/Symbol/Declaration.h
index 63798f8..a751d6b 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/Declaration.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/Declaration.h
@@ -55,16 +55,6 @@
   {
   }
 
-  /// Construct with a reference to another Declaration object.
-  Declaration(const Declaration &rhs)
-      : m_file(rhs.m_file), m_line(rhs.m_line)
-#ifdef LLDB_ENABLE_DECLARATION_COLUMNS
-        ,
-        m_column(rhs.m_column)
-#endif
-  {
-  }
-
   /// Construct with a pointer to another Declaration object.
   Declaration(const Declaration *decl_ptr)
       : m_file(), m_line(0)
@@ -102,9 +92,9 @@
   ///     The Right Hand Side const Declaration object reference.
   ///
   /// \return
-  ///     \li -1 if lhs < rhs
-  ///     \li 0 if lhs == rhs
-  ///     \li 1 if lhs > rhs
+  ///     -1 if lhs < rhs
+  ///     0 if lhs == rhs
+  ///     1 if lhs > rhs
   static int Compare(const Declaration &lhs, const Declaration &rhs);
 
   /// Checks if this object has the same file and line as another declaration
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/FuncUnwinders.h b/src/llvm-project/lldb/include/lldb/Symbol/FuncUnwinders.h
index cc767d4..c49f6b0 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/FuncUnwinders.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/FuncUnwinders.h
@@ -76,6 +76,11 @@
 
   lldb::UnwindPlanSP GetAssemblyUnwindPlan(Target &target, Thread &thread);
 
+  lldb::UnwindPlanSP GetObjectFileUnwindPlan(Target &target);
+
+  lldb::UnwindPlanSP GetObjectFileAugmentedUnwindPlan(Target &target,
+                                                      Thread &thread);
+
   lldb::UnwindPlanSP GetEHFrameUnwindPlan(Target &target);
 
   lldb::UnwindPlanSP GetEHFrameAugmentedUnwindPlan(Target &target,
@@ -113,10 +118,12 @@
   std::recursive_mutex m_mutex;
 
   lldb::UnwindPlanSP m_unwind_plan_assembly_sp;
+  lldb::UnwindPlanSP m_unwind_plan_object_file_sp;
   lldb::UnwindPlanSP m_unwind_plan_eh_frame_sp;
   lldb::UnwindPlanSP m_unwind_plan_debug_frame_sp;
 
   // augmented by assembly inspection so it's valid everywhere
+  lldb::UnwindPlanSP m_unwind_plan_object_file_augmented_sp;
   lldb::UnwindPlanSP m_unwind_plan_eh_frame_augmented_sp;
   lldb::UnwindPlanSP m_unwind_plan_debug_frame_augmented_sp;
 
@@ -130,7 +137,9 @@
   // Fetching the UnwindPlans can be expensive - if we've already attempted to
   // get one & failed, don't try again.
   bool m_tried_unwind_plan_assembly : 1, m_tried_unwind_plan_eh_frame : 1,
+      m_tried_unwind_plan_object_file : 1,
       m_tried_unwind_plan_debug_frame : 1,
+      m_tried_unwind_plan_object_file_augmented : 1,
       m_tried_unwind_plan_eh_frame_augmented : 1,
       m_tried_unwind_plan_debug_frame_augmented : 1,
       m_tried_unwind_plan_compact_unwind : 1,
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/Function.h b/src/llvm-project/lldb/include/lldb/Symbol/Function.h
index f68a167..f675b5f 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/Function.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/Function.h
@@ -19,6 +19,8 @@
 
 namespace lldb_private {
 
+class ExecutionContext;
+
 /// \class FunctionInfo Function.h "lldb/Symbol/Function.h"
 /// A class that contains generic function information.
 ///
@@ -68,9 +70,9 @@
   ///     The Right Hand Side const FunctionInfo object reference.
   ///
   /// \return
-  ///     \li -1 if lhs < rhs
-  ///     \li 0 if lhs == rhs
-  ///     \li 1 if lhs > rhs
+  ///     -1 if lhs < rhs
+  ///     0 if lhs == rhs
+  ///     1 if lhs > rhs
   static int Compare(const FunctionInfo &lhs, const FunctionInfo &rhs);
 
   /// Dump a description of this object to a Stream.
@@ -140,7 +142,7 @@
   /// \param[in] call_decl_ptr
   ///     Optional calling location declaration information that
   ///     describes from where this inlined function was called.
-  InlineFunctionInfo(const char *name, const char *mangled,
+  InlineFunctionInfo(const char *name, llvm::StringRef mangled,
                      const Declaration *decl_ptr,
                      const Declaration *call_decl_ptr);
 
@@ -183,9 +185,9 @@
   ///     reference.
   ///
   /// \return
-  ///     \li -1 if lhs < rhs
-  ///     \li 0 if lhs == rhs
-  ///     \li 1 if lhs > rhs
+  ///     -1 if lhs < rhs
+  ///     0 if lhs == rhs
+  ///     1 if lhs > rhs
   int Compare(const InlineFunctionInfo &lhs, const InlineFunctionInfo &rhs);
 
   /// Dump a description of this object to a Stream.
@@ -246,28 +248,32 @@
 
 class Function;
 
+/// \class CallSiteParameter Function.h "lldb/Symbol/Function.h"
+///
+/// Represent the locations of a parameter at a call site, both in the caller
+/// and in the callee.
+struct CallSiteParameter {
+  DWARFExpression LocationInCallee;
+  DWARFExpression LocationInCaller;
+};
+
+/// A vector of \c CallSiteParameter.
+using CallSiteParameterArray = llvm::SmallVector<CallSiteParameter, 0>;
+
 /// \class CallEdge Function.h "lldb/Symbol/Function.h"
 ///
 /// Represent a call made within a Function. This can be used to find a path
-/// in the call graph between two functions.
+/// in the call graph between two functions, or to evaluate DW_OP_entry_value.
 class CallEdge {
 public:
-  /// Construct a call edge using a symbol name to identify the calling
-  /// function, and a return PC within the calling function to identify a
-  /// specific call site.
-  ///
-  /// TODO: A symbol name may not be globally unique. To disambiguate ODR
-  /// conflicts, it's necessary to determine the \c Target a call edge is
-  /// associated with before resolving it.
-  CallEdge(const char *symbol_name, lldb::addr_t return_pc);
-
-  CallEdge(CallEdge &&) = default;
-  CallEdge &operator=(CallEdge &&) = default;
+  virtual ~CallEdge() {}
 
   /// Get the callee's definition.
   ///
-  /// Note that this might lazily invoke the DWARF parser.
-  Function *GetCallee(ModuleList &images);
+  /// Note that this might lazily invoke the DWARF parser. A register context
+  /// from the caller's activation is needed to find indirect call targets.
+  virtual Function *GetCallee(ModuleList &images,
+                              ExecutionContext &exe_ctx) = 0;
 
   /// Get the load PC address of the instruction which executes after the call
   /// returns. Returns LLDB_INVALID_ADDRESS iff this is a tail call. \p caller
@@ -279,25 +285,73 @@
   /// offset.
   lldb::addr_t GetUnresolvedReturnPCAddress() const { return return_pc; }
 
-private:
-  void ParseSymbolFileAndResolve(ModuleList &images);
+  /// Get the call site parameters available at this call edge.
+  llvm::ArrayRef<CallSiteParameter> GetCallSiteParameters() const {
+    return parameters;
+  }
 
-  /// Either the callee's mangled name or its definition, discriminated by
-  /// \ref resolved.
-  union {
-    const char *symbol_name;
-    Function *def;
-  } lazy_callee;
+protected:
+  CallEdge(lldb::addr_t return_pc, CallSiteParameterArray &&parameters)
+      : return_pc(return_pc), parameters(std::move(parameters)) {}
 
   /// An invalid address if this is a tail call. Otherwise, the function-local
   /// PC offset. Adding this PC offset to the function's base load address
   /// gives the return PC for the call.
   lldb::addr_t return_pc;
 
-  /// Whether or not an attempt was made to find the callee's definition.
-  bool resolved;
+  CallSiteParameterArray parameters;
+};
 
-  DISALLOW_COPY_AND_ASSIGN(CallEdge);
+/// A direct call site. Used to represent call sites where the address of the
+/// callee is fixed (e.g. a function call in C in which the call target is not
+/// a function pointer).
+class DirectCallEdge : public CallEdge {
+public:
+  /// Construct a call edge using a symbol name to identify the callee, and a
+  /// return PC within the calling function to identify a specific call site.
+  DirectCallEdge(const char *symbol_name, lldb::addr_t return_pc,
+                 CallSiteParameterArray &&parameters)
+      : CallEdge(return_pc, std::move(parameters)) {
+    lazy_callee.symbol_name = symbol_name;
+  }
+
+  Function *GetCallee(ModuleList &images, ExecutionContext &exe_ctx) override;
+
+private:
+  void ParseSymbolFileAndResolve(ModuleList &images);
+
+  // Used to describe a direct call.
+  //
+  // Either the callee's mangled name or its definition, discriminated by
+  // \ref resolved.
+  union {
+    const char *symbol_name;
+    Function *def;
+  } lazy_callee;
+
+  /// Whether or not an attempt was made to find the callee's definition.
+  bool resolved = false;
+};
+
+/// An indirect call site. Used to represent call sites where the address of
+/// the callee is not fixed, e.g. a call to a C++ virtual function (where the
+/// address is loaded out of a vtable), or a call to a function pointer in C.
+class IndirectCallEdge : public CallEdge {
+public:
+  /// Construct a call edge using a DWARFExpression to identify the callee, and
+  /// a return PC within the calling function to identify a specific call site.
+  IndirectCallEdge(DWARFExpression call_target, lldb::addr_t return_pc,
+                   CallSiteParameterArray &&parameters)
+      : CallEdge(return_pc, std::move(parameters)),
+        call_target(std::move(call_target)) {}
+
+  Function *GetCallee(ModuleList &images, ExecutionContext &exe_ctx) override;
+
+private:
+  // Used to describe an indirect call.
+  //
+  // Specifies the location of the callee address in the calling frame.
+  DWARFExpression call_target;
 };
 
 /// \class Function Function.h "lldb/Symbol/Function.h"
@@ -396,11 +450,16 @@
 
   /// Get the outgoing call edges from this function, sorted by their return
   /// PC addresses (in increasing order).
-  llvm::MutableArrayRef<CallEdge> GetCallEdges();
+  llvm::ArrayRef<std::unique_ptr<CallEdge>> GetCallEdges();
 
   /// Get the outgoing tail-calling edges from this function. If none exist,
   /// return None.
-  llvm::MutableArrayRef<CallEdge> GetTailCallingEdges();
+  llvm::ArrayRef<std::unique_ptr<CallEdge>> GetTailCallingEdges();
+
+  /// Get the outgoing call edge from this function which has the given return
+  /// address \p return_pc, or return nullptr. Note that this will not return a
+  /// tail-calling edge.
+  CallEdge *GetCallEdgeForReturnAddress(lldb::addr_t return_pc, Target &target);
 
   /// Get accessor for the block list.
   ///
@@ -566,7 +625,7 @@
 
   bool m_call_edges_resolved = false; ///< Whether call site info has been
                                       ///  parsed.
-  std::vector<CallEdge> m_call_edges; ///< Outgoing call edges.
+  std::vector<std::unique_ptr<CallEdge>> m_call_edges; ///< Outgoing call edges.
 private:
   DISALLOW_COPY_AND_ASSIGN(Function);
 };
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/LineEntry.h b/src/llvm-project/lldb/include/lldb/Symbol/LineEntry.h
index fe97a78..32ffef7 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/LineEntry.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/LineEntry.h
@@ -42,11 +42,6 @@
   /// \param[in] s
   ///     The stream to which to dump the object description.
   ///
-  /// \param[in] comp_unit
-  ///     The compile unit object that contains the support file
-  ///     list so the line entry can dump the file name (since this
-  ///     object contains a file index into the support file list).
-  ///
   /// \param[in] show_file
   ///     If \b true, display the filename with the line entry which
   ///     requires that the compile unit object \a comp_unit be a
@@ -75,11 +70,6 @@
   /// \param[in] s
   ///     The stream to which to dump the object description.
   ///
-  /// \param[in] comp_unit
-  ///     The compile unit object that contains the support file
-  ///     list so the line entry can dump the file name (since this
-  ///     object contains a file index into the support file list).
-  ///
   /// \return
   ///     Returns \b true if the file and line were properly dumped,
   ///     \b false otherwise.
@@ -102,9 +92,9 @@
   ///     The Right Hand Side const LineEntry object reference.
   ///
   /// \return
-  ///     \li -1 if lhs < rhs
-  ///     \li 0 if lhs == rhs
-  ///     \li 1 if lhs > rhs
+  ///     -1 if lhs < rhs
+  ///     0 if lhs == rhs
+  ///     1 if lhs > rhs
   static int Compare(const LineEntry &lhs, const LineEntry &rhs);
 
   /// Give the range for this LineEntry + any additional LineEntries for this
@@ -143,7 +133,6 @@
   ///
   /// \param[in] target_sp
   ///     Shared pointer to the target this LineEntry belongs to.
-
   void ApplyFileMappings(lldb::TargetSP target_sp);
 
   // Member variables.
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/LineTable.h b/src/llvm-project/lldb/include/lldb/Symbol/LineTable.h
index d24cc35..043f3eb 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/LineTable.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/LineTable.h
@@ -135,8 +135,8 @@
   ///     If true, match only if you find a line entry exactly matching \a line.
   ///     If false, return the closest line entry greater than \a line.
   ///
-  /// \param[out] line_entry
-  ///     A reference to a line entry object that will get a copy of
+  /// \param[out] line_entry_ptr
+  ///     A pointer to a line entry object that will get a copy of
   ///     the line entry if \b true is returned, otherwise \a
   ///     line_entry is left untouched.
   ///
@@ -194,16 +194,6 @@
   size_t GetContiguousFileAddressRanges(FileAddressRanges &file_ranges,
                                         bool append);
 
-  /// Given a file range link map, relink the current line table and return a
-  /// fixed up line table.
-  ///
-  /// \param[out] file_range_map
-  ///     A collection of file ranges that maps to new file ranges
-  ///     that will be used when linking the line table.
-  ///
-  /// \return
-  ///     A new line table if at least one line table entry was able
-  ///     to be mapped.
   typedef RangeDataVector<lldb::addr_t, lldb::addr_t, lldb::addr_t>
       FileRangeMap;
 
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/ObjectFile.h b/src/llvm-project/lldb/include/lldb/Symbol/ObjectFile.h
index 84683e3..841a38e 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/ObjectFile.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/ObjectFile.h
@@ -63,16 +63,22 @@
 public:
   enum Type {
     eTypeInvalid = 0,
-    eTypeCoreFile,      /// A core file that has a checkpoint of a program's
-                        /// execution state
-    eTypeExecutable,    /// A normal executable
-    eTypeDebugInfo,     /// An object file that contains only debug information
-    eTypeDynamicLinker, /// The platform's dynamic linker executable
-    eTypeObjectFile,    /// An intermediate object file
-    eTypeSharedLibrary, /// A shared library that can be used during execution
-    eTypeStubLibrary, /// A library that can be linked against but not used for
-                      /// execution
-    eTypeJIT, /// JIT code that has symbols, sections and possibly debug info
+    /// A core file that has a checkpoint of a program's execution state.
+    eTypeCoreFile,
+    /// A normal executable.
+    eTypeExecutable,
+    /// An object file that contains only debug information.
+    eTypeDebugInfo,
+    /// The platform's dynamic linker executable.
+    eTypeDynamicLinker,
+    /// An intermediate object file.
+    eTypeObjectFile,
+    /// A shared library that can be used during execution.
+    eTypeSharedLibrary,
+    /// A library that can be linked against but not used for execution.
+    eTypeStubLibrary,
+    /// JIT code that has symbols, sections and possibly debug info.
+    eTypeJIT,
     eTypeUnknown
   };
 
@@ -124,7 +130,7 @@
   /// ObjectFile plug-in interface and returns the first instance that can
   /// parse the file.
   ///
-  /// \param[in] module
+  /// \param[in] module_sp
   ///     The parent module that owns this object file.
   ///
   /// \param[in] file_spec
@@ -152,7 +158,7 @@
   /// ObjectFile plug-in interface and returns the first instance that can
   /// parse the file.
   ///
-  /// \param[in] module
+  /// \param[in] module_sp
   ///     The parent module that owns this object file.
   ///
   /// \param[in] process_sp
@@ -201,9 +207,13 @@
   ///     \b false otherwise and \a archive_file and \a archive_object
   ///     are guaranteed to be remain unchanged.
   static bool SplitArchivePathWithObject(
-      const char *path_with_object, lldb_private::FileSpec &archive_file,
+      llvm::StringRef path_with_object, lldb_private::FileSpec &archive_file,
       lldb_private::ConstString &archive_object, bool must_exist);
 
+  // LLVM RTTI support
+  static char ID;
+  virtual bool isA(const void *ClassID) const { return ClassID == &ID; }
+
   /// Gets the address size in bytes for the current object file.
   ///
   /// \return
@@ -346,13 +356,6 @@
   /// Frees the symbol table.
   ///
   /// This function should only be used when an object file is
-  ///
-  /// \param[in] flags
-  ///     eSymtabFromUnifiedSectionList: Whether to clear symbol table
-  ///     for unified module section list, or object file.
-  ///
-  /// \return
-  ///     The symbol table for this object file.
   virtual void ClearSymtab();
 
   /// Gets the UUID for this object file.
@@ -366,17 +369,6 @@
   ///     returned.
   virtual UUID GetUUID() = 0;
 
-  /// Gets the symbol file spec list for this object file.
-  ///
-  /// If the object file format contains a debug symbol file link, the values
-  /// will be returned in the FileSpecList.
-  ///
-  /// \return
-  ///     Returns filespeclist.
-  virtual lldb_private::FileSpecList GetDebugSymbolFilePaths() {
-    return FileSpecList();
-  }
-
   /// Gets the file spec list of libraries re-exported by this object file.
   ///
   /// If the object file format has the notion of one library re-exporting the
@@ -488,8 +480,8 @@
   /// \return
   ///     Returns the identifier string if one exists, else an empty
   ///     string.
-  virtual std::string GetIdentifierString () { 
-      return std::string(); 
+  virtual std::string GetIdentifierString () {
+      return std::string();
   }
 
   /// When the ObjectFile is a core file, lldb needs to locate the "binary" in
@@ -653,10 +645,11 @@
   ///
   /// \param[in] target
   ///     Target where to load.
-  ///
-  /// \return
   virtual std::vector<LoadableData> GetLoadableData(Target &target);
 
+  /// Creates a plugin-specific call frame info
+  virtual std::unique_ptr<CallFrameInfo> CreateCallFrameInfo();
+
 protected:
   // Member variables.
   FileSpec m_file;
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/PostfixExpression.h b/src/llvm-project/lldb/include/lldb/Symbol/PostfixExpression.h
index e3a8587..fa77933 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/PostfixExpression.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/PostfixExpression.h
@@ -17,6 +17,7 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Casting.h"
+#include <vector>
 
 namespace lldb_private {
 
@@ -211,7 +212,10 @@
 
 /// Parse the given postfix expression. The parsed nodes are placed into the
 /// provided allocator.
-Node *Parse(llvm::StringRef expr, llvm::BumpPtrAllocator &alloc);
+Node *ParseOneExpression(llvm::StringRef expr, llvm::BumpPtrAllocator &alloc);
+
+std::vector<std::pair<llvm::StringRef, Node *>>
+ParseFPOProgram(llvm::StringRef prog, llvm::BumpPtrAllocator &alloc);
 
 /// Serialize the given expression tree as DWARF. The result is written into the
 /// given stream. The AST should not contain any SymbolNodes. If the expression
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/Symbol.h b/src/llvm-project/lldb/include/lldb/Symbol/Symbol.h
index 1cbc2f5..36f89c0 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/Symbol.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/Symbol.h
@@ -24,9 +24,8 @@
   // drastically different meanings and sorting requirements.
   Symbol();
 
-  Symbol(uint32_t symID, const char *name, bool name_is_mangled,
-         lldb::SymbolType type, bool external, bool is_debug,
-         bool is_trampoline, bool is_artificial,
+  Symbol(uint32_t symID, llvm::StringRef name, lldb::SymbolType type,
+         bool external, bool is_debug, bool is_trampoline, bool is_artificial,
          const lldb::SectionSP &section_sp, lldb::addr_t value,
          lldb::addr_t size, bool size_is_valid,
          bool contains_linker_annotations, uint32_t flags);
@@ -44,7 +43,9 @@
 
   bool Compare(ConstString name, lldb::SymbolType type) const;
 
-  void Dump(Stream *s, Target *target, uint32_t index) const;
+  void Dump(Stream *s, Target *target, uint32_t index,
+            Mangled::NamePreference name_preference =
+                Mangled::ePreferDemangled) const;
 
   bool ValueIsAddress() const;
 
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/SymbolContext.h b/src/llvm-project/lldb/include/lldb/Symbol/SymbolContext.h
index 55a3454..4c7b727 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/SymbolContext.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/SymbolContext.h
@@ -51,7 +51,7 @@
   ///
   /// Initialize all pointer to the specified values.
   ///
-  /// \param[in] module
+  /// \param[in] module_sp
   ///     A Module pointer to the module for this context.
   ///
   /// \param[in] comp_unit
@@ -84,18 +84,6 @@
 
   ~SymbolContext();
 
-  /// Assignment operator.
-  ///
-  /// Copies the address value from another SymbolContext object \a rhs into
-  /// \a this object.
-  ///
-  /// \param[in] rhs
-  ///     A const SymbolContext object reference to copy.
-  ///
-  /// \return
-  ///     A const SymbolContext object reference to \a this.
-  const SymbolContext &operator=(const SymbolContext &rhs);
-
   /// Clear the object's state.
   ///
   /// Resets all pointer members to nullptr, and clears any class objects to
@@ -279,11 +267,6 @@
   /// For instance, if the symbol context contains an inlined block, it will
   /// return the inlined function name.
   ///
-  /// \param[in] prefer_mangled
-  ///    if \btrue, then the mangled name will be returned if there
-  ///    is one.  Otherwise the unmangled name will be returned if it
-  ///    is available.
-  ///
   /// \return
   ///     The name of the function represented by this symbol context.
   ConstString GetFunctionName(
@@ -298,14 +281,6 @@
   /// ModuleList::FindFunctions(...) call in order to get the correct line
   /// table information for the symbol context. it will return the inlined
   /// function name.
-  ///
-  /// \param[in] prefer_mangled
-  ///    if \btrue, then the mangled name will be returned if there
-  ///    is one.  Otherwise the unmangled name will be returned if it
-  ///    is available.
-  ///
-  /// \return
-  ///     The name of the function represented by this symbol context.
   LineEntry GetFunctionStartLineEntry() const;
 
   /// Find the block containing the inlined block that contains this block.
@@ -319,13 +294,13 @@
   /// \param[out] next_frame_sc
   ///     A new symbol context that does what the title says it does.
   ///
-  /// \param[out] next_frame_addr
+  /// \param[out] inlined_frame_addr
   ///     This is what you should report as the PC in \a next_frame_sc.
   ///
   /// \return
   ///     \b true if this SymbolContext specifies a block contained in an
   ///     inlined block.  If this returns \b true, \a next_frame_sc and
-  ///     \a next_frame_addr will be filled in correctly.
+  ///     \a inlined_frame_addr will be filled in correctly.
   bool GetParentOfInlinedScope(const Address &curr_frame_pc,
                                SymbolContext &next_frame_sc,
                                Address &inlined_frame_addr) const;
@@ -470,6 +445,8 @@
   ///     Returns the number of symbol context objects in the list.
   uint32_t GetSize() const;
 
+  bool IsEmpty() const;
+
   uint32_t NumLineEntriesWithLine(uint32_t line) const;
 
   void GetDescription(Stream *s, lldb::DescriptionLevel level,
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/SymbolFile.h b/src/llvm-project/lldb/include/lldb/Symbol/SymbolFile.h
index dbb723e..fdd812e 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/SymbolFile.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/SymbolFile.h
@@ -16,9 +16,11 @@
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/SourceModule.h"
 #include "lldb/Symbol/Type.h"
+#include "lldb/Symbol/TypeList.h"
+#include "lldb/Symbol/TypeSystem.h"
 #include "lldb/lldb-private.h"
-
 #include "llvm/ADT/DenseSet.h"
+#include "llvm/Support/Errc.h"
 
 #include <mutex>
 
@@ -31,7 +33,16 @@
 namespace lldb_private {
 
 class SymbolFile : public PluginInterface {
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
+  /// LLVM RTTI support.
+  /// \{
+  virtual bool isA(const void *ClassID) const { return ClassID == &ID; }
+  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
+  /// \}
+
   // Symbol file ability bits.
   //
   // Each symbol file can claim to support one or more symbol file abilities.
@@ -49,11 +60,12 @@
     kAllAbilities = ((1u << 7) - 1u)
   };
 
-  static SymbolFile *FindPlugin(ObjectFile *obj_file);
+  static SymbolFile *FindPlugin(lldb::ObjectFileSP objfile_sp);
 
   // Constructors and Destructors
-  SymbolFile(ObjectFile *obj_file)
-      : m_obj_file(obj_file), m_abilities(0), m_calculated_abilities(false) {}
+  SymbolFile(lldb::ObjectFileSP objfile_sp)
+      : m_objfile_sp(std::move(objfile_sp)), m_abilities(0),
+        m_calculated_abilities(false) {}
 
   ~SymbolFile() override {}
 
@@ -110,13 +122,44 @@
 
   // Compile Unit function calls
   // Approach 1 - iterator
-  virtual uint32_t GetNumCompileUnits() = 0;
-  virtual lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) = 0;
+  uint32_t GetNumCompileUnits();
+  lldb::CompUnitSP GetCompileUnitAtIndex(uint32_t idx);
+
+  Symtab *GetSymtab();
 
   virtual lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) = 0;
   virtual size_t ParseFunctions(CompileUnit &comp_unit) = 0;
   virtual bool ParseLineTable(CompileUnit &comp_unit) = 0;
   virtual bool ParseDebugMacros(CompileUnit &comp_unit) = 0;
+
+  /// Apply a lambda to each external lldb::Module referenced by this
+  /// \p comp_unit. Recursively also descends into the referenced external
+  /// modules of any encountered compilation unit.
+  ///
+  /// \param comp_unit
+  ///     When this SymbolFile consists of multiple auxilliary
+  ///     SymbolFiles, for example, a Darwin debug map that references
+  ///     multiple .o files, comp_unit helps choose the auxilliary
+  ///     file. In most other cases comp_unit's symbol file is
+  ///     identiacal with *this.
+  ///
+  /// \param[in] lambda
+  ///     The lambda that should be applied to every function. The lambda can
+  ///     return true if the iteration should be aborted earlier.
+  ///
+  /// \param visited_symbol_files
+  ///     A set of SymbolFiles that were already visited to avoid
+  ///     visiting one file more than once.
+  ///
+  /// \return
+  ///     If the lambda early-exited, this function returns true to
+  ///     propagate the early exit.
+  virtual bool ForEachExternalModule(
+      lldb_private::CompileUnit &comp_unit,
+      llvm::DenseSet<lldb_private::SymbolFile *> &visited_symbol_files,
+      llvm::function_ref<bool(Module &)> lambda) {
+    return false;
+  }
   virtual bool ParseSupportFiles(CompileUnit &comp_unit,
                                  FileSpecList &support_files) = 0;
   virtual size_t ParseTypes(CompileUnit &comp_unit) = 0;
@@ -165,43 +208,46 @@
                                         SymbolContextList &sc_list);
 
   virtual void DumpClangAST(Stream &s) {}
-  virtual uint32_t
+  virtual void
   FindGlobalVariables(ConstString name,
                       const CompilerDeclContext *parent_decl_ctx,
                       uint32_t max_matches, VariableList &variables);
-  virtual uint32_t FindGlobalVariables(const RegularExpression &regex,
-                                       uint32_t max_matches,
-                                       VariableList &variables);
-  virtual uint32_t FindFunctions(ConstString name,
-                                 const CompilerDeclContext *parent_decl_ctx,
-                                 lldb::FunctionNameType name_type_mask,
-                                 bool include_inlines, bool append,
-                                 SymbolContextList &sc_list);
-  virtual uint32_t FindFunctions(const RegularExpression &regex,
-                                 bool include_inlines, bool append,
-                                 SymbolContextList &sc_list);
-  virtual uint32_t
+  virtual void FindGlobalVariables(const RegularExpression &regex,
+                                   uint32_t max_matches,
+                                   VariableList &variables);
+  virtual void FindFunctions(ConstString name,
+                             const CompilerDeclContext *parent_decl_ctx,
+                             lldb::FunctionNameType name_type_mask,
+                             bool include_inlines, SymbolContextList &sc_list);
+  virtual void FindFunctions(const RegularExpression &regex,
+                             bool include_inlines, SymbolContextList &sc_list);
+  virtual void
   FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx,
-            bool append, uint32_t max_matches,
+            uint32_t max_matches,
             llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
             TypeMap &types);
-  virtual size_t FindTypes(const std::vector<CompilerContext> &context,
-                           bool append, TypeMap &types);
+
+  /// Find types specified by a CompilerContextPattern.
+  /// \param languages
+  ///     Only return results in these languages.
+  /// \param searched_symbol_files
+  ///     Prevents one file from being visited multiple times.
+  virtual void
+  FindTypes(llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+            llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
+            TypeMap &types);
 
   virtual void
   GetMangledNamesForFunction(const std::string &scope_qualified_name,
                              std::vector<ConstString> &mangled_names);
-  //  virtual uint32_t        FindTypes (const SymbolContext& sc, const
-  //  RegularExpression& regex, bool append, uint32_t max_matches, TypeList&
-  //  types) = 0;
-  virtual TypeList *GetTypeList();
-  virtual size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
-                          lldb::TypeClass type_mask,
-                          lldb_private::TypeList &type_list) = 0;
+
+  virtual void GetTypes(lldb_private::SymbolContextScope *sc_scope,
+                        lldb::TypeClass type_mask,
+                        lldb_private::TypeList &type_list) = 0;
 
   virtual void PreloadSymbols();
 
-  virtual lldb_private::TypeSystem *
+  virtual llvm::Expected<lldb_private::TypeSystem &>
   GetTypeSystemForLanguage(lldb::LanguageType language);
 
   virtual CompilerDeclContext
@@ -210,10 +256,12 @@
     return CompilerDeclContext();
   }
 
-  ObjectFile *GetObjectFile() { return m_obj_file; }
-  const ObjectFile *GetObjectFile() const { return m_obj_file; }
+  ObjectFile *GetObjectFile() { return m_objfile_sp.get(); }
+  const ObjectFile *GetObjectFile() const { return m_objfile_sp.get(); }
+  ObjectFile *GetMainObjectFile();
 
-  virtual std::vector<CallEdge> ParseCallEdgesInFunction(UserID func_id) {
+  virtual std::vector<std::unique_ptr<CallEdge>>
+  ParseCallEdgesInFunction(UserID func_id) {
     return {};
   }
 
@@ -221,7 +269,7 @@
 
   /// Notify the SymbolFile that the file addresses in the Sections
   /// for this module have been changed.
-  virtual void SectionFileAddressesChanged() {}
+  virtual void SectionFileAddressesChanged();
 
   struct RegisterInfoResolver {
     virtual ~RegisterInfoResolver(); // anchor
@@ -235,12 +283,30 @@
     return nullptr;
   }
 
-  virtual void Dump(Stream &s) {}
+  /// Return the number of stack bytes taken up by the parameters to this
+  /// function.
+  virtual llvm::Expected<lldb::addr_t> GetParameterStackSize(Symbol &symbol) {
+    return llvm::createStringError(make_error_code(llvm::errc::not_supported),
+                                   "Operation not supported.");
+  }
+
+  virtual void Dump(Stream &s);
 
 protected:
   void AssertModuleLock();
+  virtual uint32_t CalculateNumCompileUnits() = 0;
+  virtual lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t idx) = 0;
+  virtual TypeList &GetTypeList() { return m_type_list; }
 
-  ObjectFile *m_obj_file; // The object file that symbols can be extracted from.
+  void SetCompileUnitAtIndex(uint32_t idx, const lldb::CompUnitSP &cu_sp);
+
+  lldb::ObjectFileSP m_objfile_sp; // Keep a reference to the object file in
+                                   // case it isn't the same as the module
+                                   // object file (debug symbols in a separate
+                                   // file)
+  llvm::Optional<std::vector<lldb::CompUnitSP>> m_compile_units;
+  TypeList m_type_list;
+  Symtab *m_symtab = nullptr;
   uint32_t m_abilities;
   bool m_calculated_abilities;
 
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/SymbolVendor.h b/src/llvm-project/lldb/include/lldb/Symbol/SymbolVendor.h
index c4015ff..96c6ea5 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/SymbolVendor.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/SymbolVendor.h
@@ -14,7 +14,6 @@
 #include "lldb/Core/ModuleChild.h"
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Symbol/SourceModule.h"
-#include "lldb/Symbol/TypeList.h"
 #include "lldb/Symbol/TypeMap.h"
 #include "lldb/lldb-private.h"
 #include "llvm/ADT/DenseSet.h"
@@ -40,123 +39,16 @@
 
   void AddSymbolFileRepresentation(const lldb::ObjectFileSP &objfile_sp);
 
-  virtual void Dump(Stream *s);
-
-  virtual lldb::LanguageType ParseLanguage(CompileUnit &comp_unit);
-
-  virtual size_t ParseFunctions(CompileUnit &comp_unit);
-
-  virtual bool ParseLineTable(CompileUnit &comp_unit);
-
-  virtual bool ParseDebugMacros(CompileUnit &comp_unit);
-
-  virtual bool ParseSupportFiles(CompileUnit &comp_unit,
-                                 FileSpecList &support_files);
-
-  virtual bool ParseIsOptimized(CompileUnit &comp_unit);
-
-  virtual size_t ParseTypes(CompileUnit &comp_unit);
-
-  virtual bool
-  ParseImportedModules(const SymbolContext &sc,
-                       std::vector<SourceModule> &imported_modules);
-
-  virtual size_t ParseBlocksRecursive(Function &func);
-
-  virtual size_t ParseVariablesForContext(const SymbolContext &sc);
-
-  virtual Type *ResolveTypeUID(lldb::user_id_t type_uid);
-
-  virtual uint32_t ResolveSymbolContext(const Address &so_addr,
-                                        lldb::SymbolContextItem resolve_scope,
-                                        SymbolContext &sc);
-
-  virtual uint32_t ResolveSymbolContext(const FileSpec &file_spec,
-                                        uint32_t line, bool check_inlines,
-                                        lldb::SymbolContextItem resolve_scope,
-                                        SymbolContextList &sc_list);
-
-  virtual size_t FindGlobalVariables(ConstString name,
-                                     const CompilerDeclContext *parent_decl_ctx,
-                                     size_t max_matches,
-                                     VariableList &variables);
-
-  virtual size_t FindGlobalVariables(const RegularExpression &regex,
-                                     size_t max_matches,
-                                     VariableList &variables);
-
-  virtual size_t FindFunctions(ConstString name,
-                               const CompilerDeclContext *parent_decl_ctx,
-                               lldb::FunctionNameType name_type_mask,
-                               bool include_inlines, bool append,
-                               SymbolContextList &sc_list);
-
-  virtual size_t FindFunctions(const RegularExpression &regex,
-                               bool include_inlines, bool append,
-                               SymbolContextList &sc_list);
-
-  virtual size_t
-  FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx,
-            bool append, size_t max_matches,
-            llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
-            TypeMap &types);
-
-  virtual size_t FindTypes(const std::vector<CompilerContext> &context,
-                           bool append, TypeMap &types);
-
-  virtual CompilerDeclContext
-  FindNamespace(ConstString name,
-                const CompilerDeclContext *parent_decl_ctx);
-
-  virtual size_t GetNumCompileUnits();
-
-  virtual bool SetCompileUnitAtIndex(size_t cu_idx,
-                                     const lldb::CompUnitSP &cu_sp);
-
-  virtual lldb::CompUnitSP GetCompileUnitAtIndex(size_t idx);
-
-  TypeList &GetTypeList() { return m_type_list; }
-
-  const TypeList &GetTypeList() const { return m_type_list; }
-
-  virtual size_t GetTypes(SymbolContextScope *sc_scope,
-                          lldb::TypeClass type_mask, TypeList &type_list);
-
   SymbolFile *GetSymbolFile() { return m_sym_file_up.get(); }
 
-  FileSpec GetMainFileSpec() const;
-
-  // Get module unified section list symbol table.
-  virtual Symtab *GetSymtab();
-
-  // Clear module unified section list symbol table.
-  virtual void ClearSymtab();
-
-  /// Notify the SymbolVendor that the file addresses in the Sections
-  /// for this module have been changed.
-  virtual void SectionFileAddressesChanged();
-
   // PluginInterface protocol
   ConstString GetPluginName() override;
 
   uint32_t GetPluginVersion() override;
 
 protected:
-  // Classes that inherit from SymbolVendor can see and modify these
-  typedef std::vector<lldb::CompUnitSP> CompileUnits;
-  typedef CompileUnits::iterator CompileUnitIter;
-  typedef CompileUnits::const_iterator CompileUnitConstIter;
-
-  TypeList m_type_list; // Uniqued types for all parsers owned by this module
-  CompileUnits m_compile_units;    // The current compile units
-  lldb::ObjectFileSP m_objfile_sp; // Keep a reference to the object file in
-                                   // case it isn't the same as the module
-                                   // object file (debug symbols in a separate
-                                   // file)
   std::unique_ptr<SymbolFile> m_sym_file_up; // A single symbol file. Subclasses
                                              // can add more of these if needed.
-  Symtab *m_symtab; // Save a symtab once to not pass it through `AddSymbols` of
-                    // the symbol file each time when it is needed
 
 private:
   // For SymbolVendor only
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/Symtab.h b/src/llvm-project/lldb/include/lldb/Symbol/Symtab.h
index 868edcd..f121bef 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/Symtab.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/Symtab.h
@@ -40,8 +40,12 @@
   uint32_t AddSymbol(const Symbol &symbol);
   size_t GetNumSymbols() const;
   void SectionFileAddressesChanged();
-  void Dump(Stream *s, Target *target, SortOrder sort_type);
-  void Dump(Stream *s, Target *target, std::vector<uint32_t> &indexes) const;
+  void
+  Dump(Stream *s, Target *target, SortOrder sort_type,
+       Mangled::NamePreference name_preference = Mangled::ePreferDemangled);
+  void Dump(Stream *s, Target *target, std::vector<uint32_t> &indexes,
+            Mangled::NamePreference name_preference =
+                Mangled::ePreferDemangled) const;
   uint32_t GetIndexForSymbol(const Symbol *symbol) const;
   std::recursive_mutex &GetMutex() { return m_mutex; }
   Symbol *FindSymbolByID(lldb::user_id_t uid) const;
@@ -92,15 +96,15 @@
       const RegularExpression &regex, lldb::SymbolType symbol_type,
       Debug symbol_debug_type, Visibility symbol_visibility,
       std::vector<uint32_t> &indexes);
-  size_t FindAllSymbolsWithNameAndType(ConstString name,
-                                       lldb::SymbolType symbol_type,
-                                       std::vector<uint32_t> &symbol_indexes);
-  size_t FindAllSymbolsWithNameAndType(ConstString name,
-                                       lldb::SymbolType symbol_type,
-                                       Debug symbol_debug_type,
-                                       Visibility symbol_visibility,
-                                       std::vector<uint32_t> &symbol_indexes);
-  size_t FindAllSymbolsMatchingRexExAndType(
+  void FindAllSymbolsWithNameAndType(ConstString name,
+                                     lldb::SymbolType symbol_type,
+                                     std::vector<uint32_t> &symbol_indexes);
+  void FindAllSymbolsWithNameAndType(ConstString name,
+                                     lldb::SymbolType symbol_type,
+                                     Debug symbol_debug_type,
+                                     Visibility symbol_visibility,
+                                     std::vector<uint32_t> &symbol_indexes);
+  void FindAllSymbolsMatchingRexExAndType(
       const RegularExpression &regex, lldb::SymbolType symbol_type,
       Debug symbol_debug_type, Visibility symbol_visibility,
       std::vector<uint32_t> &symbol_indexes);
@@ -112,8 +116,8 @@
   Symbol *FindSymbolContainingFileAddress(lldb::addr_t file_addr);
   void ForEachSymbolContainingFileAddress(
       lldb::addr_t file_addr, std::function<bool(Symbol *)> const &callback);
-  size_t FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
-                             SymbolContextList &sc_list);
+  void FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
+                           SymbolContextList &sc_list);
   void CalculateSymbolSizes();
 
   void SortSymbolIndexesByValue(std::vector<uint32_t> &indexes,
@@ -139,7 +143,29 @@
   typedef std::vector<Symbol> collection;
   typedef collection::iterator iterator;
   typedef collection::const_iterator const_iterator;
-  typedef RangeDataVector<lldb::addr_t, lldb::addr_t, uint32_t>
+  class FileRangeToIndexMapCompare {
+  public:
+    FileRangeToIndexMapCompare(const Symtab &symtab) : m_symtab(symtab) {}
+    bool operator()(const uint32_t a_data, const uint32_t b_data) const {
+      return rank(a_data) > rank(b_data);
+    }
+
+  private:
+    // How much preferred is this symbol?
+    int rank(const uint32_t data) const {
+      const Symbol &symbol = *m_symtab.SymbolAtIndex(data);
+      if (symbol.IsExternal())
+        return 3;
+      if (symbol.IsWeak())
+        return 2;
+      if (symbol.IsDebug())
+        return 0;
+      return 1;
+    }
+    const Symtab &m_symtab;
+  };
+  typedef RangeDataVector<lldb::addr_t, lldb::addr_t, uint32_t, 0,
+                          FileRangeToIndexMapCompare>
       FileRangeToIndexMap;
   void InitNameIndexes();
   void InitAddressIndexes();
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/Type.h b/src/llvm-project/lldb/include/lldb/Symbol/Type.h
index efc9bf04..95a3bc4 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/Type.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/Type.h
@@ -9,7 +9,6 @@
 #ifndef liblldb_Type_h_
 #define liblldb_Type_h_
 
-#include "lldb/Core/ClangForward.h"
 #include "lldb/Symbol/CompilerDecl.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Symbol/Declaration.h"
@@ -22,22 +21,28 @@
 #include <set>
 
 namespace lldb_private {
-// CompilerContext allows an array of these items to be passed to perform
-// detailed lookups in SymbolVendor and SymbolFile functions.
+
+/// CompilerContext allows an array of these items to be passed to perform
+/// detailed lookups in SymbolVendor and SymbolFile functions.
 struct CompilerContext {
-  CompilerContext(CompilerContextKind t, ConstString n)
-      : type(t), name(n) {}
+  CompilerContext(CompilerContextKind t, ConstString n) : kind(t), name(n) {}
 
   bool operator==(const CompilerContext &rhs) const {
-    return type == rhs.type && name == rhs.name;
+    return kind == rhs.kind && name == rhs.name;
   }
+  bool operator!=(const CompilerContext &rhs) const { return !(*this == rhs); }
 
   void Dump() const;
 
-  CompilerContextKind type;
+  CompilerContextKind kind;
   ConstString name;
 };
 
+/// Match \p context_chain against \p pattern, which may contain "Any"
+/// kinds. The \p context_chain should *not* contain any "Any" kinds.
+bool contextMatches(llvm::ArrayRef<CompilerContext> context_chain,
+                    llvm::ArrayRef<CompilerContext> pattern);
+
 class SymbolFileType : public std::enable_shared_from_this<SymbolFileType>,
                        public UserID {
 public:
@@ -75,22 +80,18 @@
     eEncodingIsLValueReferenceUID, ///< This type is L value reference to a type
                                    /// whose UID is m_encoding_uid
     eEncodingIsRValueReferenceUID, ///< This type is R value reference to a type
-                                   /// whose UID is m_encoding_uid
+                                   /// whose UID is m_encoding_uid,
+    eEncodingIsAtomicUID,          ///< This type is the type whose UID is
+                                   /// m_encoding_uid as an atomic type.
     eEncodingIsSyntheticUID
   };
 
-  // We must force the underlying type of the enum to be unsigned here.  Not
-  // all compilers behave the same with regards to the default underlying type
-  // of an enum, but because this enum is used in an enum bitfield and integer
-  // comparisons are done with the value we need to guarantee that it's always
-  // unsigned so that, for example, eResolveStateFull doesn't compare less than
-  // eResolveStateUnresolved when used in a 2-bit bitfield.
-  typedef enum ResolveStateTag : unsigned {
-    eResolveStateUnresolved = 0,
-    eResolveStateForward = 1,
-    eResolveStateLayout = 2,
-    eResolveStateFull = 3
-  } ResolveState;
+  enum class ResolveState : unsigned char {
+    Unresolved = 0,
+    Forward = 1,
+    Layout = 2,
+    Full = 3
+  };
 
   Type(lldb::user_id_t uid, SymbolFile *symbol_file, ConstString name,
        llvm::Optional<uint64_t> byte_size, SymbolContextScope *context,
@@ -117,8 +118,6 @@
   SymbolFile *GetSymbolFile() { return m_symbol_file; }
   const SymbolFile *GetSymbolFile() const { return m_symbol_file; }
 
-  TypeList *GetTypeList();
-
   ConstString GetName();
 
   llvm::Optional<uint64_t> GetByteSize();
@@ -197,17 +196,17 @@
 
   uint32_t GetEncodingMask();
 
-  bool IsCompleteObjCClass() { return m_flags.is_complete_objc_class; }
+  bool IsCompleteObjCClass() { return m_is_complete_objc_class; }
 
   void SetIsCompleteObjCClass(bool is_complete_objc_class) {
-    m_flags.is_complete_objc_class = is_complete_objc_class;
+    m_is_complete_objc_class = is_complete_objc_class;
   }
 
 protected:
   ConstString m_name;
   SymbolFile *m_symbol_file;
-  SymbolContextScope
-      *m_context; // The symbol context in which this type is defined
+  /// The symbol context in which this type is defined.
+  SymbolContextScope *m_context;
   Type *m_encoding_type;
   lldb::user_id_t m_encoding_uid;
   EncodingDataType m_encoding_uid_type;
@@ -215,16 +214,8 @@
   uint64_t m_byte_size_has_value : 1;
   Declaration m_decl;
   CompilerType m_compiler_type;
-
-  struct Flags {
-#ifdef __GNUC__
-    // using unsigned type here to work around a very noisy gcc warning
-    unsigned compiler_type_resolve_state : 2;
-#else
-    ResolveState compiler_type_resolve_state : 2;
-#endif
-    bool is_complete_objc_class : 1;
-  } m_flags;
+  ResolveState m_compiler_type_resolve_state;
+  bool m_is_complete_objc_class;
 
   Type *GetEncodingType();
 
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/TypeList.h b/src/llvm-project/lldb/include/lldb/Symbol/TypeList.h
index 982f673..38342b6 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/TypeList.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/TypeList.h
@@ -28,15 +28,14 @@
 
   void Dump(Stream *s, bool show_context);
 
-  //    lldb::TypeSP
-  //    FindType(lldb::user_id_t uid);
-
   TypeList FindTypes(ConstString name);
 
   void Insert(const lldb::TypeSP &type);
 
   uint32_t GetSize() const;
 
+  bool Empty() const { return !GetSize(); }
+
   lldb::TypeSP GetTypeAtIndex(uint32_t idx);
 
   typedef std::vector<lldb::TypeSP> collection;
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h b/src/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h
index 4bef2a4..91f751a 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/TypeSystem.h
@@ -14,8 +14,11 @@
 #include <mutex>
 #include <string>
 
+#include "llvm/ADT/APFloat.h"
 #include "llvm/ADT/APSInt.h"
+#include "llvm/ADT/SmallBitVector.h"
 #include "llvm/Support/Casting.h"
+#include "llvm/Support/Error.h"
 
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Expression/Expression.h"
@@ -29,51 +32,49 @@
 
 namespace lldb_private {
 
-// Interface for representing the Type Systems in different languages.
+/// A SmallBitVector that represents a set of source languages (\p
+/// lldb::LanguageType).  Each lldb::LanguageType is represented by
+/// the bit with the position of its enumerator. The largest
+/// LanguageType is < 64, so this is space-efficient and on 64-bit
+/// architectures a LanguageSet can be completely stack-allocated.
+struct LanguageSet {
+  llvm::SmallBitVector bitvector;
+  LanguageSet();
+
+  /// If the set contains a single language only, return it.
+  llvm::Optional<lldb::LanguageType> GetSingularLanguage();
+  void Insert(lldb::LanguageType language);
+  bool Empty() const;
+  size_t Size() const;
+  bool operator[](unsigned i) const;
+};
+
+/// Interface for representing a type system.
+///
+/// Implemented by language plugins to define the type system for a given
+/// language.
+///
+/// This interface extensively used opaque pointers to prevent that generic
+/// LLDB code has dependencies on language plugins. The type and semantics of
+/// these opaque pointers are defined by the TypeSystem implementation inside
+/// the respective language plugin. Opaque pointers from one TypeSystem
+/// instance should never be passed to a different TypeSystem instance (even
+/// when the language plugin for both TypeSystem instances is the same).
+///
+/// Most of the functions in this class should not be called directly but only
+/// called by their respective counterparts in CompilerType, CompilerDecl and
+/// CompilerDeclContext.
+///
+/// \see lldb_private::CompilerType
+/// \see lldb_private::CompilerDecl
+/// \see lldb_private::CompilerDeclContext
 class TypeSystem : public PluginInterface {
 public:
-  // Intrusive type system that allows us to use llvm casting.
-  //
-  // To add a new type system:
-  //
-  // 1 - Add a new enumeration for llvm casting below for your TypeSystem
-  //     subclass, here we will use eKindFoo
-  //
-  // 2 - Your TypeSystem subclass will inherit from TypeSystem and needs
-  //     to implement a static classof() function that returns your
-  //     enumeration:
-  //
-  //    class Foo : public lldb_private::TypeSystem
-  //    {
-  //        static bool classof(const TypeSystem *ts)
-  //        {
-  //            return ts->getKind() == TypeSystem::eKindFoo;
-  //        }
-  //    };
-  //
-  // 3 - Contruct your TypeSystem subclass with the enumeration from below
-  //
-  //    Foo() :
-  //        TypeSystem(TypeSystem::eKindFoo),
-  //        ...
-  //    {
-  //    }
-  //
-  // Then you can use the llvm casting on any "TypeSystem *" to get an instance
-  // of your subclass.
-  enum LLVMCastKind {
-    eKindClang,
-    eKindSwift,
-    eKindOCaml,
-    kNumKinds
-  };
-
   // Constructors and Destructors
-  TypeSystem(LLVMCastKind kind);
-
   ~TypeSystem() override;
 
-  LLVMCastKind getKind() const { return m_kind; }
+  // LLVM RTTI support
+  virtual bool isA(const void *ClassID) const = 0;
 
   static lldb::TypeSystemSP CreateInstance(lldb::LanguageType language,
                                            Module *module);
@@ -107,14 +108,14 @@
   virtual CompilerType DeclGetFunctionArgumentType(void *opaque_decl,
                                                    size_t arg_idx);
 
+  virtual CompilerType GetTypeForDecl(void *opaque_decl) = 0;
+
   // CompilerDeclContext functions
 
   virtual std::vector<CompilerDecl>
   DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
                             const bool ignore_imported_decls);
 
-  virtual bool DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) = 0;
-
   virtual ConstString DeclContextGetName(void *opaque_decl_ctx) = 0;
 
   virtual ConstString
@@ -243,6 +244,8 @@
   virtual CompilerType
   GetRValueReferenceType(lldb::opaque_compiler_type_t type);
 
+  virtual CompilerType GetAtomicType(lldb::opaque_compiler_type_t type);
+
   virtual CompilerType AddConstModifier(lldb::opaque_compiler_type_t type);
 
   virtual CompilerType AddVolatileModifier(lldb::opaque_compiler_type_t type);
@@ -255,6 +258,8 @@
 
   // Exploring the type
 
+  virtual const llvm::fltSemantics &GetFloatTypeSemantics(size_t byte_size) = 0;
+
   virtual llvm::Optional<uint64_t>
   GetBitSize(lldb::opaque_compiler_type_t type,
              ExecutionContextScope *exe_scope) = 0;
@@ -375,12 +380,6 @@
                            lldb::offset_t data_offset,
                            size_t data_byte_size) = 0;
 
-  // Converts "s" to a floating point value and place resulting floating point
-  // bytes in the "dst" buffer.
-  virtual size_t ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
-                                           const char *s, uint8_t *dst,
-                                           size_t dst_size) = 0;
-
   // TODO: Determine if these methods should move to ClangASTContext.
 
   virtual bool IsPointerOrReferenceType(lldb::opaque_compiler_type_t type,
@@ -391,7 +390,9 @@
   virtual bool IsCStringType(lldb::opaque_compiler_type_t type,
                              uint32_t &length) = 0;
 
-  virtual size_t GetTypeBitAlign(lldb::opaque_compiler_type_t type) = 0;
+  virtual llvm::Optional<size_t>
+  GetTypeBitAlign(lldb::opaque_compiler_type_t type,
+                  ExecutionContextScope *exe_scope) = 0;
 
   virtual CompilerType GetBasicTypeFromAST(lldb::BasicType basic_type) = 0;
 
@@ -474,8 +475,7 @@
   virtual bool IsMeaninglessWithoutDynamicResolution(void *type);
 
 protected:
-  const LLVMCastKind m_kind; // Support for llvm casting
-  SymbolFile *m_sym_file;
+  SymbolFile *m_sym_file = nullptr;
 };
 
 class TypeSystemMap {
@@ -491,18 +491,15 @@
   // callback to keep iterating, false to stop iterating.
   void ForEach(std::function<bool(TypeSystem *)> const &callback);
 
-  TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language,
-                                       Module *module, bool can_create);
+  llvm::Expected<TypeSystem &>
+  GetTypeSystemForLanguage(lldb::LanguageType language, Module *module,
+                           bool can_create);
 
-  TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language,
-                                       Target *target, bool can_create);
+  llvm::Expected<TypeSystem &>
+  GetTypeSystemForLanguage(lldb::LanguageType language, Target *target,
+                           bool can_create);
 
 protected:
-  // This function does not take the map mutex, and should only be called from
-  // functions that do take the mutex.
-  void AddToMap(lldb::LanguageType language,
-                lldb::TypeSystemSP const &type_system_sp);
-
   typedef std::map<lldb::LanguageType, lldb::TypeSystemSP> collection;
   mutable std::mutex m_mutex; ///< A mutex to keep this object happy in
                               ///multi-threaded environments.
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/UnwindPlan.h b/src/llvm-project/lldb/include/lldb/Symbol/UnwindPlan.h
index 2b49aca..fa41ba5 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/UnwindPlan.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/UnwindPlan.h
@@ -201,7 +201,8 @@
         unspecified,            // not specified
         isRegisterPlusOffset,   // FA = register + offset
         isRegisterDereferenced, // FA = [reg]
-        isDWARFExpression       // FA = eval(dwarf_expr)
+        isDWARFExpression,      // FA = eval(dwarf_expr)
+        isRaSearch,             // FA = SP + offset + ???
       };
 
       FAValue() : m_type(unspecified), m_value() {}
@@ -214,6 +215,11 @@
 
       bool IsUnspecified() const { return m_type == unspecified; }
 
+      void SetRaSearch(int32_t offset) {
+        m_type = isRaSearch;
+        m_value.ra_search_offset = offset;
+      }
+
       bool IsRegisterPlusOffset() const {
         return m_type == isRegisterPlusOffset;
       }
@@ -250,9 +256,14 @@
       ValueType GetValueType() const { return m_type; }
 
       int32_t GetOffset() const {
-        if (m_type == isRegisterPlusOffset)
-          return m_value.reg.offset;
-        return 0;
+        switch (m_type) {
+          case isRegisterPlusOffset:
+            return m_value.reg.offset;
+          case isRaSearch:
+            return m_value.ra_search_offset;
+          default:
+            return 0;
+        }
       }
 
       void IncOffset(int32_t delta) {
@@ -304,6 +315,8 @@
           const uint8_t *opcodes;
           uint16_t length;
         } expr;
+        // For m_type == isRaSearch
+        int32_t ra_search_offset;
       } m_value;
     }; // class FAValue
 
@@ -370,6 +383,7 @@
         m_return_addr_register(LLDB_INVALID_REGNUM), m_source_name(),
         m_plan_is_sourced_from_compiler(eLazyBoolCalculate),
         m_plan_is_valid_at_all_instruction_locations(eLazyBoolCalculate),
+        m_plan_is_for_signal_trap(eLazyBoolCalculate),
         m_lsda_address(), m_personality_func_addr() {}
 
   // Performs a deep copy of the plan, including all the rows (expensive).
@@ -463,6 +477,17 @@
     m_plan_is_valid_at_all_instruction_locations = valid_at_all_insn;
   }
 
+  // Is this UnwindPlan for a signal trap frame?  If so, then its saved pc
+  // may have been set manually by the signal dispatch code and therefore
+  // not follow a call to the child frame.
+  lldb_private::LazyBool GetUnwindPlanForSignalTrap() const {
+    return m_plan_is_for_signal_trap;
+  }
+
+  void SetUnwindPlanForSignalTrap(lldb_private::LazyBool is_for_signal_trap) {
+    m_plan_is_for_signal_trap = is_for_signal_trap;
+  }
+
   int GetRowCount() const;
 
   void Clear() {
@@ -472,6 +497,7 @@
     m_source_name.Clear();
     m_plan_is_sourced_from_compiler = eLazyBoolCalculate;
     m_plan_is_valid_at_all_instruction_locations = eLazyBoolCalculate;
+    m_plan_is_for_signal_trap = eLazyBoolCalculate;
     m_lsda_address.Clear();
     m_personality_func_addr.Clear();
   }
@@ -502,6 +528,7 @@
       m_source_name; // for logging, where this UnwindPlan originated from
   lldb_private::LazyBool m_plan_is_sourced_from_compiler;
   lldb_private::LazyBool m_plan_is_valid_at_all_instruction_locations;
+  lldb_private::LazyBool m_plan_is_for_signal_trap;
 
   Address m_lsda_address; // Where the language specific data area exists in the
                           // module - used
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/UnwindTable.h b/src/llvm-project/lldb/include/lldb/Symbol/UnwindTable.h
index b4d7f06..c1dc519 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/UnwindTable.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/UnwindTable.h
@@ -27,6 +27,8 @@
 
   ~UnwindTable();
 
+  lldb_private::CallFrameInfo *GetObjectFileUnwindInfo();
+
   lldb_private::DWARFCallFrameInfo *GetEHFrameInfo();
   lldb_private::DWARFCallFrameInfo *GetDebugFrameInfo();
 
@@ -71,6 +73,7 @@
   bool m_initialized; // delay some initialization until ObjectFile is set up
   std::mutex m_mutex;
 
+  std::unique_ptr<CallFrameInfo> m_object_file_unwind_up;
   std::unique_ptr<DWARFCallFrameInfo> m_eh_frame_up;
   std::unique_ptr<DWARFCallFrameInfo> m_debug_frame_up;
   std::unique_ptr<CompactUnwindInfo> m_compact_unwind_up;
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/Variable.h b/src/llvm-project/lldb/include/lldb/Symbol/Variable.h
index 12daecf..30f57f1 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/Variable.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/Variable.h
@@ -26,15 +26,14 @@
 public:
   typedef RangeVector<lldb::addr_t, lldb::addr_t> RangeList;
 
-  // Constructors and Destructors
-  Variable(lldb::user_id_t uid, const char *name,
-           const char
-               *mangled, // The mangled or fully qualified name of the variable.
-           const lldb::SymbolFileTypeSP &symfile_type_sp,
-           lldb::ValueType scope, SymbolContextScope *owner_scope,
-           const RangeList &scope_range, Declaration *decl,
-           const DWARFExpression &location, bool external, bool artificial,
-           bool static_member = false);
+  /// Constructors and Destructors.
+  ///
+  /// \param mangled The mangled or fully qualified name of the variable.
+  Variable(lldb::user_id_t uid, const char *name, const char *mangled,
+           const lldb::SymbolFileTypeSP &symfile_type_sp, lldb::ValueType scope,
+           SymbolContextScope *owner_scope, const RangeList &scope_range,
+           Declaration *decl, const DWARFExpression &location, bool external,
+           bool artificial, bool static_member = false);
 
   virtual ~Variable();
 
@@ -50,11 +49,11 @@
 
   SymbolContextScope *GetSymbolContextScope() const { return m_owner_scope; }
 
-  // Since a variable can have a basename "i" and also a mangled named
-  // "_ZN12_GLOBAL__N_11iE" and a demangled mangled name "(anonymous
-  // namespace)::i", this function will allow a generic match function that can
-  // be called by commands and expression parsers to make sure we match
-  // anything we come across.
+  /// Since a variable can have a basename "i" and also a mangled named
+  /// "_ZN12_GLOBAL__N_11iE" and a demangled mangled name "(anonymous
+  /// namespace)::i", this function will allow a generic match function that can
+  /// be called by commands and expression parsers to make sure we match
+  /// anything we come across.
   bool NameMatches(ConstString name) const;
 
   bool NameMatches(const RegularExpression &regex) const;
@@ -99,34 +98,42 @@
       GetVariableCallback callback, void *baton, VariableList &variable_list,
       ValueObjectList &valobj_list);
 
-  static size_t AutoComplete(const ExecutionContext &exe_ctx,
-                             CompletionRequest &request);
+  static void AutoComplete(const ExecutionContext &exe_ctx,
+                           CompletionRequest &request);
 
   CompilerDeclContext GetDeclContext();
 
   CompilerDecl GetDecl();
 
 protected:
-  ConstString m_name; // The basename of the variable (no namespaces)
-  Mangled m_mangled;  // The mangled name of the variable
-  lldb::SymbolFileTypeSP m_symfile_type_sp; // The type pointer of the variable
-                                            // (int, struct, class, etc)
-  lldb::ValueType m_scope;                  // global, parameter, local
-  SymbolContextScope
-      *m_owner_scope; // The symbol file scope that this variable was defined in
-  RangeList m_scope_range; // The list of ranges inside the owner's scope where
-                           // this variable is valid
-  Declaration m_declaration;  // Declaration location for this item.
-  DWARFExpression m_location; // The location of this variable that can be fed
-                              // to DWARFExpression::Evaluate()
-  uint8_t m_external : 1,     // Visible outside the containing compile unit?
-      m_artificial : 1, // Non-zero if the variable is not explicitly declared
-                        // in source
-      m_loc_is_const_data : 1, // The m_location expression contains the
-                               // constant variable value data, not a DWARF
-                               // location
-      m_static_member : 1; // Non-zero if variable is static member of a class
-                           // or struct.
+  /// The basename of the variable (no namespaces).
+  ConstString m_name;
+  /// The mangled name of the variable.
+  Mangled m_mangled;
+  /// The type pointer of the variable (int, struct, class, etc)
+  /// global, parameter, local.
+  lldb::SymbolFileTypeSP m_symfile_type_sp;
+  lldb::ValueType m_scope;
+  /// The symbol file scope that this variable was defined in
+  SymbolContextScope *m_owner_scope;
+  /// The list of ranges inside the owner's scope where this variable
+  /// is valid.
+  RangeList m_scope_range;
+  /// Declaration location for this item.
+  Declaration m_declaration;
+  /// The location of this variable that can be fed to
+  /// DWARFExpression::Evaluate().
+  DWARFExpression m_location;
+  /// Visible outside the containing compile unit?
+  unsigned m_external : 1;
+  /// Non-zero if the variable is not explicitly declared in source.
+  unsigned m_artificial : 1;
+  /// The m_location expression contains the constant variable value
+  /// data, not a DWARF location.
+  unsigned m_loc_is_const_data : 1;
+  /// Non-zero if variable is static member of a class or struct.
+  unsigned m_static_member : 1;
+
 private:
   Variable(const Variable &rhs) = delete;
   Variable &operator=(const Variable &rhs) = delete;
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/VariableList.h b/src/llvm-project/lldb/include/lldb/Symbol/VariableList.h
index 54d2758..87f9866 100644
--- a/src/llvm-project/lldb/include/lldb/Symbol/VariableList.h
+++ b/src/llvm-project/lldb/include/lldb/Symbol/VariableList.h
@@ -16,6 +16,8 @@
 namespace lldb_private {
 
 class VariableList {
+  typedef std::vector<lldb::VariableSP> collection;
+
 public:
   // Constructors and Destructors
   //  VariableList(const SymbolContext &symbol_context);
@@ -65,11 +67,15 @@
   size_t GetSize() const;
   bool Empty() const { return m_variables.empty(); }
 
-protected:
-  typedef std::vector<lldb::VariableSP> collection;
   typedef collection::iterator iterator;
   typedef collection::const_iterator const_iterator;
 
+  iterator begin() { return m_variables.begin(); }
+  iterator end() { return m_variables.end(); }
+  const_iterator begin() const { return m_variables.begin(); }
+  const_iterator end() const { return m_variables.end(); }
+
+protected:
   collection m_variables;
 
 private:
diff --git a/src/llvm-project/lldb/include/lldb/Symbol/VerifyDecl.h b/src/llvm-project/lldb/include/lldb/Symbol/VerifyDecl.h
deleted file mode 100644
index f412b94..0000000
--- a/src/llvm-project/lldb/include/lldb/Symbol/VerifyDecl.h
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- VerifyDecl.h --------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef lldb_VariableList_h_
-#define lldb_VariableList_h_
-
-#include "lldb/Core/ClangForward.h"
-
-namespace lldb_private {
-void VerifyDecl(clang::Decl *decl);
-}
-
-#endif
diff --git a/src/llvm-project/lldb/include/lldb/Target/ABI.h b/src/llvm-project/lldb/include/lldb/Target/ABI.h
index f254839..1aff1e2 100644
--- a/src/llvm-project/lldb/include/lldb/Target/ABI.h
+++ b/src/llvm-project/lldb/include/lldb/Target/ABI.h
@@ -15,8 +15,8 @@
 #include "lldb/lldb-private.h"
 
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/MC/MCRegisterInfo.h"
 
-// forward define the llvm::Type class
 namespace llvm {
 class Type;
 }
@@ -124,25 +124,32 @@
     return pc;
   }
 
-  virtual const RegisterInfo *GetRegisterInfoArray(uint32_t &count) = 0;
+  llvm::MCRegisterInfo &GetMCRegisterInfo() { return *m_mc_register_info_up; }
 
-  bool GetRegisterInfoByName(ConstString name, RegisterInfo &info);
-
-  bool GetRegisterInfoByKind(lldb::RegisterKind reg_kind, uint32_t reg_num,
-                             RegisterInfo &info);
+  virtual void AugmentRegisterInfo(RegisterInfo &info);
 
   virtual bool GetPointerReturnRegister(const char *&name) { return false; }
 
   static lldb::ABISP FindPlugin(lldb::ProcessSP process_sp, const ArchSpec &arch);
 
 protected:
-  // Classes that inherit from ABI can see and modify these
-  ABI(lldb::ProcessSP process_sp) {
-    if (process_sp.get())
-        m_process_wp = process_sp;
+  ABI(lldb::ProcessSP process_sp, std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : m_process_wp(process_sp), m_mc_register_info_up(std::move(info_up)) {
+    assert(m_mc_register_info_up && "ABI must have MCRegisterInfo");
   }
 
+  bool GetRegisterInfoByName(ConstString name, RegisterInfo &info);
+
+  virtual const RegisterInfo *GetRegisterInfoArray(uint32_t &count) = 0;
+
+  /// Utility function to construct a MCRegisterInfo using the ArchSpec triple.
+  /// Plugins wishing to customize the construction can construct the
+  /// MCRegisterInfo themselves.
+  static std::unique_ptr<llvm::MCRegisterInfo>
+  MakeMCRegisterInfo(const ArchSpec &arch);
+
   lldb::ProcessWP m_process_wp;
+  std::unique_ptr<llvm::MCRegisterInfo> m_mc_register_info_up;
 
 private:
   DISALLOW_COPY_AND_ASSIGN(ABI);
diff --git a/src/llvm-project/lldb/include/lldb/Target/DynamicLoader.h b/src/llvm-project/lldb/include/lldb/Target/DynamicLoader.h
index 2bf3f32..ac72b98 100644
--- a/src/llvm-project/lldb/include/lldb/Target/DynamicLoader.h
+++ b/src/llvm-project/lldb/include/lldb/Target/DynamicLoader.h
@@ -148,13 +148,9 @@
   ///     The equivalent symbol list - any equivalent symbols found are appended
   ///     to this list.
   ///
-  /// \return
-  ///    Number of equivalent symbols found.
-  virtual size_t FindEquivalentSymbols(Symbol *original_symbol,
-                                       ModuleList &module_list,
-                                       SymbolContextList &equivalent_symbols) {
-    return 0;
-  }
+  virtual void FindEquivalentSymbols(Symbol *original_symbol,
+                                     ModuleList &module_list,
+                                     SymbolContextList &equivalent_symbols) {}
 
   /// Ask if it is ok to try and load or unload an shared library (image).
   ///
diff --git a/src/llvm-project/lldb/include/lldb/Target/Language.h b/src/llvm-project/lldb/include/lldb/Target/Language.h
index 6ea6029..e00b042 100644
--- a/src/llvm-project/lldb/include/lldb/Target/Language.h
+++ b/src/llvm-project/lldb/include/lldb/Target/Language.h
@@ -20,6 +20,7 @@
 #include "lldb/DataFormatters/DumpValueObjectOptions.h"
 #include "lldb/DataFormatters/FormatClasses.h"
 #include "lldb/DataFormatters/StringPrinter.h"
+#include "lldb/Symbol/TypeSystem.h"
 #include "lldb/lldb-private.h"
 #include "lldb/lldb-public.h"
 
@@ -175,9 +176,6 @@
   virtual HardcodedFormatters::HardcodedSyntheticFinder
   GetHardcodedSynthetics();
 
-  virtual HardcodedFormatters::HardcodedValidatorFinder
-  GetHardcodedValidators();
-
   virtual std::vector<ConstString>
   GetPossibleFormattersMatches(ValueObject &valobj,
                                lldb::DynamicValueType use_dynamic);
@@ -266,12 +264,9 @@
 
   static std::set<lldb::LanguageType> GetSupportedLanguages();
 
-  static void GetLanguagesSupportingTypeSystems(
-      std::set<lldb::LanguageType> &languages,
-      std::set<lldb::LanguageType> &languages_for_expressions);
-
-  static void
-  GetLanguagesSupportingREPLs(std::set<lldb::LanguageType> &languages);
+  static LanguageSet GetLanguagesSupportingTypeSystems();
+  static LanguageSet GetLanguagesSupportingTypeSystemsForExpressions();
+  static LanguageSet GetLanguagesSupportingREPLs();
 
 protected:
   // Classes that inherit from Language can see and modify these
diff --git a/src/llvm-project/lldb/include/lldb/Target/MemoryRegionInfo.h b/src/llvm-project/lldb/include/lldb/Target/MemoryRegionInfo.h
index 5cab2ef..07e5018 100644
--- a/src/llvm-project/lldb/include/lldb/Target/MemoryRegionInfo.h
+++ b/src/llvm-project/lldb/include/lldb/Target/MemoryRegionInfo.h
@@ -21,11 +21,13 @@
 
   enum OptionalBool { eDontKnow = -1, eNo = 0, eYes = 1 };
 
-  MemoryRegionInfo()
-      : m_range(), m_read(eDontKnow), m_write(eDontKnow), m_execute(eDontKnow),
-        m_mapped(eDontKnow), m_flash(eDontKnow), m_blocksize(0) {}
-
-  ~MemoryRegionInfo() {}
+  MemoryRegionInfo() = default;
+  MemoryRegionInfo(RangeType range, OptionalBool read, OptionalBool write,
+                   OptionalBool execute, OptionalBool mapped, ConstString name,
+                   OptionalBool flash, lldb::offset_t blocksize)
+      : m_range(range), m_read(read), m_write(write), m_execute(execute),
+        m_mapped(mapped), m_name(name), m_flash(flash), m_blocksize(blocksize) {
+  }
 
   RangeType &GetRange() { return m_range; }
 
@@ -88,20 +90,21 @@
   bool operator==(const MemoryRegionInfo &rhs) const {
     return m_range == rhs.m_range && m_read == rhs.m_read &&
            m_write == rhs.m_write && m_execute == rhs.m_execute &&
-           m_mapped == rhs.m_mapped;
+           m_mapped == rhs.m_mapped && m_name == rhs.m_name &&
+           m_flash == rhs.m_flash && m_blocksize == rhs.m_blocksize;
   }
 
   bool operator!=(const MemoryRegionInfo &rhs) const { return !(*this == rhs); }
 
 protected:
   RangeType m_range;
-  OptionalBool m_read;
-  OptionalBool m_write;
-  OptionalBool m_execute;
-  OptionalBool m_mapped;
+  OptionalBool m_read = eDontKnow;
+  OptionalBool m_write = eDontKnow;
+  OptionalBool m_execute = eDontKnow;
+  OptionalBool m_mapped = eDontKnow;
   ConstString m_name;
-  OptionalBool m_flash;
-  lldb::offset_t m_blocksize;
+  OptionalBool m_flash = eDontKnow;
+  lldb::offset_t m_blocksize = 0;
 };
   
 inline bool operator<(const MemoryRegionInfo &lhs,
@@ -117,6 +120,9 @@
   return lhs < rhs.GetRange().GetRangeBase();
 }
 
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+                              const MemoryRegionInfo &Info);
+
 // Forward-declarable wrapper.
 class MemoryRegionInfos : public std::vector<lldb_private::MemoryRegionInfo> {
 public:
@@ -127,21 +133,13 @@
 
 namespace llvm {
 template <>
+/// If Options is empty, prints a textual representation of the value. If
+/// Options is a single character, it uses that character for the "yes" value,
+/// while "no" is printed as "-", and "don't know" as "?". This can be used to
+/// print the permissions in the traditional "rwx" form.
 struct format_provider<lldb_private::MemoryRegionInfo::OptionalBool> {
   static void format(const lldb_private::MemoryRegionInfo::OptionalBool &B,
-                     raw_ostream &OS, StringRef Options) {
-    switch(B) {
-    case lldb_private::MemoryRegionInfo::eNo:
-      OS << "no";
-      return;
-    case lldb_private::MemoryRegionInfo::eYes:
-      OS << "yes";
-      return;
-    case lldb_private::MemoryRegionInfo::eDontKnow:
-      OS << "don't know";
-      return;
-    }
-  }
+                     raw_ostream &OS, StringRef Options);
 };
 }
 
diff --git a/src/llvm-project/lldb/include/lldb/Target/Platform.h b/src/llvm-project/lldb/include/lldb/Target/Platform.h
index 3ba58c0..72b6be2 100644
--- a/src/llvm-project/lldb/include/lldb/Target/Platform.h
+++ b/src/llvm-project/lldb/include/lldb/Target/Platform.h
@@ -18,6 +18,7 @@
 
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Core/UserSettingsController.h"
+#include "lldb/Host/File.h"
 #include "lldb/Interpreter/Options.h"
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
@@ -257,19 +258,6 @@
 
   virtual bool SetRemoteWorkingDirectory(const FileSpec &working_dir);
 
-  /// Retrieve the system include directories on this platform for the
-  /// given language.
-  ///
-  /// \param[in] lang
-  ///     The language for which the include directories should be queried.
-  ///
-  /// \param[out] directories
-  ///     The include directories for this system.
-  virtual std::vector<std::string>
-  GetSystemIncludeDirectories(lldb::LanguageType lang) {
-    return {};
-  }
-
   virtual UserIDResolver &GetUserIDResolver() = 0;
 
   /// Locate a file for a platform.
@@ -392,9 +380,6 @@
   /// attached to the process, or an empty shared pointer with an appropriate
   /// error.
   ///
-  /// \param[in] pid
-  ///     The process ID that we should attempt to attach to.
-  ///
   /// \return
   ///     An appropriate ProcessSP containing a valid shared pointer
   ///     to the default Process subclass for the platform that is
@@ -518,8 +503,9 @@
   virtual Status SetFilePermissions(const FileSpec &file_spec,
                                     uint32_t file_permissions);
 
-  virtual lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags,
-                                   uint32_t mode, Status &error) {
+  virtual lldb::user_id_t OpenFile(const FileSpec &file_spec,
+                                   File::OpenOptions flags, uint32_t mode,
+                                   Status &error) {
     return UINT64_MAX;
   }
 
@@ -788,7 +774,7 @@
   ///     given an install name and a set (e.g. DYLD_LIBRARY_PATH provided) of
   ///     alternate paths.
   ///
-  /// \param[in] path_list
+  /// \param[in] paths
   ///     The list of paths to use to search for the library.  First
   ///     match wins.
   ///
@@ -799,7 +785,7 @@
   /// \param[out] loaded_path
   ///      If non-null, the path to the dylib that was successfully loaded
   ///      is stored in this path.
-  /// 
+  ///
   /// \return
   ///     A token that represents the shared library which can be
   ///     passed to UnloadImage. A value of
diff --git a/src/llvm-project/lldb/include/lldb/Target/Process.h b/src/llvm-project/lldb/include/lldb/Target/Process.h
index f85069e..2ba996d 100644
--- a/src/llvm-project/lldb/include/lldb/Target/Process.h
+++ b/src/llvm-project/lldb/include/lldb/Target/Process.h
@@ -50,6 +50,7 @@
 #include "lldb/lldb-private.h"
 
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/Support/Threading.h"
 #include "llvm/Support/VersionTuple.h"
 
 namespace lldb_private {
@@ -84,9 +85,6 @@
   std::chrono::seconds GetUtilityExpressionTimeout() const;
 
 protected:
-  static void OptionValueChangedCallback(void *baton,
-                                         OptionValue *option_value);
-
   Process *m_process; // Can be nullptr for global ProcessProperties
 };
 
@@ -519,14 +517,6 @@
   /// Process plug-in interface and returns the first instance that can debug
   /// the file.
   ///
-  /// \param[in] module_sp
-  ///     The module shared pointer that this process will debug.
-  ///
-  /// \param[in] plugin_name
-  ///     If nullptr, select the best plug-in for the binary. If non-nullptr
-  ///     then look for a plugin whose PluginInfo's name matches
-  ///     this string.
-  ///
   /// \see Process::CanDebug ()
   static lldb::ProcessSP FindPlugin(lldb::TargetSP target_sp,
                                     llvm::StringRef plugin_name,
@@ -680,10 +670,19 @@
   /// shared library load state.
   ///
   /// \return
-  ///    The number of shared libraries that were loaded
-  virtual size_t LoadModules() { return 0; }
+  ///    A status object indicating if the operation was sucessful or not.
+  virtual llvm::Error LoadModules() {
+    return llvm::make_error<llvm::StringError>("Not implemented.",
+                                               llvm::inconvertibleErrorCode());
+  }
 
-  virtual size_t LoadModules(LoadedModuleInfoList &) { return 0; }
+  /// Query remote GDBServer for a detailed loaded library list
+  /// \return
+  ///    The list of modules currently loaded by the process, or an error.
+  virtual llvm::Expected<LoadedModuleInfoList> GetLoadedModuleList() {
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "Not implemented");
+  }
 
 protected:
   virtual JITLoaderList &GetJITLoaders();
@@ -704,8 +703,8 @@
   /// char *) will be called to actually do the attach. If DoAttach returns \b
   /// true, then Process::DidAttach() will be called.
   ///
-  /// \param[in] pid
-  ///     The process ID that we should attempt to attach to.
+  /// \param[in] attach_info
+  ///     The process attach info.
   ///
   /// \return
   ///     Returns \a pid if attaching was successful, or
@@ -1186,6 +1185,9 @@
   ///     VersionTuple is returner.
   virtual llvm::VersionTuple GetHostOSVersion() { return llvm::VersionTuple(); }
 
+  /// \return the macCatalyst version of the host OS.
+  virtual llvm::VersionTuple GetHostMacCatalystVersion() { return {}; }
+
   /// Get the target object pointer for this module.
   ///
   /// \return
@@ -1379,7 +1381,8 @@
   /// the core file.
   ///
   /// \return
-  //      true if the user should be warned about detaching from this process.
+  ///     Returns \b true if the user should be warned about detaching from
+  ///     this process.
   virtual bool WarnBeforeDetach() const { return true; }
 
   /// Actually do the reading of memory from a process.
@@ -1709,8 +1712,9 @@
   ///     lldb,
   ///     just not by the process itself.
   ///
-  /// \param[in/out] error
+  /// \param[in,out] error
   ///     An error object to fill in if things go wrong.
+  ///
   /// \return
   ///     The address of the allocated buffer in the process, or
   ///     LLDB_INVALID_ADDRESS if the allocation failed.
@@ -2158,7 +2162,7 @@
   /// WaitFor* calls above.  Be sure to call RestoreProcessEvents when you are
   /// done.
   ///
-  /// \param[in] listener
+  /// \param[in] listener_sp
   ///     This is the new listener to whom all process events will be delivered.
   ///
   /// \return
@@ -2178,11 +2182,9 @@
 
   OperatingSystem *GetOperatingSystem() { return m_os_up.get(); }
 
-  std::vector<LanguageRuntime *>
-  GetLanguageRuntimes(bool retry_if_null = true);
+  std::vector<LanguageRuntime *> GetLanguageRuntimes();
 
-  LanguageRuntime *GetLanguageRuntime(lldb::LanguageType language,
-                                      bool retry_if_null = true);
+  LanguageRuntime *GetLanguageRuntime(lldb::LanguageType language);
 
   bool IsPossibleDynamicValue(ValueObject &in_value);
 
@@ -2260,6 +2262,8 @@
 
   ProcessRunLock &GetRunLock();
 
+  bool CurrentThreadIsPrivateStateThread();
+
   virtual Status SendEventData(const char *data) {
     Status return_error("Sending an event is not supported for this process.");
     return return_error;
@@ -2357,7 +2361,7 @@
   ///     The StructuredData type name as previously discovered by
   ///     the Process-derived instance.
   ///
-  /// \param[in] config
+  /// \param[in] config_sp
   ///     Configuration data for the feature being enabled.  This config
   ///     data, which may be null, will be passed along to the feature
   ///     to process.  The feature will dictate whether this is a dictionary,
@@ -2453,6 +2457,11 @@
     return Status("Not implemented");
   }
 
+  // This calls a function of the form "void * (*)(void)".
+  bool CallVoidArgVoidPtrReturn(const Address *address,
+                                lldb::addr_t &returned_func,
+                                bool trap_exceptions = false);
+
 protected:
   void SetState(lldb::EventSP &event_sp);
 
@@ -2730,9 +2739,9 @@
   StructuredDataPluginMap m_structured_data_plugin_map;
 
   enum { eCanJITDontKnow = 0, eCanJITYes, eCanJITNo } m_can_jit;
-  
+
   std::unique_ptr<UtilityFunction> m_dlopen_utility_func_up;
-  std::once_flag m_dlopen_utility_func_flag_once;
+  llvm::once_flag m_dlopen_utility_func_flag_once;
 
   size_t RemoveBreakpointOpcodesFromBuffer(lldb::addr_t addr, size_t size,
                                            uint8_t *buf) const;
diff --git a/src/llvm-project/lldb/include/lldb/Target/Queue.h b/src/llvm-project/lldb/include/lldb/Target/Queue.h
index 01e8994..10b9e02 100644
--- a/src/llvm-project/lldb/include/lldb/Target/Queue.h
+++ b/src/llvm-project/lldb/include/lldb/Target/Queue.h
@@ -126,10 +126,7 @@
     m_pending_items.push_back(item);
   }
 
-  /// Return the kind (serial, concurrent) of this queue
-  ///
-  /// \return
-  //      Whether this is a serial or a concurrent queue
+  /// Return the kind (serial, concurrent) of this queue.
   lldb::QueueKind GetKind();
 
   void SetKind(lldb::QueueKind kind);
diff --git a/src/llvm-project/lldb/include/lldb/Target/RemoteAwarePlatform.h b/src/llvm-project/lldb/include/lldb/Target/RemoteAwarePlatform.h
index 524332f..55d5ff6 100644
--- a/src/llvm-project/lldb/include/lldb/Target/RemoteAwarePlatform.h
+++ b/src/llvm-project/lldb/include/lldb/Target/RemoteAwarePlatform.h
@@ -22,7 +22,7 @@
   bool GetModuleSpec(const FileSpec &module_file_spec, const ArchSpec &arch,
                      ModuleSpec &module_spec) override;
 
-  lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags,
+  lldb::user_id_t OpenFile(const FileSpec &file_spec, File::OpenOptions flags,
                            uint32_t mode, Status &error) override;
 
   bool CloseFile(lldb::user_id_t fd, Status &error) override;
diff --git a/src/llvm-project/lldb/include/lldb/Target/StackFrame.h b/src/llvm-project/lldb/include/lldb/Target/StackFrame.h
index 4e6e79b..1c6a2b4 100644
--- a/src/llvm-project/lldb/include/lldb/Target/StackFrame.h
+++ b/src/llvm-project/lldb/include/lldb/Target/StackFrame.h
@@ -99,8 +99,6 @@
   /// \param [in] pc
   ///   The current pc value of this stack frame.
   ///
-  /// \param [in] frame_kind
-  ///
   /// \param [in] sc_ptr
   ///   Optionally seed the StackFrame with the SymbolContext information that
   ///   has
@@ -108,17 +106,19 @@
   StackFrame(const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx,
              lldb::user_id_t concrete_frame_idx, lldb::addr_t cfa,
              bool cfa_is_valid, lldb::addr_t pc, Kind frame_kind,
+             bool behaves_like_zeroth_frame, const SymbolContext *sc_ptr);
+
+  StackFrame(const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx,
+             lldb::user_id_t concrete_frame_idx,
+             const lldb::RegisterContextSP &reg_context_sp, lldb::addr_t cfa,
+             lldb::addr_t pc, bool behaves_like_zeroth_frame,
              const SymbolContext *sc_ptr);
 
   StackFrame(const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx,
              lldb::user_id_t concrete_frame_idx,
              const lldb::RegisterContextSP &reg_context_sp, lldb::addr_t cfa,
-             lldb::addr_t pc, const SymbolContext *sc_ptr);
-
-  StackFrame(const lldb::ThreadSP &thread_sp, lldb::user_id_t frame_idx,
-             lldb::user_id_t concrete_frame_idx,
-             const lldb::RegisterContextSP &reg_context_sp, lldb::addr_t cfa,
-             const Address &pc, const SymbolContext *sc_ptr);
+             const Address &pc, bool behaves_like_zeroth_frame,
+             const SymbolContext *sc_ptr);
 
   ~StackFrame() override;
 
@@ -287,18 +287,18 @@
       llvm::StringRef var_expr, lldb::DynamicValueType use_dynamic,
       uint32_t options, lldb::VariableSP &var_sp, Status &error);
 
-  /// Determine whether this StackFrame has debug information available or not
+  /// Determine whether this StackFrame has debug information available or not.
   ///
   /// \return
-  //    true if debug information is available for this frame (function,
-  //    compilation unit, block, etc.)
+  ///    true if debug information is available for this frame (function,
+  ///    compilation unit, block, etc.)
   bool HasDebugInformation();
 
   /// Return the disassembly for the instructions of this StackFrame's
   /// function as a single C string.
   ///
   /// \return
-  //    C string with the assembly instructions for this function.
+  ///    C string with the assembly instructions for this function.
   const char *Disassemble();
 
   /// Print a description for this frame using the frame-format formatter
@@ -367,6 +367,12 @@
   /// may have limited support for inspecting variables.
   bool IsArtificial() const;
 
+  /// Query whether this frame behaves like the zeroth frame, in the sense
+  /// that its pc value might not immediately follow a call (and thus might
+  /// be the first address of its function).  True for actual frame zero as
+  /// well as any other frame with the same trait.
+  bool BehavesLikeZerothFrame() const;
+
   /// Query this frame to find what frame it is in this Thread's
   /// StackFrameList.
   ///
@@ -399,7 +405,7 @@
   ///     is sufficient.  One of the DynamicValueType enumerated values.
   ///
   /// \return
-  //    A ValueObject for this variable.
+  ///     A ValueObject for this variable.
   lldb::ValueObjectSP
   GetValueObjectForFrameVariable(const lldb::VariableSP &variable_sp,
                                  lldb::DynamicValueType use_dynamic);
@@ -416,7 +422,7 @@
   ///     is sufficient.  One of the DynamicValueType enumerated values.
   ///
   /// \return
-  //    A ValueObject for this variable.
+  ///     A ValueObject for this variable.
   lldb::ValueObjectSP TrackGlobalVariable(const lldb::VariableSP &variable_sp,
                                           lldb::DynamicValueType use_dynamic);
 
@@ -511,6 +517,7 @@
   bool m_cfa_is_valid; // Does this frame have a CFA?  Different from CFA ==
                        // LLDB_INVALID_ADDRESS
   Kind m_stack_frame_kind;
+  bool m_behaves_like_zeroth_frame;
   lldb::VariableListSP m_variable_list_sp;
   ValueObjectList m_variable_list_value_objects; // Value objects for each
                                                  // variable in
diff --git a/src/llvm-project/lldb/include/lldb/Target/StopInfo.h b/src/llvm-project/lldb/include/lldb/Target/StopInfo.h
index 59033b1..61e1fbd 100644
--- a/src/llvm-project/lldb/include/lldb/Target/StopInfo.h
+++ b/src/llvm-project/lldb/include/lldb/Target/StopInfo.h
@@ -33,10 +33,13 @@
 
   lldb::ThreadSP GetThread() const { return m_thread_wp.lock(); }
 
-  // The value of the StopInfo depends on the StopReason. StopReason
-  // Meaning ----------------------------------------------
-  // eStopReasonBreakpoint       BreakpointSiteID eStopReasonSignal
-  // Signal number eStopReasonWatchpoint       WatchpointLocationID
+  // The value of the StopInfo depends on the StopReason.
+  //
+  // StopReason Meaning
+  // ------------------------------------------------
+  // eStopReasonBreakpoint       BreakpointSiteID
+  // eStopReasonSignal           Signal number
+  // eStopReasonWatchpoint       WatchpointLocationID
   // eStopReasonPlanComplete     No significance
 
   uint64_t GetValue() const { return m_value; }
diff --git a/src/llvm-project/lldb/include/lldb/Target/Target.h b/src/llvm-project/lldb/include/lldb/Target/Target.h
index 4ed11af..1e9153c 100644
--- a/src/llvm-project/lldb/include/lldb/Target/Target.h
+++ b/src/llvm-project/lldb/include/lldb/Target/Target.h
@@ -121,7 +121,7 @@
 
   FileSpecList GetExecutableSearchPaths();
 
-  void AppendExecutableSearchPaths(const FileSpec&);
+  void AppendExecutableSearchPaths(const FileSpec &);
 
   FileSpecList GetDebugFileSearchPaths();
 
@@ -139,6 +139,8 @@
 
   bool GetEnableSyntheticValue() const;
 
+  uint32_t GetMaxZeroPaddingInFloatFormat() const;
+
   uint32_t GetMaximumNumberOfChildrenToDisplay() const;
 
   uint32_t GetMaximumSizeOfStringSummary() const;
@@ -201,34 +203,21 @@
 
   void SetInjectLocalVariables(ExecutionContext *exe_ctx, bool b);
 
-  bool GetUseModernTypeLookup() const;
-
   void SetRequireHardwareBreakpoints(bool b);
 
   bool GetRequireHardwareBreakpoints() const;
 
 private:
   // Callbacks for m_launch_info.
-  static void Arg0ValueChangedCallback(void *target_property_ptr,
-                                       OptionValue *);
-  static void RunArgsValueChangedCallback(void *target_property_ptr,
-                                          OptionValue *);
-  static void EnvVarsValueChangedCallback(void *target_property_ptr,
-                                          OptionValue *);
-  static void InheritEnvValueChangedCallback(void *target_property_ptr,
-                                             OptionValue *);
-  static void InputPathValueChangedCallback(void *target_property_ptr,
-                                            OptionValue *);
-  static void OutputPathValueChangedCallback(void *target_property_ptr,
-                                             OptionValue *);
-  static void ErrorPathValueChangedCallback(void *target_property_ptr,
-                                            OptionValue *);
-  static void DetachOnErrorValueChangedCallback(void *target_property_ptr,
-                                                OptionValue *);
-  static void DisableASLRValueChangedCallback(void *target_property_ptr,
-                                              OptionValue *);
-  static void DisableSTDIOValueChangedCallback(void *target_property_ptr,
-                                               OptionValue *);
+  void Arg0ValueChangedCallback();
+  void RunArgsValueChangedCallback();
+  void EnvVarsValueChangedCallback();
+  void InputPathValueChangedCallback();
+  void OutputPathValueChangedCallback();
+  void ErrorPathValueChangedCallback();
+  void DetachOnErrorValueChangedCallback();
+  void DisableASLRValueChangedCallback();
+  void DisableSTDIOValueChangedCallback();
 
   // Member variables.
   ProcessLaunchInfo m_launch_info;
@@ -495,7 +484,7 @@
 
   static void SetDefaultArchitecture(const ArchSpec &arch);
 
-  /// Find a binary on the system and return its Module, 
+  /// Find a binary on the system and return its Module,
   /// or return an existing Module that is already in the Target.
   ///
   /// Given a ModuleSpec, find a binary satisifying that specification,
@@ -507,34 +496,33 @@
   ///     e.g. UUID, architecture, file path.
   ///
   /// \param[in] notify
-  ///     If notify is true, and the Module is new to this Target, 
-  ///     Target::ModulesDidLoad will be called.  
-  ///     If notify is false, it is assumed that the caller is adding 
-  ///     multiple Modules and will call ModulesDidLoad with the 
+  ///     If notify is true, and the Module is new to this Target,
+  ///     Target::ModulesDidLoad will be called.
+  ///     If notify is false, it is assumed that the caller is adding
+  ///     multiple Modules and will call ModulesDidLoad with the
   ///     full list at the end.
   ///     ModulesDidLoad must be called when a Module/Modules have
   ///     been added to the target, one way or the other.
   ///
   /// \param[out] error_ptr
-  ///     Optional argument, pointing to a Status object to fill in 
+  ///     Optional argument, pointing to a Status object to fill in
   ///     with any results / messages while attempting to find/load
   ///     this binary.  Many callers will be internal functions that
   ///     will handle / summarize the failures in a custom way and
   ///     don't use these messages.
   ///
-  /// \return 
+  /// \return
   ///     An empty ModuleSP will be returned if no matching file
   ///     was found.  If error_ptr was non-nullptr, an error message
   ///     will likely be provided.
-  lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec,
-                                   bool notify,
+  lldb::ModuleSP GetOrCreateModule(const ModuleSpec &module_spec, bool notify,
                                    Status *error_ptr = nullptr);
 
   // Settings accessors
 
   static const lldb::TargetPropertiesSP &GetGlobalProperties();
 
-  std::recursive_mutex &GetAPIMutex() { return m_mutex; }
+  std::recursive_mutex &GetAPIMutex();
 
   void DeleteCurrentProcess();
 
@@ -599,7 +587,7 @@
       const FileSpecList *containingModules,
       const FileSpecList *source_file_list,
       const std::unordered_set<std::string> &function_names,
-      RegularExpression &source_regex, bool internal, bool request_hardware,
+      RegularExpression source_regex, bool internal, bool request_hardware,
       LazyBool move_to_nearest_code);
 
   // Use this to create a breakpoint from a load address
@@ -622,7 +610,7 @@
   // target setting, else we use the values passed in
   lldb::BreakpointSP CreateFuncRegexBreakpoint(
       const FileSpecList *containingModules,
-      const FileSpecList *containingSourceFiles, RegularExpression &func_regexp,
+      const FileSpecList *containingSourceFiles, RegularExpression func_regexp,
       lldb::LanguageType requested_language, LazyBool skip_prologue,
       bool internal, bool request_hardware);
 
@@ -644,14 +632,11 @@
                             Args *additional_args = nullptr,
                             Status *additional_args_error = nullptr);
 
-  lldb::BreakpointSP
-  CreateScriptedBreakpoint(const llvm::StringRef class_name,
-                           const FileSpecList *containingModules,
-                           const FileSpecList *containingSourceFiles,
-                           bool internal,
-                           bool request_hardware,
-                           StructuredData::ObjectSP extra_args_sp,
-                           Status *creation_error = nullptr);
+  lldb::BreakpointSP CreateScriptedBreakpoint(
+      const llvm::StringRef class_name, const FileSpecList *containingModules,
+      const FileSpecList *containingSourceFiles, bool internal,
+      bool request_hardware, StructuredData::ObjectSP extra_args_sp,
+      Status *creation_error = nullptr);
 
   // This is the same as the func_name breakpoint except that you can specify a
   // vector of names.  This is cheaper than a regular expression breakpoint in
@@ -690,43 +675,42 @@
   }
 
   WatchpointList &GetWatchpointList() { return m_watchpoint_list; }
-  
+
   // Manages breakpoint names:
   void AddNameToBreakpoint(BreakpointID &id, const char *name, Status &error);
-  
-  void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, const char *name, 
+
+  void AddNameToBreakpoint(lldb::BreakpointSP &bp_sp, const char *name,
                            Status &error);
-  
-  void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, 
-                                ConstString name);
-  
-  BreakpointName *FindBreakpointName(ConstString name, bool can_create, 
+
+  void RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp, ConstString name);
+
+  BreakpointName *FindBreakpointName(ConstString name, bool can_create,
                                      Status &error);
-                                     
+
   void DeleteBreakpointName(ConstString name);
-  
+
   void ConfigureBreakpointName(BreakpointName &bp_name,
                                const BreakpointOptions &options,
                                const BreakpointName::Permissions &permissions);
- void ApplyNameToBreakpoints(BreakpointName &bp_name);
-  
+  void ApplyNameToBreakpoints(BreakpointName &bp_name);
+
   // This takes ownership of the name obj passed in.
   void AddBreakpointName(BreakpointName *bp_name);
-  
+
   void GetBreakpointNames(std::vector<std::string> &names);
-                               
-  //This call removes ALL breakpoints regardless of permission.
+
+  // This call removes ALL breakpoints regardless of permission.
   void RemoveAllBreakpoints(bool internal_also = false);
-  
+
   // This removes all the breakpoints, but obeys the ePermDelete on them.
   void RemoveAllowedBreakpoints();
 
   void DisableAllBreakpoints(bool internal_also = false);
-  
+
   void DisableAllowedBreakpoints();
 
   void EnableAllBreakpoints(bool internal_also = false);
-  
+
   void EnableAllowedBreakpoints();
 
   bool DisableBreakpointByID(lldb::break_id_t break_id);
@@ -909,8 +893,8 @@
   /// The target call at present just consults the Platform's call of the
   /// same name.
   ///
-  /// \param[in] module_sp
-  ///     A shared pointer reference to the module that checked.
+  /// \param[in] module_spec
+  ///     Path to the module.
   ///
   /// \return \b true if the module should be excluded, \b false otherwise.
   bool ModuleIsExcludedForUnconstrainedSearches(const FileSpec &module_spec);
@@ -1027,9 +1011,11 @@
 
   PathMappingList &GetImageSearchPathList();
 
-  TypeSystem *GetScratchTypeSystemForLanguage(Status *error,
-                                              lldb::LanguageType language,
-                                              bool create_on_demand = true);
+  llvm::Expected<TypeSystem &>
+  GetScratchTypeSystemForLanguage(lldb::LanguageType language,
+                                  bool create_on_demand = true);
+
+  std::vector<TypeSystem *> GetScratchTypeSystems(bool create_on_demand = true);
 
   PersistentExpressionState *
   GetPersistentExpressionStateForLanguage(lldb::LanguageType language);
@@ -1038,11 +1024,12 @@
   // parameters have the same meaning as for the UserExpression constructor.
   // Returns a new-ed object which the caller owns.
 
-  UserExpression *GetUserExpressionForLanguage(
-      llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language,
-      Expression::ResultType desired_type,
-      const EvaluateExpressionOptions &options,
-      ValueObject *ctx_obj, Status &error);
+  UserExpression *
+  GetUserExpressionForLanguage(llvm::StringRef expr, llvm::StringRef prefix,
+                               lldb::LanguageType language,
+                               Expression::ResultType desired_type,
+                               const EvaluateExpressionOptions &options,
+                               ValueObject *ctx_obj, Status &error);
 
   // Creates a FunctionCaller for the given language, the rest of the
   // parameters have the same meaning as for the FunctionCaller constructor.
@@ -1067,8 +1054,6 @@
                                                  const char *name,
                                                  Status &error);
 
-  ClangASTContext *GetScratchClangASTContext(bool create_on_demand = true);
-
   lldb::ClangASTImporterSP GetClangASTImporter();
 
   // Install any files through the platform that need be to installed prior to
@@ -1104,8 +1089,7 @@
       llvm::StringRef expression, ExecutionContextScope *exe_scope,
       lldb::ValueObjectSP &result_valobj_sp,
       const EvaluateExpressionOptions &options = EvaluateExpressionOptions(),
-      std::string *fixed_expression = nullptr,
-      ValueObject *ctx_obj = nullptr);
+      std::string *fixed_expression = nullptr, ValueObject *ctx_obj = nullptr);
 
   lldb::ExpressionVariableSP GetPersistentVariable(ConstString name);
 
@@ -1116,6 +1100,24 @@
 
   lldb::addr_t GetPersistentSymbol(ConstString name);
 
+  /// This method will return the address of the starting function for
+  /// this binary, e.g. main() or its equivalent.  This can be used as
+  /// an address of a function that is not called once a binary has
+  /// started running - e.g. as a return address for inferior function
+  /// calls that are unambiguous completion of the function call, not
+  /// called during the course of the inferior function code running.
+  ///
+  /// If no entry point can be found, an invalid address is returned.
+  ///
+  /// \param [out] err
+  ///     This object will be set to failure if no entry address could
+  ///     be found, and may contain a helpful error message.
+  //
+  /// \return
+  ///     Returns the entry address for this program, or an error
+  ///     if none can be found.
+  llvm::Expected<lldb_private::Address> GetEntryPointAddress();
+
   // Target Stop Hooks
   class StopHook : public UserID {
   public:
@@ -1147,7 +1149,9 @@
 
     void SetIsActive(bool is_active) { m_active = is_active; }
 
-    void SetAutoContinue(bool auto_continue) {m_auto_continue = auto_continue;}
+    void SetAutoContinue(bool auto_continue) {
+      m_auto_continue = auto_continue;
+    }
 
     bool GetAutoContinue() const { return m_auto_continue; }
 
@@ -1242,7 +1246,7 @@
                          const lldb::ModuleSP &module_sp) override;
 
   void NotifyModuleRemoved(const ModuleList &module_list,
-                         const lldb::ModuleSP &module_sp) override;
+                           const lldb::ModuleSP &module_sp) override;
 
   void NotifyModuleUpdated(const ModuleList &module_list,
                            const lldb::ModuleSP &old_module_sp,
@@ -1269,6 +1273,12 @@
   lldb::PlatformSP m_platform_sp; ///< The platform for this target.
   std::recursive_mutex m_mutex; ///< An API mutex that is used by the lldb::SB*
                                 /// classes make the SB interface thread safe
+  /// When the private state thread calls SB API's - usually because it is 
+  /// running OS plugin or Python ThreadPlan code - it should not block on the
+  /// API mutex that is held by the code that kicked off the sequence of events
+  /// that led us to run the code.  We hand out this mutex instead when we 
+  /// detect that code is running on the private state thread.
+  std::recursive_mutex m_private_mutex; 
   Arch m_arch;
   ModuleList m_images; ///< The list of images for this process (shared
                        /// libraries and anything dynamically loaded).
@@ -1277,7 +1287,7 @@
   BreakpointList m_internal_breakpoint_list;
   using BreakpointNameList = std::map<ConstString, BreakpointName *>;
   BreakpointNameList m_breakpoint_names;
-  
+
   lldb::BreakpointSP m_last_created_breakpoint;
   WatchpointList m_watchpoint_list;
   lldb::WatchpointSP m_last_created_watchpoint;
diff --git a/src/llvm-project/lldb/include/lldb/Target/TargetList.h b/src/llvm-project/lldb/include/lldb/Target/TargetList.h
index ece0705..50a7a321 100644
--- a/src/llvm-project/lldb/include/lldb/Target/TargetList.h
+++ b/src/llvm-project/lldb/include/lldb/Target/TargetList.h
@@ -55,12 +55,12 @@
   /// \param[in] debugger
   ///     The debugger to associate this target with
   ///
-  /// \param[in] file_spec
+  /// \param[in] user_exe_path
   ///     The main executable file for a debug target. This value
-  ///     can be nullptr and the file can be set later using:
+  ///     can be empty and the file can be set later using:
   ///     Target::SetExecutableModule (ModuleSP&)
   ///
-  /// \param[in] triple_cstr
+  /// \param[in] triple_str
   ///     A target triple string to be used for the target. This can
   ///     be nullptr if the triple is not known or when attaching to a
   ///     process.
diff --git a/src/llvm-project/lldb/include/lldb/Target/Thread.h b/src/llvm-project/lldb/include/lldb/Target/Thread.h
index 7aeaece..cdc8d39 100644
--- a/src/llvm-project/lldb/include/lldb/Target/Thread.h
+++ b/src/llvm-project/lldb/include/lldb/Target/Thread.h
@@ -128,10 +128,6 @@
 
   /// Constructor
   ///
-  /// \param [in] process
-  ///
-  /// \param [in] tid
-  ///
   /// \param [in] use_invalid_index_id
   ///     Optional parameter, defaults to false.  The only subclass that
   ///     is likely to set use_invalid_index_id == true is the HistoryThread
@@ -760,6 +756,8 @@
   ///    \b true if we will stop other threads while we single step this one.
   ///
   /// \param[in] stop_vote
+  ///    See standard meanings for the stop & run votes in ThreadPlan.h.
+  ///
   /// \param[in] run_vote
   ///    See standard meanings for the stop & run votes in ThreadPlan.h.
   ///
@@ -807,11 +805,13 @@
   ///    \b true if we will stop other threads while we single step this one.
   ///
   /// \param[in] stop_vote
+  ///    See standard meanings for the stop & run votes in ThreadPlan.h.
   ///
   /// \param[in] run_vote
   ///    See standard meanings for the stop & run votes in ThreadPlan.h.
   ///
   /// \param[in] frame_idx
+  ///     The fame index.
   ///
   /// \param[out] status
   ///     A status with an error if queuing failed.
@@ -899,6 +899,7 @@
 
   virtual lldb::ThreadPlanSP
   QueueThreadPlanForStepScripted(bool abort_other_plans, const char *class_name,
+                                 StructuredData::ObjectSP extra_args_sp,
                                  bool stop_other_threads, Status &status);
 
   // Thread Plan accessors:
@@ -1003,7 +1004,7 @@
   /// including the plan in that matches \a thread_index counting only
   /// the non-Private plans.
   ///
-  /// \param[in] up_to_plan_sp
+  /// \param[in] thread_index
   ///   Discard all plans up to and including this user plan given by this
   ///   index.
   ///
@@ -1102,6 +1103,17 @@
   // with what you might have calculated.
   virtual lldb::StopInfoSP GetPrivateStopInfo();
 
+  // Calculate the stop info that will be shown to lldb clients.  For instance,
+  // a "step out" is implemented by running to a breakpoint on the function
+  // return PC, so the process plugin initially sets the stop info to a
+  // StopInfoBreakpoint. But once we've run the ShouldStop machinery, we
+  // discover that there's a completed ThreadPlanStepOut, and that's really
+  // the StopInfo we want to show.  That will happen naturally the next
+  // time GetStopInfo is called, but if you want to force the replacement,
+  // you can call this.
+
+  void CalculatePublicStopInfo();
+
   // Ask the thread subclass to set its stop info.
   //
   // Thread subclasses should call Thread::SetStopInfo(...) with the reason the
diff --git a/src/llvm-project/lldb/include/lldb/Target/ThreadPlanPython.h b/src/llvm-project/lldb/include/lldb/Target/ThreadPlanPython.h
index 3825bf6..0ee559b 100644
--- a/src/llvm-project/lldb/include/lldb/Target/ThreadPlanPython.h
+++ b/src/llvm-project/lldb/include/lldb/Target/ThreadPlanPython.h
@@ -12,6 +12,8 @@
 
 #include <string>
 
+#include "lldb/lldb-forward.h"
+
 #include "lldb/Target/Process.h"
 #include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Target.h"
@@ -29,7 +31,8 @@
 
 class ThreadPlanPython : public ThreadPlan {
 public:
-  ThreadPlanPython(Thread &thread, const char *class_name);
+  ThreadPlanPython(Thread &thread, const char *class_name, 
+                   StructuredDataImpl *args_data);
   ~ThreadPlanPython() override;
 
   void GetDescription(Stream *s, lldb::DescriptionLevel level) override;
@@ -55,6 +58,11 @@
 
 private:
   std::string m_class_name;
+  StructuredDataImpl *m_args_data; // We own this, but the implementation
+                                   // has to manage the UP (since that is
+                                   // how it gets stored in the
+                                   // SBStructuredData).
+  std::string m_error_str;
   StructuredData::ObjectSP m_implementation_sp;
   bool m_did_push;
 
diff --git a/src/llvm-project/lldb/include/lldb/Target/ThreadPlanStepOut.h b/src/llvm-project/lldb/include/lldb/Target/ThreadPlanStepOut.h
index 00984db..576b416 100644
--- a/src/llvm-project/lldb/include/lldb/Target/ThreadPlanStepOut.h
+++ b/src/llvm-project/lldb/include/lldb/Target/ThreadPlanStepOut.h
@@ -72,6 +72,7 @@
   std::vector<lldb::StackFrameSP> m_stepped_past_frames;
   lldb::ValueObjectSP m_return_valobj_sp;
   bool m_calculate_return_value;
+  StreamString m_constructor_errors;
 
   friend lldb::ThreadPlanSP Thread::QueueThreadPlanForStepOut(
       bool abort_other_plans, SymbolContext *addr_context, bool first_insn,
diff --git a/src/llvm-project/lldb/include/lldb/Target/ThreadPlanStepRange.h b/src/llvm-project/lldb/include/lldb/Target/ThreadPlanStepRange.h
index 93d54ad..2820962 100644
--- a/src/llvm-project/lldb/include/lldb/Target/ThreadPlanStepRange.h
+++ b/src/llvm-project/lldb/include/lldb/Target/ThreadPlanStepRange.h
@@ -76,6 +76,12 @@
   lldb::BreakpointSP m_next_branch_bp_sp;
   bool m_use_fast_step;
   bool m_given_ranges_only;
+  bool m_found_calls = false; // When we set the next branch breakpoint for
+                              // step over, we now extend them past call insns
+                              // that directly return.  But if we do that we
+                              // need to run all threads, or we might cause
+                              // deadlocks.  This tells us whether we found
+                              // any calls in setting the next branch breakpoint.
 
 private:
   std::vector<lldb::DisassemblerSP> m_instruction_ranges;
diff --git a/src/llvm-project/lldb/include/lldb/Target/Unwind.h b/src/llvm-project/lldb/include/lldb/Target/Unwind.h
index a648e06..652918d 100644
--- a/src/llvm-project/lldb/include/lldb/Target/Unwind.h
+++ b/src/llvm-project/lldb/include/lldb/Target/Unwind.h
@@ -37,9 +37,10 @@
     lldb::addr_t cfa;
     lldb::addr_t pc;
     uint32_t idx;
+    bool behaves_like_zeroth_frame = (end_idx == 0);
 
     for (idx = 0; idx < end_idx; idx++) {
-      if (!DoGetFrameInfoAtIndex(idx, cfa, pc)) {
+      if (!DoGetFrameInfoAtIndex(idx, cfa, pc, behaves_like_zeroth_frame)) {
         break;
       }
     }
@@ -47,9 +48,9 @@
   }
 
   bool GetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
-                           lldb::addr_t &pc) {
+                           lldb::addr_t &pc, bool &behaves_like_zeroth_frame) {
     std::lock_guard<std::recursive_mutex> guard(m_unwind_mutex);
-    return DoGetFrameInfoAtIndex(frame_idx, cfa, pc);
+    return DoGetFrameInfoAtIndex(frame_idx, cfa, pc, behaves_like_zeroth_frame);
   }
 
   lldb::RegisterContextSP CreateRegisterContextForFrame(StackFrame *frame) {
@@ -66,7 +67,8 @@
   virtual uint32_t DoGetFrameCount() = 0;
 
   virtual bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
-                                     lldb::addr_t &pc) = 0;
+                                     lldb::addr_t &pc,
+                                     bool &behaves_like_zeroth_frame) = 0;
 
   virtual lldb::RegisterContextSP
   DoCreateRegisterContextForFrame(StackFrame *frame) = 0;
diff --git a/src/llvm-project/lldb/include/lldb/Utility/AnsiTerminal.h b/src/llvm-project/lldb/include/lldb/Utility/AnsiTerminal.h
index 1473c60..21375e3 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/AnsiTerminal.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/AnsiTerminal.h
@@ -55,7 +55,7 @@
 
 #include <string>
 
-namespace lldb_utility {
+namespace lldb_private {
 
 namespace ansi {
 
@@ -137,4 +137,4 @@
   return fmt;
 }
 }
-}
+} // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Utility/ArchSpec.h b/src/llvm-project/lldb/include/lldb/Utility/ArchSpec.h
index 7a32556..15e2fdb 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/ArchSpec.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/ArchSpec.h
@@ -101,6 +101,7 @@
     eCore_arm_armv6,
     eCore_arm_armv6m,
     eCore_arm_armv7,
+    eCore_arm_armv7l,
     eCore_arm_armv7f,
     eCore_arm_armv7s,
     eCore_arm_armv7k,
@@ -122,6 +123,8 @@
     eCore_thumbv7em,
     eCore_arm_arm64,
     eCore_arm_armv8,
+    eCore_arm_armv8l,
+    eCore_arm_arm64_32,
     eCore_arm_aarch64,
 
     eCore_mips32,
@@ -183,6 +186,8 @@
     eCore_uknownMach32,
     eCore_uknownMach64,
 
+    eCore_arc, // little endian ARC
+
     kNumCores,
 
     kCore_invalid,
@@ -255,20 +260,13 @@
   /// Destructor.
   ~ArchSpec();
 
-  /// Assignment operator.
-  ///
-  /// \param[in] rhs another ArchSpec object to copy.
-  ///
-  /// \return A const reference to this object.
-  const ArchSpec &operator=(const ArchSpec &rhs);
-
   /// Returns true if the OS, vendor and environment fields of the triple are
   /// unset. The triple is expected to be normalized
   /// (llvm::Triple::normalize).
   static bool ContainsOnlyArch(const llvm::Triple &normalized_triple);
 
   static void ListSupportedArchNames(StringList &list);
-  static size_t AutoComplete(CompletionRequest &request);
+  static void AutoComplete(CompletionRequest &request);
 
   /// Returns a static string representing the current architecture.
   ///
@@ -435,7 +433,7 @@
   /// \return A triple describing this ArchSpec.
   const llvm::Triple &GetTriple() const { return m_triple; }
 
-  void DumpTriple(Stream &s) const;
+  void DumpTriple(llvm::raw_ostream &s) const;
 
   /// Architecture triple setter.
   ///
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Args.h b/src/llvm-project/lldb/include/lldb/Utility/Args.h
index 6f25849..1308f40 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Args.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Args.h
@@ -35,6 +35,7 @@
   private:
     friend class Args;
     std::unique_ptr<char[]> ptr;
+    char quote;
 
     char *data() { return ptr.get(); }
 
@@ -42,12 +43,12 @@
     ArgEntry() = default;
     ArgEntry(llvm::StringRef str, char quote);
 
-    llvm::StringRef ref;
-    char quote;
+    llvm::StringRef ref() const { return c_str(); }
     const char *c_str() const { return ptr.get(); }
 
     /// Returns true if this argument was quoted in any way.
     bool IsQuoted() const { return quote != '\0'; }
+    char GetQuoteChar() const { return quote; }
   };
 
   /// Construct with an option command string.
@@ -121,7 +122,6 @@
   const char *GetArgumentAtIndex(size_t idx) const;
 
   llvm::ArrayRef<ArgEntry> entries() const { return m_entries; }
-  char GetArgumentQuoteCharAtIndex(size_t idx) const;
 
   using const_iterator = std::vector<ArgEntry>::const_iterator;
 
@@ -168,8 +168,8 @@
 
   /// Appends a new argument to the end of the list argument list.
   ///
-  /// \param[in] arg_cstr
-  ///     The new argument as a NULL terminated C string.
+  /// \param[in] arg_str
+  ///     The new argument.
   ///
   /// \param[in] quote_char
   ///     If the argument was originally quoted, put in the quote char here.
@@ -179,30 +179,27 @@
 
   void AppendArguments(const char **argv);
 
-  /// Insert the argument value at index \a idx to \a arg_cstr.
+  /// Insert the argument value at index \a idx to \a arg_str.
   ///
   /// \param[in] idx
   ///     The index of where to insert the argument.
   ///
-  /// \param[in] arg_cstr
-  ///     The new argument as a NULL terminated C string.
+  /// \param[in] arg_str
+  ///     The new argument.
   ///
   /// \param[in] quote_char
   ///     If the argument was originally quoted, put in the quote char here.
-  ///
-  /// \return
-  ///     The NULL terminated C string of the copy of \a arg_cstr.
   void InsertArgumentAtIndex(size_t idx, llvm::StringRef arg_str,
                              char quote_char = '\0');
 
-  /// Replaces the argument value at index \a idx to \a arg_cstr if \a idx is
+  /// Replaces the argument value at index \a idx to \a arg_str if \a idx is
   /// a valid argument index.
   ///
   /// \param[in] idx
   ///     The index of the argument that will have its value replaced.
   ///
-  /// \param[in] arg_cstr
-  ///     The new argument as a NULL terminated C string.
+  /// \param[in] arg_str
+  ///     The new argument.
   ///
   /// \param[in] quote_char
   ///     If the argument was originally quoted, put in the quote char here.
@@ -238,12 +235,12 @@
   /// \see Args::GetArgumentAtIndex (size_t) const
   void Shift();
 
-  /// Inserts a class owned copy of \a arg_cstr at the beginning of the
+  /// Inserts a class owned copy of \a arg_str at the beginning of the
   /// argument vector.
   ///
-  /// A copy \a arg_cstr will be made.
+  /// A copy \a arg_str will be made.
   ///
-  /// \param[in] arg_cstr
+  /// \param[in] arg_str
   ///     The argument to push on the front of the argument stack.
   ///
   /// \param[in] quote_char
@@ -255,39 +252,6 @@
   // For re-setting or blanking out the list of arguments.
   void Clear();
 
-  static const char *StripSpaces(std::string &s, bool leading = true,
-                                 bool trailing = true,
-                                 bool return_null_if_empty = true);
-
-  static bool UInt64ValueIsValidForByteSize(uint64_t uval64,
-                                            size_t total_byte_size) {
-    if (total_byte_size > 8)
-      return false;
-
-    if (total_byte_size == 8)
-      return true;
-
-    const uint64_t max = (static_cast<uint64_t>(1)
-                          << static_cast<uint64_t>(total_byte_size * 8)) -
-                         1;
-    return uval64 <= max;
-  }
-
-  static bool SInt64ValueIsValidForByteSize(int64_t sval64,
-                                            size_t total_byte_size) {
-    if (total_byte_size > 8)
-      return false;
-
-    if (total_byte_size == 8)
-      return true;
-
-    const int64_t max = (static_cast<int64_t>(1)
-                         << static_cast<uint64_t>(total_byte_size * 8 - 1)) -
-                        1;
-    const int64_t min = ~(max);
-    return min <= sval64 && sval64 <= max;
-  }
-
   static lldb::Encoding
   StringToEncoding(llvm::StringRef s,
                    lldb::Encoding fail_value = lldb::eEncodingInvalid);
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Baton.h b/src/llvm-project/lldb/include/lldb/Utility/Baton.h
index 4050f2a..c428674 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Baton.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Baton.h
@@ -12,6 +12,8 @@
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-public.h"
 
+#include "llvm/Support/raw_ostream.h"
+
 #include <memory>
 
 namespace lldb_private {
@@ -37,8 +39,9 @@
 
   virtual void *data() = 0;
 
-  virtual void GetDescription(Stream *s,
-                              lldb::DescriptionLevel level) const = 0;
+  virtual void GetDescription(llvm::raw_ostream &s,
+                              lldb::DescriptionLevel level,
+                              unsigned indentation) const = 0;
 };
 
 class UntypedBaton : public Baton {
@@ -50,7 +53,8 @@
   }
 
   void *data() override { return m_data; }
-  void GetDescription(Stream *s, lldb::DescriptionLevel level) const override;
+  void GetDescription(llvm::raw_ostream &s, lldb::DescriptionLevel level,
+                      unsigned indentation) const override;
 
   void *m_data; // Leave baton public for easy access
 };
@@ -63,7 +67,8 @@
   const T *getItem() const { return Item.get(); }
 
   void *data() override { return Item.get(); }
-  void GetDescription(Stream *s, lldb::DescriptionLevel level) const override {}
+  void GetDescription(llvm::raw_ostream &s, lldb::DescriptionLevel level,
+                      unsigned indentation) const override {}
 
 protected:
   std::unique_ptr<T> Item;
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Broadcaster.h b/src/llvm-project/lldb/include/lldb/Utility/Broadcaster.h
index fe4d1ca..ead597d 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Broadcaster.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Broadcaster.h
@@ -65,7 +65,6 @@
   }
 
   bool operator<(const BroadcastEventSpec &rhs) const;
-  BroadcastEventSpec &operator=(const BroadcastEventSpec &rhs);
 
 private:
   ConstString m_broadcaster_class;
diff --git a/src/llvm-project/lldb/include/lldb/Utility/CleanUp.h b/src/llvm-project/lldb/include/lldb/Utility/CleanUp.h
deleted file mode 100644
index 6cd5f33..0000000
--- a/src/llvm-project/lldb/include/lldb/Utility/CleanUp.h
+++ /dev/null
@@ -1,42 +0,0 @@
-//===-- CleanUp.h -----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_CleanUp_h_
-#define liblldb_CleanUp_h_
-
-#include "lldb/lldb-public.h"
-#include <functional>
-
-namespace lldb_private {
-
-/// Run a cleanup function on scope exit unless it's explicitly disabled.
-class CleanUp {
-  std::function<void()> Clean;
-
-public:
-  /// Register a cleanup function which applies \p Func to a list of arguments.
-  /// Use caution with arguments which are references: they will be copied.
-  template <typename F, typename... Args>
-  CleanUp(F &&Func, Args &&... args)
-      : Clean(std::bind(std::forward<F>(Func), std::forward<Args>(args)...)) {}
-
-  ~CleanUp() {
-    if (Clean)
-      Clean();
-  }
-
-  /// Disable the cleanup.
-  void disable() { Clean = nullptr; }
-
-  // Prevent cleanups from being run more than once.
-  DISALLOW_COPY_AND_ASSIGN(CleanUp);
-};
-
-} // namespace lldb_private
-
-#endif // #ifndef liblldb_CleanUp_h_
diff --git a/src/llvm-project/lldb/include/lldb/Utility/CompletionRequest.h b/src/llvm-project/lldb/include/lldb/Utility/CompletionRequest.h
index f5ccb01..570f626 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/CompletionRequest.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/CompletionRequest.h
@@ -16,25 +16,53 @@
 #include "llvm/ADT/StringSet.h"
 
 namespace lldb_private {
+enum class CompletionMode {
+  // The current token has been completed.
+  Normal,
+  // The current token has been partially completed. This means that we found
+  // a completion, but that the completed token is still incomplete. Examples
+  // for this are file paths, where we want to complete "/bi" to "/bin/", but
+  // the file path token is still incomplete after the completion. Clients
+  // should not indicate to the user that this is a full completion (e.g. by
+  // not inserting the usual trailing space after a successful completion).
+  Partial,
+  // The full line has been rewritten by the completion.
+  RewriteLine,
+};
+
 class CompletionResult {
+public:
   /// A single completion and all associated data.
-  struct Completion {
-    Completion(llvm::StringRef completion, llvm::StringRef description)
-        : m_completion(completion.str()), m_descripton(description.str()) {}
+  class Completion {
 
     std::string m_completion;
     std::string m_descripton;
+    CompletionMode m_mode;
+
+  public:
+    Completion(llvm::StringRef completion, llvm::StringRef description,
+               CompletionMode mode)
+        : m_completion(completion.str()), m_descripton(description.str()),
+          m_mode(mode) {}
+    const std::string &GetCompletion() const { return m_completion; }
+    const std::string &GetDescription() const { return m_descripton; }
+    CompletionMode GetMode() const { return m_mode; }
 
     /// Generates a string that uniquely identifies this completion result.
     std::string GetUniqueKey() const;
   };
+
+private:
   std::vector<Completion> m_results;
 
   /// List of added completions so far. Used to filter out duplicates.
   llvm::StringSet<> m_added_values;
 
 public:
-  void AddResult(llvm::StringRef completion, llvm::StringRef description);
+  void AddResult(llvm::StringRef completion, llvm::StringRef description,
+                 CompletionMode mode);
+
+  llvm::ArrayRef<Completion> GetResults() const { return m_results; }
 
   /// Adds all collected completion matches to the given list.
   /// The list will be cleared before the results are added. The number of
@@ -68,18 +96,10 @@
   ///     the cursor is at the start of the line. The completion starts from
   ///     this cursor position.
   ///
-  /// \param [in] match_start_point
-  /// \param [in] max_return_elements
-  ///     If there is a match that is expensive to compute, these are here to
-  ///     allow you to compute the completions in  batches.  Start the
-  ///     completion from match_start_point, and return match_return_elements
-  ///     elements.
-  ///
   /// \param [out] result
   ///     The CompletionResult that will be filled with the results after this
   ///     request has been handled.
   CompletionRequest(llvm::StringRef command_line, unsigned raw_cursor_pos,
-                    int match_start_point, int max_return_elements,
                     CompletionResult &result);
 
   llvm::StringRef GetRawLine() const { return m_command; }
@@ -90,21 +110,25 @@
 
   Args &GetParsedLine() { return m_parsed_line; }
 
-  const Args &GetPartialParsedLine() const { return m_partial_parsed_line; }
+  const Args::ArgEntry &GetParsedArg() {
+    return GetParsedLine()[GetCursorIndex()];
+  }
 
-  void SetCursorIndex(int i) { m_cursor_index = i; }
-  int GetCursorIndex() const { return m_cursor_index; }
+  /// Drops the first argument from the argument list.
+  void ShiftArguments() {
+    m_cursor_index--;
+    m_parsed_line.Shift();
+  }
 
-  void SetCursorCharPosition(int pos) { m_cursor_char_position = pos; }
-  int GetCursorCharPosition() const { return m_cursor_char_position; }
+  /// Adds an empty argument at the end of the argument list and moves
+  /// the cursor to this new argument.
+  void AppendEmptyArgument() {
+    m_parsed_line.AppendArgument(llvm::StringRef());
+    m_cursor_index++;
+    m_cursor_char_position = 0;
+  }
 
-  int GetMatchStartPoint() const { return m_match_start_point; }
-
-  int GetMaxReturnElements() const { return m_max_return_elements; }
-
-  bool GetWordComplete() { return m_word_complete; }
-
-  void SetWordComplete(bool v) { m_word_complete = v; }
+  size_t GetCursorIndex() const { return m_cursor_index; }
 
   /// Adds a possible completion string. If the completion was already
   /// suggested before, it will not be added to the list of results. A copy of
@@ -112,11 +136,31 @@
   /// afterwards.
   ///
   /// \param match The suggested completion.
-  /// \param match An optional description of the completion string. The
+  /// \param completion An optional description of the completion string. The
   ///     description will be displayed to the user alongside the completion.
+  /// \param mode The CompletionMode for this completion.
   void AddCompletion(llvm::StringRef completion,
-                     llvm::StringRef description = "") {
-    m_result.AddResult(completion, description);
+                     llvm::StringRef description = "",
+                     CompletionMode mode = CompletionMode::Normal) {
+    m_result.AddResult(completion, description, mode);
+  }
+
+  /// Adds a possible completion string if the completion would complete the
+  /// current argument.
+  ///
+  /// \param match The suggested completion.
+  /// \param description An optional description of the completion string. The
+  ///     description will be displayed to the user alongside the completion.
+  template <CompletionMode M = CompletionMode::Normal>
+  void TryCompleteCurrentArg(llvm::StringRef completion,
+                             llvm::StringRef description = "") {
+    // Trying to rewrite the whole line while checking for the current
+    // argument never makes sense. Completion modes are always hardcoded, so
+    // this can be a static_assert.
+    static_assert(M != CompletionMode::RewriteLine,
+                  "Shouldn't rewrite line with this function");
+    if (completion.startswith(GetCursorArgumentPrefix()))
+      AddCompletion(completion, description, M);
   }
 
   /// Adds multiple possible completion strings.
@@ -125,8 +169,8 @@
   ///
   /// \see AddCompletion
   void AddCompletions(const StringList &completions) {
-    for (std::size_t i = 0; i < completions.GetSize(); ++i)
-      AddCompletion(completions.GetStringAtIndex(i));
+    for (const std::string &completion : completions)
+      AddCompletion(completion);
   }
 
   /// Adds multiple possible completion strings alongside their descriptions.
@@ -145,16 +189,8 @@
                     descriptions.GetStringAtIndex(i));
   }
 
-  std::size_t GetNumberOfMatches() const {
-    return m_result.GetNumberOfResults();
-  }
-
-  llvm::StringRef GetCursorArgument() const {
-    return GetParsedLine().GetArgumentAtIndex(GetCursorIndex());
-  }
-
   llvm::StringRef GetCursorArgumentPrefix() const {
-    return GetCursorArgument().substr(0, GetCursorCharPosition());
+    return GetParsedLine().GetArgumentAtIndex(GetCursorIndex());
   }
 
 private:
@@ -164,22 +200,10 @@
   unsigned m_raw_cursor_pos;
   /// The command line parsed as arguments.
   Args m_parsed_line;
-  /// The command line until the cursor position parsed as arguments.
-  Args m_partial_parsed_line;
   /// The index of the argument in which the completion cursor is.
-  int m_cursor_index;
+  size_t m_cursor_index;
   /// The cursor position in the argument indexed by m_cursor_index.
-  int m_cursor_char_position;
-  /// If there is a match that is expensive
-  /// to compute, these are here to allow you to compute the completions in
-  /// batches.  Start the completion from \amatch_start_point, and return
-  /// \amatch_return_elements elements.
-  // FIXME: These two values are not implemented.
-  int m_match_start_point;
-  int m_max_return_elements;
-  /// \btrue if this is a complete option value (a space will be inserted
-  /// after the completion.)  \bfalse otherwise.
-  bool m_word_complete = false;
+  size_t m_cursor_char_position;
 
   /// The result this request is supposed to fill out.
   /// We keep this object private to ensure that no backend can in any way
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Connection.h b/src/llvm-project/lldb/include/lldb/Utility/Connection.h
index 77f3ef4..9e66dee 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Connection.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Connection.h
@@ -171,7 +171,7 @@
   ///
   /// \return
   ///     The underlying IOObject used for reading.
-  virtual lldb::IOObjectSP GetReadObject() { return lldb::IOObjectSP(); }
+  virtual lldb::IOObjectSP GetReadObject() { return lldb::IOObjectSP(); };
 
 private:
   // For Connection only
diff --git a/src/llvm-project/lldb/include/lldb/Utility/ConstString.h b/src/llvm-project/lldb/include/lldb/Utility/ConstString.h
index 8576c18..7475045 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/ConstString.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/ConstString.h
@@ -10,6 +10,7 @@
 #define liblldb_ConstString_h_
 
 #include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/DenseMapInfo.h"
 #include "llvm/Support/FormatVariadic.h"
 
 #include <stddef.h>
@@ -146,8 +147,8 @@
   ///     Another string object to compare this object to.
   ///
   /// \return
-  ///     \li \b true if this object is equal to \a rhs.
-  ///     \li \b false if this object is not equal to \a rhs.
+  ///     true if this object is equal to \a rhs.
+  ///     false if this object is not equal to \a rhs.
   bool operator==(ConstString rhs) const {
     // We can do a pointer compare to compare these strings since they must
     // come from the same pool in order to be equal.
@@ -165,8 +166,8 @@
   ///     Another string object to compare this object to.
   ///
   /// \return
-  ///     \li \b true if this object is equal to \a rhs.
-  ///     \li \b false if this object is not equal to \a rhs.
+  ///     \b true if this object is equal to \a rhs.
+  ///     \b false if this object is not equal to \a rhs.
   bool operator==(const char *rhs) const {
     // ConstString differentiates between empty strings and nullptr strings, but
     // StringRef doesn't. Therefore we have to do this check manually now.
@@ -188,8 +189,8 @@
   ///     Another string object to compare this object to.
   ///
   /// \return
-  ///     \li \b true if this object is not equal to \a rhs.
-  ///     \li \b false if this object is equal to \a rhs.
+  ///     \b true if this object is not equal to \a rhs.
+  ///     \b false if this object is equal to \a rhs.
   bool operator!=(ConstString rhs) const {
     return m_string != rhs.m_string;
   }
@@ -204,9 +205,7 @@
   /// \param[in] rhs
   ///     Another string object to compare this object to.
   ///
-  /// \return
-  ///     \li \b true if this object is not equal to \a rhs.
-  ///     \li \b false if this object is equal to \a rhs.
+  /// \return \b true if this object is not equal to \a rhs, false otherwise.
   bool operator!=(const char *rhs) const { return !(*this == rhs); }
 
   bool operator<(ConstString rhs) const;
@@ -218,8 +217,7 @@
   ///
   /// If \a value_if_empty is nullptr, then nullptr will be returned.
   ///
-  /// \return
-  ///     Returns \a value_if_empty if the string is empty, otherwise
+  /// \return Returns \a value_if_empty if the string is empty, otherwise
   ///     the C string value contained in this object.
   const char *AsCString(const char *value_if_empty = nullptr) const {
     return (IsEmpty() ? value_if_empty : m_string);
@@ -269,7 +267,7 @@
   /// in a pointer comparison since all strings are in a uniqued in a global
   /// string pool.
   ///
-  /// \param[in] rhs
+  /// \param[in] lhs
   ///     The Left Hand Side const ConstString object reference.
   ///
   /// \param[in] rhs
@@ -279,9 +277,7 @@
   ///     Case sensitivity. If true, case sensitive equality
   ///     will be tested, otherwise character case will be ignored
   ///
-  /// \return
-  ///     \li \b true if this object is equal to \a rhs.
-  ///     \li \b false if this object is not equal to \a rhs.
+  /// \return \b true if this object is equal to \a rhs, \b false otherwise.
   static bool Equals(ConstString lhs, ConstString rhs,
                      const bool case_sensitive = true);
 
@@ -305,10 +301,7 @@
   ///     Case sensitivity of compare. If true, case sensitive compare
   ///     will be performed, otherwise character case will be ignored
   ///
-  /// \return
-  ///     \li -1 if lhs < rhs
-  ///     \li 0 if lhs == rhs
-  ///     \li 1 if lhs > rhs
+  /// \return -1 if lhs < rhs, 0 if lhs == rhs, 1 if lhs > rhs
   static int Compare(ConstString lhs, ConstString rhs,
                      const bool case_sensitive = true);
 
@@ -335,15 +328,15 @@
   /// Test for empty string.
   ///
   /// \return
-  ///     \li \b true if the contained string is empty.
-  ///     \li \b false if the contained string is not empty.
+  ///     \b true if the contained string is empty.
+  ///     \b false if the contained string is not empty.
   bool IsEmpty() const { return m_string == nullptr || m_string[0] == '\0'; }
 
   /// Test for null string.
   ///
   /// \return
-  ///     \li \b true if there is no string associated with this instance.
-  ///     \li \b false if there is a string associated with this instance.
+  ///     \b true if there is no string associated with this instance.
+  ///     \b false if there is a string associated with this instance.
   bool IsNull() const { return m_string == nullptr; }
 
   /// Set the C string value.
@@ -445,6 +438,14 @@
   static size_t StaticMemorySize();
 
 protected:
+  template <typename T> friend struct ::llvm::DenseMapInfo;
+  /// Only used by DenseMapInfo.
+  static ConstString FromStringPoolPointer(const char *ptr) {
+    ConstString s;
+    s.m_string = ptr;
+    return s;
+  };
+
   // Member variables
   const char *m_string;
 };
@@ -459,6 +460,27 @@
   static void format(const lldb_private::ConstString &CS, llvm::raw_ostream &OS,
                      llvm::StringRef Options);
 };
+
+/// DenseMapInfo implementation.
+/// \{
+template <> struct DenseMapInfo<lldb_private::ConstString> {
+  static inline lldb_private::ConstString getEmptyKey() {
+    return lldb_private::ConstString::FromStringPoolPointer(
+        DenseMapInfo<const char *>::getEmptyKey());
+  }
+  static inline lldb_private::ConstString getTombstoneKey() {
+    return lldb_private::ConstString::FromStringPoolPointer(
+        DenseMapInfo<const char *>::getTombstoneKey());
+  }
+  static unsigned getHashValue(lldb_private::ConstString val) {
+    return DenseMapInfo<const char *>::getHashValue(val.m_string);
+  }
+  static bool isEqual(lldb_private::ConstString LHS,
+                      lldb_private::ConstString RHS) {
+    return LHS == RHS;
+  }
+};
+/// \}
 }
 
 #endif // liblldb_ConstString_h_
diff --git a/src/llvm-project/lldb/include/lldb/Utility/DataEncoder.h b/src/llvm-project/lldb/include/lldb/Utility/DataEncoder.h
index 19b7cef..f4964b2 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/DataEncoder.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/DataEncoder.h
@@ -21,8 +21,9 @@
 
 namespace lldb_private {
 
-/// \class DataEncoder DataEncoder.h "lldb/Core/DataEncoder.h" An binary data
-/// encoding class.
+/// \class DataEncoder
+///
+/// An binary data encoding class.
 ///
 /// DataEncoder is a class that can encode binary data (swapping if needed) to
 /// a data buffer. The data buffer can be caller owned, or can be shared data
@@ -86,74 +87,6 @@
   /// any references to shared data that this object may contain.
   void Clear();
 
-  /// Get the current address size.
-  ///
-  /// Return the size in bytes of any address values this object will extract.
-  ///
-  /// \return
-  ///     The size in bytes of address values that will be extracted.
-  uint8_t GetAddressByteSize() const { return m_addr_size; }
-
-  /// Get the number of bytes contained in this object.
-  ///
-  /// \return
-  ///     The total number of bytes of data this object refers to.
-  size_t GetByteSize() const { return m_end - m_start; }
-
-  /// Get the data end pointer.
-  ///
-  /// \return
-  ///     Returns a pointer to the next byte contained in this
-  ///     object's data, or NULL of there is no data in this object.
-  uint8_t *GetDataEnd() { return m_end; }
-
-  const uint8_t *GetDataEnd() const { return m_end; }
-
-  /// Get the shared data offset.
-  ///
-  /// Get the offset of the first byte of data in the shared data (if any).
-  ///
-  /// \return
-  ///     If this object contains shared data, this function returns
-  ///     the offset in bytes into that shared data, zero otherwise.
-  size_t GetSharedDataOffset() const;
-
-  /// Get the current byte order value.
-  ///
-  /// \return
-  ///     The current byte order value from this object's internal
-  ///     state.
-  lldb::ByteOrder GetByteOrder() const { return m_byte_order; }
-
-  /// Get the data start pointer.
-  ///
-  /// \return
-  ///     Returns a pointer to the first byte contained in this
-  ///     object's data, or NULL of there is no data in this object.
-  uint8_t *GetDataStart() { return m_start; }
-
-  const uint8_t *GetDataStart() const { return m_start; }
-
-  /// Encode unsigned integer values into the data at \a offset.
-  ///
-  /// \param[in] offset
-  ///     The offset within the contained data at which to put the
-  ///     data.
-  ///
-  /// \param[in] value
-  ///     The value to encode into the data.
-  ///
-  /// \return
-  ///     The next offset in the bytes of this data if the data
-  ///     was successfully encoded, UINT32_MAX if the encoding failed.
-  uint32_t PutU8(uint32_t offset, uint8_t value);
-
-  uint32_t PutU16(uint32_t offset, uint16_t value);
-
-  uint32_t PutU32(uint32_t offset, uint32_t value);
-
-  uint32_t PutU64(uint32_t offset, uint64_t value);
-
   /// Encode an unsigned integer of size \a byte_size to \a offset.
   ///
   /// Encode a single integer value at \a offset and return the offset that
@@ -176,7 +109,7 @@
   /// \return
   ///     The next offset in the bytes of this data if the integer
   ///     was successfully encoded, UINT32_MAX if the encoding failed.
-  uint32_t PutMaxU64(uint32_t offset, uint32_t byte_size, uint64_t value);
+  uint32_t PutUnsigned(uint32_t offset, uint32_t byte_size, uint64_t value);
 
   /// Encode an arbitrary number of bytes.
   ///
@@ -204,12 +137,11 @@
   /// m_addr_size member variable and should be set correctly prior to
   /// extracting any address values.
   ///
-  /// \param[in,out] offset_ptr
-  ///     A pointer to an offset within the data that will be advanced
-  ///     by the appropriate number of bytes if the value is extracted
-  ///     correctly. If the offset is out of bounds or there are not
-  ///     enough bytes to extract this value, the offset will be left
-  ///     unmodified.
+  /// \param[in] offset
+  ///     The offset where to encode the address.
+  ///
+  /// \param[in] addr
+  ///     The address to encode.
   ///
   /// \return
   ///     The next valid offset within data if the put operation
@@ -220,50 +152,40 @@
   ///
   /// Encodes a C string into the existing data including the terminating
   ///
-  /// \param[in,out] offset_ptr
-  ///     A pointer to an offset within the data that will be advanced
-  ///     by the appropriate number of bytes if the value is extracted
-  ///     correctly. If the offset is out of bounds or there are not
-  ///     enough bytes to extract this value, the offset will be left
-  ///     unmodified.
+  /// \param[in] offset
+  ///     The offset where to encode the string.
+  ///
+  /// \param[in] cstr
+  ///     The string to encode.
   ///
   /// \return
   ///     A pointer to the C string value in the data. If the offset
   ///     pointed to by \a offset_ptr is out of bounds, or if the
   ///     offset plus the length of the C string is out of bounds,
   ///     NULL will be returned.
-  uint32_t PutCString(uint32_t offset_ptr, const char *cstr);
+  uint32_t PutCString(uint32_t offset, const char *cstr);
 
-  lldb::DataBufferSP &GetSharedDataBuffer() { return m_data_sp; }
+private:
+  uint32_t PutU8(uint32_t offset, uint8_t value);
+  uint32_t PutU16(uint32_t offset, uint16_t value);
+  uint32_t PutU32(uint32_t offset, uint32_t value);
+  uint32_t PutU64(uint32_t offset, uint64_t value);
 
-  /// Set the address byte size.
-  ///
-  /// Set the size in bytes that will be used when extracting any address and
-  /// pointer values from data contained in this object.
-  ///
-  /// \param[in] addr_size
-  ///     The size in bytes to use when extracting addresses.
-  void SetAddressByteSize(uint8_t addr_size) { m_addr_size = addr_size; }
+  uint32_t BytesLeft(uint32_t offset) const {
+    const uint32_t size = GetByteSize();
+    if (size > offset)
+      return size - offset;
+    return 0;
+  }
 
-  /// Set data with a buffer that is caller owned.
-  ///
-  /// Use data that is owned by the caller when extracting values. The data
-  /// must stay around as long as this object, or any object that copies a
-  /// subset of this object's data, is valid. If \a bytes is NULL, or \a
-  /// length is zero, this object will contain no data.
-  ///
-  /// \param[in] bytes
-  ///     A pointer to caller owned data.
-  ///
-  /// \param[in] length
-  ///     The length in bytes of \a bytes.
-  ///
-  /// \param[in] byte_order
-  ///     A byte order of the data that we are extracting from.
+  /// Test the availability of \a length bytes of data from \a offset.
   ///
   /// \return
-  ///     The number of bytes that this object now contains.
-  uint32_t SetData(void *bytes, uint32_t length, lldb::ByteOrder byte_order);
+  ///     \b true if \a offset is a valid offset and there are \a
+  ///     length bytes available at that offset, \b false otherwise.
+  bool ValidOffsetForDataOfSize(uint32_t offset, uint32_t length) const {
+    return length <= BytesLeft(offset);
+  }
 
   /// Adopt a subset of shared data in \a data_sp.
   ///
@@ -290,15 +212,6 @@
   uint32_t SetData(const lldb::DataBufferSP &data_sp, uint32_t offset = 0,
                    uint32_t length = UINT32_MAX);
 
-  /// Set the byte_order value.
-  ///
-  /// Sets the byte order of the data to extract. Extracted values will be
-  /// swapped if necessary when decoding.
-  ///
-  /// \param[in] byte_order
-  ///     The byte order value to use when extracting data.
-  void SetByteOrder(lldb::ByteOrder byte_order) { m_byte_order = byte_order; }
-
   /// Test the validity of \a offset.
   ///
   /// \return
@@ -306,34 +219,30 @@
   ///     object, \b false otherwise.
   bool ValidOffset(uint32_t offset) const { return offset < GetByteSize(); }
 
-  /// Test the availability of \a length bytes of data from \a offset.
+  /// Get the number of bytes contained in this object.
   ///
   /// \return
-  ///     \b true if \a offset is a valid offset and there are \a
-  ///     length bytes available at that offset, \b false otherwise.
-  bool ValidOffsetForDataOfSize(uint32_t offset, uint32_t length) const {
-    return length <= BytesLeft(offset);
-  }
-
-  uint32_t BytesLeft(uint32_t offset) const {
-    const uint32_t size = GetByteSize();
-    if (size > offset)
-      return size - offset;
-    return 0;
-  }
-
-protected:
-  // Member variables
-  uint8_t *m_start; ///< A pointer to the first byte of data.
-  uint8_t *m_end;   ///< A pointer to the byte that is past the end of the data.
-  lldb::ByteOrder
-      m_byte_order;    ///< The byte order of the data we are extracting from.
-  uint8_t m_addr_size; ///< The address size to use when extracting pointers or
-                       /// addresses
-  mutable lldb::DataBufferSP m_data_sp; ///< The shared pointer to data that can
-                                        /// be shared among multiple instances
+  ///     The total number of bytes of data this object refers to.
+  size_t GetByteSize() const { return m_end - m_start; }
 
 private:
+  /// A pointer to the first byte of data.
+  uint8_t *m_start;
+
+  /// A pointer to the byte that is past the end of the data.
+  uint8_t *m_end;
+
+  /// The byte order of the data we are extracting from.
+  lldb::ByteOrder m_byte_order;
+
+  /// The address size to use when extracting pointers or
+  /// addresses
+  uint8_t m_addr_size;
+
+  /// The shared pointer to data that can
+  /// be shared among multiple instances
+  mutable lldb::DataBufferSP m_data_sp;
+
   DISALLOW_COPY_AND_ASSIGN(DataEncoder);
 };
 
diff --git a/src/llvm-project/lldb/include/lldb/Utility/DataExtractor.h b/src/llvm-project/lldb/include/lldb/Utility/DataExtractor.h
index 74174b3..bf0d105 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/DataExtractor.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/DataExtractor.h
@@ -14,6 +14,7 @@
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-types.h"
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/Support/DataExtractor.h"
 
 #include <cassert>
 #include <stdint.h>
@@ -167,9 +168,8 @@
   /// the beginning of each line and can be offset by base address \a
   /// base_addr. \a num_per_line objects will be displayed on each line.
   ///
-  /// \param[in] s
-  ///     The stream to dump the output to. If nullptr the output will
-  ///     be dumped to Log().
+  /// \param[in] log
+  ///     The log to dump the output to.
   ///
   /// \param[in] offset
   ///     The offset into the data at which to start dumping.
@@ -188,16 +188,11 @@
   ///     The type of objects to use when dumping data from this
   ///     object. See DataExtractor::Type.
   ///
-  /// \param[in] type_format
-  ///     The optional format to use for the \a type objects. If this
-  ///     is nullptr, the default format for the \a type will be used.
-  ///
   /// \return
   ///     The offset at which dumping ended.
   lldb::offset_t PutToLog(Log *log, lldb::offset_t offset,
                           lldb::offset_t length, uint64_t base_addr,
-                          uint32_t num_per_line, Type type,
-                          const char *type_format = nullptr) const;
+                          uint32_t num_per_line, Type type) const;
 
   /// Extract an arbitrary number of bytes in the specified byte order.
   ///
@@ -362,30 +357,29 @@
   /// when say copying a partial data value into a register.
   ///
   /// \param[in] src_offset
-  ///     The offset into this data from which to start copying an
-  ///     endian entity
+  ///     The offset into this data from which to start copying an endian
+  ///     entity
   ///
   /// \param[in] src_len
-  ///     The length of the endian data to copy from this object
-  ///     into the \a dst object
+  ///     The length of the endian data to copy from this object into the \a
+  ///     dst object
   ///
   /// \param[out] dst
-  ///     The buffer where to place the endian data. The data might
-  ///     need to be byte swapped (and appropriately padded with
-  ///     zeroes if \a src_len != \a dst_len) if \a dst_byte_order
-  ///     does not match the byte order in this object.
+  ///     The buffer where to place the endian data. The data might need to be
+  ///     byte swapped (and appropriately padded with zeroes if \a src_len !=
+  ///     \a dst_len) if \a dst_byte_order does not match the byte order in
+  ///     this object.
   ///
   /// \param[in] dst_len
-  ///     The length number of bytes that the endian value will
-  ///     occupy is \a dst.
+  ///     The length number of bytes that the endian value will occupy is \a
+  ///     dst.
   ///
-  /// \param[in] byte_order
-  ///     The byte order that the endian value should be in the \a dst
-  ///     buffer.
+  /// \param[in] dst_byte_order
+  ///     The byte order that the endian value should be in the \a dst buffer.
   ///
   /// \return
-  ///     Returns the number of bytes that were copied, or zero if
-  ///     anything goes wrong.
+  ///     Returns the number of bytes that were copied, or zero if anything
+  ///     goes wrong.
   lldb::offset_t CopyByteOrderedData(lldb::offset_t src_offset,
                                      lldb::offset_t src_len, void *dst,
                                      lldb::offset_t dst_len,
@@ -520,7 +514,7 @@
   ///     enough bytes to extract this value, the offset will be left
   ///     unmodified.
   ///
-  /// \param[in] byte_size
+  /// \param[in] size
   ///     The size in byte of the integer to extract.
   ///
   /// \param[in] bitfield_bit_size
@@ -558,7 +552,7 @@
   ///     enough bytes to extract this value, the offset will be left
   ///     unmodified.
   ///
-  /// \param[in] byte_size
+  /// \param[in] size
   ///     The size in bytes of the integer to extract.
   ///
   /// \param[in] bitfield_bit_size
@@ -956,14 +950,14 @@
   ///     unmodified.
   ///
   /// \return
-  //      The number of bytes consumed during the extraction.
+  ///     The number of bytes consumed during the extraction.
   uint32_t Skip_LEB128(lldb::offset_t *offset_ptr) const;
 
   /// Test the validity of \a offset.
   ///
   /// \return
-  ///     \b true if \a offset is a valid offset into the data in this
-  ///     object, \b false otherwise.
+  ///     true if \a offset is a valid offset into the data in this object,
+  ///     false otherwise.
   bool ValidOffset(lldb::offset_t offset) const {
     return offset < GetByteSize();
   }
@@ -971,8 +965,8 @@
   /// Test the availability of \a length bytes of data from \a offset.
   ///
   /// \return
-  ///     \b true if \a offset is a valid offset and there are \a
-  ///     length bytes available at that offset, \b false otherwise.
+  ///     true if \a offset is a valid offset and there are \a
+  ///     length bytes available at that offset, false otherwise.
   bool ValidOffsetForDataOfSize(lldb::offset_t offset,
                                 lldb::offset_t length) const {
     return length <= BytesLeft(offset);
@@ -997,6 +991,11 @@
     return {GetDataStart(), size_t(GetByteSize())};
   }
 
+  llvm::DataExtractor GetAsLLVM() const {
+    return {GetData(), GetByteOrder() == lldb::eByteOrderLittle,
+            uint8_t(GetAddressByteSize())};
+  }
+
 protected:
   // Member variables
   const uint8_t *m_start; ///< A pointer to the first byte of data.
diff --git a/src/llvm-project/lldb/include/lldb/Utility/FileCollector.h b/src/llvm-project/lldb/include/lldb/Utility/FileCollector.h
deleted file mode 100644
index a8920674..0000000
--- a/src/llvm-project/lldb/include/lldb/Utility/FileCollector.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//===-- FileCollector.h -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_UTILITY_FILE_COLLECTOR_H
-#define LLDB_UTILITY_FILE_COLLECTOR_H
-
-#include "lldb/Utility/FileSpec.h"
-
-#include "llvm/ADT/SmallVector.h"
-#include "llvm/ADT/StringMap.h"
-#include "llvm/ADT/StringSet.h"
-#include "llvm/ADT/Twine.h"
-#include "llvm/Support/VirtualFileSystem.h"
-
-#include <mutex>
-
-namespace lldb_private {
-
-/// Collects files into a directory and generates a mapping that can be used by
-/// the VFS.
-class FileCollector {
-public:
-  FileCollector(const FileSpec &root, const FileSpec &overlay);
-
-  void AddFile(const llvm::Twine &file);
-  void AddFile(const FileSpec &file) { return AddFile(file.GetPath()); }
-
-  /// Write the yaml mapping (for the VFS) to the given file.
-  std::error_code WriteMapping(const FileSpec &mapping_file);
-
-  /// Copy the files into the root directory.
-  ///
-  /// When stop_on_error is true (the default) we abort as soon as one file
-  /// cannot be copied. This is relatively common, for example when a file was
-  /// removed after it was added to the mapping.
-  std::error_code CopyFiles(bool stop_on_error = true);
-
-protected:
-  void AddFileImpl(llvm::StringRef src_path);
-
-  bool MarkAsSeen(llvm::StringRef path) { return m_seen.insert(path).second; }
-
-  bool GetRealPath(llvm::StringRef src_path,
-                   llvm::SmallVectorImpl<char> &result);
-
-  void AddFileToMapping(llvm::StringRef virtual_path,
-                        llvm::StringRef real_path) {
-    m_vfs_writer.addFileMapping(virtual_path, real_path);
-  }
-
-  /// Synchronizes adding files.
-  std::mutex m_mutex;
-
-  /// The root directory where files are copied.
-  FileSpec m_root;
-
-  /// The root directory where the VFS overlay lives.
-  FileSpec m_overlay_root;
-
-  /// Tracks already seen files so they can be skipped.
-  llvm::StringSet<> m_seen;
-
-  /// The yaml mapping writer.
-  llvm::vfs::YAMLVFSWriter m_vfs_writer;
-
-  /// Caches real_path calls when resolving symlinks.
-  llvm::StringMap<std::string> m_symlink_map;
-};
-
-} // namespace lldb_private
-
-#endif // LLDB_UTILITY_FILE_COLLECTOR_H
diff --git a/src/llvm-project/lldb/include/lldb/Utility/FileSpec.h b/src/llvm-project/lldb/include/lldb/Utility/FileSpec.h
index f0bc5c8..5334266 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/FileSpec.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/FileSpec.h
@@ -73,35 +73,12 @@
   /// \see FileSpec::SetFile (const char *path)
   explicit FileSpec(llvm::StringRef path, Style style = Style::native);
 
-  explicit FileSpec(llvm::StringRef path, const llvm::Triple &Triple);
-
-  /// Copy constructor
-  ///
-  /// Makes a copy of the uniqued directory and filename strings from \a rhs
-  /// if it is not nullptr.
-  ///
-  /// \param[in] rhs
-  ///     A const FileSpec object pointer to copy if non-nullptr.
-  FileSpec(const FileSpec *rhs);
-
-  /// Destructor.
-  ~FileSpec();
+  explicit FileSpec(llvm::StringRef path, const llvm::Triple &triple);
 
   bool DirectoryEquals(const FileSpec &other) const;
 
   bool FileEquals(const FileSpec &other) const;
 
-  /// Assignment operator.
-  ///
-  /// Makes a copy of the uniqued directory and filename strings from \a rhs.
-  ///
-  /// \param[in] rhs
-  ///     A const FileSpec object reference to assign to this object.
-  ///
-  /// \return
-  ///     A const reference to this object.
-  const FileSpec &operator=(const FileSpec &rhs);
-
   /// Equal to operator
   ///
   /// Tests if this object is equal to \a rhs.
@@ -200,14 +177,18 @@
   ///     only the filename will be compared, else a full comparison
   ///     is done.
   ///
-  /// \return
-  ///     \li -1 if \a lhs is less than \a rhs
-  ///     \li 0 if \a lhs is equal to \a rhs
-  ///     \li 1 if \a lhs is greater than \a rhs
+  /// \return -1 if \a lhs is less than \a rhs, 0 if \a lhs is equal to \a rhs,
+  ///     1 if \a lhs is greater than \a rhs
   static int Compare(const FileSpec &lhs, const FileSpec &rhs, bool full);
 
   static bool Equal(const FileSpec &a, const FileSpec &b, bool full);
 
+  /// Match FileSpec \a pattern against FileSpec \a file. If \a pattern has a
+  /// directory component, then the \a file must have the same directory
+  /// component. Otherwise, just it matches just the filename. An empty \a
+  /// pattern matches everything.
+  static bool Match(const FileSpec &pattern, const FileSpec &file);
+
   /// Attempt to guess path style for a given path string. It returns a style,
   /// if it was able to make a reasonable guess, or None if it wasn't. The guess
   /// will be correct if the input path was a valid absolute path on the system
@@ -230,7 +211,7 @@
   ///
   /// \param[in] s
   ///     The stream to which to dump the object description.
-  void Dump(Stream *s) const;
+  void Dump(llvm::raw_ostream &s) const;
 
   Style GetPathStyle() const;
 
@@ -322,10 +303,6 @@
   /// Extract the full path to the file.
   ///
   /// Extract the directory and path into an llvm::SmallVectorImpl<>
-  ///
-  /// \return
-  ///     Returns a std::string with the directory and filename
-  ///     concatenated.
   void GetPath(llvm::SmallVectorImpl<char> &path,
                bool denormalize = true) const;
 
@@ -336,8 +313,7 @@
   /// filename has no extension, ConstString(nullptr) is returned. The dot
   /// ('.') character is not returned as part of the extension
   ///
-  /// \return
-  ///     Returns the extension of the file as a ConstString object.
+  /// \return Returns the extension of the file as a ConstString object.
   ConstString GetFileNameExtension() const;
 
   /// Return the filename without the extension part
@@ -346,9 +322,7 @@
   /// without the extension part (e.g. for a file named "foo.bar", "foo" is
   /// returned)
   ///
-  /// \return
-  ///     Returns the filename without extension
-  ///     as a ConstString object.
+  /// \return Returns the filename without extension as a ConstString object.
   ConstString GetFileNameStrippingExtension() const;
 
   /// Get the memory cost of this object.
@@ -372,12 +346,22 @@
   /// \param[in] path
   ///     A full, partial, or relative path to a file.
   ///
-  /// \param[in] resolve_path
-  ///     If \b true, then we will try to resolve links the path using
-  ///     the static FileSpec::Resolve.
+  /// \param[in] style
+  ///     The style for the given path.
   void SetFile(llvm::StringRef path, Style style);
 
-  void SetFile(llvm::StringRef path, const llvm::Triple &Triple);
+  /// Change the file specified with a new path.
+  ///
+  /// Update the contents of this object with a new path. The path will be
+  /// split up into a directory and filename and stored as uniqued string
+  /// values for quick comparison and efficient memory usage.
+  ///
+  /// \param[in] path
+  ///     A full, partial, or relative path to a file.
+  ///
+  /// \param[in] triple
+  ///     The triple which is used to set the Path style.
+  void SetFile(llvm::StringRef path, const llvm::Triple &triple);
 
   bool IsResolved() const { return m_is_resolved; }
 
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Flags.h b/src/llvm-project/lldb/include/lldb/Utility/Flags.h
index 48b14e7..254a5ec 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Flags.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Flags.h
@@ -33,17 +33,6 @@
   ///     The initial value for all flags.
   Flags(ValueType flags = 0) : m_flags(flags) {}
 
-  /// Copy constructor.
-  ///
-  /// Construct and copy the flags from \a rhs.
-  ///
-  /// \param[in] rhs
-  ///     A const Flags object reference to copy.
-  Flags(const Flags &rhs) : m_flags(rhs.m_flags) {}
-
-  /// Destructor.
-  ~Flags() {}
-
   /// Get accessor for all flags.
   ///
   /// \return
@@ -121,32 +110,6 @@
   ///     \b true if \a bit is 0, \b false otherwise.
   bool IsClear(ValueType bit) const { return (m_flags & bit) == 0; }
 
-  /// Get the number of zero bits in \a m_flags.
-  ///
-  /// \return
-  ///     The number of bits that are set to 0 in the current flags.
-  size_t ClearCount() const {
-    size_t count = 0;
-    for (ValueType shift = 0; shift < sizeof(ValueType) * 8; ++shift) {
-      if ((m_flags & (1u << shift)) == 0)
-        ++count;
-    }
-    return count;
-  }
-
-  /// Get the number of one bits in \a m_flags.
-  ///
-  /// \return
-  ///     The number of bits that are set to 1 in the current flags.
-  size_t SetCount() const {
-    size_t count = 0;
-    for (ValueType mask = m_flags; mask; mask >>= 1) {
-      if (mask & 1u)
-        ++count;
-    }
-    return count;
-  }
-
 protected:
   ValueType m_flags; ///< The flags.
 };
diff --git a/src/llvm-project/lldb/include/lldb/Utility/GDBRemote.h b/src/llvm-project/lldb/include/lldb/Utility/GDBRemote.h
new file mode 100644
index 0000000..21b2c8c
--- /dev/null
+++ b/src/llvm-project/lldb/include/lldb/Utility/GDBRemote.h
@@ -0,0 +1,158 @@
+//===-- GDBRemote.h ----------------------------------------------*- C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_GDBRemote_h_
+#define liblldb_GDBRemote_h_
+
+#include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/Reproducer.h"
+#include "lldb/Utility/StreamString.h"
+#include "lldb/lldb-enumerations.h"
+#include "lldb/lldb-public.h"
+#include "llvm/Support/YAMLTraits.h"
+#include "llvm/Support/raw_ostream.h"
+
+#include <stddef.h>
+#include <stdint.h>
+#include <string>
+#include <vector>
+
+namespace lldb_private {
+
+class StreamGDBRemote : public StreamString {
+public:
+  StreamGDBRemote();
+
+  StreamGDBRemote(uint32_t flags, uint32_t addr_size,
+                  lldb::ByteOrder byte_order);
+
+  ~StreamGDBRemote() override;
+
+  /// Output a block of data to the stream performing GDB-remote escaping.
+  ///
+  /// \param[in] s
+  ///     A block of data.
+  ///
+  /// \param[in] src_len
+  ///     The amount of data to write.
+  ///
+  /// \return
+  ///     Number of bytes written.
+  // TODO: Convert this function to take ArrayRef<uint8_t>
+  int PutEscapedBytes(const void *s, size_t src_len);
+};
+
+/// GDB remote packet as used by the reproducer and the GDB remote
+/// communication history. Packets can be serialized to file.
+struct GDBRemotePacket {
+
+  friend llvm::yaml::MappingTraits<GDBRemotePacket>;
+
+  enum Type { ePacketTypeInvalid = 0, ePacketTypeSend, ePacketTypeRecv };
+
+  GDBRemotePacket()
+      : packet(), type(ePacketTypeInvalid), bytes_transmitted(0), packet_idx(0),
+        tid(LLDB_INVALID_THREAD_ID) {}
+
+  void Clear() {
+    packet.data.clear();
+    type = ePacketTypeInvalid;
+    bytes_transmitted = 0;
+    packet_idx = 0;
+    tid = LLDB_INVALID_THREAD_ID;
+  }
+
+  struct BinaryData {
+    std::string data;
+  };
+
+  void Dump(Stream &strm) const;
+
+  BinaryData packet;
+  Type type;
+  uint32_t bytes_transmitted;
+  uint32_t packet_idx;
+  lldb::tid_t tid;
+
+private:
+  llvm::StringRef GetTypeStr() const;
+};
+
+namespace repro {
+class PacketRecorder : public AbstractRecorder {
+public:
+  PacketRecorder(const FileSpec &filename, std::error_code &ec)
+      : AbstractRecorder(filename, ec) {}
+
+  static llvm::Expected<std::unique_ptr<PacketRecorder>>
+  Create(const FileSpec &filename);
+
+  void Record(const GDBRemotePacket &packet);
+};
+
+class GDBRemoteProvider : public repro::Provider<GDBRemoteProvider> {
+public:
+  struct Info {
+    static const char *name;
+    static const char *file;
+  };
+
+  GDBRemoteProvider(const FileSpec &directory) : Provider(directory) {}
+
+  llvm::raw_ostream *GetHistoryStream();
+  PacketRecorder *GetNewPacketRecorder();
+
+  void SetCallback(std::function<void()> callback) {
+    m_callback = std::move(callback);
+  }
+
+  void Keep() override;
+  void Discard() override;
+
+  static char ID;
+
+private:
+  std::function<void()> m_callback;
+  std::unique_ptr<llvm::raw_fd_ostream> m_stream_up;
+  std::vector<std::unique_ptr<PacketRecorder>> m_packet_recorders;
+};
+
+} // namespace repro
+} // namespace lldb_private
+
+LLVM_YAML_IS_DOCUMENT_LIST_VECTOR(lldb_private::GDBRemotePacket)
+LLVM_YAML_IS_DOCUMENT_LIST_VECTOR(std::vector<lldb_private::GDBRemotePacket>)
+
+namespace llvm {
+namespace yaml {
+
+template <>
+struct ScalarEnumerationTraits<lldb_private::GDBRemotePacket::Type> {
+  static void enumeration(IO &io, lldb_private::GDBRemotePacket::Type &value);
+};
+
+template <> struct ScalarTraits<lldb_private::GDBRemotePacket::BinaryData> {
+  static void output(const lldb_private::GDBRemotePacket::BinaryData &, void *,
+                     raw_ostream &);
+
+  static StringRef input(StringRef, void *,
+                         lldb_private::GDBRemotePacket::BinaryData &);
+
+  static QuotingType mustQuote(StringRef S) { return QuotingType::None; }
+};
+
+template <> struct MappingTraits<lldb_private::GDBRemotePacket> {
+  static void mapping(IO &io, lldb_private::GDBRemotePacket &Packet);
+
+  static StringRef validate(IO &io, lldb_private::GDBRemotePacket &);
+};
+
+} // namespace yaml
+} // namespace llvm
+
+#endif // liblldb_GDBRemote_h_
diff --git a/src/llvm-project/lldb/include/lldb/Utility/IOObject.h b/src/llvm-project/lldb/include/lldb/Utility/IOObject.h
index 1640200..16ed580 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/IOObject.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/IOObject.h
@@ -29,8 +29,7 @@
   typedef int WaitableHandle;
   static const WaitableHandle kInvalidHandleValue;
 
-  IOObject(FDType type, bool should_close)
-      : m_fd_type(type), m_should_close_fd(should_close) {}
+  IOObject(FDType type) : m_fd_type(type) {}
   virtual ~IOObject();
 
   virtual Status Read(void *buf, size_t &num_bytes) = 0;
@@ -44,8 +43,6 @@
 
 protected:
   FDType m_fd_type;
-  bool m_should_close_fd; // True if this class should close the file descriptor
-                          // when it goes away.
 
 private:
   DISALLOW_COPY_AND_ASSIGN(IOObject);
diff --git a/src/llvm-project/lldb/include/lldb/Utility/JSON.h b/src/llvm-project/lldb/include/lldb/Utility/JSON.h
deleted file mode 100644
index 172f77a..0000000
--- a/src/llvm-project/lldb/include/lldb/Utility/JSON.h
+++ /dev/null
@@ -1,283 +0,0 @@
-//===---------------------JSON.h --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef utility_JSON_h_
-#define utility_JSON_h_
-
-#include "lldb/Utility/StringExtractor.h"
-
-#include <map>
-#include <memory>
-#include <string>
-#include <type_traits>
-#include <vector>
-
-#include <stdint.h>
-
-namespace lldb_private {
-class Stream;
-
-class JSONValue {
-public:
-  virtual void Write(Stream &s) = 0;
-
-  typedef std::shared_ptr<JSONValue> SP;
-
-  enum class Kind { String, Number, True, False, Null, Object, Array };
-
-  JSONValue(Kind k) : m_kind(k) {}
-
-  Kind GetKind() const { return m_kind; }
-
-  virtual ~JSONValue() = default;
-
-private:
-  const Kind m_kind;
-};
-
-class JSONString : public JSONValue {
-public:
-  JSONString();
-  JSONString(const char *s);
-  JSONString(const std::string &s);
-
-  JSONString(const JSONString &s) = delete;
-  JSONString &operator=(const JSONString &s) = delete;
-
-  void Write(Stream &s) override;
-
-  typedef std::shared_ptr<JSONString> SP;
-
-  std::string GetData() { return m_data; }
-
-  static bool classof(const JSONValue *V) {
-    return V->GetKind() == JSONValue::Kind::String;
-  }
-
-  ~JSONString() override = default;
-
-private:
-  static std::string json_string_quote_metachars(const std::string &);
-
-  std::string m_data;
-};
-
-class JSONNumber : public JSONValue {
-public:
-  typedef std::shared_ptr<JSONNumber> SP;
-
-  // We cretae a constructor for all integer and floating point type with using
-  // templates and
-  // SFINAE to avoid having ambiguous overloads because of the implicit type
-  // promotion. If we
-  // would have constructors only with int64_t, uint64_t and double types then
-  // constructing a JSONNumber from an int32_t (or any other similar type)
-  // would fail to compile.
-
-  template <typename T, typename std::enable_if<
-                            std::is_integral<T>::value &&
-                            std::is_unsigned<T>::value>::type * = nullptr>
-  explicit JSONNumber(T u)
-      : JSONValue(JSONValue::Kind::Number), m_data_type(DataType::Unsigned) {
-    m_data.m_unsigned = u;
-  }
-
-  template <typename T,
-            typename std::enable_if<std::is_integral<T>::value &&
-                                    std::is_signed<T>::value>::type * = nullptr>
-  explicit JSONNumber(T s)
-      : JSONValue(JSONValue::Kind::Number), m_data_type(DataType::Signed) {
-    m_data.m_signed = s;
-  }
-
-  template <typename T, typename std::enable_if<
-                            std::is_floating_point<T>::value>::type * = nullptr>
-  explicit JSONNumber(T d)
-      : JSONValue(JSONValue::Kind::Number), m_data_type(DataType::Double) {
-    m_data.m_double = d;
-  }
-
-  ~JSONNumber() override = default;
-
-  JSONNumber(const JSONNumber &s) = delete;
-  JSONNumber &operator=(const JSONNumber &s) = delete;
-
-  void Write(Stream &s) override;
-
-  uint64_t GetAsUnsigned() const;
-
-  int64_t GetAsSigned() const;
-
-  double GetAsDouble() const;
-
-  static bool classof(const JSONValue *V) {
-    return V->GetKind() == JSONValue::Kind::Number;
-  }
-
-private:
-  enum class DataType : uint8_t { Unsigned, Signed, Double } m_data_type;
-
-  union {
-    uint64_t m_unsigned;
-    int64_t m_signed;
-    double m_double;
-  } m_data;
-};
-
-class JSONTrue : public JSONValue {
-public:
-  JSONTrue();
-
-  JSONTrue(const JSONTrue &s) = delete;
-  JSONTrue &operator=(const JSONTrue &s) = delete;
-
-  void Write(Stream &s) override;
-
-  typedef std::shared_ptr<JSONTrue> SP;
-
-  static bool classof(const JSONValue *V) {
-    return V->GetKind() == JSONValue::Kind::True;
-  }
-
-  ~JSONTrue() override = default;
-};
-
-class JSONFalse : public JSONValue {
-public:
-  JSONFalse();
-
-  JSONFalse(const JSONFalse &s) = delete;
-  JSONFalse &operator=(const JSONFalse &s) = delete;
-
-  void Write(Stream &s) override;
-
-  typedef std::shared_ptr<JSONFalse> SP;
-
-  static bool classof(const JSONValue *V) {
-    return V->GetKind() == JSONValue::Kind::False;
-  }
-
-  ~JSONFalse() override = default;
-};
-
-class JSONNull : public JSONValue {
-public:
-  JSONNull();
-
-  JSONNull(const JSONNull &s) = delete;
-  JSONNull &operator=(const JSONNull &s) = delete;
-
-  void Write(Stream &s) override;
-
-  typedef std::shared_ptr<JSONNull> SP;
-
-  static bool classof(const JSONValue *V) {
-    return V->GetKind() == JSONValue::Kind::Null;
-  }
-
-  ~JSONNull() override = default;
-};
-
-class JSONObject : public JSONValue {
-public:
-  JSONObject();
-
-  JSONObject(const JSONObject &s) = delete;
-  JSONObject &operator=(const JSONObject &s) = delete;
-
-  void Write(Stream &s) override;
-
-  typedef std::shared_ptr<JSONObject> SP;
-
-  static bool classof(const JSONValue *V) {
-    return V->GetKind() == JSONValue::Kind::Object;
-  }
-
-  bool SetObject(const std::string &key, JSONValue::SP value);
-
-  JSONValue::SP GetObject(const std::string &key);
-
-  ~JSONObject() override = default;
-
-private:
-  typedef std::map<std::string, JSONValue::SP> Map;
-  typedef Map::iterator Iterator;
-  Map m_elements;
-};
-
-class JSONArray : public JSONValue {
-public:
-  JSONArray();
-
-  JSONArray(const JSONArray &s) = delete;
-  JSONArray &operator=(const JSONArray &s) = delete;
-
-  void Write(Stream &s) override;
-
-  typedef std::shared_ptr<JSONArray> SP;
-
-  static bool classof(const JSONValue *V) {
-    return V->GetKind() == JSONValue::Kind::Array;
-  }
-
-private:
-  typedef std::vector<JSONValue::SP> Vector;
-  typedef Vector::iterator Iterator;
-  typedef Vector::size_type Index;
-  typedef Vector::size_type Size;
-
-public:
-  bool SetObject(Index i, JSONValue::SP value);
-
-  bool AppendObject(JSONValue::SP value);
-
-  JSONValue::SP GetObject(Index i);
-
-  Size GetNumElements();
-
-  ~JSONArray() override = default;
-
-  Vector m_elements;
-};
-
-class JSONParser : public StringExtractor {
-public:
-  enum Token {
-    Invalid,
-    Status,
-    ObjectStart,
-    ObjectEnd,
-    ArrayStart,
-    ArrayEnd,
-    Comma,
-    Colon,
-    String,
-    Integer,
-    Float,
-    True,
-    False,
-    Null,
-    EndOfFile
-  };
-
-  JSONParser(llvm::StringRef data);
-
-  int GetEscapedChar(bool &was_escaped);
-
-  Token GetToken(std::string &value);
-
-  JSONValue::SP ParseJSONValue();
-
-protected:
-  JSONValue::SP ParseJSONObject();
-
-  JSONValue::SP ParseJSONArray();
-};
-} // namespace lldb_private
-
-#endif // utility_JSON_h_
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Log.h b/src/llvm-project/lldb/include/lldb/Utility/Log.h
index 949de69..01edec0 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Log.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Log.h
@@ -14,6 +14,7 @@
 #include "lldb/lldb-defines.h"
 
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/Error.h"
@@ -112,6 +113,14 @@
   static bool ListChannelCategories(llvm::StringRef channel,
                                     llvm::raw_ostream &stream);
 
+  /// Returns the list of log channels.
+  static std::vector<llvm::StringRef> ListChannels();
+  /// Calls the given lambda for every category in the given channel.
+  /// If no channel with the given name exists, lambda is never called.
+  static void ForEachChannelCategory(
+      llvm::StringRef channel,
+      llvm::function_ref<void(llvm::StringRef, llvm::StringRef)> lambda);
+
   static void DisableAllLogChannels();
 
   static void ListAllLogChannels(llvm::raw_ostream &stream);
@@ -142,14 +151,11 @@
                          std::forward<Args>(args)...));
   }
 
+  /// Prefer using LLDB_LOGF whenever possible.
   void Printf(const char *format, ...) __attribute__((format(printf, 2, 3)));
 
-  void VAPrintf(const char *format, va_list args);
-
   void Error(const char *fmt, ...) __attribute__((format(printf, 2, 3)));
 
-  void VAError(const char *format, va_list args);
-
   void Verbose(const char *fmt, ...) __attribute__((format(printf, 2, 3)));
 
   void Warning(const char *fmt, ...) __attribute__((format(printf, 2, 3)));
@@ -160,6 +166,9 @@
 
   bool GetVerbose() const;
 
+  void VAPrintf(const char *format, va_list args);
+  void VAError(const char *format, va_list args);
+
 private:
   Channel &m_channel;
 
@@ -193,6 +202,10 @@
   typedef llvm::StringMap<Log> ChannelMap;
   static llvm::ManagedStatic<ChannelMap> g_channel_map;
 
+  static void ForEachCategory(
+      const Log::ChannelMap::value_type &entry,
+      llvm::function_ref<void(llvm::StringRef, llvm::StringRef)> lambda);
+
   static void ListCategories(llvm::raw_ostream &stream,
                              const ChannelMap::value_type &entry);
   static uint32_t GetFlags(llvm::raw_ostream &stream, const ChannelMap::value_type &entry,
@@ -206,6 +219,26 @@
 
 } // namespace lldb_private
 
+/// The LLDB_LOG* macros defined below are the way to emit log messages.
+///
+/// Note that the macros surround the arguments in a check for the log
+/// being on, so you can freely call methods in arguments without affecting
+/// the non-log execution flow.
+///
+/// If you need to do more complex computations to prepare the log message
+/// be sure to add your own if (log) check, since we don't want logging to
+/// have any effect when not on.
+///
+/// However, the LLDB_LOG macro uses the llvm::formatv system (see the
+/// ProgrammersManual page in the llvm docs for more details).  This allows
+/// the use of "format_providers" to auto-format datatypes, and there are
+/// already formatters for some of the llvm and lldb datatypes.
+///
+/// So if you need to do non-trivial formatting of one of these types, be
+/// sure to grep the lldb and llvm sources for "format_provider" to see if
+/// there is already a formatter before doing in situ formatting, and if
+/// possible add a provider if one does not already exist.
+
 #define LLDB_LOG(log, ...)                                                     \
   do {                                                                         \
     ::lldb_private::Log *log_private = (log);                                  \
@@ -213,6 +246,13 @@
       log_private->Format(__FILE__, __func__, __VA_ARGS__);                    \
   } while (0)
 
+#define LLDB_LOGF(log, ...)                                                    \
+  do {                                                                         \
+    ::lldb_private::Log *log_private = (log);                                  \
+    if (log_private)                                                           \
+      log_private->Printf(__VA_ARGS__);                                        \
+  } while (0)
+
 #define LLDB_LOGV(log, ...)                                                    \
   do {                                                                         \
     ::lldb_private::Log *log_private = (log);                                  \
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Logging.h b/src/llvm-project/lldb/include/lldb/Utility/Logging.h
index 41086fe..1a8a102 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Logging.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Logging.h
@@ -54,8 +54,6 @@
 
 class Log;
 
-void LogIfAnyCategoriesSet(uint32_t mask, const char *format, ...);
-
 Log *GetLogIfAllCategoriesSet(uint32_t mask);
 
 Log *GetLogIfAnyCategoriesSet(uint32_t mask);
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Predicate.h b/src/llvm-project/lldb/include/lldb/Utility/Predicate.h
index f1539b5..cbccc3e 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Predicate.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Predicate.h
@@ -117,8 +117,7 @@
   ///     How long to wait for the condition to hold.
   ///
   /// \return
-  ///     \li m_value if Cond(m_value) is true.
-  ///     \li None otherwise (timeout occurred).
+  ///     m_value if Cond(m_value) is true, None otherwise (timeout occurred).
   template <typename C>
   llvm::Optional<T> WaitFor(C Cond, const Timeout<std::micro> &timeout) {
     std::unique_lock<std::mutex> lock(m_mutex);
@@ -151,8 +150,8 @@
   ///     How long to wait for the condition to hold.
   ///
   /// \return
-  ///     \li \b true if the \a m_value is equal to \a value
-  ///     \li \b false otherwise (timeout occurred)
+  ///     true if the \a m_value is equal to \a value, false otherwise (timeout
+  ///     occurred).
   bool WaitForValueEqualTo(T value,
                            const Timeout<std::micro> &timeout = llvm::None) {
     return WaitFor([&value](T current) { return value == current; }, timeout) !=
@@ -179,8 +178,7 @@
   ///     How long to wait for the condition to hold.
   ///
   /// \return
-  ///     \li m_value if m_value != value
-  ///     \li None otherwise (timeout occurred).
+  ///     m_value if m_value != value, None otherwise (timeout occurred).
   llvm::Optional<T>
   WaitForValueNotEqualTo(T value,
                          const Timeout<std::micro> &timeout = llvm::None) {
diff --git a/src/llvm-project/lldb/include/lldb/Utility/ProcessInfo.h b/src/llvm-project/lldb/include/lldb/Utility/ProcessInfo.h
index a25c06c..9188bf3 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/ProcessInfo.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/ProcessInfo.h
@@ -38,7 +38,7 @@
 
   const char *GetName() const;
 
-  size_t GetNameLength() const;
+  llvm::StringRef GetNameAsStringRef() const;
 
   FileSpec &GetExecutableFile() { return m_executable; }
 
@@ -165,12 +165,8 @@
 
   void Append(const ProcessInstanceInfo &info) { m_infos.push_back(info); }
 
-  const char *GetProcessNameAtIndex(size_t idx) {
-    return ((idx < m_infos.size()) ? m_infos[idx].GetName() : nullptr);
-  }
-
-  size_t GetProcessNameLengthAtIndex(size_t idx) {
-    return ((idx < m_infos.size()) ? m_infos[idx].GetNameLength() : 0);
+  llvm::StringRef GetProcessNameAtIndex(size_t idx) {
+    return ((idx < m_infos.size()) ? m_infos[idx].GetNameAsStringRef() : "");
   }
 
   lldb::pid_t GetProcessIDAtIndex(size_t idx) {
@@ -227,8 +223,20 @@
     m_name_match_type = name_match_type;
   }
 
+  /// Return true iff the architecture in this object matches arch_spec.
+  bool ArchitectureMatches(const ArchSpec &arch_spec) const;
+
+  /// Return true iff the process name in this object matches process_name.
   bool NameMatches(const char *process_name) const;
 
+  /// Return true iff the process ID and parent process IDs in this object match
+  /// the ones in proc_info.
+  bool ProcessIDsMatch(const ProcessInstanceInfo &proc_info) const;
+
+  /// Return true iff the (both effective and real) user and group IDs in this
+  /// object match the ones in proc_info.
+  bool UserIDsMatch(const ProcessInstanceInfo &proc_info) const;
+
   bool Matches(const ProcessInstanceInfo &proc_info) const;
 
   bool MatchAllProcesses() const;
diff --git a/src/llvm-project/lldb/include/lldb/Utility/RangeMap.h b/src/llvm-project/lldb/include/lldb/Utility/RangeMap.h
index 36401f5..9e03073 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/RangeMap.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/RangeMap.h
@@ -599,36 +599,17 @@
   RangeData(B base, S size) : Range<B, S>(base, size), data() {}
 
   RangeData(B base, S size, DataType d) : Range<B, S>(base, size), data(d) {}
-
-  bool operator<(const RangeData &rhs) const {
-    if (this->base == rhs.base) {
-      if (this->size == rhs.size)
-        return this->data < rhs.data;
-      else
-        return this->size < rhs.size;
-    }
-    return this->base < rhs.base;
-  }
-
-  bool operator==(const RangeData &rhs) const {
-    return this->GetRangeBase() == rhs.GetRangeBase() &&
-           this->GetByteSize() == rhs.GetByteSize() && this->data == rhs.data;
-  }
-
-  bool operator!=(const RangeData &rhs) const {
-    return this->GetRangeBase() != rhs.GetRangeBase() ||
-           this->GetByteSize() != rhs.GetByteSize() || this->data != rhs.data;
-  }
 };
 
-template <typename B, typename S, typename T, unsigned N = 0>
+template <typename B, typename S, typename T, unsigned N = 0,
+          class Compare = std::less<T>>
 class RangeDataVector {
 public:
   typedef lldb_private::Range<B, S> Range;
   typedef RangeData<B, S, T> Entry;
   typedef llvm::SmallVector<Entry, N> Collection;
 
-  RangeDataVector() = default;
+  RangeDataVector(Compare compare = Compare()) : m_compare(compare) {}
 
   ~RangeDataVector() = default;
 
@@ -636,7 +617,14 @@
 
   void Sort() {
     if (m_entries.size() > 1)
-      std::stable_sort(m_entries.begin(), m_entries.end());
+      std::stable_sort(m_entries.begin(), m_entries.end(),
+                       [&compare = m_compare](const Entry &a, const Entry &b) {
+                         if (a.base != b.base)
+                           return a.base < b.base;
+                         if (a.size != b.size)
+                           return a.size < b.size;
+                         return compare(a.data, b.data);
+                       });
   }
 
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
@@ -724,12 +712,14 @@
 #ifdef ASSERT_RANGEMAP_ARE_SORTED
     assert(IsSorted());
 #endif
-
-    if (!m_entries.empty()) {
-      for (const auto &entry : m_entries) {
-        if (entry.Contains(addr))
-          indexes.push_back(entry.data);
-      }
+    // Search the entries until the first entry that has a larger base address
+    // than `addr`. As m_entries is sorted by their base address, all following
+    // entries can't contain `addr` as their base address is already larger.
+    for (const auto &entry : m_entries) {
+      if (entry.Contains(addr))
+        indexes.push_back(entry.data);
+      else if (entry.GetRangeBase() > addr)
+        break;
     }
     return indexes.size();
   }
@@ -815,6 +805,7 @@
 
 protected:
   Collection m_entries;
+  Compare m_compare;
 };
 
 // A simple range  with data class where you get to define the type of
diff --git a/src/llvm-project/lldb/include/lldb/Utility/RegularExpression.h b/src/llvm-project/lldb/include/lldb/Utility/RegularExpression.h
index 54f3dd8..6acc203 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/RegularExpression.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/RegularExpression.h
@@ -9,189 +9,84 @@
 #ifndef liblldb_RegularExpression_h_
 #define liblldb_RegularExpression_h_
 
-#ifdef _WIN32
-#include "../lib/Support/regex_impl.h"
-
-typedef llvm_regmatch_t regmatch_t;
-typedef llvm_regex_t regex_t;
-
-inline int regcomp(llvm_regex_t *a, const char *b, int c) {
-  return llvm_regcomp(a, b, c);
-}
-
-inline size_t regerror(int a, const llvm_regex_t *b, char *c, size_t d) {
-  return llvm_regerror(a, b, c, d);
-}
-
-inline int regexec(const llvm_regex_t *a, const char *b, size_t c,
-                   llvm_regmatch_t d[], int e) {
-  return llvm_regexec(a, b, c, d, e);
-}
-
-inline void regfree(llvm_regex_t *a) { llvm_regfree(a); }
-#else
-#ifdef __ANDROID__
-#include <regex>
-#endif
-#include <regex.h>
-#endif
-
-#include <string>
-#include <vector>
-
-#include <stddef.h>
-#include <stdint.h>
-
-namespace llvm {
-class StringRef;
-} // namespace llvm
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Error.h"
+#include "llvm/Support/Regex.h"
 
 namespace lldb_private {
 
-/// \class RegularExpression RegularExpression.h
-/// "lldb/Utility/RegularExpression.h"
-/// A C++ wrapper class for regex.
-///
-/// This regular expression class wraps the posix regex functions \c
-/// regcomp(), \c regerror(), \c regexec(), and \c regfree() from the header
-/// file in \c /usr/include/regex\.h.
 class RegularExpression {
 public:
-  class Match {
-  public:
-    Match(uint32_t max_matches) : m_matches() {
-      if (max_matches > 0)
-        m_matches.resize(max_matches + 1);
-    }
-
-    void Clear() {
-      const size_t num_matches = m_matches.size();
-      regmatch_t invalid_match = {-1, -1};
-      for (size_t i = 0; i < num_matches; ++i)
-        m_matches[i] = invalid_match;
-    }
-
-    size_t GetSize() const { return m_matches.size(); }
-
-    regmatch_t *GetData() {
-      return (m_matches.empty() ? nullptr : m_matches.data());
-    }
-
-    bool GetMatchAtIndex(llvm::StringRef s, uint32_t idx,
-                         std::string &match_str) const;
-
-    bool GetMatchAtIndex(llvm::StringRef s, uint32_t idx,
-                         llvm::StringRef &match_str) const;
-
-    bool GetMatchSpanningIndices(llvm::StringRef s, uint32_t idx1,
-                                 uint32_t idx2,
-                                 llvm::StringRef &match_str) const;
-
-  protected:
-    std::vector<regmatch_t>
-        m_matches; ///< Where parenthesized subexpressions results are stored
-  };
-
-  /// Default constructor.
-  ///
   /// The default constructor that initializes the object state such that it
   /// contains no compiled regular expression.
-  RegularExpression();
+  RegularExpression() = default;
 
-  explicit RegularExpression(llvm::StringRef string);
-
-  /// Destructor.
-  ///
-  /// Any previously compiled regular expression contained in this object will
-  /// be freed.
-  ~RegularExpression();
-
-  RegularExpression(const RegularExpression &rhs);
-
-  const RegularExpression &operator=(const RegularExpression &rhs);
-
-  /// Compile a regular expression.
+  /// Constructor for a regular expression.
   ///
   /// Compile a regular expression using the supplied regular expression text.
   /// The compiled regular expression lives in this object so that it can be
   /// readily used for regular expression matches. Execute() can be called
-  /// after the regular expression is compiled. Any previously compiled
-  /// regular expression contained in this object will be freed.
+  /// after the regular expression is compiled.
   ///
-  /// \param[in] re
-  ///     A NULL terminated C string that represents the regular
-  ///     expression to compile.
-  ///
-  /// \return
-  ///     \b true if the regular expression compiles successfully,
-  ///     \b false otherwise.
-  bool Compile(llvm::StringRef string);
-  bool Compile(const char *) = delete;
+  /// \param[in] string
+  ///     An llvm::StringRef that represents the regular expression to compile.
+  //      String is not referenced anymore after the object is constructed.
+  explicit RegularExpression(llvm::StringRef string);
 
-  /// Executes a regular expression.
-  ///
+  ~RegularExpression() = default;
+
+  RegularExpression(const RegularExpression &rhs);
+  RegularExpression(RegularExpression &&rhs) = default;
+
+  RegularExpression &operator=(RegularExpression &&rhs) = default;
+  RegularExpression &operator=(const RegularExpression &rhs) = default;
+
   /// Execute a regular expression match using the compiled regular expression
-  /// that is already in this object against the match string \a s. If any
-  /// parens are used for regular expression matches \a match_count should
-  /// indicate the number of regmatch_t values that are present in \a
-  /// match_ptr.
+  /// that is already in this object against the given \a string. If any parens
+  /// are used for regular expression matches.
   ///
   /// \param[in] string
   ///     The string to match against the compile regular expression.
   ///
-  /// \param[in] match
-  ///     A pointer to a RegularExpression::Match structure that was
-  ///     properly initialized with the desired number of maximum
-  ///     matches, or nullptr if no parenthesized matching is needed.
+  /// \param[out] matches
+  ///     A pointer to a SmallVector to hold the matches.
   ///
   /// \return
-  ///     \b true if \a string matches the compiled regular
-  ///     expression, \b false otherwise.
-  bool Execute(llvm::StringRef string, Match *match = nullptr) const;
-  bool Execute(const char *, Match * = nullptr) = delete;
-
-  size_t GetErrorAsCString(char *err_str, size_t err_str_max_len) const;
-
-  /// Free the compiled regular expression.
-  ///
-  /// If this object contains a valid compiled regular expression, this
-  /// function will free any resources it was consuming.
-  void Free();
+  ///     true if \a string matches the compiled regular expression, false
+  ///     otherwise incl. the case regular exression failed to compile.
+  bool Execute(llvm::StringRef string,
+               llvm::SmallVectorImpl<llvm::StringRef> *matches = nullptr) const;
 
   /// Access the regular expression text.
   ///
-  /// Returns the text that was used to compile the current regular
-  /// expression.
-  ///
   /// \return
   ///     The NULL terminated C string that was used to compile the
   ///     current regular expression
   llvm::StringRef GetText() const;
 
-  /// Test if valid.
-  ///
   /// Test if this object contains a valid regular expression.
   ///
   /// \return
-  ///     \b true if the regular expression compiled and is ready
-  ///     for execution, \b false otherwise.
+  ///     true if the regular expression compiled and is ready for execution,
+  ///     false otherwise.
   bool IsValid() const;
 
-  void Clear() {
-    Free();
-    m_re.clear();
-    m_comp_err = 1;
+  /// Return an error if the regular expression failed to compile.
+  ///
+  /// \return
+  ///     A string error if the regular expression failed to compile, success
+  ///     otherwise.
+  llvm::Error GetError() const;
+
+  bool operator==(const RegularExpression &rhs) const {
+    return GetText() == rhs.GetText();
   }
 
-  int GetErrorCode() const { return m_comp_err; }
-
-  bool operator<(const RegularExpression &rhs) const;
-
 private:
-  // Member variables
-  std::string m_re; ///< A copy of the original regular expression text
-  int m_comp_err;   ///< Status code for the regular expression compilation
-  regex_t m_preg;   ///< The compiled regular expression
+  /// A copy of the original regular expression text.
+  std::string m_regex_text;
+  /// The compiled regular expression.
+  mutable llvm::Regex m_regex;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Reproducer.h b/src/llvm-project/lldb/include/lldb/Utility/Reproducer.h
index 670041d..0d23fe8 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Reproducer.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Reproducer.h
@@ -9,11 +9,10 @@
 #ifndef LLDB_UTILITY_REPRODUCER_H
 #define LLDB_UTILITY_REPRODUCER_H
 
-#include "lldb/Utility/FileCollector.h"
 #include "lldb/Utility/FileSpec.h"
-
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/Support/Error.h"
+#include "llvm/Support/FileCollector.h"
 #include "llvm/Support/YAMLTraits.h"
 
 #include <mutex>
@@ -91,23 +90,26 @@
 
   FileProvider(const FileSpec &directory)
       : Provider(directory),
-        m_collector(directory.CopyByAppendingPathComponent("root"), directory) {
-  }
+        m_collector(std::make_shared<llvm::FileCollector>(
+            directory.CopyByAppendingPathComponent("root").GetPath(),
+            directory.GetPath())) {}
 
-  FileCollector &GetFileCollector() { return m_collector; }
+  std::shared_ptr<llvm::FileCollector> GetFileCollector() {
+    return m_collector;
+  }
 
   void Keep() override {
     auto mapping = GetRoot().CopyByAppendingPathComponent(Info::file);
     // Temporary files that are removed during execution can cause copy errors.
-    if (auto ec = m_collector.CopyFiles(/*stop_on_error=*/false))
+    if (auto ec = m_collector->copyFiles(/*stop_on_error=*/false))
       return;
-    m_collector.WriteMapping(mapping);
+    m_collector->writeMapping(mapping.GetPath());
   }
 
   static char ID;
 
 private:
-  FileCollector m_collector;
+  std::shared_ptr<llvm::FileCollector> m_collector;
 };
 
 /// Provider for the LLDB version number.
@@ -130,11 +132,53 @@
   static char ID;
 };
 
-class DataRecorder {
+/// Provider for the LLDB current working directroy.
+///
+/// When the reproducer is kept, it writes lldb's current working directory to
+/// a file named cwd.txt in the reproducer root.
+class WorkingDirectoryProvider : public Provider<WorkingDirectoryProvider> {
+public:
+  WorkingDirectoryProvider(const FileSpec &directory) : Provider(directory) {
+    llvm::SmallString<128> cwd;
+    if (std::error_code EC = llvm::sys::fs::current_path(cwd))
+      return;
+    m_cwd = cwd.str();
+  }
+  struct Info {
+    static const char *name;
+    static const char *file;
+  };
+  void Keep() override;
+  std::string m_cwd;
+  static char ID;
+};
+
+class AbstractRecorder {
+protected:
+  AbstractRecorder(const FileSpec &filename, std::error_code &ec)
+      : m_filename(filename.GetFilename().GetStringRef()),
+        m_os(filename.GetPath(), ec, llvm::sys::fs::OF_Text), m_record(true) {}
+
+public:
+  const FileSpec &GetFilename() { return m_filename; }
+
+  void Stop() {
+    assert(m_record);
+    m_record = false;
+  }
+
+private:
+  FileSpec m_filename;
+
+protected:
+  llvm::raw_fd_ostream m_os;
+  bool m_record;
+};
+
+class DataRecorder : public AbstractRecorder {
 public:
   DataRecorder(const FileSpec &filename, std::error_code &ec)
-      : m_filename(filename.GetFilename().GetStringRef()),
-        m_os(filename.GetPath(), ec, llvm::sys::fs::F_Text), m_record(true) {}
+      : AbstractRecorder(filename, ec) {}
 
   static llvm::Expected<std::unique_ptr<DataRecorder>>
   Create(const FileSpec &filename);
@@ -147,18 +191,6 @@
       m_os << '\n';
     m_os.flush();
   }
-
-  const FileSpec &GetFilename() { return m_filename; }
-
-  void Stop() {
-    assert(m_record);
-    m_record = false;
-  }
-
-private:
-  FileSpec m_filename;
-  llvm::raw_fd_ostream m_os;
-  bool m_record;
 };
 
 class CommandProvider : public Provider<CommandProvider> {
@@ -185,8 +217,9 @@
 /// reproducer. For doing so it relies on providers, who serialize data that
 /// is necessary for reproducing  a failure.
 class Generator final {
+
 public:
-  Generator(const FileSpec &root);
+  Generator(FileSpec root);
   ~Generator();
 
   /// Method to indicate we want to keep the reproducer. If reproducer
@@ -200,7 +233,7 @@
 
   /// Create and register a new provider.
   template <typename T> T *Create() {
-    std::unique_ptr<ProviderBase> provider = llvm::make_unique<T>(m_root);
+    std::unique_ptr<ProviderBase> provider = std::make_unique<T>(m_root);
     return static_cast<T *>(Register(std::move(provider)));
   }
 
@@ -238,12 +271,12 @@
   FileSpec m_root;
 
   /// Flag to ensure that we never call both keep and discard.
-  bool m_done;
+  bool m_done = false;
 };
 
 class Loader final {
 public:
-  Loader(const FileSpec &root);
+  Loader(FileSpec root);
 
   template <typename T> FileSpec GetFile() {
     if (!HasFile(T::file))
@@ -252,6 +285,15 @@
     return GetRoot().CopyByAppendingPathComponent(T::file);
   }
 
+  template <typename T> llvm::Expected<std::string> LoadBuffer() {
+    FileSpec file = GetFile<typename T::Info>();
+    llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> buffer =
+        llvm::vfs::getRealFileSystem()->getBufferForFile(file.GetPath());
+    if (!buffer)
+      return llvm::errorCodeToError(buffer.getError());
+    return (*buffer)->getBuffer().str();
+  }
+
   llvm::Error LoadIndex();
 
   const FileSpec &GetRoot() const { return m_root; }
@@ -284,6 +326,9 @@
 
   FileSpec GetReproducerPath() const;
 
+  bool IsCapturing() { return static_cast<bool>(m_generator); };
+  bool IsReplaying() { return static_cast<bool>(m_loader); };
+
 protected:
   llvm::Error SetCapture(llvm::Optional<FileSpec> root);
   llvm::Error SetReplay(llvm::Optional<FileSpec> root);
@@ -297,6 +342,49 @@
   mutable std::mutex m_mutex;
 };
 
+template <typename T> class MultiLoader {
+public:
+  MultiLoader(std::vector<std::string> files) : m_files(files) {}
+
+  static std::unique_ptr<MultiLoader> Create(Loader *loader) {
+    if (!loader)
+      return {};
+
+    FileSpec file = loader->GetFile<typename T::Info>();
+    if (!file)
+      return {};
+
+    auto error_or_file = llvm::MemoryBuffer::getFile(file.GetPath());
+    if (auto err = error_or_file.getError())
+      return {};
+
+    std::vector<std::string> files;
+    llvm::yaml::Input yin((*error_or_file)->getBuffer());
+    yin >> files;
+
+    if (auto err = yin.error())
+      return {};
+
+    for (auto &file : files) {
+      FileSpec absolute_path =
+          loader->GetRoot().CopyByAppendingPathComponent(file);
+      file = absolute_path.GetPath();
+    }
+
+    return std::make_unique<MultiLoader<T>>(std::move(files));
+  }
+
+  llvm::Optional<std::string> GetNextFile() {
+    if (m_index >= m_files.size())
+      return {};
+    return m_files[m_index++];
+  }
+
+private:
+  std::vector<std::string> m_files;
+  unsigned m_index = 0;
+};
+
 } // namespace repro
 } // namespace lldb_private
 
diff --git a/src/llvm-project/lldb/include/lldb/Utility/ReproducerInstrumentation.h b/src/llvm-project/lldb/include/lldb/Utility/ReproducerInstrumentation.h
index f90ce4b..75d6604 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/ReproducerInstrumentation.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/ReproducerInstrumentation.h
@@ -40,7 +40,7 @@
 template <>
 inline void stringify_append<char>(llvm::raw_string_ostream &ss,
                                    const char *t) {
-  ss << t;
+  ss << '\"' << t << '\"';
 }
 
 template <typename Head>
@@ -105,8 +105,8 @@
   }
 
 #define LLDB_RECORD_METHOD(Result, Class, Method, Signature, ...)              \
-  lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION,              \
-                                            stringify_args(__VA_ARGS__));      \
+  lldb_private::repro::Recorder sb_recorder(                                   \
+      LLVM_PRETTY_FUNCTION, stringify_args(*this, __VA_ARGS__));               \
   if (lldb_private::repro::InstrumentationData data =                          \
           LLDB_GET_INSTRUMENTATION_DATA()) {                                   \
     sb_recorder.Record(                                                        \
@@ -117,8 +117,8 @@
   }
 
 #define LLDB_RECORD_METHOD_CONST(Result, Class, Method, Signature, ...)        \
-  lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION,              \
-                                            stringify_args(__VA_ARGS__));      \
+  lldb_private::repro::Recorder sb_recorder(                                   \
+      LLVM_PRETTY_FUNCTION, stringify_args(*this, __VA_ARGS__));               \
   if (lldb_private::repro::InstrumentationData data =                          \
           LLDB_GET_INSTRUMENTATION_DATA()) {                                   \
     sb_recorder.Record(                                                        \
@@ -129,7 +129,8 @@
   }
 
 #define LLDB_RECORD_METHOD_NO_ARGS(Result, Class, Method)                      \
-  lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION);             \
+  lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION,              \
+                                            stringify_args(*this));            \
   if (lldb_private::repro::InstrumentationData data =                          \
           LLDB_GET_INSTRUMENTATION_DATA()) {                                   \
     sb_recorder.Record(data.GetSerializer(), data.GetRegistry(),               \
@@ -139,7 +140,8 @@
   }
 
 #define LLDB_RECORD_METHOD_CONST_NO_ARGS(Result, Class, Method)                \
-  lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION);             \
+  lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION,              \
+                                            stringify_args(*this));            \
   if (lldb_private::repro::InstrumentationData data =                          \
           LLDB_GET_INSTRUMENTATION_DATA()) {                                   \
     sb_recorder.Record(                                                        \
@@ -175,6 +177,8 @@
 #define LLDB_RECORD_DUMMY(Result, Class, Method, Signature, ...)               \
   lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION,              \
                                             stringify_args(__VA_ARGS__));
+#define LLDB_RECORD_DUMMY_NO_ARGS(Result, Class, Method)                       \
+  lldb_private::repro::Recorder sb_recorder(LLVM_PRETTY_FUNCTION);
 
 namespace lldb_private {
 namespace repro {
@@ -234,9 +238,12 @@
 struct ValueTag {};
 struct FundamentalPointerTag {};
 struct FundamentalReferenceTag {};
+struct NotImplementedTag {};
 
 /// Return the deserialization tag for the given type T.
-template <class T> struct serializer_tag { typedef ValueTag type; };
+template <class T> struct serializer_tag {
+  typedef typename std::conditional<std::is_trivially_copyable<T>::value, ValueTag, NotImplementedTag>::type type;
+};
 template <class T> struct serializer_tag<T *> {
   typedef
       typename std::conditional<std::is_fundamental<T>::value,
@@ -300,6 +307,11 @@
   }
 
 private:
+  template <typename T> T Read(NotImplementedTag) {
+    m_buffer = m_buffer.drop_front(sizeof(T));
+    return T();
+  }
+
   template <typename T> T Read(ValueTag) {
     assert(HasData(sizeof(T)));
     T t;
@@ -442,7 +454,7 @@
   void Register(Signature *f, llvm::StringRef result = {},
                 llvm::StringRef scope = {}, llvm::StringRef name = {},
                 llvm::StringRef args = {}) {
-    DoRegister(uintptr_t(f), llvm::make_unique<DefaultReplayer<Signature>>(f),
+    DoRegister(uintptr_t(f), std::make_unique<DefaultReplayer<Signature>>(f),
                SignatureStr(result, scope, name, args));
   }
 
@@ -452,7 +464,7 @@
   void Register(Signature *f, Signature *g, llvm::StringRef result = {},
                 llvm::StringRef scope = {}, llvm::StringRef name = {},
                 llvm::StringRef args = {}) {
-    DoRegister(uintptr_t(f), llvm::make_unique<DefaultReplayer<Signature>>(g),
+    DoRegister(uintptr_t(f), std::make_unique<DefaultReplayer<Signature>>(g),
                SignatureStr(result, scope, name, args));
   }
 
@@ -542,9 +554,7 @@
     SerializeAll(tail...);
   }
 
-  void SerializeAll() {
-    m_stream.flush();
-  }
+  void SerializeAll() { m_stream.flush(); }
 
 private:
   /// Serialize pointers. We need to differentiate between pointers to
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Scalar.h b/src/llvm-project/lldb/include/lldb/Utility/Scalar.h
index 62ee9f6..69c948e 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Scalar.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Scalar.h
@@ -38,6 +38,7 @@
 // follows the ANSI C type promotion rules.
 class Scalar {
 public:
+  // FIXME: These are host types which seems to be an odd choice.
   enum Type {
     e_void = 0,
     e_sint,
@@ -98,30 +99,14 @@
   }
   Scalar(llvm::APInt v) : m_type(), m_float(static_cast<float>(0)) {
     m_integer = llvm::APInt(v);
-    switch (m_integer.getBitWidth()) {
-    case 8:
-    case 16:
-    case 32:
-      m_type = e_sint;
-      return;
-    case 64:
-      m_type = e_slonglong;
-      return;
-    case 128:
-      m_type = e_sint128;
-      return;
-    case 256:
-      m_type = e_sint256;
-      return;
-    case 512:
-      m_type = e_sint512;
-      return;
-    }
-    lldbassert(false && "unsupported bitwidth");
+    m_type = GetBestTypeForBitSize(m_integer.getBitWidth(), true);
   }
   // Scalar(const RegisterValue& reg_value);
   virtual ~Scalar();
 
+  /// Return the most efficient Scalar::Type for the requested bit size.
+  static Type GetBestTypeForBitSize(size_t bit_size, bool sign);
+
   bool SignExtend(uint32_t bit_pos);
 
   bool ExtractBitfield(uint32_t bit_size, uint32_t bit_offset);
@@ -154,6 +139,9 @@
     return (m_type >= e_sint) && (m_type <= e_long_double);
   }
 
+  /// Convert integer to \p type, limited to \p bits size.
+  void TruncOrExtendTo(Scalar::Type type, uint16_t bits);
+
   bool Promote(Scalar::Type type);
 
   bool MakeSigned();
@@ -184,7 +172,6 @@
   Scalar &operator=(double v);
   Scalar &operator=(long double v);
   Scalar &operator=(llvm::APInt v);
-  Scalar &operator=(const Scalar &rhs); // Assignment operator
   Scalar &operator+=(const Scalar &rhs);
   Scalar &operator<<=(const Scalar &rhs); // Shift left
   Scalar &operator>>=(const Scalar &rhs); // Shift right (arithmetic)
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Status.h b/src/llvm-project/lldb/include/lldb/Utility/Status.h
index ae730b9..36f5292 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Status.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Status.h
@@ -47,8 +47,8 @@
   /// into ValueType.
   typedef uint32_t ValueType;
 
-  /// Default constructor.
-  ///
+  Status();
+
   /// Initialize the error object with a generic success value.
   ///
   /// \param[in] err
@@ -56,25 +56,14 @@
   ///
   /// \param[in] type
   ///     The type for \a err.
-  Status();
-
   explicit Status(ValueType err,
                   lldb::ErrorType type = lldb::eErrorTypeGeneric);
 
-  /* implicit */ Status(std::error_code EC);
+  Status(std::error_code EC);
 
   explicit Status(const char *format, ...)
       __attribute__((format(printf, 2, 3)));
 
-  /// Assignment operator.
-  ///
-  /// \param[in] err
-  ///     An error code.
-  ///
-  /// \return
-  ///     A const reference to this object.
-  const Status &operator=(const Status &rhs);
-
   ~Status();
 
   // llvm::Error support
@@ -221,4 +210,11 @@
 };
 }
 
+#define LLDB_ERRORF(status, fmt, ...)                                          \
+  do {                                                                         \
+    if (status) {                                                              \
+      (status)->SetErrorStringWithFormat((fmt), __VA_ARGS__);                  \
+    }                                                                          \
+  } while (0);
+
 #endif // #ifndef LLDB_UTILITY_STATUS_H
diff --git a/src/llvm-project/lldb/include/lldb/Utility/Stream.h b/src/llvm-project/lldb/include/lldb/Utility/Stream.h
index b24d4e4..18a16a3 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/Stream.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/Stream.h
@@ -35,11 +35,11 @@
 
   /// Utility class for counting the bytes that were written to a stream in a
   /// certain time span.
+  ///
   /// \example
   ///   ByteDelta delta(*this);
   ///   WriteDataToStream("foo");
   ///   return *delta;
-  /// \endcode
   class ByteDelta {
     Stream *m_stream;
     /// Bytes we have written so far when ByteDelta was created.
@@ -213,126 +213,14 @@
   ///     in one statement.
   Stream &operator<<(char ch);
 
-  /// Output a uint8_t \a uval to the stream \a s.
-  ///
-  /// \param[in] uval
-  ///     A uint8_t value.
-  ///
-  /// \return
-  ///     A reference to this class so multiple things can be streamed
-  ///     in one statement.
-  Stream &operator<<(uint8_t uval);
-
-  /// Output a uint16_t \a uval to the stream \a s.
-  ///
-  /// \param[in] uval
-  ///     A uint16_t value.
-  ///
-  /// \return
-  ///     A reference to this class so multiple things can be streamed
-  ///     in one statement.
-  Stream &operator<<(uint16_t uval);
-
-  /// Output a uint32_t \a uval to the stream \a s.
-  ///
-  /// \param[in] uval
-  ///     A uint32_t value.
-  ///
-  /// \return
-  ///     A reference to this class so multiple things can be streamed
-  ///     in one statement.
-  Stream &operator<<(uint32_t uval);
-
-  /// Output a uint64_t \a uval to the stream \a s.
-  ///
-  /// \param[in] uval
-  ///     A uint64_t value.
-  ///
-  /// \return
-  ///     A reference to this class so multiple things can be streamed
-  ///     in one statement.
-  Stream &operator<<(uint64_t uval);
-
-  /// Output a int8_t \a sval to the stream \a s.
-  ///
-  /// \param[in] sval
-  ///     A int8_t value.
-  ///
-  /// \return
-  ///     A reference to this class so multiple things can be streamed
-  ///     in one statement.
-  Stream &operator<<(int8_t sval);
-
-  /// Output a int16_t \a sval to the stream \a s.
-  ///
-  /// \param[in] sval
-  ///     A int16_t value.
-  ///
-  /// \return
-  ///     A reference to this class so multiple things can be streamed
-  ///     in one statement.
-  Stream &operator<<(int16_t sval);
-
-  /// Output a int32_t \a sval to the stream \a s.
-  ///
-  /// \param[in] sval
-  ///     A int32_t value.
-  ///
-  /// \return
-  ///     A reference to this class so multiple things can be streamed
-  ///     in one statement.
-  Stream &operator<<(int32_t sval);
-
-  /// Output a int64_t \a sval to the stream \a s.
-  ///
-  /// \param[in] sval
-  ///     A int64_t value.
-  ///
-  /// \return
-  ///     A reference to this class so multiple things can be streamed
-  ///     in one statement.
-  Stream &operator<<(int64_t sval);
-
-  /// Output an address value to this stream.
-  ///
-  /// Put an address \a addr out to the stream with optional \a prefix and \a
-  /// suffix strings.
-  ///
-  /// \param[in] addr
-  ///     An address value.
-  ///
-  /// \param[in] addr_size
-  ///     Size in bytes of the address, used for formatting.
-  ///
-  /// \param[in] prefix
-  ///     A prefix C string. If nullptr, no prefix will be output.
-  ///
-  /// \param[in] suffix
-  ///     A suffix C string. If nullptr, no suffix will be output.
-  void Address(uint64_t addr, uint32_t addr_size, const char *prefix = nullptr,
-               const char *suffix = nullptr);
-
-  /// Output an address range to this stream.
-  ///
-  /// Put an address range \a lo_addr - \a hi_addr out to the stream with
-  /// optional \a prefix and \a suffix strings.
-  ///
-  /// \param[in] lo_addr
-  ///     The start address of the address range.
-  ///
-  /// \param[in] hi_addr
-  ///     The end address of the address range.
-  ///
-  /// \param[in] addr_size
-  ///     Size in bytes of the address, used for formatting.
-  ///
-  /// \param[in] prefix
-  ///     A prefix C string. If nullptr, no prefix will be output.
-  ///
-  /// \param[in] suffix
-  ///     A suffix C string. If nullptr, no suffix will be output.
-  void AddressRange(uint64_t lo_addr, uint64_t hi_addr, uint32_t addr_size,
-                    const char *prefix = nullptr, const char *suffix = nullptr);
+  Stream &operator<<(uint8_t uval) = delete;
+  Stream &operator<<(uint16_t uval) = delete;
+  Stream &operator<<(uint32_t uval) = delete;
+  Stream &operator<<(uint64_t uval) = delete;
+  Stream &operator<<(int8_t sval) = delete;
+  Stream &operator<<(int16_t sval) = delete;
+  Stream &operator<<(int32_t sval) = delete;
+  Stream &operator<<(int64_t sval) = delete;
 
   /// Output a C string to the stream.
   ///
@@ -373,8 +261,8 @@
   /// Get the current indentation level.
   ///
   /// \return
-  ///     The current indentation level as an integer.
-  int GetIndentLevel() const;
+  ///     The current indentation level.
+  unsigned GetIndentLevel() const;
 
   /// Indent the current line in the stream.
   ///
@@ -388,10 +276,10 @@
   size_t Indent(llvm::StringRef s);
 
   /// Decrement the current indentation level.
-  void IndentLess(int amount = 2);
+  void IndentLess(unsigned amount = 2);
 
   /// Increment the current indentation level.
-  void IndentMore(int amount = 2);
+  void IndentMore(unsigned amount = 2);
 
   /// Output an offset value.
   ///
@@ -446,7 +334,7 @@
   ///
   /// \param[in] level
   ///     The new indentation level.
-  void SetIndentLevel(int level);
+  void SetIndentLevel(unsigned level);
 
   /// Output a SLEB128 number to the stream.
   ///
@@ -477,7 +365,7 @@
   uint32_t m_addr_size; ///< Size of an address in bytes.
   lldb::ByteOrder
       m_byte_order;   ///< Byte order to use when encoding scalar types.
-  int m_indent_level; ///< Indention level.
+  unsigned m_indent_level;         ///< Indention level.
   std::size_t m_bytes_written = 0; ///< Number of bytes written so far.
 
   void _PutHex8(uint8_t uvalue, bool add_prefix);
@@ -523,6 +411,54 @@
   RawOstreamForward m_forwarder;
 };
 
+/// Output an address value to this stream.
+///
+/// Put an address \a addr out to the stream with optional \a prefix and \a
+/// suffix strings.
+///
+/// \param[in] s
+///     The output stream.
+///
+/// \param[in] addr
+///     An address value.
+///
+/// \param[in] addr_size
+///     Size in bytes of the address, used for formatting.
+///
+/// \param[in] prefix
+///     A prefix C string. If nullptr, no prefix will be output.
+///
+/// \param[in] suffix
+///     A suffix C string. If nullptr, no suffix will be output.
+void DumpAddress(llvm::raw_ostream &s, uint64_t addr, uint32_t addr_size,
+                 const char *prefix = nullptr, const char *suffix = nullptr);
+
+/// Output an address range to this stream.
+///
+/// Put an address range \a lo_addr - \a hi_addr out to the stream with
+/// optional \a prefix and \a suffix strings.
+///
+/// \param[in] s
+///     The output stream.
+///
+/// \param[in] lo_addr
+///     The start address of the address range.
+///
+/// \param[in] hi_addr
+///     The end address of the address range.
+///
+/// \param[in] addr_size
+///     Size in bytes of the address, used for formatting.
+///
+/// \param[in] prefix
+///     A prefix C string. If nullptr, no prefix will be output.
+///
+/// \param[in] suffix
+///     A suffix C string. If nullptr, no suffix will be output.
+void DumpAddressRange(llvm::raw_ostream &s, uint64_t lo_addr, uint64_t hi_addr,
+                      uint32_t addr_size, const char *prefix = nullptr,
+                      const char *suffix = nullptr);
+
 } // namespace lldb_private
 
 #endif // liblldb_Stream_h_
diff --git a/src/llvm-project/lldb/include/lldb/Utility/StreamGDBRemote.h b/src/llvm-project/lldb/include/lldb/Utility/StreamGDBRemote.h
deleted file mode 100644
index dd0ea31..0000000
--- a/src/llvm-project/lldb/include/lldb/Utility/StreamGDBRemote.h
+++ /dev/null
@@ -1,45 +0,0 @@
-//===-- StreamGDBRemote.h ----------------------------------------*- C++-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_StreamGDBRemote_h_
-#define liblldb_StreamGDBRemote_h_
-
-#include "lldb/Utility/StreamString.h"
-#include "lldb/lldb-enumerations.h"
-
-#include <stddef.h>
-#include <stdint.h>
-
-namespace lldb_private {
-
-class StreamGDBRemote : public StreamString {
-public:
-  StreamGDBRemote();
-
-  StreamGDBRemote(uint32_t flags, uint32_t addr_size,
-                  lldb::ByteOrder byte_order);
-
-  ~StreamGDBRemote() override;
-
-  /// Output a block of data to the stream performing GDB-remote escaping.
-  ///
-  /// \param[in] s
-  ///     A block of data.
-  ///
-  /// \param[in] src_len
-  ///     The amount of data to write.
-  ///
-  /// \return
-  ///     Number of bytes written.
-  // TODO: Convert this function to take ArrayRef<uint8_t>
-  int PutEscapedBytes(const void *s, size_t src_len);
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_StreamGDBRemote_h_
diff --git a/src/llvm-project/lldb/include/lldb/Utility/StringExtractor.h b/src/llvm-project/lldb/include/lldb/Utility/StringExtractor.h
index f20ec92..293fef2 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/StringExtractor.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/StringExtractor.h
@@ -45,9 +45,7 @@
 
   void SkipSpaces();
 
-  std::string &GetStringRef() { return m_packet; }
-
-  const std::string &GetStringRef() const { return m_packet; }
+  llvm::StringRef GetStringRef() const { return m_packet; }
 
   bool Empty() { return m_packet.empty(); }
 
@@ -91,9 +89,6 @@
 
   size_t GetHexBytesAvail(llvm::MutableArrayRef<uint8_t> dest);
 
-  uint64_t GetHexWithFixedSize(uint32_t byte_size, bool little_endian,
-                               uint64_t fail_value);
-
   size_t GetHexByteString(std::string &str);
 
   size_t GetHexByteStringFixedLength(std::string &str, uint32_t nibble_length);
@@ -113,12 +108,14 @@
     m_index = UINT64_MAX;
     return false;
   }
-  // For StringExtractor only
-  std::string m_packet; // The string in which to extract data.
-  uint64_t m_index;     // When extracting data from a packet, this index
-                        // will march along as things get extracted. If set to
-                        // UINT64_MAX the end of the packet data was reached
-                        // when decoding information
+
+  /// The string in which to extract data.
+  std::string m_packet;
+
+  /// When extracting data from a packet, this index will march along as things
+  /// get extracted. If set to UINT64_MAX the end of the packet data was
+  /// reached when decoding information.
+  uint64_t m_index;
 };
 
 #endif // utility_StringExtractor_h_
diff --git a/src/llvm-project/lldb/include/lldb/Utility/StringExtractorGDBRemote.h b/src/llvm-project/lldb/include/lldb/Utility/StringExtractorGDBRemote.h
index cbf6e0c..715f3cb 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/StringExtractorGDBRemote.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/StringExtractorGDBRemote.h
@@ -31,11 +31,6 @@
   StringExtractorGDBRemote(const char *cstr)
       : StringExtractor(cstr), m_validator(nullptr) {}
 
-  StringExtractorGDBRemote(const StringExtractorGDBRemote &rhs)
-      : StringExtractor(rhs), m_validator(rhs.m_validator) {}
-
-  ~StringExtractorGDBRemote() override {}
-
   bool ValidateResponse() const;
 
   void CopyResponseValidator(const StringExtractorGDBRemote &rhs);
diff --git a/src/llvm-project/lldb/include/lldb/Utility/StringLexer.h b/src/llvm-project/lldb/include/lldb/Utility/StringLexer.h
index d9806c1..533fd4f 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/StringLexer.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/StringLexer.h
@@ -1,4 +1,4 @@
-//===--------------------- StringLexer.h ------------------------*- C++ -*-===//
+//===-- StringLexer.h -------------------------------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -13,7 +13,7 @@
 #include <string>
 #include <utility>
 
-namespace lldb_utility {
+namespace lldb_private {
 
 class StringLexer {
 public:
diff --git a/src/llvm-project/lldb/include/lldb/Utility/StringList.h b/src/llvm-project/lldb/include/lldb/Utility/StringList.h
index 68c1f87..0b1d955 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/StringList.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/StringList.h
@@ -23,6 +23,8 @@
 namespace lldb_private {
 
 class StringList {
+  typedef std::vector<std::string> collection;
+
 public:
   StringList();
 
@@ -52,6 +54,14 @@
 
   size_t GetMaxStringLength() const;
 
+  typedef collection::iterator iterator;
+  typedef collection::const_iterator const_iterator;
+
+  iterator begin() { return m_strings.begin(); }
+  iterator end() { return m_strings.end(); }
+  const_iterator begin() const { return m_strings.begin(); }
+  const_iterator end() const { return m_strings.end(); }
+
   std::string &operator[](size_t idx) {
     // No bounds checking, verify "idx" is good prior to calling this function
     return m_strings[idx];
@@ -69,7 +79,7 @@
 
   void Clear();
 
-  void LongestCommonPrefix(std::string &common_prefix);
+  std::string LongestCommonPrefix();
 
   void InsertStringAtIndex(size_t idx, const std::string &str);
 
@@ -97,14 +107,6 @@
   // Copy assignment for a vector of strings
   StringList &operator=(const std::vector<std::string> &rhs);
 
-  // This string list contains a list of valid auto completion strings, and the
-  // "s" is passed in. "matches" is filled in with zero or more string values
-  // that start with "s", and the first string to exactly match one of the
-  // string values in this collection, will have "exact_matches_idx" filled in
-  // to match the index, or "exact_matches_idx" will have SIZE_MAX
-  size_t AutoComplete(llvm::StringRef s, StringList &matches,
-                      size_t &exact_matches_idx) const;
-
   // Dump the StringList to the given lldb_private::Log, `log`, one item per
   // line. If given, `name` will be used to identify the start and end of the
   // list in the output.
@@ -125,7 +127,7 @@
   }
 
 private:
-  std::vector<std::string> m_strings;
+  collection m_strings;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/include/lldb/Utility/StructuredData.h b/src/llvm-project/lldb/include/lldb/Utility/StructuredData.h
index 75eb2f7..01b14fc 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/StructuredData.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/StructuredData.h
@@ -10,9 +10,11 @@
 #define liblldb_StructuredData_h_
 
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/JSON.h"
 
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/FileSpec.h"
+#include "lldb/Utility/Stream.h"
 #include "lldb/lldb-enumerations.h"
 
 #include <cassert>
@@ -28,7 +30,6 @@
 
 namespace lldb_private {
 class Status;
-class Stream;
 }
 
 namespace lldb_private {
@@ -150,7 +151,12 @@
 
     void DumpToStdout(bool pretty_print = true) const;
 
-    virtual void Dump(Stream &s, bool pretty_print = true) const = 0;
+    virtual void Serialize(llvm::json::OStream &s) const = 0;
+
+    void Dump(lldb_private::Stream &s, bool pretty_print = true) const {
+      llvm::json::OStream jso(s.AsRawOstream(), pretty_print ? 2 : 0);
+      Serialize(jso);
+    }
 
   private:
     lldb::StructuredDataType m_type;
@@ -269,7 +275,7 @@
 
     void AddItem(ObjectSP item) { m_items.push_back(item); }
 
-    void Dump(Stream &s, bool pretty_print = true) const override;
+    void Serialize(llvm::json::OStream &s) const override;
 
   protected:
     typedef std::vector<ObjectSP> collection;
@@ -287,7 +293,7 @@
 
     uint64_t GetValue() { return m_value; }
 
-    void Dump(Stream &s, bool pretty_print = true) const override;
+    void Serialize(llvm::json::OStream &s) const override;
 
   protected:
     uint64_t m_value;
@@ -304,7 +310,7 @@
 
     double GetValue() { return m_value; }
 
-    void Dump(Stream &s, bool pretty_print = true) const override;
+    void Serialize(llvm::json::OStream &s) const override;
 
   protected:
     double m_value;
@@ -321,7 +327,7 @@
 
     bool GetValue() { return m_value; }
 
-    void Dump(Stream &s, bool pretty_print = true) const override;
+    void Serialize(llvm::json::OStream &s) const override;
 
   protected:
     bool m_value;
@@ -337,7 +343,7 @@
 
     llvm::StringRef GetValue() { return m_value; }
 
-    void Dump(Stream &s, bool pretty_print = true) const override;
+    void Serialize(llvm::json::OStream &s) const override;
 
   protected:
     std::string m_value;
@@ -506,7 +512,7 @@
       AddItem(key, std::make_shared<Boolean>(value));
     }
 
-    void Dump(Stream &s, bool pretty_print = true) const override;
+    void Serialize(llvm::json::OStream &s) const override;
 
   protected:
     typedef std::map<ConstString, ObjectSP> collection;
@@ -521,7 +527,7 @@
 
     bool IsValid() const override { return false; }
 
-    void Dump(Stream &s, bool pretty_print = true) const override;
+    void Serialize(llvm::json::OStream &s) const override;
   };
 
   class Generic : public Object {
@@ -535,14 +541,13 @@
 
     bool IsValid() const override { return m_object != nullptr; }
 
-    void Dump(Stream &s, bool pretty_print = true) const override;
+    void Serialize(llvm::json::OStream &s) const override;
 
   private:
     void *m_object;
   };
 
   static ObjectSP ParseJSON(std::string json_text);
-
   static ObjectSP ParseJSONFromFile(const FileSpec &file, Status &error);
 };
 
diff --git a/src/llvm-project/lldb/include/lldb/Utility/UUID.h b/src/llvm-project/lldb/include/lldb/Utility/UUID.h
index dbeb9db..0284357 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/UUID.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/UUID.h
@@ -9,14 +9,11 @@
 #ifndef LLDB_UTILITY_UUID_H
 #define LLDB_UTILITY_UUID_H
 
+#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/StringRef.h"
 #include <stddef.h>
 #include <stdint.h>
 #include <string>
-#include "llvm/ADT/ArrayRef.h"
-
-namespace llvm {
-  class StringRef;
-}
 
 namespace lldb_private {
 
@@ -67,10 +64,10 @@
   std::string GetAsString(llvm::StringRef separator = "-") const;
 
   size_t SetFromStringRef(llvm::StringRef str, uint32_t num_uuid_bytes = 16);
-  
-  // Same as SetFromStringRef, but if the resultant UUID is all 0 bytes, set the 
+
+  // Same as SetFromStringRef, but if the resultant UUID is all 0 bytes, set the
   // UUID to invalid.
-  size_t SetFromOptionalStringRef(llvm::StringRef str, 
+  size_t SetFromOptionalStringRef(llvm::StringRef str,
                                   uint32_t num_uuid_bytes = 16);
 
   // Decode as many UUID bytes (up to 16) as possible from the C string "cstr"
@@ -79,14 +76,13 @@
   /// Decode as many UUID bytes (up to 16) as possible from the C
   /// string \a cstr.
   ///
-  /// \param[in] cstr
-  ///     A NULL terminate C string that points at a UUID string value
-  ///     (no leading spaces). The string must contain only hex
-  ///     characters and optionally can contain the '-' sepearators.
+  /// \param[in] str
+  ///     An llvm::StringRef that points at a UUID string value (no leading
+  ///     spaces). The string must contain only hex characters and optionally
+  ///     can contain the '-' sepearators.
   ///
   /// \param[in] uuid_bytes
-  ///     A buffer of bytes that will contain a full or patially
-  ///     decoded UUID.
+  ///     A buffer of bytes that will contain a full or partially decoded UUID.
   ///
   /// \return
   ///     The original string, with all decoded bytes removed.
diff --git a/src/llvm-project/lldb/include/lldb/Utility/VMRange.h b/src/llvm-project/lldb/include/lldb/Utility/VMRange.h
index 9c2f9d0..72f859b 100644
--- a/src/llvm-project/lldb/include/lldb/Utility/VMRange.h
+++ b/src/llvm-project/lldb/include/lldb/Utility/VMRange.h
@@ -10,16 +10,13 @@
 #define liblldb_VMRange_h_
 
 #include "lldb/lldb-types.h"
+#include "llvm/Support/raw_ostream.h"
 
 #include <stddef.h>
 #include <stdint.h>
 #include <vector>
 
 namespace lldb_private {
-class Stream;
-}
-
-namespace lldb_private {
 
 // A vm address range. These can represent offsets ranges or actual
 // addresses.
@@ -81,7 +78,7 @@
     return false;
   }
 
-  void Dump(Stream *s, lldb::addr_t base_addr = 0,
+  void Dump(llvm::raw_ostream &s, lldb::addr_t base_addr = 0,
             uint32_t addr_width = 8) const;
 
   static bool ContainsValue(const VMRange::collection &coll,
diff --git a/src/llvm-project/lldb/include/lldb/lldb-enumerations.h b/src/llvm-project/lldb/include/lldb/lldb-enumerations.h
index f9830c0..8cbb459 100644
--- a/src/llvm-project/lldb/include/lldb/lldb-enumerations.h
+++ b/src/llvm-project/lldb/include/lldb/lldb-enumerations.h
@@ -69,21 +69,22 @@
 
 namespace lldb {
 
-// Process and Thread States
+/// Process and Thread States.
 enum StateType {
   eStateInvalid = 0,
   eStateUnloaded,  ///< Process is object is valid, but not currently loaded
   eStateConnected, ///< Process is connected to remote debug services, but not
-                   ///launched or attached to anything yet
+                   /// launched or attached to anything yet
   eStateAttaching, ///< Process is currently trying to attach
   eStateLaunching, ///< Process is in the process of launching
-  // The state changes eStateAttaching and eStateLaunching are both sent while the
-  // private state thread is either not yet started or paused. For that reason, they
-  // should only be signaled as public state changes, and not private state changes.
+  // The state changes eStateAttaching and eStateLaunching are both sent while
+  // the private state thread is either not yet started or paused. For that
+  // reason, they should only be signaled as public state changes, and not
+  // private state changes.
   eStateStopped,   ///< Process or thread is stopped and can be examined.
   eStateRunning,   ///< Process or thread is running and can't be examined.
   eStateStepping,  ///< Process or thread is in the process of stepping and can
-                   ///not be examined.
+                   /// not be examined.
   eStateCrashed,   ///< Process or thread has crashed and can be examined.
   eStateDetached,  ///< Process has been detached and can't be examined.
   eStateExited,    ///< Process has exited and can't be examined.
@@ -93,16 +94,17 @@
   kLastStateType = eStateSuspended
 };
 
-// Launch Flags
+/// Launch Flags.
 FLAGS_ENUM(LaunchFlags){
     eLaunchFlagNone = 0u,
     eLaunchFlagExec = (1u << 0),  ///< Exec when launching and turn the calling
-                                  ///process into a new process
+                                  /// process into a new process
     eLaunchFlagDebug = (1u << 1), ///< Stop as soon as the process launches to
-                                  ///allow the process to be debugged
-    eLaunchFlagStopAtEntry = (1u << 2), ///< Stop at the program entry point
-                                        ///instead of auto-continuing when
-                                        ///launching or attaching at entry point
+                                  /// allow the process to be debugged
+    eLaunchFlagStopAtEntry = (1u
+                              << 2), ///< Stop at the program entry point
+                                     /// instead of auto-continuing when
+                                     /// launching or attaching at entry point
     eLaunchFlagDisableASLR =
         (1u << 3), ///< Disable Address Space Layout Randomization
     eLaunchFlagDisableSTDIO =
@@ -113,23 +115,23 @@
         (1u << 6), ///< Launch the process inside a shell to get shell expansion
     eLaunchFlagLaunchInSeparateProcessGroup =
         (1u << 7), ///< Launch the process in a separate process group
-    eLaunchFlagDontSetExitStatus = (1u << 8), ///< If you are going to hand the
-                                              ///process off (e.g. to
-                                              ///debugserver)
+                   ///< If you are going to hand the process off (e.g. to
+                   ///< debugserver)
+    eLaunchFlagDontSetExitStatus = (1u << 8),
     ///< set this flag so lldb & the handee don't race to set its exit status.
     eLaunchFlagDetachOnError = (1u << 9), ///< If set, then the client stub
-                                          ///should detach rather than killing
-                                          ///the debugee
+                                          ///< should detach rather than killing
+                                          ///< the debugee
                                           ///< if it loses connection with lldb.
     eLaunchFlagShellExpandArguments =
         (1u << 10), ///< Perform shell-style argument expansion
     eLaunchFlagCloseTTYOnExit = (1u << 11), ///< Close the open TTY on exit
 };
 
-// Thread Run Modes
+/// Thread Run Modes.
 enum RunMode { eOnlyThisThread, eAllThreads, eOnlyDuringStepping };
 
-// Byte ordering definitions
+/// Byte ordering definitions.
 enum ByteOrder {
   eByteOrderInvalid = 0,
   eByteOrderBig = 1,
@@ -137,16 +139,16 @@
   eByteOrderLittle = 4
 };
 
-// Register encoding definitions
+/// Register encoding definitions.
 enum Encoding {
   eEncodingInvalid = 0,
-  eEncodingUint,    // unsigned integer
-  eEncodingSint,    // signed integer
-  eEncodingIEEE754, // float
-  eEncodingVector   // vector registers
+  eEncodingUint,    ///< unsigned integer
+  eEncodingSint,    ///< signed integer
+  eEncodingIEEE754, ///< float
+  eEncodingVector   ///< vector registers
 };
 
-// Display format definitions
+/// Display format definitions.
 enum Format {
   eFormatDefault = 0,
   eFormatInvalid = 0,
@@ -155,18 +157,18 @@
   eFormatBytes,
   eFormatBytesWithASCII,
   eFormatChar,
-  eFormatCharPrintable, // Only printable characters, space if not printable
-  eFormatComplex,       // Floating point complex type
+  eFormatCharPrintable, ///< Only printable characters, space if not printable
+  eFormatComplex,       ///< Floating point complex type
   eFormatComplexFloat = eFormatComplex,
-  eFormatCString, // NULL terminated C strings
+  eFormatCString, ///< NULL terminated C strings
   eFormatDecimal,
   eFormatEnum,
   eFormatHex,
   eFormatHexUppercase,
   eFormatFloat,
   eFormatOctal,
-  eFormatOSType, // OS character codes encoded into an integer 'PICT' 'text'
-                 // etc...
+  eFormatOSType, ///< OS character codes encoded into an integer 'PICT' 'text'
+                 ///< etc...
   eFormatUnicode16,
   eFormatUnicode32,
   eFormatUnsigned,
@@ -184,20 +186,21 @@
   eFormatVectorOfFloat32,
   eFormatVectorOfFloat64,
   eFormatVectorOfUInt128,
-  eFormatComplexInteger, // Integer complex type
-  eFormatCharArray,      // Print characters with no single quotes, used for
-                         // character arrays that can contain non printable
-                         // characters
-  eFormatAddressInfo, // Describe what an address points to (func + offset with
-                      // file/line, symbol + offset, data, etc)
-  eFormatHexFloat,    // ISO C99 hex float string
-  eFormatInstruction, // Disassemble an opcode
-  eFormatVoid,        // Do not print this
+  eFormatComplexInteger, ///< Integer complex type
+  eFormatCharArray,      ///< Print characters with no single quotes, used for
+                         ///< character arrays that can contain non printable
+                         ///< characters
+  eFormatAddressInfo,    ///< Describe what an address points to (func + offset
+                      ///< with file/line, symbol + offset, data, etc)
+  eFormatHexFloat,    ///< ISO C99 hex float string
+  eFormatInstruction, ///< Disassemble an opcode
+  eFormatVoid,        ///< Do not print this
+  eFormatUnicode8,
   kNumFormats
 };
 
-// Description levels for "void GetDescription(Stream *, DescriptionLevel)"
-// calls
+/// Description levels for "void GetDescription(Stream *, DescriptionLevel)"
+/// calls.
 enum DescriptionLevel {
   eDescriptionLevelBrief = 0,
   eDescriptionLevelFull,
@@ -206,29 +209,30 @@
   kNumDescriptionLevels
 };
 
-// Script interpreter types
+/// Script interpreter types.
 enum ScriptLanguage {
-  eScriptLanguageNone,
+  eScriptLanguageNone = 0,
   eScriptLanguagePython,
-  eScriptLanguageDefault = eScriptLanguagePython,
-  eScriptLanguageUnknown
+  eScriptLanguageLua,
+  eScriptLanguageUnknown,
+  eScriptLanguageDefault = eScriptLanguagePython
 };
 
-// Register numbering types
+/// Register numbering types.
 // See RegisterContext::ConvertRegisterKindToRegisterNumber to convert any of
 // these to the lldb internal register numbering scheme (eRegisterKindLLDB).
 enum RegisterKind {
-  eRegisterKindEHFrame = 0, // the register numbers seen in eh_frame
-  eRegisterKindDWARF,       // the register numbers seen DWARF
-  eRegisterKindGeneric, // insn ptr reg, stack ptr reg, etc not specific to any
-                        // particular target
-  eRegisterKindProcessPlugin, // num used by the process plugin - e.g. by the
-                              // remote gdb-protocol stub program
-  eRegisterKindLLDB,          // lldb's internal register numbers
+  eRegisterKindEHFrame = 0, ///< the register numbers seen in eh_frame
+  eRegisterKindDWARF,       ///< the register numbers seen DWARF
+  eRegisterKindGeneric, ///< insn ptr reg, stack ptr reg, etc not specific to
+                        ///< any particular target
+  eRegisterKindProcessPlugin, ///< num used by the process plugin - e.g. by the
+                              ///< remote gdb-protocol stub program
+  eRegisterKindLLDB,          ///< lldb's internal register numbers
   kNumRegisterKinds
 };
 
-// Thread stop reasons
+/// Thread stop reasons.
 enum StopReason {
   eStopReasonInvalid = 0,
   eStopReasonNone,
@@ -237,13 +241,13 @@
   eStopReasonWatchpoint,
   eStopReasonSignal,
   eStopReasonException,
-  eStopReasonExec, // Program was re-exec'ed
+  eStopReasonExec, ///< Program was re-exec'ed
   eStopReasonPlanComplete,
   eStopReasonThreadExiting,
   eStopReasonInstrumentation
 };
 
-// Command Return Status Types
+/// Command Return Status Types.
 enum ReturnStatus {
   eReturnStatusInvalid,
   eReturnStatusSuccessFinishNoResult,
@@ -255,7 +259,7 @@
   eReturnStatusQuit
 };
 
-// The results of expression evaluation:
+/// The results of expression evaluation.
 enum ExpressionResults {
   eExpressionCompleted = 0,
   eExpressionSetupError,
@@ -269,26 +273,26 @@
 };
 
 enum SearchDepth {
-    eSearchDepthInvalid = 0,
-    eSearchDepthTarget,
-    eSearchDepthModule,
-    eSearchDepthCompUnit,
-    eSearchDepthFunction,
-    eSearchDepthBlock,
-    eSearchDepthAddress,
-    kLastSearchDepthKind = eSearchDepthAddress
+  eSearchDepthInvalid = 0,
+  eSearchDepthTarget,
+  eSearchDepthModule,
+  eSearchDepthCompUnit,
+  eSearchDepthFunction,
+  eSearchDepthBlock,
+  eSearchDepthAddress,
+  kLastSearchDepthKind = eSearchDepthAddress
 };
 
-// Connection Status Types
+/// Connection Status Types.
 enum ConnectionStatus {
-  eConnectionStatusSuccess,        // Success
-  eConnectionStatusEndOfFile,      // End-of-file encountered
-  eConnectionStatusError,          // Check GetError() for details
-  eConnectionStatusTimedOut,       // Request timed out
-  eConnectionStatusNoConnection,   // No connection
-  eConnectionStatusLostConnection, // Lost connection while connected to a valid
-                                   // connection
-  eConnectionStatusInterrupted     // Interrupted read
+  eConnectionStatusSuccess,        ///< Success
+  eConnectionStatusEndOfFile,      ///< End-of-file encountered
+  eConnectionStatusError,          ///< Check GetError() for details
+  eConnectionStatusTimedOut,       ///< Request timed out
+  eConnectionStatusNoConnection,   ///< No connection
+  eConnectionStatusLostConnection, ///< Lost connection while connected to a
+                                   ///< valid connection
+  eConnectionStatusInterrupted ///< Interrupted read
 };
 
 enum ErrorType {
@@ -302,17 +306,17 @@
 
 enum ValueType {
   eValueTypeInvalid = 0,
-  eValueTypeVariableGlobal = 1,   // globals variable
-  eValueTypeVariableStatic = 2,   // static variable
-  eValueTypeVariableArgument = 3, // function argument variables
-  eValueTypeVariableLocal = 4,    // function local variables
-  eValueTypeRegister = 5,         // stack frame register value
-  eValueTypeRegisterSet = 6,      // A collection of stack frame register values
-  eValueTypeConstResult = 7,      // constant result variables
-  eValueTypeVariableThreadLocal = 8 // thread local storage variable
+  eValueTypeVariableGlobal = 1,   ///< globals variable
+  eValueTypeVariableStatic = 2,   ///< static variable
+  eValueTypeVariableArgument = 3, ///< function argument variables
+  eValueTypeVariableLocal = 4,    ///< function local variables
+  eValueTypeRegister = 5,         ///< stack frame register value
+  eValueTypeRegisterSet = 6, ///< A collection of stack frame register values
+  eValueTypeConstResult = 7, ///< constant result variables
+  eValueTypeVariableThreadLocal = 8 ///< thread local storage variable
 };
 
-// Token size/granularities for Input Readers
+/// Token size/granularities for Input Readers.
 
 enum InputReaderGranularity {
   eInputReaderGranularityInvalid = 0,
@@ -331,39 +335,37 @@
 /// in this class, and requests that that item be resolved, or
 /// indicates that the member did get resolved.
 FLAGS_ENUM(SymbolContextItem){
-    eSymbolContextTarget = (1u << 0), ///< Set when \a target is requested from
-                                      /// a query, or was located in query
-                                      /// results
-    eSymbolContextModule = (1u << 1), ///< Set when \a module is requested from
-                                      /// a query, or was located in query
-                                      /// results
-    eSymbolContextCompUnit = (1u << 2), ///< Set when \a comp_unit is requested
-                                        /// from a query, or was located in
-                                        /// query results
-    eSymbolContextFunction = (1u << 3), ///< Set when \a function is requested
-                                        /// from a query, or was located in
-                                        /// query results
-    eSymbolContextBlock = (1u << 4),    ///< Set when the deepest \a block is
-                                     /// requested from a query, or was located
-                                     /// in query results
-    eSymbolContextLineEntry = (1u << 5), ///< Set when \a line_entry is
-                                         /// requested from a query, or was
-                                         /// located in query results
-    eSymbolContextSymbol = (1u << 6), ///< Set when \a symbol is requested from
-                                      /// a query, or was located in query
-                                      /// results
-    eSymbolContextEverything = ((eSymbolContextSymbol << 1) -
-                                1u), ///< Indicates to try and lookup everything
-                                     /// up during a routine symbol context
-                                     /// query.
-    eSymbolContextVariable = (1u << 7), ///< Set when \a global or static
-                                        /// variable is requested from a query,
-                                        /// or was located in query results.
-    ///< eSymbolContextVariable is potentially expensive to lookup so it isn't
-    /// included in
-    ///< eSymbolContextEverything which stops it from being used during frame PC
-    /// lookups and
-    ///< many other potential address to symbol context lookups.
+    /// Set when \a target is requested from a query, or was located
+    /// in query results
+    eSymbolContextTarget = (1u << 0),
+    /// Set when \a module is requested from a query, or was located
+    /// in query results
+    eSymbolContextModule = (1u << 1),
+    /// Set when \a comp_unit is requested from a query, or was
+    /// located in query results
+    eSymbolContextCompUnit = (1u << 2),
+    /// Set when \a function is requested from a query, or was located
+    /// in query results
+    eSymbolContextFunction = (1u << 3),
+    /// Set when the deepest \a block is requested from a query, or
+    /// was located in query results
+    eSymbolContextBlock = (1u << 4),
+    /// Set when \a line_entry is requested from a query, or was
+    /// located in query results
+    eSymbolContextLineEntry = (1u << 5),
+    /// Set when \a symbol is requested from a query, or was located
+    /// in query results
+    eSymbolContextSymbol = (1u << 6),
+    /// Indicates to try and lookup everything up during a routine
+    /// symbol context query.
+    eSymbolContextEverything = ((eSymbolContextSymbol << 1) - 1u),
+    /// Set when \a global or static variable is requested from a
+    /// query, or was located in query results.
+    /// eSymbolContextVariable is potentially expensive to lookup so
+    /// it isn't included in eSymbolContextEverything which stops it
+    /// from being used during frame PC lookups and many other
+    /// potential address to symbol context lookups.
+    eSymbolContextVariable = (1u << 7),
 };
 LLDB_MARK_AS_BITMASK_ENUM(SymbolContextItem)
 
@@ -373,27 +375,28 @@
 LLDB_MARK_AS_BITMASK_ENUM(Permissions)
 
 enum InputReaderAction {
-  eInputReaderActivate, // reader is newly pushed onto the reader stack
-  eInputReaderAsynchronousOutputWritten, // an async output event occurred; the
-                                         // reader may want to do something
-  eInputReaderReactivate, // reader is on top of the stack again after another
-                          // reader was popped off
-  eInputReaderDeactivate, // another reader was pushed on the stack
-  eInputReaderGotToken,   // reader got one of its tokens (granularity)
-  eInputReaderInterrupt, // reader received an interrupt signal (probably from a
-                         // control-c)
-  eInputReaderEndOfFile, // reader received an EOF char (probably from a
-                         // control-d)
-  eInputReaderDone       // reader was just popped off the stack and is done
+  eInputReaderActivate, ///< reader is newly pushed onto the reader stack
+  eInputReaderAsynchronousOutputWritten, ///< an async output event occurred;
+                                         ///< the reader may want to do
+                                         ///< something
+  eInputReaderReactivate, ///< reader is on top of the stack again after another
+                          ///< reader was popped off
+  eInputReaderDeactivate, ///< another reader was pushed on the stack
+  eInputReaderGotToken,   ///< reader got one of its tokens (granularity)
+  eInputReaderInterrupt, ///< reader received an interrupt signal (probably from
+                         ///< a control-c)
+  eInputReaderEndOfFile, ///< reader received an EOF char (probably from a
+                         ///< control-d)
+  eInputReaderDone       ///< reader was just popped off the stack and is done
 };
 
 FLAGS_ENUM(BreakpointEventType){
     eBreakpointEventTypeInvalidType = (1u << 0),
     eBreakpointEventTypeAdded = (1u << 1),
     eBreakpointEventTypeRemoved = (1u << 2),
-    eBreakpointEventTypeLocationsAdded = (1u << 3), // Locations added doesn't
-                                                    // get sent when the
-                                                    // breakpoint is created
+    eBreakpointEventTypeLocationsAdded = (1u << 3), ///< Locations added doesn't
+                                                    ///< get sent when the
+                                                    ///< breakpoint is created
     eBreakpointEventTypeLocationsRemoved = (1u << 4),
     eBreakpointEventTypeLocationsResolved = (1u << 5),
     eBreakpointEventTypeEnabled = (1u << 6),
@@ -591,8 +594,8 @@
                   // enumeration!!
 };
 
-// Symbol types
-// Symbol holds the SymbolType in a 6-bit field (m_type), so if you get over 63 
+/// Symbol types.
+// Symbol holds the SymbolType in a 6-bit field (m_type), so if you get over 63
 // entries you will have to resize that field.
 enum SymbolType {
   eSymbolTypeAny = 0,
@@ -617,8 +620,8 @@
   eSymbolTypeLineHeader,
   eSymbolTypeScopeBegin,
   eSymbolTypeScopeEnd,
-  eSymbolTypeAdditional, // When symbols take more than one entry, the extra
-                         // entries get this type
+  eSymbolTypeAdditional, ///< When symbols take more than one entry, the extra
+                         ///< entries get this type
   eSymbolTypeCompiler,
   eSymbolTypeInstrumentation,
   eSymbolTypeUndefined,
@@ -631,19 +634,20 @@
 enum SectionType {
   eSectionTypeInvalid,
   eSectionTypeCode,
-  eSectionTypeContainer, // The section contains child sections
+  eSectionTypeContainer, ///< The section contains child sections
   eSectionTypeData,
-  eSectionTypeDataCString,         // Inlined C string data
-  eSectionTypeDataCStringPointers, // Pointers to C string data
-  eSectionTypeDataSymbolAddress,   // Address of a symbol in the symbol table
+  eSectionTypeDataCString,         ///< Inlined C string data
+  eSectionTypeDataCStringPointers, ///< Pointers to C string data
+  eSectionTypeDataSymbolAddress,   ///< Address of a symbol in the symbol table
   eSectionTypeData4,
   eSectionTypeData8,
   eSectionTypeData16,
   eSectionTypeDataPointers,
   eSectionTypeDebug,
   eSectionTypeZeroFill,
-  eSectionTypeDataObjCMessageRefs, // Pointer to function pointer + selector
-  eSectionTypeDataObjCCFStrings, // Objective-C const CFString/NSString objects
+  eSectionTypeDataObjCMessageRefs, ///< Pointer to function pointer + selector
+  eSectionTypeDataObjCCFStrings,   ///< Objective-C const CFString/NSString
+                                   ///< objects
   eSectionTypeDWARFDebugAbbrev,
   eSectionTypeDWARFDebugAddr,
   eSectionTypeDWARFDebugAranges,
@@ -663,30 +667,33 @@
   eSectionTypeDWARFAppleTypes,
   eSectionTypeDWARFAppleNamespaces,
   eSectionTypeDWARFAppleObjC,
-  eSectionTypeELFSymbolTable,       // Elf SHT_SYMTAB section
-  eSectionTypeELFDynamicSymbols,    // Elf SHT_DYNSYM section
-  eSectionTypeELFRelocationEntries, // Elf SHT_REL or SHT_REL section
-  eSectionTypeELFDynamicLinkInfo,   // Elf SHT_DYNAMIC section
+  eSectionTypeELFSymbolTable,       ///< Elf SHT_SYMTAB section
+  eSectionTypeELFDynamicSymbols,    ///< Elf SHT_DYNSYM section
+  eSectionTypeELFRelocationEntries, ///< Elf SHT_REL or SHT_REL section
+  eSectionTypeELFDynamicLinkInfo,   ///< Elf SHT_DYNAMIC section
   eSectionTypeEHFrame,
   eSectionTypeARMexidx,
   eSectionTypeARMextab,
-  eSectionTypeCompactUnwind, // compact unwind section in Mach-O,
-                             // __TEXT,__unwind_info
+  eSectionTypeCompactUnwind, ///< compact unwind section in Mach-O,
+                             ///< __TEXT,__unwind_info
   eSectionTypeGoSymtab,
-  eSectionTypeAbsoluteAddress, // Dummy section for symbols with absolute
-                               // address
+  eSectionTypeAbsoluteAddress, ///< Dummy section for symbols with absolute
+                               ///< address
   eSectionTypeDWARFGNUDebugAltLink,
-  eSectionTypeDWARFDebugTypes, // DWARF .debug_types section
-  eSectionTypeDWARFDebugNames, // DWARF v5 .debug_names
+  eSectionTypeDWARFDebugTypes, ///< DWARF .debug_types section
+  eSectionTypeDWARFDebugNames, ///< DWARF v5 .debug_names
   eSectionTypeOther,
-  eSectionTypeDWARFDebugLineStr, // DWARF v5 .debug_line_str
-  eSectionTypeDWARFDebugRngLists, // DWARF v5 .debug_rnglists
-  eSectionTypeDWARFDebugLocLists, // DWARF v5 .debug_loclists
+  eSectionTypeDWARFDebugLineStr,  ///< DWARF v5 .debug_line_str
+  eSectionTypeDWARFDebugRngLists, ///< DWARF v5 .debug_rnglists
+  eSectionTypeDWARFDebugLocLists, ///< DWARF v5 .debug_loclists
   eSectionTypeDWARFDebugAbbrevDwo,
   eSectionTypeDWARFDebugInfoDwo,
   eSectionTypeDWARFDebugStrDwo,
   eSectionTypeDWARFDebugStrOffsetsDwo,
   eSectionTypeDWARFDebugTypesDwo,
+  eSectionTypeDWARFDebugRngListsDwo,
+  eSectionTypeDWARFDebugLocDwo,
+  eSectionTypeDWARFDebugLocListsDwo,
 };
 
 FLAGS_ENUM(EmulateInstructionOptions){
@@ -697,26 +704,27 @@
 FLAGS_ENUM(FunctionNameType){
     eFunctionNameTypeNone = 0u,
     eFunctionNameTypeAuto =
-        (1u << 1), // Automatically figure out which FunctionNameType
-                   // bits to set based on the function name.
-    eFunctionNameTypeFull = (1u << 2), // The function name.
-    // For C this is the same as just the name of the function For C++ this is
-    // the mangled or demangled version of the mangled name. For ObjC this is
-    // the full function signature with the + or - and the square brackets and
-    // the class and selector
-    eFunctionNameTypeBase = (1u << 3), // The function name only, no namespaces
-                                       // or arguments and no class
-                                       // methods or selectors will be searched.
-    eFunctionNameTypeMethod = (1u << 4), // Find function by method name (C++)
-                                         // with no namespace or arguments
+        (1u << 1), ///< Automatically figure out which FunctionNameType
+                   ///< bits to set based on the function name.
+    eFunctionNameTypeFull = (1u << 2), ///< The function name.
+    ///< For C this is the same as just the name of the function For C++ this is
+    ///< the mangled or demangled version of the mangled name. For ObjC this is
+    ///< the full function signature with the + or - and the square brackets and
+    ///< the class and selector
+    eFunctionNameTypeBase = (1u
+                             << 3), ///< The function name only, no namespaces
+                                    ///< or arguments and no class
+                                    ///< methods or selectors will be searched.
+    eFunctionNameTypeMethod = (1u << 4), ///< Find function by method name (C++)
+                                         ///< with no namespace or arguments
     eFunctionNameTypeSelector =
-        (1u << 5), // Find function by selector name (ObjC) names
+        (1u << 5), ///< Find function by selector name (ObjC) names
     eFunctionNameTypeAny =
-        eFunctionNameTypeAuto // DEPRECATED: use eFunctionNameTypeAuto
+        eFunctionNameTypeAuto ///< DEPRECATED: use eFunctionNameTypeAuto
 };
 LLDB_MARK_AS_BITMASK_ENUM(FunctionNameType)
 
-// Basic types enumeration for the public API SBType::GetBasicType()
+/// Basic types enumeration for the public API SBType::GetBasicType().
 enum BasicType {
   eBasicTypeInvalid = 0,
   eBasicTypeVoid = 1,
@@ -801,8 +809,8 @@
   eTemplateArgumentKindNullPtr,
 };
 
-// Options that can be set for a formatter to alter its behavior Not all of
-// these are applicable to all formatter types
+/// Options that can be set for a formatter to alter its behavior. Not
+/// all of these are applicable to all formatter types.
 FLAGS_ENUM(TypeOptions){eTypeOptionNone = (0u),
                         eTypeOptionCascade = (1u << 0),
                         eTypeOptionSkipPointers = (1u << 1),
@@ -813,20 +821,28 @@
                         eTypeOptionHideNames = (1u << 6),
                         eTypeOptionNonCacheable = (1u << 7),
                         eTypeOptionHideEmptyAggregates = (1u << 8),
-                        eTypeOptionFrontEndWantsDereference = (1u << 9)
-};
+                        eTypeOptionFrontEndWantsDereference = (1u << 9)};
 
-// This is the return value for frame comparisons.  If you are comparing frame
-// A to frame B the following cases arise: 1) When frame A pushes frame B (or a
-// frame that ends up pushing B) A is Older than B. 2) When frame A pushed
-// frame B (or if frame A is on the stack but B is not) A is Younger than B 3)
-// When frame A and frame B have the same StackID, they are Equal. 4) When
-// frame A and frame B have the same immediate parent frame, but are not equal,
-// the comparison yields
-//    SameParent.
-// 5) If the two frames are on different threads or processes the comparison is
-// Invalid 6) If for some reason we can't figure out what went on, we return
-// Unknown.
+/// This is the return value for frame comparisons.  If you are comparing frame
+/// A to frame B the following cases arise:
+///
+///    1) When frame A pushes frame B (or a frame that ends up pushing
+///       B) A is Older than B.
+///
+///    2) When frame A pushed frame B (or if frameA is on the stack
+///       but B is not) A is Younger than B.
+///
+///    3) When frame A and frame B have the same StackID, they are
+///       Equal.
+///
+///    4) When frame A and frame B have the same immediate parent
+///       frame, but are not equal, the comparison yields SameParent.
+///
+///    5) If the two frames are on different threads or processes the
+///       comparison is Invalid.
+///
+///    6) If for some reason we can't figure out what went on, we
+///       return Unknown.
 enum FrameComparison {
   eFrameCompareInvalid,
   eFrameCompareUnknown,
@@ -836,12 +852,13 @@
   eFrameCompareOlder
 };
 
-// File Permissions
-//
-// Designed to mimic the unix file permission bits so they can be used with
-// functions that set 'mode_t' to certain values for permissions.
+/// File Permissions.
+///
+/// Designed to mimic the unix file permission bits so they can be used with
+/// functions that set 'mode_t' to certain values for permissions.
 FLAGS_ENUM(FilePermissions){
-    eFilePermissionsUserRead = (1u << 8), eFilePermissionsUserWrite = (1u << 7),
+    eFilePermissionsUserRead = (1u << 8),
+    eFilePermissionsUserWrite = (1u << 7),
     eFilePermissionsUserExecute = (1u << 6),
     eFilePermissionsGroupRead = (1u << 5),
     eFilePermissionsGroupWrite = (1u << 4),
@@ -895,29 +912,32 @@
     eFilePermissionsDirectoryDefault = eFilePermissionsUserRWX,
 };
 
-// Queue work item types
-//
-// The different types of work that can be enqueued on a libdispatch aka Grand
-// Central Dispatch (GCD) queue.
+/// Queue work item types.
+///
+/// The different types of work that can be enqueued on a libdispatch aka Grand
+/// Central Dispatch (GCD) queue.
 enum QueueItemKind {
   eQueueItemKindUnknown = 0,
   eQueueItemKindFunction,
   eQueueItemKindBlock
 };
 
-// Queue type
-// libdispatch aka Grand Central Dispatch (GCD) queues can be either serial
-// (executing on one thread) or concurrent (executing on multiple threads).
+/// Queue type.
+///
+/// libdispatch aka Grand Central Dispatch (GCD) queues can be either
+/// serial (executing on one thread) or concurrent (executing on
+/// multiple threads).
 enum QueueKind {
   eQueueKindUnknown = 0,
   eQueueKindSerial,
   eQueueKindConcurrent
 };
 
-// Expression Evaluation Stages
-// These are the cancellable stages of expression evaluation, passed to the
-// expression evaluation callback, so that you can interrupt expression
-// evaluation at the various points in its lifecycle.
+/// Expression Evaluation Stages.
+///
+/// These are the cancellable stages of expression evaluation, passed
+/// to the expression evaluation callback, so that you can interrupt
+/// expression evaluation at the various points in its lifecycle.
 enum ExpressionEvaluationPhase {
   eExpressionEvaluationParse = 0,
   eExpressionEvaluationIRGen,
@@ -925,9 +945,10 @@
   eExpressionEvaluationComplete
 };
 
-// Watchpoint Kind
-// Indicates what types of events cause the watchpoint to fire. Used by Native
-// *Protocol-related classes.
+/// Watchpoint Kind.
+///
+/// Indicates what types of events cause the watchpoint to fire. Used by Native
+/// *Protocol-related classes.
 FLAGS_ENUM(WatchpointKind){eWatchpointKindWrite = (1u << 0),
                            eWatchpointKindRead = (1u << 1)};
 
@@ -940,42 +961,44 @@
   eGdbSignalBreakpoint = 0x96
 };
 
-// Used with SBHost::GetPath (lldb::PathType) to find files that are related to
-// LLDB on the current host machine. Most files are relative to LLDB or are in
-// known locations.
+/// Used with SBHost::GetPath (lldb::PathType) to find files that are
+/// related to LLDB on the current host machine. Most files are
+/// relative to LLDB or are in known locations.
 enum PathType {
-  ePathTypeLLDBShlibDir, // The directory where the lldb.so (unix) or LLDB
-                         // mach-o file in LLDB.framework (MacOSX) exists
-  ePathTypeSupportExecutableDir, // Find LLDB support executable directory
-                                 // (debugserver, etc)
-  ePathTypeHeaderDir,            // Find LLDB header file directory
-  ePathTypePythonDir,            // Find Python modules (PYTHONPATH) directory
-  ePathTypeLLDBSystemPlugins,    // System plug-ins directory
-  ePathTypeLLDBUserPlugins,      // User plug-ins directory
-  ePathTypeLLDBTempSystemDir,    // The LLDB temp directory for this system that
-                                 // will be cleaned up on exit
-  ePathTypeGlobalLLDBTempSystemDir, // The LLDB temp directory for this system,
-                                    // NOT cleaned up on a process exit.
-  ePathTypeClangDir                 // Find path to Clang builtin headers
+  ePathTypeLLDBShlibDir, ///< The directory where the lldb.so (unix) or LLDB
+                         ///< mach-o file in LLDB.framework (MacOSX) exists
+  ePathTypeSupportExecutableDir, ///< Find LLDB support executable directory
+                                 ///< (debugserver, etc)
+  ePathTypeHeaderDir,            ///< Find LLDB header file directory
+  ePathTypePythonDir,            ///< Find Python modules (PYTHONPATH) directory
+  ePathTypeLLDBSystemPlugins,    ///< System plug-ins directory
+  ePathTypeLLDBUserPlugins,      ///< User plug-ins directory
+  ePathTypeLLDBTempSystemDir, ///< The LLDB temp directory for this system that
+                              ///< will be cleaned up on exit
+  ePathTypeGlobalLLDBTempSystemDir, ///< The LLDB temp directory for this
+                                    ///< system, NOT cleaned up on a process
+                                    ///< exit.
+  ePathTypeClangDir ///< Find path to Clang builtin headers
 };
 
-// Kind of member function
-// Used by the type system
+/// Kind of member function.
+///
+/// Used by the type system.
 enum MemberFunctionKind {
-  eMemberFunctionKindUnknown = 0,    // Not sure what the type of this is
-  eMemberFunctionKindConstructor,    // A function used to create instances
-  eMemberFunctionKindDestructor,     // A function used to tear down existing
-                                     // instances
-  eMemberFunctionKindInstanceMethod, // A function that applies to a specific
-                                     // instance
-  eMemberFunctionKindStaticMethod    // A function that applies to a type rather
-                                     // than any instance
+  eMemberFunctionKindUnknown = 0,    ///< Not sure what the type of this is
+  eMemberFunctionKindConstructor,    ///< A function used to create instances
+  eMemberFunctionKindDestructor,     ///< A function used to tear down existing
+                                     ///< instances
+  eMemberFunctionKindInstanceMethod, ///< A function that applies to a specific
+                                     ///< instance
+  eMemberFunctionKindStaticMethod ///< A function that applies to a type rather
+                                  ///< than any instance
 };
 
-// String matching algorithm used by SBTarget
+/// String matching algorithm used by SBTarget.
 enum MatchType { eMatchTypeNormal, eMatchTypeRegex, eMatchTypeStartsWith };
 
-// Bitmask that describes details about a type
+/// Bitmask that describes details about a type.
 FLAGS_ENUM(TypeFlags){
     eTypeHasChildren = (1u << 0),       eTypeHasValue = (1u << 1),
     eTypeIsArray = (1u << 2),           eTypeIsBlock = (1u << 3),
@@ -991,67 +1014,67 @@
     eTypeInstanceIsPointer = (1u << 22)};
 
 FLAGS_ENUM(CommandFlags){
-    // eCommandRequiresTarget
-    //
-    // Ensures a valid target is contained in m_exe_ctx prior to executing the
-    // command. If a target doesn't exist or is invalid, the command will fail
-    // and CommandObject::GetInvalidTargetDescription() will be returned as the
-    // error. CommandObject subclasses can override the virtual function for
-    // GetInvalidTargetDescription() to provide custom strings when needed.
+    /// eCommandRequiresTarget
+    ///
+    /// Ensures a valid target is contained in m_exe_ctx prior to executing the
+    /// command. If a target doesn't exist or is invalid, the command will fail
+    /// and CommandObject::GetInvalidTargetDescription() will be returned as the
+    /// error. CommandObject subclasses can override the virtual function for
+    /// GetInvalidTargetDescription() to provide custom strings when needed.
     eCommandRequiresTarget = (1u << 0),
-    // eCommandRequiresProcess
-    //
-    // Ensures a valid process is contained in m_exe_ctx prior to executing the
-    // command. If a process doesn't exist or is invalid, the command will fail
-    // and CommandObject::GetInvalidProcessDescription() will be returned as
-    // the error. CommandObject subclasses can override the virtual function
-    // for GetInvalidProcessDescription() to provide custom strings when
-    // needed.
+    /// eCommandRequiresProcess
+    ///
+    /// Ensures a valid process is contained in m_exe_ctx prior to executing the
+    /// command. If a process doesn't exist or is invalid, the command will fail
+    /// and CommandObject::GetInvalidProcessDescription() will be returned as
+    /// the error. CommandObject subclasses can override the virtual function
+    /// for GetInvalidProcessDescription() to provide custom strings when
+    /// needed.
     eCommandRequiresProcess = (1u << 1),
-    // eCommandRequiresThread
-    //
-    // Ensures a valid thread is contained in m_exe_ctx prior to executing the
-    // command. If a thread doesn't exist or is invalid, the command will fail
-    // and CommandObject::GetInvalidThreadDescription() will be returned as the
-    // error. CommandObject subclasses can override the virtual function for
-    // GetInvalidThreadDescription() to provide custom strings when needed.
+    /// eCommandRequiresThread
+    ///
+    /// Ensures a valid thread is contained in m_exe_ctx prior to executing the
+    /// command. If a thread doesn't exist or is invalid, the command will fail
+    /// and CommandObject::GetInvalidThreadDescription() will be returned as the
+    /// error. CommandObject subclasses can override the virtual function for
+    /// GetInvalidThreadDescription() to provide custom strings when needed.
     eCommandRequiresThread = (1u << 2),
-    // eCommandRequiresFrame
-    //
-    // Ensures a valid frame is contained in m_exe_ctx prior to executing the
-    // command. If a frame doesn't exist or is invalid, the command will fail
-    // and CommandObject::GetInvalidFrameDescription() will be returned as the
-    // error. CommandObject subclasses can override the virtual function for
-    // GetInvalidFrameDescription() to provide custom strings when needed.
+    /// eCommandRequiresFrame
+    ///
+    /// Ensures a valid frame is contained in m_exe_ctx prior to executing the
+    /// command. If a frame doesn't exist or is invalid, the command will fail
+    /// and CommandObject::GetInvalidFrameDescription() will be returned as the
+    /// error. CommandObject subclasses can override the virtual function for
+    /// GetInvalidFrameDescription() to provide custom strings when needed.
     eCommandRequiresFrame = (1u << 3),
-    // eCommandRequiresRegContext
-    //
-    // Ensures a valid register context (from the selected frame if there is a
-    // frame in m_exe_ctx, or from the selected thread from m_exe_ctx) is
-    // available from m_exe_ctx prior to executing the command. If a target
-    // doesn't exist or is invalid, the command will fail and
-    // CommandObject::GetInvalidRegContextDescription() will be returned as the
-    // error. CommandObject subclasses can override the virtual function for
-    // GetInvalidRegContextDescription() to provide custom strings when needed.
+    /// eCommandRequiresRegContext
+    ///
+    /// Ensures a valid register context (from the selected frame if there is a
+    /// frame in m_exe_ctx, or from the selected thread from m_exe_ctx) is
+    /// available from m_exe_ctx prior to executing the command. If a target
+    /// doesn't exist or is invalid, the command will fail and
+    /// CommandObject::GetInvalidRegContextDescription() will be returned as the
+    /// error. CommandObject subclasses can override the virtual function for
+    /// GetInvalidRegContextDescription() to provide custom strings when needed.
     eCommandRequiresRegContext = (1u << 4),
-    // eCommandTryTargetAPILock
-    //
-    // Attempts to acquire the target lock if a target is selected in the
-    // command interpreter. If the command object fails to acquire the API
-    // lock, the command will fail with an appropriate error message.
+    /// eCommandTryTargetAPILock
+    ///
+    /// Attempts to acquire the target lock if a target is selected in the
+    /// command interpreter. If the command object fails to acquire the API
+    /// lock, the command will fail with an appropriate error message.
     eCommandTryTargetAPILock = (1u << 5),
-    // eCommandProcessMustBeLaunched
-    //
-    // Verifies that there is a launched process in m_exe_ctx, if there isn't,
-    // the command will fail with an appropriate error message.
+    /// eCommandProcessMustBeLaunched
+    ///
+    /// Verifies that there is a launched process in m_exe_ctx, if there isn't,
+    /// the command will fail with an appropriate error message.
     eCommandProcessMustBeLaunched = (1u << 6),
-    // eCommandProcessMustBePaused
-    //
-    // Verifies that there is a paused process in m_exe_ctx, if there isn't,
-    // the command will fail with an appropriate error message.
+    /// eCommandProcessMustBePaused
+    ///
+    /// Verifies that there is a paused process in m_exe_ctx, if there isn't,
+    /// the command will fail with an appropriate error message.
     eCommandProcessMustBePaused = (1u << 7)};
 
-// Whether a summary should cap how much data it returns to users or not
+/// Whether a summary should cap how much data it returns to users or not.
 enum TypeSummaryCapping {
   eTypeSummaryCapped = true,
   eTypeSummaryUncapped = false
diff --git a/src/llvm-project/lldb/include/lldb/lldb-forward.h b/src/llvm-project/lldb/include/lldb/lldb-forward.h
index 0cdaf1c..d2371f9 100644
--- a/src/llvm-project/lldb/include/lldb/lldb-forward.h
+++ b/src/llvm-project/lldb/include/lldb/lldb-forward.h
@@ -44,6 +44,7 @@
 class BroadcastEventSpec;
 class Broadcaster;
 class BroadcasterManager;
+class CallFrameInfo;
 class ClangASTContext;
 class ClangASTImporter;
 class ClangASTMetadata;
@@ -259,7 +260,6 @@
 class TypeEnumMemberListImpl;
 class TypeFormatImpl;
 class TypeNameSpecifierImpl;
-class TypeValidatorImpl;
 class UUID;
 class UnixSignals;
 class Unwind;
@@ -331,6 +331,7 @@
 typedef std::shared_ptr<lldb_private::ExecutionContextRef>
     ExecutionContextRefSP;
 typedef std::shared_ptr<lldb_private::ExpressionVariable> ExpressionVariableSP;
+typedef std::unique_ptr<lldb_private::File> FileUP;
 typedef std::shared_ptr<lldb_private::File> FileSP;
 typedef std::shared_ptr<lldb_private::Function> FunctionSP;
 typedef std::shared_ptr<lldb_private::FunctionCaller> FunctionCallerSP;
@@ -459,7 +460,6 @@
     TypeNameSpecifierImplSP;
 typedef std::shared_ptr<lldb_private::TypeSummaryImpl> TypeSummaryImplSP;
 typedef std::shared_ptr<lldb_private::TypeSummaryOptions> TypeSummaryOptionsSP;
-typedef std::shared_ptr<lldb_private::TypeValidatorImpl> TypeValidatorImplSP;
 typedef std::shared_ptr<lldb_private::ScriptedSyntheticChildren>
     ScriptedSyntheticChildrenSP;
 typedef std::shared_ptr<lldb_private::UnixSignals> UnixSignalsSP;
diff --git a/src/llvm-project/lldb/include/lldb/lldb-private-enumerations.h b/src/llvm-project/lldb/include/lldb/lldb-private-enumerations.h
index 3d8b360..9b7879c 100644
--- a/src/llvm-project/lldb/include/lldb/lldb-private-enumerations.h
+++ b/src/llvm-project/lldb/include/lldb/lldb-private-enumerations.h
@@ -198,18 +198,24 @@
 enum class TypeValidatorResult : bool { Success = true, Failure = false };
 
 // Enumerations that can be used to specify scopes types when looking up types.
-enum class CompilerContextKind {
+enum class CompilerContextKind : uint16_t {
   Invalid = 0,
-  TranslationUnit,
-  Module,
-  Namespace,
-  Class,
-  Structure,
-  Union,
-  Function,
-  Variable,
-  Enumeration,
-  Typedef
+  TranslationUnit = 1,
+  Module = 1 << 1,
+  Namespace = 1 << 2,
+  Class = 1 << 3,
+  Struct = 1 << 4,
+  Union = 1 << 5,
+  Function = 1 << 6,
+  Variable = 1 << 7,
+  Enum = 1 << 8,
+  Typedef = 1 << 9,
+
+  Any = 1 << 15,
+  /// Match 0..n nested modules.
+  AnyModule = Any | Module,
+  /// Match any type.
+  AnyType = Any | Class | Struct | Union | Enum | Typedef
 };
 
 // Enumerations that can be used to specify the kind of metric we're looking at
diff --git a/src/llvm-project/lldb/include/lldb/lldb-private-interfaces.h b/src/llvm-project/lldb/include/lldb/lldb-private-interfaces.h
index 3a9f78a..27a2c4c 100644
--- a/src/llvm-project/lldb/include/lldb/lldb-private-interfaces.h
+++ b/src/llvm-project/lldb/include/lldb/lldb-private-interfaces.h
@@ -70,7 +70,7 @@
     const FileSpec *crash_file_path);
 typedef lldb::ScriptInterpreterSP (*ScriptInterpreterCreateInstance)(
     Debugger &debugger);
-typedef SymbolFile *(*SymbolFileCreateInstance)(ObjectFile *obj_file);
+typedef SymbolFile *(*SymbolFileCreateInstance)(lldb::ObjectFileSP objfile_sp);
 typedef SymbolVendor *(*SymbolVendorCreateInstance)(
     const lldb::ModuleSP &module_sp,
     lldb_private::Stream
@@ -82,8 +82,6 @@
 typedef bool (*WatchpointHitCallback)(void *baton,
                                       StoppointCallbackContext *context,
                                       lldb::user_id_t watch_id);
-typedef void (*OptionValueChangedCallback)(void *baton,
-                                           OptionValue *option_value);
 typedef bool (*ThreadPlanShouldStopHereCallback)(
     ThreadPlan *current_plan, Flags &flags, lldb::FrameComparison operation,
     Status &status, void *baton);
@@ -102,11 +100,6 @@
                                            lldb::LanguageType language,
                                            Debugger *debugger, Target *target,
                                            const char *repl_options);
-typedef void (*TypeSystemEnumerateSupportedLanguages)(
-    std::set<lldb::LanguageType> &languages_for_types,
-    std::set<lldb::LanguageType> &languages_for_expressions);
-typedef void (*REPLEnumerateSupportedLanguages)(
-    std::set<lldb::LanguageType> &languages);
 typedef int (*ComparisonFunction)(const void *, const void *);
 typedef void (*DebuggerInitializeCallback)(Debugger &debugger);
 
diff --git a/src/llvm-project/lldb/lit/CMakeLists.txt b/src/llvm-project/lldb/lit/CMakeLists.txt
deleted file mode 100644
index 672f05e..0000000
--- a/src/llvm-project/lldb/lit/CMakeLists.txt
+++ /dev/null
@@ -1,112 +0,0 @@
-# Test runner infrastructure for LLDB. This configures the LLDB test trees
-# for use by Lit, and delegates to LLVM's lit test handlers.
-
-# LLVM_BUILD_MODE is used in lit.site.cfg
-if (CMAKE_CFG_INTDIR STREQUAL ".")
-  set(LLVM_BUILD_MODE ".")
-else ()
-  set(LLVM_BUILD_MODE "%(build_mode)s")
-endif ()
-
-if (CMAKE_SIZEOF_VOID_P EQUAL 8)
-  set(LLDB_IS_64_BITS 1)
-endif()
-
-get_property(LLDB_DOTEST_ARGS GLOBAL PROPERTY LLDB_DOTEST_ARGS_PROPERTY)
-set(dotest_args_replacement ${LLVM_BUILD_MODE})
-
-if(LLDB_BUILT_STANDALONE)
-  # In paths to our build-tree, replace CMAKE_CFG_INTDIR with our configuration name placeholder.
-  string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} config_runtime_output_dir ${LLVM_RUNTIME_OUTPUT_INTDIR})
-  string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_DOTEST_ARGS "${LLDB_DOTEST_ARGS}")
-
-  # Remaining ones must be paths to the provided LLVM build-tree.
-  if(LLVM_CONFIGURATION_TYPES)
-    # LLDB uses single-config; LLVM multi-config; pick one and prefer Release types.
-    # Otherwise, if both use multi-config the default is fine.
-    if(NOT CMAKE_CONFIGURATION_TYPES)
-      if(RelWithDebInfo IN_LIST LLVM_CONFIGURATION_TYPES)
-        set(dotest_args_replacement RelWithDebInfo)
-      elseif(Release IN_LIST LLVM_CONFIGURATION_TYPES)
-        set(dotest_args_replacement Release)
-      else()
-        list(GET LLVM_CONFIGURATION_TYPES 0 dotest_args_replacement)
-      endif()
-    endif()
-  else()
-    # Common case: LLVM used a single-configuration generator like Ninja.
-    set(dotest_args_replacement ".")
-  endif()
-endif()
-
-string(REPLACE ${CMAKE_CFG_INTDIR} ${dotest_args_replacement} LLDB_DOTEST_ARGS "${LLDB_DOTEST_ARGS}")
-string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_LIBS_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
-string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
-
-list(APPEND LLDB_TEST_DEPS
-  LLDBUnitTests
-  dsymutil
-  lit-cpuid
-  llc
-  lldb
-  lldb-test
-  lli
-  llvm-config
-  llvm-mc
-  llvm-objcopy
-  llvm-readobj
-  )
-
-if(TARGET lld)
-  list(APPEND LLDB_TEST_DEPS lld)
-endif()
-
-# the value is not canonicalized within LLVM
-llvm_canonicalize_cmake_booleans(
-  LLDB_DISABLE_PYTHON
-  LLVM_ENABLE_ZLIB
-  LLDB_IS_64_BITS)
-
-configure_lit_site_cfg(
-  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
-  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
-  MAIN_CONFIG
-  ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py)
-configure_lit_site_cfg(
-  ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.py.in
-  ${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg.py
-  MAIN_CONFIG
-  ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.cfg.py)
-configure_lit_site_cfg(
-  ${CMAKE_CURRENT_SOURCE_DIR}/Suite/lit.site.cfg.in
-  ${CMAKE_CURRENT_BINARY_DIR}/Suite/lit.site.cfg)
-
-configure_file(
-  ${CMAKE_CURRENT_SOURCE_DIR}/lit-lldb-init.in
-  ${CMAKE_CURRENT_BINARY_DIR}/lit-lldb-init)
-
-if(NOT LLDB_BUILT_STANDALONE)
-  list(APPEND LLDB_TEST_DEPS
-    FileCheck
-    count
-    not
-  )
-endif()
-
-add_lit_testsuite(check-lldb-lit "Running lldb lit test suite"
-  ${CMAKE_CURRENT_BINARY_DIR}
-  DEPENDS ${LLDB_TEST_DEPS}
-  )
-
-set_target_properties(check-lldb-lit PROPERTIES FOLDER "lldb tests")
-
-# If we're building with an in-tree clang, then list clang as a dependency
-# to run tests.
-if (TARGET clang)
-  add_dependencies(check-lldb-lit clang)
-endif()
-
-add_lit_testsuites(LLDB
-  ${CMAKE_CURRENT_SOURCE_DIR}
-  DEPENDS ${LLDB_TEST_DEPS}
-  )
diff --git a/src/llvm-project/lldb/lit/Driver/TestConvenienceVariables.test b/src/llvm-project/lldb/lit/Driver/TestConvenienceVariables.test
deleted file mode 100644
index a7b6faa..0000000
--- a/src/llvm-project/lldb/lit/Driver/TestConvenienceVariables.test
+++ /dev/null
@@ -1,23 +0,0 @@
-REQUIRES: python
-RUN: %build %p/Inputs/hello.cpp -o %t
-RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s
-
-script print(lldb.debugger)
-
-CHECK: stop reason = breakpoint 1.1
-CHECK: Debugger (instance: {{.*}}, id: {{[0-9]+}})
-CHECK: script print(lldb.target)
-CHECK: TestConvenienceVariables.test
-CHECK: script print(lldb.process)
-CHECK: SBProcess: pid = {{[0-9]+}},
-CHECK-SAME:       state = stopped,
-CHECK-SAME:       threads = {{[0-9]+}},
-CHECK-SAME:       executable = TestConvenienceVariables.test
-CHECK: script print(lldb.thread.GetStopDescription(100))
-CHECK: breakpoint 1.1
-CHECK: script lldb.frame.GetLineEntry().GetLine()
-CHECK: 8
-CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
-CHECK: hello.c
-CHECK: script lldb.frame.GetFunctionName()
-CHECK: main
diff --git a/src/llvm-project/lldb/lit/Driver/TestSingleQuote.test b/src/llvm-project/lldb/lit/Driver/TestSingleQuote.test
deleted file mode 100644
index 0ba4a14..0000000
--- a/src/llvm-project/lldb/lit/Driver/TestSingleQuote.test
+++ /dev/null
@@ -1,6 +0,0 @@
-# Make sure lldb can handle filenames with single quotes in them.
-# RUN: %clang %p/Inputs/hello.c -g -o "%t-'pat"
-# RUN: %lldb -s %s "%t-'pat" | FileCheck %s
-
-br set -p return
-# CHECK: Breakpoint 1: where = TestSingleQuote.test.tmp-'pat`main
diff --git a/src/llvm-project/lldb/lit/ExecControl/StopHook/stop-hook-threads.test b/src/llvm-project/lldb/lit/ExecControl/StopHook/stop-hook-threads.test
deleted file mode 100644
index edb95ff..0000000
--- a/src/llvm-project/lldb/lit/ExecControl/StopHook/stop-hook-threads.test
+++ /dev/null
@@ -1,35 +0,0 @@
-# RUN: %clangxx -std=c++11 %p/Inputs/stop-hook-threads.cpp -g -o %t
-# RUN: %lldb -b -s %p/Inputs/stop-hook-threads-1.lldbinit -s %s -f %t \
-# RUN:     | FileCheck --check-prefix=CHECK --check-prefix=CHECK-NO-FILTER %s
-# RUN: %lldb -b -s %p/Inputs/stop-hook-threads-2.lldbinit -s %s -f %t \
-# RUN:     | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FILTER %s
-# XFAIL: system-netbsd
-# UNSUPPORTED: system-windows
-# This test is flakey and hangs on windows periodically: llvm.org/pr38373
-# UNSUPPORTED: system-linux, system-darwin
-
-thread list
-break set -f stop-hook-threads.cpp -p "Set break point at this line"
-target stop-hook list
-
-# CHECK: Hook: 1
-# CHECK-NEXT:  State: enabled
-# CHECK-NO-FILTER-NEXT: AutoContinue on
-# CHECK-FILTER-NEXT:  Thread
-# CHECK-FILTER-NEXT:  index: 2
-# CHECK-NEXT:  Commands: 
-# CHECK-NEXT:    expr lldb_val += 1
-# CHECK-NEXT:    thread list
-
-# CHECK-FILTER: Hook: 2
-# CHECK-FILTER-NEXT:  State: enabled
-# CHECK-FILTER-NEXT:  AutoContinue on
-# CHECK-FILTER-NEXT:  Commands: 
-# CHECK-FILTER-NEXT:    script print('Hit stop hook')
-
-# Get the threads going
-continue
-
-# Now make sure we hit the command the right number of times:
-# CHECK-NO-FILTER: lldb_val was set to: 15.
-# CHECK-FILTER: lldb_val was set to: 5.
diff --git a/src/llvm-project/lldb/lit/ExecControl/StopHook/stop-hook.test b/src/llvm-project/lldb/lit/ExecControl/StopHook/stop-hook.test
deleted file mode 100644
index ca6495e..0000000
--- a/src/llvm-project/lldb/lit/ExecControl/StopHook/stop-hook.test
+++ /dev/null
@@ -1,76 +0,0 @@
-# RUN: %clang %p/Inputs/stop-hook.c -g -o %t
-# Test setting stop-hook per-function
-# RUN: %lldb -b -s %p/Inputs/stop-hook-1.lldbinit -s %s -f %t \
-# RUN:      | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FUNC %s
-# Test setting stop-hook per-line range
-# RUN: %lldb -b -s %p/Inputs/stop-hook-2.lldbinit -s %s -f %t | FileCheck %s
-# Test setting stop-hook with multi-line expression
-# RUN: %lldb -b -s %p/Inputs/stop-hook-3.lldbinit -s %s -f %t | FileCheck %s
-# This test is not "unsupported" on Windows, but it fails because "expr ptr"
-# does not evaluate correctly. However, the error message contains the expected
-# string, so the test "passes" despite the fact that the commands failed
-# llvm.org/pr40119
-# UNSUPPORTED: system-windows
-
-break set -f stop-hook.c -p "// Set breakpoint here to test target stop-hook"
-break set -f stop-hook.c -p "// Another breakpoint which is outside of the stop-hook range"
-target stop-hook list
-
-# CHECK: Hook: 1
-# CHECK-NEXT:  State: enabled
-# CHECK-NEXT:  Specifier:
-# CHECK-FUNC-NEXT:    Function: b.
-# CHECK-NEXT:  Commands: 
-# CHECK-NEXT:    expr ptr
-
-target stop-hook disable
-
-target stop-hook list
-# CHECK: Hook: 1
-# CHECK-NEXT:  State: disabled
-# CHECK-NEXT:  Specifier:
-# CHECK-FUNC-NEXT:    Function: b.
-# CHECK-NEXT:  Commands: 
-# CHECK-NEXT:    expr ptr
-
-target stop-hook enable
-
-target stop-hook list
-# CHECK: Hook: 1
-# CHECK-NEXT:  State: enabled
-# CHECK-NEXT:  Specifier:
-# CHECK-FUNC-NEXT:    Function: b.
-# CHECK-NEXT:  Commands: 
-# CHECK-NEXT:    expr ptr
-
-run
-# Stopping inside of the stop hook range
-# CHECK: (lldb) run
-# CHECK-NEXT: (void *) $0 = 0x
-
-thread step-over
-# Stepping inside of the stop hook range
-# CHECK: (lldb) thread step-over
-# CHECK-NEXT: (void *) $1 = 0x
-# CHECK: ->{{.*}} // We should stop here after stepping.
-
-process continue
-# Stopping outside of the stop hook range
-# CHECK: (lldb) process continue
-# CHECK-NOT: (void *)
-# CHECK: ->{{.*}} // Another breakpoint which is outside of the stop-hook range.
-
-thread step-over
-# Stepping inside of the stop hook range
-# CHECK: (lldb) thread step-over
-# CHECK-NOT: (void *)
-
-settings set auto-confirm true
-target stop-hook delete
-
-target stop-hook list
-# CHECK: (lldb) target stop-hook list
-# CHECK-NOT: Hook: 1
-# CHECK: No stop hooks
-# CHECK-NOT: Hook: 1
-
diff --git a/src/llvm-project/lldb/lit/Expr/TestIRMemoryMap.test b/src/llvm-project/lldb/lit/Expr/TestIRMemoryMap.test
deleted file mode 100644
index a8f835b..0000000
--- a/src/llvm-project/lldb/lit/Expr/TestIRMemoryMap.test
+++ /dev/null
@@ -1,12 +0,0 @@
-# UNSUPPORTED: system-windows
-
-# RUN: %clangxx %p/Inputs/call-function.cpp -g -o %t
-
-# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-basic
-# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-basic
-
-# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-overlap1
-# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-overlap1
-
-# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-mix-malloc-free
-# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-mix-malloc-free
diff --git a/src/llvm-project/lldb/lit/Expr/TestIRMemoryMapWindows.test b/src/llvm-project/lldb/lit/Expr/TestIRMemoryMapWindows.test
deleted file mode 100644
index f25db59..0000000
--- a/src/llvm-project/lldb/lit/Expr/TestIRMemoryMapWindows.test
+++ /dev/null
@@ -1,13 +0,0 @@
-# REQUIRES: system-windows
-
-# RUN: %clang_cl /Zi /GS- %p/Inputs/call-function.cpp /c /o %t.obj
-# RUN: %msvc_link /debug:full %t.obj /out:%t
-
-# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-basic
-# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-basic
-
-# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-overlap1
-# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-overlap1
-
-# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-mix-malloc-free
-# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-mix-malloc-free
diff --git a/src/llvm-project/lldb/lit/Heap/heap-cstr.test b/src/llvm-project/lldb/lit/Heap/heap-cstr.test
deleted file mode 100644
index 00d19ff..0000000
--- a/src/llvm-project/lldb/lit/Heap/heap-cstr.test
+++ /dev/null
@@ -1,10 +0,0 @@
-# REQUIRES: system-darwin
-# RUN: %clang %p/Inputs/cstr.c -g -o %t
-# RUN: %lldb -b -s %s -f %t | FileCheck %s
-
-br set -p return
-command script import lldb.macosx.heap
-run
-cstr "patatino"
-
-# CHECK: {{.*}}: malloc(    16) -> {{.*}}
diff --git a/src/llvm-project/lldb/lit/Minidump/dump-all.test b/src/llvm-project/lldb/lit/Minidump/dump-all.test
deleted file mode 100644
index 92f2be2..0000000
--- a/src/llvm-project/lldb/lit/Minidump/dump-all.test
+++ /dev/null
@@ -1,126 +0,0 @@
-# RUN: yaml2obj %s > %t
-# RUN: %lldb -c %t -o 'process plugin dump --all' | \
-# RUN: FileCheck --check-prefix=CHECKDIR --check-prefix=CHECKCPU \
-# RUN: --check-prefix=CHECKSTATUS --check-prefix=CHECKLSB \
-# RUN: --check-prefix=CHECKCMD --check-prefix=CHECKENV \
-# RUN: --check-prefix=CHECKAUX --check-prefix=CHECKMAP \
-# RUN: --check-prefix=CHECKSTAT --check-prefix=CHECKUP --check-prefix=CHECKFD %s
-# RUN: %lldb -c %t -o 'process plugin dump -a' | \
-# RUN: FileCheck --check-prefix=CHECKDIR --check-prefix=CHECKCPU \
-# RUN: --check-prefix=CHECKSTATUS --check-prefix=CHECKLSB \
-# RUN: --check-prefix=CHECKCMD --check-prefix=CHECKENV \
-# RUN: --check-prefix=CHECKAUX --check-prefix=CHECKMAP \
-# RUN: --check-prefix=CHECKSTAT --check-prefix=CHECKUP --check-prefix=CHECKFD %s
-# RUN: %lldb -c %t -o 'process plugin dump --directory' | FileCheck --check-prefix=CHECKDIR %s
-# RUN: %lldb -c %t -o 'process plugin dump -d' | FileCheck --check-prefix=CHECKDIR %s
-# RUN: %lldb -c %t -o 'process plugin dump --linux' | \
-# RUN: FileCheck --check-prefix=CHECKCPU --check-prefix=CHECKSTATUS \
-# RUN: --check-prefix=CHECKLSB --check-prefix=CHECKCMD --check-prefix=CHECKENV \
-# RUN: --check-prefix=CHECKAUX --check-prefix=CHECKMAP --check-prefix=CHECKSTAT \
-# RUN: --check-prefix=CHECKUP --check-prefix=CHECKFD %s
-# RUN: %lldb -c %t -o 'process plugin dump --cpuinfo'     | FileCheck --check-prefix=CHECKCPU %s
-# RUN: %lldb -c %t -o 'process plugin dump -C'            | FileCheck --check-prefix=CHECKCPU %s
-# RUN: %lldb -c %t -o 'process plugin dump --status'      | FileCheck --check-prefix=CHECKSTATUS %s
-# RUN: %lldb -c %t -o 'process plugin dump -s'            | FileCheck --check-prefix=CHECKSTATUS %s
-# RUN: %lldb -c %t -o 'process plugin dump --lsb-release' | FileCheck --check-prefix=CHECKLSB %s
-# RUN: %lldb -c %t -o 'process plugin dump -r'            | FileCheck --check-prefix=CHECKLSB %s
-# RUN: %lldb -c %t -o 'process plugin dump --cmdline'     | FileCheck --check-prefix=CHECKCMD %s
-# RUN: %lldb -c %t -o 'process plugin dump -c'            | FileCheck --check-prefix=CHECKCMD %s
-# RUN: %lldb -c %t -o 'process plugin dump --environ'     | FileCheck --check-prefix=CHECKENV %s
-# RUN: %lldb -c %t -o 'process plugin dump -e'            | FileCheck --check-prefix=CHECKENV %s
-# RUN: %lldb -c %t -o 'process plugin dump --auxv'        | FileCheck --check-prefix=CHECKAUX %s
-# RUN: %lldb -c %t -o 'process plugin dump -x'            | FileCheck --check-prefix=CHECKAUX %s
-# RUN: %lldb -c %t -o 'process plugin dump --maps'        | FileCheck --check-prefix=CHECKMAP %s
-# RUN: %lldb -c %t -o 'process plugin dump -m'            | FileCheck --check-prefix=CHECKMAP %s
-# RUN: %lldb -c %t -o 'process plugin dump --stat'        | FileCheck --check-prefix=CHECKSTAT %s
-# RUN: %lldb -c %t -o 'process plugin dump -S'            | FileCheck --check-prefix=CHECKSTAT %s
-# RUN: %lldb -c %t -o 'process plugin dump --uptime'      | FileCheck --check-prefix=CHECKUP %s
-# RUN: %lldb -c %t -o 'process plugin dump -u'            | FileCheck --check-prefix=CHECKUP %s
-# RUN: %lldb -c %t -o 'process plugin dump --fd'          | FileCheck --check-prefix=CHECKFD %s
-# RUN: %lldb -c %t -o 'process plugin dump -f'            | FileCheck --check-prefix=CHECKFD %s
-
-# CHECKDIR:      RVA        SIZE       TYPE       StreamType
-# CHECKDIR-NEXT: ---------- ---------- ---------- --------------------------
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000038 0x00000007 SystemInfo
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x0000000f MiscInfo
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000010 0x47670003 LinuxCPUInfo
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000001a 0x47670004 LinuxProcStatus
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x47670005 LinuxLSBRelease
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000001b 0x47670006 LinuxCMDLine
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000001b 0x47670007 LinuxEnviron
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x47670008 LinuxAuxv
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x000000bb 0x47670009 LinuxMaps
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x4767000b LinuxProcStat
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000000e 0x4767000c LinuxProcUptime
-# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000016 0x4767000d LinuxProcFD
-
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM64
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            MiscInfo
-    Content:         00000000010000007B000000000000000000000000000000
-  - Type:            LinuxCPUInfo
-    Text:             |
-      cpu info output
-
-# CHECKCPU:      /proc/cpuinfo:
-# CHECKCPU-NEXT: cpu info output
-  - Type:            LinuxProcStatus
-    Text:             |
-      /proc/<pid>/status output
-
-# CHECKSTATUS:      /proc/PID/status:
-# CHECKSTATUS-NEXT: /proc/<pid>/status output
-  - Type:            LinuxLSBRelease
-    Text:             |
-      /etc/lsb-release output
-
-# CHECKLSB:      /etc/lsb-release:
-# CHECKLSB-NEXT: /etc/lsb-release output
-  - Type:            LinuxCMDLine
-    Text:             |
-      /proc/<pid>/cmdline output
-
-# CHECKCMD:      /proc/PID/cmdline:
-# CHECKCMD-NEXT: /proc/<pid>/cmdline output
-  - Type:            LinuxEnviron
-    Content:         2F70726F632F3C7069643E2F656E7669726F6E206F757470757400
-# CHECKENV:      /proc/PID/environ:
-# CHECKENV-NEXT: /proc/<pid>/environ output
-  - Type:            LinuxAuxv
-    Content:         2F70726F632F3C7069643E2F61757876206F757470757400
-# CHECKAUX:      /proc/PID/auxv:
-# CHECKAUX-NEXT: 0x00000000: 2f 70 72 6f 63 2f 3c 70 69 64 3e 2f 61 75 78 76  /proc/<pid>/auxv
-# CHECKAUX-NEXT: 0x00000010: 20 6f 75 74 70 75 74 00                           output.
-  - Type:            LinuxMaps
-    Text:             |
-      400d9000-400db000 r-xp 00000000 b3:04 227        /system/bin/app_process
-      400db000-400dc000 r--p 00001000 b3:04 227        /system/bin/app_process
-      400dc000-400dd000 rw-p 00000000 00:00 0 
-
-# CHECKMAP:      /proc/PID/maps:
-# CHECKMAP-NEXT: 400d9000-400db000 r-xp 00000000 b3:04 227        /system/bin/app_process
-# CHECKMAP-NEXT: 400db000-400dc000 r--p 00001000 b3:04 227        /system/bin/app_process
-# CHECKMAP-NEXT: 400dc000-400dd000 rw-p 00000000 00:00 0 
-  - Type:            LinuxProcStat
-    Text:             |
-      /proc/<pid>/stat output
-
-# CHECKSTAT:      /proc/PID/stat:
-# CHECKSTAT-NEXT: /proc/<pid>/stat output
-  - Type:            LinuxProcUptime
-    Text:             |
-      uptime output
-
-# CHECKUP:      uptime:
-# CHECKUP-NEXT: uptime output
-  - Type:            LinuxProcFD
-    Content:         2F70726F632F3C7069643E2F6664206F757470757400
-# CHECKFD:      /proc/PID/fd:
-# CHECKFD-NEXT: /proc/<pid>/fd output
-...
diff --git a/src/llvm-project/lldb/lit/Minidump/fb-dump.test b/src/llvm-project/lldb/lit/Minidump/fb-dump.test
deleted file mode 100644
index 1cd777c..0000000
--- a/src/llvm-project/lldb/lit/Minidump/fb-dump.test
+++ /dev/null
@@ -1,126 +0,0 @@
-# RUN: yaml2obj %s > %t
-# RUN: %lldb -c %t -o 'process plugin dump --all' | \
-# RUN:   FileCheck --check-prefix=CHECK-DIR --check-prefix=CHECK-APPDATA \
-# RUN:   --check-prefix=CHECK-BUILD --check-prefix=CHECK-VERSION \
-# RUN:   --check-prefix=CHECK-JAVA --check-prefix=CHECK-DALVIK \
-# RUN:   --check-prefix=CHECK-UNWIND --check-prefix=CHECK-ERROR \
-# RUN:   --check-prefix=CHECK-APPSTATE --check-prefix=CHECK-ABORT \
-# RUN:   --check-prefix=CHECK-THREAD --check-prefix=CHECK-LOGCAT %s
-# RUN: %lldb -c %t -o 'process plugin dump -a' | \
-# RUN:   FileCheck --check-prefix=CHECK-DIR --check-prefix=CHECK-APPDATA \
-# RUN:   --check-prefix=CHECK-BUILD --check-prefix=CHECK-VERSION \
-# RUN:   --check-prefix=CHECK-JAVA --check-prefix=CHECK-DALVIK \
-# RUN:   --check-prefix=CHECK-UNWIND --check-prefix=CHECK-ERROR \
-# RUN:   --check-prefix=CHECK-APPSTATE --check-prefix=CHECK-ABORT \
-# RUN:   --check-prefix=CHECK-THREAD --check-prefix=CHECK-LOGCAT %s
-# RUN: %lldb -c %t -o 'process plugin dump --facebook' | \
-# RUN:   FileCheck --check-prefix=CHECK-APPDATA \
-# RUN:   --check-prefix=CHECK-BUILD --check-prefix=CHECK-VERSION \
-# RUN:   --check-prefix=CHECK-JAVA --check-prefix=CHECK-DALVIK \
-# RUN:   --check-prefix=CHECK-UNWIND --check-prefix=CHECK-ERROR \
-# RUN:   --check-prefix=CHECK-APPSTATE --check-prefix=CHECK-ABORT \
-# RUN:   --check-prefix=CHECK-THREAD --check-prefix=CHECK-LOGCAT %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-app-data' | \
-# RUN:   FileCheck --check-prefix=CHECK-APPDATA %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-build-id' | \
-# RUN:   FileCheck --check-prefix=CHECK-BUILD %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-version' | \
-# RUN:   FileCheck --check-prefix=CHECK-VERSION %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-java-stack' | \
-# RUN:   FileCheck --check-prefix=CHECK-JAVA %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-dalvik-info' | \
-# RUN:   FileCheck --check-prefix=CHECK-DALVIK %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-unwind-symbols' | \
-# RUN:   FileCheck --check-prefix=CHECK-UNWIND %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-error-log' | \
-# RUN:   FileCheck --check-prefix=CHECK-ERROR %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-app-state-log' | \
-# RUN:   FileCheck --check-prefix=CHECK-APPSTATE %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-abort-reason' | \
-# RUN:   FileCheck --check-prefix=CHECK-ABORT %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-thread-name' | \
-# RUN:   FileCheck --check-prefix=CHECK-THREAD %s
-# RUN: %lldb -c %t -o 'process plugin dump --fb-logcat' | \
-# RUN:   FileCheck --check-prefix=CHECK-LOGCAT %s
-# CHECK-DIR:      RVA        SIZE       TYPE       StreamType
-# CHECK-DIR-NEXT: ---------- ---------- ---------- --------------------------
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000038 0x00000007 SystemInfo
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x0000000f MiscInfo
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000013 0xfacecb00 FacebookDumpErrorLog
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000015 0xfacee000 FacebookThreadName
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000010 0xface1ca7 FacebookLogcat
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000017 0xfacecccc FacebookAppStateLog
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000016 0xfacedead FacebookAbortReason
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000039 0xfacecafa FacebookAppCustomData
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000005 0xfacecafb FacebookBuildID
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000000d 0xfacecafc FacebookAppVersionName
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000019 0xfacecafd FacebookJavaStack
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000015 0xfacecafe FacebookDalvikInfo
-# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000005 0xfacecaff FacebookUnwindSymbols
-
---- !minidump
-Streams:         
-  - Type:            SystemInfo
-    Processor Arch:  ARM64
-    Platform ID:     Linux
-    CSD Version:     '15E216'
-    CPU:             
-      CPUID:           0x00000000
-  - Type:            MiscInfo
-    Content:         00000000010000007B000000000000000000000000000000
-  - Type:            FacebookDumpErrorLog
-    Content:         46616365626F6F6B206572726F72206C6F6700
-  - Type:            FacebookThreadName
-    Content:         46616365626F6F6B20746872656164206E616D6500
-  - Type:            FacebookLogcat
-    Content:         46616365626F6F6B206C6F6763617400
-  - Type:            FacebookAppStateLog
-    Content:         46616365626F6F6B20617070207374617465206C6F6700
-  - Type:            FacebookAbortReason
-    Content:         46616365626F6F6B2061626F727420726561736F6E00
-  - Type:            FacebookAppCustomData
-    Content:         7B22676C6F62616C223A207B2246696E6765727072696E74223A22696E76616C6964206465766963652066696E6765727072696E74227D7D00
-  - Type:            FacebookBuildID
-    Content:         '0403020100'
-  - Type:            FacebookAppVersionName
-    Content:         3230372E302E302E302E383600
-  - Type:            FacebookJavaStack
-    Content:         46616365626F6F6B206A61766120737461636B20696E666F00
-  - Type:            FacebookDalvikInfo
-    Content:         46616365626F6F6B2064616C76696B20696E666F00
-  - Type:            FacebookUnwindSymbols
-    Content:         '1122334400'
-...
-
-# CHECK-APPDATA:      Facebook App Data:
-# CHECK-APPDATA-NEXT: {"global": {"Fingerprint":"invalid device fingerprint"}}
-
-# CHECK-BUILD:      Facebook Build ID:
-# CHECK-BUILD-NEXT: 16909060
-
-# CHECK-VERSION:      Facebook Version String:
-# CHECK-VERSION-NEXT: 207.0.0.0.86
-
-# CHECK-JAVA:      Facebook Java Stack:
-# CHECK-JAVA-NEXT: Facebook java stack info
-
-# CHECK-DALVIK:      Facebook Dalvik Info:
-# CHECK-DALVIK-NEXT: Facebook dalvik info
-
-# CHECK-UNWIND:      Facebook Unwind Symbols Bytes:
-# CHECK-UNWIND-NEXT: 0x00000000: 11 22 33 44 00
-
-# CHECK-ERROR:      Facebook Error Log:
-# CHECK-ERROR-NEXT: Facebook error log
-
-# CHECK-APPSTATE:      Faceook Application State Log:
-# CHECK-APPSTATE-NEXT: Facebook app state log
-
-# CHECK-ABORT:      Facebook Abort Reason:
-# CHECK-ABORT-NEXT: Facebook abort reason
-
-# CHECK-THREAD:      Facebook Thread Name:
-# CHECK-THREAD-NEXT: Facebook thread name
-
-# CHECK-LOGCAT:      Facebook Logcat:
-# CHECK-LOGCAT-NEXT: Facebook logcat
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/build-id-case.yaml b/src/llvm-project/lldb/lit/Modules/ELF/build-id-case.yaml
deleted file mode 100644
index c95ffbd..0000000
--- a/src/llvm-project/lldb/lit/Modules/ELF/build-id-case.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
-# RUN: mkdir -p %t/.build-id/1b
-# RUN: yaml2obj %s > %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
-# RUN: cd %t
-# RUN: llvm-objcopy --strip-all --add-gnu-debuglink=.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug %t/stripped.out
-# RUN: lldb-test object-file %t/stripped.out | FileCheck %s
-
-# CHECK: Name: .debug_frame
-# CHECK-NEXT: Type: dwarf-frame
-
---- !ELF
-FileHeader:
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_EXEC
-  Machine:         EM_X86_64
-  Entry:           0x00000000004003D0
-Sections:
-  - Name:            .note.gnu.build-id
-    Type:            SHT_NOTE
-    Flags:           [ SHF_ALLOC ]
-    Address:         0x0000000000400274
-    AddressAlign:    0x0000000000000004
-    Content:         040000001400000003000000474E55001B8A73AC238390E32A7FF4AC8EBE4D6A41ECF5C9
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Address:         0x00000000004003D0
-    AddressAlign:    0x0000000000000010
-    Content:         DEADBEEFBAADF00D
-  - Name:            .debug_frame
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000008
-    Content:         DEADBEEFBAADF00D
-Symbols:
-  - Name:            main
-    Type:            STT_FUNC
-    Section:         .text
-    Value:           0x00000000004003D0
-    Size:            0x0000000000000008
-...
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/section-types.yaml b/src/llvm-project/lldb/lit/Modules/ELF/section-types.yaml
deleted file mode 100644
index 9f6b4c0..0000000
--- a/src/llvm-project/lldb/lit/Modules/ELF/section-types.yaml
+++ /dev/null
@@ -1,88 +0,0 @@
-# RUN: yaml2obj %s > %t
-# RUN: lldb-test object-file %t | FileCheck %s
-
-# CHECK-LABEL: Name: .text
-# CHECK-NEXT: Type: code
-
-# CHECK-LABEL: Name: .debug_info
-# CHECK-NEXT: Type: dwarf-info
-
-# CHECK-LABEL: Name: .debug_types
-# CHECK-NEXT: Type: dwarf-types
-
-# CHECK-LABEL: Name: .debug_types.dwo
-# CHECK-NEXT: Type: dwarf-types-dwo
-
-# CHECK-LABEL: Name: .debug_names
-# CHECK-NEXT: Type: dwarf-names
-
-# CHECK-LABEL: Name: .gnu_debugaltlink
-# CHECK-NEXT: Type: dwarf-gnu-debugaltlink
-
-# CHECK-LABEL: Name: __codesection
-# CHECK-NEXT: Type: code
-
-# CHECK-LABEL: Name: .data
-# CHECK-NEXT: Type: data
-# CHECK: Thread specific: no
-
-# CHECK-LABEL: Name: .tdata
-# CHECK-NEXT: Type: data
-# CHECK: Thread specific: yes
-
-# CHECK-LABEL: Name: .tbss
-# CHECK-NEXT: Type: zero-fill
-# CHECK: Thread specific: yes
-
---- !ELF
-FileHeader:
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_REL
-  Machine:         EM_X86_64
-  Entry:           0x00000000000007A0
-Sections:
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Content:         DEADBEEFBAADF00D
-  - Name:            .debug_info
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         DEADBEEFBAADF00D
-  - Name:            .debug_types
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         DEADBEEFBAADF00D
-  - Name:            .debug_types.dwo
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         DEADBEEFBAADF00D
-  - Name:            .debug_names
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         DEADBEEFBAADF00D
-  - Name:            .gnu_debugaltlink
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         DEADBEEFBAADF00D
-  - Name:            __codesection
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Content:         DEADBEEFBAADF00D
-  - Name:            .data
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_WRITE, SHF_ALLOC ]
-    AddressAlign:    0x0000000000000004
-    Content:         2F000000
-  - Name:            .tdata
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_WRITE, SHF_ALLOC, SHF_TLS ]
-    AddressAlign:    0x0000000000000004
-    Content:         2F000000
-  - Name:            .tbss
-    Type:            SHT_NOBITS
-    Flags:           [ SHF_WRITE, SHF_ALLOC, SHF_TLS ]
-    AddressAlign:    0x0000000000000004
-    Size:            0x0000000000000004
-...
diff --git a/src/llvm-project/lldb/lit/Modules/MachO/lc_build_version.yaml b/src/llvm-project/lldb/lit/Modules/MachO/lc_build_version.yaml
deleted file mode 100644
index 4479662..0000000
--- a/src/llvm-project/lldb/lit/Modules/MachO/lc_build_version.yaml
+++ /dev/null
@@ -1,209 +0,0 @@
-# RUN: yaml2obj %s > %t.out
-# RUN: lldb-test symbols %t.out | FileCheck %s
-# Test that the deployment target is parsed from the load commands.
-# CHECK: x86_64-apple-macosx10.14.0
---- !mach-o
-FileHeader:      
-  magic:           0xFEEDFACF
-  cputype:         0x01000007
-  cpusubtype:      0x80000003
-  filetype:        0x00000002
-  ncmds:           14
-  sizeofcmds:      744
-  flags:           0x00200085
-  reserved:        0x00000000
-LoadCommands:    
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         __PAGEZERO
-    vmaddr:          0
-    vmsize:          4294967296
-    fileoff:         0
-    filesize:        0
-    maxprot:         0
-    initprot:        0
-    nsects:          0
-    flags:           0
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         232
-    segname:         __TEXT
-    vmaddr:          4294967296
-    vmsize:          4096
-    fileoff:         0
-    filesize:        4096
-    maxprot:         7
-    initprot:        5
-    nsects:          2
-    flags:           0
-    Sections:        
-      - sectname:        __text
-        segname:         __TEXT
-        addr:            0x0000000100000FB0
-        size:            8
-        offset:          0x00000FB0
-        align:           4
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x80000400
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-      - sectname:        __unwind_info
-        segname:         __TEXT
-        addr:            0x0000000100000FB8
-        size:            72
-        offset:          0x00000FB8
-        align:           2
-        reloff:          0x00000000
-        nreloc:          0
-        flags:           0x00000000
-        reserved1:       0x00000000
-        reserved2:       0x00000000
-        reserved3:       0x00000000
-  - cmd:             LC_SEGMENT_64
-    cmdsize:         72
-    segname:         __LINKEDIT
-    vmaddr:          4294971392
-    vmsize:          4096
-    fileoff:         4096
-    filesize:        152
-    maxprot:         7
-    initprot:        1
-    nsects:          0
-    flags:           0
-  - cmd:             LC_DYLD_INFO_ONLY
-    cmdsize:         48
-    rebase_off:      0
-    rebase_size:     0
-    bind_off:        0
-    bind_size:       0
-    weak_bind_off:   0
-    weak_bind_size:  0
-    lazy_bind_off:   0
-    lazy_bind_size:  0
-    export_off:      4096
-    export_size:     48
-  - cmd:             LC_SYMTAB
-    cmdsize:         24
-    symoff:          4152
-    nsyms:           3
-    stroff:          4200
-    strsize:         48
-  - cmd:             LC_DYSYMTAB
-    cmdsize:         80
-    ilocalsym:       0
-    nlocalsym:       0
-    iextdefsym:      0
-    nextdefsym:      2
-    iundefsym:       2
-    nundefsym:       1
-    tocoff:          0
-    ntoc:            0
-    modtaboff:       0
-    nmodtab:         0
-    extrefsymoff:    0
-    nextrefsyms:     0
-    indirectsymoff:  0
-    nindirectsyms:   0
-    extreloff:       0
-    nextrel:         0
-    locreloff:       0
-    nlocrel:         0
-  - cmd:             LC_LOAD_DYLINKER
-    cmdsize:         32
-    name:            12
-    PayloadString:   /usr/lib/dyld
-    ZeroPadBytes:    7
-  - cmd:             LC_UUID
-    cmdsize:         24
-    uuid:            8F41E140-23B9-3720-AC28-4E7AF9D159BA
-  - cmd:             LC_BUILD_VERSION
-    cmdsize:         32
-    platform:        1
-    minos:           658944
-    sdk:             658944
-    ntools:          1
-    Tools:           
-      - tool:            3
-        version:         26738944
-  - cmd:             LC_SOURCE_VERSION
-    cmdsize:         16
-    version:         0
-  - cmd:             LC_MAIN
-    cmdsize:         24
-    entryoff:        4016
-    stacksize:       0
-  - cmd:             LC_LOAD_DYLIB
-    cmdsize:         56
-    dylib:           
-      name:            24
-      timestamp:       2
-      current_version: 82102276
-      compatibility_version: 65536
-    PayloadString:   /usr/lib/libSystem.B.dylib
-    ZeroPadBytes:    6
-  - cmd:             LC_FUNCTION_STARTS
-    cmdsize:         16
-    dataoff:         4144
-    datasize:        8
-  - cmd:             LC_DATA_IN_CODE
-    cmdsize:         16
-    dataoff:         4152
-    datasize:        0
-LinkEditData:    
-  ExportTrie:      
-    TerminalSize:    0
-    NodeOffset:      0
-    Name:            ''
-    Flags:           0x0000000000000000
-    Address:         0x0000000000000000
-    Other:           0x0000000000000000
-    ImportName:      ''
-    Children:        
-      - TerminalSize:    0
-        NodeOffset:      5
-        Name:            _
-        Flags:           0x0000000000000000
-        Address:         0x0000000000000000
-        Other:           0x0000000000000000
-        ImportName:      ''
-        Children:        
-          - TerminalSize:    2
-            NodeOffset:      33
-            Name:            _mh_execute_header
-            Flags:           0x0000000000000000
-            Address:         0x0000000000000000
-            Other:           0x0000000000000000
-            ImportName:      ''
-          - TerminalSize:    3
-            NodeOffset:      37
-            Name:            main
-            Flags:           0x0000000000000000
-            Address:         0x0000000000000FB0
-            Other:           0x0000000000000000
-            ImportName:      ''
-  NameList:        
-    - n_strx:          2
-      n_type:          0x0F
-      n_sect:          1
-      n_desc:          16
-      n_value:         4294967296
-    - n_strx:          22
-      n_type:          0x0F
-      n_sect:          1
-      n_desc:          0
-      n_value:         4294971312
-    - n_strx:          28
-      n_type:          0x01
-      n_sect:          0
-      n_desc:          256
-      n_value:         0
-  StringTable:     
-    - ' '
-    - __mh_execute_header
-    - _main
-    - dyld_stub_binder
-    - ''
-    - ''
-    - ''
-...
diff --git a/src/llvm-project/lldb/lit/Modules/PECOFF/export-dllfunc.yaml b/src/llvm-project/lldb/lit/Modules/PECOFF/export-dllfunc.yaml
deleted file mode 100644
index 1f858d7..0000000
--- a/src/llvm-project/lldb/lit/Modules/PECOFF/export-dllfunc.yaml
+++ /dev/null
@@ -1,176 +0,0 @@
-# REQUIRES: lld
-# RUN: yaml2obj < %s > %t.obj
-#
-# RUN: lld-link /machine:x64 /out:%t.dll /noentry /nodefaultlib /debug /dll %t.obj /export:DllFunc
-#
-# RUN: lldb-test object-file %t.dll | FileCheck -check-prefix=BASIC-CHECK %s
-# RUN: lldb-test object-file -dep-modules %t.dll | FileCheck -check-prefix=DEPS %s
-
-# BASIC-CHECK: Plugin name: pe-coff
-
-# UUID should not be empty if the module is built with debug info.
-# BASIC-CHECK-DAG: UUID: {{[0-9A-F]{7,}[0-9A-F]}}-{{.*}}
-
-# BASIC-CHECK: Showing 3 subsections
-# BASIC-CHECK:  Index: 0
-# BASIC-CHECK:  Name: .text
-# BASIC-CHECK:  Type: code
-# BASIC-CHECK:  VM size: 22
-# BASIC-CHECK:  File size: 512
-#
-# BASIC-CHECK:  Index: 1
-# BASIC-CHECK:  Name: .rdata
-# BASIC-CHECK:  Type: data
-# BASIC-CHECK:  VM size: {{.}}
-# BASIC-CHECK:  File size: 512
-#
-# BASIC-CHECK:  Index: 2
-# BASIC-CHECK:  Name: .pdata
-# BASIC-CHECK:  Type: data
-# BASIC-CHECK:  VM size: 12
-# BASIC-CHECK:  File size: 512
-#
-# DEPS: Showing 0 dependent module(s)
-
-
---- !COFF
-header:          
-  Machine:         IMAGE_FILE_MACHINE_AMD64
-  Characteristics: [  ]
-sections:        
-  - Name:            .text
-    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
-    Alignment:       16
-    SectionData:     50894C24048B4C24040FAF4C2404890C248B042459C3
-  - Name:            .data
-    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
-    Alignment:       4
-    SectionData:     ''
-  - Name:            .bss
-    Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
-    Alignment:       4
-    SectionData:     ''
-  - Name:            .xdata
-    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
-    Alignment:       4
-    SectionData:     '0101010001020000'
-  - Name:            .drectve
-    Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
-    Alignment:       1
-    SectionData:     202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962
-  - Name:            .pdata
-    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
-    Alignment:       4
-    SectionData:     '000000001600000000000000'
-    Relocations:     
-      - VirtualAddress:  0
-        SymbolName:      'DllFunc'
-        Type:            IMAGE_REL_AMD64_ADDR32NB
-      - VirtualAddress:  4
-        SymbolName:      'DllFunc'
-        Type:            IMAGE_REL_AMD64_ADDR32NB
-      - VirtualAddress:  8
-        SymbolName:      .xdata
-        Type:            IMAGE_REL_AMD64_ADDR32NB
-  - Name:            .llvm_addrsig
-    Characteristics: [ IMAGE_SCN_LNK_REMOVE ]
-    Alignment:       1
-    SectionData:     ''
-symbols:         
-  - Name:            .text
-    Value:           0
-    SectionNumber:   1
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    SectionDefinition: 
-      Length:          22
-      NumberOfRelocations: 0
-      NumberOfLinenumbers: 0
-      CheckSum:        3054557294
-      Number:          1
-  - Name:            .data
-    Value:           0
-    SectionNumber:   2
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    SectionDefinition: 
-      Length:          0
-      NumberOfRelocations: 0
-      NumberOfLinenumbers: 0
-      CheckSum:        0
-      Number:          2
-  - Name:            .bss
-    Value:           0
-    SectionNumber:   3
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    SectionDefinition: 
-      Length:          0
-      NumberOfRelocations: 0
-      NumberOfLinenumbers: 0
-      CheckSum:        0
-      Number:          3
-  - Name:            .xdata
-    Value:           0
-    SectionNumber:   4
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    SectionDefinition: 
-      Length:          8
-      NumberOfRelocations: 0
-      NumberOfLinenumbers: 0
-      CheckSum:        448359300
-      Number:          4
-  - Name:            .drectve
-    Value:           0
-    SectionNumber:   5
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    SectionDefinition: 
-      Length:          48
-      NumberOfRelocations: 0
-      NumberOfLinenumbers: 0
-      CheckSum:        149686238
-      Number:          5
-  - Name:            .pdata
-    Value:           0
-    SectionNumber:   6
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    SectionDefinition: 
-      Length:          12
-      NumberOfRelocations: 3
-      NumberOfLinenumbers: 0
-      CheckSum:        3134470316
-      Number:          6
-  - Name:            .llvm_addrsig
-    Value:           0
-    SectionNumber:   7
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-    SectionDefinition: 
-      Length:          0
-      NumberOfRelocations: 0
-      NumberOfLinenumbers: 0
-      CheckSum:        0
-      Number:          7
-  - Name:            '@feat.00'
-    Value:           0
-    SectionNumber:   -1
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_NULL
-    StorageClass:    IMAGE_SYM_CLASS_STATIC
-  - Name:            'DllFunc'
-    Value:           0
-    SectionNumber:   1
-    SimpleType:      IMAGE_SYM_TYPE_NULL
-    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
-    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
-...
diff --git a/src/llvm-project/lldb/lit/Modules/PECOFF/subsections.yaml b/src/llvm-project/lldb/lit/Modules/PECOFF/subsections.yaml
deleted file mode 100644
index d7ecf68..0000000
--- a/src/llvm-project/lldb/lit/Modules/PECOFF/subsections.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
-# RUN: yaml2obj %s > %t
-# RUN: lldb-test object-file %t | FileCheck %s
-
-
-# CHECK:      Showing 1 sections
-# CHECK-NEXT:   Index: 0
-# CHECK-NEXT:   ID: 0xffffffffffffffff
-# CHECK-NEXT:   Name:
-# CHECK-NEXT:   Type: container
-# CHECK-NEXT:   Permissions: ---
-# CHECK-NEXT:   Thread specific: no
-# CHECK-NEXT:   VM address: 0x40000000
-# CHECK-NEXT:   VM size: 12288
-# CHECK-NEXT:   File size: 0
-# CHECK-NEXT:   Showing 2 subsections
-# CHECK-NEXT:     Index: 0
-# CHECK-NEXT:     ID: 0x1
-# CHECK-NEXT:     Name: .text
-# CHECK-NEXT:     Type: code
-# CHECK-NEXT:     Permissions: ---
-# CHECK-NEXT:     Thread specific: no
-# CHECK-NEXT:     VM address: 0x40001000
-# CHECK-NEXT:     VM size: 64
-# CHECK-NEXT:     File size: 512
-# CHECK-EMPTY: 
-# CHECK-NEXT:     Index: 1
-# CHECK-NEXT:     ID: 0x2
-# CHECK-NEXT:     Name: .data
-# CHECK-NEXT:     Type: data
-# CHECK-NEXT:     Permissions: ---
-# CHECK-NEXT:     Thread specific: no
-# CHECK-NEXT:     VM address: 0x40002000
-# CHECK-NEXT:     VM size: 64
-# CHECK-NEXT:     File size: 512
-
-
---- !COFF
-OptionalHeader:
-  AddressOfEntryPoint: 4616
-  ImageBase:       1073741824
-  SectionAlignment: 4096
-  FileAlignment:   512
-  MajorOperatingSystemVersion: 6
-  MinorOperatingSystemVersion: 0
-  MajorImageVersion: 0
-  MinorImageVersion: 0
-  MajorSubsystemVersion: 6
-  MinorSubsystemVersion: 0
-  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
-  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
-  SizeOfStackReserve: 1048576
-  SizeOfStackCommit: 4096
-  SizeOfHeapReserve: 1048576
-  SizeOfHeapCommit: 4096
-header:
-  Machine:         IMAGE_FILE_MACHINE_AMD64
-  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
-sections:
-  - Name:            .text
-    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
-    VirtualAddress:  4096
-    VirtualSize:     64
-    SectionData:     DEADBEEFBAADF00D
-  - Name:            .data
-    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
-    VirtualAddress:  8192
-    VirtualSize:     64
-    SectionData:     DEADBEEFBAADF00D
-symbols:         []
-...
diff --git a/src/llvm-project/lldb/lit/Process/TestEnvironment.test b/src/llvm-project/lldb/lit/Process/TestEnvironment.test
deleted file mode 100644
index 355feb3..0000000
--- a/src/llvm-project/lldb/lit/Process/TestEnvironment.test
+++ /dev/null
@@ -1,9 +0,0 @@
-UNSUPPORTED: system-windows
-
-The double quotes around "BAR" ensure we don't match the command.
-
-RUN: %clangxx -std=c++11 %p/Inputs/env.cpp -o %t
-RUN: %lldb %t -o 'process launch --environment FOO="BAR"' | FileCheck %s
-RUN: %lldb %t -o 'env FOO="BAR"' -o 'process launch' | FileCheck %s
-
-CHECK: FOO=BAR
diff --git a/src/llvm-project/lldb/lit/Python/crashlog.test b/src/llvm-project/lldb/lit/Python/crashlog.test
deleted file mode 100644
index 7ea7c0b..0000000
--- a/src/llvm-project/lldb/lit/Python/crashlog.test
+++ /dev/null
@@ -1,99 +0,0 @@
-#                                                                 -*- python -*-
-# REQUIRES: system-darwin
-# RUN: cd %S/../../examples/python && cat %s | %lldb | FileCheck %s
-# CHECK-LABEL: {{S}}KIP BEYOND CHECKS
-script
-import crashlog
-cl = crashlog.CrashLog
-images = [
-"0x10b60b000 - 0x10f707fff com.apple.LLDB.framework (1.1000.11.38.2 - 1000.11.38.2) <96E36F5C-1A83-39A1-8713-5FDD9701C3F1> /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/LLDB",
-# CHECK: 0x10b60b000
-# CHECK: 0x10f707fff
-# CHECK: com.apple.LLDB.framework
-# CHECK: 96E36F5C-1A83-39A1-8713-5FDD9701C3F1
-# CHECK: /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/LLDB
-
-"0x104591000 - 0x1055cfff7 +llvm-dwarfdump (0) <B104CFA1-046A-36A6-8EB4-07DDD7CC2DF3> /Users/USER 1/Documents/*/llvm-dwarfdump",
-# CHECK: 0x104591000
-# CHECK: 0x1055cfff7
-# CHECK: llvm-dwarfdump
-# CHECK: (0)
-# CHECK: B104CFA1-046A-36A6-8EB4-07DDD7CC2DF3
-# CHECK: /Users/USER 1/Documents/*/llvm-dwarfdump
-
-"0x7fff63f20000 - 0x7fff63f77ff7  libc++.1.dylib (400.9.4) <D4AB366F-48A9-3C7D-91BD-41198F69DD57> /usr/lib/libc++.1.dylib",
-# CHECK: 0x7fff63f20000
-# CHECK: 0x7fff63f77ff7
-# CHECK: libc++.1.dylib
-# CHECK: (400.9.4)
-# CHECK: D4AB366F-48A9-3C7D-91BD-41198F69DD57
-# CHECK: /usr/lib/libc++.1.dylib
-
-"0x1111111 - 0x22222 +MyApp Pro arm64  <01234> /tmp/MyApp Pro.app/MyApp Pro",
-# CHECK: 0x1111111
-# CHECK: 0x22222
-# CHECK: MyApp Pro arm64
-# CHECK: None
-# CHECK: 01234
-# CHECK: /tmp/MyApp Pro.app/MyApp Pro
-
-"0x1111111 - 0x22222 +MyApp Pro (0) <01234> /tmp/MyApp Pro.app/MyApp Pro",
-# CHECK: 0x1111111
-# CHECK: 0x22222
-# CHECK: MyApp Pro
-# CHECK: (0)
-# CHECK: 01234
-# CHECK: /tmp/MyApp Pro.app/MyApp Pro
-    
-"0x7fff63f20000 - 0x7fff63f77ff7  libc++.1.dylib (400.9.4) /usr/lib/libc++.1.dylib"
-# CHECK: 0x7fff63f20000
-# CHECK: 0x7fff63f77ff7
-# CHECK: libc++.1.dylib
-# CHECK: (400.9.4)
-# CHECK: None
-# CHECK: /usr/lib/libc++.1.dylib
-]
-# CHECK-LABEL: FRAMES
-frames = [
-"0 libsystem_kernel.dylib        	0x00007fff684b78a6 read + 10",
-# CHECK: 0
-# CHECK: libsystem_kernel.dylib
-# CHECK: 0x00007fff684b78a6
-# CHECK: read + 10
-"1   com.apple.LLDB.framework      	0x000000010f7954af lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 105",
-# CHECK: 1
-# CHECK: com.apple.LLDB.framework
-# CHECK: 0x000000010f7954af
-# CHECK: lldb_private{{.*}} + 105
-"2   MyApp Pro arm64    	0x000000019b0db3a8 foo + 72",
-# CHECK: 2
-# CHECK: MyApp Pro arm64
-# CHECK: 0x000000019b0db3a8
-# CHECK: foo + 72
-"3   He 0x1    	0x000000019b0db3a8 foo + 72"
-# CHECK: 3
-# CHECK: He 0x1
-# CHECK: 0x000000019b0db3a8
-# CHECK: foo + 72
-]
-
-
-# Avoid matching the text inside the input.
-print("SKIP BEYOND CHECKS")
-for image in images:
-    print('"%s"'%image)
-    print("--------------")
-    match = cl.image_regex_uuid.search(image)
-    for group in match.groups():
-        print(group)
-
-print("FRAMES")
-for frame in frames:
-    print('"%s"'%frame)
-    print("--------------")
-    match = cl.frame_regex.search(frame)
-    for group in match.groups():
-        print(group)
-
-exit()
-quit
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-gp-read.test b/src/llvm-project/lldb/lit/Register/x86-64-gp-read.test
deleted file mode 100644
index 56f9a63..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-gp-read.test
+++ /dev/null
@@ -1,42 +0,0 @@
-# XFAIL: system-windows
-# REQUIRES: native && target-x86_64
-# RUN: %clangxx -fomit-frame-pointer %p/Inputs/x86-64-gp-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: rax = 0x0102030405060708
-# CHECK-DAG: rbx = 0x1112131415161718
-# CHECK-DAG: rcx = 0x2122232425262728
-# CHECK-DAG: rdx = 0x3132333435363738
-# CHECK-DAG: rdi = 0x7172737475767778
-# CHECK-DAG: rsi = 0x6162636465666768
-# CHECK-DAG: rbp = 0x5152535455565758
-# CHECK-DAG: rsp = 0x4142434445464748
-# CHECK-DAG: eax = 0x05060708
-# CHECK-DAG: ebx = 0x15161718
-# CHECK-DAG: ecx = 0x25262728
-# CHECK-DAG: edx = 0x35363738
-# CHECK-DAG: edi = 0x75767778
-# CHECK-DAG: esi = 0x65666768
-# CHECK-DAG: ebp = 0x55565758
-# CHECK-DAG: esp = 0x45464748
-# CHECK-DAG: ax = 0x0708
-# CHECK-DAG: bx = 0x1718
-# CHECK-DAG: cx = 0x2728
-# CHECK-DAG: dx = 0x3738
-# CHECK-DAG: di = 0x7778
-# CHECK-DAG: si = 0x6768
-# CHECK-DAG: bp = 0x5758
-# CHECK-DAG: sp = 0x4748
-# CHECK-DAG: ah = 0x07
-# CHECK-DAG: bh = 0x17
-# CHECK-DAG: ch = 0x27
-# CHECK-DAG: dh = 0x37
-# CHECK-DAG: al = 0x08
-# CHECK-DAG: bl = 0x18
-# CHECK-DAG: cl = 0x28
-# CHECK-DAG: dl = 0x38
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-gp-write.test b/src/llvm-project/lldb/lit/Register/x86-64-gp-write.test
deleted file mode 100644
index c79de92..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-gp-write.test
+++ /dev/null
@@ -1,26 +0,0 @@
-# UNSUPPORTED: system-darwin
-# REQUIRES: native && target-x86_64
-# RUN: %clangxx -fomit-frame-pointer %p/Inputs/x86-64-gp-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write rax 0x0102030405060708
-register write rbx 0x1112131415161718
-register write rcx 0x2122232425262728
-register write rdx 0x3132333435363738
-register write rsp 0x4142434445464748
-register write rbp 0x5152535455565758
-register write rsi 0x6162636465666768
-register write rdi 0x7172737475767778
-
-process continue
-# CHECK-DAG: rax = 0x0102030405060708
-# CHECK-DAG: rbx = 0x1112131415161718
-# CHECK-DAG: rcx = 0x2122232425262728
-# CHECK-DAG: rdx = 0x3132333435363738
-# CHECK-DAG: rsp = 0x4142434445464748
-# CHECK-DAG: rbp = 0x5152535455565758
-# CHECK-DAG: rsi = 0x6162636465666768
-# CHECK-DAG: rdi = 0x7172737475767778
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-read.test b/src/llvm-project/lldb/lit/Register/x86-64-read.test
deleted file mode 100644
index 090b34a..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-read.test
+++ /dev/null
@@ -1,51 +0,0 @@
-# XFAIL: system-windows
-# REQUIRES: native && target-x86_64
-# RUN: %clangxx %p/Inputs/x86-64-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: r8 = 0x0001020304050607
-# CHECK-DAG: r9 = 0x1011121314151617
-# CHECK-DAG: r10 = 0x2021222324252627
-# CHECK-DAG: r11 = 0x3031323334353637
-# CHECK-DAG: r12 = 0x4041424344454647
-# CHECK-DAG: r13 = 0x5051525354555657
-# CHECK-DAG: r14 = 0x6061626364656667
-# CHECK-DAG: r15 = 0x7071727374757677
-# CHECK-DAG: r8d = 0x04050607
-# CHECK-DAG: r9d = 0x14151617
-# CHECK-DAG: r10d = 0x24252627
-# CHECK-DAG: r11d = 0x34353637
-# CHECK-DAG: r12d = 0x44454647
-# CHECK-DAG: r13d = 0x54555657
-# CHECK-DAG: r14d = 0x64656667
-# CHECK-DAG: r15d = 0x74757677
-# CHECK-DAG: r8w = 0x0607
-# CHECK-DAG: r9w = 0x1617
-# CHECK-DAG: r10w = 0x2627
-# CHECK-DAG: r11w = 0x3637
-# CHECK-DAG: r12w = 0x4647
-# CHECK-DAG: r13w = 0x5657
-# CHECK-DAG: r14w = 0x6667
-# CHECK-DAG: r15w = 0x7677
-# CHECK-DAG: r8l = 0x07
-# CHECK-DAG: r9l = 0x17
-# CHECK-DAG: r10l = 0x27
-# CHECK-DAG: r11l = 0x37
-# CHECK-DAG: r12l = 0x47
-# CHECK-DAG: r13l = 0x57
-# CHECK-DAG: r14l = 0x67
-# CHECK-DAG: r15l = 0x77
-
-# CHECK-DAG: xmm8 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17}
-# CHECK-DAG: xmm9 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18}
-# CHECK-DAG: xmm10 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19}
-# CHECK-DAG: xmm11 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}
-# CHECK-DAG: xmm12 = {0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b}
-# CHECK-DAG: xmm13 = {0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c}
-# CHECK-DAG: xmm14 = {0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d}
-# CHECK-DAG: xmm15 = {0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e}
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-write.test b/src/llvm-project/lldb/lit/Register/x86-64-write.test
deleted file mode 100644
index 362e514..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-write.test
+++ /dev/null
@@ -1,47 +0,0 @@
-# XFAIL: system-darwin
-# XFAIL: system-windows
-# REQUIRES: native && (target-x86 || target-x86_64) && native-cpu-sse
-# RUN: %clangxx %p/Inputs/x86-64-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write r8 0x0001020304050607
-register write r9 0x1011121314151617
-register write r10 0x2021222324252627
-register write r11 0x3031323334353637
-register write r12 0x4041424344454647
-register write r13 0x5051525354555657
-register write r14 0x6061626364656667
-register write r15 0x7071727374757677
-
-register write xmm8 "{0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17}"
-register write xmm9 "{0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18}"
-register write xmm10 "{0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19}"
-register write xmm11 "{0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}"
-register write xmm12 "{0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b}"
-register write xmm13 "{0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c}"
-register write xmm14 "{0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d}"
-register write xmm15 "{0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e}"
-
-process continue
-# CHECK: process continue
-
-# CHECK-DAG: r8 = 0x0001020304050607
-# CHECK-DAG: r9 = 0x1011121314151617
-# CHECK-DAG: r10 = 0x2021222324252627
-# CHECK-DAG: r11 = 0x3031323334353637
-# CHECK-DAG: r12 = 0x4041424344454647
-# CHECK-DAG: r13 = 0x5051525354555657
-# CHECK-DAG: r14 = 0x6061626364656667
-# CHECK-DAG: r15 = 0x7071727374757677
-
-# CHECK-DAG: xmm8 = { 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 }
-# CHECK-DAG: xmm9 = { 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 }
-# CHECK-DAG: xmm10 = { 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 }
-# CHECK-DAG: xmm11 = { 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a }
-# CHECK-DAG: xmm12 = { 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b }
-# CHECK-DAG: xmm13 = { 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c }
-# CHECK-DAG: xmm14 = { 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d }
-# CHECK-DAG: xmm15 = { 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e }
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-xmm16-read.test b/src/llvm-project/lldb/lit/Register/x86-64-xmm16-read.test
deleted file mode 100644
index 9d060c8..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-xmm16-read.test
+++ /dev/null
@@ -1,30 +0,0 @@
-# XFAIL: system-freebsd
-# XFAIL: system-linux
-# XFAIL: system-netbsd
-# XFAIL: system-windows
-# XFAIL: system-darwin
-# REQUIRES: native && target-x86_64 && native-cpu-avx512f
-# RUN: %clangxx %p/Inputs/x86-zmm-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: xmm16 = {0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}
-# CHECK-DAG: xmm17 = {0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}
-# CHECK-DAG: xmm18 = {0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}
-# CHECK-DAG: xmm19 = {0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}
-# CHECK-DAG: xmm20 = {0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}
-# CHECK-DAG: xmm21 = {0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}
-# CHECK-DAG: xmm22 = {0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}
-# CHECK-DAG: xmm23 = {0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}
-# CHECK-DAG: xmm24 = {0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27}
-# CHECK-DAG: xmm25 = {0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28}
-# CHECK-DAG: xmm26 = {0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29}
-# CHECK-DAG: xmm27 = {0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a}
-# CHECK-DAG: xmm28 = {0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b}
-# CHECK-DAG: xmm29 = {0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c}
-# CHECK-DAG: xmm30 = {0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d}
-# CHECK-DAG: xmm31 = {0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e}
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-xmm16-write.test b/src/llvm-project/lldb/lit/Register/x86-64-xmm16-write.test
deleted file mode 100644
index 8c7ad8d..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-xmm16-write.test
+++ /dev/null
@@ -1,48 +0,0 @@
-# XFAIL: system-darwin
-# XFAIL: system-freebsd
-# XFAIL: system-linux
-# XFAIL: system-netbsd
-# XFAIL: system-windows
-# REQUIRES: native && target-x86 && native-cpu-avx512f
-# RUN: %clangxx %p/Inputs/x86-zmm-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write xmm16 "{0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}"
-register write xmm17 "{0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}"
-register write xmm18 "{0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}"
-register write xmm19 "{0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}"
-register write xmm20 "{0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}"
-register write xmm21 "{0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}"
-register write xmm22 "{0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}"
-register write xmm23 "{0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}"
-register write xmm24 "{0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27}"
-register write xmm25 "{0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28}"
-register write xmm26 "{0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29}"
-register write xmm27 "{0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a}"
-register write xmm28 "{0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b}"
-register write xmm29 "{0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c}"
-register write xmm30 "{0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d}"
-register write xmm31 "{0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e}"
-
-process continue
-# CHECK: process continue
-
-# CHECK-DAG: zmm16 = { 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm17 = { 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm18 = { 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm19 = { 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm20 = { 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm21 = { 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm22 = { 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm23 = { 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm24 = { 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm25 = { 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm26 = { 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm27 = { 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm28 = { 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm29 = { 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm30 = { 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm31 = { 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-ymm-read.test b/src/llvm-project/lldb/lit/Register/x86-64-ymm-read.test
deleted file mode 100644
index dbb5c8a..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-ymm-read.test
+++ /dev/null
@@ -1,43 +0,0 @@
-# XFAIL: system-windows
-# REQUIRES: native && target-x86_64 && native-cpu-avx
-# RUN: %clangxx %p/Inputs/x86-ymm-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: xmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f}
-# CHECK-DAG: xmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}
-# CHECK-DAG: xmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11}
-# CHECK-DAG: xmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12}
-# CHECK-DAG: xmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13}
-# CHECK-DAG: xmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14}
-# CHECK-DAG: xmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15}
-# CHECK-DAG: xmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16}
-# CHECK-DAG: xmm8 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17}
-# CHECK-DAG: xmm9 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18}
-# CHECK-DAG: xmm10 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19}
-# CHECK-DAG: xmm11 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}
-# CHECK-DAG: xmm12 = {0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b}
-# CHECK-DAG: xmm13 = {0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c}
-# CHECK-DAG: xmm14 = {0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d}
-# CHECK-DAG: xmm15 = {0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e}
-
-# CHECK-DAG: ymm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}
-# CHECK-DAG: ymm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}
-# CHECK-DAG: ymm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}
-# CHECK-DAG: ymm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}
-# CHECK-DAG: ymm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}
-# CHECK-DAG: ymm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}
-# CHECK-DAG: ymm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}
-# CHECK-DAG: ymm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}
-# CHECK-DAG: ymm8 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27}
-# CHECK-DAG: ymm9 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28}
-# CHECK-DAG: ymm10 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29}
-# CHECK-DAG: ymm11 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a}
-# CHECK-DAG: ymm12 = {0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b}
-# CHECK-DAG: ymm13 = {0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c}
-# CHECK-DAG: ymm14 = {0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d}
-# CHECK-DAG: ymm15 = {0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e}
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-ymm-write.test b/src/llvm-project/lldb/lit/Register/x86-64-ymm-write.test
deleted file mode 100644
index 4fe04a9..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-ymm-write.test
+++ /dev/null
@@ -1,45 +0,0 @@
-# XFAIL: system-darwin
-# XFAIL: system-windows
-# REQUIRES: native && target-x86_64 && native-cpu-avx
-# RUN: %clangxx %p/Inputs/x86-ymm-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write ymm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}"
-register write ymm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}"
-register write ymm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}"
-register write ymm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}"
-register write ymm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}"
-register write ymm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}"
-register write ymm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}"
-register write ymm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}"
-register write ymm8 "{0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27}"
-register write ymm9 "{0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28}"
-register write ymm10 "{0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29}"
-register write ymm11 "{0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a}"
-register write ymm12 "{0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b}"
-register write ymm13 "{0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c}"
-register write ymm14 "{0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d}"
-register write ymm15 "{0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e}"
-
-process continue
-# CHECK: process continue
-
-# CHECK-DAG: ymm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f }
-# CHECK-DAG: ymm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 }
-# CHECK-DAG: ymm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 }
-# CHECK-DAG: ymm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 }
-# CHECK-DAG: ymm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 }
-# CHECK-DAG: ymm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 }
-# CHECK-DAG: ymm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 }
-# CHECK-DAG: ymm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 }
-# CHECK-DAG: ymm8 = { 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 }
-# CHECK-DAG: ymm9 = { 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 }
-# CHECK-DAG: ymm10 = { 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 }
-# CHECK-DAG: ymm11 = { 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a }
-# CHECK-DAG: ymm12 = { 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b }
-# CHECK-DAG: ymm13 = { 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c }
-# CHECK-DAG: ymm14 = { 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d }
-# CHECK-DAG: ymm15 = { 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e }
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-ymm16-read.test b/src/llvm-project/lldb/lit/Register/x86-64-ymm16-read.test
deleted file mode 100644
index 5d81878..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-ymm16-read.test
+++ /dev/null
@@ -1,30 +0,0 @@
-# XFAIL: system-freebsd
-# XFAIL: system-linux
-# XFAIL: system-netbsd
-# XFAIL: system-windows
-# XFAIL: system-darwin
-# REQUIRES: native && target-x86_64 && native-cpu-avx512f
-# RUN: %clangxx %p/Inputs/x86-zmm-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: ymm16 = {0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f}
-# CHECK-DAG: ymm17 = {0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30}
-# CHECK-DAG: ymm18 = {0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31}
-# CHECK-DAG: ymm19 = {0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32}
-# CHECK-DAG: ymm20 = {0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33}
-# CHECK-DAG: ymm21 = {0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34}
-# CHECK-DAG: ymm22 = {0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35}
-# CHECK-DAG: ymm23 = {0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36}
-# CHECK-DAG: ymm24 = {0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37}
-# CHECK-DAG: ymm25 = {0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38}
-# CHECK-DAG: ymm26 = {0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39}
-# CHECK-DAG: ymm27 = {0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a}
-# CHECK-DAG: ymm28 = {0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b}
-# CHECK-DAG: ymm29 = {0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c}
-# CHECK-DAG: ymm30 = {0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d}
-# CHECK-DAG: ymm31 = {0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e}
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-ymm16-write.test b/src/llvm-project/lldb/lit/Register/x86-64-ymm16-write.test
deleted file mode 100644
index c3df572..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-ymm16-write.test
+++ /dev/null
@@ -1,48 +0,0 @@
-# XFAIL: system-darwin
-# XFAIL: system-freebsd
-# XFAIL: system-linux
-# XFAIL: system-netbsd
-# XFAIL: system-windows
-# REQUIRES: native && target-x86 && native-cpu-avx512f
-# RUN: %clangxx %p/Inputs/x86-zmm-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write ymm16 "{0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f}"
-register write ymm17 "{0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30}"
-register write ymm18 "{0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31}"
-register write ymm19 "{0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32}"
-register write ymm20 "{0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33}"
-register write ymm21 "{0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34}"
-register write ymm22 "{0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35}"
-register write ymm23 "{0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36}"
-register write ymm24 "{0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37}"
-register write ymm25 "{0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38}"
-register write ymm26 "{0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39}"
-register write ymm27 "{0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a}"
-register write ymm28 "{0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b}"
-register write ymm29 "{0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c}"
-register write ymm30 "{0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d}"
-register write ymm31 "{0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e}"
-
-process continue
-# CHECK: process continue
-
-# CHECK-DAG: zmm16 = { 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm17 = { 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm18 = { 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm19 = { 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm20 = { 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm21 = { 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm22 = { 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm23 = { 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm24 = { 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm25 = { 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm26 = { 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm27 = { 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm28 = { 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm29 = { 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm30 = { 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-# CHECK-DAG: zmm31 = { 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-zmm-read.test b/src/llvm-project/lldb/lit/Register/x86-64-zmm-read.test
deleted file mode 100644
index 5f42b10..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-zmm-read.test
+++ /dev/null
@@ -1,45 +0,0 @@
-# XFAIL: system-freebsd
-# XFAIL: system-linux
-# XFAIL: system-netbsd
-# XFAIL: system-windows
-# REQUIRES: native && target-x86_64 && native-cpu-avx512f
-# RUN: %clangxx %p/Inputs/x86-zmm-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: zmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f}
-# CHECK-DAG: zmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40}
-# CHECK-DAG: zmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41}
-# CHECK-DAG: zmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42}
-# CHECK-DAG: zmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43}
-# CHECK-DAG: zmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44}
-# CHECK-DAG: zmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45}
-# CHECK-DAG: zmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46}
-# CHECK-DAG: zmm8 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47}
-# CHECK-DAG: zmm9 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48}
-# CHECK-DAG: zmm10 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49}
-# CHECK-DAG: zmm11 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a}
-# CHECK-DAG: zmm12 = {0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b}
-# CHECK-DAG: zmm13 = {0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c}
-# CHECK-DAG: zmm14 = {0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d}
-# CHECK-DAG: zmm15 = {0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e}
-# CHECK-DAG: zmm16 = {0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f}
-# CHECK-DAG: zmm17 = {0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50}
-# CHECK-DAG: zmm18 = {0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51}
-# CHECK-DAG: zmm19 = {0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52}
-# CHECK-DAG: zmm20 = {0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53}
-# CHECK-DAG: zmm21 = {0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54}
-# CHECK-DAG: zmm22 = {0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55}
-# CHECK-DAG: zmm23 = {0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56}
-# CHECK-DAG: zmm24 = {0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57}
-# CHECK-DAG: zmm25 = {0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58}
-# CHECK-DAG: zmm26 = {0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59}
-# CHECK-DAG: zmm27 = {0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a}
-# CHECK-DAG: zmm28 = {0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b}
-# CHECK-DAG: zmm29 = {0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c}
-# CHECK-DAG: zmm30 = {0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d}
-# CHECK-DAG: zmm31 = {0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e}
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-64-zmm-write.test b/src/llvm-project/lldb/lit/Register/x86-64-zmm-write.test
deleted file mode 100644
index 5efa782..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-64-zmm-write.test
+++ /dev/null
@@ -1,80 +0,0 @@
-# XFAIL: system-darwin
-# XFAIL: system-freebsd
-# XFAIL: system-linux
-# XFAIL: system-netbsd
-# XFAIL: system-windows
-# REQUIRES: native && target-x86_64 && native-cpu-avx512f
-# RUN: %clangxx %p/Inputs/x86-zmm-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write zmm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f}"
-register write zmm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40}"
-register write zmm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41}"
-register write zmm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42}"
-register write zmm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43}"
-register write zmm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44}"
-register write zmm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45}"
-register write zmm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46}"
-register write zmm8 "{0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47}"
-register write zmm9 "{0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48}"
-register write zmm10 "{0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49}"
-register write zmm11 "{0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a}"
-register write zmm12 "{0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b}"
-register write zmm13 "{0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c}"
-register write zmm14 "{0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d}"
-register write zmm15 "{0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e}"
-register write zmm16 "{0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f}"
-register write zmm17 "{0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50}"
-register write zmm18 "{0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51}"
-register write zmm19 "{0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52}"
-register write zmm20 "{0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53}"
-register write zmm21 "{0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54}"
-register write zmm22 "{0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55}"
-register write zmm23 "{0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56}"
-register write zmm24 "{0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57}"
-register write zmm25 "{0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58}"
-register write zmm26 "{0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59}"
-register write zmm27 "{0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a}"
-register write zmm28 "{0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b}"
-register write zmm29 "{0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c}"
-register write zmm30 "{0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d}"
-register write zmm31 "{0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e}"
-
-process continue
-# CHECK: process continue
-
-# CHECK-DAG: zmm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f }
-# CHECK-DAG: zmm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 }
-# CHECK-DAG: zmm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 }
-# CHECK-DAG: zmm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 }
-# CHECK-DAG: zmm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 }
-# CHECK-DAG: zmm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 }
-# CHECK-DAG: zmm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 }
-# CHECK-DAG: zmm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 }
-# CHECK-DAG: zmm8 = { 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 }
-# CHECK-DAG: zmm9 = { 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 }
-# CHECK-DAG: zmm10 = { 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 }
-# CHECK-DAG: zmm11 = { 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a }
-# CHECK-DAG: zmm12 = { 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b }
-# CHECK-DAG: zmm13 = { 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c }
-# CHECK-DAG: zmm14 = { 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d }
-# CHECK-DAG: zmm15 = { 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e }
-# CHECK-DAG: zmm16 = { 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f }
-# CHECK-DAG: zmm17 = { 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 }
-# CHECK-DAG: zmm18 = { 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 }
-# CHECK-DAG: zmm19 = { 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 }
-# CHECK-DAG: zmm20 = { 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 }
-# CHECK-DAG: zmm21 = { 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 }
-# CHECK-DAG: zmm22 = { 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 }
-# CHECK-DAG: zmm23 = { 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 }
-# CHECK-DAG: zmm24 = { 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 }
-# CHECK-DAG: zmm25 = { 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 }
-# CHECK-DAG: zmm26 = { 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 }
-# CHECK-DAG: zmm27 = { 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a }
-# CHECK-DAG: zmm28 = { 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b }
-# CHECK-DAG: zmm29 = { 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c }
-# CHECK-DAG: zmm30 = { 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d }
-# CHECK-DAG: zmm31 = { 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e }
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-gp-read.test b/src/llvm-project/lldb/lit/Register/x86-gp-read.test
deleted file mode 100644
index ed0aa89..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-gp-read.test
+++ /dev/null
@@ -1,34 +0,0 @@
-# XFAIL: system-windows
-# REQUIRES: native && target-x86
-# RUN: %clangxx -fomit-frame-pointer %p/Inputs/x86-gp-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: eax = 0x05060708
-# CHECK-DAG: ebx = 0x15161718
-# CHECK-DAG: ecx = 0x25262728
-# CHECK-DAG: edx = 0x35363738
-# CHECK-DAG: edi = 0x75767778
-# CHECK-DAG: esi = 0x65666768
-# CHECK-DAG: ebp = 0x55565758
-# CHECK-DAG: esp = 0x45464748
-# CHECK-DAG: ax = 0x0708
-# CHECK-DAG: bx = 0x1718
-# CHECK-DAG: cx = 0x2728
-# CHECK-DAG: dx = 0x3738
-# CHECK-DAG: di = 0x7778
-# CHECK-DAG: si = 0x6768
-# CHECK-DAG: bp = 0x5758
-# CHECK-DAG: sp = 0x4748
-# CHECK-DAG: ah = 0x07
-# CHECK-DAG: bh = 0x17
-# CHECK-DAG: ch = 0x27
-# CHECK-DAG: dh = 0x37
-# CHECK-DAG: al = 0x08
-# CHECK-DAG: bl = 0x18
-# CHECK-DAG: cl = 0x28
-# CHECK-DAG: dl = 0x38
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-gp-write.test b/src/llvm-project/lldb/lit/Register/x86-gp-write.test
deleted file mode 100644
index 22f9273..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-gp-write.test
+++ /dev/null
@@ -1,26 +0,0 @@
-# XFAIL: system-windows
-# REQUIRES: native && target-x86
-# RUN: %clangxx -fomit-frame-pointer %p/Inputs/x86-gp-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write eax 0x01020304
-register write ebx 0x11121314
-register write ecx 0x21222324
-register write edx 0x31323334
-register write esp 0x41424344
-register write ebp 0x51525354
-register write esi 0x61626364
-register write edi 0x71727374
-
-process continue
-# CHECK-DAG: eax = 0x01020304
-# CHECK-DAG: ebx = 0x11121314
-# CHECK-DAG: ecx = 0x21222324
-# CHECK-DAG: edx = 0x31323334
-# CHECK-DAG: esp = 0x41424344
-# CHECK-DAG: ebp = 0x51525354
-# CHECK-DAG: esi = 0x61626364
-# CHECK-DAG: edi = 0x71727374
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-mm-xmm-read.test b/src/llvm-project/lldb/lit/Register/x86-mm-xmm-read.test
deleted file mode 100644
index ee20955..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-mm-xmm-read.test
+++ /dev/null
@@ -1,28 +0,0 @@
-# XFAIL: system-darwin
-# XFAIL: system-windows
-# REQUIRES: native && (target-x86 || target-x86_64) && native-cpu-sse
-# RUN: %clangxx %p/Inputs/x86-mm-xmm-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: mm0 = 0x0001020304050607
-# CHECK-DAG: mm1 = 0x1011121314151617
-# CHECK-DAG: mm2 = 0x2021222324252627
-# CHECK-DAG: mm3 = 0x3031323334353637
-# CHECK-DAG: mm4 = 0x4041424344454647
-# CHECK-DAG: mm5 = 0x5051525354555657
-# CHECK-DAG: mm6 = 0x6061626364656667
-# CHECK-DAG: mm7 = 0x7071727374757677
-
-# CHECK-DAG: xmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f}
-# CHECK-DAG: xmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}
-# CHECK-DAG: xmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11}
-# CHECK-DAG: xmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12}
-# CHECK-DAG: xmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13}
-# CHECK-DAG: xmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14}
-# CHECK-DAG: xmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15}
-# CHECK-DAG: xmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16}
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-mm-xmm-write.test b/src/llvm-project/lldb/lit/Register/x86-mm-xmm-write.test
deleted file mode 100644
index 7325cf1..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-mm-xmm-write.test
+++ /dev/null
@@ -1,47 +0,0 @@
-# XFAIL: system-darwin
-# XFAIL: system-windows
-# REQUIRES: native && (target-x86 || target-x86_64) && native-cpu-sse
-# RUN: %clangxx %p/Inputs/x86-mm-xmm-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write mm0 0x0001020304050607
-register write mm1 0x1011121314151617
-register write mm2 0x2021222324252627
-register write mm3 0x3031323334353637
-register write mm4 0x4041424344454647
-register write mm5 0x5051525354555657
-register write mm6 0x6061626364656667
-register write mm7 0x7071727374757677
-
-register write xmm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f}"
-register write xmm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}"
-register write xmm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11}"
-register write xmm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12}"
-register write xmm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13}"
-register write xmm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14}"
-register write xmm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15}"
-register write xmm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16}"
-
-process continue
-# CHECK: process continue
-
-# CHECK-DAG: mm0 = 0x0001020304050607
-# CHECK-DAG: mm1 = 0x1011121314151617
-# CHECK-DAG: mm2 = 0x2021222324252627
-# CHECK-DAG: mm3 = 0x3031323334353637
-# CHECK-DAG: mm4 = 0x4041424344454647
-# CHECK-DAG: mm5 = 0x5051525354555657
-# CHECK-DAG: mm6 = 0x6061626364656667
-# CHECK-DAG: mm7 = 0x7071727374757677
-
-# CHECK-DAG: xmm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f }
-# CHECK-DAG: xmm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 }
-# CHECK-DAG: xmm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 }
-# CHECK-DAG: xmm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 }
-# CHECK-DAG: xmm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 }
-# CHECK-DAG: xmm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 }
-# CHECK-DAG: xmm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 }
-# CHECK-DAG: xmm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 }
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-ymm-read.test b/src/llvm-project/lldb/lit/Register/x86-ymm-read.test
deleted file mode 100644
index 18fcf0e..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-ymm-read.test
+++ /dev/null
@@ -1,27 +0,0 @@
-# XFAIL: system-windows
-# REQUIRES: native && target-x86 && native-cpu-avx
-# RUN: %clangxx %p/Inputs/x86-ymm-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: xmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f}
-# CHECK-DAG: xmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}
-# CHECK-DAG: xmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11}
-# CHECK-DAG: xmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12}
-# CHECK-DAG: xmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13}
-# CHECK-DAG: xmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14}
-# CHECK-DAG: xmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15}
-# CHECK-DAG: xmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16}
-
-# CHECK-DAG: ymm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}
-# CHECK-DAG: ymm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}
-# CHECK-DAG: ymm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}
-# CHECK-DAG: ymm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}
-# CHECK-DAG: ymm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}
-# CHECK-DAG: ymm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}
-# CHECK-DAG: ymm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}
-# CHECK-DAG: ymm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-ymm-write.test b/src/llvm-project/lldb/lit/Register/x86-ymm-write.test
deleted file mode 100644
index 9938cdf..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-ymm-write.test
+++ /dev/null
@@ -1,28 +0,0 @@
-# XFAIL: system-windows
-# REQUIRES: native && target-x86 && native-cpu-avx
-# RUN: %clangxx %p/Inputs/x86-ymm-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write ymm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}"
-register write ymm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}"
-register write ymm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}"
-register write ymm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}"
-register write ymm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}"
-register write ymm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}"
-register write ymm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}"
-register write ymm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}"
-
-process continue
-# CHECK: process continue
-
-# CHECK-DAG: ymm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f }
-# CHECK-DAG: ymm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 }
-# CHECK-DAG: ymm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 }
-# CHECK-DAG: ymm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 }
-# CHECK-DAG: ymm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 }
-# CHECK-DAG: ymm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 }
-# CHECK-DAG: ymm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 }
-# CHECK-DAG: ymm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 }
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-zmm-read.test b/src/llvm-project/lldb/lit/Register/x86-zmm-read.test
deleted file mode 100644
index a45d1ef..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-zmm-read.test
+++ /dev/null
@@ -1,21 +0,0 @@
-# XFAIL: system-freebsd
-# XFAIL: system-linux
-# XFAIL: system-netbsd
-# XFAIL: system-windows
-# REQUIRES: native && target-x86 && native-cpu-avx512f
-# RUN: %clangxx %p/Inputs/x86-zmm-read.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register read --all
-# CHECK-DAG: zmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f}
-# CHECK-DAG: zmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40}
-# CHECK-DAG: zmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41}
-# CHECK-DAG: zmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42}
-# CHECK-DAG: zmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43}
-# CHECK-DAG: zmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44}
-# CHECK-DAG: zmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45}
-# CHECK-DAG: zmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46}
-
-process continue
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Register/x86-zmm-write.test b/src/llvm-project/lldb/lit/Register/x86-zmm-write.test
deleted file mode 100644
index 6a499c3..0000000
--- a/src/llvm-project/lldb/lit/Register/x86-zmm-write.test
+++ /dev/null
@@ -1,31 +0,0 @@
-# XFAIL: system-freebsd
-# XFAIL: system-linux
-# XFAIL: system-netbsd
-# XFAIL: system-windows
-# REQUIRES: native && target-x86 && native-cpu-avx512f
-# RUN: %clangxx %p/Inputs/x86-zmm-write.cpp -o %t
-# RUN: %lldb -b -s %s %t | FileCheck %s
-process launch
-
-register write zmm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f}"
-register write zmm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40}"
-register write zmm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41}"
-register write zmm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42}"
-register write zmm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43}"
-register write zmm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44}"
-register write zmm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45}"
-register write zmm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46}"
-
-process continue
-# CHECK: process continue
-
-# CHECK-DAG: zmm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f }
-# CHECK-DAG: zmm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 }
-# CHECK-DAG: zmm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 }
-# CHECK-DAG: zmm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 }
-# CHECK-DAG: zmm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 }
-# CHECK-DAG: zmm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 }
-# CHECK-DAG: zmm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 }
-# CHECK-DAG: zmm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 }
-
-# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Reproducer/Functionalities/TestDataFormatter.test b/src/llvm-project/lldb/lit/Reproducer/Functionalities/TestDataFormatter.test
deleted file mode 100644
index 8ee181e..0000000
--- a/src/llvm-project/lldb/lit/Reproducer/Functionalities/TestDataFormatter.test
+++ /dev/null
@@ -1,16 +0,0 @@
-# UNSUPPORTED: system-windows, system-freebsd
-
-# This tests that data formatters continue to work when replaying a reproducer.
-
-# RUN: rm -rf %t.repro
-# RUN: %clangxx %S/Inputs/foo.cpp -g -o %t.out
-
-# RUN: %lldb -x -b -s %S/Inputs/DataFormatter.in --capture --capture-path %t.repro %t.out | FileCheck %s
-# RUN: %lldb --replay %t.repro | FileCheck %s
-
-# CHECK: stop reason = breakpoint 1.1
-# CHECK: (Foo) foo = (m_i = 0, m_d = 0)
-# CHECK: stop reason = step over
-# CHECK: (Foo) foo = (m_i = 1, m_d = 2)
-# CHECK: Process {{.*}} resuming
-# CHECK: Process {{.*}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Reproducer/Functionalities/TestImageList.test b/src/llvm-project/lldb/lit/Reproducer/Functionalities/TestImageList.test
deleted file mode 100644
index d0abae1..0000000
--- a/src/llvm-project/lldb/lit/Reproducer/Functionalities/TestImageList.test
+++ /dev/null
@@ -1,30 +0,0 @@
-# UNSUPPORTED: system-windows, system-freebsd
-
-# This tests that image list works when replaying. We arbitrarily assume
-# there's at least two entries and compare that they're identical.
-
-# RUN: %clang %S/Inputs/stepping.c -g -o %t.out
-
-# RUN: rm -rf %t.txt
-
-# RUN: echo "CAPTURE" >> %t.txt
-# RUN: %lldb -x -b  --capture --capture-path %t.repro \
-# RUN:    -o 'run' \
-# RUN:    -o 'image list' \
-# RUN:    -o 'reproducer generate' \
-# RUN:    %t.out >> %t.txt 2>&1
-
-# RUN: echo "REPLAY" >> %t.txt
-# RUN: %lldb -x -b --replay %t.repro >> %t.txt 2>&1
-
-# RUN: cat %t.txt | FileCheck %s
-
-# CHECK: CAPTURE
-# CHECK: image list
-# CHECK: [  0] [[ZERO:.*]]
-# CHECK: [  1] [[ONE:.*]]
-
-# CHECK: REPLAY
-# CHECK: image list
-# CHECK: [  0] {{.*}}[[ZERO]]
-# CHECK: [  1] {{.*}}[[ONE]]
diff --git a/src/llvm-project/lldb/lit/Reproducer/Functionalities/TestStepping.test b/src/llvm-project/lldb/lit/Reproducer/Functionalities/TestStepping.test
deleted file mode 100644
index f43680f..0000000
--- a/src/llvm-project/lldb/lit/Reproducer/Functionalities/TestStepping.test
+++ /dev/null
@@ -1,100 +0,0 @@
-# UNSUPPORTED: system-windows, system-freebsd
-
-# This tests that stepping continues to work when replaying a reproducer.
-
-# RUN: rm -rf %t.repro
-# RUN: %clang %S/Inputs/stepping.c -O0 -g -o %t.out
-# RUN: grep -v '#' %s > %t.in
-
-# RUN: %lldb -x -b -s %t.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK
-# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK
-
-# Set breakpoints in a,b and c and verify we stop there when stepping.
-
-breakpoint set -f stepping.c -l 28
-# CHECK: Breakpoint 1: {{.*}} stepping.c:28
-
-breakpoint set -f stepping.c -l 10
-# CHECK: Breakpoint 2: {{.*}} stepping.c:10
-
-breakpoint set -f stepping.c -l 19
-# CHECK: Breakpoint 3: {{.*}} stepping.c:19
-
-breakpoint set -f stepping.c -l 23
-# CHECK: Breakpoint 4: {{.*}} stepping.c:23
-
-run
-# CHECK: Process {{.*}} stopped
-# CHECK: stop reason = breakpoint 1.1
-
-next
-# CHECK: Process {{.*}} stopped
-# CHECK: stop reason = breakpoint 2.1
-
-next
-# CHECK: Process {{.*}} stopped
-# CHECK: stop reason = breakpoint 3.1
-
-next
-# CHECK: Process {{.*}} stopped
-# CHECK: stop reason = breakpoint 4.1
-
-bt
-# CHECK: frame #0: {{.*}}`c
-# CHECK: frame #1: {{.*}}`b
-# CHECK: frame #2: {{.*}}`a
-
-# Continue and stop resulting from the step overs.
-
-cont
-# CHECK: Process {{.*}} resuming
-# CHECK: Process {{.*}} stopped
-# CHECK: stop reason = step over
-cont
-# CHECK: Process {{.*}} resuming
-# CHECK: Process {{.*}} stopped
-# CHECK: stop reason = step over
-cont
-# CHECK: Process {{.*}} resuming
-# CHECK: Process {{.*}} stopped
-# CHECK: stop reason = step over
-
-breakpoint disable 1
-# CHECK: 1 breakpoints disabled.
-
-breakpoint disable 2
-# CHECK: 1 breakpoints disabled.
-
-breakpoint disable 3
-# CHECK: 1 breakpoints disabled.
-
-breakpoint disable 4
-# CHECK: 1 breakpoints disabled.
-
-# Continue to line 48.
-
-next
-# CHECK: stop reason = step over
-next
-# CHECK: stop reason = step over
-
-# Step into c.
-thread step-in
-# CHECK: stop reason = step in
-thread step-in
-# CHECK: stop reason = step in
-thread step-in
-# CHECK: stop reason = step in
-thread step-in
-# CHECK: stop reason = step in
-thread step-in
-# CHECK: stop reason = step in
-
-# Finally continue until the end.
-
-cont
-# CHECK: Process {{.*}} resuming
-# CHECK: Process {{.*}} exited with status = 0
-
-# Generate the reproducer.
-reproducer generate
diff --git a/src/llvm-project/lldb/lit/Reproducer/Inputs/FileCapture.in b/src/llvm-project/lldb/lit/Reproducer/Inputs/FileCapture.in
deleted file mode 100644
index bf6f852..0000000
--- a/src/llvm-project/lldb/lit/Reproducer/Inputs/FileCapture.in
+++ /dev/null
@@ -1,3 +0,0 @@
-run
-reproducer status
-reproducer generate
diff --git a/src/llvm-project/lldb/lit/Reproducer/Modules/TestModuleCXX.test b/src/llvm-project/lldb/lit/Reproducer/Modules/TestModuleCXX.test
deleted file mode 100644
index 843c7e6..0000000
--- a/src/llvm-project/lldb/lit/Reproducer/Modules/TestModuleCXX.test
+++ /dev/null
@@ -1,37 +0,0 @@
-# REQUIRES: system-darwin
-
-# Start fresh.
-# RUN: rm -rf %t.repro
-# RUN: rm -rf %t.root
-# RUN: rm -rf %t.clang-cache
-# RUN: rm -rf %t.lldb-cache
-
-# Create a temporary root we can remove later.
-# RUN: mkdir -p %t.root
-# RUN: mkdir -p %t.clang-cache
-# RUN: mkdir -p %t.lldb-cache
-# RUN: cp %S/Inputs/main.cpp %t.root
-# RUN: cp %S/Inputs/Foo.h %t.root
-# RUN: cp %S/Inputs/Bar.h %t.root
-# RUN: cp %S/Inputs/module.modulemap %t.root
-
-# Compile the test case form the temporary root.
-# RUN: %clang %t.root/main.cpp -g -fmodules -fcxx-modules -fmodules-cache-path=%t.clang-cache -o %t.root/a.out
-
-# Capture the debug session.
-# RUN: %lldb -x -b -o 'settings set symbols.clang-modules-cache-path %t.lldb-cache' -s %S/Inputs/ModuleCXX.in --capture --capture-path %t.repro %t.root/a.out | FileCheck %s --check-prefix CAPTURE
-# CAPTURE: (success = 0)
-
-# RUN: cat %t.repro/files.yaml | FileCheck %s --check-prefix YAML
-# YAML-DAG: Foo.h
-# YAML-DAG: Bar.h
-# YAML-DAG: module.modulemap
-
-# Remove the temporary root.
-# RUN: rm -rf %t.root
-# RUN: rm -rf %t.clang-cache
-# RUN: rm -rf %t.lldb-cache
-
-# Replay the debug session.
-# RUN: %lldb -x -b -o 'settings set symbols.clang-modules-cache-path %t.lldb-cache' -s %S/Inputs/ModuleCXX.in --replay %t.repro %t.root/a.out | FileCheck %s --check-prefix REPLAY
-# REPLAY: (success = 0)
diff --git a/src/llvm-project/lldb/lit/Reproducer/TestFileRepro.test b/src/llvm-project/lldb/lit/Reproducer/TestFileRepro.test
deleted file mode 100644
index 31b7670..0000000
--- a/src/llvm-project/lldb/lit/Reproducer/TestFileRepro.test
+++ /dev/null
@@ -1,24 +0,0 @@
-# REQUIRES: system-darwin
-
-# This tests the replaying of GDB remote packets.
-#
-# We issue the same commands and ensure the output is identical to the original
-# process. To ensure we're not actually running the original binary we check
-# that the string "testing" is not printed.
-
-# RUN: rm -rf %t.repro
-# RUN: %clang %S/Inputs/simple.c -g -o %t.out
-# RUN: %lldb -x -b -s %S/Inputs/FileCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
-# RUN: rm %t.out
-# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
-# RUN: cat %t.repro/version.txt | FileCheck %s --check-prefix VERSION
-
-# CAPTURE: testing
-# REPLAY-NOT: testing
-
-# CHECK: Process {{.*}} exited
-
-# CAPTURE: Reproducer is in capture mode.
-# CAPTURE: Reproducer written
-
-# VERSION: lldb version
diff --git a/src/llvm-project/lldb/lit/Reproducer/TestGDBRemoteRepro.test b/src/llvm-project/lldb/lit/Reproducer/TestGDBRemoteRepro.test
deleted file mode 100644
index 09e566f..0000000
--- a/src/llvm-project/lldb/lit/Reproducer/TestGDBRemoteRepro.test
+++ /dev/null
@@ -1,27 +0,0 @@
-# UNSUPPORTED: system-windows, system-freebsd
-
-# This tests the replaying of GDB remote packets.
-#
-# We issue the same commands and ensure the output is identical to the original
-# process. To ensure we're not actually running the original binary we check
-# that the string "testing" is not printed.
-
-# RUN: rm -rf %t.repro
-# RUN: %clang %S/Inputs/simple.c -g -o %t.out
-# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
-# RUN: env FOO=BAR %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
-
-# CHECK: Breakpoint 1
-# CHECK: Process {{.*}} stopped
-# CHECK: Process {{.*}} launched
-# CHECK: thread {{.*}} stop reason = breakpoint
-# CHECK: frame {{.*}} simple.c
-
-# CAPTURE: testing
-# REPLAY-NOT: testing
-
-# CHECK: Process {{.*}} resuming
-# CHECK: Process {{.*}} exited
-
-# CAPTURE: Reproducer is in capture mode.
-# CAPTURE: Reproducer written
diff --git a/src/llvm-project/lldb/lit/Reproducer/TestReuseDirectory.test b/src/llvm-project/lldb/lit/Reproducer/TestReuseDirectory.test
deleted file mode 100644
index 76c74b7..0000000
--- a/src/llvm-project/lldb/lit/Reproducer/TestReuseDirectory.test
+++ /dev/null
@@ -1,17 +0,0 @@
-# UNSUPPORTED: system-windows, system-freebsd
-
-# Test that we can capture twice to the same directory without breaking the
-# reproducer functionality.
-
-# RUN: rm -rf %t.repro
-# RUN: %clang %S/Inputs/simple.c -g -o %t.out
-# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE
-# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE
-# RUN: %lldb --replay %t.repro | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix REPLAY
-
-# Test that we can replay from a different location, i.e. that the reproducer
-# is relocatable.
-
-# RUN: rm -rf %t.repro_moved
-# RUN: mv %t.repro %t.repro_moved
-# RUN: %lldb --replay %t.repro_moved | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix REPLAY
diff --git a/src/llvm-project/lldb/lit/Settings/TestFrameFormatColor.test b/src/llvm-project/lldb/lit/Settings/TestFrameFormatColor.test
deleted file mode 100644
index 87be0a3..0000000
--- a/src/llvm-project/lldb/lit/Settings/TestFrameFormatColor.test
+++ /dev/null
@@ -1,12 +0,0 @@
-# RUN: %clang -g -O0 %S/Inputs/main.c -o %t.out
-# RUN: %lldb -x -b -s %s %t.out | FileCheck %s
-settings set use-color true
-settings set -f frame-format "frame #${frame.index}: \`${ansi.fg.green}{${function.name-with-args}${ansi.normal}\n"
-b foo
-run
-bt
-c
-q
-
-# Check the ASCII escape code
-# CHECK: 
diff --git a/src/llvm-project/lldb/lit/Settings/TestFrameFormatNoColor.test b/src/llvm-project/lldb/lit/Settings/TestFrameFormatNoColor.test
deleted file mode 100644
index dd1a320..0000000
--- a/src/llvm-project/lldb/lit/Settings/TestFrameFormatNoColor.test
+++ /dev/null
@@ -1,12 +0,0 @@
-# RUN: %clang -g -O0 %S/Inputs/main.c -o %t.out
-# RUN: %lldb -x -b -s %s %t.out | FileCheck %s
-settings set use-color false
-settings set -f frame-format "frame #${frame.index}: \`${ansi.fg.green}{${function.name-with-args}${ansi.normal}\n"
-b foo
-run
-bt
-c
-q
-
-# Check the ASCII escape code
-# CHECK-NOT: 
diff --git a/src/llvm-project/lldb/lit/Suite/lit.cfg b/src/llvm-project/lldb/lit/Suite/lit.cfg
deleted file mode 100644
index 0c270f5..0000000
--- a/src/llvm-project/lldb/lit/Suite/lit.cfg
+++ /dev/null
@@ -1,77 +0,0 @@
-# -*- Python -*-
-
-# Configuration file for the 'lit' test runner.
-
-import os
-import platform
-import shlex
-
-import lit.formats
-
-# name: The name of this test suite.
-config.name = 'lldb-Suite'
-
-# suffixes: A list of file extensions to treat as test files.
-config.suffixes = ['.py']
-
-# test_source_root: The root path where tests are located.
-# test_exec_root: The root path where tests should be run.
-config.test_source_root = os.path.join(config.lldb_src_root, 'packages',
-                                       'Python', 'lldbsuite', 'test')
-config.test_exec_root = config.test_source_root
-
-# macOS flags needed for LLDB built with address sanitizer.
-if 'Address' in config.llvm_use_sanitizer and \
-   'Darwin' in config.host_os and \
-   'x86' in config.host_triple:
-  import subprocess
-  resource_dir = subprocess.check_output(
-    config.cmake_cxx_compiler +' -print-resource-dir', shell=True).strip()
-  runtime = os.path.join(resource_dir, 'lib', 'darwin',
-                         'libclang_rt.asan_osx_dynamic.dylib')
-  config.environment['ASAN_OPTIONS'] = \
-    'detect_stack_use_after_return=1'
-  config.environment['DYLD_INSERT_LIBRARIES'] = runtime
-
-# Shared library build of LLVM may require LD_LIBRARY_PATH or equivalent.
-def find_shlibpath_var():
-  if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'SunOS']:
-    yield 'LD_LIBRARY_PATH'
-  elif platform.system() == 'Darwin':
-    yield 'DYLD_LIBRARY_PATH'
-  elif platform.system() == 'Windows':
-    yield 'PATH'
-
-for shlibpath_var in find_shlibpath_var():
-  # In stand-alone build llvm_shlib_dir specifies LLDB's lib directory
-  # while llvm_libs_dir specifies LLVM's lib directory.
-  shlibpath = os.path.pathsep.join(
-    (config.llvm_shlib_dir,
-     config.llvm_libs_dir,
-     config.environment.get(shlibpath_var, '')))
-  config.environment[shlibpath_var] = shlibpath
-  break
-else:
-  lit_config.warning("unable to inject shared library path on '{}'"
-                     .format(platform.system()))
-
-# Build dotest command.
-dotest_cmd = [config.dotest_path, '-q']
-dotest_cmd.extend(config.dotest_args_str.split(';'))
-
-# We don't want to force users passing arguments to lit to use `;` as a
-# separator. We use Python's simple lexical analyzer to turn the args into a
-# list.
-if config.dotest_lit_args_str:
-  dotest_cmd.extend(shlex.split(config.dotest_lit_args_str))
-
-# Library path may be needed to locate just-built clang.
-if config.llvm_libs_dir:
-  dotest_cmd += ['--env', 'LLVM_LIBS_DIR=' + config.llvm_libs_dir]
-
-# Load LLDB test format.
-sys.path.append(os.path.join(config.lldb_src_root, "lit", "Suite"))
-import lldbtest
-
-# testFormat: The test format to use to interpret tests.
-config.test_format = lldbtest.LLDBTest(dotest_cmd)
diff --git a/src/llvm-project/lldb/lit/Suite/lit.site.cfg.in b/src/llvm-project/lldb/lit/Suite/lit.site.cfg.in
deleted file mode 100644
index 8fd3d25..0000000
--- a/src/llvm-project/lldb/lit/Suite/lit.site.cfg.in
+++ /dev/null
@@ -1,42 +0,0 @@
-@LIT_SITE_CFG_IN_HEADER@
-
-config.test_exec_root = "@LLDB_BINARY_DIR@"
-config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.llvm_shlib_dir = "@SHLIBDIR@"
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
-config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
-config.lldb_obj_root = "@LLDB_BINARY_DIR@"
-config.lldb_src_root = "@LLDB_SOURCE_DIR@"
-config.cmake_cxx_compiler = "@CMAKE_CXX_COMPILER@"
-config.host_os = "@HOST_OS@"
-config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
-config.target_triple = "@TARGET_TRIPLE@"
-config.python_executable = "@PYTHON_EXECUTABLE@"
-config.dotest_path = "@LLDB_SOURCE_DIR@/test/dotest.py"
-config.dotest_args_str = "@LLDB_DOTEST_ARGS@"
-config.lldb_disable_python = @LLDB_DISABLE_PYTHON@
-config.dotest_lit_args_str = None
-
-# Additional dotest arguments can be passed to lit by providing a
-# semicolon-separates list: --param dotest-args="arg;arg".
-dotest_lit_args_str = lit_config.params.get('dotest-args', None)
-if dotest_lit_args_str:
-    config.dotest_lit_args_str = dotest_lit_args_str
-
-# Support substitution of the tools and libs dirs with user parameters. This is
-# used when we can't determine the tool dir at configuration time.
-try:
-    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
-    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
-    config.dotest_args_str = config.dotest_args_str % lit_config.params
-    config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-except KeyError as e:
-    key, = e.args
-    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
-# Let the main config do the real work.
-lit_config.load_config(config, "@LLDB_SOURCE_DIR@/lit/Suite/lit.cfg")
diff --git a/src/llvm-project/lldb/lit/Suite/lldbtest.py b/src/llvm-project/lldb/lit/Suite/lldbtest.py
deleted file mode 100644
index 2692d88..0000000
--- a/src/llvm-project/lldb/lit/Suite/lldbtest.py
+++ /dev/null
@@ -1,111 +0,0 @@
-from __future__ import absolute_import
-import os
-
-import subprocess
-import sys
-
-import lit.Test
-import lit.TestRunner
-import lit.util
-from lit.formats.base import TestFormat
-
-def getBuildDir(cmd):
-    found = False
-    for arg in cmd:
-        if found:
-            return arg
-        if arg == '--build-dir':
-            found = True
-    return None
-
-def mkdir_p(path):
-    import errno
-    try:
-        os.makedirs(path)
-    except OSError as e:
-        if e.errno != errno.EEXIST:
-            raise
-    if not os.path.isdir(path):
-        raise OSError(errno.ENOTDIR, "%s is not a directory"%path)
-
-class LLDBTest(TestFormat):
-    def __init__(self, dotest_cmd):
-        self.dotest_cmd = dotest_cmd
-
-    def getTestsInDirectory(self, testSuite, path_in_suite, litConfig,
-                            localConfig):
-        source_path = testSuite.getSourcePath(path_in_suite)
-        for filename in os.listdir(source_path):
-            # Ignore dot files and excluded tests.
-            if (filename.startswith('.') or filename in localConfig.excludes):
-                continue
-
-            # Ignore files that don't start with 'Test'.
-            if not filename.startswith('Test'):
-                continue
-
-            filepath = os.path.join(source_path, filename)
-            if not os.path.isdir(filepath):
-                base, ext = os.path.splitext(filename)
-                if ext in localConfig.suffixes:
-                    yield lit.Test.Test(testSuite, path_in_suite +
-                                        (filename, ), localConfig)
-
-    def execute(self, test, litConfig):
-        if litConfig.noExecute:
-            return lit.Test.PASS, ''
-
-        if test.config.lldb_disable_python:
-            return (lit.Test.UNSUPPORTED, 'Python module disabled')
-
-        if test.config.unsupported:
-            return (lit.Test.UNSUPPORTED, 'Test is unsupported')
-
-        testPath, testFile = os.path.split(test.getSourcePath())
-        # On Windows, the system does not always correctly interpret
-        # shebang lines.  To make sure we can execute the tests, add
-        # python exe as the first parameter of the command.
-        cmd = [sys.executable] + self.dotest_cmd + [testPath, '-p', testFile]
-
-        # The macOS system integrity protection (SIP) doesn't allow injecting
-        # libraries into system binaries, but this can be worked around by
-        # copying the binary into a different location.
-        if 'DYLD_INSERT_LIBRARIES' in test.config.environment and \
-                (sys.executable.startswith('/System/') or \
-                sys.executable.startswith('/usr/')):
-            builddir = getBuildDir(cmd)
-            mkdir_p(builddir)
-            copied_python = os.path.join(builddir, 'copied-system-python')
-            if not os.path.isfile(copied_python):
-                import shutil, subprocess
-                python = subprocess.check_output([
-                    '/usr/bin/python2.7', '-c',
-                    'import sys; print sys.executable']).strip()
-                shutil.copy(python, copied_python)
-            cmd[0] = copied_python
-
-        try:
-            out, err, exitCode = lit.util.executeCommand(
-                cmd,
-                env=test.config.environment,
-                timeout=litConfig.maxIndividualTestTime)
-        except lit.util.ExecuteCommandTimeoutException:
-            return (lit.Test.TIMEOUT, 'Reached timeout of {} seconds'.format(
-                litConfig.maxIndividualTestTime))
-
-        if exitCode:
-            # Match FAIL but not XFAIL.
-            for line in out.splitlines() + err.splitlines():
-                if line.startswith('FAIL:'):
-                    return lit.Test.FAIL, out + err
-
-            if 'XPASS:' in out or 'XPASS:' in err:
-                return lit.Test.XPASS, out + err
-
-        passing_test_line = 'RESULT: PASSED'
-        if passing_test_line not in out and passing_test_line not in err:
-            msg = ('Unable to find %r in dotest output:\n\n%s%s' %
-                   (passing_test_line, out, err))
-            return lit.Test.UNRESOLVED, msg
-
-        return lit.Test.PASS, ''
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/basic-elf.yaml b/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/basic-elf.yaml
deleted file mode 100644
index 4d6a1e1..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/basic-elf.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
-# A very basic ELF file to serve as a recipient of breakpad info
-
---- !ELF
-FileHeader:      
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_EXEC
-  Machine:         EM_X86_64
-  Entry:           0x00000000004000D0
-Sections:        
-  - Name:            .text1
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Address:         0x0000000000400000
-    AddressAlign:    0x0000000000001000
-    Size:            0xb0
-  - Name:            .text2
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Address:         0x00000000004000B0
-    AddressAlign:    0x0000000000000010
-    Size:            0x42
-Symbols:         
-DynamicSymbols:  
-ProgramHeaders:
-  - Type: PT_LOAD
-    Flags: [ PF_X, PF_R ]
-    VAddr: 0x400000
-    Align: 0x1000
-    Sections:
-      - Section: .text1
-      - Section: .text2
-...
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table-edgecases.syms b/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table-edgecases.syms
deleted file mode 100644
index 069b79c..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table-edgecases.syms
+++ /dev/null
@@ -1,7 +0,0 @@
-MODULE Linux x86_64 761550E08086333960A9074A9CE2895C0 a.out
-INFO CODE_ID E05015768680393360A9074A9CE2895C
-FILE 0 /tmp/a.c
-a0 1 1 0
-FUNC b0 10 0 func
-FUNC c0 10 0 func2
-c0 2 2 0
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/symtab.test b/src/llvm-project/lldb/lit/SymbolFile/Breakpad/symtab.test
deleted file mode 100644
index ea766ec..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/symtab.test
+++ /dev/null
@@ -1,24 +0,0 @@
-# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/symtab.out
-# RUN: %lldb %T/symtab.out -o "target symbols add -s symtab.out %S/Inputs/symtab.syms" \
-# RUN:   -s %s | FileCheck %s
-
-# CHECK-LABEL: (lldb) image dump symtab symtab.out
-# CHECK: Symtab, file = {{.*}}symtab.out, num_symbols = 4:
-# CHECK: Index   UserID DSX Type            File Address/Value Load Address       Size               Flags      Name
-# CHECK: [    0]      0   X Code            0x00000000004000c0                    0x0000000000000010 0x00000000 f2
-# CHECK: [    1]      0   X Code            0x00000000004000d0                    0x0000000000000022 0x00000000 _start
-# CHECK: [    2]      0   X Code            0x00000000004000a0                    0x000000000000000d 0x00000000 func_only
-# CHECK: [    3]      0   X Code            0x00000000004000b0                    0x000000000000000c 0x00000000 f1_func
-
-# CHECK-LABEL: (lldb) image lookup -a 0x4000b0 -v
-# CHECK: Address: symtab.out[0x00000000004000b0] (symtab.out.PT_LOAD[0]..text2 + 0)
-# CHECK: Symbol: id = {0x00000000}, range = [0x00000000004000b0-0x00000000004000bc), name="f1_func"
-
-# CHECK-LABEL: (lldb) image lookup -n f2 -v
-# CHECK: Address: symtab.out[0x00000000004000c0] (symtab.out.PT_LOAD[0]..text2 + 16)
-# CHECK: Symbol: id = {0x00000000}, range = [0x00000000004000c0-0x00000000004000d0), name="f2"
-
-image dump symtab symtab.out
-image lookup -a 0x4000b0 -v
-image lookup -n f2 -v
-exit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/unwind-via-stack-cfi.test b/src/llvm-project/lldb/lit/SymbolFile/Breakpad/unwind-via-stack-cfi.test
deleted file mode 100644
index 9a6c216..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/unwind-via-stack-cfi.test
+++ /dev/null
@@ -1,20 +0,0 @@
-# RUN: yaml2obj %S/Inputs/unwind-via-stack-cfi.yaml > %t
-# RUN: %lldb -c %t -o "target symbols add %S/Inputs/unwind-via-stack-cfi.syms" \
-# RUN:   -s %s -b | FileCheck %s
-
-image show-unwind -n bar
-# CHECK-LABEL: image show-unwind -n bar
-# CHECK: Asynchronous (not restricted to call-sites) UnwindPlan is 'breakpad STACK CFI'
-# CHECK: Synchronous (restricted to call-sites) UnwindPlan is 'breakpad STACK CFI'
-# CHECK:      Symbol file UnwindPlan:
-# CHECK-NEXT: This UnwindPlan originally sourced from breakpad STACK CFI
-# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes.
-# CHECK-NEXT: This UnwindPlan is valid at all instruction locations: no.
-# CHECK-NEXT: Address range of this UnwindPlan: [unwind-via-stack-cfi..module_image + 1056-0x0000000000000449)
-# CHECK-NEXT: row[0]: 0: CFA=DW_OP_breg6 +0, DW_OP_deref => rbp=DW_OP_pick 0x00, DW_OP_deref rsp=DW_OP_pick 0x00, DW_OP_consts +16, DW_OP_plus rip=DW_OP_pick 0x00, DW_OP_consts +8, DW_OP_plus , DW_OP_deref
-
-thread backtrace
-# CHECK-LABEL: thread backtrace
-# CHECK: frame #0: 0x0000000000400430 unwind-via-stack-cfi`bar + 16
-# CHECK: frame #1: 0x0000000000400497 unwind-via-stack-cfi`_start + 23
-# CHECK-NOT: frame
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/array-sizes.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/array-sizes.s
deleted file mode 100644
index f00fe2a..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/array-sizes.s
+++ /dev/null
@@ -1,147 +0,0 @@
-# This tests a bug where we would incorrectly parse the size of an array if that
-# size happened to match an existing DIE offset. This happened because we
-# misinterpreted that value as a reference to a DIE specifying the VLA size even
-# though the form was a data form (as it should be).
-
-# REQUIRES: lld, x86
-
-# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld %t.o -o %t
-# RUN: lldb-test symbols %t | FileCheck %s
-
-# CHECK: Variable{0x7fffffff0000001e}, name = "X"
-# CHECK-SAME: type = {7fffffff00000033} 0x{{[0-9a-f]*}} (char [56])
-
-
-# Generated from "char X[47];"
-# The array size was modified by hand.
-
-	.text
-	.file	"-"
-	.file	1 "/tmp" "<stdin>"
-	.type	X,@object               # @X
-	.comm	X,63,16
-	.section	.debug_str,"MS",@progbits,1
-.Linfo_string0:
-	.asciz	"clang version 8.0.0 (trunk 349604) (llvm/trunk 349608)" # string offset=0
-.Linfo_string1:
-	.asciz	"-"                     # string offset=55
-.Linfo_string2:
-	.asciz	"/tmp"                  # string offset=57
-.Linfo_string3:
-	.asciz	"X"                     # string offset=62
-.Linfo_string4:
-	.asciz	"char"                  # string offset=64
-.Linfo_string5:
-	.asciz	"__ARRAY_SIZE_TYPE__"   # string offset=69
-	.section	.debug_abbrev,"",@progbits
-	.byte	1                       # Abbreviation Code
-	.byte	17                      # DW_TAG_compile_unit
-	.byte	1                       # DW_CHILDREN_yes
-	.byte	37                      # DW_AT_producer
-	.byte	14                      # DW_FORM_strp
-	.byte	19                      # DW_AT_language
-	.byte	5                       # DW_FORM_data2
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	16                      # DW_AT_stmt_list
-	.byte	23                      # DW_FORM_sec_offset
-	.byte	27                      # DW_AT_comp_dir
-	.byte	14                      # DW_FORM_strp
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	2                       # Abbreviation Code
-	.byte	52                      # DW_TAG_variable
-	.byte	0                       # DW_CHILDREN_no
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	73                      # DW_AT_type
-	.byte	19                      # DW_FORM_ref4
-	.byte	63                      # DW_AT_external
-	.byte	25                      # DW_FORM_flag_present
-	.byte	58                      # DW_AT_decl_file
-	.byte	11                      # DW_FORM_data1
-	.byte	59                      # DW_AT_decl_line
-	.byte	11                      # DW_FORM_data1
-	.byte	2                       # DW_AT_location
-	.byte	24                      # DW_FORM_exprloc
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	3                       # Abbreviation Code
-	.byte	1                       # DW_TAG_array_type
-	.byte	1                       # DW_CHILDREN_yes
-	.byte	73                      # DW_AT_type
-	.byte	19                      # DW_FORM_ref4
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	4                       # Abbreviation Code
-	.byte	33                      # DW_TAG_subrange_type
-	.byte	0                       # DW_CHILDREN_no
-	.byte	73                      # DW_AT_type
-	.byte	19                      # DW_FORM_ref4
-	.byte	55                      # DW_AT_count
-	.byte	11                      # DW_FORM_data1
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	5                       # Abbreviation Code
-	.byte	36                      # DW_TAG_base_type
-	.byte	0                       # DW_CHILDREN_no
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	62                      # DW_AT_encoding
-	.byte	11                      # DW_FORM_data1
-	.byte	11                      # DW_AT_byte_size
-	.byte	11                      # DW_FORM_data1
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	6                       # Abbreviation Code
-	.byte	36                      # DW_TAG_base_type
-	.byte	0                       # DW_CHILDREN_no
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	11                      # DW_AT_byte_size
-	.byte	11                      # DW_FORM_data1
-	.byte	62                      # DW_AT_encoding
-	.byte	11                      # DW_FORM_data1
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	0                       # EOM(3)
-	.section	.debug_info,"",@progbits
-.Lcu_begin0:
-	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
-.Ldebug_info_start0:
-	.short	4                       # DWARF version number
-	.long	.debug_abbrev           # Offset Into Abbrev. Section
-	.byte	8                       # Address Size (in bytes)
-	.byte	1                       # Abbrev [1] 0xb:0x43 DW_TAG_compile_unit
-	.long	.Linfo_string0          # DW_AT_producer
-	.short	12                      # DW_AT_language
-	.long	.Linfo_string1          # DW_AT_name
-	.long	0                       # DW_AT_stmt_list
-	.long	.Linfo_string2          # DW_AT_comp_dir
-	.byte	2                       # Abbrev [2] 0x1e:0x15 DW_TAG_variable
-	.long	.Linfo_string3          # DW_AT_name
-	.long	51                      # DW_AT_type
-                                        # DW_AT_external
-	.byte	1                       # DW_AT_decl_file
-	.byte	1                       # DW_AT_decl_line
-	.byte	9                       # DW_AT_location
-	.byte	3
-	.quad	X
-	.byte	3                       # Abbrev [3] 0x33:0xc DW_TAG_array_type
-	.long	63                      # DW_AT_type
-.Ldie:
-	.byte	4                       # Abbrev [4] 0x38:0x6 DW_TAG_subrange_type
-	.long	70                      # DW_AT_type
-	.byte	.Ldie-.Lcu_begin0       # DW_AT_count - should match the offset of an existing die
-	.byte	0                       # End Of Children Mark
-	.byte	5                       # Abbrev [5] 0x3f:0x7 DW_TAG_base_type
-	.long	.Linfo_string4          # DW_AT_name
-	.byte	6                       # DW_AT_encoding
-	.byte	1                       # DW_AT_byte_size
-	.byte	6                       # Abbrev [6] 0x46:0x7 DW_TAG_base_type
-	.long	.Linfo_string5          # DW_AT_name
-	.byte	8                       # DW_AT_byte_size
-	.byte	7                       # DW_AT_encoding
-	.byte	0                       # End Of Children Mark
-.Ldebug_info_end0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-line-basic.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-line-basic.s
deleted file mode 100644
index fc66f6a..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-line-basic.s
+++ /dev/null
@@ -1,75 +0,0 @@
-# REQUIRES: lld, x86
-
-# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld %t.o -o %t
-# RUN: %lldb %t -o "image dump line-table -v a.c" -o exit | FileCheck %s
-
-
-	.text
-	.globl	_start
-_start:
-# CHECK: Line table for /tmp/a.c
-	.file	1 "/tmp/b.c"
-	.loc	1 0 0
-        nop
-# CHECK-NEXT: 0x0000000000201000: /tmp/b.c, is_start_of_statement = TRUE{{$}}
-	.loc	1 1 0
-        nop
-# CHECK-NEXT: 0x0000000000201001: /tmp/b.c:1, is_start_of_statement = TRUE{{$}}
-        .loc   1 1 1
-        nop
-# CHECK-NEXT: 0x0000000000201002: /tmp/b.c:1:1, is_start_of_statement = TRUE{{$}}
-        .loc   1 2 0 is_stmt 0
-        nop
-# CHECK-NEXT: 0x0000000000201003: /tmp/b.c:2{{$}}
-        .loc   1 2 0 is_stmt 0 basic_block
-        nop
-# CHECK-NEXT: 0x0000000000201004: /tmp/b.c:2, is_start_of_basic_block = TRUE{{$}}
-        .loc   1 2 0 is_stmt 0 prologue_end
-        nop
-# CHECK-NEXT: 0x0000000000201005: /tmp/b.c:2, is_prologue_end = TRUE{{$}}
-        .loc   1 2 0 is_stmt 0 epilogue_begin
-        nop
-# CHECK-NEXT: 0x0000000000201006: /tmp/b.c:2, is_epilogue_begin = TRUE{{$}}
-	.file  2 "/tmp/c.c"
-	.loc   2 1 0 is_stmt 0
-        nop
-# CHECK-NEXT: 0x0000000000201007: /tmp/c.c:1{{$}}
-
-# CHECK-NEXT: 0x0000000000201008: /tmp/c.c:1, is_terminal_entry = TRUE{{$}}
-
-	.section	.debug_str,"MS",@progbits,1
-.Linfo_string1:
-	.asciz	"a.c"
-.Linfo_string2:
-	.asciz	"/tmp"
-	.section	.debug_abbrev,"",@progbits
-	.byte	1                       # Abbreviation Code
-	.byte	17                      # DW_TAG_compile_unit
-	.byte	0                       # DW_CHILDREN_no
-	.byte	19                      # DW_AT_language
-	.byte	5                       # DW_FORM_data2
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	16                      # DW_AT_stmt_list
-	.byte	23                      # DW_FORM_sec_offset
-	.byte	27                      # DW_AT_comp_dir
-	.byte	14                      # DW_FORM_strp
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	0                       # EOM(3)
-	.section	.debug_info,"",@progbits
-.Lcu_begin0:
-	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
-.Lcu_start0:
-	.short	4                       # DWARF version number
-	.long	.debug_abbrev           # Offset Into Abbrev. Section
-	.byte	8                       # Address Size (in bytes)
-	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
-	.short	12                      # DW_AT_language
-	.long	.Linfo_string1          # DW_AT_name
-	.long	.Lline_table_start0     # DW_AT_stmt_list
-	.long	.Linfo_string2          # DW_AT_comp_dir
-.Lcu_end0:
-	.section	.debug_line,"",@progbits
-.Lline_table_start0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-address-ranges.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-address-ranges.s
deleted file mode 100644
index b12d146..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-address-ranges.s
+++ /dev/null
@@ -1,340 +0,0 @@
-# Check address lookup works correctly in the presence of type units.
-# Specifically check that we don't use the line table pointed to by the
-# DW_AT_stmt_list of the type unit (which used only for the file names) to
-# compute address range for the type unit as type units don't describe any
-# addresses. The addresses should always resolve to the relevant compile units.
-
-# REQUIRES: lld, x86
-
-# RUN: llvm-mc -dwarf-version=5 -triple x86_64-pc-linux %s -filetype=obj >%t.o
-# RUN: ld.lld %t.o -o %t -image-base=0x47000
-# RUN: %lldb %t -o "image lookup -a 0x48000 -v" -o exit | FileCheck %s
-
-# CHECK:   CompileUnit: id = {0x00000001}, file = "/tmp/a.cc", language = "c++"
-# CHECK:      Function: id = {0x7fffffff0000006a}, name = "::_start({{.*}})", range = [0x0000000000048000-0x000000000004800c)
-# CHECK:     LineEntry: [0x0000000000048000-0x000000000004800a): /tmp/a.cc:4
-# CHECK:        Symbol: id = {0x00000002}, range = [0x0000000000048000-0x000000000004800c), name="_start"
-# CHECK:      Variable: id = {0x7fffffff00000075}, name = "v1", {{.*}} decl = a.cc:4
-# CHECK:      Variable: id = {0x7fffffff00000080}, name = "v2", {{.*}} decl = a.cc:4
-
-
-# Output generated via
-# clang -g -fdebug-types-section -gdwarf-5 -S
-# from
-# enum E1 { e1 };
-# enum E2 { e2 };
-# extern "C" void _start(E1 v1, E2 v2) {}
-# The output was modified to place the compile unit in between the two type
-# units.
-
-        .text
-        .file   "a.cc"
-        .file   0 "/tmp" "a.cc"
-
-        .text
-        .globl  _start                  # -- Begin function _start
-        .p2align        4, 0x90
-        .type   _start,@function
-_start:                                 # @_start
-.Lfunc_begin0:
-        .loc    0 4 0                   # /tmp/a.cc:4:0
-        .cfi_startproc
-# %bb.0:                                # %entry
-        pushq   %rbp
-        .cfi_def_cfa_offset 16
-        .cfi_offset %rbp, -16
-        movq    %rsp, %rbp
-        .cfi_def_cfa_register %rbp
-        movl    %edi, -4(%rbp)
-        movl    %esi, -8(%rbp)
-.Ltmp0:
-        .loc    0 4 23 prologue_end     # /tmp/a.cc:4:23
-        popq    %rbp
-        .cfi_def_cfa %rsp, 8
-        retq
-.Ltmp1:
-.Lfunc_end0:
-        .size   _start, .Lfunc_end0-_start
-        .cfi_endproc
-                                        # -- End function
-        .section        .debug_str_offsets,"",@progbits
-        .long   52
-        .short  5
-        .short  0
-.Lstr_offsets_base0:
-        .section        .debug_str,"MS",@progbits,1
-.Linfo_string0:
-        .asciz  "clang version 9.0.0 (trunk 360907) (llvm/trunk 360908)"
-.Linfo_string1:
-        .asciz  "a.cc"
-.Linfo_string2:
-        .asciz  "/tmp"
-.Linfo_string3:
-        .asciz  "unsigned int"
-.Linfo_string4:
-        .asciz  "e1"
-.Linfo_string5:
-        .asciz  "E1"
-.Linfo_string6:
-        .asciz  "e2"
-.Linfo_string7:
-        .asciz  "E2"
-.Linfo_string8:
-        .asciz  "_start"
-.Linfo_string9:
-        .asciz  "f"
-.Linfo_string10:
-        .asciz  "v1"
-.Linfo_string11:
-        .asciz  "v2"
-        .section        .debug_str_offsets,"",@progbits
-        .long   .Linfo_string0
-        .long   .Linfo_string1
-        .long   .Linfo_string2
-        .long   .Linfo_string3
-        .long   .Linfo_string4
-        .long   .Linfo_string5
-        .long   .Linfo_string6
-        .long   .Linfo_string7
-        .long   .Linfo_string8
-        .long   .Linfo_string9
-        .long   .Linfo_string10
-        .long   .Linfo_string11
-        .section        .debug_abbrev,"",@progbits
-        .byte   1                       # Abbreviation Code
-        .byte   65                      # DW_TAG_type_unit
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   19                      # DW_AT_language
-        .byte   5                       # DW_FORM_data2
-        .byte   16                      # DW_AT_stmt_list
-        .byte   23                      # DW_FORM_sec_offset
-        .byte   114                     # DW_AT_str_offsets_base
-        .byte   23                      # DW_FORM_sec_offset
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   2                       # Abbreviation Code
-        .byte   4                       # DW_TAG_enumeration_type
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   73                      # DW_AT_type
-        .byte   19                      # DW_FORM_ref4
-        .byte   3                       # DW_AT_name
-        .byte   37                      # DW_FORM_strx1
-        .byte   11                      # DW_AT_byte_size
-        .byte   11                      # DW_FORM_data1
-        .byte   58                      # DW_AT_decl_file
-        .byte   11                      # DW_FORM_data1
-        .byte   59                      # DW_AT_decl_line
-        .byte   11                      # DW_FORM_data1
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   3                       # Abbreviation Code
-        .byte   40                      # DW_TAG_enumerator
-        .byte   0                       # DW_CHILDREN_no
-        .byte   3                       # DW_AT_name
-        .byte   37                      # DW_FORM_strx1
-        .byte   28                      # DW_AT_const_value
-        .byte   15                      # DW_FORM_udata
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   4                       # Abbreviation Code
-        .byte   36                      # DW_TAG_base_type
-        .byte   0                       # DW_CHILDREN_no
-        .byte   3                       # DW_AT_name
-        .byte   37                      # DW_FORM_strx1
-        .byte   62                      # DW_AT_encoding
-        .byte   11                      # DW_FORM_data1
-        .byte   11                      # DW_AT_byte_size
-        .byte   11                      # DW_FORM_data1
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   5                       # Abbreviation Code
-        .byte   17                      # DW_TAG_compile_unit
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   37                      # DW_AT_producer
-        .byte   37                      # DW_FORM_strx1
-        .byte   19                      # DW_AT_language
-        .byte   5                       # DW_FORM_data2
-        .byte   3                       # DW_AT_name
-        .byte   37                      # DW_FORM_strx1
-        .byte   114                     # DW_AT_str_offsets_base
-        .byte   23                      # DW_FORM_sec_offset
-        .byte   16                      # DW_AT_stmt_list
-        .byte   23                      # DW_FORM_sec_offset
-        .byte   27                      # DW_AT_comp_dir
-        .byte   37                      # DW_FORM_strx1
-        .byte   17                      # DW_AT_low_pc
-        .byte   27                      # DW_FORM_addrx
-        .byte   18                      # DW_AT_high_pc
-        .byte   6                       # DW_FORM_data4
-        .byte   115                     # DW_AT_addr_base
-        .byte   23                      # DW_FORM_sec_offset
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   6                       # Abbreviation Code
-        .byte   4                       # DW_TAG_enumeration_type
-        .byte   0                       # DW_CHILDREN_no
-        .byte   60                      # DW_AT_declaration
-        .byte   25                      # DW_FORM_flag_present
-        .byte   105                     # DW_AT_signature
-        .byte   32                      # DW_FORM_ref_sig8
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   7                       # Abbreviation Code
-        .byte   46                      # DW_TAG_subprogram
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   17                      # DW_AT_low_pc
-        .byte   27                      # DW_FORM_addrx
-        .byte   18                      # DW_AT_high_pc
-        .byte   6                       # DW_FORM_data4
-        .byte   64                      # DW_AT_frame_base
-        .byte   24                      # DW_FORM_exprloc
-        .byte   3                       # DW_AT_name
-        .byte   37                      # DW_FORM_strx1
-        .byte   58                      # DW_AT_decl_file
-        .byte   11                      # DW_FORM_data1
-        .byte   59                      # DW_AT_decl_line
-        .byte   11                      # DW_FORM_data1
-        .byte   63                      # DW_AT_external
-        .byte   25                      # DW_FORM_flag_present
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   8                       # Abbreviation Code
-        .byte   5                       # DW_TAG_formal_parameter
-        .byte   0                       # DW_CHILDREN_no
-        .byte   2                       # DW_AT_location
-        .byte   24                      # DW_FORM_exprloc
-        .byte   3                       # DW_AT_name
-        .byte   37                      # DW_FORM_strx1
-        .byte   58                      # DW_AT_decl_file
-        .byte   11                      # DW_FORM_data1
-        .byte   59                      # DW_AT_decl_line
-        .byte   11                      # DW_FORM_data1
-        .byte   73                      # DW_AT_type
-        .byte   19                      # DW_FORM_ref4
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   0                       # EOM(3)
-        .section        .debug_info,"",@progbits
-.Lcu_begin0:
-        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
-.Ldebug_info_start0:
-        .short  5                       # DWARF version number
-        .byte   2                       # DWARF Unit Type
-        .byte   8                       # Address Size (in bytes)
-        .long   .debug_abbrev           # Offset Into Abbrev. Section
-        .quad   -6180787752776176174    # Type Signature
-        .long   35                      # Type DIE Offset
-        .byte   1                       # Abbrev [1] 0x18:0x1d DW_TAG_type_unit
-        .short  4                       # DW_AT_language
-        .long   .Lline_table_start0     # DW_AT_stmt_list
-        .long   .Lstr_offsets_base0     # DW_AT_str_offsets_base
-        .byte   2                       # Abbrev [2] 0x23:0xd DW_TAG_enumeration_type
-        .long   48                      # DW_AT_type
-        .byte   5                       # DW_AT_name
-        .byte   4                       # DW_AT_byte_size
-        .byte   0                       # DW_AT_decl_file
-        .byte   1                       # DW_AT_decl_line
-        .byte   3                       # Abbrev [3] 0x2c:0x3 DW_TAG_enumerator
-        .byte   4                       # DW_AT_name
-        .byte   0                       # DW_AT_const_value
-        .byte   0                       # End Of Children Mark
-        .byte   4                       # Abbrev [4] 0x30:0x4 DW_TAG_base_type
-        .byte   3                       # DW_AT_name
-        .byte   7                       # DW_AT_encoding
-        .byte   4                       # DW_AT_byte_size
-        .byte   0                       # End Of Children Mark
-.Ldebug_info_end0:
-
-        .long   .Ldebug_info_end2-.Ldebug_info_start2 # Length of Unit
-.Ldebug_info_start2:
-        .short  5                       # DWARF version number
-        .byte   1                       # DWARF Unit Type
-        .byte   8                       # Address Size (in bytes)
-        .long   .debug_abbrev           # Offset Into Abbrev. Section
-        .byte   5                       # Abbrev [5] 0xc:0x4d DW_TAG_compile_unit
-        .byte   0                       # DW_AT_producer
-        .short  4                       # DW_AT_language
-        .byte   1                       # DW_AT_name
-        .long   .Lstr_offsets_base0     # DW_AT_str_offsets_base
-        .long   .Lline_table_start0     # DW_AT_stmt_list
-        .byte   2                       # DW_AT_comp_dir
-        .byte   0                       # DW_AT_low_pc
-        .long   .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
-        .long   .Laddr_table_base0      # DW_AT_addr_base
-        .byte   6                       # Abbrev [6] 0x23:0x9 DW_TAG_enumeration_type
-                                        # DW_AT_declaration
-        .quad   -6180787752776176174    # DW_AT_signature
-        .byte   6                       # Abbrev [6] 0x2c:0x9 DW_TAG_enumeration_type
-                                        # DW_AT_declaration
-        .quad   7818257750321376053     # DW_AT_signature
-        .byte   7                       # Abbrev [7] 0x35:0x23 DW_TAG_subprogram
-        .byte   0                       # DW_AT_low_pc
-        .long   .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
-        .byte   1                       # DW_AT_frame_base
-        .byte   86
-        .byte   8                       # DW_AT_name
-        .byte   0                       # DW_AT_decl_file
-        .byte   4                       # DW_AT_decl_line
-                                        # DW_AT_external
-        .byte   8                       # Abbrev [8] 0x41:0xb DW_TAG_formal_parameter
-        .byte   2                       # DW_AT_location
-        .byte   145
-        .byte   124
-        .byte   10                      # DW_AT_name
-        .byte   0                       # DW_AT_decl_file
-        .byte   4                       # DW_AT_decl_line
-        .long   35                      # DW_AT_type
-        .byte   8                       # Abbrev [8] 0x4c:0xb DW_TAG_formal_parameter
-        .byte   2                       # DW_AT_location
-        .byte   145
-        .byte   120
-        .byte   11                      # DW_AT_name
-        .byte   0                       # DW_AT_decl_file
-        .byte   4                       # DW_AT_decl_line
-        .long   44                      # DW_AT_type
-        .byte   0                       # End Of Children Mark
-        .byte   0                       # End Of Children Mark
-.Ldebug_info_end2:
-
-        .long   .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
-.Ldebug_info_start1:
-        .short  5                       # DWARF version number
-        .byte   2                       # DWARF Unit Type
-        .byte   8                       # Address Size (in bytes)
-        .long   .debug_abbrev           # Offset Into Abbrev. Section
-        .quad   7818257750321376053     # Type Signature
-        .long   35                      # Type DIE Offset
-        .byte   1                       # Abbrev [1] 0x18:0x1d DW_TAG_type_unit
-        .short  4                       # DW_AT_language
-        .long   .Lline_table_start0     # DW_AT_stmt_list
-        .long   .Lstr_offsets_base0     # DW_AT_str_offsets_base
-        .byte   2                       # Abbrev [2] 0x23:0xd DW_TAG_enumeration_type
-        .long   48                      # DW_AT_type
-        .byte   7                       # DW_AT_name
-        .byte   4                       # DW_AT_byte_size
-        .byte   0                       # DW_AT_decl_file
-        .byte   2                       # DW_AT_decl_line
-        .byte   3                       # Abbrev [3] 0x2c:0x3 DW_TAG_enumerator
-        .byte   6                       # DW_AT_name
-        .byte   0                       # DW_AT_const_value
-        .byte   0                       # End Of Children Mark
-        .byte   4                       # Abbrev [4] 0x30:0x4 DW_TAG_base_type
-        .byte   3                       # DW_AT_name
-        .byte   7                       # DW_AT_encoding
-        .byte   4                       # DW_AT_byte_size
-        .byte   0                       # End Of Children Mark
-.Ldebug_info_end1:
-        .section        .debug_macinfo,"",@progbits
-        .byte   0                       # End Of Macro List Mark
-        .section        .debug_addr,"",@progbits
-        .long   .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
-.Ldebug_addr_start0:
-        .short  5                       # DWARF version number
-        .byte   8                       # Address size
-        .byte   0                       # Segment selector size
-.Laddr_table_base0:
-        .quad   .Lfunc_begin0
-.Ldebug_addr_end0:
-
-        .section        .debug_line,"",@progbits
-.Lline_table_start0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-expressions.test b/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-expressions.test
deleted file mode 100644
index 6da06d7..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-expressions.test
+++ /dev/null
@@ -1,53 +0,0 @@
-# UNSUPPORTED: system-darwin, system-windows
-
-# Make sure DWARF v4 type units work.
-# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \
-# RUN:   -g -gdwarf-4 -fdebug-types-section -o %t4
-# RUN: %lldb %t4 -s %s -o exit | FileCheck %s
-
-# Now do the same for DWARF v5.
-# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \
-# RUN:   -g -gdwarf-5 -fdebug-types-section -o %t5
-# RUN: %lldb %t5 -s %s -o exit | FileCheck %s
-
-# Test type units in dwo files.
-# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \
-# RUN:   -g -gdwarf-4 -fdebug-types-section -o %t4dwo
-# RUN: %lldb %t4dwo -s %s -o exit | FileCheck %s
-
-# And type units+dwo+dwarf5.
-# RUN: %clangxx %S/Inputs/debug-types-expressions.cpp \
-# RUN:   -g -gdwarf-5 -fdebug-types-section -o %t5dwo
-# RUN: %lldb %t5dwo -s %s -o exit | FileCheck %s
-
-breakpoint set -n foo
-process launch
-
-# CHECK: Process {{.*}} stopped
-
-frame variable a
-# CHECK-LABEL: frame variable a
-# CHECK: (B *) a =
-
-frame variable *a
-# CHECK-LABEL: frame variable *a
-# CHECK:      (B) *a = {
-# CHECK-NEXT:   A = (i = 47)
-# CHECK-NEXT:   j = 42
-# CHECK-NEXT: }
-
-print a->f()
-# CHECK-LABEL: print a->f()
-# CHECK: (int) $0 = 47
-
-print ns::A()
-# CHECK-LABEL: print ns::A()
-# CHECK: (ns::A) $1 = (i = 147)
-
-print ns::A().i + a->i
-# CHECK-LABEL: print ns::A().i + a->i
-# CHECK: (int) $2 = 194
-
-print ns::A().getA()
-# CHECK-LABEL: ns::A().getA()
-# CHECK: (A) $3 = (i = 146)
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-missing-signature.test b/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-missing-signature.test
deleted file mode 100644
index ca5c759..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-missing-signature.test
+++ /dev/null
@@ -1,26 +0,0 @@
-Create a dangling DW_AT_signature reference by stripping the debug_types
-section, and make sure lldb does something reasonable.
-RUN: %clangxx -target x86_64-pc-linux %S/Inputs/debug-types-basic.cpp \
-RUN:   -g -gdwarf-4 -fdebug-types-section -c -o %t.o
-RUN: llvm-objcopy --remove-section=.debug_types %t.o %t
-
-
-RUN: %lldb %t -b -o "type lookup A" | FileCheck --check-prefix=LOOKUPA %s
-LOOKUPA: no type was found matching 'A'
-
-RUN: %lldb %t -b -o "type lookup E" | FileCheck --check-prefix=LOOKUPE %s
-LOOKUPE: no type was found matching 'E'
-
-RUN: %lldb %t -b -o "type lookup EC" | FileCheck --check-prefix=LOOKUPEC %s
-LOOKUPEC: no type was found matching 'EC'
-
-RUN: %lldb %t -b -o "print (E) 1" 2>&1 | FileCheck --check-prefix=PRINTE %s
-PRINTE: use of undeclared identifier 'E'
-
-RUN: %lldb %t -b -o "print (EC) 1" 2>&1 | FileCheck --check-prefix=PRINTEC %s
-PRINTEC: use of undeclared identifier 'EC'
-
-RUN: %lldb %t -b -o "target variable a e ec" | FileCheck --check-prefix=VARS %s
-VARS: (const (anonymous struct)) a = {}
-VARS: (const (anonymous enum)) e = 1
-VARS: (const (anonymous enum)) ec = 1
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_loc.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_loc.s
deleted file mode 100644
index ce7177d..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_loc.s
+++ /dev/null
@@ -1,119 +0,0 @@
-# REQUIRES: x86
-
-# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
-# RUN: lldb %t -o "image lookup -v -a 0" -o "image lookup -v -a 2" -o exit \
-# RUN:   | FileCheck %s
-
-# CHECK-LABEL: image lookup -v -a 0
-# CHECK: Variable: {{.*}}, name = "x", type = "int", location = rdi,
-
-# CHECK-LABEL: image lookup -v -a 2
-# CHECK: Variable: {{.*}}, name = "x", type = "int", location = rax,
-
-        .type   f,@function
-f:                                      # @f
-.Lfunc_begin0:
-        movl    %edi, %eax
-.Ltmp0:
-        retq
-.Ltmp1:
-.Lfunc_end0:
-        .size   f, .Lfunc_end0-f
-
-        .section        .debug_str,"MS",@progbits,1
-.Linfo_string0:
-        .asciz  "Hand-written DWARF"
-.Linfo_string3:
-        .asciz  "f"
-.Linfo_string4:
-        .asciz  "int"
-.Linfo_string5:
-        .asciz  "x"
-
-        .section        .debug_loc,"",@progbits
-.Ldebug_loc0:
-        .quad   .Lfunc_begin0-.Lfunc_begin0
-        .quad   .Ltmp0-.Lfunc_begin0
-        .short  1                       # Loc expr size
-        .byte   85                      # super-register DW_OP_reg5
-        .quad   .Ltmp0-.Lfunc_begin0
-        .quad   .Lfunc_end0-.Lfunc_begin0
-        .short  1                       # Loc expr size
-        .byte   80                      # super-register DW_OP_reg0
-        .quad   0
-        .quad   0
-
-        .section        .debug_abbrev,"",@progbits
-        .byte   1                       # Abbreviation Code
-        .byte   17                      # DW_TAG_compile_unit
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   37                      # DW_AT_producer
-        .byte   14                      # DW_FORM_strp
-        .byte   19                      # DW_AT_language
-        .byte   5                       # DW_FORM_data2
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   2                       # Abbreviation Code
-        .byte   46                      # DW_TAG_subprogram
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   17                      # DW_AT_low_pc
-        .byte   1                       # DW_FORM_addr
-        .byte   18                      # DW_AT_high_pc
-        .byte   6                       # DW_FORM_data4
-        .byte   3                       # DW_AT_name
-        .byte   14                      # DW_FORM_strp
-        .byte   73                      # DW_AT_type
-        .byte   19                      # DW_FORM_ref4
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   3                       # Abbreviation Code
-        .byte   5                       # DW_TAG_formal_parameter
-        .byte   0                       # DW_CHILDREN_no
-        .byte   2                       # DW_AT_location
-        .byte   23                      # DW_FORM_sec_offset
-        .byte   3                       # DW_AT_name
-        .byte   14                      # DW_FORM_strp
-        .byte   73                      # DW_AT_type
-        .byte   19                      # DW_FORM_ref4
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   4                       # Abbreviation Code
-        .byte   36                      # DW_TAG_base_type
-        .byte   0                       # DW_CHILDREN_no
-        .byte   3                       # DW_AT_name
-        .byte   14                      # DW_FORM_strp
-        .byte   62                      # DW_AT_encoding
-        .byte   11                      # DW_FORM_data1
-        .byte   11                      # DW_AT_byte_size
-        .byte   11                      # DW_FORM_data1
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   0                       # EOM(3)
-
-        .section        .debug_info,"",@progbits
-.Lcu_begin0:
-        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
-.Ldebug_info_start0:
-        .short  4                       # DWARF version number
-        .long   .debug_abbrev           # Offset Into Abbrev. Section
-        .byte   8                       # Address Size (in bytes)
-        .byte   1                       # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
-        .long   .Linfo_string0          # DW_AT_producer
-        .short  12                      # DW_AT_language
-        .byte   2                       # Abbrev [2] 0x2a:0x29 DW_TAG_subprogram
-        .quad   .Lfunc_begin0           # DW_AT_low_pc
-        .long   .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
-        .long   .Linfo_string3          # DW_AT_name
-        .long   83                      # DW_AT_type
-        .byte   3                       # Abbrev [3] 0x43:0xf DW_TAG_formal_parameter
-        .long   .Ldebug_loc0            # DW_AT_location
-        .long   .Linfo_string5          # DW_AT_name
-        .long   .Lint-.Lcu_begin0       # DW_AT_type
-        .byte   0                       # End Of Children Mark
-.Lint:
-        .byte   4                       # Abbrev [4] 0x53:0x7 DW_TAG_base_type
-        .long   .Linfo_string4          # DW_AT_name
-        .byte   5                       # DW_AT_encoding
-        .byte   4                       # DW_AT_byte_size
-        .byte   0                       # End Of Children Mark
-.Ldebug_info_end0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_ranges.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_ranges.s
deleted file mode 100644
index bbe5cb2..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_ranges.s
+++ /dev/null
@@ -1,94 +0,0 @@
-# REQUIRES: x86
-
-# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
-# RUN: %lldb %t -o "image lookup -v -s lookup_ranges" -o exit | FileCheck %s
-
-# CHECK:  Function: id = {0x7fffffff0000001c}, name = "ranges", range = [0x0000000000000000-0x0000000000000004)
-# CHECK:    Blocks: id = {0x7fffffff0000001c}, range = [0x00000000-0x00000004)
-# CHECK-NEXT:       id = {0x7fffffff0000002d}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004)
-
-        .text
-        .p2align 12
-        .globl  ranges
-        .type   ranges,@function
-ranges:                                    # @ranges
-.Lfoo_begin:
-        nop
-.Lblock1_begin:
-lookup_ranges:
-        nop
-.Lblock1_end:
-        nop
-.Lblock2_begin:
-        nop
-.Lblock2_end:
-.Lfunc_end0:
-        .size   ranges, .Lfunc_end0-ranges
-                                        # -- End function
-        .section        .debug_str,"MS",@progbits,1
-.Lproducer:
-        .asciz  "Hand-written DWARF"
-.Lranges:
-        .asciz  "ranges"
-
-        .section        .debug_abbrev,"",@progbits
-        .byte   1                       # Abbreviation Code
-        .byte   17                      # DW_TAG_compile_unit
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   37                      # DW_AT_producer
-        .byte   14                      # DW_FORM_strp
-        .byte   17                      # DW_AT_low_pc
-        .byte   1                       # DW_FORM_addr
-        .byte   18                      # DW_AT_high_pc
-        .byte   6                       # DW_FORM_data4
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   2                       # Abbreviation Code
-        .byte   46                      # DW_TAG_subprogram
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   17                      # DW_AT_low_pc
-        .byte   1                       # DW_FORM_addr
-        .byte   18                      # DW_AT_high_pc
-        .byte   6                       # DW_FORM_data4
-        .byte   3                       # DW_AT_name
-        .byte   14                      # DW_FORM_strp
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   5                       # Abbreviation Code
-        .byte   11                      # DW_TAG_lexical_block
-        .byte   0                       # DW_CHILDREN_no
-        .byte   85                      # DW_AT_ranges
-        .byte   23                      # DW_FORM_sec_offset
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   0                       # EOM(3)
-
-        .section        .debug_info,"",@progbits
-.Lcu_begin0:
-        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
-.Ldebug_info_start0:
-        .short  4                       # DWARF version number
-        .long   .debug_abbrev           # Offset Into Abbrev. Section
-        .byte   8                       # Address Size (in bytes)
-        .byte   1                       # Abbrev [1] 0xb:0x7b DW_TAG_compile_unit
-        .long   .Lproducer              # DW_AT_producer
-        .quad   .Lfoo_begin             # DW_AT_low_pc
-        .long   .Lfunc_end0-.Lfoo_begin # DW_AT_high_pc
-        .byte   2                       # Abbrev [2] 0x2a:0x4d DW_TAG_subprogram
-        .quad   .Lfoo_begin             # DW_AT_low_pc
-        .long   .Lfunc_end0-.Lfoo_begin # DW_AT_high_pc
-        .long   .Lranges                # DW_AT_name
-        .byte   5                       # Abbrev [5] 0x61:0x15 DW_TAG_lexical_block
-        .long   .Ldebug_ranges0         # DW_AT_ranges
-        .byte   0                       # End Of Children Mark
-        .byte   0                       # End Of Children Mark
-.Ldebug_info_end0:
-
-        .section        .debug_ranges,"",@progbits
-.Ldebug_ranges0:
-        .quad   .Lblock1_begin-.Lfoo_begin  
-        .quad   .Lblock1_end-.Lfoo_begin  
-        .quad   .Lblock2_begin-.Lfoo_begin  
-        .quad   .Lblock2_end-.Lfoo_begin  
-        .quad   0
-        .quad   0
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_rnglists.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_rnglists.s
deleted file mode 100644
index 5d95b80..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_rnglists.s
+++ /dev/null
@@ -1,110 +0,0 @@
-# REQUIRES: x86
-
-# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
-# RUN: %lldb %t -o "image lookup -v -s lookup_rnglists" -o exit | FileCheck %s
-
-# CHECK:  Function: id = {0x7fffffff00000021}, name = "rnglists", range = [0x0000000000000000-0x0000000000000004)
-# CHECK:    Blocks: id = {0x7fffffff00000021}, range = [0x00000000-0x00000004)
-# CHECK-NEXT:       id = {0x7fffffff00000032}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004)
-
-        .text
-        .p2align 12
-        .globl  rnglists
-        .type   rnglists,@function
-rnglists:                                    # @rnglists
-.Lfoo_begin:
-        nop
-.Lblock1_begin:
-lookup_rnglists:
-        nop
-.Lblock1_end:
-        nop
-.Lblock2_begin:
-        nop
-.Lblock2_end:
-.Lfunc_end0:
-        .size   rnglists, .Lfunc_end0-rnglists
-                                        # -- End function
-        .section        .debug_str,"MS",@progbits,1
-.Lproducer:
-        .asciz  "Hand-written DWARF"
-.Lrnglists:
-        .asciz  "rnglists"
-
-        .section        .debug_abbrev,"",@progbits
-        .byte   1                       # Abbreviation Code
-        .byte   17                      # DW_TAG_compile_unit
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   37                      # DW_AT_producer
-        .byte   14                      # DW_FORM_strp
-        .byte   17                      # DW_AT_low_pc
-        .byte   1                       # DW_FORM_addr
-        .byte   18                      # DW_AT_high_pc
-        .byte   6                       # DW_FORM_data4
-        .byte   116                     # DW_AT_rnglists_base
-        .byte   23                      # DW_FORM_sec_offset
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   2                       # Abbreviation Code
-        .byte   46                      # DW_TAG_subprogram
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   17                      # DW_AT_low_pc
-        .byte   1                       # DW_FORM_addr
-        .byte   18                      # DW_AT_high_pc
-        .byte   6                       # DW_FORM_data4
-        .byte   3                       # DW_AT_name
-        .byte   14                      # DW_FORM_strp
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   5                       # Abbreviation Code
-        .byte   11                      # DW_TAG_lexical_block
-        .byte   0                       # DW_CHILDREN_no
-        .byte   85                      # DW_AT_ranges
-        .byte   35                      # DW_FORM_rnglistx
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   0                       # EOM(3)
-
-        .section        .debug_info,"",@progbits
-.Lcu_begin0:
-        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
-.Ldebug_info_start0:
-        .short  5                       # DWARF version number
-        .byte   1                       # DWARF Unit Type
-        .byte   8                       # Address Size (in bytes)
-        .long   .debug_abbrev           # Offset Into Abbrev. Section
-        .byte   1                       # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit
-        .long   .Lproducer              # DW_AT_producer
-        .quad   .Lfoo_begin             # DW_AT_low_pc
-        .long   .Lfunc_end0-.Lfoo_begin # DW_AT_high_pc
-        .long   .Lrnglists_table_base0  # DW_AT_rnglists_base
-        .byte   2                       # Abbrev [2] 0x2b:0x37 DW_TAG_subprogram
-        .quad   .Lfoo_begin             # DW_AT_low_pc
-        .long   .Lfunc_end0-.Lfoo_begin # DW_AT_high_pc
-        .long   .Lrnglists              # DW_AT_name
-        .byte   5                       # Abbrev [5] 0x52:0xf DW_TAG_lexical_block
-        .byte   0                       # DW_AT_ranges
-        .byte   0                       # End Of Children Mark
-        .byte   0                       # End Of Children Mark
-.Ldebug_info_end0:
-
-        .section        .debug_rnglists,"",@progbits
-        .long   .Ldebug_rnglist_table_end0-.Ldebug_rnglist_table_start0 # Length
-.Ldebug_rnglist_table_start0:
-        .short  5                       # Version
-        .byte   8                       # Address size
-        .byte   0                       # Segment selector size
-        .long   1                       # Offset entry count
-.Lrnglists_table_base0:
-        .long   .Ldebug_ranges0-.Lrnglists_table_base0
-.Ldebug_ranges0:
-        .byte   4                       # DW_RLE_offset_pair
-        .uleb128 .Lblock1_begin-.Lfoo_begin #   starting offset
-        .uleb128 .Lblock1_end-.Lfoo_begin #   ending offset
-        .byte   4                       # DW_RLE_offset_pair
-        .uleb128 .Lblock2_begin-.Lfoo_begin #   starting offset
-        .uleb128 .Lblock2_end-.Lfoo_begin #   ending offset
-        .byte   0                       # DW_RLE_end_of_list
-.Ldebug_rnglist_table_end0:
-        .section        .debug_macinfo,"",@progbits
-        .byte   0                       # End Of Macro List Mark
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s
deleted file mode 100644
index 2a798f1..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s
+++ /dev/null
@@ -1,63 +0,0 @@
-# Test that parsing of line tables works reasonably. In this case the debug info
-# does not have enough information for our heuristics to determine the path
-# style, so we will just treat them as native host paths.
-
-# REQUIRES: lld, x86
-
-# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld %t.o -o %t
-# RUN: %lldb %t -s %S/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit -o exit | FileCheck %s
-
-# CHECK-LABEL: image dump line-table a.c
-# CHECK: Line table for foo{{.}}a.c
-# CHECK-NEXT: 0x0000000000201000: foo{{.}}a.c:1
-# CHECK-NEXT: 0x0000000000201001: foo{{.}}b.c:1
-# CHECK-NEXT: 0x0000000000201002: foo{{.}}b.c:1
-# CHECK-EMPTY:
-
-# CHECK-LABEL: breakpoint set -f a.c -l 1
-# CHECK: Breakpoint 1: {{.*}}`_start,
-
-# CHECK-LABEL: breakpoint set -f foo/b.c -l 1
-# CHECK: Breakpoint 2: {{.*}}`_start + 1,
-
-	.text
-	.globl	_start
-_start:
-	.file	1 "foo/a.c"
-	.loc	1 1 0
-        nop
-	.file	2 "foo/b.c"
-	.loc	2 1 0
-        nop
-
-	.section	.debug_str,"MS",@progbits,1
-.Linfo_string1:
-	.asciz	"foo/a.c"
-	.section	.debug_abbrev,"",@progbits
-	.byte	1                       # Abbreviation Code
-	.byte	17                      # DW_TAG_compile_unit
-	.byte	0                       # DW_CHILDREN_no
-	.byte	19                      # DW_AT_language
-	.byte	5                       # DW_FORM_data2
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	16                      # DW_AT_stmt_list
-	.byte	23                      # DW_FORM_sec_offset
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	0                       # EOM(3)
-	.section	.debug_info,"",@progbits
-.Lcu_begin0:
-	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
-.Lcu_start0:
-	.short	4                       # DWARF version number
-	.long	.debug_abbrev           # Offset Into Abbrev. Section
-	.byte	8                       # Address Size (in bytes)
-	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
-	.short	12                      # DW_AT_language
-	.long	.Linfo_string1          # DW_AT_name
-	.long	.Lline_table_start0     # DW_AT_stmt_list
-.Lcu_end0:
-	.section	.debug_line,"",@progbits
-.Lline_table_start0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s
deleted file mode 100644
index a1d0ea5..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-no-comp-dir.s
+++ /dev/null
@@ -1,62 +0,0 @@
-# Test that we properly determine the path syntax of a compile unit even if the
-# compile unit does not have a DW_AT_comp_dir attribute.
-
-# REQUIRES: lld, x86
-
-# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld %t.o -o %t
-# RUN: %lldb %t -s %S/Inputs/dir-separator-windows.lldbinit -o exit | FileCheck %s
-
-# CHECK-LABEL: image dump line-table a.c
-# CHECK: Line table for C:\tmp\a.c
-# CHECK-NEXT: 0x0000000000201000: C:\tmp\a.c:1
-# CHECK-NEXT: 0x0000000000201001: C:\tmp\b.c:1
-# CHECK-NEXT: 0x0000000000201002: C:\tmp\b.c:1
-# CHECK-EMPTY:
-
-# CHECK-LABEL: breakpoint set -f a.c -l 1
-# CHECK: Breakpoint 1: {{.*}}`_start,
-
-# CHECK-LABEL: breakpoint set -f C:/tmp/b.c -l 1
-# CHECK: Breakpoint 2: {{.*}}`_start + 1,
-
-	.text
-	.globl	_start
-_start:
-	.file	1 "C:\\tmp\\a.c"
-	.loc	1 1 0
-        nop
-	.file	2 "C:\\tmp\\b.c"
-	.loc	2 1 0
-        nop
-
-	.section	.debug_str,"MS",@progbits,1
-.Linfo_string1:
-	.asciz	"C:\\tmp\\a.c"
-	.section	.debug_abbrev,"",@progbits
-	.byte	1                       # Abbreviation Code
-	.byte	17                      # DW_TAG_compile_unit
-	.byte	0                       # DW_CHILDREN_no
-	.byte	19                      # DW_AT_language
-	.byte	5                       # DW_FORM_data2
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	16                      # DW_AT_stmt_list
-	.byte	23                      # DW_FORM_sec_offset
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	0                       # EOM(3)
-	.section	.debug_info,"",@progbits
-.Lcu_begin0:
-	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
-.Lcu_start0:
-	.short	4                       # DWARF version number
-	.long	.debug_abbrev           # Offset Into Abbrev. Section
-	.byte	8                       # Address Size (in bytes)
-	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
-	.short	12                      # DW_AT_language
-	.long	.Linfo_string1          # DW_AT_name
-	.long	.Lline_table_start0     # DW_AT_stmt_list
-.Lcu_end0:
-	.section	.debug_line,"",@progbits
-.Lline_table_start0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s
deleted file mode 100644
index 14d1100..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-posix.s
+++ /dev/null
@@ -1,67 +0,0 @@
-# Test that parsing of line tables works reasonably, even if the host directory
-# separator does not match the separator of the compile unit.
-
-# REQUIRES: lld, x86
-
-# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld %t.o -o %t
-# RUN: %lldb %t -s %S/Inputs/dir-separator-posix.lldbinit -o exit | FileCheck %s
-
-# CHECK-LABEL: image dump line-table a.c
-# CHECK: Line table for /tmp/a.c
-# CHECK-NEXT: 0x0000000000201000: /tmp/a.c:1
-# CHECK-NEXT: 0x0000000000201001: /tmp/b.c:1
-# CHECK-NEXT: 0x0000000000201002: /tmp/b.c:1
-# CHECK-EMPTY:
-
-# CHECK-LABEL: breakpoint set -f a.c -l 1
-# CHECK: Breakpoint 1: {{.*}}`_start,
-
-# CHECK-LABEL: breakpoint set -f /tmp/b.c -l 1
-# CHECK: Breakpoint 2: {{.*}}`_start + 1,
-
-	.text
-	.globl	_start
-_start:
-	.file	1 "/tmp/a.c"
-	.loc	1 1 0
-        nop
-	.file	2 "/tmp/b.c"
-	.loc	2 1 0
-        nop
-
-	.section	.debug_str,"MS",@progbits,1
-.Linfo_string1:
-	.asciz	"a.c"
-.Linfo_string2:
-	.asciz	"/tmp"
-	.section	.debug_abbrev,"",@progbits
-	.byte	1                       # Abbreviation Code
-	.byte	17                      # DW_TAG_compile_unit
-	.byte	0                       # DW_CHILDREN_no
-	.byte	19                      # DW_AT_language
-	.byte	5                       # DW_FORM_data2
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	16                      # DW_AT_stmt_list
-	.byte	23                      # DW_FORM_sec_offset
-	.byte	27                      # DW_AT_comp_dir
-	.byte	14                      # DW_FORM_strp
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	0                       # EOM(3)
-	.section	.debug_info,"",@progbits
-.Lcu_begin0:
-	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
-.Lcu_start0:
-	.short	4                       # DWARF version number
-	.long	.debug_abbrev           # Offset Into Abbrev. Section
-	.byte	8                       # Address Size (in bytes)
-	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
-	.short	12                      # DW_AT_language
-	.long	.Linfo_string1          # DW_AT_name
-	.long	.Lline_table_start0     # DW_AT_stmt_list
-	.long	.Linfo_string2          # DW_AT_comp_dir
-.Lcu_end0:
-	.section	.debug_line,"",@progbits
-.Lline_table_start0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s
deleted file mode 100644
index 1ba03cc..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dir-separator-windows.s
+++ /dev/null
@@ -1,67 +0,0 @@
-# Test that parsing of line tables works reasonably, even if the host directory
-# separator does not match the separator of the compile unit.
-
-# REQUIRES: lld, x86
-
-# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld %t.o -o %t
-# RUN: %lldb %t -s %S/Inputs/dir-separator-windows.lldbinit -o exit | FileCheck %s
-
-# CHECK-LABEL: image dump line-table a.c
-# CHECK: Line table for C:\tmp\a.c
-# CHECK-NEXT: 0x0000000000201000: C:\tmp\a.c:1
-# CHECK-NEXT: 0x0000000000201001: C:\tmp\b.c:1
-# CHECK-NEXT: 0x0000000000201002: C:\tmp\b.c:1
-# CHECK-EMPTY:
-
-# CHECK-LABEL: breakpoint set -f a.c -l 1
-# CHECK: Breakpoint 1: {{.*}}`_start,
-
-# CHECK-LABEL: breakpoint set -f C:/tmp/b.c -l 1
-# CHECK: Breakpoint 2: {{.*}}`_start + 1,
-
-	.text
-	.globl	_start
-_start:
-	.file	1 "C:\\tmp\\a.c"
-	.loc	1 1 0
-        nop
-	.file	2 "C:\\tmp\\b.c"
-	.loc	2 1 0
-        nop
-
-	.section	.debug_str,"MS",@progbits,1
-.Linfo_string1:
-	.asciz	"a.c"
-.Linfo_string2:
-	.asciz	"C:\\tmp"
-	.section	.debug_abbrev,"",@progbits
-	.byte	1                       # Abbreviation Code
-	.byte	17                      # DW_TAG_compile_unit
-	.byte	0                       # DW_CHILDREN_no
-	.byte	19                      # DW_AT_language
-	.byte	5                       # DW_FORM_data2
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	16                      # DW_AT_stmt_list
-	.byte	23                      # DW_FORM_sec_offset
-	.byte	27                      # DW_AT_comp_dir
-	.byte	14                      # DW_FORM_strp
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	0                       # EOM(3)
-	.section	.debug_info,"",@progbits
-.Lcu_begin0:
-	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
-.Lcu_start0:
-	.short	4                       # DWARF version number
-	.long	.debug_abbrev           # Offset Into Abbrev. Section
-	.byte	8                       # Address Size (in bytes)
-	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
-	.short	12                      # DW_AT_language
-	.long	.Linfo_string1          # DW_AT_name
-	.long	.Lline_table_start0     # DW_AT_stmt_list
-	.long	.Linfo_string2          # DW_AT_comp_dir
-.Lcu_end0:
-	.section	.debug_line,"",@progbits
-.Lline_table_start0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dwarf5_locations.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/dwarf5_locations.s
deleted file mode 100644
index 2cf16ca..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dwarf5_locations.s
+++ /dev/null
@@ -1,68 +0,0 @@
-# This tests that lldb is able to process DW_OP_addrx tags introduced in dwarf5.
-
-# REQUIRES: lld, x86
-
-# RUN: llvm-mc -g -dwarf-version=5 -triple x86_64-unknown-linux-gnu %s -filetype=obj > %t.o
-# RUN: ld.lld -m elf_x86_64 %t.o -o %t 
-# RUN: lldb-test symbols %t | FileCheck %s
-
-# CHECK: Variable{0x7fffffff00000011}, name = "color"
-# CHECK-SAME: location = DW_OP_addrx(0x0)
-
-        .text
-        .section        .debug_str,"MS",@progbits,1
-.Lstr_offsets_base0:
-        .asciz  "color"
-
-        .section        .debug_str_offsets,"",@progbits
-        .long   .Lstr_offsets_base0
-
-        .section        .debug_abbrev,"",@progbits
-        .byte   1                       # Abbreviation Code
-        .byte   17                      # DW_TAG_compile_unit
-        .byte   1                       # DW_CHILDREN_yes
-        .byte   114                     # DW_AT_str_offsets_base
-        .byte   23                      # DW_FORM_sec_offset
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   2                       # Abbreviation Code
-        .byte   52                      # DW_TAG_variable
-        .byte   0                       # DW_CHILDREN_no
-        .byte   3                       # DW_AT_name
-        .byte   37                      # DW_FORM_strx1
-        .byte   63                      # DW_AT_external
-        .byte   25                      # DW_FORM_flag_present
-        .byte   2                       # DW_AT_location
-        .byte   24                      # DW_FORM_exprloc
-        .byte   0                       # EOM(1)
-        .byte   0                       # EOM(2)
-        .byte   0                       # EOM(3)
-        .byte   0                       # EOM(4)
-
-        .section        .debug_info,"",@progbits
-        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
-.Ldebug_info_start0:
-        .short  5                       # DWARF version number
-        .byte   1                       # DWARF Unit Type
-        .byte   8                       # Address Size (in bytes)
-        .long   .debug_abbrev           # Offset Into Abbrev. Section
-        .byte   1                       # Abbrev [1] 0xc:0x22 DW_TAG_compile_unit
-        .long   .Lstr_offsets_base0     # DW_AT_str_offsets_base
-        .byte   2                       # Abbrev [2] 0x1e:0xb DW_TAG_variable
-        .byte   0                       # DW_AT_name
-                                        # DW_AT_external
-        .byte   2                       # DW_AT_location
-        .byte   161
-        .byte   0
-        .byte   0                       # End Of Children Mark
-.Ldebug_info_end0:
-
-        .section        .debug_addr,"",@progbits
-        .long   .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
-.Ldebug_addr_start0:
-        .short  5                       # DWARF version number
-        .byte   8                       # Address size
-        .byte   0                       # Segment selector size
-        .quad   color
-.Ldebug_addr_end0:
-
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-basic-function.cpp b/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-basic-function.cpp
deleted file mode 100644
index 3d175f6..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-basic-function.cpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// REQUIRES: lld
-
-// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable
-// RUN: ld.lld %t.o -o %t
-// RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \
-// RUN:   FileCheck --check-prefix=BASE %s
-// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
-// RUN:   FileCheck --check-prefix=METHOD %s
-// RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
-// RUN:   FileCheck --check-prefix=FULL %s
-// RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
-// RUN:   FileCheck --check-prefix=FULL-MANGLED %s
-// RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
-// RUN:   FileCheck --check-prefix=CONTEXT %s
-// RUN: lldb-test symbols --name=not_there --find=function %t | \
-// RUN:   FileCheck --check-prefix=EMPTY %s
-//
-// RUN: %clang %s -g -c -o %t --target=x86_64-apple-macosx
-// RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \
-// RUN:   FileCheck --check-prefix=BASE %s
-// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
-// RUN:   FileCheck --check-prefix=METHOD %s
-// RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
-// RUN:   FileCheck --check-prefix=FULL %s
-// RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
-// RUN:   FileCheck --check-prefix=FULL-MANGLED %s
-// RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
-// RUN:   FileCheck --check-prefix=CONTEXT %s
-// RUN: lldb-test symbols --name=not_there --find=function %t | \
-// RUN:   FileCheck --check-prefix=EMPTY %s
-
-// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf
-// RUN: ld.lld %t.o -o %t
-// RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \
-// RUN:   FileCheck --check-prefix=BASE %s
-// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
-// RUN:   FileCheck --check-prefix=METHOD %s
-// RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
-// RUN:   FileCheck --check-prefix=FULL %s
-// RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
-// RUN:   FileCheck --check-prefix=FULL-MANGLED %s
-// RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
-// RUN:   FileCheck --check-prefix=CONTEXT %s
-// RUN: lldb-test symbols --name=not_there --find=function %t | \
-// RUN:   FileCheck --check-prefix=EMPTY %s
-
-// BASE: Found 4 functions:
-// BASE-DAG: name = "foo()", mangled = "_Z3foov"
-// BASE-DAG: name = "foo(int)", mangled = "_Z3fooi"
-// BASE-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"
-// BASE-DAG: name = "bar::baz::foo()", mangled = "_ZN3bar3baz3fooEv"
-
-// METHOD: Found 3 functions:
-// METHOD-DAG: name = "sbar::foo()", mangled = "_ZN4sbar3fooEv"
-// METHOD-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
-// METHOD-DAG: name = "ffbar()::sbaz::foo()", mangled = "_ZZ5ffbarvEN4sbaz3fooEv"
-
-// FULL: Found 7 functions:
-// FULL-DAG: name = "foo()", mangled = "_Z3foov"
-// FULL-DAG: name = "foo(int)", mangled = "_Z3fooi"
-// FULL-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"
-// FULL-DAG: name = "bar::baz::foo()", mangled = "_ZN3bar3baz3fooEv"
-// FULL-DAG: name = "sbar::foo()", mangled = "_ZN4sbar3fooEv"
-// FULL-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
-// FULL-DAG: name = "ffbar()::sbaz::foo()", mangled = "_ZZ5ffbarvEN4sbaz3fooEv"
-
-// FULL-MANGLED: Found 1 functions:
-// FULL-MANGLED-DAG: name = "foo(int)", mangled = "_Z3fooi"
-
-// CONTEXT: Found 1 functions:
-// CONTEXT-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"
-
-// EMPTY: Found 0 functions:
-
-void foo() {}
-void foo(int) {}
-
-namespace bar {
-int context;
-void foo() {}
-namespace baz {
-void foo() {}
-} // namespace baz
-} // namespace bar
-
-struct foo {};
-void fbar(struct foo) {}
-
-void Foo() {}
-
-struct sbar {
-  void foo();
-  static void foo(int);
-};
-void sbar::foo() {}
-void sbar::foo(int) {}
-
-void ffbar() {
-  struct sbaz {
-    void foo() {}
-  };
-  sbaz a;
-  a.foo();
-}
-
-extern "C" void _start() {}
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-inline-method.s b/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-inline-method.s
deleted file mode 100644
index c88c9a2..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-inline-method.s
+++ /dev/null
@@ -1,152 +0,0 @@
-# REQUIRES: lld, x86
-
-# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
-# RUN: ld.lld %t.o -o %t
-# RUN: lldb-test symbols --find=function --name=inl --function-flags=method %t \
-# RUN:   | FileCheck %s
-
-# CHECK: Function: {{.*}} mangled = "_Z8externali"
-# CHECK: Blocks: {{.*}} range = [0x00201000-0x00201002)
-# CHECK-NEXT: range = [0x00201000-0x00201002), name = "inl", mangled = _ZN1S3inlEi
-
-
-# Generated via:
-#   clang -O2 -g -S
-
-# from file:
-#   int forward(int);
-#   struct S {
-#     static int inl(int a) { return forward(a); }
-#   };
-#   int external(int a) { return S::inl(a); }
-
-# and then simplified.
-
-	.text
-_Z8externali:
-.Lfunc_begin0:
-	jmp	_Z7forwardi
-.Lfunc_end0:
-
-.globl _start
-_start:
-_Z7forwardi:
-        ret
-
-	.section	.debug_str,"MS",@progbits,1
-.Linfo_string0:
-	.asciz	"clang version 7.0.0 (trunk 332830) (llvm/trunk 332835) with manual modifications"
-.Linfo_string3:
-	.asciz	"_ZN1S3inlEi"
-.Linfo_string4:
-	.asciz	"inl"
-.Linfo_string6:
-	.asciz	"S"
-.Linfo_string8:
-	.asciz	"_Z8externali"
-.Linfo_string9:
-	.asciz	"external"
-	.section	.debug_abbrev,"",@progbits
-	.byte	1                       # Abbreviation Code
-	.byte	17                      # DW_TAG_compile_unit
-	.byte	1                       # DW_CHILDREN_yes
-	.byte	37                      # DW_AT_producer
-	.byte	14                      # DW_FORM_strp
-	.byte	19                      # DW_AT_language
-	.byte	5                       # DW_FORM_data2
-	.byte	17                      # DW_AT_low_pc
-	.byte	1                       # DW_FORM_addr
-	.byte	18                      # DW_AT_high_pc
-	.byte	6                       # DW_FORM_data4
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	2                       # Abbreviation Code
-	.byte	19                      # DW_TAG_structure_type
-	.byte	1                       # DW_CHILDREN_yes
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	11                      # DW_AT_byte_size
-	.byte	11                      # DW_FORM_data1
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	3                       # Abbreviation Code
-	.byte	46                      # DW_TAG_subprogram
-	.byte	0                       # DW_CHILDREN_no
-	.byte	110                     # DW_AT_linkage_name
-	.byte	14                      # DW_FORM_strp
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	6                       # Abbreviation Code
-	.byte	46                      # DW_TAG_subprogram
-	.byte	0                       # DW_CHILDREN_no
-	.byte	71                      # DW_AT_specification
-	.byte	19                      # DW_FORM_ref4
-	.byte	32                      # DW_AT_inline
-	.byte	11                      # DW_FORM_data1
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	8                       # Abbreviation Code
-	.byte	46                      # DW_TAG_subprogram
-	.byte	1                       # DW_CHILDREN_yes
-	.byte	17                      # DW_AT_low_pc
-	.byte	1                       # DW_FORM_addr
-	.byte	18                      # DW_AT_high_pc
-	.byte	6                       # DW_FORM_data4
-	.byte	110                     # DW_AT_linkage_name
-	.byte	14                      # DW_FORM_strp
-	.byte	3                       # DW_AT_name
-	.byte	14                      # DW_FORM_strp
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	10                      # Abbreviation Code
-	.byte	29                      # DW_TAG_inlined_subroutine
-	.byte	1                       # DW_CHILDREN_yes
-	.byte	49                      # DW_AT_abstract_origin
-	.byte	19                      # DW_FORM_ref4
-	.byte	17                      # DW_AT_low_pc
-	.byte	1                       # DW_FORM_addr
-	.byte	18                      # DW_AT_high_pc
-	.byte	6                       # DW_FORM_data4
-	.byte	0                       # EOM(1)
-	.byte	0                       # EOM(2)
-	.byte	0                       # EOM(3)
-	.section	.debug_info,"",@progbits
-.Lcu_begin0:
-	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
-.Lcu_start0:
-	.short	4                       # DWARF version number
-	.long	.debug_abbrev           # Offset Into Abbrev. Section
-	.byte	8                       # Address Size (in bytes)
-	.byte	1                       # Abbrev [1] 0xb:0x9e DW_TAG_compile_unit
-	.long	.Linfo_string0          # DW_AT_producer
-	.short	4                       # DW_AT_language
-	.quad	.Lfunc_begin0           # DW_AT_low_pc
-	.long	.Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
-	.byte	2                       # Abbrev [2] 0x2a:0x1f DW_TAG_structure_type
-	.long	.Linfo_string6          # DW_AT_name
-	.byte	1                       # DW_AT_byte_size
-.Linl_spec:
-	.byte	3                       # Abbrev [3] 0x33:0x15 DW_TAG_subprogram
-	.long	.Linfo_string3          # DW_AT_linkage_name
-	.long	.Linfo_string4          # DW_AT_name
-	.byte	0                       # End Of Children Mark
-.Linl_abstract:
-	.byte	6                       # Abbrev [6] 0x50:0x12 DW_TAG_subprogram
-	.long	.Linl_spec              # DW_AT_specification
-	.byte	1                       # DW_AT_inline
-.Linl_a_abstract:
-	.byte	8                       # Abbrev [8] 0x62:0x46 DW_TAG_subprogram
-	.quad	.Lfunc_begin0           # DW_AT_low_pc
-	.long	.Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
-	.long	.Linfo_string8          # DW_AT_linkage_name
-	.long	.Linfo_string9          # DW_AT_name
-	.byte	10                      # Abbrev [10] 0x8c:0x1b DW_TAG_inlined_subroutine
-	.long	.Linl_abstract          # DW_AT_abstract_origin
-	.quad	.Lfunc_begin0           # DW_AT_low_pc
-	.long	.Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
-	.byte	0                       # End Of Children Mark
-	.byte	0                       # End Of Children Mark
-	.byte	0                       # End Of Children Mark
-.Lcu_end0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/lit.local.cfg b/src/llvm-project/lldb/lit/SymbolFile/DWARF/lit.local.cfg
deleted file mode 100644
index 51b4bd4..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/DWARF/lit.local.cfg
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = ['.cpp', '.s', '.test']
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/s_constant.s b/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/s_constant.s
deleted file mode 100644
index 553a5ce..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/s_constant.s
+++ /dev/null
@@ -1,971 +0,0 @@
-	.text
-	.def	 @feat.00;
-	.scl	3;
-	.type	0;
-	.endef
-	.globl	@feat.00
-.set @feat.00, 0
-	.intel_syntax noprefix
-	.def	 main;
-	.scl	2;
-	.type	32;
-	.endef
-	.globl	main                    # -- Begin function main
-	.p2align	4, 0x90
-main:                                   # @main
-.Lfunc_begin0:
-	.cv_func_id 0
-	.cv_file	1 "D:\\src\\llvm-mono\\lldb\\lit\\SymbolFile\\NativePDB\\s_constant.cpp" "7F1DA683A9B72A1360C1FDEDD7550E06" 1
-	.cv_loc	0 1 79 0                # D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp:79:0
-.seh_proc main
-# %bb.0:                                # %entry
-	sub	rsp, 24
-	.seh_stackalloc 24
-	.seh_endprologue
-	xor	eax, eax
-	mov	dword ptr [rsp + 20], 0
-	mov	qword ptr [rsp + 8], rdx
-	mov	dword ptr [rsp + 4], ecx
-.Ltmp0:
-	.cv_loc	0 1 80 0                # D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp:80:0
-	add	rsp, 24
-	ret
-.Ltmp1:
-.Lfunc_end0:
-	.seh_handlerdata
-	.text
-	.seh_endproc
-                                        # -- End function
-	.section	.rdata,"dr"
-	.p2align	3               # @GlobalLUEA
-GlobalLUEA:
-	.quad	0                       # 0x0
-
-	.p2align	3               # @GlobalLUEB
-GlobalLUEB:
-	.quad	1000                    # 0x3e8
-
-	.p2align	3               # @GlobalLUEC
-GlobalLUEC:
-	.quad	-16                     # 0xfffffffffffffff0
-
-	.p2align	3               # @GlobalLSEA
-GlobalLSEA:
-	.quad	0                       # 0x0
-
-	.p2align	3               # @GlobalLSEB
-GlobalLSEB:
-	.quad	9223372036854775000     # 0x7ffffffffffffcd8
-
-	.p2align	3               # @GlobalLSEC
-GlobalLSEC:
-	.quad	-9223372036854775000    # 0x8000000000000328
-
-	.p2align	2               # @GlobalUEA
-GlobalUEA:
-	.long	0                       # 0x0
-
-	.p2align	2               # @GlobalUEB
-GlobalUEB:
-	.long	1000                    # 0x3e8
-
-	.p2align	2               # @GlobalUEC
-GlobalUEC:
-	.long	4294000000              # 0xfff13d80
-
-	.p2align	2               # @GlobalSEA
-GlobalSEA:
-	.long	0                       # 0x0
-
-	.p2align	2               # @GlobalSEB
-GlobalSEB:
-	.long	2147000000              # 0x7ff89ec0
-
-	.p2align	2               # @GlobalSEC
-GlobalSEC:
-	.long	2147967296              # 0x80076140
-
-GlobalSUEA:                             # @GlobalSUEA
-	.byte	0                       # 0x0
-
-GlobalSUEB:                             # @GlobalSUEB
-	.byte	100                     # 0x64
-
-GlobalSUEC:                             # @GlobalSUEC
-	.byte	200                     # 0xc8
-
-GlobalSSEA:                             # @GlobalSSEA
-	.byte	0                       # 0x0
-
-GlobalSSEB:                             # @GlobalSSEB
-	.byte	100                     # 0x64
-
-GlobalSSEC:                             # @GlobalSSEC
-	.byte	156                     # 0x9c
-
-	.section	.drectve,"yn"
-	.ascii	" /DEFAULTLIB:libcmt.lib"
-	.ascii	" /DEFAULTLIB:oldnames.lib"
-	.section	.debug$S,"dr"
-	.p2align	2
-	.long	4                       # Debug section magic
-	.long	241
-	.long	.Ltmp3-.Ltmp2           # Subsection size
-.Ltmp2:
-	.short	.Ltmp5-.Ltmp4           # Record length
-.Ltmp4:
-	.short	4412                    # Record kind: S_COMPILE3
-	.long	1                       # Flags and language
-	.short	208                     # CPUType
-	.short	8                       # Frontend version
-	.short	0
-	.short	0
-	.short	0
-	.short	8000                    # Backend version
-	.short	0
-	.short	0
-	.short	0
-	.asciz	"clang version 8.0.0 "  # Null-terminated compiler version string
-.Ltmp5:
-.Ltmp3:
-	.p2align	2
-	.long	241                     # Symbol subsection for main
-	.long	.Ltmp7-.Ltmp6           # Subsection size
-.Ltmp6:
-	.short	.Ltmp9-.Ltmp8           # Record length
-.Ltmp8:
-	.short	4423                    # Record kind: S_GPROC32_ID
-	.long	0                       # PtrParent
-	.long	0                       # PtrEnd
-	.long	0                       # PtrNext
-	.long	.Lfunc_end0-main        # Code size
-	.long	0                       # Offset after prologue
-	.long	0                       # Offset before epilogue
-	.long	4099                    # Function type index
-	.secrel32	main            # Function section relative address
-	.secidx	main                    # Function section index
-	.byte	0                       # Flags
-	.asciz	"main"                  # Function name
-.Ltmp9:
-	.short	.Ltmp11-.Ltmp10         # Record length
-.Ltmp10:
-	.short	4114                    # Record kind: S_FRAMEPROC
-	.long	24                      # FrameSize
-	.long	0                       # Padding
-	.long	0                       # Offset of padding
-	.long	0                       # Bytes of callee saved registers
-	.long	0                       # Exception handler offset
-	.short	0                       # Exception handler section
-	.long	81920                   # Flags (defines frame register)
-.Ltmp11:
-	.short	.Ltmp13-.Ltmp12         # Record length
-.Ltmp12:
-	.short	4414                    # Record kind: S_LOCAL
-	.long	116                     # TypeIndex
-	.short	1                       # Flags
-	.asciz	"argc"
-.Ltmp13:
-	.cv_def_range	 .Ltmp0 .Ltmp1, "B\021\004\000\000\000"
-	.short	.Ltmp15-.Ltmp14         # Record length
-.Ltmp14:
-	.short	4414                    # Record kind: S_LOCAL
-	.long	4096                    # TypeIndex
-	.short	1                       # Flags
-	.asciz	"argv"
-.Ltmp15:
-	.cv_def_range	 .Ltmp0 .Ltmp1, "B\021\b\000\000\000"
-	.short	2                       # Record length
-	.short	4431                    # Record kind: S_PROC_ID_END
-.Ltmp7:
-	.p2align	2
-	.cv_linetable	0, main, .Lfunc_end0
-	.long	241                     # Symbol subsection for globals
-	.long	.Ltmp17-.Ltmp16         # Subsection size
-.Ltmp16:
-	.short	.Ltmp19-.Ltmp18         # Record length
-.Ltmp18:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4104                    # Type
-	.short  0					    # Value
-	.asciz	"GlobalLUEA"            # Name
-.Ltmp19:
-	.short	.Ltmp21-.Ltmp20         # Record length
-.Ltmp20:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4104                    # Type
-	.short  1000				    # Value
-	.asciz	"GlobalLUEB"            # Name
-.Ltmp21:
-	.short	.Ltmp23-.Ltmp22         # Record length
-.Ltmp22:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4104                    # Type
-	.byte   0x00, 0x80, 0xf0		# Value
-	.asciz	"GlobalLUEC"            # Name
-.Ltmp23:
-	.short	.Ltmp25-.Ltmp24         # Record length
-.Ltmp24:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4108                    # Type
-	.byte   0x00, 0x00				# Value
-	.asciz	"GlobalLSEA"            # Name
-.Ltmp25:
-	.short	.Ltmp27-.Ltmp26         # Record length
-.Ltmp26:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4108                    # Type
-	.byte   0x0A, 0x80, 0xD8, 0xFC  # Value
-	.byte   0xFF, 0xFF, 0xFF, 0xFF
-	.byte   0xFF, 0x7F
-	.asciz	"GlobalLSEB"            # Name
-.Ltmp27:
-	.short	.Ltmp29-.Ltmp28         # Record length
-.Ltmp28:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4108                    # Type
-	.byte   0x09, 0x80, 0x28, 0x03  # Value
-	.byte   0x00, 0x00, 0x00, 0x00
-	.byte   0x00, 0x80
-	.asciz	"GlobalLSEC"            # Name
-.Ltmp29:
-	.short	.Ltmp31-.Ltmp30         # Record length
-.Ltmp30:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4112                    # Type
-	.byte   0x00, 0x00              # Value
-	.asciz	"GlobalUEA"             # Name
-.Ltmp31:
-	.short	.Ltmp33-.Ltmp32         # Record length
-.Ltmp32:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4112                    # Type
-	.byte   0xe8, 0x03              # Value
-	.asciz	"GlobalUEB"             # Name
-.Ltmp33:
-	.short	.Ltmp35-.Ltmp34         # Record length
-.Ltmp34:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4112                    # Type
-	.byte   0x04, 0x80, 0x80, 0x3d  # Value
-	.byte   0xf1, 0xff
-	.asciz	"GlobalUEC"             # Name
-.Ltmp35:
-	.short	.Ltmp37-.Ltmp36         # Record length
-.Ltmp36:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4116                    # Type
-	.byte   0x00, 0x00              # Value
-	.asciz	"GlobalSEA"             # Name
-.Ltmp37:
-	.short	.Ltmp39-.Ltmp38         # Record length
-.Ltmp38:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4116                    # Type
-	.byte   0x04, 0x80, 0xc0, 0x9e  # Value
-	.byte   0xf8, 0x7f
-	.asciz	"GlobalSEB"             # Name
-.Ltmp39:
-	.short	.Ltmp41-.Ltmp40         # Record length
-.Ltmp40:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4116                    # Type
-	.byte   0x03, 0x80, 0x40, 0x61  # Value
-	.byte   0x07, 0x80
-	.asciz	"GlobalSEC"             # Name
-.Ltmp41:
-	.short	.Ltmp43-.Ltmp42         # Record length
-.Ltmp42:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4120                    # Type
-	.byte   0x00, 0x00              # Value
-	.asciz	"GlobalSUEA"            # Name
-.Ltmp43:
-	.short	.Ltmp45-.Ltmp44         # Record length
-.Ltmp44:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4120                    # Type
-	.byte   0x64, 0x00              # Value
-	.asciz	"GlobalSUEB"            # Name
-.Ltmp45:
-	.short	.Ltmp47-.Ltmp46         # Record length
-.Ltmp46:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4120                    # Type
-	.byte   0xc8, 0x00              # Value
-	.asciz	"GlobalSUEC"            # Name
-.Ltmp47:
-	.short	.Ltmp49-.Ltmp48         # Record length
-.Ltmp48:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4124                    # Type
-	.byte   0x00, 0x00              # Value
-	.asciz	"GlobalSSEA"            # Name
-.Ltmp49:
-	.short	.Ltmp51-.Ltmp50         # Record length
-.Ltmp50:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4124                    # Type
-	.byte   0x64, 0x00              # Value
-	.asciz	"GlobalSSEB"            # Name
-.Ltmp51:
-	.short	.Ltmp53-.Ltmp52         # Record length
-.Ltmp52:
-	.short	4359                    # Record kind: S_CONSTANT
-	.long	4124                    # Type
-	.byte   0x00, 0x80, 0x9c        # Value
-	.asciz	"GlobalSSEC"            # Name
-.Ltmp53:
-.Ltmp17:
-	.p2align	2
-	.cv_filechecksums               # File index to string table offset subsection
-	.cv_stringtable                 # String table
-	.long	241
-	.long	.Ltmp55-.Ltmp54         # Subsection size
-.Ltmp54:
-	.short	6                       # Record length
-	.short	4428                    # Record kind: S_BUILDINFO
-	.long	4127                    # LF_BUILDINFO index
-.Ltmp55:
-	.p2align	2
-	.section	.debug$T,"dr"
-	.p2align	2
-	.long	4                       # Debug section magic
-	# Pointer (0x1000) {
-	#   TypeLeafKind: LF_POINTER (0x1002)
-	#   PointeeType: char* (0x670)
-	#   PointerAttributes: 0x1000C
-	#   PtrType: Near64 (0xC)
-	#   PtrMode: Pointer (0x0)
-	#   IsFlat: 0
-	#   IsConst: 0
-	#   IsVolatile: 0
-	#   IsUnaligned: 0
-	#   IsRestrict: 0
-	#   SizeOf: 8
-	# }
-	.byte	0x0a, 0x00, 0x02, 0x10
-	.byte	0x70, 0x06, 0x00, 0x00
-	.byte	0x0c, 0x00, 0x01, 0x00
-	# ArgList (0x1001) {
-	#   TypeLeafKind: LF_ARGLIST (0x1201)
-	#   NumArgs: 2
-	#   Arguments [
-	#     ArgType: int (0x74)
-	#     ArgType: char** (0x1000)
-	#   ]
-	# }
-	.byte	0x0e, 0x00, 0x01, 0x12
-	.byte	0x02, 0x00, 0x00, 0x00
-	.byte	0x74, 0x00, 0x00, 0x00
-	.byte	0x00, 0x10, 0x00, 0x00
-	# Procedure (0x1002) {
-	#   TypeLeafKind: LF_PROCEDURE (0x1008)
-	#   ReturnType: int (0x74)
-	#   CallingConvention: NearC (0x0)
-	#   FunctionOptions [ (0x0)
-	#   ]
-	#   NumParameters: 2
-	#   ArgListType: (int, char**) (0x1001)
-	# }
-	.byte	0x0e, 0x00, 0x08, 0x10
-	.byte	0x74, 0x00, 0x00, 0x00
-	.byte	0x00, 0x00, 0x02, 0x00
-	.byte	0x01, 0x10, 0x00, 0x00
-	# FuncId (0x1003) {
-	#   TypeLeafKind: LF_FUNC_ID (0x1601)
-	#   ParentScope: 0x0
-	#   FunctionType: int (int, char**) (0x1002)
-	#   Name: main
-	# }
-	.byte	0x12, 0x00, 0x01, 0x16
-	.byte	0x00, 0x00, 0x00, 0x00
-	.byte	0x02, 0x10, 0x00, 0x00
-	.byte	0x6d, 0x61, 0x69, 0x6e
-	.byte	0x00, 0xf3, 0xf2, 0xf1
-	# FieldList (0x1004) {
-	#   TypeLeafKind: LF_FIELDLIST (0x1203)
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 0
-	#     Name: LUE_A
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 1000
-	#     Name: LUE_B
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 18446744073709551600
-	#     Name: LUE_C
-	#   }
-	# }
-	.byte	0x2e, 0x00, 0x03, 0x12
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x00, 0x00, 0x4c, 0x55
-	.byte	0x45, 0x5f, 0x41, 0x00
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0xe8, 0x03, 0x4c, 0x55
-	.byte	0x45, 0x5f, 0x42, 0x00
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x0a, 0x80, 0xf0, 0xff
-	.byte	0xff, 0xff, 0xff, 0xff
-	.byte	0xff, 0xff, 0x4c, 0x55
-	.byte	0x45, 0x5f, 0x43, 0x00
-	# Enum (0x1005) {
-	#   TypeLeafKind: LF_ENUM (0x1507)
-	#   NumEnumerators: 3
-	#   Properties [ (0x200)
-	#     HasUniqueName (0x200)
-	#   ]
-	#   UnderlyingType: unsigned __int64 (0x23)
-	#   FieldListType: <field list> (0x1004)
-	#   Name: A::B::C::LargeUnsignedEnum
-	#   LinkageName: .?AW4LargeUnsignedEnum@C@B@A@@
-	# }
-	.byte	0x4a, 0x00, 0x07, 0x15
-	.byte	0x03, 0x00, 0x00, 0x02
-	.byte	0x23, 0x00, 0x00, 0x00
-	.byte	0x04, 0x10, 0x00, 0x00
-	.byte	0x41, 0x3a, 0x3a, 0x42
-	.byte	0x3a, 0x3a, 0x43, 0x3a
-	.byte	0x3a, 0x4c, 0x61, 0x72
-	.byte	0x67, 0x65, 0x55, 0x6e
-	.byte	0x73, 0x69, 0x67, 0x6e
-	.byte	0x65, 0x64, 0x45, 0x6e
-	.byte	0x75, 0x6d, 0x00, 0x2e
-	.byte	0x3f, 0x41, 0x57, 0x34
-	.byte	0x4c, 0x61, 0x72, 0x67
-	.byte	0x65, 0x55, 0x6e, 0x73
-	.byte	0x69, 0x67, 0x6e, 0x65
-	.byte	0x64, 0x45, 0x6e, 0x75
-	.byte	0x6d, 0x40, 0x43, 0x40
-	.byte	0x42, 0x40, 0x41, 0x40
-	.byte	0x40, 0x00, 0xf2, 0xf1
-	# StringId (0x1006) {
-	#   TypeLeafKind: LF_STRING_ID (0x1605)
-	#   Id: 0x0
-	#   StringData: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp
-	# }
-	.byte	0x46, 0x00, 0x05, 0x16
-	.byte	0x00, 0x00, 0x00, 0x00
-	.byte	0x44, 0x3a, 0x5c, 0x73
-	.byte	0x72, 0x63, 0x5c, 0x6c
-	.byte	0x6c, 0x76, 0x6d, 0x2d
-	.byte	0x6d, 0x6f, 0x6e, 0x6f
-	.byte	0x5c, 0x6c, 0x6c, 0x64
-	.byte	0x62, 0x5c, 0x6c, 0x69
-	.byte	0x74, 0x5c, 0x53, 0x79
-	.byte	0x6d, 0x62, 0x6f, 0x6c
-	.byte	0x46, 0x69, 0x6c, 0x65
-	.byte	0x5c, 0x4e, 0x61, 0x74
-	.byte	0x69, 0x76, 0x65, 0x50
-	.byte	0x44, 0x42, 0x5c, 0x73
-	.byte	0x5f, 0x63, 0x6f, 0x6e
-	.byte	0x73, 0x74, 0x61, 0x6e
-	.byte	0x74, 0x2e, 0x63, 0x70
-	.byte	0x70, 0x00, 0xf2, 0xf1
-	# UdtSourceLine (0x1007) {
-	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
-	#   UDT: A::B::C::LargeUnsignedEnum (0x1005)
-	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
-	#   LineNumber: 14
-	# }
-	.byte	0x0e, 0x00, 0x06, 0x16
-	.byte	0x05, 0x10, 0x00, 0x00
-	.byte	0x06, 0x10, 0x00, 0x00
-	.byte	0x0e, 0x00, 0x00, 0x00
-	# Modifier (0x1008) {
-	#   TypeLeafKind: LF_MODIFIER (0x1001)
-	#   ModifiedType: A::B::C::LargeUnsignedEnum (0x1005)
-	#   Modifiers [ (0x1)
-	#     Const (0x1)
-	#   ]
-	# }
-	.byte	0x0a, 0x00, 0x01, 0x10
-	.byte	0x05, 0x10, 0x00, 0x00
-	.byte	0x01, 0x00, 0xf2, 0xf1
-	# FieldList (0x1009) {
-	#   TypeLeafKind: LF_FIELDLIST (0x1203)
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 0
-	#     Name: LSE_A
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 9223372036854775000
-	#     Name: LSE_B
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 9223372036854776616
-	#     Name: LSE_C
-	#   }
-	# }
-	.byte	0x36, 0x00, 0x03, 0x12
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x00, 0x00, 0x4c, 0x53
-	.byte	0x45, 0x5f, 0x41, 0x00
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x0a, 0x80, 0xd8, 0xfc
-	.byte	0xff, 0xff, 0xff, 0xff
-	.byte	0xff, 0x7f, 0x4c, 0x53
-	.byte	0x45, 0x5f, 0x42, 0x00
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x0a, 0x80, 0x28, 0x03
-	.byte	0x00, 0x00, 0x00, 0x00
-	.byte	0x00, 0x80, 0x4c, 0x53
-	.byte	0x45, 0x5f, 0x43, 0x00
-	# Enum (0x100A) {
-	#   TypeLeafKind: LF_ENUM (0x1507)
-	#   NumEnumerators: 3
-	#   Properties [ (0x200)
-	#     HasUniqueName (0x200)
-	#   ]
-	#   UnderlyingType: __int64 (0x13)
-	#   FieldListType: <field list> (0x1009)
-	#   Name: A::B::C::LargeSignedEnum
-	#   LinkageName: .?AW4LargeSignedEnum@C@B@A@@
-	# }
-	.byte	0x46, 0x00, 0x07, 0x15
-	.byte	0x03, 0x00, 0x00, 0x02
-	.byte	0x13, 0x00, 0x00, 0x00
-	.byte	0x09, 0x10, 0x00, 0x00
-	.byte	0x41, 0x3a, 0x3a, 0x42
-	.byte	0x3a, 0x3a, 0x43, 0x3a
-	.byte	0x3a, 0x4c, 0x61, 0x72
-	.byte	0x67, 0x65, 0x53, 0x69
-	.byte	0x67, 0x6e, 0x65, 0x64
-	.byte	0x45, 0x6e, 0x75, 0x6d
-	.byte	0x00, 0x2e, 0x3f, 0x41
-	.byte	0x57, 0x34, 0x4c, 0x61
-	.byte	0x72, 0x67, 0x65, 0x53
-	.byte	0x69, 0x67, 0x6e, 0x65
-	.byte	0x64, 0x45, 0x6e, 0x75
-	.byte	0x6d, 0x40, 0x43, 0x40
-	.byte	0x42, 0x40, 0x41, 0x40
-	.byte	0x40, 0x00, 0xf2, 0xf1
-	# UdtSourceLine (0x100B) {
-	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
-	#   UDT: A::B::C::LargeSignedEnum (0x100A)
-	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
-	#   LineNumber: 20
-	# }
-	.byte	0x0e, 0x00, 0x06, 0x16
-	.byte	0x0a, 0x10, 0x00, 0x00
-	.byte	0x06, 0x10, 0x00, 0x00
-	.byte	0x14, 0x00, 0x00, 0x00
-	# Modifier (0x100C) {
-	#   TypeLeafKind: LF_MODIFIER (0x1001)
-	#   ModifiedType: A::B::C::LargeSignedEnum (0x100A)
-	#   Modifiers [ (0x1)
-	#     Const (0x1)
-	#   ]
-	# }
-	.byte	0x0a, 0x00, 0x01, 0x10
-	.byte	0x0a, 0x10, 0x00, 0x00
-	.byte	0x01, 0x00, 0xf2, 0xf1
-	# FieldList (0x100D) {
-	#   TypeLeafKind: LF_FIELDLIST (0x1203)
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 0
-	#     Name: UE_A
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 1000
-	#     Name: UE_B
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 4294000000
-	#     Name: UE_C
-	#   }
-	# }
-	.byte	0x2a, 0x00, 0x03, 0x12
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x00, 0x00, 0x55, 0x45
-	.byte	0x5f, 0x41, 0x00, 0xf1
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0xe8, 0x03, 0x55, 0x45
-	.byte	0x5f, 0x42, 0x00, 0xf1
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x04, 0x80, 0x80, 0x3d
-	.byte	0xf1, 0xff, 0x55, 0x45
-	.byte	0x5f, 0x43, 0x00, 0xf1
-	# Enum (0x100E) {
-	#   TypeLeafKind: LF_ENUM (0x1507)
-	#   NumEnumerators: 3
-	#   Properties [ (0x200)
-	#     HasUniqueName (0x200)
-	#   ]
-	#   UnderlyingType: unsigned (0x75)
-	#   FieldListType: <field list> (0x100D)
-	#   Name: A::B::C::UnsignedEnum
-	#   LinkageName: .?AW4UnsignedEnum@C@B@A@@
-	# }
-	.byte	0x3e, 0x00, 0x07, 0x15
-	.byte	0x03, 0x00, 0x00, 0x02
-	.byte	0x75, 0x00, 0x00, 0x00
-	.byte	0x0d, 0x10, 0x00, 0x00
-	.byte	0x41, 0x3a, 0x3a, 0x42
-	.byte	0x3a, 0x3a, 0x43, 0x3a
-	.byte	0x3a, 0x55, 0x6e, 0x73
-	.byte	0x69, 0x67, 0x6e, 0x65
-	.byte	0x64, 0x45, 0x6e, 0x75
-	.byte	0x6d, 0x00, 0x2e, 0x3f
-	.byte	0x41, 0x57, 0x34, 0x55
-	.byte	0x6e, 0x73, 0x69, 0x67
-	.byte	0x6e, 0x65, 0x64, 0x45
-	.byte	0x6e, 0x75, 0x6d, 0x40
-	.byte	0x43, 0x40, 0x42, 0x40
-	.byte	0x41, 0x40, 0x40, 0x00
-	# UdtSourceLine (0x100F) {
-	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
-	#   UDT: A::B::C::UnsignedEnum (0x100E)
-	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
-	#   LineNumber: 26
-	# }
-	.byte	0x0e, 0x00, 0x06, 0x16
-	.byte	0x0e, 0x10, 0x00, 0x00
-	.byte	0x06, 0x10, 0x00, 0x00
-	.byte	0x1a, 0x00, 0x00, 0x00
-	# Modifier (0x1010) {
-	#   TypeLeafKind: LF_MODIFIER (0x1001)
-	#   ModifiedType: A::B::C::UnsignedEnum (0x100E)
-	#   Modifiers [ (0x1)
-	#     Const (0x1)
-	#   ]
-	# }
-	.byte	0x0a, 0x00, 0x01, 0x10
-	.byte	0x0e, 0x10, 0x00, 0x00
-	.byte	0x01, 0x00, 0xf2, 0xf1
-	# FieldList (0x1011) {
-	#   TypeLeafKind: LF_FIELDLIST (0x1203)
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 0
-	#     Name: SE_A
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 2147000000
-	#     Name: SE_B
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 18446744071562551616
-	#     Name: SE_C
-	#   }
-	# }
-	.byte	0x32, 0x00, 0x03, 0x12
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x00, 0x00, 0x53, 0x45
-	.byte	0x5f, 0x41, 0x00, 0xf1
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x04, 0x80, 0xc0, 0x9e
-	.byte	0xf8, 0x7f, 0x53, 0x45
-	.byte	0x5f, 0x42, 0x00, 0xf1
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x0a, 0x80, 0x40, 0x61
-	.byte	0x07, 0x80, 0xff, 0xff
-	.byte	0xff, 0xff, 0x53, 0x45
-	.byte	0x5f, 0x43, 0x00, 0xf1
-	# Enum (0x1012) {
-	#   TypeLeafKind: LF_ENUM (0x1507)
-	#   NumEnumerators: 3
-	#   Properties [ (0x200)
-	#     HasUniqueName (0x200)
-	#   ]
-	#   UnderlyingType: int (0x74)
-	#   FieldListType: <field list> (0x1011)
-	#   Name: A::B::C::SignedEnum
-	#   LinkageName: .?AW4SignedEnum@C@B@A@@
-	# }
-	.byte	0x3a, 0x00, 0x07, 0x15
-	.byte	0x03, 0x00, 0x00, 0x02
-	.byte	0x74, 0x00, 0x00, 0x00
-	.byte	0x11, 0x10, 0x00, 0x00
-	.byte	0x41, 0x3a, 0x3a, 0x42
-	.byte	0x3a, 0x3a, 0x43, 0x3a
-	.byte	0x3a, 0x53, 0x69, 0x67
-	.byte	0x6e, 0x65, 0x64, 0x45
-	.byte	0x6e, 0x75, 0x6d, 0x00
-	.byte	0x2e, 0x3f, 0x41, 0x57
-	.byte	0x34, 0x53, 0x69, 0x67
-	.byte	0x6e, 0x65, 0x64, 0x45
-	.byte	0x6e, 0x75, 0x6d, 0x40
-	.byte	0x43, 0x40, 0x42, 0x40
-	.byte	0x41, 0x40, 0x40, 0x00
-	# UdtSourceLine (0x1013) {
-	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
-	#   UDT: A::B::C::SignedEnum (0x1012)
-	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
-	#   LineNumber: 32
-	# }
-	.byte	0x0e, 0x00, 0x06, 0x16
-	.byte	0x12, 0x10, 0x00, 0x00
-	.byte	0x06, 0x10, 0x00, 0x00
-	.byte	0x20, 0x00, 0x00, 0x00
-	# Modifier (0x1014) {
-	#   TypeLeafKind: LF_MODIFIER (0x1001)
-	#   ModifiedType: A::B::C::SignedEnum (0x1012)
-	#   Modifiers [ (0x1)
-	#     Const (0x1)
-	#   ]
-	# }
-	.byte	0x0a, 0x00, 0x01, 0x10
-	.byte	0x12, 0x10, 0x00, 0x00
-	.byte	0x01, 0x00, 0xf2, 0xf1
-	# FieldList (0x1015) {
-	#   TypeLeafKind: LF_FIELDLIST (0x1203)
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 0
-	#     Name: SUE_A
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 100
-	#     Name: SUE_B
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 200
-	#     Name: SUE_C
-	#   }
-	# }
-	.byte	0x26, 0x00, 0x03, 0x12
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x00, 0x00, 0x53, 0x55
-	.byte	0x45, 0x5f, 0x41, 0x00
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x64, 0x00, 0x53, 0x55
-	.byte	0x45, 0x5f, 0x42, 0x00
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0xc8, 0x00, 0x53, 0x55
-	.byte	0x45, 0x5f, 0x43, 0x00
-	# Enum (0x1016) {
-	#   TypeLeafKind: LF_ENUM (0x1507)
-	#   NumEnumerators: 3
-	#   Properties [ (0x200)
-	#     HasUniqueName (0x200)
-	#   ]
-	#   UnderlyingType: unsigned char (0x20)
-	#   FieldListType: <field list> (0x1015)
-	#   Name: A::B::C::SmallUnsignedEnum
-	#   LinkageName: .?AW4SmallUnsignedEnum@C@B@A@@
-	# }
-	.byte	0x4a, 0x00, 0x07, 0x15
-	.byte	0x03, 0x00, 0x00, 0x02
-	.byte	0x20, 0x00, 0x00, 0x00
-	.byte	0x15, 0x10, 0x00, 0x00
-	.byte	0x41, 0x3a, 0x3a, 0x42
-	.byte	0x3a, 0x3a, 0x43, 0x3a
-	.byte	0x3a, 0x53, 0x6d, 0x61
-	.byte	0x6c, 0x6c, 0x55, 0x6e
-	.byte	0x73, 0x69, 0x67, 0x6e
-	.byte	0x65, 0x64, 0x45, 0x6e
-	.byte	0x75, 0x6d, 0x00, 0x2e
-	.byte	0x3f, 0x41, 0x57, 0x34
-	.byte	0x53, 0x6d, 0x61, 0x6c
-	.byte	0x6c, 0x55, 0x6e, 0x73
-	.byte	0x69, 0x67, 0x6e, 0x65
-	.byte	0x64, 0x45, 0x6e, 0x75
-	.byte	0x6d, 0x40, 0x43, 0x40
-	.byte	0x42, 0x40, 0x41, 0x40
-	.byte	0x40, 0x00, 0xf2, 0xf1
-	# UdtSourceLine (0x1017) {
-	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
-	#   UDT: A::B::C::SmallUnsignedEnum (0x1016)
-	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
-	#   LineNumber: 38
-	# }
-	.byte	0x0e, 0x00, 0x06, 0x16
-	.byte	0x16, 0x10, 0x00, 0x00
-	.byte	0x06, 0x10, 0x00, 0x00
-	.byte	0x26, 0x00, 0x00, 0x00
-	# Modifier (0x1018) {
-	#   TypeLeafKind: LF_MODIFIER (0x1001)
-	#   ModifiedType: A::B::C::SmallUnsignedEnum (0x1016)
-	#   Modifiers [ (0x1)
-	#     Const (0x1)
-	#   ]
-	# }
-	.byte	0x0a, 0x00, 0x01, 0x10
-	.byte	0x16, 0x10, 0x00, 0x00
-	.byte	0x01, 0x00, 0xf2, 0xf1
-	# FieldList (0x1019) {
-	#   TypeLeafKind: LF_FIELDLIST (0x1203)
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 0
-	#     Name: SSE_A
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 100
-	#     Name: SSE_B
-	#   }
-	#   Enumerator {
-	#     TypeLeafKind: LF_ENUMERATE (0x1502)
-	#     AccessSpecifier: Public (0x3)
-	#     EnumValue: 18446744073709551516
-	#     Name: SSE_C
-	#   }
-	# }
-	.byte	0x2e, 0x00, 0x03, 0x12
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x00, 0x00, 0x53, 0x53
-	.byte	0x45, 0x5f, 0x41, 0x00
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x64, 0x00, 0x53, 0x53
-	.byte	0x45, 0x5f, 0x42, 0x00
-	.byte	0x02, 0x15, 0x03, 0x00
-	.byte	0x0a, 0x80, 0x9c, 0xff
-	.byte	0xff, 0xff, 0xff, 0xff
-	.byte	0xff, 0xff, 0x53, 0x53
-	.byte	0x45, 0x5f, 0x43, 0x00
-	# Enum (0x101A) {
-	#   TypeLeafKind: LF_ENUM (0x1507)
-	#   NumEnumerators: 3
-	#   Properties [ (0x200)
-	#     HasUniqueName (0x200)
-	#   ]
-	#   UnderlyingType: char (0x70)
-	#   FieldListType: <field list> (0x1019)
-	#   Name: A::B::C::SmallSignedEnum
-	#   LinkageName: .?AW4SmallSignedEnum@C@B@A@@
-	# }
-	.byte	0x46, 0x00, 0x07, 0x15
-	.byte	0x03, 0x00, 0x00, 0x02
-	.byte	0x70, 0x00, 0x00, 0x00
-	.byte	0x19, 0x10, 0x00, 0x00
-	.byte	0x41, 0x3a, 0x3a, 0x42
-	.byte	0x3a, 0x3a, 0x43, 0x3a
-	.byte	0x3a, 0x53, 0x6d, 0x61
-	.byte	0x6c, 0x6c, 0x53, 0x69
-	.byte	0x67, 0x6e, 0x65, 0x64
-	.byte	0x45, 0x6e, 0x75, 0x6d
-	.byte	0x00, 0x2e, 0x3f, 0x41
-	.byte	0x57, 0x34, 0x53, 0x6d
-	.byte	0x61, 0x6c, 0x6c, 0x53
-	.byte	0x69, 0x67, 0x6e, 0x65
-	.byte	0x64, 0x45, 0x6e, 0x75
-	.byte	0x6d, 0x40, 0x43, 0x40
-	.byte	0x42, 0x40, 0x41, 0x40
-	.byte	0x40, 0x00, 0xf2, 0xf1
-	# UdtSourceLine (0x101B) {
-	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
-	#   UDT: A::B::C::SmallSignedEnum (0x101A)
-	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
-	#   LineNumber: 44
-	# }
-	.byte	0x0e, 0x00, 0x06, 0x16
-	.byte	0x1a, 0x10, 0x00, 0x00
-	.byte	0x06, 0x10, 0x00, 0x00
-	.byte	0x2c, 0x00, 0x00, 0x00
-	# Modifier (0x101C) {
-	#   TypeLeafKind: LF_MODIFIER (0x1001)
-	#   ModifiedType: A::B::C::SmallSignedEnum (0x101A)
-	#   Modifiers [ (0x1)
-	#     Const (0x1)
-	#   ]
-	# }
-	.byte	0x0a, 0x00, 0x01, 0x10
-	.byte	0x1a, 0x10, 0x00, 0x00
-	.byte	0x01, 0x00, 0xf2, 0xf1
-	# StringId (0x101D) {
-	#   TypeLeafKind: LF_STRING_ID (0x1605)
-	#   Id: 0x0
-	#   StringData: D:\\src\\llvmbuild\\ninja-x64
-	# }
-	.byte	0x26, 0x00, 0x05, 0x16
-	.byte	0x00, 0x00, 0x00, 0x00
-	.byte	0x44, 0x3a, 0x5c, 0x5c
-	.byte	0x73, 0x72, 0x63, 0x5c
-	.byte	0x5c, 0x6c, 0x6c, 0x76
-	.byte	0x6d, 0x62, 0x75, 0x69
-	.byte	0x6c, 0x64, 0x5c, 0x5c
-	.byte	0x6e, 0x69, 0x6e, 0x6a
-	.byte	0x61, 0x2d, 0x78, 0x36
-	.byte	0x34, 0x00, 0xf2, 0xf1
-	# StringId (0x101E) {
-	#   TypeLeafKind: LF_STRING_ID (0x1605)
-	#   Id: 0x0
-	#   StringData: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\variable.cpp
-	# }
-	.byte	0x42, 0x00, 0x05, 0x16
-	.byte	0x00, 0x00, 0x00, 0x00
-	.byte	0x44, 0x3a, 0x5c, 0x73
-	.byte	0x72, 0x63, 0x5c, 0x6c
-	.byte	0x6c, 0x76, 0x6d, 0x2d
-	.byte	0x6d, 0x6f, 0x6e, 0x6f
-	.byte	0x5c, 0x6c, 0x6c, 0x64
-	.byte	0x62, 0x5c, 0x6c, 0x69
-	.byte	0x74, 0x5c, 0x53, 0x79
-	.byte	0x6d, 0x62, 0x6f, 0x6c
-	.byte	0x46, 0x69, 0x6c, 0x65
-	.byte	0x5c, 0x4e, 0x61, 0x74
-	.byte	0x69, 0x76, 0x65, 0x50
-	.byte	0x44, 0x42, 0x5c, 0x76
-	.byte	0x61, 0x72, 0x69, 0x61
-	.byte	0x62, 0x6c, 0x65, 0x2e
-	.byte	0x63, 0x70, 0x70, 0x00
-	# BuildInfo (0x101F) {
-	#   TypeLeafKind: LF_BUILDINFO (0x1603)
-	#   NumArgs: 5
-	#   Arguments [
-	#     ArgType: D:\\src\\llvmbuild\\ninja-x64 (0x101D)
-	#     ArgType: 0x0
-	#     ArgType: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\variable.cpp (0x101E)
-	#     ArgType: 0x0
-	#     ArgType: 0x0
-	#   ]
-	# }
-	.byte	0x1a, 0x00, 0x03, 0x16
-	.byte	0x05, 0x00, 0x1d, 0x10
-	.byte	0x00, 0x00, 0x00, 0x00
-	.byte	0x00, 0x00, 0x1e, 0x10
-	.byte	0x00, 0x00, 0x00, 0x00
-	.byte	0x00, 0x00, 0x00, 0x00
-	.byte	0x00, 0x00, 0xf2, 0xf1
-
-	.addrsig
-	.addrsig_sym GlobalLUEA
-	.addrsig_sym GlobalLUEB
-	.addrsig_sym GlobalLUEC
-	.addrsig_sym GlobalLSEA
-	.addrsig_sym GlobalLSEB
-	.addrsig_sym GlobalLSEC
-	.addrsig_sym GlobalUEA
-	.addrsig_sym GlobalUEB
-	.addrsig_sym GlobalUEC
-	.addrsig_sym GlobalSEA
-	.addrsig_sym GlobalSEB
-	.addrsig_sym GlobalSEC
-	.addrsig_sym GlobalSUEA
-	.addrsig_sym GlobalSUEB
-	.addrsig_sym GlobalSUEC
-	.addrsig_sym GlobalSSEA
-	.addrsig_sym GlobalSSEB
-	.addrsig_sym GlobalSSEC
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/disassembly.cpp b/src/llvm-project/lldb/lit/SymbolFile/NativePDB/disassembly.cpp
deleted file mode 100644
index 3553f29..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/disassembly.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// clang-format off
-// REQUIRES: lld
-
-// Test that we can show disassembly and source.
-// RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s 
-// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
-// RUN:     %p/Inputs/disassembly.lldbinit | FileCheck %s
-
-// Some context lines before
-// the function.
-
-int foo() { return 42; }
-
-int main(int argc, char **argv) {
-  foo();
-  return 0;
-}
-
-
-// CHECK:      (lldb) disassemble --flavor=intel -m -n main
-// CHECK:         12   int foo() { return 42; }
-// CHECK-NEXT:    13
-// CHECK-NEXT: ** 14   int main(int argc, char **argv) {
-// CHECK:      disassembly.cpp.tmp.exe`main:
-// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+0>:  sub    rsp, 0x38
-// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+4>:  mov    dword ptr [rsp + 0x34], 0x0
-// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+12>: mov    qword ptr [rsp + 0x28], rdx
-// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+17>: mov    dword ptr [rsp + 0x24], ecx
-// CHECK:      ** 15     foo();
-// CHECK:      disassembly.cpp.tmp.exe[{{.*}}] <+21>: call   {{.*}}               ; foo at disassembly.cpp:12
-// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+26>: xor    ecx, ecx
-// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+28>: mov    dword ptr [rsp + 0x20], eax
-// CHECK:      ** 16     return 0;
-// CHECK-NEXT:    17   }
-// CHECK-NEXT:    18
-// CHECK:      disassembly.cpp.tmp.exe[{{.*}}] <+32>: mov    eax, ecx
-// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+34>: add    rsp, 0x38
-// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+38>: ret
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/function-types-calling-conv.cpp b/src/llvm-project/lldb/lit/SymbolFile/NativePDB/function-types-calling-conv.cpp
deleted file mode 100644
index cd13159..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/function-types-calling-conv.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// clang-format off
-// REQUIRES: lld
-
-// RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib -o %t.exe -- %s 
-// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
-// RUN:     %p/Inputs/function-types-calling-conv.lldbinit | FileCheck %s
-
-
-void __stdcall StdcallFn() {}
-void __fastcall FastcallFn() {}
-void __thiscall ThiscallFn() {}
-void __cdecl CdeclFn() {}
-void __vectorcall VectorcallFn() {}
-
-auto sfn = &StdcallFn;
-// CHECK: (void (*)() __attribute__((stdcall))) sfn = {{.*}}
-
-auto ffn = &FastcallFn;
-// CHECK: (void (*)() __attribute__((fastcall))) ffn = {{.*}}
-
-auto tfn = &ThiscallFn;
-// CHECK: (void (*)() __attribute__((thiscall))) tfn = {{.*}}
-
-auto cfn = &CdeclFn;
-// CHECK: (void (*)()) cfn = {{.*}}
-
-auto vfn = &VectorcallFn;
-// CHECK: (void (*)() __attribute__((vectorcall))) vfn = {{.*}}
-
-int main(int argc, char **argv) {
-  return 0;
-}
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/class-layout.test b/src/llvm-project/lldb/lit/SymbolFile/PDB/class-layout.test
deleted file mode 100644
index 5c01944..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/PDB/class-layout.test
+++ /dev/null
@@ -1,92 +0,0 @@
-REQUIRES: system-windows, msvc
-RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.obj %S/Inputs/ClassLayoutTest.cpp
-RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.exe %T/ClassLayoutTest.cpp.obj
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck %s
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=ENUM %s
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=UNION %s
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=STRUCT %s
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=COMPLEX %s
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=LIST %s
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=UNNAMED-STRUCT %s
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=BASE %s
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=FRIEND %s
-RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=CLASS %s
-
-CHECK: Module [[MOD:.*]]
-CHECK: {{^[0-9A-F]+}}: SymbolVendor pdb ([[MOD]])
-CHECK: {{^[0-9A-F]+}}:   CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\ClassLayoutTest.cpp'
-
-ENUM:  name = "Enum", size = 4,  decl = ClassLayoutTest.cpp:5
-ENUM-SAME: enum Enum {
-ENUM:    RED,
-ENUM:    GREEN,
-ENUM:    BLUE
-ENUM:}
-
-UNION:  name = "Union", size = 4, decl = ClassLayoutTest.cpp:9
-UNION-SAME: union Union {
-UNION:    short Row;
-UNION:    unsigned short Col;
-UNION:    int Line : 16;
-UNION:    long Table;
-UNION:}
-
-STRUCT:  name = "Struct", size = 64, decl = ClassLayoutTest.cpp:22
-STRUCT-SAME: struct Struct {
-STRUCT:    bool A;
-STRUCT:    unsigned char UCharVar;
-STRUCT:    unsigned int UIntVar;
-STRUCT:    long long LongLongVar;
-STRUCT:    Enum EnumVar;
-STRUCT:    int array[10];
-STRUCT:}
-
-COMPLEX:  name = "Complex", size = 368, decl = ClassLayoutTest.cpp:33
-COMPLEX-SAME: struct Complex {
-COMPLEX:    _List *array[90];
-COMPLEX:    int x;
-COMPLEX:    int a;
-COMPLEX:    float b;
-COMPLEX:}
-
-LIST:  name = "_List", size = 12, decl = ClassLayoutTest.cpp:45
-LIST-SAME: struct _List {
-LIST:    _List *current;
-LIST:    _List *previous;
-LIST:    _List *next;
-LIST:}
-
-UNNAMED-STRUCT:  name = "UnnamedStruct", size = 4, decl = ClassLayoutTest.cpp:52
-UNNAMED-STRUCT-SAME: struct UnnamedStruct {
-UNNAMED-STRUCT:   int a;
-UNNAMED-STRUCT:}
-
-BASE:  name = "Base", size = 4,  decl = ClassLayoutTest.cpp:59
-BASE-SAME: class Base {
-BASE:    int a;
-BASE:    Base();
-BASE:    ~Base();
-BASE:    int Get();
-BASE:}
-
-FRIEND:  name = "Friend", size = 1, decl = ClassLayoutTest.cpp:70
-FRIEND-SAME: class Friend {
-FRIEND:    int f();
-FRIEND: }
-
-CLASS:  name = "Class", size = 88, decl = ClassLayoutTest.cpp:74
-CLASS-SAME: class Class : public MemberTest::Base {
-CLASS:    static int m_static;
-CLASS:    int m_public;
-CLASS:    Struct m_struct;
-CLASS:    Union m_union;
-CLASS:    int m_private;
-CLASS:    int m_protected;
-CLASS:    Class();
-CLASS:    Class(int);
-CLASS:    ~Class();
-CLASS:    static int {{.*}}StaticMemberFunc(int, ...);
-CLASS:    int Get();
-CLASS:    int f(MemberTest::Friend);
-CLASS:    bool operator==(const MemberTest::Class &)
-CLASS:}
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/compilands.test b/src/llvm-project/lldb/lit/SymbolFile/PDB/compilands.test
deleted file mode 100644
index d719ab7..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/PDB/compilands.test
+++ /dev/null
@@ -1,11 +0,0 @@
-REQUIRES: system-windows, msvc
-RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/CompilandsTest.cpp.obj %S/Inputs/CompilandsTest.cpp
-RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/CompilandsTest.cpp.exe %T/CompilandsTest.cpp.obj
-RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols %T/CompilandsTest.cpp.exe | FileCheck %s
-RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols %T/CompilandsTest.cpp.exe | FileCheck %s
-
-; Link default libraries
-
-CHECK: Module [[CU:.*]]
-CHECK: {{^[0-9A-F]+}}: SymbolVendor pdb ([[CU]])
-CHECK: {{^[0-9A-F]+}}:   CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\CompilandsTest.cpp'
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/func-symbols.test b/src/llvm-project/lldb/lit/SymbolFile/PDB/func-symbols.test
deleted file mode 100644
index fbbf5dd..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/PDB/func-symbols.test
+++ /dev/null
@@ -1,46 +0,0 @@
-REQUIRES: system-windows, lld
-RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%T/FuncSymbolsTest.exe %S/Inputs/FuncSymbolsTestMain.cpp %S/Inputs/FuncSymbols.cpp
-RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-ONE %s
-RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-TWO %s
-
-; Link multiple objects
-; In this test, We don't check demangled name of a mangled function.
-
-CHECK-ONE: Module [[MD:.*]]
-CHECK-ONE-DAG: {{.*}}: SymbolVendor pdb ([[MD]])
-CHECK-ONE-DAG: [[TY0:.*]]:   Type{[[UID0:.*]]} , name = "Func_arg_array", decl = FuncSymbolsTestMain.cpp:3, compiler_type = {{.*}} int (int *)
-CHECK-ONE-DAG: [[TY1:.*]]:   Type{[[UID1:.*]]} , name = "Func_arg_void", decl = FuncSymbolsTestMain.cpp:4, compiler_type = {{.*}} void (void)
-CHECK-ONE-DAG: [[TY2:.*]]:   Type{[[UID2:.*]]} , name = "Func_arg_none", decl = FuncSymbolsTestMain.cpp:5, compiler_type = {{.*}} void (void)
-CHECK-ONE-DAG: [[TY3:.*]]:   Type{[[UID3:.*]]} , name = "Func_varargs", decl = FuncSymbolsTestMain.cpp:6, compiler_type = {{.*}} void (...)
-CHECK-ONE-DAG: [[TY4:.*]]:   Type{[[UID4:.*]]} , name = "Func", decl = FuncSymbolsTestMain.cpp:28, compiler_type = {{.*}} void (char, int)
-CHECK-ONE-DAG: [[TY5:.*]]:   Type{[[UID5:.*]]} , name = "main", decl = FuncSymbolsTestMain.cpp:44, compiler_type = {{.*}} int (void)
-CHECK-ONE-DAG: [[TY6:.*]]:   Type{[[UID6:.*]]} , name = "Func", decl = FuncSymbolsTestMain.cpp:24, compiler_type = {{.*}} void (int, const long, volatile _Bool, ...)
-CHECK-ONE-DAG: [[TY7:.*]]:   Type{[[UID7:.*]]} , name = "StaticFunction", decl = FuncSymbolsTestMain.cpp:35, compiler_type = {{.*}} long (int)
-CHECK-ONE-DAG: [[TY8:.*]]:   Type{[[UID8:.*]]} , name = "Func", decl = FuncSymbolsTestMain.cpp:12, compiler_type = {{.*}} int (int, ...)
-CHECK-ONE-DAG: [[TY9:.*]]:   Type{[[UID9:.*]]} , name = "TemplateFunc<1,int>", decl = FuncSymbolsTestMain.cpp:18, compiler_type = {{.*}} void (int)
-CHECK-ONE-DAG: [[TY10:.*]]:   Type{[[UID10:.*]]} , name = "TemplateFunc<1,int,int,int>", decl = FuncSymbolsTestMain.cpp:18, compiler_type = {{.*}} void (int, int, int)
-CHECK-ONE-DAG: [[TY11:.*]]:   Type{[[UID11:.*]]} , name = "InlinedFunction", decl = FuncSymbolsTestMain.cpp:40, compiler_type = {{.*}} void (long)
-
-CHECK-ONE: {{.*}}:   CompileUnit{{.*}}, language = "c++", file = '{{.*}}\FuncSymbolsTestMain.cpp'
-CHECK-ONE-DAG: Function{[[UID0]]}, mangled = ?Func_arg_array@@YAHQAH@Z, demangled = {{.*}}, type = [[TY0]]
-CHECK-ONE-DAG: Function{[[UID1]]}, mangled = ?Func_arg_void@@YAXXZ, demangled = {{.*}}, type = [[TY1]]
-CHECK-ONE-DAG: Function{[[UID2]]}, mangled = ?Func_arg_none@@YAXXZ, demangled = {{.*}}, type = [[TY2]]
-CHECK-ONE-DAG: Function{[[UID3]]}, mangled = ?Func_varargs@@YAXZZ, demangled = {{.*}}, type = [[TY3]]
-CHECK-ONE-DAG: Function{[[UID4]]}, mangled = ?Func@NS@@YAXDH@Z, demangled = {{.*}}, type = [[TY4]]
-CHECK-ONE-DAG: Function{[[UID5]]}, mangled = _main, demangled = {{.*}}, type = [[TY5]]
-CHECK-ONE-DAG: Function{[[UID6]]}, demangled = {{.*}}`anonymous namespace'::Func{{.*}}, type = [[TY6]]
-CHECK-ONE-DAG: Function{[[UID7]]}, demangled = {{.*}}StaticFunction{{.*}}, type = [[TY7]]
-CHECK-ONE-DAG: Function{[[UID8]]}, mangled = ?Func@A@MemberTest@@QAAHHZZ, demangled = {{.*}}, type = [[TY8]]
-CHECK-ONE-DAG: Function{[[UID9]]}, mangled = ??$TemplateFunc@$00H@@YAXH@Z, demangled = {{.*}}, type = [[TY9]]
-CHECK-ONE-DAG: Function{[[UID10]]}, mangled = ??$TemplateFunc@$00HHH@@YAXHHH@Z, demangled = {{.*}}, type = [[TY10]]
-CHECK-ONE-DAG: Function{[[UID11]]}, mangled = ?InlinedFunction@@YAXJ@Z, demangled = {{.*}}, type = [[TY11]]
-
-; We expect new types observed in another compile unit
-CHECK-TWO-DAG: [[TY30:.*]]:   Type{[[UID30:.*]]} , name = "FunctionCall", decl = FuncSymbols.cpp:13, compiler_type = {{.*}} void (void)
-CHECK-TWO-DAG: [[TY31:.*]]:   Type{[[UID31:.*]]} , name = "StaticFunction", decl = FuncSymbols.cpp:4, compiler_type = {{.*}} long (int)
-CHECK-TWO-DAG: [[TY32:.*]]:   Type{[[UID32:.*]]} , name = "InlinedFunction", decl = FuncSymbols.cpp:10, compiler_type = {{.*}} int (long)
-
-CHECK-TWO: {{.*}}:   CompileUnit{{.*}}, language = "c++", file = '{{.*}}\FuncSymbols.cpp'
-CHECK-TWO-DAG: Function{[[UID30]]}, mangled = ?FunctionCall@@YAXXZ, demangled = {{.*}}, type = [[TY30]]
-CHECK-TWO-DAG: Function{[[UID31]]}, demangled = {{.*}}`anonymous namespace'::StaticFunction{{.*}}, type = [[TY31]]
-CHECK-TWO-DAG: Function{[[UID32]]}, demangled = {{.*}}InlinedFunction{{.*}}, type = [[TY32]]
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/function-level-linking.test b/src/llvm-project/lldb/lit/SymbolFile/PDB/function-level-linking.test
deleted file mode 100644
index 37b2cbc..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/PDB/function-level-linking.test
+++ /dev/null
@@ -1,5 +0,0 @@
-REQUIRES: system-windows, lld
-RUN: %clang_cl /c /Zi /Gy %S/Inputs/FunctionLevelLinkingTest.cpp /o %t.obj
-RUN: lld-link /debug:full /nodefaultlib /entry:main /order:@%S/Inputs/FunctionLevelLinkingTest.ord %t.obj /out:%t.exe
-RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols -verify %t.exe
-RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols -verify %t.exe
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/type-quals.test b/src/llvm-project/lldb/lit/SymbolFile/PDB/type-quals.test
deleted file mode 100644
index 734509f..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/PDB/type-quals.test
+++ /dev/null
@@ -1,39 +0,0 @@
-REQUIRES: system-windows, msvc
-RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/TypeQualsTest.cpp.obj %S/Inputs/TypeQualsTest.cpp
-RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/TypeQualsTest.cpp.exe %T/TypeQualsTest.cpp.obj
-RUN: lldb-test symbols %T/TypeQualsTest.cpp.exe | FileCheck %s
-
-CHECK: Module [[MOD:.*]]
-CHECK-DAG: {{^[0-9A-F]+}}: SymbolVendor pdb ([[MOD]])
-CHECK-DAG:      Type{{.*}} , name = "const int", size = 4, compiler_type = {{.*}} const int
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int *
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int **const
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int *const
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int *const *
-CHECK-DAG:      Type{{.*}} , name = "Func1", {{.*}}, compiler_type = {{.*}} void (const int *, const int *, const int **const, const int *const *)
-
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} volatile int *
-CHECK-DAG:      Type{{.*}} , name = "Func2", {{.*}}, compiler_type = {{.*}} void (volatile int *, volatile int *)
-
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int *
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int *&
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int &&
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int &
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int &
-CHECK-DAG:      Type{{.*}} , name = "Func3", {{.*}}, compiler_type = {{.*}} void (int *&, int &, const int &, int &&)
-
-// FIXME: __unaligned is not supported.
-CHECK-DAG:      Type{{.*}} , name = "Func4", {{.*}}, compiler_type = {{.*}} void (int *, int *)
-
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int *__restrict
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int &__restrict
-CHECK-DAG:      Type{{.*}} , name = "Func5", {{.*}}, compiler_type = {{.*}} void (int, int *__restrict, int &__restrict)
-
-CHECK-DAG:      Type{{.*}} , name = "Func6", {{.*}}, compiler_type = {{.*}} void (const volatile int *__restrict)
-
-CHECK-DAG:      Type{{.*}} , size = 400, compiler_type = {{.*}} volatile int *[100]
-CHECK-DAG:      Type{{.*}} , size = 4000, compiler_type = {{.*}} volatile int *[10][100]
-
-CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} long *__restrict
-
-CHECK-DAG: {{^[0-9A-F]+}}:   CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\TypeQualsTest.cpp'
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/typedefs.test b/src/llvm-project/lldb/lit/SymbolFile/PDB/typedefs.test
deleted file mode 100644
index caf23a8..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/PDB/typedefs.test
+++ /dev/null
@@ -1,59 +0,0 @@
-REQUIRES: system-windows, msvc
-RUN: %build --compiler=msvc --arch=32 --nodefaultlib --output=%T/SimpleTypesTest.cpp.typedefs.exe %S/Inputs/SimpleTypesTest.cpp
-RUN: lldb-test symbols %T/SimpleTypesTest.cpp.typedefs.exe | FileCheck %s
-
-; Generate 32-bit target
-
-; FIXME: PDB does not have line information for typedef statements so source
-; and line information for them is not tested.
-
-; Note, types `long double` and `double` have same bit size in MSVC and there
-; is no information in the PDB to distinguish them. So the compiler type for
-; both of them is the same.
-
-CHECK: Module [[MOD:.*]]
-CHECK: {{^[0-9A-F]+}}: SymbolVendor pdb ([[MOD]])
-CHECK-DAG: name = "char32_t", size = 4, compiler_type = {{.*}} char32_t
-CHECK-DAG: name = "char16_t", size = 2, compiler_type = {{.*}} char16_t
-CHECK-DAG: Type{{.*}} , name = "unsigned long", size = 4, compiler_type = {{.*}} unsigned long
-CHECK-DAG: Type{{.*}} , size = 40, compiler_type = {{.*}} unsigned long [10]
-CHECK-DAG: Type{{.*}} , name = "ULongArrayTypedef", compiler_type = {{.*}} typedef ULongArrayTypedef
-
-; Note: compiler_type of `long double` is represented by the one for `double`
-CHECK-DAG: Type{{.*}} , name = "double", size = 8, compiler_type = {{.*}} double
-CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} double *
-CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} double *&
-CHECK-DAG: Type{{.*}} , name = "RefTypedef", compiler_type = {{.*}} typedef RefTypedef
-
-CHECK-DAG: Type{{.*}} , name = "wchar_t", size = 2, compiler_type = {{.*}} wchar_t
-
-CHECK-DAG: Type{{.*}} , name = "int", size = 4, compiler_type = {{.*}} int
-CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} int &
-CHECK-DAG: Type{{.*}} , name = "unsigned char", size = 1, compiler_type = {{.*}} unsigned char
-CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} unsigned char *
-CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} unsigned char **
-CHECK-DAG: Type{{.*}} , name = "short", size = 2, compiler_type = {{.*}} short
-CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} short *
-CHECK-DAG: Type{{.*}} , name = "const double", size = 8, compiler_type = {{.*}} const double
-CHECK-DAG: Type{{.*}} , name = "volatile bool", size = 1, compiler_type = {{.*}} volatile _Bool
-CHECK-DAG: Type{{.*}} , name = "long long", size = 8, compiler_type = {{.*}} long long
-CHECK-DAG: Type{{.*}} , compiler_type = {{.*}} long long (int &, unsigned char **, short *, const double, volatile _Bool)
-CHECK-DAG: Type{{.*}} , name = "FuncPtrTypedef", compiler_type = {{.*}} typedef FuncPtrTypedef
-
-CHECK-DAG: Type{{.*}} , name = "void", compiler_type = {{.*}} void
-CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} void *
-CHECK-DAG: Type{{.*}} , name = "long", size = 4, compiler_type = {{.*}} long
-CHECK-DAG: Type{{.*}} , name = "unsigned short", size = 2, compiler_type = {{.*}} unsigned short
-CHECK-DAG: Type{{.*}} , name = "unsigned int", size = 4, compiler_type = {{.*}} unsigned int
-CHECK-DAG: Type{{.*}} , name = "char", size = 1, compiler_type = {{.*}} char
-CHECK-DAG: Type{{.*}} , name = "signed char", size = 1, compiler_type = {{.*}} signed char
-CHECK-DAG: Type{{.*}} , compiler_type = {{.*}} char (void *, long, unsigned short, unsigned int, ...)
-CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} char (*)(void *, long, unsigned short, unsigned int, ...)
-CHECK-DAG: Type{{.*}} , name = "VarArgsFuncTypedef", compiler_type = {{.*}} typedef VarArgsFuncTypedef
-
-CHECK-DAG: Type{{.*}} , name = "float", size = 4, compiler_type = {{.*}} float
-CHECK-DAG: Type{{.*}} , compiler_type = {{.*}} float (...)
-CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} float (*)(...)
-CHECK-DAG: Type{{.*}} , name = "VarArgsFuncTypedefA", compiler_type = {{.*}} typedef VarArgsFuncTypedefA
-
-CHECK-DAG: {{^[0-9A-F]+}}:   CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\SimpleTypesTest.cpp'
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/variables.test b/src/llvm-project/lldb/lit/SymbolFile/PDB/variables.test
deleted file mode 100644
index 2e9b594..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/PDB/variables.test
+++ /dev/null
@@ -1,66 +0,0 @@
-REQUIRES: system-windows, msvc
-RUN: %build --compiler=clang-cl --mode=compile --arch=64 --nodefaultlib --output=%T/VariablesTest.cpp.obj %S/Inputs/VariablesTest.cpp
-RUN: %build --compiler=msvc --mode=link --arch=64 --nodefaultlib --output=%T/VariablesTest.cpp.exe %T/VariablesTest.cpp.obj
-RUN: lldb-test symbols %T/VariablesTest.cpp.exe > %T/VariablesTest.out
-RUN: FileCheck --check-prefix=GLOBALS --input-file=%T/VariablesTest.out %s
-RUN: FileCheck --check-prefix=FUNC-F --input-file=%T/VariablesTest.out %s
-RUN: FileCheck --check-prefix=FUNC-MAIN --input-file=%T/VariablesTest.out %s
-RUN: FileCheck --check-prefix=FUNC-CONSTRUCTOR --input-file=%T/VariablesTest.out %s
-RUN: FileCheck --check-prefix=FUNC-MEMBER --input-file=%T/VariablesTest.out %s
-
-GLOBALS: Module [[MOD:.*]]
-GLOBALS: SymbolVendor pdb ([[MOD]])
-GLOBALS:     CompileUnit{{.*}}, language = "c++", file = '{{.*}}\VariablesTest.cpp'
-GLOBALS-DAG:   Variable{{.*}}, name = "g_IntVar"
-GLOBALS-SAME:  scope = global, location = {{.*}}, external
-GLOBALS-DAG:   Variable{{.*}}, name = "m_StaticClassMember"
-GLOBALS-SAME:  scope = global, location = {{.*}}, external
-GLOBALS-DAG:   Variable{{.*}}, name = "g_pConst"
-GLOBALS-SAME:  scope = global, location = {{.*}}, external
-GLOBALS-DAG:   Variable{{.*}}, name = "same_name_var"
-GLOBALS-SAME:  scope = global, location = {{.*}}, external
-GLOBALS-DAG:   Variable{{.*}}, name = "g_EnumVar"
-GLOBALS-SAME:  scope = global, location = {{.*}}, external
-GLOBALS-DAG:   Variable{{.*}}, name = "g_tls"
-GLOBALS-SAME:  scope = thread local, location = {{.*}}, external
-GLOBALS-DAG:   Variable{{.*}}, name = "ClassVar"
-GLOBALS-SAME:  scope = global, location = {{.*}}, external
-GLOBALS-DAG:   Variable{{.*}}, name = "g_Const"
-GLOBALS-SAME:  scope = ??? (2)
-GLOBALS:     Function
-
-FUNC-F:      Function{{.*}}, mangled = ?f@@YAHHH@Z
-FUNC-F-NEXT:   Block
-FUNC-F-NEXT:     Variable{{.*}}, name = "var_arg1"
-FUNC-F-SAME:                     scope = parameter
-FUNC-F-NEXT:     Variable{{.*}}, name = "var_arg2"
-FUNC-F-SAME:                     scope = parameter
-FUNC-F-NEXT:     Variable{{.*}}, name = "same_name_var"
-FUNC-F-SAME:                     scope = local
-
-FUNC-MAIN:      Function{{.*}}, mangled = main
-FUNC-MAIN-NEXT:   Block
-FUNC-MAIN-NEXT:     Variable{{.*}}, name = "same_name_var"
-FUNC-MAIN-SAME:                     scope = local
-FUNC-MAIN-NEXT:     Variable{{.*}}, name = "local_const"
-FUNC-MAIN-SAME:                     scope = local
-FUNC-MAIN-NEXT:     Variable{{.*}}, name = "local_CString"
-FUNC-MAIN-SAME:                     scope = local
-FUNC-MAIN-NEXT:     Variable{{.*}}, name = "local_pCString"
-FUNC-MAIN-SAME:                     scope = local
-FUNC-MAIN-NEXT:     Variable{{.*}}, name = "a"
-FUNC-MAIN-SAME:                     scope = local
-
-FUNC-CONSTRUCTOR:      Function{{.*}}, mangled = ??0Class@@QEAA@H@Z
-FUNC-CONSTRUCTOR-NEXT:   Block
-FUNC-CONSTRUCTOR-NEXT:     Variable{{.*}}, name = "this"
-FUNC-CONSTRUCTOR-SAME:                     scope = parameter
-FUNC-CONSTRUCTOR-SAME:                     artificial
-FUNC-CONSTRUCTOR-NEXT:     Variable{{.*}}, name = "a"
-FUNC-CONSTRUCTOR-SAME:                     scope = parameter
-
-FUNC-MEMBER:      Function{{.*}}, mangled = ?Func@Class@@QEAAXXZ
-FUNC-MEMBER-NEXT:   Block
-FUNC-MEMBER-NEXT:     Variable{{.*}}, name = "this"
-FUNC-MEMBER-SAME:                     scope = parameter
-FUNC-MEMBER-SAME:                     artificial
diff --git a/src/llvm-project/lldb/lit/SymbolFile/target-symbols-add-unwind.test b/src/llvm-project/lldb/lit/SymbolFile/target-symbols-add-unwind.test
deleted file mode 100644
index c654213..0000000
--- a/src/llvm-project/lldb/lit/SymbolFile/target-symbols-add-unwind.test
+++ /dev/null
@@ -1,26 +0,0 @@
-# TODO: When it's possible to run "image show-unwind" without a running
-# process, we can remove the unsupported line below, and hard-code an ELF
-# triple in the test.
-# UNSUPPORTED: system-windows, system-darwin
-
-# RUN: cd %T
-# RUN: %clang %S/Inputs/target-symbols-add-unwind.c -g \
-# RUN:   -fno-unwind-tables -o target-symbols-add-unwind.debug
-# RUN: llvm-objcopy --strip-debug target-symbols-add-unwind.debug \
-# RUN:   target-symbols-add-unwind.stripped
-# RUN: %lldb target-symbols-add-unwind.stripped -s %s -o quit | FileCheck %s
-
-process launch --stop-at-entry
-image show-unwind -n main
-# CHECK-LABEL: image show-unwind -n main
-# CHECK-NOT: debug_frame UnwindPlan:
-
-target symbols add -s target-symbols-add-unwind.stripped target-symbols-add-unwind.debug
-# CHECK-LABEL: target symbols add
-# CHECK: symbol file {{.*}} has been added to {{.*}}
-
-image show-unwind -n main
-# CHECK-LABEL: image show-unwind -n main
-# CHECK: debug_frame UnwindPlan:
-# CHECK-NEXT: This UnwindPlan originally sourced from DWARF CFI
-# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes.
diff --git a/src/llvm-project/lldb/lit/Unit/lit.cfg.py b/src/llvm-project/lldb/lit/Unit/lit.cfg.py
deleted file mode 100644
index 3633c73..0000000
--- a/src/llvm-project/lldb/lit/Unit/lit.cfg.py
+++ /dev/null
@@ -1,30 +0,0 @@
-# -*- Python -*-
-
-# Configuration file for the 'lit' test runner.
-
-import os
-import sys
-
-import lit.formats
-from lit.llvm import llvm_config
-
-# name: The name of this test suite.
-config.name = 'lldb-Unit'
-
-# suffixes: A list of file extensions to treat as test files.
-config.suffixes =  []
-
-# test_source_root: The root path where unit test binaries are located.
-# test_exec_root: The root path where tests should be run.
-config.test_source_root = os.path.join(config.lldb_obj_root, 'unittests')
-config.test_exec_root = config.test_source_root
-
-# One of our unit tests dynamically links against python.dll, and on Windows
-# it needs to be able to find it at runtime.  This is fine if Python is on your
-# system PATH, but if it's not, then this unit test executable will fail to run.
-# We can solve this by forcing the Python directory onto the system path here.
-llvm_config.with_system_environment('PATH')
-llvm_config.with_environment('PATH', os.path.dirname(sys.executable), append_path=True)
-
-# testFormat: The test format to use to interpret tests.
-config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, 'Tests')
diff --git a/src/llvm-project/lldb/lit/Unit/lit.site.cfg.py.in b/src/llvm-project/lldb/lit/Unit/lit.site.cfg.py.in
deleted file mode 100644
index 0c629fd..0000000
--- a/src/llvm-project/lldb/lit/Unit/lit.site.cfg.py.in
+++ /dev/null
@@ -1,29 +0,0 @@
-@LIT_SITE_CFG_IN_HEADER@
-
-config.test_exec_root = "@LLDB_BINARY_DIR@"
-config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.llvm_build_mode = "@LLVM_BUILD_MODE@"
-config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
-config.lldb_obj_root = "@LLDB_BINARY_DIR@"
-config.lldb_src_root = "@LLDB_SOURCE_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
-config.python_executable = "@PYTHON_EXECUTABLE@"
-
-# Support substitution of the tools and libs dirs with user parameters. This is
-# used when we can't determine the tool dir at configuration time.
-try:
-    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
-    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
-    config.llvm_build_mode = config.llvm_build_mode % lit_config.params
-except KeyError as e:
-    key, = e.args
-    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
-import lit.llvm
-lit.llvm.initialize(lit_config, config)
-
-# Let the main config do the real work.
-lit_config.load_config(config, "@LLDB_SOURCE_DIR@/lit/Unit/lit.cfg.py")
diff --git a/src/llvm-project/lldb/lit/Unwind/Inputs/eh-frame-small-fde.s b/src/llvm-project/lldb/lit/Unwind/Inputs/eh-frame-small-fde.s
deleted file mode 100644
index acc5eac..0000000
--- a/src/llvm-project/lldb/lit/Unwind/Inputs/eh-frame-small-fde.s
+++ /dev/null
@@ -1,48 +0,0 @@
-        .text
-        .globl  bar
-        .type   bar, @function
-bar:
-.LFB0:
-        .cfi_startproc
-        leal    (%edi, %edi), %eax
-        ret
-        .cfi_endproc
-.LFE0:
-        .size   bar, .-bar
-        .globl  foo
-        .type   foo, @function
-foo:
-.LFB1:
-        nop # Make the FDE entry start one byte later than the actual function.
-        .cfi_startproc
-        .cfi_register %rip, %r13
-        call    bar
-        addl    $1, %eax
-        jmp     *%r13 # Return
-        .cfi_endproc
-.LFE1:
-        .size   foo, .-foo
-        .globl  main
-        .type   main, @function
-main:
-.LFB2:
-        .cfi_startproc
-        pushq   %rbp
-        .cfi_def_cfa_offset 16
-        .cfi_offset 6, -16
-        movq    %rsp, %rbp
-        .cfi_def_cfa_register 6
-        movl    $47, %edi
-
-        # Non-standard calling convention. Put return address in r13.
-        pushq   %r13
-        leaq    1f(%rip), %r13
-        jmp     foo # call
-1:
-        popq    %r13
-        popq    %rbp
-        .cfi_def_cfa 7, 8
-        ret
-        .cfi_endproc
-.LFE2:
-        .size   main, .-main
diff --git a/src/llvm-project/lldb/lit/Unwind/eh-frame-dwarf-unwind.test b/src/llvm-project/lldb/lit/Unwind/eh-frame-dwarf-unwind.test
deleted file mode 100644
index 4613b10..0000000
--- a/src/llvm-project/lldb/lit/Unwind/eh-frame-dwarf-unwind.test
+++ /dev/null
@@ -1,23 +0,0 @@
-# Test handing of dwarf expressions specifying the location of registers, if
-# those expressions refer to the frame's CFA value.
-
-# UNSUPPORTED: system-windows
-# REQUIRES: target-x86_64, native
-
-# RUN: %clang %p/Inputs/call-asm.c %p/Inputs/eh-frame-dwarf-unwind.s -o %t
-# RUN: %lldb %t -s %s -o exit | FileCheck %s
-
-breakpoint set -n bar
-# CHECK: Breakpoint 1: where = {{.*}}`bar
-
-process launch
-# CHECK: stop reason = breakpoint 1.1
-
-thread backtrace
-# CHECK: frame #0: {{.*}}`bar
-# CHECK: frame #1: {{.*}}`foo + 5
-# CHECK: frame #2: {{.*}}`asm_main + 22
-
-target modules show-unwind -n foo
-# CHECK: eh_frame UnwindPlan:
-# CHECK: row[0]: 0: CFA=rsp +8 => rip=DW_OP_lit8 , DW_OP_minus , DW_OP_deref , DW_OP_const1u 0x47, DW_OP_minus
diff --git a/src/llvm-project/lldb/lit/Unwind/eh-frame-small-fde.test b/src/llvm-project/lldb/lit/Unwind/eh-frame-small-fde.test
deleted file mode 100644
index 368917a..0000000
--- a/src/llvm-project/lldb/lit/Unwind/eh-frame-small-fde.test
+++ /dev/null
@@ -1,22 +0,0 @@
-# This test that we are able to unwind using eh_frame in case an FDE entry does
-# not cover the entire range of a function we are unwinding through.
-
-# REQUIRES: target-x86_64, system-linux, native
-
-# RUN: %clang %p/Inputs/eh-frame-small-fde.s -o %t
-# RUN: %lldb %t -s %s -o exit | FileCheck %s
-
-breakpoint set -n bar
-# CHECK: Breakpoint 1: where = {{.*}}`bar
-
-process launch
-# CHECK: stop reason = breakpoint 1.1
-
-thread backtrace
-# CHECK: frame #0: {{.*}}`bar
-# CHECK: frame #1: {{.*}}`foo + 6
-# CHECK: frame #2: {{.*}}`main + 20
-
-target modules show-unwind -n foo
-# CHECK: eh_frame UnwindPlan:
-# CHECK: row[0]: 0: CFA=rsp +8 => rip=r13
diff --git a/src/llvm-project/lldb/lit/Unwind/prefer-debug-over-eh-frame.test b/src/llvm-project/lldb/lit/Unwind/prefer-debug-over-eh-frame.test
deleted file mode 100644
index f023a1e..0000000
--- a/src/llvm-project/lldb/lit/Unwind/prefer-debug-over-eh-frame.test
+++ /dev/null
@@ -1,24 +0,0 @@
-# Test that we prefer debug_frame over eh_frame unwind plans. They usually
-# contain the same information, and we rarely have both kinds of entries for a
-# single function. However, in theory the debug_frame plan can be more complete,
-# whereas eh_frame is only required to be correct at places where exceptions can
-# be thrown.
-
-# UNSUPPORTED: system-windows
-# XFAIL: system-darwin
-# REQUIRES: target-x86_64, native
-
-# RUN: %clang -g %p/Inputs/call-asm.c %p/Inputs/prefer-debug-over-eh-frame.s -o %t
-# RUN: %lldb %t -s %s -o exit | FileCheck %s
-
-breakpoint set -n bar
-# CHECK: Breakpoint 1: where = {{.*}}`bar
-
-process launch
-# CHECK: stop reason = breakpoint 1.1
-
-target modules show-unwind -n foo
-# CHECK: Asynchronous (not restricted to call-sites) UnwindPlan is 'DWARF CFI plus augmentation from assembly parsing'
-# CHECK: Synchronous (restricted to call-sites) UnwindPlan is 'DWARF CFI'
-# CHECK: eh_frame UnwindPlan:
-# CHECK: debug_frame UnwindPlan:
diff --git a/src/llvm-project/lldb/lit/Unwind/unwind-plan-dwarf-dump.test b/src/llvm-project/lldb/lit/Unwind/unwind-plan-dwarf-dump.test
deleted file mode 100644
index c378f56..0000000
--- a/src/llvm-project/lldb/lit/Unwind/unwind-plan-dwarf-dump.test
+++ /dev/null
@@ -1,14 +0,0 @@
-# REQUIRES: target-x86_64, system-linux, native
-
-# RUN: %clang %p/Inputs/unwind-plan-dwarf-dump.s -o %t
-# RUN: %lldb %t -s %s -o exit | FileCheck %s
-
-breakpoint set -n main
-# CHECK: Breakpoint 1:
-
-process launch
-# CHECK: stop reason = breakpoint 1.1
-
-target modules show-unwind -n main
-# CHECK: eh_frame UnwindPlan:
-# CHECK: row[0]:    0: CFA=DW_OP_breg7 +0, DW_OP_const1u 0x00, DW_OP_plus  => rip=DW_OP_const1s -8, DW_OP_plus , DW_OP_deref
diff --git a/src/llvm-project/lldb/lit/Watchpoint/SetErrorCases.test b/src/llvm-project/lldb/lit/Watchpoint/SetErrorCases.test
deleted file mode 100644
index 39556f9..0000000
--- a/src/llvm-project/lldb/lit/Watchpoint/SetErrorCases.test
+++ /dev/null
@@ -1,28 +0,0 @@
-# RUN: %clangxx %p/Inputs/main.cpp -g -o %t.out
-# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %s %t.out 2>&1 | FileCheck %s
-
-settings show interpreter.stop-command-source-on-error
-# CHECK: interpreter.stop-command-source-on-error (boolean) = false
-
-b main.cpp:11
-run
-# CHECK: stopped
-# CHECK-NEXT: stop reason = breakpoint
-
-watchpoint set
-# CHECK: Commands for setting a watchpoint.
-# CHECK: The following subcommands are supported:
-# CHECK: Set a watchpoint on an address by supplying an expression.
-# CHECK: Set a watchpoint on a variable.
-
-watchpoint set variable -w read_write
-# CHECK: error: required argument missing
-
-watchpoint set expression -w write --
-# CHECK: error: expression evaluation of address to watch failed
-
-watchpoint set expression MyAggregateDataType
-# CHECK: error: expression did not evaluate to an address
-
-watchpoint set variable -s -128
-# CHECK: error: invalid enumeration value
diff --git a/src/llvm-project/lldb/lit/helper/toolchain.py b/src/llvm-project/lldb/lit/helper/toolchain.py
deleted file mode 100644
index d02b148..0000000
--- a/src/llvm-project/lldb/lit/helper/toolchain.py
+++ /dev/null
@@ -1,137 +0,0 @@
-import os
-import itertools
-import platform
-import subprocess
-import sys
-
-import lit.util
-from lit.llvm import llvm_config
-from lit.llvm.subst import FindTool
-from lit.llvm.subst import ToolSubst
-
-def use_lldb_substitutions(config):
-    # Set up substitutions for primary tools.  These tools must come from config.lldb_tools_dir
-    # which is basically the build output directory.  We do not want to find these in path or
-    # anywhere else, since they are specifically the programs which are actually being tested.
-
-    dsname = 'debugserver' if platform.system() in ['Darwin'] else 'lldb-server'
-    dsargs = [] if platform.system() in ['Darwin'] else ['gdbserver']
-    lldbmi = ToolSubst('%lldbmi',
-                       command=FindTool('lldb-mi'),
-                       extra_args=['--synchronous'],
-                       unresolved='ignore')
-
-
-    build_script = os.path.dirname(__file__)
-    build_script = os.path.join(build_script, 'build.py')
-    build_script_args = [build_script,
-                        '--compiler=any', # Default to best compiler
-                        '--arch=' + str(config.lldb_bitness)]
-    if config.lldb_lit_tools_dir:
-        build_script_args.append('--tools-dir={0}'.format(config.lldb_lit_tools_dir))
-    if config.lldb_tools_dir:
-        build_script_args.append('--tools-dir={0}'.format(config.lldb_tools_dir))
-    if config.llvm_libs_dir:
-        build_script_args.append('--libs-dir={0}'.format(config.llvm_libs_dir))
-
-    lldb_init = os.path.join(config.test_exec_root, 'lit-lldb-init')
-
-    primary_tools = [
-        ToolSubst('%lldb',
-                  command=FindTool('lldb'),
-                  extra_args=['--no-lldbinit', '-S', lldb_init]),
-        ToolSubst('%lldb-init',
-                  command=FindTool('lldb'),
-                  extra_args=['-S', lldb_init]),
-        lldbmi,
-        ToolSubst('%debugserver',
-                  command=FindTool(dsname),
-                  extra_args=dsargs,
-                  unresolved='ignore'),
-        ToolSubst('%platformserver',
-                  command=FindTool('lldb-server'),
-                  extra_args=['platform'],
-                  unresolved='ignore'),
-        'lldb-test',
-        'lldb-instr',
-        ToolSubst('%build',
-                  command="'" + sys.executable + "'",
-                  extra_args=build_script_args)
-        ]
-
-    llvm_config.add_tool_substitutions(primary_tools,
-                                       [config.lldb_tools_dir])
-    # lldb-mi always fails without Python support
-    if lldbmi.was_resolved and not config.lldb_disable_python:
-        config.available_features.add('lldb-mi')
-
-def _use_msvc_substitutions(config):
-    # If running from a Visual Studio Command prompt (e.g. vcvars), this will
-    # detect the include and lib paths, and find cl.exe and link.exe and create
-    # substitutions for each of them that explicitly specify /I and /L paths
-    cl = lit.util.which('cl')
-    link = lit.util.which('link')
-
-    if not cl or not link:
-        return
-
-    cl = '"' + cl + '"'
-    link = '"' + link + '"'
-    includes = os.getenv('INCLUDE', '').split(';')
-    libs = os.getenv('LIB', '').split(';')
-
-    config.available_features.add('msvc')
-    compiler_flags = ['"/I{}"'.format(x) for x in includes if os.path.exists(x)]
-    linker_flags = ['"/LIBPATH:{}"'.format(x) for x in libs if os.path.exists(x)]
-
-    tools = [
-        ToolSubst('%msvc_cl', command=cl, extra_args=compiler_flags),
-        ToolSubst('%msvc_link', command=link, extra_args=linker_flags)]
-    llvm_config.add_tool_substitutions(tools)
-    return
-
-def use_support_substitutions(config):
-    # Set up substitutions for support tools.  These tools can be overridden at the CMake
-    # level (by specifying -DLLDB_LIT_TOOLS_DIR), installed, or as a last resort, we can use
-    # the just-built version.
-    flags = []
-    if platform.system() in ['Darwin']:
-        try:
-            out = subprocess.check_output(['xcrun', '--show-sdk-path']).strip()
-            res = 0
-        except OSError:
-            res = -1
-        if res == 0 and out:
-            sdk_path = lit.util.to_string(out)
-            llvm_config.lit_config.note('using SDKROOT: %r' % sdk_path)
-            flags = ['-isysroot', sdk_path]
-    elif platform.system() in ['NetBSD', 'OpenBSD', 'Linux']:
-        flags = ['-pthread']
-
-    if sys.platform.startswith('netbsd'):
-        # needed e.g. to use freshly built libc++
-        flags += ['-L' + config.llvm_libs_dir,
-                  '-Wl,-rpath,' + config.llvm_libs_dir]
-
-    additional_tool_dirs=[]
-    if config.lldb_lit_tools_dir:
-        additional_tool_dirs.append(config.lldb_lit_tools_dir)
-
-    llvm_config.use_clang(additional_flags=flags,
-                          additional_tool_dirs=additional_tool_dirs,
-                          required=True)
-
-    if sys.platform == 'win32':
-        _use_msvc_substitutions(config)
-
-    have_lld = llvm_config.use_lld(additional_tool_dirs=additional_tool_dirs,
-                                   required=False)
-    if have_lld:
-        config.available_features.add('lld')
-
-
-    support_tools = ['yaml2obj', 'obj2yaml', 'llvm-pdbutil',
-                     'llvm-mc', 'llvm-readobj', 'llvm-objdump',
-                     'llvm-objcopy', 'lli']
-    additional_tool_dirs += [config.lldb_tools_dir, config.llvm_tools_dir]
-    llvm_config.add_tool_substitutions(support_tools, additional_tool_dirs)
diff --git a/src/llvm-project/lldb/lit/lit-lldb-init.in b/src/llvm-project/lldb/lit/lit-lldb-init.in
deleted file mode 100644
index 40bece6..0000000
--- a/src/llvm-project/lldb/lit/lit-lldb-init.in
+++ /dev/null
@@ -1,3 +0,0 @@
-# LLDB init file for the LIT tests.
-settings set symbols.enable-external-lookup false
-settings set interpreter.echo-comment-commands false
diff --git a/src/llvm-project/lldb/lit/lit.cfg.py b/src/llvm-project/lldb/lit/lit.cfg.py
deleted file mode 100644
index ad659ea..0000000
--- a/src/llvm-project/lldb/lit/lit.cfg.py
+++ /dev/null
@@ -1,101 +0,0 @@
-# -*- Python -*-
-
-import os
-import re
-import shutil
-import site
-import sys
-
-import lit.formats
-from lit.llvm import llvm_config
-from lit.llvm.subst import FindTool
-from lit.llvm.subst import ToolSubst
-
-site.addsitedir(os.path.dirname(__file__))
-from helper import toolchain
-
-# name: The name of this test suite.
-config.name = 'LLDB'
-
-# testFormat: The test format to use to interpret tests.
-config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
-
-# suffixes: A list of file extensions to treat as test files. This is overriden
-# by individual lit.local.cfg files in the test subdirectories.
-config.suffixes = ['.test', '.cpp', '.s']
-
-# excludes: A list of directories to exclude from the testsuite. The 'Inputs'
-# subdirectories contain auxiliary inputs for various tests in their parent
-# directories.
-config.excludes = ['Inputs', 'CMakeLists.txt', 'README.txt', 'LICENSE.txt']
-
-# test_source_root: The root path where tests are located.
-config.test_source_root = os.path.dirname(__file__)
-
-# test_exec_root: The root path where tests should be run.
-config.test_exec_root = os.path.join(config.lldb_obj_root, 'lit')
-
-
-llvm_config.use_default_substitutions()
-
-toolchain.use_lldb_substitutions(config)
-
-toolchain.use_support_substitutions(config)
-
-
-if re.match(r'^arm(hf.*-linux)|(.*-linux-gnuabihf)', config.target_triple):
-    config.available_features.add("armhf-linux")
-
-def calculate_arch_features(arch_string):
-    # This will add a feature such as x86, arm, mips, etc for each built
-    # target
-    features = []
-    for arch in arch_string.split():
-        features.append(arch.lower())
-    return features
-
-# Run llvm-config and add automatically add features for whether we have
-# assertions enabled, whether we are in debug mode, and what targets we
-# are built for.
-llvm_config.feature_config(
-    [('--assertion-mode', {'ON': 'asserts'}),
-     ('--build-mode', {'DEBUG': 'debug'}),
-     ('--targets-built', calculate_arch_features)
-     ])
-
-# Clean the module caches in the test build directory.  This is
-# necessary in an incremental build whenever clang changes underneath,
-# so doing it once per lit.py invocation is close enough.
-
-for i in ['module-cache-clang', 'module-cache-lldb']:
-    cachedir = os.path.join(config.lldb_libs_dir, '..',
-                            'lldb-test-build.noindex', i)
-    if os.path.isdir(cachedir):
-        print("Deleting module cache at %s."%cachedir)
-        shutil.rmtree(cachedir)
-
-# Set a default per-test timeout of 10 minutes. Setting a timeout per test
-# requires the psutil module and lit complains if the value is set but the
-# module can't be found.
-try:
-    import psutil  # noqa: F401
-    lit_config.maxIndividualTestTime = 600
-except ImportError:
-    pass
-
-# If running tests natively, check for CPU features needed for some tests.
-
-if 'native' in config.available_features:
-    cpuid_exe = lit.util.which('lit-cpuid', config.lldb_tools_dir)
-    if cpuid_exe is None:
-        lit_config.warning("lit-cpuid not found, tests requiring CPU extensions will be skipped")
-    else:
-        out, err, exitcode = lit.util.executeCommand([cpuid_exe])
-        if exitcode == 0:
-            for x in out.split():
-                config.available_features.add('native-cpu-%s' % x)
-        else:
-            lit_config.warning("lit-cpuid failed: %s" % err)
-
-if not config.lldb_disable_python:
-    config.available_features.add('python')
diff --git a/src/llvm-project/lldb/lit/lit.site.cfg.py.in b/src/llvm-project/lldb/lit/lit.site.cfg.py.in
deleted file mode 100644
index 738b25d..0000000
--- a/src/llvm-project/lldb/lit/lit.site.cfg.py.in
+++ /dev/null
@@ -1,40 +0,0 @@
-@LIT_SITE_CFG_IN_HEADER@
-
-config.llvm_src_root = "@LLVM_SOURCE_DIR@"
-config.llvm_obj_root = "@LLVM_BINARY_DIR@"
-config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
-config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
-config.llvm_shlib_dir = "@SHLIBDIR@"
-config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
-config.lldb_obj_root = "@LLDB_BINARY_DIR@"
-config.lldb_libs_dir = "@LLDB_LIBS_DIR@"
-config.lldb_tools_dir = "@LLDB_TOOLS_DIR@"
-# Since it comes from the command line, it may have backslashes which
-# should not need to be escaped.
-config.lldb_lit_tools_dir = r"@LLDB_LIT_TOOLS_DIR@"
-config.target_triple = "@TARGET_TRIPLE@"
-config.python_executable = "@PYTHON_EXECUTABLE@"
-config.have_zlib = @LLVM_ENABLE_ZLIB@
-config.host_triple = "@LLVM_HOST_TRIPLE@"
-config.lldb_bitness = 64 if @LLDB_IS_64_BITS@ else 32
-config.lldb_disable_python = @LLDB_DISABLE_PYTHON@
-
-# Support substitution of the tools and libs dirs with user parameters. This is
-# used when we can't determine the tool dir at configuration time.
-try:
-    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
-    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
-    config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
-    config.lldb_libs_dir = config.lldb_libs_dir % lit_config.params
-    config.lldb_tools_dir = config.lldb_tools_dir % lit_config.params
-    config.lldb_lit_tools_dir = config.lldb_lit_tools_dir % lit_config.params
-
-except KeyError as e:
-    key, = e.args
-    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
-
-import lit.llvm
-lit.llvm.initialize(lit_config, config)
-
-# Let the main config do the real work.
-lit_config.load_config(config, "@LLDB_SOURCE_DIR@/lit/lit.cfg.py")
diff --git a/src/llvm-project/lldb/lit/tools/lldb-instr/Inputs/foo.cpp b/src/llvm-project/lldb/lit/tools/lldb-instr/Inputs/foo.cpp
deleted file mode 100644
index 981b911..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-instr/Inputs/foo.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "foo.h"
-
-#define MACRO_FOO                                                              \
-  { void; }
-#define MACRO_BAR(B) B
-
-Foo::Foo() {}
-void Foo::A() {}
-void Foo::B(int i) {}
-int Foo::C(int i) { return i; }
-int Foo::D(bool b) const { return 1; }
-void Foo::E() {}
-int Foo::F(int i) { return i; }
-void Foo::G(const char *fmt...) {}
-Foo Foo::H() { return Foo(); }
-void Foo::I() const { MACRO_FOO; }
-Bar Foo::J() const { return MACRO_BAR(Bar()); }
-Bar Foo::K(void *v) const { return Bar(); }
-Bar &Foo::L() const {
-  Bar *b = new Bar();
-  return *b;
-};
-Bar *Foo::M() const {
-  Bar *b = new Bar();
-  return b;
-};
diff --git a/src/llvm-project/lldb/lit/tools/lldb-instr/Inputs/foo.h b/src/llvm-project/lldb/lit/tools/lldb-instr/Inputs/foo.h
deleted file mode 100644
index fb76e04..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-instr/Inputs/foo.h
+++ /dev/null
@@ -1,19 +0,0 @@
-struct Bar {};
-struct Foo {
-  Foo();
-  Foo(int i);
-
-  void A();
-  void B(int i);
-  int C(int i);
-  int D(bool b) const;
-  static void E();
-  static int F(int i);
-  void G(const char *fmt...);
-  static Foo H();
-  void I() const;
-  Bar J() const;
-  Bar K(void *v) const;
-  Bar &L() const;
-  Bar *M() const;
-};
diff --git a/src/llvm-project/lldb/lit/tools/lldb-instr/TestInstrumentationRecord.test b/src/llvm-project/lldb/lit/tools/lldb-instr/TestInstrumentationRecord.test
deleted file mode 100644
index a75a3fc..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-instr/TestInstrumentationRecord.test
+++ /dev/null
@@ -1,24 +0,0 @@
-# RUN: mkdir -p %t.dir
-# RUN: cp %p/Inputs/foo.cpp %t.dir/foo.cpp
-# RUN: cp %p/Inputs/foo.h %t.dir/foo.h
-
-# RUN: lldb-instr %t.dir/foo.cpp
-# RUN: cat %t.dir/foo.cpp | FileCheck %s
-
-# CHECK: LLDB_RECORD_CONSTRUCTOR_NO_ARGS(Foo);
-# CHECK: LLDB_RECORD_METHOD_NO_ARGS(void, Foo, A);
-# CHECK: LLDB_RECORD_METHOD(void, Foo, B, (int), i);
-# CHECK: LLDB_RECORD_METHOD(int, Foo, C, (int), i);
-# CHECK: LLDB_RECORD_METHOD_CONST(int, Foo, D, (bool), b);
-# CHECK: LLDB_RECORD_STATIC_METHOD_NO_ARGS(void, Foo, E);
-# CHECK: LLDB_RECORD_STATIC_METHOD(int, Foo, F, (int), i);
-# CHECK-NOT: LLDB_RECORD_STATIC_METHOD(void, Foo, G
-# CHECK: LLDB_RECORD_STATIC_METHOD_NO_ARGS(Foo, Foo, H);
-# CHECK: LLDB_RECORD_RESULT(Foo())
-# CHECK-NOT: LLDB_RECORD_METHOD_CONST_NO_ARGS(void, Foo, I);
-# CHECK: LLDB_RECORD_METHOD_CONST_NO_ARGS(Bar, Foo, J);
-# CHECK-NOT: LLDB_RECORD_RESULT(Bar());
-# CHECK: LLDB_RECORD_DUMMY(Bar, Foo, K, (void *), v);
-# CHECK-NOT: LLDB_RECORD_RESULT(Bar());
-# CHECK: LLDB_RECORD_RESULT(*b)
-# CHECK: LLDB_RECORD_RESULT(b)
diff --git a/src/llvm-project/lldb/lit/tools/lldb-instr/TestInstrumentationRegister.test b/src/llvm-project/lldb/lit/tools/lldb-instr/TestInstrumentationRegister.test
deleted file mode 100644
index aa8af5b..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-instr/TestInstrumentationRegister.test
+++ /dev/null
@@ -1,20 +0,0 @@
-# RUN: mkdir -p %t.dir
-# RUN: cp %p/Inputs/foo.cpp %t.dir/foo.cpp
-# RUN: cp %p/Inputs/foo.h %t.dir/foo.h
-
-# RUN: lldb-instr %t.dir/foo.cpp | FileCheck %s
-
-# CHECK: {
-# CHECK: LLDB_REGISTER_METHOD(void, Foo, A, ());
-# CHECK: LLDB_REGISTER_METHOD(void, Foo, B, (int));
-# CHECK: LLDB_REGISTER_METHOD(int, Foo, C, (int));
-# CHECK: LLDB_REGISTER_METHOD_CONST(int, Foo, D, (bool));
-# CHECK: LLDB_REGISTER_STATIC_METHOD(void, Foo, E, ());
-# CHECK: LLDB_REGISTER_STATIC_METHOD(int, Foo, F, (int));
-# CHECK: LLDB_REGISTER_METHOD_CONST(Bar, Foo, J, ());
-# CHECK: LLDB_REGISTER_METHOD_CONST(Bar &, Foo, L, ());
-# CHECK: LLDB_REGISTER_METHOD_CONST(Bar *, Foo, M, ());
-# CHECK-NOT: LLDB_REGISTER_STATIC_METHOD(void, Foo, G
-# CHECK-NOT: LLDB_REGISTER_METHOD_CONST(void, Foo, I, ());
-# CHECK-NOT: LLDB_REGISTER_METHOD_CONST(Bar, Foo, K, (void*));
-# CHECK: }
diff --git a/src/llvm-project/lldb/lit/tools/lldb-instr/lit.local.cfg b/src/llvm-project/lldb/lit/tools/lldb-instr/lit.local.cfg
deleted file mode 100644
index 0389218d..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-instr/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if not "lldb-instr" in config.available_features:
-    config.unsupported = True
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/break-insert-enable-pending.test b/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/break-insert-enable-pending.test
deleted file mode 100644
index 55daf91..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/break-insert-enable-pending.test
+++ /dev/null
@@ -1,51 +0,0 @@
-# XFAIL: system-windows
-# -> llvm.org/pr24452
-# XFAIL: system-netbsd
-#
-# RUN: %clang -o %t %p/inputs/break-insert-pending.c -g
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test for enabling pending breakpoints globally
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert printf
-# CHECK: ^error,msg="Command 'break-insert'. Breakpoint location 'printf' not found
-
--gdb-set breakpoint pending on
-# CHECK: ^done
--gdb-show breakpoint pending
-# CHECK: ^done,value="on"
--break-insert printf
-# CHECK: ^done,bkpt={number="2",type="breakpoint",disp="keep",enabled="y",addr="0xffffffffffffffff",func="??",file="??",fullname="??/??",line="0",pending=["printf"],times="0",original-location="printf"}
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit",disp="del",bkptno="2",frame={level="0",addr="{{0x[0-9a-f]*[^f][0-9a-f]*}}"
--break-disable 2
-# CHECK: ^done
--exec-continue
-# CHECK: ^running
-# CHECK: *stopped,reason="exited-normally"
-
-# Test that it can be turned back off
--gdb-show breakpoint pending
-# CHECK: ^done,value="on"
--gdb-set breakpoint pending off
-# CHECK: ^done
--gdb-show breakpoint pending
-# CHECK: ^done,value="off"
--break-insert printf-non-existent
-# CHECK: ^error,msg="Command 'break-insert'. Breakpoint location 'printf-non-existent' not found"
-# Check that enable/disable with 1 and 0 works
--gdb-set breakpoint pending 1
-# CHECK: ^done
--gdb-show breakpoint pending
-# CHECK: ^done,value="on"
--gdb-set breakpoint pending 0
-# CHECK: ^done
--gdb-show breakpoint pending
-# CHECK: ^done,value="off"
--gdb-set breakpoint pending garbage
-# CHECK: ^done
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/break-insert.test b/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/break-insert.test
deleted file mode 100644
index d803915..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/break-insert.test
+++ /dev/null
@@ -1,21 +0,0 @@
-# XFAIL: system-netbsd
-# UNSUPPORTED: system-linux
-#
-# RUN: %build %p/inputs/break-insert.c --nodefaultlib -o a.exe
-# RUN: %lldbmi < %s | FileCheck %s
-
-# Test that a breakpoint can be inserted before creating a target.
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert breakpoint
-# CHECK: ^done,bkpt={number="1"
-
--file-exec-and-symbols a.exe
-# CHECK: ^done
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/inputs/break-insert-pending.c b/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/inputs/break-insert-pending.c
deleted file mode 100644
index 99722ab..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/inputs/break-insert-pending.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <stdio.h>
-
-int main(int argc, char const *argv[]) {
-    printf("Print a formatted string so that GCC does not optimize this printf call: %s\n", argv[0]);
-    return 0;
-}
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/inputs/break-insert.c b/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/inputs/break-insert.c
deleted file mode 100644
index 67d2e56..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/inputs/break-insert.c
+++ /dev/null
@@ -1,7 +0,0 @@
-int breakpoint() { // Breakpoint will be set here.
-  return 0;
-}
-
-int main() {
-  return breakpoint();
-}
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/lit.local.cfg b/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/lit.local.cfg
deleted file mode 100644
index df9b335..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/breakpoint/lit.local.cfg
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = ['.test']
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/data/data-info-line.test b/src/llvm-project/lldb/lit/tools/lldb-mi/data/data-info-line.test
deleted file mode 100644
index 11ea365..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/data/data-info-line.test
+++ /dev/null
@@ -1,38 +0,0 @@
-# XFAIL: system-netbsd
-#
-# RUN: %build %p/inputs/data-info-line.c --nodefaultlib -o %t
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test lldb-mi -data-info-line command.
-
-# Check that we have a valid target created via '%lldbmi %t'.
-# CHECK: ^done
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert main
-# CHECK: ^done,bkpt={number="1"
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
--data-info-line *0x0
-# Test that -data-info-line fails when invalid address is specified.
-# CHECK: ^error,msg="Command 'data-info-line'. Error: The LineEntry is absent or has an unknown format."
-
--data-info-line unknown_file:1
-# Test that -data-info-line fails when file is unknown.
-# CHECK: ^error,msg="Command 'data-info-line'. Error: The LineEntry is absent or has an unknown format."
-
--data-info-line data-info-line.c:bad_line
-# Test that -data-info-line fails when line has invalid format.
-# CHECK: ^error,msg="Command 'data-info-line'. Error: The LineEntry is absent or has an unknown format."
-
--data-info-line data-info-line.c:0
-# Test that -data-info-line fails when invalid line is specified.
-# CHECK: ^error,msg="Command 'data-info-line'. Error: The LineEntry is absent or has an unknown format."
-
--data-info-line data-info-line.c:2
-# CHECK: ^done,start="0x{{[0-9a-f]+}}",end="0x{{[0-9a-f]+}}",file="{{.*}}data-info-line.c",line="{{[0-9]+}}"
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/data/inputs/data-info-line.c b/src/llvm-project/lldb/lit/tools/lldb-mi/data/inputs/data-info-line.c
deleted file mode 100644
index 61c3710..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/data/inputs/data-info-line.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main(void) {
-  int x = 0;
-  return 12345 + x;
-}
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/data/lit.local.cfg b/src/llvm-project/lldb/lit/tools/lldb-mi/data/lit.local.cfg
deleted file mode 100644
index df9b335..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/data/lit.local.cfg
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = ['.test']
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-continue.test b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-continue.test
deleted file mode 100644
index c27bc44..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-continue.test
+++ /dev/null
@@ -1,22 +0,0 @@
-# XFAIL: system-netbsd
-#
-# RUN: %build %p/inputs/main.c --nodefaultlib -o %t
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test lldb-mi -exec-continue command.
-
-# Check that we have a valid target created via '%lldbmi %t'.
-# CHECK: ^done
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert main
-# CHECK: ^done,bkpt={number="1"
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
--exec-continue
-# CHECK: ^running
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-finish.test b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-finish.test
deleted file mode 100644
index 19947f9..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-finish.test
+++ /dev/null
@@ -1,33 +0,0 @@
-# RUN: %build %p/inputs/main.c -o %t
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test lldb-mi -exec-finish command.
-
-# Check that we have a valid target created via '%lldbmi %t'.
-# CHECK: ^done
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert main
-# CHECK: ^done,bkpt={number="1"
-
--break-insert dummyFunction
-# CHECK: ^done,bkpt={number="2"
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
--exec-finish --thread 0
-# Check that exec-finish can process the case of invalid thread ID.
-# CHECK: ^error,msg="Command 'exec-finish'. Thread ID invalid"
-
--exec-finish --thread 1
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
--exec-finish
-# Check exec-finish in a selected thread.
-# CHECK: ^running
-# CHECK: *stopped,reason="end-stepping-range"
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-interrupt.test b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-interrupt.test
deleted file mode 100644
index 2079125..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-interrupt.test
+++ /dev/null
@@ -1,22 +0,0 @@
-# XFAIL: system-netbsd
-#
-# RUN: %build %p/inputs/main.c --nodefaultlib -o %t
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test lldb-mi -exec-interrupt command.
-
-# Check that we have a valid target created via '%lldbmi %t'.
-# CHECK: ^done
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert main
-# CHECK: ^done,bkpt={number="1"
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
--exec-interrupt
-# CHECK: ^error,msg="Process is not running."
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-next-instruction.test b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-next-instruction.test
deleted file mode 100644
index ca3c9e9..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-next-instruction.test
+++ /dev/null
@@ -1,32 +0,0 @@
-# XFAIL: system-netbsd
-#
-# RUN: %build %p/inputs/main.c --nodefaultlib -o %t
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test lldb-mi -exec-next-instruction command.
-
-# Check that we have a valid target created via '%lldbmi %t'.
-# CHECK: ^done
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert main
-# CHECK: ^done,bkpt={number="1"
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
--exec-next-instruction --thread 0
-# Check that exec-next-instruction can process the case of invalid thread ID.
-# CHECK: ^error,msg="Command 'exec-next-instruction'. Thread ID invalid"
-
--exec-next-instruction --thread 1
-# CHECK: ^running
-# CHECK: *stopped,reason="end-stepping-range"
-
--exec-next-instruction
-# Check exec-next-instruction in a selected thread.
-# CHECK: ^running
-# CHECK: *stopped,reason="end-stepping-range"
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-next.test b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-next.test
deleted file mode 100644
index 0dd2274..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-next.test
+++ /dev/null
@@ -1,33 +0,0 @@
-# XFAIL: system-netbsd
-# UNSUPPORTED: system-linux
-#
-# RUN: %build %p/inputs/main.c --nodefaultlib -o %t
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test lldb-mi -exec-next command.
-
-# Check that we have a valid target created via '%lldbmi %t'.
-# CHECK: ^done
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert main
-# CHECK: ^done,bkpt={number="1"
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
--exec-next --thread 0
-# Check that exec-next can process the case of invalid thread ID.
-# CHECK: ^error,msg="Command 'exec-next'. Thread ID invalid"
-
--exec-next --thread 1
-# CHECK: ^running
-# CHECK: *stopped,reason="end-stepping-range"
-
--exec-next
-# Check that exec-next can step over in a selected thread.
-# CHECK: ^running
-# CHECK: *stopped,reason="end-stepping-range"
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
deleted file mode 100644
index 98dc75f..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-run-wrong-binary.test
+++ /dev/null
@@ -1,6 +0,0 @@
-# RUN: %lldbmi < %s | FileCheck %s
-
-# Test that -exec-run command won't hang in case of wrong name of binary file.
-
--file-exec-and-symbols name.exe
-# CHECK: ^error,msg="Command 'file-exec-and-symbols'. Target binary 'name.exe' is invalid.
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-step-instruction.test b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-step-instruction.test
deleted file mode 100644
index 3301b3e..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-step-instruction.test
+++ /dev/null
@@ -1,32 +0,0 @@
-# XFAIL: system-netbsd
-#
-# RUN: %build %p/inputs/main.c --nodefaultlib -o %t
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test lldb-mi -exec-step-instruction command.
-
-# Check that we have a valid target created via '%lldbmi %t'.
-# CHECK: ^done
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert main
-# CHECK: ^done,bkpt={number="1"
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
--exec-step-instruction --thread 0
-# Check that exec-step-instruction can process the case of invalid thread ID.
-# CHECK: ^error,msg="Command 'exec-step-instruction'. Thread ID invalid"
-
--exec-next-instruction --thread 1
-# CHECK: ^running
-# CHECK: *stopped,reason="end-stepping-range"
-
--exec-step-instruction
-# Check exec-step-instruction in a selected thread.
-# CHECK: ^running
-# CHECK: *stopped,reason="end-stepping-range"
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-step.test b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-step.test
deleted file mode 100644
index a14dd42..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/exec-step.test
+++ /dev/null
@@ -1,32 +0,0 @@
-# XFAIL: system-netbsd
-#
-# RUN: %build %p/inputs/main.c --nodefaultlib -o %t
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test lldb-mi -exec-step command.
-
-# Check that we have a valid target created via '%lldbmi %t'.
-# CHECK: ^done
-
-settings set symbols.enable-external-lookup false
-# CHECK: ^done
-
--break-insert main
-# CHECK: ^done,bkpt={number="1"
-
--exec-run
-# CHECK: ^running
-# CHECK: *stopped,reason="breakpoint-hit"
-
--exec-step --thread 0
-# Check that exec-step can process the case of invalid thread ID.
-# CHECK: ^error,msg="Command 'exec-step'. Thread ID invalid"
-
--exec-step --thread 1
-# CHECK: ^running
-# CHECK: *stopped,reason="end-stepping-range"
-
--exec-step
-# Check that exec-step can step-in in a selected thread.
-# CHECK: ^running
-# CHECK: *stopped,reason="end-stepping-range"
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/inputs/main.c b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/inputs/main.c
deleted file mode 100644
index b9d8f9d..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/inputs/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-void dummyFunction() {
-  int a = 0;
-}
-
-int main(void) {
-  int x = 0;
-  dummyFunction();
-  return x;
-}
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/lit.local.cfg b/src/llvm-project/lldb/lit/tools/lldb-mi/exec/lit.local.cfg
deleted file mode 100644
index df9b335..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/exec/lit.local.cfg
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = ['.test']
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/lit.local.cfg b/src/llvm-project/lldb/lit/tools/lldb-mi/lit.local.cfg
deleted file mode 100644
index ff28e26..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if not "lldb-mi" in config.available_features:
-    config.unsupported = True
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.c b/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.c
deleted file mode 100644
index 74e6276..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.c
+++ /dev/null
@@ -1,3 +0,0 @@
-void HelpFunction(void) {
-  int x = 12345;
-}
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.h b/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.h
deleted file mode 100644
index 05edab9..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/list-lines-helper.h
+++ /dev/null
@@ -1 +0,0 @@
-void HelpFunction(void);
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/main.c b/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/main.c
deleted file mode 100644
index f21edf3..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/main.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "symbol-list-lines.h"
-
-int main(void) {
-  int x = GetZero();
-  return 0;
-}
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.c b/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.c
deleted file mode 100644
index 761f793..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "list-lines-helper.h"
-
-int GetZero() {
-  HelpFunction();
-  return 0;
-}
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.h b/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.h
deleted file mode 100644
index 1b74ff6..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/inputs/symbol-list-lines.h
+++ /dev/null
@@ -1 +0,0 @@
-int GetZero();
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/lit.local.cfg b/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/lit.local.cfg
deleted file mode 100644
index df9b335..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/lit.local.cfg
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = ['.test']
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/symbol-list-lines.test b/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/symbol-list-lines.test
deleted file mode 100644
index 792f283..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/symbol/symbol-list-lines.test
+++ /dev/null
@@ -1,17 +0,0 @@
-# RUN: %build %p/inputs/main.c %p/inputs/symbol-list-lines.c %p/inputs/list-lines-helper.c --nodefaultlib -o %t
-# RUN: %lldbmi %t < %s | FileCheck %s
-
-# Test lldb-mi -symbol-list-lines command.
-
-# Check that we have a valid target created via '%lldbmi %t'.
-# CHECK: ^done
-
--symbol-list-lines invalid_file.c
-# Check a case of invalid file name.
-# CHECK: ^error,msg="File Handler. Invalid file name path"
-
--symbol-list-lines symbol-list-lines.c
-# CHECK: ^done,lines=[{pc="0x{{[0-9A-Fa-f]+}}",line="3"},{pc="0x{{[0-9A-Fa-f]+}}",line="4"},{pc="0x{{[0-9A-Fa-f]+}}",line="5"}{{.*}}]
-
--symbol-list-lines list-lines-helper.c
-# CHECK: ^done,lines=[{pc="0x{{[0-9A-Fa-f]+}}",line="1"},{pc="0x{{[0-9A-Fa-f]+}}",line="2"},{pc="0x{{[0-9A-Fa-f]+}}",line="3"}{{.*}}]
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/target/inputs/main.c b/src/llvm-project/lldb/lit/tools/lldb-mi/target/inputs/main.c
deleted file mode 100644
index 8c74b34..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/target/inputs/main.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main(void) {
-  int x = 0;
-  return x;
-}
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/target/inputs/target-select-so-path.py b/src/llvm-project/lldb/lit/tools/lldb-mi/target/inputs/target-select-so-path.py
deleted file mode 100644
index 5eb07d8..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/target/inputs/target-select-so-path.py
+++ /dev/null
@@ -1,50 +0,0 @@
-import os
-import sys
-import subprocess
-from threading import Timer
-
-
-hostname = 'localhost'
-
-(r, w) = os.pipe()
-kwargs = {}
-if sys.version_info >= (3,2):
-    kwargs['pass_fds'] = [w]
-
-args = sys.argv
-# Get debugserver, lldb-mi and FileCheck executables' paths with arguments.
-debugserver = ' '.join([args[1], '--pipe', str(w), hostname + ':0'])
-lldbmi = args[2]
-test_file = args[3]
-filecheck = 'FileCheck ' + test_file
-
-# Run debugserver, lldb-mi and FileCheck.
-debugserver_proc = subprocess.Popen(debugserver.split(), **kwargs)
-lldbmi_proc = subprocess.Popen(lldbmi, stdin=subprocess.PIPE,
-                               stdout=subprocess.PIPE, shell=True)
-filecheck_proc = subprocess.Popen(filecheck, stdin=subprocess.PIPE,
-                                  shell=True)
-
-timeout_sec = 30
-timer = Timer(timeout_sec, exit, [filecheck_proc.returncode])
-try:
-    timer.start()
-
-    # Get a tcp port chosen by debugserver.
-    # The number quite big to get lldb-server's output and to not hang.
-    bytes_to_read = 10
-    port_bytes = os.read(r, bytes_to_read)
-    port = str(port_bytes.decode('utf-8').strip('\x00'))
-
-    with open(test_file, 'r') as f:
-        # Replace '$PORT' with a free port number and pass
-        # test's content to lldb-mi.
-        lldbmi_proc.stdin.write(f.read().replace('$PORT', port).encode('utf-8'))
-        out, err = lldbmi_proc.communicate()
-        filecheck_proc.stdin.write(out)
-        filecheck_proc.communicate()
-finally:
-    timer.cancel()
-
-debugserver_proc.kill()
-exit(filecheck_proc.returncode)
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/target/lit.local.cfg b/src/llvm-project/lldb/lit/tools/lldb-mi/target/lit.local.cfg
deleted file mode 100644
index df9b335..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/target/lit.local.cfg
+++ /dev/null
@@ -1 +0,0 @@
-config.suffixes = ['.test']
diff --git a/src/llvm-project/lldb/lit/tools/lldb-mi/target/target-select-so-path.test b/src/llvm-project/lldb/lit/tools/lldb-mi/target/target-select-so-path.test
deleted file mode 100644
index 8b71be5..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-mi/target/target-select-so-path.test
+++ /dev/null
@@ -1,25 +0,0 @@
-# UNSUPPORTED: system-windows, system-darwin
-#
-# RUN: %clang -o %t %p/inputs/main.c -g
-# RUN: %python %p/inputs/target-select-so-path.py "%debugserver" "%lldbmi %t" %s
-
-# Test that -target-select command can hook up a path
-# added by gdb-set solib-search-path.
-
-# Check that we have a valid target created via file-exec-and-symbols.
-# CHECK: ^done
-
--interpreter-exec console "target modules search-paths list"
-# CHECK ^done
-
--gdb-set solib-search-path /example/dir
-# CHECK: ^done
-
--target-select remote localhost:$PORT
-# CHECK: ^connected
-
--interpreter-exec console "target modules search-paths list"
-# CHECK: ~"[0] \".\" -> \"/example/dir\"\n"
-# CHECK-NEXT: ^done
-
--gdb-exit
diff --git a/src/llvm-project/lldb/lit/tools/lldb-server/TestGdbserverPort.test b/src/llvm-project/lldb/lit/tools/lldb-server/TestGdbserverPort.test
deleted file mode 100644
index 04facfe..0000000
--- a/src/llvm-project/lldb/lit/tools/lldb-server/TestGdbserverPort.test
+++ /dev/null
@@ -1,4 +0,0 @@
-# Windows does not build lldb-server.
-# UNSUPPORTED: system-windows
-# RUN: %platformserver --server --listen :1234 --min-gdbserver-port 1234 --max-gdbserver-port 1234 2>&1 | FileCheck %s
-# CHECK: error: --min-gdbserver-port (1234) is not lower than --max-gdbserver-port (1234)
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/project.pbxproj b/src/llvm-project/lldb/lldb.xcodeproj/project.pbxproj
deleted file mode 100644
index c02abef..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,11513 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXAggregateTarget section */
-		26CEF3A914FD58BF007286B2 /* desktop_no_xpc */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 26CEF3AD14FD58BF007286B2 /* Build configuration list for PBXAggregateTarget "desktop_no_xpc" */;
-			buildPhases = (
-				AF90106415AB7D2900FF120D /* CopyFiles */,
-			);
-			dependencies = (
-				26B391F11A6DCCBE00456239 /* PBXTargetDependency */,
-				26CEF3B014FD591F007286B2 /* PBXTargetDependency */,
-			);
-			name = desktop_no_xpc;
-			productName = snowleopard;
-		};
-		26CEF3B114FD592B007286B2 /* desktop */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 26CEF3B214FD592B007286B2 /* Build configuration list for PBXAggregateTarget "desktop" */;
-			buildPhases = (
-				AF90106415AB7D2900FF120D /* CopyFiles */,
-			);
-			dependencies = (
-				26CEF3BB14FD595B007286B2 /* PBXTargetDependency */,
-				26B391EF1A6DCCAF00456239 /* PBXTargetDependency */,
-			);
-			name = desktop;
-			productName = desktop;
-		};
-		26CEF3BC14FD596A007286B2 /* ios */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = 26CEF3BD14FD596A007286B2 /* Build configuration list for PBXAggregateTarget "ios" */;
-			buildPhases = (
-				AFF87C85150FF5CC000E1742 /* CopyFiles */,
-				AF3059151B4B390800E25622 /* Run Script - remove unneeded Resources and Swift dirs from iOS LLDB.framework bundle */,
-			);
-			dependencies = (
-				AFCA21D21D18E556004386B8 /* PBXTargetDependency */,
-				26CEF3C214FD5973007286B2 /* PBXTargetDependency */,
-			);
-			name = ios;
-			productName = ios;
-		};
-		AFA9B71120606A13008E86C6 /* ios-mini */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = AFA9B71F20606A13008E86C6 /* Build configuration list for PBXAggregateTarget "ios-mini" */;
-			buildPhases = (
-				AFA9B71820606A13008E86C6 /* CopyFiles */,
-			);
-			dependencies = (
-				AFA9B71220606A13008E86C6 /* PBXTargetDependency */,
-			);
-			name = "ios-mini";
-			productName = ios;
-		};
-		DD8DC26B22026E2C00EB6F9E /* lldb-docs */ = {
-			isa = PBXAggregateTarget;
-			buildConfigurationList = DD8DC27022026E2C00EB6F9E /* Build configuration list for PBXAggregateTarget "lldb-docs" */;
-			buildPhases = (
-				DD8DC27122026E4400EB6F9E /* ShellScript */,
-			);
-			dependencies = (
-			);
-			name = "lldb-docs";
-			productName = "lldb-docs";
-		};
-/* End PBXAggregateTarget section */
-
-/* Begin PBXBuildFile section */
-		268900E813353E6F00698AC0 /* ABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 497E7B9D1188F6690065CCA1 /* ABI.cpp */; };
-		26DB3E161379E7AD0080DC73 /* ABIMacOSX_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DB3E071379E7AD0080DC73 /* ABIMacOSX_arm.cpp */; };
-		26DB3E191379E7AD0080DC73 /* ABIMacOSX_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DB3E0B1379E7AD0080DC73 /* ABIMacOSX_arm64.cpp */; };
-		26DB3E1C1379E7AD0080DC73 /* ABIMacOSX_i386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DB3E0F1379E7AD0080DC73 /* ABIMacOSX_i386.cpp */; };
-		AF20F7661AF18F8500751A6E /* ABISysV_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F7641AF18F8500751A6E /* ABISysV_arm.cpp */; };
-		AF20F76A1AF18F9000751A6E /* ABISysV_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F7681AF18F9000751A6E /* ABISysV_arm64.cpp */; };
-		26BF51F31B3C754400016294 /* ABISysV_hexagon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BF51EA1B3C754400016294 /* ABISysV_hexagon.cpp */; };
-		26BF51F61B3C754400016294 /* ABISysV_i386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BF51EF1B3C754400016294 /* ABISysV_i386.cpp */; };
-		9694FA711B32AA64005EBB16 /* ABISysV_mips.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9694FA6F1B32AA64005EBB16 /* ABISysV_mips.cpp */; };
-		263641191B34AEE200145B2F /* ABISysV_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263641151B34AEE200145B2F /* ABISysV_mips64.cpp */; };
-		AF77E08F1A033C700096C0EA /* ABISysV_ppc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF77E08D1A033C700096C0EA /* ABISysV_ppc.cpp */; };
-		AF77E0931A033C7F0096C0EA /* ABISysV_ppc64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF77E0911A033C7F0096C0EA /* ABISysV_ppc64.cpp */; };
-		267F684A1CC02DED0086832B /* ABISysV_s390x.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267F68471CC02DED0086832B /* ABISysV_s390x.cpp */; };
-		267F684B1CC02DED0086832B /* ABISysV_s390x.h in Headers */ = {isa = PBXBuildFile; fileRef = 267F68481CC02DED0086832B /* ABISysV_s390x.h */; };
-		26DB3E1F1379E7AD0080DC73 /* ABISysV_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DB3E131379E7AD0080DC73 /* ABISysV_x86_64.cpp */; };
-		AF352EDE22C17BD800D058B6 /* ABIWindows_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF352EDB22C17BD700D058B6 /* ABIWindows_x86_64.cpp */; };
-		2689006713353E0E00698AC0 /* ASTDumper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4906FD4012F2255300A2A77C /* ASTDumper.cpp */; };
-		2689006813353E0E00698AC0 /* ASTResultSynthesizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49A8A39F11D568A300AD3B68 /* ASTResultSynthesizer.cpp */; };
-		2689006913353E0E00698AC0 /* ASTStructExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 491193501226386000578B7F /* ASTStructExtractor.cpp */; };
-		4C0B95802238342C0026C840 /* ASTUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0B957E2238342C0026C840 /* ASTUtils.cpp */; };
-		8CF02AEA19DCC02100B14BE0 /* ASanRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF02AE519DCBF8400B14BE0 /* ASanRuntime.cpp */; };
-		257906641BD5AFD000178368 /* Acceptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 257906621BD5AFD000178368 /* Acceptor.cpp */; };
-		257906651BD5AFD000178368 /* Acceptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 257906631BD5AFD000178368 /* Acceptor.h */; };
-		25EF23781AC09B3700908DF0 /* AdbClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 25EF23751AC09AD800908DF0 /* AdbClient.cpp */; };
-		2689002A13353E0400698AC0 /* Address.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6910F1B85900F91463 /* Address.cpp */; };
-		2689002B13353E0400698AC0 /* AddressRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6A10F1B85900F91463 /* AddressRange.cpp */; };
-		2689002C13353E0400698AC0 /* AddressResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC7034011752C6B0086C050 /* AddressResolver.cpp */; };
-		2689002D13353E0400698AC0 /* AddressResolverFileLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC7034211752C720086C050 /* AddressResolverFileLine.cpp */; };
-		2689002E13353E0400698AC0 /* AddressResolverName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC7034411752C790086C050 /* AddressResolverName.cpp */; };
-		4C639ED521FA684900A7B957 /* AnsiTerminalTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC721FA684800A7B957 /* AnsiTerminalTest.cpp */; };
-		4CD44CFD20B37C440003557C /* AppleDWARFIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD44CFA20B37C440003557C /* AppleDWARFIndex.cpp */; };
-		AF0E22F018A09FB20009B7D1 /* AppleGetItemInfoHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0E22EE18A09FB20009B7D1 /* AppleGetItemInfoHandler.cpp */; };
-		AF1F7B07189C904B0087DB9C /* AppleGetPendingItemsHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF1F7B05189C904B0087DB9C /* AppleGetPendingItemsHandler.cpp */; };
-		AF25AB26188F685C0030DEC3 /* AppleGetQueuesHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF25AB24188F685C0030DEC3 /* AppleGetQueuesHandler.cpp */; };
-		AF45FDE518A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF45FDE318A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp */; };
-		94CD7D0919A3FBA300908B7C /* AppleObjCClassDescriptorV2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CD7D0819A3FBA300908B7C /* AppleObjCClassDescriptorV2.cpp */; };
-		49DA65031485C92A005FF180 /* AppleObjCDeclVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DA65021485C92A005FF180 /* AppleObjCDeclVendor.cpp */; };
-		4CCA645013B40B82003BDF98 /* AppleObjCRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA644213B40B82003BDF98 /* AppleObjCRuntime.cpp */; };
-		4CCA645213B40B82003BDF98 /* AppleObjCRuntimeV1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA644413B40B82003BDF98 /* AppleObjCRuntimeV1.cpp */; };
-		4CCA645413B40B82003BDF98 /* AppleObjCRuntimeV2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA644613B40B82003BDF98 /* AppleObjCRuntimeV2.cpp */; };
-		4CCA645613B40B82003BDF98 /* AppleObjCTrampolineHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA644813B40B82003BDF98 /* AppleObjCTrampolineHandler.cpp */; };
-		94CD7D0C19A3FBCE00908B7C /* AppleObjCTypeEncodingParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CD7D0B19A3FBCE00908B7C /* AppleObjCTypeEncodingParser.cpp */; };
-		4CCA645813B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA644A13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp */; };
-		AF6CA6661FBBAF28005A0DC3 /* ArchSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF6CA6651FBBAF27005A0DC3 /* ArchSpec.cpp */; };
-		AF6CA6681FBBAF37005A0DC3 /* ArchSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = AF6CA6671FBBAF37005A0DC3 /* ArchSpec.h */; };
-		23E2E5251D90373D006F38BB /* ArchSpecTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E5161D903689006F38BB /* ArchSpecTest.cpp */; };
-		AF2E02A31FA2CEAF00A86C34 /* ArchitectureArm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2E02A11FA2CEAF00A86C34 /* ArchitectureArm.cpp */; };
-		AF2E02A41FA2CEAF00A86C34 /* ArchitectureArm.h in Headers */ = {isa = PBXBuildFile; fileRef = AF2E02A21FA2CEAF00A86C34 /* ArchitectureArm.h */; };
-		2647B63221C4366300A81D15 /* ArchitectureMips.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2647B63021C4366300A81D15 /* ArchitectureMips.cpp */; };
-		2647B63121C4366300A81D15 /* ArchitectureMips.h in Headers */ = {isa = PBXBuildFile; fileRef = 2647B62F21C4366200A81D15 /* ArchitectureMips.h */; };
-		4C14CEFB2057258D00DEEF94 /* ArchitecturePPC64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C14CEF82057258D00DEEF94 /* ArchitecturePPC64.cpp */; };
-		2689007D13353E2200698AC0 /* Args.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6C10F1B85900F91463 /* Args.cpp */; };
-		23CB153C1D66DA9300EDDDE1 /* ArgsTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F93E1BDD33CE00BA9A93 /* ArgsTest.cpp */; };
-		6D99A3631BBC2F3200979793 /* ArmUnwindInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D99A3621BBC2F3200979793 /* ArmUnwindInfo.cpp */; };
-		AF7BD81B22B04E20008E78D1 /* AuxVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF7BD81A22B04E20008E78D1 /* AuxVector.cpp */; };
-		AFC2DCE91E6E2F2C00283714 /* Baton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCE81E6E2F2C00283714 /* Baton.cpp */; };
-		268900D013353E6F00698AC0 /* Block.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1310F1B8EC00F91463 /* Block.cpp */; };
-		49DEF1251CD7C6DF006A7C7D /* BlockPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DEF11F1CD7BD90006A7C7D /* BlockPointer.cpp */; };
-		4CAEC6A821F26D15007C3DD5 /* BreakpadRecords.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CAEC6A621F26D15007C3DD5 /* BreakpadRecords.cpp */; };
-		2689FFEF13353DB600698AC0 /* Breakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0A10F1B83100F91463 /* Breakpoint.cpp */; };
-		2660387E211CA98200329572 /* BreakpointBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2660387D211CA98200329572 /* BreakpointBase.cpp */; };
-		2689FFF113353DB600698AC0 /* BreakpointID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0B10F1B83100F91463 /* BreakpointID.cpp */; };
-		2689FFF313353DB600698AC0 /* BreakpointIDList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0C10F1B83100F91463 /* BreakpointIDList.cpp */; };
-		23E2E5321D903832006F38BB /* BreakpointIDTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E52D1D90382B006F38BB /* BreakpointIDTest.cpp */; };
-		2689FFF513353DB600698AC0 /* BreakpointList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0D10F1B83100F91463 /* BreakpointList.cpp */; };
-		2689FFF713353DB600698AC0 /* BreakpointLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0E10F1B83100F91463 /* BreakpointLocation.cpp */; };
-		2689FFF913353DB600698AC0 /* BreakpointLocationCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0F10F1B83100F91463 /* BreakpointLocationCollection.cpp */; };
-		2689FFFB13353DB600698AC0 /* BreakpointLocationList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1010F1B83100F91463 /* BreakpointLocationList.cpp */; };
-		4CAA19E61F5A40040099E692 /* BreakpointName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D48281F509CCD005314B4 /* BreakpointName.cpp */; };
-		2689FFFD13353DB600698AC0 /* BreakpointOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1110F1B83100F91463 /* BreakpointOptions.cpp */; };
-		AF352EE122C17C0D00D058B6 /* BreakpointPrecondition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF352EE022C17C0C00D058B6 /* BreakpointPrecondition.cpp */; };
-		2689FFFF13353DB600698AC0 /* BreakpointResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1210F1B83100F91463 /* BreakpointResolver.cpp */; };
-		2689000113353DB600698AC0 /* BreakpointResolverAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D0DD5310FE555900271C65 /* BreakpointResolverAddress.cpp */; };
-		2689000313353DB600698AC0 /* BreakpointResolverFileLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D0DD5410FE555900271C65 /* BreakpointResolverFileLine.cpp */; };
-		4C3ADCD61810D88B00357218 /* BreakpointResolverFileRegex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CAA56141422D986001FFA01 /* BreakpointResolverFileRegex.cpp */; };
-		2689000513353DB600698AC0 /* BreakpointResolverName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D0DD5510FE555900271C65 /* BreakpointResolverName.cpp */; };
-		4CCF9F612143014D006CC7EA /* BreakpointResolverScripted.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCF9F5E2143012F006CC7EA /* BreakpointResolverScripted.cpp */; };
-		2689000713353DB600698AC0 /* BreakpointSite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1310F1B83100F91463 /* BreakpointSite.cpp */; };
-		2689000913353DB600698AC0 /* BreakpointSiteList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1410F1B83100F91463 /* BreakpointSiteList.cpp */; };
-		2647B63A21C436AC00A81D15 /* Broadcaster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2647B63921C436AB00A81D15 /* Broadcaster.cpp */; };
-		2647B63621C4368300A81D15 /* Broadcaster.h in Headers */ = {isa = PBXBuildFile; fileRef = 2647B63521C4368300A81D15 /* Broadcaster.h */; };
-		23CB15431D66DA9300EDDDE1 /* BroadcasterTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB14E61D66CC0E00EDDDE1 /* BroadcasterTest.cpp */; };
-		949EEDAE1BA7671C008C63CF /* CF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDAC1BA76719008C63CF /* CF.cpp */; };
-		2689007613353E1A00698AC0 /* CFCBundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7EED10F1B8AD00F91463 /* CFCBundle.cpp */; };
-		2689007713353E1A00698AC0 /* CFCData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7EEF10F1B8AD00F91463 /* CFCData.cpp */; };
-		2689007813353E1A00698AC0 /* CFCMutableArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7EF110F1B8AD00F91463 /* CFCMutableArray.cpp */; };
-		2689007913353E1A00698AC0 /* CFCMutableDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7EF310F1B8AD00F91463 /* CFCMutableDictionary.cpp */; };
-		2689007A13353E1A00698AC0 /* CFCMutableSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7EF510F1B8AD00F91463 /* CFCMutableSet.cpp */; };
-		2689007B13353E1A00698AC0 /* CFCString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7EF810F1B8AD00F91463 /* CFCString.cpp */; };
-		AF9E360C22DD3BFC000B7776 /* CPPLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9E360B22DD3BFB000B7776 /* CPPLanguageRuntime.cpp */; };
-		94B6385D1B8FB178004FE1E4 /* CPlusPlusLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B6385B1B8FB174004FE1E4 /* CPlusPlusLanguage.cpp */; };
-		23CB15341D66DA9300EDDDE1 /* CPlusPlusLanguageTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB14FA1D66CCF100EDDDE1 /* CPlusPlusLanguageTest.cpp */; };
-		49F811F31E931B2100F4E163 /* CPlusPlusNameParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49F811EF1E931B1500F4E163 /* CPlusPlusNameParser.cpp */; };
-		945261C81B9A14D300BF138D /* CXXFunctionPointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261C71B9A14D300BF138D /* CXXFunctionPointer.cpp */; };
-		268900D113353E6F00698AC0 /* ClangASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1410F1B8EC00F91463 /* ClangASTContext.cpp */; };
-		49D8FB3913B5598F00411094 /* ClangASTImporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D8FB3513B558DE00411094 /* ClangASTImporter.cpp */; };
-		2689005E13353E0E00698AC0 /* ClangASTSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D7072811B5AD11001AD875 /* ClangASTSource.cpp */; };
-		2689006013353E0E00698AC0 /* ClangExpressionDeclMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49F1A74511B3388F003ED505 /* ClangExpressionDeclMap.cpp */; };
-		2689006113353E0E00698AC0 /* ClangExpressionParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49445C2512245E3600C11A81 /* ClangExpressionParser.cpp */; };
-		4C61465E223059B000D686F9 /* ClangExpressionSourceCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C61465C223059B000D686F9 /* ClangExpressionSourceCode.cpp */; };
-		4984BA131B978C55008658D4 /* ClangExpressionVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4984BA0E1B978C3E008658D4 /* ClangExpressionVariable.cpp */; };
-		268900D313353E6F00698AC0 /* ClangExternalASTSourceCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E69030129C6BEF00DDECD9 /* ClangExternalASTSourceCallbacks.cpp */; };
-		4966DCC4148978A10028481B /* ClangExternalASTSourceCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4966DCC3148978A10028481B /* ClangExternalASTSourceCommon.cpp */; };
-		2689005F13353E0E00698AC0 /* ClangFunctionCaller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C98D3DA118FB96F00E575D0 /* ClangFunctionCaller.cpp */; };
-		228B1B672113340200E61C70 /* ClangHighlighter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 58A080AB2112AABB00D5580F /* ClangHighlighter.cpp */; };
-		4CD44D5820C603CB0003557C /* ClangHost.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD44D5620C603A80003557C /* ClangHost.cpp */; };
-		4959511F1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4959511E1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp */; };
-		2689006313353E0E00698AC0 /* ClangPersistentVariables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49D4FE871210B61C00CDB854 /* ClangPersistentVariables.cpp */; };
-		2689006413353E0E00698AC0 /* ClangUserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7ED510F1B86700F91463 /* ClangUserExpression.cpp */; };
-		304B2E461CAAA57B007829FE /* ClangUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3032B1B61CAAA3D1004BE1AB /* ClangUtil.cpp */; };
-		30B38A001CAAA6D7009524E3 /* ClangUtil.h in Headers */ = {isa = PBXBuildFile; fileRef = 3032B1B91CAAA400004BE1AB /* ClangUtil.h */; };
-		2689006513353E0E00698AC0 /* ClangUtilityFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 497C86BD122823D800B54702 /* ClangUtilityFunction.cpp */; };
-		949EEDA31BA76577008C63CF /* Cocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA11BA76571008C63CF /* Cocoa.cpp */; };
-		5A6424962204D05000C3D9DB /* CodeViewRegisterMapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5A6424922204D04F00C3D9DB /* CodeViewRegisterMapping.cpp */; };
-		5A6424982204D05000C3D9DB /* CodeViewRegisterMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A6424942204D05000C3D9DB /* CodeViewRegisterMapping.h */; };
-		9441816E1C8F5EC900E5A8D9 /* CommandAlias.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9441816D1C8F5EC900E5A8D9 /* CommandAlias.cpp */; };
-		2689007F13353E2200698AC0 /* CommandCompletions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C09CB74116BD98B00C7A725 /* CommandCompletions.cpp */; };
-		94BA8B70176F97CE005A91B5 /* CommandHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94BA8B6F176F97CE005A91B5 /* CommandHistory.cpp */; };
-		2689008013353E2200698AC0 /* CommandInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F0810F1B8DD00F91463 /* CommandInterpreter.cpp */; };
-		2689008113353E2200698AC0 /* CommandObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F0910F1B8DD00F91463 /* CommandObject.cpp */; };
-		2689001213353DDE00698AC0 /* CommandObjectApropos.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CA9637911B6E99A00780E28 /* CommandObjectApropos.cpp */; };
-		2689001413353DDE00698AC0 /* CommandObjectBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E2D10F1B84700F91463 /* CommandObjectBreakpoint.cpp */; };
-		2689001513353DDE00698AC0 /* CommandObjectBreakpointCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A42976211861AA600FE05CD /* CommandObjectBreakpointCommand.cpp */; };
-		6D86CEA01B440F8500A7FBFA /* CommandObjectBugreport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D86CE9E1B440F6B00A7FBFA /* CommandObjectBugreport.cpp */; };
-		2689001613353DDE00698AC0 /* CommandObjectCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C5DBBC611E3FEC60035160F /* CommandObjectCommands.cpp */; };
-		2689001713353DDE00698AC0 /* CommandObjectDisassemble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3010F1B84700F91463 /* CommandObjectDisassemble.cpp */; };
-		2689001813353DDE00698AC0 /* CommandObjectExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3110F1B84700F91463 /* CommandObjectExpression.cpp */; };
-		2689001A13353DDE00698AC0 /* CommandObjectFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2672D8461189055500FF4019 /* CommandObjectFrame.cpp */; };
-		26CEB5F218762056008F575A /* CommandObjectGUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CEB5F018762056008F575A /* CommandObjectGUI.cpp */; };
-		2689001B13353DDE00698AC0 /* CommandObjectHelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3310F1B84700F91463 /* CommandObjectHelp.cpp */; };
-		AFC234091AF85CE100CDE8B6 /* CommandObjectLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC234061AF85CE000CDE8B6 /* CommandObjectLanguage.cpp */; };
-		2689001D13353DDE00698AC0 /* CommandObjectLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264AD83711095BA600E0B039 /* CommandObjectLog.cpp */; };
-		2689001E13353DDE00698AC0 /* CommandObjectMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3610F1B84700F91463 /* CommandObjectMemory.cpp */; };
-		2689008313353E2200698AC0 /* CommandObjectMultiword.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DFBC58113B48F300DD817F /* CommandObjectMultiword.cpp */; };
-		2689001F13353DDE00698AC0 /* CommandObjectPlatform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26879CE71333F58B0012C1F8 /* CommandObjectPlatform.cpp */; };
-		947A1D641616476B0017C8D1 /* CommandObjectPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 947A1D621616476A0017C8D1 /* CommandObjectPlugin.cpp */; };
-		2689002013353DDE00698AC0 /* CommandObjectProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3810F1B84700F91463 /* CommandObjectProcess.cpp */; };
-		2689002113353DDE00698AC0 /* CommandObjectQuit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3910F1B84700F91463 /* CommandObjectQuit.cpp */; };
-		2689008413353E2200698AC0 /* CommandObjectRegexCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DFBC59113B48F300DD817F /* CommandObjectRegexCommand.cpp */; };
-		2689002213353DDE00698AC0 /* CommandObjectRegister.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3B10F1B84700F91463 /* CommandObjectRegister.cpp */; };
-		AFCB1D5C219CD5A800730AD5 /* CommandObjectReproducer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFCB1D5A219CD5A700730AD5 /* CommandObjectReproducer.cpp */; };
-		2689002313353DDE00698AC0 /* CommandObjectScript.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E3D10F1B84700F91463 /* CommandObjectScript.cpp */; };
-		2689002413353DDE00698AC0 /* CommandObjectSettings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E4010F1B84700F91463 /* CommandObjectSettings.cpp */; };
-		2689002513353DDE00698AC0 /* CommandObjectSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E4210F1B84700F91463 /* CommandObjectSource.cpp */; };
-		AFB6B9ED2065BBE90047661E /* CommandObjectStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6B8894782065AE5C002E5C59 /* CommandObjectStats.cpp */; };
-		2689002713353DDE00698AC0 /* CommandObjectTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 269416AD119A024800FF2715 /* CommandObjectTarget.cpp */; };
-		2689002813353DDE00698AC0 /* CommandObjectThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E4610F1B84700F91463 /* CommandObjectThread.cpp */; };
-		9463D4CD13B1798800C230D4 /* CommandObjectType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9463D4CC13B1798800C230D4 /* CommandObjectType.cpp */; };
-		2689002913353DDE00698AC0 /* CommandObjectVersion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B296983412C2FB2B002D92C3 /* CommandObjectVersion.cpp */; };
-		B207C4931429607D00F36E4E /* CommandObjectWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B207C4921429607D00F36E4E /* CommandObjectWatchpoint.cpp */; };
-		B2B7CCEB15D1BD6700EEFB57 /* CommandObjectWatchpointCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2B7CCEA15D1BD6600EEFB57 /* CommandObjectWatchpointCommand.cpp */; };
-		23DDF226196C3EE600BB8417 /* CommandOptionValidators.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DDF224196C3EE600BB8417 /* CommandOptionValidators.cpp */; };
-		2689008513353E2200698AC0 /* CommandReturnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F0A10F1B8DD00F91463 /* CommandReturnObject.cpp */; };
-		2689003213353E0400698AC0 /* Communication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6E10F1B85900F91463 /* Communication.cpp */; };
-		2642FBAE13D003B400ED6808 /* CommunicationKDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2642FBA813D003B400ED6808 /* CommunicationKDP.cpp */; };
-		964463EC1A330C0500154ED8 /* CompactUnwindInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 964463EB1A330C0500154ED8 /* CompactUnwindInfo.cpp */; };
-		268900D513353E6F00698AC0 /* CompileUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1510F1B8EC00F91463 /* CompileUnit.cpp */; };
-		AFD966B8217140B6006714AC /* CompileUnitIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFD966B4217140B5006714AC /* CompileUnitIndex.cpp */; };
-		265192C61BA8E905002F08F6 /* CompilerDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 265192C51BA8E905002F08F6 /* CompilerDecl.cpp */; };
-		2657AFB71B86910100958979 /* CompilerDeclContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2657AFB61B86910100958979 /* CompilerDeclContext.cpp */; };
-		268900D213353E6F00698AC0 /* CompilerType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E45FAD11F660FE008F7B28 /* CompilerType.cpp */; };
-		58EC744120EAEB5200695209 /* CompletionRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 58EC744020EAEB5200695209 /* CompletionRequest.cpp */; };
-		4C639ED721FA684900A7B957 /* CompletionRequestTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC921FA684800A7B957 /* CompletionRequestTest.cpp */; };
-		2689003313353E0400698AC0 /* Connection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E6F10F1B85900F91463 /* Connection.cpp */; };
-		AFDFDFD119E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFDFDFD019E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp */; };
-		26764C971E48F482008D3573 /* ConstString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26764C961E48F482008D3573 /* ConstString.cpp */; };
-		9A3D43D61F3151C400EB767C /* ConstStringTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43C81F3150D200EB767C /* ConstStringTest.cpp */; };
-		2668022F115FD19D008E1FE4 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C39010F3FA26009D5894 /* CoreFoundation.framework */; };
-		949EEDA01BA74B6D008C63CF /* CoreMedia.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EED9E1BA74B64008C63CF /* CoreMedia.cpp */; };
-		DDB5829C2278C8D700491B41 /* CxxModuleHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DDB5829B2278C8D600491B41 /* CxxModuleHandler.cpp */; };
-		945261BF1B9A11FC00BF138D /* CxxStringTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B31B9A11E800BF138D /* CxxStringTypes.cpp */; };
-		6D95DC001B9DC057000E318A /* DIERef.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D95DBFD1B9DC057000E318A /* DIERef.cpp */; };
-		269DDD4A1B8FD1C300D0DBD8 /* DWARFASTParserClang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 269DDD481B8FD1C300D0DBD8 /* DWARFASTParserClang.cpp */; };
-		268900B713353E5F00698AC0 /* DWARFAbbreviationDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89B310F57C5600BB2B04 /* DWARFAbbreviationDeclaration.cpp */; };
-		266E829D1B8E542C008FCA06 /* DWARFAttribute.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266E829C1B8E542C008FCA06 /* DWARFAttribute.cpp */; };
-		4CD44D4220B777850003557C /* DWARFBaseDIE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD44D4020B777850003557C /* DWARFBaseDIE.cpp */; };
-		268900D713353E6F00698AC0 /* DWARFCallFrameInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1710F1B8EC00F91463 /* DWARFCallFrameInfo.cpp */; };
-		268900B813353E5F00698AC0 /* DWARFCompileUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89B710F57C5600BB2B04 /* DWARFCompileUnit.cpp */; };
-		AF5B97DB2242FC2F002D3F2C /* DWARFContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF5B97D92242FC27002D3F2C /* DWARFContext.cpp */; };
-		266E82971B8CE3AC008FCA06 /* DWARFDIE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266E82961B8CE3AC008FCA06 /* DWARFDIE.cpp */; };
-		26AB92121819D74600E63F3E /* DWARFDataExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26AB92101819D74600E63F3E /* DWARFDataExtractor.cpp */; };
-		268900B913353E5F00698AC0 /* DWARFDebugAbbrev.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89B910F57C5600BB2B04 /* DWARFDebugAbbrev.cpp */; };
-		268900BB13353E5F00698AC0 /* DWARFDebugArangeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89BD10F57C5600BB2B04 /* DWARFDebugArangeSet.cpp */; };
-		268900BA13353E5F00698AC0 /* DWARFDebugAranges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89BB10F57C5600BB2B04 /* DWARFDebugAranges.cpp */; };
-		268900BC13353E5F00698AC0 /* DWARFDebugInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89BF10F57C5600BB2B04 /* DWARFDebugInfo.cpp */; };
-		268900BD13353E5F00698AC0 /* DWARFDebugInfoEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89C110F57C5600BB2B04 /* DWARFDebugInfoEntry.cpp */; };
-		268900BE13353E5F00698AC0 /* DWARFDebugLine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89C310F57C5600BB2B04 /* DWARFDebugLine.cpp */; };
-		23D4007D1C2101F2000C3885 /* DWARFDebugMacro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E77CD61C20F29F007192AD /* DWARFDebugMacro.cpp */; };
-		268900C313353E5F00698AC0 /* DWARFDebugRanges.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89CD10F57C5600BB2B04 /* DWARFDebugRanges.cpp */; };
-		26B1EFAE154638AF00E2DAC7 /* DWARFDeclContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B1EFAC154638AF00E2DAC7 /* DWARFDeclContext.cpp */; };
-		268900C413353E5F00698AC0 /* DWARFDefines.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89CF10F57C5600BB2B04 /* DWARFDefines.cpp */; };
-		2689006613353E0E00698AC0 /* DWARFExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7ED810F1B86700F91463 /* DWARFExpression.cpp */; };
-		268900C613353E5F00698AC0 /* DWARFFormValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89D310F57C5600BB2B04 /* DWARFFormValue.cpp */; };
-		4CD44CFB20B37C440003557C /* DWARFIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD44CF820B37C440003557C /* DWARFIndex.cpp */; };
-		4C38996421B9AECD002BAEF4 /* DWARFLocationExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C38996221B9AECC002BAEF4 /* DWARFLocationExpression.cpp */; };
-		4C645D0822961B3C00D3C034 /* DWARFTypeUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C645D022295D3B500D3C034 /* DWARFTypeUnit.cpp */; };
-		AFE228832060699D0042D0C8 /* DWARFUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */; };
-		26FFC19B14FC072100087D58 /* DYLDRendezvous.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FFC19514FC072100087D58 /* DYLDRendezvous.cpp */; };
-		49CA96FC1E6AACC900C03FEE /* DataBufferHeap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49CA96E61E6AAC6600C03FEE /* DataBufferHeap.cpp */; };
-		49CA96FD1E6AACC900C03FEE /* DataBufferLLVM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49CA96E71E6AAC6600C03FEE /* DataBufferLLVM.cpp */; };
-		49CA96FE1E6AACC900C03FEE /* DataEncoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49CA96E81E6AAC6600C03FEE /* DataEncoder.cpp */; };
-		49CA96FF1E6AACC900C03FEE /* DataExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49CA96E91E6AAC6600C03FEE /* DataExtractor.cpp */; };
-		AFA1B62C219E0ED900A8AB7E /* DataExtractorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFA1B62B219E0ED900A8AB7E /* DataExtractorTest.cpp */; };
-		94CB255C16B069770059775D /* DataVisualization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB255816B069770059775D /* DataVisualization.cpp */; };
-		23D4007E1C210201000C3885 /* DebugMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E77CDB1C20F2F2007192AD /* DebugMacros.cpp */; };
-		AF116BEF20CF234B0071093F /* DebugNamesDWARFIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF116BED20CF234B0071093F /* DebugNamesDWARFIndex.cpp */; };
-		2689003913353E0400698AC0 /* Debugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263664921140A4930075843B /* Debugger.cpp */; };
-		AF1675A922CC1A3C00DC40ED /* DeclVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF1675A822CC1A3C00DC40ED /* DeclVendor.cpp */; };
-		268900D613353E6F00698AC0 /* Declaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1610F1B8EC00F91463 /* Declaration.cpp */; };
-		49E4F66B1C9CAD16008487EA /* DiagnosticManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49E4F6681C9CAD12008487EA /* DiagnosticManager.cpp */; };
-		2689003A13353E0400698AC0 /* Disassembler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7610F1B85900F91463 /* Disassembler.cpp */; };
-		B299580B14F2FA1400050A04 /* DisassemblerLLVMC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B299580A14F2FA1400050A04 /* DisassemblerLLVMC.cpp */; };
-		2579065F1BD0488D00178368 /* DomainSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2579065E1BD0488D00178368 /* DomainSocket.cpp */; };
-		26F5C27710F3D9E4009D5894 /* Driver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F5C27310F3D9E4009D5894 /* Driver.cpp */; };
-		4C4EB7811E6A4DCC002035C0 /* DumpDataExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C4EB77F1E6A4DB8002035C0 /* DumpDataExtractor.cpp */; };
-		AFA585D02107EB7400D7689A /* DumpRegisterValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFA585CF2107EB7300D7689A /* DumpRegisterValue.cpp */; };
-		9447DE431BD5963300E67212 /* DumpValueObjectOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9447DE421BD5963300E67212 /* DumpValueObjectOptions.cpp */; };
-		268900EA13353E6F00698AC0 /* DynamicLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7710F1B85900F91463 /* DynamicLoader.cpp */; };
-		AF27AD551D3603EA00CF2833 /* DynamicLoaderDarwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF27AD531D3603EA00CF2833 /* DynamicLoaderDarwin.cpp */; };
-		AF27AD561D3603EA00CF2833 /* DynamicLoaderDarwin.h in Headers */ = {isa = PBXBuildFile; fileRef = AF27AD541D3603EA00CF2833 /* DynamicLoaderDarwin.h */; };
-		26274FA714030F79006BA130 /* DynamicLoaderDarwinKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26274FA514030F79006BA130 /* DynamicLoaderDarwinKernel.cpp */; };
-		2666ADC61B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2666ADC11B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.cpp */; };
-		AF2907BF1D3F082400E10654 /* DynamicLoaderMacOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2907BD1D3F082400E10654 /* DynamicLoaderMacOS.cpp */; };
-		2689008D13353E4200698AC0 /* DynamicLoaderMacOSXDYLD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C897A10F57C5600BB2B04 /* DynamicLoaderMacOSXDYLD.cpp */; };
-		26FFC19D14FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FFC19714FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp */; };
-		2689008E13353E4200698AC0 /* DynamicLoaderStatic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 268A683D1321B53B000E3FB8 /* DynamicLoaderStatic.cpp */; };
-		26F006561B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F006541B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp */; };
-		26954EBE1401EE8B00294D09 /* DynamicRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26954EBC1401EE8B00294D09 /* DynamicRegisterInfo.cpp */; };
-		2689009813353E4200698AC0 /* ELFHeader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D27C9D11ED3A4E0024D721 /* ELFHeader.cpp */; };
-		26CFDCA3186163A4000E63E5 /* Editline.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CFDCA2186163A4000E63E5 /* Editline.cpp */; };
-		23CB15471D66DA9300EDDDE1 /* EditlineTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2326CF511BDD693B00A5CEAC /* EditlineTest.cpp */; };
-		2689003B13353E0400698AC0 /* EmulateInstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D9FDC812F784FD0003F2EE /* EmulateInstruction.cpp */; };
-		9A22A161135E30370024DDC3 /* EmulateInstructionARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A22A15D135E30370024DDC3 /* EmulateInstructionARM.cpp */; };
-		264A12FC1372522000875C42 /* EmulateInstructionARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264A12FA1372522000875C42 /* EmulateInstructionARM64.cpp */; };
-		E778E9A21B062D1700247609 /* EmulateInstructionMIPS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E778E99F1B062D1700247609 /* EmulateInstructionMIPS.cpp */; };
-		94A5B3971AB9FE8D00A5EE7F /* EmulateInstructionMIPS64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94A5B3951AB9FE8300A5EE7F /* EmulateInstructionMIPS64.cpp */; };
-		AFDBC36E204663AF00B9C8F2 /* EmulateInstructionPPC64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFDBC36C204663AF00B9C8F2 /* EmulateInstructionPPC64.cpp */; };
-		9A22A163135E30370024DDC3 /* EmulationStateARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A22A15F135E30370024DDC3 /* EmulationStateARM.cpp */; };
-		6B74D89B200696BB0074051B /* Environment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 22DC561920064C9600A7E9E8 /* Environment.cpp */; };
-		4C639ECB21FA684900A7B957 /* EnvironmentTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EBD21FA684600A7B957 /* EnvironmentTest.cpp */; };
-		2647B63C21C436B400A81D15 /* Event.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2647B63B21C436B400A81D15 /* Event.cpp */; };
-		2647B63421C4367A00A81D15 /* Event.h in Headers */ = {isa = PBXBuildFile; fileRef = 2647B63321C4367A00A81D15 /* Event.h */; };
-		4C639ED321FA684900A7B957 /* EventTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC521FA684800A7B957 /* EventTest.cpp */; };
-		2660387A211CA90F00329572 /* ExceptionBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26603874211CA90E00329572 /* ExceptionBreakpoint.cpp */; };
-		268900EB13353E6F00698AC0 /* ExecutionContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3510F1B90C00F91463 /* ExecutionContext.cpp */; };
-		4C88BC2A1BA3722B00AA0964 /* Expression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C88BC291BA3722B00AA0964 /* Expression.cpp */; };
-		4984BA161B979973008658D4 /* ExpressionVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4984BA151B979973008658D4 /* ExpressionVariable.cpp */; };
-		4984BA181B979C08008658D4 /* ExpressionVariable.h in Headers */ = {isa = PBXBuildFile; fileRef = 4984BA171B979C08008658D4 /* ExpressionVariable.h */; };
-		2689006E13353E1A00698AC0 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C6EA213011581005E16B0 /* File.cpp */; };
-		3FDFDDBD199C3A06009756A7 /* FileAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFDDBC199C3A06009756A7 /* FileAction.cpp */; };
-		3FDFDDBF199D345E009756A7 /* FileCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFDDBE199D345E009756A7 /* FileCache.cpp */; };
-		DD8F277F22011CD8004ED75B /* FileCollector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD8F277D22011CC9004ED75B /* FileCollector.cpp */; };
-		DD8F278222011D15004ED75B /* FileCollectorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD8F278022011D0F004ED75B /* FileCollectorTest.cpp */; };
-		26BD407F135D2AE000237D80 /* FileLineResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BD407E135D2ADF00237D80 /* FileLineResolver.cpp */; };
-		2689006F13353E1A00698AC0 /* FileSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FA43171301048600E71120 /* FileSpec.cpp */; };
-		2689003E13353E0400698AC0 /* FileSpecList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */; };
-		23CB15361D66DA9300EDDDE1 /* FileSpecTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB14FD1D66CD2400EDDDE1 /* FileSpecTest.cpp */; };
-		250D6AE31A9679440049CC70 /* FileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 250D6AE11A9679270049CC70 /* FileSystem.cpp */; };
-		3FDFDDC6199D37ED009756A7 /* FileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFDDC5199D37ED009756A7 /* FileSystem.cpp */; };
-		9A2057381F3B8E7E00F6C293 /* FileSystemTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A20572E1F3B8E7600F6C293 /* FileSystemTest.cpp */; };
-		4C639ED621FA684900A7B957 /* FlagsTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC821FA684800A7B957 /* FlagsTest.cpp */; };
-		94CB257416B1D3880059775D /* FormatCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB257316B1D3870059775D /* FormatCache.cpp */; };
-		94CB255D16B069770059775D /* FormatClasses.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB255916B069770059775D /* FormatClasses.cpp */; };
-		263FDE601A79A01500E68013 /* FormatEntity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263FDE5F1A79A01500E68013 /* FormatEntity.cpp */; };
-		94CB255E16B069770059775D /* FormatManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB255A16B069770059775D /* FormatManager.cpp */; };
-		94D0858C1B9675B8000D24BD /* FormattersHelpers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94D0858B1B9675B8000D24BD /* FormattersHelpers.cpp */; };
-		AF23B4DB19009C66003E2A58 /* FreeBSDSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp */; };
-		268900D913353E6F00698AC0 /* FuncUnwinders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 961FABB81235DE1600F93A47 /* FuncUnwinders.cpp */; };
-		268900D813353E6F00698AC0 /* Function.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1810F1B8EC00F91463 /* Function.cpp */; };
-		2660387C211CA90F00329572 /* FunctionBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26603877211CA90E00329572 /* FunctionBreakpoint.cpp */; };
-		4C2479BD1BA39295009C9A7B /* FunctionCaller.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0083321B9A5DE200D5CF24 /* FunctionCaller.cpp */; };
-		2374D7531D4BB2FF005C9575 /* GDBRemoteClientBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2374D74E1D4BB299005C9575 /* GDBRemoteClientBase.cpp */; };
-		23CB153A1D66DA9300EDDDE1 /* GDBRemoteClientBaseTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2370A37D1D66C587000E7BE6 /* GDBRemoteClientBaseTest.cpp */; };
-		2689009D13353E4200698AC0 /* GDBRemoteCommunication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE5B1315B29C001D6D71 /* GDBRemoteCommunication.cpp */; };
-		26744EF11338317700EF765A /* GDBRemoteCommunicationClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26744EED1338317700EF765A /* GDBRemoteCommunicationClient.cpp */; };
-		23CB153D1D66DA9300EDDDE1 /* GDBRemoteCommunicationClientTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2370A37E1D66C587000E7BE6 /* GDBRemoteCommunicationClientTest.cpp */; };
-		AF8AD945219CD45800614785 /* GDBRemoteCommunicationHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF8AD943219CD45700614785 /* GDBRemoteCommunicationHistory.cpp */; };
-		AFCB1D59219CD4FD00730AD5 /* GDBRemoteCommunicationReplayServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFCB1D57219CD4FD00730AD5 /* GDBRemoteCommunicationReplayServer.cpp */; };
-		26744EF31338317700EF765A /* GDBRemoteCommunicationServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26744EEF1338317700EF765A /* GDBRemoteCommunicationServer.cpp */; };
-		6D55B2901A8A806200A70529 /* GDBRemoteCommunicationServerCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55B28D1A8A806200A70529 /* GDBRemoteCommunicationServerCommon.cpp */; };
-		6D55B2911A8A806200A70529 /* GDBRemoteCommunicationServerLLGS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55B28E1A8A806200A70529 /* GDBRemoteCommunicationServerLLGS.cpp */; };
-		6D55B2921A8A806200A70529 /* GDBRemoteCommunicationServerPlatform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55B28F1A8A806200A70529 /* GDBRemoteCommunicationServerPlatform.cpp */; };
-		2689009E13353E4200698AC0 /* GDBRemoteRegisterContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE5D1315B29C001D6D71 /* GDBRemoteRegisterContext.cpp */; };
-		E7E94ABC1B54961F00D0AE30 /* GDBRemoteSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E73A15A41B548EC500786197 /* GDBRemoteSignals.cpp */; };
-		23CB15461D66DA9300EDDDE1 /* GDBRemoteTestUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2370A37F1D66C587000E7BE6 /* GDBRemoteTestUtils.cpp */; };
-		6D95DC011B9DC057000E318A /* HashedNameToDIE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D95DBFE1B9DC057000E318A /* HashedNameToDIE.cpp */; };
-		2666ADC81B3CB675001FAFD3 /* HexagonDYLDRendezvous.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2666ADC31B3CB675001FAFD3 /* HexagonDYLDRendezvous.cpp */; };
-		58A080B42112AB3800D5580F /* Highlighter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 58A080A92112AA9400D5580F /* Highlighter.cpp */; };
-		58A080B32112AB2900D5580F /* HighlighterTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 58A080B12112AB2200D5580F /* HighlighterTest.cpp */; };
-		AF1729D6182C907200E0AB97 /* HistoryThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF1729D4182C907200E0AB97 /* HistoryThread.cpp */; };
-		AF1729D7182C907200E0AB97 /* HistoryUnwind.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF1729D5182C907200E0AB97 /* HistoryUnwind.cpp */; };
-		2689007113353E1A00698AC0 /* Host.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 69A01E1C1236C5D400C660B5 /* Host.cpp */; };
-		AFF81FB020D1CC400010F95E /* Host.mm in Sources */ = {isa = PBXBuildFile; fileRef = AFF81FAD20D1CC400010F95E /* Host.mm */; };
-		3FDFE53519A29327009756A7 /* HostInfoBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFE53419A29327009756A7 /* HostInfoBase.cpp */; };
-		AFF81FAE20D1CC400010F95E /* HostInfoMacOSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = AFF81FAB20D1CC400010F95E /* HostInfoMacOSX.mm */; };
-		3FDFE53119A292F0009756A7 /* HostInfoPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFE53019A292F0009756A7 /* HostInfoPosix.cpp */; };
-		3FDFED2719BA6D96009756A7 /* HostNativeThreadBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFED2419BA6D96009756A7 /* HostNativeThreadBase.cpp */; };
-		3FDFED2D19C257A0009756A7 /* HostProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFED2C19C257A0009756A7 /* HostProcess.cpp */; };
-		3FDFE56C19AF9C44009756A7 /* HostProcessPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFE56A19AF9C44009756A7 /* HostProcessPosix.cpp */; };
-		9A2057391F3B8E7E00F6C293 /* HostTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A20572F1F3B8E7600F6C293 /* HostTest.cpp */; };
-		3FDFED2819BA6D96009756A7 /* HostThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFED2519BA6D96009756A7 /* HostThread.cpp */; };
-		AFF81FAF20D1CC400010F95E /* HostThreadMacOSX.mm in Sources */ = {isa = PBXBuildFile; fileRef = AFF81FAC20D1CC400010F95E /* HostThreadMacOSX.mm */; };
-		3FDFE56D19AF9C44009756A7 /* HostThreadPosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFE56B19AF9C44009756A7 /* HostThreadPosix.cpp */; };
-		260A63191861009E00FECF8E /* IOHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260A63181861009E00FECF8E /* IOHandler.cpp */; };
-		260A63171861008E00FECF8E /* IOHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 260A63161861008E00FECF8E /* IOHandler.h */; };
-		236124A41986B4E2004EFC37 /* IOObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 236124A21986B4E2004EFC37 /* IOObject.cpp */; };
-		2689006D13353E0E00698AC0 /* IRExecutionUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C98D3DB118FB96F00E575D0 /* IRExecutionUnit.cpp */; };
-		2689006B13353E0E00698AC0 /* IRForTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49307AAD11DEA4D90081F992 /* IRForTarget.cpp */; };
-		49A71FE7141FFA5C00D59478 /* IRInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 496B01581406DE8900F830D5 /* IRInterpreter.cpp */; };
-		49DCF6FE170E6B4A0092F75E /* IRMemoryMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DCF6FD170E6B4A0092F75E /* IRMemoryMap.cpp */; };
-		B28058A1139988B0002D96D0 /* InferiorCallPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B28058A0139988B0002D96D0 /* InferiorCallPOSIX.cpp */; };
-		8CF02AE919DCC01900B14BE0 /* InstrumentationRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF02ADF19DCBF3B00B14BE0 /* InstrumentationRuntime.cpp */; };
-		8CF02AEF19DD16B100B14BE0 /* InstrumentationRuntimeStopInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF02AED19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.cpp */; };
-		4CCA644D13B40B82003BDF98 /* ItaniumABILanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CCA643D13B40B82003BDF98 /* ItaniumABILanguageRuntime.cpp */; };
-		26BC179918C7F2B300D2196D /* JITLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC179718C7F2B300D2196D /* JITLoader.cpp */; };
-		AF2BCA6C18C7EFDE005B4526 /* JITLoaderGDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2BCA6918C7EFDE005B4526 /* JITLoaderGDB.cpp */; };
-		26BC179A18C7F2B300D2196D /* JITLoaderList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC179818C7F2B300D2196D /* JITLoaderList.cpp */; };
-		942829561A89614C00521B30 /* JSON.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942829551A89614C00521B30 /* JSON.cpp */; };
-		8C3BD9A01EF5D1FF0016C343 /* JSONTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C3BD99F1EF5D1B50016C343 /* JSONTest.cpp */; };
-		2660387B211CA90F00329572 /* JSONUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26603875211CA90E00329572 /* JSONUtils.cpp */; };
-		2668035C11601108008E1FE4 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26680207115FD0ED008E1FE4 /* LLDB.framework */; };
-		2669424D1A6DC32B0063BE93 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26680207115FD0ED008E1FE4 /* LLDB.framework */; };
-		26792623211CA42300EE1D10 /* LLDB.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26680207115FD0ED008E1FE4 /* LLDB.framework */; };
-		26B42C4D1187ABA50079C8C8 /* LLDB.h in Headers */ = {isa = PBXBuildFile; fileRef = 26B42C4C1187ABA50079C8C8 /* LLDB.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		943BDEFE1AA7B2F800789CE8 /* LLDBAssert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 943BDEFD1AA7B2F800789CE8 /* LLDBAssert.cpp */; };
-		6D762BEE1B1605D2006C929D /* LLDBServerUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D762BEC1B1605CD006C929D /* LLDBServerUtilities.cpp */; };
-		26F7619B211CBBB30044F6EA /* LLDBUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F76199211CBBB30044F6EA /* LLDBUtils.cpp */; };
-		2660AAB914622483003A9694 /* LLDBWrapPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A4EEB511682AAC007A372A /* LLDBWrapPython.cpp */; settings = {COMPILER_FLAGS = "-Dregister="; }; };
-		AEB0E4591BD6E9F800B24093 /* LLVMUserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEB0E4581BD6E9F800B24093 /* LLVMUserExpression.cpp */; };
-		94B638531B8F8E6C004FE1E4 /* Language.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B638521B8F8E6C004FE1E4 /* Language.cpp */; };
-		942612F71B95000000EF842E /* LanguageCategory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 942612F61B95000000EF842E /* LanguageCategory.cpp */; };
-		268900EC13353E6F00698AC0 /* LanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CB4430A12491DDA00C13DC2 /* LanguageRuntime.cpp */; };
-		945261C01B9A11FC00BF138D /* LibCxx.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B51B9A11E800BF138D /* LibCxx.cpp */; };
-		9428BC2C1C6E64E4002A24D7 /* LibCxxAtomic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9428BC291C6E64DC002A24D7 /* LibCxxAtomic.cpp */; };
-		AFC67B151FBBB03600860ECB /* LibCxxBitset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC67B141FBBB03500860ECB /* LibCxxBitset.cpp */; };
-		945261C11B9A11FC00BF138D /* LibCxxInitializerList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */; };
-		945261C21B9A11FC00BF138D /* LibCxxList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B81B9A11E800BF138D /* LibCxxList.cpp */; };
-		945261C31B9A11FC00BF138D /* LibCxxMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261B91B9A11E800BF138D /* LibCxxMap.cpp */; };
-		E4A63A9120F55D28000D9548 /* LibCxxOptional.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4A63A9020F55D27000D9548 /* LibCxxOptional.cpp */; };
-		AF9FF1F71FAA79FE00474976 /* LibCxxQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */; };
-		AF9FF1F51FAA79A400474976 /* LibCxxTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */; };
-		945261C41B9A11FC00BF138D /* LibCxxUnorderedMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */; };
-		E414F6F121388F6C00C50BC6 /* LibCxxVariant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E414F6F021388F6B00C50BC6 /* LibCxxVariant.cpp */; };
-		E414F6EE21388F0300C50BC6 /* LibCxxVariant.h in Headers */ = {isa = PBXBuildFile; fileRef = E414F6ED21388F0200C50BC6 /* LibCxxVariant.h */; };
-		945261C51B9A11FC00BF138D /* LibCxxVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261BB1B9A11E800BF138D /* LibCxxVector.cpp */; };
-		945261C61B9A11FC00BF138D /* LibStdcpp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945261BC1B9A11E800BF138D /* LibStdcpp.cpp */; };
-		4CDB8D6E1DBA91B6006C5B13 /* LibStdcppTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CDB8D681DBA91A6006C5B13 /* LibStdcppTuple.cpp */; };
-		4CDB8D6D1DBA91B6006C5B13 /* LibStdcppUniquePointer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CDB8D671DBA91A6006C5B13 /* LibStdcppUniquePointer.cpp */; };
-		268900DA13353E6F00698AC0 /* LineEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1910F1B8EC00F91463 /* LineEntry.cpp */; };
-		268900DB13353E6F00698AC0 /* LineTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1A10F1B8EC00F91463 /* LineTable.cpp */; };
-		2647B64421C43BB000A81D15 /* LinuxProcMaps.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2647B64221C43BB000A81D15 /* LinuxProcMaps.cpp */; };
-		2647B64321C43BB000A81D15 /* LinuxProcMaps.h in Headers */ = {isa = PBXBuildFile; fileRef = 2647B64121C43BAF00A81D15 /* LinuxProcMaps.h */; };
-		23059A0719532B96007B8189 /* LinuxSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23059A0519532B96007B8189 /* LinuxSignals.cpp */; };
-		2647B63E21C436BD00A81D15 /* Listener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2647B63D21C436BC00A81D15 /* Listener.cpp */; };
-		2647B63821C4369500A81D15 /* Listener.h in Headers */ = {isa = PBXBuildFile; fileRef = 2647B63721C4369500A81D15 /* Listener.h */; };
-		9A3D43EC1F3237F900EB767C /* ListenerTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43E31F3237D500EB767C /* ListenerTest.cpp */; };
-		AFF1273622276F1600C25726 /* LocateSymbolFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFF1273422276F1100C25726 /* LocateSymbolFile.cpp */; };
-		AFC3068122276F62002675EA /* LocateSymbolFileMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC3068022276F62002675EA /* LocateSymbolFileMacOSX.cpp */; };
-		AFB4C8142228A7B40018086A /* LocateSymbolFileTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFB4C8122228A7AE0018086A /* LocateSymbolFileTest.cpp */; };
-		255EFF741AFABA720069F277 /* LockFileBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 255EFF731AFABA720069F277 /* LockFileBase.cpp */; };
-		255EFF761AFABA950069F277 /* LockFilePosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 255EFF751AFABA950069F277 /* LockFilePosix.cpp */; };
-		2689004213353E0400698AC0 /* Log.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7F10F1B85900F91463 /* Log.cpp */; };
-		268900CB13353E5F00698AC0 /* LogChannelDWARF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26109B3B1155D70100CC3529 /* LogChannelDWARF.cpp */; };
-		9A3D43D71F3151C400EB767C /* LogTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43C71F3150D200EB767C /* LogTest.cpp */; };
-		3F8160A61AB9F7DD001DA9DF /* Logging.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F8160A51AB9F7DD001DA9DF /* Logging.cpp */; };
-		266942001A6DC2AC0063BE93 /* MICmdArgContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941601A6DC2AB0063BE93 /* MICmdArgContext.cpp */; };
-		266942011A6DC2AC0063BE93 /* MICmdArgSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941621A6DC2AB0063BE93 /* MICmdArgSet.cpp */; };
-		266942021A6DC2AC0063BE93 /* MICmdArgValBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941641A6DC2AB0063BE93 /* MICmdArgValBase.cpp */; };
-		266942031A6DC2AC0063BE93 /* MICmdArgValConsume.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941661A6DC2AB0063BE93 /* MICmdArgValConsume.cpp */; };
-		266942041A6DC2AC0063BE93 /* MICmdArgValFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941681A6DC2AB0063BE93 /* MICmdArgValFile.cpp */; };
-		266942051A6DC2AC0063BE93 /* MICmdArgValListBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669416A1A6DC2AC0063BE93 /* MICmdArgValListBase.cpp */; };
-		266942061A6DC2AC0063BE93 /* MICmdArgValListOfN.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669416C1A6DC2AC0063BE93 /* MICmdArgValListOfN.cpp */; };
-		266942071A6DC2AC0063BE93 /* MICmdArgValNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669416E1A6DC2AC0063BE93 /* MICmdArgValNumber.cpp */; };
-		266942081A6DC2AC0063BE93 /* MICmdArgValOptionLong.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941701A6DC2AC0063BE93 /* MICmdArgValOptionLong.cpp */; };
-		266942091A6DC2AC0063BE93 /* MICmdArgValOptionShort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941721A6DC2AC0063BE93 /* MICmdArgValOptionShort.cpp */; };
-		267DFB461B06752A00000FB7 /* MICmdArgValPrintValues.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267DFB441B06752A00000FB7 /* MICmdArgValPrintValues.cpp */; };
-		2669420A1A6DC2AC0063BE93 /* MICmdArgValString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941741A6DC2AC0063BE93 /* MICmdArgValString.cpp */; };
-		2669420B1A6DC2AC0063BE93 /* MICmdArgValThreadGrp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941761A6DC2AC0063BE93 /* MICmdArgValThreadGrp.cpp */; };
-		2669420C1A6DC2AC0063BE93 /* MICmdBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941781A6DC2AC0063BE93 /* MICmdBase.cpp */; };
-		2669420D1A6DC2AC0063BE93 /* MICmdCmd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669417A1A6DC2AC0063BE93 /* MICmdCmd.cpp */; };
-		2669420E1A6DC2AC0063BE93 /* MICmdCmdBreak.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669417C1A6DC2AC0063BE93 /* MICmdCmdBreak.cpp */; };
-		2669420F1A6DC2AC0063BE93 /* MICmdCmdData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669417E1A6DC2AC0063BE93 /* MICmdCmdData.cpp */; };
-		266942101A6DC2AC0063BE93 /* MICmdCmdEnviro.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941801A6DC2AC0063BE93 /* MICmdCmdEnviro.cpp */; };
-		266942111A6DC2AC0063BE93 /* MICmdCmdExec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941821A6DC2AC0063BE93 /* MICmdCmdExec.cpp */; };
-		266942121A6DC2AC0063BE93 /* MICmdCmdFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941841A6DC2AC0063BE93 /* MICmdCmdFile.cpp */; };
-		266942131A6DC2AC0063BE93 /* MICmdCmdGdbInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941861A6DC2AC0063BE93 /* MICmdCmdGdbInfo.cpp */; };
-		266942141A6DC2AC0063BE93 /* MICmdCmdGdbSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941881A6DC2AC0063BE93 /* MICmdCmdGdbSet.cpp */; };
-		AFB3D2801AC262AB003B4B30 /* MICmdCmdGdbShow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFB3D27E1AC262AB003B4B30 /* MICmdCmdGdbShow.cpp */; };
-		266942151A6DC2AC0063BE93 /* MICmdCmdGdbThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669418A1A6DC2AC0063BE93 /* MICmdCmdGdbThread.cpp */; };
-		266942161A6DC2AC0063BE93 /* MICmdCmdMiscellanous.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669418C1A6DC2AC0063BE93 /* MICmdCmdMiscellanous.cpp */; };
-		266942171A6DC2AC0063BE93 /* MICmdCmdStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669418E1A6DC2AC0063BE93 /* MICmdCmdStack.cpp */; };
-		266942181A6DC2AC0063BE93 /* MICmdCmdSupportInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941901A6DC2AC0063BE93 /* MICmdCmdSupportInfo.cpp */; };
-		266942191A6DC2AC0063BE93 /* MICmdCmdSupportList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941921A6DC2AC0063BE93 /* MICmdCmdSupportList.cpp */; };
-		26D52C1F1A980FE300E5D2FB /* MICmdCmdSymbol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D52C1D1A980FE300E5D2FB /* MICmdCmdSymbol.cpp */; };
-		2669421A1A6DC2AC0063BE93 /* MICmdCmdTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941941A6DC2AC0063BE93 /* MICmdCmdTarget.cpp */; };
-		2669421B1A6DC2AC0063BE93 /* MICmdCmdThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941961A6DC2AC0063BE93 /* MICmdCmdThread.cpp */; };
-		2669421C1A6DC2AC0063BE93 /* MICmdCmdTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941981A6DC2AC0063BE93 /* MICmdCmdTrace.cpp */; };
-		2669421D1A6DC2AC0063BE93 /* MICmdCmdVar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669419A1A6DC2AC0063BE93 /* MICmdCmdVar.cpp */; };
-		2669421E1A6DC2AC0063BE93 /* MICmdCommands.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669419C1A6DC2AC0063BE93 /* MICmdCommands.cpp */; };
-		2669421F1A6DC2AC0063BE93 /* MICmdData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2669419E1A6DC2AC0063BE93 /* MICmdData.cpp */; };
-		266942201A6DC2AC0063BE93 /* MICmdFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941A01A6DC2AC0063BE93 /* MICmdFactory.cpp */; };
-		266942211A6DC2AC0063BE93 /* MICmdInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941A21A6DC2AC0063BE93 /* MICmdInterpreter.cpp */; };
-		266942221A6DC2AC0063BE93 /* MICmdInvoker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941A41A6DC2AC0063BE93 /* MICmdInvoker.cpp */; };
-		266942231A6DC2AC0063BE93 /* MICmdMgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941A61A6DC2AC0063BE93 /* MICmdMgr.cpp */; };
-		266942241A6DC2AC0063BE93 /* MICmdMgrSetCmdDeleteCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941A81A6DC2AC0063BE93 /* MICmdMgrSetCmdDeleteCallback.cpp */; };
-		266942251A6DC2AC0063BE93 /* MICmnBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941AA1A6DC2AC0063BE93 /* MICmnBase.cpp */; };
-		266942261A6DC2AC0063BE93 /* MICmnLLDBBroadcaster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941AD1A6DC2AC0063BE93 /* MICmnLLDBBroadcaster.cpp */; };
-		266942291A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941B31A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfo.cpp */; };
-		2669422A1A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfoVarObj.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941B51A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfoVarObj.cpp */; };
-		266942271A6DC2AC0063BE93 /* MICmnLLDBDebugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941AF1A6DC2AC0063BE93 /* MICmnLLDBDebugger.cpp */; };
-		266942281A6DC2AC0063BE93 /* MICmnLLDBDebuggerHandleEvents.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941B11A6DC2AC0063BE93 /* MICmnLLDBDebuggerHandleEvents.cpp */; };
-		2669422B1A6DC2AC0063BE93 /* MICmnLLDBProxySBValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941B71A6DC2AC0063BE93 /* MICmnLLDBProxySBValue.cpp */; };
-		2669422C1A6DC2AC0063BE93 /* MICmnLLDBUtilSBValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941B91A6DC2AC0063BE93 /* MICmnLLDBUtilSBValue.cpp */; };
-		2669422D1A6DC2AC0063BE93 /* MICmnLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941BB1A6DC2AC0063BE93 /* MICmnLog.cpp */; };
-		2669422E1A6DC2AC0063BE93 /* MICmnLogMediumFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941BD1A6DC2AC0063BE93 /* MICmnLogMediumFile.cpp */; };
-		2669422F1A6DC2AC0063BE93 /* MICmnMIOutOfBandRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941BF1A6DC2AC0063BE93 /* MICmnMIOutOfBandRecord.cpp */; };
-		266942301A6DC2AC0063BE93 /* MICmnMIResultRecord.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941C11A6DC2AC0063BE93 /* MICmnMIResultRecord.cpp */; };
-		266942311A6DC2AC0063BE93 /* MICmnMIValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941C31A6DC2AC0063BE93 /* MICmnMIValue.cpp */; };
-		266942321A6DC2AC0063BE93 /* MICmnMIValueConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941C51A6DC2AC0063BE93 /* MICmnMIValueConst.cpp */; };
-		266942331A6DC2AC0063BE93 /* MICmnMIValueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941C71A6DC2AC0063BE93 /* MICmnMIValueList.cpp */; };
-		266942341A6DC2AC0063BE93 /* MICmnMIValueResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941C91A6DC2AC0063BE93 /* MICmnMIValueResult.cpp */; };
-		266942351A6DC2AC0063BE93 /* MICmnMIValueTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941CB1A6DC2AC0063BE93 /* MICmnMIValueTuple.cpp */; };
-		266942361A6DC2AC0063BE93 /* MICmnResources.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941CD1A6DC2AC0063BE93 /* MICmnResources.cpp */; };
-		266942371A6DC2AC0063BE93 /* MICmnStreamStderr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941CF1A6DC2AC0063BE93 /* MICmnStreamStderr.cpp */; };
-		266942381A6DC2AC0063BE93 /* MICmnStreamStdin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941D11A6DC2AC0063BE93 /* MICmnStreamStdin.cpp */; };
-		2669423B1A6DC2AC0063BE93 /* MICmnStreamStdout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941D71A6DC2AC0063BE93 /* MICmnStreamStdout.cpp */; };
-		2669423C1A6DC2AC0063BE93 /* MICmnThreadMgrStd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941D91A6DC2AC0063BE93 /* MICmnThreadMgrStd.cpp */; };
-		2669423D1A6DC2AC0063BE93 /* MIDriver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941DC1A6DC2AC0063BE93 /* MIDriver.cpp */; };
-		2669423E1A6DC2AC0063BE93 /* MIDriverBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941DE1A6DC2AC0063BE93 /* MIDriverBase.cpp */; };
-		2669423F1A6DC2AC0063BE93 /* MIDriverMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941E01A6DC2AC0063BE93 /* MIDriverMain.cpp */; };
-		266942401A6DC2AC0063BE93 /* MIDriverMgr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941E11A6DC2AC0063BE93 /* MIDriverMgr.cpp */; };
-		266942411A6DC2AC0063BE93 /* MIUtilDateTimeStd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941E41A6DC2AC0063BE93 /* MIUtilDateTimeStd.cpp */; };
-		266942421A6DC2AC0063BE93 /* MIUtilDebug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941E61A6DC2AC0063BE93 /* MIUtilDebug.cpp */; };
-		266942431A6DC2AC0063BE93 /* MIUtilFileStd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941E81A6DC2AC0063BE93 /* MIUtilFileStd.cpp */; };
-		266942441A6DC2AC0063BE93 /* MIUtilMapIdToVariant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941EA1A6DC2AC0063BE93 /* MIUtilMapIdToVariant.cpp */; };
-		266942451A6DC2AC0063BE93 /* MIUtilString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941EE1A6DC2AC0063BE93 /* MIUtilString.cpp */; };
-		2669424A1A6DC2AC0063BE93 /* MIUtilThreadBaseStd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941F81A6DC2AC0063BE93 /* MIUtilThreadBaseStd.cpp */; };
-		2669424B1A6DC2AC0063BE93 /* MIUtilVariant.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941FA1A6DC2AC0063BE93 /* MIUtilVariant.cpp */; };
-		AF395C03219254F300894EC3 /* MSVCUndecoratedNameParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF395C01219254F200894EC3 /* MSVCUndecoratedNameParser.cpp */; };
-		D67521381EA17C4200439694 /* MainLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D67521351EA17C3900439694 /* MainLoop.cpp */; };
-		9A20573A1F3B8E7E00F6C293 /* MainLoopTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A2057301F3B8E7600F6C293 /* MainLoopTest.cpp */; };
-		8C3BD9961EF45DA50016C343 /* MainThreadCheckerRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */; };
-		2689004313353E0400698AC0 /* Mangled.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8010F1B85900F91463 /* Mangled.cpp */; };
-		4F29D3CF21010FA3003B549A /* MangledTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4F29D3CD21010F84003B549A /* MangledTest.cpp */; };
-		4CD44CFC20B37C440003557C /* ManualDWARFIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD44CF920B37C440003557C /* ManualDWARFIndex.cpp */; };
-		49DCF702170E70120092F75E /* Materializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49DCF700170E70120092F75E /* Materializer.cpp */; };
-		2690B3711381D5C300ECFBAE /* Memory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2690B3701381D5C300ECFBAE /* Memory.cpp */; };
-		8C2D6A53197A1EAF006989C9 /* MemoryHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */; };
-		8C2D6A5E197A250F006989C9 /* MemoryHistoryASan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */; };
-		9A2057081F3B819100F6C293 /* MemoryRegionInfoTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A2057061F3B818600F6C293 /* MemoryRegionInfoTest.cpp */; };
-		23E2E5441D904913006F38BB /* MinidumpParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E5371D9048FB006F38BB /* MinidumpParser.cpp */; };
-		23E2E5271D903782006F38BB /* MinidumpParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E51A1D9036F2006F38BB /* MinidumpParserTest.cpp */; };
-		23E2E5451D904913006F38BB /* MinidumpTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23E2E5391D9048FB006F38BB /* MinidumpTypes.cpp */; };
-		26B75B441AD6E29A001F7A57 /* MipsLinuxSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B75B421AD6E29A001F7A57 /* MipsLinuxSignals.cpp */; };
-		9A18903B1F47D5E600394BCA /* MockTildeExpressionResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A1890321F47D5D400394BCA /* MockTildeExpressionResolver.cpp */; };
-		2689004413353E0400698AC0 /* Module.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8110F1B85900F91463 /* Module.cpp */; };
-		2654A6801E54D59400DA1013 /* ModuleCache.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2654A67F1E54D59400DA1013 /* ModuleCache.cpp */; };
-		AFAFD80A1E57E1B90017A14F /* ModuleCacheTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp */; };
-		2689004513353E0400698AC0 /* ModuleChild.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8210F1B85900F91463 /* ModuleChild.cpp */; };
-		2689004613353E0400698AC0 /* ModuleList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8310F1B85900F91463 /* ModuleList.cpp */; };
-		949EEDAF1BA76729008C63CF /* NSArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA41BA765B5008C63CF /* NSArray.cpp */; };
-		949EEDB11BA7672D008C63CF /* NSDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA51BA765B5008C63CF /* NSDictionary.cpp */; };
-		9404957A1BEC497E00926025 /* NSError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940495781BEC497E00926025 /* NSError.cpp */; };
-		9404957B1BEC497E00926025 /* NSException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940495791BEC497E00926025 /* NSException.cpp */; };
-		949EEDB21BA76731008C63CF /* NSIndexPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA61BA765B5008C63CF /* NSIndexPath.cpp */; };
-		949EEDB31BA76736008C63CF /* NSSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949EEDA71BA765B5008C63CF /* NSSet.cpp */; };
-		94B9E5121BBF20F4000A48DC /* NSString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B9E5111BBF20F4000A48DC /* NSString.cpp */; };
-		3F81691A1ABA2419001DA9DF /* NameMatches.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F8169181ABA2419001DA9DF /* NameMatches.cpp */; };
-		9A3D43D81F3151C400EB767C /* NameMatchesTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43CB1F3150D200EB767C /* NameMatchesTest.cpp */; };
-		268900C913353E5F00698AC0 /* NameToDIE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618D9EA12406FE600F2B8FE /* NameToDIE.cpp */; };
-		232CB619191E00CD00EF39FC /* NativeProcessProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 232CB60F191E00CC00EF39FC /* NativeProcessProtocol.cpp */; };
-		267A47FB1B1411C40021A5BC /* NativeRegisterContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267A47FA1B1411C40021A5BC /* NativeRegisterContext.cpp */; };
-		23F4034D1926E0F60046DC9B /* NativeRegisterContextRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23F403481926CC250046DC9B /* NativeRegisterContextRegisterInfo.cpp */; };
-		232CB61B191E00CD00EF39FC /* NativeThreadProtocol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 232CB611191E00CC00EF39FC /* NativeThreadProtocol.cpp */; };
-		267A47FF1B1411D90021A5BC /* NativeWatchpointList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267A47FE1B1411D90021A5BC /* NativeWatchpointList.cpp */; };
-		AF33B4BE1C1FA441001B28D9 /* NetBSDSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF33B4BC1C1FA441001B28D9 /* NetBSDSignals.cpp */; };
-		AF33B4BF1C1FA441001B28D9 /* NetBSDSignals.h in Headers */ = {isa = PBXBuildFile; fileRef = AF33B4BD1C1FA441001B28D9 /* NetBSDSignals.h */; };
-		942612F81B952C9B00EF842E /* ObjCLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B6385E1B8FB7A2004FE1E4 /* ObjCLanguage.cpp */; };
-		268900ED13353E6F00698AC0 /* ObjCLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CB443F212499B5000C13DC2 /* ObjCLanguageRuntime.cpp */; };
-		94B638631B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B638621B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp */; };
-		2689009613353E4200698AC0 /* ObjectContainerBSDArchive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A3B4AC1181454800381BC2 /* ObjectContainerBSDArchive.cpp */; };
-		2689009713353E4200698AC0 /* ObjectContainerUniversalMachO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C898010F57C5600BB2B04 /* ObjectContainerUniversalMachO.cpp */; };
-		268900DC13353E6F00698AC0 /* ObjectFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F4C10F1BC1A00F91463 /* ObjectFile.cpp */; };
-		4C9BF11B21C0467700FA4036 /* ObjectFileBreakpad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C9BF11921C0467700FA4036 /* ObjectFileBreakpad.cpp */; };
-		2689009913353E4200698AC0 /* ObjectFileELF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C898510F57C5600BB2B04 /* ObjectFileELF.cpp */; };
-		26EFC4CD18CFAF0D00865D87 /* ObjectFileJIT.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26EFC4CA18CFAF0D00865D87 /* ObjectFileJIT.cpp */; };
-		2689009A13353E4200698AC0 /* ObjectFileMachO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C898810F57C5600BB2B04 /* ObjectFileMachO.cpp */; };
-		26E152261419CAD4007967D0 /* ObjectFilePECOFF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E152231419CACA007967D0 /* ObjectFilePECOFF.cpp */; };
-		26651A18133BF9E0005B64B7 /* Opcode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26651A17133BF9DF005B64B7 /* Opcode.cpp */; };
-		266DFE9713FD656E00D0C574 /* OperatingSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266DFE9613FD656E00D0C574 /* OperatingSystem.cpp */; };
-		2698699B15E6CBD0002415FF /* OperatingSystemPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2698699815E6CBD0002415FF /* OperatingSystemPython.cpp */; };
-		4C719395207D235400FDF430 /* OptionArgParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C719394207D235400FDF430 /* OptionArgParser.cpp */; };
-		26D5E15F135BAEA2006EA0A7 /* OptionGroupArchitecture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D5E15E135BAEA2006EA0A7 /* OptionGroupArchitecture.cpp */; };
-		2686536C1370ACB200D186A3 /* OptionGroupBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2686536B1370ACB200D186A3 /* OptionGroupBoolean.cpp */; };
-		260E07C8136FAB9200CF21D3 /* OptionGroupFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E07C7136FAB9200CF21D3 /* OptionGroupFile.cpp */; };
-		26BCFC521368AE38006DC050 /* OptionGroupFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BCFC511368AE38006DC050 /* OptionGroupFormat.cpp */; };
-		267C01371368C49C006E963E /* OptionGroupOutputFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BCFC531368B3E4006DC050 /* OptionGroupOutputFile.cpp */; };
-		26D5E163135BB054006EA0A7 /* OptionGroupPlatform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D5E162135BB054006EA0A7 /* OptionGroupPlatform.cpp */; };
-		262ED0081631FA3A00879631 /* OptionGroupString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 262ED0071631FA3A00879631 /* OptionGroupString.cpp */; };
-		268653701370AE7200D186A3 /* OptionGroupUInt64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2686536F1370AE7200D186A3 /* OptionGroupUInt64.cpp */; };
-		260E07C6136FA69E00CF21D3 /* OptionGroupUUID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E07C5136FA69E00CF21D3 /* OptionGroupUUID.cpp */; };
-		267C012B136880DF006E963E /* OptionGroupValueObjectDisplay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267C012A136880DF006E963E /* OptionGroupValueObjectDisplay.cpp */; };
-		26ED3D6D13C563810017D45E /* OptionGroupVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26ED3D6C13C563810017D45E /* OptionGroupVariable.cpp */; };
-		B2462247141AD37D00F3D409 /* OptionGroupWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2462246141AD37D00F3D409 /* OptionGroupWatchpoint.cpp */; };
-		A36FF33C17D8E94600244D40 /* OptionParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A36FF33B17D8E94600244D40 /* OptionParser.cpp */; };
-		26A7A035135E6E4200FB369E /* OptionValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A7A034135E6E4200FB369E /* OptionValue.cpp */; };
-		2697A39315E404B1003E682C /* OptionValueArch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2697A39215E404B1003E682C /* OptionValueArch.cpp */; };
-		260CC64815D0440D002BF2E0 /* OptionValueArgs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC63B15D0440D002BF2E0 /* OptionValueArgs.cpp */; };
-		260CC64915D0440D002BF2E0 /* OptionValueArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC63C15D0440D002BF2E0 /* OptionValueArray.cpp */; };
-		260CC64A15D0440D002BF2E0 /* OptionValueBoolean.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC63D15D0440D002BF2E0 /* OptionValueBoolean.cpp */; };
-		25420ECD1A6490B8009ADBCB /* OptionValueChar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 25420ECC1A6490B8009ADBCB /* OptionValueChar.cpp */; };
-		260CC64C15D0440D002BF2E0 /* OptionValueDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC63F15D0440D002BF2E0 /* OptionValueDictionary.cpp */; };
-		260CC64D15D0440D002BF2E0 /* OptionValueEnumeration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC64015D0440D002BF2E0 /* OptionValueEnumeration.cpp */; };
-		260CC64E15D0440D002BF2E0 /* OptionValueFileSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC64115D0440D002BF2E0 /* OptionValueFileSpec.cpp */; };
-		260CC64F15D0440D002BF2E0 /* OptionValueFileSpecLIst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC64215D0440D002BF2E0 /* OptionValueFileSpecLIst.cpp */; };
-		260CC65015D0440D002BF2E0 /* OptionValueFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC64315D0440D002BF2E0 /* OptionValueFormat.cpp */; };
-		264A58EE1A7DBCAD00A6B1B0 /* OptionValueFormatEntity.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264A58ED1A7DBCAD00A6B1B0 /* OptionValueFormatEntity.cpp */; };
-		946216C21A97C080006E19CC /* OptionValueLanguage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 946216C11A97C080006E19CC /* OptionValueLanguage.cpp */; };
-		26DAED6315D327C200E15819 /* OptionValuePathMappings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DAED6215D327C200E15819 /* OptionValuePathMappings.cpp */; };
-		260CC64B15D0440D002BF2E0 /* OptionValueProperties.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC63E15D0440D002BF2E0 /* OptionValueProperties.cpp */; };
-		26491E3E15E1DB9F00CBFFC2 /* OptionValueRegex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26491E3D15E1DB9F00CBFFC2 /* OptionValueRegex.cpp */; };
-		260CC65115D0440D002BF2E0 /* OptionValueSInt64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC64415D0440D002BF2E0 /* OptionValueSInt64.cpp */; };
-		260CC65215D0440D002BF2E0 /* OptionValueString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC64515D0440D002BF2E0 /* OptionValueString.cpp */; };
-		260CC65315D0440D002BF2E0 /* OptionValueUInt64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC64615D0440D002BF2E0 /* OptionValueUInt64.cpp */; };
-		260CC65415D0440D002BF2E0 /* OptionValueUUID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260CC64715D0440D002BF2E0 /* OptionValueUUID.cpp */; };
-		2689008613353E2200698AC0 /* Options.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8610F1B85900F91463 /* Options.cpp */; };
-		4C639ED121FA684900A7B957 /* OptionsWithRawTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC321FA684700A7B957 /* OptionsWithRawTest.cpp */; };
-		4C562CC71CC07DF700C52EAC /* PDBASTParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C562CC21CC07DDD00C52EAC /* PDBASTParser.cpp */; };
-		4CA0C6CC20F929C700CFE6BB /* PDBLocationToDWARFExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CA0C6CA20F929C600CFE6BB /* PDBLocationToDWARFExpression.cpp */; };
-		268900EE13353E6F00698AC0 /* PathMappingList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 495BBACB119A0DBE00418BEA /* PathMappingList.cpp */; };
-		2668A2EE20AF417D00D94111 /* PathMappingListTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2668A2ED20AF417D00D94111 /* PathMappingListTest.cpp */; };
-		AF815DF921C855B400023A34 /* PdbAstBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF815DF721C855B400023A34 /* PdbAstBuilder.cpp */; };
-		5A6424972204D05000C3D9DB /* PdbFPOProgramToDWARFExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5A6424932204D04F00C3D9DB /* PdbFPOProgramToDWARFExpression.cpp */; };
-		5A6424952204D05000C3D9DB /* PdbFPOProgramToDWARFExpression.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A6424912204D04F00C3D9DB /* PdbFPOProgramToDWARFExpression.h */; };
-		AFD966BA217140B6006714AC /* PdbIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFD966B6217140B6006714AC /* PdbIndex.cpp */; };
-		AF0F459E219FA1C800C1E612 /* PdbSymUid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0F459D219FA1C800C1E612 /* PdbSymUid.cpp */; };
-		AFD966B9217140B6006714AC /* PdbUtil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFD966B5217140B6006714AC /* PdbUtil.cpp */; };
-		25420ED21A649D88009ADBCB /* PipeBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 25420ED11A649D88009ADBCB /* PipeBase.cpp */; };
-		2377C2F819E613C100737875 /* PipePosix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2377C2F719E613C100737875 /* PipePosix.cpp */; };
-		268900EF13353E6F00698AC0 /* Platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264A43BD1320BCEB005B4096 /* Platform.cpp */; };
-		6D55BAED1A8CD0A800A70529 /* PlatformAndroid.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55BAE91A8CD08C00A70529 /* PlatformAndroid.cpp */; };
-		6D55BAEE1A8CD0B200A70529 /* PlatformAndroidRemoteGDBServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D55BAEB1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.cpp */; };
-		9455630F1BEAD0600073F75F /* PlatformAppleSimulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9455630A1BEAD0570073F75F /* PlatformAppleSimulator.cpp */; };
-		AF8AD62E1BEC28A400150209 /* PlatformAppleTVSimulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF8AD62A1BEC28A400150209 /* PlatformAppleTVSimulator.cpp */; };
-		AF8AD62F1BEC28A400150209 /* PlatformAppleTVSimulator.h in Headers */ = {isa = PBXBuildFile; fileRef = AF8AD62B1BEC28A400150209 /* PlatformAppleTVSimulator.h */; };
-		AF8AD6301BEC28A400150209 /* PlatformAppleWatchSimulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF8AD62C1BEC28A400150209 /* PlatformAppleWatchSimulator.cpp */; };
-		AF8AD6311BEC28A400150209 /* PlatformAppleWatchSimulator.h in Headers */ = {isa = PBXBuildFile; fileRef = AF8AD62D1BEC28A400150209 /* PlatformAppleWatchSimulator.h */; };
-		2697A54D133A6305004E4240 /* PlatformDarwin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2697A54B133A6305004E4240 /* PlatformDarwin.cpp */; };
-		AF254E31170CCC33007AE5C9 /* PlatformDarwinKernel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF254E2F170CCC33007AE5C9 /* PlatformDarwinKernel.cpp */; };
-		9A20571C1F3B867400F6C293 /* PlatformDarwinTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A20571A1F3B866F00F6C293 /* PlatformDarwinTest.cpp */; };
-		2694E99D14FC0BB30076DE67 /* PlatformFreeBSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2694E99A14FC0BB30076DE67 /* PlatformFreeBSD.cpp */; };
-		2694E9A414FC0BBD0076DE67 /* PlatformLinux.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2694E9A114FC0BBD0076DE67 /* PlatformLinux.cpp */; };
-		2689009B13353E4200698AC0 /* PlatformMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C5577B132575AD008FD8FE /* PlatformMacOSX.cpp */; };
-		26EFB61B1BFE8D3E00544801 /* PlatformNetBSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp */; };
-		26EFB61C1BFE8D3E00544801 /* PlatformNetBSD.h in Headers */ = {isa = PBXBuildFile; fileRef = 26EFB6191BFE8D3E00544801 /* PlatformNetBSD.h */; };
-		4CE4EFAA1E8999B900A80C06 /* PlatformOpenBSD.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4EFA61E8999B000A80C06 /* PlatformOpenBSD.cpp */; };
-		945759671534941F005A9070 /* PlatformPOSIX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945759651534941F005A9070 /* PlatformPOSIX.cpp */; };
-		AF663250216EB9C300BB510D /* PlatformRemoteAppleBridge.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF66324E216EB9C300BB510D /* PlatformRemoteAppleBridge.cpp */; };
-		AF8AD6371BEC28C400150209 /* PlatformRemoteAppleTV.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF8AD6331BEC28C400150209 /* PlatformRemoteAppleTV.cpp */; };
-		AF8AD6381BEC28C400150209 /* PlatformRemoteAppleTV.h in Headers */ = {isa = PBXBuildFile; fileRef = AF8AD6341BEC28C400150209 /* PlatformRemoteAppleTV.h */; };
-		AF8AD6391BEC28C400150209 /* PlatformRemoteAppleWatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF8AD6351BEC28C400150209 /* PlatformRemoteAppleWatch.cpp */; };
-		AF8AD63A1BEC28C400150209 /* PlatformRemoteAppleWatch.h in Headers */ = {isa = PBXBuildFile; fileRef = AF8AD6361BEC28C400150209 /* PlatformRemoteAppleWatch.h */; };
-		AF3A4AD21EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF3A4AD01EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.cpp */; };
-		AF3A4AD31EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = AF3A4AD11EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h */; };
-		264A97BF133918BC0017F0BE /* PlatformRemoteGDBServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264A97BD133918BC0017F0BE /* PlatformRemoteGDBServer.cpp */; };
-		2689009C13353E4200698AC0 /* PlatformRemoteiOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2675F6FE1332BE690067997B /* PlatformRemoteiOS.cpp */; };
-		490A36C0180F0E6F00BA31F8 /* PlatformWindows.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 490A36BD180F0E6F00BA31F8 /* PlatformWindows.cpp */; };
-		26B7564E14F89356008D9CB3 /* PlatformiOSSimulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B7564C14F89356008D9CB3 /* PlatformiOSSimulator.cpp */; };
-		AFF81FB320D1CC910010F95E /* PlatformiOSSimulatorCoreSimulatorSupport.mm in Sources */ = {isa = PBXBuildFile; fileRef = AFF81FB220D1CC910010F95E /* PlatformiOSSimulatorCoreSimulatorSupport.mm */; };
-		2689004713353E0400698AC0 /* PluginManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8A10F1B85900F91463 /* PluginManager.cpp */; };
-		AFC4ADB12270F4C700042167 /* PostfixExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC4ADB02270F4C600042167 /* PostfixExpression.cpp */; };
-		4C639ECE21FA684900A7B957 /* PredicateTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC021FA684700A7B957 /* PredicateTest.cpp */; };
-		268900F013353E6F00698AC0 /* Process.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3610F1B90C00F91463 /* Process.cpp */; };
-		26BC17AB18C7F4CB00D2196D /* ProcessElfCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC17A218C7F4CB00D2196D /* ProcessElfCore.cpp */; };
-		2689009F13353E4200698AC0 /* ProcessGDBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE5F1315B29C001D6D71 /* ProcessGDBRemote.cpp */; };
-		268900A013353E4200698AC0 /* ProcessGDBRemoteLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE611315B29C001D6D71 /* ProcessGDBRemoteLog.cpp */; };
-		4CC57FA1222DFEA40067B7EA /* ProcessInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC57F9F222DFEA40067B7EA /* ProcessInfo.cpp */; };
-		2642FBB013D003B400ED6808 /* ProcessKDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2642FBAA13D003B400ED6808 /* ProcessKDP.cpp */; };
-		2642FBB213D003B400ED6808 /* ProcessKDPLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2642FBAC13D003B400ED6808 /* ProcessKDPLog.cpp */; };
-		233B007F1960CB280090E598 /* ProcessLaunchInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 233B007E1960CB280090E598 /* ProcessLaunchInfo.cpp */; };
-		26A527C114E24F5F00F3A14A /* ProcessMachCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A527BD14E24F5F00F3A14A /* ProcessMachCore.cpp */; };
-		947CF7711DC7B1EE00EF980B /* ProcessMinidump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 947CF7701DC7B1EE00EF980B /* ProcessMinidump.cpp */; };
-		AF37E10A17C861F20061E18E /* ProcessRunLock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF37E10917C861F20061E18E /* ProcessRunLock.cpp */; };
-		2640E19F15DC78FD00F23B50 /* Property.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2640E19E15DC78FD00F23B50 /* Property.cpp */; };
-		2654A68D1E552D1500DA1013 /* PseudoTerminal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2654A68C1E552D1500DA1013 /* PseudoTerminal.cpp */; };
-		4CEC86A92047395F009B37B1 /* Python.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF3F1BDD613E00A5CEAC /* Python.framework */; };
-		3FBA69EC1B6067430008F44A /* PythonDataObjects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FBA69E31B60672A0008F44A /* PythonDataObjects.cpp */; };
-		23CB153E1D66DA9300EDDDE1 /* PythonDataObjectsTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F94D1BDD360F00BA9A93 /* PythonDataObjectsTests.cpp */; };
-		AFCB2BBD1BF577F40018B553 /* PythonExceptionState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFCB2BBB1BF577F40018B553 /* PythonExceptionState.cpp */; };
-		AFCB2BBE1BF577F40018B553 /* PythonExceptionState.h in Headers */ = {isa = PBXBuildFile; fileRef = AFCB2BBC1BF577F40018B553 /* PythonExceptionState.h */; };
-		23CB15381D66DA9300EDDDE1 /* PythonExceptionStateTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FA093141BF65D3A0037DD08 /* PythonExceptionStateTests.cpp */; };
-		23CB15371D66DA9300EDDDE1 /* PythonTestSuite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF45E1FC1BF57C8D000563EB /* PythonTestSuite.cpp */; };
-		AF26703A1852D01E00B6CC36 /* Queue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2670381852D01E00B6CC36 /* Queue.cpp */; };
-		AF0C112818580CD800C4C45B /* QueueItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0C112718580CD800C4C45B /* QueueItem.cpp */; };
-		AF26703B1852D01E00B6CC36 /* QueueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF2670391852D01E00B6CC36 /* QueueList.cpp */; };
-		4939EA8D1BD56B6D00084382 /* REPL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4939EA8C1BD56B6D00084382 /* REPL.cpp */; };
-		268900F113353E6F00698AC0 /* RegisterContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3710F1B90C00F91463 /* RegisterContext.cpp */; };
-		26957D9813D381C900670048 /* RegisterContextDarwin_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26957D9213D381C900670048 /* RegisterContextDarwin_arm.cpp */; };
-		AF9107EE168570D200DBCD3C /* RegisterContextDarwin_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9107EC168570D200DBCD3C /* RegisterContextDarwin_arm64.cpp */; };
-		AF9107EF168570D200DBCD3C /* RegisterContextDarwin_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9107EC168570D200DBCD3C /* RegisterContextDarwin_arm64.cpp */; };
-		26957D9A13D381C900670048 /* RegisterContextDarwin_i386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26957D9413D381C900670048 /* RegisterContextDarwin_i386.cpp */; };
-		26957D9C13D381C900670048 /* RegisterContextDarwin_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26957D9613D381C900670048 /* RegisterContextDarwin_x86_64.cpp */; };
-		944372DC171F6B4300E57C32 /* RegisterContextDummy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 944372DA171F6B4300E57C32 /* RegisterContextDummy.cpp */; };
-		26474CA818D0CB070073DEBA /* RegisterContextFreeBSD_i386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CA218D0CB070073DEBA /* RegisterContextFreeBSD_i386.cpp */; };
-		26474CAA18D0CB070073DEBA /* RegisterContextFreeBSD_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CA418D0CB070073DEBA /* RegisterContextFreeBSD_mips64.cpp */; };
-		AF77E0A11A033D360096C0EA /* RegisterContextFreeBSD_powerpc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF77E09A1A033D360096C0EA /* RegisterContextFreeBSD_powerpc.cpp */; };
-		26474CAC18D0CB070073DEBA /* RegisterContextFreeBSD_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CA618D0CB070073DEBA /* RegisterContextFreeBSD_x86_64.cpp */; };
-		AF061F87182C97ED00B6A19C /* RegisterContextHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF061F85182C97ED00B6A19C /* RegisterContextHistory.cpp */; };
-		265205A813D3E3F700132FE2 /* RegisterContextKDP_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 265205A213D3E3F700132FE2 /* RegisterContextKDP_arm.cpp */; };
-		AF0F6E501739A76D009180FE /* RegisterContextKDP_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0F6E4E1739A76D009180FE /* RegisterContextKDP_arm64.cpp */; };
-		265205AA13D3E3F700132FE2 /* RegisterContextKDP_i386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 265205A413D3E3F700132FE2 /* RegisterContextKDP_i386.cpp */; };
-		265205AC13D3E3F700132FE2 /* RegisterContextKDP_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 265205A613D3E3F700132FE2 /* RegisterContextKDP_x86_64.cpp */; };
-		268900B013353E5000698AC0 /* RegisterContextLLDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF68D2541255416E002FF25B /* RegisterContextLLDB.cpp */; };
-		26474CB218D0CB180073DEBA /* RegisterContextLinux_i386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CAE18D0CB180073DEBA /* RegisterContextLinux_i386.cpp */; };
-		9A0FDEA71E8EF5110086B2F5 /* RegisterContextLinux_mips.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A0FDE971E8EF5010086B2F5 /* RegisterContextLinux_mips.cpp */; };
-		256CBDBC1ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDB81ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp */; };
-		267F68531CC02E920086832B /* RegisterContextLinux_s390x.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267F68511CC02E920086832B /* RegisterContextLinux_s390x.cpp */; };
-		267F68541CC02E920086832B /* RegisterContextLinux_s390x.h in Headers */ = {isa = PBXBuildFile; fileRef = 267F68521CC02E920086832B /* RegisterContextLinux_s390x.h */; };
-		26474CB418D0CB180073DEBA /* RegisterContextLinux_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CB018D0CB180073DEBA /* RegisterContextLinux_x86_64.cpp */; };
-		268900B413353E5000698AC0 /* RegisterContextMacOSXFrameBackchain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E3EEF711A994E800FBADB6 /* RegisterContextMacOSXFrameBackchain.cpp */; };
-		26474CBC18D0CB2D0073DEBA /* RegisterContextMach_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CB618D0CB2D0073DEBA /* RegisterContextMach_arm.cpp */; };
-		26474CBE18D0CB2D0073DEBA /* RegisterContextMach_i386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CB818D0CB2D0073DEBA /* RegisterContextMach_i386.cpp */; };
-		26474CC018D0CB2D0073DEBA /* RegisterContextMach_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CBA18D0CB2D0073DEBA /* RegisterContextMach_x86_64.cpp */; };
-		26474CC918D0CB5B0073DEBA /* RegisterContextMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CC218D0CB5B0073DEBA /* RegisterContextMemory.cpp */; };
-		2619C4852107A9A2009CDE81 /* RegisterContextMinidump_ARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2619C4812107A9A1009CDE81 /* RegisterContextMinidump_ARM.cpp */; };
-		2619C4872107A9A2009CDE81 /* RegisterContextMinidump_ARM.h in Headers */ = {isa = PBXBuildFile; fileRef = 2619C4832107A9A2009CDE81 /* RegisterContextMinidump_ARM.h */; };
-		2619C4842107A9A2009CDE81 /* RegisterContextMinidump_ARM64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2619C4802107A9A1009CDE81 /* RegisterContextMinidump_ARM64.cpp */; };
-		2619C4862107A9A2009CDE81 /* RegisterContextMinidump_ARM64.h in Headers */ = {isa = PBXBuildFile; fileRef = 2619C4822107A9A2009CDE81 /* RegisterContextMinidump_ARM64.h */; };
-		947CF7761DC7B20D00EF980B /* RegisterContextMinidump_x86_32.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 947CF7741DC7B20D00EF980B /* RegisterContextMinidump_x86_32.cpp */; };
-		AFD65C811D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFD65C7F1D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.cpp */; };
-		AFD65C821D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.h in Headers */ = {isa = PBXBuildFile; fileRef = AFD65C801D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.h */; };
-		9AD9449F1E8DB26C004796ED /* RegisterContextNetBSD_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AD9449B1E8DB267004796ED /* RegisterContextNetBSD_x86_64.cpp */; };
-		4CE4EFB31E899A3400A80C06 /* RegisterContextOpenBSD_i386.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4EFAB1E899A1200A80C06 /* RegisterContextOpenBSD_i386.cpp */; };
-		4CE4EFB41E899A4000A80C06 /* RegisterContextOpenBSD_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4EFAD1E899A1200A80C06 /* RegisterContextOpenBSD_x86_64.cpp */; };
-		256CBDB41ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDB21ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp */; };
-		E7723D441AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E7723D421AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.cpp */; };
-		26BC17AD18C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC17A418C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.cpp */; };
-		AF77E0A91A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF77E0A71A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.cpp */; };
-		AF9113FD1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9113FB1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.cpp */; };
-		AF9113FE1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.h in Headers */ = {isa = PBXBuildFile; fileRef = AF9113FC1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.h */; };
-		267F684F1CC02E270086832B /* RegisterContextPOSIXCore_s390x.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267F684D1CC02E270086832B /* RegisterContextPOSIXCore_s390x.cpp */; };
-		267F68501CC02E270086832B /* RegisterContextPOSIXCore_s390x.h in Headers */ = {isa = PBXBuildFile; fileRef = 267F684E1CC02E270086832B /* RegisterContextPOSIXCore_s390x.h */; };
-		26BC17AF18C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC17A618C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.cpp */; };
-		256CBDC01ADD11C000BC6CDC /* RegisterContextPOSIX_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 256CBDBE1ADD11C000BC6CDC /* RegisterContextPOSIX_arm.cpp */; };
-		E7723D4C1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E7723D4A1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp */; };
-		26474CCB18D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CC418D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.cpp */; };
-		AF77E0A41A033D360096C0EA /* RegisterContextPOSIX_powerpc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF77E09D1A033D360096C0EA /* RegisterContextPOSIX_powerpc.cpp */; };
-		AF235EB01FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF235EAE1FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.cpp */; };
-		AF235EB11FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.h in Headers */ = {isa = PBXBuildFile; fileRef = AF235EAF1FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.h */; };
-		267F68571CC02EAE0086832B /* RegisterContextPOSIX_s390x.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267F68551CC02EAE0086832B /* RegisterContextPOSIX_s390x.cpp */; };
-		267F68581CC02EAE0086832B /* RegisterContextPOSIX_s390x.h in Headers */ = {isa = PBXBuildFile; fileRef = 267F68561CC02EAE0086832B /* RegisterContextPOSIX_s390x.h */; };
-		26474CCD18D0CB5B0073DEBA /* RegisterContextPOSIX_x86.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26474CC618D0CB5B0073DEBA /* RegisterContextPOSIX_x86.cpp */; };
-		26CA97A1172B1FD5005DC71B /* RegisterContextThreadMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CA979F172B1FD5005DC71B /* RegisterContextThreadMemory.cpp */; };
-		9A77AD541E64E2760025CE04 /* RegisterInfoPOSIX_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A77AD501E64E24E0025CE04 /* RegisterInfoPOSIX_arm.cpp */; };
-		237A8BAF1DEC9C7800CEBAFF /* RegisterInfoPOSIX_arm64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 237A8BAB1DEC9BBC00CEBAFF /* RegisterInfoPOSIX_arm64.cpp */; };
-		AF235EB51FBE7858009C5541 /* RegisterInfoPOSIX_ppc64le.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF235EB31FBE7858009C5541 /* RegisterInfoPOSIX_ppc64le.cpp */; };
-		AF235EB41FBE7858009C5541 /* RegisterInfoPOSIX_ppc64le.h in Headers */ = {isa = PBXBuildFile; fileRef = AF235EB21FBE7857009C5541 /* RegisterInfoPOSIX_ppc64le.h */; };
-		267F685A1CC02EBE0086832B /* RegisterInfos_s390x.h in Headers */ = {isa = PBXBuildFile; fileRef = 267F68591CC02EBE0086832B /* RegisterInfos_s390x.h */; };
-		2654A6831E54D5E200DA1013 /* RegisterNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2654A6821E54D5E200DA1013 /* RegisterNumber.cpp */; };
-		4CA9D1401FCE07CD00300E18 /* RegisterUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CA9D13C1FCE07AF00300E18 /* RegisterUtilities.cpp */; };
-		26A69C5F137A17A500262477 /* RegisterValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C6886E137880C400407EDF /* RegisterValue.cpp */; };
-		4C639ED221FA684900A7B957 /* RegisterValueTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC421FA684800A7B957 /* RegisterValueTest.cpp */; };
-		26764CA01E48F528008D3573 /* RegularExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26764C9F1E48F528008D3573 /* RegularExpression.cpp */; };
-		26501414221330CE00E16D81 /* RemoteAwarePlatform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26501413221330CE00E16D81 /* RemoteAwarePlatform.cpp */; };
-		23D0658F1D4A7BEE0008EDE6 /* RenderScriptExpressionOpts.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D065821D4A7BDA0008EDE6 /* RenderScriptExpressionOpts.cpp */; };
-		23D065901D4A7BEE0008EDE6 /* RenderScriptRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D065841D4A7BDA0008EDE6 /* RenderScriptRuntime.cpp */; };
-		9485545A1DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 948554591DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp */; };
-		23D065911D4A7BEE0008EDE6 /* RenderScriptx86ABIFixups.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23D065861D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.cpp */; };
-		AFCB1D5F219CD5EA00730AD5 /* Reproducer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFCB1D5E219CD5EA00730AD5 /* Reproducer.cpp */; };
-		DD6C13BB220A6F22005C2AE8 /* ReproducerInstrumentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6C13BA220A6F21005C2AE8 /* ReproducerInstrumentation.cpp */; };
-		DD6C13BD220A6F6A005C2AE8 /* ReproducerInstrumentationTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD6C13BC220A6F6A005C2AE8 /* ReproducerInstrumentationTest.cpp */; };
-		4C639ECF21FA684900A7B957 /* ReproducerTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC121FA684700A7B957 /* ReproducerTest.cpp */; };
-		4FBC04ED211A06200015A814 /* RichManglingContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FBC04EC211A06200015A814 /* RichManglingContext.cpp */; };
-		4FBC04EF211A06820015A814 /* RichManglingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FBC04EE211A06820015A814 /* RichManglingContext.h */; };
-		4FBC04F5211A13770015A814 /* RichManglingContextTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FBC04F3211A0F0F0015A814 /* RichManglingContextTest.cpp */; };
-		26DE204511618ADA00A093E2 /* SBAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE204411618ADA00A093E2 /* SBAddress.cpp */; };
-		26DE204311618ACA00A093E2 /* SBAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE204211618ACA00A093E2 /* SBAddress.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		254FBBA51A91670E00BD6378 /* SBAttachInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */; };
-		254FBBA31A9166F100BD6378 /* SBAttachInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 254FBBA21A9166F100BD6378 /* SBAttachInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26DE20611161902700A093E2 /* SBBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE20601161902600A093E2 /* SBBlock.cpp */; };
-		26DE205711618FC500A093E2 /* SBBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205611618FC500A093E2 /* SBBlock.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680337116005F1008E1FE4 /* SBBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AF16A9C11402D5B007A7B3F /* SBBreakpoint.cpp */; };
-		26680219115FD13D008E1FE4 /* SBBreakpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AF16A9E11402D69007A7B3F /* SBBreakpoint.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680336116005EF008E1FE4 /* SBBreakpointLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AF16CC7114086A1007A7B3F /* SBBreakpointLocation.cpp */; };
-		2668021A115FD13D008E1FE4 /* SBBreakpointLocation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AF16CC611408686007A7B3F /* SBBreakpointLocation.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		4C54B27E1F61CE6300D469CA /* SBBreakpointName.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C54B27C1F61CE5300D469CA /* SBBreakpointName.cpp */; };
-		4C54B27B1F61CE2800D469CA /* SBBreakpointName.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C54B2781F61CE1200D469CA /* SBBreakpointName.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		4C05332B1F62121E00DED368 /* SBBreakpointOptionCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0533291F6211FB00DED368 /* SBBreakpointOptionCommon.cpp */; };
-		26680335116005EE008E1FE4 /* SBBroadcaster.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F21125FC5800A56CB0 /* SBBroadcaster.cpp */; };
-		2668021B115FD13D008E1FE4 /* SBBroadcaster.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F31125FC5800A56CB0 /* SBBroadcaster.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680333116005EC008E1FE4 /* SBCommandInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F61125FC5800A56CB0 /* SBCommandInterpreter.cpp */; };
-		2668021D115FD13D008E1FE4 /* SBCommandInterpreter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F71125FC5800A56CB0 /* SBCommandInterpreter.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680332116005EA008E1FE4 /* SBCommandReturnObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830F81125FC5800A56CB0 /* SBCommandReturnObject.cpp */; };
-		2668021E115FD13D008E1FE4 /* SBCommandReturnObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830F91125FC5800A56CB0 /* SBCommandReturnObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680331116005E9008E1FE4 /* SBCommunication.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260223E8115F06E500A601A2 /* SBCommunication.cpp */; };
-		2668021F115FD13D008E1FE4 /* SBCommunication.h in Headers */ = {isa = PBXBuildFile; fileRef = 260223E7115F06D500A601A2 /* SBCommunication.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26DE205F1161901B00A093E2 /* SBCompileUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE205E1161901B00A093E2 /* SBCompileUnit.cpp */; };
-		26DE205511618FB800A093E2 /* SBCompileUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205411618FB800A093E2 /* SBCompileUnit.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9443B122140C18C40013457C /* SBData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9443B121140C18C10013457C /* SBData.cpp */; };
-		9443B123140C26AB0013457C /* SBData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9443B120140C18A90013457C /* SBData.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680330116005E7008E1FE4 /* SBDebugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830FA1125FC5800A56CB0 /* SBDebugger.cpp */; };
-		26680220115FD13D008E1FE4 /* SBDebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830FB1125FC5800A56CB0 /* SBDebugger.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9452573A16262D0200325455 /* SBDeclaration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9452573916262D0200325455 /* SBDeclaration.cpp */; };
-		490A966B1628C3BF00F0002E /* SBDeclaration.h in Headers */ = {isa = PBXBuildFile; fileRef = 9452573816262CEF00325455 /* SBDeclaration.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680221115FD13D008E1FE4 /* SBDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830FC1125FC5800A56CB0 /* SBDefines.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		2668032F116005E6008E1FE4 /* SBError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2682F284115EF3A700CCFF99 /* SBError.cpp */; };
-		26680222115FD13D008E1FE4 /* SBError.h in Headers */ = {isa = PBXBuildFile; fileRef = 2682F286115EF3BD00CCFF99 /* SBError.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		2668032E116005E5008E1FE4 /* SBEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9830FD1125FC5800A56CB0 /* SBEvent.cpp */; };
-		26680223115FD13D008E1FE4 /* SBEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9830FE1125FC5800A56CB0 /* SBEvent.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		940B02F619DC96E700AD0F52 /* SBExecutionContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940B02F519DC96E700AD0F52 /* SBExecutionContext.cpp */; };
-		AFDCDBCB19DD0F42005EA55E /* SBExecutionContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 940B02F419DC96CB00AD0F52 /* SBExecutionContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		4CE4F675162C973F00F75CB3 /* SBExpressionOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4F674162C973F00F75CB3 /* SBExpressionOptions.cpp */; };
-		4CE4F673162C971A00F75CB3 /* SBExpressionOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CE4F672162C971A00F75CB3 /* SBExpressionOptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		2668032D116005E3008E1FE4 /* SBFileSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26022532115F281400A601A2 /* SBFileSpec.cpp */; };
-		26680224115FD13D008E1FE4 /* SBFileSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 26022531115F27FA00A601A2 /* SBFileSpec.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CF52AF7142829390051E832 /* SBFileSpecList.cpp */; };
-		4CF52AF51428291E0051E832 /* SBFileSpecList.h in Headers */ = {isa = PBXBuildFile; fileRef = 4CF52AF41428291E0051E832 /* SBFileSpecList.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		2668032C116005E2008E1FE4 /* SBFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A633FE7112DCE3C001A7E43 /* SBFrame.cpp */; };
-		26680225115FD13D008E1FE4 /* SBFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A633FE8112DCE3C001A7E43 /* SBFrame.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26DE205D1161901400A093E2 /* SBFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE205C1161901400A093E2 /* SBFunction.cpp */; };
-		26DE205311618FAC00A093E2 /* SBFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205211618FAC00A093E2 /* SBFunction.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9A3576AA116E9AC700E8ED2F /* SBHostOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3576A9116E9AC700E8ED2F /* SBHostOS.cpp */; };
-		9A3576A8116E9AB700E8ED2F /* SBHostOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A3576A7116E9AB700E8ED2F /* SBHostOS.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9AC703AF117675410086C050 /* SBInstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC703AE117675410086C050 /* SBInstruction.cpp */; };
-		9AC7038E117674FB0086C050 /* SBInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC7038D117674EB0086C050 /* SBInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9AC703B1117675490086C050 /* SBInstructionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AC703B0117675490086C050 /* SBInstructionList.cpp */; };
-		9AC70390117675270086C050 /* SBInstructionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9AC7038F117675270086C050 /* SBInstructionList.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		964381701C8D6B8200023D59 /* SBLanguageRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF20F76C1AF18FC700751A6E /* SBLanguageRuntime.cpp */; };
-		332CCB181AFF41620034D4C4 /* SBLanguageRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 3392EBB71AFF402200858B9F /* SBLanguageRuntime.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		254FBB951A81AA7F00BD6378 /* SBLaunchInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 254FBB941A81AA7F00BD6378 /* SBLaunchInfo.cpp */; };
-		254FBB971A81B03100BD6378 /* SBLaunchInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 254FBB961A81B03100BD6378 /* SBLaunchInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26DE20631161904200A093E2 /* SBLineEntry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE20621161904200A093E2 /* SBLineEntry.cpp */; };
-		26DE205911618FE700A093E2 /* SBLineEntry.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205811618FE700A093E2 /* SBLineEntry.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		2668032A116005E0008E1FE4 /* SBListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831011125FC5800A56CB0 /* SBListener.cpp */; };
-		26680227115FD13D008E1FE4 /* SBListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9831021125FC5800A56CB0 /* SBListener.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		23DCEA461D1C4D0F00A602B4 /* SBMemoryRegionInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DCEA421D1C4C6900A602B4 /* SBMemoryRegionInfo.cpp */; };
-		264297581D1DF250003F2BF4 /* SBMemoryRegionInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 264297531D1DF209003F2BF4 /* SBMemoryRegionInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		23DCEA471D1C4D0F00A602B4 /* SBMemoryRegionInfoList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DCEA431D1C4C6900A602B4 /* SBMemoryRegionInfoList.cpp */; };
-		264297571D1DF247003F2BF4 /* SBMemoryRegionInfoList.h in Headers */ = {isa = PBXBuildFile; fileRef = 264297541D1DF209003F2BF4 /* SBMemoryRegionInfoList.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26DE204D11618E7A00A093E2 /* SBModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE204C11618E7A00A093E2 /* SBModule.cpp */; };
-		26DE204F11618E9800A093E2 /* SBModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE204E11618E9800A093E2 /* SBModule.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		263C4938178B50C40070F12D /* SBModuleSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263C4937178B50C40070F12D /* SBModuleSpec.cpp */; };
-		263C493A178B50CF0070F12D /* SBModuleSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 263C4939178B50CF0070F12D /* SBModuleSpec.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		262F12B51835468600AEB384 /* SBPlatform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 262F12B41835468600AEB384 /* SBPlatform.cpp */; };
-		262F12B71835469C00AEB384 /* SBPlatform.h in Headers */ = {isa = PBXBuildFile; fileRef = 262F12B61835469C00AEB384 /* SBPlatform.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680328116005DE008E1FE4 /* SBProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831031125FC5800A56CB0 /* SBProcess.cpp */; };
-		2668022A115FD13D008E1FE4 /* SBProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9831041125FC5800A56CB0 /* SBProcess.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		4971D4B51F30ECFB00823171 /* SBProcessInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4987FB1E1F30EC7E00E5C17D /* SBProcessInfo.cpp */; };
-		4C877B391F30EF990068FCFB /* SBProcessInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 4987FB201F30EC9900E5C17D /* SBProcessInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		AF0EBBE8185940FB0059E52F /* SBQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0EBBE6185940FB0059E52F /* SBQueue.cpp */; };
-		AF0EBBEC185941360059E52F /* SBQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = AF0EBBEA185941360059E52F /* SBQueue.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		AF0EBBE9185940FB0059E52F /* SBQueueItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0EBBE7185940FB0059E52F /* SBQueueItem.cpp */; };
-		AF0EBBED185941360059E52F /* SBQueueItem.h in Headers */ = {isa = PBXBuildFile; fileRef = AF0EBBEB185941360059E52F /* SBQueueItem.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		DD1E0ACE220BC3A100B815F8 /* SBReproducer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DD1E0AC9220B660100B815F8 /* SBReproducer.cpp */; };
-		DD1E0AD1220BC3DC00B815F8 /* SBReproducer.h in Headers */ = {isa = PBXBuildFile; fileRef = DD1E0AD0220BC3D400B815F8 /* SBReproducer.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26B82840142D020F002DBC64 /* SBSection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B8283F142D020F002DBC64 /* SBSection.cpp */; };
-		26B8283D142D01E9002DBC64 /* SBSection.h in Headers */ = {isa = PBXBuildFile; fileRef = 26B8283C142D01E9002DBC64 /* SBSection.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680327116005DC008E1FE4 /* SBSourceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831051125FC5800A56CB0 /* SBSourceManager.cpp */; };
-		2668022B115FD13D008E1FE4 /* SBSourceManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9831061125FC5800A56CB0 /* SBSourceManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26C72C961243229A0068DC16 /* SBStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C72C951243229A0068DC16 /* SBStream.cpp */; };
-		26C72C94124322890068DC16 /* SBStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 26C72C93124322890068DC16 /* SBStream.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9A357673116E7B6400E8ED2F /* SBStringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A357672116E7B6400E8ED2F /* SBStringList.cpp */; };
-		9A357671116E7B5200E8ED2F /* SBStringList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A357670116E7B5200E8ED2F /* SBStringList.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		23DCBEA21D63E7190084C36B /* SBStructuredData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23DCBEA01D63E6440084C36B /* SBStructuredData.cpp */; };
-		23DCBEA31D63E71F0084C36B /* SBStructuredData.h in Headers */ = {isa = PBXBuildFile; fileRef = 23DCBE9F1D63E3800084C36B /* SBStructuredData.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26DE20651161904E00A093E2 /* SBSymbol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE20641161904E00A093E2 /* SBSymbol.cpp */; };
-		26DE205B11618FF600A093E2 /* SBSymbol.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE205A11618FF600A093E2 /* SBSymbol.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26DE204711618AED00A093E2 /* SBSymbolContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DE204611618AED00A093E2 /* SBSymbolContext.cpp */; };
-		26DE204111618AB900A093E2 /* SBSymbolContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE204011618AB900A093E2 /* SBSymbolContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		268F9D55123AA16600B91E9B /* SBSymbolContextList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 268F9D54123AA16600B91E9B /* SBSymbolContextList.cpp */; };
-		268F9D53123AA15200B91E9B /* SBSymbolContextList.h in Headers */ = {isa = PBXBuildFile; fileRef = 268F9D52123AA15200B91E9B /* SBSymbolContextList.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680326116005DB008E1FE4 /* SBTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831071125FC5800A56CB0 /* SBTarget.cpp */; };
-		2668022C115FD13D008E1FE4 /* SBTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9831081125FC5800A56CB0 /* SBTarget.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26680324116005D9008E1FE4 /* SBThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A9831091125FC5800A56CB0 /* SBThread.cpp */; };
-		2668022E115FD13D008E1FE4 /* SBThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A98310A1125FC5800A56CB0 /* SBThread.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		8CCB018319BA51BF0009FD44 /* SBThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */; };
-		8CCB018219BA4E270009FD44 /* SBThreadCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8CCB018119BA4E210009FD44 /* SBThreadCollection.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		4C56543719D22B32002E9C44 /* SBThreadPlan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C56543619D22B32002E9C44 /* SBThreadPlan.cpp */; };
-		4C56543519D2297A002E9C44 /* SBThreadPlan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4C56543419D2297A002E9C44 /* SBThreadPlan.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9A1E595C1EB2B141002206A5 /* SBTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A1E59521EB2B0B9002206A5 /* SBTrace.cpp */; };
-		9A36D24D1EB3BE7F00AAD9EA /* SBTrace.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A1E59581EB2B10D002206A5 /* SBTrace.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9A1E595D1EB2B141002206A5 /* SBTraceOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A1E59531EB2B0B9002206A5 /* SBTraceOptions.cpp */; };
-		9A36D24E1EB3BE7F00AAD9EA /* SBTraceOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A1E59591EB2B10D002206A5 /* SBTraceOptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		261744781168585B005ADD65 /* SBType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 261744771168585B005ADD65 /* SBType.cpp */; };
-		2617447A11685869005ADD65 /* SBType.h in Headers */ = {isa = PBXBuildFile; fileRef = 2617447911685869005ADD65 /* SBType.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9475C18814E5E9FA001BFC6D /* SBTypeCategory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9475C18714E5E9FA001BFC6D /* SBTypeCategory.cpp */; };
-		9475C18914E5EA08001BFC6D /* SBTypeCategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 9475C18514E5E9C5001BFC6D /* SBTypeCategory.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		23EFE38B193D1AEC00E54E54 /* SBTypeEnumMember.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */; };
-		23EFE389193D1ABC00E54E54 /* SBTypeEnumMember.h in Headers */ = {isa = PBXBuildFile; fileRef = 23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9461569A14E358A6003A195C /* SBTypeFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9461568A14E35621003A195C /* SBTypeFilter.cpp */; };
-		941BCC7F14E48C4000BB969C /* SBTypeFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568614E355F2003A195C /* SBTypeFilter.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9461569B14E358A6003A195C /* SBTypeFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9461568B14E35621003A195C /* SBTypeFormat.cpp */; };
-		941BCC8014E48C4000BB969C /* SBTypeFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568714E355F2003A195C /* SBTypeFormat.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9475C18E14E5F834001BFC6D /* SBTypeNameSpecifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9475C18D14E5F834001BFC6D /* SBTypeNameSpecifier.cpp */; };
-		9475C18F14E5F858001BFC6D /* SBTypeNameSpecifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 9475C18C14E5F826001BFC6D /* SBTypeNameSpecifier.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9461569C14E358A6003A195C /* SBTypeSummary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9461568C14E35621003A195C /* SBTypeSummary.cpp */; };
-		941BCC8114E48C4000BB969C /* SBTypeSummary.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568814E355F2003A195C /* SBTypeSummary.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9461569D14E358A6003A195C /* SBTypeSynthetic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9461568D14E35621003A195C /* SBTypeSynthetic.cpp */; };
-		941BCC8214E48C4000BB969C /* SBTypeSynthetic.h in Headers */ = {isa = PBXBuildFile; fileRef = 9461568914E355F2003A195C /* SBTypeSynthetic.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		23059A101958B319007B8189 /* SBUnixSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23059A0F1958B319007B8189 /* SBUnixSignals.cpp */; };
-		23059A121958B3B2007B8189 /* SBUnixSignals.h in Headers */ = {isa = PBXBuildFile; fileRef = 23059A111958B37B007B8189 /* SBUnixSignals.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9A19A6B01163BBB300E0D453 /* SBValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A19A6AD1163BB9800E0D453 /* SBValue.cpp */; };
-		9A19A6AF1163BBB200E0D453 /* SBValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A19A6A51163BB7E00E0D453 /* SBValue.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		9A35758E116CFE0F00E8ED2F /* SBValueList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A35758D116CFE0F00E8ED2F /* SBValueList.cpp */; };
-		9A357583116CFDEE00E8ED2F /* SBValueList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A357582116CFDEE00E8ED2F /* SBValueList.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		94235B9E1A8D667400EB2EED /* SBVariablesOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94235B9B1A8D5FF300EB2EED /* SBVariablesOptions.cpp */; };
-		94235B9F1A8D66D600EB2EED /* SBVariablesOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 94235B9A1A8D5FD800EB2EED /* SBVariablesOptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		B2A58724143119D50092BFBA /* SBWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2A58723143119D50092BFBA /* SBWatchpoint.cpp */; };
-		B2A58722143119810092BFBA /* SBWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = B2A58721143119810092BFBA /* SBWatchpoint.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		2689004913353E0400698AC0 /* Scalar.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8D10F1B85900F91463 /* Scalar.cpp */; };
-		23CB15441D66DA9300EDDDE1 /* ScalarTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB14E91D66CC0E00EDDDE1 /* ScalarTest.cpp */; };
-		2689008713353E2200698AC0 /* ScriptInterpreter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A82010B10FFB49800182560 /* ScriptInterpreter.cpp */; };
-		3FBA69E11B6067120008F44A /* ScriptInterpreterNone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FBA69DD1B6067020008F44A /* ScriptInterpreterNone.cpp */; };
-		3FBA69ED1B60674B0008F44A /* ScriptInterpreterPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FBA69E51B60672A0008F44A /* ScriptInterpreterPython.cpp */; };
-		2689004A13353E0400698AC0 /* SearchFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1510F1B83100F91463 /* SearchFilter.cpp */; };
-		2689004B13353E0400698AC0 /* Section.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8E10F1B85900F91463 /* Section.cpp */; };
-		262173A318395D4600C52091 /* SectionLoadHistory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 262173A218395D4600C52091 /* SectionLoadHistory.cpp */; };
-		268900F213353E6F00698AC0 /* SectionLoadList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618D7911240116900F2B8FE /* SectionLoadList.cpp */; };
-		4CF3D80C15AF4DC800845BF3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDB919B414F6F10D008FF64B /* Security.framework */; };
-		26A375811D59462700D6CBDB /* SelectHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A3757F1D59462700D6CBDB /* SelectHelper.cpp */; };
-		2689011013353E8200698AC0 /* SharingPtr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 261B5A5211C3F2AD00AABD0A /* SharingPtr.cpp */; };
-		26151DC31B41E4A200FF7F1C /* SharingPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 261B5A5311C3F2AD00AABD0A /* SharingPtr.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		236124A51986B4E2004EFC37 /* Socket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 236124A31986B4E2004EFC37 /* Socket.cpp */; };
-		26D7E45D13D5E30A007FD12B /* SocketAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D7E45C13D5E30A007FD12B /* SocketAddress.cpp */; };
-		23CB15451D66DA9300EDDDE1 /* SocketAddressTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9391BDD332400BA9A93 /* SocketAddressTest.cpp */; };
-		23CB153B1D66DA9300EDDDE1 /* SocketTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F93A1BDD332400BA9A93 /* SocketTest.cpp */; };
-		26FCE61C229F00F000D125BD /* SocketTestUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26FCE61B229F00F000D125BD /* SocketTestUtilities.cpp */; };
-		26603879211CA90F00329572 /* SourceBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26603870211CA90D00329572 /* SourceBreakpoint.cpp */; };
-		2689004C13353E0400698AC0 /* SourceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E8F10F1B85900F91463 /* SourceManager.cpp */; };
-		268900F313353E6F00698AC0 /* StackFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3810F1B90C00F91463 /* StackFrame.cpp */; };
-		268900F413353E6F00698AC0 /* StackFrameList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3910F1B90C00F91463 /* StackFrameList.cpp */; };
-		8CF46A6220522A9800423DDF /* StackFrameRecognizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CF46A6120522A9000423DDF /* StackFrameRecognizer.cpp */; };
-		268900F513353E6F00698AC0 /* StackID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3A10F1B90C00F91463 /* StackID.cpp */; };
-		2689004D13353E0400698AC0 /* State.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9010F1B85900F91463 /* State.cpp */; };
-		9A3D43ED1F3237F900EB767C /* StateTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43E21F3237D500EB767C /* StateTest.cpp */; };
-		492DB7EB1EC662E200B9E9AF /* Status.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 492DB7E81EC662D100B9E9AF /* Status.cpp */; };
-		9A3D43D91F3151C400EB767C /* StatusTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43C61F3150D200EB767C /* StatusTest.cpp */; };
-		268900F613353E6F00698AC0 /* StopInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2615DB861208A9E40021781D /* StopInfo.cpp */; };
-		268900B513353E5000698AC0 /* StopInfoMachException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2615DBC81208B5FC0021781D /* StopInfoMachException.cpp */; };
-		2689000B13353DB600698AC0 /* Stoppoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1610F1B83100F91463 /* Stoppoint.cpp */; };
-		2689000D13353DB600698AC0 /* StoppointCallbackContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E0910F1B83100F91463 /* StoppointCallbackContext.cpp */; };
-		2689000F13353DB600698AC0 /* StoppointLocation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1710F1B83100F91463 /* StoppointLocation.cpp */; };
-		26764C9E1E48F51E008D3573 /* Stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26764C9D1E48F51E008D3573 /* Stream.cpp */; };
-		9A4F35101368A51A00823F52 /* StreamAsynchronousIO.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4F350F1368A51A00823F52 /* StreamAsynchronousIO.cpp */; };
-		AFC2DCF61E6E316A00283714 /* StreamCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCF51E6E316A00283714 /* StreamCallback.cpp */; };
-		9A3D43EE1F3237F900EB767C /* StreamCallbackTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43E11F3237D500EB767C /* StreamCallbackTest.cpp */; };
-		2689004F13353E0400698AC0 /* StreamFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9210F1B85900F91463 /* StreamFile.cpp */; };
-		AFC2DCF91E6E318000283714 /* StreamGDBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCF81E6E318000283714 /* StreamGDBRemote.cpp */; };
-		26764CA21E48F547008D3573 /* StreamString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26764CA11E48F547008D3573 /* StreamString.cpp */; };
-		58EAC73F2106A07B0029571E /* StreamTeeTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 58EAC73D2106A0740029571E /* StreamTeeTest.cpp */; };
-		4C639ECD21FA684900A7B957 /* StreamTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EBF21FA684700A7B957 /* StreamTest.cpp */; };
-		33E5E8471A674FB60024ED68 /* StringConvert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33E5E8411A672A240024ED68 /* StringConvert.cpp */; };
-		2689011113353E8200698AC0 /* StringExtractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2660D9F611922A1300958FBD /* StringExtractor.cpp */; };
-		2689011213353E8200698AC0 /* StringExtractorGDBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2676A093119C93C8008A98EF /* StringExtractorGDBRemote.cpp */; };
-		23CB15411D66DA9300EDDDE1 /* StringExtractorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9441BDD346100BA9A93 /* StringExtractorTest.cpp */; };
-		94380B8219940B0A00BFE4A8 /* StringLexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94380B8119940B0A00BFE4A8 /* StringLexer.cpp */; };
-		4C639ED421FA684900A7B957 /* StringLexerTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC621FA684800A7B957 /* StringLexerTest.cpp */; };
-		2689005113353E0400698AC0 /* StringList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A35765F116E76B900E8ED2F /* StringList.cpp */; };
-		4C639ECC21FA684900A7B957 /* StringListTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EBE21FA684600A7B957 /* StringListTest.cpp */; };
-		94F48F251A01C687005C0EC6 /* StringPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94F48F241A01C687005C0EC6 /* StringPrinter.cpp */; };
-		AFEC3362194A8ABA00FF05C6 /* StructuredData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFEC3361194A8ABA00FF05C6 /* StructuredData.cpp */; };
-		238F2BA81D2C85FA001FF92A /* StructuredDataDarwinLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 238F2BA61D2C85FA001FF92A /* StructuredDataDarwinLog.cpp */; };
-		238F2BA91D2C85FA001FF92A /* StructuredDataDarwinLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 238F2BA71D2C85FA001FF92A /* StructuredDataDarwinLog.h */; };
-		238F2B9E1D2C82D0001FF92A /* StructuredDataPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 238F2B9D1D2C82D0001FF92A /* StructuredDataPlugin.cpp */; };
-		238F2BA11D2C835A001FF92A /* StructuredDataPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = 238F2B9F1D2C835A001FF92A /* StructuredDataPlugin.h */; };
-		9A3D43DA1F3151C400EB767C /* StructuredDataTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43CA1F3150D200EB767C /* StructuredDataTest.cpp */; };
-		268900DD13353E6F00698AC0 /* Symbol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1B10F1B8EC00F91463 /* Symbol.cpp */; };
-		268900DE13353E6F00698AC0 /* SymbolContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1C10F1B8EC00F91463 /* SymbolContext.cpp */; };
-		268900DF13353E6F00698AC0 /* SymbolFile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1D10F1B8EC00F91463 /* SymbolFile.cpp */; };
-		AF97744721E9947E006876A7 /* SymbolFileBreakpad.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF97744621E9947B006876A7 /* SymbolFileBreakpad.cpp */; };
-		268900CA13353E5F00698AC0 /* SymbolFileDWARF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89D910F57C5600BB2B04 /* SymbolFileDWARF.cpp */; };
-		268900CC13353E5F00698AC0 /* SymbolFileDWARFDebugMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89DB10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.cpp */; };
-		6D95DC021B9DC057000E318A /* SymbolFileDWARFDwo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D95DBFF1B9DC057000E318A /* SymbolFileDWARFDwo.cpp */; };
-		4C7D48251F5099B2005314B4 /* SymbolFileDWARFDwoDwp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D481F1F509964005314B4 /* SymbolFileDWARFDwoDwp.cpp */; };
-		4C7D48241F5099A1005314B4 /* SymbolFileDWARFDwp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C7D481C1F509963005314B4 /* SymbolFileDWARFDwp.cpp */; };
-		9A2057121F3B824B00F6C293 /* SymbolFileDWARFTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A20570A1F3B81F300F6C293 /* SymbolFileDWARFTests.cpp */; };
-		AFD966BB217140B6006714AC /* SymbolFileNativePDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFD966B7217140B6006714AC /* SymbolFileNativePDB.cpp */; };
-		AF6335E21C87B21E00F7D554 /* SymbolFilePDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF6335E01C87B21E00F7D554 /* SymbolFilePDB.cpp */; };
-		268900CE13353E5F00698AC0 /* SymbolFileSymtab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89DE10F57C5600BB2B04 /* SymbolFileSymtab.cpp */; };
-		268900E013353E6F00698AC0 /* SymbolVendor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF94005711C03F6500085DB9 /* SymbolVendor.cpp */; };
-		2635879417822FC2004C30BA /* SymbolVendorELF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2635879017822E56004C30BA /* SymbolVendorELF.cpp */; };
-		268900CF13353E5F00698AC0 /* SymbolVendorMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C89E210F57C5600BB2B04 /* SymbolVendorMacOSX.cpp */; };
-		268900E113353E6F00698AC0 /* Symtab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F1F10F1B8EC00F91463 /* Symtab.cpp */; };
-		3F8169311ABB7A6D001DA9DF /* SystemInitializer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F81692E1ABB7A6D001DA9DF /* SystemInitializer.cpp */; };
-		3F8169321ABB7A6D001DA9DF /* SystemInitializerCommon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F81692F1ABB7A6D001DA9DF /* SystemInitializerCommon.cpp */; };
-		3F81692C1ABB7A1E001DA9DF /* SystemInitializerFull.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F81692A1ABB7A16001DA9DF /* SystemInitializerFull.cpp */; };
-		4CD44D2220B725DA0003557C /* SystemInitializerLLGS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD44D2020B725DA0003557C /* SystemInitializerLLGS.cpp */; };
-		3F8169331ABB7A6D001DA9DF /* SystemLifetimeManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F8169301ABB7A6D001DA9DF /* SystemLifetimeManager.cpp */; };
-		AF81DEFA1828A23F0042CF19 /* SystemRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF81DEF91828A23F0042CF19 /* SystemRuntime.cpp */; };
-		238F2BA21D2C835A001FF92A /* SystemRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 238F2BA01D2C835A001FF92A /* SystemRuntime.h */; };
-		AF9B8F33182DB52900DA866F /* SystemRuntimeMacOSX.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF9B8F31182DB52900DA866F /* SystemRuntimeMacOSX.cpp */; };
-		2579065C1BD0488100178368 /* TCPSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2579065A1BD0488100178368 /* TCPSocket.cpp */; };
-		8C26C4261C3EA5F90031DF7C /* TSanRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8C26C4241C3EA4340031DF7C /* TSanRuntime.cpp */; };
-		268900F713353E6F00698AC0 /* Target.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3B10F1B90C00F91463 /* Target.cpp */; };
-		268900F813353E6F00698AC0 /* TargetList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3C10F1B90C00F91463 /* TargetList.cpp */; };
-		6DEC6F391BD66D750091ABA6 /* TaskPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6DEC6F381BD66D750091ABA6 /* TaskPool.cpp */; };
-		23CB15421D66DA9300EDDDE1 /* TaskPoolTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9451BDD346100BA9A93 /* TaskPoolTest.cpp */; };
-		2689007413353E1A00698AC0 /* Terminal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 268DA873130095ED00C9483A /* Terminal.cpp */; };
-		AFEABBF72230BF840097046F /* TestArm64Disassembly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFEABBF62230BF840097046F /* TestArm64Disassembly.cpp */; };
-		4CEC86A4204738C5009B37B1 /* TestArm64InstEmulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CEC86A3204738C5009B37B1 /* TestArm64InstEmulation.cpp */; };
-		AF7F97682141FA4500795BC0 /* TestArmv7Disassembly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF7F97662141FA3800795BC0 /* TestArmv7Disassembly.cpp */; };
-		23CB15401D66DA9300EDDDE1 /* TestClangASTContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 23CB150C1D66CF5600EDDDE1 /* TestClangASTContext.cpp */; };
-		9A20572D1F3B8E6600F6C293 /* TestCompletion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A20572B1F3B8E6200F6C293 /* TestCompletion.cpp */; };
-		9A2057171F3B861400F6C293 /* TestDWARFCallFrameInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A2057131F3B860D00F6C293 /* TestDWARFCallFrameInfo.cpp */; };
-		9A2057291F3B8DDB00F6C293 /* TestObjectFileELF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A2057251F3B8DD200F6C293 /* TestObjectFileELF.cpp */; };
-		4C719399207D23E300FDF430 /* TestOptionArgParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C719398207D23E300FDF430 /* TestOptionArgParser.cpp */; };
-		4CEC86A7204738EB009B37B1 /* TestPPC64InstEmulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CEC86A6204738EA009B37B1 /* TestPPC64InstEmulation.cpp */; };
-		9A2057181F3B861400F6C293 /* TestType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A2057141F3B860D00F6C293 /* TestType.cpp */; };
-		9A18903C1F47D5E600394BCA /* TestUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A1890341F47D5D400394BCA /* TestUtilities.cpp */; };
-		AFEC5FD81D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFEC5FD51D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp */; };
-		268900F913353E6F00698AC0 /* Thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3D10F1B90C00F91463 /* Thread.cpp */; };
-		8CCB017E19BA28A80009FD44 /* ThreadCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */; };
-		26BC17B118C7F4CB00D2196D /* ThreadElfCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC17A818C7F4CB00D2196D /* ThreadElfCore.cpp */; };
-		268900A113353E4200698AC0 /* ThreadGDBRemote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2618EE631315B29C001D6D71 /* ThreadGDBRemote.cpp */; };
-		2628A4D513D4977900F5487A /* ThreadKDP.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2628A4D313D4977900F5487A /* ThreadKDP.cpp */; };
-		3FDFED2919BA6D96009756A7 /* ThreadLauncher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3FDFED2619BA6D96009756A7 /* ThreadLauncher.cpp */; };
-		268900FA13353E6F00698AC0 /* ThreadList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3E10F1B90C00F91463 /* ThreadList.cpp */; };
-		26A527C314E24F5F00F3A14A /* ThreadMachCore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A527BF14E24F5F00F3A14A /* ThreadMachCore.cpp */; };
-		26F4A21C13FBA31A0064B613 /* ThreadMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F4A21A13FBA31A0064B613 /* ThreadMemory.cpp */; };
-		947CF7771DC7B20D00EF980B /* ThreadMinidump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 947CF7751DC7B20D00EF980B /* ThreadMinidump.cpp */; };
-		268900FB13353E6F00698AC0 /* ThreadPlan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F3F10F1B90C00F91463 /* ThreadPlan.cpp */; };
-		268900FC13353E6F00698AC0 /* ThreadPlanBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C847110F50EFC00BB2B04 /* ThreadPlanBase.cpp */; };
-		268900FD13353E6F00698AC0 /* ThreadPlanCallFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49EC3E98118F90AC00B1265E /* ThreadPlanCallFunction.cpp */; };
-		EB8375E71B553DE800BA907D /* ThreadPlanCallFunctionUsingABI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = EB8375E61B553DE800BA907D /* ThreadPlanCallFunctionUsingABI.cpp */; };
-		230EC45B1D63C3BA008DF59F /* ThreadPlanCallOnFunctionExit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 230EC4581D63C3A7008DF59F /* ThreadPlanCallOnFunctionExit.cpp */; };
-		268900FE13353E6F00698AC0 /* ThreadPlanCallUserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C7CF7E51295E12B00B4FBB5 /* ThreadPlanCallUserExpression.cpp */; };
-		4C56543119D1EFAA002E9C44 /* ThreadPlanPython.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C56543019D1EFAA002E9C44 /* ThreadPlanPython.cpp */; };
-		2689010613353E6F00698AC0 /* ThreadPlanRunToAddress.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CAFCE031101218900CA63DB /* ThreadPlanRunToAddress.cpp */; };
-		268900FF13353E6F00698AC0 /* ThreadPlanShouldStopHere.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C43DEFA110641F300E55CBF /* ThreadPlanShouldStopHere.cpp */; };
-		2689010413353E6F00698AC0 /* ThreadPlanStepInRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C43DF8911069C3200E55CBF /* ThreadPlanStepInRange.cpp */; };
-		2689010013353E6F00698AC0 /* ThreadPlanStepInstruction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C847210F50EFC00BB2B04 /* ThreadPlanStepInstruction.cpp */; };
-		2689010113353E6F00698AC0 /* ThreadPlanStepOut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C847310F50EFC00BB2B04 /* ThreadPlanStepOut.cpp */; };
-		2689010213353E6F00698AC0 /* ThreadPlanStepOverBreakpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C847410F50EFC00BB2B04 /* ThreadPlanStepOverBreakpoint.cpp */; };
-		2689010513353E6F00698AC0 /* ThreadPlanStepOverRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C43DF8A11069C3200E55CBF /* ThreadPlanStepOverRange.cpp */; };
-		2689010313353E6F00698AC0 /* ThreadPlanStepRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C847610F50EFC00BB2B04 /* ThreadPlanStepRange.cpp */; };
-		2689010713353E6F00698AC0 /* ThreadPlanStepThrough.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260C847510F50EFC00BB2B04 /* ThreadPlanStepThrough.cpp */; };
-		2689010813353E6F00698AC0 /* ThreadPlanStepUntil.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2660D9FE11922A7F00958FBD /* ThreadPlanStepUntil.cpp */; };
-		2689010A13353E6F00698AC0 /* ThreadPlanTracer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC2A148128C73ED001531C4 /* ThreadPlanTracer.cpp */; };
-		2689010B13353E6F00698AC0 /* ThreadSpec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C08CDE711C81EF8001610A8 /* ThreadSpec.cpp */; };
-		AFF8FF0C1E779D4B003830EF /* TildeExpressionResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFF8FF0B1E779D4B003830EF /* TildeExpressionResolver.cpp */; };
-		9A3D43DB1F3151C400EB767C /* TildeExpressionResolverTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43C91F3150D200EB767C /* TildeExpressionResolverTest.cpp */; };
-		9A3D43DC1F3151C400EB767C /* TimeoutTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43CC1F3150D200EB767C /* TimeoutTest.cpp */; };
-		2689005213353E0400698AC0 /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9610F1B85900F91463 /* Timer.cpp */; };
-		9A3D43DD1F3151C400EB767C /* TimerTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43C51F3150D200EB767C /* TimerTest.cpp */; };
-		268900E213353E6F00698AC0 /* Type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2010F1B8EC00F91463 /* Type.cpp */; };
-		94CB256616B096F10059775D /* TypeCategory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB256416B096F10059775D /* TypeCategory.cpp */; };
-		94CB256716B096F10059775D /* TypeCategoryMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB256516B096F10059775D /* TypeCategoryMap.cpp */; };
-		94CB257016B0A4270059775D /* TypeFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB256D16B0A4260059775D /* TypeFormat.cpp */; };
-		268900E313353E6F00698AC0 /* TypeList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2110F1B8EC00F91463 /* TypeList.cpp */; };
-		6D9AB3DD1BB2B74E003F2289 /* TypeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */; };
-		94CB257116B0A4270059775D /* TypeSummary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB256E16B0A4260059775D /* TypeSummary.cpp */; };
-		94CB257216B0A4270059775D /* TypeSynthetic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CB256F16B0A4270059775D /* TypeSynthetic.cpp */; };
-		AEEA34051AC88A7400AB639D /* TypeSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AEEA34041AC88A7400AB639D /* TypeSystem.cpp */; };
-		94CD131A19BA33B400DB7BED /* TypeValidator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94CD131919BA33B400DB7BED /* TypeValidator.cpp */; };
-		54067BF11DF2041B00749AA5 /* UBSanRuntime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 54067BEC1DF2034B00749AA5 /* UBSanRuntime.cpp */; };
-		2579065D1BD0488100178368 /* UDPSocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2579065B1BD0488100178368 /* UDPSocket.cpp */; };
-		49CA97001E6AACC900C03FEE /* UUID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49CA96EA1E6AAC6600C03FEE /* UUID.cpp */; };
-		4C639ED021FA684900A7B957 /* UUIDTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639EC221FA684700A7B957 /* UUIDTest.cpp */; };
-		AF0578C4217FA80700CF9D80 /* UdtRecordCompleter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF0578C2217FA80700CF9D80 /* UdtRecordCompleter.cpp */; };
-		268900CD13353E5F00698AC0 /* UniqueDWARFASTType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B8B42312EEC52A00A831B2 /* UniqueDWARFASTType.cpp */; };
-		2689010C13353E6F00698AC0 /* UnixSignals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C00987011500B4300F316B0 /* UnixSignals.cpp */; };
-		9A2057201F3B8D2500F6C293 /* UnixSignalsTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A20571E1F3B8D2100F6C293 /* UnixSignalsTest.cpp */; };
-		263E949F13661AEA00E7D1CE /* UnwindAssembly-x86.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263E949D13661AE400E7D1CE /* UnwindAssembly-x86.cpp */; };
-		264D8D5013661BD7003A368F /* UnwindAssembly.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264D8D4F13661BD7003A368F /* UnwindAssembly.cpp */; };
-		2692BA15136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2692BA13136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp */; };
-		268900AF13353E5000698AC0 /* UnwindLLDB.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF68D32F1255A110002FF25B /* UnwindLLDB.cpp */; };
-		268900B613353E5000698AC0 /* UnwindMacOSXFrameBackchain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E3EEE311A9901300FBADB6 /* UnwindMacOSXFrameBackchain.cpp */; };
-		268900E413353E6F00698AC0 /* UnwindPlan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 961FABB91235DE1600F93A47 /* UnwindPlan.cpp */; };
-		268900E513353E6F00698AC0 /* UnwindTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 961FABBA1235DE1600F93A47 /* UnwindTable.cpp */; };
-		AF2BA6EC1A707E3400C5248A /* UriParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 33064C991A5C7A330033D415 /* UriParser.cpp */; };
-		23CB15351D66DA9300EDDDE1 /* UriParserTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2321F9461BDD346100BA9A93 /* UriParserTest.cpp */; };
-		4C88BC2D1BA391B000AA0964 /* UserExpression.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C0083331B9A5DE200D5CF24 /* UserExpression.cpp */; };
-		AFC2DCEB1E6E2F7D00283714 /* UserID.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCEA1E6E2F7D00283714 /* UserID.cpp */; };
-		4CC57FA2222DFEA40067B7EA /* UserIDResolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CC57FA0222DFEA40067B7EA /* UserIDResolver.cpp */; };
-		2689005413353E0400698AC0 /* UserSettingsController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A4633DC11F65D9A00955CE1 /* UserSettingsController.cpp */; };
-		4C0083401B9F9BA900D5CF24 /* UtilityFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C00833F1B9F9BA900D5CF24 /* UtilityFunction.cpp */; };
-		2654A6901E552ED500DA1013 /* VASprintf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2654A68F1E552ED500DA1013 /* VASprintf.cpp */; };
-		9A2057031F3A605200F6C293 /* VASprintfTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A3D43C41F3150D200EB767C /* VASprintfTest.cpp */; };
-		AFC2DCF01E6E2FD200283714 /* VMRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AFC2DCEF1E6E2FD200283714 /* VMRange.cpp */; };
-		4C639ED821FA684900A7B957 /* VMRangeTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4C639ECA21FA684900A7B957 /* VMRangeTest.cpp */; };
-		26603878211CA90F00329572 /* VSCode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2660386E211CA90D00329572 /* VSCode.cpp */; };
-		2689005613353E0400698AC0 /* Value.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9910F1B85900F91463 /* Value.cpp */; };
-		2689005713353E0400698AC0 /* ValueObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9A10F1B85900F91463 /* ValueObject.cpp */; };
-		94094C6B163B6F840083A547 /* ValueObjectCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94094C69163B6CD90083A547 /* ValueObjectCast.cpp */; };
-		2689005813353E0400698AC0 /* ValueObjectChild.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9B10F1B85900F91463 /* ValueObjectChild.cpp */; };
-		2689005913353E0400698AC0 /* ValueObjectConstResult.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26424E3C125986CB0016D82C /* ValueObjectConstResult.cpp */; };
-		AF1D88691B575E8D003CB899 /* ValueObjectConstResultCast.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF94726E1B575E430063D65C /* ValueObjectConstResultCast.cpp */; };
-		94FA3DE01405D50400833217 /* ValueObjectConstResultChild.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94FA3DDF1405D50300833217 /* ValueObjectConstResultChild.cpp */; };
-		949ADF031406F648004833E1 /* ValueObjectConstResultImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 949ADF021406F648004833E1 /* ValueObjectConstResultImpl.cpp */; };
-		4CD0BD0F134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CD0BD0E134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp */; };
-		2689005A13353E0400698AC0 /* ValueObjectList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9C10F1B85900F91463 /* ValueObjectList.cpp */; };
-		4CABA9E0134A8BCD00539BDD /* ValueObjectMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CABA9DF134A8BCD00539BDD /* ValueObjectMemory.cpp */; };
-		945215DF17F639EE00521C0B /* ValueObjectPrinter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 945215DE17F639EE00521C0B /* ValueObjectPrinter.cpp */; };
-		2689005B13353E0400698AC0 /* ValueObjectRegister.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 264334381110F63100CDB6C6 /* ValueObjectRegister.cpp */; };
-		94B6E76213D88365005F417F /* ValueObjectSyntheticFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 94B6E76113D88362005F417F /* ValueObjectSyntheticFilter.cpp */; };
-		2689005C13353E0400698AC0 /* ValueObjectVariable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E9D10F1B85900F91463 /* ValueObjectVariable.cpp */; };
-		268900E613353E6F00698AC0 /* Variable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2210F1B8EC00F91463 /* Variable.cpp */; };
-		268900E713353E6F00698AC0 /* VariableList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7F2310F1B8EC00F91463 /* VariableList.cpp */; };
-		9418EBCD1AA910910058B02E /* VectorType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9418EBCC1AA910910058B02E /* VectorType.cpp */; };
-		494260DA14579144003C1C78 /* VerifyDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 494260D914579144003C1C78 /* VerifyDecl.cpp */; };
-		2689001113353DB600698AC0 /* Watchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E1810F1B83100F91463 /* Watchpoint.cpp */; };
-		B27318421416AC12006039C8 /* WatchpointList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B27318411416AC12006039C8 /* WatchpointList.cpp */; };
-		B2B7CCF015D1C20F00EEFB57 /* WatchpointOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B2B7CCEF15D1C20F00EEFB57 /* WatchpointOptions.cpp */; };
-		26C7C4831BFFEA7E009BD01F /* WindowsMiniDump.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C7C4811BFFEA7E009BD01F /* WindowsMiniDump.cpp */; };
-		26C7C4841BFFEA7E009BD01F /* WindowsMiniDump.h in Headers */ = {isa = PBXBuildFile; fileRef = 26C7C4821BFFEA7E009BD01F /* WindowsMiniDump.h */; };
-		267A48011B1411E40021A5BC /* XML.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 267A48001B1411E40021A5BC /* XML.cpp */; };
-		940B04D91A8984FF0045D5F7 /* argdumper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 940B04D81A8984FF0045D5F7 /* argdumper.cpp */; };
-		268648C516531BF800F04704 /* com.apple.debugserver.applist.internal.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 268648C216531BF800F04704 /* com.apple.debugserver.applist.internal.plist */; };
-		AFF87C8F150FF688000E1742 /* com.apple.debugserver.applist.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = AFF87C8E150FF688000E1742 /* com.apple.debugserver.applist.plist */; };
-		268648C616531BF800F04704 /* com.apple.debugserver.internal.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 268648C316531BF800F04704 /* com.apple.debugserver.internal.plist */; };
-		AFF87C87150FF669000E1742 /* com.apple.debugserver.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = AFF87C86150FF669000E1742 /* com.apple.debugserver.plist */; };
-		268648C416531BF800F04704 /* com.apple.debugserver.posix.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = 268648C116531BF800F04704 /* com.apple.debugserver.posix.plist */; };
-		AF5CEC88206079A500384F20 /* com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */ = {isa = PBXBuildFile; fileRef = AF5CEC87206079A500384F20 /* com.apple.internal.xpc.remote.debugserver.plist */; };
-		26368AF7126B960500E8659F /* darwin-debug in Resources */ = {isa = PBXBuildFile; fileRef = 26579F68126A25920007C5CB /* darwin-debug */; };
-		26368A3C126B697600E8659F /* darwin-debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26368A3B126B697600E8659F /* darwin-debug.cpp */; };
-		262CFC7711A4510000946C6C /* debugserver in Resources */ = {isa = PBXBuildFile; fileRef = 26CE05A0115C31E50022F371 /* debugserver */; };
-		23CB154B1D66DA9300EDDDE1 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF4C1BDD684B00A5CEAC /* libedit.dylib */; };
-		2656BBC31AE0739C00441749 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C32A10F3DFDD009D5894 /* libedit.dylib */; };
-		26CEB5EF18761CB2008F575A /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C32A10F3DFDD009D5894 /* libedit.dylib */; };
-		26CFDCA818616473000E63E5 /* libedit.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C32A10F3DFDD009D5894 /* libedit.dylib */; };
-		23CB154E1D66DA9300EDDDE1 /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; };
-		2606EDDF184E68A10034641B /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; };
-		268901161335BBC300698AC0 /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; };
-		942829CC1A89839300521B30 /* liblldb-core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */; };
-		239481861C59EBDD00DF7168 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 239481851C59EBDD00DF7168 /* libncurses.dylib */; };
-		23CB154D1D66DA9300EDDDE1 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF471BDD67C100A5CEAC /* libncurses.dylib */; };
-		2656BBC41AE073A800441749 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; };
-		2670F8121862B44A006B332C /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; };
-		26780C611867C33D00234593 /* libncurses.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2670F8111862B44A006B332C /* libncurses.dylib */; };
-		26792622211CA41E00EE1D10 /* libncurses.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 26792621211CA41E00EE1D10 /* libncurses.tbd */; };
-		26680233115FD1A7008E1FE4 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C37410F3F61B009D5894 /* libobjc.dylib */; };
-		23CB154A1D66DA9300EDDDE1 /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF4E1BDD687800A5CEAC /* libpanel.dylib */; };
-		260157C61885F51C00F875CF /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; };
-		260157C81885F53100F875CF /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; };
-		2656BBC51AE073AD00441749 /* libpanel.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 260157C41885F4FF00F875CF /* libpanel.dylib */; };
-		26F5C32D10F3DFDD009D5894 /* libtermcap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26F5C32B10F3DFDD009D5894 /* libtermcap.dylib */; };
-		23CB15491D66DA9300EDDDE1 /* libxml2.2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 23CB14E31D66CA2200EDDDE1 /* libxml2.2.dylib */; };
-		26D55235159A7DB100708D8D /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 26D55234159A7DB100708D8D /* libxml2.dylib */; };
-		23CB154C1D66DA9300EDDDE1 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 2326CF4A1BDD681800A5CEAC /* libz.dylib */; };
-		2656BBC61AE073B500441749 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 966C6B7818E6A56A0093F5EC /* libz.dylib */; };
-		966C6B7918E6A56A0093F5EC /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 966C6B7818E6A56A0093F5EC /* libz.dylib */; };
-		966C6B7A18E6A56A0093F5EC /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 966C6B7818E6A56A0093F5EC /* libz.dylib */; };
-		966C6B7C18E6A56A0093F5EC /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 966C6B7818E6A56A0093F5EC /* libz.dylib */; };
-		940B04E41A8987680045D5F7 /* lldb-argdumper in CopyFiles */ = {isa = PBXBuildFile; fileRef = 942829C01A89835300521B30 /* lldb-argdumper */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
-		2668020E115FD12C008E1FE4 /* lldb-defines.h in Headers */ = {isa = PBXBuildFile; fileRef = 26BC7C2510F1B3BC00F91463 /* lldb-defines.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		2668020F115FD12C008E1FE4 /* lldb-enumerations.h in Headers */ = {isa = PBXBuildFile; fileRef = 26BC7C2610F1B3BC00F91463 /* lldb-enumerations.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		26DE1E6C11616C2E00A093E2 /* lldb-forward.h in Headers */ = {isa = PBXBuildFile; fileRef = 26DE1E6A11616C2E00A093E2 /* lldb-forward.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		E769331C1A94D15400C73337 /* lldb-gdbserver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26D6F3F4183E7F9300194858 /* lldb-gdbserver.cpp */; };
-		26DC6A1D1337FECA00FF7998 /* lldb-platform.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26DC6A1C1337FECA00FF7998 /* lldb-platform.cpp */; };
-		26D265BC136B4269002EEE45 /* lldb-public.h in Headers */ = {isa = PBXBuildFile; fileRef = 26651A14133BEC76005B64B7 /* lldb-public.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		94E829CA152D33C1006F96A3 /* lldb-server in Resources */ = {isa = PBXBuildFile; fileRef = 26DC6A101337FE6900FF7998 /* lldb-server */; };
-		E769331E1A94D18100C73337 /* lldb-server.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E769331D1A94D18100C73337 /* lldb-server.cpp */; };
-		26680214115FD12C008E1FE4 /* lldb-types.h in Headers */ = {isa = PBXBuildFile; fileRef = 26BC7C2910F1B3BC00F91463 /* lldb-types.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		94145431175E63B500284436 /* lldb-versioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 94145430175D7FDE00284436 /* lldb-versioning.h */; settings = {ATTRIBUTES = (Public, ); }; };
-		2679261E211CA3F200EE1D10 /* lldb-vscode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26792619211CA3E100EE1D10 /* lldb-vscode.cpp */; };
-		AF90106515AB7D3600FF120D /* lldb.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = AF90106315AB7C5700FF120D /* lldb.1 */; };
-		2689FFDA13353D9D00698AC0 /* lldb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26BC7E7410F1B85900F91463 /* lldb.cpp */; };
-		AF415AE71D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp in Sources */ = {isa = PBXBuildFile; fileRef = AF415AE51D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp */; };
-		AF415AE81D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = AF415AE61D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
-		239504C41BDD3FD700963CEA /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 456F67721AD46CE9002850C2;
-			remoteInfo = "debugserver-mini";
-		};
-		23CB15311D66DA9300EDDDE1 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 2689FFC913353D7A00698AC0;
-			remoteInfo = "lldb-core";
-		};
-		23E2E5471D904D72006F38BB /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 23CB152F1D66DA9300EDDDE1;
-			remoteInfo = "lldb-gtest-for-debugging";
-		};
-		262CFC7111A450CB00946C6C /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 26CE0593115C31C20022F371;
-			remoteInfo = debugserver;
-		};
-		26368AF5126B95FA00E8659F /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 26579F67126A25920007C5CB;
-			remoteInfo = "darwin-debug";
-		};
-		266803611160110D008E1FE4 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 26680206115FD0ED008E1FE4;
-			remoteInfo = LLDB;
-		};
-		2679261F211CA40700EE1D10 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 26680206115FD0ED008E1FE4;
-			remoteInfo = LLDB;
-		};
-		2689011413353E9B00698AC0 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 2689FFC913353D7A00698AC0;
-			remoteInfo = "lldb-core";
-		};
-		26B391EE1A6DCCAF00456239 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 2690CD161A6DC0D000E717C8;
-			remoteInfo = "lldb-mi";
-		};
-		26B391F01A6DCCBE00456239 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 2690CD161A6DC0D000E717C8;
-			remoteInfo = "lldb-mi";
-		};
-		26CE059F115C31E50022F371 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = 26CE0594115C31C20022F371;
-			remoteInfo = "lldb-debugserver";
-		};
-		26CEF3AF14FD591F007286B2 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 26F5C26910F3D9A4009D5894;
-			remoteInfo = "lldb-tool";
-		};
-		26CEF3BA14FD595B007286B2 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 26F5C26910F3D9A4009D5894;
-			remoteInfo = "lldb-tool";
-		};
-		26CEF3C114FD5973007286B2 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 26F5C26910F3D9A4009D5894;
-			remoteInfo = "lldb-tool";
-		};
-		26DC6A151337FE7300FF7998 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 2689FFC913353D7A00698AC0;
-			remoteInfo = "lldb-core";
-		};
-		26DF745F1A6DCDB300B85563 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 26680206115FD0ED008E1FE4;
-			remoteInfo = LLDB;
-		};
-		942829C91A89836A00521B30 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 2689FFC913353D7A00698AC0;
-			remoteInfo = "lldb-core";
-		};
-		942829CD1A89842900521B30 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 942829BF1A89835300521B30;
-			remoteInfo = argdumper;
-		};
-		94E829C8152D33B4006F96A3 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
-			proxyType = 1;
-			remoteGlobalIDString = 26DC6A0F1337FE6900FF7998;
-			remoteInfo = "lldb-server";
-		};
-		AFA9B71320606A13008E86C6 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 456F67431AD46CE9002850C2;
-			remoteInfo = "debugserver-mini";
-		};
-		AFCA21D11D18E556004386B8 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */;
-			proxyType = 1;
-			remoteGlobalIDString = 456F67431AD46CE9002850C2;
-			remoteInfo = "debugserver-mini";
-		};
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		239504D21BDD451400963CEA /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = /usr/share/man/man1/;
-			dstSubfolderSpec = 0;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 1;
-		};
-		23CB154F1D66DA9300EDDDE1 /* Copy Files */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = /usr/share/man/man1/;
-			dstSubfolderSpec = 0;
-			files = (
-			);
-			name = "Copy Files";
-			runOnlyForDeploymentPostprocessing = 1;
-		};
-		2679260A211CA3AC00EE1D10 /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = /usr/share/man/man1/;
-			dstSubfolderSpec = 0;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 1;
-		};
-		940B04E31A89875C0045D5F7 /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 7;
-			files = (
-				940B04E41A8987680045D5F7 /* lldb-argdumper in CopyFiles */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		942829BE1A89835300521B30 /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = /usr/share/man/man1/;
-			dstSubfolderSpec = 0;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 1;
-		};
-		AF90106415AB7D2900FF120D /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 8;
-			dstPath = "$(DEVELOPER_INSTALL_DIR)/usr/share/man/man1";
-			dstSubfolderSpec = 0;
-			files = (
-				AF90106515AB7D3600FF120D /* lldb.1 in CopyFiles */,
-			);
-			runOnlyForDeploymentPostprocessing = 1;
-		};
-		AFA9B71820606A13008E86C6 /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 8;
-			dstPath = /AppleInternal/Library/LaunchDaemons;
-			dstSubfolderSpec = 0;
-			files = (
-				AF5CEC88206079A500384F20 /* com.apple.internal.xpc.remote.debugserver.plist in CopyFiles */,
-			);
-			runOnlyForDeploymentPostprocessing = 1;
-		};
-		AFF87C85150FF5CC000E1742 /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 8;
-			dstPath = /Developer/Library/Lockdown/ServiceAgents/;
-			dstSubfolderSpec = 0;
-			files = (
-				268648C416531BF800F04704 /* com.apple.debugserver.posix.plist in CopyFiles */,
-				268648C516531BF800F04704 /* com.apple.debugserver.applist.internal.plist in CopyFiles */,
-				268648C616531BF800F04704 /* com.apple.debugserver.internal.plist in CopyFiles */,
-				AFF87C87150FF669000E1742 /* com.apple.debugserver.plist in CopyFiles */,
-				AFF87C8F150FF688000E1742 /* com.apple.debugserver.applist.plist in CopyFiles */,
-			);
-			runOnlyForDeploymentPostprocessing = 1;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		497E7B9D1188F6690065CCA1 /* ABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABI.cpp; path = source/Target/ABI.cpp; sourceTree = "<group>"; };
-		497E7B331188ED300065CCA1 /* ABI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABI.h; path = include/lldb/Target/ABI.h; sourceTree = "<group>"; };
-		26DB3E071379E7AD0080DC73 /* ABIMacOSX_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABIMacOSX_arm.cpp; sourceTree = "<group>"; };
-		26DB3E081379E7AD0080DC73 /* ABIMacOSX_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABIMacOSX_arm.h; sourceTree = "<group>"; };
-		26DB3E0B1379E7AD0080DC73 /* ABIMacOSX_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABIMacOSX_arm64.cpp; sourceTree = "<group>"; };
-		26DB3E0C1379E7AD0080DC73 /* ABIMacOSX_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABIMacOSX_arm64.h; sourceTree = "<group>"; };
-		26DB3E0F1379E7AD0080DC73 /* ABIMacOSX_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABIMacOSX_i386.cpp; sourceTree = "<group>"; };
-		26DB3E101379E7AD0080DC73 /* ABIMacOSX_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABIMacOSX_i386.h; sourceTree = "<group>"; };
-		AF20F7641AF18F8500751A6E /* ABISysV_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_arm.cpp; path = "SysV-arm/ABISysV_arm.cpp"; sourceTree = "<group>"; };
-		AF20F7651AF18F8500751A6E /* ABISysV_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_arm.h; path = "SysV-arm/ABISysV_arm.h"; sourceTree = "<group>"; };
-		AF20F7681AF18F9000751A6E /* ABISysV_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_arm64.cpp; path = "SysV-arm64/ABISysV_arm64.cpp"; sourceTree = "<group>"; };
-		AF20F7691AF18F9000751A6E /* ABISysV_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_arm64.h; path = "SysV-arm64/ABISysV_arm64.h"; sourceTree = "<group>"; };
-		26BF51EA1B3C754400016294 /* ABISysV_hexagon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_hexagon.cpp; sourceTree = "<group>"; };
-		26BF51EB1B3C754400016294 /* ABISysV_hexagon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_hexagon.h; sourceTree = "<group>"; };
-		26BF51EF1B3C754400016294 /* ABISysV_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_i386.cpp; sourceTree = "<group>"; };
-		26BF51F01B3C754400016294 /* ABISysV_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_i386.h; sourceTree = "<group>"; };
-		9694FA6F1B32AA64005EBB16 /* ABISysV_mips.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_mips.cpp; path = "SysV-mips/ABISysV_mips.cpp"; sourceTree = "<group>"; };
-		9694FA701B32AA64005EBB16 /* ABISysV_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_mips.h; path = "SysV-mips/ABISysV_mips.h"; sourceTree = "<group>"; };
-		263641151B34AEE200145B2F /* ABISysV_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_mips64.cpp; sourceTree = "<group>"; };
-		263641161B34AEE200145B2F /* ABISysV_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_mips64.h; sourceTree = "<group>"; };
-		AF77E08D1A033C700096C0EA /* ABISysV_ppc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_ppc.cpp; path = "SysV-ppc/ABISysV_ppc.cpp"; sourceTree = "<group>"; };
-		AF77E08E1A033C700096C0EA /* ABISysV_ppc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_ppc.h; path = "SysV-ppc/ABISysV_ppc.h"; sourceTree = "<group>"; };
-		AF77E0911A033C7F0096C0EA /* ABISysV_ppc64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ABISysV_ppc64.cpp; path = "SysV-ppc64/ABISysV_ppc64.cpp"; sourceTree = "<group>"; };
-		AF77E0921A033C7F0096C0EA /* ABISysV_ppc64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ABISysV_ppc64.h; path = "SysV-ppc64/ABISysV_ppc64.h"; sourceTree = "<group>"; };
-		267F68471CC02DED0086832B /* ABISysV_s390x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_s390x.cpp; sourceTree = "<group>"; };
-		267F68481CC02DED0086832B /* ABISysV_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_s390x.h; sourceTree = "<group>"; };
-		26DB3E131379E7AD0080DC73 /* ABISysV_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABISysV_x86_64.cpp; sourceTree = "<group>"; };
-		26DB3E141379E7AD0080DC73 /* ABISysV_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABISysV_x86_64.h; sourceTree = "<group>"; };
-		AF352EDB22C17BD700D058B6 /* ABIWindows_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ABIWindows_x86_64.cpp; sourceTree = "<group>"; };
-		AF352EDC22C17BD700D058B6 /* ABIWindows_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ABIWindows_x86_64.h; sourceTree = "<group>"; };
-		264A12FF137252C700875C42 /* ARM64_DWARF_Registers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARM64_DWARF_Registers.h; path = source/Utility/ARM64_DWARF_Registers.h; sourceTree = "<group>"; };
-		B287E63E12EFAE2C00C9BEFE /* ARMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMDefines.h; path = Utility/ARMDefines.h; sourceTree = "<group>"; };
-		B23DD24F12EDFAC1000C3894 /* ARMUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARMUtils.h; path = Utility/ARMUtils.h; sourceTree = "<group>"; };
-		26F996A7119B79C300412154 /* ARM_DWARF_Registers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ARM_DWARF_Registers.h; path = source/Utility/ARM_DWARF_Registers.h; sourceTree = "<group>"; };
-		4906FD4012F2255300A2A77C /* ASTDumper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTDumper.cpp; path = ExpressionParser/Clang/ASTDumper.cpp; sourceTree = "<group>"; };
-		4906FD4412F2257600A2A77C /* ASTDumper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTDumper.h; path = ExpressionParser/Clang/ASTDumper.h; sourceTree = "<group>"; };
-		49A8A39F11D568A300AD3B68 /* ASTResultSynthesizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTResultSynthesizer.cpp; path = ExpressionParser/Clang/ASTResultSynthesizer.cpp; sourceTree = "<group>"; };
-		49A8A3A311D568BF00AD3B68 /* ASTResultSynthesizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTResultSynthesizer.h; path = ExpressionParser/Clang/ASTResultSynthesizer.h; sourceTree = "<group>"; };
-		491193501226386000578B7F /* ASTStructExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTStructExtractor.cpp; path = ExpressionParser/Clang/ASTStructExtractor.cpp; sourceTree = "<group>"; };
-		4911934B1226383D00578B7F /* ASTStructExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTStructExtractor.h; path = ExpressionParser/Clang/ASTStructExtractor.h; sourceTree = "<group>"; };
-		4C0B957E2238342C0026C840 /* ASTUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ASTUtils.cpp; path = ExpressionParser/Clang/ASTUtils.cpp; sourceTree = "<group>"; };
-		4C0B957F2238342C0026C840 /* ASTUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTUtils.h; path = ExpressionParser/Clang/ASTUtils.h; sourceTree = "<group>"; };
-		8CF02AE519DCBF8400B14BE0 /* ASanRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ASanRuntime.cpp; sourceTree = "<group>"; };
-		8CF02AE619DCBF8400B14BE0 /* ASanRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASanRuntime.h; sourceTree = "<group>"; };
-		257906621BD5AFD000178368 /* Acceptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Acceptor.cpp; path = "tools/lldb-server/Acceptor.cpp"; sourceTree = "<group>"; };
-		257906631BD5AFD000178368 /* Acceptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Acceptor.h; path = "tools/lldb-server/Acceptor.h"; sourceTree = "<group>"; };
-		25EF23751AC09AD800908DF0 /* AdbClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AdbClient.cpp; sourceTree = "<group>"; };
-		25EF23761AC09AD800908DF0 /* AdbClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdbClient.h; sourceTree = "<group>"; };
-		236102981CF38A2B00B8E0B9 /* AddLLDB.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AddLLDB.cmake; sourceTree = "<group>"; };
-		26BC7E6910F1B85900F91463 /* Address.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Address.cpp; path = source/Core/Address.cpp; sourceTree = "<group>"; };
-		26BC7D5010F1B77400F91463 /* Address.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Address.h; path = include/lldb/Core/Address.h; sourceTree = "<group>"; };
-		26BC7E6A10F1B85900F91463 /* AddressRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddressRange.cpp; path = source/Core/AddressRange.cpp; sourceTree = "<group>"; };
-		26BC7D5110F1B77400F91463 /* AddressRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressRange.h; path = include/lldb/Core/AddressRange.h; sourceTree = "<group>"; };
-		9AC7034011752C6B0086C050 /* AddressResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddressResolver.cpp; path = source/Core/AddressResolver.cpp; sourceTree = "<group>"; };
-		9AC7033E11752C540086C050 /* AddressResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressResolver.h; path = include/lldb/Core/AddressResolver.h; sourceTree = "<group>"; };
-		9AC7034211752C720086C050 /* AddressResolverFileLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddressResolverFileLine.cpp; path = source/Core/AddressResolverFileLine.cpp; sourceTree = "<group>"; };
-		9AC7033D11752C4C0086C050 /* AddressResolverFileLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressResolverFileLine.h; path = include/lldb/Core/AddressResolverFileLine.h; sourceTree = "<group>"; };
-		9AC7034411752C790086C050 /* AddressResolverName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AddressResolverName.cpp; path = source/Core/AddressResolverName.cpp; sourceTree = "<group>"; };
-		9AC7033F11752C590086C050 /* AddressResolverName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AddressResolverName.h; path = include/lldb/Core/AddressResolverName.h; sourceTree = "<group>"; };
-		2361029E1CF38A3500B8E0B9 /* Android.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Android.cmake; sourceTree = "<group>"; };
-		6D55BAE21A8CD06000A70529 /* Android.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Android.h; path = include/lldb/Host/android/Android.h; sourceTree = "<group>"; };
-		26CF992414428766001E4138 /* AnsiTerminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AnsiTerminal.h; path = include/lldb/Utility/AnsiTerminal.h; sourceTree = "<group>"; };
-		4C639EC721FA684800A7B957 /* AnsiTerminalTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AnsiTerminalTest.cpp; sourceTree = "<group>"; };
-		4CD44CFA20B37C440003557C /* AppleDWARFIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleDWARFIndex.cpp; sourceTree = "<group>"; };
-		4CD44CFF20B37C580003557C /* AppleDWARFIndex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleDWARFIndex.h; sourceTree = "<group>"; };
-		AF0E22EE18A09FB20009B7D1 /* AppleGetItemInfoHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGetItemInfoHandler.cpp; sourceTree = "<group>"; };
-		AF0E22EF18A09FB20009B7D1 /* AppleGetItemInfoHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleGetItemInfoHandler.h; sourceTree = "<group>"; };
-		AF1F7B05189C904B0087DB9C /* AppleGetPendingItemsHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGetPendingItemsHandler.cpp; sourceTree = "<group>"; };
-		AF1F7B06189C904B0087DB9C /* AppleGetPendingItemsHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleGetPendingItemsHandler.h; sourceTree = "<group>"; };
-		AF25AB24188F685C0030DEC3 /* AppleGetQueuesHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGetQueuesHandler.cpp; sourceTree = "<group>"; };
-		AF25AB25188F685C0030DEC3 /* AppleGetQueuesHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleGetQueuesHandler.h; sourceTree = "<group>"; };
-		AF45FDE318A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleGetThreadItemInfoHandler.cpp; sourceTree = "<group>"; };
-		AF45FDE418A1F3AC0007051C /* AppleGetThreadItemInfoHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleGetThreadItemInfoHandler.h; sourceTree = "<group>"; };
-		94CD7D0819A3FBA300908B7C /* AppleObjCClassDescriptorV2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleObjCClassDescriptorV2.cpp; sourceTree = "<group>"; };
-		94CD7D0719A3FB8600908B7C /* AppleObjCClassDescriptorV2.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleObjCClassDescriptorV2.h; sourceTree = "<group>"; };
-		49DA65021485C92A005FF180 /* AppleObjCDeclVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = AppleObjCDeclVendor.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
-		49DA65041485C942005FF180 /* AppleObjCDeclVendor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleObjCDeclVendor.h; sourceTree = "<group>"; };
-		4CCA644213B40B82003BDF98 /* AppleObjCRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleObjCRuntime.cpp; sourceTree = "<group>"; };
-		4CCA644313B40B82003BDF98 /* AppleObjCRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleObjCRuntime.h; sourceTree = "<group>"; };
-		4CCA644413B40B82003BDF98 /* AppleObjCRuntimeV1.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = AppleObjCRuntimeV1.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
-		4CCA644513B40B82003BDF98 /* AppleObjCRuntimeV1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AppleObjCRuntimeV1.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
-		4CCA644613B40B82003BDF98 /* AppleObjCRuntimeV2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = AppleObjCRuntimeV2.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
-		4CCA644713B40B82003BDF98 /* AppleObjCRuntimeV2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = AppleObjCRuntimeV2.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
-		4CCA644813B40B82003BDF98 /* AppleObjCTrampolineHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleObjCTrampolineHandler.cpp; sourceTree = "<group>"; };
-		4CCA644913B40B82003BDF98 /* AppleObjCTrampolineHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleObjCTrampolineHandler.h; sourceTree = "<group>"; };
-		94CD7D0B19A3FBCE00908B7C /* AppleObjCTypeEncodingParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = AppleObjCTypeEncodingParser.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
-		94CD7D0A19A3FBC300908B7C /* AppleObjCTypeEncodingParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppleObjCTypeEncodingParser.h; sourceTree = "<group>"; };
-		4CCA644A13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppleThreadPlanStepThroughObjCTrampoline.cpp; sourceTree = "<group>"; };
-		4CCA644B13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleThreadPlanStepThroughObjCTrampoline.h; sourceTree = "<group>"; };
-		AF6CA6651FBBAF27005A0DC3 /* ArchSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArchSpec.cpp; path = source/Utility/ArchSpec.cpp; sourceTree = "<group>"; };
-		AF6CA6671FBBAF37005A0DC3 /* ArchSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ArchSpec.h; path = include/lldb/Utility/ArchSpec.h; sourceTree = "<group>"; };
-		23E2E5161D903689006F38BB /* ArchSpecTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArchSpecTest.cpp; sourceTree = "<group>"; };
-		AF2E02A11FA2CEAF00A86C34 /* ArchitectureArm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArchitectureArm.cpp; sourceTree = "<group>"; };
-		AF2E02A21FA2CEAF00A86C34 /* ArchitectureArm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchitectureArm.h; sourceTree = "<group>"; };
-		2647B63021C4366300A81D15 /* ArchitectureMips.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArchitectureMips.cpp; path = source/Plugins/Architecture/Mips/ArchitectureMips.cpp; sourceTree = SOURCE_ROOT; };
-		2647B62F21C4366200A81D15 /* ArchitectureMips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ArchitectureMips.h; path = source/Plugins/Architecture/Mips/ArchitectureMips.h; sourceTree = SOURCE_ROOT; };
-		4C14CEF82057258D00DEEF94 /* ArchitecturePPC64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArchitecturePPC64.cpp; sourceTree = "<group>"; };
-		4C14CEF72057258D00DEEF94 /* ArchitecturePPC64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchitecturePPC64.h; sourceTree = "<group>"; };
-		26BC7E6C10F1B85900F91463 /* Args.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Args.cpp; path = source/Utility/Args.cpp; sourceTree = "<group>"; };
-		26BC7D5310F1B77400F91463 /* Args.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Args.h; path = include/lldb/Utility/Args.h; sourceTree = "<group>"; };
-		2321F93E1BDD33CE00BA9A93 /* ArgsTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ArgsTest.cpp; path = ../Utility/ArgsTest.cpp; sourceTree = "<group>"; };
-		6D99A3621BBC2F3200979793 /* ArmUnwindInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ArmUnwindInfo.cpp; path = source/Symbol/ArmUnwindInfo.cpp; sourceTree = "<group>"; };
-		6D99A3611BBC2F1600979793 /* ArmUnwindInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ArmUnwindInfo.h; path = include/lldb/Symbol/ArmUnwindInfo.h; sourceTree = "<group>"; };
-		3FDFE54719A2946B009756A7 /* AutoHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AutoHandle.h; path = include/lldb/Host/windows/AutoHandle.h; sourceTree = "<group>"; };
-		AF7BD81A22B04E20008E78D1 /* AuxVector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AuxVector.cpp; path = Utility/AuxVector.cpp; sourceTree = "<group>"; };
-		AFC2DCE81E6E2F2C00283714 /* Baton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Baton.cpp; path = source/Utility/Baton.cpp; sourceTree = "<group>"; };
-		AFC2DCEE1E6E2FA300283714 /* Baton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Baton.h; path = include/lldb/Utility/Baton.h; sourceTree = "<group>"; };
-		26BC7F1310F1B8EC00F91463 /* Block.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Block.cpp; path = source/Symbol/Block.cpp; sourceTree = "<group>"; };
-		26BC7C5510F1B6E900F91463 /* Block.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Block.h; path = include/lldb/Symbol/Block.h; sourceTree = "<group>"; };
-		49DEF11F1CD7BD90006A7C7D /* BlockPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BlockPointer.cpp; path = Language/CPlusPlus/BlockPointer.cpp; sourceTree = "<group>"; };
-		49DEF1201CD7BD90006A7C7D /* BlockPointer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlockPointer.h; path = Language/CPlusPlus/BlockPointer.h; sourceTree = "<group>"; };
-		4CAEC6A621F26D15007C3DD5 /* BreakpadRecords.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BreakpadRecords.cpp; sourceTree = "<group>"; };
-		4CAEC6A721F26D15007C3DD5 /* BreakpadRecords.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BreakpadRecords.h; sourceTree = "<group>"; };
-		26BC7E0A10F1B83100F91463 /* Breakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Breakpoint.cpp; path = source/Breakpoint/Breakpoint.cpp; sourceTree = "<group>"; };
-		26BC7CEE10F1B71400F91463 /* Breakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Breakpoint.h; path = include/lldb/Breakpoint/Breakpoint.h; sourceTree = "<group>"; };
-		2660387D211CA98200329572 /* BreakpointBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointBase.cpp; path = "tools/lldb-vscode/BreakpointBase.cpp"; sourceTree = "<group>"; };
-		26603872211CA90D00329572 /* BreakpointBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointBase.h; path = "tools/lldb-vscode/BreakpointBase.h"; sourceTree = "<group>"; };
-		26BC7E0B10F1B83100F91463 /* BreakpointID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointID.cpp; path = source/Breakpoint/BreakpointID.cpp; sourceTree = "<group>"; };
-		26BC7CEF10F1B71400F91463 /* BreakpointID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointID.h; path = include/lldb/Breakpoint/BreakpointID.h; sourceTree = "<group>"; };
-		26BC7E0C10F1B83100F91463 /* BreakpointIDList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointIDList.cpp; path = source/Breakpoint/BreakpointIDList.cpp; sourceTree = "<group>"; };
-		26BC7CF010F1B71400F91463 /* BreakpointIDList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointIDList.h; path = include/lldb/Breakpoint/BreakpointIDList.h; sourceTree = "<group>"; };
-		23E2E52D1D90382B006F38BB /* BreakpointIDTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BreakpointIDTest.cpp; sourceTree = "<group>"; };
-		26BC7E0D10F1B83100F91463 /* BreakpointList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointList.cpp; path = source/Breakpoint/BreakpointList.cpp; sourceTree = "<group>"; };
-		26BC7CF110F1B71400F91463 /* BreakpointList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointList.h; path = include/lldb/Breakpoint/BreakpointList.h; sourceTree = "<group>"; };
-		26BC7E0E10F1B83100F91463 /* BreakpointLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointLocation.cpp; path = source/Breakpoint/BreakpointLocation.cpp; sourceTree = "<group>"; };
-		26BC7CF210F1B71400F91463 /* BreakpointLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointLocation.h; path = include/lldb/Breakpoint/BreakpointLocation.h; sourceTree = "<group>"; };
-		26BC7E0F10F1B83100F91463 /* BreakpointLocationCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointLocationCollection.cpp; path = source/Breakpoint/BreakpointLocationCollection.cpp; sourceTree = "<group>"; };
-		26BC7CF310F1B71400F91463 /* BreakpointLocationCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointLocationCollection.h; path = include/lldb/Breakpoint/BreakpointLocationCollection.h; sourceTree = "<group>"; };
-		26BC7E1010F1B83100F91463 /* BreakpointLocationList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointLocationList.cpp; path = source/Breakpoint/BreakpointLocationList.cpp; sourceTree = "<group>"; };
-		26BC7CF410F1B71400F91463 /* BreakpointLocationList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointLocationList.h; path = include/lldb/Breakpoint/BreakpointLocationList.h; sourceTree = "<group>"; };
-		4C7D48281F509CCD005314B4 /* BreakpointName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointName.cpp; path = source/Breakpoint/BreakpointName.cpp; sourceTree = "<group>"; };
-		4C7D482B1F509CF5005314B4 /* BreakpointName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointName.h; path = include/lldb/Breakpoint/BreakpointName.h; sourceTree = "<group>"; };
-		26BC7E1110F1B83100F91463 /* BreakpointOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointOptions.cpp; path = source/Breakpoint/BreakpointOptions.cpp; sourceTree = "<group>"; };
-		26BC7CF510F1B71400F91463 /* BreakpointOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointOptions.h; path = include/lldb/Breakpoint/BreakpointOptions.h; sourceTree = "<group>"; };
-		AF352EE022C17C0C00D058B6 /* BreakpointPrecondition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointPrecondition.cpp; path = source/Breakpoint/BreakpointPrecondition.cpp; sourceTree = "<group>"; };
-		26BC7E1210F1B83100F91463 /* BreakpointResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolver.cpp; path = source/Breakpoint/BreakpointResolver.cpp; sourceTree = "<group>"; };
-		26BC7CF610F1B71400F91463 /* BreakpointResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolver.h; path = include/lldb/Breakpoint/BreakpointResolver.h; sourceTree = "<group>"; };
-		26D0DD5310FE555900271C65 /* BreakpointResolverAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolverAddress.cpp; path = source/Breakpoint/BreakpointResolverAddress.cpp; sourceTree = "<group>"; };
-		26D0DD5010FE554D00271C65 /* BreakpointResolverAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolverAddress.h; path = include/lldb/Breakpoint/BreakpointResolverAddress.h; sourceTree = "<group>"; };
-		26D0DD5410FE555900271C65 /* BreakpointResolverFileLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolverFileLine.cpp; path = source/Breakpoint/BreakpointResolverFileLine.cpp; sourceTree = "<group>"; };
-		26D0DD5110FE554D00271C65 /* BreakpointResolverFileLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolverFileLine.h; path = include/lldb/Breakpoint/BreakpointResolverFileLine.h; sourceTree = "<group>"; };
-		4CAA56141422D986001FFA01 /* BreakpointResolverFileRegex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolverFileRegex.cpp; path = source/Breakpoint/BreakpointResolverFileRegex.cpp; sourceTree = "<group>"; };
-		4CAA56121422D96A001FFA01 /* BreakpointResolverFileRegex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolverFileRegex.h; path = include/lldb/Breakpoint/BreakpointResolverFileRegex.h; sourceTree = "<group>"; };
-		26D0DD5510FE555900271C65 /* BreakpointResolverName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolverName.cpp; path = source/Breakpoint/BreakpointResolverName.cpp; sourceTree = "<group>"; };
-		26D0DD5210FE554D00271C65 /* BreakpointResolverName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointResolverName.h; path = include/lldb/Breakpoint/BreakpointResolverName.h; sourceTree = "<group>"; };
-		4CCF9F5E2143012F006CC7EA /* BreakpointResolverScripted.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointResolverScripted.cpp; path = source/Breakpoint/BreakpointResolverScripted.cpp; sourceTree = "<group>"; };
-		4CCF9F6021430141006CC7EA /* BreakpointResolverScripted.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = BreakpointResolverScripted.h; path = include/lldb/Breakpoint/BreakpointResolverScripted.h; sourceTree = "<group>"; };
-		26BC7E1310F1B83100F91463 /* BreakpointSite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointSite.cpp; path = source/Breakpoint/BreakpointSite.cpp; sourceTree = "<group>"; };
-		26BC7CF710F1B71400F91463 /* BreakpointSite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointSite.h; path = include/lldb/Breakpoint/BreakpointSite.h; sourceTree = "<group>"; };
-		26BC7E1410F1B83100F91463 /* BreakpointSiteList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BreakpointSiteList.cpp; path = source/Breakpoint/BreakpointSiteList.cpp; sourceTree = "<group>"; };
-		26BC7CF810F1B71400F91463 /* BreakpointSiteList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BreakpointSiteList.h; path = include/lldb/Breakpoint/BreakpointSiteList.h; sourceTree = "<group>"; };
-		2647B63921C436AB00A81D15 /* Broadcaster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Broadcaster.cpp; path = source/Utility/Broadcaster.cpp; sourceTree = "<group>"; };
-		2647B63521C4368300A81D15 /* Broadcaster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Broadcaster.h; path = include/lldb/Utility/Broadcaster.h; sourceTree = "<group>"; };
-		23CB14E61D66CC0E00EDDDE1 /* BroadcasterTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BroadcasterTest.cpp; sourceTree = "<group>"; };
-		949EEDAC1BA76719008C63CF /* CF.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CF.cpp; path = Language/ObjC/CF.cpp; sourceTree = "<group>"; };
-		949EEDAD1BA76719008C63CF /* CF.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CF.h; path = Language/ObjC/CF.h; sourceTree = "<group>"; };
-		26BC7EED10F1B8AD00F91463 /* CFCBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCBundle.cpp; path = source/Host/macosx/cfcpp/CFCBundle.cpp; sourceTree = "<group>"; };
-		26BC7EEE10F1B8AD00F91463 /* CFCBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCBundle.h; path = source/Host/macosx/cfcpp/CFCBundle.h; sourceTree = "<group>"; };
-		26BC7EEF10F1B8AD00F91463 /* CFCData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCData.cpp; path = source/Host/macosx/cfcpp/CFCData.cpp; sourceTree = "<group>"; };
-		26BC7EF010F1B8AD00F91463 /* CFCData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCData.h; path = source/Host/macosx/cfcpp/CFCData.h; sourceTree = "<group>"; };
-		26BC7EF110F1B8AD00F91463 /* CFCMutableArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCMutableArray.cpp; path = source/Host/macosx/cfcpp/CFCMutableArray.cpp; sourceTree = "<group>"; };
-		26BC7EF210F1B8AD00F91463 /* CFCMutableArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCMutableArray.h; path = source/Host/macosx/cfcpp/CFCMutableArray.h; sourceTree = "<group>"; };
-		26BC7EF310F1B8AD00F91463 /* CFCMutableDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCMutableDictionary.cpp; path = source/Host/macosx/cfcpp/CFCMutableDictionary.cpp; sourceTree = "<group>"; };
-		26BC7EF410F1B8AD00F91463 /* CFCMutableDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCMutableDictionary.h; path = source/Host/macosx/cfcpp/CFCMutableDictionary.h; sourceTree = "<group>"; };
-		26BC7EF510F1B8AD00F91463 /* CFCMutableSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCMutableSet.cpp; path = source/Host/macosx/cfcpp/CFCMutableSet.cpp; sourceTree = "<group>"; };
-		26BC7EF610F1B8AD00F91463 /* CFCMutableSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCMutableSet.h; path = source/Host/macosx/cfcpp/CFCMutableSet.h; sourceTree = "<group>"; };
-		26BC7EF710F1B8AD00F91463 /* CFCReleaser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCReleaser.h; path = source/Host/macosx/cfcpp/CFCReleaser.h; sourceTree = "<group>"; };
-		26BC7EF810F1B8AD00F91463 /* CFCString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CFCString.cpp; path = source/Host/macosx/cfcpp/CFCString.cpp; sourceTree = "<group>"; };
-		26BC7EF910F1B8AD00F91463 /* CFCString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFCString.h; path = source/Host/macosx/cfcpp/CFCString.h; sourceTree = "<group>"; };
-		230EC4571D63C3A7008DF59F /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = source/Target/CMakeLists.txt; sourceTree = "<group>"; };
-		2321F9381BDD332400BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		2321F93D1BDD33CE00BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		2321F9401BDD340D00BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		2321F9431BDD346100BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		2321F94C1BDD360F00BA9A93 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		2370A37A1D66C57B000E7BE6 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		2370A37C1D66C587000E7BE6 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		2374D7431D4BAA1D005C9575 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23CB14E71D66CC0E00EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23CB14F11D66CC9000EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23CB14F31D66CC9B00EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23CB14F61D66CCD600EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23CB14F91D66CCF100EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23CB150B1D66CF5600EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23CB15101D66CF6900EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23CB15131D66CF8700EDDDE1 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23D065811D4A7BDA0008EDE6 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23E2E5191D9036F2006F38BB /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		23E2E5361D9048FB006F38BB /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		2669415B1A6DC2AB0063BE93 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = "tools/lldb-mi/CMakeLists.txt"; sourceTree = SOURCE_ROOT; };
-		26792617211CA3E100EE1D10 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = "tools/lldb-vscode/CMakeLists.txt"; sourceTree = "<group>"; };
-		9A1890311F47D5D400394BCA /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CMakeLists.txt; path = TestingSupport/CMakeLists.txt; sourceTree = "<group>"; };
-		AF352EDD22C17BD700D058B6 /* CMakeLists.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CMakeLists.txt; sourceTree = "<group>"; };
-		AF9E360B22DD3BFB000B7776 /* CPPLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CPPLanguageRuntime.cpp; sourceTree = "<group>"; };
-		94B6385B1B8FB174004FE1E4 /* CPlusPlusLanguage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CPlusPlusLanguage.cpp; path = Language/CPlusPlus/CPlusPlusLanguage.cpp; sourceTree = "<group>"; };
-		94B6385C1B8FB174004FE1E4 /* CPlusPlusLanguage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CPlusPlusLanguage.h; path = Language/CPlusPlus/CPlusPlusLanguage.h; sourceTree = "<group>"; };
-		23CB14FA1D66CCF100EDDDE1 /* CPlusPlusLanguageTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CPlusPlusLanguageTest.cpp; sourceTree = "<group>"; };
-		49F811EF1E931B1500F4E163 /* CPlusPlusNameParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CPlusPlusNameParser.cpp; path = Language/CPlusPlus/CPlusPlusNameParser.cpp; sourceTree = "<group>"; };
-		49F811F01E931B1500F4E163 /* CPlusPlusNameParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CPlusPlusNameParser.h; path = Language/CPlusPlus/CPlusPlusNameParser.h; sourceTree = "<group>"; };
-		945261C71B9A14D300BF138D /* CXXFunctionPointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CXXFunctionPointer.cpp; path = source/DataFormatters/CXXFunctionPointer.cpp; sourceTree = "<group>"; };
-		945261C91B9A14E000BF138D /* CXXFunctionPointer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CXXFunctionPointer.h; path = include/lldb/DataFormatters/CXXFunctionPointer.h; sourceTree = "<group>"; };
-		26BC7F1410F1B8EC00F91463 /* ClangASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangASTContext.cpp; path = source/Symbol/ClangASTContext.cpp; sourceTree = "<group>"; };
-		26BC7C5610F1B6E900F91463 /* ClangASTContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangASTContext.h; path = include/lldb/Symbol/ClangASTContext.h; sourceTree = "<group>"; };
-		49D8FB3513B558DE00411094 /* ClangASTImporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangASTImporter.cpp; path = source/Symbol/ClangASTImporter.cpp; sourceTree = "<group>"; };
-		49D8FB3713B5594900411094 /* ClangASTImporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangASTImporter.h; path = include/lldb/Symbol/ClangASTImporter.h; sourceTree = "<group>"; };
-		49D7072811B5AD11001AD875 /* ClangASTSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangASTSource.cpp; path = ExpressionParser/Clang/ClangASTSource.cpp; sourceTree = "<group>"; };
-		49D7072611B5AD03001AD875 /* ClangASTSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangASTSource.h; path = ExpressionParser/Clang/ClangASTSource.h; sourceTree = "<group>"; };
-		4C3DA2301CA0BFB800CEB1D4 /* ClangDiagnostic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangDiagnostic.h; path = ExpressionParser/Clang/ClangDiagnostic.h; sourceTree = "<group>"; };
-		49F1A74511B3388F003ED505 /* ClangExpressionDeclMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionDeclMap.cpp; path = ExpressionParser/Clang/ClangExpressionDeclMap.cpp; sourceTree = "<group>"; };
-		49F1A74911B338AE003ED505 /* ClangExpressionDeclMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionDeclMap.h; path = ExpressionParser/Clang/ClangExpressionDeclMap.h; sourceTree = "<group>"; };
-		26BC7DC010F1B79500F91463 /* ClangExpressionHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionHelper.h; path = ExpressionParser/Clang/ClangExpressionHelper.h; sourceTree = "<group>"; };
-		49445C2512245E3600C11A81 /* ClangExpressionParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionParser.cpp; path = ExpressionParser/Clang/ClangExpressionParser.cpp; sourceTree = "<group>"; };
-		49445C2912245E5500C11A81 /* ClangExpressionParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionParser.h; path = ExpressionParser/Clang/ClangExpressionParser.h; sourceTree = "<group>"; };
-		4C61465C223059B000D686F9 /* ClangExpressionSourceCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionSourceCode.cpp; path = ExpressionParser/Clang/ClangExpressionSourceCode.cpp; sourceTree = "<group>"; };
-		4C61465D223059B000D686F9 /* ClangExpressionSourceCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionSourceCode.h; path = ExpressionParser/Clang/ClangExpressionSourceCode.h; sourceTree = "<group>"; };
-		4984BA0E1B978C3E008658D4 /* ClangExpressionVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExpressionVariable.cpp; path = ExpressionParser/Clang/ClangExpressionVariable.cpp; sourceTree = "<group>"; };
-		4984BA0F1B978C3E008658D4 /* ClangExpressionVariable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExpressionVariable.h; path = ExpressionParser/Clang/ClangExpressionVariable.h; sourceTree = "<group>"; };
-		26E69030129C6BEF00DDECD9 /* ClangExternalASTSourceCallbacks.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExternalASTSourceCallbacks.cpp; path = source/Symbol/ClangExternalASTSourceCallbacks.cpp; sourceTree = "<group>"; };
-		26E6902E129C6BD500DDECD9 /* ClangExternalASTSourceCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangExternalASTSourceCallbacks.h; path = include/lldb/Symbol/ClangExternalASTSourceCallbacks.h; sourceTree = "<group>"; };
-		4966DCC3148978A10028481B /* ClangExternalASTSourceCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangExternalASTSourceCommon.cpp; path = source/Symbol/ClangExternalASTSourceCommon.cpp; sourceTree = "<group>"; };
-		495B38431489714C002708C5 /* ClangExternalASTSourceCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ClangExternalASTSourceCommon.h; path = include/lldb/Symbol/ClangExternalASTSourceCommon.h; sourceTree = "<group>"; };
-		26BC7D5510F1B77400F91463 /* ClangForward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangForward.h; path = include/lldb/Core/ClangForward.h; sourceTree = "<group>"; };
-		4C98D3DA118FB96F00E575D0 /* ClangFunctionCaller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangFunctionCaller.cpp; path = ExpressionParser/Clang/ClangFunctionCaller.cpp; sourceTree = "<group>"; };
-		4C98D3E0118FB98F00E575D0 /* ClangFunctionCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangFunctionCaller.h; path = ExpressionParser/Clang/ClangFunctionCaller.h; sourceTree = "<group>"; };
-		58A080AB2112AABB00D5580F /* ClangHighlighter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangHighlighter.cpp; path = Language/ClangCommon/ClangHighlighter.cpp; sourceTree = "<group>"; };
-		58A080AD2112AAC500D5580F /* ClangHighlighter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangHighlighter.h; path = Language/ClangCommon/ClangHighlighter.h; sourceTree = "<group>"; };
-		4CD44D5620C603A80003557C /* ClangHost.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ClangHost.cpp; path = ExpressionParser/Clang/ClangHost.cpp; sourceTree = "<group>"; };
-		4CD44D5720C603A90003557C /* ClangHost.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ClangHost.h; path = ExpressionParser/Clang/ClangHost.h; sourceTree = "<group>"; };
-		4959511E1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangModulesDeclVendor.cpp; path = ExpressionParser/Clang/ClangModulesDeclVendor.cpp; sourceTree = "<group>"; };
-		4959511B1A1BC48100F6F8FC /* ClangModulesDeclVendor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangModulesDeclVendor.h; path = ExpressionParser/Clang/ClangModulesDeclVendor.h; sourceTree = "<group>"; };
-		49D4FE871210B61C00CDB854 /* ClangPersistentVariables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangPersistentVariables.cpp; path = ExpressionParser/Clang/ClangPersistentVariables.cpp; sourceTree = "<group>"; };
-		49D4FE821210B5FB00CDB854 /* ClangPersistentVariables.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangPersistentVariables.h; path = ExpressionParser/Clang/ClangPersistentVariables.h; sourceTree = "<group>"; };
-		26BC7ED510F1B86700F91463 /* ClangUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangUserExpression.cpp; path = ExpressionParser/Clang/ClangUserExpression.cpp; sourceTree = "<group>"; };
-		49445E341225AB6A00C11A81 /* ClangUserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangUserExpression.h; path = ExpressionParser/Clang/ClangUserExpression.h; sourceTree = "<group>"; };
-		3032B1B61CAAA3D1004BE1AB /* ClangUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangUtil.cpp; path = source/Symbol/ClangUtil.cpp; sourceTree = "<group>"; };
-		3032B1B91CAAA400004BE1AB /* ClangUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangUtil.h; path = include/lldb/Symbol/ClangUtil.h; sourceTree = "<group>"; };
-		497C86BD122823D800B54702 /* ClangUtilityFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClangUtilityFunction.cpp; path = ExpressionParser/Clang/ClangUtilityFunction.cpp; sourceTree = "<group>"; };
-		497C86C1122823F300B54702 /* ClangUtilityFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClangUtilityFunction.h; path = ExpressionParser/Clang/ClangUtilityFunction.h; sourceTree = "<group>"; };
-		264723A511FA076E00DE380C /* CleanUp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CleanUp.h; path = include/lldb/Utility/CleanUp.h; sourceTree = "<group>"; };
-		7F94D7172040A13A006EE3EA /* CleanUpTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CleanUpTest.cpp; sourceTree = "<group>"; };
-		949EEDA11BA76571008C63CF /* Cocoa.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Cocoa.cpp; path = Language/ObjC/Cocoa.cpp; sourceTree = "<group>"; };
-		949EEDA21BA76571008C63CF /* Cocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Cocoa.h; path = Language/ObjC/Cocoa.h; sourceTree = "<group>"; };
-		5A6424922204D04F00C3D9DB /* CodeViewRegisterMapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CodeViewRegisterMapping.cpp; path = source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.cpp; sourceTree = SOURCE_ROOT; };
-		5A6424942204D05000C3D9DB /* CodeViewRegisterMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CodeViewRegisterMapping.h; path = source/Plugins/SymbolFile/NativePDB/CodeViewRegisterMapping.h; sourceTree = SOURCE_ROOT; };
-		9441816D1C8F5EC900E5A8D9 /* CommandAlias.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandAlias.cpp; path = source/Interpreter/CommandAlias.cpp; sourceTree = "<group>"; };
-		9441816B1C8F5EB000E5A8D9 /* CommandAlias.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandAlias.h; path = include/lldb/Interpreter/CommandAlias.h; sourceTree = "<group>"; };
-		4C09CB74116BD98B00C7A725 /* CommandCompletions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandCompletions.cpp; path = source/Commands/CommandCompletions.cpp; sourceTree = "<group>"; };
-		4C09CB73116BD98B00C7A725 /* CommandCompletions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandCompletions.h; path = include/lldb/Interpreter/CommandCompletions.h; sourceTree = "<group>"; };
-		94BA8B6F176F97CE005A91B5 /* CommandHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandHistory.cpp; path = source/Interpreter/CommandHistory.cpp; sourceTree = "<group>"; };
-		94BA8B71176F97D4005A91B5 /* CommandHistory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandHistory.h; path = include/lldb/Interpreter/CommandHistory.h; sourceTree = "<group>"; };
-		26BC7F0810F1B8DD00F91463 /* CommandInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandInterpreter.cpp; path = source/Interpreter/CommandInterpreter.cpp; sourceTree = "<group>"; };
-		26BC7DE210F1B7F900F91463 /* CommandInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandInterpreter.h; path = include/lldb/Interpreter/CommandInterpreter.h; sourceTree = "<group>"; };
-		26BC7F0910F1B8DD00F91463 /* CommandObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObject.cpp; path = source/Interpreter/CommandObject.cpp; sourceTree = "<group>"; };
-		26BC7DE310F1B7F900F91463 /* CommandObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObject.h; path = include/lldb/Interpreter/CommandObject.h; sourceTree = "<group>"; };
-		4CA9637911B6E99A00780E28 /* CommandObjectApropos.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectApropos.cpp; path = source/Commands/CommandObjectApropos.cpp; sourceTree = "<group>"; };
-		4CA9637A11B6E99A00780E28 /* CommandObjectApropos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectApropos.h; path = source/Commands/CommandObjectApropos.h; sourceTree = "<group>"; };
-		26BC7E2D10F1B84700F91463 /* CommandObjectBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectBreakpoint.cpp; path = source/Commands/CommandObjectBreakpoint.cpp; sourceTree = "<group>"; };
-		26BC7D1410F1B76300F91463 /* CommandObjectBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectBreakpoint.h; path = source/Commands/CommandObjectBreakpoint.h; sourceTree = "<group>"; };
-		9A42976211861AA600FE05CD /* CommandObjectBreakpointCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectBreakpointCommand.cpp; path = source/Commands/CommandObjectBreakpointCommand.cpp; sourceTree = "<group>"; };
-		9A42976111861A9F00FE05CD /* CommandObjectBreakpointCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectBreakpointCommand.h; path = source/Commands/CommandObjectBreakpointCommand.h; sourceTree = "<group>"; };
-		6D86CE9E1B440F6B00A7FBFA /* CommandObjectBugreport.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectBugreport.cpp; path = source/Commands/CommandObjectBugreport.cpp; sourceTree = "<group>"; };
-		6D86CE9F1B440F6B00A7FBFA /* CommandObjectBugreport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectBugreport.h; path = source/Commands/CommandObjectBugreport.h; sourceTree = "<group>"; };
-		4C5DBBC611E3FEC60035160F /* CommandObjectCommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectCommands.cpp; path = source/Commands/CommandObjectCommands.cpp; sourceTree = "<group>"; };
-		4C5DBBC711E3FEC60035160F /* CommandObjectCommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectCommands.h; path = source/Commands/CommandObjectCommands.h; sourceTree = "<group>"; };
-		26BC7E3010F1B84700F91463 /* CommandObjectDisassemble.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectDisassemble.cpp; path = source/Commands/CommandObjectDisassemble.cpp; sourceTree = "<group>"; };
-		26BC7D1710F1B76300F91463 /* CommandObjectDisassemble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectDisassemble.h; path = source/Commands/CommandObjectDisassemble.h; sourceTree = "<group>"; };
-		26BC7E3110F1B84700F91463 /* CommandObjectExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectExpression.cpp; path = source/Commands/CommandObjectExpression.cpp; sourceTree = "<group>"; };
-		26BC7D1810F1B76300F91463 /* CommandObjectExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectExpression.h; path = source/Commands/CommandObjectExpression.h; sourceTree = "<group>"; };
-		2672D8461189055500FF4019 /* CommandObjectFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectFrame.cpp; path = source/Commands/CommandObjectFrame.cpp; sourceTree = "<group>"; };
-		2672D8471189055500FF4019 /* CommandObjectFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectFrame.h; path = source/Commands/CommandObjectFrame.h; sourceTree = "<group>"; };
-		26CEB5F018762056008F575A /* CommandObjectGUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectGUI.cpp; path = source/Commands/CommandObjectGUI.cpp; sourceTree = "<group>"; };
-		26CEB5F118762056008F575A /* CommandObjectGUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectGUI.h; path = source/Commands/CommandObjectGUI.h; sourceTree = "<group>"; };
-		26BC7E3310F1B84700F91463 /* CommandObjectHelp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectHelp.cpp; path = source/Commands/CommandObjectHelp.cpp; sourceTree = "<group>"; };
-		26BC7D1A10F1B76300F91463 /* CommandObjectHelp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectHelp.h; path = source/Commands/CommandObjectHelp.h; sourceTree = "<group>"; };
-		AFC234061AF85CE000CDE8B6 /* CommandObjectLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectLanguage.cpp; path = source/Commands/CommandObjectLanguage.cpp; sourceTree = "<group>"; };
-		AFC234071AF85CE000CDE8B6 /* CommandObjectLanguage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectLanguage.h; path = source/Commands/CommandObjectLanguage.h; sourceTree = "<group>"; };
-		264AD83711095BA600E0B039 /* CommandObjectLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectLog.cpp; path = source/Commands/CommandObjectLog.cpp; sourceTree = "<group>"; };
-		264AD83911095BBD00E0B039 /* CommandObjectLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectLog.h; path = source/Commands/CommandObjectLog.h; sourceTree = "<group>"; };
-		26BC7E3610F1B84700F91463 /* CommandObjectMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectMemory.cpp; path = source/Commands/CommandObjectMemory.cpp; sourceTree = "<group>"; };
-		26BC7D1D10F1B76300F91463 /* CommandObjectMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectMemory.h; path = source/Commands/CommandObjectMemory.h; sourceTree = "<group>"; };
-		26DFBC58113B48F300DD817F /* CommandObjectMultiword.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectMultiword.cpp; path = source/Commands/CommandObjectMultiword.cpp; sourceTree = "<group>"; };
-		26DFBC51113B48D600DD817F /* CommandObjectMultiword.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectMultiword.h; path = include/lldb/Interpreter/CommandObjectMultiword.h; sourceTree = "<group>"; };
-		26879CE71333F58B0012C1F8 /* CommandObjectPlatform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectPlatform.cpp; path = source/Commands/CommandObjectPlatform.cpp; sourceTree = "<group>"; };
-		26879CE51333F5750012C1F8 /* CommandObjectPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectPlatform.h; path = source/Commands/CommandObjectPlatform.h; sourceTree = "<group>"; };
-		947A1D621616476A0017C8D1 /* CommandObjectPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectPlugin.cpp; path = source/Commands/CommandObjectPlugin.cpp; sourceTree = "<group>"; };
-		947A1D631616476A0017C8D1 /* CommandObjectPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectPlugin.h; path = source/Commands/CommandObjectPlugin.h; sourceTree = "<group>"; };
-		26BC7E3810F1B84700F91463 /* CommandObjectProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectProcess.cpp; path = source/Commands/CommandObjectProcess.cpp; sourceTree = "<group>"; };
-		26BC7D1F10F1B76300F91463 /* CommandObjectProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectProcess.h; path = source/Commands/CommandObjectProcess.h; sourceTree = "<group>"; };
-		26BC7E3910F1B84700F91463 /* CommandObjectQuit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectQuit.cpp; path = source/Commands/CommandObjectQuit.cpp; sourceTree = "<group>"; };
-		26BC7D2010F1B76300F91463 /* CommandObjectQuit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectQuit.h; path = source/Commands/CommandObjectQuit.h; sourceTree = "<group>"; };
-		26DFBC59113B48F300DD817F /* CommandObjectRegexCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectRegexCommand.cpp; path = source/Interpreter/CommandObjectRegexCommand.cpp; sourceTree = "<group>"; };
-		26DFBC52113B48D600DD817F /* CommandObjectRegexCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectRegexCommand.h; path = include/lldb/Interpreter/CommandObjectRegexCommand.h; sourceTree = "<group>"; };
-		26BC7E3B10F1B84700F91463 /* CommandObjectRegister.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectRegister.cpp; path = source/Commands/CommandObjectRegister.cpp; sourceTree = "<group>"; };
-		26BC7D2210F1B76300F91463 /* CommandObjectRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectRegister.h; path = source/Commands/CommandObjectRegister.h; sourceTree = "<group>"; };
-		AFCB1D5A219CD5A700730AD5 /* CommandObjectReproducer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectReproducer.cpp; path = source/Commands/CommandObjectReproducer.cpp; sourceTree = "<group>"; };
-		AFCB1D5B219CD5A700730AD5 /* CommandObjectReproducer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectReproducer.h; path = source/Commands/CommandObjectReproducer.h; sourceTree = "<group>"; };
-		26BC7E3D10F1B84700F91463 /* CommandObjectScript.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectScript.cpp; path = source/Interpreter/CommandObjectScript.cpp; sourceTree = "<group>"; };
-		26BC7D2410F1B76300F91463 /* CommandObjectScript.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectScript.h; path = source/Interpreter/CommandObjectScript.h; sourceTree = "<group>"; };
-		26BC7E4010F1B84700F91463 /* CommandObjectSettings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectSettings.cpp; path = source/Commands/CommandObjectSettings.cpp; sourceTree = "<group>"; };
-		26BC7D2710F1B76300F91463 /* CommandObjectSettings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectSettings.h; path = source/Commands/CommandObjectSettings.h; sourceTree = "<group>"; };
-		26BC7E4210F1B84700F91463 /* CommandObjectSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectSource.cpp; path = source/Commands/CommandObjectSource.cpp; sourceTree = "<group>"; };
-		26BC7D2910F1B76300F91463 /* CommandObjectSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectSource.h; path = source/Commands/CommandObjectSource.h; sourceTree = "<group>"; };
-		6B8894782065AE5C002E5C59 /* CommandObjectStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectStats.cpp; path = source/Commands/CommandObjectStats.cpp; sourceTree = "<group>"; };
-		6B8894772065AE5C002E5C59 /* CommandObjectStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectStats.h; path = source/Commands/CommandObjectStats.h; sourceTree = "<group>"; };
-		269416AD119A024800FF2715 /* CommandObjectTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectTarget.cpp; path = source/Commands/CommandObjectTarget.cpp; sourceTree = "<group>"; };
-		269416AE119A024800FF2715 /* CommandObjectTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectTarget.h; path = source/Commands/CommandObjectTarget.h; sourceTree = "<group>"; };
-		26BC7E4610F1B84700F91463 /* CommandObjectThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectThread.cpp; path = source/Commands/CommandObjectThread.cpp; sourceTree = "<group>"; };
-		26BC7D2D10F1B76300F91463 /* CommandObjectThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectThread.h; path = source/Commands/CommandObjectThread.h; sourceTree = "<group>"; };
-		9463D4CC13B1798800C230D4 /* CommandObjectType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = CommandObjectType.cpp; path = source/Commands/CommandObjectType.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
-		9463D4CE13B179A500C230D4 /* CommandObjectType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectType.h; path = source/Commands/CommandObjectType.h; sourceTree = "<group>"; };
-		B296983412C2FB2B002D92C3 /* CommandObjectVersion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectVersion.cpp; path = source/Commands/CommandObjectVersion.cpp; sourceTree = "<group>"; };
-		B296983512C2FB2B002D92C3 /* CommandObjectVersion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandObjectVersion.h; path = source/Commands/CommandObjectVersion.h; sourceTree = "<group>"; };
-		B207C4921429607D00F36E4E /* CommandObjectWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectWatchpoint.cpp; path = source/Commands/CommandObjectWatchpoint.cpp; sourceTree = "<group>"; };
-		B207C4941429609C00F36E4E /* CommandObjectWatchpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectWatchpoint.h; path = source/Commands/CommandObjectWatchpoint.h; sourceTree = "<group>"; };
-		B2B7CCEA15D1BD6600EEFB57 /* CommandObjectWatchpointCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandObjectWatchpointCommand.cpp; path = source/Commands/CommandObjectWatchpointCommand.cpp; sourceTree = "<group>"; };
-		B2B7CCEC15D1BD9600EEFB57 /* CommandObjectWatchpointCommand.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandObjectWatchpointCommand.h; path = source/Commands/CommandObjectWatchpointCommand.h; sourceTree = "<group>"; };
-		23DDF224196C3EE600BB8417 /* CommandOptionValidators.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandOptionValidators.cpp; path = source/Interpreter/CommandOptionValidators.cpp; sourceTree = "<group>"; };
-		4C719396207D237100FDF430 /* CommandOptionValidators.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CommandOptionValidators.h; path = include/lldb/Interpreter/CommandOptionValidators.h; sourceTree = "<group>"; };
-		26BC7F0A10F1B8DD00F91463 /* CommandReturnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandReturnObject.cpp; path = source/Interpreter/CommandReturnObject.cpp; sourceTree = "<group>"; };
-		26BC7DE410F1B7F900F91463 /* CommandReturnObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandReturnObject.h; path = include/lldb/Interpreter/CommandReturnObject.h; sourceTree = "<group>"; };
-		26BC7E6E10F1B85900F91463 /* Communication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Communication.cpp; path = source/Core/Communication.cpp; sourceTree = "<group>"; };
-		26BC7D5610F1B77400F91463 /* Communication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Communication.h; path = include/lldb/Core/Communication.h; sourceTree = "<group>"; };
-		2642FBA813D003B400ED6808 /* CommunicationKDP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CommunicationKDP.cpp; sourceTree = "<group>"; };
-		2642FBA913D003B400ED6808 /* CommunicationKDP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommunicationKDP.h; sourceTree = "<group>"; };
-		964463EB1A330C0500154ED8 /* CompactUnwindInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompactUnwindInfo.cpp; path = source/Symbol/CompactUnwindInfo.cpp; sourceTree = "<group>"; };
-		964463ED1A330C1B00154ED8 /* CompactUnwindInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompactUnwindInfo.h; path = include/lldb/Symbol/CompactUnwindInfo.h; sourceTree = "<group>"; };
-		26BC7F1510F1B8EC00F91463 /* CompileUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompileUnit.cpp; path = source/Symbol/CompileUnit.cpp; sourceTree = "<group>"; };
-		26BC7C5710F1B6E900F91463 /* CompileUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompileUnit.h; path = include/lldb/Symbol/CompileUnit.h; sourceTree = "<group>"; };
-		AFD966B4217140B5006714AC /* CompileUnitIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompileUnitIndex.cpp; path = source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.cpp; sourceTree = SOURCE_ROOT; };
-		AFD966BD217140C8006714AC /* CompileUnitIndex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CompileUnitIndex.h; path = source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.h; sourceTree = SOURCE_ROOT; };
-		265192C51BA8E905002F08F6 /* CompilerDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerDecl.cpp; path = source/Symbol/CompilerDecl.cpp; sourceTree = "<group>"; };
-		265192C41BA8E8F8002F08F6 /* CompilerDecl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CompilerDecl.h; path = include/lldb/Symbol/CompilerDecl.h; sourceTree = "<group>"; };
-		2657AFB61B86910100958979 /* CompilerDeclContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerDeclContext.cpp; path = source/Symbol/CompilerDeclContext.cpp; sourceTree = "<group>"; };
-		2657AFB51B8690EC00958979 /* CompilerDeclContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CompilerDeclContext.h; path = include/lldb/Symbol/CompilerDeclContext.h; sourceTree = "<group>"; };
-		49E45FAD11F660FE008F7B28 /* CompilerType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompilerType.cpp; path = source/Symbol/CompilerType.cpp; sourceTree = "<group>"; };
-		49E45FA911F660DC008F7B28 /* CompilerType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CompilerType.h; path = include/lldb/Symbol/CompilerType.h; sourceTree = "<group>"; };
-		58EC744020EAEB5200695209 /* CompletionRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CompletionRequest.cpp; path = source/Utility/CompletionRequest.cpp; sourceTree = "<group>"; };
-		58EC744220EAEB6C00695209 /* CompletionRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CompletionRequest.h; path = include/lldb/Utility/CompletionRequest.h; sourceTree = "<group>"; };
-		4C639EC921FA684800A7B957 /* CompletionRequestTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CompletionRequestTest.cpp; sourceTree = "<group>"; };
-		266F5CBB12FC846200DFCE33 /* Config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Config.h; path = include/lldb/Host/Config.h; sourceTree = "<group>"; };
-		3FDFE53C19A293CA009756A7 /* Config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Config.h; path = include/lldb/Host/freebsd/Config.h; sourceTree = "<group>"; };
-		3FDFE56319AF9B77009756A7 /* Config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Config.h; path = include/lldb/Host/linux/Config.h; sourceTree = SOURCE_ROOT; };
-		6D55BAE31A8CD06000A70529 /* Config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Config.h; path = include/lldb/Host/android/Config.h; sourceTree = "<group>"; };
-		26BC7E6F10F1B85900F91463 /* Connection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Connection.cpp; path = source/Utility/Connection.cpp; sourceTree = "<group>"; };
-		26BC7D5710F1B77400F91463 /* Connection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Connection.h; path = include/lldb/Utility/Connection.h; sourceTree = "<group>"; };
-		AFDFDFD019E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConnectionFileDescriptorPosix.cpp; sourceTree = "<group>"; };
-		26764C961E48F482008D3573 /* ConstString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConstString.cpp; path = source/Utility/ConstString.cpp; sourceTree = "<group>"; };
-		26764C951E48F46F008D3573 /* ConstString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ConstString.h; path = include/lldb/Utility/ConstString.h; sourceTree = "<group>"; };
-		9A3D43C81F3150D200EB767C /* ConstStringTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConstStringTest.cpp; sourceTree = "<group>"; };
-		26F5C39010F3FA26009D5894 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
-		949EED9E1BA74B64008C63CF /* CoreMedia.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CoreMedia.cpp; path = Language/ObjC/CoreMedia.cpp; sourceTree = "<group>"; };
-		949EED9F1BA74B64008C63CF /* CoreMedia.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CoreMedia.h; path = Language/ObjC/CoreMedia.h; sourceTree = "<group>"; };
-		AF3F54AE1B3BA59C00186E73 /* CrashReason.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CrashReason.cpp; sourceTree = "<group>"; };
-		AF3F54AF1B3BA59C00186E73 /* CrashReason.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CrashReason.h; sourceTree = "<group>"; };
-		DDB5829B2278C8D600491B41 /* CxxModuleHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CxxModuleHandler.cpp; path = source/Symbol/CxxModuleHandler.cpp; sourceTree = "<group>"; };
-		DDB5829D2278C8E900491B41 /* CxxModuleHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CxxModuleHandler.h; path = include/lldb/Symbol/CxxModuleHandler.h; sourceTree = "<group>"; };
-		945261B31B9A11E800BF138D /* CxxStringTypes.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CxxStringTypes.cpp; path = Language/CPlusPlus/CxxStringTypes.cpp; sourceTree = "<group>"; };
-		945261B41B9A11E800BF138D /* CxxStringTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CxxStringTypes.h; path = Language/CPlusPlus/CxxStringTypes.h; sourceTree = "<group>"; };
-		6D95DBFD1B9DC057000E318A /* DIERef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DIERef.cpp; sourceTree = "<group>"; };
-		6D95DC031B9DC06F000E318A /* DIERef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DIERef.h; sourceTree = "<group>"; };
-		269DDD451B8FD01A00D0DBD8 /* DWARFASTParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFASTParser.h; sourceTree = "<group>"; };
-		269DDD481B8FD1C300D0DBD8 /* DWARFASTParserClang.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFASTParserClang.cpp; sourceTree = "<group>"; };
-		269DDD491B8FD1C300D0DBD8 /* DWARFASTParserClang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFASTParserClang.h; sourceTree = "<group>"; };
-		260C89B310F57C5600BB2B04 /* DWARFAbbreviationDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFAbbreviationDeclaration.cpp; sourceTree = "<group>"; };
-		260C89B410F57C5600BB2B04 /* DWARFAbbreviationDeclaration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFAbbreviationDeclaration.h; sourceTree = "<group>"; };
-		266E829C1B8E542C008FCA06 /* DWARFAttribute.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFAttribute.cpp; sourceTree = "<group>"; };
-		260C89B610F57C5600BB2B04 /* DWARFAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFAttribute.h; sourceTree = "<group>"; };
-		4CD44D4020B777850003557C /* DWARFBaseDIE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFBaseDIE.cpp; sourceTree = "<group>"; };
-		4CD44D4120B777850003557C /* DWARFBaseDIE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFBaseDIE.h; sourceTree = "<group>"; };
-		26BC7F1710F1B8EC00F91463 /* DWARFCallFrameInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DWARFCallFrameInfo.cpp; path = source/Symbol/DWARFCallFrameInfo.cpp; sourceTree = "<group>"; };
-		26BC7C5910F1B6E900F91463 /* DWARFCallFrameInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DWARFCallFrameInfo.h; path = include/lldb/Symbol/DWARFCallFrameInfo.h; sourceTree = "<group>"; };
-		260C89B710F57C5600BB2B04 /* DWARFCompileUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFCompileUnit.cpp; sourceTree = "<group>"; };
-		260C89B810F57C5600BB2B04 /* DWARFCompileUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFCompileUnit.h; sourceTree = "<group>"; };
-		AF5B97D92242FC27002D3F2C /* DWARFContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFContext.cpp; sourceTree = "<group>"; };
-		AF5B97DA2242FC27002D3F2C /* DWARFContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DWARFContext.h; sourceTree = "<group>"; };
-		266E82961B8CE3AC008FCA06 /* DWARFDIE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDIE.cpp; sourceTree = "<group>"; };
-		266E82951B8CE346008FCA06 /* DWARFDIE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DWARFDIE.h; sourceTree = "<group>"; };
-		26AB92101819D74600E63F3E /* DWARFDataExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDataExtractor.cpp; sourceTree = "<group>"; };
-		26AB92111819D74600E63F3E /* DWARFDataExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDataExtractor.h; sourceTree = "<group>"; };
-		260C89B910F57C5600BB2B04 /* DWARFDebugAbbrev.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugAbbrev.cpp; sourceTree = "<group>"; };
-		260C89BA10F57C5600BB2B04 /* DWARFDebugAbbrev.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugAbbrev.h; sourceTree = "<group>"; };
-		260C89BD10F57C5600BB2B04 /* DWARFDebugArangeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugArangeSet.cpp; sourceTree = "<group>"; };
-		260C89BE10F57C5600BB2B04 /* DWARFDebugArangeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugArangeSet.h; sourceTree = "<group>"; };
-		260C89BB10F57C5600BB2B04 /* DWARFDebugAranges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugAranges.cpp; sourceTree = "<group>"; };
-		260C89BC10F57C5600BB2B04 /* DWARFDebugAranges.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugAranges.h; sourceTree = "<group>"; };
-		260C89BF10F57C5600BB2B04 /* DWARFDebugInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugInfo.cpp; sourceTree = "<group>"; };
-		260C89C010F57C5600BB2B04 /* DWARFDebugInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugInfo.h; sourceTree = "<group>"; };
-		260C89C110F57C5600BB2B04 /* DWARFDebugInfoEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugInfoEntry.cpp; sourceTree = "<group>"; };
-		260C89C210F57C5600BB2B04 /* DWARFDebugInfoEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugInfoEntry.h; sourceTree = "<group>"; };
-		260C89C310F57C5600BB2B04 /* DWARFDebugLine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugLine.cpp; sourceTree = "<group>"; };
-		260C89C410F57C5600BB2B04 /* DWARFDebugLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugLine.h; sourceTree = "<group>"; };
-		23E77CD61C20F29F007192AD /* DWARFDebugMacro.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugMacro.cpp; sourceTree = "<group>"; };
-		23E77CD71C20F29F007192AD /* DWARFDebugMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugMacro.h; sourceTree = "<group>"; };
-		260C89CD10F57C5600BB2B04 /* DWARFDebugRanges.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDebugRanges.cpp; sourceTree = "<group>"; };
-		260C89CE10F57C5600BB2B04 /* DWARFDebugRanges.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDebugRanges.h; sourceTree = "<group>"; };
-		26B1EFAC154638AF00E2DAC7 /* DWARFDeclContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFDeclContext.cpp; sourceTree = "<group>"; };
-		26B1EFAD154638AF00E2DAC7 /* DWARFDeclContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDeclContext.h; sourceTree = "<group>"; };
-		260C89CF10F57C5600BB2B04 /* DWARFDefines.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; path = DWARFDefines.cpp; sourceTree = "<group>"; };
-		260C89D010F57C5600BB2B04 /* DWARFDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFDefines.h; sourceTree = "<group>"; };
-		26BC7ED810F1B86700F91463 /* DWARFExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DWARFExpression.cpp; path = source/Expression/DWARFExpression.cpp; sourceTree = "<group>"; };
-		26BC7DC310F1B79500F91463 /* DWARFExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DWARFExpression.h; path = include/lldb/Expression/DWARFExpression.h; sourceTree = "<group>"; };
-		260C89D310F57C5600BB2B04 /* DWARFFormValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFFormValue.cpp; sourceTree = "<group>"; };
-		260C89D410F57C5600BB2B04 /* DWARFFormValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFFormValue.h; sourceTree = "<group>"; };
-		4CD44CF820B37C440003557C /* DWARFIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFIndex.cpp; sourceTree = "<group>"; };
-		4CD44CFE20B37C570003557C /* DWARFIndex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DWARFIndex.h; sourceTree = "<group>"; };
-		4C38996221B9AECC002BAEF4 /* DWARFLocationExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DWARFLocationExpression.cpp; path = source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp; sourceTree = SOURCE_ROOT; };
-		4C38996321B9AECC002BAEF4 /* DWARFLocationExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DWARFLocationExpression.h; path = source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.h; sourceTree = SOURCE_ROOT; };
-		4C645D022295D3B500D3C034 /* DWARFTypeUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFTypeUnit.cpp; sourceTree = "<group>"; };
-		4C645D032295D3B600D3C034 /* DWARFTypeUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFTypeUnit.h; sourceTree = "<group>"; };
-		7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DWARFUnit.cpp; sourceTree = "<group>"; };
-		7F2AAA5820601BDF00A422D8 /* DWARFUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DWARFUnit.h; sourceTree = "<group>"; };
-		26FFC19514FC072100087D58 /* DYLDRendezvous.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DYLDRendezvous.cpp; sourceTree = "<group>"; };
-		26FFC19614FC072100087D58 /* DYLDRendezvous.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DYLDRendezvous.h; sourceTree = "<group>"; };
-		49CA96F01E6AAC8E00C03FEE /* DataBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataBuffer.h; path = include/lldb/Utility/DataBuffer.h; sourceTree = "<group>"; };
-		49CA96E61E6AAC6600C03FEE /* DataBufferHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataBufferHeap.cpp; path = source/Utility/DataBufferHeap.cpp; sourceTree = "<group>"; };
-		49CA96F11E6AAC8E00C03FEE /* DataBufferHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataBufferHeap.h; path = include/lldb/Utility/DataBufferHeap.h; sourceTree = "<group>"; };
-		49CA96E71E6AAC6600C03FEE /* DataBufferLLVM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataBufferLLVM.cpp; path = source/Utility/DataBufferLLVM.cpp; sourceTree = "<group>"; };
-		49CA96F21E6AAC8E00C03FEE /* DataBufferLLVM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataBufferLLVM.h; path = include/lldb/Utility/DataBufferLLVM.h; sourceTree = "<group>"; };
-		49CA96E81E6AAC6600C03FEE /* DataEncoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataEncoder.cpp; path = source/Utility/DataEncoder.cpp; sourceTree = "<group>"; };
-		49CA96F31E6AAC8E00C03FEE /* DataEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataEncoder.h; path = include/lldb/Utility/DataEncoder.h; sourceTree = "<group>"; };
-		49CA96E91E6AAC6600C03FEE /* DataExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataExtractor.cpp; path = source/Utility/DataExtractor.cpp; sourceTree = "<group>"; };
-		49CA96F41E6AAC8E00C03FEE /* DataExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DataExtractor.h; path = include/lldb/Utility/DataExtractor.h; sourceTree = "<group>"; };
-		AFA1B62B219E0ED900A8AB7E /* DataExtractorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataExtractorTest.cpp; sourceTree = "<group>"; };
-		94CB255816B069770059775D /* DataVisualization.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DataVisualization.cpp; path = source/DataFormatters/DataVisualization.cpp; sourceTree = "<group>"; };
-		94CB256016B069800059775D /* DataVisualization.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DataVisualization.h; path = include/lldb/DataFormatters/DataVisualization.h; sourceTree = "<group>"; };
-		3FDFED1E19BA6D55009756A7 /* Debug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Debug.h; path = include/lldb/Host/Debug.h; sourceTree = "<group>"; };
-		23E77CDB1C20F2F2007192AD /* DebugMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DebugMacros.cpp; path = source/Symbol/DebugMacros.cpp; sourceTree = "<group>"; };
-		6D0F613C1C80AA8900A4ECEE /* DebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DebugMacros.h; path = include/lldb/Symbol/DebugMacros.h; sourceTree = "<group>"; };
-		AF116BED20CF234B0071093F /* DebugNamesDWARFIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DebugNamesDWARFIndex.cpp; sourceTree = "<group>"; };
-		AF116BEE20CF234B0071093F /* DebugNamesDWARFIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebugNamesDWARFIndex.h; sourceTree = "<group>"; };
-		263664921140A4930075843B /* Debugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = Debugger.cpp; path = source/Core/Debugger.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
-		263664941140A4C10075843B /* Debugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = Debugger.h; path = include/lldb/Core/Debugger.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
-		AF1675A822CC1A3C00DC40ED /* DeclVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DeclVendor.cpp; path = source/Symbol/DeclVendor.cpp; sourceTree = "<group>"; };
-		49B01A2D15F67B1700666829 /* DeclVendor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DeclVendor.h; path = include/lldb/Symbol/DeclVendor.h; sourceTree = "<group>"; };
-		26BC7F1610F1B8EC00F91463 /* Declaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Declaration.cpp; path = source/Symbol/Declaration.cpp; sourceTree = "<group>"; };
-		26BC7C5810F1B6E900F91463 /* Declaration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Declaration.h; path = include/lldb/Symbol/Declaration.h; sourceTree = "<group>"; };
-		49E4F6681C9CAD12008487EA /* DiagnosticManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DiagnosticManager.cpp; path = source/Expression/DiagnosticManager.cpp; sourceTree = "<group>"; };
-		49E4F66C1C9CAD2D008487EA /* DiagnosticManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DiagnosticManager.h; path = include/lldb/Expression/DiagnosticManager.h; sourceTree = "<group>"; };
-		26BC7E7610F1B85900F91463 /* Disassembler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Disassembler.cpp; path = source/Core/Disassembler.cpp; sourceTree = "<group>"; };
-		26BC7D5E10F1B77400F91463 /* Disassembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Disassembler.h; path = include/lldb/Core/Disassembler.h; sourceTree = "<group>"; };
-		B299580A14F2FA1400050A04 /* DisassemblerLLVMC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisassemblerLLVMC.cpp; sourceTree = "<group>"; };
-		B299580C14F2FA1F00050A04 /* DisassemblerLLVMC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisassemblerLLVMC.h; sourceTree = "<group>"; };
-		2579065E1BD0488D00178368 /* DomainSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DomainSocket.cpp; sourceTree = "<group>"; };
-		26F5C27310F3D9E4009D5894 /* Driver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Driver.cpp; path = tools/driver/Driver.cpp; sourceTree = "<group>"; };
-		26F5C27410F3D9E4009D5894 /* Driver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Driver.h; path = tools/driver/Driver.h; sourceTree = "<group>"; };
-		4C4EB77F1E6A4DB8002035C0 /* DumpDataExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DumpDataExtractor.cpp; path = source/Core/DumpDataExtractor.cpp; sourceTree = "<group>"; };
-		4C4EB7821E6A4DE7002035C0 /* DumpDataExtractor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DumpDataExtractor.h; path = include/lldb/Core/DumpDataExtractor.h; sourceTree = "<group>"; };
-		AFA585CF2107EB7300D7689A /* DumpRegisterValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DumpRegisterValue.cpp; path = source/Core/DumpRegisterValue.cpp; sourceTree = "<group>"; };
-		9447DE421BD5963300E67212 /* DumpValueObjectOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DumpValueObjectOptions.cpp; path = source/DataFormatters/DumpValueObjectOptions.cpp; sourceTree = "<group>"; };
-		9447DE411BD5962900E67212 /* DumpValueObjectOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = DumpValueObjectOptions.h; path = include/lldb/DataFormatters/DumpValueObjectOptions.h; sourceTree = "<group>"; };
-		26BC7E7710F1B85900F91463 /* DynamicLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DynamicLoader.cpp; path = source/Core/DynamicLoader.cpp; sourceTree = "<group>"; };
-		26BC7DF110F1B81A00F91463 /* DynamicLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DynamicLoader.h; path = include/lldb/Target/DynamicLoader.h; sourceTree = "<group>"; };
-		AF27AD531D3603EA00CF2833 /* DynamicLoaderDarwin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderDarwin.cpp; sourceTree = "<group>"; };
-		AF27AD541D3603EA00CF2833 /* DynamicLoaderDarwin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderDarwin.h; sourceTree = "<group>"; };
-		26274FA514030F79006BA130 /* DynamicLoaderDarwinKernel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderDarwinKernel.cpp; sourceTree = "<group>"; };
-		26274FA614030F79006BA130 /* DynamicLoaderDarwinKernel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderDarwinKernel.h; sourceTree = "<group>"; };
-		2666ADC11B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderHexagonDYLD.cpp; sourceTree = "<group>"; };
-		2666ADC21B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderHexagonDYLD.h; sourceTree = "<group>"; };
-		AF2907BD1D3F082400E10654 /* DynamicLoaderMacOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderMacOS.cpp; sourceTree = "<group>"; };
-		AF2907BE1D3F082400E10654 /* DynamicLoaderMacOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderMacOS.h; sourceTree = "<group>"; };
-		260C897A10F57C5600BB2B04 /* DynamicLoaderMacOSXDYLD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderMacOSXDYLD.cpp; sourceTree = "<group>"; };
-		260C897B10F57C5600BB2B04 /* DynamicLoaderMacOSXDYLD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderMacOSXDYLD.h; sourceTree = "<group>"; };
-		26FFC19714FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderPOSIXDYLD.cpp; sourceTree = "<group>"; };
-		26FFC19814FC072100087D58 /* DynamicLoaderPOSIXDYLD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderPOSIXDYLD.h; sourceTree = "<group>"; };
-		268A683D1321B53B000E3FB8 /* DynamicLoaderStatic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderStatic.cpp; sourceTree = "<group>"; };
-		268A683E1321B53B000E3FB8 /* DynamicLoaderStatic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderStatic.h; sourceTree = "<group>"; };
-		26F006541B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DynamicLoaderWindowsDYLD.cpp; sourceTree = "<group>"; };
-		26F006551B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DynamicLoaderWindowsDYLD.h; sourceTree = "<group>"; };
-		26954EBC1401EE8B00294D09 /* DynamicRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DynamicRegisterInfo.cpp; path = Utility/DynamicRegisterInfo.cpp; sourceTree = "<group>"; };
-		26954EBD1401EE8B00294D09 /* DynamicRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DynamicRegisterInfo.h; path = Utility/DynamicRegisterInfo.h; sourceTree = "<group>"; };
-		26D27C9D11ED3A4E0024D721 /* ELFHeader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ELFHeader.cpp; sourceTree = "<group>"; };
-		26D27C9E11ED3A4E0024D721 /* ELFHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELFHeader.h; sourceTree = "<group>"; };
-		3FDFE54019A29448009756A7 /* EditLineWin.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = EditLineWin.cpp; path = source/Host/windows/EditLineWin.cpp; sourceTree = "<group>"; };
-		26CFDCA2186163A4000E63E5 /* Editline.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Editline.cpp; sourceTree = "<group>"; };
-		26CFDCA01861638D000E63E5 /* Editline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Editline.h; path = include/lldb/Host/Editline.h; sourceTree = "<group>"; };
-		2326CF511BDD693B00A5CEAC /* EditlineTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EditlineTest.cpp; sourceTree = "<group>"; };
-		26D9FDC812F784FD0003F2EE /* EmulateInstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EmulateInstruction.cpp; path = source/Core/EmulateInstruction.cpp; sourceTree = "<group>"; };
-		26D9FDC612F784E60003F2EE /* EmulateInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EmulateInstruction.h; path = include/lldb/Core/EmulateInstruction.h; sourceTree = "<group>"; };
-		9A22A15D135E30370024DDC3 /* EmulateInstructionARM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulateInstructionARM.cpp; sourceTree = "<group>"; };
-		9A22A15E135E30370024DDC3 /* EmulateInstructionARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulateInstructionARM.h; sourceTree = "<group>"; };
-		264A12FA1372522000875C42 /* EmulateInstructionARM64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulateInstructionARM64.cpp; sourceTree = "<group>"; };
-		264A12FB1372522000875C42 /* EmulateInstructionARM64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulateInstructionARM64.h; sourceTree = "<group>"; };
-		E778E99F1B062D1700247609 /* EmulateInstructionMIPS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulateInstructionMIPS.cpp; sourceTree = "<group>"; };
-		E778E9A01B062D1700247609 /* EmulateInstructionMIPS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulateInstructionMIPS.h; sourceTree = "<group>"; };
-		94A5B3951AB9FE8300A5EE7F /* EmulateInstructionMIPS64.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = EmulateInstructionMIPS64.cpp; path = MIPS64/EmulateInstructionMIPS64.cpp; sourceTree = "<group>"; };
-		94A5B3961AB9FE8300A5EE7F /* EmulateInstructionMIPS64.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = EmulateInstructionMIPS64.h; path = MIPS64/EmulateInstructionMIPS64.h; sourceTree = "<group>"; };
-		AFDBC36C204663AF00B9C8F2 /* EmulateInstructionPPC64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EmulateInstructionPPC64.cpp; path = source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp; sourceTree = SOURCE_ROOT; };
-		AFDBC36B204663AF00B9C8F2 /* EmulateInstructionPPC64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EmulateInstructionPPC64.h; path = source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.h; sourceTree = SOURCE_ROOT; };
-		9A22A15F135E30370024DDC3 /* EmulationStateARM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EmulationStateARM.cpp; sourceTree = "<group>"; };
-		9A22A160135E30370024DDC3 /* EmulationStateARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EmulationStateARM.h; sourceTree = "<group>"; };
-		26BC7DD310F1B7D500F91463 /* Endian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Endian.h; path = include/lldb/Utility/Endian.h; sourceTree = "<group>"; };
-		22DC561920064C9600A7E9E8 /* Environment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Environment.cpp; path = source/Utility/Environment.cpp; sourceTree = "<group>"; };
-		6B74D89C2006972D0074051B /* Environment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Environment.h; path = include/lldb/Utility/Environment.h; sourceTree = "<group>"; };
-		4C639EBD21FA684600A7B957 /* EnvironmentTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EnvironmentTest.cpp; sourceTree = "<group>"; };
-		2647B63B21C436B400A81D15 /* Event.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Event.cpp; path = source/Utility/Event.cpp; sourceTree = "<group>"; };
-		2647B63321C4367A00A81D15 /* Event.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Event.h; path = include/lldb/Utility/Event.h; sourceTree = "<group>"; };
-		4C639EC521FA684800A7B957 /* EventTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventTest.cpp; sourceTree = "<group>"; };
-		26603874211CA90E00329572 /* ExceptionBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExceptionBreakpoint.cpp; path = "tools/lldb-vscode/ExceptionBreakpoint.cpp"; sourceTree = "<group>"; };
-		26603873211CA90E00329572 /* ExceptionBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExceptionBreakpoint.h; path = "tools/lldb-vscode/ExceptionBreakpoint.h"; sourceTree = "<group>"; };
-		26BC7F3510F1B90C00F91463 /* ExecutionContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExecutionContext.cpp; path = source/Target/ExecutionContext.cpp; sourceTree = "<group>"; };
-		26BC7DF210F1B81A00F91463 /* ExecutionContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExecutionContext.h; path = include/lldb/Target/ExecutionContext.h; sourceTree = "<group>"; };
-		26DAFD9711529BC7005A394E /* ExecutionContextScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExecutionContextScope.h; path = include/lldb/Target/ExecutionContextScope.h; sourceTree = "<group>"; };
-		4C88BC291BA3722B00AA0964 /* Expression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Expression.cpp; path = source/Expression/Expression.cpp; sourceTree = "<group>"; };
-		4C00832C1B9A58A700D5CF24 /* Expression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Expression.h; path = include/lldb/Expression/Expression.h; sourceTree = "<group>"; };
-		4C2479BE1BA39843009C9A7B /* ExpressionParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ExpressionParser.h; path = include/lldb/Expression/ExpressionParser.h; sourceTree = "<group>"; };
-		49A1CAC11430E21D00306AC9 /* ExpressionSourceCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpressionSourceCode.h; path = include/lldb/Expression/ExpressionSourceCode.h; sourceTree = "<group>"; };
-		4C29E77D1BA2403F00DFF855 /* ExpressionTypeSystemHelper.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; name = ExpressionTypeSystemHelper.h; path = include/lldb/Expression/ExpressionTypeSystemHelper.h; sourceTree = "<group>"; };
-		4984BA151B979973008658D4 /* ExpressionVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExpressionVariable.cpp; path = source/Expression/ExpressionVariable.cpp; sourceTree = "<group>"; };
-		4984BA171B979C08008658D4 /* ExpressionVariable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExpressionVariable.h; path = include/lldb/Expression/ExpressionVariable.h; sourceTree = "<group>"; };
-		260C6EA213011581005E16B0 /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = File.cpp; sourceTree = "<group>"; };
-		260C6EA013011578005E16B0 /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = File.h; path = include/lldb/Host/File.h; sourceTree = "<group>"; };
-		3FDFDDBC199C3A06009756A7 /* FileAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileAction.cpp; sourceTree = "<group>"; };
-		3FDFDDBE199D345E009756A7 /* FileCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileCache.cpp; path = source/Host/common/FileCache.cpp; sourceTree = "<group>"; };
-		3FDFDDC0199D34E2009756A7 /* FileCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FileCache.h; path = include/lldb/Host/FileCache.h; sourceTree = "<group>"; };
-		DD8F277D22011CC9004ED75B /* FileCollector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileCollector.cpp; path = source/Utility/FileCollector.cpp; sourceTree = "<group>"; };
-		DD8F278022011D0F004ED75B /* FileCollectorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileCollectorTest.cpp; sourceTree = "<group>"; };
-		26BD407E135D2ADF00237D80 /* FileLineResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileLineResolver.cpp; path = source/Core/FileLineResolver.cpp; sourceTree = "<group>"; };
-		26BD407D135D2AC400237D80 /* FileLineResolver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FileLineResolver.h; path = include/lldb/Core/FileLineResolver.h; sourceTree = "<group>"; };
-		26FA43171301048600E71120 /* FileSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileSpec.cpp; path = source/Utility/FileSpec.cpp; sourceTree = "<group>"; };
-		26FA4315130103F400E71120 /* FileSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSpec.h; path = include/lldb/Utility/FileSpec.h; sourceTree = "<group>"; };
-		26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileSpecList.cpp; path = source/Core/FileSpecList.cpp; sourceTree = "<group>"; };
-		26BC7D6310F1B77400F91463 /* FileSpecList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSpecList.h; path = include/lldb/Core/FileSpecList.h; sourceTree = "<group>"; };
-		23CB14FD1D66CD2400EDDDE1 /* FileSpecTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSpecTest.cpp; sourceTree = "<group>"; };
-		250D6AE11A9679270049CC70 /* FileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystem.cpp; sourceTree = "<group>"; };
-		3FDFDDC5199D37ED009756A7 /* FileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystem.cpp; sourceTree = "<group>"; };
-		3FDFE54119A29448009756A7 /* FileSystem.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = FileSystem.cpp; path = source/Host/windows/FileSystem.cpp; sourceTree = "<group>"; };
-		3FDFDDC1199D34E2009756A7 /* FileSystem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FileSystem.h; path = include/lldb/Host/FileSystem.h; sourceTree = "<group>"; };
-		9A20572E1F3B8E7600F6C293 /* FileSystemTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystemTest.cpp; sourceTree = "<group>"; };
-		4CBFF0471F579A36004AFA92 /* Flags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Flags.h; path = include/lldb/Utility/Flags.h; sourceTree = "<group>"; };
-		4C639EC821FA684800A7B957 /* FlagsTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FlagsTest.cpp; sourceTree = "<group>"; };
-		94CB257316B1D3870059775D /* FormatCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatCache.cpp; path = source/DataFormatters/FormatCache.cpp; sourceTree = "<group>"; };
-		94CB257516B1D3910059775D /* FormatCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormatCache.h; path = include/lldb/DataFormatters/FormatCache.h; sourceTree = "<group>"; };
-		94CB255916B069770059775D /* FormatClasses.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatClasses.cpp; path = source/DataFormatters/FormatClasses.cpp; sourceTree = "<group>"; };
-		94CB256116B069800059775D /* FormatClasses.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormatClasses.h; path = include/lldb/DataFormatters/FormatClasses.h; sourceTree = "<group>"; };
-		263FDE5F1A79A01500E68013 /* FormatEntity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatEntity.cpp; path = source/Core/FormatEntity.cpp; sourceTree = "<group>"; };
-		263FDE5D1A799F2D00E68013 /* FormatEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FormatEntity.h; path = include/lldb/Core/FormatEntity.h; sourceTree = "<group>"; };
-		94CB255A16B069770059775D /* FormatManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormatManager.cpp; path = source/DataFormatters/FormatManager.cpp; sourceTree = "<group>"; };
-		94CB256216B069800059775D /* FormatManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormatManager.h; path = include/lldb/DataFormatters/FormatManager.h; sourceTree = "<group>"; };
-		94EE33F218643C6900CD703B /* FormattersContainer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormattersContainer.h; path = include/lldb/DataFormatters/FormattersContainer.h; sourceTree = "<group>"; };
-		94D0858B1B9675B8000D24BD /* FormattersHelpers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FormattersHelpers.cpp; path = source/DataFormatters/FormattersHelpers.cpp; sourceTree = "<group>"; };
-		94D0858A1B9675A0000D24BD /* FormattersHelpers.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FormattersHelpers.h; path = include/lldb/DataFormatters/FormattersHelpers.h; sourceTree = "<group>"; };
-		2326CF451BDD647400A5CEAC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		260C876910F538E700BB2B04 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
-		AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FreeBSDSignals.cpp; path = Utility/FreeBSDSignals.cpp; sourceTree = "<group>"; };
-		AF23B4DA19009C66003E2A58 /* FreeBSDSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FreeBSDSignals.h; path = Utility/FreeBSDSignals.h; sourceTree = "<group>"; };
-		23AB052D199FF639003B8084 /* FreeBSDThread.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FreeBSDThread.cpp; sourceTree = "<group>"; };
-		23AB052E199FF639003B8084 /* FreeBSDThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FreeBSDThread.h; sourceTree = "<group>"; };
-		961FABB81235DE1600F93A47 /* FuncUnwinders.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FuncUnwinders.cpp; path = source/Symbol/FuncUnwinders.cpp; sourceTree = "<group>"; };
-		269FF07D12494F7D00225026 /* FuncUnwinders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FuncUnwinders.h; path = include/lldb/Symbol/FuncUnwinders.h; sourceTree = "<group>"; };
-		26BC7F1810F1B8EC00F91463 /* Function.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Function.cpp; path = source/Symbol/Function.cpp; sourceTree = "<group>"; };
-		26BC7C5A10F1B6E900F91463 /* Function.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Function.h; path = include/lldb/Symbol/Function.h; sourceTree = "<group>"; };
-		26603877211CA90E00329572 /* FunctionBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FunctionBreakpoint.cpp; path = "tools/lldb-vscode/FunctionBreakpoint.cpp"; sourceTree = "<group>"; };
-		26603871211CA90D00329572 /* FunctionBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FunctionBreakpoint.h; path = "tools/lldb-vscode/FunctionBreakpoint.h"; sourceTree = "<group>"; };
-		4C0083321B9A5DE200D5CF24 /* FunctionCaller.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FunctionCaller.cpp; path = source/Expression/FunctionCaller.cpp; sourceTree = "<group>"; };
-		4C00832D1B9A58A700D5CF24 /* FunctionCaller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FunctionCaller.h; path = include/lldb/Expression/FunctionCaller.h; sourceTree = "<group>"; };
-		2374D74E1D4BB299005C9575 /* GDBRemoteClientBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteClientBase.cpp; sourceTree = "<group>"; };
-		2374D74F1D4BB299005C9575 /* GDBRemoteClientBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteClientBase.h; sourceTree = "<group>"; };
-		2370A37D1D66C587000E7BE6 /* GDBRemoteClientBaseTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteClientBaseTest.cpp; sourceTree = "<group>"; };
-		2618EE5B1315B29C001D6D71 /* GDBRemoteCommunication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunication.cpp; sourceTree = "<group>"; };
-		2618EE5C1315B29C001D6D71 /* GDBRemoteCommunication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunication.h; sourceTree = "<group>"; };
-		26744EED1338317700EF765A /* GDBRemoteCommunicationClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationClient.cpp; sourceTree = "<group>"; };
-		26744EEE1338317700EF765A /* GDBRemoteCommunicationClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationClient.h; sourceTree = "<group>"; };
-		2370A37E1D66C587000E7BE6 /* GDBRemoteCommunicationClientTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationClientTest.cpp; sourceTree = "<group>"; };
-		AF8AD943219CD45700614785 /* GDBRemoteCommunicationHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationHistory.cpp; sourceTree = "<group>"; };
-		AF8AD944219CD45700614785 /* GDBRemoteCommunicationHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationHistory.h; sourceTree = "<group>"; };
-		AFCB1D57219CD4FD00730AD5 /* GDBRemoteCommunicationReplayServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationReplayServer.cpp; sourceTree = "<group>"; };
-		AFCB1D56219CD4FD00730AD5 /* GDBRemoteCommunicationReplayServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationReplayServer.h; sourceTree = "<group>"; };
-		26744EEF1338317700EF765A /* GDBRemoteCommunicationServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationServer.cpp; sourceTree = "<group>"; };
-		26744EF01338317700EF765A /* GDBRemoteCommunicationServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationServer.h; sourceTree = "<group>"; };
-		6D55B28D1A8A806200A70529 /* GDBRemoteCommunicationServerCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationServerCommon.cpp; sourceTree = "<group>"; };
-		6D55B2931A8A808400A70529 /* GDBRemoteCommunicationServerCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationServerCommon.h; sourceTree = "<group>"; };
-		6D55B28E1A8A806200A70529 /* GDBRemoteCommunicationServerLLGS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationServerLLGS.cpp; sourceTree = "<group>"; };
-		6D55B2941A8A808400A70529 /* GDBRemoteCommunicationServerLLGS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationServerLLGS.h; sourceTree = "<group>"; };
-		6D55B28F1A8A806200A70529 /* GDBRemoteCommunicationServerPlatform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteCommunicationServerPlatform.cpp; sourceTree = "<group>"; };
-		6D55B2951A8A808400A70529 /* GDBRemoteCommunicationServerPlatform.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GDBRemoteCommunicationServerPlatform.h; sourceTree = "<group>"; };
-		2618EE5D1315B29C001D6D71 /* GDBRemoteRegisterContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteRegisterContext.cpp; sourceTree = "<group>"; };
-		2618EE5E1315B29C001D6D71 /* GDBRemoteRegisterContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteRegisterContext.h; sourceTree = "<group>"; };
-		E73A15A41B548EC500786197 /* GDBRemoteSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GDBRemoteSignals.cpp; path = Utility/GDBRemoteSignals.cpp; sourceTree = "<group>"; };
-		E73A15A51B548EC500786197 /* GDBRemoteSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GDBRemoteSignals.h; path = Utility/GDBRemoteSignals.h; sourceTree = "<group>"; };
-		2370A37F1D66C587000E7BE6 /* GDBRemoteTestUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GDBRemoteTestUtils.cpp; sourceTree = "<group>"; };
-		2370A3801D66C587000E7BE6 /* GDBRemoteTestUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDBRemoteTestUtils.h; sourceTree = "<group>"; };
-		6D95DBFE1B9DC057000E318A /* HashedNameToDIE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HashedNameToDIE.cpp; sourceTree = "<group>"; };
-		26A0DA4D140F721D006DA411 /* HashedNameToDIE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HashedNameToDIE.h; sourceTree = "<group>"; };
-		2666ADC31B3CB675001FAFD3 /* HexagonDYLDRendezvous.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HexagonDYLDRendezvous.cpp; sourceTree = "<group>"; };
-		2666ADC41B3CB675001FAFD3 /* HexagonDYLDRendezvous.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HexagonDYLDRendezvous.h; sourceTree = "<group>"; };
-		58A080A92112AA9400D5580F /* Highlighter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Highlighter.cpp; path = source/Core/Highlighter.cpp; sourceTree = "<group>"; };
-		58A080B12112AB2200D5580F /* HighlighterTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HighlighterTest.cpp; path = unittests/Language/Highlighting/HighlighterTest.cpp; sourceTree = SOURCE_ROOT; };
-		AF1729D4182C907200E0AB97 /* HistoryThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HistoryThread.cpp; path = Utility/HistoryThread.cpp; sourceTree = "<group>"; };
-		AF061F89182C980000B6A19C /* HistoryThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HistoryThread.h; path = Utility/HistoryThread.h; sourceTree = "<group>"; };
-		AF1729D5182C907200E0AB97 /* HistoryUnwind.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HistoryUnwind.cpp; path = Utility/HistoryUnwind.cpp; sourceTree = "<group>"; };
-		AF061F8A182C980000B6A19C /* HistoryUnwind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HistoryUnwind.h; path = Utility/HistoryUnwind.h; sourceTree = "<group>"; };
-		233B009D19610D6B0090E598 /* Host.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Host.cpp; sourceTree = "<group>"; };
-		3FDFE54219A29448009756A7 /* Host.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Host.cpp; path = source/Host/windows/Host.cpp; sourceTree = "<group>"; };
-		3FDFE55E19AF9B14009756A7 /* Host.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Host.cpp; path = source/Host/freebsd/Host.cpp; sourceTree = "<group>"; };
-		69A01E1C1236C5D400C660B5 /* Host.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Host.cpp; sourceTree = "<group>"; };
-		26BC7DD410F1B7D500F91463 /* Host.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Host.h; path = include/lldb/Host/Host.h; sourceTree = "<group>"; };
-		AFF81FAD20D1CC400010F95E /* Host.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = Host.mm; path = source/Host/macosx/objcxx/Host.mm; sourceTree = "<group>"; };
-		3FDFED1F19BA6D55009756A7 /* HostGetOpt.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostGetOpt.h; path = include/lldb/Host/HostGetOpt.h; sourceTree = "<group>"; };
-		3FDFE53719A2936B009756A7 /* HostInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfo.h; path = include/lldb/Host/HostInfo.h; sourceTree = "<group>"; };
-		6D55BAE01A8CD03D00A70529 /* HostInfoAndroid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostInfoAndroid.cpp; path = source/Host/android/HostInfoAndroid.cpp; sourceTree = "<group>"; };
-		6D55BAE41A8CD06000A70529 /* HostInfoAndroid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoAndroid.h; path = include/lldb/Host/android/HostInfoAndroid.h; sourceTree = "<group>"; };
-		3FDFE53419A29327009756A7 /* HostInfoBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostInfoBase.cpp; sourceTree = "<group>"; };
-		3FDFE53819A2936B009756A7 /* HostInfoBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoBase.h; path = include/lldb/Host/HostInfoBase.h; sourceTree = "<group>"; };
-		3FDFE53B19A293B3009756A7 /* HostInfoFreeBSD.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostInfoFreeBSD.cpp; path = source/Host/freebsd/HostInfoFreeBSD.cpp; sourceTree = "<group>"; };
-		3FDFE53D19A293CA009756A7 /* HostInfoFreeBSD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoFreeBSD.h; path = include/lldb/Host/freebsd/HostInfoFreeBSD.h; sourceTree = "<group>"; };
-		3FDFE53619A2933E009756A7 /* HostInfoLinux.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HostInfoLinux.cpp; sourceTree = "<group>"; };
-		237C577A19AF9D9F00213D59 /* HostInfoLinux.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoLinux.h; path = include/lldb/Host/linux/HostInfoLinux.h; sourceTree = SOURCE_ROOT; };
-		3FDFE56419AF9B77009756A7 /* HostInfoLinux.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoLinux.h; path = include/lldb/Host/linux/HostInfoLinux.h; sourceTree = SOURCE_ROOT; };
-		3FDFE52D19A291AF009756A7 /* HostInfoMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostInfoMacOSX.h; path = include/lldb/Host/macosx/HostInfoMacOSX.h; sourceTree = "<group>"; };
-		AFF81FAB20D1CC400010F95E /* HostInfoMacOSX.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = HostInfoMacOSX.mm; path = source/Host/macosx/objcxx/HostInfoMacOSX.mm; sourceTree = "<group>"; };
-		3FDFE53019A292F0009756A7 /* HostInfoPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostInfoPosix.cpp; sourceTree = "<group>"; };
-		3FDFE53219A29304009756A7 /* HostInfoPosix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostInfoPosix.h; path = ../../../include/lldb/Host/posix/HostInfoPosix.h; sourceTree = "<group>"; };
-		3FDFE54319A29448009756A7 /* HostInfoWindows.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostInfoWindows.cpp; path = source/Host/windows/HostInfoWindows.cpp; sourceTree = "<group>"; };
-		3FDFE54919A2946B009756A7 /* HostInfoWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostInfoWindows.h; path = include/lldb/Host/windows/HostInfoWindows.h; sourceTree = "<group>"; };
-		3FDFED2019BA6D55009756A7 /* HostNativeThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostNativeThread.h; path = include/lldb/Host/HostNativeThread.h; sourceTree = "<group>"; };
-		3FDFED2419BA6D96009756A7 /* HostNativeThreadBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostNativeThreadBase.cpp; sourceTree = "<group>"; };
-		3FDFED2119BA6D55009756A7 /* HostNativeThreadBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostNativeThreadBase.h; path = include/lldb/Host/HostNativeThreadBase.h; sourceTree = "<group>"; };
-		3FDFED2C19C257A0009756A7 /* HostProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostProcess.cpp; sourceTree = "<group>"; };
-		3FDFE57419AFABFD009756A7 /* HostProcess.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostProcess.h; path = include/lldb/Host/HostProcess.h; sourceTree = "<group>"; };
-		3FDFE56A19AF9C44009756A7 /* HostProcessPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostProcessPosix.cpp; sourceTree = "<group>"; };
-		3FDFE56E19AF9C5A009756A7 /* HostProcessPosix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostProcessPosix.h; path = ../../../include/lldb/Host/posix/HostProcessPosix.h; sourceTree = "<group>"; };
-		3FDFE57019AF9CA0009756A7 /* HostProcessWindows.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostProcessWindows.cpp; path = source/Host/windows/HostProcessWindows.cpp; sourceTree = "<group>"; };
-		3FDFE57219AF9CD3009756A7 /* HostProcessWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostProcessWindows.h; path = include/lldb/Host/windows/HostProcessWindows.h; sourceTree = "<group>"; };
-		9A20572F1F3B8E7600F6C293 /* HostTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostTest.cpp; sourceTree = "<group>"; };
-		9A20573C1F3B8EA200F6C293 /* HostTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HostTest.cpp; path = linux/HostTest.cpp; sourceTree = "<group>"; };
-		3FDFED2519BA6D96009756A7 /* HostThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostThread.cpp; sourceTree = "<group>"; };
-		3FDFE57519AFABFD009756A7 /* HostThread.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostThread.h; path = include/lldb/Host/HostThread.h; sourceTree = "<group>"; };
-		3FDFE55F19AF9B14009756A7 /* HostThreadFreeBSD.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostThreadFreeBSD.cpp; path = source/Host/freebsd/HostThreadFreeBSD.cpp; sourceTree = "<group>"; };
-		3FDFE56019AF9B39009756A7 /* HostThreadFreeBSD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostThreadFreeBSD.h; path = include/lldb/Host/freebsd/HostThreadFreeBSD.h; sourceTree = "<group>"; };
-		3FDFE56219AF9B60009756A7 /* HostThreadLinux.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = HostThreadLinux.cpp; sourceTree = "<group>"; };
-		3FDFE56519AF9B77009756A7 /* HostThreadLinux.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostThreadLinux.h; path = include/lldb/Host/linux/HostThreadLinux.h; sourceTree = SOURCE_ROOT; };
-		3FDFE56719AF9BB2009756A7 /* HostThreadMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostThreadMacOSX.h; path = include/lldb/Host/macosx/HostThreadMacOSX.h; sourceTree = "<group>"; };
-		AFF81FAC20D1CC400010F95E /* HostThreadMacOSX.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = HostThreadMacOSX.mm; path = source/Host/macosx/objcxx/HostThreadMacOSX.mm; sourceTree = "<group>"; };
-		3FDFE56B19AF9C44009756A7 /* HostThreadPosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HostThreadPosix.cpp; sourceTree = "<group>"; };
-		3FDFE56F19AF9C5A009756A7 /* HostThreadPosix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HostThreadPosix.h; path = ../../../include/lldb/Host/posix/HostThreadPosix.h; sourceTree = "<group>"; };
-		3FDFE57119AF9CA0009756A7 /* HostThreadWindows.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = HostThreadWindows.cpp; path = source/Host/windows/HostThreadWindows.cpp; sourceTree = "<group>"; };
-		3FDFE57319AF9CD3009756A7 /* HostThreadWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = HostThreadWindows.h; path = include/lldb/Host/windows/HostThreadWindows.h; sourceTree = "<group>"; };
-		260A63181861009E00FECF8E /* IOHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IOHandler.cpp; path = source/Core/IOHandler.cpp; sourceTree = "<group>"; };
-		260A63161861008E00FECF8E /* IOHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOHandler.h; path = include/lldb/Core/IOHandler.h; sourceTree = "<group>"; };
-		236124A21986B4E2004EFC37 /* IOObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IOObject.cpp; path = source/Utility/IOObject.cpp; sourceTree = "<group>"; };
-		236124A61986B50E004EFC37 /* IOObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IOObject.h; path = include/lldb/Utility/IOObject.h; sourceTree = "<group>"; };
-		26BC7D6510F1B77400F91463 /* IOStreamMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOStreamMacros.h; path = include/lldb/Core/IOStreamMacros.h; sourceTree = "<group>"; };
-		4C98D3DB118FB96F00E575D0 /* IRExecutionUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRExecutionUnit.cpp; path = source/Expression/IRExecutionUnit.cpp; sourceTree = "<group>"; };
-		4C98D3E1118FB98F00E575D0 /* IRExecutionUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRExecutionUnit.h; path = include/lldb/Expression/IRExecutionUnit.h; sourceTree = "<group>"; };
-		49307AAD11DEA4D90081F992 /* IRForTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRForTarget.cpp; path = ExpressionParser/Clang/IRForTarget.cpp; sourceTree = "<group>"; };
-		49307AB111DEA4F20081F992 /* IRForTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRForTarget.h; path = ExpressionParser/Clang/IRForTarget.h; sourceTree = "<group>"; };
-		496B01581406DE8900F830D5 /* IRInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRInterpreter.cpp; path = source/Expression/IRInterpreter.cpp; sourceTree = "<group>"; };
-		496B015A1406DEB100F830D5 /* IRInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IRInterpreter.h; path = include/lldb/Expression/IRInterpreter.h; sourceTree = "<group>"; };
-		49DCF6FD170E6B4A0092F75E /* IRMemoryMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IRMemoryMap.cpp; path = source/Expression/IRMemoryMap.cpp; sourceTree = "<group>"; };
-		49C66B1C17011A43004D1922 /* IRMemoryMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = IRMemoryMap.h; path = include/lldb/Expression/IRMemoryMap.h; sourceTree = "<group>"; };
-		B28058A0139988B0002D96D0 /* InferiorCallPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InferiorCallPOSIX.cpp; path = Utility/InferiorCallPOSIX.cpp; sourceTree = "<group>"; };
-		B28058A2139988C6002D96D0 /* InferiorCallPOSIX.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InferiorCallPOSIX.h; path = Utility/InferiorCallPOSIX.h; sourceTree = "<group>"; };
-		B2D3033612EFA5C500F84EB3 /* InstructionUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InstructionUtils.h; path = Utility/InstructionUtils.h; sourceTree = "<group>"; };
-		8CF02ADF19DCBF3B00B14BE0 /* InstrumentationRuntime.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = InstrumentationRuntime.cpp; path = source/Target/InstrumentationRuntime.cpp; sourceTree = "<group>"; };
-		8CF02AE019DCBF3B00B14BE0 /* InstrumentationRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InstrumentationRuntime.h; path = include/lldb/Target/InstrumentationRuntime.h; sourceTree = "<group>"; };
-		8CF02AED19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = InstrumentationRuntimeStopInfo.cpp; path = source/Target/InstrumentationRuntimeStopInfo.cpp; sourceTree = "<group>"; };
-		8CF02AEE19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = InstrumentationRuntimeStopInfo.h; path = include/lldb/Target/InstrumentationRuntimeStopInfo.h; sourceTree = "<group>"; };
-		4CCA643D13B40B82003BDF98 /* ItaniumABILanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ItaniumABILanguageRuntime.cpp; sourceTree = "<group>"; };
-		4CCA643E13B40B82003BDF98 /* ItaniumABILanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ItaniumABILanguageRuntime.h; sourceTree = "<group>"; };
-		4C73152119B7D71700F865A4 /* Iterable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Iterable.h; path = include/lldb/Utility/Iterable.h; sourceTree = "<group>"; };
-		26BC179718C7F2B300D2196D /* JITLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JITLoader.cpp; path = source/Target/JITLoader.cpp; sourceTree = "<group>"; };
-		26BC179B18C7F2CB00D2196D /* JITLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JITLoader.h; path = include/lldb/Target/JITLoader.h; sourceTree = "<group>"; };
-		AF2BCA6918C7EFDE005B4526 /* JITLoaderGDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITLoaderGDB.cpp; sourceTree = "<group>"; };
-		AF2BCA6A18C7EFDE005B4526 /* JITLoaderGDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITLoaderGDB.h; sourceTree = "<group>"; };
-		26BC179818C7F2B300D2196D /* JITLoaderList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JITLoaderList.cpp; path = source/Target/JITLoaderList.cpp; sourceTree = "<group>"; };
-		26BC179C18C7F2CB00D2196D /* JITLoaderList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JITLoaderList.h; path = include/lldb/Target/JITLoaderList.h; sourceTree = "<group>"; };
-		942829551A89614C00521B30 /* JSON.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSON.cpp; path = source/Utility/JSON.cpp; sourceTree = "<group>"; };
-		942829541A89614000521B30 /* JSON.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = JSON.h; path = include/lldb/Utility/JSON.h; sourceTree = "<group>"; };
-		8C3BD99F1EF5D1B50016C343 /* JSONTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSONTest.cpp; sourceTree = "<group>"; };
-		26603875211CA90E00329572 /* JSONUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = JSONUtils.cpp; path = "tools/lldb-vscode/JSONUtils.cpp"; sourceTree = "<group>"; };
-		26603876211CA90E00329572 /* JSONUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONUtils.h; path = "tools/lldb-vscode/JSONUtils.h"; sourceTree = "<group>"; };
-		26680207115FD0ED008E1FE4 /* LLDB.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LLDB.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-		26B42C4C1187ABA50079C8C8 /* LLDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLDB.h; path = include/lldb/API/LLDB.h; sourceTree = "<group>"; };
-		943BDEFD1AA7B2F800789CE8 /* LLDBAssert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLDBAssert.cpp; path = source/Utility/LLDBAssert.cpp; sourceTree = "<group>"; };
-		943BDEFC1AA7B2DE00789CE8 /* LLDBAssert.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LLDBAssert.h; path = include/lldb/Utility/LLDBAssert.h; sourceTree = "<group>"; };
-		236102991CF38A2B00B8E0B9 /* LLDBConfig.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LLDBConfig.cmake; sourceTree = "<group>"; };
-		6D762BEC1B1605CD006C929D /* LLDBServerUtilities.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LLDBServerUtilities.cpp; path = "tools/lldb-server/LLDBServerUtilities.cpp"; sourceTree = "<group>"; };
-		6D762BED1B1605CD006C929D /* LLDBServerUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LLDBServerUtilities.h; path = "tools/lldb-server/LLDBServerUtilities.h"; sourceTree = "<group>"; };
-		2361029A1CF38A2B00B8E0B9 /* LLDBStandalone.cmake */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LLDBStandalone.cmake; sourceTree = "<group>"; };
-		26F76199211CBBB30044F6EA /* LLDBUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLDBUtils.cpp; path = "tools/lldb-vscode/LLDBUtils.cpp"; sourceTree = "<group>"; };
-		26F7619A211CBBB30044F6EA /* LLDBUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LLDBUtils.h; path = "tools/lldb-vscode/LLDBUtils.h"; sourceTree = "<group>"; };
-		26A4EEB511682AAC007A372A /* LLDBWrapPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; path = LLDBWrapPython.cpp; sourceTree = BUILT_PRODUCTS_DIR; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
-		AEB0E4581BD6E9F800B24093 /* LLVMUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLVMUserExpression.cpp; path = source/Expression/LLVMUserExpression.cpp; sourceTree = "<group>"; };
-		AEB0E45A1BD6EA1400B24093 /* LLVMUserExpression.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LLVMUserExpression.h; path = include/lldb/Expression/LLVMUserExpression.h; sourceTree = "<group>"; };
-		94B638521B8F8E6C004FE1E4 /* Language.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Language.cpp; path = source/Target/Language.cpp; sourceTree = "<group>"; };
-		94B638511B8F8E53004FE1E4 /* Language.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Language.h; path = include/lldb/Target/Language.h; sourceTree = "<group>"; };
-		942612F61B95000000EF842E /* LanguageCategory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LanguageCategory.cpp; path = source/DataFormatters/LanguageCategory.cpp; sourceTree = "<group>"; };
-		942612F51B94FFE900EF842E /* LanguageCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LanguageCategory.h; path = include/lldb/DataFormatters/LanguageCategory.h; sourceTree = "<group>"; };
-		4CB4430A12491DDA00C13DC2 /* LanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LanguageRuntime.cpp; path = source/Target/LanguageRuntime.cpp; sourceTree = "<group>"; };
-		4CB4430912491DDA00C13DC2 /* LanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LanguageRuntime.h; path = include/lldb/Target/LanguageRuntime.h; sourceTree = "<group>"; };
-		26709E311964A34000B94724 /* LaunchServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = LaunchServices.framework; path = /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework; sourceTree = "<absolute>"; };
-		945261B51B9A11E800BF138D /* LibCxx.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxx.cpp; path = Language/CPlusPlus/LibCxx.cpp; sourceTree = "<group>"; };
-		945261B61B9A11E800BF138D /* LibCxx.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibCxx.h; path = Language/CPlusPlus/LibCxx.h; sourceTree = "<group>"; };
-		9428BC291C6E64DC002A24D7 /* LibCxxAtomic.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxAtomic.cpp; path = Language/CPlusPlus/LibCxxAtomic.cpp; sourceTree = "<group>"; };
-		9428BC2A1C6E64DC002A24D7 /* LibCxxAtomic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibCxxAtomic.h; path = Language/CPlusPlus/LibCxxAtomic.h; sourceTree = "<group>"; };
-		AFC67B141FBBB03500860ECB /* LibCxxBitset.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxBitset.cpp; path = Language/CPlusPlus/LibCxxBitset.cpp; sourceTree = "<group>"; };
-		945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxInitializerList.cpp; path = Language/CPlusPlus/LibCxxInitializerList.cpp; sourceTree = "<group>"; };
-		945261B81B9A11E800BF138D /* LibCxxList.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxList.cpp; path = Language/CPlusPlus/LibCxxList.cpp; sourceTree = "<group>"; };
-		945261B91B9A11E800BF138D /* LibCxxMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxMap.cpp; path = Language/CPlusPlus/LibCxxMap.cpp; sourceTree = "<group>"; };
-		E4A63A9020F55D27000D9548 /* LibCxxOptional.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxOptional.cpp; path = Language/CPlusPlus/LibCxxOptional.cpp; sourceTree = "<group>"; };
-		AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxQueue.cpp; path = Language/CPlusPlus/LibCxxQueue.cpp; sourceTree = "<group>"; };
-		AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxTuple.cpp; path = Language/CPlusPlus/LibCxxTuple.cpp; sourceTree = "<group>"; };
-		945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxUnorderedMap.cpp; path = Language/CPlusPlus/LibCxxUnorderedMap.cpp; sourceTree = "<group>"; };
-		E414F6F021388F6B00C50BC6 /* LibCxxVariant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxVariant.cpp; path = Language/CPlusPlus/LibCxxVariant.cpp; sourceTree = "<group>"; };
-		E414F6ED21388F0200C50BC6 /* LibCxxVariant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LibCxxVariant.h; path = Language/CPlusPlus/LibCxxVariant.h; sourceTree = "<group>"; };
-		945261BB1B9A11E800BF138D /* LibCxxVector.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibCxxVector.cpp; path = Language/CPlusPlus/LibCxxVector.cpp; sourceTree = "<group>"; };
-		945261BC1B9A11E800BF138D /* LibStdcpp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LibStdcpp.cpp; path = Language/CPlusPlus/LibStdcpp.cpp; sourceTree = "<group>"; };
-		945261BD1B9A11E800BF138D /* LibStdcpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LibStdcpp.h; path = Language/CPlusPlus/LibStdcpp.h; sourceTree = "<group>"; };
-		4CDB8D681DBA91A6006C5B13 /* LibStdcppTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibStdcppTuple.cpp; path = Language/CPlusPlus/LibStdcppTuple.cpp; sourceTree = "<group>"; };
-		4CDB8D671DBA91A6006C5B13 /* LibStdcppUniquePointer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LibStdcppUniquePointer.cpp; path = Language/CPlusPlus/LibStdcppUniquePointer.cpp; sourceTree = "<group>"; };
-		26BC7F1910F1B8EC00F91463 /* LineEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineEntry.cpp; path = source/Symbol/LineEntry.cpp; sourceTree = "<group>"; };
-		26BC7C5B10F1B6E900F91463 /* LineEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineEntry.h; path = include/lldb/Symbol/LineEntry.h; sourceTree = "<group>"; };
-		26BC7F1A10F1B8EC00F91463 /* LineTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineTable.cpp; path = source/Symbol/LineTable.cpp; sourceTree = "<group>"; };
-		26BC7C5C10F1B6E900F91463 /* LineTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineTable.h; path = include/lldb/Symbol/LineTable.h; sourceTree = "<group>"; };
-		2647B64221C43BB000A81D15 /* LinuxProcMaps.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LinuxProcMaps.cpp; path = Utility/LinuxProcMaps.cpp; sourceTree = "<group>"; };
-		2647B64121C43BAF00A81D15 /* LinuxProcMaps.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinuxProcMaps.h; path = Utility/LinuxProcMaps.h; sourceTree = "<group>"; };
-		23059A0519532B96007B8189 /* LinuxSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LinuxSignals.cpp; path = Utility/LinuxSignals.cpp; sourceTree = "<group>"; };
-		23059A0619532B96007B8189 /* LinuxSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LinuxSignals.h; path = Utility/LinuxSignals.h; sourceTree = "<group>"; };
-		2647B63D21C436BC00A81D15 /* Listener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Listener.cpp; path = source/Utility/Listener.cpp; sourceTree = "<group>"; };
-		2647B63721C4369500A81D15 /* Listener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Listener.h; path = include/lldb/Utility/Listener.h; sourceTree = "<group>"; };
-		9A3D43E31F3237D500EB767C /* ListenerTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ListenerTest.cpp; sourceTree = "<group>"; };
-		AFF1273422276F1100C25726 /* LocateSymbolFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LocateSymbolFile.cpp; path = source/Symbol/LocateSymbolFile.cpp; sourceTree = "<group>"; };
-		AFC3068022276F62002675EA /* LocateSymbolFileMacOSX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LocateSymbolFileMacOSX.cpp; path = source/Symbol/LocateSymbolFileMacOSX.cpp; sourceTree = "<group>"; };
-		AFB4C8122228A7AE0018086A /* LocateSymbolFileTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocateSymbolFileTest.cpp; sourceTree = "<group>"; };
-		255EFF731AFABA720069F277 /* LockFileBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LockFileBase.cpp; sourceTree = "<group>"; };
-		255EFF751AFABA950069F277 /* LockFilePosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LockFilePosix.cpp; sourceTree = "<group>"; };
-		255EFF711AFABA4D0069F277 /* LockFileWindows.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LockFileWindows.cpp; path = source/Host/windows/LockFileWindows.cpp; sourceTree = "<group>"; };
-		255EFF6F1AFABA320069F277 /* LockFileWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = LockFileWindows.h; path = include/lldb/Host/windows/LockFileWindows.h; sourceTree = "<group>"; };
-		26BC7E7F10F1B85900F91463 /* Log.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Log.cpp; path = source/Utility/Log.cpp; sourceTree = "<group>"; };
-		26BC7D6810F1B77400F91463 /* Log.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Log.h; path = include/lldb/Utility/Log.h; sourceTree = "<group>"; };
-		26109B3B1155D70100CC3529 /* LogChannelDWARF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogChannelDWARF.cpp; sourceTree = "<group>"; };
-		26109B3C1155D70100CC3529 /* LogChannelDWARF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogChannelDWARF.h; sourceTree = "<group>"; };
-		9A3D43C71F3150D200EB767C /* LogTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LogTest.cpp; sourceTree = "<group>"; };
-		3F8160A51AB9F7DD001DA9DF /* Logging.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Logging.cpp; path = source/Utility/Logging.cpp; sourceTree = "<group>"; };
-		3F8160A71AB9F809001DA9DF /* Logging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = include/lldb/Utility/Logging.h; sourceTree = "<group>"; };
-		266941601A6DC2AB0063BE93 /* MICmdArgContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgContext.cpp; path = "tools/lldb-mi/MICmdArgContext.cpp"; sourceTree = SOURCE_ROOT; };
-		266941611A6DC2AB0063BE93 /* MICmdArgContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgContext.h; path = "tools/lldb-mi/MICmdArgContext.h"; sourceTree = SOURCE_ROOT; };
-		266941621A6DC2AB0063BE93 /* MICmdArgSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgSet.cpp; path = "tools/lldb-mi/MICmdArgSet.cpp"; sourceTree = SOURCE_ROOT; };
-		266941631A6DC2AB0063BE93 /* MICmdArgSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgSet.h; path = "tools/lldb-mi/MICmdArgSet.h"; sourceTree = SOURCE_ROOT; };
-		266941641A6DC2AB0063BE93 /* MICmdArgValBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValBase.cpp; path = "tools/lldb-mi/MICmdArgValBase.cpp"; sourceTree = SOURCE_ROOT; };
-		266941651A6DC2AB0063BE93 /* MICmdArgValBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValBase.h; path = "tools/lldb-mi/MICmdArgValBase.h"; sourceTree = SOURCE_ROOT; };
-		266941661A6DC2AB0063BE93 /* MICmdArgValConsume.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValConsume.cpp; path = "tools/lldb-mi/MICmdArgValConsume.cpp"; sourceTree = SOURCE_ROOT; };
-		266941671A6DC2AB0063BE93 /* MICmdArgValConsume.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValConsume.h; path = "tools/lldb-mi/MICmdArgValConsume.h"; sourceTree = SOURCE_ROOT; };
-		266941681A6DC2AB0063BE93 /* MICmdArgValFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValFile.cpp; path = "tools/lldb-mi/MICmdArgValFile.cpp"; sourceTree = SOURCE_ROOT; };
-		266941691A6DC2AB0063BE93 /* MICmdArgValFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValFile.h; path = "tools/lldb-mi/MICmdArgValFile.h"; sourceTree = SOURCE_ROOT; };
-		2669416A1A6DC2AC0063BE93 /* MICmdArgValListBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValListBase.cpp; path = "tools/lldb-mi/MICmdArgValListBase.cpp"; sourceTree = SOURCE_ROOT; };
-		2669416B1A6DC2AC0063BE93 /* MICmdArgValListBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValListBase.h; path = "tools/lldb-mi/MICmdArgValListBase.h"; sourceTree = SOURCE_ROOT; };
-		2669416C1A6DC2AC0063BE93 /* MICmdArgValListOfN.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValListOfN.cpp; path = "tools/lldb-mi/MICmdArgValListOfN.cpp"; sourceTree = SOURCE_ROOT; };
-		2669416D1A6DC2AC0063BE93 /* MICmdArgValListOfN.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValListOfN.h; path = "tools/lldb-mi/MICmdArgValListOfN.h"; sourceTree = SOURCE_ROOT; };
-		2669416E1A6DC2AC0063BE93 /* MICmdArgValNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValNumber.cpp; path = "tools/lldb-mi/MICmdArgValNumber.cpp"; sourceTree = SOURCE_ROOT; };
-		2669416F1A6DC2AC0063BE93 /* MICmdArgValNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValNumber.h; path = "tools/lldb-mi/MICmdArgValNumber.h"; sourceTree = SOURCE_ROOT; };
-		266941701A6DC2AC0063BE93 /* MICmdArgValOptionLong.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValOptionLong.cpp; path = "tools/lldb-mi/MICmdArgValOptionLong.cpp"; sourceTree = SOURCE_ROOT; };
-		266941711A6DC2AC0063BE93 /* MICmdArgValOptionLong.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValOptionLong.h; path = "tools/lldb-mi/MICmdArgValOptionLong.h"; sourceTree = SOURCE_ROOT; };
-		266941721A6DC2AC0063BE93 /* MICmdArgValOptionShort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValOptionShort.cpp; path = "tools/lldb-mi/MICmdArgValOptionShort.cpp"; sourceTree = SOURCE_ROOT; };
-		266941731A6DC2AC0063BE93 /* MICmdArgValOptionShort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValOptionShort.h; path = "tools/lldb-mi/MICmdArgValOptionShort.h"; sourceTree = SOURCE_ROOT; };
-		267DFB441B06752A00000FB7 /* MICmdArgValPrintValues.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValPrintValues.cpp; path = "tools/lldb-mi/MICmdArgValPrintValues.cpp"; sourceTree = SOURCE_ROOT; };
-		267DFB451B06752A00000FB7 /* MICmdArgValPrintValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValPrintValues.h; path = "tools/lldb-mi/MICmdArgValPrintValues.h"; sourceTree = SOURCE_ROOT; };
-		266941741A6DC2AC0063BE93 /* MICmdArgValString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValString.cpp; path = "tools/lldb-mi/MICmdArgValString.cpp"; sourceTree = SOURCE_ROOT; };
-		266941751A6DC2AC0063BE93 /* MICmdArgValString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValString.h; path = "tools/lldb-mi/MICmdArgValString.h"; sourceTree = SOURCE_ROOT; };
-		266941761A6DC2AC0063BE93 /* MICmdArgValThreadGrp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdArgValThreadGrp.cpp; path = "tools/lldb-mi/MICmdArgValThreadGrp.cpp"; sourceTree = SOURCE_ROOT; };
-		266941771A6DC2AC0063BE93 /* MICmdArgValThreadGrp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdArgValThreadGrp.h; path = "tools/lldb-mi/MICmdArgValThreadGrp.h"; sourceTree = SOURCE_ROOT; };
-		266941781A6DC2AC0063BE93 /* MICmdBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdBase.cpp; path = "tools/lldb-mi/MICmdBase.cpp"; sourceTree = SOURCE_ROOT; };
-		266941791A6DC2AC0063BE93 /* MICmdBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdBase.h; path = "tools/lldb-mi/MICmdBase.h"; sourceTree = SOURCE_ROOT; };
-		2669417A1A6DC2AC0063BE93 /* MICmdCmd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmd.cpp; path = "tools/lldb-mi/MICmdCmd.cpp"; sourceTree = SOURCE_ROOT; };
-		2669417B1A6DC2AC0063BE93 /* MICmdCmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmd.h; path = "tools/lldb-mi/MICmdCmd.h"; sourceTree = SOURCE_ROOT; };
-		2669417C1A6DC2AC0063BE93 /* MICmdCmdBreak.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdBreak.cpp; path = "tools/lldb-mi/MICmdCmdBreak.cpp"; sourceTree = SOURCE_ROOT; };
-		2669417D1A6DC2AC0063BE93 /* MICmdCmdBreak.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdBreak.h; path = "tools/lldb-mi/MICmdCmdBreak.h"; sourceTree = SOURCE_ROOT; };
-		2669417E1A6DC2AC0063BE93 /* MICmdCmdData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdData.cpp; path = "tools/lldb-mi/MICmdCmdData.cpp"; sourceTree = SOURCE_ROOT; };
-		2669417F1A6DC2AC0063BE93 /* MICmdCmdData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdData.h; path = "tools/lldb-mi/MICmdCmdData.h"; sourceTree = SOURCE_ROOT; };
-		266941801A6DC2AC0063BE93 /* MICmdCmdEnviro.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdEnviro.cpp; path = "tools/lldb-mi/MICmdCmdEnviro.cpp"; sourceTree = SOURCE_ROOT; };
-		266941811A6DC2AC0063BE93 /* MICmdCmdEnviro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdEnviro.h; path = "tools/lldb-mi/MICmdCmdEnviro.h"; sourceTree = SOURCE_ROOT; };
-		266941821A6DC2AC0063BE93 /* MICmdCmdExec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdExec.cpp; path = "tools/lldb-mi/MICmdCmdExec.cpp"; sourceTree = SOURCE_ROOT; };
-		266941831A6DC2AC0063BE93 /* MICmdCmdExec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdExec.h; path = "tools/lldb-mi/MICmdCmdExec.h"; sourceTree = SOURCE_ROOT; };
-		266941841A6DC2AC0063BE93 /* MICmdCmdFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdFile.cpp; path = "tools/lldb-mi/MICmdCmdFile.cpp"; sourceTree = SOURCE_ROOT; };
-		266941851A6DC2AC0063BE93 /* MICmdCmdFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdFile.h; path = "tools/lldb-mi/MICmdCmdFile.h"; sourceTree = SOURCE_ROOT; };
-		266941861A6DC2AC0063BE93 /* MICmdCmdGdbInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdGdbInfo.cpp; path = "tools/lldb-mi/MICmdCmdGdbInfo.cpp"; sourceTree = SOURCE_ROOT; };
-		266941871A6DC2AC0063BE93 /* MICmdCmdGdbInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdGdbInfo.h; path = "tools/lldb-mi/MICmdCmdGdbInfo.h"; sourceTree = SOURCE_ROOT; };
-		266941881A6DC2AC0063BE93 /* MICmdCmdGdbSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdGdbSet.cpp; path = "tools/lldb-mi/MICmdCmdGdbSet.cpp"; sourceTree = SOURCE_ROOT; };
-		266941891A6DC2AC0063BE93 /* MICmdCmdGdbSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdGdbSet.h; path = "tools/lldb-mi/MICmdCmdGdbSet.h"; sourceTree = SOURCE_ROOT; };
-		AFB3D27E1AC262AB003B4B30 /* MICmdCmdGdbShow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdGdbShow.cpp; path = "tools/lldb-mi/MICmdCmdGdbShow.cpp"; sourceTree = SOURCE_ROOT; };
-		AFB3D27F1AC262AB003B4B30 /* MICmdCmdGdbShow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdGdbShow.h; path = "tools/lldb-mi/MICmdCmdGdbShow.h"; sourceTree = SOURCE_ROOT; };
-		2669418A1A6DC2AC0063BE93 /* MICmdCmdGdbThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdGdbThread.cpp; path = "tools/lldb-mi/MICmdCmdGdbThread.cpp"; sourceTree = SOURCE_ROOT; };
-		2669418B1A6DC2AC0063BE93 /* MICmdCmdGdbThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdGdbThread.h; path = "tools/lldb-mi/MICmdCmdGdbThread.h"; sourceTree = SOURCE_ROOT; };
-		2669418C1A6DC2AC0063BE93 /* MICmdCmdMiscellanous.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdMiscellanous.cpp; path = "tools/lldb-mi/MICmdCmdMiscellanous.cpp"; sourceTree = SOURCE_ROOT; };
-		2669418D1A6DC2AC0063BE93 /* MICmdCmdMiscellanous.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdMiscellanous.h; path = "tools/lldb-mi/MICmdCmdMiscellanous.h"; sourceTree = SOURCE_ROOT; };
-		2669418E1A6DC2AC0063BE93 /* MICmdCmdStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdStack.cpp; path = "tools/lldb-mi/MICmdCmdStack.cpp"; sourceTree = SOURCE_ROOT; };
-		2669418F1A6DC2AC0063BE93 /* MICmdCmdStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdStack.h; path = "tools/lldb-mi/MICmdCmdStack.h"; sourceTree = SOURCE_ROOT; };
-		266941901A6DC2AC0063BE93 /* MICmdCmdSupportInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdSupportInfo.cpp; path = "tools/lldb-mi/MICmdCmdSupportInfo.cpp"; sourceTree = SOURCE_ROOT; };
-		266941911A6DC2AC0063BE93 /* MICmdCmdSupportInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdSupportInfo.h; path = "tools/lldb-mi/MICmdCmdSupportInfo.h"; sourceTree = SOURCE_ROOT; };
-		266941921A6DC2AC0063BE93 /* MICmdCmdSupportList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdSupportList.cpp; path = "tools/lldb-mi/MICmdCmdSupportList.cpp"; sourceTree = SOURCE_ROOT; };
-		266941931A6DC2AC0063BE93 /* MICmdCmdSupportList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdSupportList.h; path = "tools/lldb-mi/MICmdCmdSupportList.h"; sourceTree = SOURCE_ROOT; };
-		26D52C1D1A980FE300E5D2FB /* MICmdCmdSymbol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdSymbol.cpp; path = "tools/lldb-mi/MICmdCmdSymbol.cpp"; sourceTree = SOURCE_ROOT; };
-		26D52C1E1A980FE300E5D2FB /* MICmdCmdSymbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdSymbol.h; path = "tools/lldb-mi/MICmdCmdSymbol.h"; sourceTree = SOURCE_ROOT; };
-		266941941A6DC2AC0063BE93 /* MICmdCmdTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdTarget.cpp; path = "tools/lldb-mi/MICmdCmdTarget.cpp"; sourceTree = SOURCE_ROOT; };
-		266941951A6DC2AC0063BE93 /* MICmdCmdTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdTarget.h; path = "tools/lldb-mi/MICmdCmdTarget.h"; sourceTree = SOURCE_ROOT; };
-		266941961A6DC2AC0063BE93 /* MICmdCmdThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdThread.cpp; path = "tools/lldb-mi/MICmdCmdThread.cpp"; sourceTree = SOURCE_ROOT; };
-		266941971A6DC2AC0063BE93 /* MICmdCmdThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdThread.h; path = "tools/lldb-mi/MICmdCmdThread.h"; sourceTree = SOURCE_ROOT; };
-		266941981A6DC2AC0063BE93 /* MICmdCmdTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdTrace.cpp; path = "tools/lldb-mi/MICmdCmdTrace.cpp"; sourceTree = SOURCE_ROOT; };
-		266941991A6DC2AC0063BE93 /* MICmdCmdTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdTrace.h; path = "tools/lldb-mi/MICmdCmdTrace.h"; sourceTree = SOURCE_ROOT; };
-		2669419A1A6DC2AC0063BE93 /* MICmdCmdVar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCmdVar.cpp; path = "tools/lldb-mi/MICmdCmdVar.cpp"; sourceTree = SOURCE_ROOT; };
-		2669419B1A6DC2AC0063BE93 /* MICmdCmdVar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCmdVar.h; path = "tools/lldb-mi/MICmdCmdVar.h"; sourceTree = SOURCE_ROOT; };
-		2669419C1A6DC2AC0063BE93 /* MICmdCommands.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdCommands.cpp; path = "tools/lldb-mi/MICmdCommands.cpp"; sourceTree = SOURCE_ROOT; };
-		2669419D1A6DC2AC0063BE93 /* MICmdCommands.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdCommands.h; path = "tools/lldb-mi/MICmdCommands.h"; sourceTree = SOURCE_ROOT; };
-		2669419E1A6DC2AC0063BE93 /* MICmdData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdData.cpp; path = "tools/lldb-mi/MICmdData.cpp"; sourceTree = SOURCE_ROOT; };
-		2669419F1A6DC2AC0063BE93 /* MICmdData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdData.h; path = "tools/lldb-mi/MICmdData.h"; sourceTree = SOURCE_ROOT; };
-		266941A01A6DC2AC0063BE93 /* MICmdFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdFactory.cpp; path = "tools/lldb-mi/MICmdFactory.cpp"; sourceTree = SOURCE_ROOT; };
-		266941A11A6DC2AC0063BE93 /* MICmdFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdFactory.h; path = "tools/lldb-mi/MICmdFactory.h"; sourceTree = SOURCE_ROOT; };
-		266941A21A6DC2AC0063BE93 /* MICmdInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdInterpreter.cpp; path = "tools/lldb-mi/MICmdInterpreter.cpp"; sourceTree = SOURCE_ROOT; };
-		266941A31A6DC2AC0063BE93 /* MICmdInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdInterpreter.h; path = "tools/lldb-mi/MICmdInterpreter.h"; sourceTree = SOURCE_ROOT; };
-		266941A41A6DC2AC0063BE93 /* MICmdInvoker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdInvoker.cpp; path = "tools/lldb-mi/MICmdInvoker.cpp"; sourceTree = SOURCE_ROOT; };
-		266941A51A6DC2AC0063BE93 /* MICmdInvoker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdInvoker.h; path = "tools/lldb-mi/MICmdInvoker.h"; sourceTree = SOURCE_ROOT; };
-		266941A61A6DC2AC0063BE93 /* MICmdMgr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdMgr.cpp; path = "tools/lldb-mi/MICmdMgr.cpp"; sourceTree = SOURCE_ROOT; };
-		266941A71A6DC2AC0063BE93 /* MICmdMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdMgr.h; path = "tools/lldb-mi/MICmdMgr.h"; sourceTree = SOURCE_ROOT; };
-		266941A81A6DC2AC0063BE93 /* MICmdMgrSetCmdDeleteCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmdMgrSetCmdDeleteCallback.cpp; path = "tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.cpp"; sourceTree = SOURCE_ROOT; };
-		266941A91A6DC2AC0063BE93 /* MICmdMgrSetCmdDeleteCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmdMgrSetCmdDeleteCallback.h; path = "tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h"; sourceTree = SOURCE_ROOT; };
-		266941AA1A6DC2AC0063BE93 /* MICmnBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnBase.cpp; path = "tools/lldb-mi/MICmnBase.cpp"; sourceTree = SOURCE_ROOT; };
-		266941AB1A6DC2AC0063BE93 /* MICmnBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnBase.h; path = "tools/lldb-mi/MICmnBase.h"; sourceTree = SOURCE_ROOT; };
-		266941AC1A6DC2AC0063BE93 /* MICmnConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnConfig.h; path = "tools/lldb-mi/MICmnConfig.h"; sourceTree = SOURCE_ROOT; };
-		266941AD1A6DC2AC0063BE93 /* MICmnLLDBBroadcaster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnLLDBBroadcaster.cpp; path = "tools/lldb-mi/MICmnLLDBBroadcaster.cpp"; sourceTree = SOURCE_ROOT; };
-		266941AE1A6DC2AC0063BE93 /* MICmnLLDBBroadcaster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnLLDBBroadcaster.h; path = "tools/lldb-mi/MICmnLLDBBroadcaster.h"; sourceTree = SOURCE_ROOT; };
-		266941B31A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnLLDBDebugSessionInfo.cpp; path = "tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp"; sourceTree = SOURCE_ROOT; };
-		266941B41A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnLLDBDebugSessionInfo.h; path = "tools/lldb-mi/MICmnLLDBDebugSessionInfo.h"; sourceTree = SOURCE_ROOT; };
-		266941B51A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfoVarObj.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnLLDBDebugSessionInfoVarObj.cpp; path = "tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp"; sourceTree = SOURCE_ROOT; };
-		266941B61A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfoVarObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnLLDBDebugSessionInfoVarObj.h; path = "tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h"; sourceTree = SOURCE_ROOT; };
-		266941AF1A6DC2AC0063BE93 /* MICmnLLDBDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnLLDBDebugger.cpp; path = "tools/lldb-mi/MICmnLLDBDebugger.cpp"; sourceTree = SOURCE_ROOT; };
-		266941B01A6DC2AC0063BE93 /* MICmnLLDBDebugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnLLDBDebugger.h; path = "tools/lldb-mi/MICmnLLDBDebugger.h"; sourceTree = SOURCE_ROOT; };
-		266941B11A6DC2AC0063BE93 /* MICmnLLDBDebuggerHandleEvents.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnLLDBDebuggerHandleEvents.cpp; path = "tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp"; sourceTree = SOURCE_ROOT; };
-		266941B21A6DC2AC0063BE93 /* MICmnLLDBDebuggerHandleEvents.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnLLDBDebuggerHandleEvents.h; path = "tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h"; sourceTree = SOURCE_ROOT; };
-		266941B71A6DC2AC0063BE93 /* MICmnLLDBProxySBValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnLLDBProxySBValue.cpp; path = "tools/lldb-mi/MICmnLLDBProxySBValue.cpp"; sourceTree = SOURCE_ROOT; };
-		266941B81A6DC2AC0063BE93 /* MICmnLLDBProxySBValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnLLDBProxySBValue.h; path = "tools/lldb-mi/MICmnLLDBProxySBValue.h"; sourceTree = SOURCE_ROOT; };
-		266941B91A6DC2AC0063BE93 /* MICmnLLDBUtilSBValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnLLDBUtilSBValue.cpp; path = "tools/lldb-mi/MICmnLLDBUtilSBValue.cpp"; sourceTree = SOURCE_ROOT; };
-		266941BA1A6DC2AC0063BE93 /* MICmnLLDBUtilSBValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnLLDBUtilSBValue.h; path = "tools/lldb-mi/MICmnLLDBUtilSBValue.h"; sourceTree = SOURCE_ROOT; };
-		266941BB1A6DC2AC0063BE93 /* MICmnLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnLog.cpp; path = "tools/lldb-mi/MICmnLog.cpp"; sourceTree = SOURCE_ROOT; };
-		266941BC1A6DC2AC0063BE93 /* MICmnLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnLog.h; path = "tools/lldb-mi/MICmnLog.h"; sourceTree = SOURCE_ROOT; };
-		266941BD1A6DC2AC0063BE93 /* MICmnLogMediumFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnLogMediumFile.cpp; path = "tools/lldb-mi/MICmnLogMediumFile.cpp"; sourceTree = SOURCE_ROOT; };
-		266941BE1A6DC2AC0063BE93 /* MICmnLogMediumFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnLogMediumFile.h; path = "tools/lldb-mi/MICmnLogMediumFile.h"; sourceTree = SOURCE_ROOT; };
-		266941BF1A6DC2AC0063BE93 /* MICmnMIOutOfBandRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnMIOutOfBandRecord.cpp; path = "tools/lldb-mi/MICmnMIOutOfBandRecord.cpp"; sourceTree = SOURCE_ROOT; };
-		266941C01A6DC2AC0063BE93 /* MICmnMIOutOfBandRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnMIOutOfBandRecord.h; path = "tools/lldb-mi/MICmnMIOutOfBandRecord.h"; sourceTree = SOURCE_ROOT; };
-		266941C11A6DC2AC0063BE93 /* MICmnMIResultRecord.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnMIResultRecord.cpp; path = "tools/lldb-mi/MICmnMIResultRecord.cpp"; sourceTree = SOURCE_ROOT; };
-		266941C21A6DC2AC0063BE93 /* MICmnMIResultRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnMIResultRecord.h; path = "tools/lldb-mi/MICmnMIResultRecord.h"; sourceTree = SOURCE_ROOT; };
-		266941C31A6DC2AC0063BE93 /* MICmnMIValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnMIValue.cpp; path = "tools/lldb-mi/MICmnMIValue.cpp"; sourceTree = SOURCE_ROOT; };
-		266941C41A6DC2AC0063BE93 /* MICmnMIValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnMIValue.h; path = "tools/lldb-mi/MICmnMIValue.h"; sourceTree = SOURCE_ROOT; };
-		266941C51A6DC2AC0063BE93 /* MICmnMIValueConst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnMIValueConst.cpp; path = "tools/lldb-mi/MICmnMIValueConst.cpp"; sourceTree = SOURCE_ROOT; };
-		266941C61A6DC2AC0063BE93 /* MICmnMIValueConst.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnMIValueConst.h; path = "tools/lldb-mi/MICmnMIValueConst.h"; sourceTree = SOURCE_ROOT; };
-		266941C71A6DC2AC0063BE93 /* MICmnMIValueList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnMIValueList.cpp; path = "tools/lldb-mi/MICmnMIValueList.cpp"; sourceTree = SOURCE_ROOT; };
-		266941C81A6DC2AC0063BE93 /* MICmnMIValueList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnMIValueList.h; path = "tools/lldb-mi/MICmnMIValueList.h"; sourceTree = SOURCE_ROOT; };
-		266941C91A6DC2AC0063BE93 /* MICmnMIValueResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnMIValueResult.cpp; path = "tools/lldb-mi/MICmnMIValueResult.cpp"; sourceTree = SOURCE_ROOT; };
-		266941CA1A6DC2AC0063BE93 /* MICmnMIValueResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnMIValueResult.h; path = "tools/lldb-mi/MICmnMIValueResult.h"; sourceTree = SOURCE_ROOT; };
-		266941CB1A6DC2AC0063BE93 /* MICmnMIValueTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnMIValueTuple.cpp; path = "tools/lldb-mi/MICmnMIValueTuple.cpp"; sourceTree = SOURCE_ROOT; };
-		266941CC1A6DC2AC0063BE93 /* MICmnMIValueTuple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnMIValueTuple.h; path = "tools/lldb-mi/MICmnMIValueTuple.h"; sourceTree = SOURCE_ROOT; };
-		266941CD1A6DC2AC0063BE93 /* MICmnResources.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnResources.cpp; path = "tools/lldb-mi/MICmnResources.cpp"; sourceTree = SOURCE_ROOT; };
-		266941CE1A6DC2AC0063BE93 /* MICmnResources.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnResources.h; path = "tools/lldb-mi/MICmnResources.h"; sourceTree = SOURCE_ROOT; };
-		266941CF1A6DC2AC0063BE93 /* MICmnStreamStderr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnStreamStderr.cpp; path = "tools/lldb-mi/MICmnStreamStderr.cpp"; sourceTree = SOURCE_ROOT; };
-		266941D01A6DC2AC0063BE93 /* MICmnStreamStderr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnStreamStderr.h; path = "tools/lldb-mi/MICmnStreamStderr.h"; sourceTree = SOURCE_ROOT; };
-		266941D11A6DC2AC0063BE93 /* MICmnStreamStdin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnStreamStdin.cpp; path = "tools/lldb-mi/MICmnStreamStdin.cpp"; sourceTree = SOURCE_ROOT; };
-		266941D21A6DC2AC0063BE93 /* MICmnStreamStdin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnStreamStdin.h; path = "tools/lldb-mi/MICmnStreamStdin.h"; sourceTree = SOURCE_ROOT; };
-		266941D71A6DC2AC0063BE93 /* MICmnStreamStdout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnStreamStdout.cpp; path = "tools/lldb-mi/MICmnStreamStdout.cpp"; sourceTree = SOURCE_ROOT; };
-		266941D81A6DC2AC0063BE93 /* MICmnStreamStdout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnStreamStdout.h; path = "tools/lldb-mi/MICmnStreamStdout.h"; sourceTree = SOURCE_ROOT; };
-		266941D91A6DC2AC0063BE93 /* MICmnThreadMgrStd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MICmnThreadMgrStd.cpp; path = "tools/lldb-mi/MICmnThreadMgrStd.cpp"; sourceTree = SOURCE_ROOT; };
-		266941DA1A6DC2AC0063BE93 /* MICmnThreadMgrStd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MICmnThreadMgrStd.h; path = "tools/lldb-mi/MICmnThreadMgrStd.h"; sourceTree = SOURCE_ROOT; };
-		266941DB1A6DC2AC0063BE93 /* MIDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIDataTypes.h; path = "tools/lldb-mi/MIDataTypes.h"; sourceTree = SOURCE_ROOT; };
-		266941DC1A6DC2AC0063BE93 /* MIDriver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIDriver.cpp; path = "tools/lldb-mi/MIDriver.cpp"; sourceTree = SOURCE_ROOT; };
-		266941DD1A6DC2AC0063BE93 /* MIDriver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIDriver.h; path = "tools/lldb-mi/MIDriver.h"; sourceTree = SOURCE_ROOT; };
-		266941DE1A6DC2AC0063BE93 /* MIDriverBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIDriverBase.cpp; path = "tools/lldb-mi/MIDriverBase.cpp"; sourceTree = SOURCE_ROOT; };
-		266941DF1A6DC2AC0063BE93 /* MIDriverBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIDriverBase.h; path = "tools/lldb-mi/MIDriverBase.h"; sourceTree = SOURCE_ROOT; };
-		266941E01A6DC2AC0063BE93 /* MIDriverMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIDriverMain.cpp; path = "tools/lldb-mi/MIDriverMain.cpp"; sourceTree = SOURCE_ROOT; };
-		266941E11A6DC2AC0063BE93 /* MIDriverMgr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIDriverMgr.cpp; path = "tools/lldb-mi/MIDriverMgr.cpp"; sourceTree = SOURCE_ROOT; };
-		266941E21A6DC2AC0063BE93 /* MIDriverMgr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIDriverMgr.h; path = "tools/lldb-mi/MIDriverMgr.h"; sourceTree = SOURCE_ROOT; };
-		266941E31A6DC2AC0063BE93 /* MIReadMe.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = MIReadMe.txt; path = "tools/lldb-mi/MIReadMe.txt"; sourceTree = SOURCE_ROOT; };
-		266941E41A6DC2AC0063BE93 /* MIUtilDateTimeStd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIUtilDateTimeStd.cpp; path = "tools/lldb-mi/MIUtilDateTimeStd.cpp"; sourceTree = SOURCE_ROOT; };
-		266941E51A6DC2AC0063BE93 /* MIUtilDateTimeStd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIUtilDateTimeStd.h; path = "tools/lldb-mi/MIUtilDateTimeStd.h"; sourceTree = SOURCE_ROOT; };
-		266941E61A6DC2AC0063BE93 /* MIUtilDebug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIUtilDebug.cpp; path = "tools/lldb-mi/MIUtilDebug.cpp"; sourceTree = SOURCE_ROOT; };
-		266941E71A6DC2AC0063BE93 /* MIUtilDebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIUtilDebug.h; path = "tools/lldb-mi/MIUtilDebug.h"; sourceTree = SOURCE_ROOT; };
-		266941E81A6DC2AC0063BE93 /* MIUtilFileStd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIUtilFileStd.cpp; path = "tools/lldb-mi/MIUtilFileStd.cpp"; sourceTree = SOURCE_ROOT; };
-		266941E91A6DC2AC0063BE93 /* MIUtilFileStd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIUtilFileStd.h; path = "tools/lldb-mi/MIUtilFileStd.h"; sourceTree = SOURCE_ROOT; };
-		266941EA1A6DC2AC0063BE93 /* MIUtilMapIdToVariant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIUtilMapIdToVariant.cpp; path = "tools/lldb-mi/MIUtilMapIdToVariant.cpp"; sourceTree = SOURCE_ROOT; };
-		266941EB1A6DC2AC0063BE93 /* MIUtilMapIdToVariant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIUtilMapIdToVariant.h; path = "tools/lldb-mi/MIUtilMapIdToVariant.h"; sourceTree = SOURCE_ROOT; };
-		266941EC1A6DC2AC0063BE93 /* MIUtilSingletonBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIUtilSingletonBase.h; path = "tools/lldb-mi/MIUtilSingletonBase.h"; sourceTree = SOURCE_ROOT; };
-		266941ED1A6DC2AC0063BE93 /* MIUtilSingletonHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIUtilSingletonHelper.h; path = "tools/lldb-mi/MIUtilSingletonHelper.h"; sourceTree = SOURCE_ROOT; };
-		266941EE1A6DC2AC0063BE93 /* MIUtilString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIUtilString.cpp; path = "tools/lldb-mi/MIUtilString.cpp"; sourceTree = SOURCE_ROOT; };
-		266941EF1A6DC2AC0063BE93 /* MIUtilString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIUtilString.h; path = "tools/lldb-mi/MIUtilString.h"; sourceTree = SOURCE_ROOT; };
-		266941F81A6DC2AC0063BE93 /* MIUtilThreadBaseStd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIUtilThreadBaseStd.cpp; path = "tools/lldb-mi/MIUtilThreadBaseStd.cpp"; sourceTree = SOURCE_ROOT; };
-		266941F91A6DC2AC0063BE93 /* MIUtilThreadBaseStd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIUtilThreadBaseStd.h; path = "tools/lldb-mi/MIUtilThreadBaseStd.h"; sourceTree = SOURCE_ROOT; };
-		266941FA1A6DC2AC0063BE93 /* MIUtilVariant.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MIUtilVariant.cpp; path = "tools/lldb-mi/MIUtilVariant.cpp"; sourceTree = SOURCE_ROOT; };
-		266941FB1A6DC2AC0063BE93 /* MIUtilVariant.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MIUtilVariant.h; path = "tools/lldb-mi/MIUtilVariant.h"; sourceTree = SOURCE_ROOT; };
-		AF395C01219254F200894EC3 /* MSVCUndecoratedNameParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MSVCUndecoratedNameParser.cpp; path = Language/CPlusPlus/MSVCUndecoratedNameParser.cpp; sourceTree = "<group>"; };
-		AF395C00219254F200894EC3 /* MSVCUndecoratedNameParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MSVCUndecoratedNameParser.h; path = Language/CPlusPlus/MSVCUndecoratedNameParser.h; sourceTree = "<group>"; };
-		D67521351EA17C3900439694 /* MainLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MainLoop.cpp; sourceTree = "<group>"; };
-		9A2057301F3B8E7600F6C293 /* MainLoopTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MainLoopTest.cpp; sourceTree = "<group>"; };
-		8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MainThreadCheckerRuntime.cpp; sourceTree = "<group>"; };
-		8C3BD9931EF45D9B0016C343 /* MainThreadCheckerRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainThreadCheckerRuntime.h; sourceTree = "<group>"; };
-		2665CD0D15080846002C8FAE /* Makefile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
-		26BC7E8010F1B85900F91463 /* Mangled.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Mangled.cpp; path = source/Core/Mangled.cpp; sourceTree = "<group>"; };
-		26BC7D6910F1B77400F91463 /* Mangled.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Mangled.h; path = include/lldb/Core/Mangled.h; sourceTree = "<group>"; };
-		4F29D3CD21010F84003B549A /* MangledTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MangledTest.cpp; sourceTree = "<group>"; };
-		4CD44CF920B37C440003557C /* ManualDWARFIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ManualDWARFIndex.cpp; sourceTree = "<group>"; };
-		4CD44D0020B37C580003557C /* ManualDWARFIndex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ManualDWARFIndex.h; sourceTree = "<group>"; };
-		2682100C143A59AE004BCF2D /* MappedHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MappedHash.h; path = include/lldb/Core/MappedHash.h; sourceTree = "<group>"; };
-		49DCF700170E70120092F75E /* Materializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Materializer.cpp; path = source/Expression/Materializer.cpp; sourceTree = "<group>"; };
-		49DCF6FF170E6FD90092F75E /* Materializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Materializer.h; path = include/lldb/Expression/Materializer.h; sourceTree = "<group>"; };
-		2690B3701381D5C300ECFBAE /* Memory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Memory.cpp; path = source/Target/Memory.cpp; sourceTree = "<group>"; };
-		2690B36F1381D5B600ECFBAE /* Memory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Memory.h; path = include/lldb/Target/Memory.h; sourceTree = "<group>"; };
-		8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MemoryHistory.cpp; path = source/Target/MemoryHistory.cpp; sourceTree = "<group>"; };
-		8C2D6A54197A1EBE006989C9 /* MemoryHistory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MemoryHistory.h; path = include/lldb/Target/MemoryHistory.h; sourceTree = "<group>"; };
-		8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryHistoryASan.cpp; sourceTree = "<group>"; };
-		8C2D6A5B197A1FDC006989C9 /* MemoryHistoryASan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryHistoryASan.h; sourceTree = "<group>"; };
-		2360092C193FB21500189DB1 /* MemoryRegionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MemoryRegionInfo.h; path = include/lldb/Target/MemoryRegionInfo.h; sourceTree = "<group>"; };
-		9A2057061F3B818600F6C293 /* MemoryRegionInfoTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MemoryRegionInfoTest.cpp; path = Target/MemoryRegionInfoTest.cpp; sourceTree = "<group>"; };
-		23E2E5371D9048FB006F38BB /* MinidumpParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MinidumpParser.cpp; sourceTree = "<group>"; };
-		23E2E5381D9048FB006F38BB /* MinidumpParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MinidumpParser.h; sourceTree = "<group>"; };
-		23E2E51A1D9036F2006F38BB /* MinidumpParserTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MinidumpParserTest.cpp; sourceTree = "<group>"; };
-		23E2E5391D9048FB006F38BB /* MinidumpTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MinidumpTypes.cpp; sourceTree = "<group>"; };
-		23E2E53A1D9048FB006F38BB /* MinidumpTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MinidumpTypes.h; sourceTree = "<group>"; };
-		26B75B421AD6E29A001F7A57 /* MipsLinuxSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MipsLinuxSignals.cpp; path = Utility/MipsLinuxSignals.cpp; sourceTree = "<group>"; };
-		26B75B431AD6E29A001F7A57 /* MipsLinuxSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MipsLinuxSignals.h; path = Utility/MipsLinuxSignals.h; sourceTree = "<group>"; };
-		9A1890321F47D5D400394BCA /* MockTildeExpressionResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MockTildeExpressionResolver.cpp; path = TestingSupport/MockTildeExpressionResolver.cpp; sourceTree = "<group>"; };
-		9A1890331F47D5D400394BCA /* MockTildeExpressionResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockTildeExpressionResolver.h; path = TestingSupport/MockTildeExpressionResolver.h; sourceTree = "<group>"; };
-		26BC7E8110F1B85900F91463 /* Module.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Module.cpp; path = source/Core/Module.cpp; sourceTree = "<group>"; };
-		26BC7D6A10F1B77400F91463 /* Module.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Module.h; path = include/lldb/Core/Module.h; sourceTree = "<group>"; };
-		2654A67F1E54D59400DA1013 /* ModuleCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleCache.cpp; path = source/Target/ModuleCache.cpp; sourceTree = "<group>"; };
-		2654A6811E54D5A200DA1013 /* ModuleCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ModuleCache.h; path = include/lldb/Target/ModuleCache.h; sourceTree = "<group>"; };
-		AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleCacheTest.cpp; path = Target/ModuleCacheTest.cpp; sourceTree = "<group>"; };
-		26BC7E8210F1B85900F91463 /* ModuleChild.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleChild.cpp; path = source/Core/ModuleChild.cpp; sourceTree = "<group>"; };
-		26BC7D6B10F1B77400F91463 /* ModuleChild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModuleChild.h; path = include/lldb/Core/ModuleChild.h; sourceTree = "<group>"; };
-		26BC7E8310F1B85900F91463 /* ModuleList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ModuleList.cpp; path = source/Core/ModuleList.cpp; sourceTree = "<group>"; };
-		26BC7D6C10F1B77400F91463 /* ModuleList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModuleList.h; path = include/lldb/Core/ModuleList.h; sourceTree = "<group>"; };
-		260D9B2615EC369500960137 /* ModuleSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ModuleSpec.h; path = include/lldb/Core/ModuleSpec.h; sourceTree = "<group>"; };
-		949EEDA41BA765B5008C63CF /* NSArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSArray.cpp; path = Language/ObjC/NSArray.cpp; sourceTree = "<group>"; };
-		949EEDA51BA765B5008C63CF /* NSDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSDictionary.cpp; path = Language/ObjC/NSDictionary.cpp; sourceTree = "<group>"; };
-		94B9E50E1BBEFDFE000A48DC /* NSDictionary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSDictionary.h; path = Language/ObjC/NSDictionary.h; sourceTree = "<group>"; };
-		940495781BEC497E00926025 /* NSError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSError.cpp; path = Language/ObjC/NSError.cpp; sourceTree = "<group>"; };
-		940495791BEC497E00926025 /* NSException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSException.cpp; path = Language/ObjC/NSException.cpp; sourceTree = "<group>"; };
-		949EEDA61BA765B5008C63CF /* NSIndexPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSIndexPath.cpp; path = Language/ObjC/NSIndexPath.cpp; sourceTree = "<group>"; };
-		949EEDA71BA765B5008C63CF /* NSSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSSet.cpp; path = Language/ObjC/NSSet.cpp; sourceTree = "<group>"; };
-		94B9E50F1BBF0069000A48DC /* NSSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSSet.h; path = Language/ObjC/NSSet.h; sourceTree = "<group>"; };
-		94B9E5111BBF20F4000A48DC /* NSString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NSString.cpp; path = Language/ObjC/NSString.cpp; sourceTree = "<group>"; };
-		94B9E5101BBF20B7000A48DC /* NSString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSString.h; path = Language/ObjC/NSString.h; sourceTree = "<group>"; };
-		3F8169181ABA2419001DA9DF /* NameMatches.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NameMatches.cpp; path = source/Utility/NameMatches.cpp; sourceTree = "<group>"; };
-		3F81691C1ABA242B001DA9DF /* NameMatches.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NameMatches.h; path = include/lldb/Utility/NameMatches.h; sourceTree = "<group>"; };
-		9A3D43CB1F3150D200EB767C /* NameMatchesTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NameMatchesTest.cpp; sourceTree = "<group>"; };
-		2618D9EA12406FE600F2B8FE /* NameToDIE.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NameToDIE.cpp; sourceTree = "<group>"; };
-		2618D957124056C700F2B8FE /* NameToDIE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NameToDIE.h; sourceTree = "<group>"; };
-		267A47F41B1411750021A5BC /* NativeBreakpointList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeBreakpointList.h; path = include/lldb/Host/common/NativeBreakpointList.h; sourceTree = "<group>"; };
-		232CB60F191E00CC00EF39FC /* NativeProcessProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = NativeProcessProtocol.cpp; path = source/Host/common/NativeProcessProtocol.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
-		267A47F51B14117F0021A5BC /* NativeProcessProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeProcessProtocol.h; path = include/lldb/Host/common/NativeProcessProtocol.h; sourceTree = "<group>"; };
-		23EDE3301926839700F6A132 /* NativeRegisterContext.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = NativeRegisterContext.cpp; path = source/Host/common/NativeRegisterContext.cpp; sourceTree = "<group>"; };
-		267A47FA1B1411C40021A5BC /* NativeRegisterContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeRegisterContext.cpp; path = source/Host/common/NativeRegisterContext.cpp; sourceTree = "<group>"; };
-		23EDE3311926843600F6A132 /* NativeRegisterContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NativeRegisterContext.h; path = include/lldb/Host/common/NativeRegisterContext.h; sourceTree = "<group>"; };
-		267A47F61B14118F0021A5BC /* NativeRegisterContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeRegisterContext.h; path = include/lldb/Host/common/NativeRegisterContext.h; sourceTree = "<group>"; };
-		23F403481926CC250046DC9B /* NativeRegisterContextRegisterInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeRegisterContextRegisterInfo.cpp; path = Utility/NativeRegisterContextRegisterInfo.cpp; sourceTree = "<group>"; };
-		23F403471926C8D50046DC9B /* NativeRegisterContextRegisterInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NativeRegisterContextRegisterInfo.h; path = Utility/NativeRegisterContextRegisterInfo.h; sourceTree = "<group>"; };
-		232CB611191E00CC00EF39FC /* NativeThreadProtocol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeThreadProtocol.cpp; path = source/Host/common/NativeThreadProtocol.cpp; sourceTree = "<group>"; };
-		267A47F81B1411A40021A5BC /* NativeThreadProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeThreadProtocol.h; path = include/lldb/Host/common/NativeThreadProtocol.h; sourceTree = "<group>"; };
-		267A47FE1B1411D90021A5BC /* NativeWatchpointList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NativeWatchpointList.cpp; path = source/Host/common/NativeWatchpointList.cpp; sourceTree = "<group>"; };
-		267A47F91B1411AC0021A5BC /* NativeWatchpointList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NativeWatchpointList.h; path = include/lldb/Host/common/NativeWatchpointList.h; sourceTree = "<group>"; };
-		AF33B4BC1C1FA441001B28D9 /* NetBSDSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetBSDSignals.cpp; path = Utility/NetBSDSignals.cpp; sourceTree = "<group>"; };
-		AF33B4BD1C1FA441001B28D9 /* NetBSDSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetBSDSignals.h; path = Utility/NetBSDSignals.h; sourceTree = "<group>"; };
-		94B6385E1B8FB7A2004FE1E4 /* ObjCLanguage.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ObjCLanguage.cpp; path = Language/ObjC/ObjCLanguage.cpp; sourceTree = "<group>"; };
-		94B6385F1B8FB7A2004FE1E4 /* ObjCLanguage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ObjCLanguage.h; path = Language/ObjC/ObjCLanguage.h; sourceTree = "<group>"; };
-		4CB443F212499B5000C13DC2 /* ObjCLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjCLanguageRuntime.cpp; path = source/Target/ObjCLanguageRuntime.cpp; sourceTree = "<group>"; };
-		4CB443F612499B6E00C13DC2 /* ObjCLanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjCLanguageRuntime.h; path = include/lldb/Target/ObjCLanguageRuntime.h; sourceTree = "<group>"; };
-		94B638621B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjCPlusPlusLanguage.cpp; path = Language/ObjCPlusPlus/ObjCPlusPlusLanguage.cpp; sourceTree = "<group>"; };
-		94B638611B8FB7E9004FE1E4 /* ObjCPlusPlusLanguage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ObjCPlusPlusLanguage.h; path = Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h; sourceTree = "<group>"; };
-		26BC7C5D10F1B6E900F91463 /* ObjectContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectContainer.h; path = include/lldb/Symbol/ObjectContainer.h; sourceTree = "<group>"; };
-		26A3B4AC1181454800381BC2 /* ObjectContainerBSDArchive.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectContainerBSDArchive.cpp; sourceTree = "<group>"; };
-		26A3B4AD1181454800381BC2 /* ObjectContainerBSDArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectContainerBSDArchive.h; sourceTree = "<group>"; };
-		260C898010F57C5600BB2B04 /* ObjectContainerUniversalMachO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectContainerUniversalMachO.cpp; sourceTree = "<group>"; };
-		260C898110F57C5600BB2B04 /* ObjectContainerUniversalMachO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectContainerUniversalMachO.h; sourceTree = "<group>"; };
-		26BC7F4C10F1BC1A00F91463 /* ObjectFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ObjectFile.cpp; path = source/Symbol/ObjectFile.cpp; sourceTree = "<group>"; };
-		26BC7C5E10F1B6E900F91463 /* ObjectFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectFile.h; path = include/lldb/Symbol/ObjectFile.h; sourceTree = "<group>"; };
-		4C9BF11921C0467700FA4036 /* ObjectFileBreakpad.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFileBreakpad.cpp; sourceTree = "<group>"; };
-		4C9BF11821C0467700FA4036 /* ObjectFileBreakpad.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectFileBreakpad.h; sourceTree = "<group>"; };
-		260C898510F57C5600BB2B04 /* ObjectFileELF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFileELF.cpp; sourceTree = "<group>"; };
-		260C898610F57C5600BB2B04 /* ObjectFileELF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectFileELF.h; sourceTree = "<group>"; };
-		26EFC4CA18CFAF0D00865D87 /* ObjectFileJIT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFileJIT.cpp; sourceTree = "<group>"; };
-		26EFC4CB18CFAF0D00865D87 /* ObjectFileJIT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectFileJIT.h; sourceTree = "<group>"; };
-		260C898810F57C5600BB2B04 /* ObjectFileMachO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFileMachO.cpp; sourceTree = "<group>"; };
-		260C898910F57C5600BB2B04 /* ObjectFileMachO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectFileMachO.h; sourceTree = "<group>"; };
-		26E152231419CACA007967D0 /* ObjectFilePECOFF.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ObjectFilePECOFF.cpp; sourceTree = "<group>"; };
-		26E152241419CACA007967D0 /* ObjectFilePECOFF.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ObjectFilePECOFF.h; sourceTree = "<group>"; };
-		26651A17133BF9DF005B64B7 /* Opcode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Opcode.cpp; path = source/Core/Opcode.cpp; sourceTree = "<group>"; };
-		26651A15133BF9CC005B64B7 /* Opcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Opcode.h; path = include/lldb/Core/Opcode.h; sourceTree = "<group>"; };
-		266DFE9613FD656E00D0C574 /* OperatingSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OperatingSystem.cpp; path = source/Target/OperatingSystem.cpp; sourceTree = "<group>"; };
-		266DFE9813FD658300D0C574 /* OperatingSystem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OperatingSystem.h; path = include/lldb/Target/OperatingSystem.h; sourceTree = "<group>"; };
-		2698699815E6CBD0002415FF /* OperatingSystemPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OperatingSystemPython.cpp; sourceTree = "<group>"; };
-		2698699915E6CBD0002415FF /* OperatingSystemPython.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OperatingSystemPython.h; sourceTree = "<group>"; };
-		4C719394207D235400FDF430 /* OptionArgParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionArgParser.cpp; path = source/Interpreter/OptionArgParser.cpp; sourceTree = "<group>"; };
-		4C719397207D237100FDF430 /* OptionArgParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionArgParser.h; path = include/lldb/Interpreter/OptionArgParser.h; sourceTree = "<group>"; };
-		26D5E15E135BAEA2006EA0A7 /* OptionGroupArchitecture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupArchitecture.cpp; path = source/Interpreter/OptionGroupArchitecture.cpp; sourceTree = "<group>"; };
-		26D5E160135BAEB0006EA0A7 /* OptionGroupArchitecture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupArchitecture.h; path = include/lldb/Interpreter/OptionGroupArchitecture.h; sourceTree = "<group>"; };
-		2686536B1370ACB200D186A3 /* OptionGroupBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupBoolean.cpp; path = source/Interpreter/OptionGroupBoolean.cpp; sourceTree = "<group>"; };
-		2686536D1370ACC600D186A3 /* OptionGroupBoolean.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupBoolean.h; path = include/lldb/Interpreter/OptionGroupBoolean.h; sourceTree = "<group>"; };
-		260E07C7136FAB9200CF21D3 /* OptionGroupFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupFile.cpp; path = source/Interpreter/OptionGroupFile.cpp; sourceTree = "<group>"; };
-		260E07C9136FABAC00CF21D3 /* OptionGroupFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupFile.h; path = include/lldb/Interpreter/OptionGroupFile.h; sourceTree = "<group>"; };
-		26BCFC511368AE38006DC050 /* OptionGroupFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupFormat.cpp; path = source/Interpreter/OptionGroupFormat.cpp; sourceTree = "<group>"; };
-		26BCFC4F1368ADF7006DC050 /* OptionGroupFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupFormat.h; path = include/lldb/Interpreter/OptionGroupFormat.h; sourceTree = "<group>"; };
-		26BCFC531368B3E4006DC050 /* OptionGroupOutputFile.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupOutputFile.cpp; path = source/Interpreter/OptionGroupOutputFile.cpp; sourceTree = "<group>"; };
-		26BCFC541368B4B8006DC050 /* OptionGroupOutputFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupOutputFile.h; path = include/lldb/Interpreter/OptionGroupOutputFile.h; sourceTree = "<group>"; };
-		26D5E162135BB054006EA0A7 /* OptionGroupPlatform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupPlatform.cpp; path = source/Interpreter/OptionGroupPlatform.cpp; sourceTree = "<group>"; };
-		26D5E161135BB040006EA0A7 /* OptionGroupPlatform.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupPlatform.h; path = include/lldb/Interpreter/OptionGroupPlatform.h; sourceTree = "<group>"; };
-		262ED0071631FA3A00879631 /* OptionGroupString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupString.cpp; path = source/Interpreter/OptionGroupString.cpp; sourceTree = "<group>"; };
-		262ED0041631FA2800879631 /* OptionGroupString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionGroupString.h; path = include/lldb/Interpreter/OptionGroupString.h; sourceTree = "<group>"; };
-		2686536F1370AE7200D186A3 /* OptionGroupUInt64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupUInt64.cpp; path = source/Interpreter/OptionGroupUInt64.cpp; sourceTree = "<group>"; };
-		2686536E1370AE5A00D186A3 /* OptionGroupUInt64.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupUInt64.h; path = include/lldb/Interpreter/OptionGroupUInt64.h; sourceTree = "<group>"; };
-		260E07C5136FA69E00CF21D3 /* OptionGroupUUID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupUUID.cpp; path = source/Interpreter/OptionGroupUUID.cpp; sourceTree = "<group>"; };
-		260E07C3136FA68900CF21D3 /* OptionGroupUUID.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupUUID.h; path = include/lldb/Interpreter/OptionGroupUUID.h; sourceTree = "<group>"; };
-		267C012A136880DF006E963E /* OptionGroupValueObjectDisplay.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupValueObjectDisplay.cpp; path = source/Interpreter/OptionGroupValueObjectDisplay.cpp; sourceTree = "<group>"; };
-		267C0128136880C7006E963E /* OptionGroupValueObjectDisplay.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupValueObjectDisplay.h; path = include/lldb/Interpreter/OptionGroupValueObjectDisplay.h; sourceTree = "<group>"; };
-		26ED3D6C13C563810017D45E /* OptionGroupVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupVariable.cpp; path = source/Interpreter/OptionGroupVariable.cpp; sourceTree = "<group>"; };
-		26ED3D6F13C5638A0017D45E /* OptionGroupVariable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupVariable.h; path = include/lldb/Interpreter/OptionGroupVariable.h; sourceTree = "<group>"; };
-		B2462246141AD37D00F3D409 /* OptionGroupWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionGroupWatchpoint.cpp; path = source/Interpreter/OptionGroupWatchpoint.cpp; sourceTree = "<group>"; };
-		B2462248141AD39B00F3D409 /* OptionGroupWatchpoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionGroupWatchpoint.h; path = include/lldb/Interpreter/OptionGroupWatchpoint.h; sourceTree = "<group>"; };
-		A36FF33B17D8E94600244D40 /* OptionParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OptionParser.cpp; sourceTree = "<group>"; };
-		A36FF33D17D8E98800244D40 /* OptionParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionParser.h; path = include/lldb/Host/OptionParser.h; sourceTree = "<group>"; };
-		26A7A034135E6E4200FB369E /* OptionValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValue.cpp; path = source/Interpreter/OptionValue.cpp; sourceTree = "<group>"; };
-		26A7A036135E6E5300FB369E /* OptionValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionValue.h; path = include/lldb/Interpreter/OptionValue.h; sourceTree = "<group>"; };
-		2697A39215E404B1003E682C /* OptionValueArch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueArch.cpp; path = source/Interpreter/OptionValueArch.cpp; sourceTree = "<group>"; };
-		2697A39415E404BA003E682C /* OptionValueArch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueArch.h; path = include/lldb/Interpreter/OptionValueArch.h; sourceTree = "<group>"; };
-		260CC63B15D0440D002BF2E0 /* OptionValueArgs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueArgs.cpp; path = source/Interpreter/OptionValueArgs.cpp; sourceTree = "<group>"; };
-		260CC62115D04377002BF2E0 /* OptionValueArgs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueArgs.h; path = include/lldb/Interpreter/OptionValueArgs.h; sourceTree = "<group>"; };
-		260CC63C15D0440D002BF2E0 /* OptionValueArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueArray.cpp; path = source/Interpreter/OptionValueArray.cpp; sourceTree = "<group>"; };
-		260CC62215D04377002BF2E0 /* OptionValueArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueArray.h; path = include/lldb/Interpreter/OptionValueArray.h; sourceTree = "<group>"; };
-		260CC63D15D0440D002BF2E0 /* OptionValueBoolean.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueBoolean.cpp; path = source/Interpreter/OptionValueBoolean.cpp; sourceTree = "<group>"; };
-		260CC62315D04377002BF2E0 /* OptionValueBoolean.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueBoolean.h; path = include/lldb/Interpreter/OptionValueBoolean.h; sourceTree = "<group>"; };
-		25420ECC1A6490B8009ADBCB /* OptionValueChar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueChar.cpp; path = source/Interpreter/OptionValueChar.cpp; sourceTree = "<group>"; };
-		25420ECE1A64911B009ADBCB /* OptionValueChar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OptionValueChar.h; path = include/lldb/Interpreter/OptionValueChar.h; sourceTree = "<group>"; };
-		260CC63F15D0440D002BF2E0 /* OptionValueDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueDictionary.cpp; path = source/Interpreter/OptionValueDictionary.cpp; sourceTree = "<group>"; };
-		260CC62515D04377002BF2E0 /* OptionValueDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueDictionary.h; path = include/lldb/Interpreter/OptionValueDictionary.h; sourceTree = "<group>"; };
-		260CC64015D0440D002BF2E0 /* OptionValueEnumeration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueEnumeration.cpp; path = source/Interpreter/OptionValueEnumeration.cpp; sourceTree = "<group>"; };
-		260CC62615D04377002BF2E0 /* OptionValueEnumeration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueEnumeration.h; path = include/lldb/Interpreter/OptionValueEnumeration.h; sourceTree = "<group>"; };
-		260CC64115D0440D002BF2E0 /* OptionValueFileSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueFileSpec.cpp; path = source/Interpreter/OptionValueFileSpec.cpp; sourceTree = "<group>"; };
-		260CC62715D04377002BF2E0 /* OptionValueFileSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueFileSpec.h; path = include/lldb/Interpreter/OptionValueFileSpec.h; sourceTree = "<group>"; };
-		260CC64215D0440D002BF2E0 /* OptionValueFileSpecLIst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueFileSpecLIst.cpp; path = source/Interpreter/OptionValueFileSpecLIst.cpp; sourceTree = "<group>"; };
-		260CC62815D04377002BF2E0 /* OptionValueFileSpecList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueFileSpecList.h; path = include/lldb/Interpreter/OptionValueFileSpecList.h; sourceTree = "<group>"; };
-		260CC64315D0440D002BF2E0 /* OptionValueFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueFormat.cpp; path = source/Interpreter/OptionValueFormat.cpp; sourceTree = "<group>"; };
-		260CC62915D04377002BF2E0 /* OptionValueFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueFormat.h; path = include/lldb/Interpreter/OptionValueFormat.h; sourceTree = "<group>"; };
-		264A58ED1A7DBCAD00A6B1B0 /* OptionValueFormatEntity.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueFormatEntity.cpp; path = source/Interpreter/OptionValueFormatEntity.cpp; sourceTree = "<group>"; };
-		264A58EB1A7DBC8C00A6B1B0 /* OptionValueFormatEntity.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueFormatEntity.h; path = include/lldb/Interpreter/OptionValueFormatEntity.h; sourceTree = "<group>"; };
-		946216C11A97C080006E19CC /* OptionValueLanguage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueLanguage.cpp; path = source/Interpreter/OptionValueLanguage.cpp; sourceTree = "<group>"; };
-		946216BF1A97C055006E19CC /* OptionValueLanguage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueLanguage.h; path = include/lldb/Interpreter/OptionValueLanguage.h; sourceTree = "<group>"; };
-		26DAED6215D327C200E15819 /* OptionValuePathMappings.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValuePathMappings.cpp; path = source/Interpreter/OptionValuePathMappings.cpp; sourceTree = "<group>"; };
-		26DAED5F15D327A200E15819 /* OptionValuePathMappings.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValuePathMappings.h; path = include/lldb/Interpreter/OptionValuePathMappings.h; sourceTree = "<group>"; };
-		260CC63E15D0440D002BF2E0 /* OptionValueProperties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueProperties.cpp; path = source/Interpreter/OptionValueProperties.cpp; sourceTree = "<group>"; };
-		260CC62415D04377002BF2E0 /* OptionValueProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueProperties.h; path = include/lldb/Interpreter/OptionValueProperties.h; sourceTree = "<group>"; };
-		26491E3D15E1DB9F00CBFFC2 /* OptionValueRegex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueRegex.cpp; path = source/Interpreter/OptionValueRegex.cpp; sourceTree = "<group>"; };
-		26491E3A15E1DB8600CBFFC2 /* OptionValueRegex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueRegex.h; path = include/lldb/Interpreter/OptionValueRegex.h; sourceTree = "<group>"; };
-		260CC64415D0440D002BF2E0 /* OptionValueSInt64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueSInt64.cpp; path = source/Interpreter/OptionValueSInt64.cpp; sourceTree = "<group>"; };
-		260CC62A15D04377002BF2E0 /* OptionValueSInt64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueSInt64.h; path = include/lldb/Interpreter/OptionValueSInt64.h; sourceTree = "<group>"; };
-		260CC64515D0440D002BF2E0 /* OptionValueString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueString.cpp; path = source/Interpreter/OptionValueString.cpp; sourceTree = "<group>"; };
-		260CC62B15D04377002BF2E0 /* OptionValueString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueString.h; path = include/lldb/Interpreter/OptionValueString.h; sourceTree = "<group>"; };
-		260CC64615D0440D002BF2E0 /* OptionValueUInt64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueUInt64.cpp; path = source/Interpreter/OptionValueUInt64.cpp; sourceTree = "<group>"; };
-		260CC62C15D04377002BF2E0 /* OptionValueUInt64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueUInt64.h; path = include/lldb/Interpreter/OptionValueUInt64.h; sourceTree = "<group>"; };
-		260CC64715D0440D002BF2E0 /* OptionValueUUID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptionValueUUID.cpp; path = source/Interpreter/OptionValueUUID.cpp; sourceTree = "<group>"; };
-		260CC62D15D04377002BF2E0 /* OptionValueUUID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValueUUID.h; path = include/lldb/Interpreter/OptionValueUUID.h; sourceTree = "<group>"; };
-		260A248D15D06C4F009981B0 /* OptionValues.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptionValues.h; path = include/lldb/Interpreter/OptionValues.h; sourceTree = "<group>"; };
-		26BC7E8610F1B85900F91463 /* Options.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Options.cpp; path = source/Interpreter/Options.cpp; sourceTree = "<group>"; };
-		26BC7D6D10F1B77400F91463 /* Options.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Options.h; path = include/lldb/Interpreter/Options.h; sourceTree = "<group>"; };
-		DD5F951A21ADE5BD00B8265A /* Options.inc */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.pascal; name = Options.inc; path = build/Debug/include/Options.inc; sourceTree = "<group>"; };
-		DD5F951B21ADE5F000B8265A /* Options.td */ = {isa = PBXFileReference; lastKnownFileType = text; name = Options.td; path = tools/driver/Options.td; sourceTree = "<group>"; };
-		4C639EC321FA684700A7B957 /* OptionsWithRawTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OptionsWithRawTest.cpp; sourceTree = "<group>"; };
-		4C562CC21CC07DDD00C52EAC /* PDBASTParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PDBASTParser.cpp; path = PDB/PDBASTParser.cpp; sourceTree = "<group>"; };
-		4C562CC31CC07DDD00C52EAC /* PDBASTParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDBASTParser.h; path = PDB/PDBASTParser.h; sourceTree = "<group>"; };
-		4CA0C6CA20F929C600CFE6BB /* PDBLocationToDWARFExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PDBLocationToDWARFExpression.cpp; path = PDB/PDBLocationToDWARFExpression.cpp; sourceTree = "<group>"; };
-		4CA0C6CB20F929C700CFE6BB /* PDBLocationToDWARFExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDBLocationToDWARFExpression.h; path = PDB/PDBLocationToDWARFExpression.h; sourceTree = "<group>"; };
-		AF3F54B21B3BA5D500186E73 /* POSIXStopInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = POSIXStopInfo.cpp; sourceTree = "<group>"; };
-		AF3F54B31B3BA5D500186E73 /* POSIXStopInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = POSIXStopInfo.h; sourceTree = "<group>"; };
-		495BBACB119A0DBE00418BEA /* PathMappingList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathMappingList.cpp; path = source/Target/PathMappingList.cpp; sourceTree = "<group>"; };
-		495BBACF119A0DE700418BEA /* PathMappingList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PathMappingList.h; path = include/lldb/Target/PathMappingList.h; sourceTree = "<group>"; };
-		2668A2ED20AF417D00D94111 /* PathMappingListTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PathMappingListTest.cpp; path = Target/PathMappingListTest.cpp; sourceTree = "<group>"; };
-		AF815DF721C855B400023A34 /* PdbAstBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PdbAstBuilder.cpp; path = source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp; sourceTree = SOURCE_ROOT; };
-		AF815DF821C855B400023A34 /* PdbAstBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PdbAstBuilder.h; path = source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h; sourceTree = SOURCE_ROOT; };
-		5A6424932204D04F00C3D9DB /* PdbFPOProgramToDWARFExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PdbFPOProgramToDWARFExpression.cpp; path = source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp; sourceTree = SOURCE_ROOT; };
-		5A6424912204D04F00C3D9DB /* PdbFPOProgramToDWARFExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PdbFPOProgramToDWARFExpression.h; path = source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.h; sourceTree = SOURCE_ROOT; };
-		AFD966B6217140B6006714AC /* PdbIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PdbIndex.cpp; path = source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp; sourceTree = SOURCE_ROOT; };
-		AFD966BF217140C8006714AC /* PdbIndex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PdbIndex.h; path = source/Plugins/SymbolFile/NativePDB/PdbIndex.h; sourceTree = SOURCE_ROOT; };
-		AF0F459D219FA1C800C1E612 /* PdbSymUid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PdbSymUid.cpp; path = source/Plugins/SymbolFile/NativePDB/PdbSymUid.cpp; sourceTree = SOURCE_ROOT; };
-		AFD966BC217140C8006714AC /* PdbSymUid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PdbSymUid.h; path = source/Plugins/SymbolFile/NativePDB/PdbSymUid.h; sourceTree = SOURCE_ROOT; };
-		AFD966B5217140B6006714AC /* PdbUtil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PdbUtil.cpp; path = source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp; sourceTree = SOURCE_ROOT; };
-		AFD966BE217140C8006714AC /* PdbUtil.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PdbUtil.h; path = source/Plugins/SymbolFile/NativePDB/PdbUtil.h; sourceTree = SOURCE_ROOT; };
-		260A39A519647A3A004B4130 /* Pipe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Pipe.h; path = include/lldb/Host/Pipe.h; sourceTree = "<group>"; };
-		25420ED11A649D88009ADBCB /* PipeBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PipeBase.cpp; sourceTree = "<group>"; };
-		3F5E8AF31A40D4A500A73232 /* PipeBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PipeBase.h; path = include/lldb/Host/PipeBase.h; sourceTree = "<group>"; };
-		2377C2F719E613C100737875 /* PipePosix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PipePosix.cpp; sourceTree = "<group>"; };
-		255EFF701AFABA320069F277 /* PipeWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PipeWindows.h; path = include/lldb/Host/windows/PipeWindows.h; sourceTree = "<group>"; };
-		264A43BD1320BCEB005B4096 /* Platform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Platform.cpp; path = source/Target/Platform.cpp; sourceTree = "<group>"; };
-		264A43BB1320B3B4005B4096 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = include/lldb/Target/Platform.h; sourceTree = "<group>"; };
-		266941FD1A6DC2AC0063BE93 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = "tools/lldb-mi/Platform.h"; sourceTree = SOURCE_ROOT; };
-		6D55BAE91A8CD08C00A70529 /* PlatformAndroid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAndroid.cpp; sourceTree = "<group>"; };
-		6D55BAEA1A8CD08C00A70529 /* PlatformAndroid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformAndroid.h; sourceTree = "<group>"; };
-		6D55BAEB1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAndroidRemoteGDBServer.cpp; sourceTree = "<group>"; };
-		6D55BAEC1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformAndroidRemoteGDBServer.h; sourceTree = "<group>"; };
-		9455630A1BEAD0570073F75F /* PlatformAppleSimulator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAppleSimulator.cpp; sourceTree = "<group>"; };
-		9455630B1BEAD0570073F75F /* PlatformAppleSimulator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlatformAppleSimulator.h; sourceTree = "<group>"; };
-		AF8AD62A1BEC28A400150209 /* PlatformAppleTVSimulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAppleTVSimulator.cpp; sourceTree = "<group>"; };
-		AF8AD62B1BEC28A400150209 /* PlatformAppleTVSimulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformAppleTVSimulator.h; sourceTree = "<group>"; };
-		AF8AD62C1BEC28A400150209 /* PlatformAppleWatchSimulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformAppleWatchSimulator.cpp; sourceTree = "<group>"; };
-		AF8AD62D1BEC28A400150209 /* PlatformAppleWatchSimulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformAppleWatchSimulator.h; sourceTree = "<group>"; };
-		2697A54B133A6305004E4240 /* PlatformDarwin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformDarwin.cpp; sourceTree = "<group>"; };
-		2697A54C133A6305004E4240 /* PlatformDarwin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformDarwin.h; sourceTree = "<group>"; };
-		AF254E2F170CCC33007AE5C9 /* PlatformDarwinKernel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformDarwinKernel.cpp; sourceTree = "<group>"; };
-		AF254E30170CCC33007AE5C9 /* PlatformDarwinKernel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformDarwinKernel.h; sourceTree = "<group>"; };
-		9A20571A1F3B866F00F6C293 /* PlatformDarwinTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlatformDarwinTest.cpp; path = Platform/PlatformDarwinTest.cpp; sourceTree = "<group>"; };
-		2694E99A14FC0BB30076DE67 /* PlatformFreeBSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformFreeBSD.cpp; sourceTree = "<group>"; };
-		2694E99B14FC0BB30076DE67 /* PlatformFreeBSD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformFreeBSD.h; sourceTree = "<group>"; };
-		2694E9A114FC0BBD0076DE67 /* PlatformLinux.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformLinux.cpp; sourceTree = "<group>"; };
-		2694E9A214FC0BBD0076DE67 /* PlatformLinux.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformLinux.h; sourceTree = "<group>"; };
-		26C5577B132575AD008FD8FE /* PlatformMacOSX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformMacOSX.cpp; sourceTree = "<group>"; };
-		26C5577C132575AD008FD8FE /* PlatformMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformMacOSX.h; sourceTree = "<group>"; };
-		26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformNetBSD.cpp; sourceTree = "<group>"; };
-		26EFB6191BFE8D3E00544801 /* PlatformNetBSD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformNetBSD.h; sourceTree = "<group>"; };
-		4CE4EFA61E8999B000A80C06 /* PlatformOpenBSD.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformOpenBSD.cpp; sourceTree = "<group>"; };
-		4CE4EFA71E8999B000A80C06 /* PlatformOpenBSD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformOpenBSD.h; sourceTree = "<group>"; };
-		945759651534941F005A9070 /* PlatformPOSIX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlatformPOSIX.cpp; path = POSIX/PlatformPOSIX.cpp; sourceTree = "<group>"; };
-		945759661534941F005A9070 /* PlatformPOSIX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformPOSIX.h; path = POSIX/PlatformPOSIX.h; sourceTree = "<group>"; };
-		AF66324E216EB9C300BB510D /* PlatformRemoteAppleBridge.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformRemoteAppleBridge.cpp; sourceTree = "<group>"; };
-		AF66324F216EB9C300BB510D /* PlatformRemoteAppleBridge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformRemoteAppleBridge.h; sourceTree = "<group>"; };
-		AF8AD6331BEC28C400150209 /* PlatformRemoteAppleTV.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformRemoteAppleTV.cpp; sourceTree = "<group>"; };
-		AF8AD6341BEC28C400150209 /* PlatformRemoteAppleTV.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformRemoteAppleTV.h; sourceTree = "<group>"; };
-		AF8AD6351BEC28C400150209 /* PlatformRemoteAppleWatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformRemoteAppleWatch.cpp; sourceTree = "<group>"; };
-		AF8AD6361BEC28C400150209 /* PlatformRemoteAppleWatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformRemoteAppleWatch.h; sourceTree = "<group>"; };
-		AF3A4AD01EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformRemoteDarwinDevice.cpp; sourceTree = "<group>"; };
-		AF3A4AD11EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformRemoteDarwinDevice.h; sourceTree = "<group>"; };
-		264A97BD133918BC0017F0BE /* PlatformRemoteGDBServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PlatformRemoteGDBServer.cpp; path = "gdb-server/PlatformRemoteGDBServer.cpp"; sourceTree = "<group>"; };
-		264A97BE133918BC0017F0BE /* PlatformRemoteGDBServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatformRemoteGDBServer.h; path = "gdb-server/PlatformRemoteGDBServer.h"; sourceTree = "<group>"; };
-		2675F6FE1332BE690067997B /* PlatformRemoteiOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformRemoteiOS.cpp; sourceTree = "<group>"; };
-		2675F6FF1332BE690067997B /* PlatformRemoteiOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformRemoteiOS.h; sourceTree = "<group>"; };
-		490A36BD180F0E6F00BA31F8 /* PlatformWindows.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformWindows.cpp; sourceTree = "<group>"; };
-		490A36BE180F0E6F00BA31F8 /* PlatformWindows.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformWindows.h; sourceTree = "<group>"; };
-		26B7564C14F89356008D9CB3 /* PlatformiOSSimulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PlatformiOSSimulator.cpp; sourceTree = "<group>"; };
-		26B7564D14F89356008D9CB3 /* PlatformiOSSimulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformiOSSimulator.h; sourceTree = "<group>"; };
-		AFB1682620D1D4CC00A74F25 /* PlatformiOSSimulatorCoreSimulatorSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PlatformiOSSimulatorCoreSimulatorSupport.h; path = objcxx/PlatformiOSSimulatorCoreSimulatorSupport.h; sourceTree = "<group>"; };
-		AFF81FB220D1CC910010F95E /* PlatformiOSSimulatorCoreSimulatorSupport.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatformiOSSimulatorCoreSimulatorSupport.mm; path = source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm; sourceTree = SOURCE_ROOT; };
-		26BC7D7010F1B77400F91463 /* PluginInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginInterface.h; path = include/lldb/Core/PluginInterface.h; sourceTree = "<group>"; };
-		26BC7E8A10F1B85900F91463 /* PluginManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginManager.cpp; path = source/Core/PluginManager.cpp; sourceTree = "<group>"; };
-		26BC7D7110F1B77400F91463 /* PluginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PluginManager.h; path = include/lldb/Core/PluginManager.h; sourceTree = "<group>"; };
-		AFC4ADB02270F4C600042167 /* PostfixExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PostfixExpression.cpp; path = source/Symbol/PostfixExpression.cpp; sourceTree = "<group>"; };
-		4C639EC021FA684700A7B957 /* PredicateTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PredicateTest.cpp; sourceTree = "<group>"; };
-		26BC7F3610F1B90C00F91463 /* Process.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Process.cpp; path = source/Target/Process.cpp; sourceTree = "<group>"; };
-		26BC7DF310F1B81A00F91463 /* Process.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Process.h; path = include/lldb/Target/Process.h; sourceTree = "<group>"; };
-		26BC17A218C7F4CB00D2196D /* ProcessElfCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessElfCore.cpp; sourceTree = "<group>"; };
-		26BC17A318C7F4CB00D2196D /* ProcessElfCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessElfCore.h; sourceTree = "<group>"; };
-		23AB052F199FF639003B8084 /* ProcessFreeBSD.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessFreeBSD.cpp; sourceTree = "<group>"; };
-		23AB0530199FF639003B8084 /* ProcessFreeBSD.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProcessFreeBSD.h; sourceTree = "<group>"; };
-		2618EE5F1315B29C001D6D71 /* ProcessGDBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessGDBRemote.cpp; sourceTree = "<group>"; };
-		2618EE601315B29C001D6D71 /* ProcessGDBRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessGDBRemote.h; sourceTree = "<group>"; };
-		2618EE611315B29C001D6D71 /* ProcessGDBRemoteLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessGDBRemoteLog.cpp; sourceTree = "<group>"; };
-		2618EE621315B29C001D6D71 /* ProcessGDBRemoteLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessGDBRemoteLog.h; sourceTree = "<group>"; };
-		4CC57F9F222DFEA40067B7EA /* ProcessInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ProcessInfo.cpp; path = source/Utility/ProcessInfo.cpp; sourceTree = "<group>"; };
-		2642FBAA13D003B400ED6808 /* ProcessKDP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessKDP.cpp; sourceTree = "<group>"; };
-		2642FBAB13D003B400ED6808 /* ProcessKDP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessKDP.h; sourceTree = "<group>"; };
-		2642FBAC13D003B400ED6808 /* ProcessKDPLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessKDPLog.cpp; sourceTree = "<group>"; };
-		2642FBAD13D003B400ED6808 /* ProcessKDPLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessKDPLog.h; sourceTree = "<group>"; };
-		233B007E1960CB280090E598 /* ProcessLaunchInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessLaunchInfo.cpp; sourceTree = "<group>"; };
-		26A527BD14E24F5F00F3A14A /* ProcessMachCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessMachCore.cpp; sourceTree = "<group>"; };
-		26A527BE14E24F5F00F3A14A /* ProcessMachCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessMachCore.h; sourceTree = "<group>"; };
-		26BC17BA18C7F4FA00D2196D /* ProcessMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessMessage.cpp; sourceTree = "<group>"; };
-		26BC17BB18C7F4FA00D2196D /* ProcessMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessMessage.h; sourceTree = "<group>"; };
-		947CF7701DC7B1EE00EF980B /* ProcessMinidump.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessMinidump.cpp; sourceTree = "<group>"; };
-		947CF76F1DC7B1E300EF980B /* ProcessMinidump.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProcessMinidump.h; sourceTree = "<group>"; };
-		23AB0531199FF639003B8084 /* ProcessMonitor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessMonitor.cpp; sourceTree = "<group>"; };
-		23AB0532199FF639003B8084 /* ProcessMonitor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ProcessMonitor.h; sourceTree = "<group>"; };
-		26BC17BE18C7F4FA00D2196D /* ProcessPOSIXLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessPOSIXLog.cpp; sourceTree = "<group>"; };
-		26BC17BF18C7F4FA00D2196D /* ProcessPOSIXLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProcessPOSIXLog.h; sourceTree = "<group>"; };
-		3FDFE54519A29448009756A7 /* ProcessRunLock.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ProcessRunLock.cpp; path = source/Host/windows/ProcessRunLock.cpp; sourceTree = "<group>"; };
-		AF37E10917C861F20061E18E /* ProcessRunLock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessRunLock.cpp; sourceTree = "<group>"; };
-		3FDFED2219BA6D55009756A7 /* ProcessRunLock.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ProcessRunLock.h; path = include/lldb/Host/ProcessRunLock.h; sourceTree = "<group>"; };
-		2640E19E15DC78FD00F23B50 /* Property.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Property.cpp; path = source/Interpreter/Property.cpp; sourceTree = "<group>"; };
-		26ACEC2715E077AE00E94760 /* Property.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Property.h; path = include/lldb/Interpreter/Property.h; sourceTree = "<group>"; };
-		2654A68C1E552D1500DA1013 /* PseudoTerminal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PseudoTerminal.cpp; path = source/Host/common/PseudoTerminal.cpp; sourceTree = "<group>"; };
-		2654A68E1E552D2400DA1013 /* PseudoTerminal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = PseudoTerminal.h; path = include/lldb/Host/PseudoTerminal.h; sourceTree = "<group>"; };
-		2326CF3F1BDD613E00A5CEAC /* Python.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Python.framework; path = System/Library/Frameworks/Python.framework; sourceTree = SDKROOT; };
-		3FBA69E31B60672A0008F44A /* PythonDataObjects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PythonDataObjects.cpp; path = ScriptInterpreter/Python/PythonDataObjects.cpp; sourceTree = "<group>"; };
-		3FBA69E41B60672A0008F44A /* PythonDataObjects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PythonDataObjects.h; path = ScriptInterpreter/Python/PythonDataObjects.h; sourceTree = "<group>"; };
-		2321F94D1BDD360F00BA9A93 /* PythonDataObjectsTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PythonDataObjectsTests.cpp; sourceTree = "<group>"; };
-		AFCB2BBB1BF577F40018B553 /* PythonExceptionState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PythonExceptionState.cpp; path = ScriptInterpreter/Python/PythonExceptionState.cpp; sourceTree = "<group>"; };
-		AFCB2BBC1BF577F40018B553 /* PythonExceptionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PythonExceptionState.h; path = ScriptInterpreter/Python/PythonExceptionState.h; sourceTree = "<group>"; };
-		3FA093141BF65D3A0037DD08 /* PythonExceptionStateTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PythonExceptionStateTests.cpp; sourceTree = "<group>"; };
-		AF45E1FC1BF57C8D000563EB /* PythonTestSuite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PythonTestSuite.cpp; sourceTree = "<group>"; };
-		AF45E1FD1BF57C8D000563EB /* PythonTestSuite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PythonTestSuite.h; sourceTree = "<group>"; };
-		AF2670381852D01E00B6CC36 /* Queue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Queue.cpp; path = source/Target/Queue.cpp; sourceTree = "<group>"; };
-		260A63111860FDB600FECF8E /* Queue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Queue.h; path = include/lldb/Target/Queue.h; sourceTree = "<group>"; };
-		AF0C112718580CD800C4C45B /* QueueItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QueueItem.cpp; path = source/Target/QueueItem.cpp; sourceTree = "<group>"; };
-		260A63121860FDBD00FECF8E /* QueueItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = QueueItem.h; path = include/lldb/Target/QueueItem.h; sourceTree = "<group>"; };
-		AF2670391852D01E00B6CC36 /* QueueList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = QueueList.cpp; path = source/Target/QueueList.cpp; sourceTree = "<group>"; };
-		260A63131860FDC700FECF8E /* QueueList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = QueueList.h; path = include/lldb/Target/QueueList.h; sourceTree = "<group>"; };
-		4939EA8C1BD56B6D00084382 /* REPL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = REPL.cpp; path = source/Expression/REPL.cpp; sourceTree = "<group>"; };
-		4939EA8B1BD56B3700084382 /* REPL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = REPL.h; path = include/lldb/Expression/REPL.h; sourceTree = "<group>"; };
-		9A2057451F3B905C00F6C293 /* RNBSocketTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RNBSocketTest.cpp; path = debugserver/RNBSocketTest.cpp; sourceTree = "<group>"; };
-		2626B6AD143E1BEA00EF935C /* RangeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RangeMap.h; path = include/lldb/Core/RangeMap.h; sourceTree = "<group>"; };
-		26AB54111832DC3400EADFF3 /* RegisterCheckpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterCheckpoint.h; path = include/lldb/Target/RegisterCheckpoint.h; sourceTree = "<group>"; };
-		26BC7F3710F1B90C00F91463 /* RegisterContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContext.cpp; path = source/Target/RegisterContext.cpp; sourceTree = "<group>"; };
-		26BC7DF410F1B81A00F91463 /* RegisterContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext.h; path = include/lldb/Target/RegisterContext.h; sourceTree = "<group>"; };
-		26957D9213D381C900670048 /* RegisterContextDarwin_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextDarwin_arm.cpp; path = Utility/RegisterContextDarwin_arm.cpp; sourceTree = "<group>"; };
-		26957D9313D381C900670048 /* RegisterContextDarwin_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDarwin_arm.h; path = Utility/RegisterContextDarwin_arm.h; sourceTree = "<group>"; };
-		AF9107EC168570D200DBCD3C /* RegisterContextDarwin_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextDarwin_arm64.cpp; path = Utility/RegisterContextDarwin_arm64.cpp; sourceTree = "<group>"; };
-		AF9107ED168570D200DBCD3C /* RegisterContextDarwin_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDarwin_arm64.h; path = Utility/RegisterContextDarwin_arm64.h; sourceTree = "<group>"; };
-		26957D9413D381C900670048 /* RegisterContextDarwin_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextDarwin_i386.cpp; path = Utility/RegisterContextDarwin_i386.cpp; sourceTree = "<group>"; };
-		26957D9513D381C900670048 /* RegisterContextDarwin_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDarwin_i386.h; path = Utility/RegisterContextDarwin_i386.h; sourceTree = "<group>"; };
-		26957D9613D381C900670048 /* RegisterContextDarwin_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextDarwin_x86_64.cpp; path = Utility/RegisterContextDarwin_x86_64.cpp; sourceTree = "<group>"; };
-		26957D9713D381C900670048 /* RegisterContextDarwin_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDarwin_x86_64.h; path = Utility/RegisterContextDarwin_x86_64.h; sourceTree = "<group>"; };
-		944372DA171F6B4300E57C32 /* RegisterContextDummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextDummy.cpp; path = Utility/RegisterContextDummy.cpp; sourceTree = "<group>"; };
-		944372DB171F6B4300E57C32 /* RegisterContextDummy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextDummy.h; path = Utility/RegisterContextDummy.h; sourceTree = "<group>"; };
-		26474CA218D0CB070073DEBA /* RegisterContextFreeBSD_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextFreeBSD_i386.cpp; path = Utility/RegisterContextFreeBSD_i386.cpp; sourceTree = "<group>"; };
-		26474CA318D0CB070073DEBA /* RegisterContextFreeBSD_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextFreeBSD_i386.h; path = Utility/RegisterContextFreeBSD_i386.h; sourceTree = "<group>"; };
-		26474CA418D0CB070073DEBA /* RegisterContextFreeBSD_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextFreeBSD_mips64.cpp; path = Utility/RegisterContextFreeBSD_mips64.cpp; sourceTree = "<group>"; };
-		26474CA518D0CB070073DEBA /* RegisterContextFreeBSD_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextFreeBSD_mips64.h; path = Utility/RegisterContextFreeBSD_mips64.h; sourceTree = "<group>"; };
-		AF77E09A1A033D360096C0EA /* RegisterContextFreeBSD_powerpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextFreeBSD_powerpc.cpp; path = Utility/RegisterContextFreeBSD_powerpc.cpp; sourceTree = "<group>"; };
-		AF77E09B1A033D360096C0EA /* RegisterContextFreeBSD_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextFreeBSD_powerpc.h; path = Utility/RegisterContextFreeBSD_powerpc.h; sourceTree = "<group>"; };
-		26474CA618D0CB070073DEBA /* RegisterContextFreeBSD_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextFreeBSD_x86_64.cpp; path = Utility/RegisterContextFreeBSD_x86_64.cpp; sourceTree = "<group>"; };
-		26474CA718D0CB070073DEBA /* RegisterContextFreeBSD_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextFreeBSD_x86_64.h; path = Utility/RegisterContextFreeBSD_x86_64.h; sourceTree = "<group>"; };
-		AF061F85182C97ED00B6A19C /* RegisterContextHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextHistory.cpp; path = Utility/RegisterContextHistory.cpp; sourceTree = "<group>"; };
-		AF061F86182C97ED00B6A19C /* RegisterContextHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextHistory.h; path = Utility/RegisterContextHistory.h; sourceTree = "<group>"; };
-		265205A213D3E3F700132FE2 /* RegisterContextKDP_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextKDP_arm.cpp; sourceTree = "<group>"; };
-		265205A313D3E3F700132FE2 /* RegisterContextKDP_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextKDP_arm.h; sourceTree = "<group>"; };
-		AF0F6E4E1739A76D009180FE /* RegisterContextKDP_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextKDP_arm64.cpp; sourceTree = "<group>"; };
-		AF0F6E4F1739A76D009180FE /* RegisterContextKDP_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextKDP_arm64.h; sourceTree = "<group>"; };
-		265205A413D3E3F700132FE2 /* RegisterContextKDP_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextKDP_i386.cpp; sourceTree = "<group>"; };
-		265205A513D3E3F700132FE2 /* RegisterContextKDP_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextKDP_i386.h; sourceTree = "<group>"; };
-		265205A613D3E3F700132FE2 /* RegisterContextKDP_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextKDP_x86_64.cpp; sourceTree = "<group>"; };
-		265205A713D3E3F700132FE2 /* RegisterContextKDP_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextKDP_x86_64.h; sourceTree = "<group>"; };
-		AF68D2541255416E002FF25B /* RegisterContextLLDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLLDB.cpp; path = Utility/RegisterContextLLDB.cpp; sourceTree = "<group>"; };
-		AF68D2551255416E002FF25B /* RegisterContextLLDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLLDB.h; path = Utility/RegisterContextLLDB.h; sourceTree = "<group>"; };
-		26474CAE18D0CB180073DEBA /* RegisterContextLinux_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLinux_i386.cpp; path = Utility/RegisterContextLinux_i386.cpp; sourceTree = "<group>"; };
-		26474CAF18D0CB180073DEBA /* RegisterContextLinux_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_i386.h; path = Utility/RegisterContextLinux_i386.h; sourceTree = "<group>"; };
-		9A0FDE971E8EF5010086B2F5 /* RegisterContextLinux_mips.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLinux_mips.cpp; path = Utility/RegisterContextLinux_mips.cpp; sourceTree = "<group>"; };
-		9A0FDE981E8EF5010086B2F5 /* RegisterContextLinux_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_mips.h; path = Utility/RegisterContextLinux_mips.h; sourceTree = "<group>"; };
-		256CBDB81ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLinux_mips64.cpp; path = Utility/RegisterContextLinux_mips64.cpp; sourceTree = "<group>"; };
-		256CBDB91ADD107200BC6CDC /* RegisterContextLinux_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_mips64.h; path = Utility/RegisterContextLinux_mips64.h; sourceTree = "<group>"; };
-		267F68511CC02E920086832B /* RegisterContextLinux_s390x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLinux_s390x.cpp; path = Utility/RegisterContextLinux_s390x.cpp; sourceTree = "<group>"; };
-		267F68521CC02E920086832B /* RegisterContextLinux_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_s390x.h; path = Utility/RegisterContextLinux_s390x.h; sourceTree = "<group>"; };
-		26474CB018D0CB180073DEBA /* RegisterContextLinux_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextLinux_x86_64.cpp; path = Utility/RegisterContextLinux_x86_64.cpp; sourceTree = "<group>"; };
-		26474CB118D0CB180073DEBA /* RegisterContextLinux_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextLinux_x86_64.h; path = Utility/RegisterContextLinux_x86_64.h; sourceTree = "<group>"; };
-		26E3EEF711A994E800FBADB6 /* RegisterContextMacOSXFrameBackchain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMacOSXFrameBackchain.cpp; path = Utility/RegisterContextMacOSXFrameBackchain.cpp; sourceTree = "<group>"; };
-		AF77E09C1A033D360096C0EA /* RegisterContextMacOSXFrameBackchain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMacOSXFrameBackchain.cpp; path = Utility/RegisterContextMacOSXFrameBackchain.cpp; sourceTree = "<group>"; };
-		26E3EEF811A994E800FBADB6 /* RegisterContextMacOSXFrameBackchain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMacOSXFrameBackchain.h; path = Utility/RegisterContextMacOSXFrameBackchain.h; sourceTree = "<group>"; };
-		26474CB618D0CB2D0073DEBA /* RegisterContextMach_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMach_arm.cpp; path = Utility/RegisterContextMach_arm.cpp; sourceTree = "<group>"; };
-		26474CB718D0CB2D0073DEBA /* RegisterContextMach_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMach_arm.h; path = Utility/RegisterContextMach_arm.h; sourceTree = "<group>"; };
-		26474CB818D0CB2D0073DEBA /* RegisterContextMach_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMach_i386.cpp; path = Utility/RegisterContextMach_i386.cpp; sourceTree = "<group>"; };
-		26474CB918D0CB2D0073DEBA /* RegisterContextMach_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMach_i386.h; path = Utility/RegisterContextMach_i386.h; sourceTree = "<group>"; };
-		26474CBA18D0CB2D0073DEBA /* RegisterContextMach_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMach_x86_64.cpp; path = Utility/RegisterContextMach_x86_64.cpp; sourceTree = "<group>"; };
-		26474CBB18D0CB2D0073DEBA /* RegisterContextMach_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMach_x86_64.h; path = Utility/RegisterContextMach_x86_64.h; sourceTree = "<group>"; };
-		262D24E413FB8710002D1960 /* RegisterContextMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMemory.cpp; path = Utility/RegisterContextMemory.cpp; sourceTree = "<group>"; };
-		26474CC218D0CB5B0073DEBA /* RegisterContextMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextMemory.cpp; path = Utility/RegisterContextMemory.cpp; sourceTree = "<group>"; };
-		262D24E513FB8710002D1960 /* RegisterContextMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMemory.h; path = Utility/RegisterContextMemory.h; sourceTree = "<group>"; };
-		26474CC318D0CB5B0073DEBA /* RegisterContextMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextMemory.h; path = Utility/RegisterContextMemory.h; sourceTree = "<group>"; };
-		2619C4812107A9A1009CDE81 /* RegisterContextMinidump_ARM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextMinidump_ARM.cpp; sourceTree = "<group>"; };
-		2619C4832107A9A2009CDE81 /* RegisterContextMinidump_ARM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextMinidump_ARM.h; sourceTree = "<group>"; };
-		2619C4802107A9A1009CDE81 /* RegisterContextMinidump_ARM64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextMinidump_ARM64.cpp; sourceTree = "<group>"; };
-		2619C4822107A9A2009CDE81 /* RegisterContextMinidump_ARM64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextMinidump_ARM64.h; sourceTree = "<group>"; };
-		947CF7741DC7B20D00EF980B /* RegisterContextMinidump_x86_32.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextMinidump_x86_32.cpp; sourceTree = "<group>"; };
-		947CF7721DC7B20300EF980B /* RegisterContextMinidump_x86_32.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RegisterContextMinidump_x86_32.h; sourceTree = "<group>"; };
-		AFD65C7F1D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextMinidump_x86_64.cpp; sourceTree = "<group>"; };
-		AFD65C801D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextMinidump_x86_64.h; sourceTree = "<group>"; };
-		9AD9449B1E8DB267004796ED /* RegisterContextNetBSD_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextNetBSD_x86_64.cpp; path = Utility/RegisterContextNetBSD_x86_64.cpp; sourceTree = "<group>"; };
-		9AD9449C1E8DB267004796ED /* RegisterContextNetBSD_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextNetBSD_x86_64.h; path = Utility/RegisterContextNetBSD_x86_64.h; sourceTree = "<group>"; };
-		4CE4EFAB1E899A1200A80C06 /* RegisterContextOpenBSD_i386.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextOpenBSD_i386.cpp; path = Utility/RegisterContextOpenBSD_i386.cpp; sourceTree = "<group>"; };
-		4CE4EFAC1E899A1200A80C06 /* RegisterContextOpenBSD_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextOpenBSD_i386.h; path = Utility/RegisterContextOpenBSD_i386.h; sourceTree = "<group>"; };
-		4CE4EFAD1E899A1200A80C06 /* RegisterContextOpenBSD_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextOpenBSD_x86_64.cpp; path = Utility/RegisterContextOpenBSD_x86_64.cpp; sourceTree = "<group>"; };
-		4CE4EFAE1E899A1200A80C06 /* RegisterContextOpenBSD_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextOpenBSD_x86_64.h; path = Utility/RegisterContextOpenBSD_x86_64.h; sourceTree = "<group>"; };
-		26474CC818D0CB5B0073DEBA /* RegisterContextPOSIX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIX.h; sourceTree = "<group>"; };
-		256CBDB21ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_arm.cpp; sourceTree = "<group>"; };
-		256CBDB31ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_arm.h; sourceTree = "<group>"; };
-		E7723D421AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_arm64.cpp; sourceTree = "<group>"; };
-		E7723D431AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_arm64.h; sourceTree = "<group>"; };
-		26BC17A418C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_mips64.cpp; sourceTree = "<group>"; };
-		26BC17A518C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_mips64.h; sourceTree = "<group>"; };
-		AF77E0A71A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_powerpc.cpp; sourceTree = "<group>"; };
-		AF77E0A81A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_powerpc.h; sourceTree = "<group>"; };
-		AF9113FB1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_ppc64le.cpp; sourceTree = "<group>"; };
-		AF9113FC1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_ppc64le.h; sourceTree = "<group>"; };
-		267F684D1CC02E270086832B /* RegisterContextPOSIXCore_s390x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_s390x.cpp; sourceTree = "<group>"; };
-		267F684E1CC02E270086832B /* RegisterContextPOSIXCore_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_s390x.h; sourceTree = "<group>"; };
-		26BC17A618C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXCore_x86_64.cpp; sourceTree = "<group>"; };
-		26BC17A718C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXCore_x86_64.h; sourceTree = "<group>"; };
-		AF3F54B81B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_arm.cpp; sourceTree = "<group>"; };
-		AF3F54B91B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_arm.h; sourceTree = "<group>"; };
-		AF3F54BA1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_arm64.cpp; sourceTree = "<group>"; };
-		AF3F54BB1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_arm64.h; sourceTree = "<group>"; };
-		AF3F54BC1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_mips64.cpp; sourceTree = "<group>"; };
-		AF3F54BD1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_mips64.h; sourceTree = "<group>"; };
-		AF3F54BE1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_powerpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_powerpc.cpp; sourceTree = "<group>"; };
-		AF3F54BF1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_powerpc.h; sourceTree = "<group>"; };
-		AF3F54C01B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_x86.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterContextPOSIXProcessMonitor_x86.cpp; sourceTree = "<group>"; };
-		AF3F54C11B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterContextPOSIXProcessMonitor_x86.h; sourceTree = "<group>"; };
-		256CBDBE1ADD11C000BC6CDC /* RegisterContextPOSIX_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_arm.cpp; path = Utility/RegisterContextPOSIX_arm.cpp; sourceTree = "<group>"; };
-		256CBDBF1ADD11C000BC6CDC /* RegisterContextPOSIX_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_arm.h; path = Utility/RegisterContextPOSIX_arm.h; sourceTree = "<group>"; };
-		E7723D4A1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_arm64.cpp; path = Utility/RegisterContextPOSIX_arm64.cpp; sourceTree = "<group>"; };
-		E7723D4B1AC4A944002BA082 /* RegisterContextPOSIX_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_arm64.h; path = Utility/RegisterContextPOSIX_arm64.h; sourceTree = "<group>"; };
-		26474CC418D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_mips64.cpp; path = Utility/RegisterContextPOSIX_mips64.cpp; sourceTree = "<group>"; };
-		26474CC518D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_mips64.h; path = Utility/RegisterContextPOSIX_mips64.h; sourceTree = "<group>"; };
-		AF77E09D1A033D360096C0EA /* RegisterContextPOSIX_powerpc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_powerpc.cpp; path = Utility/RegisterContextPOSIX_powerpc.cpp; sourceTree = "<group>"; };
-		AF77E09E1A033D360096C0EA /* RegisterContextPOSIX_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_powerpc.h; path = Utility/RegisterContextPOSIX_powerpc.h; sourceTree = "<group>"; };
-		AF235EAE1FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_ppc64le.cpp; path = Utility/RegisterContextPOSIX_ppc64le.cpp; sourceTree = "<group>"; };
-		AF235EAF1FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_ppc64le.h; path = Utility/RegisterContextPOSIX_ppc64le.h; sourceTree = "<group>"; };
-		267F68551CC02EAE0086832B /* RegisterContextPOSIX_s390x.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_s390x.cpp; path = Utility/RegisterContextPOSIX_s390x.cpp; sourceTree = "<group>"; };
-		267F68561CC02EAE0086832B /* RegisterContextPOSIX_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_s390x.h; path = Utility/RegisterContextPOSIX_s390x.h; sourceTree = "<group>"; };
-		26474CC618D0CB5B0073DEBA /* RegisterContextPOSIX_x86.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextPOSIX_x86.cpp; path = Utility/RegisterContextPOSIX_x86.cpp; sourceTree = "<group>"; };
-		26474CC718D0CB5B0073DEBA /* RegisterContextPOSIX_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextPOSIX_x86.h; path = Utility/RegisterContextPOSIX_x86.h; sourceTree = "<group>"; };
-		26CA979F172B1FD5005DC71B /* RegisterContextThreadMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterContextThreadMemory.cpp; path = Utility/RegisterContextThreadMemory.cpp; sourceTree = "<group>"; };
-		26CA97A0172B1FD5005DC71B /* RegisterContextThreadMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContextThreadMemory.h; path = Utility/RegisterContextThreadMemory.h; sourceTree = "<group>"; };
-		9A0FDE951E8EF5010086B2F5 /* RegisterContext_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext_mips.h; path = Utility/RegisterContext_mips.h; sourceTree = "<group>"; };
-		AF77E0991A033D360096C0EA /* RegisterContext_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext_powerpc.h; path = Utility/RegisterContext_powerpc.h; sourceTree = "<group>"; };
-		9A0FDE961E8EF5010086B2F5 /* RegisterContext_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext_s390x.h; path = Utility/RegisterContext_s390x.h; sourceTree = "<group>"; };
-		26474C9F18D0CAEC0073DEBA /* RegisterContext_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterContext_x86.h; path = Utility/RegisterContext_x86.h; sourceTree = "<group>"; };
-		23EDE3371926AAD500F6A132 /* RegisterInfoInterface.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegisterInfoInterface.h; path = Utility/RegisterInfoInterface.h; sourceTree = "<group>"; };
-		9A77AD501E64E24E0025CE04 /* RegisterInfoPOSIX_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterInfoPOSIX_arm.cpp; path = Utility/RegisterInfoPOSIX_arm.cpp; sourceTree = "<group>"; };
-		9A77AD511E64E24E0025CE04 /* RegisterInfoPOSIX_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfoPOSIX_arm.h; path = Utility/RegisterInfoPOSIX_arm.h; sourceTree = "<group>"; };
-		237A8BAB1DEC9BBC00CEBAFF /* RegisterInfoPOSIX_arm64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterInfoPOSIX_arm64.cpp; path = Utility/RegisterInfoPOSIX_arm64.cpp; sourceTree = "<group>"; };
-		237A8BAC1DEC9BBC00CEBAFF /* RegisterInfoPOSIX_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfoPOSIX_arm64.h; path = Utility/RegisterInfoPOSIX_arm64.h; sourceTree = "<group>"; };
-		AF235EB31FBE7858009C5541 /* RegisterInfoPOSIX_ppc64le.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterInfoPOSIX_ppc64le.cpp; path = Utility/RegisterInfoPOSIX_ppc64le.cpp; sourceTree = "<group>"; };
-		AF235EB21FBE7857009C5541 /* RegisterInfoPOSIX_ppc64le.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfoPOSIX_ppc64le.h; path = Utility/RegisterInfoPOSIX_ppc64le.h; sourceTree = "<group>"; };
-		9A0FDE991E8EF5010086B2F5 /* RegisterInfos_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_arm.h; path = Utility/RegisterInfos_arm.h; sourceTree = "<group>"; };
-		9A0FDE9A1E8EF5010086B2F5 /* RegisterInfos_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_arm64.h; path = Utility/RegisterInfos_arm64.h; sourceTree = "<group>"; };
-		26474CD018D0CB700073DEBA /* RegisterInfos_i386.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_i386.h; path = Utility/RegisterInfos_i386.h; sourceTree = "<group>"; };
-		9A0FDE9B1E8EF5010086B2F5 /* RegisterInfos_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_mips.h; path = Utility/RegisterInfos_mips.h; sourceTree = "<group>"; };
-		26474CD118D0CB710073DEBA /* RegisterInfos_mips64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_mips64.h; path = Utility/RegisterInfos_mips64.h; sourceTree = "<group>"; };
-		AF77E09F1A033D360096C0EA /* RegisterInfos_powerpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_powerpc.h; path = Utility/RegisterInfos_powerpc.h; sourceTree = "<group>"; };
-		267F68591CC02EBE0086832B /* RegisterInfos_s390x.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_s390x.h; path = Utility/RegisterInfos_s390x.h; sourceTree = "<group>"; };
-		26474CD218D0CB710073DEBA /* RegisterInfos_x86_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegisterInfos_x86_64.h; path = Utility/RegisterInfos_x86_64.h; sourceTree = "<group>"; };
-		2654A6821E54D5E200DA1013 /* RegisterNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterNumber.cpp; path = source/Target/RegisterNumber.cpp; sourceTree = "<group>"; };
-		2654A6841E54D5EE00DA1013 /* RegisterNumber.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegisterNumber.h; path = include/lldb/Target/RegisterNumber.h; sourceTree = "<group>"; };
-		4CA9D13C1FCE07AF00300E18 /* RegisterUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterUtilities.cpp; sourceTree = "<group>"; };
-		4CA9D13D1FCE07AF00300E18 /* RegisterUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterUtilities.h; sourceTree = "<group>"; };
-		26C6886E137880C400407EDF /* RegisterValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegisterValue.cpp; path = source/Utility/RegisterValue.cpp; sourceTree = "<group>"; };
-		26C6886D137880B900407EDF /* RegisterValue.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegisterValue.h; path = include/lldb/Utility/RegisterValue.h; sourceTree = "<group>"; };
-		4C639EC421FA684800A7B957 /* RegisterValueTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RegisterValueTest.cpp; sourceTree = "<group>"; };
-		26764C9F1E48F528008D3573 /* RegularExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RegularExpression.cpp; path = source/Utility/RegularExpression.cpp; sourceTree = "<group>"; };
-		26764C9C1E48F516008D3573 /* RegularExpression.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = RegularExpression.h; path = include/lldb/Utility/RegularExpression.h; sourceTree = "<group>"; };
-		26501413221330CE00E16D81 /* RemoteAwarePlatform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoteAwarePlatform.cpp; path = source/Target/RemoteAwarePlatform.cpp; sourceTree = "<group>"; };
-		26501415221330EE00E16D81 /* RemoteAwarePlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoteAwarePlatform.h; path = include/lldb/Target/RemoteAwarePlatform.h; sourceTree = "<group>"; };
-		23D065821D4A7BDA0008EDE6 /* RenderScriptExpressionOpts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderScriptExpressionOpts.cpp; sourceTree = "<group>"; };
-		23D065831D4A7BDA0008EDE6 /* RenderScriptExpressionOpts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderScriptExpressionOpts.h; sourceTree = "<group>"; };
-		23D065841D4A7BDA0008EDE6 /* RenderScriptRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderScriptRuntime.cpp; sourceTree = "<group>"; };
-		23D065851D4A7BDA0008EDE6 /* RenderScriptRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderScriptRuntime.h; sourceTree = "<group>"; };
-		948554591DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderScriptScriptGroup.cpp; sourceTree = "<group>"; };
-		948554581DCBAE3200345FF5 /* RenderScriptScriptGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RenderScriptScriptGroup.h; sourceTree = "<group>"; };
-		23D065861D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderScriptx86ABIFixups.cpp; sourceTree = "<group>"; };
-		23D065871D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderScriptx86ABIFixups.h; sourceTree = "<group>"; };
-		AFCB1D5E219CD5EA00730AD5 /* Reproducer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Reproducer.cpp; path = source/Utility/Reproducer.cpp; sourceTree = "<group>"; };
-		DD6C13BA220A6F21005C2AE8 /* ReproducerInstrumentation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReproducerInstrumentation.cpp; path = source/Utility/ReproducerInstrumentation.cpp; sourceTree = "<group>"; };
-		DD6C13BC220A6F6A005C2AE8 /* ReproducerInstrumentationTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReproducerInstrumentationTest.cpp; sourceTree = "<group>"; };
-		4C639EC121FA684700A7B957 /* ReproducerTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ReproducerTest.cpp; sourceTree = "<group>"; };
-		4FBC04EC211A06200015A814 /* RichManglingContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RichManglingContext.cpp; path = source/Core/RichManglingContext.cpp; sourceTree = "<group>"; };
-		4FBC04EE211A06820015A814 /* RichManglingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RichManglingContext.h; path = include/lldb/Core/RichManglingContext.h; sourceTree = "<group>"; };
-		4FBC04F3211A0F0F0015A814 /* RichManglingContextTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RichManglingContextTest.cpp; sourceTree = "<group>"; };
-		26DE204411618ADA00A093E2 /* SBAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBAddress.cpp; path = source/API/SBAddress.cpp; sourceTree = "<group>"; };
-		26DE204211618ACA00A093E2 /* SBAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBAddress.h; path = include/lldb/API/SBAddress.h; sourceTree = "<group>"; };
-		2611FEEF142D83060017FEA3 /* SBAddress.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBAddress.i; sourceTree = "<group>"; };
-		254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBAttachInfo.cpp; path = source/API/SBAttachInfo.cpp; sourceTree = "<group>"; };
-		254FBBA21A9166F100BD6378 /* SBAttachInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBAttachInfo.h; path = include/lldb/API/SBAttachInfo.h; sourceTree = "<group>"; };
-		254FBBA61A91672800BD6378 /* SBAttachInfo.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBAttachInfo.i; sourceTree = "<group>"; };
-		26DE20601161902600A093E2 /* SBBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBlock.cpp; path = source/API/SBBlock.cpp; sourceTree = "<group>"; };
-		26DE205611618FC500A093E2 /* SBBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBlock.h; path = include/lldb/API/SBBlock.h; sourceTree = "<group>"; };
-		2611FEF0142D83060017FEA3 /* SBBlock.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBBlock.i; sourceTree = "<group>"; };
-		9AF16A9C11402D5B007A7B3F /* SBBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBreakpoint.cpp; path = source/API/SBBreakpoint.cpp; sourceTree = "<group>"; };
-		9AF16A9E11402D69007A7B3F /* SBBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBreakpoint.h; path = include/lldb/API/SBBreakpoint.h; sourceTree = "<group>"; };
-		2611FEF1142D83060017FEA3 /* SBBreakpoint.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBBreakpoint.i; sourceTree = "<group>"; };
-		9AF16CC7114086A1007A7B3F /* SBBreakpointLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBreakpointLocation.cpp; path = source/API/SBBreakpointLocation.cpp; sourceTree = "<group>"; };
-		9AF16CC611408686007A7B3F /* SBBreakpointLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBreakpointLocation.h; path = include/lldb/API/SBBreakpointLocation.h; sourceTree = "<group>"; };
-		2611FEF2142D83060017FEA3 /* SBBreakpointLocation.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBBreakpointLocation.i; sourceTree = "<group>"; };
-		4C54B27C1F61CE5300D469CA /* SBBreakpointName.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBreakpointName.cpp; path = source/API/SBBreakpointName.cpp; sourceTree = "<group>"; };
-		4C54B2781F61CE1200D469CA /* SBBreakpointName.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBreakpointName.h; path = include/lldb/API/SBBreakpointName.h; sourceTree = "<group>"; };
-		4C05332C1F63092A00DED368 /* SBBreakpointName.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBBreakpointName.i; sourceTree = "<group>"; };
-		4C0533291F6211FB00DED368 /* SBBreakpointOptionCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBreakpointOptionCommon.cpp; path = source/API/SBBreakpointOptionCommon.cpp; sourceTree = "<group>"; };
-		4C54B2811F62081300D469CA /* SBBreakpointOptionCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBBreakpointOptionCommon.h; path = source/API/SBBreakpointOptionCommon.h; sourceTree = "<group>"; };
-		9A9830F21125FC5800A56CB0 /* SBBroadcaster.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBBroadcaster.cpp; path = source/API/SBBroadcaster.cpp; sourceTree = "<group>"; };
-		9A9830F31125FC5800A56CB0 /* SBBroadcaster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBBroadcaster.h; path = include/lldb/API/SBBroadcaster.h; sourceTree = "<group>"; };
-		2611FEF3142D83060017FEA3 /* SBBroadcaster.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBBroadcaster.i; sourceTree = "<group>"; };
-		9A9830F61125FC5800A56CB0 /* SBCommandInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommandInterpreter.cpp; path = source/API/SBCommandInterpreter.cpp; sourceTree = "<group>"; };
-		9A9830F71125FC5800A56CB0 /* SBCommandInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCommandInterpreter.h; path = include/lldb/API/SBCommandInterpreter.h; sourceTree = "<group>"; };
-		2611FEF4142D83060017FEA3 /* SBCommandInterpreter.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBCommandInterpreter.i; sourceTree = "<group>"; };
-		9A9830F81125FC5800A56CB0 /* SBCommandReturnObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommandReturnObject.cpp; path = source/API/SBCommandReturnObject.cpp; sourceTree = "<group>"; };
-		9A9830F91125FC5800A56CB0 /* SBCommandReturnObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCommandReturnObject.h; path = include/lldb/API/SBCommandReturnObject.h; sourceTree = "<group>"; };
-		2611FEF5142D83060017FEA3 /* SBCommandReturnObject.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBCommandReturnObject.i; sourceTree = "<group>"; };
-		260223E8115F06E500A601A2 /* SBCommunication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCommunication.cpp; path = source/API/SBCommunication.cpp; sourceTree = "<group>"; };
-		260223E7115F06D500A601A2 /* SBCommunication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCommunication.h; path = include/lldb/API/SBCommunication.h; sourceTree = "<group>"; };
-		2611FEF6142D83060017FEA3 /* SBCommunication.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBCommunication.i; sourceTree = "<group>"; };
-		26DE205E1161901B00A093E2 /* SBCompileUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBCompileUnit.cpp; path = source/API/SBCompileUnit.cpp; sourceTree = "<group>"; };
-		26DE205411618FB800A093E2 /* SBCompileUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBCompileUnit.h; path = include/lldb/API/SBCompileUnit.h; sourceTree = "<group>"; };
-		2611FEF7142D83060017FEA3 /* SBCompileUnit.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBCompileUnit.i; sourceTree = "<group>"; };
-		9443B121140C18C10013457C /* SBData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBData.cpp; path = source/API/SBData.cpp; sourceTree = "<group>"; };
-		9443B120140C18A90013457C /* SBData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBData.h; path = include/lldb/API/SBData.h; sourceTree = "<group>"; };
-		2611FEF8142D83060017FEA3 /* SBData.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBData.i; sourceTree = "<group>"; };
-		9A9830FA1125FC5800A56CB0 /* SBDebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBDebugger.cpp; path = source/API/SBDebugger.cpp; sourceTree = "<group>"; };
-		9A9830FB1125FC5800A56CB0 /* SBDebugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBDebugger.h; path = include/lldb/API/SBDebugger.h; sourceTree = "<group>"; };
-		2611FEF9142D83060017FEA3 /* SBDebugger.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBDebugger.i; sourceTree = "<group>"; };
-		9452573916262D0200325455 /* SBDeclaration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBDeclaration.cpp; path = source/API/SBDeclaration.cpp; sourceTree = "<group>"; };
-		9452573816262CEF00325455 /* SBDeclaration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBDeclaration.h; path = include/lldb/API/SBDeclaration.h; sourceTree = "<group>"; };
-		9452573616262CD000325455 /* SBDeclaration.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBDeclaration.i; sourceTree = "<group>"; };
-		9A9830FC1125FC5800A56CB0 /* SBDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBDefines.h; path = include/lldb/API/SBDefines.h; sourceTree = "<group>"; };
-		2682F284115EF3A700CCFF99 /* SBError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBError.cpp; path = source/API/SBError.cpp; sourceTree = "<group>"; };
-		2682F286115EF3BD00CCFF99 /* SBError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBError.h; path = include/lldb/API/SBError.h; sourceTree = "<group>"; };
-		2611FEFA142D83060017FEA3 /* SBError.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBError.i; sourceTree = "<group>"; };
-		9A9830FD1125FC5800A56CB0 /* SBEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBEvent.cpp; path = source/API/SBEvent.cpp; sourceTree = "<group>"; };
-		9A9830FE1125FC5800A56CB0 /* SBEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBEvent.h; path = include/lldb/API/SBEvent.h; sourceTree = "<group>"; };
-		2611FEFB142D83060017FEA3 /* SBEvent.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBEvent.i; sourceTree = "<group>"; };
-		940B02F519DC96E700AD0F52 /* SBExecutionContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBExecutionContext.cpp; path = source/API/SBExecutionContext.cpp; sourceTree = "<group>"; };
-		940B02F419DC96CB00AD0F52 /* SBExecutionContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBExecutionContext.h; path = include/lldb/API/SBExecutionContext.h; sourceTree = "<group>"; };
-		940B02F719DC970900AD0F52 /* SBExecutionContext.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBExecutionContext.i; sourceTree = "<group>"; };
-		4CE4F674162C973F00F75CB3 /* SBExpressionOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBExpressionOptions.cpp; path = source/API/SBExpressionOptions.cpp; sourceTree = "<group>"; };
-		4CE4F672162C971A00F75CB3 /* SBExpressionOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBExpressionOptions.h; path = include/lldb/API/SBExpressionOptions.h; sourceTree = "<group>"; };
-		4CE4F676162CE1E100F75CB3 /* SBExpressionOptions.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBExpressionOptions.i; sourceTree = "<group>"; };
-		26022532115F281400A601A2 /* SBFileSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFileSpec.cpp; path = source/API/SBFileSpec.cpp; sourceTree = "<group>"; };
-		26022531115F27FA00A601A2 /* SBFileSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFileSpec.h; path = include/lldb/API/SBFileSpec.h; sourceTree = "<group>"; };
-		2611FEFC142D83060017FEA3 /* SBFileSpec.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBFileSpec.i; sourceTree = "<group>"; };
-		4CF52AF7142829390051E832 /* SBFileSpecList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFileSpecList.cpp; path = source/API/SBFileSpecList.cpp; sourceTree = "<group>"; };
-		4CF52AF41428291E0051E832 /* SBFileSpecList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFileSpecList.h; path = include/lldb/API/SBFileSpecList.h; sourceTree = "<group>"; };
-		2611FEFD142D83060017FEA3 /* SBFileSpecList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBFileSpecList.i; sourceTree = "<group>"; };
-		9A633FE7112DCE3C001A7E43 /* SBFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFrame.cpp; path = source/API/SBFrame.cpp; sourceTree = "<group>"; };
-		9A633FE8112DCE3C001A7E43 /* SBFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFrame.h; path = include/lldb/API/SBFrame.h; sourceTree = "<group>"; };
-		2611FEFE142D83060017FEA3 /* SBFrame.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBFrame.i; sourceTree = "<group>"; };
-		26DE205C1161901400A093E2 /* SBFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBFunction.cpp; path = source/API/SBFunction.cpp; sourceTree = "<group>"; };
-		26DE205211618FAC00A093E2 /* SBFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBFunction.h; path = include/lldb/API/SBFunction.h; sourceTree = "<group>"; };
-		2611FEFF142D83060017FEA3 /* SBFunction.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBFunction.i; sourceTree = "<group>"; };
-		9A3576A9116E9AC700E8ED2F /* SBHostOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBHostOS.cpp; path = source/API/SBHostOS.cpp; sourceTree = "<group>"; };
-		9A3576A7116E9AB700E8ED2F /* SBHostOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBHostOS.h; path = include/lldb/API/SBHostOS.h; sourceTree = "<group>"; };
-		2611FF00142D83060017FEA3 /* SBHostOS.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBHostOS.i; sourceTree = "<group>"; };
-		9AC703AE117675410086C050 /* SBInstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBInstruction.cpp; path = source/API/SBInstruction.cpp; sourceTree = "<group>"; };
-		9AC7038D117674EB0086C050 /* SBInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBInstruction.h; path = include/lldb/API/SBInstruction.h; sourceTree = "<group>"; };
-		2611FF02142D83060017FEA3 /* SBInstruction.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBInstruction.i; sourceTree = "<group>"; };
-		9AC703B0117675490086C050 /* SBInstructionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBInstructionList.cpp; path = source/API/SBInstructionList.cpp; sourceTree = "<group>"; };
-		9AC7038F117675270086C050 /* SBInstructionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBInstructionList.h; path = include/lldb/API/SBInstructionList.h; sourceTree = "<group>"; };
-		2611FF03142D83060017FEA3 /* SBInstructionList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBInstructionList.i; sourceTree = "<group>"; };
-		AF20F76C1AF18FC700751A6E /* SBLanguageRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBLanguageRuntime.cpp; path = source/API/SBLanguageRuntime.cpp; sourceTree = "<group>"; };
-		3392EBB71AFF402200858B9F /* SBLanguageRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBLanguageRuntime.h; path = include/lldb/API/SBLanguageRuntime.h; sourceTree = "<group>"; };
-		23DCBE971D63E14B0084C36B /* SBLanguageRuntime.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBLanguageRuntime.i; sourceTree = "<group>"; };
-		254FBB941A81AA7F00BD6378 /* SBLaunchInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBLaunchInfo.cpp; path = source/API/SBLaunchInfo.cpp; sourceTree = "<group>"; };
-		254FBB961A81B03100BD6378 /* SBLaunchInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBLaunchInfo.h; path = include/lldb/API/SBLaunchInfo.h; sourceTree = "<group>"; };
-		254FBB921A81AA5200BD6378 /* SBLaunchInfo.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBLaunchInfo.i; sourceTree = "<group>"; };
-		26DE20621161904200A093E2 /* SBLineEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBLineEntry.cpp; path = source/API/SBLineEntry.cpp; sourceTree = "<group>"; };
-		26DE205811618FE700A093E2 /* SBLineEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBLineEntry.h; path = include/lldb/API/SBLineEntry.h; sourceTree = "<group>"; };
-		2611FF04142D83060017FEA3 /* SBLineEntry.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBLineEntry.i; sourceTree = "<group>"; };
-		9A9831011125FC5800A56CB0 /* SBListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBListener.cpp; path = source/API/SBListener.cpp; sourceTree = "<group>"; };
-		9A9831021125FC5800A56CB0 /* SBListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBListener.h; path = include/lldb/API/SBListener.h; sourceTree = "<group>"; };
-		2611FF05142D83060017FEA3 /* SBListener.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBListener.i; sourceTree = "<group>"; };
-		23DCEA421D1C4C6900A602B4 /* SBMemoryRegionInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBMemoryRegionInfo.cpp; path = source/API/SBMemoryRegionInfo.cpp; sourceTree = "<group>"; };
-		264297531D1DF209003F2BF4 /* SBMemoryRegionInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBMemoryRegionInfo.h; path = include/lldb/API/SBMemoryRegionInfo.h; sourceTree = "<group>"; };
-		264297591D1DF2AA003F2BF4 /* SBMemoryRegionInfo.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBMemoryRegionInfo.i; sourceTree = "<group>"; };
-		23DCEA431D1C4C6900A602B4 /* SBMemoryRegionInfoList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBMemoryRegionInfoList.cpp; path = source/API/SBMemoryRegionInfoList.cpp; sourceTree = "<group>"; };
-		264297541D1DF209003F2BF4 /* SBMemoryRegionInfoList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBMemoryRegionInfoList.h; path = include/lldb/API/SBMemoryRegionInfoList.h; sourceTree = "<group>"; };
-		2642975A1D1DF2AA003F2BF4 /* SBMemoryRegionInfoList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBMemoryRegionInfoList.i; sourceTree = "<group>"; };
-		26DE204C11618E7A00A093E2 /* SBModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBModule.cpp; path = source/API/SBModule.cpp; sourceTree = "<group>"; };
-		26DE204E11618E9800A093E2 /* SBModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBModule.h; path = include/lldb/API/SBModule.h; sourceTree = "<group>"; };
-		2611FF06142D83060017FEA3 /* SBModule.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBModule.i; sourceTree = "<group>"; };
-		263C4937178B50C40070F12D /* SBModuleSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBModuleSpec.cpp; path = source/API/SBModuleSpec.cpp; sourceTree = "<group>"; };
-		263C4939178B50CF0070F12D /* SBModuleSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBModuleSpec.h; path = include/lldb/API/SBModuleSpec.h; sourceTree = "<group>"; };
-		263C493B178B61CC0070F12D /* SBModuleSpec.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBModuleSpec.i; sourceTree = "<group>"; };
-		262F12B41835468600AEB384 /* SBPlatform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBPlatform.cpp; path = source/API/SBPlatform.cpp; sourceTree = "<group>"; };
-		262F12B61835469C00AEB384 /* SBPlatform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBPlatform.h; path = include/lldb/API/SBPlatform.h; sourceTree = "<group>"; };
-		262F12B8183546C900AEB384 /* SBPlatform.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBPlatform.i; sourceTree = "<group>"; };
-		9A9831031125FC5800A56CB0 /* SBProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBProcess.cpp; path = source/API/SBProcess.cpp; sourceTree = "<group>"; };
-		9A9831041125FC5800A56CB0 /* SBProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBProcess.h; path = include/lldb/API/SBProcess.h; sourceTree = "<group>"; };
-		2611FF07142D83060017FEA3 /* SBProcess.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBProcess.i; sourceTree = "<group>"; };
-		4987FB1E1F30EC7E00E5C17D /* SBProcessInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBProcessInfo.cpp; path = source/API/SBProcessInfo.cpp; sourceTree = "<group>"; };
-		4987FB201F30EC9900E5C17D /* SBProcessInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBProcessInfo.h; path = include/lldb/API/SBProcessInfo.h; sourceTree = "<group>"; };
-		4987FB1C1F30EC6000E5C17D /* SBProcessInfo.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBProcessInfo.i; sourceTree = "<group>"; };
-		AF0EBBE6185940FB0059E52F /* SBQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBQueue.cpp; path = source/API/SBQueue.cpp; sourceTree = "<group>"; };
-		AF0EBBEA185941360059E52F /* SBQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBQueue.h; path = include/lldb/API/SBQueue.h; sourceTree = "<group>"; };
-		AF0EBBEE1859419F0059E52F /* SBQueue.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBQueue.i; sourceTree = "<group>"; };
-		AF0EBBE7185940FB0059E52F /* SBQueueItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBQueueItem.cpp; path = source/API/SBQueueItem.cpp; sourceTree = "<group>"; };
-		AF0EBBEB185941360059E52F /* SBQueueItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBQueueItem.h; path = include/lldb/API/SBQueueItem.h; sourceTree = "<group>"; };
-		AF0EBBEF1859419F0059E52F /* SBQueueItem.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBQueueItem.i; sourceTree = "<group>"; };
-		DD1E0AC9220B660100B815F8 /* SBReproducer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBReproducer.cpp; path = source/API/SBReproducer.cpp; sourceTree = "<group>"; };
-		DD1E0AD0220BC3D400B815F8 /* SBReproducer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBReproducer.h; path = include/lldb/API/SBReproducer.h; sourceTree = "<group>"; };
-		DD1E0ACB220B660E00B815F8 /* SBReproducerPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBReproducerPrivate.h; path = source/API/SBReproducerPrivate.h; sourceTree = "<group>"; };
-		26B8283F142D020F002DBC64 /* SBSection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSection.cpp; path = source/API/SBSection.cpp; sourceTree = "<group>"; };
-		26B8283C142D01E9002DBC64 /* SBSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSection.h; path = include/lldb/API/SBSection.h; sourceTree = "<group>"; };
-		2611FF08142D83060017FEA3 /* SBSection.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSection.i; sourceTree = "<group>"; };
-		9A9831051125FC5800A56CB0 /* SBSourceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSourceManager.cpp; path = source/API/SBSourceManager.cpp; sourceTree = "<group>"; };
-		9A9831061125FC5800A56CB0 /* SBSourceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSourceManager.h; path = include/lldb/API/SBSourceManager.h; sourceTree = "<group>"; };
-		2611FF09142D83060017FEA3 /* SBSourceManager.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSourceManager.i; sourceTree = "<group>"; };
-		26C72C951243229A0068DC16 /* SBStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBStream.cpp; path = source/API/SBStream.cpp; sourceTree = "<group>"; };
-		26C72C93124322890068DC16 /* SBStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBStream.h; path = include/lldb/API/SBStream.h; sourceTree = "<group>"; };
-		2611FF0A142D83060017FEA3 /* SBStream.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBStream.i; sourceTree = "<group>"; };
-		9A357672116E7B6400E8ED2F /* SBStringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBStringList.cpp; path = source/API/SBStringList.cpp; sourceTree = "<group>"; };
-		9A357670116E7B5200E8ED2F /* SBStringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBStringList.h; path = include/lldb/API/SBStringList.h; sourceTree = "<group>"; };
-		2611FF0B142D83060017FEA3 /* SBStringList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBStringList.i; sourceTree = "<group>"; };
-		23DCBEA01D63E6440084C36B /* SBStructuredData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBStructuredData.cpp; path = source/API/SBStructuredData.cpp; sourceTree = "<group>"; };
-		23DCBE9F1D63E3800084C36B /* SBStructuredData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBStructuredData.h; path = include/lldb/API/SBStructuredData.h; sourceTree = "<group>"; };
-		23DCBE981D63E14B0084C36B /* SBStructuredData.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBStructuredData.i; sourceTree = "<group>"; };
-		26DE20641161904E00A093E2 /* SBSymbol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSymbol.cpp; path = source/API/SBSymbol.cpp; sourceTree = "<group>"; };
-		26DE205A11618FF600A093E2 /* SBSymbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSymbol.h; path = include/lldb/API/SBSymbol.h; sourceTree = "<group>"; };
-		2611FF0C142D83060017FEA3 /* SBSymbol.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSymbol.i; sourceTree = "<group>"; };
-		26DE204611618AED00A093E2 /* SBSymbolContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSymbolContext.cpp; path = source/API/SBSymbolContext.cpp; sourceTree = "<group>"; };
-		26DE204011618AB900A093E2 /* SBSymbolContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSymbolContext.h; path = include/lldb/API/SBSymbolContext.h; sourceTree = "<group>"; };
-		2611FF0D142D83060017FEA3 /* SBSymbolContext.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSymbolContext.i; sourceTree = "<group>"; };
-		268F9D54123AA16600B91E9B /* SBSymbolContextList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBSymbolContextList.cpp; path = source/API/SBSymbolContextList.cpp; sourceTree = "<group>"; };
-		268F9D52123AA15200B91E9B /* SBSymbolContextList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBSymbolContextList.h; path = include/lldb/API/SBSymbolContextList.h; sourceTree = "<group>"; };
-		2611FF0E142D83060017FEA3 /* SBSymbolContextList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBSymbolContextList.i; sourceTree = "<group>"; };
-		9A9831071125FC5800A56CB0 /* SBTarget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; lineEnding = 0; name = SBTarget.cpp; path = source/API/SBTarget.cpp; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.cpp; };
-		9A9831081125FC5800A56CB0 /* SBTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBTarget.h; path = include/lldb/API/SBTarget.h; sourceTree = "<group>"; };
-		2611FF0F142D83060017FEA3 /* SBTarget.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTarget.i; sourceTree = "<group>"; };
-		9A9831091125FC5800A56CB0 /* SBThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBThread.cpp; path = source/API/SBThread.cpp; sourceTree = "<group>"; };
-		9A98310A1125FC5800A56CB0 /* SBThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBThread.h; path = include/lldb/API/SBThread.h; sourceTree = "<group>"; };
-		2611FF10142D83060017FEA3 /* SBThread.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBThread.i; sourceTree = "<group>"; };
-		8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SBThreadCollection.cpp; path = source/API/SBThreadCollection.cpp; sourceTree = "<group>"; };
-		8CCB018119BA4E210009FD44 /* SBThreadCollection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBThreadCollection.h; path = include/lldb/API/SBThreadCollection.h; sourceTree = "<group>"; };
-		8CCB018419BA54930009FD44 /* SBThreadCollection.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBThreadCollection.i; sourceTree = "<group>"; };
-		4C56543619D22B32002E9C44 /* SBThreadPlan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBThreadPlan.cpp; path = source/API/SBThreadPlan.cpp; sourceTree = "<group>"; };
-		4C56543419D2297A002E9C44 /* SBThreadPlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBThreadPlan.h; path = include/lldb/API/SBThreadPlan.h; sourceTree = "<group>"; };
-		4C56543819D22FD9002E9C44 /* SBThreadPlan.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBThreadPlan.i; sourceTree = "<group>"; };
-		9A1E59521EB2B0B9002206A5 /* SBTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTrace.cpp; path = source/API/SBTrace.cpp; sourceTree = "<group>"; };
-		9A1E59581EB2B10D002206A5 /* SBTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBTrace.h; path = include/lldb/API/SBTrace.h; sourceTree = "<group>"; };
-		9A1E59531EB2B0B9002206A5 /* SBTraceOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTraceOptions.cpp; path = source/API/SBTraceOptions.cpp; sourceTree = "<group>"; };
-		9A1E59591EB2B10D002206A5 /* SBTraceOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBTraceOptions.h; path = include/lldb/API/SBTraceOptions.h; sourceTree = "<group>"; };
-		261744771168585B005ADD65 /* SBType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBType.cpp; path = source/API/SBType.cpp; sourceTree = "<group>"; };
-		2617447911685869005ADD65 /* SBType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBType.h; path = include/lldb/API/SBType.h; sourceTree = "<group>"; };
-		2611FF11142D83060017FEA3 /* SBType.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBType.i; sourceTree = "<group>"; };
-		9475C18714E5E9FA001BFC6D /* SBTypeCategory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeCategory.cpp; path = source/API/SBTypeCategory.cpp; sourceTree = "<group>"; };
-		9475C18514E5E9C5001BFC6D /* SBTypeCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeCategory.h; path = include/lldb/API/SBTypeCategory.h; sourceTree = "<group>"; };
-		9475C18A14E5EA1C001BFC6D /* SBTypeCategory.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeCategory.i; sourceTree = "<group>"; };
-		23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeEnumMember.cpp; path = source/API/SBTypeEnumMember.cpp; sourceTree = "<group>"; };
-		23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeEnumMember.h; path = include/lldb/API/SBTypeEnumMember.h; sourceTree = "<group>"; };
-		23DCBE991D63E14B0084C36B /* SBTypeEnumMember.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeEnumMember.i; sourceTree = "<group>"; };
-		9461568A14E35621003A195C /* SBTypeFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeFilter.cpp; path = source/API/SBTypeFilter.cpp; sourceTree = "<group>"; };
-		9461568614E355F2003A195C /* SBTypeFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeFilter.h; path = include/lldb/API/SBTypeFilter.h; sourceTree = "<group>"; };
-		9461569214E3567F003A195C /* SBTypeFilter.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeFilter.i; sourceTree = "<group>"; };
-		9461568B14E35621003A195C /* SBTypeFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeFormat.cpp; path = source/API/SBTypeFormat.cpp; sourceTree = "<group>"; };
-		9461568714E355F2003A195C /* SBTypeFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeFormat.h; path = include/lldb/API/SBTypeFormat.h; sourceTree = "<group>"; };
-		9461569314E3567F003A195C /* SBTypeFormat.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeFormat.i; sourceTree = "<group>"; };
-		9475C18D14E5F834001BFC6D /* SBTypeNameSpecifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeNameSpecifier.cpp; path = source/API/SBTypeNameSpecifier.cpp; sourceTree = "<group>"; };
-		9475C18C14E5F826001BFC6D /* SBTypeNameSpecifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeNameSpecifier.h; path = include/lldb/API/SBTypeNameSpecifier.h; sourceTree = "<group>"; };
-		9475C18B14E5F818001BFC6D /* SBTypeNameSpecifier.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeNameSpecifier.i; sourceTree = "<group>"; };
-		9461568C14E35621003A195C /* SBTypeSummary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeSummary.cpp; path = source/API/SBTypeSummary.cpp; sourceTree = "<group>"; };
-		9461568814E355F2003A195C /* SBTypeSummary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeSummary.h; path = include/lldb/API/SBTypeSummary.h; sourceTree = "<group>"; };
-		9461569414E3567F003A195C /* SBTypeSummary.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeSummary.i; sourceTree = "<group>"; };
-		9461568D14E35621003A195C /* SBTypeSynthetic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBTypeSynthetic.cpp; path = source/API/SBTypeSynthetic.cpp; sourceTree = "<group>"; };
-		9461568914E355F2003A195C /* SBTypeSynthetic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBTypeSynthetic.h; path = include/lldb/API/SBTypeSynthetic.h; sourceTree = "<group>"; };
-		9461569514E3567F003A195C /* SBTypeSynthetic.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBTypeSynthetic.i; sourceTree = "<group>"; };
-		23059A0F1958B319007B8189 /* SBUnixSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBUnixSignals.cpp; path = source/API/SBUnixSignals.cpp; sourceTree = "<group>"; };
-		23059A111958B37B007B8189 /* SBUnixSignals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBUnixSignals.h; path = include/lldb/API/SBUnixSignals.h; sourceTree = "<group>"; };
-		23DCBE9A1D63E14B0084C36B /* SBUnixSignals.i */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBUnixSignals.i; sourceTree = "<group>"; };
-		9A19A6AD1163BB9800E0D453 /* SBValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBValue.cpp; path = source/API/SBValue.cpp; sourceTree = "<group>"; };
-		9A19A6A51163BB7E00E0D453 /* SBValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBValue.h; path = include/lldb/API/SBValue.h; sourceTree = "<group>"; };
-		2611FF12142D83060017FEA3 /* SBValue.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBValue.i; sourceTree = "<group>"; };
-		9A35758D116CFE0F00E8ED2F /* SBValueList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBValueList.cpp; path = source/API/SBValueList.cpp; sourceTree = "<group>"; };
-		9A357582116CFDEE00E8ED2F /* SBValueList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBValueList.h; path = include/lldb/API/SBValueList.h; sourceTree = "<group>"; };
-		2611FF13142D83060017FEA3 /* SBValueList.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBValueList.i; sourceTree = "<group>"; };
-		94235B9B1A8D5FF300EB2EED /* SBVariablesOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBVariablesOptions.cpp; path = source/API/SBVariablesOptions.cpp; sourceTree = "<group>"; };
-		94235B9A1A8D5FD800EB2EED /* SBVariablesOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SBVariablesOptions.h; path = include/lldb/API/SBVariablesOptions.h; sourceTree = "<group>"; };
-		94235B9D1A8D601A00EB2EED /* SBVariablesOptions.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBVariablesOptions.i; sourceTree = "<group>"; };
-		B2A58723143119D50092BFBA /* SBWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SBWatchpoint.cpp; path = source/API/SBWatchpoint.cpp; sourceTree = "<group>"; };
-		B2A58721143119810092BFBA /* SBWatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SBWatchpoint.h; path = include/lldb/API/SBWatchpoint.h; sourceTree = "<group>"; };
-		B2A5872514313B480092BFBA /* SBWatchpoint.i */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; path = SBWatchpoint.i; sourceTree = "<group>"; };
-		26BC7D7810F1B77400F91463 /* STLUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = STLUtils.h; path = include/lldb/Core/STLUtils.h; sourceTree = "<group>"; };
-		26BC7E8D10F1B85900F91463 /* Scalar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scalar.cpp; path = source/Utility/Scalar.cpp; sourceTree = "<group>"; };
-		26BC7D7410F1B77400F91463 /* Scalar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scalar.h; path = include/lldb/Utility/Scalar.h; sourceTree = "<group>"; };
-		23CB14E91D66CC0E00EDDDE1 /* ScalarTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScalarTest.cpp; sourceTree = "<group>"; };
-		9A82010B10FFB49800182560 /* ScriptInterpreter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScriptInterpreter.cpp; path = source/Interpreter/ScriptInterpreter.cpp; sourceTree = "<group>"; };
-		26BC7DE510F1B7F900F91463 /* ScriptInterpreter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScriptInterpreter.h; path = include/lldb/Interpreter/ScriptInterpreter.h; sourceTree = "<group>"; };
-		3FBA69DD1B6067020008F44A /* ScriptInterpreterNone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScriptInterpreterNone.cpp; path = ScriptInterpreter/None/ScriptInterpreterNone.cpp; sourceTree = "<group>"; };
-		3FBA69DE1B6067020008F44A /* ScriptInterpreterNone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScriptInterpreterNone.h; path = ScriptInterpreter/None/ScriptInterpreterNone.h; sourceTree = "<group>"; };
-		3FBA69E51B60672A0008F44A /* ScriptInterpreterPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScriptInterpreterPython.cpp; path = ScriptInterpreter/Python/ScriptInterpreterPython.cpp; sourceTree = "<group>"; };
-		3FBA69E61B60672A0008F44A /* ScriptInterpreterPython.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScriptInterpreterPython.h; path = ScriptInterpreter/Python/ScriptInterpreterPython.h; sourceTree = "<group>"; };
-		26BC7E1510F1B83100F91463 /* SearchFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchFilter.cpp; path = source/Core/SearchFilter.cpp; sourceTree = "<group>"; };
-		26BC7CF910F1B71400F91463 /* SearchFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchFilter.h; path = include/lldb/Core/SearchFilter.h; sourceTree = "<group>"; };
-		26BC7E8E10F1B85900F91463 /* Section.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Section.cpp; path = source/Core/Section.cpp; sourceTree = "<group>"; };
-		26BC7D7510F1B77400F91463 /* Section.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Section.h; path = include/lldb/Core/Section.h; sourceTree = "<group>"; };
-		262173A218395D4600C52091 /* SectionLoadHistory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SectionLoadHistory.cpp; path = source/Target/SectionLoadHistory.cpp; sourceTree = "<group>"; };
-		262173A018395D3800C52091 /* SectionLoadHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SectionLoadHistory.h; path = include/lldb/Target/SectionLoadHistory.h; sourceTree = "<group>"; };
-		2618D7911240116900F2B8FE /* SectionLoadList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SectionLoadList.cpp; path = source/Target/SectionLoadList.cpp; sourceTree = "<group>"; };
-		2618D78F1240115500F2B8FE /* SectionLoadList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SectionLoadList.h; path = include/lldb/Target/SectionLoadList.h; sourceTree = "<group>"; };
-		EDB919B414F6F10D008FF64B /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
-		26A3757F1D59462700D6CBDB /* SelectHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SelectHelper.cpp; path = source/Utility/SelectHelper.cpp; sourceTree = "<group>"; };
-		26A375841D59487700D6CBDB /* SelectHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SelectHelper.h; path = include/lldb/Utility/SelectHelper.h; sourceTree = "<group>"; };
-		4C2FAE2E135E3A70001EDE44 /* SharedCluster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharedCluster.h; path = include/lldb/Utility/SharedCluster.h; sourceTree = "<group>"; };
-		261B5A5211C3F2AD00AABD0A /* SharingPtr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SharingPtr.cpp; path = source/Utility/SharingPtr.cpp; sourceTree = "<group>"; };
-		261B5A5311C3F2AD00AABD0A /* SharingPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SharingPtr.h; path = include/lldb/Utility/SharingPtr.h; sourceTree = "<group>"; };
-		236124A31986B4E2004EFC37 /* Socket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Socket.cpp; sourceTree = "<group>"; };
-		236124A71986B50E004EFC37 /* Socket.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Socket.h; path = include/lldb/Host/Socket.h; sourceTree = "<group>"; };
-		26D7E45C13D5E30A007FD12B /* SocketAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SocketAddress.cpp; path = source/Host/common/SocketAddress.cpp; sourceTree = "<group>"; };
-		26D7E45B13D5E2F9007FD12B /* SocketAddress.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SocketAddress.h; path = include/lldb/Host/SocketAddress.h; sourceTree = "<group>"; };
-		2321F9391BDD332400BA9A93 /* SocketAddressTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SocketAddressTest.cpp; sourceTree = "<group>"; };
-		2321F93A1BDD332400BA9A93 /* SocketTest.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SocketTest.cpp; sourceTree = "<group>"; };
-		26FCE61B229F00F000D125BD /* SocketTestUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SocketTestUtilities.cpp; sourceTree = "<group>"; };
-		26603870211CA90D00329572 /* SourceBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourceBreakpoint.cpp; path = "tools/lldb-vscode/SourceBreakpoint.cpp"; sourceTree = "<group>"; };
-		2660386D211CA90C00329572 /* SourceBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceBreakpoint.h; path = "tools/lldb-vscode/SourceBreakpoint.h"; sourceTree = "<group>"; };
-		26BC7E8F10F1B85900F91463 /* SourceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourceManager.cpp; path = source/Core/SourceManager.cpp; sourceTree = "<group>"; };
-		26BC7D7610F1B77400F91463 /* SourceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceManager.h; path = include/lldb/Core/SourceManager.h; sourceTree = "<group>"; };
-		26F76198211CB8870044F6EA /* SourceReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceReference.h; path = "tools/lldb-vscode/SourceReference.h"; sourceTree = "<group>"; };
-		26BC7F3810F1B90C00F91463 /* StackFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StackFrame.cpp; path = source/Target/StackFrame.cpp; sourceTree = "<group>"; };
-		26BC7DF510F1B81A00F91463 /* StackFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackFrame.h; path = include/lldb/Target/StackFrame.h; sourceTree = "<group>"; };
-		26BC7F3910F1B90C00F91463 /* StackFrameList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StackFrameList.cpp; path = source/Target/StackFrameList.cpp; sourceTree = "<group>"; };
-		26BC7DF610F1B81A00F91463 /* StackFrameList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackFrameList.h; path = include/lldb/Target/StackFrameList.h; sourceTree = "<group>"; };
-		8CF46A6120522A9000423DDF /* StackFrameRecognizer.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = StackFrameRecognizer.cpp; path = source/Target/StackFrameRecognizer.cpp; sourceTree = "<group>"; };
-		8CFDB67920467B390052B399 /* StackFrameRecognizer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StackFrameRecognizer.h; path = include/lldb/Target/StackFrameRecognizer.h; sourceTree = "<group>"; };
-		26BC7F3A10F1B90C00F91463 /* StackID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StackID.cpp; path = source/Target/StackID.cpp; sourceTree = "<group>"; };
-		26BC7DF710F1B81A00F91463 /* StackID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackID.h; path = include/lldb/Target/StackID.h; sourceTree = "<group>"; };
-		26BC7E9010F1B85900F91463 /* State.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = State.cpp; path = source/Utility/State.cpp; sourceTree = "<group>"; };
-		26BC7D7710F1B77400F91463 /* State.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = State.h; path = include/lldb/Utility/State.h; sourceTree = "<group>"; };
-		9A3D43E21F3237D500EB767C /* StateTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StateTest.cpp; sourceTree = "<group>"; };
-		492DB7E81EC662D100B9E9AF /* Status.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Status.cpp; path = source/Utility/Status.cpp; sourceTree = "<group>"; };
-		492DB7E61EC662B100B9E9AF /* Status.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Status.h; path = include/lldb/Utility/Status.h; sourceTree = "<group>"; };
-		9A3D43C61F3150D200EB767C /* StatusTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StatusTest.cpp; sourceTree = "<group>"; };
-		2615DB861208A9E40021781D /* StopInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StopInfo.cpp; path = source/Target/StopInfo.cpp; sourceTree = "<group>"; };
-		2615DB841208A9C90021781D /* StopInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StopInfo.h; path = include/lldb/Target/StopInfo.h; sourceTree = "<group>"; };
-		2615DBC81208B5FC0021781D /* StopInfoMachException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StopInfoMachException.cpp; path = Utility/StopInfoMachException.cpp; sourceTree = "<group>"; };
-		2615DBC91208B5FC0021781D /* StopInfoMachException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StopInfoMachException.h; path = Utility/StopInfoMachException.h; sourceTree = "<group>"; };
-		26BC7E1610F1B83100F91463 /* Stoppoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Stoppoint.cpp; path = source/Breakpoint/Stoppoint.cpp; sourceTree = "<group>"; };
-		26BC7CFA10F1B71400F91463 /* Stoppoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Stoppoint.h; path = include/lldb/Breakpoint/Stoppoint.h; sourceTree = "<group>"; };
-		26BC7E0910F1B83100F91463 /* StoppointCallbackContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StoppointCallbackContext.cpp; path = source/Breakpoint/StoppointCallbackContext.cpp; sourceTree = "<group>"; };
-		26BC7CED10F1B71400F91463 /* StoppointCallbackContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StoppointCallbackContext.h; path = include/lldb/Breakpoint/StoppointCallbackContext.h; sourceTree = "<group>"; };
-		26BC7E1710F1B83100F91463 /* StoppointLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StoppointLocation.cpp; path = source/Breakpoint/StoppointLocation.cpp; sourceTree = "<group>"; };
-		26BC7CFB10F1B71400F91463 /* StoppointLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StoppointLocation.h; path = include/lldb/Breakpoint/StoppointLocation.h; sourceTree = "<group>"; };
-		26764C9D1E48F51E008D3573 /* Stream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Stream.cpp; path = source/Utility/Stream.cpp; sourceTree = "<group>"; };
-		26764C9B1E48F50C008D3573 /* Stream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Stream.h; path = include/lldb/Utility/Stream.h; sourceTree = "<group>"; };
-		9A4F350F1368A51A00823F52 /* StreamAsynchronousIO.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamAsynchronousIO.cpp; path = source/Core/StreamAsynchronousIO.cpp; sourceTree = "<group>"; };
-		9A4F35111368A54100823F52 /* StreamAsynchronousIO.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StreamAsynchronousIO.h; path = include/lldb/Core/StreamAsynchronousIO.h; sourceTree = "<group>"; };
-		2623096E13D0EFFB006381D9 /* StreamBuffer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamBuffer.h; path = include/lldb/Core/StreamBuffer.h; sourceTree = "<group>"; };
-		AFC2DCF51E6E316A00283714 /* StreamCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamCallback.cpp; path = source/Utility/StreamCallback.cpp; sourceTree = "<group>"; };
-		AFC2DCF71E6E316F00283714 /* StreamCallback.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamCallback.h; path = include/lldb/Utility/StreamCallback.h; sourceTree = "<group>"; };
-		9A3D43E11F3237D500EB767C /* StreamCallbackTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StreamCallbackTest.cpp; sourceTree = "<group>"; };
-		26BC7E9210F1B85900F91463 /* StreamFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamFile.cpp; path = source/Core/StreamFile.cpp; sourceTree = "<group>"; };
-		26BC7D7A10F1B77400F91463 /* StreamFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StreamFile.h; path = include/lldb/Core/StreamFile.h; sourceTree = "<group>"; };
-		AFC2DCF81E6E318000283714 /* StreamGDBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamGDBRemote.cpp; path = source/Utility/StreamGDBRemote.cpp; sourceTree = "<group>"; };
-		AFC2DCFA1E6E318600283714 /* StreamGDBRemote.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamGDBRemote.h; path = include/lldb/Utility/StreamGDBRemote.h; sourceTree = "<group>"; };
-		26764CA11E48F547008D3573 /* StreamString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StreamString.cpp; path = source/Utility/StreamString.cpp; sourceTree = "<group>"; };
-		26764CA31E48F550008D3573 /* StreamString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamString.h; path = include/lldb/Utility/StreamString.h; sourceTree = "<group>"; };
-		26764CA41E48F566008D3573 /* StreamTee.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StreamTee.h; path = include/lldb/Utility/StreamTee.h; sourceTree = "<group>"; };
-		58EAC73D2106A0740029571E /* StreamTeeTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StreamTeeTest.cpp; sourceTree = "<group>"; };
-		4C639EBF21FA684700A7B957 /* StreamTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StreamTest.cpp; sourceTree = "<group>"; };
-		33E5E8411A672A240024ED68 /* StringConvert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringConvert.cpp; sourceTree = "<group>"; };
-		33E5E8451A6736D30024ED68 /* StringConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringConvert.h; path = include/lldb/Host/StringConvert.h; sourceTree = SOURCE_ROOT; };
-		2660D9F611922A1300958FBD /* StringExtractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringExtractor.cpp; path = source/Utility/StringExtractor.cpp; sourceTree = "<group>"; };
-		26A375831D59486000D6CBDB /* StringExtractor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StringExtractor.h; path = include/lldb/Utility/StringExtractor.h; sourceTree = "<group>"; };
-		2676A093119C93C8008A98EF /* StringExtractorGDBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringExtractorGDBRemote.cpp; path = source/Utility/StringExtractorGDBRemote.cpp; sourceTree = "<group>"; };
-		2676A094119C93C8008A98EF /* StringExtractorGDBRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringExtractorGDBRemote.h; path = include/lldb/Utility/StringExtractorGDBRemote.h; sourceTree = "<group>"; };
-		2321F9441BDD346100BA9A93 /* StringExtractorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringExtractorTest.cpp; sourceTree = "<group>"; };
-		94380B8119940B0A00BFE4A8 /* StringLexer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringLexer.cpp; path = source/Utility/StringLexer.cpp; sourceTree = "<group>"; };
-		94380B8019940B0300BFE4A8 /* StringLexer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StringLexer.h; path = include/lldb/Utility/StringLexer.h; sourceTree = "<group>"; };
-		4C639EC621FA684800A7B957 /* StringLexerTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringLexerTest.cpp; sourceTree = "<group>"; };
-		9A35765F116E76B900E8ED2F /* StringList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringList.cpp; path = source/Utility/StringList.cpp; sourceTree = "<group>"; };
-		9A35765E116E76A700E8ED2F /* StringList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringList.h; path = include/lldb/Utility/StringList.h; sourceTree = "<group>"; };
-		4C639EBE21FA684600A7B957 /* StringListTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StringListTest.cpp; sourceTree = "<group>"; };
-		94F48F241A01C687005C0EC6 /* StringPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StringPrinter.cpp; path = source/DataFormatters/StringPrinter.cpp; sourceTree = "<group>"; };
-		94F48F231A01C679005C0EC6 /* StringPrinter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StringPrinter.h; path = include/lldb/DataFormatters/StringPrinter.h; sourceTree = "<group>"; };
-		9A3D43DF1F31521200EB767C /* StructuredData-basic.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "StructuredData-basic.json"; sourceTree = "<group>"; };
-		AFEC3361194A8ABA00FF05C6 /* StructuredData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StructuredData.cpp; path = source/Utility/StructuredData.cpp; sourceTree = "<group>"; };
-		26F2F8FD1B156678007857DE /* StructuredData.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StructuredData.h; path = include/lldb/Utility/StructuredData.h; sourceTree = "<group>"; };
-		238F2BA61D2C85FA001FF92A /* StructuredDataDarwinLog.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructuredDataDarwinLog.cpp; sourceTree = "<group>"; };
-		238F2BA71D2C85FA001FF92A /* StructuredDataDarwinLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructuredDataDarwinLog.h; sourceTree = "<group>"; };
-		238F2B9D1D2C82D0001FF92A /* StructuredDataPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StructuredDataPlugin.cpp; path = source/Target/StructuredDataPlugin.cpp; sourceTree = "<group>"; };
-		238F2B9F1D2C835A001FF92A /* StructuredDataPlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StructuredDataPlugin.h; path = include/lldb/Target/StructuredDataPlugin.h; sourceTree = "<group>"; };
-		9A3D43CA1F3150D200EB767C /* StructuredDataTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructuredDataTest.cpp; sourceTree = "<group>"; };
-		9A20573D1F3B8EA200F6C293 /* SupportTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SupportTest.cpp; path = linux/SupportTest.cpp; sourceTree = "<group>"; };
-		26BC7F1B10F1B8EC00F91463 /* Symbol.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Symbol.cpp; path = source/Symbol/Symbol.cpp; sourceTree = "<group>"; };
-		26BC7C5F10F1B6E900F91463 /* Symbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Symbol.h; path = include/lldb/Symbol/Symbol.h; sourceTree = "<group>"; };
-		26BC7F1C10F1B8EC00F91463 /* SymbolContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolContext.cpp; path = source/Symbol/SymbolContext.cpp; sourceTree = "<group>"; };
-		26BC7C6010F1B6E900F91463 /* SymbolContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolContext.h; path = include/lldb/Symbol/SymbolContext.h; sourceTree = "<group>"; };
-		26BC7C6110F1B6E900F91463 /* SymbolContextScope.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolContextScope.h; path = include/lldb/Symbol/SymbolContextScope.h; sourceTree = "<group>"; };
-		26BC7F1D10F1B8EC00F91463 /* SymbolFile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolFile.cpp; path = source/Symbol/SymbolFile.cpp; sourceTree = "<group>"; };
-		26BC7C6210F1B6E900F91463 /* SymbolFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolFile.h; path = include/lldb/Symbol/SymbolFile.h; sourceTree = "<group>"; };
-		AF97744621E9947B006876A7 /* SymbolFileBreakpad.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolFileBreakpad.cpp; path = source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp; sourceTree = SOURCE_ROOT; };
-		AF97744521E9947B006876A7 /* SymbolFileBreakpad.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SymbolFileBreakpad.h; path = source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h; sourceTree = SOURCE_ROOT; };
-		260C89D910F57C5600BB2B04 /* SymbolFileDWARF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileDWARF.cpp; sourceTree = "<group>"; };
-		260C89DA10F57C5600BB2B04 /* SymbolFileDWARF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileDWARF.h; sourceTree = "<group>"; };
-		260C89DB10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileDWARFDebugMap.cpp; sourceTree = "<group>"; };
-		260C89DC10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileDWARFDebugMap.h; sourceTree = "<group>"; };
-		6D95DBFF1B9DC057000E318A /* SymbolFileDWARFDwo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileDWARFDwo.cpp; sourceTree = "<group>"; };
-		6D95DC041B9DC06F000E318A /* SymbolFileDWARFDwo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileDWARFDwo.h; sourceTree = "<group>"; };
-		4C7D481F1F509964005314B4 /* SymbolFileDWARFDwoDwp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileDWARFDwoDwp.cpp; sourceTree = "<group>"; };
-		4C7D481D1F509964005314B4 /* SymbolFileDWARFDwoDwp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileDWARFDwoDwp.h; sourceTree = "<group>"; };
-		4C7D481C1F509963005314B4 /* SymbolFileDWARFDwp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileDWARFDwp.cpp; sourceTree = "<group>"; };
-		4C7D481E1F509964005314B4 /* SymbolFileDWARFDwp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileDWARFDwp.h; sourceTree = "<group>"; };
-		9A20570A1F3B81F300F6C293 /* SymbolFileDWARFTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolFileDWARFTests.cpp; path = DWARF/SymbolFileDWARFTests.cpp; sourceTree = "<group>"; };
-		AFD966B7217140B6006714AC /* SymbolFileNativePDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolFileNativePDB.cpp; path = source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp; sourceTree = SOURCE_ROOT; };
-		AFD966C0217140C8006714AC /* SymbolFileNativePDB.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SymbolFileNativePDB.h; path = source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h; sourceTree = SOURCE_ROOT; };
-		AF6335E01C87B21E00F7D554 /* SymbolFilePDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolFilePDB.cpp; path = PDB/SymbolFilePDB.cpp; sourceTree = "<group>"; };
-		AF6335E11C87B21E00F7D554 /* SymbolFilePDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolFilePDB.h; path = PDB/SymbolFilePDB.h; sourceTree = "<group>"; };
-		23CB15141D66CF8700EDDDE1 /* SymbolFilePDBTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFilePDBTests.cpp; sourceTree = "<group>"; };
-		260C89DE10F57C5600BB2B04 /* SymbolFileSymtab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolFileSymtab.cpp; sourceTree = "<group>"; };
-		260C89DF10F57C5600BB2B04 /* SymbolFileSymtab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolFileSymtab.h; sourceTree = "<group>"; };
-		AF94005711C03F6500085DB9 /* SymbolVendor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SymbolVendor.cpp; path = source/Symbol/SymbolVendor.cpp; sourceTree = "<group>"; };
-		26BC7C6310F1B6E900F91463 /* SymbolVendor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SymbolVendor.h; path = include/lldb/Symbol/SymbolVendor.h; sourceTree = "<group>"; };
-		2635879017822E56004C30BA /* SymbolVendorELF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolVendorELF.cpp; sourceTree = "<group>"; };
-		2635879117822E56004C30BA /* SymbolVendorELF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolVendorELF.h; sourceTree = "<group>"; };
-		260C89E210F57C5600BB2B04 /* SymbolVendorMacOSX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolVendorMacOSX.cpp; sourceTree = "<group>"; };
-		260C89E310F57C5600BB2B04 /* SymbolVendorMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolVendorMacOSX.h; sourceTree = "<group>"; };
-		2689B0A4113EE3CD00A4AEDB /* Symbols.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Symbols.h; path = include/lldb/Host/Symbols.h; sourceTree = "<group>"; };
-		26BC7F1F10F1B8EC00F91463 /* Symtab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Symtab.cpp; path = source/Symbol/Symtab.cpp; sourceTree = "<group>"; };
-		26BC7C6410F1B6E900F91463 /* Symtab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Symtab.h; path = include/lldb/Symbol/Symtab.h; sourceTree = "<group>"; };
-		3F81692E1ABB7A6D001DA9DF /* SystemInitializer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemInitializer.cpp; path = source/Initialization/SystemInitializer.cpp; sourceTree = "<group>"; };
-		3F8169341ABB7A80001DA9DF /* SystemInitializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SystemInitializer.h; path = include/lldb/Initialization/SystemInitializer.h; sourceTree = "<group>"; };
-		3F81692F1ABB7A6D001DA9DF /* SystemInitializerCommon.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemInitializerCommon.cpp; path = source/Initialization/SystemInitializerCommon.cpp; sourceTree = "<group>"; };
-		3F8169351ABB7A80001DA9DF /* SystemInitializerCommon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SystemInitializerCommon.h; path = include/lldb/Initialization/SystemInitializerCommon.h; sourceTree = "<group>"; };
-		3F81692A1ABB7A16001DA9DF /* SystemInitializerFull.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemInitializerFull.cpp; path = source/API/SystemInitializerFull.cpp; sourceTree = "<group>"; };
-		CDC75CF920B8D1DF002209BC /* SystemInitializerFull.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SystemInitializerFull.h; path = source/API/SystemInitializerFull.h; sourceTree = "<group>"; };
-		4CD44D2020B725DA0003557C /* SystemInitializerLLGS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemInitializerLLGS.cpp; path = "tools/lldb-server/SystemInitializerLLGS.cpp"; sourceTree = "<group>"; };
-		4CD44D2320B725F60003557C /* SystemInitializerLLGS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SystemInitializerLLGS.h; path = "tools/lldb-server/SystemInitializerLLGS.h"; sourceTree = "<group>"; };
-		3F8169301ABB7A6D001DA9DF /* SystemLifetimeManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemLifetimeManager.cpp; path = source/Initialization/SystemLifetimeManager.cpp; sourceTree = "<group>"; };
-		3F8169361ABB7A80001DA9DF /* SystemLifetimeManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SystemLifetimeManager.h; path = include/lldb/Initialization/SystemLifetimeManager.h; sourceTree = "<group>"; };
-		AF81DEF91828A23F0042CF19 /* SystemRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SystemRuntime.cpp; path = source/Target/SystemRuntime.cpp; sourceTree = "<group>"; };
-		238F2BA01D2C835A001FF92A /* SystemRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SystemRuntime.h; path = include/lldb/Target/SystemRuntime.h; sourceTree = "<group>"; };
-		AF9B8F31182DB52900DA866F /* SystemRuntimeMacOSX.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SystemRuntimeMacOSX.cpp; sourceTree = "<group>"; };
-		AF9B8F32182DB52900DA866F /* SystemRuntimeMacOSX.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SystemRuntimeMacOSX.h; sourceTree = "<group>"; };
-		2579065A1BD0488100178368 /* TCPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TCPSocket.cpp; sourceTree = "<group>"; };
-		8C26C4241C3EA4340031DF7C /* TSanRuntime.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = TSanRuntime.cpp; path = TSan/TSanRuntime.cpp; sourceTree = "<group>"; };
-		8C26C4251C3EA4340031DF7C /* TSanRuntime.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TSanRuntime.h; path = TSan/TSanRuntime.h; sourceTree = "<group>"; };
-		49BB309511F79450001A4197 /* TaggedASTType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TaggedASTType.h; path = include/lldb/Symbol/TaggedASTType.h; sourceTree = "<group>"; };
-		26BC7F3B10F1B90C00F91463 /* Target.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Target.cpp; path = source/Target/Target.cpp; sourceTree = "<group>"; };
-		26BC7DF810F1B81A00F91463 /* Target.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Target.h; path = include/lldb/Target/Target.h; sourceTree = "<group>"; };
-		26BC7F3C10F1B90C00F91463 /* TargetList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetList.cpp; path = source/Target/TargetList.cpp; sourceTree = "<group>"; };
-		26BC7DF910F1B81A00F91463 /* TargetList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetList.h; path = include/lldb/Target/TargetList.h; sourceTree = "<group>"; };
-		6DEC6F381BD66D750091ABA6 /* TaskPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TaskPool.cpp; path = source/Host/common/TaskPool.cpp; sourceTree = "<group>"; };
-		6DEC6F3A1BD66D950091ABA6 /* TaskPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TaskPool.h; path = include/lldb/Host/TaskPool.h; sourceTree = "<group>"; };
-		2321F9451BDD346100BA9A93 /* TaskPoolTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TaskPoolTest.cpp; sourceTree = "<group>"; };
-		268DA873130095ED00C9483A /* Terminal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Terminal.cpp; sourceTree = "<group>"; };
-		268DA871130095D000C9483A /* Terminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Terminal.h; path = include/lldb/Host/Terminal.h; sourceTree = "<group>"; };
-		AFEABBF62230BF840097046F /* TestArm64Disassembly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestArm64Disassembly.cpp; path = unittests/Disassembler/TestArm64Disassembly.cpp; sourceTree = SOURCE_ROOT; };
-		4CEC86A3204738C5009B37B1 /* TestArm64InstEmulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestArm64InstEmulation.cpp; path = UnwindAssembly/ARM64/TestArm64InstEmulation.cpp; sourceTree = "<group>"; };
-		AF7F97662141FA3800795BC0 /* TestArmv7Disassembly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestArmv7Disassembly.cpp; path = unittests/Disassembler/TestArmv7Disassembly.cpp; sourceTree = SOURCE_ROOT; };
-		23CB150C1D66CF5600EDDDE1 /* TestClangASTContext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestClangASTContext.cpp; sourceTree = "<group>"; };
-		9A20572B1F3B8E6200F6C293 /* TestCompletion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestCompletion.cpp; sourceTree = "<group>"; };
-		9A2057131F3B860D00F6C293 /* TestDWARFCallFrameInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestDWARFCallFrameInfo.cpp; sourceTree = "<group>"; };
-		23CB15051D66CDB400EDDDE1 /* TestModule.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = TestModule.c; sourceTree = "<group>"; };
-		23CB15061D66CDB400EDDDE1 /* TestModule.so */ = {isa = PBXFileReference; lastKnownFileType = file; path = TestModule.so; sourceTree = "<group>"; };
-		9A2057251F3B8DD200F6C293 /* TestObjectFileELF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestObjectFileELF.cpp; path = ObjectFile/ELF/TestObjectFileELF.cpp; sourceTree = "<group>"; };
-		4C719398207D23E300FDF430 /* TestOptionArgParser.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TestOptionArgParser.cpp; sourceTree = "<group>"; };
-		4CEC86A6204738EA009B37B1 /* TestPPC64InstEmulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestPPC64InstEmulation.cpp; path = UnwindAssembly/PPC64/TestPPC64InstEmulation.cpp; sourceTree = "<group>"; };
-		9A2057141F3B860D00F6C293 /* TestType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestType.cpp; sourceTree = "<group>"; };
-		9A1890341F47D5D400394BCA /* TestUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestUtilities.cpp; path = TestingSupport/TestUtilities.cpp; sourceTree = "<group>"; };
-		9A1890351F47D5D400394BCA /* TestUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUtilities.h; path = TestingSupport/TestUtilities.h; sourceTree = "<group>"; };
-		AFEC5FD51D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Testx86AssemblyInspectionEngine.cpp; path = UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp; sourceTree = "<group>"; };
-		26BC7F3D10F1B90C00F91463 /* Thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Thread.cpp; path = source/Target/Thread.cpp; sourceTree = "<group>"; };
-		26BC7DFA10F1B81A00F91463 /* Thread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Thread.h; path = include/lldb/Target/Thread.h; sourceTree = "<group>"; };
-		8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadCollection.cpp; path = source/Target/ThreadCollection.cpp; sourceTree = "<group>"; };
-		8CCB017C19BA289B0009FD44 /* ThreadCollection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadCollection.h; path = include/lldb/Target/ThreadCollection.h; sourceTree = "<group>"; };
-		26BC17A818C7F4CB00D2196D /* ThreadElfCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadElfCore.cpp; sourceTree = "<group>"; };
-		26BC17A918C7F4CB00D2196D /* ThreadElfCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadElfCore.h; sourceTree = "<group>"; };
-		2618EE631315B29C001D6D71 /* ThreadGDBRemote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadGDBRemote.cpp; sourceTree = "<group>"; };
-		2618EE641315B29C001D6D71 /* ThreadGDBRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadGDBRemote.h; sourceTree = "<group>"; };
-		2628A4D313D4977900F5487A /* ThreadKDP.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadKDP.cpp; sourceTree = "<group>"; };
-		2628A4D413D4977900F5487A /* ThreadKDP.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadKDP.h; sourceTree = "<group>"; };
-		3FDFED2619BA6D96009756A7 /* ThreadLauncher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadLauncher.cpp; sourceTree = "<group>"; };
-		3FDFED2319BA6D55009756A7 /* ThreadLauncher.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadLauncher.h; path = include/lldb/Host/ThreadLauncher.h; sourceTree = "<group>"; };
-		26BC7F3E10F1B90C00F91463 /* ThreadList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadList.cpp; path = source/Target/ThreadList.cpp; sourceTree = "<group>"; };
-		26BC7DFB10F1B81A00F91463 /* ThreadList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadList.h; path = include/lldb/Target/ThreadList.h; sourceTree = "<group>"; };
-		26A527BF14E24F5F00F3A14A /* ThreadMachCore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadMachCore.cpp; sourceTree = "<group>"; };
-		26A527C014E24F5F00F3A14A /* ThreadMachCore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadMachCore.h; sourceTree = "<group>"; };
-		26F4A21A13FBA31A0064B613 /* ThreadMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadMemory.cpp; path = Utility/ThreadMemory.cpp; sourceTree = "<group>"; };
-		26F4A21B13FBA31A0064B613 /* ThreadMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadMemory.h; path = Utility/ThreadMemory.h; sourceTree = "<group>"; };
-		947CF7751DC7B20D00EF980B /* ThreadMinidump.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ThreadMinidump.cpp; sourceTree = "<group>"; };
-		947CF7731DC7B20300EF980B /* ThreadMinidump.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ThreadMinidump.h; sourceTree = "<group>"; };
-		26BC7F3F10F1B90C00F91463 /* ThreadPlan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlan.cpp; path = source/Target/ThreadPlan.cpp; sourceTree = "<group>"; };
-		26BC7DFC10F1B81A00F91463 /* ThreadPlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlan.h; path = include/lldb/Target/ThreadPlan.h; sourceTree = "<group>"; };
-		260C847110F50EFC00BB2B04 /* ThreadPlanBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanBase.cpp; path = source/Target/ThreadPlanBase.cpp; sourceTree = "<group>"; };
-		260C847F10F50F0A00BB2B04 /* ThreadPlanBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanBase.h; path = include/lldb/Target/ThreadPlanBase.h; sourceTree = "<group>"; };
-		49EC3E98118F90AC00B1265E /* ThreadPlanCallFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallFunction.cpp; path = source/Target/ThreadPlanCallFunction.cpp; sourceTree = "<group>"; };
-		49EC3E9C118F90D400B1265E /* ThreadPlanCallFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanCallFunction.h; path = include/lldb/Target/ThreadPlanCallFunction.h; sourceTree = "<group>"; };
-		EB8375E61B553DE800BA907D /* ThreadPlanCallFunctionUsingABI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallFunctionUsingABI.cpp; path = source/Target/ThreadPlanCallFunctionUsingABI.cpp; sourceTree = "<group>"; };
-		EB8375E81B553DFE00BA907D /* ThreadPlanCallFunctionUsingABI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadPlanCallFunctionUsingABI.h; path = include/lldb/Target/ThreadPlanCallFunctionUsingABI.h; sourceTree = "<group>"; };
-		230EC4581D63C3A7008DF59F /* ThreadPlanCallOnFunctionExit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallOnFunctionExit.cpp; path = source/Target/ThreadPlanCallOnFunctionExit.cpp; sourceTree = "<group>"; };
-		4C7CF7E51295E12B00B4FBB5 /* ThreadPlanCallUserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanCallUserExpression.cpp; path = source/Target/ThreadPlanCallUserExpression.cpp; sourceTree = "<group>"; };
-		4C7CF7E31295E10E00B4FBB5 /* ThreadPlanCallUserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanCallUserExpression.h; path = include/lldb/Target/ThreadPlanCallUserExpression.h; sourceTree = "<group>"; };
-		4C56543019D1EFAA002E9C44 /* ThreadPlanPython.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanPython.cpp; path = source/Target/ThreadPlanPython.cpp; sourceTree = "<group>"; };
-		4C56543219D1EFB5002E9C44 /* ThreadPlanPython.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanPython.h; path = include/lldb/Target/ThreadPlanPython.h; sourceTree = "<group>"; };
-		4CAFCE031101218900CA63DB /* ThreadPlanRunToAddress.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanRunToAddress.cpp; path = source/Target/ThreadPlanRunToAddress.cpp; sourceTree = "<group>"; };
-		4CAFCE001101216B00CA63DB /* ThreadPlanRunToAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanRunToAddress.h; path = include/lldb/Target/ThreadPlanRunToAddress.h; sourceTree = "<group>"; };
-		4C43DEFA110641F300E55CBF /* ThreadPlanShouldStopHere.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanShouldStopHere.cpp; path = source/Target/ThreadPlanShouldStopHere.cpp; sourceTree = "<group>"; };
-		4C43DEF9110641F300E55CBF /* ThreadPlanShouldStopHere.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanShouldStopHere.h; path = include/lldb/Target/ThreadPlanShouldStopHere.h; sourceTree = "<group>"; };
-		4C43DF8911069C3200E55CBF /* ThreadPlanStepInRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepInRange.cpp; path = source/Target/ThreadPlanStepInRange.cpp; sourceTree = "<group>"; };
-		4C43DF8511069BFD00E55CBF /* ThreadPlanStepInRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepInRange.h; path = include/lldb/Target/ThreadPlanStepInRange.h; sourceTree = "<group>"; };
-		260C847210F50EFC00BB2B04 /* ThreadPlanStepInstruction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepInstruction.cpp; path = source/Target/ThreadPlanStepInstruction.cpp; sourceTree = "<group>"; };
-		260C848010F50F0A00BB2B04 /* ThreadPlanStepInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepInstruction.h; path = include/lldb/Target/ThreadPlanStepInstruction.h; sourceTree = "<group>"; };
-		260C847310F50EFC00BB2B04 /* ThreadPlanStepOut.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepOut.cpp; path = source/Target/ThreadPlanStepOut.cpp; sourceTree = "<group>"; };
-		260C848110F50F0A00BB2B04 /* ThreadPlanStepOut.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepOut.h; path = include/lldb/Target/ThreadPlanStepOut.h; sourceTree = "<group>"; };
-		260C847410F50EFC00BB2B04 /* ThreadPlanStepOverBreakpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepOverBreakpoint.cpp; path = source/Target/ThreadPlanStepOverBreakpoint.cpp; sourceTree = "<group>"; };
-		260C848210F50F0A00BB2B04 /* ThreadPlanStepOverBreakpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepOverBreakpoint.h; path = include/lldb/Target/ThreadPlanStepOverBreakpoint.h; sourceTree = "<group>"; };
-		4C43DF8A11069C3200E55CBF /* ThreadPlanStepOverRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepOverRange.cpp; path = source/Target/ThreadPlanStepOverRange.cpp; sourceTree = "<group>"; };
-		4C43DF8611069BFD00E55CBF /* ThreadPlanStepOverRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepOverRange.h; path = include/lldb/Target/ThreadPlanStepOverRange.h; sourceTree = "<group>"; };
-		260C847610F50EFC00BB2B04 /* ThreadPlanStepRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepRange.cpp; path = source/Target/ThreadPlanStepRange.cpp; sourceTree = "<group>"; };
-		260C848410F50F0A00BB2B04 /* ThreadPlanStepRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepRange.h; path = include/lldb/Target/ThreadPlanStepRange.h; sourceTree = "<group>"; };
-		260C847510F50EFC00BB2B04 /* ThreadPlanStepThrough.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepThrough.cpp; path = source/Target/ThreadPlanStepThrough.cpp; sourceTree = "<group>"; };
-		260C848310F50F0A00BB2B04 /* ThreadPlanStepThrough.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepThrough.h; path = include/lldb/Target/ThreadPlanStepThrough.h; sourceTree = "<group>"; };
-		2660D9FE11922A7F00958FBD /* ThreadPlanStepUntil.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanStepUntil.cpp; path = source/Target/ThreadPlanStepUntil.cpp; sourceTree = "<group>"; };
-		4CEDAED311754F5E00E875A6 /* ThreadPlanStepUntil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanStepUntil.h; path = include/lldb/Target/ThreadPlanStepUntil.h; sourceTree = "<group>"; };
-		4CC2A148128C73ED001531C4 /* ThreadPlanTracer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPlanTracer.cpp; path = source/Target/ThreadPlanTracer.cpp; sourceTree = "<group>"; };
-		4CC2A14C128C7409001531C4 /* ThreadPlanTracer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPlanTracer.h; path = include/lldb/Target/ThreadPlanTracer.h; sourceTree = "<group>"; };
-		94ED54A119C8A822007BE2EA /* ThreadSafeDenseMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadSafeDenseMap.h; path = include/lldb/Core/ThreadSafeDenseMap.h; sourceTree = "<group>"; };
-		9449B8031B30E0690019342B /* ThreadSafeDenseSet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadSafeDenseSet.h; path = include/lldb/Core/ThreadSafeDenseSet.h; sourceTree = "<group>"; };
-		263FEDA5112CC1DA00E4C208 /* ThreadSafeSTLMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadSafeSTLMap.h; path = include/lldb/Core/ThreadSafeSTLMap.h; sourceTree = "<group>"; };
-		940B01FE1D2D82220058795E /* ThreadSafeSTLVector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ThreadSafeSTLVector.h; path = include/lldb/Core/ThreadSafeSTLVector.h; sourceTree = "<group>"; };
-		26B167A41123BF5500DC7B4F /* ThreadSafeValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadSafeValue.h; path = include/lldb/Core/ThreadSafeValue.h; sourceTree = "<group>"; };
-		4C08CDE711C81EF8001610A8 /* ThreadSpec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadSpec.cpp; path = source/Target/ThreadSpec.cpp; sourceTree = "<group>"; };
-		4C08CDEB11C81F1E001610A8 /* ThreadSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadSpec.h; path = include/lldb/Target/ThreadSpec.h; sourceTree = "<group>"; };
-		AFF8FF0B1E779D4B003830EF /* TildeExpressionResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TildeExpressionResolver.cpp; path = source/Utility/TildeExpressionResolver.cpp; sourceTree = "<group>"; };
-		AFF8FF0D1E779D51003830EF /* TildeExpressionResolver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TildeExpressionResolver.h; path = include/lldb/Utility/TildeExpressionResolver.h; sourceTree = "<group>"; };
-		9A3D43C91F3150D200EB767C /* TildeExpressionResolverTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TildeExpressionResolverTest.cpp; sourceTree = "<group>"; };
-		9A3D43CC1F3150D200EB767C /* TimeoutTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimeoutTest.cpp; sourceTree = "<group>"; };
-		26BC7E9610F1B85900F91463 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = source/Utility/Timer.cpp; sourceTree = "<group>"; };
-		26BC7D7E10F1B77400F91463 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = include/lldb/Utility/Timer.h; sourceTree = "<group>"; };
-		9A3D43C51F3150D200EB767C /* TimerTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TimerTest.cpp; sourceTree = "<group>"; };
-		26BC7F2010F1B8EC00F91463 /* Type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Type.cpp; path = source/Symbol/Type.cpp; sourceTree = "<group>"; };
-		26BC7C6510F1B6E900F91463 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Type.h; path = include/lldb/Symbol/Type.h; sourceTree = "<group>"; };
-		94CB256416B096F10059775D /* TypeCategory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeCategory.cpp; path = source/DataFormatters/TypeCategory.cpp; sourceTree = "<group>"; };
-		94CB256816B096F90059775D /* TypeCategory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeCategory.h; path = include/lldb/DataFormatters/TypeCategory.h; sourceTree = "<group>"; };
-		94CB256516B096F10059775D /* TypeCategoryMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeCategoryMap.cpp; path = source/DataFormatters/TypeCategoryMap.cpp; sourceTree = "<group>"; };
-		94CB256916B096FA0059775D /* TypeCategoryMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeCategoryMap.h; path = include/lldb/DataFormatters/TypeCategoryMap.h; sourceTree = "<group>"; };
-		94CB256D16B0A4260059775D /* TypeFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeFormat.cpp; path = source/DataFormatters/TypeFormat.cpp; sourceTree = "<group>"; };
-		94CB256A16B0A4030059775D /* TypeFormat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeFormat.h; path = include/lldb/DataFormatters/TypeFormat.h; sourceTree = "<group>"; };
-		26BC7F2110F1B8EC00F91463 /* TypeList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeList.cpp; path = source/Symbol/TypeList.cpp; sourceTree = "<group>"; };
-		26BC7C6610F1B6E900F91463 /* TypeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeList.h; path = include/lldb/Symbol/TypeList.h; sourceTree = "<group>"; };
-		6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeMap.cpp; path = source/Symbol/TypeMap.cpp; sourceTree = "<group>"; };
-		6D9AB3DE1BB2B76B003F2289 /* TypeMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeMap.h; path = include/lldb/Symbol/TypeMap.h; sourceTree = "<group>"; };
-		94CB256E16B0A4260059775D /* TypeSummary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeSummary.cpp; path = source/DataFormatters/TypeSummary.cpp; sourceTree = "<group>"; };
-		94CB256B16B0A4030059775D /* TypeSummary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeSummary.h; path = include/lldb/DataFormatters/TypeSummary.h; sourceTree = "<group>"; };
-		94CB256F16B0A4270059775D /* TypeSynthetic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeSynthetic.cpp; path = source/DataFormatters/TypeSynthetic.cpp; sourceTree = "<group>"; };
-		94CB256C16B0A4040059775D /* TypeSynthetic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeSynthetic.h; path = include/lldb/DataFormatters/TypeSynthetic.h; sourceTree = "<group>"; };
-		AEEA34041AC88A7400AB639D /* TypeSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeSystem.cpp; path = source/Symbol/TypeSystem.cpp; sourceTree = "<group>"; };
-		AEEA33F61AC74FE700AB639D /* TypeSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeSystem.h; path = include/lldb/Symbol/TypeSystem.h; sourceTree = "<group>"; };
-		94CD131919BA33B400DB7BED /* TypeValidator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TypeValidator.cpp; path = source/DataFormatters/TypeValidator.cpp; sourceTree = "<group>"; };
-		94CD131819BA33A100DB7BED /* TypeValidator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TypeValidator.h; path = include/lldb/DataFormatters/TypeValidator.h; sourceTree = "<group>"; };
-		54067BEC1DF2034B00749AA5 /* UBSanRuntime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.cpp; path = UBSanRuntime.cpp; sourceTree = "<group>"; };
-		54067BED1DF2034B00749AA5 /* UBSanRuntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UBSanRuntime.h; sourceTree = "<group>"; };
-		2579065B1BD0488100178368 /* UDPSocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UDPSocket.cpp; sourceTree = "<group>"; };
-		49CA96EA1E6AAC6600C03FEE /* UUID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UUID.cpp; path = source/Utility/UUID.cpp; sourceTree = "<group>"; };
-		49CA96F51E6AAC8E00C03FEE /* UUID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UUID.h; path = include/lldb/Utility/UUID.h; sourceTree = "<group>"; };
-		4C639EC221FA684700A7B957 /* UUIDTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UUIDTest.cpp; sourceTree = "<group>"; };
-		AF0578C2217FA80700CF9D80 /* UdtRecordCompleter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UdtRecordCompleter.cpp; path = source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp; sourceTree = SOURCE_ROOT; };
-		AF0578C1217FA80700CF9D80 /* UdtRecordCompleter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UdtRecordCompleter.h; path = source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.h; sourceTree = SOURCE_ROOT; };
-		268A813F115B19D000F645B0 /* UniqueCStringMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniqueCStringMap.h; path = include/lldb/Core/UniqueCStringMap.h; sourceTree = "<group>"; };
-		26B8B42312EEC52A00A831B2 /* UniqueDWARFASTType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniqueDWARFASTType.cpp; sourceTree = "<group>"; };
-		26B8B42212EEC52A00A831B2 /* UniqueDWARFASTType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UniqueDWARFASTType.h; sourceTree = "<group>"; };
-		4C00987011500B4300F316B0 /* UnixSignals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnixSignals.cpp; path = source/Target/UnixSignals.cpp; sourceTree = "<group>"; };
-		4C00986F11500B4300F316B0 /* UnixSignals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnixSignals.h; path = include/lldb/Target/UnixSignals.h; sourceTree = "<group>"; };
-		9A20571E1F3B8D2100F6C293 /* UnixSignalsTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnixSignalsTest.cpp; path = Signals/UnixSignalsTest.cpp; sourceTree = "<group>"; };
-		26E3EEBD11A9870400FBADB6 /* Unwind.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unwind.h; path = include/lldb/Target/Unwind.h; sourceTree = "<group>"; };
-		263E949D13661AE400E7D1CE /* UnwindAssembly-x86.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = "UnwindAssembly-x86.cpp"; sourceTree = "<group>"; };
-		263E949E13661AE400E7D1CE /* UnwindAssembly-x86.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UnwindAssembly-x86.h"; sourceTree = "<group>"; };
-		264D8D4F13661BD7003A368F /* UnwindAssembly.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindAssembly.cpp; path = source/Target/UnwindAssembly.cpp; sourceTree = "<group>"; };
-		264D8D4E13661BCC003A368F /* UnwindAssembly.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UnwindAssembly.h; path = include/lldb/Target/UnwindAssembly.h; sourceTree = "<group>"; };
-		2692BA13136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnwindAssemblyInstEmulation.cpp; sourceTree = "<group>"; };
-		2692BA14136610C100F9E14D /* UnwindAssemblyInstEmulation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnwindAssemblyInstEmulation.h; sourceTree = "<group>"; };
-		AF68D32F1255A110002FF25B /* UnwindLLDB.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindLLDB.cpp; path = Utility/UnwindLLDB.cpp; sourceTree = "<group>"; };
-		AF68D3301255A110002FF25B /* UnwindLLDB.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindLLDB.h; path = Utility/UnwindLLDB.h; sourceTree = "<group>"; };
-		26E3EEE311A9901300FBADB6 /* UnwindMacOSXFrameBackchain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindMacOSXFrameBackchain.cpp; path = Utility/UnwindMacOSXFrameBackchain.cpp; sourceTree = "<group>"; };
-		26E3EEE411A9901300FBADB6 /* UnwindMacOSXFrameBackchain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindMacOSXFrameBackchain.h; path = Utility/UnwindMacOSXFrameBackchain.h; sourceTree = "<group>"; };
-		961FABB91235DE1600F93A47 /* UnwindPlan.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindPlan.cpp; path = source/Symbol/UnwindPlan.cpp; sourceTree = "<group>"; };
-		269FF07F12494F8E00225026 /* UnwindPlan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindPlan.h; path = include/lldb/Symbol/UnwindPlan.h; sourceTree = "<group>"; };
-		961FABBA1235DE1600F93A47 /* UnwindTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UnwindTable.cpp; path = source/Symbol/UnwindTable.cpp; sourceTree = "<group>"; };
-		269FF08112494FC200225026 /* UnwindTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UnwindTable.h; path = include/lldb/Symbol/UnwindTable.h; sourceTree = "<group>"; };
-		33064C991A5C7A330033D415 /* UriParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UriParser.cpp; path = source/Utility/UriParser.cpp; sourceTree = "<group>"; };
-		2654A6911E552F3C00DA1013 /* UriParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UriParser.h; path = include/lldb/Utility/UriParser.h; sourceTree = "<group>"; };
-		2321F9461BDD346100BA9A93 /* UriParserTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UriParserTest.cpp; sourceTree = "<group>"; };
-		4C0083331B9A5DE200D5CF24 /* UserExpression.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserExpression.cpp; path = source/Expression/UserExpression.cpp; sourceTree = "<group>"; };
-		4C00832E1B9A58A700D5CF24 /* UserExpression.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserExpression.h; path = include/lldb/Expression/UserExpression.h; sourceTree = "<group>"; };
-		AFC2DCEA1E6E2F7D00283714 /* UserID.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserID.cpp; path = source/Utility/UserID.cpp; sourceTree = "<group>"; };
-		AFC2DCEC1E6E2F8C00283714 /* UserID.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = UserID.h; path = include/lldb/Utility/UserID.h; sourceTree = "<group>"; };
-		4CC57FA0222DFEA40067B7EA /* UserIDResolver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserIDResolver.cpp; path = source/Utility/UserIDResolver.cpp; sourceTree = "<group>"; };
-		4CC57FA3222DFEFE0067B7EA /* UserIDResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserIDResolver.h; path = include/lldb/Utility/UserIDResolver.h; sourceTree = "<group>"; };
-		9A4633DC11F65D9A00955CE1 /* UserSettingsController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserSettingsController.cpp; path = source/Core/UserSettingsController.cpp; sourceTree = "<group>"; };
-		9A4633DA11F65D8600955CE1 /* UserSettingsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserSettingsController.h; path = include/lldb/Core/UserSettingsController.h; sourceTree = "<group>"; };
-		4C00833F1B9F9BA900D5CF24 /* UtilityFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UtilityFunction.cpp; path = source/Expression/UtilityFunction.cpp; sourceTree = "<group>"; };
-		4C00833D1B9F9B8400D5CF24 /* UtilityFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UtilityFunction.h; path = include/lldb/Expression/UtilityFunction.h; sourceTree = "<group>"; };
-		DD54302F222F190D00C1F021 /* Utils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = source/API/Utils.h; sourceTree = "<group>"; };
-		2654A6921E552F4600DA1013 /* VASPrintf.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VASPrintf.h; path = include/lldb/Utility/VASPrintf.h; sourceTree = "<group>"; };
-		2654A68F1E552ED500DA1013 /* VASprintf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VASprintf.cpp; path = source/Utility/VASprintf.cpp; sourceTree = "<group>"; };
-		9A3D43C41F3150D200EB767C /* VASprintfTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VASprintfTest.cpp; sourceTree = "<group>"; };
-		AFC2DCEF1E6E2FD200283714 /* VMRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VMRange.cpp; path = source/Utility/VMRange.cpp; sourceTree = "<group>"; };
-		AFC2DCF11E6E2FDA00283714 /* VMRange.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VMRange.h; path = include/lldb/Utility/VMRange.h; sourceTree = "<group>"; };
-		4C639ECA21FA684900A7B957 /* VMRangeTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VMRangeTest.cpp; sourceTree = "<group>"; };
-		2660386E211CA90D00329572 /* VSCode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VSCode.cpp; path = "tools/lldb-vscode/VSCode.cpp"; sourceTree = "<group>"; };
-		2660386F211CA90D00329572 /* VSCode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VSCode.h; path = "tools/lldb-vscode/VSCode.h"; sourceTree = "<group>"; };
-		26F7619C211CDD700044F6EA /* VSCodeForward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VSCodeForward.h; path = "tools/lldb-vscode/VSCodeForward.h"; sourceTree = "<group>"; };
-		26BC7E9910F1B85900F91463 /* Value.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Value.cpp; path = source/Core/Value.cpp; sourceTree = "<group>"; };
-		26BC7D8110F1B77400F91463 /* Value.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Value.h; path = include/lldb/Core/Value.h; sourceTree = "<group>"; };
-		26BC7E9A10F1B85900F91463 /* ValueObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObject.cpp; path = source/Core/ValueObject.cpp; sourceTree = "<group>"; };
-		26BC7D8210F1B77400F91463 /* ValueObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObject.h; path = include/lldb/Core/ValueObject.h; sourceTree = "<group>"; };
-		94094C69163B6CD90083A547 /* ValueObjectCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectCast.cpp; path = source/Core/ValueObjectCast.cpp; sourceTree = "<group>"; };
-		94094C68163B6CCC0083A547 /* ValueObjectCast.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectCast.h; path = include/lldb/Core/ValueObjectCast.h; sourceTree = "<group>"; };
-		26BC7E9B10F1B85900F91463 /* ValueObjectChild.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectChild.cpp; path = source/Core/ValueObjectChild.cpp; sourceTree = "<group>"; };
-		26BC7D8310F1B77400F91463 /* ValueObjectChild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectChild.h; path = include/lldb/Core/ValueObjectChild.h; sourceTree = "<group>"; };
-		26424E3C125986CB0016D82C /* ValueObjectConstResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResult.cpp; path = source/Core/ValueObjectConstResult.cpp; sourceTree = "<group>"; };
-		26424E3E125986D30016D82C /* ValueObjectConstResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectConstResult.h; path = include/lldb/Core/ValueObjectConstResult.h; sourceTree = "<group>"; };
-		AF94726E1B575E430063D65C /* ValueObjectConstResultCast.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResultCast.cpp; path = source/Core/ValueObjectConstResultCast.cpp; sourceTree = "<group>"; };
-		AF9472701B575E5F0063D65C /* ValueObjectConstResultCast.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectConstResultCast.h; path = include/lldb/Core/ValueObjectConstResultCast.h; sourceTree = "<group>"; };
-		94FA3DDF1405D50300833217 /* ValueObjectConstResultChild.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResultChild.cpp; path = source/Core/ValueObjectConstResultChild.cpp; sourceTree = "<group>"; };
-		94FA3DDD1405D4E500833217 /* ValueObjectConstResultChild.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectConstResultChild.h; path = include/lldb/Core/ValueObjectConstResultChild.h; sourceTree = "<group>"; };
-		949ADF021406F648004833E1 /* ValueObjectConstResultImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectConstResultImpl.cpp; path = source/Core/ValueObjectConstResultImpl.cpp; sourceTree = "<group>"; };
-		949ADF001406F62E004833E1 /* ValueObjectConstResultImpl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectConstResultImpl.h; path = include/lldb/Core/ValueObjectConstResultImpl.h; sourceTree = "<group>"; };
-		4CD0BD0E134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectDynamicValue.cpp; path = source/Core/ValueObjectDynamicValue.cpp; sourceTree = "<group>"; };
-		4CD0BD0C134BFAB600CB44D4 /* ValueObjectDynamicValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectDynamicValue.h; path = include/lldb/Core/ValueObjectDynamicValue.h; sourceTree = "<group>"; };
-		26BC7E9C10F1B85900F91463 /* ValueObjectList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectList.cpp; path = source/Core/ValueObjectList.cpp; sourceTree = "<group>"; };
-		26BC7D8410F1B77400F91463 /* ValueObjectList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectList.h; path = include/lldb/Core/ValueObjectList.h; sourceTree = "<group>"; };
-		4CABA9DF134A8BCD00539BDD /* ValueObjectMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectMemory.cpp; path = source/Core/ValueObjectMemory.cpp; sourceTree = "<group>"; };
-		4CABA9DC134A8BA700539BDD /* ValueObjectMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectMemory.h; path = include/lldb/Core/ValueObjectMemory.h; sourceTree = "<group>"; };
-		945215DE17F639EE00521C0B /* ValueObjectPrinter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectPrinter.cpp; path = source/DataFormatters/ValueObjectPrinter.cpp; sourceTree = "<group>"; };
-		945215DD17F639E600521C0B /* ValueObjectPrinter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectPrinter.h; path = include/lldb/DataFormatters/ValueObjectPrinter.h; sourceTree = "<group>"; };
-		264334381110F63100CDB6C6 /* ValueObjectRegister.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectRegister.cpp; path = source/Core/ValueObjectRegister.cpp; sourceTree = "<group>"; };
-		2643343A1110F63C00CDB6C6 /* ValueObjectRegister.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectRegister.h; path = include/lldb/Core/ValueObjectRegister.h; sourceTree = "<group>"; };
-		94B6E76113D88362005F417F /* ValueObjectSyntheticFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectSyntheticFilter.cpp; path = source/Core/ValueObjectSyntheticFilter.cpp; sourceTree = "<group>"; };
-		94B6E76013D8833C005F417F /* ValueObjectSyntheticFilter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ValueObjectSyntheticFilter.h; path = include/lldb/Core/ValueObjectSyntheticFilter.h; sourceTree = "<group>"; };
-		26BC7E9D10F1B85900F91463 /* ValueObjectVariable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ValueObjectVariable.cpp; path = source/Core/ValueObjectVariable.cpp; sourceTree = "<group>"; };
-		26BC7D8510F1B77400F91463 /* ValueObjectVariable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueObjectVariable.h; path = include/lldb/Core/ValueObjectVariable.h; sourceTree = "<group>"; };
-		26BC7F2210F1B8EC00F91463 /* Variable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Variable.cpp; path = source/Symbol/Variable.cpp; sourceTree = "<group>"; };
-		26BC7C6710F1B6E900F91463 /* Variable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Variable.h; path = include/lldb/Symbol/Variable.h; sourceTree = "<group>"; };
-		26BC7F2310F1B8EC00F91463 /* VariableList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VariableList.cpp; path = source/Symbol/VariableList.cpp; sourceTree = "<group>"; };
-		26BC7C6810F1B6E900F91463 /* VariableList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VariableList.h; path = include/lldb/Symbol/VariableList.h; sourceTree = "<group>"; };
-		943B90FC1B991586007BA499 /* VectorIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorIterator.h; path = include/lldb/DataFormatters/VectorIterator.h; sourceTree = "<group>"; };
-		9418EBCC1AA910910058B02E /* VectorType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VectorType.cpp; path = source/DataFormatters/VectorType.cpp; sourceTree = "<group>"; };
-		9418EBCB1AA9108B0058B02E /* VectorType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VectorType.h; path = include/lldb/DataFormatters/VectorType.h; sourceTree = "<group>"; };
-		494260D914579144003C1C78 /* VerifyDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VerifyDecl.cpp; path = source/Symbol/VerifyDecl.cpp; sourceTree = "<group>"; };
-		494260D7145790D5003C1C78 /* VerifyDecl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = VerifyDecl.h; path = include/lldb/Symbol/VerifyDecl.h; sourceTree = "<group>"; };
-		26BC7E1810F1B83100F91463 /* Watchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Watchpoint.cpp; path = source/Breakpoint/Watchpoint.cpp; sourceTree = "<group>"; };
-		26BC7CFC10F1B71400F91463 /* Watchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Watchpoint.h; path = include/lldb/Breakpoint/Watchpoint.h; sourceTree = "<group>"; };
-		B27318411416AC12006039C8 /* WatchpointList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WatchpointList.cpp; path = source/Breakpoint/WatchpointList.cpp; sourceTree = "<group>"; };
-		B27318431416AC43006039C8 /* WatchpointList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WatchpointList.h; path = include/lldb/Breakpoint/WatchpointList.h; sourceTree = "<group>"; };
-		B2B7CCEF15D1C20F00EEFB57 /* WatchpointOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WatchpointOptions.cpp; path = source/Breakpoint/WatchpointOptions.cpp; sourceTree = "<group>"; };
-		B2B7CCED15D1BFB700EEFB57 /* WatchpointOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WatchpointOptions.h; path = include/lldb/Breakpoint/WatchpointOptions.h; sourceTree = "<group>"; };
-		3FDFE54619A29448009756A7 /* Windows.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Windows.cpp; path = source/Host/windows/Windows.cpp; sourceTree = "<group>"; };
-		26C7C4811BFFEA7E009BD01F /* WindowsMiniDump.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WindowsMiniDump.cpp; sourceTree = "<group>"; };
-		26C7C4821BFFEA7E009BD01F /* WindowsMiniDump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindowsMiniDump.h; sourceTree = "<group>"; };
-		267A48001B1411E40021A5BC /* XML.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XML.cpp; path = source/Host/common/XML.cpp; sourceTree = "<group>"; };
-		267A48031B1416080021A5BC /* XML.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = XML.h; path = include/lldb/Host/XML.h; sourceTree = "<group>"; };
-		940B04D81A8984FF0045D5F7 /* argdumper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = argdumper.cpp; path = tools/argdumper/argdumper.cpp; sourceTree = "<group>"; };
-		266960591199F4230075C61A /* build-llvm.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "build-llvm.pl"; sourceTree = "<group>"; };
-		266960601199F4230075C61A /* build-swig-Python.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "build-swig-Python.sh"; sourceTree = "<group>"; };
-		2669605A1199F4230075C61A /* build-swig-wrapper-classes.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "build-swig-wrapper-classes.sh"; sourceTree = "<group>"; };
-		2669605B1199F4230075C61A /* checkpoint-llvm.pl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "checkpoint-llvm.pl"; sourceTree = "<group>"; };
-		268648C216531BF800F04704 /* com.apple.debugserver.applist.internal.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.apple.debugserver.applist.internal.plist; path = tools/debugserver/source/com.apple.debugserver.applist.internal.plist; sourceTree = "<group>"; };
-		AFF87C8A150FF677000E1742 /* com.apple.debugserver.applist.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.apple.debugserver.applist.plist; path = tools/debugserver/source/com.apple.debugserver.applist.plist; sourceTree = "<group>"; };
-		AFF87C8C150FF680000E1742 /* com.apple.debugserver.applist.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.apple.debugserver.applist.plist; path = tools/debugserver/source/com.apple.debugserver.applist.plist; sourceTree = "<group>"; };
-		AFF87C8E150FF688000E1742 /* com.apple.debugserver.applist.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.apple.debugserver.applist.plist; path = tools/debugserver/source/com.apple.debugserver.applist.plist; sourceTree = "<group>"; };
-		268648C316531BF800F04704 /* com.apple.debugserver.internal.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.apple.debugserver.internal.plist; path = tools/debugserver/source/com.apple.debugserver.internal.plist; sourceTree = "<group>"; };
-		AFF87C86150FF669000E1742 /* com.apple.debugserver.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.apple.debugserver.plist; path = tools/debugserver/source/com.apple.debugserver.plist; sourceTree = "<group>"; };
-		268648C116531BF800F04704 /* com.apple.debugserver.posix.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = com.apple.debugserver.posix.plist; path = tools/debugserver/source/com.apple.debugserver.posix.plist; sourceTree = "<group>"; };
-		AF5CEC87206079A500384F20 /* com.apple.internal.xpc.remote.debugserver.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = com.apple.internal.xpc.remote.debugserver.plist; path = tools/debugserver/source/com.apple.internal.xpc.remote.debugserver.plist; sourceTree = "<group>"; };
-		26579F68126A25920007C5CB /* darwin-debug */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "darwin-debug"; sourceTree = BUILT_PRODUCTS_DIR; };
-		26368A3B126B697600E8659F /* darwin-debug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "darwin-debug.cpp"; path = "tools/darwin-debug/darwin-debug.cpp"; sourceTree = "<group>"; };
-		265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = debugserver.xcodeproj; path = tools/debugserver/debugserver.xcodeproj; sourceTree = "<group>"; };
-		9A2057441F3B905C00F6C293 /* debugserver_LogCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = debugserver_LogCallback.cpp; path = debugserver/debugserver_LogCallback.cpp; sourceTree = "<group>"; };
-		26BC7D5F10F1B77400F91463 /* dwarf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dwarf.h; path = include/lldb/Core/dwarf.h; sourceTree = "<group>"; };
-		266960611199F4230075C61A /* edit-swig-python-wrapper-file.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = "edit-swig-python-wrapper-file.py"; sourceTree = "<group>"; };
-		3FDFE54819A2946B009756A7 /* editlinewin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = editlinewin.h; path = include/lldb/Host/windows/editlinewin.h; sourceTree = "<group>"; };
-		94005E0513F45A1B001EF42D /* embedded_interpreter.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; name = embedded_interpreter.py; path = source/Interpreter/embedded_interpreter.py; sourceTree = "<group>"; };
-		94FE476613FC1DA8001F8475 /* finish-swig-Python-LLDB.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "finish-swig-Python-LLDB.sh"; sourceTree = "<group>"; };
-		2669605C1199F4230075C61A /* finish-swig-wrapper-classes.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "finish-swig-wrapper-classes.sh"; sourceTree = "<group>"; };
-		23E2E51E1D903726006F38BB /* fizzbuzz_no_heap.dmp */ = {isa = PBXFileReference; lastKnownFileType = file; path = fizzbuzz_no_heap.dmp; sourceTree = "<group>"; };
-		239504C21BDD3FD600963CEA /* gtest_common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = gtest_common.h; sourceTree = "<group>"; };
-		2669605D1199F4230075C61A /* install-lldb.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "install-lldb.sh"; sourceTree = "<group>"; };
-		2326CF4C1BDD684B00A5CEAC /* libedit.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libedit.dylib; path = ../../../../../../usr/lib/libedit.dylib; sourceTree = "<group>"; };
-		26F5C32A10F3DFDD009D5894 /* libedit.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libedit.dylib; path = /usr/lib/libedit.dylib; sourceTree = "<absolute>"; };
-		2689FFCA13353D7A00698AC0 /* liblldb-core.a */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "liblldb-core.a"; sourceTree = BUILT_PRODUCTS_DIR; };
-		2326CF471BDD67C100A5CEAC /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = ../../../../../../usr/lib/libncurses.dylib; sourceTree = "<group>"; };
-		239481851C59EBDD00DF7168 /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = ../../../../../usr/lib/libncurses.dylib; sourceTree = "<group>"; };
-		2670F8111862B44A006B332C /* libncurses.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libncurses.dylib; path = /usr/lib/libncurses.dylib; sourceTree = "<absolute>"; };
-		26792621211CA41E00EE1D10 /* libncurses.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libncurses.tbd; path = usr/lib/libncurses.tbd; sourceTree = SDKROOT; };
-		26F5C37410F3F61B009D5894 /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = "<absolute>"; };
-		2326CF4E1BDD687800A5CEAC /* libpanel.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpanel.dylib; path = ../../../../../../usr/lib/libpanel.dylib; sourceTree = "<group>"; };
-		260157C41885F4FF00F875CF /* libpanel.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpanel.dylib; path = /usr/lib/libpanel.dylib; sourceTree = "<absolute>"; };
-		26F5C32410F3DF23009D5894 /* libpython.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpython.dylib; path = /usr/lib/libpython.dylib; sourceTree = "<absolute>"; };
-		26F5C32B10F3DFDD009D5894 /* libtermcap.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtermcap.dylib; path = /usr/lib/libtermcap.dylib; sourceTree = "<absolute>"; };
-		23CB14E31D66CA2200EDDDE1 /* libxml2.2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.2.dylib; path = usr/lib/libxml2.2.dylib; sourceTree = SDKROOT; };
-		26D55234159A7DB100708D8D /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = /usr/lib/libxml2.dylib; sourceTree = "<absolute>"; };
-		2326CF4A1BDD681800A5CEAC /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = ../../../../../../usr/lib/libz.dylib; sourceTree = "<group>"; };
-		966C6B7818E6A56A0093F5EC /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = /usr/lib/libz.dylib; sourceTree = "<absolute>"; };
-		23E2E51F1D903726006F38BB /* linux-x86_64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "linux-x86_64.cpp"; sourceTree = "<group>"; };
-		23E2E5201D903726006F38BB /* linux-x86_64.dmp */ = {isa = PBXFileReference; lastKnownFileType = file; path = "linux-x86_64.dmp"; sourceTree = "<group>"; };
-		26F5C26A10F3D9A4009D5894 /* lldb */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = lldb; sourceTree = BUILT_PRODUCTS_DIR; };
-		2669415E1A6DC2AB0063BE93 /* lldb-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "lldb-Info.plist"; path = "tools/lldb-mi/lldb-Info.plist"; sourceTree = SOURCE_ROOT; };
-		26F5C27210F3D9E4009D5894 /* lldb-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "lldb-Info.plist"; path = "tools/driver/lldb-Info.plist"; sourceTree = "<group>"; };
-		942829C01A89835300521B30 /* lldb-argdumper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-argdumper"; sourceTree = BUILT_PRODUCTS_DIR; };
-		26BC7C2510F1B3BC00F91463 /* lldb-defines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-defines.h"; path = "include/lldb/lldb-defines.h"; sourceTree = "<group>"; };
-		26BC7C2610F1B3BC00F91463 /* lldb-enumerations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-enumerations.h"; path = "include/lldb/lldb-enumerations.h"; sourceTree = "<group>"; };
-		26DE1E6A11616C2E00A093E2 /* lldb-forward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; name = "lldb-forward.h"; path = "include/lldb/lldb-forward.h"; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
-		26D6F3F4183E7F9300194858 /* lldb-gdbserver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lldb-gdbserver.cpp"; path = "tools/lldb-server/lldb-gdbserver.cpp"; sourceTree = "<group>"; };
-		239504D41BDD451400963CEA /* lldb-gtest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-gtest"; sourceTree = BUILT_PRODUCTS_DIR; };
-		23CB15561D66DA9300EDDDE1 /* lldb-gtest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-gtest"; sourceTree = BUILT_PRODUCTS_DIR; };
-		2690CD171A6DC0D000E717C8 /* lldb-mi */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-mi"; sourceTree = BUILT_PRODUCTS_DIR; };
-		26DC6A1C1337FECA00FF7998 /* lldb-platform.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "lldb-platform.cpp"; path = "tools/lldb-server/lldb-platform.cpp"; sourceTree = "<group>"; };
-		26217932133BCB850083B112 /* lldb-private-enumerations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-private-enumerations.h"; path = "include/lldb/lldb-private-enumerations.h"; sourceTree = "<group>"; };
-		26BC7C2810F1B3BC00F91463 /* lldb-private-interfaces.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-private-interfaces.h"; path = "include/lldb/lldb-private-interfaces.h"; sourceTree = "<group>"; };
-		26217930133BC8640083B112 /* lldb-private-types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-private-types.h"; path = "include/lldb/lldb-private-types.h"; sourceTree = "<group>"; };
-		26BC7C2A10F1B3BC00F91463 /* lldb-private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-private.h"; path = "include/lldb/lldb-private.h"; sourceTree = "<group>"; };
-		26651A14133BEC76005B64B7 /* lldb-public.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-public.h"; path = "include/lldb/lldb-public.h"; sourceTree = "<group>"; };
-		3FBA69E21B60672A0008F44A /* lldb-python.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-python.h"; path = "ScriptInterpreter/Python/lldb-python.h"; sourceTree = "<group>"; };
-		26DC6A101337FE6900FF7998 /* lldb-server */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-server"; sourceTree = BUILT_PRODUCTS_DIR; };
-		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>"; };
-		26BC7C2910F1B3BC00F91463 /* lldb-types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "lldb-types.h"; path = "include/lldb/lldb-types.h"; sourceTree = "<group>"; };
-		94145430175D7FDE00284436 /* lldb-versioning.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "lldb-versioning.h"; path = "include/lldb/lldb-versioning.h"; sourceTree = "<group>"; };
-		2679260C211CA3AC00EE1D10 /* lldb-vscode */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "lldb-vscode"; sourceTree = BUILT_PRODUCTS_DIR; };
-		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>"; };
-		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>"; };
-		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>"; };
-		AF90106315AB7C5700FF120D /* lldb.1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.man; name = lldb.1; path = docs/lldb.1; sourceTree = "<group>"; };
-		26BC7E7410F1B85900F91463 /* lldb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lldb.cpp; path = source/lldb.cpp; sourceTree = "<group>"; };
-		2669605E1199F4230075C61A /* lldb.swig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = lldb.swig; sourceTree = "<group>"; };
-		26792616211CA3E100EE1D10 /* package.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; name = package.json; path = "tools/lldb-vscode/package.json"; sourceTree = "<group>"; };
-		9A48A3A7124AAA5A00922451 /* python-extensions.swig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "python-extensions.swig"; sourceTree = "<group>"; };
-		944DC3481774C99000D7D884 /* python-swigsafecast.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-swigsafecast.swig"; sourceTree = "<group>"; };
-		94E367CE140C4EEA001C7A5A /* python-typemaps.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-typemaps.swig"; sourceTree = "<group>"; };
-		94005E0313F438DF001EF42D /* python-wrapper.swig */ = {isa = PBXFileReference; lastKnownFileType = text; path = "python-wrapper.swig"; sourceTree = "<group>"; };
-		266960631199F4230075C61A /* sed-sources */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.perl; path = "sed-sources"; sourceTree = "<group>"; };
-		AFF62FDC2006D4D4003644F9 /* test-dwarf.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "test-dwarf.cpp"; path = "DWARF/Inputs/test-dwarf.cpp"; sourceTree = "<group>"; };
-		AFF62FDD2006D4D4003644F9 /* test-dwarf.exe */ = {isa = PBXFileReference; lastKnownFileType = file; name = "test-dwarf.exe"; path = "DWARF/Inputs/test-dwarf.exe"; sourceTree = "<group>"; };
-		23CB151B1D66CFAC00EDDDE1 /* test-pdb-alt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "test-pdb-alt.cpp"; sourceTree = "<group>"; };
-		23CB151C1D66CFAC00EDDDE1 /* test-pdb-nested.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "test-pdb-nested.h"; sourceTree = "<group>"; };
-		23CB151D1D66CFAC00EDDDE1 /* test-pdb-types.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "test-pdb-types.cpp"; sourceTree = "<group>"; };
-		23CB151E1D66CFAC00EDDDE1 /* test-pdb-types.exe */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-pdb-types.exe"; sourceTree = "<group>"; };
-		23CB151F1D66CFAC00EDDDE1 /* test-pdb-types.pdb */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-pdb-types.pdb"; sourceTree = "<group>"; };
-		23CB15201D66CFAC00EDDDE1 /* test-pdb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "test-pdb.cpp"; sourceTree = "<group>"; };
-		23CB15211D66CFAC00EDDDE1 /* test-pdb.exe */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-pdb.exe"; sourceTree = "<group>"; };
-		23CB15221D66CFAC00EDDDE1 /* test-pdb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "test-pdb.h"; sourceTree = "<group>"; };
-		23CB15231D66CFAC00EDDDE1 /* test-pdb.pdb */ = {isa = PBXFileReference; lastKnownFileType = file; path = "test-pdb.pdb"; sourceTree = "<group>"; };
-		3FDFE54A19A2946B009756A7 /* win32.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = win32.h; path = include/lldb/Host/windows/win32.h; sourceTree = "<group>"; };
-		3FDFE54B19A2946B009756A7 /* windows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = windows.h; path = include/lldb/Host/windows/windows.h; sourceTree = "<group>"; };
-		AF415AE51D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = x86AssemblyInspectionEngine.cpp; sourceTree = "<group>"; };
-		AF415AE61D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = x86AssemblyInspectionEngine.h; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		239504D11BDD451400963CEA /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		23CB15481D66DA9300EDDDE1 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				4CEC86A92047395F009B37B1 /* Python.framework in Frameworks */,
-				23CB15491D66DA9300EDDDE1 /* libxml2.2.dylib in Frameworks */,
-				23CB154A1D66DA9300EDDDE1 /* libpanel.dylib in Frameworks */,
-				23CB154B1D66DA9300EDDDE1 /* libedit.dylib in Frameworks */,
-				23CB154C1D66DA9300EDDDE1 /* libz.dylib in Frameworks */,
-				23CB154D1D66DA9300EDDDE1 /* libncurses.dylib in Frameworks */,
-				23CB154E1D66DA9300EDDDE1 /* liblldb-core.a in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26579F66126A25920007C5CB /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26680205115FD0ED008E1FE4 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				260157C81885F53100F875CF /* libpanel.dylib in Frameworks */,
-				2670F8121862B44A006B332C /* libncurses.dylib in Frameworks */,
-				26CEB5EF18761CB2008F575A /* libedit.dylib in Frameworks */,
-				26D55235159A7DB100708D8D /* libxml2.dylib in Frameworks */,
-				268901161335BBC300698AC0 /* liblldb-core.a in Frameworks */,
-				966C6B7A18E6A56A0093F5EC /* libz.dylib in Frameworks */,
-				2668022F115FD19D008E1FE4 /* CoreFoundation.framework in Frameworks */,
-				26680233115FD1A7008E1FE4 /* libobjc.dylib in Frameworks */,
-				4CF3D80C15AF4DC800845BF3 /* Security.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26792609211CA3AC00EE1D10 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				26792623211CA42300EE1D10 /* LLDB.framework in Frameworks */,
-				26792622211CA41E00EE1D10 /* libncurses.tbd in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		2689FFC713353D7A00698AC0 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		2690CD141A6DC0D000E717C8 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				239481861C59EBDD00DF7168 /* libncurses.dylib in Frameworks */,
-				2669424D1A6DC32B0063BE93 /* LLDB.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26DC6A0E1337FE6900FF7998 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				260157C61885F51C00F875CF /* libpanel.dylib in Frameworks */,
-				966C6B7C18E6A56A0093F5EC /* libz.dylib in Frameworks */,
-				26780C611867C33D00234593 /* libncurses.dylib in Frameworks */,
-				26CFDCA818616473000E63E5 /* libedit.dylib in Frameworks */,
-				2606EDDF184E68A10034641B /* liblldb-core.a in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26F5C26810F3D9A4009D5894 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				26F5C32D10F3DFDD009D5894 /* libtermcap.dylib in Frameworks */,
-				2668035C11601108008E1FE4 /* LLDB.framework in Frameworks */,
-				966C6B7918E6A56A0093F5EC /* libz.dylib in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		942829BD1A89835300521B30 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				2656BBC31AE0739C00441749 /* libedit.dylib in Frameworks */,
-				2656BBC61AE073B500441749 /* libz.dylib in Frameworks */,
-				2656BBC51AE073AD00441749 /* libpanel.dylib in Frameworks */,
-				2656BBC41AE073A800441749 /* libncurses.dylib in Frameworks */,
-				942829CC1A89839300521B30 /* liblldb-core.a in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		08FB7794FE84155DC02AAC07 /* lldb */ = {
-			isa = PBXGroup;
-			children = (
-				AF5CEC87206079A500384F20 /* com.apple.internal.xpc.remote.debugserver.plist */,
-				239481851C59EBDD00DF7168 /* libncurses.dylib */,
-				2326CF4E1BDD687800A5CEAC /* libpanel.dylib */,
-				2326CF4C1BDD684B00A5CEAC /* libedit.dylib */,
-				2326CF4A1BDD681800A5CEAC /* libz.dylib */,
-				2326CF471BDD67C100A5CEAC /* libncurses.dylib */,
-				2326CF451BDD647400A5CEAC /* Foundation.framework */,
-				2326CF3F1BDD613E00A5CEAC /* Python.framework */,
-				26F5C32810F3DF7D009D5894 /* Libraries */,
-				264E8576159BE51A00E9D7A2 /* Resources */,
-				08FB7795FE84155DC02AAC07 /* Source */,
-				26F5C22410F3D950009D5894 /* Tools */,
-				2690CD181A6DC0D000E717C8 /* lldb-mi */,
-				1AB674ADFE9D54B511CA2CBB /* Products */,
-				2321F9331BDD326500BA9A93 /* unittests */,
-				236102941CF389BE00B8E0B9 /* cmake */,
-				23CB14E21D66CA2200EDDDE1 /* Frameworks */,
-			);
-			name = lldb;
-			sourceTree = "<group>";
-		};
-		08FB7795FE84155DC02AAC07 /* Source */ = {
-			isa = PBXGroup;
-			children = (
-				266960581199F4230075C61A /* Scripts */,
-				26BC7E7410F1B85900F91463 /* lldb.cpp */,
-				26BC7C2A10F1B3BC00F91463 /* lldb-private.h */,
-				26217932133BCB850083B112 /* lldb-private-enumerations.h */,
-				26BC7C2810F1B3BC00F91463 /* lldb-private-interfaces.h */,
-				26217930133BC8640083B112 /* lldb-private-types.h */,
-				262D3190111B4341004E6F88 /* API */,
-				26BC7CEB10F1B70800F91463 /* Breakpoint */,
-				26BC7D0D10F1B71D00F91463 /* Commands */,
-				26BC7C1010F1B34800F91463 /* Core */,
-				94CB255616B0683B0059775D /* DataFormatters */,
-				26BC7DBE10F1B78200F91463 /* Expression */,
-				26BC7DD010F1B7C100F91463 /* Host */,
-				3F8169261ABB73C1001DA9DF /* Initialization */,
-				26BC7DDF10F1B7E200F91463 /* Interpreter */,
-				260C897110F57C5600BB2B04 /* Plugins */,
-				26BC7C4B10F1B6C100F91463 /* Symbol */,
-				26BC7DEF10F1B80200F91463 /* Target */,
-				2682F168115ED9C800CCFF99 /* Utility */,
-			);
-			name = Source;
-			sourceTree = "<group>";
-			usesTabs = 0;
-		};
-		1AB674ADFE9D54B511CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				26F5C26A10F3D9A4009D5894 /* lldb */,
-				26680207115FD0ED008E1FE4 /* LLDB.framework */,
-				26579F68126A25920007C5CB /* darwin-debug */,
-				26DC6A101337FE6900FF7998 /* lldb-server */,
-				2690CD171A6DC0D000E717C8 /* lldb-mi */,
-				942829C01A89835300521B30 /* lldb-argdumper */,
-				239504D41BDD451400963CEA /* lldb-gtest */,
-				23CB15561D66DA9300EDDDE1 /* lldb-gtest */,
-				2679260C211CA3AC00EE1D10 /* lldb-vscode */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-			usesTabs = 0;
-		};
-		2321F9331BDD326500BA9A93 /* unittests */ = {
-			isa = PBXGroup;
-			children = (
-				9A1890301F47D5BC00394BCA /* TestingSupport */,
-				23E2E52C1D903806006F38BB /* Breakpoint */,
-				23CB14E51D66CBEB00EDDDE1 /* Core */,
-				9A2057421F3B904C00F6C293 /* debugserver */,
-				AF7F97652141FA2100795BC0 /* Disassembler */,
-				2326CF501BDD68CA00A5CEAC /* Editline */,
-				AEC6FF9D1BE97035007882C1 /* Expression */,
-				239504C21BDD3FD600963CEA /* gtest_common.h */,
-				2321F9371BDD32ED00BA9A93 /* Host */,
-				2321F93C1BDD339A00BA9A93 /* Interpreter */,
-				23CB14F51D66CCB700EDDDE1 /* Language */,
-				9A2057221F3B8DA600F6C293 /* ObjectFile */,
-				9A2057191F3B864D00F6C293 /* Platform */,
-				2370A3781D66C549000E7BE6 /* Process */,
-				2321F93F1BDD33D800BA9A93 /* ScriptInterpreter */,
-				9A20571D1F3B8D1100F6C293 /* Signals */,
-				23CB15091D66CF2B00EDDDE1 /* Symbol */,
-				23CB150A1D66CF3200EDDDE1 /* SymbolFile */,
-				AFAFD8081E57E19E0017A14F /* Target */,
-				AFEC5FD31D94F9130076A480 /* UnwindAssembly */,
-				2321F9421BDD343A00BA9A93 /* Utility */,
-			);
-			path = unittests;
-			sourceTree = "<group>";
-		};
-		2321F9371BDD32ED00BA9A93 /* Host */ = {
-			isa = PBXGroup;
-			children = (
-				9A20573B1F3B8E8500F6C293 /* linux */,
-				9A20572E1F3B8E7600F6C293 /* FileSystemTest.cpp */,
-				9A20572F1F3B8E7600F6C293 /* HostTest.cpp */,
-				9A2057301F3B8E7600F6C293 /* MainLoopTest.cpp */,
-				2321F9381BDD332400BA9A93 /* CMakeLists.txt */,
-				2321F9391BDD332400BA9A93 /* SocketAddressTest.cpp */,
-				2321F93A1BDD332400BA9A93 /* SocketTest.cpp */,
-				26FCE61B229F00F000D125BD /* SocketTestUtilities.cpp */,
-				2321F9451BDD346100BA9A93 /* TaskPoolTest.cpp */,
-			);
-			path = Host;
-			sourceTree = "<group>";
-		};
-		2321F93C1BDD339A00BA9A93 /* Interpreter */ = {
-			isa = PBXGroup;
-			children = (
-				2321F93D1BDD33CE00BA9A93 /* CMakeLists.txt */,
-				2321F93E1BDD33CE00BA9A93 /* ArgsTest.cpp */,
-				9A20572B1F3B8E6200F6C293 /* TestCompletion.cpp */,
-				4C719398207D23E300FDF430 /* TestOptionArgParser.cpp */,
-			);
-			path = Interpreter;
-			sourceTree = "<group>";
-		};
-		2321F93F1BDD33D800BA9A93 /* ScriptInterpreter */ = {
-			isa = PBXGroup;
-			children = (
-				2321F9401BDD340D00BA9A93 /* CMakeLists.txt */,
-				2321F94B1BDD35D500BA9A93 /* Python */,
-			);
-			path = ScriptInterpreter;
-			sourceTree = "<group>";
-		};
-		2321F9421BDD343A00BA9A93 /* Utility */ = {
-			isa = PBXGroup;
-			children = (
-				4C639EC721FA684800A7B957 /* AnsiTerminalTest.cpp */,
-				23E2E5161D903689006F38BB /* ArchSpecTest.cpp */,
-				23CB14E61D66CC0E00EDDDE1 /* BroadcasterTest.cpp */,
-				7F94D7172040A13A006EE3EA /* CleanUpTest.cpp */,
-				4C639EC921FA684800A7B957 /* CompletionRequestTest.cpp */,
-				9A3D43C81F3150D200EB767C /* ConstStringTest.cpp */,
-				AFA1B62B219E0ED900A8AB7E /* DataExtractorTest.cpp */,
-				4C639EBD21FA684600A7B957 /* EnvironmentTest.cpp */,
-				4C639EC521FA684800A7B957 /* EventTest.cpp */,
-				4C639EC821FA684800A7B957 /* FlagsTest.cpp */,
-				23CB14FD1D66CD2400EDDDE1 /* FileSpecTest.cpp */,
-				8C3BD99F1EF5D1B50016C343 /* JSONTest.cpp */,
-				9A3D43E31F3237D500EB767C /* ListenerTest.cpp */,
-				9A3D43C71F3150D200EB767C /* LogTest.cpp */,
-				9A3D43CB1F3150D200EB767C /* NameMatchesTest.cpp */,
-				4C639EC321FA684700A7B957 /* OptionsWithRawTest.cpp */,
-				4C639EC021FA684700A7B957 /* PredicateTest.cpp */,
-				4C639EC421FA684800A7B957 /* RegisterValueTest.cpp */,
-				4C639EC121FA684700A7B957 /* ReproducerTest.cpp */,
-				DD6C13BC220A6F6A005C2AE8 /* ReproducerInstrumentationTest.cpp */,
-				23CB14E91D66CC0E00EDDDE1 /* ScalarTest.cpp */,
-				9A3D43E21F3237D500EB767C /* StateTest.cpp */,
-				9A3D43C61F3150D200EB767C /* StatusTest.cpp */,
-				4C639EBF21FA684700A7B957 /* StreamTest.cpp */,
-				58EAC73D2106A0740029571E /* StreamTeeTest.cpp */,
-				2321F9441BDD346100BA9A93 /* StringExtractorTest.cpp */,
-				DD8F278022011D0F004ED75B /* FileCollectorTest.cpp */,
-				4C639EC621FA684800A7B957 /* StringLexerTest.cpp */,
-				4C639EBE21FA684600A7B957 /* StringListTest.cpp */,
-				9A3D43CA1F3150D200EB767C /* StructuredDataTest.cpp */,
-				9A3D43C91F3150D200EB767C /* TildeExpressionResolverTest.cpp */,
-				9A3D43CC1F3150D200EB767C /* TimeoutTest.cpp */,
-				9A3D43C51F3150D200EB767C /* TimerTest.cpp */,
-				2321F9461BDD346100BA9A93 /* UriParserTest.cpp */,
-				4C639EC221FA684700A7B957 /* UUIDTest.cpp */,
-				4C639ECA21FA684900A7B957 /* VMRangeTest.cpp */,
-				9A3D43C41F3150D200EB767C /* VASprintfTest.cpp */,
-				2321F9431BDD346100BA9A93 /* CMakeLists.txt */,
-				23CB15041D66CD9200EDDDE1 /* Inputs */,
-			);
-			path = Utility;
-			sourceTree = "<group>";
-		};
-		2321F94B1BDD35D500BA9A93 /* Python */ = {
-			isa = PBXGroup;
-			children = (
-				2321F94C1BDD360F00BA9A93 /* CMakeLists.txt */,
-				2321F94D1BDD360F00BA9A93 /* PythonDataObjectsTests.cpp */,
-				3FA093141BF65D3A0037DD08 /* PythonExceptionStateTests.cpp */,
-				AF45E1FC1BF57C8D000563EB /* PythonTestSuite.cpp */,
-				AF45E1FD1BF57C8D000563EB /* PythonTestSuite.h */,
-			);
-			path = Python;
-			sourceTree = "<group>";
-		};
-		2326CF501BDD68CA00A5CEAC /* Editline */ = {
-			isa = PBXGroup;
-			children = (
-				23CB14F11D66CC9000EDDDE1 /* CMakeLists.txt */,
-				2326CF511BDD693B00A5CEAC /* EditlineTest.cpp */,
-			);
-			path = Editline;
-			sourceTree = "<group>";
-		};
-		233B009C19610D130090E598 /* linux */ = {
-			isa = PBXGroup;
-			children = (
-				3FDFE56319AF9B77009756A7 /* Config.h */,
-				233B009D19610D6B0090E598 /* Host.cpp */,
-				237C577A19AF9D9F00213D59 /* HostInfoLinux.h */,
-				3FDFE53619A2933E009756A7 /* HostInfoLinux.cpp */,
-				3FDFE56419AF9B77009756A7 /* HostInfoLinux.h */,
-				3FDFE56219AF9B60009756A7 /* HostThreadLinux.cpp */,
-				3FDFE56519AF9B77009756A7 /* HostThreadLinux.h */,
-			);
-			name = linux;
-			path = source/Host/linux;
-			sourceTree = "<group>";
-		};
-		236102941CF389BE00B8E0B9 /* cmake */ = {
-			isa = PBXGroup;
-			children = (
-				236102961CF389F800B8E0B9 /* modules */,
-				236102971CF38A0900B8E0B9 /* platforms */,
-			);
-			path = cmake;
-			sourceTree = "<group>";
-		};
-		236102961CF389F800B8E0B9 /* modules */ = {
-			isa = PBXGroup;
-			children = (
-				236102981CF38A2B00B8E0B9 /* AddLLDB.cmake */,
-				236102991CF38A2B00B8E0B9 /* LLDBConfig.cmake */,
-				2361029A1CF38A2B00B8E0B9 /* LLDBStandalone.cmake */,
-			);
-			path = modules;
-			sourceTree = "<group>";
-		};
-		236102971CF38A0900B8E0B9 /* platforms */ = {
-			isa = PBXGroup;
-			children = (
-				2361029E1CF38A3500B8E0B9 /* Android.cmake */,
-			);
-			path = platforms;
-			sourceTree = "<group>";
-		};
-		2370A3781D66C549000E7BE6 /* Process */ = {
-			isa = PBXGroup;
-			children = (
-				2370A37A1D66C57B000E7BE6 /* CMakeLists.txt */,
-				2370A3791D66C569000E7BE6 /* gdb-remote */,
-				23E2E5181D9036CF006F38BB /* minidump */,
-			);
-			path = Process;
-			sourceTree = "<group>";
-		};
-		2370A3791D66C569000E7BE6 /* gdb-remote */ = {
-			isa = PBXGroup;
-			children = (
-				2370A37C1D66C587000E7BE6 /* CMakeLists.txt */,
-				2370A37D1D66C587000E7BE6 /* GDBRemoteClientBaseTest.cpp */,
-				2370A37E1D66C587000E7BE6 /* GDBRemoteCommunicationClientTest.cpp */,
-				2370A37F1D66C587000E7BE6 /* GDBRemoteTestUtils.cpp */,
-				2370A3801D66C587000E7BE6 /* GDBRemoteTestUtils.h */,
-			);
-			path = "gdb-remote";
-			sourceTree = "<group>";
-		};
-		238F2BA41D2C858F001FF92A /* StructuredData */ = {
-			isa = PBXGroup;
-			children = (
-				238F2BA51D2C85B2001FF92A /* DarwinLog */,
-			);
-			path = StructuredData;
-			sourceTree = "<group>";
-		};
-		238F2BA51D2C85B2001FF92A /* DarwinLog */ = {
-			isa = PBXGroup;
-			children = (
-				238F2BA71D2C85FA001FF92A /* StructuredDataDarwinLog.h */,
-				238F2BA61D2C85FA001FF92A /* StructuredDataDarwinLog.cpp */,
-			);
-			path = DarwinLog;
-			sourceTree = "<group>";
-		};
-		23AB0526199FF5D3003B8084 /* FreeBSD */ = {
-			isa = PBXGroup;
-			children = (
-				AF3F54B21B3BA5D500186E73 /* POSIXStopInfo.cpp */,
-				AF3F54B31B3BA5D500186E73 /* POSIXStopInfo.h */,
-				26474CC818D0CB5B0073DEBA /* RegisterContextPOSIX.h */,
-				AF3F54B81B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm.cpp */,
-				AF3F54B91B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm.h */,
-				AF3F54BA1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm64.cpp */,
-				AF3F54BB1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_arm64.h */,
-				AF3F54BC1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_mips64.cpp */,
-				AF3F54BD1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_mips64.h */,
-				AF3F54BE1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_powerpc.cpp */,
-				AF3F54BF1B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_powerpc.h */,
-				AF3F54C01B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_x86.cpp */,
-				AF3F54C11B3BA5D500186E73 /* RegisterContextPOSIXProcessMonitor_x86.h */,
-				23AB052E199FF639003B8084 /* FreeBSDThread.h */,
-				23AB052D199FF639003B8084 /* FreeBSDThread.cpp */,
-				23AB0530199FF639003B8084 /* ProcessFreeBSD.h */,
-				23AB052F199FF639003B8084 /* ProcessFreeBSD.cpp */,
-				23AB0532199FF639003B8084 /* ProcessMonitor.h */,
-				23AB0531199FF639003B8084 /* ProcessMonitor.cpp */,
-			);
-			path = FreeBSD;
-			sourceTree = "<group>";
-		};
-		23CB14E21D66CA2200EDDDE1 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				26792621211CA41E00EE1D10 /* libncurses.tbd */,
-				23CB14E31D66CA2200EDDDE1 /* libxml2.2.dylib */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		23CB14E51D66CBEB00EDDDE1 /* Core */ = {
-			isa = PBXGroup;
-			children = (
-				23CB14E71D66CC0E00EDDDE1 /* CMakeLists.txt */,
-				58A080B12112AB2200D5580F /* HighlighterTest.cpp */,
-				4F29D3CD21010F84003B549A /* MangledTest.cpp */,
-				4FBC04F3211A0F0F0015A814 /* RichManglingContextTest.cpp */,
-				9A3D43E11F3237D500EB767C /* StreamCallbackTest.cpp */,
-			);
-			path = Core;
-			sourceTree = "<group>";
-		};
-		23CB14F51D66CCB700EDDDE1 /* Language */ = {
-			isa = PBXGroup;
-			children = (
-				23CB14F61D66CCD600EDDDE1 /* CMakeLists.txt */,
-				23CB14F81D66CCDA00EDDDE1 /* CPlusPlus */,
-			);
-			path = Language;
-			sourceTree = "<group>";
-		};
-		23CB14F81D66CCDA00EDDDE1 /* CPlusPlus */ = {
-			isa = PBXGroup;
-			children = (
-				23CB14F91D66CCF100EDDDE1 /* CMakeLists.txt */,
-				23CB14FA1D66CCF100EDDDE1 /* CPlusPlusLanguageTest.cpp */,
-			);
-			path = CPlusPlus;
-			sourceTree = "<group>";
-		};
-		23CB15041D66CD9200EDDDE1 /* Inputs */ = {
-			isa = PBXGroup;
-			children = (
-				9A3D43DF1F31521200EB767C /* StructuredData-basic.json */,
-				23CB15051D66CDB400EDDDE1 /* TestModule.c */,
-				23CB15061D66CDB400EDDDE1 /* TestModule.so */,
-			);
-			path = Inputs;
-			sourceTree = "<group>";
-		};
-		23CB15091D66CF2B00EDDDE1 /* Symbol */ = {
-			isa = PBXGroup;
-			children = (
-				9A2057131F3B860D00F6C293 /* TestDWARFCallFrameInfo.cpp */,
-				9A2057141F3B860D00F6C293 /* TestType.cpp */,
-				23CB150B1D66CF5600EDDDE1 /* CMakeLists.txt */,
-				AFB4C8122228A7AE0018086A /* LocateSymbolFileTest.cpp */,
-				23CB150C1D66CF5600EDDDE1 /* TestClangASTContext.cpp */,
-			);
-			path = Symbol;
-			sourceTree = "<group>";
-		};
-		23CB150A1D66CF3200EDDDE1 /* SymbolFile */ = {
-			isa = PBXGroup;
-			children = (
-				23CB15101D66CF6900EDDDE1 /* CMakeLists.txt */,
-				9A2057091F3B81DE00F6C293 /* DWARF */,
-				23CB15121D66CF6E00EDDDE1 /* PDB */,
-			);
-			path = SymbolFile;
-			sourceTree = "<group>";
-		};
-		23CB15121D66CF6E00EDDDE1 /* PDB */ = {
-			isa = PBXGroup;
-			children = (
-				23CB15131D66CF8700EDDDE1 /* CMakeLists.txt */,
-				23CB15181D66CF9500EDDDE1 /* Inputs */,
-				23CB15141D66CF8700EDDDE1 /* SymbolFilePDBTests.cpp */,
-			);
-			path = PDB;
-			sourceTree = "<group>";
-		};
-		23CB15181D66CF9500EDDDE1 /* Inputs */ = {
-			isa = PBXGroup;
-			children = (
-				23CB151B1D66CFAC00EDDDE1 /* test-pdb-alt.cpp */,
-				23CB151C1D66CFAC00EDDDE1 /* test-pdb-nested.h */,
-				23CB151D1D66CFAC00EDDDE1 /* test-pdb-types.cpp */,
-				23CB151E1D66CFAC00EDDDE1 /* test-pdb-types.exe */,
-				23CB151F1D66CFAC00EDDDE1 /* test-pdb-types.pdb */,
-				23CB15201D66CFAC00EDDDE1 /* test-pdb.cpp */,
-				23CB15211D66CFAC00EDDDE1 /* test-pdb.exe */,
-				23CB15221D66CFAC00EDDDE1 /* test-pdb.h */,
-				23CB15231D66CFAC00EDDDE1 /* test-pdb.pdb */,
-			);
-			path = Inputs;
-			sourceTree = "<group>";
-		};
-		23E2E5181D9036CF006F38BB /* minidump */ = {
-			isa = PBXGroup;
-			children = (
-				23E2E5191D9036F2006F38BB /* CMakeLists.txt */,
-				23E2E51A1D9036F2006F38BB /* MinidumpParserTest.cpp */,
-				23E2E51D1D9036F6006F38BB /* Inputs */,
-			);
-			path = minidump;
-			sourceTree = "<group>";
-		};
-		23E2E51D1D9036F6006F38BB /* Inputs */ = {
-			isa = PBXGroup;
-			children = (
-				23E2E51E1D903726006F38BB /* fizzbuzz_no_heap.dmp */,
-				23E2E51F1D903726006F38BB /* linux-x86_64.cpp */,
-				23E2E5201D903726006F38BB /* linux-x86_64.dmp */,
-			);
-			path = Inputs;
-			sourceTree = "<group>";
-		};
-		23E2E52C1D903806006F38BB /* Breakpoint */ = {
-			isa = PBXGroup;
-			children = (
-				23E2E52D1D90382B006F38BB /* BreakpointIDTest.cpp */,
-			);
-			path = Breakpoint;
-			sourceTree = "<group>";
-		};
-		23E2E5351D9048E7006F38BB /* minidump */ = {
-			isa = PBXGroup;
-			children = (
-				2619C4812107A9A1009CDE81 /* RegisterContextMinidump_ARM.cpp */,
-				2619C4832107A9A2009CDE81 /* RegisterContextMinidump_ARM.h */,
-				2619C4802107A9A1009CDE81 /* RegisterContextMinidump_ARM64.cpp */,
-				2619C4822107A9A2009CDE81 /* RegisterContextMinidump_ARM64.h */,
-				AFD65C7F1D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.cpp */,
-				AFD65C801D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.h */,
-				23E2E5361D9048FB006F38BB /* CMakeLists.txt */,
-				23E2E5371D9048FB006F38BB /* MinidumpParser.cpp */,
-				23E2E5381D9048FB006F38BB /* MinidumpParser.h */,
-				23E2E5391D9048FB006F38BB /* MinidumpTypes.cpp */,
-				23E2E53A1D9048FB006F38BB /* MinidumpTypes.h */,
-				947CF76F1DC7B1E300EF980B /* ProcessMinidump.h */,
-				947CF7701DC7B1EE00EF980B /* ProcessMinidump.cpp */,
-				947CF7721DC7B20300EF980B /* RegisterContextMinidump_x86_32.h */,
-				947CF7731DC7B20300EF980B /* ThreadMinidump.h */,
-				947CF7741DC7B20D00EF980B /* RegisterContextMinidump_x86_32.cpp */,
-				947CF7751DC7B20D00EF980B /* ThreadMinidump.cpp */,
-			);
-			path = minidump;
-			sourceTree = "<group>";
-		};
-		260C897110F57C5600BB2B04 /* Plugins */ = {
-			isa = PBXGroup;
-			children = (
-				AF2E029F1FA2CE8A00A86C34 /* Architecture */,
-				8CF02ADD19DCBEC200B14BE0 /* InstrumentationRuntime */,
-				8C2D6A58197A1FB9006989C9 /* MemoryHistory */,
-				26DB3E051379E7AD0080DC73 /* ABI */,
-				260C897210F57C5600BB2B04 /* Disassembler */,
-				260C897810F57C5600BB2B04 /* DynamicLoader */,
-				4984BA0B1B975E9F008658D4 /* ExpressionParser */,
-				26D9FDCA12F785120003F2EE /* Instruction */,
-				AF2BCA6518C7EFDE005B4526 /* JITLoader */,
-				94B638541B8FABEA004FE1E4 /* Language */,
-				4CCA643A13B40B82003BDF98 /* LanguageRuntime */,
-				260C897E10F57C5600BB2B04 /* ObjectContainer */,
-				260C898210F57C5600BB2B04 /* ObjectFile */,
-				266DFE9013FD64D200D0C574 /* OperatingSystem */,
-				26C5577E132575B6008FD8FE /* Platform */,
-				260C898A10F57C5600BB2B04 /* Process */,
-				3FBA69DA1B6066D20008F44A /* ScriptInterpreter */,
-				238F2BA41D2C858F001FF92A /* StructuredData */,
-				AF11CB34182CA85A00D9B618 /* SystemRuntime */,
-				260C89B110F57C5600BB2B04 /* SymbolFile */,
-				260C89E010F57C5600BB2B04 /* SymbolVendor */,
-				26AC3F441365F40E0065C7EF /* UnwindAssembly */,
-			);
-			name = Plugins;
-			path = source/Plugins;
-			sourceTree = "<group>";
-		};
-		260C897210F57C5600BB2B04 /* Disassembler */ = {
-			isa = PBXGroup;
-			children = (
-				260C897310F57C5600BB2B04 /* llvm */,
-			);
-			path = Disassembler;
-			sourceTree = "<group>";
-		};
-		260C897310F57C5600BB2B04 /* llvm */ = {
-			isa = PBXGroup;
-			children = (
-				B299580A14F2FA1400050A04 /* DisassemblerLLVMC.cpp */,
-				B299580C14F2FA1F00050A04 /* DisassemblerLLVMC.h */,
-			);
-			path = llvm;
-			sourceTree = "<group>";
-		};
-		260C897810F57C5600BB2B04 /* DynamicLoader */ = {
-			isa = PBXGroup;
-			children = (
-				26274FA414030F79006BA130 /* Darwin-Kernel */,
-				2666ADBF1B3CB675001FAFD3 /* Hexagon-DYLD */,
-				260C897910F57C5600BB2B04 /* MacOSX-DYLD */,
-				26FFC19214FC072100087D58 /* POSIX-DYLD */,
-				26F006521B4DD86700B872E5 /* Windows-DYLD */,
-				268A683C1321B505000E3FB8 /* Static */,
-			);
-			path = DynamicLoader;
-			sourceTree = "<group>";
-		};
-		260C897910F57C5600BB2B04 /* MacOSX-DYLD */ = {
-			isa = PBXGroup;
-			children = (
-				AF27AD531D3603EA00CF2833 /* DynamicLoaderDarwin.cpp */,
-				AF27AD541D3603EA00CF2833 /* DynamicLoaderDarwin.h */,
-				AF2907BD1D3F082400E10654 /* DynamicLoaderMacOS.cpp */,
-				AF2907BE1D3F082400E10654 /* DynamicLoaderMacOS.h */,
-				260C897A10F57C5600BB2B04 /* DynamicLoaderMacOSXDYLD.cpp */,
-				260C897B10F57C5600BB2B04 /* DynamicLoaderMacOSXDYLD.h */,
-			);
-			path = "MacOSX-DYLD";
-			sourceTree = "<group>";
-		};
-		260C897E10F57C5600BB2B04 /* ObjectContainer */ = {
-			isa = PBXGroup;
-			children = (
-				26A3B4AB1181454800381BC2 /* BSD-Archive */,
-				260C897F10F57C5600BB2B04 /* Universal-Mach-O */,
-			);
-			path = ObjectContainer;
-			sourceTree = "<group>";
-		};
-		260C897F10F57C5600BB2B04 /* Universal-Mach-O */ = {
-			isa = PBXGroup;
-			children = (
-				260C898010F57C5600BB2B04 /* ObjectContainerUniversalMachO.cpp */,
-				260C898110F57C5600BB2B04 /* ObjectContainerUniversalMachO.h */,
-			);
-			path = "Universal-Mach-O";
-			sourceTree = "<group>";
-		};
-		260C898210F57C5600BB2B04 /* ObjectFile */ = {
-			isa = PBXGroup;
-			children = (
-				4C9BF11621C0467700FA4036 /* Breakpad */,
-				260C898310F57C5600BB2B04 /* ELF */,
-				26EFC4C718CFAF0D00865D87 /* JIT */,
-				260C898710F57C5600BB2B04 /* Mach-O */,
-				26E152221419CACA007967D0 /* PECOFF */,
-			);
-			path = ObjectFile;
-			sourceTree = "<group>";
-		};
-		260C898310F57C5600BB2B04 /* ELF */ = {
-			isa = PBXGroup;
-			children = (
-				26D27C9E11ED3A4E0024D721 /* ELFHeader.h */,
-				26D27C9D11ED3A4E0024D721 /* ELFHeader.cpp */,
-				260C898610F57C5600BB2B04 /* ObjectFileELF.h */,
-				260C898510F57C5600BB2B04 /* ObjectFileELF.cpp */,
-			);
-			path = ELF;
-			sourceTree = "<group>";
-		};
-		260C898710F57C5600BB2B04 /* Mach-O */ = {
-			isa = PBXGroup;
-			children = (
-				260C898810F57C5600BB2B04 /* ObjectFileMachO.cpp */,
-				260C898910F57C5600BB2B04 /* ObjectFileMachO.h */,
-			);
-			path = "Mach-O";
-			sourceTree = "<group>";
-		};
-		260C898A10F57C5600BB2B04 /* Process */ = {
-			isa = PBXGroup;
-			children = (
-				23E2E5351D9048E7006F38BB /* minidump */,
-				26BC179F18C7F4CB00D2196D /* elf-core */,
-				23AB0526199FF5D3003B8084 /* FreeBSD */,
-				4CEE62F71145F1C70064CF93 /* GDB Remote */,
-				2642FBA713D003B400ED6808 /* MacOSX-Kernel */,
-				26A527BC14E24F5F00F3A14A /* mach-core */,
-				26BC17B318C7F4FA00D2196D /* POSIX */,
-				26B4666E11A2080F00CF6220 /* Utility */,
-			);
-			path = Process;
-			sourceTree = "<group>";
-		};
-		260C89B110F57C5600BB2B04 /* SymbolFile */ = {
-			isa = PBXGroup;
-			children = (
-				AF97744421E99467006876A7 /* Breakpad */,
-				AFD966B321714099006714AC /* NativePDB */,
-				AF6335DF1C87B20A00F7D554 /* PDB */,
-				260C89B210F57C5600BB2B04 /* DWARF */,
-				260C89DD10F57C5600BB2B04 /* Symtab */,
-			);
-			path = SymbolFile;
-			sourceTree = "<group>";
-		};
-		260C89B210F57C5600BB2B04 /* DWARF */ = {
-			isa = PBXGroup;
-			children = (
-				4CD44CFA20B37C440003557C /* AppleDWARFIndex.cpp */,
-				4CD44CFF20B37C580003557C /* AppleDWARFIndex.h */,
-				6D95DC031B9DC06F000E318A /* DIERef.h */,
-				6D95DC041B9DC06F000E318A /* SymbolFileDWARFDwo.h */,
-				6D95DBFD1B9DC057000E318A /* DIERef.cpp */,
-				6D95DBFE1B9DC057000E318A /* HashedNameToDIE.cpp */,
-				6D95DBFF1B9DC057000E318A /* SymbolFileDWARFDwo.cpp */,
-				AF116BED20CF234B0071093F /* DebugNamesDWARFIndex.cpp */,
-				AF116BEE20CF234B0071093F /* DebugNamesDWARFIndex.h */,
-				260C89B310F57C5600BB2B04 /* DWARFAbbreviationDeclaration.cpp */,
-				260C89B410F57C5600BB2B04 /* DWARFAbbreviationDeclaration.h */,
-				269DDD451B8FD01A00D0DBD8 /* DWARFASTParser.h */,
-				269DDD491B8FD1C300D0DBD8 /* DWARFASTParserClang.h */,
-				269DDD481B8FD1C300D0DBD8 /* DWARFASTParserClang.cpp */,
-				260C89B610F57C5600BB2B04 /* DWARFAttribute.h */,
-				266E829C1B8E542C008FCA06 /* DWARFAttribute.cpp */,
-				4CD44D4020B777850003557C /* DWARFBaseDIE.cpp */,
-				4CD44D4120B777850003557C /* DWARFBaseDIE.h */,
-				260C89B710F57C5600BB2B04 /* DWARFCompileUnit.cpp */,
-				260C89B810F57C5600BB2B04 /* DWARFCompileUnit.h */,
-				AF5B97D92242FC27002D3F2C /* DWARFContext.cpp */,
-				AF5B97DA2242FC27002D3F2C /* DWARFContext.h */,
-				26AB92101819D74600E63F3E /* DWARFDataExtractor.cpp */,
-				26AB92111819D74600E63F3E /* DWARFDataExtractor.h */,
-				260C89B910F57C5600BB2B04 /* DWARFDebugAbbrev.cpp */,
-				260C89BA10F57C5600BB2B04 /* DWARFDebugAbbrev.h */,
-				260C89BB10F57C5600BB2B04 /* DWARFDebugAranges.cpp */,
-				260C89BC10F57C5600BB2B04 /* DWARFDebugAranges.h */,
-				260C89BD10F57C5600BB2B04 /* DWARFDebugArangeSet.cpp */,
-				260C89BE10F57C5600BB2B04 /* DWARFDebugArangeSet.h */,
-				260C89BF10F57C5600BB2B04 /* DWARFDebugInfo.cpp */,
-				260C89C010F57C5600BB2B04 /* DWARFDebugInfo.h */,
-				260C89C110F57C5600BB2B04 /* DWARFDebugInfoEntry.cpp */,
-				260C89C210F57C5600BB2B04 /* DWARFDebugInfoEntry.h */,
-				260C89C310F57C5600BB2B04 /* DWARFDebugLine.cpp */,
-				260C89C410F57C5600BB2B04 /* DWARFDebugLine.h */,
-				23E77CD61C20F29F007192AD /* DWARFDebugMacro.cpp */,
-				23E77CD71C20F29F007192AD /* DWARFDebugMacro.h */,
-				260C89CD10F57C5600BB2B04 /* DWARFDebugRanges.cpp */,
-				260C89CE10F57C5600BB2B04 /* DWARFDebugRanges.h */,
-				26B1EFAC154638AF00E2DAC7 /* DWARFDeclContext.cpp */,
-				26B1EFAD154638AF00E2DAC7 /* DWARFDeclContext.h */,
-				260C89CF10F57C5600BB2B04 /* DWARFDefines.cpp */,
-				260C89D010F57C5600BB2B04 /* DWARFDefines.h */,
-				266E82951B8CE346008FCA06 /* DWARFDIE.h */,
-				266E82961B8CE3AC008FCA06 /* DWARFDIE.cpp */,
-				260C89D310F57C5600BB2B04 /* DWARFFormValue.cpp */,
-				260C89D410F57C5600BB2B04 /* DWARFFormValue.h */,
-				4CD44CF820B37C440003557C /* DWARFIndex.cpp */,
-				4CD44CFE20B37C570003557C /* DWARFIndex.h */,
-				4C645D022295D3B500D3C034 /* DWARFTypeUnit.cpp */,
-				4C645D032295D3B600D3C034 /* DWARFTypeUnit.h */,
-				7F2AAA5920601BE000A422D8 /* DWARFUnit.cpp */,
-				7F2AAA5820601BDF00A422D8 /* DWARFUnit.h */,
-				26A0DA4D140F721D006DA411 /* HashedNameToDIE.h */,
-				26109B3B1155D70100CC3529 /* LogChannelDWARF.cpp */,
-				26109B3C1155D70100CC3529 /* LogChannelDWARF.h */,
-				4CD44CF920B37C440003557C /* ManualDWARFIndex.cpp */,
-				4CD44D0020B37C580003557C /* ManualDWARFIndex.h */,
-				2618D9EA12406FE600F2B8FE /* NameToDIE.cpp */,
-				2618D957124056C700F2B8FE /* NameToDIE.h */,
-				260C89D910F57C5600BB2B04 /* SymbolFileDWARF.cpp */,
-				260C89DA10F57C5600BB2B04 /* SymbolFileDWARF.h */,
-				260C89DB10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.cpp */,
-				260C89DC10F57C5600BB2B04 /* SymbolFileDWARFDebugMap.h */,
-				4C7D481C1F509963005314B4 /* SymbolFileDWARFDwp.cpp */,
-				4C7D481E1F509964005314B4 /* SymbolFileDWARFDwp.h */,
-				4C7D481F1F509964005314B4 /* SymbolFileDWARFDwoDwp.cpp */,
-				4C7D481D1F509964005314B4 /* SymbolFileDWARFDwoDwp.h */,
-				26B8B42212EEC52A00A831B2 /* UniqueDWARFASTType.h */,
-				26B8B42312EEC52A00A831B2 /* UniqueDWARFASTType.cpp */,
-			);
-			path = DWARF;
-			sourceTree = "<group>";
-		};
-		260C89DD10F57C5600BB2B04 /* Symtab */ = {
-			isa = PBXGroup;
-			children = (
-				260C89DE10F57C5600BB2B04 /* SymbolFileSymtab.cpp */,
-				260C89DF10F57C5600BB2B04 /* SymbolFileSymtab.h */,
-			);
-			path = Symtab;
-			sourceTree = "<group>";
-		};
-		260C89E010F57C5600BB2B04 /* SymbolVendor */ = {
-			isa = PBXGroup;
-			children = (
-				2635878D17822E56004C30BA /* ELF */,
-				260C89E110F57C5600BB2B04 /* MacOSX */,
-			);
-			path = SymbolVendor;
-			sourceTree = "<group>";
-		};
-		260C89E110F57C5600BB2B04 /* MacOSX */ = {
-			isa = PBXGroup;
-			children = (
-				260C89E210F57C5600BB2B04 /* SymbolVendorMacOSX.cpp */,
-				260C89E310F57C5600BB2B04 /* SymbolVendorMacOSX.h */,
-			);
-			path = MacOSX;
-			sourceTree = "<group>";
-		};
-		2611FEEE142D83060017FEA3 /* interface */ = {
-			isa = PBXGroup;
-			children = (
-				2611FEEF142D83060017FEA3 /* SBAddress.i */,
-				254FBBA61A91672800BD6378 /* SBAttachInfo.i */,
-				2611FEF0142D83060017FEA3 /* SBBlock.i */,
-				2611FEF1142D83060017FEA3 /* SBBreakpoint.i */,
-				2611FEF2142D83060017FEA3 /* SBBreakpointLocation.i */,
-				4C05332C1F63092A00DED368 /* SBBreakpointName.i */,
-				2611FEF3142D83060017FEA3 /* SBBroadcaster.i */,
-				2611FEF4142D83060017FEA3 /* SBCommandInterpreter.i */,
-				2611FEF5142D83060017FEA3 /* SBCommandReturnObject.i */,
-				2611FEF6142D83060017FEA3 /* SBCommunication.i */,
-				2611FEF7142D83060017FEA3 /* SBCompileUnit.i */,
-				2611FEF8142D83060017FEA3 /* SBData.i */,
-				2611FEF9142D83060017FEA3 /* SBDebugger.i */,
-				9452573616262CD000325455 /* SBDeclaration.i */,
-				2611FEFA142D83060017FEA3 /* SBError.i */,
-				2611FEFB142D83060017FEA3 /* SBEvent.i */,
-				940B02F719DC970900AD0F52 /* SBExecutionContext.i */,
-				2611FEFC142D83060017FEA3 /* SBFileSpec.i */,
-				2611FEFD142D83060017FEA3 /* SBFileSpecList.i */,
-				2611FEFE142D83060017FEA3 /* SBFrame.i */,
-				4CE4F676162CE1E100F75CB3 /* SBExpressionOptions.i */,
-				2611FEFF142D83060017FEA3 /* SBFunction.i */,
-				2611FF00142D83060017FEA3 /* SBHostOS.i */,
-				2611FF02142D83060017FEA3 /* SBInstruction.i */,
-				2611FF03142D83060017FEA3 /* SBInstructionList.i */,
-				23DCBE971D63E14B0084C36B /* SBLanguageRuntime.i */,
-				254FBB921A81AA5200BD6378 /* SBLaunchInfo.i */,
-				2611FF04142D83060017FEA3 /* SBLineEntry.i */,
-				2611FF05142D83060017FEA3 /* SBListener.i */,
-				264297591D1DF2AA003F2BF4 /* SBMemoryRegionInfo.i */,
-				2642975A1D1DF2AA003F2BF4 /* SBMemoryRegionInfoList.i */,
-				2611FF06142D83060017FEA3 /* SBModule.i */,
-				263C493B178B61CC0070F12D /* SBModuleSpec.i */,
-				262F12B8183546C900AEB384 /* SBPlatform.i */,
-				2611FF07142D83060017FEA3 /* SBProcess.i */,
-				4987FB1C1F30EC6000E5C17D /* SBProcessInfo.i */,
-				AF0EBBEE1859419F0059E52F /* SBQueue.i */,
-				AF0EBBEF1859419F0059E52F /* SBQueueItem.i */,
-				2611FF08142D83060017FEA3 /* SBSection.i */,
-				2611FF09142D83060017FEA3 /* SBSourceManager.i */,
-				2611FF0A142D83060017FEA3 /* SBStream.i */,
-				2611FF0B142D83060017FEA3 /* SBStringList.i */,
-				23DCBE981D63E14B0084C36B /* SBStructuredData.i */,
-				2611FF0C142D83060017FEA3 /* SBSymbol.i */,
-				2611FF0D142D83060017FEA3 /* SBSymbolContext.i */,
-				2611FF0E142D83060017FEA3 /* SBSymbolContextList.i */,
-				2611FF0F142D83060017FEA3 /* SBTarget.i */,
-				2611FF10142D83060017FEA3 /* SBThread.i */,
-				4C56543819D22FD9002E9C44 /* SBThreadPlan.i */,
-				8CCB018419BA54930009FD44 /* SBThreadCollection.i */,
-				2611FF11142D83060017FEA3 /* SBType.i */,
-				9475C18A14E5EA1C001BFC6D /* SBTypeCategory.i */,
-				23DCBE991D63E14B0084C36B /* SBTypeEnumMember.i */,
-				9461569214E3567F003A195C /* SBTypeFilter.i */,
-				9461569314E3567F003A195C /* SBTypeFormat.i */,
-				9475C18B14E5F818001BFC6D /* SBTypeNameSpecifier.i */,
-				9461569414E3567F003A195C /* SBTypeSummary.i */,
-				9461569514E3567F003A195C /* SBTypeSynthetic.i */,
-				23DCBE9A1D63E14B0084C36B /* SBUnixSignals.i */,
-				2611FF12142D83060017FEA3 /* SBValue.i */,
-				2611FF13142D83060017FEA3 /* SBValueList.i */,
-				94235B9D1A8D601A00EB2EED /* SBVariablesOptions.i */,
-				B2A5872514313B480092BFBA /* SBWatchpoint.i */,
-			);
-			name = interface;
-			path = scripts/interface;
-			sourceTree = SOURCE_ROOT;
-		};
-		26274FA414030F79006BA130 /* Darwin-Kernel */ = {
-			isa = PBXGroup;
-			children = (
-				26274FA514030F79006BA130 /* DynamicLoaderDarwinKernel.cpp */,
-				26274FA614030F79006BA130 /* DynamicLoaderDarwinKernel.h */,
-			);
-			path = "Darwin-Kernel";
-			sourceTree = "<group>";
-		};
-		262D3190111B4341004E6F88 /* API */ = {
-			isa = PBXGroup;
-			children = (
-				2611FEEE142D83060017FEA3 /* interface */,
-				26BC7C2510F1B3BC00F91463 /* lldb-defines.h */,
-				26BC7C2610F1B3BC00F91463 /* lldb-enumerations.h */,
-				26DE1E6A11616C2E00A093E2 /* lldb-forward.h */,
-				26651A14133BEC76005B64B7 /* lldb-public.h */,
-				26BC7C2910F1B3BC00F91463 /* lldb-types.h */,
-				94145430175D7FDE00284436 /* lldb-versioning.h */,
-				26B42C4C1187ABA50079C8C8 /* LLDB.h */,
-				9A9830FC1125FC5800A56CB0 /* SBDefines.h */,
-				26DE204211618ACA00A093E2 /* SBAddress.h */,
-				26DE204411618ADA00A093E2 /* SBAddress.cpp */,
-				254FBBA21A9166F100BD6378 /* SBAttachInfo.h */,
-				254FBBA41A91670E00BD6378 /* SBAttachInfo.cpp */,
-				26DE205611618FC500A093E2 /* SBBlock.h */,
-				26DE20601161902600A093E2 /* SBBlock.cpp */,
-				9AF16A9E11402D69007A7B3F /* SBBreakpoint.h */,
-				9AF16A9C11402D5B007A7B3F /* SBBreakpoint.cpp */,
-				9AF16CC611408686007A7B3F /* SBBreakpointLocation.h */,
-				9AF16CC7114086A1007A7B3F /* SBBreakpointLocation.cpp */,
-				4C54B2781F61CE1200D469CA /* SBBreakpointName.h */,
-				4C54B27C1F61CE5300D469CA /* SBBreakpointName.cpp */,
-				4C54B2811F62081300D469CA /* SBBreakpointOptionCommon.h */,
-				4C0533291F6211FB00DED368 /* SBBreakpointOptionCommon.cpp */,
-				9A9830F31125FC5800A56CB0 /* SBBroadcaster.h */,
-				9A9830F21125FC5800A56CB0 /* SBBroadcaster.cpp */,
-				9A9830F71125FC5800A56CB0 /* SBCommandInterpreter.h */,
-				9A9830F61125FC5800A56CB0 /* SBCommandInterpreter.cpp */,
-				9A9830F91125FC5800A56CB0 /* SBCommandReturnObject.h */,
-				9A9830F81125FC5800A56CB0 /* SBCommandReturnObject.cpp */,
-				260223E7115F06D500A601A2 /* SBCommunication.h */,
-				260223E8115F06E500A601A2 /* SBCommunication.cpp */,
-				26DE205411618FB800A093E2 /* SBCompileUnit.h */,
-				26DE205E1161901B00A093E2 /* SBCompileUnit.cpp */,
-				9443B120140C18A90013457C /* SBData.h */,
-				9443B121140C18C10013457C /* SBData.cpp */,
-				9A9830FB1125FC5800A56CB0 /* SBDebugger.h */,
-				9A9830FA1125FC5800A56CB0 /* SBDebugger.cpp */,
-				9452573816262CEF00325455 /* SBDeclaration.h */,
-				9452573916262D0200325455 /* SBDeclaration.cpp */,
-				2682F286115EF3BD00CCFF99 /* SBError.h */,
-				2682F284115EF3A700CCFF99 /* SBError.cpp */,
-				9A9830FE1125FC5800A56CB0 /* SBEvent.h */,
-				9A9830FD1125FC5800A56CB0 /* SBEvent.cpp */,
-				940B02F419DC96CB00AD0F52 /* SBExecutionContext.h */,
-				940B02F519DC96E700AD0F52 /* SBExecutionContext.cpp */,
-				4CE4F672162C971A00F75CB3 /* SBExpressionOptions.h */,
-				4CE4F674162C973F00F75CB3 /* SBExpressionOptions.cpp */,
-				26022531115F27FA00A601A2 /* SBFileSpec.h */,
-				26022532115F281400A601A2 /* SBFileSpec.cpp */,
-				4CF52AF41428291E0051E832 /* SBFileSpecList.h */,
-				4CF52AF7142829390051E832 /* SBFileSpecList.cpp */,
-				9A633FE8112DCE3C001A7E43 /* SBFrame.h */,
-				9A633FE7112DCE3C001A7E43 /* SBFrame.cpp */,
-				26DE205211618FAC00A093E2 /* SBFunction.h */,
-				26DE205C1161901400A093E2 /* SBFunction.cpp */,
-				9A3576A7116E9AB700E8ED2F /* SBHostOS.h */,
-				9A3576A9116E9AC700E8ED2F /* SBHostOS.cpp */,
-				9AC7038D117674EB0086C050 /* SBInstruction.h */,
-				9AC703AE117675410086C050 /* SBInstruction.cpp */,
-				9AC7038F117675270086C050 /* SBInstructionList.h */,
-				9AC703B0117675490086C050 /* SBInstructionList.cpp */,
-				3392EBB71AFF402200858B9F /* SBLanguageRuntime.h */,
-				AF20F76C1AF18FC700751A6E /* SBLanguageRuntime.cpp */,
-				254FBB961A81B03100BD6378 /* SBLaunchInfo.h */,
-				254FBB941A81AA7F00BD6378 /* SBLaunchInfo.cpp */,
-				26DE205811618FE700A093E2 /* SBLineEntry.h */,
-				26DE20621161904200A093E2 /* SBLineEntry.cpp */,
-				9A9831021125FC5800A56CB0 /* SBListener.h */,
-				9A9831011125FC5800A56CB0 /* SBListener.cpp */,
-				264297531D1DF209003F2BF4 /* SBMemoryRegionInfo.h */,
-				23DCEA421D1C4C6900A602B4 /* SBMemoryRegionInfo.cpp */,
-				264297541D1DF209003F2BF4 /* SBMemoryRegionInfoList.h */,
-				23DCEA431D1C4C6900A602B4 /* SBMemoryRegionInfoList.cpp */,
-				26DE204E11618E9800A093E2 /* SBModule.h */,
-				26DE204C11618E7A00A093E2 /* SBModule.cpp */,
-				263C4939178B50CF0070F12D /* SBModuleSpec.h */,
-				263C4937178B50C40070F12D /* SBModuleSpec.cpp */,
-				262F12B61835469C00AEB384 /* SBPlatform.h */,
-				262F12B41835468600AEB384 /* SBPlatform.cpp */,
-				AF0EBBEA185941360059E52F /* SBQueue.h */,
-				AF0EBBE6185940FB0059E52F /* SBQueue.cpp */,
-				AF0EBBEB185941360059E52F /* SBQueueItem.h */,
-				AF0EBBE7185940FB0059E52F /* SBQueueItem.cpp */,
-				9A9831041125FC5800A56CB0 /* SBProcess.h */,
-				9A9831031125FC5800A56CB0 /* SBProcess.cpp */,
-				4987FB201F30EC9900E5C17D /* SBProcessInfo.h */,
-				4987FB1E1F30EC7E00E5C17D /* SBProcessInfo.cpp */,
-				26B8283C142D01E9002DBC64 /* SBSection.h */,
-				26B8283F142D020F002DBC64 /* SBSection.cpp */,
-				9A9831061125FC5800A56CB0 /* SBSourceManager.h */,
-				9A9831051125FC5800A56CB0 /* SBSourceManager.cpp */,
-				26C72C93124322890068DC16 /* SBStream.h */,
-				26C72C951243229A0068DC16 /* SBStream.cpp */,
-				9A357670116E7B5200E8ED2F /* SBStringList.h */,
-				9A357672116E7B6400E8ED2F /* SBStringList.cpp */,
-				23DCBE9F1D63E3800084C36B /* SBStructuredData.h */,
-				23DCBEA01D63E6440084C36B /* SBStructuredData.cpp */,
-				26DE205A11618FF600A093E2 /* SBSymbol.h */,
-				26DE20641161904E00A093E2 /* SBSymbol.cpp */,
-				26DE204011618AB900A093E2 /* SBSymbolContext.h */,
-				26DE204611618AED00A093E2 /* SBSymbolContext.cpp */,
-				268F9D52123AA15200B91E9B /* SBSymbolContextList.h */,
-				268F9D54123AA16600B91E9B /* SBSymbolContextList.cpp */,
-				9A9831081125FC5800A56CB0 /* SBTarget.h */,
-				9A9831071125FC5800A56CB0 /* SBTarget.cpp */,
-				9A98310A1125FC5800A56CB0 /* SBThread.h */,
-				9A9831091125FC5800A56CB0 /* SBThread.cpp */,
-				8CCB018119BA4E210009FD44 /* SBThreadCollection.h */,
-				8CCB017F19BA4DD00009FD44 /* SBThreadCollection.cpp */,
-				4C56543419D2297A002E9C44 /* SBThreadPlan.h */,
-				4C56543619D22B32002E9C44 /* SBThreadPlan.cpp */,
-				9A1E59581EB2B10D002206A5 /* SBTrace.h */,
-				9A1E59521EB2B0B9002206A5 /* SBTrace.cpp */,
-				9A1E59591EB2B10D002206A5 /* SBTraceOptions.h */,
-				9A1E59531EB2B0B9002206A5 /* SBTraceOptions.cpp */,
-				2617447911685869005ADD65 /* SBType.h */,
-				261744771168585B005ADD65 /* SBType.cpp */,
-				9475C18514E5E9C5001BFC6D /* SBTypeCategory.h */,
-				DD1E0AC9220B660100B815F8 /* SBReproducer.cpp */,
-				DD1E0AD0220BC3D400B815F8 /* SBReproducer.h */,
-				DD1E0ACB220B660E00B815F8 /* SBReproducerPrivate.h */,
-				9475C18714E5E9FA001BFC6D /* SBTypeCategory.cpp */,
-				23EFE388193D1ABC00E54E54 /* SBTypeEnumMember.h */,
-				23EFE38A193D1AEC00E54E54 /* SBTypeEnumMember.cpp */,
-				9461568614E355F2003A195C /* SBTypeFilter.h */,
-				9461568A14E35621003A195C /* SBTypeFilter.cpp */,
-				9461568714E355F2003A195C /* SBTypeFormat.h */,
-				9461568B14E35621003A195C /* SBTypeFormat.cpp */,
-				9475C18C14E5F826001BFC6D /* SBTypeNameSpecifier.h */,
-				9475C18D14E5F834001BFC6D /* SBTypeNameSpecifier.cpp */,
-				9461568814E355F2003A195C /* SBTypeSummary.h */,
-				9461568C14E35621003A195C /* SBTypeSummary.cpp */,
-				9461568914E355F2003A195C /* SBTypeSynthetic.h */,
-				9461568D14E35621003A195C /* SBTypeSynthetic.cpp */,
-				23059A111958B37B007B8189 /* SBUnixSignals.h */,
-				23059A0F1958B319007B8189 /* SBUnixSignals.cpp */,
-				9A19A6A51163BB7E00E0D453 /* SBValue.h */,
-				9A19A6AD1163BB9800E0D453 /* SBValue.cpp */,
-				DD54302F222F190D00C1F021 /* Utils.h */,
-				9A357582116CFDEE00E8ED2F /* SBValueList.h */,
-				9A35758D116CFE0F00E8ED2F /* SBValueList.cpp */,
-				94235B9A1A8D5FD800EB2EED /* SBVariablesOptions.h */,
-				94235B9B1A8D5FF300EB2EED /* SBVariablesOptions.cpp */,
-				B2A58721143119810092BFBA /* SBWatchpoint.h */,
-				B2A58723143119D50092BFBA /* SBWatchpoint.cpp */,
-				3F81692A1ABB7A16001DA9DF /* SystemInitializerFull.cpp */,
-				CDC75CF920B8D1DF002209BC /* SystemInitializerFull.h */,
-			);
-			name = API;
-			sourceTree = "<group>";
-		};
-		2635878D17822E56004C30BA /* ELF */ = {
-			isa = PBXGroup;
-			children = (
-				2635879017822E56004C30BA /* SymbolVendorELF.cpp */,
-				2635879117822E56004C30BA /* SymbolVendorELF.h */,
-			);
-			path = ELF;
-			sourceTree = "<group>";
-		};
-		263641141B34AEE200145B2F /* SysV-mips64 */ = {
-			isa = PBXGroup;
-			children = (
-				263641151B34AEE200145B2F /* ABISysV_mips64.cpp */,
-				263641161B34AEE200145B2F /* ABISysV_mips64.h */,
-			);
-			path = "SysV-mips64";
-			sourceTree = "<group>";
-		};
-		2642FBA713D003B400ED6808 /* MacOSX-Kernel */ = {
-			isa = PBXGroup;
-			children = (
-				AF0F6E4E1739A76D009180FE /* RegisterContextKDP_arm64.cpp */,
-				AF0F6E4F1739A76D009180FE /* RegisterContextKDP_arm64.h */,
-				2642FBA813D003B400ED6808 /* CommunicationKDP.cpp */,
-				2642FBA913D003B400ED6808 /* CommunicationKDP.h */,
-				2642FBAA13D003B400ED6808 /* ProcessKDP.cpp */,
-				2642FBAB13D003B400ED6808 /* ProcessKDP.h */,
-				2642FBAC13D003B400ED6808 /* ProcessKDPLog.cpp */,
-				2642FBAD13D003B400ED6808 /* ProcessKDPLog.h */,
-				265205A213D3E3F700132FE2 /* RegisterContextKDP_arm.cpp */,
-				265205A313D3E3F700132FE2 /* RegisterContextKDP_arm.h */,
-				265205A413D3E3F700132FE2 /* RegisterContextKDP_i386.cpp */,
-				265205A513D3E3F700132FE2 /* RegisterContextKDP_i386.h */,
-				265205A613D3E3F700132FE2 /* RegisterContextKDP_x86_64.cpp */,
-				265205A713D3E3F700132FE2 /* RegisterContextKDP_x86_64.h */,
-				2628A4D313D4977900F5487A /* ThreadKDP.cpp */,
-				2628A4D413D4977900F5487A /* ThreadKDP.h */,
-			);
-			path = "MacOSX-Kernel";
-			sourceTree = "<group>";
-		};
-		2647B62E21C4364F00A81D15 /* MIPS */ = {
-			isa = PBXGroup;
-			children = (
-				2647B63021C4366300A81D15 /* ArchitectureMips.cpp */,
-				2647B62F21C4366200A81D15 /* ArchitectureMips.h */,
-			);
-			name = MIPS;
-			path = "New Group";
-			sourceTree = "<group>";
-		};
-		264A12F91372522000875C42 /* ARM64 */ = {
-			isa = PBXGroup;
-			children = (
-				264A12FA1372522000875C42 /* EmulateInstructionARM64.cpp */,
-				264A12FB1372522000875C42 /* EmulateInstructionARM64.h */,
-			);
-			name = ARM64;
-			path = source/Plugins/Instruction/ARM64;
-			sourceTree = SOURCE_ROOT;
-		};
-		264A97BC133918A30017F0BE /* GDB Server */ = {
-			isa = PBXGroup;
-			children = (
-				264A97BD133918BC0017F0BE /* PlatformRemoteGDBServer.cpp */,
-				264A97BE133918BC0017F0BE /* PlatformRemoteGDBServer.h */,
-			);
-			name = "GDB Server";
-			sourceTree = "<group>";
-		};
-		264E8576159BE51A00E9D7A2 /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				AF90106315AB7C5700FF120D /* lldb.1 */,
-				268648C116531BF800F04704 /* com.apple.debugserver.posix.plist */,
-				268648C216531BF800F04704 /* com.apple.debugserver.applist.internal.plist */,
-				268648C316531BF800F04704 /* com.apple.debugserver.internal.plist */,
-				AFF87C8E150FF688000E1742 /* com.apple.debugserver.applist.plist */,
-				AFF87C8C150FF680000E1742 /* com.apple.debugserver.applist.plist */,
-				AFF87C8A150FF677000E1742 /* com.apple.debugserver.applist.plist */,
-				AFF87C86150FF669000E1742 /* com.apple.debugserver.plist */,
-			);
-			name = Resources;
-			sourceTree = "<group>";
-		};
-		26579F55126A255E0007C5CB /* darwin-debug */ = {
-			isa = PBXGroup;
-			children = (
-				26368A3B126B697600E8659F /* darwin-debug.cpp */,
-			);
-			name = "darwin-debug";
-			sourceTree = "<group>";
-		};
-		265E9BE0115C2B8500D0DCCB /* debugserver */ = {
-			isa = PBXGroup;
-			children = (
-				265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */,
-			);
-			name = debugserver;
-			sourceTree = "<group>";
-		};
-		265E9BE2115C2BAA00D0DCCB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				26CE05A0115C31E50022F371 /* debugserver */,
-				239504C51BDD3FD700963CEA /* debugserver-nonui */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		2665CD0915080846002C8FAE /* install-headers */ = {
-			isa = PBXGroup;
-			children = (
-				2665CD0D15080846002C8FAE /* Makefile */,
-			);
-			name = "install-headers";
-			path = "tools/install-headers";
-			sourceTree = "<group>";
-		};
-		2666ADBF1B3CB675001FAFD3 /* Hexagon-DYLD */ = {
-			isa = PBXGroup;
-			children = (
-				2666ADC11B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.cpp */,
-				2666ADC21B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.h */,
-				2666ADC31B3CB675001FAFD3 /* HexagonDYLDRendezvous.cpp */,
-				2666ADC41B3CB675001FAFD3 /* HexagonDYLDRendezvous.h */,
-			);
-			path = "Hexagon-DYLD";
-			sourceTree = "<group>";
-		};
-		266960581199F4230075C61A /* Scripts */ = {
-			isa = PBXGroup;
-			children = (
-				266960591199F4230075C61A /* build-llvm.pl */,
-				2669605A1199F4230075C61A /* build-swig-wrapper-classes.sh */,
-				2669605B1199F4230075C61A /* checkpoint-llvm.pl */,
-				2669605C1199F4230075C61A /* finish-swig-wrapper-classes.sh */,
-				2669605D1199F4230075C61A /* install-lldb.sh */,
-				2669605E1199F4230075C61A /* lldb.swig */,
-				2669605F1199F4230075C61A /* Python */,
-				266960631199F4230075C61A /* sed-sources */,
-			);
-			name = Scripts;
-			path = scripts;
-			sourceTree = "<group>";
-		};
-		2669605F1199F4230075C61A /* Python */ = {
-			isa = PBXGroup;
-			children = (
-				266960601199F4230075C61A /* build-swig-Python.sh */,
-				266960611199F4230075C61A /* edit-swig-python-wrapper-file.py */,
-				94FE476613FC1DA8001F8475 /* finish-swig-Python-LLDB.sh */,
-				9A48A3A7124AAA5A00922451 /* python-extensions.swig */,
-				944DC3481774C99000D7D884 /* python-swigsafecast.swig */,
-				94E367CE140C4EEA001C7A5A /* python-typemaps.swig */,
-				94005E0313F438DF001EF42D /* python-wrapper.swig */,
-			);
-			path = Python;
-			sourceTree = "<group>";
-		};
-		266DFE9013FD64D200D0C574 /* OperatingSystem */ = {
-			isa = PBXGroup;
-			children = (
-				2698699715E6CBD0002415FF /* Python */,
-			);
-			path = OperatingSystem;
-			sourceTree = "<group>";
-		};
-		26792615211CA3C100EE1D10 /* lldb-vscode */ = {
-			isa = PBXGroup;
-			children = (
-				26792617211CA3E100EE1D10 /* CMakeLists.txt */,
-				26792618211CA3E100EE1D10 /* lldb-vscode-Info.plist */,
-				26792619211CA3E100EE1D10 /* lldb-vscode.cpp */,
-				26792616211CA3E100EE1D10 /* package.json */,
-				2660387D211CA98200329572 /* BreakpointBase.cpp */,
-				26603872211CA90D00329572 /* BreakpointBase.h */,
-				26603874211CA90E00329572 /* ExceptionBreakpoint.cpp */,
-				26603873211CA90E00329572 /* ExceptionBreakpoint.h */,
-				26603877211CA90E00329572 /* FunctionBreakpoint.cpp */,
-				26603871211CA90D00329572 /* FunctionBreakpoint.h */,
-				26603875211CA90E00329572 /* JSONUtils.cpp */,
-				26603876211CA90E00329572 /* JSONUtils.h */,
-				26F76199211CBBB30044F6EA /* LLDBUtils.cpp */,
-				26F7619A211CBBB30044F6EA /* LLDBUtils.h */,
-				26603870211CA90D00329572 /* SourceBreakpoint.cpp */,
-				2660386D211CA90C00329572 /* SourceBreakpoint.h */,
-				26F76198211CB8870044F6EA /* SourceReference.h */,
-				2660386E211CA90D00329572 /* VSCode.cpp */,
-				2660386F211CA90D00329572 /* VSCode.h */,
-				26F7619C211CDD700044F6EA /* VSCodeForward.h */,
-			);
-			name = "lldb-vscode";
-			sourceTree = "<group>";
-		};
-		267F68461CC02DED0086832B /* SysV-s390x */ = {
-			isa = PBXGroup;
-			children = (
-				267F68471CC02DED0086832B /* ABISysV_s390x.cpp */,
-				267F68481CC02DED0086832B /* ABISysV_s390x.h */,
-			);
-			path = "SysV-s390x";
-			sourceTree = "<group>";
-		};
-		2682F168115ED9C800CCFF99 /* Utility */ = {
-			isa = PBXGroup;
-			children = (
-				58EC744220EAEB6C00695209 /* CompletionRequest.h */,
-				58EC744020EAEB5200695209 /* CompletionRequest.cpp */,
-				6B74D89C2006972D0074051B /* Environment.h */,
-				22DC561920064C9600A7E9E8 /* Environment.cpp */,
-				AF6CA6651FBBAF27005A0DC3 /* ArchSpec.cpp */,
-				AF6CA6671FBBAF37005A0DC3 /* ArchSpec.h */,
-				26BC7D5710F1B77400F91463 /* Connection.h */,
-				26BC7E6F10F1B85900F91463 /* Connection.cpp */,
-				26FA4315130103F400E71120 /* FileSpec.h */,
-				26FA43171301048600E71120 /* FileSpec.cpp */,
-				DD8F277D22011CC9004ED75B /* FileCollector.cpp */,
-				26CF992414428766001E4138 /* AnsiTerminal.h */,
-				26F996A7119B79C300412154 /* ARM_DWARF_Registers.h */,
-				264A12FF137252C700875C42 /* ARM64_DWARF_Registers.h */,
-				AFC2DCE81E6E2F2C00283714 /* Baton.cpp */,
-				AFC2DCEE1E6E2FA300283714 /* Baton.h */,
-				2647B63521C4368300A81D15 /* Broadcaster.h */,
-				2647B63921C436AB00A81D15 /* Broadcaster.cpp */,
-				264723A511FA076E00DE380C /* CleanUp.h */,
-				26764C951E48F46F008D3573 /* ConstString.h */,
-				26764C961E48F482008D3573 /* ConstString.cpp */,
-				49CA96F01E6AAC8E00C03FEE /* DataBuffer.h */,
-				49CA96F11E6AAC8E00C03FEE /* DataBufferHeap.h */,
-				49CA96E61E6AAC6600C03FEE /* DataBufferHeap.cpp */,
-				49CA96F21E6AAC8E00C03FEE /* DataBufferLLVM.h */,
-				49CA96E71E6AAC6600C03FEE /* DataBufferLLVM.cpp */,
-				49CA96F31E6AAC8E00C03FEE /* DataEncoder.h */,
-				49CA96E81E6AAC6600C03FEE /* DataEncoder.cpp */,
-				49CA96F41E6AAC8E00C03FEE /* DataExtractor.h */,
-				49CA96E91E6AAC6600C03FEE /* DataExtractor.cpp */,
-				26BC7DD310F1B7D500F91463 /* Endian.h */,
-				2647B63321C4367A00A81D15 /* Event.h */,
-				2647B63B21C436B400A81D15 /* Event.cpp */,
-				4CBFF0471F579A36004AFA92 /* Flags.h */,
-				236124A61986B50E004EFC37 /* IOObject.h */,
-				236124A21986B4E2004EFC37 /* IOObject.cpp */,
-				4C73152119B7D71700F865A4 /* Iterable.h */,
-				942829541A89614000521B30 /* JSON.h */,
-				942829551A89614C00521B30 /* JSON.cpp */,
-				2647B63721C4369500A81D15 /* Listener.h */,
-				2647B63D21C436BC00A81D15 /* Listener.cpp */,
-				943BDEFC1AA7B2DE00789CE8 /* LLDBAssert.h */,
-				943BDEFD1AA7B2F800789CE8 /* LLDBAssert.cpp */,
-				3F81691C1ABA242B001DA9DF /* NameMatches.h */,
-				3F8169181ABA2419001DA9DF /* NameMatches.cpp */,
-				4CC57F9F222DFEA40067B7EA /* ProcessInfo.cpp */,
-				26C6886D137880B900407EDF /* RegisterValue.h */,
-				26C6886E137880C400407EDF /* RegisterValue.cpp */,
-				26764C9C1E48F516008D3573 /* RegularExpression.h */,
-				26764C9F1E48F528008D3573 /* RegularExpression.cpp */,
-				AFCB1D5E219CD5EA00730AD5 /* Reproducer.cpp */,
-				DD6C13BA220A6F21005C2AE8 /* ReproducerInstrumentation.cpp */,
-				26BC7D7410F1B77400F91463 /* Scalar.h */,
-				26BC7E8D10F1B85900F91463 /* Scalar.cpp */,
-				26A375841D59487700D6CBDB /* SelectHelper.h */,
-				26A3757F1D59462700D6CBDB /* SelectHelper.cpp */,
-				261B5A5211C3F2AD00AABD0A /* SharingPtr.cpp */,
-				4C2FAE2E135E3A70001EDE44 /* SharedCluster.h */,
-				261B5A5311C3F2AD00AABD0A /* SharingPtr.h */,
-				26BC7D7710F1B77400F91463 /* State.h */,
-				26BC7E9010F1B85900F91463 /* State.cpp */,
-				492DB7E61EC662B100B9E9AF /* Status.h */,
-				492DB7E81EC662D100B9E9AF /* Status.cpp */,
-				26764C9B1E48F50C008D3573 /* Stream.h */,
-				26764C9D1E48F51E008D3573 /* Stream.cpp */,
-				AFC2DCF51E6E316A00283714 /* StreamCallback.cpp */,
-				AFC2DCF71E6E316F00283714 /* StreamCallback.h */,
-				AFC2DCF81E6E318000283714 /* StreamGDBRemote.cpp */,
-				AFC2DCFA1E6E318600283714 /* StreamGDBRemote.h */,
-				26764CA31E48F550008D3573 /* StreamString.h */,
-				26764CA11E48F547008D3573 /* StreamString.cpp */,
-				26764CA41E48F566008D3573 /* StreamTee.h */,
-				26A375831D59486000D6CBDB /* StringExtractor.h */,
-				2660D9F611922A1300958FBD /* StringExtractor.cpp */,
-				2676A094119C93C8008A98EF /* StringExtractorGDBRemote.h */,
-				2676A093119C93C8008A98EF /* StringExtractorGDBRemote.cpp */,
-				94380B8019940B0300BFE4A8 /* StringLexer.h */,
-				94380B8119940B0A00BFE4A8 /* StringLexer.cpp */,
-				9A35765E116E76A700E8ED2F /* StringList.h */,
-				9A35765F116E76B900E8ED2F /* StringList.cpp */,
-				26F2F8FD1B156678007857DE /* StructuredData.h */,
-				AFEC3361194A8ABA00FF05C6 /* StructuredData.cpp */,
-				AFF8FF0B1E779D4B003830EF /* TildeExpressionResolver.cpp */,
-				AFF8FF0D1E779D51003830EF /* TildeExpressionResolver.h */,
-				26BC7D7E10F1B77400F91463 /* Timer.h */,
-				26BC7E9610F1B85900F91463 /* Timer.cpp */,
-				2654A6911E552F3C00DA1013 /* UriParser.h */,
-				33064C991A5C7A330033D415 /* UriParser.cpp */,
-				AFC2DCEC1E6E2F8C00283714 /* UserID.h */,
-				AFC2DCEA1E6E2F7D00283714 /* UserID.cpp */,
-				4CC57FA3222DFEFE0067B7EA /* UserIDResolver.h */,
-				4CC57FA0222DFEA40067B7EA /* UserIDResolver.cpp */,
-				49CA96F51E6AAC8E00C03FEE /* UUID.h */,
-				49CA96EA1E6AAC6600C03FEE /* UUID.cpp */,
-				AFC2DCEF1E6E2FD200283714 /* VMRange.cpp */,
-				AFC2DCF11E6E2FDA00283714 /* VMRange.h */,
-				2654A6921E552F4600DA1013 /* VASPrintf.h */,
-				2654A68F1E552ED500DA1013 /* VASprintf.cpp */,
-			);
-			name = Utility;
-			sourceTree = "<group>";
-		};
-		268A683C1321B505000E3FB8 /* Static */ = {
-			isa = PBXGroup;
-			children = (
-				268A683E1321B53B000E3FB8 /* DynamicLoaderStatic.h */,
-				268A683D1321B53B000E3FB8 /* DynamicLoaderStatic.cpp */,
-			);
-			path = Static;
-			sourceTree = "<group>";
-		};
-		2690CD181A6DC0D000E717C8 /* lldb-mi */ = {
-			isa = PBXGroup;
-			children = (
-				2669415B1A6DC2AB0063BE93 /* CMakeLists.txt */,
-				2669415E1A6DC2AB0063BE93 /* lldb-Info.plist */,
-				266941601A6DC2AB0063BE93 /* MICmdArgContext.cpp */,
-				266941611A6DC2AB0063BE93 /* MICmdArgContext.h */,
-				266941621A6DC2AB0063BE93 /* MICmdArgSet.cpp */,
-				266941631A6DC2AB0063BE93 /* MICmdArgSet.h */,
-				266941641A6DC2AB0063BE93 /* MICmdArgValBase.cpp */,
-				266941651A6DC2AB0063BE93 /* MICmdArgValBase.h */,
-				266941661A6DC2AB0063BE93 /* MICmdArgValConsume.cpp */,
-				266941671A6DC2AB0063BE93 /* MICmdArgValConsume.h */,
-				266941681A6DC2AB0063BE93 /* MICmdArgValFile.cpp */,
-				266941691A6DC2AB0063BE93 /* MICmdArgValFile.h */,
-				2669416A1A6DC2AC0063BE93 /* MICmdArgValListBase.cpp */,
-				2669416B1A6DC2AC0063BE93 /* MICmdArgValListBase.h */,
-				2669416C1A6DC2AC0063BE93 /* MICmdArgValListOfN.cpp */,
-				2669416D1A6DC2AC0063BE93 /* MICmdArgValListOfN.h */,
-				2669416E1A6DC2AC0063BE93 /* MICmdArgValNumber.cpp */,
-				2669416F1A6DC2AC0063BE93 /* MICmdArgValNumber.h */,
-				266941701A6DC2AC0063BE93 /* MICmdArgValOptionLong.cpp */,
-				266941711A6DC2AC0063BE93 /* MICmdArgValOptionLong.h */,
-				266941721A6DC2AC0063BE93 /* MICmdArgValOptionShort.cpp */,
-				266941731A6DC2AC0063BE93 /* MICmdArgValOptionShort.h */,
-				267DFB441B06752A00000FB7 /* MICmdArgValPrintValues.cpp */,
-				267DFB451B06752A00000FB7 /* MICmdArgValPrintValues.h */,
-				266941741A6DC2AC0063BE93 /* MICmdArgValString.cpp */,
-				266941751A6DC2AC0063BE93 /* MICmdArgValString.h */,
-				266941761A6DC2AC0063BE93 /* MICmdArgValThreadGrp.cpp */,
-				266941771A6DC2AC0063BE93 /* MICmdArgValThreadGrp.h */,
-				266941781A6DC2AC0063BE93 /* MICmdBase.cpp */,
-				266941791A6DC2AC0063BE93 /* MICmdBase.h */,
-				2669417A1A6DC2AC0063BE93 /* MICmdCmd.cpp */,
-				2669417B1A6DC2AC0063BE93 /* MICmdCmd.h */,
-				2669417C1A6DC2AC0063BE93 /* MICmdCmdBreak.cpp */,
-				2669417D1A6DC2AC0063BE93 /* MICmdCmdBreak.h */,
-				2669417E1A6DC2AC0063BE93 /* MICmdCmdData.cpp */,
-				2669417F1A6DC2AC0063BE93 /* MICmdCmdData.h */,
-				266941801A6DC2AC0063BE93 /* MICmdCmdEnviro.cpp */,
-				266941811A6DC2AC0063BE93 /* MICmdCmdEnviro.h */,
-				266941821A6DC2AC0063BE93 /* MICmdCmdExec.cpp */,
-				266941831A6DC2AC0063BE93 /* MICmdCmdExec.h */,
-				266941841A6DC2AC0063BE93 /* MICmdCmdFile.cpp */,
-				266941851A6DC2AC0063BE93 /* MICmdCmdFile.h */,
-				266941861A6DC2AC0063BE93 /* MICmdCmdGdbInfo.cpp */,
-				266941871A6DC2AC0063BE93 /* MICmdCmdGdbInfo.h */,
-				266941881A6DC2AC0063BE93 /* MICmdCmdGdbSet.cpp */,
-				266941891A6DC2AC0063BE93 /* MICmdCmdGdbSet.h */,
-				AFB3D27E1AC262AB003B4B30 /* MICmdCmdGdbShow.cpp */,
-				AFB3D27F1AC262AB003B4B30 /* MICmdCmdGdbShow.h */,
-				2669418A1A6DC2AC0063BE93 /* MICmdCmdGdbThread.cpp */,
-				2669418B1A6DC2AC0063BE93 /* MICmdCmdGdbThread.h */,
-				2669418C1A6DC2AC0063BE93 /* MICmdCmdMiscellanous.cpp */,
-				2669418D1A6DC2AC0063BE93 /* MICmdCmdMiscellanous.h */,
-				2669418E1A6DC2AC0063BE93 /* MICmdCmdStack.cpp */,
-				2669418F1A6DC2AC0063BE93 /* MICmdCmdStack.h */,
-				266941901A6DC2AC0063BE93 /* MICmdCmdSupportInfo.cpp */,
-				266941911A6DC2AC0063BE93 /* MICmdCmdSupportInfo.h */,
-				266941921A6DC2AC0063BE93 /* MICmdCmdSupportList.cpp */,
-				266941931A6DC2AC0063BE93 /* MICmdCmdSupportList.h */,
-				26D52C1D1A980FE300E5D2FB /* MICmdCmdSymbol.cpp */,
-				26D52C1E1A980FE300E5D2FB /* MICmdCmdSymbol.h */,
-				266941941A6DC2AC0063BE93 /* MICmdCmdTarget.cpp */,
-				266941951A6DC2AC0063BE93 /* MICmdCmdTarget.h */,
-				266941961A6DC2AC0063BE93 /* MICmdCmdThread.cpp */,
-				266941971A6DC2AC0063BE93 /* MICmdCmdThread.h */,
-				266941981A6DC2AC0063BE93 /* MICmdCmdTrace.cpp */,
-				266941991A6DC2AC0063BE93 /* MICmdCmdTrace.h */,
-				2669419A1A6DC2AC0063BE93 /* MICmdCmdVar.cpp */,
-				2669419B1A6DC2AC0063BE93 /* MICmdCmdVar.h */,
-				2669419C1A6DC2AC0063BE93 /* MICmdCommands.cpp */,
-				2669419D1A6DC2AC0063BE93 /* MICmdCommands.h */,
-				2669419E1A6DC2AC0063BE93 /* MICmdData.cpp */,
-				2669419F1A6DC2AC0063BE93 /* MICmdData.h */,
-				266941A01A6DC2AC0063BE93 /* MICmdFactory.cpp */,
-				266941A11A6DC2AC0063BE93 /* MICmdFactory.h */,
-				266941A21A6DC2AC0063BE93 /* MICmdInterpreter.cpp */,
-				266941A31A6DC2AC0063BE93 /* MICmdInterpreter.h */,
-				266941A41A6DC2AC0063BE93 /* MICmdInvoker.cpp */,
-				266941A51A6DC2AC0063BE93 /* MICmdInvoker.h */,
-				266941A61A6DC2AC0063BE93 /* MICmdMgr.cpp */,
-				266941A71A6DC2AC0063BE93 /* MICmdMgr.h */,
-				266941A81A6DC2AC0063BE93 /* MICmdMgrSetCmdDeleteCallback.cpp */,
-				266941A91A6DC2AC0063BE93 /* MICmdMgrSetCmdDeleteCallback.h */,
-				266941AA1A6DC2AC0063BE93 /* MICmnBase.cpp */,
-				266941AB1A6DC2AC0063BE93 /* MICmnBase.h */,
-				266941AC1A6DC2AC0063BE93 /* MICmnConfig.h */,
-				266941AD1A6DC2AC0063BE93 /* MICmnLLDBBroadcaster.cpp */,
-				266941AE1A6DC2AC0063BE93 /* MICmnLLDBBroadcaster.h */,
-				266941AF1A6DC2AC0063BE93 /* MICmnLLDBDebugger.cpp */,
-				266941B01A6DC2AC0063BE93 /* MICmnLLDBDebugger.h */,
-				266941B11A6DC2AC0063BE93 /* MICmnLLDBDebuggerHandleEvents.cpp */,
-				266941B21A6DC2AC0063BE93 /* MICmnLLDBDebuggerHandleEvents.h */,
-				266941B31A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfo.cpp */,
-				266941B41A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfo.h */,
-				266941B51A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfoVarObj.cpp */,
-				266941B61A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfoVarObj.h */,
-				266941B71A6DC2AC0063BE93 /* MICmnLLDBProxySBValue.cpp */,
-				266941B81A6DC2AC0063BE93 /* MICmnLLDBProxySBValue.h */,
-				266941B91A6DC2AC0063BE93 /* MICmnLLDBUtilSBValue.cpp */,
-				266941BA1A6DC2AC0063BE93 /* MICmnLLDBUtilSBValue.h */,
-				266941BB1A6DC2AC0063BE93 /* MICmnLog.cpp */,
-				266941BC1A6DC2AC0063BE93 /* MICmnLog.h */,
-				266941BD1A6DC2AC0063BE93 /* MICmnLogMediumFile.cpp */,
-				266941BE1A6DC2AC0063BE93 /* MICmnLogMediumFile.h */,
-				266941BF1A6DC2AC0063BE93 /* MICmnMIOutOfBandRecord.cpp */,
-				266941C01A6DC2AC0063BE93 /* MICmnMIOutOfBandRecord.h */,
-				266941C11A6DC2AC0063BE93 /* MICmnMIResultRecord.cpp */,
-				266941C21A6DC2AC0063BE93 /* MICmnMIResultRecord.h */,
-				266941C31A6DC2AC0063BE93 /* MICmnMIValue.cpp */,
-				266941C41A6DC2AC0063BE93 /* MICmnMIValue.h */,
-				266941C51A6DC2AC0063BE93 /* MICmnMIValueConst.cpp */,
-				266941C61A6DC2AC0063BE93 /* MICmnMIValueConst.h */,
-				266941C71A6DC2AC0063BE93 /* MICmnMIValueList.cpp */,
-				266941C81A6DC2AC0063BE93 /* MICmnMIValueList.h */,
-				266941C91A6DC2AC0063BE93 /* MICmnMIValueResult.cpp */,
-				266941CA1A6DC2AC0063BE93 /* MICmnMIValueResult.h */,
-				266941CB1A6DC2AC0063BE93 /* MICmnMIValueTuple.cpp */,
-				266941CC1A6DC2AC0063BE93 /* MICmnMIValueTuple.h */,
-				266941CD1A6DC2AC0063BE93 /* MICmnResources.cpp */,
-				266941CE1A6DC2AC0063BE93 /* MICmnResources.h */,
-				266941CF1A6DC2AC0063BE93 /* MICmnStreamStderr.cpp */,
-				266941D01A6DC2AC0063BE93 /* MICmnStreamStderr.h */,
-				266941D11A6DC2AC0063BE93 /* MICmnStreamStdin.cpp */,
-				266941D21A6DC2AC0063BE93 /* MICmnStreamStdin.h */,
-				266941D71A6DC2AC0063BE93 /* MICmnStreamStdout.cpp */,
-				266941D81A6DC2AC0063BE93 /* MICmnStreamStdout.h */,
-				266941D91A6DC2AC0063BE93 /* MICmnThreadMgrStd.cpp */,
-				266941DA1A6DC2AC0063BE93 /* MICmnThreadMgrStd.h */,
-				266941DB1A6DC2AC0063BE93 /* MIDataTypes.h */,
-				266941DC1A6DC2AC0063BE93 /* MIDriver.cpp */,
-				266941DD1A6DC2AC0063BE93 /* MIDriver.h */,
-				266941DE1A6DC2AC0063BE93 /* MIDriverBase.cpp */,
-				266941DF1A6DC2AC0063BE93 /* MIDriverBase.h */,
-				266941E01A6DC2AC0063BE93 /* MIDriverMain.cpp */,
-				266941E11A6DC2AC0063BE93 /* MIDriverMgr.cpp */,
-				266941E21A6DC2AC0063BE93 /* MIDriverMgr.h */,
-				266941E31A6DC2AC0063BE93 /* MIReadMe.txt */,
-				266941E41A6DC2AC0063BE93 /* MIUtilDateTimeStd.cpp */,
-				266941E51A6DC2AC0063BE93 /* MIUtilDateTimeStd.h */,
-				266941E61A6DC2AC0063BE93 /* MIUtilDebug.cpp */,
-				266941E71A6DC2AC0063BE93 /* MIUtilDebug.h */,
-				266941E81A6DC2AC0063BE93 /* MIUtilFileStd.cpp */,
-				266941E91A6DC2AC0063BE93 /* MIUtilFileStd.h */,
-				266941EA1A6DC2AC0063BE93 /* MIUtilMapIdToVariant.cpp */,
-				266941EB1A6DC2AC0063BE93 /* MIUtilMapIdToVariant.h */,
-				266941EC1A6DC2AC0063BE93 /* MIUtilSingletonBase.h */,
-				266941ED1A6DC2AC0063BE93 /* MIUtilSingletonHelper.h */,
-				266941EE1A6DC2AC0063BE93 /* MIUtilString.cpp */,
-				266941EF1A6DC2AC0063BE93 /* MIUtilString.h */,
-				266941F81A6DC2AC0063BE93 /* MIUtilThreadBaseStd.cpp */,
-				266941F91A6DC2AC0063BE93 /* MIUtilThreadBaseStd.h */,
-				266941FA1A6DC2AC0063BE93 /* MIUtilVariant.cpp */,
-				266941FB1A6DC2AC0063BE93 /* MIUtilVariant.h */,
-				266941FD1A6DC2AC0063BE93 /* Platform.h */,
-			);
-			path = "lldb-mi";
-			sourceTree = "<group>";
-		};
-		2692BA12136610C100F9E14D /* InstEmulation */ = {
-			isa = PBXGroup;
-			children = (
-				2692BA13136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp */,
-				2692BA14136610C100F9E14D /* UnwindAssemblyInstEmulation.h */,
-			);
-			path = InstEmulation;
-			sourceTree = "<group>";
-		};
-		2692BA17136611CD00F9E14D /* x86 */ = {
-			isa = PBXGroup;
-			children = (
-				AF415AE51D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp */,
-				AF415AE61D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h */,
-				263E949D13661AE400E7D1CE /* UnwindAssembly-x86.cpp */,
-				263E949E13661AE400E7D1CE /* UnwindAssembly-x86.h */,
-			);
-			path = x86;
-			sourceTree = "<group>";
-		};
-		2694E99814FC0BB30076DE67 /* FreeBSD */ = {
-			isa = PBXGroup;
-			children = (
-				2694E99A14FC0BB30076DE67 /* PlatformFreeBSD.cpp */,
-				2694E99B14FC0BB30076DE67 /* PlatformFreeBSD.h */,
-			);
-			path = FreeBSD;
-			sourceTree = "<group>";
-		};
-		2694E99F14FC0BBD0076DE67 /* Linux */ = {
-			isa = PBXGroup;
-			children = (
-				2694E9A114FC0BBD0076DE67 /* PlatformLinux.cpp */,
-				2694E9A214FC0BBD0076DE67 /* PlatformLinux.h */,
-			);
-			path = Linux;
-			sourceTree = "<group>";
-		};
-		2698699715E6CBD0002415FF /* Python */ = {
-			isa = PBXGroup;
-			children = (
-				2698699815E6CBD0002415FF /* OperatingSystemPython.cpp */,
-				2698699915E6CBD0002415FF /* OperatingSystemPython.h */,
-			);
-			path = Python;
-			sourceTree = "<group>";
-		};
-		26A3B4AB1181454800381BC2 /* BSD-Archive */ = {
-			isa = PBXGroup;
-			children = (
-				26A3B4AC1181454800381BC2 /* ObjectContainerBSDArchive.cpp */,
-				26A3B4AD1181454800381BC2 /* ObjectContainerBSDArchive.h */,
-			);
-			path = "BSD-Archive";
-			sourceTree = "<group>";
-		};
-		26A527BC14E24F5F00F3A14A /* mach-core */ = {
-			isa = PBXGroup;
-			children = (
-				26A527BD14E24F5F00F3A14A /* ProcessMachCore.cpp */,
-				26A527BE14E24F5F00F3A14A /* ProcessMachCore.h */,
-				26A527BF14E24F5F00F3A14A /* ThreadMachCore.cpp */,
-				26A527C014E24F5F00F3A14A /* ThreadMachCore.h */,
-			);
-			path = "mach-core";
-			sourceTree = "<group>";
-		};
-		26AC3F441365F40E0065C7EF /* UnwindAssembly */ = {
-			isa = PBXGroup;
-			children = (
-				2692BA12136610C100F9E14D /* InstEmulation */,
-				2692BA17136611CD00F9E14D /* x86 */,
-			);
-			path = UnwindAssembly;
-			sourceTree = "<group>";
-		};
-		26B4666E11A2080F00CF6220 /* Utility */ = {
-			isa = PBXGroup;
-			children = (
-				AF7BD81A22B04E20008E78D1 /* AuxVector.cpp */,
-				9A0FDE951E8EF5010086B2F5 /* RegisterContext_mips.h */,
-				9A0FDE961E8EF5010086B2F5 /* RegisterContext_s390x.h */,
-				9A0FDE971E8EF5010086B2F5 /* RegisterContextLinux_mips.cpp */,
-				9A0FDE981E8EF5010086B2F5 /* RegisterContextLinux_mips.h */,
-				9A0FDE991E8EF5010086B2F5 /* RegisterInfos_arm.h */,
-				9A0FDE9A1E8EF5010086B2F5 /* RegisterInfos_arm64.h */,
-				9A0FDE9B1E8EF5010086B2F5 /* RegisterInfos_mips.h */,
-				9AD9449B1E8DB267004796ED /* RegisterContextNetBSD_x86_64.cpp */,
-				9AD9449C1E8DB267004796ED /* RegisterContextNetBSD_x86_64.h */,
-				23F403471926C8D50046DC9B /* NativeRegisterContextRegisterInfo.h */,
-				23F403481926CC250046DC9B /* NativeRegisterContextRegisterInfo.cpp */,
-				B287E63E12EFAE2C00C9BEFE /* ARMDefines.h */,
-				B23DD24F12EDFAC1000C3894 /* ARMUtils.h */,
-				26954EBC1401EE8B00294D09 /* DynamicRegisterInfo.cpp */,
-				26954EBD1401EE8B00294D09 /* DynamicRegisterInfo.h */,
-				AF23B4D919009C66003E2A58 /* FreeBSDSignals.cpp */,
-				AF23B4DA19009C66003E2A58 /* FreeBSDSignals.h */,
-				E73A15A41B548EC500786197 /* GDBRemoteSignals.cpp */,
-				E73A15A51B548EC500786197 /* GDBRemoteSignals.h */,
-				AF1729D4182C907200E0AB97 /* HistoryThread.cpp */,
-				AF061F89182C980000B6A19C /* HistoryThread.h */,
-				AF1729D5182C907200E0AB97 /* HistoryUnwind.cpp */,
-				AF061F8A182C980000B6A19C /* HistoryUnwind.h */,
-				B28058A0139988B0002D96D0 /* InferiorCallPOSIX.cpp */,
-				B28058A2139988C6002D96D0 /* InferiorCallPOSIX.h */,
-				B2D3033612EFA5C500F84EB3 /* InstructionUtils.h */,
-				2647B64221C43BB000A81D15 /* LinuxProcMaps.cpp */,
-				2647B64121C43BAF00A81D15 /* LinuxProcMaps.h */,
-				23059A0519532B96007B8189 /* LinuxSignals.cpp */,
-				23059A0619532B96007B8189 /* LinuxSignals.h */,
-				23173F8B192BA93F005C708F /* lldb-x86-register-enums.h */,
-				26B75B421AD6E29A001F7A57 /* MipsLinuxSignals.cpp */,
-				26B75B431AD6E29A001F7A57 /* MipsLinuxSignals.h */,
-				AF33B4BC1C1FA441001B28D9 /* NetBSDSignals.cpp */,
-				AF33B4BD1C1FA441001B28D9 /* NetBSDSignals.h */,
-				AF77E0991A033D360096C0EA /* RegisterContext_powerpc.h */,
-				26474C9F18D0CAEC0073DEBA /* RegisterContext_x86.h */,
-				26957D9213D381C900670048 /* RegisterContextDarwin_arm.cpp */,
-				26957D9313D381C900670048 /* RegisterContextDarwin_arm.h */,
-				AF9107EC168570D200DBCD3C /* RegisterContextDarwin_arm64.cpp */,
-				AF9107ED168570D200DBCD3C /* RegisterContextDarwin_arm64.h */,
-				26957D9413D381C900670048 /* RegisterContextDarwin_i386.cpp */,
-				26957D9513D381C900670048 /* RegisterContextDarwin_i386.h */,
-				26957D9613D381C900670048 /* RegisterContextDarwin_x86_64.cpp */,
-				26957D9713D381C900670048 /* RegisterContextDarwin_x86_64.h */,
-				944372DA171F6B4300E57C32 /* RegisterContextDummy.cpp */,
-				944372DB171F6B4300E57C32 /* RegisterContextDummy.h */,
-				26474CA218D0CB070073DEBA /* RegisterContextFreeBSD_i386.cpp */,
-				26474CA318D0CB070073DEBA /* RegisterContextFreeBSD_i386.h */,
-				26474CA418D0CB070073DEBA /* RegisterContextFreeBSD_mips64.cpp */,
-				26474CA518D0CB070073DEBA /* RegisterContextFreeBSD_mips64.h */,
-				AF77E09A1A033D360096C0EA /* RegisterContextFreeBSD_powerpc.cpp */,
-				AF77E09B1A033D360096C0EA /* RegisterContextFreeBSD_powerpc.h */,
-				26474CA618D0CB070073DEBA /* RegisterContextFreeBSD_x86_64.cpp */,
-				26474CA718D0CB070073DEBA /* RegisterContextFreeBSD_x86_64.h */,
-				AF061F85182C97ED00B6A19C /* RegisterContextHistory.cpp */,
-				AF061F86182C97ED00B6A19C /* RegisterContextHistory.h */,
-				26474CAE18D0CB180073DEBA /* RegisterContextLinux_i386.cpp */,
-				26474CAF18D0CB180073DEBA /* RegisterContextLinux_i386.h */,
-				256CBDB81ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp */,
-				256CBDB91ADD107200BC6CDC /* RegisterContextLinux_mips64.h */,
-				267F68511CC02E920086832B /* RegisterContextLinux_s390x.cpp */,
-				267F68521CC02E920086832B /* RegisterContextLinux_s390x.h */,
-				26474CB018D0CB180073DEBA /* RegisterContextLinux_x86_64.cpp */,
-				26474CB118D0CB180073DEBA /* RegisterContextLinux_x86_64.h */,
-				AF68D2541255416E002FF25B /* RegisterContextLLDB.cpp */,
-				AF68D2551255416E002FF25B /* RegisterContextLLDB.h */,
-				26474CB618D0CB2D0073DEBA /* RegisterContextMach_arm.cpp */,
-				26474CB718D0CB2D0073DEBA /* RegisterContextMach_arm.h */,
-				26474CB818D0CB2D0073DEBA /* RegisterContextMach_i386.cpp */,
-				26474CB918D0CB2D0073DEBA /* RegisterContextMach_i386.h */,
-				26474CBA18D0CB2D0073DEBA /* RegisterContextMach_x86_64.cpp */,
-				26474CBB18D0CB2D0073DEBA /* RegisterContextMach_x86_64.h */,
-				AF77E09C1A033D360096C0EA /* RegisterContextMacOSXFrameBackchain.cpp */,
-				26E3EEF811A994E800FBADB6 /* RegisterContextMacOSXFrameBackchain.h */,
-				262D24E413FB8710002D1960 /* RegisterContextMemory.cpp */,
-				262D24E513FB8710002D1960 /* RegisterContextMemory.h */,
-				4CE4EFAB1E899A1200A80C06 /* RegisterContextOpenBSD_i386.cpp */,
-				4CE4EFAC1E899A1200A80C06 /* RegisterContextOpenBSD_i386.h */,
-				4CE4EFAD1E899A1200A80C06 /* RegisterContextOpenBSD_x86_64.cpp */,
-				4CE4EFAE1E899A1200A80C06 /* RegisterContextOpenBSD_x86_64.h */,
-				256CBDBE1ADD11C000BC6CDC /* RegisterContextPOSIX_arm.cpp */,
-				256CBDBF1ADD11C000BC6CDC /* RegisterContextPOSIX_arm.h */,
-				E7723D4A1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp */,
-				E7723D4B1AC4A944002BA082 /* RegisterContextPOSIX_arm64.h */,
-				26474CC418D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.cpp */,
-				26474CC518D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.h */,
-				AF77E09D1A033D360096C0EA /* RegisterContextPOSIX_powerpc.cpp */,
-				AF77E09E1A033D360096C0EA /* RegisterContextPOSIX_powerpc.h */,
-				AF235EAE1FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.cpp */,
-				AF235EAF1FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.h */,
-				267F68551CC02EAE0086832B /* RegisterContextPOSIX_s390x.cpp */,
-				267F68561CC02EAE0086832B /* RegisterContextPOSIX_s390x.h */,
-				26474CC618D0CB5B0073DEBA /* RegisterContextPOSIX_x86.cpp */,
-				26474CC718D0CB5B0073DEBA /* RegisterContextPOSIX_x86.h */,
-				26CA979F172B1FD5005DC71B /* RegisterContextThreadMemory.cpp */,
-				26CA97A0172B1FD5005DC71B /* RegisterContextThreadMemory.h */,
-				23EDE3371926AAD500F6A132 /* RegisterInfoInterface.h */,
-				9A77AD501E64E24E0025CE04 /* RegisterInfoPOSIX_arm.cpp */,
-				9A77AD511E64E24E0025CE04 /* RegisterInfoPOSIX_arm.h */,
-				237A8BAB1DEC9BBC00CEBAFF /* RegisterInfoPOSIX_arm64.cpp */,
-				237A8BAC1DEC9BBC00CEBAFF /* RegisterInfoPOSIX_arm64.h */,
-				AF235EB31FBE7858009C5541 /* RegisterInfoPOSIX_ppc64le.cpp */,
-				AF235EB21FBE7857009C5541 /* RegisterInfoPOSIX_ppc64le.h */,
-				26474CD018D0CB700073DEBA /* RegisterInfos_i386.h */,
-				26474CD118D0CB710073DEBA /* RegisterInfos_mips64.h */,
-				AF77E09F1A033D360096C0EA /* RegisterInfos_powerpc.h */,
-				267F68591CC02EBE0086832B /* RegisterInfos_s390x.h */,
-				26474CD218D0CB710073DEBA /* RegisterInfos_x86_64.h */,
-				2615DBC81208B5FC0021781D /* StopInfoMachException.cpp */,
-				2615DBC91208B5FC0021781D /* StopInfoMachException.h */,
-				26F4A21A13FBA31A0064B613 /* ThreadMemory.cpp */,
-				26F4A21B13FBA31A0064B613 /* ThreadMemory.h */,
-				AF68D32F1255A110002FF25B /* UnwindLLDB.cpp */,
-				AF68D3301255A110002FF25B /* UnwindLLDB.h */,
-				26E3EEE311A9901300FBADB6 /* UnwindMacOSXFrameBackchain.cpp */,
-				26E3EEE411A9901300FBADB6 /* UnwindMacOSXFrameBackchain.h */,
-				26E3EEF711A994E800FBADB6 /* RegisterContextMacOSXFrameBackchain.cpp */,
-				26474CC218D0CB5B0073DEBA /* RegisterContextMemory.cpp */,
-				26474CC318D0CB5B0073DEBA /* RegisterContextMemory.h */,
-			);
-			name = Utility;
-			sourceTree = "<group>";
-		};
-		26BC179F18C7F4CB00D2196D /* elf-core */ = {
-			isa = PBXGroup;
-			children = (
-				256CBDB21ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp */,
-				256CBDB31ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.h */,
-				E7723D421AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.cpp */,
-				E7723D431AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.h */,
-				26BC17A218C7F4CB00D2196D /* ProcessElfCore.cpp */,
-				26BC17A318C7F4CB00D2196D /* ProcessElfCore.h */,
-				26BC17A418C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.cpp */,
-				26BC17A518C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.h */,
-				AF77E0A71A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.cpp */,
-				AF77E0A81A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.h */,
-				AF9113FB1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.cpp */,
-				AF9113FC1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.h */,
-				267F684D1CC02E270086832B /* RegisterContextPOSIXCore_s390x.cpp */,
-				267F684E1CC02E270086832B /* RegisterContextPOSIXCore_s390x.h */,
-				26BC17A618C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.cpp */,
-				26BC17A718C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.h */,
-				4CA9D13C1FCE07AF00300E18 /* RegisterUtilities.cpp */,
-				4CA9D13D1FCE07AF00300E18 /* RegisterUtilities.h */,
-				26BC17A818C7F4CB00D2196D /* ThreadElfCore.cpp */,
-				26BC17A918C7F4CB00D2196D /* ThreadElfCore.h */,
-			);
-			path = "elf-core";
-			sourceTree = "<group>";
-		};
-		26BC17B318C7F4FA00D2196D /* POSIX */ = {
-			isa = PBXGroup;
-			children = (
-				AF3F54AE1B3BA59C00186E73 /* CrashReason.cpp */,
-				AF3F54AF1B3BA59C00186E73 /* CrashReason.h */,
-				26BC17BA18C7F4FA00D2196D /* ProcessMessage.cpp */,
-				26BC17BB18C7F4FA00D2196D /* ProcessMessage.h */,
-				26BC17BE18C7F4FA00D2196D /* ProcessPOSIXLog.cpp */,
-				26BC17BF18C7F4FA00D2196D /* ProcessPOSIXLog.h */,
-			);
-			path = POSIX;
-			sourceTree = "<group>";
-		};
-		26BC7C1010F1B34800F91463 /* Core */ = {
-			isa = PBXGroup;
-			children = (
-				58A080A92112AA9400D5580F /* Highlighter.cpp */,
-				26BC7D5010F1B77400F91463 /* Address.h */,
-				26BC7E6910F1B85900F91463 /* Address.cpp */,
-				26BC7D5110F1B77400F91463 /* AddressRange.h */,
-				26BC7E6A10F1B85900F91463 /* AddressRange.cpp */,
-				9AC7033E11752C540086C050 /* AddressResolver.h */,
-				9AC7034011752C6B0086C050 /* AddressResolver.cpp */,
-				9AC7033D11752C4C0086C050 /* AddressResolverFileLine.h */,
-				9AC7034211752C720086C050 /* AddressResolverFileLine.cpp */,
-				9AC7033F11752C590086C050 /* AddressResolverName.h */,
-				9AC7034411752C790086C050 /* AddressResolverName.cpp */,
-				26BC7D5510F1B77400F91463 /* ClangForward.h */,
-				26BC7D5610F1B77400F91463 /* Communication.h */,
-				26BC7E6E10F1B85900F91463 /* Communication.cpp */,
-				263664941140A4C10075843B /* Debugger.h */,
-				263664921140A4930075843B /* Debugger.cpp */,
-				26BC7D5E10F1B77400F91463 /* Disassembler.h */,
-				26BC7E7610F1B85900F91463 /* Disassembler.cpp */,
-				4C4EB7821E6A4DE7002035C0 /* DumpDataExtractor.h */,
-				4C4EB77F1E6A4DB8002035C0 /* DumpDataExtractor.cpp */,
-				AFA585CF2107EB7300D7689A /* DumpRegisterValue.cpp */,
-				26BC7D5F10F1B77400F91463 /* dwarf.h */,
-				26D9FDC612F784E60003F2EE /* EmulateInstruction.h */,
-				26D9FDC812F784FD0003F2EE /* EmulateInstruction.cpp */,
-				26BD407D135D2AC400237D80 /* FileLineResolver.h */,
-				26BD407E135D2ADF00237D80 /* FileLineResolver.cpp */,
-				26BC7D6310F1B77400F91463 /* FileSpecList.h */,
-				26BC7E7B10F1B85900F91463 /* FileSpecList.cpp */,
-				263FDE5D1A799F2D00E68013 /* FormatEntity.h */,
-				263FDE5F1A79A01500E68013 /* FormatEntity.cpp */,
-				260A63161861008E00FECF8E /* IOHandler.h */,
-				260A63181861009E00FECF8E /* IOHandler.cpp */,
-				26BC7D6510F1B77400F91463 /* IOStreamMacros.h */,
-				26BC7D6810F1B77400F91463 /* Log.h */,
-				26BC7E7F10F1B85900F91463 /* Log.cpp */,
-				3F8160A71AB9F809001DA9DF /* Logging.h */,
-				3F8160A51AB9F7DD001DA9DF /* Logging.cpp */,
-				26BC7D6910F1B77400F91463 /* Mangled.h */,
-				26BC7E8010F1B85900F91463 /* Mangled.cpp */,
-				2682100C143A59AE004BCF2D /* MappedHash.h */,
-				26BC7D6A10F1B77400F91463 /* Module.h */,
-				26BC7E8110F1B85900F91463 /* Module.cpp */,
-				26BC7D6B10F1B77400F91463 /* ModuleChild.h */,
-				26BC7E8210F1B85900F91463 /* ModuleChild.cpp */,
-				26BC7D6C10F1B77400F91463 /* ModuleList.h */,
-				26BC7E8310F1B85900F91463 /* ModuleList.cpp */,
-				260D9B2615EC369500960137 /* ModuleSpec.h */,
-				26651A15133BF9CC005B64B7 /* Opcode.h */,
-				26651A17133BF9DF005B64B7 /* Opcode.cpp */,
-				266DFE9813FD658300D0C574 /* OperatingSystem.h */,
-				266DFE9613FD656E00D0C574 /* OperatingSystem.cpp */,
-				26BC7D7010F1B77400F91463 /* PluginInterface.h */,
-				26BC7D7110F1B77400F91463 /* PluginManager.h */,
-				26BC7E8A10F1B85900F91463 /* PluginManager.cpp */,
-				2626B6AD143E1BEA00EF935C /* RangeMap.h */,
-				4FBC04EE211A06820015A814 /* RichManglingContext.h */,
-				4FBC04EC211A06200015A814 /* RichManglingContext.cpp */,
-				26BC7CF910F1B71400F91463 /* SearchFilter.h */,
-				26BC7E1510F1B83100F91463 /* SearchFilter.cpp */,
-				26BC7D7510F1B77400F91463 /* Section.h */,
-				26BC7E8E10F1B85900F91463 /* Section.cpp */,
-				26BC7D7610F1B77400F91463 /* SourceManager.h */,
-				26BC7E8F10F1B85900F91463 /* SourceManager.cpp */,
-				26BC7D7810F1B77400F91463 /* STLUtils.h */,
-				9A4F35111368A54100823F52 /* StreamAsynchronousIO.h */,
-				9A4F350F1368A51A00823F52 /* StreamAsynchronousIO.cpp */,
-				2623096E13D0EFFB006381D9 /* StreamBuffer.h */,
-				26BC7D7A10F1B77400F91463 /* StreamFile.h */,
-				26BC7E9210F1B85900F91463 /* StreamFile.cpp */,
-				26B167A41123BF5500DC7B4F /* ThreadSafeValue.h */,
-				263FEDA5112CC1DA00E4C208 /* ThreadSafeSTLMap.h */,
-				940B01FE1D2D82220058795E /* ThreadSafeSTLVector.h */,
-				94ED54A119C8A822007BE2EA /* ThreadSafeDenseMap.h */,
-				9449B8031B30E0690019342B /* ThreadSafeDenseSet.h */,
-				268A813F115B19D000F645B0 /* UniqueCStringMap.h */,
-				9A4633DA11F65D8600955CE1 /* UserSettingsController.h */,
-				9A4633DC11F65D9A00955CE1 /* UserSettingsController.cpp */,
-				26BC7D8110F1B77400F91463 /* Value.h */,
-				26BC7E9910F1B85900F91463 /* Value.cpp */,
-				26BC7D8210F1B77400F91463 /* ValueObject.h */,
-				26BC7E9A10F1B85900F91463 /* ValueObject.cpp */,
-				94094C68163B6CCC0083A547 /* ValueObjectCast.h */,
-				94094C69163B6CD90083A547 /* ValueObjectCast.cpp */,
-				26BC7D8310F1B77400F91463 /* ValueObjectChild.h */,
-				26BC7E9B10F1B85900F91463 /* ValueObjectChild.cpp */,
-				26424E3E125986D30016D82C /* ValueObjectConstResult.h */,
-				26424E3C125986CB0016D82C /* ValueObjectConstResult.cpp */,
-				AF9472701B575E5F0063D65C /* ValueObjectConstResultCast.h */,
-				AF94726E1B575E430063D65C /* ValueObjectConstResultCast.cpp */,
-				94FA3DDD1405D4E500833217 /* ValueObjectConstResultChild.h */,
-				94FA3DDF1405D50300833217 /* ValueObjectConstResultChild.cpp */,
-				949ADF001406F62E004833E1 /* ValueObjectConstResultImpl.h */,
-				949ADF021406F648004833E1 /* ValueObjectConstResultImpl.cpp */,
-				4CD0BD0C134BFAB600CB44D4 /* ValueObjectDynamicValue.h */,
-				4CD0BD0E134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp */,
-				26BC7D8410F1B77400F91463 /* ValueObjectList.h */,
-				26BC7E9C10F1B85900F91463 /* ValueObjectList.cpp */,
-				4CABA9DC134A8BA700539BDD /* ValueObjectMemory.h */,
-				4CABA9DF134A8BCD00539BDD /* ValueObjectMemory.cpp */,
-				2643343A1110F63C00CDB6C6 /* ValueObjectRegister.h */,
-				264334381110F63100CDB6C6 /* ValueObjectRegister.cpp */,
-				94B6E76013D8833C005F417F /* ValueObjectSyntheticFilter.h */,
-				94B6E76113D88362005F417F /* ValueObjectSyntheticFilter.cpp */,
-				26BC7D8510F1B77400F91463 /* ValueObjectVariable.h */,
-				26BC7E9D10F1B85900F91463 /* ValueObjectVariable.cpp */,
-			);
-			name = Core;
-			sourceTree = "<group>";
-		};
-		26BC7C4B10F1B6C100F91463 /* Symbol */ = {
-			isa = PBXGroup;
-			children = (
-				3032B1B91CAAA400004BE1AB /* ClangUtil.h */,
-				3032B1B61CAAA3D1004BE1AB /* ClangUtil.cpp */,
-				6D0F613C1C80AA8900A4ECEE /* DebugMacros.h */,
-				6D9AB3DE1BB2B76B003F2289 /* TypeMap.h */,
-				6D9AB3DC1BB2B74E003F2289 /* TypeMap.cpp */,
-				6D99A3621BBC2F3200979793 /* ArmUnwindInfo.cpp */,
-				6D99A3611BBC2F1600979793 /* ArmUnwindInfo.h */,
-				26BC7C5510F1B6E900F91463 /* Block.h */,
-				26BC7F1310F1B8EC00F91463 /* Block.cpp */,
-				26BC7C5610F1B6E900F91463 /* ClangASTContext.h */,
-				26BC7F1410F1B8EC00F91463 /* ClangASTContext.cpp */,
-				49D8FB3713B5594900411094 /* ClangASTImporter.h */,
-				49D8FB3513B558DE00411094 /* ClangASTImporter.cpp */,
-				265192C41BA8E8F8002F08F6 /* CompilerDecl.h */,
-				265192C51BA8E905002F08F6 /* CompilerDecl.cpp */,
-				2657AFB51B8690EC00958979 /* CompilerDeclContext.h */,
-				2657AFB61B86910100958979 /* CompilerDeclContext.cpp */,
-				49E45FA911F660DC008F7B28 /* CompilerType.h */,
-				49E45FAD11F660FE008F7B28 /* CompilerType.cpp */,
-				495B38431489714C002708C5 /* ClangExternalASTSourceCommon.h */,
-				4966DCC3148978A10028481B /* ClangExternalASTSourceCommon.cpp */,
-				26E6902E129C6BD500DDECD9 /* ClangExternalASTSourceCallbacks.h */,
-				26E69030129C6BEF00DDECD9 /* ClangExternalASTSourceCallbacks.cpp */,
-				964463ED1A330C1B00154ED8 /* CompactUnwindInfo.h */,
-				964463EB1A330C0500154ED8 /* CompactUnwindInfo.cpp */,
-				26BC7C5710F1B6E900F91463 /* CompileUnit.h */,
-				26BC7F1510F1B8EC00F91463 /* CompileUnit.cpp */,
-				23E77CDB1C20F2F2007192AD /* DebugMacros.cpp */,
-				26BC7C5810F1B6E900F91463 /* Declaration.h */,
-				AF1675A822CC1A3C00DC40ED /* DeclVendor.cpp */,
-				DDB5829B2278C8D600491B41 /* CxxModuleHandler.cpp */,
-				26BC7F1610F1B8EC00F91463 /* Declaration.cpp */,
-				49B01A2D15F67B1700666829 /* DeclVendor.h */,
-				DDB5829D2278C8E900491B41 /* CxxModuleHandler.h */,
-				26BC7C5910F1B6E900F91463 /* DWARFCallFrameInfo.h */,
-				26BC7F1710F1B8EC00F91463 /* DWARFCallFrameInfo.cpp */,
-				26BC7C5A10F1B6E900F91463 /* Function.h */,
-				26BC7F1810F1B8EC00F91463 /* Function.cpp */,
-				269FF07D12494F7D00225026 /* FuncUnwinders.h */,
-				961FABB81235DE1600F93A47 /* FuncUnwinders.cpp */,
-				26BC7C5B10F1B6E900F91463 /* LineEntry.h */,
-				26BC7F1910F1B8EC00F91463 /* LineEntry.cpp */,
-				26BC7C5C10F1B6E900F91463 /* LineTable.h */,
-				26BC7F1A10F1B8EC00F91463 /* LineTable.cpp */,
-				AFF1273422276F1100C25726 /* LocateSymbolFile.cpp */,
-				AFC3068022276F62002675EA /* LocateSymbolFileMacOSX.cpp */,
-				26BC7C5D10F1B6E900F91463 /* ObjectContainer.h */,
-				26BC7C5E10F1B6E900F91463 /* ObjectFile.h */,
-				26BC7F4C10F1BC1A00F91463 /* ObjectFile.cpp */,
-				AFC4ADB02270F4C600042167 /* PostfixExpression.cpp */,
-				26BC7C5F10F1B6E900F91463 /* Symbol.h */,
-				26BC7F1B10F1B8EC00F91463 /* Symbol.cpp */,
-				26BC7C6010F1B6E900F91463 /* SymbolContext.h */,
-				26BC7F1C10F1B8EC00F91463 /* SymbolContext.cpp */,
-				26BC7C6110F1B6E900F91463 /* SymbolContextScope.h */,
-				26BC7C6210F1B6E900F91463 /* SymbolFile.h */,
-				26BC7F1D10F1B8EC00F91463 /* SymbolFile.cpp */,
-				26BC7C6310F1B6E900F91463 /* SymbolVendor.h */,
-				AF94005711C03F6500085DB9 /* SymbolVendor.cpp */,
-				26BC7C6410F1B6E900F91463 /* Symtab.h */,
-				26BC7F1F10F1B8EC00F91463 /* Symtab.cpp */,
-				49BB309511F79450001A4197 /* TaggedASTType.h */,
-				26BC7C6510F1B6E900F91463 /* Type.h */,
-				26BC7F2010F1B8EC00F91463 /* Type.cpp */,
-				26BC7C6610F1B6E900F91463 /* TypeList.h */,
-				26BC7F2110F1B8EC00F91463 /* TypeList.cpp */,
-				AEEA33F61AC74FE700AB639D /* TypeSystem.h */,
-				AEEA34041AC88A7400AB639D /* TypeSystem.cpp */,
-				269FF07F12494F8E00225026 /* UnwindPlan.h */,
-				961FABB91235DE1600F93A47 /* UnwindPlan.cpp */,
-				269FF08112494FC200225026 /* UnwindTable.h */,
-				961FABBA1235DE1600F93A47 /* UnwindTable.cpp */,
-				26BC7C6710F1B6E900F91463 /* Variable.h */,
-				26BC7F2210F1B8EC00F91463 /* Variable.cpp */,
-				26BC7C6810F1B6E900F91463 /* VariableList.h */,
-				26BC7F2310F1B8EC00F91463 /* VariableList.cpp */,
-				494260D7145790D5003C1C78 /* VerifyDecl.h */,
-				494260D914579144003C1C78 /* VerifyDecl.cpp */,
-			);
-			name = Symbol;
-			sourceTree = "<group>";
-		};
-		26BC7CEB10F1B70800F91463 /* Breakpoint */ = {
-			isa = PBXGroup;
-			children = (
-				4CCF9F6021430141006CC7EA /* BreakpointResolverScripted.h */,
-				4CCF9F5E2143012F006CC7EA /* BreakpointResolverScripted.cpp */,
-				26BC7CEE10F1B71400F91463 /* Breakpoint.h */,
-				26BC7E0A10F1B83100F91463 /* Breakpoint.cpp */,
-				26BC7CEF10F1B71400F91463 /* BreakpointID.h */,
-				26BC7E0B10F1B83100F91463 /* BreakpointID.cpp */,
-				26BC7CF010F1B71400F91463 /* BreakpointIDList.h */,
-				26BC7E0C10F1B83100F91463 /* BreakpointIDList.cpp */,
-				26BC7CF110F1B71400F91463 /* BreakpointList.h */,
-				26BC7E0D10F1B83100F91463 /* BreakpointList.cpp */,
-				26BC7CF210F1B71400F91463 /* BreakpointLocation.h */,
-				26BC7E0E10F1B83100F91463 /* BreakpointLocation.cpp */,
-				26BC7CF310F1B71400F91463 /* BreakpointLocationCollection.h */,
-				26BC7E0F10F1B83100F91463 /* BreakpointLocationCollection.cpp */,
-				26BC7CF410F1B71400F91463 /* BreakpointLocationList.h */,
-				26BC7E1010F1B83100F91463 /* BreakpointLocationList.cpp */,
-				4C7D48281F509CCD005314B4 /* BreakpointName.cpp */,
-				4C7D482B1F509CF5005314B4 /* BreakpointName.h */,
-				26BC7CF510F1B71400F91463 /* BreakpointOptions.h */,
-				26BC7E1110F1B83100F91463 /* BreakpointOptions.cpp */,
-				AF352EE022C17C0C00D058B6 /* BreakpointPrecondition.cpp */,
-				26BC7CF610F1B71400F91463 /* BreakpointResolver.h */,
-				26BC7E1210F1B83100F91463 /* BreakpointResolver.cpp */,
-				26D0DD5010FE554D00271C65 /* BreakpointResolverAddress.h */,
-				26D0DD5310FE555900271C65 /* BreakpointResolverAddress.cpp */,
-				26D0DD5110FE554D00271C65 /* BreakpointResolverFileLine.h */,
-				26D0DD5410FE555900271C65 /* BreakpointResolverFileLine.cpp */,
-				4CAA56121422D96A001FFA01 /* BreakpointResolverFileRegex.h */,
-				4CAA56141422D986001FFA01 /* BreakpointResolverFileRegex.cpp */,
-				26D0DD5210FE554D00271C65 /* BreakpointResolverName.h */,
-				26D0DD5510FE555900271C65 /* BreakpointResolverName.cpp */,
-				26BC7CF710F1B71400F91463 /* BreakpointSite.h */,
-				26BC7E1310F1B83100F91463 /* BreakpointSite.cpp */,
-				26BC7CF810F1B71400F91463 /* BreakpointSiteList.h */,
-				26BC7E1410F1B83100F91463 /* BreakpointSiteList.cpp */,
-				26BC7CFA10F1B71400F91463 /* Stoppoint.h */,
-				26BC7E1610F1B83100F91463 /* Stoppoint.cpp */,
-				26BC7CED10F1B71400F91463 /* StoppointCallbackContext.h */,
-				26BC7E0910F1B83100F91463 /* StoppointCallbackContext.cpp */,
-				26BC7CFB10F1B71400F91463 /* StoppointLocation.h */,
-				26BC7E1710F1B83100F91463 /* StoppointLocation.cpp */,
-				26BC7CFC10F1B71400F91463 /* Watchpoint.h */,
-				26BC7E1810F1B83100F91463 /* Watchpoint.cpp */,
-				B27318431416AC43006039C8 /* WatchpointList.h */,
-				B27318411416AC12006039C8 /* WatchpointList.cpp */,
-				B2B7CCED15D1BFB700EEFB57 /* WatchpointOptions.h */,
-				B2B7CCEF15D1C20F00EEFB57 /* WatchpointOptions.cpp */,
-			);
-			name = Breakpoint;
-			sourceTree = "<group>";
-		};
-		26BC7D0D10F1B71D00F91463 /* Commands */ = {
-			isa = PBXGroup;
-			children = (
-				4CA9637A11B6E99A00780E28 /* CommandObjectApropos.h */,
-				4CA9637911B6E99A00780E28 /* CommandObjectApropos.cpp */,
-				26BC7D1410F1B76300F91463 /* CommandObjectBreakpoint.h */,
-				26BC7E2D10F1B84700F91463 /* CommandObjectBreakpoint.cpp */,
-				9A42976111861A9F00FE05CD /* CommandObjectBreakpointCommand.h */,
-				9A42976211861AA600FE05CD /* CommandObjectBreakpointCommand.cpp */,
-				6D86CE9F1B440F6B00A7FBFA /* CommandObjectBugreport.h */,
-				6D86CE9E1B440F6B00A7FBFA /* CommandObjectBugreport.cpp */,
-				4C5DBBC711E3FEC60035160F /* CommandObjectCommands.h */,
-				4C5DBBC611E3FEC60035160F /* CommandObjectCommands.cpp */,
-				26BC7D1710F1B76300F91463 /* CommandObjectDisassemble.h */,
-				26BC7E3010F1B84700F91463 /* CommandObjectDisassemble.cpp */,
-				26BC7D1810F1B76300F91463 /* CommandObjectExpression.h */,
-				26BC7E3110F1B84700F91463 /* CommandObjectExpression.cpp */,
-				2672D8471189055500FF4019 /* CommandObjectFrame.h */,
-				2672D8461189055500FF4019 /* CommandObjectFrame.cpp */,
-				26CEB5F118762056008F575A /* CommandObjectGUI.h */,
-				26CEB5F018762056008F575A /* CommandObjectGUI.cpp */,
-				26BC7D1A10F1B76300F91463 /* CommandObjectHelp.h */,
-				26BC7E3310F1B84700F91463 /* CommandObjectHelp.cpp */,
-				AFC234061AF85CE000CDE8B6 /* CommandObjectLanguage.cpp */,
-				AFC234071AF85CE000CDE8B6 /* CommandObjectLanguage.h */,
-				264AD83911095BBD00E0B039 /* CommandObjectLog.h */,
-				264AD83711095BA600E0B039 /* CommandObjectLog.cpp */,
-				26BC7D1D10F1B76300F91463 /* CommandObjectMemory.h */,
-				26BC7E3610F1B84700F91463 /* CommandObjectMemory.cpp */,
-				26879CE51333F5750012C1F8 /* CommandObjectPlatform.h */,
-				26879CE71333F58B0012C1F8 /* CommandObjectPlatform.cpp */,
-				947A1D631616476A0017C8D1 /* CommandObjectPlugin.h */,
-				947A1D621616476A0017C8D1 /* CommandObjectPlugin.cpp */,
-				26BC7D1F10F1B76300F91463 /* CommandObjectProcess.h */,
-				26BC7E3810F1B84700F91463 /* CommandObjectProcess.cpp */,
-				26BC7D2010F1B76300F91463 /* CommandObjectQuit.h */,
-				26BC7E3910F1B84700F91463 /* CommandObjectQuit.cpp */,
-				26BC7D2210F1B76300F91463 /* CommandObjectRegister.h */,
-				26BC7E3B10F1B84700F91463 /* CommandObjectRegister.cpp */,
-				AFCB1D5A219CD5A700730AD5 /* CommandObjectReproducer.cpp */,
-				AFCB1D5B219CD5A700730AD5 /* CommandObjectReproducer.h */,
-				26BC7D2410F1B76300F91463 /* CommandObjectScript.h */,
-				26BC7E3D10F1B84700F91463 /* CommandObjectScript.cpp */,
-				26BC7D2710F1B76300F91463 /* CommandObjectSettings.h */,
-				26BC7E4010F1B84700F91463 /* CommandObjectSettings.cpp */,
-				26BC7D2910F1B76300F91463 /* CommandObjectSource.h */,
-				26BC7E4210F1B84700F91463 /* CommandObjectSource.cpp */,
-				6B8894782065AE5C002E5C59 /* CommandObjectStats.cpp */,
-				6B8894772065AE5C002E5C59 /* CommandObjectStats.h */,
-				269416AE119A024800FF2715 /* CommandObjectTarget.h */,
-				269416AD119A024800FF2715 /* CommandObjectTarget.cpp */,
-				26BC7D2D10F1B76300F91463 /* CommandObjectThread.h */,
-				26BC7E4610F1B84700F91463 /* CommandObjectThread.cpp */,
-				9463D4CE13B179A500C230D4 /* CommandObjectType.h */,
-				9463D4CC13B1798800C230D4 /* CommandObjectType.cpp */,
-				B296983512C2FB2B002D92C3 /* CommandObjectVersion.h */,
-				B296983412C2FB2B002D92C3 /* CommandObjectVersion.cpp */,
-				B207C4941429609C00F36E4E /* CommandObjectWatchpoint.h */,
-				B207C4921429607D00F36E4E /* CommandObjectWatchpoint.cpp */,
-				B2B7CCEC15D1BD9600EEFB57 /* CommandObjectWatchpointCommand.h */,
-				B2B7CCEA15D1BD6600EEFB57 /* CommandObjectWatchpointCommand.cpp */,
-			);
-			name = Commands;
-			sourceTree = "<group>";
-		};
-		26BC7DBE10F1B78200F91463 /* Expression */ = {
-			isa = PBXGroup;
-			children = (
-				49E4F66C1C9CAD2D008487EA /* DiagnosticManager.h */,
-				49E4F6681C9CAD12008487EA /* DiagnosticManager.cpp */,
-				4C00832C1B9A58A700D5CF24 /* Expression.h */,
-				4C88BC291BA3722B00AA0964 /* Expression.cpp */,
-				4C29E77D1BA2403F00DFF855 /* ExpressionTypeSystemHelper.h */,
-				4C00832D1B9A58A700D5CF24 /* FunctionCaller.h */,
-				4C0083321B9A5DE200D5CF24 /* FunctionCaller.cpp */,
-				4C00832E1B9A58A700D5CF24 /* UserExpression.h */,
-				4C0083331B9A5DE200D5CF24 /* UserExpression.cpp */,
-				AEB0E45A1BD6EA1400B24093 /* LLVMUserExpression.h */,
-				AEB0E4581BD6E9F800B24093 /* LLVMUserExpression.cpp */,
-				4C00833D1B9F9B8400D5CF24 /* UtilityFunction.h */,
-				4C00833F1B9F9BA900D5CF24 /* UtilityFunction.cpp */,
-				49A1CAC11430E21D00306AC9 /* ExpressionSourceCode.h */,
-				4984BA171B979C08008658D4 /* ExpressionVariable.h */,
-				4984BA151B979973008658D4 /* ExpressionVariable.cpp */,
-				4C2479BE1BA39843009C9A7B /* ExpressionParser.h */,
-				26BC7DC310F1B79500F91463 /* DWARFExpression.h */,
-				26BC7ED810F1B86700F91463 /* DWARFExpression.cpp */,
-				49C66B1C17011A43004D1922 /* IRMemoryMap.h */,
-				49DCF6FD170E6B4A0092F75E /* IRMemoryMap.cpp */,
-				4C98D3E1118FB98F00E575D0 /* IRExecutionUnit.h */,
-				4C98D3DB118FB96F00E575D0 /* IRExecutionUnit.cpp */,
-				496B015A1406DEB100F830D5 /* IRInterpreter.h */,
-				496B01581406DE8900F830D5 /* IRInterpreter.cpp */,
-				49DCF6FF170E6FD90092F75E /* Materializer.h */,
-				49DCF700170E70120092F75E /* Materializer.cpp */,
-				4939EA8B1BD56B3700084382 /* REPL.h */,
-				4939EA8C1BD56B6D00084382 /* REPL.cpp */,
-			);
-			name = Expression;
-			sourceTree = "<group>";
-		};
-		26BC7DD010F1B7C100F91463 /* Host */ = {
-			isa = PBXGroup;
-			children = (
-				6D55B29B1A8CCFF000A70529 /* android */,
-				33E5E8451A6736D30024ED68 /* StringConvert.h */,
-				69A01E1A1236C5D400C660B5 /* common */,
-				3FDFE53919A29399009756A7 /* freebsd */,
-				233B009C19610D130090E598 /* linux */,
-				26BC7EE510F1B88100F91463 /* MacOSX */,
-				3FDFDDC4199D37BE009756A7 /* posix */,
-				3FDFE53E19A2940E009756A7 /* windows */,
-				266F5CBB12FC846200DFCE33 /* Config.h */,
-				3FDFED1E19BA6D55009756A7 /* Debug.h */,
-				26CFDCA01861638D000E63E5 /* Editline.h */,
-				260C6EA013011578005E16B0 /* File.h */,
-				3FDFDDC0199D34E2009756A7 /* FileCache.h */,
-				3FDFDDBE199D345E009756A7 /* FileCache.cpp */,
-				3FDFDDC1199D34E2009756A7 /* FileSystem.h */,
-				26BC7DD410F1B7D500F91463 /* Host.h */,
-				3FDFED1F19BA6D55009756A7 /* HostGetOpt.h */,
-				3FDFE53719A2936B009756A7 /* HostInfo.h */,
-				3FDFE53819A2936B009756A7 /* HostInfoBase.h */,
-				3FDFED2019BA6D55009756A7 /* HostNativeThread.h */,
-				3FDFED2119BA6D55009756A7 /* HostNativeThreadBase.h */,
-				3FDFE57419AFABFD009756A7 /* HostProcess.h */,
-				3FDFE57519AFABFD009756A7 /* HostThread.h */,
-				267A47F41B1411750021A5BC /* NativeBreakpointList.h */,
-				267A47F51B14117F0021A5BC /* NativeProcessProtocol.h */,
-				232CB60F191E00CC00EF39FC /* NativeProcessProtocol.cpp */,
-				267A47F61B14118F0021A5BC /* NativeRegisterContext.h */,
-				267A47FA1B1411C40021A5BC /* NativeRegisterContext.cpp */,
-				267A47F81B1411A40021A5BC /* NativeThreadProtocol.h */,
-				232CB611191E00CC00EF39FC /* NativeThreadProtocol.cpp */,
-				267A47F91B1411AC0021A5BC /* NativeWatchpointList.h */,
-				267A47FE1B1411D90021A5BC /* NativeWatchpointList.cpp */,
-				A36FF33D17D8E98800244D40 /* OptionParser.h */,
-				260A39A519647A3A004B4130 /* Pipe.h */,
-				3F5E8AF31A40D4A500A73232 /* PipeBase.h */,
-				3FDFED2219BA6D55009756A7 /* ProcessRunLock.h */,
-				2654A68E1E552D2400DA1013 /* PseudoTerminal.h */,
-				2654A68C1E552D1500DA1013 /* PseudoTerminal.cpp */,
-				236124A71986B50E004EFC37 /* Socket.h */,
-				26D7E45B13D5E2F9007FD12B /* SocketAddress.h */,
-				26D7E45C13D5E30A007FD12B /* SocketAddress.cpp */,
-				2689B0A4113EE3CD00A4AEDB /* Symbols.h */,
-				6DEC6F3A1BD66D950091ABA6 /* TaskPool.h */,
-				6DEC6F381BD66D750091ABA6 /* TaskPool.cpp */,
-				268DA871130095D000C9483A /* Terminal.h */,
-				3FDFED2319BA6D55009756A7 /* ThreadLauncher.h */,
-				267A48031B1416080021A5BC /* XML.h */,
-				267A48001B1411E40021A5BC /* XML.cpp */,
-			);
-			name = Host;
-			sourceTree = "<group>";
-		};
-		26BC7DDF10F1B7E200F91463 /* Interpreter */ = {
-			isa = PBXGroup;
-			children = (
-				26BC7D5310F1B77400F91463 /* Args.h */,
-				26BC7E6C10F1B85900F91463 /* Args.cpp */,
-				26A4EEB511682AAC007A372A /* LLDBWrapPython.cpp */,
-				9441816B1C8F5EB000E5A8D9 /* CommandAlias.h */,
-				9441816D1C8F5EC900E5A8D9 /* CommandAlias.cpp */,
-				4C09CB73116BD98B00C7A725 /* CommandCompletions.h */,
-				4C09CB74116BD98B00C7A725 /* CommandCompletions.cpp */,
-				94BA8B71176F97D4005A91B5 /* CommandHistory.h */,
-				94BA8B6F176F97CE005A91B5 /* CommandHistory.cpp */,
-				26BC7DE210F1B7F900F91463 /* CommandInterpreter.h */,
-				26BC7F0810F1B8DD00F91463 /* CommandInterpreter.cpp */,
-				26BC7DE310F1B7F900F91463 /* CommandObject.h */,
-				26BC7F0910F1B8DD00F91463 /* CommandObject.cpp */,
-				26DFBC51113B48D600DD817F /* CommandObjectMultiword.h */,
-				26DFBC58113B48F300DD817F /* CommandObjectMultiword.cpp */,
-				26DFBC52113B48D600DD817F /* CommandObjectRegexCommand.h */,
-				26DFBC59113B48F300DD817F /* CommandObjectRegexCommand.cpp */,
-				4C719396207D237100FDF430 /* CommandOptionValidators.h */,
-				23DDF224196C3EE600BB8417 /* CommandOptionValidators.cpp */,
-				26BC7DE410F1B7F900F91463 /* CommandReturnObject.h */,
-				26BC7F0A10F1B8DD00F91463 /* CommandReturnObject.cpp */,
-				94005E0513F45A1B001EF42D /* embedded_interpreter.py */,
-				4C719397207D237100FDF430 /* OptionArgParser.h */,
-				4C719394207D235400FDF430 /* OptionArgParser.cpp */,
-				26A7A036135E6E5300FB369E /* OptionValue.h */,
-				26A7A034135E6E4200FB369E /* OptionValue.cpp */,
-				260A248D15D06C4F009981B0 /* OptionValues.h */,
-				2697A39415E404BA003E682C /* OptionValueArch.h */,
-				2697A39215E404B1003E682C /* OptionValueArch.cpp */,
-				260CC62115D04377002BF2E0 /* OptionValueArgs.h */,
-				260CC63B15D0440D002BF2E0 /* OptionValueArgs.cpp */,
-				260CC62215D04377002BF2E0 /* OptionValueArray.h */,
-				260CC63C15D0440D002BF2E0 /* OptionValueArray.cpp */,
-				260CC62315D04377002BF2E0 /* OptionValueBoolean.h */,
-				260CC63D15D0440D002BF2E0 /* OptionValueBoolean.cpp */,
-				25420ECE1A64911B009ADBCB /* OptionValueChar.h */,
-				25420ECC1A6490B8009ADBCB /* OptionValueChar.cpp */,
-				260CC62515D04377002BF2E0 /* OptionValueDictionary.h */,
-				260CC63F15D0440D002BF2E0 /* OptionValueDictionary.cpp */,
-				260CC62615D04377002BF2E0 /* OptionValueEnumeration.h */,
-				260CC64015D0440D002BF2E0 /* OptionValueEnumeration.cpp */,
-				260CC62715D04377002BF2E0 /* OptionValueFileSpec.h */,
-				260CC64115D0440D002BF2E0 /* OptionValueFileSpec.cpp */,
-				260CC62815D04377002BF2E0 /* OptionValueFileSpecList.h */,
-				260CC64215D0440D002BF2E0 /* OptionValueFileSpecLIst.cpp */,
-				260CC62915D04377002BF2E0 /* OptionValueFormat.h */,
-				260CC64315D0440D002BF2E0 /* OptionValueFormat.cpp */,
-				264A58EB1A7DBC8C00A6B1B0 /* OptionValueFormatEntity.h */,
-				264A58ED1A7DBCAD00A6B1B0 /* OptionValueFormatEntity.cpp */,
-				946216BF1A97C055006E19CC /* OptionValueLanguage.h */,
-				946216C11A97C080006E19CC /* OptionValueLanguage.cpp */,
-				26DAED5F15D327A200E15819 /* OptionValuePathMappings.h */,
-				26DAED6215D327C200E15819 /* OptionValuePathMappings.cpp */,
-				260CC62415D04377002BF2E0 /* OptionValueProperties.h */,
-				260CC63E15D0440D002BF2E0 /* OptionValueProperties.cpp */,
-				26491E3A15E1DB8600CBFFC2 /* OptionValueRegex.h */,
-				26491E3D15E1DB9F00CBFFC2 /* OptionValueRegex.cpp */,
-				260CC62A15D04377002BF2E0 /* OptionValueSInt64.h */,
-				260CC64415D0440D002BF2E0 /* OptionValueSInt64.cpp */,
-				260CC62B15D04377002BF2E0 /* OptionValueString.h */,
-				260CC64515D0440D002BF2E0 /* OptionValueString.cpp */,
-				260CC62C15D04377002BF2E0 /* OptionValueUInt64.h */,
-				260CC64615D0440D002BF2E0 /* OptionValueUInt64.cpp */,
-				260CC62D15D04377002BF2E0 /* OptionValueUUID.h */,
-				260CC64715D0440D002BF2E0 /* OptionValueUUID.cpp */,
-				26BC7D6D10F1B77400F91463 /* Options.h */,
-				26BC7E8610F1B85900F91463 /* Options.cpp */,
-				26D5E160135BAEB0006EA0A7 /* OptionGroupArchitecture.h */,
-				26D5E15E135BAEA2006EA0A7 /* OptionGroupArchitecture.cpp */,
-				2686536D1370ACC600D186A3 /* OptionGroupBoolean.h */,
-				2686536B1370ACB200D186A3 /* OptionGroupBoolean.cpp */,
-				260E07C9136FABAC00CF21D3 /* OptionGroupFile.h */,
-				260E07C7136FAB9200CF21D3 /* OptionGroupFile.cpp */,
-				26BCFC4F1368ADF7006DC050 /* OptionGroupFormat.h */,
-				26BCFC511368AE38006DC050 /* OptionGroupFormat.cpp */,
-				26BCFC541368B4B8006DC050 /* OptionGroupOutputFile.h */,
-				26BCFC531368B3E4006DC050 /* OptionGroupOutputFile.cpp */,
-				26D5E161135BB040006EA0A7 /* OptionGroupPlatform.h */,
-				26D5E162135BB054006EA0A7 /* OptionGroupPlatform.cpp */,
-				262ED0041631FA2800879631 /* OptionGroupString.h */,
-				262ED0071631FA3A00879631 /* OptionGroupString.cpp */,
-				2686536E1370AE5A00D186A3 /* OptionGroupUInt64.h */,
-				2686536F1370AE7200D186A3 /* OptionGroupUInt64.cpp */,
-				260E07C3136FA68900CF21D3 /* OptionGroupUUID.h */,
-				260E07C5136FA69E00CF21D3 /* OptionGroupUUID.cpp */,
-				267C0128136880C7006E963E /* OptionGroupValueObjectDisplay.h */,
-				267C012A136880DF006E963E /* OptionGroupValueObjectDisplay.cpp */,
-				26ED3D6F13C5638A0017D45E /* OptionGroupVariable.h */,
-				26ED3D6C13C563810017D45E /* OptionGroupVariable.cpp */,
-				B2462248141AD39B00F3D409 /* OptionGroupWatchpoint.h */,
-				B2462246141AD37D00F3D409 /* OptionGroupWatchpoint.cpp */,
-				26ACEC2715E077AE00E94760 /* Property.h */,
-				2640E19E15DC78FD00F23B50 /* Property.cpp */,
-				26BC7DE510F1B7F900F91463 /* ScriptInterpreter.h */,
-				9A82010B10FFB49800182560 /* ScriptInterpreter.cpp */,
-			);
-			name = Interpreter;
-			sourceTree = "<group>";
-		};
-		26BC7DEF10F1B80200F91463 /* Target */ = {
-			isa = PBXGroup;
-			children = (
-				230EC4571D63C3A7008DF59F /* CMakeLists.txt */,
-				8CF02AE019DCBF3B00B14BE0 /* InstrumentationRuntime.h */,
-				8CF02ADF19DCBF3B00B14BE0 /* InstrumentationRuntime.cpp */,
-				8CF02AEE19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.h */,
-				8CF02AED19DD15CF00B14BE0 /* InstrumentationRuntimeStopInfo.cpp */,
-				23EDE3311926843600F6A132 /* NativeRegisterContext.h */,
-				23EDE3301926839700F6A132 /* NativeRegisterContext.cpp */,
-				497E7B331188ED300065CCA1 /* ABI.h */,
-				497E7B9D1188F6690065CCA1 /* ABI.cpp */,
-				26BC7DF110F1B81A00F91463 /* DynamicLoader.h */,
-				26BC7E7710F1B85900F91463 /* DynamicLoader.cpp */,
-				26BC7DF210F1B81A00F91463 /* ExecutionContext.h */,
-				26BC7F3510F1B90C00F91463 /* ExecutionContext.cpp */,
-				26DAFD9711529BC7005A394E /* ExecutionContextScope.h */,
-				26BC179B18C7F2CB00D2196D /* JITLoader.h */,
-				26BC179718C7F2B300D2196D /* JITLoader.cpp */,
-				26BC179C18C7F2CB00D2196D /* JITLoaderList.h */,
-				26BC179818C7F2B300D2196D /* JITLoaderList.cpp */,
-				94B638511B8F8E53004FE1E4 /* Language.h */,
-				94B638521B8F8E6C004FE1E4 /* Language.cpp */,
-				4CB4430912491DDA00C13DC2 /* LanguageRuntime.h */,
-				4CB4430A12491DDA00C13DC2 /* LanguageRuntime.cpp */,
-				2690B36F1381D5B600ECFBAE /* Memory.h */,
-				2690B3701381D5C300ECFBAE /* Memory.cpp */,
-				8C2D6A54197A1EBE006989C9 /* MemoryHistory.h */,
-				8C2D6A52197A1EAF006989C9 /* MemoryHistory.cpp */,
-				2360092C193FB21500189DB1 /* MemoryRegionInfo.h */,
-				2654A6811E54D5A200DA1013 /* ModuleCache.h */,
-				2654A67F1E54D59400DA1013 /* ModuleCache.cpp */,
-				4CB443F612499B6E00C13DC2 /* ObjCLanguageRuntime.h */,
-				4CB443F212499B5000C13DC2 /* ObjCLanguageRuntime.cpp */,
-				495BBACF119A0DE700418BEA /* PathMappingList.h */,
-				495BBACB119A0DBE00418BEA /* PathMappingList.cpp */,
-				264A43BB1320B3B4005B4096 /* Platform.h */,
-				264A43BD1320BCEB005B4096 /* Platform.cpp */,
-				26BC7DF310F1B81A00F91463 /* Process.h */,
-				26BC7F3610F1B90C00F91463 /* Process.cpp */,
-				260A63111860FDB600FECF8E /* Queue.h */,
-				AF2670381852D01E00B6CC36 /* Queue.cpp */,
-				260A63121860FDBD00FECF8E /* QueueItem.h */,
-				AF0C112718580CD800C4C45B /* QueueItem.cpp */,
-				260A63131860FDC700FECF8E /* QueueList.h */,
-				AF2670391852D01E00B6CC36 /* QueueList.cpp */,
-				26AB54111832DC3400EADFF3 /* RegisterCheckpoint.h */,
-				26BC7DF410F1B81A00F91463 /* RegisterContext.h */,
-				26BC7F3710F1B90C00F91463 /* RegisterContext.cpp */,
-				2654A6841E54D5EE00DA1013 /* RegisterNumber.h */,
-				2654A6821E54D5E200DA1013 /* RegisterNumber.cpp */,
-				26501415221330EE00E16D81 /* RemoteAwarePlatform.h */,
-				26501413221330CE00E16D81 /* RemoteAwarePlatform.cpp */,
-				262173A018395D3800C52091 /* SectionLoadHistory.h */,
-				262173A218395D4600C52091 /* SectionLoadHistory.cpp */,
-				2618D78F1240115500F2B8FE /* SectionLoadList.h */,
-				2618D7911240116900F2B8FE /* SectionLoadList.cpp */,
-				26BC7DF510F1B81A00F91463 /* StackFrame.h */,
-				26BC7F3810F1B90C00F91463 /* StackFrame.cpp */,
-				26BC7DF610F1B81A00F91463 /* StackFrameList.h */,
-				26BC7F3910F1B90C00F91463 /* StackFrameList.cpp */,
-				8CFDB67920467B390052B399 /* StackFrameRecognizer.h */,
-				8CF46A6120522A9000423DDF /* StackFrameRecognizer.cpp */,
-				26BC7DF710F1B81A00F91463 /* StackID.h */,
-				26BC7F3A10F1B90C00F91463 /* StackID.cpp */,
-				2615DB841208A9C90021781D /* StopInfo.h */,
-				2615DB861208A9E40021781D /* StopInfo.cpp */,
-				238F2B9F1D2C835A001FF92A /* StructuredDataPlugin.h */,
-				238F2B9D1D2C82D0001FF92A /* StructuredDataPlugin.cpp */,
-				238F2BA01D2C835A001FF92A /* SystemRuntime.h */,
-				AF81DEF91828A23F0042CF19 /* SystemRuntime.cpp */,
-				26BC7DF810F1B81A00F91463 /* Target.h */,
-				26BC7F3B10F1B90C00F91463 /* Target.cpp */,
-				26BC7DF910F1B81A00F91463 /* TargetList.h */,
-				26BC7F3C10F1B90C00F91463 /* TargetList.cpp */,
-				26BC7DFA10F1B81A00F91463 /* Thread.h */,
-				26BC7F3D10F1B90C00F91463 /* Thread.cpp */,
-				8CCB017C19BA289B0009FD44 /* ThreadCollection.h */,
-				8CCB017A19BA283D0009FD44 /* ThreadCollection.cpp */,
-				26BC7DFB10F1B81A00F91463 /* ThreadList.h */,
-				26BC7F3E10F1B90C00F91463 /* ThreadList.cpp */,
-				26BC7DFC10F1B81A00F91463 /* ThreadPlan.h */,
-				26BC7F3F10F1B90C00F91463 /* ThreadPlan.cpp */,
-				260C847F10F50F0A00BB2B04 /* ThreadPlanBase.h */,
-				260C847110F50EFC00BB2B04 /* ThreadPlanBase.cpp */,
-				49EC3E9C118F90D400B1265E /* ThreadPlanCallFunction.h */,
-				49EC3E98118F90AC00B1265E /* ThreadPlanCallFunction.cpp */,
-				EB8375E81B553DFE00BA907D /* ThreadPlanCallFunctionUsingABI.h */,
-				EB8375E61B553DE800BA907D /* ThreadPlanCallFunctionUsingABI.cpp */,
-				230EC4581D63C3A7008DF59F /* ThreadPlanCallOnFunctionExit.cpp */,
-				4C7CF7E31295E10E00B4FBB5 /* ThreadPlanCallUserExpression.h */,
-				4C7CF7E51295E12B00B4FBB5 /* ThreadPlanCallUserExpression.cpp */,
-				4C56543219D1EFB5002E9C44 /* ThreadPlanPython.h */,
-				4C56543019D1EFAA002E9C44 /* ThreadPlanPython.cpp */,
-				4C43DEF9110641F300E55CBF /* ThreadPlanShouldStopHere.h */,
-				4C43DEFA110641F300E55CBF /* ThreadPlanShouldStopHere.cpp */,
-				260C848010F50F0A00BB2B04 /* ThreadPlanStepInstruction.h */,
-				260C847210F50EFC00BB2B04 /* ThreadPlanStepInstruction.cpp */,
-				260C848110F50F0A00BB2B04 /* ThreadPlanStepOut.h */,
-				260C847310F50EFC00BB2B04 /* ThreadPlanStepOut.cpp */,
-				260C848210F50F0A00BB2B04 /* ThreadPlanStepOverBreakpoint.h */,
-				260C847410F50EFC00BB2B04 /* ThreadPlanStepOverBreakpoint.cpp */,
-				260C848410F50F0A00BB2B04 /* ThreadPlanStepRange.h */,
-				260C847610F50EFC00BB2B04 /* ThreadPlanStepRange.cpp */,
-				4C43DF8511069BFD00E55CBF /* ThreadPlanStepInRange.h */,
-				4C43DF8911069C3200E55CBF /* ThreadPlanStepInRange.cpp */,
-				4C43DF8611069BFD00E55CBF /* ThreadPlanStepOverRange.h */,
-				4C43DF8A11069C3200E55CBF /* ThreadPlanStepOverRange.cpp */,
-				4CAFCE001101216B00CA63DB /* ThreadPlanRunToAddress.h */,
-				4CAFCE031101218900CA63DB /* ThreadPlanRunToAddress.cpp */,
-				260C848310F50F0A00BB2B04 /* ThreadPlanStepThrough.h */,
-				260C847510F50EFC00BB2B04 /* ThreadPlanStepThrough.cpp */,
-				4CEDAED311754F5E00E875A6 /* ThreadPlanStepUntil.h */,
-				2660D9FE11922A7F00958FBD /* ThreadPlanStepUntil.cpp */,
-				4CC2A14C128C7409001531C4 /* ThreadPlanTracer.h */,
-				4CC2A148128C73ED001531C4 /* ThreadPlanTracer.cpp */,
-				4C08CDEB11C81F1E001610A8 /* ThreadSpec.h */,
-				4C08CDE711C81EF8001610A8 /* ThreadSpec.cpp */,
-				4C00986F11500B4300F316B0 /* UnixSignals.h */,
-				4C00987011500B4300F316B0 /* UnixSignals.cpp */,
-				26E3EEBD11A9870400FBADB6 /* Unwind.h */,
-				264D8D4E13661BCC003A368F /* UnwindAssembly.h */,
-				264D8D4F13661BD7003A368F /* UnwindAssembly.cpp */,
-			);
-			name = Target;
-			sourceTree = "<group>";
-		};
-		26BC7EE510F1B88100F91463 /* MacOSX */ = {
-			isa = PBXGroup;
-			children = (
-				AFF81FAA20D1CC210010F95E /* objcxx */,
-				26BC7EED10F1B8AD00F91463 /* CFCBundle.cpp */,
-				26BC7EEE10F1B8AD00F91463 /* CFCBundle.h */,
-				26BC7EEF10F1B8AD00F91463 /* CFCData.cpp */,
-				26BC7EF010F1B8AD00F91463 /* CFCData.h */,
-				26BC7EF110F1B8AD00F91463 /* CFCMutableArray.cpp */,
-				26BC7EF210F1B8AD00F91463 /* CFCMutableArray.h */,
-				26BC7EF310F1B8AD00F91463 /* CFCMutableDictionary.cpp */,
-				26BC7EF410F1B8AD00F91463 /* CFCMutableDictionary.h */,
-				26BC7EF510F1B8AD00F91463 /* CFCMutableSet.cpp */,
-				26BC7EF610F1B8AD00F91463 /* CFCMutableSet.h */,
-				26BC7EF710F1B8AD00F91463 /* CFCReleaser.h */,
-				26BC7EF810F1B8AD00F91463 /* CFCString.cpp */,
-				26BC7EF910F1B8AD00F91463 /* CFCString.h */,
-				3FDFE52D19A291AF009756A7 /* HostInfoMacOSX.h */,
-				3FDFE56719AF9BB2009756A7 /* HostThreadMacOSX.h */,
-			);
-			name = MacOSX;
-			sourceTree = "<group>";
-		};
-		26BF51E91B3C754400016294 /* SysV-hexagon */ = {
-			isa = PBXGroup;
-			children = (
-				26BF51EA1B3C754400016294 /* ABISysV_hexagon.cpp */,
-				26BF51EB1B3C754400016294 /* ABISysV_hexagon.h */,
-			);
-			path = "SysV-hexagon";
-			sourceTree = "<group>";
-		};
-		26BF51EE1B3C754400016294 /* SysV-i386 */ = {
-			isa = PBXGroup;
-			children = (
-				26BF51EF1B3C754400016294 /* ABISysV_i386.cpp */,
-				26BF51F01B3C754400016294 /* ABISysV_i386.h */,
-			);
-			path = "SysV-i386";
-			sourceTree = "<group>";
-		};
-		26C5577E132575B6008FD8FE /* Platform */ = {
-			isa = PBXGroup;
-			children = (
-				6D55BAE61A8CD08C00A70529 /* Android */,
-				2694E99814FC0BB30076DE67 /* FreeBSD */,
-				264A97BC133918A30017F0BE /* GDB Server */,
-				2694E99F14FC0BBD0076DE67 /* Linux */,
-				26C5577F132575C8008FD8FE /* MacOSX */,
-				26EFB6151BFE8D3E00544801 /* NetBSD */,
-				4CE4EFA51E89998800A80C06 /* OpenBSD */,
-				9457596415349416005A9070 /* POSIX */,
-				490A36BA180F0E6F00BA31F8 /* Windows */,
-			);
-			path = Platform;
-			sourceTree = "<group>";
-		};
-		26C5577F132575C8008FD8FE /* MacOSX */ = {
-			isa = PBXGroup;
-			children = (
-				AFF81FB120D1CC820010F95E /* objcxx */,
-				9455630A1BEAD0570073F75F /* PlatformAppleSimulator.cpp */,
-				9455630B1BEAD0570073F75F /* PlatformAppleSimulator.h */,
-				AF8AD62A1BEC28A400150209 /* PlatformAppleTVSimulator.cpp */,
-				AF8AD62B1BEC28A400150209 /* PlatformAppleTVSimulator.h */,
-				AF8AD62C1BEC28A400150209 /* PlatformAppleWatchSimulator.cpp */,
-				AF8AD62D1BEC28A400150209 /* PlatformAppleWatchSimulator.h */,
-				AF254E2F170CCC33007AE5C9 /* PlatformDarwinKernel.cpp */,
-				AF254E30170CCC33007AE5C9 /* PlatformDarwinKernel.h */,
-				2697A54B133A6305004E4240 /* PlatformDarwin.cpp */,
-				2697A54C133A6305004E4240 /* PlatformDarwin.h */,
-				26B7564C14F89356008D9CB3 /* PlatformiOSSimulator.cpp */,
-				26B7564D14F89356008D9CB3 /* PlatformiOSSimulator.h */,
-				26C5577B132575AD008FD8FE /* PlatformMacOSX.cpp */,
-				26C5577C132575AD008FD8FE /* PlatformMacOSX.h */,
-				AF3A4AD01EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.cpp */,
-				AF3A4AD11EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h */,
-				AF8AD6331BEC28C400150209 /* PlatformRemoteAppleTV.cpp */,
-				AF8AD6341BEC28C400150209 /* PlatformRemoteAppleTV.h */,
-				AF66324E216EB9C300BB510D /* PlatformRemoteAppleBridge.cpp */,
-				AF66324F216EB9C300BB510D /* PlatformRemoteAppleBridge.h */,
-				AF8AD6351BEC28C400150209 /* PlatformRemoteAppleWatch.cpp */,
-				AF8AD6361BEC28C400150209 /* PlatformRemoteAppleWatch.h */,
-				2675F6FE1332BE690067997B /* PlatformRemoteiOS.cpp */,
-				2675F6FF1332BE690067997B /* PlatformRemoteiOS.h */,
-			);
-			path = MacOSX;
-			sourceTree = "<group>";
-		};
-		26D9FDCA12F785120003F2EE /* Instruction */ = {
-			isa = PBXGroup;
-			children = (
-				AFDBC36A2046638D00B9C8F2 /* PPC64 */,
-				E778E99D1B062D1700247609 /* MIPS */,
-				26D9FDCB12F785270003F2EE /* ARM */,
-				264A12F91372522000875C42 /* ARM64 */,
-				94A5B3941AB9FE5F00A5EE7F /* MIPS64 */,
-			);
-			path = Instruction;
-			sourceTree = "<group>";
-		};
-		26D9FDCB12F785270003F2EE /* ARM */ = {
-			isa = PBXGroup;
-			children = (
-				9A22A15D135E30370024DDC3 /* EmulateInstructionARM.cpp */,
-				9A22A15E135E30370024DDC3 /* EmulateInstructionARM.h */,
-				9A22A15F135E30370024DDC3 /* EmulationStateARM.cpp */,
-				9A22A160135E30370024DDC3 /* EmulationStateARM.h */,
-			);
-			path = ARM;
-			sourceTree = "<group>";
-		};
-		26DB3E051379E7AD0080DC73 /* ABI */ = {
-			isa = PBXGroup;
-			children = (
-				26DB3E061379E7AD0080DC73 /* MacOSX-arm */,
-				26DB3E0A1379E7AD0080DC73 /* MacOSX-arm64 */,
-				26DB3E0E1379E7AD0080DC73 /* MacOSX-i386 */,
-				AF20F7621AF18F5E00751A6E /* SysV-arm */,
-				AF20F7631AF18F6800751A6E /* SysV-arm64 */,
-				26BF51E91B3C754400016294 /* SysV-hexagon */,
-				26BF51EE1B3C754400016294 /* SysV-i386 */,
-				9694FA6E1B32AA35005EBB16 /* SysV-mips */,
-				263641141B34AEE200145B2F /* SysV-mips64 */,
-				AF77E08B1A033C3E0096C0EA /* SysV-ppc */,
-				AF77E08C1A033C4B0096C0EA /* SysV-ppc64 */,
-				267F68461CC02DED0086832B /* SysV-s390x */,
-				26DB3E121379E7AD0080DC73 /* SysV-x86_64 */,
-				AF352EDA22C17BD700D058B6 /* Windows-x86_64 */,
-			);
-			path = ABI;
-			sourceTree = "<group>";
-		};
-		26DB3E061379E7AD0080DC73 /* MacOSX-arm */ = {
-			isa = PBXGroup;
-			children = (
-				26DB3E071379E7AD0080DC73 /* ABIMacOSX_arm.cpp */,
-				26DB3E081379E7AD0080DC73 /* ABIMacOSX_arm.h */,
-			);
-			path = "MacOSX-arm";
-			sourceTree = "<group>";
-		};
-		26DB3E0A1379E7AD0080DC73 /* MacOSX-arm64 */ = {
-			isa = PBXGroup;
-			children = (
-				26DB3E0B1379E7AD0080DC73 /* ABIMacOSX_arm64.cpp */,
-				26DB3E0C1379E7AD0080DC73 /* ABIMacOSX_arm64.h */,
-			);
-			path = "MacOSX-arm64";
-			sourceTree = "<group>";
-		};
-		26DB3E0E1379E7AD0080DC73 /* MacOSX-i386 */ = {
-			isa = PBXGroup;
-			children = (
-				26DB3E0F1379E7AD0080DC73 /* ABIMacOSX_i386.cpp */,
-				26DB3E101379E7AD0080DC73 /* ABIMacOSX_i386.h */,
-			);
-			path = "MacOSX-i386";
-			sourceTree = "<group>";
-		};
-		26DB3E121379E7AD0080DC73 /* SysV-x86_64 */ = {
-			isa = PBXGroup;
-			children = (
-				26DB3E131379E7AD0080DC73 /* ABISysV_x86_64.cpp */,
-				26DB3E141379E7AD0080DC73 /* ABISysV_x86_64.h */,
-			);
-			path = "SysV-x86_64";
-			sourceTree = "<group>";
-		};
-		26E152221419CACA007967D0 /* PECOFF */ = {
-			isa = PBXGroup;
-			children = (
-				26E152231419CACA007967D0 /* ObjectFilePECOFF.cpp */,
-				26E152241419CACA007967D0 /* ObjectFilePECOFF.h */,
-				26C7C4811BFFEA7E009BD01F /* WindowsMiniDump.cpp */,
-				26C7C4821BFFEA7E009BD01F /* WindowsMiniDump.h */,
-			);
-			path = PECOFF;
-			sourceTree = "<group>";
-		};
-		26EFB6151BFE8D3E00544801 /* NetBSD */ = {
-			isa = PBXGroup;
-			children = (
-				26EFB6181BFE8D3E00544801 /* PlatformNetBSD.cpp */,
-				26EFB6191BFE8D3E00544801 /* PlatformNetBSD.h */,
-			);
-			path = NetBSD;
-			sourceTree = "<group>";
-		};
-		26EFC4C718CFAF0D00865D87 /* JIT */ = {
-			isa = PBXGroup;
-			children = (
-				26EFC4CA18CFAF0D00865D87 /* ObjectFileJIT.cpp */,
-				26EFC4CB18CFAF0D00865D87 /* ObjectFileJIT.h */,
-			);
-			path = JIT;
-			sourceTree = "<group>";
-		};
-		26F006521B4DD86700B872E5 /* Windows-DYLD */ = {
-			isa = PBXGroup;
-			children = (
-				26F006541B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp */,
-				26F006551B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.h */,
-			);
-			path = "Windows-DYLD";
-			sourceTree = "<group>";
-		};
-		26F5C22410F3D950009D5894 /* Tools */ = {
-			isa = PBXGroup;
-			children = (
-				E769331B1A94D10E00C73337 /* lldb-server */,
-				26792615211CA3C100EE1D10 /* lldb-vscode */,
-				942829BA1A89830900521B30 /* argdumper */,
-				26579F55126A255E0007C5CB /* darwin-debug */,
-				265E9BE0115C2B8500D0DCCB /* debugserver */,
-				26F5C22510F3D956009D5894 /* Driver */,
-				2665CD0915080846002C8FAE /* install-headers */,
-			);
-			name = Tools;
-			sourceTree = "<group>";
-			usesTabs = 0;
-		};
-		26F5C22510F3D956009D5894 /* Driver */ = {
-			isa = PBXGroup;
-			children = (
-				DD5F951B21ADE5F000B8265A /* Options.td */,
-				DD5F951A21ADE5BD00B8265A /* Options.inc */,
-				26F5C27210F3D9E4009D5894 /* lldb-Info.plist */,
-				26F5C27410F3D9E4009D5894 /* Driver.h */,
-				26F5C27310F3D9E4009D5894 /* Driver.cpp */,
-			);
-			name = Driver;
-			sourceTree = "<group>";
-		};
-		26F5C32810F3DF7D009D5894 /* Libraries */ = {
-			isa = PBXGroup;
-			children = (
-				26F5C39010F3FA26009D5894 /* CoreFoundation.framework */,
-				260C876910F538E700BB2B04 /* Foundation.framework */,
-				26709E311964A34000B94724 /* LaunchServices.framework */,
-				26F5C32A10F3DFDD009D5894 /* libedit.dylib */,
-				2689FFCA13353D7A00698AC0 /* liblldb-core.a */,
-				2670F8111862B44A006B332C /* libncurses.dylib */,
-				26F5C37410F3F61B009D5894 /* libobjc.dylib */,
-				260157C41885F4FF00F875CF /* libpanel.dylib */,
-				26F5C32410F3DF23009D5894 /* libpython.dylib */,
-				26F5C32B10F3DFDD009D5894 /* libtermcap.dylib */,
-				26D55234159A7DB100708D8D /* libxml2.dylib */,
-				966C6B7818E6A56A0093F5EC /* libz.dylib */,
-				EDB919B414F6F10D008FF64B /* Security.framework */,
-			);
-			name = Libraries;
-			sourceTree = "<group>";
-			usesTabs = 0;
-		};
-		26FFC19214FC072100087D58 /* POSIX-DYLD */ = {
-			isa = PBXGroup;
-			children = (
-				26FFC19514FC072100087D58 /* DYLDRendezvous.cpp */,
-				26FFC19614FC072100087D58 /* DYLDRendezvous.h */,
-				26FFC19714FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp */,
-				26FFC19814FC072100087D58 /* DynamicLoaderPOSIXDYLD.h */,
-			);
-			path = "POSIX-DYLD";
-			sourceTree = "<group>";
-		};
-		3F8169261ABB73C1001DA9DF /* Initialization */ = {
-			isa = PBXGroup;
-			children = (
-				3F8169341ABB7A80001DA9DF /* SystemInitializer.h */,
-				3F81692E1ABB7A6D001DA9DF /* SystemInitializer.cpp */,
-				3F8169351ABB7A80001DA9DF /* SystemInitializerCommon.h */,
-				3F81692F1ABB7A6D001DA9DF /* SystemInitializerCommon.cpp */,
-				3F8169361ABB7A80001DA9DF /* SystemLifetimeManager.h */,
-				3F8169301ABB7A6D001DA9DF /* SystemLifetimeManager.cpp */,
-			);
-			name = Initialization;
-			sourceTree = "<group>";
-		};
-		3FBA69DA1B6066D20008F44A /* ScriptInterpreter */ = {
-			isa = PBXGroup;
-			children = (
-				3FBA69DC1B6066E90008F44A /* None */,
-				3FBA69DB1B6066E40008F44A /* Python */,
-			);
-			name = ScriptInterpreter;
-			sourceTree = "<group>";
-		};
-		3FBA69DB1B6066E40008F44A /* Python */ = {
-			isa = PBXGroup;
-			children = (
-				3FBA69E21B60672A0008F44A /* lldb-python.h */,
-				3FBA69E31B60672A0008F44A /* PythonDataObjects.cpp */,
-				3FBA69E41B60672A0008F44A /* PythonDataObjects.h */,
-				AFCB2BBB1BF577F40018B553 /* PythonExceptionState.cpp */,
-				AFCB2BBC1BF577F40018B553 /* PythonExceptionState.h */,
-				3FBA69E51B60672A0008F44A /* ScriptInterpreterPython.cpp */,
-				3FBA69E61B60672A0008F44A /* ScriptInterpreterPython.h */,
-			);
-			name = Python;
-			sourceTree = "<group>";
-		};
-		3FBA69DC1B6066E90008F44A /* None */ = {
-			isa = PBXGroup;
-			children = (
-				3FBA69DD1B6067020008F44A /* ScriptInterpreterNone.cpp */,
-				3FBA69DE1B6067020008F44A /* ScriptInterpreterNone.h */,
-			);
-			name = None;
-			sourceTree = "<group>";
-		};
-		3FDFDDC4199D37BE009756A7 /* posix */ = {
-			isa = PBXGroup;
-			children = (
-				2579065E1BD0488D00178368 /* DomainSocket.cpp */,
-				255EFF751AFABA950069F277 /* LockFilePosix.cpp */,
-				AFDFDFD019E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp */,
-				3FDFDDC5199D37ED009756A7 /* FileSystem.cpp */,
-				3FDFE53019A292F0009756A7 /* HostInfoPosix.cpp */,
-				3FDFE53219A29304009756A7 /* HostInfoPosix.h */,
-				3FDFE56A19AF9C44009756A7 /* HostProcessPosix.cpp */,
-				3FDFE56E19AF9C5A009756A7 /* HostProcessPosix.h */,
-				3FDFE56B19AF9C44009756A7 /* HostThreadPosix.cpp */,
-				3FDFE56F19AF9C5A009756A7 /* HostThreadPosix.h */,
-				2377C2F719E613C100737875 /* PipePosix.cpp */,
-			);
-			name = posix;
-			path = source/Host/posix;
-			sourceTree = "<group>";
-		};
-		3FDFE53919A29399009756A7 /* freebsd */ = {
-			isa = PBXGroup;
-			children = (
-				3FDFE53C19A293CA009756A7 /* Config.h */,
-				3FDFE55E19AF9B14009756A7 /* Host.cpp */,
-				3FDFE53B19A293B3009756A7 /* HostInfoFreeBSD.cpp */,
-				3FDFE53D19A293CA009756A7 /* HostInfoFreeBSD.h */,
-				3FDFE55F19AF9B14009756A7 /* HostThreadFreeBSD.cpp */,
-				3FDFE56019AF9B39009756A7 /* HostThreadFreeBSD.h */,
-			);
-			name = freebsd;
-			sourceTree = "<group>";
-		};
-		3FDFE53E19A2940E009756A7 /* windows */ = {
-			isa = PBXGroup;
-			children = (
-				255EFF711AFABA4D0069F277 /* LockFileWindows.cpp */,
-				255EFF6F1AFABA320069F277 /* LockFileWindows.h */,
-				255EFF701AFABA320069F277 /* PipeWindows.h */,
-				3FDFE54719A2946B009756A7 /* AutoHandle.h */,
-				3FDFE54819A2946B009756A7 /* editlinewin.h */,
-				3FDFE54019A29448009756A7 /* EditLineWin.cpp */,
-				3FDFE54119A29448009756A7 /* FileSystem.cpp */,
-				3FDFE54219A29448009756A7 /* Host.cpp */,
-				3FDFE54319A29448009756A7 /* HostInfoWindows.cpp */,
-				3FDFE54919A2946B009756A7 /* HostInfoWindows.h */,
-				3FDFE57019AF9CA0009756A7 /* HostProcessWindows.cpp */,
-				3FDFE57219AF9CD3009756A7 /* HostProcessWindows.h */,
-				3FDFE57119AF9CA0009756A7 /* HostThreadWindows.cpp */,
-				3FDFE57319AF9CD3009756A7 /* HostThreadWindows.h */,
-				3FDFE54519A29448009756A7 /* ProcessRunLock.cpp */,
-				3FDFE54A19A2946B009756A7 /* win32.h */,
-				3FDFE54619A29448009756A7 /* Windows.cpp */,
-				3FDFE54B19A2946B009756A7 /* windows.h */,
-			);
-			name = windows;
-			sourceTree = "<group>";
-		};
-		490A36BA180F0E6F00BA31F8 /* Windows */ = {
-			isa = PBXGroup;
-			children = (
-				490A36BD180F0E6F00BA31F8 /* PlatformWindows.cpp */,
-				490A36BE180F0E6F00BA31F8 /* PlatformWindows.h */,
-			);
-			path = Windows;
-			sourceTree = "<group>";
-		};
-		49724D961AD6ECFA0033C538 /* RenderScript */ = {
-			isa = PBXGroup;
-			children = (
-				23D065811D4A7BDA0008EDE6 /* CMakeLists.txt */,
-				948554591DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp */,
-				948554581DCBAE3200345FF5 /* RenderScriptScriptGroup.h */,
-				23D065831D4A7BDA0008EDE6 /* RenderScriptExpressionOpts.h */,
-				23D065821D4A7BDA0008EDE6 /* RenderScriptExpressionOpts.cpp */,
-				23D065851D4A7BDA0008EDE6 /* RenderScriptRuntime.h */,
-				23D065841D4A7BDA0008EDE6 /* RenderScriptRuntime.cpp */,
-				23D065871D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.h */,
-				23D065861D4A7BDA0008EDE6 /* RenderScriptx86ABIFixups.cpp */,
-			);
-			name = RenderScript;
-			path = RenderScript/RenderScriptRuntime;
-			sourceTree = "<group>";
-		};
-		4984BA0B1B975E9F008658D4 /* ExpressionParser */ = {
-			isa = PBXGroup;
-			children = (
-				4984BA0C1B97620B008658D4 /* Clang */,
-			);
-			name = ExpressionParser;
-			sourceTree = "<group>";
-		};
-		4984BA0C1B97620B008658D4 /* Clang */ = {
-			isa = PBXGroup;
-			children = (
-				4C3DA2301CA0BFB800CEB1D4 /* ClangDiagnostic.h */,
-				4C98D3E0118FB98F00E575D0 /* ClangFunctionCaller.h */,
-				4C98D3DA118FB96F00E575D0 /* ClangFunctionCaller.cpp */,
-				26BC7DC010F1B79500F91463 /* ClangExpressionHelper.h */,
-				4CD44D5720C603A90003557C /* ClangHost.h */,
-				4CD44D5620C603A80003557C /* ClangHost.cpp */,
-				49445E341225AB6A00C11A81 /* ClangUserExpression.h */,
-				26BC7ED510F1B86700F91463 /* ClangUserExpression.cpp */,
-				497C86C1122823F300B54702 /* ClangUtilityFunction.h */,
-				497C86BD122823D800B54702 /* ClangUtilityFunction.cpp */,
-				49D7072611B5AD03001AD875 /* ClangASTSource.h */,
-				49D7072811B5AD11001AD875 /* ClangASTSource.cpp */,
-				49F1A74911B338AE003ED505 /* ClangExpressionDeclMap.h */,
-				49F1A74511B3388F003ED505 /* ClangExpressionDeclMap.cpp */,
-				49445C2912245E5500C11A81 /* ClangExpressionParser.h */,
-				49445C2512245E3600C11A81 /* ClangExpressionParser.cpp */,
-				4C61465D223059B000D686F9 /* ClangExpressionSourceCode.h */,
-				4C61465C223059B000D686F9 /* ClangExpressionSourceCode.cpp */,
-				4959511B1A1BC48100F6F8FC /* ClangModulesDeclVendor.h */,
-				4959511E1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp */,
-				49D4FE821210B5FB00CDB854 /* ClangPersistentVariables.h */,
-				49D4FE871210B61C00CDB854 /* ClangPersistentVariables.cpp */,
-				4906FD4412F2257600A2A77C /* ASTDumper.h */,
-				4906FD4012F2255300A2A77C /* ASTDumper.cpp */,
-				49A8A3A311D568BF00AD3B68 /* ASTResultSynthesizer.h */,
-				49A8A39F11D568A300AD3B68 /* ASTResultSynthesizer.cpp */,
-				4911934B1226383D00578B7F /* ASTStructExtractor.h */,
-				491193501226386000578B7F /* ASTStructExtractor.cpp */,
-				4C0B957E2238342C0026C840 /* ASTUtils.cpp */,
-				4C0B957F2238342C0026C840 /* ASTUtils.h */,
-				49307AB111DEA4F20081F992 /* IRForTarget.h */,
-				49307AAD11DEA4D90081F992 /* IRForTarget.cpp */,
-				4984BA0F1B978C3E008658D4 /* ClangExpressionVariable.h */,
-				4984BA0E1B978C3E008658D4 /* ClangExpressionVariable.cpp */,
-			);
-			name = Clang;
-			sourceTree = "<group>";
-		};
-		4C14CEF52057258D00DEEF94 /* PPC64 */ = {
-			isa = PBXGroup;
-			children = (
-				4C14CEF72057258D00DEEF94 /* ArchitecturePPC64.h */,
-				4C14CEF82057258D00DEEF94 /* ArchitecturePPC64.cpp */,
-			);
-			path = PPC64;
-			sourceTree = "<group>";
-		};
-		4C9BF11621C0467700FA4036 /* Breakpad */ = {
-			isa = PBXGroup;
-			children = (
-				4CAEC6A721F26D15007C3DD5 /* BreakpadRecords.h */,
-				4CAEC6A621F26D15007C3DD5 /* BreakpadRecords.cpp */,
-				4C9BF11821C0467700FA4036 /* ObjectFileBreakpad.h */,
-				4C9BF11921C0467700FA4036 /* ObjectFileBreakpad.cpp */,
-			);
-			path = Breakpad;
-			sourceTree = "<group>";
-		};
-		4CCA643A13B40B82003BDF98 /* LanguageRuntime */ = {
-			isa = PBXGroup;
-			children = (
-				49724D961AD6ECFA0033C538 /* RenderScript */,
-				4CCA643B13B40B82003BDF98 /* CPlusPlus */,
-				4CCA644013B40B82003BDF98 /* ObjC */,
-			);
-			path = LanguageRuntime;
-			sourceTree = "<group>";
-		};
-		4CCA643B13B40B82003BDF98 /* CPlusPlus */ = {
-			isa = PBXGroup;
-			children = (
-				AF9E360B22DD3BFB000B7776 /* CPPLanguageRuntime.cpp */,
-				4CCA643C13B40B82003BDF98 /* ItaniumABI */,
-			);
-			path = CPlusPlus;
-			sourceTree = "<group>";
-		};
-		4CCA643C13B40B82003BDF98 /* ItaniumABI */ = {
-			isa = PBXGroup;
-			children = (
-				4CCA643D13B40B82003BDF98 /* ItaniumABILanguageRuntime.cpp */,
-				4CCA643E13B40B82003BDF98 /* ItaniumABILanguageRuntime.h */,
-			);
-			path = ItaniumABI;
-			sourceTree = "<group>";
-		};
-		4CCA644013B40B82003BDF98 /* ObjC */ = {
-			isa = PBXGroup;
-			children = (
-				4CCA644113B40B82003BDF98 /* AppleObjCRuntime */,
-			);
-			path = ObjC;
-			sourceTree = "<group>";
-		};
-		4CCA644113B40B82003BDF98 /* AppleObjCRuntime */ = {
-			isa = PBXGroup;
-			children = (
-				94CD7D0719A3FB8600908B7C /* AppleObjCClassDescriptorV2.h */,
-				94CD7D0819A3FBA300908B7C /* AppleObjCClassDescriptorV2.cpp */,
-				4CCA644213B40B82003BDF98 /* AppleObjCRuntime.cpp */,
-				4CCA644313B40B82003BDF98 /* AppleObjCRuntime.h */,
-				4CCA644413B40B82003BDF98 /* AppleObjCRuntimeV1.cpp */,
-				4CCA644513B40B82003BDF98 /* AppleObjCRuntimeV1.h */,
-				4CCA644613B40B82003BDF98 /* AppleObjCRuntimeV2.cpp */,
-				4CCA644713B40B82003BDF98 /* AppleObjCRuntimeV2.h */,
-				4CCA644813B40B82003BDF98 /* AppleObjCTrampolineHandler.cpp */,
-				4CCA644913B40B82003BDF98 /* AppleObjCTrampolineHandler.h */,
-				94CD7D0A19A3FBC300908B7C /* AppleObjCTypeEncodingParser.h */,
-				94CD7D0B19A3FBCE00908B7C /* AppleObjCTypeEncodingParser.cpp */,
-				49DA65041485C942005FF180 /* AppleObjCDeclVendor.h */,
-				49DA65021485C92A005FF180 /* AppleObjCDeclVendor.cpp */,
-				4CCA644A13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp */,
-				4CCA644B13B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.h */,
-			);
-			path = AppleObjCRuntime;
-			sourceTree = "<group>";
-		};
-		4CE4EFA51E89998800A80C06 /* OpenBSD */ = {
-			isa = PBXGroup;
-			children = (
-				4CE4EFA61E8999B000A80C06 /* PlatformOpenBSD.cpp */,
-				4CE4EFA71E8999B000A80C06 /* PlatformOpenBSD.h */,
-			);
-			path = OpenBSD;
-			sourceTree = "<group>";
-		};
-		4CEC86A5204738CC009B37B1 /* ARM64 */ = {
-			isa = PBXGroup;
-			children = (
-				4CEC86A3204738C5009B37B1 /* TestArm64InstEmulation.cpp */,
-			);
-			name = ARM64;
-			sourceTree = "<group>";
-		};
-		4CEC86A8204738EE009B37B1 /* PPC64 */ = {
-			isa = PBXGroup;
-			children = (
-				4CEC86A6204738EA009B37B1 /* TestPPC64InstEmulation.cpp */,
-			);
-			name = PPC64;
-			sourceTree = "<group>";
-		};
-		4CEE62F71145F1C70064CF93 /* GDB Remote */ = {
-			isa = PBXGroup;
-			children = (
-				2374D7431D4BAA1D005C9575 /* CMakeLists.txt */,
-				2374D74F1D4BB299005C9575 /* GDBRemoteClientBase.h */,
-				2374D74E1D4BB299005C9575 /* GDBRemoteClientBase.cpp */,
-				6D55B2931A8A808400A70529 /* GDBRemoteCommunicationServerCommon.h */,
-				6D55B2941A8A808400A70529 /* GDBRemoteCommunicationServerLLGS.h */,
-				6D55B2951A8A808400A70529 /* GDBRemoteCommunicationServerPlatform.h */,
-				6D55B28D1A8A806200A70529 /* GDBRemoteCommunicationServerCommon.cpp */,
-				6D55B28E1A8A806200A70529 /* GDBRemoteCommunicationServerLLGS.cpp */,
-				6D55B28F1A8A806200A70529 /* GDBRemoteCommunicationServerPlatform.cpp */,
-				2618EE5B1315B29C001D6D71 /* GDBRemoteCommunication.cpp */,
-				2618EE5C1315B29C001D6D71 /* GDBRemoteCommunication.h */,
-				26744EED1338317700EF765A /* GDBRemoteCommunicationClient.cpp */,
-				26744EEE1338317700EF765A /* GDBRemoteCommunicationClient.h */,
-				AF8AD943219CD45700614785 /* GDBRemoteCommunicationHistory.cpp */,
-				AF8AD944219CD45700614785 /* GDBRemoteCommunicationHistory.h */,
-				AFCB1D57219CD4FD00730AD5 /* GDBRemoteCommunicationReplayServer.cpp */,
-				AFCB1D56219CD4FD00730AD5 /* GDBRemoteCommunicationReplayServer.h */,
-				26744EEF1338317700EF765A /* GDBRemoteCommunicationServer.cpp */,
-				26744EF01338317700EF765A /* GDBRemoteCommunicationServer.h */,
-				2618EE5D1315B29C001D6D71 /* GDBRemoteRegisterContext.cpp */,
-				2618EE5E1315B29C001D6D71 /* GDBRemoteRegisterContext.h */,
-				2618EE5F1315B29C001D6D71 /* ProcessGDBRemote.cpp */,
-				2618EE601315B29C001D6D71 /* ProcessGDBRemote.h */,
-				2618EE611315B29C001D6D71 /* ProcessGDBRemoteLog.cpp */,
-				2618EE621315B29C001D6D71 /* ProcessGDBRemoteLog.h */,
-				2618EE631315B29C001D6D71 /* ThreadGDBRemote.cpp */,
-				2618EE641315B29C001D6D71 /* ThreadGDBRemote.h */,
-			);
-			name = "GDB Remote";
-			path = "gdb-remote";
-			sourceTree = "<group>";
-		};
-		54067BEA1DF2033700749AA5 /* UBSan */ = {
-			isa = PBXGroup;
-			children = (
-				54067BEC1DF2034B00749AA5 /* UBSanRuntime.cpp */,
-				54067BED1DF2034B00749AA5 /* UBSanRuntime.h */,
-			);
-			path = UBSan;
-			sourceTree = "<group>";
-		};
-		69A01E1A1236C5D400C660B5 /* common */ = {
-			isa = PBXGroup;
-			children = (
-				D67521351EA17C3900439694 /* MainLoop.cpp */,
-				2579065A1BD0488100178368 /* TCPSocket.cpp */,
-				2579065B1BD0488100178368 /* UDPSocket.cpp */,
-				255EFF731AFABA720069F277 /* LockFileBase.cpp */,
-				250D6AE11A9679270049CC70 /* FileSystem.cpp */,
-				33E5E8411A672A240024ED68 /* StringConvert.cpp */,
-				25420ED11A649D88009ADBCB /* PipeBase.cpp */,
-				26CFDCA2186163A4000E63E5 /* Editline.cpp */,
-				260C6EA213011581005E16B0 /* File.cpp */,
-				69A01E1C1236C5D400C660B5 /* Host.cpp */,
-				3FDFE53419A29327009756A7 /* HostInfoBase.cpp */,
-				3FDFED2419BA6D96009756A7 /* HostNativeThreadBase.cpp */,
-				3FDFED2C19C257A0009756A7 /* HostProcess.cpp */,
-				3FDFED2519BA6D96009756A7 /* HostThread.cpp */,
-				A36FF33B17D8E94600244D40 /* OptionParser.cpp */,
-				AF37E10917C861F20061E18E /* ProcessRunLock.cpp */,
-				236124A31986B4E2004EFC37 /* Socket.cpp */,
-				268DA873130095ED00C9483A /* Terminal.cpp */,
-				3FDFED2619BA6D96009756A7 /* ThreadLauncher.cpp */,
-				3FDFDDBC199C3A06009756A7 /* FileAction.cpp */,
-				233B007E1960CB280090E598 /* ProcessLaunchInfo.cpp */,
-			);
-			name = common;
-			path = source/Host/common;
-			sourceTree = "<group>";
-		};
-		6D55B29B1A8CCFF000A70529 /* android */ = {
-			isa = PBXGroup;
-			children = (
-				6D55BAE21A8CD06000A70529 /* Android.h */,
-				6D55BAE31A8CD06000A70529 /* Config.h */,
-				6D55BAE41A8CD06000A70529 /* HostInfoAndroid.h */,
-				6D55BAE01A8CD03D00A70529 /* HostInfoAndroid.cpp */,
-			);
-			name = android;
-			sourceTree = "<group>";
-		};
-		6D55BAE61A8CD08C00A70529 /* Android */ = {
-			isa = PBXGroup;
-			children = (
-				25EF23751AC09AD800908DF0 /* AdbClient.cpp */,
-				25EF23761AC09AD800908DF0 /* AdbClient.h */,
-				6D55BAE91A8CD08C00A70529 /* PlatformAndroid.cpp */,
-				6D55BAEA1A8CD08C00A70529 /* PlatformAndroid.h */,
-				6D55BAEB1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.cpp */,
-				6D55BAEC1A8CD08C00A70529 /* PlatformAndroidRemoteGDBServer.h */,
-			);
-			path = Android;
-			sourceTree = "<group>";
-		};
-		8C26C4221C3EA4050031DF7C /* TSan */ = {
-			isa = PBXGroup;
-			children = (
-				8C26C4241C3EA4340031DF7C /* TSanRuntime.cpp */,
-				8C26C4251C3EA4340031DF7C /* TSanRuntime.h */,
-			);
-			name = TSan;
-			sourceTree = "<group>";
-		};
-		8C2D6A58197A1FB9006989C9 /* MemoryHistory */ = {
-			isa = PBXGroup;
-			children = (
-				8C2D6A59197A1FCD006989C9 /* asan */,
-			);
-			path = MemoryHistory;
-			sourceTree = "<group>";
-		};
-		8C2D6A59197A1FCD006989C9 /* asan */ = {
-			isa = PBXGroup;
-			children = (
-				8C2D6A5A197A1FDC006989C9 /* MemoryHistoryASan.cpp */,
-				8C2D6A5B197A1FDC006989C9 /* MemoryHistoryASan.h */,
-			);
-			path = asan;
-			sourceTree = "<group>";
-		};
-		8C3BD9911EF45D9B0016C343 /* MainThreadChecker */ = {
-			isa = PBXGroup;
-			children = (
-				8C3BD9931EF45D9B0016C343 /* MainThreadCheckerRuntime.h */,
-				8C3BD9951EF45D9B0016C343 /* MainThreadCheckerRuntime.cpp */,
-			);
-			path = MainThreadChecker;
-			sourceTree = "<group>";
-		};
-		8CF02ADD19DCBEC200B14BE0 /* InstrumentationRuntime */ = {
-			isa = PBXGroup;
-			children = (
-				54067BEA1DF2033700749AA5 /* UBSan */,
-				8C26C4221C3EA4050031DF7C /* TSan */,
-				8CF02ADE19DCBEE600B14BE0 /* ASan */,
-				8C3BD9911EF45D9B0016C343 /* MainThreadChecker */,
-			);
-			path = InstrumentationRuntime;
-			sourceTree = "<group>";
-		};
-		8CF02ADE19DCBEE600B14BE0 /* ASan */ = {
-			isa = PBXGroup;
-			children = (
-				8CF02AE519DCBF8400B14BE0 /* ASanRuntime.cpp */,
-				8CF02AE619DCBF8400B14BE0 /* ASanRuntime.h */,
-			);
-			path = ASan;
-			sourceTree = "<group>";
-		};
-		942829BA1A89830900521B30 /* argdumper */ = {
-			isa = PBXGroup;
-			children = (
-				940B04D81A8984FF0045D5F7 /* argdumper.cpp */,
-			);
-			name = argdumper;
-			sourceTree = "<group>";
-		};
-		945261B01B9A11BE00BF138D /* Formatters */ = {
-			isa = PBXGroup;
-			children = (
-				4CDB8D671DBA91A6006C5B13 /* LibStdcppUniquePointer.cpp */,
-				4CDB8D681DBA91A6006C5B13 /* LibStdcppTuple.cpp */,
-				49DEF1201CD7BD90006A7C7D /* BlockPointer.h */,
-				49DEF11F1CD7BD90006A7C7D /* BlockPointer.cpp */,
-				945261B41B9A11E800BF138D /* CxxStringTypes.h */,
-				945261B31B9A11E800BF138D /* CxxStringTypes.cpp */,
-				945261B61B9A11E800BF138D /* LibCxx.h */,
-				945261B51B9A11E800BF138D /* LibCxx.cpp */,
-				9428BC2A1C6E64DC002A24D7 /* LibCxxAtomic.h */,
-				9428BC291C6E64DC002A24D7 /* LibCxxAtomic.cpp */,
-				AFC67B141FBBB03500860ECB /* LibCxxBitset.cpp */,
-				945261B71B9A11E800BF138D /* LibCxxInitializerList.cpp */,
-				945261B81B9A11E800BF138D /* LibCxxList.cpp */,
-				945261B91B9A11E800BF138D /* LibCxxMap.cpp */,
-				E4A63A9020F55D27000D9548 /* LibCxxOptional.cpp */,
-				AF9FF1F61FAA79FE00474976 /* LibCxxQueue.cpp */,
-				AF9FF1F41FAA79A400474976 /* LibCxxTuple.cpp */,
-				945261BA1B9A11E800BF138D /* LibCxxUnorderedMap.cpp */,
-				E414F6ED21388F0200C50BC6 /* LibCxxVariant.h */,
-				E414F6F021388F6B00C50BC6 /* LibCxxVariant.cpp */,
-				945261BB1B9A11E800BF138D /* LibCxxVector.cpp */,
-				945261BD1B9A11E800BF138D /* LibStdcpp.h */,
-				945261BC1B9A11E800BF138D /* LibStdcpp.cpp */,
-			);
-			name = Formatters;
-			sourceTree = "<group>";
-		};
-		9457596415349416005A9070 /* POSIX */ = {
-			isa = PBXGroup;
-			children = (
-				945759651534941F005A9070 /* PlatformPOSIX.cpp */,
-				945759661534941F005A9070 /* PlatformPOSIX.h */,
-			);
-			name = POSIX;
-			sourceTree = "<group>";
-		};
-		949EED9D1BA74AB6008C63CF /* Formatters */ = {
-			isa = PBXGroup;
-			children = (
-				949EEDAD1BA76719008C63CF /* CF.h */,
-				949EEDAC1BA76719008C63CF /* CF.cpp */,
-				949EEDA21BA76571008C63CF /* Cocoa.h */,
-				949EEDA11BA76571008C63CF /* Cocoa.cpp */,
-				949EED9F1BA74B64008C63CF /* CoreMedia.h */,
-				949EED9E1BA74B64008C63CF /* CoreMedia.cpp */,
-				949EEDA41BA765B5008C63CF /* NSArray.cpp */,
-				94B9E50E1BBEFDFE000A48DC /* NSDictionary.h */,
-				949EEDA51BA765B5008C63CF /* NSDictionary.cpp */,
-				940495781BEC497E00926025 /* NSError.cpp */,
-				940495791BEC497E00926025 /* NSException.cpp */,
-				949EEDA61BA765B5008C63CF /* NSIndexPath.cpp */,
-				94B9E50F1BBF0069000A48DC /* NSSet.h */,
-				949EEDA71BA765B5008C63CF /* NSSet.cpp */,
-				94B9E5101BBF20B7000A48DC /* NSString.h */,
-				94B9E5111BBF20F4000A48DC /* NSString.cpp */,
-			);
-			name = Formatters;
-			sourceTree = "<group>";
-		};
-		94A5B3941AB9FE5F00A5EE7F /* MIPS64 */ = {
-			isa = PBXGroup;
-			children = (
-				94A5B3951AB9FE8300A5EE7F /* EmulateInstructionMIPS64.cpp */,
-				94A5B3961AB9FE8300A5EE7F /* EmulateInstructionMIPS64.h */,
-			);
-			name = MIPS64;
-			sourceTree = "<group>";
-		};
-		94B638541B8FABEA004FE1E4 /* Language */ = {
-			isa = PBXGroup;
-			children = (
-				58A080AD2112AAC500D5580F /* ClangHighlighter.h */,
-				58A080AB2112AABB00D5580F /* ClangHighlighter.cpp */,
-				94B6385A1B8FB109004FE1E4 /* CPlusPlus */,
-				94B638551B8FAC87004FE1E4 /* ObjC */,
-				94B638601B8FB7BE004FE1E4 /* ObjCPlusPlus */,
-			);
-			name = Language;
-			sourceTree = "<group>";
-		};
-		94B638551B8FAC87004FE1E4 /* ObjC */ = {
-			isa = PBXGroup;
-			children = (
-				949EED9D1BA74AB6008C63CF /* Formatters */,
-				94B6385F1B8FB7A2004FE1E4 /* ObjCLanguage.h */,
-				94B6385E1B8FB7A2004FE1E4 /* ObjCLanguage.cpp */,
-			);
-			name = ObjC;
-			sourceTree = "<group>";
-		};
-		94B6385A1B8FB109004FE1E4 /* CPlusPlus */ = {
-			isa = PBXGroup;
-			children = (
-				945261B01B9A11BE00BF138D /* Formatters */,
-				94B6385C1B8FB174004FE1E4 /* CPlusPlusLanguage.h */,
-				94B6385B1B8FB174004FE1E4 /* CPlusPlusLanguage.cpp */,
-				49F811F01E931B1500F4E163 /* CPlusPlusNameParser.h */,
-				49F811EF1E931B1500F4E163 /* CPlusPlusNameParser.cpp */,
-				AF395C01219254F200894EC3 /* MSVCUndecoratedNameParser.cpp */,
-				AF395C00219254F200894EC3 /* MSVCUndecoratedNameParser.h */,
-			);
-			name = CPlusPlus;
-			sourceTree = "<group>";
-		};
-		94B638601B8FB7BE004FE1E4 /* ObjCPlusPlus */ = {
-			isa = PBXGroup;
-			children = (
-				94B638611B8FB7E9004FE1E4 /* ObjCPlusPlusLanguage.h */,
-				94B638621B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp */,
-			);
-			name = ObjCPlusPlus;
-			sourceTree = "<group>";
-		};
-		94CB255616B0683B0059775D /* DataFormatters */ = {
-			isa = PBXGroup;
-			children = (
-				945261C91B9A14E000BF138D /* CXXFunctionPointer.h */,
-				945261C71B9A14D300BF138D /* CXXFunctionPointer.cpp */,
-				94CB256016B069800059775D /* DataVisualization.h */,
-				94CB255816B069770059775D /* DataVisualization.cpp */,
-				9447DE411BD5962900E67212 /* DumpValueObjectOptions.h */,
-				9447DE421BD5963300E67212 /* DumpValueObjectOptions.cpp */,
-				94CB257516B1D3910059775D /* FormatCache.h */,
-				94CB257316B1D3870059775D /* FormatCache.cpp */,
-				94CB256116B069800059775D /* FormatClasses.h */,
-				94CB255916B069770059775D /* FormatClasses.cpp */,
-				94CB256216B069800059775D /* FormatManager.h */,
-				94CB255A16B069770059775D /* FormatManager.cpp */,
-				94EE33F218643C6900CD703B /* FormattersContainer.h */,
-				94D0858A1B9675A0000D24BD /* FormattersHelpers.h */,
-				94D0858B1B9675B8000D24BD /* FormattersHelpers.cpp */,
-				942612F51B94FFE900EF842E /* LanguageCategory.h */,
-				942612F61B95000000EF842E /* LanguageCategory.cpp */,
-				94F48F231A01C679005C0EC6 /* StringPrinter.h */,
-				94F48F241A01C687005C0EC6 /* StringPrinter.cpp */,
-				94CB256816B096F90059775D /* TypeCategory.h */,
-				94CB256416B096F10059775D /* TypeCategory.cpp */,
-				94CB256916B096FA0059775D /* TypeCategoryMap.h */,
-				94CB256516B096F10059775D /* TypeCategoryMap.cpp */,
-				94CB256A16B0A4030059775D /* TypeFormat.h */,
-				94CB256D16B0A4260059775D /* TypeFormat.cpp */,
-				94CB256B16B0A4030059775D /* TypeSummary.h */,
-				94CB256E16B0A4260059775D /* TypeSummary.cpp */,
-				94CB256C16B0A4040059775D /* TypeSynthetic.h */,
-				94CB256F16B0A4270059775D /* TypeSynthetic.cpp */,
-				94CD131819BA33A100DB7BED /* TypeValidator.h */,
-				94CD131919BA33B400DB7BED /* TypeValidator.cpp */,
-				945215DD17F639E600521C0B /* ValueObjectPrinter.h */,
-				945215DE17F639EE00521C0B /* ValueObjectPrinter.cpp */,
-				943B90FC1B991586007BA499 /* VectorIterator.h */,
-				9418EBCB1AA9108B0058B02E /* VectorType.h */,
-				9418EBCC1AA910910058B02E /* VectorType.cpp */,
-			);
-			name = DataFormatters;
-			sourceTree = "<group>";
-		};
-		9694FA6E1B32AA35005EBB16 /* SysV-mips */ = {
-			isa = PBXGroup;
-			children = (
-				9694FA6F1B32AA64005EBB16 /* ABISysV_mips.cpp */,
-				9694FA701B32AA64005EBB16 /* ABISysV_mips.h */,
-			);
-			name = "SysV-mips";
-			sourceTree = "<group>";
-		};
-		9A1890301F47D5BC00394BCA /* TestingSupport */ = {
-			isa = PBXGroup;
-			children = (
-				9A1890311F47D5D400394BCA /* CMakeLists.txt */,
-				9A1890321F47D5D400394BCA /* MockTildeExpressionResolver.cpp */,
-				9A1890331F47D5D400394BCA /* MockTildeExpressionResolver.h */,
-				9A1890341F47D5D400394BCA /* TestUtilities.cpp */,
-				9A1890351F47D5D400394BCA /* TestUtilities.h */,
-			);
-			name = TestingSupport;
-			sourceTree = "<group>";
-		};
-		9A2057091F3B81DE00F6C293 /* DWARF */ = {
-			isa = PBXGroup;
-			children = (
-				9A20570A1F3B81F300F6C293 /* SymbolFileDWARFTests.cpp */,
-				9A20570C1F3B81F800F6C293 /* Inputs */,
-			);
-			name = DWARF;
-			sourceTree = "<group>";
-		};
-		9A20570C1F3B81F800F6C293 /* Inputs */ = {
-			isa = PBXGroup;
-			children = (
-				AFF62FDC2006D4D4003644F9 /* test-dwarf.cpp */,
-				AFF62FDD2006D4D4003644F9 /* test-dwarf.exe */,
-			);
-			name = Inputs;
-			sourceTree = "<group>";
-		};
-		9A2057191F3B864D00F6C293 /* Platform */ = {
-			isa = PBXGroup;
-			children = (
-				9A20571A1F3B866F00F6C293 /* PlatformDarwinTest.cpp */,
-			);
-			name = Platform;
-			sourceTree = "<group>";
-		};
-		9A20571D1F3B8D1100F6C293 /* Signals */ = {
-			isa = PBXGroup;
-			children = (
-				9A20571E1F3B8D2100F6C293 /* UnixSignalsTest.cpp */,
-			);
-			name = Signals;
-			sourceTree = "<group>";
-		};
-		9A2057221F3B8DA600F6C293 /* ObjectFile */ = {
-			isa = PBXGroup;
-			children = (
-				9A2057231F3B8DC100F6C293 /* ELF */,
-			);
-			name = ObjectFile;
-			sourceTree = "<group>";
-		};
-		9A2057231F3B8DC100F6C293 /* ELF */ = {
-			isa = PBXGroup;
-			children = (
-				9A2057251F3B8DD200F6C293 /* TestObjectFileELF.cpp */,
-			);
-			name = ELF;
-			sourceTree = "<group>";
-		};
-		9A20573B1F3B8E8500F6C293 /* linux */ = {
-			isa = PBXGroup;
-			children = (
-				9A20573C1F3B8EA200F6C293 /* HostTest.cpp */,
-				9A20573D1F3B8EA200F6C293 /* SupportTest.cpp */,
-			);
-			name = linux;
-			sourceTree = "<group>";
-		};
-		9A2057421F3B904C00F6C293 /* debugserver */ = {
-			isa = PBXGroup;
-			children = (
-				9A2057441F3B905C00F6C293 /* debugserver_LogCallback.cpp */,
-				9A2057451F3B905C00F6C293 /* RNBSocketTest.cpp */,
-			);
-			name = debugserver;
-			sourceTree = "<group>";
-		};
-		AEC6FF9D1BE97035007882C1 /* Expression */ = {
-			isa = PBXGroup;
-			children = (
-				23CB14F31D66CC9B00EDDDE1 /* CMakeLists.txt */,
-			);
-			path = Expression;
-			sourceTree = "<group>";
-		};
-		AF11CB34182CA85A00D9B618 /* SystemRuntime */ = {
-			isa = PBXGroup;
-			children = (
-				AF11CB35182CA85A00D9B618 /* MacOSX */,
-			);
-			path = SystemRuntime;
-			sourceTree = "<group>";
-		};
-		AF11CB35182CA85A00D9B618 /* MacOSX */ = {
-			isa = PBXGroup;
-			children = (
-				AF0E22EE18A09FB20009B7D1 /* AppleGetItemInfoHandler.cpp */,
-				AF0E22EF18A09FB20009B7D1 /* AppleGetItemInfoHandler.h */,
-				AF1F7B05189C904B0087DB9C /* AppleGetPendingItemsHandler.cpp */,
-				AF1F7B06189C904B0087DB9C /* AppleGetPendingItemsHandler.h */,
-				AF25AB24188F685C0030DEC3 /* AppleGetQueuesHandler.cpp */,
-				AF25AB25188F685C0030DEC3 /* AppleGetQueuesHandler.h */,
-				AF45FDE318A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp */,
-				AF45FDE418A1F3AC0007051C /* AppleGetThreadItemInfoHandler.h */,
-				AF9B8F31182DB52900DA866F /* SystemRuntimeMacOSX.cpp */,
-				AF9B8F32182DB52900DA866F /* SystemRuntimeMacOSX.h */,
-			);
-			path = MacOSX;
-			sourceTree = "<group>";
-		};
-		AF20F7621AF18F5E00751A6E /* SysV-arm */ = {
-			isa = PBXGroup;
-			children = (
-				AF20F7641AF18F8500751A6E /* ABISysV_arm.cpp */,
-				AF20F7651AF18F8500751A6E /* ABISysV_arm.h */,
-			);
-			name = "SysV-arm";
-			sourceTree = "<group>";
-		};
-		AF20F7631AF18F6800751A6E /* SysV-arm64 */ = {
-			isa = PBXGroup;
-			children = (
-				AF20F7681AF18F9000751A6E /* ABISysV_arm64.cpp */,
-				AF20F7691AF18F9000751A6E /* ABISysV_arm64.h */,
-			);
-			name = "SysV-arm64";
-			sourceTree = "<group>";
-		};
-		AF2BCA6518C7EFDE005B4526 /* JITLoader */ = {
-			isa = PBXGroup;
-			children = (
-				AF2BCA6718C7EFDE005B4526 /* GDB */,
-			);
-			path = JITLoader;
-			sourceTree = "<group>";
-		};
-		AF2BCA6718C7EFDE005B4526 /* GDB */ = {
-			isa = PBXGroup;
-			children = (
-				AF2BCA6A18C7EFDE005B4526 /* JITLoaderGDB.h */,
-				AF2BCA6918C7EFDE005B4526 /* JITLoaderGDB.cpp */,
-			);
-			path = GDB;
-			sourceTree = "<group>";
-		};
-		AF2E029F1FA2CE8A00A86C34 /* Architecture */ = {
-			isa = PBXGroup;
-			children = (
-				2647B62E21C4364F00A81D15 /* MIPS */,
-				4C14CEF52057258D00DEEF94 /* PPC64 */,
-				AF2E02A01FA2CE9900A86C34 /* Arm */,
-			);
-			path = Architecture;
-			sourceTree = "<group>";
-		};
-		AF2E02A01FA2CE9900A86C34 /* Arm */ = {
-			isa = PBXGroup;
-			children = (
-				AF2E02A11FA2CEAF00A86C34 /* ArchitectureArm.cpp */,
-				AF2E02A21FA2CEAF00A86C34 /* ArchitectureArm.h */,
-			);
-			path = Arm;
-			sourceTree = "<group>";
-		};
-		AF352EDA22C17BD700D058B6 /* Windows-x86_64 */ = {
-			isa = PBXGroup;
-			children = (
-				AF352EDB22C17BD700D058B6 /* ABIWindows_x86_64.cpp */,
-				AF352EDC22C17BD700D058B6 /* ABIWindows_x86_64.h */,
-				AF352EDD22C17BD700D058B6 /* CMakeLists.txt */,
-			);
-			path = "Windows-x86_64";
-			sourceTree = "<group>";
-		};
-		AF6335DF1C87B20A00F7D554 /* PDB */ = {
-			isa = PBXGroup;
-			children = (
-				4C562CC21CC07DDD00C52EAC /* PDBASTParser.cpp */,
-				4C562CC31CC07DDD00C52EAC /* PDBASTParser.h */,
-				4CA0C6CA20F929C600CFE6BB /* PDBLocationToDWARFExpression.cpp */,
-				4CA0C6CB20F929C700CFE6BB /* PDBLocationToDWARFExpression.h */,
-				AF6335E01C87B21E00F7D554 /* SymbolFilePDB.cpp */,
-				AF6335E11C87B21E00F7D554 /* SymbolFilePDB.h */,
-			);
-			name = PDB;
-			sourceTree = "<group>";
-		};
-		AF77E08B1A033C3E0096C0EA /* SysV-ppc */ = {
-			isa = PBXGroup;
-			children = (
-				AF77E08D1A033C700096C0EA /* ABISysV_ppc.cpp */,
-				AF77E08E1A033C700096C0EA /* ABISysV_ppc.h */,
-			);
-			name = "SysV-ppc";
-			sourceTree = "<group>";
-		};
-		AF77E08C1A033C4B0096C0EA /* SysV-ppc64 */ = {
-			isa = PBXGroup;
-			children = (
-				AF77E0911A033C7F0096C0EA /* ABISysV_ppc64.cpp */,
-				AF77E0921A033C7F0096C0EA /* ABISysV_ppc64.h */,
-			);
-			name = "SysV-ppc64";
-			sourceTree = "<group>";
-		};
-		AF7F97652141FA2100795BC0 /* Disassembler */ = {
-			isa = PBXGroup;
-			children = (
-				AFEABBF62230BF840097046F /* TestArm64Disassembly.cpp */,
-				AF7F97662141FA3800795BC0 /* TestArmv7Disassembly.cpp */,
-			);
-			name = Disassembler;
-			path = ../Disassembler;
-			sourceTree = "<group>";
-		};
-		AF97744421E99467006876A7 /* Breakpad */ = {
-			isa = PBXGroup;
-			children = (
-				AF97744621E9947B006876A7 /* SymbolFileBreakpad.cpp */,
-				AF97744521E9947B006876A7 /* SymbolFileBreakpad.h */,
-			);
-			name = Breakpad;
-			path = "New Group";
-			sourceTree = "<group>";
-		};
-		AFAFD8081E57E19E0017A14F /* Target */ = {
-			isa = PBXGroup;
-			children = (
-				9A2057061F3B818600F6C293 /* MemoryRegionInfoTest.cpp */,
-				AFAFD8091E57E1B90017A14F /* ModuleCacheTest.cpp */,
-				2668A2ED20AF417D00D94111 /* PathMappingListTest.cpp */,
-			);
-			name = Target;
-			sourceTree = "<group>";
-		};
-		AFD966B321714099006714AC /* NativePDB */ = {
-			isa = PBXGroup;
-			children = (
-				AFD966B4217140B5006714AC /* CompileUnitIndex.cpp */,
-				AFD966BD217140C8006714AC /* CompileUnitIndex.h */,
-				5A6424922204D04F00C3D9DB /* CodeViewRegisterMapping.cpp */,
-				5A6424942204D05000C3D9DB /* CodeViewRegisterMapping.h */,
-				4C38996221B9AECC002BAEF4 /* DWARFLocationExpression.cpp */,
-				4C38996321B9AECC002BAEF4 /* DWARFLocationExpression.h */,
-				AF815DF721C855B400023A34 /* PdbAstBuilder.cpp */,
-				AF815DF821C855B400023A34 /* PdbAstBuilder.h */,
-				5A6424932204D04F00C3D9DB /* PdbFPOProgramToDWARFExpression.cpp */,
-				5A6424912204D04F00C3D9DB /* PdbFPOProgramToDWARFExpression.h */,
-				AFD966B6217140B6006714AC /* PdbIndex.cpp */,
-				AFD966BF217140C8006714AC /* PdbIndex.h */,
-				AF0F459D219FA1C800C1E612 /* PdbSymUid.cpp */,
-				AFD966BC217140C8006714AC /* PdbSymUid.h */,
-				AFD966B5217140B6006714AC /* PdbUtil.cpp */,
-				AFD966BE217140C8006714AC /* PdbUtil.h */,
-				AFD966B7217140B6006714AC /* SymbolFileNativePDB.cpp */,
-				AFD966C0217140C8006714AC /* SymbolFileNativePDB.h */,
-				AF0578C2217FA80700CF9D80 /* UdtRecordCompleter.cpp */,
-				AF0578C1217FA80700CF9D80 /* UdtRecordCompleter.h */,
-			);
-			name = NativePDB;
-			path = "New Group";
-			sourceTree = "<group>";
-		};
-		AFDBC36A2046638D00B9C8F2 /* PPC64 */ = {
-			isa = PBXGroup;
-			children = (
-				AFDBC36C204663AF00B9C8F2 /* EmulateInstructionPPC64.cpp */,
-				AFDBC36B204663AF00B9C8F2 /* EmulateInstructionPPC64.h */,
-			);
-			name = PPC64;
-			path = "New Group";
-			sourceTree = "<group>";
-		};
-		AFEC5FD31D94F9130076A480 /* UnwindAssembly */ = {
-			isa = PBXGroup;
-			children = (
-				4CEC86A8204738EE009B37B1 /* PPC64 */,
-				4CEC86A5204738CC009B37B1 /* ARM64 */,
-				AFEC5FD41D94F9270076A480 /* x86 */,
-			);
-			name = UnwindAssembly;
-			sourceTree = "<group>";
-		};
-		AFEC5FD41D94F9270076A480 /* x86 */ = {
-			isa = PBXGroup;
-			children = (
-				AFEC5FD51D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp */,
-			);
-			name = x86;
-			sourceTree = "<group>";
-		};
-		AFF81FAA20D1CC210010F95E /* objcxx */ = {
-			isa = PBXGroup;
-			children = (
-				AFF81FAD20D1CC400010F95E /* Host.mm */,
-				AFF81FAB20D1CC400010F95E /* HostInfoMacOSX.mm */,
-				AFF81FAC20D1CC400010F95E /* HostThreadMacOSX.mm */,
-			);
-			name = objcxx;
-			sourceTree = "<group>";
-		};
-		AFF81FB120D1CC820010F95E /* objcxx */ = {
-			isa = PBXGroup;
-			children = (
-				AFF81FB220D1CC910010F95E /* PlatformiOSSimulatorCoreSimulatorSupport.mm */,
-				AFB1682620D1D4CC00A74F25 /* PlatformiOSSimulatorCoreSimulatorSupport.h */,
-			);
-			name = objcxx;
-			sourceTree = "<group>";
-		};
-		E769331B1A94D10E00C73337 /* lldb-server */ = {
-			isa = PBXGroup;
-			children = (
-				257906621BD5AFD000178368 /* Acceptor.cpp */,
-				257906631BD5AFD000178368 /* Acceptor.h */,
-				6D762BEC1B1605CD006C929D /* LLDBServerUtilities.cpp */,
-				6D762BED1B1605CD006C929D /* LLDBServerUtilities.h */,
-				E769331D1A94D18100C73337 /* lldb-server.cpp */,
-				26DC6A1C1337FECA00FF7998 /* lldb-platform.cpp */,
-				26D6F3F4183E7F9300194858 /* lldb-gdbserver.cpp */,
-				4CD44D2020B725DA0003557C /* SystemInitializerLLGS.cpp */,
-				4CD44D2320B725F60003557C /* SystemInitializerLLGS.h */,
-			);
-			name = "lldb-server";
-			sourceTree = "<group>";
-		};
-		E778E99D1B062D1700247609 /* MIPS */ = {
-			isa = PBXGroup;
-			children = (
-				E778E99F1B062D1700247609 /* EmulateInstructionMIPS.cpp */,
-				E778E9A01B062D1700247609 /* EmulateInstructionMIPS.h */,
-			);
-			path = MIPS;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		26680202115FD0ED008E1FE4 /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				2668020E115FD12C008E1FE4 /* lldb-defines.h in Headers */,
-				2668020F115FD12C008E1FE4 /* lldb-enumerations.h in Headers */,
-				26DE1E6C11616C2E00A093E2 /* lldb-forward.h in Headers */,
-				26680214115FD12C008E1FE4 /* lldb-types.h in Headers */,
-				94145431175E63B500284436 /* lldb-versioning.h in Headers */,
-				26B42C4D1187ABA50079C8C8 /* LLDB.h in Headers */,
-				26DE204311618ACA00A093E2 /* SBAddress.h in Headers */,
-				26151DC31B41E4A200FF7F1C /* SharingPtr.h in Headers */,
-				26DE205711618FC500A093E2 /* SBBlock.h in Headers */,
-				332CCB181AFF41620034D4C4 /* SBLanguageRuntime.h in Headers */,
-				26680219115FD13D008E1FE4 /* SBBreakpoint.h in Headers */,
-				2668021A115FD13D008E1FE4 /* SBBreakpointLocation.h in Headers */,
-				2668021B115FD13D008E1FE4 /* SBBroadcaster.h in Headers */,
-				2668021D115FD13D008E1FE4 /* SBCommandInterpreter.h in Headers */,
-				2668021E115FD13D008E1FE4 /* SBCommandReturnObject.h in Headers */,
-				2668021F115FD13D008E1FE4 /* SBCommunication.h in Headers */,
-				26DE205511618FB800A093E2 /* SBCompileUnit.h in Headers */,
-				9443B123140C26AB0013457C /* SBData.h in Headers */,
-				26680220115FD13D008E1FE4 /* SBDebugger.h in Headers */,
-				490A966B1628C3BF00F0002E /* SBDeclaration.h in Headers */,
-				254FBBA31A9166F100BD6378 /* SBAttachInfo.h in Headers */,
-				26680221115FD13D008E1FE4 /* SBDefines.h in Headers */,
-				8CCB018219BA4E270009FD44 /* SBThreadCollection.h in Headers */,
-				9A36D24D1EB3BE7F00AAD9EA /* SBTrace.h in Headers */,
-				AF0EBBEC185941360059E52F /* SBQueue.h in Headers */,
-				4C877B391F30EF990068FCFB /* SBProcessInfo.h in Headers */,
-				26680222115FD13D008E1FE4 /* SBError.h in Headers */,
-				26680223115FD13D008E1FE4 /* SBEvent.h in Headers */,
-				AFDCDBCB19DD0F42005EA55E /* SBExecutionContext.h in Headers */,
-				26680224115FD13D008E1FE4 /* SBFileSpec.h in Headers */,
-				4CF52AF51428291E0051E832 /* SBFileSpecList.h in Headers */,
-				26680225115FD13D008E1FE4 /* SBFrame.h in Headers */,
-				26DE205311618FAC00A093E2 /* SBFunction.h in Headers */,
-				9A3576A8116E9AB700E8ED2F /* SBHostOS.h in Headers */,
-				264297571D1DF247003F2BF4 /* SBMemoryRegionInfoList.h in Headers */,
-				9AC7038E117674FB0086C050 /* SBInstruction.h in Headers */,
-				9AC70390117675270086C050 /* SBInstructionList.h in Headers */,
-				264297581D1DF250003F2BF4 /* SBMemoryRegionInfo.h in Headers */,
-				26DE205911618FE700A093E2 /* SBLineEntry.h in Headers */,
-				254FBB971A81B03100BD6378 /* SBLaunchInfo.h in Headers */,
-				AF0EBBED185941360059E52F /* SBQueueItem.h in Headers */,
-				26680227115FD13D008E1FE4 /* SBListener.h in Headers */,
-				26DE204F11618E9800A093E2 /* SBModule.h in Headers */,
-				2668022A115FD13D008E1FE4 /* SBProcess.h in Headers */,
-				26B8283D142D01E9002DBC64 /* SBSection.h in Headers */,
-				2668022B115FD13D008E1FE4 /* SBSourceManager.h in Headers */,
-				26C72C94124322890068DC16 /* SBStream.h in Headers */,
-				9A357671116E7B5200E8ED2F /* SBStringList.h in Headers */,
-				26DE205B11618FF600A093E2 /* SBSymbol.h in Headers */,
-				4C54B27B1F61CE2800D469CA /* SBBreakpointName.h in Headers */,
-				262F12B71835469C00AEB384 /* SBPlatform.h in Headers */,
-				23DCBEA31D63E71F0084C36B /* SBStructuredData.h in Headers */,
-				26DE204111618AB900A093E2 /* SBSymbolContext.h in Headers */,
-				268F9D53123AA15200B91E9B /* SBSymbolContextList.h in Headers */,
-				2668022C115FD13D008E1FE4 /* SBTarget.h in Headers */,
-				2668022E115FD13D008E1FE4 /* SBThread.h in Headers */,
-				4C56543519D2297A002E9C44 /* SBThreadPlan.h in Headers */,
-				263C493A178B50CF0070F12D /* SBModuleSpec.h in Headers */,
-				2617447A11685869005ADD65 /* SBType.h in Headers */,
-				9475C18914E5EA08001BFC6D /* SBTypeCategory.h in Headers */,
-				941BCC7F14E48C4000BB969C /* SBTypeFilter.h in Headers */,
-				941BCC8014E48C4000BB969C /* SBTypeFormat.h in Headers */,
-				9475C18F14E5F858001BFC6D /* SBTypeNameSpecifier.h in Headers */,
-				941BCC8114E48C4000BB969C /* SBTypeSummary.h in Headers */,
-				9A36D24E1EB3BE7F00AAD9EA /* SBTraceOptions.h in Headers */,
-				23059A121958B3B2007B8189 /* SBUnixSignals.h in Headers */,
-				941BCC8214E48C4000BB969C /* SBTypeSynthetic.h in Headers */,
-				9A19A6AF1163BBB200E0D453 /* SBValue.h in Headers */,
-				9A357583116CFDEE00E8ED2F /* SBValueList.h in Headers */,
-				DD1E0AD1220BC3DC00B815F8 /* SBReproducer.h in Headers */,
-				B2A58722143119810092BFBA /* SBWatchpoint.h in Headers */,
-				26D265BC136B4269002EEE45 /* lldb-public.h in Headers */,
-				4CE4F673162C971A00F75CB3 /* SBExpressionOptions.h in Headers */,
-				94235B9F1A8D66D600EB2EED /* SBVariablesOptions.h in Headers */,
-				23EFE389193D1ABC00E54E54 /* SBTypeEnumMember.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		2689FFC813353D7A00698AC0 /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				AF8AD6381BEC28C400150209 /* PlatformRemoteAppleTV.h in Headers */,
-				26EFB61C1BFE8D3E00544801 /* PlatformNetBSD.h in Headers */,
-				2647B64321C43BB000A81D15 /* LinuxProcMaps.h in Headers */,
-				AF3A4AD31EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.h in Headers */,
-				AF9113FE1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.h in Headers */,
-				AF33B4BF1C1FA441001B28D9 /* NetBSDSignals.h in Headers */,
-				AF6CA6681FBBAF37005A0DC3 /* ArchSpec.h in Headers */,
-				AF235EB41FBE7858009C5541 /* RegisterInfoPOSIX_ppc64le.h in Headers */,
-				AF2E02A41FA2CEAF00A86C34 /* ArchitectureArm.h in Headers */,
-				2619C4872107A9A2009CDE81 /* RegisterContextMinidump_ARM.h in Headers */,
-				267F685A1CC02EBE0086832B /* RegisterInfos_s390x.h in Headers */,
-				267F68541CC02E920086832B /* RegisterContextLinux_s390x.h in Headers */,
-				2619C4862107A9A2009CDE81 /* RegisterContextMinidump_ARM64.h in Headers */,
-				2647B63421C4367A00A81D15 /* Event.h in Headers */,
-				AF235EB11FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.h in Headers */,
-				267F68501CC02E270086832B /* RegisterContextPOSIXCore_s390x.h in Headers */,
-				4FBC04EF211A06820015A814 /* RichManglingContext.h in Headers */,
-				4984BA181B979C08008658D4 /* ExpressionVariable.h in Headers */,
-				2647B63121C4366300A81D15 /* ArchitectureMips.h in Headers */,
-				26C7C4841BFFEA7E009BD01F /* WindowsMiniDump.h in Headers */,
-				30B38A001CAAA6D7009524E3 /* ClangUtil.h in Headers */,
-				AFD65C821D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.h in Headers */,
-				2647B63621C4368300A81D15 /* Broadcaster.h in Headers */,
-				238F2BA11D2C835A001FF92A /* StructuredDataPlugin.h in Headers */,
-				AF415AE81D949E4400FCE0D4 /* x86AssemblyInspectionEngine.h in Headers */,
-				AF8AD62F1BEC28A400150209 /* PlatformAppleTVSimulator.h in Headers */,
-				238F2BA91D2C85FA001FF92A /* StructuredDataDarwinLog.h in Headers */,
-				AF8AD63A1BEC28C400150209 /* PlatformRemoteAppleWatch.h in Headers */,
-				257906651BD5AFD000178368 /* Acceptor.h in Headers */,
-				2647B63821C4369500A81D15 /* Listener.h in Headers */,
-				238F2BA21D2C835A001FF92A /* SystemRuntime.h in Headers */,
-				260A63171861008E00FECF8E /* IOHandler.h in Headers */,
-				267F68581CC02EAE0086832B /* RegisterContextPOSIX_s390x.h in Headers */,
-				AF27AD561D3603EA00CF2833 /* DynamicLoaderDarwin.h in Headers */,
-				AFCB2BBE1BF577F40018B553 /* PythonExceptionState.h in Headers */,
-				E414F6EE21388F0300C50BC6 /* LibCxxVariant.h in Headers */,
-				267F684B1CC02DED0086832B /* ABISysV_s390x.h in Headers */,
-				AF8AD6311BEC28A400150209 /* PlatformAppleWatchSimulator.h in Headers */,
-				5A6424952204D05000C3D9DB /* PdbFPOProgramToDWARFExpression.h in Headers */,
-				5A6424982204D05000C3D9DB /* CodeViewRegisterMapping.h in Headers */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXLegacyTarget section */
-		2387551E1C24974600CCE8C3 /* lldb-python-test-suite */ = {
-			isa = PBXLegacyTarget;
-			buildArgumentsString = "-u $(SRCROOT)/test/dotest.py --apple-sdk $(PLATFORM_NAME) --executable=$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/lldb -C $(LLDB_PYTHON_TESTSUITE_CC) --arch $(LLDB_PYTHON_TESTSUITE_ARCH) --filecheck $(LLVM_BUILD_DIR)/x86_64/bin/FileCheck --session-file-format fm --results-formatter lldbsuite.test_event.formatter.xunit.XunitFormatter --build-dir $(BUILD_DIR)/lldb-test-build.noindex --results-file $(BUILD_DIR)/test-results-$(LLDB_PYTHON_TESTSUITE_ARCH).xml --rerun-all-issues --env TERM=vt100 -O--xpass=ignore";
-			buildConfigurationList = 238755241C24974600CCE8C3 /* Build configuration list for PBXLegacyTarget "lldb-python-test-suite" */;
-			buildPhases = (
-			);
-			buildToolPath = /usr/bin/python;
-			buildWorkingDirectory = "$(BUILD_DIR)";
-			dependencies = (
-			);
-			name = "lldb-python-test-suite";
-			passBuildSettingsInEnvironment = 1;
-			productName = "LLDB Python Test Suite";
-		};
-/* End PBXLegacyTarget section */
-
-/* Begin PBXNativeTarget section */
-		239504D31BDD451400963CEA /* lldb-gtest */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 239504DD1BDD451400963CEA /* Build configuration list for PBXNativeTarget "lldb-gtest" */;
-			buildPhases = (
-				239504D01BDD451400963CEA /* Sources */,
-				239504D11BDD451400963CEA /* Frameworks */,
-				239504D21BDD451400963CEA /* CopyFiles */,
-				23B9815E1CB2E2F90059938A /* Run gtests */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				23E2E5481D904D72006F38BB /* PBXTargetDependency */,
-			);
-			name = "lldb-gtest";
-			productName = "lldb-gtest";
-			productReference = 239504D41BDD451400963CEA /* lldb-gtest */;
-			productType = "com.apple.product-type.tool";
-		};
-		23CB152F1D66DA9300EDDDE1 /* lldb-gtest-build */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 23CB15511D66DA9300EDDDE1 /* Build configuration list for PBXNativeTarget "lldb-gtest-build" */;
-			buildPhases = (
-				23CB15321D66DA9300EDDDE1 /* Sources */,
-				23CB15481D66DA9300EDDDE1 /* Frameworks */,
-				23E2E5461D904B8A006F38BB /* Copy Inputs content to run dir */,
-				23CB154F1D66DA9300EDDDE1 /* Copy Files */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				23CB15301D66DA9300EDDDE1 /* PBXTargetDependency */,
-			);
-			name = "lldb-gtest-build";
-			productName = "lldb-gtest";
-			productReference = 23CB15561D66DA9300EDDDE1 /* lldb-gtest */;
-			productType = "com.apple.product-type.tool";
-		};
-		26579F67126A25920007C5CB /* darwin-debug */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 26579F6D126A25BF0007C5CB /* Build configuration list for PBXNativeTarget "darwin-debug" */;
-			buildPhases = (
-				26579F65126A25920007C5CB /* Sources */,
-				26579F66126A25920007C5CB /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "darwin-debug";
-			productName = "lldb-launcher";
-			productReference = 26579F68126A25920007C5CB /* darwin-debug */;
-			productType = "com.apple.product-type.tool";
-		};
-		26680206115FD0ED008E1FE4 /* LLDB */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 2668020B115FD0EE008E1FE4 /* Build configuration list for PBXNativeTarget "LLDB" */;
-			buildPhases = (
-				26DC6A5813380D4300FF7998 /* Prepare Swig Bindings */,
-				26680202115FD0ED008E1FE4 /* Headers */,
-				26680203115FD0ED008E1FE4 /* Resources */,
-				26680204115FD0ED008E1FE4 /* Sources */,
-				26680205115FD0ED008E1FE4 /* Frameworks */,
-				261B5A7511C3FA6F00AABD0A /* Fixup Framework Headers */,
-				9A19ACE2116563A700E0D453 /* Finish swig wrapper classes (lldb) */,
-				4959511A1A1ACE9500F6F8FC /* Install Clang compiler headers */,
-				940B04E31A89875C0045D5F7 /* CopyFiles */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				942829CE1A89842900521B30 /* PBXTargetDependency */,
-				94E829C9152D33B4006F96A3 /* PBXTargetDependency */,
-				2689011513353E9B00698AC0 /* PBXTargetDependency */,
-				262CFC7211A450CB00946C6C /* PBXTargetDependency */,
-				26368AF6126B95FA00E8659F /* PBXTargetDependency */,
-			);
-			name = LLDB;
-			productName = LLDB;
-			productReference = 26680207115FD0ED008E1FE4 /* LLDB.framework */;
-			productType = "com.apple.product-type.framework";
-		};
-		2679260B211CA3AC00EE1D10 /* lldb-vscode */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 26792614211CA3AD00EE1D10 /* Build configuration list for PBXNativeTarget "lldb-vscode" */;
-			buildPhases = (
-				26792608211CA3AC00EE1D10 /* Sources */,
-				26792609211CA3AC00EE1D10 /* Frameworks */,
-				2679260A211CA3AC00EE1D10 /* CopyFiles */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				26792620211CA40700EE1D10 /* PBXTargetDependency */,
-			);
-			name = "lldb-vscode";
-			productName = "lldb-vscode";
-			productReference = 2679260C211CA3AC00EE1D10 /* lldb-vscode */;
-			productType = "com.apple.product-type.tool";
-		};
-		2689FFC913353D7A00698AC0 /* lldb-core */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 2689FFD813353D7A00698AC0 /* Build configuration list for PBXNativeTarget "lldb-core" */;
-			buildPhases = (
-				261EECA21337D399001D193C /* Build llvm and clang */,
-				2689FFC613353D7A00698AC0 /* Sources */,
-				2689FFC713353D7A00698AC0 /* Frameworks */,
-				2689FFC813353D7A00698AC0 /* Headers */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "lldb-core";
-			productName = "lldb-core";
-			productReference = 2689FFCA13353D7A00698AC0 /* liblldb-core.a */;
-			productType = "com.apple.product-type.library.dynamic";
-		};
-		2690CD161A6DC0D000E717C8 /* lldb-mi */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 2690CD1F1A6DC0D000E717C8 /* Build configuration list for PBXNativeTarget "lldb-mi" */;
-			buildPhases = (
-				2690CD131A6DC0D000E717C8 /* Sources */,
-				2690CD141A6DC0D000E717C8 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				26DF74601A6DCDB300B85563 /* PBXTargetDependency */,
-			);
-			name = "lldb-mi";
-			productName = "lldb-mi";
-			productReference = 2690CD171A6DC0D000E717C8 /* lldb-mi */;
-			productType = "com.apple.product-type.tool";
-		};
-		26DC6A0F1337FE6900FF7998 /* lldb-server */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 26DC6A1A1337FE8B00FF7998 /* Build configuration list for PBXNativeTarget "lldb-server" */;
-			buildPhases = (
-				26DC6A0D1337FE6900FF7998 /* Sources */,
-				26DC6A0E1337FE6900FF7998 /* Frameworks */,
-				4C3326CA18B2A2B800EB5DD7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				26DC6A161337FE7300FF7998 /* PBXTargetDependency */,
-			);
-			name = "lldb-server";
-			productName = "lldb-server";
-			productReference = 26DC6A101337FE6900FF7998 /* lldb-server */;
-			productType = "com.apple.product-type.tool";
-		};
-		26F5C26910F3D9A4009D5894 /* lldb-tool */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 26F5C26E10F3D9C5009D5894 /* Build configuration list for PBXNativeTarget "lldb-tool" */;
-			buildPhases = (
-				DD5F951721ADD0C900B8265A /* Run Tablegen */,
-				26F5C26710F3D9A4009D5894 /* Sources */,
-				26F5C26810F3D9A4009D5894 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				266803621160110D008E1FE4 /* PBXTargetDependency */,
-			);
-			name = "lldb-tool";
-			productName = lldb;
-			productReference = 26F5C26A10F3D9A4009D5894 /* lldb */;
-			productType = "com.apple.product-type.tool";
-		};
-		942829BF1A89835300521B30 /* lldb-argdumper */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 942829C41A89835400521B30 /* Build configuration list for PBXNativeTarget "lldb-argdumper" */;
-			buildPhases = (
-				942829BC1A89835300521B30 /* Sources */,
-				942829BD1A89835300521B30 /* Frameworks */,
-				942829BE1A89835300521B30 /* CopyFiles */,
-				940B04E21A89871F0045D5F7 /* ShellScript */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-				942829CA1A89836A00521B30 /* PBXTargetDependency */,
-			);
-			name = "lldb-argdumper";
-			productName = argdumper;
-			productReference = 942829C01A89835300521B30 /* lldb-argdumper */;
-			productType = "com.apple.product-type.tool";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		08FB7793FE84155DC02AAC07 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastSwiftUpdateCheck = 0700;
-				LastUpgradeCheck = 0720;
-				TargetAttributes = {
-					2387551E1C24974600CCE8C3 = {
-						CreatedOnToolsVersion = 7.2;
-					};
-					239504D31BDD451400963CEA = {
-						CreatedOnToolsVersion = 7.1;
-					};
-					2679260B211CA3AC00EE1D10 = {
-						CreatedOnToolsVersion = 9.4.1;
-					};
-					2690CD161A6DC0D000E717C8 = {
-						CreatedOnToolsVersion = 6.3;
-					};
-					942829BF1A89835300521B30 = {
-						CreatedOnToolsVersion = 7.0;
-					};
-					DD8DC26B22026E2C00EB6F9E = {
-						CreatedOnToolsVersion = 11.0;
-						ProvisioningStyle = Automatic;
-					};
-				};
-			};
-			buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "lldb" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				English,
-				en,
-			);
-			mainGroup = 08FB7794FE84155DC02AAC07 /* lldb */;
-			projectDirPath = "";
-			projectReferences = (
-				{
-					ProductGroup = 265E9BE2115C2BAA00D0DCCB /* Products */;
-					ProjectRef = 265E9BE1115C2BAA00D0DCCB /* debugserver.xcodeproj */;
-				},
-			);
-			projectRoot = "";
-			targets = (
-				26CEF3B114FD592B007286B2 /* desktop */,
-				26CEF3A914FD58BF007286B2 /* desktop_no_xpc */,
-				26CEF3BC14FD596A007286B2 /* ios */,
-				AFA9B71120606A13008E86C6 /* ios-mini */,
-				26F5C26910F3D9A4009D5894 /* lldb-tool */,
-				26680206115FD0ED008E1FE4 /* LLDB */,
-				239504D31BDD451400963CEA /* lldb-gtest */,
-				23CB152F1D66DA9300EDDDE1 /* lldb-gtest-build */,
-				2387551E1C24974600CCE8C3 /* lldb-python-test-suite */,
-				26579F67126A25920007C5CB /* darwin-debug */,
-				2689FFC913353D7A00698AC0 /* lldb-core */,
-				26DC6A0F1337FE6900FF7998 /* lldb-server */,
-				2690CD161A6DC0D000E717C8 /* lldb-mi */,
-				942829BF1A89835300521B30 /* lldb-argdumper */,
-				2679260B211CA3AC00EE1D10 /* lldb-vscode */,
-				DD8DC26B22026E2C00EB6F9E /* lldb-docs */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXReferenceProxy section */
-		239504C51BDD3FD700963CEA /* debugserver-nonui */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = "debugserver-nonui";
-			remoteRef = 239504C41BDD3FD700963CEA /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		26CE05A0115C31E50022F371 /* debugserver */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = debugserver;
-			remoteRef = 26CE059F115C31E50022F371 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-/* End PBXReferenceProxy section */
-
-/* Begin PBXResourcesBuildPhase section */
-		26680203115FD0ED008E1FE4 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				94E829CA152D33C1006F96A3 /* lldb-server in Resources */,
-				262CFC7711A4510000946C6C /* debugserver in Resources */,
-				26368AF7126B960500E8659F /* darwin-debug in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
-		23B9815E1CB2E2F90059938A /* Run gtests */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Run gtests";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = "/bin/sh -x";
-			shellScript = "# Run the just-built gtest executable\n\n# Uncomment this to see the steps in action\n# set -x\n\n# We need to hide the lldb.py that goes into BUILT_PRODUCTS\n# because it will conflict with finding the lldb module later,\n# which causes the python exception tests to fail.\nif [ -f \"${BUILT_PRODUCTS_DIR}/lldb.py\" ]; then\n    mv -f \"${BUILT_PRODUCTS_DIR}/lldb.py\" \"${BUILT_PRODUCTS_DIR}/park.lldb.py\"\nfi\n\n# Tell lldb-gtest where to find the lldb package\nexport PYTHONPATH=${BUILT_PRODUCTS_DIR}/LLDB.framework/Resources/Python\n\n# Set the terminal to VT100 so that the editline internals don't\n# fail.\nexport TERM=vt100\n\n# We must redirect stdin to /dev/null: without this, xcodebuild\n# will wait forever for input when we run the TestExceptionStateChecking\n# test.\n${BUILT_PRODUCTS_DIR}/lldb-gtest --gtest_output=xml:${BUILD_DIR}/gtest-results.xml < /dev/null\nRETCODE=$?\n\nif [ -f \"${BUILT_PRODUCTS_DIR}/park.lldb.py\" ]; then\nmv -f \"${BUILT_PRODUCTS_DIR}/park.lldb.py\" \"${BUILT_PRODUCTS_DIR}/lldb.py\"\nfi\n\nexit ${RETCODE}\n";
-		};
-		23E2E5461D904B8A006F38BB /* Copy Inputs content to run dir */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Copy Inputs content to run dir";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = "/bin/bash +x scripts/Xcode/prepare-gtest-run-dir.sh";
-			shellScript = "";
-		};
-		261B5A7511C3FA6F00AABD0A /* Fixup Framework Headers */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Fixup Framework Headers";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "cd \"${TARGET_BUILD_DIR}/${PUBLIC_HEADERS_FOLDER_PATH}\"\nfor file in *.h\ndo\n    /usr/bin/sed -i '' 's/\\(#include\\)[ ]*\"lldb\\/\\(API\\/\\)\\{0,1\\}\\(.*\\)\"/\\1 <LLDB\\/\\3>/1' \"$file\"\n    /usr/bin/sed -i '' 's|<LLDB/Utility|<LLDB|' \"$file\"\n    LLDB_VERSION=`echo ${CURRENT_PROJECT_VERSION} | /usr/bin/sed -E 's/^([0-9]+).([0-9]+).([0-9]+)(.[0-9]+)?$/\\1/g'`\n    LLDB_REVISION=`echo ${CURRENT_PROJECT_VERSION} | /usr/bin/sed -E 's/^([0-9]+).([0-9]+).([0-9]+)(.[0-9]+)?$/\\3/g'`\n    LLDB_VERSION_STRING=`echo ${CURRENT_PROJECT_VERSION}`\n    /usr/bin/sed -i '' \"s|//#define LLDB_VERSION$|#define LLDB_VERSION $LLDB_VERSION |\" \"$file\"\n    /usr/bin/sed -i '' \"s|//#define LLDB_REVISION|#define LLDB_REVISION $LLDB_REVISION |\" \"$file\"\n    /usr/bin/sed -i '' \"s|//#define LLDB_VERSION_STRING|#define LLDB_VERSION_STRING \\\"$LLDB_VERSION_STRING\\\" |\" \"$file\"\ndone\n";
-		};
-		261EECA21337D399001D193C /* Build llvm and clang */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-				"$(LLVM_SOURCE_DIR)",
-				"$(LLVM_BUILD_DIR)",
-				"$(LLVM_BUILD_DIR)/archives.txt",
-			);
-			name = "Build llvm and clang";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "/usr/bin/env python -u $SRCROOT/scripts/Xcode/build-llvm.py\n";
-		};
-		26DC6A5813380D4300FF7998 /* Prepare Swig Bindings */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-				"$(SRCROOT)/scripts/Python/python-wrapper.swig",
-				"$(SRCROOT)/scripts/Python/python-typemaps.swig",
-				"$(SRCROOT)/scripts/Python/python-swigsafecast.swig",
-				"$(SRCROOT)/source/API/SBAddress.cpp",
-				"$(SRCROOT)/source/API/SBAttachInfo.cpp",
-				"$(SRCROOT)/source/API/SBBlock.cpp",
-				"$(SRCROOT)/source/API/SBBreakpoint.cpp",
-				"$(SRCROOT)/source/API/SBBreakpointLocation.cpp",
-				"$(SRCROOT)/source/API/SBBreakpointName.cpp",
-				"$(SRCROOT)/source/API/SBBreakpointOptionCommon.cpp",
-				"$(SRCROOT)/source/API/SBBroadcaster.cpp",
-				"$(SRCROOT)/source/API/SBCommandInterpreter.cpp",
-				"$(SRCROOT)/source/API/SBCommandReturnObject.cpp",
-				"$(SRCROOT)/source/API/SBCompileUnit.cpp",
-				"$(SRCROOT)/source/API/SBData.cpp",
-				"$(SRCROOT)/source/API/SBDebugger.cpp",
-				"$(SRCROOT)/source/API/SBDeclaration.cpp",
-				"$(SRCROOT)/source/API/SBError.cpp",
-				"$(SRCROOT)/source/API/SBEvent.cpp",
-				"$(SRCROOT)/source/API/SBExecutionContext.cpp",
-				"$(SRCROOT)/source/API/SBExpressionOptions.cpp",
-				"$(SRCROOT)/source/API/SBFileSpec.cpp",
-				"$(SRCROOT)/source/API/SBFileSpecList.cpp",
-				"$(SRCROOT)/source/API/SBFrame.cpp",
-				"$(SRCROOT)/source/API/SBFunction.cpp",
-				"$(SRCROOT)/source/API/SBHostOS.cpp",
-				"$(SRCROOT)/source/API/SBInstruction.cpp",
-				"$(SRCROOT)/source/API/SBInstructionList.cpp",
-				"$(SRCROOT)/source/API/SBLanguageRuntime.cpp",
-				"$(SRCROOT)/source/API/SBLaunchInfo.cpp",
-				"$(SRCROOT)/source/API/SBLineEntry.cpp",
-				"$(SRCROOT)/source/API/SBListener.cpp",
-				"$(SRCROOT)/source/API/SBMemoryRegionInfo.cpp",
-				"$(SRCROOT)/source/API/SBMemoryRegionInfoList.cpp",
-				"$(SRCROOT)/source/API/SBModule.cpp",
-				"$(SRCROOT)/source/API/SBModuleSpec.cpp",
-				"$(SRCROOT)/source/API/SBPlatform.cpp",
-				"$(SRCROOT)/source/API/SBProcess.cpp",
-				"$(SRCROOT)/source/API/SBProcessInfo.cpp",
-				"$(SRCROOT)/source/API/SBQueue.cpp",
-				"$(SRCROOT)/source/API/SBQueueItem.cpp",
-				"$(SRCROOT)/source/API/SBSection.cpp",
-				"$(SRCROOT)/source/API/SBSourceManager.cpp",
-				"$(SRCROOT)/source/API/SBStream.cpp",
-				"$(SRCROOT)/source/API/SBStringList.cpp",
-				"$(SRCROOT)/source/API/SBStructuredData.cpp",
-				"$(SRCROOT)/source/API/SBSymbol.cpp",
-				"$(SRCROOT)/source/API/SBSymbolContext.cpp",
-				"$(SRCROOT)/source/API/SBSymbolContextList.cpp",
-				"$(SRCROOT)/source/API/SBTarget.cpp",
-				"$(SRCROOT)/source/API/SBThread.cpp",
-				"$(SRCROOT)/source/API/SBThreadCollection.cpp",
-				"$(SRCROOT)/source/API/SBThreadPlan.cpp",
-				"$(SRCROOT)/source/API/SBTrace.cpp",
-				"$(SRCROOT)/source/API/SBTraceOptions.cpp",
-				"$(SRCROOT)/source/API/SBType.cpp",
-				"$(SRCROOT)/source/API/SBTypeCategory.cpp",
-				"$(SRCROOT)/source/API/SBTypeEnumMember.cpp",
-				"$(SRCROOT)/source/API/SBTypeFilter.cpp",
-				"$(SRCROOT)/source/API/SBTypeFormat.cpp",
-				"$(SRCROOT)/source/API/SBTypeNameSpecifier.cpp",
-				"$(SRCROOT)/source/API/SBTypeSummary.cpp",
-				"$(SRCROOT)/source/API/SBTypeSynthetic.cpp",
-				"$(SRCROOT)/source/API/SBUnixSignals.cpp",
-				"$(SRCROOT)/source/API/SBValue.cpp",
-				"$(SRCROOT)/source/API/SBValueList.cpp",
-				"$(SRCROOT)/source/API/SBVariablesOptions.cpp",
-				"$(SRCROOT)/source/API/SBWatchpoint.cpp",
-			);
-			name = "Prepare Swig Bindings";
-			outputPaths = (
-				"$(BUILT_PRODUCTS_DIR)/LLDBWrapPython.cpp",
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/bash;
-			shellScript = "/usr/bin/python $SRCROOT/scripts/prepare_bindings.py --find-swig --framework --src-root $SRCROOT --target-dir $TARGET_BUILD_DIR --config-build-dir $BUILT_PRODUCTS_DIR --target-platform Darwin\n";
-		};
-		4959511A1A1ACE9500F6F8FC /* Install Clang compiler headers */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-				"$(BUILT_PRODUCTS_DIR)/LLDB.framework/Resources/Clang",
-			);
-			name = "Install Clang compiler headers";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "/usr/bin/python $SRCROOT/scripts/Xcode/package-clang-resource-headers.py $TARGET_BUILD_DIR $LLVM_BUILD_DIR/x86_64\n";
-		};
-		4C3326CA18B2A2B800EB5DD7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "if [ \"${CONFIGURATION}\" != BuildAndIntegration ]\nthen\n    if [ \"${DEBUGSERVER_USE_FROM_SYSTEM}\" == \"\" ]\n    then\n        if [ \"${DEBUGSERVER_DISABLE_CODESIGN}\" == \"\" ]\n        then\n            codesign -f -s lldb_codesign --entitlements ${SRCROOT}/resources/debugserver-macosx-entitlements.plist \"${TARGET_BUILD_DIR}/${TARGET_NAME}\"\n        fi\n    fi\nfi\n";
-		};
-		940B04E21A89871F0045D5F7 /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-			);
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "";
-		};
-		9A19ACE2116563A700E0D453 /* Finish swig wrapper classes (lldb) */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputPaths = (
-				"$(BUILT_PRODUCTS_DIR)/lldb.py",
-				"$(SRCROOT)/source/Interpreter/embedded_interpreter.py",
-				"$(OBJECT_FILE_DIR_normal)/x86_64/LLDBWrapPython.o",
-			);
-			name = "Finish swig wrapper classes (lldb)";
-			outputPaths = (
-				"$(BUILT_PRODUCTS_DIR)/LLDB.framework/Resources/lldb.py",
-				"$(BUILT_PRODUCTS_DIR)/LLDB.framework/Resources/_lldb.so",
-				"$(BUILT_PRODUCTS_DIR)/LLDB.framework/Resources/embedded_interpreter.py",
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "sh $SRCROOT/scripts/finish-swig-wrapper-classes.sh $SRCROOT $TARGET_BUILD_DIR $BUILT_PRODUCTS_DIR \"\"\n";
-		};
-		AF3059151B4B390800E25622 /* Run Script - remove unneeded Resources and Swift dirs from iOS LLDB.framework bundle */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 12;
-			files = (
-			);
-			inputPaths = (
-			);
-			name = "Run Script - remove unneeded Resources and Swift dirs from iOS LLDB.framework bundle";
-			outputPaths = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = "/bin/sh -x";
-			shellScript = "/bin/rm -rf \"$INSTALL_ROOT/System/Library/PrivateFrameworks/LLDB.framework/Resources\" \"$INSTALL_ROOT/System/Library/PrivateFrameworks/LLDB.framework/Swift\"\n";
-			showEnvVarsInLog = 0;
-		};
-		DD5F951721ADD0C900B8265A /* Run Tablegen */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputFileListPaths = (
-			);
-			inputPaths = (
-				$SOURCE_DIR/tools/driver/Options.td,
-			);
-			name = "Run Tablegen";
-			outputFileListPaths = (
-			);
-			outputPaths = (
-				$BUILT_PRODUCTS_DIR/include/Options.inc,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "mkdir -p $BUILT_PRODUCTS_DIR/include\n$LLVM_BUILD_DIR/x86_64/bin/llvm-tblgen -I$LLVM_SOURCE_DIR/include -gen-opt-parser-defs $SRCROOT/tools/driver/Options.td -o $BUILT_PRODUCTS_DIR/include/Options.inc\n";
-		};
-		DD8DC27122026E4400EB6F9E /* ShellScript */ = {
-			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			inputFileListPaths = (
-			);
-			inputPaths = (
-				"$(SRCROOT)/docs/index.rst",
-				"$(SRCROOT)/docs/resources/build.rst",
-				"$(SRCROOT)/docs/resources/download.rst",
-				"$(SRCROOT)/docs/resources/external.rst",
-				"$(SRCROOT)/docs/resources/sbapi.rst",
-				"$(SRCROOT)/docs/resources/test.rst",
-				"$(SRCROOT)/docs/status/about.rst",
-				"$(SRCROOT)/docs/status/features.rst",
-				"$(SRCROOT)/docs/status/goals.rst",
-				"$(SRCROOT)/docs/status/projects.rst",
-				"$(SRCROOT)/docs/status/status.rst",
-				"$(SRCROOT)/docs/use/architecture.rst",
-				"$(SRCROOT)/docs/use/formatting.rst",
-				"$(SRCROOT)/docs/use/map.rst",
-				"$(SRCROOT)/docs/use/python.rst",
-				"$(SRCROOT)/docs/use/remote.rst",
-				"$(SRCROOT)/docs/use/symbolication.rst",
-				"$(SRCROOT)/docs/use/symbols.rst",
-				"$(SRCROOT)/docs/use/troubleshooting.rst",
-				"$(SRCROOT)/docs/use/tutorial.rst",
-				"$(SRCROOT)/docs/use/variable.rst",
-			);
-			outputFileListPaths = (
-			);
-			outputPaths = (
-				$BUILT_PRODUCTS_DIR/docs/html/index.html,
-				$BUILT_PRODUCTS_DIR/docs/html/resources/build.html,
-				$BUILT_PRODUCTS_DIR/docs/html/resources/download.html,
-				$BUILT_PRODUCTS_DIR/docs/html/resources/external.html,
-				$BUILT_PRODUCTS_DIR/docs/html/resources/sbapi.html,
-				$BUILT_PRODUCTS_DIR/docs/html/resources/test.html,
-				$BUILT_PRODUCTS_DIR/docs/html/status/about.html,
-				$BUILT_PRODUCTS_DIR/docs/html/status/features.html,
-				$BUILT_PRODUCTS_DIR/docs/html/status/goals.html,
-				$BUILT_PRODUCTS_DIR/docs/html/status/projects.html,
-				$BUILT_PRODUCTS_DIR/docs/html/status/status.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/architecture.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/formatting.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/map.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/python.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/remote.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/symbolication.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/symbols.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/troubleshooting.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/tutorial.html,
-				$BUILT_PRODUCTS_DIR/docs/html/use/variable.html,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-			shellPath = /bin/sh;
-			shellScript = "mkdir -p $BUILT_PRODUCTS_DIR/docs\ncd $SRCROOT/docs\nsphinx-build -b html -d $BUILT_PRODUCTS_DIR/docs/_doctrees-lldb-html -q -W $SRCROOT/docs $BUILT_PRODUCTS_DIR/docs/html\necho \"Docs written to $BUILT_PRODUCTS_DIR/docs/html\"\n";
-		};
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		239504D01BDD451400963CEA /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		23CB15321D66DA9300EDDDE1 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				4C639ED221FA684900A7B957 /* RegisterValueTest.cpp in Sources */,
-				9A3D43D91F3151C400EB767C /* StatusTest.cpp in Sources */,
-				23CB15341D66DA9300EDDDE1 /* CPlusPlusLanguageTest.cpp in Sources */,
-				9A2057381F3B8E7E00F6C293 /* FileSystemTest.cpp in Sources */,
-				AFEABBF72230BF840097046F /* TestArm64Disassembly.cpp in Sources */,
-				9A2057201F3B8D2500F6C293 /* UnixSignalsTest.cpp in Sources */,
-				2668A2EE20AF417D00D94111 /* PathMappingListTest.cpp in Sources */,
-				AFAFD80A1E57E1B90017A14F /* ModuleCacheTest.cpp in Sources */,
-				9A3D43DA1F3151C400EB767C /* StructuredDataTest.cpp in Sources */,
-				9A2057121F3B824B00F6C293 /* SymbolFileDWARFTests.cpp in Sources */,
-				9A20573A1F3B8E7E00F6C293 /* MainLoopTest.cpp in Sources */,
-				23CB15351D66DA9300EDDDE1 /* UriParserTest.cpp in Sources */,
-				AFB4C8142228A7B40018086A /* LocateSymbolFileTest.cpp in Sources */,
-				8C3BD9A01EF5D1FF0016C343 /* JSONTest.cpp in Sources */,
-				23CB15361D66DA9300EDDDE1 /* FileSpecTest.cpp in Sources */,
-				23E2E5251D90373D006F38BB /* ArchSpecTest.cpp in Sources */,
-				58A080B32112AB2900D5580F /* HighlighterTest.cpp in Sources */,
-				9A2057081F3B819100F6C293 /* MemoryRegionInfoTest.cpp in Sources */,
-				9A20572D1F3B8E6600F6C293 /* TestCompletion.cpp in Sources */,
-				AFA1B62C219E0ED900A8AB7E /* DataExtractorTest.cpp in Sources */,
-				4C719399207D23E300FDF430 /* TestOptionArgParser.cpp in Sources */,
-				4C639ED621FA684900A7B957 /* FlagsTest.cpp in Sources */,
-				23CB15371D66DA9300EDDDE1 /* PythonTestSuite.cpp in Sources */,
-				23E2E5321D903832006F38BB /* BreakpointIDTest.cpp in Sources */,
-				4CEC86A7204738EB009B37B1 /* TestPPC64InstEmulation.cpp in Sources */,
-				58EAC73F2106A07B0029571E /* StreamTeeTest.cpp in Sources */,
-				4C639ED821FA684900A7B957 /* VMRangeTest.cpp in Sources */,
-				23CB15381D66DA9300EDDDE1 /* PythonExceptionStateTests.cpp in Sources */,
-				9A3D43D81F3151C400EB767C /* NameMatchesTest.cpp in Sources */,
-				DD6C13BD220A6F6A005C2AE8 /* ReproducerInstrumentationTest.cpp in Sources */,
-				4CEC86A4204738C5009B37B1 /* TestArm64InstEmulation.cpp in Sources */,
-				9A3D43ED1F3237F900EB767C /* StateTest.cpp in Sources */,
-				23CB153A1D66DA9300EDDDE1 /* GDBRemoteClientBaseTest.cpp in Sources */,
-				23CB153B1D66DA9300EDDDE1 /* SocketTest.cpp in Sources */,
-				DD8F278222011D15004ED75B /* FileCollectorTest.cpp in Sources */,
-				23CB153C1D66DA9300EDDDE1 /* ArgsTest.cpp in Sources */,
-				9A3D43DB1F3151C400EB767C /* TildeExpressionResolverTest.cpp in Sources */,
-				4C639ED021FA684900A7B957 /* UUIDTest.cpp in Sources */,
-				9A2057291F3B8DDB00F6C293 /* TestObjectFileELF.cpp in Sources */,
-				23CB153D1D66DA9300EDDDE1 /* GDBRemoteCommunicationClientTest.cpp in Sources */,
-				23CB153E1D66DA9300EDDDE1 /* PythonDataObjectsTests.cpp in Sources */,
-				9A3D43D71F3151C400EB767C /* LogTest.cpp in Sources */,
-				9A2057181F3B861400F6C293 /* TestType.cpp in Sources */,
-				9A2057171F3B861400F6C293 /* TestDWARFCallFrameInfo.cpp in Sources */,
-				4F29D3CF21010FA3003B549A /* MangledTest.cpp in Sources */,
-				4FBC04F5211A13770015A814 /* RichManglingContextTest.cpp in Sources */,
-				9A3D43EC1F3237F900EB767C /* ListenerTest.cpp in Sources */,
-				9A3D43DC1F3151C400EB767C /* TimeoutTest.cpp in Sources */,
-				9A3D43D61F3151C400EB767C /* ConstStringTest.cpp in Sources */,
-				4C639ECB21FA684900A7B957 /* EnvironmentTest.cpp in Sources */,
-				9A20571C1F3B867400F6C293 /* PlatformDarwinTest.cpp in Sources */,
-				4C639ECF21FA684900A7B957 /* ReproducerTest.cpp in Sources */,
-				AFEC5FD81D94F9380076A480 /* Testx86AssemblyInspectionEngine.cpp in Sources */,
-				23CB15401D66DA9300EDDDE1 /* TestClangASTContext.cpp in Sources */,
-				23CB15411D66DA9300EDDDE1 /* StringExtractorTest.cpp in Sources */,
-				9A2057031F3A605200F6C293 /* VASprintfTest.cpp in Sources */,
-				4C639ED121FA684900A7B957 /* OptionsWithRawTest.cpp in Sources */,
-				26FCE61C229F00F000D125BD /* SocketTestUtilities.cpp in Sources */,
-				4C639ED321FA684900A7B957 /* EventTest.cpp in Sources */,
-				9A18903C1F47D5E600394BCA /* TestUtilities.cpp in Sources */,
-				4C639ECD21FA684900A7B957 /* StreamTest.cpp in Sources */,
-				23CB15421D66DA9300EDDDE1 /* TaskPoolTest.cpp in Sources */,
-				4C639ECE21FA684900A7B957 /* PredicateTest.cpp in Sources */,
-				23CB15431D66DA9300EDDDE1 /* BroadcasterTest.cpp in Sources */,
-				9A3D43EE1F3237F900EB767C /* StreamCallbackTest.cpp in Sources */,
-				9A18903B1F47D5E600394BCA /* MockTildeExpressionResolver.cpp in Sources */,
-				23CB15441D66DA9300EDDDE1 /* ScalarTest.cpp in Sources */,
-				9A2057391F3B8E7E00F6C293 /* HostTest.cpp in Sources */,
-				23CB15451D66DA9300EDDDE1 /* SocketAddressTest.cpp in Sources */,
-				9A3D43DD1F3151C400EB767C /* TimerTest.cpp in Sources */,
-				23CB15461D66DA9300EDDDE1 /* GDBRemoteTestUtils.cpp in Sources */,
-				4C639ED521FA684900A7B957 /* AnsiTerminalTest.cpp in Sources */,
-				AF7F97682141FA4500795BC0 /* TestArmv7Disassembly.cpp in Sources */,
-				23E2E5271D903782006F38BB /* MinidumpParserTest.cpp in Sources */,
-				4C639ECC21FA684900A7B957 /* StringListTest.cpp in Sources */,
-				4C639ED721FA684900A7B957 /* CompletionRequestTest.cpp in Sources */,
-				23CB15471D66DA9300EDDDE1 /* EditlineTest.cpp in Sources */,
-				4C639ED421FA684900A7B957 /* StringLexerTest.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26579F65126A25920007C5CB /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				26368A3C126B697600E8659F /* darwin-debug.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26680204115FD0ED008E1FE4 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				23EFE38B193D1AEC00E54E54 /* SBTypeEnumMember.cpp in Sources */,
-				9461569A14E358A6003A195C /* SBTypeFilter.cpp in Sources */,
-				9461569B14E358A6003A195C /* SBTypeFormat.cpp in Sources */,
-				262F12B51835468600AEB384 /* SBPlatform.cpp in Sources */,
-				DD1E0ACE220BC3A100B815F8 /* SBReproducer.cpp in Sources */,
-				9461569C14E358A6003A195C /* SBTypeSummary.cpp in Sources */,
-				940B02F619DC96E700AD0F52 /* SBExecutionContext.cpp in Sources */,
-				9461569D14E358A6003A195C /* SBTypeSynthetic.cpp in Sources */,
-				26680324116005D9008E1FE4 /* SBThread.cpp in Sources */,
-				26680326116005DB008E1FE4 /* SBTarget.cpp in Sources */,
-				23DCBEA21D63E7190084C36B /* SBStructuredData.cpp in Sources */,
-				26680327116005DC008E1FE4 /* SBSourceManager.cpp in Sources */,
-				4971D4B51F30ECFB00823171 /* SBProcessInfo.cpp in Sources */,
-				3F81692C1ABB7A1E001DA9DF /* SystemInitializerFull.cpp in Sources */,
-				26680328116005DE008E1FE4 /* SBProcess.cpp in Sources */,
-				2668032A116005E0008E1FE4 /* SBListener.cpp in Sources */,
-				2668032C116005E2008E1FE4 /* SBFrame.cpp in Sources */,
-				2668032D116005E3008E1FE4 /* SBFileSpec.cpp in Sources */,
-				2668032E116005E5008E1FE4 /* SBEvent.cpp in Sources */,
-				4C54B27E1F61CE6300D469CA /* SBBreakpointName.cpp in Sources */,
-				2668032F116005E6008E1FE4 /* SBError.cpp in Sources */,
-				23DCEA461D1C4D0F00A602B4 /* SBMemoryRegionInfo.cpp in Sources */,
-				26680330116005E7008E1FE4 /* SBDebugger.cpp in Sources */,
-				26680331116005E9008E1FE4 /* SBCommunication.cpp in Sources */,
-				9A1E595D1EB2B141002206A5 /* SBTraceOptions.cpp in Sources */,
-				26680332116005EA008E1FE4 /* SBCommandReturnObject.cpp in Sources */,
-				26680333116005EC008E1FE4 /* SBCommandInterpreter.cpp in Sources */,
-				26680335116005EE008E1FE4 /* SBBroadcaster.cpp in Sources */,
-				26680336116005EF008E1FE4 /* SBBreakpointLocation.cpp in Sources */,
-				26680337116005F1008E1FE4 /* SBBreakpoint.cpp in Sources */,
-				26DE204511618ADA00A093E2 /* SBAddress.cpp in Sources */,
-				26DE204711618AED00A093E2 /* SBSymbolContext.cpp in Sources */,
-				26DE204D11618E7A00A093E2 /* SBModule.cpp in Sources */,
-				26DE205D1161901400A093E2 /* SBFunction.cpp in Sources */,
-				26DE205F1161901B00A093E2 /* SBCompileUnit.cpp in Sources */,
-				AF0EBBE9185940FB0059E52F /* SBQueueItem.cpp in Sources */,
-				AF0EBBE8185940FB0059E52F /* SBQueue.cpp in Sources */,
-				964381701C8D6B8200023D59 /* SBLanguageRuntime.cpp in Sources */,
-				26DE20611161902700A093E2 /* SBBlock.cpp in Sources */,
-				26DE20631161904200A093E2 /* SBLineEntry.cpp in Sources */,
-				26DE20651161904E00A093E2 /* SBSymbol.cpp in Sources */,
-				9A19A6B01163BBB300E0D453 /* SBValue.cpp in Sources */,
-				261744781168585B005ADD65 /* SBType.cpp in Sources */,
-				4C05332B1F62121E00DED368 /* SBBreakpointOptionCommon.cpp in Sources */,
-				9A35758E116CFE0F00E8ED2F /* SBValueList.cpp in Sources */,
-				9A357673116E7B6400E8ED2F /* SBStringList.cpp in Sources */,
-				9A1E595C1EB2B141002206A5 /* SBTrace.cpp in Sources */,
-				9A3576AA116E9AC700E8ED2F /* SBHostOS.cpp in Sources */,
-				9AC703AF117675410086C050 /* SBInstruction.cpp in Sources */,
-				9AC703B1117675490086C050 /* SBInstructionList.cpp in Sources */,
-				268F9D55123AA16600B91E9B /* SBSymbolContextList.cpp in Sources */,
-				94235B9E1A8D667400EB2EED /* SBVariablesOptions.cpp in Sources */,
-				26C72C961243229A0068DC16 /* SBStream.cpp in Sources */,
-				9443B122140C18C40013457C /* SBData.cpp in Sources */,
-				4CF52AF8142829390051E832 /* SBFileSpecList.cpp in Sources */,
-				23059A101958B319007B8189 /* SBUnixSignals.cpp in Sources */,
-				254FBBA51A91670E00BD6378 /* SBAttachInfo.cpp in Sources */,
-				4C56543719D22B32002E9C44 /* SBThreadPlan.cpp in Sources */,
-				8CCB018319BA51BF0009FD44 /* SBThreadCollection.cpp in Sources */,
-				26B82840142D020F002DBC64 /* SBSection.cpp in Sources */,
-				B2A58724143119D50092BFBA /* SBWatchpoint.cpp in Sources */,
-				23DCEA471D1C4D0F00A602B4 /* SBMemoryRegionInfoList.cpp in Sources */,
-				263C4938178B50C40070F12D /* SBModuleSpec.cpp in Sources */,
-				2660AAB914622483003A9694 /* LLDBWrapPython.cpp in Sources */,
-				9475C18814E5E9FA001BFC6D /* SBTypeCategory.cpp in Sources */,
-				9475C18E14E5F834001BFC6D /* SBTypeNameSpecifier.cpp in Sources */,
-				9452573A16262D0200325455 /* SBDeclaration.cpp in Sources */,
-				4CE4F675162C973F00F75CB3 /* SBExpressionOptions.cpp in Sources */,
-				AF9107EE168570D200DBCD3C /* RegisterContextDarwin_arm64.cpp in Sources */,
-				254FBB951A81AA7F00BD6378 /* SBLaunchInfo.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26792608211CA3AC00EE1D10 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				2679261E211CA3F200EE1D10 /* lldb-vscode.cpp in Sources */,
-				2660387E211CA98200329572 /* BreakpointBase.cpp in Sources */,
-				26603879211CA90F00329572 /* SourceBreakpoint.cpp in Sources */,
-				2660387A211CA90F00329572 /* ExceptionBreakpoint.cpp in Sources */,
-				2660387B211CA90F00329572 /* JSONUtils.cpp in Sources */,
-				26F7619B211CBBB30044F6EA /* LLDBUtils.cpp in Sources */,
-				2660387C211CA90F00329572 /* FunctionBreakpoint.cpp in Sources */,
-				26603878211CA90F00329572 /* VSCode.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		2689FFC613353D7A00698AC0 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				33E5E8471A674FB60024ED68 /* StringConvert.cpp in Sources */,
-				2689FFDA13353D9D00698AC0 /* lldb.cpp in Sources */,
-				4C9BF11B21C0467700FA4036 /* ObjectFileBreakpad.cpp in Sources */,
-				4C0083401B9F9BA900D5CF24 /* UtilityFunction.cpp in Sources */,
-				AF415AE71D949E4400FCE0D4 /* x86AssemblyInspectionEngine.cpp in Sources */,
-				26474CCD18D0CB5B0073DEBA /* RegisterContextPOSIX_x86.cpp in Sources */,
-				4FBC04ED211A06200015A814 /* RichManglingContext.cpp in Sources */,
-				AEB0E4591BD6E9F800B24093 /* LLVMUserExpression.cpp in Sources */,
-				2689FFEF13353DB600698AC0 /* Breakpoint.cpp in Sources */,
-				267A47FB1B1411C40021A5BC /* NativeRegisterContext.cpp in Sources */,
-				2689FFF113353DB600698AC0 /* BreakpointID.cpp in Sources */,
-				AF77E0A91A033D740096C0EA /* RegisterContextPOSIXCore_powerpc.cpp in Sources */,
-				2689FFF313353DB600698AC0 /* BreakpointIDList.cpp in Sources */,
-				2689FFF513353DB600698AC0 /* BreakpointList.cpp in Sources */,
-				4CDB8D6E1DBA91B6006C5B13 /* LibStdcppTuple.cpp in Sources */,
-				AF77E08F1A033C700096C0EA /* ABISysV_ppc.cpp in Sources */,
-				AF352EE122C17C0D00D058B6 /* BreakpointPrecondition.cpp in Sources */,
-				2689FFF713353DB600698AC0 /* BreakpointLocation.cpp in Sources */,
-				2654A68D1E552D1500DA1013 /* PseudoTerminal.cpp in Sources */,
-				2689FFF913353DB600698AC0 /* BreakpointLocationCollection.cpp in Sources */,
-				49F811F31E931B2100F4E163 /* CPlusPlusNameParser.cpp in Sources */,
-				2689FFFB13353DB600698AC0 /* BreakpointLocationList.cpp in Sources */,
-				AFD966B9217140B6006714AC /* PdbUtil.cpp in Sources */,
-				2689FFFD13353DB600698AC0 /* BreakpointOptions.cpp in Sources */,
-				AF0578C4217FA80700CF9D80 /* UdtRecordCompleter.cpp in Sources */,
-				2689FFFF13353DB600698AC0 /* BreakpointResolver.cpp in Sources */,
-				25420ECD1A6490B8009ADBCB /* OptionValueChar.cpp in Sources */,
-				DDB5829C2278C8D700491B41 /* CxxModuleHandler.cpp in Sources */,
-				2689000113353DB600698AC0 /* BreakpointResolverAddress.cpp in Sources */,
-				255EFF741AFABA720069F277 /* LockFileBase.cpp in Sources */,
-				945261C21B9A11FC00BF138D /* LibCxxList.cpp in Sources */,
-				2689000313353DB600698AC0 /* BreakpointResolverFileLine.cpp in Sources */,
-				26474CA818D0CB070073DEBA /* RegisterContextFreeBSD_i386.cpp in Sources */,
-				2689000513353DB600698AC0 /* BreakpointResolverName.cpp in Sources */,
-				6D762BEE1B1605D2006C929D /* LLDBServerUtilities.cpp in Sources */,
-				2689000713353DB600698AC0 /* BreakpointSite.cpp in Sources */,
-				AF235EB01FBE77B6009C5541 /* RegisterContextPOSIX_ppc64le.cpp in Sources */,
-				2689000913353DB600698AC0 /* BreakpointSiteList.cpp in Sources */,
-				26474CC918D0CB5B0073DEBA /* RegisterContextMemory.cpp in Sources */,
-				8CF02AEA19DCC02100B14BE0 /* ASanRuntime.cpp in Sources */,
-				26474CB218D0CB180073DEBA /* RegisterContextLinux_i386.cpp in Sources */,
-				26474CCB18D0CB5B0073DEBA /* RegisterContextPOSIX_mips64.cpp in Sources */,
-				2689000B13353DB600698AC0 /* Stoppoint.cpp in Sources */,
-				2689000D13353DB600698AC0 /* StoppointCallbackContext.cpp in Sources */,
-				2689000F13353DB600698AC0 /* StoppointLocation.cpp in Sources */,
-				237A8BAF1DEC9C7800CEBAFF /* RegisterInfoPOSIX_arm64.cpp in Sources */,
-				2689001113353DB600698AC0 /* Watchpoint.cpp in Sources */,
-				2689001213353DDE00698AC0 /* CommandObjectApropos.cpp in Sources */,
-				4C88BC2A1BA3722B00AA0964 /* Expression.cpp in Sources */,
-				8C3BD9961EF45DA50016C343 /* MainThreadCheckerRuntime.cpp in Sources */,
-				2689001413353DDE00698AC0 /* CommandObjectBreakpoint.cpp in Sources */,
-				4C61465E223059B000D686F9 /* ClangExpressionSourceCode.cpp in Sources */,
-				2689001513353DDE00698AC0 /* CommandObjectBreakpointCommand.cpp in Sources */,
-				2689001613353DDE00698AC0 /* CommandObjectCommands.cpp in Sources */,
-				AFEC3362194A8ABA00FF05C6 /* StructuredData.cpp in Sources */,
-				6D55B2901A8A806200A70529 /* GDBRemoteCommunicationServerCommon.cpp in Sources */,
-				AF352EDE22C17BD800D058B6 /* ABIWindows_x86_64.cpp in Sources */,
-				26474CAC18D0CB070073DEBA /* RegisterContextFreeBSD_x86_64.cpp in Sources */,
-				9441816E1C8F5EC900E5A8D9 /* CommandAlias.cpp in Sources */,
-				2689001713353DDE00698AC0 /* CommandObjectDisassemble.cpp in Sources */,
-				2689001813353DDE00698AC0 /* CommandObjectExpression.cpp in Sources */,
-				9404957B1BEC497E00926025 /* NSException.cpp in Sources */,
-				2689001A13353DDE00698AC0 /* CommandObjectFrame.cpp in Sources */,
-				2689001B13353DDE00698AC0 /* CommandObjectHelp.cpp in Sources */,
-				23F4034D1926E0F60046DC9B /* NativeRegisterContextRegisterInfo.cpp in Sources */,
-				964463EC1A330C0500154ED8 /* CompactUnwindInfo.cpp in Sources */,
-				94B638531B8F8E6C004FE1E4 /* Language.cpp in Sources */,
-				AF395C03219254F300894EC3 /* MSVCUndecoratedNameParser.cpp in Sources */,
-				AF815DF921C855B400023A34 /* PdbAstBuilder.cpp in Sources */,
-				2689001D13353DDE00698AC0 /* CommandObjectLog.cpp in Sources */,
-				262173A318395D4600C52091 /* SectionLoadHistory.cpp in Sources */,
-				2689001E13353DDE00698AC0 /* CommandObjectMemory.cpp in Sources */,
-				2689001F13353DDE00698AC0 /* CommandObjectPlatform.cpp in Sources */,
-				26474CC018D0CB2D0073DEBA /* RegisterContextMach_x86_64.cpp in Sources */,
-				2689002013353DDE00698AC0 /* CommandObjectProcess.cpp in Sources */,
-				2689002113353DDE00698AC0 /* CommandObjectQuit.cpp in Sources */,
-				2689002213353DDE00698AC0 /* CommandObjectRegister.cpp in Sources */,
-				26BC17AF18C7F4CB00D2196D /* RegisterContextPOSIXCore_x86_64.cpp in Sources */,
-				4C645D0822961B3C00D3C034 /* DWARFTypeUnit.cpp in Sources */,
-				2619C4842107A9A2009CDE81 /* RegisterContextMinidump_ARM64.cpp in Sources */,
-				2689002313353DDE00698AC0 /* CommandObjectScript.cpp in Sources */,
-				2689002413353DDE00698AC0 /* CommandObjectSettings.cpp in Sources */,
-				2689002513353DDE00698AC0 /* CommandObjectSource.cpp in Sources */,
-				267A48011B1411E40021A5BC /* XML.cpp in Sources */,
-				AF8AD6371BEC28C400150209 /* PlatformRemoteAppleTV.cpp in Sources */,
-				2666ADC61B3CB675001FAFD3 /* DynamicLoaderHexagonDYLD.cpp in Sources */,
-				3F8169331ABB7A6D001DA9DF /* SystemLifetimeManager.cpp in Sources */,
-				AF2E02A31FA2CEAF00A86C34 /* ArchitectureArm.cpp in Sources */,
-				4959511F1A1BC4BC00F6F8FC /* ClangModulesDeclVendor.cpp in Sources */,
-				26BC179918C7F2B300D2196D /* JITLoader.cpp in Sources */,
-				947CF7761DC7B20D00EF980B /* RegisterContextMinidump_x86_32.cpp in Sources */,
-				2689002713353DDE00698AC0 /* CommandObjectTarget.cpp in Sources */,
-				2689002813353DDE00698AC0 /* CommandObjectThread.cpp in Sources */,
-				2689002913353DDE00698AC0 /* CommandObjectVersion.cpp in Sources */,
-				AFC2DCF01E6E2FD200283714 /* VMRange.cpp in Sources */,
-				4CC57FA1222DFEA40067B7EA /* ProcessInfo.cpp in Sources */,
-				2689002A13353E0400698AC0 /* Address.cpp in Sources */,
-				8CF02AE919DCC01900B14BE0 /* InstrumentationRuntime.cpp in Sources */,
-				2689002B13353E0400698AC0 /* AddressRange.cpp in Sources */,
-				236124A41986B4E2004EFC37 /* IOObject.cpp in Sources */,
-				2689002C13353E0400698AC0 /* AddressResolver.cpp in Sources */,
-				945261C01B9A11FC00BF138D /* LibCxx.cpp in Sources */,
-				949EEDB11BA7672D008C63CF /* NSDictionary.cpp in Sources */,
-				2689002D13353E0400698AC0 /* AddressResolverFileLine.cpp in Sources */,
-				2689002E13353E0400698AC0 /* AddressResolverName.cpp in Sources */,
-				250D6AE31A9679440049CC70 /* FileSystem.cpp in Sources */,
-				49DCF702170E70120092F75E /* Materializer.cpp in Sources */,
-				2689003213353E0400698AC0 /* Communication.cpp in Sources */,
-				2689003313353E0400698AC0 /* Connection.cpp in Sources */,
-				9404957A1BEC497E00926025 /* NSError.cpp in Sources */,
-				AFCB2BBD1BF577F40018B553 /* PythonExceptionState.cpp in Sources */,
-				2689003913353E0400698AC0 /* Debugger.cpp in Sources */,
-				6D55BAEE1A8CD0B200A70529 /* PlatformAndroidRemoteGDBServer.cpp in Sources */,
-				2689003A13353E0400698AC0 /* Disassembler.cpp in Sources */,
-				236124A51986B4E2004EFC37 /* Socket.cpp in Sources */,
-				3FDFDDBF199D345E009756A7 /* FileCache.cpp in Sources */,
-				AF1729D7182C907200E0AB97 /* HistoryUnwind.cpp in Sources */,
-				4C0B95802238342C0026C840 /* ASTUtils.cpp in Sources */,
-				AF77E0A11A033D360096C0EA /* RegisterContextFreeBSD_powerpc.cpp in Sources */,
-				AFC4ADB12270F4C700042167 /* PostfixExpression.cpp in Sources */,
-				26764CA01E48F528008D3573 /* RegularExpression.cpp in Sources */,
-				2689003B13353E0400698AC0 /* EmulateInstruction.cpp in Sources */,
-				AFC2DCE91E6E2F2C00283714 /* Baton.cpp in Sources */,
-				26B75B441AD6E29A001F7A57 /* MipsLinuxSignals.cpp in Sources */,
-				2689003E13353E0400698AC0 /* FileSpecList.cpp in Sources */,
-				269DDD4A1B8FD1C300D0DBD8 /* DWARFASTParserClang.cpp in Sources */,
-				2689004213353E0400698AC0 /* Log.cpp in Sources */,
-				2689004313353E0400698AC0 /* Mangled.cpp in Sources */,
-				2689004413353E0400698AC0 /* Module.cpp in Sources */,
-				2689004513353E0400698AC0 /* ModuleChild.cpp in Sources */,
-				2647B63A21C436AC00A81D15 /* Broadcaster.cpp in Sources */,
-				AF8AD6301BEC28A400150209 /* PlatformAppleWatchSimulator.cpp in Sources */,
-				266E829D1B8E542C008FCA06 /* DWARFAttribute.cpp in Sources */,
-				26764C9E1E48F51E008D3573 /* Stream.cpp in Sources */,
-				2689004613353E0400698AC0 /* ModuleList.cpp in Sources */,
-				AF0F459E219FA1C800C1E612 /* PdbSymUid.cpp in Sources */,
-				2689004713353E0400698AC0 /* PluginManager.cpp in Sources */,
-				AFF81FAF20D1CC400010F95E /* HostThreadMacOSX.mm in Sources */,
-				AF0C112818580CD800C4C45B /* QueueItem.cpp in Sources */,
-				AF254E31170CCC33007AE5C9 /* PlatformDarwinKernel.cpp in Sources */,
-				2689004913353E0400698AC0 /* Scalar.cpp in Sources */,
-				E414F6F121388F6C00C50BC6 /* LibCxxVariant.cpp in Sources */,
-				263FDE601A79A01500E68013 /* FormatEntity.cpp in Sources */,
-				AF8AD62E1BEC28A400150209 /* PlatformAppleTVSimulator.cpp in Sources */,
-				2689004A13353E0400698AC0 /* SearchFilter.cpp in Sources */,
-				AFF81FAE20D1CC400010F95E /* HostInfoMacOSX.mm in Sources */,
-				2689004B13353E0400698AC0 /* Section.cpp in Sources */,
-				4984BA161B979973008658D4 /* ExpressionVariable.cpp in Sources */,
-				2689004C13353E0400698AC0 /* SourceManager.cpp in Sources */,
-				2689004D13353E0400698AC0 /* State.cpp in Sources */,
-				AF5B97DB2242FC2F002D3F2C /* DWARFContext.cpp in Sources */,
-				6D99A3631BBC2F3200979793 /* ArmUnwindInfo.cpp in Sources */,
-				4984BA131B978C55008658D4 /* ClangExpressionVariable.cpp in Sources */,
-				3F81691A1ABA2419001DA9DF /* NameMatches.cpp in Sources */,
-				94B9E5121BBF20F4000A48DC /* NSString.cpp in Sources */,
-				AF0E22F018A09FB20009B7D1 /* AppleGetItemInfoHandler.cpp in Sources */,
-				2689004F13353E0400698AC0 /* StreamFile.cpp in Sources */,
-				2689005113353E0400698AC0 /* StringList.cpp in Sources */,
-				2689005213353E0400698AC0 /* Timer.cpp in Sources */,
-				2689005413353E0400698AC0 /* UserSettingsController.cpp in Sources */,
-				2619C4852107A9A2009CDE81 /* RegisterContextMinidump_ARM.cpp in Sources */,
-				23059A0719532B96007B8189 /* LinuxSignals.cpp in Sources */,
-				8CCB017E19BA28A80009FD44 /* ThreadCollection.cpp in Sources */,
-				9A77AD541E64E2760025CE04 /* RegisterInfoPOSIX_arm.cpp in Sources */,
-				2689005613353E0400698AC0 /* Value.cpp in Sources */,
-				26764CA21E48F547008D3573 /* StreamString.cpp in Sources */,
-				2689005713353E0400698AC0 /* ValueObject.cpp in Sources */,
-				3F8169321ABB7A6D001DA9DF /* SystemInitializerCommon.cpp in Sources */,
-				2689005813353E0400698AC0 /* ValueObjectChild.cpp in Sources */,
-				E7723D441AC4A7FB002BA082 /* RegisterContextPOSIXCore_arm64.cpp in Sources */,
-				2689005913353E0400698AC0 /* ValueObjectConstResult.cpp in Sources */,
-				4CCF9F612143014D006CC7EA /* BreakpointResolverScripted.cpp in Sources */,
-				2689005A13353E0400698AC0 /* ValueObjectList.cpp in Sources */,
-				492DB7EB1EC662E200B9E9AF /* Status.cpp in Sources */,
-				2689005B13353E0400698AC0 /* ValueObjectRegister.cpp in Sources */,
-				2689005C13353E0400698AC0 /* ValueObjectVariable.cpp in Sources */,
-				264A58EE1A7DBCAD00A6B1B0 /* OptionValueFormatEntity.cpp in Sources */,
-				8C2D6A53197A1EAF006989C9 /* MemoryHistory.cpp in Sources */,
-				6D95DC021B9DC057000E318A /* SymbolFileDWARFDwo.cpp in Sources */,
-				AFF81FB320D1CC910010F95E /* PlatformiOSSimulatorCoreSimulatorSupport.mm in Sources */,
-				942612F71B95000000EF842E /* LanguageCategory.cpp in Sources */,
-				AF116BEF20CF234B0071093F /* DebugNamesDWARFIndex.cpp in Sources */,
-				AF9E360C22DD3BFC000B7776 /* CPPLanguageRuntime.cpp in Sources */,
-				2689005E13353E0E00698AC0 /* ClangASTSource.cpp in Sources */,
-				AFF1273622276F1600C25726 /* LocateSymbolFile.cpp in Sources */,
-				2689005F13353E0E00698AC0 /* ClangFunctionCaller.cpp in Sources */,
-				2689006013353E0E00698AC0 /* ClangExpressionDeclMap.cpp in Sources */,
-				2689006113353E0E00698AC0 /* ClangExpressionParser.cpp in Sources */,
-				4939EA8D1BD56B6D00084382 /* REPL.cpp in Sources */,
-				2689006313353E0E00698AC0 /* ClangPersistentVariables.cpp in Sources */,
-				2689006413353E0E00698AC0 /* ClangUserExpression.cpp in Sources */,
-				4C3ADCD61810D88B00357218 /* BreakpointResolverFileRegex.cpp in Sources */,
-				2689006513353E0E00698AC0 /* ClangUtilityFunction.cpp in Sources */,
-				943BDEFE1AA7B2F800789CE8 /* LLDBAssert.cpp in Sources */,
-				26474CB418D0CB180073DEBA /* RegisterContextLinux_x86_64.cpp in Sources */,
-				2689006613353E0E00698AC0 /* DWARFExpression.cpp in Sources */,
-				4C14CEFB2057258D00DEEF94 /* ArchitecturePPC64.cpp in Sources */,
-				2689006713353E0E00698AC0 /* ASTDumper.cpp in Sources */,
-				AFC234091AF85CE100CDE8B6 /* CommandObjectLanguage.cpp in Sources */,
-				2689006813353E0E00698AC0 /* ASTResultSynthesizer.cpp in Sources */,
-				2689006913353E0E00698AC0 /* ASTStructExtractor.cpp in Sources */,
-				2689006B13353E0E00698AC0 /* IRForTarget.cpp in Sources */,
-				AF2BA6EC1A707E3400C5248A /* UriParser.cpp in Sources */,
-				2689006D13353E0E00698AC0 /* IRExecutionUnit.cpp in Sources */,
-				304B2E461CAAA57B007829FE /* ClangUtil.cpp in Sources */,
-				2647B64421C43BB000A81D15 /* LinuxProcMaps.cpp in Sources */,
-				2689006E13353E1A00698AC0 /* File.cpp in Sources */,
-				2689006F13353E1A00698AC0 /* FileSpec.cpp in Sources */,
-				AF6CA6661FBBAF28005A0DC3 /* ArchSpec.cpp in Sources */,
-				2689007113353E1A00698AC0 /* Host.cpp in Sources */,
-				2635879417822FC2004C30BA /* SymbolVendorELF.cpp in Sources */,
-				25420ED21A649D88009ADBCB /* PipeBase.cpp in Sources */,
-				AF20F7661AF18F8500751A6E /* ABISysV_arm.cpp in Sources */,
-				2654A6801E54D59400DA1013 /* ModuleCache.cpp in Sources */,
-				949EEDAF1BA76729008C63CF /* NSArray.cpp in Sources */,
-				942612F81B952C9B00EF842E /* ObjCLanguage.cpp in Sources */,
-				26474CBC18D0CB2D0073DEBA /* RegisterContextMach_arm.cpp in Sources */,
-				2689007413353E1A00698AC0 /* Terminal.cpp in Sources */,
-				2689007613353E1A00698AC0 /* CFCBundle.cpp in Sources */,
-				9A0FDEA71E8EF5110086B2F5 /* RegisterContextLinux_mips.cpp in Sources */,
-				94BA8B70176F97CE005A91B5 /* CommandHistory.cpp in Sources */,
-				2689007713353E1A00698AC0 /* CFCData.cpp in Sources */,
-				AFC67B151FBBB03600860ECB /* LibCxxBitset.cpp in Sources */,
-				2689007813353E1A00698AC0 /* CFCMutableArray.cpp in Sources */,
-				9418EBCD1AA910910058B02E /* VectorType.cpp in Sources */,
-				4C4EB7811E6A4DCC002035C0 /* DumpDataExtractor.cpp in Sources */,
-				4CE4EFB31E899A3400A80C06 /* RegisterContextOpenBSD_i386.cpp in Sources */,
-				2689007913353E1A00698AC0 /* CFCMutableDictionary.cpp in Sources */,
-				2689007A13353E1A00698AC0 /* CFCMutableSet.cpp in Sources */,
-				26764C971E48F482008D3573 /* ConstString.cpp in Sources */,
-				2689007B13353E1A00698AC0 /* CFCString.cpp in Sources */,
-				2689007D13353E2200698AC0 /* Args.cpp in Sources */,
-				2689007F13353E2200698AC0 /* CommandCompletions.cpp in Sources */,
-				945261C41B9A11FC00BF138D /* LibCxxUnorderedMap.cpp in Sources */,
-				26CEB5F218762056008F575A /* CommandObjectGUI.cpp in Sources */,
-				AF3A4AD21EA05C4700B5DEB4 /* PlatformRemoteDarwinDevice.cpp in Sources */,
-				D67521381EA17C4200439694 /* MainLoop.cpp in Sources */,
-				2689008013353E2200698AC0 /* CommandInterpreter.cpp in Sources */,
-				AF77E0A41A033D360096C0EA /* RegisterContextPOSIX_powerpc.cpp in Sources */,
-				4CDB8D6D1DBA91B6006C5B13 /* LibStdcppUniquePointer.cpp in Sources */,
-				AFC3068122276F62002675EA /* LocateSymbolFileMacOSX.cpp in Sources */,
-				49CA96FC1E6AACC900C03FEE /* DataBufferHeap.cpp in Sources */,
-				AF9B8F33182DB52900DA866F /* SystemRuntimeMacOSX.cpp in Sources */,
-				9447DE431BD5963300E67212 /* DumpValueObjectOptions.cpp in Sources */,
-				2689008113353E2200698AC0 /* CommandObject.cpp in Sources */,
-				3F8160A61AB9F7DD001DA9DF /* Logging.cpp in Sources */,
-				26BF51F61B3C754400016294 /* ABISysV_i386.cpp in Sources */,
-				2689008313353E2200698AC0 /* CommandObjectMultiword.cpp in Sources */,
-				2689008413353E2200698AC0 /* CommandObjectRegexCommand.cpp in Sources */,
-				2689008513353E2200698AC0 /* CommandReturnObject.cpp in Sources */,
-				6D95DC001B9DC057000E318A /* DIERef.cpp in Sources */,
-				AF27AD551D3603EA00CF2833 /* DynamicLoaderDarwin.cpp in Sources */,
-				3FDFE53519A29327009756A7 /* HostInfoBase.cpp in Sources */,
-				26474CBE18D0CB2D0073DEBA /* RegisterContextMach_i386.cpp in Sources */,
-				2689008613353E2200698AC0 /* Options.cpp in Sources */,
-				9428BC2C1C6E64E4002A24D7 /* LibCxxAtomic.cpp in Sources */,
-				2689008713353E2200698AC0 /* ScriptInterpreter.cpp in Sources */,
-				260A63191861009E00FECF8E /* IOHandler.cpp in Sources */,
-				2689008D13353E4200698AC0 /* DynamicLoaderMacOSXDYLD.cpp in Sources */,
-				2689008E13353E4200698AC0 /* DynamicLoaderStatic.cpp in Sources */,
-				2689009613353E4200698AC0 /* ObjectContainerBSDArchive.cpp in Sources */,
-				49CA96FF1E6AACC900C03FEE /* DataExtractor.cpp in Sources */,
-				2579065D1BD0488100178368 /* UDPSocket.cpp in Sources */,
-				26BC179A18C7F2B300D2196D /* JITLoaderList.cpp in Sources */,
-				23D065901D4A7BEE0008EDE6 /* RenderScriptRuntime.cpp in Sources */,
-				2689009713353E4200698AC0 /* ObjectContainerUniversalMachO.cpp in Sources */,
-				2689009813353E4200698AC0 /* ELFHeader.cpp in Sources */,
-				2689009913353E4200698AC0 /* ObjectFileELF.cpp in Sources */,
-				2689009A13353E4200698AC0 /* ObjectFileMachO.cpp in Sources */,
-				2689009B13353E4200698AC0 /* PlatformMacOSX.cpp in Sources */,
-				2689009C13353E4200698AC0 /* PlatformRemoteiOS.cpp in Sources */,
-				2689009D13353E4200698AC0 /* GDBRemoteCommunication.cpp in Sources */,
-				2689009E13353E4200698AC0 /* GDBRemoteRegisterContext.cpp in Sources */,
-				9694FA711B32AA64005EBB16 /* ABISysV_mips.cpp in Sources */,
-				2689009F13353E4200698AC0 /* ProcessGDBRemote.cpp in Sources */,
-				268900A013353E4200698AC0 /* ProcessGDBRemoteLog.cpp in Sources */,
-				AF9FF1F71FAA79FE00474976 /* LibCxxQueue.cpp in Sources */,
-				268900A113353E4200698AC0 /* ThreadGDBRemote.cpp in Sources */,
-				AFE228832060699D0042D0C8 /* DWARFUnit.cpp in Sources */,
-				AEEA34051AC88A7400AB639D /* TypeSystem.cpp in Sources */,
-				AF1729D6182C907200E0AB97 /* HistoryThread.cpp in Sources */,
-				2647B63221C4366300A81D15 /* ArchitectureMips.cpp in Sources */,
-				268900AF13353E5000698AC0 /* UnwindLLDB.cpp in Sources */,
-				268900B013353E5000698AC0 /* RegisterContextLLDB.cpp in Sources */,
-				23E2E5451D904913006F38BB /* MinidumpTypes.cpp in Sources */,
-				AF33B4BE1C1FA441001B28D9 /* NetBSDSignals.cpp in Sources */,
-				AF1675A922CC1A3C00DC40ED /* DeclVendor.cpp in Sources */,
-				949EEDA31BA76577008C63CF /* Cocoa.cpp in Sources */,
-				AFD966BB217140B6006714AC /* SymbolFileNativePDB.cpp in Sources */,
-				AFCB1D59219CD4FD00730AD5 /* GDBRemoteCommunicationReplayServer.cpp in Sources */,
-				3FDFE56C19AF9C44009756A7 /* HostProcessPosix.cpp in Sources */,
-				268900B413353E5000698AC0 /* RegisterContextMacOSXFrameBackchain.cpp in Sources */,
-				6B74D89B200696BB0074051B /* Environment.cpp in Sources */,
-				3F8169311ABB7A6D001DA9DF /* SystemInitializer.cpp in Sources */,
-				949EEDB21BA76731008C63CF /* NSIndexPath.cpp in Sources */,
-				3FDFED2D19C257A0009756A7 /* HostProcess.cpp in Sources */,
-				268900B513353E5000698AC0 /* StopInfoMachException.cpp in Sources */,
-				268900B613353E5000698AC0 /* UnwindMacOSXFrameBackchain.cpp in Sources */,
-				4CE4EFB41E899A4000A80C06 /* RegisterContextOpenBSD_x86_64.cpp in Sources */,
-				268900B713353E5F00698AC0 /* DWARFAbbreviationDeclaration.cpp in Sources */,
-				AFD966B8217140B6006714AC /* CompileUnitIndex.cpp in Sources */,
-				268900B813353E5F00698AC0 /* DWARFCompileUnit.cpp in Sources */,
-				268900B913353E5F00698AC0 /* DWARFDebugAbbrev.cpp in Sources */,
-				AF8AD945219CD45800614785 /* GDBRemoteCommunicationHistory.cpp in Sources */,
-				949EEDB31BA76736008C63CF /* NSSet.cpp in Sources */,
-				268900BA13353E5F00698AC0 /* DWARFDebugAranges.cpp in Sources */,
-				268900BB13353E5F00698AC0 /* DWARFDebugArangeSet.cpp in Sources */,
-				268900BC13353E5F00698AC0 /* DWARFDebugInfo.cpp in Sources */,
-				268900BD13353E5F00698AC0 /* DWARFDebugInfoEntry.cpp in Sources */,
-				AF663250216EB9C300BB510D /* PlatformRemoteAppleBridge.cpp in Sources */,
-				268900BE13353E5F00698AC0 /* DWARFDebugLine.cpp in Sources */,
-				268900C313353E5F00698AC0 /* DWARFDebugRanges.cpp in Sources */,
-				25EF23781AC09B3700908DF0 /* AdbClient.cpp in Sources */,
-				238F2BA81D2C85FA001FF92A /* StructuredDataDarwinLog.cpp in Sources */,
-				94380B8219940B0A00BFE4A8 /* StringLexer.cpp in Sources */,
-				268900C413353E5F00698AC0 /* DWARFDefines.cpp in Sources */,
-				268900C613353E5F00698AC0 /* DWARFFormValue.cpp in Sources */,
-				3FDFE53119A292F0009756A7 /* HostInfoPosix.cpp in Sources */,
-				26BC17B118C7F4CB00D2196D /* ThreadElfCore.cpp in Sources */,
-				947CF7771DC7B20D00EF980B /* ThreadMinidump.cpp in Sources */,
-				268900C913353E5F00698AC0 /* NameToDIE.cpp in Sources */,
-				268900CA13353E5F00698AC0 /* SymbolFileDWARF.cpp in Sources */,
-				4CAA19E61F5A40040099E692 /* BreakpointName.cpp in Sources */,
-				268900CB13353E5F00698AC0 /* LogChannelDWARF.cpp in Sources */,
-				268900CC13353E5F00698AC0 /* SymbolFileDWARFDebugMap.cpp in Sources */,
-				268900CD13353E5F00698AC0 /* UniqueDWARFASTType.cpp in Sources */,
-				944372DC171F6B4300E57C32 /* RegisterContextDummy.cpp in Sources */,
-				4C88BC2D1BA391B000AA0964 /* UserExpression.cpp in Sources */,
-				49E4F66B1C9CAD16008487EA /* DiagnosticManager.cpp in Sources */,
-				268900CE13353E5F00698AC0 /* SymbolFileSymtab.cpp in Sources */,
-				266E82971B8CE3AC008FCA06 /* DWARFDIE.cpp in Sources */,
-				268900CF13353E5F00698AC0 /* SymbolVendorMacOSX.cpp in Sources */,
-				268900D013353E6F00698AC0 /* Block.cpp in Sources */,
-				268900D113353E6F00698AC0 /* ClangASTContext.cpp in Sources */,
-				265192C61BA8E905002F08F6 /* CompilerDecl.cpp in Sources */,
-				9AD9449F1E8DB26C004796ED /* RegisterContextNetBSD_x86_64.cpp in Sources */,
-				268900D213353E6F00698AC0 /* CompilerType.cpp in Sources */,
-				945261C11B9A11FC00BF138D /* LibCxxInitializerList.cpp in Sources */,
-				268900D313353E6F00698AC0 /* ClangExternalASTSourceCallbacks.cpp in Sources */,
-				268900D513353E6F00698AC0 /* CompileUnit.cpp in Sources */,
-				AFCB1D5C219CD5A800730AD5 /* CommandObjectReproducer.cpp in Sources */,
-				268900D613353E6F00698AC0 /* Declaration.cpp in Sources */,
-				2579065C1BD0488100178368 /* TCPSocket.cpp in Sources */,
-				268900D713353E6F00698AC0 /* DWARFCallFrameInfo.cpp in Sources */,
-				26C7C4831BFFEA7E009BD01F /* WindowsMiniDump.cpp in Sources */,
-				49CA96FD1E6AACC900C03FEE /* DataBufferLLVM.cpp in Sources */,
-				268900D813353E6F00698AC0 /* Function.cpp in Sources */,
-				268900D913353E6F00698AC0 /* FuncUnwinders.cpp in Sources */,
-				268900DA13353E6F00698AC0 /* LineEntry.cpp in Sources */,
-				268900DB13353E6F00698AC0 /* LineTable.cpp in Sources */,
-				AF7BD81B22B04E20008E78D1 /* AuxVector.cpp in Sources */,
-				268900DC13353E6F00698AC0 /* ObjectFile.cpp in Sources */,
-				268900DD13353E6F00698AC0 /* Symbol.cpp in Sources */,
-				AF26703A1852D01E00B6CC36 /* Queue.cpp in Sources */,
-				4C7D48241F5099A1005314B4 /* SymbolFileDWARFDwp.cpp in Sources */,
-				949EEDAE1BA7671C008C63CF /* CF.cpp in Sources */,
-				268900DE13353E6F00698AC0 /* SymbolContext.cpp in Sources */,
-				49CA97001E6AACC900C03FEE /* UUID.cpp in Sources */,
-				268900DF13353E6F00698AC0 /* SymbolFile.cpp in Sources */,
-				268900E013353E6F00698AC0 /* SymbolVendor.cpp in Sources */,
-				268900E113353E6F00698AC0 /* Symtab.cpp in Sources */,
-				268900E213353E6F00698AC0 /* Type.cpp in Sources */,
-				AFC2DCF61E6E316A00283714 /* StreamCallback.cpp in Sources */,
-				945261C51B9A11FC00BF138D /* LibCxxVector.cpp in Sources */,
-				3FDFED2719BA6D96009756A7 /* HostNativeThreadBase.cpp in Sources */,
-				268900E313353E6F00698AC0 /* TypeList.cpp in Sources */,
-				2647B63E21C436BD00A81D15 /* Listener.cpp in Sources */,
-				268900E413353E6F00698AC0 /* UnwindPlan.cpp in Sources */,
-				268900E513353E6F00698AC0 /* UnwindTable.cpp in Sources */,
-				AFF8FF0C1E779D4B003830EF /* TildeExpressionResolver.cpp in Sources */,
-				268900E613353E6F00698AC0 /* Variable.cpp in Sources */,
-				268900E713353E6F00698AC0 /* VariableList.cpp in Sources */,
-				257906641BD5AFD000178368 /* Acceptor.cpp in Sources */,
-				268900E813353E6F00698AC0 /* ABI.cpp in Sources */,
-				4C56543119D1EFAA002E9C44 /* ThreadPlanPython.cpp in Sources */,
-				26AB92121819D74600E63F3E /* DWARFDataExtractor.cpp in Sources */,
-				4CD44D4220B777850003557C /* DWARFBaseDIE.cpp in Sources */,
-				9485545A1DCBAE3B00345FF5 /* RenderScriptScriptGroup.cpp in Sources */,
-				268900EA13353E6F00698AC0 /* DynamicLoader.cpp in Sources */,
-				945261BF1B9A11FC00BF138D /* CxxStringTypes.cpp in Sources */,
-				268900EB13353E6F00698AC0 /* ExecutionContext.cpp in Sources */,
-				268900EC13353E6F00698AC0 /* LanguageRuntime.cpp in Sources */,
-				268900ED13353E6F00698AC0 /* ObjCLanguageRuntime.cpp in Sources */,
-				268900EE13353E6F00698AC0 /* PathMappingList.cpp in Sources */,
-				4C2479BD1BA39295009C9A7B /* FunctionCaller.cpp in Sources */,
-				AF2907BF1D3F082400E10654 /* DynamicLoaderMacOS.cpp in Sources */,
-				AFCB1D5F219CD5EA00730AD5 /* Reproducer.cpp in Sources */,
-				268900EF13353E6F00698AC0 /* Platform.cpp in Sources */,
-				268900F013353E6F00698AC0 /* Process.cpp in Sources */,
-				26BC17AD18C7F4CB00D2196D /* RegisterContextPOSIXCore_mips64.cpp in Sources */,
-				268900F113353E6F00698AC0 /* RegisterContext.cpp in Sources */,
-				6D55BAED1A8CD0A800A70529 /* PlatformAndroid.cpp in Sources */,
-				268900F213353E6F00698AC0 /* SectionLoadList.cpp in Sources */,
-				268900F313353E6F00698AC0 /* StackFrame.cpp in Sources */,
-				268900F413353E6F00698AC0 /* StackFrameList.cpp in Sources */,
-				8CF46A6220522A9800423DDF /* StackFrameRecognizer.cpp in Sources */,
-				268900F513353E6F00698AC0 /* StackID.cpp in Sources */,
-				228B1B672113340200E61C70 /* ClangHighlighter.cpp in Sources */,
-				268900F613353E6F00698AC0 /* StopInfo.cpp in Sources */,
-				256CBDB41ADD0EFD00BC6CDC /* RegisterContextPOSIXCore_arm.cpp in Sources */,
-				267F684F1CC02E270086832B /* RegisterContextPOSIXCore_s390x.cpp in Sources */,
-				268900F713353E6F00698AC0 /* Target.cpp in Sources */,
-				268900F813353E6F00698AC0 /* TargetList.cpp in Sources */,
-				268900F913353E6F00698AC0 /* Thread.cpp in Sources */,
-				268900FA13353E6F00698AC0 /* ThreadList.cpp in Sources */,
-				268900FB13353E6F00698AC0 /* ThreadPlan.cpp in Sources */,
-				4CD44CFD20B37C440003557C /* AppleDWARFIndex.cpp in Sources */,
-				256CBDBC1ADD107200BC6CDC /* RegisterContextLinux_mips64.cpp in Sources */,
-				26BF51F31B3C754400016294 /* ABISysV_hexagon.cpp in Sources */,
-				232CB619191E00CD00EF39FC /* NativeProcessProtocol.cpp in Sources */,
-				8CF02AEF19DD16B100B14BE0 /* InstrumentationRuntimeStopInfo.cpp in Sources */,
-				58A080B42112AB3800D5580F /* Highlighter.cpp in Sources */,
-				268900FC13353E6F00698AC0 /* ThreadPlanBase.cpp in Sources */,
-				268900FD13353E6F00698AC0 /* ThreadPlanCallFunction.cpp in Sources */,
-				23D4007D1C2101F2000C3885 /* DWARFDebugMacro.cpp in Sources */,
-				94B6385D1B8FB178004FE1E4 /* CPlusPlusLanguage.cpp in Sources */,
-				AF9FF1F51FAA79A400474976 /* LibCxxTuple.cpp in Sources */,
-				268900FE13353E6F00698AC0 /* ThreadPlanCallUserExpression.cpp in Sources */,
-				268900FF13353E6F00698AC0 /* ThreadPlanShouldStopHere.cpp in Sources */,
-				2579065F1BD0488D00178368 /* DomainSocket.cpp in Sources */,
-				2689010013353E6F00698AC0 /* ThreadPlanStepInstruction.cpp in Sources */,
-				232CB61B191E00CD00EF39FC /* NativeThreadProtocol.cpp in Sources */,
-				4CD44CFB20B37C440003557C /* DWARFIndex.cpp in Sources */,
-				2689010113353E6F00698AC0 /* ThreadPlanStepOut.cpp in Sources */,
-				4CAEC6A821F26D15007C3DD5 /* BreakpadRecords.cpp in Sources */,
-				2689010213353E6F00698AC0 /* ThreadPlanStepOverBreakpoint.cpp in Sources */,
-				3FDFED2919BA6D96009756A7 /* ThreadLauncher.cpp in Sources */,
-				4C719395207D235400FDF430 /* OptionArgParser.cpp in Sources */,
-				942829561A89614C00521B30 /* JSON.cpp in Sources */,
-				267F68531CC02E920086832B /* RegisterContextLinux_s390x.cpp in Sources */,
-				2689010313353E6F00698AC0 /* ThreadPlanStepRange.cpp in Sources */,
-				2689010413353E6F00698AC0 /* ThreadPlanStepInRange.cpp in Sources */,
-				2689010513353E6F00698AC0 /* ThreadPlanStepOverRange.cpp in Sources */,
-				3FDFE56D19AF9C44009756A7 /* HostThreadPosix.cpp in Sources */,
-				4CA9D1401FCE07CD00300E18 /* RegisterUtilities.cpp in Sources */,
-				AF235EB51FBE7858009C5541 /* RegisterInfoPOSIX_ppc64le.cpp in Sources */,
-				2689010613353E6F00698AC0 /* ThreadPlanRunToAddress.cpp in Sources */,
-				2689010713353E6F00698AC0 /* ThreadPlanStepThrough.cpp in Sources */,
-				2689010813353E6F00698AC0 /* ThreadPlanStepUntil.cpp in Sources */,
-				2689010A13353E6F00698AC0 /* ThreadPlanTracer.cpp in Sources */,
-				AF37E10A17C861F20061E18E /* ProcessRunLock.cpp in Sources */,
-				26474CAA18D0CB070073DEBA /* RegisterContextFreeBSD_mips64.cpp in Sources */,
-				94A5B3971AB9FE8D00A5EE7F /* EmulateInstructionMIPS64.cpp in Sources */,
-				256CBDC01ADD11C000BC6CDC /* RegisterContextPOSIX_arm.cpp in Sources */,
-				26CA97A1172B1FD5005DC71B /* RegisterContextThreadMemory.cpp in Sources */,
-				DD8F277F22011CD8004ED75B /* FileCollector.cpp in Sources */,
-				2689010B13353E6F00698AC0 /* ThreadSpec.cpp in Sources */,
-				2689010C13353E6F00698AC0 /* UnixSignals.cpp in Sources */,
-				2689011013353E8200698AC0 /* SharingPtr.cpp in Sources */,
-				2689011113353E8200698AC0 /* StringExtractor.cpp in Sources */,
-				2689011213353E8200698AC0 /* StringExtractorGDBRemote.cpp in Sources */,
-				E7723D4C1AC4A944002BA082 /* RegisterContextPOSIX_arm64.cpp in Sources */,
-				26BC17AB18C7F4CB00D2196D /* ProcessElfCore.cpp in Sources */,
-				AF1F7B07189C904B0087DB9C /* AppleGetPendingItemsHandler.cpp in Sources */,
-				E778E9A21B062D1700247609 /* EmulateInstructionMIPS.cpp in Sources */,
-				3FDFDDC6199D37ED009756A7 /* FileSystem.cpp in Sources */,
-				26744EF11338317700EF765A /* GDBRemoteCommunicationClient.cpp in Sources */,
-				26744EF31338317700EF765A /* GDBRemoteCommunicationServer.cpp in Sources */,
-				264A97BF133918BC0017F0BE /* PlatformRemoteGDBServer.cpp in Sources */,
-				EB8375E71B553DE800BA907D /* ThreadPlanCallFunctionUsingABI.cpp in Sources */,
-				2654A6831E54D5E200DA1013 /* RegisterNumber.cpp in Sources */,
-				6D95DC011B9DC057000E318A /* HashedNameToDIE.cpp in Sources */,
-				2697A54D133A6305004E4240 /* PlatformDarwin.cpp in Sources */,
-				23D065911D4A7BEE0008EDE6 /* RenderScriptx86ABIFixups.cpp in Sources */,
-				4CE4EFAA1E8999B900A80C06 /* PlatformOpenBSD.cpp in Sources */,
-				26651A18133BF9E0005B64B7 /* Opcode.cpp in Sources */,
-				4CABA9E0134A8BCD00539BDD /* ValueObjectMemory.cpp in Sources */,
-				4CD0BD0F134BFADF00CB44D4 /* ValueObjectDynamicValue.cpp in Sources */,
-				946216C21A97C080006E19CC /* OptionValueLanguage.cpp in Sources */,
-				AF45FDE518A1F3AC0007051C /* AppleGetThreadItemInfoHandler.cpp in Sources */,
-				2377C2F819E613C100737875 /* PipePosix.cpp in Sources */,
-				23E2E5441D904913006F38BB /* MinidumpParser.cpp in Sources */,
-				AF77E0931A033C7F0096C0EA /* ABISysV_ppc64.cpp in Sources */,
-				26D5E15F135BAEA2006EA0A7 /* OptionGroupArchitecture.cpp in Sources */,
-				26D5E163135BB054006EA0A7 /* OptionGroupPlatform.cpp in Sources */,
-				94CD131A19BA33B400DB7BED /* TypeValidator.cpp in Sources */,
-				26BD407F135D2AE000237D80 /* FileLineResolver.cpp in Sources */,
-				230EC45B1D63C3BA008DF59F /* ThreadPlanCallOnFunctionExit.cpp in Sources */,
-				26A7A035135E6E4200FB369E /* OptionValue.cpp in Sources */,
-				9A22A161135E30370024DDC3 /* EmulateInstructionARM.cpp in Sources */,
-				AFDFDFD119E34D3400EAE509 /* ConnectionFileDescriptorPosix.cpp in Sources */,
-				3FBA69ED1B60674B0008F44A /* ScriptInterpreterPython.cpp in Sources */,
-				9A22A163135E30370024DDC3 /* EmulationStateARM.cpp in Sources */,
-				9A4F35101368A51A00823F52 /* StreamAsynchronousIO.cpp in Sources */,
-				AF1D88691B575E8D003CB899 /* ValueObjectConstResultCast.cpp in Sources */,
-				2692BA15136610C100F9E14D /* UnwindAssemblyInstEmulation.cpp in Sources */,
-				263E949F13661AEA00E7D1CE /* UnwindAssembly-x86.cpp in Sources */,
-				AFA585D02107EB7400D7689A /* DumpRegisterValue.cpp in Sources */,
-				264D8D5013661BD7003A368F /* UnwindAssembly.cpp in Sources */,
-				AF23B4DB19009C66003E2A58 /* FreeBSDSignals.cpp in Sources */,
-				945261C61B9A11FC00BF138D /* LibStdcpp.cpp in Sources */,
-				AF061F87182C97ED00B6A19C /* RegisterContextHistory.cpp in Sources */,
-				AF26703B1852D01E00B6CC36 /* QueueList.cpp in Sources */,
-				267C012B136880DF006E963E /* OptionGroupValueObjectDisplay.cpp in Sources */,
-				49CA96FE1E6AACC900C03FEE /* DataEncoder.cpp in Sources */,
-				E4A63A9120F55D28000D9548 /* LibCxxOptional.cpp in Sources */,
-				26BCFC521368AE38006DC050 /* OptionGroupFormat.cpp in Sources */,
-				2654A6901E552ED500DA1013 /* VASprintf.cpp in Sources */,
-				AF81DEFA1828A23F0042CF19 /* SystemRuntime.cpp in Sources */,
-				267C01371368C49C006E963E /* OptionGroupOutputFile.cpp in Sources */,
-				260E07C6136FA69E00CF21D3 /* OptionGroupUUID.cpp in Sources */,
-				AFC2DCF91E6E318000283714 /* StreamGDBRemote.cpp in Sources */,
-				260E07C8136FAB9200CF21D3 /* OptionGroupFile.cpp in Sources */,
-				2686536C1370ACB200D186A3 /* OptionGroupBoolean.cpp in Sources */,
-				268653701370AE7200D186A3 /* OptionGroupUInt64.cpp in Sources */,
-				264A12FC1372522000875C42 /* EmulateInstructionARM64.cpp in Sources */,
-				26DB3E161379E7AD0080DC73 /* ABIMacOSX_arm.cpp in Sources */,
-				26DB3E191379E7AD0080DC73 /* ABIMacOSX_arm64.cpp in Sources */,
-				2374D7531D4BB2FF005C9575 /* GDBRemoteClientBase.cpp in Sources */,
-				8C2D6A5E197A250F006989C9 /* MemoryHistoryASan.cpp in Sources */,
-				26F006561B4DD86700B872E5 /* DynamicLoaderWindowsDYLD.cpp in Sources */,
-				26DB3E1C1379E7AD0080DC73 /* ABIMacOSX_i386.cpp in Sources */,
-				26DB3E1F1379E7AD0080DC73 /* ABISysV_x86_64.cpp in Sources */,
-				26A69C5F137A17A500262477 /* RegisterValue.cpp in Sources */,
-				2690B3711381D5C300ECFBAE /* Memory.cpp in Sources */,
-				4C562CC71CC07DF700C52EAC /* PDBASTParser.cpp in Sources */,
-				B28058A1139988B0002D96D0 /* InferiorCallPOSIX.cpp in Sources */,
-				AF20F76A1AF18F9000751A6E /* ABISysV_arm64.cpp in Sources */,
-				4CCA644D13B40B82003BDF98 /* ItaniumABILanguageRuntime.cpp in Sources */,
-				4CCA645013B40B82003BDF98 /* AppleObjCRuntime.cpp in Sources */,
-				4CCA645213B40B82003BDF98 /* AppleObjCRuntimeV1.cpp in Sources */,
-				4CCA645413B40B82003BDF98 /* AppleObjCRuntimeV2.cpp in Sources */,
-				4CCA645613B40B82003BDF98 /* AppleObjCTrampolineHandler.cpp in Sources */,
-				4CCA645813B40B82003BDF98 /* AppleThreadPlanStepThroughObjCTrampoline.cpp in Sources */,
-				9463D4CD13B1798800C230D4 /* CommandObjectType.cpp in Sources */,
-				49D8FB3913B5598F00411094 /* ClangASTImporter.cpp in Sources */,
-				26ED3D6D13C563810017D45E /* OptionGroupVariable.cpp in Sources */,
-				2647B63C21C436B400A81D15 /* Event.cpp in Sources */,
-				2642FBAE13D003B400ED6808 /* CommunicationKDP.cpp in Sources */,
-				2642FBB013D003B400ED6808 /* ProcessKDP.cpp in Sources */,
-				23D4007E1C210201000C3885 /* DebugMacros.cpp in Sources */,
-				8C26C4261C3EA5F90031DF7C /* TSanRuntime.cpp in Sources */,
-				947CF7711DC7B1EE00EF980B /* ProcessMinidump.cpp in Sources */,
-				2642FBB213D003B400ED6808 /* ProcessKDPLog.cpp in Sources */,
-				263641191B34AEE200145B2F /* ABISysV_mips64.cpp in Sources */,
-				26957D9813D381C900670048 /* RegisterContextDarwin_arm.cpp in Sources */,
-				4C38996421B9AECD002BAEF4 /* DWARFLocationExpression.cpp in Sources */,
-				26957D9A13D381C900670048 /* RegisterContextDarwin_i386.cpp in Sources */,
-				26957D9C13D381C900670048 /* RegisterContextDarwin_x86_64.cpp in Sources */,
-				94CD7D0919A3FBA300908B7C /* AppleObjCClassDescriptorV2.cpp in Sources */,
-				945261C31B9A11FC00BF138D /* LibCxxMap.cpp in Sources */,
-				4C7D48251F5099B2005314B4 /* SymbolFileDWARFDwoDwp.cpp in Sources */,
-				265205A813D3E3F700132FE2 /* RegisterContextKDP_arm.cpp in Sources */,
-				265205AA13D3E3F700132FE2 /* RegisterContextKDP_i386.cpp in Sources */,
-				6DEC6F391BD66D750091ABA6 /* TaskPool.cpp in Sources */,
-				265205AC13D3E3F700132FE2 /* RegisterContextKDP_x86_64.cpp in Sources */,
-				AFF81FB020D1CC400010F95E /* Host.mm in Sources */,
-				2628A4D513D4977900F5487A /* ThreadKDP.cpp in Sources */,
-				26D7E45D13D5E30A007FD12B /* SocketAddress.cpp in Sources */,
-				94CD7D0C19A3FBCE00908B7C /* AppleObjCTypeEncodingParser.cpp in Sources */,
-				94B6E76213D88365005F417F /* ValueObjectSyntheticFilter.cpp in Sources */,
-				267A47FF1B1411D90021A5BC /* NativeWatchpointList.cpp in Sources */,
-				26F4A21C13FBA31A0064B613 /* ThreadMemory.cpp in Sources */,
-				3FBA69E11B6067120008F44A /* ScriptInterpreterNone.cpp in Sources */,
-				AF9113FD1FBE78EA004320CD /* RegisterContextPOSIXCore_ppc64le.cpp in Sources */,
-				266DFE9713FD656E00D0C574 /* OperatingSystem.cpp in Sources */,
-				AF97744721E9947E006876A7 /* SymbolFileBreakpad.cpp in Sources */,
-				AF8AD6391BEC28C400150209 /* PlatformRemoteAppleWatch.cpp in Sources */,
-				26954EBE1401EE8B00294D09 /* DynamicRegisterInfo.cpp in Sources */,
-				6D9AB3DD1BB2B74E003F2289 /* TypeMap.cpp in Sources */,
-				255EFF761AFABA950069F277 /* LockFilePosix.cpp in Sources */,
-				54067BF11DF2041B00749AA5 /* UBSanRuntime.cpp in Sources */,
-				3FBA69EC1B6067430008F44A /* PythonDataObjects.cpp in Sources */,
-				26274FA714030F79006BA130 /* DynamicLoaderDarwinKernel.cpp in Sources */,
-				94FA3DE01405D50400833217 /* ValueObjectConstResultChild.cpp in Sources */,
-				58EC744120EAEB5200695209 /* CompletionRequest.cpp in Sources */,
-				3FDFED2819BA6D96009756A7 /* HostThread.cpp in Sources */,
-				949ADF031406F648004833E1 /* ValueObjectConstResultImpl.cpp in Sources */,
-				DD6C13BB220A6F22005C2AE8 /* ReproducerInstrumentation.cpp in Sources */,
-				B27318421416AC12006039C8 /* WatchpointList.cpp in Sources */,
-				26CFDCA3186163A4000E63E5 /* Editline.cpp in Sources */,
-				26E152261419CAD4007967D0 /* ObjectFilePECOFF.cpp in Sources */,
-				B2462247141AD37D00F3D409 /* OptionGroupWatchpoint.cpp in Sources */,
-				94B638631B8FB7F1004FE1E4 /* ObjCPlusPlusLanguage.cpp in Sources */,
-				49DEF1251CD7C6DF006A7C7D /* BlockPointer.cpp in Sources */,
-				AFB6B9ED2065BBE90047661E /* CommandObjectStats.cpp in Sources */,
-				49A71FE7141FFA5C00D59478 /* IRInterpreter.cpp in Sources */,
-				23DDF226196C3EE600BB8417 /* CommandOptionValidators.cpp in Sources */,
-				B207C4931429607D00F36E4E /* CommandObjectWatchpoint.cpp in Sources */,
-				26EFC4CD18CFAF0D00865D87 /* ObjectFileJIT.cpp in Sources */,
-				494260DA14579144003C1C78 /* VerifyDecl.cpp in Sources */,
-				2657AFB71B86910100958979 /* CompilerDeclContext.cpp in Sources */,
-				49DA65031485C92A005FF180 /* AppleObjCDeclVendor.cpp in Sources */,
-				4966DCC4148978A10028481B /* ClangExternalASTSourceCommon.cpp in Sources */,
-				26A527C114E24F5F00F3A14A /* ProcessMachCore.cpp in Sources */,
-				26A527C314E24F5F00F3A14A /* ThreadMachCore.cpp in Sources */,
-				B299580B14F2FA1400050A04 /* DisassemblerLLVMC.cpp in Sources */,
-				26B7564E14F89356008D9CB3 /* PlatformiOSSimulator.cpp in Sources */,
-				26FFC19B14FC072100087D58 /* DYLDRendezvous.cpp in Sources */,
-				AF0F6E501739A76D009180FE /* RegisterContextKDP_arm64.cpp in Sources */,
-				26FFC19D14FC072100087D58 /* DynamicLoaderPOSIXDYLD.cpp in Sources */,
-				2694E99D14FC0BB30076DE67 /* PlatformFreeBSD.cpp in Sources */,
-				2694E9A414FC0BBD0076DE67 /* PlatformLinux.cpp in Sources */,
-				AFC2DCEB1E6E2F7D00283714 /* UserID.cpp in Sources */,
-				94D0858C1B9675B8000D24BD /* FormattersHelpers.cpp in Sources */,
-				945759671534941F005A9070 /* PlatformPOSIX.cpp in Sources */,
-				26B1EFAE154638AF00E2DAC7 /* DWARFDeclContext.cpp in Sources */,
-				23D0658F1D4A7BEE0008EDE6 /* RenderScriptExpressionOpts.cpp in Sources */,
-				945215DF17F639EE00521C0B /* ValueObjectPrinter.cpp in Sources */,
-				26EFB61B1BFE8D3E00544801 /* PlatformNetBSD.cpp in Sources */,
-				AFD65C811D9B5B2E00D93120 /* RegisterContextMinidump_x86_64.cpp in Sources */,
-				260CC64815D0440D002BF2E0 /* OptionValueArgs.cpp in Sources */,
-				260CC64915D0440D002BF2E0 /* OptionValueArray.cpp in Sources */,
-				260CC64A15D0440D002BF2E0 /* OptionValueBoolean.cpp in Sources */,
-				260CC64B15D0440D002BF2E0 /* OptionValueProperties.cpp in Sources */,
-				9455630F1BEAD0600073F75F /* PlatformAppleSimulator.cpp in Sources */,
-				6D86CEA01B440F8500A7FBFA /* CommandObjectBugreport.cpp in Sources */,
-				260CC64C15D0440D002BF2E0 /* OptionValueDictionary.cpp in Sources */,
-				49DCF6FE170E6B4A0092F75E /* IRMemoryMap.cpp in Sources */,
-				260CC64D15D0440D002BF2E0 /* OptionValueEnumeration.cpp in Sources */,
-				260CC64E15D0440D002BF2E0 /* OptionValueFileSpec.cpp in Sources */,
-				AF2BCA6C18C7EFDE005B4526 /* JITLoaderGDB.cpp in Sources */,
-				267F68571CC02EAE0086832B /* RegisterContextPOSIX_s390x.cpp in Sources */,
-				260CC64F15D0440D002BF2E0 /* OptionValueFileSpecLIst.cpp in Sources */,
-				490A36C0180F0E6F00BA31F8 /* PlatformWindows.cpp in Sources */,
-				260CC65015D0440D002BF2E0 /* OptionValueFormat.cpp in Sources */,
-				260CC65115D0440D002BF2E0 /* OptionValueSInt64.cpp in Sources */,
-				4CD44D5820C603CB0003557C /* ClangHost.cpp in Sources */,
-				260CC65215D0440D002BF2E0 /* OptionValueString.cpp in Sources */,
-				6D55B2911A8A806200A70529 /* GDBRemoteCommunicationServerLLGS.cpp in Sources */,
-				260CC65315D0440D002BF2E0 /* OptionValueUInt64.cpp in Sources */,
-				260CC65415D0440D002BF2E0 /* OptionValueUUID.cpp in Sources */,
-				267F684A1CC02DED0086832B /* ABISysV_s390x.cpp in Sources */,
-				AFDBC36E204663AF00B9C8F2 /* EmulateInstructionPPC64.cpp in Sources */,
-				26DAED6315D327C200E15819 /* OptionValuePathMappings.cpp in Sources */,
-				B2B7CCEB15D1BD6700EEFB57 /* CommandObjectWatchpointCommand.cpp in Sources */,
-				E7E94ABC1B54961F00D0AE30 /* GDBRemoteSignals.cpp in Sources */,
-				AF25AB26188F685C0030DEC3 /* AppleGetQueuesHandler.cpp in Sources */,
-				B2B7CCF015D1C20F00EEFB57 /* WatchpointOptions.cpp in Sources */,
-				26501414221330CE00E16D81 /* RemoteAwarePlatform.cpp in Sources */,
-				2640E19F15DC78FD00F23B50 /* Property.cpp in Sources */,
-				949EEDA01BA74B6D008C63CF /* CoreMedia.cpp in Sources */,
-				26491E3E15E1DB9F00CBFFC2 /* OptionValueRegex.cpp in Sources */,
-				2697A39315E404B1003E682C /* OptionValueArch.cpp in Sources */,
-				6D55B2921A8A806200A70529 /* GDBRemoteCommunicationServerPlatform.cpp in Sources */,
-				2698699B15E6CBD0002415FF /* OperatingSystemPython.cpp in Sources */,
-				947A1D641616476B0017C8D1 /* CommandObjectPlugin.cpp in Sources */,
-				2666ADC81B3CB675001FAFD3 /* HexagonDYLDRendezvous.cpp in Sources */,
-				26A375811D59462700D6CBDB /* SelectHelper.cpp in Sources */,
-				AFD966BA217140B6006714AC /* PdbIndex.cpp in Sources */,
-				262ED0081631FA3A00879631 /* OptionGroupString.cpp in Sources */,
-				94F48F251A01C687005C0EC6 /* StringPrinter.cpp in Sources */,
-				94094C6B163B6F840083A547 /* ValueObjectCast.cpp in Sources */,
-				AF9107EF168570D200DBCD3C /* RegisterContextDarwin_arm64.cpp in Sources */,
-				94CB255C16B069770059775D /* DataVisualization.cpp in Sources */,
-				94CB255D16B069770059775D /* FormatClasses.cpp in Sources */,
-				94CB255E16B069770059775D /* FormatManager.cpp in Sources */,
-				94CB256616B096F10059775D /* TypeCategory.cpp in Sources */,
-				945261C81B9A14D300BF138D /* CXXFunctionPointer.cpp in Sources */,
-				4CA0C6CC20F929C700CFE6BB /* PDBLocationToDWARFExpression.cpp in Sources */,
-				94CB256716B096F10059775D /* TypeCategoryMap.cpp in Sources */,
-				94CB257016B0A4270059775D /* TypeFormat.cpp in Sources */,
-				238F2B9E1D2C82D0001FF92A /* StructuredDataPlugin.cpp in Sources */,
-				94CB257116B0A4270059775D /* TypeSummary.cpp in Sources */,
-				94CB257216B0A4270059775D /* TypeSynthetic.cpp in Sources */,
-				94CB257416B1D3880059775D /* FormatCache.cpp in Sources */,
-				AF6335E21C87B21E00F7D554 /* SymbolFilePDB.cpp in Sources */,
-				4CD44CFC20B37C440003557C /* ManualDWARFIndex.cpp in Sources */,
-				A36FF33C17D8E94600244D40 /* OptionParser.cpp in Sources */,
-				5A6424962204D05000C3D9DB /* CodeViewRegisterMapping.cpp in Sources */,
-				5A6424972204D05000C3D9DB /* PdbFPOProgramToDWARFExpression.cpp in Sources */,
-				3FDFDDBD199C3A06009756A7 /* FileAction.cpp in Sources */,
-				4CC57FA2222DFEA40067B7EA /* UserIDResolver.cpp in Sources */,
-				233B007F1960CB280090E598 /* ProcessLaunchInfo.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		2690CD131A6DC0D000E717C8 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				2669423C1A6DC2AC0063BE93 /* MICmnThreadMgrStd.cpp in Sources */,
-				266942031A6DC2AC0063BE93 /* MICmdArgValConsume.cpp in Sources */,
-				2669422A1A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfoVarObj.cpp in Sources */,
-				266942151A6DC2AC0063BE93 /* MICmdCmdGdbThread.cpp in Sources */,
-				266942451A6DC2AC0063BE93 /* MIUtilString.cpp in Sources */,
-				266942131A6DC2AC0063BE93 /* MICmdCmdGdbInfo.cpp in Sources */,
-				266942011A6DC2AC0063BE93 /* MICmdArgSet.cpp in Sources */,
-				266942071A6DC2AC0063BE93 /* MICmdArgValNumber.cpp in Sources */,
-				2669420B1A6DC2AC0063BE93 /* MICmdArgValThreadGrp.cpp in Sources */,
-				2669420A1A6DC2AC0063BE93 /* MICmdArgValString.cpp in Sources */,
-				2669421D1A6DC2AC0063BE93 /* MICmdCmdVar.cpp in Sources */,
-				266942411A6DC2AC0063BE93 /* MIUtilDateTimeStd.cpp in Sources */,
-				266942001A6DC2AC0063BE93 /* MICmdArgContext.cpp in Sources */,
-				266942171A6DC2AC0063BE93 /* MICmdCmdStack.cpp in Sources */,
-				266942121A6DC2AC0063BE93 /* MICmdCmdFile.cpp in Sources */,
-				2669424B1A6DC2AC0063BE93 /* MIUtilVariant.cpp in Sources */,
-				2669421E1A6DC2AC0063BE93 /* MICmdCommands.cpp in Sources */,
-				266942161A6DC2AC0063BE93 /* MICmdCmdMiscellanous.cpp in Sources */,
-				266942281A6DC2AC0063BE93 /* MICmnLLDBDebuggerHandleEvents.cpp in Sources */,
-				2669421B1A6DC2AC0063BE93 /* MICmdCmdThread.cpp in Sources */,
-				266942261A6DC2AC0063BE93 /* MICmnLLDBBroadcaster.cpp in Sources */,
-				266942141A6DC2AC0063BE93 /* MICmdCmdGdbSet.cpp in Sources */,
-				2669423F1A6DC2AC0063BE93 /* MIDriverMain.cpp in Sources */,
-				266942041A6DC2AC0063BE93 /* MICmdArgValFile.cpp in Sources */,
-				2669422D1A6DC2AC0063BE93 /* MICmnLog.cpp in Sources */,
-				2669420E1A6DC2AC0063BE93 /* MICmdCmdBreak.cpp in Sources */,
-				266942401A6DC2AC0063BE93 /* MIDriverMgr.cpp in Sources */,
-				266942111A6DC2AC0063BE93 /* MICmdCmdExec.cpp in Sources */,
-				266942061A6DC2AC0063BE93 /* MICmdArgValListOfN.cpp in Sources */,
-				266942201A6DC2AC0063BE93 /* MICmdFactory.cpp in Sources */,
-				266942241A6DC2AC0063BE93 /* MICmdMgrSetCmdDeleteCallback.cpp in Sources */,
-				266942251A6DC2AC0063BE93 /* MICmnBase.cpp in Sources */,
-				2669421A1A6DC2AC0063BE93 /* MICmdCmdTarget.cpp in Sources */,
-				2669424A1A6DC2AC0063BE93 /* MIUtilThreadBaseStd.cpp in Sources */,
-				266942101A6DC2AC0063BE93 /* MICmdCmdEnviro.cpp in Sources */,
-				266942191A6DC2AC0063BE93 /* MICmdCmdSupportList.cpp in Sources */,
-				266942441A6DC2AC0063BE93 /* MIUtilMapIdToVariant.cpp in Sources */,
-				266942341A6DC2AC0063BE93 /* MICmnMIValueResult.cpp in Sources */,
-				266942181A6DC2AC0063BE93 /* MICmdCmdSupportInfo.cpp in Sources */,
-				266942311A6DC2AC0063BE93 /* MICmnMIValue.cpp in Sources */,
-				267DFB461B06752A00000FB7 /* MICmdArgValPrintValues.cpp in Sources */,
-				266942081A6DC2AC0063BE93 /* MICmdArgValOptionLong.cpp in Sources */,
-				2669420D1A6DC2AC0063BE93 /* MICmdCmd.cpp in Sources */,
-				2669422C1A6DC2AC0063BE93 /* MICmnLLDBUtilSBValue.cpp in Sources */,
-				266942381A6DC2AC0063BE93 /* MICmnStreamStdin.cpp in Sources */,
-				266942051A6DC2AC0063BE93 /* MICmdArgValListBase.cpp in Sources */,
-				2669422E1A6DC2AC0063BE93 /* MICmnLogMediumFile.cpp in Sources */,
-				AFB3D2801AC262AB003B4B30 /* MICmdCmdGdbShow.cpp in Sources */,
-				266942361A6DC2AC0063BE93 /* MICmnResources.cpp in Sources */,
-				266942371A6DC2AC0063BE93 /* MICmnStreamStderr.cpp in Sources */,
-				266942351A6DC2AC0063BE93 /* MICmnMIValueTuple.cpp in Sources */,
-				2669422B1A6DC2AC0063BE93 /* MICmnLLDBProxySBValue.cpp in Sources */,
-				2669423E1A6DC2AC0063BE93 /* MIDriverBase.cpp in Sources */,
-				266942021A6DC2AC0063BE93 /* MICmdArgValBase.cpp in Sources */,
-				266942091A6DC2AC0063BE93 /* MICmdArgValOptionShort.cpp in Sources */,
-				266942291A6DC2AC0063BE93 /* MICmnLLDBDebugSessionInfo.cpp in Sources */,
-				266942211A6DC2AC0063BE93 /* MICmdInterpreter.cpp in Sources */,
-				26D52C1F1A980FE300E5D2FB /* MICmdCmdSymbol.cpp in Sources */,
-				266942321A6DC2AC0063BE93 /* MICmnMIValueConst.cpp in Sources */,
-				2669423B1A6DC2AC0063BE93 /* MICmnStreamStdout.cpp in Sources */,
-				266942271A6DC2AC0063BE93 /* MICmnLLDBDebugger.cpp in Sources */,
-				2669421C1A6DC2AC0063BE93 /* MICmdCmdTrace.cpp in Sources */,
-				266942331A6DC2AC0063BE93 /* MICmnMIValueList.cpp in Sources */,
-				266942221A6DC2AC0063BE93 /* MICmdInvoker.cpp in Sources */,
-				2669420C1A6DC2AC0063BE93 /* MICmdBase.cpp in Sources */,
-				266942301A6DC2AC0063BE93 /* MICmnMIResultRecord.cpp in Sources */,
-				266942231A6DC2AC0063BE93 /* MICmdMgr.cpp in Sources */,
-				2669421F1A6DC2AC0063BE93 /* MICmdData.cpp in Sources */,
-				266942431A6DC2AC0063BE93 /* MIUtilFileStd.cpp in Sources */,
-				2669422F1A6DC2AC0063BE93 /* MICmnMIOutOfBandRecord.cpp in Sources */,
-				2669420F1A6DC2AC0063BE93 /* MICmdCmdData.cpp in Sources */,
-				266942421A6DC2AC0063BE93 /* MIUtilDebug.cpp in Sources */,
-				2669423D1A6DC2AC0063BE93 /* MIDriver.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26DC6A0D1337FE6900FF7998 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				E769331C1A94D15400C73337 /* lldb-gdbserver.cpp in Sources */,
-				4CD44D2220B725DA0003557C /* SystemInitializerLLGS.cpp in Sources */,
-				26DC6A1D1337FECA00FF7998 /* lldb-platform.cpp in Sources */,
-				E769331E1A94D18100C73337 /* lldb-server.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		26F5C26710F3D9A4009D5894 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				26F5C27710F3D9E4009D5894 /* Driver.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		942829BC1A89835300521B30 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				940B04D91A8984FF0045D5F7 /* argdumper.cpp in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
-		23CB15301D66DA9300EDDDE1 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 2689FFC913353D7A00698AC0 /* lldb-core */;
-			targetProxy = 23CB15311D66DA9300EDDDE1 /* PBXContainerItemProxy */;
-		};
-		23E2E5481D904D72006F38BB /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 23CB152F1D66DA9300EDDDE1 /* lldb-gtest-build */;
-			targetProxy = 23E2E5471D904D72006F38BB /* PBXContainerItemProxy */;
-		};
-		262CFC7211A450CB00946C6C /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = debugserver;
-			targetProxy = 262CFC7111A450CB00946C6C /* PBXContainerItemProxy */;
-		};
-		26368AF6126B95FA00E8659F /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 26579F67126A25920007C5CB /* darwin-debug */;
-			targetProxy = 26368AF5126B95FA00E8659F /* PBXContainerItemProxy */;
-		};
-		266803621160110D008E1FE4 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 26680206115FD0ED008E1FE4 /* LLDB */;
-			targetProxy = 266803611160110D008E1FE4 /* PBXContainerItemProxy */;
-		};
-		26792620211CA40700EE1D10 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 26680206115FD0ED008E1FE4 /* LLDB */;
-			targetProxy = 2679261F211CA40700EE1D10 /* PBXContainerItemProxy */;
-		};
-		2689011513353E9B00698AC0 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 2689FFC913353D7A00698AC0 /* lldb-core */;
-			targetProxy = 2689011413353E9B00698AC0 /* PBXContainerItemProxy */;
-		};
-		26B391EF1A6DCCAF00456239 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 2690CD161A6DC0D000E717C8 /* lldb-mi */;
-			targetProxy = 26B391EE1A6DCCAF00456239 /* PBXContainerItemProxy */;
-		};
-		26B391F11A6DCCBE00456239 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 2690CD161A6DC0D000E717C8 /* lldb-mi */;
-			targetProxy = 26B391F01A6DCCBE00456239 /* PBXContainerItemProxy */;
-		};
-		26CEF3B014FD591F007286B2 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 26F5C26910F3D9A4009D5894 /* lldb-tool */;
-			targetProxy = 26CEF3AF14FD591F007286B2 /* PBXContainerItemProxy */;
-		};
-		26CEF3BB14FD595B007286B2 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 26F5C26910F3D9A4009D5894 /* lldb-tool */;
-			targetProxy = 26CEF3BA14FD595B007286B2 /* PBXContainerItemProxy */;
-		};
-		26CEF3C214FD5973007286B2 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 26F5C26910F3D9A4009D5894 /* lldb-tool */;
-			targetProxy = 26CEF3C114FD5973007286B2 /* PBXContainerItemProxy */;
-		};
-		26DC6A161337FE7300FF7998 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 2689FFC913353D7A00698AC0 /* lldb-core */;
-			targetProxy = 26DC6A151337FE7300FF7998 /* PBXContainerItemProxy */;
-		};
-		26DF74601A6DCDB300B85563 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 26680206115FD0ED008E1FE4 /* LLDB */;
-			targetProxy = 26DF745F1A6DCDB300B85563 /* PBXContainerItemProxy */;
-		};
-		942829CA1A89836A00521B30 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 2689FFC913353D7A00698AC0 /* lldb-core */;
-			targetProxy = 942829C91A89836A00521B30 /* PBXContainerItemProxy */;
-		};
-		942829CE1A89842900521B30 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 942829BF1A89835300521B30 /* lldb-argdumper */;
-			targetProxy = 942829CD1A89842900521B30 /* PBXContainerItemProxy */;
-		};
-		94E829C9152D33B4006F96A3 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			target = 26DC6A0F1337FE6900FF7998 /* lldb-server */;
-			targetProxy = 94E829C8152D33B4006F96A3 /* PBXContainerItemProxy */;
-		};
-		AFA9B71220606A13008E86C6 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = "debugserver-mini";
-			targetProxy = AFA9B71320606A13008E86C6 /* PBXContainerItemProxy */;
-		};
-		AFCA21D21D18E556004386B8 /* PBXTargetDependency */ = {
-			isa = PBXTargetDependency;
-			name = "debugserver-mini";
-			targetProxy = AFCA21D11D18E556004386B8 /* PBXContainerItemProxy */;
-		};
-/* End PBXTargetDependency section */
-
-/* Begin XCBuildConfiguration section */
-		1DEB91F008733DB70010E9CD /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)";
-				"ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD)";
-				CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_DEBUG,
-				);
-				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_DEBUG,
-					LLDB_DISABLE_PYTHON,
-					NO_XPC_SERVICES,
-				);
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				"GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]" = NO;
-				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
-				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
-				GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
-				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-				GCC_WARN_MISSING_PARENTHESES = YES;
-				GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_LABEL = YES;
-				GCC_WARN_UNUSED_VALUE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				LLDB_COVERAGE_CFLAGS = "$(LLDB_COVERAGE_CFLAGS_$(LLDB_ENABLE_COVERAGE))";
-				LLDB_COVERAGE_CFLAGS_1 = "-fprofile-instr-generate -fcoverage-mapping";
-				LLDB_COVERAGE_LDFLAGS = "$(LLDB_COVERAGE_LDFLAGS_$(LLDB_ENABLE_COVERAGE))";
-				LLDB_COVERAGE_LDFLAGS_1 = "-fprofile-instr-generate";
-				LLDB_DISABLE_PYTHON = 0;
-				"LLDB_DISABLE_PYTHON[sdk=iphoneos*]" = 1;
-				LLDB_ENABLE_COVERAGE = 0;
-				LLDB_FRAMEWORK_INSTALL_DIR = /Applications/Xcode.app/Contents/SharedFrameworks;
-				LLDB_TOOLS_INSTALL_DIR = /usr/bin;
-				LLVM_BUILD_DIR = "$(SRCROOT)/llvm-build/$(LLVM_CONFIGURATION)";
-				LLVM_BUILD_DIRTREE = "$(SRCROOT)/llvm-build";
-				LLVM_BUILD_DIR_ARCH = x86_64/;
-				LLVM_CONFIGURATION = "Release+Asserts";
-				LLVM_SOURCE_DIR = "$(SRCROOT)/llvm";
-				ONLY_ACTIVE_ARCH = YES;
-				OTHER_CFLAGS = (
-					"-Wparentheses",
-					"$(LLDB_COVERAGE_CFLAGS)",
-					"-Wimplicit-fallthrough",
-				);
-				OTHER_LDFLAGS = (
-					"-lcompression",
-					"$(LLDB_COVERAGE_LDFLAGS)",
-				);
-				PYTHON_FRAMEWORK_PATH = /System/Library/Frameworks/Python.framework/;
-				PYTHON_VERSION_MAJOR = 2;
-				PYTHON_VERSION_MINOR = 7;
-				SDKROOT = "";
-				STRIP_INSTALLED_PRODUCT = NO;
-				STRIP_STYLE = debugging;
-				WARNING_CFLAGS = "-Wreorder";
-			};
-			name = Debug;
-		};
-		1DEB91F108733DB70010E9CD /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)";
-				"ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD)";
-				CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_RELEASE,
-				);
-				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_RELEASE,
-					LLDB_DISABLE_PYTHON,
-					NO_XPC_SERVICES,
-				);
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				"GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]" = NO;
-				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
-				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
-				GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
-				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-				GCC_WARN_MISSING_PARENTHESES = YES;
-				GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_LABEL = YES;
-				GCC_WARN_UNUSED_VALUE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				LLDB_COVERAGE_CFLAGS = "$(LLDB_COVERAGE_CFLAGS_$(LLDB_ENABLE_COVERAGE))";
-				LLDB_COVERAGE_CFLAGS_1 = "-fprofile-instr-generate -fcoverage-mapping";
-				LLDB_COVERAGE_LDFLAGS = "$(LLDB_COVERAGE_LDFLAGS_$(LLDB_ENABLE_COVERAGE))";
-				LLDB_COVERAGE_LDFLAGS_1 = "-fprofile-instr-generate";
-				LLDB_DISABLE_PYTHON = 0;
-				"LLDB_DISABLE_PYTHON[sdk=iphoneos*]" = 1;
-				LLDB_ENABLE_COVERAGE = 0;
-				LLDB_FRAMEWORK_INSTALL_DIR = /Applications/Xcode.app/Contents/SharedFrameworks;
-				LLDB_TOOLS_INSTALL_DIR = /usr/bin;
-				LLVM_BUILD_DIR = "$(SRCROOT)/llvm-build/$(LLVM_CONFIGURATION)";
-				LLVM_BUILD_DIRTREE = "$(SRCROOT)/llvm-build";
-				LLVM_BUILD_DIR_ARCH = x86_64/;
-				LLVM_CONFIGURATION = "Release+Asserts";
-				LLVM_SOURCE_DIR = "$(SRCROOT)/llvm";
-				ONLY_ACTIVE_ARCH = YES;
-				OTHER_CFLAGS = (
-					"-Wparentheses",
-					"$(LLDB_COVERAGE_CFLAGS)",
-					"-Wimplicit-fallthrough",
-				);
-				OTHER_LDFLAGS = (
-					"-lcompression",
-					"$(LLDB_COVERAGE_LDFLAGS)",
-				);
-				PYTHON_FRAMEWORK_PATH = /System/Library/Frameworks/Python.framework/;
-				PYTHON_VERSION_MAJOR = 2;
-				PYTHON_VERSION_MINOR = 7;
-				SDKROOT = "";
-				STRIP_INSTALLED_PRODUCT = NO;
-				STRIP_STYLE = debugging;
-				WARNING_CFLAGS = "-Wreorder";
-			};
-			name = Release;
-		};
-		2387551F1C24974600CCE8C3 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				DEBUGGING_SYMBOLS = YES;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_TESTABILITY = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				LLDB_PYTHON_TESTSUITE_ARCH = x86_64;
-				LLDB_PYTHON_TESTSUITE_CC = "$(LLVM_BUILD_DIR)/x86_64/bin/clang";
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		238755201C24974600CCE8C3 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				DEBUGGING_SYMBOLS = YES;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_TESTABILITY = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				LLDB_PYTHON_TESTSUITE_ARCH = x86_64;
-				LLDB_PYTHON_TESTSUITE_CC = "$(LLVM_BUILD_DIR)/x86_64/bin/clang";
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = DebugClang;
-		};
-		238755211C24974600CCE8C3 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				LLDB_PYTHON_TESTSUITE_ARCH = x86_64;
-				LLDB_PYTHON_TESTSUITE_CC = "$(LLVM_BUILD_DIR)/x86_64/bin/clang";
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		238755221C24974600CCE8C3 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				LLDB_PYTHON_TESTSUITE_ARCH = x86_64;
-				LLDB_PYTHON_TESTSUITE_CC = "$(LLVM_BUILD_DIR)/x86_64/bin/clang";
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_CFLAGS = "";
-				OTHER_LDFLAGS = "";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = BuildAndIntegration;
-		};
-		239504D81BDD451400963CEA /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				HEADER_SEARCH_PATHS = (
-					"$(LLVM_SOURCE_DIR)/tools/clang/include",
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include",
-				);
-				LLDB_GTESTS_CFLAGS = "-I unittests -I $(LLVM_SOURCE_DIR)/utils/unittest/googlemock/include -I $(LLVM_SOURCE_DIR)/utils/unittest/googletest/include -I $(LLVM_SOURCE_DIR)/include -I $(LLVM_BUILD_DIR)/x86_64/include -I include -I source -I $(PYTHON_FRAMEWORK_PATH)/Headers";
-				LLDB_GTESTS_LDFLAGS = "$(LLVM_BUILD_DIR)/x86_64/lib/libgtest.a -L $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib -l python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				OTHER_CFLAGS = (
-					"-fno-rtti",
-					"-Wparentheses",
-					"$(LLDB_GTESTS_CFLAGS)",
-					"-DGTEST_HAS_RTTI=0",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-					"$(LLDB_GTESTS_LDFLAGS)",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		239504D91BDD451400963CEA /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				HEADER_SEARCH_PATHS = (
-					"$(LLVM_SOURCE_DIR)/tools/clang/include",
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include",
-				);
-				LLDB_GTESTS_CFLAGS = "-I unittests -I $(LLVM_SOURCE_DIR)/utils/unittest/googlemock/include -I $(LLVM_SOURCE_DIR)/utils/unittest/googletest/include -I $(LLVM_SOURCE_DIR)/include -I $(LLVM_BUILD_DIR)/x86_64/include -I include -I source -I $(PYTHON_FRAMEWORK_PATH)/Headers";
-				LLDB_GTESTS_LDFLAGS = "$(LLVM_BUILD_DIR)/x86_64/lib/libgtest.a -L $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib -l python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				OTHER_CFLAGS = (
-					"-fno-rtti",
-					"-Wparentheses",
-					"$(LLDB_GTESTS_CFLAGS)",
-					"-DGTEST_HAS_RTTI=0",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-					"$(LLDB_GTESTS_LDFLAGS)",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = DebugClang;
-		};
-		239504DA1BDD451400963CEA /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				HEADER_SEARCH_PATHS = (
-					"$(LLVM_SOURCE_DIR)/tools/clang/include",
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include",
-				);
-				LLDB_GTESTS_CFLAGS = "-I unittests -I $(LLVM_SOURCE_DIR)/utils/unittest/googlemock/include -I $(LLVM_SOURCE_DIR)/utils/unittest/googletest/include -I $(LLVM_SOURCE_DIR)/include -I $(LLVM_BUILD_DIR)/x86_64/include -I include -I source -I $(PYTHON_FRAMEWORK_PATH)/Headers";
-				LLDB_GTESTS_LDFLAGS = "$(LLVM_BUILD_DIR)/x86_64/lib/libgtest.a -L $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib -l python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				OTHER_CFLAGS = (
-					"-fno-rtti",
-					"-Wparentheses",
-					"$(LLDB_GTESTS_CFLAGS)",
-					"-DGTEST_HAS_RTTI=0",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-					"$(LLDB_GTESTS_LDFLAGS)",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		239504DB1BDD451400963CEA /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				HEADER_SEARCH_PATHS = (
-					"$(LLVM_SOURCE_DIR)/tools/clang/include",
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include",
-				);
-				LLDB_GTESTS_CFLAGS = "-I unittests -I $(LLVM_SOURCE_DIR)/utils/unittest/googlemock/include -I $(LLVM_SOURCE_DIR)/utils/unittest/googletest/include -I $(LLVM_SOURCE_DIR)/include -I $(LLVM_BUILD_DIR)/x86_64/include -I include -I source -I $(PYTHON_FRAMEWORK_PATH)/Headers";
-				LLDB_GTESTS_LDFLAGS = "$(LLVM_BUILD_DIR)/x86_64/lib/libgtest.a -L $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib -l python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				OTHER_CFLAGS = (
-					"-fno-rtti",
-					"-Wparentheses",
-					"$(LLDB_GTESTS_CFLAGS)",
-					"-DGTEST_HAS_RTTI=0",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-					"$(LLDB_GTESTS_LDFLAGS)",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = BuildAndIntegration;
-		};
-		23CB15521D66DA9300EDDDE1 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				HEADER_SEARCH_PATHS = (
-					"$(LLVM_SOURCE_DIR)/tools/clang/include",
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include",
-				);
-				LLDB_GTESTS_CFLAGS = "-I unittests -I $(LLVM_SOURCE_DIR)/utils/unittest/googlemock/include -I $(LLVM_SOURCE_DIR)/utils/unittest/googletest/include -I $(LLVM_SOURCE_DIR)/include -I $(LLVM_BUILD_DIR)/x86_64/include -DYAML2OBJ=\"\\\"$(LLVM_BUILD_DIR)/x86_64/bin/yaml2obj\\\"\" -I include -I source -I $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/include/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				LLDB_GTESTS_LDFLAGS = "$(LLVM_BUILD_DIR)/x86_64/lib/libgtest.a -L $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib -l python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				OTHER_CFLAGS = (
-					"-fno-rtti",
-					"-Wparentheses",
-					"$(LLDB_GTESTS_CFLAGS)",
-					"-DGTEST_HAS_RTTI=0",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-					"$(LLDB_GTESTS_LDFLAGS)",
-					"$(LLDB_COMPRESSION_LDFLAGS)",
-				);
-				PRODUCT_NAME = "lldb-gtest";
-			};
-			name = Debug;
-		};
-		23CB15531D66DA9300EDDDE1 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				HEADER_SEARCH_PATHS = (
-					"$(LLVM_SOURCE_DIR)/tools/clang/include",
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include",
-				);
-				LLDB_GTESTS_CFLAGS = "-I unittests -I $(LLVM_SOURCE_DIR)/utils/unittest/googlemock/include -I $(LLVM_SOURCE_DIR)/utils/unittest/googletest/include -I $(LLVM_SOURCE_DIR)/include -I $(LLVM_BUILD_DIR)/x86_64/include -DYAML2OBJ=\"\\\"$(LLVM_BUILD_DIR)/x86_64/bin/yaml2obj\\\"\" -I include -I source -I $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/include/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				LLDB_GTESTS_LDFLAGS = "$(LLVM_BUILD_DIR)/x86_64/lib/libgtest.a -L $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib -l python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				OTHER_CFLAGS = (
-					"-fno-rtti",
-					"-Wparentheses",
-					"$(LLDB_GTESTS_CFLAGS)",
-					"-DGTEST_HAS_RTTI=0",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-					"$(LLDB_GTESTS_LDFLAGS)",
-					"$(LLDB_COMPRESSION_LDFLAGS)",
-				);
-				PRODUCT_NAME = "lldb-gtest";
-			};
-			name = DebugClang;
-		};
-		23CB15541D66DA9300EDDDE1 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				HEADER_SEARCH_PATHS = (
-					"$(LLVM_SOURCE_DIR)/tools/clang/include",
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include",
-				);
-				LLDB_GTESTS_CFLAGS = "-I unittests -I $(LLVM_SOURCE_DIR)/utils/unittest/googlemock/include -I $(LLVM_SOURCE_DIR)/utils/unittest/googletest/include -I $(LLVM_SOURCE_DIR)/include -I $(LLVM_BUILD_DIR)/x86_64/include -DYAML2OBJ=\"\\\"$(LLVM_BUILD_DIR)/x86_64/bin/yaml2obj\\\"\" -I include -I source -I $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/include/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				LLDB_GTESTS_LDFLAGS = "$(LLVM_BUILD_DIR)/x86_64/lib/libgtest.a -L $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib -l python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				OTHER_CFLAGS = (
-					"-fno-rtti",
-					"-Wparentheses",
-					"$(LLDB_GTESTS_CFLAGS)",
-					"-DGTEST_HAS_RTTI=0",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-					"$(LLDB_GTESTS_LDFLAGS)",
-					"$(LLDB_COMPRESSION_LDFLAGS)",
-				);
-				PRODUCT_NAME = "lldb-gtest";
-			};
-			name = Release;
-		};
-		23CB15551D66DA9300EDDDE1 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				HEADER_SEARCH_PATHS = (
-					"$(LLVM_SOURCE_DIR)/tools/clang/include",
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/tools/clang/include",
-				);
-				LLDB_GTESTS_CFLAGS = "-I unittests -I $(LLVM_SOURCE_DIR)/utils/unittest/googlemock/include -I $(LLVM_SOURCE_DIR)/utils/unittest/googletest/include -I $(LLVM_SOURCE_DIR)/include -I $(LLVM_BUILD_DIR)/x86_64/include -DYAML2OBJ=\"\\\"$(LLVM_BUILD_DIR)/x86_64/bin/yaml2obj\\\"\" -I include -I source -I $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/include/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				LLDB_GTESTS_LDFLAGS = "$(LLVM_BUILD_DIR)/x86_64/lib/libgtest.a -L $(PYTHON_FRAMEWORK_PATH)/Versions/$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)/lib -l python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)";
-				OTHER_CFLAGS = (
-					"-fno-rtti",
-					"-Wparentheses",
-					"$(LLDB_GTESTS_CFLAGS)",
-					"-DGTEST_HAS_RTTI=0",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-					"$(LLDB_GTESTS_LDFLAGS)",
-					"$(LLDB_COMPRESSION_LDFLAGS)",
-				);
-				PRODUCT_NAME = "lldb-gtest";
-			};
-			name = BuildAndIntegration;
-		};
-		26579F6A126A25920007C5CB /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				ONLY_ACTIVE_ARCH = NO;
-				PRODUCT_NAME = "darwin-debug";
-				SKIP_INSTALL = YES;
-			};
-			name = Debug;
-		};
-		26579F6B126A25920007C5CB /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				ONLY_ACTIVE_ARCH = NO;
-				PRODUCT_NAME = "darwin-debug";
-				SKIP_INSTALL = YES;
-			};
-			name = Release;
-		};
-		26579F6C126A25920007C5CB /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				COPY_PHASE_STRIP = YES;
-				FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				ONLY_ACTIVE_ARCH = NO;
-				PRODUCT_NAME = "darwin-debug";
-				SKIP_INSTALL = YES;
-				STRIP_INSTALLED_PRODUCT = YES;
-			};
-			name = BuildAndIntegration;
-		};
-		26680209115FD0ED008E1FE4 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_LINK_OBJC_RUNTIME = NO;
-				CLANG_OBJC_RUNTIME = NO;
-				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 360.99.0;
-				EXPORTED_SYMBOLS_FILE = source/API/liblldb.xcode.exports;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				FRAMEWORK_VERSION = A;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				HEADER_SEARCH_PATHS = "";
-				INFOPLIST_FILE = "resources/LLDB-Info.plist";
-				INSTALL_PATH = "$(LLDB_FRAMEWORK_INSTALL_DIR)";
-				LD_DYLIB_INSTALL_NAME = "@rpath/LLDB.framework/LLDB";
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				OTHER_CPLUSPLUSFLAGS = (
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = (
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"$(inherited)",
-					"-lllvmclang",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = LLDB;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Debug;
-		};
-		2668020A115FD0ED008E1FE4 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_LINK_OBJC_RUNTIME = NO;
-				CLANG_OBJC_RUNTIME = NO;
-				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DEAD_CODE_STRIPPING = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 360.99.0;
-				EXPORTED_SYMBOLS_FILE = source/API/liblldb.xcode.exports;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				FRAMEWORK_VERSION = A;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				HEADER_SEARCH_PATHS = "";
-				INFOPLIST_FILE = "resources/LLDB-Info.plist";
-				INSTALL_PATH = "$(LLDB_FRAMEWORK_INSTALL_DIR)";
-				LD_DYLIB_INSTALL_NAME = "@rpath/LLDB.framework/LLDB";
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				OTHER_CPLUSPLUSFLAGS = (
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = (
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"$(inherited)",
-					"-lllvmclang",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = LLDB;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Release;
-		};
-		26792610211CA3AD00EE1D10 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
-				CLANG_WARN_COMMA = YES;
-				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
-				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
-				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
-				CLANG_WARN_STRICT_PROTOTYPES = YES;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_LDFLAGS = (
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",
-					"-Wl,-rpath,@loader_path/",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Debug;
-		};
-		26792611211CA3AD00EE1D10 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
-				CLANG_WARN_COMMA = YES;
-				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
-				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
-				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
-				CLANG_WARN_STRICT_PROTOTYPES = YES;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_LDFLAGS = (
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",
-					"-Wl,-rpath,@loader_path/",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = DebugClang;
-		};
-		26792612211CA3AD00EE1D10 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
-				CLANG_WARN_COMMA = YES;
-				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
-				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
-				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
-				CLANG_WARN_STRICT_PROTOTYPES = YES;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_LDFLAGS = (
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",
-					"-Wl,-rpath,@loader_path/",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Release;
-		};
-		26792613211CA3AD00EE1D10 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ANALYZER_NONNULL = YES;
-				CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
-				CLANG_WARN_COMMA = YES;
-				CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
-				CLANG_WARN_INFINITE_RECURSION = YES;
-				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
-				CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
-				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
-				CLANG_WARN_STRICT_PROTOTYPES = YES;
-				CLANG_WARN_SUSPICIOUS_MOVE = YES;
-				CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
-				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				MTL_ENABLE_DEBUG_INFO = NO;
-				"OTHER_LDFLAGS[sdk=iphoneos*]" = (
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",
-					"-Wl,-rpath,@loader_path/../../../System/Library/PrivateFrameworks",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				"OTHER_LDFLAGS[sdk=macosx*]" = (
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-vscode/lldb-vscode-Info.plist",
-					"-Wl,-rpath,@loader_path/../../Library/PrivateFrameworks/",
-					"-Wl,-rpath,@loader_path/../../../SharedFrameworks",
-					"-Wl,-rpath,@loader_path/../../System/Library/PrivateFrameworks",
-					"-Wl,-rpath,@loader_path/../../Library/PrivateFrameworks",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				STRIP_INSTALLED_PRODUCT = YES;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = BuildAndIntegration;
-		};
-		2689FFD513353D7A00698AC0 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DYLIB_CURRENT_VERSION = 360.99.0;
-				EXECUTABLE_EXTENSION = a;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_DEBUG,
-					"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
-				);
-				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_DEBUG,
-					LLDB_DISABLE_PYTHON,
-					NO_XPC_SERVICES,
-					"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
-				);
-				HEADER_SEARCH_PATHS = /usr/include/libxml2;
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				MACH_O_TYPE = staticlib;
-				OTHER_CPLUSPLUSFLAGS = (
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-					"-DLIBXML2_DEFINED",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = (
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-					"-DLIBXML2_DEFINED",
-				);
-				OTHER_LDFLAGS = "";
-				PATH = /opt/local/bin;
-				PRODUCT_NAME = "lib$(TARGET_NAME)";
-				SKIP_INSTALL = YES;
-				STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Debug;
-		};
-		2689FFD613353D7A00698AC0 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DYLIB_CURRENT_VERSION = 360.99.0;
-				EXECUTABLE_EXTENSION = a;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_RELEASE,
-					"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
-				);
-				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_RELEASE,
-					LLDB_DISABLE_PYTHON,
-					NO_XPC_SERVICES,
-					"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
-				);
-				HEADER_SEARCH_PATHS = /usr/include/libxml2;
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				MACH_O_TYPE = staticlib;
-				OTHER_CPLUSPLUSFLAGS = (
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-					"-DLIBXML2_DEFINED",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = (
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-					"-DLIBXML2_DEFINED",
-				);
-				OTHER_LDFLAGS = "";
-				PATH = /opt/local/bin;
-				PRODUCT_NAME = "lib$(TARGET_NAME)";
-				SKIP_INSTALL = YES;
-				STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Release;
-		};
-		2689FFD713353D7A00698AC0 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DYLIB_CURRENT_VERSION = 360.99.0;
-				EXECUTABLE_EXTENSION = a;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
-					"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
-				);
-				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
-					LLDB_DISABLE_PYTHON,
-					NO_XPC_SERVICES,
-					"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
-				);
-				HEADER_SEARCH_PATHS = /usr/include/libxml2;
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				MACH_O_TYPE = staticlib;
-				OTHER_CPLUSPLUSFLAGS = (
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-					"-DLIBXML2_DEFINED",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = (
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-					"-DLIBXML2_DEFINED",
-				);
-				OTHER_LDFLAGS = "";
-				PATH = /opt/local/bin;
-				PRODUCT_NAME = "lib$(TARGET_NAME)";
-				SKIP_INSTALL = YES;
-				STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = BuildAndIntegration;
-		};
-		268A89B211963ECA00D953EB /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)";
-				"ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD)";
-				CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
-				);
-				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_BUILD_AND_INTEGRATION,
-					LLDB_DISABLE_PYTHON,
-					NO_XPC_SERVICES,
-				);
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				"GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]" = NO;
-				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
-				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
-				GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
-				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-				GCC_WARN_MISSING_PARENTHESES = YES;
-				GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_LABEL = YES;
-				GCC_WARN_UNUSED_VALUE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				LLDB_COVERAGE_CFLAGS = "$(LLDB_COVERAGE_CFLAGS_$(LLDB_ENABLE_COVERAGE))";
-				LLDB_COVERAGE_CFLAGS_1 = "-fprofile-instr-generate -fcoverage-mapping";
-				LLDB_COVERAGE_LDFLAGS = "$(LLDB_COVERAGE_LDFLAGS_$(LLDB_ENABLE_COVERAGE))";
-				LLDB_COVERAGE_LDFLAGS_1 = "-fprofile-instr-generate";
-				LLDB_DISABLE_PYTHON = 0;
-				"LLDB_DISABLE_PYTHON[sdk=iphoneos*]" = 1;
-				LLDB_ENABLE_COVERAGE = 0;
-				LLDB_FRAMEWORK_INSTALL_DIR = /Applications/Xcode.app/Contents/SharedFrameworks;
-				"LLDB_FRAMEWORK_INSTALL_DIR[sdk=iphoneos*]" = /System/Library/PrivateFrameworks;
-				LLDB_TOOLS_INSTALL_DIR = /Applications/Xcode.app/Contents/Developer/usr/bin;
-				"LLDB_TOOLS_INSTALL_DIR[sdk=iphoneos*]" = /usr/local/bin;
-				LLVM_BUILD_DIR = "$(OBJROOT)/llvm";
-				LLVM_BUILD_DIRTREE = "$(OBJROOT)/llvm-build";
-				LLVM_BUILD_DIR_ARCH = x86_64/;
-				LLVM_CONFIGURATION = Release;
-				LLVM_SOURCE_DIR = "$(SRCROOT)/llvm";
-				OTHER_CFLAGS = (
-					"-Wparentheses",
-					"$(LLDB_COVERAGE_CFLAGS)",
-					"-Wimplicit-fallthrough",
-					"-DNDEBUG",
-				);
-				OTHER_LDFLAGS = (
-					"-lcompression",
-					"$(LLDB_COVERAGE_LDFLAGS)",
-				);
-				"OTHER_LDFLAGS[sdk=macosx*]" = "";
-				PYTHON_FRAMEWORK_PATH = /System/Library/Frameworks/Python.framework/;
-				PYTHON_VERSION_MAJOR = 2;
-				PYTHON_VERSION_MINOR = 7;
-				SDKROOT = "";
-				STRIP_INSTALLED_PRODUCT = NO;
-				STRIP_STYLE = debugging;
-				WARNING_CFLAGS = "-Wreorder";
-			};
-			name = BuildAndIntegration;
-		};
-		268A89B311963ECA00D953EB /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				HEADER_SEARCH_PATHS = "";
-				INFOPLIST_FILE = "tools/driver/lldb-Info.plist";
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				LIBRARY_SEARCH_PATHS = "$(inherited)";
-				OTHER_CFLAGS = (
-					"-Wparentheses",
-					"$(LLDB_COVERAGE_CFLAGS)",
-					"-Wimplicit-fallthrough",
-					"-fno-rtti",
-					"-fno-exceptions",
-					"-DNDEBUG",
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/driver/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path/../../../System/Library/PrivateFrameworks",
-					"-L$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/lib",
-					"-lLLVMOption",
-					"-lLLVMSupport",
-					"-lLLVMDemangle",
-				);
-				"OTHER_LDFLAGS[sdk=macosx*]" = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"-L$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/lib",
-					"-lLLVMOption",
-					"-lLLVMSupport",
-					"-lLLVMDemangle",
-					"$(PROJECT_DIR)/tools/driver/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path/../../Library/PrivateFrameworks",
-					"-Wl,-rpath,@loader_path/../../../SharedFrameworks",
-					"-Wl,-rpath,@loader_path/../../System/Library/PrivateFrameworks",
-					"-Wl,-rpath,@loader_path/../../Library/PrivateFrameworks",
-				);
-				PRODUCT_NAME = lldb;
-				STRIP_INSTALLED_PRODUCT = YES;
-				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source $(LLVM_SOURCE_DIR)/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/include";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = BuildAndIntegration;
-		};
-		268A89B511963ECA00D953EB /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_LINK_OBJC_RUNTIME = NO;
-				CLANG_OBJC_RUNTIME = NO;
-				COMBINE_HIDPI_IMAGES = YES;
-				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DEAD_CODE_STRIPPING = YES;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 360.99.0;
-				EXPORTED_SYMBOLS_FILE = source/API/liblldb.xcode.exports;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				FRAMEWORK_VERSION = A;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				HEADER_SEARCH_PATHS = "";
-				INFOPLIST_FILE = "resources/LLDB-Info.plist";
-				INSTALL_PATH = "$(LLDB_FRAMEWORK_INSTALL_DIR)";
-				LD_DYLIB_INSTALL_NAME = "@rpath/LLDB.framework/LLDB";
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				OTHER_CPLUSPLUSFLAGS = (
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = (
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"$(inherited)",
-					"-lllvmclang",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = LLDB;
-				STRIP_INSTALLED_PRODUCT = YES;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = BuildAndIntegration;
-		};
-		2690CD1B1A6DC0D000E717C8 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-mi/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path/",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Debug;
-		};
-		2690CD1C1A6DC0D000E717C8 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-mi/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path/",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = DebugClang;
-		};
-		2690CD1D1A6DC0D000E717C8 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-mi/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path/",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Release;
-		};
-		2690CD1E1A6DC0D000E717C8 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				COPY_PHASE_STRIP = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				MTL_ENABLE_DEBUG_INFO = NO;
-				"OTHER_LDFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-mi/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path/../../../System/Library/PrivateFrameworks",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				"OTHER_LDFLAGS[sdk=macosx*]" = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/lldb-mi/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path/../../Library/PrivateFrameworks/",
-					"-Wl,-rpath,@loader_path/../../../SharedFrameworks",
-					"-Wl,-rpath,@loader_path/../../System/Library/PrivateFrameworks",
-					"-Wl,-rpath,@loader_path/../../Library/PrivateFrameworks",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				STRIP_INSTALLED_PRODUCT = YES;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = BuildAndIntegration;
-		};
-		26CEF3AA14FD58BF007286B2 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		26CEF3AB14FD58BF007286B2 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		26CEF3AC14FD58BF007286B2 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = BuildAndIntegration;
-		};
-		26CEF3B314FD592B007286B2 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		26CEF3B414FD592B007286B2 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		26CEF3B514FD592B007286B2 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = BuildAndIntegration;
-		};
-		26CEF3BE14FD596A007286B2 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		26CEF3BF14FD596A007286B2 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		26CEF3C014FD596A007286B2 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = BuildAndIntegration;
-		};
-		26DC6A121337FE6A00FF7998 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
-				"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
-				DEAD_CODE_STRIPPING = YES;
-				EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_CPP_RTTI = NO;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INFOPLIST_PREPROCESSOR_DEFINITIONS = (
-					"-lobjc",
-					"-lpython",
-					"-framework",
-					Carbon,
-					"-framework",
-					Foundation,
-					"-framework",
-					AppKit,
-					"-v",
-					"-Wl,-v",
-				);
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				MACH_O_TYPE = mh_execute;
-				OTHER_CFLAGS = (
-					"$(inherited)",
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-Wparentheses",
-				);
-				"OTHER_CFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-Wparentheses",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)";
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-lxml2",
-					"-framework",
-					Foundation,
-					"-framework",
-					Carbon,
-					"-framework",
-					Security,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-lxml2",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = "lldb-server";
-				SKIP_INSTALL = YES;
-				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";
-			};
-			name = Debug;
-		};
-		26DC6A131337FE6A00FF7998 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
-				"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
-				DEAD_CODE_STRIPPING = YES;
-				EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_ENABLE_CPP_RTTI = NO;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				INFOPLIST_PREPROCESSOR_DEFINITIONS = (
-					"-lobjc",
-					"-lpython",
-					"-framework",
-					Carbon,
-					"-framework",
-					Foundation,
-					"-framework",
-					AppKit,
-					"-v",
-					"-Wl,-v",
-				);
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				MACH_O_TYPE = mh_execute;
-				OTHER_CFLAGS = (
-					"$(inherited)",
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-Wparentheses",
-				);
-				"OTHER_CFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-Wparentheses",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)";
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-lxml2",
-					"-framework",
-					Foundation,
-					"-framework",
-					Carbon,
-					"-framework",
-					Security,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-lxml2",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = "lldb-server";
-				SKIP_INSTALL = YES;
-				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";
-			};
-			name = Release;
-		};
-		26DC6A141337FE6A00FF7998 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COPY_PHASE_STRIP = YES;
-				DEAD_CODE_STRIPPING = YES;
-				EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_ENABLE_CPP_RTTI = NO;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				INFOPLIST_PREPROCESSOR_DEFINITIONS = (
-					"-lobjc",
-					"-lpython",
-					"-framework",
-					Carbon,
-					"-framework",
-					Foundation,
-					"-framework",
-					AppKit,
-					"-v",
-					"-Wl,-v",
-				);
-				INSTALL_PATH = "$(LLDB_FRAMEWORK_INSTALL_DIR)/LLDB.framework/Resources";
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				MACH_O_TYPE = mh_execute;
-				OTHER_CFLAGS = (
-					"$(inherited)",
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-Wparentheses",
-				);
-				"OTHER_CFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-Wparentheses",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)";
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-lxml2",
-					"-framework",
-					Foundation,
-					"-framework",
-					Carbon,
-					"-framework",
-					Security,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-lxml2",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = "lldb-server";
-				SKIP_INSTALL = YES;
-				STRIP_INSTALLED_PRODUCT = YES;
-				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";
-			};
-			name = BuildAndIntegration;
-		};
-		26F5C26C10F3D9A5009D5894 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				HEADER_SEARCH_PATHS = "";
-				INFOPLIST_FILE = "tools/driver/lldb-Info.plist";
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				LIBRARY_SEARCH_PATHS = "$(inherited)";
-				OTHER_CFLAGS = (
-					"-Wparentheses",
-					"$(LLDB_COVERAGE_CFLAGS)",
-					"-Wimplicit-fallthrough",
-					"-fno-rtti",
-					"-fno-exceptions",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/driver/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path",
-					"-L$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/lib",
-					"-lLLVMOption",
-					"-lLLVMSupport",
-					"-lLLVMDemangle",
-				);
-				PRODUCT_NAME = lldb;
-				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source $(LLVM_SOURCE_DIR)/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/include";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Debug;
-		};
-		26F5C26D10F3D9A5009D5894 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				HEADER_SEARCH_PATHS = "";
-				INFOPLIST_FILE = "tools/driver/lldb-Info.plist";
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				LIBRARY_SEARCH_PATHS = "$(inherited)";
-				OTHER_CFLAGS = (
-					"-Wparentheses",
-					"$(LLDB_COVERAGE_CFLAGS)",
-					"-Wimplicit-fallthrough",
-					"-fno-rtti",
-					"-fno-exceptions",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/driver/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path",
-					"-L$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/lib",
-					"-lLLVMOption",
-					"-lLLVMSupport",
-					"-lLLVMDemangle",
-				);
-				PRODUCT_NAME = lldb;
-				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source $(LLVM_SOURCE_DIR)/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/include ${LLDB_BUILD_DIR}/include";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = Release;
-		};
-		49BB8F341611172B00BDD462 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)";
-				"ARCHS[sdk=macosx*]" = "$(ARCHS_STANDARD)";
-				CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = c99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_DEBUG,
-				);
-				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_DEBUG,
-					LLDB_DISABLE_PYTHON,
-					NO_XPC_SERVICES,
-				);
-				GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				"GCC_WARN_64_TO_32_BIT_CONVERSION[arch=*64]" = NO;
-				GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
-				GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = NO;
-				GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
-				GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
-				GCC_WARN_MISSING_PARENTHESES = YES;
-				GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_LABEL = YES;
-				GCC_WARN_UNUSED_VALUE = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				LLDB_COVERAGE_CFLAGS = "$(LLDB_COVERAGE_CFLAGS_$(LLDB_ENABLE_COVERAGE))";
-				LLDB_COVERAGE_CFLAGS_1 = "-fprofile-instr-generate -fcoverage-mapping";
-				LLDB_COVERAGE_LDFLAGS = "$(LLDB_COVERAGE_LDFLAGS_$(LLDB_ENABLE_COVERAGE))";
-				LLDB_COVERAGE_LDFLAGS_1 = "-fprofile-instr-generate";
-				LLDB_DISABLE_PYTHON = 0;
-				"LLDB_DISABLE_PYTHON[sdk=iphoneos*]" = 1;
-				LLDB_ENABLE_COVERAGE = 0;
-				LLDB_FRAMEWORK_INSTALL_DIR = /Applications/Xcode.app/Contents/SharedFrameworks;
-				LLDB_TOOLS_INSTALL_DIR = /usr/bin;
-				LLVM_BUILD_DIR = "$(SRCROOT)/llvm-build/$(LLVM_CONFIGURATION)";
-				LLVM_BUILD_DIRTREE = "$(SRCROOT)/llvm-build";
-				LLVM_BUILD_DIR_ARCH = x86_64/;
-				LLVM_CONFIGURATION = "Debug+Asserts";
-				LLVM_SOURCE_DIR = "$(SRCROOT)/llvm";
-				ONLY_ACTIVE_ARCH = YES;
-				OTHER_CFLAGS = (
-					"-Wparentheses",
-					"$(LLDB_COVERAGE_CFLAGS)",
-					"-Wimplicit-fallthrough",
-				);
-				OTHER_LDFLAGS = (
-					"-lcompression",
-					"$(LLDB_COVERAGE_LDFLAGS)",
-				);
-				PYTHON_FRAMEWORK_PATH = /System/Library/Frameworks/Python.framework/;
-				PYTHON_VERSION_MAJOR = 2;
-				PYTHON_VERSION_MINOR = 7;
-				SDKROOT = "";
-				STRIP_INSTALLED_PRODUCT = NO;
-				STRIP_STYLE = debugging;
-				WARNING_CFLAGS = "-Wreorder";
-			};
-			name = DebugClang;
-		};
-		49BB8F351611172B00BDD462 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = DebugClang;
-		};
-		49BB8F361611172B00BDD462 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = DebugClang;
-		};
-		49BB8F371611172B00BDD462 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = DebugClang;
-		};
-		49BB8F381611172B00BDD462 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				HEADER_SEARCH_PATHS = "";
-				INFOPLIST_FILE = "tools/driver/lldb-Info.plist";
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				LIBRARY_SEARCH_PATHS = "$(inherited)";
-				OTHER_CFLAGS = (
-					"-Wparentheses",
-					"$(LLDB_COVERAGE_CFLAGS)",
-					"-Wimplicit-fallthrough",
-					"-fno-rtti",
-					"-fno-exceptions",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-sectcreate",
-					__TEXT,
-					__info_plist,
-					"$(PROJECT_DIR)/tools/driver/lldb-Info.plist",
-					"-Wl,-rpath,@loader_path",
-					"-L$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/lib",
-					"-lLLVMOption",
-					"-lLLVMSupport",
-					"-lLLVMDemangle",
-				);
-				PRODUCT_NAME = lldb;
-				USER_HEADER_SEARCH_PATHS = "$(SRCROOT)/include $(SRCROOT)/source $(LLVM_SOURCE_DIR)/include $(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)/include";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = DebugClang;
-		};
-		49BB8F391611172B00BDD462 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_LINK_OBJC_RUNTIME = NO;
-				CLANG_OBJC_RUNTIME = NO;
-				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DYLIB_COMPATIBILITY_VERSION = 1;
-				DYLIB_CURRENT_VERSION = 360.99.0;
-				EXPORTED_SYMBOLS_FILE = source/API/liblldb.xcode.exports;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-					"$(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks",
-				);
-				FRAMEWORK_VERSION = A;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				HEADER_SEARCH_PATHS = "";
-				INFOPLIST_FILE = "resources/LLDB-Info.plist";
-				INSTALL_PATH = "$(LLDB_FRAMEWORK_INSTALL_DIR)";
-				LD_DYLIB_INSTALL_NAME = "@rpath/LLDB.framework/LLDB";
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				OTHER_CPLUSPLUSFLAGS = (
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = (
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-				);
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-framework",
-					Foundation,
-					"-framework",
-					Security,
-					"-framework",
-					CoreServices,
-					"-framework",
-					ApplicationServices,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"$(inherited)",
-					"-lllvmclang",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = LLDB;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = DebugClang;
-		};
-		49BB8F3A1611172B00BDD462 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INSTALL_PATH = "$(LLDB_TOOLS_INSTALL_DIR)";
-				ONLY_ACTIVE_ARCH = NO;
-				PRODUCT_NAME = "darwin-debug";
-				SKIP_INSTALL = YES;
-			};
-			name = DebugClang;
-		};
-		49BB8F3B1611172B00BDD462 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				CURRENT_PROJECT_VERSION = 360.99.0;
-				DYLIB_CURRENT_VERSION = 360.99.0;
-				EXECUTABLE_EXTENSION = a;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_DEBUG,
-					"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
-				);
-				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*][arch=*]" = (
-					__STDC_CONSTANT_MACROS,
-					__STDC_LIMIT_MACROS,
-					LLDB_CONFIGURATION_DEBUG,
-					LLDB_DISABLE_PYTHON,
-					NO_XPC_SERVICES,
-					"LLDB_VERSION_STRING=lldb-${CURRENT_PROJECT_VERSION}",
-				);
-				HEADER_SEARCH_PATHS = /usr/include/libxml2;
-				LLDB_COMPRESSION_LDFLAGS = "-lcompression";
-				MACH_O_TYPE = staticlib;
-				OTHER_CPLUSPLUSFLAGS = (
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-					"-DLIBXML2_DEFINED",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = (
-					"-fno-rtti",
-					"-Wglobal-constructors",
-					"$(OTHER_CFLAGS)",
-					"-DLIBXML2_DEFINED",
-				);
-				OTHER_LDFLAGS = "";
-				PATH = /opt/local/bin;
-				PRODUCT_NAME = "lib$(TARGET_NAME)";
-				SKIP_INSTALL = YES;
-				STANDARD_C_PLUS_PLUS_LIBRARY_TYPE = static;
-				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";
-				VERSIONING_SYSTEM = "apple-generic";
-			};
-			name = DebugClang;
-		};
-		49BB8F3C1611172B00BDD462 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "-";
-				"CODE_SIGN_IDENTITY[sdk=macosx*]" = "";
-				DEAD_CODE_STRIPPING = YES;
-				EXPORTED_SYMBOLS_FILE = "tools/lldb-server/lldb-server.exports";
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_CPP_RTTI = NO;
-				GCC_INLINES_ARE_PRIVATE_EXTERN = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				INFOPLIST_PREPROCESSOR_DEFINITIONS = (
-					"-lobjc",
-					"-lpython",
-					"-framework",
-					Carbon,
-					"-framework",
-					Foundation,
-					"-framework",
-					AppKit,
-					"-v",
-					"-Wl,-v",
-				);
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				MACH_O_TYPE = mh_execute;
-				OTHER_CFLAGS = (
-					"$(inherited)",
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-Wparentheses",
-				);
-				"OTHER_CFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-Wparentheses",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)";
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-lxml2",
-					"-framework",
-					Foundation,
-					"-framework",
-					Carbon,
-					"-framework",
-					Security,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-lxml2",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = "lldb-server";
-				SKIP_INSTALL = YES;
-				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";
-			};
-			name = DebugClang;
-		};
-		942829C51A89835400521B30 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				EXPORTED_SYMBOLS_FILE = tools/argdumper/argdumper.exports;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_CFLAGS = (
-					"$(inherited)",
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-Wparentheses",
-				);
-				"OTHER_CFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-Wparentheses",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)";
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-lxml2",
-					"-framework",
-					Foundation,
-					"-framework",
-					Carbon,
-					"-framework",
-					Security,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-lxml2",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				SKIP_INSTALL = YES;
-				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";
-			};
-			name = Debug;
-		};
-		942829C61A89835400521B30 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				EXPORTED_SYMBOLS_FILE = tools/argdumper/argdumper.exports;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_CFLAGS = (
-					"$(inherited)",
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-Wparentheses",
-				);
-				"OTHER_CFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-Wparentheses",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)";
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-lxml2",
-					"-framework",
-					Foundation,
-					"-framework",
-					Carbon,
-					"-framework",
-					Security,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-lxml2",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				SKIP_INSTALL = YES;
-				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";
-			};
-			name = DebugClang;
-		};
-		942829C71A89835400521B30 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				EXPORTED_SYMBOLS_FILE = tools/argdumper/argdumper.exports;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_CFLAGS = (
-					"$(inherited)",
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-Wparentheses",
-				);
-				"OTHER_CFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-Wparentheses",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)";
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-lxml2",
-					"-framework",
-					Foundation,
-					"-framework",
-					Carbon,
-					"-framework",
-					Security,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-lxml2",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				SKIP_INSTALL = YES;
-				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";
-			};
-			name = Release;
-		};
-		942829C81A89835400521B30 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				EXPORTED_SYMBOLS_FILE = tools/argdumper/argdumper.exports;
-				FRAMEWORK_SEARCH_PATHS = (
-					"$(inherited)",
-					"\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
-				);
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				INSTALL_PATH = "$(LLDB_FRAMEWORK_INSTALL_DIR)/LLDB.framework/Resources";
-				LIBRARY_SEARCH_PATHS = (
-					"$(LLVM_BUILD_DIR)/$(LLVM_BUILD_DIR_ARCH)",
-					"$(inherited)",
-				);
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_CFLAGS = (
-					"$(inherited)",
-					"-I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7",
-					"-Wparentheses",
-				);
-				"OTHER_CFLAGS[sdk=iphoneos*]" = (
-					"$(inherited)",
-					"-Wparentheses",
-				);
-				"OTHER_CPLUSPLUSFLAGS[sdk=iphoneos*]" = "$(OTHER_CFLAGS)";
-				OTHER_LDFLAGS = (
-					"$(inherited)",
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config",
-					"-lpython2.7",
-					"-lxml2",
-					"-framework",
-					Foundation,
-					"-framework",
-					Carbon,
-					"-framework",
-					Security,
-				);
-				"OTHER_LDFLAGS[sdk=iphoneos*][arch=*]" = (
-					"-filelist",
-					"$(LLVM_BUILD_DIR)/archives.txt",
-					"-lxml2",
-					"-framework",
-					Foundation,
-				);
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = macosx;
-				SKIP_INSTALL = YES;
-				STRIP_INSTALLED_PRODUCT = YES;
-				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";
-			};
-			name = BuildAndIntegration;
-		};
-		AFA9B72020606A13008E86C6 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		AFA9B72120606A13008E86C6 /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = DebugClang;
-		};
-		AFA9B72220606A13008E86C6 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		AFA9B72320606A13008E86C6 /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				COMBINE_HIDPI_IMAGES = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = BuildAndIntegration;
-		};
-		DD8DC26C22026E2C00EB6F9E /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CODE_SIGN_STYLE = Automatic;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		DD8DC26D22026E2C00EB6F9E /* DebugClang */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CODE_SIGN_STYLE = Automatic;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = DebugClang;
-		};
-		DD8DC26E22026E2C00EB6F9E /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CODE_SIGN_STYLE = Automatic;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		DD8DC26F22026E2C00EB6F9E /* BuildAndIntegration */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CODE_SIGN_STYLE = Automatic;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = BuildAndIntegration;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "lldb" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1DEB91F008733DB70010E9CD /* Debug */,
-				49BB8F341611172B00BDD462 /* DebugClang */,
-				1DEB91F108733DB70010E9CD /* Release */,
-				268A89B211963ECA00D953EB /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		238755241C24974600CCE8C3 /* Build configuration list for PBXLegacyTarget "lldb-python-test-suite" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				2387551F1C24974600CCE8C3 /* Debug */,
-				238755201C24974600CCE8C3 /* DebugClang */,
-				238755211C24974600CCE8C3 /* Release */,
-				238755221C24974600CCE8C3 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		239504DD1BDD451400963CEA /* Build configuration list for PBXNativeTarget "lldb-gtest" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				239504D81BDD451400963CEA /* Debug */,
-				239504D91BDD451400963CEA /* DebugClang */,
-				239504DA1BDD451400963CEA /* Release */,
-				239504DB1BDD451400963CEA /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		23CB15511D66DA9300EDDDE1 /* Build configuration list for PBXNativeTarget "lldb-gtest-build" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				23CB15521D66DA9300EDDDE1 /* Debug */,
-				23CB15531D66DA9300EDDDE1 /* DebugClang */,
-				23CB15541D66DA9300EDDDE1 /* Release */,
-				23CB15551D66DA9300EDDDE1 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		26579F6D126A25BF0007C5CB /* Build configuration list for PBXNativeTarget "darwin-debug" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				26579F6A126A25920007C5CB /* Debug */,
-				49BB8F3A1611172B00BDD462 /* DebugClang */,
-				26579F6B126A25920007C5CB /* Release */,
-				26579F6C126A25920007C5CB /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		2668020B115FD0EE008E1FE4 /* Build configuration list for PBXNativeTarget "LLDB" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				26680209115FD0ED008E1FE4 /* Debug */,
-				49BB8F391611172B00BDD462 /* DebugClang */,
-				2668020A115FD0ED008E1FE4 /* Release */,
-				268A89B511963ECA00D953EB /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		26792614211CA3AD00EE1D10 /* Build configuration list for PBXNativeTarget "lldb-vscode" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				26792610211CA3AD00EE1D10 /* Debug */,
-				26792611211CA3AD00EE1D10 /* DebugClang */,
-				26792612211CA3AD00EE1D10 /* Release */,
-				26792613211CA3AD00EE1D10 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		2689FFD813353D7A00698AC0 /* Build configuration list for PBXNativeTarget "lldb-core" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				2689FFD513353D7A00698AC0 /* Debug */,
-				49BB8F3B1611172B00BDD462 /* DebugClang */,
-				2689FFD613353D7A00698AC0 /* Release */,
-				2689FFD713353D7A00698AC0 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		2690CD1F1A6DC0D000E717C8 /* Build configuration list for PBXNativeTarget "lldb-mi" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				2690CD1B1A6DC0D000E717C8 /* Debug */,
-				2690CD1C1A6DC0D000E717C8 /* DebugClang */,
-				2690CD1D1A6DC0D000E717C8 /* Release */,
-				2690CD1E1A6DC0D000E717C8 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		26CEF3AD14FD58BF007286B2 /* Build configuration list for PBXAggregateTarget "desktop_no_xpc" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				26CEF3AA14FD58BF007286B2 /* Debug */,
-				49BB8F361611172B00BDD462 /* DebugClang */,
-				26CEF3AB14FD58BF007286B2 /* Release */,
-				26CEF3AC14FD58BF007286B2 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		26CEF3B214FD592B007286B2 /* Build configuration list for PBXAggregateTarget "desktop" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				26CEF3B314FD592B007286B2 /* Debug */,
-				49BB8F351611172B00BDD462 /* DebugClang */,
-				26CEF3B414FD592B007286B2 /* Release */,
-				26CEF3B514FD592B007286B2 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		26CEF3BD14FD596A007286B2 /* Build configuration list for PBXAggregateTarget "ios" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				26CEF3BE14FD596A007286B2 /* Debug */,
-				49BB8F371611172B00BDD462 /* DebugClang */,
-				26CEF3BF14FD596A007286B2 /* Release */,
-				26CEF3C014FD596A007286B2 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		26DC6A1A1337FE8B00FF7998 /* Build configuration list for PBXNativeTarget "lldb-server" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				26DC6A121337FE6A00FF7998 /* Debug */,
-				49BB8F3C1611172B00BDD462 /* DebugClang */,
-				26DC6A131337FE6A00FF7998 /* Release */,
-				26DC6A141337FE6A00FF7998 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		26F5C26E10F3D9C5009D5894 /* Build configuration list for PBXNativeTarget "lldb-tool" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				26F5C26C10F3D9A5009D5894 /* Debug */,
-				49BB8F381611172B00BDD462 /* DebugClang */,
-				26F5C26D10F3D9A5009D5894 /* Release */,
-				268A89B311963ECA00D953EB /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		942829C41A89835400521B30 /* Build configuration list for PBXNativeTarget "lldb-argdumper" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				942829C51A89835400521B30 /* Debug */,
-				942829C61A89835400521B30 /* DebugClang */,
-				942829C71A89835400521B30 /* Release */,
-				942829C81A89835400521B30 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		AFA9B71F20606A13008E86C6 /* Build configuration list for PBXAggregateTarget "ios-mini" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				AFA9B72020606A13008E86C6 /* Debug */,
-				AFA9B72120606A13008E86C6 /* DebugClang */,
-				AFA9B72220606A13008E86C6 /* Release */,
-				AFA9B72320606A13008E86C6 /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-		DD8DC27022026E2C00EB6F9E /* Build configuration list for PBXAggregateTarget "lldb-docs" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				DD8DC26C22026E2C00EB6F9E /* Debug */,
-				DD8DC26D22026E2C00EB6F9E /* DebugClang */,
-				DD8DC26E22026E2C00EB6F9E /* Release */,
-				DD8DC26F22026E2C00EB6F9E /* BuildAndIntegration */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = BuildAndIntegration;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
-}
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/src/llvm-project/lldb/lldb.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 99276bd..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
-   version = "1.0">
-   <FileRef
-      location = "self:lldb.xcodeproj">
-   </FileRef>
-</Workspace>
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme b/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme
deleted file mode 100644
index 881829e..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/LLDB.xcscheme
+++ /dev/null
@@ -1,107 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0720"
-   version = "1.8">
-   <BuildAction
-      parallelizeBuildables = "NO"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "26680206115FD0ED008E1FE4"
-               BuildableName = "LLDB.framework"
-               BlueprintName = "LLDB"
-               ReferencedContainer = "container:lldb.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <EnvironmentVariables>
-         <EnvironmentVariable
-            key = "BLUBBY"
-            value = "YES"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-      </EnvironmentVariables>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      displayScaleIsEnabled = "NO"
-      displayScale = "1.00"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES"
-      queueDebuggingEnabled = "No">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-      <EnvironmentVariables>
-         <EnvironmentVariable
-            key = "BLUBBY"
-            value = "YES"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-      </EnvironmentVariables>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      displayScaleIsEnabled = "NO"
-      displayScale = "1.00"
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <EnvironmentVariables>
-         <EnvironmentVariable
-            key = "BLUBBY"
-            value = "YES"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-      </EnvironmentVariables>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme b/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
deleted file mode 100644
index fb4bc13..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/Run Testsuite.xcscheme
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0720"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-               BuildableName = "lldb"
-               BlueprintName = "lldb-tool"
-               ReferencedContainer = "container:lldb.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "YES"
-      customWorkingDirectory = "$(PROJECT_DIR)/test"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES"
-      queueDebuggingEnabled = "No">
-      <PathRunnable
-         runnableDebuggingMode = "0"
-         FilePath = "/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python">
-      </PathRunnable>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <CommandLineArguments>
-         <CommandLineArgument
-            argument = "dotest.py"
-            isEnabled = "YES">
-         </CommandLineArgument>
-         <CommandLineArgument
-            argument = "-t"
-            isEnabled = "YES">
-         </CommandLineArgument>
-         <CommandLineArgument
-            argument = "-v"
-            isEnabled = "YES">
-         </CommandLineArgument>
-         <CommandLineArgument
-            argument = "-A x86_64"
-            isEnabled = "YES">
-         </CommandLineArgument>
-         <CommandLineArgument
-            argument = "functionalities/breakpoint/breakpoint_conditions"
-            isEnabled = "YES">
-         </CommandLineArgument>
-      </CommandLineArguments>
-      <AdditionalOptions>
-         <AdditionalOption
-            key = "DYLD_INSERT_LIBRARIES"
-            value = "/usr/lib/libgmalloc.dylib"
-            isEnabled = "YES">
-         </AdditionalOption>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme b/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme
deleted file mode 100644
index 74864b2..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/darwin-debug.xcscheme
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0720"
-   version = "1.8">
-   <BuildAction
-      parallelizeBuildables = "NO"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "26579F67126A25920007C5CB"
-               BuildableName = "darwin-debug"
-               BlueprintName = "darwin-debug"
-               ReferencedContainer = "container:lldb.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <EnvironmentVariables>
-         <EnvironmentVariable
-            key = "GRUBBY"
-            value = "YES"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-      </EnvironmentVariables>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      displayScaleIsEnabled = "NO"
-      displayScale = "1.00"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES"
-      queueDebuggingEnabled = "No">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26579F67126A25920007C5CB"
-            BuildableName = "darwin-debug"
-            BlueprintName = "darwin-debug"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-      <EnvironmentVariables>
-         <EnvironmentVariable
-            key = "GRUBBY"
-            value = "YES"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-      </EnvironmentVariables>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      displayScaleIsEnabled = "NO"
-      displayScale = "1.00"
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26579F67126A25920007C5CB"
-            BuildableName = "darwin-debug"
-            BlueprintName = "darwin-debug"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-      <EnvironmentVariables>
-         <EnvironmentVariable
-            key = "GRUBBY"
-            value = "YES"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-      </EnvironmentVariables>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/desktop.xcscheme b/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/desktop.xcscheme
deleted file mode 100644
index d31912e..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/desktop.xcscheme
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0720"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "26CEF3B114FD592B007286B2"
-               BuildableName = "desktop"
-               BlueprintName = "desktop"
-               ReferencedContainer = "container:lldb.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "DebugClang"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "1"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26CEF3B114FD592B007286B2"
-            BuildableName = "desktop"
-            BlueprintName = "desktop"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/launcherRootXPCService.xcscheme b/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/launcherRootXPCService.xcscheme
deleted file mode 100644
index 5e1b68c..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/launcherRootXPCService.xcscheme
+++ /dev/null
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0720"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "EDE274E214EDCE1F005B0F75"
-               BuildableName = "com.apple.lldb.launcherRootXPCService.xpc"
-               BlueprintName = "launcherRootXPCService"
-               ReferencedContainer = "container:lldb.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES"
-      queueDebuggingEnabled = "No">
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "EDE274E214EDCE1F005B0F75"
-            BuildableName = "com.apple.lldb.launcherRootXPCService.xpc"
-            BlueprintName = "launcherRootXPCService"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/launcherXPCService.xcscheme b/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/launcherXPCService.xcscheme
deleted file mode 100644
index 39629e1..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/launcherXPCService.xcscheme
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0720"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "EDC6D49814E5C19B001B75F8"
-               BuildableName = "com.apple.lldb.launcherXPCService.xpc"
-               BlueprintName = "launcherXPCService"
-               ReferencedContainer = "container:lldb.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
-      launchStyle = "1"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES"
-      queueDebuggingEnabled = "No">
-      <PathRunnable
-         runnableDebuggingMode = "0"
-         FilePath = "/Users/moi/Library/Developer/Xcode/DerivedData/Xcode-ezhudafllefyhcfivqaeslnymjsj/Build/Products/Debug/LLDB.framework/XPCServices/com.apple.lldb.launcherXPCService.xpc/Contents/MacOS/com.apple.lldb.launcherXPCService">
-      </PathRunnable>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "EDC6D49814E5C19B001B75F8"
-            BuildableName = "com.apple.lldb.launcherXPCService.xpc"
-            BlueprintName = "launcherXPCService"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-gtest.xcscheme b/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-gtest.xcscheme
deleted file mode 100644
index 4cbbbb3..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-gtest.xcscheme
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0720"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "239504D31BDD451400963CEA"
-               BuildableName = "lldb-gtest"
-               BlueprintName = "lldb-gtest"
-               ReferencedContainer = "container:lldb.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "239504D31BDD451400963CEA"
-            BuildableName = "lldb-gtest"
-            BlueprintName = "lldb-gtest"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <Testables>
-      </Testables>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES"
-      queueDebuggingEnabled = "No">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "239504D31BDD451400963CEA"
-            BuildableName = "lldb-gtest"
-            BlueprintName = "lldb-gtest"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "239504D31BDD451400963CEA"
-            BuildableName = "lldb-gtest"
-            BlueprintName = "lldb-gtest"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-python-test-suite.xcscheme b/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-python-test-suite.xcscheme
deleted file mode 100644
index dcf0c0f..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-python-test-suite.xcscheme
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0720"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "YES"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "2387551E1C24974600CCE8C3"
-               BuildableName = "lldb-python-test-suite"
-               BlueprintName = "lldb-python-test-suite"
-               ReferencedContainer = "container:lldb.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "0"
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "NO"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "2387551E1C24974600CCE8C3"
-            BuildableName = "lldb-python-test-suite"
-            BlueprintName = "lldb-python-test-suite"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      debugDocumentVersioning = "YES">
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "2387551E1C24974600CCE8C3"
-            BuildableName = "lldb-python-test-suite"
-            BlueprintName = "lldb-python-test-suite"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme b/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
deleted file mode 100644
index f13dc97..0000000
--- a/src/llvm-project/lldb/lldb.xcodeproj/xcshareddata/xcschemes/lldb-tool.xcscheme
+++ /dev/null
@@ -1,215 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
-   LastUpgradeVersion = "0720"
-   version = "1.3">
-   <BuildAction
-      parallelizeBuildables = "NO"
-      buildImplicitDependencies = "YES">
-      <BuildActionEntries>
-         <BuildActionEntry
-            buildForTesting = "YES"
-            buildForRunning = "YES"
-            buildForProfiling = "YES"
-            buildForArchiving = "YES"
-            buildForAnalyzing = "YES">
-            <BuildableReference
-               BuildableIdentifier = "primary"
-               BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-               BuildableName = "lldb"
-               BlueprintName = "lldb-tool"
-               ReferencedContainer = "container:lldb.xcodeproj">
-            </BuildableReference>
-         </BuildActionEntry>
-      </BuildActionEntries>
-   </BuildAction>
-   <TestAction
-      buildConfiguration = "Debug"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      shouldUseLaunchSchemeArgsEnv = "YES">
-      <Testables>
-      </Testables>
-      <MacroExpansion>
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </MacroExpansion>
-      <CommandLineArguments>
-         <CommandLineArgument
-            argument = "/Volumes/work/gclayton/Documents/src/attach/a.out"
-            isEnabled = "NO">
-         </CommandLineArgument>
-         <CommandLineArgument
-            argument = "-a i386 /Volumes/work/gclayton/Documents/src/lldb/test/macosx/universal/testit"
-            isEnabled = "YES">
-         </CommandLineArgument>
-      </CommandLineArguments>
-      <EnvironmentVariables>
-         <EnvironmentVariable
-            key = "LLDB_LAUNCH_FLAG_DISABLE_ASLR"
-            value = "YES"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY"
-            value = "YES"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_LAUNCH_FLAG_DISABLE_STDIO"
-            value = "YES"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_DEBUGSERVER_PATH"
-            value = "/tmp/debugserver"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_DEBUGSERVER_LOG_FILE"
-            value = "/tmp/debugserver.txt"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_DEBUGSERVER_LOG_FLAGS"
-            value = "0x802e0e"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-      </EnvironmentVariables>
-      <AdditionalOptions>
-      </AdditionalOptions>
-   </TestAction>
-   <LaunchAction
-      buildConfiguration = "DebugClang"
-      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
-      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
-      launchStyle = "1"
-      useCustomWorkingDirectory = "NO"
-      customWorkingDirectory = "/Volumes/work/gclayton/Documents/devb/attach"
-      ignoresPersistentStateOnLaunch = "YES"
-      debugDocumentVersioning = "YES"
-      debugServiceExtension = "internal"
-      allowLocationSimulation = "YES"
-      queueDebuggingEnabled = "No">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-      <EnvironmentVariables>
-         <EnvironmentVariable
-            key = "LLDB_LAUNCH_FLAG_DISABLE_ASLR"
-            value = "YES"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY"
-            value = "YES"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_LAUNCH_FLAG_DISABLE_STDIO"
-            value = "YES"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_DEBUGSERVER_PATH"
-            value = "/tmp/debugserver"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_DEBUGSERVER_LOG_FILE"
-            value = "/tmp/debugserver.txt"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_DEBUGSERVER_LOG_FLAGS"
-            value = "0x802e0e"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-      </EnvironmentVariables>
-      <AdditionalOptions>
-         <AdditionalOption
-            key = "MallocScribble"
-            value = ""
-            isEnabled = "YES">
-         </AdditionalOption>
-      </AdditionalOptions>
-   </LaunchAction>
-   <ProfileAction
-      buildConfiguration = "Release"
-      shouldUseLaunchSchemeArgsEnv = "YES"
-      savedToolIdentifier = ""
-      useCustomWorkingDirectory = "NO"
-      ignoresPersistentStateOnLaunch = "YES"
-      debugDocumentVersioning = "YES">
-      <BuildableProductRunnable
-         runnableDebuggingMode = "0">
-         <BuildableReference
-            BuildableIdentifier = "primary"
-            BlueprintIdentifier = "26F5C26910F3D9A4009D5894"
-            BuildableName = "lldb"
-            BlueprintName = "lldb-tool"
-            ReferencedContainer = "container:lldb.xcodeproj">
-         </BuildableReference>
-      </BuildableProductRunnable>
-      <CommandLineArguments>
-         <CommandLineArgument
-            argument = "/Volumes/work/gclayton/Documents/src/attach/a.out"
-            isEnabled = "NO">
-         </CommandLineArgument>
-         <CommandLineArgument
-            argument = "-a i386 /Volumes/work/gclayton/Documents/src/lldb/test/macosx/universal/testit"
-            isEnabled = "YES">
-         </CommandLineArgument>
-      </CommandLineArguments>
-      <EnvironmentVariables>
-         <EnvironmentVariable
-            key = "LLDB_LAUNCH_FLAG_DISABLE_ASLR"
-            value = "YES"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_LAUNCH_FLAG_LAUNCH_IN_TTY"
-            value = "YES"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_LAUNCH_FLAG_DISABLE_STDIO"
-            value = "YES"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_DEBUGSERVER_PATH"
-            value = "/tmp/debugserver"
-            isEnabled = "NO">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_DEBUGSERVER_LOG_FILE"
-            value = "/tmp/debugserver.txt"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-         <EnvironmentVariable
-            key = "LLDB_DEBUGSERVER_LOG_FLAGS"
-            value = "0x802e0e"
-            isEnabled = "YES">
-         </EnvironmentVariable>
-      </EnvironmentVariables>
-   </ProfileAction>
-   <AnalyzeAction
-      buildConfiguration = "Debug">
-   </AnalyzeAction>
-   <ArchiveAction
-      buildConfiguration = "Release"
-      revealArchiveInOrganizer = "YES">
-   </ArchiveAction>
-</Scheme>
diff --git a/src/llvm-project/lldb/lldb.xcworkspace/contents.xcworkspacedata b/src/llvm-project/lldb/lldb.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index f92eecc..0000000
--- a/src/llvm-project/lldb/lldb.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
-   version = "1.0">
-   <FileRef
-      location = "group:lldb.xcodeproj">
-   </FileRef>
-   <FileRef
-      location = "group:tools/debugserver/debugserver.xcodeproj">
-   </FileRef>
-</Workspace>
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/README.md b/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/README.md
deleted file mode 100644
index 921eedb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/README.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# pre\_kill\_hook package
-
-## Overview
-
-The pre\_kill\_hook package provides a per-platform method for running code
-after a test process times out but before the concurrent test runner kills the
-timed-out process.
-
-## Detailed Description of Usage
-
-If a platform defines the hook, then the hook gets called right after a timeout
-is detected in a test run, but before the process is killed.
-
-The pre-kill-hook mechanism works as follows:
-
-* When a timeout is detected in the process_control.ProcessDriver class that
-  runs the per-test lldb process, a new overridable on\_timeout\_pre\_kill() method
-  is called on the ProcessDriver instance.
-
-* The concurrent test driver's derived ProcessDriver overrides this method. It
-  looks to see if a module called
-  "lldbsuite.pre\_kill\_hook.{platform-system-name}" module exists, where
-  platform-system-name is replaced with platform.system().lower().  (e.g.
-  "Darwin" becomes the darwin.py module).
-  
-  * If that module doesn't exist, the rest of the new behavior is skipped.
-
-  * If that module does exist, it is loaded, and the method
-    "do\_pre\_kill(process\_id, context\_dict, output\_stream)" is called. If
-    that method throws an exception, we log it and we ignore further processing
-    of the pre-killed process.
-
-  * The process\_id argument of the do\_pre\_kill function is the process id as
-    returned by the ProcessDriver.pid property.
-  
-  * The output\_stream argument of the do\_pre\_kill function takes a file-like
-    object. Output to be collected from doing any processing on the
-    process-to-be-killed should be written into the file-like object. The
-    current impl uses a six.StringIO and then writes this output to
-    {TestFilename}-{pid}.sample in the session directory.
-    
-* Platforms where platform.system() is "Darwin" will get a pre-kill action that
-  runs the 'sample' program on the lldb that has timed out. That data will be
-  collected on CI and analyzed to determine what is happening during timeouts.
-  (This has an advantage over a core in that it is much smaller and that it
-  clearly demonstrates any liveness of the process, if there is any).
-
-## Running the tests
-
-To run the tests in the pre\_kill\_hook package, open a console, change into
-this directory and run the following:
-
-```
-python -m unittest discover
-```
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/__init__.py b/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/__init__.py
deleted file mode 100644
index c3a852e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""Initialize the package."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/darwin.py b/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/darwin.py
deleted file mode 100644
index 2bee65a..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/darwin.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""Provides a pre-kill method to run on macOS."""
-from __future__ import print_function
-
-# system imports
-import subprocess
-import sys
-
-# third-party module imports
-import six
-
-
-def do_pre_kill(process_id, runner_context, output_stream, sample_time=3):
-    """Samples the given process id, and puts the output to output_stream.
-
-    @param process_id the local process to sample.
-
-    @param runner_context a dictionary of details about the architectures
-    and platform on which the given process is running.  Expected keys are
-    archs (array of architectures), platform_name, platform_url, and
-    platform_working_dir.
-
-    @param output_stream file-like object that should be used to write the
-    results of sampling.
-
-    @param sample_time specifies the time in seconds that should be captured.
-    """
-
-    # Validate args.
-    if runner_context is None:
-        raise Exception("runner_context argument is required")
-    if not isinstance(runner_context, dict):
-        raise Exception("runner_context argument must be a dictionary")
-
-    # We will try to run sample on the local host only if there is no URL
-    # to a remote.
-    if "platform_url" in runner_context and (
-            runner_context["platform_url"] is not None):
-        import pprint
-        sys.stderr.write(
-            "warning: skipping timeout pre-kill sample invocation because we "
-            "don't know how to run on a remote yet. runner_context={}\n"
-            .format(pprint.pformat(runner_context)))
-
-    output = subprocess.check_output(['sample', six.text_type(process_id),
-                                      str(sample_time)])
-    output_stream.write(output)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/linux.py b/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/linux.py
deleted file mode 100644
index d4cd9be..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/linux.py
+++ /dev/null
@@ -1,76 +0,0 @@
-"""Provides a pre-kill method to run on Linux.
-
-This timeout pre-kill method relies on the Linux perf-tools
-distribution.  The appropriate way to obtain this set of tools
-will depend on the Linux distribution.
-
-For Ubuntu 16.04, the invoke the following command:
-sudo apt-get install perf-tools-unstable
-"""
-from __future__ import print_function
-
-# system imports
-import os
-import subprocess
-import sys
-import tempfile
-
-
-def do_pre_kill(process_id, runner_context, output_stream, sample_time=3):
-    """Samples the given process id, and puts the output to output_stream.
-
-    @param process_id the local process to sample.
-
-    @param runner_context a dictionary of details about the architectures
-    and platform on which the given process is running.  Expected keys are
-    archs (array of architectures), platform_name, platform_url, and
-    platform_working_dir.
-
-    @param output_stream file-like object that should be used to write the
-    results of sampling.
-
-    @param sample_time specifies the time in seconds that should be captured.
-    """
-
-    # Validate args.
-    if runner_context is None:
-        raise Exception("runner_context argument is required")
-    if not isinstance(runner_context, dict):
-        raise Exception("runner_context argument must be a dictionary")
-
-    # We will try to run sample on the local host only if there is no URL
-    # to a remote.
-    if "platform_url" in runner_context and (
-            runner_context["platform_url"] is not None):
-        import pprint
-        sys.stderr.write(
-            "warning: skipping timeout pre-kill sample invocation because we "
-            "don't know how to run on a remote yet. runner_context={}\n"
-            .format(pprint.pformat(runner_context)))
-
-    # We're going to create a temp file, and immediately overwrite it with the
-    # following command.  This just ensures we don't have any races in
-    # creation of the temporary sample file.
-    fileno, filename = tempfile.mkstemp(suffix='perfdata')
-    os.close(fileno)
-    fileno = None
-
-    try:
-        with open(os.devnull, 'w') as devnull:
-            returncode = subprocess.call(['timeout', str(sample_time), 'perf',
-                                          'record', '-g', '-o', filename, '-p', str(process_id)],
-                                         stdout=devnull, stderr=devnull)
-        if returncode == 0 or returncode == 124:
-            # This is okay - this is the timeout return code, which is totally
-            # expected.
-            pass
-        else:
-            raise Exception("failed to call 'perf record .., error: {}".format(
-                returncode))
-
-        with open(os.devnull, 'w') as devnull:
-            output = subprocess.check_output(['perf', 'report', '--call-graph',
-                                              '--stdio', '-i', filename], stderr=devnull)
-        output_stream.write(output)
-    finally:
-        os.remove(filename)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/tests/__init__.py b/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/tests/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/tests/__init__.py
+++ /dev/null
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py b/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
deleted file mode 100644
index 810b364..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/tests/test_darwin.py
+++ /dev/null
@@ -1,107 +0,0 @@
-"""Test the pre-kill hook on Darwin."""
-from __future__ import print_function
-
-# system imports
-from multiprocessing import Process, Queue
-import platform
-import re
-from unittest import main, TestCase
-
-# third party
-from six import StringIO
-
-
-def do_child_process(child_work_queue, parent_work_queue, verbose):
-    import os
-
-    pid = os.getpid()
-    if verbose:
-        print("child: pid {} started, sending to parent".format(pid))
-    parent_work_queue.put(pid)
-    if verbose:
-        print("child: waiting for shut-down request from parent")
-    child_work_queue.get()
-    if verbose:
-        print("child: received shut-down request.  Child exiting.")
-
-
-class DarwinPreKillTestCase(TestCase):
-
-    def __init__(self, methodName):
-        super(DarwinPreKillTestCase, self).__init__(methodName)
-        self.process = None
-        self.child_work_queue = None
-        self.verbose = False
-
-    def tearDown(self):
-        if self.verbose:
-            print("parent: sending shut-down request to child")
-        if self.process:
-            self.child_work_queue.put("hello, child")
-            self.process.join()
-        if self.verbose:
-            print("parent: child is fully shut down")
-
-    def test_sample(self):
-        # Ensure we're Darwin.
-        if platform.system() != 'Darwin':
-            self.skipTest("requires a Darwin-based OS")
-
-        # Start the child process.
-        self.child_work_queue = Queue()
-        parent_work_queue = Queue()
-        self.process = Process(target=do_child_process,
-                               args=(self.child_work_queue, parent_work_queue,
-                                     self.verbose))
-        if self.verbose:
-            print("parent: starting child")
-        self.process.start()
-
-        # Wait for the child to report its pid.  Then we know we're running.
-        if self.verbose:
-            print("parent: waiting for child to start")
-        child_pid = parent_work_queue.get()
-
-        # Sample the child process.
-        from darwin import do_pre_kill
-        context_dict = {
-            "archs": [platform.machine()],
-            "platform_name": None,
-            "platform_url": None,
-            "platform_working_dir": None
-        }
-
-        if self.verbose:
-            print("parent: running pre-kill action on child")
-        output_io = StringIO()
-        do_pre_kill(child_pid, context_dict, output_io)
-        output = output_io.getvalue()
-
-        if self.verbose:
-            print("parent: do_pre_kill() wrote the following output:", output)
-        self.assertIsNotNone(output)
-
-        # We should have a line with:
-        # Process:  .* [{pid}]
-        process_re = re.compile(r"Process:[^[]+\[([^]]+)\]")
-        match = process_re.search(output)
-        self.assertIsNotNone(match, "should have found process id for "
-                             "sampled process")
-        self.assertEqual(1, len(match.groups()))
-        self.assertEqual(child_pid, int(match.group(1)))
-
-        # We should see a Call graph: section.
-        callgraph_re = re.compile(r"Call graph:")
-        match = callgraph_re.search(output)
-        self.assertIsNotNone(match, "should have found the Call graph section"
-                             "in sample output")
-
-        # We should see a Binary Images: section.
-        binary_images_re = re.compile(r"Binary Images:")
-        match = binary_images_re.search(output)
-        self.assertIsNotNone(match, "should have found the Binary Images "
-                             "section in sample output")
-
-
-if __name__ == "__main__":
-    main()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py b/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py
deleted file mode 100644
index ab989df..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/pre_kill_hook/tests/test_linux.py
+++ /dev/null
@@ -1,133 +0,0 @@
-"""Test the pre-kill hook on Linux."""
-from __future__ import print_function
-
-# system imports
-from multiprocessing import Process, Queue
-import platform
-import re
-import subprocess
-from unittest import main, TestCase
-
-# third party
-from six import StringIO
-
-
-def do_child_thread():
-    import os
-    x = 0
-    while True:
-        x = x + 42 * os.getpid()
-    return x
-
-
-def do_child_process(child_work_queue, parent_work_queue, verbose):
-    import os
-
-    pid = os.getpid()
-    if verbose:
-        print("child: pid {} started, sending to parent".format(pid))
-    parent_work_queue.put(pid)
-
-    # Spin up a daemon thread to do some "work", which will show
-    # up in a sample of this process.
-    import threading
-    worker = threading.Thread(target=do_child_thread)
-    worker.daemon = True
-    worker.start()
-
-    if verbose:
-        print("child: waiting for shut-down request from parent")
-    child_work_queue.get()
-    if verbose:
-        print("child: received shut-down request.  Child exiting.")
-
-
-class LinuxPreKillTestCase(TestCase):
-
-    def __init__(self, methodName):
-        super(LinuxPreKillTestCase, self).__init__(methodName)
-        self.process = None
-        self.child_work_queue = None
-        self.verbose = False
-        # self.verbose = True
-
-    def tearDown(self):
-        if self.verbose:
-            print("parent: sending shut-down request to child")
-        if self.process:
-            self.child_work_queue.put("hello, child")
-            self.process.join()
-        if self.verbose:
-            print("parent: child is fully shut down")
-
-    def test_sample(self):
-        # Ensure we're Darwin.
-        if platform.system() != 'Linux':
-            self.skipTest("requires a Linux-based OS")
-
-        # Ensure we have the 'perf' tool.  If not, skip the test.
-        try:
-            perf_version = subprocess.check_output(["perf", "version"])
-            if perf_version is None or not (
-                    perf_version.startswith("perf version")):
-                raise Exception("The perf executable doesn't appear"
-                                " to be the Linux perf tools perf")
-        except Exception:
-            self.skipTest("requires the Linux perf tools 'perf' command")
-
-        # Start the child process.
-        self.child_work_queue = Queue()
-        parent_work_queue = Queue()
-        self.process = Process(target=do_child_process,
-                               args=(self.child_work_queue, parent_work_queue,
-                                     self.verbose))
-        if self.verbose:
-            print("parent: starting child")
-        self.process.start()
-
-        # Wait for the child to report its pid.  Then we know we're running.
-        if self.verbose:
-            print("parent: waiting for child to start")
-        child_pid = parent_work_queue.get()
-
-        # Sample the child process.
-        from linux import do_pre_kill
-        context_dict = {
-            "archs": [platform.machine()],
-            "platform_name": None,
-            "platform_url": None,
-            "platform_working_dir": None
-        }
-
-        if self.verbose:
-            print("parent: running pre-kill action on child")
-        output_io = StringIO()
-        do_pre_kill(child_pid, context_dict, output_io)
-        output = output_io.getvalue()
-
-        if self.verbose:
-            print("parent: do_pre_kill() wrote the following output:", output)
-        self.assertIsNotNone(output)
-
-        # We should have a samples count entry.
-        # Samples:
-        self.assertTrue("Samples:" in output, "should have found a 'Samples:' "
-                        "field in the sampled process output")
-
-        # We should see an event count entry
-        event_count_re = re.compile(r"Event count[^:]+:\s+(\d+)")
-        match = event_count_re.search(output)
-        self.assertIsNotNone(match, "should have found the event count entry "
-                             "in sample output")
-        if self.verbose:
-            print("cpu-clock events:", match.group(1))
-
-        # We should see some percentages in the file.
-        percentage_re = re.compile(r"\d+\.\d+%")
-        match = percentage_re.search(output)
-        self.assertIsNotNone(match, "should have found at least one percentage "
-                             "in the sample output")
-
-
-if __name__ == "__main__":
-    main()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/support/fs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/support/fs.py
deleted file mode 100644
index 71394f0..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/support/fs.py
+++ /dev/null
@@ -1,64 +0,0 @@
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-Prepares language bindings for LLDB build process.  Run with --help
-to see a description of the supported command line arguments.
-"""
-
-# Python modules:
-import os
-import platform
-import sys
-
-
-def _find_file_in_paths(paths, exe_basename):
-    """Returns the full exe path for the first path match.
-
-    @params paths the list of directories to search for the exe_basename
-    executable
-    @params exe_basename the name of the file for which to search.
-    e.g. "swig" or "swig.exe".
-
-    @return the full path to the executable if found in one of the
-    given paths; otherwise, returns None.
-    """
-    for path in paths:
-        trial_exe_path = os.path.join(path, exe_basename)
-        if os.path.exists(trial_exe_path):
-            return os.path.normcase(trial_exe_path)
-    return None
-
-
-def find_executable(executable):
-    """Finds the specified executable in the PATH or known good locations."""
-
-    # Figure out what we're looking for.
-    if platform.system() == "Windows":
-        executable = executable + ".exe"
-        extra_dirs = []
-    else:
-        extra_dirs = ["/usr/local/bin"]
-
-    # Figure out what paths to check.
-    path_env = os.environ.get("PATH", None)
-    if path_env is not None:
-        paths_to_check = path_env.split(os.path.pathsep)
-    else:
-        paths_to_check = []
-
-    # Add in the extra dirs
-    paths_to_check.extend(extra_dirs)
-    if len(paths_to_check) < 1:
-        raise os.OSError(
-            "executable was not specified, PATH has no "
-            "contents, and there are no extra directories to search")
-
-    result = _find_file_in_paths(paths_to_check, executable)
-
-    if not result or len(result) < 1:
-        raise os.OSError(
-            "failed to find exe='%s' in paths='%s'" %
-            (executable, paths_to_check))
-    return result
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/support/funcutils.py b/src/llvm-project/lldb/packages/Python/lldbsuite/support/funcutils.py
index 2fa1009..648d95d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/support/funcutils.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/support/funcutils.py
@@ -1,14 +1,5 @@
-from __future__ import print_function
-from __future__ import absolute_import
-
-# System modules
 import inspect
 
-# Third-party modules
-
-# LLDB modules
-
-
 def requires_self(func):
     func_argc = len(inspect.getargspec(func).args)
     if func_argc == 0 or (
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/support/optional_with.py b/src/llvm-project/lldb/packages/Python/lldbsuite/support/optional_with.py
deleted file mode 100644
index f91b3c6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/support/optional_with.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# ====================================================================
-# Provides a with-style resource handler for optionally-None resources
-# ====================================================================
-
-
-class optional_with(object):
-    # pylint: disable=too-few-public-methods
-    # This is a wrapper - it is not meant to provide any extra methods.
-    """Provides a wrapper for objects supporting "with", allowing None.
-
-    This lets a user use the "with object" syntax for resource usage
-    (e.g. locks) even when the wrapped with object is None.
-
-    e.g.
-
-    wrapped_lock = optional_with(thread.Lock())
-    with wrapped_lock:
-        # Do something while the lock is obtained.
-        pass
-
-    might_be_none = None
-    wrapped_none = optional_with(might_be_none)
-    with wrapped_none:
-        # This code here still works.
-        pass
-
-    This prevents having to write code like this when
-    a lock is optional:
-
-    if lock:
-        lock.acquire()
-
-    try:
-        code_fragment_always_run()
-    finally:
-        if lock:
-            lock.release()
-
-    And I'd posit it is safer, as it becomes impossible to
-    forget the try/finally using optional_with(), since
-    the with syntax can be used.
-    """
-
-    def __init__(self, wrapped_object):
-        self.wrapped_object = wrapped_object
-
-    def __enter__(self):
-        if self.wrapped_object is not None:
-            return self.wrapped_object.__enter__()
-        else:
-            return self
-
-    def __exit__(self, the_type, value, traceback):
-        if self.wrapped_object is not None:
-            return self.wrapped_object.__exit__(the_type, value, traceback)
-        else:
-            # Don't suppress any exceptions
-            return False
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/support/sockutil.py b/src/llvm-project/lldb/packages/Python/lldbsuite/support/sockutil.py
deleted file mode 100644
index 56a9ed8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/support/sockutil.py
+++ /dev/null
@@ -1,23 +0,0 @@
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-Helper functions for working with sockets.
-"""
-
-# Python modules:
-import io
-import socket
-
-# LLDB modules
-import use_lldb_suite
-
-
-def recvall(sock, size):
-    bytes = io.BytesIO()
-    while size > 0:
-        this_result = sock.recv(size)
-        bytes.write(this_result)
-        size -= len(this_result)
-    return bytes.getvalue()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/.categories
deleted file mode 100644
index e69de29..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/.categories
+++ /dev/null
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/Makefile
deleted file mode 100644
index 4d08ef3..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-LLDB_LEVEL := ..
-include $(LLDB_LEVEL)/Makefile
-
-.PHONY: programs
-
-all:: check-local
-
-#----------------------------------------------------------------------
-# Make all of the test programs
-#----------------------------------------------------------------------
-programs:
-	find . -type d -depth 1 | xargs -J % find % \
-		-name Makefile \
-		-exec echo \; \
-		-exec echo make -f '{}' \; \
-		-execdir make \;
-
-#----------------------------------------------------------------------
-# Clean all of the test programs
-#----------------------------------------------------------------------
-clean::
-	find . -type d -depth 1 | xargs -J % find % \
-		-name Makefile \
-		-exec echo \; \
-		-exec echo make -f '{}' clean \; \
-		-execdir make clean \;
-
-#----------------------------------------------------------------------
-# Run the tests
-#----------------------------------------------------------------------
-check-local::
-	rm -rf lldb-test-traces
-	python $(PROJ_SRC_DIR)/dotest.py --executable $(ToolDir)/lldb -q -s lldb-test-traces -u CXXFLAGS -u CFLAGS -C $(subst ccache,,$(CC))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/android/platform/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/android/platform/Makefile
index 22e42c5..3d0b98f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/android/platform/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/android/platform/Makefile
@@ -1,4 +1,2 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py
index 38685cd..0a5475c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py
@@ -2,10 +2,8 @@
 Verify the default cache line size for android targets
 """
 
-from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
index 20fd303..6f95cd7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/check_public_api_headers/TestPublicAPIHeaders.py
@@ -6,8 +6,6 @@
 from __future__ import print_function
 
 
-import os
-import re
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/command-return-object/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/command-return-object/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/command-return-object/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/command-return-object/TestSBCommandReturnObject.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/command-return-object/TestSBCommandReturnObject.py
new file mode 100644
index 0000000..c7aa2ec
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/command-return-object/TestSBCommandReturnObject.py
@@ -0,0 +1,34 @@
+"""Test the lldb public C++ api for returning SBCommandReturnObject."""
+
+from __future__ import print_function
+
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestSBCommandReturnObject(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIfNoSBHeaders
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr43570")
+    def test_sb_command_return_object(self):
+        env = {self.dylibPath: self.getLLDBLibraryEnvVal()}
+
+        self.driver_exe = self.getBuildArtifact("command-return-object")
+        self.buildDriver('main.cpp', self.driver_exe)
+        self.addTearDownHook(lambda: os.remove(self.driver_exe))
+        self.signBinary(self.driver_exe)
+
+        if self.TraceOn():
+            print("Running test %s" % self.driver_exe)
+            check_call([self.driver_exe, self.driver_exe], env=env)
+        else:
+            with open(os.devnull, 'w') as fnull:
+                check_call([self.driver_exe, self.driver_exe],
+                           env=env, stdout=fnull, stderr=fnull)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/command-return-object/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/command-return-object/main.cpp
new file mode 100644
index 0000000..c1d4d24
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/command-return-object/main.cpp
@@ -0,0 +1,33 @@
+#include "lldb/API/SBCommandInterpreter.h"
+#include "lldb/API/SBCommandReturnObject.h"
+#include "lldb/API/SBDebugger.h"
+
+using namespace lldb;
+
+static SBCommandReturnObject subcommand(SBDebugger &dbg, const char *cmd) {
+  SBCommandReturnObject Result;
+  dbg.GetCommandInterpreter().HandleCommand(cmd, Result);
+  return Result;
+}
+
+class CommandCrasher : public SBCommandPluginInterface {
+public:
+  bool DoExecute(SBDebugger dbg, char **command,
+                 SBCommandReturnObject &result) {
+    // Test assignment from a different SBCommandReturnObject instance.
+    result = subcommand(dbg, "help");
+    // Test also whether self-assignment is handled correctly.
+    result = result;
+    return result.Succeeded();
+  }
+};
+
+int main() {
+  SBDebugger::Initialize();
+  SBDebugger dbg = SBDebugger::Create(false /*source_init_files*/);
+  SBCommandInterpreter interp = dbg.GetCommandInterpreter();
+  static CommandCrasher crasher;
+  interp.AddCommand("crasher", &crasher, nullptr /*help*/);
+  SBCommandReturnObject Result;
+  dbg.GetCommandInterpreter().HandleCommand("crasher", Result);
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/listeners/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/listeners/Makefile
index fbedeab..692ba17 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/listeners/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/listeners/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/listeners/TestListener.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/listeners/TestListener.py
index 6b6a37e..480041b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/listeners/TestListener.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/listeners/TestListener.py
@@ -2,11 +2,7 @@
 Test that we can listen to modules loaded events.
 """
 
-from __future__ import print_function
 
-import copy
-import os
-import time
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -20,10 +16,6 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def test_receiving_breakpoint_added(self):
         """Test that we get breakpoint added events, waiting on event classes on the debugger"""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/log/TestAPILog.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/log/TestAPILog.py
new file mode 100644
index 0000000..c0ffa2c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/log/TestAPILog.py
@@ -0,0 +1,51 @@
+"""
+Test API logging.
+"""
+
+import re
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+
+class APILogTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_api_log(self):
+        """Test API logging"""
+        logfile = os.path.join(self.getBuildDir(), "api-log.txt")
+
+        def cleanup():
+            if os.path.exists(logfile):
+                os.unlink(logfile)
+
+        self.addTearDownHook(cleanup)
+        self.expect("log enable lldb api -f {}".format(logfile))
+
+        self.dbg.SetDefaultArchitecture(None)
+        self.dbg.GetScriptingLanguage(None)
+        target = self.dbg.CreateTarget(None)
+
+        print(logfile)
+        with open(logfile, 'r') as f:
+            log = f.read()
+
+        # Find the SBDebugger's address.
+        debugger_addr = re.findall(
+            r"lldb::SBDebugger::GetScriptingLanguage\([^)]*\) \(0x([0-9a-fA-F]+),",
+            log)
+
+        # Make sure we've found a match.
+        self.assertTrue(debugger_addr, log)
+
+        # Make sure the GetScriptingLanguage matches.
+        self.assertTrue(re.search(r'lldb::SBDebugger::GetScriptingLanguage\([^)]*\) \(0x{}, ""\)'.format(
+            debugger_addr[0]), log), log)
+
+        # Make sure the address matches.
+        self.assertTrue(re.search(r'lldb::SBDebugger::CreateTarget\([^)]*\) \(0x{}, ""\)'.format(
+            debugger_addr[0]), log), log)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/Makefile
index 08f8850e3..f40386a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../make
-
 MAKE_DSYM := NO
 
 ENABLE_THREADS := YES
 CXX_SOURCES := multi-process-driver.cpp testprog.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py
index f6bde75..1447bbd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-debuggers/TestMultipleDebuggers.py
@@ -4,9 +4,6 @@
 
 
 import os
-import re
-import subprocess
-import sys
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-targets/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-targets/Makefile
index bee559c..3316b59 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-targets/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-targets/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../make
-
 MAKE_DSYM := NO
 
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py
index f4e1669..1268ff9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multiple-targets/TestMultipleTargets.py
@@ -4,8 +4,6 @@
 
 
 import os
-import re
-import subprocess
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/Makefile
index 37323ea..8176721 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/Makefile
@@ -1,9 +1,7 @@
-LEVEL = ../../make
-
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 clean::
 	rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py
index d91eec1..436f645 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/TestMultithreaded.py
@@ -6,11 +6,9 @@
 
 
 import os
-import re
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
-import subprocess
 
 
 class SBBreakpointCallbackCase(TestBase):
@@ -47,7 +45,6 @@
         self.build_and_test(
             'driver.cpp listener_test.cpp test_listener_event_description.cpp',
             'test_listener_event_description')
-        pass
 
     @skipIfRemote
     @skipIfNoSBHeaders
@@ -61,7 +58,6 @@
         self.build_and_test(
             'driver.cpp listener_test.cpp test_listener_event_process_state.cpp',
             'test_listener_event_process_state')
-        pass
 
     @skipIfRemote
     @skipIfNoSBHeaders
@@ -74,7 +70,6 @@
         self.build_and_test(
             'driver.cpp listener_test.cpp test_listener_resume.cpp',
             'test_listener_resume')
-        pass
 
     def build_and_test(self, sources, test_name, args=None):
         """ Build LLDB test from sources, and run expecting 0 exit code """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template
index ebe7b8c..3245942 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/api/multithreaded/driver.cpp.template
@@ -32,6 +32,8 @@
   SBDebugger::Initialize();
   SBDebugger dbg = SBDebugger::Create();
   dbg.HandleCommand("settings set symbols.enable-external-lookup false");
+  dbg.HandleCommand(
+      "settings set plugin.process.gdb-remote.packet-timeout 60");
 
   try {
     if (!dbg.IsValid())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
index 5d2224c..f8f686a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS = -mthumb
+CFLAGS_EXTRAS := -mthumb
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py
index e9dbe67..35ea3ae 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py
@@ -2,12 +2,9 @@
 Test that breakpoints in an IT instruction don't fire if their condition is
 false.
 """
-from __future__ import print_function
 
 
 import lldb
-import os
-import time
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -19,7 +16,7 @@
     NO_DEBUG_INFO_TESTCASE = True
 
     @skipIf(archs=no_match(["arm"]))
-    @skipIf(archs=["arm64", "arm64e"])
+    @skipIf(archs=["arm64", "arm64e", "arm64_32"])
     def test_false(self):
         self.build()
         exe = self.getBuildArtifact("a.out")
@@ -33,7 +30,7 @@
                 "Breakpoint does not get hit")
 
     @skipIf(archs=no_match(["arm"]))
-    @skipIf(archs=["arm64", "arm64e"])
+    @skipIf(archs=["arm64", "arm64e", "arm64_32"])
     def test_true(self):
         self.build()
         exe = self.getBuildArtifact("a.out")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
index ea79c55..3f8e559 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS = -mthumb
+CFLAGS_EXTRAS := -mthumb
 
-include $(LEVEL)/Makefile.rules
\ No newline at end of file
+include Makefile.rules
\ No newline at end of file
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py
index 6540261..0726369 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py
@@ -2,12 +2,9 @@
 Test that breakpoints correctly work in an thumb function in an arbitrary
 named codesection.
 """
-from __future__ import print_function
 
 
 import lldb
-import os
-import time
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/emulation/TestEmulations.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/emulation/TestEmulations.py
index 8e9244f..9613edc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/emulation/TestEmulations.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/arm/emulation/TestEmulations.py
@@ -6,7 +6,6 @@
 
 
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/attic/dotest.pl b/src/llvm-project/lldb/packages/Python/lldbsuite/test/attic/dotest.pl
deleted file mode 100644
index f093ed8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/attic/dotest.pl
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/perl -w
-
-#
-# Use this script to visit each python test case under the specified directory
-# and invoke unittest.main() on each test case.
-#
-
-use strict;
-use FindBin;
-use File::Find;
-use File::Basename;
-use Cwd;
-use Cwd 'abs_path';
-
-scalar(@ARGV) == 1 or die "Usage: dotest.pl testdir";
-
-my $scriptDir = $FindBin::Bin;
-my $baseDir = abs_path("$scriptDir/..");
-my $pluginDir = "$baseDir/test/plugins";
-my $testDir = $ARGV[0];
-
-my $dbgPath = "$baseDir/build/Debug/LLDB.framework/Resources/Python";
-my $relPath = "$baseDir/build/Release/LLDB.framework/Resources/Python";
-if (-d $dbgPath) {
-  $ENV{'PYTHONPATH'} = "$dbgPath:$scriptDir:$pluginDir";
-} elsif (-d $relPath) {
-  $ENV{'PYTHONPATH'} = "$relPath:$scriptDir:$pluginDir";
-}
-#print("ENV{PYTHONPATH}=$ENV{'PYTHONPATH'}\n");
-
-# Traverse the directory to find our python test cases.
-find(\&handleFind, $testDir);
-
-sub handleFind {
-  my $foundFile = $File::Find::name;
-  my $dir = getcwd;
-  #print("foundFile: $foundFile\n");
-  
-  # Test*.py is the naming pattern for our test cases.
-  if ($foundFile =~ /.*\/(Test.*\.py)$/) {
-    print("Running python $1 (cwd = $dir)...\n");
-    system("python $1");
-  }
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/attic/tester.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/attic/tester.py
deleted file mode 100644
index 2e78351..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/attic/tester.py
+++ /dev/null
@@ -1,149 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf8 -*-
-
-from __future__ import print_function
-
-import math
-import os.path
-import re
-import sys
-import time
-import unittest
-
-
-def setupSysPath():
-    testPath = sys.path[0]
-    rem = re.match("(^.*/)test$", testPath)
-    if not rem:
-        print("This script expects to reside in .../test.")
-        sys.exit(-1)
-    lldbBasePath = rem.group(1)
-    lldbDebugPythonPath = "build/Debug/LLDB.framework/Resources/Python"
-    lldbReleasePythonPath = "build/Release/LLDB.framework/Resources/Python"
-    lldbPythonPath = None
-    if os.path.isfile(lldbDebugPythonPath + "/lldb.py"):
-        lldbPythonPath = lldbDebugPythonPath
-    if os.path.isfile(lldbReleasePythonPath + "/lldb.py"):
-        lldbPythonPath = lldbReleasePythonPath
-    if not lldbPythonPath:
-        print(
-            "This script requires lldb.py to be in either " +
-            lldbDebugPythonPath,
-            end='')
-        print("or" + lldbReleasePythonPath)
-        sys.exit(-1)
-    sys.path.append(lldbPythonPath)
-
-
-def prettyTime(t):
-    if t == 0.0:
-        return "0s"
-    if t < 0.000001:
-        return ("%.3f" % (t * 1000000000.0)) + "ns"
-    if t < 0.001:
-        return ("%.3f" % (t * 1000000.0)) + "µs"
-    if t < 1:
-        return ("%.3f" % (t * 1000.0)) + "ms"
-    return str(t) + "s"
-
-
-class ExecutionTimes:
-
-    @classmethod
-    def executionTimes(cls):
-        if cls.m_executionTimes is None:
-            cls.m_executionTimes = ExecutionTimes()
-            for i in range(100):
-                cls.m_executionTimes.start()
-                cls.m_executionTimes.end("null")
-        return cls.m_executionTimes
-
-    def __init__(self):
-        self.m_times = dict()
-
-    def start(self):
-        self.m_start = time.time()
-
-    def end(self, component):
-        e = time.time()
-        if component not in self.m_times:
-            self.m_times[component] = list()
-        self.m_times[component].append(e - self.m_start)
-
-    def dumpStats(self):
-        for key in list(self.m_times.keys()):
-            if len(self.m_times[key]):
-                sampleMin = float('inf')
-                sampleMax = float('-inf')
-                sampleSum = 0.0
-                sampleCount = 0.0
-                for time in self.m_times[key]:
-                    if time > sampleMax:
-                        sampleMax = time
-                    if time < sampleMin:
-                        sampleMin = time
-                    sampleSum += time
-                    sampleCount += 1.0
-                sampleMean = sampleSum / sampleCount
-                sampleVariance = 0
-                for time in self.m_times[key]:
-                    sampleVariance += (time - sampleMean) ** 2
-                sampleVariance /= sampleCount
-                sampleStandardDeviation = math.sqrt(sampleVariance)
-                print(
-                    key +
-                    ": [" +
-                    prettyTime(sampleMin) +
-                    ", " +
-                    prettyTime(sampleMax) +
-                    "] ",
-                    end='')
-                print(
-                    "µ " +
-                    prettyTime(sampleMean) +
-                    ", σ " +
-                    prettyTime(sampleStandardDeviation))
-    m_executionTimes = None
-
-setupSysPath()
-
-import lldb
-
-
-class LLDBTestCase(unittest.TestCase):
-
-    def setUp(self):
-        debugger = lldb.SBDebugger.Create()
-        debugger.SetAsync(True)
-        self.m_commandInterpreter = debugger.GetCommandInterpreter()
-        if not self.m_commandInterpreter:
-            print("Couldn't get the command interpreter")
-            sys.exit(-1)
-
-    def runCommand(self, command, component):
-        res = lldb.SBCommandReturnObject()
-        ExecutionTimes.executionTimes().start()
-        self.m_commandInterpreter.HandleCommand(command, res, False)
-        ExecutionTimes.executionTimes().end(component)
-        if res.Succeeded():
-            return res.GetOutput()
-        else:
-            self.fail("Command " + command + " returned an error")
-            return None
-
-    def getCategories(self):
-        return []
-
-
-class SanityCheckTestCase(LLDBTestCase):
-
-    def runTest(self):
-        ret = self.runCommand("show arch", "show-arch")
-        # print(ret)
-
-    def getCategories(self):
-        return []
-
-suite = unittest.TestLoader().loadTestsFromTestCase(SanityCheckTestCase)
-unittest.TextTestRunner(verbosity=2).run(suite)
-ExecutionTimes.executionTimes().dumpStats()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/bench.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/bench.py
index 41d44ba..a9661b6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/bench.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/bench.py
@@ -16,8 +16,6 @@
 from __future__ import absolute_import
 
 import os
-import sys
-import re
 from optparse import OptionParser
 
 # dotest.py invocation with no '-e exe-path' uses lldb as the inferior program,
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/continue/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/continue/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/continue/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/continue/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py
index acc0922..7863481 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/continue/TestBenchmarkContinue.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py
index 064e7b3..9e5b0ec 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestExpressionCmd.py
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-import os
 import sys
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py
index dcbd36c..438a1fd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/expression/TestRepeatedExprs.py
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-import os
 import sys
 import lldb
 from lldbsuite.test.lldbbench import BenchBase
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py
index 3ed23e6..5261204 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/frame_variable/TestFrameVariableResponse.py
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-import os
 import sys
 import lldb
 from lldbsuite.test import configuration
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py
index 4ebb111..5ad59f3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxlist/TestBenchmarkLibcxxList.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbbench import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py
index 0c50661..ba5ba08 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/libcxxmap/TestBenchmarkLibcxxMap.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbbench import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py
index baacdc8..104b5d7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/startup/TestStartupDelays.py
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-import os
 import sys
 import lldb
 from lldbsuite.test import configuration
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py
index 2a2a8ef..e5a8f16 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/stepping/TestSteppingSpeed.py
@@ -2,7 +2,6 @@
 
 from __future__ import print_function
 
-import os
 import sys
 import lldb
 from lldbsuite.test import configuration
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
index ab2b200..5bf7803 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/benchmarks/turnaround/TestCompileRunToBreakpointTurnaround.py
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-import os
 import sys
 import lldb
 from lldbsuite.test.lldbbench import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py
new file mode 100644
index 0000000..8a0fe37
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py
@@ -0,0 +1,130 @@
+"""Test that the 'add-dsym', aka 'target symbols add', command informs the user about success or failure."""
+
+
+
+import os
+import time
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+@skipUnlessDarwin
+class AddDsymCommandCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        TestBase.setUp(self)
+        self.template = 'main.cpp.template'
+        self.source = 'main.cpp'
+        self.teardown_hook_added = False
+
+    @no_debug_info_test
+    def test_add_dsym_command_with_error(self):
+        """Test that the 'add-dsym' command informs the user about failures."""
+
+        # Call the program generator to produce main.cpp, version 1.
+        self.generate_main_cpp(version=1)
+        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
+
+        # Insert some delay and then call the program generator to produce
+        # main.cpp, version 2.
+        time.sleep(5)
+        self.generate_main_cpp(version=101)
+        # Now call make again, but this time don't generate the dSYM.
+        self.buildDefault(dictionary={'MAKE_DSYM':'NO'})
+
+        self.exe_name = 'a.out'
+        self.do_add_dsym_with_error(self.exe_name)
+
+    @no_debug_info_test
+    def test_add_dsym_command_with_success(self):
+        """Test that the 'add-dsym' command informs the user about success."""
+
+        # Call the program generator to produce main.cpp, version 1.
+        self.generate_main_cpp(version=1)
+        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
+
+        self.exe_name = 'a.out'
+        self.do_add_dsym_with_success(self.exe_name)
+
+    @no_debug_info_test
+    def test_add_dsym_with_dSYM_bundle(self):
+        """Test that the 'add-dsym' command informs the user about success."""
+
+        # Call the program generator to produce main.cpp, version 1.
+        self.generate_main_cpp(version=1)
+        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
+
+        self.exe_name = 'a.out'
+        self.do_add_dsym_with_dSYM_bundle(self.exe_name)
+
+    def generate_main_cpp(self, version=0):
+        """Generate main.cpp from main.cpp.template."""
+        temp = os.path.join(self.getSourceDir(), self.template)
+        with open(temp, 'r') as f:
+            content = f.read()
+
+        new_content = content.replace(
+            '%ADD_EXTRA_CODE%',
+            'printf("This is version %d\\n");' %
+            version)
+        src = os.path.join(self.getBuildDir(), self.source)
+        with open(src, 'w') as f:
+            f.write(new_content)
+
+        # The main.cpp has been generated, add a teardown hook to remove it.
+        if not self.teardown_hook_added:
+            self.addTearDownHook(lambda: os.remove(src))
+            self.teardown_hook_added = True
+
+    def do_add_dsym_with_error(self, exe_name):
+        """Test that the 'add-dsym' command informs the user about failures."""
+        exe_path = self.getBuildArtifact(exe_name)
+        self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET)
+
+        wrong_path = os.path.join(self.getBuildDir(),
+                                  "%s.dSYM" % exe_name, "Contents")
+        self.expect("add-dsym " + wrong_path, error=True,
+                    substrs=['invalid module path'])
+
+        right_path = os.path.join(
+            self.getBuildDir(),
+            "%s.dSYM" %
+            exe_path,
+            "Contents",
+            "Resources",
+            "DWARF",
+            exe_name)
+        self.expect("add-dsym " + right_path, error=True,
+                    substrs=['symbol file', 'does not match'])
+
+    def do_add_dsym_with_success(self, exe_name):
+        """Test that the 'add-dsym' command informs the user about success."""
+        exe_path = self.getBuildArtifact(exe_name)
+        self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET)
+
+        # This time, the UUID should match and we expect some feedback from
+        # lldb.
+        right_path = os.path.join(
+            self.getBuildDir(),
+            "%s.dSYM" %
+            exe_path,
+            "Contents",
+            "Resources",
+            "DWARF",
+            exe_name)
+        self.expect("add-dsym " + right_path,
+                    substrs=['symbol file', 'has been added to'])
+
+    def do_add_dsym_with_dSYM_bundle(self, exe_name):
+        """Test that the 'add-dsym' command informs the user about success when loading files in bundles."""
+        exe_path = self.getBuildArtifact(exe_name)
+        self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET)
+
+        # This time, the UUID should be found inside the bundle
+        right_path = "%s.dSYM" % exe_path
+        self.expect("add-dsym " + right_path,
+                    substrs=['symbol file', 'has been added to'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/warnings/uuid/main.cpp.template b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/main.cpp.template
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/warnings/uuid/main.cpp.template
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/main.cpp.template
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/basic/TestApropos.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/basic/TestApropos.py
new file mode 100644
index 0000000..920f0dd
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/basic/TestApropos.py
@@ -0,0 +1,26 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+class AproposTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_apropos(self):
+        self.expect("apropos", error=True,
+                    substrs=[' must be called with exactly one argument'])
+        self.expect("apropos a b", error=True,
+                    substrs=[' must be called with exactly one argument'])
+        self.expect("apropos ''", error=True,
+                    substrs=['\'\' is not a valid search word'])
+
+    @no_debug_info_test
+    def test_apropos_variable(self):
+        """Test that 'apropos variable' prints the fully qualified command name"""
+        self.expect(
+            'apropos variable',
+            substrs=[
+                'frame variable',
+                'target variable',
+                'watchpoint set variable'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/TestAproposWithProcess.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/TestAproposWithProcess.py
new file mode 100644
index 0000000..64eca71
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/TestAproposWithProcess.py
@@ -0,0 +1,43 @@
+"""
+Test that apropos env doesn't crash trying to touch the process plugin command
+"""
+
+
+
+import lldb
+from lldbsuite.test.lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+
+
+class AproposWithProcessTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break inside main().
+        self.line = line_number('main.cpp', '// break here')
+
+    def test_apropos_with_process(self):
+        """Test that apropos env doesn't crash trying to touch the process plugin command."""
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Break in main() after the variables are assigned values.
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped', 'stop reason = breakpoint'])
+
+        # The breakpoint should have a hit count of 1.
+        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
+                    substrs=[' resolved, hit count = 1'])
+
+        self.runCmd('apropos env')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/apropos_with_process/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/apropos_with_process/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/TestBreakpointCommandList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/TestBreakpointCommandList.py
new file mode 100644
index 0000000..f1a8656
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/TestBreakpointCommandList.py
@@ -0,0 +1,44 @@
+"""
+Test 'breakpoint command list'.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_list_commands(self):
+        src_dir = self.getSourceDir()
+        yaml_path = os.path.join(src_dir, "a.yaml")
+        yaml_base, ext = os.path.splitext(yaml_path)
+        obj_path = self.getBuildArtifact("main.o")
+        self.yaml2obj(yaml_path, obj_path)
+
+        # Create a target with the object file we just created from YAML
+        target = self.dbg.CreateTarget(obj_path)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Test without any breakpoints.
+        self.expect("breakpoint command list 1", error=True, substrs=["error: No breakpoints exist for which to list commands"])
+
+        # Set a breakpoint
+        self.runCmd("b foo")
+
+        # Check list breakpoint commands for breakpoints that have no commands.
+        self.expect("breakpoint command list 1", startstr="Breakpoint 1 does not have an associated command.")
+
+        # Add a breakpoint command.
+        self.runCmd("breakpoint command add -o 'source list' 1")
+
+        # List breakpoint command that we just created.
+        self.expect("breakpoint command list 1", startstr="""Breakpoint 1:
+    Breakpoint commands:
+      source list
+""")
+
+        # List breakpoint command with invalid breakpoint ID.
+        self.expect("breakpoint command list 2", error=True, startstr="error: '2' is not a currently valid breakpoint ID.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/a.yaml b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/a.yaml
new file mode 100644
index 0000000..1007f60
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/breakpoint/command/list/a.yaml
@@ -0,0 +1,18 @@
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_REL
+  Machine:         EM_X86_64
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    AddressAlign:    0x0000000000000010
+    Content:         554889E5897DFC5DC3
+Symbols:
+  - Name:            foo
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x0000000000000009
+...
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/.categories
similarity index 100%
copy from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/.categories
copy to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/.categories
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/delete/TestCommandDelete.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/delete/TestCommandDelete.py
new file mode 100644
index 0000000..3fa654d
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/delete/TestCommandDelete.py
@@ -0,0 +1,17 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+class DeleteCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_delete_builtin(self):
+        self.expect("command delete settings", error=True,
+                    substrs=["'settings' is a permanent debugger command and cannot be removed."])
+
+    @no_debug_info_test
+    def test_delete_alias(self):
+        self.expect("command delete bt", error=True,
+                    substrs=["'bt' is not a known command."])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/history/TestCommandHistory.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/history/TestCommandHistory.py
new file mode 100644
index 0000000..c866198
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/history/TestCommandHistory.py
@@ -0,0 +1,106 @@
+"""
+Test the command history mechanism
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class CommandHistoryTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_history(self):
+        self.runCmd('command history --clear', inHistory=False)
+        self.runCmd('breakpoint list', check=False, inHistory=True)  # 0
+        self.runCmd('register read', check=False, inHistory=True)  # 1
+        self.runCmd('apropos hello', check=False, inHistory=True)  # 2
+        self.runCmd('memory write', check=False, inHistory=True)  # 3
+        self.runCmd('log list', check=False, inHistory=True)  # 4
+        self.runCmd('disassemble', check=False, inHistory=True)  # 5
+        self.runCmd('expression 1', check=False, inHistory=True)  # 6
+        self.runCmd(
+            'type summary list -w default',
+            check=False,
+            inHistory=True)  # 7
+        self.runCmd('version', check=False, inHistory=True)  # 8
+        self.runCmd('frame select 1', check=False, inHistory=True)  # 9
+
+        self.expect(
+            "command history -s 3 -c 3",
+            inHistory=True,
+            substrs=[
+                '3: memory write',
+                '4: log list',
+                '5: disassemble'])
+
+        self.expect("command history -s 3 -e 3", inHistory=True,
+                    substrs=['3: memory write'])
+
+        self.expect(
+            "command history -s 6 -e 7",
+            inHistory=True,
+            substrs=[
+                '6: expression 1',
+                '7: type summary list -w default'])
+
+        self.expect("command history -c 2", inHistory=True,
+                    substrs=['0: breakpoint list', '1: register read'])
+
+        self.expect("command history -e 3 -c 1", inHistory=True,
+                    substrs=['3: memory write'])
+
+        self.expect(
+            "command history -e 2",
+            inHistory=True,
+            substrs=[
+                '0: breakpoint list',
+                '1: register read',
+                '2: apropos hello'])
+
+        self.expect(
+            "command history -s 12",
+            inHistory=True,
+            substrs=[
+                '12: command history -s 6 -e 7',
+                '13: command history -c 2',
+                '14: command history -e 3 -c 1',
+                '15: command history -e 2',
+                '16: command history -s 12'])
+
+        self.expect(
+            "command history -s end -c 3",
+            inHistory=True,
+            substrs=[
+                '15: command history -e 2',
+                '16: command history -s 12',
+                '17: command history -s end -c 3'])
+
+        self.expect(
+            "command history -s end -e 15",
+            inHistory=True,
+            substrs=[
+                '15: command history -e 2',
+                '16: command history -s 12',
+                '17: command history -s end -c 3',
+                'command history -s end -e 15'])
+
+        self.expect("command history -s 5 -c 1", inHistory=True,
+                    substrs=['5: disassemble'])
+
+        self.expect("command history -c 1 -s 5", inHistory=True,
+                    substrs=['5: disassemble'])
+
+        self.expect("command history -c 1 -e 3", inHistory=True,
+                    substrs=['3: memory write'])
+
+        self.expect(
+            "command history -c 1 -e 3 -s 5",
+            error=True,
+            inHistory=True,
+            substrs=['error: --count, --start-index and --end-index cannot be all specified in the same invocation'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/invalid-args/TestInvalidArgsCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/invalid-args/TestInvalidArgsCommand.py
new file mode 100644
index 0000000..47d77b0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/invalid-args/TestInvalidArgsCommand.py
@@ -0,0 +1,58 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+class InvalidArgsCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_script_add(self):
+        self.expect("command script add 1 2", error=True,
+                    substrs=["'command script add' requires one argument"])
+
+        self.expect("command script add", error=True,
+                    substrs=["'command script add' requires one argument"])
+
+    @no_debug_info_test
+    def test_script_clear(self):
+        self.expect("command script clear f", error=True,
+                    substrs=["'command script clear' doesn't take any arguments"])
+
+    @no_debug_info_test
+    def test_script_list(self):
+        self.expect("command script list f", error=True,
+                    substrs=["'command script list' doesn't take any arguments"])
+
+    @no_debug_info_test
+    def test_script_import(self):
+        self.expect("command script import", error=True,
+                    substrs=["command script import needs one or more arguments"])
+
+    @no_debug_info_test
+    def test_alias(self):
+        self.expect("command alias", error=True,
+                    substrs=["'command alias' requires at least two arguments"])
+
+        self.expect("command alias blub foo", error=True,
+                    substrs=["error: invalid command given to 'command alias'. 'foo' does not begin with a valid command.  No alias created."])
+
+    @no_debug_info_test
+    def test_unalias(self):
+        self.expect("command unalias", error=True,
+                    substrs=["must call 'unalias' with a valid alias"])
+
+    @no_debug_info_test
+    def test_delete(self):
+        self.expect("command delete", error=True,
+                    substrs=["must call 'command delete' with one or more valid user"])
+
+    @no_debug_info_test
+    def test_regex(self):
+        self.expect("command regex", error=True,
+                    substrs=["usage: 'command regex <command-name> "])
+
+    @no_debug_info_test
+    def test_source(self):
+        self.expect("command source", error=True,
+                    substrs=["'command source' takes exactly one executable filename argument."])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/TestNestedAlias.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/TestNestedAlias.py
new file mode 100644
index 0000000..a1374a9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/TestNestedAlias.py
@@ -0,0 +1,99 @@
+"""
+Test that an alias can reference other aliases without crashing.
+"""
+
+
+
+import lldb
+from lldbsuite.test.lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+
+
+class NestedAliasTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break inside main().
+        self.line = line_number('main.cpp', '// break here')
+
+    def test_nested_alias(self):
+        """Test that an alias can reference other aliases without crashing."""
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Break in main() after the variables are assigned values.
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped', 'stop reason = breakpoint'])
+
+        # The breakpoint should have a hit count of 1.
+        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
+                    substrs=[' resolved, hit count = 1'])
+
+        # This is the function to remove the custom aliases in order to have a
+        # clean slate for the next test case.
+        def cleanup():
+            self.runCmd('command unalias read', check=False)
+            self.runCmd('command unalias rd', check=False)
+            self.runCmd('command unalias fo', check=False)
+            self.runCmd('command unalias foself', check=False)
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        self.runCmd('command alias read memory read -f A')
+        self.runCmd('command alias rd read -c 3')
+
+        self.expect(
+            'memory read -f A -c 3 `&my_ptr[0]`',
+            substrs=[
+                'deadbeef',
+                'main.cpp:',
+                'feedbeef'])
+        self.expect(
+            'rd `&my_ptr[0]`',
+            substrs=[
+                'deadbeef',
+                'main.cpp:',
+                'feedbeef'])
+
+        self.expect(
+            'memory read -f A -c 3 `&my_ptr[0]`',
+            substrs=['deadfeed'],
+            matching=False)
+        self.expect('rd `&my_ptr[0]`', substrs=['deadfeed'], matching=False)
+
+        self.runCmd('command alias fo frame variable -O --')
+        self.runCmd('command alias foself fo self')
+
+        self.expect(
+            'help foself',
+            substrs=[
+                '--show-all-children',
+                '--raw-output'],
+            matching=False)
+        self.expect(
+            'help foself',
+            substrs=[
+                'Show variables for the current',
+                'stack frame.'],
+            matching=True)
+
+        # Check that foself was resolved and is now independent of 'fo'.
+        self.runCmd('command unalias fo')
+        self.expect(
+            'help foself',
+            substrs=[
+                'Show variables for the current',
+                'stack frame.'],
+            matching=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nested_alias/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nested_alias/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/TestCommandScript.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/TestCommandScript.py
new file mode 100644
index 0000000..de44961
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/TestCommandScript.py
@@ -0,0 +1,167 @@
+"""
+Test lldb Python commands.
+"""
+
+
+import sys
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class CmdPythonTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test(self):
+        self.build()
+        self.pycmd_tests()
+
+    def pycmd_tests(self):
+        self.runCmd("command source py_import")
+
+        # Test a bunch of different kinds of python callables with
+        # both 4 and 5 positional arguments.
+        self.expect("foobar", substrs=["All good"])
+        self.expect("foobar4", substrs=["All good"])
+        self.expect("vfoobar", substrs=["All good"])
+        self.expect("v5foobar", substrs=["All good"])
+        self.expect("sfoobar", substrs=["All good"])
+        self.expect("cfoobar", substrs=["All good"])
+        self.expect("ifoobar", substrs=["All good"])
+        self.expect("sfoobar4", substrs=["All good"])
+        self.expect("cfoobar4", substrs=["All good"])
+        self.expect("ifoobar4", substrs=["All good"])
+        self.expect("ofoobar", substrs=["All good"])
+        self.expect("ofoobar4", substrs=["All good"])
+
+        # Verify command that specifies eCommandRequiresTarget returns failure
+        # without a target.
+        self.expect('targetname',
+                    substrs=['a.out'], matching=False, error=True)
+
+        exe = self.getBuildArtifact("a.out")
+        self.expect("file " + exe,
+                    patterns=["Current executable set to .*a.out"])
+
+        self.expect('targetname',
+                    substrs=['a.out'], matching=True, error=False)
+
+        # This is the function to remove the custom commands in order to have a
+        # clean slate for the next test case.
+        def cleanup():
+            self.runCmd('command script delete welcome', check=False)
+            self.runCmd('command script delete targetname', check=False)
+            self.runCmd('command script delete longwait', check=False)
+            self.runCmd('command script delete mysto', check=False)
+            self.runCmd('command script delete tell_sync', check=False)
+            self.runCmd('command script delete tell_async', check=False)
+            self.runCmd('command script delete tell_curr', check=False)
+            self.runCmd('command script delete bug11569', check=False)
+            self.runCmd('command script delete takes_exe_ctx', check=False)
+            self.runCmd('command script delete decorated', check=False)
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        # Interact with debugger in synchronous mode
+        self.setAsync(False)
+
+        # We don't want to display the stdout if not in TraceOn() mode.
+        if not self.TraceOn():
+            self.HideStdout()
+
+        self.expect('welcome Enrico',
+                    substrs=['Hello Enrico, welcome to LLDB'])
+
+        self.expect("help welcome",
+                    substrs=['Just a docstring for welcome_impl',
+                             'A command that says hello to LLDB users'])
+
+        decorated_commands = ["decorated" + str(n) for n in range(1, 5)]
+        for name in decorated_commands:
+            self.expect(name, substrs=["hello from " + name])
+            self.expect("help " + name,
+                        substrs=["Python command defined by @lldb.command"])
+
+        self.expect("help",
+                    substrs=['For more information run',
+                             'welcome'] + decorated_commands)
+
+        self.expect("help -a",
+                    substrs=['For more information run',
+                             'welcome'] + decorated_commands)
+
+        self.expect("help -u", matching=False,
+                    substrs=['For more information run'])
+
+        self.runCmd("command script delete welcome")
+
+        self.expect('welcome Enrico', matching=False, error=True,
+                    substrs=['Hello Enrico, welcome to LLDB'])
+
+        self.expect('targetname fail', error=True,
+                    substrs=['a test for error in command'])
+
+        self.expect('command script list',
+                    substrs=['targetname',
+                             'For more information run'])
+
+        self.expect("help targetname",
+                    substrs=['Expects', '\'raw\'', 'input',
+                             'help', 'raw-input'])
+
+        self.expect("longwait",
+                    substrs=['Done; if you saw the delays I am doing OK'])
+
+        self.runCmd("b main")
+        self.runCmd("run")
+        self.runCmd("mysto 3")
+        self.expect("frame variable array",
+                    substrs=['[0] = 79630', '[1] = 388785018', '[2] = 0'])
+        self.runCmd("mysto 3")
+        self.expect("frame variable array",
+                    substrs=['[0] = 79630', '[4] = 388785018', '[5] = 0'])
+
+# we cannot use the stepover command to check for async execution mode since LLDB
+# seems to get confused when events start to queue up
+        self.expect("tell_sync",
+                    substrs=['running sync'])
+        self.expect("tell_async",
+                    substrs=['running async'])
+        self.expect("tell_curr",
+                    substrs=['I am running sync'])
+
+# check that the execution context is passed in to commands that ask for it
+        self.expect("takes_exe_ctx", substrs=["a.out"])
+
+        # Test that a python command can redefine itself
+        self.expect('command script add -f foobar welcome -h "just some help"')
+
+        self.runCmd("command script clear")
+
+        # Test that re-defining an existing command works
+        self.runCmd(
+            'command script add my_command --class welcome.WelcomeCommand')
+        self.expect('my_command Blah', substrs=['Hello Blah, welcome to LLDB'])
+
+        self.runCmd(
+            'command script add my_command --class welcome.TargetnameCommand')
+        self.expect('my_command', substrs=['a.out'])
+
+        self.runCmd("command script clear")
+
+        self.expect('command script list', matching=False,
+                    substrs=['targetname',
+                             'longwait'])
+
+        self.expect('command script add -f foobar frame', error=True,
+                    substrs=['cannot add command'])
+
+        # http://llvm.org/bugs/show_bug.cgi?id=11569
+        # LLDBSwigPythonCallCommand crashes when a command script returns an
+        # object
+        self.runCmd('command script add -f bug11569 bug11569')
+        # This should not crash.
+        self.runCmd('bug11569', check=False)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/bug11569.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/bug11569.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/bug11569.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/bug11569.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/callables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/callables.py
new file mode 100644
index 0000000..c31e84c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/callables.py
@@ -0,0 +1,62 @@
+
+
+import lldb
+
+# bunch of different kinds of python callables that should
+# all work as commands.
+
+def check(debugger, command, context, result, internal_dict):
+    if (not isinstance(debugger, lldb.SBDebugger) or
+        not isinstance(command, str) or
+        not isinstance(result, lldb.SBCommandReturnObject) or
+        not isinstance(internal_dict, dict) or
+        (not context is None and
+        not isinstance(context, lldb.SBExecutionContext))):
+      raise Exception()
+    result.AppendMessage("All good.")
+
+def vfoobar(*args):
+    check(*args)
+
+def v5foobar(debugger, command, context, result, internal_dict, *args):
+    check(debugger, command, context, result, internal_dict)
+
+def foobar(debugger, command, context, result, internal_dict):
+    check(debugger, command, context, result, internal_dict)
+
+def foobar4(debugger, command, result, internal_dict):
+    check(debugger, command, None, result, internal_dict)
+
+class FooBar:
+    @staticmethod
+    def sfoobar(debugger, command, context, result, internal_dict):
+      check(debugger, command, context, result, internal_dict)
+
+    @classmethod
+    def cfoobar(cls, debugger, command, context, result, internal_dict):
+      check(debugger, command, context, result, internal_dict)
+
+    def ifoobar(self, debugger, command, context, result, internal_dict):
+      check(debugger, command, context, result, internal_dict)
+
+    def __call__(self, debugger, command, context, result, internal_dict):
+      check(debugger, command, context, result, internal_dict)
+
+    @staticmethod
+    def sfoobar4(debugger, command, result, internal_dict):
+      check(debugger, command, None, result, internal_dict)
+
+    @classmethod
+    def cfoobar4(cls, debugger, command, result, internal_dict):
+      check(debugger, command, None, result, internal_dict)
+
+    def ifoobar4(self, debugger, command, result, internal_dict):
+      check(debugger, command, None, result, internal_dict)
+
+class FooBar4:
+    def __call__(self, debugger, command, result, internal_dict):
+      check(debugger, command, None, result, internal_dict)
+
+FooBarObj = FooBar()
+
+FooBar4Obj = FooBar4()
\ No newline at end of file
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/decorated.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/decorated.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/decorated.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/decorated.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/Makefile
new file mode 100644
index 0000000..d9ee1cc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/Makefile
@@ -0,0 +1,4 @@
+C_SOURCES := main.c
+EXE := hello_world
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/TestImport.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/TestImport.py
new file mode 100644
index 0000000..a10c23b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/TestImport.py
@@ -0,0 +1,71 @@
+"""Test custom import command to import files by path."""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ImportTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(['pyapi'])
+    @no_debug_info_test
+    def test_import_command(self):
+        """Import some Python scripts by path and test them"""
+        self.run_test()
+
+    def run_test(self):
+        """Import some Python scripts by path and test them."""
+
+        # This is the function to remove the custom commands in order to have a
+        # clean slate for the next test case.
+        def cleanup():
+            self.runCmd('command script delete foo2cmd', check=False)
+            self.runCmd('command script delete foocmd', check=False)
+            self.runCmd('command script delete foobarcmd', check=False)
+            self.runCmd('command script delete barcmd', check=False)
+            self.runCmd('command script delete barothercmd', check=False)
+            self.runCmd('command script delete TPcommandA', check=False)
+            self.runCmd('command script delete TPcommandB', check=False)
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        self.runCmd("command script import ./foo/foo.py --allow-reload")
+        self.runCmd("command script import ./foo/foo2.py --allow-reload")
+        self.runCmd("command script import ./foo/bar/foobar.py --allow-reload")
+        self.runCmd("command script import ./bar/bar.py --allow-reload")
+
+        self.expect("command script import ./nosuchfile.py",
+                    error=True, startstr='error: module importing failed')
+        self.expect("command script import ./nosuchfolder/",
+                    error=True, startstr='error: module importing failed')
+        self.expect("command script import ./foo/foo.py", error=False)
+
+        self.runCmd("command script import --allow-reload ./thepackage")
+        self.expect("TPcommandA", substrs=["hello world A"])
+        self.expect("TPcommandB", substrs=["hello world B"])
+
+        self.runCmd("script import dummymodule")
+        self.expect("command script import ./dummymodule.py", error=False)
+        self.expect(
+            "command script import --allow-reload ./dummymodule.py",
+            error=False)
+
+        self.runCmd("command script add -f foo.foo_function foocmd")
+        self.runCmd("command script add -f foobar.foo_function foobarcmd")
+        self.runCmd("command script add -f bar.bar_function barcmd")
+        self.expect("foocmd hello",
+                    substrs=['foo says', 'hello'])
+        self.expect("foo2cmd hello",
+                    substrs=['foo2 says', 'hello'])
+        self.expect("barcmd hello",
+                    substrs=['barutil says', 'bar told me', 'hello'])
+        self.expect("barothercmd hello",
+                    substrs=['barutil says', 'bar told me', 'hello'])
+        self.expect("foobarcmd hello",
+                    substrs=['foobar says', 'hello'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/bar/bar.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/bar.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/bar/bar.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/bar.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/bar/barutil.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/barutil.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/bar/barutil.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/bar/barutil.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/dummymodule.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/dummymodule.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/dummymodule.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/dummymodule.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/foo/bar/foobar.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/bar/foobar.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/foo/bar/foobar.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/bar/foobar.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/foo/foo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/foo/foo.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/foo/foo2.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo2.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/foo/foo2.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/foo/foo2.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/Makefile
new file mode 100644
index 0000000..22f1051
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/Makefile
@@ -0,0 +1 @@
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/TestRdar12586188.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/TestRdar12586188.py
new file mode 100644
index 0000000..478cfa3
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/TestRdar12586188.py
@@ -0,0 +1,31 @@
+"""Check that we handle an ImportError in a special way when command script importing files."""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class Rdar12586188TestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(['pyapi'])
+    @no_debug_info_test
+    def test_rdar12586188_command(self):
+        """Check that we handle an ImportError in a special way when command script importing files."""
+        self.run_test()
+
+    def run_test(self):
+        """Check that we handle an ImportError in a special way when command script importing files."""
+
+        self.expect(
+            "command script import ./fail12586188.py --allow-reload",
+            error=True,
+            substrs=['raise ImportError("I do not want to be imported")'])
+        self.expect(
+            "command script import ./fail212586188.py --allow-reload",
+            error=True,
+            substrs=['raise ValueError("I do not want to be imported")'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/fail12586188.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail12586188.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/fail12586188.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail12586188.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/fail212586188.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail212586188.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/fail212586188.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/fail212586188.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/TPunitA.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitA.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/TPunitA.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitA.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/TPunitB.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitB.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/TPunitB.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/TPunitB.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/__init__.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/__init__.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/thepackage/__init__.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/import/thepackage/__init__.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/mysto.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/mysto.py
new file mode 100644
index 0000000..04eceb7
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/mysto.py
@@ -0,0 +1,22 @@
+from __future__ import print_function
+
+import lldb
+
+
+def StepOver(debugger, args, result, dict):
+    """
+    Step over a given number of times instead of only just once
+    """
+    arg_split = args.split(" ")
+    print(type(arg_split))
+    count = int(arg_split[0])
+    for i in range(0, count):
+        debugger.GetSelectedTarget().GetProcess(
+        ).GetSelectedThread().StepOver(lldb.eOnlyThisThread)
+        print("step<%d>" % i)
+
+
+def __lldb_init_module(debugger, session_dict):
+    # by default, --synchronicity is set to synchronous
+    debugger.HandleCommand("command script add -f mysto.StepOver mysto")
+    return None
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/py_import b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/py_import
new file mode 100644
index 0000000..4372d32
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/py_import
@@ -0,0 +1,32 @@
+script import sys, os
+script sys.path.append(os.path.join(os.getcwd(), os.pardir))
+script import welcome
+script import bug11569
+command script add welcome --class welcome.WelcomeCommand
+command script add targetname --class welcome.TargetnameCommand
+command script add longwait --function welcome.print_wait_impl
+command script import mysto.py --allow-reload
+command script add tell_sync --function welcome.check_for_synchro --synchronicity sync
+command script add tell_async --function welcome.check_for_synchro --synchronicity async
+command script add tell_curr --function welcome.check_for_synchro --synchronicity curr
+command script add takes_exe_ctx --function welcome.takes_exe_ctx
+command script import decorated.py
+
+
+command script import callables.py
+
+command script add -f callables.foobar foobar
+command script add -f callables.foobar4 foobar4
+command script add -f callables.vfoobar vfoobar
+command script add -f callables.v5foobar v5foobar
+
+command script add -f callables.FooBar.sfoobar sfoobar
+command script add -f callables.FooBar.cfoobar cfoobar
+command script add -f callables.FooBarObj.ifoobar ifoobar
+
+command script add -f callables.FooBar.sfoobar4 sfoobar4
+command script add -f callables.FooBar.cfoobar4 cfoobar4
+command script add -f callables.FooBarObj.ifoobar4 ifoobar4
+
+command script add -f callables.FooBarObj ofoobar
+command script add -f callables.FooBar4Obj ofoobar4
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/welcome.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/welcome.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/welcome.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script/welcome.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/TestCommandScriptAlias.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/TestCommandScriptAlias.py
new file mode 100644
index 0000000..3f2e8cc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/TestCommandScriptAlias.py
@@ -0,0 +1,35 @@
+"""
+Test lldb Python commands.
+"""
+
+
+
+import lldb
+from lldbsuite.test.lldbtest import *
+
+
+class CommandScriptAliasTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_pycmd(self):
+        self.runCmd("command script import tcsacmd.py")
+        self.runCmd("command script add -f tcsacmd.some_command_here attach")
+
+        # This is the function to remove the custom commands in order to have a
+        # clean slate for the next test case.
+        def cleanup():
+            self.runCmd('command script delete attach', check=False)
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        # We don't want to display the stdout if not in TraceOn() mode.
+        if not self.TraceOn():
+            self.HideStdout()
+
+        self.expect('attach a', substrs=['Victory is mine'])
+        self.runCmd("command script delete attach")
+        # this can't crash but we don't care whether the actual attach works
+        self.runCmd('attach noprocessexistswiththisname', check=False)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/tcsacmd.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/tcsacmd.py
new file mode 100644
index 0000000..8d3248c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/script_alias/tcsacmd.py
@@ -0,0 +1,11 @@
+from __future__ import print_function
+import lldb
+
+
+def some_command_here(debugger, command, result, d):
+    if command == "a":
+        print("Victory is mine", file=result)
+        return True
+    else:
+        print("Sadness for all", file=result)
+        return False
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/.lldb b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/source/.lldb
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/.lldb
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/source/.lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/source/TestCommandSource.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/source/TestCommandSource.py
new file mode 100644
index 0000000..6d2717b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/source/TestCommandSource.py
@@ -0,0 +1,34 @@
+"""
+Test that lldb command "command source" works correctly.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class CommandSourceTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_command_source(self):
+        """Test that lldb command "command source" works correctly."""
+
+        # Sourcing .lldb in the current working directory, which in turn imports
+        # the "my" package that defines the date() function.
+        self.runCmd("command source .lldb")
+
+        # Python should evaluate "my.date()" successfully.
+        command_interpreter = self.dbg.GetCommandInterpreter()
+        self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
+        result = lldb.SBCommandReturnObject()
+        command_interpreter.HandleCommand("script my.date()", result)
+
+        import datetime
+        self.expect(result.GetOutput(), "script my.date() runs successfully",
+                    exe=False,
+                    substrs=[str(datetime.date.today())])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/commands.txt b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/source/commands.txt
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/commands.txt
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/source/commands.txt
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/my.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/source/my.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/my.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/command/source/my.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestDisassembleBreakpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestDisassembleBreakpoint.py
new file mode 100644
index 0000000..4130aae
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestDisassembleBreakpoint.py
@@ -0,0 +1,38 @@
+"""
+Test some lldb command abbreviations.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class DisassemblyTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test(self):
+        self.build()
+        target, _, _, bkpt = lldbutil.run_to_source_breakpoint(self,
+                "Set a breakpoint here", lldb.SBFileSpec("main.cpp"))
+        self.runCmd("dis -f")
+        disassembly_with_break = self.res.GetOutput().splitlines()
+
+        self.assertTrue(target.BreakpointDelete(bkpt.GetID()))
+
+        self.runCmd("dis -f")
+        disassembly_without_break = self.res.GetOutput().splitlines()
+
+        # Make sure all assembly instructions are the same as instructions
+        # with the breakpoint removed.
+        self.assertEqual(len(disassembly_with_break),
+                         len(disassembly_without_break))
+        for dis_inst_with, dis_inst_without in \
+                zip(disassembly_with_break, disassembly_without_break):
+            inst_with = dis_inst_with.split(':')[-1]
+            inst_without = dis_inst_without.split(':')[-1]
+            self.assertEqual(inst_with, inst_without)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestFrameDisassemble.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestFrameDisassemble.py
new file mode 100644
index 0000000..66f7891
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestFrameDisassemble.py
@@ -0,0 +1,60 @@
+"""
+Test to ensure SBFrame::Disassemble produces SOME output
+"""
+
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+
+class FrameDisassembleTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_frame_disassemble(self):
+        """Sample test to ensure SBFrame::Disassemble produces SOME output."""
+        self.build()
+        self.frame_disassemble_test()
+
+    def frame_disassemble_test(self):
+        """Sample test to ensure SBFrame::Disassemble produces SOME output"""
+        exe = self.getBuildArtifact("a.out")
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Now create a breakpoint in main.c at the source matching
+        # "Set a breakpoint here"
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            "Set a breakpoint here", lldb.SBFileSpec("main.cpp"))
+        self.assertTrue(breakpoint and
+                        breakpoint.GetNumLocations() >= 1,
+                        VALID_BREAKPOINT)
+
+        error = lldb.SBError()
+        # This is the launch info.  If you want to launch with arguments or
+        # environment variables, add them using SetArguments or
+        # SetEnvironmentEntries
+
+        launch_info = lldb.SBLaunchInfo(None)
+        process = target.Launch(launch_info, error)
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+        # Did we hit our breakpoint?
+        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
+        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
+        self.assertTrue(
+            len(threads) == 1,
+            "There should be a thread stopped at our breakpoint")
+
+        # The hit count for the breakpoint should be 1.
+        self.assertTrue(breakpoint.GetHitCount() == 1)
+
+        frame = threads[0].GetFrameAtIndex(0)
+        disassembly = frame.Disassemble()
+        self.assertTrue(len(disassembly) != 0, "Disassembly was empty.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/.categories
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/.categories
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/.categories
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py
new file mode 100644
index 0000000..d53fc52
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py
@@ -0,0 +1,44 @@
+"""
+Test calling user defined functions using expression evaluation.
+This test checks that typesystem lookup works correctly for typedefs of
+untagged structures.
+
+Ticket: https://llvm.org/bugs/show_bug.cgi?id=26790
+"""
+
+
+import lldb
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestExprLookupAnonStructTypedef(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        TestBase.setUp(self)
+        # Find the breakpoint
+        self.line = line_number('main.cpp', '// lldb testsuite break')
+
+    @expectedFailureAll(
+        oslist=['linux'],
+        archs=['arm'],
+        bugnumber="llvm.org/pr27868")
+    def test(self):
+        """Test typedeffed untagged struct arguments for function call expressions"""
+        self.build()
+
+        self.runCmd("file "+self.getBuildArtifact("a.out"),
+                    CURRENT_EXECUTABLE_SET)
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "main.cpp",
+            self.line,
+            num_expected_locations=-1,
+            loc_exact=True
+        )
+
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("expr multiply(&s)", substrs=['$0 = 1'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/argument_passing_restrictions/TestArgumentPassingRestrictions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/argument_passing_restrictions/TestArgumentPassingRestrictions.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/TestArgumentPassingRestrictions.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/argument_passing_restrictions/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/argument_passing_restrictions/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/argument_passing_restrictions/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/calculator_mode/TestCalculatorMode.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/calculator_mode/TestCalculatorMode.py
new file mode 100644
index 0000000..9cd3c81
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/calculator_mode/TestCalculatorMode.py
@@ -0,0 +1,23 @@
+"""
+Test calling an expression without a target.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestCalculatorMode(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test__calculator_mode(self):
+        """Test calling expressions in the dummy target."""
+        self.expect("expression 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
+        # Now try it with a specific language:
+        self.expect("expression -l c -- 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/Makefile
new file mode 100644
index 0000000..31f2d5e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/Makefile
@@ -0,0 +1,6 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
+
+clean::
+	rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallBuiltinFunction.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallBuiltinFunction.py
new file mode 100644
index 0000000..4462799
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallBuiltinFunction.py
@@ -0,0 +1,45 @@
+"""
+Tests calling builtin functions using expression evaluation.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCommandCallBuiltinFunction(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # Builtins are expanded by Clang, so debug info shouldn't matter.
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        TestBase.setUp(self)
+        # Find the line number to break for main.c.
+        self.line = line_number(
+            'main.cpp',
+            '// Please test these expressions while stopped at this line:')
+
+    def test(self):
+        self.build()
+
+        # Set breakpoint in main and run exe
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        interp = self.dbg.GetCommandInterpreter()
+        result = lldb.SBCommandReturnObject()
+
+        # Test different builtin functions.
+
+        self.expect_expr("__builtin_isinf(0.0f)", result_type="int", result_value="0")
+        self.expect_expr("__builtin_isnormal(0.0f)", result_type="int", result_value="0")
+        self.expect_expr("__builtin_constant_p(1)", result_type="int", result_value="1")
+        self.expect_expr("__builtin_abs(-14)", result_type="int", result_value="14")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStdStringFunction.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStdStringFunction.py
new file mode 100644
index 0000000..261e702
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStdStringFunction.py
@@ -0,0 +1,56 @@
+"""
+Test calling std::String member functions.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCommandCallFunctionTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.c.
+        self.line = line_number(
+            'main.cpp',
+            '// Please test these expressions while stopped at this line:')
+
+    @expectedFailureAll(
+        compiler="icc",
+        bugnumber="llvm.org/pr14437, fails with ICC 13.1")
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
+    def test_with(self):
+        """Test calling std::String member function."""
+        self.build()
+        self.runCmd("file " + self.getBuildArtifact("a.out"),
+                    CURRENT_EXECUTABLE_SET)
+
+        # Some versions of GCC encode two locations for the 'return' statement
+        # in main.cpp
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.expect("print str",
+                    substrs=['Hello world'])
+
+        # Calling this function now succeeds, but we follow the typedef return type through to
+        # const char *, and thus don't invoke the Summary formatter.
+
+        # clang's libstdc++ on ios arm64 inlines std::string::c_str() always;
+        # skip this part of the test.
+        triple = self.dbg.GetSelectedPlatform().GetTriple()
+        do_cstr_test = True
+        if triple in ["arm64-apple-ios", "arm64e-apple-ios", "arm64-apple-tvos", "armv7k-apple-watchos", "arm64-apple-bridgeos", "arm64_32-apple-watchos"]:
+            do_cstr_test = False
+        if do_cstr_test:
+            self.expect("print str.c_str()",
+                        substrs=['Hello world'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStopAndContinue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStopAndContinue.py
new file mode 100644
index 0000000..0f0f1a5
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStopAndContinue.py
@@ -0,0 +1,52 @@
+"""
+Test calling a function, stopping in the call, continue and gather the result on stop.
+"""
+
+
+
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCommandCallStopContinueTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.c.
+        self.line = line_number(
+            'main.cpp',
+            '// Please test these expressions while stopped at this line:')
+        self.func_line = line_number('main.cpp', '{5, "five"}')
+
+    def test(self):
+        """Test gathering result from interrupted function call."""
+        self.build()
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        # Some versions of GCC encode two locations for the 'return' statement
+        # in main.cpp
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "main.cpp",
+            self.func_line,
+            num_expected_locations=-1,
+            loc_exact=True)
+
+        self.expect("expr -i false -- returnsFive()", error=True,
+                    substrs=['Execution was interrupted, reason: breakpoint'])
+
+        self.runCmd("continue", "Continue completed")
+        self.expect(
+            "thread list",
+            substrs=[
+                'stop reason = User Expression thread plan',
+                r'Completed expression: (Five) $0 = (number = 5, name = "five")'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallUserDefinedFunction.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallUserDefinedFunction.py
new file mode 100644
index 0000000..8ced082
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallUserDefinedFunction.py
@@ -0,0 +1,57 @@
+"""
+Test calling user defined functions using expression evaluation.
+
+Note:
+  LLDBs current first choice of evaluating functions is using the IR interpreter,
+  which is only supported on Hexagon. Otherwise JIT is used for the evaluation.
+
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCommandCallUserDefinedFunction(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.c.
+        self.line = line_number(
+            'main.cpp',
+            '// Please test these expressions while stopped at this line:')
+
+    def test(self):
+        """Test return values of user defined function calls."""
+        self.build()
+
+        # Set breakpoint in main and run exe
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # Test recursive function call.
+        self.expect("expr fib(5)", substrs=['$0 = 5'])
+
+        # Test function with more than one paramter
+        self.expect("expr add(4,8)", substrs=['$1 = 12'])
+
+        # Test nesting function calls in function paramters
+        self.expect("expr add(add(5,2),add(3,4))", substrs=['$2 = 14'])
+        self.expect("expr add(add(5,2),fib(5))", substrs=['$3 = 12'])
+
+        # Test function with pointer paramter
+        self.expect(
+            "exp stringCompare((const char*) \"Hello world\")",
+            substrs=['$4 = true'])
+        self.expect(
+            "exp stringCompare((const char*) \"Hellworld\")",
+            substrs=['$5 = false'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-function/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/Makefile
new file mode 100644
index 0000000..31f2d5e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/Makefile
@@ -0,0 +1,6 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
+
+clean::
+	rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py
new file mode 100644
index 0000000..57987c8
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/TestCallOverriddenMethod.py
@@ -0,0 +1,82 @@
+"""
+Test calling an overriden method.
+
+Note:
+  This verifies that LLDB is correctly building the method overrides table.
+  If this table is not built correctly then calls to overridden methods in
+  derived classes may generate references to non-existant vtable entries,
+  as the compiler treats the overridden method as a totally new virtual
+  method definition.
+  <rdar://problem/14205774>
+
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class ExprCommandCallOverriddenMethod(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.c.
+        self.line = line_number('main.cpp', '// Set breakpoint here')
+
+    def test_call_on_base(self):
+        """Test calls to overridden methods in derived classes."""
+        self.build()
+
+        # Set breakpoint in main and run exe
+        self.runCmd("file " + self.getBuildArtifact("a.out"),
+                    CURRENT_EXECUTABLE_SET)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # Test call to method in base class (this should always work as the base
+        # class method is never an override).
+        self.expect("expr b->foo()", substrs=["= 2"])
+
+        # Test calling the base class.
+        self.expect("expr realbase.foo()", substrs=["= 1"])
+
+    @skipIfLinux # Returns wrong result code on some platforms.
+    def test_call_on_derived(self):
+        """Test calls to overridden methods in derived classes."""
+        self.build()
+
+        # Set breakpoint in main and run exe
+        self.runCmd("file " + self.getBuildArtifact("a.out"),
+                    CURRENT_EXECUTABLE_SET)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # Test call to overridden method in derived class (this will fail if the
+        # overrides table is not correctly set up, as Derived::foo will be assigned
+        # a vtable entry that does not exist in the compiled program).
+        self.expect("expr d.foo()", substrs=["= 2"])
+
+    @skipIf(oslist=["linux"], archs=["aarch64"])
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr43707")
+    def test_call_on_temporary(self):
+        """Test calls to overridden methods in derived classes."""
+        self.build()
+
+        # Set breakpoint in main and run exe
+        self.runCmd("file " + self.getBuildArtifact("a.out"),
+                    CURRENT_EXECUTABLE_SET)
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # Test with locally constructed instances.
+        self.expect("expr Base().foo()", substrs=["= 1"])
+        self.expect("expr Derived().foo()", substrs=["= 2"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/main.cpp
new file mode 100644
index 0000000..87997fa
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-overridden-method/main.cpp
@@ -0,0 +1,18 @@
+class Base {
+public:
+  virtual ~Base() {}
+  virtual int foo() { return 1; }
+};
+
+class Derived : public Base {
+public:
+  virtual int foo() { return 2; }
+};
+
+int main() {
+  Base realbase;
+  realbase.foo();
+  Derived d;
+  Base *b = &d;
+  return 0; // Set breakpoint here
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/Makefile
new file mode 100644
index 0000000..fa5901e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := lotta-signals.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/TestCallThatRestarts.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/TestCallThatRestarts.py
new file mode 100644
index 0000000..a61e69a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/TestCallThatRestarts.py
@@ -0,0 +1,166 @@
+"""
+Test calling a function that hits a signal set to auto-restart, make sure the call completes.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCommandThatRestartsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        self.main_source = "lotta-signals.c"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+
+    @skipIfFreeBSD  # llvm.org/pr19246: intermittent failure
+    @skipIfDarwin  # llvm.org/pr19246: intermittent failure
+    @skipIfWindows  # Test relies on signals, unsupported on Windows
+    @expectedFlakeyAndroid(bugnumber="llvm.org/pr19246")
+    @expectedFailureNetBSD
+    def test(self):
+        """Test calling function that hits a signal and restarts."""
+        self.build()
+        self.call_function()
+
+    def check_after_call(self, num_sigchld):
+        after_call = self.sigchld_no.GetValueAsSigned(-1)
+        self.assertTrue(
+            after_call -
+            self.start_sigchld_no == num_sigchld,
+            "Really got %d SIGCHLD signals through the call." %
+            (num_sigchld))
+        self.start_sigchld_no = after_call
+
+        # Check that we are back where we were before:
+        frame = self.thread.GetFrameAtIndex(0)
+        self.assertTrue(
+            self.orig_frame_pc == frame.GetPC(),
+            "Restored the zeroth frame correctly")
+
+    def call_function(self):
+        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                      'Stop here in main.', self.main_source_spec)
+
+        # Make sure the SIGCHLD behavior is pass/no-stop/no-notify:
+        return_obj = lldb.SBCommandReturnObject()
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "process handle SIGCHLD -s 0 -p 1 -n 0", return_obj)
+        self.assertTrue(return_obj.Succeeded(), "Set SIGCHLD to pass, no-stop")
+
+        # The sigchld_no variable should be 0 at this point.
+        self.sigchld_no = target.FindFirstGlobalVariable("sigchld_no")
+        self.assertTrue(
+            self.sigchld_no.IsValid(),
+            "Got a value for sigchld_no")
+
+        self.start_sigchld_no = self.sigchld_no.GetValueAsSigned(-1)
+        self.assertTrue(
+            self.start_sigchld_no != -1,
+            "Got an actual value for sigchld_no")
+
+        options = lldb.SBExpressionOptions()
+        # processing 30 signals takes a while, increase the expression timeout
+        # a bit
+        options.SetTimeoutInMicroSeconds(3000000)  # 3s
+        options.SetUnwindOnError(True)
+
+        frame = self.thread.GetFrameAtIndex(0)
+        # Store away the PC to check that the functions unwind to the right
+        # place after calls
+        self.orig_frame_pc = frame.GetPC()
+
+        num_sigchld = 30
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
+
+        self.check_after_call(num_sigchld)
+
+        # Okay, now try with a breakpoint in the called code in the case where
+        # we are ignoring breakpoint hits.
+        handler_bkpt = target.BreakpointCreateBySourceRegex(
+            "Got sigchld %d.", self.main_source_spec)
+        self.assertTrue(handler_bkpt.GetNumLocations() > 0)
+        options.SetIgnoreBreakpoints(True)
+        options.SetUnwindOnError(True)
+
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
+
+        self.assertTrue(value.IsValid() and value.GetError().Success())
+        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
+        self.check_after_call(num_sigchld)
+
+        # Now set the signal to print but not stop and make sure that calling
+        # still works:
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
+        self.assertTrue(
+            return_obj.Succeeded(),
+            "Set SIGCHLD to pass, no-stop, notify")
+
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
+
+        self.assertTrue(value.IsValid() and value.GetError().Success())
+        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
+        self.check_after_call(num_sigchld)
+
+        # Now set this unwind on error to false, and make sure that we still
+        # complete the call:
+        options.SetUnwindOnError(False)
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
+
+        self.assertTrue(value.IsValid() and value.GetError().Success())
+        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
+        self.check_after_call(num_sigchld)
+
+        # Okay, now set UnwindOnError to true, and then make the signal behavior to stop
+        # and see that now we do stop at the signal point:
+
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "process handle SIGCHLD -s 1 -p 1 -n 1", return_obj)
+        self.assertTrue(
+            return_obj.Succeeded(),
+            "Set SIGCHLD to pass, stop, notify")
+
+        value = frame.EvaluateExpression(
+            "call_me (%d)" %
+            (num_sigchld), options)
+        self.assertTrue(
+            value.IsValid() and value.GetError().Success() == False)
+
+        # Set signal handling back to no-stop, and continue and we should end
+        # up back in out starting frame:
+        self.dbg.GetCommandInterpreter().HandleCommand(
+            "process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
+        self.assertTrue(
+            return_obj.Succeeded(),
+            "Set SIGCHLD to pass, no-stop, notify")
+
+        error = process.Continue()
+        self.assertTrue(
+            error.Success(),
+            "Continuing after stopping for signal succeeds.")
+
+        frame = self.thread.GetFrameAtIndex(0)
+        self.assertTrue(
+            frame.GetPC() == self.orig_frame_pc,
+            "Continuing returned to the place we started.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-restarts/lotta-signals.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/lotta-signals.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-restarts/lotta-signals.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/lotta-signals.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile
new file mode 100644
index 0000000..becb2f0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/Makefile
@@ -0,0 +1,3 @@
+OBJC_SOURCES := call-throws.m
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/TestCallThatThrows.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/TestCallThatThrows.py
new file mode 100644
index 0000000..fea56f1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/TestCallThatThrows.py
@@ -0,0 +1,103 @@
+"""
+Test calling a function that throws an ObjC exception, make sure that it doesn't propagate the exception.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCommandWithThrowTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        self.main_source = "call-throws.m"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+
+    @skipUnlessDarwin
+    def test(self):
+        """Test calling a function that throws and ObjC exception."""
+        self.build()
+        self.call_function()
+
+    def check_after_call(self):
+        # Check that we are back where we were before:
+        frame = self.thread.GetFrameAtIndex(0)
+        self.assertTrue(
+            self.orig_frame_pc == frame.GetPC(),
+            "Restored the zeroth frame correctly")
+
+    def call_function(self):
+        """Test calling function that throws."""
+        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                   'I am about to throw.', self.main_source_spec)
+
+        options = lldb.SBExpressionOptions()
+        options.SetUnwindOnError(True)
+
+        frame = self.thread.GetFrameAtIndex(0)
+        # Store away the PC to check that the functions unwind to the right
+        # place after calls
+        self.orig_frame_pc = frame.GetPC()
+
+        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success() == False)
+
+        self.check_after_call()
+
+        # Okay, now try with a breakpoint in the called code in the case where
+        # we are ignoring breakpoint hits.
+        handler_bkpt = target.BreakpointCreateBySourceRegex(
+            "I felt like it", self.main_source_spec)
+        self.assertTrue(handler_bkpt.GetNumLocations() > 0)
+        options.SetIgnoreBreakpoints(True)
+        options.SetUnwindOnError(True)
+
+        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
+
+        self.assertTrue(
+            value.IsValid() and value.GetError().Success() == False)
+        self.check_after_call()
+
+        # Now set the ObjC language breakpoint and make sure that doesn't
+        # interfere with the call:
+        exception_bkpt = target.BreakpointCreateForException(
+            lldb.eLanguageTypeObjC, False, True)
+        self.assertTrue(exception_bkpt.GetNumLocations() > 0)
+
+        options.SetIgnoreBreakpoints(True)
+        options.SetUnwindOnError(True)
+
+        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
+
+        self.assertTrue(
+            value.IsValid() and value.GetError().Success() == False)
+        self.check_after_call()
+
+        # Now turn off exception trapping, and call a function that catches the exceptions,
+        # and make sure the function actually completes, and we get the right
+        # value:
+        options.SetTrapExceptions(False)
+        value = frame.EvaluateExpression("[my_class iCatchMyself]", options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertTrue(value.GetValueAsUnsigned() == 57)
+        self.check_after_call()
+        options.SetTrapExceptions(True)
+
+        # Now set this unwind on error to false, and make sure that we stop
+        # where the exception was thrown
+        options.SetUnwindOnError(False)
+        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
+
+        self.assertTrue(
+            value.IsValid() and value.GetError().Success() == False)
+        self.check_after_call()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-throws/call-throws.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/call-throws.m
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-throws/call-throws.m
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/call-throws.m
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/TestCastIntToAnonymousEnum.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/TestCastIntToAnonymousEnum.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/TestCastIntToAnonymousEnum.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/TestCastIntToAnonymousEnum.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/cast_int_to_anonymous_enum/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/char/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/char/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/char/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/char/TestExprsChar.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/char/TestExprsChar.py
new file mode 100644
index 0000000..f1fa780
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/char/TestExprsChar.py
@@ -0,0 +1,68 @@
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCharTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        self.main_source = "main.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+
+    def do_test(self, dictionary=None):
+        """These basic expression commands should work as expected."""
+        self.build(dictionary=dictionary)
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                          '// Break here', self.main_source_spec)
+        frame = thread.GetFrameAtIndex(0)
+
+        value = frame.EvaluateExpression("foo(c)")
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertEqual(value.GetValueAsSigned(0), 1)
+
+        value = frame.EvaluateExpression("foo(sc)")
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertEqual(value.GetValueAsSigned(0), 2)
+
+        value = frame.EvaluateExpression("foo(uc)")
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertEqual(value.GetValueAsSigned(0), 3)
+
+    def test_default_char(self):
+        self.do_test()
+
+    @expectedFailureAll(
+        archs=[
+            "arm",
+            "aarch64",
+            "powerpc64le",
+            "s390x"],
+        bugnumber="llvm.org/pr23069")
+    def test_signed_char(self):
+        self.do_test(dictionary={'CFLAGS_EXTRAS': '-fsigned-char'})
+
+    @expectedFailureAll(
+        archs=[
+            "i[3-6]86",
+            "x86_64",
+            "arm64",
+            'arm64e',
+            'armv7',
+            'armv7k',
+            'arm64_32'],
+        bugnumber="llvm.org/pr23069, <rdar://problem/28721938>")
+    @expectedFailureAll(triple='mips*', bugnumber="llvm.org/pr23069")
+    def test_unsigned_char(self):
+        self.do_test(dictionary={'CFLAGS_EXTRAS': '-funsigned-char'})
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/char/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/char/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/char/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/char/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/TestClassTemplateSpecializationParametersHandling.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/class_template_specialization_empty_pack/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/class_template_specialization_empty_pack/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/class_template_specialization_empty_pack/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/TestCodegenCrashTypedefDeclNotInDeclContext.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/TestCodegenCrashTypedefDeclNotInDeclContext.py
new file mode 100644
index 0000000..f08c0dc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/TestCodegenCrashTypedefDeclNotInDeclContext.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp
new file mode 100644
index 0000000..e4f6600
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/codegen-crash-typedefdecl-not-in_declcontext/main.cpp
@@ -0,0 +1,39 @@
+// This is a reproducer for a crash in codegen. It happens when we have a
+// RecordDecl used in an expression and one of the FieldDecl are not complete.
+// This case happens when:
+// - A RecordDecl (E) has a FieldDecl which is a reference member variable
+// - The underlying type of the FieldDec is a TypedefDecl
+// - The typedef refers to a ClassTemplateSpecialization (DWrapper)
+// - The typedef is not present in the DeclContext of B
+// - The typedef shows up as a return value of a member function of E (f())
+template <typename T> struct DWrapper {};
+
+struct D {};
+
+namespace NS {
+typedef DWrapper<D> DW;
+}
+
+struct B {
+  NS::DW spd;
+  int a = 0;
+};
+
+struct E {
+  E(B &b) : b_ref(b) {}
+  NS::DW f() { return {}; };
+  void g() {
+    return; //%self.expect("p b_ref", substrs=['(B) $0 =', '(spd = NS::DW', 'a = 0)'])
+  }
+
+  B &b_ref;
+};
+
+int main() {
+  B b;
+  E e(b);
+
+  e.g();
+
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/TestCompletionCrashIncompleteRecord.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/TestCompletionCrashIncompleteRecord.py
new file mode 100644
index 0000000..f08c0dc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/TestCompletionCrashIncompleteRecord.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/main.cpp
new file mode 100644
index 0000000..f7ca83c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash-incomplete-record/main.cpp
@@ -0,0 +1,11 @@
+int i;
+struct F {
+  int &r;
+  F() : r(i) {}
+};
+template <class T> struct unique_ptr {
+  F i;
+  unique_ptr() : i() {//%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
+}
+};
+int main() {unique_ptr<F> u; }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/TestCompletionCrash1.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/TestCompletionCrash1.py
new file mode 100644
index 0000000..3f2a610
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/TestCompletionCrash1.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [decorators.skipIf(bugnumber="rdar://53659341")])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/main.cpp
new file mode 100644
index 0000000..7b123c0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-crash1/main.cpp
@@ -0,0 +1,12 @@
+namespace std {
+struct a {
+  a() {}
+  a(a &&);
+};
+template <class> struct au {
+  a ay;
+  ~au() { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
+  }
+};
+}
+int main() { std::au<int>{}; }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/TestCompletionInLambdaAndUnnamedClass.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/TestCompletionInLambdaAndUnnamedClass.py
new file mode 100644
index 0000000..57fb94b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/TestCompletionInLambdaAndUnnamedClass.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(),)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/main.cpp
new file mode 100644
index 0000000..a3d8ab6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion-in-lambda-and-unnamed-class/main.cpp
@@ -0,0 +1,11 @@
+int main() {
+  []()
+  { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
+  }
+  ();
+  struct {
+      void f()
+      { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
+      }
+  } A;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/.categories
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/.categories
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/.categories
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/Makefile
new file mode 100644
index 0000000..020dce7
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp other.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/TestExprCompletion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/TestExprCompletion.py
new file mode 100644
index 0000000..5266266
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/TestExprCompletion.py
@@ -0,0 +1,254 @@
+"""
+Test the lldb command line completion mechanism for the 'expr' command.
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbplatform
+from lldbsuite.test import lldbutil
+
+class CommandLineExprCompletionTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_expr_completion(self):
+        self.build()
+        self.main_source = "main.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+        self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
+
+        # Try the completion before we have a context to complete on.
+        self.assume_no_completions('expr some_expr')
+        self.assume_no_completions('expr ')
+        self.assume_no_completions('expr f')
+
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                          '// Break here', self.main_source_spec)
+
+        # Completing member functions
+        self.complete_exactly('expr some_expr.FooNoArgs',
+                              'expr some_expr.FooNoArgsBar()')
+        self.complete_exactly('expr some_expr.FooWithArgs',
+                              'expr some_expr.FooWithArgsBar(')
+        self.complete_exactly('expr some_expr.FooWithMultipleArgs',
+                              'expr some_expr.FooWithMultipleArgsBar(')
+        self.complete_exactly('expr some_expr.FooUnderscore',
+                              'expr some_expr.FooUnderscoreBar_()')
+        self.complete_exactly('expr some_expr.FooNumbers',
+                              'expr some_expr.FooNumbersBar1()')
+        self.complete_exactly('expr some_expr.StaticMemberMethod',
+                              'expr some_expr.StaticMemberMethodBar()')
+
+        # Completing static functions
+        self.complete_exactly('expr Expr::StaticMemberMethod',
+                              'expr Expr::StaticMemberMethodBar()')
+
+        # Completing member variables
+        self.complete_exactly('expr some_expr.MemberVariab',
+                              'expr some_expr.MemberVariableBar')
+
+        # Multiple completions
+        self.completions_contain('expr some_expr.',
+                                 ['some_expr.FooNumbersBar1()',
+                                  'some_expr.FooUnderscoreBar_()',
+                                  'some_expr.FooWithArgsBar(',
+                                  'some_expr.MemberVariableBar'])
+
+        self.completions_contain('expr some_expr.Foo',
+                                 ['some_expr.FooNumbersBar1()',
+                                  'some_expr.FooUnderscoreBar_()',
+                                  'some_expr.FooWithArgsBar('])
+
+        self.completions_contain('expr ',
+                                 ['static_cast',
+                                  'reinterpret_cast',
+                                  'dynamic_cast'])
+
+        self.completions_contain('expr 1 + ',
+                                 ['static_cast',
+                                  'reinterpret_cast',
+                                  'dynamic_cast'])
+
+        # Completion expr without spaces
+        # This is a bit awkward looking for the user, but that's how
+        # the completion API works at the moment.
+        self.completions_contain('expr 1+',
+                                 ['1+some_expr', "1+static_cast"])
+
+        # Test with spaces
+        self.complete_exactly('expr   some_expr .FooNoArgs',
+                              'expr   some_expr .FooNoArgsBar()')
+        self.complete_exactly('expr  some_expr .FooNoArgs',
+                              'expr  some_expr .FooNoArgsBar()')
+        self.complete_exactly('expr some_expr .FooNoArgs',
+                              'expr some_expr .FooNoArgsBar()')
+        self.complete_exactly('expr some_expr. FooNoArgs',
+                              'expr some_expr. FooNoArgsBar()')
+        self.complete_exactly('expr some_expr . FooNoArgs',
+                              'expr some_expr . FooNoArgsBar()')
+        self.complete_exactly('expr Expr :: StaticMemberMethod',
+                              'expr Expr :: StaticMemberMethodBar()')
+        self.complete_exactly('expr Expr ::StaticMemberMethod',
+                              'expr Expr ::StaticMemberMethodBar()')
+        self.complete_exactly('expr Expr:: StaticMemberMethod',
+                              'expr Expr:: StaticMemberMethodBar()')
+
+        # Test that string literals don't break our parsing logic.
+        self.complete_exactly('expr const char *cstr = "some_e"; char c = *cst',
+                              'expr const char *cstr = "some_e"; char c = *cstr')
+        self.complete_exactly('expr const char *cstr = "some_e" ; char c = *cst',
+                              'expr const char *cstr = "some_e" ; char c = *cstr')
+        # Requesting completions inside an incomplete string doesn't provide any
+        # completions.
+        self.complete_exactly('expr const char *cstr = "some_e',
+                              'expr const char *cstr = "some_e')
+
+        # Completing inside double dash should do nothing
+        self.assume_no_completions('expr -i0 -- some_expr.', 10)
+        self.assume_no_completions('expr -i0 -- some_expr.', 11)
+
+        # Test with expr arguments
+        self.complete_exactly('expr -i0 -- some_expr .FooNoArgs',
+                              'expr -i0 -- some_expr .FooNoArgsBar()')
+        self.complete_exactly('expr  -i0 -- some_expr .FooNoArgs',
+                              'expr  -i0 -- some_expr .FooNoArgsBar()')
+
+        # Addrof and deref
+        self.complete_exactly('expr (*(&some_expr)).FooNoArgs',
+                              'expr (*(&some_expr)).FooNoArgsBar()')
+        self.complete_exactly('expr (*(&some_expr)) .FooNoArgs',
+                              'expr (*(&some_expr)) .FooNoArgsBar()')
+        self.complete_exactly('expr (* (&some_expr)) .FooNoArgs',
+                              'expr (* (&some_expr)) .FooNoArgsBar()')
+        self.complete_exactly('expr (* (& some_expr)) .FooNoArgs',
+                              'expr (* (& some_expr)) .FooNoArgsBar()')
+
+        # Addrof and deref (part 2)
+        self.complete_exactly('expr (&some_expr)->FooNoArgs',
+                              'expr (&some_expr)->FooNoArgsBar()')
+        self.complete_exactly('expr (&some_expr) ->FooNoArgs',
+                              'expr (&some_expr) ->FooNoArgsBar()')
+        self.complete_exactly('expr (&some_expr) -> FooNoArgs',
+                              'expr (&some_expr) -> FooNoArgsBar()')
+        self.complete_exactly('expr (&some_expr)-> FooNoArgs',
+                              'expr (&some_expr)-> FooNoArgsBar()')
+
+        # Builtin arg
+        self.complete_exactly('expr static_ca',
+                              'expr static_cast')
+
+        # From other files
+        self.complete_exactly('expr fwd_decl_ptr->Hidden',
+                              'expr fwd_decl_ptr->HiddenMember')
+
+
+        # Types
+        self.complete_exactly('expr LongClassNa',
+                              'expr LongClassName')
+        self.complete_exactly('expr LongNamespaceName::NestedCla',
+                              'expr LongNamespaceName::NestedClass')
+
+        # Namespaces
+        self.complete_exactly('expr LongNamespaceNa',
+                              'expr LongNamespaceName::')
+
+        # Multiple arguments
+        self.complete_exactly('expr &some_expr + &some_e',
+                              'expr &some_expr + &some_expr')
+        self.complete_exactly('expr SomeLongVarNameWithCapitals + SomeLongVarName',
+                              'expr SomeLongVarNameWithCapitals + SomeLongVarNameWithCapitals')
+        self.complete_exactly('expr SomeIntVar + SomeIntV',
+                              'expr SomeIntVar + SomeIntVar')
+
+        # Multiple statements
+        self.complete_exactly('expr long LocalVariable = 0; LocalVaria',
+                              'expr long LocalVariable = 0; LocalVariable')
+
+        # Custom Decls
+        self.complete_exactly('expr auto l = [](int LeftHandSide, int bx){ return LeftHandS',
+                              'expr auto l = [](int LeftHandSide, int bx){ return LeftHandSide')
+        self.complete_exactly('expr struct LocalStruct { long MemberName; } ; LocalStruct S; S.Mem',
+                              'expr struct LocalStruct { long MemberName; } ; LocalStruct S; S.MemberName')
+
+        # Completing function call arguments
+        self.complete_exactly('expr some_expr.FooWithArgsBar(some_exp',
+                              'expr some_expr.FooWithArgsBar(some_expr')
+        self.complete_exactly('expr some_expr.FooWithArgsBar(SomeIntV',
+                              'expr some_expr.FooWithArgsBar(SomeIntVar')
+        self.complete_exactly('expr some_expr.FooWithMultipleArgsBar(SomeIntVar, SomeIntVa',
+                              'expr some_expr.FooWithMultipleArgsBar(SomeIntVar, SomeIntVar')
+
+        # Function return values
+        self.complete_exactly('expr some_expr.Self().FooNoArgs',
+                              'expr some_expr.Self().FooNoArgsBar()')
+        self.complete_exactly('expr some_expr.Self() .FooNoArgs',
+                              'expr some_expr.Self() .FooNoArgsBar()')
+        self.complete_exactly('expr some_expr.Self(). FooNoArgs',
+                              'expr some_expr.Self(). FooNoArgsBar()')
+
+    def test_expr_completion_with_descriptions(self):
+        self.build()
+        self.main_source = "main.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+        self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                          '// Break here', self.main_source_spec)
+
+        self.check_completion_with_desc("expr ", [
+            # VarDecls have their type as description.
+            ["some_expr", "Expr &"],
+            # builtin types have no description.
+            ["int", ""],
+            ["float", ""]
+        ])
+        self.check_completion_with_desc("expr some_expr.", [
+            # Functions have their signature as description.
+            ["some_expr.Self()", "Expr &Self()"],
+            ["some_expr.operator=(", "inline Expr &operator=(const Expr &)"],
+            ["some_expr.FooNumbersBar1()", "int FooNumbersBar1()"],
+            ["some_expr.StaticMemberMethodBar()", "static int StaticMemberMethodBar()"],
+            ["some_expr.FooWithArgsBar(", "int FooWithArgsBar(int)"],
+            ["some_expr.FooNoArgsBar()", "int FooNoArgsBar()"],
+            ["some_expr.FooUnderscoreBar_()", "int FooUnderscoreBar_()"],
+            ["some_expr.FooWithMultipleArgsBar(", "int FooWithMultipleArgsBar(int, int)"],
+            ["some_expr.~Expr()", "inline ~Expr()"],
+            # FieldDecls have their type as description.
+            ["some_expr.MemberVariableBar", "int"],
+        ])
+
+    def assume_no_completions(self, str_input, cursor_pos = None):
+        interp = self.dbg.GetCommandInterpreter()
+        match_strings = lldb.SBStringList()
+        if cursor_pos is None:
+          cursor_pos = len(str_input)
+        num_matches = interp.HandleCompletion(str_input, cursor_pos, 0, -1, match_strings)
+
+        available_completions = []
+        for m in match_strings:
+            available_completions.append(m)
+
+        self.assertEquals(num_matches, 0, "Got matches, but didn't expect any: " + str(available_completions))
+
+    def completions_contain(self, str_input, items):
+        interp = self.dbg.GetCommandInterpreter()
+        match_strings = lldb.SBStringList()
+        num_matches = interp.HandleCompletion(str_input, len(str_input), 0, -1, match_strings)
+        common_match = match_strings.GetStringAtIndex(0)
+
+        for item in items:
+            found = False
+            for m in match_strings:
+                if m == item:
+                    found = True
+            if not found:
+                # Transform match_strings to a python list with strings
+                available_completions = []
+                for m in match_strings:
+                     available_completions.append(m)
+                self.assertTrue(found, "Couldn't find completion " + item + " in completions " + str(available_completions))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/other.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/other.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/other.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/completion/other.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile
new file mode 100644
index 0000000..a3198db
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/Makefile
@@ -0,0 +1,3 @@
+OBJC_SOURCES := main.m
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object-objc/TestContextObjectObjc.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/TestContextObjectObjc.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object-objc/TestContextObjectObjc.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/TestContextObjectObjc.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object-objc/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/main.m
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object-objc/main.m
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object-objc/main.m
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object/TestContextObject.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/TestContextObject.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object/TestContextObject.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/TestContextObject.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/context-object/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/TestExprDiagnostics.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/TestExprDiagnostics.py
new file mode 100644
index 0000000..da29d7b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/TestExprDiagnostics.py
@@ -0,0 +1,112 @@
+"""
+Test the diagnostics emitted by our embeded Clang instance that parses expressions.
+"""
+
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+from lldbsuite.test.decorators import *
+
+class ExprDiagnosticsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        self.main_source = "main.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+
+    def test_source_and_caret_printing(self):
+        """Test that the source and caret positions LLDB prints are correct"""
+        self.build()
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                          '// Break here', self.main_source_spec)
+        frame = thread.GetFrameAtIndex(0)
+
+        # Test that source/caret are at the right position.
+        value = frame.EvaluateExpression("unknown_identifier")
+        self.assertFalse(value.GetError().Success())
+        # We should get a nice diagnostic with a caret pointing at the start of
+        # the identifier.
+        self.assertIn("\nunknown_identifier\n^\n", value.GetError().GetCString())
+        self.assertIn("<user expression 0>:1:1", value.GetError().GetCString())
+
+        # Same as above but with the identifier in the middle.
+        value = frame.EvaluateExpression("1 + unknown_identifier  ")
+        self.assertFalse(value.GetError().Success())
+        self.assertIn("\n1 + unknown_identifier", value.GetError().GetCString())
+        self.assertIn("\n    ^\n", value.GetError().GetCString())
+
+        # Multiline expressions.
+        value = frame.EvaluateExpression("int a = 0;\nfoobar +=1;\na")
+        self.assertFalse(value.GetError().Success())
+        # We should still get the right line information and caret position.
+        self.assertIn("\nfoobar +=1;\n^\n", value.GetError().GetCString())
+        # It's the second line of the user expression.
+        self.assertIn("<user expression 2>:2:1", value.GetError().GetCString())
+
+        # Top-level expressions.
+        top_level_opts = lldb.SBExpressionOptions();
+        top_level_opts.SetTopLevel(True)
+
+        value = frame.EvaluateExpression("void foo(unknown_type x) {}", top_level_opts)
+        self.assertFalse(value.GetError().Success())
+        self.assertIn("\nvoid foo(unknown_type x) {}\n         ^\n", value.GetError().GetCString())
+        # Top-level expressions might use a different wrapper code, but the file name should still
+        # be the same.
+        self.assertIn("<user expression 3>:1:10", value.GetError().GetCString())
+
+        # Multiline top-level expressions.
+        value = frame.EvaluateExpression("void x() {}\nvoid foo(unknown_type x) {}", top_level_opts)
+        self.assertFalse(value.GetError().Success())
+        self.assertIn("\nvoid foo(unknown_type x) {}\n         ^\n", value.GetError().GetCString())
+        self.assertIn("<user expression 4>:2:10", value.GetError().GetCString())
+
+        # Test that we render Clang's 'notes' correctly.
+        value = frame.EvaluateExpression("struct SFoo{}; struct SFoo { int x; };", top_level_opts)
+        self.assertFalse(value.GetError().Success())
+        self.assertIn("<user expression 5>:1:8: previous definition is here\nstruct SFoo{}; struct SFoo { int x; };\n       ^\n", value.GetError().GetCString())
+
+        # Declarations from the debug information currently have no debug information. It's not clear what
+        # we should do in this case, but we should at least not print anything that's wrong.
+        # In the future our declarations should have valid source locations.
+        value = frame.EvaluateExpression("struct FooBar { double x };", top_level_opts)
+        self.assertFalse(value.GetError().Success())
+        self.assertEqual("error: <user expression 6>:1:8: redefinition of 'FooBar'\nstruct FooBar { double x };\n       ^\n", value.GetError().GetCString())
+
+        value = frame.EvaluateExpression("foo(1, 2)")
+        self.assertFalse(value.GetError().Success())
+        self.assertEqual("error: <user expression 7>:1:1: no matching function for call to 'foo'\nfoo(1, 2)\n^~~\nnote: candidate function not viable: requires single argument 'x', but 2 arguments were provided\n\n", value.GetError().GetCString())
+
+        # Redefine something that we defined in a user-expression. We should use the previous expression file name
+        # for the original decl.
+        value = frame.EvaluateExpression("struct Redef { double x; };", top_level_opts)
+        value = frame.EvaluateExpression("struct Redef { float y; };", top_level_opts)
+        self.assertFalse(value.GetError().Success())
+        self.assertIn("error: <user expression 9>:1:8: redefinition of 'Redef'\nstruct Redef { float y; };\n       ^\n<user expression 8>:1:8: previous definition is here\nstruct Redef { double x; };\n       ^", value.GetError().GetCString())
+
+    @skipUnlessDarwin
+    def test_source_locations_from_objc_modules(self):
+        self.build()
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                          '// Break here', self.main_source_spec)
+        frame = thread.GetFrameAtIndex(0)
+
+        # Import foundation so that the Obj-C module is loaded (which contains source locations
+        # that can be used by LLDB).
+        self.runCmd("expr @import Foundation")
+        value = frame.EvaluateExpression("NSLog(1);")
+        self.assertFalse(value.GetError().Success())
+        # LLDB should print the source line that defines NSLog. To not rely on any
+        # header paths/line numbers or the actual formatting of the Foundation headers, only look
+        # for a few tokens in the output.
+        # File path should come from Foundation framework.
+        self.assertIn("/Foundation.framework/", value.GetError().GetCString())
+        # The NSLog definition source line should be printed. Return value and
+        # the first argument are probably stable enough that this test can check for them.
+        self.assertIn("void NSLog(NSString *format", value.GetError().GetCString())
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/main.cpp
new file mode 100644
index 0000000..f4ad1ad
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/diagnostics/main.cpp
@@ -0,0 +1,11 @@
+void foo(int x) {}
+
+struct FooBar {
+  int i;
+};
+
+int main() {
+  FooBar f;
+  foo(1);
+  return 0; // Break here
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dollar-in-variable/TestDollarInVariable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/TestDollarInVariable.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dollar-in-variable/TestDollarInVariable.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/TestDollarInVariable.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dollar-in-variable/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dollar-in-variable/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dollar-in-variable/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile
new file mode 100644
index 0000000..695335e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/Makefile
@@ -0,0 +1,4 @@
+C_SOURCES := main.c
+CFLAGS_EXTRAS := -std=c99
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/TestAllowJIT.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/TestAllowJIT.py
new file mode 100644
index 0000000..c70e90e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/TestAllowJIT.py
@@ -0,0 +1,82 @@
+"""
+Test that --allow-jit=false does disallow JITting:
+"""
+
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+class TestAllowJIT(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # If your test case doesn't stress debug info, the
+    # set this to true.  That way it won't be run once for
+    # each debug info format.
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_allow_jit_expr_command(self):
+        """Test the --allow-jit command line flag"""
+        self.build()
+        self.main_source_file = lldb.SBFileSpec("main.c")
+        self.expr_cmd_test()
+
+    def test_allow_jit_options(self):
+        """Test the SetAllowJIT SBExpressionOption setting"""
+        self.build()
+        self.main_source_file = lldb.SBFileSpec("main.c")
+        self.expr_options_test()
+
+    def expr_cmd_test(self):
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                   "Set a breakpoint here", self.main_source_file)
+
+        frame = thread.GetFrameAtIndex(0)
+
+        # First make sure we can call the function with 
+        interp = self.dbg.GetCommandInterpreter()
+        self.expect("expr --allow-jit 1 -- call_me(10)",
+                    substrs = ["(int) $", "= 18"])
+        # Now make sure it fails with the "can't IR interpret message" if allow-jit is false:
+        self.expect("expr --allow-jit 0 -- call_me(10)",
+                    error=True,
+                    substrs = ["Can't evaluate the expression without a running target"])
+
+    def expr_options_test(self):
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                   "Set a breakpoint here", self.main_source_file)
+
+        frame = thread.GetFrameAtIndex(0)
+
+        # First make sure we can call the function with the default option set. 
+        options = lldb.SBExpressionOptions()
+        # Check that the default is to allow JIT:
+        self.assertEqual(options.GetAllowJIT(), True, "Default is true")
+
+        # Now use the options:
+        result = frame.EvaluateExpression("call_me(10)", options)
+        self.assertTrue(result.GetError().Success(), "expression succeeded")
+        self.assertEqual(result.GetValueAsSigned(), 18, "got the right value.")
+
+        # Now disallow JIT and make sure it fails:
+        options.SetAllowJIT(False)
+        # Check that we got the right value:
+        self.assertEqual(options.GetAllowJIT(), False, "Got False after setting to False")
+
+        # Again use it and ensure we fail:
+        result = frame.EvaluateExpression("call_me(10)", options)
+        self.assertTrue(result.GetError().Fail(), "expression failed with no JIT")
+        self.assertTrue("Can't evaluate the expression without a running target" in result.GetError().GetCString(), "Got right error")
+
+        # Finally set the allow JIT value back to true and make sure that works:
+        options.SetAllowJIT(True)
+        self.assertEqual(options.GetAllowJIT(), True, "Set back to True correctly")
+
+        # And again, make sure this works:
+        result = frame.EvaluateExpression("call_me(10)", options)
+        self.assertTrue(result.GetError().Success(), "expression succeeded")
+        self.assertEqual(result.GetValueAsSigned(), 18, "got the right value.")
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dont_allow_jit/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dont_allow_jit/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/TestExprEntryBP.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/TestExprEntryBP.py
new file mode 100644
index 0000000..b6e6b8b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/TestExprEntryBP.py
@@ -0,0 +1,32 @@
+"""
+Tests expressions evaluation when the breakpoint on module's entry is set.
+"""
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+class ExprEntryBPTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_expr_entry_bp(self):
+        """Tests expressions evaluation when the breakpoint on module's entry is set."""
+        self.build()
+        self.main_source_file = lldb.SBFileSpec("main.c")
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, "Set a breakpoint here", self.main_source_file)
+
+        self.assertEqual(1, bkpt.GetNumLocations())
+        entry = bkpt.GetLocationAtIndex(0).GetAddress().GetModule().GetObjectFileEntryPointAddress()
+        self.assertTrue(entry.IsValid(), "Can't get a module entry point")
+
+        entry_bp = target.BreakpointCreateBySBAddress(entry)
+        self.assertTrue(entry_bp.IsValid(), "Can't set a breakpoint on the module entry point")
+
+        result = target.EvaluateExpression("sum(7, 1)")
+        self.assertTrue(result.IsValid(), "Can't evaluate expression")
+        self.assertEqual(8, result.GetValueAsSigned())
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-entry-bp/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-entry-bp/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/entry-bp/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/TestExpressionInSyscall.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/TestExpressionInSyscall.py
new file mode 100644
index 0000000..a383f69
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/TestExpressionInSyscall.py
@@ -0,0 +1,89 @@
+"""Test that we are able to evaluate expressions when the inferior is blocked in a syscall"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprSyscallTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @expectedFailureAll(
+        oslist=["windows"],
+        bugnumber="llvm.org/pr21765, getpid() does not exist on Windows")
+    @expectedFailureNetBSD
+    def test_setpgid(self):
+        self.build()
+        self.expr_syscall()
+
+    def expr_syscall(self):
+        exe = self.getBuildArtifact("a.out")
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        listener = lldb.SBListener("my listener")
+
+        # launch the inferior and don't wait for it to stop
+        self.dbg.SetAsync(True)
+        error = lldb.SBError()
+        process = target.Launch(listener,
+                                None,      # argv
+                                None,      # envp
+                                None,      # stdin_path
+                                None,      # stdout_path
+                                None,      # stderr_path
+                                None,      # working directory
+                                0,         # launch flags
+                                False,     # Stop at entry
+                                error)     # error
+
+        self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
+
+        event = lldb.SBEvent()
+
+        # Give the child enough time to reach the syscall,
+        # while clearing out all the pending events.
+        # The last WaitForEvent call will time out after 2 seconds.
+        while listener.WaitForEvent(2, event):
+            pass
+
+        # now the process should be running (blocked in the syscall)
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateRunning,
+            "Process is running")
+
+        # send the process a signal
+        process.SendAsyncInterrupt()
+        while listener.WaitForEvent(2, event):
+            pass
+
+        # as a result the process should stop
+        # in all likelihood we have stopped in the middle of the sleep()
+        # syscall
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateStopped,
+            PROCESS_STOPPED)
+        thread = process.GetSelectedThread()
+
+        # try evaluating a couple of expressions in this state
+        self.expect("expr release_flag = 1", substrs=[" = 1"])
+        self.expect("print (int)getpid()",
+                    substrs=[str(process.GetProcessID())])
+
+        # and run the process to completion
+        process.Continue()
+
+        # process all events
+        while listener.WaitForEvent(10, event):
+            new_state = lldb.SBProcess.GetStateFromEvent(event)
+            if new_state == lldb.eStateExited:
+                break
+
+        self.assertEqual(process.GetState(), lldb.eStateExited)
+        self.assertEqual(process.GetExitStatus(), 0)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/TestFixIts.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/TestFixIts.py
new file mode 100644
index 0000000..c93a05a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/TestFixIts.py
@@ -0,0 +1,71 @@
+"""
+Test calling an expression with errors that a FixIt can fix.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCommandWithFixits(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        self.main_source = "main.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+
+    @skipUnlessDarwin
+    def test_with_target(self):
+        """Test calling expressions with errors that can be fixed by the FixIts."""
+        self.build()
+        self.try_expressions()
+
+    def test_with_dummy_target(self):
+        """Test calling expressions in the dummy target with errors that can be fixed by the FixIts."""
+        ret_val = lldb.SBCommandReturnObject()
+        result = self.dbg.GetCommandInterpreter().HandleCommand("expression ((1 << 16) - 1))", ret_val)
+        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "The expression was successful.")
+        self.assertTrue("Fix-it applied" in ret_val.GetError(), "Found the applied FixIt.")
+
+    def try_expressions(self):
+        """Test calling expressions with errors that can be fixed by the FixIts."""
+        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                        'Stop here to evaluate expressions', self.main_source_spec)
+
+        options = lldb.SBExpressionOptions()
+        options.SetAutoApplyFixIts(True)
+
+        frame = self.thread.GetFrameAtIndex(0)
+
+        # Try with one error:
+        value = frame.EvaluateExpression("my_pointer.first", options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertTrue(value.GetValueAsUnsigned() == 10)
+
+        # Try with two errors:
+        two_error_expression = "my_pointer.second->a"
+        value = frame.EvaluateExpression(two_error_expression, options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertTrue(value.GetValueAsUnsigned() == 20)
+
+        # Now turn off the fixits, and the expression should fail:
+        options.SetAutoApplyFixIts(False)
+        value = frame.EvaluateExpression(two_error_expression, options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Fail())
+        error_string = value.GetError().GetCString()
+        self.assertTrue(
+            error_string.find("fixed expression suggested:") != -1,
+            "Fix was suggested")
+        self.assertTrue(
+            error_string.find("my_pointer->second.a") != -1,
+            "Fix was right")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/fixits/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/fixits/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/fixits/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py
new file mode 100644
index 0000000..98872df
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py
@@ -0,0 +1,300 @@
+"""
+Test using LLDB data formatters with frozen objects coming from the expression parser.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprFormattersTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.cpp.
+        self.line = line_number('main.cpp',
+                                '// Stop here')
+
+    @skipIfFreeBSD  # llvm.org/pr24691 skipping to avoid crashing the test runner
+    @expectedFailureNetBSD
+    @expectedFailureAll(
+        oslist=['freebsd'],
+        bugnumber='llvm.org/pr19011 Newer Clang omits C1 complete object constructor')
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
+    @skipIfTargetAndroid()  # skipping to avoid crashing the test runner
+    @expectedFailureAndroid('llvm.org/pr24691')  # we hit an assertion in clang
+    def test(self):
+        """Test expr + formatters for good interoperability."""
+        self.build()
+
+        # This is the function to remove the custom formats in order to have a
+        # clean slate for the next test case.
+        def cleanup():
+            self.runCmd('type summary clear', check=False)
+            self.runCmd('type synthetic clear', check=False)
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        """Test expr + formatters for good interoperability."""
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.runCmd("command script import formatters.py")
+        self.runCmd("command script import foosynth.py")
+
+        if self.TraceOn():
+            self.runCmd("frame variable foo1 --show-types")
+            self.runCmd("frame variable foo1.b --show-types")
+            self.runCmd("frame variable foo1.b.b_ref --show-types")
+
+        self.filecheck("expression --show-types -- *(new foo(47))", __file__,
+                '-check-prefix=EXPR-TYPES-NEW-FOO')
+        # EXPR-TYPES-NEW-FOO: (foo) ${{.*}} = {
+        # EXPR-TYPES-NEW-FOO-NEXT:   (int) a = 47
+        # EXPR-TYPES-NEW-FOO-NEXT:   (int *) a_ptr = 0x
+        # EXPR-TYPES-NEW-FOO-NEXT:   (bar) b = {
+        # EXPR-TYPES-NEW-FOO-NEXT:     (int) i = 94
+        # EXPR-TYPES-NEW-FOO-NEXT:     (int *) i_ptr = 0x
+        # EXPR-TYPES-NEW-FOO-NEXT:     (baz) b = {
+        # EXPR-TYPES-NEW-FOO-NEXT:       (int) h = 97
+        # EXPR-TYPES-NEW-FOO-NEXT:       (int) k = 99
+        # EXPR-TYPES-NEW-FOO-NEXT:     }
+        # EXPR-TYPES-NEW-FOO-NEXT:     (baz &) b_ref = 0x
+        # EXPR-TYPES-NEW-FOO-NEXT:   }
+        # EXPR-TYPES-NEW-FOO-NEXT: }
+
+
+        self.runCmd("type summary add -F formatters.foo_SummaryProvider3 foo")
+        self.filecheck("expression foo1", __file__, '-check-prefix=EXPR-FOO1opts')
+        # EXPR-FOO1opts: (foo) $
+        # EXPR-FOO1opts-SAME: a = 12
+        # EXPR-FOO1opts-SAME: a_ptr = {{[0-9]+}} -> 13
+        # EXPR-FOO1opts-SAME: i = 24
+        # EXPR-FOO1opts-SAME: i_ptr = {{[0-9]+}} -> 25
+        # EXPR-FOO1opts-SAME: b_ref = {{[0-9]+}}
+        # EXPR-FOO1opts-SAME: h = 27
+        # EXPR-FOO1opts-SAME: k = 29
+        # EXPR-FOO1opts-SAME: WITH_OPTS
+
+        self.runCmd("type summary delete foo")
+
+        self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
+
+        self.expect("expression new int(12)",
+                    substrs=['(int *) $', ' = 0x'])
+
+        self.runCmd(
+            "type summary add -s \"${var%pointer} -> ${*var%decimal}\" \"int *\"")
+
+        self.expect("expression new int(12)",
+                    substrs=['(int *) $', '= 0x', ' -> 12'])
+
+        self.expect("expression foo1.a_ptr",
+                    substrs=['(int *) $', '= 0x', ' -> 13'])
+
+        self.filecheck("expression foo1", __file__, '-check-prefix=EXPR-FOO1')
+        # EXPR-FOO1: (foo) $
+        # EXPR-FOO1-SAME: a = 12
+        # EXPR-FOO1-SAME: a_ptr = {{[0-9]+}} -> 13
+        # EXPR-FOO1-SAME: i = 24
+        # EXPR-FOO1-SAME: i_ptr = {{[0-9]+}} -> 25
+        # EXPR-FOO1-SAME: b_ref = {{[0-9]+}}
+        # EXPR-FOO1-SAME: h = 27
+        # EXPR-FOO1-SAME: k = 29
+
+        self.filecheck("expression --ptr-depth=1 -- new foo(47)", __file__,
+                '-check-prefix=EXPR-PTR-DEPTH1')
+        # EXPR-PTR-DEPTH1: (foo *) $
+        # EXPR-PTR-DEPTH1-SAME: a = 47
+        # EXPR-PTR-DEPTH1-SAME: a_ptr = {{[0-9]+}} -> 48
+        # EXPR-PTR-DEPTH1-SAME: i = 94
+        # EXPR-PTR-DEPTH1-SAME: i_ptr = {{[0-9]+}} -> 95
+
+        self.filecheck("expression foo2", __file__, '-check-prefix=EXPR-FOO2')
+        # EXPR-FOO2: (foo) $
+        # EXPR-FOO2-SAME: a = 121
+        # EXPR-FOO2-SAME: a_ptr = {{[0-9]+}} -> 122
+        # EXPR-FOO2-SAME: i = 242
+        # EXPR-FOO2-SAME: i_ptr = {{[0-9]+}} -> 243
+        # EXPR-FOO2-SAME: h = 245
+        # EXPR-FOO2-SAME: k = 247
+
+        object_name = self.res.GetOutput()
+        object_name = object_name[7:]
+        object_name = object_name[0:object_name.find(' =')]
+
+        self.filecheck("frame variable foo2", __file__, '-check-prefix=VAR-FOO2')
+        # VAR-FOO2: (foo) foo2
+        # VAR-FOO2-SAME: a = 121
+        # VAR-FOO2-SAME: a_ptr = {{[0-9]+}} -> 122
+        # VAR-FOO2-SAME: i = 242
+        # VAR-FOO2-SAME: i_ptr = {{[0-9]+}} -> 243
+        # VAR-FOO2-SAME: h = 245
+        # VAR-FOO2-SAME: k = 247
+
+        # The object is the same as foo2, so use the EXPR-FOO2 checks.
+        self.filecheck("expression $" + object_name, __file__,
+                '-check-prefix=EXPR-FOO2')
+
+        self.runCmd("type summary delete foo")
+        self.runCmd(
+            "type synthetic add --python-class foosynth.FooSyntheticProvider foo")
+
+        self.expect("expression --show-types -- $" + object_name,
+                    substrs=['(foo) $', ' = {', '(int) *i_ptr = 243'])
+
+        self.runCmd("n")
+        self.runCmd("n")
+
+        self.runCmd("type synthetic delete foo")
+        self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
+
+        self.expect(
+            "expression foo2",
+            substrs=[
+                '(foo) $',
+                'a = 7777',
+                'a_ptr = ',
+                ' -> 122',
+                'i = 242',
+                'i_ptr = ',
+                ' -> 8888'])
+
+        self.expect("expression $" + object_name + '.a',
+                    substrs=['7777'])
+
+        self.expect("expression *$" + object_name + '.b.i_ptr',
+                    substrs=['8888'])
+
+        self.expect(
+            "expression $" +
+            object_name,
+            substrs=[
+                '(foo) $',
+                'a = 121',
+                'a_ptr = ',
+                ' -> 122',
+                'i = 242',
+                'i_ptr = ',
+                ' -> 8888',
+                'h = 245',
+                'k = 247'])
+
+        self.runCmd("type summary delete foo")
+        self.runCmd(
+            "type synthetic add --python-class foosynth.FooSyntheticProvider foo")
+
+        self.expect("expression --show-types -- $" + object_name,
+                    substrs=['(foo) $', ' = {', '(int) *i_ptr = 8888'])
+
+        self.runCmd("n")
+
+        self.runCmd("type synthetic delete foo")
+        self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
+
+        self.expect(
+            "expression $" +
+            object_name,
+            substrs=[
+                '(foo) $',
+                'a = 121',
+                'a_ptr = ',
+                ' -> 122',
+                'i = 242',
+                'i_ptr = ',
+                ' -> 8888',
+                'k = 247'])
+
+        process = self.dbg.GetSelectedTarget().GetProcess()
+        thread = process.GetThreadAtIndex(0)
+        frame = thread.GetSelectedFrame()
+
+        frozen = frame.EvaluateExpression("$" + object_name + ".a_ptr")
+
+        a_data = frozen.GetPointeeData()
+
+        error = lldb.SBError()
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                0) == 122,
+            '*a_ptr = 122')
+
+        ret = line_number("main.cpp", "Done initializing")
+        self.runCmd("thread until " + str(ret))
+
+        self.expect("frame variable numbers",
+                    substrs=['1', '2', '3', '4', '5'])
+
+        self.expect("expression numbers",
+                    substrs=['1', '2', '3', '4', '5'])
+
+        frozen = frame.EvaluateExpression("&numbers")
+
+        a_data = frozen.GetPointeeData(0, 1)
+
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                0) == 1,
+            'numbers[0] == 1')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                4) == 2,
+            'numbers[1] == 2')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                8) == 3,
+            'numbers[2] == 3')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                12) == 4,
+            'numbers[3] == 4')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                16) == 5,
+            'numbers[4] == 5')
+
+        frozen = frame.EvaluateExpression("numbers")
+
+        a_data = frozen.GetData()
+
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                0) == 1,
+            'numbers[0] == 1')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                4) == 2,
+            'numbers[1] == 2')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                8) == 3,
+            'numbers[2] == 3')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                12) == 4,
+            'numbers[3] == 4')
+        self.assertTrue(
+            a_data.GetUnsignedInt32(
+                error,
+                16) == 5,
+            'numbers[4] == 5')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/foosynth.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/foosynth.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/foosynth.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/foosynth.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/formatters.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/formatters.py
new file mode 100644
index 0000000..ac2888b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/formatters.py
@@ -0,0 +1,24 @@
+import lldb
+
+def foo_SummaryProvider(valobj, dict):
+    a = valobj.GetChildMemberWithName('a')
+    a_ptr = valobj.GetChildMemberWithName('a_ptr')
+    bar = valobj.GetChildMemberWithName('b')
+    i = bar.GetChildMemberWithName('i')
+    i_ptr = bar.GetChildMemberWithName('i_ptr')
+    b_ref = bar.GetChildMemberWithName('b_ref')
+    b_ref_ptr = b_ref.AddressOf()
+    b_ref = b_ref_ptr.Dereference()
+    h = b_ref.GetChildMemberWithName('h')
+    k = b_ref.GetChildMemberWithName('k')
+    return 'a = ' + str(a.GetValueAsUnsigned(0)) + ', a_ptr = ' + \
+        str(a_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(a_ptr.Dereference().GetValueAsUnsigned(0)) + \
+        ', i = ' + str(i.GetValueAsUnsigned(0)) + \
+        ', i_ptr = ' + str(i_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(i_ptr.Dereference().GetValueAsUnsigned(0)) + \
+        ', b_ref = ' + str(b_ref.GetValueAsUnsigned(0)) + \
+        ', h = ' + str(h.GetValueAsUnsigned(0)) + ' , k = ' + str(k.GetValueAsUnsigned(0))
+
+def foo_SummaryProvider3(valobj, dict, options):
+    if not isinstance(options, lldb.SBTypeSummaryOptions):
+        raise Exception()
+    return foo_SummaryProvider(valobj, dict) + ", WITH_OPTS"
\ No newline at end of file
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp
new file mode 100644
index 0000000..4ca2504
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/formatters/main.cpp
@@ -0,0 +1,48 @@
+#include <iostream>
+#include <string>
+
+struct baz
+    {
+        int h;
+        int k;
+        baz(int a, int b) : h(a), k(b) {}
+    };
+
+struct bar
+	{
+		int i;
+		int* i_ptr;
+        baz b;
+        baz& b_ref;
+		bar(int x) : i(x),i_ptr(new int(x+1)),b(i+3,i+5),b_ref(b) {}
+	};
+	
+struct foo
+	{
+		int a;
+		int* a_ptr;
+		bar b;
+		
+		foo(int x) : a(x),
+		a_ptr(new int(x+1)),
+		b(2*x) {}
+		
+	};
+	
+int main(int argc, char** argv)
+{
+	foo foo1(12);
+	foo foo2(121);
+	
+	foo2.a = 7777; // Stop here
+	*(foo2.b.i_ptr) = 8888;
+    foo2.b.b.h = 9999;
+	
+	*(foo1.a_ptr) = 9999;
+	foo1.b.i = 9999;
+	
+	int numbers[5] = {1,2,3,4,5};
+
+	return 0; // Done initializing
+
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/TestFunctionTemplateSpecializationTempArgs.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/function_template_specialization_temp_args/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/function_template_specialization_temp_args/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/function_template_specialization_temp_args/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/TestIgnoreArtificialConstructors.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/TestIgnoreArtificialConstructors.py
new file mode 100644
index 0000000..e33423a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/TestIgnoreArtificialConstructors.py
@@ -0,0 +1,5 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [lldbinline.expectedFailureAll(
+            oslist=["windows"], bugnumber="llvm.org/pr43707")])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/main.cpp
new file mode 100644
index 0000000..41457eb
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ignore-artificial-constructors/main.cpp
@@ -0,0 +1,10 @@
+struct Foo {
+  // Triggers that we emit an artificial constructor for Foo.
+  virtual ~Foo() = default;
+};
+
+int main() {
+  Foo f;
+  // Try to construct foo in our expression.
+  return 0; //%self.expect("expr Foo()", substrs=["(Foo) $0 = {}"])
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/TestImportStdModule.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/TestImportStdModule.py
new file mode 100644
index 0000000..de0d796
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/TestImportStdModule.py
@@ -0,0 +1,48 @@
+"""
+Test importing the 'std' C++ module and evaluate expressions with it.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ImportStdModule(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        # Activate importing of std module.
+        self.runCmd("settings set target.import-std-module true")
+        # Calling some normal std functions that return non-template types.
+        self.expect("expr std::abs(-42)", substrs=['(int) $0 = 42'])
+        self.expect("expr std::div(2, 1).quot", substrs=['(int) $1 = 2'])
+        # Using types from std.
+        self.expect("expr (std::size_t)33U", substrs=['(size_t) $2 = 33'])
+        # Calling templated functions that return non-template types.
+        self.expect("expr char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a",
+                    substrs=["(char) $3 = 'a'"])
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test_non_cpp_language(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        # Activate importing of std module.
+        self.runCmd("settings set target.import-std-module true")
+        # These languages don't support C++ modules, so they shouldn't
+        # be able to evaluate the expression.
+        self.expect("expr -l C -- std::abs(-42)", error=True)
+        self.expect("expr -l C99 -- std::abs(-42)", error=True)
+        self.expect("expr -l C11 -- std::abs(-42)", error=True)
+        self.expect("expr -l ObjC -- std::abs(-42)", error=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/basic/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py
new file mode 100644
index 0000000..ad5322b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/TestStdModuleWithConflicts.py
@@ -0,0 +1,32 @@
+"""
+Test importing the 'std' C++ module and check if we can handle
+prioritizing the conflicting functions from debug info and std
+module.
+
+See also import-std-module/basic/TestImportStdModule.py for
+the same test on a 'clean' code base without conflicts.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestImportStdModuleConflicts(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+        self.expect("expr std::abs(-42)", substrs=['(int) $0 = 42'])
+        self.expect("expr std::div(2, 1).quot", substrs=['(int) $1 = 2'])
+        self.expect("expr (std::size_t)33U", substrs=['(size_t) $2 = 33'])
+        self.expect("expr char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a",
+                    substrs=["(char) $3 = 'a'"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/conflicts/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/TestBasicDeque.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/TestBasicDeque.py
new file mode 100644
index 0000000..4615d24
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/TestBasicDeque.py
@@ -0,0 +1,37 @@
+"""
+Test basic std::list functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestBasicDeque(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
+        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
+        self.expect("expr (int)a.back()", substrs=['(int) $2 = 2'])
+
+        self.expect("expr std::sort(a.begin(), a.end())")
+        self.expect("expr (int)a.front()", substrs=['(int) $3 = 1'])
+        self.expect("expr (int)a.back()", substrs=['(int) $4 = 3'])
+
+        self.expect("expr std::reverse(a.begin(), a.end())")
+        self.expect("expr (int)a.front()", substrs=['(int) $5 = 3'])
+        self.expect("expr (int)a.back()", substrs=['(int) $6 = 1'])
+
+        self.expect("expr (int)(*a.begin())", substrs=['(int) $7 = 3'])
+        self.expect("expr (int)(*a.rbegin())", substrs=['(int) $8 = 1'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-basic/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py
new file mode 100644
index 0000000..cde74af
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py
@@ -0,0 +1,33 @@
+"""
+Test std::deque functionality with a decl from dbg info as content.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestDbgInfoContentDeque(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
+        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
+        self.expect("expr (int)a.back().a", substrs=['(int) $2 = 2'])
+
+        self.expect("expr std::reverse(a.begin(), a.end())")
+        self.expect("expr (int)a.front().a", substrs=['(int) $3 = 2'])
+        self.expect("expr (int)a.back().a", substrs=['(int) $4 = 3'])
+
+        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2'])
+        self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/deque-dbg-info-content/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/Makefile
new file mode 100644
index 0000000..533ff70
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/Makefile
@@ -0,0 +1,9 @@
+# We don't have any standard include directories, so we can't
+# parse the test_common.h header we usually inject as it includes
+# system headers.
+NO_TEST_COMMON_H := 1
+
+CXXFLAGS_EXTRAS = -I $(SRCDIR)/root/usr/include/c++/v1/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++ -DENABLE_STD_CONTENT=1
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/TestEmptyStdModule.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/TestEmptyStdModule.py
new file mode 100644
index 0000000..76e79df
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/TestEmptyStdModule.py
@@ -0,0 +1,38 @@
+"""
+Test that LLDB doesn't crash if the std module we load is empty.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+import os
+
+class ImportStdModule(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # We only emulate a fake libc++ in this test and don't use the real libc++,
+    # but we still add the libc++ category so that this test is only run in
+    # test configurations where libc++ is actually supposed to be tested.
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        sysroot = os.path.join(os.getcwd(), "root")
+
+        # Set the sysroot.
+        self.runCmd("platform select --sysroot '" + sysroot + "' host", CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        # Use the typedef that is only defined in our 'empty' module. If this fails, then LLDB
+        # somehow figured out the correct define for the header and compiled the right
+        # standard module that actually contains the std::vector template.
+        self.expect("expr MissingContent var = 3; var", substrs=['$0 = 3'])
+        # Try to access our mock std::vector. This should fail but not crash LLDB as the
+        # std::vector template should be missing from the std module.
+        self.expect("expr (size_t)v.size()", substrs=["Couldn't lookup symbols"], error=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/main.cpp
new file mode 100644
index 0000000..b01fe1a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/main.cpp
@@ -0,0 +1,8 @@
+#include <algorithm>
+
+int main(int argc, char **argv) {
+  // Makes sure we have the mock libc headers in the debug information.
+  libc_struct s;
+  std::vector<int> v;
+  return 0; // Set break point at this line.
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/algorithm b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/algorithm
new file mode 100644
index 0000000..a77c3d8
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/algorithm
@@ -0,0 +1,22 @@
+// This is only defined when building, but LLDB is missing this flag when loading the standard
+// library module so the actual contents of the module are missing.
+#ifdef ENABLE_STD_CONTENT
+
+#include "libc_header.h"
+
+namespace std {
+  inline namespace __1 {
+    // Pretend to be a std::vector template we need to instantiate
+    // in LLDB.
+    template<typename T>
+    struct vector { T i; int size() { return 2; } };
+  }
+}
+#else
+// Unused typedef we can use to check that we actually loaded
+// an empty module. Will be missing if LLDB somehow can get the
+// ENABLE_STD_CONTENT define right and break this test silently
+// (as with the define the module isn't empty anymore and this
+// test always succeeds).
+typedef int MissingContent;
+#endif // ENABLE_STD_CONTENT
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/module.modulemap
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/c++/v1/module.modulemap
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/libc_header.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/libc_header.h
similarity index 100%
copy from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/libc_header.h
copy to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/empty-module/root/usr/include/libc_header.h
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/TestBasicForwardList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/TestBasicForwardList.py
new file mode 100644
index 0000000..9e45bf2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/TestBasicForwardList.py
@@ -0,0 +1,30 @@
+"""
+Test basic std::forward_list functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestBasicForwardList(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)std::distance(a.begin(), a.end())", substrs=['(size_t) $0 = 3'])
+        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
+
+        self.expect("expr a.sort()")
+        self.expect("expr (int)a.front()", substrs=['(int) $2 = 1'])
+
+        self.expect("expr (int)(*a.begin())", substrs=['(int) $3 = 1'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-basic/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py
new file mode 100644
index 0000000..290a045
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py
@@ -0,0 +1,27 @@
+"""
+Test std::forward_list functionality with a decl from debug info as content.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestDbgInfoContentForwardList(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)std::distance(a.begin(), a.end())", substrs=['(size_t) $0 = 3'])
+        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
+
+        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $2 = 3'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/forward_list-dbg-info-content/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/TestBasicList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/TestBasicList.py
new file mode 100644
index 0000000..e8dfc88
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/TestBasicList.py
@@ -0,0 +1,37 @@
+"""
+Test basic std::list functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestBasicList(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
+        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
+        self.expect("expr (int)a.back()", substrs=['(int) $2 = 2'])
+
+        self.expect("expr a.sort()")
+        self.expect("expr (int)a.front()", substrs=['(int) $3 = 1'])
+        self.expect("expr (int)a.back()", substrs=['(int) $4 = 3'])
+
+        self.expect("expr std::reverse(a.begin(), a.end())")
+        self.expect("expr (int)a.front()", substrs=['(int) $5 = 3'])
+        self.expect("expr (int)a.back()", substrs=['(int) $6 = 1'])
+
+        self.expect("expr (int)(*a.begin())", substrs=['(int) $7 = 3'])
+        self.expect("expr (int)(*a.rbegin())", substrs=['(int) $8 = 1'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-basic/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py
new file mode 100644
index 0000000..fa8be7c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py
@@ -0,0 +1,34 @@
+"""
+Test basic std::list functionality but with a declaration from
+the debug info (the Foo struct) as content.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestDbgInfoContentList(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
+        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
+        self.expect("expr (int)a.back().a", substrs=['(int) $2 = 2'])
+
+        self.expect("expr std::reverse(a.begin(), a.end())")
+        self.expect("expr (int)a.front().a", substrs=['(int) $3 = 2'])
+        self.expect("expr (int)a.back().a", substrs=['(int) $4 = 3'])
+
+        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2'])
+        self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/list-dbg-info-content/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/TestMissingStdModule.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/TestMissingStdModule.py
new file mode 100644
index 0000000..83d672f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/TestMissingStdModule.py
@@ -0,0 +1,36 @@
+"""
+Test that importing the std module on a compile unit
+that doesn't use the std module will not break LLDB.
+
+It's not really specified at the moment what kind of
+error we should report back to the user in this
+situation. Currently Clang will just complain that
+the std module doesn't exist or can't be loaded.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class STLTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        # Activate importing of std module.
+        self.runCmd("settings set target.import-std-module true")
+
+        # Run some commands that should all fail without our std module.
+        self.expect("expr std::abs(-42)", error=True)
+        self.expect("expr std::div(2, 1).quot", error=True)
+        self.expect("expr (std::size_t)33U", error=True)
+        self.expect("expr char a = 'b'; char b = 'a'; std::swap(a, b); a",
+                    error=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/no-std-module/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/TestQueue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/TestQueue.py
new file mode 100644
index 0000000..42e5f8d
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/TestQueue.py
@@ -0,0 +1,43 @@
+"""
+Tests std::queue functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestQueue(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        # Test std::queue functionality with a std::deque.
+        self.expect("expr q_deque.pop()")
+        self.expect("expr q_deque.push({4})")
+        self.expect("expr (size_t)q_deque.size()", substrs=['(size_t) $0 = 1'])
+        self.expect("expr (int)q_deque.front().i", substrs=['(int) $1 = 4'])
+        self.expect("expr (int)q_deque.back().i", substrs=['(int) $2 = 4'])
+        self.expect("expr q_deque.empty()", substrs=['(bool) $3 = false'])
+        self.expect("expr q_deque.pop()")
+        self.expect("expr q_deque.emplace(5)")
+        self.expect("expr (int)q_deque.front().i", substrs=['(int) $4 = 5'])
+
+        # Test std::queue functionality with a std::list.
+        self.expect("expr q_list.pop()")
+        self.expect("expr q_list.push({4})")
+        self.expect("expr (size_t)q_list.size()", substrs=['(size_t) $5 = 1'])
+        self.expect("expr (int)q_list.front().i", substrs=['(int) $6 = 4'])
+        self.expect("expr (int)q_list.back().i", substrs=['(int) $7 = 4'])
+        self.expect("expr q_list.empty()", substrs=['(bool) $8 = false'])
+        self.expect("expr q_list.pop()")
+        self.expect("expr q_list.emplace(5)")
+        self.expect("expr (int)q_list.front().i", substrs=['(int) $9 = 5'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/queue/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py
new file mode 100644
index 0000000..ec39651
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py
@@ -0,0 +1,29 @@
+"""
+Test std::shared_ptr functionality with a class from debug info as content.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestSharedPtrDbgInfoContent(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (int)s->a", substrs=['(int) $0 = 3'])
+        self.expect("expr (int)(s->a = 5)", substrs=['(int) $1 = 5'])
+        self.expect("expr (int)s->a", substrs=['(int) $2 = 5'])
+        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
+        self.expect("expr s.reset()")
+        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr-dbg-info-content/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/TestSharedPtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/TestSharedPtr.py
new file mode 100644
index 0000000..7e05bcca
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/TestSharedPtr.py
@@ -0,0 +1,29 @@
+"""
+Test basic std::shared_ptr functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestSharedPtr(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (int)*s", substrs=['(int) $0 = 3'])
+        self.expect("expr (int)(*s = 5)", substrs=['(int) $1 = 5'])
+        self.expect("expr (int)*s", substrs=['(int) $2 = 5'])
+        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
+        self.expect("expr s.reset()")
+        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/shared_ptr/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/TestStack.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/TestStack.py
new file mode 100644
index 0000000..fe19a4e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/TestStack.py
@@ -0,0 +1,45 @@
+"""
+Tests std::stack functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestStack(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        # Test std::stack functionality with a std::deque.
+        self.expect("expr s_deque.pop()")
+        self.expect("expr s_deque.push({4})")
+        self.expect("expr (size_t)s_deque.size()", substrs=['(size_t) $0 = 3'])
+        self.expect("expr (int)s_deque.top().i", substrs=['(int) $1 = 4'])
+        self.expect("expr s_deque.emplace(5)")
+        self.expect("expr (int)s_deque.top().i", substrs=['(int) $2 = 5'])
+
+        # Test std::stack functionality with a std::vector.
+        self.expect("expr s_vector.pop()")
+        self.expect("expr s_vector.push({4})")
+        self.expect("expr (size_t)s_vector.size()", substrs=['(size_t) $3 = 3'])
+        self.expect("expr (int)s_vector.top().i", substrs=['(int) $4 = 4'])
+        self.expect("expr s_vector.emplace(5)")
+        self.expect("expr (int)s_vector.top().i", substrs=['(int) $5 = 5'])
+
+        # Test std::stack functionality with a std::list.
+        self.expect("expr s_list.pop()")
+        self.expect("expr s_list.push({4})")
+        self.expect("expr (size_t)s_list.size()", substrs=['(size_t) $6 = 3'])
+        self.expect("expr (int)s_list.top().i", substrs=['(int) $7 = 4'])
+        self.expect("expr s_list.emplace(5)")
+        self.expect("expr (int)s_list.top().i", substrs=['(int) $8 = 5'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/stack/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
new file mode 100644
index 0000000..4915cda
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/Makefile
@@ -0,0 +1,9 @@
+# We don't have any standard include directories, so we can't
+# parse the test_common.h header we usually inject as it includes
+# system headers.
+NO_TEST_COMMON_H := 1
+
+CXXFLAGS_EXTRAS = -I $(SRCDIR)/root/usr/include/c++/v1/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
new file mode 100644
index 0000000..684e287
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/TestStdModuleSysroot.py
@@ -0,0 +1,36 @@
+"""
+Test that we respect the sysroot when building the std module.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+import os
+
+class ImportStdModule(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # We only emulate a fake libc++ in this test and don't use the real libc++,
+    # but we still add the libc++ category so that this test is only run in
+    # test configurations where libc++ is actually supposed to be tested.
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        sysroot = os.path.join(os.getcwd(), "root")
+
+        # Set the sysroot.
+        self.runCmd("platform select --sysroot '" + sysroot + "' host", CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        # Call our custom function in our sysroot std module.
+        # If this gives us the correct result, then we used the sysroot.
+        # We rely on the default argument of -123 to make sure we actually have the C++ module.
+        # (We don't have default arguments in the debug information).
+        self.expect("expr std::myabs()", substrs=['(int) $0 = 123'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp
new file mode 100644
index 0000000..c01fadc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/main.cpp
@@ -0,0 +1,7 @@
+#include <algorithm>
+
+int main(int argc, char **argv) {
+  libc_struct s;
+  std::vector v;
+  return 0; // Set break point at this line.
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
new file mode 100644
index 0000000..a0cb2f1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/algorithm
@@ -0,0 +1,12 @@
+#include "libc_header.h"
+
+namespace std {
+  // Makes sure we get a support file for this header.
+  struct vector { int i; };
+
+  __attribute__((__nodebug__))
+  inline int myabs(int i = -123) {
+    double nil;
+    return i < 0 ? -i : i;
+  }
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/module.modulemap
similarity index 100%
copy from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/module.modulemap
copy to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/c++/v1/module.modulemap
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/libc_header.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/libc_header.h
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/libc_header.h
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/sysroot/root/usr/include/libc_header.h
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
new file mode 100644
index 0000000..9389de9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
@@ -0,0 +1,29 @@
+"""
+Test std::unique_ptr functionality with a decl from debug info as content.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestUniquePtrDbgInfoContent(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (int)s->a", substrs=['(int) $0 = 3'])
+        self.expect("expr (int)(s->a = 5)", substrs=['(int) $1 = 5'])
+        self.expect("expr (int)s->a", substrs=['(int) $2 = 5'])
+        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
+        self.expect("expr s.reset()")
+        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr-dbg-info-content/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/TestUniquePtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/TestUniquePtr.py
new file mode 100644
index 0000000..a0e05b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/TestUniquePtr.py
@@ -0,0 +1,29 @@
+"""
+Test basic std::unique_ptr functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestUniquePtr(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (int)*s", substrs=['(int) $0 = 3'])
+        self.expect("expr (int)(*s = 5)", substrs=['(int) $1 = 5'])
+        self.expect("expr (int)*s", substrs=['(int) $2 = 5'])
+        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
+        self.expect("expr s.reset()")
+        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/unique_ptr/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/TestBasicVector.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/TestBasicVector.py
new file mode 100644
index 0000000..840bacb
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/TestBasicVector.py
@@ -0,0 +1,53 @@
+"""
+Test basic std::vector functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestBasicVector(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
+        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
+        self.expect("expr (int)a[1]", substrs=['(int) $2 = 1'])
+        self.expect("expr (int)a.back()", substrs=['(int) $3 = 2'])
+
+        self.expect("expr std::sort(a.begin(), a.end())")
+        self.expect("expr (int)a.front()", substrs=['(int) $4 = 1'])
+        self.expect("expr (int)a[1]", substrs=['(int) $5 = 2'])
+        self.expect("expr (int)a.back()", substrs=['(int) $6 = 3'])
+
+        self.expect("expr std::reverse(a.begin(), a.end())")
+        self.expect("expr (int)a.front()", substrs=['(int) $7 = 3'])
+        self.expect("expr (int)a[1]", substrs=['(int) $8 = 2'])
+        self.expect("expr (int)a.back()", substrs=['(int) $9 = 1'])
+
+        self.expect("expr (int)(*a.begin())", substrs=['(int) $10 = 3'])
+        self.expect("expr (int)(*a.rbegin())", substrs=['(int) $11 = 1'])
+
+        self.expect("expr a.pop_back()")
+        self.expect("expr (int)a.back()", substrs=['(int) $12 = 2'])
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $13 = 2'])
+
+        self.expect("expr (int)a.at(0)", substrs=['(int) $14 = 3'])
+
+        self.expect("expr a.push_back(4)")
+        self.expect("expr (int)a.back()", substrs=['(int) $15 = 4'])
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $16 = 3'])
+
+        self.expect("expr a.emplace_back(5)")
+        self.expect("expr (int)a.back()", substrs=['(int) $17 = 5'])
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $18 = 4'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-basic/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/TestBoolVector.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/TestBoolVector.py
new file mode 100644
index 0000000..45a2507
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/TestBoolVector.py
@@ -0,0 +1,30 @@
+"""
+Test basic std::vector<bool> functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestBoolVector(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 4'])
+        self.expect("expr (bool)a.front()", substrs=['(bool) $1 = false'])
+        self.expect("expr (bool)a[1]", substrs=['(bool) $2 = true'])
+        self.expect("expr (bool)a.back()", substrs=['(bool) $3 = true'])
+
+        self.expect("expr (bool)(*a.begin())", substrs=['(bool) $4 = false'])
+        self.expect("expr (bool)(*a.rbegin())", substrs=['(bool) $5 = true'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-bool/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py
new file mode 100644
index 0000000..4d51f1b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py
@@ -0,0 +1,43 @@
+"""
+Test basic std::vector functionality but with a declaration from
+the debug info (the Foo struct) as content.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestDbgInfoContentVector(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
+        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
+        self.expect("expr (int)a[1].a", substrs=['(int) $2 = 1'])
+        self.expect("expr (int)a.back().a", substrs=['(int) $3 = 2'])
+
+        self.expect("expr std::reverse(a.begin(), a.end())")
+        self.expect("expr (int)a.front().a", substrs=['(int) $4 = 2'])
+
+        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2'])
+        self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3'])
+
+        self.expect("expr a.pop_back()")
+        self.expect("expr (int)a.back().a", substrs=['(int) $7 = 1'])
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $8 = 2'])
+
+        self.expect("expr (int)a.at(0).a", substrs=['(int) $9 = 2'])
+
+        self.expect("expr a.push_back({4})")
+        self.expect("expr (int)a.back().a", substrs=['(int) $10 = 4'])
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $11 = 3'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-dbg-info-content/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectors.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectors.py
new file mode 100644
index 0000000..feaeac9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/TestVectorOfVectors.py
@@ -0,0 +1,26 @@
+"""
+Test std::vector functionality when it's contents are vectors.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestVectorOfVectors(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 2'])
+        self.expect("expr (int)a.front().front()", substrs=['(int) $1 = 1'])
+        self.expect("expr (int)a[1][1]", substrs=['(int) $2 = 2'])
+        self.expect("expr (int)a.back().at(0)", substrs=['(int) $3 = 3'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/vector-of-vectors/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py
new file mode 100644
index 0000000..5ed3031
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py
@@ -0,0 +1,29 @@
+"""
+Test std::weak_ptr functionality with a decl from debug info as content.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestDbgInfoContentWeakPtr(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (int)w.lock()->a", substrs=['(int) $0 = 3'])
+        self.expect("expr (int)(w.lock()->a = 5)", substrs=['(int) $1 = 5'])
+        self.expect("expr (int)w.lock()->a", substrs=['(int) $2 = 5'])
+        self.expect("expr w.use_count()", substrs=['(long) $3 = 1'])
+        self.expect("expr w.reset()")
+        self.expect("expr w.use_count()", substrs=['(long) $4 = 0'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr-dbg-info-content/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/Makefile
new file mode 100644
index 0000000..f938f74
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/Makefile
@@ -0,0 +1,3 @@
+USE_LIBCPP := 1
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/TestWeakPtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/TestWeakPtr.py
new file mode 100644
index 0000000..7624174
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/TestWeakPtr.py
@@ -0,0 +1,29 @@
+"""
+Test basic std::weak_ptr functionality.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestSharedPtr(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["libc++"])
+    @skipIf(compiler=no_match("clang"))
+    def test(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.runCmd("settings set target.import-std-module true")
+
+        self.expect("expr (int)*w.lock()", substrs=['(int) $0 = 3'])
+        self.expect("expr (int)(*w.lock() = 5)", substrs=['(int) $1 = 5'])
+        self.expect("expr (int)*w.lock()", substrs=['(int) $2 = 5'])
+        self.expect("expr w.use_count()", substrs=['(long) $3 = 1'])
+        self.expect("expr w.reset()")
+        self.expect("expr w.use_count()", substrs=['(long) $4 = 0'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import-std-module/weak_ptr/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile
new file mode 100644
index 0000000..b46bd7f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/Makefile
@@ -0,0 +1,3 @@
+OBJC_SOURCES := main.m
+LD_EXTRAS := -framework Cocoa
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import_builtin_fileid/TestImportBuiltinFileID.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/TestImportBuiltinFileID.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import_builtin_fileid/TestImportBuiltinFileID.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/TestImportBuiltinFileID.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import_builtin_fileid/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/main.m
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import_builtin_fileid/main.m
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/import_builtin_fileid/main.m
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/inline-namespace/TestInlineNamespace.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/TestInlineNamespace.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/inline-namespace/TestInlineNamespace.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/TestInlineNamespace.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/inline-namespace/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/inline-namespace/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/inline-namespace/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/invalid-args/TestInvalidArgsExpression.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/invalid-args/TestInvalidArgsExpression.py
new file mode 100644
index 0000000..e0ede0a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/invalid-args/TestInvalidArgsExpression.py
@@ -0,0 +1,45 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+class InvalidArgsExpressionTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_invalid_lang(self):
+        self.expect("expression -l foo --", error=True,
+                    substrs=["error: unknown language type: 'foo' for expression"])
+
+    @no_debug_info_test
+    def test_invalid_all_thread(self):
+        self.expect("expression -a foo --", error=True,
+                    substrs=['error: invalid all-threads value setting: "foo"'])
+
+    @no_debug_info_test
+    def test_invalid_ignore_br(self):
+        self.expect("expression -i foo --", error=True,
+                    substrs=['error: could not convert "foo" to a boolean value.'])
+
+    @no_debug_info_test
+    def test_invalid_allow_jit(self):
+        self.expect("expression -j foo --", error=True,
+                    substrs=['error: could not convert "foo" to a boolean value.'])
+
+    @no_debug_info_test
+    def test_invalid_timeout(self):
+        self.expect("expression -t foo --", error=True,
+                    substrs=['error: invalid timeout setting "foo"'])
+
+        self.expect("expression -t \"\" --", error=True,
+                    substrs=['error: invalid timeout setting ""'])
+
+    @no_debug_info_test
+    def test_invalid_unwind(self):
+        self.expect("expression -u foo --", error=True,
+                    substrs=['error: could not convert "foo" to a boolean value.'])
+
+    @no_debug_info_test
+    def test_invalid_fixits(self):
+        self.expect("expression -X foo --", error=True,
+                    substrs=['error: could not convert "foo" to a boolean value.'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/Makefile
new file mode 100644
index 0000000..a1f689e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/Makefile
@@ -0,0 +1,4 @@
+

+CXX_SOURCES := main.cpp

+

+include Makefile.rules

diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py
new file mode 100644
index 0000000..20a9477
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py
@@ -0,0 +1,41 @@
+"""
+Test PHI nodes work in the IR interpreter.
+"""
+
+
+import lldb
+from lldbsuite.test.lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+
+
+class IRInterpreterPHINodesTestCase(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    def test_phi_node_support(self):
+        """Test support for PHI nodes in the IR interpreter."""
+
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
+
+        # Break on the first assignment to i
+        line = line_number('main.cpp', 'i = 5')
+        lldbutil.run_break_set_by_file_and_line(
+            self, 'main.cpp', line, num_expected_locations=1, loc_exact=True)
+
+        self.runCmd('run', RUN_SUCCEEDED)
+
+        # The stop reason of the thread should be breakpoint
+        self.expect('thread list', STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped', 'stop reason = breakpoint'])
+
+        self.runCmd('s')
+
+        # The logical 'or' causes a PHI node to be generated. Execute without JIT
+        # to test that the interpreter can handle this
+        self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['true'])
+
+        self.runCmd('s')
+        self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['false'])
+        self.runCmd('s')
+        self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['true'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter-phi-nodes/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/Makefile
new file mode 100644
index 0000000..00a9da0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/Makefile
@@ -0,0 +1,5 @@
+default: a.out
+
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/TestIRInterpreter.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/TestIRInterpreter.py
new file mode 100644
index 0000000..dd1308b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/TestIRInterpreter.py
@@ -0,0 +1,93 @@
+"""
+Test the IR interpreter
+"""
+
+
+import unittest2
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class IRInterpreterTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.c.
+        self.line = line_number('main.c',
+                                '// Set breakpoint here')
+
+        # Disable confirmation prompt to avoid infinite wait
+        self.runCmd("settings set auto-confirm true")
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear auto-confirm"))
+
+    def build_and_run(self):
+        """Test the IR interpreter"""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", self.line, num_expected_locations=1, loc_exact=False)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+    @add_test_categories(['pyapi'])
+    # getpid() is POSIX, among other problems, see bug
+    @expectedFailureAll(
+        oslist=['windows'],
+        bugnumber="http://llvm.org/pr21765")
+    @expectedFailureNetBSD
+    @expectedFailureAll(
+        oslist=['linux'],
+        archs=['arm'],
+        bugnumber="llvm.org/pr27868")
+    def test_ir_interpreter(self):
+        self.build_and_run()
+
+        options = lldb.SBExpressionOptions()
+        options.SetLanguage(lldb.eLanguageTypeC_plus_plus)
+
+        set_up_expressions = ["int $i = 9", "int $j = 3", "int $k = 5"]
+
+        expressions = ["$i + $j",
+                       "$i - $j",
+                       "$i * $j",
+                       "$i / $j",
+                       "$i % $k",
+                       "$i << $j",
+                       "$i & $j",
+                       "$i | $j",
+                       "$i ^ $j"]
+
+        for expression in set_up_expressions:
+            self.frame().EvaluateExpression(expression, options)
+
+        for expression in expressions:
+            interp_expression = expression
+            jit_expression = "(int)getpid(); " + expression
+
+            interp_result = self.frame().EvaluateExpression(
+                interp_expression, options).GetValueAsSigned()
+            jit_result = self.frame().EvaluateExpression(
+                jit_expression, options).GetValueAsSigned()
+
+            self.assertEqual(
+                interp_result,
+                jit_result,
+                "While evaluating " +
+                expression)
+
+    def test_type_conversions(self):
+        target = self.dbg.GetDummyTarget()
+        short_val = target.EvaluateExpression("(short)-1")
+        self.assertEqual(short_val.GetValueAsSigned(), -1)
+        long_val = target.EvaluateExpression("(long) "+ short_val.GetName())
+        self.assertEqual(long_val.GetValueAsSigned(), -1)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Test11588.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Test11588.py
new file mode 100644
index 0000000..abff18f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Test11588.py
@@ -0,0 +1,66 @@
+"""
+Test the solution to issue 11581.
+valobj.AddressOf() returns None when an address is
+expected in a SyntheticChildrenProvider
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class Issue11581TestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+    def test_11581_commands(self):
+        # This is the function to remove the custom commands in order to have a
+        # clean slate for the next test case.
+        def cleanup():
+            self.runCmd('type synthetic clear', check=False)
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        """valobj.AddressOf() should return correct values."""
+        self.build()
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                              'Set breakpoint here.',
+                                              lldb.SBFileSpec("main.cpp", False))
+        self.runCmd("command script import --allow-reload s11588.py")
+        self.runCmd(
+            "type synthetic add --python-class s11588.Issue11581SyntheticProvider StgClosure")
+
+        self.expect("expr --show-types -- *((StgClosure*)(r14-1))",
+                    substrs=["(StgClosure) $",
+                             "(StgClosure *) &$", "0x",
+                             "addr = ",
+                             "load_address = "])
+
+        # register r14 is an x86_64 extension let's skip this part of the test
+        # if we are on a different architecture
+        if self.getArchitecture() == 'x86_64':
+            target = self.dbg.GetSelectedTarget()
+            process = target.GetProcess()
+            frame = process.GetSelectedThread().GetSelectedFrame()
+            pointer = frame.FindVariable("r14")
+            addr = pointer.GetValueAsUnsigned(0)
+            self.assertTrue(addr != 0, "could not read pointer to StgClosure")
+            addr = addr - 1
+            self.runCmd("register write r14 %d" % addr)
+            self.expect(
+                "register read r14", substrs=[
+                    "0x", hex(addr)[
+                        2:].rstrip("L")])  # Remove trailing 'L' if it exists
+            self.expect("expr --show-types -- *(StgClosure*)$r14",
+                        substrs=["(StgClosure) $",
+                                 "(StgClosure *) &$", "0x",
+                                 "addr = ",
+                                 "load_address = ",
+                                 hex(addr)[2:].rstrip("L"),
+                                 str(addr)])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/s11588.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/s11588.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/s11588.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/s11588.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/Makefile
new file mode 100644
index 0000000..a2af5c4
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/Makefile
@@ -0,0 +1,9 @@
+CXX_SOURCES := main.cpp
+
+DEBUG_INFO_FLAG = -g3 -gdwarf-5
+
+# GCC produces incorrect .debug_macro section when "-include" option is used:
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93075.
+NO_TEST_COMMON_H := 1
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/TestMacros.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/TestMacros.py
new file mode 100644
index 0000000..aed83e2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/TestMacros.py
@@ -0,0 +1,133 @@
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestMacros(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @expectedFailureAll(
+        compiler="clang",
+        bugnumber="clang does not emit .debug_macro[.dwo] sections.")
+    @expectedFailureAll(
+        debug_info="dwo",
+        bugnumber="GCC produces multiple .debug_macro.dwo sections and the spec is unclear as to what it means")
+    @expectedFailureAll(
+        hostoslist=["windows"],
+        compiler="gcc",
+        triple='.*-android')
+    @expectedFailureAll(
+        compiler="gcc", compiler_version=['<', '5.1'],
+        bugnumber=".debug_macro was introduced in DWARF 5, GCC supports it since version 5.1")
+    def test_expr_with_macros(self):
+        self.build()
+
+        # Get main source file
+        src_file = "main.cpp"
+        hdr_file = "macro1.h"
+        src_file_spec = lldb.SBFileSpec(src_file)
+        self.assertTrue(src_file_spec.IsValid(), "Main source file")
+
+        (target, process, thread, bp1) = lldbutil.run_to_source_breakpoint(
+            self, "Break here", src_file_spec)
+
+        # Get frame for current thread
+        frame = thread.GetSelectedFrame()
+
+        result = frame.EvaluateExpression("MACRO_1")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "100",
+            "MACRO_1 = 100")
+
+        result = frame.EvaluateExpression("MACRO_2")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "200",
+            "MACRO_2 = 200")
+
+        result = frame.EvaluateExpression("ONE")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "1",
+            "ONE = 1")
+
+        result = frame.EvaluateExpression("TWO")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "2",
+            "TWO = 2")
+
+        result = frame.EvaluateExpression("THREE")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "3",
+            "THREE = 3")
+
+        result = frame.EvaluateExpression("FOUR")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "4",
+            "FOUR = 4")
+
+        result = frame.EvaluateExpression("HUNDRED")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "100",
+            "HUNDRED = 100")
+
+        result = frame.EvaluateExpression("THOUSAND")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "1000",
+            "THOUSAND = 1000")
+
+        result = frame.EvaluateExpression("MILLION")
+        self.assertTrue(result.IsValid() and result.GetValue()
+                        == "1000000", "MILLION = 1000000")
+
+        result = frame.EvaluateExpression("MAX(ONE, TWO)")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "2",
+            "MAX(ONE, TWO) = 2")
+
+        result = frame.EvaluateExpression("MAX(THREE, TWO)")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "3",
+            "MAX(THREE, TWO) = 3")
+
+        # Get the thread of the process
+        thread.StepOver()
+
+        # Get frame for current thread
+        frame = thread.GetSelectedFrame()
+
+        result = frame.EvaluateExpression("MACRO_2")
+        self.assertTrue(
+            result.GetError().Fail(),
+            "Printing MACRO_2 fails in the mail file")
+
+        result = frame.EvaluateExpression("FOUR")
+        self.assertTrue(
+            result.GetError().Fail(),
+            "Printing FOUR fails in the main file")
+
+        thread.StepInto()
+
+        # Get frame for current thread
+        frame = thread.GetSelectedFrame()
+
+        result = frame.EvaluateExpression("ONE")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "1",
+            "ONE = 1")
+
+        result = frame.EvaluateExpression("MAX(ONE, TWO)")
+        self.assertTrue(
+            result.IsValid() and result.GetValue() == "2",
+            "MAX(ONE, TWO) = 2")
+
+        # This time, MACRO_1 and MACRO_2 are not visible.
+        result = frame.EvaluateExpression("MACRO_1")
+        self.assertTrue(result.GetError().Fail(),
+                        "Printing MACRO_1 fails in the header file")
+
+        result = frame.EvaluateExpression("MACRO_2")
+        self.assertTrue(result.GetError().Fail(),
+                        "Printing MACRO_2 fails in the header file")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/macro1.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro1.h
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/macro1.h
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro1.h
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/macro2.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro2.h
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/macro2.h
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/macro2.h
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/macros/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/Makefile
new file mode 100644
index 0000000..c9319d6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/Makefile
@@ -0,0 +1,2 @@
+C_SOURCES := main.c
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
new file mode 100644
index 0000000..9b2b712
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/TestMultilineCompletion.py
@@ -0,0 +1,35 @@
+"""
+Test completion for multiline expressions.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.lldbpexpect import PExpectTest
+
+class MultilineCompletionTest(PExpectTest):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # PExpect uses many timeouts internally and doesn't play well
+    # under ASAN on a loaded machine..
+    @skipIfAsan
+    @skipIfRemote  # test is written to explicitly "run" the binary
+    @skipIfEditlineSupportMissing
+    def test_basic_completion(self):
+        """Test that we can complete a simple multiline expression"""
+        self.build()
+
+        self.launch(executable=self.getBuildArtifact("a.out"), dimensions=(100,500))
+        self.expect("b main", substrs=["Breakpoint 1", "address ="])
+        self.expect("run", substrs=["stop reason ="])
+
+        self.child.sendline("expr")
+        self.child.expect_exact("terminate with an empty line to evaluate")
+        self.child.send("to_\t")
+        self.child.expect_exact("to_complete")
+
+        self.child.send("\n\n")
+        self.expect_prompt()
+
+        self.quit()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c
new file mode 100644
index 0000000..6dd3616
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-completion/main.c
@@ -0,0 +1,4 @@
+int main(int argc, char **argv) {
+  int to_complete = 0;
+  return to_complete;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py
new file mode 100644
index 0000000..743e799
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/multiline-navigation/TestMultilineNavigation.py
@@ -0,0 +1,69 @@
+"""
+Tests navigating in the multiline expression editor.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.lldbpexpect import PExpectTest
+
+class TestCase(PExpectTest):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    arrow_up = "\033[A"
+    arrow_down = "\033[B"
+
+    # PExpect uses many timeouts internally and doesn't play well
+    # under ASAN on a loaded machine..
+    @skipIfAsan
+    @skipIfEditlineSupportMissing
+    def test_nav_arrow_up(self):
+        """Tests that we can navigate back to the previous line with the up arrow"""
+        self.launch()
+
+        # Start multiline expression mode by just running 'expr'
+        self.child.sendline("expr")
+        self.child.expect_exact("terminate with an empty line to evaluate")
+        # Create a simple integer expression '123' and press enter.
+        self.child.send("123\n")
+        # We should see the prompt for the second line of our expression.
+        self.child.expect_exact("2: ")
+        # Go back to the first line and change 123 to 124.
+        # Then press enter twice to evaluate our expression.
+        self.child.send(self.arrow_up + "\b4\n\n")
+        # The result of our expression should be 124 (our edited expression)
+        # and not 123 (the one we initially typed).
+        self.child.expect_exact("(int) $0 = 124")
+
+        self.quit()
+
+    @skipIfAsan
+    @skipIfEditlineSupportMissing
+    def test_nav_arrow_down(self):
+        """Tests that we can navigate to the next line with the down arrow"""
+        self.launch()
+
+        # Start multiline expression mode by just running 'expr'
+        self.child.sendline("expr")
+        self.child.expect_exact("terminate with an empty line to evaluate")
+        # Create a simple integer expression '111' and press enter.
+        self.child.send("111\n")
+        # We should see the prompt for the second line of our expression.
+        self.child.expect_exact("2: ")
+        # Create another simple integer expression '222'.
+        self.child.send("222")
+        # Go back to the first line and change '111' to '111+' to make
+        # an addition operation that spans two lines. We need to go up to
+        # test that we can go back down again.
+        self.child.send(self.arrow_up + "+")
+        # Go back down to our second line and change '222' to '223'
+        # so that the full expression is now '111+\n223'.
+        # Then press enter twice to evaluate the expression.
+        self.child.send(self.arrow_down + "\b3\n\n")
+        # The result of our expression '111 + 223' should be '334'.
+        # If the expression is '333' then arrow down failed to get
+        # us back to the second line.
+        self.child.expect_exact("(int) $0 = 334")
+
+        self.quit()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/TestNamespaceLocalVarSameNameCppAndC.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/TestNamespaceLocalVarSameNameCppAndC.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/TestNamespaceLocalVarSameNameCppAndC.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/TestNamespaceLocalVarSameNameCppAndC.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_cpp_and_c/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile
new file mode 100644
index 0000000..4d12ff1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/Makefile
@@ -0,0 +1,5 @@
+OBJCXX_SOURCES := main.mm util.mm
+
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_obj_c/TestNamespaceLocalVarSameNameObjC.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/TestNamespaceLocalVarSameNameObjC.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_obj_c/TestNamespaceLocalVarSameNameObjC.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/TestNamespaceLocalVarSameNameObjC.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_obj_c/main.mm b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/main.mm
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_obj_c/main.mm
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/main.mm
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_obj_c/util.mm b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/util.mm
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_obj_c/util.mm
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/namespace_local_var_same_name_obj_c/util.mm
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/Makefile
new file mode 100644
index 0000000..4b3467b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/Makefile
@@ -0,0 +1,5 @@
+CXX_SOURCES := locking.cpp
+CXXFLAGS_EXTRAS := -std=c++11
+ENABLE_THREADS := YES
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py
new file mode 100644
index 0000000..d7d9633
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/TestExprDoesntBlock.py
@@ -0,0 +1,57 @@
+"""
+Test that expr will time out and allow other threads to run if it blocks.
+"""
+
+from __future__ import print_function
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprDoesntDeadlockTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr17946')
+    @add_test_categories(["basic_process"])
+    def test_with_run_command(self):
+        """Test that expr will time out and allow other threads to run if it blocks."""
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Now create a breakpoint at source line before call_me_to_get_lock
+        # gets called.
+
+        main_file_spec = lldb.SBFileSpec("locking.cpp")
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            'Break here', main_file_spec)
+        if self.TraceOn():
+            print("breakpoint:", breakpoint)
+        self.assertTrue(breakpoint and
+                        breakpoint.GetNumLocations() == 1,
+                        VALID_BREAKPOINT)
+
+        # Now launch the process, and do not stop at entry point.
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+        # Frame #0 should be on self.line1 and the break condition should hold.
+        from lldbsuite.test.lldbutil import get_stopped_thread
+        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertTrue(
+            thread.IsValid(),
+            "There should be a thread stopped due to breakpoint condition")
+
+        frame0 = thread.GetFrameAtIndex(0)
+
+        var = frame0.EvaluateExpression("call_me_to_get_lock(get_int())")
+        self.assertTrue(var.IsValid())
+        self.assertEqual(var.GetValueAsSigned(0), 567)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/locking.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/locking.cpp
new file mode 100644
index 0000000..8288a66
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/no-deadlock/locking.cpp
@@ -0,0 +1,78 @@
+#include <stdio.h>
+#include <thread>
+#include <mutex>
+#include <condition_variable>
+
+std::mutex contended_mutex;
+
+std::mutex control_mutex;
+std::condition_variable  control_condition;
+
+std::mutex thread_started_mutex;
+std::condition_variable  thread_started_condition;
+
+// This function runs in a thread.  The locking dance is to make sure that 
+// by the time the main thread reaches the pthread_join below, this thread
+// has for sure acquired the contended_mutex.  So then the call_me_to_get_lock
+// function will block trying to get the mutex, and only succeed once it
+// signals this thread, then lets it run to wake up from the cond_wait and
+// release the mutex.
+
+void
+lock_acquirer_1 (void)
+{
+  std::unique_lock<std::mutex> contended_lock(contended_mutex);
+  
+  // Grab this mutex, that will ensure that the main thread
+  // is in its cond_wait for it (since that's when it drops the mutex.
+
+  thread_started_mutex.lock();
+  thread_started_mutex.unlock();
+
+  // Now signal the main thread that it can continue, we have the contended lock
+  // so the call to call_me_to_get_lock won't make any progress till  this
+  // thread gets a chance to run.
+
+  std::unique_lock<std::mutex> control_lock(control_mutex);
+
+  thread_started_condition.notify_all();
+
+  control_condition.wait(control_lock);
+
+}
+
+int
+call_me_to_get_lock (int ret_val)
+{
+  control_condition.notify_all();
+  contended_mutex.lock();
+  return ret_val;
+}
+
+int
+get_int() {
+  return 567;
+}
+
+int main ()
+{
+  std::unique_lock<std::mutex> thread_started_lock(thread_started_mutex);
+
+  std::thread thread_1(lock_acquirer_1);
+
+  thread_started_condition.wait(thread_started_lock);
+
+  control_mutex.lock();
+  control_mutex.unlock();
+
+  // Break here.  At this point the other thread will have the contended_mutex,
+  // and be sitting in its cond_wait for the control condition.  So there is
+  // no way that our by-hand calling of call_me_to_get_lock will proceed
+  // without running the first thread at least somewhat.
+
+  int result = call_me_to_get_lock(get_int());
+  thread_1.join();
+
+  return 0;
+
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/Makefile
new file mode 100644
index 0000000..7df2269
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp foo.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/TestExprOptions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/TestExprOptions.py
new file mode 100644
index 0000000..833833a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/TestExprOptions.py
@@ -0,0 +1,90 @@
+"""
+Test expression command options.
+
+Test cases:
+
+o test_expr_options:
+  Test expression command options.
+"""
+
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class ExprOptionsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        self.main_source = "main.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+        self.line = line_number('main.cpp', '// breakpoint_in_main')
+        self.exe = self.getBuildArtifact("a.out")
+
+    def test_expr_options(self):
+        """These expression command options should work as expected."""
+        self.build()
+
+        # Set debugger into synchronous mode
+        self.dbg.SetAsync(False)
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+            self, '// breakpoint_in_main', self.main_source_spec)
+
+        frame = thread.GetFrameAtIndex(0)
+        options = lldb.SBExpressionOptions()
+
+        # test --language on C++ expression using the SB API's
+
+        # Make sure we can evaluate a C++11 expression.
+        val = frame.EvaluateExpression('foo != nullptr')
+        self.assertTrue(val.IsValid())
+        self.assertTrue(val.GetError().Success())
+        self.DebugSBValue(val)
+
+        # Make sure it still works if language is set to C++11:
+        options.SetLanguage(lldb.eLanguageTypeC_plus_plus_11)
+        val = frame.EvaluateExpression('foo != nullptr', options)
+        self.assertTrue(val.IsValid())
+        self.assertTrue(val.GetError().Success())
+        self.DebugSBValue(val)
+
+        # Make sure it fails if language is set to C:
+        options.SetLanguage(lldb.eLanguageTypeC)
+        val = frame.EvaluateExpression('foo != nullptr', options)
+        self.assertTrue(val.IsValid())
+        self.assertFalse(val.GetError().Success())
+
+    @skipIfDarwin
+    def test_expr_options_lang(self):
+        """These expression language options should work as expected."""
+        self.build()
+
+        # Set debugger into synchronous mode
+        self.dbg.SetAsync(False)
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+            self, '// breakpoint_in_main', self.main_source_spec)
+
+        frame = thread.GetFrameAtIndex(0)
+        options = lldb.SBExpressionOptions()
+
+        # Make sure we can retrieve `id` variable if language is set to C++11:
+        options.SetLanguage(lldb.eLanguageTypeC_plus_plus_11)
+        val = frame.EvaluateExpression('id == 0', options)
+        self.assertTrue(val.IsValid())
+        self.assertTrue(val.GetError().Success())
+        self.DebugSBValue(val)
+
+        # Make sure we can't retrieve `id` variable if language is set to ObjC:
+        options.SetLanguage(lldb.eLanguageTypeObjC)
+        val = frame.EvaluateExpression('id == 0', options)
+        self.assertTrue(val.IsValid())
+        self.assertFalse(val.GetError().Success())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/foo.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/foo.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/foo.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/foo.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/options/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile
new file mode 100644
index 0000000..69a2ad6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/Makefile
@@ -0,0 +1,6 @@
+OBJC_SOURCES := main.m
+
+
+LD_EXTRAS := -framework Foundation -framework CloudKit
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py
new file mode 100644
index 0000000..577753c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py
@@ -0,0 +1,50 @@
+"""
+Test that we can p *objcObject
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class PersistObjCPointeeType(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.cpp.
+        self.line = line_number('main.m', '// break here')
+
+    @skipUnlessDarwin
+    @skipIf(archs=["i386", "i686"])
+    @skipIf(debug_info="gmodules", archs=['arm64', 'armv7', 'armv7k', 'arm64e', 'arm64_32'])  # compile error with gmodules for iOS
+    def test_with(self):
+        """Test that we can p *objcObject"""
+        self.build()
+
+        def cleanup():
+            pass
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.expect("p *self", substrs=['_sc_name = nil',
+                                        '_sc_name2 = nil',
+                                        '_sc_name3 = nil',
+                                        '_sc_name4 = nil',
+                                        '_sc_name5 = nil',
+                                        '_sc_name6 = nil',
+                                        '_sc_name7 = nil',
+                                        '_sc_name8 = nil'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/main.m
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/main.m
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/main.m
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/Makefile
new file mode 100644
index 0000000..549336d
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/Makefile
@@ -0,0 +1,5 @@
+C_SOURCES := main.c
+
+include Makefile.rules
+
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/TestPersistentPtrUpdate.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/TestPersistentPtrUpdate.py
new file mode 100644
index 0000000..5660113
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/TestPersistentPtrUpdate.py
@@ -0,0 +1,36 @@
+"""
+Test that we can have persistent pointer variables
+"""
+
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+
+class PersistentPtrUpdateTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def test(self):
+        """Test that we can have persistent pointer variables"""
+        self.build()
+
+        def cleanup():
+            pass
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        self.runCmd('break set -p here')
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.runCmd("expr void* $foo = 0")
+
+        self.runCmd("continue")
+
+        self.expect("expr $foo", substrs=['$foo', '0x0'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestNestedPersistentTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestNestedPersistentTypes.py
new file mode 100644
index 0000000..973eade
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestNestedPersistentTypes.py
@@ -0,0 +1,41 @@
+"""
+Test that nested persistent types work.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class NestedPersistentTypesTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def test_persistent_types(self):
+        """Test that nested persistent types work."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("breakpoint set --name main")
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.runCmd("expression struct $foo { int a; int b; };")
+
+        self.runCmd(
+            "expression struct $bar { struct $foo start; struct $foo end; };")
+
+        self.runCmd("expression struct $bar $my_bar = {{ 2, 3 }, { 4, 5 }};")
+
+        self.expect("expression $my_bar",
+                    substrs=['a = 2', 'b = 3', 'a = 4', 'b = 5'])
+
+        self.expect("expression $my_bar.start.b",
+                    substrs=['(int)', '3'])
+
+        self.expect("expression $my_bar.end.b",
+                    substrs=['(int)', '5'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestPersistentTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestPersistentTypes.py
new file mode 100644
index 0000000..e60a768
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestPersistentTypes.py
@@ -0,0 +1,92 @@
+"""
+Test that lldb persistent types works correctly.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class PersistenttypesTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def test_persistent_types(self):
+        """Test that lldb persistent types works correctly."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("breakpoint set --name main")
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.runCmd("expression struct $foo { int a; int b; };")
+
+        self.expect(
+            "expression struct $foo $my_foo; $my_foo.a = 2; $my_foo.b = 3;",
+            startstr="(int) $0 = 3")
+
+        self.expect("expression $my_foo",
+                    substrs=['a = 2', 'b = 3'])
+
+        self.runCmd("expression typedef int $bar")
+
+        self.expect("expression $bar i = 5; i",
+                    startstr="($bar) $1 = 5")
+
+        self.runCmd(
+            "expression struct $foobar { char a; char b; char c; char d; };")
+        self.runCmd("next")
+
+        self.expect(
+            "memory read foo -t $foobar",
+            substrs=[
+                '($foobar) 0x',
+                ' = ',
+                "a = 'H'",
+                "b = 'e'",
+                "c = 'l'",
+                "d = 'l'"])  # persistent types are OK to use for memory read
+
+        self.expect(
+            "memory read foo -t $foobar -x c",
+            substrs=[
+                '($foobar) 0x',
+                ' = ',
+                "a = 'H'",
+                "b = 'e'",
+                "c = 'l'",
+                "d = 'l'"])  # persistent types are OK to use for memory read
+
+        self.expect(
+            "memory read foo -t foobar",
+            substrs=[
+                '($foobar) 0x',
+                ' = ',
+                "a = 'H'",
+                "b = 'e'",
+                "c = 'l'",
+                "d = 'l'"],
+            matching=False,
+            error=True)  # the type name is $foobar, make sure we settle for nothing less
+
+        self.expect("expression struct { int a; int b; } x = { 2, 3 }; x",
+                    substrs=['a = 2', 'b = 3'])
+
+        self.expect(
+            "expression struct { int x; int y; int z; } object; object.y = 1; object.z = 3; object.x = 2; object",
+            substrs=[
+                'x = 2',
+                'y = 1',
+                'z = 3'])
+
+        self.expect(
+            "expression struct A { int x; int y; }; struct { struct A a; int z; } object; object.a.y = 1; object.z = 3; object.a.x = 2; object",
+            substrs=[
+                'x = 2',
+                'y = 1',
+                'z = 3'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/TestPersistentVariables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/TestPersistentVariables.py
new file mode 100644
index 0000000..57c04b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/TestPersistentVariables.py
@@ -0,0 +1,52 @@
+"""
+Test that lldb persistent variables works correctly.
+"""
+
+
+
+import lldb
+from lldbsuite.test.lldbtest import *
+
+
+class PersistentVariablesTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def test_persistent_variables(self):
+        """Test that lldb persistent variables works correctly."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("breakpoint set --source-pattern-regexp break")
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.runCmd("expression int $i = i")
+
+        self.expect("expression $i == i",
+                    startstr="(bool) $0 = true")
+
+        self.expect("expression $i + 1",
+                    startstr="(int) $1 = 6")
+
+        self.expect("expression $i + 3",
+                    startstr="(int) $2 = 8")
+
+        self.expect("expression $2 + $1",
+                    startstr="(int) $3 = 14")
+
+        self.expect("expression $3",
+                    startstr="(int) $3 = 14")
+
+        self.expect("expression $2",
+                    startstr="(int) $2 = 8")
+
+        self.expect("expression (int)-2",
+                    startstr="(int) $4 = -2")
+
+        self.expect("expression $4 > (int)31",
+                    startstr="(bool) $5 = false")
+
+        self.expect("expression (long)$4",
+                    startstr="(long) $6 = -2")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile
new file mode 100644
index 0000000..9e812e1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/Makefile
@@ -0,0 +1,5 @@
+OBJC_SOURCES := main.m
+
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/TestPoVerbosity.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/TestPoVerbosity.py
new file mode 100644
index 0000000..e203b38
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/TestPoVerbosity.py
@@ -0,0 +1,62 @@
+"""
+Test that the po command acts correctly.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class PoVerbosityTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.cpp.
+        self.line = line_number('main.m',
+                                '// Stop here')
+
+    @skipUnlessDarwin
+    def test(self):
+        """Test that the po command acts correctly."""
+        self.build()
+
+        # This is the function to remove the custom formats in order to have a
+        # clean slate for the next test case.
+        def cleanup():
+            self.runCmd('type summary clear', check=False)
+            self.runCmd('type synthetic clear', check=False)
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        """Test expr + formatters for good interoperability."""
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.expect("expr -O -v -- foo",
+                    substrs=['(id) $', ' = 0x', '1 = 2', '2 = 3;'])
+        self.expect("expr -O -vfull -- foo",
+                    substrs=['(id) $', ' = 0x', '1 = 2', '2 = 3;'])
+        self.expect("expr -O -- foo", matching=False,
+                    substrs=['(id) $'])
+
+        self.expect("expr -O -- 22", matching=False,
+                    substrs=['(int) $'])
+        self.expect("expr -O -- 22",
+                    substrs=['22'])
+
+        self.expect("expr -O -vfull -- 22",
+                    substrs=['(int) $', ' = 22'])
+
+        self.expect("expr -O -v -- 22",
+                    substrs=['(int) $', ' = 22'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/main.m
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/main.m
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/main.m
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/TestExprsBug35310.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/TestExprsBug35310.py
new file mode 100644
index 0000000..23dbce9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/TestExprsBug35310.py
@@ -0,0 +1,38 @@
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class ExprBug35310(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        self.main_source = "main.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+
+    def test_issue35310(self):
+        """Test invoking functions with non-standard linkage names.
+
+        The GNU abi_tag extension used by libstdc++ is a common source
+        of these, but they could originate from other reasons as well.
+        """
+        self.build()
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                          '// Break here', self.main_source_spec)
+        frame = thread.GetFrameAtIndex(0)
+
+        value = frame.EvaluateExpression("a.test_abi_tag()")
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertEqual(value.GetValueAsSigned(0), 1)
+
+        value = frame.EvaluateExpression("a.test_asm_name()")
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertEqual(value.GetValueAsSigned(0), 2)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/pr35310/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/pr35310/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Test8638051.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Test8638051.py
new file mode 100644
index 0000000..b0da7e7
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Test8638051.py
@@ -0,0 +1,37 @@
+"""
+Test the robustness of lldb expression parser.
+"""
+
+
+
+import lldb
+from lldbsuite.test.lldbtest import *
+
+
+class Radar8638051TestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def test_expr_commands(self):
+        """The following expression commands should not crash."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("breakpoint set -n c")
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.expect("expression val",
+                    startstr="(int) $0 = 1")
+        # (int) $0 = 1
+
+        self.expect("expression *(&val)",
+                    startstr="(int) $1 = 1")
+        # (int) $1 = 1
+
+        # rdar://problem/8638051
+        # lldb expression command: Could this crash be avoided
+        self.expect("expression &val",
+                    startstr="(int *) $2 = ")
+        # (int *) $2 = 0x....
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/TestPrintfAfterUp.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/TestPrintfAfterUp.py
new file mode 100644
index 0000000..56e7186
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/TestPrintfAfterUp.py
@@ -0,0 +1,42 @@
+"""
+The evaluating printf(...) after break stop and then up a stack frame.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class Radar9531204TestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # rdar://problem/9531204
+    @expectedFailureNetBSD
+    def test_expr_commands(self):
+        """The evaluating printf(...) after break stop and then up a stack frame."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_symbol(
+            self, 'foo', sym_exact=True, num_expected_locations=1)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.runCmd("frame variable")
+
+        # This works fine.
+        self.runCmd('expression (int)printf("value is: %d.\\n", value);')
+
+        # rdar://problem/9531204
+        # "Error dematerializing struct" error when evaluating expressions "up" on the stack
+        self.runCmd('up')  # frame select -r 1
+
+        self.runCmd("frame variable")
+
+        # This does not currently.
+        self.runCmd('expression (int)printf("argc is: %d.\\n", argc)')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/TestExprHelpExamples.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/TestExprHelpExamples.py
new file mode 100644
index 0000000..3eb3a86
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/TestExprHelpExamples.py
@@ -0,0 +1,44 @@
+"""
+Test example snippets from the lldb 'help expression' output.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class Radar9673644TestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break inside main().
+        self.main_source = "main.c"
+        self.line = line_number(self.main_source, '// Set breakpoint here.')
+
+    def test_expr_commands(self):
+        """The following expression commands should just work."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            self.main_source,
+            self.line,
+            num_expected_locations=1,
+            loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # rdar://problem/9673664 lldb expression evaluation problem
+
+        self.expect('expr char str[] = "foo"; str[0]',
+                    substrs=["'f'"])
+        # runCmd: expr char c[] = "foo"; c[0]
+        # output: (char) $0 = 'f'
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar42038760/TestScalarURem.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/TestScalarURem.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar42038760/TestScalarURem.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/TestScalarURem.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar42038760/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar42038760/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/rdar42038760/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/Test128BitsInteger.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Test128BitsInteger.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/Test128BitsInteger.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/rdar44436068/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/TestRegressionAccessFunctionTemplateInRecord.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/TestRegressionAccessFunctionTemplateInRecord.py
new file mode 100644
index 0000000..f08c0dc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/TestRegressionAccessFunctionTemplateInRecord.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/main.cpp
new file mode 100644
index 0000000..02f15c2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/regression-access-function-template-in-record/main.cpp
@@ -0,0 +1,11 @@
+namespace n {
+template <class> class a {};
+template <class b> struct shared_ptr {
+  template <class...>
+  static void make_shared() { //%self.dbg.GetCommandInterpreter().HandleCompletion("e ", len("e "), 0, -1, lldb.SBStringList())
+    typedef a<b> c;
+    c d;
+  }
+};
+} // namespace n
+int main() { n::shared_ptr<int>::make_shared(); }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/TestSaveJITObjects.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/TestSaveJITObjects.py
new file mode 100644
index 0000000..62925c6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/TestSaveJITObjects.py
@@ -0,0 +1,52 @@
+"""
+Test that LLDB can emit JIT objects when the appropriate setting is enabled
+"""
+
+
+import os
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class SaveJITObjectsTestCase(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    def enumerateJITFiles(self):
+        return [f for f in os.listdir(self.getBuildDir()) if f.startswith("jit")]
+
+    def countJITFiles(self):
+        return len(self.enumerateJITFiles())
+
+    def cleanJITFiles(self):
+        for j in self.enumerateJITFiles():
+            os.remove(j)
+        return
+
+    @expectedFailureAll(oslist=["windows"])
+    @expectedFailureNetBSD
+    def test_save_jit_objects(self):
+        self.build()
+        os.chdir(self.getBuildDir())
+        src_file = "main.c"
+        src_file_spec = lldb.SBFileSpec(src_file)
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+            self, "break", src_file_spec)
+
+        frame = thread.frames[0]
+
+        self.cleanJITFiles()
+        frame.EvaluateExpression("(void*)malloc(0x1)")
+        self.assertTrue(self.countJITFiles() == 0,
+                        "No files emitted with save-jit-objects=false")
+
+        self.runCmd("settings set target.save-jit-objects true")
+        frame.EvaluateExpression("(void*)malloc(0x1)")
+        jit_files_count = self.countJITFiles()
+        self.cleanJITFiles()
+        self.assertTrue(jit_files_count != 0,
+                        "At least one file emitted with save-jit-objects=true")
+
+        process.Kill()
+        os.chdir(self.getSourceDir())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/save_jit_objects/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/save_jit_objects/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
new file mode 100644
index 0000000..4eb417e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/Makefile
@@ -0,0 +1,5 @@
+CXX_SOURCES := main.cpp
+CXXFLAGS_EXTRAS := -std=c++11
+
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/TestScopedEnumType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/TestScopedEnumType.py
new file mode 100644
index 0000000..dd40e87
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/TestScopedEnumType.py
@@ -0,0 +1,44 @@
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ScopedEnumType(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipIf(dwarf_version=['<', '4'])
+    def test(self):
+        self.build()
+
+        self.main_source = "main.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                          '// Set break point at this line.', self.main_source_spec)
+        frame = thread.GetFrameAtIndex(0)
+
+        self.expect("expr f == Foo::FooBar",
+                substrs=['(bool) $0 = true'])
+
+        value = frame.EvaluateExpression("f == Foo::FooBar")
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertEqual(value.GetValueAsUnsigned(), 1)
+
+        value = frame.EvaluateExpression("b == BarBar")
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertEqual(value.GetValueAsUnsigned(), 1)
+
+        ## b is not a Foo
+        value = frame.EvaluateExpression("b == Foo::FooBar")
+        self.assertTrue(value.IsValid())
+        self.assertFalse(value.GetError().Success())
+
+        ## integral is not implicitly convertible to a scoped enum
+        value = frame.EvaluateExpression("1 == Foo::FooBar")
+        self.assertTrue(value.IsValid())
+        self.assertFalse(value.GetError().Success())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/scoped_enums/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/scoped_enums/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py
new file mode 100644
index 0000000..6110707
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/TestStaticInitializers.py
@@ -0,0 +1,33 @@
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class StaticInitializers(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @expectedFailureAll(archs="aarch64", oslist="linux",
+                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44053")
+    def test(self):
+        """ Test a static initializer. """
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self, '// break here',
+                lldb.SBFileSpec("main.cpp", False))
+
+        # We use counter to observe if the initializer was called.
+        self.expect("expr counter", substrs=["(int) $", " = 0"])
+        self.expect("expr -p -- struct Foo { Foo() { inc_counter(); } }; Foo f;")
+        self.expect("expr counter", substrs=["(int) $", " = 1"])
+
+    def test_failing_init(self):
+        """ Test a static initializer that fails to execute. """
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self, '// break here',
+                lldb.SBFileSpec("main.cpp", False))
+
+        # FIXME: This error message is not even remotely helpful.
+        self.expect("expr -p -- struct Foo2 { Foo2() { do_abort(); } }; Foo2 f;", error=True,
+                    substrs=["error: couldn't run static initializers: couldn't run static initializer:"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/main.cpp
new file mode 100644
index 0000000..0bcf1eb
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/static-initializers/main.cpp
@@ -0,0 +1,11 @@
+#include <cstdlib>
+
+int counter = 0;
+
+void inc_counter() { ++counter; }
+
+void do_abort() { abort(); }
+
+int main() {
+  return 0; // break here
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs.py
new file mode 100644
index 0000000..8437eac
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs.py
@@ -0,0 +1,252 @@
+"""
+Test many basic expression commands and SBFrame.EvaluateExpression() API.
+
+Test cases:
+
+o test_many_expr_commands:
+  Test many basic expression commands.
+o test_evaluate_expression_python:
+  Use Python APIs (SBFrame.EvaluateExpression()) to evaluate expressions.
+o test_expr_commands_can_handle_quotes:
+  Throw some expression commands with quotes at lldb.
+"""
+
+
+
+import unittest2
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class BasicExprCommandsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.c.
+        self.line = line_number(
+            'main.cpp',
+            '// Please test many expressions while stopped at this line:')
+
+        # Disable confirmation prompt to avoid infinite wait
+        self.runCmd("settings set auto-confirm true")
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear auto-confirm"))
+
+    def build_and_run(self):
+        """These basic expression commands should work as expected."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+    @unittest2.expectedFailure(
+        "llvm.org/pr17135 <rdar://problem/14874559> APFloat::toString does not identify the correct (i.e. least) precision.")
+    def test_floating_point_expr_commands(self):
+        self.build_and_run()
+
+        self.expect("expression 2.234f",
+                    patterns=["\(float\) \$.* = 2\.234"])
+        # (float) $2 = 2.234
+
+    def test_many_expr_commands(self):
+        self.build_and_run()
+
+        self.expect("expression 2",
+                    patterns=["\(int\) \$.* = 2"])
+        # (int) $0 = 1
+
+        self.expect("expression 2ull",
+                    patterns=["\(unsigned long long\) \$.* = 2"])
+        # (unsigned long long) $1 = 2
+
+        self.expect("expression 0.5f",
+                    patterns=["\(float\) \$.* = 0\.5"])
+        # (float) $2 = 0.5
+
+        self.expect("expression 2.234",
+                    patterns=["\(double\) \$.* = 2\.234"])
+        # (double) $3 = 2.234
+
+        self.expect("expression 2+3",
+                    patterns=["\(int\) \$.* = 5"])
+        # (int) $4 = 5
+
+        self.expect("expression argc",
+                    patterns=["\(int\) \$.* = 1"])
+        # (int) $5 = 1
+
+        self.expect("expression argc + 22",
+                    patterns=["\(int\) \$.* = 23"])
+        # (int) $6 = 23
+
+        self.expect("expression argv",
+                    patterns=["\(const char \*\*\) \$.* = 0x"])
+        # (const char *) $7 = ...
+
+        self.expect("expression argv[0]",
+                    substrs=["(const char *)",
+                             "a.out"])
+        # (const char *) $8 = 0x... "/Volumes/data/lldb/svn/trunk/test/expression_command/test/a.out"
+
+    @add_test_categories(['pyapi'])
+    @expectedFlakeyNetBSD
+    def test_evaluate_expression_python(self):
+        """Test SBFrame.EvaluateExpression() API for evaluating an expression."""
+        self.build()
+
+        exe = self.getBuildArtifact("a.out")
+
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Create the breakpoint.
+        filespec = lldb.SBFileSpec("main.cpp", False)
+        breakpoint = target.BreakpointCreateByLocation(filespec, self.line)
+        self.assertTrue(breakpoint, VALID_BREAKPOINT)
+
+        # Verify the breakpoint just created.
+        self.expect(str(breakpoint), BREAKPOINT_CREATED, exe=False,
+                    substrs=['main.cpp',
+                             str(self.line)])
+
+        # Launch the process, and do not stop at the entry point.
+        # Pass 'X Y Z' as the args, which makes argc == 4.
+        process = target.LaunchSimple(
+            ['X', 'Y', 'Z'], None, self.get_process_working_directory())
+
+        if not process:
+            self.fail("SBTarget.LaunchProcess() failed")
+
+        if process.GetState() != lldb.eStateStopped:
+            self.fail("Process should be in the 'stopped' state, "
+                      "instead the actual state is: '%s'" %
+                      lldbutil.state_type_to_str(process.GetState()))
+
+        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
+            process, breakpoint)
+        self.assertIsNotNone(
+            thread, "Expected one thread to be stopped at the breakpoint")
+
+        # The filename of frame #0 should be 'main.cpp' and function is main.
+        self.expect(lldbutil.get_filenames(thread)[0],
+                    "Break correctly at main.cpp", exe=False,
+                    startstr="main.cpp")
+        self.expect(lldbutil.get_function_names(thread)[0],
+                    "Break correctly at main()", exe=False,
+                    startstr="main")
+
+        # We should be stopped on the breakpoint with a hit count of 1.
+        self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)
+
+        #
+        # Use Python API to evaluate expressions while stopped in a stack frame.
+        #
+        frame = thread.GetFrameAtIndex(0)
+
+        val = frame.EvaluateExpression("2.234")
+        self.expect(val.GetValue(), "2.345 evaluated correctly", exe=False,
+                    startstr="2.234")
+        self.expect(val.GetTypeName(), "2.345 evaluated correctly", exe=False,
+                    startstr="double")
+        self.DebugSBValue(val)
+
+        val = frame.EvaluateExpression("argc")
+        self.expect(val.GetValue(), "Argc evaluated correctly", exe=False,
+                    startstr="4")
+        self.DebugSBValue(val)
+
+        val = frame.EvaluateExpression("*argv[1]")
+        self.expect(val.GetValue(), "Argv[1] evaluated correctly", exe=False,
+                    startstr="'X'")
+        self.DebugSBValue(val)
+
+        val = frame.EvaluateExpression("*argv[2]")
+        self.expect(val.GetValue(), "Argv[2] evaluated correctly", exe=False,
+                    startstr="'Y'")
+        self.DebugSBValue(val)
+
+        val = frame.EvaluateExpression("*argv[3]")
+        self.expect(val.GetValue(), "Argv[3] evaluated correctly", exe=False,
+                    startstr="'Z'")
+        self.DebugSBValue(val)
+
+        callee_break = target.BreakpointCreateByName(
+            "a_function_to_call", None)
+        self.assertTrue(callee_break.GetNumLocations() > 0)
+
+        # Make sure ignoring breakpoints works from the command line:
+        self.expect("expression -i true -- a_function_to_call()",
+                    substrs=['(int) $', ' 1'])
+        self.assertTrue(callee_break.GetHitCount() == 1)
+
+        # Now try ignoring breakpoints using the SB API's:
+        options = lldb.SBExpressionOptions()
+        options.SetIgnoreBreakpoints(True)
+        value = frame.EvaluateExpression('a_function_to_call()', options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetValueAsSigned(0) == 2)
+        self.assertTrue(callee_break.GetHitCount() == 2)
+
+    # rdar://problem/8686536
+    # CommandInterpreter::HandleCommand is stripping \'s from input for
+    # WantsRawCommand commands
+    @expectedFailureNetBSD
+    def test_expr_commands_can_handle_quotes(self):
+        """Throw some expression commands with quotes at lldb."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # runCmd: expression 'a'
+        # output: (char) $0 = 'a'
+        self.expect("expression 'a'",
+                    substrs=['(char) $',
+                             "'a'"])
+
+        # runCmd: expression (int) printf ("\n\n\tHello there!\n")
+        # output: (int) $1 = 16
+        self.expect(r'''expression (int) printf ("\n\n\tHello there!\n")''',
+                    substrs=['(int) $',
+                             '16'])
+
+        # runCmd: expression (int) printf("\t\x68\n")
+        # output: (int) $2 = 3
+        self.expect(r'''expression (int) printf("\t\x68\n")''',
+                    substrs=['(int) $',
+                             '3'])
+
+        # runCmd: expression (int) printf("\"\n")
+        # output: (int) $3 = 2
+        self.expect(r'''expression (int) printf("\"\n")''',
+                    substrs=['(int) $',
+                             '2'])
+
+        # runCmd: expression (int) printf("'\n")
+        # output: (int) $4 = 2
+        self.expect(r'''expression (int) printf("'\n")''',
+                    substrs=['(int) $',
+                             '2'])
+
+        # runCmd: command alias print_hi expression (int) printf ("\n\tHi!\n")
+        # output:
+        self.runCmd(
+            r'''command alias print_hi expression (int) printf ("\n\tHi!\n")''')
+        # This fails currently.
+        self.expect('print_hi',
+                    substrs=['(int) $',
+                             '6'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs2.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs2.py
new file mode 100644
index 0000000..cd02f89
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs2.py
@@ -0,0 +1,73 @@
+"""
+Test some more expression commands.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCommands2TestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.c.
+        self.line = line_number(
+            'main.cpp',
+            '// Please test many expressions while stopped at this line:')
+
+    def test_more_expr_commands(self):
+        """Test some more expression commands."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # Does static casting work?
+        self.expect("expression (int*)argv",
+                    startstr="(int *) $0 = 0x")
+        # (int *) $0 = 0x00007fff5fbff258
+
+        # Do return values containing the contents of expression locals work?
+        self.expect("expression int i = 5; i",
+                    startstr="(int) $1 = 5")
+        # (int) $2 = 5
+        self.expect("expression $1 + 1",
+                    startstr="(int) $2 = 6")
+        # (int) $3 = 6
+
+        # Do return values containing the results of static expressions work?
+        self.expect("expression 20 + 3",
+                    startstr="(int) $3 = 23")
+        # (int) $4 = 5
+        self.expect("expression $3 + 1",
+                    startstr="(int) $4 = 24")
+        # (int) $5 = 6
+
+    @skipIfLinux
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
+    def test_expr_symbols(self):
+        """Test symbols."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+                self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # Do anonymous symbols work?
+        self.expect("expression ((char**)environ)[0]",
+                startstr="(char *) $0 = 0x")
+        # (char *) $1 = 0x00007fff5fbff298 "Apple_PubSub_Socket_Render=/tmp/launch-7AEsUD/Render"
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/test/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/Makefile
new file mode 100644
index 0000000..06a21f5
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := wait-a-while.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/TestCallWithTimeout.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/TestCallWithTimeout.py
new file mode 100644
index 0000000..a64167e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/TestCallWithTimeout.py
@@ -0,0 +1,79 @@
+"""
+Test calling a function that waits a while, and make sure the timeout option to expr works.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprCommandWithTimeoutsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        self.main_source = "wait-a-while.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+
+    @expectedFlakeyFreeBSD("llvm.org/pr19605")
+    @expectedFailureAll(
+        oslist=[
+            "windows"],
+        bugnumber="llvm.org/pr21765")
+    def test(self):
+        """Test calling std::String member function."""
+        self.build()
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+            self, 'stop here in main.', self.main_source_spec)
+
+        # First set the timeout too short, and make sure we fail.
+        options = lldb.SBExpressionOptions()
+        options.SetTimeoutInMicroSeconds(10)
+        options.SetUnwindOnError(True)
+
+        frame = thread.GetFrameAtIndex(0)
+
+        value = frame.EvaluateExpression("wait_a_while(1000000)", options)
+        self.assertTrue(value.IsValid())
+        self.assertFalse(value.GetError().Success())
+
+        # Now do the same thing with the command line command, and make sure it
+        # works too.
+        interp = self.dbg.GetCommandInterpreter()
+
+        result = lldb.SBCommandReturnObject()
+        return_value = interp.HandleCommand(
+            "expr -t 100 -u true -- wait_a_while(1000000)", result)
+        self.assertTrue(return_value == lldb.eReturnStatusFailed)
+
+        # Okay, now do it again with long enough time outs:
+
+        options.SetTimeoutInMicroSeconds(1000000)
+        value = frame.EvaluateExpression("wait_a_while (1000)", options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+
+        # Now do the same thingwith the command line command, and make sure it
+        # works too.
+        interp = self.dbg.GetCommandInterpreter()
+
+        result = lldb.SBCommandReturnObject()
+        return_value = interp.HandleCommand(
+            "expr -t 1000000 -u true -- wait_a_while(1000)", result)
+        self.assertTrue(return_value == lldb.eReturnStatusSuccessFinishResult)
+
+        # Finally set the one thread timeout and make sure that doesn't change
+        # things much:
+
+        options.SetTimeoutInMicroSeconds(1000000)
+        options.SetOneThreadTimeoutInMicroSeconds(500000)
+        value = frame.EvaluateExpression("wait_a_while (1000)", options)
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/timeout/wait-a-while.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/wait-a-while.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/timeout/wait-a-while.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/timeout/wait-a-while.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile
new file mode 100644
index 0000000..e5e9e78
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile
@@ -0,0 +1,10 @@
+CXX_SOURCES := main.cpp test.cpp
+
+all: dummy
+
+include Makefile.rules
+
+dummy: dummy.cpp
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		CXX_SOURCES=dummy.cpp EXE=dummy
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/TestTopLevelExprs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/TestTopLevelExprs.py
new file mode 100644
index 0000000..4e1a377
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/TestTopLevelExprs.py
@@ -0,0 +1,93 @@
+"""
+Test top-level expressions.
+"""
+
+
+
+import unittest2
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TopLevelExpressionsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.c.
+        self.line = line_number('main.cpp',
+                                '// Set breakpoint here')
+        self.dummy_line = line_number('dummy.cpp',
+                                      '// Set breakpoint here')
+
+        # Disable confirmation prompt to avoid infinite wait
+        self.runCmd("settings set auto-confirm true")
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear auto-confirm"))
+
+    def build_and_run(self):
+        """Test top-level expressions."""
+        self.build()
+
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+    def run_dummy(self):
+        self.runCmd("file " + self.getBuildArtifact("dummy"),
+                    CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self,
+            "dummy.cpp",
+            self.dummy_line,
+            num_expected_locations=1,
+            loc_exact=False)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+    @add_test_categories(['pyapi'])
+    @skipIf(debug_info="gmodules")  # not relevant
+    @skipIf(oslist=["windows"])  # Error in record layout on Windows
+    def test_top_level_expressions(self):
+        self.build_and_run()
+
+        resultFromCode = self.frame().EvaluateExpression("doTest()").GetValueAsUnsigned()
+
+        self.runCmd("kill")
+
+        self.run_dummy()
+
+        codeFile = open('test.cpp', 'r')
+
+        expressions = []
+        current_expression = ""
+
+        for line in codeFile:
+            if line.startswith("// --"):
+                expressions.append(current_expression)
+                current_expression = ""
+            else:
+                current_expression += line
+
+        options = lldb.SBExpressionOptions()
+        options.SetLanguage(lldb.eLanguageTypeC_plus_plus)
+        options.SetTopLevel(True)
+
+        for expression in expressions:
+            self.frame().EvaluateExpression(expression, options)
+
+        resultFromTopLevel = self.frame().EvaluateExpression("doTest()")
+
+        self.assertTrue(resultFromTopLevel.IsValid())
+        self.assertEqual(
+            resultFromCode,
+            resultFromTopLevel.GetValueAsUnsigned())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/test.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/test.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/test.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/top-level/test.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile
new file mode 100644
index 0000000..c82383d
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/Makefile
@@ -0,0 +1,6 @@
+OBJC_SOURCES := main.m foo.m
+
+
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/TestObjCTypeQueryFromOtherCompileUnit.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
new file mode 100644
index 0000000..c518bf0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
@@ -0,0 +1,40 @@
+"""
+Regression test for <rdar://problem/8981098>:
+
+The expression parser's type search only looks in the current compilation unit for types.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ObjCTypeQueryTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break for main.m.
+        self.line = line_number(
+            'main.m', "// Set breakpoint here, then do 'expr (NSArray*)array_token'.")
+
+    @skipUnlessDarwin
+    def test(self):
+        """The expression parser's type search should be wider than the current compilation unit."""
+        self.build()
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # Now do a NSArry type query from the 'main.m' compile uint.
+        self.expect("expression (NSArray*)array_token",
+                    substrs=['(NSArray *) $0 = 0x'])
+        # (NSArray *) $0 = 0x00007fff70118398
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/foo.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/foo.m
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/foo.m
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/foo.m
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/main.m
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/main.m
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/two-files/main.m
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unicode-in-variable/TestUnicodeInVariable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/TestUnicodeInVariable.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unicode-in-variable/TestUnicodeInVariable.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/TestUnicodeInVariable.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unicode-in-variable/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unicode-in-variable/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unicode-in-variable/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/TestUnwindExpression.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/TestUnwindExpression.py
new file mode 100644
index 0000000..de883f4
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/TestUnwindExpression.py
@@ -0,0 +1,100 @@
+"""
+Test stopping at a breakpoint in an expression, and unwinding from there.
+"""
+
+
+
+import unittest2
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class UnwindFromExpressionTest(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    main_spec = lldb.SBFileSpec("main.cpp", False)
+
+    def build_and_run_to_bkpt(self):
+        self.build()
+
+        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                "// Set a breakpoint here to get started", self.main_spec)
+
+        # Next set a breakpoint in this function, set up Expression options to stop on
+        # breakpoint hits, and call the function.
+        self.fun_bkpt = self.target().BreakpointCreateBySourceRegex(
+            "// Stop inside the function here.", self.main_spec)
+        self.assertTrue(self.fun_bkpt, VALID_BREAKPOINT)
+
+
+    @no_debug_info_test
+    @expectedFailureAll(bugnumber="llvm.org/pr33164")
+    def test_conditional_bktp(self):
+        """
+        Test conditional breakpoint handling in the IgnoreBreakpoints = False case
+        """
+        self.build_and_run_to_bkpt()
+
+        self.fun_bkpt.SetCondition("0") # Should not get hit
+        options = lldb.SBExpressionOptions()
+        options.SetIgnoreBreakpoints(False)
+        options.SetUnwindOnError(False)
+
+        main_frame = self.thread.GetFrameAtIndex(0)
+        val = main_frame.EvaluateExpression("second_function(47)", options)
+        self.assertTrue(
+            val.GetError().Success(),
+            "We did complete the execution.")
+        self.assertEquals(47, val.GetValueAsSigned())
+
+
+    @add_test_categories(['pyapi'])
+    @expectedFlakeyNetBSD
+    def test_unwind_expression(self):
+        """Test unwinding from an expression."""
+        self.build_and_run_to_bkpt()
+
+        # Run test with varying one thread timeouts to also test the halting
+        # logic in the IgnoreBreakpoints = False case
+        self.do_unwind_test(self.thread, self.fun_bkpt, 1000)
+        self.do_unwind_test(self.thread, self.fun_bkpt, 100000)
+
+    def do_unwind_test(self, thread, bkpt, timeout):
+        #
+        # Use Python API to evaluate expressions while stopped in a stack frame.
+        #
+        main_frame = thread.GetFrameAtIndex(0)
+
+        options = lldb.SBExpressionOptions()
+        options.SetIgnoreBreakpoints(False)
+        options.SetUnwindOnError(False)
+        options.SetOneThreadTimeoutInMicroSeconds(timeout)
+
+        val = main_frame.EvaluateExpression("a_function_to_call()", options)
+
+        self.assertTrue(
+            val.GetError().Fail(),
+            "We did not complete the execution.")
+        error_str = val.GetError().GetCString()
+        self.assertTrue(
+            "Execution was interrupted, reason: breakpoint" in error_str,
+            "And the reason was right.")
+
+        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
+            self.process(), bkpt)
+        self.assertTrue(
+            thread.IsValid(),
+            "We are indeed stopped at our breakpoint")
+
+        # Now unwind the expression, and make sure we got back to where we
+        # started.
+        error = thread.UnwindInnermostExpression()
+        self.assertTrue(error.Success(), "We succeeded in unwinding")
+
+        cur_frame = thread.GetFrameAtIndex(0)
+        self.assertTrue(
+            cur_frame.IsEqual(main_frame),
+            "We got back to the main frame.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unwind_expression/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unwind_expression/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/vector_of_enums/TestVectorOfEnums.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/TestVectorOfEnums.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/vector_of_enums/TestVectorOfEnums.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/TestVectorOfEnums.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/vector_of_enums/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/vector_of_enums/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/vector_of_enums/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
new file mode 100644
index 0000000..6fd8133
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/Makefile
@@ -0,0 +1,20 @@
+C_SOURCES := main.c
+CFLAGS_EXTRAS := -std=c99 -fmodules
+LD_EXTRAS := -ldylib -L.
+
+all: a.out hidden/libdylib.dylib
+
+a.out: libdylib.dylib
+
+include Makefile.rules
+
+libdylib.dylib: dylib.c
+	$(MAKE) -C $(BUILDDIR) -f $(MAKEFILE_RULES) \
+		C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
+		CFLAGS_EXTRAS=-DHAS_THEM LD_EXTRAS=-dynamiclib
+
+hidden/libdylib.dylib:
+	mkdir hidden
+	$(MAKE) -C $(BUILDDIR)/hidden -f $(MAKEFILE_RULES) \
+		C_SOURCES= DYLIB_C_SOURCES=dylib.c DYLIB_NAME=dylib \
+		LD_EXTRAS=-dynamiclib
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/TestWeakSymbols.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/TestWeakSymbols.py
new file mode 100644
index 0000000..b58d838
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/TestWeakSymbols.py
@@ -0,0 +1,79 @@
+"""
+Test that we can compile expressions referring to
+absent weak symbols from a dylib.
+"""
+
+
+
+import os
+import lldb
+from lldbsuite.test import decorators
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+
+class TestWeakSymbolsInExpressions(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @decorators.skipUnlessDarwin
+    def test_weak_symbol_in_expr(self):
+        """Tests that we can refer to weak symbols in expressions."""
+        self.build()
+        self.main_source_file = lldb.SBFileSpec("main.c")
+        self.do_test()
+
+    def run_weak_var_check (self, weak_varname, present):
+        # The expression will modify present_weak_int to signify which branch
+        # was taken.  Set it to so we don't get confused by a previous run.
+        value = self.target.FindFirstGlobalVariable("present_weak_int")
+        value.SetValueFromCString("0")
+        if present:
+            correct_value = 10
+        else:
+            correct_value = 20
+            
+        # Note, I'm adding the "; 10" at the end of the expression to work around
+        # the bug that expressions with no result currently return False for Success()...
+        expr = "if (&" + weak_varname + " != NULL) { present_weak_int = 10; } else { present_weak_int = 20;}; 10"
+        result = self.frame.EvaluateExpression(expr)
+        self.assertTrue(result.GetError().Success(), "absent_weak_int expr failed: %s"%(result.GetError().GetCString()))
+        self.assertEqual(value.GetValueAsSigned(), correct_value, "Didn't change present_weak_int correctly.")
+        
+    def do_test(self):
+        hidden_dir = os.path.join(self.getBuildDir(), "hidden")
+        hidden_dylib = os.path.join(hidden_dir, "libdylib.dylib")
+
+        launch_info = lldb.SBLaunchInfo(None)
+        launch_info.SetWorkingDirectory(self.getBuildDir())
+        # We have to point to the hidden directory to pick up the
+        # version of the dylib without the weak symbols:
+        env_expr = self.platformContext.shlib_environment_var + "=" + hidden_dir
+        launch_info.SetEnvironmentEntries([env_expr], True)
+
+        (self.target, _, thread, _) = lldbutil.run_to_source_breakpoint(
+                                              self, "Set a breakpoint here",
+                                              self.main_source_file,
+                                              launch_info = launch_info,
+                                              extra_images = [hidden_dylib])
+        # First we have to import the Dylib module so we get the type info
+        # for the weak symbol.  We need to add the source dir to the module
+        # search paths, and then run @import to introduce it into the expression
+        # context:
+        self.dbg.HandleCommand("settings set target.clang-module-search-paths " + self.getSourceDir())
+        
+        self.frame = thread.frames[0]
+        self.assertTrue(self.frame.IsValid(), "Got a good frame")
+        options = lldb.SBExpressionOptions()
+        options.SetLanguage(lldb.eLanguageTypeObjC)
+        result = self.frame.EvaluateExpression("@import Dylib", options)
+
+        # Now run an expression that references an absent weak symbol:
+        self.run_weak_var_check("absent_weak_int", False)
+        self.run_weak_var_check("absent_weak_function", False)
+        
+        # Make sure we can do the same thing with present weak symbols
+        self.run_weak_var_check("present_weak_int", True)
+        self.run_weak_var_check("present_weak_function", True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/dylib.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/dylib.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/dylib.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.h
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/dylib.h
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/dylib.h
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/module.modulemap b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/module.modulemap
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/module.modulemap
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/weak_symbols/module.modulemap
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/TestXValuePrinting.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/TestXValuePrinting.py
new file mode 100644
index 0000000..3a394d7
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/TestXValuePrinting.py
@@ -0,0 +1,36 @@
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ExprXValuePrintingTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        self.main_source = "main.cpp"
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+
+    def do_test(self, dictionary=None):
+        """Printing an xvalue should work."""
+        self.build(dictionary=dictionary)
+
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                          '// Break here', self.main_source_spec)
+        frame = thread.GetFrameAtIndex(0)
+
+        value = frame.EvaluateExpression("foo().data")
+        self.assertTrue(value.IsValid())
+        self.assertTrue(value.GetError().Success())
+        self.assertEqual(value.GetValueAsSigned(), 1234)
+
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
+    def test(self):
+        self.do_test()
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/xvalue/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/xvalue/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/expression/xvalue/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/TestArray.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/TestArray.py
new file mode 100644
index 0000000..9b049a2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/TestArray.py
@@ -0,0 +1,27 @@
+"""
+Test the output of `frame diagnose` for an array access
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestArray(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
+    def test_array(self):
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("thread list", "Thread should be stopped",
+                    substrs=['stopped'])
+        self.expect(
+            "frame diagnose",
+            "Crash diagnosis was accurate",
+            substrs=["a[10]"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/array/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/TestBadReference.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/TestBadReference.py
new file mode 100644
index 0000000..8650484
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/TestBadReference.py
@@ -0,0 +1,25 @@
+"""
+Test the output of `frame diagnose` for dereferencing a bad reference
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestBadReference(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
+    def test_bad_reference(self):
+        TestBase.setUp(self)
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("thread list", "Thread should be stopped",
+                    substrs=['stopped'])
+        self.expect("frame diagnose", "Crash diagnosis was accurate", "f->b")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/bad-reference/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/TestComplicatedExpression.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/TestComplicatedExpression.py
new file mode 100644
index 0000000..ccc0f88
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/TestComplicatedExpression.py
@@ -0,0 +1,28 @@
+"""
+Test the output of `frame diagnose` for a subexpression of a complicated expression
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestDiagnoseDereferenceArgument(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
+    def test_diagnose_dereference_argument(self):
+        TestBase.setUp(self)
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("thread list", "Thread should be stopped",
+                    substrs=['stopped'])
+        self.expect(
+            "frame diagnose",
+            "Crash diagnosis was accurate",
+            "f->b->d")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/complicated-expression/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py
new file mode 100644
index 0000000..bdc89a6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py
@@ -0,0 +1,28 @@
+"""
+Test the output of `frame diagnose` for dereferencing a function argument
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestDiagnoseDereferenceArgument(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
+    def test_diagnose_dereference_argument(self):
+        TestBase.setUp(self)
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("thread list", "Thread should be stopped",
+                    substrs=['stopped'])
+        self.expect(
+            "frame diagnose",
+            "Crash diagnosis was accurate",
+            "f->b->d")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-argument/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py
new file mode 100644
index 0000000..c49c807
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py
@@ -0,0 +1,31 @@
+"""
+Test the output of `frame diagnose` for dereferencing a function's return value
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestDiagnoseDereferenceFunctionReturn(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
+    @expectedFailureAll(oslist=['macosx'], archs=['i386'], bugnumber="rdar://28656408")
+    def test_diagnose_dereference_function_return(self):
+        TestBase.setUp(self)
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("thread list", "Thread should be stopped",
+                    substrs=['stopped'])
+        self.expect(
+            "frame diagnose",
+            "Crash diagnosis was accurate",
+            substrs=[
+                "GetAFoo",
+                "->b"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-function-return/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/TestDiagnoseDereferenceThis.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/TestDiagnoseDereferenceThis.py
new file mode 100644
index 0000000..85de511
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/TestDiagnoseDereferenceThis.py
@@ -0,0 +1,28 @@
+"""
+Test the output of `frame diagnose` for dereferencing `this`
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestDiagnoseDereferenceThis(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
+    def test_diagnose_dereference_this(self):
+        TestBase.setUp(self)
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("thread list", "Thread should be stopped",
+                    substrs=['stopped'])
+        self.expect(
+            "frame diagnose",
+            "Crash diagnosis was accurate",
+            "this->a")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/dereference-this/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/TestDiagnoseInheritance.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/TestDiagnoseInheritance.py
new file mode 100644
index 0000000..54d44f0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/TestDiagnoseInheritance.py
@@ -0,0 +1,25 @@
+"""
+Test the output of `frame diagnose` for calling virtual methods
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestDiagnoseInheritance(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
+    def test_diagnose_inheritance(self):
+        TestBase.setUp(self)
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("thread list", "Thread should be stopped",
+                    substrs=['stopped'])
+        self.expect("frame diagnose", "Crash diagnosis was accurate", "d")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/inheritance/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/TestLocalVariable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/TestLocalVariable.py
new file mode 100644
index 0000000..8d49d30
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/TestLocalVariable.py
@@ -0,0 +1,25 @@
+"""
+Test the output of `frame diagnose` for dereferencing a local variable
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestLocalVariable(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
+    def test_local_variable(self):
+        TestBase.setUp(self)
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("thread list", "Thread should be stopped",
+                    substrs=['stopped'])
+        self.expect("frame diagnose", "Crash diagnosis was accurate", "myInt")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/local-variable/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py
new file mode 100644
index 0000000..7ea42de
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py
@@ -0,0 +1,25 @@
+"""
+Test the output of `frame diagnose` for calling virtual methods
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestDiagnoseVirtualMethodCall(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
+    def test_diagnose_virtual_method_call(self):
+        TestBase.setUp(self)
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.expect("thread list", "Thread should be stopped",
+                    substrs=['stopped'])
+        self.expect("frame diagnose", "Crash diagnosis was accurate", "foo")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/diagnose/virtual-method-call/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/Makefile
new file mode 100644
index 0000000..993dc3f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/Makefile
@@ -0,0 +1,10 @@
+CXX_SOURCES := main.cpp other.cpp other-2.cpp
+C_SOURCES := somefunc.c
+
+include Makefile.rules
+
+other-2.o: other-2.cpp
+	$(CXX) $(CFLAGS_NO_DEBUG) -c $(SRCDIR)/other-2.cpp
+
+somefunc.o: somefunc.c
+	$(CC) $(CFLAGS) -std=c99 -c $(SRCDIR)/somefunc.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/TestGuessLanguage.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/TestGuessLanguage.py
new file mode 100644
index 0000000..2c8d1dd
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/TestGuessLanguage.py
@@ -0,0 +1,84 @@
+"""
+Test the SB API SBFrame::GuessLanguage.
+"""
+
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class TestFrameGuessLanguage(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # If your test case doesn't stress debug info, the
+    # set this to true.  That way it won't be run once for
+    # each debug info format.
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIf(compiler="clang", compiler_version=['<', '10.0'])
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37658")
+    def test_guess_language(self):
+        """Test GuessLanguage for C and C++."""
+        self.build()
+        self.do_test()
+
+    def check_language(self, thread, frame_no, test_lang):
+        frame = thread.frames[frame_no]
+        self.assertTrue(frame.IsValid(), "Frame %d was not valid."%(frame_no))
+        lang = frame.GuessLanguage()
+        self.assertEqual(lang, test_lang)
+
+    def do_test(self):
+        """Test GuessLanguage for C & C++."""
+        exe = self.getBuildArtifact("a.out")
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Now create a breakpoint in main.c at the source matching
+        # "Set a breakpoint here"
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            "Set breakpoint here", lldb.SBFileSpec("somefunc.c"))
+        self.assertTrue(breakpoint and
+                        breakpoint.GetNumLocations() >= 1,
+                        VALID_BREAKPOINT)
+
+        error = lldb.SBError()
+        # This is the launch info.  If you want to launch with arguments or
+        # environment variables, add them using SetArguments or
+        # SetEnvironmentEntries
+
+        launch_info = lldb.SBLaunchInfo(None)
+        process = target.Launch(launch_info, error)
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+        # Did we hit our breakpoint?
+        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
+        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
+        self.assertTrue(
+            len(threads) == 1,
+            "There should be a thread stopped at our breakpoint")
+
+        # The hit count for the breakpoint should be 1.
+        self.assertTrue(breakpoint.GetHitCount() == 1)
+
+        thread = threads[0]
+
+        c_frame_language = lldb.eLanguageTypeC99
+        cxx_frame_language = lldb.eLanguageTypeC_plus_plus_11
+        # gcc emits DW_LANG_C89 even if -std=c99 was specified
+        if "gcc" in self.getCompiler():
+            c_frame_language = lldb.eLanguageTypeC89
+            cxx_frame_language = lldb.eLanguageTypeC_plus_plus
+
+        self.check_language(thread, 0, c_frame_language)
+        self.check_language(thread, 1, cxx_frame_language)
+        self.check_language(thread, 2, lldb.eLanguageTypeC_plus_plus)
+
+
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/other-2.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/other-2.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/other-2.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/other-2.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/other.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/other.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/other.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.h
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/other.h
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/other.h
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/somefunc.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/somefunc.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/somefunc.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/language/somefunc.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile
new file mode 100644
index 0000000..8248c01
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/Makefile
@@ -0,0 +1,9 @@
+OBJC_SOURCES := main.m
+
+CFLAGS_EXTRAS := -g0 # No debug info.
+MAKE_DSYM := NO
+
+
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/TestFrameRecognizer.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/TestFrameRecognizer.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/TestFrameRecognizer.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/main.m
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/main.m
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/main.m
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/recognizer.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/recognizer.py
new file mode 100644
index 0000000..548676c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/recognizer/recognizer.py
@@ -0,0 +1,21 @@
+# encoding: utf-8
+
+import lldb
+
+class MyFrameRecognizer(object):
+    def get_recognized_arguments(self, frame):
+        if frame.name == "foo":
+            arg1 = frame.EvaluateExpression("$arg1").signed
+            arg2 = frame.EvaluateExpression("$arg2").signed
+            val1 = frame.GetThread().GetProcess().GetTarget().CreateValueFromExpression("a", "%d" % arg1)
+            val2 = frame.GetThread().GetProcess().GetTarget().CreateValueFromExpression("b", "%d" % arg2)
+            return [val1, val2]
+        elif frame.name == "bar":
+            arg1 = frame.EvaluateExpression("$arg1").signed
+            val1 = frame.GetThread().GetProcess().GetTarget().CreateValueFromExpression("a", "(int *)%d" % arg1)
+            return [val1]
+        return []
+
+class MyOtherFrameRecognizer(object):
+    def get_recognized_arguments(self, frame):
+        return []
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/select/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/select/Makefile
new file mode 100644
index 0000000..3d0b98f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/select/Makefile
@@ -0,0 +1,2 @@
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/select/TestFrameSelect.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/select/TestFrameSelect.py
new file mode 100644
index 0000000..2f2dd5a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/select/TestFrameSelect.py
@@ -0,0 +1,77 @@
+"""
+Test 'frame select' command.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestFrameSelect(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    @skipIfWindows
+    def test_relative(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        self.expect("frame select -r 1", substrs=["nested2() at"])
+        self.expect("frame select -r -1", substrs=["nested3() at"])
+
+        self.expect("frame select -r -1", error=True, substrs=["Already at the bottom of the stack."])
+        self.expect("frame select -r -2147483647", error=True, substrs=["Already at the bottom of the stack."])
+        self.expect("frame select -r -2147483648", error=True, substrs=["error: invalid frame offset argument '-2147483648'"])
+        self.expect("frame select -r -2147483649", error=True, substrs=["error: invalid frame offset argument '-2147483649'"])
+
+        self.expect("frame select -r 1", substrs=["nested2() at"])
+        self.expect("frame select -r -2", substrs=["nested3() at"])
+        self.expect("frame select -r 1", substrs=["nested2() at"])
+        self.expect("frame select -r -2147483647", substrs=["nested3() at"])
+        self.expect("frame select -r 1", substrs=["nested2() at"])
+        self.expect("frame select -r -2147483648", error=True, substrs=["error: invalid frame offset argument '-2147483648'"])
+        self.expect("frame select -r -2147483649", error=True, substrs=["error: invalid frame offset argument '-2147483649'"])
+
+        self.expect("frame select -r 100")
+        self.expect("frame select -r 1", error=True, substrs=["Already at the top of the stack."])
+
+    @no_debug_info_test
+    @skipIfWindows
+    def test_mixing_relative_and_abs(self):
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self,
+            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
+
+        # The function associated with each frame index can change depending
+        # on the function calling main (e.g. `start`), so this only tests that
+        # the frame index number is correct. We test the actual functions
+        # in the relative test.
+
+        # Jump to the top of the stack.
+        self.expect("frame select 0", substrs=["frame #0"])
+
+        # Run some relative commands.
+        self.expect("up", substrs=["frame #1"])
+        self.expect("frame select -r 1", substrs=["frame #2"])
+        self.expect("frame select -r -1", substrs=["frame #1"])
+
+        # Test that absolute indices still work.
+        self.expect("frame select 2", substrs=["frame #2"])
+        self.expect("frame select 1", substrs=["frame #1"])
+        self.expect("frame select 3", substrs=["frame #3"])
+        self.expect("frame select 0", substrs=["frame #0"])
+        self.expect("frame select 1", substrs=["frame #1"])
+
+        # Run some other relative frame select commands.
+        self.expect("down", substrs=["frame #0"])
+        self.expect("frame select -r 1", substrs=["frame #1"])
+        self.expect("frame select -r -1", substrs=["frame #0"])
+
+        # Test that absolute indices still work.
+        self.expect("frame select 2", substrs=["frame #2"])
+        self.expect("frame select 1", substrs=["frame #1"])
+        self.expect("frame select 3", substrs=["frame #3"])
+        self.expect("frame select 0", substrs=["frame #0"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/select/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/select/main.cpp
new file mode 100644
index 0000000..c852bdb
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/select/main.cpp
@@ -0,0 +1,16 @@
+int nested3() {
+  return 3; // Set break point at this line.
+}
+
+int nested2() {
+  return 2 + nested3();
+}
+
+int nested1() {
+  return 1 + nested2();
+}
+
+
+int main(int argc, char **argv) {
+  return nested1();
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/TestFrameVariableScope.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/TestFrameVariableScope.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/TestFrameVariableScope.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/TestFrameVariableScope.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var-scope/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile
new file mode 100644
index 0000000..695335e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var/Makefile
@@ -0,0 +1,4 @@
+C_SOURCES := main.c
+CFLAGS_EXTRAS := -std=c99
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var/TestFrameVar.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var/TestFrameVar.py
new file mode 100644
index 0000000..aa0f6b7
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var/TestFrameVar.py
@@ -0,0 +1,91 @@
+"""
+Make sure the frame variable -g, -a, and -l flags work.
+"""
+
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+
+class TestFrameVar(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # If your test case doesn't stress debug info, the
+    # set this to true.  That way it won't be run once for
+    # each debug info format.
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_frame_var(self):
+        self.build()
+        self.do_test()
+
+    def do_test(self):
+        exe = self.getBuildArtifact("a.out")
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Now create a breakpoint in main.c at the source matching
+        # "Set a breakpoint here"
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            "Set a breakpoint here", lldb.SBFileSpec("main.c"))
+        self.assertTrue(breakpoint and
+                        breakpoint.GetNumLocations() >= 1,
+                        VALID_BREAKPOINT)
+
+        error = lldb.SBError()
+        # This is the launch info.  If you want to launch with arguments or
+        # environment variables, add them using SetArguments or
+        # SetEnvironmentEntries
+
+        launch_info = lldb.SBLaunchInfo(None)
+        process = target.Launch(launch_info, error)
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+        # Did we hit our breakpoint?
+        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
+        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
+        self.assertTrue(
+            len(threads) == 1,
+            "There should be a thread stopped at our breakpoint")
+
+        # The hit count for the breakpoint should be 1.
+        self.assertTrue(breakpoint.GetHitCount() == 1)
+
+        frame = threads[0].GetFrameAtIndex(0)
+        command_result = lldb.SBCommandReturnObject()
+        interp = self.dbg.GetCommandInterpreter()
+
+        # Just get args:
+        result = interp.HandleCommand("frame var -l", command_result)
+        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
+        output = command_result.GetOutput()
+        self.assertTrue("argc" in output, "Args didn't find argc")
+        self.assertTrue("argv" in output, "Args didn't find argv")
+        self.assertTrue("test_var" not in output, "Args found a local")
+        self.assertTrue("g_var" not in output, "Args found a global")
+
+        # Just get locals:
+        result = interp.HandleCommand("frame var -a", command_result)
+        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
+        output = command_result.GetOutput()
+        self.assertTrue("argc" not in output, "Locals found argc")
+        self.assertTrue("argv" not in output, "Locals found argv")
+        self.assertTrue("test_var" in output, "Locals didn't find test_var")
+        self.assertTrue("g_var" not in output, "Locals found a global")
+
+        # Get the file statics:
+        result = interp.HandleCommand("frame var -l -a -g", command_result)
+        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
+        output = command_result.GetOutput()
+        self.assertTrue("argc" not in output, "Globals found argc")
+        self.assertTrue("argv" not in output, "Globals found argv")
+        self.assertTrue("test_var" not in output, "Globals found test_var")
+        self.assertTrue("g_var" in output, "Globals didn't find g_var")
+
+
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/frame/var/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/basic/Makefile
new file mode 100644
index 0000000..c9319d6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/basic/Makefile
@@ -0,0 +1,2 @@
+C_SOURCES := main.c
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/basic/TestGuiBasic.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/basic/TestGuiBasic.py
new file mode 100644
index 0000000..2dcc7d0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/basic/TestGuiBasic.py
@@ -0,0 +1,64 @@
+"""
+Test that the 'gui' displays the help window and basic UI.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.lldbpexpect import PExpectTest
+
+class BasicGuiCommandTest(PExpectTest):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # PExpect uses many timeouts internally and doesn't play well
+    # under ASAN on a loaded machine..
+    @skipIfAsan
+    @skipIfCursesSupportMissing
+    @skipIfRemote # "run" command will not work correctly for remote debug
+    def test_gui(self):
+        self.build()
+
+        self.launch(executable=self.getBuildArtifact("a.out"), dimensions=(100,500))
+        self.expect('br set -f main.c -p "// Break here"', substrs=["Breakpoint 1", "address ="])
+        self.expect("run", substrs=["stop reason ="])
+
+
+        escape_key = chr(27).encode()
+
+        # Start the GUI for the first time and check for the welcome window.
+        self.child.sendline("gui")
+        self.child.expect_exact("Welcome to the LLDB curses GUI.")
+
+        # Press escape to quit the welcome screen
+        self.child.send(escape_key)
+        # Press escape again to quit the gui
+        self.child.send(escape_key)
+        self.expect_prompt()
+
+        # Start the GUI a second time, this time we should have the normal GUI.
+        self.child.sendline("gui")
+        # Check for GUI elements in the menu bar.
+        self.child.expect_exact("Target")
+        self.child.expect_exact("Process")
+        self.child.expect_exact("Thread")
+        self.child.expect_exact("View")
+        self.child.expect_exact("Help")
+
+        # Check the sources window.
+        self.child.expect_exact("Sources")
+        self.child.expect_exact("main")
+        self.child.expect_exact("funky_var_name_that_should_be_rendered")
+
+        # Check the variable window.
+        self.child.expect_exact("Variables")
+        self.child.expect_exact("(int) funky_var_name_that_should_be_rendered = 22")
+
+        # Check the bar at the bottom.
+        self.child.expect_exact("Frame:")
+
+        # Press escape to quit the gui
+        self.child.send(escape_key)
+
+        self.expect_prompt()
+        self.quit()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/basic/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/basic/main.c
new file mode 100644
index 0000000..97d57fc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/basic/main.c
@@ -0,0 +1,4 @@
+int main(int argc, char **argv) {
+  int funky_var_name_that_should_be_rendered = 22;
+  return 0; // Break here
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/invalid-args/TestInvalidArgsGui.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/invalid-args/TestInvalidArgsGui.py
new file mode 100644
index 0000000..11fdc92
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/gui/invalid-args/TestInvalidArgsGui.py
@@ -0,0 +1,13 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+class GuiTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    @skipIfCursesSupportMissing
+    def test_reproducer_generate_invalid_invocation(self):
+        self.expect("gui blub", error=True,
+                    substrs=["the gui command takes no arguments."])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/help/TestHelp.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/help/TestHelp.py
new file mode 100644
index 0000000..31656af
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/help/TestHelp.py
@@ -0,0 +1,265 @@
+"""
+Test some lldb help commands.
+
+See also CommandInterpreter::OutputFormattedHelpText().
+"""
+
+
+
+import os
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class HelpCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_simplehelp(self):
+        """A simple test of 'help' command and its output."""
+        self.expect("help",
+                    startstr='Debugger commands:')
+
+        self.expect("help -a", matching=False,
+                    substrs=['next'])
+
+        self.expect("help", matching=True,
+                    substrs=['next'])
+
+    @no_debug_info_test
+    def test_help_on_help(self):
+        """Testing the help on the help facility."""
+        self.expect("help help", matching=True,
+                    substrs=['--hide-aliases',
+                             '--hide-user-commands'])
+
+    @no_debug_info_test
+    def version_number_string(self):
+        """Helper function to find the version number string of lldb."""
+        plist = os.path.join(
+            os.environ["LLDB_SRC"],
+            "resources",
+            "LLDB-Info.plist")
+        try:
+            CFBundleVersionSegFound = False
+            with open(plist, 'r') as f:
+                for line in f:
+                    if CFBundleVersionSegFound:
+                        version_line = line.strip()
+                        import re
+                        m = re.match("<string>(.*)</string>", version_line)
+                        if m:
+                            version = m.group(1)
+                            return version
+                        else:
+                            # Unsuccessful, let's juts break out of the for
+                            # loop.
+                            break
+
+                    if line.find("<key>CFBundleVersion</key>") != -1:
+                        # Found our match.  The next line contains our version
+                        # string, for example:
+                        #
+                        #     <string>38</string>
+                        CFBundleVersionSegFound = True
+
+        except:
+            # Just fallthrough...
+            import traceback
+            traceback.print_exc()
+
+        # Use None to signify that we are not able to grok the version number.
+        return None
+
+    @no_debug_info_test
+    def test_help_arch(self):
+        """Test 'help arch' which should list of supported architectures."""
+        self.expect("help arch",
+                    substrs=['arm', 'x86_64', 'i386'])
+
+    @no_debug_info_test
+    def test_help_version(self):
+        """Test 'help version' and 'version' commands."""
+        self.expect("help version",
+                    substrs=['Show the LLDB debugger version.'])
+        import re
+        version_str = self.version_number_string()
+        match = re.match('[0-9]+', version_str)
+        search_regexp = ['lldb( version|-' + (version_str if match else '[0-9]+') + ').*\n']
+
+        self.expect("version",
+                    patterns=search_regexp)
+
+    @no_debug_info_test
+    def test_help_should_not_crash_lldb(self):
+        """Command 'help disasm' should not crash lldb."""
+        self.runCmd("help disasm", check=False)
+        self.runCmd("help unsigned-integer")
+
+    @no_debug_info_test
+    def test_help_should_not_hang_emacsshell(self):
+        """Command 'settings set term-width 0' should not hang the help command."""
+        self.expect(
+            "settings set term-width 0",
+            COMMAND_FAILED_AS_EXPECTED,
+            error=True,
+            substrs=['error: 0 is out of range, valid values must be between'])
+        # self.runCmd("settings set term-width 0")
+        self.expect("help",
+                    startstr='Debugger commands:')
+
+    @no_debug_info_test
+    def test_help_breakpoint_set(self):
+        """Test that 'help breakpoint set' does not print out redundant lines of:
+        'breakpoint set [-s <shlib-name>] ...'."""
+        self.expect("help breakpoint set", matching=False,
+                    substrs=['breakpoint set [-s <shlib-name>]'])
+
+    @no_debug_info_test
+    def test_help_image_dump_symtab_should_not_crash(self):
+        """Command 'help image dump symtab' should not crash lldb."""
+        # 'image' is an alias for 'target modules'.
+        self.expect("help image dump symtab",
+                    substrs=['dump symtab',
+                             'sort-order'])
+
+    @no_debug_info_test
+    def test_help_image_du_sym_is_ambiguous(self):
+        """Command 'help image du sym' is ambiguous and spits out the list of candidates."""
+        self.expect("help image du sym",
+                    COMMAND_FAILED_AS_EXPECTED, error=True,
+                    substrs=['error: ambiguous command image du sym',
+                             'symfile',
+                             'symtab'])
+
+    @no_debug_info_test
+    def test_help_image_du_line_should_work(self):
+        """Command 'help image du line-table' is not ambiguous and should work."""
+        # 'image' is an alias for 'target modules'.
+        self.expect("help image du line", substrs=[
+                    'Dump the line table for one or more compilation units'])
+
+    @no_debug_info_test
+    def test_help_target_variable_syntax(self):
+        """Command 'help target variable' should display <variable-name> ..."""
+        self.expect("help target variable",
+                    substrs=['<variable-name> [<variable-name> [...]]'])
+
+    @no_debug_info_test
+    def test_help_watchpoint_and_its_args(self):
+        """Command 'help watchpoint', 'help watchpt-id', and 'help watchpt-id-list' should work."""
+        self.expect("help watchpoint",
+                    substrs=['delete', 'disable', 'enable', 'list'])
+        self.expect("help watchpt-id",
+                    substrs=['<watchpt-id>'])
+        self.expect("help watchpt-id-list",
+                    substrs=['<watchpt-id-list>'])
+
+    @no_debug_info_test
+    def test_help_watchpoint_set(self):
+        """Test that 'help watchpoint set' prints out 'expression' and 'variable'
+        as the possible subcommands."""
+        self.expect("help watchpoint set",
+                    substrs=['The following subcommands are supported:'],
+                    patterns=['expression +--',
+                              'variable +--'])
+
+    @no_debug_info_test
+    def test_help_po_hides_options(self):
+        """Test that 'help po' does not show all the options for expression"""
+        self.expect(
+            "help po",
+            substrs=[
+                '--show-all-children',
+                '--object-description'],
+            matching=False)
+
+    @no_debug_info_test
+    def test_help_run_hides_options(self):
+        """Test that 'help run' does not show all the options for process launch"""
+        self.expect("help run",
+                    substrs=['--arch', '--environment'], matching=False)
+
+    @no_debug_info_test
+    def test_help_next_shows_options(self):
+        """Test that 'help next' shows all the options for thread step-over"""
+        self.expect("help next",
+                    substrs=['--step-out-avoids-no-debug', '--run-mode'], matching=True)
+
+    @no_debug_info_test
+    def test_help_provides_alternatives(self):
+        """Test that help on commands that don't exist provides information on additional help avenues"""
+        self.expect(
+            "help thisisnotadebuggercommand",
+            substrs=[
+                "'thisisnotadebuggercommand' is not a known command.",
+                "Try 'help' to see a current list of commands.",
+                "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
+                "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."],
+            error=True)
+
+        self.expect(
+            "help process thisisnotadebuggercommand",
+            substrs=[
+                "'process thisisnotadebuggercommand' is not a known command.",
+                "Try 'help' to see a current list of commands.",
+                "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
+                "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."])
+
+    @no_debug_info_test
+    def test_custom_help_alias(self):
+        """Test that aliases pick up custom help text."""
+        def cleanup():
+            self.runCmd('command unalias afriendlyalias', check=False)
+            self.runCmd('command unalias averyfriendlyalias', check=False)
+
+        self.addTearDownHook(cleanup)
+        self.runCmd(
+            'command alias --help "I am a friendly alias" -- afriendlyalias help')
+        self.expect(
+            "help afriendlyalias",
+            matching=True,
+            substrs=['I am a friendly alias'])
+        self.runCmd(
+            'command alias --long-help "I am a very friendly alias" -- averyfriendlyalias help')
+        self.expect("help averyfriendlyalias", matching=True,
+                    substrs=['I am a very friendly alias'])
+    @no_debug_info_test
+    def test_alias_prints_origin(self):
+        """Test that 'help <unique_match_to_alias>' prints the alias origin."""
+        def cleanup():
+            self.runCmd('command unalias alongaliasname', check=False)
+
+        self.addTearDownHook(cleanup)
+        self.runCmd('command alias alongaliasname help')
+        self.expect("help alongaliasna", matching=True,
+                    substrs=["'alongaliasna' is an abbreviation for 'help'"])
+
+    @no_debug_info_test
+    def test_hidden_help(self):
+        self.expect("help -h",
+                    substrs=["_regexp-bt"])
+
+    @no_debug_info_test
+    def test_help_ambiguous(self):
+        self.expect("help g",
+                    substrs=["Help requested with ambiguous command name, possible completions:",
+                             "gdb-remote", "gui"])
+
+    @no_debug_info_test
+    def test_help_unknown_flag(self):
+        self.expect("help -z", error=True,
+                    substrs=["unknown or ambiguous option"])
+
+    @no_debug_info_test
+    def test_help_format_output(self):
+        """Test that help output reaches TerminalWidth."""
+        self.runCmd(
+            'settings set term-width 108')
+        self.expect(
+            "help format",
+            matching=True,
+            substrs=['<format> -- One of the format names'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/basic/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/basic/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py
new file mode 100644
index 0000000..16321dc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/basic/TestLogging.py
@@ -0,0 +1,102 @@
+"""
+Test lldb logging.  This test just makes sure logging doesn't crash, and produces some output.
+"""
+
+
+
+import os
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class LogTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        super(LogTestCase, self).setUp()
+        self.log_file = self.getBuildArtifact("log-file.txt")
+
+    def test_file_writing(self):
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.expect("file " + exe,
+                    patterns=["Current executable set to .*a.out"])
+
+        if (os.path.exists(self.log_file)):
+            os.remove(self.log_file)
+
+        # By default, Debugger::EnableLog() will set log options to
+        # PREPEND_THREAD_NAME + OPTION_THREADSAFE. We don't want the
+        # threadnames here, so we enable just threadsafe (-t).
+        self.runCmd("log enable -t -f '%s' lldb commands" % (self.log_file))
+
+        self.runCmd("command alias bp breakpoint")
+
+        self.runCmd("bp set -n main")
+
+        self.runCmd("bp l")
+
+        self.runCmd("log disable lldb")
+
+        self.assertTrue(os.path.isfile(self.log_file))
+
+        f = open(self.log_file)
+        log_lines = f.readlines()
+        f.close()
+        os.remove(self.log_file)
+
+        self.assertGreater(
+            len(log_lines),
+            0,
+            "Something was written to the log file.")
+
+    # Check that lldb truncates its log files
+    def test_log_truncate(self):
+        # put something in our log file
+        with open(self.log_file, "w") as f:
+            for i in range(1, 1000):
+                f.write("bacon\n")
+
+        self.runCmd("log enable -t -f '%s' lldb commands" % self.log_file)
+        self.runCmd("help log")
+        self.runCmd("log disable lldb")
+
+        self.assertTrue(os.path.isfile(self.log_file))
+        with open(self.log_file, "r") as f:
+            contents = f.read()
+
+        # check that it got removed
+        self.assertEquals(contents.find("bacon"), -1)
+
+    # Check that lldb can append to a log file
+    def test_log_append(self):
+        # put something in our log file
+        with open(self.log_file, "w") as f:
+            f.write("bacon\n")
+
+        self.runCmd( "log enable -t -a -f '%s' lldb commands" % self.log_file)
+        self.runCmd("help log")
+        self.runCmd("log disable lldb")
+
+        self.assertTrue(os.path.isfile(self.log_file))
+        with open(self.log_file, "r") as f:
+            contents = f.read()
+
+        # check that it is still there
+        self.assertEquals(contents.find("bacon"), 0)
+
+    # Enable all log options and check that nothing crashes.
+    @skipIfWindows
+    def test_all_log_options(self):
+        if (os.path.exists(self.log_file)):
+            os.remove(self.log_file)
+
+        self.runCmd("log enable -v -t -s -T -p -n -S -F -f '%s' lldb commands" % self.log_file)
+        self.runCmd("help log")
+        self.runCmd("log disable lldb")
+
+        self.assertTrue(os.path.isfile(self.log_file))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/logging/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/basic/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/logging/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/basic/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/invalid-args/TestInvalidArgsLog.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/invalid-args/TestInvalidArgsLog.py
new file mode 100644
index 0000000..4d3c573
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/log/invalid-args/TestInvalidArgsLog.py
@@ -0,0 +1,22 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+class InvalidArgsLogTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_enable_empty(self):
+        self.expect("log enable", error=True,
+                    substrs=["error: log enable takes a log channel and one or more log types."])
+
+    @no_debug_info_test
+    def test_disable_empty(self):
+        self.expect("log disable", error=True,
+                    substrs=["error: log disable takes a log channel and one or more log types."])
+
+    @no_debug_info_test
+    def test_timer_empty(self):
+        self.expect("log timer", error=True,
+                    substrs=["error: Missing subcommand"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py
new file mode 100644
index 0000000..ab45b22
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformCommand.py
@@ -0,0 +1,79 @@
+"""
+Test some lldb platform commands.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class PlatformCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_help_platform(self):
+        self.runCmd("help platform")
+
+    @no_debug_info_test
+    def test_list(self):
+        self.expect("platform list",
+                    patterns=['^Available platforms:'])
+
+    @no_debug_info_test
+    def test_process_list(self):
+        self.expect("platform process list",
+                    substrs=['PID', 'TRIPLE', 'NAME'])
+
+    @no_debug_info_test
+    def test_process_info_with_no_arg(self):
+        """This is expected to fail and to return a proper error message."""
+        self.expect("platform process info", error=True,
+                    substrs=['one or more process id(s) must be specified'])
+
+    @no_debug_info_test
+    def test_status(self):
+        self.expect(
+            "platform status",
+            substrs=[
+                'Platform',
+                'Triple',
+                'OS Version',
+                'Kernel',
+                'Hostname'])
+
+    @expectedFailureAll(oslist=["windows"])
+    @no_debug_info_test
+    def test_shell(self):
+        """ Test that the platform shell command can invoke ls. """
+        triple = self.dbg.GetSelectedPlatform().GetTriple()
+        if re.match(".*-.*-windows", triple):
+            self.expect(
+                "platform shell dir c:\\", substrs=[
+                    "Windows", "Program Files"])
+        elif re.match(".*-.*-.*-android", triple):
+            self.expect(
+                "platform shell ls /",
+                substrs=[
+                    "cache",
+                    "dev",
+                    "system"])
+        else:
+            self.expect("platform shell ls /", substrs=["dev", "tmp", "usr"])
+
+    @no_debug_info_test
+    def test_shell_builtin(self):
+        """ Test a shell built-in command (echo) """
+        self.expect("platform shell echo hello lldb",
+                    substrs=["hello lldb"])
+
+    # FIXME: re-enable once platform shell -t can specify the desired timeout
+    @no_debug_info_test
+    def test_shell_timeout(self):
+        """ Test a shell built-in command (sleep) that times out """
+        self.skipTest("due to taking too long to complete.")
+        self.expect("platform shell sleep 15", error=True, substrs=[
+                    "error: timed out waiting for shell command to complete"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformPython.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformPython.py
new file mode 100644
index 0000000..ab10d30
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/basic/TestPlatformPython.py
@@ -0,0 +1,81 @@
+"""
+Test the lldb platform Python API.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class PlatformPythonTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(['pyapi'])
+    @no_debug_info_test
+    def test_platform_list(self):
+        """Test SBDebugger::GetNumPlatforms() & GetPlatformAtIndex() API"""
+        # Verify the host platform is present by default.
+        initial_num_platforms = self.dbg.GetNumPlatforms()
+        self.assertGreater(initial_num_platforms, 0)
+        host_platform = self.dbg.GetPlatformAtIndex(0)
+        self.assertTrue(host_platform.IsValid() and
+                        host_platform.GetName() == 'host',
+                        'The host platform is present')
+        # Select another platform and verify that the platform is added to
+        # the platform list.
+        platform_idx = self.dbg.GetNumAvailablePlatforms() - 1
+        if platform_idx < 1:
+            self.fail('No platforms other than host are available')
+        platform_data = self.dbg.GetAvailablePlatformInfoAtIndex(platform_idx)
+        platform_name = platform_data.GetValueForKey('name').GetStringValue(100)
+        self.assertNotEqual(platform_name, 'host')
+        self.dbg.SetCurrentPlatform(platform_name)
+        selected_platform = self.dbg.GetSelectedPlatform()
+        self.assertTrue(selected_platform.IsValid())
+        self.assertEqual(selected_platform.GetName(), platform_name)
+        self.assertEqual(self.dbg.GetNumPlatforms(), initial_num_platforms + 1)
+        platform_found = False
+        for platform_idx in range(self.dbg.GetNumPlatforms()):
+            platform = self.dbg.GetPlatformAtIndex(platform_idx)
+            if platform.GetName() == platform_name:
+                platform_found = True
+                break
+        self.assertTrue(platform_found)
+
+    @add_test_categories(['pyapi'])
+    @no_debug_info_test
+    def test_host_is_connected(self):
+        # We've already tested that this one IS the host platform.
+        host_platform = self.dbg.GetPlatformAtIndex(0)
+        self.assertTrue(host_platform.IsConnected(), "The host platform is always connected")
+
+
+    @add_test_categories(['pyapi'])
+    @no_debug_info_test
+    def test_available_platform_list(self):
+        """Test SBDebugger::GetNumAvailablePlatforms() and GetAvailablePlatformInfoAtIndex() API"""
+        num_platforms = self.dbg.GetNumAvailablePlatforms()
+        self.assertGreater(
+            num_platforms, 0,
+            'There should be at least one platform available')
+
+        for i in range(num_platforms):
+            platform_data = self.dbg.GetAvailablePlatformInfoAtIndex(i)
+            name_data = platform_data.GetValueForKey('name')
+            desc_data = platform_data.GetValueForKey('description')
+            self.assertTrue(
+                name_data and name_data.IsValid(),
+                'Platform has a name')
+            self.assertEqual(
+                name_data.GetType(), lldb.eStructuredDataTypeString,
+                'Platform name is a string')
+            self.assertTrue(
+                desc_data and desc_data.IsValid(),
+                'Platform has a description')
+            self.assertEqual(
+                desc_data.GetType(), lldb.eStructuredDataTypeString,
+                'Platform description is a string')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/process/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/process/Makefile
new file mode 100644
index 0000000..b560876
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/process/Makefile
@@ -0,0 +1,5 @@
+CXX_SOURCES := main.cpp
+
+EXE := TestProcess
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/process/TestProcessList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/process/TestProcessList.py
new file mode 100644
index 0000000..102d6f9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/process/TestProcessList.py
@@ -0,0 +1,32 @@
+"""
+Test process list.
+"""
+
+
+
+import os
+import lldb
+import shutil
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class ProcessListTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIfWindows # https://bugs.llvm.org/show_bug.cgi?id=43702
+    def test_process_list_with_args(self):
+        """Test process list show process args"""
+        self.build()
+        exe = self.getBuildArtifact("TestProcess")
+
+        # Spawn a new process
+        popen = self.spawnSubprocess(exe, args=["arg1", "--arg2", "arg3"])
+        self.addTearDownHook(self.cleanupSubprocesses)
+
+        self.expect("platform process list -v",
+                    substrs=["TestProcess arg1 --arg2 arg3", str(popen.pid)])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/process/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/process/main.cpp
new file mode 100644
index 0000000..da43e60
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/platform/process/main.cpp
@@ -0,0 +1,9 @@
+#include <stdio.h>
+
+#include <chrono>
+#include <thread>
+
+int main(int argc, char const *argv[]) {
+  std::this_thread::sleep_for(std::chrono::seconds(30));
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/Makefile
new file mode 100644
index 0000000..dc1d28d
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/Makefile
@@ -0,0 +1,5 @@
+CXX_SOURCES := main.cpp
+ENABLE_THREADS := YES
+EXE := AttachResume
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/TestAttachResume.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/TestAttachResume.py
new file mode 100644
index 0000000..b559f44
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/TestAttachResume.py
@@ -0,0 +1,93 @@
+"""
+Test process attach/resume.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+exe_name = "AttachResume"  # Must match Makefile
+
+
+class AttachResumeTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIfRemote
+    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr19310')
+    @expectedFailureNetBSD
+    @skipIfWindows # llvm.org/pr24778, llvm.org/pr21753
+    def test_attach_continue_interrupt_detach(self):
+        """Test attach/continue/interrupt/detach"""
+        self.build()
+        self.process_attach_continue_interrupt_detach()
+
+    def process_attach_continue_interrupt_detach(self):
+        """Test attach/continue/interrupt/detach"""
+
+        exe = self.getBuildArtifact(exe_name)
+
+        popen = self.spawnSubprocess(exe)
+        self.addTearDownHook(self.cleanupSubprocesses)
+
+        self.runCmd("process attach -p " + str(popen.pid))
+
+        self.setAsync(True)
+        listener = self.dbg.GetListener()
+        process = self.dbg.GetSelectedTarget().GetProcess()
+
+        self.runCmd("c")
+        lldbutil.expect_state_changes(
+            self, listener, process, [
+                lldb.eStateRunning])
+
+        self.runCmd("process interrupt")
+        lldbutil.expect_state_changes(
+            self, listener, process, [
+                lldb.eStateStopped])
+
+        # be sure to continue/interrupt/continue (r204504)
+        self.runCmd("c")
+        lldbutil.expect_state_changes(
+            self, listener, process, [
+                lldb.eStateRunning])
+
+        self.runCmd("process interrupt")
+        lldbutil.expect_state_changes(
+            self, listener, process, [
+                lldb.eStateStopped])
+
+        # Second interrupt should have no effect.
+        self.expect(
+            "process interrupt",
+            patterns=["Process is not running"],
+            error=True)
+
+        # check that this breakpoint is auto-cleared on detach (r204752)
+        self.runCmd("br set -f main.cpp -l %u" %
+                    (line_number('main.cpp', '// Set breakpoint here')))
+
+        self.runCmd("c")
+        lldbutil.expect_state_changes(
+            self, listener, process, [
+                lldb.eStateRunning, lldb.eStateStopped])
+        self.expect('br list', 'Breakpoint not hit',
+                    substrs=['hit count = 1'])
+
+        # Make sure the breakpoint is not hit again.
+        self.expect("expr debugger_flag = false", substrs=[" = false"])
+
+        self.runCmd("c")
+        lldbutil.expect_state_changes(
+            self, listener, process, [
+                lldb.eStateRunning])
+
+        # make sure to detach while in running state (r204759)
+        self.runCmd("detach")
+        lldbutil.expect_state_changes(
+            self, listener, process, [
+                lldb.eStateDetached])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach-resume/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/Makefile
new file mode 100644
index 0000000..8a52f8f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/Makefile
@@ -0,0 +1,5 @@
+CXX_SOURCES := main.cpp
+
+EXE := ProcessAttach
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/TestProcessAttach.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/TestProcessAttach.py
new file mode 100644
index 0000000..b85d571
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/TestProcessAttach.py
@@ -0,0 +1,90 @@
+"""
+Test process attach.
+"""
+
+
+
+import os
+import lldb
+import shutil
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+exe_name = "ProcessAttach"  # Must match Makefile
+
+
+class ProcessAttachTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIfiOSSimulator
+    @expectedFailureNetBSD
+    def test_attach_to_process_by_id(self):
+        """Test attach by process id"""
+        self.build()
+        exe = self.getBuildArtifact(exe_name)
+
+        # Spawn a new process
+        popen = self.spawnSubprocess(exe)
+        self.addTearDownHook(self.cleanupSubprocesses)
+
+        self.runCmd("process attach -p " + str(popen.pid))
+
+        target = self.dbg.GetSelectedTarget()
+
+        process = target.GetProcess()
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+    @expectedFailureNetBSD
+    def test_attach_to_process_from_different_dir_by_id(self):
+        """Test attach by process id"""
+        newdir = self.getBuildArtifact("newdir")
+        try:
+            os.mkdir(newdir)
+        except OSError as e:
+            if e.errno != os.errno.EEXIST:
+                raise
+        testdir = self.getBuildDir()
+        exe = os.path.join(newdir, 'proc_attach')
+        self.buildProgram('main.cpp', exe)
+        self.addTearDownHook(lambda: shutil.rmtree(newdir))
+
+        # Spawn a new process
+        popen = self.spawnSubprocess(exe)
+        self.addTearDownHook(self.cleanupSubprocesses)
+
+        os.chdir(newdir)
+        self.addTearDownHook(lambda: os.chdir(testdir))
+        self.runCmd("process attach -p " + str(popen.pid))
+
+        target = self.dbg.GetSelectedTarget()
+
+        process = target.GetProcess()
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+    @expectedFailureNetBSD
+    def test_attach_to_process_by_name(self):
+        """Test attach by process name"""
+        self.build()
+        exe = self.getBuildArtifact(exe_name)
+
+        # Spawn a new process
+        popen = self.spawnSubprocess(exe)
+        self.addTearDownHook(self.cleanupSubprocesses)
+
+        self.runCmd("process attach -n " + exe_name)
+
+        target = self.dbg.GetSelectedTarget()
+
+        process = target.GetProcess()
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+    def tearDown(self):
+        # Destroy process before TestBase.tearDown()
+        self.dbg.GetSelectedTarget().GetProcess().Destroy()
+
+        # Call super's tearDown().
+        TestBase.tearDown(self)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/Makefile
new file mode 100644
index 0000000..a694d36
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/Makefile
@@ -0,0 +1,12 @@
+CXX_SOURCES := main.cpp
+
+EXE := AttachDenied
+
+all: AttachDenied sign
+
+include Makefile.rules
+
+sign: entitlements.plist AttachDenied
+ifeq ($(OS),Darwin)
+	codesign -s - -f --entitlements $^
+endif
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/TestAttachDenied.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/TestAttachDenied.py
new file mode 100644
index 0000000..dcd73da
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/TestAttachDenied.py
@@ -0,0 +1,45 @@
+"""
+Test denied process attach.
+"""
+
+
+
+import time
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+exe_name = 'AttachDenied'  # Must match Makefile
+
+
+class AttachDeniedTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIfWindows
+    @skipIfiOSSimulator
+    @skipIfDarwinEmbedded  # ptrace(ATTACH_REQUEST...) won't work on ios/tvos/etc
+    def test_attach_to_process_by_id_denied(self):
+        """Test attach by process id denied"""
+        self.build()
+        exe = self.getBuildArtifact(exe_name)
+
+        # Use a file as a synchronization point between test and inferior.
+        pid_file_path = lldbutil.append_to_process_working_directory(self,
+            "pid_file_%d" % (int(time.time())))
+        self.addTearDownHook(
+            lambda: self.run_platform_command(
+                "rm %s" %
+                (pid_file_path)))
+
+        # Spawn a new process
+        popen = self.spawnSubprocess(exe, [pid_file_path])
+        self.addTearDownHook(self.cleanupSubprocesses)
+
+        pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
+
+        self.expect('process attach -p ' + pid,
+                    startstr='error: attach failed:',
+                    error=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/entitlements.plist
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/entitlements.plist
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/entitlements.plist
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/attach_denied/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/attach/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py
new file mode 100644
index 0000000..49bd0cf
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/TestLaunchWithShellExpand.py
@@ -0,0 +1,124 @@
+"""
+Test that argdumper is a viable launching strategy.
+"""
+import os
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class LaunchWithShellExpandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @expectedFailureAll(
+        oslist=[
+            "windows",
+            "linux",
+            "freebsd"],
+        bugnumber="llvm.org/pr24778 llvm.org/pr22627")
+    @skipIfDarwinEmbedded # iOS etc don't launch the binary via a shell, so arg expansion won't happen
+    @expectedFailureNetBSD
+    def test(self):
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+
+        self.runCmd("target create %s" % exe)
+
+        # Create the target
+        target = self.dbg.CreateTarget(exe)
+
+        # Create any breakpoints we need
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            'break here', lldb.SBFileSpec("main.cpp", False))
+        self.assertTrue(breakpoint, VALID_BREAKPOINT)
+
+        # Ensure we do the expansion with /bin/sh on POSIX.
+        os.environ["SHELL"] = '/bin/sh'
+
+        self.runCmd(
+            "process launch -X true -w %s -- fi*.tx? () > <" %
+            (self.getSourceDir()))
+
+        process = self.process()
+
+        self.assertTrue(process.GetState() == lldb.eStateStopped,
+                        STOPPED_DUE_TO_BREAKPOINT)
+
+        thread = process.GetThreadAtIndex(0)
+
+        self.assertTrue(thread.IsValid(),
+                        "Process stopped at 'main' should have a valid thread")
+
+        stop_reason = thread.GetStopReason()
+
+        self.assertTrue(
+            stop_reason == lldb.eStopReasonBreakpoint,
+            "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint")
+
+        self.expect("frame variable argv[1]", substrs=['file1.txt'])
+        self.expect("frame variable argv[2]", substrs=['file2.txt'])
+        self.expect("frame variable argv[3]", substrs=['file3.txt'])
+        self.expect("frame variable argv[4]", substrs=['file4.txy'])
+        self.expect("frame variable argv[5]", substrs=['()'])
+        self.expect("frame variable argv[6]", substrs=['>'])
+        self.expect("frame variable argv[7]", substrs=['<'])
+        self.expect(
+            "frame variable argv[5]",
+            substrs=['file5.tyx'],
+            matching=False)
+        self.expect(
+            "frame variable argv[8]",
+            substrs=['file5.tyx'],
+            matching=False)
+
+        self.runCmd("process kill")
+
+        self.runCmd(
+            'process launch -X true -w %s -- "foo bar"' %
+            (self.getSourceDir()))
+
+        process = self.process()
+
+        self.assertTrue(process.GetState() == lldb.eStateStopped,
+                        STOPPED_DUE_TO_BREAKPOINT)
+
+        thread = process.GetThreadAtIndex(0)
+
+        self.assertTrue(thread.IsValid(),
+                        "Process stopped at 'main' should have a valid thread")
+
+        stop_reason = thread.GetStopReason()
+
+        self.assertTrue(
+            stop_reason == lldb.eStopReasonBreakpoint,
+            "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint")
+
+        self.expect("frame variable argv[1]", substrs=['foo bar'])
+
+        self.runCmd("process kill")
+
+        self.runCmd('process launch -X true -w %s -- foo\ bar'
+                    % (self.getBuildDir()))
+
+        process = self.process()
+
+        self.assertTrue(process.GetState() == lldb.eStateStopped,
+                        STOPPED_DUE_TO_BREAKPOINT)
+
+        thread = process.GetThreadAtIndex(0)
+
+        self.assertTrue(thread.IsValid(),
+                        "Process stopped at 'main' should have a valid thread")
+
+        stop_reason = thread.GetStopReason()
+
+        self.assertTrue(
+            stop_reason == lldb.eStopReasonBreakpoint,
+            "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint")
+
+        self.expect("frame variable argv[1]", substrs=['foo bar'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file1.txt b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file1.txt
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file1.txt
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file1.txt
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file2.txt b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file2.txt
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file2.txt
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file2.txt
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file3.txt b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file3.txt
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file3.txt
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file3.txt
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file4.txy b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file4.txy
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file4.txy
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file4.txy
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file5.tyx b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file5.tyx
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/file5.tyx
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/file5.tyx
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/foo bar b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/foo bar
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/foo bar
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/foo bar
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch-with-shellexpand/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/Makefile
new file mode 100644
index 0000000..eff7727
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/Makefile
@@ -0,0 +1,5 @@
+CXX_SOURCES := main.cpp
+#CXX_SOURCES := print-cwd.cpp
+
+include Makefile.rules
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/TestProcessLaunch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/TestProcessLaunch.py
new file mode 100644
index 0000000..a2b27c2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/TestProcessLaunch.py
@@ -0,0 +1,205 @@
+"""
+Test lldb process launch flags.
+"""
+
+from __future__ import print_function
+
+import os
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+import six
+
+
+class ProcessLaunchTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        self.runCmd("settings set auto-confirm true")
+
+    def tearDown(self):
+        self.runCmd("settings clear auto-confirm")
+        TestBase.tearDown(self)
+
+    @not_remote_testsuite_ready
+    def test_io(self):
+        """Test that process launch I/O redirection flags work properly."""
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.expect("file " + exe,
+                    patterns=["Current executable set to .*a.out"])
+
+        in_file = os.path.join(self.getSourceDir(), "input-file.txt")
+        out_file = lldbutil.append_to_process_working_directory(self, "output-test.out")
+        err_file = lldbutil.append_to_process_working_directory(self, "output-test.err")
+
+        # Make sure the output files do not exist before launching the process
+        try:
+            os.remove(out_file)
+        except OSError:
+            pass
+
+        try:
+            os.remove(err_file)
+        except OSError:
+            pass
+
+        launch_command = "process launch -i '{0}' -o '{1}' -e '{2}' -w '{3}'".format(
+                in_file, out_file, err_file, self.get_process_working_directory())
+
+        if lldb.remote_platform:
+            self.runCmd('platform put-file "{local}" "{remote}"'.format(
+                local=in_file, remote=in_file))
+
+        self.expect(launch_command,
+                    patterns=["Process .* launched: .*a.out"])
+
+        success = True
+        err_msg = ""
+
+        out = lldbutil.read_file_on_target(self, out_file)
+        if out != "This should go to stdout.\n":
+            success = False
+            err_msg = err_msg + "    ERROR: stdout file does not contain correct output.\n"
+
+
+        err = lldbutil.read_file_on_target(self, err_file)
+        if err != "This should go to stderr.\n":
+            success = False
+            err_msg = err_msg + "    ERROR: stderr file does not contain correct output.\n"
+
+        if not success:
+            self.fail(err_msg)
+
+    # rdar://problem/9056462
+    # The process launch flag '-w' for setting the current working directory
+    # not working?
+    @not_remote_testsuite_ready
+    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20265")
+    @expectedFailureNetBSD
+    def test_set_working_dir_nonexisting(self):
+        """Test that '-w dir' fails to set the working dir when running the inferior with a dir which doesn't exist."""
+        d = {'CXX_SOURCES': 'print_cwd.cpp'}
+        self.build(dictionary=d)
+        self.setTearDownCleanup(d)
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe)
+
+        mywd = 'my_working_dir'
+        out_file_name = "my_working_dir_test.out"
+        err_file_name = "my_working_dir_test.err"
+
+        my_working_dir_path = self.getBuildArtifact(mywd)
+        out_file_path = os.path.join(my_working_dir_path, out_file_name)
+        err_file_path = os.path.join(my_working_dir_path, err_file_name)
+
+        # Check that we get an error when we have a nonexisting path
+        invalid_dir_path = mywd + 'z'
+        launch_command = "process launch -w %s -o %s -e %s" % (
+            invalid_dir_path, out_file_path, err_file_path)
+
+        self.expect(
+            launch_command, error=True, patterns=[
+                "error:.* No such file or directory: %s" %
+                invalid_dir_path])
+
+    @not_remote_testsuite_ready
+    def test_set_working_dir_existing(self):
+        """Test that '-w dir' sets the working dir when running the inferior."""
+        d = {'CXX_SOURCES': 'print_cwd.cpp'}
+        self.build(dictionary=d)
+        self.setTearDownCleanup(d)
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe)
+
+        mywd = 'my_working_dir'
+        out_file_name = "my_working_dir_test.out"
+        err_file_name = "my_working_dir_test.err"
+
+        my_working_dir_path = self.getBuildArtifact(mywd)
+        lldbutil.mkdir_p(my_working_dir_path)
+        out_file_path = os.path.join(my_working_dir_path, out_file_name)
+        err_file_path = os.path.join(my_working_dir_path, err_file_name)
+
+        # Make sure the output files do not exist before launching the process
+        try:
+            os.remove(out_file_path)
+            os.remove(err_file_path)
+        except OSError:
+            pass
+
+        launch_command = "process launch -w %s -o %s -e %s" % (
+            my_working_dir_path, out_file_path, err_file_path)
+
+        self.expect(launch_command,
+                    patterns=["Process .* launched: .*a.out"])
+
+        success = True
+        err_msg = ""
+
+        # Check to see if the 'stdout' file was created
+        try:
+            out_f = open(out_file_path)
+        except IOError:
+            success = False
+            err_msg = err_msg + "ERROR: stdout file was not created.\n"
+        else:
+            # Check to see if the 'stdout' file contains the right output
+            line = out_f.readline()
+            if self.TraceOn():
+                print("line:", line)
+            if not re.search(mywd, line):
+                success = False
+                err_msg = err_msg + "The current working directory was not set correctly.\n"
+                out_f.close()
+
+        # Try to delete the 'stdout' and 'stderr' files
+        try:
+            os.remove(out_file_path)
+            os.remove(err_file_path)
+        except OSError:
+            pass
+
+        if not success:
+            self.fail(err_msg)
+
+    def test_environment_with_special_char(self):
+        """Test that environment variables containing '*' and '}' are handled correctly by the inferior."""
+        source = 'print_env.cpp'
+        d = {'CXX_SOURCES': source}
+        self.build(dictionary=d)
+        self.setTearDownCleanup(d)
+        exe = self.getBuildArtifact("a.out")
+
+        evil_var = 'INIT*MIDDLE}TAIL'
+
+        target = self.dbg.CreateTarget(exe)
+        main_source_spec = lldb.SBFileSpec(source)
+        breakpoint = target.BreakpointCreateBySourceRegex(
+            '// Set breakpoint here.', main_source_spec)
+
+        process = target.LaunchSimple(None,
+                                      ['EVIL=' + evil_var],
+                                      self.get_process_working_directory())
+        self.assertEqual(
+            process.GetState(),
+            lldb.eStateStopped,
+            PROCESS_STOPPED)
+
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, breakpoint)
+        self.assertEqual(len(threads), 1)
+        frame = threads[0].GetFrameAtIndex(0)
+        sbvalue = frame.EvaluateExpression("evil")
+        value = sbvalue.GetSummary().strip('"')
+
+        self.assertEqual(value, evil_var)
+        process.Continue()
+        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/input-file.txt b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/input-file.txt
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/input-file.txt
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/input-file.txt
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/print_cwd.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_cwd.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/print_cwd.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_cwd.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/print_env.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_env.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/print_env.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/process/launch/print_env.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/quit/TestQuit.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/quit/TestQuit.py
new file mode 100644
index 0000000..d4dbd16
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/quit/TestQuit.py
@@ -0,0 +1,31 @@
+"""
+Test lldb's quit command.
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class QuitCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_quit_exit_code_disallow(self):
+        self.ci.AllowExitCodeOnQuit(False)
+        self.expect(
+            "quit 20",
+            substrs=[
+                "error: The current driver doesn't allow custom exit codes for the quit command"],
+            error=True)
+        self.assertFalse(self.ci.HasCustomQuitExitCode())
+
+    @no_debug_info_test
+    def test_quit_exit_code_allow(self):
+        self.ci.AllowExitCodeOnQuit(True)
+        self.runCmd("quit 10", check=False)
+        self.assertTrue(self.ci.HasCustomQuitExitCode())
+        self.assertEqual(self.ci.GetQuitStatus(), 10)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile
new file mode 100644
index 0000000..5cc7382
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/Makefile
@@ -0,0 +1,5 @@
+CXX_SOURCES := main.cpp
+
+CFLAGS_EXTRAS := -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/TestMPXRegisters.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/TestMPXRegisters.py
new file mode 100644
index 0000000..5644855
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/TestMPXRegisters.py
@@ -0,0 +1,61 @@
+"""
+Test the Intel(R) MPX registers.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class RegisterCommandsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipIf(compiler="clang")
+    @skipIf(oslist=no_match(['linux']))
+    @skipIf(archs=no_match(['i386', 'x86_64']))
+    @skipIf(oslist=["linux"], compiler="gcc", compiler_version=["<", "5"]) #GCC version >= 5 supports Intel(R) MPX.
+    def test_mpx_registers_with_example_code(self):
+        """Test Intel(R) MPX registers with example code."""
+        self.build()
+        self.mpx_registers_with_example_code()
+
+    def mpx_registers_with_example_code(self):
+        """Test Intel(R) MPX registers after running example code."""
+        self.line = line_number('main.cpp', '// Set a break point here.')
+
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line, num_expected_locations=1)
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        target = self.dbg.GetSelectedTarget()
+        process = target.GetProcess()
+
+        if (process.GetState() == lldb.eStateExited):
+            self.skipTest("Intel(R) MPX is not supported.")
+        else:
+            self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
+                        substrs = ["stop reason = breakpoint 1."])
+
+        if self.getArchitecture() == 'x86_64':
+            self.expect("register read -s 3",
+                        substrs = ['bnd0 = {0x0000000000000010 0xffffffffffffffe6}',
+                                   'bnd1 = {0x0000000000000020 0xffffffffffffffd6}',
+                                   'bnd2 = {0x0000000000000030 0xffffffffffffffc6}',
+                                   'bnd3 = {0x0000000000000040 0xffffffffffffffb6}',
+                                   'bndcfgu = {0x01 0x80 0xb5 0x76 0xff 0x7f 0x00 0x00}',
+                                   'bndstatus = {0x02 0x80 0xb5 0x76 0xff 0x7f 0x00 0x00}'])
+        if self.getArchitecture() == 'i386':
+            self.expect("register read -s 3",
+                        substrs = ['bnd0 = {0x0000000000000010 0x00000000ffffffe6}',
+                                   'bnd1 = {0x0000000000000020 0x00000000ffffffd6}',
+                                   'bnd2 = {0x0000000000000030 0x00000000ffffffc6}',
+                                   'bnd3 = {0x0000000000000040 0x00000000ffffffb6}',
+                                   'bndcfgu = {0x01 0xd0 0x7d 0xf7 0x00 0x00 0x00 0x00}',
+                                   'bndstatus = {0x02 0xd0 0x7d 0xf7 0x00 0x00 0x00 0x00}'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile
new file mode 100644
index 0000000..5cc7382
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/Makefile
@@ -0,0 +1,5 @@
+CXX_SOURCES := main.cpp
+
+CFLAGS_EXTRAS := -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py
new file mode 100644
index 0000000..9a812a1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py
@@ -0,0 +1,52 @@
+"""
+Test the Intel(R) MPX bound violation signal.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class RegisterCommandsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipIf(compiler="clang")
+    @skipIf(oslist=no_match(['linux']))
+    @skipIf(archs=no_match(['i386', 'x86_64']))
+    @skipIf(oslist=["linux"], compiler="gcc", compiler_version=["<", "5"]) #GCC version >= 5 supports Intel(R) MPX.
+    def test_mpx_boundary_violation(self):
+        """Test Intel(R) MPX bound violation signal."""
+        self.build()
+        self.mpx_boundary_violation()
+
+    def mpx_boundary_violation(self):
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        target = self.dbg.GetSelectedTarget()
+        process = target.GetProcess()
+
+        if (process.GetState() == lldb.eStateExited):
+            self.skipTest("Intel(R) MPX is not supported.")
+
+        if (process.GetState() == lldb.eStateStopped):
+            self.expect("thread backtrace", STOPPED_DUE_TO_SIGNAL,
+                        substrs = ['stop reason = signal SIGSEGV: upper bound violation',
+                                   'fault address:', 'lower bound:', 'upper bound:'])
+
+        self.runCmd("continue")
+
+        if (process.GetState() == lldb.eStateStopped):
+            self.expect("thread backtrace", STOPPED_DUE_TO_SIGNAL,
+                        substrs = ['stop reason = signal SIGSEGV: lower bound violation',
+                                   'fault address:', 'lower bound:', 'upper bound:'])
+
+        self.runCmd("continue")
+        self.assertTrue(process.GetState() == lldb.eStateExited,
+                        PROCESS_EXITED)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_bound_violation/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/TestMPXOffsetIntersection.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/TestMPXOffsetIntersection.py
new file mode 100644
index 0000000..109e8e9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/TestMPXOffsetIntersection.py
@@ -0,0 +1,69 @@
+"""
+Test Intel(R) MPX registers do not get overwritten by AVX data.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class MPXOffsetIntersectionTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    AVX_REGS = ('ymm' + str(i) for i in range(16))
+    YMM_VALUE = '{' + ' '.join(('0x00' for _ in range(32))) + '}'
+
+    MPX_REGULAR_REGS = ('bnd0', 'bnd1', 'bnd2', 'bnd3')
+    MPX_CONFIG_REGS = ('bndcfgu', 'bndstatus')
+    BND_VALUE = '{' + ' '.join(('0xff' for _ in range(16))) + '}'
+
+    @skipIf(oslist=no_match(['linux']))
+    @skipIf(archs=no_match(['x86_64']))
+    def test_mpx_registers_offset_intersection(self):
+        """Test if AVX data does not overwrite MPX values."""
+        self.build()
+        self.mpx_registers_offset_intersection()
+
+    def mpx_registers_offset_intersection(self):
+        exe = self.getBuildArtifact('a.out')
+        self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
+        self.runCmd('run', RUN_SUCCEEDED)
+        target = self.dbg.GetSelectedTarget()
+        process = target.GetProcess()
+        thread = process.GetThreadAtIndex(0)
+        currentFrame = thread.GetFrameAtIndex(0)
+
+        has_avx = False
+        has_mpx = False
+        for registerSet in currentFrame.GetRegisters():
+            if 'advanced vector extensions' in registerSet.GetName().lower():
+                has_avx = True
+            if 'memory protection extension' in registerSet.GetName().lower():
+                has_mpx = True
+        if not (has_avx and has_mpx):
+            self.skipTest('Both AVX and MPX registers must be supported.')
+
+        for reg in self.AVX_REGS:
+            self.runCmd('register write ' + reg + " '" + self.YMM_VALUE + " '")
+        for reg in self.MPX_REGULAR_REGS + self.MPX_CONFIG_REGS:
+            self.runCmd('register write ' + reg + " '" + self.BND_VALUE + " '")
+
+        self.verify_mpx()
+        self.verify_avx()
+        self.verify_mpx()
+
+    def verify_mpx(self):
+        for reg in self.MPX_REGULAR_REGS:
+            self.expect('register read ' + reg,
+                        substrs = [reg + ' = {0xffffffffffffffff 0xffffffffffffffff}'])
+        for reg in self.MPX_CONFIG_REGS:
+            self.expect('register read ' + reg,
+                        substrs = [reg + ' = {0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff}'])
+
+    def verify_avx(self):
+        for reg in self.AVX_REGS:
+            self.expect('register read ' + reg, substrs = [reg + ' = ' + self.YMM_VALUE])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/main.cpp
new file mode 100644
index 0000000..0285cfd
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/intel_xtended_registers/mpx_offset_intersection/main.cpp
@@ -0,0 +1,6 @@
+#include <cstdint>
+
+int main() {
+  asm volatile("int3");
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/Makefile
new file mode 100644
index 0000000..d2bc2ba
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp a.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/TestRegisters.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/TestRegisters.py
new file mode 100644
index 0000000..01d2367
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/TestRegisters.py
@@ -0,0 +1,502 @@
+"""
+Test the 'register' command.
+"""
+
+from __future__ import print_function
+
+
+import os
+import sys
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class RegisterCommandsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        TestBase.setUp(self)
+        self.has_teardown = False
+
+    def tearDown(self):
+        self.dbg.GetSelectedTarget().GetProcess().Destroy()
+        TestBase.tearDown(self)
+
+    @skipIfiOSSimulator
+    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
+    @expectedFailureNetBSD
+    def test_register_commands(self):
+        """Test commands related to registers, in particular vector registers."""
+        self.build()
+        self.common_setup()
+
+        # verify that logging does not assert
+        self.log_enable("registers")
+
+        self.expect("register read -a", MISSING_EXPECTED_REGISTERS,
+                    substrs=['registers were unavailable'], matching=False)
+
+        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
+            self.runCmd("register read xmm0")
+            self.runCmd("register read ymm15")  # may be available
+            self.runCmd("register read bnd0")  # may be available
+        elif self.getArchitecture() in ['arm', 'armv7', 'armv7k', 'arm64', 'arm64e', 'arm64_32']:
+            self.runCmd("register read s0")
+            self.runCmd("register read q15")  # may be available
+
+        self.expect(
+            "register read -s 4",
+            substrs=['invalid register set index: 4'],
+            error=True)
+
+    @skipIfiOSSimulator
+    # Writing of mxcsr register fails, presumably due to a kernel/hardware
+    # problem
+    @skipIfTargetAndroid(archs=["i386"])
+    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37995")
+    def test_fp_register_write(self):
+        """Test commands that write to registers, in particular floating-point registers."""
+        self.build()
+        self.fp_register_write()
+
+    @skipIfiOSSimulator
+    # "register read fstat" always return 0xffff
+    @expectedFailureAndroid(archs=["i386"])
+    @skipIfFreeBSD  # llvm.org/pr25057
+    @skipIf(archs=no_match(['amd64', 'i386', 'x86_64']))
+    @skipIfOutOfTreeDebugserver
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37995")
+    @expectedFailureNetBSD
+    def test_fp_special_purpose_register_read(self):
+        """Test commands that read fpu special purpose registers."""
+        self.build()
+        self.fp_special_purpose_register_read()
+
+    @skipIfiOSSimulator
+    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
+    def test_register_expressions(self):
+        """Test expression evaluation with commands related to registers."""
+        self.build()
+        self.common_setup()
+
+        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
+            gpr = "eax"
+            vector = "xmm0"
+        elif self.getArchitecture() in ['arm64', 'aarch64', 'arm64e', 'arm64_32']:
+            gpr = "w0"
+            vector = "v0"
+        elif self.getArchitecture() in ['arm', 'armv7', 'armv7k']:
+            gpr = "r0"
+            vector = "q0"
+
+        self.expect("expr/x $%s" % gpr, substrs=['unsigned int', ' = 0x'])
+        self.expect("expr $%s" % vector, substrs=['vector_type'])
+        self.expect(
+            "expr (unsigned int)$%s[0]" %
+            vector, substrs=['unsigned int'])
+
+        if self.getArchitecture() in ['amd64', 'x86_64']:
+            self.expect(
+                "expr -- ($rax & 0xffffffff) == $eax",
+                substrs=['true'])
+
+    @skipIfiOSSimulator
+    @skipIf(archs=no_match(['amd64', 'x86_64']))
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
+    def test_convenience_registers(self):
+        """Test convenience registers."""
+        self.build()
+        self.convenience_registers()
+
+    @skipIfiOSSimulator
+    @skipIf(archs=no_match(['amd64', 'x86_64']))
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
+    @expectedFailureNetBSD
+    def test_convenience_registers_with_process_attach(self):
+        """Test convenience registers after a 'process attach'."""
+        self.build()
+        self.convenience_registers_with_process_attach(test_16bit_regs=False)
+
+    @skipIfiOSSimulator
+    @skipIf(archs=no_match(['amd64', 'x86_64']))
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
+    @expectedFailureNetBSD
+    def test_convenience_registers_16bit_with_process_attach(self):
+        """Test convenience registers after a 'process attach'."""
+        self.build()
+        self.convenience_registers_with_process_attach(test_16bit_regs=True)
+
+    def common_setup(self):
+        exe = self.getBuildArtifact("a.out")
+
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Break in main().
+        lldbutil.run_break_set_by_symbol(
+            self, "main", num_expected_locations=-1)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped', 'stop reason = breakpoint'])
+
+    # platform specific logging of the specified category
+    def log_enable(self, category):
+        # This intentionally checks the host platform rather than the target
+        # platform as logging is host side.
+        self.platform = ""
+        if (sys.platform.startswith("freebsd") or
+                sys.platform.startswith("linux") or
+                sys.platform.startswith("netbsd")):
+            self.platform = "posix"
+
+        if self.platform != "":
+            self.log_file = self.getBuildArtifact('TestRegisters.log')
+            self.runCmd(
+                "log enable " +
+                self.platform +
+                " " +
+                str(category) +
+                " registers -v -f " +
+                self.log_file,
+                RUN_SUCCEEDED)
+            if not self.has_teardown:
+                def remove_log(self):
+                    if os.path.exists(self.log_file):
+                        os.remove(self.log_file)
+                self.has_teardown = True
+                self.addTearDownHook(remove_log)
+
+    def write_and_read(self, frame, register, new_value, must_exist=True):
+        value = frame.FindValue(register, lldb.eValueTypeRegister)
+        if must_exist:
+            self.assertTrue(
+                value.IsValid(),
+                "finding a value for register " +
+                register)
+        elif not value.IsValid():
+            return  # If register doesn't exist, skip this test
+
+        # Also test the 're' alias.
+        self.runCmd("re write " + register + " \'" + new_value + "\'")
+        self.expect(
+            "register read " +
+            register,
+            substrs=[
+                register +
+                ' = ',
+                new_value])
+
+    def fp_special_purpose_register_read(self):
+        exe = self.getBuildArtifact("a.out")
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Launch the process and stop.
+        self.expect("run", PROCESS_STOPPED, substrs=['stopped'])
+
+        # Check stop reason; Should be either signal SIGTRAP or EXC_BREAKPOINT
+        output = self.res.GetOutput()
+        matched = False
+        substrs = [
+            'stop reason = EXC_BREAKPOINT',
+            'stop reason = signal SIGTRAP']
+        for str1 in substrs:
+            matched = output.find(str1) != -1
+            with recording(self, False) as sbuf:
+                print("%s sub string: %s" % ('Expecting', str1), file=sbuf)
+                print("Matched" if matched else "Not Matched", file=sbuf)
+            if matched:
+                break
+        self.assertTrue(matched, STOPPED_DUE_TO_SIGNAL)
+
+        process = target.GetProcess()
+        self.assertTrue(process.GetState() == lldb.eStateStopped,
+                        PROCESS_STOPPED)
+
+        thread = process.GetThreadAtIndex(0)
+        self.assertTrue(thread.IsValid(), "current thread is valid")
+
+        currentFrame = thread.GetFrameAtIndex(0)
+        self.assertTrue(currentFrame.IsValid(), "current frame is valid")
+
+        # Extract the value of fstat and ftag flag at the point just before
+        # we start pushing floating point values on st% register stack
+        value = currentFrame.FindValue("fstat", lldb.eValueTypeRegister)
+        error = lldb.SBError()
+        reg_value_fstat_initial = value.GetValueAsUnsigned(error, 0)
+
+        self.assertTrue(error.Success(), "reading a value for fstat")
+        value = currentFrame.FindValue("ftag", lldb.eValueTypeRegister)
+        error = lldb.SBError()
+        reg_value_ftag_initial = value.GetValueAsUnsigned(error, 0)
+
+        self.assertTrue(error.Success(), "reading a value for ftag")
+        fstat_top_pointer_initial = (reg_value_fstat_initial & 0x3800) >> 11
+
+        # Execute 'si' aka 'thread step-inst' instruction 5 times and with
+        # every execution verify the value of fstat and ftag registers
+        for x in range(0, 5):
+            # step into the next instruction to push a value on 'st' register
+            # stack
+            self.runCmd("si", RUN_SUCCEEDED)
+
+            # Verify fstat and save it to be used for verification in next
+            # execution of 'si' command
+            if not (reg_value_fstat_initial & 0x3800):
+                self.expect("register read fstat", substrs=[
+                            'fstat' + ' = ', str("0x%0.4x" % ((reg_value_fstat_initial & ~(0x3800)) | 0x3800))])
+                reg_value_fstat_initial = (
+                    (reg_value_fstat_initial & ~(0x3800)) | 0x3800)
+                fstat_top_pointer_initial = 7
+            else:
+                self.expect("register read fstat", substrs=[
+                            'fstat' + ' = ', str("0x%0.4x" % (reg_value_fstat_initial - 0x0800))])
+                reg_value_fstat_initial = (reg_value_fstat_initial - 0x0800)
+                fstat_top_pointer_initial -= 1
+
+            # Verify ftag and save it to be used for verification in next
+            # execution of 'si' command
+            self.expect(
+                "register read ftag", substrs=[
+                    'ftag' + ' = ', str(
+                        "0x%0.4x" %
+                        (reg_value_ftag_initial | (
+                            1 << fstat_top_pointer_initial)))])
+            reg_value_ftag_initial = reg_value_ftag_initial | (
+                1 << fstat_top_pointer_initial)
+
+    def fp_register_write(self):
+        exe = self.getBuildArtifact("a.out")
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Launch the process, stop at the entry point.
+        error = lldb.SBError()
+        process = target.Launch(
+                lldb.SBListener(),
+                None, None, # argv, envp
+                None, None, None, # stdin/out/err
+                self.get_process_working_directory(),
+                0, # launch flags
+                True, # stop at entry
+                error)
+        self.assertTrue(error.Success(), "Launch succeeds. Error is :" + str(error))
+
+        self.assertTrue(
+            process.GetState() == lldb.eStateStopped,
+            PROCESS_STOPPED)
+
+        thread = process.GetThreadAtIndex(0)
+        self.assertTrue(thread.IsValid(), "current thread is valid")
+
+        currentFrame = thread.GetFrameAtIndex(0)
+        self.assertTrue(currentFrame.IsValid(), "current frame is valid")
+
+        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
+            reg_list = [
+                # reg          value        must-have
+                ("fcw", "0x0000ff0e", False),
+                ("fsw", "0x0000ff0e", False),
+                ("ftw", "0x0000ff0e", False),
+                ("ip", "0x0000ff0e", False),
+                ("dp", "0x0000ff0e", False),
+                ("mxcsr", "0x0000ff0e", False),
+                ("mxcsrmask", "0x0000ff0e", False),
+            ]
+
+            st0regname = None
+            if currentFrame.FindRegister("st0").IsValid():
+                st0regname = "st0"
+            elif currentFrame.FindRegister("stmm0").IsValid():
+                st0regname = "stmm0"
+            if st0regname is not None:
+                # reg          value
+                # must-have
+                reg_list.append(
+                    (st0regname, "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00}", True))
+                reg_list.append(
+                    ("xmm0",
+                     "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}",
+                     True))
+                reg_list.append(
+                    ("xmm15",
+                     "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
+                     False))
+        elif self.getArchitecture() in ['arm64', 'aarch64', 'arm64e', 'arm64_32']:
+            reg_list = [
+                # reg      value
+                # must-have
+                ("fpsr", "0xfbf79f9f", True),
+                ("s0", "1.25", True),
+                ("s31", "0.75", True),
+                ("d1", "123", True),
+                ("d17", "987", False),
+                ("v1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
+                ("v14",
+                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
+                 False),
+            ]
+        elif self.getArchitecture() in ['armv7'] and self.platformIsDarwin():
+            reg_list = [
+                # reg      value
+                # must-have
+                ("fpsr", "0xfbf79f9f", True),
+                ("s0", "1.25", True),
+                ("s31", "0.75", True),
+                ("d1", "123", True),
+                ("d17", "987", False),
+                ("q1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
+                ("q14",
+                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
+                 False),
+            ]
+        elif self.getArchitecture() in ['arm', 'armv7k']:
+            reg_list = [
+                # reg      value
+                # must-have
+                ("fpscr", "0xfbf79f9f", True),
+                ("s0", "1.25", True),
+                ("s31", "0.75", True),
+                ("d1", "123", True),
+                ("d17", "987", False),
+                ("q1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
+                ("q14",
+                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
+                 False),
+            ]
+
+        for (reg, val, must) in reg_list:
+            self.write_and_read(currentFrame, reg, val, must)
+
+        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
+            if st0regname is None:
+                self.fail("st0regname could not be determined")
+            self.runCmd(
+                "register write " +
+                st0regname +
+                " \"{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}\"")
+            self.expect(
+                "register read " +
+                st0regname +
+                " --format f",
+                substrs=[
+                    st0regname +
+                    ' = 0'])
+
+            has_avx = False
+            has_mpx = False
+            # Returns an SBValueList.
+            registerSets = currentFrame.GetRegisters()
+            for registerSet in registerSets:
+                if 'advanced vector extensions' in registerSet.GetName().lower():
+                    has_avx = True
+                if 'memory protection extension' in registerSet.GetName().lower():
+                    has_mpx = True
+
+            if has_avx:
+                new_value = "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0c 0x0d 0x0e 0x0f}"
+                self.write_and_read(currentFrame, "ymm0", new_value)
+                self.write_and_read(currentFrame, "ymm7", new_value)
+                self.expect("expr $ymm0", substrs=['vector_type'])
+            else:
+                self.runCmd("register read ymm0")
+
+            if has_mpx:
+                # Test write and read for bnd0.
+                new_value_w = "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}"
+                self.runCmd("register write bnd0 \'" + new_value_w + "\'")
+                new_value_r = "{0x0807060504030201 0x100f0e0d0c0b0a09}"
+                self.expect("register read bnd0", substrs = ['bnd0 = ', new_value_r])
+                self.expect("expr $bnd0", substrs = ['vector_type'])
+
+                # Test write and for bndstatus.
+                new_value = "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08}"
+                self.write_and_read(currentFrame, "bndstatus", new_value)
+                self.expect("expr $bndstatus", substrs = ['vector_type'])
+            else:
+                self.runCmd("register read bnd0")
+
+    def convenience_registers(self):
+        """Test convenience registers."""
+        self.common_setup()
+
+        # The command "register read -a" does output a derived register like
+        # eax...
+        self.expect("register read -a", matching=True,
+                    substrs=['eax'])
+
+        # ...however, the vanilla "register read" command should not output derived registers like eax.
+        self.expect("register read", matching=False,
+                    substrs=['eax'])
+
+        # Test reading of rax and eax.
+        self.expect("register read rax eax",
+                    substrs=['rax = 0x', 'eax = 0x'])
+
+        # Now write rax with a unique bit pattern and test that eax indeed
+        # represents the lower half of rax.
+        self.runCmd("register write rax 0x1234567887654321")
+        self.expect("register read rax 0x1234567887654321",
+                    substrs=['0x1234567887654321'])
+
+    def convenience_registers_with_process_attach(self, test_16bit_regs):
+        """Test convenience registers after a 'process attach'."""
+        exe = self.getBuildArtifact("a.out")
+
+        # Spawn a new process
+        pid = self.spawnSubprocess(exe, ['wait_for_attach']).pid
+        self.addTearDownHook(self.cleanupSubprocesses)
+
+        if self.TraceOn():
+            print("pid of spawned process: %d" % pid)
+
+        self.runCmd("process attach -p %d" % pid)
+
+        # Check that "register read eax" works.
+        self.runCmd("register read eax")
+
+        if self.getArchitecture() in ['amd64', 'x86_64']:
+            self.expect("expr -- ($rax & 0xffffffff) == $eax",
+                        substrs=['true'])
+
+        if test_16bit_regs:
+            self.expect("expr -- $ax == (($ah << 8) | $al)",
+                        substrs=['true'])
+
+    @skipIfiOSSimulator
+    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
+    def test_invalid_invocation(self):
+        self.build()
+        self.common_setup()
+
+        self.expect("register read -a arg", error=True,
+                    substrs=["the --all option can't be used when registers names are supplied as arguments"])
+
+        self.expect("register read --set 0 r", error=True,
+                    substrs=["the --set <set> option can't be used when registers names are supplied as arguments"])
+
+        self.expect("register write a", error=True,
+                    substrs=["register write takes exactly 2 arguments: <reg-name> <value>"])
+        self.expect("register write a b c", error=True,
+                    substrs=["register write takes exactly 2 arguments: <reg-name> <value>"])
+
+    @skipIfiOSSimulator
+    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
+    def test_write_unknown_register(self):
+        self.build()
+        self.common_setup()
+
+        self.expect("register write blub 1", error=True,
+                    substrs=["error: Register not found for 'blub'."])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/a.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/a.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/a.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/a.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/register/register/register_command/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/reproducer/invalid-args/TestInvalidArgsReproducer.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/reproducer/invalid-args/TestInvalidArgsReproducer.py
new file mode 100644
index 0000000..74db2fc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/reproducer/invalid-args/TestInvalidArgsReproducer.py
@@ -0,0 +1,17 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+class ReproducerTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_reproducer_generate_invalid_invocation(self):
+        self.expect("reproducer generate f", error=True,
+                    substrs=["'reproducer generate' takes no arguments"])
+
+    @no_debug_info_test
+    def test_reproducer_status_invalid_invocation(self):
+        self.expect("reproducer status f", error=True,
+                    substrs=["'reproducer status' takes no arguments"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/TestSettings.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/TestSettings.py
new file mode 100644
index 0000000..1130821
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/TestSettings.py
@@ -0,0 +1,604 @@
+"""
+Test lldb settings command.
+"""
+
+
+
+import os
+import re
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class SettingsCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_apropos_should_also_search_settings_description(self):
+        """Test that 'apropos' command should also search descriptions for the settings variables."""
+
+        self.expect("apropos 'environment variable'",
+                    substrs=["target.env-vars",
+                             "environment variables",
+                             "executable's environment"])
+
+    def test_append_target_env_vars(self):
+        """Test that 'append target.run-args' works."""
+        # Append the env-vars.
+        self.runCmd('settings append target.env-vars MY_ENV_VAR=YES')
+        # And add hooks to restore the settings during tearDown().
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear target.env-vars"))
+
+        # Check it immediately!
+        self.expect('settings show target.env-vars',
+                    substrs=['MY_ENV_VAR=YES'])
+
+    def test_insert_before_and_after_target_run_args(self):
+        """Test that 'insert-before/after target.run-args' works."""
+        # Set the run-args first.
+        self.runCmd('settings set target.run-args a b c')
+        # And add hooks to restore the settings during tearDown().
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear target.run-args"))
+
+        # Now insert-before the index-0 element with '__a__'.
+        self.runCmd('settings insert-before target.run-args 0 __a__')
+        # And insert-after the index-1 element with '__A__'.
+        self.runCmd('settings insert-after target.run-args 1 __A__')
+        # Check it immediately!
+        self.expect('settings show target.run-args',
+                    substrs=['target.run-args',
+                             '[0]: "__a__"',
+                             '[1]: "a"',
+                             '[2]: "__A__"',
+                             '[3]: "b"',
+                             '[4]: "c"'])
+
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr44430")
+    def test_replace_target_run_args(self):
+        """Test that 'replace target.run-args' works."""
+        # Set the run-args and then replace the index-0 element.
+        self.runCmd('settings set target.run-args a b c')
+        # And add hooks to restore the settings during tearDown().
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear target.run-args"))
+
+        # Now replace the index-0 element with 'A', instead.
+        self.runCmd('settings replace target.run-args 0 A')
+        # Check it immediately!
+        self.expect('settings show target.run-args',
+                    substrs=['target.run-args (arguments) =',
+                             '[0]: "A"',
+                             '[1]: "b"',
+                             '[2]: "c"'])
+
+    def test_set_prompt(self):
+        """Test that 'set prompt' actually changes the prompt."""
+
+        # Set prompt to 'lldb2'.
+        self.runCmd("settings set prompt 'lldb2 '")
+
+        # Immediately test the setting.
+        self.expect("settings show prompt", SETTING_MSG("prompt"),
+                    startstr='prompt (string) = "lldb2 "')
+
+        # The overall display should also reflect the new setting.
+        self.expect("settings show", SETTING_MSG("prompt"),
+                    substrs=['prompt (string) = "lldb2 "'])
+
+        # Use '-r' option to reset to the original default prompt.
+        self.runCmd("settings clear prompt")
+
+    def test_set_term_width(self):
+        """Test that 'set term-width' actually changes the term-width."""
+
+        self.runCmd("settings set term-width 70")
+
+        # Immediately test the setting.
+        self.expect("settings show term-width", SETTING_MSG("term-width"),
+                    startstr="term-width (int) = 70")
+
+        # The overall display should also reflect the new setting.
+        self.expect("settings show", SETTING_MSG("term-width"),
+                    substrs=["term-width (int) = 70"])
+
+    # rdar://problem/10712130
+    @skipIf(oslist=["windows"], bugnumber="llvm.org/pr44431")
+    def test_set_frame_format(self):
+        """Test that 'set frame-format' with a backtick char in the format string works as well as fullpath."""
+        self.build()
+
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        def cleanup():
+            self.runCmd(
+                "settings set frame-format %s" %
+                self.format_string, check=False)
+
+        # Execute the cleanup function during test case tear down.
+        self.addTearDownHook(cleanup)
+
+        self.runCmd("settings show frame-format")
+        m = re.match(
+            '^frame-format \(format-string\) = "(.*)\"$',
+            self.res.GetOutput())
+        self.assertTrue(m, "Bad settings string")
+        self.format_string = m.group(1)
+
+        # Change the default format to print function.name rather than
+        # function.name-with-args
+        format_string = "frame #${frame.index}: ${frame.pc}{ ${module.file.basename}\`${function.name}{${function.pc-offset}}}{ at ${line.file.fullpath}:${line.number}}{, lang=${language}}\n"
+        self.runCmd("settings set frame-format %s" % format_string)
+
+        # Immediately test the setting.
+        self.expect("settings show frame-format", SETTING_MSG("frame-format"),
+                    substrs=[format_string])
+
+        self.runCmd("breakpoint set -n main")
+        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
+                RUN_SUCCEEDED)
+        self.expect("thread backtrace",
+                    substrs=["`main", self.getSourceDir()])
+
+    def test_set_auto_confirm(self):
+        """Test that after 'set auto-confirm true', manual confirmation should not kick in."""
+        self.build()
+
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("settings set auto-confirm true")
+
+        # Immediately test the setting.
+        self.expect("settings show auto-confirm", SETTING_MSG("auto-confirm"),
+                    startstr="auto-confirm (boolean) = true")
+
+        # Now 'breakpoint delete' should just work fine without confirmation
+        # prompt from the command interpreter.
+        self.runCmd("breakpoint set -n main")
+        self.expect("breakpoint delete",
+                    startstr="All breakpoints removed")
+
+        # Restore the original setting of auto-confirm.
+        self.runCmd("settings clear auto-confirm")
+        self.expect("settings show auto-confirm", SETTING_MSG("auto-confirm"),
+                    startstr="auto-confirm (boolean) = false")
+
+    @skipIf(archs=no_match(['x86_64', 'i386', 'i686']))
+    def test_disassembler_settings(self):
+        """Test that user options for the disassembler take effect."""
+        self.build()
+
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # AT&T syntax
+        self.runCmd("settings set target.x86-disassembly-flavor att")
+        self.runCmd("settings set target.use-hex-immediates false")
+        self.expect("disassemble -n numberfn",
+                    substrs=["$90"])
+        self.runCmd("settings set target.use-hex-immediates true")
+        self.runCmd("settings set target.hex-immediate-style c")
+        self.expect("disassemble -n numberfn",
+                    substrs=["$0x5a"])
+        self.runCmd("settings set target.hex-immediate-style asm")
+        self.expect("disassemble -n numberfn",
+                    substrs=["$5ah"])
+
+        # Intel syntax
+        self.runCmd("settings set target.x86-disassembly-flavor intel")
+        self.runCmd("settings set target.use-hex-immediates false")
+        self.expect("disassemble -n numberfn",
+                    substrs=["90"])
+        self.runCmd("settings set target.use-hex-immediates true")
+        self.runCmd("settings set target.hex-immediate-style c")
+        self.expect("disassemble -n numberfn",
+                    substrs=["0x5a"])
+        self.runCmd("settings set target.hex-immediate-style asm")
+        self.expect("disassemble -n numberfn",
+                    substrs=["5ah"])
+
+    @skipIfDarwinEmbedded   # <rdar://problem/34446098> debugserver on ios etc can't write files
+    def test_run_args_and_env_vars(self):
+        """Test that run-args and env-vars are passed to the launched process."""
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Set the run-args and the env-vars.
+        # And add hooks to restore the settings during tearDown().
+        self.runCmd('settings set target.run-args A B C')
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear target.run-args"))
+        self.runCmd('settings set target.env-vars ["MY_ENV_VAR"]=YES')
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear target.env-vars"))
+
+        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
+                RUN_SUCCEEDED)
+
+        # Read the output file produced by running the program.
+        output = lldbutil.read_file_from_process_wd(self, "output2.txt")
+
+        self.expect(
+            output,
+            exe=False,
+            substrs=[
+                "argv[1] matches",
+                "argv[2] matches",
+                "argv[3] matches",
+                "Environment variable 'MY_ENV_VAR' successfully passed."])
+
+    @skipIfRemote  # it doesn't make sense to send host env to remote target
+    def test_pass_host_env_vars(self):
+        """Test that the host env vars are passed to the launched process."""
+        self.build()
+
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # By default, inherit-env is 'true'.
+        self.expect(
+            'settings show target.inherit-env',
+            "Default inherit-env is 'true'",
+            startstr="target.inherit-env (boolean) = true")
+
+        # Set some host environment variables now.
+        os.environ["MY_HOST_ENV_VAR1"] = "VAR1"
+        os.environ["MY_HOST_ENV_VAR2"] = "VAR2"
+
+        # This is the function to unset the two env variables set above.
+        def unset_env_variables():
+            os.environ.pop("MY_HOST_ENV_VAR1")
+            os.environ.pop("MY_HOST_ENV_VAR2")
+
+        self.addTearDownHook(unset_env_variables)
+        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
+                RUN_SUCCEEDED)
+
+        # Read the output file produced by running the program.
+        output = lldbutil.read_file_from_process_wd(self, "output1.txt")
+
+        self.expect(
+            output,
+            exe=False,
+            substrs=[
+                "The host environment variable 'MY_HOST_ENV_VAR1' successfully passed.",
+                "The host environment variable 'MY_HOST_ENV_VAR2' successfully passed."])
+
+    @skipIfDarwinEmbedded   # <rdar://problem/34446098> debugserver on ios etc can't write files
+    def test_set_error_output_path(self):
+        """Test that setting target.error/output-path for the launched process works."""
+        self.build()
+
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Set the error-path and output-path and verify both are set.
+        self.runCmd("settings set target.error-path '{0}'".format(
+            lldbutil.append_to_process_working_directory(self, "stderr.txt")))
+        self.runCmd("settings set target.output-path '{0}".format(
+            lldbutil.append_to_process_working_directory(self, "stdout.txt")))
+        # And add hooks to restore the original settings during tearDown().
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear target.output-path"))
+        self.addTearDownHook(
+            lambda: self.runCmd("settings clear target.error-path"))
+
+        self.expect("settings show target.error-path",
+                    SETTING_MSG("target.error-path"),
+                    substrs=['target.error-path (file)', 'stderr.txt"'])
+
+        self.expect("settings show target.output-path",
+                    SETTING_MSG("target.output-path"),
+                    substrs=['target.output-path (file)', 'stdout.txt"'])
+
+        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
+                RUN_SUCCEEDED)
+
+        output = lldbutil.read_file_from_process_wd(self, "stderr.txt")
+        message = "This message should go to standard error."
+        if lldbplatformutil.hasChattyStderr(self):
+            self.expect(output, exe=False, substrs=[message])
+        else:
+            self.expect(output, exe=False, startstr=message)
+
+        output = lldbutil.read_file_from_process_wd(self, "stdout.txt")
+        self.expect(output, exe=False,
+                    startstr="This message should go to standard out.")
+
+    def test_print_dictionary_setting(self):
+        self.runCmd("settings clear target.env-vars")
+        self.runCmd("settings set target.env-vars [\"MY_VAR\"]=some-value")
+        self.expect("settings show target.env-vars",
+                    substrs=["MY_VAR=some-value"])
+        self.runCmd("settings clear target.env-vars")
+
+    def test_print_array_setting(self):
+        self.runCmd("settings clear target.run-args")
+        self.runCmd("settings set target.run-args gobbledy-gook")
+        self.expect("settings show target.run-args",
+                    substrs=['[0]: "gobbledy-gook"'])
+        self.runCmd("settings clear target.run-args")
+
+    def test_settings_with_quotes(self):
+        self.runCmd("settings clear target.run-args")
+        self.runCmd("settings set target.run-args a b c")
+        self.expect("settings show target.run-args",
+                    substrs=['[0]: "a"',
+                             '[1]: "b"',
+                             '[2]: "c"'])
+        self.runCmd("settings set target.run-args 'a b c'")
+        self.expect("settings show target.run-args",
+                    substrs=['[0]: "a b c"'])
+        self.runCmd("settings clear target.run-args")
+        self.runCmd("settings clear target.env-vars")
+        self.runCmd(
+            'settings set target.env-vars ["MY_FILE"]="this is a file name with spaces.txt"')
+        self.expect("settings show target.env-vars",
+                    substrs=['MY_FILE=this is a file name with spaces.txt'])
+        self.runCmd("settings clear target.env-vars")
+        # Test and make sure that setting "format-string" settings obeys quotes
+        # if they are provided
+        self.runCmd("settings set thread-format    'abc def'   ")
+        self.expect("settings show thread-format",
+                    'thread-format (format-string) = "abc def"')
+        self.runCmd('settings set thread-format    "abc def"   ')
+        self.expect("settings show thread-format",
+                    'thread-format (format-string) = "abc def"')
+        # Make sure when no quotes are provided that we maintain any trailing
+        # spaces
+        self.runCmd('settings set thread-format abc def   ')
+        self.expect("settings show thread-format",
+                    'thread-format (format-string) = "abc def   "')
+        self.runCmd('settings clear thread-format')
+
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr44430")
+    def test_settings_with_trailing_whitespace(self):
+
+        # boolean
+        # Set to known value
+        self.runCmd("settings set target.skip-prologue true")
+        # Set to new value with trailing whitespace
+        self.runCmd("settings set target.skip-prologue false ")
+        # Make sure the setting was correctly set to "false"
+        self.expect(
+            "settings show target.skip-prologue",
+            SETTING_MSG("target.skip-prologue"),
+            startstr="target.skip-prologue (boolean) = false")
+        self.runCmd("settings clear target.skip-prologue", check=False)
+        # integer
+        self.runCmd("settings set term-width 70")      # Set to known value
+        # Set to new value with trailing whitespaces
+        self.runCmd("settings set term-width 60 \t")
+        self.expect("settings show term-width", SETTING_MSG("term-width"),
+                    startstr="term-width (int) = 60")
+        self.runCmd("settings clear term-width", check=False)
+        # string
+        self.runCmd("settings set target.arg0 abc")    # Set to known value
+        # Set to new value with trailing whitespaces
+        self.runCmd("settings set target.arg0 cde\t ")
+        self.expect("settings show target.arg0", SETTING_MSG("target.arg0"),
+                    startstr='target.arg0 (string) = "cde"')
+        self.runCmd("settings clear target.arg0", check=False)
+        # file
+        path1 = self.getBuildArtifact("path1.txt")
+        path2 = self.getBuildArtifact("path2.txt")
+        self.runCmd(
+            "settings set target.output-path %s" %
+            path1)   # Set to known value
+        self.expect(
+            "settings show target.output-path",
+            SETTING_MSG("target.output-path"),
+            startstr='target.output-path (file) = ',
+            substrs=[path1])
+        self.runCmd("settings set target.output-path %s " %
+                    path2)  # Set to new value with trailing whitespaces
+        self.expect(
+            "settings show target.output-path",
+            SETTING_MSG("target.output-path"),
+            startstr='target.output-path (file) = ',
+            substrs=[path2])
+        self.runCmd("settings clear target.output-path", check=False)
+        # enum
+        # Set to known value
+        self.runCmd("settings set stop-disassembly-display never")
+        # Set to new value with trailing whitespaces
+        self.runCmd("settings set stop-disassembly-display always ")
+        self.expect(
+            "settings show stop-disassembly-display",
+            SETTING_MSG("stop-disassembly-display"),
+            startstr='stop-disassembly-display (enum) = always')
+        self.runCmd("settings clear stop-disassembly-display", check=False)
+        # language
+        # Set to known value
+        self.runCmd("settings set target.language c89")
+        # Set to new value with trailing whitespace
+        self.runCmd("settings set target.language c11 ")
+        self.expect(
+            "settings show target.language",
+            SETTING_MSG("target.language"),
+            startstr="target.language (language) = c11")
+        self.runCmd("settings clear target.language", check=False)
+        # arguments
+        self.runCmd("settings set target.run-args 1 2 3")  # Set to known value
+        # Set to new value with trailing whitespaces
+        self.runCmd("settings set target.run-args 3 4 5 ")
+        self.expect(
+            "settings show target.run-args",
+            SETTING_MSG("target.run-args"),
+            substrs=[
+                'target.run-args (arguments) =',
+                '[0]: "3"',
+                '[1]: "4"',
+                '[2]: "5"'])
+        self.runCmd("settings set target.run-args 1 2 3")  # Set to known value
+        # Set to new value with trailing whitespaces
+        self.runCmd("settings set target.run-args 3 \  \ ")
+        self.expect(
+            "settings show target.run-args",
+            SETTING_MSG("target.run-args"),
+            substrs=[
+                'target.run-args (arguments) =',
+                '[0]: "3"',
+                '[1]: " "',
+                '[2]: " "'])
+        self.runCmd("settings clear target.run-args", check=False)
+        # dictionaries
+        self.runCmd("settings clear target.env-vars")  # Set to known value
+        # Set to new value with trailing whitespaces
+        self.runCmd("settings set target.env-vars A=B C=D\t ")
+        self.expect(
+            "settings show target.env-vars",
+            SETTING_MSG("target.env-vars"),
+            substrs=[
+                'target.env-vars (dictionary of strings) =',
+                'A=B',
+                'C=D'])
+        self.runCmd("settings clear target.env-vars", check=False)
+        # regex
+        # Set to known value
+        self.runCmd("settings clear target.process.thread.step-avoid-regexp")
+        # Set to new value with trailing whitespaces
+        self.runCmd(
+            "settings set target.process.thread.step-avoid-regexp foo\\ ")
+        self.expect(
+            "settings show target.process.thread.step-avoid-regexp",
+            SETTING_MSG("target.process.thread.step-avoid-regexp"),
+            substrs=['target.process.thread.step-avoid-regexp (regex) = foo\\ '])
+        self.runCmd(
+            "settings clear target.process.thread.step-avoid-regexp",
+            check=False)
+        # format-string
+        self.runCmd("settings clear disassembly-format")  # Set to known value
+        # Set to new value with trailing whitespaces
+        self.runCmd("settings set disassembly-format foo ")
+        self.expect("settings show disassembly-format",
+                    SETTING_MSG("disassembly-format"),
+                    substrs=['disassembly-format (format-string) = "foo "'])
+        self.runCmd("settings clear disassembly-format", check=False)
+
+    def test_settings_list(self):
+        # List settings (and optionally test the filter to only show 'target' settings).
+        self.expect("settings list target", substrs=["language", "arg0", "detach-on-error"])
+        self.expect("settings list target", matching=False, substrs=["packet-timeout"])
+        self.expect("settings list", substrs=["language", "arg0", "detach-on-error", "packet-timeout"])
+
+    def test_settings_remove_single(self):
+        # Set some environment variables and use 'remove' to delete them.
+        self.runCmd("settings set target.env-vars a=b c=d")
+        self.expect("settings show target.env-vars", substrs=["a=b", "c=d"])
+        self.runCmd("settings remove target.env-vars a")
+        self.expect("settings show target.env-vars", matching=False, substrs=["a=b"])
+        self.expect("settings show target.env-vars", substrs=["c=d"])
+        self.runCmd("settings remove target.env-vars c")
+        self.expect("settings show target.env-vars", matching=False, substrs=["a=b", "c=d"])
+
+    def test_settings_remove_multiple(self):
+        self.runCmd("settings set target.env-vars a=b c=d e=f")
+        self.expect("settings show target.env-vars", substrs=["a=b", "c=d", "e=f"])
+        self.runCmd("settings remove target.env-vars a e")
+        self.expect("settings show target.env-vars", matching=False, substrs=["a=b", "e=f"])
+        self.expect("settings show target.env-vars", substrs=["c=d"])
+
+    def test_settings_remove_nonexistent_value(self):
+        self.expect("settings remove target.env-vars doesntexist", error=True,
+                    substrs=["no value found named 'doesntexist'"])
+
+    def test_settings_remove_nonexistent_settings(self):
+        self.expect("settings remove doesntexist alsodoesntexist", error=True,
+                    substrs=["error: invalid value path 'doesntexist'"])
+
+    def test_settings_remove_missing_arg(self):
+        self.expect("settings remove", error=True,
+                    substrs=["'settings remove' takes an array or dictionary item, or"])
+
+    def test_settings_remove_empty_arg(self):
+        self.expect("settings remove ''", error=True,
+                    substrs=["'settings remove' command requires a valid variable name"])
+
+    def test_all_settings_exist(self):
+        self.expect("settings show",
+                    substrs=["auto-confirm",
+                             "frame-format",
+                             "notify-void",
+                             "prompt",
+                             "script-lang",
+                             "stop-disassembly-count",
+                             "stop-disassembly-display",
+                             "stop-line-count-after",
+                             "stop-line-count-before",
+                             "stop-show-column",
+                             "term-width",
+                             "thread-format",
+                             "use-external-editor",
+                             "target.default-arch",
+                             "target.move-to-nearest-code",
+                             "target.expr-prefix",
+                             "target.language",
+                             "target.prefer-dynamic-value",
+                             "target.enable-synthetic-value",
+                             "target.skip-prologue",
+                             "target.source-map",
+                             "target.exec-search-paths",
+                             "target.max-children-count",
+                             "target.max-string-summary-length",
+                             "target.breakpoints-use-platform-avoid-list",
+                             "target.run-args",
+                             "target.env-vars",
+                             "target.inherit-env",
+                             "target.input-path",
+                             "target.output-path",
+                             "target.error-path",
+                             "target.disable-aslr",
+                             "target.disable-stdio",
+                             "target.x86-disassembly-flavor",
+                             "target.use-hex-immediates",
+                             "target.hex-immediate-style",
+                             "target.process.disable-memory-cache",
+                             "target.process.extra-startup-command",
+                             "target.process.thread.step-avoid-regexp",
+                             "target.process.thread.trace-thread"])
+
+    # settings under an ".experimental" domain should have two properties:
+    #   1. If the name does not exist with "experimental" in the name path,
+    #      the name lookup should try to find it without "experimental".  So
+    #      a previously-experimental setting that has been promoted to a
+    #      "real" setting will still be set by the original name.
+    #   2. Changing a setting with .experimental., name, where the setting
+    #      does not exist either with ".experimental." or without, should
+    #      not generate an error.  So if an experimental setting is removed,
+    #      people who may have that in their ~/.lldbinit files should not see
+    #      any errors.
+    def test_experimental_settings(self):
+        cmdinterp = self.dbg.GetCommandInterpreter()
+        result = lldb.SBCommandReturnObject()
+
+        # Set target.arg0 to a known value, check that we can retrieve it via
+        # the actual name and via .experimental.
+        self.expect('settings set target.arg0 first-value')
+        self.expect('settings show target.arg0', substrs=['first-value'])
+        self.expect('settings show target.experimental.arg0', substrs=['first-value'], error=False)
+
+        # Set target.arg0 to a new value via a target.experimental.arg0 name,
+        # verify that we can read it back via both .experimental., and not.
+        self.expect('settings set target.experimental.arg0 second-value', error=False)
+        self.expect('settings show target.arg0', substrs=['second-value'])
+        self.expect('settings show target.experimental.arg0', substrs=['second-value'], error=False)
+
+        # showing & setting an undefined .experimental. setting should generate no errors.
+        self.expect('settings show target.experimental.setting-which-does-not-exist', patterns=['^\s$'], error=False)
+        self.expect('settings set target.experimental.setting-which-does-not-exist true', error=False)
+
+        # A domain component before .experimental. which does not exist should give an error
+        # But the code does not yet do that.
+        # self.expect('settings set target.setting-which-does-not-exist.experimental.arg0 true', error=True)
+
+        # finally, confirm that trying to set a setting that does not exist still fails.
+        # (SHOWING a setting that does not exist does not currently yield an error.)
+        self.expect('settings set target.setting-which-does-not-exist true', error=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py
new file mode 100644
index 0000000..5853313
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/TestQuoting.py
@@ -0,0 +1,93 @@
+"""
+Test quoting of arguments to lldb commands
+"""
+
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class SettingsCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @classmethod
+    def classCleanup(cls):
+        """Cleanup the test byproducts."""
+        cls.RemoveTempFile("stdout.txt")
+
+    @no_debug_info_test
+    def test_no_quote(self):
+        self.do_test_args("a b c", "a\0b\0c\0")
+
+    @no_debug_info_test
+    def test_single_quote(self):
+        self.do_test_args("'a b c'", "a b c\0")
+
+    @no_debug_info_test
+    def test_double_quote(self):
+        self.do_test_args('"a b c"', "a b c\0")
+
+    @no_debug_info_test
+    def test_single_quote_escape(self):
+        self.do_test_args("'a b\\' c", "a b\\\0c\0")
+
+    @no_debug_info_test
+    def test_double_quote_escape(self):
+        self.do_test_args('"a b\\" c"', 'a b" c\0')
+
+    @no_debug_info_test
+    def test_double_quote_escape2(self):
+        self.do_test_args('"a b\\\\" c', 'a b\\\0c\0')
+
+    @no_debug_info_test
+    def test_single_in_double(self):
+        self.do_test_args('"a\'b"', "a'b\0")
+
+    @no_debug_info_test
+    def test_double_in_single(self):
+        self.do_test_args("'a\"b'", 'a"b\0')
+
+    @no_debug_info_test
+    def test_combined(self):
+        self.do_test_args('"a b"c\'d e\'', 'a bcd e\0')
+
+    @no_debug_info_test
+    def test_bare_single(self):
+        self.do_test_args("a\\'b", "a'b\0")
+
+    @no_debug_info_test
+    def test_bare_double(self):
+        self.do_test_args('a\\"b', 'a"b\0')
+
+    def do_test_args(self, args_in, args_out):
+        """Test argument parsing. Run the program with args_in. The program dumps its arguments
+        to stdout. Compare the stdout with args_out."""
+        self.buildDefault()
+
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        local_outfile = self.getBuildArtifact("output.txt")
+        if lldb.remote_platform:
+            remote_outfile = "output.txt" # Relative to platform's PWD
+        else:
+            remote_outfile = local_outfile
+
+        self.runCmd("process launch -- %s %s" %(remote_outfile, args_in))
+
+        if lldb.remote_platform:
+            src_file_spec = lldb.SBFileSpec(remote_outfile, False)
+            dst_file_spec = lldb.SBFileSpec(local_outfile, True)
+            lldb.remote_platform.Get(src_file_spec, dst_file_spec)
+
+        with open(local_outfile, 'r') as f:
+            output = f.read()
+
+        self.RemoveTempFile(local_outfile)
+
+        self.assertEqual(output, args_out)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/quoting/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/quoting/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/settings/quoting/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/source/info/TestSourceInfo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/source/info/TestSourceInfo.py
new file mode 100644
index 0000000..c8308c1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/source/info/TestSourceInfo.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/source/info/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/source/info/main.cpp
new file mode 100644
index 0000000..7d71490
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/source/info/main.cpp
@@ -0,0 +1,14 @@
+int bar();
+
+int foo() {
+  return 3;
+}
+
+int main() {
+  int f = foo() + bar();
+  f++;
+  return f; //%self.expect("source info", substrs=["Lines found in module ", "main.cpp:10"])
+  //%self.expect("source info -f main.cpp -c 10", matching=True, substrs=["main.cpp:10"])
+  //%self.expect("source info -f main.cpp -c 1", matching=False, substrs=["main.cpp:10"])
+  //%self.expect("source info -f main.cpp -l 10", matching=False, substrs=["main.cpp:7"])
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/source/info/second.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/source/info/second.cpp
new file mode 100644
index 0000000..0e068a6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/source/info/second.cpp
@@ -0,0 +1,5 @@
+int bar() {
+  int i = 3; //%self.expect("source info", substrs=["Lines found in module ", "second.cpp:2"])
+  return i; //%self.expect("source info", substrs=["Lines found in module ", "second.cpp:3"])
+  //%self.expect("source info --name main", substrs=["Lines found in module ", "main.cpp:7", "main.cpp:10"])
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/TestStats.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/TestStats.py
new file mode 100644
index 0000000..9f5c717
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/TestStats.py
@@ -0,0 +1,5 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(
+    __file__, globals(), [decorators.no_debug_info_test])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/statistics/basic/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/Makefile
new file mode 100644
index 0000000..b31e594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/Makefile
@@ -0,0 +1,6 @@
+# Example:
+#
+# C_SOURCES := b.c
+# EXE := b.out
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/TestTargetCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/TestTargetCommand.py
new file mode 100644
index 0000000..6152a6a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/TestTargetCommand.py
@@ -0,0 +1,439 @@
+"""
+Test some target commands: create, list, select, variable.
+"""
+
+import os
+import stat
+import tempfile
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class targetCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line numbers for our breakpoints.
+        self.line_b = line_number('b.c', '// Set break point at this line.')
+        self.line_c = line_number('c.c', '// Set break point at this line.')
+
+    def buildB(self):
+        db = {'C_SOURCES': 'b.c', 'EXE': self.getBuildArtifact('b.out')}
+        self.build(dictionary=db)
+        self.addTearDownCleanup(dictionary=db)
+
+    def buildAll(self):
+        da = {'C_SOURCES': 'a.c', 'EXE': self.getBuildArtifact('a.out')}
+        self.build(dictionary=da)
+        self.addTearDownCleanup(dictionary=da)
+
+        self.buildB()
+
+        dc = {'C_SOURCES': 'c.c', 'EXE': self.getBuildArtifact('c.out')}
+        self.build(dictionary=dc)
+        self.addTearDownCleanup(dictionary=dc)
+
+    def test_target_command(self):
+        """Test some target commands: create, list, select."""
+        self.buildAll()
+        self.do_target_command()
+
+    def test_target_variable_command(self):
+        """Test 'target variable' command before and after starting the inferior."""
+        d = {'C_SOURCES': 'globals.c', 'EXE': self.getBuildArtifact('globals')}
+        self.build(dictionary=d)
+        self.addTearDownCleanup(dictionary=d)
+
+        self.do_target_variable_command('globals')
+
+    def test_target_variable_command_no_fail(self):
+        """Test 'target variable' command before and after starting the inferior."""
+        d = {'C_SOURCES': 'globals.c', 'EXE': self.getBuildArtifact('globals')}
+        self.build(dictionary=d)
+        self.addTearDownCleanup(dictionary=d)
+
+        self.do_target_variable_command_no_fail('globals')
+
+    def do_target_command(self):
+        """Exercise 'target create', 'target list', 'target select' commands."""
+        exe_a = self.getBuildArtifact("a.out")
+        exe_b = self.getBuildArtifact("b.out")
+        exe_c = self.getBuildArtifact("c.out")
+
+        self.runCmd("target list")
+        output = self.res.GetOutput()
+        if output.startswith("No targets"):
+            # We start from index 0.
+            base = 0
+        else:
+            # Find the largest index of the existing list.
+            import re
+            pattern = re.compile("target #(\d+):")
+            for line in reversed(output.split(os.linesep)):
+                match = pattern.search(line)
+                if match:
+                    # We will start from (index + 1) ....
+                    base = int(match.group(1), 10) + 1
+                    #print("base is:", base)
+                    break
+
+        self.runCmd("target create " + exe_a, CURRENT_EXECUTABLE_SET)
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.runCmd("target create " + exe_b, CURRENT_EXECUTABLE_SET)
+        lldbutil.run_break_set_by_file_and_line(
+            self, 'b.c', self.line_b, num_expected_locations=1, loc_exact=True)
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.runCmd("target create " + exe_c, CURRENT_EXECUTABLE_SET)
+        lldbutil.run_break_set_by_file_and_line(
+            self, 'c.c', self.line_c, num_expected_locations=1, loc_exact=True)
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.runCmd("target list")
+
+        self.runCmd("target select %d" % base)
+        self.runCmd("thread backtrace")
+
+        self.runCmd("target select %d" % (base + 2))
+        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['c.c:%d' % self.line_c,
+                             'stop reason = breakpoint'])
+
+        self.runCmd("target select %d" % (base + 1))
+        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['b.c:%d' % self.line_b,
+                             'stop reason = breakpoint'])
+
+        self.runCmd("target list")
+
+    def do_target_variable_command(self, exe_name):
+        """Exercise 'target variable' command before and after starting the inferior."""
+        self.runCmd("file " + self.getBuildArtifact(exe_name),
+                    CURRENT_EXECUTABLE_SET)
+
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
+        self.expect("target variable my_global_str_ptr", matching=False,
+                    substrs=['"abc"'])
+        self.expect("target variable *my_global_str_ptr", matching=True,
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
+
+        self.runCmd("b main")
+        self.runCmd("run")
+
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
+        self.expect("target variable my_global_str_ptr", matching=False,
+                    substrs=['"abc"'])
+        self.expect("target variable *my_global_str_ptr", matching=True,
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])
+
+        self.runCmd("c")
+
+        # rdar://problem/9763907
+        # 'target variable' command fails if the target program has been run
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
+        self.expect("target variable my_global_str_ptr", matching=False,
+                    substrs=['"abc"'])
+        self.expect("target variable *my_global_str_ptr", matching=True,
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])
+
+    def do_target_variable_command_no_fail(self, exe_name):
+        """Exercise 'target variable' command before and after starting the inferior."""
+        self.runCmd("file " + self.getBuildArtifact(exe_name),
+                    CURRENT_EXECUTABLE_SET)
+
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
+        self.expect("target variable my_global_str_ptr", matching=False,
+                    substrs=['"abc"'])
+        self.expect("target variable *my_global_str_ptr", matching=True,
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
+
+        self.runCmd("b main")
+        self.runCmd("run")
+
+        # New feature: you don't need to specify the variable(s) to 'target vaiable'.
+        # It will find all the global and static variables in the current
+        # compile unit.
+        self.expect("target variable",
+                    substrs=['my_global_char',
+                             'my_global_str',
+                             'my_global_str_ptr',
+                             'my_static_int'])
+
+        self.expect(
+            "target variable my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_global_str',
+                '"abc"'])
+        self.expect(
+            "target variable my_static_int",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                'my_static_int',
+                '228'])
+        self.expect("target variable my_global_str_ptr", matching=False,
+                    substrs=['"abc"'])
+        self.expect("target variable *my_global_str_ptr", matching=True,
+                    substrs=['"abc"'])
+        self.expect(
+            "target variable *my_global_str",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=['a'])
+        self.expect(
+            "target variable my_global_char",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                "my_global_char",
+                "'X'"])
+
+    @no_debug_info_test
+    def test_target_stop_hook_disable_enable(self):
+        self.buildB()
+        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+
+        self.expect("target stop-hook disable 1", error=True, substrs=['unknown stop hook id: "1"'])
+        self.expect("target stop-hook disable blub", error=True, substrs=['invalid stop hook id: "blub"'])
+        self.expect("target stop-hook enable 1", error=True, substrs=['unknown stop hook id: "1"'])
+        self.expect("target stop-hook enable blub", error=True, substrs=['invalid stop hook id: "blub"'])
+
+    @no_debug_info_test
+    def test_target_stop_hook_delete(self):
+        self.buildB()
+        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+
+        self.expect("target stop-hook delete 1", error=True, substrs=['unknown stop hook id: "1"'])
+        self.expect("target stop-hook delete blub", error=True, substrs=['invalid stop hook id: "blub"'])
+
+    @no_debug_info_test
+    def test_target_list_args(self):
+        self.expect("target list blub", error=True,
+                    substrs=["the 'target list' command takes no arguments"])
+
+    @no_debug_info_test
+    def test_target_select_no_index(self):
+        self.expect("target select", error=True,
+                    substrs=["'target select' takes a single argument: a target index"])
+
+    @no_debug_info_test
+    def test_target_select_invalid_index(self):
+        self.runCmd("target delete --all")
+        self.expect("target select 0", error=True,
+                    substrs=["index 0 is out of range since there are no active targets"])
+        self.buildB()
+        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+        self.expect("target select 1", error=True,
+                    substrs=["index 1 is out of range, valid target indexes are 0 - 0"])
+
+
+    @no_debug_info_test
+    def test_target_create_multiple_args(self):
+        self.expect("target create a b", error=True,
+                    substrs=["'target create' takes exactly one executable path"])
+
+    @no_debug_info_test
+    def test_target_create_nonexistent_core_file(self):
+        self.expect("target create -c doesntexist", error=True,
+                    substrs=["core file 'doesntexist' doesn't exist"])
+
+    # Write only files don't seem to be supported on Windows.
+    @skipIfWindows
+    @no_debug_info_test
+    def test_target_create_unreadable_core_file(self):
+        tf = tempfile.NamedTemporaryFile()
+        os.chmod(tf.name, stat.S_IWRITE)
+        self.expect("target create -c '" + tf.name + "'", error=True,
+                    substrs=["core file '", "' is not readable"])
+
+    @no_debug_info_test
+    def test_target_create_nonexistent_sym_file(self):
+        self.expect("target create -s doesntexist doesntexisteither", error=True,
+                    substrs=["invalid symbol file path 'doesntexist'"])
+
+    @skipIfWindows
+    @no_debug_info_test
+    def test_target_create_invalid_core_file(self):
+        invalid_core_path = os.path.join(self.getSourceDir(), "invalid_core_file")
+        self.expect("target create -c '" + invalid_core_path + "'", error=True,
+                    substrs=["Unable to find process plug-in for core file '"])
+
+
+    # Write only files don't seem to be supported on Windows.
+    @skipIfWindows
+    @no_debug_info_test
+    def test_target_create_unreadable_sym_file(self):
+        tf = tempfile.NamedTemporaryFile()
+        os.chmod(tf.name, stat.S_IWRITE)
+        self.expect("target create -s '" + tf.name + "' no_exe", error=True,
+                    substrs=["symbol file '", "' is not readable"])
+
+    @no_debug_info_test
+    def test_target_delete_all(self):
+        self.buildAll()
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+        self.expect("target delete --all")
+        self.expect("target list", substrs=["No targets."])
+
+    @no_debug_info_test
+    def test_target_delete_by_index(self):
+        self.buildAll()
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("file " + self.getBuildArtifact("c.out"), CURRENT_EXECUTABLE_SET)
+        self.expect("target delete 3", error=True,
+                    substrs=["target index 3 is out of range, valid target indexes are 0 - 2"])
+
+        self.runCmd("target delete 1")
+        self.expect("target list", matching=False, substrs=["b.out"])
+        self.runCmd("target delete 1")
+        self.expect("target list", matching=False, substrs=["c.out"])
+
+        self.expect("target delete 1", error=True,
+                    substrs=["target index 1 is out of range, the only valid index is 0"])
+
+        self.runCmd("target delete 0")
+        self.expect("target list", matching=False, substrs=["a.out"])
+
+        self.expect("target delete 0", error=True, substrs=["no targets to delete"])
+        self.expect("target delete 1", error=True, substrs=["no targets to delete"])
+
+    @no_debug_info_test
+    def test_target_delete_by_index_multiple(self):
+        self.buildAll()
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("file " + self.getBuildArtifact("c.out"), CURRENT_EXECUTABLE_SET)
+
+        self.expect("target delete 0 1 2 3", error=True,
+                    substrs=["target index 3 is out of range, valid target indexes are 0 - 2"])
+        self.expect("target list", substrs=["a.out", "b.out", "c.out"])
+
+        self.runCmd("target delete 0 1 2")
+        self.expect("target list", matching=False, substrs=["a.out", "c.out"])
+
+    @no_debug_info_test
+    def test_target_delete_selected(self):
+        self.buildAll()
+        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("file " + self.getBuildArtifact("c.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("target select 1")
+        self.runCmd("target delete")
+        self.expect("target list", matching=False, substrs=["b.out"])
+        self.runCmd("target delete")
+        self.runCmd("target delete")
+        self.expect("target list", substrs=["No targets."])
+        self.expect("target delete", error=True, substrs=["no target is currently selected"])
+
+    @no_debug_info_test
+    def test_target_modules_search_paths_clear(self):
+        self.buildB()
+        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("target modules search-paths add foo bar")
+        self.runCmd("target modules search-paths add foz baz")
+        self.runCmd("target modules search-paths clear")
+        self.expect("target list", matching=False, substrs=["bar", "baz"])
+
+    @no_debug_info_test
+    def test_target_modules_search_paths_query(self):
+        self.buildB()
+        self.runCmd("file " + self.getBuildArtifact("b.out"), CURRENT_EXECUTABLE_SET)
+        self.runCmd("target modules search-paths add foo bar")
+        self.expect("target modules search-paths query foo", substrs=["bar"])
+        # Query something that doesn't exist.
+        self.expect("target modules search-paths query faz", substrs=["faz"])
+
+        # Invalid arguments.
+        self.expect("target modules search-paths query faz baz", error=True,
+                    substrs=["query requires one argument"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/a.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/a.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/a.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/b.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/b.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/b.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/b.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/c.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/c.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/c.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/c.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/globals.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/globals.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/globals.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/globals.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/invalid_core_file b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/invalid_core_file
new file mode 100644
index 0000000..39802f6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/basic/invalid_core_file
@@ -0,0 +1 @@
+stub
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile
new file mode 100644
index 0000000..3e5b104
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile
@@ -0,0 +1,10 @@
+LD_EXTRAS := -L. -lload_a
+CXX_SOURCES := main.cpp
+
+a.out: libload_a
+
+include Makefile.rules
+
+libload_a:
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_NAME=load_a DYLIB_CXX_SOURCES=a.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/TestTargetCreateDeps.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/TestTargetCreateDeps.py
new file mode 100644
index 0000000..31be1cc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/TestTargetCreateDeps.py
@@ -0,0 +1,113 @@
+"""
+Test that loading of dependents works correctly for all the potential
+combinations.
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+@skipIfWindows # Windows deals differently with shared libs.
+class TargetDependentsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        TestBase.setUp(self)
+        self.build()
+
+    def has_exactly_one_image(self, matching, msg=""):
+        self.expect(
+            "image list",
+            "image list should contain at least one image",
+            substrs=['[  0]'])
+        should_match = not matching
+        self.expect(
+            "image list", msg, matching=should_match, substrs=['[  1]'])
+
+
+    @expectedFailureAll(oslist=["linux"],
+        triple=no_match(".*-android"))
+        #linux does not support loading dependent files, but android does
+    @expectedFailureNetBSD
+    def test_dependents_implicit_default_exe(self):
+        """Test default behavior"""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("target create  " + exe, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(False)
+
+    @expectedFailureAll(oslist=["linux"],
+        triple=no_match(".*-android"))
+        #linux does not support loading dependent files, but android does
+    @expectedFailureNetBSD
+    def test_dependents_explicit_default_exe(self):
+        """Test default behavior"""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("target create -ddefault " + exe, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(False)
+
+    def test_dependents_explicit_true_exe(self):
+        """Test default behavior"""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("target create -dtrue " + exe, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(True)
+
+    @expectedFailureAll(oslist=["linux"],
+        triple=no_match(".*-android"))
+        #linux does not support loading dependent files, but android does
+    @expectedFailureNetBSD
+    def test_dependents_explicit_false_exe(self):
+        """Test default behavior"""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("target create -dfalse " + exe, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(False)
+
+    def test_dependents_implicit_false_exe(self):
+        """Test default behavior"""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("target create  -d " + exe, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(True)
+
+    @expectedFailureAndroid # android will return mutiple images
+    def test_dependents_implicit_default_lib(self):
+        ctx = self.platformContext
+        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
+        lib = self.getBuildArtifact(dylibName)
+        self.runCmd("target create " + lib, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(True)
+
+    def test_dependents_explicit_default_lib(self):
+        ctx = self.platformContext
+        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
+        lib = self.getBuildArtifact(dylibName)
+        self.runCmd("target create -ddefault " + lib, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(True)
+
+    def test_dependents_explicit_true_lib(self):
+        ctx = self.platformContext
+        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
+        lib = self.getBuildArtifact(dylibName)
+        self.runCmd("target create -dtrue " + lib, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(True)
+
+    @expectedFailureAll(oslist=["linux"],
+        triple=no_match(".*-android"))
+        #linux does not support loading dependent files, but android does
+    @expectedFailureNetBSD
+    def test_dependents_explicit_false_lib(self):
+        ctx = self.platformContext
+        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
+        lib = self.getBuildArtifact(dylibName)
+        self.runCmd("target create -dfalse " + lib, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(False)
+
+    def test_dependents_implicit_false_lib(self):
+        ctx = self.platformContext
+        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
+        lib = self.getBuildArtifact(dylibName)
+        self.runCmd("target create -d " + lib, CURRENT_EXECUTABLE_SET)
+        self.has_exactly_one_image(True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/a.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/a.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/a.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/a.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-deps/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/TestNoSuchArch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/TestNoSuchArch.py
new file mode 100644
index 0000000..622a813e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/TestNoSuchArch.py
@@ -0,0 +1,33 @@
+"""
+Test that using a non-existent architecture name does not crash LLDB.
+"""
+
+
+import lldb
+from lldbsuite.test.lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+
+
+class NoSuchArchTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test(self):
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+
+        # Check that passing an invalid arch via the command-line fails but
+        # doesn't crash
+        self.expect(
+            "target create --arch nothingtoseehere %s" %
+            (exe), error=True, substrs=["error: invalid triple 'nothingtoseehere'"])
+
+        # Check that passing an invalid arch via the SB API fails but doesn't
+        # crash
+        target = self.dbg.CreateTargetWithFileAndArch(exe, "nothingtoseehere")
+        self.assertFalse(target.IsValid(), "This target should not be valid")
+
+        # Now just create the target with the default arch and check it's fine
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target.IsValid(), "This target should now be valid")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nosucharch/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nosucharch/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/create-no-such-arch/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/TestDumpSymtabDemangle.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/TestDumpSymtabDemangle.py
new file mode 100644
index 0000000..9f95a11
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/TestDumpSymtabDemangle.py
@@ -0,0 +1,30 @@
+"""
+Test 'target modules dump symtab -m' doesn't demangle symbols.
+"""
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test(self):
+        src_dir = self.getSourceDir()
+        yaml_path = os.path.join(src_dir, "a.yaml")
+        yaml_base, ext = os.path.splitext(yaml_path)
+        obj_path = self.getBuildArtifact("main.o")
+        self.yaml2obj(yaml_path, obj_path)
+
+        # Create a target with the object file we just created from YAML
+        target = self.dbg.CreateTarget(obj_path)
+        self.assertTrue(target, VALID_TARGET)
+
+        # First test that we demangle by default and our mangled symbol isn't in the output.
+        self.expect("target modules dump symtab", substrs=["foo::bar(int)"])
+        self.expect("target modules dump symtab", matching=False, substrs=["_ZN3foo3barEi"])
+
+        # Turn off demangling and make sure that we now see the mangled name in the output.
+        self.expect("target modules dump symtab -m", substrs=["_ZN3foo3barEi"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/a.yaml b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/a.yaml
new file mode 100644
index 0000000..ed591d7
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/dump-symtab-demangle/a.yaml
@@ -0,0 +1,18 @@
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_REL
+  Machine:         EM_X86_64
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    AddressAlign:    0x0000000000000010
+    Content:         554889E5897DFC5DC3
+Symbols:
+  - Name:            _ZN3foo3barEi
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x0000000000000009
+...
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile
new file mode 100644
index 0000000..695335e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/Makefile
@@ -0,0 +1,4 @@
+C_SOURCES := main.c
+CFLAGS_EXTRAS := -std=c99
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/TestStopHooks.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/TestStopHooks.py
new file mode 100644
index 0000000..64686af
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/TestStopHooks.py
@@ -0,0 +1,40 @@
+"""
+Test that stop hooks trigger on "step-out"
+"""
+
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+
+class TestStopHooks(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # If your test case doesn't stress debug info, the
+    # set this to true.  That way it won't be run once for
+    # each debug info format.
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_stop_hooks_step_out(self):
+        """Test that stop hooks fire on step-out."""
+        self.build()
+        self.main_source_file = lldb.SBFileSpec("main.c")
+        self.step_out_test()
+
+    def step_out_test(self):
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                   "Set a breakpoint here", self.main_source_file)
+
+        interp = self.dbg.GetCommandInterpreter()
+        result = lldb.SBCommandReturnObject()
+        interp.HandleCommand("target stop-hook add -o 'expr g_var++'", result)
+        self.assertTrue(result.Succeeded, "Set the target stop hook")
+        thread.StepOut()
+        var = target.FindFirstGlobalVariable("g_var")
+        self.assertTrue(var.IsValid())
+        self.assertEqual(var.GetValueAsUnsigned(), 1, "Updated g_var")
+
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/main.c
new file mode 100644
index 0000000..d08ad14
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/target/stop-hooks/main.c
@@ -0,0 +1,14 @@
+#include <stdio.h>
+
+static int g_var = 0;
+
+int step_out_of_me()
+{
+  return g_var; // Set a breakpoint here and step out.
+}
+
+int
+main()
+{
+  return step_out_of_me();
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/version/TestVersion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/version/TestVersion.py
new file mode 100644
index 0000000..48b46f6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/version/TestVersion.py
@@ -0,0 +1,19 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+class VersionTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_version(self):
+        # Should work even when people patch the output,
+        # so let's just assume that every vendor at least mentions
+        # 'lldb' in their version string.
+        self.expect("version", substrs=['lldb'])
+
+    @no_debug_info_test
+    def test_version_invalid_invocation(self):
+        self.expect("version a", error=True,
+                    substrs=['the version command takes no arguments.'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/.categories
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/.categories
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/.categories
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/Makefile
new file mode 100644
index 0000000..de4ec12
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/Makefile
@@ -0,0 +1,4 @@
+ENABLE_THREADS := YES
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py
new file mode 100644
index 0000000..55bf929
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/TestWatchLocation.py
@@ -0,0 +1,109 @@
+"""
+Test lldb watchpoint that uses '-s size' to watch a pointed location with size.
+"""
+
+
+
+import re
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class HelloWatchLocationTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Our simple source filename.
+        self.source = 'main.cpp'
+        # Find the line number to break inside main().
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
+        # This is for verifying that watch location works.
+        self.violating_func = "do_bad_thing_with_location"
+        # Build dictionary to have unique executable names for each test
+        # method.
+        self.exe_name = self.testMethodName
+        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
+
+    # Most of the MIPS boards provide only one H/W watchpoints, and S/W
+    # watchpoints are not supported yet
+    @expectedFailureAll(triple=re.compile('^mips'))
+    # SystemZ and PowerPC also currently supports only one H/W watchpoint
+    @expectedFailureAll(archs=['powerpc64le', 's390x'])
+    @skipIfDarwin
+    def test_hello_watchlocation(self):
+        """Test watching a location with '-s size' option."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1, loc_exact=False)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a write-type watchpoint pointed to by 'g_char_ptr'.
+        self.expect(
+            "watchpoint set expression -w write -s 1 -- g_char_ptr",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 1',
+                'type = w'])
+        # Get a hold of the watchpoint id just created, it is used later on to
+        # match the watchpoint id which is expected to be fired.
+        match = re.match(
+            "Watchpoint created: Watchpoint (.*):",
+            self.res.GetOutput().splitlines()[0])
+        if match:
+            expected_wp_id = int(match.group(1), 0)
+        else:
+            self.fail("Grokking watchpoint id faailed!")
+
+        self.runCmd("expr unsigned val = *g_char_ptr; val")
+        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
+                    endstr=' = 0')
+
+        self.runCmd("watchpoint set expression -w write -s 4 -- &threads[0]")
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (write type), but
+        # only once.  The stop reason of the thread should be watchpoint.
+        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stopped',
+                             'stop reason = watchpoint %d' % expected_wp_id])
+
+        # Switch to the thread stopped due to watchpoint and issue some
+        # commands.
+        self.switch_to_thread_with_stop_reason(lldb.eStopReasonWatchpoint)
+        self.runCmd("thread backtrace")
+        self.expect("frame info",
+                    substrs=[self.violating_func])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should now be 1.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 1'])
+
+        self.runCmd("thread backtrace all")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchlocation/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py
new file mode 100644
index 0000000..d51565b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/TestMyFirstWatchpoint.py
@@ -0,0 +1,92 @@
+"""
+Test my first lldb watchpoint.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class HelloWatchpointTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Our simple source filename.
+        self.source = 'main.c'
+        # Find the line number to break inside main().
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
+        # And the watchpoint variable declaration line number.
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
+        self.exe_name = self.getBuildArtifact('a.out')
+        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
+
+    @add_test_categories(["basic_process"])
+    def test_hello_watchpoint_using_watchpoint_set(self):
+        """Test a simple sequence of watchpoint creation and watchpoint hit."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a write-type watchpoint for 'global'.
+        # There should be only one watchpoint hit (see main.c).
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (write type), but
+        # only once.  The stop reason of the thread should be watchpoint.
+        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stopped',
+                             'stop reason = watchpoint'])
+
+        self.runCmd("process continue")
+
+        # Don't expect the read of 'global' to trigger a stop exception.
+        process = self.dbg.GetSelectedTarget().GetProcess()
+        if process.GetState() == lldb.eStateStopped:
+            self.assertFalse(
+                lldbutil.get_stopped_thread(
+                    process, lldb.eStopReasonWatchpoint))
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should now be 1.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 1'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/hello_watchpoint/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/TestWatchpointMultipleSlots.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/TestWatchpointMultipleSlots.py
new file mode 100644
index 0000000..843a2ac
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/TestWatchpointMultipleSlots.py
@@ -0,0 +1,100 @@
+"""
+Test watchpoint slots we should not be able to install multiple watchpoints
+within same word boundary. We should be able to install individual watchpoints
+on any of the bytes, half-word, or word. This is only for ARM/AArch64 targets.
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class WatchpointSlotsTestCase(TestBase):
+    NO_DEBUG_INFO_TESTCASE = True
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        # Source filename.
+        self.source = 'main.c'
+
+        # Output filename.
+        self.exe_name = self.getBuildArtifact("a.out")
+        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
+
+    # This is a arm and aarch64 specific test case. No other architectures tested.
+    @skipIf(archs=no_match(['arm', 'aarch64']))
+    def test_multiple_watchpoints_on_same_word(self):
+
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Detect line number after which we are going to increment arrayName.
+        loc_line = line_number('main.c', '// About to write byteArray')
+
+        # Set a breakpoint on the line detected above.
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", loc_line, num_expected_locations=1, loc_exact=True)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                     substrs=['stopped', 'stop reason = breakpoint'])
+
+        # Delete breakpoint we just hit.
+        self.expect("breakpoint delete 1", substrs=['1 breakpoints deleted'])
+
+        # Set a watchpoint at byteArray[0]
+        self.expect("watchpoint set variable byteArray[0]", WATCHPOINT_CREATED,
+                    substrs=['Watchpoint created','size = 1'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v 1", substrs=['hit_count = 0'])
+
+        # debugserver on ios doesn't give an error, it creates another watchpoint,
+        # only expect errors on non-darwin platforms.
+        if not self.platformIsDarwin():
+            # Try setting a watchpoint at byteArray[1]
+            self.expect("watchpoint set variable byteArray[1]", error=True,
+                        substrs=['Watchpoint creation failed'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped due to the watchpoint.
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stopped', 'stop reason = watchpoint 1'])
+
+        # Delete the watchpoint we hit above successfully.
+        self.expect("watchpoint delete 1", substrs=['1 watchpoints deleted'])
+
+        # Set a watchpoint at byteArray[3]
+        self.expect("watchpoint set variable byteArray[3]", WATCHPOINT_CREATED,
+                    substrs=['Watchpoint created','size = 1'])
+
+        # Resume inferior.
+        self.runCmd("process continue")
+
+        # We should be stopped due to the watchpoint.
+        # The stop reason of the thread should be watchpoint.
+        if self.platformIsDarwin():
+            # On darwin we'll hit byteArray[3] which is watchpoint 2
+            self.expect("thread list -v", STOPPED_DUE_TO_WATCHPOINT,
+                        substrs=['stopped', 'stop reason = watchpoint 2'])
+        else:
+            self.expect("thread list -v", STOPPED_DUE_TO_WATCHPOINT,
+                        substrs=['stopped', 'stop reason = watchpoint 3'])
+
+        # Resume inferior.
+        self.runCmd("process continue")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multi_watchpoint_slots/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/TestMultipleHits.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/TestMultipleHits.py
new file mode 100644
index 0000000..2186dd0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/TestMultipleHits.py
@@ -0,0 +1,53 @@
+"""
+Test handling of cases when a single instruction triggers multiple watchpoints
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class MultipleHitsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIf(bugnumber="llvm.org/pr30758", oslist=["linux"], archs=["arm", "aarch64", "powerpc64le"])
+    @skipIfwatchOS
+    def test(self):
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target and target.IsValid(), VALID_TARGET)
+
+        bp = target.BreakpointCreateByName("main")
+        self.assertTrue(bp and bp.IsValid(), "Breakpoint is valid")
+
+        process = target.LaunchSimple(None, None,
+                self.get_process_working_directory())
+        self.assertEqual(process.GetState(), lldb.eStateStopped)
+
+        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
+        self.assertIsNotNone(thread)
+
+        frame = thread.GetFrameAtIndex(0)
+        self.assertTrue(frame and frame.IsValid(), "Frame is valid")
+
+        buf = frame.FindValue("buf", lldb.eValueTypeVariableGlobal)
+        self.assertTrue(buf and buf.IsValid(), "buf is valid")
+
+        for i in [0, target.GetAddressByteSize()]:
+            member = buf.GetChildAtIndex(i)
+            self.assertTrue(member and member.IsValid(), "member is valid")
+
+            error = lldb.SBError()
+            watch = member.Watch(True, True, True, error)
+            self.assertTrue(error.Success())
+
+        process.Continue();
+        self.assertEqual(process.GetState(), lldb.eStateStopped)
+        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonWatchpoint)
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_hits/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/Makefile
new file mode 100644
index 0000000..de4ec12
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/Makefile
@@ -0,0 +1,4 @@
+ENABLE_THREADS := YES
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
new file mode 100644
index 0000000..3e6329e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/TestWatchpointMultipleThreads.py
@@ -0,0 +1,108 @@
+"""
+Test that lldb watchpoint works for multiple threads.
+"""
+
+from __future__ import print_function
+
+
+import re
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class WatchpointForMultipleThreadsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+    main_spec = lldb.SBFileSpec("main.cpp", False)
+
+    def test_watchpoint_before_thread_start(self):
+        """Test that we can hit a watchpoint we set before starting another thread"""
+        self.do_watchpoint_test("Before running the thread")
+
+    def test_watchpoint_after_thread_start(self):
+        """Test that we can hit a watchpoint we set after starting another thread"""
+        self.do_watchpoint_test("After running the thread")
+
+    def do_watchpoint_test(self, line):
+        self.build()
+        lldbutil.run_to_source_breakpoint(self, line, self.main_spec)
+
+        # Now let's set a write-type watchpoint for variable 'g_val'.
+        self.expect(
+            "watchpoint set variable -w write g_val",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        self.runCmd("thread list")
+        if "stop reason = watchpoint" in self.res.GetOutput():
+            # Good, we verified that the watchpoint works!
+            self.runCmd("thread backtrace all")
+        else:
+            self.fail("The stop reason should be either break or watchpoint")
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should now be 1.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 1'])
+
+    def test_watchpoint_multiple_threads_wp_set_and_then_delete(self):
+        """Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires."""
+        self.build()
+        self.setTearDownCleanup()
+
+        lldbutil.run_to_source_breakpoint(self, "After running the thread", self.main_spec)
+
+        # Now let's set a write-type watchpoint for variable 'g_val'.
+        self.expect(
+            "watchpoint set variable -w write g_val",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0'])
+
+        watchpoint_stops = 0
+        while True:
+            self.runCmd("process continue")
+            self.runCmd("process status")
+            if re.search("Process .* exited", self.res.GetOutput()):
+                # Great, we are done with this test!
+                break
+
+            self.runCmd("thread list")
+            if "stop reason = watchpoint" in self.res.GetOutput():
+                self.runCmd("thread backtrace all")
+                watchpoint_stops += 1
+                if watchpoint_stops > 1:
+                    self.fail(
+                        "Watchpoint hits not supposed to exceed 1 by design!")
+                # Good, we verified that the watchpoint works!  Now delete the
+                # watchpoint.
+                if self.TraceOn():
+                    print(
+                        "watchpoint_stops=%d at the moment we delete the watchpoint" %
+                        watchpoint_stops)
+                self.runCmd("watchpoint delete 1")
+                self.expect("watchpoint list -v",
+                            substrs=['No watchpoints currently set.'])
+                continue
+            else:
+                self.fail("The stop reason should be either break or watchpoint")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/multiple_threads/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py
new file mode 100644
index 0000000..2b8bbbc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py
@@ -0,0 +1,119 @@
+"""Test stepping over watchpoints."""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestStepOverWatchpoint(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @expectedFailureAll(
+        oslist=["linux"],
+        archs=[
+            'aarch64',
+            'arm'],
+        bugnumber="llvm.org/pr26031")
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
+    @expectedFailureAll(oslist=["ios", "watchos", "tvos", "bridgeos"], bugnumber="<rdar://problem/34027183>")  # watchpoint tests aren't working on arm64
+    @add_test_categories(["basic_process"])
+    def test(self):
+        """Test stepping over watchpoints."""
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(self.target, VALID_TARGET)
+
+        lldbutil.run_break_set_by_symbol(self, 'main')
+
+        process = target.LaunchSimple(None, None,
+                                      self.get_process_working_directory())
+        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
+        self.assertTrue(process.GetState() == lldb.eStateStopped,
+                        PROCESS_STOPPED)
+
+        thread = lldbutil.get_stopped_thread(process,
+                                             lldb.eStopReasonBreakpoint)
+        self.assertTrue(thread.IsValid(), "Failed to get thread.")
+
+        frame = thread.GetFrameAtIndex(0)
+        self.assertTrue(frame.IsValid(), "Failed to get frame.")
+
+        read_value = frame.FindValue('g_watch_me_read',
+                                     lldb.eValueTypeVariableGlobal)
+        self.assertTrue(read_value.IsValid(), "Failed to find read value.")
+
+        error = lldb.SBError()
+
+        # resolve_location=True, read=True, write=False
+        read_watchpoint = read_value.Watch(True, True, False, error)
+        self.assertTrue(error.Success(),
+                        "Error while setting watchpoint: %s" %
+                        error.GetCString())
+        self.assertTrue(read_watchpoint, "Failed to set read watchpoint.")
+
+        thread.StepOver()
+        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint,
+                        STOPPED_DUE_TO_WATCHPOINT)
+        self.assertTrue(thread.GetStopDescription(20) == 'watchpoint 1')
+
+        process.Continue()
+        self.assertTrue(process.GetState() == lldb.eStateStopped,
+                        PROCESS_STOPPED)
+        self.assertTrue(thread.GetStopDescription(20) == 'step over')
+
+        self.step_inst_for_watchpoint(1)
+
+        write_value = frame.FindValue('g_watch_me_write',
+                                      lldb.eValueTypeVariableGlobal)
+        self.assertTrue(write_value, "Failed to find write value.")
+
+        # Most of the MIPS boards provide only one H/W watchpoints, and S/W
+        # watchpoints are not supported yet
+        arch = self.getArchitecture()
+        if re.match("^mips", arch) or re.match("powerpc64le", arch):
+            self.runCmd("watchpoint delete 1")
+
+        # resolve_location=True, read=False, write=True
+        write_watchpoint = write_value.Watch(True, False, True, error)
+        self.assertTrue(write_watchpoint, "Failed to set write watchpoint.")
+        self.assertTrue(error.Success(),
+                        "Error while setting watchpoint: %s" %
+                        error.GetCString())
+
+        thread.StepOver()
+        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint,
+                        STOPPED_DUE_TO_WATCHPOINT)
+        self.assertTrue(thread.GetStopDescription(20) == 'watchpoint 2')
+
+        process.Continue()
+        self.assertTrue(process.GetState() == lldb.eStateStopped,
+                        PROCESS_STOPPED)
+        self.assertTrue(thread.GetStopDescription(20) == 'step over')
+
+        self.step_inst_for_watchpoint(2)
+
+    def step_inst_for_watchpoint(self, wp_id):
+        watchpoint_hit = False
+        current_line = self.frame().GetLineEntry().GetLine()
+        while self.frame().GetLineEntry().GetLine() == current_line:
+            self.thread().StepInstruction(False)  # step_over=False
+            stop_reason = self.thread().GetStopReason()
+            if stop_reason == lldb.eStopReasonWatchpoint:
+                self.assertFalse(watchpoint_hit, "Watchpoint already hit.")
+                expected_stop_desc = "watchpoint %d" % wp_id
+                actual_stop_desc = self.thread().GetStopDescription(20)
+                self.assertTrue(actual_stop_desc == expected_stop_desc,
+                                "Watchpoint ID didn't match.")
+                watchpoint_hit = True
+            else:
+                self.assertTrue(stop_reason == lldb.eStopReasonPlanComplete,
+                                STOPPED_DUE_TO_STEP_IN)
+        self.assertTrue(watchpoint_hit, "Watchpoint never hit.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/step_over_watchpoint/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/TestWatchedVarHitWhenInScope.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
new file mode 100644
index 0000000..eee8913
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
@@ -0,0 +1,84 @@
+"""
+Test that a variable watchpoint should only hit when in scope.
+"""
+
+
+
+import unittest2
+import lldb
+from lldbsuite.test.lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
+
+
+class WatchedVariableHitWhenInScopeTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    # This test depends on not tracking watchpoint expression hits if we have
+    # left the watchpoint scope.  We will provide such an ability at some point
+    # but the way this was done was incorrect, and it is unclear that for the
+    # most part that's not what folks mostly want, so we have to provide a
+    # clearer API to express this.
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Our simple source filename.
+        self.source = 'main.c'
+        self.exe_name = self.testMethodName
+        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
+
+    # Test hangs due to a kernel bug, see fdfeff0f in the linux kernel for details
+    @skipIfTargetAndroid(api_levels=list(range(25+1)), archs=["aarch64", "arm"])
+    @skipIf
+    def test_watched_var_should_only_hit_when_in_scope(self):
+        """Test that a variable watchpoint should only hit when in scope."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped in main.
+        lldbutil.run_break_set_by_symbol(
+            self, "main", num_expected_locations=-1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a watchpoint for 'c.a'.
+        # There should be only one watchpoint hit (see main.c).
+        self.expect("watchpoint set variable c.a", WATCHPOINT_CREATED,
+                    substrs=['Watchpoint created', 'size = 4', 'type = w'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (write type), but
+        # only once.  The stop reason of the thread should be watchpoint.
+        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stopped',
+                             'stop reason = watchpoint'])
+
+        self.runCmd("process continue")
+        # Don't expect the read of 'global' to trigger a stop exception.
+        # The process status should be 'exited'.
+        self.expect("process status",
+                    substrs=['exited'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should now be 1.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 1'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/variable_out_of_scope/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/TestWatchpointCommands.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/TestWatchpointCommands.py
new file mode 100644
index 0000000..50f7881
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/TestWatchpointCommands.py
@@ -0,0 +1,365 @@
+"""
+Test watchpoint list, enable, disable, and delete commands.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class WatchpointCommandsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Our simple source filename.
+        self.source = 'main.c'
+        # Find the line number to break inside main().
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
+        self.line2 = line_number(
+            self.source,
+            '// Set 2nd break point for disable_then_enable test case.')
+        # And the watchpoint variable declaration line number.
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
+        # Build dictionary to have unique executable names for each test
+        # method.
+        self.exe_name = self.testMethodName
+        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
+
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
+    def test_rw_watchpoint(self):
+        """Test read_write watchpoint and expect to stop two times."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a read_write-type watchpoint for 'global'.
+        # There should be two watchpoint hits (see main.c).
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['Number of supported hardware watchpoints:',
+                             'hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (read_write type).
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stop reason = watchpoint'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (read_write type).
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stop reason = watchpoint'])
+
+        self.runCmd("process continue")
+
+        # There should be no more watchpoint hit and the process status should
+        # be 'exited'.
+        self.expect("process status",
+                    substrs=['exited'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should now be 2.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 2'])
+
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
+    def test_rw_watchpoint_delete(self):
+        """Test delete watchpoint and expect not to stop for watchpoint."""
+        self.build()
+        lldbutil.run_to_line_breakpoint(self, lldb.SBFileSpec(self.source),
+                                        self.line)
+
+        # Now let's set a read_write-type watchpoint for 'global'.
+        # There should be two watchpoint hits (see main.c).
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        # Delete the watchpoint immediately, but set auto-confirm to true
+        # first.
+        self.runCmd("settings set auto-confirm true")
+        self.expect("watchpoint delete",
+                    substrs=['All watchpoints removed.'])
+        # Restore the original setting of auto-confirm.
+        self.runCmd("settings clear auto-confirm")
+
+        target = self.dbg.GetSelectedTarget()
+        self.assertTrue(target and not target.GetNumWatchpoints())
+
+        # Now let's set a read_write-type watchpoint for 'global'.
+        # There should be two watchpoint hits (see main.c).
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+
+        # Delete the watchpoint immediately using the force option.
+        self.expect("watchpoint delete --force",
+                    substrs=['All watchpoints removed.'])
+
+        self.assertTrue(target and not target.GetNumWatchpoints())
+
+        self.runCmd("process continue")
+
+        # There should be no more watchpoint hit and the process status should
+        # be 'exited'.
+        self.expect("process status",
+                    substrs=['exited'])
+
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
+    def test_rw_watchpoint_set_ignore_count(self):
+        """Test watchpoint ignore count and expect to not to stop at all."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a read_write-type watchpoint for 'global'.
+        # There should be two watchpoint hits (see main.c).
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        # Set the ignore count of the watchpoint immediately.
+        self.expect("watchpoint ignore -i 2",
+                    substrs=['All watchpoints ignored.'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # Expect to find an ignore_count of 2.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0', 'ignore_count = 2'])
+
+        self.runCmd("process continue")
+
+        # There should be no more watchpoint hit and the process status should
+        # be 'exited'.
+        self.expect("process status",
+                    substrs=['exited'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # Expect to find a hit_count of 2 as well.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 2', 'ignore_count = 2'])
+
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
+    def test_rw_disable_after_first_stop(self):
+        """Test read_write watchpoint but disable it after the first stop."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a read_write-type watchpoint for 'global'.
+        # There should be two watchpoint hits (see main.c).
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['state = enabled', 'hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (read_write type).
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stop reason = watchpoint'])
+
+        # Before continuing, we'll disable the watchpoint, which means we won't
+        # stop again after this.
+        self.runCmd("watchpoint disable")
+
+        self.expect("watchpoint list -v",
+                    substrs=['state = disabled', 'hit_count = 1'])
+
+        self.runCmd("process continue")
+
+        # There should be no more watchpoint hit and the process status should
+        # be 'exited'.
+        self.expect("process status",
+                    substrs=['exited'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 1.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 1'])
+
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
+    def test_rw_disable_then_enable(self):
+        """Test read_write watchpoint, disable initially, then enable it."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line2, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a read_write-type watchpoint for 'global'.
+        # There should be two watchpoint hits (see main.c).
+        self.expect(
+            "watchpoint set variable -w read_write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = rw',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        # Immediately, we disable the watchpoint.  We won't be stopping due to a
+        # watchpoint after this.
+        self.runCmd("watchpoint disable")
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['state = disabled', 'hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the breakpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stop reason = breakpoint'])
+
+        # Before continuing, we'll enable the watchpoint, which means we will
+        # stop again after this.
+        self.runCmd("watchpoint enable")
+
+        self.expect("watchpoint list -v",
+                    substrs=['state = enabled', 'hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (read_write type).
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stop reason = watchpoint'])
+
+        self.runCmd("process continue")
+
+        # There should be no more watchpoint hit and the process status should
+        # be 'exited'.
+        self.expect("process status",
+                    substrs=['exited'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 1.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 1'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py
new file mode 100644
index 0000000..cb5a535
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py
@@ -0,0 +1,155 @@
+"""
+Test 'watchpoint command'.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class WatchpointLLDBCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Our simple source filename.
+        self.source = 'main.cpp'
+        # Find the line number to break inside main().
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
+        # And the watchpoint variable declaration line number.
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
+        # Build dictionary to have unique executable names for each test
+        # method.
+        self.exe_name = 'a%d.out' % self.test_number
+        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
+
+    def test_watchpoint_command(self):
+        """Test 'watchpoint command'."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a write-type watchpoint for 'global'.
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        self.runCmd('watchpoint command add 1 -o "expr -- cookie = 777"')
+
+        # List the watchpoint command we just added.
+        self.expect("watchpoint command list 1",
+                    substrs=['expr -- cookie = 777'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (write type).
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stop reason = watchpoint'])
+
+        # Check that the watchpoint snapshoting mechanism is working.
+        self.expect("watchpoint list -v",
+                    substrs=['old value:', ' = 0',
+                             'new value:', ' = 1'])
+
+        # The watchpoint command "forced" our global variable 'cookie' to
+        # become 777.
+        self.expect("frame variable --show-globals cookie",
+                    substrs=['(int32_t)', 'cookie = 777'])
+
+    def test_watchpoint_command_can_disable_a_watchpoint(self):
+        """Test that 'watchpoint command' action can disable a watchpoint after it is triggered."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a write-type watchpoint for 'global'.
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        self.runCmd('watchpoint command add 1 -o "watchpoint disable 1"')
+
+        # List the watchpoint command we just added.
+        self.expect("watchpoint command list 1",
+                    substrs=['watchpoint disable 1'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (write type).
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stop reason = watchpoint'])
+
+        # Check that the watchpoint has been disabled.
+        self.expect("watchpoint list -v",
+                    substrs=['disabled'])
+
+        self.runCmd("process continue")
+
+        # There should be no more watchpoint hit and the process status should
+        # be 'exited'.
+        self.expect("process status",
+                    substrs=['exited'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py
new file mode 100644
index 0000000..c72a535
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py
@@ -0,0 +1,154 @@
+"""
+Test 'watchpoint command'.
+"""
+
+
+
+import os
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class WatchpointPythonCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Our simple source filename.
+        self.source = 'main.cpp'
+        # Find the line number to break inside main().
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
+        # And the watchpoint variable declaration line number.
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
+        # Build dictionary to have unique executable names for each test
+        # method.
+        self.exe_name = self.testMethodName
+        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
+
+    @skipIfFreeBSD  # timing out on buildbot
+    def test_watchpoint_command(self):
+        """Test 'watchpoint command'."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a write-type watchpoint for 'global'.
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        self.runCmd(
+            'watchpoint command add -s python 1 -o \'frame.EvaluateExpression("cookie = 777")\'')
+
+        # List the watchpoint command we just added.
+        self.expect("watchpoint command list 1",
+                    substrs=['frame.EvaluateExpression', 'cookie = 777'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (write type).
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stop reason = watchpoint'])
+
+        # Check that the watchpoint snapshoting mechanism is working.
+        self.expect("watchpoint list -v",
+                    substrs=['old value:', ' = 0',
+                             'new value:', ' = 1'])
+
+        # The watchpoint command "forced" our global variable 'cookie' to
+        # become 777.
+        self.expect("frame variable --show-globals cookie",
+                    substrs=['(int32_t)', 'cookie = 777'])
+
+    @skipIfFreeBSD  # timing out on buildbot
+    def test_continue_in_watchpoint_command(self):
+        """Test continue in a watchpoint command."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a write-type watchpoint for 'global'.
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        cmd_script_file = os.path.join(self.getSourceDir(),
+                                       "watchpoint_command.py")
+        self.runCmd("command script import '%s'" % (cmd_script_file))
+
+        self.runCmd(
+            'watchpoint command add -F watchpoint_command.watchpoint_command')
+
+        # List the watchpoint command we just added.
+        self.expect("watchpoint command list 1",
+                    substrs=['watchpoint_command.watchpoint_command'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (write type).
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stop reason = watchpoint'])
+
+        # We should have hit the watchpoint once, set cookie to 888, then continued to the
+        # second hit and set it to 999
+        self.expect("frame variable --show-globals cookie",
+                    substrs=['(int32_t)', 'cookie = 999'])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/watchpoint_command.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/watchpoint_command.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/watchpoint_command.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/watchpoint_command.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/TestWatchpointConditionCmd.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/TestWatchpointConditionCmd.py
new file mode 100644
index 0000000..0605aae
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/TestWatchpointConditionCmd.py
@@ -0,0 +1,87 @@
+"""
+Test watchpoint modify command to set condition on a watchpoint.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class WatchpointConditionCmdTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Our simple source filename.
+        self.source = 'main.cpp'
+        # Find the line number to break inside main().
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
+        # And the watchpoint variable declaration line number.
+        self.decl = line_number(self.source,
+                                '// Watchpoint variable declaration.')
+        # Build dictionary to have unique executable names for each test
+        # method.
+        self.exe_name = self.testMethodName
+        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
+
+    def test_watchpoint_cond(self):
+        """Test watchpoint condition."""
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a write-type watchpoint for 'global'.
+        # With a condition of 'global==5'.
+        self.expect(
+            "watchpoint set variable -w write global",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 4',
+                'type = w',
+                '%s:%d' %
+                (self.source,
+                 self.decl)])
+
+        self.runCmd("watchpoint modify -c 'global==5'")
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0', 'global==5'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (write type).
+        # The stop reason of the thread should be watchpoint.
+        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stop reason = watchpoint'])
+        self.expect("frame variable --show-globals global",
+                    substrs=['(int32_t)', 'global = 5'])
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should now be 2.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 5'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/condition/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py
new file mode 100644
index 0000000..cf33f47
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/TestWatchpointDisable.py
@@ -0,0 +1,71 @@
+"""
+Test that the SBWatchpoint::SetEnable API works.
+"""
+
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+from lldbsuite.test import lldbplatform, lldbplatformutil
+
+
+class TestWatchpointSetEnable(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_disable_works (self):
+        """Set a watchpoint, disable it, and make sure it doesn't get hit."""
+        self.build()
+        self.do_test(False)
+
+    def test_disable_enable_works (self):
+        """Set a watchpoint, disable it, and make sure it doesn't get hit."""
+        self.build()
+        self.do_test(True)
+
+    def do_test(self, test_enable):
+        """Set a watchpoint, disable it and make sure it doesn't get hit."""
+
+        exe = self.getBuildArtifact("a.out")
+        main_file_spec = lldb.SBFileSpec("main.c")
+
+        # Create a target by the debugger.
+        self.target = self.dbg.CreateTarget(exe)
+        self.assertTrue(self.target, VALID_TARGET)
+
+        bkpt_before = self.target.BreakpointCreateBySourceRegex("Set a breakpoint here", main_file_spec)
+        self.assertEqual(bkpt_before.GetNumLocations(),  1, "Failed setting the before breakpoint.")
+
+        bkpt_after = self.target.BreakpointCreateBySourceRegex("We should have stopped", main_file_spec)
+        self.assertEqual(bkpt_after.GetNumLocations(), 1, "Failed setting the after breakpoint.")
+
+        process = self.target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+        thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, bkpt_before)
+        self.assertTrue(thread.IsValid(), "We didn't stop at the before breakpoint.")
+
+        ret_val = lldb.SBCommandReturnObject()
+        self.dbg.GetCommandInterpreter().HandleCommand("watchpoint set variable -w write global_var", ret_val)
+        self.assertTrue(ret_val.Succeeded(), "Watchpoint set variable did not return success.")
+
+        wp = self.target.FindWatchpointByID(1)
+        self.assertTrue(wp.IsValid(), "Didn't make a valid watchpoint.")
+        self.assertTrue(wp.GetWatchAddress() != lldb.LLDB_INVALID_ADDRESS, "Watch address is invalid")
+
+        wp.SetEnabled(False)
+        self.assertTrue(not wp.IsEnabled(), "The watchpoint thinks it is still enabled")
+
+        process.Continue()
+
+        stop_reason = thread.GetStopReason()
+
+        self.assertEqual(stop_reason, lldb.eStopReasonBreakpoint, "We didn't stop at our breakpoint.")
+
+        if test_enable:
+            wp.SetEnabled(True)
+            self.assertTrue(wp.IsEnabled(), "The watchpoint thinks it is still disabled.")
+            process.Continue()
+            stop_reason = thread.GetStopReason()
+            self.assertEqual(stop_reason, lldb.eStopReasonWatchpoint, "We didn't stop at our watchpoint")
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_disable/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/TestWatchpointEvents.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/TestWatchpointEvents.py
new file mode 100644
index 0000000..826bed8
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/TestWatchpointEvents.py
@@ -0,0 +1,110 @@
+"""Test that adding, deleting and modifying watchpoints sends the appropriate events."""
+
+from __future__ import print_function
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestWatchpointEvents (TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line numbers that we will step to in main:
+        self.main_source = "main.c"
+
+    @add_test_categories(['pyapi'])
+    def test_with_python_api(self):
+        """Test that adding, deleting and modifying watchpoints sends the appropriate events."""
+        self.build()
+
+        exe = self.getBuildArtifact("a.out")
+
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        self.main_source_spec = lldb.SBFileSpec(self.main_source)
+
+        break_in_main = target.BreakpointCreateBySourceRegex(
+            '// Put a breakpoint here.', self.main_source_spec)
+        self.assertTrue(break_in_main, VALID_BREAKPOINT)
+
+        # Now launch the process, and do not stop at entry point.
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+        # The stop reason of the thread should be breakpoint.
+        threads = lldbutil.get_threads_stopped_at_breakpoint(
+            process, break_in_main)
+
+        if len(threads) != 1:
+            self.fail("Failed to stop at first breakpoint in main.")
+
+        thread = threads[0]
+        frame = thread.GetFrameAtIndex(0)
+        local_var = frame.FindVariable("local_var")
+        self.assertTrue(local_var.IsValid())
+
+        self.listener = lldb.SBListener("com.lldb.testsuite_listener")
+        self.target_bcast = target.GetBroadcaster()
+        self.target_bcast.AddListener(
+            self.listener, lldb.SBTarget.eBroadcastBitWatchpointChanged)
+        self.listener.StartListeningForEvents(
+            self.target_bcast, lldb.SBTarget.eBroadcastBitWatchpointChanged)
+
+        error = lldb.SBError()
+        local_watch = local_var.Watch(True, False, True, error)
+        if not error.Success():
+            self.fail(
+                "Failed to make watchpoint for local_var: %s" %
+                (error.GetCString()))
+
+        self.GetWatchpointEvent(lldb.eWatchpointEventTypeAdded)
+        # Now change some of the features of this watchpoint and make sure we
+        # get events:
+        local_watch.SetEnabled(False)
+        self.GetWatchpointEvent(lldb.eWatchpointEventTypeDisabled)
+
+        local_watch.SetEnabled(True)
+        self.GetWatchpointEvent(lldb.eWatchpointEventTypeEnabled)
+
+        local_watch.SetIgnoreCount(10)
+        self.GetWatchpointEvent(lldb.eWatchpointEventTypeIgnoreChanged)
+
+        condition = "1 == 2"
+        local_watch.SetCondition(condition)
+        self.GetWatchpointEvent(lldb.eWatchpointEventTypeConditionChanged)
+
+        self.assertTrue(local_watch.GetCondition() == condition,
+                        'make sure watchpoint condition is "' + condition + '"')
+
+    def GetWatchpointEvent(self, event_type):
+        # We added a watchpoint so we should get a watchpoint added event.
+        event = lldb.SBEvent()
+        success = self.listener.WaitForEvent(1, event)
+        self.assertTrue(success, "Successfully got watchpoint event")
+        self.assertTrue(
+            lldb.SBWatchpoint.EventIsWatchpointEvent(event),
+            "Event is a watchpoint event.")
+        found_type = lldb.SBWatchpoint.GetWatchpointEventTypeFromEvent(event)
+        self.assertTrue(
+            found_type == event_type,
+            "Event is not correct type, expected: %d, found: %d" %
+            (event_type,
+             found_type))
+        # There shouldn't be another event waiting around:
+        found_event = self.listener.PeekAtNextEventForBroadcasterWithType(
+            self.target_bcast, lldb.SBTarget.eBroadcastBitBreakpointChanged, event)
+        if found_event:
+            print("Found an event I didn't expect: ", event)
+
+        self.assertTrue(not found_event, "Only one event per change.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_events/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/TestValueOfVectorVariable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/TestValueOfVectorVariable.py
new file mode 100644
index 0000000..81b44c0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/TestValueOfVectorVariable.py
@@ -0,0 +1,47 @@
+"""
+Test displayed value of a vector variable while doing watchpoint operations
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestValueOfVectorVariableTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_value_of_vector_variable_using_watchpoint_set(self):
+        """Test verify displayed value of vector variable."""
+        exe = self.getBuildArtifact("a.out")
+        d = {'C_SOURCES': self.source, 'EXE': exe}
+        self.build(dictionary=d)
+        self.setTearDownCleanup(dictionary=d)
+        self.value_of_vector_variable_with_watchpoint_set()
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Our simple source filename.
+        self.source = 'main.c'
+
+    def value_of_vector_variable_with_watchpoint_set(self):
+        """Test verify displayed value of vector variable"""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Set break to get a frame
+        self.runCmd("b main")
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # Value of a vector variable should be displayed correctly
+        self.expect(
+            "watchpoint set variable global_vector",
+            WATCHPOINT_CREATED,
+            substrs=['new value: (1, 2, 3, 4)'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_on_vectors/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/Makefile
new file mode 100644
index 0000000..de4ec12
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/Makefile
@@ -0,0 +1,4 @@
+ENABLE_THREADS := YES
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py
new file mode 100644
index 0000000..326028e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py
@@ -0,0 +1,103 @@
+"""
+Test lldb watchpoint that uses 'watchpoint set -w write -s size' to watch a pointed location with size.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class WatchLocationUsingWatchpointSetTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Our simple source filename.
+        self.source = 'main.cpp'
+        # Find the line number to break inside main().
+        self.line = line_number(
+            self.source, '// Set break point at this line.')
+        # This is for verifying that watch location works.
+        self.violating_func = "do_bad_thing_with_location"
+        # Build dictionary to have unique executable names for each test
+        # method.
+
+    @skipIf(
+        oslist=["linux"],
+        archs=[
+            'aarch64',
+            'arm'],
+        bugnumber="llvm.org/pr26031")
+    def test_watchlocation_using_watchpoint_set(self):
+        """Test watching a location with 'watchpoint set expression -w write -s size' option."""
+        self.build()
+        self.setTearDownCleanup()
+
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
+        lldbutil.run_break_set_by_file_and_line(
+            self, None, self.line, num_expected_locations=1)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        # We should be stopped again due to the breakpoint.
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # Now let's set a write-type watchpoint pointed to by 'g_char_ptr' and
+        # with offset as 7.
+        # The main.cpp, by design, misbehaves by not following the agreed upon
+        # protocol of only accessing the allowable index range of [0, 6].
+        self.expect(
+            "watchpoint set expression -w write -s 1 -- g_char_ptr + 7",
+            WATCHPOINT_CREATED,
+            substrs=[
+                'Watchpoint created',
+                'size = 1',
+                'type = w'])
+        self.runCmd("expr unsigned val = g_char_ptr[7]; val")
+        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
+                    endstr=' = 0')
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should be 0 initially.
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = 0'])
+
+        self.runCmd("process continue")
+
+        # We should be stopped again due to the watchpoint (write type), but
+        # only once.  The stop reason of the thread should be watchpoint.
+        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
+                    substrs=['stopped',
+                             'stop reason = watchpoint',
+                             self.violating_func])
+
+        # Switch to the thread stopped due to watchpoint and issue some
+        # commands.
+        self.switch_to_thread_with_stop_reason(lldb.eStopReasonWatchpoint)
+        self.runCmd("thread backtrace")
+        self.runCmd("expr unsigned val = g_char_ptr[7]; val")
+        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
+                    endstr=' = 99')
+
+        # Use the '-v' option to do verbose listing of the watchpoint.
+        # The hit count should now be the same as the number of threads that
+        # stopped on a watchpoint.
+        threads = lldbutil.get_stopped_threads(
+            self.process(), lldb.eStopReasonWatchpoint)
+        self.expect("watchpoint list -v",
+                    substrs=['hit_count = %d' % len(threads)])
+
+        self.runCmd("thread backtrace all")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/main.cpp
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_set_command/main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/TestWatchpointSizes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/TestWatchpointSizes.py
new file mode 100644
index 0000000..e6634f1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/TestWatchpointSizes.py
@@ -0,0 +1,122 @@
+"""
+Test watchpoint size cases (1-byte, 2-byte, 4-byte).
+Make sure we can watch all bytes, words or double words individually
+when they are packed in a 8-byte region.
+
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class WatchpointSizeTestCase(TestBase):
+    NO_DEBUG_INFO_TESTCASE = True
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+
+        # Source filename.
+        self.source = 'main.c'
+
+        # Output filename.
+        self.exe_name = self.getBuildArtifact("a.out")
+        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
+
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
+    def test_byte_size_watchpoints_with_byte_selection(self):
+        """Test to selectively watch different bytes in a 8-byte array."""
+        self.run_watchpoint_size_test('byteArray', 8, '1')
+
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
+    def test_two_byte_watchpoints_with_word_selection(self):
+        """Test to selectively watch different words in an 8-byte word array."""
+        self.run_watchpoint_size_test('wordArray', 4, '2')
+
+    # Read-write watchpoints not supported on SystemZ
+    @expectedFailureAll(archs=['s390x'])
+    def test_four_byte_watchpoints_with_dword_selection(self):
+        """Test to selectively watch two double words in an 8-byte dword array."""
+        self.run_watchpoint_size_test('dwordArray', 2, '4')
+
+    def run_watchpoint_size_test(self, arrayName, array_size, watchsize):
+        self.build(dictionary=self.d)
+        self.setTearDownCleanup(dictionary=self.d)
+
+        exe = self.getBuildArtifact(self.exe_name)
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        # Detect line number after which we are going to increment arrayName.
+        loc_line = line_number('main.c', '// About to write ' + arrayName)
+
+        # Set a breakpoint on the line detected above.
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", loc_line, num_expected_locations=1, loc_exact=True)
+
+        # Run the program.
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        for i in range(array_size):
+            # We should be stopped again due to the breakpoint.
+            # The stop reason of the thread should be breakpoint.
+            self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                        substrs=['stopped', 'stop reason = breakpoint'])
+
+            # Set a read_write type watchpoint arrayName
+            watch_loc = arrayName + "[" + str(i) + "]"
+            self.expect(
+                "watchpoint set variable -w read_write " +
+                watch_loc,
+                WATCHPOINT_CREATED,
+                substrs=[
+                    'Watchpoint created',
+                    'size = ' +
+                    watchsize,
+                    'type = rw'])
+
+            # Use the '-v' option to do verbose listing of the watchpoint.
+            # The hit count should be 0 initially.
+            self.expect("watchpoint list -v", substrs=['hit_count = 0'])
+
+            self.runCmd("process continue")
+
+            # We should be stopped due to the watchpoint.
+            # The stop reason of the thread should be watchpoint.
+            self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
+                        substrs=['stopped', 'stop reason = watchpoint'])
+
+            # Use the '-v' option to do verbose listing of the watchpoint.
+            # The hit count should now be 1.
+            self.expect("watchpoint list -v",
+                        substrs=['hit_count = 1'])
+
+            self.runCmd("process continue")
+
+            # We should be stopped due to the watchpoint.
+            # The stop reason of the thread should be watchpoint.
+            self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
+                        substrs=['stopped', 'stop reason = watchpoint'])
+
+            # Use the '-v' option to do verbose listing of the watchpoint.
+            # The hit count should now be 1.
+            # Verify hit_count has been updated after value has been read.
+            self.expect("watchpoint list -v",
+                        substrs=['hit_count = 2'])
+
+            # Delete the watchpoint immediately, but set auto-confirm to true
+            # first.
+            self.runCmd("settings set auto-confirm true")
+            self.expect(
+                "watchpoint delete",
+                substrs=['All watchpoints removed.'])
+            # Restore the original setting of auto-confirm.
+            self.runCmd("settings clear auto-confirm")
+
+            self.runCmd("process continue")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_size/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/concurrent_base.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/concurrent_base.py
index 574b305..6acd71c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/concurrent_base.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/concurrent_base.py
@@ -10,12 +10,9 @@
 verified to match the expected number of events.
 """
 
-from __future__ import print_function
 
 
 import unittest2
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/configuration.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/configuration.py
index c6cec1a..09fc646 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/configuration.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/configuration.py
@@ -12,8 +12,6 @@
 
 # System modules
 import os
-import platform
-import subprocess
 
 
 # Third-party modules
@@ -27,16 +25,18 @@
 suite = unittest2.TestSuite()
 
 # The list of categories we said we care about
-categoriesList = None
+categories_list = None
 # set to true if we are going to use categories for cherry-picking test cases
-useCategories = False
+use_categories = False
 # Categories we want to skip
-skipCategories = ["darwin-log"]
+skip_categories = ["darwin-log"]
+# Categories we expect to fail
+xfail_categories = []
 # use this to track per-category failures
-failuresPerCategory = {}
+failures_per_category = {}
 
 # The path to LLDB.framework is optional.
-lldbFrameworkPath = None
+lldb_framework_path = None
 
 # Test suite repeat count.  Can be overwritten with '-# count'.
 count = 1
@@ -45,6 +45,13 @@
 arch = None        # Must be initialized after option parsing
 compiler = None    # Must be initialized after option parsing
 
+# The overriden dwarf verison.
+dwarf_version = 0
+
+# Any overridden settings.
+# Always disable default dynamic types for testing purposes.
+settings = [('target.prefer-dynamic-value', 'no-dynamic-values')]
+
 # Path to the FileCheck testing tool. Not optional.
 filecheck = None
 
@@ -56,13 +63,6 @@
 # The filters (testclass.testmethod) used to admit tests into our test suite.
 filters = []
 
-# By default, we skip long running test case.  Use '-l' option to override.
-skip_long_running_test = True
-
-# Parsable mode silences headers, and any other output this script might generate, and instead
-# prints machine-readable output similar to what clang tests produce.
-parsable = False
-
 # The regular expression pattern to match against eligible filenames as
 # our test cases.
 regexp = None
@@ -112,20 +112,18 @@
 # The base directory in which the tests are being built.
 test_build_dir = None
 
+# The clang module cache directory used by lldb.
+lldb_module_cache_dir = None
+# The clang module cache directory used by clang.
+clang_module_cache_dir = None
+
 # The only directory to scan for tests. If multiple test directories are
 # specified, and an exclusive test subdirectory is specified, the latter option
 # takes precedence.
 exclusive_test_subdir = None
 
-# Parallel execution settings
-is_inferior_test_runner = False
-num_threads = None
-no_multiprocess_test_runner = False
-test_runner_name = None
-
 # Test results handling globals
 results_filename = None
-results_port = None
 results_formatter_name = None
 results_formatter_object = None
 results_formatter_options = None
@@ -133,19 +131,18 @@
 
 # Test rerun configuration vars
 rerun_all_issues = False
-rerun_max_file_threhold = 0
 
 # The names of all tests. Used to assert we don't have two tests with the
 # same base name.
 all_tests = set()
 
 def shouldSkipBecauseOfCategories(test_categories):
-    if useCategories:
+    if use_categories:
         if len(test_categories) == 0 or len(
-                categoriesList & set(test_categories)) == 0:
+                categories_list & set(test_categories)) == 0:
             return True
 
-    for category in skipCategories:
+    for category in skip_categories:
         if category in test_categories:
             return True
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/darwin_log.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/darwin_log.py
index 8756eca..9d473fa 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/darwin_log.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/darwin_log.py
@@ -6,7 +6,6 @@
 from __future__ import print_function
 
 import json
-import os
 import platform
 import re
 import sys
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py
index 0493a43..ec17cb7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/decorators.py
@@ -1,10 +1,8 @@
 from __future__ import absolute_import
-from __future__ import print_function
 
 # System modules
-from distutils.version import LooseVersion, StrictVersion
+from distutils.version import LooseVersion
 from functools import wraps
-import inspect
 import os
 import platform
 import re
@@ -17,8 +15,6 @@
 import unittest2
 
 # LLDB modules
-import use_lldb_suite
-
 import lldb
 from . import configuration
 from . import test_categories
@@ -197,11 +193,9 @@
                 macos_version[0],
                 macos_version[1],
                 platform.mac_ver()[0])))
-        skip_for_dwarf_version = (
-             dwarf_version is None) or (
-                 (self.getDebugInfo() is 'dwarf') and
-                 _check_expected_version(
-                     dwarf_version[0], dwarf_version[1], self.getDwarfVersion()))
+        skip_for_dwarf_version = (dwarf_version is None) or (
+            _check_expected_version(dwarf_version[0], dwarf_version[1],
+                                    self.getDwarfVersion()))
 
         # For the test to be skipped, all specified (e.g. not None) parameters must be True.
         # An unspecified parameter means "any", so those are marked skip by default.  And we skip
@@ -369,7 +363,7 @@
             else:
                 return "%s simulator is not supported on this system." % platform
         except subprocess.CalledProcessError:
-            return "%s is not supported on this system (xcodebuild failed)." % feature
+            return "Simulators are unsupported on this system (xcodebuild failed)"
 
     return skipTestIfFn(should_skip_simulator_test)
 
@@ -522,6 +516,9 @@
 def skipIfNoSBHeaders(func):
     """Decorate the item to mark tests that should be skipped when LLDB is built with no SB API headers."""
     def are_sb_headers_missing():
+        if lldb.remote_platform:
+            return "skip because SBHeaders tests make no sense remotely"
+
         if lldbplatformutil.getHostPlatform() == 'darwin':
             header = os.path.join(
                 os.environ["LLDB_LIB_DIR"],
@@ -596,11 +593,6 @@
     """Decorate the item to skip tests that should be skipped on Windows."""
     return skipIfPlatform(["windows"])(func)
 
-def skipIfTargetAndroid(func):
-    return unittest2.skipIf(lldbplatformutil.target_is_android(),
-                                "skip on target Android")(func)
-
-
 def skipUnlessWindows(func):
     """Decorate the item to skip tests that should be skipped on any non-Windows platform."""
     return skipUnlessPlatform(["windows"])(func)
@@ -651,8 +643,18 @@
     return unittest2.skipUnless(lldbplatformutil.getPlatform() in oslist,
                                 "requires one of %s" % (", ".join(oslist)))
 
+def skipUnlessArch(arch):
+    """Decorate the item to skip tests unless running on the specified architecture."""
 
-def skipIfTargetAndroid(api_levels=None, archs=None):
+    def arch_doesnt_match(self):
+        target_arch = self.getArchitecture()
+        if arch != target_arch:
+            return "Test only runs on " + arch + ", but target arch is " + target_arch
+        return None
+
+    return skipTestIfFn(arch_doesnt_match)
+
+def skipIfTargetAndroid(bugnumber=None, api_levels=None, archs=None):
     """Decorator to skip tests when the target is Android.
 
     Arguments:
@@ -665,7 +667,8 @@
         _skip_for_android(
             "skipping for android",
             api_levels,
-            archs))
+            archs),
+        bugnumber)
 
 def skipUnlessSupportedTypeAttribute(attr):
     """Decorate the item to skip test unless Clang supports type __attribute__(attr)."""
@@ -691,7 +694,7 @@
 
         f = tempfile.NamedTemporaryFile()
         cmd = "echo 'int main() {}' | " \
-              "%s -g -glldb -O1 -S -emit-llvm -x c -o %s -" % (compiler_path, f.name)
+              "%s -g -glldb -O1 -Xclang -femit-debug-entry-values -S -emit-llvm -x c -o %s -" % (compiler_path, f.name)
         if os.popen(cmd).close() is not None:
             return "Compiler can't compile with call site info enabled"
 
@@ -792,13 +795,21 @@
         return None
     return skipTestIfFn(is_compiler_with_address_sanitizer)(func)
 
-def skipIfXmlSupportMissing(func):
+def _get_bool_config_skip_if_decorator(key):
     config = lldb.SBDebugger.GetBuildConfiguration()
-    xml = config.GetValueForKey("xml")
-
+    value_node = config.GetValueForKey(key)
     fail_value = True # More likely to notice if something goes wrong
-    have_xml = xml.GetValueForKey("value").GetBooleanValue(fail_value)
-    return unittest2.skipIf(not have_xml, "requires xml support")(func)
+    have = value_node.GetValueForKey("value").GetBooleanValue(fail_value)
+    return unittest2.skipIf(not have, "requires " + key)
+
+def skipIfCursesSupportMissing(func):
+    return _get_bool_config_skip_if_decorator("curses")(func)
+
+def skipIfXmlSupportMissing(func):
+    return _get_bool_config_skip_if_decorator("xml")(func)
+
+def skipIfEditlineSupportMissing(func):
+    return _get_bool_config_skip_if_decorator("editline")(func)
 
 def skipIfLLVMTargetMissing(target):
     config = lldb.SBDebugger.GetBuildConfiguration()
@@ -828,9 +839,10 @@
                 return "%s is not supported on this system." % feature
     return skipTestIfFn(is_feature_enabled)
 
-def skipIfSanitized(func):
+def skipIfAsan(func):
     """Skip this test if the environment is set up to run LLDB itself under ASAN."""
-    def is_sanitized():
-        return (('DYLD_INSERT_LIBRARIES' in os.environ) and
-                'libclang_rt.asan' in os.environ['DYLD_INSERT_LIBRARIES'])
-    return skipTestIfFn(is_sanitized)(func)
+    def is_asan():
+        if ('ASAN_OPTIONS' in os.environ):
+            return "ASAN unsupported"
+        return None
+    return skipTestIfFn(is_asan)(func)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/dosep.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/dosep.py
deleted file mode 100644
index 21010c2..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/dosep.py
+++ /dev/null
@@ -1,1770 +0,0 @@
-"""
-Run the test suite using a separate process for each test file.
-
-Each test will run with a time limit of 10 minutes by default.
-
-Override the default time limit of 10 minutes by setting
-the environment variable LLDB_TEST_TIMEOUT.
-
-E.g., export LLDB_TEST_TIMEOUT=10m
-
-Override the time limit for individual tests by setting
-the environment variable LLDB_[TEST NAME]_TIMEOUT.
-
-E.g., export LLDB_TESTCONCURRENTEVENTS_TIMEOUT=2m
-
-Set to "0" to run without time limit.
-
-E.g., export LLDB_TEST_TIMEOUT=0
-or    export LLDB_TESTCONCURRENTEVENTS_TIMEOUT=0
-
-To collect core files for timed out tests,
-do the following before running dosep.py
-
-OSX
-ulimit -c unlimited
-sudo sysctl -w kern.corefile=core.%P
-
-Linux:
-ulimit -c unlimited
-echo core.%p | sudo tee /proc/sys/kernel/core_pattern
-"""
-
-from __future__ import absolute_import
-from __future__ import print_function
-
-# system packages and modules
-import asyncore
-import distutils.version
-import fnmatch
-import multiprocessing
-import multiprocessing.pool
-import os
-import platform
-import re
-import signal
-import sys
-import threading
-
-from six import StringIO
-from six.moves import queue
-
-# Our packages and modules
-import lldbsuite
-import lldbsuite.support.seven as seven
-
-from . import configuration
-from . import dotest_args
-from lldbsuite.support import optional_with
-from lldbsuite.test_event import dotest_channels
-from lldbsuite.test_event.event_builder import EventBuilder
-from lldbsuite.test_event import formatter
-
-from .test_runner import process_control
-
-# Status codes for running command with timeout.
-eTimedOut, ePassed, eFailed = 124, 0, 1
-
-g_session_dir = None
-g_runner_context = None
-output_lock = None
-test_counter = None
-total_tests = None
-test_name_len = None
-dotest_options = None
-RESULTS_FORMATTER = None
-RUNNER_PROCESS_ASYNC_MAP = None
-RESULTS_LISTENER_CHANNEL = None
-
-"""Contains an optional function pointer that can return the worker index
-   for the given thread/process calling it.  Returns a 0-based index."""
-GET_WORKER_INDEX = None
-
-
-def setup_global_variables(
-        lock, counter, total, name_len, options, worker_index_map):
-    global output_lock, test_counter, total_tests, test_name_len
-    global dotest_options
-    output_lock = lock
-    test_counter = counter
-    total_tests = total
-    test_name_len = name_len
-    dotest_options = options
-
-    if worker_index_map is not None:
-        # We'll use the output lock for this to avoid sharing another lock.
-        # This won't be used much.
-        index_lock = lock
-
-        def get_worker_index_use_pid():
-            """Returns a 0-based, process-unique index for the worker."""
-            pid = os.getpid()
-            with index_lock:
-                if pid not in worker_index_map:
-                    worker_index_map[pid] = len(worker_index_map)
-                return worker_index_map[pid]
-
-        global GET_WORKER_INDEX
-        GET_WORKER_INDEX = get_worker_index_use_pid
-
-
-def report_test_failure(name, command, output, timeout):
-    global output_lock
-    with output_lock:
-        if not (RESULTS_FORMATTER and RESULTS_FORMATTER.is_using_terminal()):
-            print(file=sys.stderr)
-            print(output, file=sys.stderr)
-            if timeout:
-                timeout_str = " (TIMEOUT)"
-            else:
-                timeout_str = ""
-            print("[%s FAILED]%s" % (name, timeout_str), file=sys.stderr)
-            print("Command invoked: %s" % ' '.join(command), file=sys.stderr)
-        update_progress(name)
-
-
-def report_test_pass(name, output):
-    global output_lock
-    with output_lock:
-        update_progress(name)
-
-
-def update_progress(test_name=""):
-    global output_lock, test_counter, total_tests, test_name_len
-    with output_lock:
-        counter_len = len(str(total_tests))
-        if not (RESULTS_FORMATTER and RESULTS_FORMATTER.is_using_terminal()):
-            sys.stderr.write(
-                "\r%*d out of %d test suites processed - %-*s" %
-                (counter_len, test_counter.value, total_tests,
-                 test_name_len.value, test_name))
-        if len(test_name) > test_name_len.value:
-            test_name_len.value = len(test_name)
-        test_counter.value += 1
-        sys.stdout.flush()
-        sys.stderr.flush()
-
-
-def parse_test_results(output):
-    passes = 0
-    failures = 0
-    unexpected_successes = 0
-    for result in output:
-        pass_count = re.search("^RESULT:.*([0-9]+) passes",
-                               result, re.MULTILINE)
-        fail_count = re.search("^RESULT:.*([0-9]+) failures",
-                               result, re.MULTILINE)
-        error_count = re.search("^RESULT:.*([0-9]+) errors",
-                                result, re.MULTILINE)
-        unexpected_success_count = re.search(
-            "^RESULT:.*([0-9]+) unexpected successes", result, re.MULTILINE)
-        if pass_count is not None:
-            passes = passes + int(pass_count.group(1))
-        if fail_count is not None:
-            failures = failures + int(fail_count.group(1))
-        if unexpected_success_count is not None:
-            unexpected_successes = unexpected_successes + \
-                int(unexpected_success_count.group(1))
-        if error_count is not None:
-            failures = failures + int(error_count.group(1))
-    return passes, failures, unexpected_successes
-
-
-class DoTestProcessDriver(process_control.ProcessDriver):
-    """Drives the dotest.py inferior process and handles bookkeeping."""
-
-    def __init__(self, output_file, output_file_lock, pid_events, file_name,
-                 soft_terminate_timeout):
-        super(DoTestProcessDriver, self).__init__(
-            soft_terminate_timeout=soft_terminate_timeout)
-        self.output_file = output_file
-        self.output_lock = optional_with.optional_with(output_file_lock)
-        self.pid_events = pid_events
-        self.results = None
-        self.file_name = file_name
-
-    def write(self, content):
-        with self.output_lock:
-            self.output_file.write(content)
-
-    def on_process_started(self):
-        if self.pid_events:
-            self.pid_events.put_nowait(('created', self.process.pid))
-
-    def on_process_exited(self, command, output, was_timeout, exit_status):
-        if self.pid_events:
-            # No point in culling out those with no exit_status (i.e.
-            # those we failed to kill). That would just cause
-            # downstream code to try to kill it later on a Ctrl-C. At
-            # this point, a best-effort-to-kill already took place. So
-            # call it destroyed here.
-            self.pid_events.put_nowait(('destroyed', self.process.pid))
-
-        # Override the exit status if it was a timeout.
-        if was_timeout:
-            exit_status = eTimedOut
-
-        # If we didn't end up with any output, call it empty for
-        # stdout/stderr.
-        if output is None:
-            output = ('', '')
-
-        # Now parse the output.
-        passes, failures, unexpected_successes = parse_test_results(output)
-        if exit_status == 0:
-            # stdout does not have any useful information from 'dotest.py',
-            # only stderr does.
-            report_test_pass(self.file_name, output[1])
-        else:
-            report_test_failure(
-                self.file_name,
-                command,
-                output[1],
-                was_timeout)
-
-        # Save off the results for the caller.
-        self.results = (
-            self.file_name,
-            exit_status,
-            passes,
-            failures,
-            unexpected_successes)
-
-    def on_timeout_pre_kill(self):
-        # We're just about to have a timeout take effect.  Here's our chance
-        # to do a pre-kill action.
-
-        # For now, we look to see if the lldbsuite.pre_kill module has a
-        # runner for our platform.
-        module_name = "lldbsuite.pre_kill_hook." + platform.system().lower()
-        import importlib
-        try:
-            module = importlib.import_module(module_name)
-        except ImportError:
-            # We don't have one for this platform.  Skip.
-            sys.stderr.write("\nwarning: no timeout handler module: " +
-                             module_name + "\n")
-            return
-
-        # Try to run the pre-kill-hook method.
-        try:
-            # Run the pre-kill command.
-            output_io = StringIO()
-            module.do_pre_kill(self.pid, g_runner_context, output_io)
-
-            # Write the output to a filename associated with the test file and
-            # pid.
-            MAX_UNCOMPRESSED_BYTE_COUNT = 10 * 1024
-
-            content = output_io.getvalue()
-            compress_output = len(content) > MAX_UNCOMPRESSED_BYTE_COUNT
-            basename = "{}-{}.sample".format(self.file_name, self.pid)
-            sample_path = os.path.join(g_session_dir, basename)
-
-            if compress_output:
-                # Write compressed output into a .zip file.
-                from zipfile import ZipFile, ZIP_DEFLATED
-                zipfile = sample_path + ".zip"
-                with ZipFile(zipfile, "w", ZIP_DEFLATED) as sample_zip:
-                    sample_zip.writestr(basename, content)
-            else:
-                # Write raw output into a text file.
-                with open(sample_path, "w") as output_file:
-                    output_file.write(content)
-        except Exception as e:
-            sys.stderr.write("caught exception while running "
-                             "pre-kill action: {}\n".format(e))
-            return
-
-    def is_exceptional_exit(self):
-        """Returns whether the process returned a timeout.
-
-        Not valid to call until after on_process_exited() completes.
-
-        @return True if the exit is an exceptional exit (e.g. signal on
-        POSIX); False otherwise.
-        """
-        if self.results is None:
-            raise Exception(
-                "exit status checked before results are available")
-        return self.process_helper.is_exceptional_exit(
-            self.results[1])
-
-    def exceptional_exit_details(self):
-        if self.results is None:
-            raise Exception(
-                "exit status checked before results are available")
-        return self.process_helper.exceptional_exit_details(self.results[1])
-
-    def is_timeout(self):
-        if self.results is None:
-            raise Exception(
-                "exit status checked before results are available")
-        return self.results[1] == eTimedOut
-
-
-def get_soft_terminate_timeout():
-    # Defaults to 10 seconds, but can set
-    # LLDB_TEST_SOFT_TERMINATE_TIMEOUT to a floating point
-    # number in seconds.  This value indicates how long
-    # the test runner will wait for the dotest inferior to
-    # handle a timeout via a soft terminate before it will
-    # assume that failed and do a hard terminate.
-
-    # TODO plumb through command-line option
-    return float(os.environ.get('LLDB_TEST_SOFT_TERMINATE_TIMEOUT', 10.0))
-
-
-def want_core_on_soft_terminate():
-    # TODO plumb through command-line option
-    if platform.system() == 'Linux':
-        return True
-    else:
-        return False
-
-
-def send_events_to_collector(events, command):
-    """Sends the given events to the collector described in the command line.
-
-    @param events the list of events to send to the test event collector.
-    @param command the inferior command line which contains the details on
-    how to connect to the test event collector.
-    """
-    if events is None or len(events) == 0:
-        # Nothing to do.
-        return
-
-    # Find the port we need to connect to from the --results-port option.
-    try:
-        arg_index = command.index("--results-port") + 1
-    except ValueError:
-        # There is no results port, so no way to communicate back to
-        # the event collector.  This is not a problem if we're not
-        # using event aggregation.
-        # TODO flag as error once we always use the event system
-        print(
-            "INFO: no event collector, skipping post-inferior test "
-            "event reporting")
-        return
-
-    if arg_index >= len(command):
-        raise Exception(
-            "expected collector port at index {} in {}".format(
-                arg_index, command))
-    event_port = int(command[arg_index])
-
-    # Create results formatter connected back to collector via socket.
-    config = formatter.FormatterConfig()
-    config.port = event_port
-    formatter_spec = formatter.create_results_formatter(config)
-    if formatter_spec is None or formatter_spec.formatter is None:
-        raise Exception(
-            "Failed to create socket-based ResultsFormatter "
-            "back to test event collector")
-
-    # Send the events: the port-based event just pickles the content
-    # and sends over to the server side of the socket.
-    for event in events:
-        formatter_spec.formatter.handle_event(event)
-
-    # Cleanup
-    if formatter_spec.cleanup_func is not None:
-        formatter_spec.cleanup_func()
-
-
-def send_inferior_post_run_events(
-        command, worker_index, process_driver, test_filename):
-    """Sends any test events that should be generated after the inferior runs.
-
-    These events would include timeouts and exceptional (i.e. signal-returning)
-    process completion results.
-
-    @param command the list of command parameters passed to subprocess.Popen().
-    @param worker_index the worker index (possibly None) used to run
-    this process
-    @param process_driver the ProcessDriver-derived instance that was used
-    to run the inferior process.
-    @param test_filename the full path to the Python test file that is being
-    run.
-    """
-    if process_driver is None:
-        raise Exception("process_driver must not be None")
-    if process_driver.results is None:
-        # Invalid condition - the results should have been set one way or
-        # another, even in a timeout.
-        raise Exception("process_driver.results were not set")
-
-    # The code below fills in the post events struct.  If there are any post
-    # events to fire up, we'll try to make a connection to the socket and
-    # provide the results.
-    post_events = []
-
-    # Handle signal/exceptional exits.
-    if process_driver.is_exceptional_exit():
-        (code, desc) = process_driver.exceptional_exit_details()
-        post_events.append(
-            EventBuilder.event_for_job_exceptional_exit(
-                process_driver.pid,
-                worker_index,
-                code,
-                desc,
-                test_filename,
-                command))
-
-    # Handle timeouts.
-    if process_driver.is_timeout():
-        post_events.append(EventBuilder.event_for_job_timeout(
-            process_driver.pid,
-            worker_index,
-            test_filename,
-            command))
-
-    if len(post_events) > 0:
-        send_events_to_collector(post_events, command)
-
-
-def call_with_timeout(
-        command, timeout, name, inferior_pid_events, test_filename):
-    # Add our worker index (if we have one) to all test events
-    # from this inferior.
-    worker_index = None
-    if GET_WORKER_INDEX is not None:
-        try:
-            worker_index = GET_WORKER_INDEX()
-            command.extend([
-                "--event-add-entries",
-                "worker_index={}:int".format(worker_index)])
-        except:  # pylint: disable=bare-except
-            # Ctrl-C does bad things to multiprocessing.Manager.dict()
-            # lookup.  Just swallow it.
-            pass
-
-    # Create the inferior dotest.py ProcessDriver.
-    soft_terminate_timeout = get_soft_terminate_timeout()
-    want_core = want_core_on_soft_terminate()
-
-    process_driver = DoTestProcessDriver(
-        sys.stdout,
-        output_lock,
-        inferior_pid_events,
-        name,
-        soft_terminate_timeout)
-
-    # Run it with a timeout.
-    process_driver.run_command_with_timeout(command, timeout, want_core)
-
-    # Return the results.
-    if not process_driver.results:
-        # This is truly exceptional.  Even a failing or timed out
-        # binary should have called the results-generation code.
-        raise Exception("no test results were generated whatsoever")
-
-    # Handle cases where the test inferior cannot adequately provide
-    # meaningful results to the test event system.
-    send_inferior_post_run_events(
-        command,
-        worker_index,
-        process_driver,
-        test_filename)
-
-    return process_driver.results
-
-
-def process_file(test_file, dotest_argv, inferior_pid_events):
-    """Run tests in the specified file in a subprocess and gather the results."""
-    results = []
-    base_name = os.path.basename(test_file)
-
-    import __main__ as main
-    global dotest_options
-    if not dotest_options.p or re.search(dotest_options.p, base_name):
-        script_file = main.__file__
-        command = ([sys.executable, script_file] +
-                   dotest_argv +
-                   ["-S", dotest_options.session_file_format] +
-                   ["--inferior", "-p", base_name, os.path.dirname(test_file)])
-
-        timeout_name = os.path.basename(os.path.splitext(base_name)[0]).upper()
-
-        timeout = (os.getenv("LLDB_%s_TIMEOUT" % timeout_name) or
-                   getDefaultTimeout(dotest_options.lldb_platform_name))
-
-        results.append(call_with_timeout(
-            command, timeout, base_name, inferior_pid_events, test_file))
-
-    # result = (name, status, passes, failures, unexpected_successes)
-    timed_out = [name for name, status, _, _, _ in results
-                 if status == eTimedOut]
-    passed = [name for name, status, _, _, _ in results
-              if status == ePassed]
-    failed = [name for name, status, _, _, _ in results
-              if status != ePassed]
-    unexpected_passes = [
-        name for name, _, _, _, unexpected_successes in results
-        if unexpected_successes > 0]
-
-    pass_count = sum([result[2] for result in results])
-    fail_count = sum([result[3] for result in results])
-
-    return (
-        timed_out, passed, failed, unexpected_passes, pass_count, fail_count)
-
-in_q = None
-out_q = None
-
-
-def process_dir_worker_multiprocessing(
-        a_output_lock, a_test_counter, a_total_tests, a_test_name_len,
-        a_dotest_options, job_queue, result_queue, inferior_pid_events,
-        worker_index_map):
-    """Worker thread main loop when in multiprocessing mode.
-    Takes one directory specification at a time and works on it."""
-
-    # Shut off interrupt handling in the child process.
-    signal.signal(signal.SIGINT, signal.SIG_IGN)
-    if hasattr(signal, 'SIGHUP'):
-        signal.signal(signal.SIGHUP, signal.SIG_IGN)
-
-    # Setup the global state for the worker process.
-    setup_global_variables(
-        a_output_lock, a_test_counter, a_total_tests, a_test_name_len,
-        a_dotest_options, worker_index_map)
-
-    # Keep grabbing entries from the queue until done.
-    while not job_queue.empty():
-        try:
-            job = job_queue.get(block=False)
-            result = process_file(job[0], job[1], job[2],
-                                 inferior_pid_events)
-            result_queue.put(result)
-        except queue.Empty:
-            # Fine, we're done.
-            pass
-
-
-def process_file_worker_multiprocessing_pool(args):
-    return process_file(*args)
-
-
-def process_file_worker_threading(job_queue, result_queue, inferior_pid_events):
-    """Worker thread main loop when in threading mode.
-
-    This one supports the hand-rolled pooling support.
-
-    Takes one directory specification at a time and works on it."""
-
-    # Keep grabbing entries from the queue until done.
-    while not job_queue.empty():
-        try:
-            job = job_queue.get(block=False)
-            result = process_file(job[0], job[1], inferior_pid_events)
-            result_queue.put(result)
-        except queue.Empty:
-            # Fine, we're done.
-            pass
-
-
-def process_file_worker_threading_pool(args):
-    return process_file(*args)
-
-
-def process_file_mapper_inprocess(args):
-    """Map adapter for running the subprocess-based, non-threaded test runner.
-
-    @param args the process work item tuple
-    @return the test result tuple
-    """
-    return process_file(*args)
-
-
-def collect_active_pids_from_pid_events(event_queue):
-    """
-    Returns the set of what should be active inferior pids based on
-    the event stream.
-
-    @param event_queue a multiprocessing.Queue containing events of the
-    form:
-         ('created', pid)
-         ('destroyed', pid)
-
-    @return set of inferior dotest.py pids activated but never completed.
-    """
-    active_pid_set = set()
-    while not event_queue.empty():
-        pid_event = event_queue.get_nowait()
-        if pid_event[0] == 'created':
-            active_pid_set.add(pid_event[1])
-        elif pid_event[0] == 'destroyed':
-            active_pid_set.remove(pid_event[1])
-    return active_pid_set
-
-
-def kill_all_worker_processes(workers, inferior_pid_events):
-    """
-    Kills all specified worker processes and their process tree.
-
-    @param workers a list of multiprocess.Process worker objects.
-    @param inferior_pid_events a multiprocess.Queue that contains
-    all inferior create and destroy events.  Used to construct
-    the list of child pids still outstanding that need to be killed.
-    """
-    for worker in workers:
-        worker.terminate()
-        worker.join()
-
-    # Add all the child test pids created.
-    active_pid_set = collect_active_pids_from_pid_events(
-        inferior_pid_events)
-    for inferior_pid in active_pid_set:
-        print("killing inferior pid {}".format(inferior_pid))
-        os.kill(inferior_pid, signal.SIGKILL)
-
-
-def kill_all_worker_threads(workers, inferior_pid_events):
-    """
-    Kills all specified worker threads and their process tree.
-
-    @param workers a list of multiprocess.Process worker objects.
-    @param inferior_pid_events a multiprocess.Queue that contains
-    all inferior create and destroy events.  Used to construct
-    the list of child pids still outstanding that need to be killed.
-    """
-
-    # Add all the child test pids created.
-    active_pid_set = collect_active_pids_from_pid_events(
-        inferior_pid_events)
-    for inferior_pid in active_pid_set:
-        print("killing inferior pid {}".format(inferior_pid))
-        os.kill(inferior_pid, signal.SIGKILL)
-
-    # We don't have a way to nuke the threads.  However, since we killed
-    # all the inferiors, and we drained the job queue, this will be
-    # good enough.  Wait cleanly for each worker thread to wrap up.
-    for worker in workers:
-        worker.join()
-
-
-def find_test_files_in_dir_tree(dir_root):
-    """Returns all the test files in the given dir hierarchy.
-
-    @param dir_root the path to the directory to start scanning
-    for test files.  All files in this directory and all its children
-    directory trees will be searched.
-    """
-    for root, _, files in os.walk(dir_root, topdown=False):
-        def is_test_filename(test_dir, base_filename):
-            """Returns True if the given filename matches the test name format.
-
-            @param test_dir the directory to check.  Should be absolute or
-            relative to current working directory.
-
-            @param base_filename the base name of the filename to check for a
-            dherence to the python test case filename format.
-
-            @return True if name matches the python test case filename format.
-            """
-            # Not interested in symbolically linked files.
-            if os.path.islink(os.path.join(test_dir, base_filename)):
-                return False
-            # Only interested in test files with the "Test*.py" naming pattern.
-            return (base_filename.startswith("Test") and
-                    base_filename.endswith(".py"))
-
-        for f in files:
-            if is_test_filename(root, f):
-                yield os.path.join(root, f)
-
-
-def initialize_global_vars_common(num_threads, test_work_items, session_dir,
-                                  runner_context):
-    global g_session_dir, g_runner_context, total_tests, test_counter
-    global test_name_len
-
-    total_tests = len(test_work_items)
-    test_counter = multiprocessing.Value('i', 0)
-    test_name_len = multiprocessing.Value('i', 0)
-    g_session_dir = session_dir
-    g_runner_context = runner_context
-    if not (RESULTS_FORMATTER and RESULTS_FORMATTER.is_using_terminal()):
-        print(
-            "Testing: %d test suites, %d thread%s" %
-            (total_tests,
-             num_threads,
-             (num_threads > 1) *
-                "s"),
-            file=sys.stderr)
-    update_progress()
-
-
-def initialize_global_vars_multiprocessing(num_threads, test_work_items,
-                                           session_dir, runner_context):
-    # Initialize the global state we'll use to communicate with the
-    # rest of the flat module.
-    global output_lock
-    output_lock = multiprocessing.RLock()
-
-    initialize_global_vars_common(num_threads, test_work_items, session_dir,
-                                  runner_context)
-
-
-def initialize_global_vars_threading(num_threads, test_work_items, session_dir,
-                                     runner_context):
-    """Initializes global variables used in threading mode.
-
-    @param num_threads specifies the number of workers used.
-
-    @param test_work_items specifies all the work items
-    that will be processed.
-
-    @param session_dir the session directory where test-run-speciif files are
-    written.
-
-    @param runner_context a dictionary of platform-related data that is passed
-    to the timeout pre-kill hook.
-    """
-    # Initialize the global state we'll use to communicate with the
-    # rest of the flat module.
-    global output_lock
-    output_lock = threading.RLock()
-
-    index_lock = threading.RLock()
-    index_map = {}
-
-    def get_worker_index_threading():
-        """Returns a 0-based, thread-unique index for the worker thread."""
-        thread_id = threading.current_thread().ident
-        with index_lock:
-            if thread_id not in index_map:
-                index_map[thread_id] = len(index_map)
-            return index_map[thread_id]
-
-    global GET_WORKER_INDEX
-    GET_WORKER_INDEX = get_worker_index_threading
-
-    initialize_global_vars_common(num_threads, test_work_items, session_dir,
-                                  runner_context)
-
-
-def ctrl_c_loop(main_op_func, done_func, ctrl_c_handler):
-    """Provides a main loop that is Ctrl-C protected.
-
-    The main loop calls the main_op_func() repeatedly until done_func()
-    returns true.  The ctrl_c_handler() method is called with a single
-    int parameter that contains the number of times the ctrl_c has been
-    hit (starting with 1).  The ctrl_c_handler() should mutate whatever
-    it needs to have the done_func() return True as soon as it is desired
-    to exit the loop.
-    """
-    done = False
-    ctrl_c_count = 0
-
-    while not done:
-        try:
-            # See if we're done.  Start with done check since it is
-            # the first thing executed after a Ctrl-C handler in the
-            # following loop.
-            done = done_func()
-            if not done:
-                # Run the main op once.
-                main_op_func()
-
-        except KeyboardInterrupt:
-            ctrl_c_count += 1
-            ctrl_c_handler(ctrl_c_count)
-
-
-def pump_workers_and_asyncore_map(workers, asyncore_map):
-    """Prunes out completed workers and maintains the asyncore loop.
-
-    The asyncore loop contains the optional socket listener
-    and handlers.  When all workers are complete, this method
-    takes care of stopping the listener.  It also runs the
-    asyncore loop for the given async map for 10 iterations.
-
-    @param workers the list of worker Thread/Process instances.
-
-    @param asyncore_map the asyncore threading-aware map that
-    indicates which channels are in use and still alive.
-    """
-
-    # Check on all the workers, removing them from the workers
-    # list as they complete.
-    dead_workers = []
-    for worker in workers:
-        # This non-blocking join call is what allows us
-        # to still receive keyboard interrupts.
-        worker.join(0.01)
-        if not worker.is_alive():
-            dead_workers.append(worker)
-            # Clear out the completed workers
-    for dead_worker in dead_workers:
-        workers.remove(dead_worker)
-
-    # If there are no more workers and there is a listener,
-    # close the listener.
-    global RESULTS_LISTENER_CHANNEL
-    if len(workers) == 0 and RESULTS_LISTENER_CHANNEL is not None:
-        RESULTS_LISTENER_CHANNEL.close()
-        RESULTS_LISTENER_CHANNEL = None
-
-    # Pump the asyncore map if it isn't empty.
-    if len(asyncore_map) > 0:
-        asyncore.loop(0.1, False, asyncore_map, 10)
-
-
-def handle_ctrl_c(ctrl_c_count, job_queue, workers, inferior_pid_events,
-                  stop_all_inferiors_func):
-    """Performs the appropriate ctrl-c action for non-pool parallel test runners
-
-    @param ctrl_c_count starting with 1, indicates the number of times ctrl-c
-    has been intercepted.  The value is 1 on the first intercept, 2 on the
-    second, etc.
-
-    @param job_queue a Queue object that contains the work still outstanding
-    (i.e. hasn't been assigned to a worker yet).
-
-    @param workers list of Thread or Process workers.
-
-    @param inferior_pid_events specifies a Queue of inferior process
-    construction and destruction events.  Used to build the list of inferior
-    processes that should be killed if we get that far.
-
-    @param stop_all_inferiors_func a callable object that takes the
-    workers and inferior_pid_events parameters (in that order) if a hard
-    stop is to be used on the workers.
-    """
-
-    # Print out which Ctrl-C we're handling.
-    key_name = [
-        "first",
-        "second",
-        "third",
-        "many"]
-
-    if ctrl_c_count < len(key_name):
-        name_index = ctrl_c_count - 1
-    else:
-        name_index = len(key_name) - 1
-    message = "\nHandling {} KeyboardInterrupt".format(key_name[name_index])
-    with output_lock:
-        print(message)
-
-    if ctrl_c_count == 1:
-        # Remove all outstanding items from the work queue so we stop
-        # doing any more new work.
-        while not job_queue.empty():
-            try:
-                # Just drain it to stop more work from being started.
-                job_queue.get_nowait()
-            except queue.Empty:
-                pass
-        with output_lock:
-            print("Stopped more work from being started.")
-    elif ctrl_c_count == 2:
-        # Try to stop all inferiors, even the ones currently doing work.
-        stop_all_inferiors_func(workers, inferior_pid_events)
-    else:
-        with output_lock:
-            print("All teardown activities kicked off, should finish soon.")
-
-
-def workers_and_async_done(workers, async_map):
-    """Returns True if the workers list and asyncore channels are all done.
-
-    @param workers list of workers (threads/processes).  These must adhere
-    to the threading Thread or multiprocessing.Process interface.
-
-    @param async_map the threading-aware asyncore channel map to check
-    for live channels.
-
-    @return False if the workers list exists and has any entries in it, or
-    if the async_map exists and has any entries left in it; otherwise, True.
-    """
-    if workers is not None and len(workers) > 0:
-        # We're not done if we still have workers left.
-        return False
-    if async_map is not None and len(async_map) > 0:
-        return False
-    # We're done.
-    return True
-
-
-def multiprocessing_test_runner(num_threads, test_work_items, session_dir,
-                                runner_context):
-    """Provides hand-wrapped pooling test runner adapter with Ctrl-C support.
-
-    This concurrent test runner is based on the multiprocessing
-    library, and rolls its own worker pooling strategy so it
-    can handle Ctrl-C properly.
-
-    This test runner is known to have an issue running on
-    Windows platforms.
-
-    @param num_threads the number of worker processes to use.
-
-    @param test_work_items the iterable of test work item tuples
-    to run.
-
-    @param session_dir the session directory where test-run-speciif files are
-    written.
-
-    @param runner_context a dictionary of platform-related data that is passed
-    to the timeout pre-kill hook.
-    """
-
-    # Initialize our global state.
-    initialize_global_vars_multiprocessing(num_threads, test_work_items,
-                                           session_dir, runner_context)
-
-    # Create jobs.
-    job_queue = multiprocessing.Queue(len(test_work_items))
-    for test_work_item in test_work_items:
-        job_queue.put(test_work_item)
-
-    result_queue = multiprocessing.Queue(len(test_work_items))
-
-    # Create queues for started child pids.  Terminating
-    # the multiprocess processes does not terminate the
-    # child processes they spawn.  We can remove this tracking
-    # if/when we move to having the multiprocess process directly
-    # perform the test logic.  The Queue size needs to be able to
-    # hold 2 * (num inferior dotest.py processes started) entries.
-    inferior_pid_events = multiprocessing.Queue(4096)
-
-    # Worker dictionary allows each worker to figure out its worker index.
-    manager = multiprocessing.Manager()
-    worker_index_map = manager.dict()
-
-    # Create workers.  We don't use multiprocessing.Pool due to
-    # challenges with handling ^C keyboard interrupts.
-    workers = []
-    for _ in range(num_threads):
-        worker = multiprocessing.Process(
-            target=process_file_worker_multiprocessing,
-            args=(output_lock,
-                  test_counter,
-                  total_tests,
-                  test_name_len,
-                  dotest_options,
-                  job_queue,
-                  result_queue,
-                  inferior_pid_events,
-                  worker_index_map))
-        worker.start()
-        workers.append(worker)
-
-    # Main loop: wait for all workers to finish and wait for
-    # the socket handlers to wrap up.
-    ctrl_c_loop(
-        # Main operation of loop
-        lambda: pump_workers_and_asyncore_map(
-            workers, RUNNER_PROCESS_ASYNC_MAP),
-
-        # Return True when we're done with the main loop.
-        lambda: workers_and_async_done(workers, RUNNER_PROCESS_ASYNC_MAP),
-
-        # Indicate what we do when we receive one or more Ctrl-Cs.
-        lambda ctrl_c_count: handle_ctrl_c(
-            ctrl_c_count, job_queue, workers, inferior_pid_events,
-            kill_all_worker_processes))
-
-    # Reap the test results.
-    test_results = []
-    while not result_queue.empty():
-        test_results.append(result_queue.get(block=False))
-    return test_results
-
-
-def map_async_run_loop(future, channel_map, listener_channel):
-    """Blocks until the Pool.map_async completes and the channel completes.
-
-    @param future an AsyncResult instance from a Pool.map_async() call.
-
-    @param channel_map the asyncore dispatch channel map that should be pumped.
-    Optional: may be None.
-
-    @param listener_channel the channel representing a listener that should be
-    closed once the map_async results are available.
-
-    @return the results from the async_result instance.
-    """
-    map_results = None
-
-    done = False
-    while not done:
-        # Check if we need to reap the map results.
-        if map_results is None:
-            if future.ready():
-                # Get the results.
-                map_results = future.get()
-
-                # Close the runner process listener channel if we have
-                # one: no more connections will be incoming.
-                if listener_channel is not None:
-                    listener_channel.close()
-
-        # Pump the asyncore loop if we have a listener socket.
-        if channel_map is not None:
-            asyncore.loop(0.01, False, channel_map, 10)
-
-        # Figure out if we're done running.
-        done = map_results is not None
-        if channel_map is not None:
-            # We have a runner process async map.  Check if it
-            # is complete.
-            if len(channel_map) > 0:
-                # We still have an asyncore channel running.  Not done yet.
-                done = False
-
-    return map_results
-
-
-def multiprocessing_test_runner_pool(num_threads, test_work_items, session_dir,
-                                     runner_context):
-    # Initialize our global state.
-    initialize_global_vars_multiprocessing(num_threads, test_work_items,
-                                           session_dir, runner_context)
-
-    manager = multiprocessing.Manager()
-    worker_index_map = manager.dict()
-
-    pool = multiprocessing.Pool(
-        num_threads,
-        initializer=setup_global_variables,
-        initargs=(output_lock, test_counter, total_tests, test_name_len,
-                  dotest_options, worker_index_map))
-
-    # Start the map operation (async mode).
-    map_future = pool.map_async(
-        process_file_worker_multiprocessing_pool, test_work_items)
-    return map_async_run_loop(
-        map_future, RUNNER_PROCESS_ASYNC_MAP, RESULTS_LISTENER_CHANNEL)
-
-
-def threading_test_runner(num_threads, test_work_items, session_dir,
-                          runner_context):
-    """Provides hand-wrapped pooling threading-based test runner adapter
-    with Ctrl-C support.
-
-    This concurrent test runner is based on the threading
-    library, and rolls its own worker pooling strategy so it
-    can handle Ctrl-C properly.
-
-    @param num_threads the number of worker processes to use.
-
-    @param test_work_items the iterable of test work item tuples
-    to run.
-
-    @param session_dir the session directory where test-run-speciif files are
-    written.
-
-    @param runner_context a dictionary of platform-related data that is passed
-    to the timeout pre-kill hook.
-   """
-
-    # Initialize our global state.
-    initialize_global_vars_threading(num_threads, test_work_items, session_dir,
-                                     runner_context)
-
-    # Create jobs.
-    job_queue = queue.Queue()
-    for test_work_item in test_work_items:
-        job_queue.put(test_work_item)
-
-    result_queue = queue.Queue()
-
-    # Create queues for started child pids.  Terminating
-    # the threading threads does not terminate the
-    # child processes they spawn.
-    inferior_pid_events = queue.Queue()
-
-    # Create workers. We don't use multiprocessing.pool.ThreadedPool
-    # due to challenges with handling ^C keyboard interrupts.
-    workers = []
-    for _ in range(num_threads):
-        worker = threading.Thread(
-            target=process_file_worker_threading,
-            args=(job_queue,
-                  result_queue,
-                  inferior_pid_events))
-        worker.start()
-        workers.append(worker)
-
-    # Main loop: wait for all workers to finish and wait for
-    # the socket handlers to wrap up.
-    ctrl_c_loop(
-        # Main operation of loop
-        lambda: pump_workers_and_asyncore_map(
-            workers, RUNNER_PROCESS_ASYNC_MAP),
-
-        # Return True when we're done with the main loop.
-        lambda: workers_and_async_done(workers, RUNNER_PROCESS_ASYNC_MAP),
-
-        # Indicate what we do when we receive one or more Ctrl-Cs.
-        lambda ctrl_c_count: handle_ctrl_c(
-            ctrl_c_count, job_queue, workers, inferior_pid_events,
-            kill_all_worker_threads))
-
-    # Reap the test results.
-    test_results = []
-    while not result_queue.empty():
-        test_results.append(result_queue.get(block=False))
-    return test_results
-
-
-def threading_test_runner_pool(num_threads, test_work_items, session_dir,
-                               runner_context):
-    # Initialize our global state.
-    initialize_global_vars_threading(num_threads, test_work_items, session_dir,
-                                     runner_context)
-
-    pool = multiprocessing.pool.ThreadPool(num_threads)
-    map_future = pool.map_async(
-        process_file_worker_threading_pool, test_work_items)
-
-    return map_async_run_loop(
-        map_future, RUNNER_PROCESS_ASYNC_MAP, RESULTS_LISTENER_CHANNEL)
-
-
-def asyncore_run_loop(channel_map):
-    try:
-        asyncore.loop(None, False, channel_map)
-    except:
-        # Swallow it, we're seeing:
-        #   error: (9, 'Bad file descriptor')
-        # when the listener channel is closed.  Shouldn't be the case.
-        pass
-
-
-def inprocess_exec_test_runner(test_work_items, session_dir, runner_context):
-    # Initialize our global state.
-    initialize_global_vars_multiprocessing(1, test_work_items, session_dir,
-                                           runner_context)
-
-    # We're always worker index 0
-    def get_single_worker_index():
-        return 0
-
-    global GET_WORKER_INDEX
-    GET_WORKER_INDEX = get_single_worker_index
-
-    # Run the listener and related channel maps in a separate thread.
-    # global RUNNER_PROCESS_ASYNC_MAP
-    global RESULTS_LISTENER_CHANNEL
-    if RESULTS_LISTENER_CHANNEL is not None:
-        socket_thread = threading.Thread(
-            target=lambda: asyncore_run_loop(RUNNER_PROCESS_ASYNC_MAP))
-        socket_thread.start()
-
-    # Do the work.
-    test_results = list(map(process_file_mapper_inprocess, test_work_items))
-
-    # If we have a listener channel, shut it down here.
-    if RESULTS_LISTENER_CHANNEL is not None:
-        # Close down the channel.
-        RESULTS_LISTENER_CHANNEL.close()
-        RESULTS_LISTENER_CHANNEL = None
-
-        # Wait for the listener and handlers to complete.
-        socket_thread.join()
-
-    return test_results
-
-
-def walk_and_invoke(test_files, dotest_argv, num_workers, test_runner_func):
-    """Invokes the test runner on each test file specified by test_files.
-
-    @param test_files a list of (test_file, full_path_to_test_file)
-    @param num_workers the number of worker queues working on these test files
-    @param test_runner_func the test runner configured to run the tests
-
-    @return a tuple of results from the running of the specified tests,
-    of the form (timed_out, passed, failed, unexpected_successes, pass_count,
-    fail_count)
-    """
-    # The async_map is important to keep all thread-related asyncore
-    # channels distinct when we call asyncore.loop() later on.
-    global RESULTS_LISTENER_CHANNEL, RUNNER_PROCESS_ASYNC_MAP
-    RUNNER_PROCESS_ASYNC_MAP = {}
-
-    # If we're outputting side-channel test results, create the socket
-    # listener channel and tell the inferior to send results to the
-    # port on which we'll be listening.
-    if RESULTS_FORMATTER is not None:
-        forwarding_func = RESULTS_FORMATTER.handle_event
-        RESULTS_LISTENER_CHANNEL = (
-            dotest_channels.UnpicklingForwardingListenerChannel(
-                RUNNER_PROCESS_ASYNC_MAP, "localhost", 0,
-                2 * num_workers, forwarding_func))
-        # Set the results port command line arg.  Might have been
-        # inserted previous, so first try to replace.
-        listener_port = str(RESULTS_LISTENER_CHANNEL.address[1])
-        try:
-            port_value_index = dotest_argv.index("--results-port") + 1
-            dotest_argv[port_value_index] = listener_port
-        except ValueError:
-            # --results-port doesn't exist (yet), add it
-            dotest_argv.append("--results-port")
-            dotest_argv.append(listener_port)
-
-    # Build the test work items out of the (dir, file_list) entries passed in.
-    test_work_items = []
-    for test_file in test_files:
-        test_work_items.append((test_file, dotest_argv, None))
-
-    # Convert test work items into test results using whatever
-    # was provided as the test run function.
-    test_results = test_runner_func(test_work_items)
-
-    # Summarize the results and return to caller.
-    timed_out = sum([result[0] for result in test_results], [])
-    passed = sum([result[1] for result in test_results], [])
-    failed = sum([result[2] for result in test_results], [])
-    unexpected_successes = sum([result[3] for result in test_results], [])
-    pass_count = sum([result[4] for result in test_results])
-    fail_count = sum([result[5] for result in test_results])
-
-    return (timed_out, passed, failed, unexpected_successes, pass_count,
-            fail_count)
-
-
-def getExpectedTimeouts(platform_name):
-    # returns a set of test filenames that might timeout
-    # are we running against a remote target?
-
-    # Figure out the target system for which we're collecting
-    # the set of expected timeout test filenames.
-    if platform_name is None:
-        target = sys.platform
-    else:
-        m = re.search(r'remote-(\w+)', platform_name)
-        if m is not None:
-            target = m.group(1)
-        else:
-            target = platform_name
-
-    expected_timeout = set()
-
-    if target.startswith("freebsd"):
-        expected_timeout |= {
-            "TestBreakpointConditions.py",
-            "TestChangeProcessGroup.py",
-            "TestValueObjectRecursion.py",
-            "TestWatchpointConditionAPI.py",
-        }
-    return expected_timeout
-
-
-def getDefaultTimeout(platform_name):
-    if os.getenv("LLDB_TEST_TIMEOUT"):
-        return os.getenv("LLDB_TEST_TIMEOUT")
-
-    if platform_name is None:
-        platform_name = sys.platform
-
-    if platform_name.startswith("remote-"):
-        return "10m"
-    elif platform_name == 'darwin':
-        # We are consistently needing more time on a few tests.
-        return "6m"
-    else:
-        return "4m"
-
-
-def touch(fname, times=None):
-    if os.path.exists(fname):
-        os.utime(fname, times)
-
-
-def find(pattern, path):
-    result = []
-    for root, dirs, files in os.walk(path):
-        for name in files:
-            if fnmatch.fnmatch(name, pattern):
-                result.append(os.path.join(root, name))
-    return result
-
-
-def get_test_runner_strategies(num_threads, session_dir, runner_context):
-    """Returns the test runner strategies by name in a dictionary.
-
-    @param num_threads specifies the number of threads/processes
-    that will be used for concurrent test runners.
-
-    @param session_dir specifies the session dir to use for
-    auxiliary files.
-
-    @param runner_context a dictionary of details on the architectures and
-    platform used to run the test suite.  This is passed along verbatim to
-    the timeout pre-kill handler, allowing that decoupled component to do
-    process inspection in a platform-specific way.
-
-    @return dictionary with key as test runner strategy name and
-    value set to a callable object that takes the test work item
-    and returns a test result tuple.
-    """
-    return {
-        # multiprocessing supports ctrl-c and does not use
-        # multiprocessing.Pool.
-        "multiprocessing":
-        (lambda work_items: multiprocessing_test_runner(
-            num_threads, work_items, session_dir, runner_context)),
-
-        # multiprocessing-pool uses multiprocessing.Pool but
-        # does not support Ctrl-C.
-        "multiprocessing-pool":
-        (lambda work_items: multiprocessing_test_runner_pool(
-            num_threads, work_items, session_dir, runner_context)),
-
-        # threading uses a hand-rolled worker pool much
-        # like multiprocessing, but instead uses in-process
-        # worker threads.  This one supports Ctrl-C.
-        "threading":
-        (lambda work_items: threading_test_runner(
-            num_threads, work_items, session_dir, runner_context)),
-
-        # threading-pool uses threading for the workers (in-process)
-        # and uses the multiprocessing.pool thread-enabled pool.
-        # This does not properly support Ctrl-C.
-        "threading-pool":
-        (lambda work_items: threading_test_runner_pool(
-            num_threads, work_items, session_dir, runner_context)),
-
-        # serial uses the subprocess-based, single process
-        # test runner.  This provides process isolation but
-        # no concurrent test execution.
-        "serial":
-        (lambda work_items: inprocess_exec_test_runner(
-            work_items, session_dir, runner_context))
-    }
-
-
-def _remove_option(
-        args, long_option_name, short_option_name, takes_arg):
-    """Removes option and related option arguments from args array.
-
-    This method removes all short/long options that match the given
-    arguments.
-
-    @param args the array of command line arguments (in/out)
-
-    @param long_option_name the full command line representation of the
-    long-form option that will be removed (including '--').
-
-    @param short_option_name the short version of the command line option
-    that will be removed (including '-').
-
-    @param takes_arg True if the option takes an argument.
-
-    """
-    if long_option_name is not None:
-        regex_string = "^" + long_option_name + "="
-        long_regex = re.compile(regex_string)
-    if short_option_name is not None:
-        # Short options we only match the -X and assume
-        # any arg is one command line argument jammed together.
-        # i.e. -O--abc=1 is a single argument in the args list.
-        # We don't handle -O --abc=1, as argparse doesn't handle
-        # it, either.
-        regex_string = "^" + short_option_name
-        short_regex = re.compile(regex_string)
-
-    def remove_long_internal():
-        """Removes one matching long option from args.
-        @returns True if one was found and removed; False otherwise.
-        """
-        try:
-            index = args.index(long_option_name)
-            # Handle the exact match case.
-            if takes_arg:
-                removal_count = 2
-            else:
-                removal_count = 1
-            del args[index:index + removal_count]
-            return True
-        except ValueError:
-            # Thanks to argparse not handling options with known arguments
-            # like other options parsing libraries (see
-            # https://bugs.python.org/issue9334), we need to support the
-            # --results-formatter-options={second-level-arguments} (note
-            # the equal sign to fool the first-level arguments parser into
-            # not treating the second-level arguments as first-level
-            # options). We're certainly at risk of getting this wrong
-            # since now we're forced into the business of trying to figure
-            # out what is an argument (although I think this
-            # implementation will suffice).
-            for index in range(len(args)):
-                match = long_regex.search(args[index])
-                if match:
-                    del args[index]
-                    return True
-            return False
-
-    def remove_short_internal():
-        """Removes one matching short option from args.
-        @returns True if one was found and removed; False otherwise.
-        """
-        for index in range(len(args)):
-            match = short_regex.search(args[index])
-            if match:
-                del args[index]
-                return True
-        return False
-
-    removal_count = 0
-    while long_option_name is not None and remove_long_internal():
-        removal_count += 1
-    while short_option_name is not None and remove_short_internal():
-        removal_count += 1
-    if removal_count == 0:
-        raise Exception(
-            "failed to find at least one of '{}', '{}' in options".format(
-                long_option_name, short_option_name))
-
-
-def adjust_inferior_options(dotest_argv):
-    """Adjusts the commandline args array for inferiors.
-
-    This method adjusts the inferior dotest commandline options based
-    on the parallel test runner's options.  Some of the inferior options
-    will need to change to properly handle aggregation functionality.
-    """
-    global dotest_options
-
-    # If we don't have a session directory, create one.
-    if not dotest_options.s:
-        # no session log directory, we need to add this to prevent
-        # every dotest invocation from creating its own directory
-        import datetime
-        # The windows platforms don't like ':' in the pathname.
-        timestamp_started = (datetime.datetime.now()
-                             .strftime("%Y-%m-%d-%H_%M_%S"))
-        dotest_argv.append('-s')
-        dotest_argv.append(timestamp_started)
-        dotest_options.s = timestamp_started
-
-    # Adjust inferior results formatter options - if the parallel
-    # test runner is collecting into the user-specified test results,
-    # we'll have inferiors spawn with the --results-port option and
-    # strip the original test runner options.
-    if dotest_options.results_file is not None:
-        _remove_option(dotest_argv, "--results-file", None, True)
-    if dotest_options.results_port is not None:
-        _remove_option(dotest_argv, "--results-port", None, True)
-    if dotest_options.results_formatter is not None:
-        _remove_option(dotest_argv, "--results-formatter", None, True)
-    if dotest_options.results_formatter_options is not None:
-        _remove_option(dotest_argv, "--results-formatter-option", "-O",
-                       True)
-
-    # Remove the --curses shortcut if specified.
-    if dotest_options.curses:
-        _remove_option(dotest_argv, "--curses", None, False)
-
-    # Remove test runner name if present.
-    if dotest_options.test_runner_name is not None:
-        _remove_option(dotest_argv, "--test-runner-name", None, True)
-
-
-def is_darwin_version_lower_than(target_version):
-    """Checks that os is Darwin and version is lower than target_version.
-
-    @param target_version the StrictVersion indicating the version
-    we're checking against.
-
-    @return True if the OS is Darwin (OS X) and the version number of
-    the OS is less than target_version; False in all other cases.
-    """
-    if platform.system() != 'Darwin':
-        # Can't be Darwin lower than a certain version.
-        return False
-
-    system_version = distutils.version.StrictVersion(platform.mac_ver()[0])
-    return seven.cmp_(system_version, target_version) < 0
-
-
-def default_test_runner_name(num_threads):
-    """Returns the default test runner name for the configuration.
-
-    @param num_threads the number of threads/workers this test runner is
-    supposed to use.
-
-    @return the test runner name that should be used by default when
-    no test runner was explicitly called out on the command line.
-    """
-    if num_threads == 1:
-        # Use the serial runner.
-        test_runner_name = "serial"
-    elif os.name == "nt":
-        # On Windows, Python uses CRT with a low limit on the number of open
-        # files.  If you have a lot of cores, the threading-pool runner will
-        # often fail because it exceeds that limit.  It's not clear what the
-        # right balance is, so until we can investigate it more deeply,
-        # just use the one that works
-        test_runner_name = "multiprocessing-pool"
-    elif is_darwin_version_lower_than(
-            distutils.version.StrictVersion("10.10.0")):
-        # OS X versions before 10.10 appear to have an issue using
-        # the threading test runner.  Fall back to multiprocessing.
-        # Supports Ctrl-C.
-        test_runner_name = "multiprocessing"
-    else:
-        # For everyone else, use the ctrl-c-enabled threading support.
-        # Should use fewer system resources than the multprocessing
-        # variant.
-        test_runner_name = "threading"
-    return test_runner_name
-
-
-def rerun_tests(test_subdir, tests_for_rerun, dotest_argv, session_dir,
-                runner_context):
-    # Build the list of test files to rerun.  Some future time we'll
-    # enable re-run by test method so we can constrain the rerun set
-    # to just the method(s) that were in issued within a file.
-
-    # Sort rerun files into subdirectories.
-    print("\nRerunning the following files:")
-    rerun_files = []
-    for test_filename in tests_for_rerun.keys():
-        # Print the file we'll be rerunning
-        test_relative_path = os.path.relpath(
-            test_filename, lldbsuite.lldb_test_root)
-        print("  {}".format(test_relative_path))
-
-        rerun_files.append(test_filename)
-
-    # Do not update legacy counts, I am getting rid of
-    # them so no point adding complicated merge logic here.
-    rerun_thread_count = 1
-    # Force the parallel test runner to choose a multi-worker strategy.
-    rerun_runner_name = default_test_runner_name(rerun_thread_count + 1)
-    print("rerun will use the '{}' test runner strategy".format(
-        rerun_runner_name))
-
-    runner_strategies_by_name = get_test_runner_strategies(
-        rerun_thread_count, session_dir, runner_context)
-    rerun_runner_func = runner_strategies_by_name[
-        rerun_runner_name]
-    if rerun_runner_func is None:
-        raise Exception(
-            "failed to find rerun test runner "
-            "function named '{}'".format(rerun_runner_name))
-
-    walk_and_invoke(
-        rerun_files,
-        dotest_argv,
-        rerun_thread_count,
-        rerun_runner_func)
-    print("\nTest rerun complete\n")
-
-
-def main(num_threads, test_runner_name, results_formatter):
-    """Run dotest.py in inferior mode in parallel.
-
-    @param num_threads the parsed value of the num-threads command line
-    argument.
-
-    @param test_subdir optionally specifies a subdir to limit testing
-    within.  May be None if the entire test tree is to be used.  This subdir
-    is assumed to be relative to the lldb/test root of the test hierarchy.
-
-    @param test_runner_name if specified, contains the test runner
-    name which selects the strategy used to run the isolated and
-    optionally concurrent test runner. Specify None to allow the
-    system to choose the most appropriate test runner given desired
-    thread count and OS type.
-
-    @param results_formatter if specified, provides the TestResultsFormatter
-    instance that will format and output test result data from the
-    side-channel test results.  When specified, inferior dotest calls
-    will send test results side-channel data over a socket to the parallel
-    test runner, which will forward them on to results_formatter.
-    """
-
-    # Do not shut down on sighup.
-    if hasattr(signal, 'SIGHUP'):
-        signal.signal(signal.SIGHUP, signal.SIG_IGN)
-
-    dotest_argv = sys.argv[1:]
-
-    global RESULTS_FORMATTER
-    RESULTS_FORMATTER = results_formatter
-
-    # We can't use sys.path[0] to determine the script directory
-    # because it doesn't work under a debugger
-    parser = dotest_args.create_parser()
-    global dotest_options
-    dotest_options = dotest_args.parse_args(parser, dotest_argv)
-
-    adjust_inferior_options(dotest_argv)
-
-    session_dir = os.path.join(os.getcwd(), dotest_options.s)
-
-    test_subdir = configuration.get_absolute_path_to_root_test_dir()
-
-    # clean core files in test tree from previous runs (Linux)
-    cores = find('core.*', test_subdir)
-    for core in cores:
-        os.unlink(core)
-
-    system_info = " ".join(platform.uname())
-
-    # Figure out which test files should be enabled for expected
-    # timeout
-    expected_timeout = getExpectedTimeouts(dotest_options.lldb_platform_name)
-    if results_formatter is not None:
-        results_formatter.set_expected_timeouts_by_basename(expected_timeout)
-
-    # Setup the test runner context.  This is a dictionary of information that
-    # will be passed along to the timeout pre-kill handler and allows for loose
-    # coupling of its implementation.
-    runner_context = {
-        "arch": configuration.arch,
-        "platform_name": configuration.lldb_platform_name,
-        "platform_url": configuration.lldb_platform_url,
-        "platform_working_dir": configuration.lldb_platform_working_dir,
-    }
-
-    # Figure out which testrunner strategy we'll use.
-    runner_strategies_by_name = get_test_runner_strategies(
-        num_threads, session_dir, runner_context)
-
-    # If the user didn't specify a test runner strategy, determine
-    # the default now based on number of threads and OS type.
-    if not test_runner_name:
-        test_runner_name = default_test_runner_name(num_threads)
-
-    if test_runner_name not in runner_strategies_by_name:
-        raise Exception(
-            "specified testrunner name '{}' unknown. Valid choices: {}".format(
-                test_runner_name,
-                list(runner_strategies_by_name.keys())))
-    test_runner_func = runner_strategies_by_name[test_runner_name]
-
-    # Do the first test run phase.
-    summary_results = walk_and_invoke(
-        find_test_files_in_dir_tree(test_subdir),
-        dotest_argv,
-        num_threads,
-        test_runner_func)
-
-    (timed_out, passed, failed, unexpected_successes, pass_count,
-     fail_count) = summary_results
-
-    # Check if we have any tests to rerun as phase 2.
-    if results_formatter is not None:
-        tests_for_rerun = results_formatter.tests_for_rerun
-        results_formatter.tests_for_rerun = {}
-
-        if tests_for_rerun is not None and len(tests_for_rerun) > 0:
-            rerun_file_count = len(tests_for_rerun)
-            print("\n{} test files marked for rerun\n".format(
-                rerun_file_count))
-
-            # Clear errors charged to any of the files of the tests that
-            # we are rerunning.
-            # https://llvm.org/bugs/show_bug.cgi?id=27423
-            results_formatter.clear_file_level_issues(tests_for_rerun,
-                                                      sys.stdout)
-
-            # Check if the number of files exceeds the max cutoff.  If so,
-            # we skip the rerun step.
-            if rerun_file_count > configuration.rerun_max_file_threshold:
-                print("Skipping rerun: max rerun file threshold ({}) "
-                      "exceeded".format(
-                          configuration.rerun_max_file_threshold))
-            else:
-                rerun_tests(test_subdir, tests_for_rerun, dotest_argv,
-                            session_dir, runner_context)
-
-    # The results formatter - if present - is done now.  Tell it to
-    # terminate.
-    if results_formatter is not None:
-        results_formatter.send_terminate_as_needed()
-
-    timed_out = set(timed_out)
-    num_test_files = len(passed) + len(failed)
-    num_test_cases = pass_count + fail_count
-
-    # move core files into session dir
-    cores = find('core.*', test_subdir)
-    for core in cores:
-        dst = core.replace(test_subdir, "")[1:]
-        dst = dst.replace(os.path.sep, "-")
-        os.rename(core, os.path.join(session_dir, dst))
-
-    # remove expected timeouts from failures
-    for xtime in expected_timeout:
-        if xtime in timed_out:
-            timed_out.remove(xtime)
-            failed.remove(xtime)
-            result = "ExpectedTimeout"
-        elif xtime in passed:
-            result = "UnexpectedCompletion"
-        else:
-            result = None  # failed
-
-        if result:
-            test_name = os.path.splitext(xtime)[0]
-            touch(os.path.join(session_dir, "{}-{}".format(result, test_name)))
-
-    # Only run the old summary logic if we don't have a results formatter
-    # that already prints the summary.
-    print_legacy_summary = results_formatter is None
-    if not print_legacy_summary:
-        # Print summary results.  Summarized results at the end always
-        # get printed to stdout, even if --results-file specifies a different
-        # file for, say, xUnit output.
-        results_formatter.print_results(sys.stdout)
-
-        # Figure out exit code by count of test result types.
-        issue_count = 0
-        for issue_status in EventBuilder.TESTRUN_ERROR_STATUS_VALUES:
-            issue_count += results_formatter.counts_by_test_result_status(
-                issue_status)
-
-        # Return with appropriate result code
-        if issue_count > 0:
-            sys.exit(1)
-        else:
-            sys.exit(0)
-    else:
-        # Print the legacy test results summary.
-        print()
-        sys.stdout.write("Ran %d test suites" % num_test_files)
-        if num_test_files > 0:
-            sys.stdout.write(" (%d failed) (%f%%)" % (
-                len(failed), 100.0 * len(failed) / num_test_files))
-        print()
-        sys.stdout.write("Ran %d test cases" % num_test_cases)
-        if num_test_cases > 0:
-            sys.stdout.write(" (%d failed) (%f%%)" % (
-                fail_count, 100.0 * fail_count / num_test_cases))
-        print()
-        exit_code = 0
-
-        if len(failed) > 0:
-            failed.sort()
-            print("Failing Tests (%d)" % len(failed))
-            for f in failed:
-                print("%s: LLDB (suite) :: %s (%s)" % (
-                    "TIMEOUT" if f in timed_out else "FAIL", f, system_info
-                ))
-            exit_code = 1
-
-        if len(unexpected_successes) > 0:
-            unexpected_successes.sort()
-            print("\nUnexpected Successes (%d)" % len(unexpected_successes))
-            for u in unexpected_successes:
-                print(
-                    "UNEXPECTED SUCCESS: LLDB (suite) :: %s (%s)" %
-                    (u, system_info))
-
-    sys.exit(exit_code)
-
-if __name__ == '__main__':
-    sys.stderr.write(
-        "error: dosep.py no longer supports being called directly. "
-        "Please call dotest.py directly.  The dosep.py-specific arguments "
-        "have been added under the Parallel processing arguments.\n")
-    sys.exit(128)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py
index 5113ccd..560e47d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -23,15 +23,16 @@
 
 # System modules
 import atexit
-import os
+import datetime
 import errno
 import logging
+import os
 import platform
 import re
 import signal
-import socket
 import subprocess
 import sys
+import tempfile
 
 # Third-party modules
 import six
@@ -48,17 +49,20 @@
 from lldbsuite.test_event.event_builder import EventBuilder
 from ..support import seven
 
+def get_dotest_invocation():
+    return ' '.join(sys.argv)
+
 
 def is_exe(fpath):
     """Returns true if fpath is an executable."""
     if fpath == None:
-      return False
+        return False
     return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
 
 
 def which(program):
     """Returns the full path to a program; None otherwise."""
-    fpath, fname = os.path.split(program)
+    fpath, _ = os.path.split(program)
     if fpath:
         if is_exe(program):
             return program
@@ -70,27 +74,6 @@
     return None
 
 
-class _WritelnDecorator(object):
-    """Used to decorate file-like objects with a handy 'writeln' method"""
-
-    def __init__(self, stream):
-        self.stream = stream
-
-    def __getattr__(self, attr):
-        if attr in ('stream', '__getstate__'):
-            raise AttributeError(attr)
-        return getattr(self.stream, attr)
-
-    def writeln(self, arg=None):
-        if arg:
-            self.write(arg)
-        self.write('\n')  # text-mode streams translate to \r\n if needed
-
-#
-# Global variables:
-#
-
-
 def usage(parser):
     parser.print_help()
     if configuration.verbose > 0:
@@ -170,9 +153,6 @@
 
 Writing logs into different files per test case::
 
-This option is particularly useful when multiple dotest instances are created
-by dosep.py
-
 $ ./dotest.py --channel "lldb all"
 
 $ ./dotest.py --channel "lldb all" --channel "gdb-remote packets"
@@ -188,20 +168,6 @@
 
 $ ./dotest.py --log-success
 
-Option 2: (DEPRECATED)
-
-The following options can only enable logs from the host lldb process.
-Only categories from the "lldb" or "gdb-remote" channels can be enabled
-They also do not automatically enable logs in locally running debug servers.
-Also, logs from all test case are written into each log file
-
-o LLDB_LOG: if defined, specifies the log file pathname for the 'lldb' subsystem
-  with a default option of 'event process' if LLDB_LOG_OPTION is not defined.
-
-o GDB_REMOTE_LOG: if defined, specifies the log file pathname for the
-  'process.gdb-remote' subsystem with a default option of 'packets' if
-  GDB_REMOTE_LOG_OPTION is not defined.
-
 """)
     sys.exit(0)
 
@@ -250,8 +216,12 @@
     platform_system = platform.system()
     platform_machine = platform.machine()
 
-    parser = dotest_args.create_parser()
-    args = dotest_args.parse_args(parser, sys.argv[1:])
+    try:
+        parser = dotest_args.create_parser()
+        args = parser.parse_args()
+    except:
+        print(get_dotest_invocation())
+        raise
 
     if args.unset_env_varnames:
         for env_var in args.unset_env_varnames:
@@ -273,9 +243,9 @@
     if args.set_inferior_env_vars:
         lldbtest_config.inferior_env = ' '.join(args.set_inferior_env_vars)
 
-    # only print the args if being verbose (and parsable is off)
-    if args.v and not args.q:
-        print(sys.argv)
+    # Only print the args if being verbose.
+    if args.v:
+        print(get_dotest_invocation())
 
     if args.h:
         do_help = True
@@ -305,10 +275,10 @@
                     break
 
     if args.dsymutil:
-      os.environ['DSYMUTIL'] = args.dsymutil
+        os.environ['DSYMUTIL'] = args.dsymutil
     elif platform_system == 'Darwin':
-      os.environ['DSYMUTIL'] = seven.get_command_output(
-          'xcrun -find -toolchain default dsymutil')
+        os.environ['DSYMUTIL'] = seven.get_command_output(
+            'xcrun -find -toolchain default dsymutil')
 
     if args.filecheck:
         # The lldb-dotest script produced by the CMake build passes in a path
@@ -316,13 +286,6 @@
         # target. However, when invoking dotest.py directly, a valid --filecheck
         # option needs to be given.
         configuration.filecheck = os.path.abspath(args.filecheck)
-    else:
-        outputPaths = get_llvm_bin_dirs()
-        for outputPath in outputPaths:
-            candidatePath = os.path.join(outputPath, 'FileCheck')
-            if is_exe(candidatePath):
-                configuration.filecheck = candidatePath
-                break
 
     if not configuration.get_filecheck_path():
         logging.warning('No valid FileCheck executable; some tests may fail...')
@@ -355,21 +318,38 @@
     else:
         configuration.arch = platform_machine
 
-    if args.categoriesList:
-        configuration.categoriesList = set(
+    if args.categories_list:
+        configuration.categories_list = set(
             test_categories.validate(
-                args.categoriesList, False))
-        configuration.useCategories = True
+                args.categories_list, False))
+        configuration.use_categories = True
     else:
-        configuration.categoriesList = []
+        configuration.categories_list = []
 
-    if args.skipCategories:
-        configuration.skipCategories += test_categories.validate(
-            args.skipCategories, False)
+    if args.skip_categories:
+        configuration.skip_categories += test_categories.validate(
+            args.skip_categories, False)
+
+    if args.xfail_categories:
+        configuration.xfail_categories += test_categories.validate(
+            args.xfail_categories, False)
 
     if args.E:
-        cflags_extras = args.E
-        os.environ['CFLAGS_EXTRAS'] = cflags_extras
+        os.environ['CFLAGS_EXTRAS'] = args.E
+
+    if args.dwarf_version:
+        configuration.dwarf_version = args.dwarf_version
+        # We cannot modify CFLAGS_EXTRAS because they're used in test cases
+        # that explicitly require no debug info.
+        os.environ['CFLAGS'] = '-gdwarf-{}'.format(configuration.dwarf_version)
+
+    if args.settings:
+        for setting in args.settings:
+            if not len(setting) == 1 or not setting[0].count('='):
+                logging.error('"%s" is not a setting in the form "key=value"',
+                              setting[0])
+                sys.exit(-1)
+            configuration.settings.append(setting[0].split('=', 1))
 
     if args.d:
         sys.stdout.write(
@@ -382,23 +362,9 @@
         if any([x.startswith('-') for x in args.f]):
             usage(parser)
         configuration.filters.extend(args.f)
-        # Shut off multiprocessing mode when additional filters are specified.
-        # The rational is that the user is probably going after a very specific
-        # test and doesn't need a bunch of parallel test runners all looking for
-        # it in a frenzy.  Also, '-v' now spits out all test run output even
-        # on success, so the standard recipe for redoing a failing test (with -v
-        # and a -f to filter to the specific test) now causes all test scanning
-        # (in parallel) to print results for do-nothing runs in a very distracting
-        # manner.  If we really need filtered parallel runs in the future, consider
-        # adding a --no-output-on-success that prevents -v from setting
-        # output-on-success.
-        configuration.no_multiprocess_test_runner = True
-
-    if args.l:
-        configuration.skip_long_running_test = False
 
     if args.framework:
-        configuration.lldbFrameworkPath = args.framework
+        configuration.lldb_framework_path = args.framework
 
     if args.executable:
         # lldb executable is passed explicitly
@@ -423,13 +389,12 @@
             usage(parser)
         configuration.regexp = args.p
 
-    if args.q:
-        configuration.parsable = True
-
     if args.s:
-        if args.s.startswith('-'):
-            usage(parser)
         configuration.sdir_name = args.s
+    else:
+        timestamp_started = datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S")
+        configuration.sdir_name = os.path.join(os.getcwd(), timestamp_started)
+
     configuration.session_file_format = args.session_file_format
 
     if args.t:
@@ -450,53 +415,21 @@
     if do_help:
         usage(parser)
 
-    if args.no_multiprocess:
-        configuration.no_multiprocess_test_runner = True
-
-    if args.inferior:
-        configuration.is_inferior_test_runner = True
-
-    if args.num_threads:
-        configuration.num_threads = args.num_threads
-
-    if args.test_subdir:
-        configuration.exclusive_test_subdir = args.test_subdir
-
-    if args.test_runner_name:
-        configuration.test_runner_name = args.test_runner_name
-
-    # Capture test results-related args.
-    if args.curses and not args.inferior:
-        # Act as if the following args were set.
-        args.results_formatter = "lldbsuite.test_event.formatter.curses.Curses"
-        args.results_file = "stdout"
-
     if args.results_file:
         configuration.results_filename = args.results_file
 
-    if args.results_port:
-        configuration.results_port = args.results_port
-
-    if args.results_file and args.results_port:
-        sys.stderr.write(
-            "only one of --results-file and --results-port should "
-            "be specified\n")
-        usage(args)
-
     if args.results_formatter:
         configuration.results_formatter_name = args.results_formatter
     if args.results_formatter_options:
         configuration.results_formatter_options = args.results_formatter_options
 
-    # Default to using the BasicResultsFormatter if no formatter is specified
-    # and we're not a test inferior.
-    if not args.inferior and configuration.results_formatter_name is None:
+    # Default to using the BasicResultsFormatter if no formatter is specified.
+    if configuration.results_formatter_name is None:
         configuration.results_formatter_name = (
             "lldbsuite.test_event.formatter.results_formatter.ResultsFormatter")
 
     # rerun-related arguments
     configuration.rerun_all_issues = args.rerun_all_issues
-    configuration.rerun_max_file_threshold = args.rerun_max_file_threshold
 
     if args.lldb_platform_name:
         configuration.lldb_platform_name = args.lldb_platform_name
@@ -506,68 +439,25 @@
         configuration.lldb_platform_working_dir = args.lldb_platform_working_dir
     if args.test_build_dir:
         configuration.test_build_dir = args.test_build_dir
+    if args.lldb_module_cache_dir:
+        configuration.lldb_module_cache_dir = args.lldb_module_cache_dir
+    else:
+        configuration.lldb_module_cache_dir = os.path.join(
+            configuration.test_build_dir, 'module-cache-lldb')
+    if args.clang_module_cache_dir:
+        configuration.clang_module_cache_dir = args.clang_module_cache_dir
+    else:
+        configuration.clang_module_cache_dir = os.path.join(
+            configuration.test_build_dir, 'module-cache-clang')
 
-    if args.event_add_entries and len(args.event_add_entries) > 0:
-        entries = {}
-        # Parse out key=val pairs, separated by comma
-        for keyval in args.event_add_entries.split(","):
-            key_val_entry = keyval.split("=")
-            if len(key_val_entry) == 2:
-                (key, val) = key_val_entry
-                val_parts = val.split(':')
-                if len(val_parts) > 1:
-                    (val, val_type) = val_parts
-                    if val_type == 'int':
-                        val = int(val)
-                entries[key] = val
-        # Tell the event builder to create all events with these
-        # key/val pairs in them.
-        if len(entries) > 0:
-            EventBuilder.add_entries_to_all_events(entries)
+    os.environ['CLANG_MODULE_CACHE_DIR'] = configuration.clang_module_cache_dir
 
     # Gather all the dirs passed on the command line.
     if len(args.args) > 0:
         configuration.testdirs = [os.path.realpath(os.path.abspath(x)) for x in args.args]
-        # Shut off multiprocessing mode when test directories are specified.
-        configuration.no_multiprocess_test_runner = True
 
     lldbtest_config.codesign_identity = args.codesign_identity
 
-    #print("testdirs:", testdirs)
-
-
-def getXcodeOutputPaths(lldbRootDirectory):
-    result = []
-
-    # These are for xcode build directories.
-    xcode3_build_dir = ['build']
-    xcode4_build_dir = ['build', 'lldb', 'Build', 'Products']
-
-    configurations = [
-        ['Debug'],
-        ['DebugClang'],
-        ['Release'],
-        ['BuildAndIntegration']]
-    xcode_build_dirs = [xcode3_build_dir, xcode4_build_dir]
-    for configuration in configurations:
-        for xcode_build_dir in xcode_build_dirs:
-            outputPath = os.path.join(
-                lldbRootDirectory, *(xcode_build_dir + configuration))
-            result.append(outputPath)
-
-    return result
-
-
-def createSocketToLocalPort(port):
-    def socket_closer(s):
-        """Close down an opened socket properly."""
-        s.shutdown(socket.SHUT_RDWR)
-        s.close()
-
-    sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-    sock.connect(("localhost", port))
-    return (sock, lambda: socket_closer(sock))
-
 
 def setupTestResults():
     """Sets up test results-related objects based on arg settings."""
@@ -577,7 +467,6 @@
     formatter_config.formatter_name = configuration.results_formatter_name
     formatter_config.formatter_options = (
         configuration.results_formatter_options)
-    formatter_config.port = configuration.results_port
 
     # Create the results formatter.
     formatter_spec = formatter.create_results_formatter(
@@ -587,17 +476,7 @@
 
         # Send an initialize message to the formatter.
         initialize_event = EventBuilder.bare_event("initialize")
-        if isMultiprocessTestRunner():
-            if (configuration.test_runner_name is not None and
-                    configuration.test_runner_name == "serial"):
-                # Only one worker queue here.
-                worker_count = 1
-            else:
-                # Workers will be the number of threads specified.
-                worker_count = configuration.num_threads
-        else:
-            worker_count = 1
-        initialize_event["worker_count"] = worker_count
+        initialize_event["worker_count"] = 1
 
         formatter_spec.formatter.handle_event(initialize_event)
 
@@ -606,65 +485,6 @@
             atexit.register(formatter_spec.cleanup_func)
 
 
-def getOutputPaths(lldbRootDirectory):
-    """
-    Returns typical build output paths for the lldb executable
-
-    lldbDirectory - path to the root of the lldb svn/git repo
-    """
-    result = []
-
-    if sys.platform == 'darwin':
-        result.extend(getXcodeOutputPaths(lldbRootDirectory))
-
-    # cmake builds?  look for build or build/host folder next to llvm directory
-    # lldb is located in llvm/tools/lldb so we need to go up three levels
-    llvmParentDir = os.path.abspath(
-        os.path.join(
-            lldbRootDirectory,
-            os.pardir,
-            os.pardir,
-            os.pardir))
-    result.append(os.path.join(llvmParentDir, 'build', 'bin'))
-    result.append(os.path.join(llvmParentDir, 'build', 'host', 'bin'))
-
-    # some cmake developers keep their build directory beside their lldb
-    # directory
-    lldbParentDir = os.path.abspath(os.path.join(lldbRootDirectory, os.pardir))
-    result.append(os.path.join(lldbParentDir, 'build', 'bin'))
-    result.append(os.path.join(lldbParentDir, 'build', 'host', 'bin'))
-
-    return result
-
-def get_llvm_bin_dirs():
-    """
-    Returns an array of paths that may have the llvm/clang/etc binaries
-    in them, relative to this current file.  
-    Returns an empty array if none are found.
-    """
-    result = []
-
-    lldb_root_path = os.path.join(
-        os.path.dirname(__file__), "..", "..", "..", "..")
-    paths_to_try = [
-        "llvm-build/Release+Asserts/x86_64/bin",
-        "llvm-build/Debug+Asserts/x86_64/bin",
-        "llvm-build/Release/x86_64/bin",
-        "llvm-build/Debug/x86_64/bin",
-        "llvm-build/Ninja-DebugAssert/llvm-macosx-x86_64/bin",
-        "llvm-build/Ninja-DebugAssert+asan/llvm-macosx-x86_64/bin",
-        "llvm-build/Ninja-ReleaseAssert/llvm-macosx-x86_64/bin",
-        "llvm-build/Ninja-ReleaseAssert+asan/llvm-macosx-x86_64/bin",
-        "llvm-build/Ninja-RelWithDebInfoAssert/llvm-macosx-x86_64/bin",
-        "llvm-build/Ninja-RelWithDebInfoAssert+asan/llvm-macosx-x86_64/bin",
-    ]
-    for p in paths_to_try:
-        path = os.path.join(lldb_root_path, p)
-        if os.path.exists(path):
-            result.append(path)
-
-    return result
-
 def setupSysPath():
     """
     Add LLDB.framework/Resources/Python to the search paths for modules.
@@ -693,16 +513,11 @@
     os.environ["LLDB_SRC"] = lldbsuite.lldb_root
 
     pluginPath = os.path.join(scriptPath, 'plugins')
-    toolsLLDBMIPath = os.path.join(scriptPath, 'tools', 'lldb-mi')
     toolsLLDBVSCode = os.path.join(scriptPath, 'tools', 'lldb-vscode')
     toolsLLDBServerPath = os.path.join(scriptPath, 'tools', 'lldb-server')
 
-    # Insert script dir, plugin dir, lldb-mi dir and lldb-server dir to the
-    # sys.path.
+    # Insert script dir, plugin dir and lldb-server dir to the sys.path.
     sys.path.insert(0, pluginPath)
-    # Adding test/tools/lldb-mi to the path makes it easy
-    sys.path.insert(0, toolsLLDBMIPath)
-    # to "import lldbmi_testcase" from the MI tests
     # Adding test/tools/lldb-vscode to the path makes it easy to
     # "import lldb_vscode_testcase" from the VSCode tests
     sys.path.insert(0, toolsLLDBVSCode)
@@ -728,14 +543,6 @@
             lldbtest_config.lldbExec = os.environ["LLDB_EXEC"]
 
     if not lldbtest_config.lldbExec:
-        outputPaths = getOutputPaths(lldbRootDirectory)
-        for outputPath in outputPaths:
-            candidatePath = os.path.join(outputPath, 'lldb')
-            if is_exe(candidatePath):
-                lldbtest_config.lldbExec = candidatePath
-                break
-
-    if not lldbtest_config.lldbExec:
         # Last, check the path
         lldbtest_config.lldbExec = which('lldb')
 
@@ -761,19 +568,7 @@
     print("LLDB import library dir:", os.environ["LLDB_IMPLIB_DIR"])
     os.system('%s -v' % lldbtest_config.lldbExec)
 
-    # Assume lldb-mi is in same place as lldb
-    # If not found, disable the lldb-mi tests
-    # TODO: Append .exe on Windows
-    #   - this will be in a separate commit in case the mi tests fail horribly
     lldbDir = os.path.dirname(lldbtest_config.lldbExec)
-    lldbMiExec = os.path.join(lldbDir, "lldb-mi")
-    if is_exe(lldbMiExec):
-        os.environ["LLDBMI_EXEC"] = lldbMiExec
-    else:
-        if not configuration.shouldSkipBecauseOfCategories(["lldb-mi"]):
-            print(
-                "The 'lldb-mi' executable cannot be located.  The lldb-mi tests can not be run as a result.")
-            configuration.skipCategories.append("lldb-mi")
 
     lldbVSCodeExec = os.path.join(lldbDir, "lldb-vscode")
     if is_exe(lldbVSCodeExec):
@@ -782,21 +577,21 @@
         if not configuration.shouldSkipBecauseOfCategories(["lldb-vscode"]):
             print(
                 "The 'lldb-vscode' executable cannot be located.  The lldb-vscode tests can not be run as a result.")
-            configuration.skipCategories.append("lldb-vscode")
+            configuration.skip_categories.append("lldb-vscode")
 
     lldbPythonDir = None  # The directory that contains 'lldb/__init__.py'
-    if not configuration.lldbFrameworkPath and os.path.exists(os.path.join(lldbLibDir, "LLDB.framework")):
-        configuration.lldbFrameworkPath = os.path.join(lldbLibDir, "LLDB.framework")
-    if configuration.lldbFrameworkPath:
-        lldbtest_config.lldbFrameworkPath = configuration.lldbFrameworkPath
+    if not configuration.lldb_framework_path and os.path.exists(os.path.join(lldbLibDir, "LLDB.framework")):
+        configuration.lldb_framework_path = os.path.join(lldbLibDir, "LLDB.framework")
+    if configuration.lldb_framework_path:
+        lldbtest_config.lldb_framework_path = configuration.lldb_framework_path
         candidatePath = os.path.join(
-            configuration.lldbFrameworkPath, 'Resources', 'Python')
+            configuration.lldb_framework_path, 'Resources', 'Python')
         if os.path.isfile(os.path.join(candidatePath, 'lldb/__init__.py')):
             lldbPythonDir = candidatePath
         if not lldbPythonDir:
             print(
                 'Resources/Python/lldb/__init__.py was not found in ' +
-                configuration.lldbFrameworkPath)
+                configuration.lldb_framework_path)
             sys.exit(-1)
     else:
         # If our lldb supports the -P option, use it to find the python path:
@@ -832,39 +627,23 @@
                         lldbPythonDir, '..', '..')
 
         if not lldbPythonDir:
-            if platform.system() == "Darwin":
-                python_resource_dir = ['LLDB.framework', 'Resources', 'Python']
-                outputPaths = getXcodeOutputPaths(lldbRootDirectory)
-                for outputPath in outputPaths:
-                    candidatePath = os.path.join(
-                        outputPath, *python_resource_dir)
-                    if os.path.isfile(
-                        os.path.join(
-                            candidatePath,
-                            init_in_python_dir)):
-                        lldbPythonDir = candidatePath
-                        break
-
-                if not lldbPythonDir:
-                    print("lldb.py is not found, some tests may fail.")
-            else:
-                print(
-                    "Unable to load lldb extension module.  Possible reasons for this include:")
-                print("  1) LLDB was built with LLDB_DISABLE_PYTHON=1")
-                print(
-                    "  2) PYTHONPATH and PYTHONHOME are not set correctly.  PYTHONHOME should refer to")
-                print(
-                    "     the version of Python that LLDB built and linked against, and PYTHONPATH")
-                print(
-                    "     should contain the Lib directory for the same python distro, as well as the")
-                print("     location of LLDB\'s site-packages folder.")
-                print(
-                    "  3) A different version of Python than that which was built against is exported in")
-                print("     the system\'s PATH environment variable, causing conflicts.")
-                print(
-                    "  4) The executable '%s' could not be found.  Please check " %
-                    lldbtest_config.lldbExec)
-                print("     that it exists and is executable.")
+            print(
+                "Unable to load lldb extension module.  Possible reasons for this include:")
+            print("  1) LLDB was built with LLDB_ENABLE_PYTHON=0")
+            print(
+                "  2) PYTHONPATH and PYTHONHOME are not set correctly.  PYTHONHOME should refer to")
+            print(
+                "     the version of Python that LLDB built and linked against, and PYTHONPATH")
+            print(
+                "     should contain the Lib directory for the same python distro, as well as the")
+            print("     location of LLDB\'s site-packages folder.")
+            print(
+                "  3) A different version of Python than that which was built against is exported in")
+            print("     the system\'s PATH environment variable, causing conflicts.")
+            print(
+                "  4) The executable '%s' could not be found.  Please check " %
+                lldbtest_config.lldbExec)
+            print("     that it exists and is executable.")
 
     if lldbPythonDir:
         lldbPythonDir = os.path.normpath(lldbPythonDir)
@@ -908,34 +687,42 @@
 
     # Thoroughly check the filterspec against the base module and admit
     # the (base, filterspec) combination only when it makes sense.
-    filterspec = None
-    for filterspec in configuration.filters:
-        # Optimistically set the flag to True.
-        filtered = True
-        module = __import__(base)
-        parts = filterspec.split('.')
-        obj = module
+
+    def check(obj, parts):
         for part in parts:
             try:
                 parent, obj = obj, getattr(obj, part)
             except AttributeError:
                 # The filterspec has failed.
-                filtered = False
-                break
+                return False
+        return True
 
-        # If filtered, we have a good filterspec.  Add it.
-        if filtered:
-            # print("adding filter spec %s to module %s" % (filterspec, module))
-            configuration.suite.addTests(
-                unittest2.defaultTestLoader.loadTestsFromName(
-                    filterspec, module))
-            continue
+    module = __import__(base)
+
+    def iter_filters():
+        for filterspec in configuration.filters:
+            parts = filterspec.split('.')
+            if check(module, parts):
+                yield filterspec
+            elif parts[0] == base and len(parts) > 1 and check(module, parts[1:]):
+                yield '.'.join(parts[1:])
+            else:
+                for key,value in module.__dict__.items():
+                    if check(value, parts):
+                        yield key + '.' + filterspec
+
+    filtered = False
+    for filterspec in iter_filters():
+        filtered = True
+        print("adding filter spec %s to module %s" % (filterspec, repr(module)))
+        tests = unittest2.defaultTestLoader.loadTestsFromName(filterspec, module)
+        configuration.suite.addTests(tests)
 
     # Forgo this module if the (base, filterspec) combo is invalid
     if configuration.filters and not filtered:
         return
 
-    if not filterspec or not filtered:
+    if not filtered:
         # Add the entire file's worth of tests since we're not filtered.
         # Also the fail-over case when the filterspec branch
         # (base, filterspec) combo doesn't make sense.
@@ -943,7 +730,6 @@
             unittest2.defaultTestLoader.loadTestsFromName(base))
 
 
-# TODO: This should be replaced with a call to find_test_files_in_dir_tree.
 def visit(prefix, dir, names):
     """Visitor function for os.path.walk(path, visit, arg)."""
 
@@ -987,75 +773,15 @@
             raise
 
 
-def disabledynamics():
+def setSetting(setting, value):
     import lldb
     ci = lldb.DBG.GetCommandInterpreter()
     res = lldb.SBCommandReturnObject()
-    ci.HandleCommand(
-        "setting set target.prefer-dynamic-value no-dynamic-values",
-        res,
-        False)
+    cmd = 'setting set %s %s'%(setting, value)
+    print(cmd)
+    ci.HandleCommand(cmd, res, False)
     if not res.Succeeded():
-        raise Exception('disabling dynamic type support failed')
-
-
-def lldbLoggings():
-    import lldb
-    """Check and do lldb loggings if necessary."""
-
-    # Turn on logging for debugging purposes if ${LLDB_LOG} environment variable is
-    # defined.  Use ${LLDB_LOG} to specify the log file.
-    ci = lldb.DBG.GetCommandInterpreter()
-    res = lldb.SBCommandReturnObject()
-    if ("LLDB_LOG" in os.environ):
-        open(os.environ["LLDB_LOG"], 'w').close()
-        if ("LLDB_LOG_OPTION" in os.environ):
-            lldb_log_option = os.environ["LLDB_LOG_OPTION"]
-        else:
-            lldb_log_option = "event process expr state api"
-        ci.HandleCommand(
-            "log enable -n -f " +
-            os.environ["LLDB_LOG"] +
-            " lldb " +
-            lldb_log_option,
-            res)
-        if not res.Succeeded():
-            raise Exception('log enable failed (check LLDB_LOG env variable)')
-
-    if ("LLDB_LINUX_LOG" in os.environ):
-        open(os.environ["LLDB_LINUX_LOG"], 'w').close()
-        if ("LLDB_LINUX_LOG_OPTION" in os.environ):
-            lldb_log_option = os.environ["LLDB_LINUX_LOG_OPTION"]
-        else:
-            lldb_log_option = "event process expr state api"
-        ci.HandleCommand(
-            "log enable -n -f " +
-            os.environ["LLDB_LINUX_LOG"] +
-            " linux " +
-            lldb_log_option,
-            res)
-        if not res.Succeeded():
-            raise Exception(
-                'log enable failed (check LLDB_LINUX_LOG env variable)')
-
-    # Ditto for gdb-remote logging if ${GDB_REMOTE_LOG} environment variable is defined.
-    # Use ${GDB_REMOTE_LOG} to specify the log file.
-    if ("GDB_REMOTE_LOG" in os.environ):
-        if ("GDB_REMOTE_LOG_OPTION" in os.environ):
-            gdb_remote_log_option = os.environ["GDB_REMOTE_LOG_OPTION"]
-        else:
-            gdb_remote_log_option = "packets process"
-        ci.HandleCommand(
-            "log enable -n -f " + os.environ["GDB_REMOTE_LOG"] + " gdb-remote "
-            + gdb_remote_log_option,
-            res)
-        if not res.Succeeded():
-            raise Exception(
-                'log enable failed (check GDB_REMOTE_LOG env variable)')
-
-
-def getMyCommandLine():
-    return ' '.join(sys.argv)
+        raise Exception('failed to run "%s"'%cmd)
 
 # ======================================== #
 #                                          #
@@ -1088,15 +814,6 @@
         sys.exit(exitCode)
 
 
-def isMultiprocessTestRunner():
-    # We're not multiprocess when we're either explicitly
-    # the inferior (as specified by the multiprocess test
-    # runner) OR we've been told to skip using the multiprocess
-    # test runner
-    return not (
-        configuration.is_inferior_test_runner or configuration.no_multiprocess_test_runner)
-
-
 def getVersionForSDK(sdk):
     sdk = str.lower(sdk)
     full_path = seven.get_command_output('xcrun -sdk %s --show-sdk-path' % sdk)
@@ -1107,14 +824,6 @@
     return ver
 
 
-def getPathForSDK(sdk):
-    sdk = str.lower(sdk)
-    full_path = seven.get_command_output('xcrun -sdk %s --show-sdk-path' % sdk)
-    if os.path.exists(full_path):
-        return full_path
-    return None
-
-
 def setDefaultTripleForPlatform():
     if configuration.lldb_platform_name == 'ios-simulator':
         triple_str = 'x86_64-apple-ios%s' % (
@@ -1152,9 +861,15 @@
         return True, "libc++ always present"
 
     if platform == "linux":
-        if not os.path.isdir("/usr/include/c++/v1"):
-            return False, "Unable to find libc++ installation"
-        return True, "Headers found, let's hope they work"
+        if os.path.isdir("/usr/include/c++/v1"):
+            return True, "Headers found, let's hope they work"
+        with tempfile.NamedTemporaryFile() as f:
+            cmd = [configuration.compiler, "-xc++", "-stdlib=libc++", "-o", f.name, "-"]
+            p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
+            _, stderr = p.communicate("#include <algorithm>\nint main() {}")
+            if not p.returncode:
+                return True, "Compiling with -stdlib=libc++ works"
+            return False, "Compiling with -stdlib=libc++ fails with the error: %s" % stderr
 
     return False, "Don't know how to build with libc++ on %s" % platform
 
@@ -1162,53 +877,55 @@
     result, reason = canRunLibcxxTests()
     if result:
         return # libc++ supported
-    if "libc++" in configuration.categoriesList:
+    if "libc++" in configuration.categories_list:
         return # libc++ category explicitly requested, let it run.
     print("Libc++ tests will not be run because: " + reason)
-    configuration.skipCategories.append("libc++")
+    configuration.skip_categories.append("libc++")
 
 def canRunLibstdcxxTests():
     from lldbsuite.test import lldbplatformutil
 
     platform = lldbplatformutil.getPlatform()
+    if lldbplatformutil.target_is_android():
+        platform = "android"
     if platform == "linux":
-      return True, "libstdcxx always present"
+        return True, "libstdcxx always present"
     return False, "Don't know how to build with libstdcxx on %s" % platform
 
 def checkLibstdcxxSupport():
     result, reason = canRunLibstdcxxTests()
     if result:
         return # libstdcxx supported
-    if "libstdcxx" in configuration.categoriesList:
+    if "libstdcxx" in configuration.categories_list:
         return # libstdcxx category explicitly requested, let it run.
     print("libstdcxx tests will not be run because: " + reason)
-    configuration.skipCategories.append("libstdcxx")
+    configuration.skip_categories.append("libstdcxx")
 
 def canRunWatchpointTests():
     from lldbsuite.test import lldbplatformutil
 
     platform = lldbplatformutil.getPlatform()
     if platform == "netbsd":
-      if os.geteuid() == 0:
-        return True, "root can always write dbregs"
-      try:
-        output = subprocess.check_output(["/sbin/sysctl", "-n",
-          "security.models.extensions.user_set_dbregs"]).decode().strip()
-        if output == "1":
-          return True, "security.models.extensions.user_set_dbregs enabled"
-      except subprocess.CalledProcessError:
-        pass
-      return False, "security.models.extensions.user_set_dbregs disabled"
+        if os.geteuid() == 0:
+            return True, "root can always write dbregs"
+        try:
+            output = subprocess.check_output(["/sbin/sysctl", "-n",
+              "security.models.extensions.user_set_dbregs"]).decode().strip()
+            if output == "1":
+                return True, "security.models.extensions.user_set_dbregs enabled"
+        except subprocess.CalledProcessError:
+            pass
+        return False, "security.models.extensions.user_set_dbregs disabled"
     return True, "watchpoint support available"
 
 def checkWatchpointSupport():
     result, reason = canRunWatchpointTests()
     if result:
         return # watchpoints supported
-    if "watchpoint" in configuration.categoriesList:
+    if "watchpoint" in configuration.categories_list:
         return # watchpoint category explicitly requested, let it run.
     print("watchpoint tests will not be run because: " + reason)
-    configuration.skipCategories.append("watchpoint")
+    configuration.skip_categories.append("watchpoint")
 
 def checkDebugInfoSupport():
     import lldb
@@ -1217,11 +934,11 @@
     compiler = configuration.compiler
     skipped = []
     for cat in test_categories.debug_info_categories:
-        if cat in configuration.categoriesList:
+        if cat in configuration.categories_list:
             continue # Category explicitly requested, let it run.
         if test_categories.is_supported_on_platform(cat, platform, compiler):
             continue
-        configuration.skipCategories.append(cat)
+        configuration.skip_categories.append(cat)
         skipped.append(cat)
     if skipped:
         print("Skipping following debug info categories:", skipped)
@@ -1232,7 +949,6 @@
     if sys.platform.startswith("darwin"):
         checkDsymForUUIDIsNotOn()
 
-    #
     # Start the actions by first parsing the options while setting up the test
     # directories, followed by setting up the search paths for lldb utilities;
     # then, we walk the directory trees and collect the tests into our test suite.
@@ -1242,31 +958,16 @@
     # Setup test results (test results formatter and output handling).
     setupTestResults()
 
-    # If we are running as the multiprocess test runner, kick off the
-    # multiprocess test runner here.
-    if isMultiprocessTestRunner():
-        from . import dosep
-        dosep.main(
-            configuration.num_threads,
-            configuration.test_runner_name,
-            configuration.results_formatter_object)
-        raise Exception("should never get here")
-    elif configuration.is_inferior_test_runner:
-        # Shut off Ctrl-C processing in inferiors.  The parallel
-        # test runner handles this more holistically.
-        signal.signal(signal.SIGINT, signal.SIG_IGN)
-
     setupSysPath()
 
-    #
-    # If '-l' is specified, do not skip the long running tests.
-    if not configuration.skip_long_running_test:
-        os.environ["LLDB_SKIP_LONG_RUNNING_TEST"] = "NO"
 
     # For the time being, let's bracket the test runner within the
     # lldb.SBDebugger.Initialize()/Terminate() pair.
     import lldb
 
+    # Now we can also import lldbutil
+    from lldbsuite.test import lldbutil
+
     # Create a singleton SBDebugger in the lldb namespace.
     lldb.DBG = lldb.SBDebugger.Create()
 
@@ -1326,7 +1027,6 @@
 
     # Set up the working directory.
     # Note that it's not dotest's job to clean this directory.
-    import lldbsuite.test.lldbutil as lldbutil
     build_dir = configuration.test_build_dir
     lldbutil.mkdir_p(build_dir)
 
@@ -1338,10 +1038,17 @@
     checkDebugInfoSupport()
 
     # Don't do debugserver tests on anything except OS X.
-    configuration.dont_do_debugserver_test = "linux" in target_platform or "freebsd" in target_platform or "windows" in target_platform
+    configuration.dont_do_debugserver_test = (
+            "linux" in target_platform or
+            "freebsd" in target_platform or
+            "netbsd" in target_platform or
+            "windows" in target_platform)
 
-    # Don't do lldb-server (llgs) tests on anything except Linux.
-    configuration.dont_do_llgs_test = not ("linux" in target_platform)
+    # Don't do lldb-server (llgs) tests on anything except Linux and Windows.
+    configuration.dont_do_llgs_test = not (
+            "linux" in target_platform or
+            "netbsd" in target_platform or
+            "windows" in target_platform)
 
     # Collect tests from the specified testing directories. If a test
     # subdirectory filter is explicitly specified, limit the search to that
@@ -1359,48 +1066,28 @@
     # Now that we have loaded all the test cases, run the whole test suite.
     #
 
-    # Turn on lldb loggings if necessary.
-    lldbLoggings()
-
-    # Disable default dynamic types for testing purposes
-    disabledynamics()
+    # Set any user-overridden settings.
+    for key, value in configuration.settings:
+        setSetting(key, value)
 
     # Install the control-c handler.
     unittest2.signals.installHandler()
 
-    # If sdir_name is not specified through the '-s sdir_name' option, get a
-    # timestamp string and export it as LLDB_SESSION_DIR environment var.  This will
-    # be used when/if we want to dump the session info of individual test cases
-    # later on.
-    #
-    # See also TestBase.dumpSessionInfo() in lldbtest.py.
-    import datetime
-    # The windows platforms don't like ':' in the pathname.
-    timestamp_started = datetime.datetime.now().strftime("%Y-%m-%d-%H_%M_%S")
-    if not configuration.sdir_name:
-        configuration.sdir_name = timestamp_started
-    os.environ["LLDB_SESSION_DIRNAME"] = os.path.join(
-        os.getcwd(), configuration.sdir_name)
+    lldbutil.mkdir_p(configuration.sdir_name)
+    os.environ["LLDB_SESSION_DIRNAME"] = configuration.sdir_name
 
     sys.stderr.write(
         "\nSession logs for test failures/errors/unexpected successes"
         " will go into directory '%s'\n" %
         configuration.sdir_name)
-    sys.stderr.write("Command invoked: %s\n" % getMyCommandLine())
-
-    if not os.path.isdir(configuration.sdir_name):
-        try:
-            os.mkdir(configuration.sdir_name)
-        except OSError as exception:
-            if exception.errno != errno.EEXIST:
-                raise
+    sys.stderr.write("Command invoked: %s\n" % get_dotest_invocation())
 
     #
     # Invoke the default TextTestRunner to run the test suite
     #
     checkCompiler()
 
-    if not configuration.parsable:
+    if configuration.verbose:
         print("compiler=%s" % configuration.compiler)
 
     # Iterating over all possible architecture and compiler combinations.
@@ -1409,36 +1096,23 @@
     configString = "arch=%s compiler=%s" % (configuration.arch,
                                             configuration.compiler)
 
-    # Translate ' ' to '-' for pathname component.
-    if six.PY2:
-        import string
-        tbl = string.maketrans(' ', '-')
-    else:
-        tbl = str.maketrans(' ', '-')
-    configPostfix = configString.translate(tbl)
-
     # Output the configuration.
-    if not configuration.parsable:
+    if configuration.verbose:
         sys.stderr.write("\nConfiguration: " + configString + "\n")
 
     # First, write out the number of collected test cases.
-    if not configuration.parsable:
+    if configuration.verbose:
         sys.stderr.write(configuration.separator + "\n")
         sys.stderr.write(
             "Collected %d test%s\n\n" %
             (configuration.suite.countTestCases(),
              configuration.suite.countTestCases() != 1 and "s" or ""))
 
-    if configuration.parsable:
-        v = 0
-    else:
-        v = configuration.verbose
-
     # Invoke the test runner.
     if configuration.count == 1:
         result = unittest2.TextTestRunner(
             stream=sys.stderr,
-            verbosity=v,
+            verbosity=configuration.verbose,
             resultclass=test_result.LLDBTestResult).run(
             configuration.suite)
     else:
@@ -1450,31 +1124,25 @@
 
             result = unittest2.TextTestRunner(
                 stream=sys.stderr,
-                verbosity=v,
+                verbosity=configuration.verbose,
                 resultclass=test_result.LLDBTestResult).run(
                 configuration.suite)
 
     configuration.failed = not result.wasSuccessful()
 
-    if configuration.sdir_has_content and not configuration.parsable:
+    if configuration.sdir_has_content and configuration.verbose:
         sys.stderr.write(
             "Session logs for test failures/errors/unexpected successes"
             " can be found in directory '%s'\n" %
             configuration.sdir_name)
 
-    if configuration.useCategories and len(
-            configuration.failuresPerCategory) > 0:
+    if configuration.use_categories and len(
+            configuration.failures_per_category) > 0:
         sys.stderr.write("Failures per category:\n")
-        for category in configuration.failuresPerCategory:
+        for category in configuration.failures_per_category:
             sys.stderr.write(
                 "%s - %d\n" %
-                (category, configuration.failuresPerCategory[category]))
-
-    # Terminate the test suite if ${LLDB_TESTSUITE_FORCE_FINISH} is defined.
-    # This should not be necessary now.
-    if ("LLDB_TESTSUITE_FORCE_FINISH" in os.environ):
-        print("Terminating Test suite...")
-        subprocess.Popen(["/bin/sh", "-c", "kill %s; exit 0" % (os.getpid())])
+                (category, configuration.failures_per_category[category]))
 
     # Exiting.
     exitTestSuite(configuration.failed)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/dotest_args.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/dotest_args.py
index a673d1d..7ec5fa2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/dotest_args.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/dotest_args.py
@@ -1,48 +1,15 @@
-from __future__ import print_function
 from __future__ import absolute_import
 
 # System modules
 import argparse
 import sys
-import multiprocessing
 import os
 import textwrap
 
-# Third-party modules
-
 # LLDB modules
 from . import configuration
 
 
-class ArgParseNamespace(object):
-    pass
-
-
-def parse_args(parser, argv):
-    """ Returns an argument object. LLDB_TEST_ARGUMENTS environment variable can
-        be used to pass additional arguments.
-    """
-    args = ArgParseNamespace()
-
-    if ('LLDB_TEST_ARGUMENTS' in os.environ):
-        print(
-            "Arguments passed through environment: '%s'" %
-            os.environ['LLDB_TEST_ARGUMENTS'])
-        args = parser.parse_args([sys.argv[0]].__add__(
-            os.environ['LLDB_TEST_ARGUMENTS'].split()), namespace=args)
-
-    return parser.parse_args(args=argv, namespace=args)
-
-
-def default_thread_count():
-    # Check if specified in the environment
-    num_threads_str = os.environ.get("LLDB_TEST_THREADS")
-    if num_threads_str:
-        return int(num_threads_str)
-    else:
-        return multiprocessing.cpu_count()
-
-
 def create_parser():
     parser = argparse.ArgumentParser(
         description='description',
@@ -93,8 +60,9 @@
         '-f',
         metavar='filterspec',
         action='append',
-        help='Specify a filter, which consists of the test class name, a dot, followed by the test method, to only admit such test into the test suite')  # FIXME: Example?
-    X('-l', "Don't skip long running tests")
+        help=('Specify a filter, which looks like "TestModule.TestClass.test_name".  '+
+            'You may also use shortened filters, such as '+
+            '"TestModule.TestClass", "TestClass.test_name", or just "test_name".'))
     group.add_argument(
         '-p',
         metavar='pattern',
@@ -107,14 +75,20 @@
         '--category',
         metavar='category',
         action='append',
-        dest='categoriesList',
+        dest='categories_list',
         help=textwrap.dedent('''Specify categories of test cases of interest. Can be specified more than once.'''))
     group.add_argument(
         '--skip-category',
         metavar='category',
         action='append',
-        dest='skipCategories',
+        dest='skip_categories',
         help=textwrap.dedent('''Specify categories of test cases to skip. Takes precedence over -G. Can be specified more than once.'''))
+    group.add_argument(
+        '--xfail-category',
+        metavar='category',
+        action='append',
+        dest='xfail_categories',
+        help=textwrap.dedent('''Specify categories of test cases that are expected to fail. Can be specified more than once.'''))
 
     # Configuration options
     group = parser.add_argument_group('Configuration options')
@@ -136,6 +110,20 @@
         action='store_true',
         help='A flag to indicate an out-of-tree debug server is being used')
     group.add_argument(
+        '--dwarf-version',
+        metavar='dwarf_version',
+        dest='dwarf_version',
+        type=int,
+        help='Override the DWARF version.')
+    group.add_argument(
+        '--setting',
+        metavar='SETTING=VALUE',
+        dest='settings',
+        type=str,
+        nargs=1,
+        action='append',
+        help='Run "setting set SETTING VALUE" before executing any test.')
+    group.add_argument(
         '-s',
         metavar='name',
         help='Specify the name of the dir created to store the session files of tests with errored or failed status. If not specified, the test driver uses the timestamp as the session dir name')
@@ -174,6 +162,16 @@
         metavar='Test build directory',
         default='lldb-test-build.noindex',
         help='The root build directory for the tests. It will be removed before running.')
+    group.add_argument(
+        '--lldb-module-cache-dir',
+        dest='lldb_module_cache_dir',
+        metavar='The clang module cache directory used by LLDB',
+        help='The clang module cache directory used by LLDB. Defaults to <test build directory>/module-cache-lldb.')
+    group.add_argument(
+        '--clang-module-cache-dir',
+        dest='clang_module_cache_dir',
+        metavar='The clang module cache directory used by Clang',
+        help='The clang module cache directory used in the Make files by Clang while building tests. Defaults to <test build directory>/module-cache-clang.')
 
     # Configuration options
     group = parser.add_argument_group('Remote platform options')
@@ -196,7 +194,6 @@
     # Test-suite behaviour
     group = parser.add_argument_group('Runtime behaviour options')
     X('-d', 'Suspend the process after launch to wait indefinitely for a debugger to attach')
-    X('-q', "Don't print extra output from this script.")
     X('-t', 'Turn on tracing of lldb command and other detailed test executions')
     group.add_argument(
         '-u',
@@ -224,53 +221,14 @@
         help='(Windows only) When LLDB crashes, display the Windows crash dialog.')
     group.set_defaults(disable_crash_dialog=True)
 
-    group = parser.add_argument_group('Parallel execution options')
-    group.add_argument(
-        '--inferior',
-        action='store_true',
-        help=('specify this invocation is a multiprocess inferior, '
-              'used internally'))
-    group.add_argument(
-        '--no-multiprocess',
-        action='store_true',
-        help='skip running the multiprocess test runner')
-    group.add_argument(
-        '--threads',
-        type=int,
-        dest='num_threads',
-        default=default_thread_count(),
-        help=('The number of threads/processes to use when running tests '
-              'separately, defaults to the number of CPU cores available'))
-    group.add_argument(
-        '--test-subdir',
-        action='store',
-        help='Specify a test subdirectory to use relative to the test root dir'
-    )
-    group.add_argument(
-        '--test-runner-name',
-        action='store',
-        help=('Specify a test runner strategy.  Valid values: multiprocessing,'
-              ' multiprocessing-pool, serial, threading, threading-pool')
-    )
-
     # Test results support.
     group = parser.add_argument_group('Test results options')
     group.add_argument(
-        '--curses',
-        action='store_true',
-        help='Shortcut for specifying test results using the curses formatter')
-    group.add_argument(
         '--results-file',
         action='store',
         help=('Specifies the file where test results will be written '
               'according to the results-formatter class used'))
     group.add_argument(
-        '--results-port',
-        action='store',
-        type=int,
-        help=('Specifies the localhost port to which the results '
-              'formatted output should be sent'))
-    group.add_argument(
         '--results-formatter',
         action='store',
         help=('Specifies the full package/module/class name used to translate '
@@ -284,13 +242,6 @@
         help=('Specify an option to pass to the formatter. '
               'Use --results-formatter-option="--option1=val1" '
               'syntax.  Note the "=" is critical, don\'t include whitespace.'))
-    group.add_argument(
-        '--event-add-entries',
-        action='store',
-        help=('Specify comma-separated KEY=VAL entries to add key and value '
-              'pairs to all test events generated by this test run.  VAL may '
-              'be specified as VAL:TYPE, where TYPE may be int to convert '
-              'the value to an int'))
 
     # Re-run related arguments
     group = parser.add_argument_group('Test Re-run Options')
@@ -301,15 +252,6 @@
               'irrespective of the test method\'s marking as flakey. '
               'Default behavior is to apply re-runs only to flakey '
               'tests that generate issues.'))
-    group.add_argument(
-        '--rerun-max-file-threshold',
-        action='store',
-        type=int,
-        default=50,
-        help=('Maximum number of files requiring a rerun beyond '
-              'which the rerun will not occur.  This is meant to '
-              'stop a catastrophically failing test suite from forcing '
-              'all tests to be rerun in the single-worker phase.'))
 
     # Remove the reference to our helper function
     del X
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/driver/batch_mode/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/driver/batch_mode/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/driver/batch_mode/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/driver/batch_mode/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
index e61da05..9639c70 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/driver/batch_mode/TestBatchMode.py
@@ -2,111 +2,110 @@
 Test that the lldb driver's batch mode works correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
+from lldbsuite.test.lldbpexpect import PExpectTest
 
 
-class DriverBatchModeTest (TestBase):
+class DriverBatchModeTest(PExpectTest):
 
     mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        self.victim = None
-
-    def expect_string(self, string):
-        import pexpect
-        """This expects for "string", with timeout & EOF being test fails."""
-        try:
-            self.child.expect_exact(string)
-        except pexpect.EOF:
-            self.fail("Got EOF waiting for '%s'" % (string))
-        except pexpect.TIMEOUT:
-            self.fail("Timed out waiting for '%s'" % (string))
+    source = 'main.c'
 
     @skipIfRemote  # test not remote-ready llvm.org/pr24813
     @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
-    @expectedFlakeyLinux("llvm.org/pr25172")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_batch_mode_run_crash(self):
         """Test that the lldb driver's batch mode works correctly."""
         self.build()
-        self.setTearDownCleanup()
 
-        import pexpect
         exe = self.getBuildArtifact("a.out")
-        module_cache = self.getBuildArtifact("module.cache")
-        prompt = "(lldb) "
 
         # Pass CRASH so the process will crash and stop in batch mode.
-        run_commands = ' -b -o "settings set symbols.clang-modules-cache-path %s" -o "break set -n main" -o "run" -o "continue" -k "frame var touch_me_not"' % module_cache
-        self.child = pexpect.spawn(
-            '%s %s %s %s -- CRASH' %
-            (lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
+        extra_args = ['-b',
+            '-o', 'break set -n main',
+            '-o', 'run',
+            '-o', 'continue',
+            '-k', 'frame var touch_me_not',
+            '--', 'CRASH',
+        ]
+        self.launch(executable=exe, extra_args=extra_args)
         child = self.child
 
         # We should see the "run":
-        self.expect_string("run")
+        child.expect_exact("run")
         # We should have hit the breakpoint & continued:
-        self.expect_string("continue")
+        child.expect_exact("continue")
         # The App should have crashed:
-        self.expect_string("About to crash")
+        child.expect_exact("About to crash")
         # The -k option should have printed the frame variable once:
-        self.expect_string('(char *) touch_me_not')
+        child.expect_exact('(char *) touch_me_not')
         # Then we should have a live prompt:
-        self.expect_string(prompt)
-        self.child.sendline("frame variable touch_me_not")
-        self.expect_string('(char *) touch_me_not')
-
-        self.deletePexpectChild()
+        self.expect_prompt()
+        self.expect("frame variable touch_me_not", substrs='(char *) touch_me_not')
 
     @skipIfRemote  # test not remote-ready llvm.org/pr24813
     @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
-    @expectedFlakeyLinux("llvm.org/pr25172")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_batch_mode_run_exit(self):
         """Test that the lldb driver's batch mode works correctly."""
         self.build()
-        self.setTearDownCleanup()
 
-        import pexpect
         exe = self.getBuildArtifact("a.out")
-        module_cache = self.getBuildArtifact("module.cache")
-        prompt = "(lldb) "
 
         # Now do it again, and make sure if we don't crash, we quit:
-        run_commands = ' -b -o "settings set symbols.clang-modules-cache-path %s" -o "break set -n main" -o "run" -o "continue" '%module_cache
-        self.child = pexpect.spawn(
-            '%s %s %s %s -- NOCRASH' %
-            (lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
+        extra_args = ['-b',
+            '-o', 'break set -n main',
+            '-o', 'run',
+            '-o', 'continue',
+            '--', 'NOCRASH',
+        ]
+        self.launch(executable=exe, extra_args=extra_args)
         child = self.child
 
         # We should see the "run":
-        self.expect_string("run")
+        child.expect_exact("run")
         # We should have hit the breakpoint & continued:
-        self.expect_string("continue")
+        child.expect_exact("continue")
         # The App should have not have crashed:
-        self.expect_string("Got there on time and it did not crash.")
-        # Then we should have a live prompt:
-        self.expect_string("exited")
-        index = self.child.expect([pexpect.EOF, pexpect.TIMEOUT])
-        self.assertTrue(
-            index == 0,
-            "lldb didn't close on successful batch completion.")
+        child.expect_exact("Got there on time and it did not crash.")
+
+        # Then lldb should exit.
+        child.expect_exact("exited")
+        import pexpect
+        child.expect(pexpect.EOF)
+
+    @skipIfRemote
+    @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
+    def test_batch_mode_launch_stop_at_entry(self):
+        """Test that the lldb driver's batch mode works correctly for process launch."""
+        self.build()
+
+        exe = self.getBuildArtifact("a.out")
+
+        # Launch with the option '--stop-at-entry' stops with a signal (usually SIGSTOP)
+        # that should be suppressed since it doesn't imply a crash and
+        # this is not a reason to exit batch mode.
+        extra_args = ['-b',
+            '-o', 'process launch --stop-at-entry',
+            '-o', 'continue',
+        ]
+        self.launch(executable=exe, extra_args=extra_args)
+        child = self.child
+
+        # Check that the process has been launched:
+        child.expect("Process ([0-9]+) launched:")
+        # We should have continued:
+        child.expect_exact("continue")
+        # The App should have not have crashed:
+        child.expect_exact("Got there on time and it did not crash.")
+        
+        # Then lldb should exit.
+        child.expect_exact("exited")
+        import pexpect
+        child.expect(pexpect.EOF)
 
     def closeVictim(self):
         if self.victim is not None:
@@ -115,27 +114,20 @@
 
     @skipIfRemote  # test not remote-ready llvm.org/pr24813
     @expectedFlakeyFreeBSD("llvm.org/pr25172 fails rarely on the buildbot")
-    @expectedFlakeyLinux("llvm.org/pr25172")
     @expectedFailureNetBSD
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
     def test_batch_mode_attach_exit(self):
         """Test that the lldb driver's batch mode works correctly."""
         self.build()
         self.setTearDownCleanup()
 
-        import pexpect
         exe = self.getBuildArtifact("a.out")
-        module_cache = self.getBuildArtifact("module.cache")
-        prompt = "(lldb) "
 
-        # Finally, start up the process by hand, attach to it, and wait for its completion.
+        # Start up the process by hand, attach to it, and wait for its completion.
         # Attach is funny, since it looks like it stops with a signal on most Unixen so
         # care must be taken not to treat that as a reason to exit batch mode.
 
         # Start up the process by hand and wait for it to get to the wait loop.
-
+        import pexpect
         self.victim = pexpect.spawn('%s WAIT' % (exe))
         if self.victim is None:
             self.fail("Could not spawn ", exe, ".")
@@ -143,38 +135,30 @@
         self.addTearDownHook(self.closeVictim)
 
         self.victim.expect("PID: ([0-9]+) END")
-        if self.victim.match is None:
-            self.fail("Couldn't get the target PID.")
-
         victim_pid = int(self.victim.match.group(1))
 
         self.victim.expect("Waiting")
 
-        run_commands = ' -b  -o "settings set symbols.clang-modules-cache-path %s" -o "process attach -p %d" -o "breakpoint set --file %s -p \'Stop here to unset keep_waiting\' -N keep_waiting" -o "continue" -o "break delete keep_waiting" -o "expr keep_waiting = 0" -o "continue" ' % (
-            module_cache, victim_pid, self.source)
-        self.child = pexpect.spawn(
-            '%s %s %s %s' %
-            (lldbtest_config.lldbExec,
-             self.lldbOption,
-             run_commands,
-             exe))
-
+        extra_args = [
+            '-b',
+            '-o', 'process attach -p %d'%victim_pid,
+            '-o', "breakpoint set --file '%s' -p 'Stop here to unset keep_waiting' -N keep_waiting"%self.source,
+            '-o', 'continue',
+            '-o', 'break delete keep_waiting',
+            '-o', 'expr keep_waiting = 0',
+            '-o', 'continue',
+        ]
+        self.launch(executable=exe, extra_args=extra_args)
         child = self.child
 
-        # We should see the "run":
-        self.expect_string("attach")
+        child.expect_exact("attach")
 
-        self.expect_string(prompt + "continue")
+        child.expect_exact(self.PROMPT + "continue")
 
-        self.expect_string(prompt + "continue")
+        child.expect_exact(self.PROMPT + "continue")
 
         # Then we should see the process exit:
-        self.expect_string("Process %d exited with status" % (victim_pid))
+        child.expect_exact("Process %d exited with status" % (victim_pid))
 
-        victim_index = self.victim.expect([pexpect.EOF, pexpect.TIMEOUT])
-        self.assertTrue(victim_index == 0, "Victim didn't really exit.")
-
-        index = self.child.expect([pexpect.EOF, pexpect.TIMEOUT])
-        self.assertTrue(
-            index == 0,
-            "lldb didn't close on successful batch completion.")
+        self.victim.expect(pexpect.EOF)
+        child.expect(pexpect.EOF)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py
deleted file mode 100644
index 1108b12..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/TestCallUserAnonTypedef.py
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-Test calling user defined functions using expression evaluation.
-This test checks that typesystem lookup works correctly for typedefs of
-untagged structures.
-
-Ticket: https://llvm.org/bugs/show_bug.cgi?id=26790
-"""
-
-from __future__ import print_function
-
-import lldb
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestExprLookupAnonStructTypedef(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        # Find the breakpoint
-        self.line = line_number('main.cpp', '// lldb testsuite break')
-
-    @expectedFailureAll(
-        oslist=['linux'],
-        archs=['arm'],
-        bugnumber="llvm.org/pr27868")
-    def test(self):
-        """Test typedeffed untagged struct arguments for function call expressions"""
-        self.build()
-
-        self.runCmd("file "+self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.line,
-            num_expected_locations=-1,
-            loc_exact=True
-        )
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("expr multiply(&s)", substrs=['$0 = 1'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/argument_passing_restrictions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/argument_passing_restrictions/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/argument_passing_restrictions/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/calculator_mode/TestCalculatorMode.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/calculator_mode/TestCalculatorMode.py
deleted file mode 100644
index 46ea111..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/calculator_mode/TestCalculatorMode.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test calling an expression without a target.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestCalculatorMode(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    def test__calculator_mode(self):
-        """Test calling expressions in the dummy target."""
-        self.expect("expression 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
-        # Now try it with a specific language:
-        self.expect("expression -l c -- 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/Makefile
deleted file mode 100644
index 9d4f3b7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
-
-clean::
-	rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallBuiltinFunction.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallBuiltinFunction.py
deleted file mode 100644
index 87787f3..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallBuiltinFunction.py
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-Tests calling builtin functions using expression evaluation.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandCallBuiltinFunction(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # Builtins are expanded by Clang, so debug info shouldn't matter.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test these expressions while stopped at this line:')
-
-    def test(self):
-        self.build()
-
-        # Set breakpoint in main and run exe
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        interp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-
-        # Test different builtin functions.
-
-        interp.HandleCommand("expr __builtin_isinf(0.0f)", result)
-        self.assertEqual(result.GetOutput(), "(int) $0 = 0\n")
-
-        interp.HandleCommand("expr __builtin_isnormal(0.0f)", result)
-        self.assertEqual(result.GetOutput(), "(int) $1 = 0\n")
-
-        interp.HandleCommand("expr __builtin_constant_p(1)", result)
-        self.assertEqual(result.GetOutput(), "(int) $2 = 1\n")
-
-        interp.HandleCommand("expr __builtin_abs(-14)", result)
-        self.assertEqual(result.GetOutput(), "(int) $3 = 14\n")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py
deleted file mode 100644
index 8f2ea37..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStdStringFunction.py
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Test calling std::String member functions.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandCallFunctionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test these expressions while stopped at this line:')
-
-    @expectedFailureAll(
-        compiler="icc",
-        bugnumber="llvm.org/pr14437, fails with ICC 13.1")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    def test_with(self):
-        """Test calling std::String member function."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-
-        # Some versions of GCC encode two locations for the 'return' statement
-        # in main.cpp
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("print str",
-                    substrs=['Hello world'])
-
-        # Calling this function now succeeds, but we follow the typedef return type through to
-        # const char *, and thus don't invoke the Summary formatter.
-
-        # clang's libstdc++ on ios arm64 inlines std::string::c_str() always;
-        # skip this part of the test.
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-        do_cstr_test = True
-        if triple == "arm64-apple-ios" or triple == "arm64-apple-tvos" or triple == "armv7k-apple-watchos" or triple == "arm64-apple-bridgeos":
-            do_cstr_test = False
-        if do_cstr_test:
-            self.expect("print str.c_str()",
-                        substrs=['Hello world'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py
deleted file mode 100644
index d832983..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallStopAndContinue.py
+++ /dev/null
@@ -1,53 +0,0 @@
-"""
-Test calling a function, stopping in the call, continue and gather the result on stop.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandCallStopContinueTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test these expressions while stopped at this line:')
-        self.func_line = line_number('main.cpp', '{5, "five"}')
-
-    def test(self):
-        """Test gathering result from interrupted function call."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        # Some versions of GCC encode two locations for the 'return' statement
-        # in main.cpp
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "main.cpp",
-            self.func_line,
-            num_expected_locations=-1,
-            loc_exact=True)
-
-        self.expect("expr -i false -- returnsFive()", error=True,
-                    substrs=['Execution was interrupted, reason: breakpoint'])
-
-        self.runCmd("continue", "Continue completed")
-        self.expect(
-            "thread list",
-            substrs=[
-                'stop reason = User Expression thread plan',
-                r'Completed expression: (Five) $0 = (number = 5, name = "five")'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py
deleted file mode 100644
index 0eb7086..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-function/TestCallUserDefinedFunction.py
+++ /dev/null
@@ -1,58 +0,0 @@
-"""
-Test calling user defined functions using expression evaluation.
-
-Note:
-  LLDBs current first choice of evaluating functions is using the IR interpreter,
-  which is only supported on Hexagon. Otherwise JIT is used for the evaluation.
-
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandCallUserDefinedFunction(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test these expressions while stopped at this line:')
-
-    def test(self):
-        """Test return values of user defined function calls."""
-        self.build()
-
-        # Set breakpoint in main and run exe
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Test recursive function call.
-        self.expect("expr fib(5)", substrs=['$0 = 5'])
-
-        # Test function with more than one paramter
-        self.expect("expr add(4,8)", substrs=['$1 = 12'])
-
-        # Test nesting function calls in function paramters
-        self.expect("expr add(add(5,2),add(3,4))", substrs=['$2 = 14'])
-        self.expect("expr add(add(5,2),fib(5))", substrs=['$3 = 12'])
-
-        # Test function with pointer paramter
-        self.expect(
-            "exp stringCompare((const char*) \"Hello world\")",
-            substrs=['$4 = true'])
-        self.expect(
-            "exp stringCompare((const char*) \"Hellworld\")",
-            substrs=['$5 = false'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/Makefile
deleted file mode 100644
index 9d4f3b7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
-
-clean::
-	rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/TestCallOverriddenMethod.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/TestCallOverriddenMethod.py
deleted file mode 100644
index 1e61aa9..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/TestCallOverriddenMethod.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""
-Test calling an overriden method.
-
-Note:
-  This verifies that LLDB is correctly building the method overrides table.
-  If this table is not built correctly then calls to overridden methods in
-  derived classes may generate references to non-existant vtable entries,
-  as the compiler treats the overridden method as a totally new virtual
-  method definition.
-  <rdar://problem/14205774>
-
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class ExprCommandCallOverriddenMethod(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number('main.cpp', '// Set breakpoint here')
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    def test(self):
-        """Test calls to overridden methods in derived classes."""
-        self.build()
-
-        # Set breakpoint in main and run exe
-        self.runCmd("file " + self.getBuildArtifact("a.out"),
-                    CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=-1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Test call to method in base class (this should always work as the base
-        # class method is never an override).
-        self.expect("expr b->foo()")
-
-        # Test call to overridden method in derived class (this will fail if the
-        # overrides table is not correctly set up, as Derived::foo will be assigned
-        # a vtable entry that does not exist in the compiled program).
-        self.expect("expr d.foo()")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/main.cpp
deleted file mode 100644
index 54ae705..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-overridden-method/main.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-class Base {
-public:
-  virtual ~Base() {}
-  virtual void foo() {}
-};
-
-class Derived : public Base {
-public:
-  virtual void foo() {}
-};
-
-int main() {
-  Derived d;
-  Base *b = &d;
-  return 0; // Set breakpoint here
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-restarts/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-restarts/Makefile
deleted file mode 100644
index 1c93ae1..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-restarts/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := lotta-signals.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py
deleted file mode 100644
index 235ce74..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-restarts/TestCallThatRestarts.py
+++ /dev/null
@@ -1,167 +0,0 @@
-"""
-Test calling a function that hits a signal set to auto-restart, make sure the call completes.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandThatRestartsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "lotta-signals.c"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    @skipIfFreeBSD  # llvm.org/pr19246: intermittent failure
-    @skipIfDarwin  # llvm.org/pr19246: intermittent failure
-    @skipIfWindows  # Test relies on signals, unsupported on Windows
-    @expectedFailureNetBSD
-    @expectedFlakeyAndroid(bugnumber="llvm.org/pr19246")
-    def test(self):
-        """Test calling function that hits a signal and restarts."""
-        self.build()
-        self.call_function()
-
-    def check_after_call(self, num_sigchld):
-        after_call = self.sigchld_no.GetValueAsSigned(-1)
-        self.assertTrue(
-            after_call -
-            self.start_sigchld_no == num_sigchld,
-            "Really got %d SIGCHLD signals through the call." %
-            (num_sigchld))
-        self.start_sigchld_no = after_call
-
-        # Check that we are back where we were before:
-        frame = self.thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            self.orig_frame_pc == frame.GetPC(),
-            "Restored the zeroth frame correctly")
-
-    def call_function(self):
-        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                      'Stop here in main.', self.main_source_spec)
-
-        # Make sure the SIGCHLD behavior is pass/no-stop/no-notify:
-        return_obj = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle SIGCHLD -s 0 -p 1 -n 0", return_obj)
-        self.assertTrue(return_obj.Succeeded(), "Set SIGCHLD to pass, no-stop")
-
-        # The sigchld_no variable should be 0 at this point.
-        self.sigchld_no = target.FindFirstGlobalVariable("sigchld_no")
-        self.assertTrue(
-            self.sigchld_no.IsValid(),
-            "Got a value for sigchld_no")
-
-        self.start_sigchld_no = self.sigchld_no.GetValueAsSigned(-1)
-        self.assertTrue(
-            self.start_sigchld_no != -1,
-            "Got an actual value for sigchld_no")
-
-        options = lldb.SBExpressionOptions()
-        # processing 30 signals takes a while, increase the expression timeout
-        # a bit
-        options.SetTimeoutInMicroSeconds(3000000)  # 3s
-        options.SetUnwindOnError(True)
-
-        frame = self.thread.GetFrameAtIndex(0)
-        # Store away the PC to check that the functions unwind to the right
-        # place after calls
-        self.orig_frame_pc = frame.GetPC()
-
-        num_sigchld = 30
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
-
-        self.check_after_call(num_sigchld)
-
-        # Okay, now try with a breakpoint in the called code in the case where
-        # we are ignoring breakpoint hits.
-        handler_bkpt = target.BreakpointCreateBySourceRegex(
-            "Got sigchld %d.", self.main_source_spec)
-        self.assertTrue(handler_bkpt.GetNumLocations() > 0)
-        options.SetIgnoreBreakpoints(True)
-        options.SetUnwindOnError(True)
-
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-
-        self.assertTrue(value.IsValid() and value.GetError().Success())
-        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
-        self.check_after_call(num_sigchld)
-
-        # Now set the signal to print but not stop and make sure that calling
-        # still works:
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
-        self.assertTrue(
-            return_obj.Succeeded(),
-            "Set SIGCHLD to pass, no-stop, notify")
-
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-
-        self.assertTrue(value.IsValid() and value.GetError().Success())
-        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
-        self.check_after_call(num_sigchld)
-
-        # Now set this unwind on error to false, and make sure that we still
-        # complete the call:
-        options.SetUnwindOnError(False)
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-
-        self.assertTrue(value.IsValid() and value.GetError().Success())
-        self.assertTrue(value.GetValueAsSigned(-1) == num_sigchld)
-        self.check_after_call(num_sigchld)
-
-        # Okay, now set UnwindOnError to true, and then make the signal behavior to stop
-        # and see that now we do stop at the signal point:
-
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle SIGCHLD -s 1 -p 1 -n 1", return_obj)
-        self.assertTrue(
-            return_obj.Succeeded(),
-            "Set SIGCHLD to pass, stop, notify")
-
-        value = frame.EvaluateExpression(
-            "call_me (%d)" %
-            (num_sigchld), options)
-        self.assertTrue(
-            value.IsValid() and value.GetError().Success() == False)
-
-        # Set signal handling back to no-stop, and continue and we should end
-        # up back in out starting frame:
-        self.dbg.GetCommandInterpreter().HandleCommand(
-            "process handle SIGCHLD -s 0 -p 1 -n 1", return_obj)
-        self.assertTrue(
-            return_obj.Succeeded(),
-            "Set SIGCHLD to pass, no-stop, notify")
-
-        error = process.Continue()
-        self.assertTrue(
-            error.Success(),
-            "Continuing after stopping for signal succeeds.")
-
-        frame = self.thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            frame.GetPC() == self.orig_frame_pc,
-            "Continuing returned to the place we started.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-throws/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-throws/Makefile
deleted file mode 100644
index ac07b31..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-throws/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-OBJC_SOURCES := call-throws.m
-
-include $(LEVEL)/Makefile.rules
-LDFLAGS += -framework Foundation
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-throws/TestCallThatThrows.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-throws/TestCallThatThrows.py
deleted file mode 100644
index c6b90ba..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/call-throws/TestCallThatThrows.py
+++ /dev/null
@@ -1,104 +0,0 @@
-"""
-Test calling a function that throws an ObjC exception, make sure that it doesn't propagate the exception.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandWithThrowTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "call-throws.m"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    @skipUnlessDarwin
-    def test(self):
-        """Test calling a function that throws and ObjC exception."""
-        self.build()
-        self.call_function()
-
-    def check_after_call(self):
-        # Check that we are back where we were before:
-        frame = self.thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            self.orig_frame_pc == frame.GetPC(),
-            "Restored the zeroth frame correctly")
-
-    def call_function(self):
-        """Test calling function that throws."""
-        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   'I am about to throw.', self.main_source_spec)
-
-        options = lldb.SBExpressionOptions()
-        options.SetUnwindOnError(True)
-
-        frame = self.thread.GetFrameAtIndex(0)
-        # Store away the PC to check that the functions unwind to the right
-        # place after calls
-        self.orig_frame_pc = frame.GetPC()
-
-        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success() == False)
-
-        self.check_after_call()
-
-        # Okay, now try with a breakpoint in the called code in the case where
-        # we are ignoring breakpoint hits.
-        handler_bkpt = target.BreakpointCreateBySourceRegex(
-            "I felt like it", self.main_source_spec)
-        self.assertTrue(handler_bkpt.GetNumLocations() > 0)
-        options.SetIgnoreBreakpoints(True)
-        options.SetUnwindOnError(True)
-
-        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
-
-        self.assertTrue(
-            value.IsValid() and value.GetError().Success() == False)
-        self.check_after_call()
-
-        # Now set the ObjC language breakpoint and make sure that doesn't
-        # interfere with the call:
-        exception_bkpt = target.BreakpointCreateForException(
-            lldb.eLanguageTypeObjC, False, True)
-        self.assertTrue(exception_bkpt.GetNumLocations() > 0)
-
-        options.SetIgnoreBreakpoints(True)
-        options.SetUnwindOnError(True)
-
-        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
-
-        self.assertTrue(
-            value.IsValid() and value.GetError().Success() == False)
-        self.check_after_call()
-
-        # Now turn off exception trapping, and call a function that catches the exceptions,
-        # and make sure the function actually completes, and we get the right
-        # value:
-        options.SetTrapExceptions(False)
-        value = frame.EvaluateExpression("[my_class iCatchMyself]", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsUnsigned() == 57)
-        self.check_after_call()
-        options.SetTrapExceptions(True)
-
-        # Now set this unwind on error to false, and make sure that we stop
-        # where the exception was thrown
-        options.SetUnwindOnError(False)
-        value = frame.EvaluateExpression("[my_class callMeIThrow]", options)
-
-        self.assertTrue(
-            value.IsValid() and value.GetError().Success() == False)
-        self.check_after_call()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/cast_int_to_anonymous_enum/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/char/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/char/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/char/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
deleted file mode 100644
index a9679b7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/char/TestExprsChar.py
+++ /dev/null
@@ -1,67 +0,0 @@
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCharTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def do_test(self, dictionary=None):
-        """These basic expression commands should work as expected."""
-        self.build(dictionary=dictionary)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        value = frame.EvaluateExpression("foo(c)")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 1)
-
-        value = frame.EvaluateExpression("foo(sc)")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 2)
-
-        value = frame.EvaluateExpression("foo(uc)")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 3)
-
-    def test_default_char(self):
-        self.do_test()
-
-    @expectedFailureAll(
-        archs=[
-            "arm",
-            "aarch64",
-            "powerpc64le",
-            "s390x"],
-        bugnumber="llvm.org/pr23069")
-    def test_signed_char(self):
-        self.do_test(dictionary={'CFLAGS_EXTRAS': '-fsigned-char'})
-
-    @expectedFailureAll(
-        archs=[
-            "i[3-6]86",
-            "x86_64",
-            "arm64",
-            'armv7',
-            'armv7k'],
-        bugnumber="llvm.org/pr23069, <rdar://problem/28721938>")
-    @expectedFailureAll(triple='mips*', bugnumber="llvm.org/pr23069")
-    def test_unsigned_char(self):
-        self.do_test(dictionary={'CFLAGS_EXTRAS': '-funsigned-char'})
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/class_template_specialization_empty_pack/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/class_template_specialization_empty_pack/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/class_template_specialization_empty_pack/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/Makefile
deleted file mode 100644
index 6fc26a91..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp other.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/TestExprCompletion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/TestExprCompletion.py
deleted file mode 100644
index 536b9e0..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/completion/TestExprCompletion.py
+++ /dev/null
@@ -1,257 +0,0 @@
-"""
-Test the lldb command line completion mechanism for the 'expr' command.
-"""
-
-from __future__ import print_function
-
-import random
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbplatform
-from lldbsuite.test import lldbutil
-
-class CommandLineExprCompletionTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_expr_completion(self):
-        self.build()
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-
-        # Try the completion before we have a context to complete on.
-        self.assume_no_completions('expr some_expr')
-        self.assume_no_completions('expr ')
-        self.assume_no_completions('expr f')
-
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-
-        # Completing member functions
-        self.complete_exactly('expr some_expr.FooNoArgs',
-                              'expr some_expr.FooNoArgsBar()')
-        self.complete_exactly('expr some_expr.FooWithArgs',
-                              'expr some_expr.FooWithArgsBar(')
-        self.complete_exactly('expr some_expr.FooWithMultipleArgs',
-                              'expr some_expr.FooWithMultipleArgsBar(')
-        self.complete_exactly('expr some_expr.FooUnderscore',
-                              'expr some_expr.FooUnderscoreBar_()')
-        self.complete_exactly('expr some_expr.FooNumbers',
-                              'expr some_expr.FooNumbersBar1()')
-        self.complete_exactly('expr some_expr.StaticMemberMethod',
-                              'expr some_expr.StaticMemberMethodBar()')
-
-        # Completing static functions
-        self.complete_exactly('expr Expr::StaticMemberMethod',
-                              'expr Expr::StaticMemberMethodBar()')
-
-        # Completing member variables
-        self.complete_exactly('expr some_expr.MemberVariab',
-                              'expr some_expr.MemberVariableBar')
-
-        # Multiple completions
-        self.completions_contain('expr some_expr.',
-                                 ['some_expr.FooNumbersBar1()',
-                                  'some_expr.FooUnderscoreBar_()',
-                                  'some_expr.FooWithArgsBar(',
-                                  'some_expr.MemberVariableBar'])
-
-        self.completions_contain('expr some_expr.Foo',
-                                 ['some_expr.FooNumbersBar1()',
-                                  'some_expr.FooUnderscoreBar_()',
-                                  'some_expr.FooWithArgsBar('])
-
-        self.completions_contain('expr ',
-                                 ['static_cast',
-                                  'reinterpret_cast',
-                                  'dynamic_cast'])
-
-        self.completions_contain('expr 1 + ',
-                                 ['static_cast',
-                                  'reinterpret_cast',
-                                  'dynamic_cast'])
-
-        # Completion expr without spaces
-        # This is a bit awkward looking for the user, but that's how
-        # the completion API works at the moment.
-        self.completions_contain('expr 1+',
-                                 ['1+some_expr', "1+static_cast"])
-
-        # Test with spaces
-        self.complete_exactly('expr   some_expr .FooNoArgs',
-                              'expr   some_expr .FooNoArgsBar()')
-        self.complete_exactly('expr  some_expr .FooNoArgs',
-                              'expr  some_expr .FooNoArgsBar()')
-        self.complete_exactly('expr some_expr .FooNoArgs',
-                              'expr some_expr .FooNoArgsBar()')
-        self.complete_exactly('expr some_expr. FooNoArgs',
-                              'expr some_expr. FooNoArgsBar()')
-        self.complete_exactly('expr some_expr . FooNoArgs',
-                              'expr some_expr . FooNoArgsBar()')
-        self.complete_exactly('expr Expr :: StaticMemberMethod',
-                              'expr Expr :: StaticMemberMethodBar()')
-        self.complete_exactly('expr Expr ::StaticMemberMethod',
-                              'expr Expr ::StaticMemberMethodBar()')
-        self.complete_exactly('expr Expr:: StaticMemberMethod',
-                              'expr Expr:: StaticMemberMethodBar()')
-
-        # Test that string literals don't break our parsing logic.
-        self.complete_exactly('expr const char *cstr = "some_e"; char c = *cst',
-                              'expr const char *cstr = "some_e"; char c = *cstr')
-        self.complete_exactly('expr const char *cstr = "some_e" ; char c = *cst',
-                              'expr const char *cstr = "some_e" ; char c = *cstr')
-        # Requesting completions inside an incomplete string doesn't provide any
-        # completions.
-        self.complete_exactly('expr const char *cstr = "some_e',
-                              'expr const char *cstr = "some_e')
-
-        # Completing inside double dash should do nothing
-        self.assume_no_completions('expr -i0 -- some_expr.', 10)
-        self.assume_no_completions('expr -i0 -- some_expr.', 11)
-
-        # Test with expr arguments
-        self.complete_exactly('expr -i0 -- some_expr .FooNoArgs',
-                              'expr -i0 -- some_expr .FooNoArgsBar()')
-        self.complete_exactly('expr  -i0 -- some_expr .FooNoArgs',
-                              'expr  -i0 -- some_expr .FooNoArgsBar()')
-
-        # Addrof and deref
-        self.complete_exactly('expr (*(&some_expr)).FooNoArgs',
-                              'expr (*(&some_expr)).FooNoArgsBar()')
-        self.complete_exactly('expr (*(&some_expr)) .FooNoArgs',
-                              'expr (*(&some_expr)) .FooNoArgsBar()')
-        self.complete_exactly('expr (* (&some_expr)) .FooNoArgs',
-                              'expr (* (&some_expr)) .FooNoArgsBar()')
-        self.complete_exactly('expr (* (& some_expr)) .FooNoArgs',
-                              'expr (* (& some_expr)) .FooNoArgsBar()')
-
-        # Addrof and deref (part 2)
-        self.complete_exactly('expr (&some_expr)->FooNoArgs',
-                              'expr (&some_expr)->FooNoArgsBar()')
-        self.complete_exactly('expr (&some_expr) ->FooNoArgs',
-                              'expr (&some_expr) ->FooNoArgsBar()')
-        self.complete_exactly('expr (&some_expr) -> FooNoArgs',
-                              'expr (&some_expr) -> FooNoArgsBar()')
-        self.complete_exactly('expr (&some_expr)-> FooNoArgs',
-                              'expr (&some_expr)-> FooNoArgsBar()')
-
-        # Builtin arg
-        self.complete_exactly('expr static_ca',
-                              'expr static_cast')
-
-        # From other files
-        self.complete_exactly('expr fwd_decl_ptr->Hidden',
-                              'expr fwd_decl_ptr->HiddenMember')
-
-
-        # Types
-        self.complete_exactly('expr LongClassNa',
-                              'expr LongClassName')
-        self.complete_exactly('expr LongNamespaceName::NestedCla',
-                              'expr LongNamespaceName::NestedClass')
-
-        # Namespaces
-        self.complete_exactly('expr LongNamespaceNa',
-                              'expr LongNamespaceName::')
-
-        # Multiple arguments
-        self.complete_exactly('expr &some_expr + &some_e',
-                              'expr &some_expr + &some_expr')
-        self.complete_exactly('expr SomeLongVarNameWithCapitals + SomeLongVarName',
-                              'expr SomeLongVarNameWithCapitals + SomeLongVarNameWithCapitals')
-        self.complete_exactly('expr SomeIntVar + SomeIntV',
-                              'expr SomeIntVar + SomeIntVar')
-
-        # Multiple statements
-        self.complete_exactly('expr long LocalVariable = 0; LocalVaria',
-                              'expr long LocalVariable = 0; LocalVariable')
-
-        # Custom Decls
-        self.complete_exactly('expr auto l = [](int LeftHandSide, int bx){ return LeftHandS',
-                              'expr auto l = [](int LeftHandSide, int bx){ return LeftHandSide')
-        self.complete_exactly('expr struct LocalStruct { long MemberName; } ; LocalStruct S; S.Mem',
-                              'expr struct LocalStruct { long MemberName; } ; LocalStruct S; S.MemberName')
-
-        # Completing function call arguments
-        self.complete_exactly('expr some_expr.FooWithArgsBar(some_exp',
-                              'expr some_expr.FooWithArgsBar(some_expr')
-        self.complete_exactly('expr some_expr.FooWithArgsBar(SomeIntV',
-                              'expr some_expr.FooWithArgsBar(SomeIntVar')
-        self.complete_exactly('expr some_expr.FooWithMultipleArgsBar(SomeIntVar, SomeIntVa',
-                              'expr some_expr.FooWithMultipleArgsBar(SomeIntVar, SomeIntVar')
-
-        # Function return values
-        self.complete_exactly('expr some_expr.Self().FooNoArgs',
-                              'expr some_expr.Self().FooNoArgsBar()')
-        self.complete_exactly('expr some_expr.Self() .FooNoArgs',
-                              'expr some_expr.Self() .FooNoArgsBar()')
-        self.complete_exactly('expr some_expr.Self(). FooNoArgs',
-                              'expr some_expr.Self(). FooNoArgsBar()')
-
-    def test_expr_completion_with_descriptions(self):
-        self.build()
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-
-        self.check_completion_with_desc("expr ", [
-            # VarDecls have their type as description.
-            ["some_expr", "Expr &"],
-            # builtin types have no description.
-            ["int", ""],
-            ["float", ""]
-        ])
-        self.check_completion_with_desc("expr some_expr.", [
-            # Functions have their signature as description.
-            ["some_expr.Self()", "Expr &Self()"],
-            ["some_expr.operator=(", "inline Expr &operator=(const Expr &)"],
-            ["some_expr.FooNumbersBar1()", "int FooNumbersBar1()"],
-            ["some_expr.StaticMemberMethodBar()", "static int StaticMemberMethodBar()"],
-            ["some_expr.FooWithArgsBar(", "int FooWithArgsBar(int)"],
-            ["some_expr.FooNoArgsBar()", "int FooNoArgsBar()"],
-            ["some_expr.FooUnderscoreBar_()", "int FooUnderscoreBar_()"],
-            ["some_expr.FooWithMultipleArgsBar(", "int FooWithMultipleArgsBar(int, int)"],
-            ["some_expr.~Expr()", "inline ~Expr()"],
-            # FieldDecls have their type as description.
-            ["some_expr.MemberVariableBar", "int"],
-        ])
-
-    def assume_no_completions(self, str_input, cursor_pos = None):
-        interp = self.dbg.GetCommandInterpreter()
-        match_strings = lldb.SBStringList()
-        if cursor_pos is None:
-          cursor_pos = len(str_input)
-        num_matches = interp.HandleCompletion(str_input, cursor_pos, 0, -1, match_strings)
-
-        available_completions = []
-        for m in match_strings:
-            available_completions.append(m)
-
-        self.assertEquals(num_matches, 0, "Got matches, but didn't expect any: " + str(available_completions))
-
-    def completions_contain(self, str_input, items):
-        interp = self.dbg.GetCommandInterpreter()
-        match_strings = lldb.SBStringList()
-        num_matches = interp.HandleCompletion(str_input, len(str_input), 0, -1, match_strings)
-        common_match = match_strings.GetStringAtIndex(0)
-
-        for item in items:
-            found = False
-            for m in match_strings:
-                if m == item:
-                    found = True
-            if not found:
-                # Transform match_strings to a python list with strings
-                available_completions = []
-                for m in match_strings:
-                     available_completions.append(m)
-                self.assertTrue(found, "Couldn't find completion " + item + " in completions " + str(available_completions))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object-objc/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object-objc/Makefile
deleted file mode 100644
index b659274..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object-objc/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-LDFLAGS += -framework Foundation
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/context-object/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dollar-in-variable/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dollar-in-variable/Makefile
deleted file mode 100644
index f5a47fc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dollar-in-variable/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../make
-C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dont_allow_jit/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dont_allow_jit/Makefile
deleted file mode 100644
index 50d4ab6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dont_allow_jit/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dont_allow_jit/TestAllowJIT.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dont_allow_jit/TestAllowJIT.py
deleted file mode 100644
index 05c6790..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/dont_allow_jit/TestAllowJIT.py
+++ /dev/null
@@ -1,90 +0,0 @@
-"""
-Test that --allow-jit=false does disallow JITting:
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-
-class TestAllowJIT(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_allow_jit_expr_command(self):
-        """Test the --allow-jit command line flag"""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.expr_cmd_test()
-
-    def test_allow_jit_options(self):
-        """Test the SetAllowJIT SBExpressionOption setting"""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.expr_options_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    def expr_cmd_test(self):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   "Set a breakpoint here", self.main_source_file)
-
-        frame = thread.GetFrameAtIndex(0)
-        
-        # First make sure we can call the function with 
-        interp = self.dbg.GetCommandInterpreter()
-        self.expect("expr --allow-jit 1 -- call_me(10)",
-                    substrs = ["(int) $", "= 18"])
-        # Now make sure it fails with the "can't IR interpret message" if allow-jit is false:
-        self.expect("expr --allow-jit 0 -- call_me(10)",
-                    error=True,
-                    substrs = ["Can't run the expression locally"])
-        
-    def expr_options_test(self):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                   "Set a breakpoint here", self.main_source_file)
-
-        frame = thread.GetFrameAtIndex(0)
-
-        # First make sure we can call the function with the default option set. 
-        options = lldb.SBExpressionOptions()
-        # Check that the default is to allow JIT:
-        self.assertEqual(options.GetAllowJIT(), True, "Default is true")
-
-        # Now use the options:
-        result = frame.EvaluateExpression("call_me(10)", options)
-        self.assertTrue(result.GetError().Success(), "expression succeeded")
-        self.assertEqual(result.GetValueAsSigned(), 18, "got the right value.")
-
-        # Now disallow JIT and make sure it fails:
-        options.SetAllowJIT(False)
-        # Check that we got the right value:
-        self.assertEqual(options.GetAllowJIT(), False, "Got False after setting to False")
-
-        # Again use it and ensure we fail:
-        result = frame.EvaluateExpression("call_me(10)", options)
-        self.assertTrue(result.GetError().Fail(), "expression failed with no JIT")
-        self.assertTrue("Can't run the expression locally" in result.GetError().GetCString(), "Got right error")
-
-        # Finally set the allow JIT value back to true and make sure that works:
-        options.SetAllowJIT(True)
-        self.assertEqual(options.GetAllowJIT(), True, "Set back to True correctly")
-
-        # And again, make sure this works:
-        result = frame.EvaluateExpression("call_me(10)", options)
-        self.assertTrue(result.GetError().Success(), "expression succeeded")
-        self.assertEqual(result.GetValueAsSigned(), 18, "got the right value.")
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py
deleted file mode 100644
index 2ea3952..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/expr-in-syscall/TestExpressionInSyscall.py
+++ /dev/null
@@ -1,93 +0,0 @@
-"""Test that we are able to evaluate expressions when the inferior is blocked in a syscall"""
-
-from __future__ import print_function
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprSyscallTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr21765, getpid() does not exist on Windows")
-    @expectedFailureNetBSD
-    def test_setpgid(self):
-        self.build()
-        self.expr_syscall()
-
-    def expr_syscall(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        listener = lldb.SBListener("my listener")
-
-        # launch the inferior and don't wait for it to stop
-        self.dbg.SetAsync(True)
-        error = lldb.SBError()
-        process = target.Launch(listener,
-                                None,      # argv
-                                None,      # envp
-                                None,      # stdin_path
-                                None,      # stdout_path
-                                None,      # stderr_path
-                                None,      # working directory
-                                0,         # launch flags
-                                False,     # Stop at entry
-                                error)     # error
-
-        self.assertTrue(process and process.IsValid(), PROCESS_IS_VALID)
-
-        event = lldb.SBEvent()
-
-        # Give the child enough time to reach the syscall,
-        # while clearing out all the pending events.
-        # The last WaitForEvent call will time out after 2 seconds.
-        while listener.WaitForEvent(2, event):
-            pass
-
-        # now the process should be running (blocked in the syscall)
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateRunning,
-            "Process is running")
-
-        # send the process a signal
-        process.SendAsyncInterrupt()
-        while listener.WaitForEvent(2, event):
-            pass
-
-        # as a result the process should stop
-        # in all likelihood we have stopped in the middle of the sleep()
-        # syscall
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateStopped,
-            PROCESS_STOPPED)
-        thread = process.GetSelectedThread()
-
-        # try evaluating a couple of expressions in this state
-        self.expect("expr release_flag = 1", substrs=[" = 1"])
-        self.expect("print (int)getpid()",
-                    substrs=[str(process.GetProcessID())])
-
-        # and run the process to completion
-        process.Continue()
-
-        # process all events
-        while listener.WaitForEvent(10, event):
-            new_state = lldb.SBProcess.GetStateFromEvent(event)
-            if new_state == lldb.eStateExited:
-                break
-
-        self.assertEqual(process.GetState(), lldb.eStateExited)
-        self.assertEqual(process.GetExitStatus(), 0)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/fixits/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/fixits/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/fixits/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py
deleted file mode 100644
index 9aa28f7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py
+++ /dev/null
@@ -1,72 +0,0 @@
-"""
-Test calling an expression with errors that a FixIt can fix.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandWithFixits(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    @skipUnlessDarwin
-    def test_with_target(self):
-        """Test calling expressions with errors that can be fixed by the FixIts."""
-        self.build()
-        self.try_expressions()
-
-    def test_with_dummy_target(self):
-        """Test calling expressions in the dummy target with errors that can be fixed by the FixIts."""
-        ret_val = lldb.SBCommandReturnObject()
-        result = self.dbg.GetCommandInterpreter().HandleCommand("expression ((1 << 16) - 1))", ret_val)
-        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "The expression was successful.")
-        self.assertTrue("Fix-it applied" in ret_val.GetError(), "Found the applied FixIt.")
-
-    def try_expressions(self):
-        """Test calling expressions with errors that can be fixed by the FixIts."""
-        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                        'Stop here to evaluate expressions', self.main_source_spec)
-
-        options = lldb.SBExpressionOptions()
-        options.SetAutoApplyFixIts(True)
-
-        frame = self.thread.GetFrameAtIndex(0)
-
-        # Try with one error:
-        value = frame.EvaluateExpression("my_pointer.first", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsUnsigned() == 10)
-
-        # Try with two errors:
-        two_error_expression = "my_pointer.second->a"
-        value = frame.EvaluateExpression(two_error_expression, options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertTrue(value.GetValueAsUnsigned() == 20)
-
-        # Now turn off the fixits, and the expression should fail:
-        options.SetAutoApplyFixIts(False)
-        value = frame.EvaluateExpression(two_error_expression, options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Fail())
-        error_string = value.GetError().GetCString()
-        self.assertTrue(
-            error_string.find("fixed expression suggested:") != -1,
-            "Fix was suggested")
-        self.assertTrue(
-            error_string.find("my_pointer->second.a") != -1,
-            "Fix was right")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py
deleted file mode 100644
index b13d655..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/TestFormatters.py
+++ /dev/null
@@ -1,287 +0,0 @@
-"""
-Test using LLDB data formatters with frozen objects coming from the expression parser.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprFormattersTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.line = line_number('main.cpp',
-                                '// Stop here')
-
-    @skipIfFreeBSD  # llvm.org/pr24691 skipping to avoid crashing the test runner
-    @expectedFailureNetBSD
-    @expectedFailureAll(
-        oslist=['freebsd'],
-        bugnumber='llvm.org/pr19011 Newer Clang omits C1 complete object constructor')
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    @skipIfTargetAndroid()  # skipping to avoid crashing the test runner
-    @expectedFailureAndroid('llvm.org/pr24691')  # we hit an assertion in clang
-    def test(self):
-        """Test expr + formatters for good interoperability."""
-        self.build()
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synthetic clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        """Test expr + formatters for good interoperability."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.runCmd("command script import formatters.py")
-        self.runCmd("command script import foosynth.py")
-
-        if self.TraceOn():
-            self.runCmd("frame variable foo1 --show-types")
-            self.runCmd("frame variable foo1.b --show-types")
-            self.runCmd("frame variable foo1.b.b_ref --show-types")
-
-        self.filecheck("expression --show-types -- *(new foo(47))", __file__,
-                '-check-prefix=EXPR-TYPES-NEW-FOO')
-        # EXPR-TYPES-NEW-FOO: (foo) ${{.*}} = {
-        # EXPR-TYPES-NEW-FOO-NEXT:   (int) a = 47
-        # EXPR-TYPES-NEW-FOO-NEXT:   (int *) a_ptr = 0x
-        # EXPR-TYPES-NEW-FOO-NEXT:   (bar) b = {
-        # EXPR-TYPES-NEW-FOO-NEXT:     (int) i = 94
-        # EXPR-TYPES-NEW-FOO-NEXT:     (int *) i_ptr = 0x
-        # EXPR-TYPES-NEW-FOO-NEXT:     (baz) b = {
-        # EXPR-TYPES-NEW-FOO-NEXT:       (int) h = 97
-        # EXPR-TYPES-NEW-FOO-NEXT:       (int) k = 99
-        # EXPR-TYPES-NEW-FOO-NEXT:     }
-        # EXPR-TYPES-NEW-FOO-NEXT:     (baz &) b_ref = 0x
-        # EXPR-TYPES-NEW-FOO-NEXT:   }
-        # EXPR-TYPES-NEW-FOO-NEXT: }
-
-        self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
-
-        self.expect("expression new int(12)",
-                    substrs=['(int *) $', ' = 0x'])
-
-        self.runCmd(
-            "type summary add -s \"${var%pointer} -> ${*var%decimal}\" \"int *\"")
-
-        self.expect("expression new int(12)",
-                    substrs=['(int *) $', '= 0x', ' -> 12'])
-
-        self.expect("expression foo1.a_ptr",
-                    substrs=['(int *) $', '= 0x', ' -> 13'])
-
-        self.filecheck("expression foo1", __file__, '-check-prefix=EXPR-FOO1')
-        # EXPR-FOO1: (foo) $
-        # EXPR-FOO1-SAME: a = 12
-        # EXPR-FOO1-SAME: a_ptr = {{[0-9]+}} -> 13
-        # EXPR-FOO1-SAME: i = 24
-        # EXPR-FOO1-SAME: i_ptr = {{[0-9]+}} -> 25
-        # EXPR-FOO1-SAME: b_ref = {{[0-9]+}}
-        # EXPR-FOO1-SAME: h = 27
-        # EXPR-FOO1-SAME: k = 29
-
-        self.filecheck("expression --ptr-depth=1 -- new foo(47)", __file__,
-                '-check-prefix=EXPR-PTR-DEPTH1')
-        # EXPR-PTR-DEPTH1: (foo *) $
-        # EXPR-PTR-DEPTH1-SAME: a = 47
-        # EXPR-PTR-DEPTH1-SAME: a_ptr = {{[0-9]+}} -> 48
-        # EXPR-PTR-DEPTH1-SAME: i = 94
-        # EXPR-PTR-DEPTH1-SAME: i_ptr = {{[0-9]+}} -> 95
-
-        self.filecheck("expression foo2", __file__, '-check-prefix=EXPR-FOO2')
-        # EXPR-FOO2: (foo) $
-        # EXPR-FOO2-SAME: a = 121
-        # EXPR-FOO2-SAME: a_ptr = {{[0-9]+}} -> 122
-        # EXPR-FOO2-SAME: i = 242
-        # EXPR-FOO2-SAME: i_ptr = {{[0-9]+}} -> 243
-        # EXPR-FOO2-SAME: h = 245
-        # EXPR-FOO2-SAME: k = 247
-
-        object_name = self.res.GetOutput()
-        object_name = object_name[7:]
-        object_name = object_name[0:object_name.find(' =')]
-
-        self.filecheck("frame variable foo2", __file__, '-check-prefix=VAR-FOO2')
-        # VAR-FOO2: (foo) foo2
-        # VAR-FOO2-SAME: a = 121
-        # VAR-FOO2-SAME: a_ptr = {{[0-9]+}} -> 122
-        # VAR-FOO2-SAME: i = 242
-        # VAR-FOO2-SAME: i_ptr = {{[0-9]+}} -> 243
-        # VAR-FOO2-SAME: h = 245
-        # VAR-FOO2-SAME: k = 247
-
-        # The object is the same as foo2, so use the EXPR-FOO2 checks.
-        self.filecheck("expression $" + object_name, __file__,
-                '-check-prefix=EXPR-FOO2')
-
-        self.runCmd("type summary delete foo")
-        self.runCmd(
-            "type synthetic add --python-class foosynth.FooSyntheticProvider foo")
-
-        self.expect("expression --show-types -- $" + object_name,
-                    substrs=['(foo) $', ' = {', '(int) *i_ptr = 243'])
-
-        self.runCmd("n")
-        self.runCmd("n")
-
-        self.runCmd("type synthetic delete foo")
-        self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
-
-        self.expect(
-            "expression foo2",
-            substrs=[
-                '(foo) $',
-                'a = 7777',
-                'a_ptr = ',
-                ' -> 122',
-                'i = 242',
-                'i_ptr = ',
-                ' -> 8888'])
-
-        self.expect("expression $" + object_name + '.a',
-                    substrs=['7777'])
-
-        self.expect("expression *$" + object_name + '.b.i_ptr',
-                    substrs=['8888'])
-
-        self.expect(
-            "expression $" +
-            object_name,
-            substrs=[
-                '(foo) $',
-                'a = 121',
-                'a_ptr = ',
-                ' -> 122',
-                'i = 242',
-                'i_ptr = ',
-                ' -> 8888',
-                'h = 245',
-                'k = 247'])
-
-        self.runCmd("type summary delete foo")
-        self.runCmd(
-            "type synthetic add --python-class foosynth.FooSyntheticProvider foo")
-
-        self.expect("expression --show-types -- $" + object_name,
-                    substrs=['(foo) $', ' = {', '(int) *i_ptr = 8888'])
-
-        self.runCmd("n")
-
-        self.runCmd("type synthetic delete foo")
-        self.runCmd("type summary add -F formatters.foo_SummaryProvider foo")
-
-        self.expect(
-            "expression $" +
-            object_name,
-            substrs=[
-                '(foo) $',
-                'a = 121',
-                'a_ptr = ',
-                ' -> 122',
-                'i = 242',
-                'i_ptr = ',
-                ' -> 8888',
-                'k = 247'])
-
-        process = self.dbg.GetSelectedTarget().GetProcess()
-        thread = process.GetThreadAtIndex(0)
-        frame = thread.GetSelectedFrame()
-
-        frozen = frame.EvaluateExpression("$" + object_name + ".a_ptr")
-
-        a_data = frozen.GetPointeeData()
-
-        error = lldb.SBError()
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                0) == 122,
-            '*a_ptr = 122')
-
-        self.runCmd("n")
-        self.runCmd("n")
-        self.runCmd("n")
-
-        self.expect("frame variable numbers",
-                    substrs=['1', '2', '3', '4', '5'])
-
-        self.expect("expression numbers",
-                    substrs=['1', '2', '3', '4', '5'])
-
-        frozen = frame.EvaluateExpression("&numbers")
-
-        a_data = frozen.GetPointeeData(0, 1)
-
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                0) == 1,
-            'numbers[0] == 1')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                4) == 2,
-            'numbers[1] == 2')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                8) == 3,
-            'numbers[2] == 3')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                12) == 4,
-            'numbers[3] == 4')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                16) == 5,
-            'numbers[4] == 5')
-
-        frozen = frame.EvaluateExpression("numbers")
-
-        a_data = frozen.GetData()
-
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                0) == 1,
-            'numbers[0] == 1')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                4) == 2,
-            'numbers[1] == 2')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                8) == 3,
-            'numbers[2] == 3')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                12) == 4,
-            'numbers[3] == 4')
-        self.assertTrue(
-            a_data.GetUnsignedInt32(
-                error,
-                16) == 5,
-            'numbers[4] == 5')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/formatters.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/formatters.py
deleted file mode 100644
index dae8498..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/formatters.py
+++ /dev/null
@@ -1,17 +0,0 @@
-def foo_SummaryProvider(valobj, dict):
-    a = valobj.GetChildMemberWithName('a')
-    a_ptr = valobj.GetChildMemberWithName('a_ptr')
-    bar = valobj.GetChildMemberWithName('b')
-    i = bar.GetChildMemberWithName('i')
-    i_ptr = bar.GetChildMemberWithName('i_ptr')
-    b_ref = bar.GetChildMemberWithName('b_ref')
-    b_ref_ptr = b_ref.AddressOf()
-    b_ref = b_ref_ptr.Dereference()
-    h = b_ref.GetChildMemberWithName('h')
-    k = b_ref.GetChildMemberWithName('k')
-    return 'a = ' + str(a.GetValueAsUnsigned(0)) + ', a_ptr = ' + \
-        str(a_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(a_ptr.Dereference().GetValueAsUnsigned(0)) + \
-        ', i = ' + str(i.GetValueAsUnsigned(0)) + \
-        ', i_ptr = ' + str(i_ptr.GetValueAsUnsigned(0)) + ' -> ' + str(i_ptr.Dereference().GetValueAsUnsigned(0)) + \
-        ', b_ref = ' + str(b_ref.GetValueAsUnsigned(0)) + \
-        ', h = ' + str(h.GetValueAsUnsigned(0)) + ' , k = ' + str(k.GetValueAsUnsigned(0))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/main.cpp
deleted file mode 100644
index 1b8ce48..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/formatters/main.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <iostream>
-#include <string>
-
-struct baz
-    {
-        int h;
-        int k;
-        baz(int a, int b) : h(a), k(b) {}
-    };
-
-struct bar
-	{
-		int i;
-		int* i_ptr;
-        baz b;
-        baz& b_ref;
-		bar(int x) : i(x),i_ptr(new int(x+1)),b(i+3,i+5),b_ref(b) {}
-	};
-	
-struct foo
-	{
-		int a;
-		int* a_ptr;
-		bar b;
-		
-		foo(int x) : a(x),
-		a_ptr(new int(x+1)),
-		b(2*x) {}
-		
-	};
-	
-int main(int argc, char** argv)
-{
-	foo foo1(12);
-	foo foo2(121);
-	
-	foo2.a = 7777; // Stop here
-	*(foo2.b.i_ptr) = 8888;
-    foo2.b.b.h = 9999;
-	
-	*(foo1.a_ptr) = 9999;
-	foo1.b.i = 9999;
-	
-	int numbers[5] = {1,2,3,4,5};
-	
-	return 0;
-	
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/function_template_specialization_temp_args/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/function_template_specialization_temp_args/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/function_template_specialization_temp_args/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py
deleted file mode 100644
index 19e02ca..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/basic/TestImportStdModule.py
+++ /dev/null
@@ -1,56 +0,0 @@
-"""
-Test importing the 'std' C++ module and evaluate expressions with it.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ImportStdModule(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        # Activate importing of std module.
-        self.runCmd("settings set target.import-std-module true")
-        # Calling some normal std functions that return non-template types.
-        self.expect("expr std::abs(-42)", substrs=['(int) $0 = 42'])
-        self.expect("expr std::div(2, 1).quot", substrs=['(int) $1 = 2'])
-        # Using types from std.
-        self.expect("expr (std::size_t)33U", substrs=['(size_t) $2 = 33'])
-        # Calling templated functions that return non-template types.
-        self.expect("expr char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a",
-                    substrs=["(char) $3 = 'a'"])
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test_non_cpp_language(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        # Activate importing of std module.
-        self.runCmd("settings set target.import-std-module true")
-        # These languages don't support C++ modules, so they shouldn't
-        # be able to evaluate the expression.
-        self.expect("expr -l C -- std::abs(-42)", error=True)
-        self.expect("expr -l C99 -- std::abs(-42)", error=True)
-        self.expect("expr -l C11 -- std::abs(-42)", error=True)
-        self.expect("expr -l ObjC -- std::abs(-42)", error=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/TestStdModuleWithConflicts.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/TestStdModuleWithConflicts.py
deleted file mode 100644
index 2abaece..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/conflicts/TestStdModuleWithConflicts.py
+++ /dev/null
@@ -1,36 +0,0 @@
-"""
-Test importing the 'std' C++ module and check if we can handle
-prioritizing the conflicting functions from debug info and std
-module.
-
-See also import-std-module/basic/TestImportStdModule.py for
-the same test on a 'clean' code base without conflicts.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestImportStdModuleConflicts(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-        self.expect("expr std::abs(-42)", substrs=['(int) $0 = 42'])
-        self.expect("expr std::div(2, 1).quot", substrs=['(int) $1 = 2'])
-        self.expect("expr (std::size_t)33U", substrs=['(size_t) $2 = 33'])
-        self.expect("expr char char_a = 'b'; char char_b = 'a'; std::swap(char_a, char_b); char_a",
-                    substrs=["(char) $3 = 'a'"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/TestBasicDeque.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/TestBasicDeque.py
deleted file mode 100644
index 0ede19e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-basic/TestBasicDeque.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Test basic std::list functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBasicDeque(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a.back()", substrs=['(int) $2 = 2'])
-
-        self.expect("expr std::sort(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $3 = 1'])
-        self.expect("expr (int)a.back()", substrs=['(int) $4 = 3'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $5 = 3'])
-        self.expect("expr (int)a.back()", substrs=['(int) $6 = 1'])
-
-        self.expect("expr (int)(*a.begin())", substrs=['(int) $7 = 3'])
-        self.expect("expr (int)(*a.rbegin())", substrs=['(int) $8 = 1'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py
deleted file mode 100644
index 4df280f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/deque-dbg-info-content/TestDbgInfoContentDeque.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Test std::deque functionality with a decl from dbg info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentDeque(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()->a", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a.back()->a", substrs=['(int) $2 = 2'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front()->a", substrs=['(int) $3 = 2'])
-        self.expect("expr (int)a.back()->a", substrs=['(int) $4 = 3'])
-
-        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2'])
-        self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/TestBasicForwardList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/TestBasicForwardList.py
deleted file mode 100644
index 528d555..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-basic/TestBasicForwardList.py
+++ /dev/null
@@ -1,34 +0,0 @@
-"""
-Test basic std::forward_list functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBasicForwardList(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)std::distance(a.begin(), a.end())", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
-
-        self.expect("expr a.sort()")
-        self.expect("expr (int)a.front()", substrs=['(int) $2 = 1'])
-
-        self.expect("expr (int)(*a.begin())", substrs=['(int) $3 = 1'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py
deleted file mode 100644
index 6e7be3e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/forward_list-dbg-info-content/TestDbgInfoContentForwardList.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""
-Test std::forward_list functionality with a decl from debug info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentForwardList(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)std::distance(a.begin(), a.end())", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()->a", substrs=['(int) $1 = 3'])
-
-        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $2 = 3'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/TestBasicList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/TestBasicList.py
deleted file mode 100644
index 154c8ed..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-basic/TestBasicList.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Test basic std::list functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBasicList(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a.back()", substrs=['(int) $2 = 2'])
-
-        self.expect("expr a.sort()")
-        self.expect("expr (int)a.front()", substrs=['(int) $3 = 1'])
-        self.expect("expr (int)a.back()", substrs=['(int) $4 = 3'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $5 = 3'])
-        self.expect("expr (int)a.back()", substrs=['(int) $6 = 1'])
-
-        self.expect("expr (int)(*a.begin())", substrs=['(int) $7 = 3'])
-        self.expect("expr (int)(*a.rbegin())", substrs=['(int) $8 = 1'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py
deleted file mode 100644
index 713ec1a..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/list-dbg-info-content/TestDbgInfoContentList.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
-Test basic std::list functionality but with a declaration from
-the debug info (the Foo struct) as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentList(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a.back().a", substrs=['(int) $2 = 2'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front().a", substrs=['(int) $3 = 2'])
-        self.expect("expr (int)a.back().a", substrs=['(int) $4 = 3'])
-
-        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2'])
-        self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/TestMissingStdModule.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/TestMissingStdModule.py
deleted file mode 100644
index f4d3d1f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/no-std-module/TestMissingStdModule.py
+++ /dev/null
@@ -1,40 +0,0 @@
-"""
-Test that importing the std module on a compile unit
-that doesn't use the std module will not break LLDB.
-
-It's not really specified at the moment what kind of
-error we should report back to the user in this
-situation. Currently Clang will just complain that
-the std module doesn't exist or can't be loaded.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class STLTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        # Activate importing of std module.
-        self.runCmd("settings set target.import-std-module true")
-
-        # Run some commands that should all fail without our std module.
-        self.expect("expr std::abs(-42)", error=True)
-        self.expect("expr std::div(2, 1).quot", error=True)
-        self.expect("expr (std::size_t)33U", error=True)
-        self.expect("expr char a = 'b'; char b = 'a'; std::swap(a, b); a",
-                    error=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/TestQueue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/TestQueue.py
deleted file mode 100644
index aad1b11..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/queue/TestQueue.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""
-Tests std::queue functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestQueue(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        # Test std::queue functionality with a std::deque.
-        self.expect("expr q_deque.pop()")
-        self.expect("expr q_deque.push({4})")
-        self.expect("expr (size_t)q_deque.size()", substrs=['(size_t) $0 = 1'])
-        self.expect("expr (int)q_deque.front().i", substrs=['(int) $1 = 4'])
-        self.expect("expr (int)q_deque.back().i", substrs=['(int) $2 = 4'])
-        self.expect("expr q_deque.empty()", substrs=['(bool) $3 = false'])
-        self.expect("expr q_deque.pop()")
-        self.expect("expr q_deque.emplace(5)")
-        self.expect("expr (int)q_deque.front().i", substrs=['(int) $4 = 5'])
-
-        # Test std::queue functionality with a std::list.
-        self.expect("expr q_list.pop()")
-        self.expect("expr q_list.push({4})")
-        self.expect("expr (size_t)q_list.size()", substrs=['(size_t) $5 = 1'])
-        self.expect("expr (int)q_list.front().i", substrs=['(int) $6 = 4'])
-        self.expect("expr (int)q_list.back().i", substrs=['(int) $7 = 4'])
-        self.expect("expr q_list.empty()", substrs=['(bool) $8 = false'])
-        self.expect("expr q_list.pop()")
-        self.expect("expr q_list.emplace(5)")
-        self.expect("expr (int)q_list.front().i", substrs=['(int) $9 = 5'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py
deleted file mode 100644
index 028798f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr-dbg-info-content/TestSharedPtrDbgInfoContent.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test std::shared_ptr functionality with a class from debug info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestSharedPtrDbgInfoContent(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)s->a", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(s->a = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)s->a", substrs=['(int) $2 = 5'])
-        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
-        self.expect("expr s.reset()")
-        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/TestSharedPtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/TestSharedPtr.py
deleted file mode 100644
index 6f1e7b1..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/shared_ptr/TestSharedPtr.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test basic std::shared_ptr functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestSharedPtr(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)*s", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(*s = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)*s", substrs=['(int) $2 = 5'])
-        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
-        self.expect("expr s.reset()")
-        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/TestStack.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/TestStack.py
deleted file mode 100644
index 1c2e5da..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/stack/TestStack.py
+++ /dev/null
@@ -1,49 +0,0 @@
-"""
-Tests std::stack functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestStack(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        # Test std::stack functionality with a std::deque.
-        self.expect("expr s_deque.pop()")
-        self.expect("expr s_deque.push({4})")
-        self.expect("expr (size_t)s_deque.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)s_deque.top().i", substrs=['(int) $1 = 4'])
-        self.expect("expr s_deque.emplace(5)")
-        self.expect("expr (int)s_deque.top().i", substrs=['(int) $2 = 5'])
-
-        # Test std::stack functionality with a std::vector.
-        self.expect("expr s_vector.pop()")
-        self.expect("expr s_vector.push({4})")
-        self.expect("expr (size_t)s_vector.size()", substrs=['(size_t) $3 = 3'])
-        self.expect("expr (int)s_vector.top().i", substrs=['(int) $4 = 4'])
-        self.expect("expr s_vector.emplace(5)")
-        self.expect("expr (int)s_vector.top().i", substrs=['(int) $5 = 5'])
-
-        # Test std::stack functionality with a std::list.
-        self.expect("expr s_list.pop()")
-        self.expect("expr s_list.push({4})")
-        self.expect("expr (size_t)s_list.size()", substrs=['(size_t) $6 = 3'])
-        self.expect("expr (int)s_list.top().i", substrs=['(int) $7 = 4'])
-        self.expect("expr s_list.emplace(5)")
-        self.expect("expr (int)s_list.top().i", substrs=['(int) $8 = 5'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/Makefile
deleted file mode 100644
index e04d73e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-LEVEL = ../../../make
-# We don't have any standard include directories, so we can't
-# parse the test_common.h header we usually inject as it includes
-# system headers.
-NO_TEST_COMMON_H := 1
-
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXXFLAGS += -I $(SRCDIR)/root/usr/include/c++/include/ -I $(SRCDIR)/root/usr/include/ -nostdinc -nostdinc++ -nostdlib++
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/TestStdModuleSysroot.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/TestStdModuleSysroot.py
deleted file mode 100644
index dfd90e8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/TestStdModuleSysroot.py
+++ /dev/null
@@ -1,34 +0,0 @@
-"""
-Test that we respect the sysroot when building the std module.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-import os
-
-class ImportStdModule(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        sysroot = os.path.join(os.getcwd(), "root")
-
-        # Set the sysroot.
-        self.runCmd("platform select --sysroot '" + sysroot + "' host", CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        # Call our custom function in our sysroot std module.
-        # If this gives us the correct result, then we used the sysroot.
-        self.expect("expr std::myabs(-42)", substrs=['(int) $0 = 42'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/main.cpp
deleted file mode 100644
index 2fbc76b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/main.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <algorithm>
-
-int main(int argc, char **argv) {
-  libc_struct s;
-  return 0; // Set break point at this line.
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/algorithm b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/algorithm
deleted file mode 100644
index e8cbcca..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/sysroot/root/usr/include/c++/include/algorithm
+++ /dev/null
@@ -1,7 +0,0 @@
-#include "libc_header.h"
-
-namespace std {
-  int myabs(int i) {
-    return i < 0 ? -i : i;
-  }
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
deleted file mode 100644
index c321d80..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr-dbg-info-content/TestUniquePtrDbgInfoContent.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test std::unique_ptr functionality with a decl from debug info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestUniquePtrDbgInfoContent(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)s->a", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(s->a = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)s->a", substrs=['(int) $2 = 5'])
-        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
-        self.expect("expr s.reset()")
-        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/TestUniquePtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/TestUniquePtr.py
deleted file mode 100644
index 295ec51..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/unique_ptr/TestUniquePtr.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test basic std::unique_ptr functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestUniquePtr(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)*s", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(*s = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)*s", substrs=['(int) $2 = 5'])
-        self.expect("expr (bool)s", substrs=['(bool) $3 = true'])
-        self.expect("expr s.reset()")
-        self.expect("expr (bool)s", substrs=['(bool) $4 = false'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/TestBasicVector.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/TestBasicVector.py
deleted file mode 100644
index deaf8f0..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-basic/TestBasicVector.py
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Test basic std::vector functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBasicVector(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front()", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a[1]", substrs=['(int) $2 = 1'])
-        self.expect("expr (int)a.back()", substrs=['(int) $3 = 2'])
-
-        self.expect("expr std::sort(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $4 = 1'])
-        self.expect("expr (int)a[1]", substrs=['(int) $5 = 2'])
-        self.expect("expr (int)a.back()", substrs=['(int) $6 = 3'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front()", substrs=['(int) $7 = 3'])
-        self.expect("expr (int)a[1]", substrs=['(int) $8 = 2'])
-        self.expect("expr (int)a.back()", substrs=['(int) $9 = 1'])
-
-        self.expect("expr (int)(*a.begin())", substrs=['(int) $10 = 3'])
-        self.expect("expr (int)(*a.rbegin())", substrs=['(int) $11 = 1'])
-
-        self.expect("expr a.pop_back()")
-        self.expect("expr (int)a.back()", substrs=['(int) $12 = 2'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $13 = 2'])
-
-        self.expect("expr (int)a.at(0)", substrs=['(int) $14 = 3'])
-
-        self.expect("expr a.push_back(4)")
-        self.expect("expr (int)a.back()", substrs=['(int) $15 = 4'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $16 = 3'])
-
-        self.expect("expr a.emplace_back(5)")
-        self.expect("expr (int)a.back()", substrs=['(int) $17 = 5'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $18 = 4'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/TestBoolVector.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/TestBoolVector.py
deleted file mode 100644
index 0ab5269..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-bool/TestBoolVector.py
+++ /dev/null
@@ -1,34 +0,0 @@
-"""
-Test basic std::vector<bool> functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestBoolVector(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 4'])
-        self.expect("expr (bool)a.front()", substrs=['(bool) $1 = false'])
-        self.expect("expr (bool)a[1]", substrs=['(bool) $2 = true'])
-        self.expect("expr (bool)a.back()", substrs=['(bool) $3 = true'])
-
-        self.expect("expr (bool)(*a.begin())", substrs=['(bool) $4 = false'])
-        self.expect("expr (bool)(*a.rbegin())", substrs=['(bool) $5 = true'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py
deleted file mode 100644
index c89265f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-dbg-info-content/TestDbgInfoContentVector.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""
-Test basic std::vector functionality but with a declaration from
-the debug info (the Foo struct) as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentVector(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 3'])
-        self.expect("expr (int)a.front().a", substrs=['(int) $1 = 3'])
-        self.expect("expr (int)a[1].a", substrs=['(int) $2 = 1'])
-        self.expect("expr (int)a.back().a", substrs=['(int) $3 = 2'])
-
-        self.expect("expr std::reverse(a.begin(), a.end())")
-        self.expect("expr (int)a.front().a", substrs=['(int) $4 = 2'])
-
-        self.expect("expr (int)(a.begin()->a)", substrs=['(int) $5 = 2'])
-        self.expect("expr (int)(a.rbegin()->a)", substrs=['(int) $6 = 3'])
-
-        self.expect("expr a.pop_back()")
-        self.expect("expr (int)a.back().a", substrs=['(int) $7 = 1'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $8 = 2'])
-
-        self.expect("expr (int)a.at(0).a", substrs=['(int) $9 = 2'])
-
-        self.expect("expr a.push_back({4})")
-        self.expect("expr (int)a.back().a", substrs=['(int) $10 = 4'])
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $11 = 3'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/TestVectorOfVectors.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/TestVectorOfVectors.py
deleted file mode 100644
index 2b82e1a..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/vector-of-vectors/TestVectorOfVectors.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test std::vector functionality when it's contents are vectors.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestVectorOfVectors(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (size_t)a.size()", substrs=['(size_t) $0 = 2'])
-        self.expect("expr (int)a.front().front()", substrs=['(int) $1 = 1'])
-        self.expect("expr (int)a[1][1]", substrs=['(int) $2 = 2'])
-        self.expect("expr (int)a.back().at(0)", substrs=['(int) $3 = 3'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py
deleted file mode 100644
index 0acd54e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr-dbg-info-content/TestDbgInfoContentWeakPtr.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test std::weak_ptr functionality with a decl from debug info as content.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestDbgInfoContentWeakPtr(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)w.lock()->a", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(w.lock()->a = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)w.lock()->a", substrs=['(int) $2 = 5'])
-        self.expect("expr w.use_count()", substrs=['(long) $3 = 1'])
-        self.expect("expr w.reset()")
-        self.expect("expr w.use_count()", substrs=['(long) $4 = 0'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/Makefile
deleted file mode 100644
index 01718d8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-USE_LIBCPP := 1
-CXXFLAGS += $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/TestWeakPtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/TestWeakPtr.py
deleted file mode 100644
index 6b8b9ce..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import-std-module/weak_ptr/TestWeakPtr.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test basic std::weak_ptr functionality.
-"""
-
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class TestSharedPtr(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # FIXME: This should work on more setups, so remove these
-    # skipIf's in the future.
-    @add_test_categories(["libc++"])
-    @skipIf(compiler=no_match("clang"))
-    @skipIf(oslist=no_match(["linux"]))
-    @skipIf(debug_info=no_match(["dwarf"]))
-    def test(self):
-        self.build()
-
-        lldbutil.run_to_source_breakpoint(self,
-            "// Set break point at this line.", lldb.SBFileSpec("main.cpp"))
-
-        self.runCmd("settings set target.import-std-module true")
-
-        self.expect("expr (int)*w.lock()", substrs=['(int) $0 = 3'])
-        self.expect("expr (int)(*w.lock() = 5)", substrs=['(int) $1 = 5'])
-        self.expect("expr (int)*w.lock()", substrs=['(int) $2 = 5'])
-        self.expect("expr w.use_count()", substrs=['(long) $3 = 1'])
-        self.expect("expr w.reset()")
-        self.expect("expr w.use_count()", substrs=['(long) $4 = 0'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import_builtin_fileid/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import_builtin_fileid/Makefile
deleted file mode 100644
index 4464e2e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/import_builtin_fileid/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-LDFLAGS += -framework Cocoa
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/inline-namespace/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/inline-namespace/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/inline-namespace/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/Makefile
deleted file mode 100644
index bf2c0b2..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make

-

-CXX_SOURCES := main.cpp

-

-include $(LEVEL)/Makefile.rules

diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py
deleted file mode 100644
index a5607f1..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter-phi-nodes/TestIRInterpreterPHINodes.py
+++ /dev/null
@@ -1,43 +0,0 @@
-"""
-Test PHI nodes work in the IR interpreter.
-"""
-
-import os
-import os.path
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class IRInterpreterPHINodesTestCase(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_phi_node_support(self):
-        """Test support for PHI nodes in the IR interpreter."""
-
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd('file ' + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break on the first assignment to i
-        line = line_number('main.cpp', 'i = 5')
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'main.cpp', line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd('run', RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint
-        self.expect('thread list', STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        self.runCmd('s')
-
-        # The logical 'or' causes a PHI node to be generated. Execute without JIT
-        # to test that the interpreter can handle this
-        self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['true'])
-
-        self.runCmd('s')
-        self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['false'])
-        self.runCmd('s')
-        self.expect('expr -j 0 -- i == 3 || i == 5', substrs=['true'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/Makefile
deleted file mode 100644
index c4169a9..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../make
-
-default: a.out
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py
deleted file mode 100644
index e440f26..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py
+++ /dev/null
@@ -1,96 +0,0 @@
-"""
-Test the IR interpreter
-"""
-
-from __future__ import print_function
-
-import unittest2
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class IRInterpreterTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number('main.c',
-                                '// Set breakpoint here')
-
-        # Disable confirmation prompt to avoid infinite wait
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
-    def build_and_run(self):
-        """Test the IR interpreter"""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-    @add_test_categories(['pyapi'])
-    # getpid() is POSIX, among other problems, see bug
-    @expectedFailureAll(
-        oslist=['windows'],
-        bugnumber="http://llvm.org/pr21765")
-    @expectedFailureNetBSD
-    @expectedFailureAll(
-        oslist=['linux'],
-        archs=['arm'],
-        bugnumber="llvm.org/pr27868")
-    def test_ir_interpreter(self):
-        self.build_and_run()
-
-        options = lldb.SBExpressionOptions()
-        options.SetLanguage(lldb.eLanguageTypeC_plus_plus)
-
-        set_up_expressions = ["int $i = 9", "int $j = 3", "int $k = 5"]
-
-        expressions = ["$i + $j",
-                       "$i - $j",
-                       "$i * $j",
-                       "$i / $j",
-                       "$i % $k",
-                       "$i << $j",
-                       "$i & $j",
-                       "$i | $j",
-                       "$i ^ $j"]
-
-        for expression in set_up_expressions:
-            self.frame().EvaluateExpression(expression, options)
-
-        for expression in expressions:
-            interp_expression = expression
-            jit_expression = "(int)getpid(); " + expression
-
-            interp_result = self.frame().EvaluateExpression(
-                interp_expression, options).GetValueAsSigned()
-            jit_result = self.frame().EvaluateExpression(
-                jit_expression, options).GetValueAsSigned()
-
-            self.assertEqual(
-                interp_result,
-                jit_result,
-                "While evaluating " +
-                expression)
-
-    def test_type_conversions(self):
-        target = self.dbg.GetDummyTarget()
-        short_val = target.EvaluateExpression("(short)-1")
-        self.assertEqual(short_val.GetValueAsSigned(), -1)
-        long_val = target.EvaluateExpression("(long) "+ short_val.GetName())
-        self.assertEqual(long_val.GetValueAsSigned(), -1)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/Test11588.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/Test11588.py
deleted file mode 100644
index 2efe2df..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/issue_11588/Test11588.py
+++ /dev/null
@@ -1,69 +0,0 @@
-"""
-Test the solution to issue 11581.
-valobj.AddressOf() returns None when an address is
-expected in a SyntheticChildrenProvider
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Issue11581TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_11581_commands(self):
-        # This is the function to remove the custom commands in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type synthetic clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        """valobj.AddressOf() should return correct values."""
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                              'Set breakpoint here.',
-                                              lldb.SBFileSpec("main.cpp", False))
-        self.runCmd("command script import --allow-reload s11588.py")
-        self.runCmd(
-            "type synthetic add --python-class s11588.Issue11581SyntheticProvider StgClosure")
-
-        self.expect("expr --show-types -- *((StgClosure*)(r14-1))",
-                    substrs=["(StgClosure) $",
-                             "(StgClosure *) &$", "0x",
-                             "addr = ",
-                             "load_address = "])
-
-        # register r14 is an x86_64 extension let's skip this part of the test
-        # if we are on a different architecture
-        if self.getArchitecture() == 'x86_64':
-            target = self.dbg.GetSelectedTarget()
-            process = target.GetProcess()
-            frame = process.GetSelectedThread().GetSelectedFrame()
-            pointer = frame.FindVariable("r14")
-            addr = pointer.GetValueAsUnsigned(0)
-            self.assertTrue(addr != 0, "could not read pointer to StgClosure")
-            addr = addr - 1
-            self.runCmd("register write r14 %d" % addr)
-            self.expect(
-                "register read r14", substrs=[
-                    "0x", hex(addr)[
-                        2:].rstrip("L")])  # Remove trailing 'L' if it exists
-            self.expect("expr --show-types -- *(StgClosure*)$r14",
-                        substrs=["(StgClosure) $",
-                                 "(StgClosure *) &$", "0x",
-                                 "addr = ",
-                                 "load_address = ",
-                                 hex(addr)[2:].rstrip("L"),
-                                 str(addr)])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/Makefile
deleted file mode 100644
index 1ecd744..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-DEBUG_INFO_FLAG = -g3
-
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py
deleted file mode 100644
index 817f6cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/macros/TestMacros.py
+++ /dev/null
@@ -1,131 +0,0 @@
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestMacros(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        compiler="clang",
-        bugnumber="clang does not emit .debug_macro[.dwo] sections.")
-    @expectedFailureAll(
-        debug_info="dwo",
-        bugnumber="GCC produces multiple .debug_macro.dwo sections and the spec is unclear as to what it means")
-    @expectedFailureAll(
-        hostoslist=["windows"],
-        compiler="gcc",
-        triple='.*-android')
-    def test_expr_with_macros(self):
-        self.build()
-
-        # Get main source file
-        src_file = "main.cpp"
-        hdr_file = "macro1.h"
-        src_file_spec = lldb.SBFileSpec(src_file)
-        self.assertTrue(src_file_spec.IsValid(), "Main source file")
-
-        (target, process, thread, bp1) = lldbutil.run_to_source_breakpoint(
-            self, "Break here", src_file_spec)
-
-        # Get frame for current thread
-        frame = thread.GetSelectedFrame()
-
-        result = frame.EvaluateExpression("MACRO_1")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "100",
-            "MACRO_1 = 100")
-
-        result = frame.EvaluateExpression("MACRO_2")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "200",
-            "MACRO_2 = 200")
-
-        result = frame.EvaluateExpression("ONE")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "1",
-            "ONE = 1")
-
-        result = frame.EvaluateExpression("TWO")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "2",
-            "TWO = 2")
-
-        result = frame.EvaluateExpression("THREE")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "3",
-            "THREE = 3")
-
-        result = frame.EvaluateExpression("FOUR")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "4",
-            "FOUR = 4")
-
-        result = frame.EvaluateExpression("HUNDRED")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "100",
-            "HUNDRED = 100")
-
-        result = frame.EvaluateExpression("THOUSAND")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "1000",
-            "THOUSAND = 1000")
-
-        result = frame.EvaluateExpression("MILLION")
-        self.assertTrue(result.IsValid() and result.GetValue()
-                        == "1000000", "MILLION = 1000000")
-
-        result = frame.EvaluateExpression("MAX(ONE, TWO)")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "2",
-            "MAX(ONE, TWO) = 2")
-
-        result = frame.EvaluateExpression("MAX(THREE, TWO)")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "3",
-            "MAX(THREE, TWO) = 3")
-
-        # Get the thread of the process
-        thread.StepOver()
-
-        # Get frame for current thread
-        frame = thread.GetSelectedFrame()
-
-        result = frame.EvaluateExpression("MACRO_2")
-        self.assertTrue(
-            result.GetError().Fail(),
-            "Printing MACRO_2 fails in the mail file")
-
-        result = frame.EvaluateExpression("FOUR")
-        self.assertTrue(
-            result.GetError().Fail(),
-            "Printing FOUR fails in the main file")
-
-        thread.StepInto()
-
-        # Get frame for current thread
-        frame = thread.GetSelectedFrame()
-
-        result = frame.EvaluateExpression("ONE")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "1",
-            "ONE = 1")
-
-        result = frame.EvaluateExpression("MAX(ONE, TWO)")
-        self.assertTrue(
-            result.IsValid() and result.GetValue() == "2",
-            "MAX(ONE, TWO) = 2")
-
-        # This time, MACRO_1 and MACRO_2 are not visible.
-        result = frame.EvaluateExpression("MACRO_1")
-        self.assertTrue(result.GetError().Fail(),
-                        "Printing MACRO_1 fails in the header file")
-
-        result = frame.EvaluateExpression("MACRO_2")
-        self.assertTrue(result.GetError().Fail(),
-                        "Printing MACRO_2 fails in the header file")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/multiline-completion/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/multiline-completion/Makefile
deleted file mode 100644
index f5a47fc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/multiline-completion/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../make
-C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/multiline-completion/TestMultilineCompletion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/multiline-completion/TestMultilineCompletion.py
deleted file mode 100644
index 2d75fc4..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/multiline-completion/TestMultilineCompletion.py
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Test completion for multiline expressions.
-"""
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-class MultilineCompletionTest(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.source = 'main.c'
-
-    def expect_string(self, string):
-        import pexpect
-        """This expects for "string", with timeout & EOF being test fails."""
-        try:
-            self.child.expect_exact(string)
-        except pexpect.EOF:
-            self.fail("Got EOF waiting for '%s'" % (string))
-        except pexpect.TIMEOUT:
-            self.fail("Timed out waiting for '%s'" % (string))
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_basic_completion(self):
-        """Test that we can complete a simple multiline expression"""
-        self.build()
-        self.setTearDownCleanup()
-
-        import pexpect
-        exe = self.getBuildArtifact("a.out")
-        prompt = "(lldb) "
-
-        run_commands = ' -o "b main" -o "r"'
-        self.child = pexpect.spawn(
-            '%s %s %s %s' %
-            (lldbtest_config.lldbExec, self.lldbOption, run_commands, exe))
-        child = self.child
-
-        self.expect_string(prompt)
-        self.child.sendline("expr")
-        self.expect_string("terminate with an empty line to evaluate")
-        self.child.send("to_\t")
-        self.expect_string("to_complete")
-
-        self.deletePexpectChild()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_cpp_and_c/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_obj_c/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_obj_c/Makefile
deleted file mode 100644
index 6755321..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/namespace_local_var_same_name_obj_c/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-OBJCXX_SOURCES := main.mm util.mm
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/Makefile
deleted file mode 100644
index 81ae6f6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp foo.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
deleted file mode 100644
index 13bc3b7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/options/TestExprOptions.py
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test expression command options.
-
-Test cases:
-
-o test_expr_options:
-  Test expression command options.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class ExprOptionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        self.line = line_number('main.cpp', '// breakpoint_in_main')
-        self.exe = self.getBuildArtifact("a.out")
-
-    def test_expr_options(self):
-        """These expression command options should work as expected."""
-        self.build()
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, '// breakpoint_in_main', self.main_source_spec)
-
-        frame = thread.GetFrameAtIndex(0)
-        options = lldb.SBExpressionOptions()
-
-        # test --language on C++ expression using the SB API's
-
-        # Make sure we can evaluate a C++11 expression.
-        val = frame.EvaluateExpression('foo != nullptr')
-        self.assertTrue(val.IsValid())
-        self.assertTrue(val.GetError().Success())
-        self.DebugSBValue(val)
-
-        # Make sure it still works if language is set to C++11:
-        options.SetLanguage(lldb.eLanguageTypeC_plus_plus_11)
-        val = frame.EvaluateExpression('foo != nullptr', options)
-        self.assertTrue(val.IsValid())
-        self.assertTrue(val.GetError().Success())
-        self.DebugSBValue(val)
-
-        # Make sure it fails if language is set to C:
-        options.SetLanguage(lldb.eLanguageTypeC)
-        val = frame.EvaluateExpression('foo != nullptr', options)
-        self.assertTrue(val.IsValid())
-        self.assertFalse(val.GetError().Success())
-
-    @skipIfDarwin
-    def test_expr_options_lang(self):
-        """These expression language options should work as expected."""
-        self.build()
-
-        # Set debugger into synchronous mode
-        self.dbg.SetAsync(False)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, '// breakpoint_in_main', self.main_source_spec)
-
-        frame = thread.GetFrameAtIndex(0)
-        options = lldb.SBExpressionOptions()
-
-        # Make sure we can retrieve `id` variable if language is set to C++11:
-        options.SetLanguage(lldb.eLanguageTypeC_plus_plus_11)
-        val = frame.EvaluateExpression('id == 0', options)
-        self.assertTrue(val.IsValid())
-        self.assertTrue(val.GetError().Success())
-        self.DebugSBValue(val)
-
-        # Make sure we can't retrieve `id` variable if language is set to ObjC:
-        options.SetLanguage(lldb.eLanguageTypeObjC)
-        val = frame.EvaluateExpression('id == 0', options)
-        self.assertTrue(val.IsValid())
-        self.assertFalse(val.GetError().Success())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/Makefile
deleted file mode 100644
index 8066198..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-LDFLAGS += -framework Foundation -framework CloudKit
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
deleted file mode 100644
index b6471d0..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persist_objc_pointeetype/TestPersistObjCPointeeType.py
+++ /dev/null
@@ -1,51 +0,0 @@
-"""
-Test that we can p *objcObject
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PersistObjCPointeeType(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.line = line_number('main.m', '// break here')
-
-    @skipUnlessDarwin
-    @skipIf(archs=["i386", "i686"])
-    @skipIf(debug_info="gmodules", archs=['arm64', 'armv7', 'armv7k'])  # compile error with gmodules for iOS
-    def test_with(self):
-        """Test that we can p *objcObject"""
-        self.build()
-
-        def cleanup():
-            pass
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("p *self", substrs=['_sc_name = nil',
-                                        '_sc_name2 = nil',
-                                        '_sc_name3 = nil',
-                                        '_sc_name4 = nil',
-                                        '_sc_name5 = nil',
-                                        '_sc_name6 = nil',
-                                        '_sc_name7 = nil',
-                                        '_sc_name8 = nil'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/Makefile
deleted file mode 100644
index db5f575..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
-
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py
deleted file mode 100644
index 7b963b5..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_ptr_update/TestPersistentPtrUpdate.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Test that we can have persistent pointer variables
-"""
-
-from __future__ import print_function
-
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class PersistentPtrUpdateTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    def test(self):
-        """Test that we can have persistent pointer variables"""
-        self.build()
-
-        def cleanup():
-            pass
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd('break set -p here')
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("expr void* $foo = 0")
-
-        self.runCmd("continue")
-
-        self.expect("expr $foo", substrs=['$foo', '0x0'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/Makefile
deleted file mode 100644
index 0d70f25..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py
deleted file mode 100644
index 8630d6f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestNestedPersistentTypes.py
+++ /dev/null
@@ -1,44 +0,0 @@
-"""
-Test that nested persistent types work.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class NestedPersistentTypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_persistent_types(self):
-        """Test that nested persistent types work."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("breakpoint set --name main")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("expression struct $foo { int a; int b; };")
-
-        self.runCmd(
-            "expression struct $bar { struct $foo start; struct $foo end; };")
-
-        self.runCmd("expression struct $bar $my_bar = {{ 2, 3 }, { 4, 5 }};")
-
-        self.expect("expression $my_bar",
-                    substrs=['a = 2', 'b = 3', 'a = 4', 'b = 5'])
-
-        self.expect("expression $my_bar.start.b",
-                    substrs=['(int)', '3'])
-
-        self.expect("expression $my_bar.end.b",
-                    substrs=['(int)', '5'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py
deleted file mode 100644
index 63d8c22..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_types/TestPersistentTypes.py
+++ /dev/null
@@ -1,95 +0,0 @@
-"""
-Test that lldb persistent types works correctly.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PersistenttypesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_persistent_types(self):
-        """Test that lldb persistent types works correctly."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("breakpoint set --name main")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("expression struct $foo { int a; int b; };")
-
-        self.expect(
-            "expression struct $foo $my_foo; $my_foo.a = 2; $my_foo.b = 3;",
-            startstr="(int) $0 = 3")
-
-        self.expect("expression $my_foo",
-                    substrs=['a = 2', 'b = 3'])
-
-        self.runCmd("expression typedef int $bar")
-
-        self.expect("expression $bar i = 5; i",
-                    startstr="($bar) $1 = 5")
-
-        self.runCmd(
-            "expression struct $foobar { char a; char b; char c; char d; };")
-        self.runCmd("next")
-
-        self.expect(
-            "memory read foo -t $foobar",
-            substrs=[
-                '($foobar) 0x',
-                ' = ',
-                "a = 'H'",
-                "b = 'e'",
-                "c = 'l'",
-                "d = 'l'"])  # persistent types are OK to use for memory read
-
-        self.expect(
-            "memory read foo -t $foobar -x c",
-            substrs=[
-                '($foobar) 0x',
-                ' = ',
-                "a = 'H'",
-                "b = 'e'",
-                "c = 'l'",
-                "d = 'l'"])  # persistent types are OK to use for memory read
-
-        self.expect(
-            "memory read foo -t foobar",
-            substrs=[
-                '($foobar) 0x',
-                ' = ',
-                "a = 'H'",
-                "b = 'e'",
-                "c = 'l'",
-                "d = 'l'"],
-            matching=False,
-            error=True)  # the type name is $foobar, make sure we settle for nothing less
-
-        self.expect("expression struct { int a; int b; } x = { 2, 3 }; x",
-                    substrs=['a = 2', 'b = 3'])
-
-        self.expect(
-            "expression struct { int x; int y; int z; } object; object.y = 1; object.z = 3; object.x = 2; object",
-            substrs=[
-                'x = 2',
-                'y = 1',
-                'z = 3'])
-
-        self.expect(
-            "expression struct A { int x; int y; }; struct { struct A a; int z; } object; object.a.y = 1; object.z = 3; object.a.x = 2; object",
-            substrs=[
-                'x = 2',
-                'y = 1',
-                'z = 3'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/Makefile
deleted file mode 100644
index 0d70f25..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py
deleted file mode 100644
index 441a60b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/persistent_variables/TestPersistentVariables.py
+++ /dev/null
@@ -1,55 +0,0 @@
-"""
-Test that lldb persistent variables works correctly.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.lldbtest import *
-
-
-class PersistentVariablesTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_persistent_variables(self):
-        """Test that lldb persistent variables works correctly."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("breakpoint set --source-pattern-regexp break")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("expression int $i = i")
-
-        self.expect("expression $i == i",
-                    startstr="(bool) $0 = true")
-
-        self.expect("expression $i + 1",
-                    startstr="(int) $1 = 6")
-
-        self.expect("expression $i + 3",
-                    startstr="(int) $2 = 8")
-
-        self.expect("expression $2 + $1",
-                    startstr="(int) $3 = 14")
-
-        self.expect("expression $3",
-                    startstr="(int) $3 = 14")
-
-        self.expect("expression $2",
-                    startstr="(int) $2 = 8")
-
-        self.expect("expression (int)-2",
-                    startstr="(int) $4 = -2")
-
-        self.expect("expression $4 > (int)31",
-                    startstr="(bool) $5 = false")
-
-        self.expect("expression (long)$4",
-                    startstr="(long) $6 = -2")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/Makefile
deleted file mode 100644
index b659274..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-OBJC_SOURCES := main.m
-
-include $(LEVEL)/Makefile.rules
-LDFLAGS += -framework Foundation
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py
deleted file mode 100644
index 4530342..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/po_verbosity/TestPoVerbosity.py
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
-Test that the po command acts correctly.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PoVerbosityTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.cpp.
-        self.line = line_number('main.m',
-                                '// Stop here')
-
-    @skipUnlessDarwin
-    def test(self):
-        """Test that the po command acts correctly."""
-        self.build()
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type summary clear', check=False)
-            self.runCmd('type synthetic clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        """Test expr + formatters for good interoperability."""
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("expr -O -v -- foo",
-                    substrs=['(id) $', ' = 0x', '1 = 2', '2 = 3;'])
-        self.expect("expr -O -vfull -- foo",
-                    substrs=['(id) $', ' = 0x', '1 = 2', '2 = 3;'])
-        self.expect("expr -O -- foo", matching=False,
-                    substrs=['(id) $'])
-
-        self.expect("expr -O -- 22", matching=False,
-                    substrs=['(int) $'])
-        self.expect("expr -O -- 22",
-                    substrs=['22'])
-
-        self.expect("expr -O -vfull -- 22",
-                    substrs=['(int) $', ' = 22'])
-
-        self.expect("expr -O -v -- 22",
-                    substrs=['(int) $', ' = 22'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/pr35310/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/pr35310/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/pr35310/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/pr35310/TestExprsBug35310.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/pr35310/TestExprsBug35310.py
deleted file mode 100644
index 6d019c7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/pr35310/TestExprsBug35310.py
+++ /dev/null
@@ -1,39 +0,0 @@
-from __future__ import print_function
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class ExprBug35310(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def test_issue35310(self):
-        """Test invoking functions with non-standard linkage names.
-
-        The GNU abi_tag extension used by libstdc++ is a common source
-        of these, but they could originate from other reasons as well.
-        """
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        value = frame.EvaluateExpression("a.test_abi_tag()")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 1)
-
-        value = frame.EvaluateExpression("a.test_asm_name()")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(0), 2)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Makefile
deleted file mode 100644
index 0d70f25..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py
deleted file mode 100644
index 0027fc2..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_8638051/Test8638051.py
+++ /dev/null
@@ -1,40 +0,0 @@
-"""
-Test the robustness of lldb expression parser.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.lldbtest import *
-
-
-class Radar8638051TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test_expr_commands(self):
-        """The following expression commands should not crash."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("breakpoint set -n c")
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("expression val",
-                    startstr="(int) $0 = 1")
-        # (int) $0 = 1
-
-        self.expect("expression *(&val)",
-                    startstr="(int) $1 = 1")
-        # (int) $1 = 1
-
-        # rdar://problem/8638051
-        # lldb expression command: Could this crash be avoided
-        self.expect("expression &val",
-                    startstr="(int *) $2 = ")
-        # (int *) $2 = 0x....
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/Makefile
deleted file mode 100644
index 0d70f25..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py
deleted file mode 100644
index e6b5285..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9531204/TestPrintfAfterUp.py
+++ /dev/null
@@ -1,45 +0,0 @@
-"""
-The evaluating printf(...) after break stop and then up a stack frame.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Radar9531204TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # rdar://problem/9531204
-    @expectedFailureNetBSD
-    def test_expr_commands(self):
-        """The evaluating printf(...) after break stop and then up a stack frame."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_symbol(
-            self, 'foo', sym_exact=True, num_expected_locations=1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("frame variable")
-
-        # This works fine.
-        self.runCmd('expression (int)printf("value is: %d.\\n", value);')
-
-        # rdar://problem/9531204
-        # "Error dematerializing struct" error when evaluating expressions "up" on the stack
-        self.runCmd('up')  # frame select -r 1
-
-        self.runCmd("frame variable")
-
-        # This does not currently.
-        self.runCmd('expression (int)printf("argc is: %d.\\n", argc)')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/Makefile
deleted file mode 100644
index 0d70f25..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py
deleted file mode 100644
index d18720c..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/radar_9673664/TestExprHelpExamples.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""
-Test example snippets from the lldb 'help expression' output.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Radar9673644TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.main_source = "main.c"
-        self.line = line_number(self.main_source, '// Set breakpoint here.')
-
-    def test_expr_commands(self):
-        """The following expression commands should just work."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            self.main_source,
-            self.line,
-            num_expected_locations=1,
-            loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # rdar://problem/9673664 lldb expression evaluation problem
-
-        self.expect('expr char str[] = "foo"; str[0]',
-                    substrs=["'f'"])
-        # runCmd: expr char c[] = "foo"; c[0]
-        # output: (char) $0 = 'f'
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar42038760/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar42038760/Makefile
deleted file mode 100644
index f5a47fc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar42038760/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../make
-C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile
deleted file mode 100644
index f5a47fc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/rdar44436068/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../make
-C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/save_jit_objects/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/save_jit_objects/Makefile
deleted file mode 100644
index 0d70f25..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/save_jit_objects/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/save_jit_objects/TestSaveJITObjects.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/save_jit_objects/TestSaveJITObjects.py
deleted file mode 100644
index 460536b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/save_jit_objects/TestSaveJITObjects.py
+++ /dev/null
@@ -1,54 +0,0 @@
-"""
-Test that LLDB can emit JIT objects when the appropriate setting is enabled
-"""
-
-from __future__ import print_function
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-class SaveJITObjectsTestCase(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def enumerateJITFiles(self):
-        return [f for f in os.listdir(self.getBuildDir()) if f.startswith("jit")]
-
-    def countJITFiles(self):
-        return len(self.enumerateJITFiles())
-
-    def cleanJITFiles(self):
-        for j in self.enumerateJITFiles():
-            os.remove(j)
-        return
-
-    @expectedFailureAll(oslist=["windows"])
-    @expectedFailureNetBSD
-    def test_save_jit_objects(self):
-        self.build()
-        os.chdir(self.getBuildDir())
-        src_file = "main.c"
-        src_file_spec = lldb.SBFileSpec(src_file)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, "break", src_file_spec)
-
-        frame = thread.frames[0]
-
-        self.cleanJITFiles()
-        frame.EvaluateExpression("(void*)malloc(0x1)")
-        self.assertTrue(self.countJITFiles() == 0,
-                        "No files emitted with save-jit-objects=false")
-
-        self.runCmd("settings set target.save-jit-objects true")
-        frame.EvaluateExpression("(void*)malloc(0x1)")
-        jit_files_count = self.countJITFiles()
-        self.cleanJITFiles()
-        self.assertTrue(jit_files_count != 0,
-                        "At least one file emitted with save-jit-objects=true")
-
-        process.Kill()
-        os.chdir(self.getSourceDir())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/scoped_enums/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/scoped_enums/Makefile
deleted file mode 100644
index 83b24da..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/scoped_enums/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/scoped_enums/TestScopedEnumType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/scoped_enums/TestScopedEnumType.py
deleted file mode 100644
index e7bc79d..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/scoped_enums/TestScopedEnumType.py
+++ /dev/null
@@ -1,45 +0,0 @@
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ScopedEnumType(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(dwarf_version=['<', '4'])
-    def test(self):
-        self.build()
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Set break point at this line.', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        self.expect("expr f == Foo::FooBar",
-                substrs=['(bool) $0 = true'])
-
-        value = frame.EvaluateExpression("f == Foo::FooBar")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsUnsigned(), 1)
-
-        value = frame.EvaluateExpression("b == BarBar")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsUnsigned(), 1)
-
-        ## b is not a Foo
-        value = frame.EvaluateExpression("b == Foo::FooBar")
-        self.assertTrue(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        ## integral is not implicitly convertible to a scoped enum
-        value = frame.EvaluateExpression("1 == Foo::FooBar")
-        self.assertTrue(value.IsValid())
-        self.assertFalse(value.GetError().Success())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py
deleted file mode 100644
index 6f0e0ef..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs.py
+++ /dev/null
@@ -1,255 +0,0 @@
-"""
-Test many basic expression commands and SBFrame.EvaluateExpression() API.
-
-Test cases:
-
-o test_many_expr_commands:
-  Test many basic expression commands.
-o test_evaluate_expression_python:
-  Use Python APIs (SBFrame.EvaluateExpression()) to evaluate expressions.
-o test_expr_commands_can_handle_quotes:
-  Throw some expression commands with quotes at lldb.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class BasicExprCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test many expressions while stopped at this line:')
-
-        # Disable confirmation prompt to avoid infinite wait
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
-    def build_and_run(self):
-        """These basic expression commands should work as expected."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-    @unittest2.expectedFailure(
-        "llvm.org/pr17135 <rdar://problem/14874559> APFloat::toString does not identify the correct (i.e. least) precision.")
-    def test_floating_point_expr_commands(self):
-        self.build_and_run()
-
-        self.expect("expression 2.234f",
-                    patterns=["\(float\) \$.* = 2\.234"])
-        # (float) $2 = 2.234
-
-    def test_many_expr_commands(self):
-        self.build_and_run()
-
-        self.expect("expression 2",
-                    patterns=["\(int\) \$.* = 2"])
-        # (int) $0 = 1
-
-        self.expect("expression 2ull",
-                    patterns=["\(unsigned long long\) \$.* = 2"])
-        # (unsigned long long) $1 = 2
-
-        self.expect("expression 0.5f",
-                    patterns=["\(float\) \$.* = 0\.5"])
-        # (float) $2 = 0.5
-
-        self.expect("expression 2.234",
-                    patterns=["\(double\) \$.* = 2\.234"])
-        # (double) $3 = 2.234
-
-        self.expect("expression 2+3",
-                    patterns=["\(int\) \$.* = 5"])
-        # (int) $4 = 5
-
-        self.expect("expression argc",
-                    patterns=["\(int\) \$.* = 1"])
-        # (int) $5 = 1
-
-        self.expect("expression argc + 22",
-                    patterns=["\(int\) \$.* = 23"])
-        # (int) $6 = 23
-
-        self.expect("expression argv",
-                    patterns=["\(const char \*\*\) \$.* = 0x"])
-        # (const char *) $7 = ...
-
-        self.expect("expression argv[0]",
-                    substrs=["(const char *)",
-                             "a.out"])
-        # (const char *) $8 = 0x... "/Volumes/data/lldb/svn/trunk/test/expression_command/test/a.out"
-
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyNetBSD
-    def test_evaluate_expression_python(self):
-        """Test SBFrame.EvaluateExpression() API for evaluating an expression."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Create the breakpoint.
-        filespec = lldb.SBFileSpec("main.cpp", False)
-        breakpoint = target.BreakpointCreateByLocation(filespec, self.line)
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        # Verify the breakpoint just created.
-        self.expect(str(breakpoint), BREAKPOINT_CREATED, exe=False,
-                    substrs=['main.cpp',
-                             str(self.line)])
-
-        # Launch the process, and do not stop at the entry point.
-        # Pass 'X Y Z' as the args, which makes argc == 4.
-        process = target.LaunchSimple(
-            ['X', 'Y', 'Z'], None, self.get_process_working_directory())
-
-        if not process:
-            self.fail("SBTarget.LaunchProcess() failed")
-
-        if process.GetState() != lldb.eStateStopped:
-            self.fail("Process should be in the 'stopped' state, "
-                      "instead the actual state is: '%s'" %
-                      lldbutil.state_type_to_str(process.GetState()))
-
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertIsNotNone(
-            thread, "Expected one thread to be stopped at the breakpoint")
-
-        # The filename of frame #0 should be 'main.cpp' and function is main.
-        self.expect(lldbutil.get_filenames(thread)[0],
-                    "Break correctly at main.cpp", exe=False,
-                    startstr="main.cpp")
-        self.expect(lldbutil.get_function_names(thread)[0],
-                    "Break correctly at main()", exe=False,
-                    startstr="main")
-
-        # We should be stopped on the breakpoint with a hit count of 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1, BREAKPOINT_HIT_ONCE)
-
-        #
-        # Use Python API to evaluate expressions while stopped in a stack frame.
-        #
-        frame = thread.GetFrameAtIndex(0)
-
-        val = frame.EvaluateExpression("2.234")
-        self.expect(val.GetValue(), "2.345 evaluated correctly", exe=False,
-                    startstr="2.234")
-        self.expect(val.GetTypeName(), "2.345 evaluated correctly", exe=False,
-                    startstr="double")
-        self.DebugSBValue(val)
-
-        val = frame.EvaluateExpression("argc")
-        self.expect(val.GetValue(), "Argc evaluated correctly", exe=False,
-                    startstr="4")
-        self.DebugSBValue(val)
-
-        val = frame.EvaluateExpression("*argv[1]")
-        self.expect(val.GetValue(), "Argv[1] evaluated correctly", exe=False,
-                    startstr="'X'")
-        self.DebugSBValue(val)
-
-        val = frame.EvaluateExpression("*argv[2]")
-        self.expect(val.GetValue(), "Argv[2] evaluated correctly", exe=False,
-                    startstr="'Y'")
-        self.DebugSBValue(val)
-
-        val = frame.EvaluateExpression("*argv[3]")
-        self.expect(val.GetValue(), "Argv[3] evaluated correctly", exe=False,
-                    startstr="'Z'")
-        self.DebugSBValue(val)
-
-        callee_break = target.BreakpointCreateByName(
-            "a_function_to_call", None)
-        self.assertTrue(callee_break.GetNumLocations() > 0)
-
-        # Make sure ignoring breakpoints works from the command line:
-        self.expect("expression -i true -- a_function_to_call()",
-                    substrs=['(int) $', ' 1'])
-        self.assertTrue(callee_break.GetHitCount() == 1)
-
-        # Now try ignoring breakpoints using the SB API's:
-        options = lldb.SBExpressionOptions()
-        options.SetIgnoreBreakpoints(True)
-        value = frame.EvaluateExpression('a_function_to_call()', options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetValueAsSigned(0) == 2)
-        self.assertTrue(callee_break.GetHitCount() == 2)
-
-    # rdar://problem/8686536
-    # CommandInterpreter::HandleCommand is stripping \'s from input for
-    # WantsRawCommand commands
-    @expectedFailureNetBSD
-    def test_expr_commands_can_handle_quotes(self):
-        """Throw some expression commands with quotes at lldb."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # runCmd: expression 'a'
-        # output: (char) $0 = 'a'
-        self.expect("expression 'a'",
-                    substrs=['(char) $',
-                             "'a'"])
-
-        # runCmd: expression (int) printf ("\n\n\tHello there!\n")
-        # output: (int) $1 = 16
-        self.expect(r'''expression (int) printf ("\n\n\tHello there!\n")''',
-                    substrs=['(int) $',
-                             '16'])
-
-        # runCmd: expression (int) printf("\t\x68\n")
-        # output: (int) $2 = 3
-        self.expect(r'''expression (int) printf("\t\x68\n")''',
-                    substrs=['(int) $',
-                             '3'])
-
-        # runCmd: expression (int) printf("\"\n")
-        # output: (int) $3 = 2
-        self.expect(r'''expression (int) printf("\"\n")''',
-                    substrs=['(int) $',
-                             '2'])
-
-        # runCmd: expression (int) printf("'\n")
-        # output: (int) $4 = 2
-        self.expect(r'''expression (int) printf("'\n")''',
-                    substrs=['(int) $',
-                             '2'])
-
-        # runCmd: command alias print_hi expression (int) printf ("\n\tHi!\n")
-        # output:
-        self.runCmd(
-            r'''command alias print_hi expression (int) printf ("\n\tHi!\n")''')
-        # This fails currently.
-        self.expect('print_hi',
-                    substrs=['(int) $',
-                             '6'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py
deleted file mode 100644
index 88412e6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/test/TestExprs2.py
+++ /dev/null
@@ -1,75 +0,0 @@
-"""
-Test some more expression commands.
-"""
-
-from __future__ import print_function
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommands2TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number(
-            'main.cpp',
-            '// Please test many expressions while stopped at this line:')
-
-    def test_more_expr_commands(self):
-        """Test some more expression commands."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Does static casting work?
-        self.expect("expression (int*)argv",
-                    startstr="(int *) $0 = 0x")
-        # (int *) $0 = 0x00007fff5fbff258
-
-        # Do return values containing the contents of expression locals work?
-        self.expect("expression int i = 5; i",
-                    startstr="(int) $1 = 5")
-        # (int) $2 = 5
-        self.expect("expression $1 + 1",
-                    startstr="(int) $2 = 6")
-        # (int) $3 = 6
-
-        # Do return values containing the results of static expressions work?
-        self.expect("expression 20 + 3",
-                    startstr="(int) $3 = 23")
-        # (int) $4 = 5
-        self.expect("expression $3 + 1",
-                    startstr="(int) $4 = 24")
-        # (int) $5 = 6
-
-    @skipIfLinux
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
-    def test_expr_symbols(self):
-        """Test symbols."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-                self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Do anonymous symbols work?
-        self.expect("expression ((char**)environ)[0]",
-                startstr="(char *) $0 = 0x")
-        # (char *) $1 = 0x00007fff5fbff298 "Apple_PubSub_Socket_Render=/tmp/launch-7AEsUD/Render"
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/timeout/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/timeout/Makefile
deleted file mode 100644
index c9cff41..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/timeout/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := wait-a-while.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py
deleted file mode 100644
index f5c5599..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py
+++ /dev/null
@@ -1,81 +0,0 @@
-"""
-Test calling a function that waits a while, and make sure the timeout option to expr works.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprCommandWithTimeoutsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "wait-a-while.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    @expectedFlakeyFreeBSD("llvm.org/pr19605")
-    @expectedFailureAll(
-        oslist=[
-            "windows"],
-        bugnumber="llvm.org/pr21765")
-    @expectedFailureNetBSD
-    def test(self):
-        """Test calling std::String member function."""
-        self.build()
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
-            self, 'stop here in main.', self.main_source_spec)
-
-        # First set the timeout too short, and make sure we fail.
-        options = lldb.SBExpressionOptions()
-        options.SetTimeoutInMicroSeconds(10)
-        options.SetUnwindOnError(True)
-
-        frame = thread.GetFrameAtIndex(0)
-
-        value = frame.EvaluateExpression("wait_a_while(1000000)", options)
-        self.assertTrue(value.IsValid())
-        self.assertFalse(value.GetError().Success())
-
-        # Now do the same thing with the command line command, and make sure it
-        # works too.
-        interp = self.dbg.GetCommandInterpreter()
-
-        result = lldb.SBCommandReturnObject()
-        return_value = interp.HandleCommand(
-            "expr -t 100 -u true -- wait_a_while(1000000)", result)
-        self.assertTrue(return_value == lldb.eReturnStatusFailed)
-
-        # Okay, now do it again with long enough time outs:
-
-        options.SetTimeoutInMicroSeconds(1000000)
-        value = frame.EvaluateExpression("wait_a_while (1000)", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-
-        # Now do the same thingwith the command line command, and make sure it
-        # works too.
-        interp = self.dbg.GetCommandInterpreter()
-
-        result = lldb.SBCommandReturnObject()
-        return_value = interp.HandleCommand(
-            "expr -t 1000000 -u true -- wait_a_while(1000)", result)
-        self.assertTrue(return_value == lldb.eReturnStatusSuccessFinishResult)
-
-        # Finally set the one thread timeout and make sure that doesn't change
-        # things much:
-
-        options.SetTimeoutInMicroSeconds(1000000)
-        options.SetOneThreadTimeoutInMicroSeconds(500000)
-        value = frame.EvaluateExpression("wait_a_while (1000)", options)
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/Makefile
deleted file mode 100644
index 9e35242..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp test.cpp
-
-include $(LEVEL)/Makefile.rules
-
-a.out: dummy
-
-dummy:
-	$(MAKE) VPATH=$(VPATH) -I $(SRCDIR) -f $(SRCDIR)/dummy.mk
-
-clean::
-	$(MAKE) VPATH=$(VPATH) -I $(SRCDIR) -f $(SRCDIR)/dummy.mk clean
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py
deleted file mode 100644
index 1a8a619..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/TestTopLevelExprs.py
+++ /dev/null
@@ -1,96 +0,0 @@
-"""
-Test top-level expressions.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TopLevelExpressionsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.c.
-        self.line = line_number('main.cpp',
-                                '// Set breakpoint here')
-        self.dummy_line = line_number('dummy.cpp',
-                                      '// Set breakpoint here')
-
-        # Disable confirmation prompt to avoid infinite wait
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
-    def build_and_run(self):
-        """Test top-level expressions."""
-        self.build()
-
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-    def run_dummy(self):
-        self.runCmd("file " + self.getBuildArtifact("dummy"),
-                    CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self,
-            "dummy.cpp",
-            self.dummy_line,
-            num_expected_locations=1,
-            loc_exact=False)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-    @add_test_categories(['pyapi'])
-    @skipIf(debug_info="gmodules")  # not relevant
-    @skipIf(oslist=["windows"])  # Error in record layout on Windows
-    def test_top_level_expressions(self):
-        self.build_and_run()
-
-        resultFromCode = self.frame().EvaluateExpression("doTest()").GetValueAsUnsigned()
-
-        self.runCmd("kill")
-
-        self.run_dummy()
-
-        codeFile = open('test.cpp', 'r')
-
-        expressions = []
-        current_expression = ""
-
-        for line in codeFile:
-            if line.startswith("// --"):
-                expressions.append(current_expression)
-                current_expression = ""
-            else:
-                current_expression += line
-
-        options = lldb.SBExpressionOptions()
-        options.SetLanguage(lldb.eLanguageTypeC_plus_plus)
-        options.SetTopLevel(True)
-
-        for expression in expressions:
-            self.frame().EvaluateExpression(expression, options)
-
-        resultFromTopLevel = self.frame().EvaluateExpression("doTest()")
-
-        self.assertTrue(resultFromTopLevel.IsValid())
-        self.assertEqual(
-            resultFromCode,
-            resultFromTopLevel.GetValueAsUnsigned())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.mk
deleted file mode 100644
index af97678..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/top-level/dummy.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := dummy.cpp
-EXE := dummy
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/Makefile
deleted file mode 100644
index 5974461..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../make
-
-OBJC_SOURCES := main.m foo.m
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
\ No newline at end of file
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
deleted file mode 100644
index bac8e54..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/two-files/TestObjCTypeQueryFromOtherCompileUnit.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Regression test for <rdar://problem/8981098>:
-
-The expression parser's type search only looks in the current compilation unit for types.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ObjCTypeQueryTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break for main.m.
-        self.line = line_number(
-            'main.m', "// Set breakpoint here, then do 'expr (NSArray*)array_token'.")
-
-    @skipUnlessDarwin
-    def test(self):
-        """The expression parser's type search should be wider than the current compilation unit."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Now do a NSArry type query from the 'main.m' compile uint.
-        self.expect("expression (NSArray*)array_token",
-                    substrs=['(NSArray *) $0 = 0x'])
-        # (NSArray *) $0 = 0x00007fff70118398
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unicode-in-variable/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unicode-in-variable/Makefile
deleted file mode 100644
index 3759b5f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unicode-in-variable/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-LEVEL = ../../make
-CXX_SOURCES := main.cpp
-CXX_FLAGS_EXTRA := -finput-charset=UTF-8 -fextended-identifiers
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unwind_expression/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unwind_expression/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unwind_expression/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py
deleted file mode 100644
index 62be09c..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/unwind_expression/TestUnwindExpression.py
+++ /dev/null
@@ -1,103 +0,0 @@
-"""
-Test stopping at a breakpoint in an expression, and unwinding from there.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class UnwindFromExpressionTest(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    main_spec = lldb.SBFileSpec("main.cpp", False)
-
-    def build_and_run_to_bkpt(self):
-        self.build()
-
-        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                "// Set a breakpoint here to get started", self.main_spec)
-
-        # Next set a breakpoint in this function, set up Expression options to stop on
-        # breakpoint hits, and call the function.
-        self.fun_bkpt = self.target().BreakpointCreateBySourceRegex(
-            "// Stop inside the function here.", self.main_spec)
-        self.assertTrue(self.fun_bkpt, VALID_BREAKPOINT)
-
-
-    @no_debug_info_test
-    @expectedFailureAll(bugnumber="llvm.org/pr33164")
-    def test_conditional_bktp(self):
-        """
-        Test conditional breakpoint handling in the IgnoreBreakpoints = False case
-        """
-        self.build_and_run_to_bkpt()
-
-        self.fun_bkpt.SetCondition("0") # Should not get hit
-        options = lldb.SBExpressionOptions()
-        options.SetIgnoreBreakpoints(False)
-        options.SetUnwindOnError(False)
-
-        main_frame = self.thread.GetFrameAtIndex(0)
-        val = main_frame.EvaluateExpression("second_function(47)", options)
-        self.assertTrue(
-            val.GetError().Success(),
-            "We did complete the execution.")
-        self.assertEquals(47, val.GetValueAsSigned())
-
-
-    @add_test_categories(['pyapi'])
-    @expectedFlakeyNetBSD
-    def test_unwind_expression(self):
-        """Test unwinding from an expression."""
-        self.build_and_run_to_bkpt()
-
-        # Run test with varying one thread timeouts to also test the halting
-        # logic in the IgnoreBreakpoints = False case
-        self.do_unwind_test(self.thread, self.fun_bkpt, 1000)
-        self.do_unwind_test(self.thread, self.fun_bkpt, 100000)
-
-    def do_unwind_test(self, thread, bkpt, timeout):
-        #
-        # Use Python API to evaluate expressions while stopped in a stack frame.
-        #
-        main_frame = thread.GetFrameAtIndex(0)
-
-        options = lldb.SBExpressionOptions()
-        options.SetIgnoreBreakpoints(False)
-        options.SetUnwindOnError(False)
-        options.SetOneThreadTimeoutInMicroSeconds(timeout)
-
-        val = main_frame.EvaluateExpression("a_function_to_call()", options)
-
-        self.assertTrue(
-            val.GetError().Fail(),
-            "We did not complete the execution.")
-        error_str = val.GetError().GetCString()
-        self.assertTrue(
-            "Execution was interrupted, reason: breakpoint" in error_str,
-            "And the reason was right.")
-
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(
-            self.process(), bkpt)
-        self.assertTrue(
-            thread.IsValid(),
-            "We are indeed stopped at our breakpoint")
-
-        # Now unwind the expression, and make sure we got back to where we
-        # started.
-        error = thread.UnwindInnermostExpression()
-        self.assertTrue(error.Success(), "We succeeded in unwinding")
-
-        cur_frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(
-            cur_frame.IsEqual(main_frame),
-            "We got back to the main frame.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/vector_of_enums/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/vector_of_enums/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/vector_of_enums/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/Makefile
deleted file mode 100644
index ea434d4..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/Makefile
+++ /dev/null
@@ -1,26 +0,0 @@
-LEVEL = ../../make
-CFLAGS_EXTRAS += -std=c99
-LD_FLAGS := -dynamiclib
-include $(LEVEL)/Makefile.rules
-
-all: a.out dylib missing
-
-dylib: dylib.o
-	$(CC)  $(LD_FLAGS) -o libdylib.dylib dylib.o
-
-missing: dylib2.o
-	mkdir hidden
-	$(CC)  $(LD_FLAGS) -o hidden/libdylib.dylib dylib2.o
-
-a.out: main.o dylib missing
-	$(CC)  $(CFLAGS) -L. -ldylib main.o
-
-dylib.o: dylib.h $(SRCDIR)/dylib.c
-	$(CC) -DHAS_THEM  $(CFLAGS) -c $(SRCDIR)/dylib.c
-
-dylib2.o: dylib.h $(SRCDIR)/dylib.c
-	$(CC)  $(CFLAGS) -c $(SRCDIR)/dylib.c -o dylib2.o
-
-main.o: dylib.h $(SRCDIR)/main.c
-	$(CC)  $(CFLAGS) -c $(SRCDIR)/main.c -fmodules -fmodules-cache-path=$(CLANG_MODULE_CACHE_DIR)
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/TestWeakSymbols.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/TestWeakSymbols.py
deleted file mode 100644
index a5d7a4b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/weak_symbols/TestWeakSymbols.py
+++ /dev/null
@@ -1,83 +0,0 @@
-"""
-Test that we can compile expressions referring to
-absent weak symbols from a dylib.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test import decorators
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class TestWeakSymbolsInExpressions(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @decorators.skipUnlessDarwin
-    def test_weak_symbol_in_expr(self):
-        """Tests that we can refer to weak symbols in expressions."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-        self.do_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    def run_weak_var_check (self, weak_varname, present):
-        # The expression will modify present_weak_int to signify which branch
-        # was taken.  Set it to so we don't get confused by a previous run.
-        value = self.target.FindFirstGlobalVariable("present_weak_int")
-        value.SetValueFromCString("0")
-        if present:
-            correct_value = 10
-        else:
-            correct_value = 20
-            
-        # Note, I'm adding the "; 10" at the end of the expression to work around
-        # the bug that expressions with no result currently return False for Success()...
-        expr = "if (&" + weak_varname + " != NULL) { present_weak_int = 10; } else { present_weak_int = 20;}; 10"
-        result = self.frame.EvaluateExpression(expr)
-        self.assertTrue(result.GetError().Success(), "absent_weak_int expr failed: %s"%(result.GetError().GetCString()))
-        self.assertEqual(value.GetValueAsSigned(), correct_value, "Didn't change present_weak_int correctly.")
-        
-    def do_test(self):
-        hidden_dir = os.path.join(self.getBuildDir(), "hidden")
-        
-        launch_info = lldb.SBLaunchInfo(None)
-        launch_info.SetWorkingDirectory(self.getBuildDir())
-        # We have to point to the hidden directory to pick up the
-        # version of the dylib without the weak symbols:
-        env_expr = self.platformContext.shlib_environment_var + "=" + hidden_dir
-        launch_info.SetEnvironmentEntries([env_expr], True)
-        
-        (self.target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                                                            "Set a breakpoint here", self.main_source_file,
-                                                                            launch_info = launch_info)
-        # First we have to import the Dylib module so we get the type info
-        # for the weak symbol.  We need to add the source dir to the module
-        # search paths, and then run @import to introduce it into the expression
-        # context:
-        self.dbg.HandleCommand("settings set target.clang-module-search-paths " + self.getSourceDir())
-        
-        self.frame = thread.frames[0]
-        self.assertTrue(self.frame.IsValid(), "Got a good frame")
-        options = lldb.SBExpressionOptions()
-        options.SetLanguage(lldb.eLanguageTypeObjC)
-        result = self.frame.EvaluateExpression("@import Dylib", options)
-
-        # Now run an expression that references an absent weak symbol:
-        self.run_weak_var_check("absent_weak_int", False)
-        self.run_weak_var_check("absent_weak_function", False)
-        
-        # Make sure we can do the same thing with present weak symbols
-        self.run_weak_var_check("present_weak_int", True)
-        self.run_weak_var_check("present_weak_function", True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/xvalue/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/xvalue/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/xvalue/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/xvalue/TestXValuePrinting.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/xvalue/TestXValuePrinting.py
deleted file mode 100644
index 3aac648..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/xvalue/TestXValuePrinting.py
+++ /dev/null
@@ -1,37 +0,0 @@
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprXValuePrintingTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        self.main_source = "main.cpp"
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-    def do_test(self, dictionary=None):
-        """Printing an xvalue should work."""
-        self.build(dictionary=dictionary)
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
-                                          '// Break here', self.main_source_spec)
-        frame = thread.GetFrameAtIndex(0)
-
-        value = frame.EvaluateExpression("foo().data")
-        self.assertTrue(value.IsValid())
-        self.assertTrue(value.GetError().Success())
-        self.assertEqual(value.GetValueAsSigned(), 1234)
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
-    def test(self):
-        self.do_test()
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestAbbreviations.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestAbbreviations.py
index b3095c7..4a129bb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestAbbreviations.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestAbbreviations.py
@@ -2,11 +2,6 @@
 Test some lldb command abbreviations and aliases for proper resolution.
 """
 
-from __future__ import print_function
-
-
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py
index 519b93e..9e4b3bb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/abbreviation/TestCommonShortSpellings.py
@@ -3,11 +3,8 @@
 many commands remain available even after we add/delete commands in the future.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/apropos_with_process/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/apropos_with_process/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/apropos_with_process/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/apropos_with_process/TestAproposWithProcess.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/apropos_with_process/TestAproposWithProcess.py
deleted file mode 100644
index aa80c99..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/apropos_with_process/TestAproposWithProcess.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""
-Test that apropos env doesn't crash trying to touch the process plugin command
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class AproposWithProcessTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// break here')
-
-    def test_apropos_with_process(self):
-        """Test that apropos env doesn't crash trying to touch the process plugin command."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main() after the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        self.runCmd('apropos env')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/archives/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/archives/Makefile
index 64da83b..4d1950c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/archives/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/archives/Makefile
@@ -1,9 +1,7 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
 MAKE_DSYM := NO
 ARCHIVE_NAME := libfoo.a
 ARCHIVE_C_SOURCES := a.c b.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py
index a0c09686..b412ac4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/archives/TestBSDArchives.py
@@ -1,10 +1,7 @@
 """Test breaking inside functions defined within a BSD archive file libfoo.a."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -25,12 +22,6 @@
     @expectedFailureAll(
         oslist=["windows"],
         bugnumber="llvm.org/pr24527.  Makefile.rules doesn't know how to build static libs on Windows")
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=[
-            "arm",
-            "aarch64"],
-        bugnumber="llvm.org/pr27795")
     def test(self):
         """Break inside a() and b() defined within libfoo.a."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/Makefile
index dc8d682..4913a18 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 CFLAGS_EXTRAS := -fsanitize=address -g -gcolumn-info
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
index 17edf85..4df3151 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestMemoryHistory.py
@@ -2,11 +2,8 @@
 Test that ASan memory history provider returns correct stack traces
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -19,7 +16,7 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @skipIfRemote
+    @expectedFailureNetBSD
     @skipUnlessAddressSanitizer
     def test(self):
         self.build()
@@ -35,9 +32,10 @@
 
     def asan_tests(self):
         exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        self.registerSanitizerLibrariesWithTarget(target)
 
         self.runCmd("breakpoint set -f main.c -l %d" % self.line_breakpoint)
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
index fcb2f47..0ca4843 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/asan/TestReportData.py
@@ -2,11 +2,8 @@
 Test the AddressSanitizer runtime support for report breakpoint and data extraction.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import json
 import lldb
 from lldbsuite.test.decorators import *
@@ -19,7 +16,7 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
-    @skipIfRemote
+    @expectedFailureNetBSD
     @skipUnlessAddressSanitizer
     @skipIf(archs=['i386'], bugnumber="llvm.org/PR36710")
     def test(self):
@@ -38,9 +35,11 @@
 
     def asan_tests(self):
         exe = self.getBuildArtifact("a.out")
-        self.expect(
-            "file " + exe,
-            patterns=["Current executable set to .*a.out"])
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        self.registerSanitizerLibrariesWithTarget(target)
+
         self.runCmd("run")
 
         stop_reason = self.dbg.GetSelectedTarget().process.GetSelectedThread().GetStopReason()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/Makefile
deleted file mode 100644
index 13d40a1..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-ENABLE_THREADS := YES
-EXE := AttachResume
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py
deleted file mode 100644
index 3ec4f93..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/attach_resume/TestAttachResume.py
+++ /dev/null
@@ -1,95 +0,0 @@
-"""
-Test process attach/resume.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-exe_name = "AttachResume"  # Must match Makefile
-
-
-class AttachResumeTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfRemote
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr19310')
-    @expectedFailureNetBSD
-    @skipIfWindows # llvm.org/pr24778, llvm.org/pr21753
-    def test_attach_continue_interrupt_detach(self):
-        """Test attach/continue/interrupt/detach"""
-        self.build()
-        self.process_attach_continue_interrupt_detach()
-
-    def process_attach_continue_interrupt_detach(self):
-        """Test attach/continue/interrupt/detach"""
-
-        exe = self.getBuildArtifact(exe_name)
-
-        popen = self.spawnSubprocess(exe)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        self.runCmd("process attach -p " + str(popen.pid))
-
-        self.setAsync(True)
-        listener = self.dbg.GetListener()
-        process = self.dbg.GetSelectedTarget().GetProcess()
-
-        self.runCmd("c")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateRunning])
-
-        self.runCmd("process interrupt")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateStopped])
-
-        # be sure to continue/interrupt/continue (r204504)
-        self.runCmd("c")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateRunning])
-
-        self.runCmd("process interrupt")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateStopped])
-
-        # Second interrupt should have no effect.
-        self.expect(
-            "process interrupt",
-            patterns=["Process is not running"],
-            error=True)
-
-        # check that this breakpoint is auto-cleared on detach (r204752)
-        self.runCmd("br set -f main.cpp -l %u" %
-                    (line_number('main.cpp', '// Set breakpoint here')))
-
-        self.runCmd("c")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateRunning, lldb.eStateStopped])
-        self.expect('br list', 'Breakpoint not hit',
-                    substrs=['hit count = 1'])
-
-        # Make sure the breakpoint is not hit again.
-        self.expect("expr debugger_flag = false", substrs=[" = false"])
-
-        self.runCmd("c")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateRunning])
-
-        # make sure to detach while in running state (r204759)
-        self.runCmd("detach")
-        lldbutil.expect_state_changes(
-            self, listener, process, [
-                lldb.eStateDetached])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py
index 38848e8..a984254 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/avoids-fd-leak/TestFdLeak.py
@@ -2,10 +2,8 @@
 Test whether a process started by lldb has no extra file descriptors open.
 """
 
-from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test import lldbutil
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/backticks/TestBackticksWithoutATarget.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/backticks/TestBackticksWithoutATarget.py
index 528e525..fdef89c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/backticks/TestBackticksWithoutATarget.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/backticks/TestBackticksWithoutATarget.py
@@ -2,11 +2,8 @@
 Test that backticks without a target should work (not infinite looping).
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
index 6067ee4..695335e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py
index 46191d8..6b42b51 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestAddressBreakpoints.py
@@ -2,12 +2,8 @@
 Test address breakpoints set with shared library of SBAddress work correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
@@ -24,10 +20,6 @@
         self.build()
         self.address_breakpoints()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def address_breakpoints(self):
         """Test address breakpoints set with shared library of SBAddress work correctly."""
         exe = self.getBuildArtifact("a.out")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py
index 460e07c..6d468e0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/address_breakpoints/TestBadAddressBreakpoints.py
@@ -2,12 +2,8 @@
 Test that breakpoints set on a bad address say they are bad.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
@@ -24,10 +20,6 @@
         self.build()
         self.address_breakpoints()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def address_breakpoints(self):
         """Test that breakpoints set on a bad address say they are bad."""
         target, process, thread, bkpt = \
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
index 6067ee4..695335e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
index b5e38ee..e0b727e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
@@ -2,12 +2,8 @@
 Test that the breakpoint auto-continue flag works correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
@@ -61,10 +57,6 @@
 
         return process
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def simple_auto_continue(self):
         bpno = self.make_target_and_bkpt()
         process = self.launch_it(lldb.eStateExited)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
index 6c22351..ad42b20 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99 -gcolumn-info
+CFLAGS_EXTRAS := -std=c99 -gcolumn-info
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
index f06fb07..98fe433 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
@@ -2,12 +2,8 @@
 Test setting a breakpoint by line and column.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/Makefile
index a6376f9..8d669cb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c a.c b.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
index 8143fa9..77db8f7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommand.py
@@ -2,11 +2,8 @@
 Test lldb breakpoint command add/list/delete.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -20,11 +17,12 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
-    def test_breakpoint_command_sequence(self):
+    def not_test_breakpoint_command_sequence(self):
         """Test a sequence of breakpoint command add, list, and delete."""
         self.build()
         self.breakpoint_command_sequence()
 
+    @skipIf(oslist=["windows"], bugnumber="llvm.org/pr44431")
     def test_script_parameters(self):
         """Test a sequence of breakpoint command add, list, and delete."""
         self.build()
@@ -109,6 +107,10 @@
             "breakpoint command add -s command -o 'frame variable --show-types --scope' 1 4")
         self.runCmd(
             "breakpoint command add -s python -o 'import side_effect; side_effect.one_liner = \"one liner was here\"' 2")
+
+        import side_effect
+        self.runCmd("command script import --allow-reload ./bktptcmd.py")
+
         self.runCmd(
             "breakpoint command add --python-function bktptcmd.function 3")
 
@@ -153,8 +155,6 @@
 
         self.runCmd("breakpoint delete 4")
 
-        self.runCmd("command script import --allow-reload ./bktptcmd.py")
-
         # Next lets try some other breakpoint kinds.  First break with a regular expression
         # and then specify only one file.  The first time we should get two locations,
         # the second time only one:
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
index 7c7aad0..15a3120 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import re
-import sys
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -22,10 +19,15 @@
 
     @add_test_categories(['pyapi'])
     def test_step_out_python(self):
-        """Test stepping out using avoid-no-debug with dsyms."""
+        """Test stepping out using a python breakpoint command."""
         self.build()
         self.do_set_python_command_from_python()
 
+    def test_bkpt_cmd_bad_arguments(self):
+        """Test what happens when pass structured data to a command:"""
+        self.build()
+        self.do_bad_args_to_python_command()
+        
     def setUp(self):
         TestBase.setUp(self)
         self.main_source = "main.c"
@@ -46,6 +48,18 @@
             "Set break point at this line.", self.main_source_spec)
         self.assertTrue(func_bkpt, VALID_BREAKPOINT)
 
+        fancy_bkpt = self.target.BreakpointCreateBySourceRegex(
+            "Set break point at this line.", self.main_source_spec)
+        self.assertTrue(fancy_bkpt, VALID_BREAKPOINT)
+
+        fancier_bkpt = self.target.BreakpointCreateBySourceRegex(
+            "Set break point at this line.", self.main_source_spec)
+        self.assertTrue(fancier_bkpt, VALID_BREAKPOINT)
+
+        not_so_fancy_bkpt = self.target.BreakpointCreateBySourceRegex(
+            "Set break point at this line.", self.main_source_spec)
+        self.assertTrue(not_so_fancy_bkpt, VALID_BREAKPOINT)
+
         # Also test that setting a source regex breakpoint with an empty file
         # spec list sets it on all files:
         no_files_bkpt = self.target.BreakpointCreateBySourceRegex(
@@ -78,14 +92,37 @@
             "Failed to set the script callback body: %s." %
             (error.GetCString()))
 
-        self.dbg.HandleCommand(
-            "command script import --allow-reload ./bktptcmd.py")
+        self.expect("command script import --allow-reload ./bktptcmd.py")
+        
         func_bkpt.SetScriptCallbackFunction("bktptcmd.function")
 
+        extra_args = lldb.SBStructuredData()
+        stream = lldb.SBStream()
+        stream.Print('{"side_effect" : "I am fancy"}')
+        extra_args.SetFromJSON(stream)
+        error = fancy_bkpt.SetScriptCallbackFunction("bktptcmd.another_function", extra_args)
+        self.assertTrue(error.Success(), "Failed to add callback %s"%(error.GetCString()))
+        
+        stream.Clear()
+        stream.Print('{"side_effect" : "I am so much fancier"}')
+        extra_args.SetFromJSON(stream)
+        
+        # Fancier's callback is set up from the command line
+        id = fancier_bkpt.GetID()
+        self.expect("breakpoint command add -F bktptcmd.a_third_function -k side_effect -v 'I am fancier' %d"%(id))
+
+        # Not so fancy gets an empty extra_args:
+        empty_args = lldb.SBStructuredData()
+        error = not_so_fancy_bkpt.SetScriptCallbackFunction("bktptcmd.empty_extra_args", empty_args)
+        self.assertTrue(error.Success(), "Failed to add callback %s"%(error.GetCString()))
+        
         # Clear out canary variables
         side_effect.bktptcmd = None
         side_effect.callback = None
-
+        side_effect.fancy    = None
+        side_effect.fancier  = None
+        side_effect.not_so_fancy = None
+        
         # Now launch the process, and do not stop at entry point.
         self.process = self.target.LaunchSimple(
             None, None, self.get_process_working_directory())
@@ -95,8 +132,43 @@
         # Now finish, and make sure the return value is correct.
         threads = lldbutil.get_threads_stopped_at_breakpoint(
             self.process, body_bkpt)
-        self.assertTrue(len(threads) == 1, "Stopped at inner breakpoint.")
+        self.assertEquals(len(threads), 1, "Stopped at inner breakpoint.")
         self.thread = threads[0]
 
         self.assertEquals("callback was here", side_effect.callback)
         self.assertEquals("function was here", side_effect.bktptcmd)
+        self.assertEquals("I am fancy", side_effect.fancy)
+        self.assertEquals("I am fancier", side_effect.fancier)
+        self.assertEquals("Not so fancy", side_effect.not_so_fancy)
+
+    def do_bad_args_to_python_command(self):
+        exe = self.getBuildArtifact("a.out")
+        error = lldb.SBError()
+
+        self.target = self.dbg.CreateTarget(exe)
+        self.assertTrue(self.target, VALID_TARGET)
+
+
+        self.expect("command script import --allow-reload ./bktptcmd.py")
+
+        bkpt = self.target.BreakpointCreateBySourceRegex(
+            "Set break point at this line.", self.main_source_spec)
+        self.assertTrue(bkpt, VALID_BREAKPOINT)
+
+        # Pass a breakpoint command function that doesn't take extra_args,
+        # but pass it extra args:
+        
+        extra_args = lldb.SBStructuredData()
+        stream = lldb.SBStream()
+        stream.Print('{"side_effect" : "I am fancy"}')
+        extra_args.SetFromJSON(stream)
+
+        error = bkpt.SetScriptCallbackFunction("bktptcmd.function", extra_args)
+        self.assertTrue(error.Fail(), "Can't pass extra args if the function doesn't take them")
+
+        error = bkpt.SetScriptCallbackFunction("bktptcmd.useless_function", extra_args)
+        self.assertTrue(error.Fail(), "Can't pass extra args if the function has wrong number of args.")
+
+        error = bkpt.SetScriptCallbackFunction("bktptcmd.nosuch_function", extra_args)
+        self.assertTrue(error.Fail(), "Can't pass extra args if the function doesn't exist.")
+        
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
index d064b75..ed46265 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/TestRegexpBreakCommand.py
@@ -2,11 +2,9 @@
 Test _regexp-break command which uses regular expression matching to dispatch to other built in breakpoint commands.
 """
 
-from __future__ import print_function
 
 
 import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/bktptcmd.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/bktptcmd.py
index ac0f753..e839de5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/bktptcmd.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_command/bktptcmd.py
@@ -1,5 +1,23 @@
 from __future__ import print_function
 import side_effect
 
+def useless_function(first, second):
+    print("I have the wrong number of arguments.")
+
 def function(frame, bp_loc, dict):
     side_effect.bktptcmd = "function was here"
+
+def another_function(frame, bp_loc, extra_args, dict):
+    se_value = extra_args.GetValueForKey("side_effect")
+    se_string = se_value.GetStringValue(100)
+    side_effect.fancy = se_string
+
+def a_third_function(frame, bp_loc, extra_args, dict):
+    se_value = extra_args.GetValueForKey("side_effect")
+    se_string = se_value.GetStringValue(100)
+    side_effect.fancier = se_string
+
+def empty_extra_args(frame, bp_loc, extra_args, dict):
+    if extra_args.IsValid():
+        side_effect.not_so_fancy = "Extra args should not be valid"
+    side_effect.not_so_fancy = "Not so fancy"
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
index 6067ee4..695335e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
index 959c7e8..de9a47d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py
@@ -2,12 +2,6 @@
 Test breakpoint conditions with 'breakpoint modify -c <expr> id'.
 """
 
-from __future__ import print_function
-
-
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -18,30 +12,22 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
-    @skipIfWindows
     def test_breakpoint_condition_and_run_command(self):
         """Exercise breakpoint condition with 'breakpoint modify -c <expr> id'."""
         self.build()
         self.breakpoint_conditions()
 
-    # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
-    @skipIfWindows
     def test_breakpoint_condition_inline_and_run_command(self):
         """Exercise breakpoint condition inline with 'breakpoint set'."""
         self.build()
         self.breakpoint_conditions(inline=True)
 
-    # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
-    @skipIfWindows
     @add_test_categories(['pyapi'])
     def test_breakpoint_condition_and_python_api(self):
         """Use Python APIs to set breakpoint conditions."""
         self.build()
         self.breakpoint_conditions_python()
 
-    # Requires EE to support COFF on Windows (http://llvm.org/pr22232)
-    @skipIfWindows
     @add_test_categories(['pyapi'])
     def test_breakpoint_invalid_condition_and_python_api(self):
         """Use Python APIs to set breakpoint conditions."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py
index 6f696be..0254bf0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_hit_count/TestBreakpointHitCount.py
@@ -2,7 +2,6 @@
 Test breakpoint hit count features.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
index f89b52a..2c00681 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
-include $(LEVEL)/Makefile.rules
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
index 02fb1e0..82f554e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ids/TestBreakpointIDs.py
@@ -2,11 +2,8 @@
 Test lldb breakpoint ids.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
index e3bf4c2..3fa81ae 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_ignore_count/TestBreakpointIgnoreCount.py
@@ -2,12 +2,8 @@
 Test breakpoint ignore count features.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/Makefile
index 77aa24a..692ba17 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py
index 6eaab0c..ff08715 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_in_delayslot/TestAvoidBreakpointInDelaySlot.py
@@ -4,8 +4,6 @@
 
 from __future__ import print_function
 
-import os
-import time
 import re
 import unittest2
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/Makefile
index 4f6b058..283cc1b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := a.c
 CXX_SOURCES := main.cpp b.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py
index b690070..ceffb11 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_language/TestBreakpointLanguage.py
@@ -3,27 +3,17 @@
 parser.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
-import shutil
-import subprocess
 
 
 class TestBreakpointLanguage(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-
     def check_location_file(self, bp, loc, test_name):
         bp_loc = bp.GetLocationAtIndex(loc)
         addr = bp_loc.GetAddress()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
index 7934cd5..9645fd9c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/Makefile
@@ -1,9 +1,7 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
 ifneq (,$(findstring icc,$(CC)))
-    CFLAGS += -debug inline-debug-info
+    CFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
index f4835a9..334b0f0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
@@ -2,11 +2,8 @@
 Test breakpoint commands for a breakpoint ID with multiple locations.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -28,7 +25,6 @@
         self.build()
         self.shadowed_bkpt_cond_test()
 
-
     def test_shadowed_command_options(self):
         """Test that options set on the breakpoint and location behave correctly."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py
index b36e915..1212ad4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_names/TestBreakpointNames.py
@@ -2,12 +2,9 @@
 Test breakpoint names.
 """
 
-from __future__ import print_function
 
 
 import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -157,8 +154,13 @@
     def do_check_using_names(self):
         """Use Python APIs to check names work in place of breakpoint ID's."""
 
+        # Create a dummy breakpoint to use up ID 1
+        _ = self.target.BreakpointCreateByLocation(self.main_file_spec, 30)
+
+        # Create a breakpiont to test with
         bkpt = self.target.BreakpointCreateByLocation(self.main_file_spec, 10)
         bkpt_name = "ABreakpoint"
+        bkpt_id = bkpt.GetID()
         other_bkpt_name= "_AnotherBreakpoint"
 
         # Add a name and make sure we match it:
@@ -171,6 +173,7 @@
         self.assertTrue(bkpts.GetSize() == 1, "One breakpoint matched.")
         found_bkpt = bkpts.GetBreakpointAtIndex(0)
         self.assertTrue(bkpt.GetID() == found_bkpt.GetID(),"The right breakpoint.")
+        self.assertTrue(bkpt.GetID() == bkpt_id,"With the same ID as before.")
 
         retval = lldb.SBCommandReturnObject()
         self.dbg.GetCommandInterpreter().HandleCommand("break disable %s"%(bkpt_name), retval)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile
index 457c497..7df2269 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp foo.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
index c9ef2a7..0419b4d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_options/TestBreakpointOptions.py
@@ -2,10 +2,8 @@
 Test breakpoint command for different options.
 """
 
-from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
index f784e68..40a20a0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
@@ -2,7 +2,6 @@
 Test inferior restart when breakpoint is set on running target.
 """
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile
index 2d7f20f..7c6a18b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/Makefile
@@ -1,10 +1,8 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := relative.cpp
 
 EXE := CompDirSymLink
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 # Force relative filenames by copying it into the build directory.
 relative.cpp: main.cpp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
index 29778aa..0e372c7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py
@@ -1,11 +1,9 @@
 """
 Test breakpoint command with AT_comp_dir set to symbolic link.
 """
-from __future__ import print_function
 
 
 import os
-import shutil
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
index f89b52a..2c00681 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
-include $(LEVEL)/Makefile.rules
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py
index 6afde15..cf36f14 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/consecutive_breakpoints/TestConsecutiveBreakpoints.py
@@ -2,7 +2,6 @@
 Test that we handle breakpoints on consecutive instructions correctly.
 """
 
-from __future__ import print_function
 
 
 import unittest2
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
index f89b52a..2c00681 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
-include $(LEVEL)/Makefile.rules
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
index e4c19fd..be21c6e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp/TestCPPBreakpointLocations.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
index df6b804..ba8e94e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/cpp_exception/TestCPPExceptionBreakpoint.py
@@ -2,12 +2,8 @@
 Test that you can set breakpoint and hit the C++ language exception breakpoint
 """
 
-from __future__ import print_function
 
 
-import os
-import re
-import sys
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -27,6 +23,14 @@
         self.build()
         self.do_cpp_exception_bkpt()
 
+    @add_test_categories(['pyapi'])
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24538")
+    @expectedFailureNetBSD
+    def test_dummy_target_cpp_exception_breakpoint(self):
+        """Test setting and hitting the C++ exception breakpoint from dummy target."""
+        self.build()
+        self.do_dummy_target_cpp_exception_bkpt()
+
     def setUp(self):
         TestBase.setUp(self)
         self.main_source = "main.c"
@@ -53,3 +57,30 @@
             process, exception_bkpt)
         self.assertTrue(len(thread_list) == 1,
                         "One thread stopped at the exception breakpoint.")
+
+    def do_dummy_target_cpp_exception_bkpt(self):
+        exe = self.getBuildArtifact("a.out")
+        error = lldb.SBError()
+
+        dummy_exception_bkpt = self.dbg.GetDummyTarget().BreakpointCreateForException(
+            lldb.eLanguageTypeC_plus_plus, False, True)
+        self.assertTrue(
+            dummy_exception_bkpt.IsValid(),
+            "Created exception breakpoint in dummy target.")
+
+        self.target = self.dbg.CreateTarget(exe)
+        self.assertTrue(self.target, VALID_TARGET)
+
+        exception_bkpt = self.target.GetBreakpointAtIndex(0)
+        self.assertTrue(
+            exception_bkpt.IsValid(),
+            "Target primed with exception breakpoint from dummy target.")
+
+        process = self.target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+        self.assertTrue(process, PROCESS_IS_VALID)
+
+        thread_list = lldbutil.get_threads_stopped_at_breakpoint(
+           process, exception_bkpt)
+        self.assertTrue(len(thread_list) == 1,
+                       "One thread stopped at the exception breakpoint.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py
index 11ec67d..2164ddf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py
@@ -2,9 +2,7 @@
 Test embedded breakpoints, like `asm int 3;` in x86 or or `__debugbreak` on Windows.
 """
 
-from __future__ import print_function
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
index 7934cd5..9645fd9c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/Makefile
@@ -1,9 +1,7 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
 ifneq (,$(findstring icc,$(CC)))
-    CFLAGS += -debug inline-debug-info
+    CFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
index 4b595ab..e3f293a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/dummy_target_breakpoints/TestBreakpointsWithNoTargets.py
@@ -2,11 +2,8 @@
 Test breakpoint commands set before we have a target
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
index 06ef85c..4b3098c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 DYLIB_NAME := foo
 DYLIB_CXX_SOURCES := foo.cpp
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
index 6be3a22..4439607 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/global_constructor/TestBreakpointInGlobalConstructor.py
@@ -2,10 +2,8 @@
 Test that we can hit breakpoints in global constructors
 """
 
-from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/Makefile
index 3665ae3..de4ec12 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../../make
-
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
index 99b5432..56112b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py
@@ -2,12 +2,8 @@
 Test hardware breakpoints for multiple threads.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -22,7 +18,6 @@
 
     # LLDB supports hardware breakpoints for arm and aarch64 architectures.
     @skipIf(archs=no_match(['arm', 'aarch64']))
-    @expectedFailureAndroid
     def test_hw_break_set_delete_multi_thread(self):
         self.build()
         self.setTearDownCleanup()
@@ -30,7 +25,6 @@
 
     # LLDB supports hardware breakpoints for arm and aarch64 architectures.
     @skipIf(archs=no_match(['arm', 'aarch64']))
-    @expectedFailureAndroid
     def test_hw_break_set_disable_multi_thread(self):
         self.build()
         self.setTearDownCleanup()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/Makefile
index 5b73ae6..551d02f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := int.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
index ee67dda..76fefda 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/inlined_breakpoints/TestInlinedBreakpoints.py
@@ -3,11 +3,8 @@
 another source file) works correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
index 06ef85c..4b3098c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/move_nearest/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 DYLIB_NAME := foo
 DYLIB_CXX_SOURCES := foo.cpp
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile
index ad3cb3f..37dd8f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py
index e5e8473..2091987 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/objc/TestObjCBreakpoints.py
@@ -3,11 +3,8 @@
 parser.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import shutil
 import subprocess
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
index 7934cd5..9645fd9c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/Makefile
@@ -1,9 +1,7 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
 ifneq (,$(findstring icc,$(CC)))
-    CFLAGS += -debug inline-debug-info
+    CFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py
index c058794..0bf82c4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/require_hw_breakpoints/TestRequireHWBreakpoints.py
@@ -2,10 +2,7 @@
 Test require hardware breakpoints.
 """
 
-from __future__ import print_function
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -28,6 +25,8 @@
         self.assertTrue(breakpoint.IsHardware())
 
     @skipIfWindows
+    @expectedFailureAll(archs="aarch64", oslist="linux",
+                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
     def test_step_range(self):
         """Test stepping when hardware breakpoints are required."""
         self.build()
@@ -49,6 +48,8 @@
                         in error.GetCString())
 
     @skipIfWindows
+    @expectedFailureAll(archs="aarch64", oslist="linux",
+                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
     def test_step_out(self):
         """Test stepping out when hardware breakpoints are required."""
         self.build()
@@ -69,6 +70,8 @@
                         in error.GetCString())
 
     @skipIfWindows
+    @expectedFailureAll(archs="aarch64", oslist="linux",
+                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
     def test_step_over(self):
         """Test stepping over when hardware breakpoints are required."""
         self.build()
@@ -87,6 +90,8 @@
             ])
 
     @skipIfWindows
+    @expectedFailureAll(archs="aarch64", oslist="linux",
+                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44055")
     def test_step_until(self):
         """Test stepping until when hardware breakpoints are required."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
index 6067ee4..695335e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
index 64f6acc..895f4fa 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
@@ -2,12 +2,7 @@
 Test setting breakpoints using a scripted resolver
 """
 
-from __future__ import print_function
-
-
 import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.decorators import *
@@ -35,14 +30,15 @@
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24528")
     def test_command_line(self):
-        """ Make sure we are called at the right depths depending on what we return
-            from __get_depth__"""
+        """ Test setting a resolver breakpoint from the command line """
         self.build()
         self.do_test_cli()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
+    def test_bad_command_lines(self):
+        """Make sure we get appropriate errors when we give invalid key/value
+           options"""
+        self.build()
+        self.do_test_bad_options()        
 
     def make_target_and_import(self):
         target = lldbutil.run_to_breakpoint_make_target(self)
@@ -197,3 +193,32 @@
         target = self.make_target_and_import()
 
         lldbutil.run_break_set_by_script(self, "resolver.Resolver", extra_options="-k symbol -v break_on_me")
+
+        # Make sure setting a resolver breakpoint doesn't pollute further breakpoint setting
+        # by checking the description of a regular file & line breakpoint to make sure it
+        # doesn't mention the Python Resolver function:
+        bkpt_no = lldbutil.run_break_set_by_file_and_line(self, "main.c", 12)
+        bkpt = target.FindBreakpointByID(bkpt_no)
+        strm = lldb.SBStream()
+        bkpt.GetDescription(strm, False)
+        used_resolver = "I am a python breakpoint resolver" in strm.GetData()
+        self.assertFalse(used_resolver, "Found the resolver description in the file & line breakpoint description.")
+
+        # Also make sure the breakpoint was where we expected:
+        bp_loc = bkpt.GetLocationAtIndex(0)
+        bp_sc = bp_loc.GetAddress().GetSymbolContext(lldb.eSymbolContextEverything)
+        bp_se = bp_sc.GetLineEntry()
+        self.assertEqual(bp_se.GetLine(), 12, "Got the right line number")
+        self.assertEqual(bp_se.GetFileSpec().GetFilename(), "main.c", "Got the right filename")
+        
+    def do_test_bad_options(self):
+        target = self.make_target_and_import()
+
+        self.expect("break set -P resolver.Resolver -k a_key", error = True, msg="Missing value at end", 
+           substrs=['Key: "a_key" missing value'])
+        self.expect("break set -P resolver.Resolver -v a_value", error = True, msg="Missing key at end", 
+           substrs=['Value: "a_value" missing matching key'])
+        self.expect("break set -P resolver.Resolver -v a_value -k a_key -v another_value", error = True, msg="Missing key among args", 
+           substrs=['Value: "a_value" missing matching key'])
+        self.expect("break set -P resolver.Resolver -k a_key -k a_key -v another_value", error = True, msg="Missing value among args", 
+           substrs=['Key: "a_key" missing value'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/resolver.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/resolver.py
index 61f5f2d..f3af7c0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/resolver.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/scripted_bkpt/resolver.py
@@ -7,6 +7,7 @@
   def __init__(self, bkpt, extra_args, dict):
       self.bkpt = bkpt
       self.extra_args = extra_args
+        
       Resolver.func_list = []
       Resolver.got_files = 0
 
@@ -15,6 +16,8 @@
       sym_item = self.extra_args.GetValueForKey("symbol")
       if sym_item.IsValid():
           sym_name = sym_item.GetStringValue(1000)
+      else:
+          print("Didn't have a value for key 'symbol'")
 
       if sym_ctx.compile_unit.IsValid():
           Resolver.got_files = 1
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
index e84cbf4..4c6f32b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
@@ -2,12 +2,7 @@
 Test breakpoint serialization.
 """
 
-from __future__ import print_function
-
-
 import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -49,7 +44,12 @@
         self.build()
         self.setup_targets_and_cleanup()
         self.do_check_names()
-
+        
+    def test_scripted_extra_args(self):
+        self.build()
+        self.setup_targets_and_cleanup()
+        self.do_check_extra_args()
+        
     def setup_targets_and_cleanup(self):
         def cleanup ():
             self.RemoveTempFile(self.bkpts_file_path)
@@ -291,3 +291,85 @@
         error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, names_list, copy_bps)
         self.assertTrue(error.Success(), "Failed reading breakpoints from file: %s"%(error.GetCString()))
         self.assertTrue(copy_bps.GetSize() == 1, "Found the matching breakpoint.")
+
+    def do_check_extra_args(self):
+
+        import side_effect
+        interp = self.dbg.GetCommandInterpreter()
+        error = lldb.SBError()
+
+        script_name = os.path.join(self.getSourceDir(), "resolver.py")
+
+        command = "command script import " + script_name
+        result = lldb.SBCommandReturnObject()
+        interp.HandleCommand(command, result)
+        self.assertTrue(result.Succeeded(), "com scr imp failed: %s"%(result.GetError()))
+
+        # First make sure a scripted breakpoint with no args works:
+        bkpt = self.orig_target.BreakpointCreateFromScript("resolver.Resolver", lldb.SBStructuredData(),
+                                                           lldb.SBFileSpecList(), lldb.SBFileSpecList())
+        self.assertTrue(bkpt.IsValid(), "Bkpt is valid")
+        write_bps = lldb.SBBreakpointList(self.orig_target)
+
+        error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, write_bps)
+        self.assertTrue(error.Success(), "Failed writing breakpoints: %s"%(error.GetCString()))
+
+        side_effect.g_extra_args = None
+        copy_bps = lldb.SBBreakpointList(self.copy_target)
+        error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, copy_bps)
+        self.assertTrue(error.Success(), "Failed reading breakpoints: %s"%(error.GetCString()))
+
+        self.assertEqual(copy_bps.GetSize(), 1, "Got one breakpoint from file.")
+        no_keys = lldb.SBStringList()
+        side_effect.g_extra_args.GetKeys(no_keys)
+        self.assertEqual(no_keys.GetSize(), 0, "Should have no keys")
+
+        self.orig_target.DeleteAllBreakpoints()
+        self.copy_target.DeleteAllBreakpoints()
+
+        # Now try one with extra args:
+        
+        extra_args = lldb.SBStructuredData()
+        stream = lldb.SBStream()
+        stream.Print('{"first_arg" : "first_value", "second_arg" : "second_value"}')
+        extra_args.SetFromJSON(stream)
+        self.assertTrue(extra_args.IsValid(), "SBStructuredData is valid.")
+        
+        bkpt = self.orig_target.BreakpointCreateFromScript("resolver.Resolver",
+                                                           extra_args, lldb.SBFileSpecList(), lldb.SBFileSpecList())
+        self.assertTrue(bkpt.IsValid(), "Bkpt is valid")
+        write_bps = lldb.SBBreakpointList(self.orig_target)
+
+        error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, write_bps)
+        self.assertTrue(error.Success(), "Failed writing breakpoints: %s"%(error.GetCString()))
+
+        orig_extra_args = side_effect.g_extra_args
+        self.assertTrue(orig_extra_args.IsValid(), "Extra args originally valid")
+
+        orig_keys = lldb.SBStringList()
+        orig_extra_args.GetKeys(orig_keys)
+        self.assertEqual(2, orig_keys.GetSize(), "Should have two keys")
+
+        side_effect.g_extra_args = None
+
+        copy_bps = lldb.SBBreakpointList(self.copy_target)
+        error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, copy_bps)
+        self.assertTrue(error.Success(), "Failed reading breakpoints: %s"%(error.GetCString()))
+
+        self.assertEqual(copy_bps.GetSize(), 1, "Got one breakpoint from file.")
+
+        copy_extra_args = side_effect.g_extra_args
+        copy_keys = lldb.SBStringList()
+        copy_extra_args.GetKeys(copy_keys)
+        self.assertEqual(2, copy_keys.GetSize(), "Copy should have two keys")
+
+        for idx in range(0, orig_keys.GetSize()):
+            key = orig_keys.GetStringAtIndex(idx)
+            copy_value = copy_extra_args.GetValueForKey(key).GetStringValue(100)
+
+            if key == "first_arg":
+                self.assertEqual(copy_value, "first_value")
+            elif key == "second_arg":
+                self.assertEqual(copy_value, "second_value")
+            else:
+                self.Fail("Unknown key: %s"%(key))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/resolver.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/resolver.py
new file mode 100644
index 0000000..c3a5af5
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/resolver.py
@@ -0,0 +1,17 @@
+import lldb
+import side_effect
+
+class Resolver:
+  """This resolver class is just so I can read out the extra_args."""
+  
+  def __init__(self, bkpt, extra_args, dict):
+      self.bkpt = bkpt
+      side_effect.g_extra_args = extra_args
+    
+  def __callback__(self, sym_ctx):
+      """Doesn't actually do anything."""
+      return
+
+  def get_short_help(self):
+      return "I am a python breakpoint resolver that does nothing"
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/side_effect.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/side_effect.py
new file mode 100644
index 0000000..868901c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/serialize/side_effect.py
@@ -0,0 +1 @@
+g_extra_args = None
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/Makefile
index ac984f1..af0cd30 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c a.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py
index 4256c70..0409c78 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/source_regexp/TestSourceRegexBreakpoints.py
@@ -3,10 +3,7 @@
 This test just tests the source file & function restrictions.
 """
 
-from __future__ import print_function
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
index f89b52a..2c00681 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
-include $(LEVEL)/Makefile.rules
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
index 07fd049..ea94fd3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/breakpoint/step_over_breakpoint/TestStepOverBreakpoint.py
@@ -5,7 +5,6 @@
 and eStopReasonPlanComplete when breakpoint's condition fails.
 """
 
-from __future__ import print_function
 
 import unittest2
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_history/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_history/.categories
deleted file mode 100644
index 3a3f4df..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_history/.categories
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_history/TestCommandHistory.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_history/TestCommandHistory.py
deleted file mode 100644
index 17b7b6d..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_history/TestCommandHistory.py
+++ /dev/null
@@ -1,108 +0,0 @@
-"""
-Test the command history mechanism
-"""
-
-from __future__ import print_function
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CommandHistoryTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_history(self):
-        self.runCmd('command history --clear', inHistory=False)
-        self.runCmd('breakpoint list', check=False, inHistory=True)  # 0
-        self.runCmd('register read', check=False, inHistory=True)  # 1
-        self.runCmd('apropos hello', check=False, inHistory=True)  # 2
-        self.runCmd('memory write', check=False, inHistory=True)  # 3
-        self.runCmd('log list', check=False, inHistory=True)  # 4
-        self.runCmd('disassemble', check=False, inHistory=True)  # 5
-        self.runCmd('expression 1', check=False, inHistory=True)  # 6
-        self.runCmd(
-            'type summary list -w default',
-            check=False,
-            inHistory=True)  # 7
-        self.runCmd('version', check=False, inHistory=True)  # 8
-        self.runCmd('frame select 1', check=False, inHistory=True)  # 9
-
-        self.expect(
-            "command history -s 3 -c 3",
-            inHistory=True,
-            substrs=[
-                '3: memory write',
-                '4: log list',
-                '5: disassemble'])
-
-        self.expect("command history -s 3 -e 3", inHistory=True,
-                    substrs=['3: memory write'])
-
-        self.expect(
-            "command history -s 6 -e 7",
-            inHistory=True,
-            substrs=[
-                '6: expression 1',
-                '7: type summary list -w default'])
-
-        self.expect("command history -c 2", inHistory=True,
-                    substrs=['0: breakpoint list', '1: register read'])
-
-        self.expect("command history -e 3 -c 1", inHistory=True,
-                    substrs=['3: memory write'])
-
-        self.expect(
-            "command history -e 2",
-            inHistory=True,
-            substrs=[
-                '0: breakpoint list',
-                '1: register read',
-                '2: apropos hello'])
-
-        self.expect(
-            "command history -s 12",
-            inHistory=True,
-            substrs=[
-                '12: command history -s 6 -e 7',
-                '13: command history -c 2',
-                '14: command history -e 3 -c 1',
-                '15: command history -e 2',
-                '16: command history -s 12'])
-
-        self.expect(
-            "command history -s end -c 3",
-            inHistory=True,
-            substrs=[
-                '15: command history -e 2',
-                '16: command history -s 12',
-                '17: command history -s end -c 3'])
-
-        self.expect(
-            "command history -s end -e 15",
-            inHistory=True,
-            substrs=[
-                '15: command history -e 2',
-                '16: command history -s 12',
-                '17: command history -s end -c 3',
-                'command history -s end -e 15'])
-
-        self.expect("command history -s 5 -c 1", inHistory=True,
-                    substrs=['5: disassemble'])
-
-        self.expect("command history -c 1 -s 5", inHistory=True,
-                    substrs=['5: disassemble'])
-
-        self.expect("command history -c 1 -e 3", inHistory=True,
-                    substrs=['3: memory write'])
-
-        self.expect(
-            "command history -c 1 -e 3 -s 5",
-            error=True,
-            inHistory=True,
-            substrs=['error: --count, --start-index and --end-index cannot be all specified in the same invocation'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/.categories
deleted file mode 100644
index 3a3f4df..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/.categories
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py
deleted file mode 100644
index aa0e0a7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/TestCommandScript.py
+++ /dev/null
@@ -1,155 +0,0 @@
-"""
-Test lldb Python commands.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class CmdPythonTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test(self):
-        self.build()
-        self.pycmd_tests()
-
-    def pycmd_tests(self):
-        self.runCmd("command source py_import")
-
-        # Verify command that specifies eCommandRequiresTarget returns failure
-        # without a target.
-        self.expect('targetname',
-                    substrs=['a.out'], matching=False, error=True)
-
-        exe = self.getBuildArtifact("a.out")
-        self.expect("file " + exe,
-                    patterns=["Current executable set to .*a.out"])
-
-        self.expect('targetname',
-                    substrs=['a.out'], matching=True, error=False)
-
-        # This is the function to remove the custom commands in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('command script delete welcome', check=False)
-            self.runCmd('command script delete targetname', check=False)
-            self.runCmd('command script delete longwait', check=False)
-            self.runCmd('command script delete mysto', check=False)
-            self.runCmd('command script delete tell_sync', check=False)
-            self.runCmd('command script delete tell_async', check=False)
-            self.runCmd('command script delete tell_curr', check=False)
-            self.runCmd('command script delete bug11569', check=False)
-            self.runCmd('command script delete takes_exe_ctx', check=False)
-            self.runCmd('command script delete decorated', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # Interact with debugger in synchronous mode
-        self.setAsync(False)
-
-        # We don't want to display the stdout if not in TraceOn() mode.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        self.expect('welcome Enrico',
-                    substrs=['Hello Enrico, welcome to LLDB'])
-
-        self.expect("help welcome",
-                    substrs=['Just a docstring for welcome_impl',
-                             'A command that says hello to LLDB users'])
-
-        decorated_commands = ["decorated" + str(n) for n in range(1, 5)]
-        for name in decorated_commands:
-            self.expect(name, substrs=["hello from " + name])
-            self.expect("help " + name,
-                        substrs=["Python command defined by @lldb.command"])
-
-        self.expect("help",
-                    substrs=['For more information run',
-                             'welcome'] + decorated_commands)
-
-        self.expect("help -a",
-                    substrs=['For more information run',
-                             'welcome'] + decorated_commands)
-
-        self.expect("help -u", matching=False,
-                    substrs=['For more information run'])
-
-        self.runCmd("command script delete welcome")
-
-        self.expect('welcome Enrico', matching=False, error=True,
-                    substrs=['Hello Enrico, welcome to LLDB'])
-
-        self.expect('targetname fail', error=True,
-                    substrs=['a test for error in command'])
-
-        self.expect('command script list',
-                    substrs=['targetname',
-                             'For more information run'])
-
-        self.expect("help targetname",
-                    substrs=['Expects', '\'raw\'', 'input',
-                             'help', 'raw-input'])
-
-        self.expect("longwait",
-                    substrs=['Done; if you saw the delays I am doing OK'])
-
-        self.runCmd("b main")
-        self.runCmd("run")
-        self.runCmd("mysto 3")
-        self.expect("frame variable array",
-                    substrs=['[0] = 79630', '[1] = 388785018', '[2] = 0'])
-        self.runCmd("mysto 3")
-        self.expect("frame variable array",
-                    substrs=['[0] = 79630', '[4] = 388785018', '[5] = 0'])
-
-# we cannot use the stepover command to check for async execution mode since LLDB
-# seems to get confused when events start to queue up
-        self.expect("tell_sync",
-                    substrs=['running sync'])
-        self.expect("tell_async",
-                    substrs=['running async'])
-        self.expect("tell_curr",
-                    substrs=['I am running sync'])
-
-# check that the execution context is passed in to commands that ask for it
-        self.expect("takes_exe_ctx", substrs=["a.out"])
-
-        # Test that a python command can redefine itself
-        self.expect('command script add -f foobar welcome -h "just some help"')
-
-        self.runCmd("command script clear")
-
-        # Test that re-defining an existing command works
-        self.runCmd(
-            'command script add my_command --class welcome.WelcomeCommand')
-        self.expect('my_command Blah', substrs=['Hello Blah, welcome to LLDB'])
-
-        self.runCmd(
-            'command script add my_command --class welcome.TargetnameCommand')
-        self.expect('my_command', substrs=['a.out'])
-
-        self.runCmd("command script clear")
-
-        self.expect('command script list', matching=False,
-                    substrs=['targetname',
-                             'longwait'])
-
-        self.expect('command script add -f foobar frame', error=True,
-                    substrs=['cannot add command'])
-
-        # http://llvm.org/bugs/show_bug.cgi?id=11569
-        # LLDBSwigPythonCallCommand crashes when a command script returns an
-        # object
-        self.runCmd('command script add -f bug11569 bug11569')
-        # This should not crash.
-        self.runCmd('bug11569', check=False)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/Makefile
deleted file mode 100644
index 9374aef..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-EXE := hello_world
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py
deleted file mode 100644
index 01e7902..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/TestImport.py
+++ /dev/null
@@ -1,79 +0,0 @@
-"""Test custom import command to import files by path."""
-
-from __future__ import print_function
-
-
-import os
-import sys
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ImportTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_import_command(self):
-        """Import some Python scripts by path and test them"""
-        self.run_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    def run_test(self):
-        """Import some Python scripts by path and test them."""
-
-        # This is the function to remove the custom commands in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('command script delete foo2cmd', check=False)
-            self.runCmd('command script delete foocmd', check=False)
-            self.runCmd('command script delete foobarcmd', check=False)
-            self.runCmd('command script delete barcmd', check=False)
-            self.runCmd('command script delete barothercmd', check=False)
-            self.runCmd('command script delete TPcommandA', check=False)
-            self.runCmd('command script delete TPcommandB', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("command script import ./foo/foo.py --allow-reload")
-        self.runCmd("command script import ./foo/foo2.py --allow-reload")
-        self.runCmd("command script import ./foo/bar/foobar.py --allow-reload")
-        self.runCmd("command script import ./bar/bar.py --allow-reload")
-
-        self.expect("command script import ./nosuchfile.py",
-                    error=True, startstr='error: module importing failed')
-        self.expect("command script import ./nosuchfolder/",
-                    error=True, startstr='error: module importing failed')
-        self.expect("command script import ./foo/foo.py", error=False)
-
-        self.runCmd("command script import --allow-reload ./thepackage")
-        self.expect("TPcommandA", substrs=["hello world A"])
-        self.expect("TPcommandB", substrs=["hello world B"])
-
-        self.runCmd("script import dummymodule")
-        self.expect("command script import ./dummymodule.py", error=False)
-        self.expect(
-            "command script import --allow-reload ./dummymodule.py",
-            error=False)
-
-        self.runCmd("command script add -f foo.foo_function foocmd")
-        self.runCmd("command script add -f foobar.foo_function foobarcmd")
-        self.runCmd("command script add -f bar.bar_function barcmd")
-        self.expect("foocmd hello",
-                    substrs=['foo says', 'hello'])
-        self.expect("foo2cmd hello",
-                    substrs=['foo2 says', 'hello'])
-        self.expect("barcmd hello",
-                    substrs=['barutil says', 'bar told me', 'hello'])
-        self.expect("barothercmd hello",
-                    substrs=['barutil says', 'bar told me', 'hello'])
-        self.expect("foobarcmd hello",
-                    substrs=['foobar says', 'hello'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/Makefile
deleted file mode 100644
index 7913aaa..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../../make
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
deleted file mode 100644
index 01fd513..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/import/rdar-12586188/TestRdar12586188.py
+++ /dev/null
@@ -1,39 +0,0 @@
-"""Check that we handle an ImportError in a special way when command script importing files."""
-
-from __future__ import print_function
-
-
-import os
-import sys
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class Rdar12586188TestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_rdar12586188_command(self):
-        """Check that we handle an ImportError in a special way when command script importing files."""
-        self.run_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    def run_test(self):
-        """Check that we handle an ImportError in a special way when command script importing files."""
-
-        self.expect(
-            "command script import ./fail12586188.py --allow-reload",
-            error=True,
-            substrs=['raise ImportError("I do not want to be imported")'])
-        self.expect(
-            "command script import ./fail212586188.py --allow-reload",
-            error=True,
-            substrs=['raise ValueError("I do not want to be imported")'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/mysto.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/mysto.py
deleted file mode 100644
index 88a20cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/mysto.py
+++ /dev/null
@@ -1,25 +0,0 @@
-from __future__ import print_function
-
-import lldb
-import sys
-import os
-import time
-
-
-def StepOver(debugger, args, result, dict):
-    """
-    Step over a given number of times instead of only just once
-    """
-    arg_split = args.split(" ")
-    print(type(arg_split))
-    count = int(arg_split[0])
-    for i in range(0, count):
-        debugger.GetSelectedTarget().GetProcess(
-        ).GetSelectedThread().StepOver(lldb.eOnlyThisThread)
-        print("step<%d>" % i)
-
-
-def __lldb_init_module(debugger, session_dict):
-    # by default, --synchronicity is set to synchronous
-    debugger.HandleCommand("command script add -f mysto.StepOver mysto")
-    return None
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/py_import b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/py_import
deleted file mode 100644
index 6c1f7b8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script/py_import
+++ /dev/null
@@ -1,13 +0,0 @@
-script import sys, os
-script sys.path.append(os.path.join(os.getcwd(), os.pardir))
-script import welcome
-script import bug11569
-command script add welcome --class welcome.WelcomeCommand
-command script add targetname --class welcome.TargetnameCommand
-command script add longwait --function welcome.print_wait_impl
-command script import mysto.py --allow-reload
-command script add tell_sync --function welcome.check_for_synchro --synchronicity sync
-command script add tell_async --function welcome.check_for_synchro --synchronicity async
-command script add tell_curr --function welcome.check_for_synchro --synchronicity curr
-command script add takes_exe_ctx --function welcome.takes_exe_ctx
-command script import decorated.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script_alias/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script_alias/.categories
deleted file mode 100644
index 3a3f4df..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script_alias/.categories
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script_alias/TestCommandScriptAlias.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script_alias/TestCommandScriptAlias.py
deleted file mode 100644
index eb63c70..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script_alias/TestCommandScriptAlias.py
+++ /dev/null
@@ -1,40 +0,0 @@
-"""
-Test lldb Python commands.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.lldbtest import *
-
-
-class CommandScriptAliasTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        self.pycmd_tests()
-
-    def pycmd_tests(self):
-        self.runCmd("command script import tcsacmd.py")
-        self.runCmd("command script add -f tcsacmd.some_command_here attach")
-
-        # This is the function to remove the custom commands in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('command script delete attach', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        # We don't want to display the stdout if not in TraceOn() mode.
-        if not self.TraceOn():
-            self.HideStdout()
-
-        self.expect('attach a', substrs=['Victory is mine'])
-        self.runCmd("command script delete attach")
-        # this can't crash but we don't care whether the actual attach works
-        self.runCmd('attach noprocessexistswiththisname', check=False)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script_alias/tcsacmd.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script_alias/tcsacmd.py
deleted file mode 100644
index d5bb613..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_script_alias/tcsacmd.py
+++ /dev/null
@@ -1,12 +0,0 @@
-from __future__ import print_function
-import lldb
-import sys
-
-
-def some_command_here(debugger, command, result, d):
-    if command == "a":
-        print("Victory is mine", file=result)
-        return True
-    else:
-        print("Sadness for all", file=result)
-        return False
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/.categories
deleted file mode 100644
index 3a3f4df..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/.categories
+++ /dev/null
@@ -1 +0,0 @@
-cmdline
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/TestCommandSource.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/TestCommandSource.py
deleted file mode 100644
index 383f2d7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/command_source/TestCommandSource.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Test that lldb command "command source" works correctly.
-"""
-
-from __future__ import print_function
-
-
-import os
-import sys
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class CommandSourceTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_command_source(self):
-        """Test that lldb command "command source" works correctly."""
-
-        # Sourcing .lldb in the current working directory, which in turn imports
-        # the "my" package that defines the date() function.
-        self.runCmd("command source .lldb")
-
-        # Python should evaluate "my.date()" successfully.
-        command_interpreter = self.dbg.GetCommandInterpreter()
-        self.assertTrue(command_interpreter, VALID_COMMAND_INTERPRETER)
-        result = lldb.SBCommandReturnObject()
-        command_interpreter.HandleCommand("script my.date()", result)
-
-        import datetime
-        self.expect(result.GetOutput(), "script my.date() runs successfully",
-                    exe=False,
-                    substrs=[str(datetime.date.today())])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
index c073425..26c70c1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/TestCompletion.py
@@ -2,7 +2,6 @@
 Test the lldb command line completion mechanism.
 """
 
-from __future__ import print_function
 
 
 import os
@@ -84,6 +83,94 @@
             'process attach --con',
             'process attach --continue ')
 
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_process_launch_arch(self):
+        self.complete_from_to('process launch --arch ',
+                              ['mips',
+                               'arm64'])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_ambiguous_long_opt(self):
+        self.completions_match('breakpoint modify --th',
+                               ['--thread-id',
+                                '--thread-index',
+                                '--thread-name'])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_plugin_load(self):
+        self.complete_from_to('plugin load ', [])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_log_enable(self):
+        self.complete_from_to('log enable ll', ['lldb'])
+        self.complete_from_to('log enable dw', ['dwarf'])
+        self.complete_from_to('log enable lldb al', ['all'])
+        self.complete_from_to('log enable lldb sym', ['symbol'])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_log_enable(self):
+        self.complete_from_to('log disable ll', ['lldb'])
+        self.complete_from_to('log disable dw', ['dwarf'])
+        self.complete_from_to('log disable lldb al', ['all'])
+        self.complete_from_to('log disable lldb sym', ['symbol'])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_log_list(self):
+        self.complete_from_to('log list ll', ['lldb'])
+        self.complete_from_to('log list dw', ['dwarf'])
+        self.complete_from_to('log list ll', ['lldb'])
+        self.complete_from_to('log list lldb dwa', ['dwarf'])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_quoted_command(self):
+        self.complete_from_to('"set',
+                              ['"settings" '])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_quoted_arg_with_quoted_command(self):
+        self.complete_from_to('"settings" "repl',
+                              ['"replace" '])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_quoted_arg_without_quoted_command(self):
+        self.complete_from_to('settings "repl',
+                              ['"replace" '])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_single_quote_command(self):
+        self.complete_from_to("'set",
+                              ["'settings' "])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_terminated_quote_command(self):
+        # This should not crash, but we don't get any
+        # reasonable completions from this.
+        self.complete_from_to("'settings'", [])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_process_launch_arch_arm(self):
+        self.complete_from_to('process launch --arch arm',
+                              ['arm64'])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_target_symbols_add_shlib(self):
+        # Doesn't seem to work, but at least it shouldn't crash.
+        self.complete_from_to('target symbols add --shlib ', [])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_log_file(self):
+        # Complete in our source directory which contains a 'main.cpp' file.
+        src_dir =  os.path.dirname(os.path.realpath(__file__)) + '/'
+        self.complete_from_to('log enable lldb expr -f ' + src_dir,
+                              ['main.cpp'])
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_log_dir(self):
+        # Complete our source directory.
+        src_dir =  os.path.dirname(os.path.realpath(__file__))
+        self.complete_from_to('log enable lldb expr -f ' + src_dir,
+                              [src_dir + os.sep], turn_off_re_match=True)
+
     # <rdar://problem/11052829>
     @skipIfFreeBSD  # timing out on the FreeBSD buildbot
     def test_infinite_loop_while_completing(self):
@@ -163,6 +250,24 @@
             'settings replace target.run-args')
 
     @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_settings_show_term(self):
+        self.complete_from_to(
+            'settings show term-',
+            'settings show term-width')
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_settings_list_term(self):
+        self.complete_from_to(
+            'settings list term-',
+            'settings list term-width')
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
+    def test_settings_remove_term(self):
+        self.complete_from_to(
+            'settings remove term-',
+            'settings remove term-width')
+
+    @skipIfFreeBSD  # timing out on the FreeBSD buildbot
     def test_settings_s(self):
         """Test that 'settings s' completes to ['set', 'show']."""
         self.complete_from_to(
@@ -278,7 +383,7 @@
         """Test descriptions of top-level command completions"""
         self.check_completion_with_desc("", [
             ["command", "Commands for managing custom LLDB commands."],
-            ["bugreport", "Commands for creating domain-specific bug reports."]
+            ["breakpoint", "Commands for operating on breakpoints (see 'help b' for shorthand.)"]
         ])
 
         self.check_completion_with_desc("pl", [
@@ -290,6 +395,30 @@
         self.check_completion_with_desc("comman", [])
         self.check_completion_with_desc("non-existent-command", [])
 
+    def test_completion_description_command_options(self):
+        """Test descriptions of command options"""
+        # Short options
+        self.check_completion_with_desc("breakpoint set -", [
+            ["-h", "Set the breakpoint on exception catcH."],
+            ["-w", "Set the breakpoint on exception throW."]
+        ])
+
+        # Long options.
+        self.check_completion_with_desc("breakpoint set --", [
+            ["--on-catch", "Set the breakpoint on exception catcH."],
+            ["--on-throw", "Set the breakpoint on exception throW."]
+        ])
+
+        # Ambiguous long options.
+        self.check_completion_with_desc("breakpoint set --on-", [
+            ["--on-catch", "Set the breakpoint on exception catcH."],
+            ["--on-throw", "Set the breakpoint on exception throW."]
+        ])
+
+        # Unknown long option.
+        self.check_completion_with_desc("breakpoint set --Z", [
+        ])
+
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
     def test_symbol_name(self):
         self.build()
@@ -297,3 +426,6 @@
         self.complete_from_to('breakpoint set -n Fo',
                               'breakpoint set -n Foo::Bar(int,\\ int)',
                               turn_off_re_match=True)
+        # No completion for Qu because the candidate is
+        # (anonymous namespace)::Quux().
+        self.complete_from_to('breakpoint set -n Qu', '')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/main.cpp
index 0814bb9..eba81dc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/completion/main.cpp
@@ -7,6 +7,8 @@
     }
 };
 
+namespace { int Quux (void) { return 0; } }
+
 struct Container { int MemberVar; };
 
 int main()
@@ -17,5 +19,6 @@
 
     Container container;
     Container *ptr_container = &container;
+    int q = Quux();
     return container.MemberVar = 3; // Break here
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py
index 7b12395..cc48a63 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/TestConditionalBreak.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/conditional_break.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/conditional_break.py
index a62dd92..4f27464 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/conditional_break.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/conditional_break/conditional_break.py
@@ -1,4 +1,3 @@
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py
index f65b1b8..6e6607a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/basic/TestDarwinLogBasic.py
@@ -7,7 +7,6 @@
 """
 
 # System imports
-from __future__ import print_function
 
 # LLDB imports
 from lldbsuite.test import darwin_log
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/TestDarwinLogFilterMatchActivityChain.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/TestDarwinLogFilterMatchActivityChain.py
index c8f93c1..c1dfd15 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/TestDarwinLogFilterMatchActivityChain.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity-chain/TestDarwinLogFilterMatchActivityChain.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/TestDarwinLogFilterMatchActivity.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/TestDarwinLogFilterMatchActivity.py
index 32b2623..f2587b1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/TestDarwinLogFilterMatchActivity.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/activity/TestDarwinLogFilterMatchActivity.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/TestDarwinLogFilterMatchCategory.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/TestDarwinLogFilterMatchCategory.py
index 088d103..f65b6fc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/TestDarwinLogFilterMatchCategory.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/category/TestDarwinLogFilterMatchCategory.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/TestDarwinLogFilterMatchMessage.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/TestDarwinLogFilterMatchMessage.py
index 5a377f9..0d0378a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/TestDarwinLogFilterMatchMessage.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/message/TestDarwinLogFilterMatchMessage.py
@@ -6,10 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
 import re
 
 from lldbsuite.test import decorators
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/TestDarwinLogFilterMatchSubsystem.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/TestDarwinLogFilterMatchSubsystem.py
index f3d4d4d..6fd94fa 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/TestDarwinLogFilterMatchSubsystem.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/exact_match/subsystem/TestDarwinLogFilterMatchSubsystem.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/TestDarwinLogFilterRegexActivityChain.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/TestDarwinLogFilterRegexActivityChain.py
index 16d678a..bec5a95 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/TestDarwinLogFilterRegexActivityChain.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity-chain/TestDarwinLogFilterRegexActivityChain.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/TestDarwinLogFilterRegexActivity.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/TestDarwinLogFilterRegexActivity.py
index e017d56..4a4c6a2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/TestDarwinLogFilterRegexActivity.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/activity/TestDarwinLogFilterRegexActivity.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/TestDarwinLogFilterRegexCategory.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/TestDarwinLogFilterRegexCategory.py
index 5a618b1..9633609 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/TestDarwinLogFilterRegexCategory.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/category/TestDarwinLogFilterRegexCategory.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/TestDarwinLogFilterRegexMessage.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/TestDarwinLogFilterRegexMessage.py
index eceedce..2cbdb4e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/TestDarwinLogFilterRegexMessage.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/message/TestDarwinLogFilterRegexMessage.py
@@ -7,9 +7,7 @@
 """
 
 # System imports
-from __future__ import print_function
 
-import re
 
 # LLDB imports
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/Makefile
index 4f4176f..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/TestDarwinLogFilterRegexSubsystem.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/TestDarwinLogFilterRegexSubsystem.py
index 679db2e..c5c4e98 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/TestDarwinLogFilterRegexSubsystem.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/filter/regex/subsystem/TestDarwinLogFilterRegexSubsystem.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/TestDarwinLogMessageFormat.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/TestDarwinLogMessageFormat.py
index 8c9e287..687340e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/TestDarwinLogMessageFormat.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/format/TestDarwinLogMessageFormat.py
@@ -6,7 +6,6 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
 import re
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile
index 214cedd..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py
index 8979109..57a0276 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/debug/TestDarwinLogSourceDebug.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile
index 214cedd..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py
index 865eea2..5a3eafa 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/darwin_log/source/info/TestDarwinLogSourceInfo.py
@@ -6,11 +6,8 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
-import re
 
 from lldbsuite.test import decorators
 from lldbsuite.test import lldbtest
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/TestArrayTypedef.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/TestArrayTypedef.py
new file mode 100644
index 0000000..1f2914a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/TestArrayTypedef.py
@@ -0,0 +1,15 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+
+
+class ArrayTypedefTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_array_typedef(self):
+        self.build()
+        lldbutil.run_to_source_breakpoint(self, "// break here",
+            lldb.SBFileSpec("main.cpp", False))
+        self.expect("expr str", substrs=['"abcd"'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/main.cpp
new file mode 100644
index 0000000..5c581b0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/array_typedef/main.cpp
@@ -0,0 +1,7 @@
+typedef char MCHAR;
+
+int main() {
+  MCHAR str[5] = "abcd";
+  return 0;  // break here
+}
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile
index 261658b..8763401 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 OBJCXX_SOURCES := main.mm
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
index 18aac23..25ecdef 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
index 9b06ad7..a537b99 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/Makefile
@@ -1,7 +1,4 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
+LD_EXTRAS := -framework Accelerate
+include Makefile.rules
 
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Accelerate
\ No newline at end of file
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py
index 891448f..1734428 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/compactvectors/TestCompactVectors.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
index 6d8a794..246ebb3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-advanced/TestDataFormatterAdv.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
@@ -138,6 +135,13 @@
         self.expect("frame variable int_array",
                     substrs=['1,2'])
 
+        # Test the patterns are matched in reverse-chronological order.
+        self.runCmd(
+            'type summary add --summary-string \"${var[2-3]}\" "int []"')
+
+        self.expect("frame variable int_array",
+                    substrs=['3,4'])
+
         self.runCmd("type summary clear")
 
         self.runCmd("type summary add -c -x \"i_am_cool \[[0-9]\]\"")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/Makefile
new file mode 100644
index 0000000..224ecc3
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := a.c b.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/TestDataFormatterCaching.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/TestDataFormatterCaching.py
new file mode 100644
index 0000000..881913b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/TestDataFormatterCaching.py
@@ -0,0 +1,24 @@
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+import lldbsuite.test.lldbutil as lldbutil
+
+
+class TestDataFormatterCaching(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def test_with_run_command(self):
+        """
+        Test that hardcoded summary formatter matches aren't improperly cached.
+        """
+        self.build()
+        target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
+            self, 'break here', lldb.SBFileSpec('a.c'))
+        valobj = self.frame().FindVariable('f')
+        self.assertEqual(valobj.GetValue(), '4')
+        bkpt_b = target.BreakpointCreateBySourceRegex('break here',
+                                                      lldb.SBFileSpec('b.c'))
+        lldbutil.continue_to_breakpoint(process, bkpt_b)
+        valobj = self.frame().FindVariable('f4')
+        self.assertEqual(valobj.GetSummary(), '(1, 2, 3, 4)')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/a.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/a.c
new file mode 100644
index 0000000..f2dde81
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/a.c
@@ -0,0 +1,9 @@
+typedef float float4;
+
+int a();
+
+int main() {
+  float4 f = 4.0f;
+  // break here
+  return a(); 
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/b.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/b.c
new file mode 100644
index 0000000..0d37c54
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-caching/b.c
@@ -0,0 +1,8 @@
+typedef float float4 __attribute__((ext_vector_type(4)));
+void stop() {}
+int a() {
+  float4 f4 = {1, 2, 3, 4};
+  // break here
+  stop();
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
index efc911f..07f7a53 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-categories/TestDataFormatterCategories.py
@@ -2,11 +2,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
-
-
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
index 4b9de96..733c427 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-cpp/TestDataFormatterCpp.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
index c451d0f..3df6027 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-disabling/TestDataFormatterDisabling.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py
index 2d09be5..ca57442 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-enum-format/TestDataFormatterEnumFormat.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
index 81ddf59..72fe2fb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
index 8b354d7..4e4c196 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-named-summaries/TestDataFormatterNamedSummaries.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/.categories
index 6326dbc..72cf07c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/.categories
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/.categories
@@ -1 +1 @@
-dataformatters,objc
+objc
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
index 9f7fb1c..8b322ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/ObjCDataFormatterTestCase.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/ObjCDataFormatterTestCase.py
index 8612f6a..c31af35 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/ObjCDataFormatterTestCase.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/ObjCDataFormatterTestCase.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCCF.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCCF.py
index 939ce93..8671146 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCCF.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCCF.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCExpr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCExpr.py
index 0778d9a..d27f0b9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCExpr.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCExpr.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCKVO.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCKVO.py
index dd2eb4e..fae51ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCKVO.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCKVO.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSBundle.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSBundle.py
index a9fff97..40acc19 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSBundle.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSBundle.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSContainer.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSContainer.py
index 1c9f635..2bd22ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSContainer.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSContainer.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSData.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSData.py
index a0f991c..37991dd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSData.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSData.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSDate.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSDate.py
index 991392b..a064dd7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSDate.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSDate.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSError.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSError.py
index ed4ae26..df380ae 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSError.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSError.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSURL.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSURL.py
index 21ab68c..e84818e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSURL.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCNSURL.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCPlain.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCPlain.py
index 1b2e0ac..f438245 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCPlain.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjCPlain.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjNSException.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjNSException.py
index 8447a50..6265c05 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjNSException.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjNSException.py
@@ -3,7 +3,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -25,11 +24,11 @@
             'frame variable except0 except1 except2 except3',
             substrs=[
                 '(NSException *) except0 = ',
-                'name: @"TheGuyWhoHasNoName" - reason: @"cuz it\'s funny"',
+                '@"First"',
                 '(NSException *) except1 = ',
-                'name: @"TheGuyWhoHasNoName~1" - reason: @"cuz it\'s funny"',
+                '@"Second"',
                 '(NSException *) except2 = ',
-                'name: @"TheGuyWhoHasNoName`2" - reason: @"cuz it\'s funny"',
+                ' @"Third"',
                 '(NSException *) except3 = ',
-                'name: @"TheGuyWhoHasNoName/3" - reason: @"cuz it\'s funny"'
+                ' @"Fourth"'
             ])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/Makefile
new file mode 100644
index 0000000..143997c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/Makefile
@@ -0,0 +1,6 @@
+OBJC_SOURCES := main.m
+
+CFLAGS_EXTRAS := -w
+
+LD_EXTRAS := -framework CoreMedia
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/TestDataFormatterCMTime.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/TestDataFormatterCMTime.py
new file mode 100644
index 0000000..4c3935c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/TestDataFormatterCMTime.py
@@ -0,0 +1,39 @@
+# encoding: utf-8
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class CMTimeDataFormatterTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    def test_nsindexpath_with_run_command(self):
+        """Test formatters for CMTime."""
+        self.build()
+        self.runCmd("file " + self.getBuildArtifact("a.out"),
+                    CURRENT_EXECUTABLE_SET)
+
+        line = line_number('main.m', '// break here')
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.m", line, num_expected_locations=1, loc_exact=True)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.expect(
+            "thread list",
+            STOPPED_DUE_TO_BREAKPOINT,
+            substrs=['stopped', 'stop reason = breakpoint'])
+
+        self.expect(
+            'frame variable t1',
+            substrs=[
+                '1 10th of a second', 'value = 1', 'timescale = 10',
+                'epoch = 0'
+            ])
+        self.expect(
+            'frame variable t2',
+            substrs=['10 seconds', 'value = 10', 'timescale = 1', 'epoch = 0'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/main.m
new file mode 100644
index 0000000..ecf7648
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/cmtime/main.m
@@ -0,0 +1,22 @@
+//===-- main.m ------------------------------------------------*- ObjC -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#import <CoreMedia/CoreMedia.h>
+
+int main(int argc, const char **argv)
+{
+    @autoreleasepool
+    {
+        CMTime t1 = CMTimeMake(1, 10);
+        CMTime t2 = CMTimeMake(10, 1);
+
+        CMTimeShow(t1); // break here
+        CMTimeShow(t2);
+    }
+    return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m
index a370a48..f0dc205 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m
@@ -492,10 +492,10 @@
 	        nsurl0 = [bundle bundleURL];
 	    }
 
-	    NSException* except0 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName" reason:@"cuz it's funny" userInfo:nil];
-	    NSException* except1 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName~1" reason:@"cuz it's funny" userInfo:nil];
-	    NSException* except2 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName`2" reason:@"cuz it's funny" userInfo:nil];
-	    NSException* except3 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName/3" reason:@"cuz it's funny" userInfo:nil];
+	    NSException* except0 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName" reason:@"First" userInfo:nil];
+	    NSException* except1 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName~1" reason:@"Second" userInfo:nil];
+	    NSException* except2 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName`2" reason:@"Third" userInfo:nil];
+	    NSException* except3 = [[NSException alloc] initWithName:@"TheGuyWhoHasNoName/3" reason:@"Fourth" userInfo:nil];
 
 	    NSURL *nsurl = [[NSURL alloc] initWithString:@"http://www.foo.bar"];
 	    NSURL *nsurl2 = [NSURL URLWithString:@"page.html" relativeToURL:nsurl];
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
index 0d94c22..8b322ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../../make
-
 OBJC_SOURCES := main.m
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py
index 605b543..12461ab 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsindexpath/TestDataFormatterNSIndexPath.py
@@ -3,12 +3,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import datetime
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -46,7 +42,7 @@
 
     @skipUnlessDarwin
     @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656605")
-    @expectedFailureAll(archs=['armv7', 'armv7k'], bugnumber="rdar://problem/34561607") # NSIndexPath formatter isn't working for 32-bit arm
+    @expectedFailureAll(archs=['armv7', 'armv7k', 'arm64_32'], bugnumber="rdar://problem/34561607") # NSIndexPath formatter isn't working for 32-bit arm
     def test_nsindexpath_with_run_command(self):
         """Test formatters for NSIndexPath."""
         self.appkit_tester_impl(self.nsindexpath_data_formatter_commands)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
index 0d94c22..8b322ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../../make
-
 OBJC_SOURCES := main.m
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py
index 497a446..6480025 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/nsstring/TestDataFormatterNSString.py
@@ -3,12 +3,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import datetime
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
index 9f7fb1c..8b322ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py
index 2c50411..4611e16 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-proper-plurals/TestFormattersOneIsSingular.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
index 397a461..b3c794f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-ptr-to-array/TestPtrToArrayFormatting.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
index cc4cfd2..5f908f7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-python-synth/TestDataFormatterPythonSynth.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
index 1dd1912..14387cd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-script/TestDataFormatterScript.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
index 637404f..6bfb97c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/Makefile
@@ -1,8 +1,7 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 USE_LIBSTDCPP := 0
 
-include $(LEVEL)/Makefile.rules
 
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
index 4ec7f13..fa13e92 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
@@ -2,11 +2,7 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
-
-
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
index e4ca603..0f98eb3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
index fdd7171..b016f00 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/Makefile
@@ -1,5 +1,5 @@
-LEVEL = ../../../../../make
 CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py
index 1f7a175..48e77c1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/atomic/TestLibCxxAtomic.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile
index bf75013..680e1ab 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py
index a0da4e4..26f1972 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/bitset/TestDataFormatterLibcxxBitset.py
@@ -2,7 +2,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile
index bf75013..680e1ab 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py
index 1cc454a..a9983dd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/forward_list/TestDataFormatterLibcxxForwardList.py
@@ -2,7 +2,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
index fdd7171..b016f00 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/Makefile
@@ -1,5 +1,5 @@
-LEVEL = ../../../../../make
 CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
index 0254bf5..9f0d3e4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/TestLibCxxFunction.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -17,11 +14,23 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def get_variable(self, name):
-        var = self.frame().FindVariable(name)
-        var.SetPreferDynamicValue(lldb.eDynamicCanRunTarget)
-        var.SetPreferSyntheticValue(True)
-        return var
+    # Run frame var for a variable twice. Verify we do not hit the cache
+    # the first time but do the second time.
+    def run_frame_var_check_cache_use(self, variable, result_to_match, skip_find_function=False):
+        self.runCmd("log timers reset")
+        self.expect("frame variable " + variable,
+                    substrs=[variable + " =  " + result_to_match])
+        if not skip_find_function:
+          self.expect("log timers dump",
+                   substrs=["lldb_private::CompileUnit::FindFunction"])
+
+        self.runCmd("log timers reset")
+        self.expect("frame variable " + variable,
+                    substrs=[variable + " =  " + result_to_match])
+        self.expect("log timers dump",
+                   matching=False,
+                   substrs=["lldb_private::CompileUnit::FindFunction"])
+
 
     @add_test_categories(["libc++"])
     def test(self):
@@ -40,17 +49,24 @@
                     substrs=['stopped',
                              'stop reason = breakpoint'])
 
+        self.run_frame_var_check_cache_use("foo2_f", "Lambda in File main.cpp at Line 30")
+
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
+
+        self.run_frame_var_check_cache_use("add_num2_f", "Lambda in File main.cpp at Line 21")
+
+        lldbutil.continue_to_breakpoint(self.process(), bkpt)
+
+        self.run_frame_var_check_cache_use("f2", "Lambda in File main.cpp at Line 43")
+        self.run_frame_var_check_cache_use("f3", "Lambda in File main.cpp at Line 47", True)
+        # TODO reenable this case when std::function formatter supports
+        # general callable object case.
+        #self.run_frame_var_check_cache_use("f4", "Function in File main.cpp at Line 16")
+
+        # These cases won't hit the cache at all but also don't require
+        # an expensive lookup.
         self.expect("frame variable f1",
                     substrs=['f1 =  Function = foo(int, int)'])
 
-        self.expect("frame variable f2",
-                    substrs=['f2 =  Lambda in File main.cpp at Line 26'])
-
-        self.expect("frame variable f3",
-                    substrs=['f3 =  Lambda in File main.cpp at Line 30'])
-
-        self.expect("frame variable f4",
-                    substrs=['f4 =  Function in File main.cpp at Line 16'])
-
         self.expect("frame variable f5",
                     substrs=['f5 =  Function = Bar::add_num(int) const'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
index b78161d..d0c931d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/function/main.cpp
@@ -17,8 +17,25 @@
        return 66 ;
    }
    int add_num(int i) const { return i + 3 ; }
+   int add_num2(int i) {
+     std::function<int (int)> add_num2_f = [](int x) {
+         return x+1;
+      };
+
+      return add_num2_f(i); // Set break point at this line.
+   }
 } ;
 
+int foo2() {
+   auto f = [](int x) {
+       return x+1;
+   };
+
+   std::function<int (int)> foo2_f = f;
+
+   return foo2_f(10); // Set break point at this line.
+}
+
 int main (int argc, char *argv[])
 {
   int acc = 42;
@@ -35,5 +52,8 @@
   std::function<int ()> f4( bar1 ) ;
   std::function<int (const Bar&, int)> f5 = &Bar::add_num;
 
+  int foo2_result = foo2();
+  int bar_add_num2_result = bar1.add_num2(10);
+
   return f1(acc,acc) + f2(acc) + f3(acc+1,acc+2) + f4() + f5(bar1, 10); // Set break point at this line.
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
index d37bef7..e78030c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../../../make
 CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
-include $(LEVEL)/Makefile.rules
+CXXFLAGS_EXTRAS := -std=c++11
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
index 9c9b247..5fef10e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/initializerlist/TestInitializerList.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
index 1f609a4..564cbad 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
index b36fa6e..2ff3d63 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/iterator/TestDataFormatterLibccIterator.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
index 1f609a4..564cbad 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
index 957f2bf..3a2d006 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/TestDataFormatterLibcxxList.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
index a5dabdb..564cbad 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py
index d76c43e..1678c51 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/list/loop/TestDataFormatterLibcxxListLoop.py
@@ -3,12 +3,8 @@
 corruption).
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
index 1f609a4..564cbad 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
index 0f57f0a..d9da0c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/map/TestDataFormatterLibccMap.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -54,13 +51,26 @@
         self.addTearDownHook(cleanup)
 
         ns = self.namespace
-        self.expect('frame variable ii',
+        self.expect('p ii',
+                    substrs=['%s::map' % ns,
+                             'size=0',
+                             '{}'])
+        self.expect('frame var ii',
                     substrs=['%s::map' % ns,
                              'size=0',
                              '{}'])
 
         lldbutil.continue_to_breakpoint(self.process(), bkpt)
 
+        self.expect('p ii',
+                    substrs=['%s::map' % ns, 'size=2',
+                             '[0] = ',
+                             'first = 0',
+                             'second = 0',
+                             '[1] = ',
+                             'first = 1',
+                             'second = 1'])
+
         self.expect('frame variable ii',
                     substrs=['%s::map' % ns, 'size=2',
                              '[0] = ',
@@ -83,7 +93,7 @@
 
         lldbutil.continue_to_breakpoint(self.process(), bkpt)
 
-        self.expect("frame variable ii",
+        self.expect("p ii",
                     substrs=['%s::map' % ns, 'size=8',
                              '[5] = ',
                              'first = 5',
@@ -92,7 +102,7 @@
                              'first = 7',
                              'second = 1'])
 
-        self.expect("p ii",
+        self.expect("frame var ii",
                     substrs=['%s::map' % ns, 'size=8',
                              '[5] = ',
                              'first = 5',
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
index 1f609a4..564cbad 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
index cbcce47..39adc04 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multimap/TestDataFormatterLibccMultiMap.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
index 1f609a4..564cbad 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
index 0732c03..621b22a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/multiset/TestDataFormatterLibcxxMultiSet.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
index 19d6fc3..23496eb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -std=c++17 -fno-exceptions
+
+CXXFLAGS_EXTRAS := -std=c++17 -fno-exceptions
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py
index 7826305..f013d02 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/optional/TestDataFormatterLibcxxOptional.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile
index bf75013..680e1ab 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py
index f9eb4d8..b163fa5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/queue/TestDataFormatterLibcxxQueue.py
@@ -2,7 +2,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
index 1f609a4..564cbad 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
index 8d83f2b..738df85 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/set/TestDataFormatterLibcxxSet.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
index 937b47e..c7c91da 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -std=c++11 -O0
+
+CXXFLAGS_EXTRAS := -std=c++11 -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
index 63164f7..8943b25 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
@@ -3,11 +3,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -61,16 +58,25 @@
         self.expect(
             "frame variable",
             substrs=[
+                '(%s::wstring) wempty = L""'%ns,
                 '(%s::wstring) s = L"hello world! מזל טוב!"'%ns,
                 '(%s::wstring) S = L"!!!!"'%ns,
                 '(const wchar_t *) mazeltov = 0x',
                 'L"מזל טוב"',
+                '(%s::string) empty = ""'%ns,
                 '(%s::string) q = "hello world"'%ns,
                 '(%s::string) Q = "quite a long std::strin with lots of info inside it"'%ns,
                 '(%s::string) IHaveEmbeddedZeros = "a\\0b\\0c\\0d"'%ns,
                 '(%s::wstring) IHaveEmbeddedZerosToo = L"hello world!\\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監"'%ns,
                 '(%s::u16string) u16_string = u"ß水氶"'%ns,
-                '(%s::u32string) u32_string = U"🍄🍅🍆🍌"'%ns])
+                # FIXME: This should have a 'u' prefix.
+                '(%s::u16string) u16_empty = ""'%ns,
+                '(%s::u32string) u32_string = U"🍄🍅🍆🍌"'%ns,
+                # FIXME: This should have a 'U' prefix.
+                '(%s::u32string) u32_empty = ""'%ns,
+                '(%s::basic_string<unsigned char, %s::char_traits<unsigned char>, '
+                '%s::allocator<unsigned char> >) uchar = "aaaaa"'%(ns,ns,ns),
+        ])
 
         self.runCmd("n")
 
@@ -90,10 +96,11 @@
             cappedSummary.find("someText") <= 0,
             "cappedSummary includes the full string")
 
+        self.expect_expr("s", result_type=ns+"::wstring", result_summary='L"hello world! מזל טוב!"')
+
         self.expect(
             "frame variable",
             substrs=[
-                '(%s::wstring) s = L"hello world! מזל טוב!"'%ns,
                 '(%s::wstring) S = L"!!!!!"'%ns,
                 '(const wchar_t *) mazeltov = 0x',
                 'L"מזל טוב"',
@@ -102,4 +109,8 @@
                 '(%s::string) IHaveEmbeddedZeros = "a\\0b\\0c\\0d"'%ns,
                 '(%s::wstring) IHaveEmbeddedZerosToo = L"hello world!\\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監"'%ns,
                 '(%s::u16string) u16_string = u"ß水氶"'%ns,
-                '(%s::u32string) u32_string = U"🍄🍅🍆🍌"'%ns])
+                '(%s::u32string) u32_string = U"🍄🍅🍆🍌"'%ns,
+                '(%s::u32string) u32_empty = ""'%ns,
+                '(%s::basic_string<unsigned char, %s::char_traits<unsigned char>, '
+                '%s::allocator<unsigned char> >) uchar = "aaaaa"'%(ns,ns,ns),
+        ])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp
index 838a4c7..afb56e6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/string/main.cpp
@@ -2,16 +2,21 @@
 
 int main()
 {
+    std::wstring wempty(L"");
     std::wstring s(L"hello world! מזל טוב!");
     std::wstring S(L"!!!!");
     const wchar_t *mazeltov = L"מזל טוב";
+    std::string empty("");
     std::string q("hello world");
     std::string Q("quite a long std::strin with lots of info inside it");
     std::string TheVeryLongOne("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890someText1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
     std::string IHaveEmbeddedZeros("a\0b\0c\0d",7);
     std::wstring IHaveEmbeddedZerosToo(L"hello world!\0てざ ル゜䋨ミ㠧槊 きゅへ狦穤襩 じゃ馩リョ 䤦監", 38);
     std::u16string u16_string(u"ß水氶");
+    std::u16string u16_empty(u"");
     std::u32string u32_string(U"🍄🍅🍆🍌");
+    std::u32string u32_empty(U"");
+    std::basic_string<unsigned char> uchar(5, 'a');
     S.assign(L"!!!!!"); // Set break point at this line.
     return 0;
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile
index bf75013..680e1ab 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py
index b255400..57b7778 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py
@@ -2,7 +2,6 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
index 24d7c22..913a52f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/Makefile
@@ -1,12 +1,9 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 # Work around "exception specification in declaration does not match previous
 # declaration" errors present in older libc++ releases. This error was fixed in
 # the 3.8 release.
-CFLAGS_EXTRAS += -fno-exceptions
+CFLAGS_EXTRAS := -fno-exceptions
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
index 4c60e40..9566af0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/unordered/TestDataFormatterUnordered.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
index a6ea665..7eeff74 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -std=c++17
+
+CXXFLAGS_EXTRAS := -std=c++17
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py
index e1f6961..a2a6b74 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/variant/TestDataFormatterLibcxxVariant.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
index 637fa7e..d87cf7d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/Makefile
@@ -1,7 +1,4 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+include Makefile.rules
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
index 1aa93d7..67e0629 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vbool/TestDataFormatterLibcxxVBool.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
index 1f609a4..564cbad 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBCPP := 1
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -O0
+
+CXXFLAGS_EXTRAS := -O0
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
index 06d3cda..649c0fe 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libcxx/vector/TestDataFormatterLibcxxVector.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
index 2e8bcb9..c825977b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
-CFLAGS_EXTRAS += -O0
+CFLAGS_EXTRAS := -O0
 USE_LIBSTDCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
index 463e2a9..52387a4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/iterator/TestDataFormatterStdIterator.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
index 2e8bcb9..c825977b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
-CFLAGS_EXTRAS += -O0
+CFLAGS_EXTRAS := -O0
 USE_LIBSTDCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
index 7f37556..c65393f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/list/TestDataFormatterStdList.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile
index 17868d8..bf8e6b8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBSTDCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
index 267e3be..94d1b57 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile
index 63f2aaf..654e4b1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 CXXFLAGS := -O0
 USE_LIBSTDCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py
index 1ca4a15..df213a0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/smart_ptr/TestDataFormatterStdSmartPtr.py
@@ -2,10 +2,7 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
index 2e8bcb9..c825977b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
-CFLAGS_EXTRAS += -O0
+CFLAGS_EXTRAS := -O0
 USE_LIBSTDCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
index 042d9fb..fa0e4d1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/TestDataFormatterStdString.py
@@ -3,11 +3,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -54,28 +51,35 @@
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
 
+        var_wempty = self.frame().FindVariable('wempty')
         var_s = self.frame().FindVariable('s')
         var_S = self.frame().FindVariable('S')
         var_mazeltov = self.frame().FindVariable('mazeltov')
+        var_empty = self.frame().FindVariable('empty')
         var_q = self.frame().FindVariable('q')
         var_Q = self.frame().FindVariable('Q')
+        var_uchar = self.frame().FindVariable('uchar')
 
-        self.assertTrue(
-            var_s.GetSummary() == 'L"hello world! מזל טוב!"',
+        # TODO: This is currently broken
+        # self.assertEqual(var_wempty.GetSummary(), 'L""', "wempty summary wrong")
+        self.assertEqual(
+            var_s.GetSummary(), 'L"hello world! מזל טוב!"',
             "s summary wrong")
-        self.assertTrue(var_S.GetSummary() == 'L"!!!!"', "S summary wrong")
-        self.assertTrue(
-            var_mazeltov.GetSummary() == 'L"מזל טוב"',
+        self.assertEqual(var_S.GetSummary(), 'L"!!!!"', "S summary wrong")
+        self.assertEqual(
+            var_mazeltov.GetSummary(), 'L"מזל טוב"',
             "mazeltov summary wrong")
-        self.assertTrue(
-            var_q.GetSummary() == '"hello world"',
+        self.assertEqual(var_empty.GetSummary(), '""', "empty summary wrong")
+        self.assertEqual(
+            var_q.GetSummary(), '"hello world"',
             "q summary wrong")
-        self.assertTrue(
-            var_Q.GetSummary() == '"quite a long std::strin with lots of info inside it"',
+        self.assertEqual(
+            var_Q.GetSummary(), '"quite a long std::strin with lots of info inside it"',
             "Q summary wrong")
+        self.assertEqual(var_uchar.GetSummary(), '"aaaaa"', "u summary wrong")
 
         self.runCmd("next")
 
-        self.assertTrue(
-            var_S.GetSummary() == 'L"!!!!!"',
+        self.assertEqual(
+            var_S.GetSummary(), 'L"!!!!!"',
             "new S summary wrong")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp
index f6e56cf..7351919 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/string/main.cpp
@@ -2,11 +2,14 @@
 
 int main()
 {
+    std::wstring wempty(L"");
     std::wstring s(L"hello world! מזל טוב!");
     std::wstring S(L"!!!!");
     const wchar_t *mazeltov = L"מזל טוב";
+    std::string empty("");
     std::string q("hello world");
     std::string Q("quite a long std::strin with lots of info inside it");
+    std::basic_string<unsigned char> uchar(5, 'a');
     S.assign(L"!!!!!"); // Set break point at this line.
     return 0;
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile
index 17868d8..bf8e6b8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBSTDCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py
index 4f9047b..c71cffe 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/tuple/TestDataFormatterStdTuple.py
@@ -2,10 +2,7 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile
index 17868d8..bf8e6b8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 USE_LIBSTDCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py
index f782a2a..2ead4fa 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/unique_ptr/TestDataFormatterStdUniquePtr.py
@@ -2,10 +2,7 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
index 2e8bcb9..c825977b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
-CFLAGS_EXTRAS += -O0
+CFLAGS_EXTRAS := -O0
 USE_LIBSTDCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
index fb37838..5a767b3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vbool/TestDataFormatterStdVBool.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile
index 63f2aaf..654e4b1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../../../make
-
 CXX_SOURCES := main.cpp
 
 CXXFLAGS := -O0
 USE_LIBSTDCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
index 712de3d..27cdf1e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/vector/TestDataFormatterStdVector.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
index 0e3bcc0..51d42fc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synth/TestDataFormatterSynth.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py
index 8bb60b8..2c7d5b2d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthtype/TestDataFormatterSynthType.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
index 138b328..fc7ffa0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-synthval/TestDataFormatterSynthVal.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile
deleted file mode 100644
index 872bf6d..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
index 00eb3d0..8994831 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/format-propagation/TestFormatPropagation.py
@@ -2,11 +2,8 @@
 Check if changing Format on an SBValue correctly propagates that new format to children as it should
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py
index d750762..a6a61f1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/frameformat_smallstruct/TestFrameFormatSmallStruct.py
@@ -2,11 +2,8 @@
 Test that the user can input a format but it will not prevail over summary format's choices.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py
index cc22eca..80a02d06cf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/hexcaps/TestDataFormatterHexCaps.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/TestDataFormatterLanguageCategoryUpdates.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/TestDataFormatterLanguageCategoryUpdates.py
index 55855dc..62bd058 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/TestDataFormatterLanguageCategoryUpdates.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/language_category_updates/TestDataFormatterLanguageCategoryUpdates.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
index 9f7fb1c..8b322ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py
index 1ae5e40..466eb5d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsarraysynth/TestNSArraySynthetic.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
index 9f7fb1c..8b322ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
index 65e3264..b77d01a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nsdictionarysynth/TestNSDictionarySynthetic.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
index 9f7fb1c..8b322ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py
index a365702..2e8ca45 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/nssetsynth/TestNSSetSynthetic.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile
index 261658b..8763401 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 OBJCXX_SOURCES := main.mm
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py
index 8726508..c418008 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ostypeformatting/TestFormattersOsType.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/TestPrintArray.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/TestPrintArray.py
index 0bfd8df..c306264 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/TestPrintArray.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/parray/TestPrintArray.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile
index 261658b..8763401 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 OBJCXX_SOURCES := main.mm
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py
index 4326574..400607d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/poarray/TestPrintObjectArray.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
index d85e665..83eb77e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-CFLAGS_EXTRAS += -std=c++11
+CFLAGS_EXTRAS := -std=c++11
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py
index 862e2b5..b0f7002 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/ptr_ref_typedef/TestPtrRef2Typedef.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
index 5e01f4e..22ce744 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/pyobjsynthprovider/TestPyObjSynthProvider.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py
index 09888e1..1dc37c6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/refpointer-recursion/TestDataFormatterRefPtrRecursion.py
@@ -2,11 +2,8 @@
 Test that ValueObjectPrinter does not cause an infinite loop when a reference to a struct that contains a pointer to itself is printed.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/Makefile
deleted file mode 100644
index 62a57f6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-LEVEL = ../../../make
-OBJC_SOURCES := main.m
-include $(LEVEL)/Makefile.rules
-LDFLAGS += -framework Foundation
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile
deleted file mode 100644
index 872bf6d..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py
index f766699..88ec1ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/summary-string-onfail/Test-rdar-9974002.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py
index e94f6c4..53df271 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthcapping/TestSyntheticCapping.py
@@ -2,11 +2,8 @@
 Check for an issue where capping does not work because the Target pointer appears to be changing behind our backs
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
index a8e1853..3767ff1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/Makefile
@@ -1,12 +1,8 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
+CFLAGS_EXTRAS := -w
+LD_EXTRAS := -framework Foundation
 
-CFLAGS_EXTRAS += -w
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
+include Makefile.rules
 
 clean::
 	rm -rf $(wildcard *.o *.d *.dSYM *.log)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py
index 54e9a32..e9e570e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/synthupdate/TestSyntheticFilterRecompute.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py
index 1cc2a0e..e1dc52e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_arg/TestTypeSummaryListArg.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -17,10 +14,6 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     @no_debug_info_test
     def test_type_summary_list_with_arg(self):
         """Test that the 'type summary list' command handles command line arguments properly"""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/TestTypeSummaryListScript.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/TestTypeSummaryListScript.py
index 9435e80..7d70ad3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/TestTypeSummaryListScript.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/type_summary_list_script/TestTypeSummaryListScript.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/Makefile
deleted file mode 100644
index 3e2b018..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py
index d3cc4d9..ad4db01 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/user-format-vs-summary/TestUserFormatVsSummary.py
@@ -2,11 +2,8 @@
 Test that the user can input a format but it will not prevail over summary format's choices.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py
index f6dc47f..c1ec60e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/var-in-aggregate-misuse/TestVarInAggregateMisuse.py
@@ -2,11 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
index 670edad..c7391f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/varscript_formatting/TestDataFormatterVarScriptFormatting.py
@@ -2,12 +2,8 @@
 Test lldb data formatter subsystem.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import os.path
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py
index c1dc152..e4632af 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/vector-types/TestVectorTypesFormatting.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
index c60ecd4..3e7e139 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
 ifeq "$(OS)" ""
@@ -7,12 +5,16 @@
 endif
 
 ifeq "$(OS)" "Darwin"
-    LDFLAGS = $(CFLAGS) -Xlinker -dead_strip
+    LD_EXTRAS = -Xlinker -dead_strip
 else
-    CFLAGS += -fdata-sections -ffunction-sections
-    LDFLAGS = $(CFLAGS) -Wl,--gc-sections
+    CFLAGS_EXTRAS += -fdata-sections -ffunction-sections
+    ifeq "$(OS)" "Windows_NT"
+        LD_EXTRAS = -Xlinker /OPT:REF
+    else
+        LD_EXTRAS = -Wl,--gc-sections
+    endif
 endif
 
 MAKE_DSYM := NO
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py
index 9ba3d2d..bc1f3f8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dead-strip/TestDeadStrip.py
@@ -2,11 +2,8 @@
 Test that breakpoint works correctly in the presence of dead-code stripping.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -17,14 +14,7 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @expectedFailureAll(debug_info="dwo", bugnumber="llvm.org/pr25087")
-    @expectedFailureAll(
-        oslist=["linux"],
-        debug_info="gmodules",
-        bugnumber="llvm.org/pr27865")
-    # The -dead_strip linker option isn't supported on FreeBSD versions of ld.
-    @skipIfFreeBSD
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr44429")
     def test(self):
         """Test breakpoint works correctly with dead-code stripping."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py
index 8364f91..ed17d9b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/deleted-executable/TestDeletedExecutable.py
@@ -2,11 +2,9 @@
 Test process attach when executable was deleted.
 """
 
-from __future__ import print_function
 
 
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -18,7 +16,9 @@
     NO_DEBUG_INFO_TESTCASE = True
 
     @skipIfWindows # cannot delete a running executable
-    @expectedFailureAll(oslist=["linux"]) # determining the architecture of the process fails
+    @expectedFailureAll(oslist=["linux"],
+        triple=no_match('aarch64-.*-android'))
+        # determining the architecture of the process fails
     @expectedFailureNetBSD
     def test(self):
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
deleted file mode 100644
index 91b858b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/TestDisassembleBreakpoint.py
+++ /dev/null
@@ -1,41 +0,0 @@
-"""
-Test some lldb command abbreviations.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class DisassemblyTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test(self):
-        self.build()
-        target, _, _, bkpt = lldbutil.run_to_source_breakpoint(self,
-                "Set a breakpoint here", lldb.SBFileSpec("main.cpp"))
-        self.runCmd("dis -f")
-        disassembly_with_break = self.res.GetOutput().splitlines()
-
-        self.assertTrue(target.BreakpointDelete(bkpt.GetID()))
-
-        self.runCmd("dis -f")
-        disassembly_without_break = self.res.GetOutput().splitlines()
-
-        # Make sure all assembly instructions are the same as instructions
-        # with the breakpoint removed.
-        self.assertEqual(len(disassembly_with_break),
-                         len(disassembly_without_break))
-        for dis_inst_with, dis_inst_without in \
-                zip(disassembly_with_break, disassembly_without_break):
-            inst_with = dis_inst_with.split(':')[-1]
-            inst_without = dis_inst_without.split(':')[-1]
-            self.assertEqual(inst_with, inst_without)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/TestFrameDisassemble.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/TestFrameDisassemble.py
deleted file mode 100644
index c5fec5b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/disassembly/TestFrameDisassemble.py
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-Test to ensure SBFrame::Disassemble produces SOME output
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class FrameDisassembleTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_frame_disassemble(self):
-        """Sample test to ensure SBFrame::Disassemble produces SOME output."""
-        self.build()
-        self.frame_disassemble_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    def frame_disassemble_test(self):
-        """Sample test to ensure SBFrame::Disassemble produces SOME output"""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint in main.c at the source matching
-        # "Set a breakpoint here"
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "Set a breakpoint here", lldb.SBFileSpec("main.cpp"))
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() >= 1,
-                        VALID_BREAKPOINT)
-
-        error = lldb.SBError()
-        # This is the launch info.  If you want to launch with arguments or
-        # environment variables, add them using SetArguments or
-        # SetEnvironmentEntries
-
-        launch_info = lldb.SBLaunchInfo(None)
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Did we hit our breakpoint?
-        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
-        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
-        self.assertTrue(
-            len(threads) == 1,
-            "There should be a thread stopped at our breakpoint")
-
-        # The hit count for the breakpoint should be 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1)
-
-        frame = threads[0].GetFrameAtIndex(0)
-        disassembly = frame.Disassemble()
-        self.assertTrue(len(disassembly) != 0, "Disassembly was empty.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/Makefile
index ceb406e..2bba8e7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := pass-to-base.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py
index aaba156..e7f9840 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/dynamic_value_child_count/TestDynamicValueChildCount.py
@@ -2,12 +2,8 @@
 Test that dynamic values update their child count correctly
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/Makefile
index 784a53d..afc5200 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/Makefile
@@ -1,13 +1,9 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-all: a.out secondprog
+all: secondprog
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
-secondprog:
-	$(MAKE) VPATH=$(VPATH) -f $(SRCDIR)/secondprog.mk
-
-clean::
-	$(MAKE) -f $(SRCDIR)/secondprog.mk clean
+secondprog: secondprog.cpp
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		CXX_SOURCES=secondprog.cpp EXE=secondprog
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
index 2d6baa1..019df21 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/TestExec.py
@@ -5,8 +5,6 @@
 
 
 import lldb
-import os
-import time
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -20,14 +18,16 @@
 
     @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532")
     @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems
-    @skipIfSanitized # rdar://problem/43756823
+    @expectedFailureNetBSD
+    @skipIfAsan # rdar://problem/43756823
     @skipIfWindows
     def test_hitting_exec (self):
         self.do_test(False)
 
     @expectedFailureAll(archs=['i386'], bugnumber="rdar://28656532")
     @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://problem/34559552") # this exec test has problems on ios systems
-    @skipIfSanitized # rdar://problem/43756823
+    @expectedFailureNetBSD
+    @skipIfAsan # rdar://problem/43756823
     @skipIfWindows
     def test_skipping_exec (self):
         self.do_test(True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp
index 4475bbe..bec470f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/main.cpp
@@ -1,3 +1,5 @@
+#define _POSIX_C_SOURCE 200809L
+
 #include <cstdio>
 #include <cstdlib>
 #include <cstring>
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/secondprog.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/secondprog.mk
deleted file mode 100644
index 88f76b5..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/exec/secondprog.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := secondprog.cpp
-EXE = secondprog
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/.categories
deleted file mode 100644
index 897e40a..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/.categories
+++ /dev/null
@@ -1 +0,0 @@
-expression
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/Makefile
deleted file mode 100644
index a10791d..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := locking.c
-ENABLE_THREADS := YES
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
deleted file mode 100644
index a498f0a..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/TestExprDoesntBlock.py
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
-Test that expr will time out and allow other threads to run if it blocks.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class ExprDoesntDeadlockTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr17946')
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="Windows doesn't have pthreads, test needs to be ported")
-    @add_test_categories(["basic_process"])
-    def test_with_run_command(self):
-        """Test that expr will time out and allow other threads to run if it blocks."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint at source line before call_me_to_get_lock
-        # gets called.
-
-        main_file_spec = lldb.SBFileSpec("locking.c")
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            'Break here', main_file_spec)
-        if self.TraceOn():
-            print("breakpoint:", breakpoint)
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame #0 should be on self.line1 and the break condition should hold.
-        from lldbsuite.test.lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(
-            thread.IsValid(),
-            "There should be a thread stopped due to breakpoint condition")
-
-        frame0 = thread.GetFrameAtIndex(0)
-
-        var = frame0.EvaluateExpression("call_me_to_get_lock()")
-        self.assertTrue(var.IsValid())
-        self.assertTrue(var.GetValueAsSigned(0) == 567)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/locking.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/locking.c
deleted file mode 100644
index fae9979..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-doesnt-deadlock/locking.c
+++ /dev/null
@@ -1,80 +0,0 @@
-#include <pthread.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-
-pthread_mutex_t contended_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-pthread_mutex_t control_mutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t  control_condition;
-
-pthread_mutex_t thread_started_mutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t  thread_started_condition;
-
-// This function runs in a thread.  The locking dance is to make sure that 
-// by the time the main thread reaches the pthread_join below, this thread
-// has for sure acquired the contended_mutex.  So then the call_me_to_get_lock
-// function will block trying to get the mutex, and only succeed once it
-// signals this thread, then lets it run to wake up from the cond_wait and
-// release the mutex.
-
-void *
-lock_acquirer_1 (void *input)
-{
-  pthread_mutex_lock (&contended_mutex);
-  
-  // Grab this mutex, that will ensure that the main thread
-  // is in its cond_wait for it (since that's when it drops the mutex.
-
-  pthread_mutex_lock (&thread_started_mutex);
-  pthread_mutex_unlock(&thread_started_mutex);
-
-  // Now signal the main thread that it can continue, we have the contended lock
-  // so the call to call_me_to_get_lock won't make any progress till  this
-  // thread gets a chance to run.
-
-  pthread_mutex_lock (&control_mutex);
-
-  pthread_cond_signal (&thread_started_condition);
-
-  pthread_cond_wait (&control_condition, &control_mutex);
-
-  pthread_mutex_unlock (&contended_mutex);
-  return NULL;
-}
-
-int
-call_me_to_get_lock ()
-{
-  pthread_cond_signal (&control_condition);
-  pthread_mutex_lock (&contended_mutex);
-  return 567;
-}
-
-int main ()
-{
-  pthread_t thread_1;
-
-  pthread_cond_init (&control_condition, NULL);
-  pthread_cond_init (&thread_started_condition, NULL);
-
-  pthread_mutex_lock (&thread_started_mutex);
-
-  pthread_create (&thread_1, NULL, lock_acquirer_1, NULL);
-  
-  pthread_cond_wait (&thread_started_condition, &thread_started_mutex);
-
-  pthread_mutex_lock (&control_mutex);
-  pthread_mutex_unlock (&control_mutex);
-
-  // Break here.  At this point the other thread will have the contended_mutex,
-  // and be sitting in its cond_wait for the control condition.  So there is
-  // no way that our by-hand calling of call_me_to_get_lock will proceed
-  // without running the first thread at least somewhat.
-
-  call_me_to_get_lock();
-  pthread_join (thread_1, NULL);
-
-  return 0;
-
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-entry-bp/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-entry-bp/Makefile
deleted file mode 100644
index 0d70f25..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-entry-bp/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-entry-bp/TestExprEntryBP.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-entry-bp/TestExprEntryBP.py
deleted file mode 100644
index 56abc19..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/expr-entry-bp/TestExprEntryBP.py
+++ /dev/null
@@ -1,34 +0,0 @@
-"""
-Tests expressions evaluation when the breakpoint on module's entry is set.
-"""
-
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-class ExprEntryBPTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_expr_entry_bp(self):
-        """Tests expressions evaluation when the breakpoint on module's entry is set."""
-        self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
-
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, "Set a breakpoint here", self.main_source_file)
-
-        self.assertEqual(1, bkpt.GetNumLocations())
-        entry = bkpt.GetLocationAtIndex(0).GetAddress().GetModule().GetObjectFileEntryPointAddress()
-        self.assertTrue(entry.IsValid(), "Can't get a module entry point")
-
-        entry_bp = target.BreakpointCreateBySBAddress(entry)
-        self.assertTrue(entry_bp.IsValid(), "Can't set a breakpoint on the module entry point")
-
-        result = target.EvaluateExpression("sum(7, 1)")
-        self.assertTrue(result.IsValid(), "Can't evaluate expression")
-        self.assertEqual(8, result.GetValueAsSigned())
-
-    def setUp(self):
-        TestBase.setUp(self)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile
index c7c5ef4..7fed83d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/Makefile
@@ -1,5 +1,4 @@
 SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
-
 all: a.c clean
 		$(CC) -arch i386 -g -c $(SRCDIR)/a.c
 		ar -q liba-i386.a a.o
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
index 1c237bb..5fa52d3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/fat_archives/TestFatArchives.py
@@ -1,12 +1,9 @@
 """
 Test some lldb command abbreviations.
 """
-from __future__ import print_function
 
 
 import lldb
-import os
-import time
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/float-display/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/float-display/Makefile
new file mode 100644
index 0000000..c9319d6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/float-display/Makefile
@@ -0,0 +1,2 @@
+C_SOURCES := main.c
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats/TestStats.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/float-display/TestFloatDisplay.py
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats/TestStats.py
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/float-display/TestFloatDisplay.py
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/float-display/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/float-display/main.c
new file mode 100644
index 0000000..7e89225
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/float-display/main.c
@@ -0,0 +1,121 @@
+float f_neg3 = 1.234567 / 1e3;
+float f_neg4 = 1.234567 / 1e4;
+float f_neg5 = 1.234567 / 1e5;
+float f_neg6 = 1.234567 / 1e6;
+float f_neg7 = 1.234567 / 1e7;
+float f_neg8 = 1.234567 / 1e8;
+float f_neg20 = 1.234567 / 1e20;
+float f_neg30 = 1.234567 / 1e30;
+
+float f_3 = 1.234567 * 1e3;
+float f_4 = 1.234567 * 1e4;
+float f_5 = 1.234567 * 1e5;
+float f_6 = 1.234567 * 1e6;
+float f_7 = 1.234567 * 1e7;
+float f_8 = 1.234567 * 1e8;
+float f_20 = 1.234567 * 1e20;
+float f_30 = 1.234567 * 1e30;
+
+double d_neg3 = 1.234567 / 1e3;
+double d_neg4 = 1.234567 / 1e4;
+double d_neg5 = 1.234567 / 1e5;
+double d_neg6 = 1.234567 / 1e6;
+double d_neg7 = 1.234567 / 1e7;
+double d_neg8 = 1.234567 / 1e8;
+double d_neg20 = 1.234567 / 1e20;
+double d_neg30 = 1.234567 / 1e30;
+double d_neg50 = 1.234567 / 1e50;
+double d_neg250 = 1.234567 / 1e250;
+
+double d_3 = 1.234567 * 1e3;
+double d_4 = 1.234567 * 1e4;
+double d_5 = 1.234567 * 1e5;
+double d_6 = 1.234567 * 1e6;
+double d_7 = 1.234567 * 1e7;
+double d_8 = 1.234567 * 1e8;
+double d_20 = 1.234567 * 1e20;
+double d_30 = 1.234567 * 1e30;
+double d_50 = 1.234567 * 1e50;
+double d_250 = 1.234567 * 1e250;
+
+int main (int argc, char const *argv[]) {
+  //% # Default setting should be 6.
+  //% self.expect("frame variable f_neg3", substrs=["0.00123456"])
+  //% self.expect("frame variable f_neg4", substrs=["0.000123456"])
+  //% self.expect("frame variable f_neg5", substrs=["0.0000123456"])
+  //% self.expect("frame variable f_neg6", substrs=["0.00000123456"])
+  //% self.expect("frame variable f_neg7", substrs=["1.234567", "E-7"])
+  //% self.expect("frame variable f_neg8", substrs=["1.23456", "E-8"])
+  //% self.expect("frame variable f_neg20", substrs=["E-20"])
+  //% self.expect("frame variable f_neg30", substrs=["E-30"])
+  //% self.expect("frame variable f_3", substrs=["1234.56"])
+  //% self.expect("frame variable f_4", substrs=["12345.6"])
+  //% self.expect("frame variable f_5", substrs=["123456"])
+  //% self.expect("frame variable f_6", substrs=["123456"])
+  //% self.expect("frame variable f_7", substrs=["123456"])
+  //% self.expect("frame variable f_8", substrs=["123456"])
+  //% self.expect("frame variable f_20", substrs=["E+20"])
+  //% self.expect("frame variable f_30", substrs=["E+30"])
+  //% self.expect("frame variable d_neg3", substrs=["0.00123456"])
+  //% self.expect("frame variable d_neg4", substrs=["0.000123456"])
+  //% self.expect("frame variable d_neg5", substrs=["0.0000123456"])
+  //% self.expect("frame variable d_neg6", substrs=["0.00000123456"])
+  //% self.expect("frame variable d_neg7", substrs=["1.23456", "E-7"])
+  //% self.expect("frame variable d_neg8", substrs=["1.23456", "E-8"])
+  //% self.expect("frame variable d_neg20", substrs=["1.23456", "E-20"])
+  //% self.expect("frame variable d_neg30", substrs=["1.23456", "E-30"])
+  //% self.expect("frame variable d_neg50", substrs=["1.23456", "E-50"])
+  //% self.expect("frame variable d_neg250", substrs=["E-250"])
+  //% self.expect("frame variable d_3", substrs=["1234.56"])
+  //% self.expect("frame variable d_4", substrs=["12345.6"])
+  //% self.expect("frame variable d_5", substrs=["123456"])
+  //% self.expect("frame variable d_6", substrs=["1234567"])
+  //% self.expect("frame variable d_7", substrs=["1234567"])
+  //% self.expect("frame variable d_8", substrs=["1234567"])
+  //% self.expect("frame variable d_20", substrs=["1.23456", "E+20"])
+  //% self.expect("frame variable d_30", substrs=["1.23456", "E+30"])
+  //% self.expect("frame variable d_50", substrs=["1.23456", "E+50"])
+  //% self.expect("frame variable d_250", substrs=["1.23456", "E+250"])
+  //% # Now change the setting to print all the zeroes.
+  //% # Note that changing this setting should invalidate the data visualizer
+  //% # cache so that the new setting is used in the following calls.
+  //% self.runCmd("settings set target.max-zero-padding-in-float-format 9999")
+  //% self.expect("frame variable  f_neg3", substrs=["0.00123456"])
+  //% self.expect("frame variable  f_neg4", substrs=["0.000123456"])
+  //% self.expect("frame variable  f_neg5", substrs=["0.0000123456"])
+  //% self.expect("frame variable  f_neg6", substrs=["0.00000123456"])
+  //% self.expect("frame variable  f_neg7", substrs=["0.000000123456"])
+  //% self.expect("frame variable  f_neg8", substrs=["0.0000000123456"])
+  //% self.expect("frame variable  f_neg20", substrs=["0.0000000000000000000123456"])
+  //% self.expect("frame variable  f_neg30", substrs=["0.00000000000000000000000000000123456"])
+  //% self.expect("frame variable  f_3", substrs=["1234.56"])
+  //% self.expect("frame variable  f_4", substrs=["12345.6"])
+  //% self.expect("frame variable  f_5", substrs=["123456"])
+  //% self.expect("frame variable  f_6", substrs=["1234567"])
+  //% self.expect("frame variable  f_7", substrs=["1234567"])
+  //% self.expect("frame variable  f_8", substrs=["1234567"])
+  //% self.expect("frame variable  f_20", substrs=["E+20"])
+  //% self.expect("frame variable  f_30", substrs=["E+30"])
+  //% self.expect("frame variable  d_neg3", substrs=["0.00123456"])
+  //% self.expect("frame variable  d_neg4", substrs=["0.000123456"])
+  //% self.expect("frame variable  d_neg5", substrs=["0.0000123456"])
+  //% self.expect("frame variable  d_neg6", substrs=["0.00000123456"])
+  //% self.expect("frame variable  d_neg7", substrs=["0.000000123456"])
+  //% self.expect("frame variable  d_neg8", substrs=["0.0000000123456"])
+  //% self.expect("frame variable  d_neg20", substrs=["0.0000000000000000000123456"])
+  //% self.expect("frame variable  d_neg30", substrs=["0.000000000000000000000000000001234567"])
+  //% self.expect("frame variable  d_neg50", substrs=["0.0000000000000000000000000000000000000000000000000123456"])
+  //% self.expect("frame variable  d_neg250", substrs=["0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000123456"])
+  //% self.expect("frame variable  d_3", substrs=["1234.56"])
+  //% self.expect("frame variable  d_4", substrs=["12345.6"])
+  //% self.expect("frame variable  d_5", substrs=["123456"])
+  //% self.expect("frame variable  d_6", substrs=["1234567"])
+  //% self.expect("frame variable  d_7", substrs=["1234567"])
+  //% self.expect("frame variable  d_8", substrs=["1234567"])
+  //% # Positive numbers are not affected by this setting.
+  //% self.expect("frame variable  d_20", substrs=["1.23456", "E+20"])
+  //% self.expect("frame variable  d_30", substrs=["1.23456", "E+30"])
+  //% self.expect("frame variable  d_50", substrs=["1.23456", "E+50"])
+  //% self.expect("frame variable  d_250", substrs=["1.23456", "E+250"])
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/format/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/format/Makefile
deleted file mode 100644
index 0d70f25..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/format/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/format/TestFormats.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/format/TestFormats.py
deleted file mode 100644
index 9f3a8cd..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/format/TestFormats.py
+++ /dev/null
@@ -1,39 +0,0 @@
-"""
-Test the command history mechanism
-"""
-
-from __future__ import print_function
-
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestFormats(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        hostoslist=["windows"],
-        bugnumber="llvm.org/pr22274: need a pexpect replacement for windows")
-    def test_formats(self):
-        """Test format string functionality."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        import pexpect
-        prompt = "(lldb) "
-        child = pexpect.spawn(
-            '%s %s -x -o "b main" -o r %s' %
-            (lldbtest_config.lldbExec, self.lldbOption, exe))
-        # So that the spawned lldb session gets shutdown durng teardown.
-        self.child = child
-
-        # Substitute 'Help!' for 'help' using the 'commands regex' mechanism.
-        child.expect_exact(prompt + 'target create "%s"' % exe)
-        child.expect_exact(prompt + 'b main')
-        child.expect_exact(prompt + 'r')
-        child.expect_exact(prompt)
-        child.sendline()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/format/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/format/main.c
deleted file mode 100644
index b37bb22..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/format/main.c
+++ /dev/null
@@ -1,14 +0,0 @@
-//===-- main.c --------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-int main (int argc, char const *argv[])
-{
-    printf("testing\n");
-    return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py
deleted file mode 100644
index 4abf1a8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/array/TestArray.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Test the output of `frame diagnose` for an array access
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestArray(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_array(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            substrs=["a[10]"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py
deleted file mode 100644
index e198720..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/bad-reference/TestBadReference.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing a bad reference
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestBadReference(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_bad_reference(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect("frame diagnose", "Crash diagnosis was accurate", "f->b")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py
deleted file mode 100644
index 7823c63..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/complicated-expression/TestComplicatedExpression.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test the output of `frame diagnose` for a subexpression of a complicated expression
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseDereferenceArgument(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_dereference_argument(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            "f->b->d")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py
deleted file mode 100644
index 335d617..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-argument/TestDiagnoseDereferenceArgument.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing a function argument
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseDereferenceArgument(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_dereference_argument(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            "f->b->d")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py
deleted file mode 100644
index 0398a16..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-function-return/TestDiagnoseDereferenceFunctionReturn.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing a function's return value
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseDereferenceFunctionReturn(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    @expectedFailureAll(oslist=['macosx'], archs=['i386'], bugnumber="rdar://28656408")
-    def test_diagnose_dereference_function_return(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            substrs=[
-                "GetAFoo",
-                "->b"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py
deleted file mode 100644
index 272a64e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/dereference-this/TestDiagnoseDereferenceThis.py
+++ /dev/null
@@ -1,30 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing `this`
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseDereferenceThis(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_dereference_this(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect(
-            "frame diagnose",
-            "Crash diagnosis was accurate",
-            "this->a")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py
deleted file mode 100644
index 3d9c893..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/inheritance/TestDiagnoseInheritance.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test the output of `frame diagnose` for calling virtual methods
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseInheritance(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_inheritance(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect("frame diagnose", "Crash diagnosis was accurate", "d")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py
deleted file mode 100644
index da1fd18..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/local-variable/TestLocalVariable.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test the output of `frame diagnose` for dereferencing a local variable
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestLocalVariable(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_local_variable(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect("frame diagnose", "Crash diagnosis was accurate", "myInt")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py
deleted file mode 100644
index 437cdbb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-diagnose/virtual-method-call/TestDiagnoseDereferenceVirtualMethodCall.py
+++ /dev/null
@@ -1,27 +0,0 @@
-"""
-Test the output of `frame diagnose` for calling virtual methods
-"""
-
-from __future__ import print_function
-
-import os
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestDiagnoseVirtualMethodCall(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # <rdar://problem/33842388> frame diagnose doesn't work for armv7 or arm64
-    def test_diagnose_virtual_method_call(self):
-        TestBase.setUp(self)
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.expect("thread list", "Thread should be stopped",
-                    substrs=['stopped'])
-        self.expect("frame diagnose", "Crash diagnosis was accurate", "foo")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/Makefile
deleted file mode 100644
index cb1af71..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/Makefile
+++ /dev/null
@@ -1,12 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp other.cpp other-2.cpp
-C_SOURCES := somefunc.c
-
-include $(LEVEL)/Makefile.rules
-
-other-2.o: other-2.cpp
-	$(CXX) $(CFLAGS_NO_DEBUG) -c $(SRCDIR)/other-2.cpp
-
-somefunc.o: somefunc.c
-	$(CC) $(CFLAGS) -std=c99 -c $(SRCDIR)/somefunc.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py
deleted file mode 100644
index 959b621..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-language/TestGuessLanguage.py
+++ /dev/null
@@ -1,89 +0,0 @@
-"""
-Test the SB API SBFrame::GuessLanguage.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-
-
-class TestFrameGuessLanguage(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37658")
-    def test_guess_language(self):
-        """Test GuessLanguage for C and C++."""
-        self.build()
-        self.do_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    def check_language(self, thread, frame_no, test_lang):
-        frame = thread.frames[frame_no]
-        self.assertTrue(frame.IsValid(), "Frame %d was not valid."%(frame_no))
-        lang = frame.GuessLanguage()
-        self.assertEqual(lang, test_lang)
-
-    def do_test(self):
-        """Test GuessLanguage for C & C++."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint in main.c at the source matching
-        # "Set a breakpoint here"
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "Set breakpoint here", lldb.SBFileSpec("somefunc.c"))
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() >= 1,
-                        VALID_BREAKPOINT)
-
-        error = lldb.SBError()
-        # This is the launch info.  If you want to launch with arguments or
-        # environment variables, add them using SetArguments or
-        # SetEnvironmentEntries
-
-        launch_info = lldb.SBLaunchInfo(None)
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Did we hit our breakpoint?
-        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
-        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
-        self.assertTrue(
-            len(threads) == 1,
-            "There should be a thread stopped at our breakpoint")
-
-        # The hit count for the breakpoint should be 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1)
-
-        thread = threads[0]
-
-        c_frame_language = lldb.eLanguageTypeC99
-        # gcc emits DW_LANG_C89 even if -std=c99 was specified
-        if "gcc" in self.getCompiler():
-            c_frame_language = lldb.eLanguageTypeC89
-
-        self.check_language(thread, 0, c_frame_language)
-        self.check_language(thread, 1, lldb.eLanguageTypeC_plus_plus)
-        self.check_language(thread, 2, lldb.eLanguageTypeC_plus_plus)
-
-
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/Makefile
deleted file mode 100644
index 45f00b3..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-LEVEL = ../../make
-
-OBJC_SOURCES := main.m
-
-CFLAGS_EXTRAS += -g0 # No debug info.
-MAKE_DSYM := NO
-
-include $(LEVEL)/Makefile.rules
-
-LDFLAGS += -framework Foundation
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/recognizer.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/recognizer.py
deleted file mode 100644
index a8a5067..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame-recognizer/recognizer.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# encoding: utf-8
-
-import lldb
-
-class MyFrameRecognizer(object):
-    def get_recognized_arguments(self, frame):
-        if frame.name == "foo":
-            arg1 = frame.EvaluateExpression("$arg1").signed
-            arg2 = frame.EvaluateExpression("$arg2").signed
-            val1 = lldb.target.CreateValueFromExpression("a", "%d" % arg1)
-            val2 = lldb.target.CreateValueFromExpression("b", "%d" % arg2)
-            return [val1, val2]
-        elif frame.name == "bar":
-            arg1 = frame.EvaluateExpression("$arg1").signed
-            val1 = lldb.target.CreateValueFromExpression("a", "(int *)%d" % arg1)
-            return [val1]
-        return []
-
-class MyOtherFrameRecognizer(object):
-    def get_recognized_arguments(self, frame):
-        return []
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var/Makefile
deleted file mode 100644
index 50d4ab6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var/TestFrameVar.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var/TestFrameVar.py
deleted file mode 100644
index b4e1b9c..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var/TestFrameVar.py
+++ /dev/null
@@ -1,99 +0,0 @@
-"""
-Make sure the frame variable -g, -a, and -l flags work.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.lldbtest import *
-
-
-class TestFrameVar(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # If your test case doesn't stress debug info, the
-    # set this to true.  That way it won't be run once for
-    # each debug info format.
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_frame_var(self):
-        self.build()
-        self.do_test()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    def do_test(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint in main.c at the source matching
-        # "Set a breakpoint here"
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            "Set a breakpoint here", lldb.SBFileSpec("main.c"))
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() >= 1,
-                        VALID_BREAKPOINT)
-
-        error = lldb.SBError()
-        # This is the launch info.  If you want to launch with arguments or
-        # environment variables, add them using SetArguments or
-        # SetEnvironmentEntries
-
-        launch_info = lldb.SBLaunchInfo(None)
-        process = target.Launch(launch_info, error)
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Did we hit our breakpoint?
-        from lldbsuite.test.lldbutil import get_threads_stopped_at_breakpoint
-        threads = get_threads_stopped_at_breakpoint(process, breakpoint)
-        self.assertTrue(
-            len(threads) == 1,
-            "There should be a thread stopped at our breakpoint")
-
-        # The hit count for the breakpoint should be 1.
-        self.assertTrue(breakpoint.GetHitCount() == 1)
-
-        frame = threads[0].GetFrameAtIndex(0)
-        command_result = lldb.SBCommandReturnObject()
-        interp = self.dbg.GetCommandInterpreter()
-
-        # Just get args:
-        result = interp.HandleCommand("frame var -l", command_result)
-        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
-        output = command_result.GetOutput()
-        self.assertTrue("argc" in output, "Args didn't find argc")
-        self.assertTrue("argv" in output, "Args didn't find argv")
-        self.assertTrue("test_var" not in output, "Args found a local")
-        self.assertTrue("g_var" not in output, "Args found a global")
-
-        # Just get locals:
-        result = interp.HandleCommand("frame var -a", command_result)
-        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
-        output = command_result.GetOutput()
-        self.assertTrue("argc" not in output, "Locals found argc")
-        self.assertTrue("argv" not in output, "Locals found argv")
-        self.assertTrue("test_var" in output, "Locals didn't find test_var")
-        self.assertTrue("g_var" not in output, "Locals found a global")
-
-        # Get the file statics:
-        result = interp.HandleCommand("frame var -l -a -g", command_result)
-        self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "frame var -a didn't succeed")
-        output = command_result.GetOutput()
-        self.assertTrue("argc" not in output, "Globals found argc")
-        self.assertTrue("argv" not in output, "Globals found argv")
-        self.assertTrue("test_var" not in output, "Globals found test_var")
-        self.assertTrue("g_var" in output, "Globals didn't find g_var")
-
-
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/Makefile
deleted file mode 100644
index f5a47fc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/frame_var_scope/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../make
-C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py
index 3bf0c52..8f0ed9a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestGDBRemoteClient.py
@@ -7,6 +7,18 @@
 
 class TestGDBRemoteClient(GDBRemoteTestBase):
 
+    class gPacketResponder(MockGDBServerResponder):
+        def readRegisters(self):
+            return '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
+
+    def setUp(self):
+        super(TestGDBRemoteClient, self).setUp()
+        self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+    def tearDown(self):
+        lldb.DBG.SetSelectedPlatform(self._initial_platform)
+        super(TestGDBRemoteClient, self).tearDown()
+
     def test_connect(self):
         """Test connecting to a remote gdb server"""
         target = self.createTarget("a.yaml")
@@ -37,3 +49,79 @@
         error = lldb.SBError()
         target.AttachToProcessWithID(lldb.SBListener(), 47, error)
         self.assertEquals(error_msg, error.GetCString())
+
+    def test_read_registers_using_g_packets(self):
+        """Test reading registers using 'g' packets (default behavior)"""
+        self.dbg.HandleCommand(
+                "settings set plugin.process.gdb-remote.use-g-packet-for-reading true")
+        self.addTearDownHook(lambda: 
+                self.runCmd("settings set plugin.process.gdb-remote.use-g-packet-for-reading false"))
+        self.server.responder = self.gPacketResponder()
+        target = self.createTarget("a.yaml")
+        process = self.connect(target)
+
+        self.assertEquals(1, self.server.responder.packetLog.count("g"))
+        self.server.responder.packetLog = []
+        self.read_registers(process)
+        # Reading registers should not cause any 'p' packets to be exchanged.
+        self.assertEquals(
+                0, len([p for p in self.server.responder.packetLog if p.startswith("p")]))
+
+    def test_read_registers_using_p_packets(self):
+        """Test reading registers using 'p' packets"""
+        self.dbg.HandleCommand(
+                "settings set plugin.process.gdb-remote.use-g-packet-for-reading false")
+        target = self.createTarget("a.yaml")
+        process = self.connect(target)
+
+        self.read_registers(process)
+        self.assertFalse("g" in self.server.responder.packetLog)
+        self.assertGreater(
+                len([p for p in self.server.responder.packetLog if p.startswith("p")]), 0)
+
+    def test_write_registers_using_P_packets(self):
+        """Test writing registers using 'P' packets (default behavior)"""
+        self.server.responder = self.gPacketResponder()
+        target = self.createTarget("a.yaml")
+        process = self.connect(target)
+
+        self.write_registers(process)
+        self.assertEquals(0, len(
+                [p for p in self.server.responder.packetLog if p.startswith("G")]))
+        self.assertGreater(
+                len([p for p in self.server.responder.packetLog if p.startswith("P")]), 0)
+
+    def test_write_registers_using_G_packets(self):
+        """Test writing registers using 'G' packets"""
+
+        class MyResponder(self.gPacketResponder):
+            def readRegister(self, register):
+                # empty string means unsupported
+                return ""
+
+        self.server.responder = MyResponder()
+        target = self.createTarget("a.yaml")
+        process = self.connect(target)
+
+        self.write_registers(process)
+        self.assertEquals(0, len(
+                [p for p in self.server.responder.packetLog if p.startswith("P")]))
+        self.assertGreater(len(
+                [p for p in self.server.responder.packetLog if p.startswith("G")]), 0)
+
+    def read_registers(self, process):
+        self.for_each_gpr(
+                process, lambda r: self.assertEquals("0x00000000", r.GetValue()))
+
+    def write_registers(self, process):
+        self.for_each_gpr(
+                process, lambda r: r.SetValueFromCString("0x00000000"))
+
+    def for_each_gpr(self, process, operation):
+        registers = process.GetThreadAtIndex(0).GetFrameAtIndex(0).GetRegisters()
+        self.assertGreater(registers.GetSize(), 0)
+        regSet = registers[0]
+        numChildren = regSet.GetNumChildren()
+        self.assertGreater(numChildren, 0)
+        for i in range(numChildren):
+            operation(regSet.GetChildAtIndex(i))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestJLink6Armv7RegisterDefinition.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestJLink6Armv7RegisterDefinition.py
new file mode 100644
index 0000000..f0113fd
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestJLink6Armv7RegisterDefinition.py
@@ -0,0 +1,196 @@
+from __future__ import print_function
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+from gdbclientutils import *
+
+class TestJLink6Armv7RegisterDefinition(GDBRemoteTestBase):
+
+    @skipIfXmlSupportMissing
+    @skipIfRemote
+    def test(self):
+        """
+        Test lldb's parsing of SEGGER J-Link v6.54 register
+        definition for a Cortex M-4 dev board, and the fact
+        that the J-Link only supports g/G for reading/writing
+        register AND the J-Link v6.54 doesn't provide anything
+        but the general purpose registers."""
+        class MyResponder(MockGDBServerResponder):
+
+            def qXferRead(self, obj, annex, offset, length):
+                if annex == "target.xml":
+                    return """<?xml version="1.0"?>
+<!-- Copyright (C) 2008 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<target version="1.0">
+  <architecture>arm</architecture>
+  <feature name="org.gnu.gdb.arm.m-profile">
+    <reg name="r0" bitsize="32" regnum="0" type="uint32" group="general"/>
+    <reg name="r1" bitsize="32" regnum="1" type="uint32" group="general"/>
+    <reg name="r2" bitsize="32" regnum="2" type="uint32" group="general"/>
+    <reg name="r3" bitsize="32" regnum="3" type="uint32" group="general"/>
+    <reg name="r4" bitsize="32" regnum="4" type="uint32" group="general"/>
+    <reg name="r5" bitsize="32" regnum="5" type="uint32" group="general"/>
+    <reg name="r6" bitsize="32" regnum="6" type="uint32" group="general"/>
+    <reg name="r7" bitsize="32" regnum="7" type="uint32" group="general"/>
+    <reg name="r8" bitsize="32" regnum="8" type="uint32" group="general"/>
+    <reg name="r9" bitsize="32" regnum="9" type="uint32" group="general"/>
+    <reg name="r10" bitsize="32" regnum="10" type="uint32" group="general"/>
+    <reg name="r11" bitsize="32" regnum="11" type="uint32" group="general"/>
+    <reg name="r12" bitsize="32" regnum="12" type="uint32" group="general"/>
+    <reg name="sp" bitsize="32" regnum="13" type="data_ptr" group="general"/>
+    <reg name="lr" bitsize="32" regnum="14" type="uint32" group="general"/>
+    <reg name="pc" bitsize="32" regnum="15" type="code_ptr" group="general"/>
+    <reg name="xpsr" bitsize="32" regnum="25" type="uint32" group="general"/>
+  </feature>
+  <feature name="org.gnu.gdb.arm.m-system">
+    <reg name="msp" bitsize="32" regnum="26" type="uint32" group="general"/>
+    <reg name="psp" bitsize="32" regnum="27" type="uint32" group="general"/>
+    <reg name="primask" bitsize="32" regnum="28" type="uint32" group="general"/>
+    <reg name="basepri" bitsize="32" regnum="29" type="uint32" group="general"/>
+    <reg name="faultmask" bitsize="32" regnum="30" type="uint32" group="general"/>
+    <reg name="control" bitsize="32" regnum="31" type="uint32" group="general"/>
+  </feature>
+  <feature name="org.gnu.gdb.arm.m-float">
+    <reg name="fpscr" bitsize="32" regnum="32" type="uint32" group="float"/>
+    <reg name="s0" bitsize="32" regnum="33" type="float" group="float"/>
+    <reg name="s1" bitsize="32" regnum="34" type="float" group="float"/>
+    <reg name="s2" bitsize="32" regnum="35" type="float" group="float"/>
+    <reg name="s3" bitsize="32" regnum="36" type="float" group="float"/>
+    <reg name="s4" bitsize="32" regnum="37" type="float" group="float"/>
+    <reg name="s5" bitsize="32" regnum="38" type="float" group="float"/>
+    <reg name="s6" bitsize="32" regnum="39" type="float" group="float"/>
+    <reg name="s7" bitsize="32" regnum="40" type="float" group="float"/>
+    <reg name="s8" bitsize="32" regnum="41" type="float" group="float"/>
+    <reg name="s9" bitsize="32" regnum="42" type="float" group="float"/>
+    <reg name="s10" bitsize="32" regnum="43" type="float" group="float"/>
+    <reg name="s11" bitsize="32" regnum="44" type="float" group="float"/>
+    <reg name="s12" bitsize="32" regnum="45" type="float" group="float"/>
+    <reg name="s13" bitsize="32" regnum="46" type="float" group="float"/>
+    <reg name="s14" bitsize="32" regnum="47" type="float" group="float"/>
+    <reg name="s15" bitsize="32" regnum="48" type="float" group="float"/>
+    <reg name="s16" bitsize="32" regnum="49" type="float" group="float"/>
+    <reg name="s17" bitsize="32" regnum="50" type="float" group="float"/>
+    <reg name="s18" bitsize="32" regnum="51" type="float" group="float"/>
+    <reg name="s19" bitsize="32" regnum="52" type="float" group="float"/>
+    <reg name="s20" bitsize="32" regnum="53" type="float" group="float"/>
+    <reg name="s21" bitsize="32" regnum="54" type="float" group="float"/>
+    <reg name="s22" bitsize="32" regnum="55" type="float" group="float"/>
+    <reg name="s23" bitsize="32" regnum="56" type="float" group="float"/>
+    <reg name="s24" bitsize="32" regnum="57" type="float" group="float"/>
+    <reg name="s25" bitsize="32" regnum="58" type="float" group="float"/>
+    <reg name="s26" bitsize="32" regnum="59" type="float" group="float"/>
+    <reg name="s27" bitsize="32" regnum="60" type="float" group="float"/>
+    <reg name="s28" bitsize="32" regnum="61" type="float" group="float"/>
+    <reg name="s29" bitsize="32" regnum="62" type="float" group="float"/>
+    <reg name="s30" bitsize="32" regnum="63" type="float" group="float"/>
+    <reg name="s31" bitsize="32" regnum="64" type="float" group="float"/>
+    <reg name="d0" bitsize="64" regnum="65" type="ieee_double" group="float"/>
+    <reg name="d1" bitsize="64" regnum="66" type="ieee_double" group="float"/>
+    <reg name="d2" bitsize="64" regnum="67" type="ieee_double" group="float"/>
+    <reg name="d3" bitsize="64" regnum="68" type="ieee_double" group="float"/>
+    <reg name="d4" bitsize="64" regnum="69" type="ieee_double" group="float"/>
+    <reg name="d5" bitsize="64" regnum="70" type="ieee_double" group="float"/>
+    <reg name="d6" bitsize="64" regnum="71" type="ieee_double" group="float"/>
+    <reg name="d7" bitsize="64" regnum="72" type="ieee_double" group="float"/>
+    <reg name="d8" bitsize="64" regnum="73" type="ieee_double" group="float"/>
+    <reg name="d9" bitsize="64" regnum="74" type="ieee_double" group="float"/>
+    <reg name="d10" bitsize="64" regnum="75" type="ieee_double" group="float"/>
+    <reg name="d11" bitsize="64" regnum="76" type="ieee_double" group="float"/>
+    <reg name="d12" bitsize="64" regnum="77" type="ieee_double" group="float"/>
+    <reg name="d13" bitsize="64" regnum="78" type="ieee_double" group="float"/>
+    <reg name="d14" bitsize="64" regnum="79" type="ieee_double" group="float"/>
+    <reg name="d15" bitsize="64" regnum="80" type="ieee_double" group="float"/>
+  </feature>
+</target>""", False
+                else:
+                    return None, False
+
+            def readRegister(self, regnum):
+                return "E01"
+
+            # Initial r1 bytes, in little-endian order
+            r1_bytes = "01000000"
+
+            ## readRegisters only provides reg values up through xpsr (0x61000000)
+            ## it doesn't send up any of the exception registers or floating point
+            ## registers that the above register xml describes.
+            def readRegisters(self):
+                return "00000000" + self.r1_bytes + "010000000100000001000000000000008c080020a872012000000000a0790120000000008065012041ad0008a0720120692a00089e26000800000061"
+
+            ## the J-Link accepts a register write packet with just the GPRs
+            ## defined.
+            def writeRegisters(self, registers_hex):
+                # Check that lldb returns the full 704 hex-byte register context, 
+                # or the 136 hex-byte general purpose register reg ctx.
+                if len(registers_hex) != 704 and len(register_hex) != 136:
+                    return "E06"
+                if registers_hex.startswith("0000000044332211010000000100000001000000000000008c080020a872012000000000a0790120000000008065012041ad0008a0720120692a00089e26000800000061"):
+                    self.r1_bytes = "44332211"
+                    return "OK"
+                else:
+                    return "E07"
+
+            def haltReason(self):
+                return "S05"
+
+            def qfThreadInfo(self):
+                return "mdead"
+            
+            def qC(self):
+                return ""
+
+            def qSupported(self, client_supported):
+                return "PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+"
+
+            def QThreadSuffixSupported(self):
+                return "OK"
+
+            def QListThreadsInStopReply(self):
+                return "OK"
+
+        self.server.responder = MyResponder()
+        if self.TraceOn():
+            self.runCmd("log enable gdb-remote packets")
+            self.addTearDownHook(
+                    lambda: self.runCmd("log disable gdb-remote packets"))
+
+        self.dbg.SetDefaultArchitecture("armv7em")
+        target = self.dbg.CreateTargetWithFileAndArch(None, None)
+
+        process = self.connect(target)
+
+        if self.TraceOn():
+            interp = self.dbg.GetCommandInterpreter()
+            result = lldb.SBCommandReturnObject()
+            interp.HandleCommand("target list", result)
+            print(result.GetOutput())
+
+        r1_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("r1")
+        self.assertEqual(r1_valobj.GetValueAsUnsigned(), 1)
+
+        pc_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("pc")
+        self.assertEqual(pc_valobj.GetValueAsUnsigned(), 0x0800269e)
+
+        xpsr_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("xpsr")
+        self.assertEqual(xpsr_valobj.GetValueAsUnsigned(), 0x61000000)
+
+        msp_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("msp")
+        err = msp_valobj.GetError()
+        self.assertTrue(err.Fail(), "lldb should not be able to fetch the msp register")
+
+        val = b'\x11\x22\x33\x44'
+        error = lldb.SBError()
+        data = lldb.SBData()
+        data.SetData(error, val, lldb.eByteOrderBig, 4)
+        self.assertEqual(r1_valobj.SetData(data, error), True)
+        self.assertTrue(error.Success())
+
+        r1_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("r1")
+        self.assertEqual(r1_valobj.GetValueAsUnsigned(), 0x11223344)
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoGPacketSupported.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoGPacketSupported.py
new file mode 100644
index 0000000..6a17173
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoGPacketSupported.py
@@ -0,0 +1,96 @@
+from __future__ import print_function
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+from gdbclientutils import *
+
+
+# This test case is testing three things:
+#
+#  1. three register values will be provided in the ? stop packet (T11) -
+#     registers 0 ("rax"), 1 ("rbx"), and 3 ("rip")
+#  2. ReadRegister packet will provide the value of register 2 ("rsi")
+#  3. The "g" read-all-registers packet is not supported; p must be used
+#     to get the value of register 2 ("rsi")
+#
+# Forcing lldb to use the expedited registers in the stop packet and
+# marking it an error to request that register value is to prevent
+# performance regressions.
+# 
+# Some gdb RSP stubs only implement p/P, they do not support g/G.
+# lldb must be able to work with either.
+
+class TestNoGPacketSupported(GDBRemoteTestBase):
+
+    @skipIfXmlSupportMissing
+    def test(self):
+        class MyResponder(MockGDBServerResponder):
+            def haltReason(self):
+                return "T02thread:1ff0d;threads:1ff0d;thread-pcs:000000010001bc00;00:7882773ce0ffffff;01:1122334455667788;03:00bc010001000000;"
+
+            def threadStopInfo(self, threadnum):
+                return "T02thread:1ff0d;threads:1ff0d;thread-pcs:000000010001bc00;00:7882773ce0ffffff;01:1122334455667788;03:00bc010001000000;"
+
+            def writeRegisters(self):
+                return "E02"
+
+            def readRegisters(self):
+                return "E01"
+
+            def readRegister(self, regnum):
+                # lldb will try sending "p0" to see if the p packet is supported,
+                # give a bogus value; in theory lldb could use this value in the
+                # register context and that would be valid behavior.
+
+                # notably, don't give values for registers 1 & 3 -- lldb should
+                # get those from the ? stop packet ("T11") and it is a pref regression
+                # if lldb is asking for these register values.
+                if regnum == 0:
+                    return "5555555555555555"
+                if regnum == 2:
+                    return "c04825ebfe7f0000" # 0x00007ffeeb2548c0
+
+                return "E03"
+
+            def writeRegister(self, regnum):
+                return "OK"
+
+            def qXferRead(self, obj, annex, offset, length):
+                if annex == "target.xml":
+                    return """<?xml version="1.0"?>
+                        <target version="1.0">
+                          <architecture>i386:x86-64</architecture>
+                          <feature name="org.gnu.gdb.i386.core">
+                            <reg name="rax" bitsize="64" regnum="0" type="code_ptr" group="general"/>
+                            <reg name="rbx" bitsize="64" regnum="1" type="code_ptr" group="general"/>
+                            <reg name="rsi" bitsize="64" regnum="2" type="code_ptr" group="general"/>
+                            <reg name="rip" bitsize="64" regnum="3" type="code_ptr" group="general" altname="pc" generic="pc"/>
+                          </feature>
+                        </target>""", False
+                else:
+                    return None, False
+
+        self.server.responder = MyResponder()
+        target = self.dbg.CreateTarget('')
+        if self.TraceOn():
+          self.runCmd("log enable gdb-remote packets")
+          self.addTearDownHook(
+                lambda: self.runCmd("log disable gdb-remote packets"))
+        process = self.connect(target)
+
+        thread = process.GetThreadAtIndex(0)
+        frame = thread.GetFrameAtIndex(0)
+        rax = frame.FindRegister("rax").GetValueAsUnsigned()
+        rbx = frame.FindRegister("rbx").GetValueAsUnsigned()
+        rsi = frame.FindRegister("rsi").GetValueAsUnsigned()
+        pc = frame.GetPC()
+        rip = frame.FindRegister("rip").GetValueAsUnsigned()
+
+        if self.TraceOn():
+            print("Register values: rax == 0x%x, rbx == 0x%x, rsi == 0x%x, pc == 0x%x, rip == 0x%x" % (rax, rbx, rsi, pc, rip))
+
+        self.assertEqual(rax, 0xffffffe03c778278)
+        self.assertEqual(rbx, 0x8877665544332211)
+        self.assertEqual(rsi, 0x00007ffeeb2548c0)
+        self.assertEqual(pc, 0x10001bc00)
+        self.assertEqual(rip, 0x10001bc00)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py
index a9ae29d..3bf22d3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestNoWatchpointSupportInfo.py
@@ -21,6 +21,7 @@
             def threadStopInfo(self, threadnum):
                 if threadnum == 0x1ff0d:
                     return "T02thread:1ff0d;thread-pcs:10001bc00;"
+                return ""
 
             def setBreakpoint(self, packet):
                 if packet.startswith("Z2,"):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
new file mode 100644
index 0000000..2da8dd5
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestPlatformClient.py
@@ -0,0 +1,67 @@
+import lldb
+import binascii
+import os
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+from gdbclientutils import *
+
+def hexlify(string):
+    return binascii.hexlify(string.encode()).decode()
+
+class TestPlatformClient(GDBRemoteTestBase):
+
+    def test_process_list_with_all_users(self):
+        """Test connecting to a remote linux platform"""
+
+        class MyResponder(MockGDBServerResponder):
+            def __init__(self):
+                MockGDBServerResponder.__init__(self)
+                self.currentQsProc = 0
+                self.all_users = False
+
+            def qfProcessInfo(self, packet):
+                if "all_users:1" in packet:
+                    self.all_users = True
+                    name = hexlify("/a/test_process")
+                    args = "-".join(map(hexlify,
+                                        ["/system/bin/sh", "-c", "/data/local/tmp/lldb-server"]))
+                    return "pid:10;ppid:1;uid:2;gid:3;euid:4;egid:5;name:" + name + ";args:" + args + ";"
+                else:
+                    self.all_users = False
+                    return "E04"
+
+            def qsProcessInfo(self):
+                if self.all_users:
+                    if self.currentQsProc == 0:
+                        self.currentQsProc = 1
+                        name = hexlify("/b/another_test_process")
+                        # This intentionally has a badly encoded argument
+                        args = "X".join(map(hexlify,
+                                            ["/system/bin/ls", "--help"]))
+                        return "pid:11;ppid:2;uid:3;gid:4;euid:5;egid:6;name:" + name + ";args:" + args + ";"
+                    elif self.currentQsProc == 1:
+                        self.currentQsProc = 0
+                        return "E04"
+                else:
+                    return "E04"
+
+        self.server.responder = MyResponder()
+
+        try:
+            self.runCmd("platform select remote-linux")
+            self.runCmd("platform connect connect://localhost:%d" %
+                        self.server.port)
+            self.assertTrue(self.dbg.GetSelectedPlatform().IsConnected())
+            self.expect("platform process list -x",
+                        substrs=["2 matching processes were found", "test_process", "another_test_process"])
+            self.expect("platform process list -xv",
+                        substrs=[
+                            "PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                         ARGUMENTS",
+                            "10     1      2          3          4          5                                         /system/bin/sh -c /data/local/tmp/lldb-server",
+                            "11     2      3          4          5          6"])
+            self.expect("platform process list -xv", substrs=["/system/bin/ls"], matching=False)
+            self.expect("platform process list",
+                        error=True,
+                        substrs=["error: no processes were found on the \"remote-linux\" platform"])
+        finally:
+            self.dbg.GetSelectedPlatform().DisconnectRemote()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRecognizeBreakpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRecognizeBreakpoint.py
index 335a1a1..44e2cfa 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRecognizeBreakpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRecognizeBreakpoint.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRegDefinitionInParts.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRegDefinitionInParts.py
new file mode 100644
index 0000000..c4ba19c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestRegDefinitionInParts.py
@@ -0,0 +1,160 @@
+from __future__ import print_function
+import lldb
+import time
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+from gdbclientutils import *
+
+class TestRegDefinitionInParts(GDBRemoteTestBase):
+
+    @skipIfXmlSupportMissing
+    @skipIfRemote
+    def test(self):
+        """
+        Test that lldb correctly fetches the target definition file
+        in multiple chunks if the remote server only provides the 
+        content in small parts, and the small parts it provides is
+        smaller than the maximum packet size that it declared at
+        the start of the debug session.  qemu does this.
+        """
+        class MyResponder(MockGDBServerResponder):
+
+            def qXferRead(self, obj, annex, offset, length):
+                if annex == "target.xml":
+                    return """<?xml version="1.0"?>
+                              <!DOCTYPE feature SYSTEM "gdb-target.dtd">
+                              <target version="1.0">
+                              <architecture>i386:x86-64</architecture>
+                              <xi:include href="i386-64bit-core.xml"/>
+                              </target>""", False
+
+                if annex == "i386-64bit-core.xml" and offset == 0:
+                    return """<?xml version="1.0"?>
+<!-- Copyright (C) 2010-2015 Free Software Foundation, Inc.
+
+     Copying and distribution of this file, with or without modification,
+     are permitted in any medium without royalty provided the copyright
+     notice and this notice are preserved.  -->
+
+<!DOCTYPE feature SYSTEM "gdb-target.dtd">
+<feature name="org.gnu.gdb.i386.core">
+  <flags id="i386_eflags" size="4">
+    <field name="CF" start="0" end="0"/>
+    <field name="" start="1" end="1"/>
+    <field name="PF" start="2" end="2"/>
+    <field name="AF" start="4" end="4"/>
+    <field name="ZF" start="6" end="6"/>
+    <field name="SF" start="7" end="7"/>
+    <field name="TF" start="8" end="8"/>
+    <field name="IF" start="9" end="9"/>
+    <field name="DF" start="10" end="10"/>
+    <field name="OF" start="11" end="11"/>
+    <field name="NT" start="14" end="14"/>
+    <field name="RF" start="16" end="16"/>
+    <field name="VM" start="17" end="17"/>
+    <field name="AC" start="18" end="18"/>
+    <field name="VIF" start="19" end="19"/>
+    <field name="VIP" start="20" end="20"/>
+    <field name="ID" start="21" end="21"/>
+  </flags>
+
+  <reg name="rax" bitsize="64" type="int64"/>
+  <reg name="rbx" bitsize="64" type="int64"/>
+  <reg name="rcx" bitsize="64" type="int64"/>
+  <reg name="rdx" bitsize="64" type="int64"/>
+  <reg name="rsi" bitsize="64" type="int64"/>
+  <reg name="rdi" bitsize="64" type="int64"/>
+  <reg name="rbp" bitsize="64" type="data_ptr"/>
+  <reg name="rsp" bitsize="64" type="data_ptr"/>
+  <reg name="r8" bitsize="64" type="int64"/>
+  <reg name="r9" bitsize="64" type="int64"/>
+  <reg name="r10" bitsize="64" type="int64"/>
+  <reg name="r11" bitsize="64" type="int64"/>
+  <reg name="r12" bitsize="64" type="int64"/>
+  <reg name="r13" bitsize="64" type="int64"/>
+  <reg name="r14" bitsize="64" type="int64"/>
+  <reg name="r15" bitsize="64" type="int64"/>
+
+  <reg name="rip" bitsize="64" type="code_ptr"/>
+  <reg name="eflags" bitsize="32" type="i386_eflags"/>
+  <reg name="cs" bitsize="32" type="int32"/>
+  <reg name="ss" bitsize="32" ty""", True
+
+                if annex == "i386-64bit-core.xml" and offset == 2045:
+                    return """pe="int32"/>
+  <reg name="ds" bitsize="32" type="int32"/>
+  <reg name="es" bitsize="32" type="int32"/>
+  <reg name="fs" bitsize="32" type="int32"/>
+  <reg name="gs" bitsize="32" type="int32"/>
+
+  <reg name="st0" bitsize="80" type="i387_ext"/>
+  <reg name="st1" bitsize="80" type="i387_ext"/>
+  <reg name="st2" bitsize="80" type="i387_ext"/>
+  <reg name="st3" bitsize="80" type="i387_ext"/>
+  <reg name="st4" bitsize="80" type="i387_ext"/>
+  <reg name="st5" bitsize="80" type="i387_ext"/>
+  <reg name="st6" bitsize="80" type="i387_ext"/>
+  <reg name="st7" bitsize="80" type="i387_ext"/>
+
+  <reg name="fctrl" bitsize="32" type="int" group="float"/>
+  <reg name="fstat" bitsize="32" type="int" group="float"/>
+  <reg name="ftag" bitsize="32" type="int" group="float"/>
+  <reg name="fiseg" bitsize="32" type="int" group="float"/>
+  <reg name="fioff" bitsize="32" type="int" group="float"/>
+  <reg name="foseg" bitsize="32" type="int" group="float"/>
+  <reg name="fooff" bitsize="32" type="int" group="float"/>
+  <reg name="fop" bitsize="32" type="int" group="float"/>
+</feature>""", False
+
+                return None, False
+
+            def readRegister(self, regnum):
+                return ""
+
+            def readRegisters(self):
+                return "0600000000000000c0b7c00080fffffff021c60080ffffff1a00000000000000020000000000000078b7c00080ffffff203f8ca090ffffff103f8ca090ffffff3025990a80ffffff809698000000000070009f0a80ffffff020000000000000000eae10080ffffff00000000000000001822d74f1a00000078b7c00080ffffff0e12410080ffff004602000011111111222222223333333300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007f0300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000801f0000"
+
+            def haltReason(self):
+                return "T02thread:dead;threads:dead;"
+
+            def qfThreadInfo(self):
+                return "mdead"
+            
+            def qC(self):
+                return ""
+
+            def qSupported(self, client_supported):
+                return "PacketSize=1000;qXfer:features:read+"
+
+            def QThreadSuffixSupported(self):
+                return "OK"
+
+            def QListThreadsInStopReply(self):
+                return "OK"
+
+        self.server.responder = MyResponder()
+        if self.TraceOn():
+            self.runCmd("log enable gdb-remote packets")
+            time.sleep(10)
+            self.addTearDownHook(
+                    lambda: self.runCmd("log disable gdb-remote packets"))
+
+        target = self.dbg.CreateTargetWithFileAndArch(None, None)
+
+        process = self.connect(target)
+
+        if self.TraceOn():
+            interp = self.dbg.GetCommandInterpreter()
+            result = lldb.SBCommandReturnObject()
+            interp.HandleCommand("target list", result)
+            print(result.GetOutput())
+
+        rip_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("rip")
+        self.assertEqual(rip_valobj.GetValueAsUnsigned(), 0x00ffff800041120e)
+
+        ss_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("ss")
+        self.assertEqual(ss_valobj.GetValueAsUnsigned(), 0x22222222)
+
+        if self.TraceOn():
+            print("rip is 0x%x" % rip_valobj.GetValueAsUnsigned())
+            print("ss is 0x%x" % ss_valobj.GetValueAsUnsigned())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py
index 0112e0d..c86d3e7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestStopPCs.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py
index 9ea7cc8..20e575a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestTargetXMLArch.py
@@ -4,6 +4,101 @@
 from lldbsuite.test.decorators import *
 from gdbclientutils import *
 
+class MyResponder(MockGDBServerResponder):
+    def qXferRead(self, obj, annex, offset, length):
+        if annex == "target.xml":
+            return """<?xml version="1.0"?>
+                <target version="1.0">
+                  <architecture>i386:x86-64</architecture>
+                  <feature name="org.gnu.gdb.i386.core">
+
+                 <flags id="i386_eflags" size="4">
+                 <field name="CF" start="0" end="0"/>
+                 <field name="" start="1" end="1"/>
+                 <field name="PF" start="2" end="2"/>
+                 <field name="AF" start="4" end="4"/>
+                 <field name="ZF" start="6" end="6"/>
+                 <field name="SF" start="7" end="7"/>
+                 <field name="TF" start="8" end="8"/>
+                 <field name="IF" start="9" end="9"/>
+                 <field name="DF" start="10" end="10"/>
+                 <field name="OF" start="11" end="11"/>
+                 <field name="NT" start="14" end="14"/>
+                 <field name="RF" start="16" end="16"/>
+                 <field name="VM" start="17" end="17"/>
+                 <field name="AC" start="18" end="18"/>
+                 <field name="VIF" start="19" end="19"/>
+                 <field name="VIP" start="20" end="20"/>
+                 <field name="ID" start="21" end="21"/>
+                 </flags>
+
+                    <reg name="rax" bitsize="64" regnum="0" type="int" group="general"/>
+                    <reg name="rbx" bitsize="64" regnum="1" type="int" group="general"/>
+                    <reg name="rcx" bitsize="64" regnum="2" type="int" group="general"/>
+                    <reg name="rdx" bitsize="64" regnum="3" type="int" group="general"/>
+                    <reg name="rsi" bitsize="64" regnum="4" type="int" group="general"/>
+                    <reg name="rdi" bitsize="64" regnum="5" type="int" group="general"/>
+                    <reg name="rbp" bitsize="64" regnum="6" type="data_ptr" group="general"/>
+                    <reg name="rsp" bitsize="64" regnum="7" type="data_ptr" group="general"/>
+                    <reg name="r8" bitsize="64"  regnum="8" type="int" group="general"/>
+                    <reg name="r9" bitsize="64"  regnum="9" type="int" group="general"/>
+                    <reg name="r10" bitsize="64" regnum="10" type="int" group="general"/>
+                    <reg name="r11" bitsize="64" regnum="11" type="int" group="general"/>
+                    <reg name="r12" bitsize="64" regnum="12" type="int" group="general"/>
+                    <reg name="r13" bitsize="64" regnum="13" type="int" group="general"/>
+                    <reg name="r14" bitsize="64" regnum="14" type="int" group="general"/>
+                    <reg name="r15" bitsize="64" regnum="15" type="int" group="general"/>
+                    <reg name="rip" bitsize="64" regnum="16" type="code_ptr" group="general"/>
+                    <reg name="eflags" bitsize="32" regnum="17" type="i386_eflags" group="general"/>
+
+                    <reg name="cs" bitsize="32" regnum="18" type="int" group="general"/>
+                    <reg name="ss" bitsize="32" regnum="19" type="int" group="general"/>
+                    <reg name="ds" bitsize="32" regnum="20" type="int" group="general"/>
+                    <reg name="es" bitsize="32" regnum="21" type="int" group="general"/>
+                    <reg name="fs" bitsize="32" regnum="22" type="int" group="general"/>
+                    <reg name="gs" bitsize="32" regnum="23" type="int" group="general"/>
+
+                    <reg name="st0" bitsize="80" regnum="24" type="i387_ext" group="float"/>
+                    <reg name="st1" bitsize="80" regnum="25" type="i387_ext" group="float"/>
+                    <reg name="st2" bitsize="80" regnum="26" type="i387_ext" group="float"/>
+                    <reg name="st3" bitsize="80" regnum="27" type="i387_ext" group="float"/>
+                    <reg name="st4" bitsize="80" regnum="28" type="i387_ext" group="float"/>
+                    <reg name="st5" bitsize="80" regnum="29" type="i387_ext" group="float"/>
+                    <reg name="st6" bitsize="80" regnum="30" type="i387_ext" group="float"/>
+                    <reg name="st7" bitsize="80" regnum="31" type="i387_ext" group="float"/>
+
+                    <reg name="fctrl" bitsize="32" regnum="32" type="int" group="float"/>
+                    <reg name="fstat" bitsize="32" regnum="33" type="int" group="float"/>
+                    <reg name="ftag"  bitsize="32" regnum="34" type="int" group="float"/>
+                    <reg name="fiseg" bitsize="32" regnum="35" type="int" group="float"/>
+                    <reg name="fioff" bitsize="32" regnum="36" type="int" group="float"/>
+                    <reg name="foseg" bitsize="32" regnum="37" type="int" group="float"/>
+                    <reg name="fooff" bitsize="32" regnum="38" type="int" group="float"/>
+                    <reg name="fop"   bitsize="32" regnum="39" type="int" group="float"/>
+                  </feature>
+                </target>""", False
+        else:
+            return None, False
+
+    def qC(self):
+        return "QC1"
+
+    def haltReason(self):
+        return "T05thread:00000001;06:9038d60f00700000;07:98b4062680ffffff;10:c0d7bf1b80ffffff;"
+
+    def readRegister(self, register):
+        regs = {0x0: "00b0060000610000",
+                0xa: "68fe471c80ffffff",
+                0xc: "60574a1c80ffffff",
+                0xd: "18f3042680ffffff",
+                0xe: "be8a4d7142000000",
+                0xf: "50df471c80ffffff",
+                0x10: "c0d7bf1b80ffffff" }
+        if register in regs:
+            return regs[register]
+        else:
+            return "0000000000000000"
+
 class TestTargetXMLArch(GDBRemoteTestBase):
 
     @skipIfXmlSupportMissing
@@ -14,102 +109,6 @@
         Test lldb's parsing of the <architecture> tag in the target.xml register
         description packet.
         """
-        class MyResponder(MockGDBServerResponder):
-
-            def qXferRead(self, obj, annex, offset, length):
-                if annex == "target.xml":
-                    return """<?xml version="1.0"?>
-                        <target version="1.0">
-                          <architecture>i386:x86-64</architecture>
-                          <feature name="org.gnu.gdb.i386.core">
-    
-                         <flags id="i386_eflags" size="4">
-                         <field name="CF" start="0" end="0"/>
-                         <field name="" start="1" end="1"/>
-                         <field name="PF" start="2" end="2"/>
-                         <field name="AF" start="4" end="4"/>
-                         <field name="ZF" start="6" end="6"/>
-                         <field name="SF" start="7" end="7"/>
-                         <field name="TF" start="8" end="8"/>
-                         <field name="IF" start="9" end="9"/>
-                         <field name="DF" start="10" end="10"/>
-                         <field name="OF" start="11" end="11"/>
-                         <field name="NT" start="14" end="14"/>
-                         <field name="RF" start="16" end="16"/>
-                         <field name="VM" start="17" end="17"/>
-                         <field name="AC" start="18" end="18"/>
-                         <field name="VIF" start="19" end="19"/>
-                         <field name="VIP" start="20" end="20"/>
-                         <field name="ID" start="21" end="21"/>
-                         </flags>
-    
-                            <reg name="rax" bitsize="64" regnum="0" type="int" group="general"/>
-                            <reg name="rbx" bitsize="64" regnum="1" type="int" group="general"/>
-                            <reg name="rcx" bitsize="64" regnum="2" type="int" group="general"/>
-                            <reg name="rdx" bitsize="64" regnum="3" type="int" group="general"/>
-                            <reg name="rsi" bitsize="64" regnum="4" type="int" group="general"/>
-                            <reg name="rdi" bitsize="64" regnum="5" type="int" group="general"/>
-                            <reg name="rbp" bitsize="64" regnum="6" type="data_ptr" group="general"/>
-                            <reg name="rsp" bitsize="64" regnum="7" type="data_ptr" group="general"/>
-                            <reg name="r8" bitsize="64"  regnum="8" type="int" group="general"/>
-                            <reg name="r9" bitsize="64"  regnum="9" type="int" group="general"/>
-                            <reg name="r10" bitsize="64" regnum="10" type="int" group="general"/>
-                            <reg name="r11" bitsize="64" regnum="11" type="int" group="general"/>
-                            <reg name="r12" bitsize="64" regnum="12" type="int" group="general"/>
-                            <reg name="r13" bitsize="64" regnum="13" type="int" group="general"/>
-                            <reg name="r14" bitsize="64" regnum="14" type="int" group="general"/>
-                            <reg name="r15" bitsize="64" regnum="15" type="int" group="general"/>
-                            <reg name="rip" bitsize="64" regnum="16" type="code_ptr" group="general"/>
-                            <reg name="eflags" bitsize="32" regnum="17" type="i386_eflags" group="general"/>
-    
-                            <reg name="cs" bitsize="32" regnum="18" type="int" group="general"/>
-                            <reg name="ss" bitsize="32" regnum="19" type="int" group="general"/>
-                            <reg name="ds" bitsize="32" regnum="20" type="int" group="general"/>
-                            <reg name="es" bitsize="32" regnum="21" type="int" group="general"/>
-                            <reg name="fs" bitsize="32" regnum="22" type="int" group="general"/>
-                            <reg name="gs" bitsize="32" regnum="23" type="int" group="general"/>
-    
-                            <reg name="st0" bitsize="80" regnum="24" type="i387_ext" group="float"/>
-                            <reg name="st1" bitsize="80" regnum="25" type="i387_ext" group="float"/>
-                            <reg name="st2" bitsize="80" regnum="26" type="i387_ext" group="float"/>
-                            <reg name="st3" bitsize="80" regnum="27" type="i387_ext" group="float"/>
-                            <reg name="st4" bitsize="80" regnum="28" type="i387_ext" group="float"/>
-                            <reg name="st5" bitsize="80" regnum="29" type="i387_ext" group="float"/>
-                            <reg name="st6" bitsize="80" regnum="30" type="i387_ext" group="float"/>
-                            <reg name="st7" bitsize="80" regnum="31" type="i387_ext" group="float"/>
-    
-                            <reg name="fctrl" bitsize="32" regnum="32" type="int" group="float"/>
-                            <reg name="fstat" bitsize="32" regnum="33" type="int" group="float"/>
-                            <reg name="ftag"  bitsize="32" regnum="34" type="int" group="float"/>
-                            <reg name="fiseg" bitsize="32" regnum="35" type="int" group="float"/>
-                            <reg name="fioff" bitsize="32" regnum="36" type="int" group="float"/>
-                            <reg name="foseg" bitsize="32" regnum="37" type="int" group="float"/>
-                            <reg name="fooff" bitsize="32" regnum="38" type="int" group="float"/>
-                            <reg name="fop"   bitsize="32" regnum="39" type="int" group="float"/>
-                          </feature>
-                        </target>""", False
-                else:
-                    return None, False
-
-            def qC(self):
-                return "QC1"
-
-            def haltReason(self):
-                return "T05thread:00000001;06:9038d60f00700000;07:98b4062680ffffff;10:c0d7bf1b80ffffff;"
-
-            def readRegister(self, register):
-                regs = {0x0: "00b0060000610000",
-                        0xa: "68fe471c80ffffff",
-                        0xc: "60574a1c80ffffff",
-                        0xd: "18f3042680ffffff",
-                        0xe: "be8a4d7142000000",
-                        0xf: "50df471c80ffffff",
-                        0x10: "c0d7bf1b80ffffff" }
-                if register in regs:
-                    return regs[register]
-                else:
-                    return "0000000000000000"
-
         self.server.responder = MyResponder()
         interp = self.dbg.GetCommandInterpreter()
         result = lldb.SBCommandReturnObject()
@@ -125,3 +124,22 @@
             interp.HandleCommand("target list", result)
             print(result.GetOutput())
         self.assertTrue(target.GetTriple().startswith('x86_64-unknown-unknown'))
+
+    @skipIfXmlSupportMissing
+    @skipIfRemote
+    def test_register_augmentation(self):
+        """
+        Test that we correctly associate the register info with the eh_frame
+        register numbers.
+        """
+
+        target = self.createTarget("basic_eh_frame.yaml")
+        self.server.responder = MyResponder()
+
+        process = self.connect(target)
+        lldbutil.expect_state_changes(self, self.dbg.GetListener(), process,
+                [lldb.eStateStopped])
+        self.filecheck("image show-unwind -n foo", __file__,
+            "--check-prefix=UNWIND")
+# UNWIND: eh_frame UnwindPlan:
+# UNWIND: row[0]:    0: CFA=rsp+128 => rip=[CFA-8]
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestThreadSelectionBug.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestThreadSelectionBug.py
index 400a936..0902202 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestThreadSelectionBug.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestThreadSelectionBug.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py
index 465a935..b7f19a1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/TestWriteMemory.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
@@ -7,6 +6,15 @@
 
 class TestWriteMemory(GDBRemoteTestBase):
 
+    def setUp(self):
+        super(TestWriteMemory, self).setUp()
+        self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+    def tearDown(self):
+        lldb.DBG.SetSelectedPlatform(self._initial_platform)
+        super(TestWriteMemory, self).tearDown()
+
+
     def test(self):
 
         class MyResponder(MockGDBServerResponder):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/basic_eh_frame.yaml b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/basic_eh_frame.yaml
new file mode 100644
index 0000000..384b9b9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/basic_eh_frame.yaml
@@ -0,0 +1,48 @@
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+  Entry:           0x0000000000401000
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x0000000000401000
+    AddressAlign:    0x0000000000000001
+    Content:         C3
+  - Name:            .eh_frame
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC ]
+    Address:         0x0000000000402000
+    AddressAlign:    0x0000000000000008
+    Content:         1800000000000000017A5200017810011B0C070890010E80010000001000000020000000DCEFFFFF0100000000000000
+Symbols:
+  - Name:            .text
+    Type:            STT_SECTION
+    Section:         .text
+    Value:           0x0000000000401000
+  - Name:            .eh_frame
+    Type:            STT_SECTION
+    Section:         .eh_frame
+    Value:           0x0000000000402000
+  - Name:            _start
+    Binding:         STB_GLOBAL
+  - Name:            __bss_start
+    Section:         .eh_frame
+    Binding:         STB_GLOBAL
+    Value:           0x0000000000404000
+  - Name:            foo
+    Section:         .text
+    Binding:         STB_GLOBAL
+    Value:           0x0000000000401000
+  - Name:            _edata
+    Section:         .eh_frame
+    Binding:         STB_GLOBAL
+    Value:           0x0000000000404000
+  - Name:            _end
+    Section:         .eh_frame
+    Binding:         STB_GLOBAL
+    Value:           0x0000000000404000
+...
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py
index f0875c9..392aeba 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/gdbclientutils.py
@@ -1,9 +1,10 @@
 import os
 import os.path
-import subprocess
 import threading
 import socket
 import lldb
+import binascii
+import traceback
 from lldbsuite.support import seven
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbtest_config
@@ -108,13 +109,15 @@
         if packet[0] == "g":
             return self.readRegisters()
         if packet[0] == "G":
-            return self.writeRegisters(packet[1:])
+            # Gxxxxxxxxxxx
+            # Gxxxxxxxxxxx;thread:1234;
+            return self.writeRegisters(packet[1:].split(';')[0])
         if packet[0] == "p":
             regnum = packet[1:].split(';')[0]
             return self.readRegister(int(regnum, 16))
         if packet[0] == "P":
             register, value = packet[1:].split("=")
-            return self.readRegister(int(register, 16), value)
+            return self.writeRegister(int(register, 16), value)
         if packet[0] == "m":
             addr, length = [int(x, 16) for x in packet[1:].split(',')]
             return self.readMemory(addr, length)
@@ -161,9 +164,34 @@
             return self.QListThreadsInStopReply()
         if packet.startswith("qMemoryRegionInfo:"):
             return self.qMemoryRegionInfo()
+        if packet == "qQueryGDBServer":
+            return self.qQueryGDBServer()
+        if packet == "qHostInfo":
+            return self.qHostInfo()
+        if packet == "qGetWorkingDir":
+            return self.qGetWorkingDir()
+        if packet == "qsProcessInfo":
+            return self.qsProcessInfo()
+        if packet.startswith("qfProcessInfo"):
+            return self.qfProcessInfo(packet)
 
         return self.other(packet)
 
+    def qsProcessInfo(self):
+        return "E04"
+
+    def qfProcessInfo(self, packet):
+        return "E04"
+
+    def qGetWorkingDir(self):
+        return "2f"
+
+    def qHostInfo(self):
+        return "ptrsize:8;endian:little;"
+
+    def qQueryGDBServer(self):
+        return "E04"
+
     def interrupt(self):
         raise self.UnexpectedPacketException()
 
@@ -172,7 +200,7 @@
 
     def vCont(self, packet):
         raise self.UnexpectedPacketException()
-    
+
     def readRegisters(self):
         return "00000000" * self.registerCount
 
@@ -297,7 +325,7 @@
         try:
             # accept() is stubborn and won't fail even when the socket is
             # shutdown, so we'll use a timeout
-            self._socket.settimeout(2.0)
+            self._socket.settimeout(20.0)
             client, client_addr = self._socket.accept()
             self._client = client
             # The connected client inherits its timeout from self._socket,
@@ -316,6 +344,8 @@
                     break
                 self._receive(data)
             except Exception as e:
+                print("An exception happened when receiving the response from the gdb server. Closing the client...")
+                traceback.print_exc()
                 self._client.close()
                 break
 
@@ -426,7 +456,6 @@
     class InvalidPacketException(Exception):
         pass
 
-
 class GDBRemoteTestBase(TestBase):
     """
     Base class for GDB client tests.
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system.py
index ad9b6fd..83180c5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system.py
@@ -1,5 +1,4 @@
 import lldb
-import struct
 
 
 class OperatingSystemPlugIn(object):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system_2.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system_2.py
index d8ebed6..91b2ffe 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system_2.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/gdb_remote_client/operating_system_2.py
@@ -1,5 +1,4 @@
 import lldb
-import struct
 
 
 class OperatingSystemPlugIn(object):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py
index 7956120..557b4a4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/history/TestHistoryRecall.py
@@ -2,12 +2,8 @@
 Make sure the !N and !-N commands work properly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
@@ -26,10 +22,6 @@
         """Test the !N and !-N functionality of the command interpreter."""
         self.sample_test()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def sample_test(self):
         interp = self.dbg.GetCommandInterpreter()
         result = lldb.SBCommandReturnObject()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
index ec3f321..36fdc86 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-assert/TestInferiorAssert.py
@@ -3,8 +3,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test import lldbutil
 from lldbsuite.test import lldbplatformutil
@@ -51,6 +49,7 @@
         archs=[
             "aarch64",
             "arm"],
+        triple=no_match(".*-android"),
         bugnumber="llvm.org/pr25338")
     @expectedFailureAll(bugnumber="llvm.org/pr26592", triple='^mips')
     @expectedFailureNetBSD
@@ -73,9 +72,8 @@
         bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
     @expectedFailureAll(
         oslist=["linux"],
-        archs=[
-            "aarch64",
-            "arm"],
+        archs=["arm"],
+        triple=no_match(".*-android"),
         bugnumber="llvm.org/pr25338")
     @expectedFailureAll(bugnumber="llvm.org/pr26592", triple='^mips')
     @expectedFailureNetBSD
@@ -89,9 +87,8 @@
         bugnumber="llvm.org/pr21793: need to implement support for detecting assertion / abort on Windows")
     @expectedFailureAll(
         oslist=["linux"],
-        archs=[
-            "aarch64",
-            "arm"],
+        archs=["arm"],
+        triple=no_match(".*-android"),
         bugnumber="llvm.org/pr25338")
     @expectedFailureAll(bugnumber="llvm.org/pr26592", triple='^mips')
     @expectedFailureNetBSD
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py
index b1b9f4b..95cdfb5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-changed/TestInferiorChanged.py
@@ -1,9 +1,7 @@
 """Test lldb reloads the inferior after it was changed during the session."""
 
-from __future__ import print_function
 
 
-import os
 import time
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
index 17c56e8..ee17ecc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashing.py
@@ -1,10 +1,7 @@
 """Test that lldb functions correctly after the inferior has crashed."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test import lldbutil
 from lldbsuite.test import lldbplatformutil
@@ -40,29 +37,6 @@
         self.build()
         self.inferior_crashing_expr()
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_inferior_crashing_step(self):
-        """Test that stepping after a crash behaves correctly."""
-        self.build()
-        self.inferior_crashing_step()
-
-    @skipIfTargetAndroid()  # debuggerd interferes with this test on Android
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_inferior_crashing_step_after_break(self):
-        """Test that lldb functions correctly after stepping through a crash."""
-        self.build()
-        self.inferior_crashing_step_after_break()
-
-    # Inferior exits after stepping after a segfault. This is working as
-    # intended IMHO.
-    @skipIfLinux
-    @skipIfFreeBSD
-    @expectedFailureNetBSD
-    def test_inferior_crashing_expr_step_and_expr(self):
-        """Test that lldb expressions work before and after stepping after a crash."""
-        self.build()
-        self.inferior_crashing_expr_step_expr()
-
     def set_breakpoint(self, line):
         lldbutil.run_break_set_by_file_and_line(
             self, "main.c", line, num_expected_locations=1, loc_exact=True)
@@ -158,79 +132,3 @@
 
         self.expect("p hello_world",
                     substrs=['Hello'])
-
-    def inferior_crashing_step(self):
-        """Test that lldb functions correctly after stepping through a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.set_breakpoint(self.line)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['main.c:%d' % self.line,
-                             'stop reason = breakpoint'])
-
-        self.runCmd("next")
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p argv[0]",
-                    substrs=['a.out'])
-        self.expect("p null_ptr",
-                    substrs=['= 0x0'])
-
-        # lldb should be able to read from registers from the inferior after
-        # crashing.
-        lldbplatformutil.check_first_register_readable(self)
-
-        # And it should report the correct line number.
-        self.expect("thread backtrace all",
-                    substrs=['main.c:%d' % self.line])
-
-    def inferior_crashing_step_after_break(self):
-        """Test that lldb behaves correctly when stepping after a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        expected_state = 'exited'  # Provide the exit code.
-        if self.platformIsDarwin():
-            # TODO: Determine why 'next' and 'continue' have no effect after a
-            # crash.
-            expected_state = 'stopped'
-
-        self.expect("next",
-                    substrs=['Process', expected_state])
-
-        if expected_state == 'exited':
-            self.expect(
-                "thread list",
-                error=True,
-                substrs=['Process must be launched'])
-        else:
-            self.check_stop_reason()
-
-    def inferior_crashing_expr_step_expr(self):
-        """Test that lldb expressions work before and after stepping after a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p argv[0]",
-                    substrs=['a.out'])
-
-        self.runCmd("next")
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p argv[0]",
-                    substrs=['a.out'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashingStep.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashingStep.py
new file mode 100644
index 0000000..afb8c23
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/TestInferiorCrashingStep.py
@@ -0,0 +1,228 @@
+"""Test that lldb steps correctly after the inferior has crashed."""
+
+
+import lldb
+from lldbsuite.test import lldbutil
+from lldbsuite.test import lldbplatformutil
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class CrashingInferiorStepTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+    @expectedFailureNetBSD
+    def test_inferior_crashing(self):
+        """Test that lldb reliably catches the inferior crashing (command)."""
+        self.build()
+        self.inferior_crashing()
+
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+    def test_inferior_crashing_register(self):
+        """Test that lldb reliably reads registers from the inferior after crashing (command)."""
+        self.build()
+        self.inferior_crashing_registers()
+
+    @add_test_categories(['pyapi'])
+    def test_inferior_crashing_python(self):
+        """Test that lldb reliably catches the inferior crashing (Python API)."""
+        self.build()
+        self.inferior_crashing_python()
+
+    def test_inferior_crashing_expr(self):
+        """Test that the lldb expression interpreter can read from the inferior after crashing (command)."""
+        self.build()
+        self.inferior_crashing_expr()
+
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+    def test_inferior_crashing_step(self):
+        """Test that stepping after a crash behaves correctly."""
+        self.build()
+        self.inferior_crashing_step()
+
+    @skipIfTargetAndroid()  # debuggerd interferes with this test on Android
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+    def test_inferior_crashing_step_after_break(self):
+        """Test that lldb functions correctly after stepping through a crash."""
+        self.build()
+        self.inferior_crashing_step_after_break()
+
+    # Inferior exits after stepping after a segfault. This is working as
+    # intended IMHO.
+    @skipIfLinux
+    @skipIfFreeBSD
+    @expectedFailureNetBSD
+    def test_inferior_crashing_expr_step_and_expr(self):
+        """Test that lldb expressions work before and after stepping after a crash."""
+        self.build()
+        self.inferior_crashing_expr_step_expr()
+
+    def set_breakpoint(self, line):
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", line, num_expected_locations=1, loc_exact=True)
+
+    def check_stop_reason(self):
+        # We should have one crashing thread
+        self.assertEqual(
+            len(
+                lldbutil.get_crashed_threads(
+                    self,
+                    self.dbg.GetSelectedTarget().GetProcess())), 1,
+            STOPPED_DUE_TO_EXC_BAD_ACCESS)
+
+    def get_api_stop_reason(self):
+        return lldb.eStopReasonException
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number of the crash.
+        self.line = line_number('main.c', '// Crash here.')
+
+    def inferior_crashing(self):
+        """Inferior crashes upon launching; lldb should catch the event and stop."""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+        # The exact stop reason depends on the platform
+        if self.platformIsDarwin():
+            stop_reason = 'stop reason = EXC_BAD_ACCESS'
+        elif self.getPlatform() == "linux" or self.getPlatform() == "freebsd":
+            stop_reason = 'stop reason = signal SIGSEGV'
+        else:
+            stop_reason = 'stop reason = invalid address'
+        self.expect(
+            "thread list",
+            STOPPED_DUE_TO_EXC_BAD_ACCESS,
+            substrs=['stopped', stop_reason])
+
+        # And it should report the correct line number.
+        self.expect(
+            "thread backtrace all",
+            substrs=[stop_reason, 'main.c:%d' % self.line])
+
+    def inferior_crashing_python(self):
+        """Inferior crashes upon launching; lldb should catch the event and stop."""
+        exe = self.getBuildArtifact("a.out")
+
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # Now launch the process, and do not stop at entry point.
+        # Both argv and envp are null.
+        process = target.LaunchSimple(None, None,
+                                      self.get_process_working_directory())
+
+        if process.GetState() != lldb.eStateStopped:
+            self.fail("Process should be in the 'stopped' state, "
+                      "instead the actual state is: '%s'" %
+                      lldbutil.state_type_to_str(process.GetState()))
+
+        threads = lldbutil.get_crashed_threads(self, process)
+        self.assertEqual(
+            len(threads), 1,
+            "Failed to stop the thread upon bad access exception")
+
+        if self.TraceOn():
+            lldbutil.print_stacktrace(threads[0])
+
+    def inferior_crashing_registers(self):
+        """Test that lldb can read registers after crashing."""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.check_stop_reason()
+
+        # lldb should be able to read from registers from the inferior after
+        # crashing.
+        lldbplatformutil.check_first_register_readable(self)
+
+    def inferior_crashing_expr(self):
+        """Test that the lldb expression interpreter can read symbols after crashing."""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.check_stop_reason()
+
+        # The lldb expression interpreter should be able to read from addresses
+        # of the inferior after a crash.
+        self.expect("p argc", startstr='(int) $0 = 1')
+
+        self.expect("p hello_world", substrs=['Hello'])
+
+    def inferior_crashing_step(self):
+        """Test that lldb functions correctly after stepping through a crash."""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.set_breakpoint(self.line)
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.expect(
+            "thread list",
+            STOPPED_DUE_TO_BREAKPOINT,
+            substrs=['main.c:%d' % self.line, 'stop reason = breakpoint'])
+
+        self.runCmd("next")
+        self.check_stop_reason()
+
+        # The lldb expression interpreter should be able to read from addresses
+        # of the inferior after a crash.
+        self.expect("p argv[0]", substrs=['a.out'])
+        self.expect("p null_ptr", substrs=['= 0x0'])
+
+        # lldb should be able to read from registers from the inferior after
+        # crashing.
+        lldbplatformutil.check_first_register_readable(self)
+
+        # And it should report the correct line number.
+        self.expect("thread backtrace all", substrs=['main.c:%d' % self.line])
+
+    @expectedFailureNetBSD
+    def inferior_crashing_step_after_break(self):
+        """Test that lldb behaves correctly when stepping after a crash."""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.check_stop_reason()
+
+        expected_state = 'exited'  # Provide the exit code.
+        if self.platformIsDarwin():
+            # TODO: Determine why 'next' and 'continue' have no effect after a
+            # crash.
+            expected_state = 'stopped'
+
+        self.expect("next", substrs=['Process', expected_state])
+
+        if expected_state == 'exited':
+            self.expect(
+                "thread list",
+                error=True,
+                substrs=['Process must be launched'])
+        else:
+            self.check_stop_reason()
+
+    def inferior_crashing_expr_step_expr(self):
+        """Test that lldb expressions work before and after stepping after a crash."""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.check_stop_reason()
+
+        # The lldb expression interpreter should be able to read from addresses
+        # of the inferior after a crash.
+        self.expect("p argv[0]", substrs=['a.out'])
+
+        self.runCmd("next")
+        self.check_stop_reason()
+
+        # The lldb expression interpreter should be able to read from addresses
+        # of the inferior after a crash.
+        self.expect("p argv[0]", substrs=['a.out'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
index 0f8e92e..eb07d2f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-CFLAGS_EXTRAS += -fomit-frame-pointer
+CFLAGS_EXTRAS := -fomit-frame-pointer
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
index f678b0c..3044e5e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferior.py
@@ -1,10 +1,7 @@
 """Test that lldb functions correctly after the inferior has crashed while in a recursive routine."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -40,29 +37,6 @@
         self.build()
         self.recursive_inferior_crashing_expr()
 
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_recursive_inferior_crashing_step(self):
-        """Test that stepping after a crash behaves correctly."""
-        self.build()
-        self.recursive_inferior_crashing_step()
-
-    @skipIfTargetAndroid()  # debuggerd interferes with this test on Android
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    def test_recursive_inferior_crashing_step_after_break(self):
-        """Test that lldb functions correctly after stepping through a crash."""
-        self.build()
-        self.recursive_inferior_crashing_step_after_break()
-
-    # Inferior exits after stepping after a segfault. This is working as
-    # intended IMHO.
-    @skipIfLinux
-    @skipIfFreeBSD
-    @expectedFailureNetBSD
-    def test_recursive_inferior_crashing_expr_step_and_expr(self):
-        """Test that lldb expressions work before and after stepping after a crash."""
-        self.build()
-        self.recursive_inferior_crashing_expr_step_expr()
-
     def set_breakpoint(self, line):
         lldbutil.run_break_set_by_file_and_line(
             self, "main.c", line, num_expected_locations=1, loc_exact=True)
@@ -165,77 +139,3 @@
         self.expect("p i",
                     startstr='(int) $0 =')
 
-    def recursive_inferior_crashing_step(self):
-        """Test that lldb functions correctly after stepping through a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.set_breakpoint(self.line)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['main.c:%d' % self.line,
-                             'stop reason = breakpoint'])
-
-        self.runCmd("next")
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p i",
-                    substrs=['(int) $0 ='])
-
-        # lldb should be able to read from registers from the inferior after
-        # crashing.
-        lldbplatformutil.check_first_register_readable(self)
-
-        # And it should report the correct line number.
-        self.expect("thread backtrace all",
-                    substrs=['main.c:%d' % self.line])
-
-    def recursive_inferior_crashing_step_after_break(self):
-        """Test that lldb behaves correctly when stepping after a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        expected_state = 'exited'  # Provide the exit code.
-        if self.platformIsDarwin():
-            # TODO: Determine why 'next' and 'continue' have no effect after a
-            # crash.
-            expected_state = 'stopped'
-
-        self.expect("next",
-                    substrs=['Process', expected_state])
-
-        if expected_state == 'exited':
-            self.expect(
-                "thread list",
-                error=True,
-                substrs=['Process must be launched'])
-        else:
-            self.check_stop_reason()
-
-    def recursive_inferior_crashing_expr_step_expr(self):
-        """Test that lldb expressions work before and after stepping after a crash."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-        self.check_stop_reason()
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a crash.
-        self.expect("p null",
-                    startstr='(char *) $0 = 0x0')
-
-        self.runCmd("next")
-
-        # The lldb expression interpreter should be able to read from addresses
-        # of the inferior after a step.
-        self.expect("p null",
-                    startstr='(char *) $1 = 0x0')
-
-        self.check_stop_reason()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
new file mode 100644
index 0000000..e63172f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py
@@ -0,0 +1,126 @@
+"""Test that lldb steps correctly after the inferior has crashed while in a recursive routine."""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbplatformutil
+from lldbsuite.test import lldbutil
+
+
+class CrashingRecursiveInferiorStepTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+    def test_recursive_inferior_crashing_step(self):
+        """Test that stepping after a crash behaves correctly."""
+        self.build()
+        self.recursive_inferior_crashing_step()
+
+    @skipIfTargetAndroid()  # debuggerd interferes with this test on Android
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+    def test_recursive_inferior_crashing_step_after_break(self):
+        """Test that lldb functions correctly after stepping through a crash."""
+        self.build()
+        self.recursive_inferior_crashing_step_after_break()
+
+    # Inferior exits after stepping after a segfault. This is working as
+    # intended IMHO.
+    @skipIfLinux
+    @skipIfFreeBSD
+    @expectedFailureNetBSD
+    def test_recursive_inferior_crashing_expr_step_and_expr(self):
+        """Test that lldb expressions work before and after stepping after a crash."""
+        self.build()
+        self.recursive_inferior_crashing_expr_step_expr()
+
+    def set_breakpoint(self, line):
+        lldbutil.run_break_set_by_file_and_line(
+            self, "main.c", line, num_expected_locations=1, loc_exact=True)
+
+    def check_stop_reason(self):
+        # We should have one crashing thread
+        self.assertEqual(
+            len(
+                lldbutil.get_crashed_threads(
+                    self,
+                    self.dbg.GetSelectedTarget().GetProcess())), 1,
+            STOPPED_DUE_TO_EXC_BAD_ACCESS)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number of the crash.
+        self.line = line_number('main.c', '// Crash here.')
+
+    def recursive_inferior_crashing_step(self):
+        """Test that lldb functions correctly after stepping through a crash."""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.set_breakpoint(self.line)
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.expect(
+            "thread list",
+            STOPPED_DUE_TO_BREAKPOINT,
+            substrs=['main.c:%d' % self.line, 'stop reason = breakpoint'])
+
+        self.runCmd("next")
+        self.check_stop_reason()
+
+        # The lldb expression interpreter should be able to read from addresses
+        # of the inferior after a crash.
+        self.expect("p i", substrs=['(int) $0 ='])
+
+        # lldb should be able to read from registers from the inferior after
+        # crashing.
+        lldbplatformutil.check_first_register_readable(self)
+
+        # And it should report the correct line number.
+        self.expect("thread backtrace all", substrs=['main.c:%d' % self.line])
+
+    def recursive_inferior_crashing_step_after_break(self):
+        """Test that lldb behaves correctly when stepping after a crash."""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.check_stop_reason()
+
+        expected_state = 'exited'  # Provide the exit code.
+        if self.platformIsDarwin():
+            # TODO: Determine why 'next' and 'continue' have no effect after a
+            # crash.
+            expected_state = 'stopped'
+
+        self.expect("next", substrs=['Process', expected_state])
+
+        if expected_state == 'exited':
+            self.expect(
+                "thread list",
+                error=True,
+                substrs=['Process must be launched'])
+        else:
+            self.check_stop_reason()
+
+    def recursive_inferior_crashing_expr_step_expr(self):
+        """Test that lldb expressions work before and after stepping after a crash."""
+        exe = self.getBuildArtifact("a.out")
+        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+        self.runCmd("run", RUN_SUCCEEDED)
+        self.check_stop_reason()
+
+        # The lldb expression interpreter should be able to read from addresses
+        # of the inferior after a crash.
+        self.expect("p null", startstr='(char *) $0 = 0x0')
+
+        self.runCmd("next")
+
+        # The lldb expression interpreter should be able to read from addresses
+        # of the inferior after a step.
+        self.expect("p null", startstr='(char *) $1 = 0x0')
+
+        self.check_stop_reason()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
index 532f495..362b89d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../make
-
 CXX_SOURCES := calling.cpp
 
 ifneq (,$(findstring icc,$(CC)))
-    CXXFLAGS += -debug inline-debug-info
+    CXXFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
-include $(LEVEL)/Makefile.rules
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py
index 4513db2..40e29e6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/inline-stepping/TestInlineStepping.py
@@ -1,11 +1,7 @@
 """Test stepping over and into inlined functions."""
 
-from __future__ import print_function
 
 
-import os
-import time
-import sys
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -21,6 +17,8 @@
         compiler="icc",
         bugnumber="# Not really a bug.  ICC combines two inlined functions.")
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
+    @expectedFailureAll(archs=["aarch64"], oslist=["linux"],
+                        bugnumber="llvm.org/pr44057")
     def test_with_python_api(self):
         """Test stepping over and into inlined functions."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile
index f94c29b..357b1f8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile
@@ -1,13 +1,9 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
 all: a.out simple
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 simple:
-	$(MAKE) VPATH=$(VPATH) -f $(SRCDIR)/simple.mk
-
-clean::
-	$(MAKE) -f $(SRCDIR)/simple.mk clean
\ No newline at end of file
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		C_SOURCES=simple.c EXE=simple
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
index 90d3a2c..4bd4150 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/TestJITLoaderGDB.py
@@ -1,6 +1,5 @@
 """Test for the JITLoaderGDB interface"""
 
-from __future__ import print_function
 
 import unittest2
 import os
@@ -8,7 +7,6 @@
 from lldbsuite.test import lldbutil
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
-import re
 
 file_index = 0
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.mk
deleted file mode 100644
index 9f0c1655..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := simple.c
-EXE = simple
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
deleted file mode 100644
index b1e8942..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/launch_with_shellexpand/TestLaunchWithShellExpand.py
+++ /dev/null
@@ -1,122 +0,0 @@
-"""
-Test that argdumper is a viable launching strategy.
-"""
-from __future__ import print_function
-
-
-import lldb
-import os
-import time
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LaunchWithShellExpandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=[
-            "windows",
-            "linux",
-            "freebsd"],
-        bugnumber="llvm.org/pr24778 llvm.org/pr22627")
-    @skipIfDarwinEmbedded # iOS etc don't launch the binary via a shell, so arg expansion won't happen
-    @expectedFailureNetBSD
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        self.runCmd("target create %s" % exe)
-
-        # Create the target
-        target = self.dbg.CreateTarget(exe)
-
-        # Create any breakpoints we need
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            'break here', lldb.SBFileSpec("main.cpp", False))
-        self.assertTrue(breakpoint, VALID_BREAKPOINT)
-
-        self.runCmd(
-            "process launch -X true -w %s -- fi*.tx? () > <" %
-            (self.getSourceDir()))
-
-        process = self.process()
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        thread = process.GetThreadAtIndex(0)
-
-        self.assertTrue(thread.IsValid(),
-                        "Process stopped at 'main' should have a valid thread")
-
-        stop_reason = thread.GetStopReason()
-
-        self.assertTrue(
-            stop_reason == lldb.eStopReasonBreakpoint,
-            "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint")
-
-        self.expect("frame variable argv[1]", substrs=['file1.txt'])
-        self.expect("frame variable argv[2]", substrs=['file2.txt'])
-        self.expect("frame variable argv[3]", substrs=['file3.txt'])
-        self.expect("frame variable argv[4]", substrs=['file4.txy'])
-        self.expect("frame variable argv[5]", substrs=['()'])
-        self.expect("frame variable argv[6]", substrs=['>'])
-        self.expect("frame variable argv[7]", substrs=['<'])
-        self.expect(
-            "frame variable argv[5]",
-            substrs=['file5.tyx'],
-            matching=False)
-        self.expect(
-            "frame variable argv[8]",
-            substrs=['file5.tyx'],
-            matching=False)
-
-        self.runCmd("process kill")
-
-        self.runCmd(
-            'process launch -X true -w %s -- "foo bar"' %
-            (self.getSourceDir()))
-
-        process = self.process()
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        thread = process.GetThreadAtIndex(0)
-
-        self.assertTrue(thread.IsValid(),
-                        "Process stopped at 'main' should have a valid thread")
-
-        stop_reason = thread.GetStopReason()
-
-        self.assertTrue(
-            stop_reason == lldb.eStopReasonBreakpoint,
-            "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint")
-
-        self.expect("frame variable argv[1]", substrs=['foo bar'])
-
-        self.runCmd("process kill")
-
-        self.runCmd('process launch -X true -w %s -- foo\ bar'
-                    % (self.getBuildDir()))
-
-        process = self.process()
-
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        STOPPED_DUE_TO_BREAKPOINT)
-
-        thread = process.GetThreadAtIndex(0)
-
-        self.assertTrue(thread.IsValid(),
-                        "Process stopped at 'main' should have a valid thread")
-
-        stop_reason = thread.GetStopReason()
-
-        self.assertTrue(
-            stop_reason == lldb.eStopReasonBreakpoint,
-            "Thread in process stopped in 'main' should have a stop reason of eStopReasonBreakpoint")
-
-        self.expect("frame variable argv[1]", substrs=['foo bar'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/Makefile
new file mode 100644
index 0000000..3d0b98f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/Makefile
@@ -0,0 +1,2 @@
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/TestLazyLoading.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/TestLazyLoading.py
new file mode 100644
index 0000000..dddd4dc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/TestLazyLoading.py
@@ -0,0 +1,236 @@
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+"""
+This test ensures that we only create Clang AST nodes in our module AST
+when we actually need them.
+
+All tests in this file behave like this:
+  1. Use LLDB to do something (expression evaluation, breakpoint setting, etc.).
+  2. Check that certain Clang AST nodes were not loaded during the previous
+     step.
+"""
+
+class TestCase(TestBase):
+
+    NO_DEBUG_INFO_TESTCASE = True
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+      TestBase.setUp(self)
+      # Only build this test once.
+      self.build()
+
+    # Clang declaration kind we are looking for.
+    class_decl_kind = "CXXRecordDecl"
+    # FIXME: This shouldn't be a CXXRecordDecl, but that's how we model
+    # structs in Clang.
+    struct_decl_kind = "CXXRecordDecl"
+
+    # The decls we use in this program in the format that
+    # decl_in_line and decl_completed_in_line expect (which is a pair of
+    # node type and the unqualified declaration name.
+    struct_first_member_decl = [struct_decl_kind, "StructFirstMember"]
+    struct_behind_ptr_decl = [struct_decl_kind, "StructBehindPointer"]
+    struct_behind_ref_decl = [struct_decl_kind, "StructBehindRef"]
+    struct_member_decl = [struct_decl_kind, "StructMember"]
+    some_struct_decl = [struct_decl_kind, "SomeStruct"]
+    other_struct_decl = [struct_decl_kind, "OtherStruct"]
+    class_in_namespace_decl = [class_decl_kind, "ClassInNamespace"]
+    class_we_enter_decl = [class_decl_kind, "ClassWeEnter"]
+    class_member_decl = [struct_decl_kind, "ClassMember"]
+    unused_class_member_decl = [struct_decl_kind, "UnusedClassMember"]
+    unused_class_member_ptr_decl = [struct_decl_kind, "UnusedClassMemberPtr"]
+
+    def assert_no_decls_loaded(self):
+        """
+        Asserts that no known declarations in this test are loaded
+        into the module's AST.
+        """
+        self.assert_decl_not_loaded(self.struct_first_member_decl)
+        self.assert_decl_not_loaded(self.struct_behind_ptr_decl)
+        self.assert_decl_not_loaded(self.struct_behind_ref_decl)
+        self.assert_decl_not_loaded(self.struct_member_decl)
+        self.assert_decl_not_loaded(self.some_struct_decl)
+        self.assert_decl_not_loaded(self.other_struct_decl)
+        self.assert_decl_not_loaded(self.class_in_namespace_decl)
+        self.assert_decl_not_loaded(self.class_member_decl)
+        self.assert_decl_not_loaded(self.unused_class_member_decl)
+
+    def get_ast_dump(self):
+        """Returns the dumped Clang AST of the module as a string"""
+        res = lldb.SBCommandReturnObject()
+        ci = self.dbg.GetCommandInterpreter()
+        ci.HandleCommand('target modules dump ast a.out', res)
+        self.assertTrue(res.Succeeded())
+        return res.GetOutput()
+
+    def decl_in_line(self, line, decl):
+        """
+        Returns true iff the given line declares the given Clang decl.
+        The line is expected to be in the form of Clang's AST dump.
+        """
+        line = line.rstrip() + "\n"
+        decl_kind = "-" + decl[0] + " "
+        # Either the decl is somewhere in the line or at the end of
+        # the line.
+        decl_name = " " + decl[1] + " "
+        decl_name_eol = " " + decl[1] + "\n"
+        if not decl_kind in line:
+          return False
+        return decl_name in line or decl_name_eol in line
+
+    def decl_completed_in_line(self, line, decl):
+        """
+        Returns true iff the given line declares the given Clang decl and
+        the decl was completed (i.e., it has no undeserialized declarations
+        in it).
+        """
+        return self.decl_in_line(line, decl) and not "<undeserialized declarations>" in line
+
+    # The following asserts are used for checking if certain Clang declarations
+    # were loaded or not since the target was created.
+
+    def assert_decl_loaded(self, decl):
+        """
+        Asserts the given decl is currently loaded.
+        Note: This test is about checking that types/declarations are not
+        loaded. If this assert fails it is usually fine to turn it into a
+        assert_decl_not_loaded or assert_decl_not_completed assuming LLDB's
+        functionality has not suffered by not loading this declaration.
+        """
+        ast = self.get_ast_dump()
+        found = False
+        for line in ast.splitlines():
+          if self.decl_in_line(line, decl):
+            found = True
+            self.assertTrue(self.decl_completed_in_line(line, decl),
+                            "Should have called assert_decl_not_completed")
+        self.assertTrue(found, "Declaration no longer loaded " + str(decl) +
+            ".\nAST:\n" + ast)
+
+    def assert_decl_not_completed(self, decl):
+        """
+        Asserts that the given decl is currently not completed in the module's
+        AST. It may be loaded but then can can only contain undeserialized
+        declarations.
+        """
+        ast = self.get_ast_dump()
+        found = False
+        for line in ast.splitlines():
+          error_msg = "Unexpected completed decl: '" + line + "'.\nAST:\n" + ast
+          self.assertFalse(self.decl_completed_in_line(line, decl), error_msg)
+
+    def assert_decl_not_loaded(self, decl):
+        """
+        Asserts that the given decl is currently not loaded in the module's
+        AST.
+        """
+        ast = self.get_ast_dump()
+        found = False
+        for line in ast.splitlines():
+          error_msg = "Unexpected loaded decl: '" + line + "'\nAST:\n" + ast
+          self.assertFalse(self.decl_in_line(line, decl), error_msg)
+
+
+    def clean_setup(self, location):
+        """
+        Runs to the line with the source line with the given location string
+        and ensures that our module AST is empty.
+        """
+        lldbutil.run_to_source_breakpoint(self,
+            "// Location: " + location, lldb.SBFileSpec("main.cpp"))
+        # Make sure no declarations are loaded initially.
+        self.assert_no_decls_loaded()
+
+    @add_test_categories(["dwarf"])
+    def test_arithmetic_expression_in_main(self):
+        """ Runs a simple arithmetic expression which should load nothing. """
+        self.clean_setup(location="multiple locals function")
+
+        self.expect("expr 1 + (int)2.0", substrs=['(int) $0'])
+
+        # This should not have loaded any decls.
+        self.assert_no_decls_loaded()
+
+    @add_test_categories(["dwarf"])
+    def test_printing_local_variable_in_other_struct_func(self):
+        """
+        Prints a local variable and makes sure no unrelated types are loaded.
+        """
+        self.clean_setup(location="other struct function")
+
+        self.expect("expr other_struct_var", substrs=['(OtherStruct) $0'])
+        # The decl we run on was loaded.
+        self.assert_decl_loaded(self.other_struct_decl)
+
+        # This should not have loaded anything else.
+        self.assert_decl_not_loaded(self.some_struct_decl)
+        self.assert_decl_not_loaded(self.class_in_namespace_decl)
+
+    @add_test_categories(["dwarf"])
+    def test_printing_struct_with_multiple_locals(self):
+        """
+        Prints a local variable and checks that we don't load other local
+        variables.
+        """
+        self.clean_setup(location="multiple locals function")
+
+        self.expect("expr struct_var", substrs=['(SomeStruct) $0'])
+
+        # We loaded SomeStruct and its member types for printing.
+        self.assert_decl_loaded(self.some_struct_decl)
+        self.assert_decl_loaded(self.struct_behind_ptr_decl)
+        self.assert_decl_loaded(self.struct_behind_ref_decl)
+
+        # FIXME: We don't use these variables, but we seem to load all local
+        # local variables.
+        self.assert_decl_not_completed(self.other_struct_decl)
+        self.assert_decl_not_completed(self.class_in_namespace_decl)
+
+    @add_test_categories(["dwarf"])
+    def test_addr_of_struct(self):
+        """
+        Prints the address of a local variable (which is a struct).
+        """
+        self.clean_setup(location="multiple locals function")
+
+        self.expect("expr &struct_var", substrs=['(SomeStruct *) $0'])
+
+        # We loaded SomeStruct.
+        self.assert_decl_loaded(self.some_struct_decl)
+
+        # The member declarations should not be completed.
+        self.assert_decl_not_completed(self.struct_behind_ptr_decl)
+        self.assert_decl_not_completed(self.struct_behind_ref_decl)
+
+        # FIXME: The first member was behind a pointer so it shouldn't be
+        # completed. Somehow LLDB really wants to load the first member, so
+        # that is why have it defined here.
+        self.assert_decl_loaded(self.struct_first_member_decl)
+
+        # FIXME: We don't use these variables, but we seem to load all local
+        # local variables.
+        self.assert_decl_not_completed(self.other_struct_decl)
+        self.assert_decl_not_completed(self.class_in_namespace_decl)
+
+    @add_test_categories(["dwarf"])
+    def test_class_function_access_member(self):
+        self.clean_setup(location="class function")
+
+        self.expect("expr member", substrs=['(ClassMember) $0'])
+
+        # We loaded the current class we touched.
+        self.assert_decl_loaded(self.class_we_enter_decl)
+        # We loaded the unused members of this class.
+        self.assert_decl_loaded(self.unused_class_member_decl)
+        self.assert_decl_not_completed(self.unused_class_member_ptr_decl)
+        # We loaded the member we used.
+        self.assert_decl_loaded(self.class_member_decl)
+
+        # This should not have loaded anything else.
+        self.assert_decl_not_loaded(self.other_struct_decl)
+        self.assert_decl_not_loaded(self.some_struct_decl)
+        self.assert_decl_not_loaded(self.class_in_namespace_decl)
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/main.cpp
new file mode 100644
index 0000000..34d62b4
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/lazy-loading/main.cpp
@@ -0,0 +1,69 @@
+//----------------------------------------------------------------------------//
+// Struct loading declarations.
+
+struct StructFirstMember { int i; };
+struct StructBehindPointer { int i; };
+struct StructBehindRef { int i; };
+struct StructMember { int i; };
+
+StructBehindRef struct_instance;
+
+struct SomeStruct {
+  StructFirstMember *first;
+  StructBehindPointer *ptr;
+  StructMember member;
+  StructBehindRef &ref = struct_instance;
+};
+
+struct OtherStruct {
+  int member_int;
+};
+
+//----------------------------------------------------------------------------//
+// Class loading declarations.
+
+struct ClassMember { int i; };
+struct UnusedClassMember { int i; };
+struct UnusedClassMemberPtr { int i; };
+
+namespace NS {
+class ClassInNamespace {
+  int i;
+};
+class ClassWeEnter {
+public:
+  int dummy; // Prevent bug where LLDB always completes first member.
+  ClassMember member;
+  UnusedClassMember unused_member;
+  UnusedClassMemberPtr *unused_member_ptr;
+  int enteredFunction() {
+    return member.i; // Location: class function
+  }
+};
+};
+
+//----------------------------------------------------------------------------//
+// Function we can stop in.
+
+int functionWithOtherStruct() {
+  OtherStruct other_struct_var;
+  other_struct_var.member_int++; // Location: other struct function
+  return other_struct_var.member_int;
+}
+
+int functionWithMultipleLocals() {
+  SomeStruct struct_var;
+  OtherStruct other_struct_var;
+  NS::ClassInNamespace namespace_class;
+  other_struct_var.member_int++; // Location: multiple locals function
+  return other_struct_var.member_int;
+}
+
+int main(int argc, char **argv) {
+  NS::ClassWeEnter c;
+  c.enteredFunction();
+
+  functionWithOtherStruct();
+  functionWithMultipleLocals();
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile
index 6574478..00054aa 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile
@@ -1,30 +1,32 @@
-LEVEL := ../../make
-
-LIB_PREFIX := loadunload_
-
-LD_EXTRAS := -L. -l$(LIB_PREFIX)d
+LD_EXTRAS := -L. -lloadunload_d
 CXX_SOURCES := main.cpp
 USE_LIBDL := 1
 
-include $(LEVEL)/Makefile.rules
+a.out: lib_b lib_a lib_c lib_d hidden_lib_d
 
-a.out: lib_a lib_b lib_c lib_d hidden_lib_d install_name_tool
+include Makefile.rules
 
-lib_%:
-	$(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/$*.mk
+lib_a: lib_b
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=loadunload_a \
+		LD_EXTRAS="-L. -lloadunload_b"
 
-install_name_tool:
+lib_b:
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=loadunload_b
+
+lib_c:
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=loadunload_c
+
+lib_d:
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d
 ifeq ($(OS),Darwin)
 	install_name_tool -id @executable_path/libloadunload_d.dylib libloadunload_d.dylib
 endif
 
-
 hidden_lib_d:
-	$(MAKE) VPATH=$(SRCDIR)/hidden -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile
-
-clean::
-	$(MAKE) -f $(SRCDIR)/a.mk clean
-	$(MAKE) -f $(SRCDIR)/b.mk clean
-	$(MAKE) -f $(SRCDIR)/c.mk clean
-	$(MAKE) -f $(SRCDIR)/d.mk clean
-	$(MAKE) -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile clean
+	mkdir -p hidden
+	$(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
index 59412cb..ae0934c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/TestLoadUnload.py
@@ -6,7 +6,6 @@
 
 
 import os
-import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
@@ -93,6 +92,13 @@
                         "Unable copy 'libloadunload_d.so' to '%s'.\n>>> %s" %
                         (wd, err.GetCString()))
 
+    def setSvr4Support(self, enabled):
+        self.runCmd(
+            "settings set plugin.process.gdb-remote.use-libraries-svr4 {enabled}".format(
+                enabled="true" if enabled else "false"
+            )
+        )
+
     # libloadunload_d.so does not appear in the image list because executable
     # dependencies are resolved relative to the debuggers PWD. Bug?
     @expectedFailureAll(oslist=["linux"])
@@ -224,6 +230,20 @@
     @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
     @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
     def test_lldb_process_load_and_unload_commands(self):
+        self.setSvr4Support(False)
+        self.run_lldb_process_load_and_unload_commands()
+
+    @expectedFailureAll(
+        bugnumber="llvm.org/pr25805",
+        hostoslist=["windows"],
+        triple='.*-android')
+    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
+    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
+    def test_lldb_process_load_and_unload_commands_with_svr4(self):
+        self.setSvr4Support(True)
+        self.run_lldb_process_load_and_unload_commands()
+
+    def run_lldb_process_load_and_unload_commands(self):
         """Test that lldb process load/unload command work correctly."""
         self.copy_shlibs_to_remote()
 
@@ -260,7 +280,7 @@
             "process load %s --install=%s" % (localDylibPath, remoteDylibPath),
             "%s loaded correctly" % dylibName,
             patterns=[
-                'Loading "%s".*ok' % localDylibPath,
+                'Loading "%s".*ok' % re.escape(localDylibPath),
                 'Image [0-9]+ loaded'])
 
         # Search for and match the "Image ([0-9]+) loaded" pattern.
@@ -295,6 +315,15 @@
 
     @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
     def test_load_unload(self):
+        self.setSvr4Support(False)
+        self.run_load_unload()
+
+    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
+    def test_load_unload_with_svr4(self):
+        self.setSvr4Support(True)
+        self.run_load_unload()
+
+    def run_load_unload(self):
         """Test breakpoint by name works correctly with dlopen'ing."""
         self.copy_shlibs_to_remote()
 
@@ -334,7 +363,21 @@
 
     @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
     @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
+    @expectedFailureAll(archs="aarch64", oslist="linux",
+                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=27806")
     def test_step_over_load(self):
+        self.setSvr4Support(False)
+        self.run_step_over_load()
+
+    @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
+    @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
+    @expectedFailureAll(archs="aarch64", oslist="linux",
+                        bugnumber="https://bugs.llvm.org/show_bug.cgi?id=27806")
+    def test_step_over_load_with_svr4(self):
+        self.setSvr4Support(True)
+        self.run_step_over_load()
+
+    def run_step_over_load(self):
         """Test stepping over code that loads a shared library works correctly."""
         self.copy_shlibs_to_remote()
 
@@ -363,7 +406,7 @@
 
     # We can't find a breakpoint location for d_init before launching because
     # executable dependencies are resolved relative to the debuggers PWD. Bug?
-    @expectedFailureAll(oslist=["linux"])
+    @expectedFailureAll(oslist=["linux"], triple=no_match('aarch64-.*-android'))
     @skipIfFreeBSD  # llvm.org/pr14424 - missing FreeBSD Makefiles/testcase support
     @skipIfWindows  # Windows doesn't have dlopen and friends, dynamic libraries work differently
     @expectedFailureNetBSD
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk
deleted file mode 100644
index fddca92..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-LEVEL := ../../make
-
-LIB_PREFIX := loadunload_
-
-LD_EXTRAS := -L. -l$(LIB_PREFIX)b
-
-DYLIB_NAME := $(LIB_PREFIX)a
-DYLIB_CXX_SOURCES := a.cpp
-DYLIB_ONLY := YES
-
-include $(LEVEL)/Makefile.rules
-
-$(DYLIB_FILENAME): lib_b
-
-.PHONY lib_b:
-	$(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/b.mk
-
-clean::
-	$(MAKE) -I $(SRCDIR) -f $(SRCDIR)/b.mk clean
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk
deleted file mode 100644
index 2fcdbea..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-LEVEL := ../../make
-
-LIB_PREFIX := loadunload_
-
-DYLIB_NAME := $(LIB_PREFIX)b
-DYLIB_CXX_SOURCES := b.cpp
-DYLIB_ONLY := YES
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk
deleted file mode 100644
index d40949b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-LEVEL := ../../make
-
-LIB_PREFIX := loadunload_
-
-DYLIB_NAME := $(LIB_PREFIX)c
-DYLIB_CXX_SOURCES := c.cpp
-DYLIB_ONLY := YES
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk
deleted file mode 100644
index a5db3c7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-LEVEL := ../../make
-
-LIB_PREFIX := loadunload_
-
-DYLIB_EXECUTABLE_PATH := $(CURDIR)
-
-DYLIB_NAME := $(LIB_PREFIX)d
-DYLIB_CXX_SOURCES := d.cpp
-DYLIB_ONLY := YES
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile
index 271117a..17fe658 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/hidden/Makefile
@@ -1,9 +1,7 @@
-LEVEL := ../../../make
-
 LIB_PREFIX := loadunload_
 
 DYLIB_NAME := $(LIB_PREFIX)d
 DYLIB_CXX_SOURCES := d.cpp
 DYLIB_ONLY := YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile
index 0b7e668..814a960 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile
@@ -1,14 +1,11 @@
-LEVEL := ../../make
-
 CXX_SOURCES := main.cpp
 USE_LIBDL := 1
 
-include $(LEVEL)/Makefile.rules
-
 all: hidden_lib a.out
 
-hidden_lib:
-	$(MAKE) VPATH=$(SRCDIR)/hidden -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile
+include Makefile.rules
 
-clean::
-	$(MAKE) -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile clean
+hidden_lib:
+	$(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \
+	DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py
index 694d28b..0adb3d0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/TestLoadUsingPaths.py
@@ -2,12 +2,9 @@
 Test that SBProcess.LoadImageUsingPaths works correctly.
 """
 
-from __future__ import print_function
 
 
 import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -35,7 +32,7 @@
             ext = 'dylib'
         self.lib_name = 'libloadunload.' + ext
 
-        self.wd = self.getBuildDir()
+        self.wd = os.path.realpath(self.getBuildDir())
         self.hidden_dir = os.path.join(self.wd, 'hidden')
         self.hidden_lib = os.path.join(self.hidden_dir, self.lib_name)
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/Makefile
index bebfa92..5e22c8a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/load_using_paths/hidden/Makefile
@@ -1,7 +1,5 @@
-LEVEL := ../../../make
-
 DYLIB_NAME := loadunload
 DYLIB_CXX_SOURCES := d.cpp
 DYLIB_ONLY := YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py
index 09eac71..fa7ffa6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/longjmp/TestLongjmp.py
@@ -2,10 +2,8 @@
 Test the use of setjmp/longjmp for non-local goto operations in a single-threaded inferior.
 """
 
-from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -16,9 +14,6 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        TestBase.setUp(self)
-
     @skipIfDarwin  # llvm.org/pr16769: LLDB on Mac OS X dies in function ReadRegisterBytes in GDBRemoteRegisterContext.cpp
     @skipIfFreeBSD  # llvm.org/pr17214
     @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20231")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/Makefile
index 9d4f3b7..31f2d5e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 clean::
 	rm -rf $(wildcard *.o *.d *.dSYM)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/TestMemoryRegion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/TestMemoryRegion.py
index 4d10e68..283cc94 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/TestMemoryRegion.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory-region/TestMemoryRegion.py
@@ -2,7 +2,6 @@
 Test the 'memory region' command.
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py
index 5698488..8a15234 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/cache/TestMemoryCache.py
@@ -2,12 +2,8 @@
 Test the MemoryCache L1 flush.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py
index 245aaa8..66d4366 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/find/TestMemoryFind.py
@@ -2,12 +2,8 @@
 Test the 'memory find' command.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py
index 2e4bbbd..72d55df 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/memory/read/TestMemoryRead.py
@@ -2,12 +2,8 @@
 Test the 'memory read' command.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
index 5665652..f27f57a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/Makefile
@@ -1,6 +1,14 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation -framework AppKit
+UI_FRAMEWORK = AppKit
 
-include $(LEVEL)/Makefile.rules
+ifneq ("$(SDKROOT)", "")
+	ifeq (,$(findstring macOS,$(SDKROOT)))
+		ifeq (,$(findstring MacOS,$(SDKROOT)))
+			UI_FRAMEWORK = UIKit
+		endif
+	endif
+endif
+
+LD_EXTRAS = -lobjc -framework Foundation -framework $(UI_FRAMEWORK)
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py
index b871b90..e3751e0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/TestMTCSimple.py
@@ -2,8 +2,6 @@
 Tests basic Main Thread Checker support (detecting a main-thread-only violation).
 """
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
@@ -17,21 +15,18 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @skipUnlessDarwin
-    @skipIfDarwinEmbedded  # Test file depends on AppKit which is not present on iOS etc.
     def test(self):
         self.mtc_dylib_path = findMainThreadCheckerDylib()
         if self.mtc_dylib_path == "":
-            self.skipTest("This test requires libMainThreadChecker.dylib.")
+            self.skipTest("This test requires libMainThreadChecker.dylib")
 
         self.build()
         self.mtc_tests()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     @skipIf(archs=['i386'])
     def mtc_tests(self):
+        self.assertTrue(self.mtc_dylib_path != "")
+
         # Load the test
         exe = self.getBuildArtifact("a.out")
         self.expect("file " + exe, patterns=["Current executable set to .*a.out"])
@@ -43,7 +38,11 @@
         thread = process.GetSelectedThread()
         frame = thread.GetSelectedFrame()
 
-        self.expect("thread info", substrs=['stop reason = -[NSView superview] must be used from main thread only'])
+        view = "NSView" if lldbplatformutil.getPlatform() == "macosx" else "UIView"
+
+        self.expect("thread info",
+                    substrs=['stop reason = -[' + view +
+                             ' superview] must be used from main thread only'])
 
         self.expect(
             "thread info -s",
@@ -53,7 +52,7 @@
         json_line = '\n'.join(output_lines[2:])
         data = json.loads(json_line)
         self.assertEqual(data["instrumentation_class"], "MainThreadChecker")
-        self.assertEqual(data["api_name"], "-[NSView superview]")
-        self.assertEqual(data["class_name"], "NSView")
+        self.assertEqual(data["api_name"], "-[" + view + " superview]")
+        self.assertEqual(data["class_name"], view)
         self.assertEqual(data["selector"], "superview")
-        self.assertEqual(data["description"], "-[NSView superview] must be used from main thread only")
+        self.assertEqual(data["description"], "-[" + view + " superview] must be used from main thread only")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/main.m
index 651347c..a967dee 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/main.m
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/mtc/simple/main.m
@@ -1,8 +1,14 @@
 #import <Foundation/Foundation.h>
+#if __has_include(<AppKit/AppKit.h>)
 #import <AppKit/AppKit.h>
+#define XXView NSView
+#else
+#import <UIKit/UIKit.h>
+#define XXView UIView
+#endif
 
 int main() {
-  NSView *view = [[NSView alloc] init];
+  XXView *view = [[XXView alloc] init];
   dispatch_group_t g = dispatch_group_create();
   dispatch_group_enter(g);
   [NSThread detachNewThreadWithBlock:^{
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/multidebugger_commands/TestMultipleDebuggersCommands.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/multidebugger_commands/TestMultipleDebuggersCommands.py
index 9cdd715..8459507 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/multidebugger_commands/TestMultipleDebuggersCommands.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/multidebugger_commands/TestMultipleDebuggersCommands.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py
new file mode 100644
index 0000000..80b144f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/multiword-commands/TestMultiWordCommands.py
@@ -0,0 +1,33 @@
+"""
+Test multiword commands ('platform' in this case).
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+class MultiwordCommandsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @no_debug_info_test
+    def test_ambiguous_subcommand(self):
+        self.expect("platform s", error=True,
+                    substrs=["ambiguous command 'platform s'. Possible completions:",
+                             "\tselect\n",
+                             "\tshell\n",
+                             "\tsettings\n"])
+
+    @no_debug_info_test
+    def test_empty_subcommand(self):
+        self.expect("platform \"\"", error=True, substrs=["Need to specify a non-empty subcommand."])
+
+    @no_debug_info_test
+    def test_help(self):
+        # <multiword> help brings up help.
+        self.expect("platform help",
+                    substrs=["Commands to manage and create platforms.",
+                             "Syntax: platform [",
+                             "The following subcommands are supported:",
+                             "connect",
+                             "Select the current platform"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nested_alias/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nested_alias/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nested_alias/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nested_alias/TestNestedAlias.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nested_alias/TestNestedAlias.py
deleted file mode 100644
index f805b53..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nested_alias/TestNestedAlias.py
+++ /dev/null
@@ -1,93 +0,0 @@
-"""
-Test that an alias can reference other aliases without crashing.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class NestedAliasTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break inside main().
-        self.line = line_number('main.cpp', '// break here')
-
-    def test_nested_alias(self):
-        """Test that an alias can reference other aliases without crashing."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main() after the variables are assigned values.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-        # The breakpoint should have a hit count of 1.
-        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
-                    substrs=[' resolved, hit count = 1'])
-
-        # This is the function to remove the custom aliases in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('command unalias read', check=False)
-            self.runCmd('command unalias rd', check=False)
-            self.runCmd('command unalias fo', check=False)
-            self.runCmd('command unalias foself', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd('command alias read memory read -f A')
-        self.runCmd('command alias rd read -c 3')
-
-        self.expect(
-            'memory read -f A -c 3 `&my_ptr[0]`',
-            substrs=[
-                'deadbeef',
-                'main.cpp:',
-                'feedbeef'])
-        self.expect(
-            'rd `&my_ptr[0]`',
-            substrs=[
-                'deadbeef',
-                'main.cpp:',
-                'feedbeef'])
-
-        self.expect(
-            'memory read -f A -c 3 `&my_ptr[0]`',
-            substrs=['deadfeed'],
-            matching=False)
-        self.expect('rd `&my_ptr[0]`', substrs=['deadfeed'], matching=False)
-
-        self.runCmd('command alias fo frame variable -O --')
-        self.runCmd('command alias foself fo self')
-
-        self.expect(
-            'help foself',
-            substrs=[
-                '--show-all-children',
-                '--raw-output'],
-            matching=False)
-        self.expect(
-            'help foself',
-            substrs=[
-                'Show variables for the current',
-                'stack frame.'],
-            matching=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
index 59e889e..d5424c0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/non-overlapping-index-variable-i/TestIndexVariable.py
@@ -1,7 +1,6 @@
 """Test evaluating expressions which ref. index variable 'i' which just goes
 from out of scope to in scope when stopped at the breakpoint."""
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nosucharch/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nosucharch/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nosucharch/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nosucharch/TestNoSuchArch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nosucharch/TestNoSuchArch.py
deleted file mode 100644
index fd98123..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/nosucharch/TestNoSuchArch.py
+++ /dev/null
@@ -1,33 +0,0 @@
-"""
-Test that using a non-existent architecture name does not crash LLDB.
-"""
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class NoSuchArchTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        # Check that passing an invalid arch via the command-line fails but
-        # doesn't crash
-        self.expect(
-            "target crete --arch nothingtoseehere %s" %
-            (exe), error=True)
-
-        # Check that passing an invalid arch via the SB API fails but doesn't
-        # crash
-        target = self.dbg.CreateTargetWithFileAndArch(exe, "nothingtoseehere")
-        self.assertFalse(target.IsValid(), "This target should not be valid")
-
-        # Now just create the target with the default arch and check it's fine
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target.IsValid(), "This target should now be valid")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
index 326c613..1ad90e4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/object-file/TestImageListMultiArchitecture.py
@@ -4,7 +4,6 @@
 foreign-architecture object files.
 """
 
-from __future__ import print_function
 
 
 import os.path
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
new file mode 100644
index 0000000..db8fa57
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+CXXFLAGS_EXTRAS := -O2 -glldb -Xclang -femit-debug-entry-values
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/TestBasicEntryValuesX86_64.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/TestBasicEntryValuesX86_64.py
new file mode 100644
index 0000000..e0285e6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/TestBasicEntryValuesX86_64.py
@@ -0,0 +1,13 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+from lldbsuite.test import lldbplatformutil
+
+supported_platforms = ["linux"]
+supported_platforms.extend(lldbplatformutil.getDarwinOSTriples())
+
+lldbinline.MakeInlineTest(__file__, globals(),
+        [decorators.skipUnlessPlatform(supported_platforms),
+         decorators.skipIf(compiler="clang", compiler_version=['<', '10.0']),
+         decorators.skipUnlessArch('x86_64'),
+         decorators.skipUnlessHasCallSiteInfo,
+         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/main.cpp
new file mode 100644
index 0000000..9aac6e9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/param_entry_vals/basic_entry_values_x86_64/main.cpp
@@ -0,0 +1,248 @@
+// Note: This test requires the SysV AMD64 ABI to be in use, and requires
+// compiler support for DWARF entry values.
+
+// Inhibit dead-arg-elim by using 'x'.
+template<typename T> __attribute__((noinline)) void use(T x) {
+  asm volatile (""
+      /* Outputs */  :
+      /* Inputs */   : "g"(x)
+      /* Clobbers */ :
+  );
+}
+
+// Destroy %rsi in the current frame.
+#define DESTROY_RSI \
+  asm volatile ("xorq %%rsi, %%rsi" \
+      /* Outputs */  : \
+      /* Inputs */   : \
+      /* Clobbers */ : "rsi" \
+  );
+
+// Destroy %rbx in the current frame.
+#define DESTROY_RBX \
+  asm volatile ("xorq %%rbx, %%rbx" \
+      /* Outputs */  : \
+      /* Inputs */   : \
+      /* Clobbers */ : "rbx" \
+  );
+
+struct S1 {
+  int field1 = 123;
+  int *field2 = &field1;
+};
+
+__attribute__((noinline))
+void func1(int &sink, int x) {
+  use(x);
+
+  // Destroy 'x' in the current frame.
+  DESTROY_RSI;
+
+  // NOTE: Currently, we do not generate DW_OP_entry_value for the 'x',
+  // since it gets copied into a register that is not callee saved,
+  // and we can not guarantee that its value has not changed.
+
+  ++sink;
+
+  // Destroy 'sink' in the current frame.
+  DESTROY_RBX;
+
+  //% self.filecheck("image lookup -va $pc", "main.cpp", "-check-prefix=FUNC1-DESC")
+  // FUNC1-DESC: name = "sink", type = "int &", location = DW_OP_entry_value(DW_OP_reg5 RDI)
+}
+
+__attribute__((noinline))
+void func2(int &sink, int x) {
+  use(x);
+
+  // Destroy 'x' in the current frame.
+  DESTROY_RSI;
+
+  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC2-EXPR-FAIL", expect_cmd_failure=True)
+  // FUNC2-EXPR-FAIL: couldn't get the value of variable x: variable not available
+
+  ++sink;
+
+  // Destroy 'sink' in the current frame.
+  DESTROY_RBX;
+
+  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC2-EXPR")
+  // FUNC2-EXPR: ${{.*}} = 2
+}
+
+__attribute__((noinline))
+void func3(int &sink, int *p) {
+  use(p);
+
+  // Destroy 'p' in the current frame.
+  DESTROY_RSI;
+
+  //% self.filecheck("expr *p", "main.cpp", "-check-prefix=FUNC3-EXPR")
+  // FUNC3-EXPR: (int) ${{.*}} = 123
+
+  ++sink;
+}
+
+__attribute__((noinline))
+void func4_amb(int &sink, int x) {
+  use(x);
+
+  // Destroy 'x' in the current frame.
+  DESTROY_RSI;
+
+  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC4-EXPR-FAIL", expect_cmd_failure=True)
+  // FUNC4-EXPR-FAIL: couldn't get the value of variable x: variable not available
+
+  ++sink;
+
+  // Destroy 'sink' in the current frame.
+  DESTROY_RBX;
+
+  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC4-EXPR", expect_cmd_failure=True)
+  // FUNC4-EXPR: couldn't get the value of variable sink: Could not evaluate DW_OP_entry_value.
+}
+
+__attribute__((noinline))
+void func5_amb() {}
+
+__attribute__((noinline))
+void func6(int &sink, int x) {
+  if (sink > 0)
+    func4_amb(sink, x); /* tail (taken) */
+  else
+    func5_amb(); /* tail */
+}
+
+__attribute__((noinline))
+void func7(int &sink, int x) {
+  //% self.filecheck("bt", "main.cpp", "-check-prefix=FUNC7-BT")
+  // FUNC7-BT: func7
+  // FUNC7-BT-NEXT: [inlined] func8_inlined
+  // FUNC7-BT-NEXT: [inlined] func9_inlined
+  // FUNC7-BT-NEXT: func10
+  use(x);
+
+  // Destroy 'x' in the current frame.
+  DESTROY_RSI;
+
+  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC7-EXPR-FAIL", expect_cmd_failure=True)
+  // FUNC7-EXPR-FAIL: couldn't get the value of variable x: variable not available
+
+  ++sink;
+
+  // Destroy 'sink' in the current frame.
+  DESTROY_RBX;
+
+  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC7-EXPR")
+  // FUNC7-EXPR: ${{.*}} = 4
+}
+
+__attribute__((always_inline))
+void func8_inlined(int &sink, int x) {
+  func7(sink, x);
+}
+
+__attribute__((always_inline))
+void func9_inlined(int &sink, int x) {
+  func8_inlined(sink, x);
+}
+
+__attribute__((noinline, disable_tail_calls))
+void func10(int &sink, int x) {
+  func9_inlined(sink, x);
+}
+
+__attribute__((noinline))
+void func11_tailcalled(int &sink, int x) {
+  //% self.filecheck("bt", "main.cpp", "-check-prefix=FUNC11-BT")
+  // FUNC11-BT: func11_tailcalled{{.*}}
+  // FUNC11-BT-NEXT: func12{{.*}} [artificial]
+  use(x);
+
+  // Destroy 'x' in the current frame.
+  DESTROY_RSI;
+
+  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC11-EXPR-FAIL", expect_cmd_failure=True)
+  // FUNC11-EXPR-FAIL: couldn't get the value of variable x: variable not available
+
+  ++sink;
+
+  // Destroy 'sink' in the current frame.
+  DESTROY_RBX;
+
+  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC11-EXPR")
+  // FUNC11-EXPR: ${{.*}} = 5
+}
+
+__attribute__((noinline))
+void func12(int &sink, int x) {
+  func11_tailcalled(sink, x);
+}
+
+__attribute__((noinline))
+void func13(int &sink, int x) {
+  //% self.filecheck("bt", "main.cpp", "-check-prefix=FUNC13-BT")
+  // FUNC13-BT: func13{{.*}}
+  // FUNC13-BT-NEXT: func14{{.*}}
+  use(x);
+
+  // Destroy 'x' in the current frame.
+  DESTROY_RSI;
+
+  //% self.filecheck("expr x", "main.cpp", "-check-prefix=FUNC13-EXPR-FAIL", expect_cmd_failure=True)
+  // FUNC13-EXPR-FAIL: couldn't get the value of variable x: variable not available
+
+  use(sink);
+
+  // Destroy 'sink' in the current frame.
+  DESTROY_RBX;
+
+  //% self.filecheck("expr sink", "main.cpp", "-check-prefix=FUNC13-EXPR")
+  // FUNC13-EXPR: ${{.*}} = 5
+}
+
+__attribute__((noinline, disable_tail_calls))
+void func14(int &sink, void (*target_no_tailcall)(int &, int)) {
+  // Move the call target into a register that won't get clobbered. Do this
+  // by calling the same indirect target twice, and hoping that regalloc is
+  // 'smart' enough to stash the call target in a non-clobbered register.
+  //
+  // llvm.org/PR43926 tracks work in the compiler to emit call targets which
+  // describe non-clobbered values.
+  target_no_tailcall(sink, 123);
+  target_no_tailcall(sink, 123);
+}
+
+__attribute__((disable_tail_calls))
+int main() {
+  int sink = 0;
+  S1 s1;
+
+  // Test location dumping for DW_OP_entry_value.
+  func1(sink, 123);
+
+  // Test evaluation of "DW_OP_constu" in the parent frame.
+  func2(sink, 123);
+
+  // Test evaluation of "DW_OP_fbreg -24, DW_OP_deref" in the parent frame.
+  // Disabled for now, see: llvm.org/PR43343
+#if 0
+  func3(sink, s1.field2);
+#endif
+
+  // The sequences `main -> func4 -> func{5,6}_amb -> sink` are both plausible.
+  // Test that lldb doesn't attempt to guess which one occurred: entry value
+  // evaluation should fail.
+  func6(sink, 123);
+
+  // Test that evaluation can "see through" inlining.
+  func10(sink, 123);
+
+  // Test that evaluation can "see through" tail calls.
+  func12(sink, 123);
+
+  // Test that evaluation can "see through" an indirect tail call.
+  func14(sink, func13);
+
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
index 816751c..5c21622 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/paths/TestPaths.py
@@ -1,12 +1,10 @@
 """
 Test some lldb command abbreviations.
 """
-from __future__ import print_function
 
 
 import lldb
 import os
-import time
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -38,7 +36,6 @@
         current_directory_spec = lldb.SBFileSpec(os.path.curdir)
         current_directory_string = current_directory_spec.GetDirectory()
         self.assertNotEqual(current_directory_string[-1:], '/')
-        pass
 
     @skipUnlessPlatform(["windows"])
     @no_debug_info_test
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformCommand.py
deleted file mode 100644
index f6f20b0..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformCommand.py
+++ /dev/null
@@ -1,82 +0,0 @@
-"""
-Test some lldb platform commands.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PlatformCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_help_platform(self):
-        self.runCmd("help platform")
-
-    @no_debug_info_test
-    def test_list(self):
-        self.expect("platform list",
-                    patterns=['^Available platforms:'])
-
-    @no_debug_info_test
-    def test_process_list(self):
-        self.expect("platform process list",
-                    substrs=['PID', 'TRIPLE', 'NAME'])
-
-    @no_debug_info_test
-    def test_process_info_with_no_arg(self):
-        """This is expected to fail and to return a proper error message."""
-        self.expect("platform process info", error=True,
-                    substrs=['one or more process id(s) must be specified'])
-
-    @no_debug_info_test
-    def test_status(self):
-        self.expect(
-            "platform status",
-            substrs=[
-                'Platform',
-                'Triple',
-                'OS Version',
-                'Kernel',
-                'Hostname'])
-
-    @expectedFailureAll(oslist=["windows"])
-    @no_debug_info_test
-    def test_shell(self):
-        """ Test that the platform shell command can invoke ls. """
-        triple = self.dbg.GetSelectedPlatform().GetTriple()
-        if re.match(".*-.*-windows", triple):
-            self.expect(
-                "platform shell dir c:\\", substrs=[
-                    "Windows", "Program Files"])
-        elif re.match(".*-.*-.*-android", triple):
-            self.expect(
-                "platform shell ls /",
-                substrs=[
-                    "cache",
-                    "dev",
-                    "system"])
-        else:
-            self.expect("platform shell ls /", substrs=["dev", "tmp", "usr"])
-
-    @no_debug_info_test
-    def test_shell_builtin(self):
-        """ Test a shell built-in command (echo) """
-        self.expect("platform shell echo hello lldb",
-                    substrs=["hello lldb"])
-
-    # FIXME: re-enable once platform shell -t can specify the desired timeout
-    @no_debug_info_test
-    def test_shell_timeout(self):
-        """ Test a shell built-in command (sleep) that times out """
-        self.skipTest("due to taking too long to complete.")
-        self.expect("platform shell sleep 15", error=True, substrs=[
-                    "error: timed out waiting for shell command to complete"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py
deleted file mode 100644
index b81446f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/platform/TestPlatformPython.py
+++ /dev/null
@@ -1,84 +0,0 @@
-"""
-Test the lldb platform Python API.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PlatformPythonTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_platform_list(self):
-        """Test SBDebugger::GetNumPlatforms() & GetPlatformAtIndex() API"""
-        # Verify the host platform is present by default.
-        initial_num_platforms = self.dbg.GetNumPlatforms()
-        self.assertGreater(initial_num_platforms, 0)
-        host_platform = self.dbg.GetPlatformAtIndex(0)
-        self.assertTrue(host_platform.IsValid() and
-                        host_platform.GetName() == 'host',
-                        'The host platform is present')
-        # Select another platform and verify that the platform is added to
-        # the platform list.
-        platform_idx = self.dbg.GetNumAvailablePlatforms() - 1
-        if platform_idx < 1:
-            self.fail('No platforms other than host are available')
-        platform_data = self.dbg.GetAvailablePlatformInfoAtIndex(platform_idx)
-        platform_name = platform_data.GetValueForKey('name').GetStringValue(100)
-        self.assertNotEqual(platform_name, 'host')
-        self.dbg.SetCurrentPlatform(platform_name)
-        selected_platform = self.dbg.GetSelectedPlatform()
-        self.assertTrue(selected_platform.IsValid())
-        self.assertEqual(selected_platform.GetName(), platform_name)
-        self.assertEqual(self.dbg.GetNumPlatforms(), initial_num_platforms + 1)
-        platform_found = False
-        for platform_idx in range(self.dbg.GetNumPlatforms()):
-            platform = self.dbg.GetPlatformAtIndex(platform_idx)
-            if platform.GetName() == platform_name:
-                platform_found = True
-                break
-        self.assertTrue(platform_found)
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_host_is_connected(self):
-        # We've already tested that this one IS the host platform.
-        host_platform = self.dbg.GetPlatformAtIndex(0)
-        self.assertTrue(host_platform.IsConnected(), "The host platform is always connected")
-
-
-    @add_test_categories(['pyapi'])
-    @no_debug_info_test
-    def test_available_platform_list(self):
-        """Test SBDebugger::GetNumAvailablePlatforms() and GetAvailablePlatformInfoAtIndex() API"""
-        num_platforms = self.dbg.GetNumAvailablePlatforms()
-        self.assertGreater(
-            num_platforms, 0,
-            'There should be at least one platform available')
-
-        for i in range(num_platforms):
-            platform_data = self.dbg.GetAvailablePlatformInfoAtIndex(i)
-            name_data = platform_data.GetValueForKey('name')
-            desc_data = platform_data.GetValueForKey('description')
-            self.assertTrue(
-                name_data and name_data.IsValid(),
-                'Platform has a name')
-            self.assertEqual(
-                name_data.GetType(), lldb.eStructuredDataTypeString,
-                'Platform name is a string')
-            self.assertTrue(
-                desc_data and desc_data.IsValid(),
-                'Platform has a description')
-            self.assertEqual(
-                desc_data.GetType(), lldb.eStructuredDataTypeString,
-                'Platform description is a string')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/Makefile
new file mode 100644
index 0000000..3119c37
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/Makefile
@@ -0,0 +1,6 @@
+DYLIB_CXX_SOURCES := plugin.cpp
+DYLIB_NAME := plugin
+DYLIB_ONLY := YES
+MAKE_DSYM := NO
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/TestPluginCommands.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/TestPluginCommands.py
new file mode 100644
index 0000000..e81d407
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/TestPluginCommands.py
@@ -0,0 +1,78 @@
+"""
+Test that plugins that load commands work correctly.
+"""
+
+from __future__ import print_function
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class PluginCommandTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        TestBase.setUp(self)
+        self.generateSource('plugin.cpp')
+
+    @skipIfNoSBHeaders
+    # Requires a compatible arch and platform to link against the host's built
+    # lldb lib.
+    @skipIfHostIncompatibleWithRemote
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
+    @no_debug_info_test
+    def test_load_plugin(self):
+        """Test that plugins that load commands work correctly."""
+
+        plugin_name = "plugin"
+        if sys.platform.startswith("darwin"):
+            plugin_lib_name = "lib%s.dylib" % plugin_name
+        else:
+            plugin_lib_name = "lib%s.so" % plugin_name
+
+        # Invoke the library build rule.
+        self.buildLibrary("plugin.cpp", plugin_name)
+
+        debugger = lldb.SBDebugger.Create()
+
+        retobj = lldb.SBCommandReturnObject()
+
+        retval = debugger.GetCommandInterpreter().HandleCommand(
+            "plugin load %s" % self.getBuildArtifact(plugin_lib_name), retobj)
+
+        retobj.Clear()
+
+        retval = debugger.GetCommandInterpreter().HandleCommand(
+            "plugin_loaded_command child abc def ghi", retobj)
+
+        if self.TraceOn():
+            print(retobj.GetOutput())
+
+        self.expect(retobj, substrs=['abc def ghi'], exe=False)
+
+        retobj.Clear()
+
+        # check that abbreviations work correctly in plugin commands.
+        retval = debugger.GetCommandInterpreter().HandleCommand(
+            "plugin_loaded_ ch abc def ghi", retobj)
+
+        if self.TraceOn():
+            print(retobj.GetOutput())
+
+        self.expect(retobj, substrs=['abc def ghi'], exe=False)
+
+    @no_debug_info_test
+    def test_invalid_plugin_invocation(self):
+        self.expect("plugin load a b",
+                    error=True, startstr="error: 'plugin load' requires one argument")
+        self.expect("plugin load",
+                    error=True, startstr="error: 'plugin load' requires one argument")
+
+    @no_debug_info_test
+    def test_invalid_plugin_target(self):
+        self.expect("plugin load ThisIsNotAValidPluginName",
+                    error=True, startstr="error: no such file")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/plugin.cpp.template b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/plugin.cpp.template
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/plugin.cpp.template
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/command_plugin/plugin.cpp.template
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/Makefile
deleted file mode 100644
index 8af0644..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../../make
-
-DYLIB_CXX_SOURCES := plugin.cpp
-DYLIB_NAME := plugin
-DYLIB_ONLY := YES
-MAKE_DSYM := NO
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/TestPluginCommands.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/TestPluginCommands.py
deleted file mode 100644
index 25b83ed..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/commands/TestPluginCommands.py
+++ /dev/null
@@ -1,69 +0,0 @@
-"""
-Test that plugins that load commands work correctly.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class PluginCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.generateSource('plugin.cpp')
-
-    @skipIfNoSBHeaders
-    # Requires a compatible arch and platform to link against the host's built
-    # lldb lib.
-    @skipIfHostIncompatibleWithRemote
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24778")
-    @no_debug_info_test
-    def test_load_plugin(self):
-        """Test that plugins that load commands work correctly."""
-
-        plugin_name = "plugin"
-        if sys.platform.startswith("darwin"):
-            plugin_lib_name = "lib%s.dylib" % plugin_name
-        else:
-            plugin_lib_name = "lib%s.so" % plugin_name
-
-        # Invoke the library build rule.
-        self.buildLibrary("plugin.cpp", plugin_name)
-
-        debugger = lldb.SBDebugger.Create()
-
-        retobj = lldb.SBCommandReturnObject()
-
-        retval = debugger.GetCommandInterpreter().HandleCommand(
-            "plugin load %s" % self.getBuildArtifact(plugin_lib_name), retobj)
-
-        retobj.Clear()
-
-        retval = debugger.GetCommandInterpreter().HandleCommand(
-            "plugin_loaded_command child abc def ghi", retobj)
-
-        if self.TraceOn():
-            print(retobj.GetOutput())
-
-        self.expect(retobj, substrs=['abc def ghi'], exe=False)
-
-        retobj.Clear()
-
-        # check that abbreviations work correctly in plugin commands.
-        retval = debugger.GetCommandInterpreter().HandleCommand(
-            "plugin_loaded_ ch abc def ghi", retobj)
-
-        if self.TraceOn():
-            print(retobj.GetOutput())
-
-        self.expect(retobj, substrs=['abc def ghi'], exe=False)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/Makefile
index cd9ca5c..c9319d6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/Makefile
@@ -1,3 +1,2 @@
-LEVEL = ../../../make
 C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
index f105237..5c4b420 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py
@@ -2,12 +2,9 @@
 Test that the Python operating system plugin works correctly
 """
 
-from __future__ import print_function
 
 
 import os
-import time
-import re
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py
index 5a11a52..ca863d2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/TestGCore.py
@@ -2,10 +2,7 @@
 Test signal reporting when debugging with linux core files.
 """
 
-from __future__ import print_function
 
-import shutil
-import struct
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -17,7 +14,13 @@
     NO_DEBUG_INFO_TESTCASE = True
 
     mydir = TestBase.compute_mydir(__file__)
-    _initial_platform = lldb.DBG.GetSelectedPlatform()
+    def setUp(self):
+        super(GCoreTestCase, self).setUp()
+        self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+    def tearDown(self):
+        lldb.DBG.SetSelectedPlatform(self._initial_platform)
+        super(GCoreTestCase, self).tearDown()
 
     _i386_pid = 5586
     _x86_64_pid = 5669
@@ -49,4 +52,3 @@
             self.assertEqual(signal, 19)
 
         self.dbg.DeleteTarget(target)
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.mk
index ff874a2..566938c 100755
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.mk
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/gcore/main.mk
@@ -1,5 +1,3 @@
-LEVEL = ../../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py
index 7cc3c07..4be7ebe 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/TestLinuxCoreThreads.py
@@ -2,10 +2,7 @@
 Test signal reporting when debugging with linux core files.
 """
 
-from __future__ import print_function
 
-import shutil
-import struct
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -17,7 +14,14 @@
     NO_DEBUG_INFO_TESTCASE = True
 
     mydir = TestBase.compute_mydir(__file__)
-    _initial_platform = lldb.DBG.GetSelectedPlatform()
+
+    def setUp(self):
+        super(LinuxCoreThreadsTestCase, self).setUp()
+        self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+    def tearDown(self):
+        lldb.DBG.SetSelectedPlatform(self._initial_platform)
+        super(LinuxCoreThreadsTestCase, self).tearDown()
 
     _i386_pid = 5193
     _x86_64_pid = 5222
@@ -46,6 +50,17 @@
         self.assertEqual(process.GetProcessID(), pid)
 
         for thread in process:
+            # Verify that if we try to read memory from a PT_LOAD that has
+            # p_filesz of zero that we don't get bytes from the next section
+            # that actually did have bytes. The addresses below were found by
+            # dumping the program headers of linux-i386.core and
+            # linux-x86_64.core and verifying that they had a p_filesz of zero.
+            mem_err = lldb.SBError()
+            if process.GetAddressByteSize() == 4:
+                bytes_read = process.ReadMemory(0x8048000, 4, mem_err)
+            else:
+                bytes_read = process.ReadMemory(0x400000, 4, mem_err)
+            self.assertEqual(bytes_read, None)
             reason = thread.GetStopReason()
             if( thread.GetThreadID() == tid ):
                 self.assertEqual(reason, lldb.eStopReasonSignal)
@@ -58,4 +73,3 @@
                 self.assertEqual(signal, 0)
 
         self.dbg.DeleteTarget(target)
-        lldb.DBG.SetSelectedPlatform(self._initial_platform)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.mk
index ff874a2..566938c 100755
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.mk
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/elf-core/thread_crash/main.mk
@@ -1,5 +1,3 @@
-LEVEL = ../../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py
index b03ea8d..7680b55 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/TestMachCore.py
@@ -2,10 +2,7 @@
 Test basics of mach core file debugging.
 """
 
-from __future__ import print_function
 
-import shutil
-import struct
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/operating_system.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/operating_system.py
index de6c3b7..95a5bdc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/operating_system.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/mach-core/operating_system.py
@@ -1,5 +1,4 @@
 import lldb
-import struct
 
 
 class OperatingSystemPlugIn(object):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
index 9aa5520..62b6c80 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
@@ -2,7 +2,6 @@
 Test basics of Minidump debugging.
 """
 
-from __future__ import print_function
 from six import iteritems
 
 import shutil
@@ -153,9 +152,9 @@
         self.assertTrue(eip.IsValid())
         self.assertEqual(pc, eip.GetValueAsUnsigned())
 
-    def test_snapshot_minidump(self):
+    def test_snapshot_minidump_dump_requested(self):
         """Test that if we load a snapshot minidump file (meaning the process
-        did not crash) there is no stop reason."""
+        did not crash) with exception code "DUMP_REQUESTED" there is no stop reason."""
         # target create -c linux-x86_64_not_crashed.dmp
         self.dbg.CreateTarget(None)
         self.target = self.dbg.GetSelectedTarget()
@@ -167,6 +166,17 @@
         stop_description = thread.GetStopDescription(256)
         self.assertEqual(stop_description, "")
 
+    def test_snapshot_minidump_null_exn_code(self):
+        """Test that if we load a snapshot minidump file (meaning the process
+        did not crash) with exception code zero there is no stop reason."""
+        self.process_from_yaml("linux-x86_64_null_signal.yaml")
+        self.check_state()
+        self.assertEqual(self.process.GetNumThreads(), 1)
+        thread = self.process.GetThreadAtIndex(0)
+        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonNone)
+        stop_description = thread.GetStopDescription(256)
+        self.assertEqual(stop_description, "")
+
     def check_register_unsigned(self, set, name, expected):
         reg_value = set.GetChildMemberWithName(name)
         self.assertTrue(reg_value.IsValid(),
@@ -332,6 +342,7 @@
             function_name = frame.GetFunctionName()
             self.assertTrue(name in function_name)
 
+    @skipIfLLVMTargetMissing("X86")
     def test_deeper_stack_in_minidump(self):
         """Test that we can examine a more interesting stack in a Minidump."""
         # Launch with the Minidump, and inspect the stack.
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
index b0e9f1d..ca0ad5f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/TestMiniDumpUUID.py
@@ -2,10 +2,8 @@
 Test basics of Minidump debugging.
 """
 
-from __future__ import print_function
 from six import iteritems
 
-import shutil
 
 import lldb
 import os
@@ -43,7 +41,7 @@
     def test_zero_uuid_modules(self):
         """
             Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            but contains a PDB70 value whose age is zero and whose UUID values are 
+            but contains a PDB70 value whose age is zero and whose UUID values are
             all zero. Prior to a fix all such modules would be duplicated to the
             first one since the UUIDs claimed to be valid and all zeroes. Now we
             ensure that the UUID is not valid for each module and that we have
@@ -57,7 +55,7 @@
     def test_uuid_modules_no_age(self):
         """
             Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            and contains a PDB70 value whose age is zero and whose UUID values are 
+            and contains a PDB70 value whose age is zero and whose UUID values are
             valid. Ensure we decode the UUID and don't include the age field in the UUID.
         """
         modules = self.get_minidump_modules("linux-arm-uuids-no-age.yaml")
@@ -69,7 +67,7 @@
     def test_uuid_modules_no_age_apple(self):
         """
             Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            and contains a PDB70 value whose age is zero and whose UUID values are 
+            and contains a PDB70 value whose age is zero and whose UUID values are
             valid. Ensure we decode the UUID and don't include the age field in the UUID.
             Also ensure that the first uint32_t is byte swapped, along with the next
             two uint16_t values. Breakpad incorrectly byte swaps these values when it
@@ -84,7 +82,7 @@
     def test_uuid_modules_with_age(self):
         """
             Test multiple modules having a MINIDUMP_MODULE.CvRecord that is valid,
-            and contains a PDB70 value whose age is valid and whose UUID values are 
+            and contains a PDB70 value whose age is valid and whose UUID values are
             valid. Ensure we decode the UUID and include the age field in the UUID.
         """
         modules = self.get_minidump_modules("linux-arm-uuids-with-age.yaml")
@@ -122,13 +120,31 @@
         self.verify_module(modules[0], "/not/exist/a", None)
         self.verify_module(modules[1], "/not/exist/b", None)
 
+    def test_uuid_modules_elf_build_id_same(self):
+        """
+            Test multiple modules having a MINIDUMP_MODULE.CvRecord that is
+            valid, and contains a ELF build ID whose value is the same. There
+            is an assert in the PlaceholderObjectFile that was firing when we
+            encountered this which was crashing the process that was checking
+            if PlaceholderObjectFile.m_base was the same as the address this
+            fake module was being loaded at. We need to ensure we don't crash
+            in such cases and that we add both modules even though they have
+            the same UUID.
+        """
+        modules = self.get_minidump_modules("linux-arm-same-uuids.yaml")
+        self.assertEqual(2, len(modules))
+        self.verify_module(modules[0], "/file/does/not/exist/a",
+                           '11223344-1122-3344-1122-334411223344-11223344')
+        self.verify_module(modules[1], "/file/does/not/exist/b",
+                           '11223344-1122-3344-1122-334411223344-11223344')
+
     @expectedFailureAll(oslist=["windows"])
     def test_partial_uuid_match(self):
         """
             Breakpad has been known to create minidump files using CvRecord in each
             module whose signature is set to PDB70 where the UUID only contains the
-            first 16 bytes of a 20 byte ELF build ID. Code was added to 
-            ProcessMinidump.cpp to deal with this and allows partial UUID matching. 
+            first 16 bytes of a 20 byte ELF build ID. Code was added to
+            ProcessMinidump.cpp to deal with this and allows partial UUID matching.
 
             This test verifies that if we have a minidump with a 16 byte UUID, that
             we are able to associate a symbol file with a 20 byte UUID only if the
@@ -142,16 +158,16 @@
         self.dbg.HandleCommand(cmd)
         modules = self.get_minidump_modules("linux-arm-partial-uuids-match.yaml")
         self.assertEqual(1, len(modules))
-        self.verify_module(modules[0], so_path, 
+        self.verify_module(modules[0], so_path,
                            "7295E17C-6668-9E05-CBB5-DEE5003865D5-5267C116")
 
     def test_partial_uuid_mismatch(self):
         """
             Breakpad has been known to create minidump files using CvRecord in each
             module whose signature is set to PDB70 where the UUID only contains the
-            first 16 bytes of a 20 byte ELF build ID. Code was added to 
-            ProcessMinidump.cpp to deal with this and allows partial UUID matching. 
-            
+            first 16 bytes of a 20 byte ELF build ID. Code was added to
+            ProcessMinidump.cpp to deal with this and allows partial UUID matching.
+
             This test verifies that if we have a minidump with a 16 byte UUID, that
             we are not able to associate a symbol file with a 20 byte UUID only if
             any of the first 16 bytes do not match. In this case we will see the UUID
@@ -164,7 +180,7 @@
         modules = self.get_minidump_modules("linux-arm-partial-uuids-mismatch.yaml")
         self.assertEqual(1, len(modules))
         self.verify_module(modules[0],
-                           "/invalid/path/on/current/system/libuuidmismatch.so", 
+                           "/invalid/path/on/current/system/libuuidmismatch.so",
                            "7295E17C-6668-9E05-CBB5-DEE5003865D5")
 
     def test_relative_module_name(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm64-macos.yaml b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm64-macos.yaml
index 9114424..70817f1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm64-macos.yaml
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/arm64-macos.yaml
@@ -1,7 +1,7 @@
 --- !minidump
 Streams:         
   - Type:            SystemInfo
-    Processor Arch:  ARM64
+    Processor Arch:  BP_ARM64
     Platform ID:     MacOSX
     CSD Version:     '15E216'
     CPU:             
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-same-uuids.yaml b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-same-uuids.yaml
new file mode 100644
index 0000000..21c5220
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-arm-same-uuids.yaml
@@ -0,0 +1,21 @@
+--- !minidump
+Streams:
+  - Type:            SystemInfo
+    Processor Arch:  AMD64
+    Platform ID:     Linux
+    CSD Version:     '15E216'
+    CPU:
+      Vendor ID:       GenuineIntel
+      Version Info:    0x00000000
+      Feature Info:    0x00000000
+  - Type:            ModuleList
+    Modules:
+      - Base of Image:   0x0000000000001000
+        Size of Image:   0x00001000
+        Module Name:     '/file/does/not/exist/a'
+        CodeView Record: '52534453112233441122334411223344112233441122334411'
+      - Base of Image:   0x0000000000003000
+        Size of Image:   0x00001000
+        Module Name:     '/file/does/not/exist/b'
+        CodeView Record: '52534453112233441122334411223344112233441122334411'
+...
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.yaml b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.yaml
index 6627a0b..21ea3ba 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.yaml
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64.yaml
@@ -14,7 +14,10 @@
         Module Name:     '/tmp/test/linux-x86_64'
         CodeView Record: 4C457042E35C283BC327C28762DB788BF5A4078BE2351448
   - Type:            Exception
-    Content:         DD740000000000000B00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000D0040000F8310000
+    Thread ID:       0x000074DD
+    Exception Record:
+      Exception Code:  0x0000000B
+    Thread Context:  00000000
   - Type:            SystemInfo
     Processor Arch:  AMD64
     Processor Level: 6
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_null_signal.yaml b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_null_signal.yaml
new file mode 100644
index 0000000..93b3fd0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump-new/linux-x86_64_null_signal.yaml
@@ -0,0 +1,25 @@
+--- !minidump
+Streams:
+  - Type:            ThreadList
+    Threads:
+      - Thread Id:       0x00002177
+        Context:         0000
+        Stack:
+          Start of Memory Range: 0x00007FFE2F689000
+          Content:         00000000
+  - Type:            Exception
+    Thread ID:       0x00002177
+    Exception Record:
+      Exception Code:  0x00000000
+      Exception Address: 0x0000000000400582
+    Thread Context:  0000
+  - Type:            SystemInfo
+    Processor Arch:  AMD64
+    Platform ID:     Linux
+  - Type:            LinuxProcStatus
+    Text:             |
+      Name:	busyloop
+      Umask:	0002
+      State:	t (tracing stop)
+      Pid:	8567
+...
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/Makefile
index b3034c1..65e9dd2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py
index a56d3cd..c3301fb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/minidump/TestMiniDump.py
@@ -2,7 +2,6 @@
 Test basics of mini dump debugging.
 """
 
-from __future__ import print_function
 from six import iteritems
 
 
@@ -90,6 +89,7 @@
             "fizzbuzz.syms", "has been added to", "fizzbuzz.exe"]),
         self.assertTrue(self.target.modules[0].FindSymbol("main"))
 
+    @skipIfLLVMTargetMissing("X86")
     def test_stack_info_in_mini_dump(self):
         """Test that we can see a trivial stack in a VS-generate mini dump."""
         # target create -c fizzbuzz_no_heap.dmp
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py
index 320a566..067b04d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/netbsd-core/TestNetBSDCore.py
@@ -4,9 +4,7 @@
 
 from __future__ import division, print_function
 
-import shutil
 import signal
-import struct
 import os
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py
index 73ad394..cbfc852 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/postmortem/wow64_minidump/TestWow64MiniDump.py
@@ -7,7 +7,6 @@
 get the 32-bit register contexts.
 """
 
-from __future__ import print_function
 from six import iteritems
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile
index 624a6e1..032f9cd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../make
-
 DYLIB_NAME := unlikely_name
 DYLIB_CXX_SOURCES := foo.cpp
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/TestPreRunDylibs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/TestPreRunDylibs.py
index 6508421..1ac18a7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/TestPreRunDylibs.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/pre_run_dylibs/TestPreRunDylibs.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 import lldb
@@ -11,10 +10,6 @@
     mydir = TestBase.compute_mydir(__file__)
     NO_DEBUG_INFO_TESTCASE = True
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     @skipIf(oslist=no_match(['darwin','macos']))
     def test(self):
         """Test that we find directly linked dylib pre-run."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/Makefile
deleted file mode 100644
index a964853..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-EXE := ProcessAttach
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
deleted file mode 100644
index 6ea04f9..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/TestProcessAttach.py
+++ /dev/null
@@ -1,92 +0,0 @@
-"""
-Test process attach.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-import shutil
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-exe_name = "ProcessAttach"  # Must match Makefile
-
-
-class ProcessAttachTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfiOSSimulator
-    @expectedFailureNetBSD
-    def test_attach_to_process_by_id(self):
-        """Test attach by process id"""
-        self.build()
-        exe = self.getBuildArtifact(exe_name)
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        self.runCmd("process attach -p " + str(popen.pid))
-
-        target = self.dbg.GetSelectedTarget()
-
-        process = target.GetProcess()
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-    @expectedFailureNetBSD
-    def test_attach_to_process_from_different_dir_by_id(self):
-        """Test attach by process id"""
-        newdir = self.getBuildArtifact("newdir")
-        try:
-            os.mkdir(newdir)
-        except OSError as e:
-            if e.errno != os.errno.EEXIST:
-                raise
-        testdir = self.getBuildDir()
-        exe = os.path.join(newdir, 'proc_attach')
-        self.buildProgram('main.cpp', exe)
-        self.addTearDownHook(lambda: shutil.rmtree(newdir))
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        os.chdir(newdir)
-        self.addTearDownHook(lambda: os.chdir(testdir))
-        self.runCmd("process attach -p " + str(popen.pid))
-
-        target = self.dbg.GetSelectedTarget()
-
-        process = target.GetProcess()
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-    @expectedFailureNetBSD
-    def test_attach_to_process_by_name(self):
-        """Test attach by process name"""
-        self.build()
-        exe = self.getBuildArtifact(exe_name)
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe)
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        self.runCmd("process attach -n " + exe_name)
-
-        target = self.dbg.GetSelectedTarget()
-
-        process = target.GetProcess()
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-    def tearDown(self):
-        # Destroy process before TestBase.tearDown()
-        self.dbg.GetSelectedTarget().GetProcess().Destroy()
-
-        # Call super's tearDown().
-        TestBase.tearDown(self)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile
deleted file mode 100644
index 3c1f735..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-EXE := AttachDenied
-
-all: AttachDenied sign
-
-include $(LEVEL)/Makefile.rules
-
-sign: entitlements.plist AttachDenied
-ifeq ($(OS),Darwin)
-	codesign -s - -f --entitlements $^
-endif
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
deleted file mode 100644
index b915b54..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_attach/attach_denied/TestAttachDenied.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""
-Test denied process attach.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-exe_name = 'AttachDenied'  # Must match Makefile
-
-
-class AttachDeniedTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @skipIfWindows
-    @skipIfiOSSimulator
-    @skipIfDarwinEmbedded  # ptrace(ATTACH_REQUEST...) won't work on ios/tvos/etc
-    def test_attach_to_process_by_id_denied(self):
-        """Test attach by process id denied"""
-        self.build()
-        exe = self.getBuildArtifact(exe_name)
-
-        # Use a file as a synchronization point between test and inferior.
-        pid_file_path = lldbutil.append_to_process_working_directory(self,
-            "pid_file_%d" % (int(time.time())))
-        self.addTearDownHook(
-            lambda: self.run_platform_command(
-                "rm %s" %
-                (pid_file_path)))
-
-        # Spawn a new process
-        popen = self.spawnSubprocess(exe, [pid_file_path])
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
-
-        self.expect('process attach -p ' + pid,
-                    startstr='error: attach failed:',
-                    error=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_group/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_group/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_group/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_group/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py
index 224ef55..fe541c7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_group/TestChangeProcessGroup.py
@@ -1,6 +1,5 @@
 """Test that we handle inferiors which change their process group"""
 
-from __future__ import print_function
 
 
 import os
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/Makefile
deleted file mode 100644
index 313da70..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-#CXX_SOURCES := print-cwd.cpp
-
-include $(LEVEL)/Makefile.rules
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py
deleted file mode 100644
index 44452b7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_launch/TestProcessLaunch.py
+++ /dev/null
@@ -1,209 +0,0 @@
-"""
-Test lldb process launch flags.
-"""
-
-from __future__ import print_function
-
-import copy
-import os
-import time
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-import six
-
-
-class ProcessLaunchTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        self.runCmd("settings set auto-confirm true")
-
-    def tearDown(self):
-        self.runCmd("settings clear auto-confirm")
-        TestBase.tearDown(self)
-
-    @not_remote_testsuite_ready
-    def test_io(self):
-        """Test that process launch I/O redirection flags work properly."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.expect("file " + exe,
-                    patterns=["Current executable set to .*a.out"])
-
-        in_file = os.path.join(self.getSourceDir(), "input-file.txt")
-        out_file = lldbutil.append_to_process_working_directory(self, "output-test.out")
-        err_file = lldbutil.append_to_process_working_directory(self, "output-test.err")
-
-        # Make sure the output files do not exist before launching the process
-        try:
-            os.remove(out_file)
-        except OSError:
-            pass
-
-        try:
-            os.remove(err_file)
-        except OSError:
-            pass
-
-        launch_command = "process launch -i '{0}' -o '{1}' -e '{2}' -w '{3}'".format(
-                in_file, out_file, err_file, self.get_process_working_directory())
-
-        if lldb.remote_platform:
-            self.runCmd('platform put-file "{local}" "{remote}"'.format(
-                local=in_file, remote=in_file))
-
-        self.expect(launch_command,
-                    patterns=["Process .* launched: .*a.out"])
-
-        success = True
-        err_msg = ""
-
-        out = lldbutil.read_file_on_target(self, out_file)
-        if out != "This should go to stdout.\n":
-            success = False
-            err_msg = err_msg + "    ERROR: stdout file does not contain correct output.\n"
-
-
-        err = lldbutil.read_file_on_target(self, err_file)
-        if err != "This should go to stderr.\n":
-            success = False
-            err_msg = err_msg + "    ERROR: stderr file does not contain correct output.\n"
-
-        if not success:
-            self.fail(err_msg)
-
-    # rdar://problem/9056462
-    # The process launch flag '-w' for setting the current working directory
-    # not working?
-    @not_remote_testsuite_ready
-    @expectedFailureAll(oslist=["linux"], bugnumber="llvm.org/pr20265")
-    @expectedFailureNetBSD
-    def test_set_working_dir_nonexisting(self):
-        """Test that '-w dir' fails to set the working dir when running the inferior with a dir which doesn't exist."""
-        d = {'CXX_SOURCES': 'print_cwd.cpp'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(d)
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe)
-
-        mywd = 'my_working_dir'
-        out_file_name = "my_working_dir_test.out"
-        err_file_name = "my_working_dir_test.err"
-
-        my_working_dir_path = self.getBuildArtifact(mywd)
-        out_file_path = os.path.join(my_working_dir_path, out_file_name)
-        err_file_path = os.path.join(my_working_dir_path, err_file_name)
-
-        # Check that we get an error when we have a nonexisting path
-        invalid_dir_path = mywd + 'z'
-        launch_command = "process launch -w %s -o %s -e %s" % (
-            invalid_dir_path, out_file_path, err_file_path)
-
-        self.expect(
-            launch_command, error=True, patterns=[
-                "error:.* No such file or directory: %s" %
-                invalid_dir_path])
-
-    @not_remote_testsuite_ready
-    def test_set_working_dir_existing(self):
-        """Test that '-w dir' sets the working dir when running the inferior."""
-        d = {'CXX_SOURCES': 'print_cwd.cpp'}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(d)
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe)
-
-        mywd = 'my_working_dir'
-        out_file_name = "my_working_dir_test.out"
-        err_file_name = "my_working_dir_test.err"
-
-        my_working_dir_path = self.getBuildArtifact(mywd)
-        lldbutil.mkdir_p(my_working_dir_path)
-        out_file_path = os.path.join(my_working_dir_path, out_file_name)
-        err_file_path = os.path.join(my_working_dir_path, err_file_name)
-
-        # Make sure the output files do not exist before launching the process
-        try:
-            os.remove(out_file_path)
-            os.remove(err_file_path)
-        except OSError:
-            pass
-
-        launch_command = "process launch -w %s -o %s -e %s" % (
-            my_working_dir_path, out_file_path, err_file_path)
-
-        self.expect(launch_command,
-                    patterns=["Process .* launched: .*a.out"])
-
-        success = True
-        err_msg = ""
-
-        # Check to see if the 'stdout' file was created
-        try:
-            out_f = open(out_file_path)
-        except IOError:
-            success = False
-            err_msg = err_msg + "ERROR: stdout file was not created.\n"
-        else:
-            # Check to see if the 'stdout' file contains the right output
-            line = out_f.readline()
-            if self.TraceOn():
-                print("line:", line)
-            if not re.search(mywd, line):
-                success = False
-                err_msg = err_msg + "The current working directory was not set correctly.\n"
-                out_f.close()
-
-        # Try to delete the 'stdout' and 'stderr' files
-        try:
-            os.remove(out_file_path)
-            os.remove(err_file_path)
-            pass
-        except OSError:
-            pass
-
-        if not success:
-            self.fail(err_msg)
-
-    def test_environment_with_special_char(self):
-        """Test that environment variables containing '*' and '}' are handled correctly by the inferior."""
-        source = 'print_env.cpp'
-        d = {'CXX_SOURCES': source}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(d)
-        exe = self.getBuildArtifact("a.out")
-
-        evil_var = 'INIT*MIDDLE}TAIL'
-
-        target = self.dbg.CreateTarget(exe)
-        main_source_spec = lldb.SBFileSpec(source)
-        breakpoint = target.BreakpointCreateBySourceRegex(
-            '// Set breakpoint here.', main_source_spec)
-
-        process = target.LaunchSimple(None,
-                                      ['EVIL=' + evil_var],
-                                      self.get_process_working_directory())
-        self.assertEqual(
-            process.GetState(),
-            lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, breakpoint)
-        self.assertEqual(len(threads), 1)
-        frame = threads[0].GetFrameAtIndex(0)
-        sbvalue = frame.EvaluateExpression("evil")
-        value = sbvalue.GetSummary().strip('"')
-
-        self.assertEqual(value, evil_var)
-        process.Continue()
-        self.assertEqual(process.GetState(), lldb.eStateExited, PROCESS_EXITED)
-        pass
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/Makefile
index b76d2cd..65e9dd2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py
index 55dbc42..d561af0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/process_save_core/TestProcessSaveCore.py
@@ -2,10 +2,8 @@
 Test saving a core file (or mini dump).
 """
 
-from __future__ import print_function
 
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py
index 80ace21..8ca2639 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ptr_refs/TestPtrRefs.py
@@ -2,9 +2,7 @@
 Test the ptr_refs tool on Darwin
 """
 
-from __future__ import print_function
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/recursion/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/recursion/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/recursion/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/recursion/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py
index 569ecd2..e949f1a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/recursion/TestValueObjectRecursion.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/Makefile
deleted file mode 100644
index 1c1be94..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-CFLAGS_EXTRAS += -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py
deleted file mode 100644
index 00802ff..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/TestMPXRegisters.py
+++ /dev/null
@@ -1,69 +0,0 @@
-"""
-Test the Intel(R) MPX registers.
-"""
-
-from __future__ import print_function
-
-
-import os
-import sys
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class RegisterCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-
-    @skipIf(compiler="clang")
-    @skipIf(oslist=no_match(['linux']))
-    @skipIf(archs=no_match(['i386', 'x86_64']))
-    @skipIf(oslist=["linux"], compiler="gcc", compiler_version=["<", "5"]) #GCC version >= 5 supports Intel(R) MPX.
-    def test_mpx_registers_with_example_code(self):
-        """Test Intel(R) MPX registers with example code."""
-        self.build()
-        self.mpx_registers_with_example_code()
-
-    def mpx_registers_with_example_code(self):
-        """Test Intel(R) MPX registers after running example code."""
-        self.line = line_number('main.cpp', '// Set a break point here.')
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(self, "main.cpp", self.line, num_expected_locations=1)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        if (process.GetState() == lldb.eStateExited):
-            self.skipTest("Intel(R) MPX is not supported.")
-        else:
-            self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                        substrs = ["stop reason = breakpoint 1."])
-
-        if self.getArchitecture() == 'x86_64':
-            self.expect("register read -s 3",
-                        substrs = ['bnd0 = {0x0000000000000010 0xffffffffffffffe6}',
-                                   'bnd1 = {0x0000000000000020 0xffffffffffffffd6}',
-                                   'bnd2 = {0x0000000000000030 0xffffffffffffffc6}',
-                                   'bnd3 = {0x0000000000000040 0xffffffffffffffb6}',
-                                   'bndcfgu = {0x01 0x80 0xb5 0x76 0xff 0x7f 0x00 0x00}',
-                                   'bndstatus = {0x02 0x80 0xb5 0x76 0xff 0x7f 0x00 0x00}'])
-        if self.getArchitecture() == 'i386':
-            self.expect("register read -s 3",
-                        substrs = ['bnd0 = {0x0000000000000010 0x00000000ffffffe6}',
-                                   'bnd1 = {0x0000000000000020 0x00000000ffffffd6}',
-                                   'bnd2 = {0x0000000000000030 0x00000000ffffffc6}',
-                                   'bnd3 = {0x0000000000000040 0x00000000ffffffb6}',
-                                   'bndcfgu = {0x01 0xd0 0x7d 0xf7 0x00 0x00 0x00 0x00}',
-                                   'bndstatus = {0x02 0xd0 0x7d 0xf7 0x00 0x00 0x00 0x00}'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/Makefile
deleted file mode 100644
index aa88c47..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../../make
-
-CXX_SOURCES := main.cpp
-
-CFLAGS_EXTRAS += -mmpx -fcheck-pointer-bounds -fuse-ld=bfd
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py
deleted file mode 100644
index 2fd2dab..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/intel_xtended_registers/mpx_bound_violation/TestBoundViolation.py
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-Test the Intel(R) MPX bound violation signal.
-"""
-
-from __future__ import print_function
-
-
-import os
-import sys
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class RegisterCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIf(compiler="clang")
-    @skipIf(oslist=no_match(['linux']))
-    @skipIf(archs=no_match(['i386', 'x86_64']))
-    @skipIf(oslist=["linux"], compiler="gcc", compiler_version=["<", "5"]) #GCC version >= 5 supports Intel(R) MPX.
-    def test_mpx_boundary_violation(self):
-        """Test Intel(R) MPX bound violation signal."""
-        self.build()
-        self.mpx_boundary_violation()
-
-    def mpx_boundary_violation(self):
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        target = self.dbg.GetSelectedTarget()
-        process = target.GetProcess()
-
-        if (process.GetState() == lldb.eStateExited):
-            self.skipTest("Intel(R) MPX is not supported.")
-
-        if (process.GetState() == lldb.eStateStopped):
-            self.expect("thread backtrace", STOPPED_DUE_TO_SIGNAL,
-                        substrs = ['stop reason = signal SIGSEGV: upper bound violation',
-                                   'fault address:', 'lower bound:', 'upper bound:'])
-
-        self.runCmd("continue")
-
-        if (process.GetState() == lldb.eStateStopped):
-            self.expect("thread backtrace", STOPPED_DUE_TO_SIGNAL,
-                        substrs = ['stop reason = signal SIGSEGV: lower bound violation',
-                                   'fault address:', 'lower bound:', 'upper bound:'])
-
-        self.runCmd("continue")
-        self.assertTrue(process.GetState() == lldb.eStateExited,
-                        PROCESS_EXITED)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/Makefile
deleted file mode 100644
index 3c6deff..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp a.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
deleted file mode 100644
index df6c92e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
+++ /dev/null
@@ -1,479 +0,0 @@
-"""
-Test the 'register' command.
-"""
-
-from __future__ import print_function
-
-
-import os
-import sys
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class RegisterCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.has_teardown = False
-
-    def tearDown(self):
-        self.dbg.GetSelectedTarget().GetProcess().Destroy()
-        TestBase.tearDown(self)
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-    @expectedFailureNetBSD
-    def test_register_commands(self):
-        """Test commands related to registers, in particular vector registers."""
-        self.build()
-        self.common_setup()
-
-        # verify that logging does not assert
-        self.log_enable("registers")
-
-        self.expect("register read -a", MISSING_EXPECTED_REGISTERS,
-                    substrs=['registers were unavailable'], matching=False)
-
-        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
-            self.runCmd("register read xmm0")
-            self.runCmd("register read ymm15")  # may be available
-            self.runCmd("register read bnd0")  # may be available
-        elif self.getArchitecture() in ['arm', 'armv7', 'armv7k', 'arm64']:
-            self.runCmd("register read s0")
-            self.runCmd("register read q15")  # may be available
-
-        self.expect(
-            "register read -s 4",
-            substrs=['invalid register set index: 4'],
-            error=True)
-
-    @skipIfiOSSimulator
-    # Writing of mxcsr register fails, presumably due to a kernel/hardware
-    # problem
-    @skipIfTargetAndroid(archs=["i386"])
-    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37995")
-    @expectedFailureNetBSD
-    def test_fp_register_write(self):
-        """Test commands that write to registers, in particular floating-point registers."""
-        self.build()
-        self.fp_register_write()
-
-    @skipIfiOSSimulator
-    # "register read fstat" always return 0xffff
-    @expectedFailureAndroid(archs=["i386"])
-    @skipIfFreeBSD  # llvm.org/pr25057
-    @skipIf(archs=no_match(['amd64', 'i386', 'x86_64']))
-    @skipIfOutOfTreeDebugserver
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37995")
-    @expectedFailureNetBSD
-    def test_fp_special_purpose_register_read(self):
-        """Test commands that read fpu special purpose registers."""
-        self.build()
-        self.fp_special_purpose_register_read()
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'arm', 'i386', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
-    def test_register_expressions(self):
-        """Test expression evaluation with commands related to registers."""
-        self.build()
-        self.common_setup()
-
-        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
-            gpr = "eax"
-            vector = "xmm0"
-        elif self.getArchitecture() in ['arm64', 'aarch64']:
-            gpr = "w0"
-            vector = "v0"
-        elif self.getArchitecture() in ['arm', 'armv7', 'armv7k']:
-            gpr = "r0"
-            vector = "q0"
-
-        self.expect("expr/x $%s" % gpr, substrs=['unsigned int', ' = 0x'])
-        self.expect("expr $%s" % vector, substrs=['vector_type'])
-        self.expect(
-            "expr (unsigned int)$%s[0]" %
-            vector, substrs=['unsigned int'])
-
-        if self.getArchitecture() in ['amd64', 'x86_64']:
-            self.expect(
-                "expr -- ($rax & 0xffffffff) == $eax",
-                substrs=['true'])
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
-    def test_convenience_registers(self):
-        """Test convenience registers."""
-        self.build()
-        self.convenience_registers()
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
-    @expectedFailureNetBSD
-    def test_convenience_registers_with_process_attach(self):
-        """Test convenience registers after a 'process attach'."""
-        self.build()
-        self.convenience_registers_with_process_attach(test_16bit_regs=False)
-
-    @skipIfiOSSimulator
-    @skipIf(archs=no_match(['amd64', 'x86_64']))
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37683")
-    @expectedFailureNetBSD
-    def test_convenience_registers_16bit_with_process_attach(self):
-        """Test convenience registers after a 'process attach'."""
-        self.build()
-        self.convenience_registers_with_process_attach(test_16bit_regs=True)
-
-    def common_setup(self):
-        exe = self.getBuildArtifact("a.out")
-
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Break in main().
-        lldbutil.run_break_set_by_symbol(
-            self, "main", num_expected_locations=-1)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped', 'stop reason = breakpoint'])
-
-    # platform specific logging of the specified category
-    def log_enable(self, category):
-        # This intentionally checks the host platform rather than the target
-        # platform as logging is host side.
-        self.platform = ""
-        if (sys.platform.startswith("freebsd") or
-                sys.platform.startswith("linux") or
-                sys.platform.startswith("netbsd")):
-            self.platform = "posix"
-
-        if self.platform != "":
-            self.log_file = self.getBuildArtifact('TestRegisters.log')
-            self.runCmd(
-                "log enable " +
-                self.platform +
-                " " +
-                str(category) +
-                " registers -v -f " +
-                self.log_file,
-                RUN_SUCCEEDED)
-            if not self.has_teardown:
-                def remove_log(self):
-                    if os.path.exists(self.log_file):
-                        os.remove(self.log_file)
-                self.has_teardown = True
-                self.addTearDownHook(remove_log)
-
-    def write_and_read(self, frame, register, new_value, must_exist=True):
-        value = frame.FindValue(register, lldb.eValueTypeRegister)
-        if must_exist:
-            self.assertTrue(
-                value.IsValid(),
-                "finding a value for register " +
-                register)
-        elif not value.IsValid():
-            return  # If register doesn't exist, skip this test
-
-        # Also test the 're' alias.
-        self.runCmd("re write " + register + " \'" + new_value + "\'")
-        self.expect(
-            "register read " +
-            register,
-            substrs=[
-                register +
-                ' = ',
-                new_value])
-
-    def fp_special_purpose_register_read(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process and stop.
-        self.expect("run", PROCESS_STOPPED, substrs=['stopped'])
-
-        # Check stop reason; Should be either signal SIGTRAP or EXC_BREAKPOINT
-        output = self.res.GetOutput()
-        matched = False
-        substrs = [
-            'stop reason = EXC_BREAKPOINT',
-            'stop reason = signal SIGTRAP']
-        for str1 in substrs:
-            matched = output.find(str1) != -1
-            with recording(self, False) as sbuf:
-                print("%s sub string: %s" % ('Expecting', str1), file=sbuf)
-                print("Matched" if matched else "Not Matched", file=sbuf)
-            if matched:
-                break
-        self.assertTrue(matched, STOPPED_DUE_TO_SIGNAL)
-
-        process = target.GetProcess()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        thread = process.GetThreadAtIndex(0)
-        self.assertTrue(thread.IsValid(), "current thread is valid")
-
-        currentFrame = thread.GetFrameAtIndex(0)
-        self.assertTrue(currentFrame.IsValid(), "current frame is valid")
-
-        # Extract the value of fstat and ftag flag at the point just before
-        # we start pushing floating point values on st% register stack
-        value = currentFrame.FindValue("fstat", lldb.eValueTypeRegister)
-        error = lldb.SBError()
-        reg_value_fstat_initial = value.GetValueAsUnsigned(error, 0)
-
-        self.assertTrue(error.Success(), "reading a value for fstat")
-        value = currentFrame.FindValue("ftag", lldb.eValueTypeRegister)
-        error = lldb.SBError()
-        reg_value_ftag_initial = value.GetValueAsUnsigned(error, 0)
-
-        self.assertTrue(error.Success(), "reading a value for ftag")
-        fstat_top_pointer_initial = (reg_value_fstat_initial & 0x3800) >> 11
-
-        # Execute 'si' aka 'thread step-inst' instruction 5 times and with
-        # every execution verify the value of fstat and ftag registers
-        for x in range(0, 5):
-            # step into the next instruction to push a value on 'st' register
-            # stack
-            self.runCmd("si", RUN_SUCCEEDED)
-
-            # Verify fstat and save it to be used for verification in next
-            # execution of 'si' command
-            if not (reg_value_fstat_initial & 0x3800):
-                self.expect("register read fstat", substrs=[
-                            'fstat' + ' = ', str("0x%0.4x" % ((reg_value_fstat_initial & ~(0x3800)) | 0x3800))])
-                reg_value_fstat_initial = (
-                    (reg_value_fstat_initial & ~(0x3800)) | 0x3800)
-                fstat_top_pointer_initial = 7
-            else:
-                self.expect("register read fstat", substrs=[
-                            'fstat' + ' = ', str("0x%0.4x" % (reg_value_fstat_initial - 0x0800))])
-                reg_value_fstat_initial = (reg_value_fstat_initial - 0x0800)
-                fstat_top_pointer_initial -= 1
-
-            # Verify ftag and save it to be used for verification in next
-            # execution of 'si' command
-            self.expect(
-                "register read ftag", substrs=[
-                    'ftag' + ' = ', str(
-                        "0x%0.4x" %
-                        (reg_value_ftag_initial | (
-                            1 << fstat_top_pointer_initial)))])
-            reg_value_ftag_initial = reg_value_ftag_initial | (
-                1 << fstat_top_pointer_initial)
-
-    def fp_register_write(self):
-        exe = self.getBuildArtifact("a.out")
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Launch the process, stop at the entry point.
-        error = lldb.SBError()
-        process = target.Launch(
-                lldb.SBListener(),
-                None, None, # argv, envp
-                None, None, None, # stdin/out/err
-                self.get_process_working_directory(),
-                0, # launch flags
-                True, # stop at entry
-                error)
-        self.assertTrue(error.Success(), "Launch succeeds. Error is :" + str(error))
-
-        self.assertTrue(
-            process.GetState() == lldb.eStateStopped,
-            PROCESS_STOPPED)
-
-        thread = process.GetThreadAtIndex(0)
-        self.assertTrue(thread.IsValid(), "current thread is valid")
-
-        currentFrame = thread.GetFrameAtIndex(0)
-        self.assertTrue(currentFrame.IsValid(), "current frame is valid")
-
-        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
-            reg_list = [
-                # reg          value        must-have
-                ("fcw", "0x0000ff0e", False),
-                ("fsw", "0x0000ff0e", False),
-                ("ftw", "0x0000ff0e", False),
-                ("ip", "0x0000ff0e", False),
-                ("dp", "0x0000ff0e", False),
-                ("mxcsr", "0x0000ff0e", False),
-                ("mxcsrmask", "0x0000ff0e", False),
-            ]
-
-            st0regname = None
-            if currentFrame.FindRegister("st0").IsValid():
-                st0regname = "st0"
-            elif currentFrame.FindRegister("stmm0").IsValid():
-                st0regname = "stmm0"
-            if st0regname is not None:
-                # reg          value
-                # must-have
-                reg_list.append(
-                    (st0regname, "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00}", True))
-                reg_list.append(
-                    ("xmm0",
-                     "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}",
-                     True))
-                reg_list.append(
-                    ("xmm15",
-                     "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
-                     False))
-        elif self.getArchitecture() in ['arm64', 'aarch64']:
-            reg_list = [
-                # reg      value
-                # must-have
-                ("fpsr", "0xfbf79f9f", True),
-                ("s0", "1.25", True),
-                ("s31", "0.75", True),
-                ("d1", "123", True),
-                ("d17", "987", False),
-                ("v1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
-                ("v14",
-                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
-                 False),
-            ]
-        elif self.getArchitecture() in ['armv7'] and self.platformIsDarwin():
-            reg_list = [
-                # reg      value
-                # must-have
-                ("fpsr", "0xfbf79f9f", True),
-                ("s0", "1.25", True),
-                ("s31", "0.75", True),
-                ("d1", "123", True),
-                ("d17", "987", False),
-                ("q1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
-                ("q14",
-                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
-                 False),
-            ]
-        elif self.getArchitecture() in ['arm', 'armv7k']:
-            reg_list = [
-                # reg      value
-                # must-have
-                ("fpscr", "0xfbf79f9f", True),
-                ("s0", "1.25", True),
-                ("s31", "0.75", True),
-                ("d1", "123", True),
-                ("d17", "987", False),
-                ("q1", "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x2f 0x2f}", True),
-                ("q14",
-                 "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f}",
-                 False),
-            ]
-
-        for (reg, val, must) in reg_list:
-            self.write_and_read(currentFrame, reg, val, must)
-
-        if self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
-            if st0regname is None:
-                self.fail("st0regname could not be determined")
-            self.runCmd(
-                "register write " +
-                st0regname +
-                " \"{0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00}\"")
-            self.expect(
-                "register read " +
-                st0regname +
-                " --format f",
-                substrs=[
-                    st0regname +
-                    ' = 0'])
-
-            has_avx = False
-            has_mpx = False
-            # Returns an SBValueList.
-            registerSets = currentFrame.GetRegisters()
-            for registerSet in registerSets:
-                if 'advanced vector extensions' in registerSet.GetName().lower():
-                    has_avx = True
-                if 'memory protection extension' in registerSet.GetName().lower():
-                    has_mpx = True
-
-            if has_avx:
-                new_value = "{0x01 0x02 0x03 0x00 0x00 0x00 0x00 0x00 0x09 0x0a 0x2f 0x2f 0x2f 0x2f 0x0e 0x0f 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0c 0x0d 0x0e 0x0f}"
-                self.write_and_read(currentFrame, "ymm0", new_value)
-                self.write_and_read(currentFrame, "ymm7", new_value)
-                self.expect("expr $ymm0", substrs=['vector_type'])
-            else:
-                self.runCmd("register read ymm0")
-
-            if has_mpx:
-                # Test write and read for bnd0.
-                new_value_w = "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}"
-                self.runCmd("register write bnd0 \'" + new_value_w + "\'")
-                new_value_r = "{0x0807060504030201 0x100f0e0d0c0b0a09}"
-                self.expect("register read bnd0", substrs = ['bnd0 = ', new_value_r])
-                self.expect("expr $bnd0", substrs = ['vector_type'])
-
-                # Test write and for bndstatus.
-                new_value = "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08}"
-                self.write_and_read(currentFrame, "bndstatus", new_value)
-                self.expect("expr $bndstatus", substrs = ['vector_type'])
-            else:
-                self.runCmd("register read bnd0")
-
-    def convenience_registers(self):
-        """Test convenience registers."""
-        self.common_setup()
-
-        # The command "register read -a" does output a derived register like
-        # eax...
-        self.expect("register read -a", matching=True,
-                    substrs=['eax'])
-
-        # ...however, the vanilla "register read" command should not output derived registers like eax.
-        self.expect("register read", matching=False,
-                    substrs=['eax'])
-
-        # Test reading of rax and eax.
-        self.expect("register read rax eax",
-                    substrs=['rax = 0x', 'eax = 0x'])
-
-        # Now write rax with a unique bit pattern and test that eax indeed
-        # represents the lower half of rax.
-        self.runCmd("register write rax 0x1234567887654321")
-        self.expect("register read rax 0x1234567887654321",
-                    substrs=['0x1234567887654321'])
-
-    def convenience_registers_with_process_attach(self, test_16bit_regs):
-        """Test convenience registers after a 'process attach'."""
-        exe = self.getBuildArtifact("a.out")
-
-        # Spawn a new process
-        pid = self.spawnSubprocess(exe, ['wait_for_attach']).pid
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        if self.TraceOn():
-            print("pid of spawned process: %d" % pid)
-
-        self.runCmd("process attach -p %d" % pid)
-
-        # Check that "register read eax" works.
-        self.runCmd("register read eax")
-
-        if self.getArchitecture() in ['amd64', 'x86_64']:
-            self.expect("expr -- ($rax & 0xffffffff) == $eax",
-                        substrs=['true'])
-
-        if test_16bit_regs:
-            self.expect("expr -- $ax == (($ah << 8) | $al)",
-                        substrs=['true'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/rerun/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/rerun/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/rerun/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/rerun/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py
index 044d3d2..d2e5701 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/rerun/TestRerun.py
@@ -1,12 +1,9 @@
 """
 Test that argdumper is a viable launching strategy.
 """
-from __future__ import print_function
 
 
 import lldb
-import os
-import time
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/return-value/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/return-value/Makefile
index fd4e308..138642c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/return-value/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/return-value/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := call-func.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
index cbc8cd8..a5439b1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/return-value/TestReturnValue.py
@@ -2,12 +2,8 @@
 Test getting return-values correctly when stepping out
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -22,6 +18,9 @@
         return ("clang" in self.getCompiler() and self.getArchitecture() ==
             "aarch64" and self.getPlatform() == "linux")
 
+    def affected_by_pr44132(self):
+        return (self.getArchitecture() == "aarch64" and self.getPlatform() == "linux")
+
     # ABIMacOSX_arm can't fetch simple values inside a structure
     def affected_by_radar_34562999(self):
         return (self.getArchitecture() == 'armv7' or self.getArchitecture() == 'armv7k') and self.platformIsDarwin()
@@ -126,7 +125,7 @@
 
         #self.assertTrue(in_float == return_float)
 
-        if not self.affected_by_radar_34562999():
+        if not self.affected_by_radar_34562999() and not self.affected_by_pr44132():
             self.return_and_test_struct_value("return_one_int")
             self.return_and_test_struct_value("return_two_int")
             self.return_and_test_struct_value("return_three_int")
@@ -185,10 +184,12 @@
 
         self.return_and_test_struct_value("return_vector_size_float32_8")
         self.return_and_test_struct_value("return_vector_size_float32_16")
-        self.return_and_test_struct_value("return_vector_size_float32_32")
+        if not self.affected_by_pr44132():
+            self.return_and_test_struct_value("return_vector_size_float32_32")
         self.return_and_test_struct_value("return_ext_vector_size_float32_2")
         self.return_and_test_struct_value("return_ext_vector_size_float32_4")
-        self.return_and_test_struct_value("return_ext_vector_size_float32_8")
+        if not self.affected_by_pr44132():
+            self.return_and_test_struct_value("return_ext_vector_size_float32_8")
 
     # limit the nested struct and class tests to only x86_64
     @skipIf(archs=no_match(['x86_64']))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile
index 9e1d63a..37dd8f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/set-data/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py
index 6e4dbf4..5b0a7bd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/set-data/TestSetData.py
@@ -2,11 +2,8 @@
 Set the contents of variables and registers using raw data
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py
index a56282e..1d4bc6f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/show_location/TestShowLocationDwarf5.py
@@ -9,6 +9,8 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
+    @skipIf(archs="aarch64", oslist="linux",
+            bugnumber="https://bugs.llvm.org/show_bug.cgi?id=44180")
     def test_source_map(self):
         # Set the target soure map to map "./" to the current test directory.
         yaml_path = os.path.join(self.getSourceDir(), "a.yaml")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py
index cda69f7..ca268af 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/TestSendSignal.py
@@ -1,11 +1,7 @@
 """Test that lldb command 'process signal SIGUSR1' to send a signal to the inferior works."""
 
-from __future__ import print_function
 
 
-import os
-import time
-import signal
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -25,8 +21,8 @@
     @expectedFailureAll(
         oslist=['freebsd'],
         bugnumber="llvm.org/pr23318: does not report running state")
+    @expectedFailureNetBSD(bugnumber='llvm.org/pr43959')
     @skipIfWindows  # Windows does not support signals
-    @expectedFailureNetBSD
     def test_with_run_command(self):
         """Test that lldb command 'process signal SIGUSR1' sends a signal to the inferior process."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/Makefile
new file mode 100644
index 0000000..1049594
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/TestHandleAbort.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/TestHandleAbort.py
new file mode 100644
index 0000000..5f3eb31
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/TestHandleAbort.py
@@ -0,0 +1,70 @@
+"""Test that we can unwind out of a SIGABRT handler"""
+
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class HandleAbortTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIfWindows  # signals do not exist on Windows
+    @expectedFailureNetBSD
+    def test_inferior_handle_sigabrt(self):
+        """Inferior calls abort() and handles the resultant SIGABRT.
+           Stopped at a breakpoint in the handler, verify that the backtrace
+           includes the function that called abort()."""
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # launch
+        process = target.LaunchSimple(
+            None, None, self.get_process_working_directory())
+        self.assertTrue(process, PROCESS_IS_VALID)
+        self.assertEqual(process.GetState(), lldb.eStateStopped)
+        signo = process.GetUnixSignals().GetSignalNumberFromName("SIGABRT")
+
+        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonSignal)
+        self.assertTrue(
+            thread and thread.IsValid(),
+            "Thread should be stopped due to a signal")
+        self.assertTrue(
+            thread.GetStopReasonDataCount() >= 1,
+            "There should be data in the event.")
+        self.assertEqual(thread.GetStopReasonDataAtIndex(0),
+                         signo, "The stop signal should be SIGABRT")
+
+        # Continue to breakpoint in abort handler
+        bkpt = target.FindBreakpointByID(
+            lldbutil.run_break_set_by_source_regexp(self, "Set a breakpoint here"))
+        threads = lldbutil.continue_to_breakpoint(process, bkpt)
+        self.assertEqual(len(threads), 1, "Expected single thread")
+        thread = threads[0]
+
+        # Expect breakpoint in 'handler'
+        frame = thread.GetFrameAtIndex(0)
+        self.assertEqual(frame.GetDisplayFunctionName(), "handler", "Unexpected break?")
+
+        # Expect that unwinding should find 'abort_caller'
+        foundFoo = False
+        for frame in thread:
+            if frame.GetDisplayFunctionName() == "abort_caller":
+                foundFoo = True
+
+        self.assertTrue(foundFoo, "Unwinding did not find func that called abort")
+
+        # Continue until we exit.
+        process.Continue()
+        self.assertEqual(process.GetState(), lldb.eStateExited)
+        self.assertEqual(process.GetExitStatus(), 0)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/main.c
new file mode 100644
index 0000000..c2daea1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-abrt/main.c
@@ -0,0 +1,25 @@
+#include <signal.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void handler(int sig)
+{
+    printf("Set a breakpoint here.\n");
+    exit(0);
+}
+
+void abort_caller() {
+    abort();
+}
+
+int main()
+{
+    if (signal(SIGABRT, handler) == SIG_ERR)
+    {
+        perror("signal");
+        return 1;
+    }
+
+    abort_caller();
+    return 2;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
index 1ebab88..30ae201 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/handle-segv/TestHandleSegv.py
@@ -1,10 +1,7 @@
 """Test that we can debug inferiors that handle SIGSEGV by themselves"""
 
-from __future__ import print_function
 
 
-import os
-import re
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -18,6 +15,7 @@
 
     @skipIfWindows  # signals do not exist on Windows
     @skipIfDarwin
+    @expectedFailureNetBSD
     def test_inferior_handle_sigsegv(self):
         self.build()
         exe = self.getBuildArtifact("a.out")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py
index 6b52540..70271e4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/signal/raise/TestRaise.py
@@ -1,9 +1,7 @@
 """Test that we handle inferiors that send signals to themselves"""
 
-from __future__ import print_function
 
 
-import os
 import lldb
 import re
 from lldbsuite.test.lldbplatformutil import getDarwinOSTriples
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats/Makefile
deleted file mode 100644
index f5a47fc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../make
-C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/Makefile
index f5a47fc..c9319d6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/Makefile
@@ -1,3 +1,2 @@
-LEVEL = ../../make
 C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py
index f2027eb..d4903b5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/stats_api/TestStatisticsAPI.py
@@ -10,9 +10,6 @@
 class TestStatsAPI(TestBase):
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        TestBase.setUp(self)
-
     def test_stats_api(self):
         self.build()
         exe = self.getBuildArtifact("a.out")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile
index 4f71dc8..374e58b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../make
-
 C_SOURCES := with-debug.c without-debug.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 without-debug.o: without-debug.c
 	$(CC) $(CFLAGS_NO_DEBUG) -c $<
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
index 446c267..629efb5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step-avoids-no-debug/TestStepNoDebug.py
@@ -2,12 +2,8 @@
 Test thread step-in, step-over and step-out work with the "Avoid no debug" option.
 """
 
-from __future__ import print_function
 
 
-import os
-import re
-import sys
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -20,7 +16,6 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @add_test_categories(['pyapi'])
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
     def test_step_out_with_python(self):
         """Test stepping out using avoid-no-debug with dsyms."""
         self.build()
@@ -37,7 +32,6 @@
             "3.9"],
         archs=["i386"],
         bugnumber="llvm.org/pr28549")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
     def test_step_over_with_python(self):
         """Test stepping over using avoid-no-debug with dwarf."""
         self.build()
@@ -55,7 +49,8 @@
         archs=["i386"],
         bugnumber="llvm.org/pr28549")
     @expectedFailureAll(oslist=["ios", "tvos", "bridgeos"], bugnumber="<rdar://problem/34026777>")  # lldb doesn't step past last source line in function on arm64
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
+    @expectedFailureAll(archs=["aarch64"], oslist=["linux"],
+                        bugnumber="llvm.org/pr44057")
     def test_step_in_with_python(self):
         """Test stepping in using avoid-no-debug with dwarf."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py
index 1383a03..4133cbb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/Steps.py
@@ -35,3 +35,49 @@
 
     def queue_child_thread_plan(self):
         return self.thread_plan.QueueThreadPlanForStepScripted("Steps.StepOut")
+
+# This plan does a step-over until a variable changes value.
+class StepUntil(StepWithChild):
+    def __init__(self, thread_plan, args_data, dict):
+        self.frame = thread_plan.GetThread().frames[0]
+        self.target = thread_plan.GetThread().GetProcess().GetTarget()
+        func_entry = args_data.GetValueForKey("variable_name")
+        
+        if not func_entry.IsValid():
+            print("Did not get a valid entry for variable_name")
+        func_name = func_entry.GetStringValue(100)
+
+        self.value = self.frame.FindVariable(func_name)
+        if self.value.GetError().Fail():
+            print("Failed to get foo value: %s"%(self.value.GetError().GetCString()))
+        else:
+            print("'foo' value: %d"%(self.value.GetValueAsUnsigned()))
+
+        StepWithChild.__init__(self, thread_plan)
+
+
+    def queue_child_thread_plan(self):
+        le = self.frame.GetLineEntry()
+        start_addr = le.GetStartAddress() 
+        start = start_addr.GetLoadAddress(self.target)
+        end = le.GetEndAddress().GetLoadAddress(self.target)
+        return self.thread_plan.QueueThreadPlanForStepOverRange(start_addr,
+                                                                end - start)
+
+    def should_stop(self, event):
+        if not self.child_thread_plan.IsPlanComplete():
+            return False
+
+        # If we've stepped out of this frame, stop.
+        if not self.frame.IsValid():
+            return True
+
+        if not self.value.IsValid():
+            return True
+
+        print("Got next value: %d"%(self.value.GetValueAsUnsigned()))
+        if not self.value.GetValueDidChange():
+            self.child_thread_plan = self.queue_child_thread_plan()
+            return False
+        else:
+            return True
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/TestStepScripted.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/TestStepScripted.py
index a111ede..eb1b582 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/TestStepScripted.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/TestStepScripted.py
@@ -12,24 +12,27 @@
 
     NO_DEBUG_INFO_TESTCASE = True
 
-    def test_standard_step_out(self):
-        """Tests stepping with the scripted thread plan laying over a standard thread plan for stepping out."""
-        self.build()
+    def setUp(self):
+        TestBase.setUp(self)
         self.main_source_file = lldb.SBFileSpec("main.c")
+        self.runCmd("command script import Steps.py")
+
+    def test_standard_step_out(self):
+        """Tests stepping with the scripted thread plan laying over a standard 
+        thread plan for stepping out."""
+        self.build()
         self.step_out_with_scripted_plan("Steps.StepOut")
 
     def test_scripted_step_out(self):
-        """Tests stepping with the scripted thread plan laying over an another scripted thread plan for stepping out."""
+        """Tests stepping with the scripted thread plan laying over an another 
+        scripted thread plan for stepping out."""
         self.build()
-        self.main_source_file = lldb.SBFileSpec("main.c")
         self.step_out_with_scripted_plan("Steps.StepScripted")
 
-    def setUp(self):
-        TestBase.setUp(self)
-        self.runCmd("command script import Steps.py")
-
     def step_out_with_scripted_plan(self, name):
-        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self, "Set a breakpoint here", self.main_source_file)
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                                                            "Set a breakpoint here",
+                                                                            self.main_source_file)
 
         frame = thread.GetFrameAtIndex(0)
         self.assertEqual("foo", frame.GetFunctionName())
@@ -39,3 +42,67 @@
 
         frame = thread.GetFrameAtIndex(0)
         self.assertEqual("main", frame.GetFunctionName())
+
+
+    def test_misspelled_plan_name(self):
+        """Test that we get a useful error if we misspell the plan class name"""
+        self.build()
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                                                            "Set a breakpoint here",
+                                                                            self.main_source_file)
+        stop_id = process.GetStopID()
+        # Pass a non-existent class for the plan class:
+        err = thread.StepUsingScriptedThreadPlan("NoSuchModule.NoSuchPlan")
+        
+        # Make sure we got a good error:
+        self.assertTrue(err.Fail(), "We got a failure state")
+        msg = err.GetCString()
+        self.assertTrue("NoSuchModule.NoSuchPlan" in msg, "Mentioned missing class")
+        
+        # Make sure we didn't let the process run:
+        self.assertEqual(stop_id, process.GetStopID(), "Process didn't run")
+        
+    def test_checking_variable(self):
+        """Test that we can call SBValue API's from a scripted thread plan - using SBAPI's to step"""
+        self.do_test_checking_variable(False)
+        
+    def test_checking_variable_cli(self):
+        """Test that we can call SBValue API's from a scripted thread plan - using cli to step"""
+        self.do_test_checking_variable(True)
+        
+    def do_test_checking_variable(self, use_cli):
+        self.build()
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                                                            "Set a breakpoint here",
+                                                                            self.main_source_file)
+
+        frame = thread.GetFrameAtIndex(0)
+        self.assertEqual("foo", frame.GetFunctionName())
+        foo_val = frame.FindVariable("foo")
+        self.assertTrue(foo_val.GetError().Success(), "Got the foo variable")
+        self.assertEqual(foo_val.GetValueAsUnsigned(), 10, "foo starts at 10")
+
+        if use_cli:
+            result = lldb.SBCommandReturnObject()
+            self.dbg.GetCommandInterpreter().HandleCommand(
+                "thread step-scripted -C Steps.StepUntil -k variable_name -v foo",
+                result)
+            self.assertTrue(result.Succeeded())
+        else:
+            args_data = lldb.SBStructuredData()
+            data = lldb.SBStream()
+            data.Print('{"variable_name" : "foo"}')
+            error = args_data.SetFromJSON(data)
+            self.assertTrue(error.Success(), "Made the args_data correctly")
+
+            err = thread.StepUsingScriptedThreadPlan("Steps.StepUntil", args_data, True)
+            self.assertTrue(err.Success(), err.GetCString())
+
+        # We should not have exited:
+        self.assertEqual(process.GetState(), lldb.eStateStopped, "We are stopped")
+        
+        # We should still be in foo:
+        self.assertEqual("foo", frame.GetFunctionName())
+
+        # And foo should have changed:
+        self.assertTrue(foo_val.GetValueDidChange(), "Foo changed")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/main.c
index 88b3c17..bfd8a35 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/main.c
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/step_scripted/main.c
@@ -1,7 +1,10 @@
 #include <stdio.h>
 
 void foo() {
-  printf("Set a breakpoint here.\n");
+  int foo = 10; 
+  printf("%d\n", foo); // Set a breakpoint here. 
+  foo = 20;
+  printf("%d\n", foo);
 }
 
 int main() {
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/TestAmbiguousTailCallSeq1.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/TestAmbiguousTailCallSeq1.py
index aec4d50..fbd6296 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/TestAmbiguousTailCallSeq1.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq1/TestAmbiguousTailCallSeq1.py
@@ -2,4 +2,5 @@
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo])
+        [decorators.skipUnlessHasCallSiteInfo,
+         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py
index aec4d50..fbd6296 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/ambiguous_tail_call_seq2/TestAmbiguousTailCallSeq2.py
@@ -2,4 +2,5 @@
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo])
+        [decorators.skipUnlessHasCallSiteInfo,
+         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py
index aec4d50..fbd6296 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_call_site/TestDisambiguateCallSite.py
@@ -2,4 +2,5 @@
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo])
+        [decorators.skipUnlessHasCallSiteInfo,
+         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py
index aec4d50..fbd6296 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_paths_to_common_sink/TestDisambiguatePathsToCommonSink.py
@@ -2,4 +2,5 @@
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo])
+        [decorators.skipUnlessHasCallSiteInfo,
+         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py
index aec4d50..fbd6296 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/disambiguate_tail_call_seq/TestDisambiguateTailCallSeq.py
@@ -2,4 +2,5 @@
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo])
+        [decorators.skipUnlessHasCallSiteInfo,
+         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py
index aec4d50..fbd6296 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/inlining_and_tail_calls/TestInliningAndTailCalls.py
@@ -2,4 +2,5 @@
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo])
+        [decorators.skipUnlessHasCallSiteInfo,
+         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
index 6af6aeb..e597b8d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/sbapi_support/TestTailCallFrameSBAPI.py
@@ -17,10 +17,6 @@
         self.build()
         self.do_test()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def do_test(self):
         exe = self.getBuildArtifact("a.out")
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py
index aec4d50..fbd6296 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_message/TestArtificialFrameStepOutMessage.py
@@ -2,4 +2,5 @@
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo])
+        [decorators.skipUnlessHasCallSiteInfo,
+         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py
index 2b432e5..24fc2ba 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/thread_step_out_or_return/TestSteppingOutWithArtificialFrames.py
@@ -90,6 +90,3 @@
         self.assertEqual(frame4.GetDisplayFunctionName(), "main")
         self.assertFalse(frame2.IsArtificial())
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
index 15bc2e7..666a6c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/Makefile
@@ -1,4 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
-CXXFLAGS += -g -O1 -glldb
+
+CXXFLAGS_EXTRAS := -g -O2 -glldb
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
index aec4d50..fbd6296 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tail_call_frames/unambiguous_sequence/TestUnambiguousTailCalls.py
@@ -2,4 +2,5 @@
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(__file__, globals(),
-        [decorators.skipUnlessHasCallSiteInfo])
+        [decorators.skipUnlessHasCallSiteInfo,
+         decorators.skipIf(dwarf_version=['<', '4'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py
index e6614b0..b3db5f7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target-new-solib-notifications/TestModuleLoadedNotifys.py
@@ -6,9 +6,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/Makefile
deleted file mode 100644
index 9117ab9..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../make
-
-# Example:
-#
-# C_SOURCES := b.c
-# EXE := b.out
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py
deleted file mode 100644
index 71bfff1..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_command/TestTargetCommand.py
+++ /dev/null
@@ -1,277 +0,0 @@
-"""
-Test some target commands: create, list, select, variable.
-"""
-
-from __future__ import print_function
-
-
-import lldb
-import sys
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class targetCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers for our breakpoints.
-        self.line_b = line_number('b.c', '// Set break point at this line.')
-        self.line_c = line_number('c.c', '// Set break point at this line.')
-
-    def test_target_command(self):
-        """Test some target commands: create, list, select."""
-        da = {'C_SOURCES': 'a.c', 'EXE': self.getBuildArtifact('a.out')}
-        self.build(dictionary=da)
-        self.addTearDownCleanup(dictionary=da)
-
-        db = {'C_SOURCES': 'b.c', 'EXE': self.getBuildArtifact('b.out')}
-        self.build(dictionary=db)
-        self.addTearDownCleanup(dictionary=db)
-
-        dc = {'C_SOURCES': 'c.c', 'EXE': self.getBuildArtifact('c.out')}
-        self.build(dictionary=dc)
-        self.addTearDownCleanup(dictionary=dc)
-
-        self.do_target_command()
-
-    # rdar://problem/9763907
-    # 'target variable' command fails if the target program has been run
-    @expectedFailureAndroid(archs=['aarch64'])
-    def test_target_variable_command(self):
-        """Test 'target variable' command before and after starting the inferior."""
-        d = {'C_SOURCES': 'globals.c', 'EXE': self.getBuildArtifact('globals')}
-        self.build(dictionary=d)
-        self.addTearDownCleanup(dictionary=d)
-
-        self.do_target_variable_command('globals')
-
-    @expectedFailureAndroid(archs=['aarch64'])
-    def test_target_variable_command_no_fail(self):
-        """Test 'target variable' command before and after starting the inferior."""
-        d = {'C_SOURCES': 'globals.c', 'EXE': self.getBuildArtifact('globals')}
-        self.build(dictionary=d)
-        self.addTearDownCleanup(dictionary=d)
-
-        self.do_target_variable_command_no_fail('globals')
-
-    def do_target_command(self):
-        """Exercise 'target create', 'target list', 'target select' commands."""
-        exe_a = self.getBuildArtifact("a.out")
-        exe_b = self.getBuildArtifact("b.out")
-        exe_c = self.getBuildArtifact("c.out")
-
-        self.runCmd("target list")
-        output = self.res.GetOutput()
-        if output.startswith("No targets"):
-            # We start from index 0.
-            base = 0
-        else:
-            # Find the largest index of the existing list.
-            import re
-            pattern = re.compile("target #(\d+):")
-            for line in reversed(output.split(os.linesep)):
-                match = pattern.search(line)
-                if match:
-                    # We will start from (index + 1) ....
-                    base = int(match.group(1), 10) + 1
-                    #print("base is:", base)
-                    break
-
-        self.runCmd("target create " + exe_a, CURRENT_EXECUTABLE_SET)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("target create " + exe_b, CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'b.c', self.line_b, num_expected_locations=1, loc_exact=True)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("target create " + exe_c, CURRENT_EXECUTABLE_SET)
-        lldbutil.run_break_set_by_file_and_line(
-            self, 'c.c', self.line_c, num_expected_locations=1, loc_exact=True)
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        self.runCmd("target list")
-
-        self.runCmd("target select %d" % base)
-        self.runCmd("thread backtrace")
-
-        self.runCmd("target select %d" % (base + 2))
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['c.c:%d' % self.line_c,
-                             'stop reason = breakpoint'])
-
-        self.runCmd("target select %d" % (base + 1))
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['b.c:%d' % self.line_b,
-                             'stop reason = breakpoint'])
-
-        self.runCmd("target list")
-
-    def do_target_variable_command(self, exe_name):
-        """Exercise 'target variable' command before and after starting the inferior."""
-        self.runCmd("file " + self.getBuildArtifact(exe_name),
-                    CURRENT_EXECUTABLE_SET)
-
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-
-        self.runCmd("b main")
-        self.runCmd("run")
-
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
-
-        self.runCmd("c")
-
-        # rdar://problem/9763907
-        # 'target variable' command fails if the target program has been run
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
-
-    def do_target_variable_command_no_fail(self, exe_name):
-        """Exercise 'target variable' command before and after starting the inferior."""
-        self.runCmd("file " + self.getBuildArtifact(exe_name),
-                    CURRENT_EXECUTABLE_SET)
-
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-
-        self.runCmd("b main")
-        self.runCmd("run")
-
-        # New feature: you don't need to specify the variable(s) to 'target vaiable'.
-        # It will find all the global and static variables in the current
-        # compile unit.
-        self.expect("target variable",
-                    substrs=['my_global_char',
-                             'my_global_str',
-                             'my_global_str_ptr',
-                             'my_static_int'])
-
-        self.expect(
-            "target variable my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_global_str',
-                '"abc"'])
-        self.expect(
-            "target variable my_static_int",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                'my_static_int',
-                '228'])
-        self.expect("target variable my_global_str_ptr", matching=False,
-                    substrs=['"abc"'])
-        self.expect("target variable *my_global_str_ptr", matching=True,
-                    substrs=['"abc"'])
-        self.expect(
-            "target variable *my_global_str",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=['a'])
-        self.expect(
-            "target variable my_global_char",
-            VARIABLES_DISPLAYED_CORRECTLY,
-            substrs=[
-                "my_global_char",
-                "'X'"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/Makefile
deleted file mode 100644
index 15cb0b6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/Makefile
+++ /dev/null
@@ -1,16 +0,0 @@
-LEVEL := ../../make
-
-LIB_PREFIX := load_
-
-LD_EXTRAS := -L. -l$(LIB_PREFIX)a
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
-
-a.out: lib_a
-
-lib_%:
-	$(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/$*.mk
-
-clean::
-	$(MAKE) -f $(SRCDIR)/a.mk clean
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/TestTargetCreateDeps.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/TestTargetCreateDeps.py
deleted file mode 100644
index a3831f1..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/TestTargetCreateDeps.py
+++ /dev/null
@@ -1,104 +0,0 @@
-"""
-Test that loading of dependents works correctly for all the potential
-combinations.
-"""
-
-from __future__ import print_function
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-@skipIfWindows # Windows deals differently with shared libs.
-class TargetDependentsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.build()
-
-    def has_exactly_one_image(self, matching, msg=""):
-        self.expect(
-            "image list",
-            "image list should contain at least one image",
-            substrs=['[  0]'])
-        should_match = not matching
-        self.expect(
-            "image list", msg, matching=should_match, substrs=['[  1]'])
-
-    @expectedFailureAll(oslist=["linux"]) #linux does not support loading dependent files
-    @expectedFailureNetBSD
-    def test_dependents_implicit_default_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create  " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(False)
-
-    @expectedFailureAll(oslist=["linux"]) #linux does not support loading dependent files
-    @expectedFailureNetBSD
-    def test_dependents_explicit_default_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create -ddefault " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(False)
-
-    def test_dependents_explicit_true_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create -dtrue " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    @expectedFailureAll(oslist=["linux"]) #linux does not support loading dependent files
-    @expectedFailureNetBSD
-    def test_dependents_explicit_false_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create -dfalse " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(False)
-
-    def test_dependents_implicit_false_exe(self):
-        """Test default behavior"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("target create  -d " + exe, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    def test_dependents_implicit_default_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    def test_dependents_explicit_default_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create -ddefault " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    def test_dependents_explicit_true_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create -dtrue " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
-
-    @expectedFailureAll(oslist=["linux"]) #linux does not support loading dependent files
-    @expectedFailureNetBSD
-    def test_dependents_explicit_false_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create -dfalse " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(False)
-
-    def test_dependents_implicit_false_lib(self):
-        ctx = self.platformContext
-        dylibName = ctx.shlib_prefix + 'load_a.' + ctx.shlib_extension
-        lib = self.getBuildArtifact(dylibName)
-        self.runCmd("target create -d " + lib, CURRENT_EXECUTABLE_SET)
-        self.has_exactly_one_image(True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/a.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/a.mk
deleted file mode 100644
index f199bfe..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_create_deps/a.mk
+++ /dev/null
@@ -1,9 +0,0 @@
-LEVEL := ../../make
-
-LIB_PREFIX := load_
-
-DYLIB_NAME := $(LIB_PREFIX)a
-DYLIB_CXX_SOURCES := a.cpp
-DYLIB_ONLY := YES
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_var/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_var/Makefile
index bb9cc4f..806c967 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_var/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_var/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../make
-
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 a.out: globals.ll
 	$(CC) $(CFLAGS) -g -c $^ -o globals.o
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_var/TestTargetVar.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_var/TestTargetVar.py
index d3afacc..f8c2a69 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_var/TestTargetVar.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/target_var/TestTargetVar.py
@@ -3,7 +3,6 @@
 """
 
 import lldb
-import sys
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py
index a594ad2..b3d3317 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/testid/TestTestId.py
@@ -3,7 +3,6 @@
 an id(). Other parts of the test running infrastructure are counting on this.
 """
 
-from __future__ import print_function
 from lldbsuite.test.lldbtest import TestBase
 
 class TestIdTestCase(TestBase):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
index 24e6801..cd092b7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/Makefile
@@ -1,6 +1,5 @@
-LEVEL = ../../../make
-
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 CXX_SOURCES := ParallelTask.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/ParallelTask.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/ParallelTask.cpp
old mode 100755
new mode 100644
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py
index 1892885..870b6b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_all/TestBacktraceAll.py
@@ -2,8 +2,6 @@
 Test regression for Bug 25251.
 """
 
-import os
-import time
 import unittest2
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
index f0bcf97..5fd720c6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/Makefile
@@ -1,6 +1,5 @@
-LEVEL = ../../../make
-
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/TestBacktraceLimit.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/TestBacktraceLimit.py
index 4e595ea..6dbb3e3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/TestBacktraceLimit.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/backtrace_limit/TestBacktraceLimit.py
@@ -14,10 +14,6 @@
     mydir = TestBase.compute_mydir(__file__)
     NO_DEBUG_INFO_TESTCASE = True
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def test_backtrace_depth(self):
         """Test that the max-backtrace-depth setting limits backtraces."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/Makefile
index 67aa166..566938c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
index 6b4d9be..391f9d9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/break_after_join/TestBreakAfterJoin.py
@@ -2,11 +2,8 @@
 Test number of threads.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/Makefile
index 469c080..c33ae56 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
 ENABLE_THREADS := YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py
index c8afdfc..a0c1da8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointDelayBreakpointOneSignal.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py
index fd62edb..bcee1c5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointOneDelayBreakpointThreads.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     def test(self):
         """Test threads that trigger a breakpoint where one thread has a 1 second delay. """
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py
index 1d85dd0..dfe2cb7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentBreakpointsDelayedBreakpointOneWatchpoint.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -16,7 +15,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test a breakpoint, a delayed breakpoint, and one watchpoint thread. """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py
index 9ce89e89..9083c38 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithBreak.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     def test(self):
         """ Test a thread that crashes while another thread hits a breakpoint."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py
index 715c55d..37795be 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithSignal.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     def test(self):
         """ Test a thread that crashes while another thread generates a signal."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py
index bf92488..13f5b4a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpoint.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """ Test a thread that crashes while another thread hits a watchpoint."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py
index 5f4a19c..3de0850 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentCrashWithWatchpointBreakpointSignal.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """ Test a thread that crashes while other threads generate a signal and hit a watchpoint and breakpoint. """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py
index 3c5249a..af9c6c9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalBreak.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     def test(self):
         """Test (1-second delay) signal and a breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py
index 84565bf..91358f3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelaySignalWatch.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test a watchpoint and a (1 second delay) signal in multiple threads."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py
index cd67116..8f7a8ba 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayWatchBreak.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test (1-second delay) watchpoint and a breakpoint in multiple threads."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py
index 7461cd6..9c1ac90 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointSignal.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     def test(self):
         """ Test a thread with a delayed crash while other threads generate a signal and hit a breakpoint. """
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py
index 504e757..12344ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentDelayedCrashWithBreakpointWatchpoint.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """ Test a thread with a delayed crash while other threads hit a watchpoint and a breakpoint. """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py
index a9f3fbb..bbbfbdb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyBreakpoints.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -12,11 +11,9 @@
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @unittest2.skipIf(
-        TestBase.skipLongRunningTest(),
-        "Skip this long running test")
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @skipIfOutOfTreeDebugserver
     def test(self):
         """Test 100 breakpoints from 100 threads."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py
index 88ab1d5..0530728 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyCrash.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -12,11 +11,9 @@
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @unittest2.skipIf(
-        TestBase.skipLongRunningTest(),
-        "Skip this long running test")
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    @skipIfOutOfTreeDebugserver
     def test(self):
         """Test 100 threads that cause a segfault."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py
index 232b694..ec06227 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManySignals.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -12,11 +11,12 @@
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @unittest2.skipIf(
-        TestBase.skipLongRunningTest(),
-        "Skip this long running test")
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
+    # This test is flaky on Darwin.
+    @skipIfDarwin
+    @expectedFailureNetBSD
+    @skipIfOutOfTreeDebugserver
     def test(self):
         """Test 100 signals from 100 threads."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py
index 96b610f..2274fbb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentManyWatchpoints.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -12,12 +11,10 @@
 
     mydir = ConcurrentEventsBase.compute_mydir(__file__)
 
-    @unittest2.skipIf(
-        TestBase.skipLongRunningTest(),
-        "Skip this long running test")
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
     @add_test_categories(["watchpoint"])
+    @skipIfOutOfTreeDebugserver
     def test(self):
         """Test 100 watchpoints from 100 threads."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py
index 84a4ac6..2c5205f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentNWatchNBreak.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test with 5 watchpoint and breakpoint threads."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py
index 9af3918..6c18cb2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalBreak.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     def test(self):
         """Test signal and a breakpoint in multiple threads."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py
index c6c3ad1..e1779b4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayBreak.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py
index 9a440c7..d932d5f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalDelayWatch.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py
index 70b34eb..3b005e5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalNWatchNBreak.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py
index 508084c..6cf26ae 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test a watchpoint and a signal in multiple threads."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py
index 44e4937..38a5125 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentSignalWatchBreak.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py
index 10316a3..5ddc15b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointThreads.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     def test(self):
         """Test two threads that trigger a breakpoint. """
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py
index 4e8dc80..07f99b0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneDelaySignal.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py
index 8a2151d..1ad1c59 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneSignal.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py
index 762b23c..47e973a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoBreakpointsOneWatchpoint.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a breakpoint and one watchpoint thread. """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py
index 62eac55..bdc6f8e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointThreads.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint. """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py
index 31d6e42..163f76d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneBreakpoint.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint and one breakpoint thread. """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py
index 1658447..1ec5e06 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneDelayBreakpoint.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint and one (1 second delay) breakpoint thread. """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py
index 51260c7..8f044ba 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentTwoWatchpointsOneSignal.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureAll(bugnumber="llvm.org/pr35228", archs=["arm", "aarch64"])
     @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py
index cf86df9..4a41808 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreak.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test watchpoint and a breakpoint in multiple threads."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py
index 1cef593..2bc0839 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchBreakDelay.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test watchpoint and a (1 second delay) breakpoint in multiple threads."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py
index adbd2b0..dce84fe 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint (one with a 1 second delay) and one breakpoint thread. """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py
index 3579822..87b8ea0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/concurrent_events/TestConcurrentWatchpointWithDelayWatchpointThreads.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import unittest2
 
@@ -15,7 +14,6 @@
     @skipIfFreeBSD  # timing out on buildbot
     # Atomic sequences are not supported yet for MIPS in LLDB.
     @skipIf(triple='^mips')
-    @expectedFailureNetBSD
     @add_test_categories(["watchpoint"])
     def test(self):
         """Test two threads that trigger a watchpoint where one thread has a 1 second delay. """
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/Makefile
index 26db481..3d0b98f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/Makefile
@@ -1,4 +1,2 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
index fa96db0..3394bb2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/crash_during_step/TestCrashDuringStep.py
@@ -2,10 +2,8 @@
 Test that step-inst over a crash behaves correctly.
 """
 
-from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/Makefile
index 67aa166..566938c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
index 31c26e5..59fb3b6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_after_attach/TestCreateAfterAttach.py
@@ -2,11 +2,8 @@
 Test thread creation after process attach.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/Makefile
index 67aa166..566938c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
index 8a23182..fa8c943 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/create_during_step/TestCreateDuringStep.py
@@ -2,11 +2,8 @@
 Test number of threads.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/Makefile
index 67aa166..566938c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
index 115a994..130abfe 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_break/TestExitDuringBreak.py
@@ -2,11 +2,8 @@
 Test number of threads.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -23,7 +20,6 @@
         # Find the line number for our breakpoint.
         self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
 
-    @expectedFailureNetBSD
     def test(self):
         """Test thread exit during breakpoint handling."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/Makefile
index d06a7d4..ebecfbf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
index 91682f6..d35bd45 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/exit_during_step/TestExitDuringStep.py
@@ -2,11 +2,8 @@
 Test number of threads.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -19,7 +16,6 @@
 
     @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
     @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    @expectedFailureNetBSD
     def test(self):
         """Test thread exit during step handling."""
         self.build(dictionary=self.getBuildFlags())
@@ -30,7 +26,6 @@
 
     @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
     @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    @expectedFailureNetBSD
     def test_step_over(self):
         """Test thread exit during step-over handling."""
         self.build(dictionary=self.getBuildFlags())
@@ -41,7 +36,6 @@
 
     @skipIfFreeBSD  # llvm.org/pr21411: test is hanging
     @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    @expectedFailureNetBSD
     def test_step_in(self):
         """Test thread exit during step-in handling."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/Makefile
index b726fc3..6e962b9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp other.cpp
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
index 7194daf..2035435 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/jump/TestThreadJump.py
@@ -2,11 +2,8 @@
 Test jumping to different places.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/Makefile
index 67aa166..566938c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
index 4a1759e..20645fb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py
@@ -2,11 +2,8 @@
 Test number of threads.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile
index 67aa166..566938c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py
index 88f2293..cfd2941 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/num_threads/TestNumThreads.py
@@ -2,11 +2,8 @@
 Test number of threads.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -25,7 +22,6 @@
         self.thread3_notify_all_line = line_number('main.cpp', '// Set thread3 break point on notify_all at this line.')
         self.thread3_before_lock_line = line_number('main.cpp', '// thread3-before-lock')
 
-    @expectedFailureNetBSD
     def test_number_of_threads(self):
         """Test number of threads."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/Makefile
index 26db481..3d0b98f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/Makefile
@@ -1,4 +1,2 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
index 5d38487..6093808 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/state/TestThreadStates.py
@@ -2,12 +2,9 @@
 Test thread states.
 """
 
-from __future__ import print_function
 
 
 import unittest2
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -194,7 +191,6 @@
         oslist=["windows"],
         bugnumber="llvm.org/pr24668: Breakpoints not resolved correctly")
     @skipIfDarwin # llvm.org/pr15824 thread states not properly maintained and <rdar://problem/28557237>
-    @expectedFailureNetBSD
     @no_debug_info_test
     def test_process_interrupt(self):
         """Test process interrupt and continue."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/Makefile
index 035413f..c46619c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py
index 410c751..2d9632e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/TestThreadStepOut.py
@@ -2,11 +2,8 @@
 Test stepping out from a function in a multi-threaded program.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -70,10 +67,12 @@
         # Call super's setUp().
         TestBase.setUp(self)
         # Find the line number for our breakpoint.
-        self.breakpoint = line_number('main.cpp', '// Set breakpoint here')
-        if "gcc" in self.getCompiler() or self.isIntelCompiler():
+        self.bkpt_string = '// Set breakpoint here'
+        self.breakpoint = line_number('main.cpp', self.bkpt_string)       
+
+        if "gcc" in self.getCompiler() or self.isIntelCompiler() or self.getArchitecture() in ['arm64', 'arm64e']:
             self.step_out_destination = line_number(
-                'main.cpp', '// Expect to stop here after step-out (icc and gcc)')
+                'main.cpp', '// Expect to stop here after step-out (icc and gcc; arm64)')
         else:
             self.step_out_destination = line_number(
                 'main.cpp', '// Expect to stop here after step-out (clang)')
@@ -131,56 +130,27 @@
 
     def step_out_test(self, step_out_func):
         """Test single thread step out of a function."""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        (self.inferior_target, self.inferior_process, thread, bkpt) = lldbutil.run_to_source_breakpoint(
+            self, self.bkpt_string, lldb.SBFileSpec('main.cpp'), only_one_thread = False)
 
-        # This should create a breakpoint in the main thread.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.breakpoint, num_expected_locations=1)
-
-        # The breakpoint list should show 1 location.
-        self.expect(
-            "breakpoint list -f",
-            "Breakpoint location shown correctly",
-            substrs=[
-                "1: file = 'main.cpp', line = %d, exact_match = 0, locations = 1" %
-                self.breakpoint])
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Get the target process
-        self.inferior_target = self.dbg.GetSelectedTarget()
-        self.inferior_process = self.inferior_target.GetProcess()
-
-        # Get the number of threads, ensure we see all three.
-        num_threads = self.inferior_process.GetNumThreads()
-        self.assertEqual(
-            num_threads,
-            3,
-            'Number of expected threads and actual threads do not match.')
+        # We hit the breakpoint on at least one thread.  If we hit it on both threads
+        # simultaneously, we can try the step out.  Otherwise, suspend the thread
+        # that hit the breakpoint, and continue till the second thread hits
+        # the breakpoint:
 
         (breakpoint_threads, other_threads) = ([], [])
         lldbutil.sort_stopped_threads(self.inferior_process,
                                       breakpoint_threads=breakpoint_threads,
                                       other_threads=other_threads)
-
-        while len(breakpoint_threads) < 2:
-            self.runCmd("thread continue %s" %
-                        " ".join([str(x.GetIndexID()) for x in other_threads]))
-            lldbutil.sort_stopped_threads(
-                self.inferior_process,
-                breakpoint_threads=breakpoint_threads,
-                other_threads=other_threads)
+        if len(breakpoint_threads) == 1:
+            success = thread.Suspend()
+            self.assertTrue(success, "Couldn't suspend a thread")
+            bkpt_threads = lldbutil.continue_to_breakpoint(bkpt)
+            self.assertEqual(len(bkpt_threads), 1, "Second thread stopped")
+            success = thread.Resume()
+            self.assertTrue(success, "Couldn't resume a thread")
 
         self.step_out_thread = breakpoint_threads[0]
 
         # Step out of thread stopped at breakpoint
         step_out_func()
-
-        # Run to completion
-        self.runCmd("continue")
-
-        # At this point, the inferior process should have exited.
-        self.assertTrue(self.inferior_process.GetState() ==
-                        lldb.eStateExited, PROCESS_EXITED)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/main.cpp
index 96cea18..e7754d0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_out/main.cpp
@@ -30,7 +30,7 @@
     step_out_of_here(); // Expect to stop here after step-out (clang)
 
     // Return
-    return NULL;  // Expect to stop here after step-out (icc and gcc)
+    return NULL;  // Expect to stop here after step-out (icc and gcc; arm64)
 }
 
 int main ()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py
index b0e7add..dd48eba 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/step_until/TestStepUntil.py
@@ -1,10 +1,7 @@
 """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/Makefile
index d06a7d4..ebecfbf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py
index 6f0beeb..6bd55e1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_exit/TestThreadExit.py
@@ -2,11 +2,8 @@
 Test number of threads.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -27,7 +24,6 @@
         self.break_4 = line_number('main.cpp', '// Set fourth breakpoint here')
 
     @skipIfWindows # This is flakey on Windows: llvm.org/pr38373
-    @expectedFailureNetBSD
     def test(self):
         """Test thread exit handling."""
         self.build(dictionary=self.getBuildFlags())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/Makefile
index 035413f..c46619c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
index 487beb8..e5505e1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/TestThreadSpecificBreakpoint.py
@@ -2,12 +2,8 @@
 Test that we obey thread conditioned breakpoints.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -27,15 +23,12 @@
 
     @add_test_categories(['pyapi'])
 
-    @expectedFailureAll(oslist=["windows"])
     @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563920') # armv7 ios problem - breakpoint with tid qualifier isn't working
-    @expectedFailureNetBSD
     def test_thread_id(self):
         self.do_test(set_thread_id)
 
     @skipUnlessDarwin
     @expectedFailureAll(oslist=['ios', 'watchos', 'tvos', 'bridgeos'], archs=['armv7', 'armv7k'], bugnumber='rdar://problem/34563920') # armv7 ios problem - breakpoint with tid qualifier isn't working
-    @expectedFailureNetBSD
     def test_thread_name(self):
         self.do_test(set_thread_name)
 
@@ -46,13 +39,6 @@
         (target, process, main_thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self,
                 "Set main breakpoint here", main_source_spec)
 
-        main_thread_id = main_thread.GetThreadID()
-
-        # This test works by setting a breakpoint in a function conditioned to stop only on
-        # the main thread, and then calling this function on a secondary thread, joining,
-        # and then calling again on the main thread.  If the thread specific breakpoint works
-        # then it should not be hit on the secondary thread, only on the main
-        # thread.
         thread_breakpoint = target.BreakpointCreateBySourceRegex(
             "Set thread-specific breakpoint here", main_source_spec)
         self.assertGreater(
@@ -60,11 +46,11 @@
             0,
             "thread breakpoint has no locations associated with it.")
 
-        # Set the thread-specific breakpoint to only stop on the main thread.  The run the function
-        # on another thread and join on it.  If the thread-specific breakpoint works, the next
-        # stop should be on the main thread.
-
-        main_thread_id = main_thread.GetThreadID()
+        # Set the thread-specific breakpoint to stop only on the main thread
+        # before the secondary thread has a chance to execute it.  The main
+        # thread joins the secondary thread, and then the main thread will
+        # execute the code at the breakpoint.  If the thread-specific
+        # breakpoint works, the next stop will be on the main thread.
         setter_method(main_thread, thread_breakpoint)
 
         process.Continue()
@@ -81,5 +67,5 @@
             "thread breakpoint stopped at unexpected number of threads")
         self.assertEqual(
             stopped_threads[0].GetThreadID(),
-            main_thread_id,
+            main_thread.GetThreadID(),
             "thread breakpoint stopped at the wrong thread")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/main.cpp
index 0509b3d..03e93bd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break/main.cpp
@@ -5,7 +5,14 @@
 thread_function ()
 {
     // Set thread-specific breakpoint here.
-    std::this_thread::sleep_for(std::chrono::microseconds(100));
+    std::this_thread::sleep_for(std::chrono::milliseconds(20));
+    // On Windows, a sleep_for of less than about 16 ms effectively calls
+    // Sleep(0).  The MS standard thread implementation uses a system thread
+    // pool, which can deadlock on a Sleep(0), hanging not only the secondary
+    // thread but the entire test.  I increased the delay to 20 ms to ensure
+    // Sleep is called with a delay greater than 0.  The deadlock potential
+    // is described here:
+    // https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-sleep#remarks
 }
 
 int 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/Makefile
index 035413f..c46619c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
index 0d08af8..126ad9e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
@@ -3,12 +3,8 @@
 conditioned breakpoints simultaneously
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/Makefile
index c930ae5..07133cf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 CFLAGS_EXTRAS := -fsanitize=thread -g
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
index 5327628..1b71de5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/basic/TestTsanBasic.py
@@ -2,8 +2,6 @@
 Tests basic ThreadSanitizer support (detecting a data race).
 """
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/Makefile
index a581947..5f67197 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 CFLAGS_EXTRAS := -fsanitize=thread -g
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
index ae79476..407126d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/cpp_global_location/TestTsanCPPGlobalLocation.py
@@ -2,8 +2,6 @@
 Tests that TSan correctly reports the filename and line number of a racy global C++ variable.
 """
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
@@ -26,10 +24,6 @@
         self.build()
         self.tsan_tests()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def tsan_tests(self):
         exe = self.getBuildArtifact("a.out")
         self.expect(
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile
index c930ae5..07133cf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 CFLAGS_EXTRAS := -fsanitize=thread -g
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
index f107891..7bfd90b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/global_location/TestTsanGlobalLocation.py
@@ -2,8 +2,6 @@
 Tests that TSan correctly reports the filename and line number of a racy global variable.
 """
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
@@ -26,10 +24,6 @@
         self.build()
         self.tsan_tests()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def tsan_tests(self):
         exe = self.getBuildArtifact("a.out")
         self.expect(
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/Makefile
index c930ae5..07133cf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 CFLAGS_EXTRAS := -fsanitize=thread -g
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
index 24d187b..b40f950 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/multiple/TestTsanMultiple.py
@@ -2,8 +2,6 @@
 Test ThreadSanitizer when multiple different issues are found.
 """
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
@@ -26,10 +24,6 @@
         self.build()
         self.tsan_tests()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def tsan_tests(self):
         exe = self.getBuildArtifact("a.out")
         self.expect(
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/Makefile
index c930ae5..07133cf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 CFLAGS_EXTRAS := -fsanitize=thread -g
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
index e89b2a7..09704e4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_leak/TestTsanThreadLeak.py
@@ -2,13 +2,10 @@
 Tests ThreadSanitizer's support to detect a leaked thread.
 """
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
-import json
 
 
 class TsanThreadLeakTestCase(TestBase):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/Makefile
index c930ae5..07133cf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 CFLAGS_EXTRAS := -fsanitize=thread -g
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
index 03092ab..61870ea 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tsan/thread_numbers/TestTsanThreadNumbers.py
@@ -2,8 +2,6 @@
 Tests that TSan and LLDB have correct thread numbers.
 """
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
@@ -26,10 +24,6 @@
         self.build()
         self.tsan_tests()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def tsan_tests(self):
         exe = self.getBuildArtifact("a.out")
         self.expect(
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tty/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py
index c4d31df..bf5f120 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/tty/TestTerminal.py
@@ -7,7 +7,6 @@
 
 import unittest2
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py
index 2c7fb01..fb0b109 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_completion/TestTypeCompletion.py
@@ -2,11 +2,8 @@
 Check that types only get completed when necessary.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile
index 7fb4d7a..8763401 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../make
-
 OBJCXX_SOURCES := main.mm
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py
index 272634f..2257fd6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py
@@ -2,12 +2,8 @@
 Test type lookup command.
 """
 
-from __future__ import print_function
 
 
-import datetime
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile
index 6e7d19b..b27db90 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 CFLAGS_EXTRAS := -fsanitize=undefined -g
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py
index 5dfa08e7..76fdb33 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/basic/TestUbsanBasic.py
@@ -3,7 +3,6 @@
 """
 
 import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/Makefile
index 6e7d19b..b27db90 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 CFLAGS_EXTRAS := -fsanitize=undefined -g
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
index d0502cc..68f8c03 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/ubsan/user-expression/TestUbsanUserExpression.py
@@ -2,13 +2,10 @@
 Test that hitting a UBSan issue while running user expression doesn't break the evaluation.
 """
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
-import json
 
 
 class UbsanUserExpressionTestCase(TestBase):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/Makefile
index 289d256..493ea3f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
 CFLAGS ?= -g -fomit-frame-pointer
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py
index 9c87d17..905543f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/ehframe/TestEhFrameUnwind.py
@@ -2,11 +2,8 @@
 Test that we can backtrace correctly from Non ABI functions on the stack
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/Makefile
index ede25f0..36cf5a2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
 CFLAGS ?= -g -Os
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
index 9f69f60..1086a34 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/TestNoreturnUnwind.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py
index 3aa6a23..cce485b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/noreturn/module-end/TestNoReturnModuleEnd.py
@@ -3,10 +3,7 @@
 be at the end of the stack.
 """
 
-from __future__ import print_function
 
-import shutil
-import struct
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
index f971942..bf19cac 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/sigtramp/TestSigtrampUnwind.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/Makefile
index 146da30..22f1051 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/Makefile
@@ -1,3 +1 @@
-LEVEL = ../../../make
-
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py
index 4bacb0b..032b9e1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/unwind/standard/TestStandardUnwind.py
@@ -15,7 +15,6 @@
 
 import unittest2
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -145,10 +144,8 @@
 # Generate test cases based on the collected source files
 for f in test_source_files:
     if f.endswith(".cpp") or f.endswith(".c"):
+        @skipIfWindows
         @add_test_categories(["dwarf"])
-        @unittest2.skipIf(
-            TestBase.skipLongRunningTest(),
-            "Skip this long running test")
         def test_function_dwarf(self, f=f):
             if f.endswith(".cpp"):
                 d = {'CXX_SOURCES': f}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py
index 1a8fbdf..04f25c5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/value_md5_crash/TestValueMD5Crash.py
@@ -2,11 +2,8 @@
 Verify that the hash computing logic for ValueObject's values can't crash us.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/var_path/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/var_path/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/var_path/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/var_path/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/var_path/TestVarPath.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/var_path/TestVarPath.py
index d50c318..faab8a7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/var_path/TestVarPath.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/var_path/TestVarPath.py
@@ -2,12 +2,8 @@
 Make sure the getting a variable path works and doesn't crash.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
@@ -26,10 +22,6 @@
         self.build()
         self.do_test()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def verify_point(self, frame, var_name, var_typename, x_value, y_value):
         v = frame.GetValueForVariablePath(var_name)
         self.assertTrue(v.GetError().Success(), "Make sure we find '%s'" % (var_name))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/Makefile
deleted file mode 100644
index 8817fff..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
deleted file mode 100644
index 740a75f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchlocation/TestWatchLocation.py
+++ /dev/null
@@ -1,115 +0,0 @@
-"""
-Test lldb watchpoint that uses '-s size' to watch a pointed location with size.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HelloWatchLocationTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # This is for verifying that watch location works.
-        self.violating_func = "do_bad_thing_with_location"
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = self.testMethodName
-        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Most of the MIPS boards provide only one H/W watchpoints, and S/W
-    # watchpoints are not supported yet
-    @expectedFailureAll(triple=re.compile('^mips'))
-    # SystemZ and PowerPC also currently supports only one H/W watchpoint
-    @expectedFailureAll(archs=['powerpc64le', 's390x'])
-    @expectedFailureNetBSD
-    @skipIfDarwin
-    def test_hello_watchlocation(self):
-        """Test watching a location with '-s size' option."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1, loc_exact=False)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint pointed to by 'g_char_ptr'.
-        self.expect(
-            "watchpoint set expression -w write -s 1 -- g_char_ptr",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 1',
-                'type = w'])
-        # Get a hold of the watchpoint id just created, it is used later on to
-        # match the watchpoint id which is expected to be fired.
-        match = re.match(
-            "Watchpoint created: Watchpoint (.*):",
-            self.res.GetOutput().splitlines()[0])
-        if match:
-            expected_wp_id = int(match.group(1), 0)
-        else:
-            self.fail("Grokking watchpoint id faailed!")
-
-        self.runCmd("expr unsigned val = *g_char_ptr; val")
-        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-                    endstr=' = 0')
-
-        self.runCmd("watchpoint set expression -w write -s 4 -- &threads[0]")
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type), but
-        # only once.  The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped',
-                             'stop reason = watchpoint %d' % expected_wp_id])
-
-        # Switch to the thread stopped due to watchpoint and issue some
-        # commands.
-        self.switch_to_thread_with_stop_reason(lldb.eStopReasonWatchpoint)
-        self.runCmd("thread backtrace")
-        self.expect("frame info",
-                    substrs=[self.violating_func])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
-
-        self.runCmd("thread backtrace all")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
deleted file mode 100644
index 8e19f9b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/hello_watchpoint/TestMyFirstWatchpoint.py
+++ /dev/null
@@ -1,97 +0,0 @@
-"""
-Test my first lldb watchpoint.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HelloWatchpointTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        self.exe_name = self.getBuildArtifact('a.out')
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @add_test_categories(["basic_process"])
-    def test_hello_watchpoint_using_watchpoint_set(self):
-        """Test a simple sequence of watchpoint creation and watchpoint hit."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        # There should be only one watchpoint hit (see main.c).
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type), but
-        # only once.  The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped',
-                             'stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-
-        # Don't expect the read of 'global' to trigger a stop exception.
-        process = self.dbg.GetSelectedTarget().GetProcess()
-        if process.GetState() == lldb.eStateStopped:
-            self.assertFalse(
-                lldbutil.get_stopped_thread(
-                    process, lldb.eStopReasonWatchpoint))
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py
deleted file mode 100644
index 22dc19e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multi_watchpoint_slots/TestWatchpointMultipleSlots.py
+++ /dev/null
@@ -1,103 +0,0 @@
-"""
-Test watchpoint slots we should not be able to install multiple watchpoints
-within same word boundary. We should be able to install individual watchpoints
-on any of the bytes, half-word, or word. This is only for ARM/AArch64 targets.
-"""
-
-from __future__ import print_function
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointSlotsTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    # This is a arm and aarch64 specific test case. No other architectures tested.
-    @skipIf(archs=no_match(['arm', 'aarch64']))
-    def test_multiple_watchpoints_on_same_word(self):
-
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Detect line number after which we are going to increment arrayName.
-        loc_line = line_number('main.c', '// About to write byteArray')
-
-        # Set a breakpoint on the line detected above.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", loc_line, num_expected_locations=1, loc_exact=True)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                     substrs=['stopped', 'stop reason = breakpoint'])
-
-        # Delete breakpoint we just hit.
-        self.expect("breakpoint delete 1", substrs=['1 breakpoints deleted'])
-
-        # Set a watchpoint at byteArray[0]
-        self.expect("watchpoint set variable byteArray[0]", WATCHPOINT_CREATED,
-                    substrs=['Watchpoint created','size = 1'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v 1", substrs=['hit_count = 0'])
-
-        # debugserver on ios doesn't give an error, it creates another watchpoint,
-        # only expect errors on non-darwin platforms.
-        if not self.platformIsDarwin():
-            # Try setting a watchpoint at byteArray[1]
-            self.expect("watchpoint set variable byteArray[1]", error=True,
-                        substrs=['Watchpoint creation failed'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped due to the watchpoint.
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped', 'stop reason = watchpoint 1'])
-
-        # Delete the watchpoint we hit above successfully.
-        self.expect("watchpoint delete 1", substrs=['1 watchpoints deleted'])
-
-        # Set a watchpoint at byteArray[3]
-        self.expect("watchpoint set variable byteArray[3]", WATCHPOINT_CREATED,
-                    substrs=['Watchpoint created','size = 1'])
-
-        # Resume inferior.
-        self.runCmd("process continue")
-
-        # We should be stopped due to the watchpoint.
-        # The stop reason of the thread should be watchpoint.
-        if self.platformIsDarwin():
-            # On darwin we'll hit byteArray[3] which is watchpoint 2
-            self.expect("thread list -v", STOPPED_DUE_TO_WATCHPOINT,
-                        substrs=['stopped', 'stop reason = watchpoint 2'])
-        else:
-            self.expect("thread list -v", STOPPED_DUE_TO_WATCHPOINT,
-                        substrs=['stopped', 'stop reason = watchpoint 3'])
-
-        # Resume inferior.
-        self.runCmd("process continue")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py
deleted file mode 100644
index a6d7792..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_hits/TestMultipleHits.py
+++ /dev/null
@@ -1,59 +0,0 @@
-"""
-Test handling of cases when a single instruction triggers multiple watchpoints
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MultipleHitsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @skipIf(bugnumber="llvm.org/pr30758", oslist=["linux"], archs=["arm", "aarch64", "powerpc64le"])
-    @skipIfwatchOS
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target and target.IsValid(), VALID_TARGET)
-
-        bp = target.BreakpointCreateByName("main")
-        self.assertTrue(bp and bp.IsValid(), "Breakpoint is valid")
-
-        process = target.LaunchSimple(None, None,
-                self.get_process_working_directory())
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-
-        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertIsNotNone(thread)
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame and frame.IsValid(), "Frame is valid")
-
-        buf = frame.FindValue("buf", lldb.eValueTypeVariableGlobal)
-        self.assertTrue(buf and buf.IsValid(), "buf is valid")
-
-        for i in [0, target.GetAddressByteSize()]:
-            member = buf.GetChildAtIndex(i)
-            self.assertTrue(member and member.IsValid(), "member is valid")
-
-            error = lldb.SBError()
-            watch = member.Watch(True, True, True, error)
-            self.assertTrue(error.Success())
-
-        process.Continue();
-        self.assertEqual(process.GetState(), lldb.eStateStopped)
-        self.assertEqual(thread.GetStopReason(), lldb.eStopReasonWatchpoint)
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/Makefile
deleted file mode 100644
index 8817fff..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
deleted file mode 100644
index 667ed56e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/multiple_threads/TestWatchpointMultipleThreads.py
+++ /dev/null
@@ -1,121 +0,0 @@
-"""
-Test that lldb watchpoint works for multiple threads.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointForMultipleThreadsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-    main_spec = lldb.SBFileSpec("main.cpp", False)
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureNetBSD
-    def test_watchpoint_before_thread_start(self):
-        """Test that we can hit a watchpoint we set before starting another thread"""
-        self.do_watchpoint_test("Before running the thread")
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureNetBSD
-    def test_watchpoint_after_thread_start(self):
-        """Test that we can hit a watchpoint we set after starting another thread"""
-        self.do_watchpoint_test("After running the thread")
-
-    def do_watchpoint_test(self, line):
-        self.build()
-        lldbutil.run_to_source_breakpoint(self, line, self.main_spec)
-
-        # Now let's set a write-type watchpoint for variable 'g_val'.
-        self.expect(
-            "watchpoint set variable -w write g_val",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        self.runCmd("thread list")
-        if "stop reason = watchpoint" in self.res.GetOutput():
-            # Good, we verified that the watchpoint works!
-            self.runCmd("thread backtrace all")
-        else:
-            self.fail("The stop reason should be either break or watchpoint")
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    def test_watchpoint_multiple_threads_wp_set_and_then_delete(self):
-        """Test that lldb watchpoint works for multiple threads, and after the watchpoint is deleted, the watchpoint event should no longer fires."""
-        self.build()
-        self.setTearDownCleanup()
-
-        lldbutil.run_to_source_breakpoint(self, "After running the thread", self.main_spec)
-
-        # Now let's set a write-type watchpoint for variable 'g_val'.
-        self.expect(
-            "watchpoint set variable -w write g_val",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        watchpoint_stops = 0
-        while True:
-            self.runCmd("process continue")
-            self.runCmd("process status")
-            if re.search("Process .* exited", self.res.GetOutput()):
-                # Great, we are done with this test!
-                break
-
-            self.runCmd("thread list")
-            if "stop reason = watchpoint" in self.res.GetOutput():
-                self.runCmd("thread backtrace all")
-                watchpoint_stops += 1
-                if watchpoint_stops > 1:
-                    self.fail(
-                        "Watchpoint hits not supposed to exceed 1 by design!")
-                # Good, we verified that the watchpoint works!  Now delete the
-                # watchpoint.
-                if self.TraceOn():
-                    print(
-                        "watchpoint_stops=%d at the moment we delete the watchpoint" %
-                        watchpoint_stops)
-                self.runCmd("watchpoint delete 1")
-                self.expect("watchpoint list -v",
-                            substrs=['No watchpoints currently set.'])
-                continue
-            else:
-                self.fail("The stop reason should be either break or watchpoint")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
deleted file mode 100644
index e0c77b4..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/step_over_watchpoint/TestStepOverWatchpoint.py
+++ /dev/null
@@ -1,122 +0,0 @@
-"""Test stepping over watchpoints."""
-
-from __future__ import print_function
-
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestStepOverWatchpoint(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=[
-            'aarch64',
-            'arm'],
-        bugnumber="llvm.org/pr26031")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    @expectedFailureAll(oslist=["ios", "watchos", "tvos", "bridgeos"], bugnumber="<rdar://problem/34027183>")  # watchpoint tests aren't working on arm64
-    @add_test_categories(["basic_process"])
-    def test(self):
-        """Test stepping over watchpoints."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        lldbutil.run_break_set_by_symbol(self, 'main')
-
-        process = target.LaunchSimple(None, None,
-                                      self.get_process_working_directory())
-        self.assertTrue(process.IsValid(), PROCESS_IS_VALID)
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-
-        thread = lldbutil.get_stopped_thread(process,
-                                             lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread.IsValid(), "Failed to get thread.")
-
-        frame = thread.GetFrameAtIndex(0)
-        self.assertTrue(frame.IsValid(), "Failed to get frame.")
-
-        read_value = frame.FindValue('g_watch_me_read',
-                                     lldb.eValueTypeVariableGlobal)
-        self.assertTrue(read_value.IsValid(), "Failed to find read value.")
-
-        error = lldb.SBError()
-
-        # resolve_location=True, read=True, write=False
-        read_watchpoint = read_value.Watch(True, True, False, error)
-        self.assertTrue(error.Success(),
-                        "Error while setting watchpoint: %s" %
-                        error.GetCString())
-        self.assertTrue(read_watchpoint, "Failed to set read watchpoint.")
-
-        thread.StepOver()
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint,
-                        STOPPED_DUE_TO_WATCHPOINT)
-        self.assertTrue(thread.GetStopDescription(20) == 'watchpoint 1')
-
-        process.Continue()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        self.assertTrue(thread.GetStopDescription(20) == 'step over')
-
-        self.step_inst_for_watchpoint(1)
-
-        write_value = frame.FindValue('g_watch_me_write',
-                                      lldb.eValueTypeVariableGlobal)
-        self.assertTrue(write_value, "Failed to find write value.")
-
-        # Most of the MIPS boards provide only one H/W watchpoints, and S/W
-        # watchpoints are not supported yet
-        arch = self.getArchitecture()
-        if re.match("^mips", arch) or re.match("powerpc64le", arch):
-            self.runCmd("watchpoint delete 1")
-
-        # resolve_location=True, read=False, write=True
-        write_watchpoint = write_value.Watch(True, False, True, error)
-        self.assertTrue(write_watchpoint, "Failed to set write watchpoint.")
-        self.assertTrue(error.Success(),
-                        "Error while setting watchpoint: %s" %
-                        error.GetCString())
-
-        thread.StepOver()
-        self.assertTrue(thread.GetStopReason() == lldb.eStopReasonWatchpoint,
-                        STOPPED_DUE_TO_WATCHPOINT)
-        self.assertTrue(thread.GetStopDescription(20) == 'watchpoint 2')
-
-        process.Continue()
-        self.assertTrue(process.GetState() == lldb.eStateStopped,
-                        PROCESS_STOPPED)
-        self.assertTrue(thread.GetStopDescription(20) == 'step over')
-
-        self.step_inst_for_watchpoint(2)
-
-    def step_inst_for_watchpoint(self, wp_id):
-        watchpoint_hit = False
-        current_line = self.frame().GetLineEntry().GetLine()
-        while self.frame().GetLineEntry().GetLine() == current_line:
-            self.thread().StepInstruction(False)  # step_over=False
-            stop_reason = self.thread().GetStopReason()
-            if stop_reason == lldb.eStopReasonWatchpoint:
-                self.assertFalse(watchpoint_hit, "Watchpoint already hit.")
-                expected_stop_desc = "watchpoint %d" % wp_id
-                actual_stop_desc = self.thread().GetStopDescription(20)
-                self.assertTrue(actual_stop_desc == expected_stop_desc,
-                                "Watchpoint ID didn't match.")
-                watchpoint_hit = True
-            else:
-                self.assertTrue(stop_reason == lldb.eStopReasonPlanComplete,
-                                STOPPED_DUE_TO_STEP_IN)
-        self.assertTrue(watchpoint_hit, "Watchpoint never hit.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
deleted file mode 100644
index b2f2673..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/variable_out_of_scope/TestWatchedVarHitWhenInScope.py
+++ /dev/null
@@ -1,86 +0,0 @@
-"""
-Test that a variable watchpoint should only hit when in scope.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-import os
-import time
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-from lldbsuite.test.decorators import *
-
-
-class WatchedVariableHitWhenInScopeTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # This test depends on not tracking watchpoint expression hits if we have
-    # left the watchpoint scope.  We will provide such an ability at some point
-    # but the way this was done was incorrect, and it is unclear that for the
-    # most part that's not what folks mostly want, so we have to provide a
-    # clearer API to express this.
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        self.exe_name = self.testMethodName
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    # Test hangs due to a kernel bug, see fdfeff0f in the linux kernel for details
-    @skipIfTargetAndroid(api_levels=list(range(25+1)), archs=["aarch64", "arm"])
-    @skipIf
-    def test_watched_var_should_only_hit_when_in_scope(self):
-        """Test that a variable watchpoint should only hit when in scope."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped in main.
-        lldbutil.run_break_set_by_symbol(
-            self, "main", num_expected_locations=-1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a watchpoint for 'c.a'.
-        # There should be only one watchpoint hit (see main.c).
-        self.expect("watchpoint set variable c.a", WATCHPOINT_CREATED,
-                    substrs=['Watchpoint created', 'size = 4', 'type = w'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type), but
-        # only once.  The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped',
-                             'stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-        # Don't expect the read of 'global' to trigger a stop exception.
-        # The process status should be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
deleted file mode 100644
index 5bb6839..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/TestWatchpointCommands.py
+++ /dev/null
@@ -1,377 +0,0 @@
-"""
-Test watchpoint list, enable, disable, and delete commands.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointCommandsTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        self.line2 = line_number(
-            self.source,
-            '// Set 2nd break point for disable_then_enable test case.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = self.testMethodName
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_watchpoint(self):
-        """Test read_write watchpoint and expect to stop two times."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['Number of supported hardware watchpoints:',
-                             'hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (read_write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (read_write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 2.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 2'])
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_watchpoint_delete(self):
-        """Test delete watchpoint and expect not to stop for watchpoint."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Delete the watchpoint immediately, but set auto-confirm to true
-        # first.
-        self.runCmd("settings set auto-confirm true")
-        self.expect("watchpoint delete",
-                    substrs=['All watchpoints removed.'])
-        # Restore the original setting of auto-confirm.
-        self.runCmd("settings clear auto-confirm")
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        self.runCmd("watchpoint list -v")
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_watchpoint_set_ignore_count(self):
-        """Test watchpoint ignore count and expect to not to stop at all."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Set the ignore count of the watchpoint immediately.
-        self.expect("watchpoint ignore -i 2",
-                    substrs=['All watchpoints ignored.'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # Expect to find an ignore_count of 2.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0', 'ignore_count = 2'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # Expect to find a hit_count of 2 as well.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 2', 'ignore_count = 2'])
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_disable_after_first_stop(self):
-        """Test read_write watchpoint but disable it after the first stop."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['state = enabled', 'hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (read_write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # Before continuing, we'll disable the watchpoint, which means we won't
-        # stop again after this.
-        self.runCmd("watchpoint disable")
-
-        self.expect("watchpoint list -v",
-                    substrs=['state = disabled', 'hit_count = 1'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_rw_disable_then_enable(self):
-        """Test read_write watchpoint, disable initially, then enable it."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line2, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a read_write-type watchpoint for 'global'.
-        # There should be two watchpoint hits (see main.c).
-        self.expect(
-            "watchpoint set variable -w read_write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = rw',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        # Immediately, we disable the watchpoint.  We won't be stopping due to a
-        # watchpoint after this.
-        self.runCmd("watchpoint disable")
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['state = disabled', 'hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the breakpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stop reason = breakpoint'])
-
-        # Before continuing, we'll enable the watchpoint, which means we will
-        # stop again after this.
-        self.runCmd("watchpoint enable")
-
-        self.expect("watchpoint list -v",
-                    substrs=['state = enabled', 'hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (read_write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 1.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 1'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/Makefile
deleted file mode 100644
index ee6b9cc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
deleted file mode 100644
index b4b6ebe..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandLLDB.py
+++ /dev/null
@@ -1,172 +0,0 @@
-"""
-Test 'watchpoint command'.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointLLDBCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = 'a%d.out' % self.test_number
-        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["aarch64"],
-        bugnumber="llvm.org/pr27710")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureNetBSD
-    def test_watchpoint_command(self):
-        """Test 'watchpoint command'."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        self.runCmd('watchpoint command add 1 -o "expr -- cookie = 777"')
-
-        # List the watchpoint command we just added.
-        self.expect("watchpoint command list 1",
-                    substrs=['expr -- cookie = 777'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # Check that the watchpoint snapshoting mechanism is working.
-        self.expect("watchpoint list -v",
-                    substrs=['old value:', ' = 0',
-                             'new value:', ' = 1'])
-
-        # The watchpoint command "forced" our global variable 'cookie' to
-        # become 777.
-        self.expect("frame variable --show-globals cookie",
-                    substrs=['(int32_t)', 'cookie = 777'])
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["aarch64"],
-        bugnumber="llvm.org/pr27710")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    def test_watchpoint_command_can_disable_a_watchpoint(self):
-        """Test that 'watchpoint command' action can disable a watchpoint after it is triggered."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        self.runCmd('watchpoint command add 1 -o "watchpoint disable 1"')
-
-        # List the watchpoint command we just added.
-        self.expect("watchpoint command list 1",
-                    substrs=['watchpoint disable 1'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # Check that the watchpoint has been disabled.
-        self.expect("watchpoint list -v",
-                    substrs=['disabled'])
-
-        self.runCmd("process continue")
-
-        # There should be no more watchpoint hit and the process status should
-        # be 'exited'.
-        self.expect("process status",
-                    substrs=['exited'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
deleted file mode 100644
index 431298a..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/command/TestWatchpointCommandPython.py
+++ /dev/null
@@ -1,171 +0,0 @@
-"""
-Test 'watchpoint command'.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointPythonCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = self.testMethodName
-        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    @skipIfFreeBSD  # timing out on buildbot
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["aarch64"],
-        bugnumber="llvm.org/pr27710")
-    @expectedFailureNetBSD
-    def test_watchpoint_command(self):
-        """Test 'watchpoint command'."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        self.runCmd(
-            'watchpoint command add -s python 1 -o \'frame.EvaluateExpression("cookie = 777")\'')
-
-        # List the watchpoint command we just added.
-        self.expect("watchpoint command list 1",
-                    substrs=['frame.EvaluateExpression', 'cookie = 777'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # Check that the watchpoint snapshoting mechanism is working.
-        self.expect("watchpoint list -v",
-                    substrs=['old value:', ' = 0',
-                             'new value:', ' = 1'])
-
-        # The watchpoint command "forced" our global variable 'cookie' to
-        # become 777.
-        self.expect("frame variable --show-globals cookie",
-                    substrs=['(int32_t)', 'cookie = 777'])
-
-    @skipIfFreeBSD  # timing out on buildbot
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["aarch64"],
-        bugnumber="llvm.org/pr27710")
-    @expectedFailureNetBSD
-    def test_continue_in_watchpoint_command(self):
-        """Test continue in a watchpoint command."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        cmd_script_file = os.path.join(self.getSourceDir(),
-                                       "watchpoint_command.py")
-        self.runCmd("command script import '%s'" % (cmd_script_file))
-
-        self.runCmd(
-            'watchpoint command add -F watchpoint_command.watchpoint_command')
-
-        # List the watchpoint command we just added.
-        self.expect("watchpoint command list 1",
-                    substrs=['watchpoint_command.watchpoint_command'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-
-        # We should have hit the watchpoint once, set cookie to 888, then continued to the
-        # second hit and set it to 999
-        self.expect("frame variable --show-globals cookie",
-                    substrs=['(int32_t)', 'cookie = 999'])
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/Makefile
deleted file mode 100644
index ee6b9cc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
deleted file mode 100644
index b4b489e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_commands/condition/TestWatchpointConditionCmd.py
+++ /dev/null
@@ -1,97 +0,0 @@
-"""
-Test watchpoint modify command to set condition on a watchpoint.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointConditionCmdTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # And the watchpoint variable declaration line number.
-        self.decl = line_number(self.source,
-                                '// Watchpoint variable declaration.')
-        # Build dictionary to have unique executable names for each test
-        # method.
-        self.exe_name = self.testMethodName
-        self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["aarch64"],
-        bugnumber="llvm.org/pr27710")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureNetBSD
-    def test_watchpoint_cond(self):
-        """Test watchpoint condition."""
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint for 'global'.
-        # With a condition of 'global==5'.
-        self.expect(
-            "watchpoint set variable -w write global",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 4',
-                'type = w',
-                '%s:%d' %
-                (self.source,
-                 self.decl)])
-
-        self.runCmd("watchpoint modify -c 'global==5'")
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0', 'global==5'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type).
-        # The stop reason of the thread should be watchpoint.
-        self.expect("thread backtrace", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stop reason = watchpoint'])
-        self.expect("frame variable --show-globals global",
-                    substrs=['(int32_t)', 'global = 5'])
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be 2.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 5'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py
deleted file mode 100644
index ea4f062..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_disable/TestWatchpointDisable.py
+++ /dev/null
@@ -1,81 +0,0 @@
-"""
-Test that the SBWatchpoint::SetEnable API works.
-"""
-
-import os
-import lldb
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test.decorators import *
-from lldbsuite.test import lldbplatform, lldbplatformutil
-
-
-class TestWatchpointSetEnable(TestBase):
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    def test_disable_works (self):
-        """Set a watchpoint, disable it, and make sure it doesn't get hit."""
-        self.build()
-        self.do_test(False)
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    def test_disable_enable_works (self):
-        """Set a watchpoint, disable it, and make sure it doesn't get hit."""
-        self.build()
-        self.do_test(True)
-
-    def do_test(self, test_enable):
-        """Set a watchpoint, disable it and make sure it doesn't get hit."""
-
-        exe = self.getBuildArtifact("a.out")
-        main_file_spec = lldb.SBFileSpec("main.c")
-
-        # Create a target by the debugger.
-        self.target = self.dbg.CreateTarget(exe)
-        self.assertTrue(self.target, VALID_TARGET)
-
-        bkpt_before = self.target.BreakpointCreateBySourceRegex("Set a breakpoint here", main_file_spec)
-        self.assertEqual(bkpt_before.GetNumLocations(),  1, "Failed setting the before breakpoint.")
-
-        bkpt_after = self.target.BreakpointCreateBySourceRegex("We should have stopped", main_file_spec)
-        self.assertEqual(bkpt_after.GetNumLocations(), 1, "Failed setting the after breakpoint.")
-
-        process = self.target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        thread = lldbutil.get_one_thread_stopped_at_breakpoint(process, bkpt_before)
-        self.assertTrue(thread.IsValid(), "We didn't stop at the before breakpoint.")
-
-        ret_val = lldb.SBCommandReturnObject()
-        self.dbg.GetCommandInterpreter().HandleCommand("watchpoint set variable -w write global_var", ret_val)
-        self.assertTrue(ret_val.Succeeded(), "Watchpoint set variable did not return success.")
-
-        wp = self.target.FindWatchpointByID(1)
-        self.assertTrue(wp.IsValid(), "Didn't make a valid watchpoint.")
-        self.assertTrue(wp.GetWatchAddress() != lldb.LLDB_INVALID_ADDRESS, "Watch address is invalid")
-
-        wp.SetEnabled(False)
-        self.assertTrue(not wp.IsEnabled(), "The watchpoint thinks it is still enabled")
-
-        process.Continue()
-
-        stop_reason = thread.GetStopReason()
-
-        self.assertEqual(stop_reason, lldb.eStopReasonBreakpoint, "We didn't stop at our breakpoint.")
-
-        if test_enable:
-            wp.SetEnabled(True)
-            self.assertTrue(wp.IsEnabled(), "The watchpoint thinks it is still disabled.")
-            process.Continue()
-            stop_reason = thread.GetStopReason()
-            self.assertEqual(stop_reason, lldb.eStopReasonWatchpoint, "We didn't stop at our watchpoint")
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
deleted file mode 100644
index cedfad9..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_events/TestWatchpointEvents.py
+++ /dev/null
@@ -1,118 +0,0 @@
-"""Test that adding, deleting and modifying watchpoints sends the appropriate events."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestWatchpointEvents (TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line numbers that we will step to in main:
-        self.main_source = "main.c"
-
-    @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["aarch64"],
-        bugnumber="llvm.org/pr27710")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    def test_with_python_api(self):
-        """Test that adding, deleting and modifying watchpoints sends the appropriate events."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
-        break_in_main = target.BreakpointCreateBySourceRegex(
-            '// Put a breakpoint here.', self.main_source_spec)
-        self.assertTrue(break_in_main, VALID_BREAKPOINT)
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(
-            None, None, self.get_process_working_directory())
-
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # The stop reason of the thread should be breakpoint.
-        threads = lldbutil.get_threads_stopped_at_breakpoint(
-            process, break_in_main)
-
-        if len(threads) != 1:
-            self.fail("Failed to stop at first breakpoint in main.")
-
-        thread = threads[0]
-        frame = thread.GetFrameAtIndex(0)
-        local_var = frame.FindVariable("local_var")
-        self.assertTrue(local_var.IsValid())
-
-        self.listener = lldb.SBListener("com.lldb.testsuite_listener")
-        self.target_bcast = target.GetBroadcaster()
-        self.target_bcast.AddListener(
-            self.listener, lldb.SBTarget.eBroadcastBitWatchpointChanged)
-        self.listener.StartListeningForEvents(
-            self.target_bcast, lldb.SBTarget.eBroadcastBitWatchpointChanged)
-
-        error = lldb.SBError()
-        local_watch = local_var.Watch(True, False, True, error)
-        if not error.Success():
-            self.fail(
-                "Failed to make watchpoint for local_var: %s" %
-                (error.GetCString()))
-
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeAdded)
-        # Now change some of the features of this watchpoint and make sure we
-        # get events:
-        local_watch.SetEnabled(False)
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeDisabled)
-
-        local_watch.SetEnabled(True)
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeEnabled)
-
-        local_watch.SetIgnoreCount(10)
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeIgnoreChanged)
-
-        condition = "1 == 2"
-        local_watch.SetCondition(condition)
-        self.GetWatchpointEvent(lldb.eWatchpointEventTypeConditionChanged)
-
-        self.assertTrue(local_watch.GetCondition() == condition,
-                        'make sure watchpoint condition is "' + condition + '"')
-
-    def GetWatchpointEvent(self, event_type):
-        # We added a watchpoint so we should get a watchpoint added event.
-        event = lldb.SBEvent()
-        success = self.listener.WaitForEvent(1, event)
-        self.assertTrue(success, "Successfully got watchpoint event")
-        self.assertTrue(
-            lldb.SBWatchpoint.EventIsWatchpointEvent(event),
-            "Event is a watchpoint event.")
-        found_type = lldb.SBWatchpoint.GetWatchpointEventTypeFromEvent(event)
-        self.assertTrue(
-            found_type == event_type,
-            "Event is not correct type, expected: %d, found: %d" %
-            (event_type,
-             found_type))
-        # There shouldn't be another event waiting around:
-        found_event = self.listener.PeekAtNextEventForBroadcasterWithType(
-            self.target_bcast, lldb.SBTarget.eBroadcastBitBreakpointChanged, event)
-        if found_event:
-            print("Found an event I didn't expect: ", event)
-
-        self.assertTrue(not found_event, "Only one event per change.")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py
deleted file mode 100644
index 5b72f5e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_on_vectors/TestValueOfVectorVariable.py
+++ /dev/null
@@ -1,52 +0,0 @@
-"""
-Test displayed value of a vector variable while doing watchpoint operations
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class TestValueOfVectorVariableTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    def test_value_of_vector_variable_using_watchpoint_set(self):
-        """Test verify displayed value of vector variable."""
-        exe = self.getBuildArtifact("a.out")
-        d = {'C_SOURCES': self.source, 'EXE': exe}
-        self.build(dictionary=d)
-        self.setTearDownCleanup(dictionary=d)
-        self.value_of_vector_variable_with_watchpoint_set()
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.c'
-
-    def value_of_vector_variable_with_watchpoint_set(self):
-        """Test verify displayed value of vector variable"""
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Set break to get a frame
-        self.runCmd("b main")
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # Value of a vector variable should be displayed correctly
-        self.expect(
-            "watchpoint set variable global_vector",
-            WATCHPOINT_CREATED,
-            substrs=['new value: (1, 2, 3, 4)'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/Makefile
deleted file mode 100644
index 8817fff..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-ENABLE_THREADS := YES
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
deleted file mode 100644
index abe6786..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_set_command/TestWatchLocationWithWatchSet.py
+++ /dev/null
@@ -1,109 +0,0 @@
-"""
-Test lldb watchpoint that uses 'watchpoint set -w write -s size' to watch a pointed location with size.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchLocationUsingWatchpointSetTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Our simple source filename.
-        self.source = 'main.cpp'
-        # Find the line number to break inside main().
-        self.line = line_number(
-            self.source, '// Set break point at this line.')
-        # This is for verifying that watch location works.
-        self.violating_func = "do_bad_thing_with_location"
-        # Build dictionary to have unique executable names for each test
-        # method.
-
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=[
-            'aarch64',
-            'arm'],
-        bugnumber="llvm.org/pr26031")
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureNetBSD
-    def test_watchlocation_using_watchpoint_set(self):
-        """Test watching a location with 'watchpoint set expression -w write -s size' option."""
-        self.build()
-        self.setTearDownCleanup()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Add a breakpoint to set a watchpoint when stopped on the breakpoint.
-        lldbutil.run_break_set_by_file_and_line(
-            self, None, self.line, num_expected_locations=1)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # We should be stopped again due to the breakpoint.
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # Now let's set a write-type watchpoint pointed to by 'g_char_ptr' and
-        # with offset as 7.
-        # The main.cpp, by design, misbehaves by not following the agreed upon
-        # protocol of only accessing the allowable index range of [0, 6].
-        self.expect(
-            "watchpoint set expression -w write -s 1 -- g_char_ptr + 7",
-            WATCHPOINT_CREATED,
-            substrs=[
-                'Watchpoint created',
-                'size = 1',
-                'type = w'])
-        self.runCmd("expr unsigned val = g_char_ptr[7]; val")
-        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-                    endstr=' = 0')
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should be 0 initially.
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = 0'])
-
-        self.runCmd("process continue")
-
-        # We should be stopped again due to the watchpoint (write type), but
-        # only once.  The stop reason of the thread should be watchpoint.
-        self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                    substrs=['stopped',
-                             'stop reason = watchpoint',
-                             self.violating_func])
-
-        # Switch to the thread stopped due to watchpoint and issue some
-        # commands.
-        self.switch_to_thread_with_stop_reason(lldb.eStopReasonWatchpoint)
-        self.runCmd("thread backtrace")
-        self.runCmd("expr unsigned val = g_char_ptr[7]; val")
-        self.expect(self.res.GetOutput().splitlines()[0], exe=False,
-                    endstr=' = 99')
-
-        # Use the '-v' option to do verbose listing of the watchpoint.
-        # The hit count should now be the same as the number of threads that
-        # stopped on a watchpoint.
-        threads = lldbutil.get_stopped_threads(
-            self.process(), lldb.eStopReasonWatchpoint)
-        self.expect("watchpoint list -v",
-                    substrs=['hit_count = %d' % len(threads)])
-
-        self.runCmd("thread backtrace all")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/Makefile
deleted file mode 100644
index b09a579..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py
deleted file mode 100644
index d4f78a5..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/watchpoint/watchpoint_size/TestWatchpointSizes.py
+++ /dev/null
@@ -1,134 +0,0 @@
-"""
-Test watchpoint size cases (1-byte, 2-byte, 4-byte).
-Make sure we can watch all bytes, words or double words individually
-when they are packed in a 8-byte region.
-
-"""
-
-from __future__ import print_function
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class WatchpointSizeTestCase(TestBase):
-    NO_DEBUG_INFO_TESTCASE = True
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
-        # Source filename.
-        self.source = 'main.c'
-
-        # Output filename.
-        self.exe_name = self.getBuildArtifact("a.out")
-        self.d = {'C_SOURCES': self.source, 'EXE': self.exe_name}
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_byte_size_watchpoints_with_byte_selection(self):
-        """Test to selectively watch different bytes in a 8-byte array."""
-        self.run_watchpoint_size_test('byteArray', 8, '1')
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_two_byte_watchpoints_with_word_selection(self):
-        """Test to selectively watch different words in an 8-byte word array."""
-        self.run_watchpoint_size_test('wordArray', 4, '2')
-
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    # Read-write watchpoints not supported on SystemZ
-    @expectedFailureAll(archs=['s390x'])
-    def test_four_byte_watchpoints_with_dword_selection(self):
-        """Test to selectively watch two double words in an 8-byte dword array."""
-        self.run_watchpoint_size_test('dwordArray', 2, '4')
-
-    def run_watchpoint_size_test(self, arrayName, array_size, watchsize):
-        self.build(dictionary=self.d)
-        self.setTearDownCleanup(dictionary=self.d)
-
-        exe = self.getBuildArtifact(self.exe_name)
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Detect line number after which we are going to increment arrayName.
-        loc_line = line_number('main.c', '// About to write ' + arrayName)
-
-        # Set a breakpoint on the line detected above.
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.c", loc_line, num_expected_locations=1, loc_exact=True)
-
-        # Run the program.
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        for i in range(array_size):
-            # We should be stopped again due to the breakpoint.
-            # The stop reason of the thread should be breakpoint.
-            self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                        substrs=['stopped', 'stop reason = breakpoint'])
-
-            # Set a read_write type watchpoint arrayName
-            watch_loc = arrayName + "[" + str(i) + "]"
-            self.expect(
-                "watchpoint set variable -w read_write " +
-                watch_loc,
-                WATCHPOINT_CREATED,
-                substrs=[
-                    'Watchpoint created',
-                    'size = ' +
-                    watchsize,
-                    'type = rw'])
-
-            # Use the '-v' option to do verbose listing of the watchpoint.
-            # The hit count should be 0 initially.
-            self.expect("watchpoint list -v", substrs=['hit_count = 0'])
-
-            self.runCmd("process continue")
-
-            # We should be stopped due to the watchpoint.
-            # The stop reason of the thread should be watchpoint.
-            self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                        substrs=['stopped', 'stop reason = watchpoint'])
-
-            # Use the '-v' option to do verbose listing of the watchpoint.
-            # The hit count should now be 1.
-            self.expect("watchpoint list -v",
-                        substrs=['hit_count = 1'])
-
-            self.runCmd("process continue")
-
-            # We should be stopped due to the watchpoint.
-            # The stop reason of the thread should be watchpoint.
-            self.expect("thread list", STOPPED_DUE_TO_WATCHPOINT,
-                        substrs=['stopped', 'stop reason = watchpoint'])
-
-            # Use the '-v' option to do verbose listing of the watchpoint.
-            # The hit count should now be 1.
-            # Verify hit_count has been updated after value has been read.
-            self.expect("watchpoint list -v",
-                        substrs=['hit_count = 2'])
-
-            # Delete the watchpoint immediately, but set auto-confirm to true
-            # first.
-            self.runCmd("settings set auto-confirm true")
-            self.expect(
-                "watchpoint delete",
-                substrs=['All watchpoints removed.'])
-            # Restore the original setting of auto-confirm.
-            self.runCmd("settings clear auto-confirm")
-
-            self.runCmd("process continue")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
index c25f9af..c722840 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/wrong_commands/TestWrongCommands.py
@@ -2,10 +2,7 @@
 Test how lldb reacts to wrong commands
 """
 
-from __future__ import print_function
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/help/TestApropos.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/help/TestApropos.py
deleted file mode 100644
index 8bf75ab..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/help/TestApropos.py
+++ /dev/null
@@ -1,28 +0,0 @@
-"""
-Test some lldb apropos commands.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class AproposCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_apropos_variable(self):
-        """Test that 'apropos variable' prints the fully qualified command name"""
-        self.expect(
-            'apropos variable',
-            substrs=[
-                'frame variable',
-                'target variable',
-                'watchpoint set variable'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/help/TestHelp.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/help/TestHelp.py
deleted file mode 100644
index 7d66b08..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/help/TestHelp.py
+++ /dev/null
@@ -1,252 +0,0 @@
-"""
-Test some lldb help commands.
-
-See also CommandInterpreter::OutputFormattedHelpText().
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class HelpCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_simplehelp(self):
-        """A simple test of 'help' command and its output."""
-        self.expect("help",
-                    startstr='Debugger commands:')
-
-        self.expect("help -a", matching=False,
-                    substrs=['next'])
-
-        self.expect("help", matching=True,
-                    substrs=['next'])
-
-    @no_debug_info_test
-    def test_help_on_help(self):
-        """Testing the help on the help facility."""
-        self.expect("help help", matching=True,
-                    substrs=['--hide-aliases',
-                             '--hide-user-commands'])
-
-    @no_debug_info_test
-    def version_number_string(self):
-        """Helper function to find the version number string of lldb."""
-        plist = os.path.join(
-            os.environ["LLDB_SRC"],
-            "resources",
-            "LLDB-Info.plist")
-        try:
-            CFBundleVersionSegFound = False
-            with open(plist, 'r') as f:
-                for line in f:
-                    if CFBundleVersionSegFound:
-                        version_line = line.strip()
-                        import re
-                        m = re.match("<string>(.*)</string>", version_line)
-                        if m:
-                            version = m.group(1)
-                            return version
-                        else:
-                            # Unsuccessful, let's juts break out of the for
-                            # loop.
-                            break
-
-                    if line.find("<key>CFBundleVersion</key>") != -1:
-                        # Found our match.  The next line contains our version
-                        # string, for example:
-                        #
-                        #     <string>38</string>
-                        CFBundleVersionSegFound = True
-
-        except:
-            # Just fallthrough...
-            import traceback
-            traceback.print_exc()
-            pass
-
-        # Use None to signify that we are not able to grok the version number.
-        return None
-
-    @no_debug_info_test
-    def test_help_arch(self):
-        """Test 'help arch' which should list of supported architectures."""
-        self.expect("help arch",
-                    substrs=['arm', 'x86_64', 'i386'])
-
-    @no_debug_info_test
-    def test_help_version(self):
-        """Test 'help version' and 'version' commands."""
-        self.expect("help version",
-                    substrs=['Show the LLDB debugger version.'])
-        import re
-        version_str = self.version_number_string()
-        match = re.match('[0-9]+', version_str)
-        search_regexp = ['lldb( version|-' + (version_str if match else '[0-9]+') + ').*\n']
-
-        self.expect("version",
-                    patterns=search_regexp)
-
-    @no_debug_info_test
-    def test_help_should_not_crash_lldb(self):
-        """Command 'help disasm' should not crash lldb."""
-        self.runCmd("help disasm", check=False)
-        self.runCmd("help unsigned-integer")
-
-    @no_debug_info_test
-    def test_help_should_not_hang_emacsshell(self):
-        """Command 'settings set term-width 0' should not hang the help command."""
-        self.expect(
-            "settings set term-width 0",
-            COMMAND_FAILED_AS_EXPECTED,
-            error=True,
-            substrs=['error: 0 is out of range, valid values must be between'])
-        # self.runCmd("settings set term-width 0")
-        self.expect("help",
-                    startstr='Debugger commands:')
-
-    @no_debug_info_test
-    def test_help_breakpoint_set(self):
-        """Test that 'help breakpoint set' does not print out redundant lines of:
-        'breakpoint set [-s <shlib-name>] ...'."""
-        self.expect("help breakpoint set", matching=False,
-                    substrs=['breakpoint set [-s <shlib-name>]'])
-
-    @no_debug_info_test
-    def test_help_image_dump_symtab_should_not_crash(self):
-        """Command 'help image dump symtab' should not crash lldb."""
-        # 'image' is an alias for 'target modules'.
-        self.expect("help image dump symtab",
-                    substrs=['dump symtab',
-                             'sort-order'])
-
-    @no_debug_info_test
-    def test_help_image_du_sym_is_ambiguous(self):
-        """Command 'help image du sym' is ambiguous and spits out the list of candidates."""
-        self.expect("help image du sym",
-                    COMMAND_FAILED_AS_EXPECTED, error=True,
-                    substrs=['error: ambiguous command image du sym',
-                             'symfile',
-                             'symtab'])
-
-    @no_debug_info_test
-    def test_help_image_du_line_should_work(self):
-        """Command 'help image du line-table' is not ambiguous and should work."""
-        # 'image' is an alias for 'target modules'.
-        self.expect("help image du line", substrs=[
-                    'Dump the line table for one or more compilation units'])
-
-    @no_debug_info_test
-    def test_help_target_variable_syntax(self):
-        """Command 'help target variable' should display <variable-name> ..."""
-        self.expect("help target variable",
-                    substrs=['<variable-name> [<variable-name> [...]]'])
-
-    @no_debug_info_test
-    def test_help_watchpoint_and_its_args(self):
-        """Command 'help watchpoint', 'help watchpt-id', and 'help watchpt-id-list' should work."""
-        self.expect("help watchpoint",
-                    substrs=['delete', 'disable', 'enable', 'list'])
-        self.expect("help watchpt-id",
-                    substrs=['<watchpt-id>'])
-        self.expect("help watchpt-id-list",
-                    substrs=['<watchpt-id-list>'])
-
-    @no_debug_info_test
-    def test_help_watchpoint_set(self):
-        """Test that 'help watchpoint set' prints out 'expression' and 'variable'
-        as the possible subcommands."""
-        self.expect("help watchpoint set",
-                    substrs=['The following subcommands are supported:'],
-                    patterns=['expression +--',
-                              'variable +--'])
-
-    @no_debug_info_test
-    def test_help_po_hides_options(self):
-        """Test that 'help po' does not show all the options for expression"""
-        self.expect(
-            "help po",
-            substrs=[
-                '--show-all-children',
-                '--object-description'],
-            matching=False)
-
-    @no_debug_info_test
-    def test_help_run_hides_options(self):
-        """Test that 'help run' does not show all the options for process launch"""
-        self.expect("help run",
-                    substrs=['--arch', '--environment'], matching=False)
-
-    @no_debug_info_test
-    def test_help_next_shows_options(self):
-        """Test that 'help next' shows all the options for thread step-over"""
-        self.expect("help next",
-                    substrs=['--python-class', '--run-mode'], matching=True)
-
-    @no_debug_info_test
-    def test_help_provides_alternatives(self):
-        """Test that help on commands that don't exist provides information on additional help avenues"""
-        self.expect(
-            "help thisisnotadebuggercommand",
-            substrs=[
-                "'thisisnotadebuggercommand' is not a known command.",
-                "Try 'help' to see a current list of commands.",
-                "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
-                "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."],
-            error=True)
-
-        self.expect(
-            "help process thisisnotadebuggercommand",
-            substrs=[
-                "'process thisisnotadebuggercommand' is not a known command.",
-                "Try 'help' to see a current list of commands.",
-                "Try 'apropos thisisnotadebuggercommand' for a list of related commands.",
-                "Try 'type lookup thisisnotadebuggercommand' for information on types, methods, functions, modules, etc."])
-
-    @no_debug_info_test
-    def test_custom_help_alias(self):
-        """Test that aliases pick up custom help text."""
-        def cleanup():
-            self.runCmd('command unalias afriendlyalias', check=False)
-            self.runCmd('command unalias averyfriendlyalias', check=False)
-
-        self.addTearDownHook(cleanup)
-        self.runCmd(
-            'command alias --help "I am a friendly alias" -- afriendlyalias help')
-        self.expect(
-            "help afriendlyalias",
-            matching=True,
-            substrs=['I am a friendly alias'])
-        self.runCmd(
-            'command alias --long-help "I am a very friendly alias" -- averyfriendlyalias help')
-        self.expect("help averyfriendlyalias", matching=True,
-                    substrs=['I am a very friendly alias'])
-    @no_debug_info_test
-    def test_alias_prints_origin(self):
-        """Test that 'help <unique_match_to_alias>' prints the alias origin."""
-        def cleanup():
-            self.runCmd('command unalias alongaliasname', check=False)
-
-        self.addTearDownHook(cleanup)
-        self.runCmd('command alias alongaliasname help')
-        self.expect("help alongaliasna", matching=True,
-                    substrs=["'alongaliasna' is an abbreviation for 'help'"])
-
-    @no_debug_info_test
-    def test_help_format_output(self):
-        """Test that help output reaches TerminalWidth."""
-        self.runCmd(
-            'settings set term-width 108')
-        self.expect(
-            "help format",
-            matching=True,
-            substrs=['<format> -- One of the format names'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
new file mode 100644
index 0000000..610bf01
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/iohandler/completion/TestIOHandlerCompletion.py
@@ -0,0 +1,56 @@
+"""
+Test completion in our IOHandlers.
+"""
+
+import os
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.lldbpexpect import PExpectTest
+
+class IOHandlerCompletionTest(PExpectTest):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # PExpect uses many timeouts internally and doesn't play well
+    # under ASAN on a loaded machine..
+    @skipIfAsan
+    @skipIfEditlineSupportMissing
+    def test_completion(self):
+        self.launch(dimensions=(100,500))
+
+        # Start tab completion, go to the next page and then display all with 'a'.
+        self.child.send("\t\ta")
+        self.child.expect_exact("register")
+
+        # Try tab completing regi to register.
+        self.child.send("regi\t")
+        self.child.expect_exact(self.PROMPT + "register")
+        self.child.send("\n")
+        self.expect_prompt()
+
+        # Try tab completing directories and files. Also tests the partial
+        # completion where LLDB shouldn't print a space after the directory
+        # completion (as it didn't completed the full token).
+        dir_without_slashes = os.path.realpath(os.path.dirname(__file__)).rstrip("/")
+        self.child.send("file " + dir_without_slashes + "\t")
+        self.child.expect_exact("iohandler/completion/")
+        # If we get a correct partial completion without a trailing space, then this
+        # should complete the current test file.
+        self.child.send("TestIOHandler\t")
+        self.child.expect_exact("TestIOHandlerCompletion.py")
+        self.child.send("\n")
+        self.expect_prompt()
+
+        # Start tab completion and abort showing more commands with 'n'.
+        self.child.send("\t")
+        self.child.expect_exact("More (Y/n/a)")
+        self.child.send("n")
+        self.expect_prompt()
+
+        # Shouldn't crash or anything like that.
+        self.child.send("regoinvalid\t")
+        self.expect_prompt()
+
+        self.quit()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/multiline-completion/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/iohandler/completion/main.c
similarity index 100%
rename from src/llvm-project/lldb/packages/Python/lldbsuite/test/expression_command/multiline-completion/main.c
rename to src/llvm-project/lldb/packages/Python/lldbsuite/test/iohandler/completion/main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py
new file mode 100644
index 0000000..c8ff9a6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/iohandler/unicode/TestUnicode.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+"""
+Test unicode handling in LLDB.
+"""
+
+import os
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.lldbpexpect import PExpectTest
+
+class TestCase(PExpectTest):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    # PExpect uses many timeouts internally and doesn't play well
+    # under ASAN on a loaded machine..
+    @skipIfAsan
+    def test_unicode_input(self):
+        self.launch()
+
+        # Send some unicode input to LLDB.
+        # We should get back that this is an invalid command with our character as UTF-8.
+        self.expect(u'\u1234', substrs=[u"error: '\u1234' is not a valid command.".encode('utf-8')])
+
+        self.quit()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/Makefile
deleted file mode 100644
index e7bd3f4..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-LEVEL = ../make
-CXX_SOURCES := inline_rerun_inferior.cpp
-CXXFLAGS += -std=c++11
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestFail.py.park b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestFail.py.park
index da64bc0..fcdba39 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestFail.py.park
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestFail.py.park
@@ -1,6 +1,5 @@
 """Tests that a FAIL is detected by the testbot."""
 
-from __future__ import print_function
 
 import lldbsuite.test.lldbtest as lldbtest
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestInvalidDecorator.py.park b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestInvalidDecorator.py.park
index 7f5c4cb..d5c8c58 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestInvalidDecorator.py.park
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestInvalidDecorator.py.park
@@ -1,4 +1,3 @@
-from __future__ import print_function
 from lldbsuite.test import lldbtest
 from lldbsuite.test import decorators
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFail.py.park b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFail.py.park
index bcd1926..8d1fc95 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFail.py.park
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestRerunFail.py.park
@@ -4,7 +4,6 @@
 Do not mark them as flakey as, at this time, flakey tests will
 run twice, thus causing the second run to succeed."""
 
-from __future__ import print_function
 
 import rerun_base
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignal.py.park b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignal.py.park
index d73ac74..5a34c09 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignal.py.park
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignal.py.park
@@ -1,6 +1,5 @@
 """Tests that an exceptional exit is detected by the testbot."""
 
-from __future__ import print_function
 
 import os
 import signal
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignalOutsideTestMethod.py.park b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignalOutsideTestMethod.py.park
index 7a5b2ba..425c5fe 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignalOutsideTestMethod.py.park
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/TestSignalOutsideTestMethod.py.park
@@ -1,6 +1,5 @@
 """Tests that an exceptional exit is detected by the testbot."""
 
-from __future__ import print_function
 
 import atexit
 import os
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/rerun_base.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/rerun_base.py
index 2ce775d..909b93b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/rerun_base.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/issue_verification/rerun_base.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import os
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
index e3ae93d..69e23e3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/TestAnonymous.py
@@ -1,10 +1,7 @@
 """Test that anonymous structs/unions are transparent to member access"""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
index da3a46a..cc9ae8e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/array_types/TestArrayTypes.py
@@ -1,10 +1,7 @@
 """Test breakpoint by file/line number; and list variables with array types."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
index 54f71f4..7b28a32 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/TestBitfields.py
@@ -1,10 +1,7 @@
 """Show bitfields and check that they display correctly."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -24,7 +21,6 @@
     # BitFields exhibit crashes in record layout on Windows
     # (http://llvm.org/pr21800)
     @skipIfWindows
-    @expectedFailureNetBSD
     def test_and_run_command(self):
         """Test 'frame variable ...' on a variable with bitfields."""
         self.build()
@@ -148,12 +144,14 @@
                 '(uint8_t:1) b17 = \'\\0\'',
                 ])
 
+        self.expect("v/x large_packed", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=["a = 0x0000000cbbbbaaaa", "b = 0x0000000dffffeee"])
+
 
     @add_test_categories(['pyapi'])
     # BitFields exhibit crashes in record layout on Windows
     # (http://llvm.org/pr21800)
     @skipIfWindows
-    @expectedFailureNetBSD
     def test_and_python_api(self):
         """Use Python APIs to inspect a bitfields variable."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/main.c
index c21cfc9..be3a1af 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/main.c
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/main.c
@@ -90,6 +90,14 @@
     packed.b = 10;
     packed.c = 0x7112233;
 
+    struct LargePackedBits {
+        uint64_t a: 36;
+        uint64_t b: 36;
+    } __attribute__((packed));
+
+    struct LargePackedBits large_packed =
+      (struct LargePackedBits){ 0xcbbbbaaaa, 0xdffffeeee };
+    
     return 0;               //// Set break point at this line.
 
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
index 752b7ae..57083c9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS += -fblocks
+CFLAGS_EXTRAS := -fblocks
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py
index c7693c9..cd82d15 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/blocks/TestBlocks.py
@@ -1,11 +1,8 @@
 """Test that lldb can invoke blocks and access variables inside them"""
 
-from __future__ import print_function
 
 
 import unittest2
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile
index 979cefe..59778ab 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile
@@ -1,9 +1,7 @@
-LEVEL := ../../../make
-
 LD_EXTRAS := -L. -LOne -l$(LIB_PREFIX)One -LTwo -l$(LIB_PREFIX)Two
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 .PHONY:
 a.out: lib_One lib_Two
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
index 130c7dd..18f3725 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk
@@ -1,10 +1,8 @@
-LEVEL := ../../../make
-
 DYLIB_NAME := One
 DYLIB_C_SOURCES := One.c OneConstant.c
 DYLIB_ONLY := YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 OneConstant.o: OneConstant.c
 	$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
index d0d0e98..9d088e3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/TestConflictingSymbol.py
@@ -1,10 +1,7 @@
 """Test that conflicting symbols in different shared libraries work correctly"""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
index ebe58cc..79b256a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk
@@ -1,10 +1,8 @@
-LEVEL := ../../../make
-
 DYLIB_NAME := Two
 DYLIB_C_SOURCES := Two.c TwoConstant.c
 DYLIB_ONLY := YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 TwoConstant.o: TwoConstant.c
 	$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
index 51adad1..325be90 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c functions.c
 
-CFLAGS_EXTRAS += -O3
+CFLAGS_EXTRAS := -O3
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
index 8e5fd6c..59fa6bc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/TestConstVariables.py
@@ -1,10 +1,7 @@
 """Check that compiler-generated constant values work correctly"""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -27,12 +24,6 @@
     @expectedFailureAll(oslist=["freebsd", "linux"], compiler="icc")
     @expectedFailureAll(archs=['mips', 'mipsel', 'mips64', 'mips64el'])
     @expectedFailureAll(
-        oslist=["linux"],
-        archs=[
-            'arm',
-            'aarch64'],
-        bugnumber="llvm.org/pr27883")
-    @expectedFailureAll(
         oslist=["windows"],
         bugnumber="llvm.org/pr24489: Name lookup not working correctly on Windows")
     @expectedFailureNetBSD
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
index 53ee219..af9b6fb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/TestEnumTypes.py
@@ -1,10 +1,7 @@
 """Look up enum type information and check for correct display."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
@@ -27,11 +24,35 @@
         exe = self.getBuildArtifact("a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
 
+        lldbutil.run_to_source_breakpoint(
+            self, '// Breakpoint for bitfield', lldb.SBFileSpec("main.c"))
+
+        self.expect("fr var a", DATA_TYPES_DISPLAYED_CORRECTLY,
+                    patterns=[' = A$'])
+        self.expect("fr var b", DATA_TYPES_DISPLAYED_CORRECTLY,
+                    patterns=[' = B$'])
+        self.expect("fr var c", DATA_TYPES_DISPLAYED_CORRECTLY,
+                    patterns=[' = C$'])
+        self.expect("fr var ab", DATA_TYPES_DISPLAYED_CORRECTLY,
+                    patterns=[' = AB$'])
+        self.expect("fr var ac", DATA_TYPES_DISPLAYED_CORRECTLY,
+                    patterns=[' = A | C$'])
+        self.expect("fr var all", DATA_TYPES_DISPLAYED_CORRECTLY,
+                    patterns=[' = ALL$'])
+        # Test that an enum that doesn't match the heuristic we use in
+        # ClangASTContext::DumpEnumValue, gets printed as a raw integer.
+        self.expect("fr var omega", DATA_TYPES_DISPLAYED_CORRECTLY,
+                    patterns=[' = 7$'])
+        # Test the behavior in case have a variable of a type considered
+        # 'bitfield' by the heuristic, but the value isn't actually fully
+        # covered by the enumerators.
+        self.expect("p (enum bitfield)nonsense", DATA_TYPES_DISPLAYED_CORRECTLY,
+                    patterns=[' = B | C | 0x10$'])
+
         # Break inside the main.
         bkpt_id = lldbutil.run_break_set_by_file_and_line(
             self, "main.c", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
+        self.runCmd("c", RUN_SUCCEEDED)
 
         # The stop reason of the thread should be breakpoint.
         self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/main.c
index 924336e..675af5e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/main.c
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/main.c
@@ -18,6 +18,20 @@
 
 int main (int argc, char const *argv[])
 {
+    enum bitfield {
+        None = 0,
+        A = 1 << 0,
+        B = 1 << 1,
+        C = 1 << 2,
+        AB = A | B,
+        ALL = A | B | C,
+    };
+
+    enum non_bitfield {
+        Alpha = 3,
+        Beta = 4
+    };
+
     enum days {
         Monday = -3,
         Tuesday,
@@ -28,9 +42,14 @@
         Sunday,
         kNumDays
     };
+
+    enum bitfield a = A, b = B, c = C, ab = AB, ac = A | C, all = ALL;
+    int nonsense = a + b + c + ab + ac + all;
+    enum non_bitfield omega = Alpha | Beta;
+
     enum days day;
     struct foo f;
-    f.op = NULL;
+    f.op = NULL; // Breakpoint for bitfield
     for (day = Monday - 1; day <= kNumDays + 1; day++)
     {
         printf("day as int is %i\n", (int)day); // Set break point at this line.
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile
index cd9ca5c..c9319d6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile
@@ -1,3 +1,2 @@
-LEVEL = ../../../make
 C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py
index 6827fb4..90d8530 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/TestFindStructTypes.py
@@ -2,12 +2,8 @@
 Make sure FindTypes finds struct types with the struct prefix.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
@@ -27,10 +23,6 @@
         self.build()
         self.do_test()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def do_test(self):
         """Make sure FindTypes actually finds 'struct typename' not just 'typename'."""
         exe = self.getBuildArtifact("a.out")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile
index 1db43ab..472e733 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c foo.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
index 2537beb..9ea1361 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
@@ -1,10 +1,7 @@
 """Test that forward declaration of a data structure gets resolved correctly."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py
index 9fc0b1c..3753eab 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/function_types/TestFunctionTypes.py
@@ -1,10 +1,7 @@
 """Test variable with function ptr type and that break on the function works."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile
index b1b77da..7b94b65 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
 DYLIB_NAME := a
 DYLIB_C_SOURCES := a.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py
index 57cec91..690d1ab 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/TestGlobalVariables.py
@@ -1,6 +1,5 @@
 """Show global variables and check that they do indeed have global scopes."""
 
-from __future__ import print_function
 
 
 from lldbsuite.test.decorators import *
@@ -22,7 +21,6 @@
         self.shlib_names = ["a"]
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24764")
-    @expectedFailureAll(oslist=["linux"], archs=["aarch64"], bugnumber="llvm.org/pr37301")
     def test_without_process(self):
         """Test that static initialized variables can be inspected without
         process."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_types/TestUseClosestType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_types/TestUseClosestType.py
new file mode 100644
index 0000000..2b8307a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_types/TestUseClosestType.py
@@ -0,0 +1,48 @@
+"""
+If there is a definition of a type in the current
+Execution Context's CU, then we should use that type
+even if there are other definitions of the type in other
+CU's.  Assert that that is true.
+"""
+
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class TestUseClosestType(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @expectedFailureAll(bugnumber="<rdar://problem/53262085>")
+    def test_use_in_expr(self):
+        """Use the shadowed type directly, see if we get a conflicting type definition."""
+        self.build()
+        self.main_source_file = lldb.SBFileSpec("main.c")
+        self.expr_test()
+
+    def run_and_check_expr(self, num_children, child_type):
+        frame = self.thread.GetFrameAtIndex(0)
+        result = frame.EvaluateExpression("struct Foo *$mine = (struct Foo *) malloc(sizeof(struct Foo)); $mine")
+        self.assertTrue(result.GetError().Success(), "Failed to parse an expression using a multiply defined type: %s"%(result.GetError().GetCString()), )
+        self.assertEqual(result.GetTypeName(), "struct Foo *", "The result has the right typename.")
+        self.assertEqual(result.GetNumChildren(), num_children, "Got the right number of children")
+        self.assertEqual(result.GetChildAtIndex(0).GetTypeName(), child_type, "Got the right type.")
+
+    def expr_test(self):
+        """ Run to a breakpoint in main.c, check that an expression referring to Foo gets the
+            local three int version.  Then run to a breakpoint in other.c and check that an
+            expression referring to Foo gets the two char* version. """
+        
+        (target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                   "Set a breakpoint in main", self.main_source_file)
+
+        self.run_and_check_expr(3, "int")
+        lldbutil.run_to_source_breakpoint(self, "Set a breakpoint in other", lldb.SBFileSpec("other.c"))
+        self.run_and_check_expr(2, "char *")
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_types/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_types/main.c
new file mode 100644
index 0000000..321facf
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_types/main.c
@@ -0,0 +1,16 @@
+extern int callme(int input);
+
+struct Foo {
+  int a;
+  int b;
+  int c;
+};
+
+int
+main(int argc, char **argv)
+{
+  // Set a breakpoint in main
+  struct Foo mine = {callme(argc), 10, 20};
+  return mine.a;
+}
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_types/other.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_types/other.c
new file mode 100644
index 0000000..24b72d4
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_types/other.c
@@ -0,0 +1,11 @@
+struct Foo {
+  char *ptr1;
+  char *ptr2;
+};
+
+int
+callme(int input)
+{
+  struct Foo myFoo = { "string one", "Set a breakpoint in other"};
+  return myFoo.ptr1[0] + myFoo.ptr2[0] + input;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
index fd72018..d3998ee 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-CFLAGS_EXTRAS += -O1
+CFLAGS_EXTRAS := -O1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/TestLocalVariables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/TestLocalVariables.py
index 7071b67..381292a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/TestLocalVariables.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/TestLocalVariables.py
@@ -5,7 +5,6 @@
 it didn't read the value as an unsigned.
 """
 
-from __future__ import print_function
 
 
 from lldbsuite.test.decorators import *
@@ -25,6 +24,7 @@
         self.line = line_number(
             self.source, '// Set break point at this line.')
 
+    @skipIfWindows
     def test_c_local_variables(self):
         """Test local variable value."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py
index 857223b..948e8be 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/modules/TestCModules.py
@@ -1,12 +1,8 @@
 """Test that importing modules in C works as expected."""
 
-from __future__ import print_function
 
 
-from distutils.version import StrictVersion
 import os
-import time
-import platform
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py
new file mode 100644
index 0000000..cdfbaae
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/TestOffsetof.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [decorators.no_debug_info_test])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c
new file mode 100644
index 0000000..cbb4a14
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/main.c
@@ -0,0 +1,12 @@
+#include <stdint.h>
+
+struct Foo {
+  int8_t a;
+  int16_t b;
+};
+
+int main (int argc, char const *argv[]) {
+    struct Foo f;
+    return f.a; //% self.expect("expr offsetof(Foo, a)", substrs = ['= 0'])
+                //% self.expect("expr offsetof(Foo, b)", substrs = ['= 2'])
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
index a986221..e4d42f6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 C_SOURCES := test.c
 
-CFLAGS_EXTRAS += -O1 -D_FORTIFY_SOURCE=0
+CFLAGS_EXTRAS := -O1 -D_FORTIFY_SOURCE=0
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
index 8221148..af0ad2a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/TestRegisterVariables.py
@@ -2,8 +2,6 @@
 
 from __future__ import print_function
 
-import os
-import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py
index 14677fc..f16d554 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/set_values/TestSetValues.py
@@ -1,10 +1,7 @@
 """Test settings and readings of program variables."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
index 35d712c..5e26f27 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 DYLIB_NAME := foo
 DYLIB_C_SOURCES := foo.c
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py
index 250088e..789939b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/TestSharedLib.py
@@ -1,6 +1,5 @@
 """Test that types defined in shared libraries work correctly."""
 
-from __future__ import print_function
 
 
 import unittest2
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
index 6d1f107..f3285de 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile
@@ -1,9 +1,7 @@
-LEVEL = ../../../make
-
 DYLIB_NAME := foo
 DYLIB_C_SOURCES := foo.c
 C_SOURCES := main.c
 
 SPLIT_DEBUG_SYMBOLS = YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
index 3731d1a..8858f67 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/TestSharedLibStrippedSymbols.py
@@ -1,6 +1,5 @@
 """Test that types defined in shared libraries with stripped symbols work correctly."""
 
-from __future__ import print_function
 
 
 import unittest2
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
index aeda9ff..7665b2f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step-target/TestStepTarget.py
@@ -1,9 +1,6 @@
 """Test the 'step target' feature."""
 
-from __future__ import print_function
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -34,7 +31,7 @@
         break_in_main = target.BreakpointCreateBySourceRegex(
             'Break here to try targetted stepping', self.main_source_spec)
         self.assertTrue(break_in_main, VALID_BREAKPOINT)
-        self.assertTrue(break_in_main.GetNumLocations() > 0, "Has locations.")
+        self.assertGreater(break_in_main.GetNumLocations(), 0, "Has locations.")
 
         # Now launch the process, and do not stop at entry point.
         process = target.LaunchSimple(
@@ -62,7 +59,7 @@
         thread.StepInto("lotsOfArgs", self.end_line, error)
         frame = thread.frames[0]
 
-        self.assertTrue(frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.")
+        self.assertEqual(frame.name, "lotsOfArgs", "Stepped to lotsOfArgs.")
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
     def test_with_end_line_bad_name(self):
@@ -73,8 +70,7 @@
         error = lldb.SBError()
         thread.StepInto("lotsOfArgssss", self.end_line, error)
         frame = thread.frames[0]
-        self.assertTrue(
-            frame.line_entry.line == self.end_line,
+        self.assertEqual(frame.line_entry.line, self.end_line,
             "Stepped to the block end.")
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
@@ -86,7 +82,7 @@
         error = lldb.SBError()
         thread.StepInto("modifyInt", self.end_line, error)
         frame = thread.frames[0]
-        self.assertTrue(frame.name == "modifyInt", "Stepped to modifyInt.")
+        self.assertEqual(frame.name, "modifyInt", "Stepped to modifyInt.")
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
     def test_with_command_and_block(self):
@@ -102,7 +98,7 @@
             "thread step-in command succeeded.")
 
         frame = thread.frames[0]
-        self.assertTrue(frame.name == "lotsOfArgs", "Stepped to lotsOfArgs.")
+        self.assertEqual(frame.name, "lotsOfArgs", "Stepped to lotsOfArgs.")
 
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr32343")
     def test_with_command_and_block_and_bad_name(self):
@@ -119,9 +115,8 @@
 
         frame = thread.frames[0]
 
-        self.assertTrue(frame.name == "main", "Stepped back out to main.")
+        self.assertEqual(frame.name, "main", "Stepped back out to main.")
         # end_line is set to the line after the containing block.  Check that
         # we got there:
-        self.assertTrue(
-            frame.line_entry.line == self.end_line,
+        self.assertEqual(frame.line_entry.line, self.end_line,
             "Got out of the block")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/Makefile
new file mode 100644
index 0000000..4b3467b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/Makefile
@@ -0,0 +1,5 @@
+CXX_SOURCES := locking.cpp
+CXXFLAGS_EXTRAS := -std=c++11
+ENABLE_THREADS := YES
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py
new file mode 100644
index 0000000..988d90a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/TestStepOverDoesntBlock.py
@@ -0,0 +1,30 @@
+"""
+Test that step over will let other threads run when necessary
+"""
+
+from __future__ import print_function
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class StepOverDoesntDeadlockTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def test_step_over(self):
+        """Test that when step over steps over a function it lets other threads run."""
+        self.build()
+        (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
+                                                                            "without running the first thread at least somewhat",
+                                                                            lldb.SBFileSpec("locking.cpp"))
+        # This is just testing that the step over actually completes.
+        # If the test fails this step never return, so failure is really
+        # signaled by the test timing out.
+        
+        thread.StepOver()
+        state = process.GetState()
+        self.assertEqual(state, lldb.eStateStopped)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/locking.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/locking.cpp
new file mode 100644
index 0000000..8288a66
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/step_over_no_deadlock/locking.cpp
@@ -0,0 +1,78 @@
+#include <stdio.h>
+#include <thread>
+#include <mutex>
+#include <condition_variable>
+
+std::mutex contended_mutex;
+
+std::mutex control_mutex;
+std::condition_variable  control_condition;
+
+std::mutex thread_started_mutex;
+std::condition_variable  thread_started_condition;
+
+// This function runs in a thread.  The locking dance is to make sure that 
+// by the time the main thread reaches the pthread_join below, this thread
+// has for sure acquired the contended_mutex.  So then the call_me_to_get_lock
+// function will block trying to get the mutex, and only succeed once it
+// signals this thread, then lets it run to wake up from the cond_wait and
+// release the mutex.
+
+void
+lock_acquirer_1 (void)
+{
+  std::unique_lock<std::mutex> contended_lock(contended_mutex);
+  
+  // Grab this mutex, that will ensure that the main thread
+  // is in its cond_wait for it (since that's when it drops the mutex.
+
+  thread_started_mutex.lock();
+  thread_started_mutex.unlock();
+
+  // Now signal the main thread that it can continue, we have the contended lock
+  // so the call to call_me_to_get_lock won't make any progress till  this
+  // thread gets a chance to run.
+
+  std::unique_lock<std::mutex> control_lock(control_mutex);
+
+  thread_started_condition.notify_all();
+
+  control_condition.wait(control_lock);
+
+}
+
+int
+call_me_to_get_lock (int ret_val)
+{
+  control_condition.notify_all();
+  contended_mutex.lock();
+  return ret_val;
+}
+
+int
+get_int() {
+  return 567;
+}
+
+int main ()
+{
+  std::unique_lock<std::mutex> thread_started_lock(thread_started_mutex);
+
+  std::thread thread_1(lock_acquirer_1);
+
+  thread_started_condition.wait(thread_started_lock);
+
+  control_mutex.lock();
+  control_mutex.unlock();
+
+  // Break here.  At this point the other thread will have the contended_mutex,
+  // and be sitting in its cond_wait for the control condition.  So there is
+  // no way that our by-hand calling of call_me_to_get_lock will proceed
+  // without running the first thread at least somewhat.
+
+  int result = call_me_to_get_lock(get_int());
+  thread_1.join();
+
+  return 0;
+
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py
index e10e238..c20e443 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestStepAndBreakpoints.py
@@ -1,10 +1,7 @@
 """Test stepping over vrs. hitting breakpoints & subsequent stepping in various forms."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py
index 62a0bf8..43ed10d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/stepping/TestThreadStepping.py
@@ -2,12 +2,8 @@
 Test thread stepping features in combination with frame select.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile
deleted file mode 100644
index cd9ca5c..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../make
-C_SOURCES := main.c
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile
index 0faad10..b26ce5c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
 DYLIB_NAME := a
@@ -7,4 +5,4 @@
 
 ENABLE_THREADS := YES
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
index b76cd41..b1fd2b8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/TestTlsGlobals.py
@@ -1,11 +1,9 @@
 """Test that thread-local storage can be read correctly."""
 
-from __future__ import print_function
 
 
 import unittest2
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
index bbae76b..cbbb636 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Testtypedef.py
@@ -1,10 +1,7 @@
 """Look up type information for typedefs of same name at different lexical scope and check for correct display."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
index efabc4d..a40a666 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS += -finput-charset=UTF-8 -fextended-identifiers -std=c99
+CFLAGS_EXTRAS := -finput-charset=UTF-8 -fextended-identifiers -std=c99
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/Makefile
new file mode 100644
index 0000000..4c053a0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/Makefile
@@ -0,0 +1,7 @@
+# There is no guaranteed order in which the linker will order these
+# files, so we just have a lot of them to make it unlikely that we hit
+# the right one first by pure luck.
+
+CXX_SOURCES := main.cpp a.cpp b.cpp c.cpp d.cpp e.cpp f.cpp g.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/TestCPPAccelerator.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/TestCPPAccelerator.py
new file mode 100644
index 0000000..3705e95
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/TestCPPAccelerator.py
@@ -0,0 +1,31 @@
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class CPPAcceleratorTableTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIf(debug_info=no_match(["dwarf"]))
+    def test(self):
+        """Test that type lookups fail early (performance)"""
+        self.build()
+        logfile = self.getBuildArtifact('dwarf.log')
+        self.expect('log enable dwarf lookups -f' + logfile)
+        target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
+            self, 'break here', lldb.SBFileSpec('main.cpp'))
+        # Pick one from the middle of the list to have a high chance
+        # of it not being in the first file looked at.
+        self.expect('frame variable inner_d')
+
+        log = open(logfile, 'r')
+        n = 0
+        for line in log:
+            if re.findall(r'[abcdefg]\.o: FindByNameAndTag\(\)', line):
+                self.assertTrue("d.o" in line)
+                n += 1
+
+        self.assertEqual(n, 1, log)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/a.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/a.cpp
new file mode 100644
index 0000000..d9f758e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/a.cpp
@@ -0,0 +1,2 @@
+#include "source.h"
+CLASS(A)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/b.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/b.cpp
new file mode 100644
index 0000000..a0cdffa
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/b.cpp
@@ -0,0 +1,2 @@
+#include "source.h"
+CLASS(B)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/c.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/c.cpp
new file mode 100644
index 0000000..1bd7172
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/c.cpp
@@ -0,0 +1,2 @@
+#include "source.h"
+CLASS(C)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/d.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/d.cpp
new file mode 100644
index 0000000..e43c2ad
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/d.cpp
@@ -0,0 +1,2 @@
+#include "source.h"
+CLASS(D)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/e.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/e.cpp
new file mode 100644
index 0000000..a3008f7
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/e.cpp
@@ -0,0 +1,2 @@
+#include "source.h"
+CLASS(E)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/f.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/f.cpp
new file mode 100644
index 0000000..77df296
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/f.cpp
@@ -0,0 +1,2 @@
+#include "source.h"
+CLASS(F)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/g.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/g.cpp
new file mode 100644
index 0000000..e144691
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/g.cpp
@@ -0,0 +1,2 @@
+#include "source.h"
+CLASS(G)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/main.cpp
new file mode 100644
index 0000000..b7eb252
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/main.cpp
@@ -0,0 +1,28 @@
+#define CLASS(NAME)                             \
+  class NAME {                                  \
+  public:                                       \
+    struct Inner;                               \
+    Inner *i = nullptr;                         \
+  };                                            \
+NAME::Inner &getInner##NAME();
+
+CLASS(A)
+CLASS(B)
+CLASS(C)
+CLASS(D)
+CLASS(E)
+CLASS(F)
+CLASS(G)
+
+int main()
+{
+  A::Inner &inner_a = getInnerA();
+  B::Inner &inner_b = getInnerB();
+  C::Inner &inner_c = getInnerC();
+  D::Inner &inner_d = getInnerD();
+  E::Inner &inner_e = getInnerE();
+  F::Inner &inner_f = getInnerF();
+  G::Inner &inner_g = getInnerG();
+
+  return 0; // break here
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/source.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/source.h
new file mode 100644
index 0000000..214e7da
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/accelerator-table/source.h
@@ -0,0 +1,12 @@
+#define CLASS(NAME)                             \
+  class NAME {                                  \
+    public:                                     \
+    class Inner {                               \
+      int j = #NAME[0];                         \
+    };                                          \
+    Inner *i = nullptr;                         \
+  };                                            \
+                                                \
+  static NAME::Inner inner;                     \
+  static NAME obj;                              \
+  NAME::Inner &getInner##NAME() { return inner; }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/auto/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/TestCppBitfields.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/TestCppBitfields.py
new file mode 100644
index 0000000..1b362e6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/TestCppBitfields.py
@@ -0,0 +1,105 @@
+"""Show bitfields and check that they display correctly."""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class CppBitfieldsTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        # Call super's setUp().
+        TestBase.setUp(self)
+        # Find the line number to break inside main().
+        self.line = line_number('main.cpp', '// Set break point at this line.')
+
+    # BitFields exhibit crashes in record layout on Windows
+    # (http://llvm.org/pr21800)
+    @skipIfWindows
+    def test_and_run_command(self):
+        """Test 'frame variable ...' on a variable with bitfields."""
+        self.build()
+
+        lldbutil.run_to_source_breakpoint(self, '// Set break point at this line.',
+          lldb.SBFileSpec("main.cpp", False))
+
+        # The stop reason of the thread should be breakpoint.
+        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
+                    substrs=['stopped',
+                             'stop reason = breakpoint'])
+
+        # The breakpoint should have a hit count of 1.
+        self.expect("breakpoint list -f", BREAKPOINT_HIT_ONCE,
+                    substrs=[' resolved, hit count = 1'])
+
+        self.expect("expr (lba.a)", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=['unsigned int', '2'])
+        self.expect("expr (lbb.b)", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=['unsigned int', '3'])
+        self.expect("expr (lbc.c)", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=['unsigned int', '4'])
+        self.expect("expr (lbd.a)", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=['unsigned int', '5'])
+        self.expect("expr (clang_example.f.a)", VARIABLES_DISPLAYED_CORRECTLY,
+                    substrs=['uint64_t', '1'])
+
+        self.expect(
+            "frame variable --show-types lba",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(int:32)  = ',
+                '(unsigned int:20) a = 2',
+                ])
+
+        self.expect(
+            "frame variable --show-types lbb",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(unsigned int:1) a = 1',
+                '(int:31)  =',
+                '(unsigned int:20) b = 3',
+                ])
+
+        self.expect(
+            "frame variable --show-types lbc",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(int:22)  =',
+                '(unsigned int:1) a = 1',
+                '(unsigned int:1) b = 0',
+                '(unsigned int:5) c = 4',
+                '(unsigned int:1) d = 1',
+                '(int:2)  =',
+                '(unsigned int:20) e = 20',
+                ])
+
+        self.expect(
+            "frame variable --show-types lbd",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                '(char [3]) arr = "ab"',
+                '(int:32)  =',
+                '(unsigned int:20) a = 5',
+                ])
+
+        self.expect(
+            "frame variable --show-types clang_example",
+            VARIABLES_DISPLAYED_CORRECTLY,
+            substrs=[
+                   '(int:22)  =',
+                   '(uint64_t:1) a = 1',
+                   '(uint64_t:1) b = 0',
+                   '(uint64_t:1) c = 1',
+                   '(uint64_t:1) d = 0',
+                   '(uint64_t:1) e = 1',
+                   '(uint64_t:1) f = 0',
+                   '(uint64_t:1) g = 1',
+                   '(uint64_t:1) h = 0',
+                   '(uint64_t:1) i = 1',
+                   '(uint64_t:1) j = 0',
+                   '(uint64_t:1) k = 1',
+                ])
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/main.cpp
new file mode 100644
index 0000000..e43bf8c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bitfields/main.cpp
@@ -0,0 +1,81 @@
+#include <stdint.h>
+
+int main(int argc, char const *argv[]) {
+  struct LargeBitsA {
+    unsigned int : 30, a : 20;
+  } lba;
+
+  struct LargeBitsB {
+    unsigned int a : 1, : 11, : 12, b : 20;
+  } lbb;
+
+  struct LargeBitsC {
+    unsigned int : 13, : 9, a : 1, b : 1, c : 5, d : 1, e : 20;
+  } lbc;
+
+  struct LargeBitsD {
+    char arr[3];
+    unsigned int : 30, a : 20;
+  } lbd;
+
+  // This case came up when debugging clang and models RecordDeclBits
+  struct BitExampleFromClangDeclContext {
+    class fields {
+      uint64_t : 13;
+      uint64_t : 9;
+
+      uint64_t a: 1;
+      uint64_t b: 1;
+      uint64_t c: 1;
+      uint64_t d: 1;
+      uint64_t e: 1;
+      uint64_t f: 1;
+      uint64_t g: 1;
+      uint64_t h: 1;
+      uint64_t i: 1;
+      uint64_t j: 1;
+      uint64_t k: 1;
+
+      // In order to reproduce the crash for this case we need the
+      // members of fields to stay private :-(
+      friend struct BitExampleFromClangDeclContext;
+    };
+
+    union {
+      struct fields f;
+    };
+
+    BitExampleFromClangDeclContext() {
+  f.a = 1;
+  f.b = 0;
+  f.c = 1;
+  f.d = 0;
+  f.e = 1;
+  f.f = 0;
+  f.g = 1;
+  f.h = 0;
+  f.i = 1;
+  f.j = 0;
+  f.k = 1;
+    } 
+  } clang_example;
+
+  lba.a = 2;
+
+  lbb.a = 1;
+  lbb.b = 3;
+
+  lbc.a = 1;
+  lbc.b = 0;
+  lbc.c = 4;
+  lbc.d = 1;
+  lbc.e = 20;
+
+  lbd.arr[0] = 'a';
+  lbd.arr[1] = 'b';
+  lbd.arr[2] = '\0';
+  lbd.a = 5;
+
+
+  return 0; // Set break point at this line.
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/bool/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/Makefile
index 1d1f38f..6afea39 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := nested.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
index a120510..32c9748 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint-commands/TestCPPBreakpointCommands.py
@@ -2,11 +2,8 @@
 Test lldb breakpoint command for CPP methods & functions in a namespace.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile
new file mode 100644
index 0000000..dc53622
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/Makefile
@@ -0,0 +1,4 @@
+CXX_SOURCES = main.cpp a.cpp
+CFLAGS_EXTRAS = $(MANDATORY_CXXMODULE_BUILD_CFLAGS)
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/TestBreakpointInMemberFuncWNonPrimitiveParams.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/TestBreakpointInMemberFuncWNonPrimitiveParams.py
new file mode 100644
index 0000000..1e46f73
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/TestBreakpointInMemberFuncWNonPrimitiveParams.py
@@ -0,0 +1,26 @@
+"""
+This is a regression test for an assert that happens while setting a breakpoint.
+The root cause of the assert was attempting to add a ParmVarDecl to a CXXRecordDecl
+when it should have been added to a CXXMethodDecl.
+
+We can reproduce with a module build and setting a breakpoint in a member function
+of a class with a non-primitive type as a parameter.
+"""
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestBreakpointInMemberFuncWNonPrimitiveParams(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @add_test_categories(["gmodules"])
+    def test_breakpint_in_member_func_w_non_primitie_params(self):
+        self.build()
+
+        (self.target, self.process, _, bkpt) = lldbutil.run_to_source_breakpoint(self, '// break here',
+                lldb.SBFileSpec("main.cpp", False))
+
+        self.runCmd("b a.cpp:11");
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.cpp
new file mode 100644
index 0000000..64e142c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.cpp
@@ -0,0 +1,14 @@
+#include "a.h"
+
+bool A::b(int x) {
+  if (x)
+    return true;
+
+  return false;
+}
+
+bool B::member_func_a(A a) {
+  return a.b(10); // We will try and add a breakpoint here which
+                  // trigger an assert since we will attempt to
+                  // to add ParamVarDecl a to CXXRecordDecl A
+};
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.h
new file mode 100644
index 0000000..cb31d3e
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/a.h
@@ -0,0 +1,7 @@
+struct A {
+  bool b(int x);
+};
+
+struct B {
+  bool member_func_a(A a);
+};
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/main.cpp
new file mode 100644
index 0000000..779ef04
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/main.cpp
@@ -0,0 +1,15 @@
+#include "a.h"
+#include <cstdio>
+
+bool foo() {
+  A a1;
+  B b1;
+
+  return b1.member_func_a(a1); // break here
+}
+
+int main() {
+  int x = 0;
+
+  return foo();
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/module.modulemap b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/module.modulemap
new file mode 100644
index 0000000..bbd9d67
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/breakpoint_in_member_func_w_non_primitive_params/module.modulemap
@@ -0,0 +1,3 @@
+module A {
+  header "a.h"
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/call-function/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/chained-calls/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/Makefile
index 932046f..64fd6ef 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 CFLAGS :=-g -O0 -std=c++11
 
 clean: OBJECTS+=$(wildcard main.d.*)
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
index e37e76a..986d9e5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char1632_t/TestChar1632T.py
@@ -3,11 +3,8 @@
 Test that the C++11 support for char16_t and char32_t works correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/Makefile
new file mode 100644
index 0000000..e7c9938
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/Makefile
@@ -0,0 +1,4 @@
+CXX_SOURCES := main.cpp
+CXXFLAGS_EXTRAS := -std=c++2a -fchar8_t
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/TestCxxChar8_t.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/TestCxxChar8_t.py
new file mode 100644
index 0000000..e7f2c1a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/TestCxxChar8_t.py
@@ -0,0 +1,39 @@
+# coding=utf8
+"""
+Test that C++ supports char8_t correctly.
+"""
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+
+
+class CxxChar8_tTestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipIf(compiler="clang", compiler_version=['<', '7.0'])
+    def test(self):
+        """Test that C++ supports char8_t correctly."""
+        self.build()
+        exe = self.getBuildArtifact("a.out")
+
+        # Create a target by the debugger.
+        target = self.dbg.CreateTarget(exe)
+        self.assertTrue(target, VALID_TARGET)
+
+        # FIXME: We should be able to test this with target variable, but the
+        # data formatter output is broken.
+        lldbutil.run_break_set_by_symbol(self, 'main')
+        self.runCmd("run", RUN_SUCCEEDED)
+
+        self.expect(
+            "frame variable a", substrs=["(char8_t)", "0x61 u8'a'"])
+
+        self.expect(
+            "frame variable ab", substrs=['(const char8_t *)' , 'u8"你好"'])
+
+        self.expect(
+            "frame variable abc", substrs=['(char8_t [9])', 'u8"你好"'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/main.cpp
new file mode 100644
index 0000000..b73ba0c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/char8_t/main.cpp
@@ -0,0 +1,5 @@
+char8_t a  = u8'a';
+const char8_t* ab = u8"你好";
+char8_t abc[9] = u8"你好";
+
+int main (int argc, char const *argv[]) { return 0; }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/Makefile
deleted file mode 100644
index 99bfa7e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class-template-parameter-pack/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py
index eead3c5..7c019e0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_static/TestStaticVariables.py
@@ -2,11 +2,8 @@
 Test display and Python APIs on file and class static variables.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
index 759da71..45d64431 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypes.py
@@ -1,10 +1,8 @@
 """Test breakpoint on a class constructor; and variable list the this object."""
 
-from __future__ import print_function
 
 
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py
index c838178..ad187d0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/class_types/TestClassTypesDisassembly.py
@@ -6,7 +6,6 @@
 
 
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
deleted file mode 100644
index 52a92c0..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
-include $(LEVEL)/Makefile.rules
-
-cleanup:
-	rm -f Makefile *.d
-
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/diamond/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py
index c0afb3c..546fd11 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value-same-basename/TestDynamicValueSameBase.py
@@ -3,12 +3,8 @@
 dynamic value calculator doesn't confuse them
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
@@ -29,10 +25,6 @@
         self.main_source_file = lldb.SBFileSpec("main.cpp")
         self.sample_test()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def sample_test(self):
         (target, process, thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
                                    "Break here to get started", self.main_source_file)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/Makefile
index 8770b23..2bba8e7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := pass-to-base.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py
index 497f17f..609dd60 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestCppValueCast.py
@@ -6,9 +6,6 @@
 
 
 import unittest2
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py
index acda426..c3d7dfb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/dynamic-value/TestDynamicValue.py
@@ -2,12 +2,8 @@
 Use lldb Python API to test dynamic values in C++
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
index 0e0f5d1..a02c72a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/Makefile
@@ -1,10 +1,9 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 
 clean: OBJECTS+=$(wildcard main.d.*)
 
-include $(LEVEL)/Makefile.rules
 
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
index d091387..c58f700 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/TestCPP11EnumTypes.py
@@ -1,10 +1,7 @@
 """Look up enum type information and check for correct display."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -21,8 +18,8 @@
         """Test C++11 enumeration class types as int8_t types."""
         self.build(
             dictionary={
-                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int8_t"'})
-        self.image_lookup_for_enum_type()
+                'CFLAGS_EXTRAS': '"-DSIGNED_ENUM_CLASS_TYPE=int8_t"'})
+        self.image_lookup_for_enum_type(True)
 
     @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
     @skipIf(dwarf_version=['<', '4'])
@@ -30,8 +27,8 @@
         """Test C++11 enumeration class types as int16_t types."""
         self.build(
             dictionary={
-                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int16_t"'})
-        self.image_lookup_for_enum_type()
+                'CFLAGS_EXTRAS': '"-DSIGNED_ENUM_CLASS_TYPE=int16_t"'})
+        self.image_lookup_for_enum_type(True)
 
     @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
     @skipIf(dwarf_version=['<', '4'])
@@ -39,8 +36,8 @@
         """Test C++11 enumeration class types as int32_t types."""
         self.build(
             dictionary={
-                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int32_t"'})
-        self.image_lookup_for_enum_type()
+                'CFLAGS_EXTRAS': '"-DSIGNED_ENUM_CLASS_TYPE=int32_t"'})
+        self.image_lookup_for_enum_type(True)
 
     @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
     @skipIf(dwarf_version=['<', '4'])
@@ -48,8 +45,8 @@
         """Test C++11 enumeration class types as int64_t types."""
         self.build(
             dictionary={
-                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=int64_t"'})
-        self.image_lookup_for_enum_type()
+                'CFLAGS_EXTRAS': '"-DSIGNED_ENUM_CLASS_TYPE=int64_t"'})
+        self.image_lookup_for_enum_type(True)
 
     @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
     @skipIf(dwarf_version=['<', '4'])
@@ -57,8 +54,8 @@
         """Test C++11 enumeration class types as uint8_t types."""
         self.build(
             dictionary={
-                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint8_t"'})
-        self.image_lookup_for_enum_type()
+                'CFLAGS_EXTRAS': '"-DUNSIGNED_ENUM_CLASS_TYPE=uint8_t"'})
+        self.image_lookup_for_enum_type(False)
 
     @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
     @skipIf(dwarf_version=['<', '4'])
@@ -66,8 +63,8 @@
         """Test C++11 enumeration class types as uint16_t types."""
         self.build(
             dictionary={
-                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint16_t"'})
-        self.image_lookup_for_enum_type()
+                'CFLAGS_EXTRAS': '"-DUNSIGNED_ENUM_CLASS_TYPE=uint16_t"'})
+        self.image_lookup_for_enum_type(False)
 
     @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
     @skipIf(dwarf_version=['<', '4'])
@@ -75,8 +72,8 @@
         """Test C++11 enumeration class types as uint32_t types."""
         self.build(
             dictionary={
-                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint32_t"'})
-        self.image_lookup_for_enum_type()
+                'CFLAGS_EXTRAS': '"-DUNSIGNED_ENUM_CLASS_TYPE=uint32_t"'})
+        self.image_lookup_for_enum_type(False)
 
     @expectedFailureAll(oslist=['freebsd'], bugnumber='llvm.org/pr36527')
     @skipIf(dwarf_version=['<', '4'])
@@ -84,8 +81,8 @@
         """Test C++11 enumeration class types as uint64_t types."""
         self.build(
             dictionary={
-                'CFLAGS_EXTRAS': '"-DTEST_BLOCK_CAPTURED_VARS=uint64_t"'})
-        self.image_lookup_for_enum_type()
+                'CFLAGS_EXTRAS': '"-DUNSIGNED_ENUM_CLASS_TYPE=uint64_t"'})
+        self.image_lookup_for_enum_type(False)
 
     def setUp(self):
         # Call super's setUp().
@@ -93,7 +90,7 @@
         # Find the line number to break inside main().
         self.line = line_number('main.cpp', '// Set break point at this line.')
 
-    def image_lookup_for_enum_type(self):
+    def image_lookup_for_enum_type(self, is_signed):
         """Test C++11 enumeration class types."""
         exe = self.getBuildArtifact("a.out")
         self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
@@ -127,16 +124,28 @@
                              'kNumDays',
                              '}'])
 
-        enum_values = ['-4',
-                       'Monday',
-                       'Tuesday',
-                       'Wednesday',
-                       'Thursday',
-                       'Friday',
-                       'Saturday',
-                       'Sunday',
-                       'kNumDays',
-                       '5']
+        if is_signed:
+            enum_values = ['-4',
+                           'Monday',
+                           'Tuesday',
+                           'Wednesday',
+                           'Thursday',
+                           'Friday',
+                           'Saturday',
+                           'Sunday',
+                           'kNumDays',
+                           '5']
+        else:
+            enum_values = ['199',
+                           'Monday',
+                           'Tuesday',
+                           'Wednesday',
+                           'Thursday',
+                           'Friday',
+                           'Saturday',
+                           'Sunday',
+                           'kNumDays',
+                           '208']
 
         bkpt = self.target().FindBreakpointByID(bkpt_id)
         for enum_value in enum_values:
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/main.cpp
index 31d130cc..e00fc2d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/enum_types/main.cpp
@@ -11,7 +11,8 @@
 
 int main (int argc, char const *argv[])
 {
-    typedef int16_t enum_integer_t;
+#ifdef SIGNED_ENUM_CLASS_TYPE
+    typedef SIGNED_ENUM_CLASS_TYPE enum_integer_t;
     enum class DayType : enum_integer_t {
         Monday = -3,
         Tuesday,
@@ -23,10 +24,25 @@
         kNumDays
     };
     enum_integer_t day_value;
+#else
+    typedef UNSIGNED_ENUM_CLASS_TYPE enum_integer_t;
+    enum class DayType : enum_integer_t {
+        Monday = 200,
+        Tuesday,
+        Wednesday,
+        Thursday,
+        Friday,
+        Saturday,
+        Sunday,
+        kNumDays
+    };
+    enum_integer_t day_value;
+#endif
+
     for (day_value = (enum_integer_t)DayType::Monday - 1; day_value <= (enum_integer_t)DayType::kNumDays + 1; ++day_value)
     {
         DayType day = (DayType)day_value;
         printf("day as int is %i\n", (int)day); // Set break point at this line.
     }
-    return 0;
+    return 0; // Break here for char tests
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/Makefile
index a6bd846..edb53da 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := exceptions.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
index bbe34e7..e888958 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/exceptions/TestCPPExceptionBreakpoints.py
@@ -2,11 +2,8 @@
 Test lldb exception breakpoint command for CPP.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile
deleted file mode 100644
index 99bfa7e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/frame-var-anon-unions/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/Makefile
deleted file mode 100644
index 99bfa7e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/function-template-parameter-pack/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/Makefile
deleted file mode 100644
index 99bfa7e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/function_refs/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_operators/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/TestCPPGlobalVariables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/TestCPPGlobalVariables.py
index 5e240b8..48702479 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/TestCPPGlobalVariables.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/global_variables/TestCPPGlobalVariables.py
@@ -1,6 +1,5 @@
 """Test that C++ global variables can be inspected by name and also their mangled name."""
 
-from __future__ import print_function
 
 
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/Makefile
deleted file mode 100644
index 0497d78..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules-templates/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES = main.cpp
-# CFLAGS_EXTRAS += $(MODULE_DEBUG_INFO_FLAGS)
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
index da6f39a..a98dca6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/gmodules/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 PCH_CXX_SOURCE = pch.h
 CXX_SOURCES = main.cpp
-CFLAGS_EXTRAS += $(MODULE_DEBUG_INFO_FLAGS)
+CFLAGS_EXTRAS := $(MODULE_DEBUG_INFO_FLAGS)
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile
index 2ce96e9..769920c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/incomplete-types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES = main.cpp length.cpp a.cpp
 
 CFLAGS_LIMIT = -c $(CXXFLAGS)
@@ -32,4 +30,4 @@
 
 clean: OBJECTS += limit nolimit length_limit.o length_nolimit.o length_limit.dwo length_nolimit.dwo
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/Makefile
index 8f67abd..055e318 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := inlines.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py
index f7b92e8..5f77d8f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/inlines/TestInlines.py
@@ -1,9 +1,6 @@
 """Test variable lookup when stopped in inline functions."""
 
-from __future__ import print_function
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
index b9a3d3f..ba7e015 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/limit-debug-info/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 CXX_SOURCES = main.cpp derived.cpp base.cpp
 
-CFLAGS_EXTRAS += $(LIMIT_DEBUG_INFO_FLAGS)
+CFLAGS_EXTRAS := $(LIMIT_DEBUG_INFO_FLAGS)
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/llvm-style/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/llvm-style/Makefile
deleted file mode 100644
index aae93a2..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/llvm-style/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
\ No newline at end of file
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
index 35eb63f..82f96b6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES = main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
index c07acf9..a0dcbf0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
@@ -1,4 +1,5 @@
 import lldb
+from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
index 2b8f23b..3dff43b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/Makefile
@@ -1,5 +1,4 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(BUILDDIR)/include
+CXXFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(BUILDDIR)/include
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py
index cee551d..e7f98c6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py
@@ -1,6 +1,5 @@
 """Test that importing modules in C++ works as expected."""
 
-from __future__ import print_function
 
 import unittest2
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/Makefile
index 7dd5eb4..638974f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp ns.cpp ns2.cpp ns3.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
index 593911b..2221755 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespace.py
@@ -2,11 +2,8 @@
 Test the printing of anonymous and named namespace variables.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -48,7 +45,6 @@
                 "make sure breakpoint locations are correct for 'func' with eFunctionNameTypeAuto")
 
     @expectedFailureAll(bugnumber="llvm.org/pr28548", compiler="gcc")
-    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24489")
     def test_breakpoints_func_full(self):
         """Test that we can set breakpoints correctly by fullname to find all functions whose fully qualified name is "func"
            (no namespaces)."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
index 9c65966..5526a14 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace/TestNamespaceLookup.py
@@ -2,11 +2,8 @@
 Test the printing of anonymous and named namespace variables.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile
deleted file mode 100644
index 99bfa7e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_conflicts/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile
index 9e52bac..fc9165f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile
@@ -1,19 +1,15 @@
-LEVEL := ../../../make
-
-LD_EXTRAS := -L. -l$(LIB_PREFIX)a -l$(LIB_PREFIX)b
+LD_EXTRAS := -L. -la -lb
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+a.out: liba libb
 
-.PHONY:
-a.out: lib_a lib_b
+include Makefile.rules
 
-lib_%:
-	$(MAKE) VPATH=$(VPATH) -f $(SRCDIR)/$*.mk
+liba:
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_NAME=a DYLIB_CXX_SOURCES=a.cpp
 
-hidden_lib_d:
-	$(MAKE) -C hidden
+libb:
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_NAME=b DYLIB_CXX_SOURCES=b.cpp
 
-clean::
-	$(MAKE) -f $(SRCDIR)/a.mk clean
-	$(MAKE) -f $(SRCDIR)/b.mk clean
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
index ecca75b..e96a9fb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/TestNamespaceDefinitions.py
@@ -1,6 +1,5 @@
 """Test that forward declarations don't cause bogus conflicts in namespaced types"""
 
-from __future__ import print_function
 
 
 import unittest2
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
deleted file mode 100644
index e535708..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL := ../../../make
-
-DYLIB_NAME := a
-DYLIB_CXX_SOURCES := a.cpp
-DYLIB_ONLY := YES
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
deleted file mode 100644
index 54a1d8d..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL := ../../../make
-
-DYLIB_NAME := b
-DYLIB_CXX_SOURCES := b.cpp
-DYLIB_ONLY := YES
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/Makefile
new file mode 100644
index 0000000..020dce7
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp other.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/TestNestedClassWithParentInAnotherCU.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/TestNestedClassWithParentInAnotherCU.py
new file mode 100644
index 0000000..5b590d6
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/TestNestedClassWithParentInAnotherCU.py
@@ -0,0 +1,29 @@
+"""
+Test that the expression evaluator can access members of nested classes even if
+the parents of the nested classes were imported from another compilation unit.
+"""
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestNestedClassWithParentInAnotherCU(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    def test_nested_class_with_parent_in_another_cu(self):
+        self.main_source_file = lldb.SBFileSpec("main.cpp")
+        self.build()
+        (_, _, thread, _) = lldbutil.run_to_source_breakpoint(self, "// break here", self.main_source_file)
+        frame = thread.GetSelectedFrame()
+        # Parse the DIEs of the parent classes and the nested classes from
+        # other.cpp's CU.
+        warmup_result = frame.EvaluateExpression("b")
+        self.assertTrue(warmup_result.IsValid())
+        # Inspect fields of the nested classes. This will reuse the types that
+        # were parsed during the evaluation above. By accessing a chain of
+        # fields, we try to verify that all the DIEs, reused types and
+        # declaration contexts were wired properly into lldb's parser's state.
+        expr_result = frame.EvaluateExpression("a.y.oY_inner.oX_inner")
+        self.assertTrue(expr_result.IsValid())
+        self.assertEqual(expr_result.GetValue(), "42")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/main.cpp
new file mode 100644
index 0000000..8a6e6ff
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/main.cpp
@@ -0,0 +1,22 @@
+#include "shared.h"
+
+struct WrapperA {
+  OuterY::Inner<unsigned int> y;
+};
+
+int main() {
+  // WrapperA refers to the Inner and Outer class DIEs from this CU.
+  WrapperA a;
+  // WrapperB refers to the Inner and Outer DIEs from the other.cpp CU.
+  // It is important that WrapperB is only forward-declared in shared.h.
+  WrapperB* b = foo();
+
+  // Evaluating 'b' here will parse other.cpp's DIEs for all
+  // the Inner and Outer classes from shared.h.
+  //
+  // Evaluating 'a' here will find and reuse the already-parsed
+  // versions of the Inner and Outer classes. In the associated test
+  // we make sure that we can still resolve all the types properly
+  // by evaluating 'a.y.oY_inner.oX_inner'.
+  return 0;  // break here
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/other.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/other.cpp
new file mode 100644
index 0000000..71a9579
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/other.cpp
@@ -0,0 +1,10 @@
+#include "shared.h"
+
+struct WrapperB {
+  OuterY y;
+  OuterX x;
+};
+
+WrapperB* foo() {
+  return new WrapperB();
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/shared.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/shared.h
new file mode 100644
index 0000000..627f49a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nested-class-other-compilation-unit/shared.h
@@ -0,0 +1,17 @@
+struct OuterX {
+  template<typename T>
+  struct Inner {
+    int oX_inner = 42;
+  };
+};
+
+struct OuterY {
+  template<typename T>
+  struct Inner {
+    typename OuterX::Inner<T> oY_inner;
+  };
+};
+
+struct WrapperB;
+
+WrapperB* foo();
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/nsimport/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/TestOffsetofCpp.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/TestOffsetofCpp.py
new file mode 100644
index 0000000..cdfbaae
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/TestOffsetofCpp.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(), [decorators.no_debug_info_test])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/main.cpp
new file mode 100644
index 0000000..ab379f8
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/offsetof/main.cpp
@@ -0,0 +1,25 @@
+#include <cstdint>
+
+class Base {
+  int32_t a;
+};
+class Class1 : Base {
+public:
+  int32_t b;
+};
+
+class EmptyBase {
+};
+class Class2 : EmptyBase {
+public:
+  int32_t b;
+};
+
+int main(int argc, char **argv) {
+  Class1 c1;
+  Class2 c2;
+  //% self.expect("expr offsetof(Base, a)", substrs=["= 0"])
+  //% self.expect("expr offsetof(Class1, b)", substrs=["= 4"])
+  //% self.expect("expr offsetof(Class2, b)", substrs=["= 0"])
+  return c1.b + c2.b;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/Makefile
index bd8116b..80b3ee0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operator-overload/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
 CXX_SOURCES = a.cpp b.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 a.o: a.cpp
 	$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/TestCppOperators.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/TestCppOperators.py
new file mode 100644
index 0000000..c8308c1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/TestCppOperators.py
@@ -0,0 +1,4 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp
new file mode 100644
index 0000000..892d0ba
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/operators/main.cpp
@@ -0,0 +1,181 @@
+#include <cstdlib>
+
+int side_effect = 0;
+
+struct B { int dummy = 2324; };
+struct C {
+  void *operator new(size_t size) { C* r = ::new C; r->custom_new = true; return r; }
+  void *operator new[](size_t size) { C* r = static_cast<C*>(std::malloc(size)); r->custom_new = true; return r; }
+  void operator delete(void *p) { std::free(p); side_effect = 1; }
+  void operator delete[](void *p) { std::free(p); side_effect = 2; }
+
+  bool custom_new = false;
+  B b;
+  B* operator->() { return &b; }
+  int operator->*(int) { return 2; }
+  int operator+(int) { return 44; }
+  int operator+=(int) { return 42; }
+  int operator++(int) { return 123; }
+  int operator++() { return 1234; }
+  int operator-(int) { return 34; }
+  int operator-=(int) { return 32; }
+  int operator--() { return 321; }
+  int operator--(int) { return 4321; }
+
+  int operator*(int) { return 51; }
+  int operator*=(int) { return 52; }
+  int operator%(int) { return 53; }
+  int operator%=(int) { return 54; }
+  int operator/(int) { return 55; }
+  int operator/=(int) { return 56; }
+  int operator^(int) { return 57; }
+  int operator^=(int) { return 58; }
+
+  int operator|(int) { return 61; }
+  int operator|=(int) { return 62; }
+  int operator||(int) { return 63; }
+  int operator&(int) { return 64; }
+  int operator&=(int) { return 65; }
+  int operator&&(int) { return 66; }
+
+  int operator~() { return 71; }
+  int operator!() { return 72; }
+  int operator!=(int) { return 73; }
+  int operator=(int) { return 74; }
+  int operator==(int) { return 75; }
+
+  int operator<(int) { return 81; }
+  int operator<<(int) { return 82; }
+  int operator<=(int) { return 83; }
+  int operator<<=(int) { return 84; }
+  int operator>(int) { return 85; }
+  int operator>>(int) { return 86; }
+  int operator>=(int) { return 87; }
+  int operator>>=(int) { return 88; }
+
+  int operator,(int) { return 2012; }
+  int operator&() { return 2013; }
+
+  int operator()(int) { return 91; }
+  int operator[](int) { return 92; }
+
+  operator int() { return 11; }
+  operator long() { return 12; }
+
+  // Make sure this doesn't collide with
+  // the real operator int.
+  int operatorint() { return 13; }
+  int operatornew() { return 14; }
+};
+
+int main(int argc, char **argv) {
+  C c;
+  int result = c->dummy;
+  result = c->*4;
+  result += c+1;
+  result += c+=1;
+  result += c++;
+  result += ++c;
+  result += c-1;
+  result += c-=1;
+  result += c--;
+  result += --c;
+
+  result += c * 4;
+  result += c *= 4;
+  result += c % 4;
+  result += c %= 4;
+  result += c / 4;
+  result += c /= 4;
+  result += c ^ 4;
+  result += c ^= 4;
+
+  result += c | 4;
+  result += c |= 4;
+  result += c || 4;
+  result += c & 4;
+  result += c &= 4;
+  result += c && 4;
+
+  result += ~c;
+  result += !c;
+  result += c!=1;
+  result += c=2;
+  result += c==2;
+
+  result += c<2;
+  result += c<<2;
+  result += c<=2;
+  result += c<<=2;
+  result += c>2;
+  result += c>>2;
+  result += c>=2;
+  result += c>>=2;
+
+  result += (c , 2);
+  result += &c;
+
+  result += c(1);
+  result += c[1];
+
+  result += static_cast<int>(c);
+  result += static_cast<long>(c);
+  result += c.operatorint();
+  result += c.operatornew();
+
+  C *c2 = new C();
+  C *c3 = new C[3];
+
+  //% self.expect("expr c->dummy", endstr=" 2324\n")
+  //% self.expect("expr c->*2", endstr=" 2\n")
+  //% self.expect("expr c + 44", endstr=" 44\n")
+  //% self.expect("expr c += 42", endstr=" 42\n")
+  //% self.expect("expr c++", endstr=" 123\n")
+  //% self.expect("expr ++c", endstr=" 1234\n")
+  //% self.expect("expr c - 34", endstr=" 34\n")
+  //% self.expect("expr c -= 32", endstr=" 32\n")
+  //% self.expect("expr c--", endstr=" 4321\n")
+  //% self.expect("expr --c", endstr=" 321\n")
+  //% self.expect("expr c * 3", endstr=" 51\n")
+  //% self.expect("expr c *= 3", endstr=" 52\n")
+  //% self.expect("expr c % 3", endstr=" 53\n")
+  //% self.expect("expr c %= 3", endstr=" 54\n")
+  //% self.expect("expr c / 3", endstr=" 55\n")
+  //% self.expect("expr c /= 3", endstr=" 56\n")
+  //% self.expect("expr c ^ 3", endstr=" 57\n")
+  //% self.expect("expr c ^= 3", endstr=" 58\n")
+  //% self.expect("expr c | 3", endstr=" 61\n")
+  //% self.expect("expr c |= 3", endstr=" 62\n")
+  //% self.expect("expr c || 3", endstr=" 63\n")
+  //% self.expect("expr c & 3", endstr=" 64\n")
+  //% self.expect("expr c &= 3", endstr=" 65\n")
+  //% self.expect("expr c && 3", endstr=" 66\n")
+  //% self.expect("expr ~c", endstr=" 71\n")
+  //% self.expect("expr !c", endstr=" 72\n")
+  //% self.expect("expr c!=1", endstr=" 73\n")
+  //% self.expect("expr c=1", endstr=" 74\n")
+  //% self.expect("expr c==1", endstr=" 75\n")
+  //% self.expect("expr c<1", endstr=" 81\n")
+  //% self.expect("expr c<<1", endstr=" 82\n")
+  //% self.expect("expr c<=1", endstr=" 83\n")
+  //% self.expect("expr c<<=1", endstr=" 84\n")
+  //% self.expect("expr c>1", endstr=" 85\n")
+  //% self.expect("expr c>>1", endstr=" 86\n")
+  //% self.expect("expr c>=1", endstr=" 87\n")
+  //% self.expect("expr c>>=1", endstr=" 88\n")
+  //% self.expect("expr c,1", endstr=" 2012\n")
+  //% self.expect("expr &c", endstr=" 2013\n")
+  //% self.expect("expr c(1)", endstr=" 91\n")
+  //% self.expect("expr c[1]", endstr=" 92\n")
+  //% self.expect("expr static_cast<int>(c)", endstr=" 11\n")
+  //% self.expect("expr static_cast<long>(c)", endstr=" 12\n")
+  //% self.expect("expr c.operatorint()", endstr=" 13\n")
+  //% self.expect("expr c.operatornew()", endstr=" 14\n")
+  //% self.expect("expr (new C)->custom_new", endstr=" true\n")
+  //% self.expect("expr (new struct C[1])->custom_new", endstr=" true\n")
+  //% self.expect("expr delete c2; side_effect", endstr=" = 1\n")
+  //% self.expect("expr delete[] c3; side_effect", endstr=" = 2\n")
+  delete c2;
+  delete[] c3;
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/Makefile
index a8d5c4e..1185ed0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/overloaded-functions/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp static-a.cpp static-b.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py
index 3dfe4f2..10e400f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/printf/TestPrintf.py
@@ -1,7 +1,8 @@
-from lldbsuite.test import lldbinline
+from lldbsuite.test import lldbinline, lldbplatformutil
 from lldbsuite.test import decorators
 
 lldbinline.MakeInlineTest(
     __file__, globals(), [
         decorators.expectedFailureAll(
-            bugnumber="llvm.org/PR36715")])
+            bugnumber="llvm.org/PR36715",
+            oslist=lldbplatformutil.getDarwinOSTriples()+['windows'])])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
index 3a1d8a5..e891bb2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/rvalue-references/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 
-include $(LEVEL)/Makefile.rules
\ No newline at end of file
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/scope/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
index 2b67bb4..f61cd64 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/signed_types/TestSignedTypes.py
@@ -2,12 +2,8 @@
 Test that variables with signed types display correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py
index b8c777f..4e02ebe 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_members/TestCPPStaticMembers.py
@@ -2,7 +2,6 @@
 Tests that C++ member and static variables have correct layout and scope.
 """
 
-from __future__ import print_function
 
 
 import unittest2
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/static_methods/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
index a42bb08..b016f00 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
+CXXFLAGS_EXTRAS := -std=c++11
 USE_LIBCPP := 1
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/TestStdFunctionStepIntoCallable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/TestStdFunctionStepIntoCallable.py
index abd35ac..d667321 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/TestStdFunctionStepIntoCallable.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/TestStdFunctionStepIntoCallable.py
@@ -2,11 +2,9 @@
 Test stepping into std::function
 """
 
-from __future__ import print_function
 
 
 import lldb
-import sys
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -60,10 +58,12 @@
         self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec().GetFilename(), self.main_source) ;
         process.Continue()
 
-        thread.StepInto()
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.source_bar_operator_line ) ;
-        self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec().GetFilename(), self.main_source) ;
-        process.Continue()
+        # TODO reenable this case when std::function formatter supports
+        # general callable object case.
+        #thread.StepInto()
+        #self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.source_bar_operator_line ) ;
+        #self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetFileSpec().GetFilename(), self.main_source) ;
+        #process.Continue()
 
         thread.StepInto()
         self.assertEqual( thread.GetFrameAtIndex(0).GetLineEntry().GetLine(), self.source_bar_add_num_line ) ;
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/main.cpp
index a85e77d..ebbb05e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/std-function-step-into-callable/main.cpp
@@ -32,7 +32,9 @@
   return f_mem(bar1) +     // Set break point at this line.
          f1(acc,acc) +     // Source main invoking f1
          f2(acc) +         // Set break point at this line.
-         f3(acc+1,acc+2) + // Set break point at this line. 
-         f4() +            // Set break point at this line. 
+         f3(acc+1,acc+2) + // Set break point at this line.
+         // TODO reenable this case when std::function formatter supports
+         // general callable object case.
+         //f4() +            // Set break point at this line.
          f5(bar1, 10);     // Set break point at this line.
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile
index fe27980..a4b03ae 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 CFLAGS := -g -O0
 
 clean: OBJECTS+=$(wildcard main.d.*)
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py
index d11004e..341b205 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestSTL.py
@@ -2,12 +2,9 @@
 Test some expressions involving STL data types.
 """
 
-from __future__ import print_function
 
 
 import unittest2
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py
index 23e94e9..49aa16c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py
@@ -7,11 +7,10 @@
 
 import unittest2
 import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
-
+from lldbsuite.test.decorators import *
 
 class StdCXXDisassembleTestCase(TestBase):
 
@@ -23,11 +22,8 @@
         # Find the line number to break inside main().
         self.line = line_number('main.cpp', '// Set break point at this line.')
 
-    # rdar://problem/8504895
-    # Crash while doing 'disassemble -n "-[NSNumber descriptionWithLocale:]"
-    @unittest2.skipIf(
-        TestBase.skipLongRunningTest(),
-        "Skip this long running test")
+    @skipIfWindows
+    @expectedFailureNetBSD
     def test_stdcxx_disasm(self):
         """Do 'disassemble' on each and every 'Code' symbol entry from the std c++ lib."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/Makefile
deleted file mode 100644
index 99bfa7e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/symbols/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-LEVEL = ../../../make
-CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/template-function/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/template/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/template/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/template/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/template/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/this/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/this/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/this/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/this/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/Makefile
new file mode 100644
index 0000000..3d0b98f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/Makefile
@@ -0,0 +1,2 @@
+CXX_SOURCES := main.cpp
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/TestThreadLocal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/TestThreadLocal.py
new file mode 100644
index 0000000..5152c00
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/TestThreadLocal.py
@@ -0,0 +1,6 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(__file__, globals(),
+                          lldbinline.expectedFailureAll(oslist=[
+                              "windows", "linux", "netbsd"]))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/main.cpp
new file mode 100644
index 0000000..1855b7c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/thread_local/main.cpp
@@ -0,0 +1,17 @@
+int storage = 45;
+thread_local int tl_global_int = 123;
+thread_local int *tl_global_ptr = &storage;
+
+int main(int argc, char **argv) {
+  //% self.expect("expr tl_local_int", error=True, substrs=["couldn't get the value of variable tl_local_int"])
+  //% self.expect("expr *tl_local_ptr", error=True, substrs=["couldn't get the value of variable tl_local_ptr"])
+  thread_local int tl_local_int = 321;
+  thread_local int *tl_local_ptr = nullptr;
+  tl_local_ptr = &tl_local_int;
+  tl_local_int++;
+  //% self.expect("expr tl_local_int + 1", substrs=["int", "= 323"])
+  //% self.expect("expr *tl_local_ptr + 2", substrs=["int", "= 324"])
+  //% self.expect("expr tl_global_int", substrs=["int", "= 123"])
+  //% self.expect("expr *tl_global_ptr", substrs=["int", "= 45"])
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py
index 9c69da2..2a8a78a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py
@@ -2,12 +2,8 @@
 Test that we work properly with classes with the trivial_abi attribute
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -21,6 +17,8 @@
 
     @skipUnlessSupportedTypeAttribute("trivial_abi")
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr37995")
+    @expectedFailureAll(archs=["aarch64"], oslist=["linux"],
+                        bugnumber="llvm.org/pr44161")
     def test_call_trivial(self):
         """Test that we can print a variable & call a function with a trivial ABI class."""
         self.build()
@@ -30,16 +28,15 @@
     @skipUnlessSupportedTypeAttribute("trivial_abi")
     # fixed for SysV-x86_64 ABI, but not Windows-x86_64
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr36870")
+    @expectedFailureAll(archs=["aarch64"], oslist=["linux"],
+                        bugnumber="llvm.org/pr44161")
+    @expectedFailureAll(archs=["arm64", "arm64e"], bugnumber="<rdar://problem/57844240>")
     def test_call_nontrivial(self):
         """Test that we can print a variable & call a function on the same class w/o the trivial ABI marker."""
         self.build()
         self.main_source_file = lldb.SBFileSpec("main.cpp")
         self.expr_test(False)
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def check_value(self, test_var, ivar_value):
         self.assertTrue(test_var.GetError().Success(), "Invalid valobj: %s"%(test_var.GetError().GetCString()))
         ivar = test_var.GetChildMemberWithName("ivar")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/main.cpp
index cdf593e..b1f5015 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/main.cpp
@@ -29,7 +29,7 @@
   outVal = takeTrivial(inVal);
 
   S_NotTrivial inNotVal, outNotVal;
-  outNotVal = takeNotTrivial(outNotVal);
+  outNotVal = takeNotTrivial(inNotVal);
 
   return 0; // Set another for return value
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/Makefile
index 99bfa7e..3d0b98f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/Makefile
@@ -1,3 +1,2 @@
-LEVEL = ../../../make
 CXX_SOURCES := main.cpp
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
index 7fa3f95..45be731 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/type_lookup/TestCppTypeLookup.py
@@ -2,7 +2,6 @@
 Test that we can lookup types correctly in the expression parser
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/Makefile
index 1476447..bf443d8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 CFLAGS := -g -O0 -std=c++11
 
 clean: OBJECTS+=$(wildcard main.d.*)
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py
index 1a50c9d..c1bd892 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unicode-literals/TestUnicodeLiterals.py
@@ -3,11 +3,8 @@
 Test that the expression parser returns proper Unicode strings.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py
index 3e4fee0..78121c1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unique-types/TestUniqueTypes.py
@@ -2,7 +2,6 @@
 Test that template instaniations of std::vector<long> and <short> in the same module have the correct types.
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
index 27b2a0b..ca754f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/unsigned_types/TestUnsignedTypes.py
@@ -2,12 +2,8 @@
 Test that variables with unsigned types display correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual-overload/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py
index c91da34..22fe96b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/virtual/TestVirtual.py
@@ -2,10 +2,7 @@
 Test C++ virtual function and virtual inheritance.
 """
 
-from __future__ import print_function
-
 import os
-import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/Makefile
index fe27980..a4b03ae 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 CFLAGS := -g -O0
 
 clean: OBJECTS+=$(wildcard main.d.*)
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py
index f31ba9b..b59d71e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/cpp/wchar_t/TestCxxWCharT.py
@@ -3,11 +3,8 @@
 Test that C++ supports wchar_t correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.lldbtest import *
 import lldbsuite.test.lldbutil as lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/mixed/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/mixed/Makefile
index 860343e..12db32c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/mixed/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/mixed/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../make
-
 CXX_SOURCES := foo.cpp
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py
index a69e8a7..b4fe539 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/mixed/TestMixedLanguages.py
@@ -1,10 +1,7 @@
 """Test that lldb works correctly on compile units form different languages."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import re
 import lldb
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile
index 0af8359..df76ed3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := ivars-in-blocks.m main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
index d2798d6..e790e6e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/blocks/TestObjCIvarsInBlocks.py
@@ -1,10 +1,5 @@
 """Test printing ivars and ObjC objects captured in blocks that are made in methods of an ObjC class."""
 
-from __future__ import print_function
-
-
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
index 346fc4b..00a0769 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
@@ -1,23 +1,23 @@
-LEVEL = ../../../make
-
-LD_EXTRAS = -lobjc -framework Foundation
-
-include $(LEVEL)/Makefile.rules
+LD_EXTRAS := -lobjc -framework Foundation -L. -lTest -lTestExt
+OBJC_SOURCES := main.m
 
 all: a.out
 
+a.out: libTest.dylib libTestExt.dylib
+
+include Makefile.rules
+
 libTest.dylib:	Test/Test.m
 	mkdir -p Test
-	$(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/Test/Test.mk all
+	$(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_NAME=Test DYLIB_OBJC_SOURCES=Test/Test.m \
+		LD_EXTRAS="-lobjc -framework Foundation" \
+		CFLAGS_EXTRAS=-I$(SRCDIR)
 
 libTestExt.dylib: TestExt/TestExt.m
 	mkdir -p TestExt
-	$(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/TestExt/TestExt.mk all
+	$(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_NAME=TestExt DYLIB_OBJC_SOURCES=TestExt/TestExt.m \
+		LD_EXTRAS="-lobjc -framework Foundation -lTest -L." \
+		CFLAGS_EXTRAS=-I$(SRCDIR)
 
-a.out: main.m libTest.dylib libTestExt.dylib
-	$(CC) $(LDFLAGS) -I$(SRCDIR) -L. -lTest -lTestExt -o a.out $<
-
-clean::
-	rm -rf libTest.dylib libTestExt.dylib a.out Test.o TestExt.o libTest.dylib.dSYM libTestExt.dylib.dSYM
-	$(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/Test/Test.mk clean
-	$(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/TestExt/TestExt.mk clean
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk
deleted file mode 100644
index be758ac..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LEVEL = ../../../make
-
-DYLIB_NAME := Test
-DYLIB_ONLY := YES
-CFLAGS_EXTRAS = -I$(SRCDIR)/..
-LD_EXTRAS = -lobjc -framework Foundation
-
-DYLIB_OBJC_SOURCES = Test/Test.m
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py
index 264a17c..f49858c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestConflictingDefinition.py
@@ -1,10 +1,7 @@
 """Test that types defined in shared libraries work correctly."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk
deleted file mode 100644
index 285d726..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk
+++ /dev/null
@@ -1,10 +0,0 @@
-LEVEL = ../../../make
-
-DYLIB_NAME := TestExt
-DYLIB_ONLY := YES
-CFLAGS_EXTRAS = -I$(SRCDIR)/..
-LD_EXTRAS = -L. -lTest -lobjc -framework Foundation
-
-DYLIB_OBJC_SOURCES = TestExt/TestExt.m
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile
index 261658b..8763401 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 OBJCXX_SOURCES := main.mm
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
index 1d4ee9a..ce9ee8e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/exceptions/TestObjCExceptions.py
@@ -3,7 +3,6 @@
 Test lldb Obj-C exception support.
 """
 
-from __future__ import print_function
 
 
 import lldb
@@ -31,7 +30,7 @@
 
         self.expect('thread exception', substrs=[
                 '(NSException *) exception = ',
-                'name: "ThrownException" - reason: "SomeReason"',
+                '"SomeReason"',
             ])
 
         target = self.dbg.GetSelectedTarget()
@@ -63,7 +62,7 @@
             'frame variable e1',
             substrs=[
                 '(NSException *) e1 = ',
-                'name: "ExceptionName" - reason: "SomeReason"'
+                '"SomeReason"'
             ])
 
         self.expect(
@@ -79,7 +78,7 @@
         e1 = frame.FindVariable("e1")
         self.assertTrue(e1)
         self.assertEqual(e1.type.name, "NSException *")
-        self.assertEqual(e1.GetSummary(), 'name: "ExceptionName" - reason: "SomeReason"')
+        self.assertEqual(e1.GetSummary(), '"SomeReason"')
         self.assertEqual(e1.GetChildMemberWithName("name").description, "ExceptionName")
         self.assertEqual(e1.GetChildMemberWithName("reason").description, "SomeReason")
         userInfo = e1.GetChildMemberWithName("userInfo").dynamic
@@ -92,7 +91,7 @@
             'frame variable e2',
             substrs=[
                 '(NSException *) e2 = ',
-                'name: "ThrownException" - reason: "SomeReason"'
+                '"SomeReason"'
             ])
 
         self.expect(
@@ -108,7 +107,7 @@
         e2 = frame.FindVariable("e2")
         self.assertTrue(e2)
         self.assertEqual(e2.type.name, "NSException *")
-        self.assertEqual(e2.GetSummary(), 'name: "ThrownException" - reason: "SomeReason"')
+        self.assertEqual(e2.GetSummary(), '"SomeReason"')
         self.assertEqual(e2.GetChildMemberWithName("name").description, "ThrownException")
         self.assertEqual(e2.GetChildMemberWithName("reason").description, "SomeReason")
         userInfo = e2.GetChildMemberWithName("userInfo").dynamic
@@ -141,7 +140,7 @@
 
         self.expect('thread exception', substrs=[
                 '(NSException *) exception = ',
-                'name: "ThrownException" - reason: "SomeReason"',
+                '"SomeReason"',
                 'libobjc.A.dylib`objc_exception_throw',
                 'a.out`foo', 'at main.mm:24',
                 'a.out`rethrow', 'at main.mm:35',
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
index b99925b..cfae251 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../../make
-
 DYLIB_NAME := Container
 DYLIB_OBJC_SOURCES := Container.m
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
index 218d73c..fd35d64 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/forward-decl/TestForwardDecl.py
@@ -1,10 +1,7 @@
 """Test that a forward-declared class works when its complete definition is in a library"""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile
index ce2ccd2..e95ebd94 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/Makefile
@@ -1,8 +1,7 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m my-base.m
 #OBJC_SOURCES := const-strings.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
index 95c5575..6e8e989 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestConstStrings.py
@@ -3,11 +3,8 @@
 parser.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
index 345e41b..9e39a73 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestFoundationDisassembly.py
@@ -2,12 +2,8 @@
 Test the lldb disassemble command on foundation framework.
 """
 
-from __future__ import print_function
-
-
 import unittest2
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -19,11 +15,9 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    # rdar://problem/8504895
-    # Crash while doing 'disassemble -n "-[NSNumber descriptionWithLocale:]"
-    @unittest2.skipIf(
-        TestBase.skipLongRunningTest(),
-        "Skip this long running test")
+    NO_DEBUG_INFO_TESTCASE = True
+
+    @skipIfAsan
     def test_foundation_disasm(self):
         """Do 'disassemble -n func' on each and every 'Code' symbol entry from the Foundation.framework."""
         self.build()
@@ -42,7 +36,6 @@
 
         foundation_framework = None
         for module in target.modules:
-            print(module)
             if module.file.basename == "Foundation":
                 foundation_framework = module.file.fullpath
                 break
@@ -67,10 +60,10 @@
             match = codeRE.search(line)
             if match:
                 func = match.group(1)
-                #print("line:", line)
-                #print("func:", func)
+                self.runCmd('image lookup -s "%s"' % func)
                 self.runCmd('disassemble -n "%s"' % func)
 
+    @skipIfAsan
     def test_simple_disasm(self):
         """Test the lldb 'disassemble' command"""
         self.build()
@@ -79,10 +72,6 @@
         target = self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
         self.assertTrue(target, VALID_TARGET)
 
-        print(target)
-        for module in target.modules:
-            print(module)
-
         # Stop at +[NSString stringWithFormat:].
         symbol_name = "+[NSString stringWithFormat:]"
         break_results = lldbutil.run_break_set_command(
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
index dd53407..7d4990c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods.py
@@ -8,9 +8,7 @@
 
 import os
 import os.path
-import time
 import lldb
-import string
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -193,7 +191,7 @@
             "expression self->non_existent_member",
             COMMAND_FAILED_AS_EXPECTED,
             error=True,
-            startstr="error: 'MyString' does not have a member named 'non_existent_member'")
+            substrs=["error:", "'MyString' does not have a member named 'non_existent_member'"])
 
         # Use expression parser.
         self.runCmd("expression self->str")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
index 20137e3..b2d0d19 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethods2.py
@@ -2,7 +2,6 @@
 Test more expression command sequences with objective-c.
 """
 
-from __future__ import print_function
 
 
 import lldb
@@ -16,61 +15,26 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
+    NO_DEBUG_INFO_TESTCASE = True
+
     def test_expr_commands(self):
         """More expression commands for objective-c."""
         self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+        main_spec = lldb.SBFileSpec("main.m")
 
-        lines = []
-        lines.append(
-            line_number(
-                'main.m',
-                '// Break here for selector: tests'))
-        lines.append(
-            line_number(
-                'main.m',
-                '// Break here for NSArray tests'))
-        lines.append(
-            line_number(
-                'main.m',
-                '// Break here for NSString tests'))
-        lines.append(
-            line_number(
-                'main.m',
-                '// Break here for description test'))
-        lines.append(
-            line_number(
-                'main.m',
-                '// Set break point at this line'))
-
-        # Create a bunch of breakpoints.
-        for line in lines:
-            lldbutil.run_break_set_by_file_and_line(
-                self, "main.m", line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
+        (target, process, thread, bp) = lldbutil.run_to_source_breakpoint(
+            self, "Break here for selector: tests", main_spec)
+        
         # Test_Selector:
-        self.runCmd("thread backtrace")
         self.expect("expression (char *)sel_getName(sel)",
                     substrs=["(char *)",
                              "length"])
 
-        self.runCmd("process continue")
-
-        # Test_NSArray:
-        self.runCmd("thread backtrace")
-        self.runCmd("process continue")
-
-        # Test_NSString:
-        self.runCmd("thread backtrace")
-        self.runCmd("process continue")
-
-        # Test_MyString:
-        self.runCmd("thread backtrace")
+        desc_bkpt = target.BreakpointCreateBySourceRegex("Break here for description test",
+                                                          main_spec)
+        self.assertEqual(desc_bkpt.GetNumLocations(), 1, "description breakpoint has a location")
+        lldbutil.continue_to_breakpoint(process, desc_bkpt)
+        
         self.expect("expression (char *)sel_getName(_cmd)",
                     substrs=["(char *)",
                              "description"])
-
-        self.runCmd("process continue")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSArray.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSArray.py
index b199b8a..8080029 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSArray.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSArray.py
@@ -2,7 +2,6 @@
 Test more expression command sequences with objective-c.
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSError.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSError.py
index 20a2119..0771792 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSError.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsNSError.py
@@ -2,7 +2,6 @@
 Test more expression command sequences with objective-c.
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsString.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsString.py
index e2c1700..65ccb0c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsString.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjCMethodsString.py
@@ -2,7 +2,6 @@
 Test more expression command sequences with objective-c.
 """
 
-from __future__ import print_function
 
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
index 82e0858..803cbfe 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestObjectDescriptionAPI.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
index c52ac8c..f5cb75b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestRuntimeTypes.py
@@ -2,11 +2,8 @@
 Test that Objective-C methods from the runtime work correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
index bfb9e0b..abfc762 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/foundation/TestSymbolTable.py
@@ -2,12 +2,6 @@
 Test symbol table access for main.m.
 """
 
-from __future__ import print_function
-
-
-import os
-import time
-
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile
index a1608fe..afecbf9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
index dcabd72..5cc6f4e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/global_ptrs/TestGlobalObjects.py
@@ -1,10 +1,7 @@
 """Test that a global ObjC object found before the process is started updates correctly."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile
index 1768d11..0664769 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/Makefile
@@ -1,9 +1,7 @@
-LEVEL = ../../../make
-
 DYLIB_NAME := InternalDefiner
 DYLIB_OBJC_SOURCES := InternalDefiner.m
 OBJC_SOURCES := main.m
 
 LD_EXTRAS = -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
index 2fad51e..03a325a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/hidden-ivars/TestHiddenIvars.py
@@ -1,12 +1,9 @@
 """Test that hidden ivars in a shared library are visible from the main executable."""
 
-from __future__ import print_function
 
 
 import unittest2
-import os
 import subprocess
-import time
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile
index f69da9a..ba7e23a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/Makefile
@@ -1,20 +1,5 @@
-LEVEL = ../../../make
-
-CC ?= clang
-ifeq "$(ARCH)" ""
-        ARCH = x86_64
-endif
-
-ifeq "$(OS)" ""
-        OS = $(shell uname -s)
-endif
-
-CFLAGS ?= -g -O0
+CFLAGS := -g -O0
 CFLAGS_NO_DEBUG = 
-ifeq "$(OS)" "Darwin"
-        CFLAGS += -arch $(ARCH)
-		CFLAGS_NO_DEBUG += -arch $(ARCH)
-endif
 
 all: aout
 
@@ -25,4 +10,4 @@
 clean::
 	rm -f myclass.o
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
index bffe5d1..3019bcf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ivar-IMP/TestObjCiVarIMP.py
@@ -2,12 +2,8 @@
 Test that dynamically discovered ivars of type IMP do not crash LLDB
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/Makefile
new file mode 100644
index 0000000..0d8068b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/Makefile
@@ -0,0 +1,5 @@
+CFLAGS_EXTRAS = -I$(BUILDDIR)
+USE_PRIVATE_MODULE_CACHE := YES
+OBJC_SOURCES := main.m foo.m
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/TestClangModulesAppUpdate.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/TestClangModulesAppUpdate.py
new file mode 100644
index 0000000..4bd136b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/TestClangModulesAppUpdate.py
@@ -0,0 +1,57 @@
+
+import unittest2
+import os
+import shutil
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestClangModuleAppUpdate(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIf(debug_info=no_match(["gmodules"]))
+    def test_rebuild_app_modules_untouched(self):
+        with open(self.getBuildArtifact("module.modulemap"), "w") as f:
+            f.write("""
+                    module Foo { header "f.h" }
+                    """)
+        with open(self.getBuildArtifact("f.h"), "w") as f:
+            f.write("""
+                    @import Foundation;
+                    @interface Foo : NSObject {
+                       int i;
+                    }
+                    +(instancetype)init;
+                    @end
+                    """)
+
+        mod_cache = self.getBuildArtifact("private-module-cache")
+        import os
+        if os.path.isdir(mod_cache):
+          shutil.rmtree(mod_cache)
+        self.build()
+        self.assertTrue(os.path.isdir(mod_cache), "module cache exists")
+
+        target, process, _, bkpt = lldbutil.run_to_source_breakpoint(
+            self, "break here", lldb.SBFileSpec("main.m"))
+        bar = target.FindTypes('Bar').GetTypeAtIndex(0)
+        foo = bar.GetDirectBaseClassAtIndex(0).GetType()
+        self.assertEqual(foo.GetNumberOfFields(), 1)
+        self.assertEqual(foo.GetFieldAtIndex(0).GetName(), "i")
+
+        # Rebuild.
+        process.Kill()
+        os.remove(self.getBuildArtifact('main.o'))
+        os.remove(self.getBuildArtifact('a.out'))
+        self.build()
+
+        # Reattach.
+        target, process, _, _ = lldbutil.run_to_breakpoint_do_run(self, target, bkpt)
+        bar = target.FindTypes('Bar').GetTypeAtIndex(0)
+        foo = bar.GetDirectBaseClassAtIndex(0).GetType()
+        self.assertEqual(foo.GetNumberOfFields(), 1)
+        self.assertEqual(foo.GetFieldAtIndex(0).GetName(), "i")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/foo.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/foo.m
new file mode 100644
index 0000000..83a5abc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/foo.m
@@ -0,0 +1,7 @@
+@import Foundation;
+@import Foo;
+@implementation Foo
++(instancetype)init {
+  return [super init];
+}
+@end
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/main.m
new file mode 100644
index 0000000..37ec1f3
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/main.m
@@ -0,0 +1,17 @@
+@import Umbrella;
+
+@interface Bar : Foo
++(instancetype)init;
+@end
+
+@implementation Bar
++(instancetype)init {
+  return [super init];
+}
+@end
+
+int main(int argc, char **argv) {
+  id bar = [Bar new];
+  [bar i]; // break here
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/module.modulemap b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/module.modulemap
new file mode 100644
index 0000000..c142410
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/module.modulemap
@@ -0,0 +1,4 @@
+module Umbrella {
+  header "umbrella.h"
+  export *
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/umbrella.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/umbrella.h
new file mode 100644
index 0000000..375d3ea
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-app-update/umbrella.h
@@ -0,0 +1 @@
+@import Foo;
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
index ca099e1..3b2bd50 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/Makefile
@@ -1,6 +1,5 @@
-LEVEL = ../../../make
 OBJC_SOURCES := main.m
 
-CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS)
+CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS)
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
index 2646318..449e5b5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-auto-import/TestModulesAutoImport.py
@@ -1,14 +1,9 @@
 """Test that importing modules in Objective-C works as expected."""
 
-from __future__ import print_function
 
 
-from distutils.version import StrictVersion
 import unittest2
-import os
-import time
 import lldb
-import platform
 
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile
index 00cb9b6..d0aadc1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/Makefile
@@ -1,3 +1,2 @@
-LEVEL = ../../../make
 OBJC_SOURCES := main.m
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py
index 0cff691..3a12b23 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-cache/TestClangModulesCache.py
@@ -1,12 +1,9 @@
 """Test that the clang modules cache directory can be controlled."""
 
-from __future__ import print_function
 
 
 import unittest2
 import os
-import time
-import platform
 import shutil
 
 import lldb
@@ -19,9 +16,6 @@
     NO_DEBUG_INFO_TESTCASE = True
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        TestBase.setUp(self)
-
     @skipUnlessDarwin
     def test_expr(self):
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/Makefile
new file mode 100644
index 0000000..59bf009
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/Makefile
@@ -0,0 +1,16 @@
+OBJC_SOURCES := main.m
+CFLAGS_EXTRAS = -I$(BUILDDIR)
+USE_PRIVATE_MODULE_CACHE = YES
+
+.PHONY: update-module
+
+all: $(EXE)
+	$(MAKE) -f $(SRCDIR)/Makefile update-module
+
+include Makefile.rules
+
+update-module:
+	echo "forcing an update of f.pcm"
+	echo "typedef int something_other;" > $(BUILDDIR)/f.h
+	$(CC) $(CFLAGS) $(MANDATORY_MODULE_BUILD_CFLAGS) \
+		-c $(SRCDIR)/other.m -o $(BUILDDIR)/other.o
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/TestClangModulesHashMismatch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/TestClangModulesHashMismatch.py
new file mode 100644
index 0000000..606bd30
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/TestClangModulesHashMismatch.py
@@ -0,0 +1,45 @@
+
+import unittest2
+import os
+import shutil
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestClangModuleHashMismatch(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIf(debug_info=no_match(["gmodules"]))
+    def test_expr(self):
+        with open(self.getBuildArtifact("module.modulemap"), "w") as f:
+            f.write("""
+                    module Foo { header "f.h" }
+                    """)
+        with open(self.getBuildArtifact("f.h"), "w") as f:
+            f.write("""
+                    typedef int my_int;
+                    void f() {}
+                    """)
+
+        mod_cache = self.getBuildArtifact("private-module-cache")
+        if os.path.isdir(mod_cache):
+          shutil.rmtree(mod_cache)
+        self.build()
+        self.assertTrue(os.path.isdir(mod_cache), "module cache exists")
+
+        logfile = self.getBuildArtifact("host.log")
+        self.runCmd("log enable -v -f %s lldb host" % logfile)
+        target, _, _, _ = lldbutil.run_to_source_breakpoint(
+            self, "break here", lldb.SBFileSpec("main.m"))
+        target.GetModuleAtIndex(0).FindTypes('my_int') 
+
+        found = False
+        with open(logfile, 'r') as f:
+            for line in f:
+                if "hash mismatch" in line and "Foo" in line:
+                    found = True
+        self.assertTrue(found)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/main.m
new file mode 100644
index 0000000..5065222
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/main.m
@@ -0,0 +1,6 @@
+#include "f.h"
+int main(int argc, char **argv) {
+  my_int i = argc;
+  f(); // break here
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/other.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/other.m
new file mode 100644
index 0000000..0afd3eb
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-hash-mismatch/other.m
@@ -0,0 +1,4 @@
+#include "f.h"
+something_other f() {
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
index b8462bc..abb36e2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/Makefile
@@ -1,8 +1,5 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m myModule.m
 
-include $(LEVEL)/Makefile.rules
-
-CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS)
-LDFLAGS += -framework Foundation
+CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS)
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
index 7bde8fc..8fed613 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-incomplete/TestIncompleteModules.py
@@ -1,11 +1,8 @@
 """Test that DWARF types are trusted over module types"""
 
-from __future__ import print_function
 
 
 import unittest2
-import platform
-from distutils.version import StrictVersion
 
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
index 320e13e..b4afe2c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/Makefile
@@ -1,9 +1,7 @@
-LEVEL = ../../../make
-
 C_SOURCES := myModule.c
 
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
+CFLAGS_EXTRAS = $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(BUILDDIR)
 
-CFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS) -I$(PWD)
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
index e9dbe6a..e2e335a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py
@@ -1,14 +1,9 @@
 """Test that inline functions from modules are imported correctly"""
 
-from __future__ import print_function
 
 
-from distutils.version import StrictVersion
 
 import unittest2
-import os
-import time
-import platform
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -20,10 +15,6 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     @skipUnlessDarwin
     @skipIf(macos_version=["<", "10.12"], debug_info=no_match(["gmodules"]))
     def test_expr(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/Makefile
new file mode 100644
index 0000000..5d0a220
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/Makefile
@@ -0,0 +1,3 @@
+CFLAGS_EXTRAS = -I$(BUILDDIR)
+USE_PRIVATE_MODULE_CACHE = YES
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/TestClangModulesUpdate.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/TestClangModulesUpdate.py
new file mode 100644
index 0000000..e36a227
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/TestClangModulesUpdate.py
@@ -0,0 +1,65 @@
+
+import unittest2
+import os
+import shutil
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+
+class TestClangModuleUpdate(TestBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    @skipIf(debug_info=no_match(["gmodules"]))
+    def test_expr(self):
+        with open(self.getBuildArtifact("module.modulemap"), "w") as f:
+            f.write("""
+                    module Foo { header "f.h" }
+                    """)
+        with open(self.getBuildArtifact("f.h"), "w") as f:
+            f.write("""
+                    struct Q { int i; };
+                    void f() {}
+                    """)
+
+        mod_cache = self.getBuildArtifact("private-module-cache")
+        if os.path.isdir(mod_cache):
+          shutil.rmtree(mod_cache)
+        d = {'OBJC_SOURCES': 'first.m'}
+        self.build(dictionary=d)
+        self.assertTrue(os.path.isdir(mod_cache), "module cache exists")
+
+        logfile = self.getBuildArtifact("modules.log")
+        self.runCmd("log enable -f %s lldb module" % logfile)
+        target, process, _, bkpt = lldbutil.run_to_name_breakpoint(self, "main")
+        self.assertIn("int i", str(target.FindTypes('Q').GetTypeAtIndex(0)))
+        self.expect("image list -g", patterns=[r'first\.o', r'Foo.*\.pcm'])
+
+        # Update the module.
+        with open(self.getBuildArtifact("f.h"), "w") as f:
+            f.write("""
+                    struct S { int i; };
+                    struct S getS() { struct S r = {1}; return r; }
+                    void f() {}
+                    """)
+
+        # Rebuild.
+        d = {'OBJC_SOURCES': 'second.m'}
+        self.build(dictionary=d)
+
+        # Reattach.
+        process.Kill()
+        target, process, _, _ = lldbutil.run_to_breakpoint_do_run(self, target, bkpt)
+        self.assertIn("int i", str(target.FindTypes('S').GetTypeAtIndex(0)))
+        self.expect("image list -g", patterns=[r'second\.o', r'Foo.*\.pcm'])
+
+        # Check log file.
+        found = False
+        with open(logfile, 'r') as f:
+            for line in f:
+                if "module changed" in line and "Foo" in line:
+                    found = True
+        self.assertTrue(found)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/first.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/first.m
new file mode 100644
index 0000000..bcc458f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/first.m
@@ -0,0 +1,5 @@
+@import Umbrella;
+int main(int argc, char **argv) {
+  f(); // break here
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/module.modulemap b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/module.modulemap
new file mode 100644
index 0000000..c142410
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/module.modulemap
@@ -0,0 +1,4 @@
+module Umbrella {
+  header "umbrella.h"
+  export *
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/second.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/second.m
new file mode 100644
index 0000000..bce925c
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/second.m
@@ -0,0 +1,5 @@
+@import Umbrella;
+int main() {
+  struct S s = getS(); // break here
+  return s.i;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/umbrella.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/umbrella.h
new file mode 100644
index 0000000..375d3ea
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules-update/umbrella.h
@@ -0,0 +1 @@
+@import Foo;
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile
index ad3cb3f..37dd8f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
index 8f5c407..695eac9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/modules/TestObjCModules.py
@@ -1,13 +1,8 @@
 """Test that importing modules in Objective-C works as expected."""
 
-from __future__ import print_function
 
 
 import unittest2
-import os
-import time
-import platform
-from distutils.version import StrictVersion
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -60,6 +55,10 @@
                 "int",
                 "4"])
 
+        # Type lookup should still work and print something reasonable
+        # for types from the module.
+        self.expect("type lookup NSObject", substrs=["instanceMethod"])
+
         self.expect("expr string.length", VARIABLES_DISPLAYED_CORRECTLY,
                     substrs=["NSUInteger", "5"])
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile
index 910d494..e8a4b0c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJCXX_SOURCES := main.mm
 LD_EXTRAS = -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
index 996ec6c..344af99 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc++/TestObjCXX.py
@@ -2,11 +2,8 @@
 Make sure that ivars of Objective-C++ classes are visible in LLDB.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile
index 7f7baeb..ad28ecf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 LD_EXTRAS = -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
index 7bba071..8f974f0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-baseclass-sbtype/TestObjCBaseClassSBType.py
@@ -2,12 +2,8 @@
 Use lldb Python API to test base class resolution for ObjC classes
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
index 0aa8318..d07b827 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-builtin-types/TestObjCBuiltinTypes.py
@@ -1,10 +1,7 @@
 """Test that the expression parser doesn't get confused by 'id' and 'Class'"""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile
index a1608fe..afecbf9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
index 7c3bafa..ac2dc2a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py
@@ -2,12 +2,8 @@
 Use lldb Python API to make sure the dynamic checkers are doing their jobs.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile
index c2d0791..e6db3de 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := class.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
index 8470d77..46cddd6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-class-method/TestObjCClassMethod.py
@@ -3,8 +3,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile
index dd909af..9ff3ce6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 LD_EXTRAS = -framework Foundation
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
index 6e95b4f..1851bc3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dyn-sbtype/TestObjCDynamicSBType.py
@@ -2,11 +2,8 @@
 Test that we are able to properly report a usable dynamic type
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile
index a981f4b..a349777 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := dynamic-value.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
index e9df6be..5a6ec4e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-dynamic-value/TestObjCDynamicValue.py
@@ -2,12 +2,8 @@
 Use lldb Python API to test dynamic values in ObjC
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile
index fdd3b5e..5408f41 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := objc-ivar-offsets.m main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
index 6b92845..749c713 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
@@ -1,10 +1,7 @@
 """Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile
index b93a8a1..a218ce3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
 all:        a.out.stripped
 
@@ -12,4 +10,4 @@
 	rm -f a.out.stripped
 	rm -rf a.out.stripped.dSYM
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
index f5997eb..12a22f6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
@@ -1,10 +1,7 @@
 """Test printing ObjC objects that use unbacked properties - so that the static ivar offsets are incorrect."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile
index ad3cb3f..37dd8f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxArray.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxArray.py
index 95deaf6..cf638c7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxArray.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxArray.py
@@ -1,6 +1,5 @@
 """Test that the Objective-C syntax for dictionary/array literals and indexing works"""
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py
index 0cb26bb..5291b46 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py
@@ -1,6 +1,5 @@
 """Test that the Objective-C syntax for dictionary/array literals and indexing works"""
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxLiteral.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxLiteral.py
index 6516530..e17343b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxLiteral.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxLiteral.py
@@ -1,6 +1,5 @@
 """Test that the Objective-C syntax for dictionary/array literals and indexing works"""
 
-from __future__ import print_function
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile
index aa6a752..5fb128d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
 CFLAGS ?= -arch $(ARCH) -g -O2
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py
index c7e012d..6209f14 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-optimized/TestObjcOptimized.py
@@ -6,11 +6,8 @@
 optimized it into a register.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 import re
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile
index a1608fe..afecbf9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py
index 2a9a5af..3092c3f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-property/TestObjCProperty.py
@@ -2,12 +2,8 @@
 Use lldb Python API to verify that expression evaluation for property references uses the correct getters and setters
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
index a1608fe..afecbf9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
index 6c5492d..0ad7e35 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := static.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
 default:        a.out.stripped
 
@@ -13,4 +11,4 @@
 	rm -f a.out.stripped
 	rm -rf $(wildcard *.dSYM)
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
index ed96941..8ee73ed 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method-stripped/TestObjCStaticMethodStripped.py
@@ -1,10 +1,7 @@
 """Test calling functions in static methods with a stripped binary."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile
index a8e973f..954dea4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := static.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
index 37b41cd..ce18a07 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-static-method/TestObjCStaticMethod.py
@@ -1,10 +1,7 @@
 """Test calling functions in static methods."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile
index b097fe6..9906470 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := stepping-tests.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py
index 9e949dc..bf80995 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-stepping/TestObjCStepping.py
@@ -3,8 +3,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile
index c168029..d059a5c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := test.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
index 4195f60..28188af 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-argument/TestObjCStructArgument.py
@@ -1,10 +1,7 @@
 """Test passing structs to Objective-C methods."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile
index c168029..d059a5c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := test.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
index 6f6fd92..c8c5484 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-struct-return/TestObjCStructReturn.py
@@ -1,10 +1,7 @@
 """Test calling functions in class methods."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile
index c2d0791..e6db3de 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := class.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py
index 5b10bc5..5cb46e0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc-super/TestObjCSuper.py
@@ -1,10 +1,7 @@
 """Test calling methods on super."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/Makefile
new file mode 100644
index 0000000..afecbf9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/Makefile
@@ -0,0 +1,4 @@
+OBJC_SOURCES := main.m
+LD_EXTRAS := -lobjc -framework Foundation
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/TestObjCDirectMethods.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/TestObjCDirectMethods.py
new file mode 100644
index 0000000..f0152de
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/TestObjCDirectMethods.py
@@ -0,0 +1,5 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(
+    __file__, globals(), [decorators.skipUnlessDarwin])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m
new file mode 100644
index 0000000..6799f22
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/objc_direct-methods/main.m
@@ -0,0 +1,92 @@
+#import <Foundation/Foundation.h>
+
+int side_effect = 0;
+
+NSString *str = @"some string";
+
+const char *directCallConflictingName() {
+  return "wrong function";
+}
+
+@interface Foo : NSObject {
+  int instance_var;
+}
+-(int) entryPoint;
+@end
+
+@implementation Foo
+-(int) entryPoint
+{
+  // Try calling directly with self. Same as in the main method otherwise.
+  return 0; //%self.expect("expr [self directCallNoArgs]", substrs=["called directCallNoArgs"])
+            //%self.expect("expr [self directCallArgs: 1111]", substrs=["= 2345"])
+            //%self.expect("expr side_effect = 0; [self directCallVoidReturn]; side_effect", substrs=["= 4321"])
+            //%self.expect("expr [self directCallNSStringArg: str]", substrs=['@"some string"'])
+            //%self.expect("expr [self directCallIdArg: (id)str]", substrs=['@"some string appendix"'])
+            //%self.expect("expr [self directCallConflictingName]", substrs=["correct function"])
+            //%self.expect("expr [self directCallWithCategory]", substrs=["called function with category"])
+}
+
+// Declare several objc_direct functions we can test.
+-(const char *) directCallNoArgs __attribute__((objc_direct))
+{
+  return "called directCallNoArgs";
+}
+
+-(void) directCallVoidReturn __attribute__((objc_direct))
+{
+  side_effect = 4321;
+}
+
+-(int) directCallArgs:(int)i __attribute__((objc_direct))
+{
+  // Use the arg in some way to make sure that gets passed correctly.
+  return i + 1234;
+}
+
+-(NSString *) directCallNSStringArg:(NSString *)str __attribute__((objc_direct))
+{
+  return str;
+}
+
+-(NSString *) directCallIdArg:(id)param __attribute__((objc_direct))
+{
+  return [param stringByAppendingString:@" appendix"];
+}
+
+// We have another function with the same name above. Make sure this doesn't influence
+// what we call.
+-(const char *) directCallConflictingName  __attribute__((objc_direct))
+{
+  return "correct function";
+}
+@end
+
+
+@interface Foo (Cat)
+@end
+
+@implementation Foo (Cat)
+-(const char *) directCallWithCategory  __attribute__((objc_direct))
+{
+  return "called function with category";
+}
+@end
+
+int main()
+{
+  Foo *foo = [[Foo alloc] init];
+  [foo directCallNoArgs];
+  [foo directCallArgs: 1];
+  [foo directCallVoidReturn];
+  [foo directCallNSStringArg: str];
+  [foo directCallIdArg: (id)str];
+  [foo entryPoint];  //%self.expect("expr [foo directCallNoArgs]", substrs=["called directCallNoArgs"])
+                     //%self.expect("expr [foo directCallArgs: 1111]", substrs=["= 2345"])
+                     //%self.expect("expr side_effect = 0; [foo directCallVoidReturn]; side_effect", substrs=["= 4321"])
+                     //%self.expect("expr [foo directCallNSStringArg: str]", substrs=['@"some string"'])
+                     //%self.expect("expr [foo directCallIdArg: (id)str]", substrs=['@"some string appendix"'])
+                     //%self.expect("expr [foo directCallConflictingName]", substrs=["correct function"])
+                     //%self.expect("expr [foo directCallWithCategory]", substrs=["called function with category"])
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile
index a1608fe..afecbf9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/orderedset/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile
index dba1065..2eab562 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := blocked.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py
index 57a572c..9b3ec33 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/print-obj/TestPrintObj.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile
index b05ff34..845553d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py
index 74d08f7..aade40c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/ptr_refs/TestPtrRefsObjC.py
@@ -2,9 +2,7 @@
 Test the ptr_refs tool on Darwin with Objective-C
 """
 
-from __future__ import print_function
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile
index ad3cb3f..37dd8f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
index 737b0dc..632ef7b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/radar-9691614/TestObjCMethodReturningBOOL.py
@@ -2,11 +2,8 @@
 Test that objective-c method returning BOOL works correctly.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile
index ad3cb3f..37dd8f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py
index ed60e5f..c6633b7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-10967107/TestRdar10967107.py
@@ -2,11 +2,8 @@
 Test that CoreFoundation classes CFGregorianDate and CFRange are not improperly uniqued
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile
index ad3cb3f..37dd8f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py
index 8619ce1..f9e825a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-11355592/TestRdar11355592.py
@@ -2,11 +2,8 @@
 Test that we do not attempt to make a dynamic type for a 'const char*'
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile
index 385b557..919000e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 ifneq (,$(findstring arm,$(ARCH)))
     LD_EXTRAS = -framework Foundation -framework UIKit
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
index 00fffc8..8f262a3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/rdar-12408181/TestRdar12408181.py
@@ -2,11 +2,8 @@
 Test that we are able to find out how many children NSWindow has
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile
index 61cc3b3..f1498ef 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := Bar.m Foo.m main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py
index d476007..002bc6c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/real-definition/TestRealDefinition.py
@@ -1,10 +1,7 @@
 """Test that types defined in shared libraries work correctly."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile
index a1608fe..afecbf9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/sample/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/self/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/self/Makefile
index bdae304..644046c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/self/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/self/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 LD_EXTRAS ?= -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
index ad3cb3f..37dd8f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/Makefile
@@ -1,7 +1,6 @@
-LEVEL = ../../../make
-
 OBJC_SOURCES := main.m
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
index 21f0892..85ad628 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objc/single-entry-dictionary/TestObjCSingleEntryDictionary.py
@@ -1,14 +1,9 @@
 """Test that we properly vend children for a single entry NSDictionary"""
 
-from __future__ import print_function
 
 
 import unittest2
-import os
-import time
-import platform
 
-from distutils.version import StrictVersion
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/Makefile
index 5796007..bae88deb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/class-name-clash/Makefile
@@ -1,7 +1,10 @@
-LEVEL = ../../../make
 OBJCXX_SOURCES := main.mm myobject.mm
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
+CFLAGS_NO_DEBUG =
+ifeq "$(OS)" "Darwin"
+		CFLAGS_NO_DEBUG += -arch $(ARCH)
+endif
 
 # myobject.o needs to be built without debug info
 myobject.o: myobject.mm
-	$(CXX) -c -o $@ $<
+	$(CXX) $(CFLAGS_NO_DEBUG) -c -o $@ $<
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
index c258c4d..7cfe4a3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJCXX_SOURCES := main.mm
-LDFLAGS = $(CFLAGS) -lobjc -framework CoreFoundation
+LD_EXTRAS := -lobjc -framework CoreFoundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/TestObjCXXBridgedPO.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/TestObjCXXBridgedPO.py
index ecaf1e1..6f3275b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/TestObjCXXBridgedPO.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/cxx-bridged-po/TestObjCXXBridgedPO.py
@@ -7,9 +7,6 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        TestBase.setUp(self)
-
     @skipUnlessDarwin
     def test_bridged_type_po(self):
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
index edd3430..3af75c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJCXX_SOURCES := main.mm
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/TestObjCXXHideRuntimeValues.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/TestObjCXXHideRuntimeValues.py
index 5fe14fe..cc6ac20 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/TestObjCXXHideRuntimeValues.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/hide-runtime-values/TestObjCXXHideRuntimeValues.py
@@ -2,7 +2,6 @@
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
-import os
 import unittest2
 
 
@@ -10,9 +9,6 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        TestBase.setUp(self)
-
     @skipIfFreeBSD
     @skipIfLinux
     @skipIfWindows
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
index edd3430..3af75c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lang/objcxx/sample/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 OBJCXX_SOURCES := main.mm
-LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+LD_EXTRAS := -lobjc -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
index 71a5c11..98042d6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/add-symbols/Makefile
@@ -1,6 +1,5 @@
-LEVEL = ../../make
 CXX_SOURCES := main.cpp
-LD_EXTRAS += -Wl,--build-id=none
+LD_EXTRAS := -Wl,--build-id=none
 
 all: stripped.out
 
@@ -10,4 +9,4 @@
 clean::
 	$(RM) stripped.out
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py
index 946c151..33975d2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/add-symbols/TestTargetSymbolsAddCommand.py
@@ -1,8 +1,5 @@
 """ Testing explicit symbol loading via target symbols add. """
-import os
-import time
 import lldb
-import sys
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py
index 7ffc29f..22de873 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/builtin_trap/TestBuiltinTrap.py
@@ -3,10 +3,8 @@
 '__builtin_trap' intrinsic, which GCC (4.6) encodes to an illegal opcode.
 """
 
-from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -25,7 +23,7 @@
 
     # gcc generates incorrect linetable
     @expectedFailureAll(archs="arm", compiler="gcc", triple=".*-android")
-    @expectedFailureAll(oslist=['linux'], archs=['arm'])
+    @expectedFailureAll(oslist=['linux'], archs=['arm', 'aarch64'])
     @skipIfWindows
     def test_with_run_command(self):
         """Test that LLDB handles a function with __builtin_trap correctly."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
index 7cfad32..4f3dd56 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/Makefile
@@ -1,9 +1,7 @@
-LEVEL := ../../make
-
 C_SOURCES := a.c b.c
-a.o: CFLAGS_EXTRAS += -gsplit-dwarf
+a.o: CFLAGS_EXTRAS := -gsplit-dwarf
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 .PHONY: clean
 clean::
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py
index db91c39..7c7c76d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/mix-dwo-and-regular-objects/TestMixedDwarfBinary.py
@@ -1,7 +1,5 @@
 """ Testing debugging of a binary with "mixed" dwarf (with/without fission). """
-import os
 import lldb
-import sys
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -10,9 +8,6 @@
 class TestMixedDwarfBinary(TestBase):
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        TestBase.setUp(self)
-
     @no_debug_info_test  # Prevent the genaration of the dwarf version of this test
     @add_test_categories(["dwo"])
     @skipUnlessPlatform(["linux"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/Makefile
index 3fd14a7..a290c8c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/Makefile
@@ -1,4 +1,3 @@
-LEVEL = ../../make
 C_SOURCES := main.c
 
 all: dirsymlink
@@ -17,4 +16,4 @@
 clean::
 	$(RM) -r dirreal dirsymlink
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py
index 1250681..7338332 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/sepdebugsymlink/TestTargetSymbolsSepDebugSymlink.py
@@ -1,8 +1,5 @@
 """ Testing separate debug info loading for base binary with a symlink. """
-import os
-import time
 import lldb
-import sys
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/Makefile
index 67aa166..566938c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 ENABLE_THREADS := YES
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
index 702d124..c4d6461d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/linux/thread/create_during_instruction_step/TestCreateDuringInstructionStep.py
@@ -3,10 +3,8 @@
 over a thread creation instruction.
 """
 
-from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbcurses.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbcurses.py
deleted file mode 100644
index ae0082c..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbcurses.py
+++ /dev/null
@@ -1,1308 +0,0 @@
-from __future__ import absolute_import
-
-# System modules
-import curses
-import curses.panel
-import sys
-import time
-
-# Third-party modules
-import six
-
-# LLDB modules
-
-
-class Point(object):
-
-    def __init__(self, x, y):
-        self.x = x
-        self.y = y
-
-    def __repr__(self):
-        return str(self)
-
-    def __str__(self):
-        return "(x=%u, y=%u)" % (self.x, self.y)
-
-    def __eq__(self, rhs):
-        return self.x == rhs.x and self.y == rhs.y
-
-    def __ne__(self, rhs):
-        return self.x != rhs.x or self.y != rhs.y
-
-    def is_valid_coordinate(self):
-        return self.x >= 0 and self.y >= 0
-
-
-class Size(object):
-
-    def __init__(self, w, h):
-        self.w = w
-        self.h = h
-
-    def __repr__(self):
-        return str(self)
-
-    def __str__(self):
-        return "(w=%u, h=%u)" % (self.w, self.h)
-
-    def __eq__(self, rhs):
-        return self.w == rhs.w and self.h == rhs.h
-
-    def __ne__(self, rhs):
-        return self.w != rhs.w or self.h != rhs.h
-
-
-class Rect(object):
-
-    def __init__(self, x=0, y=0, w=0, h=0):
-        self.origin = Point(x, y)
-        self.size = Size(w, h)
-
-    def __repr__(self):
-        return str(self)
-
-    def __str__(self):
-        return "{ %s, %s }" % (str(self.origin), str(self.size))
-
-    def get_min_x(self):
-        return self.origin.x
-
-    def get_max_x(self):
-        return self.origin.x + self.size.w
-
-    def get_min_y(self):
-        return self.origin.y
-
-    def get_max_y(self):
-        return self.origin.y + self.size.h
-
-    def contains_point(self, pt):
-        if pt.x < self.get_max_x():
-            if pt.y < self.get_max_y():
-                if pt.x >= self.get_min_y():
-                    return pt.y >= self.get_min_y()
-        return False
-
-    def __eq__(self, rhs):
-        return self.origin == rhs.origin and self.size == rhs.size
-
-    def __ne__(self, rhs):
-        return self.origin != rhs.origin or self.size != rhs.size
-
-
-class QuitException(Exception):
-
-    def __init__(self):
-        super(QuitException, self).__init__('QuitException')
-
-
-class Window(object):
-
-    def __init__(self, window, delegate=None, can_become_first_responder=True):
-        self.window = window
-        self.parent = None
-        self.delegate = delegate
-        self.children = list()
-        self.first_responders = list()
-        self.can_become_first_responder = can_become_first_responder
-        self.key_actions = dict()
-
-    def add_child(self, window):
-        self.children.append(window)
-        window.parent = self
-
-    def resize(self, size):
-        self.window.resize(size.h, size.w)
-
-    def resize_child(self, child, delta_size, adjust_neighbors):
-        if child in self.children:
-            frame = self.get_frame()
-            orig_frame = child.get_frame()
-            new_frame = Rect(
-                x=orig_frame.origin.x,
-                y=orig_frame.origin.y,
-                w=orig_frame.size.w +
-                delta_size.w,
-                h=orig_frame.size.h +
-                delta_size.h)
-            old_child_max_x = orig_frame.get_max_x()
-            new_child_max_x = new_frame.get_max_x()
-            window_max_x = frame.get_max_x()
-            if new_child_max_x < window_max_x:
-                child.resize(new_frame.size)
-                if old_child_max_x == window_max_x:
-                    new_frame.origin.x += window_max_x - new_child_max_x
-                    child.set_position(new_frame.origin)
-            elif new_child_max_x > window_max_x:
-                new_frame.origin.x -= new_child_max_x - window_max_x
-                child.set_position(new_frame.origin)
-                child.resize(new_frame.size)
-
-            if adjust_neighbors:
-                #print('orig_frame = %s\r\n' % (str(orig_frame)), end='')
-                for curr_child in self.children:
-                    if curr_child is child:
-                        continue
-                    curr_child_frame = curr_child.get_frame()
-                    if delta_size.w != 0:
-                        #print('curr_child_frame = %s\r\n' % (str(curr_child_frame)), end='')
-                        if curr_child_frame.get_min_x() == orig_frame.get_max_x():
-                            curr_child_frame.origin.x += delta_size.w
-                            curr_child_frame.size.w -= delta_size.w
-                            #print('adjusted curr_child_frame = %s\r\n' % (str(curr_child_frame)), end='')
-                            curr_child.resize(curr_child_frame.size)
-                            curr_child.slide_position(
-                                Size(w=delta_size.w, h=0))
-                        elif curr_child_frame.get_max_x() == orig_frame.get_min_x():
-                            curr_child_frame.size.w -= delta_size.w
-                            #print('adjusted curr_child_frame = %s\r\n' % (str(curr_child_frame)), end='')
-                            curr_child.resize(curr_child_frame.size)
-
-    def add_key_action(self, arg, callback, decription):
-        if isinstance(arg, list):
-            for key in arg:
-                self.add_key_action(key, callback, description)
-        else:
-            if isinstance(arg, six.integer_types):
-                key_action_dict = {'key': arg,
-                                   'callback': callback,
-                                   'description': decription}
-                self.key_actions[arg] = key_action_dict
-            elif isinstance(arg, basestring):
-                key_integer = ord(arg)
-                key_action_dict = {'key': key_integer,
-                                   'callback': callback,
-                                   'description': decription}
-                self.key_actions[key_integer] = key_action_dict
-            else:
-                raise ValueError
-
-    def draw_title_box(self, title):
-        is_in_first_responder_chain = self.is_in_first_responder_chain()
-        if is_in_first_responder_chain:
-            self.attron(curses.A_REVERSE)
-        self.box()
-        if is_in_first_responder_chain:
-            self.attroff(curses.A_REVERSE)
-        if title:
-            self.addstr(Point(x=2, y=0), ' ' + title + ' ')
-
-    def remove_child(self, window):
-        self.children.remove(window)
-
-    def get_first_responder(self):
-        if len(self.first_responders):
-            return self.first_responders[-1]
-        else:
-            return None
-
-    def set_first_responder(self, window):
-        if window.can_become_first_responder:
-            if six.callable(
-                getattr(
-                    window,
-                    "hidden",
-                    None)) and window.hidden():
-                return False
-            if window not in self.children:
-                self.add_child(window)
-            # See if we have a current first responder, and if we do, let it know that
-            # it will be resigning as first responder
-            first_responder = self.get_first_responder()
-            if first_responder:
-                first_responder.relinquish_first_responder()
-            # Now set the first responder to "window"
-            if len(self.first_responders) == 0:
-                self.first_responders.append(window)
-            else:
-                self.first_responders[-1] = window
-            return True
-        else:
-            return False
-
-    def push_first_responder(self, window):
-        # Only push the window as the new first responder if the window isn't
-        # already the first responder
-        if window != self.get_first_responder():
-            self.first_responders.append(window)
-
-    def pop_first_responder(self, window):
-        # Only pop the window from the first responder list if it is the first
-        # responder
-        if window == self.get_first_responder():
-            old_first_responder = self.first_responders.pop()
-            old_first_responder.relinquish_first_responder()
-            return True
-        else:
-            return False
-
-    def relinquish_first_responder(self):
-        '''Override if there is something that you need to do when you lose first responder status.'''
-        pass
-
-    # def resign_first_responder(self, remove_from_parent, new_first_responder):
-    #     success = False
-    #     if self.parent:
-    #         if self.is_first_responder():
-    #             self.relinquish_first_responder()
-    #             if len(self.parent.first_responder):
-    #             self.parent.first_responder = None
-    #             success = True
-    #         if remove_from_parent:
-    #             self.parent.remove_child(self)
-    #         if new_first_responder:
-    #             self.parent.set_first_responder(new_first_responder)
-    #         else:
-    #             self.parent.select_next_first_responder()
-    #     return success
-
-    def is_first_responder(self):
-        if self.parent:
-            return self.parent.get_first_responder() == self
-        else:
-            return False
-
-    def is_in_first_responder_chain(self):
-        if self.parent:
-            return self in self.parent.first_responders
-        else:
-            return False
-
-    def select_next_first_responder(self):
-        if len(self.first_responders) > 1:
-            self.pop_first_responder(self.first_responders[-1])
-        else:
-            num_children = len(self.children)
-            if num_children == 1:
-                return self.set_first_responder(self.children[0])
-            for (i, window) in enumerate(self.children):
-                if window.is_first_responder():
-                    break
-            if i < num_children:
-                for i in range(i + 1, num_children):
-                    if self.set_first_responder(self.children[i]):
-                        return True
-                for i in range(0, i):
-                    if self.set_first_responder(self.children[i]):
-                        return True
-
-    def point_in_window(self, pt):
-        size = self.get_size()
-        return pt.x >= 0 and pt.x < size.w and pt.y >= 0 and pt.y < size.h
-
-    def addch(self, c):
-        try:
-            self.window.addch(c)
-        except:
-            pass
-
-    def addch_at_point(self, pt, c):
-        try:
-            self.window.addch(pt.y, pt.x, c)
-        except:
-            pass
-
-    def addstr(self, pt, str):
-        try:
-            self.window.addstr(pt.y, pt.x, str)
-        except:
-            pass
-
-    def addnstr_at_point(self, pt, str, n):
-        try:
-            self.window.addnstr(pt.y, pt.x, str, n)
-        except:
-            pass
-
-    def addnstr(self, str, n):
-        try:
-            self.window.addnstr(str, n)
-        except:
-            pass
-
-    def attron(self, attr):
-        return self.window.attron(attr)
-
-    def attroff(self, attr):
-        return self.window.attroff(attr)
-
-    def box(self, vertch=0, horch=0):
-        if vertch == 0:
-            vertch = curses.ACS_VLINE
-        if horch == 0:
-            horch = curses.ACS_HLINE
-        self.window.box(vertch, horch)
-
-    def get_contained_rect(
-            self,
-            top_inset=0,
-            bottom_inset=0,
-            left_inset=0,
-            right_inset=0,
-            height=-1,
-            width=-1):
-        '''Get a rectangle based on the top "height" lines of this window'''
-        rect = self.get_frame()
-        x = rect.origin.x + left_inset
-        y = rect.origin.y + top_inset
-        if height == -1:
-            h = rect.size.h - (top_inset + bottom_inset)
-        else:
-            h = height
-        if width == -1:
-            w = rect.size.w - (left_inset + right_inset)
-        else:
-            w = width
-        return Rect(x=x, y=y, w=w, h=h)
-
-    def erase(self):
-        self.window.erase()
-
-    def get_cursor(self):
-        (y, x) = self.window.getyx()
-        return Point(x=x, y=y)
-
-    def get_frame(self):
-        position = self.get_position()
-        size = self.get_size()
-        return Rect(x=position.x, y=position.y, w=size.w, h=size.h)
-
-    def get_frame_in_parent(self):
-        position = self.get_position_in_parent()
-        size = self.get_size()
-        return Rect(x=position.x, y=position.y, w=size.w, h=size.h)
-
-    def get_position_in_parent(self):
-        (y, x) = self.window.getparyx()
-        return Point(x, y)
-
-    def get_position(self):
-        (y, x) = self.window.getbegyx()
-        return Point(x, y)
-
-    def get_size(self):
-        (y, x) = self.window.getmaxyx()
-        return Size(w=x, h=y)
-
-    def move(self, pt):
-        self.window.move(pt.y, pt.x)
-
-    def refresh(self):
-        self.update()
-        curses.panel.update_panels()
-        self.move(Point(x=0, y=0))
-        return self.window.refresh()
-
-    def resize(self, size):
-        return self.window.resize(size.h, size.w)
-
-    def timeout(self, timeout_msec):
-        return self.window.timeout(timeout_msec)
-
-    def handle_key(self, key, check_parent=True):
-        '''Handle a key press in this window.'''
-
-        # First try the first responder if this window has one, but don't allow
-        # it to check with its parent (False second parameter) so we don't recurse
-        # and get a stack overflow
-        for first_responder in reversed(self.first_responders):
-            if first_responder.handle_key(key, False):
-                return True
-
-        # Check our key map to see if we have any actions. Actions don't take
-        # any arguments, they must be callable
-        if key in self.key_actions:
-            key_action = self.key_actions[key]
-            key_action['callback']()
-            return True
-        # Check if there is a wildcard key for any key
-        if -1 in self.key_actions:
-            key_action = self.key_actions[-1]
-            key_action['callback']()
-            return True
-        # Check if the window delegate wants to handle this key press
-        if self.delegate:
-            if six.callable(getattr(self.delegate, "handle_key", None)):
-                if self.delegate.handle_key(self, key):
-                    return True
-            if self.delegate(self, key):
-                return True
-        # Check if we have a parent window and if so, let the parent
-        # window handle the key press
-        if check_parent and self.parent:
-            return self.parent.handle_key(key, True)
-        else:
-            return False  # Key not handled
-
-    def update(self):
-        for child in self.children:
-            child.update()
-
-    def quit_action(self):
-        raise QuitException
-
-    def get_key(self, timeout_msec=-1):
-        self.timeout(timeout_msec)
-        done = False
-        c = self.window.getch()
-        if c == 27:
-            self.timeout(0)
-            escape_key = 0
-            while True:
-                escape_key = self.window.getch()
-                if escape_key == -1:
-                    break
-                else:
-                    c = c << 8 | escape_key
-            self.timeout(timeout_msec)
-        return c
-
-    def key_event_loop(self, timeout_msec=-1, n=sys.maxsize):
-        '''Run an event loop to receive key presses and pass them along to the
-           responder chain.
-
-           timeout_msec is the timeout it milliseconds. If the value is -1, an
-           infinite wait will be used. It the value is zero, a non-blocking mode
-           will be used, and if greater than zero it will wait for a key press
-           for timeout_msec milliseconds.
-
-           n is the number of times to go through the event loop before exiting'''
-        done = False
-        while not done and n > 0:
-            c = self.get_key(timeout_msec)
-            if c != -1:
-                try:
-                    self.handle_key(c)
-                except QuitException:
-                    done = True
-            n -= 1
-
-
-class Panel(Window):
-
-    def __init__(self, frame, delegate=None, can_become_first_responder=True):
-        window = curses.newwin(
-            frame.size.h,
-            frame.size.w,
-            frame.origin.y,
-            frame.origin.x)
-        super(
-            Panel,
-            self).__init__(
-            window,
-            delegate,
-            can_become_first_responder)
-        self.panel = curses.panel.new_panel(window)
-
-    def hide(self):
-        return self.panel.hide()
-
-    def hidden(self):
-        return self.panel.hidden()
-
-    def show(self):
-        return self.panel.show()
-
-    def top(self):
-        return self.panel.top()
-
-    def set_position(self, pt):
-        self.panel.move(pt.y, pt.x)
-
-    def slide_position(self, size):
-        new_position = self.get_position()
-        new_position.x = new_position.x + size.w
-        new_position.y = new_position.y + size.h
-        self.set_position(new_position)
-
-
-class BoxedPanel(Panel):
-
-    def __init__(self, frame, title, delegate=None,
-                 can_become_first_responder=True):
-        super(
-            BoxedPanel,
-            self).__init__(
-            frame,
-            delegate,
-            can_become_first_responder)
-        self.title = title
-        self.lines = list()
-        self.first_visible_idx = 0
-        self.selected_idx = -1
-        self.add_key_action(
-            curses.KEY_UP,
-            self.select_prev,
-            "Select the previous item")
-        self.add_key_action(
-            curses.KEY_DOWN,
-            self.select_next,
-            "Select the next item")
-        self.add_key_action(
-            curses.KEY_HOME,
-            self.scroll_begin,
-            "Go to the beginning of the list")
-        self.add_key_action(
-            curses.KEY_END,
-            self.scroll_end,
-            "Go to the end of the list")
-        self.add_key_action(
-            0x1b4f48,
-            self.scroll_begin,
-            "Go to the beginning of the list")
-        self.add_key_action(
-            0x1b4f46,
-            self.scroll_end,
-            "Go to the end of the list")
-        self.add_key_action(
-            curses.KEY_PPAGE,
-            self.scroll_page_backward,
-            "Scroll to previous page")
-        self.add_key_action(
-            curses.KEY_NPAGE,
-            self.scroll_page_forward,
-            "Scroll to next forward")
-        self.update()
-
-    def clear(self, update=True):
-        self.lines = list()
-        self.first_visible_idx = 0
-        self.selected_idx = -1
-        if update:
-            self.update()
-
-    def get_usable_width(self):
-        '''Valid usable width is 0 to (width - 3) since the left and right lines display the box around
-           this frame and we skip a leading space'''
-        w = self.get_size().w
-        if w > 3:
-            return w - 3
-        else:
-            return 0
-
-    def get_usable_height(self):
-        '''Valid line indexes are 0 to (height - 2) since the top and bottom lines display the box around this frame.'''
-        h = self.get_size().h
-        if h > 2:
-            return h - 2
-        else:
-            return 0
-
-    def get_point_for_line(self, global_line_idx):
-        '''Returns the point to use when displaying a line whose index is "line_idx"'''
-        line_idx = global_line_idx - self.first_visible_idx
-        num_lines = self.get_usable_height()
-        if line_idx < num_lines:
-            return Point(x=2, y=1 + line_idx)
-        else:
-            # return an invalid coordinate if the line index isn't valid
-            return Point(x=-1, y=-1)
-
-    def set_title(self, title, update=True):
-        self.title = title
-        if update:
-            self.update()
-
-    def scroll_to_line(self, idx):
-        if idx < len(self.lines):
-            self.selected_idx = idx
-            max_visible_lines = self.get_usable_height()
-            if idx < self.first_visible_idx or idx >= self.first_visible_idx + max_visible_lines:
-                self.first_visible_idx = idx
-            self.refresh()
-
-    def scroll_begin(self):
-        self.first_visible_idx = 0
-        if len(self.lines) > 0:
-            self.selected_idx = 0
-        else:
-            self.selected_idx = -1
-        self.update()
-
-    def scroll_end(self):
-        max_visible_lines = self.get_usable_height()
-        num_lines = len(self.lines)
-        if num_lines > max_visible_lines:
-            self.first_visible_idx = num_lines - max_visible_lines
-        else:
-            self.first_visible_idx = 0
-        self.selected_idx = num_lines - 1
-        self.update()
-
-    def scroll_page_backward(self):
-        num_lines = len(self.lines)
-        max_visible_lines = self.get_usable_height()
-        new_index = self.first_visible_idx - max_visible_lines
-        if new_index < 0:
-            self.first_visible_idx = 0
-        else:
-            self.first_visible_idx = new_index
-        self.refresh()
-
-    def scroll_page_forward(self):
-        max_visible_lines = self.get_usable_height()
-        self.first_visible_idx += max_visible_lines
-        self._adjust_first_visible_line()
-        self.refresh()
-
-    def select_next(self):
-        self.selected_idx += 1
-        if self.selected_idx >= len(self.lines):
-            self.selected_idx = len(self.lines) - 1
-        self.refresh()
-
-    def select_prev(self):
-        self.selected_idx -= 1
-        if self.selected_idx < 0:
-            if len(self.lines) > 0:
-                self.selected_idx = 0
-            else:
-                self.selected_idx = -1
-        self.refresh()
-
-    def get_selected_idx(self):
-        return self.selected_idx
-
-    def _adjust_first_visible_line(self):
-        num_lines = len(self.lines)
-        max_visible_lines = self.get_usable_height()
-        if (self.first_visible_idx >= num_lines) or (
-                num_lines - self.first_visible_idx) > max_visible_lines:
-            self.first_visible_idx = num_lines - max_visible_lines
-
-    def append_line(self, s, update=True):
-        self.lines.append(s)
-        self._adjust_first_visible_line()
-        if update:
-            self.update()
-
-    def set_line(self, line_idx, s, update=True):
-        '''Sets a line "line_idx" within the boxed panel to be "s"'''
-        if line_idx < 0:
-            return
-        while line_idx >= len(self.lines):
-            self.lines.append('')
-        self.lines[line_idx] = s
-        self._adjust_first_visible_line()
-        if update:
-            self.update()
-
-    def update(self):
-        self.erase()
-        self.draw_title_box(self.title)
-        max_width = self.get_usable_width()
-        for line_idx in range(self.first_visible_idx, len(self.lines)):
-            pt = self.get_point_for_line(line_idx)
-            if pt.is_valid_coordinate():
-                is_selected = line_idx == self.selected_idx
-                if is_selected:
-                    self.attron(curses.A_REVERSE)
-                self.move(pt)
-                self.addnstr(self.lines[line_idx], max_width)
-                if is_selected:
-                    self.attroff(curses.A_REVERSE)
-            else:
-                return
-
-    def load_file(self, path):
-        f = open(path)
-        if f:
-            self.lines = f.read().splitlines()
-            for (idx, line) in enumerate(self.lines):
-                # Remove any tabs from lines since they hose up the display
-                if "\t" in line:
-                    self.lines[idx] = (8 * ' ').join(line.split('\t'))
-        self.selected_idx = 0
-        self.first_visible_idx = 0
-        self.refresh()
-
-
-class Item(object):
-
-    def __init__(self, title, action):
-        self.title = title
-        self.action = action
-
-
-class TreeItemDelegate(object):
-
-    def might_have_children(self):
-        return False
-
-    def update_children(self, item):
-        '''Return a list of child Item objects'''
-        return None
-
-    def draw_item_string(self, tree_window, item, s):
-        pt = tree_window.get_cursor()
-        width = tree_window.get_size().w - 1
-        if width > pt.x:
-            tree_window.addnstr(s, width - pt.x)
-
-    def draw_item(self, tree_window, item):
-        self.draw_item_string(tree_window, item, item.title)
-
-    def do_action(self):
-        pass
-
-
-class TreeItem(object):
-
-    def __init__(
-            self,
-            delegate,
-            parent=None,
-            title=None,
-            action=None,
-            is_expanded=False):
-        self.parent = parent
-        self.title = title
-        self.action = action
-        self.delegate = delegate
-        self.is_expanded = not parent or is_expanded
-        self._might_have_children = None
-        self.children = None
-        self._children_might_have_children = False
-
-    def get_children(self):
-        if self.is_expanded and self.might_have_children():
-            if self.children is None:
-                self._children_might_have_children = False
-                self.children = self.update_children()
-                for child in self.children:
-                    if child.might_have_children():
-                        self._children_might_have_children = True
-                        break
-        else:
-            self._children_might_have_children = False
-            self.children = None
-        return self.children
-
-    def append_visible_items(self, items):
-        items.append(self)
-        children = self.get_children()
-        if children:
-            for child in children:
-                child.append_visible_items(items)
-
-    def might_have_children(self):
-        if self._might_have_children is None:
-            if not self.parent:
-                # Root item always might have children
-                self._might_have_children = True
-            else:
-                # Check with the delegate to see if the item might have
-                # children
-                self._might_have_children = self.delegate.might_have_children()
-        return self._might_have_children
-
-    def children_might_have_children(self):
-        return self._children_might_have_children
-
-    def update_children(self):
-        if self.is_expanded and self.might_have_children():
-            self.children = self.delegate.update_children(self)
-            for child in self.children:
-                child.update_children()
-        else:
-            self.children = None
-        return self.children
-
-    def get_num_visible_rows(self):
-        rows = 1
-        if self.is_expanded:
-            children = self.get_children()
-            if children:
-                for child in children:
-                    rows += child.get_num_visible_rows()
-        return rows
-
-    def draw(self, tree_window, row):
-        display_row = tree_window.get_display_row(row)
-        if display_row >= 0:
-            tree_window.move(tree_window.get_item_draw_point(row))
-            if self.parent:
-                self.parent.draw_tree_for_child(tree_window, self, 0)
-            if self.might_have_children():
-                tree_window.addch(curses.ACS_DIAMOND)
-                tree_window.addch(curses.ACS_HLINE)
-            elif self.parent and self.parent.children_might_have_children():
-                if self.parent.parent:
-                    tree_window.addch(curses.ACS_HLINE)
-                    tree_window.addch(curses.ACS_HLINE)
-                else:
-                    tree_window.addch(' ')
-                    tree_window.addch(' ')
-            is_selected = tree_window.is_selected(row)
-            if is_selected:
-                tree_window.attron(curses.A_REVERSE)
-            self.delegate.draw_item(tree_window, self)
-            if is_selected:
-                tree_window.attroff(curses.A_REVERSE)
-
-    def draw_tree_for_child(self, tree_window, child, reverse_depth):
-        if self.parent:
-            self.parent.draw_tree_for_child(
-                tree_window, self, reverse_depth + 1)
-            if self.children[-1] == child:
-                # Last child
-                if reverse_depth == 0:
-                    tree_window.addch(curses.ACS_LLCORNER)
-                    tree_window.addch(curses.ACS_HLINE)
-                else:
-                    tree_window.addch(' ')
-                    tree_window.addch(' ')
-            else:
-                # Middle child
-                if reverse_depth == 0:
-                    tree_window.addch(curses.ACS_LTEE)
-                    tree_window.addch(curses.ACS_HLINE)
-                else:
-                    tree_window.addch(curses.ACS_VLINE)
-                    tree_window.addch(' ')
-
-    def was_selected(self):
-        self.delegate.do_action()
-
-
-class TreePanel(Panel):
-
-    def __init__(self, frame, title, root_item):
-        self.root_item = root_item
-        self.title = title
-        self.first_visible_idx = 0
-        self.selected_idx = 0
-        self.items = None
-        super(TreePanel, self).__init__(frame)
-        self.add_key_action(
-            curses.KEY_UP,
-            self.select_prev,
-            "Select the previous item")
-        self.add_key_action(
-            curses.KEY_DOWN,
-            self.select_next,
-            "Select the next item")
-        self.add_key_action(
-            curses.KEY_RIGHT,
-            self.right_arrow,
-            "Expand an item")
-        self.add_key_action(
-            curses.KEY_LEFT,
-            self.left_arrow,
-            "Unexpand an item or navigate to parent")
-        self.add_key_action(
-            curses.KEY_HOME,
-            self.scroll_begin,
-            "Go to the beginning of the tree")
-        self.add_key_action(
-            curses.KEY_END,
-            self.scroll_end,
-            "Go to the end of the tree")
-        self.add_key_action(
-            0x1b4f48,
-            self.scroll_begin,
-            "Go to the beginning of the tree")
-        self.add_key_action(
-            0x1b4f46,
-            self.scroll_end,
-            "Go to the end of the tree")
-        self.add_key_action(
-            curses.KEY_PPAGE,
-            self.scroll_page_backward,
-            "Scroll to previous page")
-        self.add_key_action(
-            curses.KEY_NPAGE,
-            self.scroll_page_forward,
-            "Scroll to next forward")
-
-    def get_selected_item(self):
-        if self.selected_idx < len(self.items):
-            return self.items[self.selected_idx]
-        else:
-            return None
-
-    def select_item(self, item):
-        if self.items and item in self.items:
-            self.selected_idx = self.items.index(item)
-            return True
-        else:
-            return False
-
-    def get_visible_items(self):
-        # Clear self.items when you want to update all chidren
-        if self.items is None:
-            self.items = list()
-            children = self.root_item.get_children()
-            if children:
-                for child in children:
-                    child.append_visible_items(self.items)
-        return self.items
-
-    def update(self):
-        self.erase()
-        self.draw_title_box(self.title)
-        visible_items = self.get_visible_items()
-        for (row, child) in enumerate(visible_items):
-            child.draw(self, row)
-
-    def get_item_draw_point(self, row):
-        display_row = self.get_display_row(row)
-        if display_row >= 0:
-            return Point(2, display_row + 1)
-        else:
-            return Point(-1, -1)
-
-    def get_display_row(self, row):
-        if row >= self.first_visible_idx:
-            display_row = row - self.first_visible_idx
-            if display_row < self.get_size().h - 2:
-                return display_row
-        return -1
-
-    def is_selected(self, row):
-        return row == self.selected_idx
-
-    def get_num_lines(self):
-        self.get_visible_items()
-        return len(self.items)
-
-    def get_num_visible_lines(self):
-        return self.get_size().h - 2
-
-    def select_next(self):
-        self.selected_idx += 1
-        num_lines = self.get_num_lines()
-        if self.selected_idx >= num_lines:
-            self.selected_idx = num_lines - 1
-        self._selection_changed()
-        self.refresh()
-
-    def select_prev(self):
-        self.selected_idx -= 1
-        if self.selected_idx < 0:
-            num_lines = self.get_num_lines()
-            if num_lines > 0:
-                self.selected_idx = 0
-            else:
-                self.selected_idx = -1
-        self._selection_changed()
-        self.refresh()
-
-    def scroll_begin(self):
-        self.first_visible_idx = 0
-        num_lines = self.get_num_lines()
-        if num_lines > 0:
-            self.selected_idx = 0
-        else:
-            self.selected_idx = -1
-        self.refresh()
-
-    def redisplay_tree(self):
-        self.items = None
-        self.refresh()
-
-    def right_arrow(self):
-        selected_item = self.get_selected_item()
-        if selected_item and selected_item.is_expanded == False:
-            selected_item.is_expanded = True
-            self.redisplay_tree()
-
-    def left_arrow(self):
-        selected_item = self.get_selected_item()
-        if selected_item:
-            if selected_item.is_expanded:
-                selected_item.is_expanded = False
-                self.redisplay_tree()
-            elif selected_item.parent:
-                if self.select_item(selected_item.parent):
-                    self.refresh()
-
-    def scroll_end(self):
-        num_visible_lines = self.get_num_visible_lines()
-        num_lines = self.get_num_lines()
-        if num_lines > num_visible_lines:
-            self.first_visible_idx = num_lines - num_visible_lines
-        else:
-            self.first_visible_idx = 0
-        self.selected_idx = num_lines - 1
-        self.refresh()
-
-    def scroll_page_backward(self):
-        num_visible_lines = self.get_num_visible_lines()
-        new_index = self.selected_idx - num_visible_lines
-        if new_index < 0:
-            self.selected_idx = 0
-        else:
-            self.selected_idx = new_index
-        self._selection_changed()
-        self.refresh()
-
-    def scroll_page_forward(self):
-        num_lines = self.get_num_lines()
-        num_visible_lines = self.get_num_visible_lines()
-        new_index = self.selected_idx + num_visible_lines
-        if new_index >= num_lines:
-            new_index = num_lines - 1
-        self.selected_idx = new_index
-        self._selection_changed()
-        self.refresh()
-
-    def _selection_changed(self):
-        num_lines = self.get_num_lines()
-        num_visible_lines = self.get_num_visible_lines()
-        last_visible_index = self.first_visible_idx + num_visible_lines
-        if self.selected_idx >= last_visible_index:
-            self.first_visible_idx += (self.selected_idx -
-                                       last_visible_index + 1)
-        if self.selected_idx < self.first_visible_idx:
-            self.first_visible_idx = self.selected_idx
-        if self.selected_idx >= 0 and self.selected_idx < len(self.items):
-            item = self.items[self.selected_idx]
-            item.was_selected()
-
-
-class Menu(BoxedPanel):
-
-    def __init__(self, title, items):
-        max_title_width = 0
-        for item in items:
-            if max_title_width < len(item.title):
-                max_title_width = len(item.title)
-        frame = Rect(x=0, y=0, w=max_title_width + 4, h=len(items) + 2)
-        super(
-            Menu,
-            self).__init__(
-            frame,
-            title=None,
-            delegate=None,
-            can_become_first_responder=True)
-        self.selected_idx = 0
-        self.title = title
-        self.items = items
-        for (item_idx, item) in enumerate(items):
-            self.set_line(item_idx, item.title)
-        self.hide()
-
-    def update(self):
-        super(Menu, self).update()
-
-    def relinquish_first_responder(self):
-        if not self.hidden():
-            self.hide()
-
-    def perform_action(self):
-        selected_idx = self.get_selected_idx()
-        if selected_idx < len(self.items):
-            action = self.items[selected_idx].action
-            if action:
-                action()
-
-
-class MenuBar(Panel):
-
-    def __init__(self, frame):
-        super(MenuBar, self).__init__(frame, can_become_first_responder=True)
-        self.menus = list()
-        self.selected_menu_idx = -1
-        self.add_key_action(
-            curses.KEY_LEFT,
-            self.select_prev,
-            "Select the previous menu")
-        self.add_key_action(
-            curses.KEY_RIGHT,
-            self.select_next,
-            "Select the next menu")
-        self.add_key_action(
-            curses.KEY_DOWN,
-            lambda: self.select(0),
-            "Select the first menu")
-        self.add_key_action(
-            27,
-            self.relinquish_first_responder,
-            "Hide current menu")
-        self.add_key_action(
-            curses.KEY_ENTER,
-            self.perform_action,
-            "Select the next menu item")
-        self.add_key_action(
-            10,
-            self.perform_action,
-            "Select the next menu item")
-
-    def insert_menu(self, menu, index=sys.maxsize):
-        if index >= len(self.menus):
-            self.menus.append(menu)
-        else:
-            self.menus.insert(index, menu)
-        pt = self.get_position()
-        for menu in self.menus:
-            menu.set_position(pt)
-            pt.x += len(menu.title) + 5
-
-    def perform_action(self):
-        '''If no menu is visible, show the first menu. If a menu is visible, perform the action
-           associated with the selected menu item in the menu'''
-        menu_visible = False
-        for menu in self.menus:
-            if not menu.hidden():
-                menu_visible = True
-                break
-        if menu_visible:
-            menu.perform_action()
-            self.selected_menu_idx = -1
-            self._selected_menu_changed()
-        else:
-            self.select(0)
-
-    def relinquish_first_responder(self):
-        if self.selected_menu_idx >= 0:
-            self.selected_menu_idx = -1
-            self._selected_menu_changed()
-
-    def _selected_menu_changed(self):
-        for (menu_idx, menu) in enumerate(self.menus):
-            is_hidden = menu.hidden()
-            if menu_idx != self.selected_menu_idx:
-                if not is_hidden:
-                    if self.parent.pop_first_responder(menu) == False:
-                        menu.hide()
-        for (menu_idx, menu) in enumerate(self.menus):
-            is_hidden = menu.hidden()
-            if menu_idx == self.selected_menu_idx:
-                if is_hidden:
-                    menu.show()
-                    self.parent.push_first_responder(menu)
-                menu.top()
-        self.parent.refresh()
-
-    def select(self, index):
-        if index < len(self.menus):
-            self.selected_menu_idx = index
-            self._selected_menu_changed()
-
-    def select_next(self):
-        num_menus = len(self.menus)
-        if self.selected_menu_idx == -1:
-            if num_menus > 0:
-                self.selected_menu_idx = 0
-                self._selected_menu_changed()
-        else:
-            if self.selected_menu_idx + 1 < num_menus:
-                self.selected_menu_idx += 1
-            else:
-                self.selected_menu_idx = -1
-            self._selected_menu_changed()
-
-    def select_prev(self):
-        num_menus = len(self.menus)
-        if self.selected_menu_idx == -1:
-            if num_menus > 0:
-                self.selected_menu_idx = num_menus - 1
-                self._selected_menu_changed()
-        else:
-            if self.selected_menu_idx - 1 >= 0:
-                self.selected_menu_idx -= 1
-            else:
-                self.selected_menu_idx = -1
-            self._selected_menu_changed()
-
-    def update(self):
-        self.erase()
-        is_in_first_responder_chain = self.is_in_first_responder_chain()
-        if is_in_first_responder_chain:
-            self.attron(curses.A_REVERSE)
-        pt = Point(x=0, y=0)
-        for menu in self.menus:
-            self.addstr(pt, '|  ' + menu.title + '  ')
-            pt.x += len(menu.title) + 5
-        self.addstr(pt, '|')
-        width = self.get_size().w
-        while pt.x < width:
-            self.addch_at_point(pt, ' ')
-            pt.x += 1
-        if is_in_first_responder_chain:
-            self.attroff(curses.A_REVERSE)
-
-        for menu in self.menus:
-            menu.update()
-
-
-class StatusPanel(Panel):
-
-    def __init__(self, frame):
-        super(
-            StatusPanel,
-            self).__init__(
-            frame,
-            delegate=None,
-            can_become_first_responder=False)
-        self.status_items = list()
-        self.status_dicts = dict()
-        self.next_status_x = 1
-
-    def add_status_item(self, name, title, format, width, value, update=True):
-        status_item_dict = {'name': name,
-                            'title': title,
-                            'width': width,
-                            'format': format,
-                            'value': value,
-                            'x': self.next_status_x}
-        index = len(self.status_items)
-        self.status_items.append(status_item_dict)
-        self.status_dicts[name] = index
-        self.next_status_x += width + 2
-        if update:
-            self.update()
-
-    def increment_status(self, name, update=True):
-        if name in self.status_dicts:
-            status_item_idx = self.status_dicts[name]
-            status_item_dict = self.status_items[status_item_idx]
-            status_item_dict['value'] = status_item_dict['value'] + 1
-        if update:
-            self.update()
-
-    def update_status(self, name, value, update=True):
-        if name in self.status_dicts:
-            status_item_idx = self.status_dicts[name]
-            status_item_dict = self.status_items[status_item_idx]
-            status_item_dict['value'] = status_item_dict['format'] % (value)
-        if update:
-            self.update()
-
-    def update(self):
-        self.erase()
-        for status_item_dict in self.status_items:
-            self.addnstr_at_point(
-                Point(
-                    x=status_item_dict['x'],
-                    y=0),
-                '%s: %s' %
-                (status_item_dict['title'],
-                 status_item_dict['value']),
-                status_item_dict['width'])
-
-stdscr = None
-
-
-def intialize_curses():
-    global stdscr
-    stdscr = curses.initscr()
-    curses.noecho()
-    curses.cbreak()
-    stdscr.keypad(1)
-    try:
-        curses.start_color()
-    except:
-        pass
-    return Window(stdscr)
-
-
-def terminate_curses():
-    global stdscr
-    if stdscr:
-        stdscr.keypad(0)
-    curses.echo()
-    curses.nocbreak()
-    curses.endwin()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbinline.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbinline.py
index 4c3b08b..22668b6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbinline.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbinline.py
@@ -101,11 +101,6 @@
 
         makefile = open(makefilePath, 'w+')
 
-        level = os.sep.join(
-            [".."] * len(self.mydir.split(os.sep))) + os.sep + "make"
-
-        makefile.write("LEVEL = " + level + "\n")
-
         for t in list(categories.keys()):
             line = t + " := " + " ".join(categories[t])
             makefile.write(line + "\n")
@@ -118,7 +113,7 @@
         if ('CXX_SOURCES' in list(categories.keys())):
             makefile.write("CXXFLAGS += -std=c++11\n")
 
-        makefile.write("include $(LEVEL)/Makefile.rules\n")
+        makefile.write("include Makefile.rules\n")
         makefile.write("\ncleanup:\n\trm -f Makefile *.d\n\n")
         makefile.flush()
         makefile.close()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbpexpect.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
index d67a2f3..d599bc3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbpexpect.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 from __future__ import absolute_import
 
 # System modules
@@ -14,82 +13,56 @@
 from . import lldbutil
 
 if sys.platform.startswith('win32'):
-    class PExpectTest(TestBase):
+    # llvm.org/pr22274: need a pexpect replacement for windows
+    class PExpectTest(object):
         pass
 else:
     import pexpect
 
     class PExpectTest(TestBase):
 
-        mydir = TestBase.compute_mydir(__file__)
+        NO_DEBUG_INFO_TESTCASE = True
+        PROMPT = "(lldb) "
 
-        def setUp(self):
-            TestBase.setUp(self)
+        def expect_prompt(self):
+            self.child.expect_exact(self.PROMPT)
 
-        def launchArgs(self):
-            return ""
+        def launch(self, executable=None, extra_args=None, timeout=30, dimensions=None):
+            logfile = getattr(sys.stdout, 'buffer',
+                              sys.stdout) if self.TraceOn() else None
 
-        def launch(self, timeout=None):
-            if timeout is None:
-                timeout = 30
-            logfile = sys.stdout if self.TraceOn() else None
+            args = ['--no-lldbinit', '--no-use-colors']
+            for cmd in self.setUpCommands():
+                args += ['-O', cmd]
+            if executable is not None:
+                args += ['--file', executable]
+            if extra_args is not None:
+                args.extend(extra_args)
+
+            env = dict(os.environ)
+            env["TERM"]="vt100"
+
             self.child = pexpect.spawn(
-                '%s --no-use-colors %s' %
-                (lldbtest_config.lldbExec, self.launchArgs()), logfile=logfile)
-            self.child.timeout = timeout
-            self.timeout = timeout
+                    lldbtest_config.lldbExec, args=args, logfile=logfile,
+                    timeout=timeout, dimensions=dimensions, env=env)
+            self.expect_prompt()
+            for cmd in self.setUpCommands():
+                self.child.expect_exact(cmd)
+                self.expect_prompt()
+            if executable is not None:
+                self.child.expect_exact("target create")
+                self.child.expect_exact("Current executable set to")
+                self.expect_prompt()
 
-        def expect(self, patterns=None, timeout=None, exact=None):
-            if patterns is None:
-                return None
-            if timeout is None:
-                timeout = self.timeout
-            if exact is None:
-                exact = False
-            if exact:
-                return self.child.expect_exact(patterns, timeout=timeout)
-            else:
-                return self.child.expect(patterns, timeout=timeout)
+        def expect(self, cmd, substrs=None):
+            self.assertNotIn('\n', cmd)
+            self.child.sendline(cmd)
+            if substrs is not None:
+                for s in substrs:
+                    self.child.expect_exact(s)
+            self.expect_prompt()
 
-        def expectall(self, patterns=None, timeout=None, exact=None):
-            if patterns is None:
-                return None
-            if timeout is None:
-                timeout = self.timeout
-            if exact is None:
-                exact = False
-            for pattern in patterns:
-                self.expect(pattern, timeout=timeout, exact=exact)
-
-        def sendimpl(
-                self,
-                sender,
-                command,
-                patterns=None,
-                timeout=None,
-                exact=None):
-            sender(command)
-            return self.expect(patterns=patterns, timeout=timeout, exact=exact)
-
-        def send(self, command, patterns=None, timeout=None, exact=None):
-            return self.sendimpl(
-                self.child.send,
-                command,
-                patterns,
-                timeout,
-                exact)
-
-        def sendline(self, command, patterns=None, timeout=None, exact=None):
-            return self.sendimpl(
-                self.child.sendline,
-                command,
-                patterns,
-                timeout,
-                exact)
-
-        def quit(self, gracefully=None):
-            if gracefully is None:
-                gracefully = True
+        def quit(self, gracefully=True):
             self.child.sendeof()
             self.child.close(force=not gracefully)
             self.child = None
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatform.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatform.py
index 23d93e1..365c752 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatform.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatform.py
@@ -9,7 +9,6 @@
 import six
 
 # LLDB modules
-import use_lldb_suite
 import lldb
 
 windows, linux, macosx, darwin, ios, tvos, watchos, bridgeos, darwin_all, darwin_embedded, freebsd, netbsd, bsd_all, android = range(
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
index 940b01e..02946f0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
@@ -16,8 +16,8 @@
 
 # LLDB modules
 from . import configuration
-import use_lldb_suite
 import lldb
+import lldbsuite.test.lldbplatform as lldbplatform
 
 
 def check_first_register_readable(test_case):
@@ -25,9 +25,9 @@
 
     if arch in ['x86_64', 'i386']:
         test_case.expect("register read eax", substrs=['eax = 0x'])
-    elif arch in ['arm', 'armv7', 'armv7k']:
+    elif arch in ['arm', 'armv7', 'armv7k', 'armv8l', 'armv7l']:
         test_case.expect("register read r0", substrs=['r0 = 0x'])
-    elif arch in ['aarch64', 'arm64']:
+    elif arch in ['aarch64', 'arm64', 'arm64e', 'arm64_32']:
         test_case.expect("register read x0", substrs=['x0 = 0x'])
     elif re.match("mips", arch):
         test_case.expect("register read zero", substrs=['zero = 0x'])
@@ -129,7 +129,12 @@
 
 def getPlatform():
     """Returns the target platform which the tests are running on."""
-    platform = lldb.DBG.GetSelectedPlatform().GetTriple().split('-')[2]
+    triple = lldb.DBG.GetSelectedPlatform().GetTriple()
+    if triple is None:
+      # It might be an unconnected remote platform.
+      return ''
+
+    platform = triple.split('-')[2]
     if platform.startswith('freebsd'):
         platform = 'freebsd'
     elif platform.startswith('netbsd'):
@@ -146,6 +151,9 @@
     if not platformIsDarwin():
         return ""
 
+    if getPlatform() in lldbplatform.translate(lldbplatform.darwin_embedded):
+        return "/Developer/usr/lib/libMainThreadChecker.dylib"
+
     with os.popen('xcode-select -p') as output:
         xcode_developer_path = output.read().strip()
         mtc_dylib_path = '%s/usr/lib/libMainThreadChecker.dylib' % xcode_developer_path
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 35f0c76..2b83d26 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -36,12 +36,10 @@
 
 # System modules
 import abc
-import collections
 from distutils.version import LooseVersion
 from functools import wraps
 import gc
 import glob
-import inspect
 import io
 import os.path
 import re
@@ -51,7 +49,6 @@
 import sys
 import time
 import traceback
-import types
 import distutils.spawn
 
 # Third-party modules
@@ -61,7 +58,6 @@
 import six
 
 # LLDB modules
-import use_lldb_suite
 import lldb
 from . import configuration
 from . import decorators
@@ -117,11 +113,11 @@
 
 BREAKPOINT_PENDING_CREATED = "Pending breakpoint created successfully"
 
-BREAKPOINT_HIT_ONCE = "Breakpoint resolved with hit cout = 1"
+BREAKPOINT_HIT_ONCE = "Breakpoint resolved with hit count = 1"
 
-BREAKPOINT_HIT_TWICE = "Breakpoint resolved with hit cout = 2"
+BREAKPOINT_HIT_TWICE = "Breakpoint resolved with hit count = 2"
 
-BREAKPOINT_HIT_THRICE = "Breakpoint resolved with hit cout = 3"
+BREAKPOINT_HIT_THRICE = "Breakpoint resolved with hit count = 3"
 
 MISSING_EXPECTED_REGISTERS = "At least one expected register is unavailable."
 
@@ -144,6 +140,8 @@
 
 STOPPED_DUE_TO_BREAKPOINT_IGNORE_COUNT = "Stopped due to breakpoint and ignore count"
 
+STOPPED_DUE_TO_BREAKPOINT_JITTED_CONDITION = "Stopped due to breakpoint jitted condition"
+
 STOPPED_DUE_TO_SIGNAL = "Process state is stopped due to signal"
 
 STOPPED_DUE_TO_STEP_IN = "Process state is stopped due to step in"
@@ -562,18 +560,6 @@
             print("Restore dir to:", cls.oldcwd, file=sys.stderr)
         os.chdir(cls.oldcwd)
 
-    @classmethod
-    def skipLongRunningTest(cls):
-        """
-        By default, we skip long running test case.
-        This can be overridden by passing '-l' to the test driver (dotest.py).
-        """
-        if "LLDB_SKIP_LONG_RUNNING_TEST" in os.environ and "NO" == os.environ[
-                "LLDB_SKIP_LONG_RUNNING_TEST"]:
-            return False
-        else:
-            return True
-
     def enableLogChannelsForCurrentTest(self):
         if len(lldbtest_config.channels) == 0:
             return
@@ -698,6 +684,32 @@
         """Return absolute path to a file in the test's source directory."""
         return os.path.join(self.getSourceDir(), name)
 
+    @classmethod
+    def setUpCommands(cls):
+        commands = [
+            # Disable Spotlight lookup. The testsuite creates
+            # different binaries with the same UUID, because they only
+            # differ in the debug info, which is not being hashed.
+            "settings set symbols.enable-external-lookup false",
+
+            # Testsuite runs in parallel and the host can have also other load.
+            "settings set plugin.process.gdb-remote.packet-timeout 60",
+
+            'settings set symbols.clang-modules-cache-path "{}"'.format(
+                configuration.lldb_module_cache_dir),
+            "settings set use-color false",
+        ]
+        # Make sure that a sanitizer LLDB's environment doesn't get passed on.
+        if cls.platformContext and cls.platformContext.shlib_environment_var in os.environ:
+            commands.append('settings set target.env-vars {}='.format(
+                cls.platformContext.shlib_environment_var))
+
+        # Set environment variables for the inferior.
+        if lldbtest_config.inferior_env:
+            commands.append('settings set target.env-vars {}'.format(
+                lldbtest_config.inferior_env))
+        return commands
+
     def setUp(self):
         """Fixture for unittest test case setup.
 
@@ -711,17 +723,13 @@
         else:
             self.libcxxPath = None
 
-        if "LLDBMI_EXEC" in os.environ:
-            self.lldbMiExec = os.environ["LLDBMI_EXEC"]
-        else:
-            self.lldbMiExec = None
-
         if "LLDBVSCODE_EXEC" in os.environ:
             self.lldbVSCodeExec = os.environ["LLDBVSCODE_EXEC"]
         else:
             self.lldbVSCodeExec = None
 
-        self.lldbOption = "-o 'settings set symbols.enable-external-lookup false'"
+        self.lldbOption = " ".join(
+            "-o '" + s + "'" for s in self.setUpCommands())
 
         # If we spawn an lldb process for test (via pexpect), do not load the
         # init file unless told otherwise.
@@ -817,8 +825,8 @@
         self.darwinWithFramework = self.platformIsDarwin()
         if sys.platform.startswith("darwin"):
             # Handle the framework environment variable if it is set
-            if hasattr(lldbtest_config, 'lldbFrameworkPath'):
-                framework_path = lldbtest_config.lldbFrameworkPath
+            if hasattr(lldbtest_config, 'lldb_framework_path'):
+                framework_path = lldbtest_config.lldb_framework_path
                 # Framework dir should be the directory containing the framework
                 self.framework_dir = framework_path[:framework_path.rfind('LLDB.framework')]
             # If a framework dir was not specified assume the Xcode build
@@ -971,7 +979,6 @@
                     # unexpected error
                     raise
                 # child is already terminated
-                pass
             finally:
                 # Give it one final blow to make sure the child is terminated.
                 self.child.close()
@@ -1162,27 +1169,11 @@
                 if test is self:
                     print(traceback, file=self.session)
 
-        # put footer (timestamp/rerun instructions) into session
-        testMethod = getattr(self, self._testMethodName)
-        if getattr(testMethod, "__benchmarks_test__", False):
-            benchmarks = True
-        else:
-            benchmarks = False
-
         import datetime
         print(
             "Session info generated @",
             datetime.datetime.now().ctime(),
             file=self.session)
-        print(
-            "To rerun this test, issue the following command from the 'test' directory:\n",
-            file=self.session)
-        print(
-            "./dotest.py %s -v %s %s" %
-            (self.getRunOptions(),
-             ('+b' if benchmarks else '-t'),
-                self.getRerunArgs()),
-            file=self.session)
         self.session.close()
         del self.session
 
@@ -1288,11 +1279,14 @@
 
     def getDwarfVersion(self):
         """ Returns the dwarf version generated by clang or '0'. """
+        if configuration.dwarf_version:
+            return str(configuration.dwarf_version)
         if 'clang' in self.getCompiler():
             try:
                 driver_output = check_output(
                     [self.getCompiler()] + '-g -c -x c - -o - -###'.split(),
                     stderr=STDOUT)
+                driver_output = driver_output.decode("utf-8")
                 for line in driver_output.split(os.linesep):
                     m = re.search('dwarf-version=([0-9])', line)
                     if m:
@@ -1856,25 +1850,8 @@
         # decorators.
         Base.setUp(self)
 
-        if lldbtest_config.inferior_env:
-            self.runCmd('settings set target.env-vars {}'.format(lldbtest_config.inferior_env))
-
-        # Set the clang modules cache path used by LLDB.
-        mod_cache = os.path.join(os.environ["LLDB_BUILD"], "module-cache-lldb")
-        self.runCmd('settings set symbols.clang-modules-cache-path "%s"'
-                    % mod_cache)
-
-        # Disable Spotlight lookup. The testsuite creates
-        # different binaries with the same UUID, because they only
-        # differ in the debug info, which is not being hashed.
-        self.runCmd('settings set symbols.enable-external-lookup false')
-
-        # Disable color.
-        self.runCmd("settings set use-color false")
-
-        # Make sure that a sanitizer LLDB's environment doesn't get passed on.
-        if 'DYLD_LIBRARY_PATH' in os.environ:
-            self.runCmd('settings set target.env-vars DYLD_LIBRARY_PATH=')
+        for s in self.setUpCommands():
+            self.runCmd(s)
 
         if "LLDB_MAX_LAUNCH_COUNT" in os.environ:
             self.maxLaunchCount = int(os.environ["LLDB_MAX_LAUNCH_COUNT"])
@@ -1945,6 +1922,15 @@
 
         return environment
 
+    def registerSanitizerLibrariesWithTarget(self, target):
+        runtimes = []
+        for m in target.module_iter():
+            libspec = m.GetFileSpec()
+            if "clang_rt" in libspec.GetFilename():
+                runtimes.append(os.path.join(libspec.GetDirectory(),
+                                             libspec.GetFilename()))
+        return self.registerSharedLibrariesWithTarget(target, runtimes)
+
     # utility methods that tests can use to access the current objects
     def target(self):
         if not self.dbg:
@@ -2064,13 +2050,13 @@
         if check:
             output = ""
             if self.res.GetOutput():
-              output += "\nCommand output:\n" + self.res.GetOutput()
+                output += "\nCommand output:\n" + self.res.GetOutput()
             if self.res.GetError():
-              output += "\nError output:\n" + self.res.GetError()
+                output += "\nError output:\n" + self.res.GetError()
             if msg:
-              msg += output
+                msg += output
             if cmd:
-              cmd += output
+                cmd += output
             self.assertTrue(self.res.Succeeded(),
                             msg if (msg) else CMD_MSG(cmd))
 
@@ -2200,16 +2186,30 @@
                     compare_string, msg=COMPLETION_MSG(
                         str_input, p, match_strings), exe=False, patterns=[p])
 
+    def completions_match(self, command, completions):
+        """Checks that the completions for the given command are equal to the
+        given list of completions"""
+        interp = self.dbg.GetCommandInterpreter()
+        match_strings = lldb.SBStringList()
+        interp.HandleCompletion(command, len(command), 0, -1, match_strings)
+        # match_strings is a 1-indexed list, so we have to slice...
+        self.assertItemsEqual(completions, list(match_strings)[1:],
+                              "List of returned completion is wrong")
+
     def filecheck(
             self,
             command,
             check_file,
-            filecheck_options = ''):
+            filecheck_options = '',
+            expect_cmd_failure = False):
         # Run the command.
         self.runCmd(
                 command,
+                check=(not expect_cmd_failure),
                 msg="FileCheck'ing result of `{0}`".format(command))
 
+        self.assertTrue((not expect_cmd_failure) == self.res.Succeeded())
+
         # Get the error text if there was an error, and the regular text if not.
         output = self.res.GetOutput() if self.res.Succeeded() \
                 else self.res.GetError()
@@ -2317,8 +2317,6 @@
             with recording(self, trace) as sbuf:
                 print("looking at:", output, file=sbuf)
 
-        if output is None:
-            output = ""
         # The heading says either "Expecting" or "Not expecting".
         heading = "Expecting" if matching else "Not expecting"
 
@@ -2368,6 +2366,45 @@
         self.assertTrue(matched if matching else not matched,
                         msg if msg else EXP_MSG(str, output, exe))
 
+    def expect_expr(
+            self,
+            expr,
+            result_summary=None,
+            result_value=None,
+            result_type=None,
+            error_msg=None,
+            ):
+        """
+        Evaluates the given expression and verifies the result.
+        :param expr: The expression as a string.
+        :param result_summary: The summary that the expression should have. None if the summary should not be checked.
+        :param result_value: The value that the expression should have. None if the value should not be checked.
+        :param result_type: The type that the expression result should have. None if the type should not be checked.
+        :param error_msg: The error message the expression should return. None if the error output should not be checked.
+        """
+        self.assertTrue(expr.strip() == expr, "Expression contains trailing/leading whitespace: '" + expr + "'")
+
+        frame = self.frame()
+        eval_result = frame.EvaluateExpression(expr)
+
+        if error_msg:
+            self.assertFalse(eval_result.IsValid())
+            self.assertEqual(error_msg, eval_result.GetError().GetCString())
+            return
+
+        if not eval_result.GetError().Success():
+            self.assertTrue(eval_result.GetError().Success(),
+                "Unexpected failure with msg: " + eval_result.GetError().GetCString())
+
+        if result_type:
+            self.assertEqual(result_type, eval_result.GetTypeName())
+
+        if result_value:
+            self.assertEqual(result_value, eval_result.GetValue())
+
+        if result_summary:
+            self.assertEqual(result_summary, eval_result.GetSummary())
+
     def invoke(self, obj, name, trace=False):
         """Use reflection to call a method dynamically with no argument."""
         trace = (True if traceAlways else trace)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbutil.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbutil.py
index dbdc0f5..006362a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbutil.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lldbutil.py
@@ -8,12 +8,10 @@
 from __future__ import absolute_import
 
 # System modules
-import collections
 import errno
 import os
 import re
 import sys
-import time
 
 # Third-party modules
 from six import StringIO as SixStringIO
@@ -21,6 +19,7 @@
 
 # LLDB modules
 import lldb
+from . import lldbtest_config
 
 
 # ===================================================
@@ -760,34 +759,54 @@
     # Create the target
     target = test.dbg.CreateTarget(exe)
     test.assertTrue(target, "Target: %s is not valid."%(exe_name))
+
+    # Set environment variables for the inferior.
+    if lldbtest_config.inferior_env:
+        test.runCmd('settings set target.env-vars {}'.format(
+            lldbtest_config.inferior_env))
+
     return target
 
-def run_to_breakpoint_do_run(test, target, bkpt, launch_info = None):
+def run_to_breakpoint_do_run(test, target, bkpt, launch_info = None,
+                             only_one_thread = True, extra_images = None):
 
     # Launch the process, and do not stop at the entry point.
     if not launch_info:
-        launch_info = lldb.SBLaunchInfo(None)
+        launch_info = target.GetLaunchInfo()
         launch_info.SetWorkingDirectory(test.get_process_working_directory())
 
+    if extra_images and lldb.remote_platform:
+        environ = test.registerSharedLibrariesWithTarget(target, extra_images)
+        launch_info.SetEnvironmentEntries(environ, True)
+
     error = lldb.SBError()
     process = target.Launch(launch_info, error)
 
     test.assertTrue(process,
                     "Could not create a valid process for %s: %s"%(target.GetExecutable().GetFilename(),
                     error.GetCString()))
+    test.assertFalse(error.Fail(),
+                     "Process launch failed: %s" % (error.GetCString()))
 
     # Frame #0 should be at our breakpoint.
     threads = get_threads_stopped_at_breakpoint(
                 process, bkpt)
 
-    test.assertTrue(len(threads) == 1, "Expected 1 thread to stop at breakpoint, %d did."%(len(threads)))
+    num_threads = len(threads)
+    if only_one_thread:
+        test.assertEqual(num_threads, 1, "Expected 1 thread to stop at breakpoint, %d did."%(num_threads))
+    else:
+        test.assertGreater(num_threads, 0, "No threads stopped at breakpoint")
+        
     thread = threads[0]
     return (target, process, thread, bkpt)
 
 def run_to_name_breakpoint (test, bkpt_name, launch_info = None,
                             exe_name = "a.out",
                             bkpt_module = None,
-                            in_cwd = True):
+                            in_cwd = True,
+                            only_one_thread = True,
+                            extra_images = None):
     """Start up a target, using exe_name as the executable, and run it to
        a breakpoint set by name on bkpt_name restricted to bkpt_module.
 
@@ -809,6 +828,11 @@
        If successful it returns a tuple with the target process and
        thread that hit the breakpoint, and the breakpoint that we set
        for you.
+
+       If only_one_thread is true, we require that there be only one
+       thread stopped at the breakpoint.  Otherwise we only require one
+       or more threads stop there.  If there are more than one, we return
+       the first thread that stopped.
     """
 
     target = run_to_breakpoint_make_target(test, exe_name, in_cwd)
@@ -818,12 +842,15 @@
 
     test.assertTrue(breakpoint.GetNumLocations() > 0,
                     "No locations found for name breakpoint: '%s'."%(bkpt_name))
-    return run_to_breakpoint_do_run(test, target, breakpoint, launch_info)
+    return run_to_breakpoint_do_run(test, target, breakpoint, launch_info,
+                                    only_one_thread, extra_images)
 
 def run_to_source_breakpoint(test, bkpt_pattern, source_spec,
                              launch_info = None, exe_name = "a.out",
                              bkpt_module = None,
-                             in_cwd = True):
+                             in_cwd = True,
+                             only_one_thread = True,
+                             extra_images = None):
     """Start up a target, using exe_name as the executable, and run it to
        a breakpoint set by source regex bkpt_pattern.
 
@@ -837,12 +864,15 @@
     test.assertTrue(breakpoint.GetNumLocations() > 0,
         'No locations found for source breakpoint: "%s", file: "%s", dir: "%s"'
         %(bkpt_pattern, source_spec.GetFilename(), source_spec.GetDirectory()))
-    return run_to_breakpoint_do_run(test, target, breakpoint, launch_info)
+    return run_to_breakpoint_do_run(test, target, breakpoint, launch_info,
+                                    only_one_thread, extra_images)
 
 def run_to_line_breakpoint(test, source_spec, line_number, column = 0,
                            launch_info = None, exe_name = "a.out",
                            bkpt_module = None,
-                           in_cwd = True):
+                           in_cwd = True,
+                           only_one_thread = True,
+                           extra_images = None):
     """Start up a target, using exe_name as the executable, and run it to
        a breakpoint set by (source_spec, line_number(, column)).
 
@@ -857,7 +887,8 @@
         'No locations found for line breakpoint: "%s:%d(:%d)", dir: "%s"'
         %(source_spec.GetFilename(), line_number, column,
           source_spec.GetDirectory()))
-    return run_to_breakpoint_do_run(test, target, breakpoint, launch_info)
+    return run_to_breakpoint_do_run(test, target, breakpoint, launch_info,
+                                    only_one_thread, extra_images)
 
 
 def continue_to_breakpoint(process, bkpt):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lock.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lock.py
index 0e3af4a..e9970e1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/lock.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/lock.py
@@ -3,7 +3,6 @@
 """
 
 import fcntl
-import os
 
 
 class Lock:
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/logging/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/logging/Makefile
deleted file mode 100644
index d4bc9c6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/logging/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/logging/TestLogging.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/logging/TestLogging.py
deleted file mode 100644
index cafbe43..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/logging/TestLogging.py
+++ /dev/null
@@ -1,95 +0,0 @@
-"""
-Test lldb logging.  This test just makes sure logging doesn't crash, and produces some output.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import string
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class LogTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def setUp(self):
-        super(LogTestCase, self).setUp()
-        self.log_file = self.getBuildArtifact("log-file.txt")
-
-    def test(self):
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.expect("file " + exe,
-                    patterns=["Current executable set to .*a.out"])
-
-        log_file = os.path.join(self.getBuildDir(), "lldb-commands-log.txt")
-
-        if (os.path.exists(log_file)):
-            os.remove(log_file)
-
-        # By default, Debugger::EnableLog() will set log options to
-        # PREPEND_THREAD_NAME + OPTION_THREADSAFE. We don't want the
-        # threadnames here, so we enable just threadsafe (-t).
-        self.runCmd("log enable -t -f '%s' lldb commands" % (log_file))
-
-        self.runCmd("command alias bp breakpoint")
-
-        self.runCmd("bp set -n main")
-
-        self.runCmd("bp l")
-
-        self.runCmd("log disable lldb")
-
-        self.assertTrue(os.path.isfile(log_file))
-
-        f = open(log_file)
-        log_lines = f.readlines()
-        f.close()
-        os.remove(log_file)
-
-        self.assertGreater(
-            len(log_lines),
-            0,
-            "Something was written to the log file.")
-
-    # Check that lldb truncates its log files
-    def test_log_truncate(self):
-        # put something in our log file
-        with open(self.log_file, "w") as f:
-            for i in range(1, 1000):
-                f.write("bacon\n")
-
-        self.runCmd("log enable -t -f '%s' lldb commands" % self.log_file)
-        self.runCmd("help log")
-        self.runCmd("log disable lldb")
-
-        self.assertTrue(os.path.isfile(self.log_file))
-        with open(self.log_file, "r") as f:
-            contents = f.read()
-
-        # check that it got removed
-        self.assertEquals(contents.find("bacon"), -1)
-
-    # Check that lldb can append to a log file
-    def test_log_append(self):
-        # put something in our log file
-        with open(self.log_file, "w") as f:
-            f.write("bacon\n")
-
-        self.runCmd( "log enable -t -a -f '%s' lldb commands" % self.log_file)
-        self.runCmd("help log")
-        self.runCmd("log disable lldb")
-
-        self.assertTrue(os.path.isfile(self.log_file))
-        with open(self.log_file, "r") as f:
-            contents = f.read()
-
-        # check that it is still there
-        self.assertEquals(contents.find("bacon"), 0)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/main.c
new file mode 100644
index 0000000..41a6a46
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/main.c
@@ -0,0 +1,8 @@
+void relative();
+
+int main()
+{
+  relative();
+  // Hello Absolute!
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/relative.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/relative.c
new file mode 100644
index 0000000..0233183
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Inputs/relative.c
@@ -0,0 +1,5 @@
+void stop() {}
+void relative() {
+  stop();
+  // Hello Relative!
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Makefile
new file mode 100644
index 0000000..8c82c73
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/Makefile
@@ -0,0 +1,10 @@
+BOTDIR = $(BUILDDIR)/buildbot
+USERDIR = $(BUILDDIR)/user
+C_SOURCES = $(BOTDIR)/main.c
+LD_EXTRAS = $(BOTDIR)/relative.o
+
+include Makefile.rules
+
+$(EXE): relative.o
+relative.o: $(BOTDIR)/relative.c
+	cd $(BOTDIR) && $(CC) -c $(CFLAGS) -o $@ relative.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
new file mode 100644
index 0000000..0f5daf5
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/DBGSourcePathRemapping/TestDSYMSourcePathRemapping.py
@@ -0,0 +1,61 @@
+import lldb
+from lldbsuite.test.decorators import *
+import lldbsuite.test.lldbtest as lldbtest
+import lldbsuite.test.lldbutil as lldbutil
+import os
+import unittest2
+
+
+class TestDSYMSourcePathRemapping(lldbtest.TestBase):
+
+    mydir = lldbtest.TestBase.compute_mydir(__file__)
+
+    def build(self):
+        botdir = self.getBuildArtifact('buildbot')
+        userdir = self.getBuildArtifact('user')
+        inputs = self.getSourcePath('Inputs')
+        lldbutil.mkdir_p(botdir)
+        lldbutil.mkdir_p(userdir)
+        import shutil
+        for f in ['main.c', 'relative.c']:
+            shutil.copyfile(os.path.join(inputs, f), os.path.join(botdir, f))
+            shutil.copyfile(os.path.join(inputs, f), os.path.join(userdir, f))
+
+        super(TestDSYMSourcePathRemapping, self).build()
+
+        # Remove the build sources.
+        self.assertTrue(os.path.isdir(botdir))
+        shutil.rmtree(botdir)
+
+        # Create a plist.
+        import subprocess
+        dsym = self.getBuildArtifact('a.out.dSYM')
+        uuid = subprocess.check_output(["/usr/bin/dwarfdump", "--uuid", dsym]
+                                      ).decode("utf-8").split(" ")[1]
+        import re
+        self.assertTrue(re.match(r'[0-9a-fA-F-]+', uuid))
+        plist = os.path.join(dsym, 'Contents', 'Resources', uuid + '.plist')
+        with open(plist, 'w') as f:
+            f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
+            f.write('<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n')
+            f.write('<plist version="1.0">\n')
+            f.write('<dict>\n')
+            f.write('  <key>DBGSourcePathRemapping</key>\n')
+            f.write('  <dict>\n')
+            f.write('    <key>' + botdir + '</key>\n')
+            f.write('    <string>' + userdir + '</string>\n')
+            f.write('  </dict>\n')
+            f.write('</dict>\n')
+            f.write('</plist>\n')
+
+
+    @skipIf(debug_info=no_match("dsym"))
+    def test(self):
+        self.build()
+
+        target, process, _, _ = lldbutil.run_to_name_breakpoint(
+            self, 'main')
+        self.expect("source list -n main", substrs=["Hello Absolute"])
+        bkpt = target.BreakpointCreateByName('relative')
+        lldbutil.continue_to_breakpoint(process, bkpt)
+        self.expect("source list -n relative", substrs=["Hello Relative"])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile
index 5abcf02..4e1ec22 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/Makefile
@@ -1,24 +1,14 @@
-CC ?= clang
-ifeq "$(ARCH)" ""
-	ARCH = x86_64
-endif
+C_SOURCES = main.c
 
-ifeq "$(OS)" ""
-	OS = $(shell uname -s)
-endif
+include Makefile.rules
 
-CFLAGS ?= -g -O0
+all: a.out.dSYM hide.app/Contents/a.out.dSYM
 
-ifeq "$(OS)" "Darwin"
-	CFLAGS += -arch $(ARCH)
-endif
-
-all: main.c clean
+hide.app/Contents/a.out.dSYM:
 	mkdir hide.app
 	mkdir hide.app/Contents
-	$(CC) $(CFLAGS) -g $<
 	mv a.out.dSYM hide.app/Contents
 	strip -x a.out
-
-clean:
-	rm -rf a.out a.out.dSYM hide.app
+ifneq "$(CODESIGN)" ""
+	$(CODESIGN) -fs - a.out
+endif
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
index be122f4..df9716f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/add-dsym/TestAddDsymMidExecutionCommand.py
@@ -1,12 +1,8 @@
 """Test that the 'add-dsym', aka 'target symbols add', succeeds in the middle of debug session."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
-import sys
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile
index 5bb3a3c..b880d9e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
 # Make an archive that has two object files with the same name, but
@@ -14,7 +12,7 @@
 	$(AR) $(ARFLAGS) $@ a.o sub1/a.o
 	rm a.o sub1/a.o
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 # Needs to come after include
 OBJECTS += libfoo.a
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py
index 1af2463f..3fecb3b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/TestDuplicateMembers.py
@@ -1,10 +1,7 @@
 """Test breaking inside functions defined within a BSD archive file libfoo.a."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile
index 18a4934..68012d2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile
@@ -1,5 +1,4 @@
 SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
-
 CC ?= clang
 
 ifeq "$(ARCH)" ""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py
index c380d53..99d21f0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/TestFindAppInBundle.py
@@ -2,12 +2,8 @@
 Make sure we can find the binary inside an app bundle.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 import lldbsuite.test.lldbutil as lldbutil
@@ -27,10 +23,6 @@
         self.main_source_file = lldb.SBFileSpec("main.c")
         self.find_app_in_bundle_test()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def find_app_in_bundle_test(self):
         """This reads in the .app, makes sure we get the right binary and can run it."""
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
index 313c83e..658c9a9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
@@ -1,5 +1,4 @@
 SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
-
 CC ?= clang
 
 ifeq "$(ARCH)" ""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py
index ad90d85..6b38d3c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py
@@ -1,6 +1,5 @@
 """Test that a dSYM can be found when a binary is in a bundle hnd has dots in the filename."""
 
-from __future__ import print_function
 
 #import unittest2
 import os.path
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile
index d52d6f1..b2a66c2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile
@@ -1,5 +1,4 @@
 SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
-
 CC ?= clang
 
 ifeq "$(ARCH)" ""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py
index 2ed7fdf..ecab535 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/TestDeepBundle.py
@@ -1,9 +1,7 @@
 """Test that a dSYM can be found when a binary is in a deep bundle with multiple pathname components."""
 
-from __future__ import print_function
 
 #import unittest2
-import os.path
 from time import sleep
 
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile
index 091876d..0d6f517 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile
@@ -1,10 +1,8 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 EXE := StripMe
 MAKE_DSYM := NO
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 main.o: main.cpp
 	$(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py
index ae3b825f..e876cdf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/TestFunctionStarts.py
@@ -2,11 +2,8 @@
 Test that we read the function starts section.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -45,8 +42,20 @@
         except CalledProcessError as cmd_error:
             self.fail("Strip failed: %d"%(cmd_error.returncode))
 
-        popen = self.spawnSubprocess(exe)
+        # Use a file as a synchronization point between test and inferior.
+        pid_file_path = lldbutil.append_to_process_working_directory(self,
+            "token_pid_%d" % (int(os.getpid())))
+        self.addTearDownHook(
+            lambda: self.run_platform_command(
+                "rm %s" %
+                (pid_file_path)))
+
+        popen = self.spawnSubprocess(exe, [pid_file_path])
         self.addTearDownHook(self.cleanupSubprocesses)
+
+        # Wait until process has fully started up.
+        pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
+
         if in_memory:
           remove_file(exe)            
 
@@ -70,7 +79,8 @@
         thread = threads[0]
         self.assertTrue(thread.num_frames > 1, "Couldn't backtrace.")
         name = thread.frame[1].GetFunctionName()
-        self.assertEqual("___lldb_unnamed_symbol1$$StripMe", name, "Frame name not synthetic")
+        self.assertTrue(name.startswith("___lldb_unnamed_symbol"))
+        self.assertTrue(name.endswith("$$StripMe"))
         
 
         
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/main.cpp
index 5a14506..188078a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/function-starts/main.cpp
@@ -2,6 +2,7 @@
 #include <fcntl.h>
 
 #include <chrono>
+#include <fstream>
 #include <thread>
 
 extern void dont_strip_me()
@@ -21,6 +22,11 @@
 
 int main(int argc, char const *argv[])
 {
+    {
+        // Create file to signal that this process has started up.
+        std::ofstream f;
+        f.open(argv[1]);
+    }
     a_function();
     return 0;
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile
index 69fd86e..929ed58 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile
@@ -1,40 +1,16 @@
-LEVEL = ../../make
+C_SOURCES := main.c
+LD_EXTRAS := -L. -lindirect -lreexport
 
-include $(LEVEL)/Makefile.rules
+.PHONY: build-libindirect build-libreepxoprt
+all: build-libindirect build-libreepxoprt a.out
 
-LIB_PREFIX := lib
+include Makefile.rules
 
-ifeq "$(OS)" "Darwin"
-	CFLAGS += -arch $(ARCH)
-	DS := dsymutil
-	LD_FLAGS := -dynamiclib
-	LIB_INDIRECT := $(LIB_PREFIX)indirect.dylib
-	LIB_REEXPORT := $(LIB_PREFIX)reexport.dylib
-	EXEC_PATH := "@executable_path"
-	EXEC_PATH_INDIRECT := -install_name $(EXEC_PATH)/$(LIB_INDIRECT)
-	EXEC_PATH_REEXPORT := -install_name $(EXEC_PATH)/$(LIB_REEXPORT)
-endif
+build-libindirect: indirect.c
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_C_SOURCES=indirect.c DYLIB_NAME=indirect DYLIB_ONLY=YES
 
-all: a.out $(LIB_INDIRECT) $(LIB_REEXPORT)
-
-a.out: main.o $(LIB_INDIRECT) $(LIB_REEXPORT)
-	$(CC) $(CFLAGS) -o a.out main.o -L. $(LIB_INDIRECT) $(LIB_REEXPORT)
-
-main.o: $(SRCDIR)/main.c
-	$(CC) $(CFLAGS) -c $(SRCDIR)/main.c
-
-$(LIB_INDIRECT): indirect.o
-	$(CC) $(CFLAGS) $(LD_FLAGS) $(EXEC_PATH_INDIRECT) -o $(LIB_INDIRECT) indirect.o
-	if [ "$(OS)" = "Darwin" ]; then dsymutil $(LIB_INDIRECT); fi
-
-indirect.o: $(SRCDIR)/indirect.c
-	$(CC) $(CFLAGS) -c $(SRCDIR)/indirect.c
-
-$(LIB_REEXPORT): reexport.o $(LIB_INDIRECT)
-	$(CC) $(CFLAGS) $(LD_FLAGS) $(EXEC_PATH_REEXPORT) -o $(LIB_REEXPORT) reexport.o -L. -lindirect -Wl,-alias_list,$(SRCDIR)/alias.list
-	if [ "$(OS)" = "Darwin" ]; then dsymutil $(LIB_REEXPORT); fi
-
-reexport.o: $(SRCDIR)/reexport.c
-	$(CC) $(CFLAGS) -c $(SRCDIR)/reexport.c
-clean::
-	rm -rf $(wildcard *.o *~ *.dylib *.so a.out *.dSYM)
+build-libreepxoprt: reexport.c
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_C_SOURCES=reexport.c DYLIB_NAME=reexport DYLIB_ONLY=YES \
+		LD_EXTRAS="-L. -lindirect -Wl,-alias_list,$(SRCDIR)/alias.list"
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py
index a87a628..2718bd7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/TestIndirectSymbols.py
@@ -1,10 +1,7 @@
 """Test stepping and setting breakpoints in indirect and re-exported symbols."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -22,6 +19,7 @@
         self.main_source = "main.c"
 
     @skipUnlessDarwin
+    @expectedFailureAll(oslist=no_match(["macosx"]), bugnumber="rdar://55952764")
     @add_test_categories(['pyapi'])
     def test_with_python_api(self):
         """Test stepping and setting breakpoints in indirect and re-exported symbols."""
@@ -63,8 +61,7 @@
         # indirect function.
         thread.StepInto()
         curr_function = thread.GetFrameAtIndex(0).GetFunctionName()
-        self.assertTrue(
-            curr_function == "call_through_indirect_hidden",
+        self.assertEqual(curr_function, "call_through_indirect_hidden",
             "Stepped into indirect symbols.")
 
         # Now set a breakpoint using the indirect symbol name, and make sure we
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile
index b440cf3..ad37346 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 MAKE_DSYM := NO
 
 C_SOURCES := main.c
@@ -7,9 +5,7 @@
 all: a.out create-empty-corefile
 
 create-empty-corefile:
-	$(MAKE) VPATH=$(VPATH) -f $(SRCDIR)/create-empty-corefile.mk
+	$(MAKE) -f $(MAKEFILE_RULES) EXE=create-empty-corefile \
+		C_SOURCES=create-empty-corefile.c
 
-clean::
-	$(MAKE) -f create-empty-corefile.mk clean
-
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
index 2b2e4fd..8000743 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/TestKernVerStrLCNOTE.py
@@ -1,12 +1,10 @@
 """Test that corefiles with an LC_NOTE "kern ver str" load command is used."""
 
-from __future__ import print_function
 
 
 import os
 import re
 import subprocess
-import sys
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk
deleted file mode 100644
index 4d3e320..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-LEVEL = ../../../make
-
-MAKE_DSYM := NO
-
-CXX_SOURCES := create-empty-corefile.cpp
-EXE = create-empty-corefile
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/load-kext/TestLoadKext.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/load-kext/TestLoadKext.py
index 1bd5ec0..ec35ce8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/load-kext/TestLoadKext.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/load-kext/TestLoadKext.py
@@ -2,10 +2,7 @@
 Test loading of a kext binary.
 """
 
-from __future__ import print_function
 
-import shutil
-import struct
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/Makefile
new file mode 100644
index 0000000..2123af1
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/Makefile
@@ -0,0 +1,13 @@
+C_SOURCES := main.c
+LD_EXTRAS := -L. -lfoo
+
+TRIPLE := x86_64-apple-ios13.0-macabi
+CFLAGS_EXTRAS := -target $(TRIPLE)
+
+all: libfoo.dylib a.out
+
+libfoo.dylib: foo.c
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_ONLY=YES DYLIB_NAME=foo DYLIB_C_SOURCES=foo.c
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/TestMacABImacOSFramework.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/TestMacABImacOSFramework.py
new file mode 100644
index 0000000..23b2677
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/TestMacABImacOSFramework.py
@@ -0,0 +1,28 @@
+# TestMacABImacOSFramework.py
+import lldb
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+import lldbsuite.test.lldbutil as lldbutil
+import os
+import unittest2
+
+
+class TestMacABImacOSFramework(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipIf(macos_version=["<", "10.15"])
+    @skipUnlessDarwin
+    @skipIfDarwinEmbedded
+    # There is a Clang driver change missing on llvm.org.
+    @expectedFailureAll(bugnumber="rdar://problem/54986190>")
+    def test_macabi(self):
+        """Test the x86_64-apple-ios-macabi target linked against a macos dylib"""
+        self.build()
+        lldbutil.run_to_source_breakpoint(self, "break here",
+                                          lldb.SBFileSpec('main.c'))
+        self.expect("image list -t -b",
+                    patterns=["x86_64.*-apple-ios.*-macabi a\.out",
+                              "x86_64.*-apple-macosx.* libfoo.dylib[^(]"])
+        self.expect("fr v s", "Hello MacABI")
+        self.expect("p s", "Hello MacABI")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.c
new file mode 100644
index 0000000..9c29d59
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.c
@@ -0,0 +1,8 @@
+#include "foo.h"
+
+void stop() {}
+
+int foo() {
+  stop();
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.h
new file mode 100644
index 0000000..5d5f8f0
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/foo.h
@@ -0,0 +1 @@
+int foo();
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/main.c
new file mode 100644
index 0000000..92069d9
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/macabi/main.c
@@ -0,0 +1,5 @@
+#include "foo.h"
+int main() {
+  const char *s = "Hello MacABI!";
+  return foo(); // break here
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile
index de2b618..a68dad5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../make
-
 OBJC_SOURCES := main.m
 LD_EXTRAS = -framework Foundation
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py
index a69ba9e..2ab217d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/nslog/TestDarwinNSLogOutput.py
@@ -6,13 +6,10 @@
 targets.
 """
 
-from __future__ import print_function
 
 import lldb
-import os
 import platform
 import re
-import sys
 
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
index ff5f188..ee67988 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
-LDFLAGS = $(CFLAGS) -Xlinker -order_file -Xlinker $(SRCDIR)/order-file
+LD_EXTRAS = -Xlinker -order_file -Xlinker $(SRCDIR)/order-file
 MAKE_DSYM := NO
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py
index e7a4b20..778d06d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/order/TestOrderFile.py
@@ -2,11 +2,8 @@
 Test that debug symbols have the correct order as specified by the order file.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
index 369809e..805ad21 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/queues/TestQueues.py
@@ -5,7 +5,6 @@
 
 import unittest2
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
index 314084d..fe6d748 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/TestSafeFuncCalls.py
@@ -1,10 +1,7 @@
 """Test function call thread safety."""
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/thread-names/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/thread-names/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/thread-names/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/thread-names/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py
index c1ab00e..2a27681 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/thread-names/TestInterruptThreadNames.py
@@ -1,8 +1,6 @@
 """Test that we get thread names when interrupting a process."""
-from __future__ import print_function
 
 
-import os
 import time
 import lldb
 from lldbsuite.test.decorators import *
@@ -14,10 +12,6 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     @skipUnlessDarwin
     @add_test_categories(['pyapi'])
     def test_with_python_api(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile
index a83de2a..efdeb1f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile
@@ -1,8 +1,6 @@
-LEVEL := ../../make
-
 EXE := testit
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 all: testit
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py
index 93fb358..ebcdee8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/universal/TestUniversal.py
@@ -1,11 +1,9 @@
 """Test aspects of lldb commands on universal binaries."""
 
-from __future__ import print_function
 
 
 import unittest2
 import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/version_zero/TestGetVersionZeroVersion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/version_zero/TestGetVersionZeroVersion.py
index 82dacc3..f7e4da7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/version_zero/TestGetVersionZeroVersion.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/macosx/version_zero/TestGetVersionZeroVersion.py
@@ -2,12 +2,8 @@
 Read in a library with a version number of 0.0.0, make sure we produce a good version.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test import decorators
 import lldbsuite.test.lldbutil as lldbutil
@@ -28,10 +24,6 @@
         self.yaml2obj("libDylib.dylib.yaml", self.getBuildArtifact("libDylib.dylib"))
         self.do_test()
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     def do_test(self):
         lib_name = "libDylib.dylib"
         target = lldbutil.run_to_breakpoint_make_target(self, exe_name=lib_name)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/Android.rules b/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/Android.rules
index ad42b9b..7339c22 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/Android.rules
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/Android.rules
@@ -72,24 +72,18 @@
 
 ARCH_CFLAGS += --sysroot=$(NDK_ROOT)/sysroot \
 	-isystem $(NDK_ROOT)/sysroot/usr/include/$(TOOL_PREFIX) \
-	-D__ANDROID_API__=$(API_LEVEL)
+	-D__ANDROID_API__=$(API_LEVEL) \
+	-isystem $(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH)/usr/include
+
 ARCH_LDFLAGS += --sysroot=$(NDK_ROOT)/platforms/android-$(API_LEVEL)/arch-$(SYSROOT_ARCH) -lm
 
-ifeq (1,$(USE_LIBSTDCPP))
-	ARCH_CFLAGS += \
-		-isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include \
-		-isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(STL_ARCH)/include \
-		-isystem $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include/backward
+ARCH_CXXFLAGS += \
+	-isystem $(NDK_ROOT)/sources/cxx-stl/llvm-libc++/include \
+	-isystem $(NDK_ROOT)/sources/android/support/include \
+	-isystem $(NDK_ROOT)/sources/cxx-stl/llvm-libc++abi/include
 
-	ARCH_LDFLAGS += $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/$(STL_ARCH)/libgnustl_static.a
-else
-	ARCH_CXXFLAGS += \
-		-isystem $(NDK_ROOT)/sources/cxx-stl/llvm-libc++/include \
-		-isystem $(NDK_ROOT)/sources/android/support/include \
-		-isystem $(NDK_ROOT)/sources/cxx-stl/llvm-libc++abi/include
-
-	ARCH_LDFLAGS += \
-		-L$(NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/$(STL_ARCH) \
-		$(NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/$(STL_ARCH)/libc++_static.a \
-		-lc++abi
-endif
+ARCH_LDFLAGS += \
+	-L$(NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/$(STL_ARCH) \
+	$(NDK_ROOT)/sources/cxx-stl/llvm-libc++/libs/$(STL_ARCH)/libc++_static.a \
+	-lc++abi \
+	-nostdlib++
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index ecfed7e..f25d062 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -13,12 +13,19 @@
 # the building of the a.out executable program.  For example,
 # DYLIB_ONLY := YES
 #
+# Specifying FRAMEWORK and its variants has the effect of building a NeXT-style
+# framework.
+# FRAMEWORK := "Foo"
+# FRAMEWORK_HEADERS := "Foo.h"
+# FRAMEWORK_MODULES := "module.modulemap"
+#
 # Also might be of interest:
 # FRAMEWORK_INCLUDES (Darwin only) :=
 # CFLAGS_EXTRAS :=
 # LD_EXTRAS :=
 # SPLIT_DEBUG_SYMBOLS := YES
 # CROSS_COMPILE :=
+# USE_PRIVATE_MODULE_CACHE := YES
 #
 # And test/functionalities/archives/Makefile:
 # MAKE_DSYM := NO
@@ -30,7 +37,8 @@
 
 SRCDIR := $(shell dirname $(firstword $(MAKEFILE_LIST)))
 BUILDDIR := $(shell pwd)
-THIS_FILE_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))
+MAKEFILE_RULES := $(lastword $(MAKEFILE_LIST))
+THIS_FILE_DIR := $(shell dirname $(MAKEFILE_RULES))
 LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../
 
 #----------------------------------------------------------------------
@@ -88,6 +96,7 @@
 	triple_os_and_version =$(shell echo $(word 3, $(triple_space)) | sed 's/\([a-z]*\)\(.*\)/\1 \2/')
 	TRIPLE_OS =$(word 1, $(triple_os_and_version))
 	TRIPLE_VERSION =$(word 2, $(triple_os_and_version))
+	TRIPLE_ENV =$(word 4, $(triple_space))
 	ifeq "$(TRIPLE_VENDOR)" "apple"
 		ifeq "$(TRIPLE_OS)" "ios"
 			CODESIGN := codesign
@@ -100,11 +109,19 @@
 					endif
 					ARCH_CFLAGS :=-mios-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
 				else
-					SDKROOT = $(shell xcrun --sdk iphonesimulator --show-sdk-path)
+					ifeq "$(TRIPLE_ENV)" "macabi"
+						SDKROOT = $(shell xcrun --sdk macosx --show-sdk-path)
+					else
+						SDKROOT = $(shell xcrun --sdk iphonesimulator --show-sdk-path)
+					endif
 					ifeq "$(TRIPLE_VERSION)" ""
 						TRIPLE_VERSION =$(shell echo $(notdir $(SDKROOT)) | sed -e 's/.*\([0-9]\.[0-9]\).*/\1/')
 					endif
-					ARCH_CFLAGS :=-mios-simulator-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
+					ifeq "$(TRIPLE_ENV)" "macabi"
+						ARCH_CFLAGS :=-mios-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
+					else
+						ARCH_CFLAGS :=-mios-simulator-version-min=$(TRIPLE_VERSION) -isysroot "$(SDKROOT)"
+					endif
 				endif
 			endif
 		endif
@@ -155,15 +172,8 @@
 #   o cxx_compiler
 #   o cxx_linker
 #----------------------------------------------------------------------
-CC ?= clang
-ifeq "$(CC)" "cc"
-	ifneq "$(shell which clang)" ""
-		CC = clang
-	else ifneq "$(shell which clang-3.5)" ""
-		CC = clang-3.5
-	else ifneq "$(shell which gcc)" ""
-		CC = gcc
-	endif
+ifeq "$(CC)" ""
+$(error "C compiler is not specified. Please run tests through lldb-dotest or lit")
 endif
 
 #----------------------------------------------------------------------
@@ -172,8 +182,8 @@
 
 ifeq "$(OS)" "Darwin"
     ifeq "$(SDKROOT)" ""
-        # We haven't otherwise set the SDKROOT, so set it now to macosx
-        SDKROOT := $(shell xcrun --sdk macosx --show-sdk-path)
+	# We haven't otherwise set the SDKROOT, so set it now to macosx
+	SDKROOT := $(shell xcrun --sdk macosx --show-sdk-path)
     endif
 endif
 
@@ -230,7 +240,7 @@
 		override ARCH :=
 		override ARCHFLAG :=
 	endif
-	ifeq "$(ARCH)" "arm"
+	ifeq "$(findstring arm,$(ARCH))" "arm"
 		override ARCH :=
 		override ARCHFLAG :=
 	endif
@@ -297,15 +307,13 @@
 	CFLAGS += -gsplit-dwarf
 endif
 
-# Use a shared module cache when building in the default test build directory.
-CLANG_MODULE_CACHE_DIR := $(shell echo "$(BUILDDIR)" | sed $(QUOTE)s/lldb-test-build.noindex.*/lldb-test-build.noindex\/module-cache-clang/$(QUOTE))
-
-ifeq "$(findstring lldb-test-build.noindex, $(BUILDDIR))" ""
-CLANG_MODULE_CACHE_DIR := $(BUILDDIR)/module-cache
-$(warning failed to set the shared clang module cache dir)
+ifeq "$(USE_PRIVATE_MODULE_CACHE)" "YES"
+THE_CLANG_MODULE_CACHE_DIR := $(BUILDDIR)/private-module-cache
+else
+THE_CLANG_MODULE_CACHE_DIR := $(CLANG_MODULE_CACHE_DIR)
 endif
 
-MODULE_BASE_FLAGS := -fmodules -gmodules -fmodules-cache-path=$(CLANG_MODULE_CACHE_DIR)
+MODULE_BASE_FLAGS := -fmodules -gmodules -fmodules-cache-path=$(THE_CLANG_MODULE_CACHE_DIR)
 MANDATORY_MODULE_BUILD_CFLAGS := $(MODULE_BASE_FLAGS) -gmodules
 # Build flags for building with C++ modules.
 # -glldb is necessary for emitting information about what modules were imported.
@@ -320,7 +328,7 @@
 	CXXFLAGS += $(MANDATORY_MODULE_BUILD_CFLAGS)
 endif
 
-CXXFLAGS += -std=c++11 $(CFLAGS) $(ARCH_CXXFLAGS)
+CXXFLAGS += -std=c++11 $(CFLAGS) $(ARCH_CXXFLAGS) $(CXXFLAGS_EXTRAS)
 LD = $(CC)
 LDFLAGS ?= $(CFLAGS)
 LDFLAGS += $(LD_EXTRAS) $(ARCH_LDFLAGS)
@@ -337,10 +345,19 @@
 OBJECTS =
 EXE ?= a.out
 
+ifneq "$(FRAMEWORK)" ""
+	DYLIB_NAME ?= $(FRAMEWORK).framework/Versions/A/$(FRAMEWORK)
+	DYLIB_FILENAME ?= $(FRAMEWORK).framework/Versions/A/$(FRAMEWORK)
+endif
+
 ifneq "$(DYLIB_NAME)" ""
 	ifeq "$(OS)" "Darwin"
-		DYLIB_FILENAME = lib$(DYLIB_NAME).dylib
-		DYLIB_EXECUTABLE_PATH ?= @executable_path
+		ifneq "$(FRAMEWORK)" ""
+			DYLIB_INSTALL_NAME ?= @executable_path/$(FRAMEWORK).framework/Versions/A/$(FRAMEWORK)
+		else
+			DYLIB_FILENAME = lib$(DYLIB_NAME).dylib
+			DYLIB_INSTALL_NAME ?= @executable_path/$(DYLIB_FILENAME)
+		endif
 	else ifeq "$(OS)" "Windows_NT"
 		DYLIB_FILENAME = $(DYLIB_NAME).dll
 	else
@@ -350,46 +367,46 @@
 
 # Function that returns the counterpart C++ compiler, given $(CC) as arg.
 cxx_compiler_notdir = $(if $(findstring icc,$(1)), \
-                            $(subst icc,icpc,$(1)), \
-                            $(if $(findstring llvm-gcc,$(1)), \
-                                 $(subst llvm-gcc,llvm-g++,$(1)), \
-                                 $(if $(findstring gcc,$(1)), \
-                                      $(subst gcc,g++,$(1)), \
-                                      $(subst cc,c++,$(1)))))
+			$(subst icc,icpc,$(1)), \
+			$(if $(findstring llvm-gcc,$(1)), \
+				$(subst llvm-gcc,llvm-g++,$(1)), \
+				$(if $(findstring gcc,$(1)), \
+					$(subst gcc,g++,$(1)), \
+					$(subst cc,c++,$(1)))))
 cxx_compiler = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call cxx_compiler_notdir,$(notdir $(1)))),$(call cxx_compiler_notdir,$(1)))
 
 # Function that returns the C++ linker, given $(CC) as arg.
 cxx_linker_notdir = $(if $(findstring icc,$(1)), \
-                          $(subst icc,icpc,$(1)), \
-                          $(if $(findstring llvm-gcc,$(1)), \
-                               $(subst llvm-gcc,llvm-g++,$(1)), \
-                               $(if $(findstring gcc,$(1)), \
-                                    $(subst gcc,g++,$(1)), \
-                                    $(subst cc,c++,$(1)))))
+			$(subst icc,icpc,$(1)), \
+			$(if $(findstring llvm-gcc,$(1)), \
+				$(subst llvm-gcc,llvm-g++,$(1)), \
+				$(if $(findstring gcc,$(1)), \
+					$(subst gcc,g++,$(1)), \
+					$(subst cc,c++,$(1)))))
 cxx_linker = $(if $(findstring /,$(1)),$(join $(dir $(1)), $(call cxx_linker_notdir,$(notdir $(1)))),$(call cxx_linker_notdir,$(1)))
 
 ifneq "$(OS)" "Darwin"
-    CLANG_OR_GCC := $(strip $(if $(findstring clang,$(CC)), \
-                                 $(findstring clang,$(CC)), \
-                                 $(if $(findstring gcc,$(CC)), \
-                                      $(findstring gcc,$(CC)), \
-                                      cc)))
+	CLANG_OR_GCC := $(strip $(if $(findstring clang,$(CC)), \
+				$(findstring clang,$(CC)), \
+				$(if $(findstring gcc,$(CC)), \
+					$(findstring gcc,$(CC)), \
+					cc)))
 
-    CC_LASTWORD := $(strip $(lastword $(subst -, ,$(CC))))
+	CC_LASTWORD := $(strip $(lastword $(subst -, ,$(CC))))
 
-    replace_with = $(strip $(if $(findstring $(3),$(CC_LASTWORD)), \
-                           $(subst $(3),$(1),$(2)), \
-                           $(subst $(3),$(1),$(subst -$(CC_LASTWORD),,$(2)))))
+	replace_with = $(strip $(if $(findstring $(3),$(CC_LASTWORD)), \
+			$(subst $(3),$(1),$(2)), \
+			$(subst $(3),$(1),$(subst -$(CC_LASTWORD),,$(2)))))
 
-    ifeq "$(notdir $(CC))" "$(CC)"
-        replace_cc_with = $(call replace_with,$(1),$(CC),$(CLANG_OR_GCC))
-    else
-        replace_cc_with = $(join $(dir $(CC)),$(call replace_with,$(1),$(notdir $(CC)),$(CLANG_OR_GCC)))
-    endif
+	ifeq "$(notdir $(CC))" "$(CC)"
+		replace_cc_with = $(call replace_with,$(1),$(CC),$(CLANG_OR_GCC))
+	else
+		replace_cc_with = $(join $(dir $(CC)),$(call replace_with,$(1),$(notdir $(CC)),$(CLANG_OR_GCC)))
+	endif
 
-    OBJCOPY ?= $(call replace_cc_with,objcopy)
-    ARCHIVER ?= $(call replace_cc_with,ar)
-    override AR = $(ARCHIVER)
+	OBJCOPY ?= $(call replace_cc_with,objcopy)
+	ARCHIVER ?= $(call replace_cc_with,ar)
+	override AR = $(ARCHIVER)
 endif
 
 ifdef PIE
@@ -458,16 +475,11 @@
 #----------------------------------------------------------------------
 # dylib settings
 #----------------------------------------------------------------------
-ifneq "$(strip $(DYLIB_C_SOURCES))" ""
-	DYLIB_OBJECTS +=$(strip $(DYLIB_C_SOURCES:.c=.o))
-endif
 
-ifneq "$(strip $(DYLIB_OBJC_SOURCES))" ""
-	DYLIB_OBJECTS +=$(strip $(DYLIB_OBJC_SOURCES:.m=.o))
-endif
-
+DYLIB_OBJECTS +=$(strip $(DYLIB_C_SOURCES:.c=.o))
+DYLIB_OBJECTS +=$(strip $(DYLIB_OBJC_SOURCES:.m=.o))
 ifneq "$(strip $(DYLIB_CXX_SOURCES))" ""
-	DYLIB_OBJECTS +=$(strip $(DYLIB_CXX_SOURCES:.cpp=.o))
+	DYLIB_OBJECTS +=$(strip $(patsubst %.mm, %.o, $(DYLIB_CXX_SOURCES:.cpp=.o)))
 	CXX = $(call cxx_compiler,$(CC))
 	LD = $(call cxx_linker,$(CC))
 endif
@@ -589,6 +601,9 @@
 ifeq "$(DYLIB_ONLY)" ""
 $(EXE) : $(OBJECTS) $(ARCHIVE_NAME) $(DYLIB_FILENAME)
 	$(LD) $(OBJECTS) $(ARCHIVE_NAME) -L. -l$(DYLIB_NAME) $(LDFLAGS) -o "$(EXE)"
+ifneq "$(CODESIGN)" ""
+	$(CODESIGN) -s - "$(EXE)"
+endif
 else
 EXE = $(DYLIB_FILENAME)
 endif
@@ -641,7 +656,23 @@
 
 $(DYLIB_FILENAME) : $(DYLIB_OBJECTS)
 ifeq "$(OS)" "Darwin"
-	$(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -install_name "$(DYLIB_EXECUTABLE_PATH)/$(DYLIB_FILENAME)" -dynamiclib -o "$(DYLIB_FILENAME)"
+ifneq "$(FRAMEWORK)" ""
+	mkdir -p $(FRAMEWORK).framework/Versions/A/Headers
+	mkdir -p $(FRAMEWORK).framework/Versions/A/Modules
+	mkdir -p $(FRAMEWORK).framework/Versions/A/Resources
+ifneq "$(FRAMEWORK_MODULES)" ""
+	cp -r $(FRAMEWORK_MODULES) $(FRAMEWORK).framework/Versions/A/Modules
+endif
+ifneq "$(FRAMEWORK_HEADERS)" ""
+	cp -r $(FRAMEWORK_HEADERS) $(FRAMEWORK).framework/Versions/A/Headers
+endif
+	(cd $(FRAMEWORK).framework/Versions; ln -sf A Current)
+	(cd $(FRAMEWORK).framework/; ln -sf Versions/A/Headers Headers)
+	(cd $(FRAMEWORK).framework/; ln -sf Versions/A/Modules Modules)
+	(cd $(FRAMEWORK).framework/; ln -sf Versions/A/Resources Resources)
+	(cd $(FRAMEWORK).framework/; ln -sf Versions/A/$(FRAMEWORK) $(FRAMEWORK))
+endif
+	$(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -install_name "$(DYLIB_INSTALL_NAME)" -dynamiclib -o "$(DYLIB_FILENAME)"
 ifneq "$(CODESIGN)" ""
 	$(CODESIGN) -s - "$(DYLIB_FILENAME)"
 endif
@@ -729,26 +760,10 @@
 dsym:	$(DSYM)
 all:	$(EXE) $(DSYM)
 clean::
-	$(RM) -rf $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) $(DWOS) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS) $(CLANG_MODULE_CACHE_DIR)
-ifneq "$(DYLIB_NAME)" ""
-	$(RM) -r $(DYLIB_FILENAME).dSYM
-	$(RM) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_PREREQS:.d=.d.tmp) $(DYLIB_DWOS) $(DYLIB_FILENAME) $(DYLIB_FILENAME).debug
-endif
-ifneq "$(PCH_OUTPUT)" ""
-	$(RM) $(PCH_OUTPUT)
-endif
-ifneq "$(DSYM)" ""
-	$(RM) -r "$(DSYM)"
-endif
-ifeq "$(OS)" "Windows_NT"
-# http://llvm.org/pr24589
-	IF EXIST "$(EXE)" del "$(EXE)"
-	$(RM) $(wildcard *.manifest *.pdb *.ilk)
-ifneq "$(DYLIB_NAME)" ""
-	$(RM) $(DYLIB_NAME).lib $(DYLIB_NAME).exp
-endif
+ifeq "$(findstring lldb-test-build.noindex, $(BUILDDIR))" ""
+	$(error Trying to invoke the clean rule, but not using the default build tree layout)
 else
-	$(RM) "$(EXE)"
+	$(RM) -r $(wildcard $(BUILDDIR)/*)
 endif
 
 #----------------------------------------------------------------------
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/pseudo_barrier.h b/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/pseudo_barrier.h
index 592000d..e4066b7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/pseudo_barrier.h
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/make/pseudo_barrier.h
@@ -1,10 +1,11 @@
 #include <atomic>
 
 // Note that although hogging the CPU while waiting for a variable to change
-// would be terrible in production code, it's great for testing since it
-// avoids a lot of messy context switching to get multiple threads synchronized.
+// would be terrible in production code, it's great for testing since it avoids
+// a lot of messy context switching to get multiple threads synchronized.
 
 typedef std::atomic<int> pseudo_barrier_t;
+
 #define pseudo_barrier_wait(barrier)        \
     do                                      \
     {                                       \
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
index be891da..aede03d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/plugins/builder_base.py
@@ -75,6 +75,7 @@
             "VPATH="+src_dir,
             "-C", build_dir,
             "-I", src_dir,
+            "-I", os.path.join(lldb_test, "make"),
             "-f", makefile]
 
 
@@ -103,6 +104,33 @@
     else:
         return ""
 
+def getDsymutilSpec():
+    """
+    Helper function to return the key-value string to specify the dsymutil
+    used for the make system.
+    """
+    if "DSYMUTIL" in os.environ:
+        return "DSYMUTIL={}".format(os.environ["DSYMUTIL"])
+    return "";
+
+def getSDKRootSpec():
+    """
+    Helper function to return the key-value string to specify the SDK root
+    used for the make system.
+    """
+    if "SDKROOT" in os.environ:
+        return "SDKROOT={}".format(os.environ["SDKROOT"])
+    return "";
+
+def getModuleCacheSpec():
+    """
+    Helper function to return the key-value string to specify the clang
+    module cache used for the make system.
+    """
+    if "CLANG_MODULE_CACHE_DIR" in os.environ:
+        return "CLANG_MODULE_CACHE_DIR={}".format(
+            os.environ["CLANG_MODULE_CACHE_DIR"])
+    return "";
 
 def getCmdLine(d):
     """
@@ -116,7 +144,7 @@
     pattern = '%s="%s"' if "win32" in sys.platform else "%s='%s'"
 
     def setOrAppendVariable(k, v):
-        append_vars = ["CFLAGS_EXTRAS", "LD_EXTRAS"]
+        append_vars = ["CFLAGS", "CFLAGS_EXTRAS", "LD_EXTRAS"]
         if k in append_vars and k in os.environ:
             v = os.environ[k] + " " + v
         return pattern % (k, v)
@@ -144,8 +172,14 @@
         testname=None):
     """Build the binaries the default way."""
     commands = []
-    commands.append(getMake(testdir, testname) + ["all", getArchSpec(architecture),
-                     getCCSpec(compiler), getCmdLine(dictionary)])
+    commands.append(getMake(testdir, testname) +
+                    ["all",
+                     getArchSpec(architecture),
+                     getCCSpec(compiler),
+                     getDsymutilSpec(),
+                     getSDKRootSpec(),
+                     getModuleCacheSpec(),
+                     getCmdLine(dictionary)])
 
     runBuildCommands(commands, sender=sender)
 
@@ -163,8 +197,13 @@
     """Build the binaries with dwarf debug info."""
     commands = []
     commands.append(getMake(testdir, testname) +
-                    ["MAKE_DSYM=NO", getArchSpec(architecture),
-                     getCCSpec(compiler), getCmdLine(dictionary)])
+                    ["MAKE_DSYM=NO",
+                     getArchSpec(architecture),
+                     getCCSpec(compiler),
+                     getDsymutilSpec(),
+                     getSDKRootSpec(),
+                     getModuleCacheSpec(),
+                     getCmdLine(dictionary)])
 
     runBuildCommands(commands, sender=sender)
     # True signifies that we can handle building dwarf.
@@ -181,9 +220,13 @@
     """Build the binaries with dwarf debug info."""
     commands = []
     commands.append(getMake(testdir, testname) +
-                    ["MAKE_DSYM=NO", "MAKE_DWO=YES",
+                    ["MAKE_DSYM=NO",
+                     "MAKE_DWO=YES",
                      getArchSpec(architecture),
                      getCCSpec(compiler),
+                     getDsymutilSpec(),
+                     getSDKRootSpec(),
+                     getModuleCacheSpec(),
                      getCmdLine(dictionary)])
 
     runBuildCommands(commands, sender=sender)
@@ -205,6 +248,9 @@
                      "MAKE_GMODULES=YES",
                      getArchSpec(architecture),
                      getCCSpec(compiler),
+                     getDsymutilSpec(),
+                     getSDKRootSpec(),
+                     getModuleCacheSpec(),
                      getCmdLine(dictionary)])
 
     lldbtest.system(commands, sender=sender)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/plugins/builder_darwin.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/plugins/builder_darwin.py
index 1cee39b..e109f91 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/plugins/builder_darwin.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/plugins/builder_darwin.py
@@ -1,6 +1,4 @@
 
-from __future__ import print_function
-import os
 import lldbsuite.test.lldbtest as lldbtest
 
 from builder_base import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py
index 5e21471..dd57846 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/breakpoint/TestBreakpointAPI.py
@@ -2,12 +2,6 @@
 Test SBBreakpoint APIs.
 """
 
-from __future__ import print_function
-
-
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/class_members/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/class_members/Makefile
index 0d7550f..6f34ff7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/class_members/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/class_members/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 OBJCXX_SOURCES := main.mm
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
index 074bbc7..884043a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/class_members/TestSBTypeClassMembers.py
@@ -2,12 +2,8 @@
 Test SBType APIs to fetch member function types.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -105,3 +101,17 @@
         self.assertEquals("int",
             Thingy.GetMemberFunctionAtIndex(1).GetArgumentTypeAtIndex(
             0).GetName(), "Thingy::foo takes an int")
+
+        self.assertEquals("Derived::dImpl()", Derived.GetMemberFunctionAtIndex(0).GetDemangledName())
+        self.assertEquals("Derived::baz(float)", Derived.GetMemberFunctionAtIndex(1).GetDemangledName())
+        self.assertEquals("Base::foo(int, int)", Base.GetMemberFunctionAtIndex(0).GetDemangledName())
+        self.assertEquals("Base::bar(int, char)", Base.GetMemberFunctionAtIndex(1).GetDemangledName())
+        self.assertEquals("Base::dat()", Base.GetMemberFunctionAtIndex(2).GetDemangledName())
+        self.assertEquals("Base::sfunc(char, int, float)", Base.GetMemberFunctionAtIndex(3).GetDemangledName())
+
+        self.assertEquals("_ZN7Derived5dImplEv", Derived.GetMemberFunctionAtIndex(0).GetMangledName())
+        self.assertEquals("_ZN7Derived3bazEf", Derived.GetMemberFunctionAtIndex(1).GetMangledName())
+        self.assertEquals("_ZN4Base3fooEii", Base.GetMemberFunctionAtIndex(0).GetMangledName())
+        self.assertEquals("_ZN4Base3barEic", Base.GetMemberFunctionAtIndex(1).GetMangledName())
+        self.assertEquals("_ZN4Base3datEv", Base.GetMemberFunctionAtIndex(2).GetMangledName())
+        self.assertEquals("_ZN4Base5sfuncEcif", Base.GetMemberFunctionAtIndex(3).GetMangledName())
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py
index fcb17cb..32202acb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/debugger/TestDebuggerAPI.py
@@ -2,7 +2,6 @@
 Test Debugger APIs.
 """
 
-import os
 import lldb
 
 from lldbsuite.test.decorators import *
@@ -13,9 +12,9 @@
 class DebuggerAPITestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_debugger_api_boundary_condition(self):
         """Exercise SBDebugger APIs with boundary conditions."""
         self.dbg.HandleCommand(None)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
index 5c0c7bb..e002065 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
@@ -14,9 +14,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -26,9 +23,9 @@
 class APIDefaultConstructorTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBAddress(self):
         obj = lldb.SBAddress()
         if self.TraceOn():
@@ -39,7 +36,6 @@
         sb_address.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBBlock(self):
         obj = lldb.SBBlock()
         if self.TraceOn():
@@ -50,7 +46,6 @@
         sb_block.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBBreakpoint(self):
         obj = lldb.SBBreakpoint()
         if self.TraceOn():
@@ -61,7 +56,6 @@
         sb_breakpoint.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBBreakpointLocation(self):
         obj = lldb.SBBreakpointLocation()
         if self.TraceOn():
@@ -72,7 +66,6 @@
         sb_breakpointlocation.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBBreakpointName(self):
         obj = lldb.SBBreakpointName()
         if self.TraceOn():
@@ -83,7 +76,6 @@
         sb_breakpointname.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBBroadcaster(self):
         obj = lldb.SBBroadcaster()
         if self.TraceOn():
@@ -94,7 +86,6 @@
         sb_broadcaster.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBCommandReturnObject(self):
         """SBCommandReturnObject object is valid after default construction."""
         obj = lldb.SBCommandReturnObject()
@@ -103,7 +94,6 @@
         self.assertTrue(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBCommunication(self):
         obj = lldb.SBCommunication()
         if self.TraceOn():
@@ -114,7 +104,6 @@
         sb_communication.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBCompileUnit(self):
         obj = lldb.SBCompileUnit()
         if self.TraceOn():
@@ -125,7 +114,6 @@
         sb_compileunit.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBDebugger(self):
         obj = lldb.SBDebugger()
         if self.TraceOn():
@@ -136,7 +124,6 @@
         sb_debugger.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     # darwin: This test passes with swig 3.0.2, fails w/3.0.5 other tests fail
     # with 2.0.12 http://llvm.org/pr23488
     def test_SBError(self):
@@ -149,7 +136,6 @@
         sb_error.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBEvent(self):
         obj = lldb.SBEvent()
         # This is just to test that typemap, as defined in lldb.swig, works.
@@ -174,7 +160,6 @@
         sb_filespec.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBFrame(self):
         obj = lldb.SBFrame()
         if self.TraceOn():
@@ -185,7 +170,6 @@
         sb_frame.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBFunction(self):
         obj = lldb.SBFunction()
         if self.TraceOn():
@@ -196,7 +180,19 @@
         sb_function.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
+    def test_SBFile(self):
+        sbf = lldb.SBFile()
+        self.assertFalse(sbf.IsValid())
+        self.assertFalse(bool(sbf))
+        e, n = sbf.Write(b'foo')
+        self.assertTrue(e.Fail())
+        self.assertEqual(n, 0)
+        buffer = bytearray(100)
+        e, n = sbf.Read(buffer)
+        self.assertEqual(n, 0)
+        self.assertTrue(e.Fail())
+
+    @add_test_categories(['pyapi'])
     def test_SBInstruction(self):
         obj = lldb.SBInstruction()
         if self.TraceOn():
@@ -207,7 +203,6 @@
         sb_instruction.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBInstructionList(self):
         obj = lldb.SBInstructionList()
         if self.TraceOn():
@@ -218,7 +213,6 @@
         sb_instructionlist.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBLineEntry(self):
         obj = lldb.SBLineEntry()
         if self.TraceOn():
@@ -229,7 +223,6 @@
         sb_lineentry.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBListener(self):
         obj = lldb.SBListener()
         if self.TraceOn():
@@ -240,7 +233,6 @@
         sb_listener.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     # Py3 asserts due to a bug in SWIG.  Trying to upstream a patch to fix
     # this in 3.0.8
     @skipIf(py_version=['>=', (3, 0)], swig_version=['<', (3, 0, 8)])
@@ -254,7 +246,6 @@
         sb_module.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBProcess(self):
         obj = lldb.SBProcess()
         if self.TraceOn():
@@ -265,7 +256,6 @@
         sb_process.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBProcessInfo(self):
         obj = lldb.SBProcessInfo()
         if self.TraceOn():
@@ -276,7 +266,6 @@
         sb_process_info.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBSection(self):
         obj = lldb.SBSection()
         if self.TraceOn():
@@ -287,7 +276,6 @@
         sb_section.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBStream(self):
         """SBStream object is valid after default construction."""
         obj = lldb.SBStream()
@@ -296,7 +284,6 @@
         self.assertTrue(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBStringList(self):
         obj = lldb.SBStringList()
         if self.TraceOn():
@@ -307,7 +294,6 @@
         sb_stringlist.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBSymbol(self):
         obj = lldb.SBSymbol()
         if self.TraceOn():
@@ -318,7 +304,6 @@
         sb_symbol.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBSymbolContext(self):
         obj = lldb.SBSymbolContext()
         if self.TraceOn():
@@ -329,7 +314,6 @@
         sb_symbolcontext.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBSymbolContextList(self):
         """SBSymbolContextList object is valid after default construction."""
         obj = lldb.SBSymbolContextList()
@@ -338,7 +322,6 @@
         self.assertTrue(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBTarget(self):
         obj = lldb.SBTarget()
         if self.TraceOn():
@@ -349,7 +332,6 @@
         sb_target.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBThread(self):
         obj = lldb.SBThread()
         if self.TraceOn():
@@ -360,7 +342,6 @@
         sb_thread.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBType(self):
         try:
             obj = lldb.SBType()
@@ -379,7 +360,6 @@
         sb_type.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBTypeList(self):
         """SBTypeList object is valid after default construction."""
         obj = lldb.SBTypeList()
@@ -388,7 +368,6 @@
         self.assertTrue(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBValue(self):
         obj = lldb.SBValue()
         if self.TraceOn():
@@ -399,7 +378,6 @@
         sb_value.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBValueList(self):
         obj = lldb.SBValueList()
         if self.TraceOn():
@@ -410,7 +388,6 @@
         sb_valuelist.fuzz_obj(obj)
 
     @add_test_categories(['pyapi'])
-    @no_debug_info_test
     def test_SBWatchpoint(self):
         obj = lldb.SBWatchpoint()
         if self.TraceOn():
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py
index 00654ca..299ca08 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_block.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py
index 26bf6f6..5ac1c06 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointlocation.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py
index 56016c0..b32ed0d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_breakpointname.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py
index b2f5ab5..59491a7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_broadcaster.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py
index 9793e9b..1f5aefb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_communication.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py
index 77fa469..4caef33 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_compileunit.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py
index ac0f9a8..e6267c8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_debugger.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
@@ -20,7 +19,10 @@
     obj.GetCommandInterpreter()
     obj.HandleCommand("nothing here")
     listener = obj.GetListener()
-    obj.HandleProcessEvent(lldb.SBProcess(), lldb.SBEvent(), None, None)
+    try:
+        obj.HandleProcessEvent(lldb.SBProcess(), lldb.SBEvent(), None, None)
+    except Exception:
+        pass
     obj.CreateTargetWithFileAndTargetTriple("a.out", "A-B-C")
     obj.CreateTargetWithFileAndArch("b.out", "arm")
     obj.CreateTarget("c.out")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py
index 9c0f8d8..7d14c3e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_error.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py
index 4c24c60..aaf71d0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_event.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py
index 33b4d69..4ab5c49 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_filespec.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py
index 4637fc4..b81f1af 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_frame.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py
index bd9c887..764fb37 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_function.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py
index e0be413..fbfb231 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instruction.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
@@ -10,7 +9,10 @@
     obj.GetAddress()
     obj.GetByteSize()
     obj.DoesBranch()
-    obj.Print(None)
+    try:
+        obj.Print(None)
+    except Exception:
+        pass
     obj.GetDescription(lldb.SBStream())
     obj.EmulateWithFrame(lldb.SBFrame(), 0)
     obj.DumpEmulation("armv7")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py
index 8870bf5..9e7ebf9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_instructionlist.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
@@ -10,7 +9,10 @@
     obj.GetSize()
     obj.GetInstructionAtIndex(0xffffffff)
     obj.AppendInstruction(lldb.SBInstruction())
-    obj.Print(None)
+    try:
+        obj.Print(None)
+    except Exception:
+        pass
     obj.GetDescription(lldb.SBStream())
     obj.DumpEmulationForAllInstructions("armv7")
     obj.Clear()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py
index 9c89792..53761a0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_lineentry.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py
index 5f0ebda..b40cfd4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_listener.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py
index d8c441e..93e43d4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
@@ -13,7 +12,10 @@
     obj.GetSTDOUT(6)
     obj.GetSTDERR(6)
     event = lldb.SBEvent()
-    obj.ReportEventState(event, None)
+    try:
+        obj.ReportEventState(event, None)
+    except Exception:
+        pass
     obj.AppendEventStateReport(event, lldb.SBCommandReturnObject())
     error = lldb.SBError()
     obj.RemoteAttachToProcessWithID(123, error)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py
index 020ad4e..0c4562f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_process_info.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py
index 4b00276..d611818 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_section.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py
index 44111ad..015de7a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_stringlist.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py
index d2d107a..ce942a9 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbol.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py
index ac43925..e46e471 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_symbolcontext.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py
index af7f17b..3b521dc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_target.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py
index 3234bf2..0e5f944 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_thread.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py
index 6016a90..54ab482 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_type.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py
index f283177..9e31a70 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_value.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py
index cbd9810..f20c877 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_valuelist.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py
index b30d3bb..8aa38126 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/default-constructor/sb_watchpoint.py
@@ -2,7 +2,6 @@
 Fuzz tests an object after the default construction to make sure it does not crash lldb.
 """
 
-import sys
 import lldb
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
index deb0c7a..8e2bc4a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassembleRawData.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
index 1e1e4d7..e4d085d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/disassemble-raw-data/TestDisassemble_VST1_64.py
@@ -4,10 +4,9 @@
 
 from __future__ import print_function
 
+from io import StringIO
+import sys
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -18,16 +17,13 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    @skipTestIfFn(
-        lambda: True,
-        "llvm.org/pr24575: all tests get ERRORs in dotest.py after this")
     @add_test_categories(['pyapi'])
     @no_debug_info_test
-    @skipIf(triple='^mips')
+    @skipIfLLVMTargetMissing("ARM")
     def test_disassemble_invalid_vst_1_64_raw_data(self):
         """Test disassembling invalid vst1.64 raw bytes with the API."""
         # Create a target from the debugger.
-        target = self.dbg.CreateTargetWithFileAndTargetTriple("", "thumbv7")
+        target = self.dbg.CreateTargetWithFileAndTargetTriple("", "thumbv7-apple-macosx")
         self.assertTrue(target, VALID_TARGET)
 
         raw_bytes = bytearray([0xf0, 0xb5, 0x03, 0xaf,
@@ -36,19 +32,38 @@
                                0x24, 0xf0, 0x0f, 0x04,
                                0xa5, 0x46])
 
+        assembly = """
+        push   {r4, r5, r6, r7, lr}
+        add    r7, sp, #0xc
+        push.w {r8, r10, r11}
+        sub.w  r4, sp, #0x40
+        bic    r4, r4, #0xf
+        mov    sp, r4
+        """
+        def split(s):
+            return [x.strip() for x in s.strip().splitlines()]
+
         insts = target.GetInstructions(lldb.SBAddress(), raw_bytes)
 
         if self.TraceOn():
             print()
             for i in insts:
-                print("Disassembled%s" % str(i))
+                print("Disassembled %s" % str(i))
 
-        # Remove the following return statement when the radar is fixed.
-        return
+        if sys.version_info.major >= 3:
+            sio = StringIO()
+            insts.Print(sio)
+            self.assertEqual(split(assembly), split(sio.getvalue()))
 
-        # rdar://problem/11034702
-        # VST1 (multiple single elements) encoding?
-        # The disassembler should not crash!
+        self.assertEqual(insts.GetSize(), len(split(assembly)))
+
+        if sys.version_info.major >= 3:
+            for i,asm in enumerate(split(assembly)):
+                inst = insts.GetInstructionAtIndex(i)
+                sio = StringIO()
+                inst.Print(sio)
+                self.assertEqual(asm, sio.getvalue().strip())
+
         raw_bytes = bytearray([0x04, 0xf9, 0xed, 0x82])
 
         insts = target.GetInstructions(lldb.SBAddress(), raw_bytes)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/event/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/event/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/event/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/event/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py
index 82e8f8e..97ebe8f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/event/TestEvents.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import re
 import lldb
 from lldbsuite.test.decorators import *
@@ -19,6 +17,7 @@
 class EventAPITestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
index e69de29..53ca649 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/file_handle/TestFileHandle.py
@@ -0,0 +1,919 @@
+"""
+Test lldb Python API for file handles.
+"""
+
+
+import os
+import io
+import re
+import sys
+from contextlib import contextmanager
+
+import lldb
+from lldbsuite.test import  lldbtest
+from lldbsuite.test.decorators import *
+
+class OhNoe(Exception):
+    pass
+
+class BadIO(io.TextIOBase):
+    @property
+    def closed(self):
+        return False
+    def writable(self):
+        return True
+    def readable(self):
+        return True
+    def write(self, s):
+        raise OhNoe('OH NOE')
+    def read(self, n):
+        raise OhNoe("OH NOE")
+    def flush(self):
+        raise OhNoe('OH NOE')
+
+# This class will raise an exception while it's being
+# converted into a C++ object by swig
+class ReallyBadIO(io.TextIOBase):
+    def fileno(self):
+        return 999
+    def writable(self):
+        raise OhNoe("OH NOE!!!")
+
+class MutableBool():
+    def __init__(self, value):
+        self.value = value
+    def set(self, value):
+        self.value = bool(value)
+    def __bool__(self):
+        return self.value
+
+class FlushTestIO(io.StringIO):
+    def __init__(self, mutable_flushed, mutable_closed):
+        super(FlushTestIO, self).__init__()
+        self.mut_flushed = mutable_flushed
+        self.mut_closed = mutable_closed
+    def close(self):
+        self.mut_closed.set(True)
+        return super(FlushTestIO, self).close()
+    def flush(self):
+        self.mut_flushed.set(True)
+        return super(FlushTestIO, self).flush()
+
+@contextmanager
+def replace_stdout(new):
+    old = sys.stdout
+    sys.stdout = new
+    try:
+        yield
+    finally:
+        sys.stdout = old
+
+def readStrippedLines(f):
+    def i():
+        for line in f:
+            line = line.strip()
+            if line:
+                yield line
+    return list(i())
+
+
+class FileHandleTestCase(lldbtest.TestBase):
+
+    NO_DEBUG_INFO_TESTCASE = True
+    mydir = lldbtest.Base.compute_mydir(__file__)
+
+    # The way this class interacts with the debugger is different
+    # than normal.   Most of these test cases will mess with the
+    # debugger I/O streams, so we want a fresh debugger for each
+    # test so those mutations don't interfere with each other.
+    #
+    # Also, the way normal tests evaluate debugger commands is
+    # by using a SBCommandInterpreter directly, which captures
+    # the output in a result object.   For many of tests tests
+    # we want the debugger to write the  output directly to
+    # its I/O streams like it would have done interactively.
+    #
+    # For this reason we also define handleCmd() here, even though
+    # it is similar to runCmd().
+
+    def setUp(self):
+        super(FileHandleTestCase, self).setUp()
+        self.debugger = lldb.SBDebugger.Create()
+        self.out_filename = self.getBuildArtifact('output')
+        self.in_filename = self.getBuildArtifact('input')
+
+    def tearDown(self):
+        lldb.SBDebugger.Destroy(self.debugger)
+        super(FileHandleTestCase, self).tearDown()
+        for name in (self.out_filename, self.in_filename):
+            if os.path.exists(name):
+                os.unlink(name)
+
+    # Similar to runCmd(), but this uses the per-test debugger, and it
+    # supports, letting the debugger just print the results instead
+    # of collecting them.
+    def handleCmd(self, cmd, check=True, collect_result=True):
+        assert not check or collect_result
+        ret = lldb.SBCommandReturnObject()
+        if collect_result:
+            interpreter = self.debugger.GetCommandInterpreter()
+            interpreter.HandleCommand(cmd, ret)
+        else:
+            self.debugger.HandleCommand(cmd)
+        self.debugger.GetOutputFile().Flush()
+        self.debugger.GetErrorFile().Flush()
+        if collect_result and check:
+            self.assertTrue(ret.Succeeded())
+        return ret.GetOutput()
+
+
+    @add_test_categories(['pyapi'])
+    def test_legacy_file_out_script(self):
+        with open(self.out_filename, 'w') as f:
+            self.debugger.SetOutputFileHandle(f, False)
+            # scripts print to output even if you capture the results
+            # I'm not sure I love that behavior, but that's the way
+            # it's been for a long time.  That's why this test works
+            # even with collect_result=True.
+            self.handleCmd('script 1+1')
+            self.debugger.GetOutputFileHandle().write('FOO\n')
+        lldb.SBDebugger.Destroy(self.debugger)
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(readStrippedLines(f), ['2', 'FOO'])
+
+
+    @add_test_categories(['pyapi'])
+    def test_legacy_file_out(self):
+        with open(self.out_filename, 'w') as f:
+            self.debugger.SetOutputFileHandle(f, False)
+            self.handleCmd('p/x 3735928559', collect_result=False, check=False)
+        lldb.SBDebugger.Destroy(self.debugger)
+        with open(self.out_filename, 'r') as f:
+            self.assertIn('deadbeef', f.read())
+
+    @add_test_categories(['pyapi'])
+    def test_legacy_file_err_with_get(self):
+        with open(self.out_filename, 'w') as f:
+            self.debugger.SetErrorFileHandle(f, False)
+            self.handleCmd('lolwut', check=False, collect_result=False)
+            f2 = self.debugger.GetErrorFileHandle()
+            f2.write('FOOBAR\n')
+            f2.flush()
+        lldb.SBDebugger.Destroy(self.debugger)
+        with open(self.out_filename, 'r') as f:
+            errors = f.read()
+            self.assertTrue(re.search(r'error:.*lolwut', errors))
+            self.assertTrue(re.search(r'FOOBAR', errors))
+
+
+    @add_test_categories(['pyapi'])
+    def test_legacy_file_err(self):
+        with open(self.out_filename, 'w') as f:
+            self.debugger.SetErrorFileHandle(f, False)
+            self.handleCmd('lol', check=False, collect_result=False)
+        lldb.SBDebugger.Destroy(self.debugger)
+        with open(self.out_filename, 'r') as f:
+            self.assertIn("is not a valid command", f.read())
+
+
+    @add_test_categories(['pyapi'])
+    def test_legacy_file_error(self):
+        debugger = self.debugger
+        with open(self.out_filename, 'w') as f:
+            debugger.SetErrorFileHandle(f, False)
+            self.handleCmd('lolwut', check=False, collect_result=False)
+        with open(self.out_filename, 'r') as f:
+            errors = f.read()
+            self.assertTrue(re.search(r'error:.*lolwut', errors))
+
+    @add_test_categories(['pyapi'])
+    def test_sbfile_type_errors(self):
+        sbf = lldb.SBFile()
+        self.assertRaises(Exception, sbf.Write, None)
+        self.assertRaises(Exception, sbf.Read, None)
+        self.assertRaises(Exception, sbf.Read, b'this bytes is not mutable')
+        self.assertRaises(Exception, sbf.Write, u"ham sandwich")
+        self.assertRaises(Exception, sbf.Read, u"ham sandwich")
+
+
+    @add_test_categories(['pyapi'])
+    def test_sbfile_write_fileno(self):
+        with open(self.out_filename, 'w') as f:
+            sbf = lldb.SBFile(f.fileno(), "w", False)
+            self.assertTrue(sbf.IsValid())
+            e, n = sbf.Write(b'FOO\nBAR')
+            self.assertTrue(e.Success())
+            self.assertEqual(n, 7)
+            sbf.Close()
+            self.assertFalse(sbf.IsValid())
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(readStrippedLines(f), ['FOO', 'BAR'])
+
+
+    @add_test_categories(['pyapi'])
+    def test_sbfile_write(self):
+        with open(self.out_filename, 'w') as f:
+            sbf = lldb.SBFile(f)
+            e, n = sbf.Write(b'FOO\n')
+            self.assertTrue(e.Success())
+            self.assertEqual(n, 4)
+            sbf.Close()
+            self.assertTrue(f.closed)
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read().strip(), 'FOO')
+
+
+    @add_test_categories(['pyapi'])
+    def test_sbfile_read_fileno(self):
+        with open(self.out_filename, 'w') as f:
+            f.write('FOO')
+        with open(self.out_filename, 'r') as f:
+            sbf = lldb.SBFile(f.fileno(), "r", False)
+            self.assertTrue(sbf.IsValid())
+            buffer = bytearray(100)
+            e, n = sbf.Read(buffer)
+            self.assertTrue(e.Success())
+            self.assertEqual(buffer[:n], b'FOO')
+
+
+    @add_test_categories(['pyapi'])
+    def test_sbfile_read(self):
+        with open(self.out_filename, 'w') as f:
+            f.write('foo')
+        with open(self.out_filename, 'r') as f:
+            sbf = lldb.SBFile(f)
+            buf = bytearray(100)
+            e, n = sbf.Read(buf)
+            self.assertTrue(e.Success())
+            self.assertEqual(n, 3)
+            self.assertEqual(buf[:n], b'foo')
+            sbf.Close()
+            self.assertTrue(f.closed)
+
+
+    @add_test_categories(['pyapi'])
+    def test_fileno_out(self):
+        with open(self.out_filename, 'w') as f:
+            sbf = lldb.SBFile(f.fileno(), "w", False)
+            status = self.debugger.SetOutputFile(sbf)
+            self.assertTrue(status.Success())
+            self.handleCmd('script 1+2')
+            self.debugger.GetOutputFile().Write(b'quux')
+
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(readStrippedLines(f), ['3', 'quux'])
+
+
+    @add_test_categories(['pyapi'])
+    def test_fileno_help(self):
+        with open(self.out_filename, 'w') as f:
+            sbf = lldb.SBFile(f.fileno(), "w", False)
+            status = self.debugger.SetOutputFile(sbf)
+            self.assertTrue(status.Success())
+            self.handleCmd("help help", collect_result=False, check=False)
+        with open(self.out_filename, 'r') as f:
+            self.assertTrue(re.search(r'Show a list of all debugger commands', f.read()))
+
+
+    @add_test_categories(['pyapi'])
+    def test_help(self):
+        debugger = self.debugger
+        with open(self.out_filename, 'w') as f:
+            status = debugger.SetOutputFile(lldb.SBFile(f))
+            self.assertTrue(status.Success())
+            self.handleCmd("help help", check=False, collect_result=False)
+        with open(self.out_filename, 'r') as f:
+            self.assertIn('Show a list of all debugger commands', f.read())
+
+
+    @add_test_categories(['pyapi'])
+    def test_immediate(self):
+        with open(self.out_filename, 'w') as f:
+            ret = lldb.SBCommandReturnObject()
+            ret.SetImmediateOutputFile(f)
+            interpreter = self.debugger.GetCommandInterpreter()
+            interpreter.HandleCommand("help help", ret)
+            # make sure the file wasn't closed early.
+            f.write("\nQUUX\n")
+        ret = None # call destructor and flush streams
+        with open(self.out_filename, 'r') as f:
+            output = f.read()
+            self.assertTrue(re.search(r'Show a list of all debugger commands', output))
+            self.assertTrue(re.search(r'QUUX', output))
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_immediate_string(self):
+        f = io.StringIO()
+        ret = lldb.SBCommandReturnObject()
+        ret.SetImmediateOutputFile(f)
+        interpreter = self.debugger.GetCommandInterpreter()
+        interpreter.HandleCommand("help help", ret)
+        # make sure the file wasn't closed early.
+        f.write("\nQUUX\n")
+        ret = None # call destructor and flush streams
+        output = f.getvalue()
+        self.assertTrue(re.search(r'Show a list of all debugger commands', output))
+        self.assertTrue(re.search(r'QUUX', output))
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_immediate_sbfile_string(self):
+        f = io.StringIO()
+        ret = lldb.SBCommandReturnObject()
+        ret.SetImmediateOutputFile(lldb.SBFile(f))
+        interpreter = self.debugger.GetCommandInterpreter()
+        interpreter.HandleCommand("help help", ret)
+        output = f.getvalue()
+        ret = None # call destructor and flush streams
+        # sbfile default constructor doesn't borrow the file
+        self.assertTrue(f.closed)
+        self.assertTrue(re.search(r'Show a list of all debugger commands', output))
+
+
+    @add_test_categories(['pyapi'])
+    def test_fileno_inout(self):
+        with open(self.in_filename, 'w') as f:
+            f.write("help help\n")
+
+        with open(self.out_filename, 'w') as outf, open(self.in_filename, 'r') as inf:
+
+            outsbf = lldb.SBFile(outf.fileno(), "w", False)
+            status = self.debugger.SetOutputFile(outsbf)
+            self.assertTrue(status.Success())
+
+            insbf = lldb.SBFile(inf.fileno(), "r", False)
+            status = self.debugger.SetInputFile(insbf)
+            self.assertTrue(status.Success())
+
+            opts = lldb.SBCommandInterpreterRunOptions()
+            self.debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
+            self.debugger.GetOutputFile().Flush()
+
+        with open(self.out_filename, 'r') as f:
+            self.assertTrue(re.search(r'Show a list of all debugger commands', f.read()))
+
+
+    @add_test_categories(['pyapi'])
+    def test_inout(self):
+        with open(self.in_filename, 'w') as f:
+            f.write("help help\n")
+        with  open(self.out_filename, 'w') as outf, \
+              open(self.in_filename, 'r') as inf:
+            status = self.debugger.SetOutputFile(lldb.SBFile(outf))
+            self.assertTrue(status.Success())
+            status = self.debugger.SetInputFile(lldb.SBFile(inf))
+            self.assertTrue(status.Success())
+            opts = lldb.SBCommandInterpreterRunOptions()
+            self.debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
+            self.debugger.GetOutputFile().Flush()
+        with open(self.out_filename, 'r') as f:
+            output = f.read()
+            self.assertIn('Show a list of all debugger commands', output)
+
+
+    @add_test_categories(['pyapi'])
+    def test_binary_inout(self):
+        debugger = self.debugger
+        with open(self.in_filename, 'w') as f:
+            f.write("help help\n")
+        with  open(self.out_filename, 'wb') as outf, \
+              open(self.in_filename, 'rb') as inf:
+            status = debugger.SetOutputFile(lldb.SBFile(outf))
+            self.assertTrue(status.Success())
+            status = debugger.SetInputFile(lldb.SBFile(inf))
+            self.assertTrue(status.Success())
+            opts = lldb.SBCommandInterpreterRunOptions()
+            debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
+            debugger.GetOutputFile().Flush()
+        with open(self.out_filename, 'r') as f:
+            output = f.read()
+            self.assertIn('Show a list of all debugger commands', output)
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_string_inout(self):
+        inf = io.StringIO("help help\np/x ~0\n")
+        outf = io.StringIO()
+        status = self.debugger.SetOutputFile(lldb.SBFile(outf))
+        self.assertTrue(status.Success())
+        status = self.debugger.SetInputFile(lldb.SBFile(inf))
+        self.assertTrue(status.Success())
+        opts = lldb.SBCommandInterpreterRunOptions()
+        self.debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
+        self.debugger.GetOutputFile().Flush()
+        output = outf.getvalue()
+        self.assertIn('Show a list of all debugger commands', output)
+        self.assertIn('0xfff', output)
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_bytes_inout(self):
+        inf = io.BytesIO(b"help help\nhelp b\n")
+        outf = io.BytesIO()
+        status = self.debugger.SetOutputFile(lldb.SBFile(outf))
+        self.assertTrue(status.Success())
+        status = self.debugger.SetInputFile(lldb.SBFile(inf))
+        self.assertTrue(status.Success())
+        opts = lldb.SBCommandInterpreterRunOptions()
+        self.debugger.RunCommandInterpreter(True, False, opts, 0, False, False)
+        self.debugger.GetOutputFile().Flush()
+        output = outf.getvalue()
+        self.assertIn(b'Show a list of all debugger commands', output)
+        self.assertIn(b'Set a breakpoint', output)
+
+
+    @add_test_categories(['pyapi'])
+    def test_fileno_error(self):
+        with open(self.out_filename, 'w') as f:
+
+            sbf = lldb.SBFile(f.fileno(), 'w', False)
+            status = self.debugger.SetErrorFile(sbf)
+            self.assertTrue(status.Success())
+
+            self.handleCmd('lolwut', check=False, collect_result=False)
+
+            self.debugger.GetErrorFile().Write(b'\nzork\n')
+
+        with open(self.out_filename, 'r') as f:
+            errors = f.read()
+            self.assertTrue(re.search(r'error:.*lolwut', errors))
+            self.assertTrue(re.search(r'zork', errors))
+
+
+    @add_test_categories(['pyapi'])
+    def test_replace_stdout(self):
+        f = io.StringIO()
+        with replace_stdout(f):
+            self.assertEqual(sys.stdout, f)
+            self.handleCmd('script sys.stdout.write("lol")',
+                collect_result=False, check=False)
+            self.assertEqual(sys.stdout, f)
+
+
+    @add_test_categories(['pyapi'])
+    def test_replace_stdout_with_nonfile(self):
+        debugger = self.debugger
+        f = io.StringIO()
+        with replace_stdout(f):
+            class Nothing():
+                pass
+            with replace_stdout(Nothing):
+                self.assertEqual(sys.stdout, Nothing)
+                self.handleCmd('script sys.stdout.write("lol")',
+                    check=False, collect_result=False)
+                self.assertEqual(sys.stdout, Nothing)
+            sys.stdout.write(u"FOO")
+        self.assertEqual(f.getvalue(), "FOO")
+
+
+    @add_test_categories(['pyapi'])
+    def test_sbfile_write_borrowed(self):
+        with open(self.out_filename, 'w') as f:
+            sbf = lldb.SBFile.Create(f, borrow=True)
+            e, n = sbf.Write(b'FOO')
+            self.assertTrue(e.Success())
+            self.assertEqual(n, 3)
+            sbf.Close()
+            self.assertFalse(f.closed)
+            f.write('BAR\n')
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read().strip(), 'FOOBAR')
+
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_sbfile_write_forced(self):
+        with open(self.out_filename, 'w') as f:
+            written = MutableBool(False)
+            orig_write = f.write
+            def mywrite(x):
+                written.set(True)
+                return orig_write(x)
+            f.write = mywrite
+            sbf = lldb.SBFile.Create(f, force_io_methods=True)
+            e, n = sbf.Write(b'FOO')
+            self.assertTrue(written)
+            self.assertTrue(e.Success())
+            self.assertEqual(n, 3)
+            sbf.Close()
+            self.assertTrue(f.closed)
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read().strip(), 'FOO')
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_sbfile_write_forced_borrowed(self):
+        with open(self.out_filename, 'w') as f:
+            written = MutableBool(False)
+            orig_write = f.write
+            def mywrite(x):
+                written.set(True)
+                return orig_write(x)
+            f.write = mywrite
+            sbf = lldb.SBFile.Create(f, borrow=True, force_io_methods=True)
+            e, n = sbf.Write(b'FOO')
+            self.assertTrue(written)
+            self.assertTrue(e.Success())
+            self.assertEqual(n, 3)
+            sbf.Close()
+            self.assertFalse(f.closed)
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read().strip(), 'FOO')
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_sbfile_write_string(self):
+        f = io.StringIO()
+        sbf = lldb.SBFile(f)
+        e, n = sbf.Write(b'FOO')
+        self.assertEqual(f.getvalue().strip(), "FOO")
+        self.assertTrue(e.Success())
+        self.assertEqual(n, 3)
+        sbf.Close()
+        self.assertTrue(f.closed)
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_string_out(self):
+        f = io.StringIO()
+        status = self.debugger.SetOutputFile(f)
+        self.assertTrue(status.Success())
+        self.handleCmd("script 'foobar'")
+        self.assertEqual(f.getvalue().strip(), "'foobar'")
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_string_error(self):
+        f = io.StringIO()
+        debugger = self.debugger
+        status = debugger.SetErrorFile(f)
+        self.assertTrue(status.Success())
+        self.handleCmd('lolwut', check=False, collect_result=False)
+        errors = f.getvalue()
+        self.assertTrue(re.search(r'error:.*lolwut', errors))
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_sbfile_write_bytes(self):
+        f = io.BytesIO()
+        sbf = lldb.SBFile(f)
+        e, n = sbf.Write(b'FOO')
+        self.assertEqual(f.getvalue().strip(), b"FOO")
+        self.assertTrue(e.Success())
+        self.assertEqual(n, 3)
+        sbf.Close()
+        self.assertTrue(f.closed)
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_sbfile_read_string(self):
+        f = io.StringIO('zork')
+        sbf = lldb.SBFile(f)
+        buf = bytearray(100)
+        e, n = sbf.Read(buf)
+        self.assertTrue(e.Success())
+        self.assertEqual(buf[:n], b'zork')
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_sbfile_read_string_one_byte(self):
+        f = io.StringIO('z')
+        sbf = lldb.SBFile(f)
+        buf = bytearray(1)
+        e, n = sbf.Read(buf)
+        self.assertTrue(e.Fail())
+        self.assertEqual(n, 0)
+        self.assertEqual(e.GetCString(), "can't read less than 6 bytes from a utf8 text stream")
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_sbfile_read_bytes(self):
+        f = io.BytesIO(b'zork')
+        sbf = lldb.SBFile(f)
+        buf = bytearray(100)
+        e, n = sbf.Read(buf)
+        self.assertTrue(e.Success())
+        self.assertEqual(buf[:n], b'zork')
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_sbfile_out(self):
+        with open(self.out_filename, 'w') as f:
+            sbf = lldb.SBFile(f)
+            status = self.debugger.SetOutputFile(sbf)
+            self.assertTrue(status.Success())
+            self.handleCmd('script 2+2')
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read().strip(), '4')
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_file_out(self):
+        with open(self.out_filename, 'w') as f:
+            status = self.debugger.SetOutputFile(f)
+            self.assertTrue(status.Success())
+            self.handleCmd('script 2+2')
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read().strip(), '4')
+
+
+    @add_test_categories(['pyapi'])
+    def test_sbfile_error(self):
+        with open(self.out_filename, 'w') as f:
+            sbf = lldb.SBFile(f)
+            status = self.debugger.SetErrorFile(sbf)
+            self.assertTrue(status.Success())
+            self.handleCmd('lolwut', check=False, collect_result=False)
+        with open(self.out_filename, 'r') as f:
+            errors = f.read()
+            self.assertTrue(re.search(r'error:.*lolwut', errors))
+
+
+    @add_test_categories(['pyapi'])
+    def test_file_error(self):
+        with open(self.out_filename, 'w') as f:
+            status = self.debugger.SetErrorFile(f)
+            self.assertTrue(status.Success())
+            self.handleCmd('lolwut', check=False, collect_result=False)
+        with open(self.out_filename, 'r') as f:
+            errors = f.read()
+            self.assertTrue(re.search(r'error:.*lolwut', errors))
+
+
+    @add_test_categories(['pyapi'])
+    def test_exceptions(self):
+        self.assertRaises(Exception, lldb.SBFile, None)
+        self.assertRaises(Exception, lldb.SBFile, "ham sandwich")
+        if sys.version_info[0] < 3:
+            self.assertRaises(Exception, lldb.SBFile, ReallyBadIO())
+        else:
+            self.assertRaises(OhNoe, lldb.SBFile, ReallyBadIO())
+            error, n = lldb.SBFile(BadIO()).Write(b"FOO")
+            self.assertEqual(n, 0)
+            self.assertTrue(error.Fail())
+            self.assertIn('OH NOE', error.GetCString())
+            error, n = lldb.SBFile(BadIO()).Read(bytearray(100))
+            self.assertEqual(n, 0)
+            self.assertTrue(error.Fail())
+            self.assertIn('OH NOE', error.GetCString())
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_exceptions_logged(self):
+        messages = list()
+        self.debugger.SetLoggingCallback(messages.append)
+        self.handleCmd('log enable lldb script')
+        self.debugger.SetOutputFile(lldb.SBFile(BadIO()))
+        self.handleCmd('script 1+1')
+        self.assertTrue(any('OH NOE' in msg for msg in messages))
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_flush(self):
+        flushed = MutableBool(False)
+        closed = MutableBool(False)
+        f = FlushTestIO(flushed, closed)
+        self.assertFalse(flushed)
+        self.assertFalse(closed)
+        sbf = lldb.SBFile(f)
+        self.assertFalse(flushed)
+        self.assertFalse(closed)
+        sbf = None
+        self.assertFalse(flushed)
+        self.assertTrue(closed)
+        self.assertTrue(f.closed)
+
+        flushed = MutableBool(False)
+        closed = MutableBool(False)
+        f = FlushTestIO(flushed, closed)
+        self.assertFalse(flushed)
+        self.assertFalse(closed)
+        sbf = lldb.SBFile.Create(f, borrow=True)
+        self.assertFalse(flushed)
+        self.assertFalse(closed)
+        sbf = None
+        self.assertTrue(flushed)
+        self.assertFalse(closed)
+        self.assertFalse(f.closed)
+
+
+    @add_test_categories(['pyapi'])
+    def test_fileno_flush(self):
+        with open(self.out_filename, 'w') as f:
+            f.write("foo")
+            sbf = lldb.SBFile(f)
+            sbf.Write(b'bar')
+            sbf = None
+            self.assertTrue(f.closed)
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read(), 'foobar')
+
+        with open(self.out_filename, 'w+') as f:
+            f.write("foo")
+            sbf = lldb.SBFile.Create(f, borrow=True)
+            sbf.Write(b'bar')
+            sbf = None
+            self.assertFalse(f.closed)
+            f.seek(0)
+            self.assertEqual(f.read(), 'foobar')
+
+
+    @add_test_categories(['pyapi'])
+    def test_close(self):
+        debugger = self.debugger
+        with open(self.out_filename, 'w') as f:
+            status = debugger.SetOutputFile(f)
+            self.assertTrue(status.Success())
+            self.handleCmd("help help", check=False, collect_result=False)
+            # make sure the file wasn't closed early.
+            f.write("\nZAP\n")
+            lldb.SBDebugger.Destroy(debugger)
+            # check that output file was closed when debugger was destroyed.
+            with self.assertRaises(ValueError):
+                f.write("\nQUUX\n")
+        with open(self.out_filename, 'r') as f:
+            output = f.read()
+            self.assertTrue(re.search(r'Show a list of all debugger commands', output))
+            self.assertTrue(re.search(r'ZAP', output))
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_stdout(self):
+        f = io.StringIO()
+        status = self.debugger.SetOutputFile(f)
+        self.assertTrue(status.Success())
+        self.handleCmd(r"script sys.stdout.write('foobar\n')")
+        self.assertEqual(f.getvalue().strip().split(), ["foobar", "7"])
+
+
+    @add_test_categories(['pyapi'])
+    def test_stdout_file(self):
+        with open(self.out_filename, 'w') as f:
+            status = self.debugger.SetOutputFile(f)
+            self.assertTrue(status.Success())
+            self.handleCmd(r"script sys.stdout.write('foobar\n')")
+        with open(self.out_filename, 'r') as f:
+            # In python2 sys.stdout.write() returns None, which
+            # the REPL will ignore, but in python3 it will
+            # return the number of bytes written, which the REPL
+            # will print out.
+            lines = [x for x in f.read().strip().split() if x != "7"]
+            self.assertEqual(lines, ["foobar"])
+
+
+    @add_test_categories(['pyapi'])
+    @skipIf(py_version=['<', (3,)])
+    def test_identity(self):
+
+        f = io.StringIO()
+        sbf = lldb.SBFile(f)
+        self.assertTrue(f is sbf.GetFile())
+        sbf.Close()
+        self.assertTrue(f.closed)
+
+        f = io.StringIO()
+        sbf = lldb.SBFile.Create(f, borrow=True)
+        self.assertTrue(f is sbf.GetFile())
+        sbf.Close()
+        self.assertFalse(f.closed)
+
+        with open(self.out_filename, 'w') as f:
+            sbf = lldb.SBFile(f)
+            self.assertTrue(f is sbf.GetFile())
+            sbf.Close()
+            self.assertTrue(f.closed)
+
+        with open(self.out_filename, 'w') as f:
+            sbf = lldb.SBFile.Create(f, borrow=True)
+            self.assertFalse(f is sbf.GetFile())
+            sbf.Write(b"foobar\n")
+            self.assertEqual(f.fileno(), sbf.GetFile().fileno())
+            sbf.Close()
+            self.assertFalse(f.closed)
+
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual("foobar", f.read().strip())
+
+        with open(self.out_filename, 'wb') as f:
+            sbf = lldb.SBFile.Create(f, borrow=True, force_io_methods=True)
+            self.assertTrue(f is sbf.GetFile())
+            sbf.Write(b"foobar\n")
+            self.assertEqual(f.fileno(), sbf.GetFile().fileno())
+            sbf.Close()
+            self.assertFalse(f.closed)
+
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual("foobar", f.read().strip())
+
+        with open(self.out_filename, 'wb') as f:
+            sbf = lldb.SBFile.Create(f, force_io_methods=True)
+            self.assertTrue(f is sbf.GetFile())
+            sbf.Write(b"foobar\n")
+            self.assertEqual(f.fileno(), sbf.GetFile().fileno())
+            sbf.Close()
+            self.assertTrue(f.closed)
+
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual("foobar", f.read().strip())
+
+
+    @add_test_categories(['pyapi'])
+    def test_back_and_forth(self):
+        with open(self.out_filename, 'w') as f:
+            # at each step here we're borrowing the file, so we have to keep
+            # them all alive until the end.
+            sbf = lldb.SBFile.Create(f, borrow=True)
+            def i(sbf):
+                for i in range(10):
+                    f = sbf.GetFile()
+                    self.assertEqual(f.mode, "w")
+                    yield f
+                    sbf = lldb.SBFile.Create(f, borrow=True)
+                    yield sbf
+                    sbf.Write(str(i).encode('ascii') + b"\n")
+            files = list(i(sbf))
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(list(range(10)), list(map(int, f.read().strip().split())))
+
+
+    @add_test_categories(['pyapi'])
+    def test_set_filehandle_none(self):
+        self.assertRaises(Exception, self.debugger.SetOutputFile, None)
+        self.assertRaises(Exception, self.debugger.SetOutputFile, "ham sandwich")
+        self.assertRaises(Exception, self.debugger.SetOutputFileHandle, "ham sandwich")
+        self.assertRaises(Exception, self.debugger.SetInputFile, None)
+        self.assertRaises(Exception, self.debugger.SetInputFile, "ham sandwich")
+        self.assertRaises(Exception, self.debugger.SetInputFileHandle, "ham sandwich")
+        self.assertRaises(Exception, self.debugger.SetErrorFile, None)
+        self.assertRaises(Exception, self.debugger.SetErrorFile, "ham sandwich")
+        self.assertRaises(Exception, self.debugger.SetErrorFileHandle, "ham sandwich")
+
+        with open(self.out_filename, 'w') as f:
+            status = self.debugger.SetOutputFile(f)
+            self.assertTrue(status.Success())
+            status = self.debugger.SetErrorFile(f)
+            self.assertTrue(status.Success())
+            self.debugger.SetOutputFileHandle(None, False)
+            self.debugger.SetErrorFileHandle(None, False)
+            sbf = self.debugger.GetOutputFile()
+            if sys.version_info.major >= 3:
+                # python 2 lacks PyFile_FromFd, so GetFile() will
+                # have to duplicate the file descriptor and make a FILE*
+                # in order to convert a NativeFile it back to a python
+                # file.
+                self.assertEqual(sbf.GetFile().fileno(), 1)
+            sbf = self.debugger.GetErrorFile()
+            if sys.version_info.major >= 3:
+                self.assertEqual(sbf.GetFile().fileno(), 2)
+        with open(self.out_filename, 'r') as f:
+            status = self.debugger.SetInputFile(f)
+            self.assertTrue(status.Success())
+            self.debugger.SetInputFileHandle(None, False)
+            sbf = self.debugger.GetInputFile()
+            if sys.version_info.major >= 3:
+                self.assertEqual(sbf.GetFile().fileno(), 0)
+
+
+    @add_test_categories(['pyapi'])
+    def test_sbstream(self):
+
+        with open(self.out_filename, 'w') as f:
+            stream = lldb.SBStream()
+            stream.RedirectToFile(f)
+            stream.Print("zork")
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read().strip(), "zork")
+
+        with open(self.out_filename, 'w') as f:
+            stream = lldb.SBStream()
+            stream.RedirectToFileHandle(f, True)
+            stream.Print("Yendor")
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read().strip(), "Yendor")
+
+        stream = lldb.SBStream()
+        f = open(self.out_filename,  'w')
+        stream.RedirectToFile(lldb.SBFile.Create(f, borrow=False))
+        stream.Print("Frobozz")
+        stream = None
+        self.assertTrue(f.closed)
+        with open(self.out_filename, 'r') as f:
+            self.assertEqual(f.read().strip(), "Frobozz")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
index ddffdcf..33da5d0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile
@@ -1,8 +1,8 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-# Clean renamed executable on 'make clean'
-clean: OBJECTS+=no_synth
+include Makefile.rules
 
-include $(LEVEL)/Makefile.rules
+# Clean renamed executable on 'make clean'
+clean::
+	$(RM) -f no_synth
+
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
index c066dc5..0c9e280 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/TestSBFrameFindValue.py
@@ -1,11 +1,7 @@
 """Test that SBFrame::FindValue finds things but does not duplicate the entire variables list"""
 
-from __future__ import print_function
 
 
-import os
-import sys
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -15,6 +11,7 @@
 class SBFrameFindValueTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     @add_test_categories(['pyapi'])
     def test_formatters_api(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
index ddffdcf..16a8232 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile
@@ -1,8 +1,7 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-# Clean renamed executable on 'make clean'
-clean: OBJECTS+=no_synth
+include Makefile.rules
 
-include $(LEVEL)/Makefile.rules
+# Clean renamed executable on 'make clean'
+clean::
+	$(RM) -f no_synth
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
index 8548506..f01d7c4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/formatters/TestFormattersSBAPI.py
@@ -3,9 +3,6 @@
 from __future__ import print_function
 
 
-import os
-import sys
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -15,6 +12,7 @@
 class SBFormattersAPITestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
@@ -71,17 +69,17 @@
         self.expect("frame variable foo.E",
                     substrs=['b8cca70a'])
 
-        format.format = lldb.eFormatOctal
+        format.SetFormat(lldb.eFormatOctal)
         category.AddTypeFormat(lldb.SBTypeNameSpecifier("int"), format)
         self.expect("frame variable foo.A",
-                    substrs=['01'])
+                    substrs=[' 01'])
         self.expect("frame variable foo.E",
                     substrs=['b8cca70a'])
 
         category.DeleteTypeFormat(lldb.SBTypeNameSpecifier("int"))
         category.DeleteTypeFormat(lldb.SBTypeNameSpecifier("long"))
         self.expect("frame variable foo.A", matching=False,
-                    substrs=['01'])
+                    substrs=[' 01'])
         self.expect("frame variable foo.E", matching=False,
                     substrs=['b8cca70a'])
 
@@ -93,10 +91,13 @@
             new_category.IsValid(),
             "getting a non-existing category worked")
         new_category = self.dbg.CreateCategory("foobar")
-        new_category.enabled = True
+        new_category.SetEnabled(True)
         new_category.AddTypeSummary(
             lldb.SBTypeNameSpecifier(
-                "^.*t$", True), summary)
+                "^.*t$",
+                True,  # is_regexp
+            ), summary)
+
         self.expect("frame variable foo.A",
                     substrs=['hello world'])
         self.expect("frame variable foo.E", matching=False,
@@ -105,7 +106,7 @@
                     substrs=['hello world'])
         self.expect("frame variable foo.F",
                     substrs=['hello world'])
-        new_category.enabled = False
+        new_category.SetEnabled(False)
         self.expect("frame variable foo.A", matching=False,
                     substrs=['hello world'])
         self.expect("frame variable foo.E", matching=False,
@@ -382,7 +383,7 @@
             lldb.SBTypeSummary.CreateWithScriptCode("return 'hello scripted world';"))
         self.expect("frame variable foo", matching=False,
                     substrs=['hello scripted world'])
-        new_category.enabled = True
+        new_category.SetEnabled(True)
         self.expect("frame variable foo", matching=True,
                     substrs=['hello scripted world'])
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
index fc2f03f..91ac30e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/TestFrames.py
@@ -6,9 +6,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
index 1bd54c3..7ced4dd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/get-variables/TestGetVariables.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
index 641ee5d..e6d9d83 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile
@@ -1,9 +1,7 @@
-LEVEL = ../../../make
-
 C_SOURCES := inlines.c
 
 ifneq (,$(findstring icc,$(CC)))
-    CFLAGS += -debug inline-debug-info
+    CFLAGS_EXTRAS := -debug inline-debug-info
 endif
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py
index 8b8f81f..da4e9cb 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/TestInlinedFrame.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py
index f657d19..2278d69 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestDisasmAPI.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py
index 6644b81..56fa73c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/function_symbol/TestSymbolAPI.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py
new file mode 100644
index 0000000..0252264
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/TestGetValue32BitInt.py
@@ -0,0 +1,19 @@
+"""
+Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1.
+"""
+
+import lldb
+from lldbsuite.test.lldbtest import *
+import lldbsuite.test.lldbutil as lldbutil
+
+class TestCase(TestBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
+
+    def test_with_run_command(self):
+        self.build()
+        lldbutil.run_to_source_breakpoint(self,"// break here", lldb.SBFileSpec("main.cpp"))
+
+        self.assertEqual(self.frame().FindVariable("myvar").GetValueAsSigned(), -1)
+        self.assertEqual(self.frame().FindVariable("myvar").GetValueAsUnsigned(), 0xFFFFFFFF)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp
new file mode 100644
index 0000000..61f40fb
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/get-value-32bit-int/main.cpp
@@ -0,0 +1,5 @@
+#include <cstdint>
+int main () {
+  int32_t myvar = -1;
+  return myvar; // break here
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/hello_world/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/hello_world/Makefile
index 9976203..73625f4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/hello_world/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/hello_world/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 # See TestHelloWorld.py, which specifies the executable name with a dictionary.
 EXE := hello_world
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
index 79f52d3..fc6ef48 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/hello_world/TestHelloWorld.py
@@ -1,11 +1,8 @@
 """Test Python APIs for target (launch and attach), breakpoint, and process."""
 
-from __future__ import print_function
 
 
 import os
-import sys
-import time
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -80,17 +77,19 @@
     @expectedFailureNetBSD
     def test_with_attach_to_process_with_id_api(self):
         """Create target, spawn a process, and attach to it with process id."""
-        exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
+        exe = '%s_%d'%(self.testMethodName, os.getpid())
         d = {'EXE': exe}
         self.build(dictionary=d)
         self.setTearDownCleanup(dictionary=d)
-        target = self.dbg.CreateTarget(exe)
+        target = self.dbg.CreateTarget(self.getBuildArtifact(exe))
 
         # Spawn a new process
         token = exe+'.token'
-        if os.path.exists(token):
-            os.remove(token)
-        popen = self.spawnSubprocess(exe, [token])
+        if not lldb.remote_platform:
+            token = self.getBuildArtifact(token)
+            if os.path.exists(token):
+                os.remove(token)
+        popen = self.spawnSubprocess(self.getBuildArtifact(exe), [token])
         self.addTearDownHook(self.cleanupSubprocesses)
         lldbutil.wait_for_file_on_target(self, token)
 
@@ -108,20 +107,23 @@
 
     @add_test_categories(['pyapi'])
     @skipIfiOSSimulator
-    @skipIfSanitized # FIXME: Hangs indefinitely.
+    @skipIfAsan # FIXME: Hangs indefinitely.
+    @expectedFailureNetBSD
     def test_with_attach_to_process_with_name_api(self):
         """Create target, spawn a process, and attach to it with process name."""
-        exe = '%s_%d'%(self.getBuildArtifact(self.testMethodName), os.getpid())
+        exe = '%s_%d'%(self.testMethodName, os.getpid())
         d = {'EXE': exe}
         self.build(dictionary=d)
         self.setTearDownCleanup(dictionary=d)
-        target = self.dbg.CreateTarget(exe)
+        target = self.dbg.CreateTarget(self.getBuildArtifact(exe))
 
         # Spawn a new process.
         token = exe+'.token'
-        if os.path.exists(token):
-            os.remove(token)
-        popen = self.spawnSubprocess(exe, [token])
+        if not lldb.remote_platform:
+            token = self.getBuildArtifact(token)
+            if os.path.exists(token):
+                os.remove(token)
+        popen = self.spawnSubprocess(self.getBuildArtifact(exe), [token])
         self.addTearDownHook(self.cleanupSubprocesses)
         lldbutil.wait_for_file_on_target(self, token)
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py
index 2f31b0a..a920ce8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestCommandInterpreterAPI.py
@@ -3,7 +3,6 @@
 from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -13,6 +12,7 @@
 class CommandInterpreterAPICase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
@@ -73,3 +73,19 @@
 
         if self.TraceOn():
             lldbutil.print_stacktraces(process)
+
+    @add_test_categories(['pyapi'])
+    def test_command_output(self):
+        """Test command output handling."""
+        ci = self.dbg.GetCommandInterpreter()
+        self.assertTrue(ci, VALID_COMMAND_INTERPRETER)
+
+        # Test that a command which produces no output returns "" instead of
+        # None.
+        res = lldb.SBCommandReturnObject()
+        ci.HandleCommand("settings set use-color false", res)
+        self.assertTrue(res.Succeeded())
+        self.assertIsNotNone(res.GetOutput())
+        self.assertEquals(res.GetOutput(), "")
+        self.assertIsNotNone(res.GetError())
+        self.assertEquals(res.GetError(), "")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestRunCommandInterpreterAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestRunCommandInterpreterAPI.py
index a82fd73..a32805b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestRunCommandInterpreterAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/interpreter/TestRunCommandInterpreterAPI.py
@@ -5,8 +5,9 @@
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 
-class CommandRunInterpreterAPICase(TestBase):
+class CommandRunInterpreterLegacyAPICase(TestBase):
 
+    NO_DEBUG_INFO_TESTCASE = True
     mydir = TestBase.compute_mydir(__file__)
 
     def setUp(self):
@@ -17,13 +18,49 @@
         with open(self.stdin_path, 'w') as input_handle:
             input_handle.write("nonexistingcommand\nquit")
 
-        with open(self.stdin_path, 'r') as input_handle:
-            self.dbg.SetInputFileHandle(input_handle, False)
+        # Python will close the file descriptor if all references
+        # to the filehandle object lapse, so we need to keep one
+        # around.
+        self.filehandle = open(self.stdin_path, 'r')
+        self.dbg.SetInputFileHandle(self.filehandle, False)
+
+        # No need to track the output
+        self.devnull = open(os.devnull, 'w')
+        self.dbg.SetOutputFileHandle(self.devnull, False)
+        self.dbg.SetErrorFileHandle (self.devnull, False)
+
+    @add_test_categories(['pyapi'])
+    def test_run_session_with_error_and_quit_legacy(self):
+        """Run non-existing and quit command returns appropriate values"""
+
+        n_errors, quit_requested, has_crashed = self.dbg.RunCommandInterpreter(
+                True, False, lldb.SBCommandInterpreterRunOptions(), 0, False,
+                False)
+
+        self.assertGreater(n_errors, 0)
+        self.assertTrue(quit_requested)
+        self.assertFalse(has_crashed)
+
+
+class CommandRunInterpreterAPICase(TestBase):
+
+    NO_DEBUG_INFO_TESTCASE = True
+    mydir = TestBase.compute_mydir(__file__)
+
+    def setUp(self):
+        TestBase.setUp(self)
+
+        self.stdin_path = self.getBuildArtifact("stdin.txt")
+
+        with open(self.stdin_path, 'w') as input_handle:
+            input_handle.write("nonexistingcommand\nquit")
+
+        self.dbg.SetInputFile(open(self.stdin_path, 'r'))
 
         # No need to track the output
         devnull = open(os.devnull, 'w')
-        self.dbg.SetOutputFileHandle(devnull, False)
-        self.dbg.SetErrorFileHandle(devnull, False)
+        self.dbg.SetOutputFile(devnull)
+        self.dbg.SetErrorFile(devnull)
 
     @add_test_categories(['pyapi'])
     def test_run_session_with_error_and_quit(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py
index 58e47d9..8c5c6ef 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/TestSwigVersion.py
@@ -2,7 +2,6 @@
 Test that we embed the swig version into the lldb module
 """
 
-from __future__ import print_function
 
 """
 import os
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/Makefile
index 69b74b5..c5fa384 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 MAKE_DSYM :=NO
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py
index 4db6322..ec8d1f8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/frame/TestFrameUtils.py
@@ -5,7 +5,6 @@
 from __future__ import print_function
 
 
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
index 0513541..4d11bbc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
-CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 MAKE_DSYM := NO
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py
index a52b00e..050ec87 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestLLDBIterator.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -94,7 +91,6 @@
             self.assertTrue(yours[i] == mine[i],
                             "ID of yours[{0}] and mine[{0}] matches".format(i))
 
-    @expectedFailureNetBSD
     @add_test_categories(['pyapi'])
     def test_lldb_iter_frame(self):
         """Test iterator works correctly for SBProcess->SBThread->SBFrame."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py
index 43ed1c9..fbb8bff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/TestRegistersIterator.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
index 93fc28b..6b33049 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
-CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 MAKE_DSYM :=NO
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py
index 531f30e..123b60e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/TestPrintStackTraces.py
@@ -2,12 +2,8 @@
 Test SBprocess and SBThread APIs with printing of the stack traces using lldbutil.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
index ee74eba..79209db 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../make
-
-CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp b.cpp c.cpp
 MAKE_DSYM :=NO
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py
index 09dfcc5..95d4576 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/TestModuleAndSection.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/main.cpp
index c2dc68c..943123b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/module_section/main.cpp
@@ -1,135 +1,5 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// C includes
 #include <stdio.h>
-#include <stdint.h>
-#include <stdlib.h>
 
-// C++ includes
-#include <chrono>
-#include <mutex>
-#include <random>
-#include <thread>
-
-std::thread g_thread_1;
-std::thread g_thread_2;
-std::thread g_thread_3;
-std::mutex g_mask_mutex;
-
-enum MaskAction {
-    eGet,
-    eAssign,
-    eClearBits
-};
-
-uint32_t mask_access (MaskAction action, uint32_t mask = 0);
-
-uint32_t
-mask_access (MaskAction action, uint32_t mask)
-{
-    static uint32_t g_mask = 0;
-
-    std::lock_guard<std::mutex> lock(g_mask_mutex);
-    switch (action)
-    {
-    case eGet:
-        break;
-
-    case eAssign:
-        g_mask |= mask;
-        break;
-
-    case eClearBits:
-        g_mask &= ~mask;
-        break;
-    }
-    return g_mask;
-}
-
-void *
-thread_func (void *arg)
-{
-    uint32_t thread_index = *((uint32_t *)arg);
-    uint32_t thread_mask = (1u << (thread_index));
-    printf ("%s (thread index = %u) startng...\n", __FUNCTION__, thread_index);
-
-    std::default_random_engine generator;
-    std::uniform_int_distribution<int> distribution(0, 3000000);
-
-    while (mask_access(eGet) & thread_mask)
-    {
-        // random micro second sleep from zero to 3 seconds
-        int usec = distribution(generator);
-
-        printf ("%s (thread = %u) doing a usleep (%d)...\n", __FUNCTION__, thread_index, usec);
-        std::chrono::microseconds duration(usec);
-        std::this_thread::sleep_for(duration);
-        printf ("%s (thread = %u) after usleep ...\n", __FUNCTION__, thread_index); // Set break point at this line.
-    }
-    printf ("%s (thread index = %u) exiting...\n", __FUNCTION__, thread_index);
-    return NULL;
-}
-
-
-int main (int argc, char const *argv[])
-{
-    int err;
-    void *thread_result = NULL;
-    uint32_t thread_index_1 = 1;
-    uint32_t thread_index_2 = 2;
-    uint32_t thread_index_3 = 3;
-    uint32_t thread_mask_1 = (1u << thread_index_1);
-    uint32_t thread_mask_2 = (1u << thread_index_2);
-    uint32_t thread_mask_3 = (1u << thread_index_3);
-
-    // Make a mask that will keep all threads alive
-    mask_access (eAssign, thread_mask_1 | thread_mask_2 | thread_mask_3); // And that line.
-
-    // Create 3 threads
-    g_thread_1 = std::thread(thread_func, (void*)&thread_index_1);
-    g_thread_2 = std::thread(thread_func, (void*)&thread_index_2);
-    g_thread_3 = std::thread(thread_func, (void*)&thread_index_3);
-
-    char line[64];
-    while (mask_access(eGet) != 0)
-    {
-        printf ("Enter thread index to kill or ENTER for all:\n");
-        fflush (stdout);
-        // Kill threads by index, or ENTER for all threads
-
-        if (fgets (line, sizeof(line), stdin))
-        {
-            if (line[0] == '\n' || line[0] == '\r' || line[0] == '\0')
-            {
-                printf ("Exiting all threads...\n");
-                break;
-            }
-            int32_t index = strtoul (line, NULL, 0);
-            switch (index)
-            {
-                case 1: mask_access (eClearBits, thread_mask_1); break;
-                case 2: mask_access (eClearBits, thread_mask_2); break;
-                case 3: mask_access (eClearBits, thread_mask_3); break;
-            }
-            continue;
-        }
-
-        break;
-    }
-
-    // Clear all thread bits to they all exit
-    mask_access (eClearBits, UINT32_MAX);
-
-    // Join all of our threads
-    g_thread_1.join();
-    g_thread_2.join();
-    g_thread_3.join();
-
-    return 0;
+int main() {
+  printf("Hello World\n");
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py
index ba68ca9..6cd8d4f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/name_lookup/TestNameLookup.py
@@ -2,13 +2,9 @@
 Test SBTarget APIs.
 """
 
-from __future__ import print_function
 
 
 import unittest2
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
index 31e57fe..8b322ff 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile
@@ -1,9 +1,8 @@
-LEVEL = ../../make
-
 OBJC_SOURCES := main.m
 
-CFLAGS_EXTRAS += -w
+CFLAGS_EXTRAS := -w
 
-include $(LEVEL)/Makefile.rules
 
-LDFLAGS += -framework Foundation
+
+LD_EXTRAS := -framework Foundation
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py
index fd3bfa8..37f5375 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/objc_type/TestObjCType.py
@@ -2,12 +2,8 @@
 Test SBType for ObjC classes.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py
index fc17e4a..d26933a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/TestProcessAPI.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/io/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/io/Makefile
index 5361f2a..4aa7832 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/io/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/io/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 EXE := process_io
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
index e25083d..365d486 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/io/TestProcessIO.py
@@ -4,8 +4,6 @@
 
 
 import os
-import sys
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -15,10 +13,7 @@
 class ProcessIOTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setup_test(self):
         # Get the full path to our executable to be debugged.
@@ -38,6 +33,7 @@
     @skipIfWindows  # stdio manipulation unsupported on Windows
     @add_test_categories(['pyapi'])
     @expectedFlakeyLinux(bugnumber="llvm.org/pr26437")
+    @skipIfDarwinEmbedded # I/O redirection like this is not supported on remote iOS devices yet <rdar://problem/54581135>
     def test_stdin_by_api(self):
         """Exercise SBProcess.PutSTDIN()."""
         self.setup_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/Makefile
index f341492..6bc1b47 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 EXE := read-mem-cstring
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py
index b03cebc..fc26c3b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/process/read-mem-cstring/TestReadMemCString.py
@@ -1,6 +1,5 @@
 """Test reading c-strings from memory via SB API."""
 
-from __future__ import print_function
 
 import os
 import lldb
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Test-rdar-12481949.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Test-rdar-12481949.py
deleted file mode 100644
index 1d042b6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/Test-rdar-12481949.py
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.lldbtest import *
-import lldbsuite.test.lldbutil as lldbutil
-
-
-class Radar12481949DataFormatterTestCase(TestBase):
-
-    # test for rdar://problem/12481949
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-        # Find the line number to break at.
-        self.line = line_number('main.cpp', '// Set break point at this line.')
-
-    def test_with_run_command(self):
-        """Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1."""
-        self.build()
-        self.runCmd("file " + self.getBuildArtifact("a.out"), CURRENT_EXECUTABLE_SET)
-
-        lldbutil.run_break_set_by_file_and_line(
-            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
-        self.runCmd("run", RUN_SUCCEEDED)
-
-        # The stop reason of the thread should be breakpoint.
-        self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
-                    substrs=['stopped',
-                             'stop reason = breakpoint'])
-
-        # This is the function to remove the custom formats in order to have a
-        # clean slate for the next test case.
-        def cleanup():
-            self.runCmd('type format delete hex', check=False)
-            self.runCmd('type summary clear', check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.assertTrue(
-            self.frame().FindVariable("myvar").GetValueAsSigned() == -1,
-            "GetValueAsSigned() says -1")
-        self.assertTrue(
-            self.frame().FindVariable("myvar").GetValueAsSigned() != 0xFFFFFFFF,
-            "GetValueAsSigned() does not say 0xFFFFFFFF")
-        self.assertTrue(
-            self.frame().FindVariable("myvar").GetValueAsSigned() != 0xFFFFFFFFFFFFFFFF,
-            "GetValueAsSigned() does not say 0xFFFFFFFFFFFFFFFF")
-
-        self.assertTrue(
-            self.frame().FindVariable("myvar").GetValueAsUnsigned() != -1,
-            "GetValueAsUnsigned() does not say -1")
-        self.assertTrue(
-            self.frame().FindVariable("myvar").GetValueAsUnsigned() == 0xFFFFFFFF,
-            "GetValueAsUnsigned() says 0xFFFFFFFF")
-        self.assertTrue(
-            self.frame().FindVariable("myvar").GetValueAsUnsigned() != 0xFFFFFFFFFFFFFFFF,
-            "GetValueAsUnsigned() does not says 0xFFFFFFFFFFFFFFFF")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/main.cpp
deleted file mode 100644
index f6ec2b8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/rdar-12481949/main.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-#include <stdint.h>
-int main ()
-{
-  int32_t myvar = -1;
-  printf ("%d\n", myvar); // Set break point at this line.
-  return myvar+1;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbdata/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbdata/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbdata/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbdata/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py
index ee43cea..a12f683 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbdata/TestSBData.py
@@ -1,10 +1,8 @@
 """Test the SBData APIs."""
 
-from __future__ import print_function
 
 
 from math import fabs
-import os
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -14,6 +12,7 @@
 class SBDataAPICase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sblaunchinfo/TestSBLaunchInfo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sblaunchinfo/TestSBLaunchInfo.py
index ee4a102..44a6362 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sblaunchinfo/TestSBLaunchInfo.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sblaunchinfo/TestSBLaunchInfo.py
@@ -2,7 +2,6 @@
 Test SBLaunchInfo
 """
 
-from __future__ import print_function
 
 
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py
index f19d01d..f5efdfa 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbstructureddata/TestStructuredDataAPI.py
@@ -2,11 +2,7 @@
 Test some SBStructuredData API.
 """
 
-from __future__ import print_function
 
-import os
-import re
-import time
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -22,9 +18,6 @@
     def test(self):
         self.structured_data_api_test()
 
-    def setUp(self):
-        TestBase.setUp(self)
-
     @add_test_categories(['pyapi'])
     def structured_data_api_test(self):
         error = lldb.SBError()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile
deleted file mode 100644
index a9c1edd..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-LEVEL = ../../make
-CXX_SOURCES := main.cpp
-CXXFLAGS += -std=c++11
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/main.cpp
index eb9c8e0..318a45b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/main.cpp
@@ -28,7 +28,7 @@
 int main (int argc, char const *argv[], char const *envp[])
 {
     printf ("g_thread_list is %p\n", g_thread_list_ptr);
-    return 0; //% v = lldb.target.FindFirstGlobalVariable('g_thread_list_ptr')
+    return 0; //% v = self.dbg.GetSelectedTarget().FindFirstGlobalVariable('g_thread_list_ptr')
     //% v_gla = v.GetChildMemberWithName('regs').GetLoadAddress()
     //% v_aof = v.GetChildMemberWithName('regs').AddressOf().GetValueAsUnsigned(lldb.LLDB_INVALID_ADDRESS)
     //% expr = '(%s)0x%x' % (v.GetType().GetName(), v.GetValueAsUnsigned(0))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile
index ddffdcf..b525656 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
 # Clean renamed executable on 'make clean'
 clean: OBJECTS+=no_synth
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py
index 3d0c721..1662f69 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_persist/TestSBValuePersist.py
@@ -1,11 +1,7 @@
 """Test SBValue::Persist"""
 
-from __future__ import print_function
 
 
-import os
-import sys
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -15,6 +11,7 @@
 class SBValuePersistTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     @add_test_categories(['pyapi'])
     @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr24772")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/section/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/section/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/section/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/section/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py
index 088a66c..1513b98 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/section/TestSectionAPI.py
@@ -2,7 +2,6 @@
 Test SBSection APIs.
 """
 
-from __future__ import print_function
 
 
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/signals/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/signals/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/signals/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/signals/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py
index 482f4a8..602fee4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py
@@ -2,11 +2,8 @@
 Test SBProcess APIs, including ReadMemory(), WriteMemory(), and others.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -16,6 +13,7 @@
 
 class SignalsAPITestCase(TestBase):
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     @add_test_categories(['pyapi'])
     @skipIfWindows  # Windows doesn't have signals
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py
index 57988da..0c1ad83 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/TestSymbolContext.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import re
-import time
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/Makefile
index 650a8b2..ccaa0ed 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := file1.cpp file2.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py
index 8640abe..27d1b60 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/symbol-context/two-files/TestSymbolContextTwoFiles.py
@@ -2,9 +2,7 @@
 Test SBSymbolContext APIs.
 """
 
-from __future__ import print_function
 
-import os
 
 import lldb
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/target/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/target/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/target/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/target/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py
index 224dca7..6e5be6e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/target/TestTargetAPI.py
@@ -7,8 +7,6 @@
 
 import unittest2
 import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/thread/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/thread/Makefile
index aa257ae..30749db 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/thread/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/thread/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES ?= main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py
index d470d47..9124138 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/thread/TestThreadAPI.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -124,14 +122,20 @@
         self.assertTrue(
             thread.IsValid(),
             "There should be a thread stopped due to breakpoint")
-        #self.runCmd("process status")
 
-        # Due to the typemap magic (see lldb.swig), we pass in an (int)length to GetStopDescription
-        # and expect to get a Python string as the return object!
-        # The 100 is just an arbitrary number specifying the buffer size.
-        stop_description = thread.GetStopDescription(100)
-        self.expect(stop_description, exe=False,
-                    startstr='breakpoint')
+        # Get the stop reason. GetStopDescription expects that we pass in the size of the description
+        # we expect plus an additional byte for the null terminator.
+
+        # Test with a buffer that is exactly as large as the expected stop reason.
+        self.assertEqual("breakpoint 1.1", thread.GetStopDescription(len('breakpoint 1.1') + 1))
+
+        # Test some smaller buffer sizes.
+        self.assertEqual("breakpoint", thread.GetStopDescription(len('breakpoint') + 1))
+        self.assertEqual("break", thread.GetStopDescription(len('break') + 1))
+        self.assertEqual("b", thread.GetStopDescription(len('b') + 1))
+
+        # Test that we can pass in a much larger size and still get the right output.
+        self.assertEqual("breakpoint 1.1", thread.GetStopDescription(len('breakpoint 1.1') + 100))
 
     def step_out_of_malloc_into_function_b(self, exe_name):
         """Test Python SBThread.StepOut() API to step out of a malloc call where the call site is at function b()."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/Makefile
index 8a7102e..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py
index 40128d3..75a793a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/TestTypeList.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import re
-import time
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -76,13 +73,17 @@
                         self.assertTrue(enum_member)
                         self.DebugSBType(enum_member.type)
                 elif field.name == "my_type_is_nameless":
-                    self.assertTrue(
+                    self.assertFalse(
                         field.type.IsAnonymousType(),
-                        "my_type_is_nameless has an anonymous type")
+                        "my_type_is_nameless is not an anonymous type")
                 elif field.name == "my_type_is_named":
                     self.assertFalse(
                         field.type.IsAnonymousType(),
                         "my_type_is_named has a named type")
+                elif field.name == None:
+                    self.assertTrue(
+                        field.type.IsAnonymousType(),
+                        "Nameless type is not anonymous")
 
         # Pass an empty string.  LLDB should not crash. :-)
         fuzz_types = target.FindTypes(None)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/main.cpp
index 8f5b939..b43b617 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/type/main.cpp
@@ -15,6 +15,14 @@
         TASK_TYPE_1,
         TASK_TYPE_2
     } type;
+    // This struct is anonymous b/c it does not have a name
+    // and it is not unnamed class.
+    // Anonymous classes are a GNU extension.
+    struct {
+      int y;
+    };
+    // This struct is an unnamed class see [class.pre]p1
+    // http://eel.is/c++draft/class#pre-1.sentence-6
     struct {
       int x;
     } my_type_is_nameless;
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
index 2299f1f..bf8cbe3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
@@ -4,9 +4,6 @@
 
 from __future__ import print_function
 
-import os
-import re
-import time
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -163,11 +160,22 @@
                 val_i.GetType()).AddressOf(),
             VALID_VARIABLE)
 
+        # Check that lldb.value implements truth testing.
+        self.assertFalse(lldb.value(frame0.FindVariable('bogus')))
+        self.assertTrue(lldb.value(frame0.FindVariable('uinthex')))
+
         self.assertTrue(int(lldb.value(frame0.FindVariable('uinthex')))
                         == 3768803088, 'uinthex == 3768803088')
         self.assertTrue(int(lldb.value(frame0.FindVariable('sinthex')))
                         == -526164208, 'sinthex == -526164208')
 
+        # Check value_iter works correctly.
+        for v in [
+                lldb.value(frame0.FindVariable('uinthex')),
+                lldb.value(frame0.FindVariable('sinthex'))
+        ]:
+            self.assertTrue(v)
+
         self.assertTrue(
             frame0.FindVariable('uinthex').GetValueAsUnsigned() == 3768803088,
             'unsigned uinthex == 3768803088')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py
index 18d39d9..6f0dee2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/change_values/TestChangeValueAPI.py
@@ -2,12 +2,8 @@
 Test some SBValue APIs.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py
index 6fa7283..c7197e5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/empty_class/TestValueAPIEmptyClass.py
@@ -1,8 +1,4 @@
-from __future__ import print_function
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py
index 1b00952..b45186a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value/linked_list/TestValueAPILinkedList.py
@@ -6,9 +6,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -18,6 +15,7 @@
 class ValueAsLinkedListTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
index 4b0e581..3716c6e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
 # See TestHelloWorld.py, which specifies the executable name with a dictionary.
 EXE := hello_world
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py
index 866d2a5..b425cef 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/TestValueVarUpdate.py
@@ -1,13 +1,8 @@
 """Test SBValue::GetValueDidChange"""
 
-from __future__ import print_function
 
 
-import os
-import sys
-import time
 import lldb
-import time
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -17,10 +12,6 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    def setUp(self):
-        # Call super's setUp().
-        TestBase.setUp(self)
-
     @add_test_categories(['pyapi'])
     def test_with_process_launch_api(self):
         """Test SBValue::GetValueDidChange"""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/Makefile
index 0d70f25..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py
index 0236d4b..a34806d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestSetWatchpoint.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -17,6 +14,7 @@
 class SetWatchpointAPITestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
@@ -28,9 +26,6 @@
             self.source, '// Set break point at this line.')
 
     @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     # Read-write watchpoints not supported on SystemZ
     @expectedFailureAll(archs=['s390x'])
     def test_watch_val(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
index 603b7a8..83a11d4 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIgnoreCount.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -17,6 +14,7 @@
 class WatchpointIgnoreCountTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
@@ -28,9 +26,6 @@
             self.source, '// Set break point at this line.')
 
     @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     # Read-write watchpoints not supported on SystemZ
     @expectedFailureAll(archs=['s390x'])
     def test_set_watch_ignore_count(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py
index b9fc7ce..44df96b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/TestWatchpointIter.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import re
-import time
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -18,10 +15,11 @@
 class WatchpointIteratorTestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     # hardware watchpoints are not reported with a hardware index # on armv7 on ios devices
     def affected_by_radar_34564183(self):
-        return (self.getArchitecture() == 'armv7' or self.getArchitecture() == 'armv7k') and self.platformIsDarwin()
+        return (self.getArchitecture() in ['armv7', 'armv7k', 'arm64_32']) and self.platformIsDarwin()
 
     def setUp(self):
         # Call super's setUp().
@@ -33,9 +31,6 @@
             self.source, '// Set break point at this line.')
 
     @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
     def test_watch_iter(self):
         """Exercise SBTarget.watchpoint_iter() API to iterate on the available watchpoints."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
index bb32869..7334734 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/condition/TestWatchpointConditionAPI.py
@@ -5,8 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -16,6 +14,7 @@
 class WatchpointConditionAPITestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
@@ -33,11 +32,6 @@
         self.exe_name = self.testMethodName
         self.d = {'CXX_SOURCES': self.source, 'EXE': self.exe_name}
 
-    @expectedFailureAll(
-        oslist=["linux"],
-        archs=["aarch64"],
-        bugnumber="llvm.org/pr27710")
-    @skipIfWindows  # Watchpoints not supported on Windows, and this test hangs
     def test_watchpoint_cond_api(self):
         """Test watchpoint condition API."""
         self.build(dictionary=self.d)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/Makefile
index 8817fff..de4ec12 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
index f3b3d93..9cbc396 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestSetWatchlocation.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import re
-import time
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -18,6 +15,7 @@
 class SetWatchlocationAPITestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
@@ -31,10 +29,6 @@
         self.violating_func = "do_bad_thing_with_location"
 
     @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureNetBSD
     def test_watch_location(self):
         """Exercise SBValue.WatchPointee() API to set a watchpoint."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
index 0471bb5..53e794d 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/python_api/watchpoint/watchlocation/TestTargetWatchAddress.py
@@ -5,9 +5,6 @@
 from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -17,6 +14,7 @@
 class TargetWatchAddressAPITestCase(TestBase):
 
     mydir = TestBase.compute_mydir(__file__)
+    NO_DEBUG_INFO_TESTCASE = True
 
     def setUp(self):
         # Call super's setUp().
@@ -30,10 +28,6 @@
         self.violating_func = "do_bad_thing_with_location"
 
     @add_test_categories(['pyapi'])
-    @expectedFailureAll(
-        oslist=["windows"],
-        bugnumber="llvm.org/pr24446: WINDOWS XFAIL TRIAGE - Watchpoints not supported on Windows")
-    @expectedFailureNetBSD
     def test_watch_address(self):
         """Exercise SBTarget.WatchAddress() API to set a watchpoint."""
         self.build()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/quit/TestQuit.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/quit/TestQuit.py
deleted file mode 100644
index 28c05b8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/quit/TestQuit.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""
-Test lldb's quit command.
-"""
-
-from __future__ import print_function
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class QuitCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @no_debug_info_test
-    def test_quit_exit_code_disallow(self):
-        self.ci.AllowExitCodeOnQuit(False)
-        self.expect(
-            "quit 20",
-            substrs=[
-                "error: The current driver doesn't allow custom exit codes for the quit command"],
-            error=True)
-        self.assertFalse(self.ci.HasCustomQuitExitCode())
-
-    @no_debug_info_test
-    def test_quit_exit_code_allow(self):
-        self.ci.AllowExitCodeOnQuit(True)
-        self.runCmd("quit 10", check=False)
-        self.assertTrue(self.ci.HasCustomQuitExitCode())
-        self.assertEqual(self.ci.GetQuitStatus(), 10)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/sample_test/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/sample_test/Makefile
index 0e5a537..695335e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/sample_test/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/sample_test/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../make
-
 C_SOURCES := main.c
-CFLAGS_EXTRAS += -std=c99
+CFLAGS_EXTRAS := -std=c99
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleTest.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleTest.py
index 97674f5..9c5b3ea 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleTest.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/sample_test/TestSampleTest.py
@@ -2,12 +2,8 @@
 Describe the purpose of the test class here.
 """
 
-from __future__ import print_function
 
 
-import os
-import time
-import re
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
 from lldbsuite.test.lldbtest import *
@@ -31,6 +27,8 @@
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
+        # Set up your test case here. If your test doesn't need any set up then
+        # remove this method from your TestCase class.
 
     def sample_test(self):
         """You might use the test implementation in several ways, say so here."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py
new file mode 100644
index 0000000..3d9f171
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/sanity/TestModuleCacheSanity.py
@@ -0,0 +1,21 @@
+"""
+This is a sanity check that verifies that the module cache path is set
+correctly and points inside the default test build directory.
+"""
+
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+
+
+class ModuleCacheSanityTestCase(TestBase):
+
+  mydir = TestBase.compute_mydir(__file__)
+
+  NO_DEBUG_INFO_TESTCASE = True
+
+  def test(self):
+    self.expect(
+        'settings show symbols.clang-modules-cache-path',
+        substrs=['lldb-test-build.noindex', 'module-cache-lldb'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/Makefile
deleted file mode 100644
index d4bc9c6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/TestSettings.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/TestSettings.py
deleted file mode 100644
index b46e3b4..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/TestSettings.py
+++ /dev/null
@@ -1,564 +0,0 @@
-"""
-Test lldb settings command.
-"""
-
-from __future__ import print_function
-
-
-import os
-import time
-import re
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SettingsCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-    NO_DEBUG_INFO_TESTCASE = True
-
-    def test_apropos_should_also_search_settings_description(self):
-        """Test that 'apropos' command should also search descriptions for the settings variables."""
-
-        self.expect("apropos 'environment variable'",
-                    substrs=["target.env-vars",
-                             "environment variables",
-                             "executable's environment"])
-
-    def test_append_target_env_vars(self):
-        """Test that 'append target.run-args' works."""
-        # Append the env-vars.
-        self.runCmd('settings append target.env-vars MY_ENV_VAR=YES')
-        # And add hooks to restore the settings during tearDown().
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.env-vars"))
-
-        # Check it immediately!
-        self.expect('settings show target.env-vars',
-                    substrs=['MY_ENV_VAR=YES'])
-
-    def test_insert_before_and_after_target_run_args(self):
-        """Test that 'insert-before/after target.run-args' works."""
-        # Set the run-args first.
-        self.runCmd('settings set target.run-args a b c')
-        # And add hooks to restore the settings during tearDown().
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.run-args"))
-
-        # Now insert-before the index-0 element with '__a__'.
-        self.runCmd('settings insert-before target.run-args 0 __a__')
-        # And insert-after the index-1 element with '__A__'.
-        self.runCmd('settings insert-after target.run-args 1 __A__')
-        # Check it immediately!
-        self.expect('settings show target.run-args',
-                    substrs=['target.run-args',
-                             '[0]: "__a__"',
-                             '[1]: "a"',
-                             '[2]: "__A__"',
-                             '[3]: "b"',
-                             '[4]: "c"'])
-
-    def test_replace_target_run_args(self):
-        """Test that 'replace target.run-args' works."""
-        # Set the run-args and then replace the index-0 element.
-        self.runCmd('settings set target.run-args a b c')
-        # And add hooks to restore the settings during tearDown().
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.run-args"))
-
-        # Now replace the index-0 element with 'A', instead.
-        self.runCmd('settings replace target.run-args 0 A')
-        # Check it immediately!
-        self.expect('settings show target.run-args',
-                    substrs=['target.run-args (arguments) =',
-                             '[0]: "A"',
-                             '[1]: "b"',
-                             '[2]: "c"'])
-
-    def test_set_prompt(self):
-        """Test that 'set prompt' actually changes the prompt."""
-
-        # Set prompt to 'lldb2'.
-        self.runCmd("settings set prompt 'lldb2 '")
-
-        # Immediately test the setting.
-        self.expect("settings show prompt", SETTING_MSG("prompt"),
-                    startstr='prompt (string) = "lldb2 "')
-
-        # The overall display should also reflect the new setting.
-        self.expect("settings show", SETTING_MSG("prompt"),
-                    substrs=['prompt (string) = "lldb2 "'])
-
-        # Use '-r' option to reset to the original default prompt.
-        self.runCmd("settings clear prompt")
-
-    def test_set_term_width(self):
-        """Test that 'set term-width' actually changes the term-width."""
-
-        self.runCmd("settings set term-width 70")
-
-        # Immediately test the setting.
-        self.expect("settings show term-width", SETTING_MSG("term-width"),
-                    startstr="term-width (int) = 70")
-
-        # The overall display should also reflect the new setting.
-        self.expect("settings show", SETTING_MSG("term-width"),
-                    substrs=["term-width (int) = 70"])
-
-    # rdar://problem/10712130
-    def test_set_frame_format(self):
-        """Test that 'set frame-format' with a backtick char in the format string works as well as fullpath."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        def cleanup():
-            self.runCmd(
-                "settings set frame-format %s" %
-                self.format_string, check=False)
-
-        # Execute the cleanup function during test case tear down.
-        self.addTearDownHook(cleanup)
-
-        self.runCmd("settings show frame-format")
-        m = re.match(
-            '^frame-format \(format-string\) = "(.*)\"$',
-            self.res.GetOutput())
-        self.assertTrue(m, "Bad settings string")
-        self.format_string = m.group(1)
-
-        # Change the default format to print function.name rather than
-        # function.name-with-args
-        format_string = "frame #${frame.index}: ${frame.pc}{ ${module.file.basename}\`${function.name}{${function.pc-offset}}}{ at ${line.file.fullpath}:${line.number}}{, lang=${language}}\n"
-        self.runCmd("settings set frame-format %s" % format_string)
-
-        # Immediately test the setting.
-        self.expect("settings show frame-format", SETTING_MSG("frame-format"),
-                    substrs=[format_string])
-
-        self.runCmd("breakpoint set -n main")
-        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
-                RUN_SUCCEEDED)
-        self.expect("thread backtrace",
-                    substrs=["`main", self.getSourceDir()])
-
-    def test_set_auto_confirm(self):
-        """Test that after 'set auto-confirm true', manual confirmation should not kick in."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        self.runCmd("settings set auto-confirm true")
-
-        # Immediately test the setting.
-        self.expect("settings show auto-confirm", SETTING_MSG("auto-confirm"),
-                    startstr="auto-confirm (boolean) = true")
-
-        # Now 'breakpoint delete' should just work fine without confirmation
-        # prompt from the command interpreter.
-        self.runCmd("breakpoint set -n main")
-        self.expect("breakpoint delete",
-                    startstr="All breakpoints removed")
-
-        # Restore the original setting of auto-confirm.
-        self.runCmd("settings clear auto-confirm")
-        self.expect("settings show auto-confirm", SETTING_MSG("auto-confirm"),
-                    startstr="auto-confirm (boolean) = false")
-
-    @skipIf(archs=no_match(['x86_64', 'i386', 'i686']))
-    def test_disassembler_settings(self):
-        """Test that user options for the disassembler take effect."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # AT&T syntax
-        self.runCmd("settings set target.x86-disassembly-flavor att")
-        self.runCmd("settings set target.use-hex-immediates false")
-        self.expect("disassemble -n numberfn",
-                    substrs=["$90"])
-        self.runCmd("settings set target.use-hex-immediates true")
-        self.runCmd("settings set target.hex-immediate-style c")
-        self.expect("disassemble -n numberfn",
-                    substrs=["$0x5a"])
-        self.runCmd("settings set target.hex-immediate-style asm")
-        self.expect("disassemble -n numberfn",
-                    substrs=["$5ah"])
-
-        # Intel syntax
-        self.runCmd("settings set target.x86-disassembly-flavor intel")
-        self.runCmd("settings set target.use-hex-immediates false")
-        self.expect("disassemble -n numberfn",
-                    substrs=["90"])
-        self.runCmd("settings set target.use-hex-immediates true")
-        self.runCmd("settings set target.hex-immediate-style c")
-        self.expect("disassemble -n numberfn",
-                    substrs=["0x5a"])
-        self.runCmd("settings set target.hex-immediate-style asm")
-        self.expect("disassemble -n numberfn",
-                    substrs=["5ah"])
-
-    @skipIfDarwinEmbedded   # <rdar://problem/34446098> debugserver on ios etc can't write files
-    def test_run_args_and_env_vars(self):
-        """Test that run-args and env-vars are passed to the launched process."""
-        self.build()
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Set the run-args and the env-vars.
-        # And add hooks to restore the settings during tearDown().
-        self.runCmd('settings set target.run-args A B C')
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.run-args"))
-        self.runCmd('settings set target.env-vars ["MY_ENV_VAR"]=YES')
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.env-vars"))
-
-        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
-                RUN_SUCCEEDED)
-
-        # Read the output file produced by running the program.
-        output = lldbutil.read_file_from_process_wd(self, "output2.txt")
-
-        self.expect(
-            output,
-            exe=False,
-            substrs=[
-                "argv[1] matches",
-                "argv[2] matches",
-                "argv[3] matches",
-                "Environment variable 'MY_ENV_VAR' successfully passed."])
-
-    @skipIfRemote  # it doesn't make sense to send host env to remote target
-    def test_pass_host_env_vars(self):
-        """Test that the host env vars are passed to the launched process."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # By default, inherit-env is 'true'.
-        self.expect(
-            'settings show target.inherit-env',
-            "Default inherit-env is 'true'",
-            startstr="target.inherit-env (boolean) = true")
-
-        # Set some host environment variables now.
-        os.environ["MY_HOST_ENV_VAR1"] = "VAR1"
-        os.environ["MY_HOST_ENV_VAR2"] = "VAR2"
-
-        # This is the function to unset the two env variables set above.
-        def unset_env_variables():
-            os.environ.pop("MY_HOST_ENV_VAR1")
-            os.environ.pop("MY_HOST_ENV_VAR2")
-
-        self.addTearDownHook(unset_env_variables)
-        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
-                RUN_SUCCEEDED)
-
-        # Read the output file produced by running the program.
-        output = lldbutil.read_file_from_process_wd(self, "output1.txt")
-
-        self.expect(
-            output,
-            exe=False,
-            substrs=[
-                "The host environment variable 'MY_HOST_ENV_VAR1' successfully passed.",
-                "The host environment variable 'MY_HOST_ENV_VAR2' successfully passed."])
-
-    @skipIfDarwinEmbedded   # <rdar://problem/34446098> debugserver on ios etc can't write files
-    def test_set_error_output_path(self):
-        """Test that setting target.error/output-path for the launched process works."""
-        self.build()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        # Set the error-path and output-path and verify both are set.
-        self.runCmd("settings set target.error-path '{0}'".format(
-            lldbutil.append_to_process_working_directory(self, "stderr.txt")))
-        self.runCmd("settings set target.output-path '{0}".format(
-            lldbutil.append_to_process_working_directory(self, "stdout.txt")))
-        # And add hooks to restore the original settings during tearDown().
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.output-path"))
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear target.error-path"))
-
-        self.expect("settings show target.error-path",
-                    SETTING_MSG("target.error-path"),
-                    substrs=['target.error-path (file)', 'stderr.txt"'])
-
-        self.expect("settings show target.output-path",
-                    SETTING_MSG("target.output-path"),
-                    substrs=['target.output-path (file)', 'stdout.txt"'])
-
-        self.runCmd("process launch --working-dir '{0}'".format(self.get_process_working_directory()),
-                RUN_SUCCEEDED)
-
-        output = lldbutil.read_file_from_process_wd(self, "stderr.txt")
-        message = "This message should go to standard error."
-        if lldbplatformutil.hasChattyStderr(self):
-            self.expect(output, exe=False, substrs=[message])
-        else:
-            self.expect(output, exe=False, startstr=message)
-
-        output = lldbutil.read_file_from_process_wd(self, "stdout.txt")
-        self.expect(output, exe=False,
-                    startstr="This message should go to standard out.")
-
-    def test_print_dictionary_setting(self):
-        self.runCmd("settings clear target.env-vars")
-        self.runCmd("settings set target.env-vars [\"MY_VAR\"]=some-value")
-        self.expect("settings show target.env-vars",
-                    substrs=["MY_VAR=some-value"])
-        self.runCmd("settings clear target.env-vars")
-
-    def test_print_array_setting(self):
-        self.runCmd("settings clear target.run-args")
-        self.runCmd("settings set target.run-args gobbledy-gook")
-        self.expect("settings show target.run-args",
-                    substrs=['[0]: "gobbledy-gook"'])
-        self.runCmd("settings clear target.run-args")
-
-    def test_settings_with_quotes(self):
-        self.runCmd("settings clear target.run-args")
-        self.runCmd("settings set target.run-args a b c")
-        self.expect("settings show target.run-args",
-                    substrs=['[0]: "a"',
-                             '[1]: "b"',
-                             '[2]: "c"'])
-        self.runCmd("settings set target.run-args 'a b c'")
-        self.expect("settings show target.run-args",
-                    substrs=['[0]: "a b c"'])
-        self.runCmd("settings clear target.run-args")
-        self.runCmd("settings clear target.env-vars")
-        self.runCmd(
-            'settings set target.env-vars ["MY_FILE"]="this is a file name with spaces.txt"')
-        self.expect("settings show target.env-vars",
-                    substrs=['MY_FILE=this is a file name with spaces.txt'])
-        self.runCmd("settings clear target.env-vars")
-        # Test and make sure that setting "format-string" settings obeys quotes
-        # if they are provided
-        self.runCmd("settings set thread-format    'abc def'   ")
-        self.expect("settings show thread-format",
-                    'thread-format (format-string) = "abc def"')
-        self.runCmd('settings set thread-format    "abc def"   ')
-        self.expect("settings show thread-format",
-                    'thread-format (format-string) = "abc def"')
-        # Make sure when no quotes are provided that we maintain any trailing
-        # spaces
-        self.runCmd('settings set thread-format abc def   ')
-        self.expect("settings show thread-format",
-                    'thread-format (format-string) = "abc def   "')
-        self.runCmd('settings clear thread-format')
-
-    def test_settings_with_trailing_whitespace(self):
-
-        # boolean
-        # Set to known value
-        self.runCmd("settings set target.skip-prologue true")
-        # Set to new value with trailing whitespace
-        self.runCmd("settings set target.skip-prologue false ")
-        # Make sure the setting was correctly set to "false"
-        self.expect(
-            "settings show target.skip-prologue",
-            SETTING_MSG("target.skip-prologue"),
-            startstr="target.skip-prologue (boolean) = false")
-        self.runCmd("settings clear target.skip-prologue", check=False)
-        # integer
-        self.runCmd("settings set term-width 70")      # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set term-width 60 \t")
-        self.expect("settings show term-width", SETTING_MSG("term-width"),
-                    startstr="term-width (int) = 60")
-        self.runCmd("settings clear term-width", check=False)
-        # string
-        self.runCmd("settings set target.arg0 abc")    # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set target.arg0 cde\t ")
-        self.expect("settings show target.arg0", SETTING_MSG("target.arg0"),
-                    startstr='target.arg0 (string) = "cde"')
-        self.runCmd("settings clear target.arg0", check=False)
-        # file
-        path1 = self.getBuildArtifact("path1.txt")
-        path2 = self.getBuildArtifact("path2.txt")
-        self.runCmd(
-            "settings set target.output-path %s" %
-            path1)   # Set to known value
-        self.expect(
-            "settings show target.output-path",
-            SETTING_MSG("target.output-path"),
-            startstr='target.output-path (file) = ',
-            substrs=[path1])
-        self.runCmd("settings set target.output-path %s " %
-                    path2)  # Set to new value with trailing whitespaces
-        self.expect(
-            "settings show target.output-path",
-            SETTING_MSG("target.output-path"),
-            startstr='target.output-path (file) = ',
-            substrs=[path2])
-        self.runCmd("settings clear target.output-path", check=False)
-        # enum
-        # Set to known value
-        self.runCmd("settings set stop-disassembly-display never")
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set stop-disassembly-display always ")
-        self.expect(
-            "settings show stop-disassembly-display",
-            SETTING_MSG("stop-disassembly-display"),
-            startstr='stop-disassembly-display (enum) = always')
-        self.runCmd("settings clear stop-disassembly-display", check=False)
-        # language
-        # Set to known value
-        self.runCmd("settings set target.language c89")
-        # Set to new value with trailing whitespace
-        self.runCmd("settings set target.language c11 ")
-        self.expect(
-            "settings show target.language",
-            SETTING_MSG("target.language"),
-            startstr="target.language (language) = c11")
-        self.runCmd("settings clear target.language", check=False)
-        # arguments
-        self.runCmd("settings set target.run-args 1 2 3")  # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set target.run-args 3 4 5 ")
-        self.expect(
-            "settings show target.run-args",
-            SETTING_MSG("target.run-args"),
-            substrs=[
-                'target.run-args (arguments) =',
-                '[0]: "3"',
-                '[1]: "4"',
-                '[2]: "5"'])
-        self.runCmd("settings set target.run-args 1 2 3")  # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set target.run-args 3 \  \ ")
-        self.expect(
-            "settings show target.run-args",
-            SETTING_MSG("target.run-args"),
-            substrs=[
-                'target.run-args (arguments) =',
-                '[0]: "3"',
-                '[1]: " "',
-                '[2]: " "'])
-        self.runCmd("settings clear target.run-args", check=False)
-        # dictionaries
-        self.runCmd("settings clear target.env-vars")  # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set target.env-vars A=B C=D\t ")
-        self.expect(
-            "settings show target.env-vars",
-            SETTING_MSG("target.env-vars"),
-            substrs=[
-                'target.env-vars (dictionary of strings) =',
-                'A=B',
-                'C=D'])
-        self.runCmd("settings clear target.env-vars", check=False)
-        # regex
-        # Set to known value
-        self.runCmd("settings clear target.process.thread.step-avoid-regexp")
-        # Set to new value with trailing whitespaces
-        self.runCmd(
-            "settings set target.process.thread.step-avoid-regexp foo\\ ")
-        self.expect(
-            "settings show target.process.thread.step-avoid-regexp",
-            SETTING_MSG("target.process.thread.step-avoid-regexp"),
-            substrs=['target.process.thread.step-avoid-regexp (regex) = foo\\ '])
-        self.runCmd(
-            "settings clear target.process.thread.step-avoid-regexp",
-            check=False)
-        # format-string
-        self.runCmd("settings clear disassembly-format")  # Set to known value
-        # Set to new value with trailing whitespaces
-        self.runCmd("settings set disassembly-format foo ")
-        self.expect("settings show disassembly-format",
-                    SETTING_MSG("disassembly-format"),
-                    substrs=['disassembly-format (format-string) = "foo "'])
-        self.runCmd("settings clear disassembly-format", check=False)
-
-    def test_all_settings_exist(self):
-        self.expect("settings show",
-                    substrs=["auto-confirm",
-                             "frame-format",
-                             "notify-void",
-                             "prompt",
-                             "script-lang",
-                             "stop-disassembly-count",
-                             "stop-disassembly-display",
-                             "stop-line-count-after",
-                             "stop-line-count-before",
-                             "stop-show-column",
-                             "term-width",
-                             "thread-format",
-                             "use-external-editor",
-                             "target.default-arch",
-                             "target.move-to-nearest-code",
-                             "target.expr-prefix",
-                             "target.language",
-                             "target.prefer-dynamic-value",
-                             "target.enable-synthetic-value",
-                             "target.skip-prologue",
-                             "target.source-map",
-                             "target.exec-search-paths",
-                             "target.max-children-count",
-                             "target.max-string-summary-length",
-                             "target.breakpoints-use-platform-avoid-list",
-                             "target.run-args",
-                             "target.env-vars",
-                             "target.inherit-env",
-                             "target.input-path",
-                             "target.output-path",
-                             "target.error-path",
-                             "target.disable-aslr",
-                             "target.disable-stdio",
-                             "target.x86-disassembly-flavor",
-                             "target.use-hex-immediates",
-                             "target.hex-immediate-style",
-                             "target.process.disable-memory-cache",
-                             "target.process.extra-startup-command",
-                             "target.process.thread.step-avoid-regexp",
-                             "target.process.thread.trace-thread"])
-
-    # settings under an ".experimental" domain should have two properties:
-    #   1. If the name does not exist with "experimental" in the name path,
-    #      the name lookup should try to find it without "experimental".  So
-    #      a previously-experimental setting that has been promoted to a
-    #      "real" setting will still be set by the original name.
-    #   2. Changing a setting with .experimental., name, where the setting
-    #      does not exist either with ".experimental." or without, should
-    #      not generate an error.  So if an experimental setting is removed,
-    #      people who may have that in their ~/.lldbinit files should not see
-    #      any errors.
-    def test_experimental_settings(self):
-        cmdinterp = self.dbg.GetCommandInterpreter()
-        result = lldb.SBCommandReturnObject()
-
-        # Set target.arg0 to a known value, check that we can retrieve it via
-        # the actual name and via .experimental.
-        self.expect('settings set target.arg0 first-value')
-        self.expect('settings show target.arg0', substrs=['first-value'])
-        self.expect('settings show target.experimental.arg0', substrs=['first-value'], error=False)
-
-        # Set target.arg0 to a new value via a target.experimental.arg0 name,
-        # verify that we can read it back via both .experimental., and not.
-        self.expect('settings set target.experimental.arg0 second-value', error=False)
-        self.expect('settings show target.arg0', substrs=['second-value'])
-        self.expect('settings show target.experimental.arg0', substrs=['second-value'], error=False)
-
-        # showing & setting an undefined .experimental. setting should generate no errors.
-        self.expect('settings show target.experimental.setting-which-does-not-exist', patterns=['^\s$'], error=False)
-        self.expect('settings set target.experimental.setting-which-does-not-exist true', error=False)
-
-        # A domain component before .experimental. which does not exist should give an error
-        # But the code does not yet do that.
-        # self.expect('settings set target.setting-which-does-not-exist.experimental.arg0 true', error=True)
-
-        # finally, confirm that trying to set a setting that does not exist still fails.
-        # (SHOWING a setting that does not exist does not currently yield an error.)
-        self.expect('settings set target.setting-which-does-not-exist true', error=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/quoting/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/quoting/Makefile
deleted file mode 100644
index 0d70f25..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/quoting/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-C_SOURCES := main.c
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py
deleted file mode 100644
index 51d1e81..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/settings/quoting/TestQuoting.py
+++ /dev/null
@@ -1,97 +0,0 @@
-"""
-Test quoting of arguments to lldb commands
-"""
-
-from __future__ import print_function
-
-
-import os
-import re
-import time
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class SettingsCommandTestCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @classmethod
-    def classCleanup(cls):
-        """Cleanup the test byproducts."""
-        cls.RemoveTempFile("stdout.txt")
-
-    @no_debug_info_test
-    def test_no_quote(self):
-        self.do_test_args("a b c", "a\0b\0c\0")
-
-    @no_debug_info_test
-    def test_single_quote(self):
-        self.do_test_args("'a b c'", "a b c\0")
-
-    @no_debug_info_test
-    def test_double_quote(self):
-        self.do_test_args('"a b c"', "a b c\0")
-
-    @no_debug_info_test
-    def test_single_quote_escape(self):
-        self.do_test_args("'a b\\' c", "a b\\\0c\0")
-
-    @no_debug_info_test
-    def test_double_quote_escape(self):
-        self.do_test_args('"a b\\" c"', 'a b" c\0')
-
-    @no_debug_info_test
-    def test_double_quote_escape2(self):
-        self.do_test_args('"a b\\\\" c', 'a b\\\0c\0')
-
-    @no_debug_info_test
-    def test_single_in_double(self):
-        self.do_test_args('"a\'b"', "a'b\0")
-
-    @no_debug_info_test
-    def test_double_in_single(self):
-        self.do_test_args("'a\"b'", 'a"b\0')
-
-    @no_debug_info_test
-    def test_combined(self):
-        self.do_test_args('"a b"c\'d e\'', 'a bcd e\0')
-
-    @no_debug_info_test
-    def test_bare_single(self):
-        self.do_test_args("a\\'b", "a'b\0")
-
-    @no_debug_info_test
-    def test_bare_double(self):
-        self.do_test_args('a\\"b', 'a"b\0')
-
-    def do_test_args(self, args_in, args_out):
-        """Test argument parsing. Run the program with args_in. The program dumps its arguments
-        to stdout. Compare the stdout with args_out."""
-        self.buildDefault()
-
-        exe = self.getBuildArtifact("a.out")
-        self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
-
-        local_outfile = self.getBuildArtifact("output.txt")
-        if lldb.remote_platform:
-            remote_outfile = "output.txt" # Relative to platform's PWD
-        else:
-            remote_outfile = local_outfile
-
-        self.runCmd("process launch -- %s %s" %(remote_outfile, args_in))
-
-        if lldb.remote_platform:
-            src_file_spec = lldb.SBFileSpec(remote_outfile, False)
-            dst_file_spec = lldb.SBFileSpec(local_outfile, True)
-            lldb.remote_platform.Get(src_file_spec, dst_file_spec)
-
-        with open(local_outfile, 'r') as f:
-            output = f.read()
-
-        self.RemoveTempFile(local_outfile)
-
-        self.assertEqual(output, args_out)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/source-manager/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/source-manager/Makefile
index 5d19a27..a78dc11 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/source-manager/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/source-manager/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../make
-
 C_SOURCES := main-copy.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
 
 # Copy file into the build folder to enable the test to modify it.
 main-copy.c: main.c
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py
index 2ee6916..f91d076 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/source-manager/TestSourceManager.py
@@ -10,7 +10,6 @@
 """
 
 from __future__ import print_function
-import re
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -172,6 +171,7 @@
         self.expect("source list -n main", SOURCE_DISPLAYED_CORRECTLY,
                     substrs=['Hello world'])
 
+    @skipIf(oslist=["windows"], bugnumber="llvm.org/pr44431")
     def test_modify_source_file_while_debugging(self):
         """Modify a source file while debugging the executable."""
         self.build()
@@ -237,6 +237,7 @@
             SOURCE_DISPLAYED_CORRECTLY,
             substrs=['Hello lldb'])
 
+    @expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr44432")
     def test_set_breakpoint_with_absolute_path(self):
         self.build()
         hidden = self.getBuildArtifact("hidden")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py
new file mode 100644
index 0000000..8e1652a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/terminal/TestEditline.py
@@ -0,0 +1,47 @@
+"""
+Test that the lldb editline handling is configured correctly.
+"""
+
+
+
+import lldb
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+from lldbsuite.test.lldbpexpect import PExpectTest
+
+
+class EditlineTest(PExpectTest):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    @skipIfAsan
+    @skipIfEditlineSupportMissing
+    def test_left_right_arrow(self):
+        """Test that ctrl+left/right arrow navigates words correctly.
+
+        Note: just sending escape characters to pexpect and checking the buffer
+        doesn't work well, so we run real commands. We want to type
+        "help command" while exercising word-navigation, so type it as below,
+        where [] indicates cursor position.
+
+        1. Send "el rint"  -> "el rint[]"
+        2. Ctrl+left once  -> "el []rint"
+        3. Send "p"        -> "el p[]rint"
+        4. Ctrl+left twice -> "[]el print"
+        5. Send "h"        -> "h[]el print"
+        6. Ctrl+right      -> "hel[] print"
+        7. Send "p"        -> "help print"
+        """
+        self.launch()
+
+        escape_pairs = [
+            ("\x1b[1;5D", "\x1b[1;5C"),
+            ("\x1b[5D", "\x1b[5C"),
+            ("\x1b\x1b[D", "\x1b\x1b[C"),
+        ]
+        for (l_escape, r_escape) in escape_pairs:
+            self.expect("el rint{L}p{L}{L}h{R}p".format(
+                L=l_escape, R=r_escape), substrs=["Syntax: print"])
+
+        self.quit()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
index a2d8be9..e994508 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/terminal/TestSTTYBeforeAndAfter.py
@@ -5,7 +5,6 @@
 from __future__ import print_function
 
 
-import os
 import lldb
 import six
 from lldbsuite.test.decorators import *
@@ -74,7 +73,7 @@
         child.logfile_read = None
 
         # Invoke the lldb command.
-        child.sendline('%s %s' % (lldbtest_config.lldbExec, self.lldbOption))
+        child.sendline(lldbtest_config.lldbExec)
         child.expect_exact(lldb_prompt)
 
         # Immediately quit.
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_categories.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_categories.py
index 8a9fd74..05ce2a1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_categories.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_categories.py
@@ -34,9 +34,9 @@
     'dyntype': 'Tests related to dynamic type support',
     'stresstest': 'Tests related to stressing lldb limits',
     'flakey': 'Flakey test cases, i.e. tests that do not reliably pass at each execution',
-    'lldb-mi': 'lldb-mi tests',
     'darwin-log': 'Darwin log tests',
     'watchpoint': 'Watchpoint-related tests',
+    'lldb-vscode': 'Visual Studio Code debug adaptor tests',
 }
 
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_result.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_result.py
index de6fbea..7e13e09 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_result.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_result.py
@@ -7,11 +7,7 @@
 and results of a single test run.
 """
 
-from __future__ import absolute_import
-from __future__ import print_function
-
 # System modules
-import inspect
 import os
 
 # Third-party modules
@@ -45,7 +41,6 @@
                 import fcntl
                 import termios
                 import struct
-                import os
                 cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ,
                                                      '1234'))
             except:
@@ -104,31 +99,43 @@
         else:
             return str(test)
 
-    @staticmethod
-    def _getFileBasedCategories(test):
+    def _getTestPath(self, test):
+        # Use test.test_filename if the test was created with
+        # lldbinline.MakeInlineTest().
+        if test is None:
+            return ""
+        elif hasattr(test, "test_filename"):
+            return test.test_filename
+        else:
+            import inspect
+            return inspect.getsourcefile(test.__class__)
+
+    def _getFileBasedCategories(self, test):
         """
         Returns the list of categories to which this test case belongs by
-        looking for a ".categories" file. We start at the folder the test is in
-        an traverse the hierarchy upwards - we guarantee a .categories to exist
-        at the top level directory so we do not end up looping endlessly.
+        collecting values of ".categories" files. We start at the folder the test is in
+        and traverse the hierarchy upwards until the test-suite root directory.
         """
-        import inspect
+        start_path = self._getTestPath(test)
+
         import os.path
-        folder = inspect.getfile(test.__class__)
-        folder = os.path.dirname(folder)
-        while folder != '/':
+        folder = os.path.dirname(start_path)
+
+        from lldbsuite import lldb_test_root as test_root
+        if test_root != os.path.commonprefix([folder, test_root]):
+            raise Exception("The test file %s is outside the test root directory" % start_path)
+
+        categories = set()
+        while not os.path.samefile(folder, test_root):
             categories_file_name = os.path.join(folder, ".categories")
             if os.path.exists(categories_file_name):
                 categories_file = open(categories_file_name, 'r')
-                categories = categories_file.readline()
+                categories_str = categories_file.readline().strip()
                 categories_file.close()
-                categories = str.replace(categories, '\n', '')
-                categories = str.replace(categories, '\r', '')
-                return categories.split(',')
-            else:
-                folder = os.path.dirname(folder)
-                continue
+                categories.update(categories_str.split(','))
+            folder = os.path.dirname(folder)
 
+        return list(categories)
 
     def getCategoriesForTest(self, test):
         """
@@ -157,6 +164,10 @@
                     return True
         return False
 
+    def checkCategoryExclusion(self, exclusion_list, test):
+        return not set(exclusion_list).isdisjoint(
+            self.getCategoriesForTest(test))
+
     def startTest(self, test):
         if configuration.shouldSkipBecauseOfCategories(
                 self.getCategoriesForTest(test)):
@@ -175,16 +186,17 @@
                 EventBuilder.event_for_start(test))
 
     def addSuccess(self, test):
-        if self.checkExclusion(
-                configuration.xfail_tests, test.id()):
+        if (self.checkExclusion(
+                configuration.xfail_tests, test.id()) or
+            self.checkCategoryExclusion(
+                configuration.xfail_categories, test)):
             self.addUnexpectedSuccess(test, None)
             return
 
         super(LLDBTestResult, self).addSuccess(test)
-        if configuration.parsable:
-            self.stream.write(
-                "PASS: LLDB (%s) :: %s\n" %
-                (self._config_string(test), str(test)))
+        self.stream.write(
+            "PASS: LLDB (%s) :: %s\n" %
+            (self._config_string(test), str(test)))
         if self.results_formatter:
             self.results_formatter.handle_event(
                 EventBuilder.event_for_success(test))
@@ -193,14 +205,6 @@
         exception = err_tuple[1]
         return isinstance(exception, build_exception.BuildError)
 
-    def _getTestPath(self, test):
-        if test is None:
-            return ""
-        elif hasattr(test, "test_filename"):
-            return test.test_filename
-        else:
-            return inspect.getsourcefile(test.__class__)
-
     def _saveBuildErrorTuple(self, test, err):
         # Adjust the error description so it prints the build command and build error
         # rather than an uninformative Python backtrace.
@@ -221,10 +225,9 @@
         method = getattr(test, "markError", None)
         if method:
             method()
-        if configuration.parsable:
-            self.stream.write(
-                "FAIL: LLDB (%s) :: %s\n" %
-                (self._config_string(test), str(test)))
+        self.stream.write(
+            "FAIL: LLDB (%s) :: %s\n" %
+            (self._config_string(test), str(test)))
         if self.results_formatter:
             # Handle build errors as a separate event type
             if self._isBuildError(err):
@@ -239,18 +242,19 @@
         method = getattr(test, "markCleanupError", None)
         if method:
             method()
-        if configuration.parsable:
-            self.stream.write(
-                "CLEANUP ERROR: LLDB (%s) :: %s\n" %
-                (self._config_string(test), str(test)))
+        self.stream.write(
+            "CLEANUP ERROR: LLDB (%s) :: %s\n" %
+            (self._config_string(test), str(test)))
         if self.results_formatter:
             self.results_formatter.handle_event(
                 EventBuilder.event_for_cleanup_error(
                     test, err))
 
     def addFailure(self, test, err):
-        if self.checkExclusion(
-                configuration.xfail_tests, test.id()):
+        if (self.checkExclusion(
+                configuration.xfail_tests, test.id()) or
+            self.checkCategoryExclusion(
+                configuration.xfail_categories, test)):
             self.addExpectedFailure(test, err, None)
             return
 
@@ -259,18 +263,17 @@
         method = getattr(test, "markFailure", None)
         if method:
             method()
-        if configuration.parsable:
-            self.stream.write(
-                "FAIL: LLDB (%s) :: %s\n" %
-                (self._config_string(test), str(test)))
-        if configuration.useCategories:
+        self.stream.write(
+            "FAIL: LLDB (%s) :: %s\n" %
+            (self._config_string(test), str(test)))
+        if configuration.use_categories:
             test_categories = self.getCategoriesForTest(test)
             for category in test_categories:
-                if category in configuration.failuresPerCategory:
-                    configuration.failuresPerCategory[
-                        category] = configuration.failuresPerCategory[category] + 1
+                if category in configuration.failures_per_category:
+                    configuration.failures_per_category[
+                        category] = configuration.failures_per_category[category] + 1
                 else:
-                    configuration.failuresPerCategory[category] = 1
+                    configuration.failures_per_category[category] = 1
         if self.results_formatter:
             self.results_formatter.handle_event(
                 EventBuilder.event_for_failure(test, err))
@@ -281,10 +284,9 @@
         method = getattr(test, "markExpectedFailure", None)
         if method:
             method(err, bugnumber)
-        if configuration.parsable:
-            self.stream.write(
-                "XFAIL: LLDB (%s) :: %s\n" %
-                (self._config_string(test), str(test)))
+        self.stream.write(
+            "XFAIL: LLDB (%s) :: %s\n" %
+            (self._config_string(test), str(test)))
         if self.results_formatter:
             self.results_formatter.handle_event(
                 EventBuilder.event_for_expected_failure(
@@ -296,10 +298,9 @@
         method = getattr(test, "markSkippedTest", None)
         if method:
             method()
-        if configuration.parsable:
-            self.stream.write(
-                "UNSUPPORTED: LLDB (%s) :: %s (%s) \n" %
-                (self._config_string(test), str(test), reason))
+        self.stream.write(
+            "UNSUPPORTED: LLDB (%s) :: %s (%s) \n" %
+            (self._config_string(test), str(test), reason))
         if self.results_formatter:
             self.results_formatter.handle_event(
                 EventBuilder.event_for_skip(test, reason))
@@ -310,10 +311,9 @@
         method = getattr(test, "markUnexpectedSuccess", None)
         if method:
             method(bugnumber)
-        if configuration.parsable:
-            self.stream.write(
-                "XPASS: LLDB (%s) :: %s\n" %
-                (self._config_string(test), str(test)))
+        self.stream.write(
+            "XPASS: LLDB (%s) :: %s\n" %
+            (self._config_string(test), str(test)))
         if self.results_formatter:
             self.results_formatter.handle_event(
                 EventBuilder.event_for_unexpected_success(
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_runner/process_control.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_runner/process_control.py
index 17a0b0f..687f105 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_runner/process_control.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_runner/process_control.py
@@ -503,7 +503,6 @@
         Do not attempt to reap the process (i.e. use wait()) in this method.
         That will interfere with the kill mechanism and return code processing.
         """
-        pass
 
     def write(self, content):
         # pylint: disable=no-self-use
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py
index d1f7da6..b3b5aee 100755
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/test_runner/test/test_process_control.py
@@ -11,12 +11,10 @@
 Tests the process_control module.
 """
 
-from __future__ import print_function
 
 # System imports.
 import os
 import os.path
-import platform
 import unittest
 import sys
 import threading
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/.categories b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/.categories
deleted file mode 100644
index 8b5f00c..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/.categories
+++ /dev/null
@@ -1 +0,0 @@
-lldb-mi
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
deleted file mode 100644
index d62224d..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiEnvironmentCd.py
+++ /dev/null
@@ -1,38 +0,0 @@
-"""
-Test lldb-mi -environment-cd command.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiEnvironmentCdTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin   # Disabled while I investigate the failure on buildbot.
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_environment_cd(self):
-        """Test that 'lldb-mi --interpreter' changes working directory for inferior."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # cd to a different directory
-        self.runCmd("-environment-cd /tmp")
-        self.expect("\^done")
-
-        # Run to the end
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("@\"cwd: /tmp\\r\\n\"", exactly=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiLibraryLoaded.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiLibraryLoaded.py
deleted file mode 100644
index 92b7fda..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiLibraryLoaded.py
+++ /dev/null
@@ -1,60 +0,0 @@
-"""
-Test lldb-mi =library-loaded notifications.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiLibraryLoadedTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_library_loaded(self):
-        """Test that 'lldb-mi --interpreter' shows the =library-loaded notifications."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Test =library-loaded
-        import os
-        path = self.getBuildArtifact(self.myexe)
-        symbols_path = os.path.join(
-            path + ".dSYM",
-            "Contents",
-            "Resources",
-            "DWARF",
-            "a.out")
-
-        def add_slashes(x): return x.replace(
-            "\\",
-            "\\\\").replace(
-            "\"",
-            "\\\"").replace(
-            "\'",
-            "\\\'").replace(
-                "\0",
-            "\\\0")
-        self.expect(
-            [
-                "=library-loaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded=\"1\",symbols-path=\"%s\",loaded_addr=\"-\",size=\"[0-9]+\"" %
-                (add_slashes(path),
-                 add_slashes(path),
-                 add_slashes(path),
-                 add_slashes(symbols_path)),
-                "=library-loaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded=\"0\",loaded_addr=\"-\",size=\"[0-9]+\"" %
-                (add_slashes(path),
-                 add_slashes(path),
-                 add_slashes(path))])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiPrompt.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiPrompt.py
deleted file mode 100644
index 20e48ac..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/TestMiPrompt.py
+++ /dev/null
@@ -1,58 +0,0 @@
-"""
-Test that the lldb-mi driver prints prompt properly.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiPromptTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_prompt(self):
-        """Test that 'lldb-mi --interpreter' echos '(gdb)' after commands and events."""
-
-        self.spawnLldbMi(args=None)
-
-        # Test that lldb-mi is ready after unknown command
-        self.runCmd("-unknown-command")
-        self.expect(
-            "\^error,msg=\"Driver\. Received command '-unknown-command'\. It was not handled\. Command 'unknown-command' not in Command Factory\"")
-        self.expect(self.child_prompt, exactly=True)
-
-        # Test that lldb-mi is ready after -file-exec-and-symbols
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-        self.expect(self.child_prompt, exactly=True)
-
-        # Test that lldb-mi is ready after -break-insert
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.expect(self.child_prompt, exactly=True)
-
-        # Test that lldb-mi is ready after -exec-run
-        self.runCmd("-exec-run")
-        self.expect("\*running")
-        self.expect(self.child_prompt, exactly=True)
-
-        # Test that lldb-mi is ready after BP hit
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-        self.expect(self.child_prompt, exactly=True)
-
-        # Test that lldb-mi is ready after -exec-continue
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect(self.child_prompt, exactly=True)
-
-        # Test that lldb-mi is ready after program exited
-        self.expect("\*stopped,reason=\"exited-normally\"")
-        self.expect(self.child_prompt, exactly=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/TestMiBreak.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/TestMiBreak.py
deleted file mode 100644
index eefc13f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/TestMiBreak.py
+++ /dev/null
@@ -1,361 +0,0 @@
-"""
-Test lldb-mi -break-xxx commands.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiBreakTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux    # llvm.org/pr24717
-    @expectedFailureNetBSD
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_break_insert_function_pending(self):
-        """Test that 'lldb-mi --interpreter' works for pending function breakpoints."""
-
-        self.spawnLldbMi(args=None)
-
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        self.runCmd("-break-insert -f printf")
-        # FIXME function name is unknown on Darwin, fullname should be ??, line is -1
-        # self.expect("\^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0xffffffffffffffff\",func=\"printf\",file=\"\?\?\",fullname=\"\?\?\",line=\"-1\",pending=\[\"printf\"\],times=\"0\",original-location=\"printf\"}")
-        self.expect(
-            "\^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0xffffffffffffffff\",func=\"\?\?\",file=\"\?\?\",fullname=\"\?\?/\?\?\",line=\"0\",pending=\[\"printf\"\],times=\"0\",original-location=\"printf\"}")
-        # FIXME function name is unknown on Darwin, fullname should be ??, line -1
-        # self.expect("=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0xffffffffffffffff\",func=\"printf\",file=\"\?\?\",fullname=\"\?\?\",line=\"-1\",pending=\[\"printf\"\],times=\"0\",original-location=\"printf\"}")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0xffffffffffffffff\",func=\"\?\?\",file=\"\?\?\",fullname=\"\?\?/\?\?\",line=\"0\",pending=\[\"printf\"\],times=\"0\",original-location=\"printf\"}")
-
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\".+?\",file=\".+?\",fullname=\".+?\",line=\"(-1|\d+)\",pending=\[\"printf\"\],times=\"0\",original-location=\"printf\"}")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @expectedFailureNetBSD
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_break_insert_function(self):
-        """Test that 'lldb-mi --interpreter' works for function breakpoints."""
-
-        self.spawnLldbMi(args=None)
-
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        self.runCmd("-break-insert -f main")
-        self.expect(
-            "\^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",pending=\[\"main\"\],times=\"0\",original-location=\"main\"}")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",pending=\[\"main\"\],times=\"0\",original-location=\"main\"}")
-
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",pending=\[\"main\"\],times=\"0\",original-location=\"main\"}")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that -break-insert can set non-pending BP
-        self.runCmd("-break-insert printf")
-        # FIXME function name is unknown on Darwin
-        # self.expect("\^done,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"printf\",file=\".+?\",fullname=\".+?\",line=\"(-1|\d+)\",times=\"0\",original-location=\"printf\"}")
-        self.expect(
-            "\^done,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\".+?\",file=\".+?\",fullname=\".+?\",line=\"(-1|\d+)\",times=\"0\",original-location=\"printf\"}")
-        # FIXME function name is unknown on Darwin
-        # self.expect("=breakpoint-modified,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"printf\",file=\".+?\",fullname=\".+?\",line=\"(-1|\d+)\",times=\"0\",original-location=\"printf\"}")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\".+?\",file=\".+?\",fullname=\".+?\",line=\"(-1|\d+)\",times=\"0\",original-location=\"printf\"}")
-        # FIXME function name is unknown on Darwin
-        # self.expect("=breakpoint-modified,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"printf\",file=\".+?\",fullname=\".+?\",line=\"(-1|\d+)\",times=\"0\",original-location=\"printf\"}")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\".+?\",file=\".+?\",fullname=\".+?\",line=\"(-1|\d+)\",times=\"0\",original-location=\"printf\"}")
-
-        # Test that -break-insert fails if non-pending BP can't be resolved
-        self.runCmd("-break-insert unknown_func")
-        self.expect(
-            "\^error,msg=\"Command 'break-insert'. Breakpoint location 'unknown_func' not found\"")
-
-        # Test that non-pending BP was set correctly
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\".*bkptno=\"2\"")
-
-        # Test that we can set a BP using the file:func syntax
-        self.runCmd("-break-insert main.cpp:main")
-        self.expect("\^done,bkpt={number=\"4\"")
-        self.runCmd("-break-insert main.cpp:ns::foo1")
-        self.expect("\^done,bkpt={number=\"5\"")
-        # FIXME: quotes on filenames aren't handled correctly in lldb-mi.
-        #self.runCmd("-break-insert \"main.cpp\":main")
-        # self.expect("\^done,bkpt={number=\"6\"")
-
-        # We should hit BP #5 on 'main.cpp:ns::foo1'
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\".*bkptno=\"5\"")
-
-        # FIXME: this test is disabled due to lldb bug llvm.org/pr24271.
-        # Test that we can set a BP using the global namespace token
-        #self.runCmd("-break-insert ::main")
-        # self.expect("\^done,bkpt={number=\"7\"")
-        #self.runCmd("-break-insert main.cpp:::main")
-        # self.expect("\^done,bkpt={number=\"8\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_break_insert_file_line_pending(self):
-        """Test that 'lldb-mi --interpreter' works for pending file:line breakpoints."""
-
-        self.spawnLldbMi(args=None)
-
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Find the line number to break inside main() and set
-        # pending BP
-        line = line_number('main.cpp', '// BP_return')
-        self.runCmd("-break-insert -f main.cpp:%d" % line)
-        self.expect(
-            "\^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"%d\",pending=\[\"main.cpp:%d\"\],times=\"0\",original-location=\"main.cpp:%d\"}" %
-            (line,
-             line,
-             line))
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"%d\",pending=\[\"main.cpp:%d\"\],times=\"0\",original-location=\"main.cpp:%d\"}" %
-            (line,
-             line,
-             line))
-
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_break_insert_file_line(self):
-        """Test that 'lldb-mi --interpreter' works for file:line breakpoints."""
-
-        self.spawnLldbMi(args=None)
-
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that -break-insert can set non-pending BP
-        line = line_number('main.cpp', '// BP_return')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect(
-            "\^done,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"%d\",times=\"0\",original-location=\"main.cpp:%d\"}" %
-            (line, line))
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"%d\",times=\"0\",original-location=\"main.cpp:%d\"}" %
-            (line, line))
-
-        # Test that -break-insert fails if non-pending BP can't be resolved
-        self.runCmd("-break-insert unknown_file:1")
-        self.expect(
-            "\^error,msg=\"Command 'break-insert'. Breakpoint location 'unknown_file:1' not found\"")
-
-        # Test that non-pending BP was set correctly
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_break_insert_file_line_absolute_path(self):
-        """Test that 'lldb-mi --interpreter' works for file:line breakpoints."""
-
-        self.spawnLldbMi(args=None)
-
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        import os
-        path = os.path.join(self.getSourceDir(), "main.cpp")
-        line = line_number('main.cpp', '// BP_return')
-        self.runCmd("-break-insert %s:%d" % (path, line))
-        self.expect("\^done,bkpt={number=\"2\"")
-
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_break_insert_settings(self):
-        """Test that 'lldb-mi --interpreter' can set breakpoints accoridng to global options."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Set target.move-to-nearest-code=off and try to set BP #1 that
-        # shouldn't be hit
-        self.runCmd(
-            "-interpreter-exec console \"settings set target.move-to-nearest-code off\"")
-        self.expect("\^done")
-        line_decl = line_number('main.cpp', '// BP_main_decl')
-        line_in = line_number('main.cpp', '// BP_in_main')
-        self.runCmd("-break-insert -f main.cpp:%d" % line_in)
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        # Test that non-pending BP will not be set on non-existing line if target.move-to-nearest-code=off
-        # Note: this increases the BP number by 1 even though BP #2 is invalid.
-        self.runCmd("-break-insert main.cpp:%d" % line_in)
-        self.expect(
-            "\^error,msg=\"Command 'break-insert'. Breakpoint location 'main.cpp:%d' not found\"" %
-            line_in)
-
-        # Set target.move-to-nearest-code=on and target.skip-prologue=on and
-        # set BP #3 & #4
-        self.runCmd(
-            "-interpreter-exec console \"settings set target.move-to-nearest-code on\"")
-        self.runCmd(
-            "-interpreter-exec console \"settings set target.skip-prologue on\"")
-        self.expect("\^done")
-        self.runCmd("-break-insert main.cpp:%d" % line_in)
-        self.expect("\^done,bkpt={number=\"3\"")
-        self.runCmd("-break-insert main.cpp:%d" % line_decl)
-        self.expect("\^done,bkpt={number=\"4\"")
-
-        # Set target.skip-prologue=off and set BP #5
-        self.runCmd(
-            "-interpreter-exec console \"settings set target.skip-prologue off\"")
-        self.expect("\^done")
-        self.runCmd("-break-insert main.cpp:%d" % line_decl)
-        self.expect("\^done,bkpt={number=\"5\"")
-
-        # Test that BP #5 is located before BP #4
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect(
-            "\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"5\"")
-
-        # Test that BP #4 is hit
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect(
-            "\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"4\"")
-
-        # Test that BP #3 is hit
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect(
-            "\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"3\"")
-
-        # Test that the target.language=pascal setting works and that BP #6 is
-        # NOT set
-        self.runCmd(
-            "-interpreter-exec console \"settings set target.language c\"")
-        self.expect("\^done")
-        self.runCmd("-break-insert ns.foo1")
-        self.expect("\^error")
-
-        # Test that the target.language=c++ setting works and that BP #7 is hit
-        self.runCmd(
-            "-interpreter-exec console \"settings set target.language c++\"")
-        self.expect("\^done")
-        self.runCmd("-break-insert ns::foo1")
-        self.expect("\^done,bkpt={number=\"7\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect(
-            "\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"7\"")
-
-        # Test that BP #1 and #2 weren't set by running to program exit
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfNetBSD
-    def test_lldbmi_break_enable_disable(self):
-        """Test that 'lldb-mi --interpreter' works for enabling / disabling breakpoints."""
-
-        self.spawnLldbMi(args=None)
-
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        self.runCmd("-break-insert main")
-        self.expect(
-            "\^done,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\"")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",times=\"0\",original-location=\"main\"}")
-
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",times=\"0\",original-location=\"main\"}")
-        self.expect(
-            "\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"1\"")
-
-        self.runCmd("-break-insert ns::foo1")
-        self.expect(
-            "\^done,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"ns::foo1\(\)\"")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"ns::foo1\(\)\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",times=\"0\",original-location=\"ns::foo1\"}")
-
-        self.runCmd("-break-insert ns::foo2")
-        self.expect(
-            "\^done,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"ns::foo2\(\)\"")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"ns::foo2\(\)\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",times=\"0\",original-location=\"ns::foo2\"}")
-
-        # disable the 2nd breakpoint
-        self.runCmd("-break-disable 2")
-        self.expect("\^done")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"n\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"ns::foo1\(\)\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",times=\"0\",original-location=\"ns::foo1\"}")
-
-        # disable the 3rd breakpoint and re-enable
-        self.runCmd("-break-disable 3")
-        self.expect("\^done")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"n\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"ns::foo2\(\)\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",times=\"0\",original-location=\"ns::foo2\"}")
-
-        self.runCmd("-break-enable 3")
-        self.expect("\^done")
-        self.expect(
-            "=breakpoint-modified,bkpt={number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"(?!0xffffffffffffffff)0x[0-9a-f]+\",func=\"ns::foo2\(\)\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\",times=\"0\",original-location=\"ns::foo2\"}")
-
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect(
-            "\*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"3\"")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/main.cpp
deleted file mode 100644
index d81365f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/breakpoint/main.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdio>
-
-namespace ns
-{
-    int foo1(void) { printf("In foo1\n"); return 1; }
-    int foo2(void) { printf("In foo2\n"); return 2; }
-}
-
-int x;
-int main(int argc, char const *argv[]) { // BP_main_decl
-    printf("Print a formatted string so that GCC does not optimize this printf call: %s\n", argv[0]);
-  // This is a long comment with no code inside
-  // This is a long comment with no code inside
-  // This is a long comment with no code inside
-  // BP_in_main
-  // This is a long comment with no code inside
-  // This is a long comment with no code inside
-  // This is a long comment with no code inside
-    x = ns::foo1() + ns::foo2();
-    return 0; // BP_return
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py
deleted file mode 100644
index 00c52db..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/TestMiExec.py
+++ /dev/null
@@ -1,141 +0,0 @@
-"""
-Test lldb-mi -exec-xxx commands.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiExecTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    def test_lldbmi_exec_abort(self):
-        """Test that 'lldb-mi --interpreter' works for -exec-abort."""
-
-        self.spawnLldbMi(args=None)
-
-        # Test that -exec-abort fails on invalid process
-        self.runCmd("-exec-abort")
-        self.expect(
-            "\^error,msg=\"Command 'exec-abort'\. Invalid process during debug session\"")
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Set arguments
-        self.runCmd("-exec-arguments arg1")
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that arguments were passed
-        self.runCmd("-data-evaluate-expression argc")
-        self.expect("\^done,value=\"2\"")
-
-        # Test that program may be aborted
-        self.runCmd("-exec-abort")
-        self.expect("\^done")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-        # Test that program can be run again
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that arguments were passed again
-        self.runCmd("-data-evaluate-expression argc")
-        self.expect("\^done,value=\"2\"")
-
-        # Test that program may be aborted again
-        self.runCmd("-exec-abort")
-        self.expect("\^done")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    def test_lldbmi_exec_arguments_set(self):
-        """Test that 'lldb-mi --interpreter' can pass args using -exec-arguments."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Set arguments
-        self.runCmd(
-            "-exec-arguments --arg1 \"2nd arg\" third_arg fourth=\"4th arg\"")
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Check argc and argv to see if arg passed
-        # Note that exactly=True is needed to avoid extra escaping for re
-        self.runCmd("-data-evaluate-expression argc")
-        self.expect("\^done,value=\"5\"")
-        #self.runCmd("-data-evaluate-expression argv[1]")
-        # self.expect("\^done,value=\"--arg1\"")
-        self.runCmd("-interpreter-exec command \"print argv[1]\"")
-        self.expect("\\\"--arg1\\\"", exactly=True)
-        #self.runCmd("-data-evaluate-expression argv[2]")
-        #self.expect("\^done,value=\"2nd arg\"")
-        self.runCmd("-interpreter-exec command \"print argv[2]\"")
-        self.expect("\\\"2nd arg\\\"", exactly=True)
-        #self.runCmd("-data-evaluate-expression argv[3]")
-        # self.expect("\^done,value=\"third_arg\"")
-        self.runCmd("-interpreter-exec command \"print argv[3]\"")
-        self.expect("\\\"third_arg\\\"", exactly=True)
-        #self.runCmd("-data-evaluate-expression argv[4]")
-        #self.expect("\^done,value=\"fourth=\\\\\\\"4th arg\\\\\\\"\"")
-        self.runCmd("-interpreter-exec command \"print argv[4]\"")
-        self.expect("\\\"fourth=\\\\\\\"4th arg\\\\\\\"\\\"", exactly=True)
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    def test_lldbmi_exec_arguments_reset(self):
-        """Test that 'lldb-mi --interpreter' can reset previously set args using -exec-arguments."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Set arguments
-        self.runCmd("-exec-arguments arg1")
-        self.expect("\^done")
-        self.runCmd("-exec-arguments")
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Check argc to see if arg passed
-        self.runCmd("-data-evaluate-expression argc")
-        self.expect("\^done,value=\"1\"")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/main.cpp
deleted file mode 100644
index 03f5b85..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/control/main.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdio>
-
-void
-g_MyFunction(void)
-{
-    printf("g_MyFunction");
-}
-
-static void
-s_MyFunction(void)
-{
-    g_MyFunction();
-    printf("s_MyFunction");
-}
-
-int
-main(int argc, char const *argv[])
-{
-    printf("start");
-    g_MyFunction();
-    s_MyFunction();
-    printf("exit");
-    return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py
deleted file mode 100644
index e138851..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/TestMiData.py
+++ /dev/null
@@ -1,365 +0,0 @@
-"""
-Test lldb-mi -data-xxx commands.
-"""
-
-from __future__ import print_function
-
-
-import unittest2
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiDataTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfDarwin   # pexpect is known to be unreliable on Darwin
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    def test_lldbmi_data_disassemble(self):
-        """Test that 'lldb-mi --interpreter' works for -data-disassemble."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Get an address for disassembling: use main
-        self.runCmd("-data-evaluate-expression main")
-        self.expect(
-            "\^done,value=\"0x[0-9a-f]+ \(a.out`main at main.cpp:[0-9]+\)\"")
-        addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
-
-        # Test -data-disassemble: try to disassemble some address
-        self.runCmd(
-            "-data-disassemble -s %#x -e %#x -- 0" %
-            (addr, addr + 0x10))
-        self.expect(
-            "\^done,asm_insns=\[{address=\"0x0*%x\",func-name=\"main\",offset=\"0\",size=\"[1-9]+\",inst=\".+?\"}," %
-            addr)
-
-        # Test -data-disassemble without "--"
-        self.runCmd("-data-disassemble -s %#x -e %#x 0" % (addr, addr + 0x10))
-        self.expect(
-            "\^done,asm_insns=\[{address=\"0x0*%x\",func-name=\"main\",offset=\"0\",size=\"[1-9]+\",inst=\".+?\"}," %
-            addr)
-
-        # Test -data-disassemble with source line information
-        self.runCmd("-data-disassemble -s %#x -e %#x -- 1" % (addr, addr + 0x10))
-        self.expect(
-            '\^done,asm_insns=\[src_and_asm_line={line="\d+",file="main.cpp",'
-            'line_asm_insn=\[{address="0x0*%x",func-name="main",offset="0",size="[1-9]+",inst=".+?"}\],'
-            'fullname="%s"}' %
-            (addr, os.path.abspath("main.cpp")) )
-
-        # Run to hello_world
-        self.runCmd("-break-insert -f hello_world")
-        self.expect("\^done,bkpt={number=\"2\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Get an address for disassembling: use hello_world
-        self.runCmd("-data-evaluate-expression hello_world")
-        self.expect(
-            "\^done,value=\"0x[0-9a-f]+ \(a.out`hello_world\(\) at main.cpp:[0-9]+\)\"")
-        addr = int(self.child.after.split("\"")[1].split(" ")[0], 16)
-
-        # Test -data-disassemble: try to disassemble some address
-        self.runCmd(
-            "-data-disassemble -s %#x -e %#x -- 0" %
-            (addr, addr + 0x10))
-
-        # This matches a line similar to:
-        # Darwin: {address="0x0000000100000f18",func-name="hello_world()",offset="8",size="7",inst="leaq 0x65(%rip), %rdi; \"Hello, World!\\n\""},
-        # Linux:  {address="0x0000000000400642",func-name="hello_world()",offset="18",size="5",inst="callq 0x4004d0; symbol stub for: printf"}
-        # To match the escaped characters in the ouptut, we must use four backslashes per matches backslash
-        # See https://docs.python.org/2/howto/regex.html#the-backslash-plague
-
-        # The MIPS and PPC64le disassemblers never print stub name
-        if self.isMIPS() or self.isPPC64le():
-            self.expect(["{address=\"0x[0-9a-f]+\",func-name=\"hello_world\(\)\",offset=\"[0-9]+\",size=\"[0-9]+\",inst=\".+?; \\\\\"Hello, World!\\\\\\\\n\\\\\"\"}",
-                     "{address=\"0x[0-9a-f]+\",func-name=\"hello_world\(\)\",offset=\"[0-9]+\",size=\"[0-9]+\",inst=\".+?\"}"])
-        else:
-            self.expect(["{address=\"0x[0-9a-f]+\",func-name=\"hello_world\(\)\",offset=\"[0-9]+\",size=\"[0-9]+\",inst=\".+?; \\\\\"Hello, World!\\\\\\\\n\\\\\"\"}",
-                     "{address=\"0x[0-9a-f]+\",func-name=\"hello_world\(\)\",offset=\"[0-9]+\",size=\"[0-9]+\",inst=\".+?; symbol stub for: printf\"}"])
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfDarwin   # pexpect is known to be unreliable on Darwin
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    def test_lldbmi_data_read_memory_bytes_global(self):
-        """Test that -data-read-memory-bytes can access global buffers."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Get address of char[] (global)
-        self.runCmd("-data-evaluate-expression &g_CharArray")
-        self.expect("\^done,value=\"0x[0-9a-f]+\"")
-        addr = int(self.child.after.split("\"")[1], 16)
-        size = 5
-
-        # Test that -data-read-memory-bytes works for char[] type (global)
-        self.runCmd("-data-read-memory-bytes %#x %d" % (addr, size))
-        self.expect(
-            "\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"1011121300\"}\]" %
-            (addr, addr + size))
-
-        # Get address of static char[]
-        self.runCmd("-data-evaluate-expression &s_CharArray")
-        self.expect("\^done,value=\"0x[0-9a-f]+\"")
-        addr = int(self.child.after.split("\"")[1], 16)
-        size = 5
-
-        # Test that -data-read-memory-bytes works for static char[] type
-        self.runCmd("-data-read-memory-bytes %#x %d" % (addr, size))
-        self.expect(
-            "\^done,memory=\[{begin=\"0x0*%x\",offset=\"0x0+\",end=\"0x0*%x\",contents=\"2021222300\"}\]" %
-            (addr, addr + size))
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfDarwin   # pexpect is known to be unreliable on Darwin
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    def test_lldbmi_data_read_memory_bytes_local(self):
-        """Test that -data-read-memory-bytes can access local buffers."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd('-file-exec-and-symbols %s' % self.myexe)
-        self.expect(r'\^done')
-
-        # Run to BP_local_array_test_inner
-        line = line_number('main.cpp', '// BP_local_array_test_inner')
-        self.runCmd('-break-insert main.cpp:%d' % line)
-        self.expect(r'\^done,bkpt=\{number="1"')
-        self.runCmd('-exec-run')
-        self.expect(r'\^running')
-        self.expect(r'\*stopped,reason="breakpoint-hit"')
-
-        # Get address of local char[]
-        self.runCmd('-data-evaluate-expression "(void *)&array"')
-        self.expect(r'\^done,value="0x[0-9a-f]+"')
-        addr = int(self.child.after.split('"')[1], 16)
-        size = 4
-
-        # Test that an unquoted hex literal address works
-        self.runCmd('-data-read-memory-bytes %#x %d' % (addr, size))
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="01020304"\}\]' %
-            (addr, addr + size))
-
-        # Test that a double-quoted hex literal address works
-        self.runCmd('-data-read-memory-bytes "%#x" %d' % (addr, size))
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="01020304"\}\]' %
-            (addr, addr + size))
-
-        # Test that unquoted expressions work
-        self.runCmd('-data-read-memory-bytes &array %d' % size)
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="01020304"\}\]' %
-            (addr, addr + size))
-
-        # This doesn't work, and perhaps that makes sense, but it does work on
-        # GDB
-        self.runCmd('-data-read-memory-bytes array 4')
-        self.expect(r'\^error')
-        #self.expect(r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="01020304"\}\]' % (addr, addr + size))
-
-        self.runCmd('-data-read-memory-bytes &array[2] 2')
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="0304"\}\]' %
-            (addr + 2, addr + size))
-
-        self.runCmd('-data-read-memory-bytes first_element_ptr %d' % size)
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="01020304"\}\]' %
-            (addr, addr + size))
-
-        # Test that double-quoted expressions work
-        self.runCmd('-data-read-memory-bytes "&array" %d' % size)
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="01020304"\}\]' %
-            (addr, addr + size))
-
-        self.runCmd('-data-read-memory-bytes "&array[0] + 1" 3')
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="020304"\}\]' %
-            (addr + 1, addr + size))
-
-        self.runCmd('-data-read-memory-bytes "first_element_ptr + 1" 3')
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="020304"\}\]' %
-            (addr + 1, addr + size))
-
-        # Test the -o (offset) option
-        self.runCmd('-data-read-memory-bytes -o 1 &array 3')
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="020304"\}\]' %
-            (addr + 1, addr + size))
-
-        # Test the --thread option
-        self.runCmd('-data-read-memory-bytes --thread 1 &array 4')
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="01020304"\}\]' %
-            (addr, addr + size))
-
-        # Test the --thread option with an invalid value
-        self.runCmd('-data-read-memory-bytes --thread 999 &array 4')
-        self.expect(r'\^error')
-
-        # Test the --frame option (current frame)
-        self.runCmd('-data-read-memory-bytes --frame 0 &array 4')
-        self.expect(
-            r'\^done,memory=\[\{begin="0x0*%x",offset="0x0+",end="0x0*%x",contents="01020304"\}\]' %
-            (addr, addr + size))
-
-        # Test the --frame option (outer frame)
-        self.runCmd('-data-read-memory-bytes --frame 1 &array 4')
-        self.expect(
-            r'\^done,memory=\[\{begin="0x[0-9a-f]+",offset="0x0+",end="0x[0-9a-f]+",contents="05060708"\}\]')
-
-        # Test the --frame option with an invalid value
-        self.runCmd('-data-read-memory-bytes --frame 999 &array 4')
-        self.expect(r'\^error')
-
-        # Test all the options at once
-        self.runCmd(
-            '-data-read-memory-bytes --thread 1 --frame 1 -o 2 &array 2')
-        self.expect(
-            r'\^done,memory=\[\{begin="0x[0-9a-f]+",offset="0x0+",end="0x[0-9a-f]+",contents="0708"\}\]')
-
-        # Test that an expression that references undeclared variables doesn't
-        # work
-        self.runCmd(
-            '-data-read-memory-bytes "&undeclared_array1 + undeclared_array2[1]" 2')
-        self.expect(r'\^error')
-
-        # Test that the address argument is required
-        self.runCmd('-data-read-memory-bytes')
-        self.expect(r'\^error')
-
-        # Test that the count argument is required
-        self.runCmd('-data-read-memory-bytes &array')
-        self.expect(r'\^error')
-
-        # Test that the address and count arguments are required when other
-        # options are present
-        self.runCmd('-data-read-memory-bytes --thread 1')
-        self.expect(r'\^error')
-
-        self.runCmd('-data-read-memory-bytes --thread 1 --frame 0')
-        self.expect(r'\^error')
-
-        # Test that the count argument is required when other options are
-        # present
-        self.runCmd('-data-read-memory-bytes --thread 1 &array')
-        self.expect(r'\^error')
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfDarwin   # pexpect is known to be unreliable on Darwin
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    def test_lldbmi_data_list_register_names(self):
-        """Test that 'lldb-mi --interpreter' works for -data-list-register-names."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -data-list-register-names: try to get all registers
-        self.runCmd("-data-list-register-names")
-        self.expect("\^done,register-names=\[\".+?\",")
-
-        # Test -data-list-register-names: try to get specified registers
-        self.runCmd("-data-list-register-names 0")
-        self.expect("\^done,register-names=\[\".+?\"\]")
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfDarwin   # pexpect is known to be unreliable on Darwin
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    def test_lldbmi_data_list_register_values(self):
-        """Test that 'lldb-mi --interpreter' works for -data-list-register-values."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -data-list-register-values: try to get all registers
-        self.runCmd("-data-list-register-values x")
-        self.expect(
-            "\^done,register-values=\[{number=\"0\",value=\"0x[0-9a-f]+\"")
-
-        # Test -data-list-register-values: try to get specified registers
-        self.runCmd("-data-list-register-values x 0")
-        self.expect(
-            "\^done,register-values=\[{number=\"0\",value=\"0x[0-9a-f]+\"}\]")
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfDarwin   # pexpect is known to be unreliable on Darwin
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    def test_lldbmi_data_evaluate_expression(self):
-        """Test that 'lldb-mi --interpreter' works for -data-evaluate-expression."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        line = line_number('main.cpp', '// BP_local_2d_array_test')
-        self.runCmd('-break-insert main.cpp:%d' % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Check 2d array
-        self.runCmd("-data-evaluate-expression array2d")
-        self.expect(
-            "\^done,value=\"\{\[0\] = \{\[0\] = 1, \[1\] = 2, \[2\] = 3\}, \[1\] = \{\[0\] = 4, \[1\] = 5, \[2\] = 6\}\}\"")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp
deleted file mode 100644
index 5cac8fc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/data/main.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-const char g_CharArray[] = "\x10\x11\x12\x13";
-static const char s_CharArray[] = "\x20\x21\x22\x23";
-
-void
-local_array_test_inner()
-{
-    char array[] = { 0x01, 0x02, 0x03, 0x04 };
-    char *first_element_ptr = &array[0];
-    char g = g_CharArray[0];
-    char s = s_CharArray[0];
-    // BP_local_array_test_inner
-    return;
-}
-
-void
-local_array_test()
-{
-    char array[] = { 0x05, 0x06, 0x07, 0x08 };
-    // BP_local_array_test
-    local_array_test_inner();
-    return;
-}
-
-void
-local_2d_array_test()
-{
-    int array2d[2][3];
-    array2d[0][0] = 1;
-    array2d[0][1] = 2;
-    array2d[0][2] = 3;
-    array2d[1][0] = 4;
-    array2d[1][1] = 5;
-    array2d[1][2] = 6;
-    return; // BP_local_2d_array_test
-}
-
-void
-hello_world()
-{
-    printf("Hello, World!\n"); // BP_hello_world
-}
-
-int
-main(int argc, char const *argv[])
-{ // FUNC_main
-    local_array_test();
-    hello_world();
-    local_2d_array_test();
-    return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiCliSupport.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiCliSupport.py
deleted file mode 100644
index 21c08ab..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiCliSupport.py
+++ /dev/null
@@ -1,240 +0,0 @@
-"""
-Test lldb-mi can interpret CLI commands directly.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiCliSupportTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_target_create(self):
-        """Test that 'lldb-mi --interpreter' can create target by 'target create' command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Test that "target create" loads executable
-        self.runCmd("target create \"%s\"" % self.myexe)
-        self.expect("\^done")
-
-        # Test that executable was loaded properly
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows.
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races.
-    def test_lldbmi_target_list(self):
-        """Test that 'lldb-mi --interpreter' can list targets by 'target list' command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Test that initially there are no targets.
-        self.runCmd("target list")
-        self.expect(r"~\"No targets.\\n\"")
-        self.expect("\^done")
-
-        # Add target.
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-
-        # Test that "target list" lists added target.
-        self.runCmd("target list")
-        self.expect(r"~\"Current targets:\\n\* target #0: %s" % self.myexe)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_breakpoint_set(self):
-        """Test that 'lldb-mi --interpreter' can set breakpoint by 'breakpoint set' command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Test that "breakpoint set" sets a breakpoint
-        self.runCmd("breakpoint set --name main")
-        self.expect("\^done")
-        self.expect("=breakpoint-created,bkpt={number=\"1\"")
-
-        # Test that breakpoint was set properly
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("=breakpoint-modified,bkpt={number=\"1\"")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_settings_set_target_run_args_before(self):
-        """Test that 'lldb-mi --interpreter' can set target arguments by 'setting set target.run-args' command before than target was created."""
-
-        self.spawnLldbMi(args=None)
-
-        # Test that "settings set target.run-args" passes arguments to executable
-        # FIXME: --arg1 causes an error
-        self.runCmd(
-            "setting set target.run-args arg1 \"2nd arg\" third_arg fourth=\"4th arg\"")
-        self.expect("\^done")
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-
-        # Test that arguments were passed properly
-        self.expect("@\"argc=5\\\\r\\\\n\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_settings_set_target_run_args_after(self):
-        """Test that 'lldb-mi --interpreter' can set target arguments by 'setting set target.run-args' command after than target was created."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Test that "settings set target.run-args" passes arguments to executable
-        # FIXME: --arg1 causes an error
-        self.runCmd(
-            "setting set target.run-args arg1 \"2nd arg\" third_arg fourth=\"4th arg\"")
-        self.expect("\^done")
-
-        # Run
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-
-        # Test that arguments were passed properly
-        self.expect("@\"argc=5\\\\r\\\\n\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_process_launch(self):
-        """Test that 'lldb-mi --interpreter' can launch process by "process launch" command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Set breakpoint
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        # Test that "process launch" launches executable
-        self.runCmd("process launch")
-        self.expect("\^done")
-
-        # Test that breakpoint hit
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_thread_step_in(self):
-        """Test that 'lldb-mi --interpreter' can step in by "thread step-in" command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that "thread step-in" steps into (or not) printf depending on debug info
-        # Note that message is different in Darwin and Linux:
-        # Darwin: "*stopped,reason=\"end-stepping-range\",frame={addr=\"0x[0-9a-f]+\",func=\"main\",args=[{name=\"argc\",value=\"1\"},{name=\"argv\",value="0x[0-9a-f]+\"}],file=\"main.cpp\",fullname=\".+main.cpp\",line=\"\d\"},thread-id=\"1\",stopped-threads=\"all\"
-        # Linux:
-        # "*stopped,reason=\"end-stepping-range\",frame={addr="0x[0-9a-f]+\",func=\"__printf\",args=[{name=\"format\",value=\"0x[0-9a-f]+\"}],file=\"printf.c\",fullname=\".+printf.c\",line="\d+"},thread-id=\"1\",stopped-threads=\"all\"
-        self.runCmd("thread step-in")
-        self.expect("\^done")
-        it = self.expect(["@\"argc=1\\\\r\\\\n\"",
-                          "\*stopped,reason=\"end-stepping-range\".+?func=\"(?!main).+?\""])
-        if it == 0:
-            self.expect(
-                "\*stopped,reason=\"end-stepping-range\".+?func=\"main\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_thread_step_over(self):
-        """Test that 'lldb-mi --interpreter' can step over by "thread step-over" command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that "thread step-over" steps over
-        self.runCmd("thread step-over")
-        self.expect("\^done")
-        self.expect("@\"argc=1\\\\r\\\\n\"")
-        self.expect("\*stopped,reason=\"end-stepping-range\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_thread_continue(self):
-        """Test that 'lldb-mi --interpreter' can continue execution by "thread continue" command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that "thread continue" continues execution
-        self.runCmd("thread continue")
-        self.expect("\^done")
-        self.expect("@\"argc=1\\\\r\\\\n")
-        self.expect("\*stopped,reason=\"exited-normally\"")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
deleted file mode 100644
index 67dbf91..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/TestMiInterpreterExec.py
+++ /dev/null
@@ -1,227 +0,0 @@
-"""
-Test lldb-mi -interpreter-exec command.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiInterpreterExecTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_target_create(self):
-        """Test that 'lldb-mi --interpreter' can create target by 'target create' command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Test that "target create" loads executable
-        self.runCmd(
-            "-interpreter-exec console \"target create \\\"%s\\\"\"" %
-            self.myexe)
-        self.expect("\^done")
-
-        # Test that executable was loaded properly
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows.
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races.
-    @skipIfDarwin
-    def test_lldbmi_target_list(self):
-        """Test that 'lldb-mi --interpreter' can list targets by 'target list' command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Test that initially there are no targets.
-        self.runCmd("-interpreter-exec console \"target list\"")
-        self.expect(r"~\"No targets.\\n\"")
-
-        # Add target.
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-
-        # Test that "target list" lists added target.
-        self.runCmd("-interpreter-exec console \"target list\"")
-        self.expect(r"~\"Current targets:\\n\* target #0: %s" % self.myexe)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_breakpoint_set(self):
-        """Test that 'lldb-mi --interpreter' can set breakpoint by 'breakpoint set' command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Test that "breakpoint set" sets a breakpoint
-        self.runCmd("-interpreter-exec console \"breakpoint set --name main\"")
-        self.expect("\^done")
-        self.expect("=breakpoint-created,bkpt={number=\"1\"")
-
-        # Test that breakpoint was set properly
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("=breakpoint-modified,bkpt={number=\"1\"")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    @skipIfLinux
-    def test_lldbmi_settings_set_target_run_args_before(self):
-        """Test that 'lldb-mi --interpreter' can set target arguments by 'setting set target.run-args' command before than target was created."""
-
-        self.spawnLldbMi(args=None)
-
-        # Test that "settings set target.run-args" passes arguments to executable
-        # FIXME: --arg1 causes an error
-        self.runCmd(
-            "-interpreter-exec console \"setting set target.run-args arg1 \\\"2nd arg\\\" third_arg fourth=\\\"4th arg\\\"\"")
-        self.expect("\^done")
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-
-        # Test that arguments were passed properly
-        self.expect("@\"argc=5\\\\r\\\\n\"")
-        self.expect("@\"argv.0.=.*lldb-mi")
-        self.expect("@\"argv.1.=arg1\\\\r\\\\n\"")
-        self.expect("@\"argv.2.=2nd arg\\\\r\\\\n\"")
-        self.expect("@\"argv.3.=third_arg\\\\r\\\\n\"")
-        self.expect("@\"argv.4.=fourth=4th arg\\\\r\\\\n\"")
-
-        # Test that program exited normally
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_process_launch(self):
-        """Test that 'lldb-mi --interpreter' can launch process by "process launch" command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Set breakpoint
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        # Test that "process launch" launches executable
-        self.runCmd("-interpreter-exec console \"process launch\"")
-        self.expect("\^done")
-
-        # Test that breakpoint hit
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_thread_step_in(self):
-        """Test that 'lldb-mi --interpreter' can step in by "thread step-in" command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that "thread step-in" steps into (or not) printf depending on debug info
-        # Note that message is different in Darwin and Linux:
-        # Darwin: "*stopped,reason=\"end-stepping-range\",frame={addr=\"0x[0-9a-f]+\",func=\"main\",args=[{name=\"argc\",value=\"1\"},{name=\"argv\",value="0x[0-9a-f]+\"}],file=\"main.cpp\",fullname=\".+main.cpp\",line=\"\d\"},thread-id=\"1\",stopped-threads=\"all\"
-        # Linux:
-        # "*stopped,reason=\"end-stepping-range\",frame={addr="0x[0-9a-f]+\",func=\"__printf\",args=[{name=\"format\",value=\"0x[0-9a-f]+\"}],file=\"printf.c\",fullname=\".+printf.c\",line="\d+"},thread-id=\"1\",stopped-threads=\"all\"
-        self.runCmd("-interpreter-exec console \"thread step-in\"")
-        self.expect("\^done")
-        it = self.expect(["@\"argc=1\\\\r\\\\n\"",
-                          "\*stopped,reason=\"end-stepping-range\".+?func=\"(?!main).+?\""])
-        if it == 0:
-            self.expect(
-                "\*stopped,reason=\"end-stepping-range\".+?func=\"main\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_thread_step_over(self):
-        """Test that 'lldb-mi --interpreter' can step over by "thread step-over" command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that "thread step-over" steps over
-        self.runCmd("-interpreter-exec console \"thread step-over\"")
-        self.expect("\^done")
-        self.expect("@\"argc=1\\\\r\\\\n\"")
-        self.expect("\*stopped,reason=\"end-stepping-range\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @expectedFlakeyLinux("llvm.org/pr25470")
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_thread_continue(self):
-        """Test that 'lldb-mi --interpreter' can continue execution by "thread continue" command."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that "thread continue" continues execution
-        self.runCmd("-interpreter-exec console \"thread continue\"")
-        self.expect("\^done")
-        self.expect("@\"argc=1\\\\r\\\\n")
-        self.expect("\*stopped,reason=\"exited-normally\"")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/main.cpp
deleted file mode 100644
index 131b5d5..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/interpreter/main.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdio>
-
-int
-main(int argc, char const *argv[])
-{
-    printf("argc=%d\n", argc);  // BP_printf
-    for (int i = 0; i < argc; ++i)
-        printf("argv[%d]=%s\n", i, argv[i]);
-    return 0;   // BP_return
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lexical_scope/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lexical_scope/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lexical_scope/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lexical_scope/TestMiLexicalScope.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lexical_scope/TestMiLexicalScope.py
deleted file mode 100644
index a4186fd..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lexical_scope/TestMiLexicalScope.py
+++ /dev/null
@@ -1,68 +0,0 @@
-"""
-Test lldb-mi -stack-list-locals -stack-list-variables and -var-create commands
-for variables with the same name in sibling lexical scopes.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiLexicalScopeTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_var_create_in_sibling_scope(self):
-        """Test that 'lldb-mi --interpreter' works with sibling lexical scopes."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Breakpoint inside first scope
-        line = line_number('main.cpp', '// BP_first')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"\d+\"")
-
-        # Breakpoint inside second scope
-        line = line_number('main.cpp', '// BP_second')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"\d+\"")
-
-        # Run to the first scope
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Check that only variables a and b exist with expected values
-        self.runCmd("-stack-list-locals --thread 1 --frame 0 --all-values")
-        self.expect("\^done,locals=\[{name=\"a\",value=\"1\"},{name=\"b\",value=\"2\"}\]")
-
-        # Create variable object for local variable b
-        self.runCmd("-var-create - * \"b\"")
-        self.expect(
-            "\^done,name=\"var\d+\",numchild=\"0\",value=\"2\",type=\"int\",thread-id=\"1\",has_more=\"0\"")
-
-        # Run to the second scope
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Check that only variables a and b exist with expected values,
-        # but variable b is different from previous breakpoint
-        self.runCmd("-stack-list-variables --thread 1 --frame 0 --all-values")
-        self.expect("\^done,variables=\[{name=\"a\",value=\"1\"},{name=\"b\",value=\"3\"}\]")
-
-        # Create variable object for local variable b
-        self.runCmd("-var-create - * \"b\"")
-        self.expect(
-            "\^done,name=\"var\d+\",numchild=\"0\",value=\"3\",type=\"short\",thread-id=\"1\",has_more=\"0\"")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lexical_scope/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lexical_scope/main.cpp
deleted file mode 100644
index facaa91..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lexical_scope/main.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-void
-some_func (void)
-{
-}
-
-void test_sibling_scope (void)
-{
-  int a = 1;
-  {
-    int b = 2;
-    some_func(); // BP_first
-  }
-  {
-    short b = 3;
-    some_func(); // BP_second
-  }
-}
-
-int
-main (int argc, char **argv)
-{
-  test_sibling_scope();
-  return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py
deleted file mode 100644
index 45af457..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/lldbmi_testcase.py
+++ /dev/null
@@ -1,72 +0,0 @@
-"""
-Base class for lldb-mi test cases.
-"""
-
-from __future__ import print_function
-
-
-from lldbsuite.test.lldbtest import *
-
-
-class MiTestCaseBase(Base):
-
-    mydir = None
-    myexe = None
-    mylog = None
-    NO_DEBUG_INFO_TESTCASE = True
-
-    @classmethod
-    def classCleanup(cls):
-        if cls.myexe:
-            TestBase.RemoveTempFile(cls.myexe)
-        if cls.mylog:
-            TestBase.RemoveTempFile(cls.mylog)
-
-    def setUp(self):
-        if not self.mydir:
-            raise("mydir is empty")
-
-        Base.setUp(self)
-        self.buildDefault()
-        self.child_prompt = "(gdb)"
-        self.myexe = self.getBuildArtifact("a.out")
-
-    def tearDown(self):
-        if self.TraceOn():
-            print("\n\nContents of %s:" % self.mylog)
-            try:
-                print(open(self.mylog, "r").read())
-            except IOError:
-                pass
-        Base.tearDown(self)
-
-    def spawnLldbMi(self, exe=None, args=None, preconfig=True):
-        import pexpect
-        import sys
-        if sys.version_info.major == 3:
-          self.child = pexpect.spawnu("%s --interpreter %s" % (
-              self.lldbMiExec, args if args else ""), cwd=self.getBuildDir())
-        else:
-          self.child = pexpect.spawn("%s --interpreter %s" % (
-              self.lldbMiExec, args if args else ""), cwd=self.getBuildDir())
-        self.child.setecho(True)
-        self.mylog = self.getBuildArtifact("child.log")
-        self.child.logfile_read = open(self.mylog, "w")
-        # wait until lldb-mi has started up and is ready to go
-        self.expect(self.child_prompt, exactly=True)
-        if preconfig:
-            self.runCmd("settings set symbols.enable-external-lookup false")
-            self.expect("\^done")
-            self.expect(self.child_prompt, exactly=True)
-        if exe:
-            self.runCmd("-file-exec-and-symbols \"%s\"" % exe)
-            # Testcases expect to be able to match output of this command,
-            # see test_lldbmi_specialchars.
-
-    def runCmd(self, cmd):
-        self.child.sendline(cmd)
-
-    def expect(self, pattern, exactly=False, *args, **kwargs):
-        if exactly:
-            return self.child.expect_exact(pattern, *args, **kwargs)
-        return self.child.expect(pattern, *args, **kwargs)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
deleted file mode 100644
index 10cd97e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/main.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdio>
-
-#ifdef _WIN32
-    #include <direct.h>
-    #define getcwd _getcwd // suppress "deprecation" warning
-#else
-    #include <unistd.h>
-#endif
-
-int
-main(int argc, char const *argv[])
-{
-    int a = 10;
-
-    char buf[512];
-    char *ans = getcwd(buf, sizeof(buf));
-    if (ans) {
-        printf("cwd: %s\n", ans);
-    }
-
-    printf("argc=%d\n", argc); // BP_printf
-
-    return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py
deleted file mode 100644
index 303a9f6..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/TestMiSignal.py
+++ /dev/null
@@ -1,236 +0,0 @@
-"""
-Test that the lldb-mi handles signals properly.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiSignalTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Fails on FreeBSD apparently due to thread race conditions
-    @expectedFailureNetBSD
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfLinux
-    def test_lldbmi_stopped_when_interrupt(self):
-        """Test that 'lldb-mi --interpreter' interrupt and resume a looping app."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Set doloop=1 and run (to loop forever)
-        self.runCmd("-data-evaluate-expression \"do_loop=1\"")
-        self.expect("\^done,value=\"1\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-
-        # Test that -exec-interrupt can interrupt an execution
-        self.runCmd("-exec-interrupt")
-        self.expect(
-            "\*stopped,reason=\"signal-received\",signal-name=\"SIGINT\",signal-meaning=\"Interrupt\",.+?thread-id=\"1\",stopped-threads=\"all\"")
-
-        # Continue (to loop forever)
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-
-        # There's a chance that lldb didn't resume the process, we send an interruput but
-        # the process is not running yet. Give it some time to restart. 5 seconds ought to
-        # be enough for every modern CPU out there.
-        import time
-        time.sleep(5)
-
-        # Test that Ctrl+C can interrupt an execution
-        self.child.sendintr()  # FIXME: here uses self.child directly
-        self.expect(
-            "\*stopped,reason=\"signal-received\",signal-name=\"SIGINT\",signal-meaning=\"Interrupt\",.*thread-id=\"1\",stopped-threads=\"all\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Fails on FreeBSD apparently due to thread race conditions
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @expectedFailureNetBSD
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stopped_when_stopatentry_local(self):
-        """Test that 'lldb-mi --interpreter' notifies after it was stopped on entry (local)."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run with stop-at-entry flag
-        self.runCmd("-interpreter-exec command \"process launch -s\"")
-        self.expect("\^done")
-
-        # Test that *stopped is printed
-        # Note that message is different in Darwin and Linux:
-        # Darwin: "*stopped,reason=\"signal-received\",signal-name=\"SIGSTOP\",signal-meaning=\"Stop\",frame={level=\"0\",addr=\"0x[0-9a-f]+\",func=\"_dyld_start\",file=\"??\",fullname=\"??\",line=\"-1\"},thread-id=\"1\",stopped-threads=\"all\"
-        # Linux:
-        # "*stopped,reason=\"end-stepping-range\",frame={addr=\"0x[0-9a-f]+\",func=\"??\",args=[],file=\"??\",fullname=\"??\",line=\"-1\"},thread-id=\"1\",stopped-threads=\"all\"
-        self.expect(
-            [
-                "\*stopped,reason=\"signal-received\",signal-name=\"SIGSTOP\",signal-meaning=\"Stop\",frame=\{level=\"0\",addr=\"0x[0-9a-f]+\",func=\"_dyld_start\",file=\"\?\?\",fullname=\"\?\?\",line=\"-1\"\},thread-id=\"1\",stopped-threads=\"all\"",
-                "\*stopped,reason=\"end-stepping-range\",frame={addr=\"0x[0-9a-f]+\",func=\"\?\?\",args=\[\],file=\"\?\?\",fullname=\"\?\?\",line=\"-1\"},thread-id=\"1\",stopped-threads=\"all\""])
-
-        # Run to main to make sure we have not exited the application
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfDarwin   # pexpect is known to be unreliable on Darwin
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stopped_when_stopatentry_remote(self):
-        """Test that 'lldb-mi --interpreter' notifies after it was stopped on entry (remote)."""
-
-        # Prepare debugserver
-        import lldbgdbserverutils
-        debugserver_exe = lldbgdbserverutils.get_debugserver_exe()
-        if not debugserver_exe:
-            self.skipTest("debugserver exe not found")
-        hostname = "localhost"
-        import random
-        # the same as GdbRemoteTestCaseBase.get_next_port
-        port = 12000 + random.randint(0, 3999)
-        import pexpect
-        debugserver_child = pexpect.spawn(
-            "%s %s:%d" %
-            (debugserver_exe, hostname, port))
-        self.addTearDownHook(lambda: debugserver_child.terminate(force=True))
-
-        self.spawnLldbMi(args=None)
-
-        # Connect to debugserver
-        self.runCmd(
-            "-interpreter-exec command \"platform select remote-macosx --sysroot /\"")
-        self.expect("\^done")
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-        self.runCmd(
-            "-interpreter-exec command \"process connect connect://%s:%d\"" %
-            (hostname, port))
-        self.expect("\^done")
-
-        # Run with stop-at-entry flag
-        self.runCmd("-interpreter-exec command \"process launch -s\"")
-        self.expect("\^done")
-
-        # Test that *stopped is printed
-        self.expect(
-            "\*stopped,reason=\"signal-received\",signal-name=\"SIGSTOP\",signal-meaning=\"Stop\",.+?thread-id=\"1\",stopped-threads=\"all\"")
-
-        # Exit
-        self.runCmd("-gdb-exit")
-        self.expect("\^exit")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @expectedFailureNetBSD
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stopped_when_segfault_local(self):
-        """Test that 'lldb-mi --interpreter' notifies after it was stopped when segfault occurred (local)."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Set do_segfault=1 and run (to cause a segfault error)
-        self.runCmd("-data-evaluate-expression \"do_segfault=1\"")
-        self.expect("\^done,value=\"1\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-
-        # Test that *stopped is printed
-        # Note that message is different in Darwin and Linux:
-        # Darwin: "*stopped,reason=\"exception-received\",exception=\"EXC_BAD_ACCESS (code=1, address=0x0)\",thread-id=\"1\",stopped-threads=\"all\""
-        # Linux:  "*stopped,reason=\"exception-received\",exception=\"invalid
-        # address (fault address:
-        # 0x0)\",thread-id=\"1\",stopped-threads=\"all\""
-        self.expect(["\*stopped,reason=\"exception-received\",exception=\"EXC_BAD_ACCESS \(code=1, address=0x0\)\",thread-id=\"1\",stopped-threads=\"all\"",
-                     "\*stopped,reason=\"exception-received\",exception=\"invalid address \(fault address: 0x0\)\",thread-id=\"1\",stopped-threads=\"all\""])
-
-    @skipUnlessDarwin
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stopped_when_segfault_remote(self):
-        """Test that 'lldb-mi --interpreter' notifies after it was stopped when segfault occurred (remote)."""
-
-        # Prepare debugserver
-        import lldbgdbserverutils
-        debugserver_exe = lldbgdbserverutils.get_debugserver_exe()
-        if not debugserver_exe:
-            self.skipTest("debugserver exe not found")
-        hostname = "localhost"
-        import random
-        # the same as GdbRemoteTestCaseBase.get_next_port
-        port = 12000 + random.randint(0, 3999)
-        import pexpect
-        debugserver_child = pexpect.spawn(
-            "%s %s:%d" %
-            (debugserver_exe, hostname, port))
-        self.addTearDownHook(lambda: debugserver_child.terminate(force=True))
-
-        self.spawnLldbMi(args=None)
-
-        # Connect to debugserver
-        self.runCmd(
-            "-interpreter-exec command \"platform select remote-macosx --sysroot /\"")
-        self.expect("\^done")
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-        self.runCmd(
-            "-interpreter-exec command \"process connect connect://%s:%d\"" %
-            (hostname, port))
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        # FIXME -exec-run doesn't work
-        # FIXME: self.runCmd("-exec-run")
-        self.runCmd("-interpreter-exec command \"process launch\"")
-        self.expect("\^done")  # FIXME: self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Set do_segfault=1 and run (to cause a segfault error)
-        self.runCmd("-data-evaluate-expression \"do_segfault=1\"")
-        self.expect("\^done,value=\"1\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-
-        # Test that *stopped is printed
-        self.expect(
-            "\*stopped,reason=\"exception-received\",exception=\"EXC_BAD_ACCESS \(code=1, address=0x0\)\",thread-id=\"1\",stopped-threads=\"all\"")
-
-        # Exit
-        self.runCmd("-gdb-exit")
-        self.expect("\^exit")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/main.cpp
deleted file mode 100644
index a0c5637..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/signal/main.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstddef>
-#include <unistd.h>
-
-int do_loop;
-int do_segfault;
-
-int
-main(int argc, char const *argv[])
-{
-    if (do_loop)
-    {
-        do
-            sleep(1);
-        while (do_loop); // BP_loop_condition
-    }
-
-    if (do_segfault)
-    {
-        int *null_ptr = NULL;
-        return *null_ptr;
-    }
-
-    return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/stack/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/stack/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/stack/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py
deleted file mode 100644
index c5c10bc..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/stack/TestMiStack.py
+++ /dev/null
@@ -1,558 +0,0 @@
-"""
-Test lldb-mi -stack-xxx commands.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiStackTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stack_list_arguments(self):
-        """Test that 'lldb-mi --interpreter' can shows arguments."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that -stack-list-arguments lists empty stack arguments if range
-        # is empty
-        self.runCmd("-stack-list-arguments 0 1 0")
-        self.expect("\^done,stack-args=\[\]")
-
-        # Test that -stack-list-arguments lists stack arguments without values
-        # (and that low-frame and high-frame are optional)
-        self.runCmd("-stack-list-arguments 0")
-        self.expect(
-            "\^done,stack-args=\[frame={level=\"0\",args=\[name=\"argc\",name=\"argv\"\]}")
-        self.runCmd("-stack-list-arguments --no-values")
-        self.expect(
-            "\^done,stack-args=\[frame={level=\"0\",args=\[name=\"argc\",name=\"argv\"\]}")
-
-        # Test that -stack-list-arguments lists stack arguments with all values
-        self.runCmd("-stack-list-arguments 1 0 0")
-        self.expect(
-            "\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}\]")
-        self.runCmd("-stack-list-arguments --all-values 0 0")
-        self.expect(
-            "\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\".*\"}\]}\]")
-
-        # Test that -stack-list-arguments lists stack arguments with simple
-        # values
-        self.runCmd("-stack-list-arguments 2 0 1")
-        self.expect(
-            "\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",type=\"int\",value=\"1\"},{name=\"argv\",type=\"const char \*\*\",value=\".*\"}\]}")
-        self.runCmd("-stack-list-arguments --simple-values 0 1")
-        self.expect(
-            "\^done,stack-args=\[frame={level=\"0\",args=\[{name=\"argc\",type=\"int\",value=\"1\"},{name=\"argv\",type=\"const char \*\*\",value=\".*\"}\]}")
-
-        # Test that an invalid low-frame is handled
-        # FIXME: -1 is treated as unsigned int
-        self.runCmd("-stack-list-arguments 0 -1 0")
-        # self.expect("\^error")
-        self.runCmd("-stack-list-arguments 0 0")
-        self.expect(
-            "\^error,msg=\"Command 'stack-list-arguments'\. Thread frame range invalid\"")
-
-        # Test that an invalid high-frame is handled
-        # FIXME: -1 is treated as unsigned int
-        self.runCmd("-stack-list-arguments 0 0 -1")
-        # self.expect("\^error")
-
-        # Test that a missing low-frame or high-frame is handled
-        self.runCmd("-stack-list-arguments 0 0")
-        self.expect(
-            "\^error,msg=\"Command 'stack-list-arguments'\. Thread frame range invalid\"")
-
-        # Test that an invalid low-frame is handled
-        self.runCmd("-stack-list-arguments 0 0")
-        self.expect(
-            "\^error,msg=\"Command 'stack-list-arguments'\. Thread frame range invalid\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stack_list_locals(self):
-        """Test that 'lldb-mi --interpreter' can shows local variables."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test int local variables:
-        # Run to BP_local_int_test
-        line = line_number('main.cpp', '// BP_local_int_test')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"2\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -stack-list-locals: use 0 or --no-values
-        self.runCmd("-stack-list-locals 0")
-        self.expect("\^done,locals=\[name=\"a\",name=\"b\"\]")
-        self.runCmd("-stack-list-locals --no-values")
-        self.expect("\^done,locals=\[name=\"a\",name=\"b\"\]")
-
-        # Test -stack-list-locals: use 1 or --all-values
-        self.runCmd("-stack-list-locals 1")
-        self.expect(
-            "\^done,locals=\[{name=\"a\",value=\"10\"},{name=\"b\",value=\"20\"}\]")
-        self.runCmd("-stack-list-locals --all-values")
-        self.expect(
-            "\^done,locals=\[{name=\"a\",value=\"10\"},{name=\"b\",value=\"20\"}\]")
-
-        # Test -stack-list-locals: use 2 or --simple-values
-        self.runCmd("-stack-list-locals 2")
-        self.expect(
-            "\^done,locals=\[{name=\"a\",type=\"int\",value=\"10\"},{name=\"b\",type=\"int\",value=\"20\"}\]")
-        self.runCmd("-stack-list-locals --simple-values")
-        self.expect(
-            "\^done,locals=\[{name=\"a\",type=\"int\",value=\"10\"},{name=\"b\",type=\"int\",value=\"20\"}\]")
-
-        # Test struct local variable:
-        # Run to BP_local_struct_test
-        line = line_number('main.cpp', '// BP_local_struct_test')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"3\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -stack-list-locals: use 0 or --no-values
-        self.runCmd("-stack-list-locals 0")
-        self.expect("\^done,locals=\[name=\"var_c\"\]")
-        self.runCmd("-stack-list-locals --no-values")
-        self.expect("\^done,locals=\[name=\"var_c\"\]")
-
-        # Test -stack-list-locals: use 1 or --all-values
-        self.runCmd("-stack-list-locals 1")
-        self.expect(
-            "\^done,locals=\[{name=\"var_c\",value=\"{var_a = 10, var_b = 97 'a', inner_ = {var_d = 30}}\"}\]")
-        self.runCmd("-stack-list-locals --all-values")
-        self.expect(
-            "\^done,locals=\[{name=\"var_c\",value=\"{var_a = 10, var_b = 97 'a', inner_ = {var_d = 30}}\"}\]")
-
-        # Test -stack-list-locals: use 2 or --simple-values
-        self.runCmd("-stack-list-locals 2")
-        self.expect("\^done,locals=\[{name=\"var_c\",type=\"my_type\"}\]")
-        self.runCmd("-stack-list-locals --simple-values")
-        self.expect("\^done,locals=\[{name=\"var_c\",type=\"my_type\"}\]")
-
-        # Test array local variable:
-        # Run to BP_local_array_test
-        line = line_number('main.cpp', '// BP_local_array_test')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"4\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -stack-list-locals: use 0 or --no-values
-        self.runCmd("-stack-list-locals 0")
-        self.expect("\^done,locals=\[name=\"array\"\]")
-        self.runCmd("-stack-list-locals --no-values")
-        self.expect("\^done,locals=\[name=\"array\"\]")
-
-        # Test -stack-list-locals: use 1 or --all-values
-        self.runCmd("-stack-list-locals 1")
-        self.expect(
-            "\^done,locals=\[{name=\"array\",value=\"{\[0\] = 100, \[1\] = 200, \[2\] = 300}\"}\]")
-        self.runCmd("-stack-list-locals --all-values")
-        self.expect(
-            "\^done,locals=\[{name=\"array\",value=\"{\[0\] = 100, \[1\] = 200, \[2\] = 300}\"}\]")
-
-        # Test -stack-list-locals: use 2 or --simple-values
-        self.runCmd("-stack-list-locals 2")
-        self.expect("\^done,locals=\[{name=\"array\",type=\"int \[3\]\"}\]")
-        self.runCmd("-stack-list-locals --simple-values")
-        self.expect("\^done,locals=\[{name=\"array\",type=\"int \[3\]\"}\]")
-
-        # Test pointers as local variable:
-        # Run to BP_local_pointer_test
-        line = line_number('main.cpp', '// BP_local_pointer_test')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"5\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -stack-list-locals: use 0 or --no-values
-        self.runCmd("-stack-list-locals 0")
-        self.expect(
-            "\^done,locals=\[name=\"test_str\",name=\"var_e\",name=\"ptr\"\]")
-        self.runCmd("-stack-list-locals --no-values")
-        self.expect(
-            "\^done,locals=\[name=\"test_str\",name=\"var_e\",name=\"ptr\"\]")
-
-        # Test -stack-list-locals: use 1 or --all-values
-        self.runCmd("-stack-list-locals 1")
-        self.expect(
-            "\^done,locals=\[{name=\"test_str\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",value=\"24\"},{name=\"ptr\",value=\".*?\"}\]")
-        self.runCmd("-stack-list-locals --all-values")
-        self.expect(
-            "\^done,locals=\[{name=\"test_str\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",value=\"24\"},{name=\"ptr\",value=\".*?\"}\]")
-
-        # Test -stack-list-locals: use 2 or --simple-values
-        self.runCmd("-stack-list-locals 2")
-        self.expect(
-            "\^done,locals=\[{name=\"test_str\",type=\"const char \*\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",type=\"int\",value=\"24\"},{name=\"ptr\",type=\"int \*\",value=\".*?\"}\]")
-        self.runCmd("-stack-list-locals --simple-values")
-        self.expect(
-            "\^done,locals=\[{name=\"test_str\",type=\"const char \*\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",type=\"int\",value=\"24\"},{name=\"ptr\",type=\"int \*\",value=\".*?\"}\]")
-
-        # Test -stack-list-locals in a function with catch clause,
-        # having unnamed parameter
-        # Run to BP_catch_unnamed
-        line = line_number('main.cpp', '// BP_catch_unnamed')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"6\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -stack-list-locals: use --no-values
-        self.runCmd("-stack-list-locals --no-values")
-        self.expect("\^done,locals=\[name=\"i\",name=\"j\"\]")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stack_list_variables(self):
-        """Test that 'lldb-mi --interpreter' can shows local variables and arguments."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test int local variables:
-        # Run to BP_local_int_test
-        line = line_number('main.cpp', '// BP_local_int_test_with_args')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"2\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -stack-list-variables: use 0 or --no-values
-        self.runCmd("-stack-list-variables 0")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"c\"},{arg=\"1\",name=\"d\"},{name=\"a\"},{name=\"b\"}\]")
-        self.runCmd("-stack-list-variables --no-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"c\"},{arg=\"1\",name=\"d\"},{name=\"a\"},{name=\"b\"}\]")
-
-        # Test -stack-list-variables: use 1 or --all-values
-        self.runCmd("-stack-list-variables 1")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"c\",value=\"30\"},{arg=\"1\",name=\"d\",value=\"40\"},{name=\"a\",value=\"10\"},{name=\"b\",value=\"20\"}\]")
-        self.runCmd("-stack-list-variables --all-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"c\",value=\"30\"},{arg=\"1\",name=\"d\",value=\"40\"},{name=\"a\",value=\"10\"},{name=\"b\",value=\"20\"}\]")
-
-        # Test -stack-list-variables: use 2 or --simple-values
-        self.runCmd("-stack-list-variables 2")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"c\",type=\"int\",value=\"30\"},{arg=\"1\",name=\"d\",type=\"int\",value=\"40\"},{name=\"a\",type=\"int\",value=\"10\"},{name=\"b\",type=\"int\",value=\"20\"}\]")
-        self.runCmd("-stack-list-variables --simple-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"c\",type=\"int\",value=\"30\"},{arg=\"1\",name=\"d\",type=\"int\",value=\"40\"},{name=\"a\",type=\"int\",value=\"10\"},{name=\"b\",type=\"int\",value=\"20\"}\]")
-
-        # Test struct local variable:
-        # Run to BP_local_struct_test
-        line = line_number('main.cpp', '// BP_local_struct_test_with_args')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"3\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -stack-list-variables: use 0 or --no-values
-        self.runCmd("-stack-list-variables 0")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"var_e\"},{name=\"var_c\"}\]")
-        self.runCmd("-stack-list-variables --no-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"var_e\"},{name=\"var_c\"}\]")
-
-        # Test -stack-list-variables: use 1 or --all-values
-        self.runCmd("-stack-list-variables 1")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"var_e\",value=\"{var_a = 20, var_b = 98 'b', inner_ = {var_d = 40}}\"},{name=\"var_c\",value=\"{var_a = 10, var_b = 97 'a', inner_ = {var_d = 30}}\"}\]")
-        self.runCmd("-stack-list-variables --all-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"var_e\",value=\"{var_a = 20, var_b = 98 'b', inner_ = {var_d = 40}}\"},{name=\"var_c\",value=\"{var_a = 10, var_b = 97 'a', inner_ = {var_d = 30}}\"}\]")
-
-        # Test -stack-list-variables: use 2 or --simple-values
-        self.runCmd("-stack-list-variables 2")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"var_e\",type=\"my_type\"},{name=\"var_c\",type=\"my_type\"}\]")
-        self.runCmd("-stack-list-variables --simple-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"var_e\",type=\"my_type\"},{name=\"var_c\",type=\"my_type\"}\]")
-
-        # Test array local variable:
-        # Run to BP_local_array_test
-        line = line_number('main.cpp', '// BP_local_array_test_with_args')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"4\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -stack-list-variables: use 0 or --no-values
-        self.runCmd("-stack-list-variables 0")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"other_array\"},{name=\"array\"}\]")
-        self.runCmd("-stack-list-variables --no-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"other_array\"},{name=\"array\"}\]")
-
-        # Test -stack-list-variables: use 1 or --all-values
-        self.runCmd("-stack-list-variables 1")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"other_array\",value=\".*?\"},{name=\"array\",value=\"{\[0\] = 100, \[1\] = 200, \[2\] = 300}\"}\]")
-        self.runCmd("-stack-list-variables --all-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"other_array\",value=\".*?\"},{name=\"array\",value=\"{\[0\] = 100, \[1\] = 200, \[2\] = 300}\"}\]")
-
-        # Test -stack-list-variables: use 2 or --simple-values
-        self.runCmd("-stack-list-variables 2")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"other_array\",type=\"int \*\",value=\".*?\"},{name=\"array\",type=\"int \[3\]\"}\]")
-        self.runCmd("-stack-list-variables --simple-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"other_array\",type=\"int \*\",value=\".*?\"},{name=\"array\",type=\"int \[3\]\"}\]")
-
-        # Test pointers as local variable:
-        # Run to BP_local_pointer_test
-        line = line_number('main.cpp', '// BP_local_pointer_test_with_args')
-        self.runCmd("-break-insert --file main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"5\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test -stack-list-variables: use 0 or --no-values
-        self.runCmd("-stack-list-variables 0")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"arg_str\"},{arg=\"1\",name=\"arg_ptr\"},{name=\"test_str\"},{name=\"var_e\"},{name=\"ptr\"}\]")
-        self.runCmd("-stack-list-variables --no-values")
-        self.expect(
-            "\^done,variables=\[{arg=\"1\",name=\"arg_str\"},{arg=\"1\",name=\"arg_ptr\"},{name=\"test_str\"},{name=\"var_e\"},{name=\"ptr\"}\]")
-
-        # Test -stack-list-variables: use 1 or --all-values
-        self.runCmd("-stack-list-variables 1")
-        self.expect("\^done,variables=\[{arg=\"1\",name=\"arg_str\",value=\".*?String.*?\"},{arg=\"1\",name=\"arg_ptr\",value=\".*?\"},{name=\"test_str\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",value=\"24\"},{name=\"ptr\",value=\".*?\"}\]")
-        self.runCmd("-stack-list-variables --all-values")
-        self.expect("\^done,variables=\[{arg=\"1\",name=\"arg_str\",value=\".*?String.*?\"},{arg=\"1\",name=\"arg_ptr\",value=\".*?\"},{name=\"test_str\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",value=\"24\"},{name=\"ptr\",value=\".*?\"}\]")
-
-        # Test -stack-list-variables: use 2 or --simple-values
-        self.runCmd("-stack-list-variables 2")
-        self.expect("\^done,variables=\[{arg=\"1\",name=\"arg_str\",type=\"const char \*\",value=\".*?String.*?\"},{arg=\"1\",name=\"arg_ptr\",type=\"int \*\",value=\".*?\"},{name=\"test_str\",type=\"const char \*\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",type=\"int\",value=\"24\"},{name=\"ptr\",type=\"int \*\",value=\".*?\"}\]")
-        self.runCmd("-stack-list-variables --simple-values")
-        self.expect("\^done,variables=\[{arg=\"1\",name=\"arg_str\",type=\"const char \*\",value=\".*?String.*?\"},{arg=\"1\",name=\"arg_ptr\",type=\"int \*\",value=\".*?\"},{name=\"test_str\",type=\"const char \*\",value=\".*?Rakaposhi.*?\"},{name=\"var_e\",type=\"int\",value=\"24\"},{name=\"ptr\",type=\"int \*\",value=\".*?\"}\]")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stack_info_depth(self):
-        """Test that 'lldb-mi --interpreter' can shows depth of the stack."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that -stack-info-depth works
-        # (and that max-depth is optional)
-        self.runCmd("-stack-info-depth")
-        self.expect("\^done,depth=\"[1-9]\"")
-
-        # Test that max-depth restricts check of stack depth
-        # FIXME: max-depth argument is ignored
-        self.runCmd("-stack-info-depth 1")
-        # self.expect("\^done,depth=\"1\"")
-
-        # Test that invalid max-depth argument is handled
-        # FIXME: max-depth argument is ignored
-        self.runCmd("-stack-info-depth -1")
-        # self.expect("\^error")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipUnlessDarwin
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stack_info_frame(self):
-        """Test that 'lldb-mi --interpreter' can show information about current frame."""
-
-        self.spawnLldbMi(args=None)
-
-        # Test that -stack-info-frame fails when program isn't running
-        self.runCmd("-stack-info-frame")
-        self.expect(
-            "\^error,msg=\"Command 'stack-info-frame'\. Invalid process during debug session\"")
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that -stack-info-frame works when program was stopped on BP
-        self.runCmd("-stack-info-frame")
-        self.expect(
-            "\^done,frame=\{level=\"0\",addr=\"0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\"\}")
-
-        # Select frame #1
-        self.runCmd("-stack-select-frame 1")
-        self.expect("\^done")
-
-        # Test that -stack-info-frame works when specified frame was selected
-        self.runCmd("-stack-info-frame")
-        self.expect(
-            "\^done,frame=\{level=\"1\",addr=\"0x[0-9a-f]+\",func=\".+?\",file=\"\?\?\",fullname=\"\?\?\",line=\"-1\"\}")
-
-        # Test that -stack-info-frame fails when an argument is specified
-        # FIXME: unknown argument is ignored
-        self.runCmd("-stack-info-frame unknown_arg")
-        # self.expect("\^error")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stack_list_frames(self):
-        """Test that 'lldb-mi --interpreter' can lists the frames on the stack."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test stack frame: get frame #0 info
-        self.runCmd("-stack-list-frames 0 0")
-        self.expect(
-            "\^done,stack=\[frame=\{level=\"0\",addr=\"0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\"\}\]")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_stack_select_frame(self):
-        """Test that 'lldb-mi --interpreter' can choose current frame."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that -stack-select-frame requires 1 mandatory argument
-        self.runCmd("-stack-select-frame")
-        self.expect(
-            "\^error,msg=\"Command 'stack-select-frame'\. Command Args\. Validation failed. Mandatory args not found: frame_id\"")
-
-        # Test that -stack-select-frame fails on invalid frame number
-        self.runCmd("-stack-select-frame 99")
-        self.expect(
-            "\^error,msg=\"Command 'stack-select-frame'\. Frame ID invalid\"")
-
-        # Test that current frame is #0
-        self.runCmd("-stack-info-frame")
-        self.expect(
-            "\^done,frame=\{level=\"0\",addr=\"0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\"\}")
-
-        # Test that -stack-select-frame can select the selected frame
-        self.runCmd("-stack-select-frame 0")
-        self.expect("\^done")
-
-        # Test that current frame is still #0
-        self.runCmd("-stack-info-frame")
-        self.expect(
-            "\^done,frame=\{level=\"0\",addr=\"0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\"\}")
-
-        # Test that -stack-select-frame can select frame #1 (parent frame)
-        self.runCmd("-stack-select-frame 1")
-        self.expect("\^done")
-
-        # Test that current frame is #1
-        # Note that message is different in Darwin and Linux:
-        # Darwin: "^done,frame={level=\"1\",addr=\"0x[0-9a-f]+\",func=\"start\",file=\"??\",fullname=\"??\",line=\"-1\"}"
-        # Linux:
-        # "^done,frame={level=\"1\",addr=\"0x[0-9a-f]+\",func=\".+\",file=\".+\",fullname=\".+\",line=\"\d+\"}"
-        self.runCmd("-stack-info-frame")
-        self.expect(
-            "\^done,frame=\{level=\"1\",addr=\"0x[0-9a-f]+\",func=\".+?\",file=\".+?\",fullname=\".+?\",line=\"(-1|\d+)\"\}")
-
-        # Test that -stack-select-frame can select frame #0 (child frame)
-        self.runCmd("-stack-select-frame 0")
-        self.expect("\^done")
-
-        # Test that current frame is #0 and it has the same information
-        self.runCmd("-stack-info-frame")
-        self.expect(
-            "\^done,frame=\{level=\"0\",addr=\"0x[0-9a-f]+\",func=\"main\",file=\"main\.cpp\",fullname=\".+?main\.cpp\",line=\"\d+\"\}")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/stack/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/stack/main.cpp
deleted file mode 100644
index b054753..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/stack/main.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <exception>
-
-struct inner
-{
-    int var_d;
-};
-
-struct my_type
-{
-    int var_a;
-    char var_b;
-    struct inner inner_;
-};
-
-int
-local_int_test(void)
-{
-    int a = 10, b = 20;
-    return 0; // BP_local_int_test
-}
-
-int
-local_int_test_with_args(int c, int d)
-{
-    int a = 10, b = 20;
-    return 0; // BP_local_int_test_with_args
-}
-
-int
-local_struct_test(void)
-{
-    struct my_type var_c;
-    var_c.var_a = 10;
-    var_c.var_b = 'a';
-    var_c.inner_.var_d = 30;
-    return 0; // BP_local_struct_test
-}
-
-int local_struct_test_with_args(struct my_type var_e)
-{
-    struct my_type var_c;
-    var_c.var_a = 10;
-    var_c.var_b = 'a';
-    var_c.inner_.var_d = 30;
-    return 0; // BP_local_struct_test_with_args
-}
-
-int
-local_array_test(void)
-{
-    int array[3];
-    array[0] = 100;
-    array[1] = 200;
-    array[2] = 300;
-    return 0; // BP_local_array_test
-}
-
-int
-local_array_test_with_args(int* other_array)
-{
-    int array[3];
-    array[0] = 100;
-    array[1] = 200;
-    array[2] = 300;
-    return 0; // BP_local_array_test_with_args
-}
-
-int
-local_pointer_test(void)
-{
-    const char *test_str = "Rakaposhi";
-    int var_e = 24;
-    int *ptr = &var_e;
-    return 0; // BP_local_pointer_test
-}
-
-int
-local_pointer_test_with_args(const char *arg_str, int *arg_ptr)
-{
-    const char *test_str = "Rakaposhi";
-    int var_e = 24;
-    int *ptr = &var_e;
-    return 0; // BP_local_pointer_test_with_args
-}
-
-int do_tests_with_args()
-{
-    local_int_test_with_args(30, 40);
-
-    struct my_type var_e;
-    var_e.var_a = 20;
-    var_e.var_b = 'b';
-    var_e.inner_.var_d = 40;
-    local_struct_test_with_args(var_e);
-
-    int array[3];
-    array[0] = 400;
-    array[1] = 500;
-    array[2] = 600;
-    local_array_test_with_args(array);
-
-    const char *test_str = "String";
-    int var_z = 25;
-    int *ptr = &var_z;
-    local_pointer_test_with_args(test_str, ptr);
-
-    return 0;
-}
-
-void catch_unnamed_test()
-{
-    try
-    {
-        int i = 1, j = 2;
-        throw std::exception(); // BP_catch_unnamed
-    }
-    catch(std::exception&)
-    {
-    }
-}
-
-int
-main(int argc, char const *argv[])
-{
-    local_int_test();
-    local_struct_test();
-    local_array_test();
-    local_pointer_test();
-    catch_unnamed_test();
-
-    do_tests_with_args();
-    return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
deleted file mode 100644
index f94564e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/TestMiStartupOptions.py
+++ /dev/null
@@ -1,335 +0,0 @@
-"""
-Test lldb-mi startup options.
-"""
-
-from __future__ import print_function
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-import os
-
-class MiStartupOptionsTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin
-    @skipIfLinux
-    def test_lldbmi_executable_option_file(self):
-        """Test that 'lldb-mi --interpreter %s' loads executable file."""
-
-        self.spawnLldbMi(exe=self.myexe)
-
-        # Test that the executable is loaded when file was specified
-        self.expect("-file-exec-and-symbols \"%s\"" % self.myexe)
-        self.expect("\^done")
-
-        # Test that lldb-mi is ready when executable was loaded
-        self.expect(self.child_prompt, exactly=True)
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Continue
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin
-    def test_lldbmi_executable_option_unknown_file(self):
-        """Test that 'lldb-mi --interpreter %s' fails on unknown executable file."""
-
-        # Prepare path to executable
-        path = "unknown_file"
-
-        self.spawnLldbMi(exe=path)
-
-        # Test that the executable isn't loaded when unknown file was specified
-        self.expect("-file-exec-and-symbols \"%s\"" % path)
-        self.expect(
-            "\^error,msg=\"Command 'file-exec-and-symbols'. Target binary '%s' is invalid. error: unable to find executable for '%s'\"" %
-            (path, path))
-
-        # Test that lldb-mi is ready when executable was loaded
-        self.expect(self.child_prompt, exactly=True)
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin
-    @skipIfLinux
-    def test_lldbmi_executable_option_absolute_path(self):
-        """Test that 'lldb-mi --interpreter %s' loads executable which is specified via absolute path."""
-
-        # Prepare path to executable
-        self.spawnLldbMi(exe=self.myexe)
-
-        # Test that the executable is loaded when file was specified using
-        # absolute path
-        self.expect("-file-exec-and-symbols \"%s\"" % self.myexe)
-        self.expect("\^done")
-
-        # Test that lldb-mi is ready when executable was loaded
-        self.expect(self.child_prompt, exactly=True)
-
-        # Run
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin
-    @skipIfLinux
-    def test_lldbmi_executable_option_relative_path(self):
-        """Test that 'lldb-mi --interpreter %s' loads executable which is specified via relative path."""
-
-        # Prepare path to executable
-        path = os.path.relpath(self.myexe, self.getBuildDir())
-        self.spawnLldbMi(exe=path)
-
-        # Test that the executable is loaded when file was specified using
-        # relative path
-        self.expect("-file-exec-and-symbols \"%s\"" % path)
-        self.expect("\^done")
-
-        # Test that lldb-mi is ready when executable was loaded
-        self.expect(self.child_prompt, exactly=True)
-
-        # Run
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin
-    def test_lldbmi_executable_option_unknown_path(self):
-        """Test that 'lldb-mi --interpreter %s' fails on executable file which is specified via unknown path."""
-
-        # Prepare path to executable
-        path = "unknown_dir" + self.myexe
-
-        self.spawnLldbMi(exe=path)
-
-        # Test that the executable isn't loaded when file was specified using
-        # unknown path
-        self.expect("-file-exec-and-symbols \"%s\"" % path)
-        self.expect(
-            "\^error,msg=\"Command 'file-exec-and-symbols'. Target binary '%s' is invalid. error: unable to find executable for '%s'\"" %
-            (path, path))
-
-        # Test that lldb-mi is ready when executable was loaded
-        self.expect(self.child_prompt, exactly=True)
-
-    def copyScript(self, sourceFile):
-        """copy the script to builddir and replace a.out with the full path"""
-        destFile = os.path.join(os.path.dirname(self.myexe),
-                                sourceFile+'.script')
-        with open(sourceFile, 'r') as src:
-            with open(destFile, 'w+') as dest:
-                dest.write(src.read().replace("a.out", self.myexe))
-        return destFile
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @expectedFailureNetBSD
-    @skipIfDarwin
-    def test_lldbmi_source_option_start_script(self):
-        """Test that 'lldb-mi --interpreter' can execute user's commands after initial commands were executed."""
-
-        # Prepared source file
-        sourceFile = self.copyScript("start_script")
-        self.spawnLldbMi(args="--source %s" % sourceFile)
-
-        # After '-file-exec-and-symbols a.out'
-        self.expect("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # After '-break-insert -f main'
-        self.expect("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        # After '-exec-run'
-        self.expect("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # After '-break-insert main.cpp:BP_return'
-        line = line_number('main.cpp', '//BP_return')
-        self.expect("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"2\"")
-
-        # After '-exec-continue'
-        self.expect("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that lldb-mi is ready after execution of --source start_script
-        self.expect(self.child_prompt, exactly=True)
-
-        # Try to evaluate 'a' expression
-        self.runCmd("-data-evaluate-expression a")
-        self.expect("\^done,value=\"10\"")
-        self.expect(self.child_prompt, exactly=True)
-        os.unlink(sourceFile)
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @expectedFailureNetBSD
-    @skipIfDarwin
-    def test_lldbmi_source_option_start_script_exit(self):
-        """Test that 'lldb-mi --interpreter' can execute a prepared file which passed via --source option."""
-
-        # Prepared source file
-        sourceFile = self.copyScript("start_script_exit")
-        self.spawnLldbMi(args="--source %s" % sourceFile)
-
-        # After '-file-exec-and-symbols a.out'
-        self.expect("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # After '-break-insert -f main'
-        self.expect("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        # After '-exec-run'
-        self.expect("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # After '-break-insert main.cpp:BP_return'
-        line = line_number('main.cpp', '//BP_return')
-        self.expect("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"2\"")
-
-        # After '-exec-continue'
-        self.expect("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # After '-data-evaluate-expression a'
-        self.expect("-data-evaluate-expression a")
-        self.expect("\^done,value=\"10\"")
-
-        # After '-gdb-exit'
-        self.expect("-gdb-exit")
-        self.expect("\^exit")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-        os.unlink(sourceFile)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin
-    def test_lldbmi_source_option_start_script_error(self):
-        """Test that 'lldb-mi --interpreter' stops execution of initial commands in case of error."""
-
-        # Prepared source file
-        sourceFile = self.copyScript("start_script_error")
-        self.spawnLldbMi(args="--source %s" % sourceFile, preconfig=False)
-
-        # After 'settings set symbols.enable-external-lookup false'
-        self.expect("settings set symbols.enable-external-lookup false")
-        self.expect("\^done")
-
-        # After '-file-exec-and-symbols a.out'
-        self.expect("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # After '-break-ins -f main'
-        self.expect("-break-ins -f main")
-        self.expect("\^error")
-
-        # Test that lldb-mi is ready after execution of --source start_script
-        self.expect(self.child_prompt, exactly=True)
-        os.unlink(sourceFile)
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin
-    @skipIfLinux
-    def test_lldbmi_log_option(self):
-        """Test that 'lldb-mi --log' creates a log file in the current directory."""
-
-        logDirectory = self.getBuildDir()
-        self.spawnLldbMi(exe=self.myexe, args="--log")
-
-        # Test that the executable is loaded when file was specified
-        self.expect("-file-exec-and-symbols \"%s\"" % self.myexe)
-        self.expect("\^done")
-
-        # Test that lldb-mi is ready when executable was loaded
-        self.expect(self.child_prompt, exactly=True)
-
-        # Run
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-        # Check log file is created
-        import glob
-        import os
-        logFile = glob.glob(logDirectory + "/lldb-mi-*.log")
-
-        if not logFile:
-            self.fail("log file not found")
-
-        # Delete log
-        for f in logFile:
-            os.remove(f)
-
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin
-    @skipIfLinux
-    def test_lldbmi_log_directory_option(self):
-        """Test that 'lldb-mi --log --log-dir' creates a log file in the directory specified by --log-dir."""
-
-        # Create log in temp directory
-        import tempfile
-        logDirectory = tempfile.gettempdir()
-
-        self.spawnLldbMi(exe=self.myexe,
-            args="--log --log-dir=%s" % logDirectory)
-
-        # Test that the executable is loaded when file was specified
-        self.expect("-file-exec-and-symbols \"%s\"" % self.myexe)
-        self.expect("\^done")
-
-        # Test that lldb-mi is ready when executable was loaded
-        self.expect(self.child_prompt, exactly=True)
-
-        # Run
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-        # Check log file is created
-        import glob
-        import os
-        logFile = glob.glob(logDirectory + "/lldb-mi-*.log")
-
-        if not logFile:
-            self.fail("log file not found")
-
-        # Delete log
-        for f in logFile:
-            os.remove(f)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/main.cpp
deleted file mode 100644
index 4a5aef9..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/main.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-int
-main(int argc, char const *argv[])
-{
-    int a = 10;
-    return 0; //BP_return
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script
deleted file mode 100644
index 511c022..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script
+++ /dev/null
@@ -1,5 +0,0 @@
--file-exec-and-symbols a.out
--break-insert -f main
--exec-run
--break-insert main.cpp:14
--exec-continue
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_error b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_error
deleted file mode 100644
index a1c581b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_error
+++ /dev/null
@@ -1,3 +0,0 @@
-settings set symbols.enable-external-lookup false
--file-exec-and-symbols a.out
--break-ins -f main
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_exit b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_exit
deleted file mode 100644
index 8379018..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/startup_options/start_script_exit
+++ /dev/null
@@ -1,7 +0,0 @@
--file-exec-and-symbols a.out
--break-insert -f main
--exec-run
--break-insert main.cpp:14
--exec-continue
--data-evaluate-expression a
--gdb-exit
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py
deleted file mode 100644
index d9af9f5..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/TestMiSyntax.py
+++ /dev/null
@@ -1,174 +0,0 @@
-"""
-Test that the lldb-mi driver understands MI command syntax.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-from functools import reduce
-
-
-class MiSyntaxTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    @skipIfLinux
-    def test_lldbmi_tokens(self):
-        """Test that 'lldb-mi --interpreter' prints command tokens."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("000-file-exec-and-symbols %s" % self.myexe)
-        self.expect("000\^done")
-
-        # Run to main
-        self.runCmd("100000001-break-insert -f main")
-        self.expect("100000001\^done,bkpt={number=\"1\"")
-        self.runCmd("2-exec-run")
-        self.expect("2\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Exit
-        self.runCmd("0000000000000000000003-exec-continue")
-        self.expect("0000000000000000000003\^running")
-        self.expect("\*stopped,reason=\"exited-normally\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_specialchars(self):
-        """Test that 'lldb-mi --interpreter' handles complicated strings."""
-
-        # Create an alias for myexe
-        complicated_myexe = self.getBuildArtifact("C--mpl-x file's`s @#$%^&*()_+-={}[]| name")
-        os.symlink(self.myexe, complicated_myexe)
-        self.addTearDownHook(lambda: os.unlink(complicated_myexe))
-
-        self.spawnLldbMi(exe=complicated_myexe)
-
-        # Test that the executable was loaded
-        self.expect(
-            "-file-exec-and-symbols \"%s\"" %
-            complicated_myexe, exactly=True)
-        self.expect("\^done")
-
-        # Check that it was loaded correctly
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfDarwin
-    @expectedFlakeyNetBSD
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_output_grammar(self):
-        """Test that 'lldb-mi --interpreter' uses standard output syntax."""
-
-        self.spawnLldbMi(args=None)
-        self.child.setecho(False)
-
-        # Run all commands simultaneously
-        self.runCmd("-unknown-command")
-        self.runCmd("-interpreter-exec command help")
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.runCmd("-break-insert -f main")
-        self.runCmd("-gdb-set target-async off")
-        self.runCmd("-exec-run")
-        self.runCmd("-gdb-set target-async on")
-        self.runCmd("-exec-continue")
-        self.runCmd("-gdb-exit")
-
-        # Test that the program's output matches to the following pattern:
-        # ( async-record | stream-record )* [ result-record ] "(gdb)" nl
-        async_record = "^[0-9]*(\*|\+|=).+?\n"  # 1
-        stream_record = "^(~|@|&).+?\n"         # 2
-        result_record = "^[0-9]*\^.+?\n"        # 3
-        prompt = "^\(gdb\)\r\n"                 # 4
-        command = "^\r\n"                       # 5 (it looks like empty line for pexpect)
-        error = "^.+?\n"                        # 6
-        import pexpect                          # 7 (EOF)
-        all_patterns = [
-            async_record,
-            stream_record,
-            result_record,
-            prompt,
-            command,
-            error,
-            pexpect.EOF]
-
-        # Routines to get a bit-mask for the specified list of patterns
-        def get_bit(pattern): return all_patterns.index(pattern)
-        def get_mask(pattern): return 1 << get_bit(pattern)
-        def or_op(x, y): return x | y
-        def get_state(*args): return reduce(or_op, map(get_mask, args))
-
-        next_state = get_state(command)
-        while True:
-            it = self.expect(all_patterns)
-            matched_pattern = all_patterns[it]
-
-            # Check that state is acceptable
-            if not (next_state & get_mask(matched_pattern)):
-                self.fail(
-                    "error: inconsistent pattern '%s' for state %#x (matched string: %s)" %
-                    (repr(matched_pattern), next_state, self.child.after))
-            elif matched_pattern == async_record or matched_pattern == stream_record:
-                next_state = get_state(
-                    async_record,
-                    stream_record,
-                    result_record,
-                    prompt)
-            elif matched_pattern == result_record:
-                # FIXME lldb-mi prints async-records out of turn
-                # ```
-                #   ^done
-                #   (gdb)
-                #   ^running
-                #   =thread-group-started,id="i1",pid="13875"
-                #   (gdb)
-                # ```
-                # Therefore to pass that test I changed the grammar's rule:
-                #   next_state = get_state(prompt)
-                # to:
-                next_state = get_state(async_record, prompt)
-            elif matched_pattern == prompt:
-                # FIXME lldb-mi prints the prompt out of turn
-                # ```
-                #   ^done
-                #   (gdb)
-                #   ^running
-                #   (gdb)
-                #   (gdb)
-                # ```
-                # Therefore to pass that test I changed the grammar's rule:
-                #   next_state = get_state(async_record, stream_record, result_record, command, pexpect.EOF)
-                # to:
-                next_state = get_state(
-                    async_record,
-                    stream_record,
-                    result_record,
-                    prompt,
-                    command,
-                    pexpect.EOF)
-            elif matched_pattern == command:
-                next_state = get_state(
-                    async_record,
-                    stream_record,
-                    result_record)
-            elif matched_pattern == pexpect.EOF:
-                break
-            else:
-                self.fail("error: pexpect returned an unknown state")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/main.cpp
deleted file mode 100644
index 08afcc4..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/syntax/main.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdio>
-
-int
-main(int argc, char const *argv[]) 
-{
-    printf("'\n` - it's \\n\x12\"\\\"");
-    return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/target/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/target/Makefile
deleted file mode 100644
index b2550fe..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/target/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := test_attach.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/target/TestMiTarget.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/target/TestMiTarget.py
deleted file mode 100644
index f56d7ae..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/target/TestMiTarget.py
+++ /dev/null
@@ -1,137 +0,0 @@
-"""
-Test lldb-mi -target-xxx commands.
-"""
-
-from __future__ import print_function
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiTargetTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # cannot attach to process on linux
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    @expectedFailureNetBSD
-    def test_lldbmi_target_attach_wait_for(self):
-        """Test that 'lldb-mi --interpreter' works for -target-attach -n <name> --waitfor."""
-
-        # Build target executable with unique name
-        exeName = self.testMethodName
-        d = {'EXE': exeName}
-        self.buildProgram("test_attach.cpp", exeName)
-        self.addTearDownCleanup(dictionary=d)
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        # FIXME: -file-exec-and-sybmols is not required for target attach, but
-        # the test will not pass without this
-        self.runCmd("-file-exec-and-symbols %s" % self.getBuildArtifact(exeName))
-        self.expect("\^done")
-
-        # Set up attach
-        self.runCmd("-target-attach -n %s --waitfor" % exeName)
-        time.sleep(4)  # Give attach time to setup
-
-        # Start target process
-        self.spawnSubprocess(self.getBuildArtifact(exeName))
-        self.addTearDownHook(self.cleanupSubprocesses)
-        self.expect("\^done")
-
-        # Set breakpoint on printf
-        line = line_number('test_attach.cpp', '// BP_i++')
-        self.runCmd("-break-insert -f test_attach.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        # Continue to breakpoint
-        self.runCmd("-exec-continue")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Detach
-        self.runCmd("-target-detach")
-        self.expect("\^done")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # cannot attach to process on linux
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    @expectedFailureNetBSD
-    def test_lldbmi_target_attach_name(self):
-        """Test that 'lldb-mi --interpreter' works for -target-attach -n <name>."""
-
-        # Build target executable with unique name
-        exeName = self.testMethodName
-        d = {'EXE': exeName}
-        self.buildProgram("test_attach.cpp", exeName)
-        self.addTearDownCleanup(dictionary=d)
-
-        # Start target process
-        targetProcess = self.spawnSubprocess(self.getBuildArtifact(exeName))
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        self.spawnLldbMi(args=None)
-
-        # Set up atatch
-        self.runCmd("-target-attach -n %s" % exeName)
-        self.expect("\^done")
-
-        # Set breakpoint on printf
-        line = line_number('test_attach.cpp', '// BP_i++')
-        self.runCmd("-break-insert -f test_attach.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        # Continue to breakpoint
-        self.runCmd("-exec-continue")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Detach
-        self.runCmd("-target-detach")
-        self.expect("\^done")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # cannot attach to process on linux
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    @expectedFailureNetBSD
-    def test_lldbmi_target_attach_pid(self):
-        """Test that 'lldb-mi --interpreter' works for -target-attach <pid>."""
-
-        # Build target executable with unique name
-        exeName = self.testMethodName
-        d = {'EXE': exeName}
-        self.buildProgram("test_attach.cpp", exeName)
-        self.addTearDownCleanup(dictionary=d)
-
-        # Start target process
-        targetProcess = self.spawnSubprocess(
-            self.getBuildArtifact(exeName))
-        self.addTearDownHook(self.cleanupSubprocesses)
-
-        self.spawnLldbMi(args=None)
-
-        # Set up atatch
-        self.runCmd("-target-attach %d" % targetProcess.pid)
-        self.expect("\^done")
-
-        # Set breakpoint on printf
-        line = line_number('test_attach.cpp', '// BP_i++')
-        self.runCmd("-break-insert -f test_attach.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-
-        # Continue to breakpoint
-        self.runCmd("-exec-continue")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Detach
-        self.runCmd("-target-detach")
-        self.expect("\^done")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/target/test_attach.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/target/test_attach.cpp
deleted file mode 100644
index 8dca63f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/target/test_attach.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdio>
-
-int
-main(int argc, char const *argv[]) 
-{
-    int i = 0;
-    for (;;)
-    {
-        i++; // BP_i++
-    }
-    return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/Makefile
deleted file mode 100644
index b6fad67..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := test_threadinfo.cpp
-
-ENABLE_THREADS := YES
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/TestMiThreadInfo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/TestMiThreadInfo.py
deleted file mode 100644
index 1d627ba..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/TestMiThreadInfo.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""
-Test lldb-mi -thread-info command.
-"""
-
-from __future__ import print_function
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiThreadInfoTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # pthreads not supported on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @expectedFailureNetBSD
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_thread_info(self):
-        """Test that -thread-info prints thread info and the current-thread-id"""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        self.runCmd("-break-insert ThreadProc")
-        self.expect("\^done")
-
-        # Run to the breakpoint
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        self.runCmd("-thread-info")
-        self.expect(
-            "\^done,threads=\[\{id=\"1\",(.*)\},\{id=\"2\",(.*)\],current-thread-id=\"2\"")
-
-        self.runCmd("-gdb-quit")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/test_threadinfo.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/test_threadinfo.cpp
deleted file mode 100644
index 1f444ec..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/threadinfo/test_threadinfo.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <cstdlib>
-#include <iostream>
-#include <thread>
-
-using namespace std;
-
-void
-ThreadProc()
-{
-    int i = 0;
-    i++;
-}
-
-int
-main()
-{
-    thread t(ThreadProc);
-    t.join();
-
-    return 0;
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/Makefile
deleted file mode 100644
index 314f1cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py
deleted file mode 100644
index cf1da5b..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiGdbSetShowPrint.py
+++ /dev/null
@@ -1,247 +0,0 @@
-# coding=utf8
-"""
-Test lldb-mi -gdb-set and -gdb-show commands for 'print option-name'.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiGdbSetShowTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    # evaluates array when char-array-as-string is off
-    def eval_and_check_array(self, var, typ, length):
-        self.runCmd("-var-create - * %s" % var)
-        self.expect(
-            '\^done,name="var\d+",numchild="%d",value="\[%d\]",type="%s \[%d\]",thread-id="1",has_more="0"' %
-            (length, length, typ, length))
-
-    # evaluates any type which can be represented as string of characters
-    def eval_and_match_string(self, var, value, typ):
-        value = value.replace("\\", "\\\\").replace("\"", "\\\"")
-        self.runCmd("-var-create - * " + var)
-        self.expect(
-            '\^done,name="var\d+",numchild="[0-9]+",value="%s",type="%s",thread-id="1",has_more="0"' %
-            (value, typ))
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_gdb_set_show_print_char_array_as_string(self):
-        """Test that 'lldb-mi --interpreter' can print array of chars as string."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to BP_gdb_set_show_print_char_array_as_string_test
-        line = line_number(
-            'main.cpp',
-            '// BP_gdb_set_show_print_char_array_as_string_test')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that default print char-array-as-string value is "off"
-        self.runCmd("-gdb-show print char-array-as-string")
-        self.expect("\^done,value=\"off\"")
-
-        # Test that a char* is expanded to string when print
-        # char-array-as-string is "off"
-        self.eval_and_match_string(
-            "cp",
-            r'0x[0-9a-f]+ \"\\t\\\"hello\\\"\\n\"',
-            r'const char \*')
-
-        # Test that a char[] isn't expanded to string when print
-        # char-array-as-string is "off"
-        self.eval_and_check_array("ca", "const char", 10)
-
-        # Test that a char16_t* is expanded to string when print
-        # char-array-as-string is "off"
-        self.eval_and_match_string(
-            "u16p",
-            r'0x[0-9a-f]+ u\"\\t\\\"hello\\\"\\n\"',
-            r'const char16_t \*')
-
-        # Test that a char16_t[] isn't expanded to string when print
-        # char-array-as-string is "off"
-        self.eval_and_check_array("u16a", "const char16_t", 10)
-
-        # Test that a char32_t* is expanded to string when print
-        # char-array-as-string is "off"
-        self.eval_and_match_string(
-            "u32p",
-            r'0x[0-9a-f]+ U\"\\t\\\"hello\\\"\\n\"',
-            r'const char32_t \*')
-
-        # Test that a char32_t[] isn't expanded to string when print
-        # char-array-as-string is "off"
-        self.eval_and_check_array("u32a", "const char32_t", 10)
-
-        # Test that -gdb-set can set print char-array-as-string flag
-        self.runCmd("-gdb-set print char-array-as-string on")
-        self.expect("\^done")
-        self.runCmd("-gdb-set print char-array-as-string 1")
-        self.expect("\^done")
-        self.runCmd("-gdb-show print char-array-as-string")
-        self.expect("\^done,value=\"on\"")
-
-        # Test that a char* with escape chars is expanded to string when print
-        # char-array-as-string is "on"
-        self.eval_and_match_string(
-            "cp",
-            r'0x[0-9a-f]+ \"\\t\\\"hello\\\"\\n\"',
-            r'const char \*')
-
-        # Test that a char[] with escape chars is expanded to string when print
-        # char-array-as-string is "on"
-        self.eval_and_match_string(
-            "ca",
-            r'\"\\t\\\"hello\\\"\\n\"',
-            r'const char \[10\]')
-
-        # Test that a char16_t* with escape chars is expanded to string when
-        # print char-array-as-string is "on"
-        self.eval_and_match_string(
-            "u16p",
-            r'0x[0-9a-f]+ u\"\\t\\\"hello\\\"\\n\"',
-            r'const char16_t \*')
-
-        # Test that a char16_t[] with escape chars is expanded to string when
-        # print char-array-as-string is "on"
-        self.eval_and_match_string(
-            "u16a",
-            r'u\"\\t\\\"hello\\\"\\n\"',
-            r'const char16_t \[10\]')
-
-        # Test that a char32_t* with escape chars is expanded to string when
-        # print char-array-as-string is "on"
-        self.eval_and_match_string(
-            "u32p",
-            r'0x[0-9a-f]+ U\"\\t\\\"hello\\\"\\n\"',
-            r'const char32_t \*')
-
-        # Test that a char32_t[] with escape chars is expanded to string when
-        # print char-array-as-string is "on"
-        self.eval_and_match_string(
-            "u32a",
-            r'U\"\\t\\\"hello\\\"\\n\"',
-            r'const char32_t \[10\]')
-
-        # Test russian unicode strings
-        self.eval_and_match_string(
-            "u16p_rus",
-            r'0x[0-9a-f]+ u\"\\\\Аламо-сквер\"',
-            r'const char16_t \*')
-        self.eval_and_match_string(
-            "u16a_rus",
-            r'u\"\\\\Бейвью\"',
-            r'const char16_t \[8\]')
-        self.eval_and_match_string(
-            "u32p_rus",
-            r'0x[0-9a-f]+ U\"\\\\Чайнатаун\"',
-            r'const char32_t \*')
-        self.eval_and_match_string(
-            "u32a_rus",
-            r'U\"\\\\Догпатч\"',
-            r'const char32_t \[9\]')
-
-        # Test that -gdb-set print char-array-as-string fails if "on"/"off"
-        # isn't specified
-        self.runCmd("-gdb-set print char-array-as-string")
-        self.expect(
-            "\^error,msg=\"The request ''print' expects option-name and \"on\" or \"off\"' failed.\"")
-
-        # Test that -gdb-set print char-array-as-string fails when option is
-        # unknown
-        self.runCmd("-gdb-set print char-array-as-string unknown")
-        self.expect(
-            "\^error,msg=\"The request ''print' expects option-name and \"on\" or \"off\"' failed.\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi working on Windows
-    @expectedFailureAll(compiler="gcc", bugnumber="llvm.org/pr23357")
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_gdb_set_show_print_aggregate_field_names(self):
-        """Test that 'lldb-mi --interpreter' can expand aggregates everywhere."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to BP_gdb_set_show_print_aggregate_field_names
-        line = line_number(
-            'main.cpp',
-            '// BP_gdb_set_show_print_aggregate_field_names')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that default print aggregatep-field-names value is "on"
-        self.runCmd("-gdb-show print aggregate-field-names")
-        self.expect("\^done,value=\"on\"")
-
-        # Set print expand-aggregates flag to "on"
-        self.runCmd("-gdb-set print expand-aggregates on")
-        self.expect("\^done")
-
-        # Test that composite type is expanded with field name when print
-        # aggregate-field-names is "on"
-        self.runCmd("-var-create var1 * complx")
-        self.expect(
-            "\^done,name=\"var1\",numchild=\"3\",value=\"{i = 3, inner = {l = 3}, complex_ptr = 0x[0-9a-f]+}\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"")
-
-        # Test that composite type[] is expanded with field name when print
-        # aggregate-field-names is "on"
-        self.runCmd("-var-create var2 * complx_array")
-        self.expect(
-            "\^done,name=\"var2\",numchild=\"2\",value=\"{\[0\] = {i = 4, inner = {l = 4}, complex_ptr = 0x[0-9a-f]+}, \[1\] = {i = 5, inner = {l = 5}, complex_ptr = 0x[0-9a-f]+}}\",type=\"complex_type \[2\]\",thread-id=\"1\",has_more=\"0\"")
-
-        # Test that -gdb-set can set print aggregate-field-names flag
-        self.runCmd("-gdb-set print aggregate-field-names off")
-        self.expect("\^done")
-        self.runCmd("-gdb-set print aggregate-field-names 0")
-        self.expect("\^done")
-        self.runCmd("-gdb-show print aggregate-field-names")
-        self.expect("\^done,value=\"off\"")
-
-        # Test that composite type is expanded without field name when print
-        # aggregate-field-names is "off"
-        self.runCmd("-var-create var3 * complx")
-        self.expect(
-            "\^done,name=\"var3\",numchild=\"3\",value=\"{3,\{3\},0x[0-9a-f]+}\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"")
-
-        # Test that composite type[] is expanded without field name when print
-        # aggregate-field-names is "off"
-        self.runCmd("-var-create var4 * complx_array")
-        self.expect(
-            "\^done,name=\"var4\",numchild=\"2\",value=\"{{4,\{4\},0x[0-9a-f]+},{5,\{5\},0x[0-9a-f]+}}\",type=\"complex_type \[2\]\",thread-id=\"1\",has_more=\"0\"")
-
-        # Test that -gdb-set print aggregate-field-names fails if "on"/"off"
-        # isn't specified
-        self.runCmd("-gdb-set print aggregate-field-names")
-        self.expect(
-            "\^error,msg=\"The request ''print' expects option-name and \"on\" or \"off\"' failed.\"")
-
-        # Test that -gdb-set print aggregate-field-names fails when option is
-        # unknown
-        self.runCmd("-gdb-set print aggregate-field-names unknown")
-        self.expect(
-            "\^error,msg=\"The request ''print' expects option-name and \"on\" or \"off\"' failed.\"")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py
deleted file mode 100644
index 5ef7d11..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/TestMiVar.py
+++ /dev/null
@@ -1,465 +0,0 @@
-"""
-Test lldb-mi -var-xxx commands.
-"""
-
-from __future__ import print_function
-
-
-import lldbmi_testcase
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class MiVarTestCase(lldbmi_testcase.MiTestCaseBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_eval(self):
-        """Test that 'lldb-mi --interpreter' works for evaluating."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to program return
-        line = line_number('main.cpp', '// BP_return')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Print non-existant variable
-        self.runCmd("-var-create var1 * undef")
-        self.expect(
-            "\^error,msg=\"error: use of undeclared identifier \'undef\'\\\\n\"")
-        self.runCmd("-data-evaluate-expression undef")
-        self.expect(
-            "\^error,msg=\"error: use of undeclared identifier \'undef\'\\\\n\"")
-
-        # Print global "g_MyVar", modify, delete and create again
-        self.runCmd("-data-evaluate-expression g_MyVar")
-        self.expect("\^done,value=\"3\"")
-        self.runCmd("-var-create var2 * g_MyVar")
-        self.expect(
-            "\^done,name=\"var2\",numchild=\"0\",value=\"3\",type=\"int\",thread-id=\"1\",has_more=\"0\"")
-        self.runCmd("-var-evaluate-expression var2")
-        self.expect("\^done,value=\"3\"")
-        self.runCmd("-var-show-attributes var2")
-        self.expect("\^done,status=\"editable\"")
-        self.runCmd("-var-list-children var2")
-        self.expect("\^done,numchild=\"0\",has_more=\"0\"")
-        # Ensure -var-list-children also works with quotes
-        self.runCmd("-var-list-children \"var2\"")
-        self.expect("\^done,numchild=\"0\",has_more=\"0\"")
-        self.runCmd("-data-evaluate-expression \"g_MyVar=30\"")
-        self.expect("\^done,value=\"30\"")
-        self.runCmd("-var-update --all-values var2")
-        # self.expect("\^done,changelist=\[\{name=\"var2\",value=\"30\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\]")
-        # FIXME -var-update doesn't work
-        self.runCmd("-var-delete var2")
-        self.expect("\^done")
-        self.runCmd("-var-create var2 * g_MyVar")
-        self.expect(
-            "\^done,name=\"var2\",numchild=\"0\",value=\"30\",type=\"int\",thread-id=\"1\",has_more=\"0\"")
-
-        # Print static "s_MyVar", modify, delete and create again
-        self.runCmd("-data-evaluate-expression s_MyVar")
-        self.expect("\^done,value=\"30\"")
-        self.runCmd("-var-create var3 * s_MyVar")
-        self.expect(
-            "\^done,name=\"var3\",numchild=\"0\",value=\"30\",type=\"int\",thread-id=\"1\",has_more=\"0\"")
-        self.runCmd("-var-evaluate-expression var3")
-        self.expect("\^done,value=\"30\"")
-        self.runCmd("-var-show-attributes var3")
-        self.expect("\^done,status=\"editable\"")
-        self.runCmd("-var-list-children var3")
-        self.expect("\^done,numchild=\"0\",has_more=\"0\"")
-        self.runCmd("-data-evaluate-expression \"s_MyVar=3\"")
-        self.expect("\^done,value=\"3\"")
-        self.runCmd("-var-update --all-values var3")
-        # self.expect("\^done,changelist=\[\{name=\"var3\",value=\"3\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\]")
-        # FIXME -var-update doesn't work
-        self.runCmd("-var-delete var3")
-        self.expect("\^done")
-        self.runCmd("-var-create var3 * s_MyVar")
-        self.expect(
-            "\^done,name=\"var3\",numchild=\"0\",value=\"3\",type=\"int\",thread-id=\"1\",has_more=\"0\"")
-
-        # Print local "b", modify, delete and create again
-        self.runCmd("-data-evaluate-expression b")
-        self.expect("\^done,value=\"20\"")
-        self.runCmd("-var-create var4 * b")
-        self.expect(
-            "\^done,name=\"var4\",numchild=\"0\",value=\"20\",type=\"int\",thread-id=\"1\",has_more=\"0\"")
-        self.runCmd("-var-evaluate-expression var4")
-        self.expect("\^done,value=\"20\"")
-        self.runCmd("-var-show-attributes var4")
-        self.expect("\^done,status=\"editable\"")
-        self.runCmd("-var-list-children var4")
-        self.expect("\^done,numchild=\"0\",has_more=\"0\"")
-        self.runCmd("-data-evaluate-expression \"b=2\"")
-        self.expect("\^done,value=\"2\"")
-        self.runCmd("-var-update --all-values var4")
-        # self.expect("\^done,changelist=\[\{name=\"var4\",value=\"2\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\]")
-        # FIXME -var-update doesn't work
-        self.runCmd("-var-delete var4")
-        self.expect("\^done")
-        self.runCmd("-var-create var4 * b")
-        self.expect(
-            "\^done,name=\"var4\",numchild=\"0\",value=\"2\",type=\"int\",thread-id=\"1\",has_more=\"0\"")
-
-        # Print temp "a + b"
-        self.runCmd("-data-evaluate-expression \"a + b\"")
-        self.expect("\^done,value=\"12\"")
-        self.runCmd("-var-create var5 * \"a + b\"")
-        self.expect(
-            "\^done,name=\"var5\",numchild=\"0\",value=\"12\",type=\"int\",thread-id=\"1\",has_more=\"0\"")
-        self.runCmd("-var-evaluate-expression var5")
-        self.expect("\^done,value=\"12\"")
-        self.runCmd("-var-show-attributes var5")
-        self.expect("\^done,status=\"editable\"")  # FIXME editable or not?
-        self.runCmd("-var-list-children var5")
-        self.expect("\^done,numchild=\"0\",has_more=\"0\"")
-
-        # Print argument "argv[0]"
-        self.runCmd("-data-evaluate-expression \"argv[0]\"")
-        self.expect(
-            "\^done,value=\"0x[0-9a-f]+ \\\\\\\".*?%s\\\\\\\"\"" %
-            self.myexe)
-        self.runCmd("-var-create var6 * \"argv[0]\"")
-        self.expect(
-            "\^done,name=\"var6\",numchild=\"1\",value=\"0x[0-9a-f]+ \\\\\\\".*?%s\\\\\\\"\",type=\"const char \*\",thread-id=\"1\",has_more=\"0\"" %
-            self.myexe)
-        self.runCmd("-var-evaluate-expression var6")
-        self.expect(
-            "\^done,value=\"0x[0-9a-f]+ \\\\\\\".*?%s\\\\\\\"\"" %
-            self.myexe)
-        self.runCmd("-var-show-attributes var6")
-        self.expect("\^done,status=\"editable\"")
-        self.runCmd("-var-list-children --all-values var6")
-        # FIXME: The name below is not correct. It should be "var.*argv[0]".
-        # FIXME -var-list-children shows invalid thread-id
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var6\.\*\$[0-9]+\",exp=\"\*\$[0-9]+\",numchild=\"0\",type=\"const char\",thread-id=\"4294967295\",value=\"47 '/'\",has_more=\"0\"\}\],has_more=\"0\"")
-
-        # Print an expression with spaces and optional arguments
-        self.runCmd("-data-evaluate-expression \"a + b\"")
-        self.expect("\^done,value=\"12\"")
-        self.runCmd("-var-create var7 * \"a + b\" --thread 1 --frame 0")
-        self.expect(
-            "\^done,name=\"var7\",numchild=\"0\",value=\"12\",type=\"int\",thread-id=\"1\",has_more=\"0\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfDarwin
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    def test_lldbmi_var_update(self):
-        """Test that 'lldb-mi --interpreter' works for -var-update."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to BP_var_update_test_init
-        line = line_number('main.cpp', '// BP_var_update_test_init')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Setup variables
-        self.runCmd("-var-create var_l * l")
-        self.expect(
-            "\^done,name=\"var_l\",numchild=\"0\",value=\"1\",type=\"long\",thread-id=\"1\",has_more=\"0\"")
-        self.runCmd("-var-create var_complx * complx")
-        self.expect(
-            "\^done,name=\"var_complx\",numchild=\"3\",value=\"\{\.\.\.\}\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"")
-        self.runCmd("-var-create var_complx_array * complx_array")
-        self.expect(
-            "\^done,name=\"var_complx_array\",numchild=\"2\",value=\"\[2\]\",type=\"complex_type \[2\]\",thread-id=\"1\",has_more=\"0\"")
-
-        # Go to BP_var_update_test_l
-        line = line_number('main.cpp', '// BP_var_update_test_l')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"2\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that var_l was updated
-        self.runCmd("-var-update --all-values var_l")
-        self.expect(
-            "\^done,changelist=\[\{name=\"var_l\",value=\"0\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\]")
-
-        # Go to BP_var_update_test_complx
-        line = line_number('main.cpp', '// BP_var_update_test_complx')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"3\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that var_complx was updated
-        self.runCmd("-var-update --all-values var_complx")
-        self.expect(
-            "\^done,changelist=\[\{name=\"var_complx\",value=\"\{\.\.\.\}\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\]")
-
-        # Go to BP_var_update_test_complx_array
-        line = line_number('main.cpp', '// BP_var_update_test_complx_array')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"4\"")
-        self.runCmd("-exec-continue")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test that var_complex_array was updated
-        self.runCmd("-var-update --all-values var_complx_array")
-        self.expect(
-            "\^done,changelist=\[\{name=\"var_complx_array\",value=\"\[2\]\",in_scope=\"true\",type_changed=\"false\",has_more=\"0\"\}\]")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_var_create_register(self):
-        """Test that 'lldb-mi --interpreter' works for -var-create $regname."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to main
-        self.runCmd("-break-insert -f main")
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Find name of register 0
-        self.runCmd("-data-list-register-names 0")
-        self.expect("\^done,register-names=\[\".+?\"\]")
-        register_name = self.child.after.split("\"")[1]
-
-        # Create variable for register 0
-        # Note that message is different in Darwin and Linux:
-        # Darwin: "^done,name=\"var_reg\",numchild=\"0\",value=\"0x[0-9a-f]+\",type=\"unsigned long\",thread-id=\"1\",has_more=\"0\"
-        # Linux:
-        # "^done,name=\"var_reg\",numchild=\"0\",value=\"0x[0-9a-f]+\",type=\"unsigned
-        # int\",thread-id=\"1\",has_more=\"0\"
-        self.runCmd("-var-create var_reg * $%s" % register_name)
-        self.expect(
-            "\^done,name=\"var_reg\",numchild=\"0\",value=\"0x[0-9a-f]+\",type=\"unsigned (long|int)\",thread-id=\"1\",has_more=\"0\"")
-
-        # Assign value to variable
-        self.runCmd("-var-assign var_reg \"6\"")
-        # FIXME: the output has different format for 32bit and 64bit values
-        self.expect("\^done,value=\"0x0*?6\"")
-
-        # Assert register 0 updated
-        self.runCmd("-data-list-register-values d 0")
-        self.expect("\^done,register-values=\[{number=\"0\",value=\"6\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi tests working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_var_list_children(self):
-        """Test that 'lldb-mi --interpreter' works for -var-list-children."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to BP_var_list_children_test
-        line = line_number('main.cpp', '// BP_var_list_children_test')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Create variable
-        self.runCmd("-var-create var_complx * complx")
-        self.expect(
-            "\^done,name=\"var_complx\",numchild=\"3\",value=\"\{\.\.\.\}\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"")
-        self.runCmd("-var-create var_complx_array * complx_array")
-        self.expect(
-            "\^done,name=\"var_complx_array\",numchild=\"2\",value=\"\[2\]\",type=\"complex_type \[2\]\",thread-id=\"1\",has_more=\"0\"")
-        self.runCmd("-var-create var_pcomplx * pcomplx")
-        self.expect(
-            "\^done,name=\"var_pcomplx\",numchild=\"2\",value=\"\{\.\.\.\}\",type=\"pcomplex_type\",thread-id=\"1\",has_more=\"0\"")
-
-        # Test that -var-evaluate-expression can evaluate the children of
-        # created varobj
-        self.runCmd("-var-list-children var_complx")
-        self.runCmd("-var-evaluate-expression var_complx.i")
-        self.expect("\^done,value=\"3\"")
-        self.runCmd("-var-list-children var_complx_array")
-        self.runCmd("-var-evaluate-expression var_complx_array.[0]")
-        self.expect("\^done,value=\"\{...\}\"")
-        self.runCmd("-var-list-children var_pcomplx")
-        self.runCmd("-var-evaluate-expression var_pcomplx.complex_type")
-        self.expect("\^done,value=\"\{...\}\"")
-
-        # Test that -var-list-children lists empty children if range is empty
-        # (and that print-values is optional)
-        self.runCmd("-var-list-children var_complx 0 0")
-        self.expect("\^done,numchild=\"0\",has_more=\"1\"")
-        self.runCmd("-var-list-children var_complx 99 0")
-        self.expect("\^done,numchild=\"0\",has_more=\"1\"")
-        self.runCmd("-var-list-children var_complx 99 3")
-        self.expect("\^done,numchild=\"0\",has_more=\"0\"")
-
-        # Test that -var-list-children lists all children with their values
-        # (and that from and to are optional)
-        self.runCmd("-var-list-children --all-values var_complx")
-        self.expect(
-            "\^done,numchild=\"3\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",value=\"3\",has_more=\"0\"\},child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\},child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",value=\"0x[0-9a-f]+\",has_more=\"0\"\}\],has_more=\"0\"")
-        self.runCmd("-var-list-children --simple-values var_complx_array")
-        self.expect(
-            "\^done,numchild=\"2\",children=\[child=\{name=\"var_complx_array\.\[0\]\",exp=\"\[0\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\},child=\{name=\"var_complx_array\.\[1\]\",exp=\"\[1\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")
-        self.runCmd("-var-list-children 0 var_pcomplx")
-        self.expect(
-            "\^done,numchild=\"2\",children=\[child=\{name=\"var_pcomplx\.complex_type\",exp=\"complex_type\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\},child={name=\"var_pcomplx\.complx\",exp=\"complx\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")
-
-        # Test that -var-list-children lists children without values
-        self.runCmd("-var-list-children 0 var_complx 0 1")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")
-        self.runCmd("-var-list-children --no-values var_complx 0 1")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.i\",exp=\"i\",numchild=\"0\",type=\"int\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")
-        self.runCmd("-var-list-children --no-values var_complx_array 0 1")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var_complx_array\.\[0\]\",exp=\"\[0\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")
-        self.runCmd("-var-list-children --no-values var_pcomplx 0 1")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var_pcomplx\.complex_type\",exp=\"complex_type\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"1\"")
-
-        # Test that -var-list-children lists children with all values
-        self.runCmd("-var-list-children 1 var_complx 1 2")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"1\"")
-        self.runCmd("-var-list-children --all-values var_complx 1 2")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.inner\",exp=\"inner\",numchild=\"1\",type=\"complex_type::\(anonymous struct\)\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"1\"")
-        self.runCmd("-var-list-children --all-values var_complx_array 1 2")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var_complx_array\.\[1\]\",exp=\"\[1\]\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"0\"")
-        self.runCmd("-var-list-children --all-values var_pcomplx 1 2")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child={name=\"var_pcomplx\.complx\",exp=\"complx\",numchild=\"3\",type=\"complex_type\",thread-id=\"1\",value=\"\{\.\.\.\}\",has_more=\"0\"\}\],has_more=\"0\"")
-
-        # Test that -var-list-children lists children with simple values
-        self.runCmd("-var-list-children 2 var_complx 2 4")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")
-        self.runCmd("-var-list-children --simple-values var_complx 2 4")
-        self.expect(
-            "\^done,numchild=\"1\",children=\[child=\{name=\"var_complx\.complex_ptr\",exp=\"complex_ptr\",numchild=\"3\",type=\"complex_type \*\",thread-id=\"1\",has_more=\"0\"\}\],has_more=\"0\"")
-        self.runCmd("-var-list-children --simple-values var_complx_array 2 4")
-        self.expect("\^done,numchild=\"0\",has_more=\"0\"")
-        self.runCmd("-var-list-children --simple-values var_pcomplx 2 4")
-        self.expect("\^done,numchild=\"0\",has_more=\"0\"")
-
-        # Test that an invalid from is handled
-        # FIXME: -1 is treated as unsigned int
-        self.runCmd("-var-list-children 0 var_complx -1 0")
-        #self.expect("\^error,msg=\"Command 'var-list-children'\. Variable children range invalid\"")
-
-        # Test that an invalid to is handled
-        # FIXME: -1 is treated as unsigned int
-        self.runCmd("-var-list-children 0 var_complx 0 -1")
-        #self.expect("\^error,msg=\"Command 'var-list-children'\. Variable children range invalid\"")
-
-        # Test that a missing low-frame or high-frame is handled
-        self.runCmd("-var-list-children 0 var_complx 0")
-        self.expect(
-            "\^error,msg=\"Command 'var-list-children'. Variable children range invalid\"")
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_var_create_for_stl_types(self):
-        """Test that 'lldb-mi --interpreter' print summary for STL types."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to BP_gdb_set_show_print_char_array_as_string_test
-        line = line_number('main.cpp', '// BP_cpp_stl_types_test')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Test for std::string
-        self.runCmd("-var-create - * std_string")
-        self.expect(
-            '\^done,name="var\d+",numchild="[0-9]+",value="\\\\"hello\\\\"",type="std::[\S]*?string",thread-id="1",has_more="0"')
-
-    @skipIfWindows  # llvm.org/pr24452: Get lldb-mi working on Windows
-    @skipIfFreeBSD  # llvm.org/pr22411: Failure presumably due to known thread races
-    @skipIfLinux  # llvm.org/pr22841: lldb-mi tests fail on all Linux buildbots
-    @skipIfRemote   # We do not currently support remote debugging via the MI.
-    @skipIfDarwin
-    def test_lldbmi_var_create_for_unnamed_objects(self):
-        """Test that 'lldb-mi --interpreter' can expand unnamed structures and unions."""
-
-        self.spawnLldbMi(args=None)
-
-        # Load executable
-        self.runCmd("-file-exec-and-symbols %s" % self.myexe)
-        self.expect("\^done")
-
-        # Run to breakpoint
-        line = line_number('main.cpp', '// BP_unnamed_objects_test')
-        self.runCmd("-break-insert main.cpp:%d" % line)
-        self.expect("\^done,bkpt={number=\"1\"")
-        self.runCmd("-exec-run")
-        self.expect("\^running")
-        self.expect("\*stopped,reason=\"breakpoint-hit\"")
-
-        # Evaluate struct_with_unions type and its children
-        self.runCmd("-var-create v0 * swu")
-        self.expect(
-            '\^done,name="v0",numchild="2",value="\{\.\.\.\}",type="struct_with_unions",thread-id="1",has_more="0"')
-
-        self.runCmd("-var-list-children v0")
-
-        # inspect the first unnamed union
-        self.runCmd("-var-list-children v0.$0")
-        self.runCmd("-var-evaluate-expression v0.$0.u_i")
-        self.expect('\^done,value="1"')
-
-        # inspect the second unnamed union
-        self.runCmd("-var-list-children v0.$1")
-        self.runCmd("-var-evaluate-expression v0.$1.u1")
-        self.expect('\^done,value="-1"')
-        # inspect unnamed structure
-        self.runCmd("-var-list-children v0.$1.$1")
-        self.runCmd("-var-evaluate-expression v0.$1.$1.s1")
-        self.expect('\^done,value="-1"')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/main.cpp
deleted file mode 100644
index 43ae8be..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-mi/variable/main.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-//===-- main.cpp ------------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <cstdint>
-#include <string>
-
-struct complex_type
-{
-    int i;
-    struct { long l; } inner;
-    complex_type *complex_ptr;
-};
-
-struct pcomplex_type : complex_type
-{
-    pcomplex_type(const complex_type &complx_base, const complex_type &complx_member)
-        : complex_type(complx_base), complx(complx_member) { }
-    complex_type complx;
-    static int si;
-};
-
-int pcomplex_type::si;
-
-struct struct_with_unions
-{
-    struct_with_unions(): u_i(1), u1(-1) {}
-    union 
-    {
-        int u_i;
-        int u_j;  
-    };
-    union 
-    {
-        int  u1;
-        struct
-        {
-            short s1;
-            short s2;
-        };
-    };
-};
-
-void
-var_update_test(void)
-{
-    long l = 1;
-    complex_type complx = { 3, { 3L }, &complx };
-    complex_type complx_array[2] = { { 4, { 4L }, &complx_array[1] }, { 5, { 5 }, &complx_array[0] } };
-    // BP_var_update_test_init
-
-    l = 0;
-    // BP_var_update_test_l
-
-    complx.inner.l = 2;
-    // BP_var_update_test_complx
-
-    complx_array[1].inner.l = 4;
-    // BP_var_update_test_complx_array
-}
-
-void
-var_list_children_test(void)
-{
-    complex_type complx = { 3, { 3L }, &complx };
-    complex_type complx_array[2] = { { 4, { 4L }, &complx_array[1] }, { 5, { 5 }, &complx_array[0] } };
-    pcomplex_type pcomplx({ 6, { 6L }, &pcomplx}, { 7, { 7L }, &pcomplx});
-
-    // BP_var_list_children_test
-}
-
-void
-gdb_set_show_print_char_array_as_string_test(void)
-{
-    const char *cp = "\t\"hello\"\n";
-    const char ca[] = "\t\"hello\"\n";
-    const char16_t *u16p = u"\t\"hello\"\n";
-    const char16_t u16a[] = u"\t\"hello\"\n";
-    const char32_t *u32p = U"\t\"hello\"\n";
-    const char32_t u32a[] = U"\t\"hello\"\n";
-
-    const char16_t* u16p_rus = u"\\Аламо-сквер";
-    const char16_t  u16a_rus[] = u"\\Бейвью";
-    const char32_t* u32p_rus = U"\\Чайнатаун";
-    const char32_t  u32a_rus[] = U"\\Догпатч";
-
-    // BP_gdb_set_show_print_char_array_as_string_test
-}
-
-void
-cpp_stl_types_test(void)
-{
-    std::string std_string = "hello";
-    // BP_cpp_stl_types_test
-}
-
-void
-unnamed_objects_test(void)
-{
-    struct_with_unions swu;
-    // BP_unnamed_objects_test
-}
-
-struct not_str
-{
-    not_str(char _c, int _f)
-        : c(_c), f(_f) { }
-    char c;
-    int f;
-};
-
-void
-gdb_set_show_print_expand_aggregates(void)
-{
-    complex_type complx = { 3, { 3L }, &complx };
-    complex_type complx_array[2] = { { 4, { 4L }, &complx_array[1] }, { 5, { 5 }, &complx_array[0] } };
-    not_str nstr('a', 0);
-
-    // BP_gdb_set_show_print_expand_aggregates
-}
-
-void
-gdb_set_show_print_aggregate_field_names(void)
-{
-    complex_type complx = { 3, { 3L }, &complx };
-    complex_type complx_array[2] = { { 4, { 4L }, &complx_array[1] }, { 5, { 5 }, &complx_array[0] } };
-
-    // BP_gdb_set_show_print_aggregate_field_names
-}
-
-int g_MyVar = 3;
-static int s_MyVar = 4;
-
-int
-main(int argc, char const *argv[])
-{
-    int a = 10, b = 20;
-    s_MyVar = a + b;
-    var_update_test();
-    var_list_children_test();
-    gdb_set_show_print_char_array_as_string_test();
-    cpp_stl_types_test();
-    unnamed_objects_test();
-    gdb_set_show_print_expand_aggregates();
-    gdb_set_show_print_aggregate_field_names();
-    return 0; // BP_return
-}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
index 28aba3c..0c441ed 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../make
-
-override CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 MAKE_DSYM :=NO
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py
index ab01e44..5ea55c3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestAppleSimulatorOSType.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 
 import gdbremote_testcase
@@ -46,7 +45,7 @@
         self.build(dictionary={ 'EXE': exe_name, 'SDKROOT': sdkroot.strip(),
                                 'ARCH': arch })
         exe_path = self.getBuildArtifact(exe_name)
-        sim_launcher = subprocess.Popen(['xcrun', 'simctl', 'spawn',
+        sim_launcher = subprocess.Popen(['xcrun', 'simctl', 'spawn', '-s',
                                          deviceUDID, exe_path,
                                          'print-pid', 'sleep:10'],
                                         stderr=subprocess.PIPE)
@@ -103,21 +102,21 @@
 
     @apple_simulator_test('iphone')
     @debugserver_test
-    @skipIfDarwinEmbedded
+    @skipIfRemote
     def test_simulator_ostype_ios(self):
         self.check_simulator_ostype(sdk='iphonesimulator',
                                     platform='ios')
 
     @apple_simulator_test('appletv')
     @debugserver_test
-    @skipIfDarwinEmbedded
+    @skipIfRemote
     def test_simulator_ostype_tvos(self):
         self.check_simulator_ostype(sdk='appletvsimulator',
                                     platform='tvos')
 
     @apple_simulator_test('watch')
     @debugserver_test
-    @skipIfDarwinEmbedded
+    @skipIfRemote
     def test_simulator_ostype_watchos(self):
         self.check_simulator_ostype(sdk='watchsimulator',
                                     platform='watchos', arch='i386')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py
index 1696b59..dbb83d6 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAttach.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 
 import gdbremote_testcase
@@ -59,6 +58,7 @@
         self.set_inferior_startup_attach_manually()
         self.attach_with_vAttach()
 
+    @expectedFailureNetBSD
     @llgs_test
     def test_attach_with_vAttach_llgs(self):
         self.init_llgs_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
index 3c87ee6..1a3a2b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteAuxvSupport.py
@@ -104,6 +104,7 @@
     # tests don't get skipped.
     #
 
+    @skipIfWindows # no auxv support.
     @llgs_test
     def test_supports_auxv_llgs(self):
         self.init_llgs_test()
@@ -127,6 +128,8 @@
         self.set_inferior_startup_launch()
         self.auxv_data_is_correct_size()
 
+    @skipIfWindows
+    @expectedFailureNetBSD
     @llgs_test
     def test_auxv_data_is_correct_size_llgs(self):
         self.init_llgs_test()
@@ -165,6 +168,8 @@
         self.set_inferior_startup_launch()
         self.auxv_keys_look_valid()
 
+    @skipIfWindows
+    @expectedFailureNetBSD
     @llgs_test
     def test_auxv_keys_look_valid_llgs(self):
         self.init_llgs_test()
@@ -212,6 +217,8 @@
         self.set_inferior_startup_launch()
         self.auxv_chunked_reads_work()
 
+    @skipIfWindows
+    @expectedFailureNetBSD
     @llgs_test
     def test_auxv_chunked_reads_work_llgs(self):
         self.init_llgs_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExitCode.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExitCode.py
index 5ef4249..24fb0d5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExitCode.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteExitCode.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 # lldb test suite imports
 from lldbsuite.test.decorators import *
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py
index 464cdce..832096a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteHostInfo.py
@@ -24,6 +24,7 @@
         "os_build",
         "os_kernel",
         "os_version",
+        "maccatalyst_version",
         "ptrsize",
         "triple",
         "vendor",
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py
index 6b8ed3b..48f919a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteKill.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 
 import gdbremote_testcase
@@ -14,24 +13,25 @@
     @skipIfDarwinEmbedded # <rdar://problem/34539270> lldb-server tests not updated to work on ios etc yet
 
     def attach_commandline_kill_after_initial_stop(self):
+        reg_expr = r"^\$[XW][0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}"
         procs = self.prep_debug_monitor_and_inferior()
         self.test_sequence.add_log_lines([
             "read packet: $k#6b",
-            {"direction": "send", "regex": r"^\$X[0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}"},
+            {"direction": "send", "regex": reg_expr},
         ], True)
 
         if self.stub_sends_two_stop_notifications_on_kill:
             # Add an expectation for a second X result for stubs that send two
             # of these.
             self.test_sequence.add_log_lines([
-                {"direction": "send", "regex": r"^\$X[0-9a-fA-F]+([^#]*)#[0-9A-Fa-f]{2}"},
+                {"direction": "send", "regex": reg_expr},
             ], True)
 
         self.expect_gdbremote_sequence()
 
         # Wait a moment for completed and now-detached inferior process to
         # clear.
-        time.sleep(1)
+        time.sleep(self._WAIT_TIMEOUT)
 
         if not lldb.remote_platform:
             # Process should be dead now. Reap results.
@@ -51,6 +51,7 @@
         self.set_inferior_startup_attach()
         self.attach_commandline_kill_after_initial_stop()
 
+    @expectedFailureNetBSD
     @llgs_test
     def test_attach_commandline_kill_after_initial_stop_llgs(self):
         self.init_llgs_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py
index ef96b55..5e94dbc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteModuleInfo.py
@@ -1,6 +1,5 @@
-from __future__ import print_function
 
-
+import json
 import gdbremote_testcase
 import lldbgdbserverutils
 from lldbsuite.support import seven
@@ -20,9 +19,9 @@
         info = self.parse_process_info_response(context)
 
         self.test_sequence.add_log_lines([
-            'read packet: $jModulesInfo:[{"file":"%s","triple":"%s"}]]#00' % (
-                lldbutil.append_to_process_working_directory(self, "a.out"),
-                seven.unhexlify(info["triple"])),
+            'read packet: $jModulesInfo:%s]#00' % json.dumps(
+                [{"file":lldbutil.append_to_process_working_directory(self, "a.out"),
+                  "triple":seven.unhexlify(info["triple"])}]),
             {"direction": "send",
              "regex": r'^\$\[{(.*)}\]\]#[0-9A-Fa-f]{2}',
              "capture": {1: "spec"}},
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
index 4f7123d..bc793a3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteProcessInfo.py
@@ -1,7 +1,5 @@
-from __future__ import print_function
 
 
-import sys
 
 import gdbremote_testcase
 import lldbgdbserverutils
@@ -54,7 +52,7 @@
         self.add_process_info_collection_packets()
 
         # Run the stream
-        context = self.expect_gdbremote_sequence(timeout_seconds=8)
+        context = self.expect_gdbremote_sequence(timeout_seconds=self._DEFAULT_TIMEOUT)
         self.assertIsNotNone(context)
 
         # Gather process info response
@@ -76,6 +74,7 @@
         self.set_inferior_startup_attach()
         self.attach_commandline_qProcessInfo_reports_correct_pid()
 
+    @expectedFailureNetBSD
     @llgs_test
     def test_attach_commandline_qProcessInfo_reports_correct_pid_llgs(self):
         self.init_llgs_test()
@@ -175,12 +174,11 @@
         self.build()
         self.qProcessInfo_contains_keys(set(['cputype', 'cpusubtype']))
 
-    @skipUnlessPlatform(["linux"])
     @llgs_test
-    def test_qProcessInfo_contains_triple_llgs_linux(self):
+    def test_qProcessInfo_contains_triple_ppid_llgs(self):
         self.init_llgs_test()
         self.build()
-        self.qProcessInfo_contains_keys(set(['triple']))
+        self.qProcessInfo_contains_keys(set(['triple', 'parent-pid']))
 
     @skipUnlessDarwin
     @debugserver_test
@@ -203,9 +201,9 @@
         # for the remote Host and Process.
         self.qProcessInfo_does_not_contain_keys(set(['triple']))
 
-    @skipUnlessPlatform(["linux"])
+    @skipIfDarwin
     @llgs_test
-    def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs_linux(self):
+    def test_qProcessInfo_does_not_contain_cputype_cpusubtype_llgs(self):
         self.init_llgs_test()
         self.build()
         self.qProcessInfo_does_not_contain_keys(set(['cputype', 'cpusubtype']))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py
index f4e1851..c6c7502 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteSingleStep.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 
 import gdbremote_testcase
@@ -20,6 +19,7 @@
         self.single_step_only_steps_one_instruction(
             use_Hc_packet=True, step_instruction="s")
 
+    @skipIfWindows # No pty support to test any inferior std -i/e/o
     @llgs_test
     @expectedFailureAndroid(
         bugnumber="llvm.org/pr24739",
@@ -28,9 +28,7 @@
             "aarch64"])
     @expectedFailureAll(
         oslist=["linux"],
-        archs=[
-            "arm",
-            "aarch64"],
+        archs=["arm"],
         bugnumber="llvm.org/pr24739")
     @skipIf(triple='^mips')
     def test_single_step_only_steps_one_instruction_with_s_llgs(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
index 2bf0952..f9bd668 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemoteThreadsInStopReply.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import json
 import re
@@ -43,7 +42,7 @@
         hw_info = self.parse_hw_info(context)
 
         # Give threads time to start up, then break.
-        time.sleep(1)
+        time.sleep(self._WAIT_TIMEOUT)
         self.reset_test_sequence()
         self.test_sequence.add_log_lines(
             [
@@ -61,7 +60,8 @@
         self.assertIsNotNone(context)
 
         # Wait until all threads have started.
-        threads = self.wait_for_thread_count(thread_count, timeout_seconds=3)
+        threads = self.wait_for_thread_count(thread_count,
+                                             timeout_seconds=self._WAIT_TIMEOUT)
         self.assertIsNotNone(threads)
         self.assertEqual(len(threads), thread_count)
 
@@ -205,6 +205,12 @@
         self.set_inferior_startup_launch()
         self.stop_reply_reports_multiple_threads(5)
 
+    # In current implementation of llgs on Windows, as a response to '\x03' packet, the debugger
+    # of the native process will trigger a call to DebugBreakProcess that will create a new thread
+    # to handle the exception debug event. So one more stop thread will be notified to the
+    # delegate, e.g. llgs.  So tests below to assert the stop threads number will all fail.
+    @expectedFailureAll(oslist=["windows"])
+    @skipIfNetBSD
     @llgs_test
     def test_stop_reply_reports_multiple_threads_llgs(self):
         self.init_llgs_test()
@@ -226,6 +232,8 @@
         self.set_inferior_startup_launch()
         self.no_QListThreadsInStopReply_supplies_no_threads(5)
 
+    @expectedFailureAll(oslist=["windows"])
+    @skipIfNetBSD
     @llgs_test
     def test_no_QListThreadsInStopReply_supplies_no_threads_llgs(self):
         self.init_llgs_test()
@@ -263,6 +271,8 @@
         self.set_inferior_startup_launch()
         self.stop_reply_reports_correct_threads(5)
 
+    @expectedFailureAll(oslist=["windows"])
+    @skipIfNetBSD
     @llgs_test
     def test_stop_reply_reports_correct_threads_llgs(self):
         self.init_llgs_test()
@@ -287,6 +297,8 @@
             self.assertTrue(int(stop_reply_pcs[thread_id], 16)
                     == int(threads_info_pcs[thread_id], 16))
 
+    @expectedFailureAll(oslist=["windows"])
+    @skipIfNetBSD
     @llgs_test
     def test_stop_reply_contains_thread_pcs_llgs(self):
         self.init_llgs_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
index a25484e..51dd0cb1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_qThreadStopInfo.py
@@ -1,7 +1,5 @@
-from __future__ import print_function
 
 
-import sys
 
 import unittest2
 import gdbremote_testcase
@@ -35,7 +33,7 @@
         self.assertIsNotNone(context)
 
         # Give threads time to start up, then break.
-        time.sleep(1)
+        time.sleep(self._WAIT_TIMEOUT)
         self.reset_test_sequence()
         self.test_sequence.add_log_lines(
             [
@@ -53,9 +51,18 @@
         self.assertIsNotNone(context)
 
         # Wait until all threads have started.
-        threads = self.wait_for_thread_count(thread_count, timeout_seconds=3)
+        threads = self.wait_for_thread_count(thread_count,
+                                             timeout_seconds=self._WAIT_TIMEOUT)
         self.assertIsNotNone(threads)
-        self.assertEqual(len(threads), thread_count)
+
+        # On Windows, there could be more threads spawned. For example, DebugBreakProcess will
+        # create a new thread from the debugged process to handle an exception event. So here we
+        # assert 'GreaterEqual' condition.
+        triple = self.dbg.GetSelectedPlatform().GetTriple()
+        if re.match(".*-.*-windows", triple):
+            self.assertGreaterEqual(len(threads), thread_count)
+        else:
+            self.assertEqual(len(threads), thread_count)
 
         # Grab stop reply for each thread via qThreadStopInfo{tid:hex}.
         stop_replies = {}
@@ -102,7 +109,12 @@
 
     def qThreadStopInfo_works_for_multiple_threads(self, thread_count):
         (stop_replies, _) = self.gather_stop_replies_via_qThreadStopInfo(thread_count)
-        self.assertEqual(len(stop_replies), thread_count)
+        triple = self.dbg.GetSelectedPlatform().GetTriple()
+        # Consider one more thread created by calling DebugBreakProcess.
+        if re.match(".*-.*-windows", triple):
+            self.assertGreaterEqual(len(stop_replies), thread_count)
+        else:
+            self.assertEqual(len(stop_replies), thread_count)
 
     @debugserver_test
     def test_qThreadStopInfo_works_for_multiple_threads_debugserver(self):
@@ -112,6 +124,7 @@
         self.qThreadStopInfo_works_for_multiple_threads(self.THREAD_COUNT)
 
     @llgs_test
+    @skipIfNetBSD
     def test_qThreadStopInfo_works_for_multiple_threads_llgs(self):
         self.init_llgs_test()
         self.build()
@@ -131,7 +144,13 @@
                 stop_replies.values()) if stop_reason != 0)
 
         # All but one thread should report no stop reason.
-        self.assertEqual(no_stop_reason_count, thread_count - 1)
+        triple = self.dbg.GetSelectedPlatform().GetTriple()
+
+        # Consider one more thread created by calling DebugBreakProcess.
+        if re.match(".*-.*-windows", triple):
+            self.assertGreaterEqual(no_stop_reason_count, thread_count - 1)
+        else:
+            self.assertEqual(no_stop_reason_count, thread_count - 1)
 
         # Only one thread should should indicate a stop reason.
         self.assertEqual(with_stop_reason_count, 1)
@@ -145,6 +164,7 @@
         self.qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt(
             self.THREAD_COUNT)
 
+    @expectedFailureNetBSD
     @llgs_test
     def test_qThreadStopInfo_only_reports_one_thread_stop_reason_during_interrupt_llgs(
             self):
@@ -173,7 +193,8 @@
         self.qThreadStopInfo_has_valid_thread_names(self.THREAD_COUNT, "a.out")
 
     # test requires OS with set, equal thread names by default.
-    @skipUnlessPlatform(["linux"])
+    # Windows thread does not have name property, equal names as the process's by default.
+    @skipUnlessPlatform(["linux", "windows"])
     @llgs_test
     def test_qThreadStopInfo_has_valid_thread_names_llgs(self):
         self.init_llgs_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py
index f0380c71..3511b01 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vCont.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import gdbremote_testcase
 from lldbsuite.test.decorators import *
@@ -105,6 +104,7 @@
         self.single_step_only_steps_one_instruction(
             use_Hc_packet=True, step_instruction="vCont;s")
 
+    @skipIfWindows # No pty support to test O* & I* notification packets.
     @llgs_test
     @expectedFailureAndroid(
         bugnumber="llvm.org/pr24739",
@@ -113,9 +113,7 @@
             "aarch64"])
     @expectedFailureAll(
         oslist=["linux"],
-        archs=[
-            "arm",
-            "aarch64"],
+        archs=["arm"],
         bugnumber="llvm.org/pr24739")
     @skipIf(triple='^mips')
     @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
@@ -136,6 +134,7 @@
         self.single_step_only_steps_one_instruction(
             use_Hc_packet=False, step_instruction="vCont;s:{thread}")
 
+    @skipIfWindows # No pty support to test O* & I* notification packets.
     @llgs_test
     @expectedFailureAndroid(
         bugnumber="llvm.org/pr24739",
@@ -144,9 +143,7 @@
             "aarch64"])
     @expectedFailureAll(
         oslist=["linux"],
-        archs=[
-            "arm",
-            "aarch64"],
+        archs=["arm"],
         bugnumber="llvm.org/pr24739")
     @skipIf(triple='^mips')
     @expectedFailureAll(oslist=["ios", "tvos", "watchos", "bridgeos"], bugnumber="rdar://27005337")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py
new file mode 100644
index 0000000..e16a28a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestGdbRemote_vContThreads.py
@@ -0,0 +1,148 @@
+
+import json
+import re
+
+import gdbremote_testcase
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import lldbutil
+
+class TestGdbRemote_vContThreads(gdbremote_testcase.GdbRemoteTestCaseBase):
+    mydir = TestBase.compute_mydir(__file__)
+
+    def start_threads(self, num):
+        procs = self.prep_debug_monitor_and_inferior(
+            inferior_args=['thread:new'] * num + ['@started'])
+        # start the process and wait for output
+        self.test_sequence.add_log_lines([
+            "read packet: $c#63",
+            {"type": "output_match", "regex": self.maybe_strict_output_regex(
+                r"@started\r\n")},
+        ], True)
+        # then interrupt it
+        self.add_interrupt_packets()
+        self.add_threadinfo_collection_packets()
+
+        context = self.expect_gdbremote_sequence()
+        self.assertIsNotNone(context)
+        threads = self.parse_threadinfo_packets(context)
+        self.assertIsNotNone(threads)
+        self.assertEqual(len(threads), num + 1)
+
+        self.reset_test_sequence()
+        return threads
+
+    def signal_one_thread(self):
+        threads = self.start_threads(1)
+        # try sending a signal to one of the two threads
+        self.test_sequence.add_log_lines([
+            "read packet: $vCont;C{0:x}:{1:x};c#00".format(
+                lldbutil.get_signal_number('SIGUSR1'), threads[0]),
+            {"direction": "send", "regex": r"^\$W00#b7$"},
+        ], True)
+
+        context = self.expect_gdbremote_sequence()
+        self.assertIsNotNone(context)
+
+    @skipUnlessPlatform(["netbsd"])
+    @debugserver_test
+    def test_signal_one_thread_debugserver(self):
+        self.init_debugserver_test()
+        self.build()
+        self.set_inferior_startup_launch()
+        self.signal_one_thread()
+
+    @skipUnlessPlatform(["netbsd"])
+    @llgs_test
+    def test_signal_one_thread_llgs(self):
+        self.init_llgs_test()
+        self.build()
+        self.set_inferior_startup_launch()
+        self.signal_one_thread()
+
+    def signal_all_threads(self):
+        threads = self.start_threads(1)
+        # try sending a signal to two threads (= the process)
+        self.test_sequence.add_log_lines([
+            "read packet: $vCont;C{0:x}:{1:x};C{0:x}:{2:x}#00".format(
+                lldbutil.get_signal_number('SIGUSR1'),
+                threads[0], threads[1]),
+            {"direction": "send", "regex": r"^\$W00#b7$"},
+        ], True)
+
+        context = self.expect_gdbremote_sequence()
+        self.assertIsNotNone(context)
+
+    @skipUnlessPlatform(["netbsd"])
+    @debugserver_test
+    def test_signal_all_threads_debugserver(self):
+        self.init_debugserver_test()
+        self.build()
+        self.set_inferior_startup_launch()
+        self.signal_all_threads()
+
+    @skipUnlessPlatform(["netbsd"])
+    @llgs_test
+    def test_signal_all_threads_llgs(self):
+        self.init_llgs_test()
+        self.build()
+        self.set_inferior_startup_launch()
+        self.signal_all_threads()
+
+    def signal_two_of_three_threads(self):
+        threads = self.start_threads(2)
+        # try sending a signal to 2 out of 3 threads
+        self.test_sequence.add_log_lines([
+            "read packet: $vCont;C{0:x}:{1:x};C{0:x}:{2:x};c#00".format(
+                lldbutil.get_signal_number('SIGUSR1'),
+                threads[1], threads[2]),
+            {"direction": "send", "regex": r"^\$E1e#db$"},
+        ], True)
+
+        context = self.expect_gdbremote_sequence()
+        self.assertIsNotNone(context)
+
+    @skipUnlessPlatform(["netbsd"])
+    @debugserver_test
+    def test_signal_two_of_three_threads_debugserver(self):
+        self.init_debugserver_test()
+        self.build()
+        self.set_inferior_startup_launch()
+        self.signal_two_of_three_threads()
+
+    @skipUnlessPlatform(["netbsd"])
+    @llgs_test
+    def test_signal_two_of_three_threads_llgs(self):
+        self.init_llgs_test()
+        self.build()
+        self.set_inferior_startup_launch()
+        self.signal_two_of_three_threads()
+
+    def signal_two_signals(self):
+        threads = self.start_threads(1)
+        # try sending two different signals to two threads
+        self.test_sequence.add_log_lines([
+            "read packet: $vCont;C{0:x}:{1:x};C{2:x}:{3:x}#00".format(
+                lldbutil.get_signal_number('SIGUSR1'), threads[0],
+                lldbutil.get_signal_number('SIGUSR2'), threads[1]),
+            {"direction": "send", "regex": r"^\$E1e#db$"},
+        ], True)
+
+        context = self.expect_gdbremote_sequence()
+        self.assertIsNotNone(context)
+
+    @skipUnlessPlatform(["netbsd"])
+    @debugserver_test
+    def test_signal_two_signals_debugserver(self):
+        self.init_debugserver_test()
+        self.build()
+        self.set_inferior_startup_launch()
+        self.signal_two_signals()
+
+    @skipUnlessPlatform(["netbsd"])
+    @llgs_test
+    def test_signal_two_signals_llgs(self):
+        self.init_llgs_test()
+        self.build()
+        self.set_inferior_startup_launch()
+        self.signal_two_signals()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
index a3bad68..2b7f28a 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/TestLldbGdbServer.py
@@ -16,8 +16,6 @@
 import unittest2
 import gdbremote_testcase
 import lldbgdbserverutils
-import platform
-import signal
 from lldbsuite.support import seven
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
@@ -158,6 +156,7 @@
         self.build()
         self.inferior_print_exit()
 
+    @skipIfWindows # No pty support to test any inferior output
     @llgs_test
     @expectedFlakeyLinux("llvm.org/pr25652")
     def test_inferior_print_exit_llgs(self):
@@ -231,6 +230,7 @@
         self.set_inferior_startup_attach()
         self.attach_commandline_continue_app_exits()
 
+    @expectedFailureNetBSD
     @llgs_test
     def test_attach_commandline_continue_app_exits_llgs(self):
         self.init_llgs_test()
@@ -436,6 +436,8 @@
             self.targetHasAVX(),
             "Advanced Vector Extensions" in register_sets)
 
+    @expectedFailureAll(oslist=["windows"]) # no avx for now.
+    @expectedFailureNetBSD
     @llgs_test
     def test_qRegisterInfo_contains_avx_registers_llgs(self):
         self.init_llgs_test()
@@ -480,6 +482,8 @@
         self.set_inferior_startup_attach()
         self.qThreadInfo_contains_thread()
 
+    @expectedFailureAll(oslist=["windows"]) # expect one more thread stopped
+    @expectedFailureNetBSD
     @llgs_test
     def test_qThreadInfo_contains_thread_attach_llgs(self):
         self.init_llgs_test()
@@ -538,6 +542,8 @@
         self.set_inferior_startup_attach()
         self.qThreadInfo_matches_qC()
 
+    @expectedFailureAll(oslist=["windows"]) # expect one more thread stopped
+    @expectedFailureNetBSD
     @llgs_test
     def test_qThreadInfo_matches_qC_attach_llgs(self):
         self.init_llgs_test()
@@ -601,6 +607,7 @@
         self.set_inferior_startup_launch()
         self.p_returns_correct_data_size_for_each_qRegisterInfo()
 
+    @expectedFailureNetBSD
     @llgs_test
     def test_p_returns_correct_data_size_for_each_qRegisterInfo_launch_llgs(
             self):
@@ -618,6 +625,7 @@
         self.set_inferior_startup_attach()
         self.p_returns_correct_data_size_for_each_qRegisterInfo()
 
+    @expectedFailureNetBSD
     @llgs_test
     def test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs(
             self):
@@ -637,7 +645,7 @@
         self.run_process_then_stop(run_seconds=1)
 
         # Wait at most x seconds for 3 threads to be present.
-        threads = self.wait_for_thread_count(3, timeout_seconds=5)
+        threads = self.wait_for_thread_count(3, timeout_seconds=self._WAIT_TIMEOUT)
         self.assertEqual(len(threads), 3)
 
         # verify we can $H to each thead, and $qC matches the thread we set.
@@ -666,6 +674,7 @@
         self.set_inferior_startup_launch()
         self.Hg_switches_to_3_threads()
 
+    @expectedFailureAll(oslist=["windows"]) # expect 4 threads
     @llgs_test
     def test_Hg_switches_to_3_threads_launch_llgs(self):
         self.init_llgs_test()
@@ -681,6 +690,8 @@
         self.set_inferior_startup_attach()
         self.Hg_switches_to_3_threads()
 
+    @expectedFailureAll(oslist=["windows"]) # expecting one more thread
+    @expectedFailureNetBSD
     @llgs_test
     def test_Hg_switches_to_3_threads_attach_llgs(self):
         self.init_llgs_test()
@@ -731,7 +742,7 @@
                                                             2: "thread_id"}}],
                                              True)
 
-            context = self.expect_gdbremote_sequence(timeout_seconds=10)
+            context = self.expect_gdbremote_sequence(timeout_seconds=self._DEFAULT_TIMEOUT)
             self.assertIsNotNone(context)
             signo = context.get("signo")
             self.assertEqual(int(signo, 16), segfault_signo)
@@ -767,7 +778,8 @@
                 True)
 
             # Run the sequence.
-            context = self.expect_gdbremote_sequence(timeout_seconds=10)
+            context = self.expect_gdbremote_sequence(
+                timeout_seconds=self._DEFAULT_TIMEOUT)
             self.assertIsNotNone(context)
 
             # Ensure the stop signal is the signal we delivered.
@@ -810,6 +822,8 @@
         # expectations about fixed signal numbers.
         self.Hc_then_Csignal_signals_correct_thread(self.TARGET_EXC_BAD_ACCESS)
 
+    @skipIfWindows # no SIGSEGV support
+    @expectedFailureNetBSD
     @llgs_test
     def test_Hc_then_Csignal_signals_correct_thread_launch_llgs(self):
         self.init_llgs_test()
@@ -878,6 +892,7 @@
         self.set_inferior_startup_launch()
         self.m_packet_reads_memory()
 
+    @skipIfWindows # No pty support to test any inferior output
     @llgs_test
     def test_m_packet_reads_memory_llgs(self):
         self.init_llgs_test()
@@ -968,6 +983,7 @@
         self.set_inferior_startup_launch()
         self.qMemoryRegionInfo_reports_code_address_as_executable()
 
+    @skipIfWindows # No pty support to test any inferior output
     @llgs_test
     def test_qMemoryRegionInfo_reports_code_address_as_executable_llgs(self):
         self.init_llgs_test()
@@ -1033,6 +1049,7 @@
         self.set_inferior_startup_launch()
         self.qMemoryRegionInfo_reports_stack_address_as_readable_writeable()
 
+    @skipIfWindows # No pty support to test any inferior output
     @llgs_test
     def test_qMemoryRegionInfo_reports_stack_address_as_readable_writeable_llgs(
             self):
@@ -1098,6 +1115,7 @@
         self.set_inferior_startup_launch()
         self.qMemoryRegionInfo_reports_heap_address_as_readable_writeable()
 
+    @skipIfWindows # No pty support to test any inferior output
     @llgs_test
     def test_qMemoryRegionInfo_reports_heap_address_as_readable_writeable_llgs(
             self):
@@ -1250,6 +1268,7 @@
         self.set_inferior_startup_launch()
         self.breakpoint_set_and_remove_work(want_hardware=False)
 
+    @skipIfWindows # No pty support to test any inferior output
     @llgs_test
     @expectedFlakeyLinux("llvm.org/pr25652")
     def test_software_breakpoint_set_and_remove_work_llgs(self):
@@ -1279,7 +1298,6 @@
 
     @llgs_test
     @skipUnlessPlatform(oslist=['linux'])
-    @expectedFailureAndroid
     @skipIf(archs=no_match(['arm', 'aarch64']))
     def test_hardware_breakpoint_set_and_remove_work_llgs(self):
         self.init_llgs_test()
@@ -1387,6 +1405,7 @@
         self.set_inferior_startup_launch()
         self.written_M_content_reads_back_correctly()
 
+    @skipIfWindows # No pty support to test any inferior output
     @llgs_test
     @expectedFlakeyLinux("llvm.org/pr25652")
     def test_written_M_content_reads_back_correctly_llgs(self):
@@ -1475,7 +1494,7 @@
         self.assertIsNotNone(context)
 
         # Wait for 3 threads to be present.
-        threads = self.wait_for_thread_count(3, timeout_seconds=5)
+        threads = self.wait_for_thread_count(3, timeout_seconds=self._WAIT_TIMEOUT)
         self.assertEqual(len(threads), 3)
 
         expected_reg_values = []
@@ -1562,6 +1581,7 @@
         self.set_inferior_startup_launch()
         self.P_and_p_thread_suffix_work()
 
+    @skipIfWindows
     @llgs_test
     def test_P_and_p_thread_suffix_work_llgs(self):
         self.init_llgs_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py
index 102f2e3..664b600 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubReverseConnect.py
@@ -5,7 +5,6 @@
 import re
 import select
 import socket
-import time
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -15,7 +14,7 @@
 
     mydir = TestBase.compute_mydir(__file__)
 
-    _DEFAULT_TIMEOUT = 20
+    _DEFAULT_TIMEOUT = 20 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
 
     def setUp(self):
         # Set up the test.
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubSetSID.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubSetSID.py
index 27daf30..4641b17 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubSetSID.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/commandline/TestStubSetSID.py
@@ -1,12 +1,9 @@
-from __future__ import print_function
 
 
 import gdbremote_testcase
 import lldbgdbserverutils
 import os
 import select
-import tempfile
-import time
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -49,6 +46,7 @@
         self.set_inferior_startup_launch()
         self.sid_is_same_without_setsid()
 
+    @skipIfWindows
     @llgs_test
     @skipIfRemote  # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
     @expectedFailureAll(oslist=['freebsd'])
@@ -64,6 +62,7 @@
         self.set_inferior_startup_launch()
         self.sid_is_different_with_setsid()
 
+    @skipIfWindows
     @llgs_test
     @skipIfRemote  # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
     def test_sid_is_different_with_setsid_llgs(self):
@@ -78,6 +77,7 @@
         self.set_inferior_startup_launch()
         self.sid_is_different_with_S()
 
+    @skipIfWindows
     @llgs_test
     @skipIfRemote  # --setsid not used on remote platform and currently it is also impossible to get the sid of lldb-platform running on a remote target
     def test_sid_is_different_with_S_llgs(self):
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
index e7c63bf..ac611bc 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -8,11 +8,9 @@
 import errno
 import os
 import os.path
-import platform
 import random
 import re
 import select
-import signal
 import socket
 import subprocess
 import sys
@@ -33,7 +31,10 @@
 
     NO_DEBUG_INFO_TESTCASE = True
 
-    _TIMEOUT_SECONDS = 120
+    _TIMEOUT_SECONDS = 120 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
+    _DEFAULT_TIMEOUT =  10 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
+    _READ_TIMEOUT    =   5 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
+    _WAIT_TIMEOUT    =   5 * (10 if ('ASAN_OPTIONS' in os.environ) else 1)
 
     _GDBREMOTE_KILL_PACKET = "$k#6b"
 
@@ -203,7 +204,7 @@
 
         return (named_pipe_path, named_pipe, named_pipe_fd)
 
-    def get_stub_port_from_named_socket(self, read_timeout_seconds=5):
+    def get_stub_port_from_named_socket(self, read_timeout_seconds):
         # Wait for something to read with a max timeout.
         (ready_readers, _, _) = select.select(
             [self.named_pipe_fd], [], [], read_timeout_seconds)
@@ -235,6 +236,10 @@
             # Remote platforms don't support named pipe based port negotiation
             use_named_pipe = False
 
+            triple = self.dbg.GetSelectedPlatform().GetTriple()
+            if re.match(".*-.*-windows", triple):
+                self.skipTest("Remotely testing is not supported on Windows yet.")
+
             # Grab the ppid from /proc/[shell pid]/stat
             err, retcode, shell_stat = self.run_platform_command(
                 "cat /proc/$$/stat")
@@ -260,6 +265,10 @@
             # Remove if it's there.
             self.debug_monitor_exe = re.sub(r' \(deleted\)$', '', exe)
         else:
+            # Need to figure out how to create a named pipe on Windows.
+            if platform.system() == 'Windows':
+                use_named_pipe = False
+
             self.debug_monitor_exe = get_lldb_server_exe()
             if not self.debug_monitor_exe:
                 self.skipTest("lldb-server exe not found")
@@ -399,7 +408,7 @@
         # If we're receiving the stub's listening port from the named pipe, do
         # that here.
         if self.named_pipe:
-            self.port = self.get_stub_port_from_named_socket()
+            self.port = self.get_stub_port_from_named_socket(self._READ_TIMEOUT)
 
         return server
 
@@ -513,7 +522,8 @@
             self,
             inferior_args=None,
             inferior_sleep_seconds=3,
-            inferior_exe_path=None):
+            inferior_exe_path=None,
+            inferior_env=None):
         """Prep the debug monitor, the inferior, and the expected packet stream.
 
         Handle the separate cases of using the debug monitor in attach-to-inferior mode
@@ -576,6 +586,9 @@
 
         # Build the expected protocol stream
         self.add_no_ack_remote_stream()
+        if inferior_env:
+            for name, value in inferior_env.items():
+                self.add_set_environment_packets(name, value)
         if self._inferior_startup == self._STARTUP_LAUNCH:
             self.add_verified_launch_packets(launch_args)
 
@@ -611,7 +624,10 @@
                     written_byte_count:]
         self.assertEqual(len(request_bytes_remaining), 0)
 
-    def do_handshake(self, stub_socket, timeout_seconds=5):
+    def do_handshake(self, stub_socket, timeout_seconds=None):
+        if not timeout_seconds:
+            timeout_seconds = self._WAIT_TIMEOUT
+
         # Write the ack.
         self.expect_socket_send(stub_socket, "+", timeout_seconds)
 
@@ -656,6 +672,12 @@
              {"direction": "send", "regex": r"^\$(.+)#[0-9a-fA-F]{2}$", "capture": {1: "process_info_raw"}}],
             True)
 
+    def add_set_environment_packets(self, name, value):
+        self.test_sequence.add_log_lines(
+            ["read packet: $QEnvironment:" + name + "=" + value + "#00",
+             "send packet: $OK#00",
+             ], True)
+
     _KNOWN_PROCESS_INFO_KEYS = [
         "pid",
         "parent-pid",
@@ -816,6 +838,7 @@
                     "error"])
             self.assertIsNotNone(val)
 
+        mem_region_dict["name"] = seven.unhexlify(mem_region_dict.get("name", ""))
         # Return the dictionary of key-value pairs for the memory region.
         return mem_region_dict
 
@@ -862,7 +885,9 @@
             thread_ids.extend(new_thread_infos)
         return thread_ids
 
-    def wait_for_thread_count(self, thread_count, timeout_seconds=3):
+    def wait_for_thread_count(self, thread_count, timeout_seconds=None):
+        if not timeout_seconds:
+            timeout_seconds = self._WAIT_TIMEOUT
         start_time = time.time()
         timeout_time = start_time + timeout_seconds
 
@@ -1000,6 +1025,22 @@
 
         return context
 
+    def continue_process_and_wait_for_stop(self):
+        self.test_sequence.add_log_lines(
+            [
+                "read packet: $vCont;c#a8",
+                {
+                    "direction": "send",
+                    "regex": r"^\$T([0-9a-fA-F]{2})(.*)#[0-9a-fA-F]{2}$",
+                    "capture": {1: "stop_signo", 2: "stop_key_val_text"},
+                },
+            ],
+            True,
+        )
+        context = self.expect_gdbremote_sequence()
+        self.assertIsNotNone(context)
+        return self.parse_interrupt_packets(context)
+
     def select_modifiable_register(self, reg_infos):
         """Find a register that can be read/written freely."""
         PREFERRED_REGISTER_NAMES = set(["rax", ])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile
index a47e279..536d2e8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile
@@ -1,8 +1,6 @@
-LEVEL = ../../../make
-
-CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -std=c++11
+CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -std=c++11
 # LD_EXTRAS := -lpthread
 CXX_SOURCES := main.cpp
 MAKE_DSYM :=NO
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
index e905a85c..5292913 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteAbort.py
@@ -1,8 +1,6 @@
-from __future__ import print_function
 
 
 import gdbremote_testcase
-import signal
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -37,6 +35,7 @@
         self.build()
         self.inferior_abort_received()
 
+    @skipIfWindows # No signal is sent on Windows.
     @llgs_test
     # std::abort() on <= API 16 raises SIGSEGV - b.android.com/179836
     @expectedFailureAndroid(api_levels=list(range(16 + 1)))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
index 316d5d7..e0ba3d7 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/TestGdbRemoteSegFault.py
@@ -1,8 +1,6 @@
-from __future__ import print_function
 
 
 import gdbremote_testcase
-import signal
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
@@ -39,6 +37,7 @@
         self.build()
         self.inferior_seg_fault_received(self.GDB_REMOTE_STOP_CODE_BAD_ACCESS)
 
+    @skipIfWindows # No signal is sent on Windows.
     @llgs_test
     def test_inferior_seg_fault_received_llgs(self):
         self.init_llgs_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile
new file mode 100644
index 0000000..5b5c1dc
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile
@@ -0,0 +1,19 @@
+LIB_PREFIX := svr4lib
+LD_EXTRAS := -L. -lsvr4lib_a -lsvr4lib_b\"
+CXX_SOURCES := main.cpp
+USE_LIBDL := 1
+MAKE_DSYM := NO
+
+a.out: svr4lib_a svr4lib_b_quote
+
+include Makefile.rules
+
+svr4lib_a:
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_NAME=svr4lib_a DYLIB_CXX_SOURCES=svr4lib_a.cpp \
+		DYLIB_ONLY=YES
+
+svr4lib_b_quote:
+	$(MAKE) -f $(MAKEFILE_RULES) \
+		DYLIB_NAME=svr4lib_b\\\" DYLIB_CXX_SOURCES=svr4lib_b_quote.cpp \
+		DYLIB_ONLY=YES
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
new file mode 100644
index 0000000..2081d9f
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/TestGdbRemoteLibrariesSvr4Support.py
@@ -0,0 +1,133 @@
+import xml.etree.ElementTree as ET
+
+import gdbremote_testcase
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class TestGdbRemoteLibrariesSvr4Support(gdbremote_testcase.GdbRemoteTestCaseBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    FEATURE_NAME = "qXfer:libraries-svr4:read"
+
+    def setup_test(self):
+        self.init_llgs_test()
+        self.build()
+        self.set_inferior_startup_launch()
+        env = {}
+        env[self.dylibPath] = self.getBuildDir()
+        self.prep_debug_monitor_and_inferior(inferior_env=env)
+        self.continue_process_and_wait_for_stop()
+
+    def get_expected_libs(self):
+        return ["libsvr4lib_a.so", 'libsvr4lib_b".so']
+
+    def has_libraries_svr4_support(self):
+        self.add_qSupported_packets()
+        context = self.expect_gdbremote_sequence()
+        self.assertIsNotNone(context)
+        features = self.parse_qSupported_response(context)
+        return self.FEATURE_NAME in features and features[self.FEATURE_NAME] == "+"
+
+    def get_libraries_svr4_data(self):
+        # Start up llgs and inferior, and check for libraries-svr4 support.
+        if not self.has_libraries_svr4_support():
+            self.skipTest("libraries-svr4 not supported")
+
+        # Grab the libraries-svr4 data.
+        self.reset_test_sequence()
+        self.test_sequence.add_log_lines(
+            [
+                "read packet: $qXfer:libraries-svr4:read::0,ffff:#00",
+                {
+                    "direction": "send",
+                    "regex": re.compile(
+                        r"^\$([^E])(.*)#[0-9a-fA-F]{2}$", re.MULTILINE | re.DOTALL
+                    ),
+                    "capture": {1: "response_type", 2: "content_raw"},
+                },
+            ],
+            True,
+        )
+
+        context = self.expect_gdbremote_sequence()
+        self.assertIsNotNone(context)
+
+        # Ensure we end up with all libraries-svr4 data in one packet.
+        self.assertEqual(context.get("response_type"), "l")
+
+        # Decode binary data.
+        content_raw = context.get("content_raw")
+        self.assertIsNotNone(content_raw)
+        return content_raw
+
+    def get_libraries_svr4_xml(self):
+        libraries_svr4 = self.get_libraries_svr4_data()
+        xml_root = None
+        try:
+            xml_root = ET.fromstring(libraries_svr4)
+        except xml.etree.ElementTree.ParseError:
+            pass
+        self.assertIsNotNone(xml_root, "Malformed libraries-svr4 XML")
+        return xml_root
+
+    def libraries_svr4_well_formed(self):
+        xml_root = self.get_libraries_svr4_xml()
+        self.assertEqual(xml_root.tag, "library-list-svr4")
+        for child in xml_root:
+            self.assertEqual(child.tag, "library")
+            self.assertItemsEqual(child.attrib.keys(), ["name", "lm", "l_addr", "l_ld"])
+
+    def libraries_svr4_has_correct_load_addr(self):
+        xml_root = self.get_libraries_svr4_xml()
+        for child in xml_root:
+            name = child.attrib.get("name")
+            base_name = os.path.basename(name)
+            if os.path.basename(name) not in self.get_expected_libs():
+                continue
+            load_addr = int(child.attrib.get("l_addr"), 16)
+            self.reset_test_sequence()
+            self.add_query_memory_region_packets(load_addr)
+            context = self.expect_gdbremote_sequence()
+            mem_region = self.parse_memory_region_packet(context)
+            self.assertEqual(load_addr, int(mem_region.get("start", 0), 16))
+            self.assertEqual(
+                os.path.realpath(name), os.path.realpath(mem_region.get("name", ""))
+            )
+
+    def libraries_svr4_libs_present(self):
+        xml_root = self.get_libraries_svr4_xml()
+        libraries_svr4_names = []
+        for child in xml_root:
+            name = child.attrib.get("name")
+            libraries_svr4_names.append(os.path.realpath(name))
+        for lib in self.get_expected_libs():
+            self.assertIn(self.getBuildDir() + "/" + lib, libraries_svr4_names)
+
+    @llgs_test
+    @skipUnlessPlatform(["linux", "android", "netbsd"])
+    def test_supports_libraries_svr4(self):
+        self.setup_test()
+        self.assertTrue(self.has_libraries_svr4_support())
+
+    @llgs_test
+    @skipUnlessPlatform(["linux", "android", "netbsd"])
+    @expectedFailureNetBSD
+    def test_libraries_svr4_well_formed(self):
+        self.setup_test()
+        self.libraries_svr4_well_formed()
+
+    @llgs_test
+    @skipUnlessPlatform(["linux", "android", "netbsd"])
+    @expectedFailureNetBSD
+    def test_libraries_svr4_load_addr(self):
+        self.setup_test()
+        self.libraries_svr4_has_correct_load_addr()
+
+    @llgs_test
+    @skipUnlessPlatform(["linux", "android", "netbsd"])
+    @expectedFailureNetBSD
+    def test_libraries_svr4_libs_present(self):
+        self.setup_test()
+        self.libraries_svr4_libs_present()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp
new file mode 100644
index 0000000..b62ca71
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/main.cpp
@@ -0,0 +1,15 @@
+//===-- main.cpp ------------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+int main(int argc, char **argv) {
+  // Perform a null pointer access.
+  int *const null_int_ptr = nullptr;
+  *null_int_ptr = 0xDEAD;
+
+  return 0;
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.cpp
new file mode 100644
index 0000000..47d4b97
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.cpp
@@ -0,0 +1,9 @@
+//===-- main.cpp ------------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+int svr4lib_a() { return 42; }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.cpp
new file mode 100644
index 0000000..bd8eb00
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.cpp
@@ -0,0 +1,9 @@
+//===-- main.cpp ------------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+int svr4lib_b_quote() { return 42; }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
index 8dd146a..815ba34 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/lldbgdbserverutils.py
@@ -11,7 +11,6 @@
 import six
 import socket_packet_pump
 import subprocess
-import time
 from lldbsuite.test.lldbtest import *
 
 from six.moves import queue
@@ -926,6 +925,12 @@
         # Convert text pids to ints
         process_ids = [int(text_pid)
                        for text_pid in text_process_ids if text_pid != '']
+    elif platform.system() == 'Windows':
+        output = subprocess.check_output(
+            "for /f \"tokens=2 delims=,\" %F in ('tasklist /nh /fi \"PID ne 0\" /fo csv') do @echo %~F", shell=True).decode("utf-8")
+        text_process_ids = output.split('\n')[1:]
+        process_ids = [int(text_pid)
+                       for text_pid in text_process_ids if text_pid != '']
     # elif {your_platform_here}:
     #   fill in process_ids as a list of int type process IDs running on
     #   the local system.
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py
index aa4b3de..ff70831 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/TestPlatformProcessConnect.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import time
 
@@ -11,6 +10,14 @@
 class TestPlatformProcessConnect(gdbremote_testcase.GdbRemoteTestCaseBase):
     mydir = TestBase.compute_mydir(__file__)
 
+    def setUp(self):
+        super(TestPlatformProcessConnect, self).setUp()
+        self._initial_platform = lldb.DBG.GetSelectedPlatform()
+
+    def tearDown(self):
+        lldb.DBG.SetSelectedPlatform(self._initial_platform)
+        super(TestPlatformProcessConnect, self).tearDown()
+
     @llgs_test
     @no_debug_info_test
     @skipIf(remote=False)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
index e13daeb..a27cb01 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 
 import gdbremote_testcase
@@ -138,6 +137,7 @@
         self.assertEqual(
             ['0x727476787a7c7e71', '0x737577797b7d7f70'], get_reg_value('xmm15'))
 
+    @expectedFailureNetBSD
     @llgs_test
     def test_g_returns_correct_data_with_suffix_llgs(self):
         self.init_llgs_test()
@@ -145,6 +145,7 @@
         self.set_inferior_startup_launch()
         self.g_returns_correct_data(True)
 
+    @expectedFailureNetBSD
     @llgs_test
     def test_g_returns_correct_data_no_suffix_llgs(self):
         self.init_llgs_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/main.cpp
index 32eda6d..fca0c72 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/main.cpp
@@ -1,10 +1,10 @@
 #include <cstdint>
 
-struct alignas(16) xmm_t {
-  uint64_t a, b;
-};
-
 int main() {
+#if defined(__x86_64__)
+  struct alignas(16) xmm_t {
+    uint64_t a, b;
+  };
   uint64_t r8 = 0x0102030405060708;
   uint64_t r9 = 0x1112131415161718;
   uint64_t r10 = 0x2122232425262728;
@@ -49,6 +49,6 @@
                : "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15",
                  "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13",
                  "%xmm14", "%xmm15");
-
+#endif
   return 0;
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py
index 7105bcb..72e0d94 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/TestGdbRemote_QPassSignals.py
@@ -1,6 +1,5 @@
 # This test makes sure that lldb-server supports and properly handles
 # QPassSignals GDB protocol package.
-from __future__ import print_function
 
 import gdbremote_testcase
 from lldbsuite.test.decorators import *
@@ -81,6 +80,8 @@
                 self.ignore_signals(signals_to_ignore)
         self.expect_exit_code(len(signals_to_ignore))
 
+    @skipIfWindows # no signal support
+    @expectedFailureNetBSD
     @llgs_test
     def test_default_signals_behavior(self):
         self.init_llgs_test()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/test/test_lldbgdbserverutils.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/test/test_lldbgdbserverutils.py
index dc52f24..6f07b2f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/test/test_lldbgdbserverutils.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/test/test_lldbgdbserverutils.py
@@ -1,10 +1,7 @@
-from __future__ import print_function
 
 
 import unittest2
-import os.path
 import re
-import sys
 
 from lldbgdbserverutils import *
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile
index 8817fff..de4ec12 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile
@@ -1,6 +1,4 @@
-LEVEL = ../../../make
-
 ENABLE_THREADS := YES
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
index 5bfcd66..9ec40c1 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/TestGdbRemoteThreadName.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 import gdbremote_testcase
 from lldbsuite.test.decorators import *
@@ -29,6 +28,7 @@
         kv_dict = self.parse_key_val_dict(context.get("key_vals_text"))
         self.assertEqual(expected_name, kv_dict.get("name"))
 
+    @skipIfWindows # the test is not updated for Windows.
     @llgs_test
     def test(self):
         """ Make sure lldb-server can retrieve inferior thread name"""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
index 0403031..898e9a3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/main.cpp
@@ -9,7 +9,7 @@
 #elif defined(__linux__)
   ::pthread_setname_np(::pthread_self(), name);
 #elif defined(__NetBSD__)
-  ::pthread_setname_np(::pthread_self(), "%s", name);
+  ::pthread_setname_np(::pthread_self(), "%s", const_cast<char *>(name));
 #endif
 }
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py
index 2cac88f..835bd0b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/TestVSCode_attach.py
@@ -2,7 +2,6 @@
 Test lldb-vscode setBreakpoints request
 """
 
-from __future__ import print_function
 
 import unittest2
 import vscode
@@ -46,9 +45,7 @@
 
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
     @skipIfNetBSD # Hangs on NetBSD as well
-    @no_debug_info_test
     def test_by_pid(self):
         '''
             Tests attaching to a process by process ID.
@@ -63,9 +60,7 @@
         self.set_and_hit_breakpoint(continueToExit=True)
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
     @skipIfNetBSD # Hangs on NetBSD as well
-    @no_debug_info_test
     def test_by_name(self):
         '''
             Tests attaching to a process by process name.
@@ -82,26 +77,28 @@
         shutil.copyfile(orig_program, program)
         shutil.copymode(orig_program, program)
 
+        # Use a file as a synchronization point between test and inferior.
+        pid_file_path = lldbutil.append_to_process_working_directory(self,
+            "pid_file_%d" % (int(time.time())))
+
         def cleanup():
             if os.path.exists(program):
                 os.unlink(program)
+            self.run_platform_command("rm %s" % (pid_file_path))
         # Execute the cleanup function during test case tear down.
         self.addTearDownHook(cleanup)
 
-        self.process = subprocess.Popen([program],
-                                        stdin=subprocess.PIPE,
-                                        stdout=subprocess.PIPE,
-                                        stderr=subprocess.PIPE)
-        # Wait for a bit to ensure the process is launched, but not for so long
-        # that the process has already finished by the time we attach.
-        time.sleep(3)
+        popen = self.spawnSubprocess(program, [pid_file_path])
+        self.addTearDownHook(self.cleanupSubprocesses)
+
+        pid = lldbutil.wait_for_file_on_target(self, pid_file_path)
+
         self.attach(program=program)
         self.set_and_hit_breakpoint(continueToExit=True)
 
     @skipUnlessDarwin
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
+    @skipIfDarwin
     @skipIfNetBSD # Hangs on NetBSD as well
-    @no_debug_info_test
     def test_by_name_waitFor(self):
         '''
             Tests attaching to a process by process name and waiting for the
@@ -117,9 +114,8 @@
         self.set_and_hit_breakpoint(continueToExit=True)
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
+    @skipIfDarwin
     @skipIfNetBSD # Hangs on NetBSD as well
-    @no_debug_info_test
     def test_commands(self):
         '''
             Tests the "initCommands", "preRunCommands", "stopCommands",
@@ -146,7 +142,7 @@
         # and use it for debugging
         attachCommands = [
             'target create -d "%s"' % (program),
-            'process launch -- arg1'
+            'process launch'
         ]
         initCommands = ['target list', 'platform list']
         preRunCommands = ['image list a.out', 'image dump sections a.out']
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c
index 4f50f75..64d8658 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/main.c
@@ -1,11 +1,20 @@
 #include <stdio.h>
 #include <unistd.h>
 
-int main(int argc, char const *argv[])
-{
-    lldb_enable_attach();
+int main(int argc, char const *argv[]) {
+  lldb_enable_attach();
 
-    printf("pid = %i\n", getpid());
-    sleep(10);
-    return 0; // breakpoint 1
+  if (argc >= 2) {
+    // Create the synchronization token.
+    FILE *f = fopen(argv[1], "wx");
+    if (!f)
+      return 1;
+    fputs("\n", f);
+    fflush(f);
+    fclose(f);
+  }
+
+  printf("pid = %i\n", getpid());
+  sleep(10);
+  return 0; // breakpoint 1
 }
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
index 1ebf2b8..8b13b9b 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setBreakpoints.py
@@ -2,9 +2,7 @@
 Test lldb-vscode setBreakpoints request
 """
 
-from __future__ import print_function
 
-import pprint
 import unittest2
 import vscode
 from lldbsuite.test.decorators import *
@@ -19,8 +17,6 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_set_and_clear(self):
         '''Tests setting and clearing source file and line breakpoints.
            This packet is a bit tricky on the debug adaptor side since there
@@ -152,8 +148,6 @@
                                 "expect breakpoint still verified")
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_functionality(self):
         '''Tests hitting breakpoints and the functionality of a single
            breakpoint, like 'conditions' and 'hitCondition' settings.'''
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py
index 65db69c..d20a343 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setExceptionBreakpoints.py
@@ -2,16 +2,13 @@
 Test lldb-vscode setBreakpoints request
 """
 
-from __future__ import print_function
 
-import pprint
 import unittest2
 import vscode
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 import lldbvscode_testcase
-import os
 
 
 class TestVSCode_setExceptionBreakpoints(
@@ -20,9 +17,7 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
     @expectedFailureNetBSD
-    @no_debug_info_test
     def test_functionality(self):
         '''Tests setting and clearing exception breakpoints.
            This packet is a bit tricky on the debug adaptor side since there
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py
index 8a3f354..2c62bf8 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/TestVSCode_setFunctionBreakpoints.py
@@ -2,16 +2,13 @@
 Test lldb-vscode setBreakpoints request
 """
 
-from __future__ import print_function
 
-import pprint
 import unittest2
 import vscode
 from lldbsuite.test.decorators import *
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 import lldbvscode_testcase
-import os
 
 
 class TestVSCode_setFunctionBreakpoints(
@@ -20,8 +17,6 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_set_and_clear(self):
         '''Tests setting and clearing function breakpoints.
            This packet is a bit tricky on the debug adaptor side since there
@@ -112,8 +107,6 @@
                             "expect %u source breakpoints" % (len(functions)))
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_functionality(self):
         '''Tests hitting breakpoints and the functionality of a single
            breakpoint, like 'conditions' and 'hitCondition' settings.'''
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/Makefile
new file mode 100644
index 0000000..99998b2
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/Makefile
@@ -0,0 +1,3 @@
+CXX_SOURCES := main.cpp
+
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/TestVSCode_completions.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/TestVSCode_completions.py
new file mode 100644
index 0000000..d1d9234
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/TestVSCode_completions.py
@@ -0,0 +1,115 @@
+"""
+Test lldb-vscode completions request
+"""
+
+
+import lldbvscode_testcase
+import unittest2
+import vscode
+from lldbsuite.test import lldbutil
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class TestVSCode_variables(lldbvscode_testcase.VSCodeTestCaseBase):
+
+    mydir = TestBase.compute_mydir(__file__)
+
+    def verify_completions(self, actual_list, expected_list, not_expected_list=[]):
+        for expected_item in expected_list:
+            self.assertTrue(expected_item in actual_list)
+
+        for not_expected_item in not_expected_list:
+            self.assertFalse(not_expected_item in actual_list)
+
+    @skipIfWindows
+    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
+    def test_completions(self):
+        """
+            Tests the completion request at different breakpoints
+        """
+        program = self.getBuildArtifact("a.out")
+        self.build_and_launch(program)
+        source = "main.cpp"
+        breakpoint1_line = line_number(source, "// breakpoint 1")
+        breakpoint2_line = line_number(source, "// breakpoint 2")
+        breakpoint_ids = self.set_source_breakpoints(
+            source, [breakpoint1_line, breakpoint2_line]
+        )
+        self.continue_to_next_stop()
+
+        # shouldn't see variables inside main
+        self.verify_completions(
+            self.vscode.get_completions("var"),
+            [
+                {
+                    "text": "var",
+                    "label": "var -- vector<basic_string<char, char_traits<char>, allocator<char> >, allocator<basic_string<char, char_traits<char>, allocator<char> > > > &",
+                }
+            ],
+            [{"text": "var1", "label": "var1 -- int &"}],
+        )
+
+        # should see global keywords but not variables inside main
+        self.verify_completions(
+            self.vscode.get_completions("str"),
+            [{"text": "struct", "label": "struct"}],
+            [{"text": "str1", "label": "str1 -- std::string &"}],
+        )
+
+        self.continue_to_next_stop()
+
+        # should see variables from main but not from the other function
+        self.verify_completions(
+            self.vscode.get_completions("var"),
+            [
+                {"text": "var1", "label": "var1 -- int &"},
+                {"text": "var2", "label": "var2 -- int &"},
+            ],
+            [
+                {
+                    "text": "var",
+                    "label": "var -- vector<basic_string<char, char_traits<char>, allocator<char> >, allocator<basic_string<char, char_traits<char>, allocator<char> > > > &",
+                }
+            ],
+        )
+
+        self.verify_completions(
+            self.vscode.get_completions("str"),
+            [
+                {"text": "struct", "label": "struct"},
+                {"text": "str1", "label": "str1 -- string &"},
+            ],
+        )
+
+        # should complete arbitrary commands including word starts
+        self.verify_completions(
+            self.vscode.get_completions("`log enable  "),
+            [{"text": "gdb-remote", "label": "gdb-remote"}],
+        )
+
+        # should complete expressions with quotes inside
+        self.verify_completions(
+            self.vscode.get_completions('`expr " "; typed'),
+            [{"text": "typedef", "label": "typedef"}],
+        )
+
+        # should complete an incomplete quoted token
+        self.verify_completions(
+            self.vscode.get_completions('`setting "se'),
+            [
+                {
+                    "text": "set",
+                    "label": "set -- Set the value of the specified debugger setting.",
+                }
+            ],
+        )
+        self.verify_completions(
+            self.vscode.get_completions("`'comm"),
+            [
+                {
+                    "text": "command",
+                    "label": "command -- Commands for managing custom LLDB commands.",
+                }
+            ],
+        )
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/main.cpp b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/main.cpp
new file mode 100644
index 0000000..14a8815
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/completions/main.cpp
@@ -0,0 +1,16 @@
+#include <string>
+#include <vector>
+
+int fun(std::vector<std::string> var) {
+  return var.size(); // breakpoint 1
+}
+
+int main(int argc, char const *argv[]) {
+  int var1 = 0;
+  int var2 = 1;
+  std::string str1 = "a";
+  std::string str2 = "b";
+  std::vector<std::string> vec;
+  fun(vec);
+  return 0; // breakpoint 2
+}
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
index 2927ac3..76c8064 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/TestVSCode_launch.py
@@ -2,9 +2,7 @@
 Test lldb-vscode setBreakpoints request
 """
 
-from __future__ import print_function
 
-import pprint
 import unittest2
 import vscode
 from lldbsuite.test.decorators import *
@@ -12,7 +10,6 @@
 from lldbsuite.test import lldbutil
 import lldbvscode_testcase
 import os
-import time
 
 
 class TestVSCode_launch(lldbvscode_testcase.VSCodeTestCaseBase):
@@ -20,8 +17,7 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
+    @skipIfDarwin # Flaky
     def test_default(self):
         '''
             Tests the default launch of a simple program. No arguments,
@@ -39,8 +35,6 @@
                         "make sure program path is in first argument")
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_stopOnEntry(self):
         '''
             Tests the default launch of a simple program that stops at the
@@ -60,16 +54,14 @@
                         'verify stop isn\'t "main" breakpoint')
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @expectedFailureNetBSD
-    @no_debug_info_test
     def test_cwd(self):
         '''
             Tests the default launch of a simple program with a current working
             directory.
         '''
         program = self.getBuildArtifact("a.out")
-        program_parent_dir = os.path.split(os.path.split(program)[0])[0]
+        program_parent_dir = os.path.realpath(
+            os.path.dirname(os.path.dirname(program)))
         self.build_and_launch(program,
                               cwd=program_parent_dir)
         self.continue_to_exit()
@@ -89,16 +81,14 @@
         self.assertTrue(found, "verified program working directory")
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @expectedFailureNetBSD
-    @no_debug_info_test
     def test_debuggerRoot(self):
         '''
             Tests the "debuggerRoot" will change the working directory of
             the lldb-vscode debug adaptor.
         '''
         program = self.getBuildArtifact("a.out")
-        program_parent_dir = os.path.split(os.path.split(program)[0])[0]
+        program_parent_dir = os.path.realpath(
+            os.path.dirname(os.path.dirname(program)))
         commands = ['platform shell echo cwd = $PWD']
         self.build_and_launch(program,
                               debuggerRoot=program_parent_dir,
@@ -119,14 +109,12 @@
         self.continue_to_exit()
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_sourcePath(self):
         '''
             Tests the "sourcePath" will set the target.source-map.
         '''
         program = self.getBuildArtifact("a.out")
-        program_dir = os.path.split(program)[0]
+        program_dir = os.path.dirname(program)
         self.build_and_launch(program,
                               sourcePath=program_dir)
         output = self.get_console()
@@ -146,8 +134,6 @@
         self.continue_to_exit()
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_disableSTDIO(self):
         '''
             Tests the default launch of a simple program with STDIO disabled.
@@ -162,17 +148,15 @@
                         "expect no program output")
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
     @skipIfLinux # shell argument expansion doesn't seem to work on Linux
     @expectedFailureNetBSD
-    @no_debug_info_test
     def test_shellExpandArguments_enabled(self):
         '''
             Tests the default launch of a simple program with shell expansion
             enabled.
         '''
         program = self.getBuildArtifact("a.out")
-        program_dir = os.path.split(program)[0]
+        program_dir = os.path.dirname(program)
         glob = os.path.join(program_dir, '*.out')
         self.build_and_launch(program, args=[glob], shellExpandArguments=True)
         self.continue_to_exit()
@@ -189,15 +173,13 @@
                                     glob, program))
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_shellExpandArguments_disabled(self):
         '''
             Tests the default launch of a simple program with shell expansion
             disabled.
         '''
         program = self.getBuildArtifact("a.out")
-        program_dir = os.path.split(program)[0]
+        program_dir = os.path.dirname(program)
         glob = os.path.join(program_dir, '*.out')
         self.build_and_launch(program,
                               args=[glob],
@@ -216,8 +198,6 @@
                                     glob, glob))
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_args(self):
         '''
             Tests launch of a simple program with arguments
@@ -243,8 +223,6 @@
                             'arg[%i] "%s" not in "%s"' % (i+1, quoted_arg, lines[i]))
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_environment(self):
         '''
             Tests launch of a simple program with environment variables
@@ -277,8 +255,6 @@
                                 var, lines))
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_commands(self):
         '''
             Tests the "initCommands", "preRunCommands", "stopCommands" and
@@ -343,3 +319,66 @@
         # "exitCommands" that were run after the second breakpoint was hit
         output = self.get_console(timeout=1.0)
         self.verify_commands('exitCommands', output, exitCommands)
+
+    @skipIfWindows
+    def test_extra_launch_commands(self):
+        '''
+            Tests the "luanchCommands" with extra launching settings
+        '''
+        self.build_and_create_debug_adaptor()
+        program = self.getBuildArtifact("a.out")
+
+        source = 'main.c'
+        first_line = line_number(source, '// breakpoint 1')
+        second_line = line_number(source, '// breakpoint 2')
+        # Set target binary and 2 breakoints
+        # then we can varify the "launchCommands" get run
+        # also we can verify that "stopCommands" get run as the
+        # breakpoints get hit
+        launchCommands = [
+            'target create "%s"' % (program),
+            'br s -f main.c -l %d' % first_line,
+            'br s -f main.c -l %d' % second_line,
+            'process launch --stop-at-entry'
+        ]
+
+        initCommands = ['target list', 'platform list']
+        preRunCommands = ['image list a.out', 'image dump sections a.out']
+        stopCommands = ['frame variable', 'bt']
+        exitCommands = ['expr 2+3', 'expr 3+4']
+        self.launch(program,
+                    initCommands=initCommands,
+                    preRunCommands=preRunCommands,
+                    stopCommands=stopCommands,
+                    exitCommands=exitCommands,
+                    launchCommands=launchCommands)
+
+        # Get output from the console. This should contain both the
+        # "initCommands" and the "preRunCommands".
+        output = self.get_console()
+        # Verify all "initCommands" were found in console output
+        self.verify_commands('initCommands', output, initCommands)
+        # Verify all "preRunCommands" were found in console output
+        self.verify_commands('preRunCommands', output, preRunCommands)
+
+        # Verify all "launchCommands" were founc in console output
+        # After execution, program should launch
+        self.verify_commands('launchCommands', output, launchCommands)
+        # Verify the "stopCommands" here
+        self.continue_to_next_stop()
+        output = self.get_console(timeout=1.0)
+        self.verify_commands('stopCommands', output, stopCommands)
+
+        # Continue and hit the second breakpoint.
+        # Get output from the console. This should contain both the
+        # "stopCommands" that were run after the first breakpoint was hit
+        self.continue_to_next_stop()
+        output = self.get_console(timeout=1.0)
+        self.verify_commands('stopCommands', output, stopCommands)
+
+        # Continue until the program exits
+        self.continue_to_exit()
+        # Get output from the console. This should contain both the
+        # "exitCommands" that were run after the second breakpoint was hit
+        output = self.get_console(timeout=1.0)
+        self.verify_commands('exitCommands', output, exitCommands)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
index c66c6bb..199b80c 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/lldbvscode_testcase.py
@@ -1,4 +1,3 @@
-from __future__ import print_function
 
 from lldbsuite.test.lldbtest import *
 import os
@@ -7,11 +6,14 @@
 
 class VSCodeTestCaseBase(TestBase):
 
+    NO_DEBUG_INFO_TESTCASE = True
+
     def create_debug_adaptor(self):
         '''Create the Visual Studio Code debug adaptor'''
         self.assertTrue(os.path.exists(self.lldbVSCodeExec),
                         'lldb-vscode must exist')
-        self.vscode = vscode.DebugAdaptor(executable=self.lldbVSCodeExec)
+        self.vscode = vscode.DebugAdaptor(
+            executable=self.lldbVSCodeExec, init_commands=self.setUpCommands())
 
     def build_and_create_debug_adaptor(self):
         self.build()
@@ -131,15 +133,29 @@
                                     key, key_path, d))
         return value
 
-    def get_stackFrames(self, threadId=None, startFrame=None, levels=None,
-                        dump=False):
+    def get_stackFrames_and_totalFramesCount(self, threadId=None, startFrame=None, 
+                        levels=None, dump=False):
         response = self.vscode.request_stackTrace(threadId=threadId,
                                                   startFrame=startFrame,
                                                   levels=levels,
                                                   dump=dump)
         if response:
-            return self.get_dict_value(response, ['body', 'stackFrames'])
-        return None
+            stackFrames = self.get_dict_value(response, ['body', 'stackFrames'])
+            totalFrames = self.get_dict_value(response, ['body', 'totalFrames'])
+            self.assertTrue(totalFrames > 0,
+                    'verify totalFrames count is provided by extension that supports '
+                    'async frames loading')
+            return (stackFrames, totalFrames)
+        return (None, 0)
+
+    def get_stackFrames(self, threadId=None, startFrame=None, levels=None,
+                        dump=False):
+        (stackFrames, totalFrames) = self.get_stackFrames_and_totalFramesCount(
+                                                threadId=threadId,
+                                                startFrame=startFrame,
+                                                levels=levels,
+                                                dump=dump)
+        return stackFrames
 
     def get_source_and_line(self, threadId=None, frameIndex=0):
         stackFrames = self.get_stackFrames(threadId=threadId,
@@ -244,20 +260,17 @@
             self.assertTrue(response['success'],
                             'attach failed (%s)' % (response['message']))
 
-    def build_and_launch(self, program, args=None, cwd=None, env=None,
-                         stopOnEntry=False, disableASLR=True,
-                         disableSTDIO=False, shellExpandArguments=False,
-                         trace=False, initCommands=None, preRunCommands=None,
-                         stopCommands=None, exitCommands=None,
-                         sourcePath=None, debuggerRoot=None):
-        '''Build the default Makefile target, create the VSCode debug adaptor,
-           and launch the process.
+    def launch(self, program=None, args=None, cwd=None, env=None,
+               stopOnEntry=False, disableASLR=True,
+               disableSTDIO=False, shellExpandArguments=False,
+               trace=False, initCommands=None, preRunCommands=None,
+               stopCommands=None, exitCommands=None,sourcePath= None,
+               debuggerRoot=None, launchCommands=None):
+        '''Sending launch request to vscode
         '''
-        self.build_and_create_debug_adaptor()
-        self.assertTrue(os.path.exists(program), 'executable must exist')
 
-        # Make sure we disconnect and terminate the VSCode debug adaptor even
-        # if we throw an exception during the test case.
+        # Make sure we disconnect and terminate the VSCode debug adapter,
+        # if we throw an exception during the test case
         def cleanup():
             self.vscode.request_disconnect(terminateDebuggee=True)
             self.vscode.terminate()
@@ -282,7 +295,25 @@
             stopCommands=stopCommands,
             exitCommands=exitCommands,
             sourcePath=sourcePath,
-            debuggerRoot=debuggerRoot)
+            debuggerRoot=debuggerRoot,
+            launchCommands=launchCommands)
         if not (response and response['success']):
             self.assertTrue(response['success'],
                             'launch failed (%s)' % (response['message']))
+
+    def build_and_launch(self, program, args=None, cwd=None, env=None,
+                         stopOnEntry=False, disableASLR=True,
+                         disableSTDIO=False, shellExpandArguments=False,
+                         trace=False, initCommands=None, preRunCommands=None,
+                         stopCommands=None, exitCommands=None,
+                         sourcePath=None, debuggerRoot=None):
+        '''Build the default Makefile target, create the VSCode debug adaptor,
+           and launch the process.
+        '''
+        self.build_and_create_debug_adaptor()
+        self.assertTrue(os.path.exists(program), 'executable must exist')
+
+        self.launch(program, args, cwd, env, stopOnEntry, disableASLR,
+                    disableSTDIO, shellExpandArguments, trace,
+                    initCommands, preRunCommands, stopCommands, exitCommands,
+                    sourcePath, debuggerRoot)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile
index b09a579..1049594 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 C_SOURCES := main.c
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py
index 4bb0618..817e40e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/TestVSCode_stackTrace.py
@@ -2,7 +2,6 @@
 Test lldb-vscode setBreakpoints request
 """
 
-from __future__ import print_function
 
 import unittest2
 import vscode
@@ -53,8 +52,6 @@
                                                      expected_line))
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_stackTrace(self):
         '''
             Tests the 'stackTrace' packet and all its variants.
@@ -77,10 +74,12 @@
         self.continue_to_breakpoints(breakpoint_ids)
         startFrame = 0
         # Verify we get all stack frames with no arguments
-        stackFrames = self.get_stackFrames()
+        (stackFrames, totalFrames) = self.get_stackFrames_and_totalFramesCount()
         frameCount = len(stackFrames)
         self.assertTrue(frameCount >= 20,
                         'verify we get at least 20 frames for all frames')
+        self.assertTrue(totalFrames == frameCount,
+                        'verify we get correct value for totalFrames count')
         self.verify_stackFrames(startFrame, stackFrames)
 
         # Verify all stack frames by specifying startFrame = 0 and levels not
@@ -134,11 +133,15 @@
         # Verify we cap things correctly when we ask for too many frames
         startFrame = 5
         levels = 1000
-        stackFrames = self.get_stackFrames(startFrame=startFrame,
-                                           levels=levels)
+        (stackFrames, totalFrames) = self.get_stackFrames_and_totalFramesCount(
+                                            startFrame=startFrame,
+                                            levels=levels)
         self.assertTrue(len(stackFrames) == frameCount - startFrame,
                         ('verify less than 1000 frames with startFrame=%i and'
                          ' levels=%i') % (startFrame, levels))
+        self.assertTrue(totalFrames == frameCount,
+                        'verify we get correct value for totalFrames count '
+                        'when requested frames not from 0 index')
         self.verify_stackFrames(startFrame, stackFrames)
 
         # Verify level=0 works with non-zerp start frame
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile
index f24bb9f..b7f3072 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../../../make
-
 ENABLE_THREADS := YES
 
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py
index b671d95..2431464 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/TestVSCode_step.py
@@ -2,7 +2,6 @@
 Test lldb-vscode setBreakpoints request
 """
 
-from __future__ import print_function
 
 import unittest2
 import vscode
@@ -10,7 +9,6 @@
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 import lldbvscode_testcase
-import os
 
 
 class TestVSCode_step(lldbvscode_testcase.VSCodeTestCaseBase):
@@ -18,8 +16,6 @@
     mydir = TestBase.compute_mydir(__file__)
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_step(self):
         '''
             Tests the stepping in/out/over in threads.
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile
index 314f1cb..99998b2 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile
@@ -1,5 +1,3 @@
-LEVEL = ../../../make
-
 CXX_SOURCES := main.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py
index 0a8906f..55c4fd0 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/TestVSCode_variables.py
@@ -10,7 +10,6 @@
 from lldbsuite.test.lldbtest import *
 from lldbsuite.test import lldbutil
 import lldbvscode_testcase
-import os
 
 
 def make_buffer_verify_dict(start_idx, count, offset=0):
@@ -75,8 +74,6 @@
             self.verify_values(verify_dict[name], variable, varref_dict)
 
     @skipIfWindows
-    @skipIfDarwin # Skip this test for now until we can figure out why tings aren't working on build bots
-    @no_debug_info_test
     def test_scopes_variables_setVariable_evaluate(self):
         '''
             Tests the "scopes", "variables", "setVariable", and "evaluate"
@@ -87,7 +84,7 @@
         source = 'main.cpp'
         breakpoint1_line = line_number(source, '// breakpoint 1')
         lines = [breakpoint1_line]
-        # Set breakoint in the thread function so we can step the threads
+        # Set breakpoint in the thread function so we can step the threads
         breakpoint_ids = self.set_source_breakpoints(source, lines)
         self.assertTrue(len(breakpoint_ids) == len(lines),
                         "expect correct number of breakpoints")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
index 74ee4a6..1110ad3 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py
@@ -99,7 +99,7 @@
 
 class DebugCommunication(object):
 
-    def __init__(self, recv, send):
+    def __init__(self, recv, send, init_commands):
         self.trace_file = None
         self.send = send
         self.recv = recv
@@ -118,6 +118,7 @@
         self.output = {}
         self.configuration_done_sent = False
         self.frame_scopes = {}
+        self.init_commands = init_commands
 
     @classmethod
     def encode_content(cls, s):
@@ -347,6 +348,10 @@
         print('invalid response')
         return None
 
+    def get_completions(self, text):
+        response = self.request_completions(text)
+        return response['body']['targets']
+
     def get_scope_variables(self, scope_name, frameIndex=0, threadId=None):
         stackFrame = self.get_stackFrame(frameIndex=frameIndex,
                                          threadId=threadId)
@@ -447,8 +452,7 @@
             args_dict['waitFor'] = waitFor
         if trace:
             args_dict['trace'] = trace
-        args_dict['initCommands'] = [
-            'settings set symbols.enable-external-lookup false']
+        args_dict['initCommands'] = self.init_commands
         if initCommands:
             args_dict['initCommands'].extend(initCommands)
         if preRunCommands:
@@ -498,13 +502,7 @@
             'arguments': args_dict
         }
         response = self.send_recv(command_dict)
-        recv_packets = []
-        self.recv_condition.acquire()
-        for event in self.recv_packets:
-            if event['event'] != 'stopped':
-                recv_packets.append(event)
-        self.recv_packets = recv_packets
-        self.recv_condition.release()
+        # Caller must still call wait_for_stopped.
         return response
 
     def request_disconnect(self, terminateDebuggee=None):
@@ -564,7 +562,7 @@
                        disableSTDIO=False, shellExpandArguments=False,
                        trace=False, initCommands=None, preRunCommands=None,
                        stopCommands=None, exitCommands=None, sourcePath=None,
-                       debuggerRoot=None):
+                       debuggerRoot=None, launchCommands=None):
         args_dict = {
             'program': program
         }
@@ -584,8 +582,7 @@
             args_dict['shellExpandArguments'] = shellExpandArguments
         if trace:
             args_dict['trace'] = trace
-        args_dict['initCommands'] = [
-            'settings set symbols.enable-external-lookup false']
+        args_dict['initCommands'] = self.init_commands
         if initCommands:
             args_dict['initCommands'].extend(initCommands)
         if preRunCommands:
@@ -598,6 +595,8 @@
             args_dict['sourcePath'] = sourcePath
         if debuggerRoot:
             args_dict['debuggerRoot'] = debuggerRoot
+        if launchCommands:
+            args_dict['launchCommands'] = launchCommands
         command_dict = {
             'command': 'launch',
             'type': 'request',
@@ -720,6 +719,18 @@
         }
         return self.send_recv(command_dict)
 
+    def request_completions(self, text):
+        args_dict = {
+            'text': text,
+            'column': len(text)
+        }
+        command_dict = {
+            'command': 'completions',
+            'type': 'request',
+            'arguments': args_dict
+        }
+        return self.send_recv(command_dict)
+
     def request_stackTrace(self, threadId=None, startFrame=None, levels=None,
                            dump=False):
         if threadId is None:
@@ -828,7 +839,7 @@
 
 
 class DebugAdaptor(DebugCommunication):
-    def __init__(self, executable=None, port=None):
+    def __init__(self, executable=None, port=None, init_commands=[]):
         self.process = None
         if executable is not None:
             self.process = subprocess.Popen([executable],
@@ -836,11 +847,12 @@
                                             stdout=subprocess.PIPE,
                                             stderr=subprocess.PIPE)
             DebugCommunication.__init__(self, self.process.stdout,
-                                        self.process.stdin)
+                                        self.process.stdin, init_commands)
         elif port is not None:
             s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             s.connect(('127.0.0.1', port))
-            DebugCommunication.__init__(self, s.makefile('r'), s.makefile('w'))
+            DebugCommunication.__init__(self, s.makefile('r'), s.makefile('w'),
+                init_commands)
 
     def get_pid(self):
         if self.process:
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/AbstractBase.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/AbstractBase.py
index 37ddfb7..2ced139 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/AbstractBase.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/AbstractBase.py
@@ -5,7 +5,6 @@
 from __future__ import print_function
 
 import os
-import time
 import re
 import lldb
 from lldbsuite.test.lldbtest import *
@@ -200,7 +199,6 @@
             nv = ("%s = '%s'" if quotedDisplay else "%s = %s") % (var, val)
             self.expect(output, Msg(var, val, True), exe=False,
                         substrs=[nv])
-        pass
 
     def generic_type_expr_tester(
             self,
@@ -297,4 +295,3 @@
             valPart = ("'%s'" if quotedDisplay else "%s") % val
             self.expect(output, Msg(var, val, False), exe=False,
                         substrs=[valPart])
-        pass
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/HideTestFailures.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/HideTestFailures.py
index 662665b..91b1383 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/HideTestFailures.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/HideTestFailures.py
@@ -2,11 +2,9 @@
 Test that variables of integer basic types are displayed correctly.
 """
 
-from __future__ import print_function
 
 
 import AbstractBase
-import sys
 import lldb
 from lldbsuite.test.lldbtest import *
 
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/Makefile
index c1b4cb3..d48ed76 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/Makefile
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/Makefile
@@ -1,7 +1,5 @@
-LEVEL = ../make
-
 # Example:
 #
 # CXX_SOURCES := int.cpp
 
-include $(LEVEL)/Makefile.rules
+include Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestCharType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestCharType.py
new file mode 100644
index 0000000..bc56870
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestCharType.py
@@ -0,0 +1,32 @@
+"""
+Test that variables of type char are displayed correctly.
+"""
+
+import AbstractBase
+
+from lldbsuite.test.decorators import *
+
+
+class CharTypeTestCase(AbstractBase.GenericTester):
+
+    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
+
+    def test_char_type(self):
+        """Test that char-type variables are displayed correctly."""
+        self.build_and_run('char.cpp', set(['char']), qd=True)
+
+    @skipUnlessDarwin
+    def test_char_type_from_block(self):
+        """Test that char-type variables are displayed correctly from a block."""
+        self.build_and_run('char.cpp', set(['char']), bc=True, qd=True)
+
+    def test_unsigned_char_type(self):
+        """Test that 'unsigned_char'-type variables are displayed correctly."""
+        self.build_and_run(
+            'unsigned_char.cpp', set(['unsigned', 'char']), qd=True)
+
+    @skipUnlessDarwin
+    def test_unsigned_char_type_from_block(self):
+        """Test that 'unsigned char'-type variables are displayed correctly from a block."""
+        self.build_and_run(
+            'unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestCharTypeExpr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestCharTypeExpr.py
new file mode 100644
index 0000000..63ddc14
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestCharTypeExpr.py
@@ -0,0 +1,32 @@
+"""
+Test that variable expressions of type char are evaluated correctly.
+"""
+
+import AbstractBase
+
+from lldbsuite.test.decorators import *
+
+
+class CharTypeExprTestCase(AbstractBase.GenericTester):
+
+    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
+
+    def test_char_type(self):
+        """Test that char-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr('char.cpp', set(['char']), qd=True)
+
+    @skipUnlessDarwin
+    def test_char_type_from_block(self):
+        """Test that char-type variables are displayed correctly from a block."""
+        self.build_and_run_expr('char.cpp', set(['char']), bc=True, qd=True)
+
+    def test_unsigned_char_type(self):
+        """Test that 'unsigned_char'-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr(
+            'unsigned_char.cpp', set(['unsigned', 'char']), qd=True)
+
+    @skipUnlessDarwin
+    def test_unsigned_char_type_from_block(self):
+        """Test that 'unsigned char'-type variables are displayed correctly from a block."""
+        self.build_and_run_expr(
+            'unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypes.py
index 3e9394e..adce103 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypes.py
@@ -2,11 +2,9 @@
 Test that variables of floating point types are displayed correctly.
 """
 
-from __future__ import print_function
 
 
 import AbstractBase
-import sys
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -18,14 +16,6 @@
 
     mydir = AbstractBase.GenericTester.compute_mydir(__file__)
 
-    def setUp(self):
-        # Call super's setUp().
-        AbstractBase.GenericTester.setUp(self)
-        # disable "There is a running process, kill it and restart?" prompt
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
     def test_double_type(self):
         """Test that double-type variables are displayed correctly."""
         self.build_and_run('double.cpp', set(['double']))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypesExpr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypesExpr.py
index 344e53f..20c5410 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypesExpr.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestDoubleTypesExpr.py
@@ -2,11 +2,9 @@
 Test that variable expressions of floating point types are evaluated correctly.
 """
 
-from __future__ import print_function
 
 
 import AbstractBase
-import sys
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -22,14 +20,6 @@
     # test/types failures for Test*TypesExpr.py: element offset computed wrong
     # and sign error?
 
-    def setUp(self):
-        # Call super's setUp().
-        AbstractBase.GenericTester.setUp(self)
-        # disable "There is a running process, kill it and restart?" prompt
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
     def test_double_type(self):
         """Test that double-type variable expressions are evaluated correctly."""
         self.build_and_run_expr('double.cpp', set(['double']))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestFloatTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestFloatTypes.py
index 602da06..7377552 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestFloatTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestFloatTypes.py
@@ -2,11 +2,9 @@
 Test that variables of floating point types are displayed correctly.
 """
 
-from __future__ import print_function
 
 
 import AbstractBase
-import sys
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -18,14 +16,6 @@
 
     mydir = AbstractBase.GenericTester.compute_mydir(__file__)
 
-    def setUp(self):
-        # Call super's setUp().
-        AbstractBase.GenericTester.setUp(self)
-        # disable "There is a running process, kill it and restart?" prompt
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
     def test_float_type(self):
         """Test that float-type variables are displayed correctly."""
         self.build_and_run('float.cpp', set(['float']))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestFloatTypesExpr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestFloatTypesExpr.py
index 12d54c1..ceb257e 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestFloatTypesExpr.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestFloatTypesExpr.py
@@ -2,11 +2,9 @@
 Test that variable expressions of floating point types are evaluated correctly.
 """
 
-from __future__ import print_function
 
 
 import AbstractBase
-import sys
 
 import lldb
 from lldbsuite.test.decorators import *
@@ -22,14 +20,6 @@
     # test/types failures for Test*TypesExpr.py: element offset computed wrong
     # and sign error?
 
-    def setUp(self):
-        # Call super's setUp().
-        AbstractBase.GenericTester.setUp(self)
-        # disable "There is a running process, kill it and restart?" prompt
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
     def test_float_type(self):
         """Test that float-type variable expressions are evaluated correctly."""
         self.build_and_run_expr('float.cpp', set(['float']))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerType.py
new file mode 100644
index 0000000..549b37a
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerType.py
@@ -0,0 +1,31 @@
+"""
+Test that variables of type integer are displayed correctly.
+"""
+
+import AbstractBase
+
+from lldbsuite.test.decorators import *
+
+
+class IntegerTypesTestCase(AbstractBase.GenericTester):
+
+    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
+
+    def test_int_type(self):
+        """Test that int-type variables are displayed correctly."""
+        self.build_and_run('int.cpp', set(['int']))
+
+    @skipUnlessDarwin
+    def test_int_type_from_block(self):
+        """Test that int-type variables are displayed correctly from a block."""
+        self.build_and_run('int.cpp', set(['int']))
+
+    def test_unsigned_int_type(self):
+        """Test that 'unsigned_int'-type variables are displayed correctly."""
+        self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']))
+
+    @skipUnlessDarwin
+    def test_unsigned_int_type_from_block(self):
+        """Test that 'unsigned int'-type variables are displayed correctly from a block."""
+        self.build_and_run(
+            'unsigned_int.cpp', set(['unsigned', 'int']), bc=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypeExpr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypeExpr.py
new file mode 100644
index 0000000..0b258db
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypeExpr.py
@@ -0,0 +1,37 @@
+"""
+Test that variable expressions of type integer are evaluated correctly.
+"""
+
+import AbstractBase
+
+from lldbsuite.test.decorators import *
+
+
+class IntegerTypeExprTestCase(AbstractBase.GenericTester):
+
+    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
+
+    @skipUnlessDarwin
+    def test_unsigned_short_type_from_block(self):
+        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
+        self.build_and_run_expr(
+            'unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
+
+    def test_int_type(self):
+        """Test that int-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr('int.cpp', set(['int']))
+
+    @skipUnlessDarwin
+    def test_int_type_from_block(self):
+        """Test that int-type variables are displayed correctly from a block."""
+        self.build_and_run_expr('int.cpp', set(['int']))
+
+    def test_unsigned_int_type(self):
+        """Test that 'unsigned_int'-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']))
+
+    @skipUnlessDarwin
+    def test_unsigned_int_type_from_block(self):
+        """Test that 'unsigned int'-type variables are displayed correctly from a block."""
+        self.build_and_run_expr(
+            'unsigned_int.cpp', set(['unsigned', 'int']), bc=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypes.py
deleted file mode 100644
index 88a89e8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypes.py
+++ /dev/null
@@ -1,123 +0,0 @@
-"""
-Test that variables of integer basic types are displayed correctly.
-"""
-
-from __future__ import print_function
-
-import AbstractBase
-import sys
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class IntegerTypesTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        AbstractBase.GenericTester.setUp(self)
-        # disable "There is a running process, kill it and restart?" prompt
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
-    def test_char_type(self):
-        """Test that char-type variables are displayed correctly."""
-        self.build_and_run('char.cpp', set(['char']), qd=True)
-
-    @skipUnlessDarwin
-    def test_char_type_from_block(self):
-        """Test that char-type variables are displayed correctly from a block."""
-        self.build_and_run('char.cpp', set(['char']), bc=True, qd=True)
-
-    def test_unsigned_char_type(self):
-        """Test that 'unsigned_char'-type variables are displayed correctly."""
-        self.build_and_run('unsigned_char.cpp', set(
-            ['unsigned', 'char']), qd=True)
-
-    @skipUnlessDarwin
-    def test_unsigned_char_type_from_block(self):
-        """Test that 'unsigned char'-type variables are displayed correctly from a block."""
-        self.build_and_run('unsigned_char.cpp', set(
-            ['unsigned', 'char']), bc=True, qd=True)
-
-    def test_short_type(self):
-        """Test that short-type variables are displayed correctly."""
-        self.build_and_run('short.cpp', set(['short']))
-
-    @skipUnlessDarwin
-    def test_short_type_from_block(self):
-        """Test that short-type variables are displayed correctly from a block."""
-        self.build_and_run('short.cpp', set(['short']), bc=True)
-
-    def test_unsigned_short_type(self):
-        """Test that 'unsigned_short'-type variables are displayed correctly."""
-        self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']))
-
-    @skipUnlessDarwin
-    def test_unsigned_short_type_from_block(self):
-        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
-        self.build_and_run('unsigned_short.cpp', set(
-            ['unsigned', 'short']), bc=True)
-
-    def test_int_type(self):
-        """Test that int-type variables are displayed correctly."""
-        self.build_and_run('int.cpp', set(['int']))
-
-    @skipUnlessDarwin
-    def test_int_type_from_block(self):
-        """Test that int-type variables are displayed correctly from a block."""
-        self.build_and_run('int.cpp', set(['int']))
-
-    def test_unsigned_int_type(self):
-        """Test that 'unsigned_int'-type variables are displayed correctly."""
-        self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']))
-
-    @skipUnlessDarwin
-    def test_unsigned_int_type_from_block(self):
-        """Test that 'unsigned int'-type variables are displayed correctly from a block."""
-        self.build_and_run('unsigned_int.cpp', set(
-            ['unsigned', 'int']), bc=True)
-
-    def test_long_type(self):
-        """Test that long-type variables are displayed correctly."""
-        self.build_and_run('long.cpp', set(['long']))
-
-    @skipUnlessDarwin
-    def test_long_type_from_block(self):
-        """Test that long-type variables are displayed correctly from a block."""
-        self.build_and_run('long.cpp', set(['long']), bc=True)
-
-    def test_unsigned_long_type(self):
-        """Test that 'unsigned long'-type variables are displayed correctly."""
-        self.build_and_run('unsigned_long.cpp', set(['unsigned', 'long']))
-
-    @skipUnlessDarwin
-    def test_unsigned_long_type_from_block(self):
-        """Test that 'unsigned_long'-type variables are displayed correctly from a block."""
-        self.build_and_run('unsigned_long.cpp', set(
-            ['unsigned', 'long']), bc=True)
-
-    def test_long_long_type(self):
-        """Test that 'long long'-type variables are displayed correctly."""
-        self.build_and_run('long_long.cpp', set(['long long']))
-
-    @skipUnlessDarwin
-    def test_long_long_type_from_block(self):
-        """Test that 'long_long'-type variables are displayed correctly from a block."""
-        self.build_and_run('long_long.cpp', set(['long long']), bc=True)
-
-    def test_unsigned_long_long_type(self):
-        """Test that 'unsigned long long'-type variables are displayed correctly."""
-        self.build_and_run('unsigned_long_long.cpp',
-                           set(['unsigned', 'long long']))
-
-    @skipUnlessDarwin
-    def test_unsigned_long_long_type_from_block(self):
-        """Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
-        self.build_and_run('unsigned_long_long.cpp', set(
-            ['unsigned', 'long long']), bc=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypesExpr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypesExpr.py
deleted file mode 100644
index a6ada4a..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestIntegerTypesExpr.py
+++ /dev/null
@@ -1,125 +0,0 @@
-"""
-Test that variable expressions of integer basic types are evaluated correctly.
-"""
-
-from __future__ import print_function
-
-
-import AbstractBase
-import sys
-
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-class IntegerTypesExprTestCase(AbstractBase.GenericTester):
-
-    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
-
-    def setUp(self):
-        # Call super's setUp().
-        AbstractBase.GenericTester.setUp(self)
-        # disable "There is a running process, kill it and restart?" prompt
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
-
-    def test_char_type(self):
-        """Test that char-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('char.cpp', set(['char']), qd=True)
-
-    @skipUnlessDarwin
-    def test_char_type_from_block(self):
-        """Test that char-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('char.cpp', set(['char']), bc=True, qd=True)
-
-    def test_unsigned_char_type(self):
-        """Test that 'unsigned_char'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('unsigned_char.cpp', set(
-            ['unsigned', 'char']), qd=True)
-
-    @skipUnlessDarwin
-    def test_unsigned_char_type_from_block(self):
-        """Test that 'unsigned char'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('unsigned_char.cpp', set(
-            ['unsigned', 'char']), bc=True, qd=True)
-
-    def test_short_type(self):
-        """Test that short-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('short.cpp', set(['short']))
-
-    @skipUnlessDarwin
-    def test_short_type_from_block(self):
-        """Test that short-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('short.cpp', set(['short']), bc=True)
-
-    def test_unsigned_short_type(self):
-        """Test that 'unsigned_short'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('unsigned_short.cpp',
-                                set(['unsigned', 'short']))
-
-    @skipUnlessDarwin
-    def test_unsigned_short_type_from_block(self):
-        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('unsigned_short.cpp', set(
-            ['unsigned', 'short']), bc=True)
-
-    def test_int_type(self):
-        """Test that int-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('int.cpp', set(['int']))
-
-    @skipUnlessDarwin
-    def test_int_type_from_block(self):
-        """Test that int-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('int.cpp', set(['int']))
-
-    def test_unsigned_int_type(self):
-        """Test that 'unsigned_int'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']))
-
-    @skipUnlessDarwin
-    def test_unsigned_int_type_from_block(self):
-        """Test that 'unsigned int'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr(
-            'unsigned_int.cpp', set(['unsigned', 'int']), bc=True)
-
-    def test_long_type(self):
-        """Test that long-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('long.cpp', set(['long']))
-
-    @skipUnlessDarwin
-    def test_long_type_from_block(self):
-        """Test that long-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('long.cpp', set(['long']), bc=True)
-
-    def test_unsigned_long_type(self):
-        """Test that 'unsigned long'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('unsigned_long.cpp', set(['unsigned', 'long']))
-
-    @skipUnlessDarwin
-    def test_unsigned_long_type_from_block(self):
-        """Test that 'unsigned_long'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('unsigned_long.cpp', set(
-            ['unsigned', 'long']), bc=True)
-
-    def test_long_long_type(self):
-        """Test that 'long long'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('long_long.cpp', set(['long long']))
-
-    @skipUnlessDarwin
-    def test_long_long_type_from_block(self):
-        """Test that 'long_long'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('long_long.cpp', set(['long long']), bc=True)
-
-    def test_unsigned_long_long_type(self):
-        """Test that 'unsigned long long'-type variable expressions are evaluated correctly."""
-        self.build_and_run_expr('unsigned_long_long.cpp',
-                                set(['unsigned', 'long long']))
-
-    @skipUnlessDarwin
-    def test_unsigned_long_long_type_from_block(self):
-        """Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
-        self.build_and_run_expr('unsigned_long_long.cpp', set(
-            ['unsigned', 'long long']), bc=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestLongTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestLongTypes.py
new file mode 100644
index 0000000..28f8193
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestLongTypes.py
@@ -0,0 +1,51 @@
+"""
+Test that variables of integer basic types are displayed correctly.
+"""
+
+import AbstractBase
+
+from lldbsuite.test.decorators import *
+
+
+class LongTypesTestCase(AbstractBase.GenericTester):
+
+    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
+
+    def test_long_type(self):
+        """Test that long-type variables are displayed correctly."""
+        self.build_and_run('long.cpp', set(['long']))
+
+    @skipUnlessDarwin
+    def test_long_type_from_block(self):
+        """Test that long-type variables are displayed correctly from a block."""
+        self.build_and_run('long.cpp', set(['long']), bc=True)
+
+    def test_unsigned_long_type(self):
+        """Test that 'unsigned long'-type variables are displayed correctly."""
+        self.build_and_run('unsigned_long.cpp', set(['unsigned', 'long']))
+
+    @skipUnlessDarwin
+    def test_unsigned_long_type_from_block(self):
+        """Test that 'unsigned_long'-type variables are displayed correctly from a block."""
+        self.build_and_run(
+            'unsigned_long.cpp', set(['unsigned', 'long']), bc=True)
+
+    def test_long_long_type(self):
+        """Test that 'long long'-type variables are displayed correctly."""
+        self.build_and_run('long_long.cpp', set(['long long']))
+
+    @skipUnlessDarwin
+    def test_long_long_type_from_block(self):
+        """Test that 'long_long'-type variables are displayed correctly from a block."""
+        self.build_and_run('long_long.cpp', set(['long long']), bc=True)
+
+    def test_unsigned_long_long_type(self):
+        """Test that 'unsigned long long'-type variables are displayed correctly."""
+        self.build_and_run('unsigned_long_long.cpp',
+                           set(['unsigned', 'long long']))
+
+    @skipUnlessDarwin
+    def test_unsigned_long_long_type_from_block(self):
+        """Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
+        self.build_and_run(
+            'unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestLongTypesExpr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestLongTypesExpr.py
new file mode 100644
index 0000000..b753a9d
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestLongTypesExpr.py
@@ -0,0 +1,51 @@
+"""
+Test that variable expressions of integer basic types are evaluated correctly.
+"""
+
+import AbstractBase
+
+from lldbsuite.test.decorators import *
+
+
+class LongTypesExprTestCase(AbstractBase.GenericTester):
+
+    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
+
+    def test_long_type(self):
+        """Test that long-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr('long.cpp', set(['long']))
+
+    @skipUnlessDarwin
+    def test_long_type_from_block(self):
+        """Test that long-type variables are displayed correctly from a block."""
+        self.build_and_run_expr('long.cpp', set(['long']), bc=True)
+
+    def test_unsigned_long_type(self):
+        """Test that 'unsigned long'-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr('unsigned_long.cpp', set(['unsigned', 'long']))
+
+    @skipUnlessDarwin
+    def test_unsigned_long_type_from_block(self):
+        """Test that 'unsigned_long'-type variables are displayed correctly from a block."""
+        self.build_and_run_expr(
+            'unsigned_long.cpp', set(['unsigned', 'long']), bc=True)
+
+    def test_long_long_type(self):
+        """Test that 'long long'-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr('long_long.cpp', set(['long long']))
+
+    @skipUnlessDarwin
+    def test_long_long_type_from_block(self):
+        """Test that 'long_long'-type variables are displayed correctly from a block."""
+        self.build_and_run_expr('long_long.cpp', set(['long long']), bc=True)
+
+    def test_unsigned_long_long_type(self):
+        """Test that 'unsigned long long'-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr('unsigned_long_long.cpp',
+                                set(['unsigned', 'long long']))
+
+    @skipUnlessDarwin
+    def test_unsigned_long_long_type_from_block(self):
+        """Test that 'unsigned_long_long'-type variables are displayed correctly from a block."""
+        self.build_and_run_expr(
+            'unsigned_long_long.cpp', set(['unsigned', 'long long']), bc=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestRecursiveTypes.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestRecursiveTypes.py
index 40c028f..69194cf 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestRecursiveTypes.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestRecursiveTypes.py
@@ -2,12 +2,10 @@
 Test that recursive types are handled correctly.
 """
 
-from __future__ import print_function
 
 
 import lldb
 import lldbsuite.test.lldbutil as lldbutil
-import sys
 from lldbsuite.test.lldbtest import *
 
 
@@ -18,10 +16,7 @@
     def setUp(self):
         # Call super's setUp().
         TestBase.setUp(self)
-        # disable "There is a running process, kill it and restart?" prompt
-        self.runCmd("settings set auto-confirm true")
-        self.addTearDownHook(
-            lambda: self.runCmd("settings clear auto-confirm"))
+
         # Find the line number to break for main.c.
         self.line = line_number('recursive_type_main.cpp',
                                 '// Test at this line.')
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestShortType.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestShortType.py
new file mode 100644
index 0000000..d940d1b
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestShortType.py
@@ -0,0 +1,31 @@
+"""
+Test that variables of type short are displayed correctly.
+"""
+
+import AbstractBase
+
+from lldbsuite.test.decorators import *
+
+
+class ShortTypeTestCase(AbstractBase.GenericTester):
+
+    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
+
+    def test_short_type(self):
+        """Test that short-type variables are displayed correctly."""
+        self.build_and_run('short.cpp', set(['short']))
+
+    @skipUnlessDarwin
+    def test_short_type_from_block(self):
+        """Test that short-type variables are displayed correctly from a block."""
+        self.build_and_run('short.cpp', set(['short']), bc=True)
+
+    def test_unsigned_short_type(self):
+        """Test that 'unsigned_short'-type variables are displayed correctly."""
+        self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']))
+
+    @skipUnlessDarwin
+    def test_unsigned_short_type_from_block(self):
+        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
+        self.build_and_run(
+            'unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestShortTypeExpr.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestShortTypeExpr.py
new file mode 100644
index 0000000..17bcfd3
--- /dev/null
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test/types/TestShortTypeExpr.py
@@ -0,0 +1,32 @@
+"""
+Test that variable expressions of type short are evaluated correctly.
+"""
+
+import AbstractBase
+
+from lldbsuite.test.decorators import *
+
+
+class ShortExprTestCase(AbstractBase.GenericTester):
+
+    mydir = AbstractBase.GenericTester.compute_mydir(__file__)
+
+    def test_short_type(self):
+        """Test that short-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr('short.cpp', set(['short']))
+
+    @skipUnlessDarwin
+    def test_short_type_from_block(self):
+        """Test that short-type variables are displayed correctly from a block."""
+        self.build_and_run_expr('short.cpp', set(['short']), bc=True)
+
+    def test_unsigned_short_type(self):
+        """Test that 'unsigned_short'-type variable expressions are evaluated correctly."""
+        self.build_and_run_expr('unsigned_short.cpp',
+                                set(['unsigned', 'short']))
+
+    @skipUnlessDarwin
+    def test_unsigned_short_type_from_block(self):
+        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
+        self.build_and_run_expr(
+            'unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/warnings/uuid/Makefile b/src/llvm-project/lldb/packages/Python/lldbsuite/test/warnings/uuid/Makefile
deleted file mode 100644
index 8a7102e..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/warnings/uuid/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-LEVEL = ../../make
-
-CXX_SOURCES := main.cpp
-
-include $(LEVEL)/Makefile.rules
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py
deleted file mode 100644
index 11c3bc8..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test/warnings/uuid/TestAddDsymCommand.py
+++ /dev/null
@@ -1,131 +0,0 @@
-"""Test that the 'add-dsym', aka 'target symbols add', command informs the user about success or failure."""
-
-from __future__ import print_function
-
-
-import os
-import time
-import lldb
-from lldbsuite.test.decorators import *
-from lldbsuite.test.lldbtest import *
-from lldbsuite.test import lldbutil
-
-
-@skipUnlessDarwin
-class AddDsymCommandCase(TestBase):
-
-    mydir = TestBase.compute_mydir(__file__)
-
-    def setUp(self):
-        TestBase.setUp(self)
-        self.template = 'main.cpp.template'
-        self.source = 'main.cpp'
-        self.teardown_hook_added = False
-
-    @no_debug_info_test
-    def test_add_dsym_command_with_error(self):
-        """Test that the 'add-dsym' command informs the user about failures."""
-
-        # Call the program generator to produce main.cpp, version 1.
-        self.generate_main_cpp(version=1)
-        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
-
-        # Insert some delay and then call the program generator to produce
-        # main.cpp, version 2.
-        time.sleep(5)
-        self.generate_main_cpp(version=101)
-        # Now call make again, but this time don't generate the dSYM.
-        self.buildDefault(dictionary={'MAKE_DSYM':'NO'})
-
-        self.exe_name = 'a.out'
-        self.do_add_dsym_with_error(self.exe_name)
-
-    @no_debug_info_test
-    def test_add_dsym_command_with_success(self):
-        """Test that the 'add-dsym' command informs the user about success."""
-
-        # Call the program generator to produce main.cpp, version 1.
-        self.generate_main_cpp(version=1)
-        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
-
-        self.exe_name = 'a.out'
-        self.do_add_dsym_with_success(self.exe_name)
-
-    @no_debug_info_test
-    def test_add_dsym_with_dSYM_bundle(self):
-        """Test that the 'add-dsym' command informs the user about success."""
-
-        # Call the program generator to produce main.cpp, version 1.
-        self.generate_main_cpp(version=1)
-        self.buildDefault(dictionary={'MAKE_DSYM':'YES'})
-
-        self.exe_name = 'a.out'
-        self.do_add_dsym_with_dSYM_bundle(self.exe_name)
-
-    def generate_main_cpp(self, version=0):
-        """Generate main.cpp from main.cpp.template."""
-        temp = os.path.join(self.getSourceDir(), self.template)
-        with open(temp, 'r') as f:
-            content = f.read()
-
-        new_content = content.replace(
-            '%ADD_EXTRA_CODE%',
-            'printf("This is version %d\\n");' %
-            version)
-        src = os.path.join(self.getBuildDir(), self.source)
-        with open(src, 'w') as f:
-            f.write(new_content)
-
-        # The main.cpp has been generated, add a teardown hook to remove it.
-        if not self.teardown_hook_added:
-            self.addTearDownHook(lambda: os.remove(src))
-            self.teardown_hook_added = True
-
-    def do_add_dsym_with_error(self, exe_name):
-        """Test that the 'add-dsym' command informs the user about failures."""
-        exe_path = self.getBuildArtifact(exe_name)
-        self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET)
-
-        wrong_path = os.path.join(self.getBuildDir(),
-                                  "%s.dSYM" % exe_name, "Contents")
-        self.expect("add-dsym " + wrong_path, error=True,
-                    substrs=['invalid module path'])
-
-        right_path = os.path.join(
-            self.getBuildDir(),
-            "%s.dSYM" %
-            exe_path,
-            "Contents",
-            "Resources",
-            "DWARF",
-            exe_name)
-        self.expect("add-dsym " + right_path, error=True,
-                    substrs=['symbol file', 'does not match'])
-
-    def do_add_dsym_with_success(self, exe_name):
-        """Test that the 'add-dsym' command informs the user about success."""
-        exe_path = self.getBuildArtifact(exe_name)
-        self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET)
-
-        # This time, the UUID should match and we expect some feedback from
-        # lldb.
-        right_path = os.path.join(
-            self.getBuildDir(),
-            "%s.dSYM" %
-            exe_path,
-            "Contents",
-            "Resources",
-            "DWARF",
-            exe_name)
-        self.expect("add-dsym " + right_path,
-                    substrs=['symbol file', 'has been added to'])
-
-    def do_add_dsym_with_dSYM_bundle(self, exe_name):
-        """Test that the 'add-dsym' command informs the user about success when loading files in bundles."""
-        exe_path = self.getBuildArtifact(exe_name)
-        self.runCmd("file " + exe_path, CURRENT_EXECUTABLE_SET)
-
-        # This time, the UUID should be found inside the bundle
-        right_path = "%s.dSYM" % exe_path
-        self.expect("add-dsym " + right_path,
-                    substrs=['symbol file', 'has been added to'])
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/build_exception.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/build_exception.py
index 5b00b92..3347d9f 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/build_exception.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/build_exception.py
@@ -13,4 +13,4 @@
     @staticmethod
     def format_build_error(command, command_output):
         return "Error when building test subject.\n\nBuild Command:\n{}\n\nBuild Command Output:\n{}".format(
-            command, command_output)
+            command, command_output.decode("utf-8"))
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/dotest_channels.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/dotest_channels.py
deleted file mode 100644
index a5aa9c7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/dotest_channels.py
+++ /dev/null
@@ -1,208 +0,0 @@
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-Sync lldb and related source from a local machine to a remote machine.
-
-This facilitates working on the lldb sourcecode on multiple machines
-and multiple OS types, verifying changes across all.
-
-
-This module provides asyncore channels used within the LLDB test
-framework.
-"""
-
-from __future__ import print_function
-from __future__ import absolute_import
-
-
-# System modules
-import asyncore
-import socket
-
-# Third-party modules
-from six.moves import cPickle
-
-# LLDB modules
-
-
-class UnpicklingForwardingReaderChannel(asyncore.dispatcher):
-    """Provides an unpickling, forwarding asyncore dispatch channel reader.
-
-    Inferior dotest.py processes with side-channel-based test results will
-    send test result event data in a pickled format, one event at a time.
-    This class supports reconstructing the pickled data and forwarding it
-    on to its final destination.
-
-    The channel data is written in the form:
-    {num_payload_bytes}#{payload_bytes}
-
-    The bulk of this class is devoted to reading and parsing out
-    the payload bytes.
-    """
-
-    def __init__(self, file_object, async_map, forwarding_func):
-        asyncore.dispatcher.__init__(self, sock=file_object, map=async_map)
-
-        self.header_contents = b""
-        self.packet_bytes_remaining = 0
-        self.reading_header = True
-        self.ibuffer = b''
-        self.forwarding_func = forwarding_func
-        if forwarding_func is None:
-            # This whole class is useless if we do nothing with the
-            # unpickled results.
-            raise Exception("forwarding function must be set")
-
-        # Initiate all connections by sending an ack.  This allows
-        # the initiators of the socket to await this to ensure
-        # that this end is up and running (and therefore already
-        # into the async map).
-        ack_bytes = b'*'
-        file_object.send(ack_bytes)
-
-    def deserialize_payload(self):
-        """Unpickles the collected input buffer bytes and forwards."""
-        if len(self.ibuffer) > 0:
-            self.forwarding_func(cPickle.loads(self.ibuffer))
-            self.ibuffer = b''
-
-    def consume_header_bytes(self, data):
-        """Consumes header bytes from the front of data.
-        @param data the incoming data stream bytes
-        @return any data leftover after consuming header bytes.
-        """
-        # We're done if there is no content.
-        if not data or (len(data) == 0):
-            return None
-
-        full_header_len = 4
-
-        assert len(self.header_contents) < full_header_len
-
-        bytes_avail = len(data)
-        bytes_needed = full_header_len - len(self.header_contents)
-        header_bytes_avail = min(bytes_needed, bytes_avail)
-        self.header_contents += data[:header_bytes_avail]
-        if len(self.header_contents) == full_header_len:
-            import struct
-            # End of header.
-            self.packet_bytes_remaining = struct.unpack(
-                "!I", self.header_contents)[0]
-            self.header_contents = b""
-            self.reading_header = False
-            return data[header_bytes_avail:]
-
-        # If we made it here, we've exhausted the data and
-        # we're still parsing header content.
-        return None
-
-    def consume_payload_bytes(self, data):
-        """Consumes payload bytes from the front of data.
-        @param data the incoming data stream bytes
-        @return any data leftover after consuming remaining payload bytes.
-        """
-        if not data or (len(data) == 0):
-            # We're done and there's nothing to do.
-            return None
-
-        data_len = len(data)
-        if data_len <= self.packet_bytes_remaining:
-            # We're consuming all the data provided.
-            self.ibuffer += data
-            self.packet_bytes_remaining -= data_len
-
-            # If we're no longer waiting for payload bytes,
-            # we flip back to parsing header bytes and we
-            # unpickle the payload contents.
-            if self.packet_bytes_remaining < 1:
-                self.reading_header = True
-                self.deserialize_payload()
-
-            # We're done, no more data left.
-            return None
-        else:
-            # We're only consuming a portion of the data since
-            # the data contains more than the payload amount.
-            self.ibuffer += data[:self.packet_bytes_remaining]
-            data = data[self.packet_bytes_remaining:]
-
-            # We now move on to reading the header.
-            self.reading_header = True
-            self.packet_bytes_remaining = 0
-
-            # And we can deserialize the payload.
-            self.deserialize_payload()
-
-            # Return the remaining data.
-            return data
-
-    def handle_read(self):
-        # Read some data from the socket.
-        try:
-            data = self.recv(8192)
-            # print('driver socket READ: %d bytes' % len(data))
-        except socket.error as socket_error:
-            print(
-                "\nINFO: received socket error when reading data "
-                "from test inferior:\n{}".format(socket_error))
-            raise
-        except Exception as general_exception:
-            print(
-                "\nERROR: received non-socket error when reading data "
-                "from the test inferior:\n{}".format(general_exception))
-            raise
-
-        # Consume the message content.
-        while data and (len(data) > 0):
-            # If we're reading the header, gather header bytes.
-            if self.reading_header:
-                data = self.consume_header_bytes(data)
-            else:
-                data = self.consume_payload_bytes(data)
-
-    def handle_close(self):
-        # print("socket reader: closing port")
-        self.close()
-
-
-class UnpicklingForwardingListenerChannel(asyncore.dispatcher):
-    """Provides a socket listener asyncore channel for unpickling/forwarding.
-
-    This channel will listen on a socket port (use 0 for host-selected).  Any
-    client that connects will have an UnpicklingForwardingReaderChannel handle
-    communication over the connection.
-
-    The dotest parallel test runners, when collecting test results, open the
-    test results side channel over a socket.  This channel handles connections
-    from inferiors back to the test runner.  Each worker fires up a listener
-    for each inferior invocation.  This simplifies the asyncore.loop() usage,
-    one of the reasons for implementing with asyncore.  This listener shuts
-    down once a single connection is made to it.
-    """
-
-    def __init__(self, async_map, host, port, backlog_count, forwarding_func):
-        asyncore.dispatcher.__init__(self, map=async_map)
-        self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
-        self.set_reuse_addr()
-        self.bind((host, port))
-        self.address = self.socket.getsockname()
-        self.listen(backlog_count)
-        self.handler = None
-        self.async_map = async_map
-        self.forwarding_func = forwarding_func
-        if forwarding_func is None:
-            # This whole class is useless if we do nothing with the
-            # unpickled results.
-            raise Exception("forwarding function must be set")
-
-    def handle_accept(self):
-        (sock, addr) = self.socket.accept()
-        if sock and addr:
-            # print('Incoming connection from %s' % repr(addr))
-            self.handler = UnpicklingForwardingReaderChannel(
-                sock, self.async_map, self.forwarding_func)
-
-    def handle_close(self):
-        self.close()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/__init__.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/__init__.py
index 3bb482c..1fe6ecd 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/__init__.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/__init__.py
@@ -24,7 +24,6 @@
 
     def __init__(self):
         self.filename = None
-        self.port = None
         self.formatter_name = None
         self.formatter_options = None
 
@@ -48,43 +47,10 @@
     @return an instance of CreatedFormatter.
     """
 
-    def create_socket(port):
-        """Creates a socket to the localhost on the given port.
-
-        @param port the port number of the listening port on
-        the localhost.
-
-        @return (socket object, socket closing function)
-        """
-
-        def socket_closer(open_sock):
-            """Close down an opened socket properly."""
-            open_sock.shutdown(socket.SHUT_RDWR)
-            open_sock.close()
-
-        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        sock.connect(("localhost", port))
-
-        # Wait for the ack from the listener side.
-        # This is needed to prevent a race condition
-        # in the main dosep.py processing loop: we
-        # can't allow a worker queue thread to die
-        # that has outstanding messages to a listener
-        # socket before the listener socket asyncore
-        # listener socket gets spun up; otherwise,
-        # we lose the test result info.
-        read_bytes = sock.recv(1)
-        if read_bytes is None or (len(read_bytes) < 1) or (read_bytes != b'*'):
-            raise Exception(
-                "listening socket did not respond with ack byte: response={}".format(read_bytes))
-
-        return sock, lambda: socket_closer(sock)
-
     default_formatter_name = None
     results_file_object = None
     cleanup_func = None
 
-    file_is_stream = False
     if config.filename:
         # Open the results file for writing.
         if config.filename == 'stdout':
@@ -98,12 +64,6 @@
             cleanup_func = results_file_object.close
         default_formatter_name = (
             "lldbsuite.test_event.formatter.xunit.XunitFormatter")
-    elif config.port:
-        # Connect to the specified localhost port.
-        results_file_object, cleanup_func = create_socket(config.port)
-        default_formatter_name = (
-            "lldbsuite.test_event.formatter.pickled.RawPickledFormatter")
-        file_is_stream = True
 
     # If we have a results formatter name specified and we didn't specify
     # a results file, we should use stdout.
@@ -141,8 +101,7 @@
         # Create the TestResultsFormatter given the processed options.
         results_formatter_object = cls(
             results_file_object,
-            formatter_options,
-            file_is_stream)
+            formatter_options)
 
         def shutdown_formatter():
             """Shuts down the formatter when it is no longer needed."""
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py
deleted file mode 100644
index 05b773f..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/curses.py
+++ /dev/null
@@ -1,341 +0,0 @@
-"""
-  Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-  See https://llvm.org/LICENSE.txt for license information.
-  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""
-
-from __future__ import absolute_import
-from __future__ import print_function
-
-# System modules
-import curses
-import datetime
-import math
-import sys
-import time
-
-# Third-party modules
-
-# LLDB modules
-from lldbsuite.test import lldbcurses
-
-from . import results_formatter
-from ..event_builder import EventBuilder
-
-
-class Curses(results_formatter.ResultsFormatter):
-    """Receives live results from tests that are running and reports them to the terminal in a curses GUI"""
-
-    def __init__(self, out_file, options, file_is_stream):
-        # Initialize the parent
-        super(Curses, self).__init__(out_file, options, file_is_stream)
-        self.using_terminal = True
-        self.have_curses = True
-        self.initialize_event = None
-        self.jobs = [None] * 64
-        self.job_tests = [None] * 64
-        self.results = list()
-        try:
-            self.main_window = lldbcurses.intialize_curses()
-            self.main_window.add_key_action(
-                '\t',
-                self.main_window.select_next_first_responder,
-                "Switch between views that can respond to keyboard input")
-            self.main_window.refresh()
-            self.job_panel = None
-            self.results_panel = None
-            self.status_panel = None
-            self.info_panel = None
-            self.hide_status_list = list()
-            self.start_time = time.time()
-        except:
-            self.have_curses = False
-            lldbcurses.terminate_curses()
-            self.using_terminal = False
-            print("Unexpected error:", sys.exc_info()[0])
-            raise
-
-        self.line_dict = dict()
-        # self.events_file = open("/tmp/events.txt", "w")
-        # self.formatters = list()
-        # if tee_results_formatter:
-        #     self.formatters.append(tee_results_formatter)
-
-    def status_to_short_str(self, status, test_event):
-        if status == EventBuilder.STATUS_SUCCESS:
-            return '.'
-        elif status == EventBuilder.STATUS_FAILURE:
-            return 'F'
-        elif status == EventBuilder.STATUS_UNEXPECTED_SUCCESS:
-            return '?'
-        elif status == EventBuilder.STATUS_EXPECTED_FAILURE:
-            return 'X'
-        elif status == EventBuilder.STATUS_SKIP:
-            return 'S'
-        elif status == EventBuilder.STATUS_ERROR:
-            if test_event.get("issue_phase", None) == "build":
-                # Build failure
-                return 'B'
-            else:
-                return 'E'
-        elif status == EventBuilder.STATUS_TIMEOUT:
-            return 'T'
-        elif status == EventBuilder.STATUS_EXPECTED_TIMEOUT:
-            return 't'
-        else:
-            return status
-
-    def show_info_panel(self):
-        selected_idx = self.results_panel.get_selected_idx()
-        if selected_idx >= 0 and selected_idx < len(self.results):
-            if self.info_panel is None:
-                info_frame = self.results_panel.get_contained_rect(
-                    top_inset=10, left_inset=10, right_inset=10, height=30)
-                self.info_panel = lldbcurses.BoxedPanel(
-                    info_frame, "Result Details")
-                # Add a key action for any key that will hide this panel when
-                # any key is pressed
-                self.info_panel.add_key_action(-1,
-                                               self.hide_info_panel,
-                                               'Hide the info panel')
-                self.info_panel.top()
-            else:
-                self.info_panel.show()
-
-            self.main_window.push_first_responder(self.info_panel)
-            test_start = self.results[selected_idx][0]
-            test_result = self.results[selected_idx][1]
-            self.info_panel.set_line(
-                0, "File: %s" %
-                (test_start['test_filename']))
-            self.info_panel.set_line(
-                1, "Test: %s.%s" %
-                (test_start['test_class'], test_start['test_name']))
-            self.info_panel.set_line(
-                2, "Time: %s" %
-                (test_result['elapsed_time']))
-            self.info_panel.set_line(3, "Status: %s" % (test_result['status']))
-
-    def hide_info_panel(self):
-        self.main_window.pop_first_responder(self.info_panel)
-        self.info_panel.hide()
-        self.main_window.refresh()
-
-    def toggle_status(self, status):
-        if status:
-            # Toggle showing and hiding results whose status matches "status"
-            # in "Results" window
-            if status in self.hide_status_list:
-                self.hide_status_list.remove(status)
-            else:
-                self.hide_status_list.append(status)
-            self.update_results()
-
-    def update_results(self, update=True):
-        '''Called after a category of test have been show/hidden to update the results list with
-           what the user desires to see.'''
-        self.results_panel.clear(update=False)
-        for result in self.results:
-            test_result = result[1]
-            status = test_result['status']
-            if status in self.hide_status_list:
-                continue
-            name = test_result['test_class'] + '.' + test_result['test_name']
-            self.results_panel.append_line(
-                '%s (%6.2f sec) %s' %
-                (self.status_to_short_str(
-                    status,
-                    test_result),
-                    test_result['elapsed_time'],
-                    name))
-        if update:
-            self.main_window.refresh()
-
-    def handle_event(self, test_event):
-        with self.lock:
-            super(Curses, self).handle_event(test_event)
-            # for formatter in self.formatters:
-            #     formatter.process_event(test_event)
-            if self.have_curses:
-                worker_index = -1
-                if 'worker_index' in test_event:
-                    worker_index = test_event['worker_index']
-                if 'event' in test_event:
-                    check_for_one_key = True
-                    #print(str(test_event), file=self.events_file)
-                    event = test_event['event']
-                    if self.status_panel:
-                        self.status_panel.update_status(
-                            'time', str(
-                                datetime.timedelta(
-                                    seconds=math.floor(
-                                        time.time() - self.start_time))))
-                    if event == 'test_start':
-                        name = test_event['test_class'] + \
-                            '.' + test_event['test_name']
-                        self.job_tests[worker_index] = test_event
-                        if 'pid' in test_event:
-                            line = 'pid: %5d ' % (test_event['pid']) + name
-                        else:
-                            line = name
-                        self.job_panel.set_line(worker_index, line)
-                        self.main_window.refresh()
-                    elif event == 'test_result':
-                        status = test_event['status']
-                        self.status_panel.increment_status(status)
-                        if 'pid' in test_event:
-                            line = 'pid: %5d ' % (test_event['pid'])
-                        else:
-                            line = ''
-                        self.job_panel.set_line(worker_index, line)
-                        name = test_event['test_class'] + \
-                            '.' + test_event['test_name']
-                        elapsed_time = test_event[
-                            'event_time'] - self.job_tests[worker_index]['event_time']
-                        if status not in self.hide_status_list:
-                            self.results_panel.append_line(
-                                '%s (%6.2f sec) %s' %
-                                (self.status_to_short_str(
-                                    status, test_event), elapsed_time, name))
-                        self.main_window.refresh()
-                        # Append the result pairs
-                        test_event['elapsed_time'] = elapsed_time
-                        self.results.append(
-                            [self.job_tests[worker_index], test_event])
-                        self.job_tests[worker_index] = ''
-                    elif event == 'job_begin':
-                        self.jobs[worker_index] = test_event
-                        if 'pid' in test_event:
-                            line = 'pid: %5d ' % (test_event['pid'])
-                        else:
-                            line = ''
-                        self.job_panel.set_line(worker_index, line)
-                    elif event == 'job_end':
-                        self.jobs[worker_index] = ''
-                        self.job_panel.set_line(worker_index, '')
-                    elif event == 'initialize':
-                        self.initialize_event = test_event
-                        num_jobs = test_event['worker_count']
-                        job_frame = self.main_window.get_contained_rect(
-                            height=num_jobs + 2)
-                        results_frame = self.main_window.get_contained_rect(
-                            top_inset=num_jobs + 2, bottom_inset=1)
-                        status_frame = self.main_window.get_contained_rect(
-                            height=1, top_inset=self.main_window.get_size().h - 1)
-                        self.job_panel = lldbcurses.BoxedPanel(
-                            frame=job_frame, title="Jobs")
-                        self.results_panel = lldbcurses.BoxedPanel(
-                            frame=results_frame, title="Results")
-
-                        self.results_panel.add_key_action(
-                            curses.KEY_UP,
-                            self.results_panel.select_prev,
-                            "Select the previous list entry")
-                        self.results_panel.add_key_action(
-                            curses.KEY_DOWN, self.results_panel.select_next, "Select the next list entry")
-                        self.results_panel.add_key_action(
-                            curses.KEY_HOME,
-                            self.results_panel.scroll_begin,
-                            "Scroll to the start of the list")
-                        self.results_panel.add_key_action(
-                            curses.KEY_END, self.results_panel.scroll_end, "Scroll to the end of the list")
-                        self.results_panel.add_key_action(
-                            curses.KEY_ENTER,
-                            self.show_info_panel,
-                            "Display info for the selected result item")
-                        self.results_panel.add_key_action(
-                            '.',
-                            lambda: self.toggle_status(
-                                EventBuilder.STATUS_SUCCESS),
-                            "Toggle showing/hiding tests whose status is 'success'")
-                        self.results_panel.add_key_action(
-                            'e',
-                            lambda: self.toggle_status(
-                                EventBuilder.STATUS_ERROR),
-                            "Toggle showing/hiding tests whose status is 'error'")
-                        self.results_panel.add_key_action(
-                            'f',
-                            lambda: self.toggle_status(
-                                EventBuilder.STATUS_FAILURE),
-                            "Toggle showing/hiding tests whose status is 'failure'")
-                        self.results_panel.add_key_action('s', lambda: self.toggle_status(
-                            EventBuilder.STATUS_SKIP), "Toggle showing/hiding tests whose status is 'skip'")
-                        self.results_panel.add_key_action(
-                            'x',
-                            lambda: self.toggle_status(
-                                EventBuilder.STATUS_EXPECTED_FAILURE),
-                            "Toggle showing/hiding tests whose status is 'expected_failure'")
-                        self.results_panel.add_key_action(
-                            '?',
-                            lambda: self.toggle_status(
-                                EventBuilder.STATUS_UNEXPECTED_SUCCESS),
-                            "Toggle showing/hiding tests whose status is 'unexpected_success'")
-                        self.status_panel = lldbcurses.StatusPanel(
-                            frame=status_frame)
-
-                        self.main_window.add_child(self.job_panel)
-                        self.main_window.add_child(self.results_panel)
-                        self.main_window.add_child(self.status_panel)
-                        self.main_window.set_first_responder(
-                            self.results_panel)
-
-                        self.status_panel.add_status_item(
-                            name="time",
-                            title="Elapsed",
-                            format="%s",
-                            width=20,
-                            value="0:00:00",
-                            update=False)
-                        self.status_panel.add_status_item(
-                            name=EventBuilder.STATUS_SUCCESS,
-                            title="Success",
-                            format="%u",
-                            width=20,
-                            value=0,
-                            update=False)
-                        self.status_panel.add_status_item(
-                            name=EventBuilder.STATUS_FAILURE,
-                            title="Failure",
-                            format="%u",
-                            width=20,
-                            value=0,
-                            update=False)
-                        self.status_panel.add_status_item(
-                            name=EventBuilder.STATUS_ERROR,
-                            title="Error",
-                            format="%u",
-                            width=20,
-                            value=0,
-                            update=False)
-                        self.status_panel.add_status_item(
-                            name=EventBuilder.STATUS_SKIP,
-                            title="Skipped",
-                            format="%u",
-                            width=20,
-                            value=0,
-                            update=True)
-                        self.status_panel.add_status_item(
-                            name=EventBuilder.STATUS_EXPECTED_FAILURE,
-                            title="Expected Failure",
-                            format="%u",
-                            width=30,
-                            value=0,
-                            update=False)
-                        self.status_panel.add_status_item(
-                            name=EventBuilder.STATUS_UNEXPECTED_SUCCESS,
-                            title="Unexpected Success",
-                            format="%u",
-                            width=30,
-                            value=0,
-                            update=False)
-                        self.main_window.refresh()
-                    elif event == 'terminate':
-                        # self.main_window.key_event_loop()
-                        lldbcurses.terminate_curses()
-                        check_for_one_key = False
-                        self.using_terminal = False
-                        # Check for 1 keypress with no delay
-
-                    # Check for 1 keypress with no delay
-                    if check_for_one_key:
-                        self.main_window.key_event_loop(0, 1)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/dump_formatter.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/dump_formatter.py
deleted file mode 100644
index 2a0cda1..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/dump_formatter.py
+++ /dev/null
@@ -1,22 +0,0 @@
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""
-
-from __future__ import print_function
-from __future__ import absolute_import
-
-# System modules
-import pprint
-
-# Our modules
-from .results_formatter import ResultsFormatter
-
-
-class DumpFormatter(ResultsFormatter):
-    """Formats events to the file as their raw python dictionary format."""
-
-    def handle_event(self, test_event):
-        super(DumpFormatter, self).handle_event(test_event)
-        self.out_file.write("\n" + pprint.pformat(test_event) + "\n")
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/pickled.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/pickled.py
deleted file mode 100644
index acb5c56..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/pickled.py
+++ /dev/null
@@ -1,79 +0,0 @@
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-"""
-
-from __future__ import print_function
-from __future__ import absolute_import
-
-# System modules
-import os
-
-# Our modules
-from .results_formatter import ResultsFormatter
-from six.moves import cPickle
-
-
-class RawPickledFormatter(ResultsFormatter):
-    """Formats events as a pickled stream.
-
-    The parallel test runner has inferiors pickle their results and send them
-    over a socket back to the parallel test.  The parallel test runner then
-    aggregates them into the final results formatter (e.g. xUnit).
-    """
-
-    @classmethod
-    def arg_parser(cls):
-        """@return arg parser used to parse formatter-specific options."""
-        parser = super(RawPickledFormatter, cls).arg_parser()
-        return parser
-
-    class StreamSerializer(object):
-
-        @staticmethod
-        def serialize(test_event, out_file):
-            # Send it as
-            # {serialized_length_of_serialized_bytes}{serialized_bytes}
-            import struct
-            msg = cPickle.dumps(test_event)
-            packet = struct.pack("!I%ds" % len(msg), len(msg), msg)
-            out_file.send(packet)
-
-    class BlockSerializer(object):
-
-        @staticmethod
-        def serialize(test_event, out_file):
-            cPickle.dump(test_event, out_file)
-
-    def __init__(self, out_file, options, file_is_stream):
-        super(
-            RawPickledFormatter,
-            self).__init__(
-            out_file,
-            options,
-            file_is_stream)
-        self.pid = os.getpid()
-        if file_is_stream:
-            self.serializer = self.StreamSerializer()
-        else:
-            self.serializer = self.BlockSerializer()
-
-    def handle_event(self, test_event):
-        super(RawPickledFormatter, self).handle_event(test_event)
-
-        # Convert initialize/terminate events into job_begin/job_end events.
-        event_type = test_event["event"]
-        if event_type is None:
-            return
-
-        if event_type == "initialize":
-            test_event["event"] = "job_begin"
-        elif event_type == "terminate":
-            test_event["event"] = "job_end"
-
-        # Tack on the pid.
-        test_event["pid"] = self.pid
-
-        # Serialize the test event.
-        self.serializer.serialize(test_event, self.out_file)
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/results_formatter.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/results_formatter.py
index ac2778e..140a319 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/results_formatter.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/results_formatter.py
@@ -114,7 +114,7 @@
                   'the summary output.'))
         return parser
 
-    def __init__(self, out_file, options, file_is_stream):
+    def __init__(self, out_file, options):
         super(ResultsFormatter, self).__init__()
         self.out_file = out_file
         self.options = options
@@ -123,7 +123,6 @@
             raise Exception("ResultsFormatter created with no file object")
         self.start_time_by_test = {}
         self.terminate_called = False
-        self.file_is_stream = file_is_stream
 
         # Track the most recent test start event by worker index.
         # We'll use this to assign TIMEOUT and exceptional
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py
index 9e36045..e480df5 100644
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py
+++ b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/formatter/xunit.py
@@ -155,14 +155,14 @@
                 regex_list.append(re.compile(pattern))
         return regex_list
 
-    def __init__(self, out_file, options, file_is_stream):
+    def __init__(self, out_file, options):
         """Initializes the XunitFormatter instance.
         @param out_file file-like object where formatted output is written.
         @param options specifies a dictionary of options for the
         formatter.
         """
         # Initialize the parent
-        super(XunitFormatter, self).__init__(out_file, options, file_is_stream)
+        super(XunitFormatter, self).__init__(out_file, options)
         self.text_encoding = "UTF-8"
         self.invalid_xml_re = XunitFormatter._build_illegal_xml_regex()
         self.total_test_count = 0
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/test/resources/invalid_decorator/TestInvalidDecorator.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/test/resources/invalid_decorator/TestInvalidDecorator.py
deleted file mode 100644
index 7f5c4cb..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/test/resources/invalid_decorator/TestInvalidDecorator.py
+++ /dev/null
@@ -1,13 +0,0 @@
-from __future__ import print_function
-from lldbsuite.test import lldbtest
-from lldbsuite.test import decorators
-
-
-class NonExistentDecoratorTestCase(lldbtest.TestBase):
-
-    mydir = lldbtest.TestBase.compute_mydir(__file__)
-
-    @decorators.nonExistentDecorator(bugnumber="yt/1300")
-    def test(self):
-        """Verify non-existent decorators are picked up by test runner."""
-        pass
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py
deleted file mode 100644
index 5b199de..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/test/src/TestCatchInvalidDecorator.py
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-"""
-Tests that the event system reports issues during decorator
-handling as errors.
-"""
-# System-provided imports
-import os
-import unittest
-
-# Local-provided imports
-import event_collector
-
-
-class TestCatchInvalidDecorator(unittest.TestCase):
-
-    TEST_DIR = os.path.join(
-        os.path.dirname(__file__),
-        os.path.pardir,
-        "resources",
-        "invalid_decorator")
-
-    def test_with_whole_file(self):
-        """
-        Test that a non-existent decorator generates a test-event error
-        when running all tests in the file.
-        """
-        # Determine the test case file we're using.
-        test_file = os.path.join(self.TEST_DIR, "TestInvalidDecorator.py")
-
-        # Collect all test events generated for this file.
-        error_results = _filter_error_results(
-            event_collector.collect_events_whole_file(test_file))
-
-        self.assertGreater(
-            len(error_results),
-            0,
-            "At least one job or test error result should have been returned")
-
-    def test_with_function_filter(self):
-        """
-        Test that a non-existent decorator generates a test-event error
-        when running a filtered test.
-        """
-        # Collect all test events generated during running of tests
-        # in a given directory using a test name filter.  Internally,
-        # this runs through a different code path that needs to be
-        # set up to catch exceptions.
-        error_results = _filter_error_results(
-            event_collector.collect_events_for_directory_with_filter(
-                self.TEST_DIR,
-                "NonExistentDecoratorTestCase.test"))
-
-        self.assertGreater(
-            len(error_results),
-            0,
-            "At least one job or test error result should have been returned")
-
-
-def _filter_error_results(events):
-    # Filter out job result events.
-    return [
-        event
-        for event in events
-        if event.get("event", None) in ["job_result", "test_result"] and
-        event.get("status", None) == "error"
-    ]
-
-
-if __name__ == "__main__":
-    unittest.main()
diff --git a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/test/src/event_collector.py b/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/test/src/event_collector.py
deleted file mode 100644
index 6b64cc7..0000000
--- a/src/llvm-project/lldb/packages/Python/lldbsuite/test_event/test/src/event_collector.py
+++ /dev/null
@@ -1,85 +0,0 @@
-from __future__ import absolute_import
-from __future__ import print_function
-
-import os
-import subprocess
-import sys
-import tempfile
-
-# noinspection PyUnresolvedReferences
-from six.moves import cPickle
-
-
-def path_to_dotest_py():
-    return os.path.join(
-        os.path.dirname(__file__),
-        os.path.pardir,
-        os.path.pardir,
-        os.path.pardir,
-        os.path.pardir,
-        os.path.pardir,
-        os.path.pardir,
-        "test",
-        "dotest.py")
-
-
-def _make_pickled_events_filename():
-    with tempfile.NamedTemporaryFile(
-            prefix="lldb_test_event_pickled_event_output",
-            delete=False) as temp_file:
-        return temp_file.name
-
-
-def _collect_events_with_command(command, events_filename):
-    # Run the single test with dotest.py, outputting
-    # the raw pickled events to a temp file.
-    with open(os.devnull, 'w') as dev_null_file:
-        subprocess.call(
-            command,
-            stdout=dev_null_file,
-            stderr=dev_null_file)
-
-    # Unpickle the events
-    events = []
-    if os.path.exists(events_filename):
-        with open(events_filename, "rb") as events_file:
-            while True:
-                try:
-                    # print("reading event")
-                    event = cPickle.load(events_file)
-                    # print("read event: {}".format(event))
-                    if event:
-                        events.append(event)
-                except EOFError:
-                    # This is okay.
-                    break
-        os.remove(events_filename)
-    return events
-
-
-def collect_events_whole_file(test_filename):
-    events_filename = _make_pickled_events_filename()
-    command = [
-        sys.executable,
-        path_to_dotest_py(),
-        "--inferior",
-        "--results-formatter=lldbsuite.test_event.formatter.pickled.RawPickledFormatter",
-        "--results-file={}".format(events_filename),
-        "-p",
-        os.path.basename(test_filename),
-        os.path.dirname(test_filename)]
-    return _collect_events_with_command(command, events_filename)
-
-
-def collect_events_for_directory_with_filter(test_filename, filter_desc):
-    events_filename = _make_pickled_events_filename()
-    command = [
-        sys.executable,
-        path_to_dotest_py(),
-        "--inferior",
-        "--results-formatter=lldbsuite.test_event.formatter.pickled.RawPickledFormatter",
-        "--results-file={}".format(events_filename),
-        "-f",
-        filter_desc,
-        os.path.dirname(test_filename)]
-    return _collect_events_with_command(command, events_filename)
diff --git a/src/llvm-project/lldb/scripts/CMakeLists.txt b/src/llvm-project/lldb/scripts/CMakeLists.txt
deleted file mode 100644
index 7de7973..0000000
--- a/src/llvm-project/lldb/scripts/CMakeLists.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-file(GLOB SWIG_INTERFACES interface/*.i)
-file(GLOB_RECURSE SWIG_SOURCES *.swig)
-set(SWIG_HEADERS
-  ${LLDB_SOURCE_DIR}/include/lldb/API/SBDefines.h
-  ${LLDB_SOURCE_DIR}/include/lldb/lldb-defines.h
-  ${LLDB_SOURCE_DIR}/include/lldb/lldb-enumerations.h
-  ${LLDB_SOURCE_DIR}/include/lldb/lldb-forward.h
-  ${LLDB_SOURCE_DIR}/include/lldb/lldb-types.h
-  ${LLDB_SOURCE_DIR}/include/lldb/lldb-versioning.h
-)
-
-if(LLDB_BUILD_FRAMEWORK)
-  set(framework_arg --framework --target-platform Darwin)
-endif()
-
-find_package(SWIG REQUIRED)
-set(SWIG_MIN_VERSION "2.0.0")
-if (${SWIG_VERSION} VERSION_LESS ${SWIG_MIN_VERSION})
-  message(FATAL_ERROR "LLDB requires swig ${SWIG_MIN_VERSION}, your version is ${SWIG_VERSION}.")
-endif()
-
-add_custom_command(
-  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
-  OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
-  DEPENDS ${SWIG_SOURCES}
-  DEPENDS ${SWIG_INTERFACES}
-  DEPENDS ${SWIG_HEADERS}
-  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Python/prepare_binding_Python.py
-  COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/prepare_bindings.py
-      ${framework_arg}
-      --srcRoot=${LLDB_SOURCE_DIR}
-      --targetDir=${CMAKE_CURRENT_BINARY_DIR}
-      --cfgBldDir=${CMAKE_CURRENT_BINARY_DIR}
-      --prefix=${CMAKE_BINARY_DIR}
-      --swigExecutable=${SWIG_EXECUTABLE}
-  VERBATIM
-  COMMENT "Python script building LLDB Python wrapper")
-
-add_custom_target(swig_wrapper ALL DEPENDS
-  ${CMAKE_CURRENT_BINARY_DIR}/LLDBWrapPython.cpp
-  ${CMAKE_CURRENT_BINARY_DIR}/lldb.py
-)
-
-if(NOT LLDB_BUILD_FRAMEWORK)
-  execute_process(
-    COMMAND ${PYTHON_EXECUTABLE}
-        -c "import distutils.sysconfig, sys; print(distutils.sysconfig.get_python_lib(True, False, sys.argv[1]))"
-        ${CMAKE_BINARY_DIR}
-    OUTPUT_VARIABLE SWIG_PYTHON_DIR
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-  execute_process(
-    COMMAND ${PYTHON_EXECUTABLE}
-        -c "import distutils.sysconfig; print(distutils.sysconfig.get_python_lib(True, False, ''))"
-    OUTPUT_VARIABLE SWIG_INSTALL_DIR
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-  # Install the LLDB python module
-  install(DIRECTORY ${SWIG_PYTHON_DIR}/ DESTINATION ${SWIG_INSTALL_DIR})
-endif()
diff --git a/src/llvm-project/lldb/scripts/Python/finish-swig-Python-LLDB.sh b/src/llvm-project/lldb/scripts/Python/finish-swig-Python-LLDB.sh
deleted file mode 100755
index 1cd1774..0000000
--- a/src/llvm-project/lldb/scripts/Python/finish-swig-Python-LLDB.sh
+++ /dev/null
@@ -1,309 +0,0 @@
-#!/bin/sh
-
-# finish-swig-Python.sh
-#
-# For the Python script interpreter (external to liblldb) to be able to import
-# and use the lldb module, there must be two files, lldb.py and _lldb.so, that
-# it can find. lldb.py is generated by SWIG at the same time it generates the
-# C++ file.  _lldb.so is actually a symlink file that points to the
-# LLDB shared library/framework.
-#
-# The Python script interpreter needs to be able to automatically find
-# these two files. On Darwin systems it searches in the LLDB.framework, as
-# well as in all the normal Python search paths.  On non-Darwin systems
-# these files will need to be put someplace where Python will find them.
-#
-# This shell script creates the _lldb.so symlink in the appropriate place,
-# and copies the lldb.py (and embedded_interpreter.py) file to the correct
-# directory.
-#
-
-# SRC_ROOT is the root of the lldb source tree.
-# TARGET_DIR is where the lldb framework/shared library gets put.
-# CONFIG_BUILD_DIR is where the build-swig-Python-LLDB.sh  shell script
-#           put the lldb.py file it was generated from running SWIG.
-# PYTHON_INSTALL_DIR is where non-Darwin systems want to put the .py and .so
-#           files so that Python can find them automatically.
-# debug_flag (optional) determines whether or not this script outputs
-#           additional information when running.
-
-SRC_ROOT=$1
-TARGET_DIR=$2
-CONFIG_BUILD_DIR=$3
-PYTHON_INSTALL_DIR=$4
-debug_flag=$5
-makefile_flag=$6
-
-# If we don't want Python, then just do nothing here.
-# Note, at present iOS doesn't have Python, so if you're building for iOS be sure to
-# set LLDB_DISABLE_PYTHON to 1.
-
-if [ ! "$LLDB_DISABLE_PYTHON" = "1" ] ; then
-
-if [ -n "$debug_flag" -a "$debug_flag" = "-debug" ]
-then
-    Debug=1
-else
-    Debug=0
-fi
-
-if [ -n "$makefile_flag" -a "$makefile_flag" = "-m" ]
-then
-    MakefileCalled=1
-else
-    MakefileCalled=0
-fi
-
-OS_NAME=`uname -s`
-PYTHON=${PYTHON_EXECUTABLE:-/usr/bin/env python}
-PYTHON_VERSION=`${PYTHON} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'`
-
-if [ $Debug -eq 1 ]
-then
-    echo "The current OS is $OS_NAME"
-    echo "The Python version is $PYTHON_VERSION"
-fi
-
-if [ ${OS_NAME} = "Darwin" ]
-then
-    SOEXT=".dylib"
-else
-    SOEXT=".so"
-fi
-
-#
-#  Determine where to put the files.
-
-if [ $MakefileCalled -eq 0 ]
-then
-    # We are being built by Xcode, so all the lldb Python files can go
-    # into the LLDB.framework/Resources/Python subdirectory.
-
-    if [ ! -d "${TARGET_DIR}/LLDB.framework" ]
-    then
-        echo "Error:  Unable to find LLDB.framework" >&2
-        exit 1
-    else
-        if [ $Debug -eq 1 ]
-        then
-            echo "Found ${TARGET_DIR}/LLDB.framework."
-        fi
-    fi
-
-    # Make the Python directory in the framework if it doesn't already exist
-
-    framework_python_dir="${TARGET_DIR}/LLDB.framework/Resources/Python/lldb"
-else
-    # We are being built by LLVM, so use the PYTHON_INSTALL_DIR argument,
-    # and append the python version directory to the end of it.  Depending on
-    # the system other stuff may need to be put here as well.
-
-    if [ -n "${PYTHON_INSTALL_DIR}" ]
-    then
-        framework_python_dir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, False, \"${PYTHON_INSTALL_DIR}\");"`/lldb
-    else
-        framework_python_dir=`${PYTHON} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True, False);"`/lldb
-    fi
-fi
-
-[ -n "${CONFIG_BUILD_DIR}" ] || CONFIG_BUILD_DIR=${framework_python_dir}
-
-#
-# Look for the directory in which to put the Python files;  if it does not
-# already exist, attempt to make it.
-#
-
-if [ $Debug -eq 1 ]
-then
-    echo "Python files will be put in ${framework_python_dir}"
-fi
-
-python_dirs="${framework_python_dir}"
-
-for python_dir in $python_dirs
-do
-    if [ ! -d "${python_dir}" ]
-    then
-        if [ $Debug -eq 1 ]
-        then
-            echo "Making directory ${python_dir}"
-        fi
-        mkdir -p "${python_dir}"
-    else
-        if [ $Debug -eq 1 ]
-        then
-            echo "${python_dir} already exists."
-        fi
-    fi
-
-    if [ ! -d "${python_dir}" ]
-    then
-        echo "Error: Unable to find or create ${python_dir}" >&2
-        exit 1
-    fi
-done
-
-# Make the symlink that the script bridge for Python will need in the
-# Python framework directory
-
-if [ ! -L "${framework_python_dir}/_lldb.so" ]
-then
-    if [ $Debug -eq 1 ]
-    then
-        echo "Creating symlink for _lldb.so"
-    fi
-    cd "${framework_python_dir}"
-    if [ $MakefileCalled -eq 0 ]
-    then
-        ln -s "../../../LLDB" _lldb.so
-	else
-        ln -s "../../../liblldb${SOEXT}" _lldb.so
-    fi
-else
-    if [ $Debug -eq 1 ]
-    then
-        echo "${framework_python_dir}/_lldb.so already exists."
-    fi
-fi
-
-# Make symlink for darwin-debug on Darwin
-if [ ${OS_NAME} = "Darwin" ] && [ $MakefileCalled -ne 0 ]
-then
-    # We are being built by CMake on Darwin
-
-    if [ ! -L "${framework_python_dir}/darwin-debug" ]
-    then
-        if [ $Debug -eq 1 ]
-        then
-            echo "Creating symlink for darwin-debug"
-        fi
-        cd "${framework_python_dir}"
-    else
-        if [ $Debug -eq 1 ]
-        then
-            echo "${framework_python_dir}/darwin-debug already exists."
-        fi
-    fi
-fi
-
-# Make symlink for lldb-argdumper on any platform
-if [ $MakefileCalled -ne 0 ]
-then
-    # We are being built by CMake
-
-    if [ ! -L "${framework_python_dir}/lldb-argdumper" ]
-    then
-        if [ $Debug -eq 1 ]
-        then
-            echo "Creating symlink for lldb-argdumper"
-        fi
-        cd "${framework_python_dir}"
-        ln -s "../../../../bin/lldb-argdumper" lldb-argdumper
-    else
-        if [ $Debug -eq 1 ]
-        then
-            echo "${framework_python_dir}/lldb-argdumper already exists."
-        fi
-    fi
-fi
-
-create_python_package () {
-    package_dir="${framework_python_dir}$1"
-    package_files="$2"
-    package_name=`echo $1 | tr '/' '.'`
-    package_name="lldb${package_name}"
-
-    if [ ! -d "${package_dir}" ]
-    then
-        mkdir -p "${package_dir}"
-    fi
-
-    for package_file in $package_files
-    do
-        if [ -f "${package_file}" ]
-        then
-            cp "${package_file}" "${package_dir}"
-            package_file_basename=$(basename "${package_file}")
-        fi
-    done
-
-
-    # Create a packate init file if there wasn't one
-    package_init_file="${package_dir}/__init__.py"
-    if [ ! -f "${package_init_file}" ]
-    then
-        printf "__all__ = [" > "${package_init_file}"
-        python_module_separator=""
-        for package_file in $package_files
-        do
-            if [ -f "${package_file}" ]
-            then
-                package_file_basename=$(basename "${package_file}")
-                printf "${python_module_separator}\"${package_file_basename%.*}\"" >> "${package_init_file}"
-                python_module_separator=", "
-            fi
-        done
-        echo "]" >> "${package_init_file}"
-        echo "for x in __all__:" >> "${package_init_file}"
-        echo "    __import__('${package_name}.'+x)" >> "${package_init_file}"
-    fi
-
-
-}
-
-# Copy the lldb.py file into the lldb package directory and rename to __init_.py
-cp "${CONFIG_BUILD_DIR}/lldb.py" "${framework_python_dir}/__init__.py"
-
-# lldb
-package_files="${SRC_ROOT}/source/Interpreter/embedded_interpreter.py"
-create_python_package "" "${package_files}"
-
-# lldb/formatters/cpp
-package_files="${SRC_ROOT}/examples/synthetic/gnu_libstdcpp.py
-${SRC_ROOT}/examples/synthetic/libcxx.py"
-create_python_package "/formatters/cpp" "${package_files}"
-
-# make an empty __init__.py in lldb/runtime
-# this is required for Python to recognize lldb.runtime as a valid package
-# (and hence, lldb.runtime.objc as a valid contained package)
-create_python_package "/runtime" ""
-
-# lldb/formatters
-# having these files copied here ensures that lldb/formatters is a valid package itself
-package_files="${SRC_ROOT}/examples/summaries/cocoa/cache.py
-${SRC_ROOT}/examples/summaries/synth.py
-${SRC_ROOT}/examples/summaries/cocoa/metrics.py
-${SRC_ROOT}/examples/summaries/cocoa/attrib_fromdict.py
-${SRC_ROOT}/examples/summaries/cocoa/Logger.py"
-create_python_package "/formatters" "${package_files}"
-
-# lldb/utils
-package_files="${SRC_ROOT}/examples/python/symbolication.py"
-create_python_package "/utils" "${package_files}"
-
-if [ ${OS_NAME} = "Darwin" ]
-then
-    # lldb/macosx
-    package_files="${SRC_ROOT}/examples/python/crashlog.py
-    ${SRC_ROOT}/examples/darwin/heap_find/heap.py"
-    create_python_package "/macosx" "${package_files}"
-
-    # lldb/diagnose
-    package_files="${SRC_ROOT}/examples/python/diagnose_unwind.py
-    ${SRC_ROOT}/examples/python/diagnose_nsstring.py"
-    create_python_package "/diagnose" "${package_files}"
-
-    # Copy files needed by lldb/macosx/heap.py to build libheap.dylib
-    heap_dir="${framework_python_dir}/macosx/heap"
-    if [ ! -d "${heap_dir}" ]
-    then
-        mkdir -p "${heap_dir}"
-        cp "${SRC_ROOT}/examples/darwin/heap_find/heap/heap_find.cpp" "${heap_dir}"
-        cp "${SRC_ROOT}/examples/darwin/heap_find/heap/Makefile" "${heap_dir}"
-    fi
-fi
-
-fi
-
-exit 0
-
diff --git a/src/llvm-project/lldb/scripts/Python/finishSwigPythonLLDB.py b/src/llvm-project/lldb/scripts/Python/finishSwigPythonLLDB.py
deleted file mode 100644
index ff6a131..0000000
--- a/src/llvm-project/lldb/scripts/Python/finishSwigPythonLLDB.py
+++ /dev/null
@@ -1,945 +0,0 @@
-""" Python SWIG post process script for each language
-
-    --------------------------------------------------------------------------
-    File:           finishSwigPythonLLDB.py
-
-    Overview:       Python script(s) to post process SWIG Python C++ Script
-                    Bridge wrapper code on the Windows/LINUX/OSX platform.
-                    The Python scripts are equivalent to the shell script (.sh)
-                    files.
-                    For the Python script interpreter (external to liblldb) to
-                    be able to import and use the lldb module, there must be
-                    two files, lldb.py and _lldb.so, that it can find. lldb.py
-                    is generated by SWIG at the same time it generates the C++
-                    file.  _lldb.so is actually a symlink file that points to
-                    the LLDB shared library/framework.
-                    The Python script interpreter needs to be able to
-                    automatically find these two files. On Darwin systems it
-                    searches in the LLDB.framework, as well as in all the normal
-                    Python search paths.  On non-Darwin systems these files will
-                    need to be put some place where Python will find them.
-                    This shell script creates the _lldb.so symlink in the
-                    appropriate place, and copies the lldb.py (and
-                    embedded_interpreter.py) file to the correct directory.
-
-    Gotchas:        Python debug complied pythonXX_d.lib is required for SWIG
-                    to build correct LLDBWrapperPython.cpp in order for Visual
-                    Studio to compile successfully. The release version of the
-                    Python lib will not work (20/12/2013).
-                    LLDB (dir) CMakeLists.txt uses windows environmental
-                    variables $PYTHON_INCLUDE and $PYTHON_LIB to locate
-                    Python files required for the build.
-
-    Copyright:      None.
-    --------------------------------------------------------------------------
-
-"""
-
-# Python modules:
-import os           # Provide directory and file handling, determine OS information
-import sys          # System specific parameters and functions
-import shutil       # High-level operations on files and collections of files
-import ctypes       # Invoke Windows API for creating symlinks
-
-# Third party modules:
-
-# In-house modules:
-import utilsOsType      # Determine the OS type this script is running on
-import utilsDebug       # Debug Python scripts
-
-# User facing text:
-strMsgOsVersion = "The current OS is %s"
-strMsgPyVersion = "The Python version is %d.%d"
-strErrMsgProgFail = "Program failure: "
-strErrMsgLLDBPyFileNotNotFound = "Unable to locate lldb.py at path '%s'"
-strMsgCopyLLDBPy = "Copying lldb.py from '%s' to '%s'"
-strErrMsgFrameWkPyDirNotExist = "Unable to find the LLDB.framework directory '%s'"
-strMsgCreatePyPkgCopyPkgFile = "create_py_pkg: Copied file '%s' to folder '%s'"
-strMsgCreatePyPkgInitFile = "create_py_pkg: Creating pakage init file '%s'"
-strMsgCreatePyPkgMkDir = "create_py_pkg: Created folder '%s'"
-strMsgConfigBuildDir = "Configuration build directory located at '%s'"
-strMsgFoundLldbFrameWkDir = "Found '%s'"
-strMsgPyFileLocatedHere = "Python file will be put in '%s'"
-strMsgFrameWkPyExists = "Python output folder '%s' already exists"
-strMsgFrameWkPyMkDir = "Python output folder '%s' will be created"
-strErrMsgCreateFrmWkPyDirFailed = "Unable to create directory '%s' error: %s"
-strMsgSymlinkExists = "Symlink for '%s' already exists"
-strMsgSymlinkMk = "Creating symlink for %s  (%s -> %s)"
-strErrMsgCpLldbpy = "copying lldb to lldb package directory"
-strErrMsgCreatePyPkgMissingSlash = "Parameter 3 fn create_py_pkg() missing slash"
-strErrMsgMkLinkExecute = "Command mklink failed: %s"
-strErrMsgMakeSymlink = "creating symbolic link"
-strErrMsgUnexpected = "Unexpected error: %s"
-strMsgCopySixPy = "Copying six.py from '%s' to '%s'"
-strErrMsgCopySixPyFailed = "Unable to copy '%s' to '%s'"
-
-
-def is_debug_interpreter():
-    return hasattr(sys, 'gettotalrefcount')
-
-#++---------------------------------------------------------------------------
-# Details:  Copy files needed by lldb/macosx/heap.py to build libheap.dylib.
-# Args:     vDictArgs               - (R) Program input parameters.
-#           vstrFrameworkPythonDir  - (R) Python framework directory.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def macosx_copy_file_for_heap(vDictArgs, vstrFrameworkPythonDir):
-    dbg = utilsDebug.CDebugFnVerbose(
-        "Python script macosx_copy_file_for_heap()")
-    bOk = True
-    strMsg = ""
-
-    eOSType = utilsOsType.determine_os_type()
-    if eOSType != utilsOsType.EnumOsType.Darwin:
-        return (bOk, strMsg)
-
-    strHeapDir = os.path.join(vstrFrameworkPythonDir, "macosx", "heap")
-    strHeapDir = os.path.normcase(strHeapDir)
-    if os.path.exists(strHeapDir) and os.path.isdir(strHeapDir):
-        return (bOk, strMsg)
-
-    os.makedirs(strHeapDir)
-
-    strRoot = os.path.normpath(vDictArgs["--srcRoot"])
-    strSrc = os.path.join(
-        strRoot,
-        "examples",
-        "darwin",
-        "heap_find",
-        "heap",
-        "heap_find.cpp")
-    shutil.copy(strSrc, strHeapDir)
-    strSrc = os.path.join(
-        strRoot,
-        "examples",
-        "darwin",
-        "heap_find",
-        "heap",
-        "Makefile")
-    shutil.copy(strSrc, strHeapDir)
-
-    return (bOk, strMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Create Python packages and Python __init__ files.
-# Args:     vDictArgs               - (R) Program input parameters.
-#           vstrFrameworkPythonDir  - (R) Python framework directory.
-#           vstrPkgDir              - (R) Destination for copied Python files.
-#           vListPkgFiles           - (R) List of source Python files.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def create_py_pkg(
-        vDictArgs,
-        vstrFrameworkPythonDir,
-        vstrPkgDir,
-        vListPkgFiles):
-    dbg = utilsDebug.CDebugFnVerbose("Python script create_py_pkg()")
-    dbg.dump_object("Package file(s):", vListPkgFiles)
-    bDbg = "-d" in vDictArgs
-
-    bOk = True
-    strMsg = ""
-
-    if vstrPkgDir.__len__() != 0 and vstrPkgDir[0] != "/":
-        bOk = False
-        strMsg = strErrMsgCreatePyPkgMissingSlash
-        return (bOk, strMsg)
-
-    strPkgName = vstrPkgDir
-    strPkgName = "lldb" + strPkgName.replace("/", ".")
-
-    strPkgDir = vstrFrameworkPythonDir
-    strPkgDir += vstrPkgDir
-    strPkgDir = os.path.normcase(strPkgDir)
-
-    if not(os.path.exists(strPkgDir) and os.path.isdir(strPkgDir)):
-        if bDbg:
-            print((strMsgCreatePyPkgMkDir % strPkgDir))
-        os.makedirs(strPkgDir)
-
-    for strPkgFile in vListPkgFiles:
-        if os.path.exists(strPkgFile) and os.path.isfile(strPkgFile):
-            if bDbg:
-                print((strMsgCreatePyPkgCopyPkgFile % (strPkgFile, strPkgDir)))
-            shutil.copy(strPkgFile, strPkgDir)
-
-    # Create a packet init files if there wasn't one
-    strPkgIniFile = os.path.normpath(os.path.join(strPkgDir, "__init__.py"))
-    if os.path.exists(strPkgIniFile) and os.path.isfile(strPkgIniFile):
-        return (bOk, strMsg)
-
-    strPyScript = "__all__ = ["
-    strDelimiter = ""
-    for strPkgFile in vListPkgFiles:
-        if os.path.exists(strPkgFile) and os.path.isfile(strPkgFile):
-            strBaseName = os.path.basename(strPkgFile)
-            nPos = strBaseName.find(".")
-            if nPos != -1:
-                strBaseName = strBaseName[0: nPos]
-            strPyScript += "%s\"%s\"" % (strDelimiter, strBaseName)
-            strDelimiter = ","
-    strPyScript += "]\n"
-    strPyScript += "for x in __all__:\n"
-    strPyScript += "\t__import__('%s.' + x)" % strPkgName
-
-    if bDbg:
-        print((strMsgCreatePyPkgInitFile % strPkgIniFile))
-    file = open(strPkgIniFile, "w")
-    file.write(strPyScript)
-    file.close()
-
-    return (bOk, strMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Copy the lldb.py file into the lldb package directory and rename
-#           to __init_.py.
-# Args:     vDictArgs               - (R) Program input parameters.
-#           vstrFrameworkPythonDir  - (R) Python framework directory.
-#           vstrCfgBldDir           - (R) Config directory path.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def copy_lldbpy_file_to_lldb_pkg_dir(
-        vDictArgs,
-        vstrFrameworkPythonDir,
-        vstrCfgBldDir):
-    dbg = utilsDebug.CDebugFnVerbose(
-        "Python script copy_lldbpy_file_to_lldb_pkg_dir()")
-    bOk = True
-    bDbg = "-d" in vDictArgs
-    strMsg = ""
-
-    strSrc = os.path.join(vstrCfgBldDir, "lldb.py")
-    strSrc = os.path.normcase(strSrc)
-    strDst = os.path.join(vstrFrameworkPythonDir, "__init__.py")
-    strDst = os.path.normcase(strDst)
-
-    if not os.path.exists(strSrc):
-        strMsg = strErrMsgLLDBPyFileNotNotFound % strSrc
-        return (bOk, strMsg)
-
-    try:
-        if bDbg:
-            print((strMsgCopyLLDBPy % (strSrc, strDst)))
-        shutil.copyfile(strSrc, strDst)
-    except IOError as e:
-        bOk = False
-        strMsg = "I/O error(%d): %s %s" % (e.errno,
-                                           e.strerror, strErrMsgCpLldbpy)
-        if e.errno == 2:
-            strMsg += " Src:'%s' Dst:'%s'" % (strSrc, strDst)
-    except:
-        bOk = False
-        strMsg = strErrMsgUnexpected % sys.exec_info()[0]
-
-    return (bOk, strMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Make the symbolic link on a Windows platform.
-# Args:     vstrSrcFile             - (R) Source file name.
-#           vstrTargetFile          - (R) Destination file name.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def make_symlink_windows(vstrSrcPath, vstrTargetPath):
-    print(("Making symlink from %s to %s" % (vstrSrcPath, vstrTargetPath)))
-    dbg = utilsDebug.CDebugFnVerbose("Python script make_symlink_windows()")
-    bOk = True
-    strErrMsg = ""
-    # If the src file doesn't exist, this is an error and we should throw.
-    src_stat = os.stat(vstrSrcPath)
-
-    try:
-        target_stat = os.stat(vstrTargetPath)
-        # If the target file exists but refers to a different file, delete it so that we can
-        # re-create the link.  This can happen if you run this script once (creating a link)
-        # and then delete the source file (so that a brand new file gets created the next time
-        # you compile and link), and then re-run this script, so that both the target hardlink
-        # and the source file exist, but the target refers to an old copy of
-        # the source.
-        if (target_stat.st_ino == src_stat.st_ino) and (
-                target_stat.st_dev == src_stat.st_dev):
-            return (bOk, strErrMsg)
-
-        os.remove(vstrTargetPath)
-    except:
-        # If the target file don't exist, ignore this exception, we will link
-        # it shortly.
-        pass
-
-    try:
-        csl = ctypes.windll.kernel32.CreateHardLinkW
-        csl.argtypes = (ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_uint32)
-        csl.restype = ctypes.c_ubyte
-        if csl(vstrTargetPath, vstrSrcPath, 0) == 0:
-            raise ctypes.WinError()
-    except Exception as e:
-        if e.errno != 17:
-            bOk = False
-            strErrMsg = "WinError(%d): %s %s" % (
-                e.errno, e.strerror, strErrMsgMakeSymlink)
-            strErrMsg += " Src:'%s' Target:'%s'" % (
-                vstrSrcPath, vstrTargetPath)
-
-    return (bOk, strErrMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Make the symbolic link on a UNIX style platform.
-# Args:     vstrSrcFile             - (R) Source file name.
-#           vstrTargetFile          - (R) Destination file name.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def make_symlink_other_platforms(vstrSrcPath, vstrTargetPath):
-    dbg = utilsDebug.CDebugFnVerbose(
-        "Python script make_symlink_other_platforms()")
-    bOk = True
-    strErrMsg = ""
-
-    try:
-        os.symlink(vstrSrcPath, vstrTargetPath)
-    except OSError as e:
-        bOk = False
-        strErrMsg = "OSError(%d): %s %s" % (
-            e.errno, e.strerror, strErrMsgMakeSymlink)
-        strErrMsg += " Src:'%s' Target:'%s'" % (vstrSrcPath, vstrTargetPath)
-    except:
-        bOk = False
-        strErrMsg = strErrMsgUnexpected % sys.exec_info()[0]
-
-    return (bOk, strErrMsg)
-
-
-def make_symlink_native(vDictArgs, strSrc, strTarget):
-    eOSType = utilsOsType.determine_os_type()
-    bDbg = "-d" in vDictArgs
-    bOk = True
-    strErrMsg = ""
-
-    target_filename = os.path.basename(strTarget)
-    if eOSType == utilsOsType.EnumOsType.Unknown:
-        bOk = False
-        strErrMsg = strErrMsgOsTypeUnknown
-    elif eOSType == utilsOsType.EnumOsType.Windows:
-        if bDbg:
-            print((strMsgSymlinkMk % (target_filename, strSrc, strTarget)))
-        bOk, strErrMsg = make_symlink_windows(strSrc,
-                                              strTarget)
-    else:
-        if os.path.islink(strTarget):
-            if bDbg:
-                print((strMsgSymlinkExists % target_filename))
-            return (bOk, strErrMsg)
-        if bDbg:
-            print((strMsgSymlinkMk % (target_filename, strSrc, strTarget)))
-        bOk, strErrMsg = make_symlink_other_platforms(strSrc,
-                                                      strTarget)
-
-    return (bOk, strErrMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Make the symbolic link.
-# Args:     vDictArgs               - (R) Program input parameters.
-#           vstrFrameworkPythonDir  - (R) Python framework directory.
-#           vstrSrcFile             - (R) Source file name.
-#           vstrTargetFile          - (R) Destination file name.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def make_symlink(
-        vDictArgs,
-        vstrFrameworkPythonDir,
-        vstrSrcFile,
-        vstrTargetFile):
-    dbg = utilsDebug.CDebugFnVerbose("Python script make_symlink()")
-    bOk = True
-    strErrMsg = ""
-    bDbg = "-d" in vDictArgs
-    strTarget = os.path.join(vstrFrameworkPythonDir, vstrTargetFile)
-    strTarget = os.path.normcase(strTarget)
-    strSrc = ""
-
-    os.chdir(vstrFrameworkPythonDir)
-    bMakeFileCalled = "-m" in vDictArgs
-    eOSType = utilsOsType.determine_os_type()
-    if not bMakeFileCalled:
-        strBuildDir = os.path.join("..", "..", "..")
-    else:
-        # Resolve vstrSrcFile path relatively the build directory
-        if eOSType == utilsOsType.EnumOsType.Windows:
-            # On a Windows platform the vstrFrameworkPythonDir looks like:
-            # llvm\\build\\Lib\\site-packages\\lldb
-            strBuildDir = os.path.join("..", "..", "..")
-        else:
-            # On a UNIX style platform the vstrFrameworkPythonDir looks like:
-            # llvm/build/lib/python2.7/site-packages/lldb
-            strBuildDir = os.path.join("..", "..", "..", "..")
-    strSrc = os.path.normcase(os.path.join(strBuildDir, vstrSrcFile))
-
-    return make_symlink_native(vDictArgs, strSrc, strTarget)
-
-
-#++---------------------------------------------------------------------------
-# Details:  Make the symbolic that the script bridge for Python will need in
-#           the Python framework directory.
-# Args:     vDictArgs               - (R) Program input parameters.
-#           vstrFrameworkPythonDir  - (R) Python framework directory.
-#           vstrLiblldbName         - (R) File name for _lldb library.
-#           vstrLiblldbDir          - (R) liblldb directory.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Error description on task failure.
-# Throws:   None.
-#--
-def make_symlink_liblldb(
-        vDictArgs,
-        vstrFrameworkPythonDir,
-        vstrLiblldbFileName,
-        vstrLldbLibDir):
-    dbg = utilsDebug.CDebugFnVerbose("Python script make_symlink_liblldb()")
-    bOk = True
-    strErrMsg = ""
-    strTarget = vstrLiblldbFileName
-    strSrc = ""
-
-    eOSType = utilsOsType.determine_os_type()
-    if eOSType == utilsOsType.EnumOsType.Windows:
-        # When importing an extension module using a debug version of python, you
-        # write, for example, "import foo", but the interpreter searches for
-        # "foo_d.pyd"
-        if is_debug_interpreter():
-            strTarget += "_d"
-        strTarget += ".pyd"
-    else:
-        strTarget += ".so"
-
-    bMakeFileCalled = "-m" in vDictArgs
-    if not bMakeFileCalled:
-        strSrc = "LLDB"
-    else:
-        strLibFileExtn = ""
-        if eOSType == utilsOsType.EnumOsType.Windows:
-            strSrc = os.path.join("bin", "liblldb.dll")
-        else:
-            if eOSType == utilsOsType.EnumOsType.Darwin:
-                strLibFileExtn = ".dylib"
-            else:
-                strLibFileExtn = ".so"
-            strSrc = os.path.join(vstrLldbLibDir, "liblldb" + strLibFileExtn)
-
-    bOk, strErrMsg = make_symlink(
-        vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget)
-
-    return (bOk, strErrMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Make the symbolic link to the lldb-argdumper.
-# Args:     vDictArgs               - (R) Program input parameters.
-#           vstrFrameworkPythonDir  - (R) Python framework directory.
-#           vstrArgdumperFileName   - (R) File name for lldb-argdumper.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def make_symlink_lldb_argdumper(
-        vDictArgs,
-        vstrFrameworkPythonDir,
-        vstrArgdumperFileName):
-    dbg = utilsDebug.CDebugFnVerbose(
-        "Python script make_symlink_lldb_argdumper()")
-    bOk = True
-    strErrMsg = ""
-    strTarget = vstrArgdumperFileName
-    strSrc = ""
-
-    eOSType = utilsOsType.determine_os_type()
-    if eOSType == utilsOsType.EnumOsType.Windows:
-        strTarget += ".exe"
-
-    bMakeFileCalled = "-m" in vDictArgs
-    if not bMakeFileCalled:
-        return (bOk, strErrMsg)
-    else:
-        strExeFileExtn = ""
-        if eOSType == utilsOsType.EnumOsType.Windows:
-            strExeFileExtn = ".exe"
-        strSrc = os.path.join("bin", "lldb-argdumper" + strExeFileExtn)
-
-    bOk, strErrMsg = make_symlink(
-        vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget)
-
-    return (bOk, strErrMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Make the symlink that the script bridge for Python will need in
-#           the Python framework directory.
-# Args:     vDictArgs               - (R) Program input parameters.
-#           vstrFrameworkPythonDir  - (R) Python framework directory.
-#           vstrLldbLibDir          - (R) liblldb directory.
-# Returns:  Bool - True = function success, False = failure.
-#           strErrMsg - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def create_symlinks(vDictArgs, vstrFrameworkPythonDir, vstrLldbLibDir):
-    dbg = utilsDebug.CDebugFnVerbose("Python script create_symlinks()")
-    bOk = True
-    strErrMsg = ""
-    eOSType = utilsOsType.determine_os_type()
-
-    # Make symlink for _lldb
-    strLibLldbFileName = "_lldb"
-    if bOk:
-        bOk, strErrMsg = make_symlink_liblldb(vDictArgs,
-                                              vstrFrameworkPythonDir,
-                                              strLibLldbFileName,
-                                              vstrLldbLibDir)
-
-    # Make symlink for lldb-argdumper
-    strArgdumperFileName = "lldb-argdumper"
-    if bOk:
-        bOk, strErrMsg = make_symlink_lldb_argdumper(vDictArgs,
-                                                     vstrFrameworkPythonDir,
-                                                     strArgdumperFileName)
-
-    return (bOk, strErrMsg)
-
-
-def copy_six(vDictArgs, vstrFrameworkPythonDir):
-    dbg = utilsDebug.CDebugFnVerbose("Python script copy_six()")
-    bDbg = "-d" in vDictArgs
-    bOk = True
-    strMsg = ""
-    site_packages_dir = os.path.dirname(vstrFrameworkPythonDir)
-    six_module_filename = "six.py"
-    src_file = os.path.join(
-        vDictArgs['--srcRoot'],
-        "third_party",
-        "Python",
-        "module",
-        "six",
-        six_module_filename)
-    src_file = os.path.normpath(src_file)
-    target = os.path.join(site_packages_dir, six_module_filename)
-
-    if bDbg:
-        print((strMsgCopySixPy % (src_file, target)))
-    try:
-        shutil.copyfile(src_file, target)
-    except:
-        bOk = False
-        strMsg = strErrMsgCopySixPyFailed % (src_file, target)
-
-    return (bOk, strMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Look for the directory in which to put the Python files if it
-#           does not already exist, attempt to make it.
-# Args:     vDictArgs               - (R) Program input parameters.
-#           vstrFrameworkPythonDir  - (R) Python framework directory.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def find_or_create_python_dir(vDictArgs, vstrFrameworkPythonDir):
-    dbg = utilsDebug.CDebugFnVerbose(
-        "Python script find_or_create_python_dir()")
-    bOk = True
-    strMsg = ""
-    bDbg = "-d" in vDictArgs
-
-    if os.path.isdir(vstrFrameworkPythonDir):
-        if bDbg:
-            print((strMsgFrameWkPyExists % vstrFrameworkPythonDir))
-        return (bOk, strMsg)
-
-    if bDbg:
-        print((strMsgFrameWkPyMkDir % vstrFrameworkPythonDir))
-
-    try:
-        os.makedirs(vstrFrameworkPythonDir)
-    except OSError as exception:
-        bOk = False
-        strMsg = strErrMsgCreateFrmWkPyDirFailed % (
-            vstrFrameworkPythonDir, os.strerror(exception.errno))
-
-    return (bOk, strMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Retrieve the configuration build path if present and valid (using
-#           parameter --cfgBlddir or copy the Python Framework directory.
-# Args:     vDictArgs               - (R) Program input parameters.
-#           vstrFrameworkPythonDir  - (R) Python framework directory.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Config directory path.
-#           strErrMsg - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def get_config_build_dir(vDictArgs, vstrFrameworkPythonDir):
-    dbg = utilsDebug.CDebugFnVerbose("Python script get_config_build_dir()")
-    bOk = True
-    strErrMsg = ""
-
-    strConfigBldDir = ""
-    bHaveConfigBldDir = "--cfgBldDir" in vDictArgs
-    if bHaveConfigBldDir:
-        strConfigBldDir = vDictArgs["--cfgBldDir"]
-    if (bHaveConfigBldDir == False) or (strConfigBldDir.__len__() == 0):
-        strConfigBldDir = vstrFrameworkPythonDir
-
-    return (bOk, strConfigBldDir, strErrMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Determine where to put the files. Retrieve the directory path for
-#           Python's dist_packages/ site_package folder on a Windows platform.
-# Args:     vDictArgs   - (R) Program input parameters.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Python Framework directory path.
-#           strErrMsg - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def get_framework_python_dir_windows(vDictArgs):
-    dbg = utilsDebug.CDebugFnVerbose(
-        "Python script get_framework_python_dir_windows()")
-    bOk = True
-    strWkDir = ""
-    strErrMsg = ""
-
-    # We are being built by LLVM, so use the PYTHON_INSTALL_DIR argument,
-    # and append the python version directory to the end of it.  Depending
-    # on the system other stuff may need to be put here as well.
-    from distutils.sysconfig import get_python_lib
-    strPythonInstallDir = ""
-    bHaveArgPrefix = "--prefix" in vDictArgs
-    if bHaveArgPrefix:
-        strPythonInstallDir = os.path.normpath(vDictArgs["--prefix"])
-
-    bHaveArgCmakeBuildConfiguration = "--cmakeBuildConfiguration" in vDictArgs
-    if bHaveArgCmakeBuildConfiguration:
-        strPythonInstallDir = os.path.join(
-            strPythonInstallDir,
-            vDictArgs["--cmakeBuildConfiguration"])
-
-    if strPythonInstallDir.__len__() != 0:
-        strWkDir = get_python_lib(True, False, strPythonInstallDir)
-    else:
-        strWkDir = get_python_lib(True, False)
-    strWkDir = os.path.normcase(os.path.join(strWkDir, "lldb"))
-
-    return (bOk, strWkDir, strErrMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Retrieve the directory path for Python's dist_packages/
-#           site_package folder on a UNIX style platform.
-# Args:     vDictArgs   - (R) Program input parameters.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Python Framework directory path.
-#           strErrMsg - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def get_framework_python_dir_other_platforms(vDictArgs):
-    dbg = utilsDebug.CDebugFnVerbose(
-        "Python script get_framework_python_dir_other_platform()")
-    bOk = True
-    strWkDir = ""
-    strErrMsg = ""
-    bDbg = "-d" in vDictArgs
-
-    bMakeFileCalled = "-m" in vDictArgs
-    if bMakeFileCalled:
-        dbg.dump_text("Built by LLVM")
-        return get_framework_python_dir_windows(vDictArgs)
-    else:
-        dbg.dump_text("Built by XCode")
-        # We are being built by XCode, so all the lldb Python files can go
-        # into the LLDB.framework/Resources/Python subdirectory.
-        strWkDir = vDictArgs["--targetDir"]
-        strWkDir = os.path.join(strWkDir, "LLDB.framework")
-        if os.path.exists(strWkDir):
-            if bDbg:
-                print((strMsgFoundLldbFrameWkDir % strWkDir))
-            strWkDir = os.path.join(strWkDir, "Resources", "Python", "lldb")
-            strWkDir = os.path.normcase(strWkDir)
-        else:
-            bOk = False
-            strErrMsg = strErrMsgFrameWkPyDirNotExist % strWkDir
-
-    return (bOk, strWkDir, strErrMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Retrieve the directory path for Python's dist_packages/
-#           site_package folder depending on the type of OS platform being
-#           used.
-# Args:     vDictArgs   - (R) Program input parameters.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - Python Framework directory path.
-#           strErrMsg - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def get_framework_python_dir(vDictArgs):
-    dbg = utilsDebug.CDebugFnVerbose(
-        "Python script get_framework_python_dir()")
-    bOk = True
-    strWkDir = ""
-    strErrMsg = ""
-
-    eOSType = utilsOsType.determine_os_type()
-    if eOSType == utilsOsType.EnumOsType.Unknown:
-        bOk = False
-        strErrMsg = strErrMsgOsTypeUnknown
-    elif eOSType == utilsOsType.EnumOsType.Windows:
-        bOk, strWkDir, strErrMsg = get_framework_python_dir_windows(vDictArgs)
-    else:
-        bOk, strWkDir, strErrMsg = get_framework_python_dir_other_platforms(
-            vDictArgs)
-
-    return (bOk, strWkDir, strErrMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Retrieve the liblldb directory path, if it exists and is valid.
-# Args:     vDictArgs               - (R) Program input parameters.
-# Returns:  Bool - True = function success, False = failure.
-#           Str - liblldb directory path.
-#           strErrMsg - Error description on task failure.
-# Throws:   None.
-#--
-
-
-def get_liblldb_dir(vDictArgs):
-    dbg = utilsDebug.CDebugFnVerbose("Python script get_liblldb_dir()")
-    bOk = True
-    strErrMsg = ""
-
-    strLldbLibDir = ""
-    bHaveLldbLibDir = "--lldbLibDir" in vDictArgs
-    if bHaveLldbLibDir:
-        strLldbLibDir = vDictArgs["--lldbLibDir"]
-    if (bHaveLldbLibDir == False) or (strLldbLibDir.__len__() == 0):
-        strLldbLibDir = "lib"
-
-    return (bOk, strLldbLibDir, strErrMsg)
-
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-
-""" Details: Program main entry point fn. Called by another Python script.
-
-    --------------------------------------------------------------------------
-    Details: This script is to be called by another Python script. It is not
-             intended to be called directly i.e from the command line.
-    Args:   vDictArgs   - (R) Map of parameter names to values.
-            -d (optional)   Determines whether or not this script
-                            outputs additional information when running.
-            -m (optional)   Specify called from Makefile system. If given locate
-                            the LLDBWrapPython.cpp in --srcRoot/source folder
-                            else in the --targetDir folder.
-            --srcRoot       The root of the lldb source tree.
-            --targetDir     Where the lldb framework/shared library gets put.
-            --cfgBlddir     Where the buildSwigPythonLLDB.py program will
-            (optional)      put the lldb.py file it generated from running
-                            SWIG.
-            --prefix        Is the root directory used to determine where
-            (optional)      third-party modules for scripting languages should
-                            be installed. Where non-Darwin systems want to put
-                            the .py and .so files so that Python can find them
-                            automatically. Python install directory.
-            --lldbLibDir    The name of the directory containing liblldb.so.
-            (optional)      "lib" by default.
-    Results:    0       Success
-                -100+   Error from this script to the caller script.
-                -100    Error program failure with optional message.
-
-    --------------------------------------------------------------------------
-
-"""
-
-
-def main(vDictArgs):
-    dbg = utilsDebug.CDebugFnVerbose("Python script main()")
-    bOk = True
-    strMsg = ""
-    strErrMsgProgFail = ""
-
-    bDbg = "-d" in vDictArgs
-
-    eOSType = utilsOsType.determine_os_type()
-    if bDbg:
-        pyVersion = sys.version_info
-        print((strMsgOsVersion % utilsOsType.EnumOsType.name_of(eOSType)))
-        print((strMsgPyVersion % (pyVersion[0], pyVersion[1])))
-
-    bOk, strFrameworkPythonDir, strMsg = get_framework_python_dir(vDictArgs)
-
-    if bOk:
-        bOk, strCfgBldDir, strMsg = get_config_build_dir(
-            vDictArgs, strFrameworkPythonDir)
-    if bOk and bDbg:
-        print((strMsgPyFileLocatedHere % strFrameworkPythonDir))
-        print((strMsgConfigBuildDir % strCfgBldDir))
-
-    if bOk:
-        bOk, strLldbLibDir, strMsg = get_liblldb_dir(vDictArgs)
-
-    if bOk:
-        bOk, strMsg = find_or_create_python_dir(
-            vDictArgs, strFrameworkPythonDir)
-
-    if bOk:
-        bOk, strMsg = create_symlinks(
-            vDictArgs, strFrameworkPythonDir, strLldbLibDir)
-
-    bUseSystemSix = "--useSystemSix" in vDictArgs
-
-    if not bUseSystemSix and bOk:
-        bOk, strMsg = copy_six(vDictArgs, strFrameworkPythonDir)
-
-    if bOk:
-        bOk, strMsg = copy_lldbpy_file_to_lldb_pkg_dir(vDictArgs,
-                                                       strFrameworkPythonDir,
-                                                       strCfgBldDir)
-    strRoot = os.path.normpath(vDictArgs["--srcRoot"])
-    if bOk:
-        # lldb
-        listPkgFiles = [
-            os.path.join(
-                strRoot,
-                "source",
-                "Interpreter",
-                "embedded_interpreter.py")]
-        bOk, strMsg = create_py_pkg(
-            vDictArgs, strFrameworkPythonDir, "", listPkgFiles)
-
-    if bOk:
-        # lldb/formatters/cpp
-        listPkgFiles = [
-            os.path.join(
-                strRoot,
-                "examples",
-                "synthetic",
-                "gnu_libstdcpp.py"),
-            os.path.join(
-                strRoot,
-                "examples",
-                "synthetic",
-                "libcxx.py")]
-        bOk, strMsg = create_py_pkg(
-            vDictArgs, strFrameworkPythonDir, "/formatters/cpp", listPkgFiles)
-
-    if bOk:
-        # Make an empty __init__.py in lldb/runtime as this is required for
-        # Python to recognize lldb.runtime as a valid package (and hence,
-        # lldb.runtime.objc as a valid contained package)
-        listPkgFiles = []
-        bOk, strMsg = create_py_pkg(
-            vDictArgs, strFrameworkPythonDir, "/runtime", listPkgFiles)
-
-    if bOk:
-        # lldb/formatters
-        # Having these files copied here ensure that lldb/formatters is a
-        # valid package itself
-        listPkgFiles = [
-            os.path.join(
-                strRoot, "examples", "summaries", "cocoa", "cache.py"), os.path.join(
-                strRoot, "examples", "summaries", "synth.py"), os.path.join(
-                strRoot, "examples", "summaries", "cocoa", "metrics.py"), os.path.join(
-                    strRoot, "examples", "summaries", "cocoa", "attrib_fromdict.py"), os.path.join(
-                        strRoot, "examples", "summaries", "cocoa", "Logger.py")]
-        bOk, strMsg = create_py_pkg(
-            vDictArgs, strFrameworkPythonDir, "/formatters", listPkgFiles)
-
-    if bOk:
-        # lldb/utils
-        listPkgFiles = [
-            os.path.join(
-                strRoot,
-                "examples",
-                "python",
-                "symbolication.py")]
-        bOk, strMsg = create_py_pkg(
-            vDictArgs, strFrameworkPythonDir, "/utils", listPkgFiles)
-
-    if bOk and (eOSType == utilsOsType.EnumOsType.Darwin):
-        # lldb/macosx
-        listPkgFiles = [
-            os.path.join(
-                strRoot,
-                "examples",
-                "python",
-                "crashlog.py"),
-            os.path.join(
-                strRoot,
-                "examples",
-                "darwin",
-                "heap_find",
-                "heap.py")]
-        bOk, strMsg = create_py_pkg(
-            vDictArgs, strFrameworkPythonDir, "/macosx", listPkgFiles)
-
-    if bOk and (eOSType == utilsOsType.EnumOsType.Darwin):
-        # lldb/diagnose
-        listPkgFiles = [
-            os.path.join(
-                strRoot,
-                "examples",
-                "python",
-                "diagnose_unwind.py"),
-            os.path.join(
-                strRoot,
-                "examples",
-                "python",
-                "diagnose_nsstring.py")]
-        bOk, strMsg = create_py_pkg(
-            vDictArgs, strFrameworkPythonDir, "/diagnose", listPkgFiles)
-
-    if bOk:
-        bOk, strMsg = macosx_copy_file_for_heap(
-            vDictArgs, strFrameworkPythonDir)
-
-    if bOk:
-        return (0, strMsg)
-    else:
-        strErrMsgProgFail += strMsg
-        return (-100, strErrMsgProgFail)
-
-
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-
-# This script can be called by another Python script by calling the main()
-# function directly
-if __name__ == "__main__":
-    print("Script cannot be called directly, called by finishSwigWrapperClasses.py")
diff --git a/src/llvm-project/lldb/scripts/Python/prepare_binding_Python.py b/src/llvm-project/lldb/scripts/Python/prepare_binding_Python.py
deleted file mode 100644
index 31aef6c..0000000
--- a/src/llvm-project/lldb/scripts/Python/prepare_binding_Python.py
+++ /dev/null
@@ -1,393 +0,0 @@
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-Python binding preparation script.
-"""
-
-# Python modules:
-from __future__ import print_function
-
-import logging
-import os
-import re
-import shutil
-import subprocess
-import sys
-import platform
-
-
-class SwigSettings(object):
-    """Provides a single object to represent swig files and settings."""
-
-    def __init__(self):
-        self.extensions_file = None
-        self.header_files = None
-        self.input_file = None
-        self.interface_files = None
-        self.output_file = None
-        self.safecast_file = None
-        self.typemaps_file = None
-        self.wrapper_file = None
-
-    @classmethod
-    def _any_files_newer(cls, files, check_mtime):
-        """Returns if any of the given files has a newer modified time.
-
-        @param cls the class
-        @param files a list of zero or more file paths to check
-        @param check_mtime the modification time to use as a reference.
-
-        @return True if any file's modified time is newer than check_mtime.
-        """
-        for path in files:
-            path_mtime = os.path.getmtime(path)
-            if path_mtime > check_mtime:
-                # This path was modified more recently than the
-                # check_mtime.
-                return True
-        # If we made it here, nothing was newer than the check_mtime
-        return False
-
-    @classmethod
-    def _file_newer(cls, path, check_mtime):
-        """Tests how recently a file has been modified.
-
-        @param cls the class
-        @param path a file path to check
-        @param check_mtime the modification time to use as a reference.
-
-        @return True if the file's modified time is newer than check_mtime.
-        """
-        path_mtime = os.path.getmtime(path)
-        return path_mtime > check_mtime
-
-    def output_out_of_date(self):
-        """Returns whether the output file is out of date.
-
-        Compares output file time to all the input files.
-
-        @return True if any of the input files are newer than
-        the output file, or if the output file doesn't exist;
-        False otherwise.
-        """
-        if not os.path.exists(self.output_file):
-            logging.info("will generate, missing binding output file")
-            return True
-        output_mtime = os.path.getmtime(self.output_file)
-        if self._any_files_newer(self.header_files, output_mtime):
-            logging.info("will generate, header files newer")
-            return True
-        if self._any_files_newer(self.interface_files, output_mtime):
-            logging.info("will generate, interface files newer")
-            return True
-        if self._file_newer(self.input_file, output_mtime):
-            logging.info("will generate, swig input file newer")
-            return True
-        if self._file_newer(self.extensions_file, output_mtime):
-            logging.info("will generate, swig extensions file newer")
-            return True
-        if self._file_newer(self.wrapper_file, output_mtime):
-            logging.info("will generate, swig wrapper file newer")
-            return True
-        if self._file_newer(self.typemaps_file, output_mtime):
-            logging.info("will generate, swig typemaps file newer")
-            return True
-        if self._file_newer(self.safecast_file, output_mtime):
-            logging.info("will generate, swig safecast file newer")
-            return True
-
-        # If we made it here, nothing is newer than the output file.
-        # Thus, the output file is not out of date.
-        return False
-
-
-def get_header_files(options):
-    """Returns a list of paths to C++ header files for the LLDB API.
-
-    These are the files that define the C++ API that will be wrapped by Python.
-
-    @param options the dictionary of options parsed from the command line.
-
-    @return a list of full paths to the include files used to define the public
-    LLDB C++ API.
-    """
-
-    header_file_paths = []
-    header_base_dir = os.path.join(options.src_root, "include", "lldb")
-
-    # Specify the include files in include/lldb that are not easy to
-    # grab programatically.
-    for header in [
-            "lldb-defines.h",
-            "lldb-enumerations.h",
-            "lldb-forward.h",
-            "lldb-types.h"]:
-        header_file_paths.append(os.path.normcase(
-            os.path.join(header_base_dir, header)))
-
-    # Include the main LLDB.h file.
-    api_dir = os.path.join(header_base_dir, "API")
-    header_file_paths.append(os.path.normcase(
-        os.path.join(api_dir, "LLDB.h")))
-
-    filename_regex = re.compile(r"^SB.+\.h$")
-
-    # Include all the SB*.h files in the API dir.
-    for filename in os.listdir(api_dir):
-        if filename_regex.match(filename):
-            header_file_paths.append(
-                os.path.normcase(os.path.join(api_dir, filename)))
-
-    logging.debug("found public API header file paths: %s", header_file_paths)
-    return header_file_paths
-
-
-def get_interface_files(options):
-    """Returns a list of interface files used as input to swig.
-
-    @param options the options dictionary parsed from the command line args.
-
-    @return a list of full paths to the interface (.i) files used to describe
-    the public API language binding.
-    """
-    interface_file_paths = []
-    interface_dir = os.path.join(options.src_root, "scripts", "interface")
-
-    for filepath in [f for f in os.listdir(interface_dir)
-                     if os.path.splitext(f)[1] == ".i"]:
-        interface_file_paths.append(
-            os.path.normcase(os.path.join(interface_dir, filepath)))
-
-    logging.debug("found swig interface files: %s", interface_file_paths)
-    return interface_file_paths
-
-
-def remove_ignore_enoent(filename):
-    """Removes given file, ignoring error if it doesn't exist.
-
-    @param filename the path of the file to remove.
-    """
-    try:
-        os.remove(filename)
-    except OSError as error:
-        import errno
-        if error.errno != errno.ENOENT:
-            raise
-
-
-def do_swig_rebuild(options, dependency_file, config_build_dir, settings):
-    """Generates Python bindings file from swig.
-
-    This method will do a sys.exit() if something fails.  If it returns to
-    the caller, it succeeded.
-
-    @param options the parsed command line options structure.
-    @param dependency_file path to the bindings dependency file
-    to be generated; otherwise, None if a dependency file is not
-    to be generated.
-    @param config_build_dir used as the output directory used by swig
-    @param settings the SwigSettings that specify a number of aspects used
-    to configure building the Python binding with swig (mostly paths)
-    """
-    if options.generate_dependency_file:
-        temp_dep_file_path = dependency_file + ".tmp"
-
-    # Build the SWIG args list
-    is_darwin = options.target_platform == "Darwin"
-    gen_deps = options.generate_dependency_file
-    darwin_extras = ["-D__APPLE__"] if is_darwin else []
-    deps_args = ["-MMD", "-MF", temp_dep_file_path] if gen_deps else []
-    command = ([
-            options.swig_executable,
-            "-c++",
-            "-shadow",
-            "-python",
-            "-threads",
-            "-I" + os.path.normpath(os.path.join(options.src_root, "include")),
-            "-I" + os.path.curdir,
-            "-D__STDC_LIMIT_MACROS",
-            "-D__STDC_CONSTANT_MACROS"
-        ]
-        + darwin_extras
-        + deps_args
-        + [
-            "-outdir", config_build_dir,
-            "-o", settings.output_file,
-            settings.input_file
-        ]
-    )
-    logging.info("running swig with: %r", command)
-
-    # Execute swig
-    process = subprocess.Popen(
-        command,
-        stdout=subprocess.PIPE,
-        stderr=subprocess.PIPE,
-    )
-    # Wait for SWIG process to terminate
-    swig_stdout, swig_stderr = process.communicate()
-    return_code = process.returncode
-    if return_code != 0:
-        logging.error(
-            "swig failed with error code %d: stdout=%s, stderr=%s",
-            return_code,
-            swig_stdout,
-            swig_stderr)
-        logging.error(
-            "command line:\n%s", ' '.join(command))
-        sys.exit(return_code)
-
-    logging.info("swig generation succeeded")
-    if swig_stdout is not None and len(swig_stdout) > 0:
-        logging.info("swig output: %s", swig_stdout)
-
-    # Move the depedency file we just generated to the proper location.
-    if options.generate_dependency_file:
-        if os.path.exists(temp_dep_file_path):
-            shutil.move(temp_dep_file_path, dependency_file)
-        else:
-            logging.error(
-                "failed to generate Python binding depedency file '%s'",
-                temp_dep_file_path)
-            if os.path.exists(dependency_file):
-                # Delete the old one.
-                os.remove(dependency_file)
-            sys.exit(-10)
-
-
-def get_python_module_path(options):
-    """Returns the location where the lldb Python module should be placed.
-
-    @param options dictionary of options parsed from the command line.
-
-    @return the directory where the lldb module should be placed.
-    """
-    if options.framework:
-        # Caller wants to use the OS X framework packaging.
-
-        # We are packaging in an OS X-style framework bundle. The
-        # module dir will be within the
-        # LLDB.framework/Resources/Python subdirectory.
-        return os.path.join(
-            options.target_dir,
-            "LLDB.framework",
-            "Resources",
-            "Python",
-            "lldb")
-    else:
-        from distutils.sysconfig import get_python_lib
-
-        if options.prefix is not None:
-            module_path = get_python_lib(True, False, options.prefix)
-        else:
-            module_path = get_python_lib(True, False)
-        return os.path.normcase(
-            os.path.join(module_path, "lldb"))
-
-
-def main(options):
-    """Pepares the Python language binding to LLDB.
-
-    @param options the parsed command line argument dictionary
-    """
-    # Setup generated dependency file options.
-    if options.generate_dependency_file:
-        dependency_file = os.path.normcase(os.path.join(
-            options.target_dir, "LLDBWrapPython.cpp.d"))
-    else:
-        dependency_file = None
-
-    # Keep track of all the swig-related settings.
-    settings = SwigSettings()
-
-    # Determine the final binding file path.
-    settings.output_file = os.path.normcase(
-        os.path.join(options.target_dir, "LLDBWrapPython.cpp"))
-
-    # Touch the output file (but don't really generate it) if python
-    # is disabled.
-    disable_python = os.getenv("LLDB_DISABLE_PYTHON", None)
-    if disable_python is not None and disable_python == "1":
-        remove_ignore_enoent(settings.output_file)
-        # Touch the file.
-        open(settings.output_file, 'w').close()
-        logging.info(
-            "Created empty python binding file due to LLDB_DISABLE_PYTHON "
-            "being set")
-        return
-
-    # We also check the GCC_PREPROCESSOR_DEFINITIONS to see if it
-    # contains LLDB_DISABLE_PYTHON.  If so, we skip generating
-    # the binding.
-    gcc_preprocessor_defs = os.getenv("GCC_PREPROCESSOR_DEFINITIONS", None)
-    if gcc_preprocessor_defs is not None:
-        if re.search(r"LLDB_DISABLE_PYTHON", gcc_preprocessor_defs):
-            remove_ignore_enoent(settings.output_file)
-            # Touch the file
-            open(settings.output_file, 'w').close()
-            logging.info(
-                "Created empty python binding file due to "
-                "finding LLDB_DISABLE_PYTHON in GCC_PREPROCESSOR_DEFINITIONS")
-            return
-
-    # Setup paths used during swig invocation.
-    settings.input_file = os.path.normcase(
-        os.path.join(options.src_root, "scripts", "lldb.swig"))
-    scripts_python_dir = os.path.dirname(os.path.realpath(__file__))
-    settings.extensions_file = os.path.normcase(
-        os.path.join(scripts_python_dir, "python-extensions.swig"))
-    settings.wrapper_file = os.path.normcase(
-        os.path.join(scripts_python_dir, "python-wrapper.swig"))
-    settings.typemaps_file = os.path.normcase(
-        os.path.join(scripts_python_dir, "python-typemaps.swig"))
-    settings.safecast_file = os.path.normcase(
-        os.path.join(scripts_python_dir, "python-swigsafecast.swig"))
-
-    settings.header_files = get_header_files(options)
-    settings.interface_files = get_interface_files(options)
-
-    generate_output = settings.output_out_of_date()
-
-    # Determine where to put the module.
-    python_module_path = get_python_module_path(options)
-    logging.info("python module path: %s", python_module_path)
-
-    # Handle the configuration build dir.
-    if options.config_build_dir is not None:
-        config_build_dir = options.config_build_dir
-    else:
-        config_build_dir = python_module_path
-
-    # Allow missing/non-link _lldb.so to force regeneration.
-    if not generate_output:
-        # Ensure the _lldb.so file exists.
-        so_path = os.path.join(python_module_path, "_lldb.so")
-        if not os.path.exists(so_path) or not os.path.islink(so_path):
-            logging.info("_lldb.so doesn't exist or isn't a symlink")
-            generate_output = True
-
-    # Allow missing __init__.py to force regeneration.
-    if not generate_output:
-        # Ensure the __init__.py for the lldb module can be found.
-        init_path = os.path.join(python_module_path, "__init__.py")
-        if not os.path.exists(init_path):
-            logging.info("__init__.py doesn't exist")
-            generate_output = True
-
-    if not generate_output:
-        logging.info(
-            "Skipping Python binding generation: everything is up to date")
-        return
-
-    # Generate the Python binding with swig.
-    logging.info("Python binding is out of date, regenerating")
-    do_swig_rebuild(options, dependency_file, config_build_dir, settings)
-
-
-# This script can be called by another Python script by calling the main()
-# function directly
-if __name__ == "__main__":
-    print("Script cannot be called directly.")
-    sys.exit(-1)
diff --git a/src/llvm-project/lldb/scripts/Python/python-extensions.swig b/src/llvm-project/lldb/scripts/Python/python-extensions.swig
deleted file mode 100644
index 892e1af..0000000
--- a/src/llvm-project/lldb/scripts/Python/python-extensions.swig
+++ /dev/null
@@ -1,1239 +0,0 @@
-
-%extend lldb::SBAddress {
-        %nothreadallow;
-        PyObject *lldb::SBAddress::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBBlock {
-        %nothreadallow;
-        PyObject *lldb::SBBlock::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBBreakpoint {
-        %nothreadallow;
-        PyObject *lldb::SBBreakpoint::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-        
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-
-}
-%extend lldb::SBBreakpointLocation {
-        %nothreadallow;
-        PyObject *lldb::SBBreakpointLocation::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelFull);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-
-%extend lldb::SBBreakpointName {
-        %nothreadallow;
-        PyObject *lldb::SBBreakpointName::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-
-%extend lldb::SBBroadcaster {
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-
-%extend lldb::SBCommandReturnObject {
-        %nothreadallow;
-        PyObject *lldb::SBCommandReturnObject::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-        
-        /* the write() and flush() calls are not part of the SB API proper, and are solely for Python usage
-        they are meant to make an SBCommandReturnObject into a file-like object so that instructions of the sort
-        print >>sb_command_return_object, "something"
-        will work correctly */
-
-        void lldb::SBCommandReturnObject::write (const char* str)
-        {
-            if (str)
-                $self->Printf("%s",str);
-        }
-        void lldb::SBCommandReturnObject::flush ()
-        {}
-}
-%extend lldb::SBCompileUnit {
-        %nothreadallow;
-        PyObject *lldb::SBCompileUnit::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-%extend lldb::SBData {
-        %nothreadallow;
-        PyObject *lldb::SBData::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBDebugger {
-        %nothreadallow;
-        PyObject *lldb::SBDebugger::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBDeclaration {
-        %nothreadallow;
-        PyObject *lldb::SBDeclaration::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-        
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-
-}
-%extend lldb::SBError {
-        %nothreadallow;
-        PyObject *lldb::SBError::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBFileSpec {
-        %nothreadallow;
-        PyObject *lldb::SBFileSpec::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBFrame {
-        %nothreadallow;
-        PyObject *lldb::SBFrame::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBFunction {
-        %nothreadallow;
-        PyObject *lldb::SBFunction::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-        
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-
-}
-%extend lldb::SBInstruction {
-        %nothreadallow;
-        PyObject *lldb::SBInstruction::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBInstructionList {
-        %nothreadallow;
-        PyObject *lldb::SBInstructionList::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBLineEntry {
-        %nothreadallow;
-        PyObject *lldb::SBLineEntry::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-        
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-
-%extend lldb::SBMemoryRegionInfo {
-        %nothreadallow;
-        PyObject *lldb::SBMemoryRegionInfo::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-
-%extend lldb::SBModule {
-        %nothreadallow;
-        PyObject *lldb::SBModule::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-        
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-
-%extend lldb::SBModuleSpec {
-        %nothreadallow;
-        PyObject *lldb::SBModuleSpec::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-
-%extend lldb::SBModuleSpecList {
-        %nothreadallow;
-        PyObject *lldb::SBModuleSpecList::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-
-%extend lldb::SBProcess {
-        %nothreadallow;
-        PyObject *lldb::SBProcess::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBSection {
-        %nothreadallow;
-        PyObject *lldb::SBSection::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-        
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-%extend lldb::SBStream {
-        /* the write() and flush() calls are not part of the SB API proper, and are solely for Python usage
-        they are meant to make an SBStream into a file-like object so that instructions of the sort
-        print >>sb_stream, "something"
-        will work correctly */
-
-        void lldb::SBStream::write (const char* str)
-        {
-            if (str)
-                $self->Printf("%s",str);
-        }
-        void lldb::SBStream::flush ()
-        {}
-}
-%extend lldb::SBSymbol {
-        %nothreadallow;
-        PyObject *lldb::SBSymbol::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-    %pythoncode %{
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-%extend lldb::SBSymbolContext {
-        %nothreadallow;
-        PyObject *lldb::SBSymbolContext::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBSymbolContextList {
-        %nothreadallow;
-        PyObject *lldb::SBSymbolContextList::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-
-%extend lldb::SBTarget {
-        %nothreadallow;
-        PyObject *lldb::SBTarget::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-
-%extend lldb::SBType {
-        %nothreadallow;
-        PyObject *lldb::SBType::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBTypeCategory {
-        %nothreadallow;
-        PyObject *lldb::SBTypeCategory::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBTypeFilter {
-        %nothreadallow;
-        PyObject *lldb::SBTypeFilter::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-%extend lldb::SBTypeFormat {
-        %nothreadallow;
-        PyObject *lldb::SBTypeFormat::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBTypeMember {
-        %nothreadallow;
-        PyObject *lldb::SBTypeMember::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBTypeMemberFunction {
-        %nothreadallow;
-        PyObject *lldb::SBTypeMemberFunction::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBTypeEnumMember {
-        %nothreadallow;
-        PyObject *lldb::SBTypeEnumMember::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBTypeNameSpecifier {
-        %nothreadallow;
-        PyObject *lldb::SBTypeNameSpecifier::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-%extend lldb::SBTypeSummary {
-        %nothreadallow;
-        PyObject *lldb::SBTypeSummary::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-%extend lldb::SBTypeSynthetic {
-        %nothreadallow;
-        PyObject *lldb::SBTypeSynthetic::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelBrief);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-%extend lldb::SBThread {
-        %nothreadallow;
-        PyObject *lldb::SBThread::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-    %pythoncode %{ 
-        def __eq__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return False 
-            
-            return getattr(_lldb,self.__class__.__name__+"___eq__")(self, rhs)
-            
-        def __ne__(self, rhs):
-            if not isinstance(rhs, type(self)): 
-                return True 
-            
-            return getattr(_lldb,self.__class__.__name__+"___ne__")(self, rhs)
-    %}
-}
-%extend lldb::SBValue {
-        %nothreadallow;
-        PyObject *lldb::SBValue::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBValueList {
-        %nothreadallow;
-        PyObject *lldb::SBValueList::__str__ (){
-                lldb::SBStream description;
-                const size_t n = $self->GetSize();
-                if (n)
-                {
-                    for (size_t i=0; i<n; ++i)
-                        $self->GetValueAtIndex(i).GetDescription(description);
-                }
-                else
-                {
-                    description.Printf("<empty> lldb.SBValueList()");
-                }
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-%extend lldb::SBWatchpoint {
-        %nothreadallow;
-        PyObject *lldb::SBWatchpoint::__str__ (){
-                lldb::SBStream description;
-                $self->GetDescription (description, lldb::eDescriptionLevelVerbose);
-                const char *desc = description.GetData();
-                size_t desc_len = description.GetSize();
-                if (desc_len > 0 && (desc[desc_len-1] == '\n' || desc[desc_len-1] == '\r'))
-                    --desc_len;
-                if (desc_len > 0)
-                    return lldb_private::PythonString(llvm::StringRef(desc, desc_len)).release();
-                else
-                    return lldb_private::PythonString("").release();
-        }
-        %clearnothreadallow;
-}
-
-
-// %extend lldb::SBDebugger {
-//         // FIXME: We can't get the callback and baton
-//         PyObject *lldb::SBDebugger (){
-//             // Only call Py_XDECREF if we have a Python object (or NULL)
-//             if (LLDBSwigPythonCallPythonLogOutputCallback == $self->GetLogOutPutCallback())
-//                 Py_XDECREF($self->GetCallbackBaton());
-//         }
-// }
-
-%pythoncode %{
-
-def command(command_name=None, doc=None):
-    import lldb
-    """A decorator function that registers an LLDB command line
-        command that is bound to the function it is attached to."""
-    def callable(function):
-        """Registers an lldb command for the decorated function."""
-        command = "command script add -f %s.%s %s" % (function.__module__, function.__name__, command_name or function.__name__)
-        lldb.debugger.HandleCommand(command)
-        if doc:
-            function.__doc__ = doc
-        return function
-
-    return callable
-
-class declaration(object):
-    '''A class that represents a source declaration location with file, line and column.'''
-    def __init__(self, file, line, col):
-        self.file = file
-        self.line = line
-        self.col = col
-
-class value_iter(object):
-    def __iter__(self):
-        return self
-    
-    def next(self):
-        if self.index >= self.length:
-            raise StopIteration()
-        child_sbvalue = self.sbvalue.GetChildAtIndex(self.index)
-        self.index += 1
-        return value(child_sbvalue)
-        
-    def __init__(self,value):
-        self.index = 0
-        self.sbvalue = value
-        if type(self.sbvalue) is value:
-            self.sbvalue = self.sbvalue.sbvalue
-        self.length = self.sbvalue.GetNumChildren()
-
-class value(object):
-    '''A class designed to wrap lldb.SBValue() objects so the resulting object
-    can be used as a variable would be in code. So if you have a Point structure
-    variable in your code in the current frame named "pt", you can initialize an instance
-    of this class with it:
-    
-    pt = lldb.value(lldb.frame.FindVariable("pt"))
-    print pt
-    print pt.x
-    print pt.y
-
-    pt = lldb.value(lldb.frame.FindVariable("rectangle_array"))
-    print rectangle_array[12]
-    print rectangle_array[5].origin.x'''
-    def __init__(self, sbvalue):
-        self.sbvalue = sbvalue
-
-    def __nonzero__(self):
-        return self.sbvalue.__nonzero__()
-
-    def __str__(self):
-        return self.sbvalue.__str__()
-
-    def __getitem__(self, key):
-        # Allow array access if this value has children...
-        if type(key) is value:
-            key = int(key)
-        if type(key) is int:
-            child_sbvalue = (self.sbvalue.GetValueForExpressionPath("[%i]" % key))
-            if child_sbvalue and child_sbvalue.IsValid():
-                return value(child_sbvalue)
-            raise IndexError("Index '%d' is out of range" % key)
-        raise TypeError("No array item of type %s" % str(type(key)))
-
-    def __iter__(self):
-        return value_iter(self.sbvalue)
-
-    def __getattr__(self, name):
-        child_sbvalue = self.sbvalue.GetChildMemberWithName (name)
-        if child_sbvalue and child_sbvalue.IsValid():
-            return value(child_sbvalue)
-        raise AttributeError("Attribute '%s' is not defined" % name)
-
-    def __add__(self, other):
-        return int(self) + int(other)
-        
-    def __sub__(self, other):
-        return int(self) - int(other)
-        
-    def __mul__(self, other):
-        return int(self) * int(other)
-        
-    def __floordiv__(self, other):
-        return int(self) // int(other)
-        
-    def __mod__(self, other):
-        return int(self) % int(other)
-        
-    def __divmod__(self, other):
-        return int(self) % int(other)
-        
-    def __pow__(self, other):
-        return int(self) ** int(other)
-        
-    def __lshift__(self, other):
-        return int(self) << int(other)
-        
-    def __rshift__(self, other):
-        return int(self) >> int(other)
-        
-    def __and__(self, other):
-        return int(self) & int(other)
-        
-    def __xor__(self, other):
-        return int(self) ^ int(other)
-        
-    def __or__(self, other):
-        return int(self) | int(other)
-        
-    def __div__(self, other):
-        return int(self) / int(other)
-        
-    def __truediv__(self, other):
-        return int(self) / int(other)
-        
-    def __iadd__(self, other):
-        result = self.__add__(other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __isub__(self, other):
-        result = self.__sub__(other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __imul__(self, other):
-        result = self.__mul__(other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __idiv__(self, other):
-        result = self.__div__(other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __itruediv__(self, other):
-        result = self.__truediv__(other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __ifloordiv__(self, other):
-        result =  self.__floordiv__(self, other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __imod__(self, other):
-        result =  self.__and__(self, other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __ipow__(self, other):
-        result = self.__pow__(self, other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __ipow__(self, other, modulo):
-        result = self.__pow__(self, other, modulo)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __ilshift__(self, other):
-        result = self.__lshift__(other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __irshift__(self, other):
-        result =  self.__rshift__(other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __iand__(self, other):
-        result =  self.__and__(self, other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __ixor__(self, other):
-        result =  self.__xor__(self, other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __ior__(self, other):
-        result =  self.__ior__(self, other)
-        self.sbvalue.SetValueFromCString (str(result))
-        return result
-        
-    def __neg__(self):
-        return -int(self)
-        
-    def __pos__(self):
-        return +int(self)
-        
-    def __abs__(self):
-        return abs(int(self))
-        
-    def __invert__(self):
-        return ~int(self)
-        
-    def __complex__(self):
-        return complex (int(self))
-        
-    def __int__(self):
-        is_num,is_sign = is_numeric_type(self.sbvalue.GetType().GetCanonicalType().GetBasicType())
-        if is_num and not is_sign: return self.sbvalue.GetValueAsUnsigned()
-        return self.sbvalue.GetValueAsSigned()
-
-    def __long__(self):
-        return self.__int__()
-
-    def __float__(self):
-        return float (self.sbvalue.GetValueAsSigned())
-        
-    def __oct__(self):
-        return '0%o' % self.sbvalue.GetValueAsUnsigned()
-        
-    def __hex__(self):
-        return '0x%x' % self.sbvalue.GetValueAsUnsigned()
-
-    def __len__(self):
-        return self.sbvalue.GetNumChildren()
-
-    def __eq__(self, other):
-        if type(other) is int:
-                return int(self) == other
-        elif type(other) is str:
-                return str(self) == other
-        elif type(other) is value:
-                self_err = SBError()
-                other_err = SBError()
-                self_val = self.sbvalue.GetValueAsUnsigned(self_err)
-                if self_err.fail:
-                        raise ValueError("unable to extract value of self")
-                other_val = other.sbvalue.GetValueAsUnsigned(other_err)
-                if other_err.fail:
-                        raise ValueError("unable to extract value of other")
-                return self_val == other_val
-        raise TypeError("Unknown type %s, No equality operation defined." % str(type(other)))
-
-    def __ne__(self, other):
-        return not self.__eq__(other)
-%}
-
-%pythoncode %{
-
-class SBSyntheticValueProvider(object):
-    def __init__(self,valobj):
-        pass
-
-    def num_children(self):
-        return 0
-
-    def get_child_index(self,name):
-        return None
-
-    def get_child_at_index(self,idx):
-        return None
-
-    def update(self):
-        pass
-
-    def has_children(self):
-        return False
-
-
-%}
-
-%pythoncode %{
-
-# given an lldb.SBBasicType it returns a tuple
-# (is_numeric, is_signed)
-# the value of is_signed is undefined if is_numeric == false
-def is_numeric_type(basic_type):
-    if basic_type == eBasicTypeInvalid: return (False,False)
-    if basic_type == eBasicTypeVoid: return (False,False)
-    if basic_type == eBasicTypeChar: return (True,False)
-    if basic_type == eBasicTypeSignedChar: return (True,True)
-    if basic_type == eBasicTypeUnsignedChar: return (True,False)
-    if basic_type == eBasicTypeWChar: return (True,False)
-    if basic_type == eBasicTypeSignedWChar: return (True,True)
-    if basic_type == eBasicTypeUnsignedWChar: return (True,False)
-    if basic_type == eBasicTypeChar16: return (True,False)
-    if basic_type == eBasicTypeChar32: return (True,False)
-    if basic_type == eBasicTypeShort: return (True,True)
-    if basic_type == eBasicTypeUnsignedShort: return (True,False)
-    if basic_type == eBasicTypeInt: return (True,True)
-    if basic_type == eBasicTypeUnsignedInt: return (True,False)
-    if basic_type == eBasicTypeLong: return (True,True)
-    if basic_type == eBasicTypeUnsignedLong: return (True,False)
-    if basic_type == eBasicTypeLongLong: return (True,True)
-    if basic_type == eBasicTypeUnsignedLongLong: return (True,False)
-    if basic_type == eBasicTypeInt128: return (True,True)
-    if basic_type == eBasicTypeUnsignedInt128: return (True,False)
-    if basic_type == eBasicTypeBool: return (False,False)
-    if basic_type == eBasicTypeHalf: return (True,True)
-    if basic_type == eBasicTypeFloat: return (True,True)
-    if basic_type == eBasicTypeDouble: return (True,True)
-    if basic_type == eBasicTypeLongDouble: return (True,True)
-    if basic_type == eBasicTypeFloatComplex: return (True,True)
-    if basic_type == eBasicTypeDoubleComplex: return (True,True)
-    if basic_type == eBasicTypeLongDoubleComplex: return (True,True)
-    if basic_type == eBasicTypeObjCID: return (False,False)
-    if basic_type == eBasicTypeObjCClass: return (False,False)
-    if basic_type == eBasicTypeObjCSel: return (False,False)
-    if basic_type == eBasicTypeNullPtr: return (False,False)
-    #if basic_type == eBasicTypeOther:
-    return (False,False)
-
-%}
diff --git a/src/llvm-project/lldb/scripts/Python/python-typemaps.swig b/src/llvm-project/lldb/scripts/Python/python-typemaps.swig
deleted file mode 100644
index e3956fa..0000000
--- a/src/llvm-project/lldb/scripts/Python/python-typemaps.swig
+++ /dev/null
@@ -1,463 +0,0 @@
-/* Typemap definitions, to allow SWIG to properly handle 'char**' data types. */
-
-%typemap(in) char ** {
-  using namespace lldb_private;
-  /* Check if is a list  */
-  if (PythonList::Check($input)) {
-    PythonList list(PyRefType::Borrowed, $input);
-    int size = list.GetSize();
-    int i = 0;
-    $1 = (char**)malloc((size+1)*sizeof(char*));
-    for (i = 0; i < size; i++) {
-      PythonString py_str = list.GetItemAtIndex(i).AsType<PythonString>();
-      if (!py_str.IsAllocated()) {
-        PyErr_SetString(PyExc_TypeError,"list must contain strings");
-        free($1);
-        return nullptr;
-      }
-
-      $1[i] = const_cast<char*>(py_str.GetString().data());
-    }
-    $1[i] = 0;
-  } else if ($input == Py_None) {
-    $1 =  NULL;
-  } else {
-    PyErr_SetString(PyExc_TypeError,"not a list");
-    return NULL;
-  }
-}
-
-%typemap(typecheck) char ** {
-  /* Check if is a list  */
-  $1 = 1;
-  using namespace lldb_private;
-  if (PythonList::Check($input)) {
-    PythonList list(PyRefType::Borrowed, $input);
-    int size = list.GetSize();
-    int i = 0;
-    for (i = 0; i < size; i++) {
-      PythonString s = list.GetItemAtIndex(i).AsType<PythonString>();
-      if (!s.IsAllocated()) { $1 = 0; }
-    }
-  }
-  else
-  {
-    $1 = ( ($input == Py_None) ? 1 : 0);
-  }
-}
-
-%typemap(freearg) char** {
-  free((char *) $1);
-}
-
-%typemap(out) char** {
-  int len;
-  int i;
-  len = 0;
-  while ($1[len]) len++;
-  using namespace lldb_private;
-  PythonList list(len);
-  for (i = 0; i < len; i++)
-    list.SetItemAtIndex(i, PythonString($1[i]));
-  $result = list.release();
-}
-
-
-%typemap(in) lldb::tid_t {
-  using namespace lldb_private;
-  if (PythonInteger::Check($input))
-  {
-    PythonInteger py_int(PyRefType::Borrowed, $input);
-    $1 = static_cast<lldb::tid_t>(py_int.GetInteger());
-  }
-  else
-  {
-    PyErr_SetString(PyExc_ValueError, "Expecting an integer");
-    return nullptr;
-  }
-}
-
-%typemap(in) lldb::StateType {
-  using namespace lldb_private;
-  if (PythonInteger::Check($input))
-  {
-    PythonInteger py_int(PyRefType::Borrowed, $input);
-    int64_t state_type_value = py_int.GetInteger() ;
-
-    if (state_type_value > lldb::StateType::kLastStateType) {
-      PyErr_SetString(PyExc_ValueError, "Not a valid StateType value");
-      return nullptr;
-    }
-    $1 = static_cast<lldb::StateType>(state_type_value);
-  }
-  else
-  {
-    PyErr_SetString(PyExc_ValueError, "Expecting an integer");
-    return nullptr;
-  }
-}
-
-/* Typemap definitions to allow SWIG to properly handle char buffer. */
-
-// typemap for a char buffer
-// See also SBThread::GetStopDescription.
-%typemap(in) (char *dst, size_t dst_len) {
-   if (!PyInt_Check($input)) {
-       PyErr_SetString(PyExc_ValueError, "Expecting an integer");
-       return NULL;
-   }
-   $2 = PyInt_AsLong($input);
-   if ($2 <= 0) {
-       PyErr_SetString(PyExc_ValueError, "Positive integer expected");
-       return NULL;
-   }
-   $1 = (char *) malloc($2);
-}
-// SBProcess::ReadCStringFromMemory() uses a void*, but needs to be treated
-// as char data instead of byte data.
-%typemap(in) (void *char_buf, size_t size) = (char *dst, size_t dst_len);
-
-// Return the char buffer.  Discarding any previous return result
-// See also SBThread::GetStopDescription.
-%typemap(argout) (char *dst, size_t dst_len) {
-   Py_XDECREF($result);   /* Blow away any previous result */
-   if (result == 0) {
-      lldb_private::PythonString string("");
-      $result = string.release();
-      Py_INCREF($result);
-   } else {
-      llvm::StringRef ref(static_cast<const char*>($1), result);
-      lldb_private::PythonString string(ref);
-      $result = string.release();
-   }
-   free($1);
-}
-// SBProcess::ReadCStringFromMemory() uses a void*, but needs to be treated
-// as char data instead of byte data.
-%typemap(argout) (void *char_buf, size_t size) = (char *dst, size_t dst_len);
-
-
-// typemap for an outgoing buffer
-// See also SBEvent::SBEvent(uint32_t event, const char *cstr, uint32_t cstr_len).
-// Ditto for SBProcess::PutSTDIN(const char *src, size_t src_len).
-%typemap(in) (const char *cstr, uint32_t cstr_len),
-             (const char *src, size_t src_len) {
-   using namespace lldb_private;
-   if (PythonString::Check($input)) {
-      PythonString str(PyRefType::Borrowed, $input);
-      $1 = (char*)str.GetString().data();
-      $2 = str.GetSize();
-   }
-   else if(PythonByteArray::Check($input)) {
-      PythonByteArray bytearray(PyRefType::Borrowed, $input);
-      $1 = (char*)bytearray.GetBytes().data();
-      $2 = bytearray.GetSize();
-   }
-   else if (PythonBytes::Check($input)) {
-      PythonBytes bytes(PyRefType::Borrowed, $input);
-      $1 = (char*)bytes.GetBytes().data();
-      $2 = bytes.GetSize();
-   }
-   else {
-      PyErr_SetString(PyExc_ValueError, "Expecting a string");
-      return NULL;
-   }
-}
-// For SBProcess::WriteMemory, SBTarget::GetInstructions and SBDebugger::DispatchInput.
-%typemap(in) (const void *buf, size_t size),
-             (const void *data, size_t data_len) {
-   using namespace lldb_private;
-   if (PythonString::Check($input)) {
-      PythonString str(PyRefType::Borrowed, $input);
-      $1 = (void*)str.GetString().data();
-      $2 = str.GetSize();
-   }
-   else if(PythonByteArray::Check($input)) {
-      PythonByteArray bytearray(PyRefType::Borrowed, $input);
-      $1 = (void*)bytearray.GetBytes().data();
-      $2 = bytearray.GetSize();
-   }
-   else if (PythonBytes::Check($input)) {
-      PythonBytes bytes(PyRefType::Borrowed, $input);
-      $1 = (void*)bytes.GetBytes().data();
-      $2 = bytes.GetSize();
-   }
-   else {
-      PyErr_SetString(PyExc_ValueError, "Expecting a buffer");
-      return NULL;
-   }
-}
-
-// typemap for an incoming buffer
-// See also SBProcess::ReadMemory.
-%typemap(in) (void *buf, size_t size) {
-   if (PyInt_Check($input)) {
-      $2 = PyInt_AsLong($input);
-   } else if (PyLong_Check($input)) {
-      $2 = PyLong_AsLong($input);
-   } else {
-      PyErr_SetString(PyExc_ValueError, "Expecting an integer or long object");
-      return NULL;
-   }
-   if ($2 <= 0) {
-       PyErr_SetString(PyExc_ValueError, "Positive integer expected");
-       return NULL;
-   }
-   $1 = (void *) malloc($2);
-}
-
-// Return the buffer.  Discarding any previous return result
-// See also SBProcess::ReadMemory.
-%typemap(argout) (void *buf, size_t size) {
-   Py_XDECREF($result);   /* Blow away any previous result */
-   if (result == 0) {
-      $result = Py_None;
-      Py_INCREF($result);
-   } else {
-      lldb_private::PythonBytes bytes(static_cast<const uint8_t*>($1), result);
-      $result = bytes.release();
-   }
-   free($1);
-}
-
-%{
-namespace {
-template <class T>
-T PyLongAsT(PyObject *obj) {
-  static_assert(true, "unsupported type"); 
-}
-
-template <> uint64_t PyLongAsT<uint64_t>(PyObject *obj) {
-  return static_cast<uint64_t>(PyLong_AsUnsignedLongLong(obj));
-}
-
-template <> uint32_t PyLongAsT<uint32_t>(PyObject *obj) {
-  return static_cast<uint32_t>(PyLong_AsUnsignedLong(obj));
-}
-
-template <> int64_t PyLongAsT<int64_t>(PyObject *obj) {
-  return static_cast<int64_t>(PyLong_AsLongLong(obj));
-}
-
-template <> int32_t PyLongAsT<int32_t>(PyObject *obj) {
-  return static_cast<int32_t>(PyLong_AsLong(obj));
-}
-
-template <class T>
-bool SetNumberFromPyObject(T &number, PyObject *obj) {
-  if (PyInt_Check(obj))
-    number = static_cast<T>(PyInt_AsLong(obj));
-  else if (PyLong_Check(obj))
-    number = PyLongAsT<T>(obj);
-  else return false;
-
-  return true;
-}
-
-template <>
-bool SetNumberFromPyObject<double>(double &number, PyObject *obj) {
-  if (PyFloat_Check(obj)) {
-    number = PyFloat_AsDouble(obj);
-    return true;
-  }
-
-  return false;
-}
-
-} // namespace
-%}
-
-// these typemaps allow Python users to pass list objects
-// and have them turn into C++ arrays (this is useful, for instance
-// when creating SBData objects from lists of numbers)
-%typemap(in) (uint64_t* array, size_t array_len),
-             (uint32_t* array, size_t array_len),
-             (int64_t* array, size_t array_len),
-             (int32_t* array, size_t array_len),
-             (double* array, size_t array_len) {
-  /* Check if is a list  */
-  if (PyList_Check($input)) {
-    int size = PyList_Size($input);
-    int i = 0;
-    $2 = size;
-    $1 = ($1_type) malloc(size * sizeof($*1_type));
-    for (i = 0; i < size; i++) {
-      PyObject *o = PyList_GetItem($input,i);
-      if (!SetNumberFromPyObject($1[i], o)) {
-        PyErr_SetString(PyExc_TypeError,"list must contain numbers");
-        free($1);
-        return NULL;
-      }
-
-      if (PyErr_Occurred()) {
-        free($1);
-        return NULL;
-      }
-    }
-  } else if ($input == Py_None) {
-    $1 =  NULL;
-    $2 = 0;
-  } else {
-    PyErr_SetString(PyExc_TypeError,"not a list");
-    return NULL;
-  }
-}
-
-%typemap(freearg) (uint64_t* array, size_t array_len),
-                  (uint32_t* array, size_t array_len),
-                  (int64_t* array, size_t array_len),
-                  (int32_t* array, size_t array_len),
-                  (double* array, size_t array_len) {
-  free($1);
-}
-
-// these typemaps wrap SBModule::GetVersion() from requiring a memory buffer
-// to the more Pythonic style where a list is returned and no previous allocation
-// is necessary - this will break if more than 50 versions are ever returned
-%typemap(typecheck) (uint32_t *versions, uint32_t num_versions) {
-    $1 = ($input == Py_None ? 1 : 0);
-}
-
-%typemap(in, numinputs=0) (uint32_t *versions) {
-    $1 = (uint32_t*)malloc(sizeof(uint32_t) * 50);
-}
-
-%typemap(in, numinputs=0) (uint32_t num_versions) {
-    $1 = 50;
-}
-
-%typemap(argout) (uint32_t *versions, uint32_t num_versions) {
-    uint32_t count = result;
-    if (count >= $2)
-        count = $2;
-    PyObject* list = PyList_New(count);
-    for (uint32_t j = 0; j < count; j++)
-    {
-        PyObject* item = PyInt_FromLong($1[j]);
-        int ok = PyList_SetItem(list,j,item);
-        if (ok != 0)
-        {
-            $result = Py_None;
-            break;
-        }
-    }
-    $result = list;
-}
-
-%typemap(freearg) (uint32_t *versions) {
-    free($1);
-}
-
-
-// For Log::LogOutputCallback
-%typemap(in) (lldb::LogOutputCallback log_callback, void *baton) {
-  if (!($input == Py_None || PyCallable_Check(reinterpret_cast<PyObject*>($input)))) {
-    PyErr_SetString(PyExc_TypeError, "Need a callable object or None!");
-    return NULL;
-  }
-
-  // FIXME (filcab): We can't currently check if our callback is already
-  // LLDBSwigPythonCallPythonLogOutputCallback (to DECREF the previous
-  // baton) nor can we just remove all traces of a callback, if we want to
-  // revert to a file logging mechanism.
-
-  // Don't lose the callback reference
-  Py_INCREF($input);
-  $1 = LLDBSwigPythonCallPythonLogOutputCallback;
-  $2 = $input;
-}
-
-%typemap(typecheck) (lldb::LogOutputCallback log_callback, void *baton) {
-  $1 = $input == Py_None;
-  $1 = $1 || PyCallable_Check(reinterpret_cast<PyObject*>($input));
-}
-
-%typemap(in) FILE * {
-   using namespace lldb_private;
-   if ($input == Py_None)
-      $1 = nullptr;
-   else if (!lldb_private::PythonFile::Check($input)) {
-      int fd = PyObject_AsFileDescriptor($input);
-      PythonObject py_input(PyRefType::Borrowed, $input);
-      PythonString py_mode = py_input.GetAttributeValue("mode").AsType<PythonString>();
-
-      if (-1 != fd && py_mode.IsValid()) {
-         FILE *f;
-         if ((f = fdopen(fd, py_mode.GetString().str().c_str())))
-            $1 = f;
-         else
-            PyErr_SetString(PyExc_TypeError, strerror(errno));
-      } else {
-         PyErr_SetString(PyExc_TypeError,"not a file-like object");
-         return nullptr;
-      }
-   }
-   else
-   {
-      PythonFile py_file(PyRefType::Borrowed, $input);
-      File file;
-      if (!py_file.GetUnderlyingFile(file))
-         return nullptr;
-
-      $1 = file.GetStream();
-      if ($1)
-         file.Clear();
-    }
-}
-
-%typemap(out) FILE * {
-   char mode[4] = {0};
-%#ifdef __APPLE__
-   int i = 0;
-   if ($1)
-   {
-       short flags = $1->_flags;
-
-       if (flags & __SRD)
-          mode[i++] = 'r';
-       else if (flags & __SWR)
-          mode[i++] = 'w';
-       else // if (flags & __SRW)
-          mode[i++] = 'a';
-    }
-%#endif
-   using namespace lldb_private;
-   File file($1, false);
-   PythonFile py_file(file, mode);
-   $result = py_file.release();
-   if (!$result)
-   {
-       $result = Py_None;
-       Py_INCREF(Py_None);
-   }
-}
-
-%typemap(in) (const char* string, int len) {
-    using namespace lldb_private;
-    if ($input == Py_None)
-    {
-        $1 = NULL;
-        $2 = 0;
-    }
-    else if (PythonString::Check($input))
-    {
-        PythonString py_str(PyRefType::Borrowed, $input);
-        llvm::StringRef str = py_str.GetString();
-        $1 = const_cast<char*>(str.data());
-        $2 = str.size();
-        // In Python 2, if $input is a PyUnicode object then this
-        // will trigger a Unicode -> String conversion, in which
-        // case the `PythonString` will now own the PyString.  Thus
-        // if it goes out of scope, the data will be deleted.  The
-        // only way to avoid this is to leak the Python object in
-        // that case.  Note that if there was no conversion, then
-        // releasing the string will not leak anything, since we
-        // created this as a borrowed reference.
-        py_str.release();
-    }
-    else
-    {
-        PyErr_SetString(PyExc_TypeError,"not a string-like object");
-        return NULL;
-    }
-}
diff --git a/src/llvm-project/lldb/scripts/Python/python-wrapper.swig b/src/llvm-project/lldb/scripts/Python/python-wrapper.swig
deleted file mode 100644
index 8509899..0000000
--- a/src/llvm-project/lldb/scripts/Python/python-wrapper.swig
+++ /dev/null
@@ -1,1080 +0,0 @@
-%header %{
-
-template <typename T>
-PyObject *
-SBTypeToSWIGWrapper (T* item);
-
-class PyErr_Cleaner
-{
-public:
-    PyErr_Cleaner(bool print=false) :
-    m_print(print)
-    {
-    }
-
-    ~PyErr_Cleaner()
-    {
-        if (PyErr_Occurred())
-        {
-            if(m_print && !PyErr_ExceptionMatches(PyExc_SystemExit))
-                PyErr_Print();
-            PyErr_Clear();
-        }
-    }
-
-private:
-    bool m_print;
-};
-
-%}
-
-%wrapper %{
-
-// resolve a dotted Python name in the form
-// foo.bar.baz.Foobar to an actual Python object
-// if pmodule is NULL, the __main__ module will be used
-// as the starting point for the search
-
-
-// This function is called by lldb_private::ScriptInterpreterPython::BreakpointCallbackFunction(...)
-// and is used when a script command is attached to a breakpoint for execution.
-
-SWIGEXPORT bool
-LLDBSwigPythonBreakpointCallbackFunction
-(
-    const char *python_function_name,
-    const char *session_dictionary_name,
-    const lldb::StackFrameSP& frame_sp,
-    const lldb::BreakpointLocationSP& bp_loc_sp
-)
-{
-    using namespace lldb_private;
-    lldb::SBFrame sb_frame (frame_sp);
-    lldb::SBBreakpointLocation sb_bp_loc(bp_loc_sp);
-
-    bool stop_at_breakpoint = true;
-
-    PyErr_Cleaner py_err_cleaner(true);
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
-
-    if (!pfunc.IsAllocated())
-        return stop_at_breakpoint;
-
-    PythonObject frame_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_frame));
-    PythonObject bp_loc_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_bp_loc));
-    PythonObject result = pfunc(frame_arg, bp_loc_arg, dict);
-
-    if (result.get() == Py_False)
-        stop_at_breakpoint = false;
-
-    return stop_at_breakpoint;
-}
-
-// This function is called by lldb_private::ScriptInterpreterPython::WatchpointCallbackFunction(...)
-// and is used when a script command is attached to a watchpoint for execution.
-
-SWIGEXPORT bool
-LLDBSwigPythonWatchpointCallbackFunction
-(
-    const char *python_function_name,
-    const char *session_dictionary_name,
-    const lldb::StackFrameSP& frame_sp,
-    const lldb::WatchpointSP& wp_sp
-)
-{
-    using namespace lldb_private;
-    lldb::SBFrame sb_frame (frame_sp);
-    lldb::SBWatchpoint sb_wp(wp_sp);
-
-    bool stop_at_watchpoint = true;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
-
-    if (!pfunc.IsAllocated())
-        return stop_at_watchpoint;
-
-    PythonObject frame_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_frame));
-    PythonObject wp_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_wp));
-    PythonObject result = pfunc(frame_arg, wp_arg, dict);
-
-    if (result.get() == Py_False)
-        stop_at_watchpoint = false;
-
-    return stop_at_watchpoint;
-}
-
-SWIGEXPORT bool
-LLDBSwigPythonCallTypeScript
-(
-    const char *python_function_name,
-    const void *session_dictionary,
-    const lldb::ValueObjectSP& valobj_sp,
-    void** pyfunct_wrapper,
-    const lldb::TypeSummaryOptionsSP& options_sp,
-    std::string& retval
-)
-{
-    using namespace lldb_private;
-    lldb::SBValue sb_value (valobj_sp);
-    lldb::SBTypeSummaryOptions sb_options(options_sp.get());
-
-    retval.clear();
-
-    if (!python_function_name || !session_dictionary)
-        return false;
-
-    PyObject *pfunc_impl = nullptr;
-
-    if (pyfunct_wrapper && *pyfunct_wrapper && PyFunction_Check (*pyfunct_wrapper))
-    {
-        pfunc_impl = (PyObject*)(*pyfunct_wrapper);
-        if (pfunc_impl->ob_refcnt == 1)
-        {
-            Py_XDECREF(pfunc_impl);
-            pfunc_impl = NULL;
-        }
-    }
-
-    PyObject *py_dict = (PyObject*)session_dictionary;
-    if (!PythonDictionary::Check(py_dict))
-        return true;
-
-    PythonDictionary dict(PyRefType::Borrowed, py_dict);
-
-    PyErr_Cleaner pyerr_cleanup(true);  // show Python errors
-
-    PythonCallable pfunc(PyRefType::Borrowed, pfunc_impl);
-
-    if (!pfunc.IsAllocated())
-    {
-        pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
-        if (!pfunc.IsAllocated())
-            return false;
-
-        if (pyfunct_wrapper)
-        {
-            *pyfunct_wrapper = pfunc.get();
-            Py_XINCREF(pfunc.get());
-        }
-    }
-
-    PythonObject result;
-    auto argc = pfunc.GetNumArguments();
-    // if the third argument is supported, or varargs are allowed
-    PythonObject value_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_value));
-    PythonObject options_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_options));
-    if (argc.count == 3 || argc.has_varargs)
-        result = pfunc(value_arg,dict,options_arg);
-    else
-        result = pfunc(value_arg,dict);
-
-    retval = result.Str().GetString().str();
-
-    return true;
-}
-
-SWIGEXPORT void*
-LLDBSwigPythonCreateSyntheticProvider
-(
-    const char *python_class_name,
-    const char *session_dictionary_name,
-    const lldb::ValueObjectSP& valobj_sp
-)
-{
-    using namespace lldb_private;
-
-    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
-        Py_RETURN_NONE;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name,dict);
-
-    if (!pfunc.IsAllocated())
-        Py_RETURN_NONE;
-
-    // I do not want the SBValue to be deallocated when going out of scope because python
-    // has ownership of it and will manage memory for this object by itself
-    lldb::SBValue *sb_value = new lldb::SBValue(valobj_sp);
-    sb_value->SetPreferSyntheticValue(false);
-
-    PythonObject val_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_value));
-    if (!val_arg.IsAllocated())
-        Py_RETURN_NONE;
-
-    PythonObject result = pfunc(val_arg, dict);
-
-    if (result.IsAllocated())
-        return result.release();
-
-    Py_RETURN_NONE;
-}
-
-SWIGEXPORT void*
-LLDBSwigPythonCreateCommandObject
-(
-    const char *python_class_name,
-    const char *session_dictionary_name,
-    const lldb::DebuggerSP debugger_sp
-)
-{
-    using namespace lldb_private;
-
-    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
-        Py_RETURN_NONE;
-
-    PyErr_Cleaner py_err_cleaner(true);
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
-
-    if (!pfunc.IsAllocated())
-        return nullptr;
-
-    lldb::SBDebugger debugger_sb(debugger_sp);
-    PythonObject debugger_arg(PyRefType::Owned, SBTypeToSWIGWrapper(debugger_sb));
-    PythonObject result = pfunc(debugger_arg, dict);
-
-    if (result.IsAllocated())
-        return result.release();
-
-    Py_RETURN_NONE;
-}
-
-SWIGEXPORT void*
-LLDBSwigPythonCreateScriptedThreadPlan
-(
-    const char *python_class_name,
-    const char *session_dictionary_name,
-    const lldb::ThreadPlanSP& thread_plan_sp
-)
-{
-    using namespace lldb_private;
-
-    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
-        Py_RETURN_NONE;
-
-    // I do not want the SBThreadPlan to be deallocated when going out of scope because python
-    // has ownership of it and will manage memory for this object by itself
-    lldb::SBThreadPlan *tp_value = new lldb::SBThreadPlan(thread_plan_sp);
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
-
-    if (!pfunc.IsAllocated())
-        return nullptr;
-
-    PythonObject tp_arg(PyRefType::Owned, SBTypeToSWIGWrapper(tp_value));
-
-    if (!tp_arg.IsAllocated())
-        Py_RETURN_NONE;
-
-    PythonObject result = pfunc(tp_arg, dict);
-    // FIXME: At this point we should check that the class we found supports all the methods
-    // that we need.
-
-    if (result.IsAllocated())
-        return result.release();
-    Py_RETURN_NONE;
-}
-
-SWIGEXPORT bool
-LLDBSWIGPythonCallThreadPlan
-(
-    void *implementor,
-    const char *method_name,
-    lldb_private::Event *event,
-    bool &got_error
-)
-{
-    using namespace lldb_private;
-
-    got_error = false;
-
-    PyErr_Cleaner py_err_cleaner(false);
-    PythonObject self(PyRefType::Borrowed, static_cast<PyObject*>(implementor));
-    auto pfunc = self.ResolveName<PythonCallable>(method_name);
-
-    if (!pfunc.IsAllocated())
-        return false;
-
-    PythonObject result;
-    if (event != nullptr)
-    {
-        lldb::SBEvent sb_event(event);
-        PythonObject event_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_event));
-        result = pfunc(event_arg);
-    }
-    else
-        result = pfunc();
-
-    if (PyErr_Occurred())
-    {
-        got_error = true;
-        printf ("Return value was neither false nor true for call to %s.\n", method_name);
-        PyErr_Print();
-        return false;
-    }
-
-    if (result.get() == Py_True)
-        return true;
-    else if (result.get() == Py_False)
-        return false;
-
-    // Somebody returned the wrong thing...
-    got_error = true;
-    printf ("Wrong return value type for call to %s.\n", method_name);
-    return false;
-}
-
-SWIGEXPORT void *
-LLDBSwigPythonCreateScriptedBreakpointResolver
-(
-    const char *python_class_name,
-    const char *session_dictionary_name,
-    lldb_private::StructuredDataImpl *args_impl,
-    lldb::BreakpointSP &breakpoint_sp
-)
-{
-    using namespace lldb_private;
-
-    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
-        Py_RETURN_NONE;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
-
-    if (!pfunc.IsAllocated())
-        return nullptr;
-
-    lldb::SBBreakpoint *bkpt_value = new lldb::SBBreakpoint(breakpoint_sp);
-
-    PythonObject bkpt_arg(PyRefType::Owned, SBTypeToSWIGWrapper(bkpt_value));
-
-    lldb::SBStructuredData *args_value = new lldb::SBStructuredData(args_impl);
-    PythonObject args_arg(PyRefType::Owned, SBTypeToSWIGWrapper(args_value));
-
-    PythonObject result = pfunc(bkpt_arg, args_arg, dict);
-    // FIXME: At this point we should check that the class we found supports all the methods
-    // that we need.
-
-    if (result.IsAllocated())
-    {
-        // Check that __callback__ is defined:
-        auto callback_func = result.ResolveName<PythonCallable>("__callback__");
-        if (callback_func.IsAllocated())
-            return result.release();
-        else
-            result.release();
-    }
-    Py_RETURN_NONE;
-}
-
-SWIGEXPORT unsigned int
-LLDBSwigPythonCallBreakpointResolver
-(
-    void *implementor,
-    const char *method_name,
-    lldb_private::SymbolContext *sym_ctx
-)
-{
-    using namespace lldb_private;
-
-    PyErr_Cleaner py_err_cleaner(false);
-    PythonObject self(PyRefType::Borrowed, static_cast<PyObject*>(implementor));
-    auto pfunc = self.ResolveName<PythonCallable>(method_name);
-
-    if (!pfunc.IsAllocated())
-        return 0;
-
-    PythonObject result;
-    if (sym_ctx != nullptr) {
-      lldb::SBSymbolContext sb_sym_ctx(sym_ctx);
-      PythonObject sym_ctx_arg(PyRefType::Owned, SBTypeToSWIGWrapper(sb_sym_ctx));
-      result = pfunc(sym_ctx_arg);
-    } else
-      result = pfunc();
-
-    if (PyErr_Occurred())
-    {
-        PyErr_Print();
-        return 0;
-    }
-
-    // The callback will return a bool, but we're need to also return ints
-    // so we're squirrelling the bool through as an int...  And if you return
-    // nothing, we'll continue.
-    if (strcmp(method_name, "__callback__") == 0) {
-        if (result.get() == Py_False)
-          return 0;
-        else
-          return 1;
-    }
-
-    PythonInteger int_result = result.AsType<PythonInteger>();
-    if (!int_result.IsAllocated())
-        return 0;
-
-    unsigned int ret_val = int_result.GetInteger();
-
-    return ret_val;
-}
-
-// wrapper that calls an optional instance member of an object taking no arguments
-static PyObject*
-LLDBSwigPython_CallOptionalMember
-(
-    PyObject* implementor,
-    char* callee_name,
-    PyObject* ret_if_not_found = Py_None,
-    bool* was_found = NULL
-)
-{
-    using namespace lldb_private;
-
-    PyErr_Cleaner py_err_cleaner(false);
-
-    PythonObject self(PyRefType::Borrowed, static_cast<PyObject*>(implementor));
-    auto pfunc = self.ResolveName<PythonCallable>(callee_name);
-
-    if (!pfunc.IsAllocated())
-    {
-        if (was_found)
-            *was_found = false;
-        Py_XINCREF(ret_if_not_found);
-        return ret_if_not_found;
-    }
-
-    if (was_found)
-        *was_found = true;
-
-    PythonObject result = pfunc();
-    return result.release();
-}
-
-SWIGEXPORT size_t
-LLDBSwigPython_CalculateNumChildren
-(
-    PyObject *implementor,
-    uint32_t max
-)
-{
-    using namespace lldb_private;
-
-    PythonObject self(PyRefType::Borrowed, implementor);
-    auto pfunc = self.ResolveName<PythonCallable>("num_children");
-
-    if (!pfunc.IsAllocated())
-        return 0;
-
-    PythonObject result;
-    auto argc = pfunc.GetNumArguments();
-    if (argc.count == 1)
-        result = pfunc();
-    else if (argc.count == 2)
-        result = pfunc(PythonInteger(max));
-
-    if (!result.IsAllocated())
-        return 0;
-
-    PythonInteger int_result = result.AsType<PythonInteger>();
-    if (!int_result.IsAllocated())
-        return 0;
-
-    size_t ret_val = int_result.GetInteger();
-
-    if (PyErr_Occurred())
-    {
-        PyErr_Print();
-        PyErr_Clear();
-    }
-
-    if (argc.count == 1)
-        ret_val = std::min(ret_val, static_cast<size_t>(max));
-
-    return ret_val;
-}
-
-SWIGEXPORT PyObject*
-LLDBSwigPython_GetChildAtIndex
-(
-    PyObject *implementor,
-    uint32_t idx
-)
-{
-    using namespace lldb_private;
-    PyErr_Cleaner py_err_cleaner(true);
-
-    PythonObject self(PyRefType::Borrowed, implementor);
-    auto pfunc = self.ResolveName<PythonCallable>("get_child_at_index");
-
-    if (!pfunc.IsAllocated())
-        return nullptr;
-
-    PythonObject result = pfunc(PythonInteger(idx));
-
-    if (!result.IsAllocated())
-        return nullptr;
-
-    lldb::SBValue* sbvalue_ptr = nullptr;
-    if (SWIG_ConvertPtr(result.get(), (void**)&sbvalue_ptr, SWIGTYPE_p_lldb__SBValue, 0) == -1)
-        return nullptr;
-
-    if (sbvalue_ptr == nullptr)
-        return nullptr;
-
-    return result.release();
-}
-
-SWIGEXPORT int
-LLDBSwigPython_GetIndexOfChildWithName
-(
-    PyObject *implementor,
-    const char* child_name
-)
-{
-    using namespace lldb_private;
-    PyErr_Cleaner py_err_cleaner(true);
-
-    PythonObject self(PyRefType::Borrowed, implementor);
-    auto pfunc = self.ResolveName<PythonCallable>("get_child_index");
-
-    if (!pfunc.IsAllocated())
-        return UINT32_MAX;
-
-    PythonObject result = pfunc(PythonString(child_name));
-
-    if (!result.IsAllocated())
-        return UINT32_MAX;
-
-    PythonInteger int_result = result.AsType<PythonInteger>();
-    if (!int_result.IsAllocated())
-        return UINT32_MAX;
-
-    int64_t retval = int_result.GetInteger();
-    if (retval >= 0)
-        return (uint32_t)retval;
-
-    return UINT32_MAX;
-}
-
-SWIGEXPORT bool
-LLDBSwigPython_UpdateSynthProviderInstance
-(
-    PyObject *implementor
-)
-{
-    bool ret_val = false;
-
-    static char callee_name[] = "update";
-
-    PyObject* py_return = LLDBSwigPython_CallOptionalMember(implementor,callee_name);
-
-    if (py_return == Py_True)
-        ret_val = true;
-
-    Py_XDECREF(py_return);
-
-    return ret_val;
-}
-
-SWIGEXPORT bool
-LLDBSwigPython_MightHaveChildrenSynthProviderInstance
-(
-    PyObject *implementor
-)
-{
-    bool ret_val = false;
-
-    static char callee_name[] = "has_children";
-
-    PyObject* py_return = LLDBSwigPython_CallOptionalMember(implementor,callee_name, Py_True);
-
-    if (py_return == Py_True)
-        ret_val = true;
-
-    Py_XDECREF(py_return);
-
-    return ret_val;
-}
-
-SWIGEXPORT PyObject*
-LLDBSwigPython_GetValueSynthProviderInstance
-(
-    PyObject *implementor
-)
-{
-    PyObject* ret_val = nullptr;
-
-    static char callee_name[] = "get_value";
-
-    PyObject* py_return = LLDBSwigPython_CallOptionalMember(implementor,callee_name, Py_None);
-
-    if (py_return == Py_None || py_return == nullptr)
-        ret_val = nullptr;
-
-    lldb::SBValue* sbvalue_ptr = NULL;
-
-    if (SWIG_ConvertPtr(py_return, (void**)&sbvalue_ptr, SWIGTYPE_p_lldb__SBValue, 0) == -1)
-        ret_val = nullptr;
-    else if (sbvalue_ptr == NULL)
-        ret_val = nullptr;
-    else
-        ret_val = py_return;
-
-    Py_XDECREF(py_return);
-    return ret_val;
-}
-
-SWIGEXPORT void*
-LLDBSWIGPython_CastPyObjectToSBValue
-(
-    PyObject* data
-)
-{
-    lldb::SBValue* sb_ptr = NULL;
-
-    int valid_cast = SWIG_ConvertPtr(data, (void**)&sb_ptr, SWIGTYPE_p_lldb__SBValue, 0);
-
-    if (valid_cast == -1)
-        return NULL;
-
-    return sb_ptr;
-}
-
-// Currently, SBCommandReturnObjectReleaser wraps a unique pointer to an
-// lldb_private::CommandReturnObject. This means that the destructor for the
-// SB object will deallocate its contained CommandReturnObject. Because that
-// object is used as the real return object for Python-based commands, we want
-// it to stay around. Thus, we release the unique pointer before returning from
-// LLDBSwigPythonCallCommand, and to guarantee that the release will occur no
-// matter how we exit from the function, we have a releaser object whose
-// destructor does the right thing for us
-class SBCommandReturnObjectReleaser
-{
-public:
-    SBCommandReturnObjectReleaser (lldb::SBCommandReturnObject &obj) :
-        m_command_return_object_ref (obj)
-    {
-    }
-
-    ~SBCommandReturnObjectReleaser ()
-    {
-        m_command_return_object_ref.Release();
-    }
-private:
-    lldb::SBCommandReturnObject &m_command_return_object_ref;
-};
-
-SWIGEXPORT bool
-LLDBSwigPythonCallCommand
-(
-    const char *python_function_name,
-    const char *session_dictionary_name,
-    lldb::DebuggerSP& debugger,
-    const char* args,
-    lldb_private::CommandReturnObject& cmd_retobj,
-    lldb::ExecutionContextRefSP exe_ctx_ref_sp
-)
-{
-    using namespace lldb_private;
-    lldb::SBCommandReturnObject cmd_retobj_sb(&cmd_retobj);
-    SBCommandReturnObjectReleaser cmd_retobj_sb_releaser(cmd_retobj_sb);
-    lldb::SBDebugger debugger_sb(debugger);
-    lldb::SBExecutionContext exe_ctx_sb(exe_ctx_ref_sp);
-
-    PyErr_Cleaner py_err_cleaner(true);
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
-
-    if (!pfunc.IsAllocated())
-        return false;
-
-    // pass the pointer-to cmd_retobj_sb or watch the underlying object disappear from under you
-    // see comment above for SBCommandReturnObjectReleaser for further details
-    auto argc = pfunc.GetNumArguments();
-    PythonObject debugger_arg(PyRefType::Owned, SBTypeToSWIGWrapper(debugger_sb));
-    PythonObject exe_ctx_arg(PyRefType::Owned, SBTypeToSWIGWrapper(exe_ctx_sb));
-    PythonObject cmd_retobj_arg(PyRefType::Owned, SBTypeToSWIGWrapper(&cmd_retobj_sb));
-
-    if (argc.count == 5 || argc.is_bound_method || argc.has_varargs)
-        pfunc(debugger_arg, PythonString(args), exe_ctx_arg, cmd_retobj_arg, dict);
-    else
-        pfunc(debugger_arg, PythonString(args), cmd_retobj_arg, dict);
-
-    return true;
-}
-
-SWIGEXPORT bool
-LLDBSwigPythonCallCommandObject
-(
-    PyObject *implementor,
-    lldb::DebuggerSP& debugger,
-    const char* args,
-    lldb_private::CommandReturnObject& cmd_retobj,
-    lldb::ExecutionContextRefSP exe_ctx_ref_sp
-)
-{
-    using namespace lldb_private;
-    lldb::SBCommandReturnObject cmd_retobj_sb(&cmd_retobj);
-    SBCommandReturnObjectReleaser cmd_retobj_sb_releaser(cmd_retobj_sb);
-    lldb::SBDebugger debugger_sb(debugger);
-    lldb::SBExecutionContext exe_ctx_sb(exe_ctx_ref_sp);
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    PythonObject self(PyRefType::Borrowed, implementor);
-    auto pfunc = self.ResolveName<PythonCallable>("__call__");
-
-    if (!pfunc.IsAllocated())
-        return false;
-
-    // pass the pointer-to cmd_retobj_sb or watch the underlying object disappear from under you
-    // see comment above for SBCommandReturnObjectReleaser for further details
-    PythonObject debugger_arg(PyRefType::Owned, SBTypeToSWIGWrapper(debugger_sb));
-    PythonObject exe_ctx_arg(PyRefType::Owned, SBTypeToSWIGWrapper(exe_ctx_sb));
-    PythonObject cmd_retobj_arg(PyRefType::Owned, SBTypeToSWIGWrapper(&cmd_retobj_sb));
-
-    pfunc(debugger_arg, PythonString(args), exe_ctx_arg, cmd_retobj_arg);
-
-    return true;
-}
-
-SWIGEXPORT void*
-LLDBSWIGPythonCreateOSPlugin
-(
-    const char *python_class_name,
-    const char *session_dictionary_name,
-    const lldb::ProcessSP& process_sp
-)
-{
-    using namespace lldb_private;
-
-    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
-        Py_RETURN_NONE;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
-
-    if (!pfunc.IsAllocated())
-        Py_RETURN_NONE;
-
-    // I do not want the SBProcess to be deallocated when going out of scope because python
-    // has ownership of it and will manage memory for this object by itself
-    lldb::SBProcess *process_sb = new lldb::SBProcess(process_sp);
-    PythonObject process_arg(PyRefType::Owned, SBTypeToSWIGWrapper(process_sb));
-    if (!process_arg.IsAllocated())
-        Py_RETURN_NONE;
-
-    auto result = pfunc(process_arg);
-
-    if (result.IsAllocated())
-        return result.release();
-
-    Py_RETURN_NONE;
-}
-
-SWIGEXPORT void*
-LLDBSWIGPython_CreateFrameRecognizer
-(
-    const char *python_class_name,
-    const char *session_dictionary_name
-)
-{
-    using namespace lldb_private;
-
-    if (python_class_name == NULL || python_class_name[0] == '\0' || !session_dictionary_name)
-        Py_RETURN_NONE;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_class_name, dict);
-
-    if (!pfunc.IsAllocated())
-        Py_RETURN_NONE;
-
-    auto result = pfunc();
-
-    if (result.IsAllocated())
-        return result.release();
-
-    Py_RETURN_NONE;
-}
-
-SWIGEXPORT PyObject*
-LLDBSwigPython_GetRecognizedArguments
-(
-    PyObject *implementor,
-    const lldb::StackFrameSP& frame_sp
-)
-{
-    using namespace lldb_private;
-
-    static char callee_name[] = "get_recognized_arguments";
-
-    lldb::SBFrame frame_sb(frame_sp);
-    PyObject *arg = SBTypeToSWIGWrapper(frame_sb);
-
-    PythonString str(callee_name);
-    PyObject* result = PyObject_CallMethodObjArgs(implementor, str.get(), arg,
-                                                  NULL);
-    return result;
-}
-
-SWIGEXPORT void*
-LLDBSWIGPython_GetDynamicSetting (void* module, const char* setting, const lldb::TargetSP& target_sp)
-{
-    using namespace lldb_private;
-
-    if (!module || !setting)
-        Py_RETURN_NONE;
-
-    PyErr_Cleaner py_err_cleaner(true);
-    PythonObject py_module(PyRefType::Borrowed, (PyObject *)module);
-    auto pfunc = py_module.ResolveName<PythonCallable>("get_dynamic_setting");
-
-    if (!pfunc.IsAllocated())
-        Py_RETURN_NONE;
-
-    lldb::SBTarget target_sb(target_sp);
-    PythonObject target_arg(PyRefType::Owned, SBTypeToSWIGWrapper(target_sb));
-    auto result = pfunc(target_arg, PythonString(setting));
-
-    return result.release();
-}
-
-SWIGEXPORT bool
-LLDBSWIGPythonRunScriptKeywordProcess
-(const char* python_function_name,
-const char* session_dictionary_name,
-lldb::ProcessSP& process,
-std::string& output)
-
-{
-    using namespace lldb_private;
-
-    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
-        return false;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
-
-    if (!pfunc.IsAllocated())
-        return false;
-
-    lldb::SBProcess process_sb(process);
-    PythonObject process_arg(PyRefType::Owned, SBTypeToSWIGWrapper(process_sb));
-    auto result = pfunc(process_arg, dict);
-
-    output = result.Str().GetString().str();
-
-    return true;
-}
-
-SWIGEXPORT bool
-LLDBSWIGPythonRunScriptKeywordThread
-(const char* python_function_name,
-const char* session_dictionary_name,
-lldb::ThreadSP& thread,
-std::string& output)
-
-{
-    using namespace lldb_private;
-
-    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
-        return false;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
-
-    if (!pfunc.IsAllocated())
-        return false;
-
-    lldb::SBThread thread_sb(thread);
-    PythonObject thread_arg(PyRefType::Owned, SBTypeToSWIGWrapper(thread_sb));
-    auto result = pfunc(thread_arg, dict);
-
-    output = result.Str().GetString().str();
-
-    return true;
-}
-
-SWIGEXPORT bool
-LLDBSWIGPythonRunScriptKeywordTarget
-(const char* python_function_name,
-const char* session_dictionary_name,
-lldb::TargetSP& target,
-std::string& output)
-
-{
-    using namespace lldb_private;
-
-    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
-        return false;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name,dict);
-
-    if (!pfunc.IsAllocated())
-        return false;
-
-    lldb::SBTarget target_sb(target);
-    PythonObject target_arg(PyRefType::Owned, SBTypeToSWIGWrapper(target_sb));
-    auto result = pfunc(target_arg, dict);
-
-    output = result.Str().GetString().str();
-
-    return true;
-}
-
-SWIGEXPORT bool
-LLDBSWIGPythonRunScriptKeywordFrame
-(const char* python_function_name,
-const char* session_dictionary_name,
-lldb::StackFrameSP& frame,
-std::string& output)
-
-{
-    using namespace lldb_private;
-
-    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
-        return false;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name,dict);
-
-    if (!pfunc.IsAllocated())
-        return false;
-
-    lldb::SBFrame frame_sb(frame);
-    PythonObject frame_arg(PyRefType::Owned, SBTypeToSWIGWrapper(frame_sb));
-    auto result = pfunc(frame_arg, dict);
-
-    output = result.Str().GetString().str();
-
-    return true;
-}
-
-SWIGEXPORT bool
-LLDBSWIGPythonRunScriptKeywordValue
-(const char* python_function_name,
-const char* session_dictionary_name,
-lldb::ValueObjectSP& value,
-std::string& output)
-
-{
-    using namespace lldb_private;
-
-    if (python_function_name == NULL || python_function_name[0] == '\0' || !session_dictionary_name)
-        return false;
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
-
-    if (!pfunc.IsAllocated())
-        return false;
-
-    lldb::SBValue value_sb(value);
-    PythonObject value_arg(PyRefType::Owned, SBTypeToSWIGWrapper(value_sb));
-    auto result = pfunc(value_arg, dict);
-
-    output = result.Str().GetString().str();
-
-    return true;
-}
-
-SWIGEXPORT bool
-LLDBSwigPythonCallModuleInit
-(
-    const char *python_module_name,
-    const char *session_dictionary_name,
-    lldb::DebuggerSP& debugger
-)
-{
-    using namespace lldb_private;
-
-    std::string python_function_name_string = python_module_name;
-    python_function_name_string += ".__lldb_init_module";
-    const char* python_function_name = python_function_name_string.c_str();
-
-    PyErr_Cleaner py_err_cleaner(true);
-
-    auto dict = PythonModule::MainModule().ResolveName<PythonDictionary>(session_dictionary_name);
-    auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(python_function_name, dict);
-
-    // This method is optional and need not exist.  So if we don't find it,
-    // it's actually a success, not a failure.
-    if (!pfunc.IsAllocated())
-        return true;
-
-    lldb::SBDebugger debugger_sb(debugger);
-    PythonObject debugger_arg(PyRefType::Owned, SBTypeToSWIGWrapper(debugger_sb));
-    pfunc(debugger_arg, dict);
-
-    return true;
-}
-%}
-
-
-%runtime %{
-// Forward declaration to be inserted at the start of LLDBWrapPython.h
-#include "lldb/API/SBDebugger.h"
-#include "lldb/API/SBValue.h"
-
-SWIGEXPORT lldb::ValueObjectSP
-LLDBSWIGPython_GetValueObjectSPFromSBValue (void* data)
-{
-    lldb::ValueObjectSP valobj_sp;
-    if (data)
-    {
-        lldb::SBValue* sb_ptr = (lldb::SBValue *)data;
-        valobj_sp = sb_ptr->GetSP();
-    }
-    return valobj_sp;
-}
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton);
-
-#ifdef __cplusplus
-}
-#endif
-%}
-
-%wrapper %{
-
-
-// For the LogOutputCallback functions
-void LLDBSwigPythonCallPythonLogOutputCallback(const char *str, void *baton) {
-    if (baton != Py_None) {
-      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
-      PyObject *result = PyObject_CallFunction(reinterpret_cast<PyObject*>(baton), const_cast<char*>("s"), str);
-	  Py_XDECREF(result);
-      SWIG_PYTHON_THREAD_END_BLOCK;
-    }
-}
-%}
diff --git a/src/llvm-project/lldb/scripts/Python/remote-build.py b/src/llvm-project/lldb/scripts/Python/remote-build.py
deleted file mode 100755
index d1d6131..0000000
--- a/src/llvm-project/lldb/scripts/Python/remote-build.py
+++ /dev/null
@@ -1,312 +0,0 @@
-#!/usr/bin/python
-
-from __future__ import print_function
-
-import argparse
-import getpass
-import os
-import os.path
-import re
-import select
-import sys
-import subprocess
-
-_COMMON_SYNC_OPTS = "-avzh --delete"
-_COMMON_EXCLUDE_OPTS = "--exclude=DerivedData --exclude=.svn --exclude=.git --exclude=llvm-build/Release+Asserts"
-
-
-def normalize_configuration(config_text):
-    if not config_text:
-        return "debug"
-
-    config_lower = config_text.lower()
-    if config_lower in ["debug", "release"]:
-        return config_lower
-    else:
-        raise Exception("unknown configuration specified: %s" % config_text)
-
-
-def parse_args():
-    DEFAULT_REMOTE_ROOT_DIR = "/mnt/ssd/work/macosx.sync"
-    DEFAULT_REMOTE_HOSTNAME = "tfiala2.mtv.corp.google.com"
-    OPTIONS_FILENAME = ".remote-build.conf"
-    DEFAULT_SSH_PORT = "22"
-
-    parser = argparse.ArgumentParser(fromfile_prefix_chars='@')
-
-    parser.add_argument(
-        "--configuration",
-        "-c",
-        help="specify configuration (Debug, Release)",
-        default=normalize_configuration(
-            os.environ.get(
-                'CONFIGURATION',
-                'Debug')))
-    parser.add_argument(
-        "--debug", "-d",
-        action="store_true",
-        help="help debug the remote-build script by adding extra logging")
-    parser.add_argument(
-        "--local-lldb-dir", "-l", metavar="DIR",
-        help="specify local lldb directory (Xcode layout assumed for llvm/clang)",
-        default=os.getcwd())
-    parser.add_argument(
-        "--port", "-p",
-        help="specify the port ssh should use to connect to the remote side",
-        default=DEFAULT_SSH_PORT)
-    parser.add_argument(
-        "--remote-address", "-r", metavar="REMOTE-ADDR",
-        help="specify the dns name or ip address of the remote linux system",
-        default=DEFAULT_REMOTE_HOSTNAME)
-    parser.add_argument(
-        "--remote-dir", metavar="DIR",
-        help="specify the root of the linux source/build dir",
-        default=DEFAULT_REMOTE_ROOT_DIR)
-    parser.add_argument(
-        "--user", "-u", help="specify the user name for the remote system",
-        default=getpass.getuser())
-    parser.add_argument(
-        "--xcode-action",
-        "-x",
-        help="$(ACTION) from Xcode",
-        nargs='?',
-        default=None)
-
-    command_line_args = sys.argv[1:]
-    if os.path.exists(OPTIONS_FILENAME):
-        # Prepend the file so that command line args override the file
-        # contents.
-        command_line_args.insert(0, "@%s" % OPTIONS_FILENAME)
-
-    return parser.parse_args(command_line_args)
-
-
-def maybe_create_remote_root_dir(args):
-    commandline = [
-        "ssh",
-        "-p", args.port,
-        "%s@%s" % (args.user, args.remote_address),
-        "mkdir",
-        "-p",
-        args.remote_dir]
-    print("create remote root dir command:\n{}".format(commandline))
-    return subprocess.call(commandline)
-
-
-def init_with_args(args):
-    # Expand any user directory specs in local-side source dir (on MacOSX).
-    args.local_lldb_dir = os.path.expanduser(args.local_lldb_dir)
-
-    # Append the configuration type to the remote build dir.
-    args.configuration = normalize_configuration(args.configuration)
-    args.remote_build_dir = os.path.join(
-        args.remote_dir,
-        "build-%s" % args.configuration)
-
-    # We assume the local lldb directory is really named 'lldb'.
-    # This is because on the remote end, the local lldb root dir
-    # is copied over underneath llvm/tools and will be named there
-    # whatever it is named locally.  The remote build will assume
-    # is is called lldb.
-    if os.path.basename(args.local_lldb_dir) != 'lldb':
-        raise Exception(
-            "local lldb root needs to be called 'lldb' but was {} instead"
-            .format(os.path.basename(args.local_lldb_dir)))
-
-    args.lldb_dir_relative_regex = re.compile(
-        "%s/llvm/tools/lldb/" % args.remote_dir)
-    args.llvm_dir_relative_regex = re.compile("%s/" % args.remote_dir)
-
-    print("Xcode action:", args.xcode_action)
-
-    # Ensure the remote directory exists.
-    result = maybe_create_remote_root_dir(args)
-    if result == 0:
-        print("using remote root dir: %s" % args.remote_dir)
-    else:
-        print("remote root dir doesn't exist and could not be created, "
-              + "error code:", result)
-        return False
-
-    return True
-
-
-def sync_llvm(args):
-    commandline = ["rsync"]
-    commandline.extend(_COMMON_SYNC_OPTS.split())
-    commandline.extend(_COMMON_EXCLUDE_OPTS.split())
-    commandline.append("--exclude=/llvm/tools/lldb")
-    commandline.extend(["-e", "ssh -p {}".format(args.port)])
-    commandline.extend([
-        "%s/llvm" % args.local_lldb_dir,
-        "%s@%s:%s" % (args.user, args.remote_address, args.remote_dir)])
-    if args.debug:
-        print("going to execute llvm sync: {}".format(commandline))
-    return subprocess.call(commandline)
-
-
-def sync_lldb(args):
-    commandline = ["rsync"]
-    commandline.extend(_COMMON_SYNC_OPTS.split())
-    commandline.extend(_COMMON_EXCLUDE_OPTS.split())
-    commandline.append("--exclude=/lldb/llvm")
-    commandline.extend(["-e", "ssh -p {}".format(args.port)])
-    commandline.extend([args.local_lldb_dir, "%s@%s:%s/llvm/tools" %
-                        (args.user, args.remote_address, args.remote_dir)])
-    if args.debug:
-        print("going to execute lldb sync: {}".format(commandline))
-    return subprocess.call(commandline)
-
-
-def build_cmake_command(args):
-    # args.remote_build_dir
-    # args.configuration in ('release', 'debug')
-
-    if args.configuration == 'debug-optimized':
-        build_type_name = "RelWithDebInfo"
-    elif args.configuration == 'release':
-        build_type_name = "Release"
-    else:
-        build_type_name = "Debug"
-
-    ld_flags = "\"-lstdc++ -lm\""
-
-    install_dir = os.path.join(
-        args.remote_build_dir, "..", "install-{}".format(args.configuration))
-
-    command_line = [
-        "cmake",
-        "-GNinja",
-        "-DCMAKE_CXX_COMPILER=clang",
-        "-DCMAKE_C_COMPILER=clang",
-        # "-DCMAKE_CXX_FLAGS=%s" % cxx_flags,
-        "-DCMAKE_SHARED_LINKER_FLAGS=%s" % ld_flags,
-        "-DCMAKE_EXE_LINKER_FLAGS=%s" % ld_flags,
-        "-DCMAKE_INSTALL_PREFIX:PATH=%s" % install_dir,
-        "-DCMAKE_BUILD_TYPE=%s" % build_type_name,
-        "-Wno-dev",
-        os.path.join("..", "llvm")
-    ]
-
-    return command_line
-
-
-def maybe_configure(args):
-    commandline = [
-        "ssh",
-        "-p", args.port,
-        "%s@%s" % (args.user, args.remote_address),
-        "cd", args.remote_dir, "&&",
-        "mkdir", "-p", args.remote_build_dir, "&&",
-        "cd", args.remote_build_dir, "&&"
-    ]
-    commandline.extend(build_cmake_command(args))
-
-    if args.debug:
-        print("configure command: {}".format(commandline))
-
-    return subprocess.call(commandline)
-
-
-def filter_build_line(args, line):
-    lldb_relative_line = args.lldb_dir_relative_regex.sub('', line)
-    if len(lldb_relative_line) != len(line):
-        # We substituted - return the modified line
-        return lldb_relative_line
-
-    # No match on lldb path (longer on linux than llvm path).  Try
-    # the llvm path match.
-    return args.llvm_dir_relative_regex.sub('', line)
-
-
-def run_remote_build_command(args, build_command_list):
-    commandline = [
-        "ssh",
-        "-p", args.port,
-        "%s@%s" % (args.user, args.remote_address),
-        "cd", args.remote_build_dir, "&&"]
-    commandline.extend(build_command_list)
-
-    if args.debug:
-        print("running remote build command: {}".format(commandline))
-
-    proc = subprocess.Popen(
-        commandline,
-        stdout=subprocess.PIPE,
-        stderr=subprocess.PIPE)
-
-    # Filter stdout/stderr output for file path mapping.
-    # We do this to enable Xcode to see filenames relative to the
-    # MacOSX-side directory structure.
-    while True:
-        reads = [proc.stdout.fileno(), proc.stderr.fileno()]
-        select_result = select.select(reads, [], [])
-
-        for fd in select_result[0]:
-            if fd == proc.stdout.fileno():
-                line = proc.stdout.readline()
-                display_line = filter_build_line(args, line.rstrip())
-                if display_line and len(display_line) > 0:
-                    print(display_line)
-            elif fd == proc.stderr.fileno():
-                line = proc.stderr.readline()
-                display_line = filter_build_line(args, line.rstrip())
-                if display_line and len(display_line) > 0:
-                    print(display_line, file=sys.stderr)
-
-        proc_retval = proc.poll()
-        if proc_retval is not None:
-            # Process stopped.  Drain output before finishing up.
-
-            # Drain stdout.
-            while True:
-                line = proc.stdout.readline()
-                if line:
-                    display_line = filter_build_line(args, line.rstrip())
-                    if display_line and len(display_line) > 0:
-                        print(display_line)
-                else:
-                    break
-
-            # Drain stderr.
-            while True:
-                line = proc.stderr.readline()
-                if line:
-                    display_line = filter_build_line(args, line.rstrip())
-                    if display_line and len(display_line) > 0:
-                        print(display_line, file=sys.stderr)
-                else:
-                    break
-
-            return proc_retval
-
-
-def build(args):
-    return run_remote_build_command(args, ["time", "ninja"])
-
-
-def clean(args):
-    return run_remote_build_command(args, ["ninja", "clean"])
-
-
-if __name__ == "__main__":
-    # Handle arg parsing.
-    args = parse_args()
-
-    # Initialize the system.
-    if not init_with_args(args):
-        exit(1)
-
-    # Sync over llvm and clang source.
-    sync_llvm(args)
-
-    # Sync over lldb source.
-    sync_lldb(args)
-
-    # Configure the remote build if it's not already.
-    maybe_configure(args)
-
-    if args.xcode_action == 'clean':
-        exit(clean(args))
-    else:
-        exit(build(args))
diff --git a/src/llvm-project/lldb/scripts/Python/use_lldb_suite.py b/src/llvm-project/lldb/scripts/Python/use_lldb_suite.py
deleted file mode 100644
index 6e24b9d..0000000
--- a/src/llvm-project/lldb/scripts/Python/use_lldb_suite.py
+++ /dev/null
@@ -1,26 +0,0 @@
-import inspect
-import os
-import sys
-
-
-def find_lldb_root():
-    lldb_root = os.path.dirname(inspect.getfile(inspect.currentframe()))
-    while True:
-        lldb_root = os.path.dirname(lldb_root)
-        if lldb_root is None:
-            return None
-
-        test_path = os.path.join(lldb_root, "use_lldb_suite_root.py")
-        if os.path.isfile(test_path):
-            return lldb_root
-    return None
-
-lldb_root = find_lldb_root()
-if lldb_root is not None:
-    import imp
-    fp, pathname, desc = imp.find_module("use_lldb_suite_root", [lldb_root])
-    try:
-        imp.load_module("use_lldb_suite_root", fp, pathname, desc)
-    finally:
-        if fp:
-            fp.close()
diff --git a/src/llvm-project/lldb/scripts/Xcode/build-llvm.py b/src/llvm-project/lldb/scripts/Xcode/build-llvm.py
deleted file mode 100755
index a678247..0000000
--- a/src/llvm-project/lldb/scripts/Xcode/build-llvm.py
+++ /dev/null
@@ -1,461 +0,0 @@
-#!/usr/bin/env python
-
-import errno
-import hashlib
-import fnmatch
-import os
-import platform
-import re
-import repo
-import subprocess
-import sys
-
-from lldbbuild import *
-
-#### SETTINGS ####
-
-def LLVM_HASH_INCLUDES_DIFFS():
-    return False
-
-# For use with Xcode-style builds
-
-def process_vcs(vcs):
-    return {
-        "svn": VCS.svn,
-        "git": VCS.git
-    }[vcs]
-
-def process_root(name):
-    return {
-        "llvm": llvm_source_path(),
-        "clang": clang_source_path(),
-        "ninja": ninja_source_path()
-    }[name]
-
-def process_repo(r):
-    return {
-        'name': r["name"],
-        'vcs': process_vcs(r["vcs"]),
-        'root': process_root(r["name"]),
-        'url': r["url"],
-        'ref': r["ref"]
-    }
-
-def fallback_repo(name):
-    return {
-        'name': name,
-        'vcs': None,
-        'root': process_root(name),
-        'url': None,
-        'ref': None
-    }
-
-def dirs_exist(names):
-    for name in names:
-        if not os.path.isdir(process_root(name)):
-            return False
-    return True
-
-def XCODE_REPOSITORIES():
-    names = ["llvm", "clang", "ninja"]
-    if dirs_exist(names):
-        return [fallback_repo(n) for n in names]
-    override = repo.get_override()
-    if override:
-        return [process_repo(r) for r in override]
-    identifier = repo.identifier()
-    if identifier == None:
-        identifier = "<invalid>" # repo.find will just use the fallback file
-    set = repo.find(identifier)
-    return [process_repo(r) for r in set]
-
-
-def get_c_compiler():
-    return subprocess.check_output([
-        'xcrun',
-        '--sdk', 'macosx',
-        '-find', 'clang'
-    ]).rstrip()
-
-
-def get_cxx_compiler():
-    return subprocess.check_output([
-        'xcrun',
-        '--sdk', 'macosx',
-        '-find', 'clang++'
-    ]).rstrip()
-
-#                 CFLAGS="-isysroot $(xcrun --sdk macosx --show-sdk-path) -mmacosx-version-min=${DARWIN_DEPLOYMENT_VERSION_OSX}" \
-#                        LDFLAGS="-mmacosx-version-min=${DARWIN_DEPLOYMENT_VERSION_OSX}" \
-
-
-def get_deployment_target():
-    return os.environ.get('MACOSX_DEPLOYMENT_TARGET', None)
-
-
-def get_c_flags():
-    cflags = ''
-    # sdk_path = subprocess.check_output([
-    #     'xcrun',
-    #     '--sdk', 'macosx',
-    #     '--show-sdk-path']).rstrip()
-    # cflags += '-isysroot {}'.format(sdk_path)
-
-    deployment_target = get_deployment_target()
-    if deployment_target:
-        # cflags += ' -mmacosx-version-min={}'.format(deployment_target)
-        pass
-
-    return cflags
-
-
-def get_cxx_flags():
-    return get_c_flags()
-
-
-def get_common_linker_flags():
-    linker_flags = ""
-    deployment_target = get_deployment_target()
-    if deployment_target:
-        # if len(linker_flags) > 0:
-        #     linker_flags += ' '
-        # linker_flags += '-mmacosx-version-min={}'.format(deployment_target)
-        pass
-
-    return linker_flags
-
-
-def get_exe_linker_flags():
-    return get_common_linker_flags()
-
-
-def get_shared_linker_flags():
-    return get_common_linker_flags()
-
-
-def CMAKE_FLAGS():
-    return {
-        "Debug": [
-            "-DCMAKE_BUILD_TYPE=RelWithDebInfo",
-            "-DLLVM_ENABLE_ASSERTIONS=ON",
-        ],
-        "DebugClang": [
-            "-DCMAKE_BUILD_TYPE=Debug",
-            "-DLLVM_ENABLE_ASSERTIONS=ON",
-        ],
-        "Release": [
-            "-DCMAKE_BUILD_TYPE=Release",
-            "-DLLVM_ENABLE_ASSERTIONS=ON",
-        ],
-        "BuildAndIntegration": [
-            "-DCMAKE_BUILD_TYPE=Release",
-            "-DLLVM_ENABLE_ASSERTIONS=OFF",
-        ],
-    }
-
-
-def CMAKE_ENVIRONMENT():
-    return {
-    }
-
-#### COLLECTING ALL ARCHIVES ####
-
-
-def collect_archives_in_path(path):
-    files = os.listdir(path)
-    # Only use libclang and libLLVM archives, and exclude libclang_rt
-    regexp = "^lib(clang[^_]|LLVM|gtest).*$"
-    return [
-        os.path.join(
-            path,
-            file) for file in files if file.endswith(".a") and re.match(
-            regexp,
-            file)]
-
-
-def archive_list():
-    paths = library_paths()
-    archive_lists = [collect_archives_in_path(path) for path in paths]
-    return [archive for archive_list in archive_lists for archive in archive_list]
-
-
-def write_archives_txt():
-    f = open(archives_txt(), 'w')
-    for archive in archive_list():
-        f.write(archive + "\n")
-    f.close()
-
-#### COLLECTING REPOSITORY MD5S ####
-
-
-def source_control_status(spec):
-    vcs_for_spec = vcs(spec)
-    if LLVM_HASH_INCLUDES_DIFFS():
-        return vcs_for_spec.status() + vcs_for_spec.diff()
-    else:
-        return vcs_for_spec.status()
-
-
-def source_control_status_for_specs(specs):
-    statuses = [source_control_status(spec) for spec in specs]
-    return "".join(statuses)
-
-
-def all_source_control_status():
-    return source_control_status_for_specs(XCODE_REPOSITORIES())
-
-
-def md5(string):
-    m = hashlib.md5()
-    m.update(string)
-    return m.hexdigest()
-
-
-def all_source_control_status_md5():
-    return md5(all_source_control_status())
-
-#### CHECKING OUT AND BUILDING LLVM ####
-
-
-def apply_patches(spec):
-    files = os.listdir(os.path.join(lldb_source_path(), 'scripts'))
-    patches = [
-        f for f in files if fnmatch.fnmatch(
-            f, spec['name'] + '.*.diff')]
-    for p in patches:
-        run_in_directory(["patch",
-                          "-p1",
-                          "-i",
-                          os.path.join(lldb_source_path(),
-                                       'scripts',
-                                       p)],
-                         spec['root'])
-
-
-def check_out_if_needed(spec):
-    if not os.path.isdir(spec['root']):
-        vcs(spec).check_out()
-        apply_patches(spec)
-
-
-def all_check_out_if_needed():
-    for r in XCODE_REPOSITORIES():
-        check_out_if_needed(r)
-
-
-def should_build_llvm():
-    if build_type() == BuildType.Xcode:
-        # TODO use md5 sums
-        return True
-
-
-def do_symlink(source_path, link_path):
-    print("Symlinking " + source_path + " to " + link_path)
-    if os.path.islink(link_path):
-        os.remove(link_path)
-    if not os.path.exists(link_path):
-        os.symlink(source_path, link_path)
-
-
-def setup_source_symlink(repo):
-    source_path = repo["root"]
-    link_path = os.path.join(lldb_source_path(), os.path.basename(source_path))
-    do_symlink(source_path, link_path)
-
-
-def setup_source_symlinks():
-    for r in XCODE_REPOSITORIES():
-        setup_source_symlink(r)
-
-
-def setup_build_symlink():
-    # We don't use the build symlinks in llvm.org Xcode-based builds.
-    if build_type() != BuildType.Xcode:
-        source_path = package_build_path()
-        link_path = expected_package_build_path()
-        do_symlink(source_path, link_path)
-
-
-def should_run_cmake(cmake_build_dir):
-    # We need to run cmake if our llvm build directory doesn't yet exist.
-    if not os.path.exists(cmake_build_dir):
-        return True
-
-    # Wee also need to run cmake if for some reason we don't have a ninja
-    # build file.  (Perhaps the cmake invocation failed, which this current
-    # build may have fixed).
-    ninja_path = os.path.join(cmake_build_dir, "build.ninja")
-    return not os.path.exists(ninja_path)
-
-
-def cmake_environment():
-    cmake_env = join_dicts(os.environ, CMAKE_ENVIRONMENT())
-    return cmake_env
-
-
-def is_executable(path):
-    return os.path.isfile(path) and os.access(path, os.X_OK)
-
-
-def find_executable_in_paths(program, paths_to_check):
-    program_dir, program_name = os.path.split(program)
-    if program_dir:
-        if is_executable(program):
-            return program
-    else:
-        for path_dir in paths_to_check:
-            path_dir = path_dir.strip('"')
-            executable_file = os.path.join(path_dir, program)
-            if is_executable(executable_file):
-                return executable_file
-    return None
-
-
-def find_cmake():
-    # First check the system PATH env var for cmake
-    cmake_binary = find_executable_in_paths(
-        "cmake", os.environ["PATH"].split(os.pathsep))
-    if cmake_binary:
-        # We found it there, use it.
-        return cmake_binary
-
-    # Check a few more common spots.  Xcode launched from Finder
-    # will have the default environment, and may not have
-    # all the normal places present.
-    extra_cmake_dirs = [
-        "/usr/local/bin",
-        "/opt/local/bin",
-        os.path.join(os.path.expanduser("~"), "bin")
-    ]
-
-    if platform.system() == "Darwin":
-        # Add locations where an official CMake.app package may be installed.
-        extra_cmake_dirs.extend([
-            os.path.join(
-                os.path.expanduser("~"),
-                "Applications",
-                "CMake.app",
-                "Contents",
-                "bin"),
-            os.path.join(
-                os.sep,
-                "Applications",
-                "CMake.app",
-                "Contents",
-                "bin")])
-
-    cmake_binary = find_executable_in_paths("cmake", extra_cmake_dirs)
-    if cmake_binary:
-        # We found it in one of the usual places.  Use that.
-        return cmake_binary
-
-    # We couldn't find cmake.  Tell the user what to do.
-    raise Exception(
-        "could not find cmake in PATH ({}) or in any of these locations ({}), "
-        "please install cmake or add a link to it in one of those locations".format(
-            os.environ["PATH"], extra_cmake_dirs))
-
-
-def cmake_flags():
-    cmake_flags = CMAKE_FLAGS()[lldb_configuration()]
-    cmake_flags += ["-GNinja",
-                    "-DCMAKE_C_COMPILER={}".format(get_c_compiler()),
-                    "-DCMAKE_CXX_COMPILER={}".format(get_cxx_compiler()),
-                    "-DCMAKE_INSTALL_PREFIX={}".format(expected_package_build_path_for("llvm")),
-                    "-DCMAKE_C_FLAGS={}".format(get_c_flags()),
-                    "-DCMAKE_CXX_FLAGS={}".format(get_cxx_flags()),
-                    "-DCMAKE_EXE_LINKER_FLAGS={}".format(get_exe_linker_flags()),
-                    "-DCMAKE_SHARED_LINKER_FLAGS={}".format(get_shared_linker_flags()),
-                    "-DHAVE_CRASHREPORTER_INFO=1"]
-    deployment_target = get_deployment_target()
-    if deployment_target:
-        cmake_flags.append(
-            "-DCMAKE_OSX_DEPLOYMENT_TARGET={}".format(deployment_target))
-    return cmake_flags
-
-
-def run_cmake(cmake_build_dir, ninja_binary_path):
-    cmake_binary = find_cmake()
-    print("found cmake binary: using \"{}\"".format(cmake_binary))
-
-    command_line = [cmake_binary] + cmake_flags() + [
-        "-DCMAKE_MAKE_PROGRAM={}".format(ninja_binary_path),
-        llvm_source_path()]
-    print("running cmake like so: ({}) in dir ({})".format(command_line, cmake_build_dir))
-
-    subprocess.check_call(
-        command_line,
-        cwd=cmake_build_dir,
-        env=cmake_environment())
-
-
-def create_directories_as_needed(path):
-    try:
-        os.makedirs(path)
-    except OSError as error:
-        # An error indicating that the directory exists already is fine.
-        # Anything else should be passed along.
-        if error.errno != errno.EEXIST:
-            raise error
-
-
-def run_cmake_if_needed(ninja_binary_path):
-    cmake_build_dir = package_build_path()
-    if should_run_cmake(cmake_build_dir):
-        # Create the build directory as needed
-        create_directories_as_needed(cmake_build_dir)
-        run_cmake(cmake_build_dir, ninja_binary_path)
-
-
-def build_ninja_if_needed():
-    # First check if ninja is in our path.  If so, there's nothing to do.
-    ninja_binary_path = find_executable_in_paths(
-        "ninja", os.environ["PATH"].split(os.pathsep))
-    if ninja_binary_path:
-        # It's on the path.  cmake will find it.  We're good.
-        print("found ninja here: \"{}\"".format(ninja_binary_path))
-        return ninja_binary_path
-
-    # Figure out if we need to build it.
-    ninja_build_dir = ninja_source_path()
-    ninja_binary_path = os.path.join(ninja_build_dir, "ninja")
-    if not is_executable(ninja_binary_path):
-        # Build ninja
-        command_line = ["python", "configure.py", "--bootstrap"]
-        print("building ninja like so: ({}) in dir ({})".format(command_line, ninja_build_dir))
-        subprocess.check_call(
-            command_line,
-            cwd=ninja_build_dir,
-            env=os.environ)
-
-    return ninja_binary_path
-
-
-def join_dicts(dict1, dict2):
-    d = dict1.copy()
-    d.update(dict2)
-    return d
-
-
-def build_llvm(ninja_binary_path):
-    cmake_build_dir = package_build_path()
-    subprocess.check_call(
-        [ninja_binary_path],
-        cwd=cmake_build_dir,
-        env=cmake_environment())
-
-
-def build_llvm_if_needed():
-    if should_build_llvm():
-        ninja_binary_path = build_ninja_if_needed()
-        run_cmake_if_needed(ninja_binary_path)
-        build_llvm(ninja_binary_path)
-        setup_build_symlink()
-
-#### MAIN LOGIC ####
-
-if __name__ == "__main__":
-    all_check_out_if_needed()
-    build_llvm_if_needed()
-    write_archives_txt()
-    sys.exit(0)
diff --git a/src/llvm-project/lldb/scripts/Xcode/lldbbuild.py b/src/llvm-project/lldb/scripts/Xcode/lldbbuild.py
deleted file mode 100644
index 43481c4..0000000
--- a/src/llvm-project/lldb/scripts/Xcode/lldbbuild.py
+++ /dev/null
@@ -1,193 +0,0 @@
-import os
-import subprocess
-import sys
-
-#### UTILITIES ####
-
-
-def enum(*sequential, **named):
-    enums = dict(zip(sequential, range(len(sequential))), **named)
-    return type('Enum', (), enums)
-
-#### SETTINGS ####
-
-#### INTERFACE TO THE XCODEPROJ ####
-
-
-def lldb_source_path():
-    path = os.environ.get('SRCROOT')
-    if path:
-         return path
-    else:
-         return "./"
-
-
-def expected_llvm_build_path():
-    if build_type() == BuildType.Xcode:
-        return package_build_path()
-    else:
-        return os.path.join(
-            os.environ.get('LLDB_PATH_TO_LLVM_BUILD'),
-            package_build_dir_name("llvm"))
-
-
-def archives_txt():
-    return os.path.join(expected_package_build_path(), "archives.txt")
-
-
-def expected_package_build_path():
-    return os.path.abspath(os.path.join(expected_llvm_build_path(), ".."))
-
-def is_host_build():
-    rc_project_name = os.environ.get('RC_ProjectName')
-    if rc_project_name:
-      if rc_project_name == 'lldb_host': return True
-    return False
-
-def rc_release_target():
-  return os.environ.get('RC_RELEASE', '')
-
-def rc_platform_name():
-  return os.environ.get('RC_PLATFORM_NAME', 'macOS')
-
-def architecture():
-    if is_host_build(): return 'macosx'
-    platform_name = os.environ.get('RC_PLATFORM_NAME')
-    if not platform_name:
-        platform_name = os.environ.get('PLATFORM_NAME')
-    platform_arch = os.environ.get('ARCHS').split()[-1]
-    return platform_name + "-" + platform_arch
-
-
-def lldb_configuration():
-    return os.environ.get('CONFIGURATION')
-
-
-def llvm_configuration():
-    return os.environ.get('LLVM_CONFIGURATION')
-
-
-def llvm_build_dirtree():
-    return os.environ.get('LLVM_BUILD_DIRTREE')
-
-# Edit the code below when adding build styles.
-
-BuildType = enum('Xcode')                # (Debug,DebugClang,Release)
-
-
-def build_type():
-    return BuildType.Xcode
-
-#### VCS UTILITIES ####
-
-VCS = enum('git',
-           'svn')
-
-
-def run_in_directory(args, path):
-    return subprocess.check_output([str(arg) for arg in args], cwd=path)
-
-
-class Git:
-
-    def __init__(self, spec):
-        self.spec = spec
-
-    def status(self):
-        return run_in_directory(["git", "branch", "-v"], self.spec['root'])
-
-    def diff(self):
-        return run_in_directory(["git", "diff"], self.spec['root'])
-
-    def check_out(self):
-        run_in_directory(["git",
-                          "clone",
-                          "--depth=1",
-                          self.spec['url'],
-                          self.spec['root']],
-                         lldb_source_path())
-        run_in_directory(["git", "fetch", "--all"], self.spec['root'])
-        run_in_directory(["git", "checkout", self.spec[
-                         'ref']], self.spec['root'])
-
-
-class SVN:
-
-    def __init__(self, spec):
-        self.spec = spec
-
-    def status(self):
-        return run_in_directory(["svn", "info"], self.spec['root'])
-
-    def diff(self):
-        return run_in_directory(["svn", "diff"], self.spec['root'])
-    # TODO implement check_out
-
-
-def vcs(spec):
-    if spec['vcs'] == VCS.git:
-        return Git(spec)
-    elif spec['vcs'] == VCS.svn:
-        return SVN(spec)
-    else:
-        return None
-
-#### SOURCE PATHS ####
-
-
-def llvm_source_path():
-    if build_type() == BuildType.Xcode:
-        return os.path.join(lldb_source_path(), "llvm")
-
-
-def clang_source_path():
-    if build_type() == BuildType.Xcode:
-        return os.path.join(llvm_source_path(), "tools", "clang")
-
-
-def ninja_source_path():
-    if build_type() == BuildType.Xcode:
-        return os.path.join(lldb_source_path(), "ninja")
-
-#### BUILD PATHS ####
-
-
-def packages():
-    return ["llvm"]
-
-
-def package_build_dir_name(package):
-    return package + "-" + architecture()
-
-
-def expected_package_build_path_for(package):
-    if build_type() == BuildType.Xcode:
-        if package != "llvm":
-            raise "On Xcode build, we only support the llvm package: requested {}"
-        return package_build_path()
-    return os.path.join(
-        expected_package_build_path(),
-        package_build_dir_name(package))
-
-
-def expected_package_build_paths():
-    return [expected_package_build_path_for(package) for package in packages()]
-
-
-def library_path(build_path):
-    return build_path + "/lib"
-
-
-def library_paths():
-    if build_type() == BuildType.Xcode:
-        package_build_paths = [package_build_path()]
-    else:
-        package_build_paths = expected_package_build_paths()
-    return [library_path(build_path) for build_path in package_build_paths]
-
-
-def package_build_path():
-    return os.path.join(
-        llvm_build_dirtree(),
-        os.environ["LLVM_CONFIGURATION"],
-        "x86_64")
diff --git a/src/llvm-project/lldb/scripts/Xcode/package-clang-resource-headers.py b/src/llvm-project/lldb/scripts/Xcode/package-clang-resource-headers.py
deleted file mode 100644
index 7e34af9..0000000
--- a/src/llvm-project/lldb/scripts/Xcode/package-clang-resource-headers.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#! /usr/bin/env python
-
-# package-clang-resource-headers.py
-#
-# The Clang module loader depends on built-in headers for the Clang compiler.
-# We grab these from the Clang build and move them into the LLDB module.
-
-# TARGET_DIR is where the lldb framework/shared library gets put.
-# LLVM_BUILD_DIR is where LLVM and Clang got built
-# LLVM_BUILD_DIR/lib/clang should exist and contain headers
-
-import os
-import re
-import shutil
-import sys
-
-import lldbbuild
-
-if len(sys.argv) != 3:
-    print("usage: " + sys.argv[0] + " TARGET_DIR LLVM_BUILD_DIR")
-    sys.exit(1)
-
-target_dir = sys.argv[1]
-llvm_build_dir = lldbbuild.expected_package_build_path_for("llvm")
-
-if not os.path.isdir(target_dir):
-    print(target_dir + " doesn't exist")
-    sys.exit(1)
-
-if not os.path.isdir(llvm_build_dir):
-    llvm_build_dir = re.sub("-macosx-", "-iphoneos-", llvm_build_dir)
-
-if not os.path.isdir(llvm_build_dir):
-    llvm_build_dir = re.sub("-iphoneos-", "-appletvos-", llvm_build_dir)
-
-if not os.path.isdir(llvm_build_dir):
-    llvm_build_dir = re.sub("-appletvos-", "-watchos-", llvm_build_dir)
-
-if not os.path.isdir(llvm_build_dir):
-    llvm_build_dir = re.sub("-watchos-", "-bridgeos-", llvm_build_dir)
-
-if not os.path.isdir(llvm_build_dir):
-    print(llvm_build_dir + " doesn't exist")
-    sys.exit(1)
-
-resources = os.path.join(target_dir, "LLDB.framework", "Resources")
-
-if not os.path.isdir(resources):
-    print(resources + " must exist")
-    sys.exit(1)
-
-clang_dir = os.path.join(llvm_build_dir, "lib", "clang")
-
-if not os.path.isdir(clang_dir):
-    print(clang_dir + " must exist")
-    sys.exit(1)
-
-version_dir = None
-
-for subdir in os.listdir(clang_dir):
-    if (re.match("^[0-9]+(\.[0-9]+)*$", subdir)):
-        version_dir = os.path.join(clang_dir, subdir)
-        break
-
-if version_dir is None:
-    print("Couldn't find a subdirectory of the form #(.#)... in " + clang_dir)
-    sys.exit(1)
-
-if not os.path.isdir(version_dir):
-    print(version_dir + " is not a directory")
-    sys.exit(1)
-
-# Just checking... we're actually going to copy all of version_dir
-include_dir = os.path.join(version_dir, "include")
-
-if not os.path.isdir(include_dir):
-    print(version_dir + " is not a directory")
-    sys.exit(1)
-
-clang_resources = os.path.join(resources, "Clang")
-
-if os.path.isdir(clang_resources):
-    shutil.rmtree(clang_resources)
-
-shutil.copytree(version_dir, clang_resources)
diff --git a/src/llvm-project/lldb/scripts/Xcode/prepare-gtest-run-dir.sh b/src/llvm-project/lldb/scripts/Xcode/prepare-gtest-run-dir.sh
deleted file mode 100755
index 71b3406..0000000
--- a/src/llvm-project/lldb/scripts/Xcode/prepare-gtest-run-dir.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-RUNTIME_INPUTS_DIR="${TARGET_BUILD_DIR}/Inputs"
-echo "Making runtime Inputs directory: $RUNTIME_INPUTS_DIR"
-mkdir -p "$RUNTIME_INPUTS_DIR"
-
-for input_dir in $(find unittests -type d -name Inputs); do
-    echo "Copying $input_dir into $RUNTIME_INPUTS_DIR"
-    cp -r "${input_dir}"/* "${RUNTIME_INPUTS_DIR}/"
-done
diff --git a/src/llvm-project/lldb/scripts/Xcode/repo.py b/src/llvm-project/lldb/scripts/Xcode/repo.py
deleted file mode 100644
index 2657b6e..0000000
--- a/src/llvm-project/lldb/scripts/Xcode/repo.py
+++ /dev/null
@@ -1,54 +0,0 @@
-import json
-import os
-import re
-import shutil
-import subprocess
-import sys
-
-def identifier():
-	try:
-		svn_output = subprocess.check_output(["svn", "info", "--show-item", "url"], stderr=subprocess.STDOUT).rstrip()
-		return svn_output
-	except:
-		pass
-	try:
-		git_remote_and_branch = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"], stderr=subprocess.STDOUT).rstrip()
-		git_remote = git_remote_and_branch.split("/")[0]
-		git_branch = "/".join(git_remote_and_branch.split("/")[1:])
-		git_url = subprocess.check_output(["git", "remote", "get-url", git_remote]).rstrip()
-		return git_url + ":" + git_branch
-	except:
-		pass
-	return None
-
-def get_override():
-	dir = os.path.dirname(os.path.realpath(__file__))
-	repos_dir = os.path.join(dir, "repos")
-	json_regex = re.compile(r"^.*.json$")
-	override_path = os.path.join(repos_dir, "OVERRIDE")
-	if os.path.isfile(override_path):
-		override_set = json.load(open(override_path))
-		return override_set["repos"]
-        else:
-		return None
-
-def find(identifier):
-	dir = os.path.dirname(os.path.realpath(__file__))
-	repos_dir = os.path.join(dir, "repos")
-	json_regex = re.compile(r"^.*.json$")
-	override_path = os.path.join(repos_dir, "OVERRIDE")
-	if os.path.isfile(override_path):
-		override_set = json.load(open(override_path))
-		return override_set["repos"]
-	fallback_path = os.path.join(repos_dir, "FALLBACK")
-	for path in [os.path.join(repos_dir, f) for f in filter(json_regex.match, os.listdir(repos_dir))]:
-		fd = open(path)
-		set = json.load(fd)
-		fd.close()
-		if any(re.match(set_regex, identifier) for set_regex in set["regexs"]):
-			shutil.copyfile(path, fallback_path)
-			return set["repos"]
-	if os.path.isfile(fallback_path):
-		fallback_set = json.load(open(fallback_path))
-		return fallback_set["repos"]
-	sys.exit("Couldn't find a branch configuration for " + identifier + " and there was no " + fallback_path)
diff --git a/src/llvm-project/lldb/scripts/Xcode/repos/FALLBACK b/src/llvm-project/lldb/scripts/Xcode/repos/FALLBACK
deleted file mode 100644
index a3bd724..0000000
--- a/src/llvm-project/lldb/scripts/Xcode/repos/FALLBACK
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-    "regexs" : [".*llvm\\.org.*"],
-    "repos" : [
-        {"name": "llvm",
-         "vcs": "git",
-         "url": "http://llvm.org/git/llvm.git",
-         "ref": "master"},
-
-        {"name": "clang",
-         "vcs": "git",
-         "url": "http://llvm.org/git/clang.git",
-         "ref": "master"},
-
-        {"name": "ninja",
-         "vcs": "git",
-         "url": "https://github.com/ninja-build/ninja.git",
-         "ref": "master"}
-    ]
-}
diff --git a/src/llvm-project/lldb/scripts/Xcode/repos/svn-trunk.json b/src/llvm-project/lldb/scripts/Xcode/repos/svn-trunk.json
deleted file mode 100644
index a3bd724..0000000
--- a/src/llvm-project/lldb/scripts/Xcode/repos/svn-trunk.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
-    "regexs" : [".*llvm\\.org.*"],
-    "repos" : [
-        {"name": "llvm",
-         "vcs": "git",
-         "url": "http://llvm.org/git/llvm.git",
-         "ref": "master"},
-
-        {"name": "clang",
-         "vcs": "git",
-         "url": "http://llvm.org/git/clang.git",
-         "ref": "master"},
-
-        {"name": "ninja",
-         "vcs": "git",
-         "url": "https://github.com/ninja-build/ninja.git",
-         "ref": "master"}
-    ]
-}
diff --git a/src/llvm-project/lldb/scripts/Python/android/host_art_bt.py b/src/llvm-project/lldb/scripts/android/host_art_bt.py
similarity index 100%
rename from src/llvm-project/lldb/scripts/Python/android/host_art_bt.py
rename to src/llvm-project/lldb/scripts/android/host_art_bt.py
diff --git a/src/llvm-project/lldb/scripts/build-lldb-llvm-clang b/src/llvm-project/lldb/scripts/build-lldb-llvm-clang
deleted file mode 100755
index c71188d..0000000
--- a/src/llvm-project/lldb/scripts/build-lldb-llvm-clang
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh -x
-
-# Usage:
-# build-lldb-llvm-clang <revision> [Debug|Release|BuildAndIntegration]
-# build-lldb-llvm-clang <llvm-revision> <clang-revision> [Debug|Release|BuildAndIntegration]
-
-LLVM_REVISION=$1
-CLANG_REVISION=$2
-LLVM_CONFIGURATION=$3
-
-if [ "$LLVM_REVISION" = "" ]; then
-	echo "Usage:\n    build-lldb-llvm-clang <llvm-revision> [<clang-revision> Debug|Release||BuildAndIntegration]"
-	exit 1
-fi
-
-if [ "$CLANG_REVISION" = "" ]; then
-	$CLANG_REVISION = $LLVM_REVISION
-fi
-
-# Checkout LLVM
-svn co -q -r $LLVM_REVISION http://llvm.org/svn/llvm-project/llvm/trunk llvm
-
-# change directory to "./llvm"
-cd llvm
-
-# Checkout Clang
-# change directory to "./llvm/tools"
-cd tools
-svn co -q -r $CLANG_REVISION http://llvm.org/svn/llvm-project/cfe/trunk clang
-
-# change directory to "./llvm"
-cd ..
-for patch_file in ../scripts/llvm.*.diff
-do
-	echo "Applying patch from '$patch_file'"
-    patch -p1 < "$patch_file"
-done
-
-# change directory to "./llvm/tools/clang"
-cd tools/clang
-for patch_file in ../../../scripts/clang.*.diff
-do
-	echo "Applying patch from '$patch_file'"
-    patch -p1 < "$patch_file"
-done
-
-# change directory to "./"
-cd ../../..
-pwd
-
-if [ "$LLVM_CONFIGURATION" = "Debug" ]; then
-	# Configure "Debug+Asserts" build
-	mkdir llvm-debug
-	cd llvm-debug
-	../llvm/configure --enable-targets=x86_64,arm 
-	make -j8 clang-only VERBOSE=1 PROJECT_NAME='llvm'
-	make -j8 tools-only VERBOSE=1 PROJECT_NAME='llvm' EDIS_VERSION=1
-elif [ "$LLVM_CONFIGURATION" = "Release" ]; then
-	# Configure "Release" build
-	mkdir llvm-release
-	cd llvm-release
-	../llvm/configure --enable-targets=x86_64,arm --enable-optimized --disable-assertions
-	make -j8 clang-only VERBOSE=1 PROJECT_NAME='llvm'
-	make -j8 tools-only VERBOSE=1 PROJECT_NAME='llvm' EDIS_VERSION=1
-elif [ "$LLVM_CONFIGURATION" = "BuildAndIntegration" ]; then
-	# Don't configure or build for "BuildAndIntegration", this configuration 
-	# is a preparation step for a build submission
-	
-	# Remove all patches, and the llvm and clang "test" directories
-	rm -rf ./scripts/*.diff ./llvm/test ./llvm/tools/clang/test
-else
-	echo "checked out llvm (revision $LLVM_REVISION) and clang (revision $CLANG_REVISION)."
-	exit 0
-fi
diff --git a/src/llvm-project/lldb/scripts/buildbot.py b/src/llvm-project/lldb/scripts/buildbot.py
deleted file mode 100755
index 06ee556..0000000
--- a/src/llvm-project/lldb/scripts/buildbot.py
+++ /dev/null
@@ -1,196 +0,0 @@
-#!/usr/bin/env python
-
-import argparse
-import os
-import os.path
-import shutil
-import subprocess
-import sys
-
-
-class BuildError(Exception):
-
-    def __init__(self,
-                 string=None,
-                 path=None,
-                 inferior_error=None):
-        self.m_string = string
-        self.m_path = path
-        self.m_inferior_error = inferior_error
-
-    def __str__(self):
-        if self.m_path and self.m_string:
-            return "Build error: %s (referring to %s)" % (
-                self.m_string, self.m_path)
-        if self.m_path:
-            return "Build error (referring to %s)" % (self.m_path)
-        if self.m_string:
-            return "Build error: %s" % (self.m_string)
-        return "Build error"
-
-
-class LLDBBuildBot:
-
-    def __init__(
-            self,
-            build_directory_path,
-            log_path,
-            lldb_repository_url="http://llvm.org/svn/llvm-project/lldb/trunk",
-            llvm_repository_url="http://llvm.org/svn/llvm-project/llvm/trunk",
-            clang_repository_url="http://llvm.org/svn/llvm-project/cfe/trunk",
-            revision=None):
-        self.m_build_directory_path = os.path.abspath(build_directory_path)
-        self.m_log_path = os.path.abspath(log_path)
-        self.m_lldb_repository_url = lldb_repository_url
-        self.m_llvm_repository_url = llvm_repository_url
-        self.m_clang_repository_url = clang_repository_url
-        self.m_revision = revision
-        self.m_log_stream = None
-
-    def Setup(self):
-        if os.path.exists(self.m_build_directory_path):
-            raise BuildError(
-                string="Build directory exists",
-                path=self.m_build_directory_path)
-        if os.path.exists(self.m_log_path):
-            raise BuildError(string="Log file exists", path=self.m_log_path)
-        self.m_log_stream = open(self.m_log_path, 'w')
-        os.mkdir(self.m_build_directory_path)
-
-    def Checkout(self):
-        os.chdir(self.m_build_directory_path)
-
-        cmdline_prefix = []
-
-        if self.m_revision is not None:
-            cmdline_prefix = ["svn", "-r %s" % (self.m_revision), "co"]
-        else:
-            cmdline_prefix = ["svn", "co"]
-
-        returncode = subprocess.call(
-            cmdline_prefix + [
-                self.m_lldb_repository_url,
-                "lldb"],
-            stdout=self.m_log_stream,
-            stderr=self.m_log_stream)
-        if returncode != 0:
-            raise BuildError(string="Couldn't checkout LLDB")
-
-        os.chdir("lldb")
-
-        returncode = subprocess.call(
-            cmdline_prefix + [
-                self.m_llvm_repository_url,
-                "llvm.checkout"],
-            stdout=self.m_log_stream,
-            stderr=self.m_log_stream)
-
-        if returncode != 0:
-            raise BuildError(string="Couldn't checkout LLVM")
-
-        os.symlink("llvm.checkout", "llvm")
-
-        os.chdir("llvm/tools")
-
-        returncode = subprocess.call(
-            cmdline_prefix + [
-                self.m_clang_repository_url,
-                "clang"],
-            stdout=self.m_log_stream,
-            stderr=self.m_log_stream)
-
-        if returncode != 0:
-            raise BuildError(string="Couldn't checkout Clang")
-
-    def Build(self):
-        os.chdir(self.m_build_directory_path)
-        os.chdir("lldb/llvm")
-
-        returncode = subprocess.call(["./configure",
-                                      "--disable-optimized",
-                                      "--enable-assertions",
-                                      "--enable-targets=x86,x86_64,arm"],
-                                     stdout=self.m_log_stream,
-                                     stderr=self.m_log_stream)
-
-        if returncode != 0:
-            raise BuildError(string="Couldn't configure LLVM/Clang")
-
-        returncode = subprocess.call(["make"],
-                                     stdout=self.m_log_stream,
-                                     stderr=self.m_log_stream)
-
-        if returncode != 0:
-            raise BuildError(string="Couldn't build LLVM/Clang")
-
-        os.chdir(self.m_build_directory_path)
-        os.chdir("lldb")
-
-        returncode = subprocess.call(["xcodebuild",
-                                      "-project", "lldb.xcodeproj",
-                                      "-target", "lldb-tool",
-                                      "-configuration", "Debug",
-                                      "-arch", "x86_64",
-                                      "LLVM_CONFIGURATION=Debug+Asserts",
-                                      "OBJROOT=build"],
-                                     stdout=self.m_log_stream,
-                                     stderr=self.m_log_stream)
-
-        if returncode != 0:
-            raise BuildError(string="Couldn't build LLDB")
-
-    def Test(self):
-        os.chdir(self.m_build_directory_path)
-        os.chdir("lldb/test")
-
-        returncode = subprocess.call(["./dotest.py", "-t"],
-                                     stdout=self.m_log_stream,
-                                     stderr=self.m_log_stream)
-
-    def Takedown(self):
-        os.chdir("/tmp")
-        self.m_log_stream.close()
-        shutil.rmtree(self.m_build_directory_path)
-
-    def Run(self):
-        self.Setup()
-        self.Checkout()
-        self.Build()
-        # self.Test()
-        self.Takedown()
-
-
-def GetArgParser():
-    parser = argparse.ArgumentParser(
-        description="Try to build LLDB/LLVM/Clang and run the full test suite.")
-    parser.add_argument(
-        "--build-path",
-        "-b",
-        required=True,
-        help="A (nonexistent) path to put temporary build products into",
-        metavar="path")
-    parser.add_argument(
-        "--log-file",
-        "-l",
-        required=True,
-        help="The name of a (nonexistent) log file",
-        metavar="file")
-    parser.add_argument(
-        "--revision",
-        "-r",
-        required=False,
-        help="The LLVM revision to use",
-        metavar="N")
-    return parser
-
-parser = GetArgParser()
-arg_dict = vars(parser.parse_args())
-
-build_bot = LLDBBuildBot(build_directory_path=arg_dict["build_path"],
-                         log_path=arg_dict["log_file"],
-                         revision=arg_dict["revision"])
-
-try:
-    build_bot.Run()
-except BuildError as err:
-    print(err)
diff --git a/src/llvm-project/lldb/scripts/checkpoint-llvm.pl b/src/llvm-project/lldb/scripts/checkpoint-llvm.pl
deleted file mode 100755
index 2372e7e..0000000
--- a/src/llvm-project/lldb/scripts/checkpoint-llvm.pl
+++ /dev/null
@@ -1,126 +0,0 @@
-#!/usr/bin/perl
-
-# This script should be pointed to a valid llvm.build folder that
-# was created using the "build-llvm.pl" shell script. It will create
-# a new llvm.zip file that can be checked into the repository
-# at lldb/llvm.zip
-
-use strict;
-use Cwd 'abs_path';
-use File::Basename;
-use File::Temp qw/ tempfile tempdir /;
-our $debug = 1;
-
-
-sub do_command
-{
-	my $cmd = shift;
-	my $description = @_ ? shift : "command";
-	my $die_on_fail = @_ ? shift : undef;
-	$debug and print "% $cmd\n";
-	system ($cmd);
-	if ($? == -1) 
-	{
-        $debug and printf ("error: %s failed to execute: $!\n", $description);
-		$die_on_fail and $? and exit(1);
-		return $?;
-    }
-    elsif ($? & 127) 
-	{
-        $debug and printf("error: %s child died with signal %d, %s coredump\n", 
-						  $description, 
-						  ($? & 127),  
-						  ($? & 128) ? 'with' : 'without');
-		$die_on_fail and $? and exit(1);
-		return $?;
-    }
-    else 
-	{
-		my $exit = $? >> 8;
-		if ($exit)
-		{
-			$debug and printf("error: %s child exited with value %d\n", $description, $exit);
-			$die_on_fail and exit(1);
-		}
-		return $exit;
-    }
-}
-
-sub do_rsync_paths
-{
-    while (@_)
-	{
-		my $rsync_src = shift @_;
-		my $rsync_dst = shift @_;
-		print "rsync_src = '$rsync_src'\n";
-		print "rsync_dst = '$rsync_dst'\n";
-        
-        if (!-d $rsync_dst)
-        {
-            mkdir $rsync_dst;
-        }
-        
-		if (-e $rsync_src)
-		{
-			my ($rsync_dst_file, $rsync_dst_dir) = fileparse ($rsync_dst);
-			print "rsync_dst_dir = '$rsync_dst_dir'\n";
-			-e $rsync_dst_dir or do_command ("mkdir -p '$rsync_dst_dir'");			
-			do_command ("rsync -amvC --exclude='*.tmp' --exclude='*.txt' --exclude='*.TXT' --exclude='*.td' --exclude='\.dir' --exclude=Makefile '$rsync_src' '$rsync_dst'");
-		}
-        else
-        {
-            die "$rsync_src does not exist!\n";
-        }
-	}
-}
-
-if (@ARGV > 4)
-{
-	my $llvm_source_dir = abs_path(shift @ARGV);	# The llvm source that contains full llvm and clang sources
-	my $llvm_build_dir  = abs_path(shift @ARGV);     # The llvm build directory that contains headers and 
-	my $lldb_build_dir  = abs_path(shift @ARGV);     # the build directory that contains the fat libEnhancedDisassembly.dylib
-	my $llvm_zip_file   = abs_path(shift @ARGV);
-
-    printf("LLVM sources : '%s'\n", $llvm_source_dir);
-    printf("LLVM build   : '%s'\n", $llvm_build_dir);
-    printf("LLDB build   : '%s'\n", $lldb_build_dir);
-    printf("LLVM zip file: '%s'\n", $llvm_zip_file);
-
-	-e $llvm_build_dir or die "LLVM build directory doesn't exist: '$llvm_build_dir': $!\n";
-
-	my $temp_dir = tempdir( CLEANUP => 1 );
-	print "temp dir = '$temp_dir'\n";
-  	my $llvm_checkpoint_dir = "$temp_dir/llvm";
-	mkdir "$llvm_checkpoint_dir" or die "Couldn't make 'llvm' in '$temp_dir'\n";
-	
-	my @generic_rsync_src_dst_paths =
-	(
-		"$llvm_source_dir/include", "$llvm_checkpoint_dir",
-		"$llvm_source_dir/tools/clang/include", "$llvm_checkpoint_dir/tools/clang",
-	);
-    
-    do_rsync_paths (@generic_rsync_src_dst_paths);
-
-	for my $arch (@ARGV)
-    {
-        my @specific_rsync_src_dst_paths =
-        (
-            "$llvm_build_dir/$arch/include", "$llvm_checkpoint_dir/$arch",
-            "$llvm_build_dir/$arch/tools/clang/include", "$llvm_checkpoint_dir/$arch/tools/clang",
-        );
-        
-        do_rsync_paths (@specific_rsync_src_dst_paths);
-
-        do_command ("cp '$llvm_build_dir/$arch/libllvmclang.a' '$llvm_checkpoint_dir/$arch/libllvmclang.a'", "Copying .a file", 1);
-
-    }
-
-	#do_command ("cp '$llvm_build_dir/libllvmclang.a' '$llvm_checkpoint_dir'", "Copying libllvmclang.a", 1);
-	do_command ("rm -rf '$llvm_zip_file'", "Removing old llvm checkpoint file '$llvm_zip_file'", 1);
-	do_command ("(cd '$temp_dir' ; zip -r '$llvm_zip_file' 'llvm')", "Zipping llvm checkpoint directory '$llvm_checkpoint_dir' to '$llvm_zip_file'", 1);
-}
-else
-{
-	print "USAGE\n\tcheckpoint-llvm.pl <llvm-sources> <llvm-build> <lldb-build> <llvm-zip> <arch1> [<arch2> ...]\n\n";
-	print "EXAMPLE\n\tcd lldb\n\t./scripts/checkpoint-llvm.pl llvm build/llvm build/BuildAndIntegration llvm.zip x86_64 i386\n";
-}
diff --git a/src/llvm-project/lldb/scripts/finish-swig-wrapper-classes.sh b/src/llvm-project/lldb/scripts/finish-swig-wrapper-classes.sh
deleted file mode 100755
index 806f2862..0000000
--- a/src/llvm-project/lldb/scripts/finish-swig-wrapper-classes.sh
+++ /dev/null
@@ -1,101 +0,0 @@
-#! /bin/sh
-
-# finish-swig-wrapper-classes.sh
-#
-# For each scripting language liblldb supports, we need to create the
-# appropriate Script Bridge wrapper classes for that language so that
-# users can call Script Bridge functions from within the script interpreter.
-#
-# We use SWIG to create a C++ file containing the appropriate wrapper classes
-# and funcitons for each scripting language, before liblldb is built (thus
-# the C++ file can be compiled into liblldb.  In some cases, additional work
-# may need to be done after liblldb has been compiled, to make the scripting
-# language stuff fully functional.  Any such post-processing is handled through
-# the shell scripts called here.
-
-# SRC_ROOT is the root of the lldb source tree.
-# TARGET_DIR is where the lldb framework/shared library gets put.
-# CONFIG_BUILD_DIR is where the build-swig-Python-LLDB.sh  shell script
-#           put the lldb.py file it generated from running SWIG.
-# PREFIX is the root directory used to determine where third-party modules
-#         for scripting languages should be installed.
-# debug_flag (optional) determines whether or not this script outputs
-#           additional information when running.
-
-SRC_ROOT=$1
-TARGET_DIR=$2
-CONFIG_BUILD_DIR=$3
-PREFIX=$4
-
-shift 4
-
-if [ -n "$1" -a "$1" = "-debug" ]
-then
-    debug_flag=$1
-    Debug=1
-    shift
-else
-    debug_flag=""
-    Debug=0
-fi
-
-if [ -n "$1" -a "$1" = "-m" ]
-then
-    makefile_flag="$1"
-    shift
-else
-    makefile_flag=""
-fi
-
-#
-# For each scripting language, see if a post-processing script for that
-# language exists, and if so, call it.
-#
-# For now the only language we support is Python, but we expect this to
-# change.
-
-languages="Python"
-cwd=${SRC_ROOT}/scripts
-
-for curlang in $languages
-do
-    if [ $Debug -eq 1 ]
-    then
-        echo "Current language is $curlang"
-    fi
-
-    if [ ! -d "$cwd/$curlang" ]
-    then
-        echo "error:  unable to find $curlang script sub-dirctory" >&2
-        continue
-    else
-
-        if [ $Debug -eq 1 ]
-        then
-            echo "Found $curlang sub-directory"
-        fi
-
-        cd $cwd/$curlang
-
-        filename="./finish-swig-${curlang}-LLDB.sh"
-
-        if [ -f $filename ]
-        then
-            if [ $Debug -eq 1 ]
-            then
-                echo "Found $curlang post-processing script for LLDB"
-                echo "Executing $curlang post-processing script..."
-            fi
-
-
-            ./finish-swig-${curlang}-LLDB.sh $SRC_ROOT $TARGET_DIR $CONFIG_BUILD_DIR "${PREFIX}" "${debug_flag}" "${makefile_flag}"
-            retval=$?
-            if [ $retval -ne 0 ]; then
-                echo "$(pwd)/finish-swig-${curlang}-LLDB.sh failed with exit code $retval"
-                exit $retval
-            fi
-        fi
-    fi
-done
-
-exit 0
diff --git a/src/llvm-project/lldb/scripts/finishSwigWrapperClasses.py b/src/llvm-project/lldb/scripts/finishSwigWrapperClasses.py
deleted file mode 100644
index 4d08b86..0000000
--- a/src/llvm-project/lldb/scripts/finishSwigWrapperClasses.py
+++ /dev/null
@@ -1,410 +0,0 @@
-""" Post process SWIG Bridge wrapper code Python script for Windows/LINUX/OSX platform
-
-    --------------------------------------------------------------------------
-    File:           finishSwigWrapperClasses.py
-
-    Overview:       Python script(s) to finish off the SWIG Python C++ Script
-                    Bridge wrapper code on the Windows/LINUX/OSX platform.
-                    The Python scripts are equivalent to the shell script (.sh)
-                    files.
-                    We use SWIG to create a C++ file containing the appropriate
-                    wrapper classes and functions for each scripting language,
-                    before liblldb is built (thus the C++ file can be compiled
-                    into liblldb.  In some cases, additional work may need to be
-                    done after liblldb has been compiled, to make the scripting
-                    language stuff fully functional.  Any such post-processing
-                    is handled through the Python scripts called here.
-
-    Gotchas:        None.
-
-    Copyright:      None.
-    --------------------------------------------------------------------------
-
-"""
-
-# Python modules:
-import sys      # Provide argument parsing
-import os       # Provide directory and file handling
-
-# Third party modules:
-
-# In-house modules:
-import utilsArgsParse   # Parse and validate this script's input arguments
-import utilsOsType      # Determine the OS type this script is running on
-import utilsDebug       # Debug Python scripts
-
-# Instantiations:
-# True = Turn on script function tracing, False = off.
-gbDbgVerbose = False
-gbDbgFlag = False              # Global debug mode flag, set by input parameter
-# --dbgFlag. True = operate in debug mode.
-# True = yes called from makefile system, False = not.
-gbMakeFileFlag = False
-
-# User facing text:
-strMsgErrorNoMain = "Program called by another Python script not allowed"
-strExitMsgSuccess = "Program successful"
-strExitMsgError = "Program error: "
-strParameter = "Parameter: "
-strMsgErrorOsTypeUnknown = "Unable to determine OS type"
-strScriptDirNotFound = "Unable to locate the script directory \'/script\'"
-strScriptLangsFound = "Found the following script languages:"
-strPostProcessError = "Executing \'%s\' post process script failed: "
-strScriptNotFound = "Unable to locate the post process script file \'%s\' in \'%s\'"
-strScriptLangFound = "Found \'%s\' build script."
-strScriptLangsFound = "Found the following script languages:"
-strExecuteMsg = "Executing \'%s\' build script..."
-strExecuteError = "Executing \'%s\' build script failed: "
-strHelpInfo = "\
-Python script(s) to finish off the SWIG Python C++ Script \n\
-Bridge wrapper code on the Windows/LINUX/OSX platform.  The Python \n\
-scripts are equivalent to the shell script (.sh) files \n\
-run on others platforms.\n\
-Args:   -h              (optional) Print help information on this program.\n\
-    -d              (optional) Determines whether or not this script\n\
-                    outputs additional information when running.\n\
-    -m              (optional) Specify called from Makefile system.\n\
-    --srcRoot=          The root of the lldb source tree.\n\
-    --targetDir=            Where the lldb framework/shared library gets put.\n\
-    --cfgBldDir=            (optional) Where the build-swig-Python-LLDB.py program \n\
-                    will put the lldb.py file it generated from running\n\
-                    SWIG.\n\
-    --prefix=           (optional) Is the root directory used to determine where\n\
-                    third-party modules for scripting languages should\n\
-                    be installed. Where non-Darwin systems want to put\n\
-                    the .py and .so files so that Python can find them\n\
-                    automatically. Python install directory.\n\
-    --lldbLibDir    (optional) The name of the directory containing liblldb.so.\n\
-                    \"lib\" by default.\n\
-    --cmakeBuildConfiguration=  (optional) Is the build configuration(Debug, Release, RelWithDebugInfo)\n\
-                    used to determine where the bin and lib directories are \n\
-                    created for a Windows build.\n\
-    --argsFile=         The args are read from a file instead of the\n\
-                    command line. Other command line args are ignored.\n\
-    --useSystemSix  Use system six.py version.\n\
-\n\
-Usage:\n\
-    finishSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath\n\
-    --cfgBldDir=ADirPath --prefix=ADirPath --lldbLibDir=ADirPath -m -d\n\
-\n\
-"  # TAG_PROGRAM_HELP_INFO
-
-#++---------------------------------------------------------------------------
-# Details:  Exit the program on success. Called on program successfully done
-#           its work. Returns a status result to the caller.
-# Args:     vnResult    - (R) 0 or greater indicating success.
-#           vMsg        - (R) Success message if any to show success to user.
-# Returns:  None.
-# Throws:   None.
-#--
-
-
-def program_exit_success(vnResult, vMsg):
-    strMsg = ""
-
-    if vMsg.__len__() != 0:
-        strMsg = "%s: %s (%d)" % (strExitMsgSuccess, vMsg, vnResult)
-        print(strMsg)
-
-    sys.exit(vnResult)
-
-#++---------------------------------------------------------------------------
-# Details:  Exit the program with error. Called on exit program failed its
-#           task. Returns a status result to the caller.
-# Args:     vnResult    - (R) A negative number indicating error condition.
-#           vMsg        - (R) Error message to show to user.
-# Returns:  None.
-# Throws:   None.
-#--
-
-
-def program_exit_on_failure(vnResult, vMsg):
-    print(("%s%s (%d)" % (strExitMsgError, vMsg, vnResult)))
-    sys.exit(vnResult)
-
-#++---------------------------------------------------------------------------
-# Details:  Exit the program return a exit result number and print a message.
-#           Positive numbers and zero are returned for success other error
-#           occurred.
-# Args:     vnResult    - (R) A -ve (an error), 0 or +ve number (ok or status).
-#           vMsg        - (R) Error message to show to user.
-# Returns:  None.
-# Throws:   None.
-#--
-
-
-def program_exit(vnResult, vMsg):
-    if vnResult >= 0:
-        program_exit_success(vnResult, vMsg)
-    else:
-        program_exit_on_failure(vnResult, vMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Dump input parameters.
-# Args:     vDictArgs   - (R) Map of input args to value.
-# Returns:  None.
-# Throws:   None.
-#--
-
-
-def print_out_input_parameters(vDictArgs):
-    for arg, val in list(vDictArgs.items()):
-        strEqs = ""
-        strQ = ""
-        if val.__len__() != 0:
-            strEqs = " ="
-            strQ = "\""
-        print(("%s%s%s %s%s%s\n" % (strParameter, arg, strEqs, strQ, val, strQ)))
-
-#++---------------------------------------------------------------------------
-# Details:  Validate the arguments passed to the program. This function exits
-#           the program should error with the arguments be found.
-# Args:     vArgv   - (R) List of arguments and values.
-# Returns:  Int     - 0 = success, -ve = some failure.
-#           Dict    - Map of arguments names to argument values
-# Throws:   None.
-#--
-
-
-def validate_arguments(vArgv):
-    dbg = utilsDebug.CDebugFnVerbose("validate_arguments()")
-    strMsg = ""
-    dictArgs = {}
-    nResult = 0
-    strListArgs = "hdm"  # Format "hiox:" = -h -i -o -x <arg>
-    listLongArgs = [
-        "srcRoot=",
-        "targetDir=",
-        "cfgBldDir=",
-        "prefix=",
-        "cmakeBuildConfiguration=",
-        "lldbLibDir=",
-        "argsFile",
-        "useSystemSix"]
-    dictArgReq = {"-h": "o",          # o = optional, m = mandatory
-                  "-d": "o",
-                  "-m": "o",
-                  "--srcRoot": "m",
-                  "--targetDir": "m",
-                  "--cfgBldDir": "o",
-                  "--prefix": "o",
-                  "--cmakeBuildConfiguration": "o",
-                  "--lldbLibDir": "o",
-                  "--argsFile": "o",
-                  "--useSystemSix": "o"}
-
-    # Check for mandatory parameters
-    nResult, dictArgs, strMsg = utilsArgsParse.parse(vArgv, strListArgs,
-                                                     listLongArgs,
-                                                     dictArgReq,
-                                                     strHelpInfo)
-    if nResult < 0:
-        program_exit_on_failure(nResult, strMsg)
-
-    # User input -h for help
-    if nResult == 1:
-        program_exit_success(0, strMsg)
-
-    return (nResult, dictArgs)
-
-#++---------------------------------------------------------------------------
-# Details:  Locate post process script language directory and the script within
-#           and execute.
-# Args:     vStrScriptLang      - (R) Name of the script language to build.
-#           vstrFinishFileName  - (R) Prefix file name to build full name.
-#           vDictArgs           - (R) Program input parameters.
-# Returns:  Int     - 0 = Success, < 0 some error condition.
-#           Str     - Error message.
-# Throws:   None.
-#--
-
-
-def run_post_process(vStrScriptLang, vstrFinishFileName, vDictArgs):
-    dbg = utilsDebug.CDebugFnVerbose("run_post_process()")
-    nResult = 0
-    strStatusMsg = ""
-    strScriptFile = vstrFinishFileName % vStrScriptLang
-    strScriptFileDir = os.path.normpath(
-        os.path.join(
-            vDictArgs["--srcRoot"],
-            "scripts",
-            vStrScriptLang))
-    strScriptFilePath = os.path.join(strScriptFileDir, strScriptFile)
-
-    # Check for the existence of the script file
-    strPath = os.path.normcase(strScriptFilePath)
-    bOk = os.path.exists(strPath)
-    if not bOk:
-        strDir = os.path.normcase(strScriptFileDir)
-        strStatusMsg = strScriptNotFound % (strScriptFile, strDir)
-        return (-9, strStatusMsg)
-
-    if gbDbgFlag:
-        print((strScriptLangFound % vStrScriptLang))
-        print((strExecuteMsg % vStrScriptLang))
-
-    # Change where Python looks for our modules
-    strDir = os.path.normcase(strScriptFileDir)
-    sys.path.append(strDir)
-
-    # Execute the specific language script
-    dictArgs = vDictArgs  # Remove any args not required before passing on
-    strModuleName = strScriptFile[: strScriptFile.__len__() - 3]
-    module = __import__(strModuleName)
-    nResult, strStatusMsg = module.main(dictArgs)
-
-    # Revert sys path
-    sys.path.remove(strDir)
-
-    return (nResult, strStatusMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Step through each script language sub directory supported
-#           and execute post processing script for each scripting language,
-#           make sure the build script for that language exists.
-#           For now the only language we support is Python, but we expect this
-#           to change.
-# Args:     vDictArgs   - (R) Program input parameters.
-# Returns:  Int     - 0 = Success, < 0 some error condition.
-#           Str     - Error message.
-# Throws:   None.
-#--
-
-
-def run_post_process_for_each_script_supported(vDictArgs):
-    dbg = utilsDebug.CDebugFnVerbose(
-        "run_post_process_for_each_script_supported()")
-    nResult = 0
-    strStatusMsg = ""
-    strScriptDir = os.path.normpath(
-        os.path.join(
-            vDictArgs["--srcRoot"],
-            "scripts"))
-    strFinishFileName = "finishSwig%sLLDB.py"
-
-    # Check for the existence of the scripts folder
-    strScriptsDir = os.path.normcase(strScriptDir)
-    bOk = os.path.exists(strScriptsDir)
-    if not bOk:
-        return (-8, strScriptDirNotFound)
-
-    # Look for any script language directories to build for
-    listDirs = ["Python"]
-
-    # Iterate script directory find any script language directories
-    for scriptLang in listDirs:
-        # __pycache__ is a magic directory in Python 3 that holds .pyc files
-        if scriptLang != "__pycache__" and scriptLang != "swig_bot_lib":
-            dbg.dump_text("Executing language script for \'%s\'" % scriptLang)
-            nResult, strStatusMsg = run_post_process(
-                scriptLang, strFinishFileName, vDictArgs)
-        if nResult < 0:
-            break
-
-    if nResult < 0:
-        strTmp = strPostProcessError % scriptLang
-        strTmp += strStatusMsg
-        strStatusMsg = strTmp
-
-    return (nResult, strStatusMsg)
-
-#++---------------------------------------------------------------------------
-# Details:  Program's main() with arguments passed in from the command line.
-#           Program either exits normally or with error from this function -
-#           top most level function.
-# Args:     vArgv   - (R) List of arguments and values.
-# Returns:  None
-# Throws:   None.
-#--
-
-
-def main(vArgv):
-    dbg = utilsDebug.CDebugFnVerbose("main()")
-    bOk = False
-    dictArgs = {}
-    nResult = 0
-    strMsg = ""
-
-    # The validate arguments fn will exit the program if tests fail
-    nResult, dictArgs = validate_arguments(vArgv)
-
-    eOSType = utilsOsType.determine_os_type()
-    if eOSType == utilsOsType.EnumOsType.Unknown:
-        program_exit(-4, strMsgErrorOsTypeUnknown)
-
-    global gbDbgFlag
-    gbDbgFlag = "-d" in dictArgs
-    if gbDbgFlag:
-        print_out_input_parameters(dictArgs)
-
-    # Check to see if we were called from the Makefile system. If we were, check
-    # if the caller wants SWIG to generate a dependency file.
-    # Not used in this program, but passed through to the language script file
-    # called by this program
-    global gbMakeFileFlag
-    gbMakeFileFlag = "-m" in dictArgs
-
-    nResult, strMsg = run_post_process_for_each_script_supported(dictArgs)
-
-    program_exit(nResult, strMsg)
-
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-
-# TAG_PROGRAM_HELP_INFO
-""" Details: Program main entry point.
-
-    --------------------------------------------------------------------------
-    Args:   -h (optional)   Print help information on this program.
-            -d (optional)   Determines whether or not this script
-                            outputs additional information when running.
-            -m (optional)   Specify called from Makefile system. If given locate
-                            the LLDBWrapPython.cpp in --srcRoot/source folder
-                            else in the --targetDir folder.
-            --srcRoot=      The root of the lldb source tree.
-            --targetDir=    Where the lldb framework/shared library gets put.
-            --cfgBldDir=    Where the buildSwigPythonLLDB.py program will
-            (optional)      put the lldb.py file it generated from running
-                            SWIG.
-            --prefix=       Is the root directory used to determine where
-            (optional)      third-party modules for scripting languages should
-                            be installed. Where non-Darwin systems want to put
-                            the .py and .so files so that Python can find them
-                            automatically. Python install directory.
-            --cmakeBuildConfiguration=  (optional) Is the build configuration(Debug, Release, RelWithDebugInfo)\n\
-                            used to determine where the bin and lib directories are \n\
-                            created for a Windows build.\n\
-            --lldbLibDir=   The name of the directory containing liblldb.so.
-            (optional)      "lib" by default.
-            --argsFile=     The args are read from a file instead of the
-                            command line. Other command line args are ignored.
-            --useSystemSix  Use system six.py version.
-    Usage:
-            finishSwigWrapperClasses.py --srcRoot=ADirPath --targetDir=ADirPath
-            --cfgBldDir=ADirPath --prefix=ADirPath --lldbLibDir=ADirPath -m -d
-            --useSystemSix
-
-    Results:    0 Success
-                -1 Error - invalid parameters passed.
-                -2 Error - incorrect number of mandatory parameters passed.
-
-                -4 Error - unable to determine OS type.
-                -5 Error - program not run with name of "__main__".
-                -8 Error - unable to locate the scripts folder.
-                -9 Error - unable to locate the post process language script
-                           file.
-
-                -100+    - Error messages from the child language script file.
-
-    --------------------------------------------------------------------------
-
-"""
-
-# Called using "__main__" when not imported i.e. from the command line
-if __name__ == "__main__":
-    utilsDebug.CDebugFnVerbose.bVerboseOn = gbDbgVerbose
-    dbg = utilsDebug.CDebugFnVerbose("__main__")
-    main(sys.argv[1:])
-else:
-    program_exit(-5, strMsgErrorNoMain)
diff --git a/src/llvm-project/lldb/scripts/generate-vers.pl b/src/llvm-project/lldb/scripts/generate-vers.pl
deleted file mode 100755
index 6337498..0000000
--- a/src/llvm-project/lldb/scripts/generate-vers.pl
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/perl
-
-sub usage()
-{
-  print "Usage: generate-vers.pl /path/toproject.pbxproj program_name";
-  exit(0);
-}
-
-(scalar @ARGV == 2) or usage();
-
-open $pbxproj, $ARGV[0] or die "Couldn't open ".$ARGV[0];
-
-$lldb_version = None;
-$lldb_train = None;
-$lldb_revision = None;
-$lldb_version_string = None;
-
-$product_name = "lldb";
-
-while ($line = <$pbxproj>)
-{
-  chomp ($line);
-  
-  if ($lldb_version == None &&
-      $line =~ /CURRENT_PROJECT_VERSION = ([0-9]+).([0-9]+).([0-9]+)(.[0-9])?/)
-  {
-    $lldb_version = $1;
-    $lldb_train = $2;
-    $lldb_revision = $3;
-    $lldb_patchlevel = $4;
-
-    if ($lldb_patchlevel != None)
-    {
-      $lldb_version_string = $lldb_version.".".$lldb_train.".".$lldb_revision.".".$lldb_patchlevel;
-    }
-    else
-    {
-      $lldb_version_string = $lldb_version.".".$lldb_train.".".$lldb_revision;
-    } 
-  }
-}
-
-if (!$product_name || !$lldb_version_string)
-{
-  print "Couldn't get needed information from the .pbxproj";
-  exit(-1);
-}
-
-$uppercase_name = uc $product_name;
-$lowercase_name = lc $product_name;
-
-close $pbxproj;
-
-$file_string = " const unsigned char ".$ARGV[1]."VersionString[] __attribute__ ((used)) = \"@(#)PROGRAM:".$uppercase_name."  PROJECT:".$lowercase_name."-".$lldb_version_string."\" \"\\n\"; const double ".$ARGV[1]."VersionNumber __attribute__ ((used)) = (double)".$lldb_version.".".$lldb_train.";\n";
-
-print $file_string;
diff --git a/src/llvm-project/lldb/scripts/get_relative_lib_dir.py b/src/llvm-project/lldb/scripts/get_relative_lib_dir.py
deleted file mode 100644
index 3afeeaf..0000000
--- a/src/llvm-project/lldb/scripts/get_relative_lib_dir.py
+++ /dev/null
@@ -1,44 +0,0 @@
-import distutils.sysconfig
-import os
-import platform
-import re
-import sys
-
-
-def get_python_relative_libdir():
-    """Returns the appropropriate python libdir relative to the build directory.
-
-    @param exe_path the path to the lldb executable
-
-    @return the python path that needs to be added to sys.path (PYTHONPATH)
-    in order to find the lldb python module.
-    """
-    if platform.system() != 'Linux':
-        return None
-
-    # We currently have a bug in lldb -P that does not account for
-    # architecture variants in python paths for
-    # architecture-specific modules.  Handle the lookup here.
-    # When that bug is fixed, we should just ask lldb for the
-    # right answer always.
-    arch_specific_libdir = distutils.sysconfig.get_python_lib(True, False)
-    split_libdir = arch_specific_libdir.split(os.sep)
-    lib_re = re.compile(r"^lib.*$")
-
-    for i in range(len(split_libdir)):
-        match = lib_re.match(split_libdir[i])
-        if match is not None:
-            # We'll call this the relative root of the lib dir.
-            # Things like RHEL will have an arch-specific python
-            # lib dir, which isn't 'lib' on x86_64.
-            return os.sep.join(split_libdir[i:])
-    # Didn't resolve it.
-    return None
-
-if __name__ == '__main__':
-    lib_dir = get_python_relative_libdir()
-    if lib_dir is not None:
-        sys.stdout.write(lib_dir)
-        sys.exit(0)
-    else:
-        sys.exit(1)
diff --git a/src/llvm-project/lldb/scripts/install-lldb.sh b/src/llvm-project/lldb/scripts/install-lldb.sh
deleted file mode 100755
index 0ba4e7c..0000000
--- a/src/llvm-project/lldb/scripts/install-lldb.sh
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-
-
-# This script will install the files from a "Debug" or "Release" build
-# directory into the developer folder specified.
-
-NUM_EXPECTED_ARGS=2
-
-PROGRAM=`basename $0`
-
-if [ $# -ne $NUM_EXPECTED_ARGS ]; then
-	echo This script will install the files from a 'Debug' or 'Release' build directory into the developer folder specified.
-	echo "usage: $PROGRAM <BUILD_DIR> <DEVELOPER_DIR>";
-	echo "example: $PROGRAM ./Debug /Developer"
-	echo "example: $PROGRAM /build/Release /Xcode4"
-	exit 1;
-fi
-
-BUILD_DIR=$1
-DEVELOPER_DIR=$2
-
-if [ -d $BUILD_DIR ]; then
-	if [ -d $DEVELOPER_DIR ]; then
-		if [ -e "$BUILD_DIR/debugserver" ]; then
-			echo Updating "$DEVELOPER_DIR/usr/bin/debugserver"
-			sudo rm -rf "$DEVELOPER_DIR/usr/bin/debugserver"
-			sudo cp "$BUILD_DIR/debugserver" "$DEVELOPER_DIR/usr/bin/debugserver"
-		fi
-
-		if [ -e "$BUILD_DIR/lldb" ]; then
-			echo Updating "$DEVELOPER_DIR/usr/bin/lldb"
-			sudo rm -rf "$DEVELOPER_DIR/usr/bin/lldb"
-			sudo cp "$BUILD_DIR/lldb" "$DEVELOPER_DIR/usr/bin/lldb"
-		fi
-
-		if [ -e "$BUILD_DIR/libEnhancedDisassembly.dylib" ]; then
-			echo Updating "$DEVELOPER_DIR/usr/lib/libEnhancedDisassembly.dylib"
-			sudo rm -rf "$DEVELOPER_DIR/usr/lib/libEnhancedDisassembly.dylib"
-			sudo cp "$BUILD_DIR/libEnhancedDisassembly.dylib" "$DEVELOPER_DIR/usr/lib/libEnhancedDisassembly.dylib"
-		fi
-
-		if [ -d "$BUILD_DIR/LLDB.framework" ]; then
-			echo Updating "$DEVELOPER_DIR/Library/PrivateFrameworks/LLDB.framework"
-			sudo rm -rf "$DEVELOPER_DIR/Library/PrivateFrameworks/LLDB.framework"
-			sudo cp -r "$BUILD_DIR/LLDB.framework" "$DEVELOPER_DIR/Library/PrivateFrameworks/LLDB.framework"
-		elif [ -e "$BUILD_DIR/LLDB.framework" ]; then
-			echo BUILD_DIR path to LLDB.framework is not a directory: "$BUILD_DIR/LLDB.framework"
-			exit 2;			
-		fi
-	
-	else
-		echo DEVELOPER_DIR must be a directory: "$DEVELOPER_DIR"
-		exit 3;	
-	fi
-
-else
-	echo BUILD_DIR must be a directory: "$BUILD_DIR"
-	exit 4;	
-fi
diff --git a/src/llvm-project/lldb/scripts/interface/SBAddress.i b/src/llvm-project/lldb/scripts/interface/SBAddress.i
deleted file mode 100644
index 92bc3f8..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBAddress.i
+++ /dev/null
@@ -1,179 +0,0 @@
-//===-- SWIG Interface for SBAddress ----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"A section + offset based address class.
-
-The SBAddress class allows addresses to be relative to a section
-that can move during runtime due to images (executables, shared
-libraries, bundles, frameworks) being loaded at different
-addresses than the addresses found in the object file that
-represents them on disk. There are currently two types of addresses
-for a section:
-    o file addresses
-    o load addresses
-
-File addresses represents the virtual addresses that are in the 'on
-disk' object files. These virtual addresses are converted to be
-relative to unique sections scoped to the object file so that
-when/if the addresses slide when the images are loaded/unloaded
-in memory, we can easily track these changes without having to
-update every object (compile unit ranges, line tables, function
-address ranges, lexical block and inlined subroutine address
-ranges, global and static variables) each time an image is loaded or
-unloaded.
-
-Load addresses represents the virtual addresses where each section
-ends up getting loaded at runtime. Before executing a program, it
-is common for all of the load addresses to be unresolved. When a
-DynamicLoader plug-in receives notification that shared libraries
-have been loaded/unloaded, the load addresses of the main executable
-and any images (shared libraries) will be  resolved/unresolved. When
-this happens, breakpoints that are in one of these sections can be
-set/cleared.
-
-See docstring of SBFunction for example usage of SBAddress."
-) SBAddress;
-class SBAddress
-{
-public:
-
-    SBAddress ();
-
-    SBAddress (const lldb::SBAddress &rhs);
-
-    SBAddress (lldb::SBSection section,
-               lldb::addr_t offset);
-
-    %feature("docstring", "
-    Create an address by resolving a load address using the supplied target.") SBAddress;
-    SBAddress (lldb::addr_t load_addr, lldb::SBTarget &target);
-
-    ~SBAddress ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    // operator== is a free function, which swig does not handle, so we inject
-    // our own equality operator here
-    %pythoncode%{
-    def __eq__(self, other):
-      return not self.__ne__(other)
-    %}
-
-    bool operator!=(const SBAddress &rhs) const;
-
-    void
-    Clear ();
-
-    addr_t
-    GetFileAddress () const;
-
-    addr_t
-    GetLoadAddress (const lldb::SBTarget &target) const;
-
-    void
-    SetLoadAddress (lldb::addr_t load_addr,
-                    lldb::SBTarget &target);
-
-    bool
-    OffsetAddress (addr_t offset);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    lldb::SBSection
-    GetSection ();
-
-    lldb::addr_t
-    SBAddress::GetOffset ();
-
-    void
-    SetAddress (lldb::SBSection section,
-                lldb::addr_t offset);
-
-    %feature("docstring", "
-    GetSymbolContext() and the following can lookup symbol information for a given address.
-    An address might refer to code or data from an existing module, or it
-    might refer to something on the stack or heap. The following functions
-    will only return valid values if the address has been resolved to a code
-    or data address using 'void SBAddress::SetLoadAddress(...)' or
-    'lldb::SBAddress SBTarget::ResolveLoadAddress (...)'.") GetSymbolContext;
-    lldb::SBSymbolContext
-    GetSymbolContext (uint32_t resolve_scope);
-
-    %feature("docstring", "
-    GetModule() and the following grab individual objects for a given address and
-    are less efficient if you want more than one symbol related objects.
-    Use one of the following when you want multiple debug symbol related
-    objects for an address:
-       lldb::SBSymbolContext SBAddress::GetSymbolContext (uint32_t resolve_scope);
-       lldb::SBSymbolContext SBTarget::ResolveSymbolContextForAddress (const SBAddress &addr, uint32_t resolve_scope);
-    One or more bits from the SymbolContextItem enumerations can be logically
-    OR'ed together to more efficiently retrieve multiple symbol objects.") GetModule;
-    lldb::SBModule
-    GetModule ();
-
-    lldb::SBCompileUnit
-    GetCompileUnit ();
-
-    lldb::SBFunction
-    GetFunction ();
-
-    lldb::SBBlock
-    GetBlock ();
-
-    lldb::SBSymbol
-    GetSymbol ();
-
-    lldb::SBLineEntry
-    GetLineEntry ();
-
-    %pythoncode %{
-        def __get_load_addr_property__ (self):
-            '''Get the load address for a lldb.SBAddress using the current target.'''
-            return self.GetLoadAddress (target)
-
-        def __set_load_addr_property__ (self, load_addr):
-            '''Set the load address for a lldb.SBAddress using the current target.'''
-            return self.SetLoadAddress (load_addr, target)
-
-        def __int__(self):
-            '''Convert an address to a load address if there is a process and that process is alive, or to a file address otherwise.'''
-            if process.is_alive:
-                return self.GetLoadAddress (target)
-            else:
-                return self.GetFileAddress ()
-
-        def __oct__(self):
-            '''Convert the address to an octal string'''
-            return '%o' % int(self)
-
-        def __hex__(self):
-            '''Convert the address to an hex string'''
-            return '0x%x' % int(self)
-
-        module = property(GetModule, None, doc='''A read only property that returns an lldb object that represents the module (lldb.SBModule) that this address resides within.''')
-        compile_unit = property(GetCompileUnit, None, doc='''A read only property that returns an lldb object that represents the compile unit (lldb.SBCompileUnit) that this address resides within.''')
-        line_entry = property(GetLineEntry, None, doc='''A read only property that returns an lldb object that represents the line entry (lldb.SBLineEntry) that this address resides within.''')
-        function = property(GetFunction, None, doc='''A read only property that returns an lldb object that represents the function (lldb.SBFunction) that this address resides within.''')
-        block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the block (lldb.SBBlock) that this address resides within.''')
-        symbol = property(GetSymbol, None, doc='''A read only property that returns an lldb object that represents the symbol (lldb.SBSymbol) that this address resides within.''')
-        offset = property(GetOffset, None, doc='''A read only property that returns the section offset in bytes as an integer.''')
-        section = property(GetSection, None, doc='''A read only property that returns an lldb object that represents the section (lldb.SBSection) that this address resides within.''')
-        file_addr = property(GetFileAddress, None, doc='''A read only property that returns file address for the section as an integer. This is the address that represents the address as it is found in the object file that defines it.''')
-        load_addr = property(__get_load_addr_property__, __set_load_addr_property__, doc='''A read/write property that gets/sets the SBAddress using load address. The setter resolves SBAddress using the SBTarget from lldb.target so this property can ONLY be used in the interactive script interpreter (i.e. under the lldb script command) and not in Python based commands, or breakpoint commands.''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBBlock.i b/src/llvm-project/lldb/scripts/interface/SBBlock.i
deleted file mode 100644
index 6d2cebf..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBBlock.i
+++ /dev/null
@@ -1,159 +0,0 @@
-//===-- SWIG Interface for SBBlock ------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a lexical block. SBFunction contains SBBlock(s)."
-) SBBlock;
-class SBBlock
-{
-public:
-
-    SBBlock ();
-
-    SBBlock (const lldb::SBBlock &rhs);
-
-    ~SBBlock ();
-
-    %feature("docstring",
-    "Does this block represent an inlined function?"
-    ) IsInlined;
-    bool
-    IsInlined () const;
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    %feature("docstring", "
-    Get the function name if this block represents an inlined function;
-    otherwise, return None.") GetInlinedName;
-    const char *
-    GetInlinedName () const;
-
-    %feature("docstring", "
-    Get the call site file if this block represents an inlined function;
-    otherwise, return an invalid file spec.") GetInlinedCallSiteFile;
-    lldb::SBFileSpec
-    GetInlinedCallSiteFile () const;
-
-    %feature("docstring", "
-    Get the call site line if this block represents an inlined function;
-    otherwise, return 0.") GetInlinedCallSiteLine;
-    uint32_t
-    GetInlinedCallSiteLine () const;
-
-    %feature("docstring", "
-    Get the call site column if this block represents an inlined function;
-    otherwise, return 0.") GetInlinedCallSiteColumn;
-    uint32_t
-    GetInlinedCallSiteColumn () const;
-
-    %feature("docstring", "Get the parent block.") GetParent;
-    lldb::SBBlock
-    GetParent ();
-
-    %feature("docstring", "Get the inlined block that is or contains this block.") GetContainingInlinedBlock;
-    lldb::SBBlock
-    GetContainingInlinedBlock ();
-
-    %feature("docstring", "Get the sibling block for this block.") GetSibling;
-    lldb::SBBlock
-    GetSibling ();
-
-    %feature("docstring", "Get the first child block.") GetFirstChild;
-    lldb::SBBlock
-    GetFirstChild ();
-
-    uint32_t
-    GetNumRanges ();
-
-    lldb::SBAddress
-    GetRangeStartAddress (uint32_t idx);
-
-    lldb::SBAddress
-    GetRangeEndAddress (uint32_t idx);
-
-    uint32_t
-    GetRangeIndexForBlockAddress (lldb::SBAddress block_addr);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    lldb::SBValueList
-    GetVariables (lldb::SBFrame& frame,
-                  bool arguments,
-                  bool locals,
-                  bool statics,
-                  lldb::DynamicValueType use_dynamic);
-
-     lldb::SBValueList
-     GetVariables (lldb::SBTarget& target,
-                   bool arguments,
-                   bool locals,
-                   bool statics);
-
-    %pythoncode %{
-        def get_range_at_index(self, idx):
-            if idx < self.GetNumRanges():
-                return [self.GetRangeStartAddress(idx), self.GetRangeEndAddress(idx)]
-            return []
-
-        class ranges_access(object):
-            '''A helper object that will lazily hand out an array of lldb.SBAddress that represent address ranges for a block.'''
-            def __init__(self, sbblock):
-                self.sbblock = sbblock
-
-            def __len__(self):
-                if self.sbblock:
-                    return int(self.sbblock.GetNumRanges())
-                return 0
-
-            def __getitem__(self, key):
-                count = len(self)
-                if type(key) is int:
-                    return self.sbblock.get_range_at_index (key);
-                if isinstance(key, SBAddress):
-                    range_idx = self.sbblock.GetRangeIndexForBlockAddress(key);
-                    if range_idx < len(self):
-                        return [self.sbblock.GetRangeStartAddress(range_idx), self.sbblock.GetRangeEndAddress(range_idx)]
-                else:
-                    print("error: unsupported item type: %s" % type(key))
-                return None
-
-        def get_ranges_access_object(self):
-            '''An accessor function that returns a ranges_access() object which allows lazy block address ranges access.'''
-            return self.ranges_access (self)
-
-        def get_ranges_array(self):
-            '''An accessor function that returns an array object that contains all ranges in this block object.'''
-            if not hasattr(self, 'ranges_array'):
-                self.ranges_array = []
-                for idx in range(self.num_ranges):
-                    self.ranges_array.append ([self.GetRangeStartAddress(idx), self.GetRangeEndAddress(idx)])
-            return self.ranges_array
-
-        def get_call_site(self):
-            return declaration(self.GetInlinedCallSiteFile(), self.GetInlinedCallSiteLine(), self.GetInlinedCallSiteColumn())
-
-        parent = property(GetParent, None, doc='''A read only property that returns the same result as GetParent().''')
-        first_child = property(GetFirstChild, None, doc='''A read only property that returns the same result as GetFirstChild().''')
-        call_site = property(get_call_site, None, doc='''A read only property that returns a lldb.declaration object that contains the inlined call site file, line and column.''')
-        sibling = property(GetSibling, None, doc='''A read only property that returns the same result as GetSibling().''')
-        name = property(GetInlinedName, None, doc='''A read only property that returns the same result as GetInlinedName().''')
-        inlined_block = property(GetContainingInlinedBlock, None, doc='''A read only property that returns the same result as GetContainingInlinedBlock().''')
-        range = property(get_ranges_access_object, None, doc='''A read only property that allows item access to the address ranges for a block by integer (range = block.range[0]) and by lldb.SBAdddress (find the range that contains the specified lldb.SBAddress like "pc_range = lldb.frame.block.range[frame.addr]").''')
-        ranges = property(get_ranges_array, None, doc='''A read only property that returns a list() object that contains all of the address ranges for the block.''')
-        num_ranges = property(GetNumRanges, None, doc='''A read only property that returns the same result as GetNumRanges().''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBBreakpoint.i b/src/llvm-project/lldb/scripts/interface/SBBreakpoint.i
deleted file mode 100644
index 8aabb2b..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBBreakpoint.i
+++ /dev/null
@@ -1,328 +0,0 @@
-//===-- SWIG Interface for SBBreakpoint -------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-namespace lldb {
-
-%feature("docstring",
-"Represents a logical breakpoint and its associated settings.
-
-For example (from test/functionalities/breakpoint/breakpoint_ignore_count/
-TestBreakpointIgnoreCount.py),
-
-    def breakpoint_ignore_count_python(self):
-        '''Use Python APIs to set breakpoint ignore count.'''
-        exe = os.path.join(os.getcwd(), 'a.out')
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-        self.assertTrue(breakpoint and
-                        breakpoint.GetNumLocations() == 1,
-                        VALID_BREAKPOINT)
-
-        # Get the breakpoint location from breakpoint after we verified that,
-        # indeed, it has one location.
-        location = breakpoint.GetLocationAtIndex(0)
-        self.assertTrue(location and
-                        location.IsEnabled(),
-                        VALID_BREAKPOINT_LOCATION)
-
-        # Set the ignore count on the breakpoint location.
-        location.SetIgnoreCount(2)
-        self.assertTrue(location.GetIgnoreCount() == 2,
-                        'SetIgnoreCount() works correctly')
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(None, None, os.getcwd())
-        self.assertTrue(process, PROCESS_IS_VALID)
-
-        # Frame#0 should be on main.c:37, frame#1 should be on main.c:25, and
-        # frame#2 should be on main.c:48.
-        #lldbutil.print_stacktraces(process)
-        from lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        self.assertTrue(thread != None, 'There should be a thread stopped due to breakpoint')
-        frame0 = thread.GetFrameAtIndex(0)
-        frame1 = thread.GetFrameAtIndex(1)
-        frame2 = thread.GetFrameAtIndex(2)
-        self.assertTrue(frame0.GetLineEntry().GetLine() == self.line1 and
-                        frame1.GetLineEntry().GetLine() == self.line3 and
-                        frame2.GetLineEntry().GetLine() == self.line4,
-                        STOPPED_DUE_TO_BREAKPOINT_IGNORE_COUNT)
-
-        # The hit count for the breakpoint should be 3.
-        self.assertTrue(breakpoint.GetHitCount() == 3)
-
-        process.Continue()
-
-SBBreakpoint supports breakpoint location iteration, for example,
-
-    for bl in breakpoint:
-        print('breakpoint location load addr: %s' % hex(bl.GetLoadAddress()))
-        print('breakpoint location condition: %s' % hex(bl.GetCondition()))
-
-and rich comparison methods which allow the API program to use,
-
-    if aBreakpoint == bBreakpoint:
-        ...
-
-to compare two breakpoints for equality."
-) SBBreakpoint;
-class SBBreakpoint
-{
-public:
-
-    SBBreakpoint ();
-
-    SBBreakpoint (const lldb::SBBreakpoint& rhs);
-
-    ~SBBreakpoint();
-
-    bool operator==(const lldb::SBBreakpoint &rhs);
-
-    bool operator!=(const lldb::SBBreakpoint &rhs);
-
-    break_id_t
-    GetID () const;
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    void
-    ClearAllBreakpointSites ();
-
-    lldb::SBBreakpointLocation
-    FindLocationByAddress (lldb::addr_t vm_addr);
-
-    lldb::break_id_t
-    FindLocationIDByAddress (lldb::addr_t vm_addr);
-
-    lldb::SBBreakpointLocation
-    FindLocationByID (lldb::break_id_t bp_loc_id);
-
-    lldb::SBBreakpointLocation
-    GetLocationAtIndex (uint32_t index);
-
-    void
-    SetEnabled (bool enable);
-
-    bool
-    IsEnabled ();
-
-    void
-    SetOneShot (bool one_shot);
-
-    bool
-    IsOneShot ();
-
-    bool
-    IsInternal ();
-
-    uint32_t
-    GetHitCount () const;
-
-    void
-    SetIgnoreCount (uint32_t count);
-
-    uint32_t
-    GetIgnoreCount () const;
-
-    %feature("docstring", "
-    The breakpoint stops only if the condition expression evaluates to true.") SetCondition;
-    void
-    SetCondition (const char *condition);
-
-    %feature("docstring", "
-    Get the condition expression for the breakpoint.") GetCondition;
-    const char *
-    GetCondition ();
-
-    void SetAutoContinue(bool auto_continue);
-
-    bool GetAutoContinue();
-
-    void
-    SetThreadID (lldb::tid_t sb_thread_id);
-
-    lldb::tid_t
-    GetThreadID ();
-
-    void
-    SetThreadIndex (uint32_t index);
-
-    uint32_t
-    GetThreadIndex() const;
-
-    void
-    SetThreadName (const char *thread_name);
-
-    const char *
-    GetThreadName () const;
-
-    void
-    SetQueueName (const char *queue_name);
-
-    const char *
-    GetQueueName () const;
-
-    %feature("docstring", "
-    Set the name of the script function to be called when the breakpoint is hit.") SetScriptCallbackFunction;
-    void
-    SetScriptCallbackFunction (const char *callback_function_name);
-
-    %feature("docstring", "
-    Provide the body for the script function to be called when the breakpoint is hit.
-    The body will be wrapped in a function, which be passed two arguments:
-    'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint
-    'bpno'  - which is the SBBreakpointLocation to which the callback was attached.
-
-    The error parameter is currently ignored, but will at some point hold the Python
-    compilation diagnostics.
-    Returns true if the body compiles successfully, false if not.") SetScriptCallbackBody;
-    SBError
-    SetScriptCallbackBody (const char *script_body_text);
-
-    void SetCommandLineCommands(SBStringList &commands);
-
-    bool GetCommandLineCommands(SBStringList &commands);
-
-    bool
-    AddName (const char *new_name);
-
-    void
-    RemoveName (const char *name_to_remove);
-
-    bool
-    MatchesName (const char *name);
-
-    void
-    GetNames (SBStringList &names);
-
-    size_t
-    GetNumResolvedLocations() const;
-
-    size_t
-    GetNumLocations() const;
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    bool
-    GetDescription(lldb::SBStream &description, bool include_locations);
-
-    // Can only be called from a ScriptedBreakpointResolver...
-    SBError
-    AddLocation(SBAddress &address);
-
-    bool
-    operator == (const lldb::SBBreakpoint& rhs);
-
-    bool
-    operator != (const lldb::SBBreakpoint& rhs);
-
-    static bool
-    EventIsBreakpointEvent (const lldb::SBEvent &event);
-
-    static lldb::BreakpointEventType
-    GetBreakpointEventTypeFromEvent (const lldb::SBEvent& event);
-
-    static lldb::SBBreakpoint
-    GetBreakpointFromEvent (const lldb::SBEvent& event);
-
-    static lldb::SBBreakpointLocation
-    GetBreakpointLocationAtIndexFromEvent (const lldb::SBEvent& event, uint32_t loc_idx);
-
-    static uint32_t
-    GetNumBreakpointLocationsFromEvent (const lldb::SBEvent &event_sp);
-
-    bool
-    IsHardware ();
-
-    %pythoncode %{
-
-        class locations_access(object):
-            '''A helper object that will lazily hand out locations for a breakpoint when supplied an index.'''
-            def __init__(self, sbbreakpoint):
-                self.sbbreakpoint = sbbreakpoint
-
-            def __len__(self):
-                if self.sbbreakpoint:
-                    return int(self.sbbreakpoint.GetNumLocations())
-                return 0
-
-            def __getitem__(self, key):
-                if type(key) is int and key < len(self):
-                    return self.sbbreakpoint.GetLocationAtIndex(key)
-                return None
-
-        def get_locations_access_object(self):
-            '''An accessor function that returns a locations_access() object which allows lazy location access from a lldb.SBBreakpoint object.'''
-            return self.locations_access (self)
-
-        def get_breakpoint_location_list(self):
-            '''An accessor function that returns a list() that contains all locations in a lldb.SBBreakpoint object.'''
-            locations = []
-            accessor = self.get_locations_access_object()
-            for idx in range(len(accessor)):
-                locations.append(accessor[idx])
-            return locations
-
-        def __iter__(self):
-            '''Iterate over all breakpoint locations in a lldb.SBBreakpoint
-            object.'''
-            return lldb_iter(self, 'GetNumLocations', 'GetLocationAtIndex')
-
-        def __len__(self):
-            '''Return the number of breakpoint locations in a lldb.SBBreakpoint
-            object.'''
-            return self.GetNumLocations()
-
-        locations = property(get_breakpoint_location_list, None, doc='''A read only property that returns a list() of lldb.SBBreakpointLocation objects for this breakpoint.''')
-        location = property(get_locations_access_object, None, doc='''A read only property that returns an object that can access locations by index (not location ID) (location = bkpt.location[12]).''')
-        id = property(GetID, None, doc='''A read only property that returns the ID of this breakpoint.''')
-        enabled = property(IsEnabled, SetEnabled, doc='''A read/write property that configures whether this breakpoint is enabled or not.''')
-        one_shot = property(IsOneShot, SetOneShot, doc='''A read/write property that configures whether this breakpoint is one-shot (deleted when hit) or not.''')
-        num_locations = property(GetNumLocations, None, doc='''A read only property that returns the count of locations of this breakpoint.''')
-    %}
-
-
-};
-
-class SBBreakpointListImpl;
-
-class LLDB_API SBBreakpointList
-{
-public:
-  SBBreakpointList(SBTarget &target);
-
-  ~SBBreakpointList();
-
-  size_t GetSize() const;
-
-  SBBreakpoint
-  GetBreakpointAtIndex(size_t idx);
-
-  SBBreakpoint
-  FindBreakpointByID(lldb::break_id_t);
-
-  void Append(const SBBreakpoint &sb_bkpt);
-
-  bool AppendIfUnique(const SBBreakpoint &sb_bkpt);
-
-  void AppendByID (lldb::break_id_t id);
-
-  void Clear();
-private:
-  std::shared_ptr<SBBreakpointListImpl> m_opaque_sp;
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBBreakpointLocation.i b/src/llvm-project/lldb/scripts/interface/SBBreakpointLocation.i
deleted file mode 100644
index 90a2323..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBBreakpointLocation.i
+++ /dev/null
@@ -1,130 +0,0 @@
-//===-- SWIG Interface for SBBreakpointLocation -----------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents one unique instance (by address) of a logical breakpoint.
-
-A breakpoint location is defined by the breakpoint that produces it,
-and the address that resulted in this particular instantiation.
-Each breakpoint location has its settable options.
-
-SBBreakpoint contains SBBreakpointLocation(s). See docstring of SBBreakpoint
-for retrieval of an SBBreakpointLocation from an SBBreakpoint."
-) SBBreakpointLocation;
-class SBBreakpointLocation
-{
-public:
-
-    SBBreakpointLocation ();
-
-    SBBreakpointLocation (const lldb::SBBreakpointLocation &rhs);
-
-    ~SBBreakpointLocation ();
-
-    break_id_t
-    GetID ();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    lldb::SBAddress
-    GetAddress();
-
-    lldb::addr_t
-    GetLoadAddress ();
-
-    void
-    SetEnabled(bool enabled);
-
-    bool
-    IsEnabled ();
-
-    uint32_t
-    GetHitCount ();
-
-    uint32_t
-    GetIgnoreCount ();
-
-    void
-    SetIgnoreCount (uint32_t n);
-
-    %feature("docstring", "
-    The breakpoint location stops only if the condition expression evaluates
-    to true.") SetCondition;
-    void
-    SetCondition (const char *condition);
-
-    %feature("docstring", "
-    Get the condition expression for the breakpoint location.") GetCondition;
-    const char *
-    GetCondition ();
-
-    bool GetAutoContinue();
-
-    void SetAutoContinue(bool auto_continue);
-
-    %feature("docstring", "
-    Set the callback to the given Python function name.") SetScriptCallbackFunction;
-    void
-    SetScriptCallbackFunction (const char *callback_function_name);
-
-    %feature("docstring", "
-    Provide the body for the script function to be called when the breakpoint location is hit.
-    The body will be wrapped in a function, which be passed two arguments:
-    'frame' - which holds the bottom-most SBFrame of the thread that hit the breakpoint
-    'bpno'  - which is the SBBreakpointLocation to which the callback was attached.
-
-    The error parameter is currently ignored, but will at some point hold the Python
-    compilation diagnostics.
-    Returns true if the body compiles successfully, false if not.") SetScriptCallbackBody;
-    SBError
-    SetScriptCallbackBody (const char *script_body_text);
-
-    void SetCommandLineCommands(SBStringList &commands);
-
-    bool GetCommandLineCommands(SBStringList &commands);
-
-    void
-    SetThreadID (lldb::tid_t sb_thread_id);
-
-    lldb::tid_t
-    GetThreadID ();
-
-    void
-    SetThreadIndex (uint32_t index);
-
-    uint32_t
-    GetThreadIndex() const;
-
-    void
-    SetThreadName (const char *thread_name);
-
-    const char *
-    GetThreadName () const;
-
-    void
-    SetQueueName (const char *queue_name);
-
-    const char *
-    GetQueueName () const;
-
-    bool
-    IsResolved ();
-
-    bool
-    GetDescription (lldb::SBStream &description, DescriptionLevel level);
-
-    SBBreakpoint
-    GetBreakpoint ();
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBBreakpointName.i b/src/llvm-project/lldb/scripts/interface/SBBreakpointName.i
deleted file mode 100644
index f9feaa9..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBBreakpointName.i
+++ /dev/null
@@ -1,112 +0,0 @@
-//===-- SWIG interface for SBBreakpointName.h -------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-%feature("docstring",
-"Represents a breakpoint name registered in a given SBTarget.
-
-Breakpoint names provide a way to act on groups of breakpoints.  When you add a
-name to a group of breakpoints, you can then use the name in all the command
-line lldb commands for that name.  You can also configure the SBBreakpointName
-options and those options will be propagated to any SBBreakpoints currently
-using that name.  Adding a name to a breakpoint will also apply any of the
-set options to that breakpoint.
-
-You can also set permissions on a breakpoint name to disable listing, deleting
-and disabling breakpoints.  That will disallow the given operation for breakpoints
-except when the breakpoint is mentioned by ID.  So for instance deleting all the
-breakpoints won't delete breakpoints so marked."
-) SBBreakpointName;
-class LLDB_API SBBreakpointName {
-public:
-  SBBreakpointName();
-
-  SBBreakpointName(SBTarget &target, const char *name);
-
-  SBBreakpointName(SBBreakpoint &bkpt, const char *name);
-
-  SBBreakpointName(const lldb::SBBreakpointName &rhs);
-
-  ~SBBreakpointName();
-
-  const lldb::SBBreakpointName &operator=(const lldb::SBBreakpointName &rhs);
-
-  // Tests to see if the opaque breakpoint object in this object matches the
-  // opaque breakpoint object in "rhs".
-  bool operator==(const lldb::SBBreakpointName &rhs);
-
-  bool operator!=(const lldb::SBBreakpointName &rhs);
-
-  explicit operator bool() const;
-
-  bool IsValid() const;
-
-  const char *GetName() const;
-
-  void SetEnabled(bool enable);
-
-  bool IsEnabled();
-
-  void SetOneShot(bool one_shot);
-
-  bool IsOneShot() const;
-
-  void SetIgnoreCount(uint32_t count);
-
-  uint32_t GetIgnoreCount() const;
-
-  void SetCondition(const char *condition);
-
-  const char *GetCondition();
-
-  void SetAutoContinue(bool auto_continue);
-
-  bool GetAutoContinue();
-
-  void SetThreadID(lldb::tid_t sb_thread_id);
-
-  lldb::tid_t GetThreadID();
-
-  void SetThreadIndex(uint32_t index);
-
-  uint32_t GetThreadIndex() const;
-
-  void SetThreadName(const char *thread_name);
-
-  const char *GetThreadName() const;
-
-  void SetQueueName(const char *queue_name);
-
-  const char *GetQueueName() const;
-
-  void SetScriptCallbackFunction(const char *callback_function_name);
-
-  void SetCommandLineCommands(SBStringList &commands);
-
-  bool GetCommandLineCommands(SBStringList &commands);
-
-  SBError SetScriptCallbackBody(const char *script_body_text);
-
-  const char *GetHelpString() const;
-  void SetHelpString(const char *help_string);
-
-  bool GetAllowList() const;
-  void SetAllowList(bool value);
-
-  bool GetAllowDelete();
-  void SetAllowDelete(bool value);
-
-  bool GetAllowDisable();
-  void SetAllowDisable(bool value);
-
-  bool GetDescription(lldb::SBStream &description);
-
-};
-
-} // namespace lldb
-
diff --git a/src/llvm-project/lldb/scripts/interface/SBCommandReturnObject.i b/src/llvm-project/lldb/scripts/interface/SBCommandReturnObject.i
deleted file mode 100644
index 1e04a8f..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBCommandReturnObject.i
+++ /dev/null
@@ -1,114 +0,0 @@
-//===-- SWIG Interface for SBCommandReturnObject ----------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a container which holds the result from command execution.
-It works with SBCommandInterpreter.HandleCommand() to encapsulate the result
-of command execution.
-
-See SBCommandInterpreter for example usage of SBCommandReturnObject."
-) SBCommandReturnObject;
-class SBCommandReturnObject
-{
-public:
-
-    SBCommandReturnObject ();
-
-    SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs);
-
-    ~SBCommandReturnObject ();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    const char *
-    GetOutput ();
-
-    const char *
-    GetError ();
-
-    size_t
-    GetOutputSize ();
-
-    size_t
-    GetErrorSize ();
-
-    const char *
-    GetOutput (bool only_if_no_immediate);
-
-    const char *
-    GetError (bool if_no_immediate);
-
-    size_t
-    PutOutput (FILE *fh);
-
-    size_t
-    PutError (FILE *fh);
-
-    void
-    Clear();
-
-    void
-    SetStatus (lldb::ReturnStatus status);
-
-    void
-    SetError (lldb::SBError &error,
-              const char *fallback_error_cstr = NULL);
-
-    void
-    SetError (const char *error_cstr);
-
-    lldb::ReturnStatus
-    GetStatus();
-
-    bool
-    Succeeded ();
-
-    bool
-    HasResult ();
-
-    void
-    AppendMessage (const char *message);
-
-    void
-    AppendWarning (const char *message);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-
-    // wrapping here so that lldb takes ownership of the
-    // new FILE* created inside of the swig interface
-    %extend {
-        void SetImmediateOutputFile(FILE *fh) {
-            self->SetImmediateOutputFile(fh, true);
-        }
-        void SetImmediateErrorFile(FILE *fh) {
-            self->SetImmediateErrorFile(fh, true);
-        }
-    }
-
-	void
-	PutCString(const char* string, int len);
-
-    // wrapping the variadic Printf() with a plain Print()
-    // because it is hard to support varargs in SWIG bridgings
-    %extend {
-        void Print (const char* str)
-        {
-            self->Printf("%s", str);
-        }
-    }
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBCompileUnit.i b/src/llvm-project/lldb/scripts/interface/SBCompileUnit.i
deleted file mode 100644
index f5f4e5a..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBCompileUnit.i
+++ /dev/null
@@ -1,134 +0,0 @@
-//===-- SWIG Interface for SBCompileUnit ------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a compilation unit, or compiled source file.
-
-SBCompileUnit supports line entry iteration. For example,
-
-    # Now get the SBSymbolContext from this frame.  We want everything. :-)
-    context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
-    ...
-
-    compileUnit = context.GetCompileUnit()
-
-    for lineEntry in compileUnit:
-        print('line entry: %s:%d' % (str(lineEntry.GetFileSpec()),
-                                    lineEntry.GetLine()))
-        print('start addr: %s' % str(lineEntry.GetStartAddress()))
-        print('end   addr: %s' % str(lineEntry.GetEndAddress()))
-
-produces:
-
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
-start addr: a.out[0x100000d98]
-end   addr: a.out[0x100000da3]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
-start addr: a.out[0x100000da3]
-end   addr: a.out[0x100000da9]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
-start addr: a.out[0x100000da9]
-end   addr: a.out[0x100000db6]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
-start addr: a.out[0x100000db6]
-end   addr: a.out[0x100000dbc]
-...
-
-See also SBSymbolContext and SBLineEntry"
-) SBCompileUnit;
-class SBCompileUnit
-{
-public:
-
-    SBCompileUnit ();
-
-    SBCompileUnit (const lldb::SBCompileUnit &rhs);
-
-    ~SBCompileUnit ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    lldb::SBFileSpec
-    GetFileSpec () const;
-
-    uint32_t
-    GetNumLineEntries () const;
-
-    lldb::SBLineEntry
-    GetLineEntryAtIndex (uint32_t idx) const;
-
-    uint32_t
-    FindLineEntryIndex (uint32_t start_idx,
-                        uint32_t line,
-                        lldb::SBFileSpec *inline_file_spec) const;
-
-    uint32_t
-    FindLineEntryIndex (uint32_t start_idx,
-                        uint32_t line,
-                        lldb::SBFileSpec *inline_file_spec,
-			bool exact) const;
-
-    SBFileSpec
-    GetSupportFileAtIndex (uint32_t idx) const;
-
-    uint32_t
-    GetNumSupportFiles () const;
-
-    uint32_t
-    FindSupportFileIndex (uint32_t start_idx, const SBFileSpec &sb_file, bool full);
-
-    %feature("docstring", "
-     Get all types matching type_mask from debug info in this
-     compile unit.
-
-     @param[in] type_mask
-        A bitfield that consists of one or more bits logically OR'ed
-        together from the lldb::TypeClass enumeration. This allows
-        you to request only structure types, or only class, struct
-        and union types. Passing in lldb::eTypeClassAny will return
-        all types found in the debug information for this compile
-        unit.
-
-     @return
-        A list of types in this compile unit that match type_mask") GetTypes;
-    lldb::SBTypeList
-    GetTypes (uint32_t type_mask = lldb::eTypeClassAny);
-
-     lldb::LanguageType
-     GetLanguage ();
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    bool
-    operator == (const lldb::SBCompileUnit &rhs) const;
-
-    bool
-    operator != (const lldb::SBCompileUnit &rhs) const;
-
-    %pythoncode %{
-        def __iter__(self):
-            '''Iterate over all line entries in a lldb.SBCompileUnit object.'''
-            return lldb_iter(self, 'GetNumLineEntries', 'GetLineEntryAtIndex')
-
-        def __len__(self):
-            '''Return the number of line entries in a lldb.SBCompileUnit
-            object.'''
-            return self.GetNumLineEntries()
-
-        file = property(GetFileSpec, None, doc='''A read only property that returns the same result an lldb object that represents the source file (lldb.SBFileSpec) for the compile unit.''')
-        num_line_entries = property(GetNumLineEntries, None, doc='''A read only property that returns the number of line entries in a compile unit as an integer.''')
-    %}
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBData.i b/src/llvm-project/lldb/scripts/interface/SBData.i
deleted file mode 100644
index 464a6e6..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBData.i
+++ /dev/null
@@ -1,293 +0,0 @@
-//===-- SWIG Interface for SBData -------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-
-namespace lldb {
-
-class SBData
-{
-public:
-
-    SBData ();
-
-    SBData (const SBData &rhs);
-
-    ~SBData ();
-
-    uint8_t
-    GetAddressByteSize ();
-
-    void
-    SetAddressByteSize (uint8_t addr_byte_size);
-
-    void
-    Clear ();
-
-    bool
-    IsValid();
-
-    explicit operator bool() const;
-
-    size_t
-    GetByteSize ();
-
-    lldb::ByteOrder
-    GetByteOrder();
-
-    void
-    SetByteOrder (lldb::ByteOrder endian);
-
-    float
-    GetFloat (lldb::SBError& error, lldb::offset_t offset);
-
-    double
-    GetDouble (lldb::SBError& error, lldb::offset_t offset);
-
-    long double
-    GetLongDouble (lldb::SBError& error, lldb::offset_t offset);
-
-    lldb::addr_t
-    GetAddress (lldb::SBError& error, lldb::offset_t offset);
-
-    uint8_t
-    GetUnsignedInt8 (lldb::SBError& error, lldb::offset_t offset);
-
-    uint16_t
-    GetUnsignedInt16 (lldb::SBError& error, lldb::offset_t offset);
-
-    uint32_t
-    GetUnsignedInt32 (lldb::SBError& error, lldb::offset_t offset);
-
-    uint64_t
-    GetUnsignedInt64 (lldb::SBError& error, lldb::offset_t offset);
-
-    int8_t
-    GetSignedInt8 (lldb::SBError& error, lldb::offset_t offset);
-
-    int16_t
-    GetSignedInt16 (lldb::SBError& error, lldb::offset_t offset);
-
-    int32_t
-    GetSignedInt32 (lldb::SBError& error, lldb::offset_t offset);
-
-    int64_t
-    GetSignedInt64 (lldb::SBError& error, lldb::offset_t offset);
-
-    const char*
-    GetString (lldb::SBError& error, lldb::offset_t offset);
-
-    bool
-    GetDescription (lldb::SBStream &description, lldb::addr_t base_addr);
-
-    size_t
-    ReadRawData (lldb::SBError& error,
-                 lldb::offset_t offset,
-                 void *buf,
-                 size_t size);
-
-    void
-    SetData (lldb::SBError& error, const void *buf, size_t size, lldb::ByteOrder endian, uint8_t addr_size);
-
-    bool
-    Append (const SBData& rhs);
-
-    static lldb::SBData
-    CreateDataFromCString (lldb::ByteOrder endian, uint32_t addr_byte_size, const char* data);
-
-    // in the following CreateData*() and SetData*() prototypes, the two parameters array and array_len
-    // should not be renamed or rearranged, because doing so will break the SWIG typemap
-    static lldb::SBData
-    CreateDataFromUInt64Array (lldb::ByteOrder endian, uint32_t addr_byte_size, uint64_t* array, size_t array_len);
-
-    static lldb::SBData
-    CreateDataFromUInt32Array (lldb::ByteOrder endian, uint32_t addr_byte_size, uint32_t* array, size_t array_len);
-
-    static lldb::SBData
-    CreateDataFromSInt64Array (lldb::ByteOrder endian, uint32_t addr_byte_size, int64_t* array, size_t array_len);
-
-    static lldb::SBData
-    CreateDataFromSInt32Array (lldb::ByteOrder endian, uint32_t addr_byte_size, int32_t* array, size_t array_len);
-
-    static lldb::SBData
-    CreateDataFromDoubleArray (lldb::ByteOrder endian, uint32_t addr_byte_size, double* array, size_t array_len);
-
-    bool
-    SetDataFromCString (const char* data);
-
-    bool
-    SetDataFromUInt64Array (uint64_t* array, size_t array_len);
-
-    bool
-    SetDataFromUInt32Array (uint32_t* array, size_t array_len);
-
-    bool
-    SetDataFromSInt64Array (int64_t* array, size_t array_len);
-
-    bool
-    SetDataFromSInt32Array (int32_t* array, size_t array_len);
-
-    bool
-    SetDataFromDoubleArray (double* array, size_t array_len);
-
-    %pythoncode %{
-
-        class read_data_helper:
-            def __init__(self, sbdata, readerfunc, item_size):
-                self.sbdata = sbdata
-                self.readerfunc = readerfunc
-                self.item_size = item_size
-            def __getitem__(self,key):
-                if isinstance(key,slice):
-                    list = []
-                    for x in range(*key.indices(self.__len__())):
-                        list.append(self.__getitem__(x))
-                    return list
-                if not (isinstance(key,six.integer_types)):
-                    raise TypeError('must be int')
-                key = key * self.item_size # SBData uses byte-based indexes, but we want to use itemsize-based indexes here
-                error = SBError()
-                my_data = self.readerfunc(self.sbdata,error,key)
-                if error.Fail():
-                    raise IndexError(error.GetCString())
-                else:
-                    return my_data
-            def __len__(self):
-                return int(self.sbdata.GetByteSize()/self.item_size)
-            def all(self):
-                return self[0:len(self)]
-
-        @classmethod
-        def CreateDataFromInt (cls, value, size = None, target = None, ptr_size = None, endian = None):
-            import sys
-            lldbmodule = sys.modules[cls.__module__]
-            lldbdict = lldbmodule.__dict__
-            if 'target' in lldbdict:
-                lldbtarget = lldbdict['target']
-            else:
-                lldbtarget = None
-            if target == None and lldbtarget != None and lldbtarget.IsValid():
-                target = lldbtarget
-            if ptr_size == None:
-                if target and target.IsValid():
-                    ptr_size = target.addr_size
-                else:
-                    ptr_size = 8
-            if endian == None:
-                if target and target.IsValid():
-                    endian = target.byte_order
-                else:
-                    endian = lldbdict['eByteOrderLittle']
-            if size == None:
-                if value > 2147483647:
-                    size = 8
-                elif value < -2147483648:
-                    size = 8
-                elif value > 4294967295:
-                    size = 8
-                else:
-                    size = 4
-            if size == 4:
-                if value < 0:
-                    return SBData().CreateDataFromSInt32Array(endian, ptr_size, [value])
-                return SBData().CreateDataFromUInt32Array(endian, ptr_size, [value])
-            if size == 8:
-                if value < 0:
-                    return SBData().CreateDataFromSInt64Array(endian, ptr_size, [value])
-                return SBData().CreateDataFromUInt64Array(endian, ptr_size, [value])
-            return None
-
-        def _make_helper(self, sbdata, getfunc, itemsize):
-            return self.read_data_helper(sbdata, getfunc, itemsize)
-
-        def _make_helper_uint8(self):
-            return self._make_helper(self, SBData.GetUnsignedInt8, 1)
-
-        def _make_helper_uint16(self):
-            return self._make_helper(self, SBData.GetUnsignedInt16, 2)
-
-        def _make_helper_uint32(self):
-            return self._make_helper(self, SBData.GetUnsignedInt32, 4)
-
-        def _make_helper_uint64(self):
-            return self._make_helper(self, SBData.GetUnsignedInt64, 8)
-
-        def _make_helper_sint8(self):
-            return self._make_helper(self, SBData.GetSignedInt8, 1)
-
-        def _make_helper_sint16(self):
-            return self._make_helper(self, SBData.GetSignedInt16, 2)
-
-        def _make_helper_sint32(self):
-            return self._make_helper(self, SBData.GetSignedInt32, 4)
-
-        def _make_helper_sint64(self):
-            return self._make_helper(self, SBData.GetSignedInt64, 8)
-
-        def _make_helper_float(self):
-            return self._make_helper(self, SBData.GetFloat, 4)
-
-        def _make_helper_double(self):
-            return self._make_helper(self, SBData.GetDouble, 8)
-
-        def _read_all_uint8(self):
-            return self._make_helper_uint8().all()
-
-        def _read_all_uint16(self):
-            return self._make_helper_uint16().all()
-
-        def _read_all_uint32(self):
-            return self._make_helper_uint32().all()
-
-        def _read_all_uint64(self):
-            return self._make_helper_uint64().all()
-
-        def _read_all_sint8(self):
-            return self._make_helper_sint8().all()
-
-        def _read_all_sint16(self):
-            return self._make_helper_sint16().all()
-
-        def _read_all_sint32(self):
-            return self._make_helper_sint32().all()
-
-        def _read_all_sint64(self):
-            return self._make_helper_sint64().all()
-
-        def _read_all_float(self):
-            return self._make_helper_float().all()
-
-        def _read_all_double(self):
-            return self._make_helper_double().all()
-
-        uint8 = property(_make_helper_uint8, None, doc='''A read only property that returns an array-like object out of which you can read uint8 values.''')
-        uint16 = property(_make_helper_uint16, None, doc='''A read only property that returns an array-like object out of which you can read uint16 values.''')
-        uint32 = property(_make_helper_uint32, None, doc='''A read only property that returns an array-like object out of which you can read uint32 values.''')
-        uint64 = property(_make_helper_uint64, None, doc='''A read only property that returns an array-like object out of which you can read uint64 values.''')
-        sint8 = property(_make_helper_sint8, None, doc='''A read only property that returns an array-like object out of which you can read sint8 values.''')
-        sint16 = property(_make_helper_sint16, None, doc='''A read only property that returns an array-like object out of which you can read sint16 values.''')
-        sint32 = property(_make_helper_sint32, None, doc='''A read only property that returns an array-like object out of which you can read sint32 values.''')
-        sint64 = property(_make_helper_sint64, None, doc='''A read only property that returns an array-like object out of which you can read sint64 values.''')
-        float = property(_make_helper_float, None, doc='''A read only property that returns an array-like object out of which you can read float values.''')
-        double = property(_make_helper_double, None, doc='''A read only property that returns an array-like object out of which you can read double values.''')
-        uint8s = property(_read_all_uint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint8 values.''')
-        uint16s = property(_read_all_uint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint16 values.''')
-        uint32s = property(_read_all_uint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint32 values.''')
-        uint64s = property(_read_all_uint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as uint64 values.''')
-        sint8s = property(_read_all_sint8, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint8 values.''')
-        sint16s = property(_read_all_sint16, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint16 values.''')
-        sint32s = property(_read_all_sint32, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint32 values.''')
-        sint64s = property(_read_all_sint64, None, doc='''A read only property that returns an array with all the contents of this SBData represented as sint64 values.''')
-        floats = property(_read_all_float, None, doc='''A read only property that returns an array with all the contents of this SBData represented as float values.''')
-        doubles = property(_read_all_double, None, doc='''A read only property that returns an array with all the contents of this SBData represented as double values.''')
-        byte_order = property(GetByteOrder, SetByteOrder, doc='''A read/write property getting and setting the endianness of this SBData (data.byte_order = lldb.eByteOrderLittle).''')
-        size = property(GetByteSize, None, doc='''A read only property that returns the size the same result as GetByteSize().''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBDebugger.i b/src/llvm-project/lldb/scripts/interface/SBDebugger.i
deleted file mode 100644
index f3cee14..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBDebugger.i
+++ /dev/null
@@ -1,475 +0,0 @@
-//===-- SWIG Interface for SBDebugger ---------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"SBDebugger is the primordial object that creates SBTargets and provides
-access to them.  It also manages the overall debugging experiences.
-
-For example (from example/disasm.py),
-
-import lldb
-import os
-import sys
-
-def disassemble_instructions (insts):
-    for i in insts:
-        print i
-
-...
-
-# Create a new debugger instance
-debugger = lldb.SBDebugger.Create()
-
-# When we step or continue, don't return from the function until the process
-# stops. We do this by setting the async mode to false.
-debugger.SetAsync (False)
-
-# Create a target from a file and arch
-print('Creating a target for \'%s\'' % exe)
-
-target = debugger.CreateTargetWithFileAndArch (exe, lldb.LLDB_ARCH_DEFAULT)
-
-if target:
-    # If the target is valid set a breakpoint at main
-    main_bp = target.BreakpointCreateByName (fname, target.GetExecutable().GetFilename());
-
-    print main_bp
-
-    # Launch the process. Since we specified synchronous mode, we won't return
-    # from this function until we hit the breakpoint at main
-    process = target.LaunchSimple (None, None, os.getcwd())
-
-    # Make sure the launch went ok
-    if process:
-        # Print some simple process info
-        state = process.GetState ()
-        print process
-        if state == lldb.eStateStopped:
-            # Get the first thread
-            thread = process.GetThreadAtIndex (0)
-            if thread:
-                # Print some simple thread info
-                print thread
-                # Get the first frame
-                frame = thread.GetFrameAtIndex (0)
-                if frame:
-                    # Print some simple frame info
-                    print frame
-                    function = frame.GetFunction()
-                    # See if we have debug info (a function)
-                    if function:
-                        # We do have a function, print some info for the function
-                        print function
-                        # Now get all instructions for this function and print them
-                        insts = function.GetInstructions(target)
-                        disassemble_instructions (insts)
-                    else:
-                        # See if we have a symbol in the symbol table for where we stopped
-                        symbol = frame.GetSymbol();
-                        if symbol:
-                            # We do have a symbol, print some info for the symbol
-                            print symbol
-                            # Now get all instructions for this symbol and print them
-                            insts = symbol.GetInstructions(target)
-                            disassemble_instructions (insts)
-
-                    registerList = frame.GetRegisters()
-                    print('Frame registers (size of register set = %d):' % registerList.GetSize())
-                    for value in registerList:
-                        #print value
-                        print('%s (number of children = %d):' % (value.GetName(), value.GetNumChildren()))
-                        for child in value:
-                            print('Name: ', child.GetName(), ' Value: ', child.GetValue())
-
-            print('Hit the breakpoint at main, enter to continue and wait for program to exit or \'Ctrl-D\'/\'quit\' to terminate the program')
-            next = sys.stdin.readline()
-            if not next or next.rstrip('\n') == 'quit':
-                print('Terminating the inferior process...')
-                process.Kill()
-            else:
-                # Now continue to the program exit
-                process.Continue()
-                # When we return from the above function we will hopefully be at the
-                # program exit. Print out some process info
-                print process
-        elif state == lldb.eStateExited:
-            print('Didn\'t hit the breakpoint at main, program has exited...')
-        else:
-            print('Unexpected process state: %s, killing process...' % debugger.StateAsCString (state))
-            process.Kill()
-
-Sometimes you need to create an empty target that will get filled in later.  The most common use for this
-is to attach to a process by name or pid where you don't know the executable up front.  The most convenient way
-to do this is:
-
-target = debugger.CreateTarget('')
-error = lldb.SBError()
-process = target.AttachToProcessWithName(debugger.GetListener(), 'PROCESS_NAME', False, error)
-
-or the equivalent arguments for AttachToProcessWithID.") SBDebugger;
-class SBDebugger
-{
-public:
-
-    static void
-    Initialize();
-
-    static SBError
-    InitializeWithErrorHandling();
-
-    static void
-    Terminate();
-
-    static lldb::SBDebugger
-    Create();
-
-    static lldb::SBDebugger
-    Create(bool source_init_files);
-
-    static lldb::SBDebugger
-    Create(bool source_init_files, lldb::LogOutputCallback log_callback, void *baton);
-
-    static void
-    Destroy (lldb::SBDebugger &debugger);
-
-    static void
-    MemoryPressureDetected();
-
-    SBDebugger();
-
-    SBDebugger(const lldb::SBDebugger &rhs);
-
-    ~SBDebugger();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    void
-    Clear ();
-
-    void
-    SetAsync (bool b);
-
-    bool
-    GetAsync ();
-
-    void
-    SkipLLDBInitFiles (bool b);
-
-    void
-    SetInputFileHandle (FILE *f, bool transfer_ownership);
-
-    void
-    SetOutputFileHandle (FILE *f, bool transfer_ownership);
-
-    void
-    SetErrorFileHandle (FILE *f, bool transfer_ownership);
-
-    FILE *
-    GetInputFileHandle ();
-
-    FILE *
-    GetOutputFileHandle ();
-
-    FILE *
-    GetErrorFileHandle ();
-
-    lldb::SBCommandInterpreter
-    GetCommandInterpreter ();
-
-    void
-    HandleCommand (const char *command);
-
-    lldb::SBListener
-    GetListener ();
-
-    void
-    HandleProcessEvent (const lldb::SBProcess &process,
-                        const lldb::SBEvent &event,
-                        FILE *out,
-                        FILE *err);
-
-    lldb::SBTarget
-    CreateTarget (const char *filename,
-                  const char *target_triple,
-                  const char *platform_name,
-                  bool add_dependent_modules,
-                  lldb::SBError& sb_error);
-
-    lldb::SBTarget
-    CreateTargetWithFileAndTargetTriple (const char *filename,
-                                         const char *target_triple);
-
-    lldb::SBTarget
-    CreateTargetWithFileAndArch (const char *filename,
-                                 const char *archname);
-
-    lldb::SBTarget
-    CreateTarget (const char *filename);
-
-    %feature("docstring",
-    "The dummy target holds breakpoints and breakpoint names that will prime newly created targets."
-    ) GetDummyTarget;
-    lldb::SBTarget GetDummyTarget();
-
-    %feature("docstring",
-    "Return true if target is deleted from the target list of the debugger."
-    ) DeleteTarget;
-    bool
-    DeleteTarget (lldb::SBTarget &target);
-
-    lldb::SBTarget
-    GetTargetAtIndex (uint32_t idx);
-
-    uint32_t
-    GetIndexOfTarget (lldb::SBTarget target);
-
-    lldb::SBTarget
-    FindTargetWithProcessID (pid_t pid);
-
-    lldb::SBTarget
-    FindTargetWithFileAndArch (const char *filename,
-                               const char *arch);
-
-    uint32_t
-    GetNumTargets ();
-
-    lldb::SBTarget
-    GetSelectedTarget ();
-
-    void
-    SetSelectedTarget (lldb::SBTarget &target);
-
-    lldb::SBPlatform
-    GetSelectedPlatform();
-
-    void
-    SetSelectedPlatform(lldb::SBPlatform &platform);
-
-    %feature("docstring",
-    "Get the number of currently active platforms."
-    ) GetNumPlatforms;
-    uint32_t
-    GetNumPlatforms ();
-
-    %feature("docstring",
-    "Get one of the currently active platforms."
-    ) GetPlatformAtIndex;
-    lldb::SBPlatform
-    GetPlatformAtIndex (uint32_t idx);
-
-    %feature("docstring",
-    "Get the number of available platforms."
-    ) GetNumAvailablePlatforms;
-    uint32_t
-    GetNumAvailablePlatforms ();
-
-    %feature("docstring", "
-    Get the name and description of one of the available platforms.
-
-    @param idx Zero-based index of the platform for which info should be
-               retrieved, must be less than the value returned by
-               GetNumAvailablePlatforms().") GetAvailablePlatformInfoAtIndex;
-    lldb::SBStructuredData
-    GetAvailablePlatformInfoAtIndex (uint32_t idx);
-
-    lldb::SBSourceManager
-    GetSourceManager ();
-
-    // REMOVE: just for a quick fix, need to expose platforms through
-    // SBPlatform from this class.
-    lldb::SBError
-    SetCurrentPlatform (const char *platform_name);
-
-    bool
-    SetCurrentPlatformSDKRoot (const char *sysroot);
-
-    // FIXME: Once we get the set show stuff in place, the driver won't need
-    // an interface to the Set/Get UseExternalEditor.
-    bool
-    SetUseExternalEditor (bool input);
-
-    bool
-    GetUseExternalEditor ();
-
-    bool
-    SetUseColor (bool use_color);
-
-    bool
-    GetUseColor () const;
-
-    static bool
-    GetDefaultArchitecture (char *arch_name, size_t arch_name_len);
-
-    static bool
-    SetDefaultArchitecture (const char *arch_name);
-
-    lldb::ScriptLanguage
-    GetScriptingLanguage (const char *script_language_name);
-
-    static const char *
-    GetVersionString ();
-
-    static const char *
-    StateAsCString (lldb::StateType state);
-
-    static SBStructuredData GetBuildConfiguration();
-
-    static bool
-    StateIsRunningState (lldb::StateType state);
-
-    static bool
-    StateIsStoppedState (lldb::StateType state);
-
-    bool
-    EnableLog (const char *channel, const char ** types);
-
-    void
-    SetLoggingCallback (lldb::LogOutputCallback log_callback, void *baton);
-
-    void
-    DispatchInput (const void *data, size_t data_len);
-
-    void
-    DispatchInputInterrupt ();
-
-    void
-    DispatchInputEndOfFile ();
-
-    const char *
-    GetInstanceName  ();
-
-    static SBDebugger
-    FindDebuggerWithID (int id);
-
-    static lldb::SBError
-    SetInternalVariable (const char *var_name, const char *value, const char *debugger_instance_name);
-
-    static lldb::SBStringList
-    GetInternalVariableValue (const char *var_name, const char *debugger_instance_name);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    uint32_t
-    GetTerminalWidth () const;
-
-    void
-    SetTerminalWidth (uint32_t term_width);
-
-    lldb::user_id_t
-    GetID ();
-
-    const char *
-    GetPrompt() const;
-
-    void
-    SetPrompt (const char *prompt);
-
-    const char *
-    GetReproducerPath() const;
-
-    lldb::ScriptLanguage
-    GetScriptLanguage() const;
-
-    void
-    SetScriptLanguage (lldb::ScriptLanguage script_lang);
-
-    bool
-    GetCloseInputOnEOF () const;
-
-    void
-    SetCloseInputOnEOF (bool b);
-
-    lldb::SBTypeCategory
-    GetCategory (const char* category_name);
-
-    SBTypeCategory
-    GetCategory (lldb::LanguageType lang_type);
-
-    lldb::SBTypeCategory
-    CreateCategory (const char* category_name);
-
-    bool
-    DeleteCategory (const char* category_name);
-
-    uint32_t
-    GetNumCategories ();
-
-    lldb::SBTypeCategory
-    GetCategoryAtIndex (uint32_t);
-
-    lldb::SBTypeCategory
-    GetDefaultCategory();
-
-    lldb::SBTypeFormat
-    GetFormatForType (lldb::SBTypeNameSpecifier);
-
-    lldb::SBTypeSummary
-    GetSummaryForType (lldb::SBTypeNameSpecifier);
-
-    lldb::SBTypeFilter
-    GetFilterForType (lldb::SBTypeNameSpecifier);
-
-    lldb::SBTypeSynthetic
-    GetSyntheticForType (lldb::SBTypeNameSpecifier);
-
-    %feature("docstring",
-"Launch a command interpreter session. Commands are read from standard input or
-from the input handle specified for the debugger object. Output/errors are
-similarly redirected to standard output/error or the configured handles.
-
-@param[in] auto_handle_events If true, automatically handle resulting events.
-@param[in] spawn_thread If true, start a new thread for IO handling.
-@param[in] options Parameter collection of type SBCommandInterpreterRunOptions.
-@param[in] num_errors Initial error counter.
-@param[in] quit_requested Initial quit request flag.
-@param[in] stopped_for_crash Initial crash flag.
-
-@return
-A tuple with the number of errors encountered by the interpreter, a boolean
-indicating whether quitting the interpreter was requested and another boolean
-set to True in case of a crash.
-
-Example:
-
-# Start an interactive lldb session from a script (with a valid debugger object
-# created beforehand):
-n_errors, quit_requested, has_crashed = debugger.RunCommandInterpreter(True,
-    False, lldb.SBCommandInterpreterRunOptions(), 0, False, False)") RunCommandInterpreter;
-    %apply int& INOUT { int& num_errors };
-    %apply bool& INOUT { bool& quit_requested };
-    %apply bool& INOUT { bool& stopped_for_crash };
-    void
-    RunCommandInterpreter (bool auto_handle_events,
-                           bool spawn_thread,
-                           SBCommandInterpreterRunOptions &options,
-                           int  &num_errors,
-                           bool &quit_requested,
-                           bool &stopped_for_crash);
-
-    lldb::SBError
-    RunREPL (lldb::LanguageType language, const char *repl_options);
-
-    %pythoncode%{
-    def __iter__(self):
-        '''Iterate over all targets in a lldb.SBDebugger object.'''
-        return lldb_iter(self, 'GetNumTargets', 'GetTargetAtIndex')
-
-    def __len__(self):
-        '''Return the number of targets in a lldb.SBDebugger object.'''
-        return self.GetNumTargets()
-    %}
-
-}; // class SBDebugger
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBDeclaration.i b/src/llvm-project/lldb/scripts/interface/SBDeclaration.i
deleted file mode 100644
index 96407d7..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBDeclaration.i
+++ /dev/null
@@ -1,63 +0,0 @@
-//===-- SWIG Interface for SBDeclaration --------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-    %feature("docstring",
-    "Specifies an association with a line and column for a variable."
-    ) SBDeclaration;
-    class SBDeclaration
-    {
-        public:
-
-        SBDeclaration ();
-
-        SBDeclaration (const lldb::SBDeclaration &rhs);
-
-        ~SBDeclaration ();
-
-        bool
-        IsValid () const;
-
-        explicit operator bool() const;
-
-        lldb::SBFileSpec
-        GetFileSpec () const;
-
-        uint32_t
-        GetLine () const;
-
-        uint32_t
-        GetColumn () const;
-
-        bool
-        GetDescription (lldb::SBStream &description);
-
-        void
-        SetFileSpec (lldb::SBFileSpec filespec);
-
-        void
-        SetLine (uint32_t line);
-
-        void
-        SetColumn (uint32_t column);
-
-        bool
-        operator == (const lldb::SBDeclaration &rhs) const;
-
-        bool
-        operator != (const lldb::SBDeclaration &rhs) const;
-
-        %pythoncode %{
-            file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''')
-            line = property(GetLine, None, doc='''A read only property that returns the 1 based line number for this line entry, a return value of zero indicates that no line information is available.''')
-            column = property(GetColumn, None, doc='''A read only property that returns the 1 based column number for this line entry, a return value of zero indicates that no column information is available.''')
-        %}
-    };
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBError.i b/src/llvm-project/lldb/scripts/interface/SBError.i
deleted file mode 100644
index 42308ff..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBError.i
+++ /dev/null
@@ -1,118 +0,0 @@
-//===-- SWIG Interface for SBError ------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a container for holding any error code.
-
-For example (from test/python_api/hello_world/TestHelloWorld.py),
-
-    def hello_world_attach_with_id_api(self):
-        '''Create target, spawn a process, and attach to it by id.'''
-
-        target = self.dbg.CreateTarget(self.exe)
-
-        # Spawn a new process and don't display the stdout if not in TraceOn() mode.
-        import subprocess
-        popen = subprocess.Popen([self.exe, 'abc', 'xyz'],
-                                 stdout = open(os.devnull, 'w') if not self.TraceOn() else None)
-
-        listener = lldb.SBListener('my.attach.listener')
-        error = lldb.SBError()
-        process = target.AttachToProcessWithID(listener, popen.pid, error)
-
-        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
-
-        # Let's check the stack traces of the attached process.
-        import lldbutil
-        stacktraces = lldbutil.print_stacktraces(process, string_buffer=True)
-        self.expect(stacktraces, exe=False,
-            substrs = ['main.c:%d' % self.line2,
-                       '(int)argc=3'])
-
-        listener = lldb.SBListener('my.attach.listener')
-        error = lldb.SBError()
-        process = target.AttachToProcessWithID(listener, popen.pid, error)
-
-        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
-
-checks that after the attach, there is no error condition by asserting
-that error.Success() is True and we get back a valid process object.
-
-And (from test/python_api/event/TestEvent.py),
-
-        # Now launch the process, and do not stop at entry point.
-        error = lldb.SBError()
-        process = target.Launch(listener, None, None, None, None, None, None, 0, False, error)
-        self.assertTrue(error.Success() and process, PROCESS_IS_VALID)
-
-checks that after calling the target.Launch() method there's no error
-condition and we get back a void process object.") SBError;
-
-class SBError {
-public:
-    SBError ();
-
-    SBError (const lldb::SBError &rhs);
-
-    ~SBError();
-
-    const char *
-    GetCString () const;
-
-    void
-    Clear ();
-
-    bool
-    Fail () const;
-
-    bool
-    Success () const;
-
-    uint32_t
-    GetError () const;
-
-    lldb::ErrorType
-    GetType () const;
-
-    void
-    SetError (uint32_t err, lldb::ErrorType type);
-
-    void
-    SetErrorToErrno ();
-
-    void
-    SetErrorToGenericError ();
-
-    void
-    SetErrorString (const char *err_str);
-
-    %varargs(3, char *str = NULL) SetErrorStringWithFormat;
-    int
-    SetErrorStringWithFormat (const char *format, ...);
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    %pythoncode %{
-        value = property(GetError, None, doc='''A read only property that returns the same result as GetError().''')
-        fail = property(Fail, None, doc='''A read only property that returns the same result as Fail().''')
-        success = property(Success, None, doc='''A read only property that returns the same result as Success().''')
-        description = property(GetCString, None, doc='''A read only property that returns the same result as GetCString().''')
-        type = property(GetType, None, doc='''A read only property that returns the same result as GetType().''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBExecutionContext.i b/src/llvm-project/lldb/scripts/interface/SBExecutionContext.i
deleted file mode 100644
index 9e8d22b..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBExecutionContext.i
+++ /dev/null
@@ -1,49 +0,0 @@
-//===-- SWIG Interface for SBExecutionContext ---------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-class SBExecutionContext
-{
-public:
-    SBExecutionContext();
-
-    SBExecutionContext (const lldb::SBExecutionContext &rhs);
-
-    SBExecutionContext (const lldb::SBTarget &target);
-
-    SBExecutionContext (const lldb::SBProcess &process);
-
-    SBExecutionContext (lldb::SBThread thread); // can't be a const& because SBThread::get() isn't itself a const function
-
-    SBExecutionContext (const lldb::SBFrame &frame);
-
-    ~SBExecutionContext();
-
-    SBTarget
-    GetTarget () const;
-
-    SBProcess
-    GetProcess () const;
-
-    SBThread
-    GetThread () const;
-
-    SBFrame
-    GetFrame () const;
-
-    %pythoncode %{
-        target = property(GetTarget, None, doc='''A read only property that returns the same result as GetTarget().''')
-        process = property(GetProcess, None, doc='''A read only property that returns the same result as GetProcess().''')
-        thread = property(GetThread, None, doc='''A read only property that returns the same result as GetThread().''')
-        frame = property(GetFrame, None, doc='''A read only property that returns the same result as GetFrame().''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBFileSpec.i b/src/llvm-project/lldb/scripts/interface/SBFileSpec.i
deleted file mode 100644
index 98777c0..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBFileSpec.i
+++ /dev/null
@@ -1,103 +0,0 @@
-//===-- SWIG Interface for SBFileSpec ---------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a file specification that divides the path into a directory and
-basename.  The string values of the paths are put into uniqued string pools
-for fast comparisons and efficient memory usage.
-
-For example, the following code
-
-        lineEntry = context.GetLineEntry()
-        self.expect(lineEntry.GetFileSpec().GetDirectory(), 'The line entry should have the correct directory',
-                    exe=False,
-            substrs = [self.mydir])
-        self.expect(lineEntry.GetFileSpec().GetFilename(), 'The line entry should have the correct filename',
-                    exe=False,
-            substrs = ['main.c'])
-        self.assertTrue(lineEntry.GetLine() == self.line,
-                        'The line entry's line number should match ')
-
-gets the line entry from the symbol context when a thread is stopped.
-It gets the file spec corresponding to the line entry and checks that
-the filename and the directory matches what we expect.") SBFileSpec;
-class SBFileSpec
-{
-public:
-    SBFileSpec ();
-
-    SBFileSpec (const lldb::SBFileSpec &rhs);
-
-    SBFileSpec (const char *path);// Deprecated, use SBFileSpec (const char *path, bool resolve)
-
-    SBFileSpec (const char *path, bool resolve);
-
-    ~SBFileSpec ();
-
-    bool operator==(const SBFileSpec &rhs) const;
-
-    bool operator!=(const SBFileSpec &rhs) const;
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    bool
-    Exists () const;
-
-    bool
-    ResolveExecutableLocation ();
-
-    const char *
-    GetFilename() const;
-
-    const char *
-    GetDirectory() const;
-
-    void
-    SetFilename(const char *filename);
-
-    void
-    SetDirectory(const char *directory);
-
-    uint32_t
-    GetPath (char *dst_path, size_t dst_len) const;
-
-    static int
-    ResolvePath (const char *src_path, char *dst_path, size_t dst_len);
-
-    bool
-    GetDescription (lldb::SBStream &description) const;
-
-    void
-    AppendPathComponent (const char *file_or_directory);
-
-    %pythoncode %{
-        def __get_fullpath__(self):
-            spec_dir = self.GetDirectory()
-            spec_file = self.GetFilename()
-            if spec_dir and spec_file:
-                return '%s/%s' % (spec_dir, spec_file)
-            elif spec_dir:
-                return spec_dir
-            elif spec_file:
-                return spec_file
-            return None
-
-        fullpath = property(__get_fullpath__, None, doc='''A read only property that returns the fullpath as a python string.''')
-        basename = property(GetFilename, None, doc='''A read only property that returns the path basename as a python string.''')
-        dirname = property(GetDirectory, None, doc='''A read only property that returns the path directory name as a python string.''')
-        exists = property(Exists, None, doc='''A read only property that returns a boolean value that indicates if the file exists.''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBFrame.i b/src/llvm-project/lldb/scripts/interface/SBFrame.i
deleted file mode 100644
index f36d83c..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBFrame.i
+++ /dev/null
@@ -1,360 +0,0 @@
-//===-- SWIG Interface for SBFrame ------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents one of the stack frames associated with a thread.
-SBThread contains SBFrame(s). For example (from test/lldbutil.py),
-
-def print_stacktrace(thread, string_buffer = False):
-    '''Prints a simple stack trace of this thread.'''
-
-    ...
-
-    for i in range(depth):
-        frame = thread.GetFrameAtIndex(i)
-        function = frame.GetFunction()
-
-        load_addr = addrs[i].GetLoadAddress(target)
-        if not function:
-            file_addr = addrs[i].GetFileAddress()
-            start_addr = frame.GetSymbol().GetStartAddress().GetFileAddress()
-            symbol_offset = file_addr - start_addr
-            print >> output, '  frame #{num}: {addr:#016x} {mod}`{symbol} + {offset}'.format(
-                num=i, addr=load_addr, mod=mods[i], symbol=symbols[i], offset=symbol_offset)
-        else:
-            print >> output, '  frame #{num}: {addr:#016x} {mod}`{func} at {file}:{line} {args}'.format(
-                num=i, addr=load_addr, mod=mods[i],
-                func='%s [inlined]' % funcs[i] if frame.IsInlined() else funcs[i],
-                file=files[i], line=lines[i],
-                args=get_args_as_string(frame, showFuncName=False) if not frame.IsInlined() else '()')
-
-    ...
-
-And,
-
-    for frame in thread:
-        print frame
-
-See also SBThread."
-) SBFrame;
-class SBFrame
-{
-public:
-    SBFrame ();
-
-    SBFrame (const lldb::SBFrame &rhs);
-
-   ~SBFrame();
-
-    bool
-    IsEqual (const lldb::SBFrame &rhs) const;
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    uint32_t
-    GetFrameID () const;
-
-    %feature("docstring", "
-    Get the Canonical Frame Address for this stack frame.
-    This is the DWARF standard's definition of a CFA, a stack address
-    that remains constant throughout the lifetime of the function.
-    Returns an lldb::addr_t stack address, or LLDB_INVALID_ADDRESS if
-    the CFA cannot be determined.") GetCFA;
-    lldb::addr_t
-    GetCFA () const;
-
-    lldb::addr_t
-    GetPC () const;
-
-    bool
-    SetPC (lldb::addr_t new_pc);
-
-    lldb::addr_t
-    GetSP () const;
-
-    lldb::addr_t
-    GetFP () const;
-
-    lldb::SBAddress
-    GetPCAddress () const;
-
-    lldb::SBSymbolContext
-    GetSymbolContext (uint32_t resolve_scope) const;
-
-    lldb::SBModule
-    GetModule () const;
-
-    lldb::SBCompileUnit
-    GetCompileUnit () const;
-
-    lldb::SBFunction
-    GetFunction () const;
-
-    lldb::SBSymbol
-    GetSymbol () const;
-
-    %feature("docstring", "
-    Gets the deepest block that contains the frame PC.
-
-    See also GetFrameBlock().") GetBlock;
-    lldb::SBBlock
-    GetBlock () const;
-
-    %feature("docstring", "
-    Get the appropriate function name for this frame. Inlined functions in
-    LLDB are represented by Blocks that have inlined function information, so
-    just looking at the SBFunction or SBSymbol for a frame isn't enough.
-    This function will return the appropriate function, symbol or inlined
-    function name for the frame.
-
-    This function returns:
-    - the name of the inlined function (if there is one)
-    - the name of the concrete function (if there is one)
-    - the name of the symbol (if there is one)
-    - NULL
-
-    See also IsInlined().") GetFunctionName;
-    const char *
-    GetFunctionName();
-
-     const char *
-     GetDisplayFunctionName ();
-
-    const char *
-    GetFunctionName() const;
-
-    %feature("docstring", "
-    Returns the language of the frame's SBFunction, or if there.
-    is no SBFunction, guess the language from the mangled name.
-    .") GuessLanguage;
-    lldb::LanguageType
-    GuessLanguage() const;
-
-    %feature("docstring", "
-    Return true if this frame represents an inlined function.
-
-    See also GetFunctionName().") IsInlined;
-    bool
-    IsInlined();
-
-    bool
-    IsInlined() const;
-
-    %feature("docstring", "
-    Return true if this frame is artificial (e.g a frame synthesized to
-    capture a tail call). Local variables may not be available in an artificial
-    frame.") IsArtificial;
-    bool
-    IsArtificial();
-
-    bool
-    IsArtificial() const;
-
-    %feature("docstring", "
-    The version that doesn't supply a 'use_dynamic' value will use the
-    target's default.") EvaluateExpression;
-    lldb::SBValue
-    EvaluateExpression (const char *expr);
-
-    lldb::SBValue
-    EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic);
-
-    lldb::SBValue
-    EvaluateExpression (const char *expr, lldb::DynamicValueType use_dynamic, bool unwind_on_error);
-
-    lldb::SBValue
-    EvaluateExpression (const char *expr, SBExpressionOptions &options);
-
-    %feature("docstring", "
-    Gets the lexical block that defines the stack frame. Another way to think
-    of this is it will return the block that contains all of the variables
-    for a stack frame. Inlined functions are represented as SBBlock objects
-    that have inlined function information: the name of the inlined function,
-    where it was called from. The block that is returned will be the first
-    block at or above the block for the PC (SBFrame::GetBlock()) that defines
-    the scope of the frame. When a function contains no inlined functions,
-    this will be the top most lexical block that defines the function.
-    When a function has inlined functions and the PC is currently
-    in one of those inlined functions, this method will return the inlined
-    block that defines this frame. If the PC isn't currently in an inlined
-    function, the lexical block that defines the function is returned.") GetFrameBlock;
-    lldb::SBBlock
-    GetFrameBlock () const;
-
-    lldb::SBLineEntry
-    GetLineEntry () const;
-
-    lldb::SBThread
-    GetThread () const;
-
-    const char *
-    Disassemble () const;
-
-    void
-    Clear();
-
-    bool
-    operator == (const lldb::SBFrame &rhs) const;
-
-    bool
-    operator != (const lldb::SBFrame &rhs) const;
-
-    %feature("docstring", "
-    The version that doesn't supply a 'use_dynamic' value will use the
-    target's default.") GetVariables;
-    lldb::SBValueList
-    GetVariables (bool arguments,
-                  bool locals,
-                  bool statics,
-                  bool in_scope_only);
-
-    lldb::SBValueList
-    GetVariables (bool arguments,
-                  bool locals,
-                  bool statics,
-                  bool in_scope_only,
-                  lldb::DynamicValueType  use_dynamic);
-
-    lldb::SBValueList
-    GetVariables (const lldb::SBVariablesOptions& options);
-
-    lldb::SBValueList
-    GetRegisters ();
-
-    %feature("docstring", "
-    The version that doesn't supply a 'use_dynamic' value will use the
-    target's default.") FindVariable;
-    lldb::SBValue
-    FindVariable (const char *var_name);
-
-    lldb::SBValue
-    FindVariable (const char *var_name, lldb::DynamicValueType use_dynamic);
-
-    lldb::SBValue
-    FindRegister (const char *name);
-
-    %feature("docstring", "
-    Get a lldb.SBValue for a variable path.
-
-    Variable paths can include access to pointer or instance members:
-        rect_ptr->origin.y
-        pt.x
-    Pointer dereferences:
-        *this->foo_ptr
-        **argv
-    Address of:
-        &pt
-        &my_array[3].x
-    Array accesses and treating pointers as arrays:
-        int_array[1]
-        pt_ptr[22].x
-
-    Unlike EvaluateExpression() which returns lldb.SBValue objects
-    with constant copies of the values at the time of evaluation,
-    the result of this function is a value that will continue to
-    track the current value of the value as execution progresses
-    in the current frame.") GetValueForVariablePath;
-    lldb::SBValue
-    GetValueForVariablePath (const char *var_path);
-
-    lldb::SBValue
-    GetValueForVariablePath (const char *var_path, lldb::DynamicValueType use_dynamic);
-
-    %feature("docstring", "
-    Find variables, register sets, registers, or persistent variables using
-    the frame as the scope.
-
-    The version that doesn't supply a 'use_dynamic' value will use the
-    target's default.") FindValue;
-    lldb::SBValue
-    FindValue (const char *name, ValueType value_type);
-
-    lldb::SBValue
-    FindValue (const char *name, ValueType value_type, lldb::DynamicValueType use_dynamic);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    %pythoncode %{
-        def get_all_variables(self):
-            return self.GetVariables(True,True,True,True)
-
-        def get_parent_frame(self):
-            parent_idx = self.idx + 1
-            if parent_idx >= 0 and parent_idx < len(self.thread.frame):
-                return self.thread.frame[parent_idx]
-            else:
-                return SBFrame()
-
-        def get_arguments(self):
-            return self.GetVariables(True,False,False,False)
-
-        def get_locals(self):
-            return self.GetVariables(False,True,False,False)
-
-        def get_statics(self):
-            return self.GetVariables(False,False,True,False)
-
-        def var(self, var_expr_path):
-            '''Calls through to lldb.SBFrame.GetValueForVariablePath() and returns
-            a value that represents the variable expression path'''
-            return self.GetValueForVariablePath(var_expr_path)
-
-        def get_registers_access(self):
-            class registers_access(object):
-                '''A helper object that exposes a flattened view of registers, masking away the notion of register sets for easy scripting.'''
-                def __init__(self, regs):
-                    self.regs = regs
-
-                def __getitem__(self, key):
-                    if type(key) is str:
-                        for i in range(0,len(self.regs)):
-                            rs = self.regs[i]
-                            for j in range (0,rs.num_children):
-                                reg = rs.GetChildAtIndex(j)
-                                if reg.name == key: return reg
-                    else:
-                        return lldb.SBValue()
-
-            return registers_access(self.registers)
-
-        pc = property(GetPC, SetPC)
-        addr = property(GetPCAddress, None, doc='''A read only property that returns the program counter (PC) as a section offset address (lldb.SBAddress).''')
-        fp = property(GetFP, None, doc='''A read only property that returns the frame pointer (FP) as an unsigned integer.''')
-        sp = property(GetSP, None, doc='''A read only property that returns the stack pointer (SP) as an unsigned integer.''')
-        module = property(GetModule, None, doc='''A read only property that returns an lldb object that represents the module (lldb.SBModule) for this stack frame.''')
-        compile_unit = property(GetCompileUnit, None, doc='''A read only property that returns an lldb object that represents the compile unit (lldb.SBCompileUnit) for this stack frame.''')
-        function = property(GetFunction, None, doc='''A read only property that returns an lldb object that represents the function (lldb.SBFunction) for this stack frame.''')
-        symbol = property(GetSymbol, None, doc='''A read only property that returns an lldb object that represents the symbol (lldb.SBSymbol) for this stack frame.''')
-        block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the block (lldb.SBBlock) for this stack frame.''')
-        is_inlined = property(IsInlined, None, doc='''A read only property that returns an boolean that indicates if the block frame is an inlined function.''')
-        name = property(GetFunctionName, None, doc='''A read only property that retuns the name for the function that this frame represents. Inlined stack frame might have a concrete function that differs from the name of the inlined function (a named lldb.SBBlock).''')
-        line_entry = property(GetLineEntry, None, doc='''A read only property that returns an lldb object that represents the line table entry (lldb.SBLineEntry) for this stack frame.''')
-        thread = property(GetThread, None, doc='''A read only property that returns an lldb object that represents the thread (lldb.SBThread) for this stack frame.''')
-        disassembly = property(Disassemble, None, doc='''A read only property that returns the disassembly for this stack frame as a python string.''')
-        idx = property(GetFrameID, None, doc='''A read only property that returns the zero based stack frame index.''')
-        variables = property(get_all_variables, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the variables in this stack frame.''')
-        vars = property(get_all_variables, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the variables in this stack frame.''')
-        locals = property(get_locals, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the local variables in this stack frame.''')
-        args = property(get_arguments, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the argument variables in this stack frame.''')
-        arguments = property(get_arguments, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the argument variables in this stack frame.''')
-        statics = property(get_statics, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the static variables in this stack frame.''')
-        registers = property(GetRegisters, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the CPU registers for this stack frame.''')
-        regs = property(GetRegisters, None, doc='''A read only property that returns a list() that contains a collection of lldb.SBValue objects that represent the CPU registers for this stack frame.''')
-        register = property(get_registers_access, None, doc='''A read only property that returns an helper object providing a flattened indexable view of the CPU registers for this stack frame.''')
-        reg = property(get_registers_access, None, doc='''A read only property that returns an helper object providing a flattened indexable view of the CPU registers for this stack frame''')
-        parent = property(get_parent_frame, None, doc='''A read only property that returns the parent (caller) frame of the current frame.''')
-    %}
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBFunction.i b/src/llvm-project/lldb/scripts/interface/SBFunction.i
deleted file mode 100644
index 3acb005..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBFunction.i
+++ /dev/null
@@ -1,130 +0,0 @@
-//===-- SWIG Interface for SBFunction ---------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a generic function, which can be inlined or not.
-
-For example (from test/lldbutil.py, but slightly modified for doc purpose),
-
-        ...
-
-        frame = thread.GetFrameAtIndex(i)
-        addr = frame.GetPCAddress()
-        load_addr = addr.GetLoadAddress(target)
-        function = frame.GetFunction()
-        mod_name = frame.GetModule().GetFileSpec().GetFilename()
-
-        if not function:
-            # No debug info for 'function'.
-            symbol = frame.GetSymbol()
-            file_addr = addr.GetFileAddress()
-            start_addr = symbol.GetStartAddress().GetFileAddress()
-            symbol_name = symbol.GetName()
-            symbol_offset = file_addr - start_addr
-            print >> output, '  frame #{num}: {addr:#016x} {mod}`{symbol} + {offset}'.format(
-                num=i, addr=load_addr, mod=mod_name, symbol=symbol_name, offset=symbol_offset)
-        else:
-            # Debug info is available for 'function'.
-            func_name = frame.GetFunctionName()
-            file_name = frame.GetLineEntry().GetFileSpec().GetFilename()
-            line_num = frame.GetLineEntry().GetLine()
-            print >> output, '  frame #{num}: {addr:#016x} {mod}`{func} at {file}:{line} {args}'.format(
-                num=i, addr=load_addr, mod=mod_name,
-                func='%s [inlined]' % func_name] if frame.IsInlined() else func_name,
-                file=file_name, line=line_num, args=get_args_as_string(frame, showFuncName=False))
-
-        ...") SBFunction;
-class SBFunction
-{
-public:
-
-    SBFunction ();
-
-    SBFunction (const lldb::SBFunction &rhs);
-
-    ~SBFunction ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    const char *
-    GetName() const;
-
-    const char *
-    GetDisplayName() const;
-
-    const char *
-    GetMangledName () const;
-
-    lldb::SBInstructionList
-    GetInstructions (lldb::SBTarget target);
-
-    lldb::SBInstructionList
-    GetInstructions (lldb::SBTarget target, const char *flavor);
-
-    lldb::SBAddress
-    GetStartAddress ();
-
-    lldb::SBAddress
-    GetEndAddress ();
-
-    const char *
-    GetArgumentName (uint32_t arg_idx);
-
-    uint32_t
-    GetPrologueByteSize ();
-
-    lldb::SBType
-    GetType ();
-
-    lldb::SBBlock
-    GetBlock ();
-
-    lldb::LanguageType
-    GetLanguage ();
-
-    %feature("docstring", "
-    Returns true if the function was compiled with optimization.
-    Optimization, in this case, is meant to indicate that the debugger
-    experience may be confusing for the user -- variables optimized away,
-    stepping jumping between source lines -- and the driver may want to
-    provide some guidance to the user about this.
-    Returns false if unoptimized, or unknown.") GetIsOptimized;
-    bool
-    GetIsOptimized();
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    bool
-    operator == (const lldb::SBFunction &rhs) const;
-
-    bool
-    operator != (const lldb::SBFunction &rhs) const;
-
-    %pythoncode %{
-        def get_instructions_from_current_target (self):
-            return self.GetInstructions (target)
-
-        addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this function.''')
-        end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this function.''')
-        block = property(GetBlock, None, doc='''A read only property that returns an lldb object that represents the top level lexical block (lldb.SBBlock) for this function.''')
-        instructions = property(get_instructions_from_current_target, None, doc='''A read only property that returns an lldb object that represents the instructions (lldb.SBInstructionList) for this function.''')
-        mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this function as a string.''')
-        name = property(GetName, None, doc='''A read only property that returns the name for this function as a string.''')
-        prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''')
-        type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the return type (lldb.SBType) for this function.''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBInstruction.i b/src/llvm-project/lldb/scripts/interface/SBInstruction.i
deleted file mode 100644
index 82b31fd..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBInstruction.i
+++ /dev/null
@@ -1,97 +0,0 @@
-//===-- SWIG Interface for SBInstruction ------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-// There's a lot to be fixed here, but need to wait for underlying insn implementation
-// to be revised & settle down first.
-
-namespace lldb {
-
-class SBInstruction
-{
-public:
-
-    SBInstruction ();
-
-    SBInstruction (const SBInstruction &rhs);
-
-    ~SBInstruction ();
-
-    bool
-    IsValid();
-
-    explicit operator bool() const;
-
-    lldb::SBAddress
-    GetAddress();
-
-
-    const char *
-    GetMnemonic (lldb::SBTarget target);
-
-    const char *
-    GetOperands (lldb::SBTarget target);
-
-    const char *
-    GetComment (lldb::SBTarget target);
-
-    lldb::SBData
-    GetData (lldb::SBTarget target);
-
-    size_t
-    GetByteSize ();
-
-    bool
-    DoesBranch ();
-
-    bool
-    HasDelaySlot ();
-
-    bool
-    CanSetBreakpoint ();
-
-    void
-    Print (FILE *out);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    bool
-    EmulateWithFrame (lldb::SBFrame &frame, uint32_t evaluate_options);
-
-    bool
-    DumpEmulation (const char * triple); // triple is to specify the architecture, e.g. 'armv6' or 'armv7-apple-ios'
-
-    bool
-    TestEmulation (lldb::SBStream &output_stream, const char *test_file);
-
-    %pythoncode %{
-        def __mnemonic_property__ (self):
-            return self.GetMnemonic (target)
-        def __operands_property__ (self):
-            return self.GetOperands (target)
-        def __comment_property__ (self):
-            return self.GetComment (target)
-        def __file_addr_property__ (self):
-            return self.GetAddress ().GetFileAddress()
-        def __load_adrr_property__ (self):
-            return self.GetComment (target)
-
-        mnemonic = property(__mnemonic_property__, None, doc='''A read only property that returns the mnemonic for this instruction as a string.''')
-        operands = property(__operands_property__, None, doc='''A read only property that returns the operands for this instruction as a string.''')
-        comment = property(__comment_property__, None, doc='''A read only property that returns the comment for this instruction as a string.''')
-        addr = property(GetAddress, None, doc='''A read only property that returns an lldb object that represents the address (lldb.SBAddress) for this instruction.''')
-        size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes for this instruction as an integer.''')
-        is_branch = property(DoesBranch, None, doc='''A read only property that returns a boolean value that indicates if this instruction is a branch instruction.''')
-    %}
-
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBInstructionList.i b/src/llvm-project/lldb/scripts/interface/SBInstructionList.i
deleted file mode 100644
index edcceea..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBInstructionList.i
+++ /dev/null
@@ -1,100 +0,0 @@
-//===-- SWIG Interface for SBInstructionList --------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a list of machine instructions.  SBFunction and SBSymbol have
-GetInstructions() methods which return SBInstructionList instances.
-
-SBInstructionList supports instruction (SBInstruction instance) iteration.
-For example (see also SBDebugger for a more complete example),
-
-def disassemble_instructions (insts):
-    for i in insts:
-        print i
-
-defines a function which takes an SBInstructionList instance and prints out
-the machine instructions in assembly format."
-) SBInstructionList;
-class SBInstructionList
-{
-public:
-
-    SBInstructionList ();
-
-    SBInstructionList (const SBInstructionList &rhs);
-
-    ~SBInstructionList ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    size_t
-    GetSize ();
-
-    lldb::SBInstruction
-    GetInstructionAtIndex (uint32_t idx);
-
-    size_t GetInstructionsCount(const SBAddress &start, const SBAddress &end,
-                                bool canSetBreakpoint);
-
-    void
-    Clear ();
-
-    void
-    AppendInstruction (lldb::SBInstruction inst);
-
-    void
-    Print (FILE *out);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    bool
-    DumpEmulationForAllInstructions (const char *triple);
-
-    %pythoncode %{
-        def __iter__(self):
-            '''Iterate over all instructions in a lldb.SBInstructionList
-            object.'''
-            return lldb_iter(self, 'GetSize', 'GetInstructionAtIndex')
-
-        def __len__(self):
-            '''Access len of the instruction list.'''
-            return int(self.GetSize())
-
-        def __getitem__(self, key):
-            '''Access instructions by integer index for array access or by lldb.SBAddress to find an instruction that matches a section offset address object.'''
-            if type(key) is int:
-                # Find an instruction by index
-                if key < len(self):
-                    return self.GetInstructionAtIndex(key)
-            elif type(key) is SBAddress:
-                # Find an instruction using a lldb.SBAddress object
-                lookup_file_addr = key.file_addr
-                closest_inst = None
-                for idx in range(self.GetSize()):
-                    inst = self.GetInstructionAtIndex(idx)
-                    inst_file_addr = inst.addr.file_addr
-                    if inst_file_addr == lookup_file_addr:
-                        return inst
-                    elif inst_file_addr > lookup_file_addr:
-                        return closest_inst
-                    else:
-                        closest_inst = inst
-            return None
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBLineEntry.i b/src/llvm-project/lldb/scripts/interface/SBLineEntry.i
deleted file mode 100644
index 4dac71f..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBLineEntry.i
+++ /dev/null
@@ -1,96 +0,0 @@
-//===-- SWIG Interface for SBLineEntry --------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Specifies an association with a contiguous range of instructions and
-a source file location. SBCompileUnit contains SBLineEntry(s). For example,
-
-    for lineEntry in compileUnit:
-        print('line entry: %s:%d' % (str(lineEntry.GetFileSpec()),
-                                    lineEntry.GetLine()))
-        print('start addr: %s' % str(lineEntry.GetStartAddress()))
-        print('end   addr: %s' % str(lineEntry.GetEndAddress()))
-
-produces:
-
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
-start addr: a.out[0x100000d98]
-end   addr: a.out[0x100000da3]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
-start addr: a.out[0x100000da3]
-end   addr: a.out[0x100000da9]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
-start addr: a.out[0x100000da9]
-end   addr: a.out[0x100000db6]
-line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
-start addr: a.out[0x100000db6]
-end   addr: a.out[0x100000dbc]
-...
-
-See also SBCompileUnit."
-) SBLineEntry;
-class SBLineEntry
-{
-public:
-
-    SBLineEntry ();
-
-    SBLineEntry (const lldb::SBLineEntry &rhs);
-
-    ~SBLineEntry ();
-
-    lldb::SBAddress
-    GetStartAddress () const;
-
-    lldb::SBAddress
-    GetEndAddress () const;
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    lldb::SBFileSpec
-    GetFileSpec () const;
-
-    uint32_t
-    GetLine () const;
-
-    uint32_t
-    GetColumn () const;
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    void
-    SetFileSpec (lldb::SBFileSpec filespec);
-
-    void
-    SetLine (uint32_t line);
-
-    void
-    SetColumn (uint32_t column);
-
-    bool
-    operator == (const lldb::SBLineEntry &rhs) const;
-
-    bool
-    operator != (const lldb::SBLineEntry &rhs) const;
-
-    %pythoncode %{
-        file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''')
-        line = property(GetLine, None, doc='''A read only property that returns the 1 based line number for this line entry, a return value of zero indicates that no line information is available.''')
-        column = property(GetColumn, None, doc='''A read only property that returns the 1 based column number for this line entry, a return value of zero indicates that no column information is available.''')
-        addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this line entry.''')
-        end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this line entry.''')
-    %}
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBMemoryRegionInfo.i b/src/llvm-project/lldb/scripts/interface/SBMemoryRegionInfo.i
deleted file mode 100644
index 7a59d00..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBMemoryRegionInfo.i
+++ /dev/null
@@ -1,60 +0,0 @@
-//===-- SWIG Interface for SBMemoryRegionInfo -------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"API clients can get information about memory regions in processes."
-) SBMemoryRegionInfo;
-
-class SBMemoryRegionInfo
-{
-public:
-
-    SBMemoryRegionInfo ();
-
-    SBMemoryRegionInfo (const lldb::SBMemoryRegionInfo &rhs);
-
-    ~SBMemoryRegionInfo ();
-
-    void
-    Clear();
-
-    lldb::addr_t
-    GetRegionBase ();
-
-    lldb::addr_t
-    GetRegionEnd ();
-
-    bool
-    IsReadable ();
-
-    bool
-    IsWritable ();
-
-    bool
-    IsExecutable ();
-
-    bool
-    IsMapped ();
-
-    const char *
-    GetName ();
-
-    bool
-    operator == (const lldb::SBMemoryRegionInfo &rhs) const;
-
-    bool
-    operator != (const lldb::SBMemoryRegionInfo &rhs) const;
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBModule.i b/src/llvm-project/lldb/scripts/interface/SBModule.i
deleted file mode 100644
index ba8f5fb..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBModule.i
+++ /dev/null
@@ -1,554 +0,0 @@
-//===-- SWIG Interface for SBModule -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%pythoncode%{
-# ==================================
-# Helper function for SBModule class
-# ==================================
-def in_range(symbol, section):
-    """Test whether a symbol is within the range of a section."""
-    symSA = symbol.GetStartAddress().GetFileAddress()
-    symEA = symbol.GetEndAddress().GetFileAddress()
-    secSA = section.GetFileAddress()
-    secEA = secSA + section.GetByteSize()
-
-    if symEA != LLDB_INVALID_ADDRESS:
-        if secSA <= symSA and symEA <= secEA:
-            return True
-        else:
-            return False
-    else:
-        if secSA <= symSA and symSA < secEA:
-            return True
-        else:
-            return False
-%}
-
-%feature("docstring",
-"Represents an executable image and its associated object and symbol files.
-
-The module is designed to be able to select a single slice of an
-executable image as it would appear on disk and during program
-execution.
-
-You can retrieve SBModule from SBSymbolContext, which in turn is available
-from SBFrame.
-
-SBModule supports symbol iteration, for example,
-
-    for symbol in module:
-        name = symbol.GetName()
-        saddr = symbol.GetStartAddress()
-        eaddr = symbol.GetEndAddress()
-
-and rich comparison methods which allow the API program to use,
-
-    if thisModule == thatModule:
-        print('This module is the same as that module')
-
-to test module equality.  A module also contains object file sections, namely
-SBSection.  SBModule supports section iteration through section_iter(), for
-example,
-
-    print('Number of sections: %d' % module.GetNumSections())
-    for sec in module.section_iter():
-        print(sec)
-
-And to iterate the symbols within a SBSection, use symbol_in_section_iter(),
-
-    # Iterates the text section and prints each symbols within each sub-section.
-    for subsec in text_sec:
-        print(INDENT + repr(subsec))
-        for sym in exe_module.symbol_in_section_iter(subsec):
-            print(INDENT2 + repr(sym))
-            print(INDENT2 + 'symbol type: %s' % symbol_type_to_str(sym.GetType()))
-
-produces this following output:
-
-    [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
-        id = {0x00000004}, name = 'mask_access(MaskAction, unsigned int)', range = [0x00000001000017c0-0x0000000100001870)
-        symbol type: code
-        id = {0x00000008}, name = 'thread_func(void*)', range = [0x0000000100001870-0x00000001000019b0)
-        symbol type: code
-        id = {0x0000000c}, name = 'main', range = [0x00000001000019b0-0x0000000100001d5c)
-        symbol type: code
-        id = {0x00000023}, name = 'start', address = 0x0000000100001780
-        symbol type: code
-    [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
-        id = {0x00000024}, name = '__stack_chk_fail', range = [0x0000000100001d5c-0x0000000100001d62)
-        symbol type: trampoline
-        id = {0x00000028}, name = 'exit', range = [0x0000000100001d62-0x0000000100001d68)
-        symbol type: trampoline
-        id = {0x00000029}, name = 'fflush', range = [0x0000000100001d68-0x0000000100001d6e)
-        symbol type: trampoline
-        id = {0x0000002a}, name = 'fgets', range = [0x0000000100001d6e-0x0000000100001d74)
-        symbol type: trampoline
-        id = {0x0000002b}, name = 'printf', range = [0x0000000100001d74-0x0000000100001d7a)
-        symbol type: trampoline
-        id = {0x0000002c}, name = 'pthread_create', range = [0x0000000100001d7a-0x0000000100001d80)
-        symbol type: trampoline
-        id = {0x0000002d}, name = 'pthread_join', range = [0x0000000100001d80-0x0000000100001d86)
-        symbol type: trampoline
-        id = {0x0000002e}, name = 'pthread_mutex_lock', range = [0x0000000100001d86-0x0000000100001d8c)
-        symbol type: trampoline
-        id = {0x0000002f}, name = 'pthread_mutex_unlock', range = [0x0000000100001d8c-0x0000000100001d92)
-        symbol type: trampoline
-        id = {0x00000030}, name = 'rand', range = [0x0000000100001d92-0x0000000100001d98)
-        symbol type: trampoline
-        id = {0x00000031}, name = 'strtoul', range = [0x0000000100001d98-0x0000000100001d9e)
-        symbol type: trampoline
-        id = {0x00000032}, name = 'usleep', range = [0x0000000100001d9e-0x0000000100001da4)
-        symbol type: trampoline
-    [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
-    [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
-    [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
-    [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame
-"
-) SBModule;
-class SBModule
-{
-public:
-
-    SBModule ();
-
-    SBModule (const lldb::SBModule &rhs);
-
-    SBModule (const lldb::SBModuleSpec &module_spec);
-
-    SBModule (lldb::SBProcess &process,
-              lldb::addr_t header_addr);
-
-    ~SBModule ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    void
-    Clear();
-
-    %feature("docstring", "
-    Get const accessor for the module file specification.
-
-    This function returns the file for the module on the host system
-    that is running LLDB. This can differ from the path on the
-    platform since we might be doing remote debugging.
-
-    @return
-        A const reference to the file specification object.") GetFileSpec;
-    lldb::SBFileSpec
-    GetFileSpec () const;
-
-    %feature("docstring", "
-    Get accessor for the module platform file specification.
-
-    Platform file refers to the path of the module as it is known on
-    the remote system on which it is being debugged. For local
-    debugging this is always the same as Module::GetFileSpec(). But
-    remote debugging might mention a file '/usr/lib/liba.dylib'
-    which might be locally downloaded and cached. In this case the
-    platform file could be something like:
-    '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib'
-    The file could also be cached in a local developer kit directory.
-
-    @return
-        A const reference to the file specification object.") GetPlatformFileSpec;
-    lldb::SBFileSpec
-    GetPlatformFileSpec () const;
-
-    bool
-    SetPlatformFileSpec (const lldb::SBFileSpec &platform_file);
-
-    lldb::SBFileSpec
-    GetRemoteInstallFileSpec ();
-
-    bool
-    SetRemoteInstallFileSpec (lldb::SBFileSpec &file);
-
-    %feature("docstring", "Returns the UUID of the module as a Python string."
-    ) GetUUIDString;
-    const char *
-    GetUUIDString () const;
-
-    bool operator==(const lldb::SBModule &rhs) const;
-
-    bool operator!=(const lldb::SBModule &rhs) const;
-
-    lldb::SBSection
-    FindSection (const char *sect_name);
-
-    lldb::SBAddress
-    ResolveFileAddress (lldb::addr_t vm_addr);
-
-    lldb::SBSymbolContext
-    ResolveSymbolContextForAddress (const lldb::SBAddress& addr,
-                                    uint32_t resolve_scope);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    uint32_t
-    GetNumCompileUnits();
-
-    lldb::SBCompileUnit
-    GetCompileUnitAtIndex (uint32_t);
-
-    %feature("docstring", "
-    Find compile units related to *this module and passed source
-    file.
-
-    @param[in] sb_file_spec
-        A lldb::SBFileSpec object that contains source file
-        specification.
-
-    @return
-        A lldb::SBSymbolContextList that gets filled in with all of
-        the symbol contexts for all the matches.") FindCompileUnits;
-    lldb::SBSymbolContextList
-    FindCompileUnits (const lldb::SBFileSpec &sb_file_spec);
-
-    size_t
-    GetNumSymbols ();
-
-    lldb::SBSymbol
-    GetSymbolAtIndex (size_t idx);
-
-    lldb::SBSymbol
-    FindSymbol (const char *name,
-                lldb::SymbolType type = eSymbolTypeAny);
-
-    lldb::SBSymbolContextList
-    FindSymbols (const char *name,
-                 lldb::SymbolType type = eSymbolTypeAny);
-
-
-    size_t
-    GetNumSections ();
-
-    lldb::SBSection
-    GetSectionAtIndex (size_t idx);
-
-
-    %feature("docstring", "
-    Find functions by name.
-
-    @param[in] name
-        The name of the function we are looking for.
-
-    @param[in] name_type_mask
-        A logical OR of one or more FunctionNameType enum bits that
-        indicate what kind of names should be used when doing the
-        lookup. Bits include fully qualified names, base names,
-        C++ methods, or ObjC selectors.
-        See FunctionNameType for more details.
-
-    @return
-        A symbol context list that gets filled in with all of the
-        matches.") FindFunctions;
-    lldb::SBSymbolContextList
-    FindFunctions (const char *name,
-                   uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
-
-    lldb::SBType
-    FindFirstType (const char* name);
-
-    lldb::SBTypeList
-    FindTypes (const char* type);
-
-    lldb::SBType
-    GetTypeByID (lldb::user_id_t uid);
-
-    lldb::SBType
-    GetBasicType(lldb::BasicType type);
-
-    %feature("docstring", "
-    Get all types matching type_mask from debug info in this
-    module.
-
-    @param[in] type_mask
-        A bitfield that consists of one or more bits logically OR'ed
-        together from the lldb::TypeClass enumeration. This allows
-        you to request only structure types, or only class, struct
-        and union types. Passing in lldb::eTypeClassAny will return
-        all types found in the debug information for this module.
-
-    @return
-        A list of types in this module that match type_mask") GetTypes;
-    lldb::SBTypeList
-    GetTypes (uint32_t type_mask = lldb::eTypeClassAny);
-
-    %feature("docstring", "
-    Find global and static variables by name.
-
-    @param[in] target
-        A valid SBTarget instance representing the debuggee.
-
-    @param[in] name
-        The name of the global or static variable we are looking
-        for.
-
-    @param[in] max_matches
-        Allow the number of matches to be limited to max_matches.
-
-    @return
-        A list of matched variables in an SBValueList.") FindGlobalVariables;
-    lldb::SBValueList
-    FindGlobalVariables (lldb::SBTarget &target,
-                         const char *name,
-                         uint32_t max_matches);
-
-    %feature("docstring", "
-    Find the first global (or static) variable by name.
-
-    @param[in] target
-        A valid SBTarget instance representing the debuggee.
-
-    @param[in] name
-        The name of the global or static variable we are looking
-        for.
-
-    @return
-        An SBValue that gets filled in with the found variable (if any).") FindFirstGlobalVariable;
-    lldb::SBValue
-    FindFirstGlobalVariable (lldb::SBTarget &target, const char *name);
-
-    lldb::ByteOrder
-    GetByteOrder ();
-
-    uint32_t
-    GetAddressByteSize();
-
-    const char *
-    GetTriple ();
-
-    uint32_t
-    GetVersion (uint32_t *versions,
-                uint32_t num_versions);
-
-    lldb::SBFileSpec
-    GetSymbolFileSpec() const;
-
-    lldb::SBAddress
-    GetObjectFileHeaderAddress() const;
-
-    lldb::SBAddress
-    GetObjectFileEntryPointAddress() const;
-
-    bool
-    operator == (const lldb::SBModule &rhs) const;
-
-    bool
-    operator != (const lldb::SBModule &rhs) const;
-
-    %pythoncode %{
-        def __len__(self):
-            '''Return the number of symbols in a lldb.SBModule object.'''
-            return self.GetNumSymbols()
-
-        def __iter__(self):
-            '''Iterate over all symbols in a lldb.SBModule object.'''
-            return lldb_iter(self, 'GetNumSymbols', 'GetSymbolAtIndex')
-
-        def section_iter(self):
-            '''Iterate over all sections in a lldb.SBModule object.'''
-            return lldb_iter(self, 'GetNumSections', 'GetSectionAtIndex')
-
-        def compile_unit_iter(self):
-            '''Iterate over all compile units in a lldb.SBModule object.'''
-            return lldb_iter(self, 'GetNumCompileUnits', 'GetCompileUnitAtIndex')
-
-        def symbol_in_section_iter(self, section):
-            '''Given a module and its contained section, returns an iterator on the
-            symbols within the section.'''
-            for sym in self:
-                if in_range(sym, section):
-                    yield sym
-
-        class symbols_access(object):
-            re_compile_type = type(re.compile('.'))
-            '''A helper object that will lazily hand out lldb.SBSymbol objects for a module when supplied an index, name, or regular expression.'''
-            def __init__(self, sbmodule):
-                self.sbmodule = sbmodule
-
-            def __len__(self):
-                if self.sbmodule:
-                    return int(self.sbmodule.GetNumSymbols())
-                return 0
-
-            def __getitem__(self, key):
-                count = len(self)
-                if type(key) is int:
-                    if key < count:
-                        return self.sbmodule.GetSymbolAtIndex(key)
-                elif type(key) is str:
-                    matches = []
-                    sc_list = self.sbmodule.FindSymbols(key)
-                    for sc in sc_list:
-                        symbol = sc.symbol
-                        if symbol:
-                            matches.append(symbol)
-                    return matches
-                elif isinstance(key, self.re_compile_type):
-                    matches = []
-                    for idx in range(count):
-                        symbol = self.sbmodule.GetSymbolAtIndex(idx)
-                        added = False
-                        name = symbol.name
-                        if name:
-                            re_match = key.search(name)
-                            if re_match:
-                                matches.append(symbol)
-                                added = True
-                        if not added:
-                            mangled = symbol.mangled
-                            if mangled:
-                                re_match = key.search(mangled)
-                                if re_match:
-                                    matches.append(symbol)
-                    return matches
-                else:
-                    print("error: unsupported item type: %s" % type(key))
-                return None
-
-        def get_symbols_access_object(self):
-            '''An accessor function that returns a symbols_access() object which allows lazy symbol access from a lldb.SBModule object.'''
-            return self.symbols_access (self)
-
-        def get_compile_units_access_object (self):
-            '''An accessor function that returns a compile_units_access() object which allows lazy compile unit access from a lldb.SBModule object.'''
-            return self.compile_units_access (self)
-
-        def get_symbols_array(self):
-            '''An accessor function that returns a list() that contains all symbols in a lldb.SBModule object.'''
-            symbols = []
-            for idx in range(self.num_symbols):
-                symbols.append(self.GetSymbolAtIndex(idx))
-            return symbols
-
-        class sections_access(object):
-            re_compile_type = type(re.compile('.'))
-            '''A helper object that will lazily hand out lldb.SBSection objects for a module when supplied an index, name, or regular expression.'''
-            def __init__(self, sbmodule):
-                self.sbmodule = sbmodule
-
-            def __len__(self):
-                if self.sbmodule:
-                    return int(self.sbmodule.GetNumSections())
-                return 0
-
-            def __getitem__(self, key):
-                count = len(self)
-                if type(key) is int:
-                    if key < count:
-                        return self.sbmodule.GetSectionAtIndex(key)
-                elif type(key) is str:
-                    for idx in range(count):
-                        section = self.sbmodule.GetSectionAtIndex(idx)
-                        if section.name == key:
-                            return section
-                elif isinstance(key, self.re_compile_type):
-                    matches = []
-                    for idx in range(count):
-                        section = self.sbmodule.GetSectionAtIndex(idx)
-                        name = section.name
-                        if name:
-                            re_match = key.search(name)
-                            if re_match:
-                                matches.append(section)
-                    return matches
-                else:
-                    print("error: unsupported item type: %s" % type(key))
-                return None
-
-        class compile_units_access(object):
-            re_compile_type = type(re.compile('.'))
-            '''A helper object that will lazily hand out lldb.SBCompileUnit objects for a module when supplied an index, full or partial path, or regular expression.'''
-            def __init__(self, sbmodule):
-                self.sbmodule = sbmodule
-
-            def __len__(self):
-                if self.sbmodule:
-                    return int(self.sbmodule.GetNumCompileUnits())
-                return 0
-
-            def __getitem__(self, key):
-                count = len(self)
-                if type(key) is int:
-                    if key < count:
-                        return self.sbmodule.GetCompileUnitAtIndex(key)
-                elif type(key) is str:
-                    is_full_path = key[0] == '/'
-                    for idx in range(count):
-                        comp_unit = self.sbmodule.GetCompileUnitAtIndex(idx)
-                        if is_full_path:
-                            if comp_unit.file.fullpath == key:
-                                return comp_unit
-                        else:
-                            if comp_unit.file.basename == key:
-                                return comp_unit
-                elif isinstance(key, self.re_compile_type):
-                    matches = []
-                    for idx in range(count):
-                        comp_unit = self.sbmodule.GetCompileUnitAtIndex(idx)
-                        fullpath = comp_unit.file.fullpath
-                        if fullpath:
-                            re_match = key.search(fullpath)
-                            if re_match:
-                                matches.append(comp_unit)
-                    return matches
-                else:
-                    print("error: unsupported item type: %s" % type(key))
-                return None
-
-        def get_sections_access_object(self):
-            '''An accessor function that returns a sections_access() object which allows lazy section array access.'''
-            return self.sections_access (self)
-
-        def get_sections_array(self):
-            '''An accessor function that returns an array object that contains all sections in this module object.'''
-            if not hasattr(self, 'sections_array'):
-                self.sections_array = []
-                for idx in range(self.num_sections):
-                    self.sections_array.append(self.GetSectionAtIndex(idx))
-            return self.sections_array
-
-        def get_compile_units_array(self):
-            '''An accessor function that returns an array object that contains all compile_units in this module object.'''
-            if not hasattr(self, 'compile_units_array'):
-                self.compile_units_array = []
-                for idx in range(self.GetNumCompileUnits()):
-                    self.compile_units_array.append(self.GetCompileUnitAtIndex(idx))
-            return self.compile_units_array
-
-        symbols = property(get_symbols_array, None, doc='''A read only property that returns a list() of lldb.SBSymbol objects contained in this module.''')
-        symbol = property(get_symbols_access_object, None, doc='''A read only property that can be used to access symbols by index ("symbol = module.symbol[0]"), name ("symbols = module.symbol['main']"), or using a regular expression ("symbols = module.symbol[re.compile(...)]"). The return value is a single lldb.SBSymbol object for array access, and a list() of lldb.SBSymbol objects for name and regular expression access''')
-        sections = property(get_sections_array, None, doc='''A read only property that returns a list() of lldb.SBSection objects contained in this module.''')
-        compile_units = property(get_compile_units_array, None, doc='''A read only property that returns a list() of lldb.SBCompileUnit objects contained in this module.''')
-        section = property(get_sections_access_object, None, doc='''A read only property that can be used to access symbols by index ("section = module.section[0]"), name ("sections = module.section[\'main\']"), or using a regular expression ("sections = module.section[re.compile(...)]"). The return value is a single lldb.SBSection object for array access, and a list() of lldb.SBSection objects for name and regular expression access''')
-        section = property(get_sections_access_object, None, doc='''A read only property that can be used to access compile units by index ("compile_unit = module.compile_unit[0]"), name ("compile_unit = module.compile_unit[\'main.cpp\']"), or using a regular expression ("compile_unit = module.compile_unit[re.compile(...)]"). The return value is a single lldb.SBCompileUnit object for array access or by full or partial path, and a list() of lldb.SBCompileUnit objects regular expressions.''')
-
-        def get_uuid(self):
-            return uuid.UUID (self.GetUUIDString())
-
-        uuid = property(get_uuid, None, doc='''A read only property that returns a standard python uuid.UUID object that represents the UUID of this module.''')
-        file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this object file for this module as it is represented where it is being debugged.''')
-        platform_file = property(GetPlatformFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this object file for this module as it is represented on the current host system.''')
-        byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this module.''')
-        addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this module.''')
-        triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this module.''')
-        num_symbols = property(GetNumSymbols, None, doc='''A read only property that returns number of symbols in the module symbol table as an integer.''')
-        num_sections = property(GetNumSections, None, doc='''A read only property that returns number of sections in the module as an integer.''')
-
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBModuleSpec.i b/src/llvm-project/lldb/scripts/interface/SBModuleSpec.i
deleted file mode 100644
index ec4e9bb..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBModuleSpec.i
+++ /dev/null
@@ -1,132 +0,0 @@
-//===-- SWIG Interface for SBModule -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-class SBModuleSpec
-{
-public:
-
-    SBModuleSpec ();
-
-    SBModuleSpec (const lldb::SBModuleSpec &rhs);
-
-    ~SBModuleSpec ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    void
-    Clear();
-
-    %feature("docstring", "
-    Get const accessor for the module file.
-
-    This function returns the file for the module on the host system
-    that is running LLDB. This can differ from the path on the
-    platform since we might be doing remote debugging.
-
-    @return
-        A const reference to the file specification object.") GetFileSpec;
-    lldb::SBFileSpec
-    GetFileSpec ();
-
-    void
-    SetFileSpec (const lldb::SBFileSpec &fspec);
-
-    %feature("docstring", "
-    Get accessor for the module platform file.
-
-    Platform file refers to the path of the module as it is known on
-    the remote system on which it is being debugged. For local
-    debugging this is always the same as Module::GetFileSpec(). But
-    remote debugging might mention a file '/usr/lib/liba.dylib'
-    which might be locally downloaded and cached. In this case the
-    platform file could be something like:
-    '/tmp/lldb/platform-cache/remote.host.computer/usr/lib/liba.dylib'
-    The file could also be cached in a local developer kit directory.
-
-    @return
-        A const reference to the file specification object.") GetPlatformFileSpec;
-    lldb::SBFileSpec
-    GetPlatformFileSpec ();
-
-    void
-    SetPlatformFileSpec (const lldb::SBFileSpec &fspec);
-
-    lldb::SBFileSpec
-    GetSymbolFileSpec ();
-
-    void
-    SetSymbolFileSpec (const lldb::SBFileSpec &fspec);
-
-    const char *
-    GetObjectName ();
-
-    void
-    SetObjectName (const char *name);
-
-    const char *
-    GetTriple ();
-
-    void
-    SetTriple (const char *triple);
-
-    const uint8_t *
-    GetUUIDBytes ();
-
-    size_t
-    GetUUIDLength ();
-
-    bool
-    SetUUIDBytes (const uint8_t *uuid, size_t uuid_len);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-};
-
-
-class SBModuleSpecList
-{
-public:
-    SBModuleSpecList();
-
-    SBModuleSpecList (const SBModuleSpecList &rhs);
-
-    ~SBModuleSpecList();
-
-    static SBModuleSpecList
-    GetModuleSpecifications (const char *path);
-
-    void
-    Append (const lldb::SBModuleSpec &spec);
-
-    void
-    Append (const lldb::SBModuleSpecList &spec_list);
-
-    lldb::SBModuleSpec
-    FindFirstMatchingSpec (const lldb::SBModuleSpec &match_spec);
-
-    lldb::SBModuleSpecList
-    FindMatchingSpecs (const lldb::SBModuleSpec &match_spec);
-
-    size_t
-    GetSize();
-
-    lldb::SBModuleSpec
-    GetSpecAtIndex (size_t i);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBProcess.i b/src/llvm-project/lldb/scripts/interface/SBProcess.i
deleted file mode 100644
index cbe67ad..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBProcess.i
+++ /dev/null
@@ -1,498 +0,0 @@
-//===-- SWIG Interface for SBProcess ----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents the process associated with the target program.
-
-SBProcess supports thread iteration. For example (from test/lldbutil.py),
-
-# ==================================================
-# Utility functions related to Threads and Processes
-# ==================================================
-
-def get_stopped_threads(process, reason):
-    '''Returns the thread(s) with the specified stop reason in a list.
-
-    The list can be empty if no such thread exists.
-    '''
-    threads = []
-    for t in process:
-        if t.GetStopReason() == reason:
-            threads.append(t)
-    return threads
-
-...
-"
-) SBProcess;
-class SBProcess
-{
-public:
-    enum
-    {
-        eBroadcastBitStateChanged   = (1 << 0),
-        eBroadcastBitInterrupt      = (1 << 1),
-        eBroadcastBitSTDOUT         = (1 << 2),
-        eBroadcastBitSTDERR         = (1 << 3),
-        eBroadcastBitProfileData    = (1 << 4),
-        eBroadcastBitStructuredData = (1 << 5)
-    };
-
-    SBProcess ();
-
-    SBProcess (const lldb::SBProcess& rhs);
-
-    ~SBProcess();
-
-    static const char *
-    GetBroadcasterClassName ();
-
-    const char *
-    GetPluginName ();
-
-    const char *
-    GetShortPluginName ();
-
-    void
-    Clear ();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    lldb::SBTarget
-    GetTarget() const;
-
-    lldb::ByteOrder
-    GetByteOrder() const;
-
-    %feature("autodoc", "
-    Writes data into the current process's stdin. API client specifies a Python
-    string as the only argument.") PutSTDIN;
-    size_t
-    PutSTDIN (const char *src, size_t src_len);
-
-    %feature("autodoc", "
-    Reads data from the current process's stdout stream. API client specifies
-    the size of the buffer to read data into. It returns the byte buffer in a
-    Python string.") GetSTDOUT;
-    size_t
-    GetSTDOUT (char *dst, size_t dst_len) const;
-
-    %feature("autodoc", "
-    Reads data from the current process's stderr stream. API client specifies
-    the size of the buffer to read data into. It returns the byte buffer in a
-    Python string.") GetSTDERR;
-    size_t
-    GetSTDERR (char *dst, size_t dst_len) const;
-
-    size_t
-    GetAsyncProfileData(char *dst, size_t dst_len) const;
-
-    void
-    ReportEventState (const lldb::SBEvent &event, FILE *out) const;
-
-    void
-    AppendEventStateReport (const lldb::SBEvent &event, lldb::SBCommandReturnObject &result);
-
-    %feature("docstring", "
-    Remote connection related functions. These will fail if the
-    process is not in eStateConnected. They are intended for use
-    when connecting to an externally managed debugserver instance.") RemoteAttachToProcessWithID;
-    bool
-    RemoteAttachToProcessWithID (lldb::pid_t pid,
-                                 lldb::SBError& error);
-
-    %feature("docstring",
-    "See SBTarget.Launch for argument description and usage."
-    ) RemoteLaunch;
-    bool
-    RemoteLaunch (char const **argv,
-                  char const **envp,
-                  const char *stdin_path,
-                  const char *stdout_path,
-                  const char *stderr_path,
-                  const char *working_directory,
-                  uint32_t launch_flags,
-                  bool stop_at_entry,
-                  lldb::SBError& error);
-
-    //------------------------------------------------------------------
-    // Thread related functions
-    //------------------------------------------------------------------
-    uint32_t
-    GetNumThreads ();
-
-    %feature("autodoc", "
-    Returns the INDEX'th thread from the list of current threads.  The index
-    of a thread is only valid for the current stop.  For a persistent thread
-    identifier use either the thread ID or the IndexID.  See help on SBThread
-    for more details.") GetThreadAtIndex;
-    lldb::SBThread
-    GetThreadAtIndex (size_t index);
-
-    %feature("autodoc", "
-    Returns the thread with the given thread ID.") GetThreadByID;
-    lldb::SBThread
-    GetThreadByID (lldb::tid_t sb_thread_id);
-
-    %feature("autodoc", "
-    Returns the thread with the given thread IndexID.") GetThreadByIndexID;
-    lldb::SBThread
-    GetThreadByIndexID (uint32_t index_id);
-
-    %feature("autodoc", "
-    Returns the currently selected thread.") GetSelectedThread;
-    lldb::SBThread
-    GetSelectedThread () const;
-
-    %feature("autodoc", "
-    Lazily create a thread on demand through the current OperatingSystem plug-in, if the current OperatingSystem plug-in supports it.") CreateOSPluginThread;
-    lldb::SBThread
-    CreateOSPluginThread (lldb::tid_t tid, lldb::addr_t context);
-
-    bool
-    SetSelectedThread (const lldb::SBThread &thread);
-
-    bool
-    SetSelectedThreadByID (lldb::tid_t tid);
-
-    bool
-    SetSelectedThreadByIndexID (uint32_t index_id);
-
-    //------------------------------------------------------------------
-    // Queue related functions
-    //------------------------------------------------------------------
-    uint32_t
-    GetNumQueues ();
-
-    lldb::SBQueue
-    GetQueueAtIndex (uint32_t index);
-
-    //------------------------------------------------------------------
-    // Stepping related functions
-    //------------------------------------------------------------------
-
-    lldb::StateType
-    GetState ();
-
-    int
-    GetExitStatus ();
-
-    const char *
-    GetExitDescription ();
-
-    %feature("autodoc", "
-    Returns the process ID of the process.") GetProcessID;
-    lldb::pid_t
-    GetProcessID ();
-
-    %feature("autodoc", "
-    Returns an integer ID that is guaranteed to be unique across all process instances. This is not the process ID, just a unique integer for comparison and caching purposes.") GetUniqueID;
-    uint32_t
-    GetUniqueID();
-
-    uint32_t
-    GetAddressByteSize() const;
-
-    %feature("docstring", "
-    Kills the process and shuts down all threads that were spawned to
-    track and monitor process.") Destroy;
-    lldb::SBError
-    Destroy ();
-
-    lldb::SBError
-    Continue ();
-
-    lldb::SBError
-    Stop ();
-
-    %feature("docstring", "Same as Destroy(self).") Destroy;
-    lldb::SBError
-    Kill ();
-
-    lldb::SBError
-    Detach ();
-
-    %feature("docstring", "Sends the process a unix signal.") Signal;
-    lldb::SBError
-    Signal (int signal);
-
-    lldb::SBUnixSignals
-    GetUnixSignals();
-
-    %feature("docstring", "
-    Returns a stop id that will increase every time the process executes.  If
-    include_expression_stops is true, then stops caused by expression evaluation
-    will cause the returned value to increase, otherwise the counter returned will
-    only increase when execution is continued explicitly by the user.  Note, the value
-    will always increase, but may increase by more than one per stop.") GetStopID;
-    uint32_t
-    GetStopID(bool include_expression_stops = false);
-
-    void
-    SendAsyncInterrupt();
-
-    %feature("autodoc", "
-    Reads memory from the current process's address space and removes any
-    traps that may have been inserted into the memory. It returns the byte
-    buffer in a Python string. Example:
-
-    # Read 4 bytes from address 'addr' and assume error.Success() is True.
-    content = process.ReadMemory(addr, 4, error)
-    new_bytes = bytearray(content)") ReadMemory;
-    size_t
-    ReadMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error);
-
-    %feature("autodoc", "
-    Writes memory to the current process's address space and maintains any
-    traps that might be present due to software breakpoints. Example:
-
-    # Create a Python string from the byte array.
-    new_value = str(bytes)
-    result = process.WriteMemory(addr, new_value, error)
-    if not error.Success() or result != len(bytes):
-        print('SBProcess.WriteMemory() failed!')") WriteMemory;
-    size_t
-    WriteMemory (addr_t addr, const void *buf, size_t size, lldb::SBError &error);
-
-    %feature("autodoc", "
-    Reads a NULL terminated C string from the current process's address space.
-    It returns a python string of the exact length, or truncates the string if
-    the maximum character limit is reached. Example:
-
-    # Read a C string of at most 256 bytes from address '0x1000'
-    error = lldb.SBError()
-    cstring = process.ReadCStringFromMemory(0x1000, 256, error)
-    if error.Success():
-        print('cstring: ', cstring)
-    else
-        print('error: ', error)") ReadCStringFromMemory;
-
-    size_t
-    ReadCStringFromMemory (addr_t addr, void *char_buf, size_t size, lldb::SBError &error);
-
-    %feature("autodoc", "
-    Reads an unsigned integer from memory given a byte size and an address.
-    Returns the unsigned integer that was read. Example:
-
-    # Read a 4 byte unsigned integer from address 0x1000
-    error = lldb.SBError()
-    uint = ReadUnsignedFromMemory(0x1000, 4, error)
-    if error.Success():
-        print('integer: %u' % uint)
-    else
-        print('error: ', error)") ReadUnsignedFromMemory;
-
-    uint64_t
-    ReadUnsignedFromMemory (addr_t addr, uint32_t byte_size, lldb::SBError &error);
-
-    %feature("autodoc", "
-    Reads a pointer from memory from an address and returns the value. Example:
-
-    # Read a pointer from address 0x1000
-    error = lldb.SBError()
-    ptr = ReadPointerFromMemory(0x1000, error)
-    if error.Success():
-        print('pointer: 0x%x' % ptr)
-    else
-        print('error: ', error)") ReadPointerFromMemory;
-
-    lldb::addr_t
-    ReadPointerFromMemory (addr_t addr, lldb::SBError &error);
-
-
-    // Events
-    static lldb::StateType
-    GetStateFromEvent (const lldb::SBEvent &event);
-
-    static bool
-    GetRestartedFromEvent (const lldb::SBEvent &event);
-
-    static size_t
-    GetNumRestartedReasonsFromEvent (const lldb::SBEvent &event);
-
-    static const char *
-    GetRestartedReasonAtIndexFromEvent (const lldb::SBEvent &event, size_t idx);
-
-    static lldb::SBProcess
-    GetProcessFromEvent (const lldb::SBEvent &event);
-
-    static bool
-    GetInterruptedFromEvent (const lldb::SBEvent &event);
-
-    static lldb::SBStructuredData
-    GetStructuredDataFromEvent (const lldb::SBEvent &event);
-
-    static bool
-    EventIsProcessEvent (const lldb::SBEvent &event);
-
-    static bool
-    EventIsStructuredDataEvent (const lldb::SBEvent &event);
-
-    lldb::SBBroadcaster
-    GetBroadcaster () const;
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    uint32_t
-    GetNumSupportedHardwareWatchpoints (lldb::SBError &error) const;
-
-    uint32_t
-    LoadImage (lldb::SBFileSpec &image_spec, lldb::SBError &error);
-
-    %feature("autodoc", "
-    Load the library whose filename is given by image_spec looking in all the
-    paths supplied in the paths argument.  If successful, return a token that
-    can be passed to UnloadImage and fill loaded_path with the path that was
-    successfully loaded.  On failure, return
-    lldb.LLDB_INVALID_IMAGE_TOKEN.") LoadImageUsingPaths;
-    uint32_t
-    LoadImageUsingPaths(const lldb::SBFileSpec &image_spec,
-                        SBStringList &paths,
-                        lldb::SBFileSpec &loaded_path,
-                        SBError &error);
-
-    lldb::SBError
-    UnloadImage (uint32_t image_token);
-
-    lldb::SBError
-    SendEventData (const char *event_data);
-
-    %feature("autodoc", "
-    Return the number of different thread-origin extended backtraces
-    this process can support as a uint32_t.
-    When the process is stopped and you have an SBThread, lldb may be
-    able to show a backtrace of when that thread was originally created,
-    or the work item was enqueued to it (in the case of a libdispatch
-    queue).") GetNumExtendedBacktraceTypes;
-
-    uint32_t
-    GetNumExtendedBacktraceTypes ();
-
-    %feature("autodoc", "
-    Takes an index argument, returns the name of one of the thread-origin
-    extended backtrace methods as a str.") GetExtendedBacktraceTypeAtIndex;
-
-    const char *
-    GetExtendedBacktraceTypeAtIndex (uint32_t idx);
-
-    lldb::SBThreadCollection
-    GetHistoryThreads (addr_t addr);
-
-    bool
-    IsInstrumentationRuntimePresent(lldb::InstrumentationRuntimeType type);
-
-    lldb::SBError
-    SaveCore(const char *file_name);
-
-    lldb::SBTrace
-    StartTrace(SBTraceOptions &options, lldb::SBError &error);
-
-    lldb::SBError
-    GetMemoryRegionInfo(lldb::addr_t load_addr, lldb::SBMemoryRegionInfo &region_info);
-
-    lldb::SBMemoryRegionInfoList
-    GetMemoryRegions();
-
-    %feature("autodoc", "
-    Get information about the process.
-    Valid process info will only be returned when the process is alive,
-    use IsValid() to check if the info returned is valid.
-
-    process_info = process.GetProcessInfo()
-    if process_info.IsValid():
-        process_info.GetProcessID()") GetProcessInfo;
-    lldb::SBProcessInfo
-    GetProcessInfo();
-
-    %pythoncode %{
-        def __get_is_alive__(self):
-            '''Returns "True" if the process is currently alive, "False" otherwise'''
-            s = self.GetState()
-            if (s == eStateAttaching or
-                s == eStateLaunching or
-                s == eStateStopped or
-                s == eStateRunning or
-                s == eStateStepping or
-                s == eStateCrashed or
-                s == eStateSuspended):
-                return True
-            return False
-
-        def __get_is_running__(self):
-            '''Returns "True" if the process is currently running, "False" otherwise'''
-            state = self.GetState()
-            if state == eStateRunning or state == eStateStepping:
-                return True
-            return False
-
-        def __get_is_stopped__(self):
-            '''Returns "True" if the process is currently stopped, "False" otherwise'''
-            state = self.GetState()
-            if state == eStateStopped or state == eStateCrashed or state == eStateSuspended:
-                return True
-            return False
-
-        class threads_access(object):
-            '''A helper object that will lazily hand out thread for a process when supplied an index.'''
-            def __init__(self, sbprocess):
-                self.sbprocess = sbprocess
-
-            def __len__(self):
-                if self.sbprocess:
-                    return int(self.sbprocess.GetNumThreads())
-                return 0
-
-            def __getitem__(self, key):
-                if type(key) is int and key < len(self):
-                    return self.sbprocess.GetThreadAtIndex(key)
-                return None
-
-        def get_threads_access_object(self):
-            '''An accessor function that returns a modules_access() object which allows lazy thread access from a lldb.SBProcess object.'''
-            return self.threads_access (self)
-
-        def get_process_thread_list(self):
-            '''An accessor function that returns a list() that contains all threads in a lldb.SBProcess object.'''
-            threads = []
-            accessor = self.get_threads_access_object()
-            for idx in range(len(accessor)):
-                threads.append(accessor[idx])
-            return threads
-
-        def __iter__(self):
-            '''Iterate over all threads in a lldb.SBProcess object.'''
-            return lldb_iter(self, 'GetNumThreads', 'GetThreadAtIndex')
-
-        def __len__(self):
-            '''Return the number of threads in a lldb.SBProcess object.'''
-            return self.GetNumThreads()
-
-
-        threads = property(get_process_thread_list, None, doc='''A read only property that returns a list() of lldb.SBThread objects for this process.''')
-        thread = property(get_threads_access_object, None, doc='''A read only property that returns an object that can access threads by thread index (thread = lldb.process.thread[12]).''')
-        is_alive = property(__get_is_alive__, None, doc='''A read only property that returns a boolean value that indicates if this process is currently alive.''')
-        is_running = property(__get_is_running__, None, doc='''A read only property that returns a boolean value that indicates if this process is currently running.''')
-        is_stopped = property(__get_is_stopped__, None, doc='''A read only property that returns a boolean value that indicates if this process is currently stopped.''')
-        id = property(GetProcessID, None, doc='''A read only property that returns the process ID as an integer.''')
-        target = property(GetTarget, None, doc='''A read only property that an lldb object that represents the target (lldb.SBTarget) that owns this process.''')
-        num_threads = property(GetNumThreads, None, doc='''A read only property that returns the number of threads in this process as an integer.''')
-        selected_thread = property(GetSelectedThread, SetSelectedThread, doc='''A read/write property that gets/sets the currently selected thread in this process. The getter returns a lldb.SBThread object and the setter takes an lldb.SBThread object.''')
-        state = property(GetState, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eState") that represents the current state of this process (running, stopped, exited, etc.).''')
-        exit_state = property(GetExitStatus, None, doc='''A read only property that returns an exit status as an integer of this process when the process state is lldb.eStateExited.''')
-        exit_description = property(GetExitDescription, None, doc='''A read only property that returns an exit description as a string of this process when the process state is lldb.eStateExited.''')
-        broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this process.''')
-    %}
-
-};
-
-}  // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBSection.i b/src/llvm-project/lldb/scripts/interface/SBSection.i
deleted file mode 100644
index 7bd6c59..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBSection.i
+++ /dev/null
@@ -1,145 +0,0 @@
-//===-- SWIG Interface for SBSection ----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents an executable image section.
-
-SBSection supports iteration through its subsection, represented as SBSection
-as well.  For example,
-
-    for sec in exe_module:
-        if sec.GetName() == '__TEXT':
-            print sec
-            break
-    print INDENT + 'Number of subsections: %d' % sec.GetNumSubSections()
-    for subsec in sec:
-        print INDENT + repr(subsec)
-
-produces:
-
-[0x0000000100000000-0x0000000100002000) a.out.__TEXT
-    Number of subsections: 6
-    [0x0000000100001780-0x0000000100001d5c) a.out.__TEXT.__text
-    [0x0000000100001d5c-0x0000000100001da4) a.out.__TEXT.__stubs
-    [0x0000000100001da4-0x0000000100001e2c) a.out.__TEXT.__stub_helper
-    [0x0000000100001e2c-0x0000000100001f10) a.out.__TEXT.__cstring
-    [0x0000000100001f10-0x0000000100001f68) a.out.__TEXT.__unwind_info
-    [0x0000000100001f68-0x0000000100001ff8) a.out.__TEXT.__eh_frame
-
-See also SBModule."
-) SBSection;
-
-class SBSection
-{
-public:
-
-    SBSection ();
-
-    SBSection (const lldb::SBSection &rhs);
-
-    ~SBSection ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    const char *
-    GetName ();
-
-    lldb::SBSection
-    GetParent();
-
-    lldb::SBSection
-    FindSubSection (const char *sect_name);
-
-    size_t
-    GetNumSubSections ();
-
-    lldb::SBSection
-    GetSubSectionAtIndex (size_t idx);
-
-    lldb::addr_t
-    GetFileAddress ();
-
-    lldb::addr_t
-    GetLoadAddress (lldb::SBTarget &target);
-
-    lldb::addr_t
-    GetByteSize ();
-
-    uint64_t
-    GetFileOffset ();
-
-    uint64_t
-    GetFileByteSize ();
-
-    lldb::SBData
-    GetSectionData ();
-
-    lldb::SBData
-    GetSectionData (uint64_t offset,
-                    uint64_t size);
-
-    SectionType
-    GetSectionType ();
-
-    uint32_t
-    GetPermissions() const;
-
-    %feature("docstring", "
-    Return the size of a target's byte represented by this section
-    in numbers of host bytes. Note that certain architectures have
-    varying minimum addressable unit (i.e. byte) size for their
-    CODE or DATA buses.
-
-    @return
-        The number of host (8-bit) bytes needed to hold a target byte") GetTargetByteSize;
-    uint32_t
-    GetTargetByteSize ();
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    bool
-    operator == (const lldb::SBSection &rhs);
-
-    bool
-    operator != (const lldb::SBSection &rhs);
-
-    %pythoncode %{
-        def __iter__(self):
-            '''Iterate over all subsections in a lldb.SBSection object.'''
-            return lldb_iter(self, 'GetNumSubSections', 'GetSubSectionAtIndex')
-
-        def __len__(self):
-            '''Return the number of subsections in a lldb.SBSection object.'''
-            return self.GetNumSubSections()
-
-        def get_addr(self):
-            return SBAddress(self, 0)
-
-        name = property(GetName, None, doc='''A read only property that returns the name of this section as a string.''')
-        addr = property(get_addr, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this section.''')
-        file_addr = property(GetFileAddress, None, doc='''A read only property that returns an integer that represents the starting "file" address for this section, or the address of the section in the object file in which it is defined.''')
-        size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes of this section as an integer.''')
-        file_offset = property(GetFileOffset, None, doc='''A read only property that returns the file offset in bytes of this section as an integer.''')
-        file_size = property(GetFileByteSize, None, doc='''A read only property that returns the file size in bytes of this section as an integer.''')
-        data = property(GetSectionData, None, doc='''A read only property that returns an lldb object that represents the bytes for this section (lldb.SBData) for this section.''')
-        type = property(GetSectionType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSectionType") that represents the type of this section (code, data, etc.).''')
-        target_byte_size = property(GetTargetByteSize, None, doc='''A read only property that returns the size of a target byte represented by this section as a number of host bytes.''')
-    %}
-
-private:
-
-    std::unique_ptr<lldb_private::SectionImpl> m_opaque_ap;
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBStream.i b/src/llvm-project/lldb/scripts/interface/SBStream.i
deleted file mode 100644
index fa88290..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBStream.i
+++ /dev/null
@@ -1,91 +0,0 @@
-//===-- SWIG Interface for SBStream -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdio.h>
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a destination for streaming data output to. By default, a string
-stream is created.
-
-For example (from test/source-manager/TestSourceManager.py),
-
-        # Create the filespec for 'main.c'.
-        filespec = lldb.SBFileSpec('main.c', False)
-        source_mgr = self.dbg.GetSourceManager()
-        # Use a string stream as the destination.
-        stream = lldb.SBStream()
-        source_mgr.DisplaySourceLinesWithLineNumbers(filespec,
-                                                     self.line,
-                                                     2, # context before
-                                                     2, # context after
-                                                     '=>', # prefix for current line
-                                                     stream)
-
-        #    2
-        #    3    int main(int argc, char const *argv[]) {
-        # => 4        printf('Hello world.\\n'); // Set break point at this line.
-        #    5        return 0;
-        #    6    }
-        self.expect(stream.GetData(), 'Source code displayed correctly',
-                    exe=False,
-            patterns = ['=> %d.*Hello world' % self.line])") SBStream;
-class SBStream
-{
-public:
-
-    SBStream ();
-
-    ~SBStream ();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    %feature("docstring", "
-    If this stream is not redirected to a file, it will maintain a local
-    cache for the stream data which can be accessed using this accessor.") GetData;
-    const char *
-    GetData ();
-
-    %feature("docstring", "
-    If this stream is not redirected to a file, it will maintain a local
-    cache for the stream output whose length can be accessed using this
-    accessor.") GetSize;
-    size_t
-    GetSize();
-
-    // wrapping the variadic Printf() with a plain Print()
-    // because it is hard to support varargs in SWIG bridgings
-    %extend {
-        void Print (const char* str)
-        {
-            self->Printf("%s", str);
-        }
-    }
-
-    void
-    RedirectToFile (const char *path, bool append);
-
-    void
-    RedirectToFileHandle (FILE *fh, bool transfer_fh_ownership);
-
-    void
-    RedirectToFileDescriptor (int fd, bool transfer_fh_ownership);
-
-    %feature("docstring", "
-    If the stream is redirected to a file, forget about the file and if
-    ownership of the file was transferred to this object, close the file.
-    If the stream is backed by a local cache, clear this cache.") Clear;
-    void
-    Clear ();
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBStringList.i b/src/llvm-project/lldb/scripts/interface/SBStringList.i
deleted file mode 100644
index 68653b5..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBStringList.i
+++ /dev/null
@@ -1,55 +0,0 @@
-//===-- SWIG Interface for SBStringList -------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-class SBStringList
-{
-public:
-
-    SBStringList ();
-
-    SBStringList (const lldb::SBStringList &rhs);
-
-    ~SBStringList ();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    void
-    AppendString (const char *str);
-
-    void
-    AppendList (const char **strv, int strc);
-
-    void
-    AppendList (const lldb::SBStringList &strings);
-
-    uint32_t
-    GetSize () const;
-
-    const char *
-    GetStringAtIndex (size_t idx);
-
-    void
-    Clear ();
-
-    %pythoncode%{
-    def __iter__(self):
-        '''Iterate over all strings in a lldb.SBStringList object.'''
-        return lldb_iter(self, 'GetSize', 'GetStringAtIndex')
-
-    def __len__(self):
-        '''Return the number of strings in a lldb.SBStringList object.'''
-        return self.GetSize()
-    %}
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBStructuredData.i b/src/llvm-project/lldb/scripts/interface/SBStructuredData.i
deleted file mode 100644
index 99b3247..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBStructuredData.i
+++ /dev/null
@@ -1,65 +0,0 @@
-//===-- SWIG Interface for SBStructuredData ---------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-    %feature("docstring",
-             "A class representing a StructuredData event.
-
-              This class wraps the event type generated by StructuredData
-              features."
-             ) SBStructuredData;
-    class SBStructuredData
-    {
-    public:
-        SBStructuredData();
-
-        SBStructuredData(const lldb::SBStructuredData &rhs);
-
-        SBStructuredData(const lldb::EventSP &event_sp);
-
-        ~SBStructuredData();
-
-        bool
-        IsValid() const;
-
-        explicit operator bool() const;
-
-        void
-        Clear();
-
-        lldb::SBStructuredData &operator=(const lldb::SBStructuredData &rhs);
-
-        lldb::StructuredDataType GetType() const;
-
-        size_t GetSize() const;
-
-        bool GetKeys(lldb::SBStringList &keys) const;
-
-        lldb::SBStructuredData GetValueForKey(const char *key) const;
-
-        lldb::SBStructuredData GetItemAtIndex(size_t idx) const;
-
-        uint64_t GetIntegerValue(uint64_t fail_value = 0) const;
-
-        double GetFloatValue(double fail_value = 0.0) const;
-
-        bool GetBooleanValue(bool fail_value = false) const;
-
-        size_t GetStringValue(char *dst, size_t dst_len) const;
-
-        lldb::SBError
-        GetAsJSON(lldb::SBStream &stream) const;
-
-        lldb::SBError
-        GetDescription(lldb::SBStream &stream) const;
-
-        lldb::SBError
-        SetFromJSON(lldb::SBStream &stream);
-    };
-}
diff --git a/src/llvm-project/lldb/scripts/interface/SBSymbol.i b/src/llvm-project/lldb/scripts/interface/SBSymbol.i
deleted file mode 100644
index 7391b9a..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBSymbol.i
+++ /dev/null
@@ -1,92 +0,0 @@
-//===-- SWIG Interface for SBSymbol -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents the symbol possibly associated with a stack frame.
-SBModule contains SBSymbol(s). SBSymbol can also be retrieved from SBFrame.
-
-See also SBModule and SBFrame."
-) SBSymbol;
-class SBSymbol
-{
-public:
-
-    SBSymbol ();
-
-    ~SBSymbol ();
-
-    SBSymbol (const lldb::SBSymbol &rhs);
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-
-    const char *
-    GetName() const;
-
-    const char *
-    GetDisplayName() const;
-
-    const char *
-    GetMangledName () const;
-
-    lldb::SBInstructionList
-    GetInstructions (lldb::SBTarget target);
-
-    lldb::SBInstructionList
-    GetInstructions (lldb::SBTarget target, const char *flavor_string);
-
-    SBAddress
-    GetStartAddress ();
-
-    SBAddress
-    GetEndAddress ();
-
-    uint32_t
-    GetPrologueByteSize ();
-
-    SymbolType
-    GetType ();
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    bool
-    IsExternal();
-
-    bool
-    IsSynthetic();
-
-    bool
-    operator == (const lldb::SBSymbol &rhs) const;
-
-    bool
-    operator != (const lldb::SBSymbol &rhs) const;
-
-    %pythoncode %{
-        def get_instructions_from_current_target (self):
-            return self.GetInstructions (target)
-
-        name = property(GetName, None, doc='''A read only property that returns the name for this symbol as a string.''')
-        mangled = property(GetMangledName, None, doc='''A read only property that returns the mangled (linkage) name for this symbol as a string.''')
-        type = property(GetType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eSymbolType") that represents the type of this symbol.''')
-        addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this symbol.''')
-        end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this symbol.''')
-        prologue_size = property(GetPrologueByteSize, None, doc='''A read only property that returns the size in bytes of the prologue instructions as an unsigned integer.''')
-        instructions = property(get_instructions_from_current_target, None, doc='''A read only property that returns an lldb object that represents the instructions (lldb.SBInstructionList) for this symbol.''')
-        external = property(IsExternal, None, doc='''A read only property that returns a boolean value that indicates if this symbol is externally visiable (exported) from the module that contains it.''')
-        synthetic = property(IsSynthetic, None, doc='''A read only property that returns a boolean value that indicates if this symbol was synthetically created from information in module that contains it.''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBSymbolContext.i b/src/llvm-project/lldb/scripts/interface/SBSymbolContext.i
deleted file mode 100644
index 29cc953..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBSymbolContext.i
+++ /dev/null
@@ -1,96 +0,0 @@
-//===-- SWIG Interface for SBSymbolContext ----------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"A context object that provides access to core debugger entities.
-
-Many debugger functions require a context when doing lookups. This class
-provides a common structure that can be used as the result of a query that
-can contain a single result.
-
-For example,
-
-        exe = os.path.join(os.getcwd(), 'a.out')
-
-        # Create a target for the debugger.
-        target = self.dbg.CreateTarget(exe)
-
-        # Now create a breakpoint on main.c by name 'c'.
-        breakpoint = target.BreakpointCreateByName('c', 'a.out')
-
-        # Now launch the process, and do not stop at entry point.
-        process = target.LaunchSimple(None, None, os.getcwd())
-
-        # The inferior should stop on 'c'.
-        from lldbutil import get_stopped_thread
-        thread = get_stopped_thread(process, lldb.eStopReasonBreakpoint)
-        frame0 = thread.GetFrameAtIndex(0)
-
-        # Now get the SBSymbolContext from this frame.  We want everything. :-)
-        context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
-
-        # Get the module.
-        module = context.GetModule()
-        ...
-
-        # And the compile unit associated with the frame.
-        compileUnit = context.GetCompileUnit()
-        ...
-"
-) SBSymbolContext;
-class SBSymbolContext
-{
-public:
-    SBSymbolContext ();
-
-    SBSymbolContext (const lldb::SBSymbolContext& rhs);
-
-    ~SBSymbolContext ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    lldb::SBModule        GetModule ();
-    lldb::SBCompileUnit   GetCompileUnit ();
-    lldb::SBFunction      GetFunction ();
-    lldb::SBBlock         GetBlock ();
-    lldb::SBLineEntry     GetLineEntry ();
-    lldb::SBSymbol        GetSymbol ();
-
-    void SetModule      (lldb::SBModule module);
-    void SetCompileUnit (lldb::SBCompileUnit compile_unit);
-    void SetFunction    (lldb::SBFunction function);
-    void SetBlock       (lldb::SBBlock block);
-    void SetLineEntry   (lldb::SBLineEntry line_entry);
-    void SetSymbol      (lldb::SBSymbol symbol);
-
-    lldb::SBSymbolContext
-    GetParentOfInlinedScope (const lldb::SBAddress &curr_frame_pc,
-                             lldb::SBAddress &parent_frame_addr) const;
-
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-
-    %pythoncode %{
-        module = property(GetModule, SetModule, doc='''A read/write property that allows the getting/setting of the module (lldb.SBModule) in this symbol context.''')
-        compile_unit = property(GetCompileUnit, SetCompileUnit, doc='''A read/write property that allows the getting/setting of the compile unit (lldb.SBCompileUnit) in this symbol context.''')
-        function = property(GetFunction, SetFunction, doc='''A read/write property that allows the getting/setting of the function (lldb.SBFunction) in this symbol context.''')
-        block = property(GetBlock, SetBlock, doc='''A read/write property that allows the getting/setting of the block (lldb.SBBlock) in this symbol context.''')
-        symbol = property(GetSymbol, SetSymbol, doc='''A read/write property that allows the getting/setting of the symbol (lldb.SBSymbol) in this symbol context.''')
-        line_entry = property(GetLineEntry, SetLineEntry, doc='''A read/write property that allows the getting/setting of the line entry (lldb.SBLineEntry) in this symbol context.''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBSymbolContextList.i b/src/llvm-project/lldb/scripts/interface/SBSymbolContextList.i
deleted file mode 100644
index 4ac6d82..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBSymbolContextList.i
+++ /dev/null
@@ -1,135 +0,0 @@
-//===-- SWIG Interface for SBSymbolContextList ------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a list of symbol context object. See also SBSymbolContext.
-
-For example (from test/python_api/target/TestTargetAPI.py),
-
-    def find_functions(self, exe_name):
-        '''Exercise SBTaget.FindFunctions() API.'''
-        exe = os.path.join(os.getcwd(), exe_name)
-
-        # Create a target by the debugger.
-        target = self.dbg.CreateTarget(exe)
-        self.assertTrue(target, VALID_TARGET)
-
-        list = lldb.SBSymbolContextList()
-        num = target.FindFunctions('c', lldb.eFunctionNameTypeAuto, False, list)
-        self.assertTrue(num == 1 and list.GetSize() == 1)
-
-        for sc in list:
-            self.assertTrue(sc.GetModule().GetFileSpec().GetFilename() == exe_name)
-            self.assertTrue(sc.GetSymbol().GetName() == 'c')") SBSymbolContextList;
-class SBSymbolContextList
-{
-public:
-    SBSymbolContextList ();
-
-    SBSymbolContextList (const lldb::SBSymbolContextList& rhs);
-
-    ~SBSymbolContextList ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    uint32_t
-    GetSize() const;
-
-    SBSymbolContext
-    GetContextAtIndex (uint32_t idx);
-
-    void
-    Append (lldb::SBSymbolContext &sc);
-
-    void
-    Append (lldb::SBSymbolContextList &sc_list);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    void
-    Clear();
-
-    %pythoncode %{
-        def __iter__(self):
-            '''Iterate over all symbol contexts in a lldb.SBSymbolContextList
-            object.'''
-            return lldb_iter(self, 'GetSize', 'GetContextAtIndex')
-
-        def __len__(self):
-            return int(self.GetSize())
-
-        def __getitem__(self, key):
-            count = len(self)
-            if type(key) is int:
-                if key < count:
-                    return self.GetContextAtIndex(key)
-                else:
-                    raise IndexError
-            raise TypeError
-
-        def get_module_array(self):
-            a = []
-            for i in range(len(self)):
-                obj = self.GetContextAtIndex(i).module
-                if obj:
-                    a.append(obj)
-            return a
-
-        def get_compile_unit_array(self):
-            a = []
-            for i in range(len(self)):
-                obj = self.GetContextAtIndex(i).compile_unit
-                if obj:
-                    a.append(obj)
-            return a
-        def get_function_array(self):
-            a = []
-            for i in range(len(self)):
-                obj = self.GetContextAtIndex(i).function
-                if obj:
-                    a.append(obj)
-            return a
-        def get_block_array(self):
-            a = []
-            for i in range(len(self)):
-                obj = self.GetContextAtIndex(i).block
-                if obj:
-                    a.append(obj)
-            return a
-        def get_symbol_array(self):
-            a = []
-            for i in range(len(self)):
-                obj = self.GetContextAtIndex(i).symbol
-                if obj:
-                    a.append(obj)
-            return a
-        def get_line_entry_array(self):
-            a = []
-            for i in range(len(self)):
-                obj = self.GetContextAtIndex(i).line_entry
-                if obj:
-                    a.append(obj)
-            return a
-
-        modules = property(get_module_array, None, doc='''Returns a list() of lldb.SBModule objects, one for each module in each SBSymbolContext object in this list.''')
-        compile_units = property(get_compile_unit_array, None, doc='''Returns a list() of lldb.SBCompileUnit objects, one for each compile unit in each SBSymbolContext object in this list.''')
-        functions = property(get_function_array, None, doc='''Returns a list() of lldb.SBFunction objects, one for each function in each SBSymbolContext object in this list.''')
-        blocks = property(get_block_array, None, doc='''Returns a list() of lldb.SBBlock objects, one for each block in each SBSymbolContext object in this list.''')
-        line_entries = property(get_line_entry_array, None, doc='''Returns a list() of lldb.SBLineEntry objects, one for each line entry in each SBSymbolContext object in this list.''')
-        symbols = property(get_symbol_array, None, doc='''Returns a list() of lldb.SBSymbol objects, one for each symbol in each SBSymbolContext object in this list.''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBTarget.i b/src/llvm-project/lldb/scripts/interface/SBTarget.i
deleted file mode 100644
index e064852..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBTarget.i
+++ /dev/null
@@ -1,1070 +0,0 @@
-//===-- SWIG Interface for SBTarget -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-
-%feature("docstring",
-"Represents the target program running under the debugger.
-
-SBTarget supports module, breakpoint, and watchpoint iterations. For example,
-
-    for m in target.module_iter():
-        print m
-
-produces:
-
-(x86_64) /Volumes/data/lldb/svn/trunk/test/python_api/lldbutil/iter/a.out
-(x86_64) /usr/lib/dyld
-(x86_64) /usr/lib/libstdc++.6.dylib
-(x86_64) /usr/lib/libSystem.B.dylib
-(x86_64) /usr/lib/system/libmathCommon.A.dylib
-(x86_64) /usr/lib/libSystem.B.dylib(__commpage)
-
-and,
-
-    for b in target.breakpoint_iter():
-        print b
-
-produces:
-
-SBBreakpoint: id = 1, file ='main.cpp', line = 66, locations = 1
-SBBreakpoint: id = 2, file ='main.cpp', line = 85, locations = 1
-
-and,
-
-    for wp_loc in target.watchpoint_iter():
-        print wp_loc
-
-produces:
-
-Watchpoint 1: addr = 0x1034ca048 size = 4 state = enabled type = rw
-    declare @ '/Volumes/data/lldb/svn/trunk/test/python_api/watchpoint/main.c:12'
-    hw_index = 0  hit_count = 2     ignore_count = 0"
-) SBTarget;
-class SBTarget
-{
-public:
-    //------------------------------------------------------------------
-    // Broadcaster bits.
-    //------------------------------------------------------------------
-    enum
-    {
-        eBroadcastBitBreakpointChanged  = (1 << 0),
-        eBroadcastBitModulesLoaded      = (1 << 1),
-        eBroadcastBitModulesUnloaded    = (1 << 2),
-        eBroadcastBitWatchpointChanged  = (1 << 3),
-        eBroadcastBitSymbolsLoaded      = (1 << 4)
-    };
-
-    //------------------------------------------------------------------
-    // Constructors
-    //------------------------------------------------------------------
-    SBTarget ();
-
-    SBTarget (const lldb::SBTarget& rhs);
-
-    //------------------------------------------------------------------
-    // Destructor
-    //------------------------------------------------------------------
-    ~SBTarget();
-
-    static const char *
-    GetBroadcasterClassName ();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    static bool
-    EventIsTargetEvent (const lldb::SBEvent &event);
-
-    static lldb::SBTarget
-    GetTargetFromEvent (const lldb::SBEvent &event);
-
-    static uint32_t
-    GetNumModulesFromEvent (const lldb::SBEvent &event);
-
-    static lldb::SBModule
-    GetModuleAtIndexFromEvent (const uint32_t idx, const lldb::SBEvent &event);
-
-    lldb::SBProcess
-    GetProcess ();
-
-
-    %feature("docstring", "
-    Return the platform object associated with the target.
-
-    After return, the platform object should be checked for
-    validity.
-
-    @return
-        A platform object.") GetPlatform;
-    lldb::SBPlatform
-    GetPlatform ();
-
-    %feature("docstring", "
-    Install any binaries that need to be installed.
-
-    This function does nothing when debugging on the host system.
-    When connected to remote platforms, the target's main executable
-    and any modules that have their install path set will be
-    installed on the remote platform. If the main executable doesn't
-    have an install location set, it will be installed in the remote
-    platform's working directory.
-
-    @return
-        An error describing anything that went wrong during
-        installation.") Install;
-    lldb::SBError
-    Install();
-
-    %feature("docstring", "
-    Launch a new process.
-
-    Launch a new process by spawning a new process using the
-    target object's executable module's file as the file to launch.
-    Arguments are given in argv, and the environment variables
-    are in envp. Standard input and output files can be
-    optionally re-directed to stdin_path, stdout_path, and
-    stderr_path.
-
-    @param[in] listener
-        An optional listener that will receive all process events.
-        If listener is valid then listener will listen to all
-        process events. If not valid, then this target's debugger
-        (SBTarget::GetDebugger()) will listen to all process events.
-
-    @param[in] argv
-        The argument array.
-
-    @param[in] envp
-        The environment array.
-
-    @param[in] launch_flags
-        Flags to modify the launch (@see lldb::LaunchFlags)
-
-    @param[in] stdin_path
-        The path to use when re-directing the STDIN of the new
-        process. If all stdXX_path arguments are NULL, a pseudo
-        terminal will be used.
-
-    @param[in] stdout_path
-        The path to use when re-directing the STDOUT of the new
-        process. If all stdXX_path arguments are NULL, a pseudo
-        terminal will be used.
-
-    @param[in] stderr_path
-        The path to use when re-directing the STDERR of the new
-        process. If all stdXX_path arguments are NULL, a pseudo
-        terminal will be used.
-
-    @param[in] working_directory
-        The working directory to have the child process run in
-
-    @param[in] launch_flags
-        Some launch options specified by logical OR'ing
-        lldb::LaunchFlags enumeration values together.
-
-    @param[in] stop_at_entry
-        If false do not stop the inferior at the entry point.
-
-    @param[out]
-        An error object. Contains the reason if there is some failure.
-
-    @return
-         A process object for the newly created process.
-
-    For example,
-
-        process = target.Launch(self.dbg.GetListener(), None, None,
-                                None, '/tmp/stdout.txt', None,
-                                None, 0, False, error)
-
-    launches a new process by passing nothing for both the args and the envs
-    and redirect the standard output of the inferior to the /tmp/stdout.txt
-    file. It does not specify a working directory so that the debug server
-    will use its idea of what the current working directory is for the
-    inferior. Also, we ask the debugger not to stop the inferior at the
-    entry point. If no breakpoint is specified for the inferior, it should
-    run to completion if no user interaction is required.") Launch;
-    lldb::SBProcess
-    Launch (SBListener &listener,
-            char const **argv,
-            char const **envp,
-            const char *stdin_path,
-            const char *stdout_path,
-            const char *stderr_path,
-            const char *working_directory,
-            uint32_t launch_flags,   // See LaunchFlags
-            bool stop_at_entry,
-            lldb::SBError& error);
-
-    %feature("docstring", "
-    Launch a new process with sensible defaults.
-
-    @param[in] argv
-        The argument array.
-
-    @param[in] envp
-        The environment array.
-
-    @param[in] working_directory
-        The working directory to have the child process run in
-
-    Default: listener
-        Set to the target's debugger (SBTarget::GetDebugger())
-
-    Default: launch_flags
-        Empty launch flags
-
-    Default: stdin_path
-    Default: stdout_path
-    Default: stderr_path
-        A pseudo terminal will be used.
-
-    @return
-         A process object for the newly created process.
-
-    For example,
-
-        process = target.LaunchSimple(['X', 'Y', 'Z'], None, os.getcwd())
-
-    launches a new process by passing 'X', 'Y', 'Z' as the args to the
-    executable.") LaunchSimple;
-    lldb::SBProcess
-    LaunchSimple (const char **argv,
-                  const char **envp,
-                  const char *working_directory);
-
-    lldb::SBProcess
-    Launch (lldb::SBLaunchInfo &launch_info, lldb::SBError& error);
-
-    %feature("docstring", "
-    Load a core file
-
-    @param[in] core_file
-        File path of the core dump.
-
-    @param[out] error
-        An error explaining what went wrong if the operation fails.
-        (Optional)
-
-    @return
-         A process object for the newly created core file.
-
-    For example,
-
-        process = target.LoadCore('./a.out.core')
-
-    loads a new core file and returns the process object.") LoadCore;
-    lldb::SBProcess
-    LoadCore(const char *core_file);
-
-    lldb::SBProcess
-    LoadCore(const char *core_file, lldb::SBError &error);
-
-    lldb::SBProcess
-    Attach(lldb::SBAttachInfo &attach_info, lldb::SBError& error);
-
-    %feature("docstring", "
-    Attach to process with pid.
-
-    @param[in] listener
-        An optional listener that will receive all process events.
-        If listener is valid then listener will listen to all
-        process events. If not valid, then this target's debugger
-        (SBTarget::GetDebugger()) will listen to all process events.
-
-    @param[in] pid
-        The process ID to attach to.
-
-    @param[out]
-        An error explaining what went wrong if attach fails.
-
-    @return
-         A process object for the attached process.") AttachToProcessWithID;
-    lldb::SBProcess
-    AttachToProcessWithID (SBListener &listener,
-                           lldb::pid_t pid,
-                           lldb::SBError& error);
-
-    %feature("docstring", "
-    Attach to process with name.
-
-    @param[in] listener
-        An optional listener that will receive all process events.
-        If listener is valid then listener will listen to all
-        process events. If not valid, then this target's debugger
-        (SBTarget::GetDebugger()) will listen to all process events.
-
-    @param[in] name
-        Basename of process to attach to.
-
-    @param[in] wait_for
-        If true wait for a new instance of 'name' to be launched.
-
-    @param[out]
-        An error explaining what went wrong if attach fails.
-
-    @return
-         A process object for the attached process.") AttachToProcessWithName;
-    lldb::SBProcess
-    AttachToProcessWithName (SBListener &listener,
-                             const char *name,
-                             bool wait_for,
-                             lldb::SBError& error);
-
-    %feature("docstring", "
-    Connect to a remote debug server with url.
-
-    @param[in] listener
-        An optional listener that will receive all process events.
-        If listener is valid then listener will listen to all
-        process events. If not valid, then this target's debugger
-        (SBTarget::GetDebugger()) will listen to all process events.
-
-    @param[in] url
-        The url to connect to, e.g., 'connect://localhost:12345'.
-
-    @param[in] plugin_name
-        The plugin name to be used; can be NULL.
-
-    @param[out]
-        An error explaining what went wrong if the connect fails.
-
-    @return
-         A process object for the connected process.") ConnectRemote;
-    lldb::SBProcess
-    ConnectRemote (SBListener &listener,
-                   const char *url,
-                   const char *plugin_name,
-                   SBError& error);
-
-    lldb::SBFileSpec
-    GetExecutable ();
-
-    %feature("docstring", "
-    Append the path mapping (from -> to) to the target's paths mapping list.") AppendImageSearchPath;
-    void
-    AppendImageSearchPath (const char *from,
-                           const char *to,
-                           SBError &error);
-
-    bool
-    AddModule (lldb::SBModule &module);
-
-    lldb::SBModule
-    AddModule (const char *path,
-               const char *triple,
-               const char *uuid);
-
-    lldb::SBModule
-    AddModule (const char *path,
-               const char *triple,
-               const char *uuid_cstr,
-               const char *symfile);
-
-    lldb::SBModule
-    AddModule (const SBModuleSpec &module_spec);
-
-    uint32_t
-    GetNumModules () const;
-
-    lldb::SBModule
-    GetModuleAtIndex (uint32_t idx);
-
-    bool
-    RemoveModule (lldb::SBModule module);
-
-    lldb::SBDebugger
-    GetDebugger() const;
-
-    lldb::SBModule
-    FindModule (const lldb::SBFileSpec &file_spec);
-
-    %feature("docstring", "
-    Find compile units related to *this target and passed source
-    file.
-
-    @param[in] sb_file_spec
-        A lldb::SBFileSpec object that contains source file
-        specification.
-
-    @return
-        A lldb::SBSymbolContextList that gets filled in with all of
-        the symbol contexts for all the matches.") FindCompileUnits;
-    lldb::SBSymbolContextList
-    FindCompileUnits (const lldb::SBFileSpec &sb_file_spec);
-
-    lldb::ByteOrder
-    GetByteOrder ();
-
-    uint32_t
-    GetAddressByteSize();
-
-    const char *
-    GetTriple ();
-
-    %feature("docstring", "
-    Architecture data byte width accessor
-
-    @return
-    The size in 8-bit (host) bytes of a minimum addressable
-    unit from the Architecture's data bus") GetDataByteSize;
-    uint32_t
-    GetDataByteSize ();
-
-    %feature("docstring", "
-    Architecture code byte width accessor
-
-    @return
-    The size in 8-bit (host) bytes of a minimum addressable
-    unit from the Architecture's code bus") GetCodeByteSize;
-    uint32_t
-    GetCodeByteSize ();
-
-    lldb::SBError
-    SetSectionLoadAddress (lldb::SBSection section,
-                           lldb::addr_t section_base_addr);
-
-    lldb::SBError
-    ClearSectionLoadAddress (lldb::SBSection section);
-
-    lldb::SBError
-    SetModuleLoadAddress (lldb::SBModule module,
-                          int64_t sections_offset);
-
-    lldb::SBError
-    ClearModuleLoadAddress (lldb::SBModule module);
-
-    %feature("docstring", "
-    Find functions by name.
-
-    @param[in] name
-        The name of the function we are looking for.
-
-    @param[in] name_type_mask
-        A logical OR of one or more FunctionNameType enum bits that
-        indicate what kind of names should be used when doing the
-        lookup. Bits include fully qualified names, base names,
-        C++ methods, or ObjC selectors.
-        See FunctionNameType for more details.
-
-    @return
-        A lldb::SBSymbolContextList that gets filled in with all of
-        the symbol contexts for all the matches.") FindFunctions;
-    lldb::SBSymbolContextList
-    FindFunctions (const char *name,
-                   uint32_t name_type_mask = lldb::eFunctionNameTypeAny);
-
-    lldb::SBType
-    FindFirstType (const char* type);
-
-    lldb::SBTypeList
-    FindTypes (const char* type);
-
-    lldb::SBType
-    GetBasicType(lldb::BasicType type);
-
-    lldb::SBSourceManager
-    GetSourceManager ();
-
-    %feature("docstring", "
-    Find global and static variables by name.
-
-    @param[in] name
-        The name of the global or static variable we are looking
-        for.
-
-    @param[in] max_matches
-        Allow the number of matches to be limited to max_matches.
-
-    @return
-        A list of matched variables in an SBValueList.") FindGlobalVariables;
-    lldb::SBValueList
-    FindGlobalVariables (const char *name,
-                         uint32_t max_matches);
-
-     %feature("docstring", "
-    Find the first global (or static) variable by name.
-
-    @param[in] name
-        The name of the global or static variable we are looking
-        for.
-
-    @return
-        An SBValue that gets filled in with the found variable (if any).") FindFirstGlobalVariable;
-    lldb::SBValue
-    FindFirstGlobalVariable (const char* name);
-
-
-    lldb::SBValueList
-    FindGlobalVariables(const char *name,
-                        uint32_t max_matches,
-                        MatchType matchtype);
-
-    lldb::SBSymbolContextList
-    FindGlobalFunctions(const char *name,
-                        uint32_t max_matches,
-                        MatchType matchtype);
-
-    void
-    Clear ();
-
-     %feature("docstring", "
-    Resolve a current file address into a section offset address.
-
-    @param[in] file_addr
-
-    @return
-        An SBAddress which will be valid if...") ResolveFileAddress;
-    lldb::SBAddress
-    ResolveFileAddress (lldb::addr_t file_addr);
-
-    lldb::SBAddress
-    ResolveLoadAddress (lldb::addr_t vm_addr);
-
-    lldb::SBAddress
-    ResolvePastLoadAddress (uint32_t stop_id, lldb::addr_t vm_addr);
-
-    SBSymbolContext
-    ResolveSymbolContextForAddress (const SBAddress& addr,
-                                    uint32_t resolve_scope);
-
-     %feature("docstring", "
-    Read target memory. If a target process is running then memory
-    is read from here. Otherwise the memory is read from the object
-    files. For a target whose bytes are sized as a multiple of host
-    bytes, the data read back will preserve the target's byte order.
-
-    @param[in] addr
-        A target address to read from.
-
-    @param[out] buf
-        The buffer to read memory into.
-
-    @param[in] size
-        The maximum number of host bytes to read in the buffer passed
-        into this call
-
-    @param[out] error
-        Error information is written here if the memory read fails.
-
-    @return
-        The amount of data read in host bytes.") ReadMemory;
-    size_t
-    ReadMemory (const SBAddress addr, void *buf, size_t size, lldb::SBError &error);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByLocation (const char *file, uint32_t line);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line, lldb::addr_t offset);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line,
-                                lldb::addr_t offset, SBFileSpecList &module_list);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByLocation (const lldb::SBFileSpec &file_spec, uint32_t line,
-                                uint32_t column, lldb::addr_t offset,
-                                SBFileSpecList &module_list);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByName (const char *symbol_name, const char *module_name = NULL);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByName (const char *symbol_name,
-                            uint32_t func_name_type,           // Logical OR one or more FunctionNameType enum bits
-                            const SBFileSpecList &module_list,
-                            const SBFileSpecList &comp_unit_list);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByName (const char *symbol_name,
-                            uint32_t func_name_type,           // Logical OR one or more FunctionNameType enum bits
-                            lldb::LanguageType symbol_language,
-                            const SBFileSpecList &module_list,
-                            const SBFileSpecList &comp_unit_list);
-
-%typemap(in) (const char **symbol_name, uint32_t num_names) {
-  using namespace lldb_private;
-  /* Check if is a list  */
-  if (PythonList::Check($input)) {
-    PythonList list(PyRefType::Borrowed, $input);
-    $2 = list.GetSize();
-    int i = 0;
-    $1 = (char**)malloc(($2+1)*sizeof(char*));
-    for (i = 0; i < $2; i++) {
-      PythonString py_str = list.GetItemAtIndex(i).AsType<PythonString>();
-      if (!py_str.IsAllocated()) {
-        PyErr_SetString(PyExc_TypeError,"list must contain strings and blubby");
-        free($1);
-        return nullptr;
-      }
-
-      $1[i] = const_cast<char*>(py_str.GetString().data());
-    }
-    $1[i] = 0;
-  } else if ($input == Py_None) {
-    $1 =  NULL;
-  } else {
-    PyErr_SetString(PyExc_TypeError,"not a list");
-    return NULL;
-  }
-}
-
-//%typecheck(SWIG_TYPECHECK_STRING_ARRAY) (const char *symbol_name[], uint32_t num_names) {
-//    $1 = 1;
-//    $2 = 1;
-//}
-
-    lldb::SBBreakpoint
-    BreakpointCreateByNames (const char **symbol_name,
-                             uint32_t num_names,
-                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
-                             const SBFileSpecList &module_list,
-                             const SBFileSpecList &comp_unit_list);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByNames (const char **symbol_name,
-                             uint32_t num_names,
-                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
-                             lldb::LanguageType symbol_language,
-                             const SBFileSpecList &module_list,
-                             const SBFileSpecList &comp_unit_list);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByNames (const char **symbol_name,
-                             uint32_t num_names,
-                             uint32_t name_type_mask,           // Logical OR one or more FunctionNameType enum bits
-                             lldb::LanguageType symbol_language,
-                             lldb::addr_t offset,
-                             const SBFileSpecList &module_list,
-                             const SBFileSpecList &comp_unit_list);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name = NULL);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByRegex (const char *symbol_name_regex,
-                             lldb::LanguageType symbol_language,
-                             const SBFileSpecList &module_list,
-                             const SBFileSpecList &comp_unit_list);
-
-    lldb::SBBreakpoint
-    BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpec &source_file, const char *module_name = NULL);
-
-    lldb::SBBreakpoint
-    BreakpointCreateBySourceRegex (const char *source_regex, const lldb::SBFileSpecList &module_list, const lldb::SBFileSpecList &file_list);
-
-    lldb::SBBreakpoint
-    BreakpointCreateBySourceRegex (const char *source_regex,
-                                   const SBFileSpecList &module_list,
-                                   const SBFileSpecList &source_file,
-                                   const SBStringList  &func_names);
-
-    lldb::SBBreakpoint
-    BreakpointCreateForException  (lldb::LanguageType language,
-                                   bool catch_bp,
-                                   bool throw_bp);
-
-    lldb::SBBreakpoint
-    BreakpointCreateByAddress (addr_t address);
-
-    lldb::SBBreakpoint
-    BreakpointCreateBySBAddress (SBAddress &sb_address);
-
-    %feature("docstring", "
-    Create a breakpoint using a scripted resolver.
-
-    @param[in] class_name
-       This is the name of the class that implements a scripted resolver.
-       The class should have the following signature:
-       class Resolver:
-           def __init__(self, bkpt, extra_args):
-               # bkpt - the breakpoint for which this is the resolver.  When
-               # the resolver finds an interesting address, call AddLocation
-               # on this breakpoint to add it.
-               #
-               # extra_args - an SBStructuredData that can be used to
-               # parametrize this instance.  Same as the extra_args passed
-               # to BreakpointCreateFromScript.
-
-           def __get_depth__ (self):
-               # This is optional, but if defined, you should return the
-               # depth at which you want the callback to be called.  The
-               # available options are:
-               #    lldb.eSearchDepthModule
-               #    lldb.eSearchDepthCompUnit
-               # The default if you don't implement this method is
-               # eSearchDepthModule.
-
-           def __callback__(self, sym_ctx):
-               # sym_ctx - an SBSymbolContext that is the cursor in the
-               # search through the program to resolve breakpoints.
-               # The sym_ctx will be filled out to the depth requested in
-               # __get_depth__.
-               # Look in this sym_ctx for new breakpoint locations,
-               # and if found use bkpt.AddLocation to add them.
-               # Note, you will only get called for modules/compile_units that
-               # pass the SearchFilter provided by the module_list & file_list
-               # passed into BreakpointCreateFromScript.
-
-           def get_short_help(self):
-               # Optional, but if implemented return a short string that will
-               # be printed at the beginning of the break list output for the
-               # breakpoint.
-
-    @param[in] extra_args
-       This is an SBStructuredData object that will get passed to the
-       constructor of the class in class_name.  You can use this to
-       reuse the same class, parametrizing it with entries from this
-       dictionary.
-
-    @param module_list
-       If this is non-empty, this will be used as the module filter in the
-       SearchFilter created for this breakpoint.
-
-    @param file_list
-       If this is non-empty, this will be used as the comp unit filter in the
-       SearchFilter created for this breakpoint.
-
-    @return
-        An SBBreakpoint that will set locations based on the logic in the
-        resolver's search callback.") BreakpointCreateFromScript;
-    lldb::SBBreakpoint BreakpointCreateFromScript(
-      const char *class_name,
-      SBStructuredData &extra_args,
-      const SBFileSpecList &module_list,
-      const SBFileSpecList &file_list,
-      bool request_hardware = false);
-
-    uint32_t
-    GetNumBreakpoints () const;
-
-    lldb::SBBreakpoint
-    GetBreakpointAtIndex (uint32_t idx) const;
-
-    bool
-    BreakpointDelete (break_id_t break_id);
-
-    lldb::SBBreakpoint
-    FindBreakpointByID (break_id_t break_id);
-
-
-    bool FindBreakpointsByName(const char *name, SBBreakpointList &bkpt_list);
-
-    void DeleteBreakpointName(const char *name);
-
-    void GetBreakpointNames(SBStringList &names);
-
-    bool
-    EnableAllBreakpoints ();
-
-    bool
-    DisableAllBreakpoints ();
-
-    bool
-    DeleteAllBreakpoints ();
-
-     %feature("docstring", "
-    Read breakpoints from source_file and return the newly created
-    breakpoints in bkpt_list.
-
-    @param[in] source_file
-       The file from which to read the breakpoints
-
-    @param[out] bkpt_list
-       A list of the newly created breakpoints.
-
-    @return
-        An SBError detailing any errors in reading in the breakpoints.") BreakpointsCreateFromFile;
-    lldb::SBError
-    BreakpointsCreateFromFile(SBFileSpec &source_file,
-                              SBBreakpointList &bkpt_list);
-
-     %feature("docstring", "
-    Read breakpoints from source_file and return the newly created
-    breakpoints in bkpt_list.
-
-    @param[in] source_file
-       The file from which to read the breakpoints
-
-    @param[in] matching_names
-       Only read in breakpoints whose names match one of the names in this
-       list.
-
-    @param[out] bkpt_list
-       A list of the newly created breakpoints.
-
-    @return
-        An SBError detailing any errors in reading in the breakpoints.") BreakpointsCreateFromFile;
-    lldb::SBError BreakpointsCreateFromFile(SBFileSpec &source_file,
-                                          SBStringList &matching_names,
-                                          SBBreakpointList &new_bps);
-
-     %feature("docstring", "
-    Write breakpoints to dest_file.
-
-    @param[in] dest_file
-       The file to which to write the breakpoints.
-
-    @return
-        An SBError detailing any errors in writing in the breakpoints.") BreakpointsCreateFromFile;
-    lldb::SBError
-    BreakpointsWriteToFile(SBFileSpec &dest_file);
-
-     %feature("docstring", "
-    Write breakpoints listed in bkpt_list to dest_file.
-
-    @param[in] dest_file
-       The file to which to write the breakpoints.
-
-    @param[in] bkpt_list
-       Only write breakpoints from this list.
-
-    @param[in] append
-       If true, append the breakpoints in bkpt_list to the others
-       serialized in dest_file.  If dest_file doesn't exist, then a new
-       file will be created and the breakpoints in bkpt_list written to it.
-
-    @return
-        An SBError detailing any errors in writing in the breakpoints.") BreakpointsCreateFromFile;
-    lldb::SBError
-    BreakpointsWriteToFile(SBFileSpec &dest_file,
-                           SBBreakpointList &bkpt_list,
-                           bool append = false);
-
-    uint32_t
-    GetNumWatchpoints () const;
-
-    lldb::SBWatchpoint
-    GetWatchpointAtIndex (uint32_t idx) const;
-
-    bool
-    DeleteWatchpoint (lldb::watch_id_t watch_id);
-
-    lldb::SBWatchpoint
-    FindWatchpointByID (lldb::watch_id_t watch_id);
-
-    bool
-    EnableAllWatchpoints ();
-
-    bool
-    DisableAllWatchpoints ();
-
-    bool
-    DeleteAllWatchpoints ();
-
-    lldb::SBWatchpoint
-    WatchAddress (lldb::addr_t addr,
-                  size_t size,
-                  bool read,
-                  bool write,
-                  SBError &error);
-
-
-    lldb::SBBroadcaster
-    GetBroadcaster () const;
-
-     %feature("docstring", "
-    Create an SBValue with the given name by treating the memory starting at addr as an entity of type.
-
-    @param[in] name
-        The name of the resultant SBValue
-
-    @param[in] addr
-        The address of the start of the memory region to be used.
-
-    @param[in] type
-        The type to use to interpret the memory starting at addr.
-
-    @return
-        An SBValue of the given type, may be invalid if there was an error reading
-        the underlying memory.") CreateValueFromAddress;
-    lldb::SBValue
-    CreateValueFromAddress (const char *name, lldb::SBAddress addr, lldb::SBType type);
-
-    lldb::SBValue
-    CreateValueFromData (const char *name, lldb::SBData data, lldb::SBType type);
-
-    lldb::SBValue
-    CreateValueFromExpression (const char *name, const char* expr);
-
-    %feature("docstring", "
-    Disassemble a specified number of instructions starting at an address.
-    Parameters:
-       base_addr       -- the address to start disassembly from
-       count           -- the number of instructions to disassemble
-       flavor_string   -- may be 'intel' or 'att' on x86 targets to specify that style of disassembly
-    Returns an SBInstructionList.")
-    ReadInstructions;
-    lldb::SBInstructionList
-    ReadInstructions (lldb::SBAddress base_addr, uint32_t count);
-
-    lldb::SBInstructionList
-    ReadInstructions (lldb::SBAddress base_addr, uint32_t count, const char *flavor_string);
-
-    %feature("docstring", "
-    Disassemble the bytes in a buffer and return them in an SBInstructionList.
-    Parameters:
-       base_addr -- used for symbolicating the offsets in the byte stream when disassembling
-       buf       -- bytes to be disassembled
-       size      -- (C++) size of the buffer
-    Returns an SBInstructionList.")
-    GetInstructions;
-    lldb::SBInstructionList
-    GetInstructions (lldb::SBAddress base_addr, const void *buf, size_t size);
-
-    %feature("docstring", "
-    Disassemble the bytes in a buffer and return them in an SBInstructionList, with a supplied flavor.
-    Parameters:
-       base_addr -- used for symbolicating the offsets in the byte stream when disassembling
-       flavor    -- may be 'intel' or 'att' on x86 targets to specify that style of disassembly
-       buf       -- bytes to be disassembled
-       size      -- (C++) size of the buffer
-    Returns an SBInstructionList.")
-    GetInstructionsWithFlavor;
-    lldb::SBInstructionList
-    GetInstructionsWithFlavor (lldb::SBAddress base_addr, const char *flavor_string, const void *buf, size_t size);
-
-    lldb::SBSymbolContextList
-    FindSymbols (const char *name, lldb::SymbolType type = eSymbolTypeAny);
-
-    bool
-    GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level);
-
-    lldb::addr_t
-    GetStackRedZoneSize();
-
-    lldb::SBLaunchInfo
-    GetLaunchInfo () const;
-
-    void
-    SetLaunchInfo (const lldb::SBLaunchInfo &launch_info);
-
-    void SetCollectingStats(bool v);
-
-    bool GetCollectingStats();
-
-    lldb::SBStructuredData GetStatistics();
-
-    bool
-    operator == (const lldb::SBTarget &rhs) const;
-
-    bool
-    operator != (const lldb::SBTarget &rhs) const;
-
-    lldb::SBValue
-    EvaluateExpression (const char *expr);
-
-    lldb::SBValue
-    EvaluateExpression (const char *expr, const lldb::SBExpressionOptions &options);
-
-    %pythoncode %{
-        class modules_access(object):
-            '''A helper object that will lazily hand out lldb.SBModule objects for a target when supplied an index, or by full or partial path.'''
-            def __init__(self, sbtarget):
-                self.sbtarget = sbtarget
-
-            def __len__(self):
-                if self.sbtarget:
-                    return int(self.sbtarget.GetNumModules())
-                return 0
-
-            def __getitem__(self, key):
-                num_modules = self.sbtarget.GetNumModules()
-                if type(key) is int:
-                    if key < num_modules:
-                        return self.sbtarget.GetModuleAtIndex(key)
-                elif type(key) is str:
-                    if key.find('/') == -1:
-                        for idx in range(num_modules):
-                            module = self.sbtarget.GetModuleAtIndex(idx)
-                            if module.file.basename == key:
-                                return module
-                    else:
-                        for idx in range(num_modules):
-                            module = self.sbtarget.GetModuleAtIndex(idx)
-                            if module.file.fullpath == key:
-                                return module
-                    # See if the string is a UUID
-                    try:
-                        the_uuid = uuid.UUID(key)
-                        if the_uuid:
-                            for idx in range(num_modules):
-                                module = self.sbtarget.GetModuleAtIndex(idx)
-                                if module.uuid == the_uuid:
-                                    return module
-                    except:
-                        return None
-                elif type(key) is uuid.UUID:
-                    for idx in range(num_modules):
-                        module = self.sbtarget.GetModuleAtIndex(idx)
-                        if module.uuid == key:
-                            return module
-                elif type(key) is re.SRE_Pattern:
-                    matching_modules = []
-                    for idx in range(num_modules):
-                        module = self.sbtarget.GetModuleAtIndex(idx)
-                        re_match = key.search(module.path.fullpath)
-                        if re_match:
-                            matching_modules.append(module)
-                    return matching_modules
-                else:
-                    print("error: unsupported item type: %s" % type(key))
-                return None
-
-        def get_modules_access_object(self):
-            '''An accessor function that returns a modules_access() object which allows lazy module access from a lldb.SBTarget object.'''
-            return self.modules_access (self)
-
-        def get_modules_array(self):
-            '''An accessor function that returns a list() that contains all modules in a lldb.SBTarget object.'''
-            modules = []
-            for idx in range(self.GetNumModules()):
-                modules.append(self.GetModuleAtIndex(idx))
-            return modules
-
-        def module_iter(self):
-            '''Returns an iterator over all modules in a lldb.SBTarget
-            object.'''
-            return lldb_iter(self, 'GetNumModules', 'GetModuleAtIndex')
-
-        def breakpoint_iter(self):
-            '''Returns an iterator over all breakpoints in a lldb.SBTarget
-            object.'''
-            return lldb_iter(self, 'GetNumBreakpoints', 'GetBreakpointAtIndex')
-
-        def watchpoint_iter(self):
-            '''Returns an iterator over all watchpoints in a lldb.SBTarget
-            object.'''
-            return lldb_iter(self, 'GetNumWatchpoints', 'GetWatchpointAtIndex')
-
-        modules = property(get_modules_array, None, doc='''A read only property that returns a list() of lldb.SBModule objects contained in this target. This list is a list all modules that the target currently is tracking (the main executable and all dependent shared libraries).''')
-        module = property(get_modules_access_object, None, doc=r'''A read only property that returns an object that implements python operator overloading with the square brackets().\n    target.module[<int>] allows array access to any modules.\n    target.module[<str>] allows access to modules by basename, full path, or uuid string value.\n    target.module[uuid.UUID()] allows module access by UUID.\n    target.module[re] allows module access using a regular expression that matches the module full path.''')
-        process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that this target owns.''')
-        executable = property(GetExecutable, None, doc='''A read only property that returns an lldb object that represents the main executable module (lldb.SBModule) for this target.''')
-        debugger = property(GetDebugger, None, doc='''A read only property that returns an lldb object that represents the debugger (lldb.SBDebugger) that owns this target.''')
-        num_breakpoints = property(GetNumBreakpoints, None, doc='''A read only property that returns the number of breakpoints that this target has as an integer.''')
-        num_watchpoints = property(GetNumWatchpoints, None, doc='''A read only property that returns the number of watchpoints that this target has as an integer.''')
-        broadcaster = property(GetBroadcaster, None, doc='''A read only property that an lldb object that represents the broadcaster (lldb.SBBroadcaster) for this target.''')
-        byte_order = property(GetByteOrder, None, doc='''A read only property that returns an lldb enumeration value (lldb.eByteOrderLittle, lldb.eByteOrderBig, lldb.eByteOrderInvalid) that represents the byte order for this target.''')
-        addr_size = property(GetAddressByteSize, None, doc='''A read only property that returns the size in bytes of an address for this target.''')
-        triple = property(GetTriple, None, doc='''A read only property that returns the target triple (arch-vendor-os) for this target as a string.''')
-        data_byte_size = property(GetDataByteSize, None, doc='''A read only property that returns the size in host bytes of a byte in the data address space for this target.''')
-        code_byte_size = property(GetCodeByteSize, None, doc='''A read only property that returns the size in host bytes of a byte in the code address space for this target.''')
-        platform = property(GetPlatform, None, doc='''A read only property that returns the platform associated with with this target.''')
-    %}
-};
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBThread.i b/src/llvm-project/lldb/scripts/interface/SBThread.i
deleted file mode 100644
index c759e4a..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBThread.i
+++ /dev/null
@@ -1,452 +0,0 @@
-//===-- SWIG Interface for SBThread -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a thread of execution. SBProcess contains SBThread(s).
-
-SBThreads can be referred to by their ID, which maps to the system specific thread
-identifier, or by IndexID.  The ID may or may not be unique depending on whether the
-system reuses its thread identifiers.  The IndexID is a monotonically increasing identifier
-that will always uniquely reference a particular thread, and when that thread goes
-away it will not be reused.
-
-SBThread supports frame iteration. For example (from test/python_api/
-lldbutil/iter/TestLLDBIterator.py),
-
-        from lldbutil import print_stacktrace
-        stopped_due_to_breakpoint = False
-        for thread in process:
-            if self.TraceOn():
-                print_stacktrace(thread)
-            ID = thread.GetThreadID()
-            if thread.GetStopReason() == lldb.eStopReasonBreakpoint:
-                stopped_due_to_breakpoint = True
-            for frame in thread:
-                self.assertTrue(frame.GetThread().GetThreadID() == ID)
-                if self.TraceOn():
-                    print frame
-
-        self.assertTrue(stopped_due_to_breakpoint)
-
-See also SBProcess and SBFrame."
-) SBThread;
-class SBThread
-{
-public:
-    //------------------------------------------------------------------
-    // Broadcaster bits.
-    //------------------------------------------------------------------
-    enum
-    {
-        eBroadcastBitStackChanged           = (1 << 0),
-        eBroadcastBitThreadSuspended        = (1 << 1),
-        eBroadcastBitThreadResumed          = (1 << 2),
-        eBroadcastBitSelectedFrameChanged   = (1 << 3),
-        eBroadcastBitThreadSelected         = (1 << 4)
-    };
-
-
-    SBThread ();
-
-    SBThread (const lldb::SBThread &thread);
-
-   ~SBThread();
-
-    static const char *
-    GetBroadcasterClassName ();
-
-    static bool
-    EventIsThreadEvent (const SBEvent &event);
-
-    static SBFrame
-    GetStackFrameFromEvent (const SBEvent &event);
-
-    static SBThread
-    GetThreadFromEvent (const SBEvent &event);
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    void
-    Clear ();
-
-    lldb::StopReason
-    GetStopReason();
-
-    %feature("docstring", "
-    Get the number of words associated with the stop reason.
-    See also GetStopReasonDataAtIndex().") GetStopReasonDataCount;
-    size_t
-    GetStopReasonDataCount();
-
-    %feature("docstring", "
-    Get information associated with a stop reason.
-
-    Breakpoint stop reasons will have data that consists of pairs of
-    breakpoint IDs followed by the breakpoint location IDs (they always come
-    in pairs).
-
-    Stop Reason              Count Data Type
-    ======================== ===== =========================================
-    eStopReasonNone          0
-    eStopReasonTrace         0
-    eStopReasonBreakpoint    N     duple: {breakpoint id, location id}
-    eStopReasonWatchpoint    1     watchpoint id
-    eStopReasonSignal        1     unix signal number
-    eStopReasonException     N     exception data
-    eStopReasonExec          0
-    eStopReasonPlanComplete  0") GetStopReasonDataAtIndex;
-    uint64_t
-    GetStopReasonDataAtIndex(uint32_t idx);
-
-    %feature("autodoc", "
-    Collects a thread's stop reason extended information dictionary and prints it
-    into the SBStream in a JSON format. The format of this JSON dictionary depends
-    on the stop reason and is currently used only for instrumentation plugins.") GetStopReasonExtendedInfoAsJSON;
-    bool
-    GetStopReasonExtendedInfoAsJSON (lldb::SBStream &stream);
-
-    %feature("autodoc", "
-    Returns a collection of historical stack traces that are significant to the
-    current stop reason. Used by ThreadSanitizer, where we provide various stack
-    traces that were involved in a data race or other type of detected issue.") GetStopReasonExtendedBacktraces;
-    SBThreadCollection
-    GetStopReasonExtendedBacktraces (InstrumentationRuntimeType type);
-
-
-    %feature("autodoc", "
-    Pass only an (int)length and expect to get a Python string describing the
-    stop reason.") GetStopDescription;
-    size_t
-    GetStopDescription (char *dst, size_t dst_len);
-
-    SBValue
-    GetStopReturnValue ();
-
-    %feature("autodoc", "
-    Returns a unique thread identifier (type lldb::tid_t, typically a 64-bit type)
-    for the current SBThread that will remain constant throughout the thread's
-    lifetime in this process and will not be reused by another thread during this
-    process lifetime.  On Mac OS X systems, this is a system-wide unique thread
-    identifier; this identifier is also used by other tools like sample which helps
-    to associate data from those tools with lldb.  See related GetIndexID.")
-    GetThreadID;
-    lldb::tid_t
-    GetThreadID () const;
-
-    %feature("autodoc", "
-    Return the index number for this SBThread.  The index number is the same thing
-    that a user gives as an argument to 'thread select' in the command line lldb.
-    These numbers start at 1 (for the first thread lldb sees in a debug session)
-    and increments up throughout the process lifetime.  An index number will not be
-    reused for a different thread later in a process - thread 1 will always be
-    associated with the same thread.  See related GetThreadID.
-    This method returns a uint32_t index number, takes no arguments.")
-    GetIndexID;
-    uint32_t
-    GetIndexID () const;
-
-    const char *
-    GetName () const;
-
-    %feature("autodoc", "
-    Return the queue name associated with this thread, if any, as a str.
-    For example, with a libdispatch (aka Grand Central Dispatch) queue.") GetQueueName;
-
-    const char *
-    GetQueueName() const;
-
-    %feature("autodoc", "
-    Return the dispatch_queue_id for this thread, if any, as a lldb::queue_id_t.
-    For example, with a libdispatch (aka Grand Central Dispatch) queue.") GetQueueID;
-
-    lldb::queue_id_t
-    GetQueueID() const;
-
-    %feature("docstring", "
-    Takes a path string and a SBStream reference as parameters, returns a bool.
-    Collects the thread's 'info' dictionary from the remote system, uses the path
-    argument to descend into the dictionary to an item of interest, and prints
-    it into the SBStream in a natural format.  Return bool is to indicate if
-    anything was printed into the stream (true) or not (false).") GetInfoItemByPathAsString;
-
-    bool
-    GetInfoItemByPathAsString (const char *path, lldb::SBStream &strm);
-
-    %feature("autodoc", "
-    Return the SBQueue for this thread.  If this thread is not currently associated
-    with a libdispatch queue, the SBQueue object's IsValid() method will return false.
-    If this SBThread is actually a HistoryThread, we may be able to provide QueueID
-    and QueueName, but not provide an SBQueue.  Those individual attributes may have
-    been saved for the HistoryThread without enough information to reconstitute the
-    entire SBQueue at that time.
-    This method takes no arguments, returns an SBQueue.") GetQueue;
-
-    lldb::SBQueue
-    GetQueue () const;
-
-    void
-    StepOver (lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
-
-    %feature("autodoc",
-    "Do a source level single step over in the currently selected thread.") StepOver;
-    void
-    StepOver (lldb::RunMode stop_other_threads, SBError &error);
-
-    void
-    StepInto (lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
-
-    void
-    StepInto (const char *target_name, lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
-
-    %feature("autodoc", "
-    Step the current thread from the current source line to the line given by end_line, stopping if
-    the thread steps into the function given by target_name.  If target_name is None, then stepping will stop
-    in any of the places we would normally stop.") StepInto;
-    void
-    StepInto (const char *target_name,
-              uint32_t end_line,
-              SBError &error,
-              lldb::RunMode stop_other_threads = lldb::eOnlyDuringStepping);
-
-    void
-    StepOut ();
-
-    %feature("autodoc",
-    "Step out of the currently selected thread.") StepOut;
-    void
-    StepOut (SBError &error);
-
-    void
-    StepOutOfFrame (SBFrame &frame);
-
-    %feature("autodoc",
-    "Step out of the specified frame.") StepOutOfFrame;
-    void
-    StepOutOfFrame (SBFrame &frame, SBError &error);
-
-    void
-    StepInstruction(bool step_over);
-
-    %feature("autodoc",
-    "Do an instruction level single step in the currently selected thread.") StepInstruction;
-    void
-    StepInstruction(bool step_over, SBError &error);
-
-    SBError
-    StepOverUntil (lldb::SBFrame &frame,
-                   lldb::SBFileSpec &file_spec,
-                   uint32_t line);
-
-    SBError
-    StepUsingScriptedThreadPlan (const char *script_class_name);
-
-    SBError
-    StepUsingScriptedThreadPlan (const char *script_class_name, bool resume_immediately);
-
-    SBError
-    JumpToLine (lldb::SBFileSpec &file_spec, uint32_t line);
-
-    void
-    RunToAddress (lldb::addr_t addr);
-
-    void
-    RunToAddress (lldb::addr_t addr, SBError &error);
-
-    %feature("autodoc", "
-    Force a return from the frame passed in (and any frames younger than it)
-    without executing any more code in those frames.  If return_value contains
-    a valid SBValue, that will be set as the return value from frame.  Note, at
-    present only scalar return values are supported.") ReturnFromFrame;
-
-    SBError
-    ReturnFromFrame (SBFrame &frame, SBValue &return_value);
-
-    %feature("autodoc", "
-    Unwind the stack frames from the innermost expression evaluation.
-    This API is equivalent to 'thread return -x'.") UnwindInnermostExpression;
-
-    SBError
-    UnwindInnermostExpression();
-
-    %feature("docstring", "
-    LLDB currently supports process centric debugging which means when any
-    thread in a process stops, all other threads are stopped. The Suspend()
-    call here tells our process to suspend a thread and not let it run when
-    the other threads in a process are allowed to run. So when
-    SBProcess::Continue() is called, any threads that aren't suspended will
-    be allowed to run. If any of the SBThread functions for stepping are
-    called (StepOver, StepInto, StepOut, StepInstruction, RunToAddres), the
-    thread will now be allowed to run and these functions will simply return.
-
-    Eventually we plan to add support for thread centric debugging where
-    each thread is controlled individually and each thread would broadcast
-    its state, but we haven't implemented this yet.
-
-    Likewise the SBThread::Resume() call will again allow the thread to run
-    when the process is continued.
-
-    Suspend() and Resume() functions are not currently reference counted, if
-    anyone has the need for them to be reference counted, please let us
-    know.") Suspend;
-    bool
-    Suspend();
-
-    bool
-    Suspend(SBError &error);
-
-    bool
-    Resume ();
-
-    bool
-    Resume (SBError &error);
-
-    bool
-    IsSuspended();
-
-    bool
-    IsStopped();
-
-    uint32_t
-    GetNumFrames ();
-
-    lldb::SBFrame
-    GetFrameAtIndex (uint32_t idx);
-
-    lldb::SBFrame
-    GetSelectedFrame ();
-
-    lldb::SBFrame
-    SetSelectedFrame (uint32_t frame_idx);
-
-    lldb::SBProcess
-    GetProcess ();
-
-    bool
-    GetDescription (lldb::SBStream &description) const;
-
-    %feature("docstring", "
-    Get the description strings for this thread that match what the
-    lldb driver will present, using the thread-format (stop_format==false)
-    or thread-stop-format (stop_format = true).") GetDescription;
-    bool GetDescription(lldb::SBStream &description, bool stop_format) const;
-
-    bool
-    GetStatus (lldb::SBStream &status) const;
-
-    bool
-    operator == (const lldb::SBThread &rhs) const;
-
-    bool
-    operator != (const lldb::SBThread &rhs) const;
-
-    %feature("autodoc","
-    Given an argument of str to specify the type of thread-origin extended
-    backtrace to retrieve, query whether the origin of this thread is
-    available.  An SBThread is retured; SBThread.IsValid will return true
-    if an extended backtrace was available.  The returned SBThread is not
-    a part of the SBProcess' thread list and it cannot be manipulated like
-    normal threads -- you cannot step or resume it, for instance -- it is
-    intended to used primarily for generating a backtrace.  You may request
-    the returned thread's own thread origin in turn.") GetExtendedBacktraceThread;
-    lldb::SBThread
-    GetExtendedBacktraceThread (const char *type);
-
-    %feature("autodoc","
-    Takes no arguments, returns a uint32_t.
-    If this SBThread is an ExtendedBacktrace thread, get the IndexID of the
-    original thread that this ExtendedBacktrace thread represents, if
-    available.  The thread that was running this backtrace in the past may
-    not have been registered with lldb's thread index (if it was created,
-    did its work, and was destroyed without lldb ever stopping execution).
-    In that case, this ExtendedBacktrace thread's IndexID will be returned.") GetExtendedBacktraceOriginatingIndexID;
-    uint32_t
-    GetExtendedBacktraceOriginatingIndexID();
-
-    %feature("autodoc","
-    Returns an SBValue object represeting the current exception for the thread,
-    if there is any. Currently, this works for Obj-C code and returns an SBValue
-    representing the NSException object at the throw site or that's currently
-    being processes.") GetCurrentException;
-    lldb::SBValue
-    GetCurrentException();
-
-    %feature("autodoc","
-    Returns a historical (fake) SBThread representing the stack trace of an
-    exception, if there is one for the thread. Currently, this works for Obj-C
-    code, and can retrieve the throw-site backtrace of an NSException object
-    even when the program is no longer at the throw site.") GetCurrentExceptionBacktrace;
-    lldb::SBThread
-    GetCurrentExceptionBacktrace();
-
-    %feature("autodoc","
-    Takes no arguments, returns a bool.
-    lldb may be able to detect that function calls should not be executed
-    on a given thread at a particular point in time.  It is recommended that
-    this is checked before performing an inferior function call on a given
-    thread.") SafeToCallFunctions;
-    bool
-    SafeToCallFunctions ();
-
-    %pythoncode %{
-        def __iter__(self):
-            '''Iterate over all frames in a lldb.SBThread object.'''
-            return lldb_iter(self, 'GetNumFrames', 'GetFrameAtIndex')
-
-        def __len__(self):
-            '''Return the number of frames in a lldb.SBThread object.'''
-            return self.GetNumFrames()
-
-        class frames_access(object):
-            '''A helper object that will lazily hand out frames for a thread when supplied an index.'''
-            def __init__(self, sbthread):
-                self.sbthread = sbthread
-
-            def __len__(self):
-                if self.sbthread:
-                    return int(self.sbthread.GetNumFrames())
-                return 0
-
-            def __getitem__(self, key):
-                if type(key) is int and key < self.sbthread.GetNumFrames():
-                    return self.sbthread.GetFrameAtIndex(key)
-                return None
-
-        def get_frames_access_object(self):
-            '''An accessor function that returns a frames_access() object which allows lazy frame access from a lldb.SBThread object.'''
-            return self.frames_access (self)
-
-        def get_thread_frames(self):
-            '''An accessor function that returns a list() that contains all frames in a lldb.SBThread object.'''
-            frames = []
-            for frame in self:
-                frames.append(frame)
-            return frames
-
-        id = property(GetThreadID, None, doc='''A read only property that returns the thread ID as an integer.''')
-        idx = property(GetIndexID, None, doc='''A read only property that returns the thread index ID as an integer. Thread index ID values start at 1 and increment as threads come and go and can be used to uniquely identify threads.''')
-        return_value = property(GetStopReturnValue, None, doc='''A read only property that returns an lldb object that represents the return value from the last stop (lldb.SBValue) if we just stopped due to stepping out of a function.''')
-        process = property(GetProcess, None, doc='''A read only property that returns an lldb object that represents the process (lldb.SBProcess) that owns this thread.''')
-        num_frames = property(GetNumFrames, None, doc='''A read only property that returns the number of stack frames in this thread as an integer.''')
-        frames = property(get_thread_frames, None, doc='''A read only property that returns a list() of lldb.SBFrame objects for all frames in this thread.''')
-        frame = property(get_frames_access_object, None, doc='''A read only property that returns an object that can be used to access frames as an array ("frame_12 = lldb.thread.frame[12]").''')
-        name = property(GetName, None, doc='''A read only property that returns the name of this thread as a string.''')
-        queue = property(GetQueueName, None, doc='''A read only property that returns the dispatch queue name of this thread as a string.''')
-        queue_id = property(GetQueueID, None, doc='''A read only property that returns the dispatch queue id of this thread as an integer.''')
-        stop_reason = property(GetStopReason, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eStopReason") that represents the reason this thread stopped.''')
-        is_suspended = property(IsSuspended, None, doc='''A read only property that returns a boolean value that indicates if this thread is suspended.''')
-        is_stopped = property(IsStopped, None, doc='''A read only property that returns a boolean value that indicates if this thread is stopped but not exited.''')
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBThreadPlan.i b/src/llvm-project/lldb/scripts/interface/SBThreadPlan.i
deleted file mode 100644
index 05789f1f..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBThreadPlan.i
+++ /dev/null
@@ -1,131 +0,0 @@
-//===-- SBThread.h ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_SBThreadPlan_h_
-#define LLDB_SBThreadPlan_h_
-
-#include "lldb/API/SBDefines.h"
-
-#include <stdio.h>
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a plan for the execution control of a given thread.
-
-See also SBThread and SBFrame."
-) SBThread;
-
-class SBThreadPlan
-{
-
-friend class lldb_private::ThreadPlan;
-
-public:
-    SBThreadPlan ();
-
-    SBThreadPlan (const lldb::SBThreadPlan &threadPlan);
-
-    SBThreadPlan (const lldb::ThreadPlanSP& lldb_object_sp);
-
-    SBThreadPlan (lldb::SBThread &thread, const char *class_name);
-
-   ~SBThreadPlan ();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    void
-    Clear ();
-
-    lldb::StopReason
-    GetStopReason();
-
-    %feature("docstring", "
-    Get the number of words associated with the stop reason.
-    See also GetStopReasonDataAtIndex().") GetStopReasonDataCount;
-    size_t
-    GetStopReasonDataCount();
-
-    %feature("docstring", "
-    Get information associated with a stop reason.
-
-    Breakpoint stop reasons will have data that consists of pairs of
-    breakpoint IDs followed by the breakpoint location IDs (they always come
-    in pairs).
-
-    Stop Reason              Count Data Type
-    ======================== ===== =========================================
-    eStopReasonNone          0
-    eStopReasonTrace         0
-    eStopReasonBreakpoint    N     duple: {breakpoint id, location id}
-    eStopReasonWatchpoint    1     watchpoint id
-    eStopReasonSignal        1     unix signal number
-    eStopReasonException     N     exception data
-    eStopReasonExec          0
-    eStopReasonPlanComplete  0") GetStopReasonDataAtIndex;
-    uint64_t
-    GetStopReasonDataAtIndex(uint32_t idx);
-
-    SBThread
-    GetThread () const;
-
-    bool
-    GetDescription (lldb::SBStream &description) const;
-
-    void
-    SetPlanComplete (bool success);
-
-    bool
-    IsPlanComplete();
-
-    bool
-    IsPlanStale();
-
-    bool
-    IsValid();
-
-    explicit operator bool() const;
-
-    SBThreadPlan
-    QueueThreadPlanForStepOverRange (SBAddress &start_address,
-                                     lldb::addr_t range_size);
-
-    SBThreadPlan
-    QueueThreadPlanForStepInRange (SBAddress &start_address,
-                                   lldb::addr_t range_size);
-
-    SBThreadPlan
-    QueueThreadPlanForStepOut (uint32_t frame_idx_to_step_to, bool first_insn = false);
-
-    SBThreadPlan
-    QueueThreadPlanForRunToAddress (SBAddress address);
-
-    SBThreadPlan
-    QueueThreadPlanForStepScripted(const char *script_class_name);
-
-
-protected:
-    friend class SBBreakpoint;
-    friend class SBBreakpointLocation;
-    friend class SBFrame;
-    friend class SBProcess;
-    friend class SBDebugger;
-    friend class SBValue;
-    friend class lldb_private::QueueImpl;
-    friend class SBQueueItem;
-
-private:
-    lldb::ThreadPlanSP m_opaque_sp;
-};
-
-} // namespace lldb
-
-#endif  // LLDB_SBThreadPlan_h_
diff --git a/src/llvm-project/lldb/scripts/interface/SBType.i b/src/llvm-project/lldb/scripts/interface/SBType.i
deleted file mode 100644
index ae9abfe..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBType.i
+++ /dev/null
@@ -1,476 +0,0 @@
-//===-- SWIG Interface for SBType -------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-    %feature("docstring",
-"Represents a member of a type in lldb.") SBTypeMember;
-
-class SBTypeMember
-{
-public:
-    SBTypeMember ();
-
-    SBTypeMember (const lldb::SBTypeMember& rhs);
-
-    ~SBTypeMember();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    const char *
-    GetName ();
-
-    lldb::SBType
-    GetType ();
-
-    uint64_t
-    GetOffsetInBytes();
-
-    uint64_t
-    GetOffsetInBits();
-
-    bool
-    IsBitfield();
-
-    uint32_t
-    GetBitfieldSizeInBits();
-
-    %pythoncode %{
-        name = property(GetName, None, doc='''A read only property that returns the name for this member as a string.''')
-        type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the type (lldb.SBType) for this member.''')
-        byte_offset = property(GetOffsetInBytes, None, doc='''A read only property that returns offset in bytes for this member as an integer.''')
-        bit_offset = property(GetOffsetInBits, None, doc='''A read only property that returns offset in bits for this member as an integer.''')
-        is_bitfield = property(IsBitfield, None, doc='''A read only property that returns true if this member is a bitfield.''')
-        bitfield_bit_size = property(GetBitfieldSizeInBits, None, doc='''A read only property that returns the bitfield size in bits for this member as an integer, or zero if this member is not a bitfield.''')
-    %}
-
-protected:
-    std::unique_ptr<lldb_private::TypeMemberImpl> m_opaque_ap;
-};
-
-class SBTypeMemberFunction
-{
-public:
-    SBTypeMemberFunction ();
-
-    SBTypeMemberFunction (const lldb::SBTypeMemberFunction& rhs);
-
-    ~SBTypeMemberFunction();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    const char *
-    GetName ();
-
-    const char *
-    GetDemangledName ();
-
-    const char *
-    GetMangledName ();
-
-    lldb::SBType
-    GetType ();
-
-    lldb::SBType
-    GetReturnType ();
-
-    uint32_t
-    GetNumberOfArguments ();
-
-    lldb::SBType
-    GetArgumentTypeAtIndex (uint32_t);
-
-    lldb::MemberFunctionKind
-    GetKind();
-
-    bool
-    GetDescription (lldb::SBStream &description,
-                    lldb::DescriptionLevel description_level);
-
-protected:
-    lldb::TypeMemberFunctionImplSP m_opaque_sp;
-};
-
-%feature("docstring",
-"Represents a data type in lldb.  The FindFirstType() method of SBTarget/SBModule
-returns a SBType.
-
-SBType supports the eq/ne operator. For example,
-
-main.cpp:
-
-class Task {
-public:
-    int id;
-    Task *next;
-    Task(int i, Task *n):
-        id(i),
-        next(n)
-    {}
-};
-
-int main (int argc, char const *argv[])
-{
-    Task *task_head = new Task(-1, NULL);
-    Task *task1 = new Task(1, NULL);
-    Task *task2 = new Task(2, NULL);
-    Task *task3 = new Task(3, NULL); // Orphaned.
-    Task *task4 = new Task(4, NULL);
-    Task *task5 = new Task(5, NULL);
-
-    task_head->next = task1;
-    task1->next = task2;
-    task2->next = task4;
-    task4->next = task5;
-
-    int total = 0;
-    Task *t = task_head;
-    while (t != NULL) {
-        if (t->id >= 0)
-            ++total;
-        t = t->next;
-    }
-    printf('We have a total number of %d tasks\\n', total);
-
-    // This corresponds to an empty task list.
-    Task *empty_task_head = new Task(-1, NULL);
-
-    return 0; // Break at this line
-}
-
-find_type.py:
-
-        # Get the type 'Task'.
-        task_type = target.FindFirstType('Task')
-        self.assertTrue(task_type)
-
-        # Get the variable 'task_head'.
-        frame0.FindVariable('task_head')
-        task_head_type = task_head.GetType()
-        self.assertTrue(task_head_type.IsPointerType())
-
-        # task_head_type is 'Task *'.
-        task_pointer_type = task_type.GetPointerType()
-        self.assertTrue(task_head_type == task_pointer_type)
-
-        # Get the child mmember 'id' from 'task_head'.
-        id = task_head.GetChildMemberWithName('id')
-        id_type = id.GetType()
-
-        # SBType.GetBasicType() takes an enum 'BasicType' (lldb-enumerations.h).
-        int_type = id_type.GetBasicType(lldb.eBasicTypeInt)
-        # id_type and int_type should be the same type!
-        self.assertTrue(id_type == int_type)
-
-...") SBType;
-class SBType
-{
-public:
-    SBType ();
-
-    SBType (const lldb::SBType &rhs);
-
-    ~SBType ();
-
-    bool
-    IsValid();
-
-    explicit operator bool() const;
-
-    uint64_t
-    GetByteSize();
-
-    bool
-    IsPointerType();
-
-    bool
-    IsReferenceType();
-
-    bool
-    IsFunctionType ();
-
-    bool
-    IsPolymorphicClass ();
-
-    bool
-    IsArrayType ();
-
-    bool
-    IsVectorType ();
-
-    bool
-    IsTypedefType ();
-
-    bool
-    IsAnonymousType ();
-
-    lldb::SBType
-    GetPointerType();
-
-    lldb::SBType
-    GetPointeeType();
-
-    lldb::SBType
-    GetReferenceType();
-
-    lldb::SBType
-    SBType::GetTypedefedType();
-
-    lldb::SBType
-    GetDereferencedType();
-
-    lldb::SBType
-    GetUnqualifiedType();
-
-    lldb::SBType
-    GetCanonicalType();
-
-    lldb::SBType
-    GetArrayElementType ();
-
-    lldb::SBType
-    GetArrayType (uint64_t size);
-
-    lldb::SBType
-    GetVectorElementType ();
-
-    lldb::BasicType
-    GetBasicType();
-
-    lldb::SBType
-    GetBasicType (lldb::BasicType type);
-
-    uint32_t
-    GetNumberOfFields ();
-
-    uint32_t
-    GetNumberOfDirectBaseClasses ();
-
-    uint32_t
-    GetNumberOfVirtualBaseClasses ();
-
-    lldb::SBTypeMember
-    GetFieldAtIndex (uint32_t idx);
-
-    lldb::SBTypeMember
-    GetDirectBaseClassAtIndex (uint32_t idx);
-
-    lldb::SBTypeMember
-    GetVirtualBaseClassAtIndex (uint32_t idx);
-
-    lldb::SBTypeEnumMemberList
-    GetEnumMembers();
-
-    const char*
-    GetName();
-
-    const char *
-    GetDisplayTypeName ();
-
-    lldb::TypeClass
-    GetTypeClass ();
-
-    uint32_t
-    GetNumberOfTemplateArguments ();
-
-    lldb::SBType
-    GetTemplateArgumentType (uint32_t idx);
-
-    lldb::TemplateArgumentKind
-    GetTemplateArgumentKind (uint32_t idx);
-
-    lldb::SBType
-    GetFunctionReturnType ();
-
-    lldb::SBTypeList
-    GetFunctionArgumentTypes ();
-
-    uint32_t
-    GetNumberOfMemberFunctions ();
-
-    lldb::SBTypeMemberFunction
-    GetMemberFunctionAtIndex (uint32_t idx);
-
-    bool
-    IsTypeComplete ();
-
-    uint32_t
-    GetTypeFlags ();
-
-    bool operator==(lldb::SBType &rhs);
-
-    bool operator!=(lldb::SBType &rhs);
-
-    %pythoncode %{
-        def template_arg_array(self):
-            num_args = self.num_template_args
-            if num_args:
-                template_args = []
-                for i in range(num_args):
-                    template_args.append(self.GetTemplateArgumentType(i))
-                return template_args
-            return None
-
-        name = property(GetName, None, doc='''A read only property that returns the name for this type as a string.''')
-        size = property(GetByteSize, None, doc='''A read only property that returns size in bytes for this type as an integer.''')
-        is_pointer = property(IsPointerType, None, doc='''A read only property that returns a boolean value that indicates if this type is a pointer type.''')
-        is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a reference type.''')
-        is_reference = property(IsReferenceType, None, doc='''A read only property that returns a boolean value that indicates if this type is a function type.''')
-        num_fields = property(GetNumberOfFields, None, doc='''A read only property that returns number of fields in this type as an integer.''')
-        num_bases = property(GetNumberOfDirectBaseClasses, None, doc='''A read only property that returns number of direct base classes in this type as an integer.''')
-        num_vbases = property(GetNumberOfVirtualBaseClasses, None, doc='''A read only property that returns number of virtual base classes in this type as an integer.''')
-        num_template_args = property(GetNumberOfTemplateArguments, None, doc='''A read only property that returns number of template arguments in this type as an integer.''')
-        template_args = property(template_arg_array, None, doc='''A read only property that returns a list() of lldb.SBType objects that represent all template arguments in this type.''')
-        type = property(GetTypeClass, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eTypeClass") that represents a classification for this type.''')
-        is_complete = property(IsTypeComplete, None, doc='''A read only property that returns a boolean value that indicates if this type is a complete type (True) or a forward declaration (False).''')
-
-        def get_bases_array(self):
-            '''An accessor function that returns a list() that contains all direct base classes in a lldb.SBType object.'''
-            bases = []
-            for idx in range(self.GetNumberOfDirectBaseClasses()):
-                bases.append(self.GetDirectBaseClassAtIndex(idx))
-            return bases
-
-        def get_vbases_array(self):
-            '''An accessor function that returns a list() that contains all fields in a lldb.SBType object.'''
-            vbases = []
-            for idx in range(self.GetNumberOfVirtualBaseClasses()):
-                vbases.append(self.GetVirtualBaseClassAtIndex(idx))
-            return vbases
-
-        def get_fields_array(self):
-            '''An accessor function that returns a list() that contains all fields in a lldb.SBType object.'''
-            fields = []
-            for idx in range(self.GetNumberOfFields()):
-                fields.append(self.GetFieldAtIndex(idx))
-            return fields
-
-        def get_members_array(self):
-            '''An accessor function that returns a list() that contains all members (base classes and fields) in a lldb.SBType object in ascending bit offset order.'''
-            members = []
-            bases = self.get_bases_array()
-            fields = self.get_fields_array()
-            vbases = self.get_vbases_array()
-            for base in bases:
-                bit_offset = base.bit_offset
-                added = False
-                for idx, member in enumerate(members):
-                    if member.bit_offset > bit_offset:
-                        members.insert(idx, base)
-                        added = True
-                        break
-                if not added:
-                    members.append(base)
-            for vbase in vbases:
-                bit_offset = vbase.bit_offset
-                added = False
-                for idx, member in enumerate(members):
-                    if member.bit_offset > bit_offset:
-                        members.insert(idx, vbase)
-                        added = True
-                        break
-                if not added:
-                    members.append(vbase)
-            for field in fields:
-                bit_offset = field.bit_offset
-                added = False
-                for idx, member in enumerate(members):
-                    if member.bit_offset > bit_offset:
-                        members.insert(idx, field)
-                        added = True
-                        break
-                if not added:
-                    members.append(field)
-            return members
-
-        def get_enum_members_array(self):
-            '''An accessor function that returns a list() that contains all enum members in an lldb.SBType object.'''
-            enum_members_list = []
-            sb_enum_members = self.GetEnumMembers()
-            for idx in range(sb_enum_members.GetSize()):
-                enum_members_list.append(sb_enum_members.GetTypeEnumMemberAtIndex(idx))
-            return enum_members_list
-
-        bases = property(get_bases_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the direct base classes for this type.''')
-        vbases = property(get_vbases_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the virtual base classes for this type.''')
-        fields = property(get_fields_array, None, doc='''A read only property that returns a list() of lldb.SBTypeMember objects that represent all of the fields for this type.''')
-        members = property(get_members_array, None, doc='''A read only property that returns a list() of all lldb.SBTypeMember objects that represent all of the base classes, virtual base classes and fields for this type in ascending bit offset order.''')
-        enum_members = property(get_enum_members_array, None, doc='''A read only property that returns a list() of all lldb.SBTypeEnumMember objects that represent the enum members for this type.''')
-        %}
-
-};
-
-%feature("docstring",
-"Represents a list of SBTypes.  The FindTypes() method of SBTarget/SBModule
-returns a SBTypeList.
-
-SBTypeList supports SBType iteration. For example,
-
-main.cpp:
-
-class Task {
-public:
-    int id;
-    Task *next;
-    Task(int i, Task *n):
-        id(i),
-        next(n)
-    {}
-};
-
-...
-
-find_type.py:
-
-        # Get the type 'Task'.
-        type_list = target.FindTypes('Task')
-        self.assertTrue(len(type_list) == 1)
-        # To illustrate the SBType iteration.
-        for type in type_list:
-            # do something with type
-
-...") SBTypeList;
-class SBTypeList
-{
-public:
-    SBTypeList();
-
-    bool
-    IsValid();
-
-    explicit operator bool() const;
-
-    void
-    Append (lldb::SBType type);
-
-    lldb::SBType
-    GetTypeAtIndex (uint32_t index);
-
-    uint32_t
-    GetSize();
-
-    ~SBTypeList();
-
-    %pythoncode%{
-    def __iter__(self):
-        '''Iterate over all types in a lldb.SBTypeList object.'''
-        return lldb_iter(self, 'GetSize', 'GetTypeAtIndex')
-
-    def __len__(self):
-        '''Return the number of types in a lldb.SBTypeList object.'''
-        return self.GetSize()
-    %}
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBTypeCategory.i b/src/llvm-project/lldb/scripts/interface/SBTypeCategory.i
deleted file mode 100644
index c183862..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBTypeCategory.i
+++ /dev/null
@@ -1,221 +0,0 @@
-//===-- SWIG Interface for SBTypeCategory---------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-    %feature("docstring",
-    "Represents a category that can contain formatters for types.") SBTypeCategory;
-
-    class SBTypeCategory
-    {
-    public:
-
-        SBTypeCategory();
-
-        SBTypeCategory (const lldb::SBTypeCategory &rhs);
-
-        ~SBTypeCategory ();
-
-        bool
-        IsValid() const;
-
-        explicit operator bool() const;
-
-        bool
-        GetEnabled ();
-
-        void
-        SetEnabled (bool);
-
-        const char*
-        GetName();
-
-        lldb::LanguageType
-        GetLanguageAtIndex (uint32_t idx);
-
-        uint32_t
-        GetNumLanguages ();
-
-        void
-        AddLanguage (lldb::LanguageType language);
-
-        bool
-        GetDescription (lldb::SBStream &description,
-                        lldb::DescriptionLevel description_level);
-
-        uint32_t
-        GetNumFormats ();
-
-        uint32_t
-        GetNumSummaries ();
-
-        uint32_t
-        GetNumFilters ();
-
-        uint32_t
-        GetNumSynthetics ();
-
-        lldb::SBTypeNameSpecifier
-        GetTypeNameSpecifierForFilterAtIndex (uint32_t);
-
-        lldb::SBTypeNameSpecifier
-        GetTypeNameSpecifierForFormatAtIndex (uint32_t);
-
-        lldb::SBTypeNameSpecifier
-        GetTypeNameSpecifierForSummaryAtIndex (uint32_t);
-
-        lldb::SBTypeNameSpecifier
-        GetTypeNameSpecifierForSyntheticAtIndex (uint32_t);
-
-        lldb::SBTypeFilter
-        GetFilterForType (lldb::SBTypeNameSpecifier);
-
-        lldb::SBTypeFormat
-        GetFormatForType (lldb::SBTypeNameSpecifier);
-
-        lldb::SBTypeSummary
-        GetSummaryForType (lldb::SBTypeNameSpecifier);
-
-        lldb::SBTypeSynthetic
-        GetSyntheticForType (lldb::SBTypeNameSpecifier);
-
-        lldb::SBTypeFilter
-        GetFilterAtIndex (uint32_t);
-
-        lldb::SBTypeFormat
-        GetFormatAtIndex (uint32_t);
-
-        lldb::SBTypeSummary
-        GetSummaryAtIndex (uint32_t);
-
-        lldb::SBTypeSynthetic
-        GetSyntheticAtIndex (uint32_t);
-
-        bool
-        AddTypeFormat (lldb::SBTypeNameSpecifier,
-                       lldb::SBTypeFormat);
-
-        bool
-        DeleteTypeFormat (lldb::SBTypeNameSpecifier);
-
-        bool
-        AddTypeSummary (lldb::SBTypeNameSpecifier,
-                        lldb::SBTypeSummary);
-
-        bool
-        DeleteTypeSummary (lldb::SBTypeNameSpecifier);
-
-        bool
-        AddTypeFilter (lldb::SBTypeNameSpecifier,
-                       lldb::SBTypeFilter);
-
-        bool
-        DeleteTypeFilter (lldb::SBTypeNameSpecifier);
-
-        bool
-        AddTypeSynthetic (lldb::SBTypeNameSpecifier,
-                          lldb::SBTypeSynthetic);
-
-        bool
-        DeleteTypeSynthetic (lldb::SBTypeNameSpecifier);
-
-        %pythoncode %{
-
-            class formatters_access_class(object):
-                '''A helper object that will lazily hand out formatters for a specific category.'''
-                def __init__(self, sbcategory, get_count_function, get_at_index_function, get_by_name_function):
-                    self.sbcategory = sbcategory
-                    self.get_count_function = get_count_function
-                    self.get_at_index_function = get_at_index_function
-                    self.get_by_name_function = get_by_name_function
-                    self.regex_type = type(re.compile('.'))
-
-
-                def __len__(self):
-                    if self.sbcategory and self.get_count_function:
-                        return int(self.get_count_function(self.sbcategory))
-                    return 0
-
-                def __getitem__(self, key):
-                    num_items = len(self)
-                    if type(key) is int:
-                        if key < num_items:
-                            return self.get_at_index_function(self.sbcategory,key)
-                    elif type(key) is str:
-                        return self.get_by_name_function(self.sbcategory,SBTypeNameSpecifier(key))
-                    elif isinstance(key,self.regex_type):
-                        return self.get_by_name_function(self.sbcategory,SBTypeNameSpecifier(key.pattern,True))
-                    else:
-                        print("error: unsupported item type: %s" % type(key))
-                    return None
-
-            def get_formats_access_object(self):
-                '''An accessor function that returns an accessor object which allows lazy format access from a lldb.SBTypeCategory object.'''
-                return self.formatters_access_class (self,self.__class__.GetNumFormats,self.__class__.GetFormatAtIndex,self.__class__.GetFormatForType)
-
-            def get_formats_array(self):
-                '''An accessor function that returns a list() that contains all formats in a lldb.SBCategory object.'''
-                formats = []
-                for idx in range(self.GetNumFormats()):
-                    formats.append(self.GetFormatAtIndex(idx))
-                return formats
-
-            def get_summaries_access_object(self):
-                '''An accessor function that returns an accessor object which allows lazy summary access from a lldb.SBTypeCategory object.'''
-                return self.formatters_access_class (self,self.__class__.GetNumSummaries,self.__class__.GetSummaryAtIndex,self.__class__.GetSummaryForType)
-
-            def get_summaries_array(self):
-                '''An accessor function that returns a list() that contains all summaries in a lldb.SBCategory object.'''
-                summaries = []
-                for idx in range(self.GetNumSummaries()):
-                    summaries.append(self.GetSummaryAtIndex(idx))
-                return summaries
-
-            def get_synthetics_access_object(self):
-                '''An accessor function that returns an accessor object which allows lazy synthetic children provider access from a lldb.SBTypeCategory object.'''
-                return self.formatters_access_class (self,self.__class__.GetNumSynthetics,self.__class__.GetSyntheticAtIndex,self.__class__.GetSyntheticForType)
-
-            def get_synthetics_array(self):
-                '''An accessor function that returns a list() that contains all synthetic children providers in a lldb.SBCategory object.'''
-                synthetics = []
-                for idx in range(self.GetNumSynthetics()):
-                    synthetics.append(self.GetSyntheticAtIndex(idx))
-                return synthetics
-
-            def get_filters_access_object(self):
-                '''An accessor function that returns an accessor object which allows lazy filter access from a lldb.SBTypeCategory object.'''
-                return self.formatters_access_class (self,self.__class__.GetNumFilters,self.__class__.GetFilterAtIndex,self.__class__.GetFilterForType)
-
-            def get_filters_array(self):
-                '''An accessor function that returns a list() that contains all filters in a lldb.SBCategory object.'''
-                filters = []
-                for idx in range(self.GetNumFilters()):
-                    filters.append(self.GetFilterAtIndex(idx))
-                return filters
-
-            formats = property(get_formats_array, None, doc='''A read only property that returns a list() of lldb.SBTypeFormat objects contained in this category''')
-            format = property(get_formats_access_object, None, doc=r'''A read only property that returns an object that you can use to look for formats by index or type name.''')
-            summaries = property(get_summaries_array, None, doc='''A read only property that returns a list() of lldb.SBTypeSummary objects contained in this category''')
-            summary = property(get_summaries_access_object, None, doc=r'''A read only property that returns an object that you can use to look for summaries by index or type name or regular expression.''')
-            filters = property(get_filters_array, None, doc='''A read only property that returns a list() of lldb.SBTypeFilter objects contained in this category''')
-            filter = property(get_filters_access_object, None, doc=r'''A read only property that returns an object that you can use to look for filters by index or type name or regular expression.''')
-            synthetics = property(get_synthetics_array, None, doc='''A read only property that returns a list() of lldb.SBTypeSynthetic objects contained in this category''')
-            synthetic = property(get_synthetics_access_object, None, doc=r'''A read only property that returns an object that you can use to look for synthetic children provider by index or type name or regular expression.''')
-            num_formats = property(GetNumFormats, None)
-            num_summaries = property(GetNumSummaries, None)
-            num_filters = property(GetNumFilters, None)
-            num_synthetics = property(GetNumSynthetics, None)
-            name = property(GetName, None)
-            enabled = property(GetEnabled, SetEnabled)
-        %}
-
-    };
-
-
-} // namespace lldb
-
diff --git a/src/llvm-project/lldb/scripts/interface/SBTypeEnumMember.i b/src/llvm-project/lldb/scripts/interface/SBTypeEnumMember.i
deleted file mode 100644
index 0c9cf64..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBTypeEnumMember.i
+++ /dev/null
@@ -1,104 +0,0 @@
-//===-- SWIG Interface for SBTypeEnumMember ---------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature(
-    "docstring",
-    "Represents a member of an enum in lldb."
-) SBTypeEnumMember;
-
-class SBTypeEnumMember
-{
-public:
-    SBTypeEnumMember ();
-
-    SBTypeEnumMember (const SBTypeEnumMember& rhs);
-
-    ~SBTypeEnumMember();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    int64_t
-    GetValueAsSigned();
-
-    uint64_t
-    GetValueAsUnsigned();
-
-    const char *
-    GetName ();
-
-    lldb::SBType
-    GetType ();
-
-    bool
-    GetDescription (lldb::SBStream &description,
-                    lldb::DescriptionLevel description_level);
-
-    %pythoncode %{
-        name = property(GetName, None, doc='''A read only property that returns the name for this enum member as a string.''')
-        type = property(GetType, None, doc='''A read only property that returns an lldb object that represents the type (lldb.SBType) for this enum member.''')
-        signed = property(GetValueAsSigned, None, doc='''A read only property that returns the value of this enum member as a signed integer.''')
-        unsigned = property(GetValueAsUnsigned, None, doc='''A read only property that returns the value of this enum member as a unsigned integer.''')
-    %}
-
-protected:
-    friend class SBType;
-    friend class SBTypeEnumMemberList;
-
-    void
-    reset (lldb_private::TypeEnumMemberImpl *);
-
-    lldb_private::TypeEnumMemberImpl &
-    ref ();
-
-    const lldb_private::TypeEnumMemberImpl &
-    ref () const;
-
-    lldb::TypeEnumMemberImplSP m_opaque_sp;
-
-    SBTypeEnumMember (const lldb::TypeEnumMemberImplSP &);
-};
-
-%feature(
-    "docstring",
-    "Represents a list of SBTypeEnumMembers."
-) SBTypeEnumMemberList;
-
-class SBTypeEnumMemberList
-{
-public:
-    SBTypeEnumMemberList();
-
-    SBTypeEnumMemberList(const SBTypeEnumMemberList& rhs);
-
-    ~SBTypeEnumMemberList();
-
-    bool
-    IsValid();
-
-    explicit operator bool() const;
-
-    void
-    Append (SBTypeEnumMember entry);
-
-    SBTypeEnumMember
-    GetTypeEnumMemberAtIndex (uint32_t index);
-
-    uint32_t
-    GetSize();
-
-
-private:
-    std::unique_ptr<lldb_private::TypeEnumMemberListImpl> m_opaque_ap;
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBTypeFilter.i b/src/llvm-project/lldb/scripts/interface/SBTypeFilter.i
deleted file mode 100644
index 100c420..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBTypeFilter.i
+++ /dev/null
@@ -1,71 +0,0 @@
-//===-- SWIG Interface for SBTypeFilter----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-    %feature("docstring",
-    "Represents a filter that can be associated to one or more types.") SBTypeFilter;
-
-    class SBTypeFilter
-    {
-        public:
-
-        SBTypeFilter();
-
-        SBTypeFilter (uint32_t options);
-
-        SBTypeFilter (const lldb::SBTypeFilter &rhs);
-
-        ~SBTypeFilter ();
-
-        bool
-        IsValid() const;
-
-        explicit operator bool() const;
-
-        bool
-        IsEqualTo (lldb::SBTypeFilter &rhs);
-
-        uint32_t
-        GetNumberOfExpressionPaths ();
-
-        const char*
-        GetExpressionPathAtIndex (uint32_t i);
-
-        bool
-        ReplaceExpressionPathAtIndex (uint32_t i, const char* item);
-
-        void
-        AppendExpressionPath (const char* item);
-
-        void
-        Clear();
-
-        uint32_t
-        GetOptions();
-
-        void
-        SetOptions (uint32_t);
-
-        bool
-        GetDescription (lldb::SBStream &description, lldb::DescriptionLevel description_level);
-
-        bool
-        operator == (lldb::SBTypeFilter &rhs);
-
-        bool
-        operator != (lldb::SBTypeFilter &rhs);
-
-        %pythoncode %{
-            options = property(GetOptions, SetOptions)
-            count = property(GetNumberOfExpressionPaths)
-        %}
-
-    };
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBTypeFormat.i b/src/llvm-project/lldb/scripts/interface/SBTypeFormat.i
deleted file mode 100644
index 7c19ebb..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBTypeFormat.i
+++ /dev/null
@@ -1,73 +0,0 @@
-//===-- SWIG Interface for SBTypeFormat----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-    %feature("docstring",
-             "Represents a format that can be associated to one or more types.") SBTypeFormat;
-
-    class SBTypeFormat
-    {
-    public:
-
-        SBTypeFormat();
-
-        SBTypeFormat (lldb::Format format, uint32_t options = 0);
-
-        SBTypeFormat (const char* type, uint32_t options = 0);
-
-        SBTypeFormat (const lldb::SBTypeFormat &rhs);
-
-        ~SBTypeFormat ();
-
-        bool
-        IsValid() const;
-
-        explicit operator bool() const;
-
-        bool
-        IsEqualTo (lldb::SBTypeFormat &rhs);
-
-        lldb::Format
-        GetFormat ();
-
-        const char*
-        GetTypeName ();
-
-        uint32_t
-        GetOptions();
-
-        void
-        SetFormat (lldb::Format);
-
-        void
-        SetTypeName (const char*);
-
-        void
-        SetOptions (uint32_t);
-
-        bool
-        GetDescription (lldb::SBStream &description,
-                        lldb::DescriptionLevel description_level);
-
-        bool
-        operator == (lldb::SBTypeFormat &rhs);
-
-        bool
-        operator != (lldb::SBTypeFormat &rhs);
-
-        %pythoncode %{
-            format = property(GetFormat, SetFormat)
-            options = property(GetOptions, SetOptions)
-        %}
-
-    };
-
-
-} // namespace lldb
-
diff --git a/src/llvm-project/lldb/scripts/interface/SBTypeNameSpecifier.i b/src/llvm-project/lldb/scripts/interface/SBTypeNameSpecifier.i
deleted file mode 100644
index 537b9ce..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBTypeNameSpecifier.i
+++ /dev/null
@@ -1,65 +0,0 @@
-//===-- SWIG Interface for SBTypeNameSpecifier---------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-    %feature("docstring",
-    "Represents a general way to provide a type name to LLDB APIs.") SBTypeNameSpecifier;
-
-    class SBTypeNameSpecifier
-    {
-    public:
-
-        SBTypeNameSpecifier();
-
-        SBTypeNameSpecifier (const char* name,
-                             bool is_regex = false);
-
-        SBTypeNameSpecifier (SBType type);
-
-        SBTypeNameSpecifier (const lldb::SBTypeNameSpecifier &rhs);
-
-        ~SBTypeNameSpecifier ();
-
-        bool
-        IsValid() const;
-
-        explicit operator bool() const;
-
-        bool
-        IsEqualTo (lldb::SBTypeNameSpecifier &rhs);
-
-        const char*
-        GetName();
-
-        lldb::SBType
-        GetType ();
-
-        bool
-        IsRegex();
-
-        bool
-        GetDescription (lldb::SBStream &description,
-                        lldb::DescriptionLevel description_level);
-
-        bool
-        operator == (lldb::SBTypeNameSpecifier &rhs);
-
-        bool
-        operator != (lldb::SBTypeNameSpecifier &rhs);
-
-        %pythoncode %{
-            name = property(GetName)
-            is_regex = property(IsRegex)
-        %}
-
-
-    };
-
-} // namespace lldb
-
diff --git a/src/llvm-project/lldb/scripts/interface/SBTypeSummary.i b/src/llvm-project/lldb/scripts/interface/SBTypeSummary.i
deleted file mode 100644
index 2a44918..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBTypeSummary.i
+++ /dev/null
@@ -1,115 +0,0 @@
-//===-- SWIG Interface for SBTypeSummary---------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-    class SBTypeSummaryOptions
-    {
-    public:
-        SBTypeSummaryOptions();
-
-        SBTypeSummaryOptions (const lldb::SBTypeSummaryOptions &rhs);
-
-        ~SBTypeSummaryOptions ();
-
-        bool
-        IsValid ();
-
-        explicit operator bool() const;
-
-        lldb::LanguageType
-        GetLanguage ();
-
-        lldb::TypeSummaryCapping
-        GetCapping ();
-
-        void
-        SetLanguage (lldb::LanguageType);
-
-        void
-        SetCapping (lldb::TypeSummaryCapping);
-    };
-
-    %feature("docstring",
-    "Represents a summary that can be associated to one or more types.") SBTypeSummary;
-
-    class SBTypeSummary
-    {
-    public:
-
-        SBTypeSummary();
-
-        static SBTypeSummary
-        CreateWithSummaryString (const char* data, uint32_t options = 0);
-
-        static SBTypeSummary
-        CreateWithFunctionName (const char* data, uint32_t options = 0);
-
-        static SBTypeSummary
-        CreateWithScriptCode (const char* data, uint32_t options = 0);
-
-        SBTypeSummary (const lldb::SBTypeSummary &rhs);
-
-        ~SBTypeSummary ();
-
-        bool
-        IsValid() const;
-
-        explicit operator bool() const;
-
-        bool
-        IsEqualTo (lldb::SBTypeSummary &rhs);
-
-        bool
-        IsFunctionCode();
-
-        bool
-        IsFunctionName();
-
-        bool
-        IsSummaryString();
-
-        const char*
-        GetData ();
-
-        void
-        SetSummaryString (const char* data);
-
-        void
-        SetFunctionName (const char* data);
-
-        void
-        SetFunctionCode (const char* data);
-
-        uint32_t
-        GetOptions ();
-
-        void
-        SetOptions (uint32_t);
-
-        bool
-        GetDescription (lldb::SBStream &description,
-                        lldb::DescriptionLevel description_level);
-
-        bool
-        operator == (lldb::SBTypeSummary &rhs);
-
-        bool
-        operator != (lldb::SBTypeSummary &rhs);
-
-        %pythoncode %{
-            options = property(GetOptions, SetOptions)
-            is_summary_string = property(IsSummaryString)
-            is_function_name = property(IsFunctionName)
-            is_function_name = property(IsFunctionCode)
-            summary_data = property(GetData)
-        %}
-
-    };
-
-} // namespace lldb
-
diff --git a/src/llvm-project/lldb/scripts/interface/SBTypeSynthetic.i b/src/llvm-project/lldb/scripts/interface/SBTypeSynthetic.i
deleted file mode 100644
index 04502fa..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBTypeSynthetic.i
+++ /dev/null
@@ -1,74 +0,0 @@
-//===-- SWIG Interface for SBTypeSynthetic-------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-    %feature("docstring",
-    "Represents a summary that can be associated to one or more types.") SBTypeSynthetic;
-
-    class SBTypeSynthetic
-    {
-    public:
-
-        SBTypeSynthetic();
-
-        static lldb::SBTypeSynthetic
-        CreateWithClassName (const char* data, uint32_t options = 0);
-
-        static lldb::SBTypeSynthetic
-        CreateWithScriptCode (const char* data, uint32_t options = 0);
-
-        SBTypeSynthetic (const lldb::SBTypeSynthetic &rhs);
-
-        ~SBTypeSynthetic ();
-
-        bool
-        IsValid() const;
-
-        explicit operator bool() const;
-
-        bool
-        IsEqualTo (lldb::SBTypeSynthetic &rhs);
-
-        bool
-        IsClassCode();
-
-        const char*
-        GetData ();
-
-        void
-        SetClassName (const char* data);
-
-        void
-        SetClassCode (const char* data);
-
-        uint32_t
-        GetOptions ();
-
-        void
-        SetOptions (uint32_t);
-
-        bool
-        GetDescription (lldb::SBStream &description,
-                        lldb::DescriptionLevel description_level);
-
-        bool
-        operator == (lldb::SBTypeSynthetic &rhs);
-
-        bool
-        operator != (lldb::SBTypeSynthetic &rhs);
-
-        %pythoncode %{
-            options = property(GetOptions, SetOptions)
-            contains_code = property(IsClassCode, None)
-            synthetic_data = property(GetData, None)
-        %}
-
-    };
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBUnixSignals.i b/src/llvm-project/lldb/scripts/interface/SBUnixSignals.i
deleted file mode 100644
index 015aeae..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBUnixSignals.i
+++ /dev/null
@@ -1,74 +0,0 @@
-//===-- SWIG Interface for SBUnixSignals ------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Allows you to manipulate LLDB's signal disposition"
-) SBUnixSignals;
-class SBUnixSignals
-{
-public:
-    SBUnixSignals ();
-
-    SBUnixSignals (const lldb::SBUnixSignals &rhs);
-
-    ~SBUnixSignals();
-
-    void
-    Clear ();
-
-    bool
-    IsValid () const;
-
-    explicit operator bool() const;
-
-    const char *
-    GetSignalAsCString (int32_t signo) const;
-
-    int32_t
-    GetSignalNumberFromName (const char *name) const;
-
-    bool
-    GetShouldSuppress (int32_t signo) const;
-
-    bool
-    SetShouldSuppress (int32_t signo,
-                       bool value);
-
-    bool
-    GetShouldStop (int32_t signo) const;
-
-    bool
-    SetShouldStop (int32_t signo,
-                   bool value);
-
-    bool
-    GetShouldNotify (int32_t signo) const;
-
-    bool
-    SetShouldNotify (int32_t signo, bool value);
-
-    int32_t
-    GetNumSignals () const;
-
-    int32_t
-    GetSignalAtIndex (int32_t index) const;
-
-    %pythoncode %{
-        def get_unix_signals_list(self):
-            signals = []
-            for idx in range(0, self.GetNumSignals()):
-                signals.append(self.GetSignalAtIndex(sig))
-            return signals
-
-        threads = property(get_unix_signals_list, None, doc='''A read only property that returns a list() of valid signal numbers for this platform.''')
-    %}
-};
-
-}  // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBValue.i b/src/llvm-project/lldb/scripts/interface/SBValue.i
deleted file mode 100644
index 10ad04f..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBValue.i
+++ /dev/null
@@ -1,597 +0,0 @@
-//===-- SWIG Interface for SBValue ------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents the value of a variable, a register, or an expression.
-
-SBValue supports iteration through its child, which in turn is represented
-as an SBValue.  For example, we can get the general purpose registers of a
-frame as an SBValue, and iterate through all the registers,
-
-    registerSet = frame.registers # Returns an SBValueList.
-    for regs in registerSet:
-        if 'general purpose registers' in regs.name.lower():
-            GPRs = regs
-            break
-
-    print('%s (number of children = %d):' % (GPRs.name, GPRs.num_children))
-    for reg in GPRs:
-        print('Name: ', reg.name, ' Value: ', reg.value)
-
-produces the output:
-
-General Purpose Registers (number of children = 21):
-Name:  rax  Value:  0x0000000100000c5c
-Name:  rbx  Value:  0x0000000000000000
-Name:  rcx  Value:  0x00007fff5fbffec0
-Name:  rdx  Value:  0x00007fff5fbffeb8
-Name:  rdi  Value:  0x0000000000000001
-Name:  rsi  Value:  0x00007fff5fbffea8
-Name:  rbp  Value:  0x00007fff5fbffe80
-Name:  rsp  Value:  0x00007fff5fbffe60
-Name:  r8  Value:  0x0000000008668682
-Name:  r9  Value:  0x0000000000000000
-Name:  r10  Value:  0x0000000000001200
-Name:  r11  Value:  0x0000000000000206
-Name:  r12  Value:  0x0000000000000000
-Name:  r13  Value:  0x0000000000000000
-Name:  r14  Value:  0x0000000000000000
-Name:  r15  Value:  0x0000000000000000
-Name:  rip  Value:  0x0000000100000dae
-Name:  rflags  Value:  0x0000000000000206
-Name:  cs  Value:  0x0000000000000027
-Name:  fs  Value:  0x0000000000000010
-Name:  gs  Value:  0x0000000000000048
-
-See also linked_list_iter() for another perspective on how to iterate through an
-SBValue instance which interprets the value object as representing the head of a
-linked list."
-) SBValue;
-class SBValue
-{
-public:
-    SBValue ();
-
-    SBValue (const SBValue &rhs);
-
-    ~SBValue ();
-
-    bool
-    IsValid();
-
-    explicit operator bool() const;
-
-    void
-    Clear();
-
-    SBError
-    GetError();
-
-    lldb::user_id_t
-    GetID ();
-
-    const char *
-    GetName();
-
-    const char *
-    GetTypeName ();
-
-    const char *
-    GetDisplayTypeName ();
-
-    size_t
-    GetByteSize ();
-
-    bool
-    IsInScope ();
-
-    lldb::Format
-    GetFormat ();
-
-    void
-    SetFormat (lldb::Format format);
-
-    const char *
-    GetValue ();
-
-    int64_t
-    GetValueAsSigned(SBError& error, int64_t fail_value=0);
-
-    uint64_t
-    GetValueAsUnsigned(SBError& error, uint64_t fail_value=0);
-
-    int64_t
-    GetValueAsSigned(int64_t fail_value=0);
-
-    uint64_t
-    GetValueAsUnsigned(uint64_t fail_value=0);
-
-    ValueType
-    GetValueType ();
-
-    bool
-    GetValueDidChange ();
-
-    const char *
-    GetSummary ();
-
-    const char *
-    GetSummary (lldb::SBStream& stream,
-                lldb::SBTypeSummaryOptions& options);
-
-    const char *
-    GetObjectDescription ();
-
-    const char *
-    GetTypeValidatorResult ();
-
-    lldb::SBValue
-    GetDynamicValue (lldb::DynamicValueType use_dynamic);
-
-    lldb::SBValue
-    GetStaticValue ();
-
-    lldb::SBValue
-    GetNonSyntheticValue ();
-
-    lldb::DynamicValueType
-    GetPreferDynamicValue ();
-
-    void
-    SetPreferDynamicValue (lldb::DynamicValueType use_dynamic);
-
-    bool
-    GetPreferSyntheticValue ();
-
-    void
-    SetPreferSyntheticValue (bool use_synthetic);
-
-    bool
-    IsDynamic();
-
-    bool
-    IsSynthetic ();
-
-    bool
-    IsSyntheticChildrenGenerated ();
-
-    void
-    SetSyntheticChildrenGenerated (bool);
-
-    const char *
-    GetLocation ();
-
-    bool
-    SetValueFromCString (const char *value_str);
-
-    bool
-    SetValueFromCString (const char *value_str, lldb::SBError& error);
-
-    lldb::SBTypeFormat
-    GetTypeFormat ();
-
-    lldb::SBTypeSummary
-    GetTypeSummary ();
-
-    lldb::SBTypeFilter
-    GetTypeFilter ();
-
-    lldb::SBTypeSynthetic
-    GetTypeSynthetic ();
-
-    lldb::SBValue
-    GetChildAtIndex (uint32_t idx);
-
-    %feature("docstring", "
-    Get a child value by index from a value.
-
-    Structs, unions, classes, arrays and pointers have child
-    values that can be access by index.
-
-    Structs and unions access child members using a zero based index
-    for each child member. For
-
-    Classes reserve the first indexes for base classes that have
-    members (empty base classes are omitted), and all members of the
-    current class will then follow the base classes.
-
-    Pointers differ depending on what they point to. If the pointer
-    points to a simple type, the child at index zero
-    is the only child value available, unless synthetic_allowed
-    is true, in which case the pointer will be used as an array
-    and can create 'synthetic' child values using positive or
-    negative indexes. If the pointer points to an aggregate type
-    (an array, class, union, struct), then the pointee is
-    transparently skipped and any children are going to be the indexes
-    of the child values within the aggregate type. For example if
-    we have a 'Point' type and we have a SBValue that contains a
-    pointer to a 'Point' type, then the child at index zero will be
-    the 'x' member, and the child at index 1 will be the 'y' member
-    (the child at index zero won't be a 'Point' instance).
-
-    If you actually need an SBValue that represents the type pointed
-    to by a SBValue for which GetType().IsPointeeType() returns true,
-    regardless of the pointee type, you can do that with the SBValue.Dereference
-    method (or the equivalent deref property).
-
-    Arrays have a preset number of children that can be accessed by
-    index and will returns invalid child values for indexes that are
-    out of bounds unless the synthetic_allowed is true. In this
-    case the array can create 'synthetic' child values for indexes
-    that aren't in the array bounds using positive or negative
-    indexes.
-
-    @param[in] idx
-        The index of the child value to get
-
-    @param[in] use_dynamic
-        An enumeration that specifies whether to get dynamic values,
-        and also if the target can be run to figure out the dynamic
-        type of the child value.
-
-    @param[in] synthetic_allowed
-        If true, then allow child values to be created by index
-        for pointers and arrays for indexes that normally wouldn't
-        be allowed.
-
-    @return
-        A new SBValue object that represents the child member value.") GetChildAtIndex;
-    lldb::SBValue
-    GetChildAtIndex (uint32_t idx,
-                     lldb::DynamicValueType use_dynamic,
-                     bool can_create_synthetic);
-
-    lldb::SBValue
-    CreateChildAtOffset (const char *name, uint32_t offset, lldb::SBType type);
-
-    lldb::SBValue
-    SBValue::Cast (lldb::SBType type);
-
-    lldb::SBValue
-    CreateValueFromExpression (const char *name, const char* expression);
-
-    lldb::SBValue
-    CreateValueFromExpression (const char *name, const char* expression, SBExpressionOptions &options);
-
-    lldb::SBValue
-    CreateValueFromAddress(const char* name, lldb::addr_t address, lldb::SBType type);
-
-  lldb::SBValue
-  CreateValueFromData (const char* name,
-                       lldb::SBData data,
-                       lldb::SBType type);
-
-    lldb::SBType
-    GetType();
-
-    %feature("docstring", "
-    Returns the child member index.
-
-    Matches children of this object only and will match base classes and
-    member names if this is a clang typed object.
-
-    @param[in] name
-        The name of the child value to get
-
-    @return
-        An index to the child member value.") GetIndexOfChildWithName;
-    uint32_t
-    GetIndexOfChildWithName (const char *name);
-
-    lldb::SBValue
-    GetChildMemberWithName (const char *name);
-
-    %feature("docstring", "
-    Returns the child member value.
-
-    Matches child members of this object and child members of any base
-    classes.
-
-    @param[in] name
-        The name of the child value to get
-
-    @param[in] use_dynamic
-        An enumeration that specifies whether to get dynamic values,
-        and also if the target can be run to figure out the dynamic
-        type of the child value.
-
-    @return
-        A new SBValue object that represents the child member value.") GetChildMemberWithName;
-    lldb::SBValue
-    GetChildMemberWithName (const char *name, lldb::DynamicValueType use_dynamic);
-
-    %feature("docstring", "Expands nested expressions like .a->b[0].c[1]->d."
-    ) GetValueForExpressionPath;
-    lldb::SBValue
-    GetValueForExpressionPath(const char* expr_path);
-
-    lldb::SBDeclaration
-    GetDeclaration ();
-
-    bool
-    MightHaveChildren ();
-
-    bool
-    IsRuntimeSupportValue ();
-
-    uint32_t
-    GetNumChildren ();
-
-    %feature("doctstring", "
-    Returns the number for children.
-
-    @param[in] max
-        If max is less the lldb.UINT32_MAX, then the returned value is
-        capped to max.
-
-    @return
-        An integer value capped to the argument max.") GetNumChildren;
-    uint32_t
-    GetNumChildren (uint32_t max);
-
-    void *
-    GetOpaqueType();
-
-    lldb::SBValue
-    Dereference ();
-
-    lldb::SBValue
-    AddressOf();
-
-    bool
-    TypeIsPointerType ();
-
-    lldb::SBTarget
-    GetTarget();
-
-    lldb::SBProcess
-    GetProcess();
-
-    lldb::SBThread
-    GetThread();
-
-    lldb::SBFrame
-    GetFrame();
-
-    %feature("docstring", "
-    Find and watch a variable.
-    It returns an SBWatchpoint, which may be invalid.") Watch;
-    lldb::SBWatchpoint
-    Watch (bool resolve_location, bool read, bool write, SBError &error);
-
-    %feature("docstring", "
-    Find and watch the location pointed to by a variable.
-    It returns an SBWatchpoint, which may be invalid.") WatchPointee;
-    lldb::SBWatchpoint
-    WatchPointee (bool resolve_location, bool read, bool write, SBError &error);
-
-    bool
-    GetDescription (lldb::SBStream &description);
-
-    bool
-    GetExpressionPath (lldb::SBStream &description);
-
-  %feature("docstring", "
-    Get an SBData wrapping what this SBValue points to.
-
-    This method will dereference the current SBValue, if its
-    data type is a T* or T[], and extract item_count elements
-    of type T from it, copying their contents in an SBData.
-
-    @param[in] item_idx
-        The index of the first item to retrieve. For an array
-        this is equivalent to array[item_idx], for a pointer
-        to *(pointer + item_idx). In either case, the measurement
-        unit for item_idx is the sizeof(T) rather than the byte
-
-    @param[in] item_count
-        How many items should be copied into the output. By default
-        only one item is copied, but more can be asked for.
-
-    @return
-        An SBData with the contents of the copied items, on success.
-        An empty SBData otherwise.") GetPointeeData;
-  lldb::SBData
-  GetPointeeData (uint32_t item_idx = 0,
-          uint32_t item_count = 1);
-
-    %feature("docstring", "
-    Get an SBData wrapping the contents of this SBValue.
-
-    This method will read the contents of this object in memory
-    and copy them into an SBData for future use.
-
-    @return
-        An SBData with the contents of this SBValue, on success.
-        An empty SBData otherwise.") GetData;
-    lldb::SBData
-    GetData ();
-
-    bool
-    SetData (lldb::SBData &data, lldb::SBError& error);
-
-  lldb::addr_t
-  GetLoadAddress();
-
-  lldb::SBAddress
-  GetAddress();
-
-    lldb::SBValue
-    Persist ();
-
-    %feature("docstring", "Returns an expression path for this value."
-    ) GetExpressionPath;
-    bool
-    GetExpressionPath (lldb::SBStream &description, bool qualify_cxx_base_classes);
-
-    lldb::SBValue
-    EvaluateExpression(const char *expr) const;
-
-    lldb::SBValue
-    EvaluateExpression(const char *expr,
-                       const SBExpressionOptions &options) const;
-
-    lldb::SBValue
-    EvaluateExpression(const char *expr,
-                       const SBExpressionOptions &options,
-                       const char *name) const;
-
-    %pythoncode %{
-        def __get_dynamic__ (self):
-            '''Helper function for the "SBValue.dynamic" property.'''
-            return self.GetDynamicValue (eDynamicCanRunTarget)
-
-        class children_access(object):
-            '''A helper object that will lazily hand out thread for a process when supplied an index.'''
-
-            def __init__(self, sbvalue):
-                self.sbvalue = sbvalue
-
-            def __len__(self):
-                if self.sbvalue:
-                    return int(self.sbvalue.GetNumChildren())
-                return 0
-
-            def __getitem__(self, key):
-                if type(key) is int and key < len(self):
-                    return self.sbvalue.GetChildAtIndex(key)
-                return None
-
-        def get_child_access_object(self):
-            '''An accessor function that returns a children_access() object which allows lazy member variable access from a lldb.SBValue object.'''
-            return self.children_access (self)
-
-        def get_value_child_list(self):
-            '''An accessor function that returns a list() that contains all children in a lldb.SBValue object.'''
-            children = []
-            accessor = self.get_child_access_object()
-            for idx in range(len(accessor)):
-                children.append(accessor[idx])
-            return children
-
-        def __iter__(self):
-            '''Iterate over all child values of a lldb.SBValue object.'''
-            return lldb_iter(self, 'GetNumChildren', 'GetChildAtIndex')
-
-        def __len__(self):
-            '''Return the number of child values of a lldb.SBValue object.'''
-            return self.GetNumChildren()
-
-        children = property(get_value_child_list, None, doc='''A read only property that returns a list() of lldb.SBValue objects for the children of the value.''')
-        child = property(get_child_access_object, None, doc='''A read only property that returns an object that can access children of a variable by index (child_value = value.children[12]).''')
-        name = property(GetName, None, doc='''A read only property that returns the name of this value as a string.''')
-        type = property(GetType, None, doc='''A read only property that returns a lldb.SBType object that represents the type for this value.''')
-        size = property(GetByteSize, None, doc='''A read only property that returns the size in bytes of this value.''')
-        is_in_scope = property(IsInScope, None, doc='''A read only property that returns a boolean value that indicates whether this value is currently lexically in scope.''')
-        format = property(GetName, SetFormat, doc='''A read/write property that gets/sets the format used for lldb.SBValue().GetValue() for this value. See enumerations that start with "lldb.eFormat".''')
-        value = property(GetValue, SetValueFromCString, doc='''A read/write property that gets/sets value from a string.''')
-        value_type = property(GetValueType, None, doc='''A read only property that returns an lldb enumeration value (see enumerations that start with "lldb.eValueType") that represents the type of this value (local, argument, global, register, etc.).''')
-        changed = property(GetValueDidChange, None, doc='''A read only property that returns a boolean value that indicates if this value has changed since it was last updated.''')
-        data = property(GetData, None, doc='''A read only property that returns an lldb object (lldb.SBData) that represents the bytes that make up the value for this object.''')
-        load_addr = property(GetLoadAddress, None, doc='''A read only property that returns the load address of this value as an integer.''')
-        addr = property(GetAddress, None, doc='''A read only property that returns an lldb.SBAddress that represents the address of this value if it is in memory.''')
-        deref = property(Dereference, None, doc='''A read only property that returns an lldb.SBValue that is created by dereferencing this value.''')
-        address_of = property(AddressOf, None, doc='''A read only property that returns an lldb.SBValue that represents the address-of this value.''')
-        error = property(GetError, None, doc='''A read only property that returns the lldb.SBError that represents the error from the last time the variable value was calculated.''')
-        summary = property(GetSummary, None, doc='''A read only property that returns the summary for this value as a string''')
-        description = property(GetObjectDescription, None, doc='''A read only property that returns the language-specific description of this value as a string''')
-        dynamic = property(__get_dynamic__, None, doc='''A read only property that returns an lldb.SBValue that is created by finding the dynamic type of this value.''')
-        location = property(GetLocation, None, doc='''A read only property that returns the location of this value as a string.''')
-        target = property(GetTarget, None, doc='''A read only property that returns the lldb.SBTarget that this value is associated with.''')
-        process = property(GetProcess, None, doc='''A read only property that returns the lldb.SBProcess that this value is associated with, the returned value might be invalid and should be tested.''')
-        thread = property(GetThread, None, doc='''A read only property that returns the lldb.SBThread that this value is associated with, the returned value might be invalid and should be tested.''')
-        frame = property(GetFrame, None, doc='''A read only property that returns the lldb.SBFrame that this value is associated with, the returned value might be invalid and should be tested.''')
-        num_children = property(GetNumChildren, None, doc='''A read only property that returns the number of child lldb.SBValues that this value has.''')
-        unsigned = property(GetValueAsUnsigned, None, doc='''A read only property that returns the value of this SBValue as an usigned integer.''')
-        signed = property(GetValueAsSigned, None, doc='''A read only property that returns the value of this SBValue as a signed integer.''')
-
-        def get_expr_path(self):
-            s = SBStream()
-            self.GetExpressionPath (s)
-            return s.GetData()
-
-        path = property(get_expr_path, None, doc='''A read only property that returns the expression path that one can use to reach this value in an expression.''')
-
-        def synthetic_child_from_expression(self, name, expr, options=None):
-            if options is None: options = lldb.SBExpressionOptions()
-            child = self.CreateValueFromExpression(name, expr, options)
-            child.SetSyntheticChildrenGenerated(True)
-            return child
-
-        def synthetic_child_from_data(self, name, data, type):
-            child = self.CreateValueFromData(name, data, type)
-            child.SetSyntheticChildrenGenerated(True)
-            return child
-
-        def synthetic_child_from_address(self, name, addr, type):
-            child = self.CreateValueFromAddress(name, addr, type)
-            child.SetSyntheticChildrenGenerated(True)
-            return child
-
-        def __eol_test(val):
-            """Default function for end of list test takes an SBValue object.
-
-            Return True if val is invalid or it corresponds to a null pointer.
-            Otherwise, return False.
-            """
-            if not val or val.GetValueAsUnsigned() == 0:
-                return True
-            else:
-                return False
-
-        # ==================================================
-        # Iterator for lldb.SBValue treated as a linked list
-        # ==================================================
-        def linked_list_iter(self, next_item_name, end_of_list_test=__eol_test):
-            """Generator adaptor to support iteration for SBValue as a linked list.
-
-            linked_list_iter() is a special purpose iterator to treat the SBValue as
-            the head of a list data structure, where you specify the child member
-            name which points to the next item on the list and you specify the
-            end-of-list test function which takes an SBValue for an item and returns
-            True if EOL is reached and False if not.
-
-            linked_list_iter() also detects infinite loop and bails out early.
-
-            The end_of_list_test arg, if omitted, defaults to the __eol_test
-            function above.
-
-            For example,
-
-            # Get Frame #0.
-            ...
-
-            # Get variable 'task_head'.
-            task_head = frame0.FindVariable('task_head')
-            ...
-
-            for t in task_head.linked_list_iter('next'):
-                print t
-            """
-            if end_of_list_test(self):
-                return
-            item = self
-            visited = set()
-            try:
-                while not end_of_list_test(item) and not item.GetValueAsUnsigned() in visited:
-                    visited.add(item.GetValueAsUnsigned())
-                    yield item
-                    # Prepare for the next iteration.
-                    item = item.GetChildMemberWithName(next_item_name)
-            except:
-                # Exception occurred.  Stop the generator.
-                pass
-
-            return
-    %}
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBValueList.i b/src/llvm-project/lldb/scripts/interface/SBValueList.i
deleted file mode 100644
index a43e228..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBValueList.i
+++ /dev/null
@@ -1,147 +0,0 @@
-//===-- SWIG Interface for SBValueList --------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents a collection of SBValues.  Both SBFrame's GetVariables() and
-GetRegisters() return a SBValueList.
-
-SBValueList supports SBValue iteration. For example (from test/lldbutil.py),
-
-def get_registers(frame, kind):
-    '''Returns the registers given the frame and the kind of registers desired.
-
-    Returns None if there's no such kind.
-    '''
-    registerSet = frame.GetRegisters() # Return type of SBValueList.
-    for value in registerSet:
-        if kind.lower() in value.GetName().lower():
-            return value
-
-    return None
-
-def get_GPRs(frame):
-    '''Returns the general purpose registers of the frame as an SBValue.
-
-    The returned SBValue object is iterable.  An example:
-        ...
-        from lldbutil import get_GPRs
-        regs = get_GPRs(frame)
-        for reg in regs:
-            print('%s => %s' % (reg.GetName(), reg.GetValue()))
-        ...
-    '''
-    return get_registers(frame, 'general purpose')
-
-def get_FPRs(frame):
-    '''Returns the floating point registers of the frame as an SBValue.
-
-    The returned SBValue object is iterable.  An example:
-        ...
-        from lldbutil import get_FPRs
-        regs = get_FPRs(frame)
-        for reg in regs:
-            print('%s => %s' % (reg.GetName(), reg.GetValue()))
-        ...
-    '''
-    return get_registers(frame, 'floating point')
-
-def get_ESRs(frame):
-    '''Returns the exception state registers of the frame as an SBValue.
-
-    The returned SBValue object is iterable.  An example:
-        ...
-        from lldbutil import get_ESRs
-        regs = get_ESRs(frame)
-        for reg in regs:
-            print('%s => %s' % (reg.GetName(), reg.GetValue()))
-        ...
-    '''
-    return get_registers(frame, 'exception state')"
-) SBValueList;
-class SBValueList
-{
-public:
-
-    SBValueList ();
-
-    SBValueList (const lldb::SBValueList &rhs);
-
-    ~SBValueList();
-
-    bool
-    IsValid() const;
-
-    explicit operator bool() const;
-
-    void
-    Clear();
-
-    void
-    Append (const lldb::SBValue &val_obj);
-
-    void
-    Append (const lldb::SBValueList& value_list);
-
-    uint32_t
-    GetSize() const;
-
-    lldb::SBValue
-    GetValueAtIndex (uint32_t idx) const;
-
-    lldb::SBValue
-    FindValueObjectByUID (lldb::user_id_t uid);
-
-    lldb::SBValue
-    GetFirstValueByName (const char* name) const;
-
-    %pythoncode %{
-        def __iter__(self):
-            '''Iterate over all values in a lldb.SBValueList object.'''
-            return lldb_iter(self, 'GetSize', 'GetValueAtIndex')
-
-        def __len__(self):
-            return int(self.GetSize())
-
-        def __getitem__(self, key):
-            count = len(self)
-            #------------------------------------------------------------
-            # Access with "int" to get Nth item in the list
-            #------------------------------------------------------------
-            if type(key) is int:
-                if key < count:
-                    return self.GetValueAtIndex(key)
-            #------------------------------------------------------------
-            # Access with "str" to get values by name
-            #------------------------------------------------------------
-            elif type(key) is str:
-                matches = []
-                for idx in range(count):
-                    value = self.GetValueAtIndex(idx)
-                    if value.name == key:
-                        matches.append(value)
-                return matches
-            #------------------------------------------------------------
-            # Match with regex
-            #------------------------------------------------------------
-            elif isinstance(key, type(re.compile('.'))):
-                matches = []
-                for idx in range(count):
-                    value = self.GetValueAtIndex(idx)
-                    re_match = key.search(value.name)
-                    if re_match:
-                        matches.append(value)
-                return matches
-
-    %}
-
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/interface/SBWatchpoint.i b/src/llvm-project/lldb/scripts/interface/SBWatchpoint.i
deleted file mode 100644
index e11c4f2..0000000
--- a/src/llvm-project/lldb/scripts/interface/SBWatchpoint.i
+++ /dev/null
@@ -1,95 +0,0 @@
-//===-- SWIG Interface for SBWatchpoint -----------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-namespace lldb {
-
-%feature("docstring",
-"Represents an instance of watchpoint for a specific target program.
-
-A watchpoint is determined by the address and the byte size that resulted in
-this particular instantiation.  Each watchpoint has its settable options.
-
-See also SBTarget.watchpoint_iter() for example usage of iterating through the
-watchpoints of the target."
-) SBWatchpoint;
-class SBWatchpoint
-{
-public:
-
-    SBWatchpoint ();
-
-    SBWatchpoint (const lldb::SBWatchpoint &rhs);
-
-    ~SBWatchpoint ();
-
-    bool
-    IsValid();
-
-    explicit operator bool() const;
-
-    bool operator==(const SBWatchpoint &rhs) const;
-
-    bool operator!=(const SBWatchpoint &rhs) const;
-
-    SBError
-    GetError();
-
-    watch_id_t
-    GetID ();
-
-    %feature("docstring", "
-    With -1 representing an invalid hardware index.") GetHardwareIndex;
-    int32_t
-    GetHardwareIndex ();
-
-    lldb::addr_t
-    GetWatchAddress ();
-
-    size_t
-    GetWatchSize();
-
-    void
-    SetEnabled(bool enabled);
-
-    bool
-    IsEnabled ();
-
-    uint32_t
-    GetHitCount ();
-
-    uint32_t
-    GetIgnoreCount ();
-
-    void
-    SetIgnoreCount (uint32_t n);
-
-    %feature("docstring", "
-    Get the condition expression for the watchpoint.") GetCondition;
-    const char *
-    GetCondition ();
-
-    %feature("docstring", "
-    The watchpoint stops only if the condition expression evaluates to true.") SetCondition;
-    void
-    SetCondition (const char *condition);
-
-    bool
-    GetDescription (lldb::SBStream &description, DescriptionLevel level);
-
-    static bool
-    EventIsWatchpointEvent (const lldb::SBEvent &event);
-
-    static lldb::WatchpointEventType
-    GetWatchpointEventTypeFromEvent (const lldb::SBEvent& event);
-
-    static lldb::SBWatchpoint
-    GetWatchpointFromEvent (const lldb::SBEvent& event);
-
-};
-
-} // namespace lldb
diff --git a/src/llvm-project/lldb/scripts/lldb.swig b/src/llvm-project/lldb/scripts/lldb.swig
deleted file mode 100644
index 3cad53a..0000000
--- a/src/llvm-project/lldb/scripts/lldb.swig
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
-   lldb.swig
-
-   This is the input file for SWIG, to create the appropriate C++ wrappers and
-   functions for various scripting languages, to enable them to call the
-   liblldb Script Bridge functions.
-*/
-
-/* Define our module docstring. */
-%define DOCSTRING
-"The lldb module contains the public APIs for Python binding.
-
-Some of the important classes are described here:
-
-o SBTarget: Represents the target program running under the debugger.
-o SBProcess: Represents the process associated with the target program.
-o SBThread: Represents a thread of execution. SBProcess contains SBThread(s).
-o SBFrame: Represents one of the stack frames associated with a thread. SBThread
-      contains SBFrame(s).
-o SBSymbolContext: A container that stores various debugger related info.
-o SBValue: Represents the value of a variable, a register, or an expression.
-o SBModule: Represents an executable image and its associated object and symbol
-      files.  SBTarget contains SBModule(s).
-o SBBreakpoint: Represents a logical breakpoint and its associated settings.
-      SBTarget contains SBBreakpoint(s).
-o SBSymbol: Represents the symbol possibly associated with a stack frame.
-o SBCompileUnit: Represents a compilation unit, or compiled source file.
-o SBFunction: Represents a generic function, which can be inlined or not.
-o SBBlock: Represents a lexical block. SBFunction contains SBBlock(s).
-o SBLineEntry: Specifies an association with a contiguous range of instructions
-      and a source file location. SBCompileUnit contains SBLineEntry(s)."
-%enddef
-
-/*
-Since version 3.0.9, swig's logic for importing the native module has changed in
-a way that is incompatible with our usage of the python module as __init__.py
-(See swig bug #769).  Fortunately, since version 3.0.11, swig provides a way for
-us to override the module import logic to suit our needs. This does that.
-
-Older swig versions will simply ignore this setting.
-*/
-%define MODULEIMPORT
-"try:
-    # Try an absolute import first.  If we're being loaded from lldb,
-    # _lldb should be a built-in module.
-    import $module
-except ImportError:
-    # Relative import should work if we are being loaded by Python.
-    from . import $module"
-%enddef
-// These versions will not generate working python modules, so error out early.
-#if SWIG_VERSION >= 0x030009 && SWIG_VERSION < 0x030011
-#error Swig versions 3.0.9 and 3.0.10 are incompatible with lldb.
-#endif
-
-// The name of the module to be created.
-%module(docstring=DOCSTRING, moduleimport=MODULEIMPORT) lldb
-
-// Parameter types will be used in the autodoc string.
-%feature("autodoc", "1");
-
-%pythoncode%{
-import uuid
-import re
-import os
-
-import six
-%}
-
-// Include the version of swig that was used to generate this interface.
-%define EMBED_VERSION(VERSION)
-%pythoncode%{
-# SWIG_VERSION is written as a single hex number, but the components of it are
-# meant to be interpreted in decimal. So, 0x030012 is swig 3.0.12, and not
-# 3.0.18.
-def _to_int(hex):
-    return hex // 0x10 % 0x10 * 10 + hex % 0x10
-swig_version = (_to_int(VERSION // 0x10000), _to_int(VERSION // 0x100), _to_int(VERSION))
-del _to_int
-%}
-%enddef
-EMBED_VERSION(SWIG_VERSION)
-
-%pythoncode%{
-# ===================================
-# Iterator for lldb container objects
-# ===================================
-def lldb_iter(obj, getsize, getelem):
-    """A generator adaptor to support iteration for lldb container objects."""
-    size = getattr(obj, getsize)
-    elem = getattr(obj, getelem)
-    for i in range(size()):
-        yield elem(i)
-%}
-
-%include "./Python/python-typemaps.swig"
-
-/* C++ headers to be included. */
-%{
-#include <algorithm>
-#include <string>
-%}
-
-/* The liblldb header files to be included. */
-%{
-#include "lldb/lldb-public.h"
-#include "lldb/API/SBAddress.h"
-#include "lldb/API/SBAttachInfo.h"
-#include "lldb/API/SBBlock.h"
-#include "lldb/API/SBBreakpoint.h"
-#include "lldb/API/SBBreakpointLocation.h"
-#include "lldb/API/SBBreakpointName.h"
-#include "lldb/API/SBBroadcaster.h"
-#include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBCommandReturnObject.h"
-#include "lldb/API/SBCommunication.h"
-#include "lldb/API/SBCompileUnit.h"
-#include "lldb/API/SBData.h"
-#include "lldb/API/SBDebugger.h"
-#include "lldb/API/SBDeclaration.h"
-#include "lldb/API/SBError.h"
-#include "lldb/API/SBEvent.h"
-#include "lldb/API/SBExecutionContext.h"
-#include "lldb/API/SBExpressionOptions.h"
-#include "lldb/API/SBFileSpec.h"
-#include "lldb/API/SBFileSpecList.h"
-#include "lldb/API/SBFrame.h"
-#include "lldb/API/SBFunction.h"
-#include "lldb/API/SBHostOS.h"
-#include "lldb/API/SBInstruction.h"
-#include "lldb/API/SBInstructionList.h"
-#include "lldb/API/SBLanguageRuntime.h"
-#include "lldb/API/SBLaunchInfo.h"
-#include "lldb/API/SBLineEntry.h"
-#include "lldb/API/SBListener.h"
-#include "lldb/API/SBMemoryRegionInfo.h"
-#include "lldb/API/SBMemoryRegionInfoList.h"
-#include "lldb/API/SBModule.h"
-#include "lldb/API/SBModuleSpec.h"
-#include "lldb/API/SBPlatform.h"
-#include "lldb/API/SBProcess.h"
-#include "lldb/API/SBProcessInfo.h"
-#include "lldb/API/SBQueue.h"
-#include "lldb/API/SBQueueItem.h"
-#include "lldb/API/SBSection.h"
-#include "lldb/API/SBSourceManager.h"
-#include "lldb/API/SBStream.h"
-#include "lldb/API/SBStringList.h"
-#include "lldb/API/SBStructuredData.h"
-#include "lldb/API/SBSymbol.h"
-#include "lldb/API/SBSymbolContext.h"
-#include "lldb/API/SBSymbolContextList.h"
-#include "lldb/API/SBTarget.h"
-#include "lldb/API/SBThread.h"
-#include "lldb/API/SBThreadCollection.h"
-#include "lldb/API/SBThreadPlan.h"
-#include "lldb/API/SBTrace.h"
-#include "lldb/API/SBTraceOptions.h"
-#include "lldb/API/SBType.h"
-#include "lldb/API/SBTypeCategory.h"
-#include "lldb/API/SBTypeEnumMember.h"
-#include "lldb/API/SBTypeFilter.h"
-#include "lldb/API/SBTypeFormat.h"
-#include "lldb/API/SBTypeNameSpecifier.h"
-#include "lldb/API/SBTypeSummary.h"
-#include "lldb/API/SBTypeSynthetic.h"
-#include "lldb/API/SBValue.h"
-#include "lldb/API/SBValueList.h"
-#include "lldb/API/SBVariablesOptions.h"
-#include "lldb/API/SBWatchpoint.h"
-#include "lldb/API/SBUnixSignals.h"
-
-#include "../source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h"
-
-#include "../scripts/Python/python-swigsafecast.swig"
-%}
-
-/* Various liblldb typedefs that SWIG needs to know about.  */
-#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */
-/* The ISO C99 standard specifies that in C++ implementations limit macros such
-   as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */
-#define __STDC_LIMIT_MACROS
-%include "stdint.i"
-
-%include "lldb/lldb-defines.h"
-%include "lldb/lldb-enumerations.h"
-%include "lldb/lldb-forward.h"
-%include "lldb/lldb-types.h"
-
-/* Forward declaration of SB classes. */
-%include "lldb/API/SBDefines.h"
-
-/* Python interface files with docstrings. */
-%include "./interface/SBAddress.i"
-%include "./interface/SBAttachInfo.i"
-%include "./interface/SBBlock.i"
-%include "./interface/SBBreakpoint.i"
-%include "./interface/SBBreakpointLocation.i"
-%include "./interface/SBBreakpointName.i"
-%include "./interface/SBBroadcaster.i"
-%include "./interface/SBCommandInterpreter.i"
-%include "./interface/SBCommandReturnObject.i"
-%include "./interface/SBCommunication.i"
-%include "./interface/SBCompileUnit.i"
-%include "./interface/SBData.i"
-%include "./interface/SBDebugger.i"
-%include "./interface/SBDeclaration.i"
-%include "./interface/SBError.i"
-%include "./interface/SBEvent.i"
-%include "./interface/SBExecutionContext.i"
-%include "./interface/SBExpressionOptions.i"
-%include "./interface/SBFileSpec.i"
-%include "./interface/SBFileSpecList.i"
-%include "./interface/SBFrame.i"
-%include "./interface/SBFunction.i"
-%include "./interface/SBHostOS.i"
-%include "./interface/SBInstruction.i"
-%include "./interface/SBInstructionList.i"
-%include "./interface/SBLanguageRuntime.i"
-%include "./interface/SBLaunchInfo.i"
-%include "./interface/SBLineEntry.i"
-%include "./interface/SBListener.i"
-%include "./interface/SBMemoryRegionInfo.i"
-%include "./interface/SBMemoryRegionInfoList.i"
-%include "./interface/SBModule.i"
-%include "./interface/SBModuleSpec.i"
-%include "./interface/SBPlatform.i"
-%include "./interface/SBProcess.i"
-%include "./interface/SBProcessInfo.i"
-%include "./interface/SBQueue.i"
-%include "./interface/SBQueueItem.i"
-%include "./interface/SBSection.i"
-%include "./interface/SBSourceManager.i"
-%include "./interface/SBStream.i"
-%include "./interface/SBStringList.i"
-%include "./interface/SBStructuredData.i"
-%include "./interface/SBSymbol.i"
-%include "./interface/SBSymbolContext.i"
-%include "./interface/SBSymbolContextList.i"
-%include "./interface/SBTarget.i"
-%include "./interface/SBThread.i"
-%include "./interface/SBThreadCollection.i"
-%include "./interface/SBThreadPlan.i"
-%include "./interface/SBTrace.i"
-%include "./interface/SBTraceOptions.i"
-%include "./interface/SBType.i"
-%include "./interface/SBTypeCategory.i"
-%include "./interface/SBTypeEnumMember.i"
-%include "./interface/SBTypeFilter.i"
-%include "./interface/SBTypeFormat.i"
-%include "./interface/SBTypeNameSpecifier.i"
-%include "./interface/SBTypeSummary.i"
-%include "./interface/SBTypeSynthetic.i"
-%include "./interface/SBValue.i"
-%include "./interface/SBValueList.i"
-%include "./interface/SBVariablesOptions.i"
-%include "./interface/SBWatchpoint.i"
-%include "./interface/SBUnixSignals.i"
-
-%include "./Python/python-extensions.swig"
-
-%include "./Python/python-wrapper.swig"
-
-%pythoncode%{
-debugger_unique_id = 0
-SBDebugger.Initialize()
-debugger = None
-target = SBTarget()
-process = SBProcess()
-thread = SBThread()
-frame = SBFrame()
-%}
diff --git a/src/llvm-project/lldb/scripts/prepare_bindings.py b/src/llvm-project/lldb/scripts/prepare_bindings.py
deleted file mode 100755
index 447fc5d..0000000
--- a/src/llvm-project/lldb/scripts/prepare_bindings.py
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/usr/bin/env python
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-Prepares language bindings for LLDB build process.  Run with --help
-to see a description of the supported command line arguments.
-"""
-
-# Python modules:
-import argparse
-import logging
-import os
-import platform
-import sys
-
-# LLDB modules:
-import use_lldb_suite
-from lldbsuite.support import fs
-
-
-def prepare_binding_for_language(scripts_dir, script_lang, options):
-    """Prepares the binding for a specific language.
-
-    @param scripts_dir the full path to the scripts source directory.
-    @param script_lang the name of the script language.  Should be a child
-    directory within the scripts dir, and should contain a
-    prepare_scripts_{script_lang}.py script file in it.
-    @param options the dictionary of parsed command line options.
-
-    There is no return value.  If it returns, the process succeeded; otherwise,
-    the process will exit where it fails.
-    """
-    # Ensure the language-specific prepare module exists.
-    script_name = "prepare_binding_{}.py".format(script_lang)
-    lang_path = os.path.join(scripts_dir, script_lang)
-    script_path = os.path.join(lang_path, script_name)
-    if not os.path.exists(script_path):
-        logging.error(
-            "failed to find prepare script for language '%s' at '%s'",
-            script_lang,
-            script_path)
-        sys.exit(-9)
-
-    # Include this language-specific directory in the Python search
-    # path.
-    sys.path.append(os.path.normcase(lang_path))
-
-    # Execute the specific language script
-    module_name = os.path.splitext(script_name)[0]
-    module = __import__(module_name)
-    module.main(options)
-
-    # Remove the language-specific directory from the Python search path.
-    sys.path.remove(os.path.normcase(lang_path))
-
-
-def prepare_all_bindings(options):
-    """Prepares bindings for each of the languages supported.
-
-    @param options the parsed arguments from the command line
-
-    @return the exit value for the program. 0 is success, all othes
-    indicate some kind of failure.
-    """
-    # Check for the existence of the SWIG scripts folder
-    scripts_dir = os.path.join(options.src_root, "scripts")
-    if not os.path.exists(scripts_dir):
-        logging.error("failed to find scripts dir: '%s'", scripts_dir)
-        sys.exit(-8)
-
-    child_dirs = ["Python"]
-
-    # Iterate script directory find any script language directories
-    for script_lang in child_dirs:
-        logging.info("executing language script for: '%s'", script_lang)
-        prepare_binding_for_language(scripts_dir, script_lang, options)
-
-
-def process_args(args):
-    """Returns options processed from the provided command line.
-
-    @param args the command line to process.
-    """
-
-    # Setup the parser arguments that are accepted.
-    parser = argparse.ArgumentParser(
-        description="Prepare language bindings for LLDB build.")
-
-    # Arguments to control logging verbosity.
-    parser.add_argument(
-        "--debug", "-d",
-        action="store_true",
-        help="Set program logging level to DEBUG.")
-    parser.add_argument(
-        "--verbose", "-v",
-        action="count",
-        default=0,
-        help=(
-            "Increase logging verbosity level.  Default: only error and "
-            "higher are displayed.  Each -v increases level of verbosity."))
-
-    # Arguments to control whether we're building an OS X-style
-    # framework.  This is the opposite of the older "-m" (makefile)
-    # option.
-    parser.add_argument(
-        "--config-build-dir",
-        "--cfgBldDir",
-        help=(
-            "Configuration build dir, will use python module path "
-            "if unspecified."))
-    parser.add_argument(
-        "--find-swig",
-        action="store_true",
-        help=(
-            "Indicates the swig executable should be searched for "
-            "if not eplicitly provided.  Either this or the explicit "
-            "swig executable option must be provided."))
-    parser.add_argument(
-        "--framework",
-        action="store_true",
-        help="Prepare as OS X-style framework.")
-    parser.add_argument(
-        "--generate-dependency-file",
-        "-M",
-        action="store_true",
-        help="Make the dependency (.d) file for the wrappers.")
-    parser.add_argument(
-        "--prefix",
-        help="Override path where the LLDB module is placed.")
-    parser.add_argument(
-        "--src-root",
-        "--srcRoot",
-        "-s",
-        # Default to the parent directory of this script's directory.
-        default=os.path.abspath(
-            os.path.join(
-                os.path.dirname(os.path.realpath(__file__)),
-                os.path.pardir)),
-        help="Specifies the LLDB source root directory.")
-    parser.add_argument(
-        "--swig-executable",
-        "--swigExecutable",
-        help="Path to the swig executable.")
-    parser.add_argument(
-        "--target-dir",
-        "--targetDir",
-        required=True,
-        help=(
-            "Specifies the build dir where the language binding "
-            "should be placed"))
-
-    parser.add_argument(
-        "--target-platform",
-        help=(
-            "Specifies the platform we are building for."
-            "Should be the same as what platform.system() returns."))
-    # Process args.
-    options = parser.parse_args(args)
-
-    # Set logging level based on verbosity count.
-    if options.debug:
-        log_level = logging.DEBUG
-    else:
-        # See logging documentation for error levels.  We'll default
-        # to showing ERROR or higher error messages.  For each -v
-        # specified, we'll shift to the next lower-priority log level.
-        log_level = logging.ERROR - 10 * options.verbose
-        if log_level < logging.NOTSET:
-            # Displays all logged messages.
-            log_level = logging.NOTSET
-    logging.basicConfig(level=log_level)
-    logging.info("logging is using level: %d", log_level)
-
-    return options
-
-
-def main(args):
-    """Drives the main script preparation steps.
-
-    @param args list of command line arguments.
-    """
-    # Process command line arguments.
-    options = process_args(args)
-    logging.debug("Processed args: options=%s", options)
-
-    # Ensure we have a swig executable.
-    if not options.swig_executable or len(options.swig_executable) == 0:
-        if options.find_swig:
-            try:
-                options.swig_executable = fs.find_executable("swig")
-            except Exception as e:
-                logging.error("Unable to find swig executable: %s" % e.message)
-                sys.exit(-6)
-        else:
-            logging.error(
-                "The --find-swig option must be specified "
-                "when the swig executable location is not "
-                "explicitly provided.")
-            sys.exit(-12)
-
-    # Check if the swig file exists.
-    swig_path = os.path.normcase(
-        os.path.join(options.src_root, "scripts", "lldb.swig"))
-    if not os.path.isfile(swig_path):
-        logging.error("swig file not found at '%s'", swig_path)
-        sys.exit(-3)
-
-    # Prepare bindings for each supported language binding.
-    # This will error out if it doesn't succeed.
-    prepare_all_bindings(options)
-    sys.exit(0)
-
-if __name__ == "__main__":
-    # Run the main driver loop.
-    main(sys.argv[1:])
diff --git a/src/llvm-project/lldb/scripts/sed-sources b/src/llvm-project/lldb/scripts/sed-sources
deleted file mode 100755
index c67fb33..0000000
--- a/src/llvm-project/lldb/scripts/sed-sources
+++ /dev/null
@@ -1,251 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use File::Find;
-use File::Temp qw/ tempfile tempdir /;
-use Getopt::Std;
-use Pod::Usage;
-use Text::Tabs;
-
-=head1 NAME
-
-B<sed-sources> -- Performs multiple sed commands on files with the ability to expand or unexpand tabs.
-
-=head1 SYNOPSIS
-
-B<sed-sources> [options] [file dir ...]
-
-=head1 DESCRIPTION
-
-Performs multiple sed commands (modify builtin %seds hash) on source files
-or any sources in directories. If no arguments are given, STDIN will be used
-as the source. If source files or directories are specified as arguments,
-all files will be transformed and overwritten with new versions. Use the B<-p>
-option to preview changes to STDOUT, or use the B<-b> option to make a backup
-or the original files.
-
-=head1 OPTIONS
-
-=over
-
-=item B<-b>
-
-Backup original source file by appending ".bak" before overwriting with the
-newly transformed file.
-
-=item B<-g>
-
-Display verbose debug logging.
-
-=item B<-e>
-
-Expand tabs to spaces (in addition to doing sed substitutions).
-
-=item B<-u>
-
-Unexpand spaces to tabs (in addition to doing sed substitutions).
-
-=item B<-p>
-
-Preview changes to STDOUT without modifying original source files.
-
-=item B<-r>
-
-Skip variants when doing multiple files (no _profile or _debug variants). 
-
-=item B<-t N>
-
-Set the number of spaces per tab (default is 4) to use when expanding or
-unexpanding.
-
-=back
-
-=head1 EXAMPLES
- 
-# Recursively process all source files in the current working directory 
-# and subdirectories and also expand tabs to spaces. All source files 
-# will be overwritten with the newly transformed source files.
-
-% sed-sources -e $cwd
-
-# Recursively process all source files in the current working directory 
-# and subdirectories and also unexpand spaces to tabs and preview the
-# results to STDOUT
-
-% sed-sources -p -u $cwd
-
-# Same as above except use 8 spaces per tab. 
-
-% sed-sources -p -u -t8 $cwd
-
-=cut
-
-
-our $opt_b = 0;	# Backup original file?
-our $opt_g = 0;	# Verbose debug output?
-our $opt_e = 0;	# Expand tabs to spaces?
-our $opt_h = 0; # Show help?
-our $opt_m = 0;	# Show help manpage style?
-our $opt_p = 0;	# Preview changes to STDOUT?
-our $opt_t = 4;	# Number of spaces per tab?
-our $opt_u = 0;	# Unexpand spaces to tabs?
-getopts('eghmpt:u'); 
-
-$opt_m and show_manpage();
-$opt_h and help();
-
-our %seds = (
-	'\s+$' => "\n",		# Get rid of spaces at the end of a line
-	'^\s+$' => "\n",	# Get rid spaces on lines that are all spaces
-);
-
-
-sub show_manpage { exit pod2usage( verbose => 2 ); };
-sub help { exit pod2usage( verbose => 3, noperldoc => 1 ); };
-
-
-#----------------------------------------------------------------------
-# process_opened_file_handle
-#---------------------------------------------------------------------- 
-sub process_opened_file_handle
-{
-	my $in_fh = shift;
-	my $out_fh = shift;
-
-	# Set the number of spaces per tab for expand/unexpand
-	$tabstop = $opt_t; 
-	
-	while (my $line = <$in_fh>) 
-	{
-		foreach my $key (keys %seds)
-		{
-			my $value = $seds{"$key"};
-			$line =~ s/$key/$value/g;
-		}	
-		if ($opt_e) {
-			print $out_fh expand $line;
-		} elsif ($opt_u) {
-			print $out_fh unexpand $line;
-		} else {
-			print $out_fh $line;
-		}
-	}
-}
-
-#----------------------------------------------------------------------
-# process_file
-#---------------------------------------------------------------------- 
-sub process_file
-{
-	my $in_path = shift;
-	if (-T $in_path) 
-	{ 
-		my $out_fh;
-		my $out_path;
-		if ($opt_p)
-		{
-			# Preview to STDOUT
-			$out_fh = *STDOUT;
-			print "#---------------------------------------------------------------------- \n";
-			print "# BEGIN: '$in_path'\n";
-			print "#---------------------------------------------------------------------- \n";
-		}
-		else
-		{
-			($out_fh, $out_path) = tempfile();			
-			$opt_g and print "temporary for '$in_path' is '$out_path'\n";
-		}
-		open (IN, "<$in_path") or die "error: can't open '$in_path' for reading: $!";
-		process_opened_file_handle (*IN, $out_fh);
-		
-
-		# Close our input file
-		close (IN);
-
-		if ($opt_p)
-		{
-			print "#---------------------------------------------------------------------- \n";
-			print "# END: '$in_path'\n";
-			print "#---------------------------------------------------------------------- \n";
-			print "\n\n";
-		}
-		else
-		{
-			# Close the output file if it wasn't STDOUT
-			close ($out_fh);
-		
-			# Backup file if requested
-			if ($opt_b)
-			{
-				my $backup_command = "cp '$in_path' '$in_path.bak'";
-				$opt_g and print "\% $backup_command\n";
-				system ($backup_command);
-			}
-		
-			# Copy temp file over original
-			my $copy_command = "cp '$out_path' '$in_path'";
-			$opt_g and print "\% $copy_command\n";
-			system ($copy_command);
-		}
-	}
-}
-
-our @valid_extensions = ( "h", "cpp", "c", "m", "mm" );
-
-#----------------------------------------------------------------------
-# find_callback
-#---------------------------------------------------------------------- 
-sub find_callback
-{
-	my $file = $_;
-	my $fullpath = $File::Find::name;
-
-	foreach my $ext (@valid_extensions)
-	{
-		my $ext_regex = "\\.$ext\$";
-		if ($fullpath =~ /$ext_regex/i)
-		{
-			print "processing: '$fullpath'\n";
-			process_file ($fullpath);
-			return;
-		}
-	}
-	print "  ignoring: '$fullpath'\n";
-}
-
-
-#----------------------------------------------------------------------
-# main
-#---------------------------------------------------------------------- 
-sub main
-{
-	if (@ARGV == 0)
-	{
-		# no args, take from STDIN and put to STDOUT
-		process_opened_file_handle (*STDIN, *STDOUT);
-	}
-	else
-	{
-		# Got args, any files we run into parse them, any directories
-		# we run into, search them for files
-		my $path;
-		foreach $path (@ARGV)
-		{
-			if (-f $path)
-			{
-				print "processing: '$path'\n";
-				process_file ($path);
-			}
-			else
-			{
-				print " searching: '$path'\n";
-				find(\&find_callback, $path);					
-			}
-		}
-	}
-}
-
-
-
-# call the main function
-main();
diff --git a/src/llvm-project/lldb/scripts/sort-pbxproj.rb b/src/llvm-project/lldb/scripts/sort-pbxproj.rb
deleted file mode 100755
index 78bb2a9..0000000
--- a/src/llvm-project/lldb/scripts/sort-pbxproj.rb
+++ /dev/null
@@ -1,251 +0,0 @@
-#! /usr/bin/ruby
-#
-
-# A script to impose order on the Xcode project file, to make merging
-# across branches were many additional files are present, easier.
-
-
-
-
-## Sort the BuildFile and FileReference sections of an Xcode project file,
-## putting Apple/github-local files at the front to avoid merge conflicts.
-#
-## Run this in a directory with a project.pbxproj file.  The sorted version
-## is printed on standard output.
-#
-
-
-# Files with these words in the names will be sorted into a separate section;
-# they are only present in some repositories and so having them intermixed 
-# can lead to merge failures.
-segregated_filenames = ["Swift", "repl", "RPC"]
-
-def read_pbxproj(fn)
-    beginning  = Array.new   # All lines before "PBXBuildFile section"
-    files      = Array.new   # PBXBuildFile section lines -- sort these
-    middle     = Array.new   # All lines between PBXBuildFile and PBXFileReference sections
-    refs       = Array.new   # PBXFileReference section lines -- sort these
-    ending     = Array.new   # All lines after PBXFileReference section
-
-    all_lines = File.readlines fn
-
-    state = 1 # "begin"
-    all_lines.each do |l|
-        l.chomp
-        if state == 1 && l =~ /Begin PBXBuildFile section/
-            beginning.push(l)
-            state = 2
-            next
-        end
-        if state == 2 && l =~ /End PBXBuildFile section/
-            middle.push(l)
-            state = 3
-            next
-        end
-        if state == 3 && l =~ /Begin PBXFileReference section/
-            middle.push(l)
-            state = 4
-            next
-        end
-        if state == 4 && l =~ /End PBXFileReference section/
-            ending.push(l)
-            state = 5
-            next
-        end
-
-        if state == 1
-            beginning.push(l)
-        elsif state == 2
-            files.push(l)
-        elsif state == 3
-            middle.push(l)
-        elsif state == 4
-            refs.push(l)
-        else
-            ending.push(l)
-        end
-    end
-
-    return beginning, files, middle, refs, ending
-end
-
-xcodeproj_filename = nil
-[ "../lldb.xcodeproj/project.pbxproj", "lldb.xcodeproj/project.pbxproj", "project.pbxproj" ].each do |ent|
-    if File.exists?(ent)
-        xcodeproj_filename = ent
-        break
-    end
-end
-
-if xcodeproj_filename.nil?
-    STDERR.puts "Could not find xcode project file to sort."
-    exit(1)
-end
-
-beginning, files, middle, refs, ending = read_pbxproj(xcodeproj_filename)
-
-
-### If we're given a "canonical" project.pbxproj file, get the uuid and fileref ids for
-### every source file in this project.pbxproj and the canonical one, and fix any of
-### the identifiers that don't match in the project file we're updating.
-### this comes up when people add the file independently on different branches and it
-### gets different identifiers.
-
-if ARGV.size() > 0
-    canonical_pbxproj = nil
-    if ARGV.size == 2 && ARGV[0] == "--canonical"
-        canonical_pbxproj = ARGV[1]
-    elsif ARGV.size == 1 && ARGV[0] =~ /--canonical=(.+)/
-        canonical_pbxproj = $1
-    end
-
-    if File.exists?(canonical_pbxproj)
-        ignore1, canon_files, ignore2, ignore3, ignore4 = read_pbxproj(canonical_pbxproj)
-        canon_files_by_filename = Hash.new { |k, v| k[v] = Array.new }
-
-        canon_files.each do |l|
-            # 2669421A1A6DC2AC0063BE93 /* MICmdCmdTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941941A6DC2AC0063BE93 /* MICmdCmdTarget.cpp */; };
-
-            if l =~ /^\s+([A-F0-9]{24})\s+\/\*\s+(.*?)\sin.*?\*\/.*?fileRef = ([A-F0-9]{24})\s.*$/
-                uuid = $1
-                filename = $2
-                fileref = $3
-                canon_files_by_filename[filename].push({ :uuid => uuid, :fileref => fileref })
-            end
-        end
-
-        this_project_files = Hash.new { |k, v| k[v] = Array.new }
-
-        files.each do |l|
-            # 2669421A1A6DC2AC0063BE93 /* MICmdCmdTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941941A6DC2AC0063BE93 /* MICmdCmdTarget.cpp */; };
-
-            if l =~ /^\s+([A-F0-9]{24})\s+\/\*\s+(.*?)\sin.*?\*\/.*?fileRef = ([A-F0-9]{24})\s.*$/
-                uuid = $1
-                filename = $2
-                fileref = $3
-                this_project_files[filename].push({ :uuid => uuid, :fileref => fileref })
-            end
-        end
-
-        this_project_files.keys.each do |fn|
-            next if !canon_files_by_filename.has_key?(fn)
-            next if this_project_files[fn].size() > 1 || canon_files_by_filename[fn].size() > 1
-            this_ent = this_project_files[fn][0]
-            canon_ent = canon_files_by_filename[fn][0]
-            if this_ent[:uuid] != canon_ent[:uuid]
-                STDERR.puts "#{fn} has uuid #{this_ent[:uuid]} in this project file, #{canon_ent[:uuid]} in the canonical"
-                [ beginning, files, middle, refs, ending ].each do |arr|
-                    arr.each { |l| l.gsub!(this_ent[:uuid], canon_ent[:uuid]) }
-                end
-            end
-            if this_ent[:fileref] != canon_ent[:fileref]
-                STDERR.puts "#{fn} has fileref #{this_ent[:fileref]} in this project file, #{canon_ent[:fileref]} in the canonical"
-                [ beginning, files, middle, refs, ending ].each do |arr|
-                    arr.each { |l| l.gsub!(this_ent[:fileref], canon_ent[:fileref]) }
-                end
-            end
-
-        end
-    end
-end
-
-
-
-######### Sort FILES by the filename, putting swift etc in front
-
-# key is filename
-# value is array of text lines for that filename in the FILES text
-# (libraries like libz.dylib seem to occur multiple times, probably
-# once each for different targets).
-
-files_by_filename = Hash.new { |k, v| k[v] = Array.new }
-
-files.each do |l|
-    # 2669421A1A6DC2AC0063BE93 /* MICmdCmdTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266941941A6DC2AC0063BE93 /* MICmdCmdTarget.cpp */; };
-
-    if l =~ /^\s+([A-F0-9]{24})\s+\/\*\s+(.*?)\sin.*?\*\/.*?fileRef = ([A-F0-9]{24})\s.*$/
-        uuid = $1
-        filename = $2
-        fileref = $3
-        files_by_filename[filename].push(l)
-    end
-
-end
-
-# clear the FILES array
-
-files = Array.new
-
-# add the lines in sorted order.  First swift/etc, then everything else.
-
-segregated_filenames.each do |keyword|
-    filenames = files_by_filename.keys
-    filenames.select {|l| l.include?(keyword) }.sort.each do |fn|
-        # re-add all the lines for the filename FN to our FILES array that we'll
-        # be outputting.
-        files_by_filename[fn].sort.each do |l|
-            files.push(l)
-        end
-        files_by_filename.delete(fn)
-    end
-end
-
-# All segregated filenames have been added to the FILES output array.
-# Now add all the other lines, sorted by filename.
-
-files_by_filename.keys.sort.each do |fn|
-    files_by_filename[fn].sort.each do |l|
-        files.push(l)
-    end
-end
-
-######### Sort REFS by the filename, putting swift etc in front
-
-refs_by_filename = Hash.new { |k, v| k[v] = Array.new }
-refs.each do |l|
-    # 2611FF12142D83060017FEA3 /* SBValue.i */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c.preprocessed; path = SBValue.i; sourceTree = "<group>"; };
-
-    if l =~ /^\s+([A-F0-9]{24})\s+\/\*\s+(.*?)\s\*\/.*$/
-        uuid = $1
-        filename = $2
-        refs_by_filename[filename].push(l)
-    end
-end
-
-# clear the refs array
-
-refs = Array.new
-
-# add the lines in sorted order.  First swift/etc, then everything else.
-
-
-segregated_filenames.each do |keyword|
-    filenames = refs_by_filename.keys
-    filenames.select {|l| l.include?(keyword) }.sort.each do |fn|
-        # re-add all the lines for the filename FN to our refs array that we'll
-        # be outputting.
-        refs_by_filename[fn].sort.each do |l|
-            refs.push(l)
-        end
-        refs_by_filename.delete(fn)
-    end
-end
-
-# All segregated filenames have been added to the refs output array.
-# Now add all the other lines, sorted by filename.
-
-refs_by_filename.keys.sort.each do |fn|
-    refs_by_filename[fn].sort.each do |l|
-        refs.push(l)
-    end
-end
-
-
-
-####### output the sorted pbxproj
-
-File.open(xcodeproj_filename, 'w') do |outfile|
-    [ beginning, files, middle, refs, ending ].each do |arr|
-      arr.each {|l| outfile.puts l}
-    end
-end
diff --git a/src/llvm-project/lldb/scripts/swig_bot.py b/src/llvm-project/lldb/scripts/swig_bot.py
deleted file mode 100644
index 888fc10..0000000
--- a/src/llvm-project/lldb/scripts/swig_bot.py
+++ /dev/null
@@ -1,85 +0,0 @@
-#!/usr/bin/env python
-
-"""
-SWIG generation top-level script.  Supports both local and remote generation
-of SWIG bindings for multiple languages.
-"""
-
-# Python modules
-import argparse
-import logging
-import sys
-import traceback
-
-# LLDB modules
-import use_lldb_suite
-
-# swig_bot modules
-from swig_bot_lib import client
-from swig_bot_lib import server
-
-
-def process_args(args):
-    parser = argparse.ArgumentParser(
-        description='Run swig-bot client or server.')
-
-    # Create and populate subparser arguments for when swig_bot is
-    # run in client or server mode
-    subparsers = parser.add_subparsers(
-        help="Pass --help to a sub-command to print detailed usage")
-    client_parser = subparsers.add_parser("client",
-                                          help="Run SWIG generation client")
-    client.add_subparser_args(client_parser)
-    client_parser.set_defaults(func=run_client)
-
-    server_parser = subparsers.add_parser("server",
-                                          help="Run SWIG generation server")
-    server.add_subparser_args(server_parser)
-    server_parser.set_defaults(func=run_server)
-
-    # Arguments to control logging verbosity.
-    parser.add_argument(
-        "--verbose", "-v",
-        action="store_true",
-        default=False,
-        help="Increase logging verbosity level.")
-
-    options = parser.parse_args(args)
-    # Set logging level.
-    if options.verbose:
-        log_level = logging.DEBUG
-    else:
-        log_level = logging.NOTSET
-    logging.basicConfig(level=log_level)
-    logging.info("logging is using level: %d", log_level)
-
-    return options
-
-
-def run_client(options):
-    logging.info("Running swig_bot in client mode")
-    client.finalize_subparser_options(options)
-    client.run(options)
-
-
-def run_server(options):
-    logging.info("Running swig_bot in server mode")
-    server.finalize_subparser_options(options)
-    server.run(options)
-
-if __name__ == "__main__":
-    options = process_args(sys.argv[1:])
-    try:
-        if options.func is None:
-            logging.error(
-                "Unknown mode specified.  Expected client or server.")
-            sys.exit(-1)
-        else:
-            options.func(options)
-    except KeyboardInterrupt as e:
-        logging.info("Ctrl+C received.  Shutting down...")
-        sys.exit(-1)
-    except Exception as e:
-        error = traceback.format_exc()
-        logging.error("An error occurred running swig-bot.")
-        logging.error(error)
diff --git a/src/llvm-project/lldb/scripts/swig_bot_lib/client.py b/src/llvm-project/lldb/scripts/swig_bot_lib/client.py
deleted file mode 100644
index d9f0fb4..0000000
--- a/src/llvm-project/lldb/scripts/swig_bot_lib/client.py
+++ /dev/null
@@ -1,216 +0,0 @@
-#!/usr/bin/env python
-
-"""
-SWIG generation client.  Supports both local and remote generation of SWIG
-bindings for multiple languages.
-"""
-
-# Future imports
-from __future__ import absolute_import
-from __future__ import print_function
-
-# Python modules
-import argparse
-import io
-import logging
-import os
-import socket
-import struct
-import sys
-
-# LLDB modules
-import use_lldb_suite
-from lldbsuite.support import fs
-from lldbsuite.support import sockutil
-
-# package imports
-from . import local
-from . import remote
-
-default_ip = "127.0.0.1"
-default_port = 8537
-
-
-def add_subparser_args(parser):
-    """Returns options processed from the provided command line.
-
-    @param args the command line to process.
-    """
-
-    # A custom action used by the --local command line option.  It can be
-    # used with either 0 or 1 argument.  If used with 0 arguments, it
-    # searches for a copy of swig located on the physical machine.  If
-    # used with 1 argument, the argument is the path to a swig executable.
-    class FindLocalSwigAction(argparse.Action):
-
-        def __init__(self, option_strings, dest, **kwargs):
-            super(FindLocalSwigAction, self).__init__(
-                option_strings, dest, nargs='?', **kwargs)
-
-        def __call__(self, parser, namespace, values, option_string=None):
-            swig_exe = None
-            if values is None:
-                swig_exe = fs.find_executable('swig')
-            else:
-                swig_exe = values
-            setattr(namespace, self.dest, os.path.normpath(swig_exe))
-
-    # A custom action used by the --remote command line option.  It can be
-    # used with either 0 or 1 arguments.  If used with 0 arguments it chooses
-    # a default connection string.  If used with one argument it is a string
-    # of the form `ip_address[:port]`.  If the port is unspecified, the
-    # default port is used.
-    class RemoteIpAction(argparse.Action):
-
-        def __init__(self, option_strings, dest, **kwargs):
-            super(RemoteIpAction, self).__init__(
-                option_strings, dest, nargs='?', **kwargs)
-
-        def __call__(self, parser, namespace, values, option_string=None):
-            ip_port = None
-            if values is None:
-                ip_port = (default_ip, default_port)
-            else:
-                result = values.split(':')
-                if len(result) == 1:
-                    ip_port = (result[0], default_port)
-                elif len(result) == 2:
-                    ip_port = (result[0], int(result[1]))
-                else:
-                    raise ValueError("Invalid connection string")
-            setattr(namespace, self.dest, ip_port)
-
-    parser.add_argument(
-        "--local",
-        action=FindLocalSwigAction,
-        dest="swig_executable",
-        help=(
-            "Run the copy of swig at the specified location, or search PATH"
-            "if the location is omitted"))
-
-    parser.add_argument(
-        "--remote",
-        action=RemoteIpAction,
-        help=(
-            "Use the given connection string to connect to a remote "
-            "generation service"))
-
-    parser.add_argument(
-        "--src-root",
-        required=True,
-        help="The root folder of the LLDB source tree.")
-
-    parser.add_argument(
-        "--target-dir",
-        default=os.getcwd(),
-        help=(
-            "Specifies the build dir where the language binding "
-            "should be placed"))
-
-    parser.add_argument(
-        "--language",
-        dest="languages",
-        action="append",
-        help="Specifies the language to generate bindings for")
-
-
-def finalize_subparser_options(options):
-    if options.languages is None:
-        options.languages = ['python']
-
-    if options.remote is None and options.swig_executable is None:
-        logging.error("Must specify either --local or --remote")
-        sys.exit(-3)
-
-    return options
-
-
-def establish_remote_connection(ip_port):
-    logging.debug("Creating socket...")
-    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-    logging.info("Connecting to server {} on port {}"
-                 .format(ip_port[0], ip_port[1]))
-    s.connect(ip_port)
-    logging.info("Connection established...")
-    return s
-
-
-def transmit_request(connection, packed_input):
-    logging.info("Sending {} bytes of compressed data."
-                 .format(len(packed_input)))
-    connection.sendall(struct.pack("!I", len(packed_input)))
-    connection.sendall(packed_input)
-    logging.info("Awaiting response.")
-    response_len = struct.unpack("!I", sockutil.recvall(connection, 4))[0]
-    logging.debug("Expecting {} byte response".format(response_len))
-    response = sockutil.recvall(connection, response_len)
-    return response
-
-
-def handle_response(options, connection, response):
-    logging.debug("Received {} byte response.".format(len(response)))
-    logging.debug("Creating output directory {}"
-                  .format(options.target_dir))
-    os.makedirs(options.target_dir, exist_ok=True)
-
-    logging.info("Unpacking response archive into {}"
-                 .format(options.target_dir))
-    local.unpack_archive(options.target_dir, response)
-    response_file_path = os.path.normpath(
-        os.path.join(options.target_dir, "swig_output.json"))
-    if not os.path.isfile(response_file_path):
-        logging.error("Response file '{}' does not exist."
-                      .format(response_file_path))
-        return
-    try:
-        response = remote.deserialize_response_status(
-            io.open(response_file_path))
-        if response[0] != 0:
-            logging.error("An error occurred during generation.  Status={}"
-                          .format(response[0]))
-            logging.error(response[1])
-        else:
-            logging.info("SWIG generation successful.")
-            if len(response[1]) > 0:
-                logging.info(response[1])
-    finally:
-        os.unlink(response_file_path)
-
-
-def run(options):
-    if options.remote is None:
-        logging.info("swig bot client using local swig installation at '{}'"
-                     .format(options.swig_executable))
-        if not os.path.isfile(options.swig_executable):
-            logging.error("Swig executable '{}' does not exist."
-                          .format(options.swig_executable))
-        config = local.LocalConfig()
-        config.languages = options.languages
-        config.src_root = options.src_root
-        config.target_dir = options.target_dir
-        config.swig_executable = options.swig_executable
-        local.generate(config)
-    else:
-        logging.info("swig bot client using remote generation with server '{}'"
-                     .format(options.remote))
-        connection = None
-        try:
-            config = remote.generate_config(options.languages)
-            logging.debug("Generated config json {}".format(config))
-            inputs = [("include/lldb", ".h"),
-                      ("include/lldb/API", ".h"),
-                      ("scripts", ".swig"),
-                      ("scripts/Python", ".swig"),
-                      ("scripts/interface", ".i")]
-            zip_data = io.BytesIO()
-            packed_input = local.pack_archive(
-                zip_data, options.src_root, inputs)
-            logging.info("(null) -> config.json")
-            packed_input.writestr("config.json", config)
-            packed_input.close()
-            connection = establish_remote_connection(options.remote)
-            response = transmit_request(connection, zip_data.getvalue())
-            handle_response(options, connection, response)
-        finally:
-            if connection is not None:
-                connection.close()
diff --git a/src/llvm-project/lldb/scripts/swig_bot_lib/local.py b/src/llvm-project/lldb/scripts/swig_bot_lib/local.py
deleted file mode 100644
index ea073af..0000000
--- a/src/llvm-project/lldb/scripts/swig_bot_lib/local.py
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Shared functionality used by `client` and `server` when generating or preparing
-to generate SWIG on the local machine.
-"""
-
-# Future imports
-from __future__ import absolute_import
-from __future__ import print_function
-
-# Python modules
-import argparse
-import imp
-import io
-import logging
-import os
-import subprocess
-import sys
-import tempfile
-import zipfile
-
-# LLDB modules
-import use_lldb_suite
-
-# Package imports
-from lldbsuite.support import fs
-
-
-class LocalConfig(object):
-    src_root = None
-    target_dir = None
-    languages = None
-    swig_executable = None
-
-
-def pack_archive(bytes_io, src_root, filters):
-    logging.info("Creating input file package...")
-    zip_file = None
-    try:
-        # It's possible that a custom-built interpreter will not have the
-        # standard zlib module.  If so, we can only store, not compress.  By
-        # try to compress since we usually have a standard Python distribution.
-        zip_file = zipfile.ZipFile(bytes_io, mode='w',
-                                   compression=zipfile.ZIP_DEFLATED)
-    except RuntimeError:
-        zip_file = zipfile.ZipFile(bytes_io, mode='w',
-                                   compression=zipfile.ZIP_STORED)
-    archive_entries = []
-    if filters is not None:
-        def filter_func(t):
-            subfolder = t[0]
-            ext = t[1]
-            full_path = os.path.normpath(os.path.join(src_root, subfolder))
-            candidates = [os.path.normpath(os.path.join(full_path, f))
-                          for f in os.listdir(full_path)]
-            actual = [f for f in candidates if os.path.isfile(f) and os.path.splitext(f)[1] == ext]
-            return (subfolder, [os.path.basename(f) for f in actual])
-        archive_entries = map(filter_func, filters)
-    else:
-        for (root, dirs, files) in os.walk(src_root):
-            logging.debug("Adding files {} from directory {} to output package"
-                          .format(files, root))
-            if len(files) > 0:
-                rel_root = os.path.relpath(root, src_root)
-                archive_entries.append((rel_root, files))
-
-    archive_entries = list(archive_entries)
-    for entry in archive_entries:
-        subfolder = entry[0]
-        files = list(entry[1])
-        for file in files:
-            rel_path = os.path.normpath(os.path.join(subfolder, file))
-            full_path = os.path.join(src_root, rel_path)
-            logging.info("{} -> {}".format(full_path, rel_path))
-            zip_file.write(full_path, rel_path)
-
-    return zip_file
-
-
-def unpack_archive(folder, archive_bytes):
-    zip_data = io.BytesIO(archive_bytes)
-    logging.debug("Opening zip archive...")
-    zip_file = zipfile.ZipFile(zip_data, mode='r')
-    zip_file.extractall(folder)
-    zip_file.close()
-
-
-def generate(options):
-    include_folder = os.path.join(options.src_root, "include")
-    in_file = os.path.join(options.src_root, "scripts", "lldb.swig")
-    include_folder = os.path.normcase(include_folder)
-
-    for lang in options.languages:
-        lang = lang.lower()
-        out_dir = os.path.join(options.target_dir, lang.title())
-        if not os.path.exists(out_dir):
-            os.makedirs(out_dir)
-        out_file = os.path.join(out_dir, "LLDBWrap{}.cpp".format(lang.title()))
-        swig_command = [
-            options.swig_executable,
-            "-c++",
-        ]
-        swig_command.append("-" + lang)
-        if lang == "python":
-            swig_command.append("-threads")
-
-        swig_command.extend([
-            "-I" + include_folder,
-            "-D__STDC_LIMIT_MACROS",
-            "-D__STDC_CONSTANT_MACROS",
-            "-outdir", out_dir,
-            "-o", out_file,
-            in_file
-        ])
-
-        logging.info("generating swig {} bindings into {}"
-                     .format(lang, out_dir))
-        logging.debug("swig command line: {}".format(swig_command))
-        try:
-            # Execute swig
-            swig_output = subprocess.check_output(
-                swig_command, stderr=subprocess.STDOUT, universal_newlines=True)
-
-            logging.info("swig generation succeeded")
-            if swig_output is not None and len(swig_output) > 0:
-                logging.info("swig output: %s", swig_output)
-            return (0, swig_output)
-        except subprocess.CalledProcessError as e:
-            logging.error("An error occurred executing swig.  returncode={}"
-                          .format(e.returncode))
-            logging.error(e.output)
-            return (e.returncode, e.output)
diff --git a/src/llvm-project/lldb/scripts/swig_bot_lib/remote.py b/src/llvm-project/lldb/scripts/swig_bot_lib/remote.py
deleted file mode 100644
index 712a5e2..0000000
--- a/src/llvm-project/lldb/scripts/swig_bot_lib/remote.py
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Shared functionality used by `client` and `server` when dealing with
-remote transmission
-"""
-
-# Future imports
-from __future__ import absolute_import
-from __future__ import print_function
-
-# Python modules
-import json
-import logging
-import os
-import socket
-import struct
-import sys
-
-# LLDB modules
-import use_lldb_suite
-
-
-def generate_config(languages):
-    config = {"languages": languages}
-    return json.dumps(config)
-
-
-def parse_config(json_reader):
-    json_data = json_reader.read()
-    options_dict = json.loads(json_data)
-    return options_dict
-
-
-def serialize_response_status(status):
-    status = {"retcode": status[0], "output": status[1]}
-    return json.dumps(status)
-
-
-def deserialize_response_status(json_reader):
-    json_data = json_reader.read()
-    response_dict = json.loads(json_data)
-    return (response_dict["retcode"], response_dict["output"])
diff --git a/src/llvm-project/lldb/scripts/swig_bot_lib/server.py b/src/llvm-project/lldb/scripts/swig_bot_lib/server.py
deleted file mode 100644
index 57fb8d9..0000000
--- a/src/llvm-project/lldb/scripts/swig_bot_lib/server.py
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/usr/bin/env python
-
-"""
-SWIG generation server.  Listens for connections from swig generation clients
-and runs swig in the requested fashion, sending back the results.
-"""
-
-# Future imports
-from __future__ import absolute_import
-from __future__ import print_function
-
-# Python modules
-import argparse
-import io
-import logging
-import os
-import select
-import shutil
-import socket
-import struct
-import sys
-import tempfile
-import traceback
-
-# LLDB modules
-import use_lldb_suite
-from lldbsuite.support import fs
-from lldbsuite.support import sockutil
-
-# package imports
-from . import local
-from . import remote
-
-default_port = 8537
-
-
-def add_subparser_args(parser):
-    parser.add_argument(
-        "--port",
-        action="store",
-        default=default_port,
-        help=("The local port to bind to"))
-
-    parser.add_argument(
-        "--swig-executable",
-        action="store",
-        default=fs.find_executable("swig"),
-        dest="swig_executable")
-
-
-def finalize_subparser_options(options):
-    pass
-
-
-def initialize_listening_socket(options):
-    logging.debug("Creating socket...")
-    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-
-    logging.info("Binding to ip address '', port {}".format(options.port))
-    s.bind(('', options.port))
-
-    logging.debug("Putting socket in listen mode...")
-    s.listen()
-    return s
-
-
-def accept_once(sock, options):
-    logging.debug("Waiting for connection...")
-    while True:
-        rlist, wlist, xlist = select.select([sock], [], [], 0.5)
-        if not rlist:
-            continue
-
-        client, addr = sock.accept()
-        logging.info("Received connection from {}".format(addr))
-        data_size = struct.unpack("!I", sockutil.recvall(client, 4))[0]
-        logging.debug("Expecting {} bytes of data from client"
-                      .format(data_size))
-        data = sockutil.recvall(client, data_size)
-        logging.info("Received {} bytes of data from client"
-                     .format(len(data)))
-
-        pack_location = None
-        try:
-            tempfolder = os.path.join(tempfile.gettempdir(), "swig-bot")
-            os.makedirs(tempfolder, exist_ok=True)
-
-            pack_location = tempfile.mkdtemp(dir=tempfolder)
-            logging.debug("Extracting archive to {}".format(pack_location))
-
-            local.unpack_archive(pack_location, data)
-            logging.debug("Successfully unpacked archive...")
-
-            config_file = os.path.normpath(os.path.join(pack_location,
-                                                        "config.json"))
-            parsed_config = remote.parse_config(io.open(config_file))
-            config = local.LocalConfig()
-            config.languages = parsed_config["languages"]
-            config.swig_executable = options.swig_executable
-            config.src_root = pack_location
-            config.target_dir = os.path.normpath(
-                os.path.join(config.src_root, "output"))
-            logging.info(
-                "Running swig.  languages={}, swig={}, src_root={}, target={}"
-                .format(config.languages, config.swig_executable,
-                        config.src_root, config.target_dir))
-
-            status = local.generate(config)
-            logging.debug("Finished running swig.  Packaging up files {}"
-                          .format(os.listdir(config.target_dir)))
-            zip_data = io.BytesIO()
-            zip_file = local.pack_archive(zip_data, config.target_dir, None)
-            response_status = remote.serialize_response_status(status)
-            logging.debug("Sending response status {}".format(response_status))
-            logging.info("(swig output) -> swig_output.json")
-            zip_file.writestr("swig_output.json", response_status)
-
-            zip_file.close()
-            response_data = zip_data.getvalue()
-            logging.info("Sending {} byte response".format(len(response_data)))
-            client.sendall(struct.pack("!I", len(response_data)))
-            client.sendall(response_data)
-        finally:
-            if pack_location is not None:
-                logging.debug("Removing temporary folder {}"
-                              .format(pack_location))
-                shutil.rmtree(pack_location)
-
-
-def accept_loop(sock, options):
-    while True:
-        try:
-            accept_once(sock, options)
-        except Exception as e:
-            error = traceback.format_exc()
-            logging.error("An error occurred while processing the connection.")
-            logging.error(error)
-
-
-def run(options):
-    print(options)
-    sock = initialize_listening_socket(options)
-    accept_loop(sock, options)
-    return options
diff --git a/src/llvm-project/lldb/scripts/utilsArgsParse.py b/src/llvm-project/lldb/scripts/utilsArgsParse.py
deleted file mode 100644
index fadf4b4..0000000
--- a/src/llvm-project/lldb/scripts/utilsArgsParse.py
+++ /dev/null
@@ -1,141 +0,0 @@
-""" Utility module handle program args and give help
-
-    --------------------------------------------------------------------------
-    File:     utilsArgsParse.py
-
-    Overview:  Python module to parse and validate program parameters
-               against those required by the program whether mandatory
-               or optional.
-               Also give help information on arguments required by the
-               program.
-
-    Gotchas:   None.
-
-    Copyright: None.
-    --------------------------------------------------------------------------
-
-"""
-
-# Python modules:
-import getopt  # Parse command line arguments
-
-# Third party modules:
-
-# In-house modules:
-
-# Instantiations:
-
-# User facing text:
-strMsgErrorInvalidParameters = "Invalid parameters entered, -h for help. \nYou entered:\n"
-strMsgErrorInvalidNoParams = "No parameters entered, -h for help\n"
-strMsgErrorNumberParameters = "Number of parameters entered incorrect, %d parameters required. You entered:\n"
-strMsgArgFileNotImplemented = "Sorry the --argFile is not implemented"
-
-#++---------------------------------------------------------------------------
-# Details: Validate the arguments passed in against the mandatory and
-#          optional arguments specified. The argument format for the parameters
-#          is required to work with the module getopt function getopt().
-#          Parameter vDictArgReq specifies which parameters are mandatory and
-#          which are optional. The format is for example:
-#            dictArgReq = {"-h": "o", # o = optional, m = mandatory
-#                          "-m": "m",
-#                          "--targetDir": "m",
-#                          "--cfgBldDir": "o" }
-# Args:    vArgv - (R) List of arguments and values.
-#          vstrListArgs - (R) List of small arguments.
-#          vListLongArgs - (R) List of long arguments.
-#          vDictArgReq - (R) Map of arguments required.
-#          vstrHelpInfo - (R) Formatted help text.
-# Returns: Int - 0 success.
-#                1 success display information, do nothing else.
-#                -1 error invalid parameters.
-#                -2 error incorrect number of mandatory parameters.
-#          Dict - Map of arguments names to argument values
-#          Str - Error message.
-# Throws:  None.
-#--
-
-
-def parse(vArgv, vstrListArgs, vListLongArgs, vDictArgReq, vstrHelpInfo):
-    dictArgs = {}
-    dictDummy = {}
-    strDummy = ""
-
-    # Validate parameters above and error on not recognised
-    try:
-        dictOptsNeeded, dictArgsLeftOver = getopt.getopt(vArgv,
-                                                         vstrListArgs,
-                                                         vListLongArgs)
-    except getopt.GetoptError:
-        strMsg = strMsgErrorInvalidParameters
-        strMsg += str(vArgv)
-        return (-1, dictDummy, strMsg)
-
-    if len(dictOptsNeeded) == 0:
-        strMsg = strMsgErrorInvalidNoParams
-        return (-1, dictDummy, strMsg)
-
-    # Look for help -h before anything else
-    for opt, arg in dictOptsNeeded:
-        if opt == '-h':
-            return (1, dictDummy, vstrHelpInfo)
-
-    # Look for the --argFile if found ignore other command line arguments
-    for opt, arg in dictOptsNeeded:
-        if opt == '--argsFile':
-            return (1, dictDummy, strMsgArgFileNotImplemented)
-
-    # Count the number of mandatory args required (if any one found)
-    countMandatory = 0
-    for opt, man in list(vDictArgReq.items()):
-        if man == "m":
-            countMandatory = countMandatory + 1
-
-    # Extract short args
-    listArgs = []
-    for arg in vstrListArgs:
-        if (arg == '-h') or (arg == ':'):
-            continue
-        listArgs.append(arg)
-
-    # Append to arg dictionary the option and its value
-    bFoundNoInputValue = False
-    countMandatoryOpts = 0
-    for opt, val in dictOptsNeeded:
-        match = 0
-        for arg in listArgs:
-            argg = "-" + arg
-            if opt == argg:
-                if "m" == vDictArgReq[opt]:
-                    countMandatoryOpts = countMandatoryOpts + 1
-                dictArgs[opt] = val
-                match = 1
-                break
-        if match == 0:
-            for arg in vListLongArgs:
-                argg = "--" + arg.rstrip('=')
-                if opt == argg:
-                    if "m" == vDictArgReq[opt]:
-                        countMandatoryOpts = countMandatoryOpts + 1
-                    dictArgs[opt] = val
-                    if arg[-1:] == '=' and val.__len__() == 0:
-                        bFoundNoInputValue = True
-                    break
-
-    # Do any of the long arguments not have a value attached
-    if bFoundNoInputValue:
-        strMsg = strMsgErrorInvalidParameters
-        strMsg += str(vArgv)
-        return (-1, dictDummy, strMsg)
-
-    # Debug only
-    # print countMandatoryOpts
-    # print countMandatory
-
-    # Do we have the exact number of mandatory arguments
-    if (countMandatoryOpts > 0) and (countMandatory != countMandatoryOpts):
-        strMsg = strMsgErrorNumberParameters % countMandatory
-        strMsg += str(vArgv)
-        return (-2, dictDummy, strMsg)
-
-    return (0, dictArgs, strDummy)
diff --git a/src/llvm-project/lldb/scripts/utilsDebug.py b/src/llvm-project/lldb/scripts/utilsDebug.py
deleted file mode 100644
index 8003891..0000000
--- a/src/llvm-project/lldb/scripts/utilsDebug.py
+++ /dev/null
@@ -1,125 +0,0 @@
-""" Utility module to help debug Python scripts
-
-    --------------------------------------------------------------------------
-    File: utilsDebug.py
-
-    Overview:  Python module to supply functions to help debug Python
-               scripts.
-    Gotchas:   None.
-    Copyright: None.
-    --------------------------------------------------------------------------
-"""
-
-# Python modules:
-import sys
-
-# Third party modules:
-
-# In-house modules:
-
-# Instantiations:
-
-#-----------------------------------------------------------------------------
-# Details: Class to implement simple stack function trace. Instantiation the
-#          class as the first function you want to trace. Example:
-#          obj = utilsDebug.CDebugFnVerbose("validate_arguments()")
-# Gotchas: This class will not work in properly in a multi-threaded
-#          environment.
-# Authors: Illya Rudkin 28/11/2013.
-# Changes: None.
-#--
-
-
-class CDebugFnVerbose(object):
-    # Public static properties:
-    bVerboseOn = False  # True = turn on function tracing, False = turn off.
-
-    # Public:
-    #++------------------------------------------------------------------------
-    # Details: CDebugFnVerbose constructor.
-    # Type:    Method.
-    # Args:    vstrFnName - (R) Text description i.e. a function name.
-    # Return:  None.
-    # Throws:  None.
-    #--
-    # CDebugFnVerbose(vstrFnName)
-
-    #++------------------------------------------------------------------------
-    # Details: Print out information on the object specified.
-    # Type:    Method.
-    # Args:    vstrText - (R) Some helper text description.
-    #          vObject - (R) Some Python type object.
-    # Return:  None.
-    # Throws:  None.
-    #--
-    def dump_object(self, vstrText, vObject):
-        if not CDebugFnVerbose.bVerboseOn:
-            return
-        sys.stdout.write(
-            "%d%s> Dp: %s" %
-            (CDebugFnVerbose.__nLevel,
-             self.__get_dots(),
-             vstrText))
-        print(vObject)
-
-    #++------------------------------------------------------------------------
-    # Details: Print out some progress text given by the client.
-    # Type:    Method.
-    # Args:    vstrText - (R) Some helper text description.
-    # Return:  None.
-    # Throws:  None.
-    #--
-    def dump_text(self, vstrText):
-        if not CDebugFnVerbose.bVerboseOn:
-            return
-        print(("%d%s> Dp: %s" % (CDebugFnVerbose.__nLevel, self.__get_dots(),
-                                 vstrText)))
-
-    # Private methods:
-    def __init__(self, vstrFnName):
-        self.__indent_out(vstrFnName)
-
-    #++------------------------------------------------------------------------
-    # Details: Build an indentation string of dots based on the __nLevel.
-    # Type:    Method.
-    # Args:    None.
-    # Return:  Str - variable length string.
-    # Throws:  None.
-    #--
-    def __get_dots(self):
-        return "".join("." for i in range(0, CDebugFnVerbose.__nLevel))
-
-    #++------------------------------------------------------------------------
-    # Details: Build and print out debug verbosity text indicating the function
-    #          just exited from.
-    # Type:    Method.
-    # Args:    None.
-    # Return:  None.
-    # Throws:  None.
-    #--
-    def __indent_back(self):
-        if CDebugFnVerbose.bVerboseOn:
-            print(("%d%s< fn: %s" % (CDebugFnVerbose.__nLevel,
-                                     self.__get_dots(), self.__strFnName)))
-        CDebugFnVerbose.__nLevel -= 1
-
-    #++------------------------------------------------------------------------
-    # Details: Build and print out debug verbosity text indicating the function
-    #          just entered.
-    # Type:    Method.
-    # Args:    vstrFnName - (R) Name of the function entered.
-    # Return:  None.
-    # Throws:  None.
-    #--
-    def __indent_out(self, vstrFnName):
-        CDebugFnVerbose.__nLevel += 1
-        self.__strFnName = vstrFnName
-        if CDebugFnVerbose.bVerboseOn:
-            print(("%d%s> fn: %s" % (CDebugFnVerbose.__nLevel,
-                                     self.__get_dots(), self.__strFnName)))
-
-    # Private statics attributes:
-    __nLevel = 0  # Indentation level counter
-
-    # Private attributes:
-    __strFnName = ""
diff --git a/src/llvm-project/lldb/scripts/utilsOsType.py b/src/llvm-project/lldb/scripts/utilsOsType.py
deleted file mode 100644
index dfc5cec..0000000
--- a/src/llvm-project/lldb/scripts/utilsOsType.py
+++ /dev/null
@@ -1,103 +0,0 @@
-""" Utility module to determine the OS Python running on
-
-    --------------------------------------------------------------------------
-    File:         utilsOsType.py
-
-    Overview:       Python module to supply functions and an enumeration to
-                    help determine the platform type, bit size and OS currently
-                    being used.
-    --------------------------------------------------------------------------
-
-"""
-
-# Python modules:
-import sys      # Provide system information
-
-# Third party modules:
-
-# In-house modules:
-
-# Instantiations:
-
-# Enumerations:
-#-----------------------------------------------------------------------------
-# Details:  Class to implement a 'C' style enumeration type.
-# Gotchas:  None.
-# Authors:  Illya Rudkin 28/11/2013.
-# Changes:  None.
-#--
-if sys.version_info.major >= 3:
-    from enum import Enum
-
-    class EnumOsType(Enum):
-        Unknown = 0
-        Darwin = 1
-        FreeBSD = 2
-        Linux = 3
-        NetBSD = 4
-        OpenBSD = 5
-        Windows = 6
-        kFreeBSD = 7
-else:
-    class EnumOsType(object):
-        values = ["Unknown",
-                  "Darwin",
-                  "FreeBSD",
-                  "Linux",
-                  "NetBSD",
-                  "OpenBSD",
-                  "Windows",
-                  "kFreeBSD"]
-
-        class __metaclass__(type):
-            #++----------------------------------------------------------------
-            # Details:  Fn acts as an enumeration.
-            # Args:     vName - (R) Enumeration to match.
-            # Returns:  Int - Matching enumeration/index.
-            # Throws:   None.
-            #--
-
-            def __getattr__(cls, vName):
-                return cls.values.index(vName)
-
-#++---------------------------------------------------------------------------
-# Details:  Reverse fast lookup of the values list.
-# Args:     vI - (R) Index / enumeration.
-# Returns:  Str - text description matching enumeration.
-# Throws:   None.
-#--
-            def name_of(cls, vI):
-                return EnumOsType.values[vI]
-
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-#-----------------------------------------------------------------------------
-
-#++---------------------------------------------------------------------------
-# Details:  Determine what operating system is currently running on.
-# Args:     None.
-# Returns:  EnumOsType - The OS type being used ATM.
-# Throws:   None.
-#--
-
-
-def determine_os_type():
-    eOSType = EnumOsType.Unknown
-
-    strOS = sys.platform
-    if strOS == "darwin":
-        eOSType = EnumOsType.Darwin
-    elif strOS.startswith("freebsd"):
-        eOSType = EnumOsType.FreeBSD
-    elif strOS.startswith("linux"):
-        eOSType = EnumOsType.Linux
-    elif strOS.startswith("netbsd"):
-        eOSType = EnumOsType.NetBSD
-    elif strOS.startswith("openbsd"):
-        eOSType = EnumOsType.OpenBSD
-    elif strOS == "win32":
-        eOSType = EnumOsType.Windows
-    elif strOS.startswith("gnukfreebsd"):
-        eOSType = EnumOsType.kFreeBSD
-
-    return eOSType
diff --git a/src/llvm-project/lldb/source/API/CMakeLists.txt b/src/llvm-project/lldb/source/API/CMakeLists.txt
index d93b8b5..e0ecf29 100644
--- a/src/llvm-project/lldb/source/API/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/API/CMakeLists.txt
@@ -4,16 +4,22 @@
 
 get_property(LLDB_ALL_PLUGINS GLOBAL PROPERTY LLDB_PLUGINS)
 
-if(NOT LLDB_DISABLE_PYTHON)
-  get_target_property(lldb_scripts_dir swig_wrapper BINARY_DIR)
-  set(lldb_python_wrapper ${lldb_scripts_dir}/LLDBWrapPython.cpp)
+if(LLDB_ENABLE_PYTHON)
+  get_target_property(lldb_bindings_dir swig_wrapper BINARY_DIR)
+  set(lldb_python_wrapper ${lldb_bindings_dir}/LLDBWrapPython.cpp)
+endif()
+
+if(LLDB_ENABLE_LUA)
+  get_target_property(lldb_bindings_dir swig_wrapper_lua BINARY_DIR)
+  set(lldb_lua_wrapper ${lldb_bindings_dir}/LLDBWrapLua.cpp)
 endif()
 
 if(LLDB_BUILD_FRAMEWORK)
   set(option_install_prefix INSTALL_PREFIX ${LLDB_FRAMEWORK_INSTALL_DIR})
+  set(option_framework FRAMEWORK)
 endif()
 
-add_lldb_library(liblldb SHARED
+add_lldb_library(liblldb SHARED ${option_framework}
   SBAddress.cpp
   SBAttachInfo.cpp
   SBBlock.cpp
@@ -34,6 +40,7 @@
   SBExecutionContext.cpp
   SBExpressionOptions.cpp
   SBFileSpec.cpp
+  SBFile.cpp
   SBFileSpecList.cpp
   SBFrame.cpp
   SBFunction.cpp
@@ -83,6 +90,7 @@
   SBUnixSignals.cpp
   SystemInitializerFull.cpp
   ${lldb_python_wrapper}
+  ${lldb_lua_wrapper}
 
   LINK_LIBS
     lldbBase
@@ -103,6 +111,14 @@
   ${option_install_prefix}
 )
 
+# lib/pythonX.Y/dist-packages/lldb/_lldb.so is a symlink to lib/liblldb.so,
+# which depends on lib/libLLVM*.so (BUILD_SHARED_LIBS) or lib/libLLVM-10git.so
+# (LLVM_LINK_LLVM_DYLIB). Add an additional rpath $ORIGIN/../../../../lib so
+# that _lldb.so can be loaded from Python.
+if(LLDB_ENABLE_PYTHON AND (BUILD_SHARED_LIBS OR LLVM_LINK_LLVM_DYLIB) AND UNIX AND NOT APPLE)
+  set_property(TARGET liblldb APPEND PROPERTY INSTALL_RPATH "\$ORIGIN/../../../../lib${LLVM_LIBDIR_SUFFIX}")
+endif()
+
 if (MSVC)
   set_source_files_properties(SBReproducer.cpp PROPERTIES COMPILE_FLAGS /bigobj)
 endif()
@@ -128,6 +144,19 @@
   endif ()
 endif()
 
+if(lldb_lua_wrapper)
+  add_dependencies(liblldb swig_wrapper_lua)
+  target_include_directories(liblldb PRIVATE ${LUA_INCLUDE_DIR})
+
+  if (MSVC)
+    set_property(SOURCE ${lldb_lua_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " /W0")
+  else()
+    set_property(SOURCE ${lldb_lua_wrapper} APPEND_STRING PROPERTY COMPILE_FLAGS " -w")
+  endif()
+
+  set_source_files_properties(${lldb_lua_wrapper} PROPERTIES GENERATED ON)
+endif()
+
 set_target_properties(liblldb
   PROPERTIES
   VERSION ${LLDB_VERSION}
@@ -151,9 +180,9 @@
 
 if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
   # Only MSVC has the ABI compatibility problem and avoids using FindPythonLibs,
-  # so only it needs to explicitly link against ${PYTHON_LIBRARY}
-  if (MSVC AND NOT LLDB_DISABLE_PYTHON)
-    target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY})
+  # so only it needs to explicitly link against ${PYTHON_LIBRARIES}
+  if (MSVC AND LLDB_ENABLE_PYTHON)
+    target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARIES})
   endif()
 else()
   set_target_properties(liblldb
diff --git a/src/llvm-project/lldb/source/API/SBAddress.cpp b/src/llvm-project/lldb/source/API/SBAddress.cpp
index 358cb40..dcde25b 100644
--- a/src/llvm-project/lldb/source/API/SBAddress.cpp
+++ b/src/llvm-project/lldb/source/API/SBAddress.cpp
@@ -28,7 +28,7 @@
 SBAddress::SBAddress(const Address *lldb_object_ptr)
     : m_opaque_up(new Address()) {
   if (lldb_object_ptr)
-    m_opaque_up = llvm::make_unique<Address>(*lldb_object_ptr);
+    m_opaque_up = std::make_unique<Address>(*lldb_object_ptr);
 }
 
 SBAddress::SBAddress(const SBAddress &rhs) : m_opaque_up(new Address()) {
@@ -210,12 +210,6 @@
   if (m_opaque_up->IsValid()) {
     m_opaque_up->Dump(&strm, nullptr, Address::DumpStyleResolvedDescription,
                       Address::DumpStyleModuleWithFileAddress, 4);
-    StreamString sstrm;
-    //        m_opaque_up->Dump (&sstrm, NULL,
-    //        Address::DumpStyleResolvedDescription, Address::DumpStyleInvalid,
-    //        4);
-    //        if (sstrm.GetData())
-    //            strm.Printf (" (%s)", sstrm.GetData());
   } else
     strm.PutCString("No value");
 
diff --git a/src/llvm-project/lldb/source/API/SBBreakpoint.cpp b/src/llvm-project/lldb/source/API/SBBreakpoint.cpp
index 45eaea6..8159b85 100644
--- a/src/llvm-project/lldb/source/API/SBBreakpoint.cpp
+++ b/src/llvm-project/lldb/source/API/SBBreakpoint.cpp
@@ -14,6 +14,7 @@
 #include "lldb/API/SBProcess.h"
 #include "lldb/API/SBStream.h"
 #include "lldb/API/SBStringList.h"
+#include "lldb/API/SBStructuredData.h"
 #include "lldb/API/SBThread.h"
 
 #include "lldb/Breakpoint/Breakpoint.h"
@@ -25,6 +26,7 @@
 #include "lldb/Core/Address.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/StreamFile.h"
+#include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/ScriptInterpreter.h"
 #include "lldb/Target/Process.h"
@@ -590,22 +592,38 @@
 }
 
 void SBBreakpoint::SetScriptCallbackFunction(
-    const char *callback_function_name) {
-  LLDB_RECORD_METHOD(void, SBBreakpoint, SetScriptCallbackFunction,
-                     (const char *), callback_function_name);
+  const char *callback_function_name) {
+LLDB_RECORD_METHOD(void, SBBreakpoint, SetScriptCallbackFunction,
+                   (const char *), callback_function_name);
+  SBStructuredData empty_args;
+  SetScriptCallbackFunction(callback_function_name, empty_args);
+}
 
+SBError SBBreakpoint::SetScriptCallbackFunction(
+    const char *callback_function_name,
+    SBStructuredData &extra_args) {
+  LLDB_RECORD_METHOD(SBError, SBBreakpoint, SetScriptCallbackFunction,
+  (const char *, SBStructuredData &), callback_function_name, extra_args);
+  SBError sb_error;
   BreakpointSP bkpt_sp = GetSP();
 
   if (bkpt_sp) {
+    Status error;
     std::lock_guard<std::recursive_mutex> guard(
         bkpt_sp->GetTarget().GetAPIMutex());
     BreakpointOptions *bp_options = bkpt_sp->GetOptions();
-    bkpt_sp->GetTarget()
+    error = bkpt_sp->GetTarget()
         .GetDebugger()
         .GetScriptInterpreter()
         ->SetBreakpointCommandCallbackFunction(bp_options,
-                                               callback_function_name);
-  }
+                                               callback_function_name,
+                                               extra_args.m_impl_up
+                                                   ->GetObjectSP());
+    sb_error.SetError(error);
+  } else
+    sb_error.SetErrorString("invalid breakpoint");
+  
+  return LLDB_RECORD_RESULT(sb_error);
 }
 
 SBError SBBreakpoint::SetScriptCallbackBody(const char *callback_body_text) {
@@ -992,6 +1010,8 @@
                        (lldb::SBAddress &));
   LLDB_REGISTER_METHOD(void, SBBreakpoint, SetScriptCallbackFunction,
                        (const char *));
+  LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackFunction,
+                       (const char *, SBStructuredData &));
   LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackBody,
                        (const char *));
   LLDB_REGISTER_METHOD(bool, SBBreakpoint, AddName, (const char *));
diff --git a/src/llvm-project/lldb/source/API/SBBreakpointLocation.cpp b/src/llvm-project/lldb/source/API/SBBreakpointLocation.cpp
index 640545f..2b62a69 100644
--- a/src/llvm-project/lldb/source/API/SBBreakpointLocation.cpp
+++ b/src/llvm-project/lldb/source/API/SBBreakpointLocation.cpp
@@ -12,12 +12,14 @@
 #include "lldb/API/SBDebugger.h"
 #include "lldb/API/SBDefines.h"
 #include "lldb/API/SBStream.h"
+#include "lldb/API/SBStructuredData.h"
 #include "lldb/API/SBStringList.h"
 
 #include "lldb/Breakpoint/Breakpoint.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/StreamFile.h"
+#include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/ScriptInterpreter.h"
 #include "lldb/Target/Target.h"
@@ -207,23 +209,38 @@
 }
 
 void SBBreakpointLocation::SetScriptCallbackFunction(
-    const char *callback_function_name) {
-  LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetScriptCallbackFunction,
-                     (const char *), callback_function_name);
+  const char *callback_function_name) {
+LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetScriptCallbackFunction,
+                   (const char *), callback_function_name);
+}
 
+SBError SBBreakpointLocation::SetScriptCallbackFunction(
+    const char *callback_function_name,
+    SBStructuredData &extra_args) {
+  LLDB_RECORD_METHOD(SBError, SBBreakpointLocation, SetScriptCallbackFunction,
+                     (const char *, SBStructuredData &), 
+                     callback_function_name, extra_args);
+  SBError sb_error;
   BreakpointLocationSP loc_sp = GetSP();
 
   if (loc_sp) {
+    Status error;
     std::lock_guard<std::recursive_mutex> guard(
         loc_sp->GetTarget().GetAPIMutex());
     BreakpointOptions *bp_options = loc_sp->GetLocationOptions();
-    loc_sp->GetBreakpoint()
+    error = loc_sp->GetBreakpoint()
         .GetTarget()
         .GetDebugger()
         .GetScriptInterpreter()
         ->SetBreakpointCommandCallbackFunction(bp_options,
-                                               callback_function_name);
-  }
+                                               callback_function_name,
+                                               extra_args.m_impl_up
+                                                   ->GetObjectSP());
+      sb_error.SetError(error);
+    } else
+      sb_error.SetErrorString("invalid breakpoint");
+    
+    return LLDB_RECORD_RESULT(sb_error);
 }
 
 SBError
@@ -482,6 +499,8 @@
   LLDB_REGISTER_METHOD(bool, SBBreakpointLocation, GetAutoContinue, ());
   LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetScriptCallbackFunction,
                        (const char *));
+  LLDB_REGISTER_METHOD(SBError, SBBreakpointLocation, SetScriptCallbackFunction,
+                       (const char *, SBStructuredData &));
   LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpointLocation,
                        SetScriptCallbackBody, (const char *));
   LLDB_REGISTER_METHOD(void, SBBreakpointLocation, SetCommandLineCommands,
diff --git a/src/llvm-project/lldb/source/API/SBBreakpointName.cpp b/src/llvm-project/lldb/source/API/SBBreakpointName.cpp
index 1c794fc..5bd7732 100644
--- a/src/llvm-project/lldb/source/API/SBBreakpointName.cpp
+++ b/src/llvm-project/lldb/source/API/SBBreakpointName.cpp
@@ -12,11 +12,13 @@
 #include "lldb/API/SBError.h"
 #include "lldb/API/SBStream.h"
 #include "lldb/API/SBStringList.h"
+#include "lldb/API/SBStructuredData.h"
 #include "lldb/API/SBTarget.h"
 
 #include "lldb/Breakpoint/BreakpointName.h"
 #include "lldb/Breakpoint/StoppointCallbackContext.h"
 #include "lldb/Core/Debugger.h"
+#include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/ScriptInterpreter.h"
 #include "lldb/Target/Target.h"
@@ -565,24 +567,41 @@
 }
 
 void SBBreakpointName::SetScriptCallbackFunction(
-    const char *callback_function_name) {
-  LLDB_RECORD_METHOD(void, SBBreakpointName, SetScriptCallbackFunction,
-                     (const char *), callback_function_name);
+  const char *callback_function_name) {
+LLDB_RECORD_METHOD(void, SBBreakpointName, SetScriptCallbackFunction,
+                   (const char *), callback_function_name);
+  SBStructuredData empty_args;
+  SetScriptCallbackFunction(callback_function_name, empty_args);
+}
 
+SBError SBBreakpointName::SetScriptCallbackFunction(
+    const char *callback_function_name, 
+    SBStructuredData &extra_args) {
+  LLDB_RECORD_METHOD(SBError, SBBreakpointName, SetScriptCallbackFunction,
+                     (const char *, SBStructuredData &), 
+                     callback_function_name, extra_args);
+  SBError sb_error;
   BreakpointName *bp_name = GetBreakpointName();
-  if (!bp_name)
-    return;
+  if (!bp_name) {
+    sb_error.SetErrorString("unrecognized breakpoint name");
+    return LLDB_RECORD_RESULT(sb_error);
+  }
 
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
   BreakpointOptions &bp_options = bp_name->GetOptions();
-  m_impl_up->GetTarget()
+  Status error;
+  error = m_impl_up->GetTarget()
       ->GetDebugger()
       .GetScriptInterpreter()
       ->SetBreakpointCommandCallbackFunction(&bp_options,
-                                             callback_function_name);
+                                             callback_function_name,
+                                             extra_args.m_impl_up
+                                                 ->GetObjectSP());
+  sb_error.SetError(error);
   UpdateName(*bp_name);
+  return LLDB_RECORD_RESULT(sb_error);
 }
 
 SBError
@@ -728,6 +747,8 @@
                        (lldb::SBStream &));
   LLDB_REGISTER_METHOD(void, SBBreakpointName, SetScriptCallbackFunction,
                        (const char *));
+  LLDB_REGISTER_METHOD(SBError, SBBreakpointName, SetScriptCallbackFunction,
+                       (const char *, SBStructuredData &));
   LLDB_REGISTER_METHOD(lldb::SBError, SBBreakpointName, SetScriptCallbackBody,
                        (const char *));
   LLDB_REGISTER_METHOD_CONST(bool, SBBreakpointName, GetAllowList, ());
diff --git a/src/llvm-project/lldb/source/API/SBBreakpointOptionCommon.cpp b/src/llvm-project/lldb/source/API/SBBreakpointOptionCommon.cpp
index 058b3e0..870b4b9 100644
--- a/src/llvm-project/lldb/source/API/SBBreakpointOptionCommon.cpp
+++ b/src/llvm-project/lldb/source/API/SBBreakpointOptionCommon.cpp
@@ -41,7 +41,7 @@
 SBBreakpointCallbackBaton::SBBreakpointCallbackBaton(SBBreakpointHitCallback 
                                                          callback,
                                                      void *baton)
-      : TypedBaton(llvm::make_unique<CallbackData>()) {
+      : TypedBaton(std::make_unique<CallbackData>()) {
     getItem()->callback = callback;
     getItem()->callback_baton = baton;
   }
diff --git a/src/llvm-project/lldb/source/API/SBCommandInterpreter.cpp b/src/llvm-project/lldb/source/API/SBCommandInterpreter.cpp
index c07dffc..6e5ebe6 100644
--- a/src/llvm-project/lldb/source/API/SBCommandInterpreter.cpp
+++ b/src/llvm-project/lldb/source/API/SBCommandInterpreter.cpp
@@ -162,12 +162,11 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    SBCommandReturnObject sb_return(&result);
+    SBCommandReturnObject sb_return(result);
     SBCommandInterpreter sb_interpreter(&m_interpreter);
     SBDebugger debugger_sb(m_interpreter.GetDebugger().shared_from_this());
     bool ret = m_backend->DoExecute(
         debugger_sb, (char **)command.GetArgumentVector(), sb_return);
-    sb_return.Release();
     return ret;
   }
   std::shared_ptr<lldb::SBCommandPluginInterface> m_backend;
@@ -353,8 +352,6 @@
                      current_line, cursor, last_char, match_start_point,
                      max_return_elements, matches, descriptions);
 
-  int num_completions = 0;
-
   // Sanity check the arguments that are passed in: cursor & last_char have to
   // be within the current_line.
   if (current_line == nullptr || cursor == nullptr || last_char == nullptr)
@@ -368,20 +365,50 @@
       last_char - current_line > static_cast<ptrdiff_t>(current_line_size))
     return 0;
 
+  if (!IsValid())
+    return 0;
 
-  if (IsValid()) {
-    lldb_private::StringList lldb_matches, lldb_descriptions;
-    num_completions = m_opaque_ptr->HandleCompletion(
-        current_line, cursor, last_char, match_start_point, max_return_elements,
-        lldb_matches, lldb_descriptions);
+  lldb_private::StringList lldb_matches, lldb_descriptions;
+  CompletionResult result;
+  CompletionRequest request(current_line, cursor - current_line, result);
+  m_opaque_ptr->HandleCompletion(request);
+  result.GetMatches(lldb_matches);
+  result.GetDescriptions(lldb_descriptions);
 
-    SBStringList temp_matches_list(&lldb_matches);
-    matches.AppendList(temp_matches_list);
-    SBStringList temp_descriptions_list(&lldb_descriptions);
-    descriptions.AppendList(temp_descriptions_list);
+  // Make the result array indexed from 1 again by adding the 'common prefix'
+  // of all completions as element 0. This is done to emulate the old API.
+  if (request.GetParsedLine().GetArgumentCount() == 0) {
+    // If we got an empty string, insert nothing.
+    lldb_matches.InsertStringAtIndex(0, "");
+    lldb_descriptions.InsertStringAtIndex(0, "");
+  } else {
+    // Now figure out if there is a common substring, and if so put that in
+    // element 0, otherwise put an empty string in element 0.
+    std::string command_partial_str = request.GetCursorArgumentPrefix().str();
+
+    std::string common_prefix = lldb_matches.LongestCommonPrefix();
+    const size_t partial_name_len = command_partial_str.size();
+    common_prefix.erase(0, partial_name_len);
+
+    // If we matched a unique single command, add a space... Only do this if
+    // the completer told us this was a complete word, however...
+    if (lldb_matches.GetSize() == 1) {
+      char quote_char = request.GetParsedArg().GetQuoteChar();
+      common_prefix =
+          Args::EscapeLLDBCommandArgument(common_prefix, quote_char);
+      if (request.GetParsedArg().IsQuoted())
+        common_prefix.push_back(quote_char);
+      common_prefix.push_back(' ');
+    }
+    lldb_matches.InsertStringAtIndex(0, common_prefix.c_str());
+    lldb_descriptions.InsertStringAtIndex(0, "");
   }
 
-  return num_completions;
+  SBStringList temp_matches_list(&lldb_matches);
+  matches.AppendList(temp_matches_list);
+  SBStringList temp_descriptions_list(&lldb_descriptions);
+  descriptions.AppendList(temp_descriptions_list);
+  return result.GetNumberOfResults();
 }
 
 int SBCommandInterpreter::HandleCompletionWithDescriptions(
diff --git a/src/llvm-project/lldb/source/API/SBCommandReturnObject.cpp b/src/llvm-project/lldb/source/API/SBCommandReturnObject.cpp
index 94e8991..eec1383 100644
--- a/src/llvm-project/lldb/source/API/SBCommandReturnObject.cpp
+++ b/src/llvm-project/lldb/source/API/SBCommandReturnObject.cpp
@@ -10,6 +10,7 @@
 #include "SBReproducerPrivate.h"
 #include "Utils.h"
 #include "lldb/API/SBError.h"
+#include "lldb/API/SBFile.h"
 #include "lldb/API/SBStream.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Utility/ConstString.h"
@@ -18,11 +19,43 @@
 using namespace lldb;
 using namespace lldb_private;
 
+class lldb_private::SBCommandReturnObjectImpl {
+public:
+  SBCommandReturnObjectImpl()
+      : m_ptr(new CommandReturnObject()), m_owned(true) {}
+  SBCommandReturnObjectImpl(CommandReturnObject &ref)
+      : m_ptr(&ref), m_owned(false) {}
+  SBCommandReturnObjectImpl(const SBCommandReturnObjectImpl &rhs)
+      : m_ptr(new CommandReturnObject(*rhs.m_ptr)), m_owned(rhs.m_owned) {}
+  SBCommandReturnObjectImpl &operator=(const SBCommandReturnObjectImpl &rhs) {
+    SBCommandReturnObjectImpl copy(rhs);
+    std::swap(*this, copy);
+    return *this;
+  }
+  // rvalue ctor+assignment are not used by SBCommandReturnObject.
+  ~SBCommandReturnObjectImpl() {
+    if (m_owned)
+      delete m_ptr;
+  }
+
+  CommandReturnObject &operator*() const { return *m_ptr; }
+
+private:
+  CommandReturnObject *m_ptr;
+  bool m_owned;
+};
+
 SBCommandReturnObject::SBCommandReturnObject()
-    : m_opaque_up(new CommandReturnObject()) {
+    : m_opaque_up(new SBCommandReturnObjectImpl()) {
   LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBCommandReturnObject);
 }
 
+SBCommandReturnObject::SBCommandReturnObject(CommandReturnObject &ref)
+    : m_opaque_up(new SBCommandReturnObjectImpl(ref)) {
+  LLDB_RECORD_CONSTRUCTOR(SBCommandReturnObject,
+                          (lldb_private::CommandReturnObject &), ref);
+}
+
 SBCommandReturnObject::SBCommandReturnObject(const SBCommandReturnObject &rhs)
     : m_opaque_up() {
   LLDB_RECORD_CONSTRUCTOR(SBCommandReturnObject,
@@ -31,25 +64,10 @@
   m_opaque_up = clone(rhs.m_opaque_up);
 }
 
-SBCommandReturnObject::SBCommandReturnObject(CommandReturnObject *ptr)
-    : m_opaque_up(ptr) {
-  LLDB_RECORD_CONSTRUCTOR(SBCommandReturnObject,
-                          (lldb_private::CommandReturnObject *), ptr);
-}
-
-SBCommandReturnObject::~SBCommandReturnObject() = default;
-
-CommandReturnObject *SBCommandReturnObject::Release() {
-  LLDB_RECORD_METHOD_NO_ARGS(lldb_private::CommandReturnObject *,
-                             SBCommandReturnObject, Release);
-
-  return LLDB_RECORD_RESULT(m_opaque_up.release());
-}
-
-const SBCommandReturnObject &SBCommandReturnObject::
+SBCommandReturnObject &SBCommandReturnObject::
 operator=(const SBCommandReturnObject &rhs) {
   LLDB_RECORD_METHOD(
-      const lldb::SBCommandReturnObject &,
+      lldb::SBCommandReturnObject &,
       SBCommandReturnObject, operator=,(const lldb::SBCommandReturnObject &),
       rhs);
 
@@ -58,6 +76,8 @@
   return LLDB_RECORD_RESULT(*this);
 }
 
+SBCommandReturnObject::~SBCommandReturnObject() = default;
+
 bool SBCommandReturnObject::IsValid() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandReturnObject, IsValid);
   return this->operator bool();
@@ -65,49 +85,38 @@
 SBCommandReturnObject::operator bool() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandReturnObject, operator bool);
 
-  return m_opaque_up != nullptr;
+  // This method is not useful but it needs to stay to keep SB API stable.
+  return true;
 }
 
 const char *SBCommandReturnObject::GetOutput() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBCommandReturnObject, GetOutput);
 
-  if (m_opaque_up) {
-    llvm::StringRef output = m_opaque_up->GetOutputData();
-    ConstString result(output.empty() ? llvm::StringRef("") : output);
-
-    return result.AsCString();
-  }
-
-  return nullptr;
+  ConstString output(ref().GetOutputData());
+  return output.AsCString(/*value_if_empty*/ "");
 }
 
 const char *SBCommandReturnObject::GetError() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBCommandReturnObject, GetError);
 
-  if (m_opaque_up) {
-    llvm::StringRef output = m_opaque_up->GetErrorData();
-    ConstString result(output.empty() ? llvm::StringRef("") : output);
-    return result.AsCString();
-  }
-
-  return nullptr;
+  ConstString output(ref().GetErrorData());
+  return output.AsCString(/*value_if_empty*/ "");
 }
 
 size_t SBCommandReturnObject::GetOutputSize() {
   LLDB_RECORD_METHOD_NO_ARGS(size_t, SBCommandReturnObject, GetOutputSize);
 
-  return (m_opaque_up ? m_opaque_up->GetOutputData().size() : 0);
+  return ref().GetOutputData().size();
 }
 
 size_t SBCommandReturnObject::GetErrorSize() {
   LLDB_RECORD_METHOD_NO_ARGS(size_t, SBCommandReturnObject, GetErrorSize);
 
-  return (m_opaque_up ? m_opaque_up->GetErrorData().size() : 0);
+  return ref().GetErrorData().size();
 }
 
 size_t SBCommandReturnObject::PutOutput(FILE *fh) {
-  LLDB_RECORD_METHOD(size_t, SBCommandReturnObject, PutOutput, (FILE *), fh);
-
+  LLDB_RECORD_DUMMY(size_t, SBCommandReturnObject, PutOutput, (FILE *), fh);
   if (fh) {
     size_t num_bytes = GetOutputSize();
     if (num_bytes)
@@ -116,9 +125,23 @@
   return 0;
 }
 
-size_t SBCommandReturnObject::PutError(FILE *fh) {
-  LLDB_RECORD_METHOD(size_t, SBCommandReturnObject, PutError, (FILE *), fh);
+size_t SBCommandReturnObject::PutOutput(FileSP file_sp) {
+  LLDB_RECORD_METHOD(size_t, SBCommandReturnObject, PutOutput, (FileSP),
+                     file_sp);
+  if (!file_sp)
+    return 0;
+  return file_sp->Printf("%s", GetOutput());
+}
 
+size_t SBCommandReturnObject::PutOutput(SBFile file) {
+  LLDB_RECORD_METHOD(size_t, SBCommandReturnObject, PutOutput, (SBFile), file);
+  if (!file.m_opaque_sp)
+    return 0;
+  return file.m_opaque_sp->Printf("%s", GetOutput());
+}
+
+size_t SBCommandReturnObject::PutError(FILE *fh) {
+  LLDB_RECORD_DUMMY(size_t, SBCommandReturnObject, PutError, (FILE *), fh);
   if (fh) {
     size_t num_bytes = GetErrorSize();
     if (num_bytes)
@@ -127,77 +150,81 @@
   return 0;
 }
 
+size_t SBCommandReturnObject::PutError(FileSP file_sp) {
+  LLDB_RECORD_METHOD(size_t, SBCommandReturnObject, PutError, (FileSP),
+                     file_sp);
+  if (!file_sp)
+    return 0;
+  return file_sp->Printf("%s", GetError());
+}
+
+size_t SBCommandReturnObject::PutError(SBFile file) {
+  LLDB_RECORD_METHOD(size_t, SBCommandReturnObject, PutError, (SBFile), file);
+  if (!file.m_opaque_sp)
+    return 0;
+  return file.m_opaque_sp->Printf("%s", GetError());
+}
+
 void SBCommandReturnObject::Clear() {
   LLDB_RECORD_METHOD_NO_ARGS(void, SBCommandReturnObject, Clear);
 
-  if (m_opaque_up)
-    m_opaque_up->Clear();
+  ref().Clear();
 }
 
 lldb::ReturnStatus SBCommandReturnObject::GetStatus() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::ReturnStatus, SBCommandReturnObject,
                              GetStatus);
 
-  return (m_opaque_up ? m_opaque_up->GetStatus() : lldb::eReturnStatusInvalid);
+  return ref().GetStatus();
 }
 
 void SBCommandReturnObject::SetStatus(lldb::ReturnStatus status) {
   LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetStatus,
                      (lldb::ReturnStatus), status);
 
-  if (m_opaque_up)
-    m_opaque_up->SetStatus(status);
+  ref().SetStatus(status);
 }
 
 bool SBCommandReturnObject::Succeeded() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBCommandReturnObject, Succeeded);
 
-  return (m_opaque_up ? m_opaque_up->Succeeded() : false);
+  return ref().Succeeded();
 }
 
 bool SBCommandReturnObject::HasResult() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBCommandReturnObject, HasResult);
 
-  return (m_opaque_up ? m_opaque_up->HasResult() : false);
+  return ref().HasResult();
 }
 
 void SBCommandReturnObject::AppendMessage(const char *message) {
   LLDB_RECORD_METHOD(void, SBCommandReturnObject, AppendMessage, (const char *),
                      message);
 
-  if (m_opaque_up)
-    m_opaque_up->AppendMessage(message);
+  ref().AppendMessage(message);
 }
 
 void SBCommandReturnObject::AppendWarning(const char *message) {
   LLDB_RECORD_METHOD(void, SBCommandReturnObject, AppendWarning, (const char *),
                      message);
 
-  if (m_opaque_up)
-    m_opaque_up->AppendWarning(message);
+  ref().AppendWarning(message);
 }
 
 CommandReturnObject *SBCommandReturnObject::operator->() const {
-  return m_opaque_up.get();
+  return &**m_opaque_up;
 }
 
 CommandReturnObject *SBCommandReturnObject::get() const {
-  return m_opaque_up.get();
+  return &**m_opaque_up;
 }
 
 CommandReturnObject &SBCommandReturnObject::operator*() const {
-  assert(m_opaque_up.get());
-  return *(m_opaque_up.get());
+  return **m_opaque_up;
 }
 
 CommandReturnObject &SBCommandReturnObject::ref() const {
-  assert(m_opaque_up.get());
-  return *(m_opaque_up.get());
-}
-
-void SBCommandReturnObject::SetLLDBObjectPtr(CommandReturnObject *ptr) {
-  if (m_opaque_up)
-    m_opaque_up.reset(ptr);
+  return **m_opaque_up;
 }
 
 bool SBCommandReturnObject::GetDescription(SBStream &description) {
@@ -206,84 +233,99 @@
 
   Stream &strm = description.ref();
 
-  if (m_opaque_up) {
-    description.Printf("Error:  ");
-    lldb::ReturnStatus status = m_opaque_up->GetStatus();
-    if (status == lldb::eReturnStatusStarted)
-      strm.PutCString("Started");
-    else if (status == lldb::eReturnStatusInvalid)
-      strm.PutCString("Invalid");
-    else if (m_opaque_up->Succeeded())
-      strm.PutCString("Success");
-    else
-      strm.PutCString("Fail");
+  description.Printf("Error:  ");
+  lldb::ReturnStatus status = ref().GetStatus();
+  if (status == lldb::eReturnStatusStarted)
+    strm.PutCString("Started");
+  else if (status == lldb::eReturnStatusInvalid)
+    strm.PutCString("Invalid");
+  else if (ref().Succeeded())
+    strm.PutCString("Success");
+  else
+    strm.PutCString("Fail");
 
-    if (GetOutputSize() > 0)
-      strm.Printf("\nOutput Message:\n%s", GetOutput());
+  if (GetOutputSize() > 0)
+    strm.Printf("\nOutput Message:\n%s", GetOutput());
 
-    if (GetErrorSize() > 0)
-      strm.Printf("\nError Message:\n%s", GetError());
-  } else
-    strm.PutCString("No value");
+  if (GetErrorSize() > 0)
+    strm.Printf("\nError Message:\n%s", GetError());
 
   return true;
 }
 
 void SBCommandReturnObject::SetImmediateOutputFile(FILE *fh) {
-  LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
-                     (FILE *), fh);
+  LLDB_RECORD_DUMMY(void, SBCommandReturnObject, SetImmediateOutputFile,
+                    (FILE *), fh);
 
   SetImmediateOutputFile(fh, false);
 }
 
 void SBCommandReturnObject::SetImmediateErrorFile(FILE *fh) {
-  LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
-                     (FILE *), fh);
+  LLDB_RECORD_DUMMY(void, SBCommandReturnObject, SetImmediateErrorFile,
+                    (FILE *), fh);
 
   SetImmediateErrorFile(fh, false);
 }
 
 void SBCommandReturnObject::SetImmediateOutputFile(FILE *fh,
                                                    bool transfer_ownership) {
-  LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
-                     (FILE *, bool), fh, transfer_ownership);
-
-  if (m_opaque_up)
-    m_opaque_up->SetImmediateOutputFile(fh, transfer_ownership);
+  LLDB_RECORD_DUMMY(void, SBCommandReturnObject, SetImmediateOutputFile,
+                    (FILE *, bool), fh, transfer_ownership);
+  FileSP file = std::make_shared<NativeFile>(fh, transfer_ownership);
+  ref().SetImmediateOutputFile(file);
 }
 
 void SBCommandReturnObject::SetImmediateErrorFile(FILE *fh,
                                                   bool transfer_ownership) {
-  LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
-                     (FILE *, bool), fh, transfer_ownership);
+  LLDB_RECORD_DUMMY(void, SBCommandReturnObject, SetImmediateErrorFile,
+                    (FILE *, bool), fh, transfer_ownership);
+  FileSP file = std::make_shared<NativeFile>(fh, transfer_ownership);
+  ref().SetImmediateErrorFile(file);
+}
 
-  if (m_opaque_up)
-    m_opaque_up->SetImmediateErrorFile(fh, transfer_ownership);
+void SBCommandReturnObject::SetImmediateOutputFile(SBFile file) {
+  LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
+                     (SBFile), file);
+  ref().SetImmediateOutputFile(file.m_opaque_sp);
+}
+
+void SBCommandReturnObject::SetImmediateErrorFile(SBFile file) {
+  LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
+                     (SBFile), file);
+  ref().SetImmediateErrorFile(file.m_opaque_sp);
+}
+
+void SBCommandReturnObject::SetImmediateOutputFile(FileSP file_sp) {
+  LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
+                     (FileSP), file_sp);
+  SetImmediateOutputFile(SBFile(file_sp));
+}
+
+void SBCommandReturnObject::SetImmediateErrorFile(FileSP file_sp) {
+  LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
+                     (FileSP), file_sp);
+  SetImmediateErrorFile(SBFile(file_sp));
 }
 
 void SBCommandReturnObject::PutCString(const char *string, int len) {
   LLDB_RECORD_METHOD(void, SBCommandReturnObject, PutCString,
                      (const char *, int), string, len);
 
-  if (m_opaque_up) {
-    if (len == 0 || string == nullptr || *string == 0) {
-      return;
-    } else if (len > 0) {
-      std::string buffer(string, len);
-      m_opaque_up->AppendMessage(buffer.c_str());
-    } else
-      m_opaque_up->AppendMessage(string);
-  }
+  if (len == 0 || string == nullptr || *string == 0) {
+    return;
+  } else if (len > 0) {
+    std::string buffer(string, len);
+    ref().AppendMessage(buffer.c_str());
+  } else
+    ref().AppendMessage(string);
 }
 
 const char *SBCommandReturnObject::GetOutput(bool only_if_no_immediate) {
   LLDB_RECORD_METHOD(const char *, SBCommandReturnObject, GetOutput, (bool),
                      only_if_no_immediate);
 
-  if (!m_opaque_up)
-    return nullptr;
   if (!only_if_no_immediate ||
-      m_opaque_up->GetImmediateOutputStream().get() == nullptr)
+      ref().GetImmediateOutputStream().get() == nullptr)
     return GetOutput();
   return nullptr;
 }
@@ -292,23 +334,17 @@
   LLDB_RECORD_METHOD(const char *, SBCommandReturnObject, GetError, (bool),
                      only_if_no_immediate);
 
-  if (!m_opaque_up)
-    return nullptr;
-  if (!only_if_no_immediate ||
-      m_opaque_up->GetImmediateErrorStream().get() == nullptr)
+  if (!only_if_no_immediate || ref().GetImmediateErrorStream().get() == nullptr)
     return GetError();
   return nullptr;
 }
 
 size_t SBCommandReturnObject::Printf(const char *format, ...) {
-  if (m_opaque_up) {
-    va_list args;
-    va_start(args, format);
-    size_t result = m_opaque_up->GetOutputStream().PrintfVarArg(format, args);
-    va_end(args);
-    return result;
-  }
-  return 0;
+  va_list args;
+  va_start(args, format);
+  size_t result = ref().GetOutputStream().PrintfVarArg(format, args);
+  va_end(args);
+  return result;
 }
 
 void SBCommandReturnObject::SetError(lldb::SBError &error,
@@ -317,20 +353,18 @@
                      (lldb::SBError &, const char *), error,
                      fallback_error_cstr);
 
-  if (m_opaque_up) {
-    if (error.IsValid())
-      m_opaque_up->SetError(error.ref(), fallback_error_cstr);
-    else if (fallback_error_cstr)
-      m_opaque_up->SetError(Status(), fallback_error_cstr);
-  }
+  if (error.IsValid())
+    ref().SetError(error.ref(), fallback_error_cstr);
+  else if (fallback_error_cstr)
+    ref().SetError(Status(), fallback_error_cstr);
 }
 
 void SBCommandReturnObject::SetError(const char *error_cstr) {
   LLDB_RECORD_METHOD(void, SBCommandReturnObject, SetError, (const char *),
                      error_cstr);
 
-  if (m_opaque_up && error_cstr)
-    m_opaque_up->SetError(error_cstr);
+  if (error_cstr)
+    ref().SetError(error_cstr);
 }
 
 namespace lldb_private {
@@ -340,13 +374,11 @@
 void RegisterMethods<SBCommandReturnObject>(Registry &R) {
   LLDB_REGISTER_CONSTRUCTOR(SBCommandReturnObject, ());
   LLDB_REGISTER_CONSTRUCTOR(SBCommandReturnObject,
-                            (const lldb::SBCommandReturnObject &));
+                            (lldb_private::CommandReturnObject &));
   LLDB_REGISTER_CONSTRUCTOR(SBCommandReturnObject,
-                            (lldb_private::CommandReturnObject *));
-  LLDB_REGISTER_METHOD(lldb_private::CommandReturnObject *,
-                       SBCommandReturnObject, Release, ());
+                            (const lldb::SBCommandReturnObject &));
   LLDB_REGISTER_METHOD(
-      const lldb::SBCommandReturnObject &,
+      lldb::SBCommandReturnObject &,
       SBCommandReturnObject, operator=,(const lldb::SBCommandReturnObject &));
   LLDB_REGISTER_METHOD_CONST(bool, SBCommandReturnObject, IsValid, ());
   LLDB_REGISTER_METHOD_CONST(bool, SBCommandReturnObject, operator bool, ());
@@ -356,6 +388,10 @@
   LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, GetErrorSize, ());
   LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutOutput, (FILE *));
   LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutError, (FILE *));
+  LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutOutput, (SBFile));
+  LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutError, (SBFile));
+  LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutOutput, (FileSP));
+  LLDB_REGISTER_METHOD(size_t, SBCommandReturnObject, PutError, (FileSP));
   LLDB_REGISTER_METHOD(void, SBCommandReturnObject, Clear, ());
   LLDB_REGISTER_METHOD(lldb::ReturnStatus, SBCommandReturnObject, GetStatus,
                        ());
@@ -374,6 +410,14 @@
   LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
                        (FILE *));
   LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
+                       (SBFile));
+  LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
+                       (SBFile));
+  LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
+                       (FileSP));
+  LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
+                       (FileSP));
+  LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateOutputFile,
                        (FILE *, bool));
   LLDB_REGISTER_METHOD(void, SBCommandReturnObject, SetImmediateErrorFile,
                        (FILE *, bool));
diff --git a/src/llvm-project/lldb/source/API/SBCompileUnit.cpp b/src/llvm-project/lldb/source/API/SBCompileUnit.cpp
index c9ca706..d52040d 100644
--- a/src/llvm-project/lldb/source/API/SBCompileUnit.cpp
+++ b/src/llvm-project/lldb/source/API/SBCompileUnit.cpp
@@ -14,8 +14,9 @@
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/LineEntry.h"
 #include "lldb/Symbol/LineTable.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/Type.h"
+#include "lldb/Symbol/TypeList.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -49,7 +50,7 @@
 
   SBFileSpec file_spec;
   if (m_opaque_ptr)
-    file_spec.SetFileSpec(*m_opaque_ptr);
+    file_spec.SetFileSpec(m_opaque_ptr->GetPrimaryFile());
   return LLDB_RECORD_RESULT(file_spec);
 }
 
@@ -105,7 +106,7 @@
     if (inline_file_spec && inline_file_spec->IsValid())
       file_spec = inline_file_spec->ref();
     else
-      file_spec = *m_opaque_ptr;
+      file_spec = m_opaque_ptr->GetPrimaryFile();
 
     index = m_opaque_ptr->FindLineEntry(
         start_idx, line, inline_file_spec ? inline_file_spec->get() : nullptr,
@@ -137,13 +138,13 @@
   if (!module_sp)
     return LLDB_RECORD_RESULT(sb_type_list);
 
-  SymbolVendor *vendor = module_sp->GetSymbolVendor();
-  if (!vendor)
+  SymbolFile *symfile = module_sp->GetSymbolFile();
+  if (!symfile)
     return LLDB_RECORD_RESULT(sb_type_list);
 
   TypeClass type_class = static_cast<TypeClass>(type_mask);
   TypeList type_list;
-  vendor->GetTypes(m_opaque_ptr, type_class, type_list);
+  symfile->GetTypes(m_opaque_ptr, type_class, type_list);
   sb_type_list.m_opaque_up->Append(type_list);
   return LLDB_RECORD_RESULT(sb_type_list);
 }
diff --git a/src/llvm-project/lldb/source/API/SBDebugger.cpp b/src/llvm-project/lldb/source/API/SBDebugger.cpp
index 634c4a9..b7ac804 100644
--- a/src/llvm-project/lldb/source/API/SBDebugger.cpp
+++ b/src/llvm-project/lldb/source/API/SBDebugger.cpp
@@ -18,6 +18,7 @@
 #include "lldb/API/SBCommandReturnObject.h"
 #include "lldb/API/SBError.h"
 #include "lldb/API/SBEvent.h"
+#include "lldb/API/SBFile.h"
 #include "lldb/API/SBFrame.h"
 #include "lldb/API/SBListener.h"
 #include "lldb/API/SBProcess.h"
@@ -39,6 +40,7 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/DataFormatters/DataVisualization.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Host/XML.h"
 #include "lldb/Initialization/SystemLifetimeManager.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
@@ -57,51 +59,6 @@
 using namespace lldb;
 using namespace lldb_private;
 
-/// Helper class for replaying commands through the reproducer.
-class CommandLoader {
-public:
-  CommandLoader(std::vector<std::string> files) : m_files(files) {}
-
-  static std::unique_ptr<CommandLoader> Create() {
-    repro::Loader *loader = repro::Reproducer::Instance().GetLoader();
-    if (!loader)
-      return {};
-
-    FileSpec file = loader->GetFile<repro::CommandProvider::Info>();
-    if (!file)
-      return {};
-
-    auto error_or_file = llvm::MemoryBuffer::getFile(file.GetPath());
-    if (auto err = error_or_file.getError())
-      return {};
-
-    std::vector<std::string> files;
-    llvm::yaml::Input yin((*error_or_file)->getBuffer());
-    yin >> files;
-
-    if (auto err = yin.error())
-      return {};
-
-    for (auto &file : files) {
-      FileSpec absolute_path =
-          loader->GetRoot().CopyByAppendingPathComponent(file);
-      file = absolute_path.GetPath();
-    }
-
-    return llvm::make_unique<CommandLoader>(std::move(files));
-  }
-
-  FILE *GetNextFile() {
-    if (m_index >= m_files.size())
-      return nullptr;
-    return FileSystem::Instance().Fopen(m_files[m_index++].c_str(), "r");
-  }
-
-private:
-  std::vector<std::string> m_files;
-  unsigned m_index = 0;
-};
-
 static llvm::sys::DynamicLibrary LoadPlugin(const lldb::DebuggerSP &debugger_sp,
                                             const FileSpec &spec,
                                             Status &error) {
@@ -200,11 +157,9 @@
   LLDB_RECORD_STATIC_METHOD_NO_ARGS(lldb::SBError, SBDebugger,
                                     InitializeWithErrorHandling);
 
-
-
   SBError error;
   if (auto e = g_debugger_lifetime->Initialize(
-          llvm::make_unique<SystemInitializerFull>(), LoadPlugin)) {
+          std::make_unique<SystemInitializerFull>(), LoadPlugin)) {
     error.SetError(Status(std::move(e)));
   }
   return LLDB_RECORD_RESULT(error);
@@ -219,7 +174,6 @@
 void SBDebugger::Clear() {
   LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, Clear);
 
-
   if (m_opaque_sp)
     m_opaque_sp->ClearIOHandlers();
 
@@ -260,7 +214,6 @@
 
   debugger.reset(Debugger::CreateInstance(callback, baton));
 
-
   SBCommandInterpreter interp = debugger.GetCommandInterpreter();
   if (source_init_files) {
     interp.get()->SkipLLDBInitFiles(false);
@@ -278,7 +231,6 @@
   LLDB_RECORD_STATIC_METHOD(void, SBDebugger, Destroy, (lldb::SBDebugger &),
                             debugger);
 
-
   Debugger::Destroy(debugger.m_opaque_sp);
 
   if (debugger.m_opaque_sp.get() != nullptr)
@@ -335,86 +287,174 @@
     m_opaque_sp->GetCommandInterpreter().SkipAppInitFiles(b);
 }
 
-// Shouldn't really be settable after initialization as this could cause lots
-// of problems; don't want users trying to switch modes in the middle of a
-// debugging session.
 void SBDebugger::SetInputFileHandle(FILE *fh, bool transfer_ownership) {
   LLDB_RECORD_METHOD(void, SBDebugger, SetInputFileHandle, (FILE *, bool), fh,
                      transfer_ownership);
+  SetInputFile((FileSP)std::make_shared<NativeFile>(fh, transfer_ownership));
+}
 
-  if (!m_opaque_sp)
-    return;
+SBError SBDebugger::SetInputFile(FileSP file_sp) {
+  LLDB_RECORD_METHOD(SBError, SBDebugger, SetInputFile, (FileSP), file_sp);
+  return LLDB_RECORD_RESULT(SetInputFile(SBFile(file_sp)));
+}
+
+// Shouldn't really be settable after initialization as this could cause lots
+// of problems; don't want users trying to switch modes in the middle of a
+// debugging session.
+SBError SBDebugger::SetInputFile(SBFile file) {
+  LLDB_RECORD_METHOD(SBError, SBDebugger, SetInputFile, (SBFile), file);
+
+  SBError error;
+  if (!m_opaque_sp) {
+    error.ref().SetErrorString("invalid debugger");
+    return LLDB_RECORD_RESULT(error);
+  }
 
   repro::DataRecorder *recorder = nullptr;
   if (repro::Generator *g = repro::Reproducer::Instance().GetGenerator())
     recorder = g->GetOrCreate<repro::CommandProvider>().GetNewDataRecorder();
 
-  static std::unique_ptr<CommandLoader> loader = CommandLoader::Create();
-  if (loader)
-    fh = loader->GetNextFile();
+  FileSP file_sp = file.m_opaque_sp;
 
-  m_opaque_sp->SetInputFileHandle(fh, transfer_ownership, recorder);
+  static std::unique_ptr<repro::MultiLoader<repro::CommandProvider>> loader =
+      repro::MultiLoader<repro::CommandProvider>::Create(
+          repro::Reproducer::Instance().GetLoader());
+  if (loader) {
+    llvm::Optional<std::string> nextfile = loader->GetNextFile();
+    FILE *fh = nextfile ? FileSystem::Instance().Fopen(nextfile->c_str(), "r")
+                        : nullptr;
+    // FIXME Jonas Devlieghere: shouldn't this error be propagated out to the
+    // reproducer somehow if fh is NULL?
+    if (fh) {
+      file_sp = std::make_shared<NativeFile>(fh, true);
+    }
+  }
+
+  if (!file_sp || !file_sp->IsValid()) {
+    error.ref().SetErrorString("invalid file");
+    return LLDB_RECORD_RESULT(error);
+  }
+
+  m_opaque_sp->SetInputFile(file_sp, recorder);
+  return LLDB_RECORD_RESULT(error);
+}
+
+SBError SBDebugger::SetOutputFile(FileSP file_sp) {
+  LLDB_RECORD_METHOD(SBError, SBDebugger, SetOutputFile, (FileSP), file_sp);
+  return LLDB_RECORD_RESULT(SetOutputFile(SBFile(file_sp)));
 }
 
 void SBDebugger::SetOutputFileHandle(FILE *fh, bool transfer_ownership) {
   LLDB_RECORD_METHOD(void, SBDebugger, SetOutputFileHandle, (FILE *, bool), fh,
                      transfer_ownership);
+  SetOutputFile((FileSP)std::make_shared<NativeFile>(fh, transfer_ownership));
+}
 
-  if (m_opaque_sp)
-    m_opaque_sp->SetOutputFileHandle(fh, transfer_ownership);
+SBError SBDebugger::SetOutputFile(SBFile file) {
+  LLDB_RECORD_METHOD(SBError, SBDebugger, SetOutputFile, (SBFile file), file);
+  SBError error;
+  if (!m_opaque_sp) {
+    error.ref().SetErrorString("invalid debugger");
+    return LLDB_RECORD_RESULT(error);
+  }
+  if (!file) {
+    error.ref().SetErrorString("invalid file");
+    return LLDB_RECORD_RESULT(error);
+  }
+  m_opaque_sp->SetOutputFile(file.m_opaque_sp);
+  return LLDB_RECORD_RESULT(error);
 }
 
 void SBDebugger::SetErrorFileHandle(FILE *fh, bool transfer_ownership) {
   LLDB_RECORD_METHOD(void, SBDebugger, SetErrorFileHandle, (FILE *, bool), fh,
                      transfer_ownership);
+  SetErrorFile((FileSP)std::make_shared<NativeFile>(fh, transfer_ownership));
+}
 
+SBError SBDebugger::SetErrorFile(FileSP file_sp) {
+  LLDB_RECORD_METHOD(SBError, SBDebugger, SetErrorFile, (FileSP), file_sp);
+  return LLDB_RECORD_RESULT(SetErrorFile(SBFile(file_sp)));
+}
 
-  if (m_opaque_sp)
-    m_opaque_sp->SetErrorFileHandle(fh, transfer_ownership);
+SBError SBDebugger::SetErrorFile(SBFile file) {
+  LLDB_RECORD_METHOD(SBError, SBDebugger, SetErrorFile, (SBFile file), file);
+  SBError error;
+  if (!m_opaque_sp) {
+    error.ref().SetErrorString("invalid debugger");
+    return LLDB_RECORD_RESULT(error);
+  }
+  if (!file) {
+    error.ref().SetErrorString("invalid file");
+    return LLDB_RECORD_RESULT(error);
+  }
+  m_opaque_sp->SetErrorFile(file.m_opaque_sp);
+  return LLDB_RECORD_RESULT(error);
 }
 
 FILE *SBDebugger::GetInputFileHandle() {
   LLDB_RECORD_METHOD_NO_ARGS(FILE *, SBDebugger, GetInputFileHandle);
-
   if (m_opaque_sp) {
-    StreamFileSP stream_file_sp(m_opaque_sp->GetInputFile());
-    if (stream_file_sp)
-      return LLDB_RECORD_RESULT(stream_file_sp->GetFile().GetStream());
+    File &file_sp = m_opaque_sp->GetInputFile();
+    return LLDB_RECORD_RESULT(file_sp.GetStream());
   }
-  return nullptr;
+  return LLDB_RECORD_RESULT(nullptr);
+}
+
+SBFile SBDebugger::GetInputFile() {
+  LLDB_RECORD_METHOD_NO_ARGS(SBFile, SBDebugger, GetInputFile);
+  if (m_opaque_sp) {
+    return LLDB_RECORD_RESULT(SBFile(m_opaque_sp->GetInputFileSP()));
+  }
+  return LLDB_RECORD_RESULT(SBFile());
 }
 
 FILE *SBDebugger::GetOutputFileHandle() {
   LLDB_RECORD_METHOD_NO_ARGS(FILE *, SBDebugger, GetOutputFileHandle);
-
   if (m_opaque_sp) {
-    StreamFileSP stream_file_sp(m_opaque_sp->GetOutputFile());
-    if (stream_file_sp)
-      return LLDB_RECORD_RESULT(stream_file_sp->GetFile().GetStream());
+    StreamFile &stream_file = m_opaque_sp->GetOutputStream();
+    return LLDB_RECORD_RESULT(stream_file.GetFile().GetStream());
   }
-  return nullptr;
+  return LLDB_RECORD_RESULT(nullptr);
+}
+
+SBFile SBDebugger::GetOutputFile() {
+  LLDB_RECORD_METHOD_NO_ARGS(SBFile, SBDebugger, GetOutputFile);
+  if (m_opaque_sp) {
+    SBFile file(m_opaque_sp->GetOutputStream().GetFileSP());
+    return LLDB_RECORD_RESULT(file);
+  }
+  return LLDB_RECORD_RESULT(SBFile());
 }
 
 FILE *SBDebugger::GetErrorFileHandle() {
   LLDB_RECORD_METHOD_NO_ARGS(FILE *, SBDebugger, GetErrorFileHandle);
 
   if (m_opaque_sp) {
-    StreamFileSP stream_file_sp(m_opaque_sp->GetErrorFile());
-    if (stream_file_sp)
-      return LLDB_RECORD_RESULT(stream_file_sp->GetFile().GetStream());
+    StreamFile &stream_file = m_opaque_sp->GetErrorStream();
+    return LLDB_RECORD_RESULT(stream_file.GetFile().GetStream());
   }
-  return nullptr;
+  return LLDB_RECORD_RESULT(nullptr);
+}
+
+SBFile SBDebugger::GetErrorFile() {
+  LLDB_RECORD_METHOD_NO_ARGS(SBFile, SBDebugger, GetErrorFile);
+  SBFile file;
+  if (m_opaque_sp) {
+    SBFile file(m_opaque_sp->GetErrorStream().GetFileSP());
+    return LLDB_RECORD_RESULT(file);
+  }
+  return LLDB_RECORD_RESULT(SBFile());
 }
 
 void SBDebugger::SaveInputTerminalState() {
-  LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, SaveInputTerminalState);
+  LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, SaveInputTerminalState);
 
   if (m_opaque_sp)
     m_opaque_sp->SaveInputTerminalState();
 }
 
 void SBDebugger::RestoreInputTerminalState() {
-  LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, RestoreInputTerminalState);
+  LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, RestoreInputTerminalState);
 
   if (m_opaque_sp)
     m_opaque_sp->RestoreInputTerminalState();
@@ -423,12 +463,10 @@
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBCommandInterpreter, SBDebugger,
                              GetCommandInterpreter);
 
-
   SBCommandInterpreter sb_interpreter;
   if (m_opaque_sp)
     sb_interpreter.reset(&m_opaque_sp->GetCommandInterpreter());
 
-
   return LLDB_RECORD_RESULT(sb_interpreter);
 }
 
@@ -446,10 +484,8 @@
 
     sb_interpreter.HandleCommand(command, result, false);
 
-    if (GetErrorFileHandle() != nullptr)
-      result.PutError(GetErrorFileHandle());
-    if (GetOutputFileHandle() != nullptr)
-      result.PutOutput(GetOutputFileHandle());
+    result.PutError(m_opaque_sp->GetErrorStream().GetFileSP());
+    result.PutOutput(m_opaque_sp->GetOutputStream().GetFileSP());
 
     if (!m_opaque_sp->GetAsyncExecution()) {
       SBProcess process(GetCommandInterpreter().GetProcess());
@@ -460,8 +496,7 @@
         while (lldb_listener_sp->GetEventForBroadcaster(
             process_sp.get(), event_sp, std::chrono::seconds(0))) {
           SBEvent event(event_sp);
-          HandleProcessEvent(process, event, GetOutputFileHandle(),
-                             GetErrorFileHandle());
+          HandleProcessEvent(process, event, GetOutputFile(), GetErrorFile());
         }
       }
     }
@@ -471,16 +506,25 @@
 SBListener SBDebugger::GetListener() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBListener, SBDebugger, GetListener);
 
-
   SBListener sb_listener;
   if (m_opaque_sp)
     sb_listener.reset(m_opaque_sp->GetListener());
 
-
   return LLDB_RECORD_RESULT(sb_listener);
 }
 
 void SBDebugger::HandleProcessEvent(const SBProcess &process,
+                                    const SBEvent &event, SBFile out,
+                                    SBFile err) {
+  LLDB_RECORD_METHOD(
+      void, SBDebugger, HandleProcessEvent,
+      (const lldb::SBProcess &, const lldb::SBEvent &, SBFile, SBFile), process,
+      event, out, err);
+
+  return HandleProcessEvent(process, event, out.m_opaque_sp, err.m_opaque_sp);
+}
+
+void SBDebugger::HandleProcessEvent(const SBProcess &process,
                                     const SBEvent &event, FILE *out,
                                     FILE *err) {
   LLDB_RECORD_METHOD(
@@ -488,6 +532,20 @@
       (const lldb::SBProcess &, const lldb::SBEvent &, FILE *, FILE *), process,
       event, out, err);
 
+  FileSP outfile = std::make_shared<NativeFile>(out, false);
+  FileSP errfile = std::make_shared<NativeFile>(err, false);
+  return HandleProcessEvent(process, event, outfile, errfile);
+}
+
+void SBDebugger::HandleProcessEvent(const SBProcess &process,
+                                    const SBEvent &event, FileSP out_sp,
+                                    FileSP err_sp) {
+
+  LLDB_RECORD_METHOD(
+      void, SBDebugger, HandleProcessEvent,
+      (const lldb::SBProcess &, const lldb::SBEvent &, FileSP, FileSP), process,
+      event, out_sp, err_sp);
+
   if (!process.IsValid())
     return;
 
@@ -505,16 +563,16 @@
       (Process::eBroadcastBitSTDOUT | Process::eBroadcastBitStateChanged)) {
     // Drain stdout when we stop just in case we have any bytes
     while ((len = process.GetSTDOUT(stdio_buffer, sizeof(stdio_buffer))) > 0)
-      if (out != nullptr)
-        ::fwrite(stdio_buffer, 1, len, out);
+      if (out_sp)
+        out_sp->Write(stdio_buffer, len);
   }
 
   if (event_type &
       (Process::eBroadcastBitSTDERR | Process::eBroadcastBitStateChanged)) {
     // Drain stderr when we stop just in case we have any bytes
     while ((len = process.GetSTDERR(stdio_buffer, sizeof(stdio_buffer))) > 0)
-      if (err != nullptr)
-        ::fwrite(stdio_buffer, 1, len, err);
+      if (err_sp)
+        err_sp->Write(stdio_buffer, len);
   }
 
   if (event_type & Process::eBroadcastBitStateChanged) {
@@ -525,7 +583,7 @@
 
     bool is_stopped = StateIsStoppedState(event_state);
     if (!is_stopped)
-      process.ReportEventState(event, out);
+      process.ReportEventState(event, out_sp);
   }
 }
 
@@ -578,7 +636,8 @@
   LLDB_RECORD_METHOD(lldb::ScriptLanguage, SBDebugger, GetScriptingLanguage,
                      (const char *), script_language_name);
 
-  if (!script_language_name) return eScriptLanguageDefault;
+  if (!script_language_name)
+    return eScriptLanguageDefault;
   return OptionArgParser::ToScriptLanguage(
       llvm::StringRef(script_language_name), eScriptLanguageDefault, nullptr);
 }
@@ -599,18 +658,18 @@
 static void AddBoolConfigEntry(StructuredData::Dictionary &dict,
                                llvm::StringRef name, bool value,
                                llvm::StringRef description) {
-  auto entry_up = llvm::make_unique<StructuredData::Dictionary>();
+  auto entry_up = std::make_unique<StructuredData::Dictionary>();
   entry_up->AddBooleanItem("value", value);
   entry_up->AddStringItem("description", description);
   dict.AddItem(name, std::move(entry_up));
 }
 
 static void AddLLVMTargets(StructuredData::Dictionary &dict) {
-  auto array_up = llvm::make_unique<StructuredData::Array>();
+  auto array_up = std::make_unique<StructuredData::Array>();
 #define LLVM_TARGET(target)                                                    \
-  array_up->AddItem(llvm::make_unique<StructuredData::String>(#target));
+  array_up->AddItem(std::make_unique<StructuredData::String>(#target));
 #include "llvm/Config/Targets.def"
-  auto entry_up = llvm::make_unique<StructuredData::Dictionary>();
+  auto entry_up = std::make_unique<StructuredData::Dictionary>();
   entry_up->AddItem("value", std::move(array_up));
   entry_up->AddStringItem("description", "A list of configured LLVM targets.");
   dict.AddItem("targets", std::move(entry_up));
@@ -620,10 +679,25 @@
   LLDB_RECORD_STATIC_METHOD_NO_ARGS(lldb::SBStructuredData, SBDebugger,
                                     GetBuildConfiguration);
 
-  auto config_up = llvm::make_unique<StructuredData::Dictionary>();
+  auto config_up = std::make_unique<StructuredData::Dictionary>();
   AddBoolConfigEntry(
       *config_up, "xml", XMLDocument::XMLEnabled(),
       "A boolean value that indicates if XML support is enabled in LLDB");
+  AddBoolConfigEntry(
+      *config_up, "curses", LLDB_ENABLE_CURSES,
+      "A boolean value that indicates if curses support is enabled in LLDB");
+  AddBoolConfigEntry(
+      *config_up, "editline", LLDB_ENABLE_LIBEDIT,
+      "A boolean value that indicates if editline support is enabled in LLDB");
+  AddBoolConfigEntry(
+      *config_up, "lzma", LLDB_ENABLE_LZMA,
+      "A boolean value that indicates if lzma support is enabled in LLDB");
+  AddBoolConfigEntry(
+      *config_up, "python", LLDB_ENABLE_PYTHON,
+      "A boolean value that indicates if python support is enabled in LLDB");
+  AddBoolConfigEntry(
+      *config_up, "lua", LLDB_ENABLE_LUA,
+      "A boolean value that indicates if lua support is enabled in LLDB");
   AddLLVMTargets(*config_up);
 
   SBStructuredData data;
@@ -635,7 +709,6 @@
   LLDB_RECORD_STATIC_METHOD(bool, SBDebugger, StateIsRunningState,
                             (lldb::StateType), state);
 
-
   const bool result = lldb_private::StateIsRunningState(state);
 
   return result;
@@ -645,7 +718,6 @@
   LLDB_RECORD_STATIC_METHOD(bool, SBDebugger, StateIsStoppedState,
                             (lldb::StateType), state);
 
-
   const bool result = lldb_private::StateIsStoppedState(state, false);
 
   return result;
@@ -680,13 +752,13 @@
   }
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBDebugger(%p)::CreateTarget (filename=\"%s\", triple=%s, "
-                "platform_name=%s, add_dependent_modules=%u, error=%s) => "
-                "SBTarget(%p)",
-                static_cast<void *>(m_opaque_sp.get()), filename, target_triple,
-                platform_name, add_dependent_modules, sb_error.GetCString(),
-                static_cast<void *>(target_sp.get()));
+  LLDB_LOGF(log,
+            "SBDebugger(%p)::CreateTarget (filename=\"%s\", triple=%s, "
+            "platform_name=%s, add_dependent_modules=%u, error=%s) => "
+            "SBTarget(%p)",
+            static_cast<void *>(m_opaque_sp.get()), filename, target_triple,
+            platform_name, add_dependent_modules, sb_error.GetCString(),
+            static_cast<void *>(target_sp.get()));
 
   return LLDB_RECORD_RESULT(sb_target);
 }
@@ -710,11 +782,11 @@
   }
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBDebugger(%p)::CreateTargetWithFileAndTargetTriple "
-                "(filename=\"%s\", triple=%s) => SBTarget(%p)",
-                static_cast<void *>(m_opaque_sp.get()), filename, target_triple,
-                static_cast<void *>(target_sp.get()));
+  LLDB_LOGF(log,
+            "SBDebugger(%p)::CreateTargetWithFileAndTargetTriple "
+            "(filename=\"%s\", triple=%s) => SBTarget(%p)",
+            static_cast<void *>(m_opaque_sp.get()), filename, target_triple,
+            static_cast<void *>(target_sp.get()));
 
   return LLDB_RECORD_RESULT(sb_target);
 }
@@ -743,11 +815,11 @@
     }
   }
 
-  if (log)
-    log->Printf("SBDebugger(%p)::CreateTargetWithFileAndArch (filename=\"%s\", "
-                "arch=%s) => SBTarget(%p)",
-                static_cast<void *>(m_opaque_sp.get()), filename, arch_cstr,
-                static_cast<void *>(target_sp.get()));
+  LLDB_LOGF(log,
+            "SBDebugger(%p)::CreateTargetWithFileAndArch (filename=\"%s\", "
+            "arch=%s) => SBTarget(%p)",
+            static_cast<void *>(m_opaque_sp.get()), filename, arch_cstr,
+            static_cast<void *>(target_sp.get()));
 
   return LLDB_RECORD_RESULT(sb_target);
 }
@@ -772,11 +844,10 @@
     }
   }
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf(
-        "SBDebugger(%p)::CreateTarget (filename=\"%s\") => SBTarget(%p)",
-        static_cast<void *>(m_opaque_sp.get()), filename,
-        static_cast<void *>(target_sp.get()));
+  LLDB_LOGF(log,
+            "SBDebugger(%p)::CreateTarget (filename=\"%s\") => SBTarget(%p)",
+            static_cast<void *>(m_opaque_sp.get()), filename,
+            static_cast<void *>(target_sp.get()));
   return LLDB_RECORD_RESULT(sb_target);
 }
 
@@ -785,14 +856,12 @@
 
   SBTarget sb_target;
   if (m_opaque_sp) {
-      sb_target.SetSP(m_opaque_sp->GetDummyTarget()->shared_from_this());
+    sb_target.SetSP(m_opaque_sp->GetDummyTarget()->shared_from_this());
   }
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf(
-        "SBDebugger(%p)::GetDummyTarget() => SBTarget(%p)",
-        static_cast<void *>(m_opaque_sp.get()),
-        static_cast<void *>(sb_target.GetSP().get()));
+  LLDB_LOGF(log, "SBDebugger(%p)::GetDummyTarget() => SBTarget(%p)",
+            static_cast<void *>(m_opaque_sp.get()),
+            static_cast<void *>(sb_target.GetSP().get()));
   return LLDB_RECORD_RESULT(sb_target);
 }
 
@@ -814,10 +883,9 @@
   }
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBDebugger(%p)::DeleteTarget (SBTarget(%p)) => %i",
-                static_cast<void *>(m_opaque_sp.get()),
-                static_cast<void *>(target.m_opaque_sp.get()), result);
+  LLDB_LOGF(log, "SBDebugger(%p)::DeleteTarget (SBTarget(%p)) => %i",
+            static_cast<void *>(m_opaque_sp.get()),
+            static_cast<void *>(target.m_opaque_sp.get()), result);
 
   return result;
 }
@@ -914,9 +982,9 @@
   if (log) {
     SBStream sstr;
     sb_target.GetDescription(sstr, eDescriptionLevelBrief);
-    log->Printf("SBDebugger(%p)::GetSelectedTarget () => SBTarget(%p): %s",
-                static_cast<void *>(m_opaque_sp.get()),
-                static_cast<void *>(target_sp.get()), sstr.GetData());
+    LLDB_LOGF(log, "SBDebugger(%p)::GetSelectedTarget () => SBTarget(%p): %s",
+              static_cast<void *>(m_opaque_sp.get()),
+              static_cast<void *>(target_sp.get()), sstr.GetData());
   }
 
   return LLDB_RECORD_RESULT(sb_target);
@@ -935,9 +1003,9 @@
   if (log) {
     SBStream sstr;
     sb_target.GetDescription(sstr, eDescriptionLevelBrief);
-    log->Printf("SBDebugger(%p)::SetSelectedTarget () => SBTarget(%p): %s",
-                static_cast<void *>(m_opaque_sp.get()),
-                static_cast<void *>(target_sp.get()), sstr.GetData());
+    LLDB_LOGF(log, "SBDebugger(%p)::SetSelectedTarget () => SBTarget(%p): %s",
+              static_cast<void *>(m_opaque_sp.get()),
+              static_cast<void *>(target_sp.get()), sstr.GetData());
   }
 }
 
@@ -951,11 +1019,10 @@
   if (debugger_sp) {
     sb_platform.SetSP(debugger_sp->GetPlatformList().GetSelectedPlatform());
   }
-  if (log)
-    log->Printf("SBDebugger(%p)::GetSelectedPlatform () => SBPlatform(%p): %s",
-                static_cast<void *>(m_opaque_sp.get()),
-                static_cast<void *>(sb_platform.GetSP().get()),
-                sb_platform.GetName());
+  LLDB_LOGF(log, "SBDebugger(%p)::GetSelectedPlatform () => SBPlatform(%p): %s",
+            static_cast<void *>(m_opaque_sp.get()),
+            static_cast<void *>(sb_platform.GetSP().get()),
+            sb_platform.GetName());
   return LLDB_RECORD_RESULT(sb_platform);
 }
 
@@ -970,11 +1037,10 @@
     debugger_sp->GetPlatformList().SetSelectedPlatform(sb_platform.GetSP());
   }
 
-  if (log)
-    log->Printf("SBDebugger(%p)::SetSelectedPlatform (SBPlatform(%p) %s)",
-                static_cast<void *>(m_opaque_sp.get()),
-                static_cast<void *>(sb_platform.GetSP().get()),
-                sb_platform.GetName());
+  LLDB_LOGF(log, "SBDebugger(%p)::SetSelectedPlatform (SBPlatform(%p) %s)",
+            static_cast<void *>(m_opaque_sp.get()),
+            static_cast<void *>(sb_platform.GetSP().get()),
+            sb_platform.GetName());
 }
 
 uint32_t SBDebugger::GetNumPlatforms() {
@@ -1018,7 +1084,7 @@
                      GetAvailablePlatformInfoAtIndex, (uint32_t), idx);
 
   SBStructuredData data;
-  auto platform_dict = llvm::make_unique<StructuredData::Dictionary>();
+  auto platform_dict = std::make_unique<StructuredData::Dictionary>();
   llvm::StringRef name_str("name"), desc_str("description");
 
   if (idx == 0) {
@@ -1062,7 +1128,7 @@
   //    Log *log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
   //
   //    if (log)
-  //        log->Printf ("SBDebugger(%p)::DispatchInput (data=\"%.*s\",
+  //        LLDB_LOGF(log, "SBDebugger(%p)::DispatchInput (data=\"%.*s\",
   //        size_t=%" PRIu64 ")",
   //                     m_opaque_sp.get(),
   //                     (int) data_len,
@@ -1074,7 +1140,7 @@
 }
 
 void SBDebugger::DispatchInputInterrupt() {
-  LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, DispatchInputInterrupt);
+  LLDB_RECORD_DUMMY_NO_ARGS(void, SBDebugger, DispatchInputInterrupt);
 
   if (m_opaque_sp)
     m_opaque_sp->DispatchInputInterrupt();
@@ -1234,8 +1300,7 @@
 }
 
 void SBDebugger::SetTerminalWidth(uint32_t term_width) {
-  LLDB_RECORD_METHOD(void, SBDebugger, SetTerminalWidth, (uint32_t),
-                     term_width);
+  LLDB_RECORD_DUMMY(void, SBDebugger, SetTerminalWidth, (uint32_t), term_width);
 
   if (m_opaque_sp)
     m_opaque_sp->SetTerminalWidth(term_width);
@@ -1246,10 +1311,9 @@
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
-  if (log)
-    log->Printf("SBDebugger(%p)::GetPrompt () => \"%s\"",
-                static_cast<void *>(m_opaque_sp.get()),
-                (m_opaque_sp ? m_opaque_sp->GetPrompt().str().c_str() : ""));
+  LLDB_LOGF(log, "SBDebugger(%p)::GetPrompt () => \"%s\"",
+            static_cast<void *>(m_opaque_sp.get()),
+            (m_opaque_sp ? m_opaque_sp->GetPrompt().str().c_str() : ""));
 
   return (m_opaque_sp ? ConstString(m_opaque_sp->GetPrompt()).GetCString()
                       : nullptr);
@@ -1374,7 +1438,8 @@
 
     if (platform_sp) {
       if (log && sysroot)
-        log->Printf("SBDebugger::SetCurrentPlatformSDKRoot (\"%s\")", sysroot);
+        LLDB_LOGF(log, "SBDebugger::SetCurrentPlatformSDKRoot (\"%s\")",
+                  sysroot);
       platform_sp->SetSDKRootDirectory(ConstString(sysroot));
       return true;
     }
@@ -1549,8 +1614,7 @@
 namespace lldb_private {
 namespace repro {
 
-template <>
-void RegisterMethods<SBInputReader>(Registry &R) {
+template <> void RegisterMethods<SBInputReader>(Registry &R) {
   LLDB_REGISTER_METHOD(void, SBInputReader, SetIsDone, (bool));
   LLDB_REGISTER_METHOD_CONST(bool, SBInputReader, IsActive, ());
 }
@@ -1559,6 +1623,10 @@
   // Do nothing.
 }
 
+static SBError SetFileRedirect(SBDebugger *, SBFile file) { return SBError(); }
+
+static SBError SetFileRedirect(SBDebugger *, FileSP file) { return SBError(); }
+
 static bool GetDefaultArchitectureRedirect(char *arch_name,
                                            size_t arch_name_len) {
   // The function is writing to its argument. Without the redirect it would
@@ -1567,8 +1635,7 @@
   return SBDebugger::GetDefaultArchitecture(buffer, arch_name_len);
 }
 
-template <>
-void RegisterMethods<SBDebugger>(Registry &R) {
+template <> void RegisterMethods<SBDebugger>(Registry &R) {
   // Custom implementation.
   R.Register(&invoke<void (SBDebugger::*)(
                  FILE *, bool)>::method<&SBDebugger::SetErrorFileHandle>::doit,
@@ -1580,6 +1647,26 @@
                                        &SBDebugger::GetDefaultArchitecture),
                                    &GetDefaultArchitectureRedirect);
 
+  R.Register(&invoke<SBError (SBDebugger::*)(
+                 SBFile)>::method<&SBDebugger::SetInputFile>::doit,
+             &SetFileRedirect);
+  R.Register(&invoke<SBError (SBDebugger::*)(
+                 SBFile)>::method<&SBDebugger::SetOutputFile>::doit,
+             &SetFileRedirect);
+  R.Register(&invoke<SBError (SBDebugger::*)(
+                 SBFile)>::method<&SBDebugger::SetErrorFile>::doit,
+             &SetFileRedirect);
+
+  R.Register(&invoke<SBError (SBDebugger::*)(
+                 FileSP)>::method<&SBDebugger::SetInputFile>::doit,
+             &SetFileRedirect);
+  R.Register(&invoke<SBError (SBDebugger::*)(
+                 FileSP)>::method<&SBDebugger::SetOutputFile>::doit,
+             &SetFileRedirect);
+  R.Register(&invoke<SBError (SBDebugger::*)(
+                 FileSP)>::method<&SBDebugger::SetErrorFile>::doit,
+             &SetFileRedirect);
+
   LLDB_REGISTER_CONSTRUCTOR(SBDebugger, ());
   LLDB_REGISTER_CONSTRUCTOR(SBDebugger, (const lldb::DebuggerSP &));
   LLDB_REGISTER_CONSTRUCTOR(SBDebugger, (const lldb::SBDebugger &));
@@ -1592,11 +1679,10 @@
   LLDB_REGISTER_METHOD(void, SBDebugger, Clear, ());
   LLDB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger, Create, ());
   LLDB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger, Create, (bool));
-  LLDB_REGISTER_STATIC_METHOD(void, SBDebugger, Destroy,
-                              (lldb::SBDebugger &));
+  LLDB_REGISTER_STATIC_METHOD(void, SBDebugger, Destroy, (lldb::SBDebugger &));
   LLDB_REGISTER_STATIC_METHOD(void, SBDebugger, MemoryPressureDetected, ());
   LLDB_REGISTER_METHOD_CONST(bool, SBDebugger, IsValid, ());
-  LLDB_REGISTER_METHOD_CONST(bool, SBDebugger, operator bool, ());
+  LLDB_REGISTER_METHOD_CONST(bool, SBDebugger, operator bool,());
   LLDB_REGISTER_METHOD(void, SBDebugger, SetAsync, (bool));
   LLDB_REGISTER_METHOD(bool, SBDebugger, GetAsync, ());
   LLDB_REGISTER_METHOD(void, SBDebugger, SkipLLDBInitFiles, (bool));
@@ -1605,6 +1691,9 @@
   LLDB_REGISTER_METHOD(FILE *, SBDebugger, GetInputFileHandle, ());
   LLDB_REGISTER_METHOD(FILE *, SBDebugger, GetOutputFileHandle, ());
   LLDB_REGISTER_METHOD(FILE *, SBDebugger, GetErrorFileHandle, ());
+  LLDB_REGISTER_METHOD(SBFile, SBDebugger, GetInputFile, ());
+  LLDB_REGISTER_METHOD(SBFile, SBDebugger, GetOutputFile, ());
+  LLDB_REGISTER_METHOD(SBFile, SBDebugger, GetErrorFile, ());
   LLDB_REGISTER_METHOD(void, SBDebugger, SaveInputTerminalState, ());
   LLDB_REGISTER_METHOD(void, SBDebugger, RestoreInputTerminalState, ());
   LLDB_REGISTER_METHOD(lldb::SBCommandInterpreter, SBDebugger,
@@ -1614,8 +1703,13 @@
   LLDB_REGISTER_METHOD(
       void, SBDebugger, HandleProcessEvent,
       (const lldb::SBProcess &, const lldb::SBEvent &, FILE *, FILE *));
-  LLDB_REGISTER_METHOD(lldb::SBSourceManager, SBDebugger, GetSourceManager,
-                       ());
+  LLDB_REGISTER_METHOD(
+      void, SBDebugger, HandleProcessEvent,
+      (const lldb::SBProcess &, const lldb::SBEvent &, SBFile, SBFile));
+  LLDB_REGISTER_METHOD(
+      void, SBDebugger, HandleProcessEvent,
+      (const lldb::SBProcess &, const lldb::SBEvent &, FileSP, FileSP));
+  LLDB_REGISTER_METHOD(lldb::SBSourceManager, SBDebugger, GetSourceManager, ());
   LLDB_REGISTER_STATIC_METHOD(bool, SBDebugger, SetDefaultArchitecture,
                               (const char *));
   LLDB_REGISTER_METHOD(lldb::ScriptLanguage, SBDebugger, GetScriptingLanguage,
@@ -1635,8 +1729,7 @@
   LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger,
                        CreateTargetWithFileAndTargetTriple,
                        (const char *, const char *));
-  LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger,
-                       CreateTargetWithFileAndArch,
+  LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, CreateTargetWithFileAndArch,
                        (const char *, const char *));
   LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, CreateTarget,
                        (const char *));
@@ -1652,8 +1745,7 @@
                        (const char *, const char *));
   LLDB_REGISTER_METHOD(uint32_t, SBDebugger, GetNumTargets, ());
   LLDB_REGISTER_METHOD(lldb::SBTarget, SBDebugger, GetSelectedTarget, ());
-  LLDB_REGISTER_METHOD(void, SBDebugger, SetSelectedTarget,
-                       (lldb::SBTarget &));
+  LLDB_REGISTER_METHOD(void, SBDebugger, SetSelectedTarget, (lldb::SBTarget &));
   LLDB_REGISTER_METHOD(lldb::SBPlatform, SBDebugger, GetSelectedPlatform, ());
   LLDB_REGISTER_METHOD(void, SBDebugger, SetSelectedPlatform,
                        (lldb::SBPlatform &));
@@ -1673,8 +1765,8 @@
                         int &, bool &, bool &));
   LLDB_REGISTER_METHOD(lldb::SBError, SBDebugger, RunREPL,
                        (lldb::LanguageType, const char *));
-  LLDB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger,
-                              FindDebuggerWithID, (int));
+  LLDB_REGISTER_STATIC_METHOD(lldb::SBDebugger, SBDebugger, FindDebuggerWithID,
+                              (int));
   LLDB_REGISTER_METHOD(const char *, SBDebugger, GetInstanceName, ());
   LLDB_REGISTER_STATIC_METHOD(lldb::SBError, SBDebugger, SetInternalVariable,
                               (const char *, const char *, const char *));
@@ -1726,5 +1818,5 @@
                        (const char *, const char **));
 }
 
-}
-}
+} // namespace repro
+} // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/API/SBDeclaration.cpp b/src/llvm-project/lldb/source/API/SBDeclaration.cpp
index a7790b2..50db177 100644
--- a/src/llvm-project/lldb/source/API/SBDeclaration.cpp
+++ b/src/llvm-project/lldb/source/API/SBDeclaration.cpp
@@ -32,7 +32,7 @@
 SBDeclaration::SBDeclaration(const lldb_private::Declaration *lldb_object_ptr)
     : m_opaque_up() {
   if (lldb_object_ptr)
-    m_opaque_up = llvm::make_unique<Declaration>(*lldb_object_ptr);
+    m_opaque_up = std::make_unique<Declaration>(*lldb_object_ptr);
 }
 
 const SBDeclaration &SBDeclaration::operator=(const SBDeclaration &rhs) {
diff --git a/src/llvm-project/lldb/source/API/SBEvent.cpp b/src/llvm-project/lldb/source/API/SBEvent.cpp
index 75ca283..fb2ad10 100644
--- a/src/llvm-project/lldb/source/API/SBEvent.cpp
+++ b/src/llvm-project/lldb/source/API/SBEvent.cpp
@@ -175,7 +175,7 @@
   LLDB_RECORD_STATIC_METHOD(const char *, SBEvent, GetCStringFromEvent,
                             (const lldb::SBEvent &), event);
 
-  return reinterpret_cast<const char *>(
+  return static_cast<const char *>(
       EventDataBytes::GetBytesFromEvent(event.get()));
 }
 
diff --git a/src/llvm-project/lldb/source/API/SBFile.cpp b/src/llvm-project/lldb/source/API/SBFile.cpp
new file mode 100644
index 0000000..277402f
--- /dev/null
+++ b/src/llvm-project/lldb/source/API/SBFile.cpp
@@ -0,0 +1,132 @@
+//===-- SBFile.cpp ------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/API/SBFile.h"
+#include "SBReproducerPrivate.h"
+#include "lldb/API/SBError.h"
+#include "lldb/Host/File.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+SBFile::~SBFile() {}
+
+SBFile::SBFile(FileSP file_sp) : m_opaque_sp(file_sp) {
+  LLDB_RECORD_DUMMY(void, SBfile, SBFile, (FileSP), file_sp);
+}
+
+SBFile::SBFile() { LLDB_RECORD_CONSTRUCTOR_NO_ARGS(SBFile); }
+
+SBFile::SBFile(FILE *file, bool transfer_ownership) {
+  LLDB_RECORD_DUMMY(void, SBFile, (FILE *, bool), file, transfer_ownership);
+  m_opaque_sp = std::make_shared<NativeFile>(file, transfer_ownership);
+}
+
+SBFile::SBFile(int fd, const char *mode, bool transfer_owndership) {
+  LLDB_RECORD_DUMMY(void, SBFile, (int, const char *, bool), fd, mode,
+                    transfer_owndership);
+  auto options = File::GetOptionsFromMode(mode);
+  if (!options) {
+    llvm::consumeError(options.takeError());
+    return;
+  }
+  m_opaque_sp =
+      std::make_shared<NativeFile>(fd, options.get(), transfer_owndership);
+}
+
+SBError SBFile::Read(uint8_t *buf, size_t num_bytes, size_t *bytes_read) {
+  LLDB_RECORD_DUMMY(lldb::SBError, SBFile, Read, (uint8_t *, size_t, size_t *),
+                    buf, num_bytes, bytes_read);
+  SBError error;
+  if (!m_opaque_sp) {
+    error.SetErrorString("invalid SBFile");
+    *bytes_read = 0;
+  } else {
+    Status status = m_opaque_sp->Read(buf, num_bytes);
+    error.SetError(status);
+    *bytes_read = num_bytes;
+  }
+  return LLDB_RECORD_RESULT(error);
+}
+
+SBError SBFile::Write(const uint8_t *buf, size_t num_bytes,
+                      size_t *bytes_written) {
+  LLDB_RECORD_DUMMY(lldb::SBError, SBFile, Write,
+                    (const uint8_t *, size_t, size_t *), buf, num_bytes,
+                    bytes_written);
+  SBError error;
+  if (!m_opaque_sp) {
+    error.SetErrorString("invalid SBFile");
+    *bytes_written = 0;
+  } else {
+    Status status = m_opaque_sp->Write(buf, num_bytes);
+    error.SetError(status);
+    *bytes_written = num_bytes;
+  }
+  return LLDB_RECORD_RESULT(error);
+}
+
+SBError SBFile::Flush() {
+  LLDB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBFile, Flush);
+  SBError error;
+  if (!m_opaque_sp) {
+    error.SetErrorString("invalid SBFile");
+  } else {
+    Status status = m_opaque_sp->Flush();
+    error.SetError(status);
+  }
+  return LLDB_RECORD_RESULT(error);
+}
+
+bool SBFile::IsValid() const {
+  LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFile, IsValid);
+  return m_opaque_sp && m_opaque_sp->IsValid();
+}
+
+SBError SBFile::Close() {
+  LLDB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBFile, Close);
+  SBError error;
+  if (m_opaque_sp) {
+    Status status = m_opaque_sp->Close();
+    error.SetError(status);
+  }
+  return LLDB_RECORD_RESULT(error);
+}
+
+SBFile::operator bool() const {
+  LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFile, operator bool);
+  return IsValid();
+}
+
+bool SBFile::operator!() const {
+  LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFile, operator!);
+  return !IsValid();
+}
+
+FileSP SBFile::GetFile() const {
+  LLDB_RECORD_METHOD_CONST_NO_ARGS(FileSP, SBFile, GetFile);
+  return LLDB_RECORD_RESULT(m_opaque_sp);
+}
+
+namespace lldb_private {
+namespace repro {
+
+template <> void RegisterMethods<SBFile>(Registry &R) {
+  LLDB_REGISTER_CONSTRUCTOR(SBFile, ());
+  LLDB_REGISTER_CONSTRUCTOR(SBFile, (FileSP));
+  LLDB_REGISTER_CONSTRUCTOR(SBFile, (FILE *, bool));
+  LLDB_REGISTER_CONSTRUCTOR(SBFile, (int, const char *, bool));
+  LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Flush, ());
+  LLDB_REGISTER_METHOD_CONST(bool, SBFile, IsValid, ());
+  LLDB_REGISTER_METHOD_CONST(bool, SBFile, operator bool,());
+  LLDB_REGISTER_METHOD_CONST(bool, SBFile, operator!,());
+  LLDB_REGISTER_METHOD_CONST(FileSP, SBFile, GetFile, ());
+  LLDB_REGISTER_METHOD(lldb::SBError, SBFile, Close, ());
+}
+} // namespace repro
+} // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/API/SBFileSpec.cpp b/src/llvm-project/lldb/source/API/SBFileSpec.cpp
index 2f910b9..2e7eba4 100644
--- a/src/llvm-project/lldb/source/API/SBFileSpec.cpp
+++ b/src/llvm-project/lldb/source/API/SBFileSpec.cpp
@@ -143,7 +143,7 @@
 }
 
 uint32_t SBFileSpec::GetPath(char *dst_path, size_t dst_len) const {
-  LLDB_RECORD_METHOD_CONST(uint32_t, SBFileSpec, GetPath, (char *, size_t),
+  LLDB_RECORD_DUMMY(uint32_t, SBFileSpec, GetPath, (char *, size_t),
                            dst_path, dst_len);
 
   uint32_t result = m_opaque_up->GetPath(dst_path, dst_len);
diff --git a/src/llvm-project/lldb/source/API/SBFrame.cpp b/src/llvm-project/lldb/source/API/SBFrame.cpp
index 9268f0f..af42be9 100644
--- a/src/llvm-project/lldb/source/API/SBFrame.cpp
+++ b/src/llvm-project/lldb/source/API/SBFrame.cpp
@@ -831,14 +831,12 @@
     if (stop_locker.TryLock(&process->GetRunLock())) {
       frame = exe_ctx.GetFramePtr();
       if (frame) {
-        size_t i;
         VariableList *variable_list = nullptr;
         variable_list = frame->GetVariableList(true);
         if (variable_list) {
           const size_t num_variables = variable_list->GetSize();
           if (num_variables) {
-            for (i = 0; i < num_variables; ++i) {
-              VariableSP variable_sp(variable_list->GetVariableAtIndex(i));
+            for (const VariableSP &variable_sp : *variable_list) {
               if (variable_sp) {
                 bool add_variable = false;
                 switch (variable_sp->GetScope()) {
@@ -1107,7 +1105,7 @@
         if (target->GetDisplayExpressionsInCrashlogs()) {
           StreamString frame_description;
           frame->DumpUsingSettingsFormat(&frame_description);
-          stack_trace = llvm::make_unique<llvm::PrettyStackTraceFormat>(
+          stack_trace = std::make_unique<llvm::PrettyStackTraceFormat>(
               "SBFrame::EvaluateExpression (expr = \"%s\", fetch_dynamic_value "
               "= %u) %s",
               expr, options.GetFetchDynamicValue(),
@@ -1120,10 +1118,10 @@
     }
   }
 
-  if (expr_log)
-    expr_log->Printf("** [SBFrame::EvaluateExpression] Expression result is "
-                     "%s, summary %s **",
-                     expr_result.GetValue(), expr_result.GetSummary());
+  LLDB_LOGF(expr_log,
+            "** [SBFrame::EvaluateExpression] Expression result is "
+            "%s, summary %s **",
+            expr_result.GetValue(), expr_result.GetSummary());
 
   return LLDB_RECORD_RESULT(expr_result);
 }
diff --git a/src/llvm-project/lldb/source/API/SBHostOS.cpp b/src/llvm-project/lldb/source/API/SBHostOS.cpp
index c3c92e6..6ac8717 100644
--- a/src/llvm-project/lldb/source/API/SBHostOS.cpp
+++ b/src/llvm-project/lldb/source/API/SBHostOS.cpp
@@ -6,9 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/API/SBHostOS.h"
 #include "SBReproducerPrivate.h"
 #include "lldb/API/SBError.h"
-#include "lldb/API/SBHostOS.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Host/HostInfo.h"
@@ -18,7 +19,7 @@
 #include "lldb/Utility/FileSpec.h"
 
 #include "Plugins/ExpressionParser/Clang/ClangHost.h"
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
 #include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h"
 #endif
 
@@ -60,7 +61,7 @@
     fspec = HostInfo::GetHeaderDir();
     break;
   case ePathTypePythonDir:
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
     fspec = ScriptInterpreterPython::GetPythonDir();
 #endif
     break;
diff --git a/src/llvm-project/lldb/source/API/SBInstruction.cpp b/src/llvm-project/lldb/source/API/SBInstruction.cpp
index fcf66fd..a9ef9fb 100644
--- a/src/llvm-project/lldb/source/API/SBInstruction.cpp
+++ b/src/llvm-project/lldb/source/API/SBInstruction.cpp
@@ -11,6 +11,7 @@
 
 #include "lldb/API/SBAddress.h"
 #include "lldb/API/SBFrame.h"
+#include "lldb/API/SBFile.h"
 
 #include "lldb/API/SBInstruction.h"
 #include "lldb/API/SBStream.h"
@@ -255,10 +256,21 @@
   return false;
 }
 
-void SBInstruction::Print(FILE *out) {
-  LLDB_RECORD_METHOD(void, SBInstruction, Print, (FILE *), out);
+void SBInstruction::Print(FILE *outp) {
+  LLDB_RECORD_METHOD(void, SBInstruction, Print, (FILE *), outp);
+  FileSP out = std::make_shared<NativeFile>(outp, /*take_ownership=*/false);
+  Print(out);
+}
 
-  if (out == nullptr)
+void SBInstruction::Print(SBFile out) {
+  LLDB_RECORD_METHOD(void, SBInstruction, Print, (SBFile), out);
+  Print(out.m_opaque_sp);
+}
+
+void SBInstruction::Print(FileSP out_sp) {
+  LLDB_RECORD_METHOD(void, SBInstruction, Print, (FileSP), out_sp);
+
+  if (!out_sp || !out_sp->IsValid())
     return;
 
   lldb::InstructionSP inst_sp(GetOpaque());
@@ -269,7 +281,7 @@
     if (module_sp)
       module_sp->ResolveSymbolContextForAddress(addr, eSymbolContextEverything,
                                                 sc);
-    StreamFile out_stream(out, false);
+    StreamFile out_stream(out_sp);
     FormatEntity::Entry format;
     FormatEntity::Parse("${addr}: ", format);
     inst_sp->Dump(&out_stream, 0, true, false, nullptr, &sc, nullptr, &format,
@@ -358,6 +370,8 @@
   LLDB_REGISTER_METHOD(bool, SBInstruction, GetDescription,
                        (lldb::SBStream &));
   LLDB_REGISTER_METHOD(void, SBInstruction, Print, (FILE *));
+  LLDB_REGISTER_METHOD(void, SBInstruction, Print, (SBFile));
+  LLDB_REGISTER_METHOD(void, SBInstruction, Print, (FileSP));
   LLDB_REGISTER_METHOD(bool, SBInstruction, EmulateWithFrame,
                        (lldb::SBFrame &, uint32_t));
   LLDB_REGISTER_METHOD(bool, SBInstruction, DumpEmulation, (const char *));
diff --git a/src/llvm-project/lldb/source/API/SBInstructionList.cpp b/src/llvm-project/lldb/source/API/SBInstructionList.cpp
index cce923b..8b3855c 100644
--- a/src/llvm-project/lldb/source/API/SBInstructionList.cpp
+++ b/src/llvm-project/lldb/source/API/SBInstructionList.cpp
@@ -11,8 +11,10 @@
 #include "lldb/API/SBAddress.h"
 #include "lldb/API/SBInstruction.h"
 #include "lldb/API/SBStream.h"
+#include "lldb/API/SBFile.h"
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/Module.h"
+#include "lldb/Core/StreamFile.h"
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Utility/Stream.h"
 
@@ -118,21 +120,41 @@
 
 void SBInstructionList::Print(FILE *out) {
   LLDB_RECORD_METHOD(void, SBInstructionList, Print, (FILE *), out);
-
   if (out == nullptr)
     return;
+  StreamFile stream(out, false);
+  GetDescription(stream);
 }
 
-bool SBInstructionList::GetDescription(lldb::SBStream &description) {
+void SBInstructionList::Print(SBFile out) {
+  LLDB_RECORD_METHOD(void, SBInstructionList, Print, (SBFile), out);
+  if (!out.IsValid())
+    return;
+  StreamFile stream(out.m_opaque_sp);
+  GetDescription(stream);
+}
+
+void SBInstructionList::Print(FileSP out_sp) {
+  LLDB_RECORD_METHOD(void, SBInstructionList, Print, (FileSP), out_sp);
+  if (!out_sp || !out_sp->IsValid())
+    return;
+  StreamFile stream(out_sp);
+  GetDescription(stream);
+}
+
+bool SBInstructionList::GetDescription(lldb::SBStream &stream) {
   LLDB_RECORD_METHOD(bool, SBInstructionList, GetDescription,
-                     (lldb::SBStream &), description);
+                     (lldb::SBStream &), stream);
+  return GetDescription(stream.ref());
+}
+
+bool SBInstructionList::GetDescription(Stream &sref) {
 
   if (m_opaque_sp) {
     size_t num_instructions = GetSize();
     if (num_instructions) {
       // Call the ref() to make sure a stream is created if one deesn't exist
       // already inside description...
-      Stream &sref = description.ref();
       const uint32_t max_opcode_byte_size =
           m_opaque_sp->GetInstructionList().GetMaxOpcocdeByteSize();
       FormatEntity::Entry format;
@@ -200,6 +222,8 @@
   LLDB_REGISTER_METHOD(void, SBInstructionList, AppendInstruction,
                        (lldb::SBInstruction));
   LLDB_REGISTER_METHOD(void, SBInstructionList, Print, (FILE *));
+  LLDB_REGISTER_METHOD(void, SBInstructionList, Print, (SBFile));
+  LLDB_REGISTER_METHOD(void, SBInstructionList, Print, (FileSP));
   LLDB_REGISTER_METHOD(bool, SBInstructionList, GetDescription,
                        (lldb::SBStream &));
   LLDB_REGISTER_METHOD(bool, SBInstructionList,
diff --git a/src/llvm-project/lldb/source/API/SBLineEntry.cpp b/src/llvm-project/lldb/source/API/SBLineEntry.cpp
index 010a605..66884f7 100644
--- a/src/llvm-project/lldb/source/API/SBLineEntry.cpp
+++ b/src/llvm-project/lldb/source/API/SBLineEntry.cpp
@@ -32,7 +32,7 @@
 SBLineEntry::SBLineEntry(const lldb_private::LineEntry *lldb_object_ptr)
     : m_opaque_up() {
   if (lldb_object_ptr)
-    m_opaque_up = llvm::make_unique<LineEntry>(*lldb_object_ptr);
+    m_opaque_up = std::make_unique<LineEntry>(*lldb_object_ptr);
 }
 
 const SBLineEntry &SBLineEntry::operator=(const SBLineEntry &rhs) {
@@ -45,7 +45,7 @@
 }
 
 void SBLineEntry::SetLineEntry(const lldb_private::LineEntry &lldb_object_ref) {
-  m_opaque_up = llvm::make_unique<LineEntry>(lldb_object_ref);
+  m_opaque_up = std::make_unique<LineEntry>(lldb_object_ref);
 }
 
 SBLineEntry::~SBLineEntry() {}
diff --git a/src/llvm-project/lldb/source/API/SBModule.cpp b/src/llvm-project/lldb/source/API/SBModule.cpp
index 4bd32bc..4e9dfb0 100644
--- a/src/llvm-project/lldb/source/API/SBModule.cpp
+++ b/src/llvm-project/lldb/source/API/SBModule.cpp
@@ -20,7 +20,6 @@
 #include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/Symtab.h"
 #include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Symbol/VariableList.h"
@@ -246,7 +245,7 @@
 
   ModuleSP module_sp(GetSP());
   if (module_sp) {
-    module_sp->GetDescription(&strm);
+    module_sp->GetDescription(strm.AsRawOstream());
   } else
     strm.PutCString("No value");
 
@@ -283,18 +282,14 @@
   SBSymbolContextList sb_sc_list;
   const ModuleSP module_sp(GetSP());
   if (sb_file_spec.IsValid() && module_sp) {
-    const bool append = true;
-    module_sp->FindCompileUnits(*sb_file_spec, append, *sb_sc_list);
+    module_sp->FindCompileUnits(*sb_file_spec, *sb_sc_list);
   }
   return LLDB_RECORD_RESULT(sb_sc_list);
 }
 
 static Symtab *GetUnifiedSymbolTable(const lldb::ModuleSP &module_sp) {
-  if (module_sp) {
-    SymbolVendor *symbols = module_sp->GetSymbolVendor();
-    if (symbols)
-      return symbols->GetSymtab();
-  }
+  if (module_sp)
+    return module_sp->GetSymtab();
   return nullptr;
 }
 
@@ -302,11 +297,8 @@
   LLDB_RECORD_METHOD_NO_ARGS(size_t, SBModule, GetNumSymbols);
 
   ModuleSP module_sp(GetSP());
-  if (module_sp) {
-    Symtab *symtab = GetUnifiedSymbolTable(module_sp);
-    if (symtab)
-      return symtab->GetNumSymbols();
-  }
+  if (Symtab *symtab = GetUnifiedSymbolTable(module_sp))
+    return symtab->GetNumSymbols();
   return 0;
 }
 
@@ -349,8 +341,9 @@
     Symtab *symtab = GetUnifiedSymbolTable(module_sp);
     if (symtab) {
       std::vector<uint32_t> matching_symbol_indexes;
-      const size_t num_matches = symtab->FindAllSymbolsWithNameAndType(
-          ConstString(name), symbol_type, matching_symbol_indexes);
+      symtab->FindAllSymbolsWithNameAndType(ConstString(name), symbol_type,
+                                            matching_symbol_indexes);
+      const size_t num_matches = matching_symbol_indexes.size();
       if (num_matches) {
         SymbolContext sc;
         sc.module_sp = module_sp;
@@ -372,7 +365,7 @@
   ModuleSP module_sp(GetSP());
   if (module_sp) {
     // Give the symbol vendor a chance to add to the unified section list.
-    module_sp->GetSymbolVendor();
+    module_sp->GetSymbolFile();
     SectionList *section_list = module_sp->GetSectionList();
     if (section_list)
       return section_list->GetSize();
@@ -388,7 +381,7 @@
   ModuleSP module_sp(GetSP());
   if (module_sp) {
     // Give the symbol vendor a chance to add to the unified section list.
-    module_sp->GetSymbolVendor();
+    module_sp->GetSymbolFile();
     SectionList *section_list = module_sp->GetSectionList();
 
     if (section_list)
@@ -405,12 +398,11 @@
   lldb::SBSymbolContextList sb_sc_list;
   ModuleSP module_sp(GetSP());
   if (name && module_sp) {
-    const bool append = true;
     const bool symbols_ok = true;
     const bool inlines_ok = true;
     FunctionNameType type = static_cast<FunctionNameType>(name_type_mask);
     module_sp->FindFunctions(ConstString(name), nullptr, type, symbols_ok,
-                             inlines_ok, append, *sb_sc_list);
+                             inlines_ok, *sb_sc_list);
   }
   return LLDB_RECORD_RESULT(sb_sc_list);
 }
@@ -425,18 +417,14 @@
   ModuleSP module_sp(GetSP());
   if (name && module_sp) {
     VariableList variable_list;
-    const uint32_t match_count = module_sp->FindGlobalVariables(
-        ConstString(name), nullptr, max_matches, variable_list);
-
-    if (match_count > 0) {
-      for (uint32_t i = 0; i < match_count; ++i) {
-        lldb::ValueObjectSP valobj_sp;
-        TargetSP target_sp(target.GetSP());
-        valobj_sp = ValueObjectVariable::Create(
-            target_sp.get(), variable_list.GetVariableAtIndex(i));
-        if (valobj_sp)
-          sb_value_list.Append(SBValue(valobj_sp));
-      }
+    module_sp->FindGlobalVariables(ConstString(name), nullptr, max_matches,
+                                   variable_list);
+    for (const VariableSP &var_sp : variable_list) {
+      lldb::ValueObjectSP valobj_sp;
+      TargetSP target_sp(target.GetSP());
+      valobj_sp = ValueObjectVariable::Create(target_sp.get(), var_sp);
+      if (valobj_sp)
+        sb_value_list.Append(SBValue(valobj_sp));
     }
   }
 
@@ -468,10 +456,13 @@
     sb_type = SBType(module_sp->FindFirstType(sc, name, exact_match));
 
     if (!sb_type.IsValid()) {
-      TypeSystem *type_system =
+      auto type_system_or_err =
           module_sp->GetTypeSystemForLanguage(eLanguageTypeC);
-      if (type_system)
-        sb_type = SBType(type_system->GetBuiltinTypeByName(name));
+      if (auto err = type_system_or_err.takeError()) {
+        llvm::consumeError(std::move(err));
+        return LLDB_RECORD_RESULT(SBType());
+      }
+      sb_type = SBType(type_system_or_err->GetBuiltinTypeByName(name));
     }
   }
   return LLDB_RECORD_RESULT(sb_type);
@@ -483,10 +474,14 @@
 
   ModuleSP module_sp(GetSP());
   if (module_sp) {
-    TypeSystem *type_system =
+    auto type_system_or_err =
         module_sp->GetTypeSystemForLanguage(eLanguageTypeC);
-    if (type_system)
-      return LLDB_RECORD_RESULT(SBType(type_system->GetBasicTypeFromAST(type)));
+    if (auto err = type_system_or_err.takeError()) {
+      llvm::consumeError(std::move(err));
+    } else {
+      return LLDB_RECORD_RESULT(
+          SBType(type_system_or_err->GetBasicTypeFromAST(type)));
+    }
   }
   return LLDB_RECORD_RESULT(SBType());
 }
@@ -503,26 +498,28 @@
     const bool exact_match = false;
     ConstString name(type);
     llvm::DenseSet<SymbolFile *> searched_symbol_files;
-    const uint32_t num_matches = module_sp->FindTypes(
-        name, exact_match, UINT32_MAX, searched_symbol_files, type_list);
+    module_sp->FindTypes(name, exact_match, UINT32_MAX, searched_symbol_files,
+                         type_list);
 
-    if (num_matches > 0) {
-      for (size_t idx = 0; idx < num_matches; idx++) {
+    if (type_list.Empty()) {
+      auto type_system_or_err =
+          module_sp->GetTypeSystemForLanguage(eLanguageTypeC);
+      if (auto err = type_system_or_err.takeError()) {
+        llvm::consumeError(std::move(err));
+      } else {
+        CompilerType compiler_type =
+            type_system_or_err->GetBuiltinTypeByName(name);
+        if (compiler_type)
+          retval.Append(SBType(compiler_type));
+      }
+    } else {
+      for (size_t idx = 0; idx < type_list.GetSize(); idx++) {
         TypeSP type_sp(type_list.GetTypeAtIndex(idx));
         if (type_sp)
           retval.Append(SBType(type_sp));
       }
-    } else {
-      TypeSystem *type_system =
-          module_sp->GetTypeSystemForLanguage(eLanguageTypeC);
-      if (type_system) {
-        CompilerType compiler_type = type_system->GetBuiltinTypeByName(name);
-        if (compiler_type)
-          retval.Append(SBType(compiler_type));
-      }
     }
   }
-
   return LLDB_RECORD_RESULT(retval);
 }
 
@@ -532,9 +529,8 @@
 
   ModuleSP module_sp(GetSP());
   if (module_sp) {
-    SymbolVendor *vendor = module_sp->GetSymbolVendor();
-    if (vendor) {
-      Type *type_ptr = vendor->ResolveTypeUID(uid);
+    if (SymbolFile *symfile = module_sp->GetSymbolFile()) {
+      Type *type_ptr = symfile->ResolveTypeUID(uid);
       if (type_ptr)
         return LLDB_RECORD_RESULT(SBType(type_ptr->shared_from_this()));
     }
@@ -551,13 +547,13 @@
   ModuleSP module_sp(GetSP());
   if (!module_sp)
     return LLDB_RECORD_RESULT(sb_type_list);
-  SymbolVendor *vendor = module_sp->GetSymbolVendor();
-  if (!vendor)
+  SymbolFile *symfile = module_sp->GetSymbolFile();
+  if (!symfile)
     return LLDB_RECORD_RESULT(sb_type_list);
 
   TypeClass type_class = static_cast<TypeClass>(type_mask);
   TypeList type_list;
-  vendor->GetTypes(nullptr, type_class, type_list);
+  symfile->GetTypes(nullptr, type_class, type_list);
   sb_type_list.m_opaque_up->Append(type_list);
   return LLDB_RECORD_RESULT(sb_type_list);
 }
@@ -571,7 +567,7 @@
   ModuleSP module_sp(GetSP());
   if (sect_name && module_sp) {
     // Give the symbol vendor a chance to add to the unified section list.
-    module_sp->GetSymbolVendor();
+    module_sp->GetSymbolFile();
     SectionList *section_list = module_sp->GetSectionList();
     if (section_list) {
       ConstString const_sect_name(sect_name);
@@ -653,9 +649,8 @@
   lldb::SBFileSpec sb_file_spec;
   ModuleSP module_sp(GetSP());
   if (module_sp) {
-    SymbolVendor *symbol_vendor_ptr = module_sp->GetSymbolVendor();
-    if (symbol_vendor_ptr)
-      sb_file_spec.SetFileSpec(symbol_vendor_ptr->GetMainFileSpec());
+    if (SymbolFile *symfile = module_sp->GetSymbolFile())
+      sb_file_spec.SetFileSpec(symfile->GetObjectFile()->GetFileSpec());
   }
   return LLDB_RECORD_RESULT(sb_file_spec);
 }
diff --git a/src/llvm-project/lldb/source/API/SBProcess.cpp b/src/llvm-project/lldb/source/API/SBProcess.cpp
index 4226ff7..45aaa0b 100644
--- a/src/llvm-project/lldb/source/API/SBProcess.cpp
+++ b/src/llvm-project/lldb/source/API/SBProcess.cpp
@@ -29,11 +29,11 @@
 #include "lldb/Utility/State.h"
 #include "lldb/Utility/Stream.h"
 
-
 #include "lldb/API/SBBroadcaster.h"
 #include "lldb/API/SBCommandReturnObject.h"
 #include "lldb/API/SBDebugger.h"
 #include "lldb/API/SBEvent.h"
+#include "lldb/API/SBFile.h"
 #include "lldb/API/SBFileSpec.h"
 #include "lldb/API/SBMemoryRegionInfo.h"
 #include "lldb/API/SBMemoryRegionInfoList.h"
@@ -331,23 +331,34 @@
   return LLDB_RECORD_RESULT(trace_instance);
 }
 
+void SBProcess::ReportEventState(const SBEvent &event, SBFile out) const {
+  LLDB_RECORD_METHOD_CONST(void, SBProcess, ReportEventState,
+                           (const SBEvent &, SBFile), event, out);
+
+  return ReportEventState(event, out.m_opaque_sp);
+}
+
 void SBProcess::ReportEventState(const SBEvent &event, FILE *out) const {
   LLDB_RECORD_METHOD_CONST(void, SBProcess, ReportEventState,
                            (const lldb::SBEvent &, FILE *), event, out);
+  FileSP outfile = std::make_shared<NativeFile>(out, false);
+  return ReportEventState(event, outfile);
+}
 
-  if (out == nullptr)
+void SBProcess::ReportEventState(const SBEvent &event, FileSP out) const {
+
+  LLDB_RECORD_METHOD_CONST(void, SBProcess, ReportEventState,
+                           (const SBEvent &, FileSP), event, out);
+
+  if (!out || !out->IsValid())
     return;
 
   ProcessSP process_sp(GetSP());
   if (process_sp) {
+    StreamFile stream(out);
     const StateType event_state = SBProcess::GetStateFromEvent(event);
-    char message[1024];
-    int message_len = ::snprintf(
-        message, sizeof(message), "Process %" PRIu64 " %s\n",
+    stream.Printf("Process %" PRIu64 " %s\n",
         process_sp->GetID(), SBDebugger::StateAsCString(event_state));
-
-    if (message_len > 0)
-      ::fwrite(message, 1, message_len, out);
   }
 }
 
@@ -1180,6 +1191,9 @@
   if (!process_sp)
     return false;
 
+  std::lock_guard<std::recursive_mutex> guard(
+      process_sp->GetTarget().GetAPIMutex());
+
   InstrumentationRuntimeSP runtime_sp =
       process_sp->GetInstrumentationRuntime(type);
 
@@ -1307,6 +1321,10 @@
                        (lldb::SBTraceOptions &, lldb::SBError &));
   LLDB_REGISTER_METHOD_CONST(void, SBProcess, ReportEventState,
                              (const lldb::SBEvent &, FILE *));
+  LLDB_REGISTER_METHOD_CONST(void, SBProcess, ReportEventState,
+                             (const lldb::SBEvent &, FileSP));
+  LLDB_REGISTER_METHOD_CONST(void, SBProcess, ReportEventState,
+                             (const lldb::SBEvent &, SBFile));
   LLDB_REGISTER_METHOD(
       void, SBProcess, AppendEventStateReport,
       (const lldb::SBEvent &, lldb::SBCommandReturnObject &));
diff --git a/src/llvm-project/lldb/source/API/SBReproducer.cpp b/src/llvm-project/lldb/source/API/SBReproducer.cpp
index 439ee5a..3d2de07 100644
--- a/src/llvm-project/lldb/source/API/SBReproducer.cpp
+++ b/src/llvm-project/lldb/source/API/SBReproducer.cpp
@@ -22,15 +22,15 @@
 #include "lldb/API/SBFileSpec.h"
 #include "lldb/API/SBHostOS.h"
 #include "lldb/API/SBReproducer.h"
-
 #include "lldb/Host/FileSystem.h"
+#include "lldb/lldb-private.h"
 
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_private::repro;
 
 SBRegistry::SBRegistry() {
-  Registry& R = *this;
+  Registry &R = *this;
 
   RegisterMethods<SBAddress>(R);
   RegisterMethods<SBAttachInfo>(R);
@@ -52,6 +52,7 @@
   RegisterMethods<SBEvent>(R);
   RegisterMethods<SBExecutionContext>(R);
   RegisterMethods<SBExpressionOptions>(R);
+  RegisterMethods<SBFile>(R);
   RegisterMethods<SBFileSpec>(R);
   RegisterMethods<SBFileSpecList>(R);
   RegisterMethods<SBFrame>(R);
@@ -124,6 +125,10 @@
 }
 
 const char *SBReproducer::Replay(const char *path) {
+  return SBReproducer::Replay(path, false);
+}
+
+const char *SBReproducer::Replay(const char *path, bool skip_version_check) {
   static std::string error;
   if (auto e = Reproducer::Initialize(ReproducerMode::Replay, FileSpec(path))) {
     error = llvm::toString(std::move(e));
@@ -136,6 +141,22 @@
     return error.c_str();
   }
 
+  if (!skip_version_check) {
+    llvm::Expected<std::string> version = loader->LoadBuffer<VersionProvider>();
+    if (!version) {
+      error = llvm::toString(version.takeError());
+      return error.c_str();
+    }
+    if (lldb_private::GetVersion() != llvm::StringRef(*version).rtrim()) {
+      error = "reproducer capture and replay version don't match:\n";
+      error.append("reproducer captured with:\n");
+      error.append(*version);
+      error.append("reproducer replayed with:\n");
+      error.append(lldb_private::GetVersion());
+      return error.c_str();
+    }
+  }
+
   FileSpec file = loader->GetFile<SBProvider::Info>();
   if (!file) {
     error = "unable to get replay data from reproducer.";
@@ -148,6 +169,22 @@
   return nullptr;
 }
 
+bool SBReproducer::Generate() {
+  auto &r = Reproducer::Instance();
+  if (auto generator = r.GetGenerator()) {
+    generator->Keep();
+    return true;
+  }
+  return false;
+}
+
+const char *SBReproducer::GetPath() {
+  static std::string path;
+  auto &r = Reproducer::Instance();
+  path = r.GetReproducerPath().GetCString();
+  return path.c_str();
+}
+
 char lldb_private::repro::SBProvider::ID = 0;
 const char *SBProvider::Info::name = "sbapi";
 const char *SBProvider::Info::file = "sbapi.bin";
diff --git a/src/llvm-project/lldb/source/API/SBReproducerPrivate.h b/src/llvm-project/lldb/source/API/SBReproducerPrivate.h
index 84b6ce9..edd0694 100644
--- a/src/llvm-project/lldb/source/API/SBReproducerPrivate.h
+++ b/src/llvm-project/lldb/source/API/SBReproducerPrivate.h
@@ -40,7 +40,7 @@
   SBProvider(const FileSpec &directory)
       : Provider(directory),
         m_stream(directory.CopyByAppendingPathComponent("sbapi.bin").GetPath(),
-                 m_ec, llvm::sys::fs::OpenFlags::F_None),
+                 m_ec, llvm::sys::fs::OpenFlags::OF_None),
         m_serializer(m_stream) {}
 
   Serializer &GetSerializer() { return m_serializer; }
diff --git a/src/llvm-project/lldb/source/API/SBStream.cpp b/src/llvm-project/lldb/source/API/SBStream.cpp
index ae65233..d57634d 100644
--- a/src/llvm-project/lldb/source/API/SBStream.cpp
+++ b/src/llvm-project/lldb/source/API/SBStream.cpp
@@ -9,6 +9,7 @@
 #include "lldb/API/SBStream.h"
 
 #include "SBReproducerPrivate.h"
+#include "lldb/API/SBFile.h"
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Utility/Status.h"
@@ -82,33 +83,45 @@
     if (!m_is_file)
       local_data = static_cast<StreamString *>(m_opaque_up.get())->GetString();
   }
-  StreamFile *stream_file = new StreamFile;
-  uint32_t open_options = File::eOpenOptionWrite | File::eOpenOptionCanCreate;
+  auto open_options = File::eOpenOptionWrite | File::eOpenOptionCanCreate;
   if (append)
     open_options |= File::eOpenOptionAppend;
   else
     open_options |= File::eOpenOptionTruncate;
 
-  FileSystem::Instance().Open(stream_file->GetFile(), FileSpec(path),
-                              open_options);
-  m_opaque_up.reset(stream_file);
+  llvm::Expected<FileUP> file =
+      FileSystem::Instance().Open(FileSpec(path), open_options);
+  if (!file) {
+    LLDB_LOG_ERROR(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), file.takeError(),
+                   "Cannot open {1}: {0}", path);
+    return;
+  }
 
-  if (m_opaque_up) {
-    m_is_file = true;
+  m_opaque_up = std::make_unique<StreamFile>(std::move(file.get()));
+  m_is_file = true;
 
-    // If we had any data locally in our StreamString, then pass that along to
-    // the to new file we are redirecting to.
-    if (!local_data.empty())
-      m_opaque_up->Write(&local_data[0], local_data.size());
-  } else
-    m_is_file = false;
+  // If we had any data locally in our StreamString, then pass that along to
+  // the to new file we are redirecting to.
+  if (!local_data.empty())
+    m_opaque_up->Write(&local_data[0], local_data.size());
 }
 
 void SBStream::RedirectToFileHandle(FILE *fh, bool transfer_fh_ownership) {
   LLDB_RECORD_METHOD(void, SBStream, RedirectToFileHandle, (FILE *, bool), fh,
                      transfer_fh_ownership);
+  FileSP file = std::make_unique<NativeFile>(fh, transfer_fh_ownership);
+  return RedirectToFile(file);
+}
 
-  if (fh == nullptr)
+void SBStream::RedirectToFile(SBFile file) {
+  LLDB_RECORD_METHOD(void, SBStream, RedirectToFile, (SBFile), file)
+  RedirectToFile(file.GetFile());
+}
+
+void SBStream::RedirectToFile(FileSP file_sp) {
+  LLDB_RECORD_METHOD(void, SBStream, RedirectToFile, (FileSP), file_sp);
+
+  if (!file_sp || !file_sp->IsValid())
     return;
 
   std::string local_data;
@@ -118,17 +131,14 @@
     if (!m_is_file)
       local_data = static_cast<StreamString *>(m_opaque_up.get())->GetString();
   }
-  m_opaque_up.reset(new StreamFile(fh, transfer_fh_ownership));
 
-  if (m_opaque_up) {
-    m_is_file = true;
+  m_opaque_up = std::make_unique<StreamFile>(file_sp);
+  m_is_file = true;
 
-    // If we had any data locally in our StreamString, then pass that along to
-    // the to new file we are redirecting to.
-    if (!local_data.empty())
-      m_opaque_up->Write(&local_data[0], local_data.size());
-  } else
-    m_is_file = false;
+  // If we had any data locally in our StreamString, then pass that along to
+  // the to new file we are redirecting to.
+  if (!local_data.empty())
+    m_opaque_up->Write(&local_data[0], local_data.size());
 }
 
 void SBStream::RedirectToFileDescriptor(int fd, bool transfer_fh_ownership) {
@@ -143,16 +153,13 @@
       local_data = static_cast<StreamString *>(m_opaque_up.get())->GetString();
   }
 
-  m_opaque_up.reset(new StreamFile(::fdopen(fd, "w"), transfer_fh_ownership));
-  if (m_opaque_up) {
-    m_is_file = true;
+  m_opaque_up = std::make_unique<StreamFile>(fd, transfer_fh_ownership);
+  m_is_file = true;
 
-    // If we had any data locally in our StreamString, then pass that along to
-    // the to new file we are redirecting to.
-    if (!local_data.empty())
-      m_opaque_up->Write(&local_data[0], local_data.size());
-  } else
-    m_is_file = false;
+  // If we had any data locally in our StreamString, then pass that along to
+  // the to new file we are redirecting to.
+  if (!local_data.empty())
+    m_opaque_up->Write(&local_data[0], local_data.size());
 }
 
 lldb_private::Stream *SBStream::operator->() { return m_opaque_up.get(); }
@@ -189,6 +196,8 @@
   LLDB_REGISTER_METHOD(const char *, SBStream, GetData, ());
   LLDB_REGISTER_METHOD(size_t, SBStream, GetSize, ());
   LLDB_REGISTER_METHOD(void, SBStream, RedirectToFile, (const char *, bool));
+  LLDB_REGISTER_METHOD(void, SBStream, RedirectToFile, (FileSP));
+  LLDB_REGISTER_METHOD(void, SBStream, RedirectToFile, (SBFile));
   LLDB_REGISTER_METHOD(void, SBStream, RedirectToFileHandle, (FILE *, bool));
   LLDB_REGISTER_METHOD(void, SBStream, RedirectToFileDescriptor, (int, bool));
   LLDB_REGISTER_METHOD(void, SBStream, Clear, ());
diff --git a/src/llvm-project/lldb/source/API/SBStringList.cpp b/src/llvm-project/lldb/source/API/SBStringList.cpp
index 2f8bd55..ac07b8f 100644
--- a/src/llvm-project/lldb/source/API/SBStringList.cpp
+++ b/src/llvm-project/lldb/source/API/SBStringList.cpp
@@ -21,7 +21,7 @@
 SBStringList::SBStringList(const lldb_private::StringList *lldb_strings_ptr)
     : m_opaque_up() {
   if (lldb_strings_ptr)
-    m_opaque_up = llvm::make_unique<StringList>(*lldb_strings_ptr);
+    m_opaque_up = std::make_unique<StringList>(*lldb_strings_ptr);
 }
 
 SBStringList::SBStringList(const SBStringList &rhs) : m_opaque_up() {
diff --git a/src/llvm-project/lldb/source/API/SBSymbolContext.cpp b/src/llvm-project/lldb/source/API/SBSymbolContext.cpp
index 365f0cc..6e01e55 100644
--- a/src/llvm-project/lldb/source/API/SBSymbolContext.cpp
+++ b/src/llvm-project/lldb/source/API/SBSymbolContext.cpp
@@ -27,7 +27,7 @@
                           (const lldb_private::SymbolContext *), sc_ptr);
 
   if (sc_ptr)
-    m_opaque_up = llvm::make_unique<SymbolContext>(*sc_ptr);
+    m_opaque_up = std::make_unique<SymbolContext>(*sc_ptr);
 }
 
 SBSymbolContext::SBSymbolContext(const SBSymbolContext &rhs) : m_opaque_up() {
@@ -51,7 +51,7 @@
 
 void SBSymbolContext::SetSymbolContext(const SymbolContext *sc_ptr) {
   if (sc_ptr)
-    m_opaque_up = llvm::make_unique<SymbolContext>(*sc_ptr);
+    m_opaque_up = std::make_unique<SymbolContext>(*sc_ptr);
   else
     m_opaque_up->Clear(true);
 }
diff --git a/src/llvm-project/lldb/source/API/SBTarget.cpp b/src/llvm-project/lldb/source/API/SBTarget.cpp
index 5e87eb6..312e4df 100644
--- a/src/llvm-project/lldb/source/API/SBTarget.cpp
+++ b/src/llvm-project/lldb/source/API/SBTarget.cpp
@@ -36,7 +36,6 @@
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
-#include "lldb/Core/STLUtils.h"
 #include "lldb/Core/SearchFilter.h"
 #include "lldb/Core/Section.h"
 #include "lldb/Core/StructuredDataImpl.h"
@@ -44,11 +43,11 @@
 #include "lldb/Core/ValueObjectList.h"
 #include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/Host/Host.h"
-#include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/DeclVendor.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/ABI.h"
 #include "lldb/Target/Language.h"
@@ -218,7 +217,7 @@
   if (!target_sp)
     return LLDB_RECORD_RESULT(data);
 
-  auto stats_up = llvm::make_unique<StructuredData::Dictionary>();
+  auto stats_up = std::make_unique<StructuredData::Dictionary>();
   int i = 0;
   for (auto &Entry : target_sp->GetStatistics()) {
     std::string Desc = lldb_private::GetStatDescription(
@@ -960,8 +959,8 @@
     const LazyBool skip_prologue = eLazyBoolCalculate;
 
     sb_bp = target_sp->CreateFuncRegexBreakpoint(
-        module_list.get(), comp_unit_list.get(), regexp, symbol_language,
-        skip_prologue, internal, hardware);
+        module_list.get(), comp_unit_list.get(), std::move(regexp),
+        symbol_language, skip_prologue, internal, hardware);
   }
 
   return LLDB_RECORD_RESULT(sb_bp);
@@ -1061,8 +1060,8 @@
     }
 
     sb_bp = target_sp->CreateSourceRegexBreakpoint(
-        module_list.get(), source_file_list.get(), func_names_set, regexp,
-        false, hardware, move_to_nearest_code);
+        module_list.get(), source_file_list.get(), func_names_set,
+        std::move(regexp), false, hardware, move_to_nearest_code);
   }
 
   return LLDB_RECORD_RESULT(sb_bp);
@@ -1177,12 +1176,15 @@
   TargetSP target_sp(GetSP());
   if (target_sp) {
     std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
-    BreakpointList bkpt_list(false);
-    bool is_valid =
-        target_sp->GetBreakpointList().FindBreakpointsByName(name, bkpt_list);
-    if (!is_valid)
+    llvm::Expected<std::vector<BreakpointSP>> expected_vector =
+        target_sp->GetBreakpointList().FindBreakpointsByName(name);
+    if (!expected_vector) {
+      LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS),
+               "invalid breakpoint name: {}",
+               llvm::toString(expected_vector.takeError()));
       return false;
-    for (BreakpointSP bkpt_sp : bkpt_list.Breakpoints()) {
+    }
+    for (BreakpointSP bkpt_sp : *expected_vector) {
       bkpts.AppendByID(bkpt_sp->GetID());
     }
   }
@@ -1598,7 +1600,7 @@
   lldb::SBModule sb_module;
   TargetSP target_sp(GetSP());
   if (target_sp)
-    sb_module.SetSP(target_sp->GetOrCreateModule(*module_spec.m_opaque_up, 
+    sb_module.SetSP(target_sp->GetOrCreateModule(*module_spec.m_opaque_up,
                                                  true /* notify */));
   return LLDB_RECORD_RESULT(sb_module);
 }
@@ -1653,11 +1655,8 @@
 
   SBSymbolContextList sb_sc_list;
   const TargetSP target_sp(GetSP());
-  if (target_sp && sb_file_spec.IsValid()) {
-    const bool append = true;
-    target_sp->GetImages().FindCompileUnits(*sb_file_spec,
-                                            append, *sb_sc_list);
-  }
+  if (target_sp && sb_file_spec.IsValid())
+    target_sp->GetImages().FindCompileUnits(*sb_file_spec, *sb_sc_list);
   return LLDB_RECORD_RESULT(sb_sc_list);
 }
 
@@ -1783,10 +1782,9 @@
 
   const bool symbols_ok = true;
   const bool inlines_ok = true;
-  const bool append = true;
   FunctionNameType mask = static_cast<FunctionNameType>(name_type_mask);
   target_sp->GetImages().FindFunctions(ConstString(name), mask, symbols_ok,
-                                       inlines_ok, append, *sb_sc_list);
+                                       inlines_ok, *sb_sc_list);
   return LLDB_RECORD_RESULT(sb_sc_list);
 }
 
@@ -1806,17 +1804,16 @@
       switch (matchtype) {
       case eMatchTypeRegex:
         target_sp->GetImages().FindFunctions(RegularExpression(name_ref), true,
-                                             true, true, *sb_sc_list);
+                                             true, *sb_sc_list);
         break;
       case eMatchTypeStartsWith:
         regexstr = llvm::Regex::escape(name) + ".*";
         target_sp->GetImages().FindFunctions(RegularExpression(regexstr), true,
-                                             true, true, *sb_sc_list);
+                                             true, *sb_sc_list);
         break;
       default:
-        target_sp->GetImages().FindFunctions(ConstString(name),
-                                             eFunctionNameTypeAny, true, true,
-                                             true, *sb_sc_list);
+        target_sp->GetImages().FindFunctions(
+            ConstString(name), eFunctionNameTypeAny, true, true, *sb_sc_list);
         break;
       }
     }
@@ -1858,11 +1855,11 @@
     }
 
     // No matches, search for basic typename matches
-    ClangASTContext *clang_ast = target_sp->GetScratchClangASTContext();
-    if (clang_ast)
-      return LLDB_RECORD_RESULT(SBType(ClangASTContext::GetBasicType(
-          clang_ast->getASTContext(), const_typename)));
+    for (auto *type_system : target_sp->GetScratchTypeSystems())
+      if (auto type = type_system->GetBuiltinTypeByName(const_typename))
+        return LLDB_RECORD_RESULT(SBType(type));
   }
+
   return LLDB_RECORD_RESULT(SBType());
 }
 
@@ -1872,10 +1869,9 @@
 
   TargetSP target_sp(GetSP());
   if (target_sp) {
-    ClangASTContext *clang_ast = target_sp->GetScratchClangASTContext();
-    if (clang_ast)
-      return LLDB_RECORD_RESULT(SBType(
-          ClangASTContext::GetBasicType(clang_ast->getASTContext(), type)));
+    for (auto *type_system : target_sp->GetScratchTypeSystems())
+      if (auto compiler_type = type_system->GetBasicTypeFromAST(type))
+        return LLDB_RECORD_RESULT(SBType(compiler_type));
   }
   return LLDB_RECORD_RESULT(SBType());
 }
@@ -1892,16 +1888,13 @@
     bool exact_match = false;
     TypeList type_list;
     llvm::DenseSet<SymbolFile *> searched_symbol_files;
-    uint32_t num_matches =
-        images.FindTypes(nullptr, const_typename, exact_match, UINT32_MAX,
-                         searched_symbol_files, type_list);
+    images.FindTypes(nullptr, const_typename, exact_match, UINT32_MAX,
+                     searched_symbol_files, type_list);
 
-    if (num_matches > 0) {
-      for (size_t idx = 0; idx < num_matches; idx++) {
-        TypeSP type_sp(type_list.GetTypeAtIndex(idx));
-        if (type_sp)
-          sb_type_list.Append(SBType(type_sp));
-      }
+    for (size_t idx = 0; idx < type_list.GetSize(); idx++) {
+      TypeSP type_sp(type_list.GetTypeAtIndex(idx));
+      if (type_sp)
+        sb_type_list.Append(SBType(type_sp));
     }
 
     // Try the loaded language runtimes
@@ -1918,10 +1911,10 @@
 
     if (sb_type_list.GetSize() == 0) {
       // No matches, search for basic typename matches
-      ClangASTContext *clang_ast = target_sp->GetScratchClangASTContext();
-      if (clang_ast)
-        sb_type_list.Append(SBType(ClangASTContext::GetBasicType(
-            clang_ast->getASTContext(), const_typename)));
+      for (auto *type_system : target_sp->GetScratchTypeSystems())
+        if (auto compiler_type =
+                type_system->GetBuiltinTypeByName(const_typename))
+          sb_type_list.Append(SBType(compiler_type));
     }
   }
   return LLDB_RECORD_RESULT(sb_type_list);
@@ -1937,16 +1930,15 @@
   TargetSP target_sp(GetSP());
   if (name && target_sp) {
     VariableList variable_list;
-    const uint32_t match_count = target_sp->GetImages().FindGlobalVariables(
-        ConstString(name), max_matches, variable_list);
-
-    if (match_count > 0) {
+    target_sp->GetImages().FindGlobalVariables(ConstString(name), max_matches,
+                                               variable_list);
+    if (!variable_list.Empty()) {
       ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get();
       if (exe_scope == nullptr)
         exe_scope = target_sp.get();
-      for (uint32_t i = 0; i < match_count; ++i) {
-        lldb::ValueObjectSP valobj_sp(ValueObjectVariable::Create(
-            exe_scope, variable_list.GetVariableAtIndex(i)));
+      for (const VariableSP &var_sp : variable_list) {
+        lldb::ValueObjectSP valobj_sp(
+            ValueObjectVariable::Create(exe_scope, var_sp));
         if (valobj_sp)
           sb_value_list.Append(SBValue(valobj_sp));
       }
@@ -1971,30 +1963,28 @@
     VariableList variable_list;
 
     std::string regexstr;
-    uint32_t match_count;
     switch (matchtype) {
     case eMatchTypeNormal:
-      match_count = target_sp->GetImages().FindGlobalVariables(
-          ConstString(name), max_matches, variable_list);
+      target_sp->GetImages().FindGlobalVariables(ConstString(name), max_matches,
+                                                 variable_list);
       break;
     case eMatchTypeRegex:
-      match_count = target_sp->GetImages().FindGlobalVariables(
-          RegularExpression(name_ref), max_matches, variable_list);
+      target_sp->GetImages().FindGlobalVariables(RegularExpression(name_ref),
+                                                 max_matches, variable_list);
       break;
     case eMatchTypeStartsWith:
       regexstr = llvm::Regex::escape(name) + ".*";
-      match_count = target_sp->GetImages().FindGlobalVariables(
-          RegularExpression(regexstr), max_matches, variable_list);
+      target_sp->GetImages().FindGlobalVariables(RegularExpression(regexstr),
+                                                 max_matches, variable_list);
       break;
     }
-
-    if (match_count > 0) {
+    if (!variable_list.Empty()) {
       ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get();
       if (exe_scope == nullptr)
         exe_scope = target_sp.get();
-      for (uint32_t i = 0; i < match_count; ++i) {
-        lldb::ValueObjectSP valobj_sp(ValueObjectVariable::Create(
-            exe_scope, variable_list.GetVariableAtIndex(i)));
+      for (const VariableSP &var_sp : variable_list) {
+        lldb::ValueObjectSP valobj_sp(
+            ValueObjectVariable::Create(exe_scope, var_sp));
         if (valobj_sp)
           sb_value_list.Append(SBValue(valobj_sp));
       }
@@ -2291,11 +2281,9 @@
   SBSymbolContextList sb_sc_list;
   if (name && name[0]) {
     TargetSP target_sp(GetSP());
-    if (target_sp) {
-      bool append = true;
+    if (target_sp)
       target_sp->GetImages().FindSymbolsWithNameAndType(
-          ConstString(name), symbol_type, *sb_sc_list, append);
-    }
+          ConstString(name), symbol_type, *sb_sc_list);
   }
   return LLDB_RECORD_RESULT(sb_sc_list);
 }
@@ -2355,10 +2343,10 @@
       expr_result.SetSP(expr_value_sp, options.GetFetchDynamicValue());
     }
   }
-  if (expr_log)
-    expr_log->Printf("** [SBTarget::EvaluateExpression] Expression result is "
-                     "%s, summary %s **",
-                     expr_result.GetValue(), expr_result.GetSummary());
+  LLDB_LOGF(expr_log,
+            "** [SBTarget::EvaluateExpression] Expression result is "
+            "%s, summary %s **",
+            expr_result.GetValue(), expr_result.GetSummary());
   return LLDB_RECORD_RESULT(expr_result);
 }
 
diff --git a/src/llvm-project/lldb/source/API/SBThread.cpp b/src/llvm-project/lldb/source/API/SBThread.cpp
index 85e9a6b..f7f748f 100644
--- a/src/llvm-project/lldb/source/API/SBThread.cpp
+++ b/src/llvm-project/lldb/source/API/SBThread.cpp
@@ -16,6 +16,7 @@
 #include "lldb/API/SBFrame.h"
 #include "lldb/API/SBProcess.h"
 #include "lldb/API/SBStream.h"
+#include "lldb/API/SBStructuredData.h"
 #include "lldb/API/SBSymbolContext.h"
 #include "lldb/API/SBThreadCollection.h"
 #include "lldb/API/SBThreadPlan.h"
@@ -23,6 +24,7 @@
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/StreamFile.h"
+#include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Symbol/CompileUnit.h"
@@ -912,9 +914,10 @@
     const bool exact = false;
 
     SymbolContextList sc_list;
-    const uint32_t num_matches = frame_sc.comp_unit->ResolveSymbolContext(
-        step_file_spec, line, check_inlines, exact, eSymbolContextLineEntry,
-        sc_list);
+    frame_sc.comp_unit->ResolveSymbolContext(step_file_spec, line,
+                                             check_inlines, exact,
+                                             eSymbolContextLineEntry, sc_list);
+    const uint32_t num_matches = sc_list.GetSize();
     if (num_matches > 0) {
       SymbolContext sc;
       for (uint32_t i = 0; i < num_matches; ++i) {
@@ -965,9 +968,24 @@
 }
 
 SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name,
+                                            bool resume_immediately) {
+  LLDB_RECORD_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan,
+                     (const char *, bool), script_class_name, 
+                     resume_immediately);
+
+  lldb::SBStructuredData no_data;
+  return LLDB_RECORD_RESULT(
+      StepUsingScriptedThreadPlan(script_class_name, 
+                                  no_data, 
+                                  resume_immediately));
+}
+
+SBError SBThread::StepUsingScriptedThreadPlan(const char *script_class_name,
+                                              SBStructuredData &args_data,
                                               bool resume_immediately) {
   LLDB_RECORD_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan,
-                     (const char *, bool), script_class_name,
+                     (const char *, lldb::SBStructuredData &, bool), 
+                     script_class_name, args_data,
                      resume_immediately);
 
   SBError error;
@@ -982,8 +1000,10 @@
 
   Thread *thread = exe_ctx.GetThreadPtr();
   Status new_plan_status;
+  StructuredData::ObjectSP obj_sp = args_data.m_impl_up->GetObjectSP();
+
   ThreadPlanSP new_plan_sp = thread->QueueThreadPlanForStepScripted(
-      false, script_class_name, false, new_plan_status);
+      false, script_class_name, obj_sp, false, new_plan_status);
 
   if (new_plan_status.Fail()) {
     error.SetErrorString(new_plan_status.AsCString());
@@ -1017,7 +1037,7 @@
 
   Thread *thread = exe_ctx.GetThreadPtr();
 
-  Status err = thread->JumpToLine(file_spec.get(), line, true);
+  Status err = thread->JumpToLine(file_spec.ref(), line, true);
   sb_error.SetError(err);
   return LLDB_RECORD_RESULT(sb_error);
 }
@@ -1460,6 +1480,8 @@
                        (const char *));
   LLDB_REGISTER_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan,
                        (const char *, bool));
+  LLDB_REGISTER_METHOD(lldb::SBError, SBThread, StepUsingScriptedThreadPlan,
+                       (const char *, SBStructuredData &, bool));
   LLDB_REGISTER_METHOD(lldb::SBError, SBThread, JumpToLine,
                        (lldb::SBFileSpec &, uint32_t));
   LLDB_REGISTER_METHOD(lldb::SBError, SBThread, ReturnFromFrame,
diff --git a/src/llvm-project/lldb/source/API/SBThreadPlan.cpp b/src/llvm-project/lldb/source/API/SBThreadPlan.cpp
index 8f6802f..eed4d1b 100644
--- a/src/llvm-project/lldb/source/API/SBThreadPlan.cpp
+++ b/src/llvm-project/lldb/source/API/SBThreadPlan.cpp
@@ -11,10 +11,12 @@
 
 #include "lldb/API/SBFileSpec.h"
 #include "lldb/API/SBStream.h"
+#include "lldb/API/SBStructuredData.h"
 #include "lldb/API/SBSymbolContext.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/StreamFile.h"
+#include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/SymbolContext.h"
@@ -67,7 +69,20 @@
 
   Thread *thread = sb_thread.get();
   if (thread)
-    m_opaque_sp = std::make_shared<ThreadPlanPython>(*thread, class_name);
+    m_opaque_sp = std::make_shared<ThreadPlanPython>(*thread, class_name, 
+                                                     nullptr);
+}
+
+SBThreadPlan::SBThreadPlan(lldb::SBThread &sb_thread, const char *class_name,
+                           lldb::SBStructuredData &args_data) {
+  LLDB_RECORD_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *,
+                                         SBStructuredData &),
+                          sb_thread, class_name, args_data);
+
+  Thread *thread = sb_thread.get();
+  if (thread)
+    m_opaque_sp = std::make_shared<ThreadPlanPython>(*thread, class_name, 
+                                                     args_data.m_impl_up.get());
 }
 
 // Assignment operator
@@ -368,9 +383,35 @@
 
   if (m_opaque_sp) {
     Status plan_status;
+    StructuredData::ObjectSP empty_args;
     SBThreadPlan plan =
         SBThreadPlan(m_opaque_sp->GetThread().QueueThreadPlanForStepScripted(
-            false, script_class_name, false, plan_status));
+            false, script_class_name, empty_args, false, plan_status));
+
+    if (plan_status.Fail())
+      error.SetErrorString(plan_status.AsCString());
+
+    return LLDB_RECORD_RESULT(plan);
+  } else {
+    return LLDB_RECORD_RESULT(SBThreadPlan());
+  }
+}
+
+SBThreadPlan
+SBThreadPlan::QueueThreadPlanForStepScripted(const char *script_class_name,
+                                             lldb::SBStructuredData &args_data,
+                                             SBError &error) {
+  LLDB_RECORD_METHOD(lldb::SBThreadPlan, SBThreadPlan,
+                     QueueThreadPlanForStepScripted,
+                     (const char *, lldb::SBStructuredData &, lldb::SBError &), 
+                     script_class_name, args_data, error);
+
+  if (m_opaque_sp) {
+    Status plan_status;
+    StructuredData::ObjectSP args_obj = args_data.m_impl_up->GetObjectSP();
+    SBThreadPlan plan =
+        SBThreadPlan(m_opaque_sp->GetThread().QueueThreadPlanForStepScripted(
+            false, script_class_name, args_obj, false, plan_status));
 
     if (plan_status.Fail())
       error.SetErrorString(plan_status.AsCString());
@@ -390,6 +431,8 @@
   LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (const lldb::ThreadPlanSP &));
   LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (const lldb::SBThreadPlan &));
   LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *));
+  LLDB_REGISTER_CONSTRUCTOR(SBThreadPlan, (lldb::SBThread &, const char *,
+                       lldb::SBStructuredData &));
   LLDB_REGISTER_METHOD(const lldb::SBThreadPlan &,
                        SBThreadPlan, operator=,(const lldb::SBThreadPlan &));
   LLDB_REGISTER_METHOD_CONST(bool, SBThreadPlan, IsValid, ());
@@ -433,6 +476,10 @@
   LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
                        QueueThreadPlanForStepScripted,
                        (const char *, lldb::SBError &));
+  LLDB_REGISTER_METHOD(lldb::SBThreadPlan, SBThreadPlan,
+                       QueueThreadPlanForStepScripted,
+                       (const char *, lldb::SBStructuredData &,
+                       lldb::SBError &));
 }
 
 }
diff --git a/src/llvm-project/lldb/source/API/SBType.cpp b/src/llvm-project/lldb/source/API/SBType.cpp
index 5402128..33b67ad 100644
--- a/src/llvm-project/lldb/source/API/SBType.cpp
+++ b/src/llvm-project/lldb/source/API/SBType.cpp
@@ -212,8 +212,10 @@
 
   if (!IsValid())
     return LLDB_RECORD_RESULT(SBType());
-  return LLDB_RECORD_RESULT(SBType(TypeImplSP(
-      new TypeImpl(m_opaque_sp->GetCompilerType(true).GetArrayElementType()))));
+  CompilerType canonical_type =
+      m_opaque_sp->GetCompilerType(true).GetCanonicalType();
+  return LLDB_RECORD_RESULT(
+      SBType(TypeImplSP(new TypeImpl(canonical_type.GetArrayElementType()))));
 }
 
 SBType SBType::GetArrayType(uint64_t size) {
@@ -799,7 +801,7 @@
   if (m_opaque_sp) {
     ConstString mangled_str = m_opaque_sp->GetMangledName();
     if (mangled_str) {
-      Mangled mangled(mangled_str, true);
+      Mangled mangled(mangled_str);
       return mangled.GetDemangledName(mangled.GuessLanguage()).GetCString();
     }
   }
diff --git a/src/llvm-project/lldb/source/API/SBTypeCategory.cpp b/src/llvm-project/lldb/source/API/SBTypeCategory.cpp
index 43d5a3a..1e44965 100644
--- a/src/llvm-project/lldb/source/API/SBTypeCategory.cpp
+++ b/src/llvm-project/lldb/source/API/SBTypeCategory.cpp
@@ -364,8 +364,8 @@
 
   if (type_name.IsRegex())
     m_opaque_sp->GetRegexTypeFormatsContainer()->Add(
-        lldb::RegularExpressionSP(new RegularExpression(
-            llvm::StringRef::withNullAsEmpty(type_name.GetName()))),
+        RegularExpression(
+            llvm::StringRef::withNullAsEmpty(type_name.GetName())),
         format.GetSP());
   else
     m_opaque_sp->GetTypeFormatsContainer()->Add(
@@ -443,8 +443,8 @@
 
   if (type_name.IsRegex())
     m_opaque_sp->GetRegexTypeSummariesContainer()->Add(
-        lldb::RegularExpressionSP(new RegularExpression(
-            llvm::StringRef::withNullAsEmpty(type_name.GetName()))),
+        RegularExpression(
+            llvm::StringRef::withNullAsEmpty(type_name.GetName())),
         summary.GetSP());
   else
     m_opaque_sp->GetTypeSummariesContainer()->Add(
@@ -488,8 +488,8 @@
 
   if (type_name.IsRegex())
     m_opaque_sp->GetRegexTypeFiltersContainer()->Add(
-        lldb::RegularExpressionSP(new RegularExpression(
-            llvm::StringRef::withNullAsEmpty(type_name.GetName()))),
+        RegularExpression(
+            llvm::StringRef::withNullAsEmpty(type_name.GetName())),
         filter.GetSP());
   else
     m_opaque_sp->GetTypeFiltersContainer()->Add(
@@ -567,8 +567,8 @@
 
   if (type_name.IsRegex())
     m_opaque_sp->GetRegexTypeSyntheticsContainer()->Add(
-        lldb::RegularExpressionSP(new RegularExpression(
-            llvm::StringRef::withNullAsEmpty(type_name.GetName()))),
+        RegularExpression(
+            llvm::StringRef::withNullAsEmpty(type_name.GetName())),
         synth.GetSP());
   else
     m_opaque_sp->GetTypeSyntheticsContainer()->Add(
diff --git a/src/llvm-project/lldb/source/API/SBValue.cpp b/src/llvm-project/lldb/source/API/SBValue.cpp
index 83830076..396a9d3 100644
--- a/src/llvm-project/lldb/source/API/SBValue.cpp
+++ b/src/llvm-project/lldb/source/API/SBValue.cpp
@@ -391,25 +391,6 @@
   return cstr;
 }
 
-const char *SBValue::GetTypeValidatorResult() {
-  LLDB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetTypeValidatorResult);
-
-  const char *cstr = nullptr;
-  ValueLocker locker;
-  lldb::ValueObjectSP value_sp(GetSP(locker));
-  if (value_sp) {
-    const auto &validation(value_sp->GetValidationStatus());
-    if (TypeValidatorResult::Failure == validation.first) {
-      if (validation.second.empty())
-        cstr = "unknown error";
-      else
-        cstr = validation.second.c_str();
-    }
-  }
-
-  return cstr;
-}
-
 SBType SBValue::GetType() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBValue, GetType);
 
@@ -1585,7 +1566,6 @@
   LLDB_REGISTER_METHOD(const char *, SBValue, GetValue, ());
   LLDB_REGISTER_METHOD(lldb::ValueType, SBValue, GetValueType, ());
   LLDB_REGISTER_METHOD(const char *, SBValue, GetObjectDescription, ());
-  LLDB_REGISTER_METHOD(const char *, SBValue, GetTypeValidatorResult, ());
   LLDB_REGISTER_METHOD(lldb::SBType, SBValue, GetType, ());
   LLDB_REGISTER_METHOD(bool, SBValue, GetValueDidChange, ());
   LLDB_REGISTER_METHOD(const char *, SBValue, GetSummary, ());
diff --git a/src/llvm-project/lldb/source/API/SystemInitializerFull.cpp b/src/llvm-project/lldb/source/API/SystemInitializerFull.cpp
index e7f2206..06f1a6c 100644
--- a/src/llvm-project/lldb/source/API/SystemInitializerFull.cpp
+++ b/src/llvm-project/lldb/source/API/SystemInitializerFull.cpp
@@ -7,13 +7,17 @@
 //===----------------------------------------------------------------------===//
 
 #include "SystemInitializerFull.h"
-
 #include "lldb/API/SBCommandInterpreter.h"
+#include "lldb/Host/Config.h"
 
-#if !defined(LLDB_DISABLE_PYTHON)
+#if LLDB_ENABLE_PYTHON
 #include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h"
 #endif
 
+#if LLDB_ENABLE_LUA
+#include "Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h"
+#endif
+
 #include "lldb/Core/Debugger.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Initialization/SystemInitializerCommon.h"
@@ -24,6 +28,7 @@
 #include "Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h"
 #include "Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h"
 #include "Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h"
+#include "Plugins/ABI/SysV-arc/ABISysV_arc.h"
 #include "Plugins/ABI/SysV-arm/ABISysV_arm.h"
 #include "Plugins/ABI/SysV-arm64/ABISysV_arm64.h"
 #include "Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h"
@@ -131,6 +136,39 @@
 
 SystemInitializerFull::~SystemInitializerFull() {}
 
+#define LLDB_PROCESS_AArch64(op)                                               \
+  ABIMacOSX_arm64::op();                                                       \
+  ABISysV_arm64::op();
+#define LLDB_PROCESS_ARM(op)                                                   \
+  ABIMacOSX_arm::op();                                                         \
+  ABISysV_arm::op();
+#define LLDB_PROCESS_ARC(op)                                                   \
+  ABISysV_arc::op();
+#define LLDB_PROCESS_Hexagon(op) ABISysV_hexagon::op();
+#define LLDB_PROCESS_Mips(op)                                                  \
+  ABISysV_mips::op();                                                          \
+  ABISysV_mips64::op();
+#define LLDB_PROCESS_PowerPC(op)                                               \
+  ABISysV_ppc::op();                                                          \
+  ABISysV_ppc64::op();
+#define LLDB_PROCESS_SystemZ(op) ABISysV_s390x::op();
+#define LLDB_PROCESS_X86(op)                                                   \
+  ABIMacOSX_i386::op();                                                        \
+  ABISysV_i386::op();                                                          \
+  ABISysV_x86_64::op();                                                        \
+  ABIWindows_x86_64::op();
+
+#define LLDB_PROCESS_AMDGPU(op)
+#define LLDB_PROCESS_AVR(op)
+#define LLDB_PROCESS_BPF(op)
+#define LLDB_PROCESS_Lanai(op)
+#define LLDB_PROCESS_MSP430(op)
+#define LLDB_PROCESS_NVPTX(op)
+#define LLDB_PROCESS_RISCV(op)
+#define LLDB_PROCESS_Sparc(op)
+#define LLDB_PROCESS_WebAssembly(op)
+#define LLDB_PROCESS_XCore(op)
+
 llvm::Error SystemInitializerFull::Initialize() {
   if (auto e = SystemInitializerCommon::Initialize())
     return e;
@@ -145,14 +183,18 @@
 
   ScriptInterpreterNone::Initialize();
 
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
   OperatingSystemPython::Initialize();
 #endif
 
-#if !defined(LLDB_DISABLE_PYTHON)
+#if LLDB_ENABLE_PYTHON
   ScriptInterpreterPython::Initialize();
 #endif
 
+#if LLDB_ENABLE_LUA
+  ScriptInterpreterLua::Initialize();
+#endif
+
   platform_freebsd::PlatformFreeBSD::Initialize();
   platform_linux::PlatformLinux::Initialize();
   platform_netbsd::PlatformNetBSD::Initialize();
@@ -174,20 +216,8 @@
 
   ClangASTContext::Initialize();
 
-  ABIMacOSX_i386::Initialize();
-  ABIMacOSX_arm::Initialize();
-  ABIMacOSX_arm64::Initialize();
-  ABISysV_arm::Initialize();
-  ABISysV_arm64::Initialize();
-  ABISysV_hexagon::Initialize();
-  ABISysV_i386::Initialize();
-  ABISysV_x86_64::Initialize();
-  ABISysV_ppc::Initialize();
-  ABISysV_ppc64::Initialize();
-  ABISysV_mips::Initialize();
-  ABISysV_mips64::Initialize();
-  ABISysV_s390x::Initialize();
-  ABIWindows_x86_64::Initialize();
+#define LLVM_TARGET(t) LLDB_PROCESS_ ## t(Initialize)
+#include "llvm/Config/Targets.def"
 
   ArchitectureArm::Initialize();
   ArchitectureMips::Initialize();
@@ -288,20 +318,9 @@
   ArchitectureMips::Terminate();
   ArchitecturePPC64::Terminate();
 
-  ABIMacOSX_i386::Terminate();
-  ABIMacOSX_arm::Terminate();
-  ABIMacOSX_arm64::Terminate();
-  ABISysV_arm::Terminate();
-  ABISysV_arm64::Terminate();
-  ABISysV_hexagon::Terminate();
-  ABISysV_i386::Terminate();
-  ABISysV_x86_64::Terminate();
-  ABISysV_ppc::Terminate();
-  ABISysV_ppc64::Terminate();
-  ABISysV_mips::Terminate();
-  ABISysV_mips64::Terminate();
-  ABISysV_s390x::Terminate();
-  ABIWindows_x86_64::Terminate();
+#define LLVM_TARGET(t) LLDB_PROCESS_ ## t(Terminate)
+#include "llvm/Config/Targets.def"
+
   DisassemblerLLVMC::Terminate();
 
   JITLoaderGDB::Terminate();
@@ -364,7 +383,7 @@
   DynamicLoaderStatic::Terminate();
   DynamicLoaderWindowsDYLD::Terminate();
 
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
   OperatingSystemPython::Terminate();
 #endif
 
diff --git a/src/llvm-project/lldb/source/API/Utils.h b/src/llvm-project/lldb/source/API/Utils.h
index b1975e5..ed81534 100644
--- a/src/llvm-project/lldb/source/API/Utils.h
+++ b/src/llvm-project/lldb/source/API/Utils.h
@@ -16,7 +16,7 @@
 
 template <typename T> std::unique_ptr<T> clone(const std::unique_ptr<T> &src) {
   if (src)
-    return llvm::make_unique<T>(*src);
+    return std::make_unique<T>(*src);
   return nullptr;
 }
 
diff --git a/src/llvm-project/lldb/source/Breakpoint/Breakpoint.cpp b/src/llvm-project/lldb/source/Breakpoint/Breakpoint.cpp
index 3c38419..13acf4b 100644
--- a/src/llvm-project/lldb/source/Breakpoint/Breakpoint.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/Breakpoint.cpp
@@ -496,10 +496,10 @@
 void Breakpoint::ModulesChanged(ModuleList &module_list, bool load,
                                 bool delete_locations) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Breakpoint::ModulesChanged: num_modules: %zu load: %i "
-                "delete_locations: %i\n",
-                module_list.GetSize(), load, delete_locations);
+  LLDB_LOGF(log,
+            "Breakpoint::ModulesChanged: num_modules: %zu load: %i "
+            "delete_locations: %i\n",
+            module_list.GetSize(), load, delete_locations);
 
   std::lock_guard<std::recursive_mutex> guard(module_list.GetMutex());
   if (load) {
@@ -550,10 +550,10 @@
             seen = true;
 
           if (!break_loc_sp->ResolveBreakpointSite()) {
-            if (log)
-              log->Printf("Warning: could not set breakpoint site for "
-                          "breakpoint location %d of breakpoint %d.\n",
-                          break_loc_sp->GetID(), GetID());
+            LLDB_LOGF(log,
+                      "Warning: could not set breakpoint site for "
+                      "breakpoint location %d of breakpoint %d.\n",
+                      break_loc_sp->GetID(), GetID());
           }
         }
       }
@@ -638,7 +638,8 @@
   } else {
     // Otherwise we will compare by name...
     if (old_sc.comp_unit && new_sc.comp_unit) {
-      if (FileSpec::Equal(*old_sc.comp_unit, *new_sc.comp_unit, true)) {
+      if (old_sc.comp_unit->GetPrimaryFile() ==
+          new_sc.comp_unit->GetPrimaryFile()) {
         // Now check the functions:
         if (old_sc.function && new_sc.function &&
             (old_sc.function->GetName() == new_sc.function->GetName())) {
@@ -659,9 +660,8 @@
 void Breakpoint::ModuleReplaced(ModuleSP old_module_sp,
                                 ModuleSP new_module_sp) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Breakpoint::ModulesReplaced for %s\n",
-                old_module_sp->GetSpecificationDescription().c_str());
+  LLDB_LOGF(log, "Breakpoint::ModulesReplaced for %s\n",
+            old_module_sp->GetSpecificationDescription().c_str());
   // First find all the locations that are in the old module
 
   BreakpointLocationCollection old_break_locs;
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointIDList.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointIDList.cpp
index 1e695fa..de68c44 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointIDList.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointIDList.cpp
@@ -122,7 +122,7 @@
   for (size_t i = 0; i < old_args.size(); ++i) {
     bool is_range = false;
 
-    current_arg = old_args[i].ref;
+    current_arg = old_args[i].ref();
     if (!allow_locations && current_arg.contains('.')) {
       result.AppendErrorWithFormat(
           "Breakpoint locations not allowed, saw location: %s.",
@@ -146,16 +146,16 @@
       } else
         names_found.insert(current_arg);
     } else if ((i + 2 < old_args.size()) &&
-               BreakpointID::IsRangeIdentifier(old_args[i + 1].ref) &&
+               BreakpointID::IsRangeIdentifier(old_args[i + 1].ref()) &&
                BreakpointID::IsValidIDExpression(current_arg) &&
-               BreakpointID::IsValidIDExpression(old_args[i + 2].ref)) {
+               BreakpointID::IsValidIDExpression(old_args[i + 2].ref())) {
       range_from = current_arg;
-      range_to = old_args[i + 2].ref;
+      range_to = old_args[i + 2].ref();
       is_range = true;
       i = i + 2;
     } else {
       // See if user has specified id.*
-      llvm::StringRef tmp_str = old_args[i].ref;
+      llvm::StringRef tmp_str = old_args[i].ref();
       size_t pos = tmp_str.find('.');
       if (pos != llvm::StringRef::npos) {
         llvm::StringRef bp_id_str = tmp_str.substr(0, pos);
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointList.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointList.cpp
index c80fb91..5b23c63 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointList.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointList.cpp
@@ -10,6 +10,8 @@
 
 #include "lldb/Target/Target.h"
 
+#include "llvm/Support/Errc.h"
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -128,22 +130,24 @@
   return {};
 }
 
-bool BreakpointList::FindBreakpointsByName(const char *name,
-                                           BreakpointList &matching_bps) {
-  Status error;
+llvm::Expected<std::vector<lldb::BreakpointSP>>
+BreakpointList::FindBreakpointsByName(const char *name) {
   if (!name)
-    return false;
+    return llvm::createStringError(llvm::errc::invalid_argument,
+                                   "FindBreakpointsByName requires a name");
 
+  Status error;
   if (!BreakpointID::StringIsBreakpointName(llvm::StringRef(name), error))
-    return false;
+    return error.ToError();
 
+  std::vector<lldb::BreakpointSP> matching_bps;
   for (BreakpointSP bkpt_sp : Breakpoints()) {
     if (bkpt_sp->MatchesName(name)) {
-      matching_bps.Add(bkpt_sp, false);
+      matching_bps.push_back(bkpt_sp);
     }
   }
 
-  return true;
+  return matching_bps;
 }
 
 void BreakpointList::Dump(Stream *s) const {
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointLocation.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointLocation.cpp
index b718e2a..7f08b08 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointLocation.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointLocation.cpp
@@ -257,9 +257,8 @@
         condition_text, llvm::StringRef(), language, Expression::eResultTypeAny,
         EvaluateExpressionOptions(), nullptr, error));
     if (error.Fail()) {
-      if (log)
-        log->Printf("Error getting condition expression: %s.",
-                    error.AsCString());
+      LLDB_LOGF(log, "Error getting condition expression: %s.",
+                error.AsCString());
       m_user_expression_sp.reset();
       return true;
     }
@@ -312,8 +311,8 @@
       ret = result_value_sp->IsLogicalTrue(error);
       if (log) {
         if (error.Success()) {
-          log->Printf("Condition successfully evaluated, result is %s.\n",
-                      ret ? "true" : "false");
+          LLDB_LOGF(log, "Condition successfully evaluated, result is %s.\n",
+                    ret ? "true" : "false");
         } else {
           error.SetErrorString(
               "Failed to get an integer result from the expression");
@@ -408,8 +407,8 @@
   if (log) {
     StreamString s;
     GetDescription(&s, lldb::eDescriptionLevelVerbose);
-    log->Printf("Hit breakpoint location: %s, %s.\n", s.GetData(),
-                should_stop ? "stopping" : "continuing");
+    LLDB_LOGF(log, "Hit breakpoint location: %s, %s.\n", s.GetData(),
+              should_stop ? "stopping" : "continuing");
   }
 
   return should_stop;
@@ -520,13 +519,13 @@
       if (sc.module_sp) {
         s->EOL();
         s->Indent("module = ");
-        sc.module_sp->GetFileSpec().Dump(s);
+        sc.module_sp->GetFileSpec().Dump(s->AsRawOstream());
       }
 
       if (sc.comp_unit != nullptr) {
         s->EOL();
         s->Indent("compile unit = ");
-        static_cast<FileSpec *>(sc.comp_unit)->GetFilename().Dump(s);
+        sc.comp_unit->GetPrimaryFile().GetFilename().Dump(s);
 
         if (sc.function != nullptr) {
           s->EOL();
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointOptions.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointOptions.cpp
index f6f279d..8fd16f4 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointOptions.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointOptions.cpp
@@ -309,7 +309,7 @@
     }
   }
 
-  auto bp_options = llvm::make_unique<BreakpointOptions>(
+  auto bp_options = std::make_unique<BreakpointOptions>(
       condition_ref.str().c_str(), enabled, 
       ignore_count, one_shot, auto_continue);
   if (cmd_data_up) {
@@ -566,7 +566,8 @@
   if (m_callback_baton_sp.get()) {
     if (level != eDescriptionLevelBrief) {
       s->EOL();
-      m_callback_baton_sp->GetDescription(s, level);
+      m_callback_baton_sp->GetDescription(s->AsRawOstream(), level,
+                                          s->GetIndentLevel());
     }
   }
   if (!m_condition_text.empty()) {
@@ -578,35 +579,33 @@
 }
 
 void BreakpointOptions::CommandBaton::GetDescription(
-    Stream *s, lldb::DescriptionLevel level) const {
+    llvm::raw_ostream &s, lldb::DescriptionLevel level,
+    unsigned indentation) const {
   const CommandData *data = getItem();
 
   if (level == eDescriptionLevelBrief) {
-    s->Printf(", commands = %s",
-              (data && data->user_source.GetSize() > 0) ? "yes" : "no");
+    s << ", commands = "
+      << ((data && data->user_source.GetSize() > 0) ? "yes" : "no");
     return;
   }
 
-  s->IndentMore();
-  s->Indent("Breakpoint commands");
+  indentation += 2;
+  s.indent(indentation);
+  s << "Breakpoint commands";
   if (data->interpreter != eScriptLanguageNone)
-    s->Printf(" (%s):\n",
-              ScriptInterpreter::LanguageToString(data->interpreter).c_str());
+    s << llvm::formatv(" ({0}):\n",
+                       ScriptInterpreter::LanguageToString(data->interpreter));
   else
-    s->PutCString(":\n");
+    s << ":\n";
 
-  s->IndentMore();
+  indentation += 2;
   if (data && data->user_source.GetSize() > 0) {
-    const size_t num_strings = data->user_source.GetSize();
-    for (size_t i = 0; i < num_strings; ++i) {
-      s->Indent(data->user_source.GetStringAtIndex(i));
-      s->EOL();
+    for (llvm::StringRef str : data->user_source) {
+      s.indent(indentation);
+      s << str << "\n";
     }
-  } else {
-    s->PutCString("No commands.\n");
-  }
-  s->IndentLess();
-  s->IndentLess();
+  } else
+    s << "No commands.\n";
 }
 
 void BreakpointOptions::SetCommandDataCallback(
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolver.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolver.cpp
index b3224aa..e0a4e6ac 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolver.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolver.cpp
@@ -34,7 +34,8 @@
 // BreakpointResolver:
 const char *BreakpointResolver::g_ty_to_name[] = {"FileAndLine", "Address",
                                                   "SymbolName",  "SourceRegex",
-                                                  "Exception",   "Unknown"};
+                                                  "Python",   "Exception",
+                                                  "Unknown"};
 
 const char *BreakpointResolver::g_option_names[static_cast<uint32_t>(
     BreakpointResolver::OptionNames::LastOptionName)] = {
@@ -294,18 +295,18 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
   Address line_start = sc.line_entry.range.GetBaseAddress();
   if (!line_start.IsValid()) {
-    if (log)
-      log->Printf("error: Unable to set breakpoint %s at file address "
-                  "0x%" PRIx64 "\n",
-                  log_ident.str().c_str(), line_start.GetFileAddress());
+    LLDB_LOGF(log,
+              "error: Unable to set breakpoint %s at file address "
+              "0x%" PRIx64 "\n",
+              log_ident.str().c_str(), line_start.GetFileAddress());
     return;
   }
 
   if (!filter.AddressPasses(line_start)) {
-    if (log)
-      log->Printf("Breakpoint %s at file address 0x%" PRIx64
-                  " didn't pass the filter.\n",
-                  log_ident.str().c_str(), line_start.GetFileAddress());
+    LLDB_LOGF(log,
+              "Breakpoint %s at file address 0x%" PRIx64
+              " didn't pass the filter.\n",
+              log_ident.str().c_str(), line_start.GetFileAddress());
   }
 
   // If the line number is before the prologue end, move it there...
@@ -329,8 +330,8 @@
   if (log && bp_loc_sp && !m_breakpoint->IsInternal()) {
     StreamString s;
     bp_loc_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
-    log->Printf("Added location (skipped prologue: %s): %s \n",
-                skipped_prologue ? "yes" : "no", s.GetData());
+    LLDB_LOGF(log, "Added location (skipped prologue: %s): %s \n",
+              skipped_prologue ? "yes" : "no", s.GetData());
   }
 }
 
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverAddress.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
index 8a6fd6a..b985680 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverAddress.cpp
@@ -120,10 +120,8 @@
     BreakpointResolver::ResolveBreakpointInModules(filter, modules);
 }
 
-Searcher::CallbackReturn
-BreakpointResolverAddress::SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) {
+Searcher::CallbackReturn BreakpointResolverAddress::SearchCallback(
+    SearchFilter &filter, SymbolContext &context, Address *addr) {
   assert(m_breakpoint != nullptr);
 
   if (filter.AddressPasses(m_addr)) {
@@ -149,8 +147,7 @@
         bp_loc_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
         Log *log(
             lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-        if (log)
-          log->Printf("Added location: %s\n", s.GetData());
+        LLDB_LOGF(log, "Added location: %s\n", s.GetData());
       }
     } else {
       BreakpointLocationSP loc_sp = m_breakpoint->GetLocationAtIndex(0);
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
index a6095be..2b26f65 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp
@@ -198,10 +198,8 @@
   }
 }
 
-Searcher::CallbackReturn
-BreakpointResolverFileLine::SearchCallback(SearchFilter &filter,
-                                           SymbolContext &context,
-                                           Address *addr, bool containing) {
+Searcher::CallbackReturn BreakpointResolverFileLine::SearchCallback(
+    SearchFilter &filter, SymbolContext &context, Address *addr) {
   SymbolContextList sc_list;
 
   assert(m_breakpoint != nullptr);
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
index 0b24852..6b600a7 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp
@@ -20,11 +20,11 @@
 
 // BreakpointResolverFileRegex:
 BreakpointResolverFileRegex::BreakpointResolverFileRegex(
-    Breakpoint *bkpt, RegularExpression &regex,
+    Breakpoint *bkpt, RegularExpression regex,
     const std::unordered_set<std::string> &func_names, bool exact_match)
     : BreakpointResolver(bkpt, BreakpointResolver::FileRegexResolver),
-      m_regex(regex), m_exact_match(exact_match), m_function_names(func_names) {
-}
+      m_regex(std::move(regex)), m_exact_match(exact_match),
+      m_function_names(func_names) {}
 
 BreakpointResolverFileRegex::~BreakpointResolverFileRegex() {}
 
@@ -69,7 +69,8 @@
     }
   }
 
-  return new BreakpointResolverFileRegex(bkpt, regex, names_set, exact_match);
+  return new BreakpointResolverFileRegex(bkpt, std::move(regex), names_set,
+                                         exact_match);
 }
 
 StructuredData::ObjectSP
@@ -93,17 +94,15 @@
   return WrapOptionsDict(options_dict_sp);
 }
 
-Searcher::CallbackReturn
-BreakpointResolverFileRegex::SearchCallback(SearchFilter &filter,
-                                            SymbolContext &context,
-                                            Address *addr, bool containing) {
+Searcher::CallbackReturn BreakpointResolverFileRegex::SearchCallback(
+    SearchFilter &filter, SymbolContext &context, Address *addr) {
 
   assert(m_breakpoint != nullptr);
   if (!context.target_sp)
     return eCallbackReturnContinue;
 
   CompileUnit *cu = context.comp_unit;
-  FileSpec cu_file_spec = *(static_cast<FileSpec *>(cu));
+  FileSpec cu_file_spec = cu->GetPrimaryFile();
   std::vector<uint32_t> line_matches;
   context.target_sp->GetSourceManager().FindLinesMatchingRegex(
       cu_file_spec, m_regex, 1, UINT32_MAX, line_matches);
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverName.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverName.cpp
index 3ad2e88..ba9c88c 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -31,7 +31,8 @@
       m_class_name(), m_regex(), m_match_type(type), m_language(language),
       m_skip_prologue(skip_prologue) {
   if (m_match_type == Breakpoint::Regexp) {
-    if (!m_regex.Compile(llvm::StringRef::withNullAsEmpty(name_cstr))) {
+    m_regex = RegularExpression(llvm::StringRef::withNullAsEmpty(name_cstr));
+    if (!m_regex.IsValid()) {
       Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
 
       if (log)
@@ -70,12 +71,12 @@
 }
 
 BreakpointResolverName::BreakpointResolverName(Breakpoint *bkpt,
-                                               RegularExpression &func_regex,
+                                               RegularExpression func_regex,
                                                lldb::LanguageType language,
                                                lldb::addr_t offset,
                                                bool skip_prologue)
     : BreakpointResolver(bkpt, BreakpointResolver::NameResolver, offset),
-      m_class_name(nullptr), m_regex(func_regex),
+      m_class_name(nullptr), m_regex(std::move(func_regex)),
       m_match_type(Breakpoint::Regexp), m_language(language),
       m_skip_prologue(skip_prologue) {}
 
@@ -125,9 +126,8 @@
   success = options_dict.GetValueForKeyAsString(
       GetKey(OptionNames::RegexString), regex_text);
   if (success) {
-    RegularExpression regex(regex_text);
-    return new BreakpointResolverName(bkpt, regex, language, offset,
-                                      skip_prologue);
+    return new BreakpointResolverName(bkpt, RegularExpression(regex_text),
+                                      language, offset, skip_prologue);
   } else {
     StructuredData::Array *names_array;
     success = options_dict.GetValueForKeyAsArray(
@@ -250,8 +250,7 @@
 
 Searcher::CallbackReturn
 BreakpointResolverName::SearchCallback(SearchFilter &filter,
-                                       SymbolContext &context, Address *addr,
-                                       bool containing) {
+                                       SymbolContext &context, Address *addr) {
   SymbolContextList func_list;
   // SymbolContextList sym_list;
 
@@ -272,7 +271,6 @@
   bool filter_by_language = (m_language != eLanguageTypeUnknown);
   const bool include_symbols = !filter_by_cu;
   const bool include_inlines = true;
-  const bool append = true;
 
   switch (m_match_type) {
   case Breakpoint::Exact:
@@ -281,7 +279,7 @@
         const size_t start_func_idx = func_list.GetSize();
         context.module_sp->FindFunctions(
             lookup.GetLookupName(), nullptr, lookup.GetNameTypeMask(),
-            include_symbols, include_inlines, append, func_list);
+            include_symbols, include_inlines, func_list);
 
         const size_t end_func_idx = func_list.GetSize();
 
@@ -295,7 +293,7 @@
       context.module_sp->FindFunctions(
           m_regex,
           !filter_by_cu, // include symbols only if we aren't filtering by CU
-          include_inlines, append, func_list);
+          include_inlines, func_list);
     }
     break;
   case Breakpoint::Glob:
@@ -388,7 +386,7 @@
               if (log) {
                 StreamString s;
                 bp_loc_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
-                log->Printf("Added location: %s\n", s.GetData());
+                LLDB_LOGF(log, "Added location: %s\n", s.GetData());
               }
             }
           }
diff --git a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverScripted.cpp b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverScripted.cpp
index 8363795..288fd37 100644
--- a/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverScripted.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/BreakpointResolverScripted.cpp
@@ -29,8 +29,7 @@
     Breakpoint *bkpt, 
     const llvm::StringRef class_name,
     lldb::SearchDepth depth,
-    StructuredDataImpl *args_data,
-    ScriptInterpreter &script_interp)
+    StructuredDataImpl *args_data)
     : BreakpointResolver(bkpt, BreakpointResolver::PythonResolver),
       m_class_name(class_name), m_depth(depth), m_args_ptr(args_data) {
   CreateImplementationIfNeeded();
@@ -68,45 +67,25 @@
   llvm::StringRef class_name;
   bool success;
   
-  if (!bkpt)
-    return nullptr;
-
   success = options_dict.GetValueForKeyAsString(
       GetKey(OptionNames::PythonClassName), class_name);
   if (!success) {
     error.SetErrorString("BRFL::CFSD: Couldn't find class name entry.");
     return nullptr;
   }
-  lldb::SearchDepth depth;
-  int depth_as_int;
-  success = options_dict.GetValueForKeyAsInteger(
-      GetKey(OptionNames::SearchDepth), depth_as_int);
-  if (!success) {
-    error.SetErrorString("BRFL::CFSD: Couldn't find class name entry.");
-    return nullptr;
-  }
-  if (depth_as_int >= (int) OptionNames::LastOptionName) {
-    error.SetErrorString("BRFL::CFSD: Invalid value for search depth.");
-    return nullptr;
-  }
-  depth = (lldb::SearchDepth) depth_as_int;
+  // The Python function will actually provide the search depth, this is a
+  // placeholder.
+  lldb::SearchDepth depth = lldb::eSearchDepthTarget;
   
   StructuredDataImpl *args_data_impl = new StructuredDataImpl();
-  StructuredData::Dictionary *args_dict = new StructuredData::Dictionary();
+  StructuredData::Dictionary *args_dict = nullptr;
   success = options_dict.GetValueForKeyAsDictionary(
     GetKey(OptionNames::ScriptArgs), args_dict);
   if (success) {
-    // FIXME: The resolver needs a copy of the ARGS dict that it can own,
-    // so I need to make a copy constructor for the Dictionary so I can pass
-    // that to it here.  For now the args are empty.
-    //StructuredData::Dictionary *dict_copy = new StructuredData::Dictionary(args_dict);
-    
+      args_data_impl->SetObjectSP(args_dict->shared_from_this());
   }
-  ScriptInterpreter *script_interp = bkpt->GetTarget()
-                                         .GetDebugger()
-                                         .GetScriptInterpreter();
-  return new BreakpointResolverScripted(bkpt, class_name, depth, args_data_impl,
-                                      *script_interp);
+  return new BreakpointResolverScripted(bkpt, class_name, depth, 
+                                        args_data_impl);
 }
 
 StructuredData::ObjectSP
@@ -116,6 +95,10 @@
 
   options_dict_sp->AddStringItem(GetKey(OptionNames::PythonClassName),
                                    m_class_name);
+  if (m_args_ptr->IsValid())
+      options_dict_sp->AddItem(GetKey(OptionNames::ScriptArgs),
+          m_args_ptr->GetObjectSP());
+
   return WrapOptionsDict(options_dict_sp);
 }
 
@@ -123,10 +106,8 @@
   return m_breakpoint->GetTarget().GetDebugger().GetScriptInterpreter();
 }
 
-Searcher::CallbackReturn
-BreakpointResolverScripted::SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) {
+Searcher::CallbackReturn BreakpointResolverScripted::SearchCallback(
+    SearchFilter &filter, SymbolContext &context, Address *addr) {
   assert(m_breakpoint != nullptr);
   bool should_continue = true;
   if (!m_implementation_sp)
@@ -173,11 +154,10 @@
 
 lldb::BreakpointResolverSP
 BreakpointResolverScripted::CopyForBreakpoint(Breakpoint &breakpoint) {
-  ScriptInterpreter *script_interp = GetScriptInterpreter();
   // FIXME: Have to make a copy of the arguments from the m_args_ptr and then
   // pass that to the new resolver.
   lldb::BreakpointResolverSP ret_sp(
-      new BreakpointResolverScripted(&breakpoint, m_class_name, 
-                                   m_depth, nullptr, *script_interp));
+      new BreakpointResolverScripted(&breakpoint, m_class_name, m_depth, 
+                                     nullptr));
   return ret_sp;
 }
diff --git a/src/llvm-project/lldb/source/Breakpoint/Watchpoint.cpp b/src/llvm-project/lldb/source/Breakpoint/Watchpoint.cpp
index e8a9265..17dcda1 100644
--- a/src/llvm-project/lldb/source/Breakpoint/Watchpoint.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/Watchpoint.cpp
@@ -13,10 +13,11 @@
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Core/ValueObjectMemory.h"
 #include "lldb/Expression/UserExpression.h"
-#include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/ThreadSpec.h"
+#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 using namespace lldb;
@@ -30,14 +31,22 @@
       m_watch_write(0), m_watch_was_read(0), m_watch_was_written(0),
       m_ignore_count(0), m_false_alarms(0), m_decl_str(), m_watch_spec_str(),
       m_type(), m_error(), m_options(), m_being_created(true) {
+
   if (type && type->IsValid())
     m_type = *type;
   else {
     // If we don't have a known type, then we force it to unsigned int of the
     // right size.
-    ClangASTContext *ast_context = target.GetScratchClangASTContext();
-    m_type = ast_context->GetBuiltinTypeForEncodingAndBitSize(eEncodingUint,
-                                                              8 * size);
+    auto type_system_or_err =
+        target.GetScratchTypeSystemForLanguage(eLanguageTypeC);
+    if (auto err = type_system_or_err.takeError()) {
+      LLDB_LOG_ERROR(
+          lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_WATCHPOINTS),
+          std::move(err), "Failed to set type.");
+    } else {
+      m_type = type_system_or_err->GetBuiltinTypeForEncodingAndBitSize(
+          eEncodingUint, 8 * size);
+    }
   }
 
   // Set the initial value of the watched variable:
diff --git a/src/llvm-project/lldb/source/Breakpoint/WatchpointOptions.cpp b/src/llvm-project/lldb/source/Breakpoint/WatchpointOptions.cpp
index 7dd130a..026bf2f 100644
--- a/src/llvm-project/lldb/source/Breakpoint/WatchpointOptions.cpp
+++ b/src/llvm-project/lldb/source/Breakpoint/WatchpointOptions.cpp
@@ -121,7 +121,8 @@
     Stream *s, lldb::DescriptionLevel level) const {
   if (m_callback_baton_sp.get()) {
     s->EOL();
-    m_callback_baton_sp->GetDescription(s, level);
+    m_callback_baton_sp->GetDescription(s->AsRawOstream(), level,
+                                        s->GetIndentLevel());
   }
 }
 
@@ -156,28 +157,26 @@
 }
 
 void WatchpointOptions::CommandBaton::GetDescription(
-    Stream *s, lldb::DescriptionLevel level) const {
+    llvm::raw_ostream &s, lldb::DescriptionLevel level,
+    unsigned indentation) const {
   const CommandData *data = getItem();
 
   if (level == eDescriptionLevelBrief) {
-    s->Printf(", commands = %s",
-              (data && data->user_source.GetSize() > 0) ? "yes" : "no");
+    s << ", commands = %s"
+      << ((data && data->user_source.GetSize() > 0) ? "yes" : "no");
     return;
   }
 
-  s->IndentMore();
-  s->Indent("watchpoint commands:\n");
+  indentation += 2;
+  s.indent(indentation);
+  s << "watchpoint commands:\n";
 
-  s->IndentMore();
+  indentation += 2;
   if (data && data->user_source.GetSize() > 0) {
-    const size_t num_strings = data->user_source.GetSize();
-    for (size_t i = 0; i < num_strings; ++i) {
-      s->Indent(data->user_source.GetStringAtIndex(i));
-      s->EOL();
+    for (const std::string &line : data->user_source) {
+      s.indent(indentation);
+      s << line << "\n";
     }
-  } else {
-    s->PutCString("No commands.\n");
-  }
-  s->IndentLess();
-  s->IndentLess();
+  } else
+    s << "No commands.\n";
 }
diff --git a/src/llvm-project/lldb/source/Commands/CMakeLists.txt b/src/llvm-project/lldb/source/Commands/CMakeLists.txt
index 657da8c..28cbb2c 100644
--- a/src/llvm-project/lldb/source/Commands/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Commands/CMakeLists.txt
@@ -7,7 +7,6 @@
   CommandObjectApropos.cpp
   CommandObjectBreakpoint.cpp
   CommandObjectBreakpointCommand.cpp
-  CommandObjectBugreport.cpp
   CommandObjectCommands.cpp
   CommandObjectDisassemble.cpp
   CommandObjectExpression.cpp
diff --git a/src/llvm-project/lldb/source/Commands/CommandCompletions.cpp b/src/llvm-project/lldb/source/Commands/CommandCompletions.cpp
index 5d2fb3d..d9bee66 100644
--- a/src/llvm-project/lldb/source/Commands/CommandCompletions.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandCompletions.cpp
@@ -6,11 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <sys/stat.h>
-#if defined(__APPLE__) || defined(__linux__)
-#include <pwd.h>
-#endif
-
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/StringSet.h"
 
@@ -23,13 +18,10 @@
 #include "lldb/Interpreter/OptionValueProperties.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/Variable.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Utility/Args.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/TildeExpressionResolver.h"
 
-#include "llvm/ADT/SmallString.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
 
@@ -71,10 +63,9 @@
   return handled;
 }
 
-int CommandCompletions::SourceFiles(CommandInterpreter &interpreter,
-                                    CompletionRequest &request,
-                                    SearchFilter *searcher) {
-  request.SetWordComplete(true);
+void CommandCompletions::SourceFiles(CommandInterpreter &interpreter,
+                                     CompletionRequest &request,
+                                     SearchFilter *searcher) {
   // Find some way to switch "include support files..."
   SourceFileCompleter completer(interpreter, false, request);
 
@@ -85,20 +76,18 @@
   } else {
     completer.DoCompletion(searcher);
   }
-  return request.GetNumberOfMatches();
 }
 
-static int DiskFilesOrDirectories(const llvm::Twine &partial_name,
-                                  bool only_directories, StringList &matches,
-                                  TildeExpressionResolver &Resolver) {
-  matches.Clear();
-
+static void DiskFilesOrDirectories(const llvm::Twine &partial_name,
+                                   bool only_directories,
+                                   CompletionRequest &request,
+                                   TildeExpressionResolver &Resolver) {
   llvm::SmallString<256> CompletionBuffer;
   llvm::SmallString<256> Storage;
   partial_name.toVector(CompletionBuffer);
 
   if (CompletionBuffer.size() >= PATH_MAX)
-    return matches.GetSize();
+    return;
 
   namespace path = llvm::sys::path;
 
@@ -126,10 +115,10 @@
         for (const auto &S : MatchSet) {
           Resolved = S.getKey();
           path::append(Resolved, path::get_separator());
-          matches.AppendString(Resolved);
+          request.AddCompletion(Resolved, "", CompletionMode::Partial);
         }
       }
-      return matches.GetSize();
+      return;
     }
 
     // If there was no trailing slash, then we're done as soon as we resolve
@@ -138,8 +127,8 @@
     if (FirstSep == llvm::StringRef::npos) {
       // Make sure it ends with a separator.
       path::append(CompletionBuffer, path::get_separator());
-      matches.AppendString(CompletionBuffer);
-      return matches.GetSize();
+      request.AddCompletion(CompletionBuffer, "", CompletionMode::Partial);
+      return;
     }
 
     // We want to keep the form the user typed, so we special case this to
@@ -219,51 +208,56 @@
       path::append(CompletionBuffer, path::get_separator());
     }
 
-    matches.AppendString(CompletionBuffer);
+    CompletionMode mode =
+        is_dir ? CompletionMode::Partial : CompletionMode::Normal;
+    request.AddCompletion(CompletionBuffer, "", mode);
   }
-
-  return matches.GetSize();
 }
 
-static int DiskFilesOrDirectories(CompletionRequest &request,
-                                  bool only_directories) {
-  request.SetWordComplete(false);
+static void DiskFilesOrDirectories(const llvm::Twine &partial_name,
+                                   bool only_directories, StringList &matches,
+                                   TildeExpressionResolver &Resolver) {
+  CompletionResult result;
+  std::string partial_name_str = partial_name.str();
+  CompletionRequest request(partial_name_str, partial_name_str.size(), result);
+  DiskFilesOrDirectories(partial_name, only_directories, request, Resolver);
+  result.GetMatches(matches);
+}
+
+static void DiskFilesOrDirectories(CompletionRequest &request,
+                                   bool only_directories) {
   StandardTildeExpressionResolver resolver;
-  StringList matches;
   DiskFilesOrDirectories(request.GetCursorArgumentPrefix(), only_directories,
-                         matches, resolver);
-  request.AddCompletions(matches);
-  return request.GetNumberOfMatches();
+                         request, resolver);
 }
 
-int CommandCompletions::DiskFiles(CommandInterpreter &interpreter,
-                                  CompletionRequest &request,
-                                  SearchFilter *searcher) {
-  return DiskFilesOrDirectories(request, /*only_dirs*/ false);
+void CommandCompletions::DiskFiles(CommandInterpreter &interpreter,
+                                   CompletionRequest &request,
+                                   SearchFilter *searcher) {
+  DiskFilesOrDirectories(request, /*only_dirs*/ false);
 }
 
-int CommandCompletions::DiskFiles(const llvm::Twine &partial_file_name,
-                                  StringList &matches,
-                                  TildeExpressionResolver &Resolver) {
-  return DiskFilesOrDirectories(partial_file_name, false, matches, Resolver);
+void CommandCompletions::DiskFiles(const llvm::Twine &partial_file_name,
+                                   StringList &matches,
+                                   TildeExpressionResolver &Resolver) {
+  DiskFilesOrDirectories(partial_file_name, false, matches, Resolver);
 }
 
-int CommandCompletions::DiskDirectories(CommandInterpreter &interpreter,
-                                        CompletionRequest &request,
-                                        SearchFilter *searcher) {
-  return DiskFilesOrDirectories(request, /*only_dirs*/ true);
+void CommandCompletions::DiskDirectories(CommandInterpreter &interpreter,
+                                         CompletionRequest &request,
+                                         SearchFilter *searcher) {
+  DiskFilesOrDirectories(request, /*only_dirs*/ true);
 }
 
-int CommandCompletions::DiskDirectories(const llvm::Twine &partial_file_name,
-                                        StringList &matches,
-                                        TildeExpressionResolver &Resolver) {
-  return DiskFilesOrDirectories(partial_file_name, true, matches, Resolver);
+void CommandCompletions::DiskDirectories(const llvm::Twine &partial_file_name,
+                                         StringList &matches,
+                                         TildeExpressionResolver &Resolver) {
+  DiskFilesOrDirectories(partial_file_name, true, matches, Resolver);
 }
 
-int CommandCompletions::Modules(CommandInterpreter &interpreter,
-                                CompletionRequest &request,
-                                SearchFilter *searcher) {
-  request.SetWordComplete(true);
+void CommandCompletions::Modules(CommandInterpreter &interpreter,
+                                 CompletionRequest &request,
+                                 SearchFilter *searcher) {
   ModuleCompleter completer(interpreter, request);
 
   if (searcher == nullptr) {
@@ -273,13 +267,11 @@
   } else {
     completer.DoCompletion(searcher);
   }
-  return request.GetNumberOfMatches();
 }
 
-int CommandCompletions::Symbols(CommandInterpreter &interpreter,
-                                CompletionRequest &request,
-                                SearchFilter *searcher) {
-  request.SetWordComplete(true);
+void CommandCompletions::Symbols(CommandInterpreter &interpreter,
+                                 CompletionRequest &request,
+                                 SearchFilter *searcher) {
   SymbolCompleter completer(interpreter, request);
 
   if (searcher == nullptr) {
@@ -289,12 +281,11 @@
   } else {
     completer.DoCompletion(searcher);
   }
-  return request.GetNumberOfMatches();
 }
 
-int CommandCompletions::SettingsNames(CommandInterpreter &interpreter,
-                                      CompletionRequest &request,
-                                      SearchFilter *searcher) {
+void CommandCompletions::SettingsNames(CommandInterpreter &interpreter,
+                                       CompletionRequest &request,
+                                       SearchFilter *searcher) {
   // Cache the full setting name list
   static StringList g_property_names;
   if (g_property_names.GetSize() == 0) {
@@ -309,38 +300,27 @@
     }
   }
 
-  size_t exact_matches_idx = SIZE_MAX;
-  StringList matches;
-  g_property_names.AutoComplete(request.GetCursorArgumentPrefix(), matches,
-                                exact_matches_idx);
-  request.SetWordComplete(exact_matches_idx != SIZE_MAX);
-  request.AddCompletions(matches);
-  return request.GetNumberOfMatches();
+  for (const std::string &s : g_property_names)
+    request.TryCompleteCurrentArg(s);
 }
 
-int CommandCompletions::PlatformPluginNames(CommandInterpreter &interpreter,
-                                            CompletionRequest &request,
-                                            SearchFilter *searcher) {
-  StringList new_matches;
-  std::size_t num_matches = PluginManager::AutoCompletePlatformName(
-      request.GetCursorArgumentPrefix(), new_matches);
-  request.SetWordComplete(num_matches == 1);
-  request.AddCompletions(new_matches);
-  return request.GetNumberOfMatches();
+void CommandCompletions::PlatformPluginNames(CommandInterpreter &interpreter,
+                                             CompletionRequest &request,
+                                             SearchFilter *searcher) {
+  PluginManager::AutoCompletePlatformName(request.GetCursorArgumentPrefix(),
+                                          request);
 }
 
-int CommandCompletions::ArchitectureNames(CommandInterpreter &interpreter,
-                                          CompletionRequest &request,
-                                          SearchFilter *searcher) {
-  const uint32_t num_matches = ArchSpec::AutoComplete(request);
-  request.SetWordComplete(num_matches == 1);
-  return num_matches;
+void CommandCompletions::ArchitectureNames(CommandInterpreter &interpreter,
+                                           CompletionRequest &request,
+                                           SearchFilter *searcher) {
+  ArchSpec::AutoComplete(request);
 }
 
-int CommandCompletions::VariablePath(CommandInterpreter &interpreter,
-                                     CompletionRequest &request,
-                                     SearchFilter *searcher) {
-  return Variable::AutoComplete(interpreter.GetExecutionContext(), request);
+void CommandCompletions::VariablePath(CommandInterpreter &interpreter,
+                                      CompletionRequest &request,
+                                      SearchFilter *searcher) {
+  Variable::AutoComplete(interpreter.GetExecutionContext(), request);
 }
 
 CommandCompletions::Completer::Completer(CommandInterpreter &interpreter,
@@ -368,8 +348,7 @@
 Searcher::CallbackReturn
 CommandCompletions::SourceFileCompleter::SearchCallback(SearchFilter &filter,
                                                         SymbolContext &context,
-                                                        Address *addr,
-                                                        bool complete) {
+                                                        Address *addr) {
   if (context.comp_unit != nullptr) {
     if (m_include_support_files) {
       FileSpecList supporting_files = context.comp_unit->GetSupportFiles();
@@ -391,8 +370,10 @@
         }
       }
     } else {
-      const char *cur_file_name = context.comp_unit->GetFilename().GetCString();
-      const char *cur_dir_name = context.comp_unit->GetDirectory().GetCString();
+      const char *cur_file_name =
+          context.comp_unit->GetPrimaryFile().GetFilename().GetCString();
+      const char *cur_dir_name =
+          context.comp_unit->GetPrimaryFile().GetDirectory().GetCString();
 
       bool match = false;
       if (m_file_name && cur_file_name &&
@@ -404,31 +385,27 @@
         match = false;
 
       if (match) {
-        m_matching_files.AppendIfUnique(context.comp_unit);
+        m_matching_files.AppendIfUnique(context.comp_unit->GetPrimaryFile());
       }
     }
   }
   return Searcher::eCallbackReturnContinue;
 }
 
-size_t
-CommandCompletions::SourceFileCompleter::DoCompletion(SearchFilter *filter) {
+void CommandCompletions::SourceFileCompleter::DoCompletion(
+    SearchFilter *filter) {
   filter->Search(*this);
   // Now convert the filelist to completions:
   for (size_t i = 0; i < m_matching_files.GetSize(); i++) {
     m_request.AddCompletion(
         m_matching_files.GetFileSpecAtIndex(i).GetFilename().GetCString());
   }
-  return m_request.GetNumberOfMatches();
 }
 
 // SymbolCompleter
 
 static bool regex_chars(const char comp) {
-  return (comp == '[' || comp == ']' || comp == '(' || comp == ')' ||
-          comp == '{' || comp == '}' || comp == '+' || comp == '.' ||
-          comp == '*' || comp == '|' || comp == '^' || comp == '$' ||
-          comp == '\\' || comp == '?');
+  return llvm::StringRef("[](){}+.*|^$\\?").contains(comp);
 }
 
 CommandCompletions::SymbolCompleter::SymbolCompleter(
@@ -448,7 +425,7 @@
     pos = regex_str.insert(pos, '\\');
     pos = find_if(pos + 2, regex_str.end(), regex_chars);
   }
-  m_regex.Compile(regex_str);
+  m_regex = RegularExpression(regex_str);
 }
 
 lldb::SearchDepth CommandCompletions::SymbolCompleter::GetDepth() {
@@ -456,22 +433,24 @@
 }
 
 Searcher::CallbackReturn CommandCompletions::SymbolCompleter::SearchCallback(
-    SearchFilter &filter, SymbolContext &context, Address *addr,
-    bool complete) {
+    SearchFilter &filter, SymbolContext &context, Address *addr) {
   if (context.module_sp) {
     SymbolContextList sc_list;
     const bool include_symbols = true;
     const bool include_inlines = true;
-    const bool append = true;
     context.module_sp->FindFunctions(m_regex, include_symbols, include_inlines,
-                                     append, sc_list);
+                                     sc_list);
 
     SymbolContext sc;
     // Now add the functions & symbols to the list - only add if unique:
     for (uint32_t i = 0; i < sc_list.GetSize(); i++) {
       if (sc_list.GetContextAtIndex(i, sc)) {
         ConstString func_name = sc.GetFunctionName(Mangled::ePreferDemangled);
-        if (!func_name.IsEmpty())
+        // Ensure that the function name matches the regex. This is more than a
+        // sanity check. It is possible that the demangled function name does
+        // not start with the prefix, for example when it's in an anonymous
+        // namespace.
+        if (!func_name.IsEmpty() && m_regex.Execute(func_name.GetStringRef()))
           m_match_set.insert(func_name);
       }
     }
@@ -479,13 +458,11 @@
   return Searcher::eCallbackReturnContinue;
 }
 
-size_t CommandCompletions::SymbolCompleter::DoCompletion(SearchFilter *filter) {
+void CommandCompletions::SymbolCompleter::DoCompletion(SearchFilter *filter) {
   filter->Search(*this);
   collection::iterator pos = m_match_set.begin(), end = m_match_set.end();
   for (pos = m_match_set.begin(); pos != end; pos++)
     m_request.AddCompletion((*pos).GetCString());
-
-  return m_request.GetNumberOfMatches();
 }
 
 // ModuleCompleter
@@ -502,8 +479,7 @@
 }
 
 Searcher::CallbackReturn CommandCompletions::ModuleCompleter::SearchCallback(
-    SearchFilter &filter, SymbolContext &context, Address *addr,
-    bool complete) {
+    SearchFilter &filter, SymbolContext &context, Address *addr) {
   if (context.module_sp) {
     const char *cur_file_name =
         context.module_sp->GetFileSpec().GetFilename().GetCString();
@@ -526,7 +502,6 @@
   return Searcher::eCallbackReturnContinue;
 }
 
-size_t CommandCompletions::ModuleCompleter::DoCompletion(SearchFilter *filter) {
+void CommandCompletions::ModuleCompleter::DoCompletion(SearchFilter *filter) {
   filter->Search(*this);
-  return m_request.GetNumberOfMatches();
 }
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectApropos.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectApropos.cpp
index 957de475..15a2073 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectApropos.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectApropos.cpp
@@ -10,7 +10,6 @@
 #include "CommandObjectApropos.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Interpreter/Options.h"
 #include "lldb/Interpreter/Property.h"
 #include "lldb/Utility/Args.h"
 
@@ -44,7 +43,7 @@
   const size_t argc = args.GetArgumentCount();
 
   if (argc == 1) {
-    auto search_word = args[0].ref;
+    auto search_word = args[0].ref();
     if (!search_word.empty()) {
       // The bulk of the work must be done inside the Command Interpreter,
       // since the command dictionary is private.
@@ -63,13 +62,7 @@
         if (commands_found.GetSize() > 0) {
           result.AppendMessageWithFormat(
               "The following commands may relate to '%s':\n", args[0].c_str());
-          size_t max_len = 0;
-
-          for (size_t i = 0; i < commands_found.GetSize(); ++i) {
-            size_t len = strlen(commands_found.GetStringAtIndex(i));
-            if (len > max_len)
-              max_len = len;
-          }
+          const size_t max_len = commands_found.GetMaxStringLength();
 
           for (size_t i = 0; i < commands_found.GetSize(); ++i)
             m_interpreter.OutputFormattedHelpText(
@@ -85,7 +78,7 @@
         const bool dump_qualified_name = true;
         result.AppendMessageWithFormatv(
             "\nThe following settings variables may relate to '{0}': \n\n",
-            args[0].ref);
+            args[0].ref());
         for (size_t i = 0; i < num_properties; ++i)
           properties[i]->DumpDescription(
               m_interpreter, result.GetOutputStream(), 0, dump_qualified_name);
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectBreakpoint.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectBreakpoint.cpp
index c33f383..7c4c50e 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectBreakpoint.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectBreakpoint.cpp
@@ -12,10 +12,10 @@
 #include "lldb/Breakpoint/BreakpointIDList.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Host/OptionParser.h"
-#include "lldb/Interpreter/CommandCompletions.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
+#include "lldb/Interpreter/OptionGroupPythonClassWithDict.h"
 #include "lldb/Interpreter/OptionValueBoolean.h"
 #include "lldb/Interpreter/OptionValueString.h"
 #include "lldb/Interpreter/OptionValueUInt64.h"
@@ -23,7 +23,6 @@
 #include "lldb/Target/Language.h"
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadSpec.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/StreamString.h"
@@ -44,28 +43,13 @@
 
 // Modifiable Breakpoint Options
 #pragma mark Modify::CommandOptions
-static constexpr OptionDefinition g_breakpoint_modify_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "ignore-count", 'i', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCount,       "Set the number of times this breakpoint is skipped before stopping." },
-  { LLDB_OPT_SET_1, false, "one-shot",     'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean,     "The breakpoint is deleted the first time it stop causes a stop." },
-  { LLDB_OPT_SET_1, false, "thread-index", 'x', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadIndex, "The breakpoint stops only for the thread whose index matches this argument." },
-  { LLDB_OPT_SET_1, false, "thread-id",    't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadID,    "The breakpoint stops only for the thread whose TID matches this argument." },
-  { LLDB_OPT_SET_1, false, "thread-name",  'T', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadName,  "The breakpoint stops only for the thread whose thread name matches this argument." },
-  { LLDB_OPT_SET_1, false, "queue-name",   'q', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeQueueName,   "The breakpoint stops only for threads in the queue whose name is given by this argument." },
-  { LLDB_OPT_SET_1, false, "condition",    'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeExpression,  "The breakpoint stops only if this condition expression evaluates to true." },
-  { LLDB_OPT_SET_1, false, "auto-continue",'G', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean,     "The breakpoint will auto-continue after running its commands." },
-  { LLDB_OPT_SET_2, false, "enable",       'e', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,        "Enable the breakpoint." },
-  { LLDB_OPT_SET_3, false, "disable",      'd', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,        "Disable the breakpoint." },
-  { LLDB_OPT_SET_4, false, "command",      'C', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCommand,     "A command to run when the breakpoint is hit, can be provided more than once, the commands will get run in order left to right." },
-    // clang-format on
-};
-class lldb_private::BreakpointOptionGroup : public OptionGroup
-{
+#define LLDB_OPTIONS_breakpoint_modify
+#include "CommandOptions.inc"
+
+class lldb_private::BreakpointOptionGroup : public OptionGroup {
 public:
-  BreakpointOptionGroup() :
-          OptionGroup(),
-          m_bp_opts(false) {}
-  
+  BreakpointOptionGroup() : OptionGroup(), m_bp_opts(false) {}
+
   ~BreakpointOptionGroup() override = default;
 
   llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
@@ -73,9 +57,10 @@
   }
 
   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
-                          ExecutionContext *execution_context) override {
+                        ExecutionContext *execution_context) override {
     Status error;
-    const int short_option = g_breakpoint_modify_options[option_idx].short_option;
+    const int short_option =
+        g_breakpoint_modify_options[option_idx].short_option;
 
     switch (short_option) {
     case 'c':
@@ -102,18 +87,15 @@
         error.SetErrorStringWithFormat(
             "invalid boolean value '%s' passed for -G option",
             option_arg.str().c_str());
-    }
-    break;
-    case 'i':
-    {
+    } break;
+    case 'i': {
       uint32_t ignore_count;
       if (option_arg.getAsInteger(0, ignore_count))
         error.SetErrorStringWithFormat("invalid ignore count '%s'",
                                        option_arg.str().c_str());
       else
         m_bp_opts.SetIgnoreCount(ignore_count);
-    }
-    break;
+    } break;
     case 'o': {
       bool value, success;
       value = OptionArgParser::ToBoolean(option_arg, false, &success);
@@ -124,8 +106,7 @@
             "invalid boolean value '%s' passed for -o option",
             option_arg.str().c_str());
     } break;
-    case 't':
-    {
+    case 't': {
       lldb::tid_t thread_id = LLDB_INVALID_THREAD_ID;
       if (option_arg[0] != '\0') {
         if (option_arg.getAsInteger(0, thread_id))
@@ -133,16 +114,14 @@
                                          option_arg.str().c_str());
       }
       m_bp_opts.SetThreadID(thread_id);
-    }
-    break;
+    } break;
     case 'T':
       m_bp_opts.GetThreadSpec()->SetName(option_arg.str().c_str());
       break;
     case 'q':
       m_bp_opts.GetThreadSpec()->SetQueueName(option_arg.str().c_str());
       break;
-    case 'x':
-    {
+    case 'x': {
       uint32_t thread_index = UINT32_MAX;
       if (option_arg[0] != '\n') {
         if (option_arg.getAsInteger(0, thread_index))
@@ -150,12 +129,9 @@
                                          option_arg.str().c_str());
       }
       m_bp_opts.GetThreadSpec()->SetIndex(thread_index);
-    }
-    break;
+    } break;
     default:
-      error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                     short_option);
-      break;
+      llvm_unreachable("Unimplemented option");
     }
 
     return error;
@@ -165,46 +141,33 @@
     m_bp_opts.Clear();
     m_commands.clear();
   }
-  
-  Status OptionParsingFinished(ExecutionContext *execution_context) override {
-    if (!m_commands.empty())
-    {
-      if (!m_commands.empty())
-      {
-          auto cmd_data = llvm::make_unique<BreakpointOptions::CommandData>();
-        
-          for (std::string &str : m_commands)
-            cmd_data->user_source.AppendString(str); 
 
-          cmd_data->stop_on_error = true;
-          m_bp_opts.SetCommandDataCallback(cmd_data);
-      }
+  Status OptionParsingFinished(ExecutionContext *execution_context) override {
+    if (!m_commands.empty()) {
+      auto cmd_data = std::make_unique<BreakpointOptions::CommandData>();
+
+      for (std::string &str : m_commands)
+        cmd_data->user_source.AppendString(str);
+
+      cmd_data->stop_on_error = true;
+      m_bp_opts.SetCommandDataCallback(cmd_data);
     }
     return Status();
   }
-  
-  const BreakpointOptions &GetBreakpointOptions()
-  {
-    return m_bp_opts;
-  }
+
+  const BreakpointOptions &GetBreakpointOptions() { return m_bp_opts; }
 
   std::vector<std::string> m_commands;
   BreakpointOptions m_bp_opts;
-
-};
-static constexpr OptionDefinition g_breakpoint_dummy_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Act on Dummy breakpoints - i.e. breakpoints set before a file is provided, "
-  "which prime new targets." },
-    // clang-format on
 };
 
-class BreakpointDummyOptionGroup : public OptionGroup
-{
+#define LLDB_OPTIONS_breakpoint_dummy
+#include "CommandOptions.inc"
+
+class BreakpointDummyOptionGroup : public OptionGroup {
 public:
-  BreakpointDummyOptionGroup() :
-          OptionGroup() {}
-  
+  BreakpointDummyOptionGroup() : OptionGroup() {}
+
   ~BreakpointDummyOptionGroup() override = default;
 
   llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
@@ -212,18 +175,17 @@
   }
 
   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
-                          ExecutionContext *execution_context) override {
+                        ExecutionContext *execution_context) override {
     Status error;
-    const int short_option = g_breakpoint_modify_options[option_idx].short_option;
+    const int short_option =
+        g_breakpoint_dummy_options[option_idx].short_option;
 
     switch (short_option) {
-      case 'D':
-        m_use_dummy = true;
-        break;
-    default:
-      error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                     short_option);
+    case 'D':
+      m_use_dummy = true;
       break;
+    default:
+      llvm_unreachable("Unimplemented option");
     }
 
     return error;
@@ -234,91 +196,10 @@
   }
 
   bool m_use_dummy;
-
 };
 
-// If an additional option set beyond LLDB_OPTION_SET_10 is added, make sure to
-// update the numbers passed to LLDB_OPT_SET_FROM_TO(...) appropriately.
-#define LLDB_OPT_NOT_10 (LLDB_OPT_SET_FROM_TO(1, 11) & ~LLDB_OPT_SET_10)
-#define LLDB_OPT_SKIP_PROLOGUE (LLDB_OPT_SET_1 | LLDB_OPT_SET_FROM_TO(3, 8))
-#define LLDB_OPT_FILE (LLDB_OPT_SET_FROM_TO(1, 11) & ~LLDB_OPT_SET_2 & ~LLDB_OPT_SET_10)
-#define LLDB_OPT_OFFSET_APPLIES (LLDB_OPT_SET_FROM_TO(1, 8) & ~LLDB_OPT_SET_2)
-#define LLDB_OPT_MOVE_TO_NEAREST_CODE (LLDB_OPT_SET_1 | LLDB_OPT_SET_9)
-#define LLDB_OPT_EXPR_LANGUAGE (LLDB_OPT_SET_FROM_TO(3, 8))
-
-static constexpr OptionDefinition g_breakpoint_set_options[] = {
-    // clang-format off
-  { LLDB_OPT_NOT_10,               false, "shlib",                  's', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eModuleCompletion,     eArgTypeShlibName,           "Set the breakpoint only in this shared library.  Can repeat this option "
-  "multiple times to specify multiple shared libraries." },
-  { LLDB_OPT_SET_ALL,              false, "hardware",               'H', OptionParser::eNoArgument,       nullptr, {}, 0,                                         eArgTypeNone,                "Require the breakpoint to use hardware breakpoints." },
-  { LLDB_OPT_FILE,                 false, "file",                   'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSourceFileCompletion, eArgTypeFilename,            "Specifies the source file in which to set this breakpoint.  Note, by default "
-  "lldb only looks for files that are #included if they use the standard include "
-  "file extensions.  To set breakpoints on .c/.cpp/.m/.mm files that are "
-  "#included, set target.inline-breakpoint-strategy to \"always\"." },
-  { LLDB_OPT_SET_1,                true,  "line",                   'l', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeLineNum,             "Specifies the line number on which to set this breakpoint." },
-
-  // Comment out this option for the moment, as we don't actually use it, but
-  // will in the future. This way users won't see it, but the infrastructure is
-  // left in place.
-  //    { 0, false, "column",     'C', OptionParser::eRequiredArgument, nullptr, "<column>",
-  //    "Set the breakpoint by source location at this particular column."},
-
-  { LLDB_OPT_SET_2,                true,  "address",                'a', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeAddressOrExpression, "Set the breakpoint at the specified address.  If the address maps uniquely to "
-  "a particular binary, then the address will be converted to a \"file\" "
-  "address, so that the breakpoint will track that binary+offset no matter where "
-  "the binary eventually loads.  Alternately, if you also specify the module - "
-  "with the -s option - then the address will be treated as a file address in "
-  "that module, and resolved accordingly.  Again, this will allow lldb to track "
-  "that offset on subsequent reloads.  The module need not have been loaded at "
-  "the time you specify this breakpoint, and will get resolved when the module "
-  "is loaded." },
-  { LLDB_OPT_SET_3,                true,  "name",                   'n', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSymbolCompletion,     eArgTypeFunctionName,        "Set the breakpoint by function name.  Can be repeated multiple times to make "
-  "one breakpoint for multiple names" },
-  { LLDB_OPT_SET_9,                false, "source-regexp-function", 'X', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSymbolCompletion,     eArgTypeFunctionName,        "When used with '-p' limits the source regex to source contained in the named "
-  "functions.  Can be repeated multiple times." },
-  { LLDB_OPT_SET_4,                true,  "fullname",               'F', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSymbolCompletion,     eArgTypeFullName,            "Set the breakpoint by fully qualified function names. For C++ this means "
-  "namespaces and all arguments, and for Objective-C this means a full function "
-  "prototype with class and selector.  Can be repeated multiple times to make "
-  "one breakpoint for multiple names." },
-  { LLDB_OPT_SET_5,                true,  "selector",               'S', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeSelector,            "Set the breakpoint by ObjC selector name. Can be repeated multiple times to "
-  "make one breakpoint for multiple Selectors." },
-  { LLDB_OPT_SET_6,                true,  "method",                 'M', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeMethod,              "Set the breakpoint by C++ method names.  Can be repeated multiple times to "
-  "make one breakpoint for multiple methods." },
-  { LLDB_OPT_SET_7,                true,  "func-regex",             'r', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeRegularExpression,   "Set the breakpoint by function name, evaluating a regular-expression to find "
-  "the function name(s)." },
-  { LLDB_OPT_SET_8,                true,  "basename",               'b', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSymbolCompletion,     eArgTypeFunctionName,        "Set the breakpoint by function basename (C++ namespaces and arguments will be "
-  "ignored).  Can be repeated multiple times to make one breakpoint for multiple "
-  "symbols." },
-  { LLDB_OPT_SET_9,                true,  "source-pattern-regexp",  'p', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeRegularExpression,   "Set the breakpoint by specifying a regular expression which is matched "
-  "against the source text in a source file or files specified with the -f "
-  "option.  The -f option can be specified more than once.  If no source files "
-  "are specified, uses the current \"default source file\".  If you want to "
-  "match against all source files, pass the \"--all-files\" option." },
-  { LLDB_OPT_SET_9,                false, "all-files",              'A', OptionParser::eNoArgument,       nullptr, {}, 0,                                         eArgTypeNone,                "All files are searched for source pattern matches." },
-  { LLDB_OPT_SET_11,               true, "python-class",            'P', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypePythonClass,       "The name of the class that implement a scripted breakpoint." },
-  { LLDB_OPT_SET_11,               false, "python-class-key",       'k', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeNone,                "The key for a key/value pair passed to the class that implements a scripted breakpoint.  Can be specified more than once." },
-  { LLDB_OPT_SET_11,               false, "python-class-value",     'v', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeNone,                "The value for the previous key in the pair passed to the class that implements a scripted breakpoint.    Can be specified more than once." },
-  { LLDB_OPT_SET_10,               true,  "language-exception",     'E', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeLanguage,            "Set the breakpoint on exceptions thrown by the specified language (without "
-  "options, on throw but not catch.)" },
-  { LLDB_OPT_SET_10,               false, "on-throw",               'w', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeBoolean,             "Set the breakpoint on exception throW." },
-  { LLDB_OPT_SET_10,               false, "on-catch",               'h', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeBoolean,             "Set the breakpoint on exception catcH." },
-
-  //  Don't add this option till it actually does something useful...
-  //    { LLDB_OPT_SET_10, false, "exception-typename", 'O', OptionParser::eRequiredArgument, nullptr, nullptr, 0, eArgTypeTypeName,
-  //        "The breakpoint will only stop if an exception Object of this type is thrown.  Can be repeated multiple times to stop for multiple object types" },
-
-  { LLDB_OPT_EXPR_LANGUAGE,        false, "language",               'L', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeLanguage,            "Specifies the Language to use when interpreting the breakpoint's expression "
-  "(note: currently only implemented for setting breakpoints on identifiers).  "
-  "If not set the target.language setting is used." },
-  { LLDB_OPT_SKIP_PROLOGUE,        false, "skip-prologue",          'K', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeBoolean,             "sKip the prologue if the breakpoint is at the beginning of a function.  "
-  "If not set the target.skip-prologue setting is used." },
-  { LLDB_OPT_SET_ALL,              false, "breakpoint-name",        'N', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeBreakpointName,      "Adds this to the list of names for this breakpoint." },
-  { LLDB_OPT_OFFSET_APPLIES,       false, "address-slide",          'R', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeAddress,             "Add the specified offset to whatever address(es) the breakpoint resolves to.  "
-  "At present this applies the offset directly as given, and doesn't try to align it to instruction boundaries." },
-  { LLDB_OPT_MOVE_TO_NEAREST_CODE, false, "move-to-nearest-code", 'm', OptionParser::eRequiredArgument,   nullptr, {}, 0,                                         eArgTypeBoolean,             "Move breakpoints to nearest code. If not set the target.move-to-nearest-code "
-  "setting is used." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_breakpoint_set
+#include "CommandOptions.inc"
 
 // CommandObjectBreakpointSet
 
@@ -340,15 +221,18 @@
             interpreter, "breakpoint set",
             "Sets a breakpoint or set of breakpoints in the executable.",
             "breakpoint set <cmd-options>"),
-        m_bp_opts(), m_options() {
-          // We're picking up all the normal options, commands and disable.
-          m_all_options.Append(&m_bp_opts, 
-                               LLDB_OPT_SET_1 | LLDB_OPT_SET_3 | LLDB_OPT_SET_4, 
-                               LLDB_OPT_SET_ALL);
-          m_all_options.Append(&m_dummy_options, LLDB_OPT_SET_1, LLDB_OPT_SET_ALL);
-          m_all_options.Append(&m_options);
-          m_all_options.Finalize();
-        }
+        m_bp_opts(), m_python_class_options("scripted breakpoint", true, 'P'),
+        m_options() {
+    // We're picking up all the normal options, commands and disable.
+    m_all_options.Append(&m_python_class_options,
+                         LLDB_OPT_SET_1 | LLDB_OPT_SET_2, LLDB_OPT_SET_11);
+    m_all_options.Append(&m_bp_opts,
+                         LLDB_OPT_SET_1 | LLDB_OPT_SET_3 | LLDB_OPT_SET_4,
+                         LLDB_OPT_SET_ALL);
+    m_all_options.Append(&m_dummy_options, LLDB_OPT_SET_1, LLDB_OPT_SET_ALL);
+    m_all_options.Append(&m_options);
+    m_all_options.Finalize();
+  }
 
   ~CommandObjectBreakpointSet() override = default;
 
@@ -357,21 +241,23 @@
   class CommandOptions : public OptionGroup {
   public:
     CommandOptions()
-        : OptionGroup(), m_condition(), m_filenames(), m_line_num(0), m_column(0),
-          m_func_names(), m_func_name_type_mask(eFunctionNameTypeNone),
-          m_func_regexp(), m_source_text_regexp(), m_modules(), m_load_addr(),
-          m_catch_bp(false), m_throw_bp(true), m_hardware(false),
+        : OptionGroup(), m_condition(), m_filenames(), m_line_num(0),
+          m_column(0), m_func_names(),
+          m_func_name_type_mask(eFunctionNameTypeNone), m_func_regexp(),
+          m_source_text_regexp(), m_modules(), m_load_addr(), m_catch_bp(false),
+          m_throw_bp(true), m_hardware(false),
           m_exception_language(eLanguageTypeUnknown),
           m_language(lldb::eLanguageTypeUnknown),
-          m_skip_prologue(eLazyBoolCalculate),
-          m_all_files(false), m_move_to_nearest_code(eLazyBoolCalculate) {}
+          m_skip_prologue(eLazyBoolCalculate), m_all_files(false),
+          m_move_to_nearest_code(eLazyBoolCalculate) {}
 
     ~CommandOptions() override = default;
 
     Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
                           ExecutionContext *execution_context) override {
       Status error;
-      const int short_option = g_breakpoint_set_options[option_idx].short_option;
+      const int short_option =
+          g_breakpoint_set_options[option_idx].short_option;
 
       switch (short_option) {
       case 'a': {
@@ -437,7 +323,7 @@
         m_func_names.push_back(option_arg);
         m_func_name_type_mask |= eFunctionNameTypeFull;
         break;
-        
+
       case 'h': {
         bool success;
         m_catch_bp = OptionArgParser::ToBoolean(option_arg, true, &success);
@@ -450,15 +336,7 @@
       case 'H':
         m_hardware = true;
         break;
-        
-      case 'k': {
-          if (m_current_key.empty())
-            m_current_key.assign(option_arg);
-          else
-            error.SetErrorStringWithFormat("Key: %s missing value.",
-                                            m_current_key.c_str());
-        
-      } break;
+
       case 'K': {
         bool success;
         bool value;
@@ -539,10 +417,6 @@
       case 'p':
         m_source_text_regexp.assign(option_arg);
         break;
-        
-      case 'P':
-        m_python_class.assign(option_arg);
-        break;
 
       case 'r':
         m_func_regexp.assign(option_arg);
@@ -557,16 +431,6 @@
         m_func_name_type_mask |= eFunctionNameTypeSelector;
         break;
 
-      case 'v': {
-          if (!m_current_key.empty()) {
-              m_extra_args_sp->AddStringItem(m_current_key, option_arg);
-              m_current_key.clear();
-          }
-          else
-            error.SetErrorStringWithFormat("Value \"%s\" missing matching key.",
-                                           option_arg.str().c_str());
-      } break;
-        
       case 'w': {
         bool success;
         m_throw_bp = OptionArgParser::ToBoolean(option_arg, true, &success);
@@ -581,9 +445,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -611,8 +473,6 @@
       m_exception_extra_args.Clear();
       m_move_to_nearest_code = eLazyBoolCalculate;
       m_source_regex_func_names.clear();
-      m_python_class.clear();
-      m_extra_args_sp = std::make_shared<StructuredData::Dictionary>();
       m_current_key.clear();
     }
 
@@ -644,21 +504,12 @@
     Args m_exception_extra_args;
     LazyBool m_move_to_nearest_code;
     std::unordered_set<std::string> m_source_regex_func_names;
-    std::string m_python_class;
-    StructuredData::DictionarySP m_extra_args_sp;
     std::string m_current_key;
   };
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget(m_dummy_options.m_use_dummy);
-
-    if (target == nullptr) {
-      result.AppendError("Invalid target.  Must set target before setting "
-                         "breakpoints (see 'target create' command).");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target &target = GetSelectedOrDummyTarget(m_dummy_options.m_use_dummy);
 
     // The following are the various types of breakpoints that could be set:
     //   1).  -f -l -p  [-s -g]   (setting breakpoint by source location)
@@ -673,7 +524,7 @@
 
     BreakpointSetType break_type = eSetTypeInvalid;
 
-    if (!m_options.m_python_class.empty())
+    if (!m_python_class_options.GetName().empty())
       break_type = eSetTypeScripted;
     else if (m_options.m_line_num != 0)
       break_type = eSetTypeFileAndLine;
@@ -720,16 +571,11 @@
       // Only check for inline functions if
       LazyBool check_inlines = eLazyBoolCalculate;
 
-      bp_sp = target->CreateBreakpoint(&(m_options.m_modules), 
-                                       file,
-                                       m_options.m_line_num,
-                                       m_options.m_column,
-                                       m_options.m_offset_addr,
-                                       check_inlines, 
-                                       m_options.m_skip_prologue,
-                                       internal, 
-                                       m_options.m_hardware,
-                                       m_options.m_move_to_nearest_code);
+      bp_sp = target.CreateBreakpoint(
+          &(m_options.m_modules), file, m_options.m_line_num,
+          m_options.m_column, m_options.m_offset_addr, check_inlines,
+          m_options.m_skip_prologue, internal, m_options.m_hardware,
+          m_options.m_move_to_nearest_code);
     } break;
 
     case eSetTypeAddress: // Breakpoint by address
@@ -741,12 +587,11 @@
       if (num_modules_specified == 1) {
         const FileSpec *file_spec =
             m_options.m_modules.GetFileSpecPointerAtIndex(0);
-        bp_sp = target->CreateAddressInModuleBreakpoint(m_options.m_load_addr,
-                                                        internal, file_spec,
-                                                        m_options.m_hardware);
+        bp_sp = target.CreateAddressInModuleBreakpoint(
+            m_options.m_load_addr, internal, file_spec, m_options.m_hardware);
       } else if (num_modules_specified == 0) {
-        bp_sp = target->CreateBreakpoint(m_options.m_load_addr, internal,
-                                         m_options.m_hardware);
+        bp_sp = target.CreateBreakpoint(m_options.m_load_addr, internal,
+                                        m_options.m_hardware);
       } else {
         result.AppendError("Only one shared library can be specified for "
                            "address breakpoints.");
@@ -762,40 +607,30 @@
       if (name_type_mask == 0)
         name_type_mask = eFunctionNameTypeAuto;
 
-      bp_sp = target->CreateBreakpoint(&(m_options.m_modules), 
-                                       &(m_options.m_filenames),
-                                       m_options.m_func_names, 
-                                       name_type_mask, 
-                                       m_options.m_language,
-                                       m_options.m_offset_addr, 
-                                       m_options.m_skip_prologue, 
-                                       internal,
-                                       m_options.m_hardware);
+      bp_sp = target.CreateBreakpoint(
+          &(m_options.m_modules), &(m_options.m_filenames),
+          m_options.m_func_names, name_type_mask, m_options.m_language,
+          m_options.m_offset_addr, m_options.m_skip_prologue, internal,
+          m_options.m_hardware);
     } break;
 
     case eSetTypeFunctionRegexp: // Breakpoint by regular expression function
                                  // name
-      {
-        RegularExpression regexp(m_options.m_func_regexp);
-        if (!regexp.IsValid()) {
-          char err_str[1024];
-          regexp.GetErrorAsCString(err_str, sizeof(err_str));
-          result.AppendErrorWithFormat(
-              "Function name regular expression could not be compiled: \"%s\"",
-              err_str);
-          result.SetStatus(eReturnStatusFailed);
-          return false;
-        }
-
-        bp_sp = target->CreateFuncRegexBreakpoint(&(m_options.m_modules), 
-                                                  &(m_options.m_filenames), 
-                                                  regexp,
-                                                  m_options.m_language, 
-                                                  m_options.m_skip_prologue, 
-                                                  internal,
-                                                  m_options.m_hardware);
+    {
+      RegularExpression regexp(m_options.m_func_regexp);
+      if (llvm::Error err = regexp.GetError()) {
+        result.AppendErrorWithFormat(
+            "Function name regular expression could not be compiled: \"%s\"",
+            llvm::toString(std::move(err)).c_str());
+        result.SetStatus(eReturnStatusFailed);
+        return false;
       }
-      break;
+
+      bp_sp = target.CreateFuncRegexBreakpoint(
+          &(m_options.m_modules), &(m_options.m_filenames), std::move(regexp),
+          m_options.m_language, m_options.m_skip_prologue, internal,
+          m_options.m_hardware);
+    } break;
     case eSetTypeSourceRegexp: // Breakpoint by regexp on source text.
     {
       const size_t num_files = m_options.m_filenames.GetSize();
@@ -813,39 +648,29 @@
       }
 
       RegularExpression regexp(m_options.m_source_text_regexp);
-      if (!regexp.IsValid()) {
-        char err_str[1024];
-        regexp.GetErrorAsCString(err_str, sizeof(err_str));
+      if (llvm::Error err = regexp.GetError()) {
         result.AppendErrorWithFormat(
             "Source text regular expression could not be compiled: \"%s\"",
-            err_str);
+            llvm::toString(std::move(err)).c_str());
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
-      bp_sp = 
-          target->CreateSourceRegexBreakpoint(&(m_options.m_modules), 
-                                              &(m_options.m_filenames),
-                                              m_options
-                                                  .m_source_regex_func_names,
-                                              regexp,
-                                              internal,
-                                              m_options.m_hardware,
-                                              m_options.m_move_to_nearest_code);
+      bp_sp = target.CreateSourceRegexBreakpoint(
+          &(m_options.m_modules), &(m_options.m_filenames),
+          m_options.m_source_regex_func_names, std::move(regexp), internal,
+          m_options.m_hardware, m_options.m_move_to_nearest_code);
     } break;
     case eSetTypeException: {
       Status precond_error;
-      bp_sp = target->CreateExceptionBreakpoint(m_options.m_exception_language, 
-                                                m_options.m_catch_bp,
-                                                m_options.m_throw_bp, 
-                                                internal,
-                                                &m_options
-                                                    .m_exception_extra_args, 
-                                                &precond_error);
+      bp_sp = target.CreateExceptionBreakpoint(
+          m_options.m_exception_language, m_options.m_catch_bp,
+          m_options.m_throw_bp, internal, &m_options.m_exception_extra_args,
+          &precond_error);
       if (precond_error.Fail()) {
         result.AppendErrorWithFormat(
             "Error setting extra exception arguments: %s",
             precond_error.AsCString());
-        target->RemoveBreakpointByID(bp_sp->GetID());
+        target.RemoveBreakpointByID(bp_sp->GetID());
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
@@ -853,18 +678,14 @@
     case eSetTypeScripted: {
 
       Status error;
-      bp_sp = target->CreateScriptedBreakpoint(m_options.m_python_class,
-                                               &(m_options.m_modules), 
-                                               &(m_options.m_filenames),
-                                               false,
-                                               m_options.m_hardware,
-                                               m_options.m_extra_args_sp,
-                                               &error);
+      bp_sp = target.CreateScriptedBreakpoint(
+          m_python_class_options.GetName().c_str(), &(m_options.m_modules),
+          &(m_options.m_filenames), false, m_options.m_hardware,
+          m_python_class_options.GetStructuredData(), &error);
       if (error.Fail()) {
         result.AppendErrorWithFormat(
-            "Error setting extra exception arguments: %s",
-            error.AsCString());
-        target->RemoveBreakpointByID(bp_sp->GetID());
+            "Error setting extra exception arguments: %s", error.AsCString());
+        target.RemoveBreakpointByID(bp_sp->GetID());
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
@@ -880,24 +701,24 @@
       if (!m_options.m_breakpoint_names.empty()) {
         Status name_error;
         for (auto name : m_options.m_breakpoint_names) {
-          target->AddNameToBreakpoint(bp_sp, name.c_str(), name_error);
+          target.AddNameToBreakpoint(bp_sp, name.c_str(), name_error);
           if (name_error.Fail()) {
             result.AppendErrorWithFormat("Invalid breakpoint name: %s",
                                          name.c_str());
-            target->RemoveBreakpointByID(bp_sp->GetID());
+            target.RemoveBreakpointByID(bp_sp->GetID());
             result.SetStatus(eReturnStatusFailed);
             return false;
           }
         }
       }
     }
-    
+
     if (bp_sp) {
       Stream &output_stream = result.GetOutputStream();
       const bool show_locations = false;
       bp_sp->GetDescription(&output_stream, lldb::eDescriptionLevelInitial,
-                         show_locations);
-      if (target == GetDebugger().GetDummyTarget())
+                            show_locations);
+      if (&target == &GetDummyTarget())
         output_stream.Printf("Breakpoint set in dummy target, will get copied "
                              "into future targets.\n");
       else {
@@ -919,12 +740,12 @@
   }
 
 private:
-  bool GetDefaultFile(Target *target, FileSpec &file,
+  bool GetDefaultFile(Target &target, FileSpec &file,
                       CommandReturnObject &result) {
     uint32_t default_line;
     // First use the Source Manager's default file. Then use the current stack
     // frame's file.
-    if (!target->GetSourceManager().GetDefaultFileAndLine(file, default_line)) {
+    if (!target.GetSourceManager().GetDefaultFileAndLine(file, default_line)) {
       StackFrame *cur_frame = m_exe_ctx.GetFramePtr();
       if (cur_frame == nullptr) {
         result.AppendError(
@@ -954,6 +775,7 @@
 
   BreakpointOptionGroup m_bp_opts;
   BreakpointDummyOptionGroup m_dummy_options;
+  OptionGroupPythonClassWithDict m_python_class_options;
   CommandOptions m_options;
   OptionGroupOptions m_all_options;
 };
@@ -979,9 +801,9 @@
     // Add the entry for the first argument for this command to the object's
     // arguments vector.
     m_arguments.push_back(arg);
-    
-    m_options.Append(&m_bp_opts, 
-                     LLDB_OPT_SET_1 | LLDB_OPT_SET_2 | LLDB_OPT_SET_3, 
+
+    m_options.Append(&m_bp_opts,
+                     LLDB_OPT_SET_1 | LLDB_OPT_SET_2 | LLDB_OPT_SET_3,
                      LLDB_OPT_SET_ALL);
     m_options.Append(&m_dummy_opts, LLDB_OPT_SET_1, LLDB_OPT_SET_ALL);
     m_options.Finalize();
@@ -993,20 +815,15 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget(m_dummy_opts.m_use_dummy);
-    if (target == nullptr) {
-      result.AppendError("Invalid target.  No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target &target = GetSelectedOrDummyTarget(m_dummy_opts.m_use_dummy);
 
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
     BreakpointIDList valid_bp_ids;
 
     CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
-        command, target, result, &valid_bp_ids, 
+        command, &target, result, &valid_bp_ids,
         BreakpointName::Permissions::PermissionKinds::disablePerm);
 
     if (result.Succeeded()) {
@@ -1016,16 +833,16 @@
 
         if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
           Breakpoint *bp =
-              target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
+              target.GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
           if (cur_bp_id.GetLocationID() != LLDB_INVALID_BREAK_ID) {
             BreakpointLocation *location =
                 bp->FindLocationByID(cur_bp_id.GetLocationID()).get();
             if (location)
-              location->GetLocationOptions()
-                  ->CopyOverSetOptions(m_bp_opts.GetBreakpointOptions());
+              location->GetLocationOptions()->CopyOverSetOptions(
+                  m_bp_opts.GetBreakpointOptions());
           } else {
-            bp->GetOptions()
-                ->CopyOverSetOptions(m_bp_opts.GetBreakpointOptions());
+            bp->GetOptions()->CopyOverSetOptions(
+                m_bp_opts.GetBreakpointOptions());
           }
         }
       }
@@ -1062,17 +879,12 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
-    if (target == nullptr) {
-      result.AppendError("Invalid target.  No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target &target = GetSelectedOrDummyTarget();
 
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
-    const BreakpointList &breakpoints = target->GetBreakpointList();
+    const BreakpointList &breakpoints = target.GetBreakpointList();
 
     size_t num_breakpoints = breakpoints.GetSize();
 
@@ -1084,7 +896,7 @@
 
     if (command.empty()) {
       // No breakpoint selected; enable all currently set breakpoints.
-      target->EnableAllowedBreakpoints();
+      target.EnableAllowedBreakpoints();
       result.AppendMessageWithFormat("All breakpoints enabled. (%" PRIu64
                                      " breakpoints)\n",
                                      (uint64_t)num_breakpoints);
@@ -1093,7 +905,7 @@
       // Particular breakpoint selected; enable that breakpoint.
       BreakpointIDList valid_bp_ids;
       CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
-          command, target, result, &valid_bp_ids, 
+          command, &target, result, &valid_bp_ids,
           BreakpointName::Permissions::PermissionKinds::disablePerm);
 
       if (result.Succeeded()) {
@@ -1105,7 +917,7 @@
 
           if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
             Breakpoint *breakpoint =
-                target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
+                target.GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
             if (cur_bp_id.GetLocationID() != LLDB_INVALID_BREAK_ID) {
               BreakpointLocation *location =
                   breakpoint->FindLocationByID(cur_bp_id.GetLocationID()).get();
@@ -1175,17 +987,11 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
-    if (target == nullptr) {
-      result.AppendError("Invalid target.  No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
-
+    Target &target = GetSelectedOrDummyTarget();
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
-    const BreakpointList &breakpoints = target->GetBreakpointList();
+    const BreakpointList &breakpoints = target.GetBreakpointList();
     size_t num_breakpoints = breakpoints.GetSize();
 
     if (num_breakpoints == 0) {
@@ -1196,7 +1002,7 @@
 
     if (command.empty()) {
       // No breakpoint selected; disable all currently set breakpoints.
-      target->DisableAllowedBreakpoints();
+      target.DisableAllowedBreakpoints();
       result.AppendMessageWithFormat("All breakpoints disabled. (%" PRIu64
                                      " breakpoints)\n",
                                      (uint64_t)num_breakpoints);
@@ -1206,7 +1012,7 @@
       BreakpointIDList valid_bp_ids;
 
       CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
-          command, target, result, &valid_bp_ids, 
+          command, &target, result, &valid_bp_ids,
           BreakpointName::Permissions::PermissionKinds::disablePerm);
 
       if (result.Succeeded()) {
@@ -1218,7 +1024,7 @@
 
           if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
             Breakpoint *breakpoint =
-                target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
+                target.GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
             if (cur_bp_id.GetLocationID() != LLDB_INVALID_BREAK_ID) {
               BreakpointLocation *location =
                   breakpoint->FindLocationByID(cur_bp_id.GetLocationID()).get();
@@ -1245,12 +1051,8 @@
 // CommandObjectBreakpointList
 
 #pragma mark List::CommandOptions
-static constexpr OptionDefinition g_breakpoint_list_options[] = {
-  // FIXME: We need to add an "internal" command, and then add this sort of
-  // thing to it. But I need to see it for now, and don't want to wait.
 #define LLDB_OPTIONS_breakpoint_list
 #include "CommandOptions.inc"
-};
 
 #pragma mark List
 
@@ -1311,9 +1113,7 @@
         m_internal = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1339,18 +1139,12 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
-
-    if (target == nullptr) {
-      result.AppendError("Invalid target. No current target or breakpoints.");
-      result.SetStatus(eReturnStatusSuccessFinishNoResult);
-      return true;
-    }
+    Target &target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
 
     const BreakpointList &breakpoints =
-        target->GetBreakpointList(m_options.m_internal);
+        target.GetBreakpointList(m_options.m_internal);
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList(m_options.m_internal).GetListMutex(lock);
+    target.GetBreakpointList(m_options.m_internal).GetListMutex(lock);
 
     size_t num_breakpoints = breakpoints.GetSize();
 
@@ -1368,7 +1162,7 @@
       for (size_t i = 0; i < num_breakpoints; ++i) {
         Breakpoint *breakpoint = breakpoints.GetBreakpointAtIndex(i).get();
         if (breakpoint->AllowList())
-          AddBreakpointDescription(&output_stream, breakpoint, 
+          AddBreakpointDescription(&output_stream, breakpoint,
                                    m_options.m_level);
       }
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
@@ -1376,14 +1170,14 @@
       // Particular breakpoints selected; show info about that breakpoint.
       BreakpointIDList valid_bp_ids;
       CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
-          command, target, result, &valid_bp_ids, 
+          command, &target, result, &valid_bp_ids,
           BreakpointName::Permissions::PermissionKinds::listPerm);
 
       if (result.Succeeded()) {
         for (size_t i = 0; i < valid_bp_ids.GetSize(); ++i) {
           BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex(i);
           Breakpoint *breakpoint =
-              target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
+              target.GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
           AddBreakpointDescription(&output_stream, breakpoint,
                                    m_options.m_level);
         }
@@ -1404,12 +1198,8 @@
 // CommandObjectBreakpointClear
 #pragma mark Clear::CommandOptions
 
-static constexpr OptionDefinition g_breakpoint_clear_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "file", 'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "Specify the breakpoint by source location in this particular file." },
-  { LLDB_OPT_SET_1, true,  "line", 'l', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeLineNum,  "Specify the breakpoint by source location at this particular line." }
-    // clang-format on
-};
+#define LLDB_OPTIONS_breakpoint_clear
+#include "CommandOptions.inc"
 
 #pragma mark Clear
 
@@ -1449,9 +1239,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1474,12 +1262,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
-    if (target == nullptr) {
-      result.AppendError("Invalid target. No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target &target = GetSelectedOrDummyTarget();
 
     // The following are the various types of breakpoints that could be
     // cleared:
@@ -1491,9 +1274,9 @@
       break_type = eClearTypeFileAndLine;
 
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
-    BreakpointList &breakpoints = target->GetBreakpointList();
+    BreakpointList &breakpoints = target.GetBreakpointList();
     size_t num_breakpoints = breakpoints.GetSize();
 
     // Early return if there's no breakpoint at all.
@@ -1527,7 +1310,7 @@
           if (loc_coll.GetSize() == 0) {
             bp->GetDescription(&ss, lldb::eDescriptionLevelBrief);
             ss.EOL();
-            target->RemoveBreakpointByID(bp->GetID());
+            target.RemoveBreakpointByID(bp->GetID());
             ++num_cleared;
           }
         }
@@ -1557,12 +1340,8 @@
 };
 
 // CommandObjectBreakpointDelete
-static constexpr OptionDefinition g_breakpoint_delete_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "force",             'f', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Delete all breakpoints without querying for confirmation." },
-  { LLDB_OPT_SET_1, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Delete Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_breakpoint_delete
+#include "CommandOptions.inc"
 
 #pragma mark Delete
 
@@ -1607,9 +1386,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1631,18 +1408,12 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
-
-    if (target == nullptr) {
-      result.AppendError("Invalid target. No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target &target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
 
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
-    const BreakpointList &breakpoints = target->GetBreakpointList();
+    const BreakpointList &breakpoints = target.GetBreakpointList();
 
     size_t num_breakpoints = breakpoints.GetSize();
 
@@ -1659,7 +1430,7 @@
               true)) {
         result.AppendMessage("Operation cancelled...");
       } else {
-        target->RemoveAllowedBreakpoints();
+        target.RemoveAllowedBreakpoints();
         result.AppendMessageWithFormat(
             "All breakpoints removed. (%" PRIu64 " breakpoint%s)\n",
             (uint64_t)num_breakpoints, num_breakpoints > 1 ? "s" : "");
@@ -1669,7 +1440,7 @@
       // Particular breakpoint selected; disable that breakpoint.
       BreakpointIDList valid_bp_ids;
       CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
-          command, target, result, &valid_bp_ids, 
+          command, &target, result, &valid_bp_ids,
           BreakpointName::Permissions::PermissionKinds::deletePerm);
 
       if (result.Succeeded()) {
@@ -1682,7 +1453,7 @@
           if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
             if (cur_bp_id.GetLocationID() != LLDB_INVALID_BREAK_ID) {
               Breakpoint *breakpoint =
-                  target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
+                  target.GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
               BreakpointLocation *location =
                   breakpoint->FindLocationByID(cur_bp_id.GetLocationID()).get();
               // It makes no sense to try to delete individual locations, so we
@@ -1692,7 +1463,7 @@
                 ++disable_count;
               }
             } else {
-              target->RemoveBreakpointByID(cur_bp_id.GetBreakpointID());
+              target.RemoveBreakpointByID(cur_bp_id.GetBreakpointID());
               ++delete_count;
             }
           }
@@ -1711,15 +1482,9 @@
 };
 
 // CommandObjectBreakpointName
+#define LLDB_OPTIONS_breakpoint_name
+#include "CommandOptions.inc"
 
-static constexpr OptionDefinition g_breakpoint_name_options[] = {
-    // clang-format off
-  {LLDB_OPT_SET_1, false, "name",              'N', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBreakpointName, "Specifies a breakpoint name to use."},
-  {LLDB_OPT_SET_2, false, "breakpoint-id",     'B', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBreakpointID,   "Specify a breakpoint ID to use."},
-  {LLDB_OPT_SET_3, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,           "Operate on Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets."},
-  {LLDB_OPT_SET_4, false, "help-string",       'H', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeNone,           "A help string describing the purpose of this name."},
-    // clang-format on
-};
 class BreakpointNameOptionGroup : public OptionGroup {
 public:
   BreakpointNameOptionGroup()
@@ -1760,9 +1525,7 @@
       break;
 
     default:
-      error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                     short_option);
-      break;
+      llvm_unreachable("Unimplemented option");
     }
     return error;
   }
@@ -1781,13 +1544,8 @@
   OptionValueString m_help_string;
 };
 
-static constexpr OptionDefinition g_breakpoint_access_options[] = {
-    // clang-format off
-  {LLDB_OPT_SET_1,   false, "allow-list",    'L', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Determines whether the breakpoint will show up in break list if not referred to explicitly."},
-  {LLDB_OPT_SET_2,   false, "allow-disable", 'A', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Determines whether the breakpoint can be disabled by name or when all breakpoints are disabled."},
-  {LLDB_OPT_SET_3,   false, "allow-delete",  'D', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Determines whether the breakpoint can be deleted by name or when all breakpoints are deleted."},
-    // clang-format on
-};
+#define LLDB_OPTIONS_breakpoint_access
+#include "CommandOptions.inc"
 
 class BreakpointAccessOptionGroup : public OptionGroup {
 public:
@@ -1801,61 +1559,61 @@
   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
                         ExecutionContext *execution_context) override {
     Status error;
-    const int short_option 
-        = g_breakpoint_access_options[option_idx].short_option;
+    const int short_option =
+        g_breakpoint_access_options[option_idx].short_option;
 
     switch (short_option) {
-      case 'L': {
-        bool value, success;
-        value = OptionArgParser::ToBoolean(option_arg, false, &success);
-        if (success) {
-          m_permissions.SetAllowList(value);
-        } else
-          error.SetErrorStringWithFormat(
-              "invalid boolean value '%s' passed for -L option",
-              option_arg.str().c_str());
-      } break;
-      case 'A': {
-        bool value, success;
-        value = OptionArgParser::ToBoolean(option_arg, false, &success);
-        if (success) {
-          m_permissions.SetAllowDisable(value);
-        } else
-          error.SetErrorStringWithFormat(
-              "invalid boolean value '%s' passed for -L option",
-              option_arg.str().c_str());
-      } break;
-      case 'D': {
-        bool value, success;
-        value = OptionArgParser::ToBoolean(option_arg, false, &success);
-        if (success) {
-          m_permissions.SetAllowDelete(value);
-        } else
-          error.SetErrorStringWithFormat(
-              "invalid boolean value '%s' passed for -L option",
-              option_arg.str().c_str());
-      } break;
-
+    case 'L': {
+      bool value, success;
+      value = OptionArgParser::ToBoolean(option_arg, false, &success);
+      if (success) {
+        m_permissions.SetAllowList(value);
+      } else
+        error.SetErrorStringWithFormat(
+            "invalid boolean value '%s' passed for -L option",
+            option_arg.str().c_str());
+    } break;
+    case 'A': {
+      bool value, success;
+      value = OptionArgParser::ToBoolean(option_arg, false, &success);
+      if (success) {
+        m_permissions.SetAllowDisable(value);
+      } else
+        error.SetErrorStringWithFormat(
+            "invalid boolean value '%s' passed for -L option",
+            option_arg.str().c_str());
+    } break;
+    case 'D': {
+      bool value, success;
+      value = OptionArgParser::ToBoolean(option_arg, false, &success);
+      if (success) {
+        m_permissions.SetAllowDelete(value);
+      } else
+        error.SetErrorStringWithFormat(
+            "invalid boolean value '%s' passed for -L option",
+            option_arg.str().c_str());
+    } break;
+    default:
+      llvm_unreachable("Unimplemented option");
     }
-    
+
     return error;
   }
-  
-  void OptionParsingStarting(ExecutionContext *execution_context) override {
-  }
-  
-  const BreakpointName::Permissions &GetPermissions() const
-  {
+
+  void OptionParsingStarting(ExecutionContext *execution_context) override {}
+
+  const BreakpointName::Permissions &GetPermissions() const {
     return m_permissions;
   }
-  BreakpointName::Permissions m_permissions;  
+  BreakpointName::Permissions m_permissions;
 };
 
 class CommandObjectBreakpointNameConfigure : public CommandObjectParsed {
 public:
   CommandObjectBreakpointNameConfigure(CommandInterpreter &interpreter)
       : CommandObjectParsed(
-            interpreter, "configure", "Configure the options for the breakpoint"
+            interpreter, "configure",
+            "Configure the options for the breakpoint"
             " name provided.  "
             "If you provide a breakpoint id, the options will be copied from "
             "the breakpoint, otherwise only the options specified will be set "
@@ -1872,14 +1630,10 @@
     arg1.push_back(id_arg);
     m_arguments.push_back(arg1);
 
-    m_option_group.Append(&m_bp_opts, 
-                          LLDB_OPT_SET_ALL, 
-                          LLDB_OPT_SET_1);
-    m_option_group.Append(&m_access_options, 
-                          LLDB_OPT_SET_ALL, 
+    m_option_group.Append(&m_bp_opts, LLDB_OPT_SET_ALL, LLDB_OPT_SET_1);
+    m_option_group.Append(&m_access_options, LLDB_OPT_SET_ALL,
                           LLDB_OPT_SET_ALL);
-    m_option_group.Append(&m_bp_id, 
-                          LLDB_OPT_SET_2|LLDB_OPT_SET_4, 
+    m_option_group.Append(&m_bp_id, LLDB_OPT_SET_2 | LLDB_OPT_SET_4,
                           LLDB_OPT_SET_ALL);
     m_option_group.Finalize();
   }
@@ -1897,24 +1651,16 @@
       result.SetStatus(eReturnStatusFailed);
       return false;
     }
-    
-    Target *target =
-        GetSelectedOrDummyTarget(false);
 
-    if (target == nullptr) {
-      result.AppendError("Invalid target. No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target &target = GetSelectedOrDummyTarget(false);
 
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
     // Make a pass through first to see that all the names are legal.
     for (auto &entry : command.entries()) {
       Status error;
-      if (!BreakpointID::StringIsBreakpointName(entry.ref, error))
-      {
+      if (!BreakpointID::StringIsBreakpointName(entry.ref(), error)) {
         result.AppendErrorWithFormat("Invalid breakpoint name: %s - %s",
                                      entry.c_str(), error.AsCString());
         result.SetStatus(eReturnStatusFailed);
@@ -1924,14 +1670,12 @@
     // Now configure them, we already pre-checked the names so we don't need to
     // check the error:
     BreakpointSP bp_sp;
-    if (m_bp_id.m_breakpoint.OptionWasSet())
-    {
+    if (m_bp_id.m_breakpoint.OptionWasSet()) {
       lldb::break_id_t bp_id = m_bp_id.m_breakpoint.GetUInt64Value();
-      bp_sp = target->GetBreakpointByID(bp_id);
-      if (!bp_sp)
-      {
+      bp_sp = target.GetBreakpointByID(bp_id);
+      if (!bp_sp) {
         result.AppendErrorWithFormatv("Could not find specified breakpoint {0}",
-                           bp_id);
+                                      bp_id);
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
@@ -1940,18 +1684,17 @@
     Status error;
     for (auto &entry : command.entries()) {
       ConstString name(entry.c_str());
-      BreakpointName *bp_name = target->FindBreakpointName(name, true, error);
+      BreakpointName *bp_name = target.FindBreakpointName(name, true, error);
       if (!bp_name)
         continue;
       if (m_bp_id.m_help_string.OptionWasSet())
         bp_name->SetHelp(m_bp_id.m_help_string.GetStringValue().str().c_str());
-      
+
       if (bp_sp)
-        target->ConfigureBreakpointName(*bp_name,
-                                       *bp_sp->GetOptions(),
+        target.ConfigureBreakpointName(*bp_name, *bp_sp->GetOptions(),
                                        m_access_options.GetPermissions());
       else
-        target->ConfigureBreakpointName(*bp_name,
+        target.ConfigureBreakpointName(*bp_name,
                                        m_bp_opts.GetBreakpointOptions(),
                                        m_access_options.GetPermissions());
     }
@@ -1996,19 +1739,13 @@
       return false;
     }
 
-    Target *target =
+    Target &target =
         GetSelectedOrDummyTarget(m_name_options.m_use_dummy.GetCurrentValue());
 
-    if (target == nullptr) {
-      result.AppendError("Invalid target. No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
-
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
-    const BreakpointList &breakpoints = target->GetBreakpointList();
+    const BreakpointList &breakpoints = target.GetBreakpointList();
 
     size_t num_breakpoints = breakpoints.GetSize();
     if (num_breakpoints == 0) {
@@ -2020,7 +1757,7 @@
     // Particular breakpoint selected; disable that breakpoint.
     BreakpointIDList valid_bp_ids;
     CommandObjectMultiwordBreakpoint::VerifyBreakpointIDs(
-        command, target, result, &valid_bp_ids, 
+        command, &target, result, &valid_bp_ids,
         BreakpointName::Permissions::PermissionKinds::listPerm);
 
     if (result.Succeeded()) {
@@ -2031,13 +1768,13 @@
       }
       size_t num_valid_ids = valid_bp_ids.GetSize();
       const char *bp_name = m_name_options.m_name.GetCurrentValue();
-      Status error; // This error reports illegal names, but we've already 
+      Status error; // This error reports illegal names, but we've already
                     // checked that, so we don't need to check it again here.
       for (size_t index = 0; index < num_valid_ids; index++) {
         lldb::break_id_t bp_id =
             valid_bp_ids.GetBreakpointIDAtIndex(index).GetBreakpointID();
         BreakpointSP bp_sp = breakpoints.FindBreakpointByID(bp_id);
-        target->AddNameToBreakpoint(bp_sp, bp_name, error);
+        target.AddNameToBreakpoint(bp_sp, bp_name, error);
       }
     }
 
@@ -2081,19 +1818,13 @@
       return false;
     }
 
-    Target *target =
+    Target &target =
         GetSelectedOrDummyTarget(m_name_options.m_use_dummy.GetCurrentValue());
 
-    if (target == nullptr) {
-      result.AppendError("Invalid target. No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
-
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
-    const BreakpointList &breakpoints = target->GetBreakpointList();
+    const BreakpointList &breakpoints = target.GetBreakpointList();
 
     size_t num_breakpoints = breakpoints.GetSize();
     if (num_breakpoints == 0) {
@@ -2105,7 +1836,7 @@
     // Particular breakpoint selected; disable that breakpoint.
     BreakpointIDList valid_bp_ids;
     CommandObjectMultiwordBreakpoint::VerifyBreakpointIDs(
-        command, target, result, &valid_bp_ids, 
+        command, &target, result, &valid_bp_ids,
         BreakpointName::Permissions::PermissionKinds::deletePerm);
 
     if (result.Succeeded()) {
@@ -2120,7 +1851,7 @@
         lldb::break_id_t bp_id =
             valid_bp_ids.GetBreakpointIDAtIndex(index).GetBreakpointID();
         BreakpointSP bp_sp = breakpoints.FindBreakpointByID(bp_id);
-        target->RemoveNameFromBreakpoint(bp_sp, bp_name);
+        target.RemoveNameFromBreakpoint(bp_sp, bp_name);
       }
     }
 
@@ -2151,26 +1882,18 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target =
+    Target &target =
         GetSelectedOrDummyTarget(m_name_options.m_use_dummy.GetCurrentValue());
 
-    if (target == nullptr) {
-      result.AppendError("Invalid target. No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
-    
-    
     std::vector<std::string> name_list;
     if (command.empty()) {
-      target->GetBreakpointNames(name_list);
+      target.GetBreakpointNames(name_list);
     } else {
-      for (const Args::ArgEntry &arg : command)
-      {
+      for (const Args::ArgEntry &arg : command) {
         name_list.push_back(arg.c_str());
       }
     }
-    
+
     if (name_list.empty()) {
       result.AppendMessage("No breakpoint names found.");
     } else {
@@ -2178,22 +1901,19 @@
         const char *name = name_str.c_str();
         // First print out the options for the name:
         Status error;
-        BreakpointName *bp_name = target->FindBreakpointName(ConstString(name),
-                                                             false,
-                                                             error);
-        if (bp_name)
-        {
+        BreakpointName *bp_name =
+            target.FindBreakpointName(ConstString(name), false, error);
+        if (bp_name) {
           StreamString s;
           result.AppendMessageWithFormat("Name: %s\n", name);
-          if (bp_name->GetDescription(&s, eDescriptionLevelFull))
-          {
+          if (bp_name->GetDescription(&s, eDescriptionLevelFull)) {
             result.AppendMessage(s.GetString());
           }
-        
-          std::unique_lock<std::recursive_mutex> lock;
-          target->GetBreakpointList().GetListMutex(lock);
 
-          BreakpointList &breakpoints = target->GetBreakpointList();
+          std::unique_lock<std::recursive_mutex> lock;
+          target.GetBreakpointList().GetListMutex(lock);
+
+          BreakpointList &breakpoints = target.GetBreakpointList();
           bool any_set = false;
           for (BreakpointSP bp_sp : breakpoints.Breakpoints()) {
             if (bp_sp->MatchesName(name)) {
@@ -2246,12 +1966,8 @@
 
 // CommandObjectBreakpointRead
 #pragma mark Read::CommandOptions
-static constexpr OptionDefinition g_breakpoint_read_options[] = {
-    // clang-format off
-  {LLDB_OPT_SET_ALL, true,  "file",                   'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eDiskFileCompletion, eArgTypeFilename,       "The file from which to read the breakpoints." },
-  {LLDB_OPT_SET_ALL, false, "breakpoint-name",        'N', OptionParser::eRequiredArgument, nullptr, {}, 0,                                       eArgTypeBreakpointName, "Only read in breakpoints with this name."},
-    // clang-format on
-};
+#define LLDB_OPTIONS_breakpoint_read
+#include "CommandOptions.inc"
 
 #pragma mark Read
 
@@ -2301,9 +2017,7 @@
         break;
       }
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -2326,21 +2040,16 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
-    if (target == nullptr) {
-      result.AppendError("Invalid target.  No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target &target = GetSelectedOrDummyTarget();
 
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
     FileSpec input_spec(m_options.m_filename);
     FileSystem::Instance().Resolve(input_spec);
     BreakpointIDList new_bps;
-    Status error = target->CreateBreakpointsFromFile(
-        input_spec, m_options.m_names, new_bps);
+    Status error = target.CreateBreakpointsFromFile(input_spec,
+                                                    m_options.m_names, new_bps);
 
     if (!error.Success()) {
       result.AppendError(error.AsCString());
@@ -2358,7 +2067,7 @@
       result.AppendMessage("New breakpoints:");
       for (size_t i = 0; i < num_breakpoints; ++i) {
         BreakpointID bp_id = new_bps.GetBreakpointIDAtIndex(i);
-        Breakpoint *bp = target->GetBreakpointList()
+        Breakpoint *bp = target.GetBreakpointList()
                              .FindBreakpointByID(bp_id.GetBreakpointID())
                              .get();
         if (bp)
@@ -2375,12 +2084,8 @@
 
 // CommandObjectBreakpointWrite
 #pragma mark Write::CommandOptions
-static constexpr OptionDefinition g_breakpoint_write_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, true,  "file",  'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eDiskFileCompletion, eArgTypeFilename,    "The file into which to write the breakpoints." },
-  { LLDB_OPT_SET_ALL, false, "append",'a', OptionParser::eNoArgument,       nullptr, {}, 0,                                       eArgTypeNone,        "Append to saved breakpoints file if it exists."},
-    // clang-format on
-};
+#define LLDB_OPTIONS_breakpoint_write
+#include "CommandOptions.inc"
 
 #pragma mark Write
 class CommandObjectBreakpointWrite : public CommandObjectParsed {
@@ -2423,9 +2128,7 @@
         m_append = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -2448,20 +2151,15 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
-    if (target == nullptr) {
-      result.AppendError("Invalid target.  No existing target or breakpoints.");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target &target = GetSelectedOrDummyTarget();
 
     std::unique_lock<std::recursive_mutex> lock;
-    target->GetBreakpointList().GetListMutex(lock);
+    target.GetBreakpointList().GetListMutex(lock);
 
     BreakpointIDList valid_bp_ids;
     if (!command.empty()) {
       CommandObjectMultiwordBreakpoint::VerifyBreakpointIDs(
-          command, target, result, &valid_bp_ids, 
+          command, &target, result, &valid_bp_ids,
           BreakpointName::Permissions::PermissionKinds::listPerm);
 
       if (!result.Succeeded()) {
@@ -2471,8 +2169,8 @@
     }
     FileSpec file_spec(m_options.m_filename);
     FileSystem::Instance().Resolve(file_spec);
-    Status error = target->SerializeBreakpointsToFile(file_spec, valid_bp_ids,
-                                                      m_options.m_append);
+    Status error = target.SerializeBreakpointsToFile(file_spec, valid_bp_ids,
+                                                     m_options.m_append);
     if (!error.Success()) {
       result.AppendErrorWithFormat("error serializing breakpoints: %s.",
                                    error.AsCString());
@@ -2544,13 +2242,10 @@
 
 CommandObjectMultiwordBreakpoint::~CommandObjectMultiwordBreakpoint() = default;
 
-void CommandObjectMultiwordBreakpoint::VerifyIDs(Args &args, Target *target,
-                                                 bool allow_locations,
-                                                 CommandReturnObject &result,
-                                                 BreakpointIDList *valid_ids,
-                                                 BreakpointName::Permissions
-                                                     ::PermissionKinds 
-                                                     purpose) {
+void CommandObjectMultiwordBreakpoint::VerifyIDs(
+    Args &args, Target *target, bool allow_locations,
+    CommandReturnObject &result, BreakpointIDList *valid_ids,
+    BreakpointName::Permissions ::PermissionKinds purpose) {
   // args can be strings representing 1). integers (for breakpoint ids)
   //                                  2). the full breakpoint & location
   //                                  canonical representation
@@ -2583,7 +2278,7 @@
   // breakpoint ids in the range, and shove all of those breakpoint id strings
   // into TEMP_ARGS.
 
-  BreakpointIDList::FindAndReplaceIDRanges(args, target, allow_locations, 
+  BreakpointIDList::FindAndReplaceIDRanges(args, target, allow_locations,
                                            purpose, result, temp_args);
 
   // NOW, convert the list of breakpoint id strings in TEMP_ARGS into an actual
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectBreakpoint.h b/src/llvm-project/lldb/source/Commands/CommandObjectBreakpoint.h
index cba1f3f..b29bbc0 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectBreakpoint.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectBreakpoint.h
@@ -10,16 +10,8 @@
 #define liblldb_CommandObjectBreakpoint_h_
 
 
-#include <utility>
-#include <vector>
-
-#include "lldb/lldb-private.h"
 #include "lldb/Breakpoint/BreakpointName.h"
-#include "lldb/Core/Address.h"
-#include "lldb/Core/STLUtils.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Interpreter/Options.h"
-
 
 namespace lldb_private {
 
@@ -31,19 +23,17 @@
 
   ~CommandObjectMultiwordBreakpoint() override;
 
-  static void VerifyBreakpointOrLocationIDs(Args &args, Target *target,
-                                            CommandReturnObject &result,
-                                            BreakpointIDList *valid_ids,
-                                            BreakpointName::Permissions
-                                                 ::PermissionKinds purpose) {
+  static void VerifyBreakpointOrLocationIDs(
+      Args &args, Target *target, CommandReturnObject &result,
+      BreakpointIDList *valid_ids,
+      BreakpointName::Permissions ::PermissionKinds purpose) {
     VerifyIDs(args, target, true, result, valid_ids, purpose);
   }
 
-  static void VerifyBreakpointIDs(Args &args, Target *target,
-                                  CommandReturnObject &result,
-                                  BreakpointIDList *valid_ids,
-                                  BreakpointName::Permissions::PermissionKinds 
-                                      purpose) {
+  static void
+  VerifyBreakpointIDs(Args &args, Target *target, CommandReturnObject &result,
+                      BreakpointIDList *valid_ids,
+                      BreakpointName::Permissions::PermissionKinds purpose) {
     VerifyIDs(args, target, false, result, valid_ids, purpose);
   }
 
@@ -51,8 +41,7 @@
   static void VerifyIDs(Args &args, Target *target, bool allow_locations,
                         CommandReturnObject &result,
                         BreakpointIDList *valid_ids,
-                        BreakpointName::Permissions::PermissionKinds 
-                                      purpose);
+                        BreakpointName::Permissions::PermissionKinds purpose);
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 3f9d83c..bbd2ca5 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -11,48 +11,49 @@
 #include "lldb/Breakpoint/Breakpoint.h"
 #include "lldb/Breakpoint/BreakpointIDList.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Breakpoint/StoppointCallbackContext.h"
 #include "lldb/Core/IOHandler.h"
 #include "lldb/Host/OptionParser.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
+#include "lldb/Interpreter/OptionGroupPythonClassWithDict.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/State.h"
-
-#include "llvm/ADT/STLExtras.h"
 
 using namespace lldb;
 using namespace lldb_private;
 
-// CommandObjectBreakpointCommandAdd
-
 // FIXME: "script-type" needs to have its contents determined dynamically, so
-// somebody can add a new scripting
-// language to lldb and have it pickable here without having to change this
-// enumeration by hand and rebuild lldb proper.
-
+// somebody can add a new scripting language to lldb and have it pickable here
+// without having to change this enumeration by hand and rebuild lldb proper.
 static constexpr OptionEnumValueElement g_script_option_enumeration[] = {
-    {eScriptLanguageNone, "command",
-     "Commands are in the lldb command interpreter language"},
-    {eScriptLanguagePython, "python", "Commands are in the Python language."},
-    {eSortOrderByName, "default-script",
-     "Commands are in the default scripting language."} };
+    {
+        eScriptLanguageNone,
+        "command",
+        "Commands are in the lldb command interpreter language",
+    },
+    {
+        eScriptLanguagePython,
+        "python",
+        "Commands are in the Python language.",
+    },
+    {
+        eScriptLanguageLua,
+        "lua",
+        "Commands are in the Lua language.",
+    },
+    {
+        eScriptLanguageDefault,
+        "default-script",
+        "Commands are in the default scripting language.",
+    },
+};
 
 static constexpr OptionEnumValues ScriptOptionEnum() {
   return OptionEnumValues(g_script_option_enumeration);
 }
 
-static constexpr OptionDefinition g_breakpoint_add_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1,   false, "one-liner",         'o', OptionParser::eRequiredArgument, nullptr, {},                 0, eArgTypeOneLiner,       "Specify a one-line breakpoint command inline. Be sure to surround it with quotes." },
-  { LLDB_OPT_SET_ALL, false, "stop-on-error",     'e', OptionParser::eRequiredArgument, nullptr, {},                 0, eArgTypeBoolean,        "Specify whether breakpoint command execution should terminate on error." },
-  { LLDB_OPT_SET_ALL, false, "script-type",       's', OptionParser::eRequiredArgument, nullptr, ScriptOptionEnum(), 0, eArgTypeNone,           "Specify the language for the commands - if none is specified, the lldb command interpreter will be used." },
-  { LLDB_OPT_SET_2,   false, "python-function",   'F', OptionParser::eRequiredArgument, nullptr, {},                 0, eArgTypePythonFunction, "Give the name of a Python function to run as command for this breakpoint. Be sure to give a module name if appropriate." },
-  { LLDB_OPT_SET_ALL, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument,       nullptr, {},                 0, eArgTypeNone,           "Sets Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_breakpoint_command_add
+#include "CommandOptions.inc"
 
 class CommandObjectBreakpointCommandAdd : public CommandObjectParsed,
                                           public IOHandlerDelegateMultiline {
@@ -66,7 +67,7 @@
                             nullptr),
         IOHandlerDelegateMultiline("DONE",
                                    IOHandlerDelegate::Completion::LLDBCommand),
-        m_options() {
+        m_options(), m_func_options("breakpoint command", false, 'F') {
     SetHelpLong(
         R"(
 General information about entering breakpoint commands
@@ -201,6 +202,11 @@
         "Final Note: A warning that no breakpoint command was generated when there \
 are no syntax errors may indicate that a function was declared but never called.");
 
+    m_all_options.Append(&m_options);
+    m_all_options.Append(&m_func_options, LLDB_OPT_SET_2 | LLDB_OPT_SET_3,
+                         LLDB_OPT_SET_2);
+    m_all_options.Finalize();
+
     CommandArgumentEntry arg;
     CommandArgumentData bp_id_arg;
 
@@ -218,10 +224,10 @@
 
   ~CommandObjectBreakpointCommandAdd() override = default;
 
-  Options *GetOptions() override { return &m_options; }
+  Options *GetOptions() override { return &m_all_options; }
 
   void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
-    StreamFileSP output_sp(io_handler.GetOutputStreamFile());
+    StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
     if (output_sp && interactive) {
       output_sp->PutCString(g_reader_instructions);
       output_sp->Flush();
@@ -238,7 +244,7 @@
       if (!bp_options)
         continue;
 
-      auto cmd_data = llvm::make_unique<BreakpointOptions::CommandData>();
+      auto cmd_data = std::make_unique<BreakpointOptions::CommandData>();
       cmd_data->user_source.SplitIntoLines(line.c_str(), line.size());
       bp_options->SetCommandDataCallback(cmd_data);
     }
@@ -250,7 +256,6 @@
     m_interpreter.GetLLDBCommandsFromIOHandler(
         "> ",             // Prompt
         *this,            // IOHandlerDelegate
-        true,             // Run IOHandler in async mode
         &bp_options_vec); // Baton for the "io_handler" that will be passed back
                           // into our IOHandlerDelegate functions
   }
@@ -260,7 +265,7 @@
   SetBreakpointCommandCallback(std::vector<BreakpointOptions *> &bp_options_vec,
                                const char *oneliner) {
     for (auto bp_options : bp_options_vec) {
-      auto cmd_data = llvm::make_unique<BreakpointOptions::CommandData>();
+      auto cmd_data = std::make_unique<BreakpointOptions::CommandData>();
 
       cmd_data->user_source.AppendString(oneliner);
       cmd_data->stop_on_error = m_options.m_stop_on_error;
@@ -269,19 +274,20 @@
     }
   }
 
-  class CommandOptions : public Options {
+  class CommandOptions : public OptionGroup {
   public:
     CommandOptions()
-        : Options(), m_use_commands(false), m_use_script_language(false),
+        : OptionGroup(), m_use_commands(false), m_use_script_language(false),
           m_script_language(eScriptLanguageNone), m_use_one_liner(false),
-          m_one_liner(), m_function_name() {}
+          m_one_liner() {}
 
     ~CommandOptions() override = default;
 
     Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
                           ExecutionContext *execution_context) override {
       Status error;
-      const int short_option = m_getopt_table[option_idx].val;
+      const int short_option =
+          g_breakpoint_command_add_options[option_idx].short_option;
 
       switch (short_option) {
       case 'o':
@@ -291,14 +297,18 @@
 
       case 's':
         m_script_language = (lldb::ScriptLanguage)OptionArgParser::ToOptionEnum(
-            option_arg, g_breakpoint_add_options[option_idx].enum_values,
+            option_arg,
+            g_breakpoint_command_add_options[option_idx].enum_values,
             eScriptLanguageNone, error);
-
-        if (m_script_language == eScriptLanguagePython ||
-            m_script_language == eScriptLanguageDefault) {
+        switch (m_script_language) {
+        case eScriptLanguagePython:
+        case eScriptLanguageLua:
           m_use_script_language = true;
-        } else {
+          break;
+        case eScriptLanguageNone:
+        case eScriptLanguageUnknown:
           m_use_script_language = false;
+          break;
         }
         break;
 
@@ -312,18 +322,12 @@
               option_arg.str().c_str());
       } break;
 
-      case 'F':
-        m_use_one_liner = false;
-        m_use_script_language = true;
-        m_function_name.assign(option_arg);
-        break;
-
       case 'D':
         m_use_dummy = true;
         break;
 
       default:
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -336,12 +340,11 @@
       m_use_one_liner = false;
       m_stop_on_error = true;
       m_one_liner.clear();
-      m_function_name.clear();
       m_use_dummy = false;
     }
 
     llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
-      return llvm::makeArrayRef(g_breakpoint_add_options);
+      return llvm::makeArrayRef(g_breakpoint_command_add_options);
     }
 
     // Instance variables to hold the values for command options.
@@ -354,22 +357,14 @@
     bool m_use_one_liner;
     std::string m_one_liner;
     bool m_stop_on_error;
-    std::string m_function_name;
     bool m_use_dummy;
   };
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
+    Target &target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
 
-    if (target == nullptr) {
-      result.AppendError("There is not a current executable; there are no "
-                         "breakpoints to which to add commands");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
-
-    const BreakpointList &breakpoints = target->GetBreakpointList();
+    const BreakpointList &breakpoints = target.GetBreakpointList();
     size_t num_breakpoints = breakpoints.GetSize();
 
     if (num_breakpoints == 0) {
@@ -378,17 +373,17 @@
       return false;
     }
 
-    if (!m_options.m_use_script_language &&
-        !m_options.m_function_name.empty()) {
-      result.AppendError("need to enable scripting to have a function run as a "
-                         "breakpoint command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
+    if (!m_func_options.GetName().empty()) {
+      m_options.m_use_one_liner = false;
+      if (!m_options.m_use_script_language) {
+        m_options.m_script_language = GetDebugger().GetScriptLanguage();
+        m_options.m_use_script_language = true;
+      }
     }
 
     BreakpointIDList valid_bp_ids;
     CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
-        command, target, result, &valid_bp_ids,
+        command, &target, result, &valid_bp_ids,
         BreakpointName::Permissions::PermissionKinds::listPerm);
 
     m_bp_options_vec.clear();
@@ -400,7 +395,7 @@
         BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex(i);
         if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
           Breakpoint *bp =
-              target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
+              target.GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
           BreakpointOptions *bp_options = nullptr;
           if (cur_bp_id.GetLocationID() == LLDB_INVALID_BREAK_ID) {
             // This breakpoint does not have an associated location.
@@ -422,14 +417,18 @@
       // to set or collect command callback.  Otherwise, call the methods
       // associated with this object.
       if (m_options.m_use_script_language) {
-        ScriptInterpreter *script_interp = GetDebugger().GetScriptInterpreter();
+        ScriptInterpreter *script_interp = GetDebugger().GetScriptInterpreter(
+            /*can_create=*/true, m_options.m_script_language);
         // Special handling for one-liner specified inline.
         if (m_options.m_use_one_liner) {
           script_interp->SetBreakpointCommandCallback(
               m_bp_options_vec, m_options.m_one_liner.c_str());
-        } else if (!m_options.m_function_name.empty()) {
-          script_interp->SetBreakpointCommandCallbackFunction(
-              m_bp_options_vec, m_options.m_function_name.c_str());
+        } else if (!m_func_options.GetName().empty()) {
+          Status error = script_interp->SetBreakpointCommandCallbackFunction(
+              m_bp_options_vec, m_func_options.GetName().c_str(),
+              m_func_options.GetStructuredData());
+          if (!error.Success())
+            result.SetError(error);
         } else {
           script_interp->CollectDataForBreakpointCommandCallback(
               m_bp_options_vec, result);
@@ -449,6 +448,9 @@
 
 private:
   CommandOptions m_options;
+  OptionGroupPythonClassWithDict m_func_options;
+  OptionGroupOptions m_all_options;
+
   std::vector<BreakpointOptions *> m_bp_options_vec; // This stores the
                                                      // breakpoint options that
                                                      // we are currently
@@ -469,11 +471,8 @@
 
 // CommandObjectBreakpointCommandDelete
 
-static constexpr OptionDefinition g_breakpoint_delete_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "dummy-breakpoints", 'D', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Delete commands from Dummy breakpoints - i.e. breakpoints set before a file is provided, which prime new targets." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_breakpoint_command_delete
+#include "CommandOptions.inc"
 
 class CommandObjectBreakpointCommandDelete : public CommandObjectParsed {
 public:
@@ -518,9 +517,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -531,7 +528,7 @@
     }
 
     llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
-      return llvm::makeArrayRef(g_breakpoint_delete_options);
+      return llvm::makeArrayRef(g_breakpoint_command_delete_options);
     }
 
     // Instance variables to hold the values for command options.
@@ -540,16 +537,9 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
+    Target &target = GetSelectedOrDummyTarget(m_options.m_use_dummy);
 
-    if (target == nullptr) {
-      result.AppendError("There is not a current executable; there are no "
-                         "breakpoints from which to delete commands");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
-
-    const BreakpointList &breakpoints = target->GetBreakpointList();
+    const BreakpointList &breakpoints = target.GetBreakpointList();
     size_t num_breakpoints = breakpoints.GetSize();
 
     if (num_breakpoints == 0) {
@@ -567,7 +557,7 @@
 
     BreakpointIDList valid_bp_ids;
     CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
-        command, target, result, &valid_bp_ids, 
+        command, &target, result, &valid_bp_ids,
         BreakpointName::Permissions::PermissionKinds::listPerm);
 
     if (result.Succeeded()) {
@@ -576,7 +566,7 @@
         BreakpointID cur_bp_id = valid_bp_ids.GetBreakpointIDAtIndex(i);
         if (cur_bp_id.GetBreakpointID() != LLDB_INVALID_BREAK_ID) {
           Breakpoint *bp =
-              target->GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
+              target.GetBreakpointByID(cur_bp_id.GetBreakpointID()).get();
           if (cur_bp_id.GetLocationID() != LLDB_INVALID_BREAK_ID) {
             BreakpointLocationSP bp_loc_sp(
                 bp->FindLocationByID(cur_bp_id.GetLocationID()));
@@ -607,10 +597,10 @@
 class CommandObjectBreakpointCommandList : public CommandObjectParsed {
 public:
   CommandObjectBreakpointCommandList(CommandInterpreter &interpreter)
-      : CommandObjectParsed(interpreter, "list", "List the script or set of "
-                                                 "commands to be executed when "
-                                                 "the breakpoint is hit.",
-                            nullptr) {
+      : CommandObjectParsed(interpreter, "list",
+                            "List the script or set of commands to be "
+                            "executed when the breakpoint is hit.",
+                            nullptr, eCommandRequiresTarget) {
     CommandArgumentEntry arg;
     CommandArgumentData bp_id_arg;
 
@@ -630,14 +620,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-
-    if (target == nullptr) {
-      result.AppendError("There is not a current executable; there are no "
-                         "breakpoints for which to list commands");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target *target = &GetSelectedTarget();
 
     const BreakpointList &breakpoints = target->GetBreakpointList();
     size_t num_breakpoints = breakpoints.GetSize();
@@ -657,7 +640,7 @@
 
     BreakpointIDList valid_bp_ids;
     CommandObjectMultiwordBreakpoint::VerifyBreakpointOrLocationIDs(
-        command, target, result, &valid_bp_ids, 
+        command, target, result, &valid_bp_ids,
         BreakpointName::Permissions::PermissionKinds::listPerm);
 
     if (result.Succeeded()) {
@@ -671,9 +654,8 @@
           if (bp) {
             BreakpointLocationSP bp_loc_sp;
             if (cur_bp_id.GetLocationID() != LLDB_INVALID_BREAK_ID) {
-                  bp_loc_sp = bp->FindLocationByID(cur_bp_id.GetLocationID());
-              if (!bp_loc_sp)
-              {
+              bp_loc_sp = bp->FindLocationByID(cur_bp_id.GetLocationID());
+              if (!bp_loc_sp) {
                 result.AppendErrorWithFormat("Invalid breakpoint ID: %u.%u.\n",
                                              cur_bp_id.GetBreakpointID(),
                                              cur_bp_id.GetLocationID());
@@ -688,19 +670,20 @@
                                                 cur_bp_id.GetLocationID());
             const Baton *baton = nullptr;
             if (bp_loc_sp)
-              baton = bp_loc_sp
-               ->GetOptionsSpecifyingKind(BreakpointOptions::eCallback)
-               ->GetBaton();
+              baton =
+                  bp_loc_sp
+                      ->GetOptionsSpecifyingKind(BreakpointOptions::eCallback)
+                      ->GetBaton();
             else
               baton = bp->GetOptions()->GetBaton();
 
             if (baton) {
               result.GetOutputStream().Printf("Breakpoint %s:\n",
                                               id_str.GetData());
-              result.GetOutputStream().IndentMore();
-              baton->GetDescription(&result.GetOutputStream(),
-                                    eDescriptionLevelFull);
-              result.GetOutputStream().IndentLess();
+              baton->GetDescription(result.GetOutputStream().AsRawOstream(),
+                                    eDescriptionLevelFull,
+                                    result.GetOutputStream().GetIndentLevel() +
+                                        2);
             } else {
               result.AppendMessageWithFormat(
                   "Breakpoint %s does not have an associated command.\n",
@@ -725,9 +708,10 @@
 CommandObjectBreakpointCommand::CommandObjectBreakpointCommand(
     CommandInterpreter &interpreter)
     : CommandObjectMultiword(
-          interpreter, "command", "Commands for adding, removing and listing "
-                                  "LLDB commands executed when a breakpoint is "
-                                  "hit.",
+          interpreter, "command",
+          "Commands for adding, removing and listing "
+          "LLDB commands executed when a breakpoint is "
+          "hit.",
           "command <sub-command> [<sub-command-options>] <breakpoint-id>") {
   CommandObjectSP add_command_object(
       new CommandObjectBreakpointCommandAdd(interpreter));
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectBreakpointCommand.h b/src/llvm-project/lldb/source/Commands/CommandObjectBreakpointCommand.h
index b18e003..fb246d4 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectBreakpointCommand.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectBreakpointCommand.h
@@ -9,13 +9,7 @@
 #ifndef liblldb_CommandObjectBreakpointCommand_h_
 #define liblldb_CommandObjectBreakpointCommand_h_
 
-
-
-#include "lldb/Interpreter/CommandObject.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Interpreter/Options.h"
-#include "lldb/lldb-types.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectBugreport.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectBugreport.cpp
deleted file mode 100644
index 515cc9a..0000000
--- a/src/llvm-project/lldb/source/Commands/CommandObjectBugreport.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-//===-- CommandObjectBugreport.cpp ------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "CommandObjectBugreport.h"
-
-#include <cstdio>
-
-
-#include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Interpreter/OptionGroupOutputFile.h"
-#include "lldb/Target/Thread.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-// "bugreport unwind"
-
-class CommandObjectBugreportUnwind : public CommandObjectParsed {
-public:
-  CommandObjectBugreportUnwind(CommandInterpreter &interpreter)
-      : CommandObjectParsed(
-            interpreter, "bugreport unwind",
-            "Create a bugreport for a bug in the stack unwinding code.",
-            nullptr),
-        m_option_group(), m_outfile_options() {
-    m_option_group.Append(&m_outfile_options, LLDB_OPT_SET_ALL,
-                          LLDB_OPT_SET_1 | LLDB_OPT_SET_2 | LLDB_OPT_SET_3);
-    m_option_group.Finalize();
-  }
-
-  ~CommandObjectBugreportUnwind() override {}
-
-  Options *GetOptions() override { return &m_option_group; }
-
-protected:
-  bool DoExecute(Args &command, CommandReturnObject &result) override {
-    StringList commands;
-    commands.AppendString("thread backtrace");
-
-    Thread *thread = m_exe_ctx.GetThreadPtr();
-    if (thread) {
-      char command_buffer[256];
-
-      uint32_t frame_count = thread->GetStackFrameCount();
-      for (uint32_t i = 0; i < frame_count; ++i) {
-        StackFrameSP frame = thread->GetStackFrameAtIndex(i);
-        lldb::addr_t pc = frame->GetStackID().GetPC();
-
-        snprintf(command_buffer, sizeof(command_buffer),
-                 "disassemble --bytes --address 0x%" PRIx64, pc);
-        commands.AppendString(command_buffer);
-
-        snprintf(command_buffer, sizeof(command_buffer),
-                 "image show-unwind --address 0x%" PRIx64, pc);
-        commands.AppendString(command_buffer);
-      }
-    }
-
-    const FileSpec &outfile_spec =
-        m_outfile_options.GetFile().GetCurrentValue();
-    if (outfile_spec) {
-
-      uint32_t open_options =
-          File::eOpenOptionWrite | File::eOpenOptionCanCreate |
-          File::eOpenOptionAppend | File::eOpenOptionCloseOnExec;
-
-      const bool append = m_outfile_options.GetAppend().GetCurrentValue();
-      if (!append)
-        open_options |= File::eOpenOptionTruncate;
-
-      StreamFileSP outfile_stream = std::make_shared<StreamFile>();
-      File &file = outfile_stream->GetFile();
-      Status error =
-          FileSystem::Instance().Open(file, outfile_spec, open_options);
-      if (error.Fail()) {
-        auto path = outfile_spec.GetPath();
-        result.AppendErrorWithFormat("Failed to open file '%s' for %s: %s\n",
-                                     path.c_str(), append ? "append" : "write",
-                                     error.AsCString());
-        result.SetStatus(eReturnStatusFailed);
-        return false;
-      }
-
-      result.SetImmediateOutputStream(outfile_stream);
-    }
-
-    CommandInterpreterRunOptions options;
-    options.SetStopOnError(false);
-    options.SetEchoCommands(true);
-    options.SetPrintResults(true);
-    options.SetPrintErrors(true);
-    options.SetAddToHistory(false);
-    m_interpreter.HandleCommands(commands, &m_exe_ctx, options, result);
-
-    return result.Succeeded();
-  }
-
-private:
-  OptionGroupOptions m_option_group;
-  OptionGroupOutputFile m_outfile_options;
-};
-
-#pragma mark CommandObjectMultiwordBugreport
-
-// CommandObjectMultiwordBugreport
-
-CommandObjectMultiwordBugreport::CommandObjectMultiwordBugreport(
-    CommandInterpreter &interpreter)
-    : CommandObjectMultiword(
-          interpreter, "bugreport",
-          "Commands for creating domain-specific bug reports.",
-          "bugreport <subcommand> [<subcommand-options>]") {
-
-  LoadSubCommand(
-      "unwind", CommandObjectSP(new CommandObjectBugreportUnwind(interpreter)));
-}
-
-CommandObjectMultiwordBugreport::~CommandObjectMultiwordBugreport() {}
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectBugreport.h b/src/llvm-project/lldb/source/Commands/CommandObjectBugreport.h
deleted file mode 100644
index 24ce6d2..0000000
--- a/src/llvm-project/lldb/source/Commands/CommandObjectBugreport.h
+++ /dev/null
@@ -1,27 +0,0 @@
-//===-- CommandObjectBugreport.h --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_CommandObjectBugreport_h_
-#define liblldb_CommandObjectBugreport_h_
-
-#include "lldb/Interpreter/CommandObjectMultiword.h"
-
-namespace lldb_private {
-
-// CommandObjectMultiwordBugreport
-
-class CommandObjectMultiwordBugreport : public CommandObjectMultiword {
-public:
-  CommandObjectMultiwordBugreport(CommandInterpreter &interpreter);
-
-  ~CommandObjectMultiwordBugreport() override;
-};
-
-} // namespace lldb_private
-
-#endif // liblldb_CommandObjectBugreport_h_
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectCommands.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectCommands.cpp
index 4092e76..388db6f 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectCommands.cpp
@@ -12,7 +12,6 @@
 #include "CommandObjectHelp.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/IOHandler.h"
-#include "lldb/Host/OptionParser.h"
 #include "lldb/Interpreter/CommandHistory.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandObjectRegexCommand.h"
@@ -31,14 +30,8 @@
 
 // CommandObjectCommandsSource
 
-static constexpr OptionDefinition g_history_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "count",       'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeUnsignedInteger, "How many history commands to print." },
-  { LLDB_OPT_SET_1, false, "start-index", 's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeUnsignedInteger, "Index at which to start printing history commands (or end to mean tail mode)." },
-  { LLDB_OPT_SET_1, false, "end-index",   'e', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeUnsignedInteger, "Index at which to stop printing history commands." },
-  { LLDB_OPT_SET_2, false, "clear",       'C', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeBoolean,         "Clears the current command history." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_history
+#include "CommandOptions.inc"
 
 class CommandObjectCommandsHistory : public CommandObjectParsed {
 public:
@@ -91,9 +84,7 @@
         m_clear.SetOptionWasSet();
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -188,13 +179,8 @@
 
 // CommandObjectCommandsSource
 
-static constexpr OptionDefinition g_source_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "stop-on-error",    'e', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "If true, stop executing commands on error." },
-  { LLDB_OPT_SET_ALL, false, "stop-on-continue", 'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "If true, stop executing commands on continue." },
-  { LLDB_OPT_SET_ALL, false, "silent-run",       's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "If true don't echo commands while executing." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_source
+#include "CommandOptions.inc"
 
 class CommandObjectCommandsSource : public CommandObjectParsed {
 public:
@@ -226,13 +212,12 @@
     return "";
   }
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
   Options *GetOptions() override { return &m_options; }
@@ -265,9 +250,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -299,7 +282,7 @@
       return false;
     }
 
-    FileSpec cmd_file(command[0].ref);
+    FileSpec cmd_file(command[0].ref());
     FileSystem::Instance().Resolve(cmd_file);
     ExecutionContext *exe_ctx = nullptr; // Just use the default context.
 
@@ -343,12 +326,8 @@
 #pragma mark CommandObjectCommandsAlias
 // CommandObjectCommandsAlias
 
-static constexpr OptionDefinition g_alias_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "help",      'h', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeHelpText, "Help text for this command" },
-  { LLDB_OPT_SET_ALL, false, "long-help", 'H', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeHelpText, "Long help text for this command" },
-    // clang-format on
-};
+#define LLDB_OPTIONS_alias
+#include "CommandOptions.inc"
 
 static const char *g_python_command_instructions =
     "Enter your Python command(s). Type 'DONE' to end.\n"
@@ -386,9 +365,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -568,7 +545,7 @@
 
     // Get the alias command.
 
-    auto alias_command = args[0].ref;
+    auto alias_command = args[0].ref();
     if (alias_command.startswith("-")) {
       result.AppendError("aliases starting with a dash are not supported");
       if (alias_command == "--help" || alias_command == "--long-help") {
@@ -675,8 +652,8 @@
     }
 
     // Save these in std::strings since we're going to shift them off.
-    const std::string alias_command(args[0].ref);
-    const std::string actual_command(args[1].ref);
+    const std::string alias_command(args[0].ref());
+    const std::string actual_command(args[1].ref());
 
     args.Shift(); // Shift the alias command word off the argument vector.
     args.Shift(); // Shift the old command word off the argument vector.
@@ -708,7 +685,7 @@
         OptionArgVectorSP(new OptionArgVector);
 
     while (cmd_obj->IsMultiwordObject() && !args.empty()) {
-      auto sub_command = args[0].ref;
+      auto sub_command = args[0].ref();
       assert(!sub_command.empty());
       subcommand_obj_sp = cmd_obj->GetSubcommandSP(sub_command);
       if (!subcommand_obj_sp) {
@@ -802,7 +779,7 @@
       return false;
     }
 
-    auto command_name = args[0].ref;
+    auto command_name = args[0].ref();
     cmd_obj = m_interpreter.GetCommandObject(command_name);
     if (!cmd_obj) {
       result.AppendErrorWithFormat(
@@ -881,9 +858,10 @@
                                    "defined regular expression command names",
                                    GetCommandName().str().c_str());
       result.SetStatus(eReturnStatusFailed);
+      return false;
     }
 
-    auto command_name = args[0].ref;
+    auto command_name = args[0].ref();
     if (!m_interpreter.CommandExists(command_name)) {
       StreamString error_msg_stream;
       const bool generate_upropos = true;
@@ -911,12 +889,8 @@
 
 // CommandObjectCommandsAddRegex
 
-static constexpr OptionDefinition g_regex_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "help"  , 'h', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeNone, "The help text to display for this command." },
-  { LLDB_OPT_SET_1, false, "syntax", 's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeNone, "A syntax string showing the typical usage syntax." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_regex
+#include "CommandOptions.inc"
 
 #pragma mark CommandObjectCommandsAddRegex
 
@@ -925,9 +899,10 @@
 public:
   CommandObjectCommandsAddRegex(CommandInterpreter &interpreter)
       : CommandObjectParsed(
-            interpreter, "command regex", "Define a custom command in terms of "
-                                          "existing commands by matching "
-                                          "regular expressions.",
+            interpreter, "command regex",
+            "Define a custom command in terms of "
+            "existing commands by matching "
+            "regular expressions.",
             "command regex <cmd-name> [s/<regex>/<subst>/ ...]"),
         IOHandlerDelegateMultiline("",
                                    IOHandlerDelegate::Completion::LLDBCommand),
@@ -970,7 +945,7 @@
 
 protected:
   void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
-    StreamFileSP output_sp(io_handler.GetOutputStreamFile());
+    StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
     if (output_sp && interactive) {
       output_sp->PutCString("Enter one or more sed substitution commands in "
                             "the form: 's/<regex>/<subst>/'.\nTerminate the "
@@ -985,11 +960,9 @@
     if (m_regex_cmd_up) {
       StringList lines;
       if (lines.SplitIntoLines(data)) {
-        const size_t num_lines = lines.GetSize();
         bool check_only = false;
-        for (size_t i = 0; i < num_lines; ++i) {
-          llvm::StringRef bytes_strref(lines[i]);
-          Status error = AppendRegexSubstitution(bytes_strref, check_only);
+        for (const std::string &line : lines) {
+          Status error = AppendRegexSubstitution(line, check_only);
           if (error.Fail()) {
             if (!GetDebugger().GetCommandInterpreter().GetBatchCommandMode()) {
               StreamSP out_stream = GetDebugger().GetAsyncOutputStream();
@@ -1015,8 +988,8 @@
     }
 
     Status error;
-    auto name = command[0].ref;
-    m_regex_cmd_up = llvm::make_unique<CommandObjectRegexCommand>(
+    auto name = command[0].ref();
+    m_regex_cmd_up = std::make_unique<CommandObjectRegexCommand>(
         m_interpreter, name, m_options.GetHelp(), m_options.GetSyntax(), 10, 0,
         true);
 
@@ -1040,7 +1013,7 @@
     } else {
       for (auto &entry : command.entries().drop_front()) {
         bool check_only = false;
-        error = AppendRegexSubstitution(entry.ref, check_only);
+        error = AppendRegexSubstitution(entry.ref(), check_only);
         if (error.Fail())
           break;
       }
@@ -1183,9 +1156,7 @@
         m_syntax.assign(option_arg);
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1226,8 +1197,8 @@
   CommandObjectPythonFunction(CommandInterpreter &interpreter, std::string name,
                               std::string funct, std::string help,
                               ScriptedCommandSynchronicity synch)
-      : CommandObjectRaw(interpreter, name),
-        m_function_name(funct), m_synchro(synch), m_fetched_help_long(false) {
+      : CommandObjectRaw(interpreter, name), m_function_name(funct),
+        m_synchro(synch), m_fetched_help_long(false) {
     if (!help.empty())
       SetHelp(help);
     else {
@@ -1270,10 +1241,9 @@
 
     result.SetStatus(eReturnStatusInvalid);
 
-    if (!scripter ||
-        !scripter->RunScriptBasedCommand(m_function_name.c_str(),
-                                         raw_command_line, m_synchro, result,
-                                         error, m_exe_ctx)) {
+    if (!scripter || !scripter->RunScriptBasedCommand(
+                         m_function_name.c_str(), raw_command_line, m_synchro,
+                         result, error, m_exe_ctx)) {
       result.AppendError(error.AsCString());
       result.SetStatus(eReturnStatusFailed);
     } else {
@@ -1301,8 +1271,8 @@
                                std::string name,
                                StructuredData::GenericSP cmd_obj_sp,
                                ScriptedCommandSynchronicity synch)
-      : CommandObjectRaw(interpreter, name),
-        m_cmd_obj_sp(cmd_obj_sp), m_synchro(synch), m_fetched_help_short(false),
+      : CommandObjectRaw(interpreter, name), m_cmd_obj_sp(cmd_obj_sp),
+        m_synchro(synch), m_fetched_help_short(false),
         m_fetched_help_long(false) {
     StreamString stream;
     stream.Printf("For more information run 'help %s'", name.c_str());
@@ -1315,8 +1285,6 @@
 
   bool IsRemovable() const override { return true; }
 
-  StructuredData::GenericSP GetImplementingObject() { return m_cmd_obj_sp; }
-
   ScriptedCommandSynchronicity GetSynchronicity() { return m_synchro; }
 
   llvm::StringRef GetHelp() override {
@@ -1385,12 +1353,8 @@
 };
 
 // CommandObjectCommandsScriptImport
-
-static constexpr OptionDefinition g_script_import_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "allow-reload", 'r', OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone, "Allow the script to be loaded even if it was already loaded before. This argument exists for backwards compatibility, but reloading is always allowed, whether you specify it or not." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_script_import
+#include "CommandOptions.inc"
 
 class CommandObjectCommandsScriptImport : public CommandObjectParsed {
 public:
@@ -1415,13 +1379,12 @@
 
   ~CommandObjectCommandsScriptImport() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
   Options *GetOptions() override { return &m_options; }
@@ -1440,38 +1403,24 @@
 
       switch (short_option) {
       case 'r':
-        m_allow_reload = true;
+        // NO-OP
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
     }
 
     void OptionParsingStarting(ExecutionContext *execution_context) override {
-      m_allow_reload = true;
     }
 
     llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
       return llvm::makeArrayRef(g_script_import_options);
     }
-
-    // Instance variables to hold the values for command options.
-
-    bool m_allow_reload;
   };
 
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    if (GetDebugger().GetScriptLanguage() != lldb::eScriptLanguagePython) {
-      result.AppendError("only scripting language supported for module "
-                         "importing is currently Python");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
-
     if (command.empty()) {
       result.AppendError("command script import needs one or more arguments");
       result.SetStatus(eReturnStatusFailed);
@@ -1492,7 +1441,7 @@
       // more)
       m_exe_ctx.Clear();
       if (GetDebugger().GetScriptInterpreter()->LoadScriptingModule(
-              entry.c_str(), m_options.m_allow_reload, init_session, error)) {
+              entry.c_str(), init_session, error)) {
         result.SetStatus(eReturnStatusSuccessFinishNoResult);
       } else {
         result.AppendErrorWithFormat("module importing failed: %s",
@@ -1509,25 +1458,29 @@
 
 // CommandObjectCommandsScriptAdd
 static constexpr OptionEnumValueElement g_script_synchro_type[] = {
-  {eScriptedCommandSynchronicitySynchronous, "synchronous",
-   "Run synchronous"},
-  {eScriptedCommandSynchronicityAsynchronous, "asynchronous",
-   "Run asynchronous"},
-  {eScriptedCommandSynchronicityCurrentValue, "current",
-   "Do not alter current setting"} };
+    {
+        eScriptedCommandSynchronicitySynchronous,
+        "synchronous",
+        "Run synchronous",
+    },
+    {
+        eScriptedCommandSynchronicityAsynchronous,
+        "asynchronous",
+        "Run asynchronous",
+    },
+    {
+        eScriptedCommandSynchronicityCurrentValue,
+        "current",
+        "Do not alter current setting",
+    },
+};
 
 static constexpr OptionEnumValues ScriptSynchroType() {
   return OptionEnumValues(g_script_synchro_type);
 }
 
-static constexpr OptionDefinition g_script_add_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1,   false, "function",      'f', OptionParser::eRequiredArgument, nullptr, {},                  0, eArgTypePythonFunction,               "Name of the Python function to bind to this command name." },
-  { LLDB_OPT_SET_2,   false, "class",         'c', OptionParser::eRequiredArgument, nullptr, {},                  0, eArgTypePythonClass,                  "Name of the Python class to bind to this command name." },
-  { LLDB_OPT_SET_1,   false, "help"  ,        'h', OptionParser::eRequiredArgument, nullptr, {},                  0, eArgTypeHelpText,                     "The help text to display for this command." },
-  { LLDB_OPT_SET_ALL, false, "synchronicity", 's', OptionParser::eRequiredArgument, nullptr, ScriptSynchroType(), 0, eArgTypeScriptedCommandSynchronicity, "Set the synchronicity of this command's executions with regard to LLDB event system." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_script_add
+#include "CommandOptions.inc"
 
 class CommandObjectCommandsScriptAdd : public CommandObjectParsed,
                                        public IOHandlerDelegateMultiline {
@@ -1593,9 +1546,7 @@
               option_arg.str().c_str());
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1621,7 +1572,7 @@
   };
 
   void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
-    StreamFileSP output_sp(io_handler.GetOutputStreamFile());
+    StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
     if (output_sp && interactive) {
       output_sp->PutCString(g_python_command_instructions);
       output_sp->Flush();
@@ -1630,7 +1581,7 @@
 
   void IOHandlerInputComplete(IOHandler &io_handler,
                               std::string &data) override {
-    StreamFileSP error_sp = io_handler.GetErrorStreamFile();
+    StreamFileSP error_sp = io_handler.GetErrorStreamFileSP();
 
     ScriptInterpreter *interpreter = GetDebugger().GetScriptInterpreter();
     if (interpreter) {
@@ -1692,18 +1643,15 @@
     }
 
     // Store the options in case we get multi-line input
-    m_cmd_name = command[0].ref;
+    m_cmd_name = command[0].ref();
     m_short_help.assign(m_options.m_short_help);
     m_synchronicity = m_options.m_synchronicity;
 
     if (m_options.m_class_name.empty()) {
       if (m_options.m_funct_name.empty()) {
         m_interpreter.GetPythonCommandsFromIOHandler(
-            "     ",  // Prompt
-            *this,    // IOHandlerDelegate
-            true,     // Run IOHandler in async mode
-            nullptr); // Baton for the "io_handler" that will be passed back
-                      // into our IOHandlerDelegate functions
+            "     ", // Prompt
+            *this);  // IOHandlerDelegate
       } else {
         CommandObjectSP new_cmd(new CommandObjectPythonFunction(
             m_interpreter, m_cmd_name, m_options.m_funct_name,
@@ -1761,6 +1709,12 @@
   ~CommandObjectCommandsScriptList() override = default;
 
   bool DoExecute(Args &command, CommandReturnObject &result) override {
+    if (command.GetArgumentCount() != 0) {
+      result.AppendError("'command script list' doesn't take any arguments");
+      result.SetStatus(eReturnStatusFailed);
+      return false;
+    }
+
     m_interpreter.GetHelp(result, CommandInterpreter::eCommandTypesUserDef);
 
     result.SetStatus(eReturnStatusSuccessFinishResult);
@@ -1781,6 +1735,12 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
+    if (command.GetArgumentCount() != 0) {
+      result.AppendError("'command script clear' doesn't take any arguments");
+      result.SetStatus(eReturnStatusFailed);
+      return false;
+    }
+
     m_interpreter.RemoveAllUser();
 
     result.SetStatus(eReturnStatusSuccessFinishResult);
@@ -1822,7 +1782,7 @@
       return false;
     }
 
-    auto cmd_name = command[0].ref;
+    auto cmd_name = command[0].ref();
 
     if (cmd_name.empty() || !m_interpreter.HasUserCommands() ||
         !m_interpreter.UserCommandExists(cmd_name)) {
@@ -1845,9 +1805,10 @@
 public:
   CommandObjectMultiwordCommandsScript(CommandInterpreter &interpreter)
       : CommandObjectMultiword(
-            interpreter, "command script", "Commands for managing custom "
-                                           "commands implemented by "
-                                           "interpreter scripts.",
+            interpreter, "command script",
+            "Commands for managing custom "
+            "commands implemented by "
+            "interpreter scripts.",
             "command script <subcommand> [<subcommand-options>]") {
     LoadSubCommand("add", CommandObjectSP(
                               new CommandObjectCommandsScriptAdd(interpreter)));
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectCommands.h b/src/llvm-project/lldb/source/Commands/CommandObjectCommands.h
index 468ee53..dcf02f3a 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectCommands.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectCommands.h
@@ -10,8 +10,6 @@
 #ifndef liblldb_CommandObjectCommands_h_
 #define liblldb_CommandObjectCommands_h_
 
-#include "lldb/Core/STLUtils.h"
-#include "lldb/Interpreter/CommandObject.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 
 namespace lldb_private {
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectDisassemble.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectDisassemble.cpp
index 5972555b..63679e9 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectDisassemble.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectDisassemble.cpp
@@ -10,16 +10,13 @@
 #include "lldb/Core/AddressRange.h"
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/Module.h"
-#include "lldb/Core/SourceManager.h"
 #include "lldb/Host/OptionParser.h"
-#include "lldb/Interpreter/CommandCompletions.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
 #include "lldb/Interpreter/Options.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/Symbol.h"
-#include "lldb/Target/Process.h"
 #include "lldb/Target/SectionLoadList.h"
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
@@ -30,32 +27,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
-static constexpr OptionDefinition g_disassemble_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "bytes",         'b', OptionParser::eNoArgument,       nullptr, {}, 0,                                     eArgTypeNone,                "Show opcode bytes when disassembling." },
-  { LLDB_OPT_SET_ALL, false, "context",       'C', OptionParser::eRequiredArgument, nullptr, {}, 0,                                     eArgTypeNumLines,            "Number of context lines of source to show." },
-  { LLDB_OPT_SET_ALL, false, "mixed",         'm', OptionParser::eNoArgument,       nullptr, {}, 0,                                     eArgTypeNone,                "Enable mixed source and assembly display." },
-  { LLDB_OPT_SET_ALL, false, "raw",           'r', OptionParser::eNoArgument,       nullptr, {}, 0,                                     eArgTypeNone,                "Print raw disassembly with no symbol information." },
-  { LLDB_OPT_SET_ALL, false, "plugin",        'P', OptionParser::eRequiredArgument, nullptr, {}, 0,                                     eArgTypePlugin,              "Name of the disassembler plugin you want to use." },
-  { LLDB_OPT_SET_ALL, false, "flavor",        'F', OptionParser::eRequiredArgument, nullptr, {}, 0,                                     eArgTypeDisassemblyFlavor,   "Name of the disassembly flavor you want to use.  "
-  "Currently the only valid options are default, and for Intel "
-  "architectures, att and intel." },
-  { LLDB_OPT_SET_ALL, false, "arch",          'A', OptionParser::eRequiredArgument, nullptr, {}, 0,                                     eArgTypeArchitecture,        "Specify the architecture to use from cross disassembly." },
-  { LLDB_OPT_SET_1 |
-  LLDB_OPT_SET_2,   true,  "start-address", 's', OptionParser::eRequiredArgument, nullptr, {}, 0,                                     eArgTypeAddressOrExpression, "Address at which to start disassembling." },
-  { LLDB_OPT_SET_1,   false, "end-address",   'e', OptionParser::eRequiredArgument, nullptr, {}, 0,                                     eArgTypeAddressOrExpression, "Address at which to end disassembling." },
-  { LLDB_OPT_SET_2 |
-  LLDB_OPT_SET_3 |
-  LLDB_OPT_SET_4 |
-  LLDB_OPT_SET_5,   false, "count",         'c', OptionParser::eRequiredArgument, nullptr, {}, 0,                                     eArgTypeNumLines,            "Number of instructions to display." },
-  { LLDB_OPT_SET_3,   false, "name",          'n', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName,        "Disassemble entire contents of the given function name." },
-  { LLDB_OPT_SET_4,   false, "frame",         'f', OptionParser::eNoArgument,       nullptr, {}, 0,                                     eArgTypeNone,                "Disassemble from the start of the current frame's function." },
-  { LLDB_OPT_SET_5,   false, "pc",            'p', OptionParser::eNoArgument,       nullptr, {}, 0,                                     eArgTypeNone,                "Disassemble around the current pc." },
-  { LLDB_OPT_SET_6,   false, "line",          'l', OptionParser::eNoArgument,       nullptr, {}, 0,                                     eArgTypeNone,                "Disassemble the current frame's current source line instructions if there is debug line "
-  "table information, else disassemble around the pc." },
-  { LLDB_OPT_SET_7,   false, "address",       'a', OptionParser::eRequiredArgument, nullptr, {}, 0,                                     eArgTypeAddressOrExpression, "Disassemble function containing this address." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_disassemble
+#include "CommandOptions.inc"
 
 CommandObjectDisassemble::CommandOptions::CommandOptions()
     : Options(), num_lines_context(0), num_instructions(0), func_name(),
@@ -171,9 +144,7 @@
   } break;
 
   default:
-    error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                   short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
@@ -238,20 +209,15 @@
           "Disassemble specified instructions in the current target.  "
           "Defaults to the current function for the current thread and "
           "stack frame.",
-          "disassemble [<cmd-options>]"),
+          "disassemble [<cmd-options>]", eCommandRequiresTarget),
       m_options() {}
 
 CommandObjectDisassemble::~CommandObjectDisassemble() = default;
 
 bool CommandObjectDisassemble::DoExecute(Args &command,
                                          CommandReturnObject &result) {
-  Target *target = GetDebugger().GetSelectedTarget().get();
-  if (target == nullptr) {
-    result.AppendError("invalid target, create a debug target using the "
-                       "'target create' command");
-    result.SetStatus(eReturnStatusFailed);
-    return false;
-  }
+  Target *target = &GetSelectedTarget();
+
   if (!m_options.arch.IsValid())
     m_options.arch = target->GetArchitecture();
 
@@ -280,9 +246,8 @@
           m_options.arch.GetArchitectureName());
     result.SetStatus(eReturnStatusFailed);
     return false;
-  } else if (flavor_string != nullptr &&
-             !disassembler->FlavorValidForArchSpec(m_options.arch,
-                                                   flavor_string))
+  } else if (flavor_string != nullptr && !disassembler->FlavorValidForArchSpec(
+                                             m_options.arch, flavor_string))
     result.AppendWarningWithFormat(
         "invalid disassembler flavor \"%s\", using default.\n", flavor_string);
 
@@ -541,7 +506,7 @@
         } else {
           result.AppendErrorWithFormat(
               "Failed to disassemble memory at 0x%8.8" PRIx64 ".\n",
-              m_options.start_addr);
+              cur_range.GetBaseAddress().GetLoadAddress(target));
           result.SetStatus(eReturnStatusFailed);
         }
         if (print_sc_header)
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp
index 29e4ab6..db90dde 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectExpression.cpp
@@ -6,29 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringRef.h"
 
 #include "CommandObjectExpression.h"
 #include "lldb/Core/Debugger.h"
-#include "lldb/Core/Value.h"
-#include "lldb/Core/ValueObjectVariable.h"
-#include "lldb/DataFormatters/ValueObjectPrinter.h"
-#include "lldb/Expression/DWARFExpression.h"
 #include "lldb/Expression/REPL.h"
 #include "lldb/Expression/UserExpression.h"
-#include "lldb/Host/Host.h"
 #include "lldb/Host/OptionParser.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
-#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/Variable.h"
 #include "lldb/Target/Language.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -38,34 +29,24 @@
 CommandObjectExpression::CommandOptions::~CommandOptions() = default;
 
 static constexpr OptionEnumValueElement g_description_verbosity_type[] = {
-    {eLanguageRuntimeDescriptionDisplayVerbosityCompact, "compact",
-     "Only show the description string"},
-    {eLanguageRuntimeDescriptionDisplayVerbosityFull, "full",
-     "Show the full output, including persistent variable's name and type"} };
+    {
+        eLanguageRuntimeDescriptionDisplayVerbosityCompact,
+        "compact",
+        "Only show the description string",
+    },
+    {
+        eLanguageRuntimeDescriptionDisplayVerbosityFull,
+        "full",
+        "Show the full output, including persistent variable's name and type",
+    },
+};
 
 static constexpr OptionEnumValues DescriptionVerbosityTypes() {
   return OptionEnumValues(g_description_verbosity_type);
 }
 
-static constexpr OptionDefinition g_expression_options[] = {
-    // clang-format off
-  {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "all-threads",           'a', OptionParser::eRequiredArgument, nullptr, {},                          0, eArgTypeBoolean,              "Should we run all threads if the execution doesn't complete on one thread."},
-  {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "ignore-breakpoints",    'i', OptionParser::eRequiredArgument, nullptr, {},                          0, eArgTypeBoolean,              "Ignore breakpoint hits while running expressions"},
-  {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "timeout",               't', OptionParser::eRequiredArgument, nullptr, {},                          0, eArgTypeUnsignedInteger,      "Timeout value (in microseconds) for running the expression."},
-  {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "unwind-on-error",       'u', OptionParser::eRequiredArgument, nullptr, {},                          0, eArgTypeBoolean,              "Clean up program state if the expression causes a crash, or raises a signal.  "
-                                                                                                                                                                                  "Note, unlike gdb hitting a breakpoint is controlled by another option (-i)."},
-  {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "debug",                 'g', OptionParser::eNoArgument,       nullptr, {},                          0, eArgTypeNone,                 "When specified, debug the JIT code by setting a breakpoint on the first instruction "
-                                                                                                                                                                                  "and forcing breakpoints to not be ignored (-i0) and no unwinding to happen on error (-u0)."},
-  {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "language",              'l', OptionParser::eRequiredArgument, nullptr, {},                          0, eArgTypeLanguage,             "Specifies the Language to use when parsing the expression.  If not set the target.language "
-                                                                                                                                                                                  "setting is used." },
-  {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "apply-fixits",          'X', OptionParser::eRequiredArgument, nullptr, {},                          0, eArgTypeLanguage,             "If true, simple fix-it hints will be automatically applied to the expression." },
-  {LLDB_OPT_SET_1,                  false, "description-verbosity", 'v', OptionParser::eOptionalArgument, nullptr, DescriptionVerbosityTypes(), 0, eArgTypeDescriptionVerbosity, "How verbose should the output of this expression be, if the object description is asked for."},
-  {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "top-level",             'p', OptionParser::eNoArgument,       nullptr, {},                          0, eArgTypeNone,                 "Interpret the expression as a complete translation unit, without injecting it into the local "
-                                                                                                                                                                                  "context.  Allows declaration of persistent, top-level entities without a $ prefix."},
-  {LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "allow-jit",             'j', OptionParser::eRequiredArgument, nullptr, {},                          0, eArgTypeBoolean,              "Controls whether the expression can fall back to being JITted if it's not supported by "
-                                                                                                                                                                                  "the interpreter (defaults to true)."}
-    // clang-format on
-};
+#define LLDB_OPTIONS_expression
+#include "CommandOptions.inc"
 
 Status CommandObjectExpression::CommandOptions::SetOptionValue(
     uint32_t option_idx, llvm::StringRef option_arg,
@@ -176,9 +157,7 @@
   }
 
   default:
-    error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                   short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
@@ -214,11 +193,12 @@
 
 CommandObjectExpression::CommandObjectExpression(
     CommandInterpreter &interpreter)
-    : CommandObjectRaw(
-          interpreter, "expression", "Evaluate an expression on the current "
-                                     "thread.  Displays any returned value "
-                                     "with LLDB's default formatting.",
-          "", eCommandProcessMustBePaused | eCommandTryTargetAPILock),
+    : CommandObjectRaw(interpreter, "expression",
+                       "Evaluate an expression on the current "
+                       "thread.  Displays any returned value "
+                       "with LLDB's default formatting.",
+                       "",
+                       eCommandProcessMustBePaused | eCommandTryTargetAPILock),
       IOHandlerDelegate(IOHandlerDelegate::Completion::Expression),
       m_option_group(), m_format_options(eFormatDefault),
       m_repl_option(LLDB_OPT_SET_1, false, "repl", 'r', "Drop into REPL", false,
@@ -304,7 +284,7 @@
 
 Options *CommandObjectExpression::GetOptions() { return &m_option_group; }
 
-int CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
+void CommandObjectExpression::HandleCompletion(CompletionRequest &request) {
   EvaluateExpressionOptions options;
   options.SetCoerceToId(m_varobj_options.use_objc);
   options.SetLanguage(m_command_options.language);
@@ -321,17 +301,14 @@
   // This didn't work, so let's get out before we start doing things that
   // expect a valid frame pointer.
   if (m_interpreter.GetExecutionContext().GetFramePtr() == nullptr)
-    return 0;
+    return;
 
   ExecutionContext exe_ctx(m_interpreter.GetExecutionContext());
 
   Target *target = exe_ctx.GetTargetPtr();
 
   if (!target)
-    target = GetDummyTarget();
-
-  if (!target)
-    return 0;
+    target = &GetDummyTarget();
 
   unsigned cursor_pos = request.GetRawCursorPos();
   llvm::StringRef code = request.GetRawLine();
@@ -351,7 +328,7 @@
   // exit.
   // FIXME: We should complete the options here.
   if (cursor_pos < raw_start)
-    return 0;
+    return;
 
   // Make the cursor_pos again relative to the start of the code string.
   assert(cursor_pos >= raw_start);
@@ -364,10 +341,9 @@
       code, llvm::StringRef(), language, UserExpression::eResultTypeAny,
       options, nullptr, error));
   if (error.Fail())
-    return 0;
+    return;
 
   expr->Complete(exe_ctx, request, cursor_pos);
-  return request.GetNumberOfMatches();
 }
 
 static lldb_private::Status
@@ -393,123 +369,116 @@
   Target *target = exe_ctx.GetTargetPtr();
 
   if (!target)
-    target = GetDummyTarget();
+    target = &GetDummyTarget();
 
-  if (target) {
-    lldb::ValueObjectSP result_valobj_sp;
-    bool keep_in_memory = true;
-    StackFrame *frame = exe_ctx.GetFramePtr();
+  lldb::ValueObjectSP result_valobj_sp;
+  bool keep_in_memory = true;
+  StackFrame *frame = exe_ctx.GetFramePtr();
 
-    EvaluateExpressionOptions options;
-    options.SetCoerceToId(m_varobj_options.use_objc);
-    options.SetUnwindOnError(m_command_options.unwind_on_error);
-    options.SetIgnoreBreakpoints(m_command_options.ignore_breakpoints);
-    options.SetKeepInMemory(keep_in_memory);
-    options.SetUseDynamic(m_varobj_options.use_dynamic);
-    options.SetTryAllThreads(m_command_options.try_all_threads);
-    options.SetDebug(m_command_options.debug);
-    options.SetLanguage(m_command_options.language);
-    options.SetExecutionPolicy(
-        m_command_options.allow_jit
-            ? EvaluateExpressionOptions::default_execution_policy
-            : lldb_private::eExecutionPolicyNever);
+  EvaluateExpressionOptions options;
+  options.SetCoerceToId(m_varobj_options.use_objc);
+  options.SetUnwindOnError(m_command_options.unwind_on_error);
+  options.SetIgnoreBreakpoints(m_command_options.ignore_breakpoints);
+  options.SetKeepInMemory(keep_in_memory);
+  options.SetUseDynamic(m_varobj_options.use_dynamic);
+  options.SetTryAllThreads(m_command_options.try_all_threads);
+  options.SetDebug(m_command_options.debug);
+  options.SetLanguage(m_command_options.language);
+  options.SetExecutionPolicy(
+      m_command_options.allow_jit
+          ? EvaluateExpressionOptions::default_execution_policy
+          : lldb_private::eExecutionPolicyNever);
 
-    bool auto_apply_fixits;
-    if (m_command_options.auto_apply_fixits == eLazyBoolCalculate)
-      auto_apply_fixits = target->GetEnableAutoApplyFixIts();
-    else
-      auto_apply_fixits = m_command_options.auto_apply_fixits == eLazyBoolYes;
+  bool auto_apply_fixits;
+  if (m_command_options.auto_apply_fixits == eLazyBoolCalculate)
+    auto_apply_fixits = target->GetEnableAutoApplyFixIts();
+  else
+    auto_apply_fixits = m_command_options.auto_apply_fixits == eLazyBoolYes;
 
-    options.SetAutoApplyFixIts(auto_apply_fixits);
+  options.SetAutoApplyFixIts(auto_apply_fixits);
 
-    if (m_command_options.top_level)
-      options.SetExecutionPolicy(eExecutionPolicyTopLevel);
+  if (m_command_options.top_level)
+    options.SetExecutionPolicy(eExecutionPolicyTopLevel);
 
-    // If there is any chance we are going to stop and want to see what went
-    // wrong with our expression, we should generate debug info
-    if (!m_command_options.ignore_breakpoints ||
-        !m_command_options.unwind_on_error)
-      options.SetGenerateDebugInfo(true);
+  // If there is any chance we are going to stop and want to see what went
+  // wrong with our expression, we should generate debug info
+  if (!m_command_options.ignore_breakpoints ||
+      !m_command_options.unwind_on_error)
+    options.SetGenerateDebugInfo(true);
 
-    if (m_command_options.timeout > 0)
-      options.SetTimeout(std::chrono::microseconds(m_command_options.timeout));
-    else
-      options.SetTimeout(llvm::None);
+  if (m_command_options.timeout > 0)
+    options.SetTimeout(std::chrono::microseconds(m_command_options.timeout));
+  else
+    options.SetTimeout(llvm::None);
 
-    ExpressionResults success = target->EvaluateExpression(
-        expr, frame, result_valobj_sp, options, &m_fixed_expression);
+  ExpressionResults success = target->EvaluateExpression(
+      expr, frame, result_valobj_sp, options, &m_fixed_expression);
 
-    // We only tell you about the FixIt if we applied it.  The compiler errors
-    // will suggest the FixIt if it parsed.
-    if (error_stream && !m_fixed_expression.empty() &&
-        target->GetEnableNotifyAboutFixIts()) {
-      if (success == eExpressionCompleted)
-        error_stream->Printf(
-            "  Fix-it applied, fixed expression was: \n    %s\n",
-            m_fixed_expression.c_str());
-    }
+  // We only tell you about the FixIt if we applied it.  The compiler errors
+  // will suggest the FixIt if it parsed.
+  if (error_stream && !m_fixed_expression.empty() &&
+      target->GetEnableNotifyAboutFixIts()) {
+    if (success == eExpressionCompleted)
+      error_stream->Printf("  Fix-it applied, fixed expression was: \n    %s\n",
+                           m_fixed_expression.c_str());
+  }
 
-    if (result_valobj_sp) {
-      Format format = m_format_options.GetFormat();
+  if (result_valobj_sp) {
+    Format format = m_format_options.GetFormat();
 
-      if (result_valobj_sp->GetError().Success()) {
-        if (format != eFormatVoid) {
-          if (format != eFormatDefault)
-            result_valobj_sp->SetFormat(format);
+    if (result_valobj_sp->GetError().Success()) {
+      if (format != eFormatVoid) {
+        if (format != eFormatDefault)
+          result_valobj_sp->SetFormat(format);
 
-          if (m_varobj_options.elem_count > 0) {
-            Status error(CanBeUsedForElementCountPrinting(*result_valobj_sp));
-            if (error.Fail()) {
-              result->AppendErrorWithFormat(
-                  "expression cannot be used with --element-count %s\n",
-                  error.AsCString(""));
-              result->SetStatus(eReturnStatusFailed);
-              return false;
-            }
-          }
-
-          DumpValueObjectOptions options(m_varobj_options.GetAsDumpOptions(
-              m_command_options.m_verbosity, format));
-          options.SetVariableFormatDisplayLanguage(
-              result_valobj_sp->GetPreferredDisplayLanguage());
-
-          result_valobj_sp->Dump(*output_stream, options);
-
-          if (result)
-            result->SetStatus(eReturnStatusSuccessFinishResult);
-        }
-      } else {
-        if (result_valobj_sp->GetError().GetError() ==
-            UserExpression::kNoResult) {
-          if (format != eFormatVoid && GetDebugger().GetNotifyVoid()) {
-            error_stream->PutCString("(void)\n");
-          }
-
-          if (result)
-            result->SetStatus(eReturnStatusSuccessFinishResult);
-        } else {
-          const char *error_cstr = result_valobj_sp->GetError().AsCString();
-          if (error_cstr && error_cstr[0]) {
-            const size_t error_cstr_len = strlen(error_cstr);
-            const bool ends_with_newline =
-                error_cstr[error_cstr_len - 1] == '\n';
-            if (strstr(error_cstr, "error:") != error_cstr)
-              error_stream->PutCString("error: ");
-            error_stream->Write(error_cstr, error_cstr_len);
-            if (!ends_with_newline)
-              error_stream->EOL();
-          } else {
-            error_stream->PutCString("error: unknown error\n");
-          }
-
-          if (result)
+        if (m_varobj_options.elem_count > 0) {
+          Status error(CanBeUsedForElementCountPrinting(*result_valobj_sp));
+          if (error.Fail()) {
+            result->AppendErrorWithFormat(
+                "expression cannot be used with --element-count %s\n",
+                error.AsCString(""));
             result->SetStatus(eReturnStatusFailed);
+            return false;
+          }
         }
+
+        DumpValueObjectOptions options(m_varobj_options.GetAsDumpOptions(
+            m_command_options.m_verbosity, format));
+        options.SetVariableFormatDisplayLanguage(
+            result_valobj_sp->GetPreferredDisplayLanguage());
+
+        result_valobj_sp->Dump(*output_stream, options);
+
+        if (result)
+          result->SetStatus(eReturnStatusSuccessFinishResult);
+      }
+    } else {
+      if (result_valobj_sp->GetError().GetError() ==
+          UserExpression::kNoResult) {
+        if (format != eFormatVoid && GetDebugger().GetNotifyVoid()) {
+          error_stream->PutCString("(void)\n");
+        }
+
+        if (result)
+          result->SetStatus(eReturnStatusSuccessFinishResult);
+      } else {
+        const char *error_cstr = result_valobj_sp->GetError().AsCString();
+        if (error_cstr && error_cstr[0]) {
+          const size_t error_cstr_len = strlen(error_cstr);
+          const bool ends_with_newline = error_cstr[error_cstr_len - 1] == '\n';
+          if (strstr(error_cstr, "error:") != error_cstr)
+            error_stream->PutCString("error: ");
+          error_stream->Write(error_cstr, error_cstr_len);
+          if (!ends_with_newline)
+            error_stream->EOL();
+        } else {
+          error_stream->PutCString("error: unknown error\n");
+        }
+
+        if (result)
+          result->SetStatus(eReturnStatusFailed);
       }
     }
-  } else {
-    error_stream->Printf("error: invalid execution context for expression\n");
-    return false;
   }
 
   return true;
@@ -521,8 +490,8 @@
   //    StreamSP output_stream =
   //    io_handler.GetDebugger().GetAsyncOutputStream();
   //    StreamSP error_stream = io_handler.GetDebugger().GetAsyncErrorStream();
-  StreamFileSP output_sp(io_handler.GetOutputStreamFile());
-  StreamFileSP error_sp(io_handler.GetErrorStreamFile());
+  StreamFileSP output_sp = io_handler.GetOutputStreamFileSP();
+  StreamFileSP error_sp = io_handler.GetErrorStreamFileSP();
 
   EvaluateExpression(line.c_str(), output_sp.get(), error_sp.get());
   if (output_sp)
@@ -560,7 +529,7 @@
                             1, // Show line numbers starting at 1
                             *this, nullptr));
 
-  StreamFileSP output_sp(io_handler_sp->GetOutputStreamFile());
+  StreamFileSP output_sp = io_handler_sp->GetOutputStreamFileSP();
   if (output_sp) {
     output_sp->PutCString(
         "Enter expressions, then terminate with an empty line to evaluate:\n");
@@ -611,61 +580,59 @@
       return false;
 
     if (m_repl_option.GetOptionValue().GetCurrentValue()) {
-      Target *target = m_interpreter.GetExecutionContext().GetTargetPtr();
-      if (target) {
-        // Drop into REPL
-        m_expr_lines.clear();
-        m_expr_line_count = 0;
+      Target &target = GetSelectedOrDummyTarget();
+      // Drop into REPL
+      m_expr_lines.clear();
+      m_expr_line_count = 0;
 
-        Debugger &debugger = target->GetDebugger();
+      Debugger &debugger = target.GetDebugger();
 
-        // Check if the LLDB command interpreter is sitting on top of a REPL
-        // that launched it...
-        if (debugger.CheckTopIOHandlerTypes(IOHandler::Type::CommandInterpreter,
-                                            IOHandler::Type::REPL)) {
-          // the LLDB command interpreter is sitting on top of a REPL that
-          // launched it, so just say the command interpreter is done and
-          // fall back to the existing REPL
-          m_interpreter.GetIOHandler(false)->SetIsDone(true);
-        } else {
-          // We are launching the REPL on top of the current LLDB command
-          // interpreter, so just push one
-          bool initialize = false;
-          Status repl_error;
-          REPLSP repl_sp(target->GetREPL(repl_error, m_command_options.language,
-                                         nullptr, false));
+      // Check if the LLDB command interpreter is sitting on top of a REPL
+      // that launched it...
+      if (debugger.CheckTopIOHandlerTypes(IOHandler::Type::CommandInterpreter,
+                                          IOHandler::Type::REPL)) {
+        // the LLDB command interpreter is sitting on top of a REPL that
+        // launched it, so just say the command interpreter is done and
+        // fall back to the existing REPL
+        m_interpreter.GetIOHandler(false)->SetIsDone(true);
+      } else {
+        // We are launching the REPL on top of the current LLDB command
+        // interpreter, so just push one
+        bool initialize = false;
+        Status repl_error;
+        REPLSP repl_sp(target.GetREPL(repl_error, m_command_options.language,
+                                       nullptr, false));
 
-          if (!repl_sp) {
-            initialize = true;
-            repl_sp = target->GetREPL(repl_error, m_command_options.language,
-                                      nullptr, true);
-            if (!repl_error.Success()) {
-              result.SetError(repl_error);
-              return result.Succeeded();
-            }
-          }
-
-          if (repl_sp) {
-            if (initialize) {
-              repl_sp->SetEvaluateOptions(
-                  GetExprOptions(exe_ctx, m_command_options));
-              repl_sp->SetFormatOptions(m_format_options);
-              repl_sp->SetValueObjectDisplayOptions(m_varobj_options);
-            }
-
-            IOHandlerSP io_handler_sp(repl_sp->GetIOHandler());
-
-            io_handler_sp->SetIsDone(false);
-
-            debugger.PushIOHandler(io_handler_sp);
-          } else {
-            repl_error.SetErrorStringWithFormat(
-                "Couldn't create a REPL for %s",
-                Language::GetNameForLanguageType(m_command_options.language));
+        if (!repl_sp) {
+          initialize = true;
+          repl_sp = target.GetREPL(repl_error, m_command_options.language,
+                                    nullptr, true);
+          if (!repl_error.Success()) {
             result.SetError(repl_error);
             return result.Succeeded();
           }
         }
+
+        if (repl_sp) {
+          if (initialize) {
+            repl_sp->SetEvaluateOptions(
+                GetExprOptions(exe_ctx, m_command_options));
+            repl_sp->SetFormatOptions(m_format_options);
+            repl_sp->SetValueObjectDisplayOptions(m_varobj_options);
+          }
+
+          IOHandlerSP io_handler_sp(repl_sp->GetIOHandler());
+
+          io_handler_sp->SetIsDone(false);
+
+          debugger.PushIOHandler(io_handler_sp);
+        } else {
+          repl_error.SetErrorStringWithFormat(
+              "Couldn't create a REPL for %s",
+              Language::GetNameForLanguageType(m_command_options.language));
+          result.SetError(repl_error);
+          return result.Succeeded();
+        }
       }
     }
     // No expression following options
@@ -675,11 +642,11 @@
     }
   }
 
-  Target *target = GetSelectedOrDummyTarget();
+  Target &target = GetSelectedOrDummyTarget();
   if (EvaluateExpression(expr, &(result.GetOutputStream()),
                          &(result.GetErrorStream()), &result)) {
 
-    if (!m_fixed_expression.empty() && target->GetEnableNotifyAboutFixIts()) {
+    if (!m_fixed_expression.empty() && target.GetEnableNotifyAboutFixIts()) {
       CommandHistory &history = m_interpreter.GetCommandHistory();
       // FIXME: Can we figure out what the user actually typed (e.g. some alias
       // for expr???)
@@ -694,12 +661,12 @@
       history.AppendString(fixed_command);
     }
     // Increment statistics to record this expression evaluation success.
-    target->IncrementStats(StatisticKind::ExpressionSuccessful);
+    target.IncrementStats(StatisticKind::ExpressionSuccessful);
     return true;
   }
 
   // Increment statistics to record this expression evaluation failure.
-  target->IncrementStats(StatisticKind::ExpressionFailure);
+  target.IncrementStats(StatisticKind::ExpressionFailure);
   result.SetStatus(eReturnStatusFailed);
   return false;
 }
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectExpression.h b/src/llvm-project/lldb/source/Commands/CommandObjectExpression.h
index 89c8e1d..de15986 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectExpression.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectExpression.h
@@ -14,7 +14,6 @@
 #include "lldb/Interpreter/OptionGroupBoolean.h"
 #include "lldb/Interpreter/OptionGroupFormat.h"
 #include "lldb/Interpreter/OptionGroupValueObjectDisplay.h"
-#include "lldb/Target/ExecutionContext.h"
 #include "lldb/lldb-private-enumerations.h"
 namespace lldb_private {
 
@@ -54,7 +53,7 @@
 
   Options *GetOptions() override;
 
-  int HandleCompletion(CompletionRequest &request) override;
+  void HandleCompletion(CompletionRequest &request) override;
 
 protected:
   // IOHandler::Delegate functions
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectFrame.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectFrame.cpp
index ab6a079..50d5c75 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectFrame.cpp
@@ -7,14 +7,10 @@
 //===----------------------------------------------------------------------===//
 #include "CommandObjectFrame.h"
 #include "lldb/Core/Debugger.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/StreamFile.h"
-#include "lldb/Core/Value.h"
 #include "lldb/Core/ValueObject.h"
-#include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/DataFormatters/DataVisualization.h"
 #include "lldb/DataFormatters/ValueObjectPrinter.h"
-#include "lldb/Host/Host.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Host/OptionParser.h"
 #include "lldb/Host/StringConvert.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
@@ -23,24 +19,16 @@
 #include "lldb/Interpreter/OptionGroupValueObjectDisplay.h"
 #include "lldb/Interpreter/OptionGroupVariable.h"
 #include "lldb/Interpreter/Options.h"
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/CompilerType.h"
 #include "lldb/Symbol/Function.h"
-#include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/Type.h"
 #include "lldb/Symbol/Variable.h"
 #include "lldb/Symbol/VariableList.h"
-#include "lldb/Target/Process.h"
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/StackFrameRecognizer.h"
 #include "lldb/Target/StopInfo.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/Args.h"
-#include "lldb/Utility/LLDBAssert.h"
-#include "lldb/Utility/StreamString.h"
-#include "lldb/Utility/Timer.h"
 
 #include <memory>
 #include <string>
@@ -54,13 +42,8 @@
 
 // CommandObjectFrameDiagnose
 
-static constexpr OptionDefinition g_frame_diag_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "register", 'r', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeRegisterName,    "A register to diagnose." },
-  { LLDB_OPT_SET_1, false, "address",  'a', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeAddress,         "An address to diagnose." },
-  { LLDB_OPT_SET_1, false, "offset",   'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOffset,          "An optional offset.  Requires --register." }
-    // clang-format on
-};
+#define LLDB_OPTIONS_frame_diag
+#include "CommandOptions.inc"
 
 class CommandObjectFrameDiagnose : public CommandObjectParsed {
 public:
@@ -98,9 +81,7 @@
       } break;
 
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -185,10 +166,10 @@
       return false;
     }
 
-
-    DumpValueObjectOptions::DeclPrintingHelper helper = [&valobj_sp](
-        ConstString type, ConstString var, const DumpValueObjectOptions &opts,
-        Stream &stream) -> bool {
+    DumpValueObjectOptions::DeclPrintingHelper helper =
+        [&valobj_sp](ConstString type, ConstString var,
+                     const DumpValueObjectOptions &opts,
+                     Stream &stream) -> bool {
       const ValueObject::GetExpressionPathFormat format = ValueObject::
           GetExpressionPathFormat::eGetExpressionPathFormatHonorPointers;
       const bool qualify_cxx_base_classes = false;
@@ -217,12 +198,13 @@
 class CommandObjectFrameInfo : public CommandObjectParsed {
 public:
   CommandObjectFrameInfo(CommandInterpreter &interpreter)
-      : CommandObjectParsed(
-            interpreter, "frame info", "List information about the current "
-                                       "stack frame in the current thread.",
-            "frame info",
-            eCommandRequiresFrame | eCommandTryTargetAPILock |
-                eCommandProcessMustBeLaunched | eCommandProcessMustBePaused) {}
+      : CommandObjectParsed(interpreter, "frame info",
+                            "List information about the current "
+                            "stack frame in the current thread.",
+                            "frame info",
+                            eCommandRequiresFrame | eCommandTryTargetAPILock |
+                                eCommandProcessMustBeLaunched |
+                                eCommandProcessMustBePaused) {}
 
   ~CommandObjectFrameInfo() override = default;
 
@@ -238,11 +220,8 @@
 
 // CommandObjectFrameSelect
 
-static OptionDefinition g_frame_select_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "relative", 'r', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOffset, "A relative frame index offset from the current frame index." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_frame_select
+#include "CommandOptions.inc"
 
 class CommandObjectFrameSelect : public CommandObjectParsed {
 public:
@@ -257,42 +236,43 @@
       Status error;
       const int short_option = m_getopt_table[option_idx].val;
       switch (short_option) {
-      case 'r':
-        if (option_arg.getAsInteger(0, relative_frame_offset)) {
-          relative_frame_offset = INT32_MIN;
+      case 'r': {
+        int32_t offset = 0;
+        if (option_arg.getAsInteger(0, offset) || offset == INT32_MIN) {
           error.SetErrorStringWithFormat("invalid frame offset argument '%s'",
                                          option_arg.str().c_str());
-        }
+        } else
+          relative_frame_offset = offset;
         break;
+      }
 
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
     }
 
     void OptionParsingStarting(ExecutionContext *execution_context) override {
-      relative_frame_offset = INT32_MIN;
+      relative_frame_offset.reset();
     }
 
     llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
       return llvm::makeArrayRef(g_frame_select_options);
     }
 
-    int32_t relative_frame_offset;
+    llvm::Optional<int32_t> relative_frame_offset;
   };
 
   CommandObjectFrameSelect(CommandInterpreter &interpreter)
-      : CommandObjectParsed(
-            interpreter, "frame select", "Select the current stack frame by "
-                                         "index from within the current thread "
-                                         "(see 'thread backtrace'.)",
-            nullptr,
-            eCommandRequiresThread | eCommandTryTargetAPILock |
-                eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
+      : CommandObjectParsed(interpreter, "frame select",
+                            "Select the current stack frame by "
+                            "index from within the current thread "
+                            "(see 'thread backtrace'.)",
+                            nullptr,
+                            eCommandRequiresThread | eCommandTryTargetAPILock |
+                                eCommandProcessMustBeLaunched |
+                                eCommandProcessMustBePaused),
         m_options() {
     CommandArgumentEntry arg;
     CommandArgumentData index_arg;
@@ -320,15 +300,16 @@
     Thread *thread = m_exe_ctx.GetThreadPtr();
 
     uint32_t frame_idx = UINT32_MAX;
-    if (m_options.relative_frame_offset != INT32_MIN) {
+    if (m_options.relative_frame_offset.hasValue()) {
       // The one and only argument is a signed relative frame index
       frame_idx = thread->GetSelectedFrameIndex();
       if (frame_idx == UINT32_MAX)
         frame_idx = 0;
 
-      if (m_options.relative_frame_offset < 0) {
-        if (static_cast<int32_t>(frame_idx) >= -m_options.relative_frame_offset)
-          frame_idx += m_options.relative_frame_offset;
+      if (*m_options.relative_frame_offset < 0) {
+        if (static_cast<int32_t>(frame_idx) >=
+            -*m_options.relative_frame_offset)
+          frame_idx += *m_options.relative_frame_offset;
         else {
           if (frame_idx == 0) {
             // If you are already at the bottom of the stack, then just warn
@@ -339,15 +320,15 @@
           } else
             frame_idx = 0;
         }
-      } else if (m_options.relative_frame_offset > 0) {
+      } else if (*m_options.relative_frame_offset > 0) {
         // I don't want "up 20" where "20" takes you past the top of the stack
         // to produce
         // an error, but rather to just go to the top.  So I have to count the
         // stack here...
         const uint32_t num_frames = thread->GetStackFrameCount();
         if (static_cast<int32_t>(num_frames - frame_idx) >
-            m_options.relative_frame_offset)
-          frame_idx += m_options.relative_frame_offset;
+            *m_options.relative_frame_offset)
+          frame_idx += *m_options.relative_frame_offset;
         else {
           if (frame_idx == num_frames - 1) {
             // If we are already at the top of the stack, just warn and don't
@@ -371,7 +352,7 @@
       }
 
       if (command.GetArgumentCount() == 1) {
-        if (command[0].ref.getAsInteger(0, frame_idx)) {
+        if (command[0].ref().getAsInteger(0, frame_idx)) {
           result.AppendErrorWithFormat("invalid frame index argument '%s'.",
                                        command[0].c_str());
           result.SetStatus(eReturnStatusFailed);
@@ -425,14 +406,14 @@
             "uses debug information and memory reads directly, rather than "
             "parsing and evaluating an expression, which may even involve "
             "JITing and running code in the target program.",
-            nullptr, eCommandRequiresFrame | eCommandTryTargetAPILock |
-                         eCommandProcessMustBeLaunched |
-                         eCommandProcessMustBePaused | eCommandRequiresProcess),
+            nullptr,
+            eCommandRequiresFrame | eCommandTryTargetAPILock |
+                eCommandProcessMustBeLaunched | eCommandProcessMustBePaused |
+                eCommandRequiresProcess),
         m_option_group(),
         m_option_variable(
             true), // Include the frame specific options by passing "true"
-        m_option_format(eFormatDefault),
-        m_varobj_options() {
+        m_option_format(eFormatDefault), m_varobj_options() {
     CommandArgumentEntry arg;
     CommandArgumentData var_name_arg;
 
@@ -460,14 +441,13 @@
 
   Options *GetOptions() override { return &m_option_group; }
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     // Arguments are the standard source file completer.
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eVariablePathCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -541,9 +521,9 @@
         for (auto &entry : command) {
           if (m_option_variable.use_regex) {
             const size_t regex_start_index = regex_var_list.GetSize();
-            llvm::StringRef name_str = entry.ref;
+            llvm::StringRef name_str = entry.ref();
             RegularExpression regex(name_str);
-            if (regex.Compile(name_str)) {
+            if (regex.IsValid()) {
               size_t num_matches = 0;
               const size_t num_new_regex_vars =
                   variable_list->AppendVariablesIfUnique(regex, regex_var_list,
@@ -582,9 +562,9 @@
                                                entry.c_str());
               }
             } else {
-              char regex_error[1024];
-              if (regex.GetErrorAsCString(regex_error, sizeof(regex_error)))
-                result.GetErrorStream().Printf("error: %s\n", regex_error);
+              if (llvm::Error err = regex.GetError())
+                result.GetErrorStream().Printf(
+                    "error: %s\n", llvm::toString(std::move(err)).c_str());
               else
                 result.GetErrorStream().Printf(
                     "error: unknown regex error when compiling '%s'\n",
@@ -600,7 +580,7 @@
                 StackFrame::eExpressionPathOptionsInspectAnonymousUnions;
             lldb::VariableSP var_sp;
             valobj_sp = frame->GetValueForVariableExpressionPath(
-                entry.ref, m_varobj_options.use_dynamic, expr_path_options,
+                entry.ref(), m_varobj_options.use_dynamic, expr_path_options,
                 var_sp, error);
             if (valobj_sp) {
               std::string scope_string;
@@ -727,11 +707,11 @@
 
     // Increment statistics.
     bool res = result.Succeeded();
-    Target *target = GetSelectedOrDummyTarget();
+    Target &target = GetSelectedOrDummyTarget();
     if (res)
-      target->IncrementStats(StatisticKind::FrameVarSuccess);
+      target.IncrementStats(StatisticKind::FrameVarSuccess);
     else
-      target->IncrementStats(StatisticKind::FrameVarFailure);
+      target.IncrementStats(StatisticKind::FrameVarFailure);
     return res;
   }
 
@@ -744,14 +724,8 @@
 
 #pragma mark CommandObjectFrameRecognizer
 
-static OptionDefinition g_frame_recognizer_add_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "shlib",         's', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eModuleCompletion, eArgTypeShlibName,   "Name of the module or shared library that this recognizer applies to." },
-  { LLDB_OPT_SET_ALL, false, "function",      'n', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSymbolCompletion, eArgTypeName,        "Name of the function that this recognizer applies to." },
-  { LLDB_OPT_SET_2,   false, "python-class",  'l', OptionParser::eRequiredArgument, nullptr, {}, 0,                                     eArgTypePythonClass, "Give the name of a Python class to use for this frame recognizer." },
-  { LLDB_OPT_SET_ALL, false, "regex",         'x', OptionParser::eNoArgument,       nullptr, {}, 0,                                     eArgTypeNone,        "Function name and module name are actually regular expressions." }
-    // clang-format on
-};
+#define LLDB_OPTIONS_frame_recognizer_add
+#include "CommandOptions.inc"
 
 class CommandObjectFrameRecognizerAdd : public CommandObjectParsed {
 private:
@@ -779,9 +753,7 @@
         m_regex = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -868,7 +840,7 @@
 
 bool CommandObjectFrameRecognizerAdd::DoExecute(Args &command,
                                                 CommandReturnObject &result) {
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
   if (m_options.m_class_name.empty()) {
     result.AppendErrorWithFormat(
         "%s needs a Python class name (-l argument).\n", m_cmd_name.c_str());
@@ -894,9 +866,8 @@
 
   if (interpreter &&
       !interpreter->CheckObjectExists(m_options.m_class_name.c_str())) {
-    result.AppendWarning(
-        "The provided class does not exist - please define it "
-        "before attempting to use this frame recognizer");
+    result.AppendWarning("The provided class does not exist - please define it "
+                         "before attempting to use this frame recognizer");
   }
 
   StackFrameRecognizerSP recognizer_sp =
@@ -923,7 +894,7 @@
 public:
   CommandObjectFrameRecognizerClear(CommandInterpreter &interpreter)
       : CommandObjectParsed(interpreter, "frame recognizer clear",
-                           "Delete all frame recognizers.", nullptr) {}
+                            "Delete all frame recognizers.", nullptr) {}
 
   ~CommandObjectFrameRecognizerClear() override = default;
 
@@ -936,14 +907,14 @@
 };
 
 class CommandObjectFrameRecognizerDelete : public CommandObjectParsed {
- public:
+public:
   CommandObjectFrameRecognizerDelete(CommandInterpreter &interpreter)
       : CommandObjectParsed(interpreter, "frame recognizer delete",
                             "Delete an existing frame recognizer.", nullptr) {}
 
   ~CommandObjectFrameRecognizerDelete() override = default;
 
- protected:
+protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
     if (command.GetArgumentCount() == 0) {
       if (!m_interpreter.Confirm(
@@ -976,7 +947,7 @@
 };
 
 class CommandObjectFrameRecognizerList : public CommandObjectParsed {
- public:
+public:
   CommandObjectFrameRecognizerList(CommandInterpreter &interpreter)
       : CommandObjectParsed(interpreter, "frame recognizer list",
                             "Show a list of active frame recognizers.",
@@ -984,14 +955,15 @@
 
   ~CommandObjectFrameRecognizerList() override = default;
 
- protected:
+protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
     bool any_printed = false;
     StackFrameRecognizerManager::ForEach(
         [&result, &any_printed](uint32_t recognizer_id, std::string name,
                                 std::string function, std::string symbol,
                                 bool regexp) {
-          if (name == "") name = "(internal)";
+          if (name == "")
+            name = "(internal)";
           result.GetOutputStream().Printf(
               "%d: %s, module %s, function %s%s\n", recognizer_id, name.c_str(),
               function.c_str(), symbol.c_str(), regexp ? " (regexp)" : "");
@@ -1009,7 +981,7 @@
 };
 
 class CommandObjectFrameRecognizerInfo : public CommandObjectParsed {
- public:
+public:
   CommandObjectFrameRecognizerInfo(CommandInterpreter &interpreter)
       : CommandObjectParsed(
             interpreter, "frame recognizer info",
@@ -1032,7 +1004,7 @@
 
   ~CommandObjectFrameRecognizerInfo() override = default;
 
- protected:
+protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
     Process *process = m_exe_ctx.GetProcessPtr();
     if (process == nullptr) {
@@ -1080,27 +1052,24 @@
 };
 
 class CommandObjectFrameRecognizer : public CommandObjectMultiword {
- public:
+public:
   CommandObjectFrameRecognizer(CommandInterpreter &interpreter)
       : CommandObjectMultiword(
             interpreter, "frame recognizer",
             "Commands for editing and viewing frame recognizers.",
             "frame recognizer [<sub-command-options>] ") {
-    LoadSubCommand(
-        "add",
-        CommandObjectSP(new CommandObjectFrameRecognizerAdd(interpreter)));
+    LoadSubCommand("add", CommandObjectSP(new CommandObjectFrameRecognizerAdd(
+                              interpreter)));
     LoadSubCommand(
         "clear",
         CommandObjectSP(new CommandObjectFrameRecognizerClear(interpreter)));
     LoadSubCommand(
         "delete",
         CommandObjectSP(new CommandObjectFrameRecognizerDelete(interpreter)));
-    LoadSubCommand(
-        "list",
-        CommandObjectSP(new CommandObjectFrameRecognizerList(interpreter)));
-    LoadSubCommand(
-        "info",
-        CommandObjectSP(new CommandObjectFrameRecognizerInfo(interpreter)));
+    LoadSubCommand("list", CommandObjectSP(new CommandObjectFrameRecognizerList(
+                               interpreter)));
+    LoadSubCommand("info", CommandObjectSP(new CommandObjectFrameRecognizerInfo(
+                               interpreter)));
   }
 
   ~CommandObjectFrameRecognizer() override = default;
@@ -1112,9 +1081,10 @@
 
 CommandObjectMultiwordFrame::CommandObjectMultiwordFrame(
     CommandInterpreter &interpreter)
-    : CommandObjectMultiword(interpreter, "frame", "Commands for selecting and "
-                                                   "examing the current "
-                                                   "thread's stack frames.",
+    : CommandObjectMultiword(interpreter, "frame",
+                             "Commands for selecting and "
+                             "examing the current "
+                             "thread's stack frames.",
                              "frame <subcommand> [<subcommand-options>]") {
   LoadSubCommand("diagnose",
                  CommandObjectSP(new CommandObjectFrameDiagnose(interpreter)));
@@ -1124,10 +1094,9 @@
                  CommandObjectSP(new CommandObjectFrameSelect(interpreter)));
   LoadSubCommand("variable",
                  CommandObjectSP(new CommandObjectFrameVariable(interpreter)));
-#ifndef LLDB_DISABLE_PYTHON
-  LoadSubCommand(
-      "recognizer",
-      CommandObjectSP(new CommandObjectFrameRecognizer(interpreter)));
+#if LLDB_ENABLE_PYTHON
+  LoadSubCommand("recognizer", CommandObjectSP(new CommandObjectFrameRecognizer(
+                                   interpreter)));
 #endif
 }
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectFrame.h b/src/llvm-project/lldb/source/Commands/CommandObjectFrame.h
index 46a59f7..b2378f1 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectFrame.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectFrame.h
@@ -10,7 +10,6 @@
 #define liblldb_CommandObjectFrame_h_
 
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Interpreter/Options.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp
index 21ed510..67ddc68 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectGUI.cpp
@@ -8,9 +8,10 @@
 
 #include "CommandObjectGUI.h"
 
+#include "lldb/Core/IOHandlerCursesGUI.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/lldb-private.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -24,13 +25,14 @@
 CommandObjectGUI::~CommandObjectGUI() {}
 
 bool CommandObjectGUI::DoExecute(Args &args, CommandReturnObject &result) {
-#ifndef LLDB_DISABLE_CURSES
+#if LLDB_ENABLE_CURSES
   if (args.GetArgumentCount() == 0) {
     Debugger &debugger = GetDebugger();
 
-    lldb::StreamFileSP input_sp = debugger.GetInputFile();
-    if (input_sp && input_sp->GetFile().GetIsRealTerminal() &&
-        input_sp->GetFile().GetIsInteractive()) {
+    File &input = debugger.GetInputFile();
+    File &output = debugger.GetOutputFile();
+    if (input.GetStream() && output.GetStream() && input.GetIsRealTerminal() &&
+        input.GetIsInteractive()) {
       IOHandlerSP io_handler_sp(new IOHandlerCursesGUI(debugger));
       if (io_handler_sp)
         debugger.PushIOHandler(io_handler_sp);
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectHelp.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectHelp.cpp
index ab55791..6e908dc 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectHelp.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectHelp.cpp
@@ -8,9 +8,7 @@
 
 #include "CommandObjectHelp.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Interpreter/CommandObjectMultiword.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Interpreter/Options.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -27,25 +25,27 @@
   std::string command_str = command.str();
   std::string prefix_str = prefix.str();
   std::string subcommand_str = subcommand.str();
-  const std::string &lookup_str = !subcommand_str.empty() ? subcommand_str : command_str;
+  const std::string &lookup_str =
+      !subcommand_str.empty() ? subcommand_str : command_str;
   s->Printf("'%s' is not a known command.\n", command_str.c_str());
   s->Printf("Try '%shelp' to see a current list of commands.\n",
             prefix.str().c_str());
   if (include_upropos) {
     s->Printf("Try '%sapropos %s' for a list of related commands.\n",
-      prefix_str.c_str(), lookup_str.c_str());
+              prefix_str.c_str(), lookup_str.c_str());
   }
   if (include_type_lookup) {
     s->Printf("Try '%stype lookup %s' for information on types, methods, "
               "functions, modules, etc.",
-      prefix_str.c_str(), lookup_str.c_str());
+              prefix_str.c_str(), lookup_str.c_str());
   }
 }
 
 CommandObjectHelp::CommandObjectHelp(CommandInterpreter &interpreter)
-    : CommandObjectParsed(interpreter, "help", "Show a list of all debugger "
-                                               "commands, or give details "
-                                               "about a specific command.",
+    : CommandObjectParsed(interpreter, "help",
+                          "Show a list of all debugger "
+                          "commands, or give details "
+                          "about a specific command.",
                           "help [<cmd-name>]"),
       m_options() {
   CommandArgumentEntry arg;
@@ -65,10 +65,8 @@
 
 CommandObjectHelp::~CommandObjectHelp() = default;
 
-static constexpr OptionDefinition g_help_options[] = {
 #define LLDB_OPTIONS_help
 #include "CommandOptions.inc"
-};
 
 llvm::ArrayRef<OptionDefinition>
 CommandObjectHelp::CommandOptions::GetDefinitions() {
@@ -98,7 +96,7 @@
     // Get command object for the first command argument. Only search built-in
     // command dictionary.
     StringList matches;
-    auto command_name = command[0].ref;
+    auto command_name = command[0].ref();
     cmd_obj = m_interpreter.GetCommandObject(command_name, &matches);
 
     if (cmd_obj != nullptr) {
@@ -109,7 +107,7 @@
       // object that corresponds to the help command entered.
       std::string sub_command;
       for (auto &entry : command.entries().drop_front()) {
-        sub_command = entry.ref;
+        sub_command = entry.ref();
         matches.Clear();
         if (sub_cmd_obj->IsAlias())
           sub_cmd_obj =
@@ -203,24 +201,23 @@
   return result.Succeeded();
 }
 
-int CommandObjectHelp::HandleCompletion(CompletionRequest &request) {
+void CommandObjectHelp::HandleCompletion(CompletionRequest &request) {
   // Return the completions of the commands in the help system:
   if (request.GetCursorIndex() == 0) {
-    return m_interpreter.HandleCompletionMatches(request);
-  } else {
-    CommandObject *cmd_obj =
-        m_interpreter.GetCommandObject(request.GetParsedLine()[0].ref);
-
-    // The command that they are getting help on might be ambiguous, in which
-    // case we should complete that, otherwise complete with the command the
-    // user is getting help on...
-
-    if (cmd_obj) {
-      request.GetParsedLine().Shift();
-      request.SetCursorIndex(request.GetCursorIndex() - 1);
-      return cmd_obj->HandleCompletion(request);
-    } else {
-      return m_interpreter.HandleCompletionMatches(request);
-    }
+    m_interpreter.HandleCompletionMatches(request);
+    return;
   }
+  CommandObject *cmd_obj =
+      m_interpreter.GetCommandObject(request.GetParsedLine()[0].ref());
+
+  // The command that they are getting help on might be ambiguous, in which
+  // case we should complete that, otherwise complete with the command the
+  // user is getting help on...
+
+  if (cmd_obj) {
+    request.ShiftArguments();
+    cmd_obj->HandleCompletion(request);
+    return;
+  }
+  m_interpreter.HandleCompletionMatches(request);
 }
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectHelp.h b/src/llvm-project/lldb/source/Commands/CommandObjectHelp.h
index a641b19..52a00ac 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectHelp.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectHelp.h
@@ -23,7 +23,7 @@
 
   ~CommandObjectHelp() override;
 
-  int HandleCompletion(CompletionRequest &request) override;
+  void HandleCompletion(CompletionRequest &request) override;
 
   static void GenerateAdditionalHelpAvenuesMessage(
       Stream *s, llvm::StringRef command, llvm::StringRef prefix,
@@ -52,9 +52,7 @@
         m_show_hidden = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectLanguage.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectLanguage.cpp
index 47c9e2a..35ce6e3 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectLanguage.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectLanguage.cpp
@@ -8,12 +8,8 @@
 
 #include "CommandObjectLanguage.h"
 
-#include "lldb/Host/Host.h"
 
-#include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Interpreter/CommandReturnObject.h"
 
-#include "lldb/Target/Language.h"
 #include "lldb/Target/LanguageRuntime.h"
 
 using namespace lldb;
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectLanguage.h b/src/llvm-project/lldb/source/Commands/CommandObjectLanguage.h
index b86457c..47079e2 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectLanguage.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectLanguage.h
@@ -9,10 +9,7 @@
 #ifndef liblldb_CommandObjectLanguage_h_
 #define liblldb_CommandObjectLanguage_h_
 
-
-
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/lldb-types.h"
 
 namespace lldb_private {
 class CommandObjectLanguage : public CommandObjectMultiword {
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectLog.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectLog.cpp
index 2ad61de..9bf0b30 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectLog.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectLog.cpp
@@ -8,43 +8,36 @@
 
 #include "CommandObjectLog.h"
 #include "lldb/Core/Debugger.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/StreamFile.h"
 #include "lldb/Host/OptionParser.h"
-#include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
 #include "lldb/Interpreter/Options.h"
-#include "lldb/Symbol/LineTable.h"
-#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/Target.h"
 #include "lldb/Utility/Args.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/Timer.h"
 
 using namespace lldb;
 using namespace lldb_private;
 
-static constexpr OptionDefinition g_log_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "file",       'f', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFilename, "Set the destination file to log to." },
-  { LLDB_OPT_SET_1, false, "threadsafe", 't', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,     "Enable thread safe logging to avoid interweaved log lines." },
-  { LLDB_OPT_SET_1, false, "verbose",    'v', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,     "Enable verbose logging." },
-  { LLDB_OPT_SET_1, false, "sequence",   's', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,     "Prepend all log lines with an increasing integer sequence id." },
-  { LLDB_OPT_SET_1, false, "timestamp",  'T', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,     "Prepend all log lines with a timestamp." },
-  { LLDB_OPT_SET_1, false, "pid-tid",    'p', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,     "Prepend all log lines with the process and thread ID that generates the log line." },
-  { LLDB_OPT_SET_1, false, "thread-name",'n', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,     "Prepend all log lines with the thread name for the thread that generates the log line." },
-  { LLDB_OPT_SET_1, false, "stack",      'S', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,     "Append a stack backtrace to each log line." },
-  { LLDB_OPT_SET_1, false, "append",     'a', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,     "Append to the log file instead of overwriting." },
-  { LLDB_OPT_SET_1, false, "file-function",'F',OptionParser::eNoArgument,      nullptr, {}, 0, eArgTypeNone,     "Prepend the names of files and function that generate the logs." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_log
+#include "CommandOptions.inc"
+
+/// Common completion logic for log enable/disable.
+static void CompleteEnableDisable(CompletionRequest &request) {
+  size_t arg_index = request.GetCursorIndex();
+  if (arg_index == 0) { // We got: log enable/disable x[tab]
+    for (llvm::StringRef channel : Log::ListChannels())
+      request.TryCompleteCurrentArg(channel);
+  } else if (arg_index >= 1) { // We got: log enable/disable channel x[tab]
+    llvm::StringRef channel = request.GetParsedLine().GetArgumentAtIndex(0);
+    Log::ForEachChannelCategory(
+        channel, [&request](llvm::StringRef name, llvm::StringRef desc) {
+          request.TryCompleteCurrentArg(name, desc);
+        });
+  }
+}
 
 class CommandObjectLogEnable : public CommandObjectParsed {
 public:
@@ -125,9 +118,7 @@
         log_options |= LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -148,17 +139,24 @@
     uint32_t log_options;
   };
 
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
+    CompleteEnableDisable(request);
+  }
+
 protected:
   bool DoExecute(Args &args, CommandReturnObject &result) override {
     if (args.GetArgumentCount() < 2) {
       result.AppendErrorWithFormat(
           "%s takes a log channel and one or more log types.\n",
           m_cmd_name.c_str());
+      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     // Store into a std::string since we're about to shift the channel off.
-    const std::string channel = args[0].ref;
+    const std::string channel = args[0].ref();
     args.Shift(); // Shift off the channel
     char log_file[PATH_MAX];
     if (m_options.log_file)
@@ -215,16 +213,23 @@
 
   ~CommandObjectLogDisable() override = default;
 
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
+    CompleteEnableDisable(request);
+  }
+
 protected:
   bool DoExecute(Args &args, CommandReturnObject &result) override {
     if (args.empty()) {
       result.AppendErrorWithFormat(
           "%s takes a log channel and one or more log types.\n",
           m_cmd_name.c_str());
+      result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
-    const std::string channel = args[0].ref;
+    const std::string channel = args[0].ref();
     args.Shift(); // Shift off the channel
     if (channel == "all") {
       Log::DisableAllLogChannels();
@@ -266,6 +271,13 @@
 
   ~CommandObjectLogList() override = default;
 
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
+    for (llvm::StringRef channel : Log::ListChannels())
+      request.TryCompleteCurrentArg(channel);
+  }
+
 protected:
   bool DoExecute(Args &args, CommandReturnObject &result) override {
     std::string output;
@@ -277,7 +289,7 @@
       bool success = true;
       for (const auto &entry : args.entries())
         success =
-            success && Log::ListChannelCategories(entry.ref, output_stream);
+            success && Log::ListChannelCategories(entry.ref(), output_stream);
       if (success)
         result.SetStatus(eReturnStatusSuccessFinishResult);
     }
@@ -303,7 +315,7 @@
     result.SetStatus(eReturnStatusFailed);
 
     if (args.GetArgumentCount() == 1) {
-      auto sub_command = args[0].ref;
+      auto sub_command = args[0].ref();
 
       if (sub_command.equals_lower("enable")) {
         Timer::SetDisplayDepth(UINT32_MAX);
@@ -320,8 +332,8 @@
         result.SetStatus(eReturnStatusSuccessFinishResult);
       }
     } else if (args.GetArgumentCount() == 2) {
-      auto sub_command = args[0].ref;
-      auto param = args[1].ref;
+      auto sub_command = args[0].ref();
+      auto param = args[1].ref();
 
       if (sub_command.equals_lower("enable")) {
         uint32_t depth;
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectLog.h b/src/llvm-project/lldb/source/Commands/CommandObjectLog.h
index b2da900..eae41bf 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectLog.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectLog.h
@@ -9,8 +9,6 @@
 #ifndef liblldb_CommandObjectLog_h_
 #define liblldb_CommandObjectLog_h_
 
-#include <map>
-#include <string>
 
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectMemory.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectMemory.cpp
index 1afcac7..e497b52 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectMemory.cpp
@@ -7,15 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "CommandObjectMemory.h"
-#include "lldb/Core/Debugger.h"
 #include "lldb/Core/DumpDataExtractor.h"
-#include "lldb/Core/Module.h"
 #include "lldb/Core/Section.h"
 #include "lldb/Core/ValueObjectMemory.h"
-#include "lldb/DataFormatters/ValueObjectPrinter.h"
 #include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Host/OptionParser.h"
-#include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
 #include "lldb/Interpreter/OptionGroupFormat.h"
@@ -38,7 +34,6 @@
 #include "lldb/Utility/DataBufferLLVM.h"
 #include "lldb/Utility/StreamString.h"
 
-#include "lldb/lldb-private.h"
 
 #include <cinttypes>
 #include <memory>
@@ -46,20 +41,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
-static constexpr OptionDefinition g_read_memory_options[] = {
-    // clang-format off
-  {LLDB_OPT_SET_1, false, "num-per-line", 'l', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeNumberPerLine, "The number of items per line to display." },
-  {LLDB_OPT_SET_2, false, "binary",       'b', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,          "If true, memory will be saved as binary. If false, the memory is saved save as an ASCII dump that "
-                                                                                                                            "uses the format, size, count and number per line settings." },
-  {LLDB_OPT_SET_3 |
-   LLDB_OPT_SET_4, true , "type",         't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeName,          "The name of a type to view memory as." },
-  {LLDB_OPT_SET_4, false, "language",     'x', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeLanguage,          "The language of the type to view memory as."},
-  {LLDB_OPT_SET_3, false, "offset",       'E', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCount,         "How many elements of the specified type to skip before starting to display data." },
-  {LLDB_OPT_SET_1 |
-   LLDB_OPT_SET_2 |
-   LLDB_OPT_SET_3, false, "force",        'r', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,          "Necessary if reading over target.max-memory-read-size bytes." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_memory_read
+#include "CommandOptions.inc"
 
 class OptionGroupReadMemory : public OptionGroup {
 public:
@@ -70,13 +53,13 @@
   ~OptionGroupReadMemory() override = default;
 
   llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
-    return llvm::makeArrayRef(g_read_memory_options);
+    return llvm::makeArrayRef(g_memory_read_options);
   }
 
   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
                         ExecutionContext *execution_context) override {
     Status error;
-    const int short_option = g_read_memory_options[option_idx].short_option;
+    const int short_option = g_memory_read_options[option_idx].short_option;
 
     switch (short_option) {
     case 'l':
@@ -108,9 +91,7 @@
       break;
 
     default:
-      error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                     short_option);
-      break;
+      llvm_unreachable("Unimplemented option");
     }
     return error;
   }
@@ -175,6 +156,7 @@
     case eFormatOctal:
     case eFormatDecimal:
     case eFormatEnum:
+    case eFormatUnicode8:
     case eFormatUnicode16:
     case eFormatUnicode32:
     case eFormatUnsigned:
@@ -606,7 +588,7 @@
     }
 
     if (argc > 0)
-      addr = OptionArgParser::ToAddress(&m_exe_ctx, command[0].ref,
+      addr = OptionArgParser::ToAddress(&m_exe_ctx, command[0].ref(),
                                         LLDB_INVALID_ADDRESS, &error);
 
     if (addr == LLDB_INVALID_ADDRESS) {
@@ -618,7 +600,7 @@
 
     if (argc == 2) {
       lldb::addr_t end_addr = OptionArgParser::ToAddress(
-          &m_exe_ctx, command[1].ref, LLDB_INVALID_ADDRESS, nullptr);
+          &m_exe_ctx, command[1].ref(), LLDB_INVALID_ADDRESS, nullptr);
       if (end_addr == LLDB_INVALID_ADDRESS) {
         result.AppendError("invalid end address expression.");
         result.AppendError(error.AsCString());
@@ -778,26 +760,27 @@
     m_prev_varobj_options = m_varobj_options;
     m_prev_compiler_type = compiler_type;
 
-    StreamFile outfile_stream;
-    Stream *output_stream = nullptr;
+    std::unique_ptr<Stream> output_stream_storage;
+    Stream *output_stream_p = nullptr;
     const FileSpec &outfile_spec =
         m_outfile_options.GetFile().GetCurrentValue();
 
     std::string path = outfile_spec.GetPath();
     if (outfile_spec) {
 
-      uint32_t open_options =
-          File::eOpenOptionWrite | File::eOpenOptionCanCreate;
+      auto open_options = File::eOpenOptionWrite | File::eOpenOptionCanCreate;
       const bool append = m_outfile_options.GetAppend().GetCurrentValue();
       if (append)
         open_options |= File::eOpenOptionAppend;
 
-      Status error = FileSystem::Instance().Open(outfile_stream.GetFile(),
-                                                 outfile_spec, open_options);
-      if (error.Success()) {
+      auto outfile = FileSystem::Instance().Open(outfile_spec, open_options);
+
+      if (outfile) {
+        auto outfile_stream_up =
+            std::make_unique<StreamFile>(std::move(outfile.get()));
         if (m_memory_options.m_output_as_binary) {
           const size_t bytes_written =
-              outfile_stream.Write(data_sp->GetBytes(), bytes_read);
+              outfile_stream_up->Write(data_sp->GetBytes(), bytes_read);
           if (bytes_written > 0) {
             result.GetOutputStream().Printf(
                 "%zi bytes %s to '%s'\n", bytes_written,
@@ -813,16 +796,19 @@
         } else {
           // We are going to write ASCII to the file just point the
           // output_stream to our outfile_stream...
-          output_stream = &outfile_stream;
+          output_stream_storage = std::move(outfile_stream_up);
+          output_stream_p = output_stream_storage.get();
         }
       } else {
-        result.AppendErrorWithFormat("Failed to open file '%s' for %s.\n",
+        result.AppendErrorWithFormat("Failed to open file '%s' for %s:\n",
                                      path.c_str(), append ? "append" : "write");
+
+        result.AppendError(llvm::toString(outfile.takeError()));
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else {
-      output_stream = &result.GetOutputStream();
+      output_stream_p = &result.GetOutputStream();
     }
 
     ExecutionContextScope *exe_scope = m_exe_ctx.GetBestExecutionContextScope();
@@ -842,7 +828,7 @@
           DumpValueObjectOptions options(m_varobj_options.GetAsDumpOptions(
               eLanguageRuntimeDescriptionDisplayVerbosityFull, format));
 
-          valobj_sp->Dump(*output_stream, options);
+          valobj_sp->Dump(*output_stream_p, options);
         } else {
           result.AppendErrorWithFormat(
               "failed to create a value object for: (%s) %s\n",
@@ -882,13 +868,13 @@
       }
     }
 
-    assert(output_stream);
+    assert(output_stream_p);
     size_t bytes_dumped = DumpDataExtractor(
-        data, output_stream, 0, format, item_byte_size, item_count,
+        data, output_stream_p, 0, format, item_byte_size, item_count,
         num_per_line / target->GetArchitecture().GetDataByteSize(), addr, 0, 0,
         exe_scope);
     m_next_addr = addr + bytes_dumped;
-    output_stream->EOL();
+    output_stream_p->EOL();
     return true;
   }
 
@@ -906,14 +892,8 @@
   CompilerType m_prev_compiler_type;
 };
 
-static constexpr OptionDefinition g_memory_find_option_table[] = {
-    // clang-format off
-  {LLDB_OPT_SET_1,   true,  "expression",  'e', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeExpression, "Evaluate an expression to obtain a byte pattern."},
-  {LLDB_OPT_SET_2,   true,  "string",      's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeName,       "Use text to find a byte pattern."},
-  {LLDB_OPT_SET_ALL, false, "count",       'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCount,      "How many times to perform the search."},
-  {LLDB_OPT_SET_ALL, false, "dump-offset", 'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOffset,     "When dumping memory for a match, an offset from the match location to start dumping from."},
-    // clang-format on
-};
+#define LLDB_OPTIONS_memory_find
+#include "CommandOptions.inc"
 
 // Find the specified data in memory
 class CommandObjectMemoryFind : public CommandObjectParsed {
@@ -925,14 +905,13 @@
     ~OptionGroupFindMemory() override = default;
 
     llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
-      return llvm::makeArrayRef(g_memory_find_option_table);
+      return llvm::makeArrayRef(g_memory_find_options);
     }
 
     Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
                           ExecutionContext *execution_context) override {
       Status error;
-      const int short_option =
-          g_memory_find_option_table[option_idx].short_option;
+      const int short_option = g_memory_find_options[option_idx].short_option;
 
       switch (short_option) {
       case 'e':
@@ -954,9 +933,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -1056,13 +1033,13 @@
 
     Status error;
     lldb::addr_t low_addr = OptionArgParser::ToAddress(
-        &m_exe_ctx, command[0].ref, LLDB_INVALID_ADDRESS, &error);
+        &m_exe_ctx, command[0].ref(), LLDB_INVALID_ADDRESS, &error);
     if (low_addr == LLDB_INVALID_ADDRESS || error.Fail()) {
       result.AppendError("invalid low address");
       return false;
     }
     lldb::addr_t high_addr = OptionArgParser::ToAddress(
-        &m_exe_ctx, command[1].ref, LLDB_INVALID_ADDRESS, &error);
+        &m_exe_ctx, command[1].ref(), LLDB_INVALID_ADDRESS, &error);
     if (high_addr == LLDB_INVALID_ADDRESS || error.Fail()) {
       result.AppendError("invalid high address");
       return false;
@@ -1203,12 +1180,8 @@
   OptionGroupFindMemory m_memory_options;
 };
 
-static constexpr OptionDefinition g_memory_write_option_table[] = {
-    // clang-format off
-  {LLDB_OPT_SET_1, true,  "infile", 'i', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFilename, "Write memory using the contents of a file."},
-  {LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOffset,   "Start writing bytes from an offset within the input file."},
-    // clang-format on
-};
+#define LLDB_OPTIONS_memory_write
+#include "CommandOptions.inc"
 
 // Write memory to the inferior process
 class CommandObjectMemoryWrite : public CommandObjectParsed {
@@ -1220,14 +1193,13 @@
     ~OptionGroupWriteMemory() override = default;
 
     llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
-      return llvm::makeArrayRef(g_memory_write_option_table);
+      return llvm::makeArrayRef(g_memory_write_options);
     }
 
     Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
                           ExecutionContext *execution_context) override {
       Status error;
-      const int short_option =
-          g_memory_write_option_table[option_idx].short_option;
+      const int short_option = g_memory_write_options[option_idx].short_option;
 
       switch (short_option) {
       case 'i':
@@ -1249,9 +1221,7 @@
       } break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -1368,7 +1338,7 @@
 
     Status error;
     lldb::addr_t addr = OptionArgParser::ToAddress(
-        &m_exe_ctx, command[0].ref, LLDB_INVALID_ADDRESS, &error);
+        &m_exe_ctx, command[0].ref(), LLDB_INVALID_ADDRESS, &error);
 
     if (addr == LLDB_INVALID_ADDRESS) {
       result.AppendError("invalid address expression\n");
@@ -1435,6 +1405,7 @@
       case eFormatBytesWithASCII:
       case eFormatComplex:
       case eFormatEnum:
+      case eFormatUnicode8:
       case eFormatUnicode16:
       case eFormatUnicode32:
       case eFormatVectorOfChar:
@@ -1464,16 +1435,15 @@
       case eFormatBytes:
       case eFormatHex:
       case eFormatHexUppercase:
-      case eFormatPointer:
-      {
+      case eFormatPointer: {
         // Decode hex bytes
         // Be careful, getAsInteger with a radix of 16 rejects "0xab" so we
         // have to special case that:
         bool success = false;
-        if (entry.ref.startswith("0x"))
-          success = !entry.ref.getAsInteger(0, uval64);
+        if (entry.ref().startswith("0x"))
+          success = !entry.ref().getAsInteger(0, uval64);
         if (!success)
-          success = !entry.ref.getAsInteger(16, uval64);
+          success = !entry.ref().getAsInteger(16, uval64);
         if (!success) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid hex string value.\n", entry.c_str());
@@ -1491,7 +1461,7 @@
         break;
       }
       case eFormatBoolean:
-        uval64 = OptionArgParser::ToBoolean(entry.ref, false, &success);
+        uval64 = OptionArgParser::ToBoolean(entry.ref(), false, &success);
         if (!success) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid boolean string value.\n", entry.c_str());
@@ -1502,7 +1472,7 @@
         break;
 
       case eFormatBinary:
-        if (entry.ref.getAsInteger(2, uval64)) {
+        if (entry.ref().getAsInteger(2, uval64)) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid binary string value.\n", entry.c_str());
           result.SetStatus(eReturnStatusFailed);
@@ -1521,10 +1491,10 @@
       case eFormatCharArray:
       case eFormatChar:
       case eFormatCString: {
-        if (entry.ref.empty())
+        if (entry.ref().empty())
           break;
 
-        size_t len = entry.ref.size();
+        size_t len = entry.ref().size();
         // Include the NULL for C strings...
         if (m_format_options.GetFormat() == eFormatCString)
           ++len;
@@ -1541,7 +1511,7 @@
         break;
       }
       case eFormatDecimal:
-        if (entry.ref.getAsInteger(0, sval64)) {
+        if (entry.ref().getAsInteger(0, sval64)) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid signed decimal value.\n", entry.c_str());
           result.SetStatus(eReturnStatusFailed);
@@ -1559,7 +1529,7 @@
 
       case eFormatUnsigned:
 
-        if (!entry.ref.getAsInteger(0, uval64)) {
+        if (!entry.ref().getAsInteger(0, uval64)) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid unsigned decimal string value.\n",
               entry.c_str());
@@ -1577,7 +1547,7 @@
         break;
 
       case eFormatOctal:
-        if (entry.ref.getAsInteger(8, uval64)) {
+        if (entry.ref().getAsInteger(8, uval64)) {
           result.AppendErrorWithFormat(
               "'%s' is not a valid octal string value.\n", entry.c_str());
           result.SetStatus(eReturnStatusFailed);
@@ -1621,13 +1591,14 @@
 class CommandObjectMemoryHistory : public CommandObjectParsed {
 public:
   CommandObjectMemoryHistory(CommandInterpreter &interpreter)
-      : CommandObjectParsed(
-            interpreter, "memory history", "Print recorded stack traces for "
-                                           "allocation/deallocation events "
-                                           "associated with an address.",
-            nullptr,
-            eCommandRequiresTarget | eCommandRequiresProcess |
-                eCommandProcessMustBePaused | eCommandProcessMustBeLaunched) {
+      : CommandObjectParsed(interpreter, "memory history",
+                            "Print recorded stack traces for "
+                            "allocation/deallocation events "
+                            "associated with an address.",
+                            nullptr,
+                            eCommandRequiresTarget | eCommandRequiresProcess |
+                                eCommandProcessMustBePaused |
+                                eCommandProcessMustBeLaunched) {
     CommandArgumentEntry arg1;
     CommandArgumentData addr_arg;
 
@@ -1663,7 +1634,7 @@
 
     Status error;
     lldb::addr_t addr = OptionArgParser::ToAddress(
-        &m_exe_ctx, command[0].ref, LLDB_INVALID_ADDRESS, &error);
+        &m_exe_ctx, command[0].ref(), LLDB_INVALID_ADDRESS, &error);
 
     if (addr == LLDB_INVALID_ADDRESS) {
       result.AppendError("invalid address expression");
@@ -1728,7 +1699,7 @@
         result.SetStatus(eReturnStatusFailed);
       } else {
         if (command.GetArgumentCount() == 1) {
-          auto load_addr_str = command[0].ref;
+          auto load_addr_str = command[0].ref();
           load_addr = OptionArgParser::ToAddress(&m_exe_ctx, load_addr_str,
                                                  LLDB_INVALID_ADDRESS, &error);
           if (error.Fail() || load_addr == LLDB_INVALID_ADDRESS) {
@@ -1754,15 +1725,12 @@
               section_name = section_sp->GetName();
             }
           }
-          result.AppendMessageWithFormat(
-              "[0x%16.16" PRIx64 "-0x%16.16" PRIx64 ") %c%c%c%s%s%s%s\n",
+          result.AppendMessageWithFormatv(
+              "[{0:x16}-{1:x16}) {2:r}{3:w}{4:x}{5}{6}{7}{8}\n",
               range_info.GetRange().GetRangeBase(),
-              range_info.GetRange().GetRangeEnd(),
-              range_info.GetReadable() ? 'r' : '-',
-              range_info.GetWritable() ? 'w' : '-',
-              range_info.GetExecutable() ? 'x' : '-',
-              name ? " " : "", name.AsCString(""),
-              section_name ? " " : "", section_name.AsCString(""));
+              range_info.GetRange().GetRangeEnd(), range_info.GetReadable(),
+              range_info.GetWritable(), range_info.GetExecutable(),
+              name ? " " : "", name, section_name ? " " : "", section_name);
           m_prev_end_addr = range_info.GetRange().GetRangeEnd();
           result.SetStatus(eReturnStatusSuccessFinishResult);
         } else {
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp
index 4011cce..67225d3 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Core/Debugger.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/Options.h"
@@ -93,9 +92,11 @@
     return result.Succeeded();
   }
 
-  auto sub_command = args[0].ref;
-  if (sub_command.empty())
+  auto sub_command = args[0].ref();
+  if (sub_command.empty()) {
+    result.AppendError("Need to specify a non-empty subcommand.");
     return result.Succeeded();
+  }
 
   if (sub_command.equals_lower("help")) {
     this->CommandObject::GenerateHelpText(result);
@@ -136,9 +137,9 @@
 
   if (num_subcmd_matches > 0) {
     error_msg.append(" Possible completions:");
-    for (size_t i = 0; i < matches.GetSize(); i++) {
+    for (const std::string &match : matches) {
       error_msg.append("\n\t");
-      error_msg.append(matches.GetStringAtIndex(i));
+      error_msg.append(match);
     }
   }
   error_msg.append("\n");
@@ -179,12 +180,8 @@
                            "'help <command> <subcommand>'.\n");
 }
 
-int CommandObjectMultiword::HandleCompletion(CompletionRequest &request) {
-  // Any of the command matches will provide a complete word, otherwise the
-  // individual completers will override this.
-  request.SetWordComplete(true);
-
-  auto arg0 = request.GetParsedLine()[0].ref;
+void CommandObjectMultiword::HandleCompletion(CompletionRequest &request) {
+  auto arg0 = request.GetParsedLine()[0].ref();
   if (request.GetCursorIndex() == 0) {
     StringList new_matches, descriptions;
     AddNamesMatchingPartialString(m_subcommand_dict, arg0, new_matches,
@@ -197,32 +194,28 @@
       StringList temp_matches;
       CommandObject *cmd_obj = GetSubcommandObject(arg0, &temp_matches);
       if (cmd_obj != nullptr) {
-        if (request.GetParsedLine().GetArgumentCount() == 1) {
-          request.SetWordComplete(true);
-        } else {
+        if (request.GetParsedLine().GetArgumentCount() != 1) {
           request.GetParsedLine().Shift();
-          request.SetCursorCharPosition(0);
-          request.GetParsedLine().AppendArgument(llvm::StringRef());
-          return cmd_obj->HandleCompletion(request);
+          request.AppendEmptyArgument();
+          cmd_obj->HandleCompletion(request);
         }
       }
     }
-    return new_matches.GetSize();
-  } else {
-    StringList new_matches;
-    CommandObject *sub_command_object = GetSubcommandObject(arg0, &new_matches);
-    if (sub_command_object == nullptr) {
-      request.AddCompletions(new_matches);
-      return request.GetNumberOfMatches();
-    } else {
-      // Remove the one match that we got from calling GetSubcommandObject.
-      new_matches.DeleteStringAtIndex(0);
-      request.AddCompletions(new_matches);
-      request.GetParsedLine().Shift();
-      request.SetCursorIndex(request.GetCursorIndex() - 1);
-      return sub_command_object->HandleCompletion(request);
-    }
+    return;
   }
+
+  StringList new_matches;
+  CommandObject *sub_command_object = GetSubcommandObject(arg0, &new_matches);
+  if (sub_command_object == nullptr) {
+    request.AddCompletions(new_matches);
+    return;
+  }
+
+  // Remove the one match that we got from calling GetSubcommandObject.
+  new_matches.DeleteStringAtIndex(0);
+  request.AddCompletions(new_matches);
+  request.ShiftArguments();
+  sub_command_object->HandleCompletion(request);
 }
 
 const char *CommandObjectMultiword::GetRepeatCommand(Args &current_command_args,
@@ -231,7 +224,7 @@
   if (current_command_args.GetArgumentCount() <= index)
     return nullptr;
   CommandObject *sub_command_object =
-      GetSubcommandObject(current_command_args[index].ref);
+      GetSubcommandObject(current_command_args[index].ref());
   if (sub_command_object == nullptr)
     return nullptr;
   return sub_command_object->GetRepeatCommand(current_command_args, index);
@@ -360,19 +353,17 @@
   return nullptr;
 }
 
-int CommandObjectProxy::HandleCompletion(CompletionRequest &request) {
+void CommandObjectProxy::HandleCompletion(CompletionRequest &request) {
   CommandObject *proxy_command = GetProxyCommandObject();
   if (proxy_command)
-    return proxy_command->HandleCompletion(request);
-  return 0;
+    proxy_command->HandleCompletion(request);
 }
 
-int CommandObjectProxy::HandleArgumentCompletion(
+void CommandObjectProxy::HandleArgumentCompletion(
     CompletionRequest &request, OptionElementVector &opt_element_vector) {
   CommandObject *proxy_command = GetProxyCommandObject();
   if (proxy_command)
-    return proxy_command->HandleArgumentCompletion(request, opt_element_vector);
-  return 0;
+    proxy_command->HandleArgumentCompletion(request, opt_element_vector);
 }
 
 const char *CommandObjectProxy::GetRepeatCommand(Args &current_command_args,
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectPlatform.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectPlatform.cpp
index 53549cd..10e6a4a 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectPlatform.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectPlatform.cpp
@@ -6,7 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <mutex>
 #include "CommandObjectPlatform.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Module.h"
@@ -22,10 +21,8 @@
 #include "lldb/Target/Platform.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Utility/Args.h"
-#include "lldb/Utility/DataExtractor.h"
 
 #include "llvm/ADT/SmallString.h"
-#include "llvm/Support/Threading.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -58,21 +55,8 @@
   return user | group | world;
 }
 
-static constexpr OptionDefinition g_permissions_options[] = {
-    // clang-format off
-  {LLDB_OPT_SET_ALL, false, "permissions-value",   'v', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePermissionsNumber, "Give out the numeric value for permissions (e.g. 757)"},
-  {LLDB_OPT_SET_ALL, false, "permissions-string",  's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePermissionsString, "Give out the string value for permissions (e.g. rwxr-xr--)."},
-  {LLDB_OPT_SET_ALL, false, "user-read",           'r', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Allow user to read."},
-  {LLDB_OPT_SET_ALL, false, "user-write",          'w', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Allow user to write."},
-  {LLDB_OPT_SET_ALL, false, "user-exec",           'x', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Allow user to execute."},
-  {LLDB_OPT_SET_ALL, false, "group-read",          'R', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Allow group to read."},
-  {LLDB_OPT_SET_ALL, false, "group-write",         'W', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Allow group to write."},
-  {LLDB_OPT_SET_ALL, false, "group-exec",          'X', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Allow group to execute."},
-  {LLDB_OPT_SET_ALL, false, "world-read",          'd', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Allow world to read."},
-  {LLDB_OPT_SET_ALL, false, "world-write",         't', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Allow world to write."},
-  {LLDB_OPT_SET_ALL, false, "world-exec",          'e', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Allow world to execute."},
-    // clang-format on
-};
+#define LLDB_OPTIONS_permissions
+#include "CommandOptions.inc"
 
 class OptionPermissions : public OptionGroup {
 public:
@@ -130,8 +114,7 @@
       m_permissions |= lldb::eFilePermissionsWorldExecute;
       break;
     default:
-      error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
-      break;
+      llvm_unreachable("Unimplemented option");
     }
 
     return error;
@@ -171,10 +154,9 @@
 
   ~CommandObjectPlatformSelect() override = default;
 
-  int HandleCompletion(CompletionRequest &request) override {
+  void HandleCompletion(CompletionRequest &request) override {
     CommandCompletions::PlatformPluginNames(GetCommandInterpreter(), request,
                                             nullptr);
-    return request.GetNumberOfMatches();
   }
 
   Options *GetOptions() override { return &m_option_group; }
@@ -585,12 +567,8 @@
 
 // "platform fread"
 
-static constexpr OptionDefinition g_platform_fread_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeIndex, "Offset into the file at which to start reading." },
-  { LLDB_OPT_SET_1, false, "count",  'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeCount, "Number of bytes to read from the file." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_platform_fread
+#include "CommandOptions.inc"
 
 class CommandObjectPlatformFRead : public CommandObjectParsed {
 public:
@@ -650,9 +628,7 @@
                                          option_arg.str().c_str());
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -678,12 +654,8 @@
 
 // "platform fwrite"
 
-static constexpr OptionDefinition g_platform_fwrite_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "offset", 'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeIndex, "Offset into the file at which to start reading." },
-  { LLDB_OPT_SET_1, false, "data",   'd', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeValue, "Text to write to the file." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_platform_fwrite
+#include "CommandOptions.inc"
 
 class CommandObjectPlatformFWrite : public CommandObjectParsed {
 public:
@@ -740,9 +712,7 @@
         m_data.assign(option_arg);
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1056,24 +1026,9 @@
 
 // "platform process list"
 
-static OptionDefinition g_platform_process_list_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1,             false, "pid",         'p', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePid,               "List the process info for a specific process ID." },
-  { LLDB_OPT_SET_2,             true,  "name",        'n', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeProcessName,       "Find processes with executable basenames that match a string." },
-  { LLDB_OPT_SET_3,             true,  "ends-with",   'e', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeProcessName,       "Find processes with executable basenames that end with a string." },
-  { LLDB_OPT_SET_4,             true,  "starts-with", 's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeProcessName,       "Find processes with executable basenames that start with a string." },
-  { LLDB_OPT_SET_5,             true,  "contains",    'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeProcessName,       "Find processes with executable basenames that contain a string." },
-  { LLDB_OPT_SET_6,             true,  "regex",       'r', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeRegularExpression, "Find processes with executable basenames that match a regular expression." },
-  { LLDB_OPT_SET_FROM_TO(2, 6), false, "parent",      'P', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePid,               "Find processes that have a matching parent process ID." },
-  { LLDB_OPT_SET_FROM_TO(2, 6), false, "uid",         'u', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeUnsignedInteger,   "Find processes that have a matching user ID." },
-  { LLDB_OPT_SET_FROM_TO(2, 6), false, "euid",        'U', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeUnsignedInteger,   "Find processes that have a matching effective user ID." },
-  { LLDB_OPT_SET_FROM_TO(2, 6), false, "gid",         'g', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeUnsignedInteger,   "Find processes that have a matching group ID." },
-  { LLDB_OPT_SET_FROM_TO(2, 6), false, "egid",        'G', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeUnsignedInteger,   "Find processes that have a matching effective group ID." },
-  { LLDB_OPT_SET_FROM_TO(2, 6), false, "arch",        'a', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeArchitecture,      "Find processes that have a matching architecture." },
-  { LLDB_OPT_SET_FROM_TO(1, 6), false, "show-args",   'A', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Show process arguments instead of the process executable basename." },
-  { LLDB_OPT_SET_FROM_TO(1, 6), false, "verbose",     'v', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,              "Enable verbose output." },
-    // clang-format on
-};
+static PosixPlatformCommandOptionValidator posix_validator;
+#define LLDB_OPTIONS_platform_process_list
+#include "CommandOptions.inc"
 
 class CommandObjectPlatformProcessList : public CommandObjectParsed {
 public:
@@ -1194,25 +1149,7 @@
   class CommandOptions : public Options {
   public:
     CommandOptions()
-        : Options(), match_info(), show_args(false), verbose(false) {
-      static llvm::once_flag g_once_flag;
-      llvm::call_once(g_once_flag, []() {
-        PosixPlatformCommandOptionValidator *posix_validator =
-            new PosixPlatformCommandOptionValidator();
-        for (auto &Option : g_platform_process_list_options) {
-          switch (Option.short_option) {
-          case 'u':
-          case 'U':
-          case 'g':
-          case 'G':
-            Option.validator = posix_validator;
-            break;
-          default:
-            break;
-          }
-        }
-      });
-    }
+        : Options(), match_info(), show_args(false), verbose(false) {}
 
     ~CommandOptions() override = default;
 
@@ -1323,10 +1260,12 @@
         verbose = true;
         break;
 
-      default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
+      case 'x':
+        match_info.SetMatchAllUsers(true);
         break;
+
+      default:
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1397,9 +1336,9 @@
           Stream &ostrm = result.GetOutputStream();
           for (auto &entry : args.entries()) {
             lldb::pid_t pid;
-            if (entry.ref.getAsInteger(0, pid)) {
+            if (entry.ref().getAsInteger(0, pid)) {
               result.AppendErrorWithFormat("invalid process ID argument '%s'",
-                                           entry.ref.str().c_str());
+                                           entry.ref().str().c_str());
               result.SetStatus(eReturnStatusFailed);
               break;
             } else {
@@ -1436,14 +1375,8 @@
   }
 };
 
-static constexpr OptionDefinition g_platform_process_attach_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "plugin",  'P', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePlugin,      "Name of the process plugin you want to use." },
-  { LLDB_OPT_SET_1,   false, "pid",     'p', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePid,         "The process ID of an existing process to attach to." },
-  { LLDB_OPT_SET_2,   false, "name",    'n', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeProcessName, "The name of the process to attach to." },
-  { LLDB_OPT_SET_2,   false, "waitfor", 'w', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,        "Wait for the process with <process-name> to launch." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_platform_process_attach
+#include "CommandOptions.inc"
 
 class CommandObjectPlatformProcessAttach : public CommandObjectParsed {
 public:
@@ -1486,9 +1419,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -1501,7 +1432,7 @@
       return llvm::makeArrayRef(g_platform_process_attach_options);
     }
 
-    bool HandleOptionArgumentCompletion(
+    void HandleOptionArgumentCompletion(
         CompletionRequest &request, OptionElementVector &opt_element_vector,
         int opt_element_index, CommandInterpreter &interpreter) override {
       int opt_arg_pos = opt_element_vector[opt_element_index].opt_arg_pos;
@@ -1509,37 +1440,36 @@
 
       // We are only completing the name option for now...
 
-      if (GetDefinitions()[opt_defs_index].short_option == 'n') {
-        // Are we in the name?
+      // Are we in the name?
+      if (GetDefinitions()[opt_defs_index].short_option != 'n')
+        return;
 
-        // Look to see if there is a -P argument provided, and if so use that
-        // plugin, otherwise use the default plugin.
+      // Look to see if there is a -P argument provided, and if so use that
+      // plugin, otherwise use the default plugin.
 
-        const char *partial_name = nullptr;
-        partial_name = request.GetParsedLine().GetArgumentAtIndex(opt_arg_pos);
+      const char *partial_name = nullptr;
+      partial_name = request.GetParsedLine().GetArgumentAtIndex(opt_arg_pos);
 
-        PlatformSP platform_sp(interpreter.GetPlatform(true));
-        if (platform_sp) {
-          ProcessInstanceInfoList process_infos;
-          ProcessInstanceInfoMatch match_info;
-          if (partial_name) {
-            match_info.GetProcessInfo().GetExecutableFile().SetFile(
-                partial_name, FileSpec::Style::native);
-            match_info.SetNameMatchType(NameMatch::StartsWith);
-          }
-          platform_sp->FindProcesses(match_info, process_infos);
-          const uint32_t num_matches = process_infos.GetSize();
-          if (num_matches > 0) {
-            for (uint32_t i = 0; i < num_matches; ++i) {
-              request.AddCompletion(llvm::StringRef(
-                  process_infos.GetProcessNameAtIndex(i),
-                  process_infos.GetProcessNameLengthAtIndex(i)));
-            }
-          }
-        }
+      PlatformSP platform_sp(interpreter.GetPlatform(true));
+      if (!platform_sp)
+        return;
+
+      ProcessInstanceInfoList process_infos;
+      ProcessInstanceInfoMatch match_info;
+      if (partial_name) {
+        match_info.GetProcessInfo().GetExecutableFile().SetFile(
+            partial_name, FileSpec::Style::native);
+        match_info.SetNameMatchType(NameMatch::StartsWith);
       }
+      platform_sp->FindProcesses(match_info, process_infos);
+      const uint32_t num_matches = process_infos.GetSize();
+      if (num_matches == 0)
+        return;
 
-      return false;
+      for (uint32_t i = 0; i < num_matches; ++i) {
+        request.AddCompletion(process_infos.GetProcessNameAtIndex(i));
+      }
+      return;
     }
 
     // Options table: Required for subclasses of Options.
@@ -1615,11 +1545,8 @@
 };
 
 // "platform shell"
-static constexpr OptionDefinition g_platform_shell_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "timeout", 't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeValue, "Seconds to wait for the remote host to finish running the command." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_platform_shell
+#include "CommandOptions.inc"
 
 class CommandObjectPlatformShell : public CommandObjectRaw {
 public:
@@ -1650,9 +1577,7 @@
           timeout = std::chrono::seconds(timeout_sec);
         break;
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1678,7 +1603,6 @@
     ExecutionContext exe_ctx = GetCommandInterpreter().GetExecutionContext();
     m_options.NotifyOptionParsingStarting(&exe_ctx);
 
-
     // Print out an usage syntax on an empty command line.
     if (raw_command_line.empty()) {
       result.GetOutputStream().Printf("%s\n", this->GetSyntax().str().c_str());
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectPlatform.h b/src/llvm-project/lldb/source/Commands/CommandObjectPlatform.h
index c94d2ea2..45e4a41 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectPlatform.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectPlatform.h
@@ -10,7 +10,6 @@
 #define liblldb_CommandObjectPlatform_h_
 
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Interpreter/Options.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectPlugin.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectPlugin.cpp
index 89e01ba..6fcb64f 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectPlugin.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectPlugin.cpp
@@ -7,7 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "CommandObjectPlugin.h"
-#include "lldb/Host/Host.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 
@@ -37,13 +36,12 @@
 
   ~CommandObjectPluginLoad() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -58,7 +56,7 @@
 
     Status error;
 
-    FileSpec dylib_fspec(command[0].ref);
+    FileSpec dylib_fspec(command[0].ref());
     FileSystem::Instance().Resolve(dylib_fspec);
 
     if (GetDebugger().LoadPlugin(dylib_fspec, error))
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectPlugin.h b/src/llvm-project/lldb/source/Commands/CommandObjectPlugin.h
index 0aabb13..94cea7d 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectPlugin.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectPlugin.h
@@ -9,10 +9,7 @@
 #ifndef liblldb_CommandObjectPlugin_h_
 #define liblldb_CommandObjectPlugin_h_
 
-
-
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/lldb-types.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectProcess.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectProcess.cpp
index b20a2d5..d825647 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectProcess.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectProcess.cpp
@@ -12,7 +12,6 @@
 #include "lldb/Breakpoint/BreakpointSite.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/PluginManager.h"
-#include "lldb/Host/Host.h"
 #include "lldb/Host/OptionParser.h"
 #include "lldb/Host/StringConvert.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
@@ -127,14 +126,13 @@
 
   ~CommandObjectProcessLaunch() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
 
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
   Options *GetOptions() override { return &m_options; }
@@ -255,16 +253,8 @@
   ProcessLaunchCommandOptions m_options;
 };
 
-static constexpr OptionDefinition g_process_attach_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "continue",         'c', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,         "Immediately continue the process once attached." },
-  { LLDB_OPT_SET_ALL, false, "plugin",           'P', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePlugin,       "Name of the process plugin you want to use." },
-  { LLDB_OPT_SET_1,   false, "pid",              'p', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePid,          "The process ID of an existing process to attach to." },
-  { LLDB_OPT_SET_2,   false, "name",             'n', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeProcessName,  "The name of the process to attach to." },
-  { LLDB_OPT_SET_2,   false, "include-existing", 'i', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,         "Include existing processes when doing attach -w." },
-  { LLDB_OPT_SET_2,   false, "waitfor",          'w', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,         "Wait for the process with <process-name> to launch." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_process_attach
+#include "CommandOptions.inc"
 
 #pragma mark CommandObjectProcessAttach
 class CommandObjectProcessAttach : public CommandObjectProcessLaunchOrAttach {
@@ -316,9 +306,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -331,7 +319,7 @@
       return llvm::makeArrayRef(g_process_attach_options);
     }
 
-    bool HandleOptionArgumentCompletion(
+    void HandleOptionArgumentCompletion(
         CompletionRequest &request, OptionElementVector &opt_element_vector,
         int opt_element_index, CommandInterpreter &interpreter) override {
       int opt_arg_pos = opt_element_vector[opt_element_index].opt_arg_pos;
@@ -339,37 +327,33 @@
 
       // We are only completing the name option for now...
 
-      if (GetDefinitions()[opt_defs_index].short_option == 'n') {
-        // Are we in the name?
+      // Are we in the name?
+      if (GetDefinitions()[opt_defs_index].short_option != 'n')
+        return;
 
-        // Look to see if there is a -P argument provided, and if so use that
-        // plugin, otherwise use the default plugin.
+      // Look to see if there is a -P argument provided, and if so use that
+      // plugin, otherwise use the default plugin.
 
-        const char *partial_name = nullptr;
-        partial_name = request.GetParsedLine().GetArgumentAtIndex(opt_arg_pos);
+      const char *partial_name = nullptr;
+      partial_name = request.GetParsedLine().GetArgumentAtIndex(opt_arg_pos);
 
-        PlatformSP platform_sp(interpreter.GetPlatform(true));
-        if (platform_sp) {
-          ProcessInstanceInfoList process_infos;
-          ProcessInstanceInfoMatch match_info;
-          if (partial_name) {
-            match_info.GetProcessInfo().GetExecutableFile().SetFile(
-                partial_name, FileSpec::Style::native);
-            match_info.SetNameMatchType(NameMatch::StartsWith);
-          }
-          platform_sp->FindProcesses(match_info, process_infos);
-          const size_t num_matches = process_infos.GetSize();
-          if (num_matches > 0) {
-            for (size_t i = 0; i < num_matches; ++i) {
-              request.AddCompletion(llvm::StringRef(
-                  process_infos.GetProcessNameAtIndex(i),
-                  process_infos.GetProcessNameLengthAtIndex(i)));
-            }
-          }
-        }
+      PlatformSP platform_sp(interpreter.GetPlatform(true));
+      if (!platform_sp)
+        return;
+      ProcessInstanceInfoList process_infos;
+      ProcessInstanceInfoMatch match_info;
+      if (partial_name) {
+        match_info.GetProcessInfo().GetExecutableFile().SetFile(
+            partial_name, FileSpec::Style::native);
+        match_info.SetNameMatchType(NameMatch::StartsWith);
       }
-
-      return false;
+      platform_sp->FindProcesses(match_info, process_infos);
+      const size_t num_matches = process_infos.GetSize();
+      if (num_matches == 0)
+        return;
+      for (size_t i = 0; i < num_matches; ++i) {
+        request.AddCompletion(process_infos.GetProcessNameAtIndex(i));
+      }
     }
 
     // Instance variables to hold the values for command options.
@@ -444,7 +428,6 @@
         result.AppendMessage(stream.GetString());
         result.SetStatus(eReturnStatusSuccessFinishNoResult);
         result.SetDidChangeProcessState(true);
-        result.SetAbnormalStopWasExpected(true);
       } else {
         result.AppendError(
             "no error returned from Target::Attach, and target has no process");
@@ -505,11 +488,8 @@
 
 // CommandObjectProcessContinue
 
-static constexpr OptionDefinition g_process_continue_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "ignore-count",'i', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeUnsignedInteger, "Ignore <N> crossings of the breakpoint (if it exists) for the currently selected thread." }
-    // clang-format on
-};
+#define LLDB_OPTIONS_process_continue
+#include "CommandOptions.inc"
 
 #pragma mark CommandObjectProcessContinue
 
@@ -550,9 +530,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -666,11 +644,8 @@
 };
 
 // CommandObjectProcessDetach
-static constexpr OptionDefinition g_process_detach_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "keep-stopped", 's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Whether or not the process should be kept stopped on detach (if possible)." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_process_detach
+#include "CommandOptions.inc"
 
 #pragma mark CommandObjectProcessDetach
 
@@ -703,9 +678,7 @@
         }
         break;
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -762,12 +735,8 @@
 };
 
 // CommandObjectProcessConnect
-
-static constexpr OptionDefinition g_process_connect_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "plugin", 'p', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypePlugin, "Name of the process plugin you want to use." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_process_connect
+#include "CommandOptions.inc"
 
 #pragma mark CommandObjectProcessConnect
 
@@ -794,9 +763,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -887,12 +854,8 @@
 };
 
 // CommandObjectProcessLoad
-
-static constexpr OptionDefinition g_process_load_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "install", 'i', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypePath, "Install the shared library to the target. If specified without an argument then the library will installed in the current working directory." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_process_load
+#include "CommandOptions.inc"
 
 #pragma mark CommandObjectProcessLoad
 
@@ -919,9 +882,7 @@
           install_path.SetFile(option_arg, FileSpec::Style::native);
         break;
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -960,7 +921,7 @@
     for (auto &entry : command.entries()) {
       Status error;
       PlatformSP platform = process->GetTarget().GetPlatform();
-      llvm::StringRef image_path = entry.ref;
+      llvm::StringRef image_path = entry.ref();
       uint32_t image_token = LLDB_INVALID_IMAGE_TOKEN;
 
       if (!m_options.do_install) {
@@ -1022,9 +983,9 @@
 
     for (auto &entry : command.entries()) {
       uint32_t image_token;
-      if (entry.ref.getAsInteger(0, image_token)) {
+      if (entry.ref().getAsInteger(0, image_token)) {
         result.AppendErrorWithFormat("invalid image index argument '%s'",
-                                     entry.ref.str().c_str());
+                                     entry.ref().str().c_str());
         result.SetStatus(eReturnStatusFailed);
         break;
       } else {
@@ -1052,10 +1013,10 @@
 class CommandObjectProcessSignal : public CommandObjectParsed {
 public:
   CommandObjectProcessSignal(CommandInterpreter &interpreter)
-      : CommandObjectParsed(interpreter, "process signal",
-                            "Send a UNIX signal to the current target process.",
-                            nullptr, eCommandRequiresProcess |
-                                         eCommandTryTargetAPILock) {
+      : CommandObjectParsed(
+            interpreter, "process signal",
+            "Send a UNIX signal to the current target process.", nullptr,
+            eCommandRequiresProcess | eCommandTryTargetAPILock) {
     CommandArgumentEntry arg;
     CommandArgumentData signal_arg;
 
@@ -1262,7 +1223,7 @@
     const uint32_t start_frame = 0;
     const uint32_t num_frames = 1;
     const uint32_t num_frames_with_source = 1;
-    const bool     stop_format = true;
+    const bool stop_format = true;
     process->GetStatus(strm);
     process->GetThreadStatus(strm, only_threads_with_stop_reason, start_frame,
                              num_frames, num_frames_with_source, stop_format);
@@ -1271,14 +1232,8 @@
 };
 
 // CommandObjectProcessHandle
-
-static constexpr OptionDefinition g_process_handle_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "stop",   's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Whether or not the process should be stopped if the signal is received." },
-  { LLDB_OPT_SET_1, false, "notify", 'n', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Whether or not the debugger should notify the user if the signal is received." },
-  { LLDB_OPT_SET_1, false, "pass",   'p', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean, "Whether or not the signal should be passed to the process." }
-    // clang-format on
-};
+#define LLDB_OPTIONS_process_handle
+#include "CommandOptions.inc"
 
 #pragma mark CommandObjectProcessHandle
 
@@ -1306,9 +1261,7 @@
         pass = option_arg;
         break;
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -1335,7 +1288,7 @@
                             "Manage LLDB handling of OS signals for the "
                             "current target process.  Defaults to showing "
                             "current policy.",
-                            nullptr),
+                            nullptr, eCommandRequiresTarget),
         m_options() {
     SetHelpLong("\nIf no signals are specified, update them all.  If no update "
                 "option is specified, list the current values.");
@@ -1420,15 +1373,7 @@
 
 protected:
   bool DoExecute(Args &signal_args, CommandReturnObject &result) override {
-    TargetSP target_sp = GetDebugger().GetSelectedTarget();
-
-    if (!target_sp) {
-      result.AppendError("No current target;"
-                         " cannot handle signals until you have a valid target "
-                         "and process.\n");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target *target_sp = &GetSelectedTarget();
 
     ProcessSP process_sp = target_sp->GetProcessSP();
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectRegister.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectRegister.cpp
index 34482a8..523b32a 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectRegister.cpp
@@ -10,7 +10,6 @@
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/DumpRegisterValue.h"
 #include "lldb/Host/OptionParser.h"
-#include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionGroupFormat.h"
 #include "lldb/Interpreter/OptionValueArray.h"
@@ -25,21 +24,14 @@
 #include "lldb/Utility/Args.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/RegisterValue.h"
-#include "lldb/Utility/Scalar.h"
 #include "llvm/Support/Errno.h"
 
 using namespace lldb;
 using namespace lldb_private;
 
 // "register read"
-
-static constexpr OptionDefinition g_register_read_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "alternate", 'A', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,  "Display register names using the alternate register name if there is one." },
-  { LLDB_OPT_SET_1,   false, "set",       's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeIndex, "Specify which register sets to dump by index." },
-  { LLDB_OPT_SET_2,   false, "all",       'a', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,  "Show all register sets." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_register_read
+#include "CommandOptions.inc"
 
 class CommandObjectRegisterRead : public CommandObjectParsed {
 public:
@@ -212,7 +204,7 @@
           // consistent towards the user and allow them to say reg read $rbx -
           // internally, however, we should be strict and not allow ourselves
           // to call our registers $rbx in our own API
-          auto arg_str = entry.ref;
+          auto arg_str = entry.ref();
           arg_str.consume_front("$");
 
           reg_info = reg_ctx->GetRegisterInfoByName(arg_str);
@@ -278,9 +270,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -343,8 +333,8 @@
           "register write takes exactly 2 arguments: <reg-name> <value>");
       result.SetStatus(eReturnStatusFailed);
     } else {
-      auto reg_name = command[0].ref;
-      auto value_str = command[1].ref;
+      auto reg_name = command[0].ref();
+      auto value_str = command[1].ref();
 
       // in most LLDB commands we accept $rbx as the name for register RBX -
       // and here we would reject it and non-existant. we should be more
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectReproducer.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectReproducer.cpp
index 4b0e9e3..d15f622 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectReproducer.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectReproducer.cpp
@@ -8,15 +8,94 @@
 
 #include "CommandObjectReproducer.h"
 
+#include "lldb/Host/OptionParser.h"
+#include "lldb/Utility/GDBRemote.h"
 #include "lldb/Utility/Reproducer.h"
 
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
-#include "lldb/Interpreter/OptionGroupBoolean.h"
+
+#include <csignal>
 
 using namespace lldb;
+using namespace llvm;
 using namespace lldb_private;
+using namespace lldb_private::repro;
+
+enum ReproducerProvider {
+  eReproducerProviderCommands,
+  eReproducerProviderFiles,
+  eReproducerProviderGDB,
+  eReproducerProviderVersion,
+  eReproducerProviderWorkingDirectory,
+  eReproducerProviderNone
+};
+
+static constexpr OptionEnumValueElement g_reproducer_provider_type[] = {
+    {
+        eReproducerProviderCommands,
+        "commands",
+        "Command Interpreter Commands",
+    },
+    {
+        eReproducerProviderFiles,
+        "files",
+        "Files",
+    },
+    {
+        eReproducerProviderGDB,
+        "gdb",
+        "GDB Remote Packets",
+    },
+    {
+        eReproducerProviderVersion,
+        "version",
+        "Version",
+    },
+    {
+        eReproducerProviderWorkingDirectory,
+        "cwd",
+        "Working Directory",
+    },
+    {
+        eReproducerProviderNone,
+        "none",
+        "None",
+    },
+};
+
+static constexpr OptionEnumValues ReproducerProviderType() {
+  return OptionEnumValues(g_reproducer_provider_type);
+}
+
+#define LLDB_OPTIONS_reproducer_dump
+#include "CommandOptions.inc"
+
+enum ReproducerCrashSignal {
+  eReproducerCrashSigill,
+  eReproducerCrashSigsegv,
+};
+
+static constexpr OptionEnumValueElement g_reproducer_signaltype[] = {
+    {
+        eReproducerCrashSigill,
+        "SIGILL",
+        "Illegal instruction",
+    },
+    {
+        eReproducerCrashSigsegv,
+        "SIGSEGV",
+        "Segmentation fault",
+    },
+};
+
+static constexpr OptionEnumValues ReproducerSignalType() {
+  return OptionEnumValues(g_reproducer_signaltype);
+}
+
+#define LLDB_OPTIONS_reproducer_xcrash
+#include "CommandOptions.inc"
 
 class CommandObjectReproducerGenerate : public CommandObjectParsed {
 public:
@@ -25,7 +104,7 @@
             interpreter, "reproducer generate",
             "Generate reproducer on disk. When the debugger is in capture "
             "mode, this command will output the reproducer to a directory on "
-            "disk. In replay mode this command in a no-op.",
+            "disk and quit. In replay mode this command in a no-op.",
             nullptr) {}
 
   ~CommandObjectReproducerGenerate() override = default;
@@ -38,11 +117,11 @@
       return false;
     }
 
-    auto &r = repro::Reproducer::Instance();
+    auto &r = Reproducer::Instance();
     if (auto generator = r.GetGenerator()) {
       generator->Keep();
-    } else if (r.GetLoader()) {
-      // Make this operation a NOP in replay mode.
+    } else if (r.IsReplaying()) {
+      // Make this operation a NO-OP in replay mode.
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
       return result.Succeeded();
     } else {
@@ -57,17 +136,103 @@
         << "Please have a look at the directory to assess if you're willing to "
            "share the contained information.\n";
 
-    result.SetStatus(eReturnStatusSuccessFinishResult);
+    m_interpreter.BroadcastEvent(
+        CommandInterpreter::eBroadcastBitQuitCommandReceived);
+    result.SetStatus(eReturnStatusQuit);
     return result.Succeeded();
   }
 };
 
+class CommandObjectReproducerXCrash : public CommandObjectParsed {
+public:
+  CommandObjectReproducerXCrash(CommandInterpreter &interpreter)
+      : CommandObjectParsed(interpreter, "reproducer xcrash",
+                            "Intentionally force  the debugger to crash in "
+                            "order to trigger and test reproducer generation.",
+                            nullptr) {}
+
+  ~CommandObjectReproducerXCrash() override = default;
+
+  Options *GetOptions() override { return &m_options; }
+
+  class CommandOptions : public Options {
+  public:
+    CommandOptions() : Options() {}
+
+    ~CommandOptions() override = default;
+
+    Status SetOptionValue(uint32_t option_idx, StringRef option_arg,
+                          ExecutionContext *execution_context) override {
+      Status error;
+      const int short_option = m_getopt_table[option_idx].val;
+
+      switch (short_option) {
+      case 's':
+        signal = (ReproducerCrashSignal)OptionArgParser::ToOptionEnum(
+            option_arg, GetDefinitions()[option_idx].enum_values, 0, error);
+        if (!error.Success())
+          error.SetErrorStringWithFormat("unrecognized value for signal '%s'",
+                                         option_arg.str().c_str());
+        break;
+      default:
+        llvm_unreachable("Unimplemented option");
+      }
+
+      return error;
+    }
+
+    void OptionParsingStarting(ExecutionContext *execution_context) override {
+      signal = eReproducerCrashSigsegv;
+    }
+
+    ArrayRef<OptionDefinition> GetDefinitions() override {
+      return makeArrayRef(g_reproducer_xcrash_options);
+    }
+
+    ReproducerCrashSignal signal = eReproducerCrashSigsegv;
+  };
+
+protected:
+  bool DoExecute(Args &command, CommandReturnObject &result) override {
+    if (!command.empty()) {
+      result.AppendErrorWithFormat("'%s' takes no arguments",
+                                   m_cmd_name.c_str());
+      return false;
+    }
+
+    auto &r = Reproducer::Instance();
+
+    if (!r.IsCapturing() && !r.IsReplaying()) {
+      result.SetError(
+          "forcing a crash is only supported when capturing a reproducer.");
+      result.SetStatus(eReturnStatusSuccessFinishNoResult);
+      return false;
+    }
+
+    switch (m_options.signal) {
+    case eReproducerCrashSigill:
+      std::raise(SIGILL);
+      break;
+    case eReproducerCrashSigsegv:
+      std::raise(SIGSEGV);
+      break;
+    }
+
+    result.SetStatus(eReturnStatusQuit);
+    return result.Succeeded();
+  }
+
+private:
+  CommandOptions m_options;
+};
+
 class CommandObjectReproducerStatus : public CommandObjectParsed {
 public:
   CommandObjectReproducerStatus(CommandInterpreter &interpreter)
       : CommandObjectParsed(
             interpreter, "reproducer status",
-            "Show the current reproducer status. In capture mode the debugger "
+            "Show the current reproducer status. In capture mode the "
+            "debugger "
             "is collecting all the information it needs to create a "
             "reproducer.  In replay mode the reproducer is replaying a "
             "reproducer. When the reproducers are off, no data is collected "
@@ -84,10 +249,10 @@
       return false;
     }
 
-    auto &r = repro::Reproducer::Instance();
-    if (r.GetGenerator()) {
+    auto &r = Reproducer::Instance();
+    if (r.IsCapturing()) {
       result.GetOutputStream() << "Reproducer is in capture mode.\n";
-    } else if (r.GetLoader()) {
+    } else if (r.IsReplaying()) {
       result.GetOutputStream() << "Reproducer is in replay mode.\n";
     } else {
       result.GetOutputStream() << "Reproducer is off.\n";
@@ -98,17 +263,241 @@
   }
 };
 
+static void SetError(CommandReturnObject &result, Error err) {
+  result.GetErrorStream().Printf("error: %s\n",
+                                 toString(std::move(err)).c_str());
+  result.SetStatus(eReturnStatusFailed);
+}
+
+class CommandObjectReproducerDump : public CommandObjectParsed {
+public:
+  CommandObjectReproducerDump(CommandInterpreter &interpreter)
+      : CommandObjectParsed(interpreter, "reproducer dump",
+                            "Dump the information contained in a reproducer. "
+                            "If no reproducer is specified during replay, it "
+                            "dumps the content of the current reproducer.",
+                            nullptr) {}
+
+  ~CommandObjectReproducerDump() override = default;
+
+  Options *GetOptions() override { return &m_options; }
+
+  class CommandOptions : public Options {
+  public:
+    CommandOptions() : Options(), file() {}
+
+    ~CommandOptions() override = default;
+
+    Status SetOptionValue(uint32_t option_idx, StringRef option_arg,
+                          ExecutionContext *execution_context) override {
+      Status error;
+      const int short_option = m_getopt_table[option_idx].val;
+
+      switch (short_option) {
+      case 'f':
+        file.SetFile(option_arg, FileSpec::Style::native);
+        FileSystem::Instance().Resolve(file);
+        break;
+      case 'p':
+        provider = (ReproducerProvider)OptionArgParser::ToOptionEnum(
+            option_arg, GetDefinitions()[option_idx].enum_values, 0, error);
+        if (!error.Success())
+          error.SetErrorStringWithFormat("unrecognized value for provider '%s'",
+                                         option_arg.str().c_str());
+        break;
+      default:
+        llvm_unreachable("Unimplemented option");
+      }
+
+      return error;
+    }
+
+    void OptionParsingStarting(ExecutionContext *execution_context) override {
+      file.Clear();
+      provider = eReproducerProviderNone;
+    }
+
+    ArrayRef<OptionDefinition> GetDefinitions() override {
+      return makeArrayRef(g_reproducer_dump_options);
+    }
+
+    FileSpec file;
+    ReproducerProvider provider = eReproducerProviderNone;
+  };
+
+protected:
+  bool DoExecute(Args &command, CommandReturnObject &result) override {
+    if (!command.empty()) {
+      result.AppendErrorWithFormat("'%s' takes no arguments",
+                                   m_cmd_name.c_str());
+      return false;
+    }
+
+    // If no reproducer path is specified, use the loader currently used for
+    // replay. Otherwise create a new loader just for dumping.
+    llvm::Optional<Loader> loader_storage;
+    Loader *loader = nullptr;
+    if (!m_options.file) {
+      loader = Reproducer::Instance().GetLoader();
+      if (loader == nullptr) {
+        result.SetError(
+            "Not specifying a reproducer is only support during replay.");
+        result.SetStatus(eReturnStatusSuccessFinishNoResult);
+        return false;
+      }
+    } else {
+      loader_storage.emplace(m_options.file);
+      loader = &(*loader_storage);
+      if (Error err = loader->LoadIndex()) {
+        SetError(result, std::move(err));
+        return false;
+      }
+    }
+
+    // If we get here we should have a valid loader.
+    assert(loader);
+
+    switch (m_options.provider) {
+    case eReproducerProviderFiles: {
+      FileSpec vfs_mapping = loader->GetFile<FileProvider::Info>();
+
+      // Read the VFS mapping.
+      ErrorOr<std::unique_ptr<MemoryBuffer>> buffer =
+          vfs::getRealFileSystem()->getBufferForFile(vfs_mapping.GetPath());
+      if (!buffer) {
+        SetError(result, errorCodeToError(buffer.getError()));
+        return false;
+      }
+
+      // Initialize a VFS from the given mapping.
+      IntrusiveRefCntPtr<vfs::FileSystem> vfs = vfs::getVFSFromYAML(
+          std::move(buffer.get()), nullptr, vfs_mapping.GetPath());
+
+      // Dump the VFS to a buffer.
+      std::string str;
+      raw_string_ostream os(str);
+      static_cast<vfs::RedirectingFileSystem &>(*vfs).dump(os);
+      os.flush();
+
+      // Return the string.
+      result.AppendMessage(str);
+      result.SetStatus(eReturnStatusSuccessFinishResult);
+      return true;
+    }
+    case eReproducerProviderVersion: {
+      Expected<std::string> version = loader->LoadBuffer<VersionProvider>();
+      if (!version) {
+        SetError(result, version.takeError());
+        return false;
+      }
+      result.AppendMessage(*version);
+      result.SetStatus(eReturnStatusSuccessFinishResult);
+      return true;
+    }
+    case eReproducerProviderWorkingDirectory: {
+      Expected<std::string> cwd =
+          loader->LoadBuffer<WorkingDirectoryProvider>();
+      if (!cwd) {
+        SetError(result, cwd.takeError());
+        return false;
+      }
+      result.AppendMessage(*cwd);
+      result.SetStatus(eReturnStatusSuccessFinishResult);
+      return true;
+    }
+    case eReproducerProviderCommands: {
+      std::unique_ptr<repro::MultiLoader<repro::CommandProvider>> multi_loader =
+          repro::MultiLoader<repro::CommandProvider>::Create(loader);
+      if (!multi_loader) {
+        SetError(result,
+                 make_error<StringError>(llvm::inconvertibleErrorCode(),
+                                         "Unable to create command loader."));
+        return false;
+      }
+
+      // Iterate over the command files and dump them.
+      llvm::Optional<std::string> command_file;
+      while ((command_file = multi_loader->GetNextFile())) {
+        if (!command_file)
+          break;
+
+        auto command_buffer = llvm::MemoryBuffer::getFile(*command_file);
+        if (auto err = command_buffer.getError()) {
+          SetError(result, errorCodeToError(err));
+          return false;
+        }
+        result.AppendMessage((*command_buffer)->getBuffer());
+      }
+
+      result.SetStatus(eReturnStatusSuccessFinishResult);
+      return true;
+    }
+    case eReproducerProviderGDB: {
+      std::unique_ptr<repro::MultiLoader<repro::GDBRemoteProvider>>
+          multi_loader =
+              repro::MultiLoader<repro::GDBRemoteProvider>::Create(loader);
+      llvm::Optional<std::string> gdb_file;
+      while ((gdb_file = multi_loader->GetNextFile())) {
+        auto error_or_file = MemoryBuffer::getFile(*gdb_file);
+        if (auto err = error_or_file.getError()) {
+          SetError(result, errorCodeToError(err));
+          return false;
+        }
+
+        std::vector<GDBRemotePacket> packets;
+        yaml::Input yin((*error_or_file)->getBuffer());
+        yin >> packets;
+
+        if (auto err = yin.error()) {
+          SetError(result, errorCodeToError(err));
+          return false;
+        }
+
+        for (GDBRemotePacket &packet : packets) {
+          packet.Dump(result.GetOutputStream());
+        }
+      }
+
+      result.SetStatus(eReturnStatusSuccessFinishResult);
+      return true;
+    }
+    case eReproducerProviderNone:
+      result.SetError("No valid provider specified.");
+      return false;
+    }
+
+    result.SetStatus(eReturnStatusSuccessFinishNoResult);
+    return result.Succeeded();
+  }
+
+private:
+  CommandOptions m_options;
+};
+
 CommandObjectReproducer::CommandObjectReproducer(
     CommandInterpreter &interpreter)
     : CommandObjectMultiword(
           interpreter, "reproducer",
-          "Commands to inspect and manipulate the reproducer functionality.",
-          "log <subcommand> [<command-options>]") {
+          "Commands for manipulating reproducers. Reproducers make it "
+          "possible "
+          "to capture full debug sessions with all its dependencies. The "
+          "resulting reproducer is used to replay the debug session while "
+          "debugging the debugger.\n"
+          "Because reproducers need the whole the debug session from "
+          "beginning to end, you need to launch the debugger in capture or "
+          "replay mode, commonly though the command line driver.\n"
+          "Reproducers are unrelated record-replay debugging, as you cannot "
+          "interact with the debugger during replay.\n",
+          "reproducer <subcommand> [<subcommand-options>]") {
   LoadSubCommand(
       "generate",
       CommandObjectSP(new CommandObjectReproducerGenerate(interpreter)));
   LoadSubCommand("status", CommandObjectSP(
                                new CommandObjectReproducerStatus(interpreter)));
+  LoadSubCommand("dump",
+                 CommandObjectSP(new CommandObjectReproducerDump(interpreter)));
+  LoadSubCommand("xcrash", CommandObjectSP(
+                               new CommandObjectReproducerXCrash(interpreter)));
 }
 
 CommandObjectReproducer::~CommandObjectReproducer() = default;
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectReproducer.h b/src/llvm-project/lldb/source/Commands/CommandObjectReproducer.h
index ad37724..8a85c21 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectReproducer.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectReproducer.h
@@ -10,7 +10,6 @@
 #define liblldb_CommandObjectReproducer_h_
 
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Interpreter/Options.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectSettings.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectSettings.cpp
index 55a0002..95f79f4 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectSettings.cpp
@@ -20,11 +20,8 @@
 using namespace lldb_private;
 
 // CommandObjectSettingsSet
-
-static constexpr OptionDefinition g_settings_set_options[] = {
 #define LLDB_OPTIONS_settings_set
 #include "CommandOptions.inc"
-};
 
 class CommandObjectSettingsSet : public CommandObjectRaw {
 public:
@@ -107,9 +104,7 @@
         m_global = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized options '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -129,15 +124,14 @@
     bool m_force;
   };
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
 
     const size_t argc = request.GetParsedLine().GetArgumentCount();
     const char *arg = nullptr;
-    int setting_var_idx;
-    for (setting_var_idx = 0; setting_var_idx < static_cast<int>(argc);
-         ++setting_var_idx) {
+    size_t setting_var_idx;
+    for (setting_var_idx = 0; setting_var_idx < argc; ++setting_var_idx) {
       arg = request.GetParsedLine().GetArgumentAtIndex(setting_var_idx);
       if (arg && arg[0] != '-')
         break; // We found our setting variable name index
@@ -147,27 +141,26 @@
       CommandCompletions::InvokeCommonCompletionCallbacks(
           GetCommandInterpreter(), CommandCompletions::eSettingsNameCompletion,
           request, nullptr);
-    } else {
-      arg =
-          request.GetParsedLine().GetArgumentAtIndex(request.GetCursorIndex());
-
-      if (arg) {
-        if (arg[0] == '-') {
-          // Complete option name
-        } else {
-          // Complete setting value
-          const char *setting_var_name =
-              request.GetParsedLine().GetArgumentAtIndex(setting_var_idx);
-          Status error;
-          lldb::OptionValueSP value_sp(GetDebugger().GetPropertyValue(
-              &m_exe_ctx, setting_var_name, false, error));
-          if (value_sp) {
-            value_sp->AutoComplete(m_interpreter, request);
-          }
-        }
-      }
+      return;
     }
-    return request.GetNumberOfMatches();
+    arg = request.GetParsedLine().GetArgumentAtIndex(request.GetCursorIndex());
+
+    if (!arg)
+      return;
+
+    // Complete option name
+    if (arg[0] != '-')
+      return;
+
+    // Complete setting value
+    const char *setting_var_name =
+        request.GetParsedLine().GetArgumentAtIndex(setting_var_idx);
+    Status error;
+    lldb::OptionValueSP value_sp(GetDebugger().GetPropertyValue(
+        &m_exe_ctx, setting_var_name, false, error));
+    if (!value_sp)
+      return;
+    value_sp->AutoComplete(m_interpreter, request);
   }
 
 protected:
@@ -210,16 +203,13 @@
     }
 
     // Split the raw command into var_name and value pair.
-    llvm::StringRef raw_str(command);
-    std::string var_value_string = raw_str.split(var_name).second.str();
-    const char *var_value_cstr =
-        Args::StripSpaces(var_value_string, true, false, false);
+    llvm::StringRef var_value(command);
+    var_value = var_value.split(var_name).second.ltrim();
 
     Status error;
-    if (m_options.m_global) {
+    if (m_options.m_global)
       error = GetDebugger().SetPropertyValue(nullptr, eVarSetOperationAssign,
-                                             var_name, var_value_cstr);
-    }
+                                             var_name, var_value);
 
     if (error.Success()) {
       // FIXME this is the same issue as the one in commands script import
@@ -230,7 +220,7 @@
       ExecutionContext exe_ctx(m_exe_ctx);
       m_exe_ctx.Clear();
       error = GetDebugger().SetPropertyValue(&exe_ctx, eVarSetOperationAssign,
-                                             var_name, var_value_cstr);
+                                             var_name, var_value);
     }
 
     if (error.Fail()) {
@@ -274,13 +264,12 @@
 
   ~CommandObjectSettingsShow() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eSettingsNameCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -290,7 +279,7 @@
     if (!args.empty()) {
       for (const auto &arg : args) {
         Status error(GetDebugger().DumpPropertyValue(
-            &m_exe_ctx, result.GetOutputStream(), arg.ref,
+            &m_exe_ctx, result.GetOutputStream(), arg.ref(),
             OptionValue::eDumpGroupValue));
         if (error.Success()) {
           result.GetOutputStream().EOL();
@@ -309,11 +298,8 @@
 };
 
 // CommandObjectSettingsWrite -- Write settings to file
-
-static constexpr OptionDefinition g_settings_write_options[] = {
 #define LLDB_OPTIONS_settings_write
 #include "CommandOptions.inc"
-};
 
 class CommandObjectSettingsWrite : public CommandObjectParsed {
 public:
@@ -363,9 +349,7 @@
         m_append = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -390,12 +374,11 @@
     FileSpec file_spec(m_options.m_filename);
     FileSystem::Instance().Resolve(file_spec);
     std::string path(file_spec.GetPath());
-    uint32_t options = File::OpenOptions::eOpenOptionWrite |
-                       File::OpenOptions::eOpenOptionCanCreate;
+    auto options = File::eOpenOptionWrite | File::eOpenOptionCanCreate;
     if (m_options.m_append)
-      options |= File::OpenOptions::eOpenOptionAppend;
+      options |= File::eOpenOptionAppend;
     else
-      options |= File::OpenOptions::eOpenOptionTruncate;
+      options |= File::eOpenOptionTruncate;
 
     StreamFile out_file(path.c_str(), options,
                         lldb::eFilePermissionsFileDefault);
@@ -417,7 +400,7 @@
 
     for (const auto &arg : args) {
       Status error(GetDebugger().DumpPropertyValue(
-          &clean_ctx, out_file, arg.ref, OptionValue::eDumpGroupExport));
+          &clean_ctx, out_file, arg.ref(), OptionValue::eDumpGroupExport));
       if (!error.Success()) {
         result.AppendError(error.AsCString());
         result.SetStatus(eReturnStatusFailed);
@@ -432,11 +415,8 @@
 };
 
 // CommandObjectSettingsRead -- Read settings from file
-
-static constexpr OptionDefinition g_settings_read_options[] = {
 #define LLDB_OPTIONS_settings_read
 #include "CommandOptions.inc"
-};
 
 class CommandObjectSettingsRead : public CommandObjectParsed {
 public:
@@ -467,9 +447,7 @@
         m_filename.assign(option_arg);
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -536,13 +514,12 @@
 
   ~CommandObjectSettingsList() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eSettingsNameCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -622,14 +599,15 @@
 
   ~CommandObjectSettingsRemove() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  bool WantsCompletion() override { return true; }
+
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     if (request.GetCursorIndex() < 2)
       CommandCompletions::InvokeCommonCompletionCallbacks(
           GetCommandInterpreter(), CommandCompletions::eSettingsNameCompletion,
           request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -645,8 +623,8 @@
 
     const size_t argc = cmd_args.GetArgumentCount();
     if (argc == 0) {
-      result.AppendError("'settings set' takes an array or dictionary item, or "
-                         "an array followed by one or more indexes, or a "
+      result.AppendError("'settings remove' takes an array or dictionary item, "
+                         "or an array followed by one or more indexes, or a "
                          "dictionary followed by one or more key names to "
                          "remove");
       result.SetStatus(eReturnStatusFailed);
@@ -656,19 +634,17 @@
     const char *var_name = cmd_args.GetArgumentAtIndex(0);
     if ((var_name == nullptr) || (var_name[0] == '\0')) {
       result.AppendError(
-          "'settings set' command requires a valid variable name");
+          "'settings remove' command requires a valid variable name");
       result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
     // Split the raw command into var_name and value pair.
-    llvm::StringRef raw_str(command);
-    std::string var_value_string = raw_str.split(var_name).second.str();
-    const char *var_value_cstr =
-        Args::StripSpaces(var_value_string, true, true, false);
+    llvm::StringRef var_value(command);
+    var_value = var_value.split(var_name).second.trim();
 
     Status error(GetDebugger().SetPropertyValue(
-        &m_exe_ctx, eVarSetOperationRemove, var_name, var_value_cstr));
+        &m_exe_ctx, eVarSetOperationRemove, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
       result.SetStatus(eReturnStatusFailed);
@@ -735,16 +711,14 @@
   // !WantsRawCommandString.
   bool WantsCompletion() override { return true; }
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     // Attempting to complete variable name
     if (request.GetCursorIndex() < 2)
       CommandCompletions::InvokeCommonCompletionCallbacks(
           GetCommandInterpreter(), CommandCompletions::eSettingsNameCompletion,
           request, nullptr);
-
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -762,13 +736,11 @@
     }
 
     // Split the raw command into var_name, index_value, and value triple.
-    llvm::StringRef raw_str(command);
-    std::string var_value_string = raw_str.split(var_name).second.str();
-    const char *var_value_cstr =
-        Args::StripSpaces(var_value_string, true, true, false);
+    llvm::StringRef var_value(command);
+    var_value = var_value.split(var_name).second.trim();
 
     Status error(GetDebugger().SetPropertyValue(
-        &m_exe_ctx, eVarSetOperationReplace, var_name, var_value_cstr));
+        &m_exe_ctx, eVarSetOperationReplace, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
       result.SetStatus(eReturnStatusFailed);
@@ -833,16 +805,14 @@
   // !WantsRawCommandString.
   bool WantsCompletion() override { return true; }
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     // Attempting to complete variable name
     if (request.GetCursorIndex() < 2)
       CommandCompletions::InvokeCommonCompletionCallbacks(
           GetCommandInterpreter(), CommandCompletions::eSettingsNameCompletion,
           request, nullptr);
-
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -868,13 +838,11 @@
     }
 
     // Split the raw command into var_name, index_value, and value triple.
-    llvm::StringRef raw_str(command);
-    std::string var_value_string = raw_str.split(var_name).second.str();
-    const char *var_value_cstr =
-        Args::StripSpaces(var_value_string, true, true, false);
+    llvm::StringRef var_value(command);
+    var_value = var_value.split(var_name).second.trim();
 
     Status error(GetDebugger().SetPropertyValue(
-        &m_exe_ctx, eVarSetOperationInsertBefore, var_name, var_value_cstr));
+        &m_exe_ctx, eVarSetOperationInsertBefore, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
       result.SetStatus(eReturnStatusFailed);
@@ -936,16 +904,14 @@
   // !WantsRawCommandString.
   bool WantsCompletion() override { return true; }
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     // Attempting to complete variable name
     if (request.GetCursorIndex() < 2)
       CommandCompletions::InvokeCommonCompletionCallbacks(
           GetCommandInterpreter(), CommandCompletions::eSettingsNameCompletion,
           request, nullptr);
-
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -971,13 +937,11 @@
     }
 
     // Split the raw command into var_name, index_value, and value triple.
-    llvm::StringRef raw_str(command);
-    std::string var_value_string = raw_str.split(var_name).second.str();
-    const char *var_value_cstr =
-        Args::StripSpaces(var_value_string, true, true, false);
+    llvm::StringRef var_value(command);
+    var_value = var_value.split(var_name).second.trim();
 
     Status error(GetDebugger().SetPropertyValue(
-        &m_exe_ctx, eVarSetOperationInsertAfter, var_name, var_value_cstr));
+        &m_exe_ctx, eVarSetOperationInsertAfter, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
       result.SetStatus(eReturnStatusFailed);
@@ -1028,16 +992,14 @@
   // !WantsRawCommandString.
   bool WantsCompletion() override { return true; }
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     // Attempting to complete variable name
     if (request.GetCursorIndex() < 2)
       CommandCompletions::InvokeCommonCompletionCallbacks(
           GetCommandInterpreter(), CommandCompletions::eSettingsNameCompletion,
           request, nullptr);
-
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -1065,13 +1027,11 @@
     // character string later on.
 
     // Split the raw command into var_name and value pair.
-    llvm::StringRef raw_str(command);
-    std::string var_value_string = raw_str.split(var_name).second.str();
-    const char *var_value_cstr =
-        Args::StripSpaces(var_value_string, true, true, false);
+    llvm::StringRef var_value(command);
+    var_value = var_value.split(var_name).second.trim();
 
     Status error(GetDebugger().SetPropertyValue(
-        &m_exe_ctx, eVarSetOperationAppend, var_name, var_value_cstr));
+        &m_exe_ctx, eVarSetOperationAppend, var_name, var_value));
     if (error.Fail()) {
       result.AppendError(error.AsCString());
       result.SetStatus(eReturnStatusFailed);
@@ -1107,16 +1067,14 @@
 
   ~CommandObjectSettingsClear() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     // Attempting to complete variable name
     if (request.GetCursorIndex() < 2)
       CommandCompletions::InvokeCommonCompletionCallbacks(
           GetCommandInterpreter(), CommandCompletions::eSettingsNameCompletion,
           request, nullptr);
-
-    return request.GetNumberOfMatches();
   }
 
 protected:
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectSettings.h b/src/llvm-project/lldb/source/Commands/CommandObjectSettings.h
index 7304259..4db0ca1 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectSettings.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectSettings.h
@@ -9,9 +9,7 @@
 #ifndef liblldb_CommandObjectSettings_h_
 #define liblldb_CommandObjectSettings_h_
 
-#include "lldb/Interpreter/CommandObject.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Interpreter/Options.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectSource.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectSource.cpp
index 1b515d0..19a554f 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectSource.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectSource.cpp
@@ -14,18 +14,14 @@
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/SourceManager.h"
 #include "lldb/Host/OptionParser.h"
-#include "lldb/Interpreter/CommandCompletions.h"
-#include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
 #include "lldb/Interpreter/Options.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/Symbol.h"
-#include "lldb/Target/Process.h"
 #include "lldb/Target/SectionLoadList.h"
 #include "lldb/Target/StackFrame.h"
-#include "lldb/Target/TargetList.h"
 #include "lldb/Utility/FileSpec.h"
 
 using namespace lldb;
@@ -33,18 +29,8 @@
 
 #pragma mark CommandObjectSourceInfo
 // CommandObjectSourceInfo - debug line entries dumping command
-
-static constexpr OptionDefinition g_source_info_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL,                false, "count",    'c', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeCount,               "The number of line entries to display." },
-  { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "shlib",    's', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eModuleCompletion,     eArgTypeShlibName,           "Look up the source in the given module or shared library (can be specified more than once)." },
-  { LLDB_OPT_SET_1,                  false, "file",     'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSourceFileCompletion, eArgTypeFilename,            "The file from which to display source." },
-  { LLDB_OPT_SET_1,                  false, "line",     'l', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeLineNum,             "The line number at which to start the displaying lines." },
-  { LLDB_OPT_SET_1,                  false, "end-line", 'e', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeLineNum,             "The line number at which to stop displaying lines." },
-  { LLDB_OPT_SET_2,                  false, "name",     'n', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSymbolCompletion,     eArgTypeSymbol,              "The name of a function whose source to display." },
-  { LLDB_OPT_SET_3,                  false, "address",  'a', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeAddressOrExpression, "Lookup the address and display the source information for the corresponding file and line." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_source_info
+#include "CommandOptions.inc"
 
 class CommandObjectSourceInfo : public CommandObjectParsed {
   class CommandOptions : public Options {
@@ -92,9 +78,7 @@
         modules.push_back(std::string(option_arg));
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -123,7 +107,7 @@
     uint32_t start_line;
     uint32_t end_line;
     uint32_t num_lines;
-    STLStringArray modules;
+    std::vector<std::string> modules;
   };
 
 public:
@@ -158,12 +142,6 @@
     Target *target = m_exe_ctx.GetTargetPtr();
 
     uint32_t num_matches = 0;
-    bool has_path = false;
-    if (file_spec) {
-      assert(file_spec.GetFilename().AsCString());
-      has_path = (file_spec.GetDirectory().AsCString() != nullptr);
-    }
-
     // Dump all the line entries for the file in the list.
     ConstString last_module_file_name;
     uint32_t num_scs = sc_list.GetSize();
@@ -180,9 +158,7 @@
         if (module_list.GetSize() &&
             module_list.GetIndexForModule(module) == LLDB_INVALID_INDEX32)
           continue;
-        if (file_spec &&
-            !lldb_private::FileSpec::Equal(file_spec, line_entry.file,
-                                           has_path))
+        if (!FileSpec::Match(file_spec, line_entry.file))
           continue;
         if (start_line > 0 && line_entry.line < start_line)
           continue;
@@ -192,8 +168,7 @@
           continue;
 
         // Print a new header if the module changed.
-        ConstString module_file_name =
-            module->GetFileSpec().GetFilename();
+        ConstString module_file_name = module->GetFileSpec().GetFilename();
         assert(module_file_name);
         if (module_file_name != last_module_file_name) {
           if (num_matches > 0)
@@ -239,8 +214,7 @@
         // Dump all matching lines at or above start_line for the file in the
         // CU.
         ConstString file_spec_name = file_spec.GetFilename();
-        ConstString module_file_name =
-            module->GetFileSpec().GetFilename();
+        ConstString module_file_name = module->GetFileSpec().GetFilename();
         bool cu_header_printed = false;
         uint32_t line = start_line;
         while (true) {
@@ -265,13 +239,13 @@
             num_matches++;
             if (num_lines > 0 && num_matches > num_lines)
               break;
-            assert(lldb_private::FileSpec::Equal(cu_file_spec, line_entry.file,
-                                                 has_path));
+            assert(cu_file_spec == line_entry.file);
             if (!cu_header_printed) {
               if (num_matches > 0)
                 strm << "\n\n";
               strm << "Lines found for file " << file_spec_name
-                   << " in compilation unit " << cu->GetFilename() << " in `"
+                   << " in compilation unit "
+                   << cu->GetPrimaryFile().GetFilename() << " in `"
                    << module_file_name << "\n";
               cu_header_printed = true;
             }
@@ -357,9 +331,8 @@
       if (target->GetSectionLoadList().ResolveLoadAddress(addr, so_addr)) {
         ModuleSP module_sp(so_addr.GetModule());
         // Check to make sure this module is in our list.
-        if (module_sp &&
-            module_list.GetIndexForModule(module_sp.get()) !=
-                LLDB_INVALID_INDEX32) {
+        if (module_sp && module_list.GetIndexForModule(module_sp.get()) !=
+                             LLDB_INVALID_INDEX32) {
           SymbolContext sc;
           sc.Clear(true);
           if (module_sp->ResolveSymbolContextForAddress(
@@ -404,17 +377,18 @@
     // const.
     ModuleList module_list =
         (m_module_list.GetSize() > 0) ? m_module_list : target->GetImages();
-    size_t num_matches =
-        module_list.FindFunctions(name, eFunctionNameTypeAuto,
-                                  /*include_symbols=*/false,
-                                  /*include_inlines=*/true,
-                                  /*append=*/true, sc_list_funcs);
+    module_list.FindFunctions(name, eFunctionNameTypeAuto,
+                              /*include_symbols=*/false,
+                              /*include_inlines=*/true, sc_list_funcs);
+    size_t num_matches = sc_list_funcs.GetSize();
+
     if (!num_matches) {
       // If we didn't find any functions with that name, try searching for
       // symbols that line up exactly with function addresses.
       SymbolContextList sc_list_symbols;
-      size_t num_symbol_matches = module_list.FindFunctionSymbols(
-          name, eFunctionNameTypeAuto, sc_list_symbols);
+      module_list.FindFunctionSymbols(name, eFunctionNameTypeAuto,
+                                      sc_list_symbols);
+      size_t num_symbol_matches = sc_list_symbols.GetSize();
       for (size_t i = 0; i < num_symbol_matches; i++) {
         SymbolContext sc;
         sc_list_symbols.GetContextAtIndex(i, sc);
@@ -592,7 +566,8 @@
         FileSpec module_file_spec(m_options.modules[i]);
         if (module_file_spec) {
           ModuleSpec module_spec(module_file_spec);
-          if (target->GetImages().FindModules(module_spec, m_module_list) == 0)
+          target->GetImages().FindModules(module_spec, m_module_list);
+          if (m_module_list.IsEmpty())
             result.AppendWarningWithFormat("No module found for '%s'.\n",
                                            m_options.modules[i].c_str());
         }
@@ -643,19 +618,8 @@
 
 #pragma mark CommandObjectSourceList
 // CommandObjectSourceList
-
-static constexpr OptionDefinition g_source_list_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL,                false, "count",            'c', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeCount,               "The number of source lines to display." },
-  { LLDB_OPT_SET_1 | LLDB_OPT_SET_2, false, "shlib",            's', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eModuleCompletion,     eArgTypeShlibName,           "Look up the source file in the given shared library." },
-  { LLDB_OPT_SET_ALL,                false, "show-breakpoints", 'b', OptionParser::eNoArgument,       nullptr, {}, 0,                                         eArgTypeNone,                "Show the line table locations from the debug information that indicate valid places to set source level breakpoints." },
-  { LLDB_OPT_SET_1,                  false, "file",             'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSourceFileCompletion, eArgTypeFilename,            "The file from which to display source." },
-  { LLDB_OPT_SET_1,                  false, "line",             'l', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeLineNum,             "The line number at which to start the display source." },
-  { LLDB_OPT_SET_2,                  false, "name",             'n', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSymbolCompletion,     eArgTypeSymbol,              "The name of a function whose source to display." },
-  { LLDB_OPT_SET_3,                  false, "address",          'a', OptionParser::eRequiredArgument, nullptr, {}, 0,                                         eArgTypeAddressOrExpression, "Lookup the address and display the source information for the corresponding file and line." },
-  { LLDB_OPT_SET_4,                  false, "reverse",          'r', OptionParser::eNoArgument,       nullptr, {}, 0,                                         eArgTypeNone,                "Reverse the listing to look backwards from the last displayed block of source." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_source_list
+#include "CommandOptions.inc"
 
 class CommandObjectSourceList : public CommandObjectParsed {
   class CommandOptions : public Options {
@@ -704,9 +668,7 @@
         reverse = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -735,7 +697,7 @@
     lldb::addr_t address;
     uint32_t start_line;
     uint32_t num_lines;
-    STLStringArray modules;
+    std::vector<std::string> modules;
     bool show_bp_locs;
     bool reverse;
   };
@@ -759,7 +721,7 @@
     // the arguments directly.
     auto iter =
         llvm::find_if(current_command_args, [](const Args::ArgEntry &e) {
-          return e.ref == "-r" || e.ref == "--reverse";
+          return e.ref() == "-r" || e.ref() == "--reverse";
         });
     if (iter == current_command_args.end())
       return m_cmd_name.c_str();
@@ -897,13 +859,11 @@
   // these somewhere, there should probably be a module-filter-list that can be
   // passed to the various ModuleList::Find* calls, which would either be a
   // vector of string names or a ModuleSpecList.
-  size_t FindMatchingFunctions(Target *target, ConstString name,
-                               SymbolContextList &sc_list) {
+  void FindMatchingFunctions(Target *target, ConstString name,
+                             SymbolContextList &sc_list) {
     // Displaying the source for a symbol:
     bool include_inlines = true;
-    bool append = true;
     bool include_symbols = false;
-    size_t num_matches = 0;
 
     if (m_options.num_lines == 0)
       m_options.num_lines = 10;
@@ -917,22 +877,20 @@
           ModuleSpec module_spec(module_file_spec);
           matching_modules.Clear();
           target->GetImages().FindModules(module_spec, matching_modules);
-          num_matches += matching_modules.FindFunctions(
-              name, eFunctionNameTypeAuto, include_symbols, include_inlines,
-              append, sc_list);
+          matching_modules.FindFunctions(name, eFunctionNameTypeAuto,
+                                         include_symbols, include_inlines,
+                                         sc_list);
         }
       }
     } else {
-      num_matches = target->GetImages().FindFunctions(
-          name, eFunctionNameTypeAuto, include_symbols, include_inlines, append,
-          sc_list);
+      target->GetImages().FindFunctions(name, eFunctionNameTypeAuto,
+                                        include_symbols, include_inlines,
+                                        sc_list);
     }
-    return num_matches;
   }
 
-  size_t FindMatchingFunctionSymbols(Target *target, ConstString name,
-                                     SymbolContextList &sc_list) {
-    size_t num_matches = 0;
+  void FindMatchingFunctionSymbols(Target *target, ConstString name,
+                                   SymbolContextList &sc_list) {
     const size_t num_modules = m_options.modules.size();
     if (num_modules > 0) {
       ModuleList matching_modules;
@@ -942,15 +900,14 @@
           ModuleSpec module_spec(module_file_spec);
           matching_modules.Clear();
           target->GetImages().FindModules(module_spec, matching_modules);
-          num_matches += matching_modules.FindFunctionSymbols(
-              name, eFunctionNameTypeAuto, sc_list);
+          matching_modules.FindFunctionSymbols(name, eFunctionNameTypeAuto,
+                                               sc_list);
         }
       }
     } else {
-      num_matches = target->GetImages().FindFunctionSymbols(
-          name, eFunctionNameTypeAuto, sc_list);
+      target->GetImages().FindFunctionSymbols(name, eFunctionNameTypeAuto,
+                                              sc_list);
     }
-    return num_matches;
   }
 
   bool DoExecute(Args &command, CommandReturnObject &result) override {
@@ -970,13 +927,15 @@
       ConstString name(m_options.symbol_name.c_str());
 
       // Displaying the source for a symbol. Search for function named name.
-      size_t num_matches = FindMatchingFunctions(target, name, sc_list);
+      FindMatchingFunctions(target, name, sc_list);
+      size_t num_matches = sc_list.GetSize();
       if (!num_matches) {
         // If we didn't find any functions with that name, try searching for
         // symbols that line up exactly with function addresses.
         SymbolContextList sc_list_symbols;
-        size_t num_symbol_matches =
-            FindMatchingFunctionSymbols(target, name, sc_list_symbols);
+        FindMatchingFunctionSymbols(target, name, sc_list_symbols);
+        size_t num_symbol_matches = sc_list_symbols.GetSize();
+
         for (size_t i = 0; i < num_symbol_matches; i++) {
           SymbolContext sc;
           sc_list_symbols.GetContextAtIndex(i, sc);
@@ -1107,7 +1066,8 @@
           if (m_options.show_bp_locs) {
             m_breakpoint_locations.Clear();
             const bool show_inlines = true;
-            m_breakpoint_locations.Reset(*sc.comp_unit, 0, show_inlines);
+            m_breakpoint_locations.Reset(sc.comp_unit->GetPrimaryFile(), 0,
+                                         show_inlines);
             SearchFilterForUnconstrainedSearches target_search_filter(
                 target->shared_from_this());
             target_search_filter.Search(m_breakpoint_locations);
@@ -1136,8 +1096,8 @@
                   ? sc.line_entry.column
                   : 0;
           target->GetSourceManager().DisplaySourceLinesWithLineNumbers(
-              sc.comp_unit, sc.line_entry.line, column, lines_to_back_up,
-              m_options.num_lines - lines_to_back_up, "->",
+              sc.comp_unit->GetPrimaryFile(), sc.line_entry.line, column,
+              lines_to_back_up, m_options.num_lines - lines_to_back_up, "->",
               &result.GetOutputStream(), GetBreakpointLocations());
           result.SetStatus(eReturnStatusSuccessFinishResult);
         }
@@ -1220,18 +1180,18 @@
 
       if (num_matches > 1) {
         bool got_multiple = false;
-        FileSpec *test_cu_spec = nullptr;
+        CompileUnit *test_cu = nullptr;
 
         for (unsigned i = 0; i < num_matches; i++) {
           SymbolContext sc;
           sc_list.GetContextAtIndex(i, sc);
           if (sc.comp_unit) {
-            if (test_cu_spec) {
-              if (test_cu_spec != static_cast<FileSpec *>(sc.comp_unit))
+            if (test_cu) {
+              if (test_cu != sc.comp_unit)
                 got_multiple = true;
               break;
             } else
-              test_cu_spec = sc.comp_unit;
+              test_cu = sc.comp_unit;
           }
         }
         if (got_multiple) {
@@ -1248,7 +1208,8 @@
         if (sc.comp_unit) {
           if (m_options.show_bp_locs) {
             const bool show_inlines = true;
-            m_breakpoint_locations.Reset(*sc.comp_unit, 0, show_inlines);
+            m_breakpoint_locations.Reset(sc.comp_unit->GetPrimaryFile(), 0,
+                                         show_inlines);
             SearchFilterForUnconstrainedSearches target_search_filter(
                 target->shared_from_this());
             target_search_filter.Search(m_breakpoint_locations);
@@ -1259,9 +1220,9 @@
             m_options.num_lines = 10;
           const uint32_t column = 0;
           target->GetSourceManager().DisplaySourceLinesWithLineNumbers(
-              sc.comp_unit, m_options.start_line, column, 
-              0, m_options.num_lines,
-              "", &result.GetOutputStream(), GetBreakpointLocations());
+              sc.comp_unit->GetPrimaryFile(), m_options.start_line, column, 0,
+              m_options.num_lines, "", &result.GetOutputStream(),
+              GetBreakpointLocations());
 
           result.SetStatus(eReturnStatusSuccessFinishResult);
         } else {
@@ -1291,10 +1252,11 @@
 
 CommandObjectMultiwordSource::CommandObjectMultiwordSource(
     CommandInterpreter &interpreter)
-    : CommandObjectMultiword(interpreter, "source", "Commands for examining "
-                                                    "source code described by "
-                                                    "debug information for the "
-                                                    "current target process.",
+    : CommandObjectMultiword(interpreter, "source",
+                             "Commands for examining "
+                             "source code described by "
+                             "debug information for the "
+                             "current target process.",
                              "source <subcommand> [<subcommand-options>]") {
   LoadSubCommand("info",
                  CommandObjectSP(new CommandObjectSourceInfo(interpreter)));
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectSource.h b/src/llvm-project/lldb/source/Commands/CommandObjectSource.h
index d72122d..a4b8823 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectSource.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectSource.h
@@ -10,8 +10,6 @@
 #ifndef liblldb_CommandObjectSource_h_
 #define liblldb_CommandObjectSource_h_
 
-#include "lldb/Core/STLUtils.h"
-#include "lldb/Interpreter/CommandObject.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 
 namespace lldb_private {
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectStats.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectStats.cpp
index a73c2a8..eeec4a8 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectStats.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectStats.cpp
@@ -7,8 +7,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "CommandObjectStats.h"
-#include "lldb/Host/Host.h"
-#include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Target/Target.h"
 
@@ -26,15 +24,15 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
+    Target &target = GetSelectedOrDummyTarget();
 
-    if (target->GetCollectingStats()) {
+    if (target.GetCollectingStats()) {
       result.AppendError("statistics already enabled");
       result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
-    target->SetCollectingStats(true);
+    target.SetCollectingStats(true);
     result.SetStatus(eReturnStatusSuccessFinishResult);
     return true;
   }
@@ -51,15 +49,15 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
+    Target &target = GetSelectedOrDummyTarget();
 
-    if (!target->GetCollectingStats()) {
+    if (!target.GetCollectingStats()) {
       result.AppendError("need to enable statistics before disabling them");
       result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
-    target->SetCollectingStats(false);
+    target.SetCollectingStats(false);
     result.SetStatus(eReturnStatusSuccessFinishResult);
     return true;
   }
@@ -75,13 +73,14 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
+    Target &target = GetSelectedOrDummyTarget();
 
     uint32_t i = 0;
-    for (auto &stat : target->GetStatistics()) {
+    for (auto &stat : target.GetStatistics()) {
       result.AppendMessageWithFormat(
           "%s : %u\n",
-          lldb_private::GetStatDescription(static_cast<lldb_private::StatisticKind>(i))
+          lldb_private::GetStatDescription(
+              static_cast<lldb_private::StatisticKind>(i))
               .c_str(),
           stat);
       i += 1;
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectStats.h b/src/llvm-project/lldb/source/Commands/CommandObjectStats.h
index 27e9a6f..593c452 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectStats.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectStats.h
@@ -9,7 +9,6 @@
 #ifndef liblldb_CommandObjectStats_h_
 #define liblldb_CommandObjectStats_h_
 
-#include "lldb/Interpreter/CommandObject.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 
 namespace lldb_private {
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectTarget.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectTarget.cpp
index e913a28..8738e85 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectTarget.cpp
@@ -24,7 +24,6 @@
 #include "lldb/Interpreter/OptionGroupBoolean.h"
 #include "lldb/Interpreter/OptionGroupFile.h"
 #include "lldb/Interpreter/OptionGroupFormat.h"
-#include "lldb/Interpreter/OptionGroupPlatform.h"
 #include "lldb/Interpreter/OptionGroupString.h"
 #include "lldb/Interpreter/OptionGroupUInt64.h"
 #include "lldb/Interpreter/OptionGroupUUID.h"
@@ -37,7 +36,6 @@
 #include "lldb/Symbol/LocateSymbolFile.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/UnwindPlan.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/ABI.h"
@@ -54,7 +52,6 @@
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/FormatAdapters.h"
 
-#include <cerrno>
 
 using namespace lldb;
 using namespace lldb_private;
@@ -79,7 +76,7 @@
   uint32_t properties = 0;
   if (target_arch.IsValid()) {
     strm.Printf("%sarch=", properties++ > 0 ? ", " : " ( ");
-    target_arch.DumpTriple(strm);
+    target_arch.DumpTriple(strm.AsRawOstream());
     properties++;
   }
   PlatformSP platform_sp(target->GetPlatform());
@@ -108,11 +105,11 @@
     const uint32_t start_frame = 0;
     const uint32_t num_frames = 1;
     const uint32_t num_frames_with_source = 1;
-    const bool     stop_format = false;
+    const bool stop_format = false;
     process_sp->GetStatus(strm);
     process_sp->GetThreadStatus(strm, only_threads_with_stop_reason,
-                                start_frame, num_frames,
-                                num_frames_with_source, stop_format);
+                                start_frame, num_frames, num_frames_with_source,
+                                stop_format);
   }
 }
 
@@ -135,22 +132,27 @@
 }
 
 // Note that the negation in the argument name causes a slightly confusing
-// mapping of the enum values,
+// mapping of the enum values.
 static constexpr OptionEnumValueElement g_dependents_enumaration[] = {
-    {eLoadDependentsDefault, "default",
-     "Only load dependents when the target is an executable."},
-    {eLoadDependentsNo, "true",
-     "Don't load dependents, even if the target is an executable."},
-    {eLoadDependentsYes, "false",
-     "Load dependents, even if the target is not an executable."}};
+    {
+        eLoadDependentsDefault,
+        "default",
+        "Only load dependents when the target is an executable.",
+    },
+    {
+        eLoadDependentsNo,
+        "true",
+        "Don't load dependents, even if the target is an executable.",
+    },
+    {
+        eLoadDependentsYes,
+        "false",
+        "Load dependents, even if the target is not an executable.",
+    },
+};
 
-static constexpr OptionDefinition g_dependents_options[] = {
-    {LLDB_OPT_SET_1, false, "no-dependents", 'd',
-     OptionParser::eOptionalArgument, nullptr,
-     OptionEnumValues(g_dependents_enumaration), 0, eArgTypeValue,
-     "Whether or not to load dependents when creating a target. If the option "
-     "is not specified, the value is implicitly 'default'. If the option is "
-     "specified but without a value, the value is implicitly 'true'."}};
+#define LLDB_OPTIONS_target_dependents
+#include "CommandOptions.inc"
 
 class OptionGroupDependents : public OptionGroup {
 public:
@@ -159,7 +161,7 @@
   ~OptionGroupDependents() override {}
 
   llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
-    return llvm::makeArrayRef(g_dependents_options);
+    return llvm::makeArrayRef(g_target_dependents_options);
   }
 
   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
@@ -172,11 +174,13 @@
       return error;
     }
 
-    const char short_option = g_dependents_options[option_idx].short_option;
+    const char short_option =
+        g_target_dependents_options[option_idx].short_option;
     if (short_option == 'd') {
       LoadDependentFiles tmp_load_dependents;
       tmp_load_dependents = (LoadDependentFiles)OptionArgParser::ToOptionEnum(
-          option_value, g_dependents_options[option_idx].enum_values, 0, error);
+          option_value, g_target_dependents_options[option_idx].enum_values, 0,
+          error);
       if (error.Success())
         m_load_dependent_files = tmp_load_dependents;
     } else {
@@ -252,13 +256,12 @@
 
   Options *GetOptions() override { return &m_option_group; }
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -393,8 +396,8 @@
         debugger.GetTargetList().SetSelectedTarget(target_sp.get());
         if (must_set_platform_path) {
           ModuleSpec main_module_spec(file_spec);
-          ModuleSP module_sp = target_sp->GetOrCreateModule(main_module_spec,
-                                                          true /* notify */);
+          ModuleSP module_sp =
+              target_sp->GetOrCreateModule(main_module_spec, true /* notify */);
           if (module_sp)
             module_sp->SetPlatformFileSpec(remote_file);
         }
@@ -444,7 +447,8 @@
           }
         } else {
           result.AppendMessageWithFormat(
-              "Current executable set to '%s' (%s).\n", file_path,
+              "Current executable set to '%s' (%s).\n",
+              file_spec.GetPath().c_str(),
               target_sp->GetArchitecture().GetArchitectureName());
           result.SetStatus(eReturnStatusSuccessFinishNoResult);
         }
@@ -619,7 +623,7 @@
 
       for (auto &entry : args.entries()) {
         uint32_t target_idx;
-        if (entry.ref.getAsInteger(0, target_idx)) {
+        if (entry.ref().getAsInteger(0, target_idx)) {
           result.AppendErrorWithFormat("invalid target index '%s'\n",
                                        entry.c_str());
           result.SetStatus(eReturnStatusFailed);
@@ -792,12 +796,12 @@
 
   static size_t GetVariableCallback(void *baton, const char *name,
                                     VariableList &variable_list) {
+    size_t old_size = variable_list.GetSize();
     Target *target = static_cast<Target *>(baton);
-    if (target) {
-      return target->GetImages().FindGlobalVariables(ConstString(name),
-                                                     UINT32_MAX, variable_list);
-    }
-    return 0;
+    if (target)
+      target->GetImages().FindGlobalVariables(ConstString(name), UINT32_MAX,
+                                              variable_list);
+    return variable_list.GetSize() - old_size;
   }
 
   Options *GetOptions() override { return &m_option_group; }
@@ -806,32 +810,28 @@
   void DumpGlobalVariableList(const ExecutionContext &exe_ctx,
                               const SymbolContext &sc,
                               const VariableList &variable_list, Stream &s) {
-    size_t count = variable_list.GetSize();
-    if (count > 0) {
-      if (sc.module_sp) {
-        if (sc.comp_unit) {
-          s.Printf("Global variables for %s in %s:\n",
-                   sc.comp_unit->GetPath().c_str(),
-                   sc.module_sp->GetFileSpec().GetPath().c_str());
-        } else {
-          s.Printf("Global variables for %s\n",
-                   sc.module_sp->GetFileSpec().GetPath().c_str());
-        }
-      } else if (sc.comp_unit) {
-        s.Printf("Global variables for %s\n", sc.comp_unit->GetPath().c_str());
+    if (variable_list.Empty())
+      return;
+    if (sc.module_sp) {
+      if (sc.comp_unit) {
+        s.Format("Global variables for {0} in {1}:\n",
+                 sc.comp_unit->GetPrimaryFile(), sc.module_sp->GetFileSpec());
+      } else {
+        s.Printf("Global variables for %s\n",
+                 sc.module_sp->GetFileSpec().GetPath().c_str());
       }
+    } else if (sc.comp_unit) {
+      s.Format("Global variables for {0}\n", sc.comp_unit->GetPrimaryFile());
+    }
 
-      for (uint32_t i = 0; i < count; ++i) {
-        VariableSP var_sp(variable_list.GetVariableAtIndex(i));
-        if (var_sp) {
-          ValueObjectSP valobj_sp(ValueObjectVariable::Create(
-              exe_ctx.GetBestExecutionContextScope(), var_sp));
+    for (VariableSP var_sp : variable_list) {
+      if (!var_sp)
+        continue;
+      ValueObjectSP valobj_sp(ValueObjectVariable::Create(
+          exe_ctx.GetBestExecutionContextScope(), var_sp));
 
-          if (valobj_sp)
-            DumpValueObject(s, var_sp, valobj_sp,
-                            var_sp->GetName().GetCString());
-        }
-      }
+      if (valobj_sp)
+        DumpValueObject(s, var_sp, valobj_sp, var_sp->GetName().GetCString());
     }
   }
 
@@ -860,8 +860,9 @@
             return false;
           }
           use_var_name = true;
-          matches = target->GetImages().FindGlobalVariables(regex, UINT32_MAX,
-                                                            variable_list);
+          target->GetImages().FindGlobalVariables(regex, UINT32_MAX,
+                                                  variable_list);
+          matches = variable_list.GetSize();
         } else {
           Status error(Variable::GetValuesForVariableExpressionPath(
               arg, m_exe_ctx.GetBestExecutionContextScope(),
@@ -922,9 +923,9 @@
         if (!success) {
           if (frame) {
             if (comp_unit)
-              result.AppendErrorWithFormat(
-                  "no global variables in current compile unit: %s\n",
-                  comp_unit->GetPath().c_str());
+              result.AppendErrorWithFormatv(
+                  "no global variables in current compile unit: {0}\n",
+                  comp_unit->GetPrimaryFile());
             else
               result.AppendErrorWithFormat(
                   "no debug information for frame %u\n",
@@ -936,7 +937,6 @@
         }
       } else {
         SymbolContextList sc_list;
-        const bool append = true;
         // We have one or more compile unit or shlib
         if (num_shlibs > 0) {
           for (size_t shlib_idx = 0; shlib_idx < num_shlibs; ++shlib_idx) {
@@ -949,8 +949,7 @@
               if (num_compile_units > 0) {
                 for (size_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx)
                   module_sp->FindCompileUnits(
-                      compile_units.GetFileSpecAtIndex(cu_idx), append,
-                      sc_list);
+                      compile_units.GetFileSpecAtIndex(cu_idx), sc_list);
               } else {
                 SymbolContext sc;
                 sc.module_sp = module_sp;
@@ -968,7 +967,7 @@
           // units files that were specified
           for (size_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx)
             target->GetImages().FindCompileUnits(
-                compile_units.GetFileSpecAtIndex(cu_idx), append, sc_list);
+                compile_units.GetFileSpecAtIndex(cu_idx), sc_list);
         }
 
         const uint32_t num_scs = sc_list.GetSize();
@@ -1024,7 +1023,7 @@
       : CommandObjectParsed(interpreter, "target modules search-paths add",
                             "Add new image search paths substitution pairs to "
                             "the current target.",
-                            nullptr) {
+                            nullptr, eCommandRequiresTarget) {
     CommandArgumentEntry arg;
     CommandArgumentData old_prefix_arg;
     CommandArgumentData new_prefix_arg;
@@ -1053,41 +1052,37 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target) {
-      const size_t argc = command.GetArgumentCount();
-      if (argc & 1) {
-        result.AppendError("add requires an even number of arguments\n");
-        result.SetStatus(eReturnStatusFailed);
-      } else {
-        for (size_t i = 0; i < argc; i += 2) {
-          const char *from = command.GetArgumentAtIndex(i);
-          const char *to = command.GetArgumentAtIndex(i + 1);
+    Target *target = &GetSelectedTarget();
+    const size_t argc = command.GetArgumentCount();
+    if (argc & 1) {
+      result.AppendError("add requires an even number of arguments\n");
+      result.SetStatus(eReturnStatusFailed);
+    } else {
+      for (size_t i = 0; i < argc; i += 2) {
+        const char *from = command.GetArgumentAtIndex(i);
+        const char *to = command.GetArgumentAtIndex(i + 1);
 
-          if (from[0] && to[0]) {
-            Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
-            if (log) {
-              log->Printf("target modules search path adding ImageSearchPath "
-                          "pair: '%s' -> '%s'",
-                          from, to);
-            }
-            bool last_pair = ((argc - i) == 2);
-            target->GetImageSearchPathList().Append(
-                ConstString(from), ConstString(to),
-                last_pair); // Notify if this is the last pair
-            result.SetStatus(eReturnStatusSuccessFinishNoResult);
-          } else {
-            if (from[0])
-              result.AppendError("<path-prefix> can't be empty\n");
-            else
-              result.AppendError("<new-path-prefix> can't be empty\n");
-            result.SetStatus(eReturnStatusFailed);
+        if (from[0] && to[0]) {
+          Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
+          if (log) {
+            LLDB_LOGF(log,
+                      "target modules search path adding ImageSearchPath "
+                      "pair: '%s' -> '%s'",
+                      from, to);
           }
+          bool last_pair = ((argc - i) == 2);
+          target->GetImageSearchPathList().Append(
+              ConstString(from), ConstString(to),
+              last_pair); // Notify if this is the last pair
+          result.SetStatus(eReturnStatusSuccessFinishNoResult);
+        } else {
+          if (from[0])
+            result.AppendError("<path-prefix> can't be empty\n");
+          else
+            result.AppendError("<new-path-prefix> can't be empty\n");
+          result.SetStatus(eReturnStatusFailed);
         }
       }
-    } else {
-      result.AppendError("invalid target\n");
-      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -1101,21 +1096,17 @@
       : CommandObjectParsed(interpreter, "target modules search-paths clear",
                             "Clear all current image search path substitution "
                             "pairs from the current target.",
-                            "target modules search-paths clear") {}
+                            "target modules search-paths clear",
+                            eCommandRequiresTarget) {}
 
   ~CommandObjectTargetModulesSearchPathsClear() override = default;
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target) {
-      bool notify = true;
-      target->GetImageSearchPathList().Clear(notify);
-      result.SetStatus(eReturnStatusSuccessFinishNoResult);
-    } else {
-      result.AppendError("invalid target\n");
-      result.SetStatus(eReturnStatusFailed);
-    }
+    Target *target = &GetSelectedTarget();
+    bool notify = true;
+    target->GetImageSearchPathList().Clear(notify);
+    result.SetStatus(eReturnStatusSuccessFinishNoResult);
     return result.Succeeded();
   }
 };
@@ -1128,7 +1119,7 @@
       : CommandObjectParsed(interpreter, "target modules search-paths insert",
                             "Insert a new image search path substitution pair "
                             "into the current target at the specified index.",
-                            nullptr) {
+                            nullptr, eCommandRequiresTarget) {
     CommandArgumentEntry arg1;
     CommandArgumentEntry arg2;
     CommandArgumentData index_arg;
@@ -1168,55 +1159,49 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target) {
-      size_t argc = command.GetArgumentCount();
-      // check for at least 3 arguments and an odd number of parameters
-      if (argc >= 3 && argc & 1) {
-        bool success = false;
+    Target *target = &GetSelectedTarget();
+    size_t argc = command.GetArgumentCount();
+    // check for at least 3 arguments and an odd number of parameters
+    if (argc >= 3 && argc & 1) {
+      bool success = false;
 
-        uint32_t insert_idx = StringConvert::ToUInt32(
-            command.GetArgumentAtIndex(0), UINT32_MAX, 0, &success);
+      uint32_t insert_idx = StringConvert::ToUInt32(
+          command.GetArgumentAtIndex(0), UINT32_MAX, 0, &success);
 
-        if (!success) {
-          result.AppendErrorWithFormat(
-              "<index> parameter is not an integer: '%s'.\n",
-              command.GetArgumentAtIndex(0));
-          result.SetStatus(eReturnStatusFailed);
-          return result.Succeeded();
-        }
-
-        // shift off the index
-        command.Shift();
-        argc = command.GetArgumentCount();
-
-        for (uint32_t i = 0; i < argc; i += 2, ++insert_idx) {
-          const char *from = command.GetArgumentAtIndex(i);
-          const char *to = command.GetArgumentAtIndex(i + 1);
-
-          if (from[0] && to[0]) {
-            bool last_pair = ((argc - i) == 2);
-            target->GetImageSearchPathList().Insert(
-                ConstString(from), ConstString(to), insert_idx, last_pair);
-            result.SetStatus(eReturnStatusSuccessFinishNoResult);
-          } else {
-            if (from[0])
-              result.AppendError("<path-prefix> can't be empty\n");
-            else
-              result.AppendError("<new-path-prefix> can't be empty\n");
-            result.SetStatus(eReturnStatusFailed);
-            return false;
-          }
-        }
-      } else {
-        result.AppendError("insert requires at least three arguments\n");
+      if (!success) {
+        result.AppendErrorWithFormat(
+            "<index> parameter is not an integer: '%s'.\n",
+            command.GetArgumentAtIndex(0));
         result.SetStatus(eReturnStatusFailed);
         return result.Succeeded();
       }
 
+      // shift off the index
+      command.Shift();
+      argc = command.GetArgumentCount();
+
+      for (uint32_t i = 0; i < argc; i += 2, ++insert_idx) {
+        const char *from = command.GetArgumentAtIndex(i);
+        const char *to = command.GetArgumentAtIndex(i + 1);
+
+        if (from[0] && to[0]) {
+          bool last_pair = ((argc - i) == 2);
+          target->GetImageSearchPathList().Insert(
+              ConstString(from), ConstString(to), insert_idx, last_pair);
+          result.SetStatus(eReturnStatusSuccessFinishNoResult);
+        } else {
+          if (from[0])
+            result.AppendError("<path-prefix> can't be empty\n");
+          else
+            result.AppendError("<new-path-prefix> can't be empty\n");
+          result.SetStatus(eReturnStatusFailed);
+          return false;
+        }
+      }
     } else {
-      result.AppendError("invalid target\n");
+      result.AppendError("insert requires at least three arguments\n");
       result.SetStatus(eReturnStatusFailed);
+      return result.Succeeded();
     }
     return result.Succeeded();
   }
@@ -1230,26 +1215,22 @@
       : CommandObjectParsed(interpreter, "target modules search-paths list",
                             "List all current image search path substitution "
                             "pairs in the current target.",
-                            "target modules search-paths list") {}
+                            "target modules search-paths list",
+                            eCommandRequiresTarget) {}
 
   ~CommandObjectTargetModulesSearchPathsList() override = default;
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target) {
-      if (command.GetArgumentCount() != 0) {
-        result.AppendError("list takes no arguments\n");
-        result.SetStatus(eReturnStatusFailed);
-        return result.Succeeded();
-      }
-
-      target->GetImageSearchPathList().Dump(&result.GetOutputStream());
-      result.SetStatus(eReturnStatusSuccessFinishResult);
-    } else {
-      result.AppendError("invalid target\n");
+    Target *target = &GetSelectedTarget();
+    if (command.GetArgumentCount() != 0) {
+      result.AppendError("list takes no arguments\n");
       result.SetStatus(eReturnStatusFailed);
+      return result.Succeeded();
     }
+
+    target->GetImageSearchPathList().Dump(&result.GetOutputStream());
+    result.SetStatus(eReturnStatusSuccessFinishResult);
     return result.Succeeded();
   }
 };
@@ -1262,7 +1243,7 @@
       : CommandObjectParsed(
             interpreter, "target modules search-paths query",
             "Transform a path using the first applicable image search path.",
-            nullptr) {
+            nullptr, eCommandRequiresTarget) {
     CommandArgumentEntry arg;
     CommandArgumentData path_arg;
 
@@ -1282,26 +1263,21 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target) {
-      if (command.GetArgumentCount() != 1) {
-        result.AppendError("query requires one argument\n");
-        result.SetStatus(eReturnStatusFailed);
-        return result.Succeeded();
-      }
-
-      ConstString orig(command.GetArgumentAtIndex(0));
-      ConstString transformed;
-      if (target->GetImageSearchPathList().RemapPath(orig, transformed))
-        result.GetOutputStream().Printf("%s\n", transformed.GetCString());
-      else
-        result.GetOutputStream().Printf("%s\n", orig.GetCString());
-
-      result.SetStatus(eReturnStatusSuccessFinishResult);
-    } else {
-      result.AppendError("invalid target\n");
+    Target *target = &GetSelectedTarget();
+    if (command.GetArgumentCount() != 1) {
+      result.AppendError("query requires one argument\n");
       result.SetStatus(eReturnStatusFailed);
+      return result.Succeeded();
     }
+
+    ConstString orig(command.GetArgumentAtIndex(0));
+    ConstString transformed;
+    if (target->GetImageSearchPathList().RemapPath(orig, transformed))
+      result.GetOutputStream().Printf("%s\n", transformed.GetCString());
+    else
+      result.GetOutputStream().Printf("%s\n", orig.GetCString());
+
+    result.SetStatus(eReturnStatusSuccessFinishResult);
     return result.Succeeded();
   }
 };
@@ -1313,7 +1289,7 @@
     StreamString arch_strm;
 
     if (full_triple)
-      module->GetArchitecture().DumpTriple(arch_strm);
+      module->GetArchitecture().DumpTriple(arch_strm.AsRawOstream());
     else
       arch_strm.PutCString(module->GetArchitecture().GetArchitectureName());
     std::string arch_str = arch_strm.GetString();
@@ -1348,8 +1324,8 @@
         if (i > 0)
           strm << "\n\n";
 
-        strm << "Line table for " << *static_cast<FileSpec *>(sc.comp_unit)
-             << " in `" << module->GetFileSpec().GetFilename() << "\n";
+        strm << "Line table for " << sc.comp_unit->GetPrimaryFile() << " in `"
+             << module->GetFileSpec().GetFilename() << "\n";
         LineTable *line_table = sc.comp_unit->GetLineTable();
         if (line_table)
           line_table->GetDescription(
@@ -1371,7 +1347,7 @@
       strm.Printf("%-*s", width, fullpath.c_str());
       return;
     } else {
-      file_spec_ptr->Dump(&strm);
+      file_spec_ptr->Dump(strm.AsRawOstream());
       return;
     }
   }
@@ -1438,16 +1414,13 @@
 }
 
 static void DumpModuleSymtab(CommandInterpreter &interpreter, Stream &strm,
-                             Module *module, SortOrder sort_order) {
-  if (module) {
-    SymbolVendor *sym_vendor = module->GetSymbolVendor();
-    if (sym_vendor) {
-      Symtab *symtab = sym_vendor->GetSymtab();
-      if (symtab)
-        symtab->Dump(&strm, interpreter.GetExecutionContext().GetTargetPtr(),
-                     sort_order);
-    }
-  }
+                             Module *module, SortOrder sort_order,
+                             Mangled::NamePreference name_preference) {
+  if (!module)
+    return;
+  if (Symtab *symtab = module->GetSymtab())
+    symtab->Dump(&strm, interpreter.GetExecutionContext().GetTargetPtr(),
+                 sort_order, name_preference);
 }
 
 static void DumpModuleSections(CommandInterpreter &interpreter, Stream &strm,
@@ -1467,11 +1440,10 @@
   }
 }
 
-static bool DumpModuleSymbolVendor(Stream &strm, Module *module) {
+static bool DumpModuleSymbolFile(Stream &strm, Module *module) {
   if (module) {
-    SymbolVendor *symbol_vendor = module->GetSymbolVendor(true);
-    if (symbol_vendor) {
-      symbol_vendor->Dump(&strm);
+    if (SymbolFile *symbol_file = module->GetSymbolFile(true)) {
+      symbol_file->Dump(strm);
       return true;
     }
   }
@@ -1553,47 +1525,44 @@
                                      Stream &strm, Module *module,
                                      const char *name, bool name_is_regex,
                                      bool verbose) {
-  if (module) {
-    SymbolContext sc;
+  if (!module)
+    return 0;
 
-    SymbolVendor *sym_vendor = module->GetSymbolVendor();
-    if (sym_vendor) {
-      Symtab *symtab = sym_vendor->GetSymtab();
-      if (symtab) {
-        std::vector<uint32_t> match_indexes;
-        ConstString symbol_name(name);
-        uint32_t num_matches = 0;
-        if (name_is_regex) {
-          RegularExpression name_regexp(symbol_name.GetStringRef());
-          num_matches = symtab->AppendSymbolIndexesMatchingRegExAndType(
-              name_regexp, eSymbolTypeAny, match_indexes);
-        } else {
-          num_matches =
-              symtab->AppendSymbolIndexesWithName(symbol_name, match_indexes);
-        }
+  Symtab *symtab = module->GetSymtab();
+  if (!symtab)
+    return 0;
 
-        if (num_matches > 0) {
-          strm.Indent();
-          strm.Printf("%u symbols match %s'%s' in ", num_matches,
-                      name_is_regex ? "the regular expression " : "", name);
-          DumpFullpath(strm, &module->GetFileSpec(), 0);
-          strm.PutCString(":\n");
-          strm.IndentMore();
-          for (uint32_t i = 0; i < num_matches; ++i) {
-            Symbol *symbol = symtab->SymbolAtIndex(match_indexes[i]);
-            if (symbol && symbol->ValueIsAddress()) {
-              DumpAddress(interpreter.GetExecutionContext()
-                              .GetBestExecutionContextScope(),
-                          symbol->GetAddressRef(), verbose, strm);
-            }
-          }
-          strm.IndentLess();
-          return num_matches;
-        }
+  SymbolContext sc;
+  std::vector<uint32_t> match_indexes;
+  ConstString symbol_name(name);
+  uint32_t num_matches = 0;
+  if (name_is_regex) {
+    RegularExpression name_regexp(symbol_name.GetStringRef());
+    num_matches = symtab->AppendSymbolIndexesMatchingRegExAndType(
+        name_regexp, eSymbolTypeAny, match_indexes);
+  } else {
+    num_matches =
+        symtab->AppendSymbolIndexesWithName(symbol_name, match_indexes);
+  }
+
+  if (num_matches > 0) {
+    strm.Indent();
+    strm.Printf("%u symbols match %s'%s' in ", num_matches,
+                name_is_regex ? "the regular expression " : "", name);
+    DumpFullpath(strm, &module->GetFileSpec(), 0);
+    strm.PutCString(":\n");
+    strm.IndentMore();
+    for (uint32_t i = 0; i < num_matches; ++i) {
+      Symbol *symbol = symtab->SymbolAtIndex(match_indexes[i]);
+      if (symbol && symbol->ValueIsAddress()) {
+        DumpAddress(
+            interpreter.GetExecutionContext().GetBestExecutionContextScope(),
+            symbol->GetAddressRef(), verbose, strm);
       }
     }
+    strm.IndentLess();
   }
-  return 0;
+  return num_matches;
 }
 
 static void DumpSymbolContextList(ExecutionContextScope *exe_scope,
@@ -1623,19 +1592,17 @@
                                      bool verbose) {
   if (module && name && name[0]) {
     SymbolContextList sc_list;
-    const bool append = true;
     size_t num_matches = 0;
     if (name_is_regex) {
       RegularExpression function_name_regex((llvm::StringRef(name)));
-      num_matches = module->FindFunctions(function_name_regex, include_symbols,
-                                          include_inlines, append, sc_list);
+      module->FindFunctions(function_name_regex, include_symbols,
+                            include_inlines, sc_list);
     } else {
       ConstString function_name(name);
-      num_matches = module->FindFunctions(
-          function_name, nullptr, eFunctionNameTypeAuto, include_symbols,
-          include_inlines, append, sc_list);
+      module->FindFunctions(function_name, nullptr, eFunctionNameTypeAuto,
+                            include_symbols, include_inlines, sc_list);
     }
-
+    num_matches = sc_list.GetSize();
     if (num_matches) {
       strm.Indent();
       strm.Printf("%" PRIu64 " match%s found in ", (uint64_t)num_matches,
@@ -1654,75 +1621,30 @@
 static size_t LookupTypeInModule(CommandInterpreter &interpreter, Stream &strm,
                                  Module *module, const char *name_cstr,
                                  bool name_is_regex) {
+  TypeList type_list;
   if (module && name_cstr && name_cstr[0]) {
-    TypeList type_list;
     const uint32_t max_num_matches = UINT32_MAX;
     size_t num_matches = 0;
     bool name_is_fully_qualified = false;
 
     ConstString name(name_cstr);
     llvm::DenseSet<lldb_private::SymbolFile *> searched_symbol_files;
-    num_matches =
-        module->FindTypes(name, name_is_fully_qualified, max_num_matches,
-                          searched_symbol_files, type_list);
+    module->FindTypes(name, name_is_fully_qualified, max_num_matches,
+                      searched_symbol_files, type_list);
 
-    if (num_matches) {
-      strm.Indent();
-      strm.Printf("%" PRIu64 " match%s found in ", (uint64_t)num_matches,
-                  num_matches > 1 ? "es" : "");
-      DumpFullpath(strm, &module->GetFileSpec(), 0);
-      strm.PutCString(":\n");
-      for (TypeSP type_sp : type_list.Types()) {
-        if (type_sp) {
-          // Resolve the clang type so that any forward references to types
-          // that haven't yet been parsed will get parsed.
-          type_sp->GetFullCompilerType();
-          type_sp->GetDescription(&strm, eDescriptionLevelFull, true);
-          // Print all typedef chains
-          TypeSP typedef_type_sp(type_sp);
-          TypeSP typedefed_type_sp(typedef_type_sp->GetTypedefType());
-          while (typedefed_type_sp) {
-            strm.EOL();
-            strm.Printf("     typedef '%s': ",
-                        typedef_type_sp->GetName().GetCString());
-            typedefed_type_sp->GetFullCompilerType();
-            typedefed_type_sp->GetDescription(&strm, eDescriptionLevelFull,
-                                              true);
-            typedef_type_sp = typedefed_type_sp;
-            typedefed_type_sp = typedef_type_sp->GetTypedefType();
-          }
-        }
-        strm.EOL();
-      }
-    }
-    return num_matches;
-  }
-  return 0;
-}
+    if (type_list.Empty())
+      return 0;
 
-static size_t LookupTypeHere(CommandInterpreter &interpreter, Stream &strm,
-                             Module &module, const char *name_cstr,
-                             bool name_is_regex) {
-  TypeList type_list;
-  const uint32_t max_num_matches = UINT32_MAX;
-  size_t num_matches = 1;
-  bool name_is_fully_qualified = false;
-
-  ConstString name(name_cstr);
-  llvm::DenseSet<SymbolFile *> searched_symbol_files;
-  num_matches = module.FindTypes(name, name_is_fully_qualified, max_num_matches,
-                                 searched_symbol_files, type_list);
-
-  if (num_matches) {
     strm.Indent();
-    strm.PutCString("Best match found in ");
-    DumpFullpath(strm, &module.GetFileSpec(), 0);
+    strm.Printf("%" PRIu64 " match%s found in ", (uint64_t)num_matches,
+                num_matches > 1 ? "es" : "");
+    DumpFullpath(strm, &module->GetFileSpec(), 0);
     strm.PutCString(":\n");
-
-    TypeSP type_sp(type_list.GetTypeAtIndex(0));
-    if (type_sp) {
-      // Resolve the clang type so that any forward references to types that
-      // haven't yet been parsed will get parsed.
+    for (TypeSP type_sp : type_list.Types()) {
+      if (!type_sp)
+        continue;
+      // Resolve the clang type so that any forward references to types
+      // that haven't yet been parsed will get parsed.
       type_sp->GetFullCompilerType();
       type_sp->GetDescription(&strm, eDescriptionLevelFull, true);
       // Print all typedef chains
@@ -1740,7 +1662,50 @@
     }
     strm.EOL();
   }
-  return num_matches;
+  return type_list.GetSize();
+}
+
+static size_t LookupTypeHere(CommandInterpreter &interpreter, Stream &strm,
+                             Module &module, const char *name_cstr,
+                             bool name_is_regex) {
+  TypeList type_list;
+  const uint32_t max_num_matches = UINT32_MAX;
+  bool name_is_fully_qualified = false;
+
+  ConstString name(name_cstr);
+  llvm::DenseSet<SymbolFile *> searched_symbol_files;
+  module.FindTypes(name, name_is_fully_qualified, max_num_matches,
+                   searched_symbol_files, type_list);
+
+  if (type_list.Empty())
+    return 0;
+
+  strm.Indent();
+  strm.PutCString("Best match found in ");
+  DumpFullpath(strm, &module.GetFileSpec(), 0);
+  strm.PutCString(":\n");
+
+  TypeSP type_sp(type_list.GetTypeAtIndex(0));
+  if (type_sp) {
+    // Resolve the clang type so that any forward references to types that
+    // haven't yet been parsed will get parsed.
+    type_sp->GetFullCompilerType();
+    type_sp->GetDescription(&strm, eDescriptionLevelFull, true);
+    // Print all typedef chains
+    TypeSP typedef_type_sp(type_sp);
+    TypeSP typedefed_type_sp(typedef_type_sp->GetTypedefType());
+    while (typedefed_type_sp) {
+      strm.EOL();
+      strm.Printf("     typedef '%s': ",
+                  typedef_type_sp->GetName().GetCString());
+      typedefed_type_sp->GetFullCompilerType();
+      typedefed_type_sp->GetDescription(&strm, eDescriptionLevelFull, true);
+      typedef_type_sp = typedefed_type_sp;
+      typedefed_type_sp = typedef_type_sp->GetTypedefType();
+    }
+  }
+  strm.EOL();
+  return type_list.GetSize();
 }
 
 static uint32_t LookupFileAndLineInModule(CommandInterpreter &interpreter,
@@ -1797,8 +1762,8 @@
     }
   } else {
     if (target) {
-      const size_t num_matches =
-          target->GetImages().FindModules(module_spec, module_list);
+      target->GetImages().FindModules(module_spec, module_list);
+      const size_t num_matches = module_list.GetSize();
 
       // Not found in our module list for our target, check the main shared
       // module list in case it is a extra file used somewhere else
@@ -1825,8 +1790,9 @@
   CommandObjectTargetModulesModuleAutoComplete(CommandInterpreter &interpreter,
                                                const char *name,
                                                const char *help,
-                                               const char *syntax)
-      : CommandObjectParsed(interpreter, name, help, syntax) {
+                                               const char *syntax,
+                                               uint32_t flags = 0)
+      : CommandObjectParsed(interpreter, name, help, syntax, flags) {
     CommandArgumentEntry arg;
     CommandArgumentData file_arg;
 
@@ -1844,13 +1810,12 @@
 
   ~CommandObjectTargetModulesModuleAutoComplete() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eModuleCompletion, request,
         nullptr);
-    return request.GetNumberOfMatches();
   }
 };
 
@@ -1883,13 +1848,12 @@
 
   ~CommandObjectTargetModulesSourceFileAutoComplete() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eSourceFileCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 };
 
@@ -1902,19 +1866,13 @@
       : CommandObjectTargetModulesModuleAutoComplete(
             interpreter, "target modules dump objfile",
             "Dump the object file headers from one or more target modules.",
-            nullptr) {}
+            nullptr, eCommandRequiresTarget) {}
 
   ~CommandObjectTargetModulesDumpObjfile() override = default;
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target == nullptr) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target *target = &GetSelectedTarget();
 
     uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
     result.GetOutputStream().SetAddressByteSize(addr_byte_size);
@@ -1961,15 +1919,25 @@
 #pragma mark CommandObjectTargetModulesDumpSymtab
 
 static constexpr OptionEnumValueElement g_sort_option_enumeration[] = {
-    {eSortOrderNone, "none",
-     "No sorting, use the original symbol table order."},
-    {eSortOrderByAddress, "address", "Sort output by symbol address."},
-    {eSortOrderByName, "name", "Sort output by symbol name."} };
+    {
+        eSortOrderNone,
+        "none",
+        "No sorting, use the original symbol table order.",
+    },
+    {
+        eSortOrderByAddress,
+        "address",
+        "Sort output by symbol address.",
+    },
+    {
+        eSortOrderByName,
+        "name",
+        "Sort output by symbol name.",
+    },
+};
 
-static constexpr OptionDefinition g_target_modules_dump_symtab_options[] = {
 #define LLDB_OPTIONS_target_modules_dump_symtab
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTargetModulesDumpSymtab
     : public CommandObjectTargetModulesModuleAutoComplete {
@@ -1977,7 +1945,8 @@
   CommandObjectTargetModulesDumpSymtab(CommandInterpreter &interpreter)
       : CommandObjectTargetModulesModuleAutoComplete(
             interpreter, "target modules dump symtab",
-            "Dump the symbol table from one or more target modules.", nullptr),
+            "Dump the symbol table from one or more target modules.", nullptr,
+            eCommandRequiresTarget),
         m_options() {}
 
   ~CommandObjectTargetModulesDumpSymtab() override = default;
@@ -1996,6 +1965,11 @@
       const int short_option = m_getopt_table[option_idx].val;
 
       switch (short_option) {
+      case 'm':
+        m_prefer_mangled.SetCurrentValue(true);
+        m_prefer_mangled.SetOptionWasSet();
+        break;
+
       case 's':
         m_sort_order = (SortOrder)OptionArgParser::ToOptionEnum(
             option_arg, GetDefinitions()[option_idx].enum_values,
@@ -2003,15 +1977,14 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
 
     void OptionParsingStarting(ExecutionContext *execution_context) override {
       m_sort_order = eSortOrderNone;
+      m_prefer_mangled.Clear();
     }
 
     llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
@@ -2019,86 +1992,83 @@
     }
 
     SortOrder m_sort_order;
+    OptionValueBoolean m_prefer_mangled = {false, false};
   };
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target == nullptr) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    } else {
-      uint32_t num_dumped = 0;
+    Target *target = &GetSelectedTarget();
+    uint32_t num_dumped = 0;
+    Mangled::NamePreference name_preference =
+        (m_options.m_prefer_mangled ? Mangled::ePreferMangled
+                                    : Mangled::ePreferDemangled);
 
-      uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
-      result.GetOutputStream().SetAddressByteSize(addr_byte_size);
-      result.GetErrorStream().SetAddressByteSize(addr_byte_size);
+    uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
+    result.GetOutputStream().SetAddressByteSize(addr_byte_size);
+    result.GetErrorStream().SetAddressByteSize(addr_byte_size);
 
-      if (command.GetArgumentCount() == 0) {
-        // Dump all sections for all modules images
-        std::lock_guard<std::recursive_mutex> guard(
-            target->GetImages().GetMutex());
-        const size_t num_modules = target->GetImages().GetSize();
-        if (num_modules > 0) {
-          result.GetOutputStream().Printf("Dumping symbol table for %" PRIu64
-                                          " modules.\n",
-                                          (uint64_t)num_modules);
-          for (size_t image_idx = 0; image_idx < num_modules; ++image_idx) {
-            if (num_dumped > 0) {
-              result.GetOutputStream().EOL();
-              result.GetOutputStream().EOL();
-            }
-            if (m_interpreter.WasInterrupted())
-              break;
-            num_dumped++;
-            DumpModuleSymtab(
-                m_interpreter, result.GetOutputStream(),
-                target->GetImages().GetModulePointerAtIndexUnlocked(image_idx),
-                m_options.m_sort_order);
+    if (command.GetArgumentCount() == 0) {
+      // Dump all sections for all modules images
+      std::lock_guard<std::recursive_mutex> guard(
+          target->GetImages().GetMutex());
+      const size_t num_modules = target->GetImages().GetSize();
+      if (num_modules > 0) {
+        result.GetOutputStream().Printf("Dumping symbol table for %" PRIu64
+                                        " modules.\n",
+                                        (uint64_t)num_modules);
+        for (size_t image_idx = 0; image_idx < num_modules; ++image_idx) {
+          if (num_dumped > 0) {
+            result.GetOutputStream().EOL();
+            result.GetOutputStream().EOL();
           }
-        } else {
-          result.AppendError("the target has no associated executable images");
-          result.SetStatus(eReturnStatusFailed);
-          return false;
+          if (m_interpreter.WasInterrupted())
+            break;
+          num_dumped++;
+          DumpModuleSymtab(
+              m_interpreter, result.GetOutputStream(),
+              target->GetImages().GetModulePointerAtIndexUnlocked(image_idx),
+              m_options.m_sort_order, name_preference);
         }
       } else {
-        // Dump specified images (by basename or fullpath)
-        const char *arg_cstr;
-        for (int arg_idx = 0;
-             (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr;
-             ++arg_idx) {
-          ModuleList module_list;
-          const size_t num_matches =
-              FindModulesByName(target, arg_cstr, module_list, true);
-          if (num_matches > 0) {
-            for (size_t i = 0; i < num_matches; ++i) {
-              Module *module = module_list.GetModulePointerAtIndex(i);
-              if (module) {
-                if (num_dumped > 0) {
-                  result.GetOutputStream().EOL();
-                  result.GetOutputStream().EOL();
-                }
-                if (m_interpreter.WasInterrupted())
-                  break;
-                num_dumped++;
-                DumpModuleSymtab(m_interpreter, result.GetOutputStream(),
-                                 module, m_options.m_sort_order);
-              }
-            }
-          } else
-            result.AppendWarningWithFormat(
-                "Unable to find an image that matches '%s'.\n", arg_cstr);
-        }
-      }
-
-      if (num_dumped > 0)
-        result.SetStatus(eReturnStatusSuccessFinishResult);
-      else {
-        result.AppendError("no matching executable images found");
+        result.AppendError("the target has no associated executable images");
         result.SetStatus(eReturnStatusFailed);
+        return false;
       }
+    } else {
+      // Dump specified images (by basename or fullpath)
+      const char *arg_cstr;
+      for (int arg_idx = 0;
+           (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr;
+           ++arg_idx) {
+        ModuleList module_list;
+        const size_t num_matches =
+            FindModulesByName(target, arg_cstr, module_list, true);
+        if (num_matches > 0) {
+          for (size_t i = 0; i < num_matches; ++i) {
+            Module *module = module_list.GetModulePointerAtIndex(i);
+            if (module) {
+              if (num_dumped > 0) {
+                result.GetOutputStream().EOL();
+                result.GetOutputStream().EOL();
+              }
+              if (m_interpreter.WasInterrupted())
+                break;
+              num_dumped++;
+              DumpModuleSymtab(m_interpreter, result.GetOutputStream(), module,
+                               m_options.m_sort_order, name_preference);
+            }
+          }
+        } else
+          result.AppendWarningWithFormat(
+              "Unable to find an image that matches '%s'.\n", arg_cstr);
+      }
+    }
+
+    if (num_dumped > 0)
+      result.SetStatus(eReturnStatusSuccessFinishResult);
+    else {
+      result.AppendError("no matching executable images found");
+      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -2118,82 +2088,75 @@
             interpreter, "target modules dump sections",
             "Dump the sections from one or more target modules.",
             //"target modules dump sections [<file1> ...]")
-            nullptr) {}
+            nullptr, eCommandRequiresTarget) {}
 
   ~CommandObjectTargetModulesDumpSections() override = default;
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target == nullptr) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    } else {
-      uint32_t num_dumped = 0;
+    Target *target = &GetSelectedTarget();
+    uint32_t num_dumped = 0;
 
-      uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
-      result.GetOutputStream().SetAddressByteSize(addr_byte_size);
-      result.GetErrorStream().SetAddressByteSize(addr_byte_size);
+    uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
+    result.GetOutputStream().SetAddressByteSize(addr_byte_size);
+    result.GetErrorStream().SetAddressByteSize(addr_byte_size);
 
-      if (command.GetArgumentCount() == 0) {
-        // Dump all sections for all modules images
-        const size_t num_modules = target->GetImages().GetSize();
-        if (num_modules > 0) {
-          result.GetOutputStream().Printf("Dumping sections for %" PRIu64
-                                          " modules.\n",
-                                          (uint64_t)num_modules);
-          for (size_t image_idx = 0; image_idx < num_modules; ++image_idx) {
-            if (m_interpreter.WasInterrupted())
-              break;
-            num_dumped++;
-            DumpModuleSections(
-                m_interpreter, result.GetOutputStream(),
-                target->GetImages().GetModulePointerAtIndex(image_idx));
-          }
-        } else {
-          result.AppendError("the target has no associated executable images");
-          result.SetStatus(eReturnStatusFailed);
-          return false;
+    if (command.GetArgumentCount() == 0) {
+      // Dump all sections for all modules images
+      const size_t num_modules = target->GetImages().GetSize();
+      if (num_modules > 0) {
+        result.GetOutputStream().Printf("Dumping sections for %" PRIu64
+                                        " modules.\n",
+                                        (uint64_t)num_modules);
+        for (size_t image_idx = 0; image_idx < num_modules; ++image_idx) {
+          if (m_interpreter.WasInterrupted())
+            break;
+          num_dumped++;
+          DumpModuleSections(
+              m_interpreter, result.GetOutputStream(),
+              target->GetImages().GetModulePointerAtIndex(image_idx));
         }
       } else {
-        // Dump specified images (by basename or fullpath)
-        const char *arg_cstr;
-        for (int arg_idx = 0;
-             (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr;
-             ++arg_idx) {
-          ModuleList module_list;
-          const size_t num_matches =
-              FindModulesByName(target, arg_cstr, module_list, true);
-          if (num_matches > 0) {
-            for (size_t i = 0; i < num_matches; ++i) {
-              if (m_interpreter.WasInterrupted())
-                break;
-              Module *module = module_list.GetModulePointerAtIndex(i);
-              if (module) {
-                num_dumped++;
-                DumpModuleSections(m_interpreter, result.GetOutputStream(),
-                                   module);
-              }
+        result.AppendError("the target has no associated executable images");
+        result.SetStatus(eReturnStatusFailed);
+        return false;
+      }
+    } else {
+      // Dump specified images (by basename or fullpath)
+      const char *arg_cstr;
+      for (int arg_idx = 0;
+           (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr;
+           ++arg_idx) {
+        ModuleList module_list;
+        const size_t num_matches =
+            FindModulesByName(target, arg_cstr, module_list, true);
+        if (num_matches > 0) {
+          for (size_t i = 0; i < num_matches; ++i) {
+            if (m_interpreter.WasInterrupted())
+              break;
+            Module *module = module_list.GetModulePointerAtIndex(i);
+            if (module) {
+              num_dumped++;
+              DumpModuleSections(m_interpreter, result.GetOutputStream(),
+                                 module);
             }
-          } else {
-            // Check the global list
-            std::lock_guard<std::recursive_mutex> guard(
-                Module::GetAllocationModuleCollectionMutex());
-
-            result.AppendWarningWithFormat(
-                "Unable to find an image that matches '%s'.\n", arg_cstr);
           }
+        } else {
+          // Check the global list
+          std::lock_guard<std::recursive_mutex> guard(
+              Module::GetAllocationModuleCollectionMutex());
+
+          result.AppendWarningWithFormat(
+              "Unable to find an image that matches '%s'.\n", arg_cstr);
         }
       }
+    }
 
-      if (num_dumped > 0)
-        result.SetStatus(eReturnStatusSuccessFinishResult);
-      else {
-        result.AppendError("no matching executable images found");
-        result.SetStatus(eReturnStatusFailed);
-      }
+    if (num_dumped > 0)
+      result.SetStatus(eReturnStatusSuccessFinishResult);
+    else {
+      result.AppendError("no matching executable images found");
+      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
@@ -2211,19 +2174,13 @@
             interpreter, "target modules dump ast",
             "Dump the clang ast for a given module's symbol file.",
             //"target modules dump ast [<file1> ...]")
-            nullptr) {}
+            nullptr, eCommandRequiresTarget) {}
 
   ~CommandObjectTargetModulesDumpClangAST() override = default;
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target == nullptr) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target *target = &GetSelectedTarget();
 
     const size_t num_modules = target->GetImages().GetSize();
     if (num_modules == 0) {
@@ -2241,8 +2198,8 @@
         if (m_interpreter.WasInterrupted())
           break;
         Module *m = target->GetImages().GetModulePointerAtIndex(image_idx);
-        SymbolFile *sf = m->GetSymbolVendor()->GetSymbolFile();
-        sf->DumpClangAST(result.GetOutputStream());
+        if (SymbolFile *sf = m->GetSymbolFile())
+          sf->DumpClangAST(result.GetOutputStream());
       }
       result.SetStatus(eReturnStatusSuccessFinishResult);
       return true;
@@ -2267,8 +2224,8 @@
         if (m_interpreter.WasInterrupted())
           break;
         Module *m = module_list.GetModulePointerAtIndex(i);
-        SymbolFile *sf = m->GetSymbolVendor()->GetSymbolFile();
-        sf->DumpClangAST(result.GetOutputStream());
+        if (SymbolFile *sf = m->GetSymbolFile())
+          sf->DumpClangAST(result.GetOutputStream());
       }
     }
     result.SetStatus(eReturnStatusSuccessFinishResult);
@@ -2288,84 +2245,79 @@
             interpreter, "target modules dump symfile",
             "Dump the debug symbol file for one or more target modules.",
             //"target modules dump symfile [<file1> ...]")
-            nullptr) {}
+            nullptr, eCommandRequiresTarget) {}
 
   ~CommandObjectTargetModulesDumpSymfile() override = default;
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target == nullptr) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    } else {
-      uint32_t num_dumped = 0;
+    Target *target = &GetSelectedTarget();
+    uint32_t num_dumped = 0;
 
-      uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
-      result.GetOutputStream().SetAddressByteSize(addr_byte_size);
-      result.GetErrorStream().SetAddressByteSize(addr_byte_size);
+    uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
+    result.GetOutputStream().SetAddressByteSize(addr_byte_size);
+    result.GetErrorStream().SetAddressByteSize(addr_byte_size);
 
-      if (command.GetArgumentCount() == 0) {
-        // Dump all sections for all modules images
-        const ModuleList &target_modules = target->GetImages();
-        std::lock_guard<std::recursive_mutex> guard(target_modules.GetMutex());
-        const size_t num_modules = target_modules.GetSize();
-        if (num_modules > 0) {
-          result.GetOutputStream().Printf("Dumping debug symbols for %" PRIu64
-                                          " modules.\n",
-                                          (uint64_t)num_modules);
-          for (uint32_t image_idx = 0; image_idx < num_modules; ++image_idx) {
-            if (m_interpreter.WasInterrupted())
-              break;
-            if (DumpModuleSymbolVendor(
-                    result.GetOutputStream(),
-                    target_modules.GetModulePointerAtIndexUnlocked(image_idx)))
-              num_dumped++;
-          }
-        } else {
-          result.AppendError("the target has no associated executable images");
-          result.SetStatus(eReturnStatusFailed);
-          return false;
+    if (command.GetArgumentCount() == 0) {
+      // Dump all sections for all modules images
+      const ModuleList &target_modules = target->GetImages();
+      std::lock_guard<std::recursive_mutex> guard(target_modules.GetMutex());
+      const size_t num_modules = target_modules.GetSize();
+      if (num_modules > 0) {
+        result.GetOutputStream().Printf("Dumping debug symbols for %" PRIu64
+                                        " modules.\n",
+                                        (uint64_t)num_modules);
+        for (uint32_t image_idx = 0; image_idx < num_modules; ++image_idx) {
+          if (m_interpreter.WasInterrupted())
+            break;
+          if (DumpModuleSymbolFile(
+                  result.GetOutputStream(),
+                  target_modules.GetModulePointerAtIndexUnlocked(image_idx)))
+            num_dumped++;
         }
       } else {
-        // Dump specified images (by basename or fullpath)
-        const char *arg_cstr;
-        for (int arg_idx = 0;
-             (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr;
-             ++arg_idx) {
-          ModuleList module_list;
-          const size_t num_matches =
-              FindModulesByName(target, arg_cstr, module_list, true);
-          if (num_matches > 0) {
-            for (size_t i = 0; i < num_matches; ++i) {
-              if (m_interpreter.WasInterrupted())
-                break;
-              Module *module = module_list.GetModulePointerAtIndex(i);
-              if (module) {
-                if (DumpModuleSymbolVendor(result.GetOutputStream(), module))
-                  num_dumped++;
-              }
-            }
-          } else
-            result.AppendWarningWithFormat(
-                "Unable to find an image that matches '%s'.\n", arg_cstr);
-        }
-      }
-
-      if (num_dumped > 0)
-        result.SetStatus(eReturnStatusSuccessFinishResult);
-      else {
-        result.AppendError("no matching executable images found");
+        result.AppendError("the target has no associated executable images");
         result.SetStatus(eReturnStatusFailed);
+        return false;
       }
+    } else {
+      // Dump specified images (by basename or fullpath)
+      const char *arg_cstr;
+      for (int arg_idx = 0;
+           (arg_cstr = command.GetArgumentAtIndex(arg_idx)) != nullptr;
+           ++arg_idx) {
+        ModuleList module_list;
+        const size_t num_matches =
+            FindModulesByName(target, arg_cstr, module_list, true);
+        if (num_matches > 0) {
+          for (size_t i = 0; i < num_matches; ++i) {
+            if (m_interpreter.WasInterrupted())
+              break;
+            Module *module = module_list.GetModulePointerAtIndex(i);
+            if (module) {
+              if (DumpModuleSymbolFile(result.GetOutputStream(), module))
+                num_dumped++;
+            }
+          }
+        } else
+          result.AppendWarningWithFormat(
+              "Unable to find an image that matches '%s'.\n", arg_cstr);
+      }
+    }
+
+    if (num_dumped > 0)
+      result.SetStatus(eReturnStatusSuccessFinishResult);
+    else {
+      result.AppendError("no matching executable images found");
+      result.SetStatus(eReturnStatusFailed);
     }
     return result.Succeeded();
   }
 };
 
 #pragma mark CommandObjectTargetModulesDumpLineTable
+#define LLDB_OPTIONS_target_modules_dump
+#include "CommandOptions.inc"
 
 // Image debug line table dumping command
 
@@ -2454,19 +2406,7 @@
     }
 
     llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
-      static constexpr OptionDefinition g_options[] = {
-          {LLDB_OPT_SET_ALL,
-           false,
-           "verbose",
-           'v',
-           OptionParser::eNoArgument,
-           nullptr,
-           {},
-           0,
-           eArgTypeNone,
-           "Enable verbose dump."},
-      };
-      return llvm::makeArrayRef(g_options);
+      return llvm::makeArrayRef(g_target_modules_dump_options);
     }
 
     bool m_verbose;
@@ -2518,10 +2458,11 @@
   CommandObjectTargetModulesAdd(CommandInterpreter &interpreter)
       : CommandObjectParsed(interpreter, "target modules add",
                             "Add a new module to the current target's modules.",
-                            "target modules add [<module>]"),
-        m_option_group(),
-        m_symbol_file(LLDB_OPT_SET_1, false, "symfile", 's', 0,
-                      eArgTypeFilename, "Fullpath to a stand alone debug "
+                            "target modules add [<module>]",
+                            eCommandRequiresTarget),
+        m_option_group(), m_symbol_file(LLDB_OPT_SET_1, false, "symfile", 's',
+                                        0, eArgTypeFilename,
+                                        "Fullpath to a stand alone debug "
                                         "symbols file for when debug symbols "
                                         "are not in the executable.") {
     m_option_group.Append(&m_uuid_option_group, LLDB_OPT_SET_ALL,
@@ -2534,13 +2475,12 @@
 
   Options *GetOptions() override { return &m_option_group; }
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
 protected:
@@ -2549,125 +2489,117 @@
   OptionGroupFile m_symbol_file;
 
   bool DoExecute(Args &args, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target == nullptr) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    } else {
-      bool flush = false;
+    Target *target = &GetSelectedTarget();
+    bool flush = false;
 
-      const size_t argc = args.GetArgumentCount();
-      if (argc == 0) {
-        if (m_uuid_option_group.GetOptionValue().OptionWasSet()) {
-          // We are given a UUID only, go locate the file
-          ModuleSpec module_spec;
-          module_spec.GetUUID() =
-              m_uuid_option_group.GetOptionValue().GetCurrentValue();
-          if (m_symbol_file.GetOptionValue().OptionWasSet())
-            module_spec.GetSymbolFileSpec() =
-                m_symbol_file.GetOptionValue().GetCurrentValue();
-          if (Symbols::DownloadObjectAndSymbolFile(module_spec)) {
-            ModuleSP module_sp(target->GetOrCreateModule(module_spec,
-                                                 true /* notify */));
-            if (module_sp) {
-              result.SetStatus(eReturnStatusSuccessFinishResult);
-              return true;
-            } else {
-              StreamString strm;
-              module_spec.GetUUID().Dump(&strm);
-              if (module_spec.GetFileSpec()) {
-                if (module_spec.GetSymbolFileSpec()) {
-                  result.AppendErrorWithFormat(
-                      "Unable to create the executable or symbol file with "
-                      "UUID %s with path %s and symbol file %s",
-                      strm.GetData(),
-                      module_spec.GetFileSpec().GetPath().c_str(),
-                      module_spec.GetSymbolFileSpec().GetPath().c_str());
-                } else {
-                  result.AppendErrorWithFormat(
-                      "Unable to create the executable or symbol file with "
-                      "UUID %s with path %s",
-                      strm.GetData(),
-                      module_spec.GetFileSpec().GetPath().c_str());
-                }
-              } else {
-                result.AppendErrorWithFormat("Unable to create the executable "
-                                             "or symbol file with UUID %s",
-                                             strm.GetData());
-              }
-              result.SetStatus(eReturnStatusFailed);
-              return false;
-            }
+    const size_t argc = args.GetArgumentCount();
+    if (argc == 0) {
+      if (m_uuid_option_group.GetOptionValue().OptionWasSet()) {
+        // We are given a UUID only, go locate the file
+        ModuleSpec module_spec;
+        module_spec.GetUUID() =
+            m_uuid_option_group.GetOptionValue().GetCurrentValue();
+        if (m_symbol_file.GetOptionValue().OptionWasSet())
+          module_spec.GetSymbolFileSpec() =
+              m_symbol_file.GetOptionValue().GetCurrentValue();
+        if (Symbols::DownloadObjectAndSymbolFile(module_spec)) {
+          ModuleSP module_sp(
+              target->GetOrCreateModule(module_spec, true /* notify */));
+          if (module_sp) {
+            result.SetStatus(eReturnStatusSuccessFinishResult);
+            return true;
           } else {
             StreamString strm;
             module_spec.GetUUID().Dump(&strm);
-            result.AppendErrorWithFormat(
-                "Unable to locate the executable or symbol file with UUID %s",
-                strm.GetData());
+            if (module_spec.GetFileSpec()) {
+              if (module_spec.GetSymbolFileSpec()) {
+                result.AppendErrorWithFormat(
+                    "Unable to create the executable or symbol file with "
+                    "UUID %s with path %s and symbol file %s",
+                    strm.GetData(), module_spec.GetFileSpec().GetPath().c_str(),
+                    module_spec.GetSymbolFileSpec().GetPath().c_str());
+              } else {
+                result.AppendErrorWithFormat(
+                    "Unable to create the executable or symbol file with "
+                    "UUID %s with path %s",
+                    strm.GetData(),
+                    module_spec.GetFileSpec().GetPath().c_str());
+              }
+            } else {
+              result.AppendErrorWithFormat("Unable to create the executable "
+                                           "or symbol file with UUID %s",
+                                           strm.GetData());
+            }
             result.SetStatus(eReturnStatusFailed);
             return false;
           }
         } else {
-          result.AppendError(
-              "one or more executable image paths must be specified");
+          StreamString strm;
+          module_spec.GetUUID().Dump(&strm);
+          result.AppendErrorWithFormat(
+              "Unable to locate the executable or symbol file with UUID %s",
+              strm.GetData());
           result.SetStatus(eReturnStatusFailed);
           return false;
         }
       } else {
-        for (auto &entry : args.entries()) {
-          if (entry.ref.empty())
-            continue;
+        result.AppendError(
+            "one or more executable image paths must be specified");
+        result.SetStatus(eReturnStatusFailed);
+        return false;
+      }
+    } else {
+      for (auto &entry : args.entries()) {
+        if (entry.ref().empty())
+          continue;
 
-          FileSpec file_spec(entry.ref);
-          if (FileSystem::Instance().Exists(file_spec)) {
-            ModuleSpec module_spec(file_spec);
-            if (m_uuid_option_group.GetOptionValue().OptionWasSet())
-              module_spec.GetUUID() =
-                  m_uuid_option_group.GetOptionValue().GetCurrentValue();
-            if (m_symbol_file.GetOptionValue().OptionWasSet())
-              module_spec.GetSymbolFileSpec() =
-                  m_symbol_file.GetOptionValue().GetCurrentValue();
-            if (!module_spec.GetArchitecture().IsValid())
-              module_spec.GetArchitecture() = target->GetArchitecture();
-            Status error;
-            ModuleSP module_sp(target->GetOrCreateModule(module_spec, 
-                                            true /* notify */, &error));
-            if (!module_sp) {
-              const char *error_cstr = error.AsCString();
-              if (error_cstr)
-                result.AppendError(error_cstr);
-              else
-                result.AppendErrorWithFormat("unsupported module: %s",
-                                             entry.c_str());
-              result.SetStatus(eReturnStatusFailed);
-              return false;
-            } else {
-              flush = true;
-            }
-            result.SetStatus(eReturnStatusSuccessFinishResult);
-          } else {
-            std::string resolved_path = file_spec.GetPath();
+        FileSpec file_spec(entry.ref());
+        if (FileSystem::Instance().Exists(file_spec)) {
+          ModuleSpec module_spec(file_spec);
+          if (m_uuid_option_group.GetOptionValue().OptionWasSet())
+            module_spec.GetUUID() =
+                m_uuid_option_group.GetOptionValue().GetCurrentValue();
+          if (m_symbol_file.GetOptionValue().OptionWasSet())
+            module_spec.GetSymbolFileSpec() =
+                m_symbol_file.GetOptionValue().GetCurrentValue();
+          if (!module_spec.GetArchitecture().IsValid())
+            module_spec.GetArchitecture() = target->GetArchitecture();
+          Status error;
+          ModuleSP module_sp(target->GetOrCreateModule(
+              module_spec, true /* notify */, &error));
+          if (!module_sp) {
+            const char *error_cstr = error.AsCString();
+            if (error_cstr)
+              result.AppendError(error_cstr);
+            else
+              result.AppendErrorWithFormat("unsupported module: %s",
+                                           entry.c_str());
             result.SetStatus(eReturnStatusFailed);
-            if (resolved_path != entry.ref) {
-              result.AppendErrorWithFormat(
-                  "invalid module path '%s' with resolved path '%s'\n",
-                  entry.ref.str().c_str(), resolved_path.c_str());
-              break;
-            }
-            result.AppendErrorWithFormat("invalid module path '%s'\n",
-                                         entry.c_str());
+            return false;
+          } else {
+            flush = true;
+          }
+          result.SetStatus(eReturnStatusSuccessFinishResult);
+        } else {
+          std::string resolved_path = file_spec.GetPath();
+          result.SetStatus(eReturnStatusFailed);
+          if (resolved_path != entry.ref()) {
+            result.AppendErrorWithFormat(
+                "invalid module path '%s' with resolved path '%s'\n",
+                entry.ref().str().c_str(), resolved_path.c_str());
             break;
           }
+          result.AppendErrorWithFormat("invalid module path '%s'\n",
+                                       entry.c_str());
+          break;
         }
       }
+    }
 
-      if (flush) {
-        ProcessSP process = target->GetProcessSP();
-        if (process)
-          process->Flush();
-      }
+    if (flush) {
+      ProcessSP process = target->GetProcessSP();
+      if (process)
+        process->Flush();
     }
 
     return result.Succeeded();
@@ -2679,11 +2611,12 @@
 public:
   CommandObjectTargetModulesLoad(CommandInterpreter &interpreter)
       : CommandObjectTargetModulesModuleAutoComplete(
-            interpreter, "target modules load", "Set the load addresses for "
-                                                "one or more sections in a "
-                                                "target module.",
+            interpreter, "target modules load",
+            "Set the load addresses for one or more sections in a target "
+            "module.",
             "target modules load [--file <module> --uuid <uuid>] <sect-name> "
-            "<address> [<sect-name> <address> ....]"),
+            "<address> [<sect-name> <address> ....]",
+            eCommandRequiresTarget),
         m_option_group(),
         m_file_option(LLDB_OPT_SET_1, false, "file", 'f', 0, eArgTypeName,
                       "Fullpath or basename for module to load.", ""),
@@ -2712,249 +2645,241 @@
 
 protected:
   bool DoExecute(Args &args, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
+    Target *target = &GetSelectedTarget();
     const bool load = m_load_option.GetOptionValue().GetCurrentValue();
     const bool set_pc = m_pc_option.GetOptionValue().GetCurrentValue();
-    if (target == nullptr) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    } else {
-      const size_t argc = args.GetArgumentCount();
-      ModuleSpec module_spec;
-      bool search_using_module_spec = false;
 
-      // Allow "load" option to work without --file or --uuid option.
-      if (load) {
-        if (!m_file_option.GetOptionValue().OptionWasSet() &&
-            !m_uuid_option_group.GetOptionValue().OptionWasSet()) {
-          ModuleList &module_list = target->GetImages();
-          if (module_list.GetSize() == 1) {
-            search_using_module_spec = true;
-            module_spec.GetFileSpec() =
-                module_list.GetModuleAtIndex(0)->GetFileSpec();
-          }
-        }
-      }
+    const size_t argc = args.GetArgumentCount();
+    ModuleSpec module_spec;
+    bool search_using_module_spec = false;
 
-      if (m_file_option.GetOptionValue().OptionWasSet()) {
-        search_using_module_spec = true;
-        const char *arg_cstr = m_file_option.GetOptionValue().GetCurrentValue();
-        const bool use_global_module_list = true;
-        ModuleList module_list;
-        const size_t num_matches = FindModulesByName(
-            target, arg_cstr, module_list, use_global_module_list);
-        if (num_matches == 1) {
+    // Allow "load" option to work without --file or --uuid option.
+    if (load) {
+      if (!m_file_option.GetOptionValue().OptionWasSet() &&
+          !m_uuid_option_group.GetOptionValue().OptionWasSet()) {
+        ModuleList &module_list = target->GetImages();
+        if (module_list.GetSize() == 1) {
+          search_using_module_spec = true;
           module_spec.GetFileSpec() =
               module_list.GetModuleAtIndex(0)->GetFileSpec();
-        } else if (num_matches > 1) {
-          search_using_module_spec = false;
-          result.AppendErrorWithFormat(
-              "more than 1 module matched by name '%s'\n", arg_cstr);
-          result.SetStatus(eReturnStatusFailed);
-        } else {
-          search_using_module_spec = false;
-          result.AppendErrorWithFormat("no object file for module '%s'\n",
-                                       arg_cstr);
-          result.SetStatus(eReturnStatusFailed);
         }
       }
+    }
 
-      if (m_uuid_option_group.GetOptionValue().OptionWasSet()) {
-        search_using_module_spec = true;
-        module_spec.GetUUID() =
-            m_uuid_option_group.GetOptionValue().GetCurrentValue();
+    if (m_file_option.GetOptionValue().OptionWasSet()) {
+      search_using_module_spec = true;
+      const char *arg_cstr = m_file_option.GetOptionValue().GetCurrentValue();
+      const bool use_global_module_list = true;
+      ModuleList module_list;
+      const size_t num_matches = FindModulesByName(
+          target, arg_cstr, module_list, use_global_module_list);
+      if (num_matches == 1) {
+        module_spec.GetFileSpec() =
+            module_list.GetModuleAtIndex(0)->GetFileSpec();
+      } else if (num_matches > 1) {
+        search_using_module_spec = false;
+        result.AppendErrorWithFormat(
+            "more than 1 module matched by name '%s'\n", arg_cstr);
+        result.SetStatus(eReturnStatusFailed);
+      } else {
+        search_using_module_spec = false;
+        result.AppendErrorWithFormat("no object file for module '%s'\n",
+                                     arg_cstr);
+        result.SetStatus(eReturnStatusFailed);
       }
+    }
 
-      if (search_using_module_spec) {
-        ModuleList matching_modules;
-        const size_t num_matches =
-            target->GetImages().FindModules(module_spec, matching_modules);
+    if (m_uuid_option_group.GetOptionValue().OptionWasSet()) {
+      search_using_module_spec = true;
+      module_spec.GetUUID() =
+          m_uuid_option_group.GetOptionValue().GetCurrentValue();
+    }
 
-        char path[PATH_MAX];
-        if (num_matches == 1) {
-          Module *module = matching_modules.GetModulePointerAtIndex(0);
-          if (module) {
-            ObjectFile *objfile = module->GetObjectFile();
-            if (objfile) {
-              SectionList *section_list = module->GetSectionList();
-              if (section_list) {
-                bool changed = false;
-                if (argc == 0) {
-                  if (m_slide_option.GetOptionValue().OptionWasSet()) {
-                    const addr_t slide =
-                        m_slide_option.GetOptionValue().GetCurrentValue();
-                    const bool slide_is_offset = true;
-                    module->SetLoadAddress(*target, slide, slide_is_offset,
-                                           changed);
-                  } else {
-                    result.AppendError("one or more section name + load "
-                                       "address pair must be specified");
-                    result.SetStatus(eReturnStatusFailed);
-                    return false;
-                  }
+    if (search_using_module_spec) {
+      ModuleList matching_modules;
+      target->GetImages().FindModules(module_spec, matching_modules);
+      const size_t num_matches = matching_modules.GetSize();
+
+      char path[PATH_MAX];
+      if (num_matches == 1) {
+        Module *module = matching_modules.GetModulePointerAtIndex(0);
+        if (module) {
+          ObjectFile *objfile = module->GetObjectFile();
+          if (objfile) {
+            SectionList *section_list = module->GetSectionList();
+            if (section_list) {
+              bool changed = false;
+              if (argc == 0) {
+                if (m_slide_option.GetOptionValue().OptionWasSet()) {
+                  const addr_t slide =
+                      m_slide_option.GetOptionValue().GetCurrentValue();
+                  const bool slide_is_offset = true;
+                  module->SetLoadAddress(*target, slide, slide_is_offset,
+                                         changed);
                 } else {
-                  if (m_slide_option.GetOptionValue().OptionWasSet()) {
-                    result.AppendError("The \"--slide <offset>\" option can't "
-                                       "be used in conjunction with setting "
-                                       "section load addresses.\n");
-                    result.SetStatus(eReturnStatusFailed);
-                    return false;
-                  }
+                  result.AppendError("one or more section name + load "
+                                     "address pair must be specified");
+                  result.SetStatus(eReturnStatusFailed);
+                  return false;
+                }
+              } else {
+                if (m_slide_option.GetOptionValue().OptionWasSet()) {
+                  result.AppendError("The \"--slide <offset>\" option can't "
+                                     "be used in conjunction with setting "
+                                     "section load addresses.\n");
+                  result.SetStatus(eReturnStatusFailed);
+                  return false;
+                }
 
-                  for (size_t i = 0; i < argc; i += 2) {
-                    const char *sect_name = args.GetArgumentAtIndex(i);
-                    const char *load_addr_cstr = args.GetArgumentAtIndex(i + 1);
-                    if (sect_name && load_addr_cstr) {
-                      ConstString const_sect_name(sect_name);
-                      bool success = false;
-                      addr_t load_addr = StringConvert::ToUInt64(
-                          load_addr_cstr, LLDB_INVALID_ADDRESS, 0, &success);
-                      if (success) {
-                        SectionSP section_sp(
-                            section_list->FindSectionByName(const_sect_name));
-                        if (section_sp) {
-                          if (section_sp->IsThreadSpecific()) {
-                            result.AppendErrorWithFormat(
-                                "thread specific sections are not yet "
-                                "supported (section '%s')\n",
-                                sect_name);
-                            result.SetStatus(eReturnStatusFailed);
-                            break;
-                          } else {
-                            if (target->GetSectionLoadList()
-                                    .SetSectionLoadAddress(section_sp,
-                                                           load_addr))
-                              changed = true;
-                            result.AppendMessageWithFormat(
-                                "section '%s' loaded at 0x%" PRIx64 "\n",
-                                sect_name, load_addr);
-                          }
-                        } else {
-                          result.AppendErrorWithFormat("no section found that "
-                                                       "matches the section "
-                                                       "name '%s'\n",
-                                                       sect_name);
+                for (size_t i = 0; i < argc; i += 2) {
+                  const char *sect_name = args.GetArgumentAtIndex(i);
+                  const char *load_addr_cstr = args.GetArgumentAtIndex(i + 1);
+                  if (sect_name && load_addr_cstr) {
+                    ConstString const_sect_name(sect_name);
+                    bool success = false;
+                    addr_t load_addr = StringConvert::ToUInt64(
+                        load_addr_cstr, LLDB_INVALID_ADDRESS, 0, &success);
+                    if (success) {
+                      SectionSP section_sp(
+                          section_list->FindSectionByName(const_sect_name));
+                      if (section_sp) {
+                        if (section_sp->IsThreadSpecific()) {
+                          result.AppendErrorWithFormat(
+                              "thread specific sections are not yet "
+                              "supported (section '%s')\n",
+                              sect_name);
                           result.SetStatus(eReturnStatusFailed);
                           break;
+                        } else {
+                          if (target->GetSectionLoadList()
+                                  .SetSectionLoadAddress(section_sp, load_addr))
+                            changed = true;
+                          result.AppendMessageWithFormat(
+                              "section '%s' loaded at 0x%" PRIx64 "\n",
+                              sect_name, load_addr);
                         }
                       } else {
-                        result.AppendErrorWithFormat(
-                            "invalid load address string '%s'\n",
-                            load_addr_cstr);
+                        result.AppendErrorWithFormat("no section found that "
+                                                     "matches the section "
+                                                     "name '%s'\n",
+                                                     sect_name);
                         result.SetStatus(eReturnStatusFailed);
                         break;
                       }
                     } else {
-                      if (sect_name)
-                        result.AppendError("section names must be followed by "
-                                           "a load address.\n");
-                      else
-                        result.AppendError("one or more section name + load "
-                                           "address pair must be specified.\n");
+                      result.AppendErrorWithFormat(
+                          "invalid load address string '%s'\n", load_addr_cstr);
                       result.SetStatus(eReturnStatusFailed);
                       break;
                     }
+                  } else {
+                    if (sect_name)
+                      result.AppendError("section names must be followed by "
+                                         "a load address.\n");
+                    else
+                      result.AppendError("one or more section name + load "
+                                         "address pair must be specified.\n");
+                    result.SetStatus(eReturnStatusFailed);
+                    break;
                   }
                 }
+              }
 
-                if (changed) {
-                  target->ModulesDidLoad(matching_modules);
-                  Process *process = m_exe_ctx.GetProcessPtr();
-                  if (process)
-                    process->Flush();
+              if (changed) {
+                target->ModulesDidLoad(matching_modules);
+                Process *process = m_exe_ctx.GetProcessPtr();
+                if (process)
+                  process->Flush();
+              }
+              if (load) {
+                ProcessSP process = target->CalculateProcess();
+                Address file_entry = objfile->GetEntryPointAddress();
+                if (!process) {
+                  result.AppendError("No process");
+                  return false;
                 }
-                if (load) {
-                  ProcessSP process = target->CalculateProcess();
-                  Address file_entry = objfile->GetEntryPointAddress();
-                  if (!process) {
-                    result.AppendError("No process");
-                    return false;
-                  }
-                  if (set_pc && !file_entry.IsValid()) {
-                    result.AppendError("No entry address in object file");
-                    return false;
-                  }
-                  std::vector<ObjectFile::LoadableData> loadables(
-                      objfile->GetLoadableData(*target));
-                  if (loadables.size() == 0) {
-                    result.AppendError("No loadable sections");
-                    return false;
-                  }
-                  Status error = process->WriteObjectFile(std::move(loadables));
-                  if (error.Fail()) {
-                    result.AppendError(error.AsCString());
-                    return false;
-                  }
-                  if (set_pc) {
-                    ThreadList &thread_list = process->GetThreadList();
-                    RegisterContextSP reg_context(
-                        thread_list.GetSelectedThread()->GetRegisterContext());
-                    addr_t file_entry_addr = file_entry.GetLoadAddress(target);
-                    if (!reg_context->SetPC(file_entry_addr)) {
-                      result.AppendErrorWithFormat("failed to set PC value to "
-                                                   "0x%" PRIx64 "\n",
-                                                   file_entry_addr);
-                      result.SetStatus(eReturnStatusFailed);
-                    }
+                if (set_pc && !file_entry.IsValid()) {
+                  result.AppendError("No entry address in object file");
+                  return false;
+                }
+                std::vector<ObjectFile::LoadableData> loadables(
+                    objfile->GetLoadableData(*target));
+                if (loadables.size() == 0) {
+                  result.AppendError("No loadable sections");
+                  return false;
+                }
+                Status error = process->WriteObjectFile(std::move(loadables));
+                if (error.Fail()) {
+                  result.AppendError(error.AsCString());
+                  return false;
+                }
+                if (set_pc) {
+                  ThreadList &thread_list = process->GetThreadList();
+                  RegisterContextSP reg_context(
+                      thread_list.GetSelectedThread()->GetRegisterContext());
+                  addr_t file_entry_addr = file_entry.GetLoadAddress(target);
+                  if (!reg_context->SetPC(file_entry_addr)) {
+                    result.AppendErrorWithFormat("failed to set PC value to "
+                                                 "0x%" PRIx64 "\n",
+                                                 file_entry_addr);
+                    result.SetStatus(eReturnStatusFailed);
                   }
                 }
-              } else {
-                module->GetFileSpec().GetPath(path, sizeof(path));
-                result.AppendErrorWithFormat(
-                    "no sections in object file '%s'\n", path);
-                result.SetStatus(eReturnStatusFailed);
               }
             } else {
               module->GetFileSpec().GetPath(path, sizeof(path));
-              result.AppendErrorWithFormat("no object file for module '%s'\n",
+              result.AppendErrorWithFormat("no sections in object file '%s'\n",
                                            path);
               result.SetStatus(eReturnStatusFailed);
             }
           } else {
-            FileSpec *module_spec_file = module_spec.GetFileSpecPtr();
-            if (module_spec_file) {
-              module_spec_file->GetPath(path, sizeof(path));
-              result.AppendErrorWithFormat("invalid module '%s'.\n", path);
-            } else
-              result.AppendError("no module spec");
+            module->GetFileSpec().GetPath(path, sizeof(path));
+            result.AppendErrorWithFormat("no object file for module '%s'\n",
+                                         path);
             result.SetStatus(eReturnStatusFailed);
           }
         } else {
-          std::string uuid_str;
-
-          if (module_spec.GetFileSpec())
-            module_spec.GetFileSpec().GetPath(path, sizeof(path));
-          else
-            path[0] = '\0';
-
-          if (module_spec.GetUUIDPtr())
-            uuid_str = module_spec.GetUUID().GetAsString();
-          if (num_matches > 1) {
-            result.AppendErrorWithFormat(
-                "multiple modules match%s%s%s%s:\n", path[0] ? " file=" : "",
-                path, !uuid_str.empty() ? " uuid=" : "", uuid_str.c_str());
-            for (size_t i = 0; i < num_matches; ++i) {
-              if (matching_modules.GetModulePointerAtIndex(i)
-                      ->GetFileSpec()
-                      .GetPath(path, sizeof(path)))
-                result.AppendMessageWithFormat("%s\n", path);
-            }
-          } else {
-            result.AppendErrorWithFormat(
-                "no modules were found  that match%s%s%s%s.\n",
-                path[0] ? " file=" : "", path,
-                !uuid_str.empty() ? " uuid=" : "", uuid_str.c_str());
-          }
+          FileSpec *module_spec_file = module_spec.GetFileSpecPtr();
+          if (module_spec_file) {
+            module_spec_file->GetPath(path, sizeof(path));
+            result.AppendErrorWithFormat("invalid module '%s'.\n", path);
+          } else
+            result.AppendError("no module spec");
           result.SetStatus(eReturnStatusFailed);
         }
       } else {
-        result.AppendError("either the \"--file <module>\" or the \"--uuid "
-                           "<uuid>\" option must be specified.\n");
+        std::string uuid_str;
+
+        if (module_spec.GetFileSpec())
+          module_spec.GetFileSpec().GetPath(path, sizeof(path));
+        else
+          path[0] = '\0';
+
+        if (module_spec.GetUUIDPtr())
+          uuid_str = module_spec.GetUUID().GetAsString();
+        if (num_matches > 1) {
+          result.AppendErrorWithFormat(
+              "multiple modules match%s%s%s%s:\n", path[0] ? " file=" : "",
+              path, !uuid_str.empty() ? " uuid=" : "", uuid_str.c_str());
+          for (size_t i = 0; i < num_matches; ++i) {
+            if (matching_modules.GetModulePointerAtIndex(i)
+                    ->GetFileSpec()
+                    .GetPath(path, sizeof(path)))
+              result.AppendMessageWithFormat("%s\n", path);
+          }
+        } else {
+          result.AppendErrorWithFormat(
+              "no modules were found  that match%s%s%s%s.\n",
+              path[0] ? " file=" : "", path, !uuid_str.empty() ? " uuid=" : "",
+              uuid_str.c_str());
+        }
         result.SetStatus(eReturnStatusFailed);
-        return false;
       }
+    } else {
+      result.AppendError("either the \"--file <module>\" or the \"--uuid "
+                         "<uuid>\" option must be specified.\n");
+      result.SetStatus(eReturnStatusFailed);
+      return false;
     }
     return result.Succeeded();
   }
@@ -2968,26 +2893,8 @@
 };
 
 // List images with associated information
-
-static constexpr OptionDefinition g_target_modules_list_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "address",        'a', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeAddressOrExpression, "Display the image at this address." },
-  { LLDB_OPT_SET_1, false, "arch",           'A', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeWidth,               "Display the architecture when listing images." },
-  { LLDB_OPT_SET_1, false, "triple",         't', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeWidth,               "Display the triple when listing images." },
-  { LLDB_OPT_SET_1, false, "header",         'h', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,                "Display the image base address as a load address if debugging, a file address otherwise." },
-  { LLDB_OPT_SET_1, false, "offset",         'o', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,                "Display the image load address offset from the base file address (the slide amount)." },
-  { LLDB_OPT_SET_1, false, "uuid",           'u', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,                "Display the UUID when listing images." },
-  { LLDB_OPT_SET_1, false, "fullpath",       'f', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeWidth,               "Display the fullpath to the image object file." },
-  { LLDB_OPT_SET_1, false, "directory",      'd', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeWidth,               "Display the directory with optional width for the image object file." },
-  { LLDB_OPT_SET_1, false, "basename",       'b', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeWidth,               "Display the basename with optional width for the image object file." },
-  { LLDB_OPT_SET_1, false, "symfile",        's', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeWidth,               "Display the fullpath to the image symbol file with optional width." },
-  { LLDB_OPT_SET_1, false, "symfile-unique", 'S', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeWidth,               "Display the symbol file with optional width only if it is different from the executable object file." },
-  { LLDB_OPT_SET_1, false, "mod-time",       'm', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeWidth,               "Display the modification time with optional width of the module." },
-  { LLDB_OPT_SET_1, false, "ref-count",      'r', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeWidth,               "Display the reference count if the module is still in the shared module cache." },
-  { LLDB_OPT_SET_1, false, "pointer",        'p', OptionParser::eOptionalArgument, nullptr, {}, 0, eArgTypeNone,                "Display the module pointer." },
-  { LLDB_OPT_SET_1, false, "global",         'g', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,                "Display the modules from the global module list, not just the current target." }
-    // clang-format on
-};
+#define LLDB_OPTIONS_target_modules_list
+#include "CommandOptions.inc"
 
 class CommandObjectTargetModulesList : public CommandObjectParsed {
 public:
@@ -3237,18 +3144,17 @@
             Address base_addr(objfile->GetBaseAddress());
             if (base_addr.IsValid()) {
               if (target && !target->GetSectionLoadList().IsEmpty()) {
-                lldb::addr_t load_addr =
-                    base_addr.GetLoadAddress(target);
+                lldb::addr_t load_addr = base_addr.GetLoadAddress(target);
                 if (load_addr == LLDB_INVALID_ADDRESS) {
                   base_addr.Dump(&strm, target,
-                                   Address::DumpStyleModuleWithFileAddress,
-                                   Address::DumpStyleFileAddress);
+                                 Address::DumpStyleModuleWithFileAddress,
+                                 Address::DumpStyleFileAddress);
                 } else {
                   if (format_char == 'o') {
                     // Show the offset of slide for the image
-                    strm.Printf(
-                        "0x%*.*" PRIx64, addr_nibble_width, addr_nibble_width,
-                        load_addr - base_addr.GetFileAddress());
+                    strm.Printf("0x%*.*" PRIx64, addr_nibble_width,
+                                addr_nibble_width,
+                                load_addr - base_addr.GetFileAddress());
                   } else {
                     // Show the load address of the image
                     strm.Printf("0x%*.*" PRIx64, addr_nibble_width,
@@ -3282,9 +3188,9 @@
 
       case 's':
       case 'S': {
-        const SymbolVendor *symbol_vendor = module->GetSymbolVendor();
-        if (symbol_vendor) {
-          const FileSpec symfile_spec = symbol_vendor->GetMainFileSpec();
+        if (const SymbolFile *symbol_file = module->GetSymbolFile()) {
+          const FileSpec symfile_spec =
+              symbol_file->GetObjectFile()->GetFileSpec();
           if (format_char == 'S') {
             // Dump symbol file only if different from module file
             if (!symfile_spec || symfile_spec == module->GetFileSpec()) {
@@ -3332,13 +3238,8 @@
 #pragma mark CommandObjectTargetModulesShowUnwind
 
 // Lookup unwind information in images
-
-static constexpr OptionDefinition g_target_modules_show_unwind_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1, false, "name",    'n', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFunctionName,        "Show unwind instructions for a function or symbol name." },
-  { LLDB_OPT_SET_2, false, "address", 'a', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeAddressOrExpression, "Show unwind instructions for a function or symbol containing an address" }
-    // clang-format on
-};
+#define LLDB_OPTIONS_target_modules_show_unwind
+#include "CommandOptions.inc"
 
 class CommandObjectTargetModulesShowUnwind : public CommandObjectParsed {
 public:
@@ -3383,8 +3284,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized option %c.", short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -3453,7 +3353,7 @@
     if (m_options.m_type == eLookupTypeFunctionOrSymbol) {
       ConstString function_name(m_options.m_str.c_str());
       target->GetImages().FindFunctions(function_name, eFunctionNameTypeAuto,
-                                        true, false, true, sc_list);
+                                        true, false, sc_list);
     } else if (m_options.m_type == eLookupTypeAddress && target) {
       Address addr;
       if (target->GetSectionLoadList().ResolveLoadAddress(m_options.m_addr,
@@ -3546,6 +3446,24 @@
         result.GetOutputStream().Printf("\n");
       }
 
+      UnwindPlanSP of_unwind_sp =
+          func_unwinders_sp->GetObjectFileUnwindPlan(*target);
+      if (of_unwind_sp) {
+        result.GetOutputStream().Printf("object file UnwindPlan:\n");
+        of_unwind_sp->Dump(result.GetOutputStream(), thread.get(),
+                           LLDB_INVALID_ADDRESS);
+        result.GetOutputStream().Printf("\n");
+      }
+
+      UnwindPlanSP of_unwind_augmented_sp =
+          func_unwinders_sp->GetObjectFileAugmentedUnwindPlan(*target, *thread);
+      if (of_unwind_augmented_sp) {
+        result.GetOutputStream().Printf("object file augmented UnwindPlan:\n");
+        of_unwind_augmented_sp->Dump(result.GetOutputStream(), thread.get(),
+                                     LLDB_INVALID_ADDRESS);
+        result.GetOutputStream().Printf("\n");
+      }
+
       UnwindPlanSP ehframe_sp =
           func_unwinders_sp->GetEHFrameUnwindPlan(*target);
       if (ehframe_sp) {
@@ -3643,24 +3561,8 @@
 };
 
 // Lookup information in images
-
-static constexpr OptionDefinition g_target_modules_lookup_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_1,                                  true,  "address",    'a', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeAddressOrExpression, "Lookup an address in one or more target modules." },
-  { LLDB_OPT_SET_1,                                  false, "offset",     'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOffset,              "When looking up an address subtract <offset> from any addresses before doing the lookup." },
-  /* FIXME: re-enable regex for types when the LookupTypeInModule actually uses the regex option: | LLDB_OPT_SET_6 */
-  { LLDB_OPT_SET_2 | LLDB_OPT_SET_4 | LLDB_OPT_SET_5, false, "regex",      'r', OptionParser::eNoArgument,      nullptr, {}, 0, eArgTypeNone,                "The <name> argument for name lookups are regular expressions." },
-  { LLDB_OPT_SET_2,                                  true,  "symbol",     's', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeSymbol,              "Lookup a symbol by name in the symbol tables in one or more target modules." },
-  { LLDB_OPT_SET_3,                                  true,  "file",       'f', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFilename,            "Lookup a file by fullpath or basename in one or more target modules." },
-  { LLDB_OPT_SET_3,                                  false, "line",       'l', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeLineNum,             "Lookup a line number in a file (must be used in conjunction with --file)." },
-  { LLDB_OPT_SET_FROM_TO(3,5),                       false, "no-inlines", 'i', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,                "Ignore inline entries (must be used in conjunction with --file or --function)." },
-  { LLDB_OPT_SET_4,                                  true,  "function",   'F', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFunctionName,        "Lookup a function by name in the debug symbols in one or more target modules." },
-  { LLDB_OPT_SET_5,                                  true,  "name",       'n', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeFunctionOrSymbol,    "Lookup a function or symbol by name in one or more target modules." },
-  { LLDB_OPT_SET_6,                                  true,  "type",       't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeName,                "Lookup a type by name in the debug symbols in one or more target modules." },
-  { LLDB_OPT_SET_ALL,                                false, "verbose",    'v', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,                "Enable verbose lookup information." },
-  { LLDB_OPT_SET_ALL,                                false, "all",        'A', OptionParser::eNoArgument,       nullptr, {}, 0, eArgTypeNone,                "Print all matches, not just the best match, if a best match is available." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_target_modules_lookup
+#include "CommandOptions.inc"
 
 class CommandObjectTargetModulesLookup : public CommandObjectParsed {
 public:
@@ -3749,6 +3651,8 @@
       case 'r':
         m_use_regex = true;
         break;
+      default:
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -3850,7 +3754,7 @@
       break;
     }
 
-    return true;
+    return false;
   }
 
   bool LookupInModule(CommandInterpreter &interpreter, Module *module,
@@ -3935,91 +3839,82 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target == nullptr) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    } else {
-      bool syntax_error = false;
-      uint32_t i;
-      uint32_t num_successful_lookups = 0;
-      uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
-      result.GetOutputStream().SetAddressByteSize(addr_byte_size);
-      result.GetErrorStream().SetAddressByteSize(addr_byte_size);
-      // Dump all sections for all modules images
+    Target *target = &GetSelectedTarget();
+    bool syntax_error = false;
+    uint32_t i;
+    uint32_t num_successful_lookups = 0;
+    uint32_t addr_byte_size = target->GetArchitecture().GetAddressByteSize();
+    result.GetOutputStream().SetAddressByteSize(addr_byte_size);
+    result.GetErrorStream().SetAddressByteSize(addr_byte_size);
+    // Dump all sections for all modules images
 
-      if (command.GetArgumentCount() == 0) {
-        ModuleSP current_module;
+    if (command.GetArgumentCount() == 0) {
+      ModuleSP current_module;
 
-        // Where it is possible to look in the current symbol context first,
-        // try that.  If this search was successful and --all was not passed,
-        // don't print anything else.
-        if (LookupHere(m_interpreter, result, syntax_error)) {
-          result.GetOutputStream().EOL();
-          num_successful_lookups++;
-          if (!m_options.m_print_all) {
-            result.SetStatus(eReturnStatusSuccessFinishResult);
-            return result.Succeeded();
-          }
-        }
-
-        // Dump all sections for all other modules
-
-        const ModuleList &target_modules = target->GetImages();
-        std::lock_guard<std::recursive_mutex> guard(target_modules.GetMutex());
-        const size_t num_modules = target_modules.GetSize();
-        if (num_modules > 0) {
-          for (i = 0; i < num_modules && !syntax_error; ++i) {
-            Module *module_pointer =
-                target_modules.GetModulePointerAtIndexUnlocked(i);
-
-            if (module_pointer != current_module.get() &&
-                LookupInModule(
-                    m_interpreter,
-                    target_modules.GetModulePointerAtIndexUnlocked(i), result,
-                    syntax_error)) {
-              result.GetOutputStream().EOL();
-              num_successful_lookups++;
-            }
-          }
-        } else {
-          result.AppendError("the target has no associated executable images");
-          result.SetStatus(eReturnStatusFailed);
-          return false;
-        }
-      } else {
-        // Dump specified images (by basename or fullpath)
-        const char *arg_cstr;
-        for (i = 0; (arg_cstr = command.GetArgumentAtIndex(i)) != nullptr &&
-                    !syntax_error;
-             ++i) {
-          ModuleList module_list;
-          const size_t num_matches =
-              FindModulesByName(target, arg_cstr, module_list, false);
-          if (num_matches > 0) {
-            for (size_t j = 0; j < num_matches; ++j) {
-              Module *module = module_list.GetModulePointerAtIndex(j);
-              if (module) {
-                if (LookupInModule(m_interpreter, module, result,
-                                   syntax_error)) {
-                  result.GetOutputStream().EOL();
-                  num_successful_lookups++;
-                }
-              }
-            }
-          } else
-            result.AppendWarningWithFormat(
-                "Unable to find an image that matches '%s'.\n", arg_cstr);
+      // Where it is possible to look in the current symbol context first,
+      // try that.  If this search was successful and --all was not passed,
+      // don't print anything else.
+      if (LookupHere(m_interpreter, result, syntax_error)) {
+        result.GetOutputStream().EOL();
+        num_successful_lookups++;
+        if (!m_options.m_print_all) {
+          result.SetStatus(eReturnStatusSuccessFinishResult);
+          return result.Succeeded();
         }
       }
 
-      if (num_successful_lookups > 0)
-        result.SetStatus(eReturnStatusSuccessFinishResult);
-      else
+      // Dump all sections for all other modules
+
+      const ModuleList &target_modules = target->GetImages();
+      std::lock_guard<std::recursive_mutex> guard(target_modules.GetMutex());
+      const size_t num_modules = target_modules.GetSize();
+      if (num_modules > 0) {
+        for (i = 0; i < num_modules && !syntax_error; ++i) {
+          Module *module_pointer =
+              target_modules.GetModulePointerAtIndexUnlocked(i);
+
+          if (module_pointer != current_module.get() &&
+              LookupInModule(m_interpreter,
+                             target_modules.GetModulePointerAtIndexUnlocked(i),
+                             result, syntax_error)) {
+            result.GetOutputStream().EOL();
+            num_successful_lookups++;
+          }
+        }
+      } else {
+        result.AppendError("the target has no associated executable images");
         result.SetStatus(eReturnStatusFailed);
+        return false;
+      }
+    } else {
+      // Dump specified images (by basename or fullpath)
+      const char *arg_cstr;
+      for (i = 0; (arg_cstr = command.GetArgumentAtIndex(i)) != nullptr &&
+                  !syntax_error;
+           ++i) {
+        ModuleList module_list;
+        const size_t num_matches =
+            FindModulesByName(target, arg_cstr, module_list, false);
+        if (num_matches > 0) {
+          for (size_t j = 0; j < num_matches; ++j) {
+            Module *module = module_list.GetModulePointerAtIndex(j);
+            if (module) {
+              if (LookupInModule(m_interpreter, module, result, syntax_error)) {
+                result.GetOutputStream().EOL();
+                num_successful_lookups++;
+              }
+            }
+          }
+        } else
+          result.AppendWarningWithFormat(
+              "Unable to find an image that matches '%s'.\n", arg_cstr);
+      }
     }
+
+    if (num_successful_lookups > 0)
+      result.SetStatus(eReturnStatusSuccessFinishResult);
+    else
+      result.SetStatus(eReturnStatusFailed);
     return result.Succeeded();
   }
 
@@ -4129,13 +4024,12 @@
 
   ~CommandObjectTargetSymbolsAdd() override = default;
 
-  int HandleArgumentCompletion(
-      CompletionRequest &request,
-      OptionElementVector &opt_element_vector) override {
+  void
+  HandleArgumentCompletion(CompletionRequest &request,
+                           OptionElementVector &opt_element_vector) override {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), CommandCompletions::eDiskFileCompletion,
         request, nullptr);
-    return request.GetNumberOfMatches();
   }
 
   Options *GetOptions() override { return &m_option_group; }
@@ -4144,170 +4038,165 @@
   bool AddModuleSymbols(Target *target, ModuleSpec &module_spec, bool &flush,
                         CommandReturnObject &result) {
     const FileSpec &symbol_fspec = module_spec.GetSymbolFileSpec();
-    if (symbol_fspec) {
-      char symfile_path[PATH_MAX];
-      symbol_fspec.GetPath(symfile_path, sizeof(symfile_path));
-
-      if (!module_spec.GetUUID().IsValid()) {
-        if (!module_spec.GetFileSpec() && !module_spec.GetPlatformFileSpec())
-          module_spec.GetFileSpec().GetFilename() = symbol_fspec.GetFilename();
-      }
-      // We now have a module that represents a symbol file that can be used
-      // for a module that might exist in the current target, so we need to
-      // find that module in the target
-      ModuleList matching_module_list;
-
-      size_t num_matches = 0;
-      // First extract all module specs from the symbol file
-      lldb_private::ModuleSpecList symfile_module_specs;
-      if (ObjectFile::GetModuleSpecifications(module_spec.GetSymbolFileSpec(),
-                                              0, 0, symfile_module_specs)) {
-        // Now extract the module spec that matches the target architecture
-        ModuleSpec target_arch_module_spec;
-        ModuleSpec symfile_module_spec;
-        target_arch_module_spec.GetArchitecture() = target->GetArchitecture();
-        if (symfile_module_specs.FindMatchingModuleSpec(target_arch_module_spec,
-                                                        symfile_module_spec)) {
-          // See if it has a UUID?
-          if (symfile_module_spec.GetUUID().IsValid()) {
-            // It has a UUID, look for this UUID in the target modules
-            ModuleSpec symfile_uuid_module_spec;
-            symfile_uuid_module_spec.GetUUID() = symfile_module_spec.GetUUID();
-            num_matches = target->GetImages().FindModules(
-                symfile_uuid_module_spec, matching_module_list);
-          }
-        }
-
-        if (num_matches == 0) {
-          // No matches yet, iterate through the module specs to find a UUID
-          // value that we can match up to an image in our target
-          const size_t num_symfile_module_specs =
-              symfile_module_specs.GetSize();
-          for (size_t i = 0; i < num_symfile_module_specs && num_matches == 0;
-               ++i) {
-            if (symfile_module_specs.GetModuleSpecAtIndex(
-                    i, symfile_module_spec)) {
-              if (symfile_module_spec.GetUUID().IsValid()) {
-                // It has a UUID, look for this UUID in the target modules
-                ModuleSpec symfile_uuid_module_spec;
-                symfile_uuid_module_spec.GetUUID() =
-                    symfile_module_spec.GetUUID();
-                num_matches = target->GetImages().FindModules(
-                    symfile_uuid_module_spec, matching_module_list);
-              }
-            }
-          }
-        }
-      }
-
-      // Just try to match up the file by basename if we have no matches at
-      // this point
-      if (num_matches == 0)
-        num_matches =
-            target->GetImages().FindModules(module_spec, matching_module_list);
-
-      while (num_matches == 0) {
-        ConstString filename_no_extension(
-            module_spec.GetFileSpec().GetFileNameStrippingExtension());
-        // Empty string returned, lets bail
-        if (!filename_no_extension)
-          break;
-
-        // Check if there was no extension to strip and the basename is the
-        // same
-        if (filename_no_extension == module_spec.GetFileSpec().GetFilename())
-          break;
-
-        // Replace basename with one less extension
-        module_spec.GetFileSpec().GetFilename() = filename_no_extension;
-
-        num_matches =
-            target->GetImages().FindModules(module_spec, matching_module_list);
-      }
-
-      if (num_matches > 1) {
-        result.AppendErrorWithFormat("multiple modules match symbol file '%s', "
-                                     "use the --uuid option to resolve the "
-                                     "ambiguity.\n",
-                                     symfile_path);
-      } else if (num_matches == 1) {
-        ModuleSP module_sp(matching_module_list.GetModuleAtIndex(0));
-
-        // The module has not yet created its symbol vendor, we can just give
-        // the existing target module the symfile path to use for when it
-        // decides to create it!
-        module_sp->SetSymbolFileFileSpec(symbol_fspec);
-
-        SymbolVendor *symbol_vendor =
-            module_sp->GetSymbolVendor(true, &result.GetErrorStream());
-        if (symbol_vendor) {
-          SymbolFile *symbol_file = symbol_vendor->GetSymbolFile();
-
-          if (symbol_file) {
-            ObjectFile *object_file = symbol_file->GetObjectFile();
-
-            if (object_file && object_file->GetFileSpec() == symbol_fspec) {
-              // Provide feedback that the symfile has been successfully added.
-              const FileSpec &module_fs = module_sp->GetFileSpec();
-              result.AppendMessageWithFormat(
-                  "symbol file '%s' has been added to '%s'\n", symfile_path,
-                  module_fs.GetPath().c_str());
-
-              // Let clients know something changed in the module if it is
-              // currently loaded
-              ModuleList module_list;
-              module_list.Append(module_sp);
-              target->SymbolsDidLoad(module_list);
-
-              // Make sure we load any scripting resources that may be embedded
-              // in the debug info files in case the platform supports that.
-              Status error;
-              StreamString feedback_stream;
-              module_sp->LoadScriptingResourceInTarget(target, error,
-                                                       &feedback_stream);
-              if (error.Fail() && error.AsCString())
-                result.AppendWarningWithFormat(
-                    "unable to load scripting data for module %s - error "
-                    "reported was %s",
-                    module_sp->GetFileSpec()
-                        .GetFileNameStrippingExtension()
-                        .GetCString(),
-                    error.AsCString());
-              else if (feedback_stream.GetSize())
-                result.AppendWarningWithFormat("%s", feedback_stream.GetData());
-
-              flush = true;
-              result.SetStatus(eReturnStatusSuccessFinishResult);
-              return true;
-            }
-          }
-        }
-        // Clear the symbol file spec if anything went wrong
-        module_sp->SetSymbolFileFileSpec(FileSpec());
-      }
-
-      namespace fs = llvm::sys::fs;
-      if (module_spec.GetUUID().IsValid()) {
-        StreamString ss_symfile_uuid;
-        module_spec.GetUUID().Dump(&ss_symfile_uuid);
-        result.AppendErrorWithFormat(
-            "symbol file '%s' (%s) does not match any existing module%s\n",
-            symfile_path, ss_symfile_uuid.GetData(),
-            !fs::is_regular_file(symbol_fspec.GetPath())
-                ? "\n       please specify the full path to the symbol file"
-                : "");
-      } else {
-        result.AppendErrorWithFormat(
-            "symbol file '%s' does not match any existing module%s\n",
-            symfile_path,
-            !fs::is_regular_file(symbol_fspec.GetPath())
-                ? "\n       please specify the full path to the symbol file"
-                : "");
-      }
-    } else {
+    if (!symbol_fspec) {
       result.AppendError(
           "one or more executable image paths must be specified");
+      result.SetStatus(eReturnStatusFailed);
+      return false;
     }
+
+    char symfile_path[PATH_MAX];
+    symbol_fspec.GetPath(symfile_path, sizeof(symfile_path));
+
+    if (!module_spec.GetUUID().IsValid()) {
+      if (!module_spec.GetFileSpec() && !module_spec.GetPlatformFileSpec())
+        module_spec.GetFileSpec().GetFilename() = symbol_fspec.GetFilename();
+    }
+
+    // We now have a module that represents a symbol file that can be used
+    // for a module that might exist in the current target, so we need to
+    // find that module in the target
+    ModuleList matching_module_list;
+
+    size_t num_matches = 0;
+    // First extract all module specs from the symbol file
+    lldb_private::ModuleSpecList symfile_module_specs;
+    if (ObjectFile::GetModuleSpecifications(module_spec.GetSymbolFileSpec(),
+                                            0, 0, symfile_module_specs)) {
+      // Now extract the module spec that matches the target architecture
+      ModuleSpec target_arch_module_spec;
+      ModuleSpec symfile_module_spec;
+      target_arch_module_spec.GetArchitecture() = target->GetArchitecture();
+      if (symfile_module_specs.FindMatchingModuleSpec(target_arch_module_spec,
+                                                      symfile_module_spec)) {
+        // See if it has a UUID?
+        if (symfile_module_spec.GetUUID().IsValid()) {
+          // It has a UUID, look for this UUID in the target modules
+          ModuleSpec symfile_uuid_module_spec;
+          symfile_uuid_module_spec.GetUUID() = symfile_module_spec.GetUUID();
+          target->GetImages().FindModules(symfile_uuid_module_spec,
+                                          matching_module_list);
+          num_matches = matching_module_list.GetSize();
+        }
+      }
+
+      if (num_matches == 0) {
+        // No matches yet, iterate through the module specs to find a UUID
+        // value that we can match up to an image in our target
+        const size_t num_symfile_module_specs =
+            symfile_module_specs.GetSize();
+        for (size_t i = 0; i < num_symfile_module_specs && num_matches == 0;
+              ++i) {
+          if (symfile_module_specs.GetModuleSpecAtIndex(
+                  i, symfile_module_spec)) {
+            if (symfile_module_spec.GetUUID().IsValid()) {
+              // It has a UUID, look for this UUID in the target modules
+              ModuleSpec symfile_uuid_module_spec;
+              symfile_uuid_module_spec.GetUUID() =
+                  symfile_module_spec.GetUUID();
+              target->GetImages().FindModules(symfile_uuid_module_spec,
+                                              matching_module_list);
+              num_matches = matching_module_list.GetSize();
+            }
+          }
+        }
+      }
+    }
+
+    // Just try to match up the file by basename if we have no matches at
+    // this point
+    if (num_matches == 0) {
+      target->GetImages().FindModules(module_spec, matching_module_list);
+      num_matches = matching_module_list.GetSize();
+    }
+
+    while (num_matches == 0) {
+      ConstString filename_no_extension(
+          module_spec.GetFileSpec().GetFileNameStrippingExtension());
+      // Empty string returned, let's bail
+      if (!filename_no_extension)
+        break;
+
+      // Check if there was no extension to strip and the basename is the same
+      if (filename_no_extension == module_spec.GetFileSpec().GetFilename())
+        break;
+
+      // Replace basename with one fewer extension
+      module_spec.GetFileSpec().GetFilename() = filename_no_extension;
+      target->GetImages().FindModules(module_spec, matching_module_list);
+      num_matches = matching_module_list.GetSize();
+    }
+
+    if (num_matches > 1) {
+      result.AppendErrorWithFormat("multiple modules match symbol file '%s', "
+                                   "use the --uuid option to resolve the "
+                                   "ambiguity.\n",
+                                   symfile_path);
+    } else if (num_matches == 1) {
+      ModuleSP module_sp(matching_module_list.GetModuleAtIndex(0));
+
+      // The module has not yet created its symbol vendor, we can just give
+      // the existing target module the symfile path to use for when it
+      // decides to create it!
+      module_sp->SetSymbolFileFileSpec(symbol_fspec);
+
+      SymbolFile *symbol_file =
+          module_sp->GetSymbolFile(true, &result.GetErrorStream());
+      if (symbol_file) {
+        ObjectFile *object_file = symbol_file->GetObjectFile();
+
+        if (object_file && object_file->GetFileSpec() == symbol_fspec) {
+          // Provide feedback that the symfile has been successfully added.
+          const FileSpec &module_fs = module_sp->GetFileSpec();
+          result.AppendMessageWithFormat(
+              "symbol file '%s' has been added to '%s'\n", symfile_path,
+              module_fs.GetPath().c_str());
+
+          // Let clients know something changed in the module if it is
+          // currently loaded
+          ModuleList module_list;
+          module_list.Append(module_sp);
+          target->SymbolsDidLoad(module_list);
+
+          // Make sure we load any scripting resources that may be embedded
+          // in the debug info files in case the platform supports that.
+          Status error;
+          StreamString feedback_stream;
+          module_sp->LoadScriptingResourceInTarget(target, error,
+                                                    &feedback_stream);
+          if (error.Fail() && error.AsCString())
+            result.AppendWarningWithFormat(
+                "unable to load scripting data for module %s - error "
+                "reported was %s",
+                module_sp->GetFileSpec()
+                    .GetFileNameStrippingExtension()
+                    .GetCString(),
+                error.AsCString());
+          else if (feedback_stream.GetSize())
+            result.AppendWarningWithFormat("%s", feedback_stream.GetData());
+
+          flush = true;
+          result.SetStatus(eReturnStatusSuccessFinishResult);
+          return true;
+        }
+      }
+      // Clear the symbol file spec if anything went wrong
+      module_sp->SetSymbolFileFileSpec(FileSpec());
+    }
+
+    namespace fs = llvm::sys::fs;
+    StreamString ss_symfile_uuid;
+    if (module_spec.GetUUID().IsValid()) {
+      ss_symfile_uuid << " (";
+      module_spec.GetUUID().Dump(&ss_symfile_uuid);
+      ss_symfile_uuid << ')';
+    }
+    result.AppendErrorWithFormat(
+        "symbol file '%s'%s does not match any existing module%s\n",
+        symfile_path, ss_symfile_uuid.GetData(),
+        !fs::is_regular_file(symbol_fspec.GetPath())
+            ? "\n       please specify the full path to the symbol file"
+            : "");
     result.SetStatus(eReturnStatusFailed);
     return false;
   }
@@ -4430,9 +4319,9 @@
         PlatformSP platform_sp(target->GetPlatform());
 
         for (auto &entry : args.entries()) {
-          if (!entry.ref.empty()) {
+          if (!entry.ref().empty()) {
             auto &symbol_file_spec = module_spec.GetSymbolFileSpec();
-            symbol_file_spec.SetFile(entry.ref, FileSpec::Style::native);
+            symbol_file_spec.SetFile(entry.ref(), FileSpec::Style::native);
             FileSystem::Instance().Resolve(symbol_file_spec);
             if (file_option_set) {
               module_spec.GetFileSpec() =
@@ -4456,7 +4345,7 @@
             } else {
               std::string resolved_symfile_path =
                   module_spec.GetSymbolFileSpec().GetPath();
-              if (resolved_symfile_path != entry.ref) {
+              if (resolved_symfile_path != entry.ref()) {
                 result.AppendErrorWithFormat(
                     "invalid module path '%s' with resolved path '%s'\n",
                     entry.c_str(), resolved_symfile_path.c_str());
@@ -4511,23 +4400,8 @@
 #pragma mark CommandObjectTargetStopHookAdd
 
 // CommandObjectTargetStopHookAdd
-
-static constexpr OptionDefinition g_target_stop_hook_add_options[] = {
-    // clang-format off
-  { LLDB_OPT_SET_ALL, false, "one-liner",    'o', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeOneLiner,                                         "Add a command for the stop hook.  Can be specified more than once, and commands will be run in the order they appear." },
-  { LLDB_OPT_SET_ALL, false, "shlib",        's', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eModuleCompletion, eArgTypeShlibName,    "Set the module within which the stop-hook is to be run." },
-  { LLDB_OPT_SET_ALL, false, "thread-index", 'x', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadIndex,                                      "The stop hook is run only for the thread whose index matches this argument." },
-  { LLDB_OPT_SET_ALL, false, "thread-id",    't', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadID,                                         "The stop hook is run only for the thread whose TID matches this argument." },
-  { LLDB_OPT_SET_ALL, false, "thread-name",  'T', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeThreadName,                                       "The stop hook is run only for the thread whose thread name matches this argument." },
-  { LLDB_OPT_SET_ALL, false, "queue-name",   'q', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeQueueName,                                        "The stop hook is run only for threads in the queue whose name is given by this argument." },
-  { LLDB_OPT_SET_1,   false, "file",         'f', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSourceFileCompletion, eArgTypeFilename, "Specify the source file within which the stop-hook is to be run." },
-  { LLDB_OPT_SET_1,   false, "start-line",   'l', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeLineNum,                                          "Set the start of the line range for which the stop-hook is to be run." },
-  { LLDB_OPT_SET_1,   false, "end-line",     'e', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeLineNum,                                          "Set the end of the line range for which the stop-hook is to be run." },
-  { LLDB_OPT_SET_2,   false, "classname",    'c', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeClassName,                                        "Specify the class within which the stop-hook is to be run." },
-  { LLDB_OPT_SET_3,   false, "name",         'n', OptionParser::eRequiredArgument, nullptr, {}, CommandCompletions::eSymbolCompletion, eArgTypeFunctionName, "Set the function name within which the stop hook will be run." },
-  { LLDB_OPT_SET_ALL, false, "auto-continue",'G', OptionParser::eRequiredArgument, nullptr, {}, 0, eArgTypeBoolean,     "The breakpoint will auto-continue after running its commands." },
-    // clang-format on
-};
+#define LLDB_OPTIONS_target_stop_hook_add
+#include "CommandOptions.inc"
 
 class CommandObjectTargetStopHookAdd : public CommandObjectParsed,
                                        public IOHandlerDelegateMultiline {
@@ -4575,8 +4449,7 @@
           error.SetErrorStringWithFormat(
               "invalid boolean value '%s' passed for -G option",
               option_arg.str().c_str());
-      }
-      break;
+      } break;
       case 'l':
         if (option_arg.getAsInteger(0, m_line_start)) {
           error.SetErrorStringWithFormat("invalid start line number: \"%s\"",
@@ -4636,8 +4509,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("unrecognized option %c.", short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -4698,7 +4570,7 @@
 
 protected:
   void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
-    StreamFileSP output_sp(io_handler.GetOutputStreamFile());
+    StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
     if (output_sp && interactive) {
       output_sp->PutCString(
           "Enter your stop hook command(s).  Type 'DONE' to end.\n");
@@ -4710,7 +4582,7 @@
                               std::string &line) override {
     if (m_stop_hook_sp) {
       if (line.empty()) {
-        StreamFileSP error_sp(io_handler.GetErrorStreamFile());
+        StreamFileSP error_sp(io_handler.GetErrorStreamFileSP());
         if (error_sp) {
           error_sp->Printf("error: stop hook #%" PRIu64
                            " aborted, no commands.\n",
@@ -4722,7 +4594,7 @@
           target->RemoveStopHookByID(m_stop_hook_sp->GetID());
       } else {
         m_stop_hook_sp->GetCommandPointer()->SplitIntoLines(line);
-        StreamFileSP output_sp(io_handler.GetOutputStreamFile());
+        StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
         if (output_sp) {
           output_sp->Printf("Stop hook #%" PRIu64 " added.\n",
                             m_stop_hook_sp->GetID());
@@ -4737,99 +4609,88 @@
   bool DoExecute(Args &command, CommandReturnObject &result) override {
     m_stop_hook_sp.reset();
 
-    Target *target = GetSelectedOrDummyTarget();
-    if (target) {
-      Target::StopHookSP new_hook_sp = target->CreateStopHook();
+    Target &target = GetSelectedOrDummyTarget();
+    Target::StopHookSP new_hook_sp = target.CreateStopHook();
 
-      //  First step, make the specifier.
-      std::unique_ptr<SymbolContextSpecifier> specifier_up;
-      if (m_options.m_sym_ctx_specified) {
-        specifier_up.reset(
-            new SymbolContextSpecifier(GetDebugger().GetSelectedTarget()));
+    //  First step, make the specifier.
+    std::unique_ptr<SymbolContextSpecifier> specifier_up;
+    if (m_options.m_sym_ctx_specified) {
+      specifier_up.reset(
+          new SymbolContextSpecifier(GetDebugger().GetSelectedTarget()));
 
-        if (!m_options.m_module_name.empty()) {
-          specifier_up->AddSpecification(
-              m_options.m_module_name.c_str(),
-              SymbolContextSpecifier::eModuleSpecified);
-        }
-
-        if (!m_options.m_class_name.empty()) {
-          specifier_up->AddSpecification(
-              m_options.m_class_name.c_str(),
-              SymbolContextSpecifier::eClassOrNamespaceSpecified);
-        }
-
-        if (!m_options.m_file_name.empty()) {
-          specifier_up->AddSpecification(
-              m_options.m_file_name.c_str(),
-              SymbolContextSpecifier::eFileSpecified);
-        }
-
-        if (m_options.m_line_start != 0) {
-          specifier_up->AddLineSpecification(
-              m_options.m_line_start,
-              SymbolContextSpecifier::eLineStartSpecified);
-        }
-
-        if (m_options.m_line_end != UINT_MAX) {
-          specifier_up->AddLineSpecification(
-              m_options.m_line_end, SymbolContextSpecifier::eLineEndSpecified);
-        }
-
-        if (!m_options.m_function_name.empty()) {
-          specifier_up->AddSpecification(
-              m_options.m_function_name.c_str(),
-              SymbolContextSpecifier::eFunctionSpecified);
-        }
+      if (!m_options.m_module_name.empty()) {
+        specifier_up->AddSpecification(
+            m_options.m_module_name.c_str(),
+            SymbolContextSpecifier::eModuleSpecified);
       }
 
-      if (specifier_up)
-        new_hook_sp->SetSpecifier(specifier_up.release());
-
-      // Next see if any of the thread options have been entered:
-
-      if (m_options.m_thread_specified) {
-        ThreadSpec *thread_spec = new ThreadSpec();
-
-        if (m_options.m_thread_id != LLDB_INVALID_THREAD_ID) {
-          thread_spec->SetTID(m_options.m_thread_id);
-        }
-
-        if (m_options.m_thread_index != UINT32_MAX)
-          thread_spec->SetIndex(m_options.m_thread_index);
-
-        if (!m_options.m_thread_name.empty())
-          thread_spec->SetName(m_options.m_thread_name.c_str());
-
-        if (!m_options.m_queue_name.empty())
-          thread_spec->SetQueueName(m_options.m_queue_name.c_str());
-
-        new_hook_sp->SetThreadSpecifier(thread_spec);
+      if (!m_options.m_class_name.empty()) {
+        specifier_up->AddSpecification(
+            m_options.m_class_name.c_str(),
+            SymbolContextSpecifier::eClassOrNamespaceSpecified);
       }
-      
-      new_hook_sp->SetAutoContinue(m_options.m_auto_continue);
-      if (m_options.m_use_one_liner) {
-        // Use one-liners.
-        for (auto cmd : m_options.m_one_liner)
-          new_hook_sp->GetCommandPointer()->AppendString(
-            cmd.c_str());
-        result.AppendMessageWithFormat("Stop hook #%" PRIu64 " added.\n",
-                                       new_hook_sp->GetID());
-      } else {
-        m_stop_hook_sp = new_hook_sp;
-        m_interpreter.GetLLDBCommandsFromIOHandler(
-            "> ",     // Prompt
-            *this,    // IOHandlerDelegate
-            true,     // Run IOHandler in async mode
-            nullptr); // Baton for the "io_handler" that will be passed back
-                      // into our IOHandlerDelegate functions
+
+      if (!m_options.m_file_name.empty()) {
+        specifier_up->AddSpecification(m_options.m_file_name.c_str(),
+                                       SymbolContextSpecifier::eFileSpecified);
       }
-      result.SetStatus(eReturnStatusSuccessFinishNoResult);
-    } else {
-      result.AppendError("invalid target\n");
-      result.SetStatus(eReturnStatusFailed);
+
+      if (m_options.m_line_start != 0) {
+        specifier_up->AddLineSpecification(
+            m_options.m_line_start,
+            SymbolContextSpecifier::eLineStartSpecified);
+      }
+
+      if (m_options.m_line_end != UINT_MAX) {
+        specifier_up->AddLineSpecification(
+            m_options.m_line_end, SymbolContextSpecifier::eLineEndSpecified);
+      }
+
+      if (!m_options.m_function_name.empty()) {
+        specifier_up->AddSpecification(
+            m_options.m_function_name.c_str(),
+            SymbolContextSpecifier::eFunctionSpecified);
+      }
     }
 
+    if (specifier_up)
+      new_hook_sp->SetSpecifier(specifier_up.release());
+
+    // Next see if any of the thread options have been entered:
+
+    if (m_options.m_thread_specified) {
+      ThreadSpec *thread_spec = new ThreadSpec();
+
+      if (m_options.m_thread_id != LLDB_INVALID_THREAD_ID) {
+        thread_spec->SetTID(m_options.m_thread_id);
+      }
+
+      if (m_options.m_thread_index != UINT32_MAX)
+        thread_spec->SetIndex(m_options.m_thread_index);
+
+      if (!m_options.m_thread_name.empty())
+        thread_spec->SetName(m_options.m_thread_name.c_str());
+
+      if (!m_options.m_queue_name.empty())
+        thread_spec->SetQueueName(m_options.m_queue_name.c_str());
+
+      new_hook_sp->SetThreadSpecifier(thread_spec);
+    }
+
+    new_hook_sp->SetAutoContinue(m_options.m_auto_continue);
+    if (m_options.m_use_one_liner) {
+      // Use one-liners.
+      for (auto cmd : m_options.m_one_liner)
+        new_hook_sp->GetCommandPointer()->AppendString(cmd.c_str());
+      result.AppendMessageWithFormat("Stop hook #%" PRIu64 " added.\n",
+                                     new_hook_sp->GetID());
+    } else {
+      m_stop_hook_sp = new_hook_sp;
+      m_interpreter.GetLLDBCommandsFromIOHandler("> ",   // Prompt
+                                                 *this); // IOHandlerDelegate
+    }
+    result.SetStatus(eReturnStatusSuccessFinishNoResult);
+
     return result.Succeeded();
   }
 
@@ -4853,43 +4714,37 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
-    if (target) {
-      // FIXME: see if we can use the breakpoint id style parser?
-      size_t num_args = command.GetArgumentCount();
-      if (num_args == 0) {
-        if (!m_interpreter.Confirm("Delete all stop hooks?", true)) {
+    Target &target = GetSelectedOrDummyTarget();
+    // FIXME: see if we can use the breakpoint id style parser?
+    size_t num_args = command.GetArgumentCount();
+    if (num_args == 0) {
+      if (!m_interpreter.Confirm("Delete all stop hooks?", true)) {
+        result.SetStatus(eReturnStatusFailed);
+        return false;
+      } else {
+        target.RemoveAllStopHooks();
+      }
+    } else {
+      bool success;
+      for (size_t i = 0; i < num_args; i++) {
+        lldb::user_id_t user_id = StringConvert::ToUInt32(
+            command.GetArgumentAtIndex(i), 0, 0, &success);
+        if (!success) {
+          result.AppendErrorWithFormat("invalid stop hook id: \"%s\".\n",
+                                       command.GetArgumentAtIndex(i));
           result.SetStatus(eReturnStatusFailed);
           return false;
-        } else {
-          target->RemoveAllStopHooks();
         }
-      } else {
-        bool success;
-        for (size_t i = 0; i < num_args; i++) {
-          lldb::user_id_t user_id = StringConvert::ToUInt32(
-              command.GetArgumentAtIndex(i), 0, 0, &success);
-          if (!success) {
-            result.AppendErrorWithFormat("invalid stop hook id: \"%s\".\n",
-                                         command.GetArgumentAtIndex(i));
-            result.SetStatus(eReturnStatusFailed);
-            return false;
-          }
-          success = target->RemoveStopHookByID(user_id);
-          if (!success) {
-            result.AppendErrorWithFormat("unknown stop hook id: \"%s\".\n",
-                                         command.GetArgumentAtIndex(i));
-            result.SetStatus(eReturnStatusFailed);
-            return false;
-          }
+        success = target.RemoveStopHookByID(user_id);
+        if (!success) {
+          result.AppendErrorWithFormat("unknown stop hook id: \"%s\".\n",
+                                       command.GetArgumentAtIndex(i));
+          result.SetStatus(eReturnStatusFailed);
+          return false;
         }
       }
-      result.SetStatus(eReturnStatusSuccessFinishNoResult);
-    } else {
-      result.AppendError("invalid target\n");
-      result.SetStatus(eReturnStatusFailed);
     }
-
+    result.SetStatus(eReturnStatusSuccessFinishNoResult);
     return result.Succeeded();
   }
 };
@@ -4910,38 +4765,33 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
-    if (target) {
-      // FIXME: see if we can use the breakpoint id style parser?
-      size_t num_args = command.GetArgumentCount();
-      bool success;
+    Target &target = GetSelectedOrDummyTarget();
+    // FIXME: see if we can use the breakpoint id style parser?
+    size_t num_args = command.GetArgumentCount();
+    bool success;
 
-      if (num_args == 0) {
-        target->SetAllStopHooksActiveState(m_enable);
-      } else {
-        for (size_t i = 0; i < num_args; i++) {
-          lldb::user_id_t user_id = StringConvert::ToUInt32(
-              command.GetArgumentAtIndex(i), 0, 0, &success);
-          if (!success) {
-            result.AppendErrorWithFormat("invalid stop hook id: \"%s\".\n",
-                                         command.GetArgumentAtIndex(i));
-            result.SetStatus(eReturnStatusFailed);
-            return false;
-          }
-          success = target->SetStopHookActiveStateByID(user_id, m_enable);
-          if (!success) {
-            result.AppendErrorWithFormat("unknown stop hook id: \"%s\".\n",
-                                         command.GetArgumentAtIndex(i));
-            result.SetStatus(eReturnStatusFailed);
-            return false;
-          }
+    if (num_args == 0) {
+      target.SetAllStopHooksActiveState(m_enable);
+    } else {
+      for (size_t i = 0; i < num_args; i++) {
+        lldb::user_id_t user_id = StringConvert::ToUInt32(
+            command.GetArgumentAtIndex(i), 0, 0, &success);
+        if (!success) {
+          result.AppendErrorWithFormat("invalid stop hook id: \"%s\".\n",
+                                       command.GetArgumentAtIndex(i));
+          result.SetStatus(eReturnStatusFailed);
+          return false;
+        }
+        success = target.SetStopHookActiveStateByID(user_id, m_enable);
+        if (!success) {
+          result.AppendErrorWithFormat("unknown stop hook id: \"%s\".\n",
+                                       command.GetArgumentAtIndex(i));
+          result.SetStatus(eReturnStatusFailed);
+          return false;
         }
       }
-      result.SetStatus(eReturnStatusSuccessFinishNoResult);
-    } else {
-      result.AppendError("invalid target\n");
-      result.SetStatus(eReturnStatusFailed);
     }
+    result.SetStatus(eReturnStatusSuccessFinishNoResult);
     return result.Succeeded();
   }
 
@@ -4964,19 +4814,14 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetSelectedOrDummyTarget();
-    if (!target) {
-      result.AppendError("invalid target\n");
-      result.SetStatus(eReturnStatusFailed);
-      return result.Succeeded();
-    }
+    Target &target = GetSelectedOrDummyTarget();
 
-    size_t num_hooks = target->GetNumStopHooks();
+    size_t num_hooks = target.GetNumStopHooks();
     if (num_hooks == 0) {
       result.GetOutputStream().PutCString("No stop hooks.\n");
     } else {
       for (size_t i = 0; i < num_hooks; i++) {
-        Target::StopHookSP this_hook = target->GetStopHookAtIndex(i);
+        Target::StopHookSP this_hook = target.GetStopHookAtIndex(i);
         if (i > 0)
           result.GetOutputStream().PutCString("\n");
         this_hook->GetDescription(&(result.GetOutputStream()),
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectTarget.h b/src/llvm-project/lldb/source/Commands/CommandObjectTarget.h
index 86d554c..bf1dae6 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectTarget.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectTarget.h
@@ -10,7 +10,6 @@
 #define liblldb_CommandObjectTarget_h_
 
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Interpreter/Options.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectThread.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectThread.cpp
index ed7cf0a..83c7cb5 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectThread.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectThread.cpp
@@ -8,14 +8,13 @@
 
 #include "CommandObjectThread.h"
 
-#include "lldb/Core/SourceManager.h"
 #include "lldb/Core/ValueObject.h"
-#include "lldb/Host/Host.h"
 #include "lldb/Host/OptionParser.h"
 #include "lldb/Host/StringConvert.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
+#include "lldb/Interpreter/OptionGroupPythonClassWithDict.h"
 #include "lldb/Interpreter/Options.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/Function.h"
@@ -28,11 +27,7 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlan.h"
 #include "lldb/Target/ThreadPlanStepInRange.h"
-#include "lldb/Target/ThreadPlanStepInstruction.h"
-#include "lldb/Target/ThreadPlanStepOut.h"
-#include "lldb/Target/ThreadPlanStepRange.h"
 #include "lldb/Utility/State.h"
-#include "lldb/lldb-private.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -237,11 +232,8 @@
 };
 
 // CommandObjectThreadBacktrace
-
-static constexpr OptionDefinition g_thread_backtrace_options[] = {
 #define LLDB_OPTIONS_thread_backtrace
 #include "CommandOptions.inc"
-};
 
 class CommandObjectThreadBacktrace : public CommandObjectIterateOverThreads {
 public:
@@ -284,9 +276,7 @@
               "invalid boolean value for option '%c'", short_option);
       } break;
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -343,8 +333,7 @@
           const bool stop_format = false;
           if (ext_thread_sp->GetStatus(strm, m_options.m_start,
                                        m_options.m_count,
-                                       num_frames_with_source,
-                                       stop_format)) {
+                                       num_frames_with_source, stop_format)) {
             DoExtendedBacktrace(ext_thread_sp.get(), result);
           }
         }
@@ -397,141 +386,129 @@
     {eOnlyThisThread, "this-thread", "Run only this thread"},
     {eAllThreads, "all-threads", "Run all threads"},
     {eOnlyDuringStepping, "while-stepping",
-     "Run only this thread while stepping"} };
+     "Run only this thread while stepping"}};
 
 static constexpr OptionEnumValues TriRunningModes() {
   return OptionEnumValues(g_tri_running_mode);
 }
 
-static constexpr OptionDefinition g_thread_step_scope_options[] = {
 #define LLDB_OPTIONS_thread_step_scope
 #include "CommandOptions.inc"
+
+class ThreadStepScopeOptionGroup : public OptionGroup {
+public:
+  ThreadStepScopeOptionGroup() : OptionGroup() {
+    // Keep default values of all options in one place: OptionParsingStarting
+    // ()
+    OptionParsingStarting(nullptr);
+  }
+
+  ~ThreadStepScopeOptionGroup() override = default;
+
+  llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
+    return llvm::makeArrayRef(g_thread_step_scope_options);
+  }
+
+  Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+                        ExecutionContext *execution_context) override {
+    Status error;
+    const int short_option =
+        g_thread_step_scope_options[option_idx].short_option;
+
+    switch (short_option) {
+    case 'a': {
+      bool success;
+      bool avoid_no_debug =
+          OptionArgParser::ToBoolean(option_arg, true, &success);
+      if (!success)
+        error.SetErrorStringWithFormat("invalid boolean value for option '%c'",
+                                       short_option);
+      else {
+        m_step_in_avoid_no_debug = avoid_no_debug ? eLazyBoolYes : eLazyBoolNo;
+      }
+    } break;
+
+    case 'A': {
+      bool success;
+      bool avoid_no_debug =
+          OptionArgParser::ToBoolean(option_arg, true, &success);
+      if (!success)
+        error.SetErrorStringWithFormat("invalid boolean value for option '%c'",
+                                       short_option);
+      else {
+        m_step_out_avoid_no_debug = avoid_no_debug ? eLazyBoolYes : eLazyBoolNo;
+      }
+    } break;
+
+    case 'c':
+      if (option_arg.getAsInteger(0, m_step_count))
+        error.SetErrorStringWithFormat("invalid step count '%s'",
+                                       option_arg.str().c_str());
+      break;
+
+    case 'm': {
+      auto enum_values = GetDefinitions()[option_idx].enum_values;
+      m_run_mode = (lldb::RunMode)OptionArgParser::ToOptionEnum(
+          option_arg, enum_values, eOnlyDuringStepping, error);
+    } break;
+
+    case 'e':
+      if (option_arg == "block") {
+        m_end_line_is_block_end = true;
+        break;
+      }
+      if (option_arg.getAsInteger(0, m_end_line))
+        error.SetErrorStringWithFormat("invalid end line number '%s'",
+                                       option_arg.str().c_str());
+      break;
+
+    case 'r':
+      m_avoid_regexp.clear();
+      m_avoid_regexp.assign(option_arg);
+      break;
+
+    case 't':
+      m_step_in_target.clear();
+      m_step_in_target.assign(option_arg);
+      break;
+
+    default:
+      llvm_unreachable("Unimplemented option");
+    }
+    return error;
+  }
+
+  void OptionParsingStarting(ExecutionContext *execution_context) override {
+    m_step_in_avoid_no_debug = eLazyBoolCalculate;
+    m_step_out_avoid_no_debug = eLazyBoolCalculate;
+    m_run_mode = eOnlyDuringStepping;
+
+    // Check if we are in Non-Stop mode
+    TargetSP target_sp =
+        execution_context ? execution_context->GetTargetSP() : TargetSP();
+    if (target_sp && target_sp->GetNonStopModeEnabled())
+      m_run_mode = eOnlyThisThread;
+
+    m_avoid_regexp.clear();
+    m_step_in_target.clear();
+    m_step_count = 1;
+    m_end_line = LLDB_INVALID_LINE_NUMBER;
+    m_end_line_is_block_end = false;
+  }
+
+  // Instance variables to hold the values for command options.
+  LazyBool m_step_in_avoid_no_debug;
+  LazyBool m_step_out_avoid_no_debug;
+  RunMode m_run_mode;
+  std::string m_avoid_regexp;
+  std::string m_step_in_target;
+  uint32_t m_step_count;
+  uint32_t m_end_line;
+  bool m_end_line_is_block_end;
 };
 
 class CommandObjectThreadStepWithTypeAndScope : public CommandObjectParsed {
 public:
-  class CommandOptions : public Options {
-  public:
-    CommandOptions() : Options() {
-      // Keep default values of all options in one place: OptionParsingStarting
-      // ()
-      OptionParsingStarting(nullptr);
-    }
-
-    ~CommandOptions() override = default;
-
-    Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
-                          ExecutionContext *execution_context) override {
-      Status error;
-      const int short_option = m_getopt_table[option_idx].val;
-
-      switch (short_option) {
-      case 'a': {
-        bool success;
-        bool avoid_no_debug =
-            OptionArgParser::ToBoolean(option_arg, true, &success);
-        if (!success)
-          error.SetErrorStringWithFormat(
-              "invalid boolean value for option '%c'", short_option);
-        else {
-          m_step_in_avoid_no_debug =
-              avoid_no_debug ? eLazyBoolYes : eLazyBoolNo;
-        }
-      } break;
-
-      case 'A': {
-        bool success;
-        bool avoid_no_debug =
-            OptionArgParser::ToBoolean(option_arg, true, &success);
-        if (!success)
-          error.SetErrorStringWithFormat(
-              "invalid boolean value for option '%c'", short_option);
-        else {
-          m_step_out_avoid_no_debug =
-              avoid_no_debug ? eLazyBoolYes : eLazyBoolNo;
-        }
-      } break;
-
-      case 'c':
-        if (option_arg.getAsInteger(0, m_step_count))
-          error.SetErrorStringWithFormat("invalid step count '%s'",
-                                         option_arg.str().c_str());
-        break;
-
-      case 'C':
-        m_class_name.clear();
-        m_class_name.assign(option_arg);
-        break;
-
-      case 'm': {
-        auto enum_values = GetDefinitions()[option_idx].enum_values;
-        m_run_mode = (lldb::RunMode)OptionArgParser::ToOptionEnum(
-            option_arg, enum_values, eOnlyDuringStepping, error);
-      } break;
-
-      case 'e':
-        if (option_arg == "block") {
-          m_end_line_is_block_end = true;
-          break;
-        }
-        if (option_arg.getAsInteger(0, m_end_line))
-          error.SetErrorStringWithFormat("invalid end line number '%s'",
-                                         option_arg.str().c_str());
-        break;
-
-      case 'r':
-        m_avoid_regexp.clear();
-        m_avoid_regexp.assign(option_arg);
-        break;
-
-      case 't':
-        m_step_in_target.clear();
-        m_step_in_target.assign(option_arg);
-        break;
-
-      default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
-      }
-      return error;
-    }
-
-    void OptionParsingStarting(ExecutionContext *execution_context) override {
-      m_step_in_avoid_no_debug = eLazyBoolCalculate;
-      m_step_out_avoid_no_debug = eLazyBoolCalculate;
-      m_run_mode = eOnlyDuringStepping;
-
-      // Check if we are in Non-Stop mode
-      TargetSP target_sp =
-          execution_context ? execution_context->GetTargetSP() : TargetSP();
-      if (target_sp && target_sp->GetNonStopModeEnabled())
-        m_run_mode = eOnlyThisThread;
-
-      m_avoid_regexp.clear();
-      m_step_in_target.clear();
-      m_class_name.clear();
-      m_step_count = 1;
-      m_end_line = LLDB_INVALID_LINE_NUMBER;
-      m_end_line_is_block_end = false;
-    }
-
-    llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
-      return llvm::makeArrayRef(g_thread_step_scope_options);
-    }
-
-    // Instance variables to hold the values for command options.
-    LazyBool m_step_in_avoid_no_debug;
-    LazyBool m_step_out_avoid_no_debug;
-    RunMode m_run_mode;
-    std::string m_avoid_regexp;
-    std::string m_step_in_target;
-    std::string m_class_name;
-    uint32_t m_step_count;
-    uint32_t m_end_line;
-    bool m_end_line_is_block_end;
-  };
-
   CommandObjectThreadStepWithTypeAndScope(CommandInterpreter &interpreter,
                                           const char *name, const char *help,
                                           const char *syntax,
@@ -542,7 +519,8 @@
                                 eCommandTryTargetAPILock |
                                 eCommandProcessMustBeLaunched |
                                 eCommandProcessMustBePaused),
-        m_step_type(step_type), m_step_scope(step_scope), m_options() {
+        m_step_type(step_type), m_step_scope(step_scope), m_options(),
+        m_class_options("scripted step") {
     CommandArgumentEntry arg;
     CommandArgumentData thread_id_arg;
 
@@ -556,11 +534,18 @@
 
     // Push the data for the first argument into the m_arguments vector.
     m_arguments.push_back(arg);
+
+    if (step_type == eStepTypeScripted) {
+      m_all_options.Append(&m_class_options, LLDB_OPT_SET_1 | LLDB_OPT_SET_2,
+                           LLDB_OPT_SET_1);
+    }
+    m_all_options.Append(&m_options);
+    m_all_options.Finalize();
   }
 
   ~CommandObjectThreadStepWithTypeAndScope() override = default;
 
-  Options *GetOptions() override { return &m_options; }
+  Options *GetOptions() override { return &m_all_options; }
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
@@ -600,15 +585,15 @@
     }
 
     if (m_step_type == eStepTypeScripted) {
-      if (m_options.m_class_name.empty()) {
+      if (m_class_options.GetName().empty()) {
         result.AppendErrorWithFormat("empty class name for scripted step.");
         result.SetStatus(eReturnStatusFailed);
         return false;
       } else if (!GetDebugger().GetScriptInterpreter()->CheckObjectExists(
-                     m_options.m_class_name.c_str())) {
+                     m_class_options.GetName().c_str())) {
         result.AppendErrorWithFormat(
             "class for scripted step: \"%s\" does not exist.",
-            m_options.m_class_name.c_str());
+            m_class_options.GetName().c_str());
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
@@ -724,8 +709,9 @@
           m_options.m_step_out_avoid_no_debug);
     } else if (m_step_type == eStepTypeScripted) {
       new_plan_sp = thread->QueueThreadPlanForStepScripted(
-          abort_other_plans, m_options.m_class_name.c_str(),
-          bool_stop_other_threads, new_plan_status);
+          abort_other_plans, m_class_options.GetName().c_str(),
+          m_class_options.GetStructuredData(), bool_stop_other_threads,
+          new_plan_status);
     } else {
       result.AppendError("step type is not supported");
       result.SetStatus(eReturnStatusFailed);
@@ -792,7 +778,9 @@
 protected:
   StepType m_step_type;
   StepScope m_step_scope;
-  CommandOptions m_options;
+  ThreadStepScopeOptionGroup m_options;
+  OptionGroupPythonClassWithDict m_class_options;
+  OptionGroupOptions m_all_options;
 };
 
 // CommandObjectThreadContinue
@@ -828,13 +816,6 @@
   bool DoExecute(Args &command, CommandReturnObject &result) override {
     bool synchronous_execution = m_interpreter.GetSynchronous();
 
-    if (!GetDebugger().GetSelectedTarget()) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
-
     Process *process = m_exe_ctx.GetProcessPtr();
     if (process == nullptr) {
       result.AppendError("no process exists. Cannot continue");
@@ -856,7 +837,7 @@
         std::vector<Thread *> resume_threads;
         for (auto &entry : command.entries()) {
           uint32_t thread_idx;
-          if (entry.ref.getAsInteger(0, thread_idx)) {
+          if (entry.ref().getAsInteger(0, thread_idx)) {
             result.AppendErrorWithFormat(
                 "invalid thread index argument: \"%s\".\n", entry.c_str());
             result.SetStatus(eReturnStatusFailed);
@@ -977,16 +958,14 @@
 
 static constexpr OptionEnumValueElement g_duo_running_mode[] = {
     {eOnlyThisThread, "this-thread", "Run only this thread"},
-    {eAllThreads, "all-threads", "Run all threads"} };
+    {eAllThreads, "all-threads", "Run all threads"}};
 
 static constexpr OptionEnumValues DuoRunningModes() {
   return OptionEnumValues(g_duo_running_mode);
 }
 
-static constexpr OptionDefinition g_thread_until_options[] = {
 #define LLDB_OPTIONS_thread_until
 #include "CommandOptions.inc"
-};
 
 class CommandObjectThreadUntil : public CommandObjectParsed {
 public:
@@ -1044,9 +1023,7 @@
         }
       } break;
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -1075,7 +1052,8 @@
             "Continue until a line number or address is reached by the "
             "current or specified thread.  Stops when returning from "
             "the current function as a safety measure.  "
-            "The target line number(s) are given as arguments, and if more than one"
+            "The target line number(s) are given as arguments, and if more "
+            "than one"
             " is provided, stepping will stop when the first one is hit.",
             nullptr,
             eCommandRequiresThread | eCommandTryTargetAPILock |
@@ -1104,13 +1082,7 @@
   bool DoExecute(Args &command, CommandReturnObject &result) override {
     bool synchronous_execution = m_interpreter.GetSynchronous();
 
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target == nullptr) {
-      result.AppendError("invalid target, create a debug target using the "
-                         "'target create' command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target *target = &GetSelectedTarget();
 
     Process *process = m_exe_ctx.GetProcessPtr();
     if (process == nullptr) {
@@ -1215,7 +1187,7 @@
             LineEntry line_entry;
             const bool exact = false;
             start_idx_ptr = sc.comp_unit->FindLineEntry(
-                start_idx_ptr, line_number, sc.comp_unit, exact, &line_entry);
+                start_idx_ptr, line_number, nullptr, exact, &line_entry);
             if (start_idx_ptr == UINT32_MAX)
               break;
 
@@ -1402,11 +1374,8 @@
 };
 
 // CommandObjectThreadInfo
-
-static constexpr OptionDefinition g_thread_info_options[] = {
 #define LLDB_OPTIONS_thread_info
 #include "CommandOptions.inc"
-};
 
 class CommandObjectThreadInfo : public CommandObjectIterateOverThreads {
 public:
@@ -1436,7 +1405,7 @@
         break;
 
       default:
-        return Status("invalid short option character '%c'", short_option);
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -1451,9 +1420,10 @@
 
   CommandObjectThreadInfo(CommandInterpreter &interpreter)
       : CommandObjectIterateOverThreads(
-            interpreter, "thread info", "Show an extended summary of one or "
-                                        "more threads.  Defaults to the "
-                                        "current thread.",
+            interpreter, "thread info",
+            "Show an extended summary of one or "
+            "more threads.  Defaults to the "
+            "current thread.",
             "thread info",
             eCommandRequiresProcess | eCommandTryTargetAPILock |
                 eCommandProcessMustBeLaunched | eCommandProcessMustBePaused),
@@ -1495,7 +1465,7 @@
 // CommandObjectThreadException
 
 class CommandObjectThreadException : public CommandObjectIterateOverThreads {
- public:
+public:
   CommandObjectThreadException(CommandInterpreter &interpreter)
       : CommandObjectIterateOverThreads(
             interpreter, "thread exception",
@@ -1536,11 +1506,8 @@
 };
 
 // CommandObjectThreadReturn
-
-static constexpr OptionDefinition g_thread_return_options[] = {
 #define LLDB_OPTIONS_thread_return
 #include "CommandOptions.inc"
-};
 
 class CommandObjectThreadReturn : public CommandObjectRaw {
 public:
@@ -1573,9 +1540,7 @@
         }
       } break;
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -1711,11 +1676,8 @@
 };
 
 // CommandObjectThreadJump
-
-static constexpr OptionDefinition g_thread_jump_options[] = {
 #define LLDB_OPTIONS_thread_jump
 #include "CommandOptions.inc"
-};
 
 class CommandObjectThreadJump : public CommandObjectParsed {
 public:
@@ -1760,7 +1722,7 @@
         m_force = true;
         break;
       default:
-        return Status("invalid short option character '%c'", short_option);
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -1854,11 +1816,8 @@
 // Next are the subcommands of CommandObjectMultiwordThreadPlan
 
 // CommandObjectThreadPlanList
-
-static constexpr OptionDefinition g_thread_plan_list_options[] = {
 #define LLDB_OPTIONS_thread_plan_list
 #include "CommandOptions.inc"
-};
 
 class CommandObjectThreadPlanList : public CommandObjectIterateOverThreads {
 public:
@@ -1885,9 +1844,7 @@
         m_verbose = true;
         break;
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -2040,9 +1997,10 @@
 
 CommandObjectMultiwordThread::CommandObjectMultiwordThread(
     CommandInterpreter &interpreter)
-    : CommandObjectMultiword(interpreter, "thread", "Commands for operating on "
-                                                    "one or more threads in "
-                                                    "the current process.",
+    : CommandObjectMultiword(interpreter, "thread",
+                             "Commands for operating on "
+                             "one or more threads in "
+                             "the current process.",
                              "thread <subcommand> [<subcommand-options>]") {
   LoadSubCommand("backtrace", CommandObjectSP(new CommandObjectThreadBacktrace(
                                   interpreter)));
@@ -2060,9 +2018,8 @@
                  CommandObjectSP(new CommandObjectThreadUntil(interpreter)));
   LoadSubCommand("info",
                  CommandObjectSP(new CommandObjectThreadInfo(interpreter)));
-  LoadSubCommand(
-      "exception",
-      CommandObjectSP(new CommandObjectThreadException(interpreter)));
+  LoadSubCommand("exception", CommandObjectSP(new CommandObjectThreadException(
+                                  interpreter)));
   LoadSubCommand("step-in",
                  CommandObjectSP(new CommandObjectThreadStepWithTypeAndScope(
                      interpreter, "thread step-in",
@@ -2102,7 +2059,11 @@
       "step-scripted",
       CommandObjectSP(new CommandObjectThreadStepWithTypeAndScope(
           interpreter, "thread step-scripted",
-          "Step as instructed by the script class passed in the -C option.",
+          "Step as instructed by the script class passed in the -C option.  "
+          "You can also specify a dictionary of key (-k) and value (-v) pairs "
+          "that will be used to populate an SBStructuredData Dictionary, which "
+          "will be passed to the constructor of the class implementing the "
+          "scripted step.  See the Python Reference for more details.",
           nullptr, eStepTypeScripted, eStepScopeSource)));
 
   LoadSubCommand("plan", CommandObjectSP(new CommandObjectMultiwordThreadPlan(
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectType.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectType.cpp
index 98a43f5..87c107c 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectType.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectType.cpp
@@ -11,6 +11,7 @@
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/IOHandler.h"
 #include "lldb/DataFormatters/DataVisualization.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Host/OptionParser.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandObject.h"
@@ -23,20 +24,16 @@
 #include "lldb/Interpreter/Options.h"
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/Language.h"
-#include "lldb/Target/Process.h"
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
-#include "lldb/Target/ThreadList.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/RegularExpression.h"
-#include "lldb/Utility/State.h"
 #include "lldb/Utility/StringList.h"
 
 #include "llvm/ADT/STLExtras.h"
 
 #include <algorithm>
-#include <cctype>
 #include <functional>
 #include <memory>
 
@@ -80,9 +77,9 @@
     return false;
 
   for (auto entry : llvm::enumerate(command.entries().drop_back())) {
-    if (entry.value().ref != "unsigned")
+    if (entry.value().ref() != "unsigned")
       continue;
-    auto next = command.entries()[entry.index() + 1].ref;
+    auto next = command.entries()[entry.index() + 1].ref();
     if (next == "int" || next == "short" || next == "char" || next == "long") {
       result.AppendWarningWithFormat(
           "unsigned %s being treated as two types. if you meant the combined "
@@ -95,10 +92,8 @@
   return false;
 }
 
-static constexpr OptionDefinition g_type_summary_add_options[] = {
 #define LLDB_OPTIONS_type_summary_add
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeSummaryAdd : public CommandObjectParsed,
                                     public IOHandlerDelegateMultiline {
@@ -153,7 +148,7 @@
         "for\n"
         "        internal_dict: an LLDB support object not to be used\"\"\"\n";
 
-    StreamFileSP output_sp(io_handler.GetOutputStreamFile());
+    StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
     if (output_sp && interactive) {
       output_sp->PutCString(g_summary_addreader_instructions);
       output_sp->Flush();
@@ -162,9 +157,9 @@
 
   void IOHandlerInputComplete(IOHandler &io_handler,
                               std::string &data) override {
-    StreamFileSP error_sp = io_handler.GetErrorStreamFile();
+    StreamFileSP error_sp = io_handler.GetErrorStreamFileSP();
 
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
     ScriptInterpreter *interpreter = GetDebugger().GetScriptInterpreter();
     if (interpreter) {
       StringList lines;
@@ -197,9 +192,7 @@
 
                 Status error;
 
-                for (size_t i = 0; i < options->m_target_types.GetSize(); i++) {
-                  const char *type_name =
-                      options->m_target_types.GetStringAtIndex(i);
+                for (const std::string &type_name : options->m_target_types) {
                   CommandObjectTypeSummaryAdd::AddSummary(
                       ConstString(type_name), script_format,
                       (options->m_regex
@@ -259,7 +252,7 @@
           "error: script interpreter missing, didn't add python command.\n");
       error_sp->Flush();
     }
-#endif // LLDB_DISABLE_PYTHON
+#endif
     io_handler.SetIsDone(true);
   }
 
@@ -282,10 +275,8 @@
     "        '''Optional'''\n"
     "class synthProvider:\n";
 
-static constexpr OptionDefinition g_type_synth_add_options[] = {
 #define LLDB_OPTIONS_type_synth_add
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeSynthAdd : public CommandObjectParsed,
                                   public IOHandlerDelegateMultiline {
@@ -329,9 +320,7 @@
         m_regex = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -391,7 +380,7 @@
   }
 
   void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
-    StreamFileSP output_sp(io_handler.GetOutputStreamFile());
+    StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
     if (output_sp && interactive) {
       output_sp->PutCString(g_synth_addreader_instructions);
       output_sp->Flush();
@@ -400,9 +389,9 @@
 
   void IOHandlerInputComplete(IOHandler &io_handler,
                               std::string &data) override {
-    StreamFileSP error_sp = io_handler.GetErrorStreamFile();
+    StreamFileSP error_sp = io_handler.GetErrorStreamFileSP();
 
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
     ScriptInterpreter *interpreter = GetDebugger().GetScriptInterpreter();
     if (interpreter) {
       StringList lines;
@@ -441,13 +430,10 @@
 
                 Status error;
 
-                for (size_t i = 0; i < options->m_target_types.GetSize(); i++) {
-                  const char *type_name =
-                      options->m_target_types.GetStringAtIndex(i);
-                  ConstString const_type_name(type_name);
-                  if (const_type_name) {
+                for (const std::string &type_name : options->m_target_types) {
+                  if (!type_name.empty()) {
                     if (!CommandObjectTypeSynthAdd::AddSynth(
-                            const_type_name, synth_provider,
+                            ConstString(type_name), synth_provider,
                             options->m_regex
                                 ? CommandObjectTypeSynthAdd::eRegexSynth
                                 : CommandObjectTypeSynthAdd::eRegularSynth,
@@ -485,7 +471,7 @@
       error_sp->Flush();
     }
 
-#endif // LLDB_DISABLE_PYTHON
+#endif
     io_handler.SetIsDone(true);
   }
 
@@ -503,10 +489,8 @@
 
 // CommandObjectTypeFormatAdd
 
-static constexpr OptionDefinition g_type_format_add_options[] = {
 #define LLDB_OPTIONS_type_format_add
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeFormatAdd : public CommandObjectParsed {
 private:
@@ -559,9 +543,7 @@
         m_custom_type_name.assign(option_value);
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -694,25 +676,26 @@
     WarnOnPotentialUnquotedUnsignedType(command, result);
 
     for (auto &arg_entry : command.entries()) {
-      if (arg_entry.ref.empty()) {
+      if (arg_entry.ref().empty()) {
         result.AppendError("empty typenames not allowed");
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
-      ConstString typeCS(arg_entry.ref);
+      ConstString typeCS(arg_entry.ref());
       if (m_command_options.m_regex) {
-        RegularExpressionSP typeRX(new RegularExpression());
-        if (!typeRX->Compile(arg_entry.ref)) {
+        RegularExpression typeRX(arg_entry.ref());
+        if (!typeRX.IsValid()) {
           result.AppendError(
               "regex format error (maybe this is not really a regex?)");
           result.SetStatus(eReturnStatusFailed);
           return false;
         }
         category_sp->GetRegexTypeSummariesContainer()->Delete(typeCS);
-        category_sp->GetRegexTypeFormatsContainer()->Add(typeRX, entry);
+        category_sp->GetRegexTypeFormatsContainer()->Add(std::move(typeRX),
+                                                         entry);
       } else
-        category_sp->GetTypeFormatsContainer()->Add(typeCS, entry);
+        category_sp->GetTypeFormatsContainer()->Add(std::move(typeCS), entry);
     }
 
     result.SetStatus(eReturnStatusSuccessFinishNoResult);
@@ -720,10 +703,8 @@
   }
 };
 
-static constexpr OptionDefinition g_type_formatter_delete_options[] = {
 #define LLDB_OPTIONS_type_formatter_delete
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeFormatterDelete : public CommandObjectParsed {
 protected:
@@ -749,9 +730,7 @@
         m_language = Language::GetLanguageTypeFromString(option_arg);
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -859,10 +838,8 @@
   }
 };
 
-static constexpr OptionDefinition g_type_formatter_clear_options[] = {
 #define LLDB_OPTIONS_type_formatter_clear
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeFormatterClear : public CommandObjectParsed {
 private:
@@ -882,9 +859,7 @@
         m_delete_all = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -971,11 +946,8 @@
             "type format clear", "Delete all existing format styles.") {}
 };
 
-
-static constexpr OptionDefinition g_type_formatter_list_options[] = {
 #define LLDB_OPTIONS_type_formatter_list
 #include "CommandOptions.inc"
-};
 
 template <typename FormatterType>
 class CommandObjectTypeFormatterList : public CommandObjectParsed {
@@ -1005,9 +977,7 @@
           m_category_language.SetOptionWasSet();
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1061,9 +1031,9 @@
     std::unique_ptr<RegularExpression> formatter_regex;
 
     if (m_options.m_category_regex.OptionWasSet()) {
-      category_regex.reset(new RegularExpression());
-      if (!category_regex->Compile(
-              m_options.m_category_regex.GetCurrentValueAsRef())) {
+      category_regex.reset(new RegularExpression(
+          m_options.m_category_regex.GetCurrentValueAsRef()));
+      if (!category_regex->IsValid()) {
         result.AppendErrorWithFormat(
             "syntax error in category regular expression '%s'",
             m_options.m_category_regex.GetCurrentValueAsRef().str().c_str());
@@ -1074,8 +1044,9 @@
 
     if (argc == 1) {
       const char *arg = command.GetArgumentAtIndex(0);
-      formatter_regex.reset(new RegularExpression());
-      if (!formatter_regex->Compile(llvm::StringRef::withNullAsEmpty(arg))) {
+      formatter_regex.reset(
+          new RegularExpression(llvm::StringRef::withNullAsEmpty(arg)));
+      if (!formatter_regex->IsValid()) {
         result.AppendErrorWithFormat("syntax error in regular expression '%s'",
                                      arg);
         result.SetStatus(eReturnStatusFailed);
@@ -1085,8 +1056,9 @@
 
     bool any_printed = false;
 
-    auto category_closure = [&result, &formatter_regex, &any_printed](
-        const lldb::TypeCategoryImplSP &category) -> void {
+    auto category_closure =
+        [&result, &formatter_regex,
+         &any_printed](const lldb::TypeCategoryImplSP &category) -> void {
       result.GetOutputStream().Printf(
           "-----------------------\nCategory: %s%s\n-----------------------\n",
           category->GetName(), category->IsEnabled() ? "" : " (disabled)");
@@ -1116,13 +1088,13 @@
 
       foreach
         .SetWithRegex([&result, &formatter_regex, &any_printed](
-                          RegularExpressionSP regex_sp,
+                          const RegularExpression &regex,
                           const FormatterSharedPointer &format_sp) -> bool {
           if (formatter_regex) {
             bool escape = true;
-            if (regex_sp->GetText() == formatter_regex->GetText()) {
+            if (regex.GetText() == formatter_regex->GetText()) {
               escape = false;
-            } else if (formatter_regex->Execute(regex_sp->GetText())) {
+            } else if (formatter_regex->Execute(regex.GetText())) {
               escape = false;
             }
 
@@ -1132,7 +1104,7 @@
 
           any_printed = true;
           result.GetOutputStream().Printf("%s: %s\n",
-                                          regex_sp->GetText().str().c_str(),
+                                          regex.GetText().str().c_str(),
                                           format_sp->GetDescription().c_str());
           return true;
         });
@@ -1192,12 +1164,6 @@
                                        "Show a list of current formats.") {}
 };
 
-#ifndef LLDB_DISABLE_PYTHON
-
-// CommandObjectTypeSummaryAdd
-
-#endif // LLDB_DISABLE_PYTHON
-
 Status CommandObjectTypeSummaryAdd::CommandOptions::SetOptionValue(
     uint32_t option_idx, llvm::StringRef option_arg,
     ExecutionContext *execution_context) {
@@ -1257,8 +1223,7 @@
     m_flags.SetHideItemNames(true);
     break;
   default:
-    error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
@@ -1281,7 +1246,7 @@
   m_category = "default";
 }
 
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
 
 bool CommandObjectTypeSummaryAdd::Execute_ScriptSummary(
     Args &command, CommandReturnObject &result) {
@@ -1355,19 +1320,18 @@
                              m_options.m_name, m_options.m_category);
 
     for (auto &entry : command.entries()) {
-      if (entry.ref.empty()) {
+      if (entry.ref().empty()) {
         result.AppendError("empty typenames not allowed");
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
-      options->m_target_types << entry.ref;
+      options->m_target_types << entry.ref();
     }
 
     m_interpreter.GetPythonCommandsFromIOHandler(
         "    ",   // Prompt
         *this,    // IOHandlerDelegate
-        true,     // Run IOHandler in async mode
         options); // Baton for the "io_handler" that will be passed back into
                   // our IOHandlerDelegate functions
     result.SetStatus(eReturnStatusSuccessFinishNoResult);
@@ -1382,7 +1346,7 @@
 
   for (auto &entry : command.entries()) {
     CommandObjectTypeSummaryAdd::AddSummary(
-        ConstString(entry.ref), script_format,
+        ConstString(entry.ref()), script_format,
         (m_options.m_regex ? eRegexSummary : eRegularSummary),
         m_options.m_category, &error);
     if (error.Fail()) {
@@ -1406,7 +1370,7 @@
   return result.Succeeded();
 }
 
-#endif // LLDB_DISABLE_PYTHON
+#endif
 
 bool CommandObjectTypeSummaryAdd::Execute_StringSummary(
     Args &command, CommandReturnObject &result) {
@@ -1455,12 +1419,12 @@
   // now I have a valid format, let's add it to every type
   Status error;
   for (auto &arg_entry : command.entries()) {
-    if (arg_entry.ref.empty()) {
+    if (arg_entry.ref().empty()) {
       result.AppendError("empty typenames not allowed");
       result.SetStatus(eReturnStatusFailed);
       return false;
     }
-    ConstString typeCS(arg_entry.ref);
+    ConstString typeCS(arg_entry.ref());
 
     AddSummary(typeCS, entry,
                (m_options.m_regex ? eRegexSummary : eRegularSummary),
@@ -1604,13 +1568,13 @@
   WarnOnPotentialUnquotedUnsignedType(command, result);
 
   if (m_options.m_is_add_script) {
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
     return Execute_ScriptSummary(command, result);
 #else
     result.AppendError("python is disabled");
     result.SetStatus(eReturnStatusFailed);
     return false;
-#endif // LLDB_DISABLE_PYTHON
+#endif
   }
 
   return Execute_StringSummary(command, result);
@@ -1647,8 +1611,8 @@
   }
 
   if (type == eRegexSummary) {
-    RegularExpressionSP typeRX(new RegularExpression());
-    if (!typeRX->Compile(type_name.GetStringRef())) {
+    RegularExpression typeRX(type_name.GetStringRef());
+    if (!typeRX.IsValid()) {
       if (error)
         error->SetErrorString(
             "regex format error (maybe this is not really a regex?)");
@@ -1656,7 +1620,7 @@
     }
 
     category->GetRegexTypeSummariesContainer()->Delete(type_name);
-    category->GetRegexTypeSummariesContainer()->Add(typeRX, entry);
+    category->GetRegexTypeSummariesContainer()->Add(std::move(typeRX), entry);
 
     return true;
   } else if (type == eNamedSummary) {
@@ -1664,7 +1628,7 @@
     DataVisualization::NamedSummaryFormats::Add(type_name, entry);
     return true;
   } else {
-    category->GetTypeSummariesContainer()->Add(type_name, entry);
+    category->GetTypeSummariesContainer()->Add(std::move(type_name), entry);
     return true;
   }
 }
@@ -1731,11 +1695,8 @@
 };
 
 // CommandObjectTypeCategoryDefine
-
-static constexpr OptionDefinition g_type_category_define_options[] = {
 #define LLDB_OPTIONS_type_category_define
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeCategoryDefine : public CommandObjectParsed {
   class CommandOptions : public Options {
@@ -1759,9 +1720,7 @@
         error = m_cate_language.SetValueFromString(option_arg);
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -1818,7 +1777,7 @@
 
     for (auto &entry : command.entries()) {
       TypeCategoryImplSP category_sp;
-      if (DataVisualization::Categories::GetCategory(ConstString(entry.ref),
+      if (DataVisualization::Categories::GetCategory(ConstString(entry.ref()),
                                                      category_sp) &&
           category_sp) {
         category_sp->AddLanguage(m_options.m_cate_language.GetCurrentValue());
@@ -1834,11 +1793,8 @@
 };
 
 // CommandObjectTypeCategoryEnable
-
-static constexpr OptionDefinition g_type_category_enable_options[] = {
 #define LLDB_OPTIONS_type_category_enable
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeCategoryEnable : public CommandObjectParsed {
   class CommandOptions : public Options {
@@ -1862,9 +1818,7 @@
         }
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -2006,11 +1960,8 @@
 };
 
 // CommandObjectTypeCategoryDisable
-
-OptionDefinition constexpr g_type_category_disable_options[] = {
 #define LLDB_OPTIONS_type_category_disable
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeCategoryDisable : public CommandObjectParsed {
   class CommandOptions : public Options {
@@ -2034,9 +1985,7 @@
         }
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -2142,9 +2091,9 @@
     std::unique_ptr<RegularExpression> regex;
 
     if (argc == 1) {
-      regex.reset(new RegularExpression());
       const char *arg = command.GetArgumentAtIndex(0);
-      if (!regex->Compile(llvm::StringRef::withNullAsEmpty(arg))) {
+      regex.reset(new RegularExpression(llvm::StringRef::withNullAsEmpty(arg)));
+      if (!regex->IsValid()) {
         result.AppendErrorWithFormat(
             "syntax error in category regular expression '%s'", arg);
         result.SetStatus(eReturnStatusFailed);
@@ -2193,7 +2142,7 @@
                                        "Show a list of current filters.") {}
 };
 
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
 
 // CommandObjectTypeSynthList
 
@@ -2206,7 +2155,7 @@
             "Show a list of current synthetic providers.") {}
 };
 
-#endif // LLDB_DISABLE_PYTHON
+#endif
 
 // CommandObjectTypeFilterDelete
 
@@ -2221,7 +2170,7 @@
   ~CommandObjectTypeFilterDelete() override = default;
 };
 
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
 
 // CommandObjectTypeSynthDelete
 
@@ -2237,7 +2186,7 @@
   ~CommandObjectTypeSynthDelete() override = default;
 };
 
-#endif // LLDB_DISABLE_PYTHON
+#endif
 
 // CommandObjectTypeFilterClear
 
@@ -2250,7 +2199,7 @@
             "type filter clear", "Delete all existing filter.") {}
 };
 
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
 // CommandObjectTypeSynthClear
 
 class CommandObjectTypeSynthClear : public CommandObjectTypeFormatterClear {
@@ -2270,19 +2219,18 @@
       m_options.m_cascade, m_options.m_regex, m_options.m_category);
 
   for (auto &entry : command.entries()) {
-    if (entry.ref.empty()) {
+    if (entry.ref().empty()) {
       result.AppendError("empty typenames not allowed");
       result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
-    options->m_target_types << entry.ref;
+    options->m_target_types << entry.ref();
   }
 
   m_interpreter.GetPythonCommandsFromIOHandler(
       "    ",   // Prompt
       *this,    // IOHandlerDelegate
-      true,     // Run IOHandler in async mode
       options); // Baton for the "io_handler" that will be passed back into our
                 // IOHandlerDelegate functions
   result.SetStatus(eReturnStatusSuccessFinishNoResult);
@@ -2335,13 +2283,13 @@
   Status error;
 
   for (auto &arg_entry : command.entries()) {
-    if (arg_entry.ref.empty()) {
+    if (arg_entry.ref().empty()) {
       result.AppendError("empty typenames not allowed");
       result.SetStatus(eReturnStatusFailed);
       return false;
     }
 
-    ConstString typeCS(arg_entry.ref);
+    ConstString typeCS(arg_entry.ref());
     if (!AddSynth(typeCS, entry,
                   m_options.m_regex ? eRegexSynth : eRegularSynth,
                   m_options.m_category, &error)) {
@@ -2385,9 +2333,9 @@
       type = eRegexSynth;
   }
 
-  if (category->AnyMatches(type_name, eFormatCategoryItemFilter |
-                                          eFormatCategoryItemRegexFilter,
-                           false)) {
+  if (category->AnyMatches(
+          type_name, eFormatCategoryItemFilter | eFormatCategoryItemRegexFilter,
+          false)) {
     if (error)
       error->SetErrorStringWithFormat("cannot add synthetic for type %s when "
                                       "filter is defined in same category!",
@@ -2396,8 +2344,8 @@
   }
 
   if (type == eRegexSynth) {
-    RegularExpressionSP typeRX(new RegularExpression());
-    if (!typeRX->Compile(type_name.GetStringRef())) {
+    RegularExpression typeRX(type_name.GetStringRef());
+    if (!typeRX.IsValid()) {
       if (error)
         error->SetErrorString(
             "regex format error (maybe this is not really a regex?)");
@@ -2405,21 +2353,18 @@
     }
 
     category->GetRegexTypeSyntheticsContainer()->Delete(type_name);
-    category->GetRegexTypeSyntheticsContainer()->Add(typeRX, entry);
+    category->GetRegexTypeSyntheticsContainer()->Add(std::move(typeRX), entry);
 
     return true;
   } else {
-    category->GetTypeSyntheticsContainer()->Add(type_name, entry);
+    category->GetTypeSyntheticsContainer()->Add(std::move(type_name), entry);
     return true;
   }
 }
 
-#endif // LLDB_DISABLE_PYTHON
-
-static constexpr OptionDefinition g_type_filter_add_options[] = {
+#endif
 #define LLDB_OPTIONS_type_filter_add
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeFilterAdd : public CommandObjectParsed {
 private:
@@ -2461,9 +2406,7 @@
         m_regex = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -2515,9 +2458,9 @@
         type = eRegexFilter;
     }
 
-    if (category->AnyMatches(type_name, eFormatCategoryItemSynth |
-                                            eFormatCategoryItemRegexSynth,
-                             false)) {
+    if (category->AnyMatches(
+            type_name, eFormatCategoryItemSynth | eFormatCategoryItemRegexSynth,
+            false)) {
       if (error)
         error->SetErrorStringWithFormat("cannot add filter for type %s when "
                                         "synthetic is defined in same "
@@ -2527,8 +2470,8 @@
     }
 
     if (type == eRegexFilter) {
-      RegularExpressionSP typeRX(new RegularExpression());
-      if (!typeRX->Compile(type_name.GetStringRef())) {
+      RegularExpression typeRX(type_name.GetStringRef());
+      if (!typeRX.IsValid()) {
         if (error)
           error->SetErrorString(
               "regex format error (maybe this is not really a regex?)");
@@ -2536,11 +2479,11 @@
       }
 
       category->GetRegexTypeFiltersContainer()->Delete(type_name);
-      category->GetRegexTypeFiltersContainer()->Add(typeRX, entry);
+      category->GetRegexTypeFiltersContainer()->Add(std::move(typeRX), entry);
 
       return true;
     } else {
-      category->GetTypeFiltersContainer()->Add(type_name, entry);
+      category->GetTypeFiltersContainer()->Add(std::move(type_name), entry);
       return true;
     }
   }
@@ -2641,13 +2584,13 @@
     WarnOnPotentialUnquotedUnsignedType(command, result);
 
     for (auto &arg_entry : command.entries()) {
-      if (arg_entry.ref.empty()) {
+      if (arg_entry.ref().empty()) {
         result.AppendError("empty typenames not allowed");
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
 
-      ConstString typeCS(arg_entry.ref);
+      ConstString typeCS(arg_entry.ref());
       if (!AddFilter(typeCS, entry,
                      m_options.m_regex ? eRegexFilter : eRegularFilter,
                      m_options.m_category, &error)) {
@@ -2663,10 +2606,8 @@
 };
 
 // "type lookup"
-static constexpr OptionDefinition g_type_lookup_options[] = {
 #define LLDB_OPTIONS_type_lookup
 #include "CommandOptions.inc"
-};
 
 class CommandObjectTypeLookup : public CommandObjectRaw {
 protected:
@@ -2717,9 +2658,7 @@
         break;
 
       default:
-        error.SetErrorStringWithFormat("invalid short option character '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -2879,8 +2818,7 @@
   CommandObjectFormatterInfo(CommandInterpreter &interpreter,
                              const char *formatter_name,
                              DiscoveryFunction discovery_func)
-      : CommandObjectRaw(interpreter, "", "", "",
-                         eCommandRequiresFrame),
+      : CommandObjectRaw(interpreter, "", "", "", eCommandRequiresFrame),
         m_formatter_name(formatter_name ? formatter_name : ""),
         m_discovery_function(discovery_func) {
     StreamString name;
@@ -2974,7 +2912,7 @@
   ~CommandObjectTypeFormat() override = default;
 };
 
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
 
 class CommandObjectTypeSynth : public CommandObjectMultiword {
 public:
@@ -3003,7 +2941,7 @@
   ~CommandObjectTypeSynth() override = default;
 };
 
-#endif // LLDB_DISABLE_PYTHON
+#endif
 
 class CommandObjectTypeFilter : public CommandObjectMultiword {
 public:
@@ -3089,10 +3027,10 @@
                  CommandObjectSP(new CommandObjectTypeFormat(interpreter)));
   LoadSubCommand("summary",
                  CommandObjectSP(new CommandObjectTypeSummary(interpreter)));
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
   LoadSubCommand("synthetic",
                  CommandObjectSP(new CommandObjectTypeSynth(interpreter)));
-#endif // LLDB_DISABLE_PYTHON
+#endif
   LoadSubCommand("lookup",
                  CommandObjectSP(new CommandObjectTypeLookup(interpreter)));
 }
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectType.h b/src/llvm-project/lldb/source/Commands/CommandObjectType.h
index ebb1903..938e481 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectType.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectType.h
@@ -9,11 +9,7 @@
 #ifndef liblldb_CommandObjectType_h_
 #define liblldb_CommandObjectType_h_
 
-
-
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Interpreter/Options.h"
-#include "lldb/lldb-types.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectVersion.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectVersion.cpp
index 904baf5..227d5d1 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectVersion.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectVersion.cpp
@@ -8,7 +8,6 @@
 
 #include "CommandObjectVersion.h"
 
-#include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/lldb-private.h"
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp
index 98e758b..c965d35 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -16,9 +16,7 @@
 #include "lldb/Breakpoint/Watchpoint.h"
 #include "lldb/Breakpoint/WatchpointList.h"
 #include "lldb/Core/ValueObject.h"
-#include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/Host/OptionParser.h"
-#include "lldb/Interpreter/CommandCompletions.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Symbol/Variable.h"
@@ -40,11 +38,6 @@
 
 static bool CheckTargetForWatchpointOperations(Target *target,
                                                CommandReturnObject &result) {
-  if (target == nullptr) {
-    result.AppendError("Invalid target.  No existing target or watchpoints.");
-    result.SetStatus(eReturnStatusFailed);
-    return false;
-  }
   bool process_is_valid =
       target->GetProcessSP() && target->GetProcessSP()->IsAlive();
   if (!process_is_valid) {
@@ -94,12 +87,12 @@
   // Go through the arguments and make a canonical form of arg list containing
   // only numbers with possible "-" in between.
   for (auto &entry : args.entries()) {
-    if ((idx = WithRSAIndex(entry.ref)) == -1) {
-      StrRefArgs.push_back(entry.ref);
+    if ((idx = WithRSAIndex(entry.ref())) == -1) {
+      StrRefArgs.push_back(entry.ref());
       continue;
     }
     // The Arg contains the range specifier, split it, then.
-    std::tie(first, second) = entry.ref.split(RSA[idx]);
+    std::tie(first, second) = entry.ref().split(RSA[idx]);
     if (!first.empty())
       StrRefArgs.push_back(first);
     StrRefArgs.push_back(Minus);
@@ -146,11 +139,8 @@
 
 // CommandObjectWatchpointList::Options
 #pragma mark List::CommandOptions
-
-static constexpr OptionDefinition g_watchpoint_list_options[] = {
 #define LLDB_OPTIONS_watchpoint_list
 #include "CommandOptions.inc"
-};
 
 #pragma mark List
 
@@ -159,7 +149,8 @@
   CommandObjectWatchpointList(CommandInterpreter &interpreter)
       : CommandObjectParsed(
             interpreter, "watchpoint list",
-            "List all watchpoints at configurable levels of detail.", nullptr),
+            "List all watchpoints at configurable levels of detail.", nullptr,
+            eCommandRequiresTarget),
         m_options() {
     CommandArgumentEntry arg;
     CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
@@ -199,9 +190,7 @@
         m_level = lldb::eDescriptionLevelVerbose;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -222,12 +211,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-    if (target == nullptr) {
-      result.AppendError("Invalid target. No current target or watchpoints.");
-      result.SetStatus(eReturnStatusSuccessFinishNoResult);
-      return true;
-    }
+    Target *target = &GetSelectedTarget();
 
     if (target->GetProcessSP() && target->GetProcessSP()->IsAlive()) {
       uint32_t num_supported_hardware_watchpoints;
@@ -297,7 +281,7 @@
       : CommandObjectParsed(interpreter, "enable",
                             "Enable the specified disabled watchpoint(s). If "
                             "no watchpoints are specified, enable all of them.",
-                            nullptr) {
+                            nullptr, eCommandRequiresTarget) {
     CommandArgumentEntry arg;
     CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
                                       eArgTypeWatchpointIDRange);
@@ -310,7 +294,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
+    Target *target = &GetSelectedTarget();
     if (!CheckTargetForWatchpointOperations(target, result))
       return false;
 
@@ -367,7 +351,7 @@
                             "Disable the specified watchpoint(s) without "
                             "removing it/them.  If no watchpoints are "
                             "specified, disable them all.",
-                            nullptr) {
+                            nullptr, eCommandRequiresTarget) {
     CommandArgumentEntry arg;
     CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
                                       eArgTypeWatchpointIDRange);
@@ -380,7 +364,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
+    Target *target = &GetSelectedTarget();
     if (!CheckTargetForWatchpointOperations(target, result))
       return false;
 
@@ -431,6 +415,10 @@
 };
 
 // CommandObjectWatchpointDelete
+#define LLDB_OPTIONS_watchpoint_delete
+#include "CommandOptions.inc"
+
+// CommandObjectWatchpointDelete
 #pragma mark Delete
 
 class CommandObjectWatchpointDelete : public CommandObjectParsed {
@@ -439,7 +427,8 @@
       : CommandObjectParsed(interpreter, "watchpoint delete",
                             "Delete the specified watchpoint(s).  If no "
                             "watchpoints are specified, delete them all.",
-                            nullptr) {
+                            nullptr, eCommandRequiresTarget),
+        m_options() {
     CommandArgumentEntry arg;
     CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
                                       eArgTypeWatchpointIDRange);
@@ -450,9 +439,44 @@
 
   ~CommandObjectWatchpointDelete() override = default;
 
+  Options *GetOptions() override { return &m_options; }
+
+  class CommandOptions : public Options {
+  public:
+    CommandOptions() : Options(), m_force(false) {}
+
+    ~CommandOptions() override = default;
+
+    Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
+                          ExecutionContext *execution_context) override {
+      const int short_option = m_getopt_table[option_idx].val;
+
+      switch (short_option) {
+      case 'f':
+        m_force = true;
+        break;
+      default:
+        llvm_unreachable("Unimplemented option");
+      }
+
+      return {};
+    }
+
+    void OptionParsingStarting(ExecutionContext *execution_context) override {
+      m_force = false;
+    }
+
+    llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
+      return llvm::makeArrayRef(g_watchpoint_delete_options);
+    }
+
+    // Instance variables to hold the values for command options.
+    bool m_force;
+  };
+
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
+    Target *target = &GetSelectedTarget();
     if (!CheckTargetForWatchpointOperations(target, result))
       return false;
 
@@ -469,8 +493,9 @@
       return false;
     }
 
-    if (command.GetArgumentCount() == 0) {
-      if (!m_interpreter.Confirm(
+    if (command.empty()) {
+      if (!m_options.m_force &&
+          !m_interpreter.Confirm(
               "About to delete all watchpoints, do you want to do that?",
               true)) {
         result.AppendMessage("Operation cancelled...");
@@ -481,36 +506,38 @@
                                        (uint64_t)num_watchpoints);
       }
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
-    } else {
-      // Particular watchpoints selected; delete them.
-      std::vector<uint32_t> wp_ids;
-      if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(
-              target, command, wp_ids)) {
-        result.AppendError("Invalid watchpoints specification.");
-        result.SetStatus(eReturnStatusFailed);
-        return false;
-      }
-
-      int count = 0;
-      const size_t size = wp_ids.size();
-      for (size_t i = 0; i < size; ++i)
-        if (target->RemoveWatchpointByID(wp_ids[i]))
-          ++count;
-      result.AppendMessageWithFormat("%d watchpoints deleted.\n", count);
-      result.SetStatus(eReturnStatusSuccessFinishNoResult);
+      return result.Succeeded();
     }
 
+    // Particular watchpoints selected; delete them.
+    std::vector<uint32_t> wp_ids;
+    if (!CommandObjectMultiwordWatchpoint::VerifyWatchpointIDs(target, command,
+                                                               wp_ids)) {
+      result.AppendError("Invalid watchpoints specification.");
+      result.SetStatus(eReturnStatusFailed);
+      return false;
+    }
+
+    int count = 0;
+    const size_t size = wp_ids.size();
+    for (size_t i = 0; i < size; ++i)
+      if (target->RemoveWatchpointByID(wp_ids[i]))
+        ++count;
+    result.AppendMessageWithFormat("%d watchpoints deleted.\n", count);
+    result.SetStatus(eReturnStatusSuccessFinishNoResult);
+
     return result.Succeeded();
   }
+
+private:
+  CommandOptions m_options;
 };
 
 // CommandObjectWatchpointIgnore
 
 #pragma mark Ignore::CommandOptions
-static constexpr OptionDefinition g_watchpoint_ignore_options[] = {
 #define LLDB_OPTIONS_watchpoint_ignore
 #include "CommandOptions.inc"
-};
 
 class CommandObjectWatchpointIgnore : public CommandObjectParsed {
 public:
@@ -518,7 +545,7 @@
       : CommandObjectParsed(interpreter, "watchpoint ignore",
                             "Set ignore count on the specified watchpoint(s).  "
                             "If no watchpoints are specified, set them all.",
-                            nullptr),
+                            nullptr, eCommandRequiresTarget),
         m_options() {
     CommandArgumentEntry arg;
     CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
@@ -550,9 +577,7 @@
                                          option_arg.str().c_str());
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -573,7 +598,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
+    Target *target = &GetSelectedTarget();
     if (!CheckTargetForWatchpointOperations(target, result))
       return false;
 
@@ -625,11 +650,8 @@
 // CommandObjectWatchpointModify
 
 #pragma mark Modify::CommandOptions
-
-static constexpr OptionDefinition g_watchpoint_modify_options[] = {
 #define LLDB_OPTIONS_watchpoint_modify
 #include "CommandOptions.inc"
-};
 
 #pragma mark Modify
 
@@ -643,7 +665,7 @@
             "If no watchpoint is specified, act on the last created "
             "watchpoint.  "
             "Passing an empty argument clears the modification.",
-            nullptr),
+            nullptr, eCommandRequiresTarget),
         m_options() {
     CommandArgumentEntry arg;
     CommandObject::AddIDsArgumentData(arg, eArgTypeWatchpointID,
@@ -674,9 +696,7 @@
         m_condition_passed = true;
         break;
       default:
-        error.SetErrorStringWithFormat("unrecognized option '%c'",
-                                       short_option);
-        break;
+        llvm_unreachable("Unimplemented option");
       }
 
       return error;
@@ -699,7 +719,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
+    Target *target = &GetSelectedTarget();
     if (!CheckTargetForWatchpointOperations(target, result))
       return false;
 
@@ -808,12 +828,12 @@
 protected:
   static size_t GetVariableCallback(void *baton, const char *name,
                                     VariableList &variable_list) {
+    size_t old_size = variable_list.GetSize();
     Target *target = static_cast<Target *>(baton);
-    if (target) {
-      return target->GetImages().FindGlobalVariables(ConstString(name),
-                                                     UINT32_MAX, variable_list);
-    }
-    return 0;
+    if (target)
+      target->GetImages().FindGlobalVariables(ConstString(name), UINT32_MAX,
+                                              variable_list);
+    return variable_list.GetSize() - old_size;
   }
 
   bool DoExecute(Args &command, CommandReturnObject &result) override {
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.h b/src/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.h
index f21796e..4f4f80b 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectWatchpoint.h
@@ -9,10 +9,8 @@
 #ifndef liblldb_CommandObjectWatchpoint_h_
 #define liblldb_CommandObjectWatchpoint_h_
 
-
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 #include "lldb/Interpreter/OptionGroupWatchpoint.h"
-#include "lldb/Interpreter/Options.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/src/llvm-project/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index 2be0b5b..1b83e88 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -18,34 +18,42 @@
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/OptionArgParser.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/State.h"
 
 using namespace lldb;
 using namespace lldb_private;
 
-// CommandObjectWatchpointCommandAdd
-
 // FIXME: "script-type" needs to have its contents determined dynamically, so
-// somebody can add a new scripting
-// language to lldb and have it pickable here without having to change this
-// enumeration by hand and rebuild lldb proper.
-
+// somebody can add a new scripting language to lldb and have it pickable here
+// without having to change this enumeration by hand and rebuild lldb proper.
 static constexpr OptionEnumValueElement g_script_option_enumeration[] = {
-    {eScriptLanguageNone, "command",
-     "Commands are in the lldb command interpreter language"},
-    {eScriptLanguagePython, "python", "Commands are in the Python language."},
-    {eSortOrderByName, "default-script",
-     "Commands are in the default scripting language."} };
+    {
+        eScriptLanguageNone,
+        "command",
+        "Commands are in the lldb command interpreter language",
+    },
+    {
+        eScriptLanguagePython,
+        "python",
+        "Commands are in the Python language.",
+    },
+    {
+        eScriptLanguageLua,
+        "lua",
+        "Commands are in the Python language.",
+    },
+    {
+        eSortOrderByName,
+        "default-script",
+        "Commands are in the default scripting language.",
+    },
+};
 
 static constexpr OptionEnumValues ScriptOptionEnum() {
   return OptionEnumValues(g_script_option_enumeration);
 }
 
-static constexpr OptionDefinition g_watchpoint_command_add_options[] = {
 #define LLDB_OPTIONS_watchpoint_command_add
 #include "CommandOptions.inc"
-};
 
 class CommandObjectWatchpointCommandAdd : public CommandObjectParsed,
                                           public IOHandlerDelegateMultiline {
@@ -54,7 +62,7 @@
       : CommandObjectParsed(interpreter, "add",
                             "Add a set of LLDB commands to a watchpoint, to be "
                             "executed whenever the watchpoint is hit.",
-                            nullptr),
+                            nullptr, eCommandRequiresTarget),
         IOHandlerDelegateMultiline("DONE",
                                    IOHandlerDelegate::Completion::LLDBCommand),
         m_options() {
@@ -202,7 +210,7 @@
   Options *GetOptions() override { return &m_options; }
 
   void IOHandlerActivated(IOHandler &io_handler, bool interactive) override {
-    StreamFileSP output_sp(io_handler.GetOutputStreamFile());
+    StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
     if (output_sp && interactive) {
       output_sp->PutCString(
           "Enter your debugger command(s).  Type 'DONE' to end.\n");
@@ -235,7 +243,6 @@
     m_interpreter.GetLLDBCommandsFromIOHandler(
         "> ",        // Prompt
         *this,       // IOHandlerDelegate
-        true,        // Run IOHandler in async mode
         wp_options); // Baton for the "io_handler" that will be passed back into
                      // our IOHandlerDelegate functions
   }
@@ -328,8 +335,16 @@
             option_arg, GetDefinitions()[option_idx].enum_values,
             eScriptLanguageNone, error);
 
-        m_use_script_language = (m_script_language == eScriptLanguagePython ||
-                                 m_script_language == eScriptLanguageDefault);
+        switch (m_script_language) {
+        case eScriptLanguagePython:
+        case eScriptLanguageLua:
+          m_use_script_language = true;
+          break;
+        case eScriptLanguageNone:
+        case eScriptLanguageUnknown:
+          m_use_script_language = false;
+          break;
+        }
         break;
 
       case 'e': {
@@ -344,12 +359,11 @@
 
       case 'F':
         m_use_one_liner = false;
-        m_use_script_language = true;
         m_function_name.assign(option_arg);
         break;
 
       default:
-        break;
+        llvm_unreachable("Unimplemented option");
       }
       return error;
     }
@@ -384,14 +398,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-
-    if (target == nullptr) {
-      result.AppendError("There is not a current executable; there are no "
-                         "watchpoints to which to add commands");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target *target = &GetSelectedTarget();
 
     const WatchpointList &watchpoints = target->GetWatchpointList();
     size_t num_watchpoints = watchpoints.GetSize();
@@ -402,12 +409,11 @@
       return false;
     }
 
-    if (!m_options.m_use_script_language &&
-        !m_options.m_function_name.empty()) {
-      result.AppendError("need to enable scripting to have a function run as a "
-                         "watchpoint command");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
+    if (!m_options.m_function_name.empty()) {
+      if (!m_options.m_use_script_language) {
+        m_options.m_script_language = GetDebugger().GetScriptLanguage();
+        m_options.m_use_script_language = true;
+      }
     }
 
     std::vector<uint32_t> valid_wp_ids;
@@ -437,9 +443,11 @@
         // to set or collect command callback.  Otherwise, call the methods
         // associated with this object.
         if (m_options.m_use_script_language) {
+          ScriptInterpreter *script_interp = GetDebugger().GetScriptInterpreter(
+              /*can_create=*/true, m_options.m_script_language);
           // Special handling for one-liner specified inline.
           if (m_options.m_use_one_liner) {
-            GetDebugger().GetScriptInterpreter()->SetWatchpointCommandCallback(
+            script_interp->SetWatchpointCommandCallback(
                 wp_options, m_options.m_one_liner.c_str());
           }
           // Special handling for using a Python function by name instead of
@@ -449,12 +457,11 @@
           else if (!m_options.m_function_name.empty()) {
             std::string oneliner(m_options.m_function_name);
             oneliner += "(frame, wp, internal_dict)";
-            GetDebugger().GetScriptInterpreter()->SetWatchpointCommandCallback(
+            script_interp->SetWatchpointCommandCallback(
                 wp_options, oneliner.c_str());
           } else {
-            GetDebugger()
-                .GetScriptInterpreter()
-                ->CollectDataForWatchpointCommandCallback(wp_options, result);
+            script_interp->CollectDataForWatchpointCommandCallback(wp_options,
+                                                                   result);
           }
         } else {
           // Special handling for one-liner specified inline.
@@ -481,7 +488,7 @@
   CommandObjectWatchpointCommandDelete(CommandInterpreter &interpreter)
       : CommandObjectParsed(interpreter, "delete",
                             "Delete the set of commands from a watchpoint.",
-                            nullptr) {
+                            nullptr, eCommandRequiresTarget) {
     CommandArgumentEntry arg;
     CommandArgumentData wp_id_arg;
 
@@ -501,14 +508,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-
-    if (target == nullptr) {
-      result.AppendError("There is not a current executable; there are no "
-                         "watchpoints from which to delete commands");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target *target = &GetSelectedTarget();
 
     const WatchpointList &watchpoints = target->GetWatchpointList();
     size_t num_watchpoints = watchpoints.GetSize();
@@ -557,10 +557,10 @@
 class CommandObjectWatchpointCommandList : public CommandObjectParsed {
 public:
   CommandObjectWatchpointCommandList(CommandInterpreter &interpreter)
-      : CommandObjectParsed(interpreter, "list", "List the script or set of "
-                                                 "commands to be executed when "
-                                                 "the watchpoint is hit.",
-                            nullptr) {
+      : CommandObjectParsed(interpreter, "list",
+                            "List the script or set of commands to be executed "
+                            "when the watchpoint is hit.",
+                            nullptr, eCommandRequiresTarget) {
     CommandArgumentEntry arg;
     CommandArgumentData wp_id_arg;
 
@@ -580,14 +580,7 @@
 
 protected:
   bool DoExecute(Args &command, CommandReturnObject &result) override {
-    Target *target = GetDebugger().GetSelectedTarget().get();
-
-    if (target == nullptr) {
-      result.AppendError("There is not a current executable; there are no "
-                         "watchpoints for which to list commands");
-      result.SetStatus(eReturnStatusFailed);
-      return false;
-    }
+    Target *target = &GetSelectedTarget();
 
     const WatchpointList &watchpoints = target->GetWatchpointList();
     size_t num_watchpoints = watchpoints.GetSize();
@@ -627,10 +620,10 @@
             const Baton *baton = wp_options->GetBaton();
             if (baton) {
               result.GetOutputStream().Printf("Watchpoint %u:\n", cur_wp_id);
-              result.GetOutputStream().IndentMore();
-              baton->GetDescription(&result.GetOutputStream(),
-                                    eDescriptionLevelFull);
-              result.GetOutputStream().IndentLess();
+              baton->GetDescription(result.GetOutputStream().AsRawOstream(),
+                                    eDescriptionLevelFull,
+                                    result.GetOutputStream().GetIndentLevel() +
+                                        2);
             } else {
               result.AppendMessageWithFormat(
                   "Watchpoint %u does not have an associated command.\n",
diff --git a/src/llvm-project/lldb/source/Commands/CommandObjectWatchpointCommand.h b/src/llvm-project/lldb/source/Commands/CommandObjectWatchpointCommand.h
index f2f15ef..6fbc9c7 100644
--- a/src/llvm-project/lldb/source/Commands/CommandObjectWatchpointCommand.h
+++ b/src/llvm-project/lldb/source/Commands/CommandObjectWatchpointCommand.h
@@ -9,11 +9,7 @@
 #ifndef liblldb_CommandObjectWatchpointCommand_h_
 #define liblldb_CommandObjectWatchpointCommand_h_
 
-
-
 #include "lldb/Interpreter/CommandObjectMultiword.h"
-#include "lldb/Interpreter/Options.h"
-#include "lldb/lldb-types.h"
 
 namespace lldb_private {
 
diff --git a/src/llvm-project/lldb/source/Commands/Options.td b/src/llvm-project/lldb/source/Commands/Options.td
index 9cfbcd2..850df13 100644
--- a/src/llvm-project/lldb/source/Commands/Options.td
+++ b/src/llvm-project/lldb/source/Commands/Options.td
@@ -4,6 +4,8 @@
   def tm_sort : Option<"sort", "s">, Group<1>,
     Desc<"Supply a sort order when dumping the symbol table.">,
     EnumArg<"SortOrder", "OptionEnumValues(g_sort_option_enumeration)">;
+  def tm_smn : Option<"show-mangled-names", "m">, Group<1>,
+    Desc<"Do not demangle symbol names before showing them.">;
 }
 
 let Command = "help" in {
@@ -38,6 +40,8 @@
 }
 
 let Command = "breakpoint list" in {
+  // FIXME: We need to add an "internal" command, and then add this sort of
+  // thing to it. But I need to see it for now, and don't want to wait.
   def blist_internal : Option<"internal", "i">,
     Desc<"Show debugger internal breakpoints">;
   def blist_brief : Option<"brief", "b">, Group<1>,
@@ -52,6 +56,825 @@
     "provided, which prime new targets.">;
 }
 
+let Command = "breakpoint modify" in {
+  def breakpoint_modify_ignore_count : Option<"ignore-count", "i">, Group<1>,
+    Arg<"Count">,
+    Desc<"Set the number of times this breakpoint is skipped before stopping.">;
+  def breakpoint_modify_one_shot : Option<"one-shot", "o">, Group<1>,
+    Arg<"Boolean">,
+    Desc<"The breakpoint is deleted the first time it stop causes a stop.">;
+  def breakpoint_modify_thread_index : Option<"thread-index", "x">, Group<1>,
+    Arg<"ThreadIndex">, Desc<"The breakpoint stops only for the thread whose "
+    "index matches this argument.">;
+  def breakpoint_modify_thread_id : Option<"thread-id", "t">, Group<1>,
+    Arg<"ThreadID">, Desc<"The breakpoint stops only for the thread whose TID "
+    "matches this argument.">;
+  def breakpoint_modify_thread_name : Option<"thread-name", "T">, Group<1>,
+    Arg<"ThreadName">, Desc<"The breakpoint stops only for the thread whose "
+    "thread name matches this argument.">;
+  def breakpoint_modify_queue_name : Option<"queue-name", "q">, Group<1>,
+    Arg<"QueueName">, Desc<"The breakpoint stops only for threads in the queue "
+    "whose name is given by this argument.">;
+  def breakpoint_modify_condition : Option<"condition", "c">, Group<1>,
+    Arg<"Expression">, Desc<"The breakpoint stops only if this condition "
+    "expression evaluates to true.">;
+  def breakpoint_modify_auto_continue : Option<"auto-continue", "G">, Group<1>,
+    Arg<"Boolean">,
+    Desc<"The breakpoint will auto-continue after running its commands.">;
+  def breakpoint_modify_enable : Option<"enable", "e">, Group<2>,
+    Desc<"Enable the breakpoint.">;
+  def breakpoint_modify_disable : Option<"disable", "d">, Group<3>,
+    Desc<"Disable the breakpoint.">;
+  def breakpoint_modify_command : Option<"command", "C">, Group<4>,
+    Arg<"Command">,
+    Desc<"A command to run when the breakpoint is hit, can be provided more "
+    "than once, the commands will get run in order left to right.">;
+}
+
+let Command = "breakpoint dummy" in {
+  def breakpoint_dummy_options_dummy_breakpoints :
+    Option<"dummy-breakpoints", "D">, Group<1>,
+    Desc<"Act on Dummy breakpoints - i.e. breakpoints set before a file is "
+    "provided, which prime new targets.">;
+}
+
+let Command = "breakpoint set" in {
+  def breakpoint_set_shlib : Option<"shlib", "s">, Arg<"ShlibName">,
+    Completion<"Module">, Groups<[1,2,3,4,5,6,7,8,9,11]>, // *not* in group 10
+    Desc<"Set the breakpoint only in this shared library.  Can repeat this "
+    "option multiple times to specify multiple shared libraries.">;
+  def breakpoint_set_hardware : Option<"hardware", "H">,
+    Desc<"Require the breakpoint to use hardware breakpoints.">;
+  def breakpoint_set_file : Option<"file", "f">, Arg<"Filename">,
+    Completion<"SourceFile">, Groups<[1,3,4,5,6,7,8,9,11]>,
+    Desc<"Specifies the source file in which to set this breakpoint.  Note, by "
+    "default lldb only looks for files that are #included if they use the "
+    "standard include file extensions.  To set breakpoints on .c/.cpp/.m/.mm "
+    "files that are #included, set target.inline-breakpoint-strategy to "
+    "\"always\".">;
+  def breakpoint_set_line : Option<"line", "l">, Group<1>, Arg<"LineNum">,
+    Required,
+    Desc<"Specifies the line number on which to set this breakpoint.">;
+  def breakpoint_set_address : Option<"address", "a">, Group<2>,
+    Arg<"AddressOrExpression">, Required,
+    Desc<"Set the breakpoint at the specified address.  If the address maps "
+    "uniquely toa particular binary, then the address will be converted to "
+    "a \"file\"address, so that the breakpoint will track that binary+offset "
+    "no matter where the binary eventually loads.  Alternately, if you also "
+    "specify the module - with the -s option - then the address will be "
+    "treated as a file address in that module, and resolved accordingly.  "
+    "Again, this will allow lldb to track that offset on subsequent reloads. "
+    " The module need not have been loaded at the time you specify this "
+    "breakpoint, and will get resolved when the module is loaded.">;
+  def breakpoint_set_name : Option<"name", "n">, Group<3>, Arg<"FunctionName">,
+    Completion<"Symbol">, Required,
+    Desc<"Set the breakpoint by function name.  Can be repeated multiple times "
+    "to makeone breakpoint for multiple names">;
+  def breakpoint_set_source_regexp_function :
+    Option<"source-regexp-function", "X">, Group<9>, Arg<"FunctionName">,
+    Completion<"Symbol">,
+    Desc<"When used with '-p' limits the source regex to source contained in "
+    "the namedfunctions.  Can be repeated multiple times.">;
+  def breakpoint_set_fullname : Option<"fullname", "F">, Group<4>,
+    Arg<"FullName">, Required, Completion<"Symbol">,
+    Desc<"Set the breakpoint by fully qualified function names. For C++ this "
+    "means namespaces and all arguments, and for Objective-C this means a full "
+    "functionprototype with class and selector.  Can be repeated multiple times"
+    " to make one breakpoint for multiple names.">;
+  def breakpoint_set_selector : Option<"selector", "S">, Group<5>,
+    Arg<"Selector">, Required,
+    Desc<"Set the breakpoint by ObjC selector name. Can be repeated multiple "
+    "times tomake one breakpoint for multiple Selectors.">;
+  def breakpoint_set_method : Option<"method", "M">, Group<6>, Arg<"Method">,
+    Required, Desc<"Set the breakpoint by C++ method names.  Can be repeated "
+    "multiple times tomake one breakpoint for multiple methods.">;
+  def breakpoint_set_func_regex : Option<"func-regex", "r">, Group<7>,
+    Arg<"RegularExpression">, Required, Desc<"Set the breakpoint by function "
+    "name, evaluating a regular-expression to findthe function name(s).">;
+  def breakpoint_set_basename : Option<"basename", "b">, Group<8>,
+    Arg<"FunctionName">, Required, Completion<"Symbol">,
+    Desc<"Set the breakpoint by function basename (C++ namespaces and arguments"
+    " will beignored).  Can be repeated multiple times to make one breakpoint "
+    "for multiplesymbols.">;
+  def breakpoint_set_source_pattern_regexp :
+    Option<"source-pattern-regexp", "p">, Group<9>, Arg<"RegularExpression">,
+    Required, Desc<"Set the breakpoint by specifying a regular expression which"
+    " is matched against the source text in a source file or files specified "
+    "with the -f can be specified more than once.  If no source files "
+    "are specified, uses the current \"default source file\".  If you want to "
+    "match against all source files, pass the \"--all-files\" option.">;
+  def breakpoint_set_all_files : Option<"all-files", "A">, Group<9>,
+    Desc<"All files are searched for source pattern matches.">;
+  def breakpoint_set_language_exception : Option<"language-exception", "E">,
+    Group<10>, Arg<"Language">, Required,
+    Desc<"Set the breakpoint on exceptions thrown by the specified language "
+    "(without options, on throw but not catch.)">;
+  def breakpoint_set_on_throw : Option<"on-throw", "w">, Group<10>,
+    Arg<"Boolean">, Desc<"Set the breakpoint on exception throW.">;
+  def breakpoint_set_on_catch : Option<"on-catch", "h">, Group<10>,
+    Arg<"Boolean">, Desc<"Set the breakpoint on exception catcH.">;
+  def breakpoint_set_language : Option<"language", "L">, GroupRange<3, 8>,
+    Arg<"Language">,
+    Desc<"Specifies the Language to use when interpreting the breakpoint's "
+    "expression (note: currently only implemented for setting breakpoints on "
+    "identifiers). If not set the target.language setting is used.">;
+  def breakpoint_set_skip_prologue : Option<"skip-prologue", "K">,
+    Arg<"Boolean">, Groups<[1,3,4,5,6,7,8]>,
+    Desc<"sKip the prologue if the breakpoint is at the beginning of a "
+    "function. If not set the target.skip-prologue setting is used.">;
+  def breakpoint_set_breakpoint_name : Option<"breakpoint-name", "N">,
+    Arg<"BreakpointName">,
+    Desc<"Adds this to the list of names for this breakpoint.">;
+  def breakpoint_set_address_slide : Option<"address-slide", "R">,
+    Arg<"Address">, Groups<[1,3,4,5,6,7,8]>,
+    Desc<"Add the specified offset to whatever address(es) the breakpoint "
+    "resolves to. At present this applies the offset directly as given, and "
+    "doesn't try to align it to instruction boundaries.">;
+  def breakpoint_set_move_to_nearest_code : Option<"move-to-nearest-code", "m">,
+    Groups<[1, 9]>, Arg<"Boolean">,
+    Desc<"Move breakpoints to nearest code. If not set the "
+    "target.move-to-nearest-codesetting is used.">;
+  /* Don't add this option till it actually does something useful...
+  def breakpoint_set_exception_typename : Option<"exception-typename", "O">,
+    Arg<"TypeName">, Desc<"The breakpoint will only stop if an "
+    "exception Object of this type is thrown.  Can be repeated multiple times "
+    "to stop for multiple object types">;
+   */
+}
+
+let Command = "breakpoint clear" in {
+  def breakpoint_clear_file : Option<"file", "f">, Group<1>, Arg<"Filename">,
+    Completion<"SourceFile">,
+    Desc<"Specify the breakpoint by source location in this particular file.">;
+  def breakpoint_clear_line : Option<"line", "l">, Group<1>, Arg<"LineNum">,
+    Required,
+    Desc<"Specify the breakpoint by source location at this particular line.">;
+}
+
+let Command = "breakpoint delete" in {
+  def breakpoint_delete_force : Option<"force", "f">, Group<1>,
+    Desc<"Delete all breakpoints without querying for confirmation.">;
+  def breakpoint_delete_dummy_breakpoints : Option<"dummy-breakpoints", "D">,
+    Group<1>, Desc<"Delete Dummy breakpoints - i.e. breakpoints set before a "
+    "file is provided, which prime new targets.">;
+}
+
+let Command = "breakpoint name" in {
+  def breakpoint_name_name : Option<"name", "N">, Group<1>,
+    Arg<"BreakpointName">, Desc<"Specifies a breakpoint name to use.">;
+  def breakpoint_name_breakpoint_id : Option<"breakpoint-id", "B">, Group<2>,
+    Arg<"BreakpointID">, Desc<"Specify a breakpoint ID to use.">;
+  def breakpoint_name_dummy_breakpoints : Option<"dummy-breakpoints", "D">,
+    Group<3>, Desc<"Operate on Dummy breakpoints - i.e. breakpoints set before "
+    "a file is provided, which prime new targets.">;
+  def breakpoint_name_help_string : Option<"help-string", "H">, Group<4>,
+    Arg<"None">, Desc<"A help string describing the purpose of this name.">;
+}
+
+let Command = "breakpoint access" in {
+  def breakpoint_access_allow_list : Option<"allow-list", "L">, Group<1>,
+    Arg<"Boolean">, Desc<"Determines whether the breakpoint will show up in "
+    "break list if not referred to explicitly.">;
+  def breakpoint_access_allow_disable : Option<"allow-disable", "A">, Group<2>,
+    Arg<"Boolean">, Desc<"Determines whether the breakpoint can be disabled by "
+    "name or when all breakpoints are disabled.">;
+  def breakpoint_access_allow_delete : Option<"allow-delete", "D">, Group<3>,
+    Arg<"Boolean">, Desc<"Determines whether the breakpoint can be deleted by "
+    "name or when all breakpoints are deleted.">;
+}
+
+let Command = "breakpoint read" in {
+  def breakpoint_read_file : Option<"file", "f">, Arg<"Filename">, Required,
+    Completion<"DiskFile">,
+    Desc<"The file from which to read the breakpoints.">;
+  def breakpoint_read_breakpoint_name : Option<"breakpoint-name", "N">,
+    Arg<"BreakpointName">, Desc<"Only read in breakpoints with this name.">;
+}
+
+let Command = "breakpoint write" in {
+  def breakpoint_write_file : Option<"file", "f">, Arg<"Filename">, Required,
+    Completion<"DiskFile">,
+    Desc<"The file into which to write the breakpoints.">;
+  def breakpoint_write_append : Option<"append", "a">,
+    Desc<"Append to saved breakpoints file if it exists.">;
+}
+
+let Command = "breakpoint command add" in {
+  def breakpoint_add_one_liner : Option<"one-liner", "o">, Group<1>,
+    Arg<"OneLiner">, Desc<"Specify a one-line breakpoint command inline. Be "
+    "sure to surround it with quotes.">;
+  def breakpoint_add_stop_on_error : Option<"stop-on-error", "e">,
+    Arg<"Boolean">, Desc<"Specify whether breakpoint command execution should "
+    "terminate on error.">;
+  def breakpoint_add_script_type : Option<"script-type", "s">,
+    EnumArg<"None", "ScriptOptionEnum()">,
+    Desc<"Specify the language for the commands - if none is specified, the "
+    "lldb command interpreter will be used.">;
+  def breakpoint_add_dummy_breakpoints : Option<"dummy-breakpoints", "D">,
+    Desc<"Sets Dummy breakpoints - i.e. breakpoints set before a file is "
+    "provided, which prime new targets.">;
+}
+
+let Command = "breakpoint command delete" in {
+  def breakpoint_command_delete_dummy_breakpoints :
+    Option<"dummy-breakpoints", "D">, Group<1>,
+    Desc<"Delete commands from Dummy breakpoints - i.e. breakpoints set before "
+    "a file is provided, which prime new targets.">;
+}
+
+let Command = "disassemble" in {
+  def disassemble_options_bytes : Option<"bytes", "b">,
+    Desc<"Show opcode bytes when disassembling.">;
+  def disassemble_options_context : Option<"context", "C">, Arg<"NumLines">,
+    Desc<"Number of context lines of source to show.">;
+  def disassemble_options_mixed : Option<"mixed", "m">,
+    Desc<"Enable mixed source and assembly display.">;
+  def disassemble_options_raw : Option<"raw", "r">,
+    Desc<"Print raw disassembly with no symbol information.">;
+  def disassemble_options_plugin : Option<"plugin", "P">, Arg<"Plugin">,
+    Desc<"Name of the disassembler plugin you want to use.">;
+  def disassemble_options_flavor : Option<"flavor", "F">,
+    Arg<"DisassemblyFlavor">, Desc<"Name of the disassembly flavor you want to "
+    "use. Currently the only valid options are default, and for Intel "
+    "architectures, att and intel.">;
+  def disassemble_options_arch : Option<"arch", "A">, Arg<"Architecture">,
+    Desc<"Specify the architecture to use from cross disassembly.">;
+  def disassemble_options_start_address : Option<"start-address", "s">,
+    Groups<[1,2]>, Arg<"AddressOrExpression">, Required,
+    Desc<"Address at which to start disassembling.">;
+  def disassemble_options_end_address : Option<"end-address", "e">, Group<1>,
+    Arg<"AddressOrExpression">, Desc<"Address at which to end disassembling.">;
+  def disassemble_options_count : Option<"count", "c">, Groups<[2,3,4,5]>,
+    Arg<"NumLines">, Desc<"Number of instructions to display.">;
+  def disassemble_options_name : Option<"name", "n">, Group<3>,
+    Arg<"FunctionName">, Completion<"Symbol">,
+    Desc<"Disassemble entire contents of the given function name.">;
+  def disassemble_options_frame : Option<"frame", "f">, Group<4>,
+    Desc<"Disassemble from the start of the current frame's function.">;
+  def disassemble_options_pc : Option<"pc", "p">, Group<5>,
+    Desc<"Disassemble around the current pc.">;
+  def disassemble_options_line : Option<"line", "l">, Group<6>,
+    Desc<"Disassemble the current frame's current source line instructions if"
+    "there is debug line table information, else disassemble around the pc.">;
+  def disassemble_options_address : Option<"address", "a">, Group<7>,
+    Arg<"AddressOrExpression">,
+    Desc<"Disassemble function containing this address.">;
+}
+
+let Command = "expression" in {
+  def expression_options_all_threads : Option<"all-threads", "a">,
+    Groups<[1,2]>, Arg<"Boolean">, Desc<"Should we run all threads if the "
+    "execution doesn't complete on one thread.">;
+  def expression_options_ignore_breakpoints : Option<"ignore-breakpoints", "i">,
+    Groups<[1,2]>, Arg<"Boolean">,
+    Desc<"Ignore breakpoint hits while running expressions">;
+  def expression_options_timeout : Option<"timeout", "t">, Groups<[1,2]>,
+    Arg<"UnsignedInteger">,
+    Desc<"Timeout value (in microseconds) for running the expression.">;
+  def expression_options_unwind_on_error : Option<"unwind-on-error", "u">,
+    Groups<[1,2]>, Arg<"Boolean">,
+    Desc<"Clean up program state if the expression causes a crash, or raises a "
+    "signal. Note, unlike gdb hitting a breakpoint is controlled by another "
+    "option (-i).">;
+  def expression_options_debug : Option<"debug", "g">, Groups<[1,2]>,
+    Desc<"When specified, debug the JIT code by setting a breakpoint on the "
+    "first instruction and forcing breakpoints to not be ignored (-i0) and no "
+    "unwinding to happen on error (-u0).">;
+  def expression_options_language : Option<"language", "l">, Groups<[1,2]>,
+    Arg<"Language">, Desc<"Specifies the Language to use when parsing the "
+    "expression.  If not set the target.language setting is used.">;
+  def expression_options_apply_fixits : Option<"apply-fixits", "X">,
+    Groups<[1,2]>, Arg<"Language">, Desc<"If true, simple fix-it hints will be "
+    "automatically applied to the expression.">;
+  def expression_options_description_verbosity :
+    Option<"description-verbosity", "v">, Group<1>,
+    OptionalEnumArg<"DescriptionVerbosity", "DescriptionVerbosityTypes()">,
+    Desc<"How verbose should the output of this expression be, if the object "
+    "description is asked for.">;
+  def expression_options_top_level : Option<"top-level", "p">, Groups<[1,2]>,
+    Desc<"Interpret the expression as a complete translation unit, without "
+    "injecting it into the local context.  Allows declaration of persistent, "
+    "top-level entities without a $ prefix.">;
+  def expression_options_allow_jit : Option<"allow-jit", "j">, Groups<[1,2]>,
+    Arg<"Boolean">,
+    Desc<"Controls whether the expression can fall back to being JITted if it's"
+    "not supported by the interpreter (defaults to true).">;
+}
+
+let Command = "frame diag" in {
+  def frame_diag_register : Option<"register", "r">, Group<1>,
+    Arg<"RegisterName">, Desc<"A register to diagnose.">;
+  def frame_diag_address : Option<"address", "a">, Group<1>, Arg<"Address">,
+    Desc<"An address to diagnose.">;
+  def frame_diag_offset : Option<"offset", "o">, Group<1>, Arg<"Offset">,
+    Desc<"An optional offset.  Requires --register.">;
+}
+
+let Command = "frame select" in {
+  def frame_select_relative : Option<"relative", "r">, Group<1>, Arg<"Offset">,
+    Desc<"A relative frame index offset from the current frame index.">;
+}
+
+let Command = "frame recognizer add" in {
+  def frame_recognizer_shlib : Option<"shlib", "s">, Arg<"ShlibName">,
+    Completion<"Module">,
+    Desc<"Name of the module or shared library that this recognizer applies "
+    "to.">;
+  def frame_recognizer_function : Option<"function", "n">, Arg<"Name">,
+    Completion<"Symbol">,
+    Desc<"Name of the function that this recognizer applies to.">;
+  def frame_recognizer_python_class : Option<"python-class", "l">, Group<2>,
+    Arg<"PythonClass">,
+    Desc<"Give the name of a Python class to use for this frame recognizer.">;
+  def frame_recognizer_regex : Option<"regex", "x">,
+    Desc<"Function name and module name are actually regular expressions.">;
+}
+
+let Command = "history" in {
+  def history_count : Option<"count", "c">, Group<1>, Arg<"UnsignedInteger">,
+    Desc<"How many history commands to print.">;
+  def history_start_index : Option<"start-index", "s">, Group<1>,
+    Arg<"UnsignedInteger">, Desc<"Index at which to start printing history "
+    "commands (or end to mean tail mode).">;
+  def history_end_index : Option<"end-index", "e">, Group<1>,
+    Arg<"UnsignedInteger">,
+    Desc<"Index at which to stop printing history commands.">;
+  def history_clear : Option<"clear", "C">, Group<2>,
+    Desc<"Clears the current command history.">;
+}
+
+let Command = "log" in {
+  def log_file : Option<"file", "f">, Group<1>, Arg<"Filename">,
+    Desc<"Set the destination file to log to.">;
+  def log_threadsafe : Option<"threadsafe", "t">, Group<1>,
+    Desc<"Enable thread safe logging to avoid interweaved log lines.">;
+  def log_verbose : Option<"verbose", "v">, Group<1>,
+    Desc<"Enable verbose logging.">;
+  def log_sequence : Option<"sequence", "s">, Group<1>,
+    Desc<"Prepend all log lines with an increasing integer sequence id.">;
+  def log_timestamp : Option<"timestamp", "T">, Group<1>,
+    Desc<"Prepend all log lines with a timestamp.">;
+  def log_pid_tid : Option<"pid-tid", "p">, Group<1>,
+    Desc<"Prepend all log lines with the process and thread ID that generates "
+    "the log line.">;
+  def log_thread_name : Option<"thread-name", "n">, Group<1>,
+    Desc<"Prepend all log lines with the thread name for the thread that "
+    "generates the log line.">;
+
+  def log_stack : Option<"stack", "S">, Group<1>,
+    Desc<"Append a stack backtrace to each log line.">;
+  def log_append : Option<"append", "a">, Group<1>,
+    Desc<"Append to the log file instead of overwriting.">;
+  def log_file_function : Option<"file-function", "F">, Group<1>,
+    Desc<"Prepend the names of files and function that generate the logs.">;
+}
+
+let Command = "reproducer dump" in {
+  def reproducer_provider : Option<"provider", "p">, Group<1>,
+    EnumArg<"None", "ReproducerProviderType()">,
+    Required, Desc<"The reproducer provider to dump.">;
+  def reproducer_file : Option<"file", "f">, Group<1>, Arg<"Filename">,
+    Desc<"The reproducer path. If a reproducer is replayed and no path is "
+    "provided, that reproducer is dumped.">;
+}
+
+let Command = "reproducer xcrash" in {
+  def reproducer_signal : Option<"signal", "s">, Group<1>,
+    EnumArg<"None", "ReproducerSignalType()">,
+    Required, Desc<"The signal to crash the debugger.">;
+}
+
+let Command = "memory read" in {
+  def memory_read_num_per_line : Option<"num-per-line", "l">, Group<1>,
+    Arg<"NumberPerLine">, Desc<"The number of items per line to display.">;
+  def memory_read_binary : Option<"binary", "b">, Group<2>,
+    Desc<"If true, memory will be saved as binary. If false, the memory is "
+    "saved save as an ASCII dump that uses the format, size, count and number "
+    "per line settings.">;
+  def memory_read_type : Option<"type", "t">, Groups<[3,4]>, Arg<"Name">,
+    Required, Desc<"The name of a type to view memory as.">;
+  def memory_read_language : Option<"language", "x">, Group<4>, Arg<"Language">,
+    Desc<"The language of the type to view memory as.">;
+  def memory_read_offset : Option<"offset", "E">, Group<3>, Arg<"Count">,
+    Desc<"How many elements of the specified type to skip before starting to "
+    "display data.">;
+  def memory_read_force : Option<"force", "r">, Groups<[1,2,3]>,
+    Desc<"Necessary if reading over target.max-memory-read-size bytes.">;
+}
+
+let Command = "memory find" in {
+  def memory_find_expression : Option<"expression", "e">, Group<1>,
+    Arg<"Expression">, Required,
+    Desc<"Evaluate an expression to obtain a byte pattern.">;
+  def memory_find_string : Option<"string", "s">, Group<2>, Arg<"Name">,
+    Required, Desc<"Use text to find a byte pattern.">;
+  def memory_find_count : Option<"count", "c">, Arg<"Count">,
+    Desc<"How many times to perform the search.">;
+  def memory_find_dump_offset : Option<"dump-offset", "o">, Arg<"Offset">,
+    Desc<"When dumping memory for a match, an offset from the match location to"
+    " start dumping from.">;
+}
+
+let Command = "memory write" in {
+  def memory_write_infile : Option<"infile", "i">, Group<1>, Arg<"Filename">,
+    Required, Desc<"Write memory using the contents of a file.">;
+  def memory_write_offset : Option<"offset", "o">, Group<1>, Arg<"Offset">,
+    Desc<"Start writing bytes from an offset within the input file.">;
+}
+
+let Command = "register read" in {
+  def register_read_alternate : Option<"alternate", "A">,
+    Desc<"Display register names using the alternate register name if there "
+    "is one.">;
+  def register_read_set : Option<"set", "s">, Group<1>, Arg<"Index">,
+    Desc<"Specify which register sets to dump by index.">;
+  def register_read_all : Option<"all", "a">, Group<2>,
+    Desc<"Show all register sets.">;
+}
+
+let Command = "source" in {
+  def source_stop_on_error : Option<"stop-on-error", "e">, Arg<"Boolean">,
+    Desc<"If true, stop executing commands on error.">;
+  def source_stop_on_continue : Option<"stop-on-continue", "c">, Arg<"Boolean">,
+    Desc<"If true, stop executing commands on continue.">;
+  def source_silent_run : Option<"silent-run", "s">, Arg<"Boolean">,
+    Desc<"If true don't echo commands while executing.">;
+}
+
+let Command = "alias" in {
+  def alias_help : Option<"help", "h">, Arg<"HelpText">,
+    Desc<"Help text for this command">;
+  def alias_long_help : Option<"long-help", "H">, Arg<"HelpText">,
+    Desc<"Long help text for this command">;
+}
+
+let Command = "regex" in {
+  def regex_help : Option<"help", "h">, Group<1>, Arg<"None">,
+    Desc<"The help text to display for this command.">;
+  def regex_syntax : Option<"syntax", "s">, Group<1>, Arg<"None">,
+    Desc<"A syntax string showing the typical usage syntax.">;
+}
+
+let Command = "permissions" in {
+  def permissions_permissions_value : Option<"permissions-value", "v">,
+    Arg<"PermissionsNumber">,
+    Desc<"Give out the numeric value for permissions (e.g. 757)">;
+  def permissions_permissions_string : Option<"permissions-string", "s">,
+    Arg<"PermissionsString">,
+    Desc<"Give out the string value for permissions (e.g. rwxr-xr--).">;
+  def permissions_user_read : Option<"user-read", "r">,
+    Desc<"Allow user to read.">;
+  def permissions_user_write : Option<"user-write", "w">,
+    Desc<"Allow user to write.">;
+  def permissions_user_exec : Option<"user-exec", "x">,
+    Desc<"Allow user to execute.">;
+  def permissions_group_read : Option<"group-read", "R">,
+    Desc<"Allow group to read.">;
+  def permissions_group_write : Option<"group-write", "W">,
+    Desc<"Allow group to write.">;
+  def permissions_group_exec : Option<"group-exec", "X">,
+    Desc<"Allow group to execute.">;
+  def permissions_world_read : Option<"world-read", "d">,
+    Desc<"Allow world to read.">;
+  def permissions_world_write : Option<"world-write", "t">,
+    Desc<"Allow world to write.">;
+  def permissions_world_exec : Option<"world-exec", "e">,
+    Desc<"Allow world to execute.">;
+}
+
+let Command = "platform fread" in {
+  def platform_fread_offset : Option<"offset", "o">, Group<1>, Arg<"Index">,
+    Desc<"Offset into the file at which to start reading.">;
+  def platform_fread_count : Option<"count", "c">, Group<1>, Arg<"Count">,
+    Desc<"Number of bytes to read from the file.">;
+}
+
+let Command = "platform fwrite" in {
+  def platform_fwrite_offset : Option<"offset", "o">, Group<1>, Arg<"Index">,
+    Desc<"Offset into the file at which to start reading.">;
+  def platform_fwrite_data : Option<"data", "d">, Group<1>, Arg<"Value">,
+    Desc<"Text to write to the file.">;
+}
+
+let Command = "platform process list" in {
+  def platform_process_list_pid : Option<"pid", "p">, Group<1>, Arg<"Pid">,
+    Desc<"List the process info for a specific process ID.">;
+  def platform_process_list_name : Option<"name", "n">, Group<2>,
+    Arg<"ProcessName">, Required,
+    Desc<"Find processes with executable basenames that match a string.">;
+  def platform_process_list_ends_with : Option<"ends-with", "e">, Group<3>,
+  Arg<"ProcessName">, Required,
+    Desc<"Find processes with executable basenames that end with a string.">;
+  def platform_process_list_starts_with : Option<"starts-with", "s">, Group<4>,
+    Arg<"ProcessName">, Required,
+    Desc<"Find processes with executable basenames that start with a string.">;
+  def platform_process_list_contains : Option<"contains", "c">, Group<5>,
+    Arg<"ProcessName">, Required,
+    Desc<"Find processes with executable basenames that contain a string.">;
+  def platform_process_list_regex : Option<"regex", "r">, Group<6>,
+    Arg<"RegularExpression">, Required,
+    Desc<"Find processes with executable basenames that match a regular "
+    "expression.">;
+  def platform_process_list_parent : Option<"parent", "P">, GroupRange<2, 6>,
+    Arg<"Pid">, Desc<"Find processes that have a matching parent process ID.">;
+  def platform_process_list_uid : Option<"uid", "u">, GroupRange<2, 6>,
+    Arg<"UnsignedInteger">, Validator<"&posix_validator">,
+    Desc<"Find processes that have a matching user ID.">;
+  def platform_process_list_euid : Option<"euid", "U">, GroupRange<2, 6>,
+    Arg<"UnsignedInteger">, Validator<"&posix_validator">,
+    Desc<"Find processes that have a matching effective user ID.">;
+  def platform_process_list_gid : Option<"gid", "g">, GroupRange<2, 6>,
+    Arg<"UnsignedInteger">, Validator<"&posix_validator">,
+    Desc<"Find processes that have a matching group ID.">;
+  def platform_process_list_egid : Option<"egid", "G">, GroupRange<2, 6>,
+    Arg<"UnsignedInteger">, Validator<"&posix_validator">,
+    Desc<"Find processes that have a matching effective group ID.">;
+  def platform_process_list_arch : Option<"arch", "a">, GroupRange<2, 6>,
+    Arg<"Architecture">,
+    Desc<"Find processes that have a matching architecture.">;
+  def platform_process_list_show_args : Option<"show-args", "A">,
+    GroupRange<1, 6>,
+    Desc<"Show process arguments instead of the process executable basename.">;
+  def platform_process_list_all_users: Option<"all-users", "x">,
+    GroupRange<1,6>,
+    Desc<"Show processes matching all user IDs.">;
+  def platform_process_list_verbose : Option<"verbose", "v">, GroupRange<1, 6>,
+    Desc<"Enable verbose output.">;
+}
+
+let Command = "platform process attach" in {
+  def platform_process_attach_plugin : Option<"plugin", "P">, Arg<"Plugin">,
+    Desc<"Name of the process plugin you want to use.">;
+  def platform_process_attach_pid : Option<"pid", "p">, Group<1>, Arg<"Pid">,
+    Desc<"The process ID of an existing process to attach to.">;
+  def platform_process_attach_name : Option<"name", "n">, Group<2>,
+    Arg<"ProcessName">, Desc<"The name of the process to attach to.">;
+  def platform_process_attach_waitfor : Option<"waitfor", "w">, Group<2>,
+    Desc<"Wait for the process with <process-name> to launch.">;
+}
+
+let Command = "platform shell" in {
+  def platform_shell_timeout : Option<"timeout", "t">, Arg<"Value">,
+    Desc<"Seconds to wait for the remote host to finish running the command.">;
+}
+
+let Command = "process attach" in {
+  def process_attach_continue : Option<"continue", "c">,
+    Desc<"Immediately continue the process once attached.">;
+  def process_attach_plugin : Option<"plugin", "P">, Arg<"Plugin">,
+    Desc<"Name of the process plugin you want to use.">;
+  def process_attach_pid : Option<"pid", "p">, Group<1>, Arg<"Pid">,
+    Desc<"The process ID of an existing process to attach to.">;
+  def process_attach_name : Option<"name", "n">, Group<2>, Arg<"ProcessName">,
+    Desc<"The name of the process to attach to.">;
+  def process_attach_include_existing : Option<"include-existing", "i">,
+    Group<2>, Desc<"Include existing processes when doing attach -w.">;
+  def process_attach_waitfor : Option<"waitfor", "w">, Group<2>,
+    Desc<"Wait for the process with <process-name> to launch.">;
+}
+
+let Command = "process continue" in {
+  def process_continue_ignore_count : Option<"ignore-count", "i">,
+    Arg<"UnsignedInteger">, Desc<"Ignore <N> crossings of the breakpoint (if it"
+    " exists) for the currently selected thread.">;
+}
+
+let Command = "process detach" in {
+  def process_detach_keep_stopped : Option<"keep-stopped", "s">, Group<1>,
+    Arg<"Boolean">, Desc<"Whether or not the process should be kept stopped on"
+    " detach (if possible).">;
+}
+
+let Command = "process connect" in {
+  def process_connect_plugin : Option<"plugin", "p">, Arg<"Plugin">,
+    Desc<"Name of the process plugin you want to use.">;
+}
+
+let Command = "process load" in {
+  def process_load_install : Option<"install", "i">, OptionalArg<"Path">,
+    Desc<"Install the shared library to the target. If specified without an "
+    "argument then the library will installed in the current working "
+    "directory.">;
+}
+
+let Command = "process handle" in {
+  def process_handle_stop : Option<"stop", "s">, Group<1>, Arg<"Boolean">,
+    Desc<"Whether or not the process should be stopped if the signal is "
+    "received.">;
+  def process_handle_notify : Option<"notify", "n">, Group<1>, Arg<"Boolean">,
+    Desc<"Whether or not the debugger should notify the user if the signal is "
+    "received.">;
+  def process_handle_pass : Option<"pass", "p">, Group<1>, Arg<"Boolean">,
+    Desc<"Whether or not the signal should be passed to the process.">;
+}
+
+let Command = "script import" in {
+  def script_import_allow_reload : Option<"allow-reload", "r">, Group<1>,
+    Desc<"Allow the script to be loaded even if it was already loaded before. "
+    "This argument exists for backwards compatibility, but reloading is always "
+    "allowed, whether you specify it or not.">;
+}
+
+let Command = "script add" in {
+  def script_add_function : Option<"function", "f">, Group<1>,
+    Arg<"PythonFunction">,
+    Desc<"Name of the Python function to bind to this command name.">;
+  def script_add_class : Option<"class", "c">, Group<2>, Arg<"PythonClass">,
+  Desc<"Name of the Python class to bind to this command name.">;
+  def script_add_help : Option<"help", "h">, Group<1>, Arg<"HelpText">,
+  Desc<"The help text to display for this command.">;
+  def script_add_synchronicity : Option<"synchronicity", "s">,
+    EnumArg<"ScriptedCommandSynchronicity", "ScriptSynchroType()">,
+    Desc<"Set the synchronicity of this command's executions with regard to "
+    "LLDB event system.">;
+}
+let Command = "source info" in {
+  def source_info_count : Option<"count", "c">, Arg<"Count">,
+    Desc<"The number of line entries to display.">;
+  def source_info_shlib : Option<"shlib", "s">, Groups<[1,2]>, Arg<"ShlibName">,
+    Completion<"Module">, Desc<"Look up the source in the given module or "
+    "shared library (can be specified more than once).">;
+  def source_info_file : Option<"file", "f">, Group<1>, Arg<"Filename">,
+    Completion<"SourceFile">, Desc<"The file from which to display source.">;
+  def source_info_line : Option<"line", "l">, Group<1>, Arg<"LineNum">,
+    Desc<"The line number at which to start the displaying lines.">;
+  def source_info_end_line : Option<"end-line", "e">, Group<1>, Arg<"LineNum">,
+    Desc<"The line number at which to stop displaying lines.">;
+  def source_info_name : Option<"name", "n">, Group<2>, Arg<"Symbol">,
+    Completion<"Symbol">,
+    Desc<"The name of a function whose source to display.">;
+  def source_info_address : Option<"address", "a">, Group<3>,
+    Arg<"AddressOrExpression">, Desc<"Lookup the address and display the source"
+    " information for the corresponding file and line.">;
+}
+
+let Command = "source list" in {
+  def source_list_count : Option<"count", "c">, Arg<"Count">,
+    Desc<"The number of source lines to display.">;
+  def source_list_shlib : Option<"shlib", "s">, Groups<[1,2]>, Arg<"ShlibName">,
+    Completion<"Module">,
+    Desc<"Look up the source file in the given shared library.">;
+  def source_list_show_breakpoints : Option<"show-breakpoints", "b">,
+    Desc<"Show the line table locations from the debug information that "
+    "indicate valid places to set source level breakpoints.">;
+  def source_list_file : Option<"file", "f">, Group<1>, Arg<"Filename">,
+    Completion<"SourceFile">, Desc<"The file from which to display source.">;
+  def source_list_line : Option<"line", "l">, Group<1>, Arg<"LineNum">,
+    Desc<"The line number at which to start the display source.">;
+  def source_list_name : Option<"name", "n">, Group<2>, Arg<"Symbol">,
+    Completion<"Symbol">,
+    Desc<"The name of a function whose source to display.">;
+  def source_list_address : Option<"address", "a">, Group<3>,
+    Arg<"AddressOrExpression">, Desc<"Lookup the address and display the source"
+    " information for the corresponding file and line.">;
+  def source_list_reverse : Option<"reverse", "r">, Group<4>, Desc<"Reverse the"
+    " listing to look backwards from the last displayed block of source.">;
+}
+
+let Command = "target dependents" in {
+  def dependents_no_dependents : Option<"no-dependents", "d">, Group<1>,
+    OptionalEnumArg<"Value", "OptionEnumValues(g_dependents_enumaration)">,
+    Desc<"Whether or not to load dependents when creating a target. If the "
+         "option is not specified, the value is implicitly 'default'. If the "
+         "option is specified but without a value, the value is implicitly "
+         "'true'.">;
+}
+
+let Command = "target modules dump" in {
+  def target_modules_dump_verbose : Option<"verbose", "v">,
+    Desc<"Enable verbose dump.">;
+}
+
+let Command = "target modules list" in {
+  def target_modules_list_address : Option<"address", "a">, Group<1>,
+    Arg<"AddressOrExpression">, Desc<"Display the image at this address.">;
+  def target_modules_list_arch : Option<"arch", "A">, Group<1>,
+    OptionalArg<"Width">, Desc<"Display the architecture when listing images.">;
+  def target_modules_list_triple : Option<"triple", "t">, Group<1>,
+    OptionalArg<"Width">, Desc<"Display the triple when listing images.">;
+  def target_modules_list_header : Option<"header", "h">, Group<1>,
+    Desc<"Display the image base address as a load address if debugging, a file"
+    " address otherwise.">;
+  def target_modules_list_offset : Option<"offset", "o">, Group<1>,
+    Desc<"Display the image load address offset from the base file address "
+    "(the slide amount).">;
+  def target_modules_list_uuid : Option<"uuid", "u">, Group<1>,
+    Desc<"Display the UUID when listing images.">;
+  def target_modules_list_fullpath : Option<"fullpath", "f">, Group<1>,
+    OptionalArg<"Width">,
+    Desc<"Display the fullpath to the image object file.">;
+  def target_modules_list_directory : Option<"directory", "d">, Group<1>,
+    OptionalArg<"Width">, Desc<"Display the directory with optional width for "
+    "the image object file.">;
+  def target_modules_list_basename : Option<"basename", "b">, Group<1>,
+    OptionalArg<"Width">, Desc<"Display the basename with optional width for "
+    "the image object file.">;
+  def target_modules_list_symfile : Option<"symfile", "s">, Group<1>,
+    OptionalArg<"Width">, Desc<"Display the fullpath to the image symbol file "
+    "with optional width.">;
+  def target_modules_list_symfile_unique : Option<"symfile-unique", "S">,
+    Group<1>, OptionalArg<"Width">, Desc<"Display the symbol file with optional"
+    " width only if it is different from the executable object file.">;
+  def target_modules_list_mod_time : Option<"mod-time", "m">, Group<1>,
+    OptionalArg<"Width">, Desc<"Display the modification time with optional "
+    "width of the module.">;
+  def target_modules_list_ref_count : Option<"ref-count", "r">, Group<1>,
+    OptionalArg<"Width">, Desc<"Display the reference count if the module is "
+    "still in the shared module cache.">;
+  def target_modules_list_pointer : Option<"pointer", "p">, Group<1>,
+    OptionalArg<"None">, Desc<"Display the module pointer.">;
+  def target_modules_list_global : Option<"global", "g">, Group<1>,
+    Desc<"Display the modules from the global module list, not just the "
+    "current target.">;
+}
+
+let Command = "target modules show unwind" in {
+  def target_modules_show_unwind_name : Option<"name", "n">, Group<1>,
+    Arg<"FunctionName">,
+    Desc<"Show unwind instructions for a function or symbol name.">;
+  def target_modules_show_unwind_address : Option<"address", "a">, Group<2>,
+    Arg<"AddressOrExpression">, Desc<"Show unwind instructions for a function "
+    "or symbol containing an address">;
+}
+
+let Command = "target modules lookup" in {
+  def target_modules_lookup_address : Option<"address", "a">, Group<1>,
+    Arg<"AddressOrExpression">, Required, Desc<"Lookup an address in one or "
+    "more target modules.">;
+  def target_modules_lookup_offset : Option<"offset", "o">, Group<1>,
+    Arg<"Offset">, Desc<"When looking up an address subtract <offset> from any "
+    "addresses before doing the lookup.">;
+  // FIXME: re-enable regex for types when the LookupTypeInModule actually uses
+  // the regex option by adding to group 6.
+  def target_modules_lookup_regex : Option<"regex", "r">, Groups<[2,4,5]>,
+    Desc<"The <name> argument for name lookups are regular expressions.">;
+  def target_modules_lookup_symbol : Option<"symbol", "s">, Group<2>,
+    Arg<"Symbol">, Required, Desc<"Lookup a symbol by name in the symbol tables"
+    " in one or more target modules.">;
+  def target_modules_lookup_file : Option<"file", "f">, Group<3>,
+    Arg<"Filename">, Required, Desc<"Lookup a file by fullpath or basename in "
+    "one or more target modules.">;
+  def target_modules_lookup_line : Option<"line", "l">, Group<3>,
+    Arg<"LineNum">, Desc<"Lookup a line number in a file (must be used in "
+    "conjunction with --file).">;
+  def target_modules_lookup_no_inlines : Option<"no-inlines", "i">,
+    GroupRange<3,5>,
+    Desc<"Ignore inline entries (must be used in conjunction with --file or "
+    "--function).">;
+  def target_modules_lookup_function : Option<"function", "F">, Group<4>,
+    Arg<"FunctionName">, Required, Desc<"Lookup a function by name in the debug"
+    " symbols in one or more target modules.">;
+  def target_modules_lookup_name : Option<"name", "n">, Group<5>,
+    Arg<"FunctionOrSymbol">, Required, Desc<"Lookup a function or symbol by "
+    "name in one or more target modules.">;
+  def target_modules_lookup_type : Option<"type", "t">, Group<6>, Arg<"Name">,
+    Required, Desc<"Lookup a type by name in the debug symbols in one or more "
+    "target modules.">;
+  def target_modules_lookup_verbose : Option<"verbose", "v">,
+    Desc<"Enable verbose lookup information.">;
+  def target_modules_lookup_all : Option<"all", "A">, Desc<"Print all matches, "
+    "not just the best match, if a best match is available.">;
+}
+
+let Command = "target stop hook add" in {
+  def target_stop_hook_add_one_liner : Option<"one-liner", "o">,
+    Arg<"OneLiner">, Desc<"Add a command for the stop hook.  Can be specified "
+    "more than once, and commands will be run in the order they appear.">;
+  def target_stop_hook_add_shlib : Option<"shlib", "s">, Arg<"ShlibName">,
+    Completion<"Module">,
+    Desc<"Set the module within which the stop-hook is to be run.">;
+  def target_stop_hook_add_thread_index : Option<"thread-index", "x">,
+    Arg<"ThreadIndex">, Desc<"The stop hook is run only for the thread whose "
+    "index matches this argument.">;
+  def target_stop_hook_add_thread_id : Option<"thread-id", "t">,
+    Arg<"ThreadID">, Desc<"The stop hook is run only for the thread whose TID "
+    "matches this argument.">;
+  def target_stop_hook_add_thread_name : Option<"thread-name", "T">,
+    Arg<"ThreadName">, Desc<"The stop hook is run only for the thread whose "
+    "thread name matches this argument.">;
+  def target_stop_hook_add_queue_name : Option<"queue-name", "q">,
+    Arg<"QueueName">, Desc<"The stop hook is run only for threads in the queue "
+    "whose name is given by this argument.">;
+  def target_stop_hook_add_file : Option<"file", "f">, Group<1>,
+    Arg<"Filename">, Desc<"Specify the source file within which the stop-hook "
+    "is to be run.">, Completion<"SourceFile">;
+  def target_stop_hook_add_start_line : Option<"start-line", "l">, Group<1>,
+    Arg<"LineNum">, Desc<"Set the start of the line range for which the "
+    "stop-hook is to be run.">;
+  def target_stop_hook_add_end_line : Option<"end-line", "e">, Group<1>,
+    Arg<"LineNum">, Desc<"Set the end of the line range for which the stop-hook"
+    " is to be run.">;
+  def target_stop_hook_add_classname : Option<"classname", "c">, Group<2>,
+    Arg<"ClassName">,
+    Desc<"Specify the class within which the stop-hook is to be run.">;
+  def target_stop_hook_add_name : Option<"name", "n">, Group<3>,
+    Arg<"FunctionName">, Desc<"Set the function name within which the stop hook"
+    " will be run.">, Completion<"Symbol">;
+  def target_stop_hook_add_auto_continue : Option<"auto-continue", "G">,
+    Arg<"Boolean">, Desc<"The breakpoint will auto-continue after running its"
+    " commands.">;
+}
+
 let Command = "thread backtrace" in {
   def thread_backtrace_count : Option<"count", "c">, Group<1>, Arg<"Count">,
   Desc<"How many frames to display (-1 for all)">;
@@ -88,9 +911,6 @@
   def thread_step_scope_step_in_target : Option<"step-in-target", "t">,
     Group<1>, Arg<"FunctionName">, Desc<"The name of the directly called "
     "function step in should stop at when stepping into.">;
-  def thread_step_scope_python_class : Option<"python-class", "C">, Group<2>,
-    Arg<"PythonClass">, Desc<"The name of the class that will manage this step "
-    "- only supported for Scripted Step.">;
 }
 
 let Command = "thread until" in {
@@ -306,3 +1126,8 @@
     "to run as command for this watchpoint. Be sure to give a module name if "
     "appropriate.">;
 }
+
+let Command = "watchpoint delete" in {
+  def watchpoint_delete_force : Option<"force", "f">, Group<1>,
+    Desc<"Delete all watchpoints without querying for confirmation.">;
+}
diff --git a/src/llvm-project/lldb/source/Commands/OptionsBase.td b/src/llvm-project/lldb/source/Commands/OptionsBase.td
index a81563e..f6967f0 100644
--- a/src/llvm-project/lldb/source/Commands/OptionsBase.td
+++ b/src/llvm-project/lldb/source/Commands/OptionsBase.td
@@ -41,15 +41,19 @@
 //  - `OptionalArg`: Sets the argument type and marks it as optional.
 //  - `Arg`: Sets the argument type and marks it as required.
 //  - `EnumArg`: Sets the argument type to an enum and marks it as required.
+//  - `OptionalEnumArg`: Same as EnumArg but marks it as optional.
 // See argument_type field for more info.
 ////////////////////////////////////////////////////////////////////////////////
 // Field: validator
 // Default value: 0 (No validator for option)
-// Set by: Nothing. This is currently only set after initialization in LLDB.
+// Set by:
+//  - `Validator`: Sets the value to a given validator (which has to exist in
+//                 the surrounding code.
 ////////////////////////////////////////////////////////////////////////////////
 // Field: enum_values
 // Default value: {} (No enum associated with this option)
 // Set by:
+//  - `OptionalEnumArg`:
 //  - `EnumArg`: Sets the argument type and assigns it a enum holding the valid
 //               values. The enum needs to be a variable in the including code.
 //               Marks the option as required (see option_has_arg).
@@ -82,12 +86,14 @@
 //           Example: def foo : Option<"foo", "f">, Arg<"Pid">;
 //                    Sets the argument type to eArgTypePid and marks option as
 //                    required (see option_has_arg).
+//  - `OptionalEnumArg`:
 //  - `EnumArg`: Sets the argument type and assigns it a enum holding the valid
 //               values. The enum needs to be a variable in the including code.
 //               Marks the option as required (see option_has_arg).
 //               Example: def foo : Option<"foo", "f">,
 //                          EnumArg<"SortOrder",
 //                          "OptionEnumValues(g_sort_option_enumeration)">;
+//               Use `OptionalEnumArg` for having an option enum argument.
 ////////////////////////////////////////////////////////////////////////////////
 // Field: usage_text
 // Default value: ""
@@ -150,6 +156,13 @@
   string ArgEnum = enum;
 }
 
+// Gives the option an required argument.
+class OptionalEnumArg<string type, string enum> {
+  string ArgType = type;
+  string ArgEnum = enum;
+  bit OptionalArg = 1;
+}
+
 // Sets the available completions for the given option.
 class Completions<list<string> completions> {
   list<string> Completions = completions;
@@ -158,3 +171,8 @@
 class Completion<string completion> {
   list<string> Completions = [completion];
 }
+
+// Sets the validator for a given option.
+class Validator<string validator> {
+  string Validator = validator;
+}
diff --git a/src/llvm-project/lldb/source/Core/Address.cpp b/src/llvm-project/lldb/source/Core/Address.cpp
index 0da83eb..b9a7b4a 100644
--- a/src/llvm-project/lldb/source/Core/Address.cpp
+++ b/src/llvm-project/lldb/source/Core/Address.cpp
@@ -261,6 +261,24 @@
   return false; // Failed to resolve this address to a section offset value
 }
 
+/// if "addr_range_ptr" is not NULL, then fill in with the address range of the function.
+bool Address::ResolveFunctionScope(SymbolContext &sym_ctx,
+                                   AddressRange *addr_range_ptr) {
+  constexpr SymbolContextItem resolve_scope =
+    eSymbolContextFunction | eSymbolContextSymbol;
+
+  if (!(CalculateSymbolContext(&sym_ctx, resolve_scope) & resolve_scope)) {
+    if (addr_range_ptr)
+      addr_range_ptr->Clear();
+   return false;
+  }
+
+  if (!addr_range_ptr)
+    return true;
+
+  return sym_ctx.GetAddressRange(resolve_scope, 0, false, *addr_range_ptr);
+}
+
 ModuleSP Address::GetModule() const {
   lldb::ModuleSP module_sp;
   SectionSP section_sp(GetSection());
@@ -400,13 +418,13 @@
       section_sp->DumpName(s);
       s->Printf(" + %" PRIu64, m_offset);
     } else {
-      s->Address(m_offset, addr_size);
+      DumpAddress(s->AsRawOstream(), m_offset, addr_size);
     }
     break;
 
   case DumpStyleSectionPointerOffset:
     s->Printf("(Section *)%p + ", static_cast<void *>(section_sp.get()));
-    s->Address(m_offset, addr_size);
+    DumpAddress(s->AsRawOstream(), m_offset, addr_size);
     break;
 
   case DumpStyleModuleWithFileAddress:
@@ -426,7 +444,7 @@
         return Dump(s, exe_scope, fallback_style, DumpStyleInvalid, addr_size);
       return false;
     }
-    s->Address(file_addr, addr_size);
+    DumpAddress(s->AsRawOstream(), file_addr, addr_size);
     if (style == DumpStyleModuleWithFileAddress && section_sp)
       s->PutChar(']');
   } break;
@@ -454,7 +472,7 @@
         return Dump(s, exe_scope, fallback_style, DumpStyleInvalid, addr_size);
       return false;
     }
-    s->Address(load_addr, addr_size);
+    DumpAddress(s->AsRawOstream(), load_addr, addr_size);
   } break;
 
   case DumpStyleResolvedDescription:
@@ -475,23 +493,19 @@
         switch (sect_type) {
         case eSectionTypeData:
           if (module_sp) {
-            SymbolVendor *sym_vendor = module_sp->GetSymbolVendor();
-            if (sym_vendor) {
-              Symtab *symtab = sym_vendor->GetSymtab();
-              if (symtab) {
-                const addr_t file_Addr = GetFileAddress();
-                Symbol *symbol =
-                    symtab->FindSymbolContainingFileAddress(file_Addr);
-                if (symbol) {
-                  const char *symbol_name = symbol->GetName().AsCString();
-                  if (symbol_name) {
-                    s->PutCString(symbol_name);
-                    addr_t delta =
-                        file_Addr - symbol->GetAddressRef().GetFileAddress();
-                    if (delta)
-                      s->Printf(" + %" PRIu64, delta);
-                    showed_info = true;
-                  }
+            if (Symtab *symtab = module_sp->GetSymtab()) {
+              const addr_t file_Addr = GetFileAddress();
+              Symbol *symbol =
+                  symtab->FindSymbolContainingFileAddress(file_Addr);
+              if (symbol) {
+                const char *symbol_name = symbol->GetName().AsCString();
+                if (symbol_name) {
+                  s->PutCString(symbol_name);
+                  addr_t delta =
+                      file_Addr - symbol->GetAddressRef().GetFileAddress();
+                  if (delta)
+                    s->Printf(" + %" PRIu64, delta);
+                  showed_info = true;
                 }
               }
             }
@@ -698,22 +712,20 @@
                                     [](Variable *) { return true; },
                                     &variable_list);
 
-          const size_t num_variables = variable_list.GetSize();
-          for (size_t var_idx = 0; var_idx < num_variables; ++var_idx) {
-            Variable *var = variable_list.GetVariableAtIndex(var_idx).get();
-            if (var && var->LocationIsValidForAddress(*this)) {
+          for (const VariableSP &var_sp : variable_list) {
+            if (var_sp && var_sp->LocationIsValidForAddress(*this)) {
               s->Indent();
               s->Printf("   Variable: id = {0x%8.8" PRIx64 "}, name = \"%s\"",
-                        var->GetID(), var->GetName().GetCString());
-              Type *type = var->GetType();
+                        var_sp->GetID(), var_sp->GetName().GetCString());
+              Type *type = var_sp->GetType();
               if (type)
                 s->Printf(", type = \"%s\"", type->GetName().GetCString());
               else
                 s->PutCString(", type = <unknown>");
               s->PutCString(", location = ");
-              var->DumpLocationForAddress(s, *this);
+              var_sp->DumpLocationForAddress(s, *this);
               s->PutCString(", decl = ");
-              var->GetDeclaration().DumpStopContext(s, false);
+              var_sp->GetDeclaration().DumpStopContext(s, false);
               s->EOL();
             }
           }
@@ -742,7 +754,8 @@
             if (dereferenced_addr.Dump(&strm, exe_scope,
                                        DumpStyleResolvedDescription,
                                        DumpStyleInvalid, addr_size)) {
-              s->Address(dereferenced_load_addr, addr_size, " -> ", " ");
+              DumpAddress(s->AsRawOstream(), dereferenced_load_addr, addr_size,
+                          " -> ", " ");
               s->Write(strm.GetString().data(), strm.GetSize());
               return true;
             }
@@ -985,10 +998,9 @@
   if (module_sp) {
     ObjectFile *obj_file = module_sp->GetObjectFile();
     if (obj_file) {
-      // Give the symbol vendor a chance to add to the unified section list
-      // and to symtab from symbol file
-      if (SymbolVendor *vendor = module_sp->GetSymbolVendor())
-        vendor->GetSymtab();
+      // Give the symbol file a chance to add to the unified section list
+      // and to the symtab.
+      module_sp->GetSymtab();
       return obj_file->GetAddressClass(GetFileAddress());
     }
   }
diff --git a/src/llvm-project/lldb/source/Core/AddressRange.cpp b/src/llvm-project/lldb/source/Core/AddressRange.cpp
index 71eec3c..83a1e54 100644
--- a/src/llvm-project/lldb/source/Core/AddressRange.cpp
+++ b/src/llvm-project/lldb/source/Core/AddressRange.cpp
@@ -161,7 +161,8 @@
     s->PutChar('[');
     m_base_addr.Dump(s, target, style, fallback_style);
     s->PutChar('-');
-    s->Address(m_base_addr.GetOffset() + GetByteSize(), addr_size);
+    DumpAddress(s->AsRawOstream(), m_base_addr.GetOffset() + GetByteSize(),
+                addr_size);
     s->PutChar(')');
     return true;
     break;
@@ -185,7 +186,8 @@
         s->Printf("%s", module_sp->GetFileSpec().GetFilename().AsCString(
                             "<Unknown>"));
     }
-    s->AddressRange(vmaddr, vmaddr + GetByteSize(), addr_size);
+    DumpAddressRange(s->AsRawOstream(), vmaddr, vmaddr + GetByteSize(),
+                     addr_size);
     return true;
   } else if (fallback_style != Address::DumpStyleInvalid) {
     return Dump(s, target, fallback_style, Address::DumpStyleInvalid);
diff --git a/src/llvm-project/lldb/source/Core/AddressResolverFileLine.cpp b/src/llvm-project/lldb/source/Core/AddressResolverFileLine.cpp
index 24c0222..4122b5d 100644
--- a/src/llvm-project/lldb/source/Core/AddressResolverFileLine.cpp
+++ b/src/llvm-project/lldb/source/Core/AddressResolverFileLine.cpp
@@ -38,17 +38,15 @@
 
 Searcher::CallbackReturn
 AddressResolverFileLine::SearchCallback(SearchFilter &filter,
-                                        SymbolContext &context, Address *addr,
-                                        bool containing) {
+                                        SymbolContext &context, Address *addr) {
   SymbolContextList sc_list;
-  uint32_t sc_list_size;
   CompileUnit *cu = context.comp_unit;
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
 
-  sc_list_size =
-      cu->ResolveSymbolContext(m_file_spec, m_line_number, m_inlines, false,
-                               eSymbolContextEverything, sc_list);
+  cu->ResolveSymbolContext(m_file_spec, m_line_number, m_inlines, false,
+                           eSymbolContextEverything, sc_list);
+  uint32_t sc_list_size = sc_list.GetSize();
   for (uint32_t i = 0; i < sc_list_size; i++) {
     SymbolContext sc;
     if (sc_list.GetContextAtIndex(i, sc)) {
@@ -60,15 +58,15 @@
         if (log) {
           StreamString s;
           // new_bp_loc->GetDescription (&s, lldb::eDescriptionLevelVerbose);
-          // log->Printf ("Added address: %s\n", s.GetData());
+          // LLDB_LOGF(log, "Added address: %s\n", s.GetData());
         }
       } else {
-        if (log)
-          log->Printf(
-              "error: Unable to resolve address at file address 0x%" PRIx64
-              " for %s:%d\n",
-              line_start.GetFileAddress(),
-              m_file_spec.GetFilename().AsCString("<Unknown>"), m_line_number);
+        LLDB_LOGF(log,
+                  "error: Unable to resolve address at file address 0x%" PRIx64
+                  " for %s:%d\n",
+                  line_start.GetFileAddress(),
+                  m_file_spec.GetFilename().AsCString("<Unknown>"),
+                  m_line_number);
       }
     }
   }
diff --git a/src/llvm-project/lldb/source/Core/AddressResolverName.cpp b/src/llvm-project/lldb/source/Core/AddressResolverName.cpp
index e861368..6b9b7b2 100644
--- a/src/llvm-project/lldb/source/Core/AddressResolverName.cpp
+++ b/src/llvm-project/lldb/source/Core/AddressResolverName.cpp
@@ -36,7 +36,8 @@
     : AddressResolver(), m_func_name(func_name), m_class_name(nullptr),
       m_regex(), m_match_type(type) {
   if (m_match_type == AddressResolver::Regexp) {
-    if (!m_regex.Compile(m_func_name.GetStringRef())) {
+    m_regex = RegularExpression(m_func_name.GetStringRef());
+    if (!m_regex.IsValid()) {
       Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
 
       if (log)
@@ -46,9 +47,9 @@
   }
 }
 
-AddressResolverName::AddressResolverName(RegularExpression &func_regex)
+AddressResolverName::AddressResolverName(RegularExpression func_regex)
     : AddressResolver(), m_func_name(nullptr), m_class_name(nullptr),
-      m_regex(func_regex), m_match_type(AddressResolver::Regexp) {}
+      m_regex(std::move(func_regex)), m_match_type(AddressResolver::Regexp) {}
 
 AddressResolverName::AddressResolverName(const char *class_name,
                                          const char *method,
@@ -66,8 +67,7 @@
 
 Searcher::CallbackReturn
 AddressResolverName::SearchCallback(SearchFilter &filter,
-                                    SymbolContext &context, Address *addr,
-                                    bool containing) {
+                                    SymbolContext &context, Address *addr) {
   SymbolContextList func_list;
   SymbolContextList sym_list;
 
@@ -86,7 +86,6 @@
 
   const bool include_symbols = false;
   const bool include_inlines = true;
-  const bool append = false;
   switch (m_match_type) {
   case AddressResolver::Exact:
     if (context.module_sp) {
@@ -94,7 +93,7 @@
                                                     eSymbolTypeCode, sym_list);
       context.module_sp->FindFunctions(m_func_name, nullptr,
                                        eFunctionNameTypeAuto, include_symbols,
-                                       include_inlines, append, func_list);
+                                       include_inlines, func_list);
     }
     break;
 
@@ -103,7 +102,7 @@
       context.module_sp->FindSymbolsMatchingRegExAndType(
           m_regex, eSymbolTypeCode, sym_list);
       context.module_sp->FindFunctions(m_regex, include_symbols,
-                                       include_inlines, append, func_list);
+                                       include_inlines, func_list);
     }
     break;
 
diff --git a/src/llvm-project/lldb/source/Core/CMakeLists.txt b/src/llvm-project/lldb/source/Core/CMakeLists.txt
index 7ca37f9..a03fe6f 100644
--- a/src/llvm-project/lldb/source/Core/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Core/CMakeLists.txt
@@ -1,8 +1,16 @@
+lldb_tablegen(CoreProperties.inc -gen-lldb-property-defs
+  SOURCE CoreProperties.td
+  TARGET LLDBCorePropertiesGen)
+
+lldb_tablegen(CorePropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE CoreProperties.td
+  TARGET LLDBCorePropertiesEnumGen)
+
 set(LLDB_CURSES_LIBS)
 set(LLDB_LIBEDIT_LIBS)
 
-if (NOT LLDB_DISABLE_CURSES)
-  list(APPEND LLDB_CURSES_LIBS ${CURSES_LIBRARIES})
+if (LLDB_ENABLE_CURSES)
+  list(APPEND LLDB_CURSES_LIBS ${CURSES_LIBRARIES} ${PANEL_LIBRARIES})
   if(LLVM_ENABLE_TERMINFO AND HAVE_TERMINFO)
     list(APPEND LLDB_CURSES_LIBS ${TERMINFO_LIBS})
   endif()
@@ -29,6 +37,7 @@
   FormatEntity.cpp
   Highlighter.cpp
   IOHandler.cpp
+  IOHandlerCursesGUI.cpp
   Mangled.cpp
   Module.cpp
   ModuleChild.cpp
@@ -57,8 +66,10 @@
   ValueObjectSyntheticFilter.cpp
   ValueObjectVariable.cpp
 
+  DEPENDS
+    clang-tablegen-targets
+
   LINK_LIBS
-    clangAST
     lldbBreakpoint
     lldbDataFormatters
     lldbExpression
@@ -71,15 +82,26 @@
     lldbPluginObjCLanguage
     ${LLDB_CURSES_LIBS}
 
+  CLANG_LIBS
+    clangDriver
+
   LINK_COMPONENTS
     Support
     Demangle
   )
 
+add_dependencies(lldbCore
+  LLDBCorePropertiesGen
+  LLDBCorePropertiesEnumGen)
+
 # Needed to properly resolve references in a debug build.
 # TODO: Remove once we have better layering
 set_target_properties(lldbCore PROPERTIES LINK_INTERFACE_MULTIPLICITY 4)
 
-if (NOT LLDB_DISABLE_LIBEDIT)
-  target_include_directories(lldbCore PRIVATE ${libedit_INCLUDE_DIRS})
+if (LLDB_ENABLE_LIBEDIT)
+  target_include_directories(lldbCore PRIVATE ${LibEdit_INCLUDE_DIRS})
+endif()
+
+if (LLDB_ENABLE_CURSES)
+  target_include_directories(lldbCore PRIVATE ${CURSES_INCLUDE_DIRS})
 endif()
diff --git a/src/llvm-project/lldb/source/Core/Communication.cpp b/src/llvm-project/lldb/source/Core/Communication.cpp
index a67cb92..0afd897 100644
--- a/src/llvm-project/lldb/source/Core/Communication.cpp
+++ b/src/llvm-project/lldb/source/Core/Communication.cpp
@@ -46,9 +46,10 @@
       m_callback(nullptr), m_callback_baton(nullptr), m_close_on_eof(true)
 
 {
-  lldb_private::LogIfAnyCategoriesSet(
-      LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_COMMUNICATION,
-      "%p Communication::Communication (name = %s)", this, name);
+
+  LLDB_LOG(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_OBJECT |
+                                                  LIBLLDB_LOG_COMMUNICATION),
+           "{0} Communication::Communication (name = {1})", this, name);
 
   SetEventName(eBroadcastBitDisconnected, "disconnected");
   SetEventName(eBroadcastBitReadThreadGotBytes, "got bytes");
@@ -61,10 +62,10 @@
 }
 
 Communication::~Communication() {
-  lldb_private::LogIfAnyCategoriesSet(
-      LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_COMMUNICATION,
-      "%p Communication::~Communication (name = %s)", this,
-      GetBroadcasterName().AsCString());
+  LLDB_LOG(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_OBJECT |
+                                                  LIBLLDB_LOG_COMMUNICATION),
+           "{0} Communication::~Communication (name = {1})", this,
+           GetBroadcasterName().AsCString());
   Clear();
 }
 
@@ -77,9 +78,8 @@
 ConnectionStatus Communication::Connect(const char *url, Status *error_ptr) {
   Clear();
 
-  lldb_private::LogIfAnyCategoriesSet(LIBLLDB_LOG_COMMUNICATION,
-                                      "%p Communication::Connect (url = %s)",
-                                      this, url);
+  LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMUNICATION),
+           "{0} Communication::Connect (url = {1})", this, url);
 
   lldb::ConnectionSP connection_sp(m_connection_sp);
   if (connection_sp)
@@ -90,8 +90,8 @@
 }
 
 ConnectionStatus Communication::Disconnect(Status *error_ptr) {
-  lldb_private::LogIfAnyCategoriesSet(LIBLLDB_LOG_COMMUNICATION,
-                                      "%p Communication::Disconnect ()", this);
+  LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMUNICATION),
+           "{0} Communication::Disconnect ()", this);
 
   lldb::ConnectionSP connection_sp(m_connection_sp);
   if (connection_sp) {
@@ -173,11 +173,10 @@
   lldb::ConnectionSP connection_sp(m_connection_sp);
 
   std::lock_guard<std::mutex> guard(m_write_mutex);
-  lldb_private::LogIfAnyCategoriesSet(
-      LIBLLDB_LOG_COMMUNICATION,
-      "%p Communication::Write (src = %p, src_len = %" PRIu64
-      ") connection = %p",
-      this, src, (uint64_t)src_len, connection_sp.get());
+  LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMUNICATION),
+           "{0} Communication::Write (src = {1}, src_len = %" PRIu64
+           ") connection = {2}",
+           this, src, (uint64_t)src_len, connection_sp.get());
 
   if (connection_sp)
     return connection_sp->Write(src, src_len, status, error_ptr);
@@ -195,8 +194,8 @@
   if (m_read_thread.IsJoinable())
     return true;
 
-  lldb_private::LogIfAnyCategoriesSet(
-      LIBLLDB_LOG_COMMUNICATION, "%p Communication::StartReadThread ()", this);
+  LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMUNICATION),
+           "{0} Communication::StartReadThread ()", this);
 
   char thread_name[1024];
   snprintf(thread_name, sizeof(thread_name), "<lldb.comm.%s>",
@@ -228,8 +227,8 @@
   if (!m_read_thread.IsJoinable())
     return true;
 
-  lldb_private::LogIfAnyCategoriesSet(
-      LIBLLDB_LOG_COMMUNICATION, "%p Communication::StopReadThread ()", this);
+  LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMUNICATION),
+           "{0} Communication::StopReadThread ()", this);
 
   m_read_thread_enabled = false;
 
@@ -270,11 +269,10 @@
 void Communication::AppendBytesToCache(const uint8_t *bytes, size_t len,
                                        bool broadcast,
                                        ConnectionStatus status) {
-  lldb_private::LogIfAnyCategoriesSet(
-      LIBLLDB_LOG_COMMUNICATION,
-      "%p Communication::AppendBytesToCache (src = %p, src_len = %" PRIu64
-      ", broadcast = %i)",
-      this, bytes, (uint64_t)len, broadcast);
+  LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMUNICATION),
+           "{0} Communication::AppendBytesToCache (src = {1}, src_len = {2}, "
+           "broadcast = {3})",
+           this, bytes, (uint64_t)len, broadcast);
   if ((bytes == nullptr || len == 0) &&
       (status != lldb::eConnectionStatusEndOfFile))
     return;
@@ -310,8 +308,7 @@
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMUNICATION));
 
-  if (log)
-    log->Printf("%p Communication::ReadThread () thread starting...", p);
+  LLDB_LOGF(log, "%p Communication::ReadThread () thread starting...", p);
 
   uint8_t buf[1024];
 
@@ -366,7 +363,7 @@
   }
   log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_COMMUNICATION);
   if (log)
-    log->Printf("%p Communication::ReadThread () thread exiting...", p);
+    LLDB_LOGF(log, "%p Communication::ReadThread () thread exiting...", p);
 
   comm->m_read_thread_did_exit = true;
   // Let clients know that this thread is exiting
diff --git a/src/llvm-project/lldb/source/Core/CoreProperties.td b/src/llvm-project/lldb/source/Core/CoreProperties.td
new file mode 100644
index 0000000..014927c
--- /dev/null
+++ b/src/llvm-project/lldb/source/Core/CoreProperties.td
@@ -0,0 +1,118 @@
+include "../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "modulelist" in {
+  def EnableExternalLookup: Property<"enable-external-lookup", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"Control the use of external tools and repositories to locate symbol files. Directories listed in target.debug-file-search-paths and directory of the executable are always checked first for separate debug info files. Then depending on this setting: On macOS, Spotlight would be also used to locate a matching .dSYM bundle based on the UUID of the executable. On NetBSD, directory /usr/libdata/debug would be also searched. On platforms other than NetBSD directory /usr/lib/debug would be also searched.">;
+  def ClangModulesCachePath: Property<"clang-modules-cache-path", "FileSpec">,
+    Global,
+    DefaultStringValue<"">,
+    Desc<"The path to the clang modules cache directory (-fmodules-cache-path).">;
+}
+
+let Definition = "debugger" in {
+  def AutoConfirm: Property<"auto-confirm", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"If true all confirmation prompts will receive their default reply.">;
+  def DisassemblyFormat: Property<"disassembly-format", "FormatEntity">,
+    Global,
+    DefaultStringValue<"{${function.initial-function}{${module.file.basename}`}{${function.name-without-args}}:\\\\n}{${function.changed}\\\\n{${module.file.basename}`}{${function.name-without-args}}:\\\\n}{${current-pc-arrow} }${addr-file-or-load}{ <${function.concrete-only-addr-offset-no-padding}>}: ">,
+    Desc<"The default disassembly format string to use when disassembling instruction sequences.">;
+  def FrameFormat: Property<"frame-format", "FormatEntity">,
+    Global,
+    DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">,
+    Desc<"The default frame format string to use when displaying stack frame information for threads.">;
+  def NotiftVoid: Property<"notify-void", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"Notify the user explicitly if an expression returns void (default: false).">;
+  def Prompt: Property<"prompt", "String">,
+    Global,
+    DefaultEnumValue<"OptionValueString::eOptionEncodeCharacterEscapeSequences">,
+    DefaultStringValue<"(lldb) ">,
+    Desc<"The debugger command line prompt displayed for the user.">;
+  def ScriptLanguage: Property<"script-lang", "Enum">,
+    Global,
+    DefaultEnumValue<"eScriptLanguagePython">,
+    EnumValues<"OptionEnumValues(g_language_enumerators)">,
+    Desc<"The script language to be used for evaluating user-written scripts.">;
+  def StopDisassemblyCount: Property<"stop-disassembly-count", "SInt64">,
+    Global,
+    DefaultUnsignedValue<4>,
+    Desc<"The number of disassembly lines to show when displaying a stopped context.">;
+  def StopDisassemblyDisplay: Property<"stop-disassembly-display", "Enum">,
+    Global,
+    DefaultEnumValue<"Debugger::eStopDisassemblyTypeNoDebugInfo">,
+    EnumValues<"OptionEnumValues(g_show_disassembly_enum_values)">,
+    Desc<"Control when to display disassembly when displaying a stopped context.">;
+  def StopLineCountAfter: Property<"stop-line-count-after", "SInt64">,
+    Global,
+    DefaultUnsignedValue<3>,
+    Desc<"The number of sources lines to display that come after the current source line when displaying a stopped context.">;
+  def StopLineCountBefore: Property<"stop-line-count-before", "SInt64">,
+    Global,
+    DefaultUnsignedValue<3>,
+    Desc<"The number of sources lines to display that come before the current source line when displaying a stopped context.">;
+  def HighlightSource: Property<"highlight-source", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will highlight the displayed source code.">;
+  def StopShowColumn: Property<"stop-show-column", "Enum">,
+    DefaultEnumValue<"eStopShowColumnAnsiOrCaret">,
+    EnumValues<"OptionEnumValues(s_stop_show_column_values)">,
+    Desc<"If true, LLDB will use the column information from the debug info to mark the current position when displaying a stopped context.">;
+  def StopShowColumnAnsiPrefix: Property<"stop-show-column-ansi-prefix", "String">,
+    Global,
+    DefaultStringValue<"${ansi.underline}">,
+    Desc<"When displaying the column marker in a color-enabled (i.e. ANSI) terminal, use the ANSI terminal code specified in this format at the immediately before the column to be marked.">;
+  def StopShowColumnAnsiSuffix: Property<"stop-show-column-ansi-suffix", "String">,
+    Global,
+    DefaultStringValue<"${ansi.normal}">,
+    Desc<"When displaying the column marker in a color-enabled (i.e. ANSI) terminal, use the ANSI terminal code specified in this format immediately after the column to be marked.">;
+  def TerminalWidth: Property<"term-width", "SInt64">,
+    Global,
+    DefaultUnsignedValue<80>,
+    Desc<"The maximum number of columns to use for displaying text.">;
+  def ThreadFormat: Property<"thread-format", "FormatEntity">,
+    Global,
+    DefaultStringValue<"thread #${thread.index}: tid = ${thread.id%tid}{, ${frame.pc}}{ ${module.file.basename}{`${function.name-with-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{, name = ${ansi.fg.green}'${thread.name}'${ansi.normal}}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\\\\nReturn value: ${thread.return-value}}{\\\\nCompleted expression: ${thread.completed-expression}}\\\\n">,
+    Desc<"The default thread format string to use when displaying thread information.">;
+  def ThreadStopFormat: Property<"thread-stop-format", "FormatEntity">,
+    Global,
+    DefaultStringValue<"thread #${thread.index}{, name = '${thread.name}'}{, queue = ${ansi.fg.green}'${thread.queue}'${ansi.normal}}{, activity = ${ansi.fg.green}'${thread.info.activity.name}'${ansi.normal}}{, ${thread.info.trace_messages} messages}{, stop reason = ${ansi.fg.red}${thread.stop-reason}${ansi.normal}}{\\\\nReturn value: ${thread.return-value}}{\\\\nCompleted expression: ${thread.completed-expression}}\\\\n">,
+    Desc<"The default thread format  string to use when displaying thread information as part of the stop display.">;
+  def UseExternalEditor: Property<"use-external-editor", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"Whether to use an external editor or not.">;
+  def UseColor: Property<"use-color", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"Whether to use Ansi color codes or not.">;
+  def AutoOneLineSummaries: Property<"auto-one-line-summaries", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will automatically display small structs in one-liner format (default: true).">;
+  def AutoIndent: Property<"auto-indent", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will auto indent/outdent code. Currently only supported in the REPL (default: true).">;
+  def PrintDecls: Property<"print-decls", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will print the values of variables declared in an expression. Currently only supported in the REPL (default: true).">;
+  def TabSize: Property<"tab-size", "UInt64">,
+    Global,
+    DefaultUnsignedValue<4>,
+    Desc<"The tab size to use when indenting code in multi-line input mode (default: 4).">;
+  def EscapeNonPrintables: Property<"escape-non-printables", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will automatically escape non-printable and escape characters when formatting strings.">;
+  def FrameFormatUnique: Property<"frame-format-unique", "FormatEntity">,
+    Global,
+    DefaultStringValue<"frame #${frame.index}: ${ansi.fg.yellow}${frame.pc}${ansi.normal}{ ${module.file.basename}{`${function.name-without-args}{${frame.no-debug}${function.pc-offset}}}}{ at ${ansi.fg.cyan}${line.file.basename}${ansi.normal}:${ansi.fg.yellow}${line.number}${ansi.normal}{:${ansi.fg.yellow}${line.column}${ansi.normal}}}{${function.is-optimized} [opt]}{${frame.is-artificial} [artificial]}\\\\n">,
+    Desc<"The default frame format string to use when displaying stack frameinformation for threads from thread backtrace unique.">;
+}
diff --git a/src/llvm-project/lldb/source/Core/Debugger.cpp b/src/llvm-project/lldb/source/Core/Debugger.cpp
index 1a69fc5..33f72a0 100644
--- a/src/llvm-project/lldb/source/Core/Debugger.cpp
+++ b/src/llvm-project/lldb/source/Core/Debugger.cpp
@@ -93,22 +93,47 @@
     nullptr; // NOTE: intentional leak to avoid issues with C++ destructor chain
 
 static constexpr OptionEnumValueElement g_show_disassembly_enum_values[] = {
-    {Debugger::eStopDisassemblyTypeNever, "never",
-     "Never show disassembly when displaying a stop context."},
-    {Debugger::eStopDisassemblyTypeNoDebugInfo, "no-debuginfo",
-     "Show disassembly when there is no debug information."},
-    {Debugger::eStopDisassemblyTypeNoSource, "no-source",
-     "Show disassembly when there is no source information, or the source file "
-     "is missing when displaying a stop context."},
-    {Debugger::eStopDisassemblyTypeAlways, "always",
-     "Always show disassembly when displaying a stop context."} };
+    {
+        Debugger::eStopDisassemblyTypeNever,
+        "never",
+        "Never show disassembly when displaying a stop context.",
+    },
+    {
+        Debugger::eStopDisassemblyTypeNoDebugInfo,
+        "no-debuginfo",
+        "Show disassembly when there is no debug information.",
+    },
+    {
+        Debugger::eStopDisassemblyTypeNoSource,
+        "no-source",
+        "Show disassembly when there is no source information, or the source "
+        "file "
+        "is missing when displaying a stop context.",
+    },
+    {
+        Debugger::eStopDisassemblyTypeAlways,
+        "always",
+        "Always show disassembly when displaying a stop context.",
+    },
+};
 
 static constexpr OptionEnumValueElement g_language_enumerators[] = {
-    {eScriptLanguageNone, "none", "Disable scripting languages."},
-    {eScriptLanguagePython, "python",
-     "Select python as the default scripting language."},
-    {eScriptLanguageDefault, "default",
-     "Select the lldb default as the default scripting language."} };
+    {
+        eScriptLanguageNone,
+        "none",
+        "Disable scripting languages.",
+    },
+    {
+        eScriptLanguagePython,
+        "python",
+        "Select python as the default scripting language.",
+    },
+    {
+        eScriptLanguageDefault,
+        "default",
+        "Select the lldb default as the default scripting language.",
+    },
+};
 
 #define MODULE_WITH_FUNC                                                       \
   "{ "                                                                         \
@@ -189,133 +214,39 @@
 // without-args}}:\n}{${current-pc-arrow} }{${addr-file-or-load}}:
 
 static constexpr OptionEnumValueElement s_stop_show_column_values[] = {
-    {eStopShowColumnAnsiOrCaret, "ansi-or-caret",
-     "Highlight the stop column with ANSI terminal codes when color/ANSI mode "
-     "is enabled; otherwise, fall back to using a text-only caret (^) as if "
-     "\"caret-only\" mode was selected."},
-    {eStopShowColumnAnsi, "ansi", "Highlight the stop column with ANSI "
-                                  "terminal codes when running LLDB with "
-                                  "color/ANSI enabled."},
-    {eStopShowColumnCaret, "caret",
-     "Highlight the stop column with a caret character (^) underneath the stop "
-     "column. This method introduces a new line in source listings that "
-     "display thread stop locations."},
-    {eStopShowColumnNone, "none", "Do not highlight the stop column."}};
+    {
+        eStopShowColumnAnsiOrCaret,
+        "ansi-or-caret",
+        "Highlight the stop column with ANSI terminal codes when color/ANSI "
+        "mode is enabled; otherwise, fall back to using a text-only caret (^) "
+        "as if \"caret-only\" mode was selected.",
+    },
+    {
+        eStopShowColumnAnsi,
+        "ansi",
+        "Highlight the stop column with ANSI terminal codes when running LLDB "
+        "with color/ANSI enabled.",
+    },
+    {
+        eStopShowColumnCaret,
+        "caret",
+        "Highlight the stop column with a caret character (^) underneath the "
+        "stop column. This method introduces a new line in source listings "
+        "that display thread stop locations.",
+    },
+    {
+        eStopShowColumnNone,
+        "none",
+        "Do not highlight the stop column.",
+    },
+};
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"auto-confirm", OptionValue::eTypeBoolean, true, false, nullptr, {},
-     "If true all confirmation prompts will receive their default reply."},
-    {"disassembly-format", OptionValue::eTypeFormatEntity, true, 0,
-     DEFAULT_DISASSEMBLY_FORMAT, {},
-     "The default disassembly format "
-     "string to use when disassembling "
-     "instruction sequences."},
-    {"frame-format", OptionValue::eTypeFormatEntity, true, 0,
-     DEFAULT_FRAME_FORMAT, {},
-     "The default frame format string to use "
-     "when displaying stack frame information "
-     "for threads."},
-    {"notify-void", OptionValue::eTypeBoolean, true, false, nullptr, {},
-     "Notify the user explicitly if an expression returns void (default: "
-     "false)."},
-    {"prompt", OptionValue::eTypeString, true,
-     OptionValueString::eOptionEncodeCharacterEscapeSequences, "(lldb) ", {},
-     "The debugger command line prompt displayed for the user."},
-    {"script-lang", OptionValue::eTypeEnum, true, eScriptLanguagePython,
-     nullptr, OptionEnumValues(g_language_enumerators),
-     "The script language to be used for evaluating user-written scripts."},
-    {"stop-disassembly-count", OptionValue::eTypeSInt64, true, 4, nullptr, {},
-     "The number of disassembly lines to show when displaying a "
-     "stopped context."},
-    {"stop-disassembly-display", OptionValue::eTypeEnum, true,
-     Debugger::eStopDisassemblyTypeNoDebugInfo, nullptr,
-     OptionEnumValues(g_show_disassembly_enum_values),
-     "Control when to display disassembly when displaying a stopped context."},
-    {"stop-line-count-after", OptionValue::eTypeSInt64, true, 3, nullptr, {},
-     "The number of sources lines to display that come after the "
-     "current source line when displaying a stopped context."},
-    {"stop-line-count-before", OptionValue::eTypeSInt64, true, 3, nullptr, {},
-     "The number of sources lines to display that come before the "
-     "current source line when displaying a stopped context."},
-    {"highlight-source", OptionValue::eTypeBoolean, true, true, nullptr, {},
-     "If true, LLDB will highlight the displayed source code."},
-    {"stop-show-column", OptionValue::eTypeEnum, false,
-     eStopShowColumnAnsiOrCaret, nullptr, OptionEnumValues(s_stop_show_column_values),
-     "If true, LLDB will use the column information from the debug info to "
-     "mark the current position when displaying a stopped context."},
-    {"stop-show-column-ansi-prefix", OptionValue::eTypeString, true, 0,
-     "${ansi.underline}", {},
-     "When displaying the column marker in a color-enabled (i.e. ANSI) "
-     "terminal, use the ANSI terminal code specified in this format at the "
-     "immediately before the column to be marked."},
-    {"stop-show-column-ansi-suffix", OptionValue::eTypeString, true, 0,
-     "${ansi.normal}", {},
-     "When displaying the column marker in a color-enabled (i.e. ANSI) "
-     "terminal, use the ANSI terminal code specified in this format "
-     "immediately after the column to be marked."},
-    {"term-width", OptionValue::eTypeSInt64, true, 80, nullptr, {},
-     "The maximum number of columns to use for displaying text."},
-    {"thread-format", OptionValue::eTypeFormatEntity, true, 0,
-     DEFAULT_THREAD_FORMAT, {},
-     "The default thread format string to use "
-     "when displaying thread information."},
-    {"thread-stop-format", OptionValue::eTypeFormatEntity, true, 0,
-     DEFAULT_THREAD_STOP_FORMAT, {},
-     "The default thread format  "
-     "string to use when displaying thread "
-     "information as part of the stop display."},
-    {"use-external-editor", OptionValue::eTypeBoolean, true, false, nullptr, {},
-     "Whether to use an external editor or not."},
-    {"use-color", OptionValue::eTypeBoolean, true, true, nullptr, {},
-     "Whether to use Ansi color codes or not."},
-    {"auto-one-line-summaries", OptionValue::eTypeBoolean, true, true, nullptr,
-     {},
-     "If true, LLDB will automatically display small structs in "
-     "one-liner format (default: true)."},
-    {"auto-indent", OptionValue::eTypeBoolean, true, true, nullptr, {},
-     "If true, LLDB will auto indent/outdent code. Currently only supported in "
-     "the REPL (default: true)."},
-    {"print-decls", OptionValue::eTypeBoolean, true, true, nullptr, {},
-     "If true, LLDB will print the values of variables declared in an "
-     "expression. Currently only supported in the REPL (default: true)."},
-    {"tab-size", OptionValue::eTypeUInt64, true, 4, nullptr, {},
-     "The tab size to use when indenting code in multi-line input mode "
-     "(default: 4)."},
-    {"escape-non-printables", OptionValue::eTypeBoolean, true, true, nullptr,
-     {},
-     "If true, LLDB will automatically escape non-printable and "
-     "escape characters when formatting strings."},
-    {"frame-format-unique", OptionValue::eTypeFormatEntity, true, 0,
-     DEFAULT_FRAME_FORMAT_NO_ARGS, {},
-     "The default frame format string to use when displaying stack frame"
-     "information for threads from thread backtrace unique."}};
+#define LLDB_PROPERTIES_debugger
+#include "CoreProperties.inc"
 
 enum {
-  ePropertyAutoConfirm = 0,
-  ePropertyDisassemblyFormat,
-  ePropertyFrameFormat,
-  ePropertyNotiftVoid,
-  ePropertyPrompt,
-  ePropertyScriptLanguage,
-  ePropertyStopDisassemblyCount,
-  ePropertyStopDisassemblyDisplay,
-  ePropertyStopLineCountAfter,
-  ePropertyStopLineCountBefore,
-  ePropertyHighlightSource,
-  ePropertyStopShowColumn,
-  ePropertyStopShowColumnAnsiPrefix,
-  ePropertyStopShowColumnAnsiSuffix,
-  ePropertyTerminalWidth,
-  ePropertyThreadFormat,
-  ePropertyThreadStopFormat,
-  ePropertyUseExternalEditor,
-  ePropertyUseColor,
-  ePropertyAutoOneLineSummaries,
-  ePropertyAutoIndent,
-  ePropertyPrintDecls,
-  ePropertyTabSize,
-  ePropertyEscapeNonPrintables,
-  ePropertyFrameFormatUnique,
+#define LLDB_PROPERTIES_debugger
+#include "CorePropertiesEnum.inc"
 };
 
 LoadPluginCallbackType Debugger::g_load_plugin_callback = nullptr;
@@ -324,8 +255,16 @@
                                   VarSetOperationType op,
                                   llvm::StringRef property_path,
                                   llvm::StringRef value) {
-  bool is_load_script = (property_path == "target.load-script-from-symbol-file");
-  bool is_escape_non_printables = (property_path == "escape-non-printables");
+  bool is_load_script =
+      (property_path == "target.load-script-from-symbol-file");
+  // These properties might change how we visualize data.
+  bool invalidate_data_vis = (property_path == "escape-non-printables");
+  invalidate_data_vis |=
+      (property_path == "target.max-zero-padding-in-float-format");
+  if (invalidate_data_vis) {
+    DataVisualization::ForceUpdate();
+  }
+
   TargetSP target_sp;
   LoadScriptFromSymFile load_script_old_value;
   if (is_load_script && exe_ctx->GetTargetSP()) {
@@ -336,18 +275,18 @@
   Status error(Properties::SetPropertyValue(exe_ctx, op, property_path, value));
   if (error.Success()) {
     // FIXME it would be nice to have "on-change" callbacks for properties
-    if (property_path == g_properties[ePropertyPrompt].name) {
+    if (property_path == g_debugger_properties[ePropertyPrompt].name) {
       llvm::StringRef new_prompt = GetPrompt();
-      std::string str = lldb_utility::ansi::FormatAnsiTerminalCodes(
+      std::string str = lldb_private::ansi::FormatAnsiTerminalCodes(
           new_prompt, GetUseColor());
       if (str.length())
         new_prompt = str;
       GetCommandInterpreter().UpdatePrompt(new_prompt);
-      auto bytes = llvm::make_unique<EventDataBytes>(new_prompt);
+      auto bytes = std::make_unique<EventDataBytes>(new_prompt);
       auto prompt_change_event_sp = std::make_shared<Event>(
           CommandInterpreter::eBroadcastBitResetPrompt, bytes.release());
       GetCommandInterpreter().BroadcastEvent(prompt_change_event_sp);
-    } else if (property_path == g_properties[ePropertyUseColor].name) {
+    } else if (property_path == g_debugger_properties[ePropertyUseColor].name) {
       // use-color changed. Ping the prompt so it can reset the ansi terminal
       // codes.
       SetPrompt(GetPrompt());
@@ -358,18 +297,14 @@
         std::list<Status> errors;
         StreamString feedback_stream;
         if (!target_sp->LoadScriptingResources(errors, &feedback_stream)) {
-          StreamFileSP stream_sp(GetErrorFile());
-          if (stream_sp) {
-            for (auto error : errors) {
-              stream_sp->Printf("%s\n", error.AsCString());
-            }
-            if (feedback_stream.GetSize())
-              stream_sp->PutCString(feedback_stream.GetString());
+          Stream &s = GetErrorStream();
+          for (auto error : errors) {
+            s.Printf("%s\n", error.AsCString());
           }
+          if (feedback_stream.GetSize())
+            s.PutCString(feedback_stream.GetString());
         }
       }
-    } else if (is_escape_non_printables) {
-      DataVisualization::ForceUpdate();
     }
   }
   return error;
@@ -378,7 +313,7 @@
 bool Debugger::GetAutoConfirm() const {
   const uint32_t idx = ePropertyAutoConfirm;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value != 0);
 }
 
 const FormatEntity::Entry *Debugger::GetDisassemblyFormat() const {
@@ -399,13 +334,13 @@
 bool Debugger::GetNotifyVoid() const {
   const uint32_t idx = ePropertyNotiftVoid;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value != 0);
 }
 
 llvm::StringRef Debugger::GetPrompt() const {
   const uint32_t idx = ePropertyPrompt;
   return m_collection_sp->GetPropertyAtIndexAsString(
-      nullptr, idx, g_properties[idx].default_cstr_value);
+      nullptr, idx, g_debugger_properties[idx].default_cstr_value);
 }
 
 void Debugger::SetPrompt(llvm::StringRef p) {
@@ -413,7 +348,7 @@
   m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, p);
   llvm::StringRef new_prompt = GetPrompt();
   std::string str =
-      lldb_utility::ansi::FormatAnsiTerminalCodes(new_prompt, GetUseColor());
+      lldb_private::ansi::FormatAnsiTerminalCodes(new_prompt, GetUseColor());
   if (str.length())
     new_prompt = str;
   GetCommandInterpreter().UpdatePrompt(new_prompt);
@@ -437,7 +372,7 @@
 lldb::ScriptLanguage Debugger::GetScriptLanguage() const {
   const uint32_t idx = ePropertyScriptLanguage;
   return (lldb::ScriptLanguage)m_collection_sp->GetPropertyAtIndexAsEnumeration(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value);
 }
 
 bool Debugger::SetScriptLanguage(lldb::ScriptLanguage script_lang) {
@@ -449,7 +384,7 @@
 uint32_t Debugger::GetTerminalWidth() const {
   const uint32_t idx = ePropertyTerminalWidth;
   return m_collection_sp->GetPropertyAtIndexAsSInt64(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value);
 }
 
 bool Debugger::SetTerminalWidth(uint32_t term_width) {
@@ -460,7 +395,7 @@
 bool Debugger::GetUseExternalEditor() const {
   const uint32_t idx = ePropertyUseExternalEditor;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::SetUseExternalEditor(bool b) {
@@ -471,7 +406,7 @@
 bool Debugger::GetUseColor() const {
   const uint32_t idx = ePropertyUseColor;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value != 0);
 }
 
 bool Debugger::SetUseColor(bool b) {
@@ -484,13 +419,13 @@
 bool Debugger::GetHighlightSource() const {
   const uint32_t idx = ePropertyHighlightSource;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value);
 }
 
 StopShowColumn Debugger::GetStopShowColumn() const {
   const uint32_t idx = ePropertyStopShowColumn;
   return (lldb::StopShowColumn)m_collection_sp->GetPropertyAtIndexAsEnumeration(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value);
 }
 
 llvm::StringRef Debugger::GetStopShowColumnAnsiPrefix() const {
@@ -507,20 +442,20 @@
   const uint32_t idx =
       before ? ePropertyStopLineCountBefore : ePropertyStopLineCountAfter;
   return m_collection_sp->GetPropertyAtIndexAsSInt64(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value);
 }
 
 Debugger::StopDisassemblyType Debugger::GetStopDisassemblyDisplay() const {
   const uint32_t idx = ePropertyStopDisassemblyDisplay;
   return (Debugger::StopDisassemblyType)
       m_collection_sp->GetPropertyAtIndexAsEnumeration(
-          nullptr, idx, g_properties[idx].default_uint_value);
+          nullptr, idx, g_debugger_properties[idx].default_uint_value);
 }
 
 uint32_t Debugger::GetDisassemblyLineCount() const {
   const uint32_t idx = ePropertyStopDisassemblyCount;
   return m_collection_sp->GetPropertyAtIndexAsSInt64(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value);
 }
 
 bool Debugger::GetAutoOneLineSummaries() const {
@@ -556,7 +491,7 @@
 uint32_t Debugger::GetTabSize() const {
   const uint32_t idx = ePropertyTabSize;
   return m_collection_sp->GetPropertyAtIndexAsUInt64(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_debugger_properties[idx].default_uint_value);
 }
 
 bool Debugger::SetTabSize(uint32_t tab_size) {
@@ -717,8 +652,7 @@
   }
 }
 
-DebuggerSP
-Debugger::FindDebuggerWithInstanceName(ConstString instance_name) {
+DebuggerSP Debugger::FindDebuggerWithInstanceName(ConstString instance_name) {
   DebuggerSP debugger_sp;
   if (g_debugger_list_ptr && g_debugger_list_mutex_ptr) {
     std::lock_guard<std::recursive_mutex> guard(*g_debugger_list_mutex_ptr);
@@ -764,18 +698,18 @@
 Debugger::Debugger(lldb::LogOutputCallback log_callback, void *baton)
     : UserID(g_unique_id++),
       Properties(std::make_shared<OptionValueProperties>()),
-      m_input_file_sp(std::make_shared<StreamFile>(stdin, false)),
-      m_output_file_sp(std::make_shared<StreamFile>(stdout, false)),
-      m_error_file_sp(std::make_shared<StreamFile>(stderr, false)),
+      m_input_file_sp(std::make_shared<NativeFile>(stdin, false)),
+      m_output_stream_sp(std::make_shared<StreamFile>(stdout, false)),
+      m_error_stream_sp(std::make_shared<StreamFile>(stderr, false)),
       m_input_recorder(nullptr),
       m_broadcaster_manager_sp(BroadcasterManager::MakeBroadcasterManager()),
       m_terminal_state(), m_target_list(*this), m_platform_list(),
       m_listener_sp(Listener::MakeListener("lldb.Debugger")),
       m_source_manager_up(), m_source_file_cache(),
       m_command_interpreter_up(
-          llvm::make_unique<CommandInterpreter>(*this, false)),
-      m_script_interpreter_sp(), m_input_reader_stack(), m_instance_name(),
-      m_loaded_plugins(), m_event_handler_thread(), m_io_handler_thread(),
+          std::make_unique<CommandInterpreter>(*this, false)),
+      m_input_reader_stack(), m_instance_name(), m_loaded_plugins(),
+      m_event_handler_thread(), m_io_handler_thread(),
       m_sync_broadcaster(nullptr, "lldb.debugger.sync"),
       m_forward_listener_sp(), m_clear_once() {
   char instance_cstr[256];
@@ -790,7 +724,10 @@
   assert(default_platform_sp);
   m_platform_list.Append(default_platform_sp, true);
 
-  m_collection_sp->Initialize(g_properties);
+  m_dummy_target_sp = m_target_list.GetDummyTarget(*this);
+  assert(m_dummy_target_sp.get() && "Couldn't construct dummy target?");
+
+  m_collection_sp->Initialize(g_debugger_properties);
   m_collection_sp->AppendProperty(
       ConstString("target"),
       ConstString("Settings specify to debugging targets."), true,
@@ -818,7 +755,7 @@
   if (term && !strcmp(term, "dumb"))
     SetUseColor(false);
   // Turn off use-color if we don't write to a terminal with color support.
-  if (!m_output_file_sp->GetFile().GetIsTerminalWithColors())
+  if (!GetOutputFile().GetIsTerminalWithColors())
     SetUseColor(false);
 
 #if defined(_WIN32) && defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
@@ -859,8 +796,7 @@
     // Close the input file _before_ we close the input read communications
     // class as it does NOT own the input file, our m_input_file does.
     m_terminal_state.Clear();
-    if (m_input_file_sp)
-      m_input_file_sp->GetFile().Close();
+    GetInputFile().Close();
 
     m_command_interpreter_up->Clear();
   });
@@ -885,57 +821,29 @@
 
 repro::DataRecorder *Debugger::GetInputRecorder() { return m_input_recorder; }
 
-void Debugger::SetInputFileHandle(FILE *fh, bool tranfer_ownership,
-                                  repro::DataRecorder *recorder) {
+void Debugger::SetInputFile(FileSP file_sp, repro::DataRecorder *recorder) {
+  assert(file_sp && file_sp->IsValid());
   m_input_recorder = recorder;
-  if (m_input_file_sp)
-    m_input_file_sp->GetFile().SetStream(fh, tranfer_ownership);
-  else
-    m_input_file_sp = std::make_shared<StreamFile>(fh, tranfer_ownership);
-
-  File &in_file = m_input_file_sp->GetFile();
-  if (!in_file.IsValid())
-    in_file.SetStream(stdin, true);
-
+  m_input_file_sp = file_sp;
   // Save away the terminal state if that is relevant, so that we can restore
   // it in RestoreInputState.
   SaveInputTerminalState();
 }
 
-void Debugger::SetOutputFileHandle(FILE *fh, bool tranfer_ownership) {
-  if (m_output_file_sp)
-    m_output_file_sp->GetFile().SetStream(fh, tranfer_ownership);
-  else
-    m_output_file_sp = std::make_shared<StreamFile>(fh, tranfer_ownership);
-
-  File &out_file = m_output_file_sp->GetFile();
-  if (!out_file.IsValid())
-    out_file.SetStream(stdout, false);
-
-  // Do not create the ScriptInterpreter just for setting the output file
-  // handle as the constructor will know how to do the right thing on its own.
-  if (ScriptInterpreter *script_interpreter =
-          GetScriptInterpreter(/*can_create=*/false))
-    script_interpreter->ResetOutputFileHandle(fh);
+void Debugger::SetOutputFile(FileSP file_sp) {
+  assert(file_sp && file_sp->IsValid());
+  m_output_stream_sp = std::make_shared<StreamFile>(file_sp);
 }
 
-void Debugger::SetErrorFileHandle(FILE *fh, bool tranfer_ownership) {
-  if (m_error_file_sp)
-    m_error_file_sp->GetFile().SetStream(fh, tranfer_ownership);
-  else
-    m_error_file_sp = std::make_shared<StreamFile>(fh, tranfer_ownership);
-
-  File &err_file = m_error_file_sp->GetFile();
-  if (!err_file.IsValid())
-    err_file.SetStream(stderr, false);
+void Debugger::SetErrorFile(FileSP file_sp) {
+  assert(file_sp && file_sp->IsValid());
+  m_error_stream_sp = std::make_shared<StreamFile>(file_sp);
 }
 
 void Debugger::SaveInputTerminalState() {
-  if (m_input_file_sp) {
-    File &in_file = m_input_file_sp->GetFile();
-    if (in_file.GetDescriptor() != File::kInvalidDescriptor)
-      m_terminal_state.Save(in_file.GetDescriptor(), true);
-  }
+  int fd = GetInputFile().GetDescriptor();
+  if (fd != File::kInvalidDescriptor)
+    m_terminal_state.Save(fd, true);
 }
 
 void Debugger::RestoreInputTerminalState() { m_terminal_state.Restore(); }
@@ -1016,8 +924,9 @@
 }
 
 void Debugger::PrintAsync(const char *s, size_t len, bool is_stdout) {
-  lldb::StreamFileSP stream = is_stdout ? GetOutputFile() : GetErrorFile();
-  m_input_reader_stack.PrintAsync(stream.get(), s, len);
+  lldb_private::StreamFile &stream =
+      is_stdout ? GetOutputStream() : GetErrorStream();
+  m_input_reader_stack.PrintAsync(&stream, s, len);
 }
 
 ConstString Debugger::GetTopIOHandlerControlSequence(char ch) {
@@ -1054,8 +963,7 @@
   }
 }
 
-void Debugger::AdoptTopIOHandlerFilesIfInvalid(StreamFileSP &in,
-                                               StreamFileSP &out,
+void Debugger::AdoptTopIOHandlerFilesIfInvalid(FileSP &in, StreamFileSP &out,
                                                StreamFileSP &err) {
   // Before an IOHandler runs, it must have in/out/err streams. This function
   // is called when one ore more of the streams are nullptr. We use the top
@@ -1065,37 +973,34 @@
   std::lock_guard<std::recursive_mutex> guard(m_input_reader_stack.GetMutex());
   IOHandlerSP top_reader_sp(m_input_reader_stack.Top());
   // If no STDIN has been set, then set it appropriately
-  if (!in) {
+  if (!in || !in->IsValid()) {
     if (top_reader_sp)
-      in = top_reader_sp->GetInputStreamFile();
+      in = top_reader_sp->GetInputFileSP();
     else
-      in = GetInputFile();
-
+      in = GetInputFileSP();
     // If there is nothing, use stdin
     if (!in)
-      in = std::make_shared<StreamFile>(stdin, false);
+      in = std::make_shared<NativeFile>(stdin, false);
   }
   // If no STDOUT has been set, then set it appropriately
-  if (!out) {
+  if (!out || !out->GetFile().IsValid()) {
     if (top_reader_sp)
-      out = top_reader_sp->GetOutputStreamFile();
+      out = top_reader_sp->GetOutputStreamFileSP();
     else
-      out = GetOutputFile();
-
+      out = GetOutputStreamSP();
     // If there is nothing, use stdout
     if (!out)
       out = std::make_shared<StreamFile>(stdout, false);
   }
   // If no STDERR has been set, then set it appropriately
-  if (!err) {
+  if (!err || !err->GetFile().IsValid()) {
     if (top_reader_sp)
-      err = top_reader_sp->GetErrorStreamFile();
+      err = top_reader_sp->GetErrorStreamFileSP();
     else
-      err = GetErrorFile();
-
+      err = GetErrorStreamSP();
     // If there is nothing, use stderr
     if (!err)
-      err = std::make_shared<StreamFile>(stdout, false);
+      err = std::make_shared<StreamFile>(stderr, false);
   }
 }
 
@@ -1263,15 +1168,15 @@
         LLDB_LOG_OPTION_PREPEND_TIMESTAMP | LLDB_LOG_OPTION_PREPEND_THREAD_NAME;
   } else if (log_file.empty()) {
     log_stream_sp = std::make_shared<llvm::raw_fd_ostream>(
-        GetOutputFile()->GetFile().GetDescriptor(), !should_close, unbuffered);
+        GetOutputFile().GetDescriptor(), !should_close, unbuffered);
   } else {
     auto pos = m_log_streams.find(log_file);
     if (pos != m_log_streams.end())
       log_stream_sp = pos->second.lock();
     if (!log_stream_sp) {
-      llvm::sys::fs::OpenFlags flags = llvm::sys::fs::F_Text;
+      llvm::sys::fs::OpenFlags flags = llvm::sys::fs::OF_Text;
       if (log_options & LLDB_LOG_OPTION_APPEND)
-        flags |= llvm::sys::fs::F_Append;
+        flags |= llvm::sys::fs::OF_Append;
       int FD;
       if (std::error_code ec = llvm::sys::fs::openFileForWrite(
               log_file, FD, llvm::sys::fs::CD_CreateAlways, flags)) {
@@ -1293,22 +1198,26 @@
                                error_stream);
 }
 
-ScriptInterpreter *Debugger::GetScriptInterpreter(bool can_create) {
+ScriptInterpreter *
+Debugger::GetScriptInterpreter(bool can_create,
+                               llvm::Optional<lldb::ScriptLanguage> language) {
   std::lock_guard<std::recursive_mutex> locker(m_script_interpreter_mutex);
+  lldb::ScriptLanguage script_language =
+      language ? *language : GetScriptLanguage();
 
-  if (!m_script_interpreter_sp) {
+  if (!m_script_interpreters[script_language]) {
     if (!can_create)
       return nullptr;
-    m_script_interpreter_sp = PluginManager::GetScriptInterpreterForLanguage(
-        GetScriptLanguage(), *this);
+    m_script_interpreters[script_language] =
+        PluginManager::GetScriptInterpreterForLanguage(script_language, *this);
   }
 
-  return m_script_interpreter_sp.get();
+  return m_script_interpreters[script_language].get();
 }
 
 SourceManager &Debugger::GetSourceManager() {
   if (!m_source_manager_up)
-    m_source_manager_up = llvm::make_unique<SourceManager>(shared_from_this());
+    m_source_manager_up = std::make_unique<SourceManager>(shared_from_this());
   return *m_source_manager_up;
 }
 
@@ -1360,60 +1269,23 @@
   //    }
 }
 
-size_t Debugger::GetProcessSTDOUT(Process *process, Stream *stream) {
-  size_t total_bytes = 0;
-  if (stream == nullptr)
-    stream = GetOutputFile().get();
+void Debugger::FlushProcessOutput(Process &process, bool flush_stdout,
+                                  bool flush_stderr) {
+  const auto &flush = [&](Stream &stream,
+                          size_t (Process::*get)(char *, size_t, Status &)) {
+    Status error;
+    size_t len;
+    char buffer[1024];
+    while ((len = (process.*get)(buffer, sizeof(buffer), error)) > 0)
+      stream.Write(buffer, len);
+    stream.Flush();
+  };
 
-  if (stream) {
-    //  The process has stuff waiting for stdout; get it and write it out to the
-    //  appropriate place.
-    if (process == nullptr) {
-      TargetSP target_sp = GetTargetList().GetSelectedTarget();
-      if (target_sp)
-        process = target_sp->GetProcessSP().get();
-    }
-    if (process) {
-      Status error;
-      size_t len;
-      char stdio_buffer[1024];
-      while ((len = process->GetSTDOUT(stdio_buffer, sizeof(stdio_buffer),
-                                       error)) > 0) {
-        stream->Write(stdio_buffer, len);
-        total_bytes += len;
-      }
-    }
-    stream->Flush();
-  }
-  return total_bytes;
-}
-
-size_t Debugger::GetProcessSTDERR(Process *process, Stream *stream) {
-  size_t total_bytes = 0;
-  if (stream == nullptr)
-    stream = GetOutputFile().get();
-
-  if (stream) {
-    //  The process has stuff waiting for stderr; get it and write it out to the
-    //  appropriate place.
-    if (process == nullptr) {
-      TargetSP target_sp = GetTargetList().GetSelectedTarget();
-      if (target_sp)
-        process = target_sp->GetProcessSP().get();
-    }
-    if (process) {
-      Status error;
-      size_t len;
-      char stdio_buffer[1024];
-      while ((len = process->GetSTDERR(stdio_buffer, sizeof(stdio_buffer),
-                                       error)) > 0) {
-        stream->Write(stdio_buffer, len);
-        total_bytes += len;
-      }
-    }
-    stream->Flush();
-  }
-  return total_bytes;
+  std::lock_guard<std::mutex> guard(m_output_flush_mutex);
+  if (flush_stdout)
+    flush(*GetAsyncOutputStream(), &Process::GetSTDOUT);
+  if (flush_stderr)
+    flush(*GetAsyncErrorStream(), &Process::GetSTDERR);
 }
 
 // This function handles events that were broadcast by the process.
@@ -1453,15 +1325,9 @@
                                               pop_process_io_handler);
     }
 
-    // Now display and STDOUT
-    if (got_stdout || got_state_changed) {
-      GetProcessSTDOUT(process_sp.get(), output_stream_sp.get());
-    }
-
-    // Now display and STDERR
-    if (got_stderr || got_state_changed) {
-      GetProcessSTDERR(process_sp.get(), error_stream_sp.get());
-    }
+    // Now display STDOUT and STDERR
+    FlushProcessOutput(*process_sp, got_stdout || got_state_changed,
+                       got_stderr || got_state_changed);
 
     // Give structured data events an opportunity to display.
     if (got_structured_data) {
@@ -1590,7 +1456,7 @@
               done = true;
             } else if (event_type &
                        CommandInterpreter::eBroadcastBitAsynchronousErrorData) {
-              const char *data = reinterpret_cast<const char *>(
+              const char *data = static_cast<const char *>(
                   EventDataBytes::GetBytesFromEvent(event_sp.get()));
               if (data && data[0]) {
                 StreamSP error_sp(GetAsyncErrorStream());
@@ -1601,7 +1467,7 @@
               }
             } else if (event_type & CommandInterpreter::
                                         eBroadcastBitAsynchronousOutputData) {
-              const char *data = reinterpret_cast<const char *>(
+              const char *data = static_cast<const char *>(
                   EventDataBytes::GetBytesFromEvent(event_sp.get()));
               if (data && data[0]) {
                 StreamSP output_sp(GetAsyncOutputStream());
@@ -1638,8 +1504,9 @@
                                          eBroadcastBitEventThreadIsListening);
 
     auto thread_name =
-        full_name.GetLength() < llvm::get_max_thread_name_length() ?
-        full_name.AsCString() : "dbg.evt-handler";
+        full_name.GetLength() < llvm::get_max_thread_name_length()
+            ? full_name.AsCString()
+            : "dbg.evt-handler";
 
     // Use larger 8MB stack for this thread
     llvm::Expected<HostThread> event_handler_thread =
@@ -1700,8 +1567,7 @@
 
 void Debugger::StopIOHandlerThread() {
   if (m_io_handler_thread.IsJoinable()) {
-    if (m_input_file_sp)
-      m_input_file_sp->GetFile().Close();
+    GetInputFile().Close();
     m_io_handler_thread.Join(nullptr);
   }
 }
@@ -1714,10 +1580,6 @@
   }
 }
 
-Target *Debugger::GetDummyTarget() {
-  return m_target_list.GetDummyTarget(*this).get();
-}
-
 Target *Debugger::GetSelectedOrDummyTarget(bool prefer_dummy) {
   Target *target = nullptr;
   if (!prefer_dummy) {
@@ -1734,13 +1596,11 @@
   FileSpec repl_executable;
 
   if (language == eLanguageTypeUnknown) {
-    std::set<LanguageType> repl_languages;
+    LanguageSet repl_languages = Language::GetLanguagesSupportingREPLs();
 
-    Language::GetLanguagesSupportingREPLs(repl_languages);
-
-    if (repl_languages.size() == 1) {
-      language = *repl_languages.begin();
-    } else if (repl_languages.empty()) {
+    if (auto single_lang = repl_languages.GetSingularLanguage()) {
+      language = *single_lang;
+    } else if (repl_languages.Empty()) {
       err.SetErrorStringWithFormat(
           "LLDB isn't configured with REPL support for any languages.");
       return err;
diff --git a/src/llvm-project/lldb/source/Core/Disassembler.cpp b/src/llvm-project/lldb/source/Core/Disassembler.cpp
index af7cf82..33172cc 100644
--- a/src/llvm-project/lldb/source/Core/Disassembler.cpp
+++ b/src/llvm-project/lldb/source/Core/Disassembler.cpp
@@ -158,52 +158,58 @@
   return success_count;
 }
 
-bool Disassembler::Disassemble(Debugger &debugger, const ArchSpec &arch,
-                               const char *plugin_name, const char *flavor,
-                               const ExecutionContext &exe_ctx,
-                               ConstString name, Module *module,
-                               uint32_t num_instructions,
-                               bool mixed_source_and_assembly,
-                               uint32_t num_mixed_context_lines,
-                               uint32_t options, Stream &strm) {
+bool Disassembler::Disassemble(
+    Debugger &debugger, const ArchSpec &arch, const char *plugin_name,
+    const char *flavor, const ExecutionContext &exe_ctx, ConstString name,
+    Module *module, uint32_t num_instructions, bool mixed_source_and_assembly,
+    uint32_t num_mixed_context_lines, uint32_t options, Stream &strm) {
+  // If no name is given there's nothing to disassemble.
+  if (!name)
+    return false;
+
+  const bool include_symbols = true;
+  const bool include_inlines = true;
+
+  // Find functions matching the given name.
   SymbolContextList sc_list;
-  if (name) {
-    const bool include_symbols = true;
-    const bool include_inlines = true;
-    if (module) {
-      module->FindFunctions(name, nullptr, eFunctionNameTypeAuto,
-                            include_symbols, include_inlines, true, sc_list);
-    } else if (exe_ctx.GetTargetPtr()) {
-      exe_ctx.GetTargetPtr()->GetImages().FindFunctions(
-          name, eFunctionNameTypeAuto, include_symbols, include_inlines, false,
-          sc_list);
-    }
+  if (module) {
+    module->FindFunctions(name, nullptr, eFunctionNameTypeAuto, include_symbols,
+                          include_inlines, sc_list);
+  } else if (exe_ctx.GetTargetPtr()) {
+    exe_ctx.GetTargetPtr()->GetImages().FindFunctions(
+        name, eFunctionNameTypeAuto, include_symbols, include_inlines, sc_list);
   }
 
-  if (sc_list.GetSize()) {
-    return Disassemble(debugger, arch, plugin_name, flavor, exe_ctx, sc_list,
-                       num_instructions, mixed_source_and_assembly,
-                       num_mixed_context_lines, options, strm);
-  }
-  return false;
+  // If no functions were found there's nothing to disassemble.
+  if (sc_list.IsEmpty())
+    return false;
+
+  return Disassemble(debugger, arch, plugin_name, flavor, exe_ctx, sc_list,
+                     num_instructions, mixed_source_and_assembly,
+                     num_mixed_context_lines, options, strm);
 }
 
 lldb::DisassemblerSP Disassembler::DisassembleRange(
     const ArchSpec &arch, const char *plugin_name, const char *flavor,
     const ExecutionContext &exe_ctx, const AddressRange &range,
     bool prefer_file_cache) {
-  lldb::DisassemblerSP disasm_sp;
-  if (range.GetByteSize() > 0 && range.GetBaseAddress().IsValid()) {
-    disasm_sp = Disassembler::FindPluginForTarget(exe_ctx.GetTargetSP(), arch,
-                                                  flavor, plugin_name);
+  if (range.GetByteSize() <= 0)
+    return {};
 
-    if (disasm_sp) {
-      size_t bytes_disassembled = disasm_sp->ParseInstructions(
-          &exe_ctx, range, nullptr, prefer_file_cache);
-      if (bytes_disassembled == 0)
-        disasm_sp.reset();
-    }
-  }
+  if (!range.GetBaseAddress().IsValid())
+    return {};
+
+  lldb::DisassemblerSP disasm_sp = Disassembler::FindPluginForTarget(
+      exe_ctx.GetTargetSP(), arch, flavor, plugin_name);
+
+  if (!disasm_sp)
+    return {};
+
+  const size_t bytes_disassembled =
+      disasm_sp->ParseInstructions(&exe_ctx, range, nullptr, prefer_file_cache);
+  if (bytes_disassembled == 0)
+    return {};
+
   return disasm_sp;
 }
 
@@ -212,20 +218,20 @@
                                const char *flavor, const Address &start,
                                const void *src, size_t src_len,
                                uint32_t num_instructions, bool data_from_file) {
-  lldb::DisassemblerSP disasm_sp;
+  if (!src)
+    return {};
 
-  if (src) {
-    disasm_sp = Disassembler::FindPlugin(arch, flavor, plugin_name);
+  lldb::DisassemblerSP disasm_sp =
+      Disassembler::FindPlugin(arch, flavor, plugin_name);
 
-    if (disasm_sp) {
-      DataExtractor data(src, src_len, arch.GetByteOrder(),
-                         arch.GetAddressByteSize());
+  if (!disasm_sp)
+    return {};
 
-      (void)disasm_sp->DecodeInstructions(start, data, 0, num_instructions,
-                                          false, data_from_file);
-    }
-  }
+  DataExtractor data(src, src_len, arch.GetByteOrder(),
+                     arch.GetAddressByteSize());
 
+  (void)disasm_sp->DecodeInstructions(start, data, 0, num_instructions, false,
+                                      data_from_file);
   return disasm_sp;
 }
 
@@ -237,27 +243,28 @@
                                bool mixed_source_and_assembly,
                                uint32_t num_mixed_context_lines,
                                uint32_t options, Stream &strm) {
-  if (disasm_range.GetByteSize()) {
-    lldb::DisassemblerSP disasm_sp(Disassembler::FindPluginForTarget(
-        exe_ctx.GetTargetSP(), arch, flavor, plugin_name));
+  if (!disasm_range.GetByteSize())
+    return false;
 
-    if (disasm_sp) {
-      AddressRange range;
-      ResolveAddress(exe_ctx, disasm_range.GetBaseAddress(),
-                     range.GetBaseAddress());
-      range.SetByteSize(disasm_range.GetByteSize());
-      const bool prefer_file_cache = false;
-      size_t bytes_disassembled = disasm_sp->ParseInstructions(
-          &exe_ctx, range, &strm, prefer_file_cache);
-      if (bytes_disassembled == 0)
-        return false;
+  lldb::DisassemblerSP disasm_sp(Disassembler::FindPluginForTarget(
+      exe_ctx.GetTargetSP(), arch, flavor, plugin_name));
 
-      return PrintInstructions(disasm_sp.get(), debugger, arch, exe_ctx,
-                               num_instructions, mixed_source_and_assembly,
-                               num_mixed_context_lines, options, strm);
-    }
-  }
-  return false;
+  if (!disasm_sp)
+    return false;
+
+  AddressRange range;
+  ResolveAddress(exe_ctx, disasm_range.GetBaseAddress(),
+                 range.GetBaseAddress());
+  range.SetByteSize(disasm_range.GetByteSize());
+  const bool prefer_file_cache = false;
+  size_t bytes_disassembled =
+      disasm_sp->ParseInstructions(&exe_ctx, range, &strm, prefer_file_cache);
+  if (bytes_disassembled == 0)
+    return false;
+
+  return PrintInstructions(disasm_sp.get(), debugger, arch, exe_ctx,
+                           num_instructions, mixed_source_and_assembly,
+                           num_mixed_context_lines, options, strm);
 }
 
 bool Disassembler::Disassemble(Debugger &debugger, const ArchSpec &arch,
@@ -268,42 +275,51 @@
                                bool mixed_source_and_assembly,
                                uint32_t num_mixed_context_lines,
                                uint32_t options, Stream &strm) {
-  if (num_instructions > 0) {
-    lldb::DisassemblerSP disasm_sp(Disassembler::FindPluginForTarget(
-        exe_ctx.GetTargetSP(), arch, flavor, plugin_name));
-    if (disasm_sp) {
-      Address addr;
-      ResolveAddress(exe_ctx, start_address, addr);
-      const bool prefer_file_cache = false;
-      size_t bytes_disassembled = disasm_sp->ParseInstructions(
-          &exe_ctx, addr, num_instructions, prefer_file_cache);
-      if (bytes_disassembled == 0)
-        return false;
-      return PrintInstructions(disasm_sp.get(), debugger, arch, exe_ctx,
-                               num_instructions, mixed_source_and_assembly,
-                               num_mixed_context_lines, options, strm);
-    }
-  }
-  return false;
+  if (num_instructions == 0)
+    return false;
+
+  lldb::DisassemblerSP disasm_sp(Disassembler::FindPluginForTarget(
+      exe_ctx.GetTargetSP(), arch, flavor, plugin_name));
+  if (!disasm_sp)
+    return false;
+
+  Address addr;
+  ResolveAddress(exe_ctx, start_address, addr);
+
+  const bool prefer_file_cache = false;
+  size_t bytes_disassembled = disasm_sp->ParseInstructions(
+      &exe_ctx, addr, num_instructions, prefer_file_cache);
+  if (bytes_disassembled == 0)
+    return false;
+
+  return PrintInstructions(disasm_sp.get(), debugger, arch, exe_ctx,
+                           num_instructions, mixed_source_and_assembly,
+                           num_mixed_context_lines, options, strm);
 }
 
 Disassembler::SourceLine
 Disassembler::GetFunctionDeclLineEntry(const SymbolContext &sc) {
+  if (!sc.function)
+    return {};
+
+  if (!sc.line_entry.IsValid())
+    return {};
+
+  LineEntry prologue_end_line = sc.line_entry;
+  FileSpec func_decl_file;
+  uint32_t func_decl_line;
+  sc.function->GetStartLineSourceInfo(func_decl_file, func_decl_line);
+
+  if (func_decl_file != prologue_end_line.file &&
+      func_decl_file != prologue_end_line.original_file)
+    return {};
+
   SourceLine decl_line;
-  if (sc.function && sc.line_entry.IsValid()) {
-    LineEntry prologue_end_line = sc.line_entry;
-    FileSpec func_decl_file;
-    uint32_t func_decl_line;
-    sc.function->GetStartLineSourceInfo(func_decl_file, func_decl_line);
-    if (func_decl_file == prologue_end_line.file ||
-        func_decl_file == prologue_end_line.original_file) {
-      decl_line.file = func_decl_file;
-      decl_line.line = func_decl_line;
-      // TODO do we care about column on these entries?  If so, we need to
-      // plumb that through GetStartLineSourceInfo.
-      decl_line.column = 0;
-    }
-  }
+  decl_line.file = func_decl_file;
+  decl_line.line = func_decl_line;
+  // TODO: Do we care about column on these entries?  If so, we need to plumb
+  // that through GetStartLineSourceInfo.
+  decl_line.column = 0;
   return decl_line;
 }
 
@@ -355,12 +371,9 @@
     const char *function_name =
         sc.GetFunctionName(Mangled::ePreferDemangledWithoutArguments)
             .GetCString();
-    if (function_name) {
-      RegularExpression::Match regex_match(1);
-      if (avoid_regex->Execute(function_name, &regex_match)) {
-        // skip this source line
-        return true;
-      }
+    if (function_name && avoid_regex->Execute(function_name)) {
+      // skip this source line
+      return true;
     }
   }
   // don't skip this source line
@@ -793,10 +806,9 @@
       std::string value;
       static RegularExpression g_reg_exp(
           llvm::StringRef("^[ \t]*([^ \t]+)[ \t]*$"));
-      RegularExpression::Match regex_match(1);
-      bool reg_exp_success = g_reg_exp.Execute(line, &regex_match);
-      if (reg_exp_success)
-        regex_match.GetMatchAtIndex(line.c_str(), 1, value);
+      llvm::SmallVector<llvm::StringRef, 2> matches;
+      if (g_reg_exp.Execute(line, &matches))
+        value = matches[1].str();
       else
         value = line;
 
@@ -856,14 +868,15 @@
     if (!line.empty()) {
       static RegularExpression g_reg_exp(llvm::StringRef(
           "^[ \t]*([a-zA-Z_][a-zA-Z0-9_]*)[ \t]*=[ \t]*(.*)[ \t]*$"));
-      RegularExpression::Match regex_match(2);
 
-      bool reg_exp_success = g_reg_exp.Execute(line, &regex_match);
+      llvm::SmallVector<llvm::StringRef, 3> matches;
+
+      bool reg_exp_success = g_reg_exp.Execute(line, &matches);
       std::string key;
       std::string value;
       if (reg_exp_success) {
-        regex_match.GetMatchAtIndex(line.c_str(), 1, key);
-        regex_match.GetMatchAtIndex(line.c_str(), 2, value);
+        key = matches[1].str();
+        value = matches[2].str();
       } else {
         out_stream->Printf("Instruction::ReadDictionary: Failure executing "
                            "regular expression.\n");
@@ -1088,15 +1101,22 @@
 uint32_t
 InstructionList::GetIndexOfNextBranchInstruction(uint32_t start,
                                                  Target &target,
-                                                 bool ignore_calls) const {
+                                                 bool ignore_calls,
+                                                 bool *found_calls) const {
   size_t num_instructions = m_instructions.size();
 
   uint32_t next_branch = UINT32_MAX;
   size_t i;
+  
+  if (found_calls)
+    *found_calls = false;
   for (i = start; i < num_instructions; i++) {
     if (m_instructions[i]->DoesBranch()) {
-      if (ignore_calls && m_instructions[i]->IsCall())
+      if (ignore_calls && m_instructions[i]->IsCall()) {
+        if (found_calls)
+          *found_calls = true;
         continue;
+      }
       next_branch = i;
       break;
     }
diff --git a/src/llvm-project/lldb/source/Core/DumpDataExtractor.cpp b/src/llvm-project/lldb/source/Core/DumpDataExtractor.cpp
index aa84370..b5e1071 100644
--- a/src/llvm-project/lldb/source/Core/DumpDataExtractor.cpp
+++ b/src/llvm-project/lldb/source/Core/DumpDataExtractor.cpp
@@ -14,20 +14,18 @@
 #include "lldb/Core/Address.h"
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/ModuleList.h"
-#include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/ExecutionContextScope.h"
 #include "lldb/Target/SectionLoadList.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/DataExtractor.h"
+#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/CanonicalType.h"
-
 #include "llvm/ADT/APFloat.h"
 #include "llvm/ADT/APInt.h"
 #include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/Optional.h"
 #include "llvm/ADT/SmallVector.h"
 
 #include <limits>
@@ -64,8 +62,12 @@
   return u.f * ldexpf(1, -112);
 }
 
-static bool GetAPInt(const DataExtractor &data, lldb::offset_t *offset_ptr,
-                     lldb::offset_t byte_size, llvm::APInt &result) {
+static llvm::Optional<llvm::APInt> GetAPInt(const DataExtractor &data,
+                                            lldb::offset_t *offset_ptr,
+                                            lldb::offset_t byte_size) {
+  if (byte_size == 0)
+    return llvm::None;
+
   llvm::SmallVector<uint64_t, 2> uint64_array;
   lldb::offset_t bytes_left = byte_size;
   uint64_t u64;
@@ -81,8 +83,7 @@
       }
       uint64_array.push_back(u64);
     }
-    result = llvm::APInt(byte_size * 8, llvm::ArrayRef<uint64_t>(uint64_array));
-    return true;
+    return llvm::APInt(byte_size * 8, llvm::ArrayRef<uint64_t>(uint64_array));
   } else if (byte_order == lldb::eByteOrderBig) {
     lldb::offset_t be_offset = *offset_ptr + byte_size;
     lldb::offset_t temp_offset;
@@ -101,18 +102,17 @@
       uint64_array.push_back(u64);
     }
     *offset_ptr += byte_size;
-    result = llvm::APInt(byte_size * 8, llvm::ArrayRef<uint64_t>(uint64_array));
-    return true;
+    return llvm::APInt(byte_size * 8, llvm::ArrayRef<uint64_t>(uint64_array));
   }
-  return false;
+  return llvm::None;
 }
 
 static lldb::offset_t DumpAPInt(Stream *s, const DataExtractor &data,
                                 lldb::offset_t offset, lldb::offset_t byte_size,
                                 bool is_signed, unsigned radix) {
-  llvm::APInt apint;
-  if (GetAPInt(data, &offset, byte_size, apint)) {
-    std::string apint_str(apint.toString(radix, is_signed));
+  llvm::Optional<llvm::APInt> apint = GetAPInt(data, &offset, byte_size);
+  if (apint.hasValue()) {
+    std::string apint_str(apint.getValue().toString(radix, is_signed));
     switch (radix) {
     case 2:
       s->Write("0b", 2);
@@ -467,9 +467,10 @@
     } break;
 
     case eFormatPointer:
-      s->Address(DE.GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size,
-                                      item_bit_offset),
-                 sizeof(addr_t));
+      DumpAddress(s->AsRawOstream(),
+                  DE.GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size,
+                                       item_bit_offset),
+                  sizeof(addr_t));
       break;
 
     case eFormatComplexInteger: {
@@ -555,49 +556,31 @@
       if (exe_scope)
         target_sp = exe_scope->CalculateTarget();
       if (target_sp) {
-        ClangASTContext *clang_ast = target_sp->GetScratchClangASTContext();
-        if (clang_ast) {
-          clang::ASTContext *ast = clang_ast->getASTContext();
-          if (ast) {
-            llvm::SmallVector<char, 256> sv;
-            // Show full precision when printing float values
-            const unsigned format_precision = 0;
-            const unsigned format_max_padding = 100;
-            size_t item_bit_size = item_byte_size * 8;
+        auto type_system_or_err =
+            target_sp->GetScratchTypeSystemForLanguage(eLanguageTypeC);
+        if (!type_system_or_err) {
+          llvm::consumeError(type_system_or_err.takeError());
+        } else {
+          auto &type_system = *type_system_or_err;
+          llvm::SmallVector<char, 256> sv;
+          // Show full precision when printing float values
+          const unsigned format_precision = 0;
+          const unsigned format_max_padding =
+              target_sp->GetMaxZeroPaddingInFloatFormat();
 
-            if (item_bit_size == ast->getTypeSize(ast->FloatTy)) {
-              llvm::APInt apint(item_bit_size,
-                                DE.GetMaxU64(&offset, item_byte_size));
-              llvm::APFloat apfloat(ast->getFloatTypeSemantics(ast->FloatTy),
-                                    apint);
-              apfloat.toString(sv, format_precision, format_max_padding);
-            } else if (item_bit_size == ast->getTypeSize(ast->DoubleTy)) {
-              llvm::APInt apint;
-              if (GetAPInt(DE, &offset, item_byte_size, apint)) {
-                llvm::APFloat apfloat(ast->getFloatTypeSemantics(ast->DoubleTy),
-                                      apint);
-                apfloat.toString(sv, format_precision, format_max_padding);
-              }
-            } else if (item_bit_size == ast->getTypeSize(ast->LongDoubleTy)) {
-              const auto &semantics =
-                  ast->getFloatTypeSemantics(ast->LongDoubleTy);
+          const auto &semantics =
+              type_system.GetFloatTypeSemantics(item_byte_size);
 
-              offset_t byte_size = item_byte_size;
-              if (&semantics == &llvm::APFloatBase::x87DoubleExtended())
-                byte_size = (llvm::APFloat::getSizeInBits(semantics) + 7) / 8;
-
-              llvm::APInt apint;
-              if (GetAPInt(DE, &offset, byte_size, apint)) {
-                llvm::APFloat apfloat(semantics, apint);
-                apfloat.toString(sv, format_precision, format_max_padding);
-              }
-            } else if (item_bit_size == ast->getTypeSize(ast->HalfTy)) {
-              llvm::APInt apint(item_bit_size, DE.GetU16(&offset));
-              llvm::APFloat apfloat(ast->getFloatTypeSemantics(ast->HalfTy),
-                                    apint);
-              apfloat.toString(sv, format_precision, format_max_padding);
-            }
-
+          // Recalculate the byte size in case of a difference. This is possible
+          // when item_byte_size is 16 (128-bit), because you could get back the
+          // x87DoubleExtended semantics which has a byte size of 10 (80-bit).
+          const size_t semantics_byte_size =
+              (llvm::APFloat::getSizeInBits(semantics) + 7) / 8;
+          llvm::Optional<llvm::APInt> apint =
+              GetAPInt(DE, &offset, semantics_byte_size);
+          if (apint.hasValue()) {
+            llvm::APFloat apfloat(semantics, apint.getValue());
+            apfloat.toString(sv, format_precision, format_max_padding);
             if (!sv.empty()) {
               s->Printf("%*.*s", (int)sv.size(), (int)sv.size(), sv.data());
               used_upfloat = true;
diff --git a/src/llvm-project/lldb/source/Core/FileLineResolver.cpp b/src/llvm-project/lldb/source/Core/FileLineResolver.cpp
index 3cba1c7..7d91d1a 100644
--- a/src/llvm-project/lldb/source/Core/FileLineResolver.cpp
+++ b/src/llvm-project/lldb/source/Core/FileLineResolver.cpp
@@ -33,11 +33,11 @@
 
 Searcher::CallbackReturn
 FileLineResolver::SearchCallback(SearchFilter &filter, SymbolContext &context,
-                                 Address *addr, bool containing) {
+                                 Address *addr) {
   CompileUnit *cu = context.comp_unit;
 
-  if (m_inlines ||
-      m_file_spec.Compare(*cu, m_file_spec, (bool)m_file_spec.GetDirectory())) {
+  if (m_inlines || m_file_spec.Compare(cu->GetPrimaryFile(), m_file_spec,
+                                       (bool)m_file_spec.GetDirectory())) {
     uint32_t start_file_idx = 0;
     uint32_t file_idx =
         cu->GetSupportFiles().FindFileIndex(start_file_idx, m_file_spec, false);
diff --git a/src/llvm-project/lldb/source/Core/FileSpecList.cpp b/src/llvm-project/lldb/source/Core/FileSpecList.cpp
index 95133fa..6651324 100644
--- a/src/llvm-project/lldb/source/Core/FileSpecList.cpp
+++ b/src/llvm-project/lldb/source/Core/FileSpecList.cpp
@@ -47,7 +47,7 @@
 void FileSpecList::Dump(Stream *s, const char *separator_cstr) const {
   collection::const_iterator pos, end = m_files.end();
   for (pos = m_files.begin(); pos != end; ++pos) {
-    pos->Dump(s);
+    pos->Dump(s->AsRawOstream());
     if (separator_cstr && ((pos + 1) != end))
       s->PutCString(separator_cstr);
   }
diff --git a/src/llvm-project/lldb/source/Core/FormatEntity.cpp b/src/llvm-project/lldb/source/Core/FormatEntity.cpp
index 1ffbed2..7aa1ece 100644
--- a/src/llvm-project/lldb/source/Core/FormatEntity.cpp
+++ b/src/llvm-project/lldb/source/Core/FormatEntity.cpp
@@ -125,6 +125,7 @@
     ENTRY("name", FunctionName),
     ENTRY("name-without-args", FunctionNameNoArgs),
     ENTRY("name-with-args", FunctionNameWithArgs),
+    ENTRY("mangled-name", FunctionMangledName),
     ENTRY("addr-offset", FunctionAddrOffset),
     ENTRY("concrete-only-addr-offset-no-padding", FunctionAddrOffsetConcrete),
     ENTRY("line-offset", FunctionLineOffset),
@@ -351,6 +352,7 @@
     ENUM_TO_CSTR(FunctionName);
     ENUM_TO_CSTR(FunctionNameWithArgs);
     ENUM_TO_CSTR(FunctionNameNoArgs);
+    ENUM_TO_CSTR(FunctionMangledName);
     ENUM_TO_CSTR(FunctionAddrOffset);
     ENUM_TO_CSTR(FunctionAddrOffsetConcrete);
     ENUM_TO_CSTR(FunctionLineOffset);
@@ -414,9 +416,10 @@
   return false;
 }
 
-static bool DumpAddress(Stream &s, const SymbolContext *sc,
-                        const ExecutionContext *exe_ctx, const Address &addr,
-                        bool print_file_addr_or_load_addr) {
+static bool DumpAddressAndContent(Stream &s, const SymbolContext *sc,
+                                  const ExecutionContext *exe_ctx,
+                                  const Address &addr,
+                                  bool print_file_addr_or_load_addr) {
   Target *target = Target::GetTargetFromContexts(exe_ctx, sc);
   addr_t vaddr = LLDB_INVALID_ADDRESS;
   if (exe_ctx && !target->GetSectionLoadList().IsEmpty())
@@ -514,24 +517,24 @@
   close_bracket_index = llvm::StringRef::npos;
   const size_t open_bracket_index = subpath.find('[');
   if (open_bracket_index == llvm::StringRef::npos) {
-    if (log)
-      log->Printf("[ScanBracketedRange] no bracketed range, skipping entirely");
+    LLDB_LOGF(log,
+              "[ScanBracketedRange] no bracketed range, skipping entirely");
     return false;
   }
 
   close_bracket_index = subpath.find(']', open_bracket_index + 1);
 
   if (close_bracket_index == llvm::StringRef::npos) {
-    if (log)
-      log->Printf("[ScanBracketedRange] no bracketed range, skipping entirely");
+    LLDB_LOGF(log,
+              "[ScanBracketedRange] no bracketed range, skipping entirely");
     return false;
   } else {
     var_name_final_if_array_range = subpath.data() + open_bracket_index;
 
     if (close_bracket_index - open_bracket_index == 1) {
-      if (log)
-        log->Printf(
-            "[ScanBracketedRange] '[]' detected.. going from 0 to end of data");
+      LLDB_LOGF(
+          log,
+          "[ScanBracketedRange] '[]' detected.. going from 0 to end of data");
       index_lower = 0;
     } else {
       const size_t separator_index = subpath.find('-', open_bracket_index + 1);
@@ -540,22 +543,21 @@
         const char *index_lower_cstr = subpath.data() + open_bracket_index + 1;
         index_lower = ::strtoul(index_lower_cstr, nullptr, 0);
         index_higher = index_lower;
-        if (log)
-          log->Printf("[ScanBracketedRange] [%" PRId64
-                      "] detected, high index is same",
-                      index_lower);
+        LLDB_LOGF(log,
+                  "[ScanBracketedRange] [%" PRId64
+                  "] detected, high index is same",
+                  index_lower);
       } else {
         const char *index_lower_cstr = subpath.data() + open_bracket_index + 1;
         const char *index_higher_cstr = subpath.data() + separator_index + 1;
         index_lower = ::strtoul(index_lower_cstr, nullptr, 0);
         index_higher = ::strtoul(index_higher_cstr, nullptr, 0);
-        if (log)
-          log->Printf("[ScanBracketedRange] [%" PRId64 "-%" PRId64 "] detected",
-                      index_lower, index_higher);
+        LLDB_LOGF(log,
+                  "[ScanBracketedRange] [%" PRId64 "-%" PRId64 "] detected",
+                  index_lower, index_higher);
       }
       if (index_lower > index_higher && index_higher > 0) {
-        if (log)
-          log->Printf("[ScanBracketedRange] swapping indices");
+        LLDB_LOGF(log, "[ScanBracketedRange] swapping indices");
         const int64_t temp = index_lower;
         index_lower = index_higher;
         index_higher = temp;
@@ -627,9 +629,8 @@
   const char *ptr_deref_format = "[%d]";
   std::string ptr_deref_buffer(10, 0);
   ::sprintf(&ptr_deref_buffer[0], ptr_deref_format, index);
-  if (log)
-    log->Printf("[ExpandIndexedExpression] name to deref: %s",
-                ptr_deref_buffer.c_str());
+  LLDB_LOGF(log, "[ExpandIndexedExpression] name to deref: %s",
+            ptr_deref_buffer.c_str());
   ValueObject::GetValueForExpressionPathOptions options;
   ValueObject::ExpressionPathEndResultType final_value_type;
   ValueObject::ExpressionPathScanEndReason reason_to_stop;
@@ -640,15 +641,15 @@
       ptr_deref_buffer.c_str(), &reason_to_stop, &final_value_type, options,
       &what_next);
   if (!item) {
-    if (log)
-      log->Printf("[ExpandIndexedExpression] ERROR: why stopping = %d,"
-                  " final_value_type %d",
-                  reason_to_stop, final_value_type);
+    LLDB_LOGF(log,
+              "[ExpandIndexedExpression] ERROR: why stopping = %d,"
+              " final_value_type %d",
+              reason_to_stop, final_value_type);
   } else {
-    if (log)
-      log->Printf("[ExpandIndexedExpression] ALL RIGHT: why stopping = %d,"
-                  " final_value_type %d",
-                  reason_to_stop, final_value_type);
+    LLDB_LOGF(log,
+              "[ExpandIndexedExpression] ALL RIGHT: why stopping = %d,"
+              " final_value_type %d",
+              reason_to_stop, final_value_type);
   }
   return item;
 }
@@ -770,9 +771,8 @@
 
     const std::string &expr_path = entry.string;
 
-    if (log)
-      log->Printf("[Debugger::FormatPrompt] symbol to expand: %s",
-                  expr_path.c_str());
+    LLDB_LOGF(log, "[Debugger::FormatPrompt] symbol to expand: %s",
+              expr_path.c_str());
 
     target =
         valobj
@@ -781,16 +781,16 @@
             .get();
 
     if (!target) {
-      if (log)
-        log->Printf("[Debugger::FormatPrompt] ERROR: why stopping = %d,"
-                    " final_value_type %d",
-                    reason_to_stop, final_value_type);
+      LLDB_LOGF(log,
+                "[Debugger::FormatPrompt] ERROR: why stopping = %d,"
+                " final_value_type %d",
+                reason_to_stop, final_value_type);
       return false;
     } else {
-      if (log)
-        log->Printf("[Debugger::FormatPrompt] ALL RIGHT: why stopping = %d,"
-                    " final_value_type %d",
-                    reason_to_stop, final_value_type);
+      LLDB_LOGF(log,
+                "[Debugger::FormatPrompt] ALL RIGHT: why stopping = %d,"
+                " final_value_type %d",
+                reason_to_stop, final_value_type);
       target = target
                    ->GetQualifiedRepresentationIfAvailable(
                        target->GetDynamicValueType(), true)
@@ -814,18 +814,16 @@
     Status error;
     target = target->Dereference(error).get();
     if (error.Fail()) {
-      if (log)
-        log->Printf("[Debugger::FormatPrompt] ERROR: %s\n",
-                    error.AsCString("unknown"));
+      LLDB_LOGF(log, "[Debugger::FormatPrompt] ERROR: %s\n",
+                error.AsCString("unknown"));
       return false;
     }
     do_deref_pointer = false;
   }
 
   if (!target) {
-    if (log)
-      log->Printf("[Debugger::FormatPrompt] could not calculate target for "
-                  "prompt expression");
+    LLDB_LOGF(log, "[Debugger::FormatPrompt] could not calculate target for "
+                   "prompt expression");
     return false;
   }
 
@@ -860,18 +858,16 @@
                                                              // exceptions
   {
     StreamString str_temp;
-    if (log)
-      log->Printf(
-          "[Debugger::FormatPrompt] I am into array || pointer && !range");
+    LLDB_LOGF(log,
+              "[Debugger::FormatPrompt] I am into array || pointer && !range");
 
     if (target->HasSpecialPrintableRepresentation(val_obj_display,
                                                   custom_format)) {
       // try to use the special cases
       bool success = target->DumpPrintableRepresentation(
           str_temp, val_obj_display, custom_format);
-      if (log)
-        log->Printf("[Debugger::FormatPrompt] special cases did%s match",
-                    success ? "" : "n't");
+      LLDB_LOGF(log, "[Debugger::FormatPrompt] special cases did%s match",
+                success ? "" : "n't");
 
       // should not happen
       if (success)
@@ -909,17 +905,16 @@
   }
 
   if (!is_array_range) {
-    if (log)
-      log->Printf("[Debugger::FormatPrompt] dumping ordinary printable output");
+    LLDB_LOGF(log,
+              "[Debugger::FormatPrompt] dumping ordinary printable output");
     return target->DumpPrintableRepresentation(s, val_obj_display,
                                                custom_format);
   } else {
-    if (log)
-      log->Printf("[Debugger::FormatPrompt] checking if I can handle as array");
+    LLDB_LOGF(log,
+              "[Debugger::FormatPrompt] checking if I can handle as array");
     if (!is_array && !is_pointer)
       return false;
-    if (log)
-      log->Printf("[Debugger::FormatPrompt] handle as array");
+    LLDB_LOGF(log, "[Debugger::FormatPrompt] handle as array");
     StreamString special_directions_stream;
     llvm::StringRef special_directions;
     if (close_bracket_index != llvm::StringRef::npos &&
@@ -965,15 +960,15 @@
               .get();
 
       if (!item) {
-        if (log)
-          log->Printf("[Debugger::FormatPrompt] ERROR in getting child item at "
-                      "index %" PRId64,
-                      index);
+        LLDB_LOGF(log,
+                  "[Debugger::FormatPrompt] ERROR in getting child item at "
+                  "index %" PRId64,
+                  index);
       } else {
-        if (log)
-          log->Printf(
-              "[Debugger::FormatPrompt] special_directions for child item: %s",
-              special_directions.data() ? special_directions.data() : "");
+        LLDB_LOGF(
+            log,
+            "[Debugger::FormatPrompt] special_directions for child item: %s",
+            special_directions.data() ? special_directions.data() : "");
       }
 
       if (special_directions.empty()) {
@@ -1153,9 +1148,10 @@
   case Entry::Type::AddressFile:
   case Entry::Type::AddressLoad:
   case Entry::Type::AddressLoadOrFile:
-    return (addr != nullptr && addr->IsValid() &&
-            DumpAddress(s, sc, exe_ctx, *addr,
-                        entry.type == Entry::Type::AddressLoadOrFile));
+    return (
+        addr != nullptr && addr->IsValid() &&
+        DumpAddressAndContent(s, sc, exe_ctx, *addr,
+                              entry.type == Entry::Type::AddressLoadOrFile));
 
   case Entry::Type::ProcessID:
     if (exe_ctx) {
@@ -1384,8 +1380,7 @@
     if (sc) {
       CompileUnit *cu = sc->comp_unit;
       if (cu) {
-        // CompileUnit is a FileSpec
-        if (DumpFile(s, *cu, (FileKind)entry.number))
+        if (DumpFile(s, cu->GetPrimaryFile(), (FileKind)entry.number))
           return true;
       }
     }
@@ -1424,7 +1419,7 @@
       if (frame) {
         const Address &pc_addr = frame->GetFrameCodeAddress();
         if (pc_addr.IsValid()) {
-          if (DumpAddress(s, sc, exe_ctx, pc_addr, false))
+          if (DumpAddressAndContent(s, sc, exe_ctx, pc_addr, false))
             return true;
         }
       }
@@ -1752,6 +1747,31 @@
   }
     return false;
 
+  case Entry::Type::FunctionMangledName: {
+    const char *name = nullptr;
+    if (sc->symbol)
+      name = sc->symbol->GetMangled()
+                 .GetName(sc->symbol->GetLanguage(), Mangled::ePreferMangled)
+                 .AsCString();
+    else if (sc->function)
+      name = sc->function->GetMangled()
+                 .GetName(sc->symbol->GetLanguage(), Mangled::ePreferMangled)
+                 .AsCString();
+
+    if (!name)
+      return false;
+    s.PutCString(name);
+
+    if (sc->block->GetContainingInlinedBlock()) {
+      if (const InlineFunctionInfo *inline_info =
+              sc->block->GetInlinedFunctionInfo()) {
+        s.PutCString(" [inlined] ");
+        inline_info->GetName(sc->function->GetLanguage()).Dump(&s);
+      }
+    }
+    return true;
+  }
+
   case Entry::Type::FunctionAddrOffset:
     if (addr) {
       if (DumpAddressOffsetFromFunction(s, sc, exe_ctx, *addr, false, false,
@@ -1836,7 +1856,7 @@
 
       if (entry.type == Entry::Type::LineEntryEndAddress)
         addr.Slide(sc->line_entry.range.GetByteSize());
-      if (DumpAddress(s, sc, exe_ctx, addr, false))
+      if (DumpAddressAndContent(s, sc, exe_ctx, addr, false))
         return true;
     }
     return false;
@@ -2317,7 +2337,7 @@
                                   llvm::StringRef variable_name,
                                   llvm::StringRef variable_format) {
   if (variable_name.empty() || variable_name.equals(".fullpath")) {
-    file_spec.Dump(&s);
+    file_spec.Dump(s.AsRawOstream());
     return true;
   } else if (variable_name.equals(".basename")) {
     s.PutCString(file_spec.GetFilename().AsCString(""));
@@ -2354,34 +2374,31 @@
   }
 }
 
-size_t FormatEntity::AutoComplete(CompletionRequest &request) {
-  llvm::StringRef str = request.GetCursorArgumentPrefix().str();
-
-  request.SetWordComplete(false);
-  str = str.drop_front(request.GetMatchStartPoint());
+void FormatEntity::AutoComplete(CompletionRequest &request) {
+  llvm::StringRef str = request.GetCursorArgumentPrefix();
 
   const size_t dollar_pos = str.rfind('$');
   if (dollar_pos == llvm::StringRef::npos)
-    return 0;
+    return;
 
   // Hitting TAB after $ at the end of the string add a "{"
   if (dollar_pos == str.size() - 1) {
     std::string match = str.str();
     match.append("{");
     request.AddCompletion(match);
-    return 1;
+    return;
   }
 
   if (str[dollar_pos + 1] != '{')
-    return 0;
+    return;
 
   const size_t close_pos = str.find('}', dollar_pos + 2);
   if (close_pos != llvm::StringRef::npos)
-    return 0;
+    return;
 
   const size_t format_pos = str.find('%', dollar_pos + 2);
   if (format_pos != llvm::StringRef::npos)
-    return 0;
+    return;
 
   llvm::StringRef partial_variable(str.substr(dollar_pos + 2));
   if (partial_variable.empty()) {
@@ -2389,7 +2406,7 @@
     StringList new_matches;
     AddMatches(&g_root, str, llvm::StringRef(), new_matches);
     request.AddCompletions(new_matches);
-    return request.GetNumberOfMatches();
+    return;
   }
 
   // We have a partially specified variable, find it
@@ -2397,7 +2414,7 @@
   const FormatEntity::Entry::Definition *entry_def =
       FindEntry(partial_variable, &g_root, remainder);
   if (!entry_def)
-    return 0;
+    return;
 
   const size_t n = entry_def->num_children;
 
@@ -2409,7 +2426,6 @@
     } else {
       // "${thread.id" <TAB>
       request.AddCompletion(MakeMatch(str, "}"));
-      request.SetWordComplete(true);
     }
   } else if (remainder.equals(".")) {
     // "${thread." <TAB>
@@ -2423,5 +2439,4 @@
     AddMatches(entry_def, str, remainder, new_matches);
     request.AddCompletions(new_matches);
   }
-  return request.GetNumberOfMatches();
 }
diff --git a/src/llvm-project/lldb/source/Core/Highlighter.cpp b/src/llvm-project/lldb/source/Core/Highlighter.cpp
index 0b0aa96..c3c614a 100644
--- a/src/llvm-project/lldb/source/Core/Highlighter.cpp
+++ b/src/llvm-project/lldb/source/Core/Highlighter.cpp
@@ -13,6 +13,7 @@
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb_private;
+using namespace lldb_private::ansi;
 
 void HighlightStyle::ColorStyle::Apply(Stream &s, llvm::StringRef value) const {
   s << m_prefix << value << m_suffix;
@@ -20,8 +21,8 @@
 
 void HighlightStyle::ColorStyle::Set(llvm::StringRef prefix,
                                      llvm::StringRef suffix) {
-  m_prefix = lldb_utility::ansi::FormatAnsiTerminalCodes(prefix);
-  m_suffix = lldb_utility::ansi::FormatAnsiTerminalCodes(suffix);
+  m_prefix = FormatAnsiTerminalCodes(prefix);
+  m_suffix = FormatAnsiTerminalCodes(suffix);
 }
 
 void DefaultHighlighter::Highlight(const HighlightStyle &options,
diff --git a/src/llvm-project/lldb/source/Core/IOHandler.cpp b/src/llvm-project/lldb/source/Core/IOHandler.cpp
index c3c7220..4021a6d 100644
--- a/src/llvm-project/lldb/source/Core/IOHandler.cpp
+++ b/src/llvm-project/lldb/source/Core/IOHandler.cpp
@@ -8,11 +8,6 @@
 
 #include "lldb/Core/IOHandler.h"
 
-#ifndef LLDB_DISABLE_CURSES
-#include <curses.h>
-#include <panel.h>
-#endif
-
 #if defined(__APPLE__)
 #include <deque>
 #endif
@@ -20,6 +15,7 @@
 
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/StreamFile.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Host/File.h"
 #include "lldb/Utility/Predicate.h"
 #include "lldb/Utility/Status.h"
@@ -27,32 +23,14 @@
 #include "lldb/Utility/StringList.h"
 #include "lldb/lldb-forward.h"
 
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
 #include "lldb/Host/Editline.h"
 #endif
 #include "lldb/Interpreter/CommandCompletions.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
-#ifndef LLDB_DISABLE_CURSES
-#include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Core/ValueObject.h"
-#include "lldb/Core/ValueObjectRegister.h"
-#include "lldb/Symbol/Block.h"
-#include "lldb/Symbol/Function.h"
-#include "lldb/Symbol/Symbol.h"
-#include "lldb/Symbol/VariableList.h"
-#include "lldb/Target/Process.h"
-#include "lldb/Target/RegisterContext.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/StopInfo.h"
-#include "lldb/Target/Target.h"
-#include "lldb/Target/Thread.h"
-#include "lldb/Utility/State.h"
-#endif
-
 #include "llvm/ADT/StringRef.h"
 
-#ifdef _MSC_VER
+#ifdef _WIN32
 #include "lldb/Host/windows/windows.h"
 #endif
 
@@ -70,10 +48,13 @@
 
 using namespace lldb;
 using namespace lldb_private;
+using llvm::None;
+using llvm::Optional;
+using llvm::StringRef;
 
 IOHandler::IOHandler(Debugger &debugger, IOHandler::Type type)
     : IOHandler(debugger, type,
-                StreamFileSP(), // Adopt STDIN from top input reader
+                FileSP(),       // Adopt STDIN from top input reader
                 StreamFileSP(), // Adopt STDOUT from top input reader
                 StreamFileSP(), // Adopt STDERR from top input reader
                 0,              // Flags
@@ -81,7 +62,7 @@
       ) {}
 
 IOHandler::IOHandler(Debugger &debugger, IOHandler::Type type,
-                     const lldb::StreamFileSP &input_sp,
+                     const lldb::FileSP &input_sp,
                      const lldb::StreamFileSP &output_sp,
                      const lldb::StreamFileSP &error_sp, uint32_t flags,
                      repro::DataRecorder *data_recorder)
@@ -98,7 +79,7 @@
 IOHandler::~IOHandler() = default;
 
 int IOHandler::GetInputFD() {
-  return (m_input_sp ? m_input_sp->GetFile().GetDescriptor() : -1);
+  return (m_input_sp ? m_input_sp->GetDescriptor() : -1);
 }
 
 int IOHandler::GetOutputFD() {
@@ -110,7 +91,7 @@
 }
 
 FILE *IOHandler::GetInputFILE() {
-  return (m_input_sp ? m_input_sp->GetFile().GetStream() : nullptr);
+  return (m_input_sp ? m_input_sp->GetStream() : nullptr);
 }
 
 FILE *IOHandler::GetOutputFILE() {
@@ -121,18 +102,18 @@
   return (m_error_sp ? m_error_sp->GetFile().GetStream() : nullptr);
 }
 
-StreamFileSP &IOHandler::GetInputStreamFile() { return m_input_sp; }
+FileSP &IOHandler::GetInputFileSP() { return m_input_sp; }
 
-StreamFileSP &IOHandler::GetOutputStreamFile() { return m_output_sp; }
+StreamFileSP &IOHandler::GetOutputStreamFileSP() { return m_output_sp; }
 
-StreamFileSP &IOHandler::GetErrorStreamFile() { return m_error_sp; }
+StreamFileSP &IOHandler::GetErrorStreamFileSP() { return m_error_sp; }
 
 bool IOHandler::GetIsInteractive() {
-  return GetInputStreamFile()->GetFile().GetIsInteractive();
+  return GetInputFileSP() ? GetInputFileSP()->GetIsInteractive() : false;
 }
 
 bool IOHandler::GetIsRealTerminal() {
-  return GetInputStreamFile()->GetFile().GetIsRealTerminal();
+  return GetInputFileSP() ? GetInputFileSP()->GetIsRealTerminal() : false;
 }
 
 void IOHandler::SetPopped(bool b) { m_popped.SetValue(b, eBroadcastOnChange); }
@@ -170,18 +151,11 @@
 
 IOHandlerConfirm::~IOHandlerConfirm() = default;
 
-int IOHandlerConfirm::IOHandlerComplete(
-    IOHandler &io_handler, const char *current_line, const char *cursor,
-    const char *last_char, int skip_first_n_matches, int max_matches,
-    StringList &matches, StringList &descriptions) {
-  if (current_line == cursor) {
-    if (m_default_response) {
-      matches.AppendString("y");
-    } else {
-      matches.AppendString("n");
-    }
-  }
-  return matches.GetSize();
+void IOHandlerConfirm::IOHandlerComplete(IOHandler &io_handler,
+                                         CompletionRequest &request) {
+  if (request.GetRawCursorPos() != 0)
+    return;
+  request.AddCompletion(m_default_response ? "y" : "n");
 }
 
 void IOHandlerConfirm::IOHandlerInputComplete(IOHandler &io_handler,
@@ -219,47 +193,20 @@
   }
 }
 
-int IOHandlerDelegate::IOHandlerComplete(
-    IOHandler &io_handler, const char *current_line, const char *cursor,
-    const char *last_char, int skip_first_n_matches, int max_matches,
-    StringList &matches, StringList &descriptions) {
+void IOHandlerDelegate::IOHandlerComplete(IOHandler &io_handler,
+                                          CompletionRequest &request) {
   switch (m_completion) {
   case Completion::None:
     break;
-
   case Completion::LLDBCommand:
-    return io_handler.GetDebugger().GetCommandInterpreter().HandleCompletion(
-        current_line, cursor, last_char, skip_first_n_matches, max_matches,
-        matches, descriptions);
-  case Completion::Expression: {
-    CompletionResult result;
-    CompletionRequest request(current_line, cursor - current_line,
-                              skip_first_n_matches, max_matches, result);
+    io_handler.GetDebugger().GetCommandInterpreter().HandleCompletion(request);
+    break;
+  case Completion::Expression:
     CommandCompletions::InvokeCommonCompletionCallbacks(
         io_handler.GetDebugger().GetCommandInterpreter(),
         CommandCompletions::eVariablePathCompletion, request, nullptr);
-    result.GetMatches(matches);
-    result.GetDescriptions(descriptions);
-
-    size_t num_matches = request.GetNumberOfMatches();
-    if (num_matches > 0) {
-      std::string common_prefix;
-      matches.LongestCommonPrefix(common_prefix);
-      const size_t partial_name_len = request.GetCursorArgumentPrefix().size();
-
-      // If we matched a unique single command, add a space... Only do this if
-      // the completer told us this was a complete word, however...
-      if (num_matches == 1 && request.GetWordComplete()) {
-        common_prefix.push_back(' ');
-      }
-      common_prefix.erase(0, partial_name_len);
-      matches.InsertStringAtIndex(0, std::move(common_prefix));
-    }
-    return num_matches;
-  } break;
+    break;
   }
-
-  return 0;
 }
 
 IOHandlerEditline::IOHandlerEditline(
@@ -269,7 +216,7 @@
     bool multi_line, bool color_prompts, uint32_t line_number_start,
     IOHandlerDelegate &delegate, repro::DataRecorder *data_recorder)
     : IOHandlerEditline(debugger, type,
-                        StreamFileSP(), // Inherit input from top input reader
+                        FileSP(),       // Inherit input from top input reader
                         StreamFileSP(), // Inherit output from top input reader
                         StreamFileSP(), // Inherit error from top input reader
                         0,              // Flags
@@ -278,16 +225,16 @@
                         line_number_start, delegate, data_recorder) {}
 
 IOHandlerEditline::IOHandlerEditline(
-    Debugger &debugger, IOHandler::Type type,
-    const lldb::StreamFileSP &input_sp, const lldb::StreamFileSP &output_sp,
-    const lldb::StreamFileSP &error_sp, uint32_t flags,
+    Debugger &debugger, IOHandler::Type type, const lldb::FileSP &input_sp,
+    const lldb::StreamFileSP &output_sp, const lldb::StreamFileSP &error_sp,
+    uint32_t flags,
     const char *editline_name, // Used for saving history files
     llvm::StringRef prompt, llvm::StringRef continuation_prompt,
     bool multi_line, bool color_prompts, uint32_t line_number_start,
     IOHandlerDelegate &delegate, repro::DataRecorder *data_recorder)
     : IOHandler(debugger, type, input_sp, output_sp, error_sp, flags,
                 data_recorder),
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
       m_editline_up(),
 #endif
       m_delegate(delegate), m_prompt(), m_continuation_prompt(),
@@ -297,10 +244,11 @@
       m_editing(false) {
   SetPrompt(prompt);
 
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   bool use_editline = false;
 
-  use_editline = m_input_sp->GetFile().GetIsRealTerminal();
+  use_editline = GetInputFILE() && GetOutputFILE() && GetErrorFILE() &&
+                 m_input_sp && m_input_sp->GetIsRealTerminal();
 
   if (use_editline) {
     m_editline_up.reset(new Editline(editline_name, GetInputFILE(),
@@ -324,7 +272,7 @@
 }
 
 IOHandlerEditline::~IOHandlerEditline() {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   m_editline_up.reset();
 #endif
 }
@@ -339,95 +287,122 @@
   m_delegate.IOHandlerDeactivated(*this);
 }
 
-bool IOHandlerEditline::GetLine(std::string &line, bool &interrupted) {
-#ifndef LLDB_DISABLE_LIBEDIT
-  if (m_editline_up) {
-    bool b = m_editline_up->GetLine(line, interrupted);
-    if (m_data_recorder)
-      m_data_recorder->Record(line, true);
-    return b;
-  } else {
-#endif
-    line.clear();
-
-    FILE *in = GetInputFILE();
-    if (in) {
-      if (GetIsInteractive()) {
-        const char *prompt = nullptr;
-
-        if (m_multi_line && m_curr_line_idx > 0)
-          prompt = GetContinuationPrompt();
-
-        if (prompt == nullptr)
-          prompt = GetPrompt();
-
-        if (prompt && prompt[0]) {
-          FILE *out = GetOutputFILE();
-          if (out) {
-            ::fprintf(out, "%s", prompt);
-            ::fflush(out);
-          }
-        }
-      }
-      char buffer[256];
-      bool done = false;
-      bool got_line = false;
-      m_editing = true;
-      while (!done) {
-#ifdef _WIN32
-        // ReadFile on Windows is supposed to set ERROR_OPERATION_ABORTED
-        // according to the docs on MSDN. However, this has evidently been a
-        // known bug since Windows 8. Therefore, we can't detect if a signal
-        // interrupted in the fgets. So pressing ctrl-c causes the repl to end
-        // and the process to exit. A temporary workaround is just to attempt to
-        // fgets twice until this bug is fixed.
-        if (fgets(buffer, sizeof(buffer), in) == nullptr &&
-            fgets(buffer, sizeof(buffer), in) == nullptr) {
-#else
-        if (fgets(buffer, sizeof(buffer), in) == nullptr) {
-#endif
-          const int saved_errno = errno;
-          if (feof(in))
-            done = true;
-          else if (ferror(in)) {
-            if (saved_errno != EINTR)
-              done = true;
-          }
-        } else {
-          got_line = true;
-          size_t buffer_len = strlen(buffer);
-          assert(buffer[buffer_len] == '\0');
-          char last_char = buffer[buffer_len - 1];
-          if (last_char == '\r' || last_char == '\n') {
-            done = true;
-            // Strip trailing newlines
-            while (last_char == '\r' || last_char == '\n') {
-              --buffer_len;
-              if (buffer_len == 0)
-                break;
-              last_char = buffer[buffer_len - 1];
-            }
-          }
-          line.append(buffer, buffer_len);
-        }
-      }
-      m_editing = false;
-      if (m_data_recorder && got_line)
-        m_data_recorder->Record(line, true);
-      // We might have gotten a newline on a line by itself make sure to return
-      // true in this case.
-      return got_line;
-    } else {
-      // No more input file, we are done...
-      SetIsDone(true);
-    }
-    return false;
-#ifndef LLDB_DISABLE_LIBEDIT
-  }
-#endif
+// Split out a line from the buffer, if there is a full one to get.
+static Optional<std::string> SplitLine(std::string &line_buffer) {
+  size_t pos = line_buffer.find('\n');
+  if (pos == std::string::npos)
+    return None;
+  std::string line = StringRef(line_buffer.c_str(), pos).rtrim("\n\r");
+  line_buffer = line_buffer.substr(pos + 1);
+  return line;
 }
 
-#ifndef LLDB_DISABLE_LIBEDIT
+// If the final line of the file ends without a end-of-line, return
+// it as a line anyway.
+static Optional<std::string> SplitLineEOF(std::string &line_buffer) {
+  if (llvm::all_of(line_buffer, isspace))
+    return None;
+  std::string line = std::move(line_buffer);
+  line_buffer.clear();
+  return line;
+}
+
+bool IOHandlerEditline::GetLine(std::string &line, bool &interrupted) {
+#if LLDB_ENABLE_LIBEDIT
+  if (m_editline_up) {
+    bool b = m_editline_up->GetLine(line, interrupted);
+    if (b && m_data_recorder)
+      m_data_recorder->Record(line, true);
+    return b;
+  }
+#endif
+
+  line.clear();
+
+  if (GetIsInteractive()) {
+    const char *prompt = nullptr;
+
+    if (m_multi_line && m_curr_line_idx > 0)
+      prompt = GetContinuationPrompt();
+
+    if (prompt == nullptr)
+      prompt = GetPrompt();
+
+    if (prompt && prompt[0]) {
+      if (m_output_sp) {
+        m_output_sp->Printf("%s", prompt);
+        m_output_sp->Flush();
+      }
+    }
+  }
+
+  Optional<std::string> got_line = SplitLine(m_line_buffer);
+
+  if (!got_line && !m_input_sp) {
+    // No more input file, we are done...
+    SetIsDone(true);
+    return false;
+  }
+
+  FILE *in = GetInputFILE();
+  char buffer[256];
+
+  if (!got_line && !in && m_input_sp) {
+    // there is no FILE*, fall back on just reading bytes from the stream.
+    while (!got_line) {
+      size_t bytes_read = sizeof(buffer);
+      Status error = m_input_sp->Read((void *)buffer, bytes_read);
+      if (error.Success() && !bytes_read) {
+        got_line = SplitLineEOF(m_line_buffer);
+        break;
+      }
+      if (error.Fail())
+        break;
+      m_line_buffer += StringRef(buffer, bytes_read);
+      got_line = SplitLine(m_line_buffer);
+    }
+  }
+
+  if (!got_line && in) {
+    m_editing = true;
+    while (!got_line) {
+      char *r = fgets(buffer, sizeof(buffer), in);
+#ifdef _WIN32
+      // ReadFile on Windows is supposed to set ERROR_OPERATION_ABORTED
+      // according to the docs on MSDN. However, this has evidently been a
+      // known bug since Windows 8. Therefore, we can't detect if a signal
+      // interrupted in the fgets. So pressing ctrl-c causes the repl to end
+      // and the process to exit. A temporary workaround is just to attempt to
+      // fgets twice until this bug is fixed.
+      if (r == nullptr)
+        r = fgets(buffer, sizeof(buffer), in);
+      // this is the equivalent of EINTR for Windows
+      if (r == nullptr && GetLastError() == ERROR_OPERATION_ABORTED)
+        continue;
+#endif
+      if (r == nullptr) {
+        if (ferror(in) && errno == EINTR)
+          continue;
+        if (feof(in))
+          got_line = SplitLineEOF(m_line_buffer);
+        break;
+      }
+      m_line_buffer += buffer;
+      got_line = SplitLine(m_line_buffer);
+    }
+    m_editing = false;
+  }
+
+  if (got_line) {
+    line = got_line.getValue();
+    if (m_data_recorder)
+      m_data_recorder->Record(line, true);
+  }
+
+  return (bool)got_line;
+}
+
+#if LLDB_ENABLE_LIBEDIT
 bool IOHandlerEditline::IsInputCompleteCallback(Editline *editline,
                                                 StringList &lines,
                                                 void *baton) {
@@ -445,28 +420,23 @@
       *editline_reader, lines, cursor_position);
 }
 
-int IOHandlerEditline::AutoCompleteCallback(
-    const char *current_line, const char *cursor, const char *last_char,
-    int skip_first_n_matches, int max_matches, StringList &matches,
-    StringList &descriptions, void *baton) {
+void IOHandlerEditline::AutoCompleteCallback(CompletionRequest &request,
+                                             void *baton) {
   IOHandlerEditline *editline_reader = (IOHandlerEditline *)baton;
   if (editline_reader)
-    return editline_reader->m_delegate.IOHandlerComplete(
-        *editline_reader, current_line, cursor, last_char, skip_first_n_matches,
-        max_matches, matches, descriptions);
-  return 0;
+    editline_reader->m_delegate.IOHandlerComplete(*editline_reader, request);
 }
 #endif
 
 const char *IOHandlerEditline::GetPrompt() {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   if (m_editline_up) {
     return m_editline_up->GetPrompt();
   } else {
 #endif
     if (m_prompt.empty())
       return nullptr;
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   }
 #endif
   return m_prompt.c_str();
@@ -475,7 +445,7 @@
 bool IOHandlerEditline::SetPrompt(llvm::StringRef prompt) {
   m_prompt = prompt;
 
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   if (m_editline_up)
     m_editline_up->SetPrompt(m_prompt.empty() ? nullptr : m_prompt.c_str());
 #endif
@@ -490,7 +460,7 @@
 void IOHandlerEditline::SetContinuationPrompt(llvm::StringRef prompt) {
   m_continuation_prompt = prompt;
 
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   if (m_editline_up)
     m_editline_up->SetContinuationPrompt(m_continuation_prompt.empty()
                                              ? nullptr
@@ -503,7 +473,7 @@
 }
 
 uint32_t IOHandlerEditline::GetCurrentLineIndex() const {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   if (m_editline_up)
     return m_editline_up->GetCurrentLine();
 #endif
@@ -514,7 +484,7 @@
   m_current_lines_ptr = &lines;
 
   bool success = false;
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   if (m_editline_up) {
     return m_editline_up->GetLines(m_base_line_number, lines, interrupted);
   } else {
@@ -526,10 +496,11 @@
       // Show line numbers if we are asked to
       std::string line;
       if (m_base_line_number > 0 && GetIsInteractive()) {
-        FILE *out = GetOutputFILE();
-        if (out)
-          ::fprintf(out, "%u%s", m_base_line_number + (uint32_t)lines.GetSize(),
-                    GetPrompt() == nullptr ? " " : "");
+        if (m_output_sp) {
+          m_output_sp->Printf("%u%s",
+                              m_base_line_number + (uint32_t)lines.GetSize(),
+                              GetPrompt() == nullptr ? " " : "");
+        }
       }
 
       m_curr_line_idx = lines.GetSize();
@@ -543,7 +514,7 @@
       }
     }
     success = lines.GetSize() > 0;
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   }
 #endif
   return success;
@@ -583,7 +554,7 @@
 }
 
 void IOHandlerEditline::Cancel() {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   if (m_editline_up)
     m_editline_up->Cancel();
 #endif
@@ -594,7 +565,7 @@
   if (m_delegate.IOHandlerInterrupt(*this))
     return true;
 
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   if (m_editline_up)
     return m_editline_up->Interrupt();
 #endif
@@ -602,20 +573,20 @@
 }
 
 void IOHandlerEditline::GotEOF() {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   if (m_editline_up)
     m_editline_up->Interrupt();
 #endif
 }
 
 void IOHandlerEditline::PrintAsync(Stream *stream, const char *s, size_t len) {
-#ifndef LLDB_DISABLE_LIBEDIT
+#if LLDB_ENABLE_LIBEDIT
   if (m_editline_up)
     m_editline_up->PrintAsync(stream, s, len);
   else
 #endif
   {
-#ifdef _MSC_VER
+#ifdef _WIN32
     const char *prompt = GetPrompt();
     if (prompt) {
       // Back up over previous prompt using Windows API
@@ -630,4042 +601,10 @@
     }
 #endif
     IOHandler::PrintAsync(stream, s, len);
-#ifdef _MSC_VER
+#ifdef _WIN32
     if (prompt)
-      IOHandler::PrintAsync(GetOutputStreamFile().get(), prompt,
+      IOHandler::PrintAsync(GetOutputStreamFileSP().get(), prompt,
                             strlen(prompt));
 #endif
   }
 }
-
-// we may want curses to be disabled for some builds for instance, windows
-#ifndef LLDB_DISABLE_CURSES
-
-#define KEY_RETURN 10
-#define KEY_ESCAPE 27
-
-namespace curses {
-class Menu;
-class MenuDelegate;
-class Window;
-class WindowDelegate;
-typedef std::shared_ptr<Menu> MenuSP;
-typedef std::shared_ptr<MenuDelegate> MenuDelegateSP;
-typedef std::shared_ptr<Window> WindowSP;
-typedef std::shared_ptr<WindowDelegate> WindowDelegateSP;
-typedef std::vector<MenuSP> Menus;
-typedef std::vector<WindowSP> Windows;
-typedef std::vector<WindowDelegateSP> WindowDelegates;
-
-#if 0
-type summary add -s "x=${var.x}, y=${var.y}" curses::Point
-type summary add -s "w=${var.width}, h=${var.height}" curses::Size
-type summary add -s "${var.origin%S} ${var.size%S}" curses::Rect
-#endif
-
-struct Point {
-  int x;
-  int y;
-
-  Point(int _x = 0, int _y = 0) : x(_x), y(_y) {}
-
-  void Clear() {
-    x = 0;
-    y = 0;
-  }
-
-  Point &operator+=(const Point &rhs) {
-    x += rhs.x;
-    y += rhs.y;
-    return *this;
-  }
-
-  void Dump() { printf("(x=%i, y=%i)\n", x, y); }
-};
-
-bool operator==(const Point &lhs, const Point &rhs) {
-  return lhs.x == rhs.x && lhs.y == rhs.y;
-}
-
-bool operator!=(const Point &lhs, const Point &rhs) {
-  return lhs.x != rhs.x || lhs.y != rhs.y;
-}
-
-struct Size {
-  int width;
-  int height;
-  Size(int w = 0, int h = 0) : width(w), height(h) {}
-
-  void Clear() {
-    width = 0;
-    height = 0;
-  }
-
-  void Dump() { printf("(w=%i, h=%i)\n", width, height); }
-};
-
-bool operator==(const Size &lhs, const Size &rhs) {
-  return lhs.width == rhs.width && lhs.height == rhs.height;
-}
-
-bool operator!=(const Size &lhs, const Size &rhs) {
-  return lhs.width != rhs.width || lhs.height != rhs.height;
-}
-
-struct Rect {
-  Point origin;
-  Size size;
-
-  Rect() : origin(), size() {}
-
-  Rect(const Point &p, const Size &s) : origin(p), size(s) {}
-
-  void Clear() {
-    origin.Clear();
-    size.Clear();
-  }
-
-  void Dump() {
-    printf("(x=%i, y=%i), w=%i, h=%i)\n", origin.x, origin.y, size.width,
-           size.height);
-  }
-
-  void Inset(int w, int h) {
-    if (size.width > w * 2)
-      size.width -= w * 2;
-    origin.x += w;
-
-    if (size.height > h * 2)
-      size.height -= h * 2;
-    origin.y += h;
-  }
-
-  // Return a status bar rectangle which is the last line of this rectangle.
-  // This rectangle will be modified to not include the status bar area.
-  Rect MakeStatusBar() {
-    Rect status_bar;
-    if (size.height > 1) {
-      status_bar.origin.x = origin.x;
-      status_bar.origin.y = size.height;
-      status_bar.size.width = size.width;
-      status_bar.size.height = 1;
-      --size.height;
-    }
-    return status_bar;
-  }
-
-  // Return a menubar rectangle which is the first line of this rectangle. This
-  // rectangle will be modified to not include the menubar area.
-  Rect MakeMenuBar() {
-    Rect menubar;
-    if (size.height > 1) {
-      menubar.origin.x = origin.x;
-      menubar.origin.y = origin.y;
-      menubar.size.width = size.width;
-      menubar.size.height = 1;
-      ++origin.y;
-      --size.height;
-    }
-    return menubar;
-  }
-
-  void HorizontalSplitPercentage(float top_percentage, Rect &top,
-                                 Rect &bottom) const {
-    float top_height = top_percentage * size.height;
-    HorizontalSplit(top_height, top, bottom);
-  }
-
-  void HorizontalSplit(int top_height, Rect &top, Rect &bottom) const {
-    top = *this;
-    if (top_height < size.height) {
-      top.size.height = top_height;
-      bottom.origin.x = origin.x;
-      bottom.origin.y = origin.y + top.size.height;
-      bottom.size.width = size.width;
-      bottom.size.height = size.height - top.size.height;
-    } else {
-      bottom.Clear();
-    }
-  }
-
-  void VerticalSplitPercentage(float left_percentage, Rect &left,
-                               Rect &right) const {
-    float left_width = left_percentage * size.width;
-    VerticalSplit(left_width, left, right);
-  }
-
-  void VerticalSplit(int left_width, Rect &left, Rect &right) const {
-    left = *this;
-    if (left_width < size.width) {
-      left.size.width = left_width;
-      right.origin.x = origin.x + left.size.width;
-      right.origin.y = origin.y;
-      right.size.width = size.width - left.size.width;
-      right.size.height = size.height;
-    } else {
-      right.Clear();
-    }
-  }
-};
-
-bool operator==(const Rect &lhs, const Rect &rhs) {
-  return lhs.origin == rhs.origin && lhs.size == rhs.size;
-}
-
-bool operator!=(const Rect &lhs, const Rect &rhs) {
-  return lhs.origin != rhs.origin || lhs.size != rhs.size;
-}
-
-enum HandleCharResult {
-  eKeyNotHandled = 0,
-  eKeyHandled = 1,
-  eQuitApplication = 2
-};
-
-enum class MenuActionResult {
-  Handled,
-  NotHandled,
-  Quit // Exit all menus and quit
-};
-
-struct KeyHelp {
-  int ch;
-  const char *description;
-};
-
-class WindowDelegate {
-public:
-  virtual ~WindowDelegate() = default;
-
-  virtual bool WindowDelegateDraw(Window &window, bool force) {
-    return false; // Drawing not handled
-  }
-
-  virtual HandleCharResult WindowDelegateHandleChar(Window &window, int key) {
-    return eKeyNotHandled;
-  }
-
-  virtual const char *WindowDelegateGetHelpText() { return nullptr; }
-
-  virtual KeyHelp *WindowDelegateGetKeyHelp() { return nullptr; }
-};
-
-class HelpDialogDelegate : public WindowDelegate {
-public:
-  HelpDialogDelegate(const char *text, KeyHelp *key_help_array);
-
-  ~HelpDialogDelegate() override;
-
-  bool WindowDelegateDraw(Window &window, bool force) override;
-
-  HandleCharResult WindowDelegateHandleChar(Window &window, int key) override;
-
-  size_t GetNumLines() const { return m_text.GetSize(); }
-
-  size_t GetMaxLineLength() const { return m_text.GetMaxStringLength(); }
-
-protected:
-  StringList m_text;
-  int m_first_visible_line;
-};
-
-class Window {
-public:
-  Window(const char *name)
-      : m_name(name), m_window(nullptr), m_panel(nullptr), m_parent(nullptr),
-        m_subwindows(), m_delegate_sp(), m_curr_active_window_idx(UINT32_MAX),
-        m_prev_active_window_idx(UINT32_MAX), m_delete(false),
-        m_needs_update(true), m_can_activate(true), m_is_subwin(false) {}
-
-  Window(const char *name, WINDOW *w, bool del = true)
-      : m_name(name), m_window(nullptr), m_panel(nullptr), m_parent(nullptr),
-        m_subwindows(), m_delegate_sp(), m_curr_active_window_idx(UINT32_MAX),
-        m_prev_active_window_idx(UINT32_MAX), m_delete(del),
-        m_needs_update(true), m_can_activate(true), m_is_subwin(false) {
-    if (w)
-      Reset(w);
-  }
-
-  Window(const char *name, const Rect &bounds)
-      : m_name(name), m_window(nullptr), m_parent(nullptr), m_subwindows(),
-        m_delegate_sp(), m_curr_active_window_idx(UINT32_MAX),
-        m_prev_active_window_idx(UINT32_MAX), m_delete(true),
-        m_needs_update(true), m_can_activate(true), m_is_subwin(false) {
-    Reset(::newwin(bounds.size.height, bounds.size.width, bounds.origin.y,
-                   bounds.origin.y));
-  }
-
-  virtual ~Window() {
-    RemoveSubWindows();
-    Reset();
-  }
-
-  void Reset(WINDOW *w = nullptr, bool del = true) {
-    if (m_window == w)
-      return;
-
-    if (m_panel) {
-      ::del_panel(m_panel);
-      m_panel = nullptr;
-    }
-    if (m_window && m_delete) {
-      ::delwin(m_window);
-      m_window = nullptr;
-      m_delete = false;
-    }
-    if (w) {
-      m_window = w;
-      m_panel = ::new_panel(m_window);
-      m_delete = del;
-    }
-  }
-
-  void AttributeOn(attr_t attr) { ::wattron(m_window, attr); }
-  void AttributeOff(attr_t attr) { ::wattroff(m_window, attr); }
-  void Box(chtype v_char = ACS_VLINE, chtype h_char = ACS_HLINE) {
-    ::box(m_window, v_char, h_char);
-  }
-  void Clear() { ::wclear(m_window); }
-  void Erase() { ::werase(m_window); }
-  Rect GetBounds() {
-    return Rect(GetParentOrigin(), GetSize());
-  } // Get the rectangle in our parent window
-  int GetChar() { return ::wgetch(m_window); }
-  int GetCursorX() { return getcurx(m_window); }
-  int GetCursorY() { return getcury(m_window); }
-  Rect GetFrame() {
-    return Rect(Point(), GetSize());
-  } // Get our rectangle in our own coordinate system
-  Point GetParentOrigin() { return Point(GetParentX(), GetParentY()); }
-  Size GetSize() { return Size(GetWidth(), GetHeight()); }
-  int GetParentX() { return getparx(m_window); }
-  int GetParentY() { return getpary(m_window); }
-  int GetMaxX() { return getmaxx(m_window); }
-  int GetMaxY() { return getmaxy(m_window); }
-  int GetWidth() { return GetMaxX(); }
-  int GetHeight() { return GetMaxY(); }
-  void MoveCursor(int x, int y) { ::wmove(m_window, y, x); }
-  void MoveWindow(int x, int y) { MoveWindow(Point(x, y)); }
-  void Resize(int w, int h) { ::wresize(m_window, h, w); }
-  void Resize(const Size &size) {
-    ::wresize(m_window, size.height, size.width);
-  }
-  void PutChar(int ch) { ::waddch(m_window, ch); }
-  void PutCString(const char *s, int len = -1) { ::waddnstr(m_window, s, len); }
-  void Refresh() { ::wrefresh(m_window); }
-  void DeferredRefresh() {
-    // We are using panels, so we don't need to call this...
-    //::wnoutrefresh(m_window);
-  }
-  void SetBackground(int color_pair_idx) {
-    ::wbkgd(m_window, COLOR_PAIR(color_pair_idx));
-  }
-  void UnderlineOn() { AttributeOn(A_UNDERLINE); }
-  void UnderlineOff() { AttributeOff(A_UNDERLINE); }
-
-  void PutCStringTruncated(const char *s, int right_pad) {
-    int bytes_left = GetWidth() - GetCursorX();
-    if (bytes_left > right_pad) {
-      bytes_left -= right_pad;
-      ::waddnstr(m_window, s, bytes_left);
-    }
-  }
-
-  void MoveWindow(const Point &origin) {
-    const bool moving_window = origin != GetParentOrigin();
-    if (m_is_subwin && moving_window) {
-      // Can't move subwindows, must delete and re-create
-      Size size = GetSize();
-      Reset(::subwin(m_parent->m_window, size.height, size.width, origin.y,
-                     origin.x),
-            true);
-    } else {
-      ::mvwin(m_window, origin.y, origin.x);
-    }
-  }
-
-  void SetBounds(const Rect &bounds) {
-    const bool moving_window = bounds.origin != GetParentOrigin();
-    if (m_is_subwin && moving_window) {
-      // Can't move subwindows, must delete and re-create
-      Reset(::subwin(m_parent->m_window, bounds.size.height, bounds.size.width,
-                     bounds.origin.y, bounds.origin.x),
-            true);
-    } else {
-      if (moving_window)
-        MoveWindow(bounds.origin);
-      Resize(bounds.size);
-    }
-  }
-
-  void Printf(const char *format, ...) __attribute__((format(printf, 2, 3))) {
-    va_list args;
-    va_start(args, format);
-    vwprintw(m_window, format, args);
-    va_end(args);
-  }
-
-  void Touch() {
-    ::touchwin(m_window);
-    if (m_parent)
-      m_parent->Touch();
-  }
-
-  WindowSP CreateSubWindow(const char *name, const Rect &bounds,
-                           bool make_active) {
-    auto get_window = [this, &bounds]() {
-      return m_window
-                 ? ::subwin(m_window, bounds.size.height, bounds.size.width,
-                            bounds.origin.y, bounds.origin.x)
-                 : ::newwin(bounds.size.height, bounds.size.width,
-                            bounds.origin.y, bounds.origin.x);
-    };
-    WindowSP subwindow_sp = std::make_shared<Window>(name, get_window(), true);
-    subwindow_sp->m_is_subwin = subwindow_sp.operator bool();
-    subwindow_sp->m_parent = this;
-    if (make_active) {
-      m_prev_active_window_idx = m_curr_active_window_idx;
-      m_curr_active_window_idx = m_subwindows.size();
-    }
-    m_subwindows.push_back(subwindow_sp);
-    ::top_panel(subwindow_sp->m_panel);
-    m_needs_update = true;
-    return subwindow_sp;
-  }
-
-  bool RemoveSubWindow(Window *window) {
-    Windows::iterator pos, end = m_subwindows.end();
-    size_t i = 0;
-    for (pos = m_subwindows.begin(); pos != end; ++pos, ++i) {
-      if ((*pos).get() == window) {
-        if (m_prev_active_window_idx == i)
-          m_prev_active_window_idx = UINT32_MAX;
-        else if (m_prev_active_window_idx != UINT32_MAX &&
-                 m_prev_active_window_idx > i)
-          --m_prev_active_window_idx;
-
-        if (m_curr_active_window_idx == i)
-          m_curr_active_window_idx = UINT32_MAX;
-        else if (m_curr_active_window_idx != UINT32_MAX &&
-                 m_curr_active_window_idx > i)
-          --m_curr_active_window_idx;
-        window->Erase();
-        m_subwindows.erase(pos);
-        m_needs_update = true;
-        if (m_parent)
-          m_parent->Touch();
-        else
-          ::touchwin(stdscr);
-        return true;
-      }
-    }
-    return false;
-  }
-
-  WindowSP FindSubWindow(const char *name) {
-    Windows::iterator pos, end = m_subwindows.end();
-    size_t i = 0;
-    for (pos = m_subwindows.begin(); pos != end; ++pos, ++i) {
-      if ((*pos)->m_name == name)
-        return *pos;
-    }
-    return WindowSP();
-  }
-
-  void RemoveSubWindows() {
-    m_curr_active_window_idx = UINT32_MAX;
-    m_prev_active_window_idx = UINT32_MAX;
-    for (Windows::iterator pos = m_subwindows.begin();
-         pos != m_subwindows.end(); pos = m_subwindows.erase(pos)) {
-      (*pos)->Erase();
-    }
-    if (m_parent)
-      m_parent->Touch();
-    else
-      ::touchwin(stdscr);
-  }
-
-  WINDOW *get() { return m_window; }
-
-  operator WINDOW *() { return m_window; }
-
-  // Window drawing utilities
-  void DrawTitleBox(const char *title, const char *bottom_message = nullptr) {
-    attr_t attr = 0;
-    if (IsActive())
-      attr = A_BOLD | COLOR_PAIR(2);
-    else
-      attr = 0;
-    if (attr)
-      AttributeOn(attr);
-
-    Box();
-    MoveCursor(3, 0);
-
-    if (title && title[0]) {
-      PutChar('<');
-      PutCString(title);
-      PutChar('>');
-    }
-
-    if (bottom_message && bottom_message[0]) {
-      int bottom_message_length = strlen(bottom_message);
-      int x = GetWidth() - 3 - (bottom_message_length + 2);
-
-      if (x > 0) {
-        MoveCursor(x, GetHeight() - 1);
-        PutChar('[');
-        PutCString(bottom_message);
-        PutChar(']');
-      } else {
-        MoveCursor(1, GetHeight() - 1);
-        PutChar('[');
-        PutCStringTruncated(bottom_message, 1);
-      }
-    }
-    if (attr)
-      AttributeOff(attr);
-  }
-
-  virtual void Draw(bool force) {
-    if (m_delegate_sp && m_delegate_sp->WindowDelegateDraw(*this, force))
-      return;
-
-    for (auto &subwindow_sp : m_subwindows)
-      subwindow_sp->Draw(force);
-  }
-
-  bool CreateHelpSubwindow() {
-    if (m_delegate_sp) {
-      const char *text = m_delegate_sp->WindowDelegateGetHelpText();
-      KeyHelp *key_help = m_delegate_sp->WindowDelegateGetKeyHelp();
-      if ((text && text[0]) || key_help) {
-        std::unique_ptr<HelpDialogDelegate> help_delegate_up(
-            new HelpDialogDelegate(text, key_help));
-        const size_t num_lines = help_delegate_up->GetNumLines();
-        const size_t max_length = help_delegate_up->GetMaxLineLength();
-        Rect bounds = GetBounds();
-        bounds.Inset(1, 1);
-        if (max_length + 4 < static_cast<size_t>(bounds.size.width)) {
-          bounds.origin.x += (bounds.size.width - max_length + 4) / 2;
-          bounds.size.width = max_length + 4;
-        } else {
-          if (bounds.size.width > 100) {
-            const int inset_w = bounds.size.width / 4;
-            bounds.origin.x += inset_w;
-            bounds.size.width -= 2 * inset_w;
-          }
-        }
-
-        if (num_lines + 2 < static_cast<size_t>(bounds.size.height)) {
-          bounds.origin.y += (bounds.size.height - num_lines + 2) / 2;
-          bounds.size.height = num_lines + 2;
-        } else {
-          if (bounds.size.height > 100) {
-            const int inset_h = bounds.size.height / 4;
-            bounds.origin.y += inset_h;
-            bounds.size.height -= 2 * inset_h;
-          }
-        }
-        WindowSP help_window_sp;
-        Window *parent_window = GetParent();
-        if (parent_window)
-          help_window_sp = parent_window->CreateSubWindow("Help", bounds, true);
-        else
-          help_window_sp = CreateSubWindow("Help", bounds, true);
-        help_window_sp->SetDelegate(
-            WindowDelegateSP(help_delegate_up.release()));
-        return true;
-      }
-    }
-    return false;
-  }
-
-  virtual HandleCharResult HandleChar(int key) {
-    // Always check the active window first
-    HandleCharResult result = eKeyNotHandled;
-    WindowSP active_window_sp = GetActiveWindow();
-    if (active_window_sp) {
-      result = active_window_sp->HandleChar(key);
-      if (result != eKeyNotHandled)
-        return result;
-    }
-
-    if (m_delegate_sp) {
-      result = m_delegate_sp->WindowDelegateHandleChar(*this, key);
-      if (result != eKeyNotHandled)
-        return result;
-    }
-
-    // Then check for any windows that want any keys that weren't handled. This
-    // is typically only for a menubar. Make a copy of the subwindows in case
-    // any HandleChar() functions muck with the subwindows. If we don't do
-    // this, we can crash when iterating over the subwindows.
-    Windows subwindows(m_subwindows);
-    for (auto subwindow_sp : subwindows) {
-      if (!subwindow_sp->m_can_activate) {
-        HandleCharResult result = subwindow_sp->HandleChar(key);
-        if (result != eKeyNotHandled)
-          return result;
-      }
-    }
-
-    return eKeyNotHandled;
-  }
-
-  bool SetActiveWindow(Window *window) {
-    const size_t num_subwindows = m_subwindows.size();
-    for (size_t i = 0; i < num_subwindows; ++i) {
-      if (m_subwindows[i].get() == window) {
-        m_prev_active_window_idx = m_curr_active_window_idx;
-        ::top_panel(window->m_panel);
-        m_curr_active_window_idx = i;
-        return true;
-      }
-    }
-    return false;
-  }
-
-  WindowSP GetActiveWindow() {
-    if (!m_subwindows.empty()) {
-      if (m_curr_active_window_idx >= m_subwindows.size()) {
-        if (m_prev_active_window_idx < m_subwindows.size()) {
-          m_curr_active_window_idx = m_prev_active_window_idx;
-          m_prev_active_window_idx = UINT32_MAX;
-        } else if (IsActive()) {
-          m_prev_active_window_idx = UINT32_MAX;
-          m_curr_active_window_idx = UINT32_MAX;
-
-          // Find first window that wants to be active if this window is active
-          const size_t num_subwindows = m_subwindows.size();
-          for (size_t i = 0; i < num_subwindows; ++i) {
-            if (m_subwindows[i]->GetCanBeActive()) {
-              m_curr_active_window_idx = i;
-              break;
-            }
-          }
-        }
-      }
-
-      if (m_curr_active_window_idx < m_subwindows.size())
-        return m_subwindows[m_curr_active_window_idx];
-    }
-    return WindowSP();
-  }
-
-  bool GetCanBeActive() const { return m_can_activate; }
-
-  void SetCanBeActive(bool b) { m_can_activate = b; }
-
-  const WindowDelegateSP &GetDelegate() const { return m_delegate_sp; }
-
-  void SetDelegate(const WindowDelegateSP &delegate_sp) {
-    m_delegate_sp = delegate_sp;
-  }
-
-  Window *GetParent() const { return m_parent; }
-
-  bool IsActive() const {
-    if (m_parent)
-      return m_parent->GetActiveWindow().get() == this;
-    else
-      return true; // Top level window is always active
-  }
-
-  void SelectNextWindowAsActive() {
-    // Move active focus to next window
-    const size_t num_subwindows = m_subwindows.size();
-    if (m_curr_active_window_idx == UINT32_MAX) {
-      uint32_t idx = 0;
-      for (auto subwindow_sp : m_subwindows) {
-        if (subwindow_sp->GetCanBeActive()) {
-          m_curr_active_window_idx = idx;
-          break;
-        }
-        ++idx;
-      }
-    } else if (m_curr_active_window_idx + 1 < num_subwindows) {
-      bool handled = false;
-      m_prev_active_window_idx = m_curr_active_window_idx;
-      for (size_t idx = m_curr_active_window_idx + 1; idx < num_subwindows;
-           ++idx) {
-        if (m_subwindows[idx]->GetCanBeActive()) {
-          m_curr_active_window_idx = idx;
-          handled = true;
-          break;
-        }
-      }
-      if (!handled) {
-        for (size_t idx = 0; idx <= m_prev_active_window_idx; ++idx) {
-          if (m_subwindows[idx]->GetCanBeActive()) {
-            m_curr_active_window_idx = idx;
-            break;
-          }
-        }
-      }
-    } else {
-      m_prev_active_window_idx = m_curr_active_window_idx;
-      for (size_t idx = 0; idx < num_subwindows; ++idx) {
-        if (m_subwindows[idx]->GetCanBeActive()) {
-          m_curr_active_window_idx = idx;
-          break;
-        }
-      }
-    }
-  }
-
-  const char *GetName() const { return m_name.c_str(); }
-
-protected:
-  std::string m_name;
-  WINDOW *m_window;
-  PANEL *m_panel;
-  Window *m_parent;
-  Windows m_subwindows;
-  WindowDelegateSP m_delegate_sp;
-  uint32_t m_curr_active_window_idx;
-  uint32_t m_prev_active_window_idx;
-  bool m_delete;
-  bool m_needs_update;
-  bool m_can_activate;
-  bool m_is_subwin;
-
-private:
-  DISALLOW_COPY_AND_ASSIGN(Window);
-};
-
-class MenuDelegate {
-public:
-  virtual ~MenuDelegate() = default;
-
-  virtual MenuActionResult MenuDelegateAction(Menu &menu) = 0;
-};
-
-class Menu : public WindowDelegate {
-public:
-  enum class Type { Invalid, Bar, Item, Separator };
-
-  // Menubar or separator constructor
-  Menu(Type type);
-
-  // Menuitem constructor
-  Menu(const char *name, const char *key_name, int key_value,
-       uint64_t identifier);
-
-  ~Menu() override = default;
-
-  const MenuDelegateSP &GetDelegate() const { return m_delegate_sp; }
-
-  void SetDelegate(const MenuDelegateSP &delegate_sp) {
-    m_delegate_sp = delegate_sp;
-  }
-
-  void RecalculateNameLengths();
-
-  void AddSubmenu(const MenuSP &menu_sp);
-
-  int DrawAndRunMenu(Window &window);
-
-  void DrawMenuTitle(Window &window, bool highlight);
-
-  bool WindowDelegateDraw(Window &window, bool force) override;
-
-  HandleCharResult WindowDelegateHandleChar(Window &window, int key) override;
-
-  MenuActionResult ActionPrivate(Menu &menu) {
-    MenuActionResult result = MenuActionResult::NotHandled;
-    if (m_delegate_sp) {
-      result = m_delegate_sp->MenuDelegateAction(menu);
-      if (result != MenuActionResult::NotHandled)
-        return result;
-    } else if (m_parent) {
-      result = m_parent->ActionPrivate(menu);
-      if (result != MenuActionResult::NotHandled)
-        return result;
-    }
-    return m_canned_result;
-  }
-
-  MenuActionResult Action() {
-    // Call the recursive action so it can try to handle it with the menu
-    // delegate, and if not, try our parent menu
-    return ActionPrivate(*this);
-  }
-
-  void SetCannedResult(MenuActionResult result) { m_canned_result = result; }
-
-  Menus &GetSubmenus() { return m_submenus; }
-
-  const Menus &GetSubmenus() const { return m_submenus; }
-
-  int GetSelectedSubmenuIndex() const { return m_selected; }
-
-  void SetSelectedSubmenuIndex(int idx) { m_selected = idx; }
-
-  Type GetType() const { return m_type; }
-
-  int GetStartingColumn() const { return m_start_col; }
-
-  void SetStartingColumn(int col) { m_start_col = col; }
-
-  int GetKeyValue() const { return m_key_value; }
-
-  void SetKeyValue(int key_value) { m_key_value = key_value; }
-
-  std::string &GetName() { return m_name; }
-
-  std::string &GetKeyName() { return m_key_name; }
-
-  int GetDrawWidth() const {
-    return m_max_submenu_name_length + m_max_submenu_key_name_length + 8;
-  }
-
-  uint64_t GetIdentifier() const { return m_identifier; }
-
-  void SetIdentifier(uint64_t identifier) { m_identifier = identifier; }
-
-protected:
-  std::string m_name;
-  std::string m_key_name;
-  uint64_t m_identifier;
-  Type m_type;
-  int m_key_value;
-  int m_start_col;
-  int m_max_submenu_name_length;
-  int m_max_submenu_key_name_length;
-  int m_selected;
-  Menu *m_parent;
-  Menus m_submenus;
-  WindowSP m_menu_window_sp;
-  MenuActionResult m_canned_result;
-  MenuDelegateSP m_delegate_sp;
-};
-
-// Menubar or separator constructor
-Menu::Menu(Type type)
-    : m_name(), m_key_name(), m_identifier(0), m_type(type), m_key_value(0),
-      m_start_col(0), m_max_submenu_name_length(0),
-      m_max_submenu_key_name_length(0), m_selected(0), m_parent(nullptr),
-      m_submenus(), m_canned_result(MenuActionResult::NotHandled),
-      m_delegate_sp() {}
-
-// Menuitem constructor
-Menu::Menu(const char *name, const char *key_name, int key_value,
-           uint64_t identifier)
-    : m_name(), m_key_name(), m_identifier(identifier), m_type(Type::Invalid),
-      m_key_value(key_value), m_start_col(0), m_max_submenu_name_length(0),
-      m_max_submenu_key_name_length(0), m_selected(0), m_parent(nullptr),
-      m_submenus(), m_canned_result(MenuActionResult::NotHandled),
-      m_delegate_sp() {
-  if (name && name[0]) {
-    m_name = name;
-    m_type = Type::Item;
-    if (key_name && key_name[0])
-      m_key_name = key_name;
-  } else {
-    m_type = Type::Separator;
-  }
-}
-
-void Menu::RecalculateNameLengths() {
-  m_max_submenu_name_length = 0;
-  m_max_submenu_key_name_length = 0;
-  Menus &submenus = GetSubmenus();
-  const size_t num_submenus = submenus.size();
-  for (size_t i = 0; i < num_submenus; ++i) {
-    Menu *submenu = submenus[i].get();
-    if (static_cast<size_t>(m_max_submenu_name_length) < submenu->m_name.size())
-      m_max_submenu_name_length = submenu->m_name.size();
-    if (static_cast<size_t>(m_max_submenu_key_name_length) <
-        submenu->m_key_name.size())
-      m_max_submenu_key_name_length = submenu->m_key_name.size();
-  }
-}
-
-void Menu::AddSubmenu(const MenuSP &menu_sp) {
-  menu_sp->m_parent = this;
-  if (static_cast<size_t>(m_max_submenu_name_length) < menu_sp->m_name.size())
-    m_max_submenu_name_length = menu_sp->m_name.size();
-  if (static_cast<size_t>(m_max_submenu_key_name_length) <
-      menu_sp->m_key_name.size())
-    m_max_submenu_key_name_length = menu_sp->m_key_name.size();
-  m_submenus.push_back(menu_sp);
-}
-
-void Menu::DrawMenuTitle(Window &window, bool highlight) {
-  if (m_type == Type::Separator) {
-    window.MoveCursor(0, window.GetCursorY());
-    window.PutChar(ACS_LTEE);
-    int width = window.GetWidth();
-    if (width > 2) {
-      width -= 2;
-      for (int i = 0; i < width; ++i)
-        window.PutChar(ACS_HLINE);
-    }
-    window.PutChar(ACS_RTEE);
-  } else {
-    const int shortcut_key = m_key_value;
-    bool underlined_shortcut = false;
-    const attr_t hilgight_attr = A_REVERSE;
-    if (highlight)
-      window.AttributeOn(hilgight_attr);
-    if (isprint(shortcut_key)) {
-      size_t lower_pos = m_name.find(tolower(shortcut_key));
-      size_t upper_pos = m_name.find(toupper(shortcut_key));
-      const char *name = m_name.c_str();
-      size_t pos = std::min<size_t>(lower_pos, upper_pos);
-      if (pos != std::string::npos) {
-        underlined_shortcut = true;
-        if (pos > 0) {
-          window.PutCString(name, pos);
-          name += pos;
-        }
-        const attr_t shortcut_attr = A_UNDERLINE | A_BOLD;
-        window.AttributeOn(shortcut_attr);
-        window.PutChar(name[0]);
-        window.AttributeOff(shortcut_attr);
-        name++;
-        if (name[0])
-          window.PutCString(name);
-      }
-    }
-
-    if (!underlined_shortcut) {
-      window.PutCString(m_name.c_str());
-    }
-
-    if (highlight)
-      window.AttributeOff(hilgight_attr);
-
-    if (m_key_name.empty()) {
-      if (!underlined_shortcut && isprint(m_key_value)) {
-        window.AttributeOn(COLOR_PAIR(3));
-        window.Printf(" (%c)", m_key_value);
-        window.AttributeOff(COLOR_PAIR(3));
-      }
-    } else {
-      window.AttributeOn(COLOR_PAIR(3));
-      window.Printf(" (%s)", m_key_name.c_str());
-      window.AttributeOff(COLOR_PAIR(3));
-    }
-  }
-}
-
-bool Menu::WindowDelegateDraw(Window &window, bool force) {
-  Menus &submenus = GetSubmenus();
-  const size_t num_submenus = submenus.size();
-  const int selected_idx = GetSelectedSubmenuIndex();
-  Menu::Type menu_type = GetType();
-  switch (menu_type) {
-  case Menu::Type::Bar: {
-    window.SetBackground(2);
-    window.MoveCursor(0, 0);
-    for (size_t i = 0; i < num_submenus; ++i) {
-      Menu *menu = submenus[i].get();
-      if (i > 0)
-        window.PutChar(' ');
-      menu->SetStartingColumn(window.GetCursorX());
-      window.PutCString("| ");
-      menu->DrawMenuTitle(window, false);
-    }
-    window.PutCString(" |");
-    window.DeferredRefresh();
-  } break;
-
-  case Menu::Type::Item: {
-    int y = 1;
-    int x = 3;
-    // Draw the menu
-    int cursor_x = 0;
-    int cursor_y = 0;
-    window.Erase();
-    window.SetBackground(2);
-    window.Box();
-    for (size_t i = 0; i < num_submenus; ++i) {
-      const bool is_selected = (i == static_cast<size_t>(selected_idx));
-      window.MoveCursor(x, y + i);
-      if (is_selected) {
-        // Remember where we want the cursor to be
-        cursor_x = x - 1;
-        cursor_y = y + i;
-      }
-      submenus[i]->DrawMenuTitle(window, is_selected);
-    }
-    window.MoveCursor(cursor_x, cursor_y);
-    window.DeferredRefresh();
-  } break;
-
-  default:
-  case Menu::Type::Separator:
-    break;
-  }
-  return true; // Drawing handled...
-}
-
-HandleCharResult Menu::WindowDelegateHandleChar(Window &window, int key) {
-  HandleCharResult result = eKeyNotHandled;
-
-  Menus &submenus = GetSubmenus();
-  const size_t num_submenus = submenus.size();
-  const int selected_idx = GetSelectedSubmenuIndex();
-  Menu::Type menu_type = GetType();
-  if (menu_type == Menu::Type::Bar) {
-    MenuSP run_menu_sp;
-    switch (key) {
-    case KEY_DOWN:
-    case KEY_UP:
-      // Show last menu or first menu
-      if (selected_idx < static_cast<int>(num_submenus))
-        run_menu_sp = submenus[selected_idx];
-      else if (!submenus.empty())
-        run_menu_sp = submenus.front();
-      result = eKeyHandled;
-      break;
-
-    case KEY_RIGHT:
-      ++m_selected;
-      if (m_selected >= static_cast<int>(num_submenus))
-        m_selected = 0;
-      if (m_selected < static_cast<int>(num_submenus))
-        run_menu_sp = submenus[m_selected];
-      else if (!submenus.empty())
-        run_menu_sp = submenus.front();
-      result = eKeyHandled;
-      break;
-
-    case KEY_LEFT:
-      --m_selected;
-      if (m_selected < 0)
-        m_selected = num_submenus - 1;
-      if (m_selected < static_cast<int>(num_submenus))
-        run_menu_sp = submenus[m_selected];
-      else if (!submenus.empty())
-        run_menu_sp = submenus.front();
-      result = eKeyHandled;
-      break;
-
-    default:
-      for (size_t i = 0; i < num_submenus; ++i) {
-        if (submenus[i]->GetKeyValue() == key) {
-          SetSelectedSubmenuIndex(i);
-          run_menu_sp = submenus[i];
-          result = eKeyHandled;
-          break;
-        }
-      }
-      break;
-    }
-
-    if (run_menu_sp) {
-      // Run the action on this menu in case we need to populate the menu with
-      // dynamic content and also in case check marks, and any other menu
-      // decorations need to be calculated
-      if (run_menu_sp->Action() == MenuActionResult::Quit)
-        return eQuitApplication;
-
-      Rect menu_bounds;
-      menu_bounds.origin.x = run_menu_sp->GetStartingColumn();
-      menu_bounds.origin.y = 1;
-      menu_bounds.size.width = run_menu_sp->GetDrawWidth();
-      menu_bounds.size.height = run_menu_sp->GetSubmenus().size() + 2;
-      if (m_menu_window_sp)
-        window.GetParent()->RemoveSubWindow(m_menu_window_sp.get());
-
-      m_menu_window_sp = window.GetParent()->CreateSubWindow(
-          run_menu_sp->GetName().c_str(), menu_bounds, true);
-      m_menu_window_sp->SetDelegate(run_menu_sp);
-    }
-  } else if (menu_type == Menu::Type::Item) {
-    switch (key) {
-    case KEY_DOWN:
-      if (m_submenus.size() > 1) {
-        const int start_select = m_selected;
-        while (++m_selected != start_select) {
-          if (static_cast<size_t>(m_selected) >= num_submenus)
-            m_selected = 0;
-          if (m_submenus[m_selected]->GetType() == Type::Separator)
-            continue;
-          else
-            break;
-        }
-        return eKeyHandled;
-      }
-      break;
-
-    case KEY_UP:
-      if (m_submenus.size() > 1) {
-        const int start_select = m_selected;
-        while (--m_selected != start_select) {
-          if (m_selected < static_cast<int>(0))
-            m_selected = num_submenus - 1;
-          if (m_submenus[m_selected]->GetType() == Type::Separator)
-            continue;
-          else
-            break;
-        }
-        return eKeyHandled;
-      }
-      break;
-
-    case KEY_RETURN:
-      if (static_cast<size_t>(selected_idx) < num_submenus) {
-        if (submenus[selected_idx]->Action() == MenuActionResult::Quit)
-          return eQuitApplication;
-        window.GetParent()->RemoveSubWindow(&window);
-        return eKeyHandled;
-      }
-      break;
-
-    case KEY_ESCAPE: // Beware: pressing escape key has 1 to 2 second delay in
-                     // case other chars are entered for escaped sequences
-      window.GetParent()->RemoveSubWindow(&window);
-      return eKeyHandled;
-
-    default:
-      for (size_t i = 0; i < num_submenus; ++i) {
-        Menu *menu = submenus[i].get();
-        if (menu->GetKeyValue() == key) {
-          SetSelectedSubmenuIndex(i);
-          window.GetParent()->RemoveSubWindow(&window);
-          if (menu->Action() == MenuActionResult::Quit)
-            return eQuitApplication;
-          return eKeyHandled;
-        }
-      }
-      break;
-    }
-  } else if (menu_type == Menu::Type::Separator) {
-  }
-  return result;
-}
-
-class Application {
-public:
-  Application(FILE *in, FILE *out)
-      : m_window_sp(), m_screen(nullptr), m_in(in), m_out(out) {}
-
-  ~Application() {
-    m_window_delegates.clear();
-    m_window_sp.reset();
-    if (m_screen) {
-      ::delscreen(m_screen);
-      m_screen = nullptr;
-    }
-  }
-
-  void Initialize() {
-    ::setlocale(LC_ALL, "");
-    ::setlocale(LC_CTYPE, "");
-    m_screen = ::newterm(nullptr, m_out, m_in);
-    ::start_color();
-    ::curs_set(0);
-    ::noecho();
-    ::keypad(stdscr, TRUE);
-  }
-
-  void Terminate() { ::endwin(); }
-
-  void Run(Debugger &debugger) {
-    bool done = false;
-    int delay_in_tenths_of_a_second = 1;
-
-    // Alas the threading model in curses is a bit lame so we need to resort to
-    // polling every 0.5 seconds. We could poll for stdin ourselves and then
-    // pass the keys down but then we need to translate all of the escape
-    // sequences ourselves. So we resort to polling for input because we need
-    // to receive async process events while in this loop.
-
-    halfdelay(delay_in_tenths_of_a_second); // Poll using some number of tenths
-                                            // of seconds seconds when calling
-                                            // Window::GetChar()
-
-    ListenerSP listener_sp(
-        Listener::MakeListener("lldb.IOHandler.curses.Application"));
-    ConstString broadcaster_class_target(Target::GetStaticBroadcasterClass());
-    ConstString broadcaster_class_process(Process::GetStaticBroadcasterClass());
-    ConstString broadcaster_class_thread(Thread::GetStaticBroadcasterClass());
-    debugger.EnableForwardEvents(listener_sp);
-
-    bool update = true;
-#if defined(__APPLE__)
-    std::deque<int> escape_chars;
-#endif
-
-    while (!done) {
-      if (update) {
-        m_window_sp->Draw(false);
-        // All windows should be calling Window::DeferredRefresh() instead of
-        // Window::Refresh() so we can do a single update and avoid any screen
-        // blinking
-        update_panels();
-
-        // Cursor hiding isn't working on MacOSX, so hide it in the top left
-        // corner
-        m_window_sp->MoveCursor(0, 0);
-
-        doupdate();
-        update = false;
-      }
-
-#if defined(__APPLE__)
-      // Terminal.app doesn't map its function keys correctly, F1-F4 default
-      // to: \033OP, \033OQ, \033OR, \033OS, so lets take care of this here if
-      // possible
-      int ch;
-      if (escape_chars.empty())
-        ch = m_window_sp->GetChar();
-      else {
-        ch = escape_chars.front();
-        escape_chars.pop_front();
-      }
-      if (ch == KEY_ESCAPE) {
-        int ch2 = m_window_sp->GetChar();
-        if (ch2 == 'O') {
-          int ch3 = m_window_sp->GetChar();
-          switch (ch3) {
-          case 'P':
-            ch = KEY_F(1);
-            break;
-          case 'Q':
-            ch = KEY_F(2);
-            break;
-          case 'R':
-            ch = KEY_F(3);
-            break;
-          case 'S':
-            ch = KEY_F(4);
-            break;
-          default:
-            escape_chars.push_back(ch2);
-            if (ch3 != -1)
-              escape_chars.push_back(ch3);
-            break;
-          }
-        } else if (ch2 != -1)
-          escape_chars.push_back(ch2);
-      }
-#else
-      int ch = m_window_sp->GetChar();
-
-#endif
-      if (ch == -1) {
-        if (feof(m_in) || ferror(m_in)) {
-          done = true;
-        } else {
-          // Just a timeout from using halfdelay(), check for events
-          EventSP event_sp;
-          while (listener_sp->PeekAtNextEvent()) {
-            listener_sp->GetEvent(event_sp, std::chrono::seconds(0));
-
-            if (event_sp) {
-              Broadcaster *broadcaster = event_sp->GetBroadcaster();
-              if (broadcaster) {
-                // uint32_t event_type = event_sp->GetType();
-                ConstString broadcaster_class(
-                    broadcaster->GetBroadcasterClass());
-                if (broadcaster_class == broadcaster_class_process) {
-                  debugger.GetCommandInterpreter().UpdateExecutionContext(
-                      nullptr);
-                  update = true;
-                  continue; // Don't get any key, just update our view
-                }
-              }
-            }
-          }
-        }
-      } else {
-        HandleCharResult key_result = m_window_sp->HandleChar(ch);
-        switch (key_result) {
-        case eKeyHandled:
-          debugger.GetCommandInterpreter().UpdateExecutionContext(nullptr);
-          update = true;
-          break;
-        case eKeyNotHandled:
-          break;
-        case eQuitApplication:
-          done = true;
-          break;
-        }
-      }
-    }
-
-    debugger.CancelForwardEvents(listener_sp);
-  }
-
-  WindowSP &GetMainWindow() {
-    if (!m_window_sp)
-      m_window_sp = std::make_shared<Window>("main", stdscr, false);
-    return m_window_sp;
-  }
-
-  WindowDelegates &GetWindowDelegates() { return m_window_delegates; }
-
-protected:
-  WindowSP m_window_sp;
-  WindowDelegates m_window_delegates;
-  SCREEN *m_screen;
-  FILE *m_in;
-  FILE *m_out;
-};
-
-} // namespace curses
-
-using namespace curses;
-
-struct Row {
-  ValueObjectManager value;
-  Row *parent;
-  // The process stop ID when the children were calculated.
-  uint32_t children_stop_id;
-  int row_idx;
-  int x;
-  int y;
-  bool might_have_children;
-  bool expanded;
-  bool calculated_children;
-  std::vector<Row> children;
-
-  Row(const ValueObjectSP &v, Row *p)
-      : value(v, lldb::eDynamicDontRunTarget, true), parent(p), row_idx(0),
-        x(1), y(1), might_have_children(v ? v->MightHaveChildren() : false),
-        expanded(false), calculated_children(false), children() {}
-
-  size_t GetDepth() const {
-    if (parent)
-      return 1 + parent->GetDepth();
-    return 0;
-  }
-
-  void Expand() {
-    expanded = true;
-  }
-
-  std::vector<Row> &GetChildren() {
-    ProcessSP process_sp = value.GetProcessSP();
-    auto stop_id = process_sp->GetStopID();
-    if (process_sp && stop_id != children_stop_id) {
-      children_stop_id = stop_id;
-      calculated_children = false;
-    }
-    if (!calculated_children) {
-      children.clear();
-      calculated_children = true;
-      ValueObjectSP valobj = value.GetSP();
-      if (valobj) {
-        const size_t num_children = valobj->GetNumChildren();
-        for (size_t i = 0; i < num_children; ++i) {
-          children.push_back(Row(valobj->GetChildAtIndex(i, true), this));
-        }
-      }
-    }
-    return children;
-  }
-
-  void Unexpand() {
-    expanded = false;
-    calculated_children = false;
-    children.clear();
-  }
-
-  void DrawTree(Window &window) {
-    if (parent)
-      parent->DrawTreeForChild(window, this, 0);
-
-    if (might_have_children) {
-      // It we can get UTF8 characters to work we should try to use the
-      // "symbol" UTF8 string below
-      //            const char *symbol = "";
-      //            if (row.expanded)
-      //                symbol = "\xe2\x96\xbd ";
-      //            else
-      //                symbol = "\xe2\x96\xb7 ";
-      //            window.PutCString (symbol);
-
-      // The ACS_DARROW and ACS_RARROW don't look very nice they are just a 'v'
-      // or '>' character...
-      //            if (expanded)
-      //                window.PutChar (ACS_DARROW);
-      //            else
-      //                window.PutChar (ACS_RARROW);
-      // Since we can't find any good looking right arrow/down arrow symbols,
-      // just use a diamond...
-      window.PutChar(ACS_DIAMOND);
-      window.PutChar(ACS_HLINE);
-    }
-  }
-
-  void DrawTreeForChild(Window &window, Row *child, uint32_t reverse_depth) {
-    if (parent)
-      parent->DrawTreeForChild(window, this, reverse_depth + 1);
-
-    if (&GetChildren().back() == child) {
-      // Last child
-      if (reverse_depth == 0) {
-        window.PutChar(ACS_LLCORNER);
-        window.PutChar(ACS_HLINE);
-      } else {
-        window.PutChar(' ');
-        window.PutChar(' ');
-      }
-    } else {
-      if (reverse_depth == 0) {
-        window.PutChar(ACS_LTEE);
-        window.PutChar(ACS_HLINE);
-      } else {
-        window.PutChar(ACS_VLINE);
-        window.PutChar(' ');
-      }
-    }
-  }
-};
-
-struct DisplayOptions {
-  bool show_types;
-};
-
-class TreeItem;
-
-class TreeDelegate {
-public:
-  TreeDelegate() = default;
-  virtual ~TreeDelegate() = default;
-
-  virtual void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) = 0;
-  virtual void TreeDelegateGenerateChildren(TreeItem &item) = 0;
-  virtual bool TreeDelegateItemSelected(
-      TreeItem &item) = 0; // Return true if we need to update views
-};
-
-typedef std::shared_ptr<TreeDelegate> TreeDelegateSP;
-
-class TreeItem {
-public:
-  TreeItem(TreeItem *parent, TreeDelegate &delegate, bool might_have_children)
-      : m_parent(parent), m_delegate(delegate), m_user_data(nullptr),
-        m_identifier(0), m_row_idx(-1), m_children(),
-        m_might_have_children(might_have_children), m_is_expanded(false) {}
-
-  TreeItem &operator=(const TreeItem &rhs) {
-    if (this != &rhs) {
-      m_parent = rhs.m_parent;
-      m_delegate = rhs.m_delegate;
-      m_user_data = rhs.m_user_data;
-      m_identifier = rhs.m_identifier;
-      m_row_idx = rhs.m_row_idx;
-      m_children = rhs.m_children;
-      m_might_have_children = rhs.m_might_have_children;
-      m_is_expanded = rhs.m_is_expanded;
-    }
-    return *this;
-  }
-
-  size_t GetDepth() const {
-    if (m_parent)
-      return 1 + m_parent->GetDepth();
-    return 0;
-  }
-
-  int GetRowIndex() const { return m_row_idx; }
-
-  void ClearChildren() { m_children.clear(); }
-
-  void Resize(size_t n, const TreeItem &t) { m_children.resize(n, t); }
-
-  TreeItem &operator[](size_t i) { return m_children[i]; }
-
-  void SetRowIndex(int row_idx) { m_row_idx = row_idx; }
-
-  size_t GetNumChildren() {
-    m_delegate.TreeDelegateGenerateChildren(*this);
-    return m_children.size();
-  }
-
-  void ItemWasSelected() { m_delegate.TreeDelegateItemSelected(*this); }
-
-  void CalculateRowIndexes(int &row_idx) {
-    SetRowIndex(row_idx);
-    ++row_idx;
-
-    const bool expanded = IsExpanded();
-
-    // The root item must calculate its children, or we must calculate the
-    // number of children if the item is expanded
-    if (m_parent == nullptr || expanded)
-      GetNumChildren();
-
-    for (auto &item : m_children) {
-      if (expanded)
-        item.CalculateRowIndexes(row_idx);
-      else
-        item.SetRowIndex(-1);
-    }
-  }
-
-  TreeItem *GetParent() { return m_parent; }
-
-  bool IsExpanded() const { return m_is_expanded; }
-
-  void Expand() { m_is_expanded = true; }
-
-  void Unexpand() { m_is_expanded = false; }
-
-  bool Draw(Window &window, const int first_visible_row,
-            const uint32_t selected_row_idx, int &row_idx, int &num_rows_left) {
-    if (num_rows_left <= 0)
-      return false;
-
-    if (m_row_idx >= first_visible_row) {
-      window.MoveCursor(2, row_idx + 1);
-
-      if (m_parent)
-        m_parent->DrawTreeForChild(window, this, 0);
-
-      if (m_might_have_children) {
-        // It we can get UTF8 characters to work we should try to use the
-        // "symbol" UTF8 string below
-        //            const char *symbol = "";
-        //            if (row.expanded)
-        //                symbol = "\xe2\x96\xbd ";
-        //            else
-        //                symbol = "\xe2\x96\xb7 ";
-        //            window.PutCString (symbol);
-
-        // The ACS_DARROW and ACS_RARROW don't look very nice they are just a
-        // 'v' or '>' character...
-        //            if (expanded)
-        //                window.PutChar (ACS_DARROW);
-        //            else
-        //                window.PutChar (ACS_RARROW);
-        // Since we can't find any good looking right arrow/down arrow symbols,
-        // just use a diamond...
-        window.PutChar(ACS_DIAMOND);
-        window.PutChar(ACS_HLINE);
-      }
-      bool highlight = (selected_row_idx == static_cast<size_t>(m_row_idx)) &&
-                       window.IsActive();
-
-      if (highlight)
-        window.AttributeOn(A_REVERSE);
-
-      m_delegate.TreeDelegateDrawTreeItem(*this, window);
-
-      if (highlight)
-        window.AttributeOff(A_REVERSE);
-      ++row_idx;
-      --num_rows_left;
-    }
-
-    if (num_rows_left <= 0)
-      return false; // We are done drawing...
-
-    if (IsExpanded()) {
-      for (auto &item : m_children) {
-        // If we displayed all the rows and item.Draw() returns false we are
-        // done drawing and can exit this for loop
-        if (!item.Draw(window, first_visible_row, selected_row_idx, row_idx,
-                       num_rows_left))
-          break;
-      }
-    }
-    return num_rows_left >= 0; // Return true if not done drawing yet
-  }
-
-  void DrawTreeForChild(Window &window, TreeItem *child,
-                        uint32_t reverse_depth) {
-    if (m_parent)
-      m_parent->DrawTreeForChild(window, this, reverse_depth + 1);
-
-    if (&m_children.back() == child) {
-      // Last child
-      if (reverse_depth == 0) {
-        window.PutChar(ACS_LLCORNER);
-        window.PutChar(ACS_HLINE);
-      } else {
-        window.PutChar(' ');
-        window.PutChar(' ');
-      }
-    } else {
-      if (reverse_depth == 0) {
-        window.PutChar(ACS_LTEE);
-        window.PutChar(ACS_HLINE);
-      } else {
-        window.PutChar(ACS_VLINE);
-        window.PutChar(' ');
-      }
-    }
-  }
-
-  TreeItem *GetItemForRowIndex(uint32_t row_idx) {
-    if (static_cast<uint32_t>(m_row_idx) == row_idx)
-      return this;
-    if (m_children.empty())
-      return nullptr;
-    if (IsExpanded()) {
-      for (auto &item : m_children) {
-        TreeItem *selected_item_ptr = item.GetItemForRowIndex(row_idx);
-        if (selected_item_ptr)
-          return selected_item_ptr;
-      }
-    }
-    return nullptr;
-  }
-
-  void *GetUserData() const { return m_user_data; }
-
-  void SetUserData(void *user_data) { m_user_data = user_data; }
-
-  uint64_t GetIdentifier() const { return m_identifier; }
-
-  void SetIdentifier(uint64_t identifier) { m_identifier = identifier; }
-
-  void SetMightHaveChildren(bool b) { m_might_have_children = b; }
-
-protected:
-  TreeItem *m_parent;
-  TreeDelegate &m_delegate;
-  void *m_user_data;
-  uint64_t m_identifier;
-  int m_row_idx; // Zero based visible row index, -1 if not visible or for the
-                 // root item
-  std::vector<TreeItem> m_children;
-  bool m_might_have_children;
-  bool m_is_expanded;
-};
-
-class TreeWindowDelegate : public WindowDelegate {
-public:
-  TreeWindowDelegate(Debugger &debugger, const TreeDelegateSP &delegate_sp)
-      : m_debugger(debugger), m_delegate_sp(delegate_sp),
-        m_root(nullptr, *delegate_sp, true), m_selected_item(nullptr),
-        m_num_rows(0), m_selected_row_idx(0), m_first_visible_row(0),
-        m_min_x(0), m_min_y(0), m_max_x(0), m_max_y(0) {}
-
-  int NumVisibleRows() const { return m_max_y - m_min_y; }
-
-  bool WindowDelegateDraw(Window &window, bool force) override {
-    ExecutionContext exe_ctx(
-        m_debugger.GetCommandInterpreter().GetExecutionContext());
-    Process *process = exe_ctx.GetProcessPtr();
-
-    bool display_content = false;
-    if (process) {
-      StateType state = process->GetState();
-      if (StateIsStoppedState(state, true)) {
-        // We are stopped, so it is ok to
-        display_content = true;
-      } else if (StateIsRunningState(state)) {
-        return true; // Don't do any updating when we are running
-      }
-    }
-
-    m_min_x = 2;
-    m_min_y = 1;
-    m_max_x = window.GetWidth() - 1;
-    m_max_y = window.GetHeight() - 1;
-
-    window.Erase();
-    window.DrawTitleBox(window.GetName());
-
-    if (display_content) {
-      const int num_visible_rows = NumVisibleRows();
-      m_num_rows = 0;
-      m_root.CalculateRowIndexes(m_num_rows);
-
-      // If we unexpanded while having something selected our total number of
-      // rows is less than the num visible rows, then make sure we show all the
-      // rows by setting the first visible row accordingly.
-      if (m_first_visible_row > 0 && m_num_rows < num_visible_rows)
-        m_first_visible_row = 0;
-
-      // Make sure the selected row is always visible
-      if (m_selected_row_idx < m_first_visible_row)
-        m_first_visible_row = m_selected_row_idx;
-      else if (m_first_visible_row + num_visible_rows <= m_selected_row_idx)
-        m_first_visible_row = m_selected_row_idx - num_visible_rows + 1;
-
-      int row_idx = 0;
-      int num_rows_left = num_visible_rows;
-      m_root.Draw(window, m_first_visible_row, m_selected_row_idx, row_idx,
-                  num_rows_left);
-      // Get the selected row
-      m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
-    } else {
-      m_selected_item = nullptr;
-    }
-
-    window.DeferredRefresh();
-
-    return true; // Drawing handled
-  }
-
-  const char *WindowDelegateGetHelpText() override {
-    return "Thread window keyboard shortcuts:";
-  }
-
-  KeyHelp *WindowDelegateGetKeyHelp() override {
-    static curses::KeyHelp g_source_view_key_help[] = {
-        {KEY_UP, "Select previous item"},
-        {KEY_DOWN, "Select next item"},
-        {KEY_RIGHT, "Expand the selected item"},
-        {KEY_LEFT,
-         "Unexpand the selected item or select parent if not expanded"},
-        {KEY_PPAGE, "Page up"},
-        {KEY_NPAGE, "Page down"},
-        {'h', "Show help dialog"},
-        {' ', "Toggle item expansion"},
-        {',', "Page up"},
-        {'.', "Page down"},
-        {'\0', nullptr}};
-    return g_source_view_key_help;
-  }
-
-  HandleCharResult WindowDelegateHandleChar(Window &window, int c) override {
-    switch (c) {
-    case ',':
-    case KEY_PPAGE:
-      // Page up key
-      if (m_first_visible_row > 0) {
-        if (m_first_visible_row > m_max_y)
-          m_first_visible_row -= m_max_y;
-        else
-          m_first_visible_row = 0;
-        m_selected_row_idx = m_first_visible_row;
-        m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
-        if (m_selected_item)
-          m_selected_item->ItemWasSelected();
-      }
-      return eKeyHandled;
-
-    case '.':
-    case KEY_NPAGE:
-      // Page down key
-      if (m_num_rows > m_max_y) {
-        if (m_first_visible_row + m_max_y < m_num_rows) {
-          m_first_visible_row += m_max_y;
-          m_selected_row_idx = m_first_visible_row;
-          m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
-          if (m_selected_item)
-            m_selected_item->ItemWasSelected();
-        }
-      }
-      return eKeyHandled;
-
-    case KEY_UP:
-      if (m_selected_row_idx > 0) {
-        --m_selected_row_idx;
-        m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
-        if (m_selected_item)
-          m_selected_item->ItemWasSelected();
-      }
-      return eKeyHandled;
-
-    case KEY_DOWN:
-      if (m_selected_row_idx + 1 < m_num_rows) {
-        ++m_selected_row_idx;
-        m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
-        if (m_selected_item)
-          m_selected_item->ItemWasSelected();
-      }
-      return eKeyHandled;
-
-    case KEY_RIGHT:
-      if (m_selected_item) {
-        if (!m_selected_item->IsExpanded())
-          m_selected_item->Expand();
-      }
-      return eKeyHandled;
-
-    case KEY_LEFT:
-      if (m_selected_item) {
-        if (m_selected_item->IsExpanded())
-          m_selected_item->Unexpand();
-        else if (m_selected_item->GetParent()) {
-          m_selected_row_idx = m_selected_item->GetParent()->GetRowIndex();
-          m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
-          if (m_selected_item)
-            m_selected_item->ItemWasSelected();
-        }
-      }
-      return eKeyHandled;
-
-    case ' ':
-      // Toggle expansion state when SPACE is pressed
-      if (m_selected_item) {
-        if (m_selected_item->IsExpanded())
-          m_selected_item->Unexpand();
-        else
-          m_selected_item->Expand();
-      }
-      return eKeyHandled;
-
-    case 'h':
-      window.CreateHelpSubwindow();
-      return eKeyHandled;
-
-    default:
-      break;
-    }
-    return eKeyNotHandled;
-  }
-
-protected:
-  Debugger &m_debugger;
-  TreeDelegateSP m_delegate_sp;
-  TreeItem m_root;
-  TreeItem *m_selected_item;
-  int m_num_rows;
-  int m_selected_row_idx;
-  int m_first_visible_row;
-  int m_min_x;
-  int m_min_y;
-  int m_max_x;
-  int m_max_y;
-};
-
-class FrameTreeDelegate : public TreeDelegate {
-public:
-  FrameTreeDelegate() : TreeDelegate() {
-    FormatEntity::Parse(
-        "frame #${frame.index}: {${function.name}${function.pc-offset}}}",
-        m_format);
-  }
-
-  ~FrameTreeDelegate() override = default;
-
-  void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
-    Thread *thread = (Thread *)item.GetUserData();
-    if (thread) {
-      const uint64_t frame_idx = item.GetIdentifier();
-      StackFrameSP frame_sp = thread->GetStackFrameAtIndex(frame_idx);
-      if (frame_sp) {
-        StreamString strm;
-        const SymbolContext &sc =
-            frame_sp->GetSymbolContext(eSymbolContextEverything);
-        ExecutionContext exe_ctx(frame_sp);
-        if (FormatEntity::Format(m_format, strm, &sc, &exe_ctx, nullptr,
-                                 nullptr, false, false)) {
-          int right_pad = 1;
-          window.PutCStringTruncated(strm.GetString().str().c_str(), right_pad);
-        }
-      }
-    }
-  }
-
-  void TreeDelegateGenerateChildren(TreeItem &item) override {
-    // No children for frames yet...
-  }
-
-  bool TreeDelegateItemSelected(TreeItem &item) override {
-    Thread *thread = (Thread *)item.GetUserData();
-    if (thread) {
-      thread->GetProcess()->GetThreadList().SetSelectedThreadByID(
-          thread->GetID());
-      const uint64_t frame_idx = item.GetIdentifier();
-      thread->SetSelectedFrameByIndex(frame_idx);
-      return true;
-    }
-    return false;
-  }
-
-protected:
-  FormatEntity::Entry m_format;
-};
-
-class ThreadTreeDelegate : public TreeDelegate {
-public:
-  ThreadTreeDelegate(Debugger &debugger)
-      : TreeDelegate(), m_debugger(debugger), m_tid(LLDB_INVALID_THREAD_ID),
-        m_stop_id(UINT32_MAX) {
-    FormatEntity::Parse("thread #${thread.index}: tid = ${thread.id}{, stop "
-                        "reason = ${thread.stop-reason}}",
-                        m_format);
-  }
-
-  ~ThreadTreeDelegate() override = default;
-
-  ProcessSP GetProcess() {
-    return m_debugger.GetCommandInterpreter()
-        .GetExecutionContext()
-        .GetProcessSP();
-  }
-
-  ThreadSP GetThread(const TreeItem &item) {
-    ProcessSP process_sp = GetProcess();
-    if (process_sp)
-      return process_sp->GetThreadList().FindThreadByID(item.GetIdentifier());
-    return ThreadSP();
-  }
-
-  void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
-    ThreadSP thread_sp = GetThread(item);
-    if (thread_sp) {
-      StreamString strm;
-      ExecutionContext exe_ctx(thread_sp);
-      if (FormatEntity::Format(m_format, strm, nullptr, &exe_ctx, nullptr,
-                               nullptr, false, false)) {
-        int right_pad = 1;
-        window.PutCStringTruncated(strm.GetString().str().c_str(), right_pad);
-      }
-    }
-  }
-
-  void TreeDelegateGenerateChildren(TreeItem &item) override {
-    ProcessSP process_sp = GetProcess();
-    if (process_sp && process_sp->IsAlive()) {
-      StateType state = process_sp->GetState();
-      if (StateIsStoppedState(state, true)) {
-        ThreadSP thread_sp = GetThread(item);
-        if (thread_sp) {
-          if (m_stop_id == process_sp->GetStopID() &&
-              thread_sp->GetID() == m_tid)
-            return; // Children are already up to date
-          if (!m_frame_delegate_sp) {
-            // Always expand the thread item the first time we show it
-            m_frame_delegate_sp = std::make_shared<FrameTreeDelegate>();
-          }
-
-          m_stop_id = process_sp->GetStopID();
-          m_tid = thread_sp->GetID();
-
-          TreeItem t(&item, *m_frame_delegate_sp, false);
-          size_t num_frames = thread_sp->GetStackFrameCount();
-          item.Resize(num_frames, t);
-          for (size_t i = 0; i < num_frames; ++i) {
-            item[i].SetUserData(thread_sp.get());
-            item[i].SetIdentifier(i);
-          }
-        }
-        return;
-      }
-    }
-    item.ClearChildren();
-  }
-
-  bool TreeDelegateItemSelected(TreeItem &item) override {
-    ProcessSP process_sp = GetProcess();
-    if (process_sp && process_sp->IsAlive()) {
-      StateType state = process_sp->GetState();
-      if (StateIsStoppedState(state, true)) {
-        ThreadSP thread_sp = GetThread(item);
-        if (thread_sp) {
-          ThreadList &thread_list = thread_sp->GetProcess()->GetThreadList();
-          std::lock_guard<std::recursive_mutex> guard(thread_list.GetMutex());
-          ThreadSP selected_thread_sp = thread_list.GetSelectedThread();
-          if (selected_thread_sp->GetID() != thread_sp->GetID()) {
-            thread_list.SetSelectedThreadByID(thread_sp->GetID());
-            return true;
-          }
-        }
-      }
-    }
-    return false;
-  }
-
-protected:
-  Debugger &m_debugger;
-  std::shared_ptr<FrameTreeDelegate> m_frame_delegate_sp;
-  lldb::user_id_t m_tid;
-  uint32_t m_stop_id;
-  FormatEntity::Entry m_format;
-};
-
-class ThreadsTreeDelegate : public TreeDelegate {
-public:
-  ThreadsTreeDelegate(Debugger &debugger)
-      : TreeDelegate(), m_thread_delegate_sp(), m_debugger(debugger),
-        m_stop_id(UINT32_MAX) {
-    FormatEntity::Parse("process ${process.id}{, name = ${process.name}}",
-                        m_format);
-  }
-
-  ~ThreadsTreeDelegate() override = default;
-
-  ProcessSP GetProcess() {
-    return m_debugger.GetCommandInterpreter()
-        .GetExecutionContext()
-        .GetProcessSP();
-  }
-
-  void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
-    ProcessSP process_sp = GetProcess();
-    if (process_sp && process_sp->IsAlive()) {
-      StreamString strm;
-      ExecutionContext exe_ctx(process_sp);
-      if (FormatEntity::Format(m_format, strm, nullptr, &exe_ctx, nullptr,
-                               nullptr, false, false)) {
-        int right_pad = 1;
-        window.PutCStringTruncated(strm.GetString().str().c_str(), right_pad);
-      }
-    }
-  }
-
-  void TreeDelegateGenerateChildren(TreeItem &item) override {
-    ProcessSP process_sp = GetProcess();
-    if (process_sp && process_sp->IsAlive()) {
-      StateType state = process_sp->GetState();
-      if (StateIsStoppedState(state, true)) {
-        const uint32_t stop_id = process_sp->GetStopID();
-        if (m_stop_id == stop_id)
-          return; // Children are already up to date
-
-        m_stop_id = stop_id;
-
-        if (!m_thread_delegate_sp) {
-          // Always expand the thread item the first time we show it
-          // item.Expand();
-          m_thread_delegate_sp =
-              std::make_shared<ThreadTreeDelegate>(m_debugger);
-        }
-
-        TreeItem t(&item, *m_thread_delegate_sp, false);
-        ThreadList &threads = process_sp->GetThreadList();
-        std::lock_guard<std::recursive_mutex> guard(threads.GetMutex());
-        size_t num_threads = threads.GetSize();
-        item.Resize(num_threads, t);
-        for (size_t i = 0; i < num_threads; ++i) {
-          item[i].SetIdentifier(threads.GetThreadAtIndex(i)->GetID());
-          item[i].SetMightHaveChildren(true);
-        }
-        return;
-      }
-    }
-    item.ClearChildren();
-  }
-
-  bool TreeDelegateItemSelected(TreeItem &item) override { return false; }
-
-protected:
-  std::shared_ptr<ThreadTreeDelegate> m_thread_delegate_sp;
-  Debugger &m_debugger;
-  uint32_t m_stop_id;
-  FormatEntity::Entry m_format;
-};
-
-class ValueObjectListDelegate : public WindowDelegate {
-public:
-  ValueObjectListDelegate()
-      : m_rows(), m_selected_row(nullptr),
-        m_selected_row_idx(0), m_first_visible_row(0), m_num_rows(0),
-        m_max_x(0), m_max_y(0) {}
-
-  ValueObjectListDelegate(ValueObjectList &valobj_list)
-      : m_rows(), m_selected_row(nullptr),
-        m_selected_row_idx(0), m_first_visible_row(0), m_num_rows(0),
-        m_max_x(0), m_max_y(0) {
-    SetValues(valobj_list);
-  }
-
-  ~ValueObjectListDelegate() override = default;
-
-  void SetValues(ValueObjectList &valobj_list) {
-    m_selected_row = nullptr;
-    m_selected_row_idx = 0;
-    m_first_visible_row = 0;
-    m_num_rows = 0;
-    m_rows.clear();
-    for (auto &valobj_sp : valobj_list.GetObjects())
-      m_rows.push_back(Row(valobj_sp, nullptr));
-  }
-
-  bool WindowDelegateDraw(Window &window, bool force) override {
-    m_num_rows = 0;
-    m_min_x = 2;
-    m_min_y = 1;
-    m_max_x = window.GetWidth() - 1;
-    m_max_y = window.GetHeight() - 1;
-
-    window.Erase();
-    window.DrawTitleBox(window.GetName());
-
-    const int num_visible_rows = NumVisibleRows();
-    const int num_rows = CalculateTotalNumberRows(m_rows);
-
-    // If we unexpanded while having something selected our total number of
-    // rows is less than the num visible rows, then make sure we show all the
-    // rows by setting the first visible row accordingly.
-    if (m_first_visible_row > 0 && num_rows < num_visible_rows)
-      m_first_visible_row = 0;
-
-    // Make sure the selected row is always visible
-    if (m_selected_row_idx < m_first_visible_row)
-      m_first_visible_row = m_selected_row_idx;
-    else if (m_first_visible_row + num_visible_rows <= m_selected_row_idx)
-      m_first_visible_row = m_selected_row_idx - num_visible_rows + 1;
-
-    DisplayRows(window, m_rows, g_options);
-
-    window.DeferredRefresh();
-
-    // Get the selected row
-    m_selected_row = GetRowForRowIndex(m_selected_row_idx);
-    // Keep the cursor on the selected row so the highlight and the cursor are
-    // always on the same line
-    if (m_selected_row)
-      window.MoveCursor(m_selected_row->x, m_selected_row->y);
-
-    return true; // Drawing handled
-  }
-
-  KeyHelp *WindowDelegateGetKeyHelp() override {
-    static curses::KeyHelp g_source_view_key_help[] = {
-        {KEY_UP, "Select previous item"},
-        {KEY_DOWN, "Select next item"},
-        {KEY_RIGHT, "Expand selected item"},
-        {KEY_LEFT, "Unexpand selected item or select parent if not expanded"},
-        {KEY_PPAGE, "Page up"},
-        {KEY_NPAGE, "Page down"},
-        {'A', "Format as annotated address"},
-        {'b', "Format as binary"},
-        {'B', "Format as hex bytes with ASCII"},
-        {'c', "Format as character"},
-        {'d', "Format as a signed integer"},
-        {'D', "Format selected value using the default format for the type"},
-        {'f', "Format as float"},
-        {'h', "Show help dialog"},
-        {'i', "Format as instructions"},
-        {'o', "Format as octal"},
-        {'p', "Format as pointer"},
-        {'s', "Format as C string"},
-        {'t', "Toggle showing/hiding type names"},
-        {'u', "Format as an unsigned integer"},
-        {'x', "Format as hex"},
-        {'X', "Format as uppercase hex"},
-        {' ', "Toggle item expansion"},
-        {',', "Page up"},
-        {'.', "Page down"},
-        {'\0', nullptr}};
-    return g_source_view_key_help;
-  }
-
-  HandleCharResult WindowDelegateHandleChar(Window &window, int c) override {
-    switch (c) {
-    case 'x':
-    case 'X':
-    case 'o':
-    case 's':
-    case 'u':
-    case 'd':
-    case 'D':
-    case 'i':
-    case 'A':
-    case 'p':
-    case 'c':
-    case 'b':
-    case 'B':
-    case 'f':
-      // Change the format for the currently selected item
-      if (m_selected_row) {
-        auto valobj_sp = m_selected_row->value.GetSP();
-        if (valobj_sp)
-          valobj_sp->SetFormat(FormatForChar(c));
-      }
-      return eKeyHandled;
-
-    case 't':
-      // Toggle showing type names
-      g_options.show_types = !g_options.show_types;
-      return eKeyHandled;
-
-    case ',':
-    case KEY_PPAGE:
-      // Page up key
-      if (m_first_visible_row > 0) {
-        if (static_cast<int>(m_first_visible_row) > m_max_y)
-          m_first_visible_row -= m_max_y;
-        else
-          m_first_visible_row = 0;
-        m_selected_row_idx = m_first_visible_row;
-      }
-      return eKeyHandled;
-
-    case '.':
-    case KEY_NPAGE:
-      // Page down key
-      if (m_num_rows > static_cast<size_t>(m_max_y)) {
-        if (m_first_visible_row + m_max_y < m_num_rows) {
-          m_first_visible_row += m_max_y;
-          m_selected_row_idx = m_first_visible_row;
-        }
-      }
-      return eKeyHandled;
-
-    case KEY_UP:
-      if (m_selected_row_idx > 0)
-        --m_selected_row_idx;
-      return eKeyHandled;
-
-    case KEY_DOWN:
-      if (m_selected_row_idx + 1 < m_num_rows)
-        ++m_selected_row_idx;
-      return eKeyHandled;
-
-    case KEY_RIGHT:
-      if (m_selected_row) {
-        if (!m_selected_row->expanded)
-          m_selected_row->Expand();
-      }
-      return eKeyHandled;
-
-    case KEY_LEFT:
-      if (m_selected_row) {
-        if (m_selected_row->expanded)
-          m_selected_row->Unexpand();
-        else if (m_selected_row->parent)
-          m_selected_row_idx = m_selected_row->parent->row_idx;
-      }
-      return eKeyHandled;
-
-    case ' ':
-      // Toggle expansion state when SPACE is pressed
-      if (m_selected_row) {
-        if (m_selected_row->expanded)
-          m_selected_row->Unexpand();
-        else
-          m_selected_row->Expand();
-      }
-      return eKeyHandled;
-
-    case 'h':
-      window.CreateHelpSubwindow();
-      return eKeyHandled;
-
-    default:
-      break;
-    }
-    return eKeyNotHandled;
-  }
-
-protected:
-  std::vector<Row> m_rows;
-  Row *m_selected_row;
-  uint32_t m_selected_row_idx;
-  uint32_t m_first_visible_row;
-  uint32_t m_num_rows;
-  int m_min_x;
-  int m_min_y;
-  int m_max_x;
-  int m_max_y;
-
-  static Format FormatForChar(int c) {
-    switch (c) {
-    case 'x':
-      return eFormatHex;
-    case 'X':
-      return eFormatHexUppercase;
-    case 'o':
-      return eFormatOctal;
-    case 's':
-      return eFormatCString;
-    case 'u':
-      return eFormatUnsigned;
-    case 'd':
-      return eFormatDecimal;
-    case 'D':
-      return eFormatDefault;
-    case 'i':
-      return eFormatInstruction;
-    case 'A':
-      return eFormatAddressInfo;
-    case 'p':
-      return eFormatPointer;
-    case 'c':
-      return eFormatChar;
-    case 'b':
-      return eFormatBinary;
-    case 'B':
-      return eFormatBytesWithASCII;
-    case 'f':
-      return eFormatFloat;
-    }
-    return eFormatDefault;
-  }
-
-  bool DisplayRowObject(Window &window, Row &row, DisplayOptions &options,
-                        bool highlight, bool last_child) {
-    ValueObject *valobj = row.value.GetSP().get();
-
-    if (valobj == nullptr)
-      return false;
-
-    const char *type_name =
-        options.show_types ? valobj->GetTypeName().GetCString() : nullptr;
-    const char *name = valobj->GetName().GetCString();
-    const char *value = valobj->GetValueAsCString();
-    const char *summary = valobj->GetSummaryAsCString();
-
-    window.MoveCursor(row.x, row.y);
-
-    row.DrawTree(window);
-
-    if (highlight)
-      window.AttributeOn(A_REVERSE);
-
-    if (type_name && type_name[0])
-      window.Printf("(%s) ", type_name);
-
-    if (name && name[0])
-      window.PutCString(name);
-
-    attr_t changd_attr = 0;
-    if (valobj->GetValueDidChange())
-      changd_attr = COLOR_PAIR(5) | A_BOLD;
-
-    if (value && value[0]) {
-      window.PutCString(" = ");
-      if (changd_attr)
-        window.AttributeOn(changd_attr);
-      window.PutCString(value);
-      if (changd_attr)
-        window.AttributeOff(changd_attr);
-    }
-
-    if (summary && summary[0]) {
-      window.PutChar(' ');
-      if (changd_attr)
-        window.AttributeOn(changd_attr);
-      window.PutCString(summary);
-      if (changd_attr)
-        window.AttributeOff(changd_attr);
-    }
-
-    if (highlight)
-      window.AttributeOff(A_REVERSE);
-
-    return true;
-  }
-
-  void DisplayRows(Window &window, std::vector<Row> &rows,
-                   DisplayOptions &options) {
-    // >   0x25B7
-    // \/  0x25BD
-
-    bool window_is_active = window.IsActive();
-    for (auto &row : rows) {
-      const bool last_child = row.parent && &rows[rows.size() - 1] == &row;
-      // Save the row index in each Row structure
-      row.row_idx = m_num_rows;
-      if ((m_num_rows >= m_first_visible_row) &&
-          ((m_num_rows - m_first_visible_row) <
-           static_cast<size_t>(NumVisibleRows()))) {
-        row.x = m_min_x;
-        row.y = m_num_rows - m_first_visible_row + 1;
-        if (DisplayRowObject(window, row, options,
-                             window_is_active &&
-                                 m_num_rows == m_selected_row_idx,
-                             last_child)) {
-          ++m_num_rows;
-        } else {
-          row.x = 0;
-          row.y = 0;
-        }
-      } else {
-        row.x = 0;
-        row.y = 0;
-        ++m_num_rows;
-      }
-
-      auto &children = row.GetChildren();
-      if (row.expanded && !children.empty()) {
-        DisplayRows(window, children, options);
-      }
-    }
-  }
-
-  int CalculateTotalNumberRows(std::vector<Row> &rows) {
-    int row_count = 0;
-    for (auto &row : rows) {
-      ++row_count;
-      if (row.expanded)
-        row_count += CalculateTotalNumberRows(row.GetChildren());
-    }
-    return row_count;
-  }
-
-  static Row *GetRowForRowIndexImpl(std::vector<Row> &rows, size_t &row_index) {
-    for (auto &row : rows) {
-      if (row_index == 0)
-        return &row;
-      else {
-        --row_index;
-        auto &children = row.GetChildren();
-        if (row.expanded && !children.empty()) {
-          Row *result = GetRowForRowIndexImpl(children, row_index);
-          if (result)
-            return result;
-        }
-      }
-    }
-    return nullptr;
-  }
-
-  Row *GetRowForRowIndex(size_t row_index) {
-    return GetRowForRowIndexImpl(m_rows, row_index);
-  }
-
-  int NumVisibleRows() const { return m_max_y - m_min_y; }
-
-  static DisplayOptions g_options;
-};
-
-class FrameVariablesWindowDelegate : public ValueObjectListDelegate {
-public:
-  FrameVariablesWindowDelegate(Debugger &debugger)
-      : ValueObjectListDelegate(), m_debugger(debugger),
-        m_frame_block(nullptr) {}
-
-  ~FrameVariablesWindowDelegate() override = default;
-
-  const char *WindowDelegateGetHelpText() override {
-    return "Frame variable window keyboard shortcuts:";
-  }
-
-  bool WindowDelegateDraw(Window &window, bool force) override {
-    ExecutionContext exe_ctx(
-        m_debugger.GetCommandInterpreter().GetExecutionContext());
-    Process *process = exe_ctx.GetProcessPtr();
-    Block *frame_block = nullptr;
-    StackFrame *frame = nullptr;
-
-    if (process) {
-      StateType state = process->GetState();
-      if (StateIsStoppedState(state, true)) {
-        frame = exe_ctx.GetFramePtr();
-        if (frame)
-          frame_block = frame->GetFrameBlock();
-      } else if (StateIsRunningState(state)) {
-        return true; // Don't do any updating when we are running
-      }
-    }
-
-    ValueObjectList local_values;
-    if (frame_block) {
-      // Only update the variables if they have changed
-      if (m_frame_block != frame_block) {
-        m_frame_block = frame_block;
-
-        VariableList *locals = frame->GetVariableList(true);
-        if (locals) {
-          const DynamicValueType use_dynamic = eDynamicDontRunTarget;
-          const size_t num_locals = locals->GetSize();
-          for (size_t i = 0; i < num_locals; ++i) {
-            ValueObjectSP value_sp = frame->GetValueObjectForFrameVariable(
-                locals->GetVariableAtIndex(i), use_dynamic);
-            if (value_sp) {
-              ValueObjectSP synthetic_value_sp = value_sp->GetSyntheticValue();
-              if (synthetic_value_sp)
-                local_values.Append(synthetic_value_sp);
-              else
-                local_values.Append(value_sp);
-            }
-          }
-          // Update the values
-          SetValues(local_values);
-        }
-      }
-    } else {
-      m_frame_block = nullptr;
-      // Update the values with an empty list if there is no frame
-      SetValues(local_values);
-    }
-
-    return ValueObjectListDelegate::WindowDelegateDraw(window, force);
-  }
-
-protected:
-  Debugger &m_debugger;
-  Block *m_frame_block;
-};
-
-class RegistersWindowDelegate : public ValueObjectListDelegate {
-public:
-  RegistersWindowDelegate(Debugger &debugger)
-      : ValueObjectListDelegate(), m_debugger(debugger) {}
-
-  ~RegistersWindowDelegate() override = default;
-
-  const char *WindowDelegateGetHelpText() override {
-    return "Register window keyboard shortcuts:";
-  }
-
-  bool WindowDelegateDraw(Window &window, bool force) override {
-    ExecutionContext exe_ctx(
-        m_debugger.GetCommandInterpreter().GetExecutionContext());
-    StackFrame *frame = exe_ctx.GetFramePtr();
-
-    ValueObjectList value_list;
-    if (frame) {
-      if (frame->GetStackID() != m_stack_id) {
-        m_stack_id = frame->GetStackID();
-        RegisterContextSP reg_ctx(frame->GetRegisterContext());
-        if (reg_ctx) {
-          const uint32_t num_sets = reg_ctx->GetRegisterSetCount();
-          for (uint32_t set_idx = 0; set_idx < num_sets; ++set_idx) {
-            value_list.Append(
-                ValueObjectRegisterSet::Create(frame, reg_ctx, set_idx));
-          }
-        }
-        SetValues(value_list);
-      }
-    } else {
-      Process *process = exe_ctx.GetProcessPtr();
-      if (process && process->IsAlive())
-        return true; // Don't do any updating if we are running
-      else {
-        // Update the values with an empty list if there is no process or the
-        // process isn't alive anymore
-        SetValues(value_list);
-      }
-    }
-    return ValueObjectListDelegate::WindowDelegateDraw(window, force);
-  }
-
-protected:
-  Debugger &m_debugger;
-  StackID m_stack_id;
-};
-
-static const char *CursesKeyToCString(int ch) {
-  static char g_desc[32];
-  if (ch >= KEY_F0 && ch < KEY_F0 + 64) {
-    snprintf(g_desc, sizeof(g_desc), "F%u", ch - KEY_F0);
-    return g_desc;
-  }
-  switch (ch) {
-  case KEY_DOWN:
-    return "down";
-  case KEY_UP:
-    return "up";
-  case KEY_LEFT:
-    return "left";
-  case KEY_RIGHT:
-    return "right";
-  case KEY_HOME:
-    return "home";
-  case KEY_BACKSPACE:
-    return "backspace";
-  case KEY_DL:
-    return "delete-line";
-  case KEY_IL:
-    return "insert-line";
-  case KEY_DC:
-    return "delete-char";
-  case KEY_IC:
-    return "insert-char";
-  case KEY_CLEAR:
-    return "clear";
-  case KEY_EOS:
-    return "clear-to-eos";
-  case KEY_EOL:
-    return "clear-to-eol";
-  case KEY_SF:
-    return "scroll-forward";
-  case KEY_SR:
-    return "scroll-backward";
-  case KEY_NPAGE:
-    return "page-down";
-  case KEY_PPAGE:
-    return "page-up";
-  case KEY_STAB:
-    return "set-tab";
-  case KEY_CTAB:
-    return "clear-tab";
-  case KEY_CATAB:
-    return "clear-all-tabs";
-  case KEY_ENTER:
-    return "enter";
-  case KEY_PRINT:
-    return "print";
-  case KEY_LL:
-    return "lower-left key";
-  case KEY_A1:
-    return "upper left of keypad";
-  case KEY_A3:
-    return "upper right of keypad";
-  case KEY_B2:
-    return "center of keypad";
-  case KEY_C1:
-    return "lower left of keypad";
-  case KEY_C3:
-    return "lower right of keypad";
-  case KEY_BTAB:
-    return "back-tab key";
-  case KEY_BEG:
-    return "begin key";
-  case KEY_CANCEL:
-    return "cancel key";
-  case KEY_CLOSE:
-    return "close key";
-  case KEY_COMMAND:
-    return "command key";
-  case KEY_COPY:
-    return "copy key";
-  case KEY_CREATE:
-    return "create key";
-  case KEY_END:
-    return "end key";
-  case KEY_EXIT:
-    return "exit key";
-  case KEY_FIND:
-    return "find key";
-  case KEY_HELP:
-    return "help key";
-  case KEY_MARK:
-    return "mark key";
-  case KEY_MESSAGE:
-    return "message key";
-  case KEY_MOVE:
-    return "move key";
-  case KEY_NEXT:
-    return "next key";
-  case KEY_OPEN:
-    return "open key";
-  case KEY_OPTIONS:
-    return "options key";
-  case KEY_PREVIOUS:
-    return "previous key";
-  case KEY_REDO:
-    return "redo key";
-  case KEY_REFERENCE:
-    return "reference key";
-  case KEY_REFRESH:
-    return "refresh key";
-  case KEY_REPLACE:
-    return "replace key";
-  case KEY_RESTART:
-    return "restart key";
-  case KEY_RESUME:
-    return "resume key";
-  case KEY_SAVE:
-    return "save key";
-  case KEY_SBEG:
-    return "shifted begin key";
-  case KEY_SCANCEL:
-    return "shifted cancel key";
-  case KEY_SCOMMAND:
-    return "shifted command key";
-  case KEY_SCOPY:
-    return "shifted copy key";
-  case KEY_SCREATE:
-    return "shifted create key";
-  case KEY_SDC:
-    return "shifted delete-character key";
-  case KEY_SDL:
-    return "shifted delete-line key";
-  case KEY_SELECT:
-    return "select key";
-  case KEY_SEND:
-    return "shifted end key";
-  case KEY_SEOL:
-    return "shifted clear-to-end-of-line key";
-  case KEY_SEXIT:
-    return "shifted exit key";
-  case KEY_SFIND:
-    return "shifted find key";
-  case KEY_SHELP:
-    return "shifted help key";
-  case KEY_SHOME:
-    return "shifted home key";
-  case KEY_SIC:
-    return "shifted insert-character key";
-  case KEY_SLEFT:
-    return "shifted left-arrow key";
-  case KEY_SMESSAGE:
-    return "shifted message key";
-  case KEY_SMOVE:
-    return "shifted move key";
-  case KEY_SNEXT:
-    return "shifted next key";
-  case KEY_SOPTIONS:
-    return "shifted options key";
-  case KEY_SPREVIOUS:
-    return "shifted previous key";
-  case KEY_SPRINT:
-    return "shifted print key";
-  case KEY_SREDO:
-    return "shifted redo key";
-  case KEY_SREPLACE:
-    return "shifted replace key";
-  case KEY_SRIGHT:
-    return "shifted right-arrow key";
-  case KEY_SRSUME:
-    return "shifted resume key";
-  case KEY_SSAVE:
-    return "shifted save key";
-  case KEY_SSUSPEND:
-    return "shifted suspend key";
-  case KEY_SUNDO:
-    return "shifted undo key";
-  case KEY_SUSPEND:
-    return "suspend key";
-  case KEY_UNDO:
-    return "undo key";
-  case KEY_MOUSE:
-    return "Mouse event has occurred";
-  case KEY_RESIZE:
-    return "Terminal resize event";
-#ifdef KEY_EVENT
-  case KEY_EVENT:
-    return "We were interrupted by an event";
-#endif
-  case KEY_RETURN:
-    return "return";
-  case ' ':
-    return "space";
-  case '\t':
-    return "tab";
-  case KEY_ESCAPE:
-    return "escape";
-  default:
-    if (isprint(ch))
-      snprintf(g_desc, sizeof(g_desc), "%c", ch);
-    else
-      snprintf(g_desc, sizeof(g_desc), "\\x%2.2x", ch);
-    return g_desc;
-  }
-  return nullptr;
-}
-
-HelpDialogDelegate::HelpDialogDelegate(const char *text,
-                                       KeyHelp *key_help_array)
-    : m_text(), m_first_visible_line(0) {
-  if (text && text[0]) {
-    m_text.SplitIntoLines(text);
-    m_text.AppendString("");
-  }
-  if (key_help_array) {
-    for (KeyHelp *key = key_help_array; key->ch; ++key) {
-      StreamString key_description;
-      key_description.Printf("%10s - %s", CursesKeyToCString(key->ch),
-                             key->description);
-      m_text.AppendString(key_description.GetString());
-    }
-  }
-}
-
-HelpDialogDelegate::~HelpDialogDelegate() = default;
-
-bool HelpDialogDelegate::WindowDelegateDraw(Window &window, bool force) {
-  window.Erase();
-  const int window_height = window.GetHeight();
-  int x = 2;
-  int y = 1;
-  const int min_y = y;
-  const int max_y = window_height - 1 - y;
-  const size_t num_visible_lines = max_y - min_y + 1;
-  const size_t num_lines = m_text.GetSize();
-  const char *bottom_message;
-  if (num_lines <= num_visible_lines)
-    bottom_message = "Press any key to exit";
-  else
-    bottom_message = "Use arrows to scroll, any other key to exit";
-  window.DrawTitleBox(window.GetName(), bottom_message);
-  while (y <= max_y) {
-    window.MoveCursor(x, y);
-    window.PutCStringTruncated(
-        m_text.GetStringAtIndex(m_first_visible_line + y - min_y), 1);
-    ++y;
-  }
-  return true;
-}
-
-HandleCharResult HelpDialogDelegate::WindowDelegateHandleChar(Window &window,
-                                                              int key) {
-  bool done = false;
-  const size_t num_lines = m_text.GetSize();
-  const size_t num_visible_lines = window.GetHeight() - 2;
-
-  if (num_lines <= num_visible_lines) {
-    done = true;
-    // If we have all lines visible and don't need scrolling, then any key
-    // press will cause us to exit
-  } else {
-    switch (key) {
-    case KEY_UP:
-      if (m_first_visible_line > 0)
-        --m_first_visible_line;
-      break;
-
-    case KEY_DOWN:
-      if (m_first_visible_line + num_visible_lines < num_lines)
-        ++m_first_visible_line;
-      break;
-
-    case KEY_PPAGE:
-    case ',':
-      if (m_first_visible_line > 0) {
-        if (static_cast<size_t>(m_first_visible_line) >= num_visible_lines)
-          m_first_visible_line -= num_visible_lines;
-        else
-          m_first_visible_line = 0;
-      }
-      break;
-
-    case KEY_NPAGE:
-    case '.':
-      if (m_first_visible_line + num_visible_lines < num_lines) {
-        m_first_visible_line += num_visible_lines;
-        if (static_cast<size_t>(m_first_visible_line) > num_lines)
-          m_first_visible_line = num_lines - num_visible_lines;
-      }
-      break;
-
-    default:
-      done = true;
-      break;
-    }
-  }
-  if (done)
-    window.GetParent()->RemoveSubWindow(&window);
-  return eKeyHandled;
-}
-
-class ApplicationDelegate : public WindowDelegate, public MenuDelegate {
-public:
-  enum {
-    eMenuID_LLDB = 1,
-    eMenuID_LLDBAbout,
-    eMenuID_LLDBExit,
-
-    eMenuID_Target,
-    eMenuID_TargetCreate,
-    eMenuID_TargetDelete,
-
-    eMenuID_Process,
-    eMenuID_ProcessAttach,
-    eMenuID_ProcessDetach,
-    eMenuID_ProcessLaunch,
-    eMenuID_ProcessContinue,
-    eMenuID_ProcessHalt,
-    eMenuID_ProcessKill,
-
-    eMenuID_Thread,
-    eMenuID_ThreadStepIn,
-    eMenuID_ThreadStepOver,
-    eMenuID_ThreadStepOut,
-
-    eMenuID_View,
-    eMenuID_ViewBacktrace,
-    eMenuID_ViewRegisters,
-    eMenuID_ViewSource,
-    eMenuID_ViewVariables,
-
-    eMenuID_Help,
-    eMenuID_HelpGUIHelp
-  };
-
-  ApplicationDelegate(Application &app, Debugger &debugger)
-      : WindowDelegate(), MenuDelegate(), m_app(app), m_debugger(debugger) {}
-
-  ~ApplicationDelegate() override = default;
-
-  bool WindowDelegateDraw(Window &window, bool force) override {
-    return false; // Drawing not handled, let standard window drawing happen
-  }
-
-  HandleCharResult WindowDelegateHandleChar(Window &window, int key) override {
-    switch (key) {
-    case '\t':
-      window.SelectNextWindowAsActive();
-      return eKeyHandled;
-
-    case 'h':
-      window.CreateHelpSubwindow();
-      return eKeyHandled;
-
-    case KEY_ESCAPE:
-      return eQuitApplication;
-
-    default:
-      break;
-    }
-    return eKeyNotHandled;
-  }
-
-  const char *WindowDelegateGetHelpText() override {
-    return "Welcome to the LLDB curses GUI.\n\n"
-           "Press the TAB key to change the selected view.\n"
-           "Each view has its own keyboard shortcuts, press 'h' to open a "
-           "dialog to display them.\n\n"
-           "Common key bindings for all views:";
-  }
-
-  KeyHelp *WindowDelegateGetKeyHelp() override {
-    static curses::KeyHelp g_source_view_key_help[] = {
-        {'\t', "Select next view"},
-        {'h', "Show help dialog with view specific key bindings"},
-        {',', "Page up"},
-        {'.', "Page down"},
-        {KEY_UP, "Select previous"},
-        {KEY_DOWN, "Select next"},
-        {KEY_LEFT, "Unexpand or select parent"},
-        {KEY_RIGHT, "Expand"},
-        {KEY_PPAGE, "Page up"},
-        {KEY_NPAGE, "Page down"},
-        {'\0', nullptr}};
-    return g_source_view_key_help;
-  }
-
-  MenuActionResult MenuDelegateAction(Menu &menu) override {
-    switch (menu.GetIdentifier()) {
-    case eMenuID_ThreadStepIn: {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasThreadScope()) {
-        Process *process = exe_ctx.GetProcessPtr();
-        if (process && process->IsAlive() &&
-            StateIsStoppedState(process->GetState(), true))
-          exe_ctx.GetThreadRef().StepIn(true);
-      }
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_ThreadStepOut: {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasThreadScope()) {
-        Process *process = exe_ctx.GetProcessPtr();
-        if (process && process->IsAlive() &&
-            StateIsStoppedState(process->GetState(), true))
-          exe_ctx.GetThreadRef().StepOut();
-      }
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_ThreadStepOver: {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasThreadScope()) {
-        Process *process = exe_ctx.GetProcessPtr();
-        if (process && process->IsAlive() &&
-            StateIsStoppedState(process->GetState(), true))
-          exe_ctx.GetThreadRef().StepOver(true);
-      }
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_ProcessContinue: {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasProcessScope()) {
-        Process *process = exe_ctx.GetProcessPtr();
-        if (process && process->IsAlive() &&
-            StateIsStoppedState(process->GetState(), true))
-          process->Resume();
-      }
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_ProcessKill: {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasProcessScope()) {
-        Process *process = exe_ctx.GetProcessPtr();
-        if (process && process->IsAlive())
-          process->Destroy(false);
-      }
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_ProcessHalt: {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasProcessScope()) {
-        Process *process = exe_ctx.GetProcessPtr();
-        if (process && process->IsAlive())
-          process->Halt();
-      }
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_ProcessDetach: {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasProcessScope()) {
-        Process *process = exe_ctx.GetProcessPtr();
-        if (process && process->IsAlive())
-          process->Detach(false);
-      }
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_Process: {
-      // Populate the menu with all of the threads if the process is stopped
-      // when the Process menu gets selected and is about to display its
-      // submenu.
-      Menus &submenus = menu.GetSubmenus();
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      Process *process = exe_ctx.GetProcessPtr();
-      if (process && process->IsAlive() &&
-          StateIsStoppedState(process->GetState(), true)) {
-        if (submenus.size() == 7)
-          menu.AddSubmenu(MenuSP(new Menu(Menu::Type::Separator)));
-        else if (submenus.size() > 8)
-          submenus.erase(submenus.begin() + 8, submenus.end());
-
-        ThreadList &threads = process->GetThreadList();
-        std::lock_guard<std::recursive_mutex> guard(threads.GetMutex());
-        size_t num_threads = threads.GetSize();
-        for (size_t i = 0; i < num_threads; ++i) {
-          ThreadSP thread_sp = threads.GetThreadAtIndex(i);
-          char menu_char = '\0';
-          if (i < 9)
-            menu_char = '1' + i;
-          StreamString thread_menu_title;
-          thread_menu_title.Printf("Thread %u", thread_sp->GetIndexID());
-          const char *thread_name = thread_sp->GetName();
-          if (thread_name && thread_name[0])
-            thread_menu_title.Printf(" %s", thread_name);
-          else {
-            const char *queue_name = thread_sp->GetQueueName();
-            if (queue_name && queue_name[0])
-              thread_menu_title.Printf(" %s", queue_name);
-          }
-          menu.AddSubmenu(
-              MenuSP(new Menu(thread_menu_title.GetString().str().c_str(),
-                              nullptr, menu_char, thread_sp->GetID())));
-        }
-      } else if (submenus.size() > 7) {
-        // Remove the separator and any other thread submenu items that were
-        // previously added
-        submenus.erase(submenus.begin() + 7, submenus.end());
-      }
-      // Since we are adding and removing items we need to recalculate the name
-      // lengths
-      menu.RecalculateNameLengths();
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_ViewVariables: {
-      WindowSP main_window_sp = m_app.GetMainWindow();
-      WindowSP source_window_sp = main_window_sp->FindSubWindow("Source");
-      WindowSP variables_window_sp = main_window_sp->FindSubWindow("Variables");
-      WindowSP registers_window_sp = main_window_sp->FindSubWindow("Registers");
-      const Rect source_bounds = source_window_sp->GetBounds();
-
-      if (variables_window_sp) {
-        const Rect variables_bounds = variables_window_sp->GetBounds();
-
-        main_window_sp->RemoveSubWindow(variables_window_sp.get());
-
-        if (registers_window_sp) {
-          // We have a registers window, so give all the area back to the
-          // registers window
-          Rect registers_bounds = variables_bounds;
-          registers_bounds.size.width = source_bounds.size.width;
-          registers_window_sp->SetBounds(registers_bounds);
-        } else {
-          // We have no registers window showing so give the bottom area back
-          // to the source view
-          source_window_sp->Resize(source_bounds.size.width,
-                                   source_bounds.size.height +
-                                       variables_bounds.size.height);
-        }
-      } else {
-        Rect new_variables_rect;
-        if (registers_window_sp) {
-          // We have a registers window so split the area of the registers
-          // window into two columns where the left hand side will be the
-          // variables and the right hand side will be the registers
-          const Rect variables_bounds = registers_window_sp->GetBounds();
-          Rect new_registers_rect;
-          variables_bounds.VerticalSplitPercentage(0.50, new_variables_rect,
-                                                   new_registers_rect);
-          registers_window_sp->SetBounds(new_registers_rect);
-        } else {
-          // No variables window, grab the bottom part of the source window
-          Rect new_source_rect;
-          source_bounds.HorizontalSplitPercentage(0.70, new_source_rect,
-                                                  new_variables_rect);
-          source_window_sp->SetBounds(new_source_rect);
-        }
-        WindowSP new_window_sp = main_window_sp->CreateSubWindow(
-            "Variables", new_variables_rect, false);
-        new_window_sp->SetDelegate(
-            WindowDelegateSP(new FrameVariablesWindowDelegate(m_debugger)));
-      }
-      touchwin(stdscr);
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_ViewRegisters: {
-      WindowSP main_window_sp = m_app.GetMainWindow();
-      WindowSP source_window_sp = main_window_sp->FindSubWindow("Source");
-      WindowSP variables_window_sp = main_window_sp->FindSubWindow("Variables");
-      WindowSP registers_window_sp = main_window_sp->FindSubWindow("Registers");
-      const Rect source_bounds = source_window_sp->GetBounds();
-
-      if (registers_window_sp) {
-        if (variables_window_sp) {
-          const Rect variables_bounds = variables_window_sp->GetBounds();
-
-          // We have a variables window, so give all the area back to the
-          // variables window
-          variables_window_sp->Resize(variables_bounds.size.width +
-                                          registers_window_sp->GetWidth(),
-                                      variables_bounds.size.height);
-        } else {
-          // We have no variables window showing so give the bottom area back
-          // to the source view
-          source_window_sp->Resize(source_bounds.size.width,
-                                   source_bounds.size.height +
-                                       registers_window_sp->GetHeight());
-        }
-        main_window_sp->RemoveSubWindow(registers_window_sp.get());
-      } else {
-        Rect new_regs_rect;
-        if (variables_window_sp) {
-          // We have a variables window, split it into two columns where the
-          // left hand side will be the variables and the right hand side will
-          // be the registers
-          const Rect variables_bounds = variables_window_sp->GetBounds();
-          Rect new_vars_rect;
-          variables_bounds.VerticalSplitPercentage(0.50, new_vars_rect,
-                                                   new_regs_rect);
-          variables_window_sp->SetBounds(new_vars_rect);
-        } else {
-          // No registers window, grab the bottom part of the source window
-          Rect new_source_rect;
-          source_bounds.HorizontalSplitPercentage(0.70, new_source_rect,
-                                                  new_regs_rect);
-          source_window_sp->SetBounds(new_source_rect);
-        }
-        WindowSP new_window_sp =
-            main_window_sp->CreateSubWindow("Registers", new_regs_rect, false);
-        new_window_sp->SetDelegate(
-            WindowDelegateSP(new RegistersWindowDelegate(m_debugger)));
-      }
-      touchwin(stdscr);
-    }
-      return MenuActionResult::Handled;
-
-    case eMenuID_HelpGUIHelp:
-      m_app.GetMainWindow()->CreateHelpSubwindow();
-      return MenuActionResult::Handled;
-
-    default:
-      break;
-    }
-
-    return MenuActionResult::NotHandled;
-  }
-
-protected:
-  Application &m_app;
-  Debugger &m_debugger;
-};
-
-class StatusBarWindowDelegate : public WindowDelegate {
-public:
-  StatusBarWindowDelegate(Debugger &debugger) : m_debugger(debugger) {
-    FormatEntity::Parse("Thread: ${thread.id%tid}", m_format);
-  }
-
-  ~StatusBarWindowDelegate() override = default;
-
-  bool WindowDelegateDraw(Window &window, bool force) override {
-    ExecutionContext exe_ctx =
-        m_debugger.GetCommandInterpreter().GetExecutionContext();
-    Process *process = exe_ctx.GetProcessPtr();
-    Thread *thread = exe_ctx.GetThreadPtr();
-    StackFrame *frame = exe_ctx.GetFramePtr();
-    window.Erase();
-    window.SetBackground(2);
-    window.MoveCursor(0, 0);
-    if (process) {
-      const StateType state = process->GetState();
-      window.Printf("Process: %5" PRIu64 " %10s", process->GetID(),
-                    StateAsCString(state));
-
-      if (StateIsStoppedState(state, true)) {
-        StreamString strm;
-        if (thread && FormatEntity::Format(m_format, strm, nullptr, &exe_ctx,
-                                           nullptr, nullptr, false, false)) {
-          window.MoveCursor(40, 0);
-          window.PutCStringTruncated(strm.GetString().str().c_str(), 1);
-        }
-
-        window.MoveCursor(60, 0);
-        if (frame)
-          window.Printf("Frame: %3u  PC = 0x%16.16" PRIx64,
-                        frame->GetFrameIndex(),
-                        frame->GetFrameCodeAddress().GetOpcodeLoadAddress(
-                            exe_ctx.GetTargetPtr()));
-      } else if (state == eStateExited) {
-        const char *exit_desc = process->GetExitDescription();
-        const int exit_status = process->GetExitStatus();
-        if (exit_desc && exit_desc[0])
-          window.Printf(" with status = %i (%s)", exit_status, exit_desc);
-        else
-          window.Printf(" with status = %i", exit_status);
-      }
-    }
-    window.DeferredRefresh();
-    return true;
-  }
-
-protected:
-  Debugger &m_debugger;
-  FormatEntity::Entry m_format;
-};
-
-class SourceFileWindowDelegate : public WindowDelegate {
-public:
-  SourceFileWindowDelegate(Debugger &debugger)
-      : WindowDelegate(), m_debugger(debugger), m_sc(), m_file_sp(),
-        m_disassembly_scope(nullptr), m_disassembly_sp(), m_disassembly_range(),
-        m_title(), m_line_width(4), m_selected_line(0), m_pc_line(0),
-        m_stop_id(0), m_frame_idx(UINT32_MAX), m_first_visible_line(0),
-        m_min_x(0), m_min_y(0), m_max_x(0), m_max_y(0) {}
-
-  ~SourceFileWindowDelegate() override = default;
-
-  void Update(const SymbolContext &sc) { m_sc = sc; }
-
-  uint32_t NumVisibleLines() const { return m_max_y - m_min_y; }
-
-  const char *WindowDelegateGetHelpText() override {
-    return "Source/Disassembly window keyboard shortcuts:";
-  }
-
-  KeyHelp *WindowDelegateGetKeyHelp() override {
-    static curses::KeyHelp g_source_view_key_help[] = {
-        {KEY_RETURN, "Run to selected line with one shot breakpoint"},
-        {KEY_UP, "Select previous source line"},
-        {KEY_DOWN, "Select next source line"},
-        {KEY_PPAGE, "Page up"},
-        {KEY_NPAGE, "Page down"},
-        {'b', "Set breakpoint on selected source/disassembly line"},
-        {'c', "Continue process"},
-        {'d', "Detach and resume process"},
-        {'D', "Detach with process suspended"},
-        {'h', "Show help dialog"},
-        {'k', "Kill process"},
-        {'n', "Step over (source line)"},
-        {'N', "Step over (single instruction)"},
-        {'o', "Step out"},
-        {'s', "Step in (source line)"},
-        {'S', "Step in (single instruction)"},
-        {',', "Page up"},
-        {'.', "Page down"},
-        {'\0', nullptr}};
-    return g_source_view_key_help;
-  }
-
-  bool WindowDelegateDraw(Window &window, bool force) override {
-    ExecutionContext exe_ctx =
-        m_debugger.GetCommandInterpreter().GetExecutionContext();
-    Process *process = exe_ctx.GetProcessPtr();
-    Thread *thread = nullptr;
-
-    bool update_location = false;
-    if (process) {
-      StateType state = process->GetState();
-      if (StateIsStoppedState(state, true)) {
-        // We are stopped, so it is ok to
-        update_location = true;
-      }
-    }
-
-    m_min_x = 1;
-    m_min_y = 2;
-    m_max_x = window.GetMaxX() - 1;
-    m_max_y = window.GetMaxY() - 1;
-
-    const uint32_t num_visible_lines = NumVisibleLines();
-    StackFrameSP frame_sp;
-    bool set_selected_line_to_pc = false;
-
-    if (update_location) {
-      const bool process_alive = process ? process->IsAlive() : false;
-      bool thread_changed = false;
-      if (process_alive) {
-        thread = exe_ctx.GetThreadPtr();
-        if (thread) {
-          frame_sp = thread->GetSelectedFrame();
-          auto tid = thread->GetID();
-          thread_changed = tid != m_tid;
-          m_tid = tid;
-        } else {
-          if (m_tid != LLDB_INVALID_THREAD_ID) {
-            thread_changed = true;
-            m_tid = LLDB_INVALID_THREAD_ID;
-          }
-        }
-      }
-      const uint32_t stop_id = process ? process->GetStopID() : 0;
-      const bool stop_id_changed = stop_id != m_stop_id;
-      bool frame_changed = false;
-      m_stop_id = stop_id;
-      m_title.Clear();
-      if (frame_sp) {
-        m_sc = frame_sp->GetSymbolContext(eSymbolContextEverything);
-        if (m_sc.module_sp) {
-          m_title.Printf(
-              "%s", m_sc.module_sp->GetFileSpec().GetFilename().GetCString());
-          ConstString func_name = m_sc.GetFunctionName();
-          if (func_name)
-            m_title.Printf("`%s", func_name.GetCString());
-        }
-        const uint32_t frame_idx = frame_sp->GetFrameIndex();
-        frame_changed = frame_idx != m_frame_idx;
-        m_frame_idx = frame_idx;
-      } else {
-        m_sc.Clear(true);
-        frame_changed = m_frame_idx != UINT32_MAX;
-        m_frame_idx = UINT32_MAX;
-      }
-
-      const bool context_changed =
-          thread_changed || frame_changed || stop_id_changed;
-
-      if (process_alive) {
-        if (m_sc.line_entry.IsValid()) {
-          m_pc_line = m_sc.line_entry.line;
-          if (m_pc_line != UINT32_MAX)
-            --m_pc_line; // Convert to zero based line number...
-          // Update the selected line if the stop ID changed...
-          if (context_changed)
-            m_selected_line = m_pc_line;
-
-          if (m_file_sp && m_file_sp->FileSpecMatches(m_sc.line_entry.file)) {
-            // Same file, nothing to do, we should either have the lines or not
-            // (source file missing)
-            if (m_selected_line >= static_cast<size_t>(m_first_visible_line)) {
-              if (m_selected_line >= m_first_visible_line + num_visible_lines)
-                m_first_visible_line = m_selected_line - 10;
-            } else {
-              if (m_selected_line > 10)
-                m_first_visible_line = m_selected_line - 10;
-              else
-                m_first_visible_line = 0;
-            }
-          } else {
-            // File changed, set selected line to the line with the PC
-            m_selected_line = m_pc_line;
-            m_file_sp =
-                m_debugger.GetSourceManager().GetFile(m_sc.line_entry.file);
-            if (m_file_sp) {
-              const size_t num_lines = m_file_sp->GetNumLines();
-              m_line_width = 1;
-              for (size_t n = num_lines; n >= 10; n = n / 10)
-                ++m_line_width;
-
-              if (num_lines < num_visible_lines ||
-                  m_selected_line < num_visible_lines)
-                m_first_visible_line = 0;
-              else
-                m_first_visible_line = m_selected_line - 10;
-            }
-          }
-        } else {
-          m_file_sp.reset();
-        }
-
-        if (!m_file_sp || m_file_sp->GetNumLines() == 0) {
-          // Show disassembly
-          bool prefer_file_cache = false;
-          if (m_sc.function) {
-            if (m_disassembly_scope != m_sc.function) {
-              m_disassembly_scope = m_sc.function;
-              m_disassembly_sp = m_sc.function->GetInstructions(
-                  exe_ctx, nullptr, prefer_file_cache);
-              if (m_disassembly_sp) {
-                set_selected_line_to_pc = true;
-                m_disassembly_range = m_sc.function->GetAddressRange();
-              } else {
-                m_disassembly_range.Clear();
-              }
-            } else {
-              set_selected_line_to_pc = context_changed;
-            }
-          } else if (m_sc.symbol) {
-            if (m_disassembly_scope != m_sc.symbol) {
-              m_disassembly_scope = m_sc.symbol;
-              m_disassembly_sp = m_sc.symbol->GetInstructions(
-                  exe_ctx, nullptr, prefer_file_cache);
-              if (m_disassembly_sp) {
-                set_selected_line_to_pc = true;
-                m_disassembly_range.GetBaseAddress() =
-                    m_sc.symbol->GetAddress();
-                m_disassembly_range.SetByteSize(m_sc.symbol->GetByteSize());
-              } else {
-                m_disassembly_range.Clear();
-              }
-            } else {
-              set_selected_line_to_pc = context_changed;
-            }
-          }
-        }
-      } else {
-        m_pc_line = UINT32_MAX;
-      }
-    }
-
-    const int window_width = window.GetWidth();
-    window.Erase();
-    window.DrawTitleBox("Sources");
-    if (!m_title.GetString().empty()) {
-      window.AttributeOn(A_REVERSE);
-      window.MoveCursor(1, 1);
-      window.PutChar(' ');
-      window.PutCStringTruncated(m_title.GetString().str().c_str(), 1);
-      int x = window.GetCursorX();
-      if (x < window_width - 1) {
-        window.Printf("%*s", window_width - x - 1, "");
-      }
-      window.AttributeOff(A_REVERSE);
-    }
-
-    Target *target = exe_ctx.GetTargetPtr();
-    const size_t num_source_lines = GetNumSourceLines();
-    if (num_source_lines > 0) {
-      // Display source
-      BreakpointLines bp_lines;
-      if (target) {
-        BreakpointList &bp_list = target->GetBreakpointList();
-        const size_t num_bps = bp_list.GetSize();
-        for (size_t bp_idx = 0; bp_idx < num_bps; ++bp_idx) {
-          BreakpointSP bp_sp = bp_list.GetBreakpointAtIndex(bp_idx);
-          const size_t num_bps_locs = bp_sp->GetNumLocations();
-          for (size_t bp_loc_idx = 0; bp_loc_idx < num_bps_locs; ++bp_loc_idx) {
-            BreakpointLocationSP bp_loc_sp =
-                bp_sp->GetLocationAtIndex(bp_loc_idx);
-            LineEntry bp_loc_line_entry;
-            if (bp_loc_sp->GetAddress().CalculateSymbolContextLineEntry(
-                    bp_loc_line_entry)) {
-              if (m_file_sp->GetFileSpec() == bp_loc_line_entry.file) {
-                bp_lines.insert(bp_loc_line_entry.line);
-              }
-            }
-          }
-        }
-      }
-
-      const attr_t selected_highlight_attr = A_REVERSE;
-      const attr_t pc_highlight_attr = COLOR_PAIR(1);
-
-      for (size_t i = 0; i < num_visible_lines; ++i) {
-        const uint32_t curr_line = m_first_visible_line + i;
-        if (curr_line < num_source_lines) {
-          const int line_y = m_min_y + i;
-          window.MoveCursor(1, line_y);
-          const bool is_pc_line = curr_line == m_pc_line;
-          const bool line_is_selected = m_selected_line == curr_line;
-          // Highlight the line as the PC line first, then if the selected line
-          // isn't the same as the PC line, highlight it differently
-          attr_t highlight_attr = 0;
-          attr_t bp_attr = 0;
-          if (is_pc_line)
-            highlight_attr = pc_highlight_attr;
-          else if (line_is_selected)
-            highlight_attr = selected_highlight_attr;
-
-          if (bp_lines.find(curr_line + 1) != bp_lines.end())
-            bp_attr = COLOR_PAIR(2);
-
-          if (bp_attr)
-            window.AttributeOn(bp_attr);
-
-          window.Printf(" %*u ", m_line_width, curr_line + 1);
-
-          if (bp_attr)
-            window.AttributeOff(bp_attr);
-
-          window.PutChar(ACS_VLINE);
-          // Mark the line with the PC with a diamond
-          if (is_pc_line)
-            window.PutChar(ACS_DIAMOND);
-          else
-            window.PutChar(' ');
-
-          if (highlight_attr)
-            window.AttributeOn(highlight_attr);
-          const uint32_t line_len =
-              m_file_sp->GetLineLength(curr_line + 1, false);
-          if (line_len > 0)
-            window.PutCString(m_file_sp->PeekLineData(curr_line + 1), line_len);
-
-          if (is_pc_line && frame_sp &&
-              frame_sp->GetConcreteFrameIndex() == 0) {
-            StopInfoSP stop_info_sp;
-            if (thread)
-              stop_info_sp = thread->GetStopInfo();
-            if (stop_info_sp) {
-              const char *stop_description = stop_info_sp->GetDescription();
-              if (stop_description && stop_description[0]) {
-                size_t stop_description_len = strlen(stop_description);
-                int desc_x = window_width - stop_description_len - 16;
-                window.Printf("%*s", desc_x - window.GetCursorX(), "");
-                // window.MoveCursor(window_width - stop_description_len - 15,
-                // line_y);
-                window.Printf("<<< Thread %u: %s ", thread->GetIndexID(),
-                              stop_description);
-              }
-            } else {
-              window.Printf("%*s", window_width - window.GetCursorX() - 1, "");
-            }
-          }
-          if (highlight_attr)
-            window.AttributeOff(highlight_attr);
-        } else {
-          break;
-        }
-      }
-    } else {
-      size_t num_disassembly_lines = GetNumDisassemblyLines();
-      if (num_disassembly_lines > 0) {
-        // Display disassembly
-        BreakpointAddrs bp_file_addrs;
-        Target *target = exe_ctx.GetTargetPtr();
-        if (target) {
-          BreakpointList &bp_list = target->GetBreakpointList();
-          const size_t num_bps = bp_list.GetSize();
-          for (size_t bp_idx = 0; bp_idx < num_bps; ++bp_idx) {
-            BreakpointSP bp_sp = bp_list.GetBreakpointAtIndex(bp_idx);
-            const size_t num_bps_locs = bp_sp->GetNumLocations();
-            for (size_t bp_loc_idx = 0; bp_loc_idx < num_bps_locs;
-                 ++bp_loc_idx) {
-              BreakpointLocationSP bp_loc_sp =
-                  bp_sp->GetLocationAtIndex(bp_loc_idx);
-              LineEntry bp_loc_line_entry;
-              const lldb::addr_t file_addr =
-                  bp_loc_sp->GetAddress().GetFileAddress();
-              if (file_addr != LLDB_INVALID_ADDRESS) {
-                if (m_disassembly_range.ContainsFileAddress(file_addr))
-                  bp_file_addrs.insert(file_addr);
-              }
-            }
-          }
-        }
-
-        const attr_t selected_highlight_attr = A_REVERSE;
-        const attr_t pc_highlight_attr = COLOR_PAIR(1);
-
-        StreamString strm;
-
-        InstructionList &insts = m_disassembly_sp->GetInstructionList();
-        Address pc_address;
-
-        if (frame_sp)
-          pc_address = frame_sp->GetFrameCodeAddress();
-        const uint32_t pc_idx =
-            pc_address.IsValid()
-                ? insts.GetIndexOfInstructionAtAddress(pc_address)
-                : UINT32_MAX;
-        if (set_selected_line_to_pc) {
-          m_selected_line = pc_idx;
-        }
-
-        const uint32_t non_visible_pc_offset = (num_visible_lines / 5);
-        if (static_cast<size_t>(m_first_visible_line) >= num_disassembly_lines)
-          m_first_visible_line = 0;
-
-        if (pc_idx < num_disassembly_lines) {
-          if (pc_idx < static_cast<uint32_t>(m_first_visible_line) ||
-              pc_idx >= m_first_visible_line + num_visible_lines)
-            m_first_visible_line = pc_idx - non_visible_pc_offset;
-        }
-
-        for (size_t i = 0; i < num_visible_lines; ++i) {
-          const uint32_t inst_idx = m_first_visible_line + i;
-          Instruction *inst = insts.GetInstructionAtIndex(inst_idx).get();
-          if (!inst)
-            break;
-
-          const int line_y = m_min_y + i;
-          window.MoveCursor(1, line_y);
-          const bool is_pc_line = frame_sp && inst_idx == pc_idx;
-          const bool line_is_selected = m_selected_line == inst_idx;
-          // Highlight the line as the PC line first, then if the selected line
-          // isn't the same as the PC line, highlight it differently
-          attr_t highlight_attr = 0;
-          attr_t bp_attr = 0;
-          if (is_pc_line)
-            highlight_attr = pc_highlight_attr;
-          else if (line_is_selected)
-            highlight_attr = selected_highlight_attr;
-
-          if (bp_file_addrs.find(inst->GetAddress().GetFileAddress()) !=
-              bp_file_addrs.end())
-            bp_attr = COLOR_PAIR(2);
-
-          if (bp_attr)
-            window.AttributeOn(bp_attr);
-
-          window.Printf(" 0x%16.16llx ",
-                        static_cast<unsigned long long>(
-                            inst->GetAddress().GetLoadAddress(target)));
-
-          if (bp_attr)
-            window.AttributeOff(bp_attr);
-
-          window.PutChar(ACS_VLINE);
-          // Mark the line with the PC with a diamond
-          if (is_pc_line)
-            window.PutChar(ACS_DIAMOND);
-          else
-            window.PutChar(' ');
-
-          if (highlight_attr)
-            window.AttributeOn(highlight_attr);
-
-          const char *mnemonic = inst->GetMnemonic(&exe_ctx);
-          const char *operands = inst->GetOperands(&exe_ctx);
-          const char *comment = inst->GetComment(&exe_ctx);
-
-          if (mnemonic != nullptr && mnemonic[0] == '\0')
-            mnemonic = nullptr;
-          if (operands != nullptr && operands[0] == '\0')
-            operands = nullptr;
-          if (comment != nullptr && comment[0] == '\0')
-            comment = nullptr;
-
-          strm.Clear();
-
-          if (mnemonic != nullptr && operands != nullptr && comment != nullptr)
-            strm.Printf("%-8s %-25s ; %s", mnemonic, operands, comment);
-          else if (mnemonic != nullptr && operands != nullptr)
-            strm.Printf("%-8s %s", mnemonic, operands);
-          else if (mnemonic != nullptr)
-            strm.Printf("%s", mnemonic);
-
-          int right_pad = 1;
-          window.PutCStringTruncated(strm.GetData(), right_pad);
-
-          if (is_pc_line && frame_sp &&
-              frame_sp->GetConcreteFrameIndex() == 0) {
-            StopInfoSP stop_info_sp;
-            if (thread)
-              stop_info_sp = thread->GetStopInfo();
-            if (stop_info_sp) {
-              const char *stop_description = stop_info_sp->GetDescription();
-              if (stop_description && stop_description[0]) {
-                size_t stop_description_len = strlen(stop_description);
-                int desc_x = window_width - stop_description_len - 16;
-                window.Printf("%*s", desc_x - window.GetCursorX(), "");
-                // window.MoveCursor(window_width - stop_description_len - 15,
-                // line_y);
-                window.Printf("<<< Thread %u: %s ", thread->GetIndexID(),
-                              stop_description);
-              }
-            } else {
-              window.Printf("%*s", window_width - window.GetCursorX() - 1, "");
-            }
-          }
-          if (highlight_attr)
-            window.AttributeOff(highlight_attr);
-        }
-      }
-    }
-    window.DeferredRefresh();
-    return true; // Drawing handled
-  }
-
-  size_t GetNumLines() {
-    size_t num_lines = GetNumSourceLines();
-    if (num_lines == 0)
-      num_lines = GetNumDisassemblyLines();
-    return num_lines;
-  }
-
-  size_t GetNumSourceLines() const {
-    if (m_file_sp)
-      return m_file_sp->GetNumLines();
-    return 0;
-  }
-
-  size_t GetNumDisassemblyLines() const {
-    if (m_disassembly_sp)
-      return m_disassembly_sp->GetInstructionList().GetSize();
-    return 0;
-  }
-
-  HandleCharResult WindowDelegateHandleChar(Window &window, int c) override {
-    const uint32_t num_visible_lines = NumVisibleLines();
-    const size_t num_lines = GetNumLines();
-
-    switch (c) {
-    case ',':
-    case KEY_PPAGE:
-      // Page up key
-      if (static_cast<uint32_t>(m_first_visible_line) > num_visible_lines)
-        m_first_visible_line -= num_visible_lines;
-      else
-        m_first_visible_line = 0;
-      m_selected_line = m_first_visible_line;
-      return eKeyHandled;
-
-    case '.':
-    case KEY_NPAGE:
-      // Page down key
-      {
-        if (m_first_visible_line + num_visible_lines < num_lines)
-          m_first_visible_line += num_visible_lines;
-        else if (num_lines < num_visible_lines)
-          m_first_visible_line = 0;
-        else
-          m_first_visible_line = num_lines - num_visible_lines;
-        m_selected_line = m_first_visible_line;
-      }
-      return eKeyHandled;
-
-    case KEY_UP:
-      if (m_selected_line > 0) {
-        m_selected_line--;
-        if (static_cast<size_t>(m_first_visible_line) > m_selected_line)
-          m_first_visible_line = m_selected_line;
-      }
-      return eKeyHandled;
-
-    case KEY_DOWN:
-      if (m_selected_line + 1 < num_lines) {
-        m_selected_line++;
-        if (m_first_visible_line + num_visible_lines < m_selected_line)
-          m_first_visible_line++;
-      }
-      return eKeyHandled;
-
-    case '\r':
-    case '\n':
-    case KEY_ENTER:
-      // Set a breakpoint and run to the line using a one shot breakpoint
-      if (GetNumSourceLines() > 0) {
-        ExecutionContext exe_ctx =
-            m_debugger.GetCommandInterpreter().GetExecutionContext();
-        if (exe_ctx.HasProcessScope() && exe_ctx.GetProcessRef().IsAlive()) {
-          BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint(
-              nullptr, // Don't limit the breakpoint to certain modules
-              m_file_sp->GetFileSpec(), // Source file
-              m_selected_line +
-                  1, // Source line number (m_selected_line is zero based)
-              0,     // Unspecified column.
-              0,     // No offset
-              eLazyBoolCalculate,  // Check inlines using global setting
-              eLazyBoolCalculate,  // Skip prologue using global setting,
-              false,               // internal
-              false,               // request_hardware
-              eLazyBoolCalculate); // move_to_nearest_code
-          // Make breakpoint one shot
-          bp_sp->GetOptions()->SetOneShot(true);
-          exe_ctx.GetProcessRef().Resume();
-        }
-      } else if (m_selected_line < GetNumDisassemblyLines()) {
-        const Instruction *inst = m_disassembly_sp->GetInstructionList()
-                                      .GetInstructionAtIndex(m_selected_line)
-                                      .get();
-        ExecutionContext exe_ctx =
-            m_debugger.GetCommandInterpreter().GetExecutionContext();
-        if (exe_ctx.HasTargetScope()) {
-          Address addr = inst->GetAddress();
-          BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint(
-              addr,   // lldb_private::Address
-              false,  // internal
-              false); // request_hardware
-          // Make breakpoint one shot
-          bp_sp->GetOptions()->SetOneShot(true);
-          exe_ctx.GetProcessRef().Resume();
-        }
-      }
-      return eKeyHandled;
-
-    case 'b': // 'b' == toggle breakpoint on currently selected line
-      if (m_selected_line < GetNumSourceLines()) {
-        ExecutionContext exe_ctx =
-            m_debugger.GetCommandInterpreter().GetExecutionContext();
-        if (exe_ctx.HasTargetScope()) {
-          BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint(
-              nullptr, // Don't limit the breakpoint to certain modules
-              m_file_sp->GetFileSpec(), // Source file
-              m_selected_line +
-                  1, // Source line number (m_selected_line is zero based)
-              0,     // No column specified.
-              0,     // No offset
-              eLazyBoolCalculate,  // Check inlines using global setting
-              eLazyBoolCalculate,  // Skip prologue using global setting,
-              false,               // internal
-              false,               // request_hardware
-              eLazyBoolCalculate); // move_to_nearest_code
-        }
-      } else if (m_selected_line < GetNumDisassemblyLines()) {
-        const Instruction *inst = m_disassembly_sp->GetInstructionList()
-                                      .GetInstructionAtIndex(m_selected_line)
-                                      .get();
-        ExecutionContext exe_ctx =
-            m_debugger.GetCommandInterpreter().GetExecutionContext();
-        if (exe_ctx.HasTargetScope()) {
-          Address addr = inst->GetAddress();
-          BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint(
-              addr,   // lldb_private::Address
-              false,  // internal
-              false); // request_hardware
-        }
-      }
-      return eKeyHandled;
-
-    case 'd': // 'd' == detach and let run
-    case 'D': // 'D' == detach and keep stopped
-    {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasProcessScope())
-        exe_ctx.GetProcessRef().Detach(c == 'D');
-    }
-      return eKeyHandled;
-
-    case 'k':
-      // 'k' == kill
-      {
-        ExecutionContext exe_ctx =
-            m_debugger.GetCommandInterpreter().GetExecutionContext();
-        if (exe_ctx.HasProcessScope())
-          exe_ctx.GetProcessRef().Destroy(false);
-      }
-      return eKeyHandled;
-
-    case 'c':
-      // 'c' == continue
-      {
-        ExecutionContext exe_ctx =
-            m_debugger.GetCommandInterpreter().GetExecutionContext();
-        if (exe_ctx.HasProcessScope())
-          exe_ctx.GetProcessRef().Resume();
-      }
-      return eKeyHandled;
-
-    case 'o':
-      // 'o' == step out
-      {
-        ExecutionContext exe_ctx =
-            m_debugger.GetCommandInterpreter().GetExecutionContext();
-        if (exe_ctx.HasThreadScope() &&
-            StateIsStoppedState(exe_ctx.GetProcessRef().GetState(), true)) {
-          exe_ctx.GetThreadRef().StepOut();
-        }
-      }
-      return eKeyHandled;
-
-    case 'n': // 'n' == step over
-    case 'N': // 'N' == step over instruction
-    {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasThreadScope() &&
-          StateIsStoppedState(exe_ctx.GetProcessRef().GetState(), true)) {
-        bool source_step = (c == 'n');
-        exe_ctx.GetThreadRef().StepOver(source_step);
-      }
-    }
-      return eKeyHandled;
-
-    case 's': // 's' == step into
-    case 'S': // 'S' == step into instruction
-    {
-      ExecutionContext exe_ctx =
-          m_debugger.GetCommandInterpreter().GetExecutionContext();
-      if (exe_ctx.HasThreadScope() &&
-          StateIsStoppedState(exe_ctx.GetProcessRef().GetState(), true)) {
-        bool source_step = (c == 's');
-        exe_ctx.GetThreadRef().StepIn(source_step);
-      }
-    }
-      return eKeyHandled;
-
-    case 'h':
-      window.CreateHelpSubwindow();
-      return eKeyHandled;
-
-    default:
-      break;
-    }
-    return eKeyNotHandled;
-  }
-
-protected:
-  typedef std::set<uint32_t> BreakpointLines;
-  typedef std::set<lldb::addr_t> BreakpointAddrs;
-
-  Debugger &m_debugger;
-  SymbolContext m_sc;
-  SourceManager::FileSP m_file_sp;
-  SymbolContextScope *m_disassembly_scope;
-  lldb::DisassemblerSP m_disassembly_sp;
-  AddressRange m_disassembly_range;
-  StreamString m_title;
-  lldb::user_id_t m_tid;
-  int m_line_width;
-  uint32_t m_selected_line; // The selected line
-  uint32_t m_pc_line;       // The line with the PC
-  uint32_t m_stop_id;
-  uint32_t m_frame_idx;
-  int m_first_visible_line;
-  int m_min_x;
-  int m_min_y;
-  int m_max_x;
-  int m_max_y;
-};
-
-DisplayOptions ValueObjectListDelegate::g_options = {true};
-
-IOHandlerCursesGUI::IOHandlerCursesGUI(Debugger &debugger)
-    : IOHandler(debugger, IOHandler::Type::Curses) {}
-
-void IOHandlerCursesGUI::Activate() {
-  IOHandler::Activate();
-  if (!m_app_ap) {
-    m_app_ap.reset(new Application(GetInputFILE(), GetOutputFILE()));
-
-    // This is both a window and a menu delegate
-    std::shared_ptr<ApplicationDelegate> app_delegate_sp(
-        new ApplicationDelegate(*m_app_ap, m_debugger));
-
-    MenuDelegateSP app_menu_delegate_sp =
-        std::static_pointer_cast<MenuDelegate>(app_delegate_sp);
-    MenuSP lldb_menu_sp(
-        new Menu("LLDB", "F1", KEY_F(1), ApplicationDelegate::eMenuID_LLDB));
-    MenuSP exit_menuitem_sp(
-        new Menu("Exit", nullptr, 'x', ApplicationDelegate::eMenuID_LLDBExit));
-    exit_menuitem_sp->SetCannedResult(MenuActionResult::Quit);
-    lldb_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "About LLDB", nullptr, 'a', ApplicationDelegate::eMenuID_LLDBAbout)));
-    lldb_menu_sp->AddSubmenu(MenuSP(new Menu(Menu::Type::Separator)));
-    lldb_menu_sp->AddSubmenu(exit_menuitem_sp);
-
-    MenuSP target_menu_sp(new Menu("Target", "F2", KEY_F(2),
-                                   ApplicationDelegate::eMenuID_Target));
-    target_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Create", nullptr, 'c', ApplicationDelegate::eMenuID_TargetCreate)));
-    target_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Delete", nullptr, 'd', ApplicationDelegate::eMenuID_TargetDelete)));
-
-    MenuSP process_menu_sp(new Menu("Process", "F3", KEY_F(3),
-                                    ApplicationDelegate::eMenuID_Process));
-    process_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Attach", nullptr, 'a', ApplicationDelegate::eMenuID_ProcessAttach)));
-    process_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Detach", nullptr, 'd', ApplicationDelegate::eMenuID_ProcessDetach)));
-    process_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Launch", nullptr, 'l', ApplicationDelegate::eMenuID_ProcessLaunch)));
-    process_menu_sp->AddSubmenu(MenuSP(new Menu(Menu::Type::Separator)));
-    process_menu_sp->AddSubmenu(
-        MenuSP(new Menu("Continue", nullptr, 'c',
-                        ApplicationDelegate::eMenuID_ProcessContinue)));
-    process_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Halt", nullptr, 'h', ApplicationDelegate::eMenuID_ProcessHalt)));
-    process_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Kill", nullptr, 'k', ApplicationDelegate::eMenuID_ProcessKill)));
-
-    MenuSP thread_menu_sp(new Menu("Thread", "F4", KEY_F(4),
-                                   ApplicationDelegate::eMenuID_Thread));
-    thread_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Step In", nullptr, 'i', ApplicationDelegate::eMenuID_ThreadStepIn)));
-    thread_menu_sp->AddSubmenu(
-        MenuSP(new Menu("Step Over", nullptr, 'v',
-                        ApplicationDelegate::eMenuID_ThreadStepOver)));
-    thread_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Step Out", nullptr, 'o', ApplicationDelegate::eMenuID_ThreadStepOut)));
-
-    MenuSP view_menu_sp(
-        new Menu("View", "F5", KEY_F(5), ApplicationDelegate::eMenuID_View));
-    view_menu_sp->AddSubmenu(
-        MenuSP(new Menu("Backtrace", nullptr, 'b',
-                        ApplicationDelegate::eMenuID_ViewBacktrace)));
-    view_menu_sp->AddSubmenu(
-        MenuSP(new Menu("Registers", nullptr, 'r',
-                        ApplicationDelegate::eMenuID_ViewRegisters)));
-    view_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "Source", nullptr, 's', ApplicationDelegate::eMenuID_ViewSource)));
-    view_menu_sp->AddSubmenu(
-        MenuSP(new Menu("Variables", nullptr, 'v',
-                        ApplicationDelegate::eMenuID_ViewVariables)));
-
-    MenuSP help_menu_sp(
-        new Menu("Help", "F6", KEY_F(6), ApplicationDelegate::eMenuID_Help));
-    help_menu_sp->AddSubmenu(MenuSP(new Menu(
-        "GUI Help", nullptr, 'g', ApplicationDelegate::eMenuID_HelpGUIHelp)));
-
-    m_app_ap->Initialize();
-    WindowSP &main_window_sp = m_app_ap->GetMainWindow();
-
-    MenuSP menubar_sp(new Menu(Menu::Type::Bar));
-    menubar_sp->AddSubmenu(lldb_menu_sp);
-    menubar_sp->AddSubmenu(target_menu_sp);
-    menubar_sp->AddSubmenu(process_menu_sp);
-    menubar_sp->AddSubmenu(thread_menu_sp);
-    menubar_sp->AddSubmenu(view_menu_sp);
-    menubar_sp->AddSubmenu(help_menu_sp);
-    menubar_sp->SetDelegate(app_menu_delegate_sp);
-
-    Rect content_bounds = main_window_sp->GetFrame();
-    Rect menubar_bounds = content_bounds.MakeMenuBar();
-    Rect status_bounds = content_bounds.MakeStatusBar();
-    Rect source_bounds;
-    Rect variables_bounds;
-    Rect threads_bounds;
-    Rect source_variables_bounds;
-    content_bounds.VerticalSplitPercentage(0.80, source_variables_bounds,
-                                           threads_bounds);
-    source_variables_bounds.HorizontalSplitPercentage(0.70, source_bounds,
-                                                      variables_bounds);
-
-    WindowSP menubar_window_sp =
-        main_window_sp->CreateSubWindow("Menubar", menubar_bounds, false);
-    // Let the menubar get keys if the active window doesn't handle the keys
-    // that are typed so it can respond to menubar key presses.
-    menubar_window_sp->SetCanBeActive(
-        false); // Don't let the menubar become the active window
-    menubar_window_sp->SetDelegate(menubar_sp);
-
-    WindowSP source_window_sp(
-        main_window_sp->CreateSubWindow("Source", source_bounds, true));
-    WindowSP variables_window_sp(
-        main_window_sp->CreateSubWindow("Variables", variables_bounds, false));
-    WindowSP threads_window_sp(
-        main_window_sp->CreateSubWindow("Threads", threads_bounds, false));
-    WindowSP status_window_sp(
-        main_window_sp->CreateSubWindow("Status", status_bounds, false));
-    status_window_sp->SetCanBeActive(
-        false); // Don't let the status bar become the active window
-    main_window_sp->SetDelegate(
-        std::static_pointer_cast<WindowDelegate>(app_delegate_sp));
-    source_window_sp->SetDelegate(
-        WindowDelegateSP(new SourceFileWindowDelegate(m_debugger)));
-    variables_window_sp->SetDelegate(
-        WindowDelegateSP(new FrameVariablesWindowDelegate(m_debugger)));
-    TreeDelegateSP thread_delegate_sp(new ThreadsTreeDelegate(m_debugger));
-    threads_window_sp->SetDelegate(WindowDelegateSP(
-        new TreeWindowDelegate(m_debugger, thread_delegate_sp)));
-    status_window_sp->SetDelegate(
-        WindowDelegateSP(new StatusBarWindowDelegate(m_debugger)));
-
-    // Show the main help window once the first time the curses GUI is launched
-    static bool g_showed_help = false;
-    if (!g_showed_help) {
-      g_showed_help = true;
-      main_window_sp->CreateHelpSubwindow();
-    }
-
-    init_pair(1, COLOR_WHITE, COLOR_BLUE);
-    init_pair(2, COLOR_BLACK, COLOR_WHITE);
-    init_pair(3, COLOR_MAGENTA, COLOR_WHITE);
-    init_pair(4, COLOR_MAGENTA, COLOR_BLACK);
-    init_pair(5, COLOR_RED, COLOR_BLACK);
-  }
-}
-
-void IOHandlerCursesGUI::Deactivate() { m_app_ap->Terminate(); }
-
-void IOHandlerCursesGUI::Run() {
-  m_app_ap->Run(m_debugger);
-  SetIsDone(true);
-}
-
-IOHandlerCursesGUI::~IOHandlerCursesGUI() = default;
-
-void IOHandlerCursesGUI::Cancel() {}
-
-bool IOHandlerCursesGUI::Interrupt() { return false; }
-
-void IOHandlerCursesGUI::GotEOF() {}
-
-#endif // LLDB_DISABLE_CURSES
diff --git a/src/llvm-project/lldb/source/Core/IOHandlerCursesGUI.cpp b/src/llvm-project/lldb/source/Core/IOHandlerCursesGUI.cpp
new file mode 100644
index 0000000..1661b46
--- /dev/null
+++ b/src/llvm-project/lldb/source/Core/IOHandlerCursesGUI.cpp
@@ -0,0 +1,4067 @@
+//===-- IOHandlerCursesGUI.cpp ----------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Core/IOHandlerCursesGUI.h"
+#include "lldb/Host/Config.h"
+
+#if LLDB_ENABLE_CURSES
+#include <curses.h>
+#include <panel.h>
+#endif
+
+#if defined(__APPLE__)
+#include <deque>
+#endif
+#include <string>
+
+#include "lldb/Core/Debugger.h"
+#include "lldb/Core/StreamFile.h"
+#include "lldb/Host/File.h"
+#include "lldb/Utility/Predicate.h"
+#include "lldb/Utility/Status.h"
+#include "lldb/Utility/StreamString.h"
+#include "lldb/Utility/StringList.h"
+#include "lldb/lldb-forward.h"
+
+#include "lldb/Interpreter/CommandCompletions.h"
+#include "lldb/Interpreter/CommandInterpreter.h"
+
+#if LLDB_ENABLE_CURSES
+#include "lldb/Breakpoint/BreakpointLocation.h"
+#include "lldb/Core/Module.h"
+#include "lldb/Core/ValueObject.h"
+#include "lldb/Core/ValueObjectRegister.h"
+#include "lldb/Symbol/Block.h"
+#include "lldb/Symbol/Function.h"
+#include "lldb/Symbol/Symbol.h"
+#include "lldb/Symbol/VariableList.h"
+#include "lldb/Target/Process.h"
+#include "lldb/Target/RegisterContext.h"
+#include "lldb/Target/StackFrame.h"
+#include "lldb/Target/StopInfo.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Target/Thread.h"
+#include "lldb/Utility/State.h"
+#endif
+
+#include "llvm/ADT/StringRef.h"
+
+#ifdef _WIN32
+#include "lldb/Host/windows/windows.h"
+#endif
+
+#include <memory>
+#include <mutex>
+
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <locale.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <string.h>
+#include <type_traits>
+
+using namespace lldb;
+using namespace lldb_private;
+using llvm::None;
+using llvm::Optional;
+using llvm::StringRef;
+
+// we may want curses to be disabled for some builds for instance, windows
+#if LLDB_ENABLE_CURSES
+
+#define KEY_RETURN 10
+#define KEY_ESCAPE 27
+
+namespace curses {
+class Menu;
+class MenuDelegate;
+class Window;
+class WindowDelegate;
+typedef std::shared_ptr<Menu> MenuSP;
+typedef std::shared_ptr<MenuDelegate> MenuDelegateSP;
+typedef std::shared_ptr<Window> WindowSP;
+typedef std::shared_ptr<WindowDelegate> WindowDelegateSP;
+typedef std::vector<MenuSP> Menus;
+typedef std::vector<WindowSP> Windows;
+typedef std::vector<WindowDelegateSP> WindowDelegates;
+
+#if 0
+type summary add -s "x=${var.x}, y=${var.y}" curses::Point
+type summary add -s "w=${var.width}, h=${var.height}" curses::Size
+type summary add -s "${var.origin%S} ${var.size%S}" curses::Rect
+#endif
+
+struct Point {
+  int x;
+  int y;
+
+  Point(int _x = 0, int _y = 0) : x(_x), y(_y) {}
+
+  void Clear() {
+    x = 0;
+    y = 0;
+  }
+
+  Point &operator+=(const Point &rhs) {
+    x += rhs.x;
+    y += rhs.y;
+    return *this;
+  }
+
+  void Dump() { printf("(x=%i, y=%i)\n", x, y); }
+};
+
+bool operator==(const Point &lhs, const Point &rhs) {
+  return lhs.x == rhs.x && lhs.y == rhs.y;
+}
+
+bool operator!=(const Point &lhs, const Point &rhs) {
+  return lhs.x != rhs.x || lhs.y != rhs.y;
+}
+
+struct Size {
+  int width;
+  int height;
+  Size(int w = 0, int h = 0) : width(w), height(h) {}
+
+  void Clear() {
+    width = 0;
+    height = 0;
+  }
+
+  void Dump() { printf("(w=%i, h=%i)\n", width, height); }
+};
+
+bool operator==(const Size &lhs, const Size &rhs) {
+  return lhs.width == rhs.width && lhs.height == rhs.height;
+}
+
+bool operator!=(const Size &lhs, const Size &rhs) {
+  return lhs.width != rhs.width || lhs.height != rhs.height;
+}
+
+struct Rect {
+  Point origin;
+  Size size;
+
+  Rect() : origin(), size() {}
+
+  Rect(const Point &p, const Size &s) : origin(p), size(s) {}
+
+  void Clear() {
+    origin.Clear();
+    size.Clear();
+  }
+
+  void Dump() {
+    printf("(x=%i, y=%i), w=%i, h=%i)\n", origin.x, origin.y, size.width,
+           size.height);
+  }
+
+  void Inset(int w, int h) {
+    if (size.width > w * 2)
+      size.width -= w * 2;
+    origin.x += w;
+
+    if (size.height > h * 2)
+      size.height -= h * 2;
+    origin.y += h;
+  }
+
+  // Return a status bar rectangle which is the last line of this rectangle.
+  // This rectangle will be modified to not include the status bar area.
+  Rect MakeStatusBar() {
+    Rect status_bar;
+    if (size.height > 1) {
+      status_bar.origin.x = origin.x;
+      status_bar.origin.y = size.height;
+      status_bar.size.width = size.width;
+      status_bar.size.height = 1;
+      --size.height;
+    }
+    return status_bar;
+  }
+
+  // Return a menubar rectangle which is the first line of this rectangle. This
+  // rectangle will be modified to not include the menubar area.
+  Rect MakeMenuBar() {
+    Rect menubar;
+    if (size.height > 1) {
+      menubar.origin.x = origin.x;
+      menubar.origin.y = origin.y;
+      menubar.size.width = size.width;
+      menubar.size.height = 1;
+      ++origin.y;
+      --size.height;
+    }
+    return menubar;
+  }
+
+  void HorizontalSplitPercentage(float top_percentage, Rect &top,
+                                 Rect &bottom) const {
+    float top_height = top_percentage * size.height;
+    HorizontalSplit(top_height, top, bottom);
+  }
+
+  void HorizontalSplit(int top_height, Rect &top, Rect &bottom) const {
+    top = *this;
+    if (top_height < size.height) {
+      top.size.height = top_height;
+      bottom.origin.x = origin.x;
+      bottom.origin.y = origin.y + top.size.height;
+      bottom.size.width = size.width;
+      bottom.size.height = size.height - top.size.height;
+    } else {
+      bottom.Clear();
+    }
+  }
+
+  void VerticalSplitPercentage(float left_percentage, Rect &left,
+                               Rect &right) const {
+    float left_width = left_percentage * size.width;
+    VerticalSplit(left_width, left, right);
+  }
+
+  void VerticalSplit(int left_width, Rect &left, Rect &right) const {
+    left = *this;
+    if (left_width < size.width) {
+      left.size.width = left_width;
+      right.origin.x = origin.x + left.size.width;
+      right.origin.y = origin.y;
+      right.size.width = size.width - left.size.width;
+      right.size.height = size.height;
+    } else {
+      right.Clear();
+    }
+  }
+};
+
+bool operator==(const Rect &lhs, const Rect &rhs) {
+  return lhs.origin == rhs.origin && lhs.size == rhs.size;
+}
+
+bool operator!=(const Rect &lhs, const Rect &rhs) {
+  return lhs.origin != rhs.origin || lhs.size != rhs.size;
+}
+
+enum HandleCharResult {
+  eKeyNotHandled = 0,
+  eKeyHandled = 1,
+  eQuitApplication = 2
+};
+
+enum class MenuActionResult {
+  Handled,
+  NotHandled,
+  Quit // Exit all menus and quit
+};
+
+struct KeyHelp {
+  int ch;
+  const char *description;
+};
+
+class WindowDelegate {
+public:
+  virtual ~WindowDelegate() = default;
+
+  virtual bool WindowDelegateDraw(Window &window, bool force) {
+    return false; // Drawing not handled
+  }
+
+  virtual HandleCharResult WindowDelegateHandleChar(Window &window, int key) {
+    return eKeyNotHandled;
+  }
+
+  virtual const char *WindowDelegateGetHelpText() { return nullptr; }
+
+  virtual KeyHelp *WindowDelegateGetKeyHelp() { return nullptr; }
+};
+
+class HelpDialogDelegate : public WindowDelegate {
+public:
+  HelpDialogDelegate(const char *text, KeyHelp *key_help_array);
+
+  ~HelpDialogDelegate() override;
+
+  bool WindowDelegateDraw(Window &window, bool force) override;
+
+  HandleCharResult WindowDelegateHandleChar(Window &window, int key) override;
+
+  size_t GetNumLines() const { return m_text.GetSize(); }
+
+  size_t GetMaxLineLength() const { return m_text.GetMaxStringLength(); }
+
+protected:
+  StringList m_text;
+  int m_first_visible_line;
+};
+
+class Window {
+public:
+  Window(const char *name)
+      : m_name(name), m_window(nullptr), m_panel(nullptr), m_parent(nullptr),
+        m_subwindows(), m_delegate_sp(), m_curr_active_window_idx(UINT32_MAX),
+        m_prev_active_window_idx(UINT32_MAX), m_delete(false),
+        m_needs_update(true), m_can_activate(true), m_is_subwin(false) {}
+
+  Window(const char *name, WINDOW *w, bool del = true)
+      : m_name(name), m_window(nullptr), m_panel(nullptr), m_parent(nullptr),
+        m_subwindows(), m_delegate_sp(), m_curr_active_window_idx(UINT32_MAX),
+        m_prev_active_window_idx(UINT32_MAX), m_delete(del),
+        m_needs_update(true), m_can_activate(true), m_is_subwin(false) {
+    if (w)
+      Reset(w);
+  }
+
+  Window(const char *name, const Rect &bounds)
+      : m_name(name), m_window(nullptr), m_parent(nullptr), m_subwindows(),
+        m_delegate_sp(), m_curr_active_window_idx(UINT32_MAX),
+        m_prev_active_window_idx(UINT32_MAX), m_delete(true),
+        m_needs_update(true), m_can_activate(true), m_is_subwin(false) {
+    Reset(::newwin(bounds.size.height, bounds.size.width, bounds.origin.y,
+                   bounds.origin.y));
+  }
+
+  virtual ~Window() {
+    RemoveSubWindows();
+    Reset();
+  }
+
+  void Reset(WINDOW *w = nullptr, bool del = true) {
+    if (m_window == w)
+      return;
+
+    if (m_panel) {
+      ::del_panel(m_panel);
+      m_panel = nullptr;
+    }
+    if (m_window && m_delete) {
+      ::delwin(m_window);
+      m_window = nullptr;
+      m_delete = false;
+    }
+    if (w) {
+      m_window = w;
+      m_panel = ::new_panel(m_window);
+      m_delete = del;
+    }
+  }
+
+  void AttributeOn(attr_t attr) { ::wattron(m_window, attr); }
+  void AttributeOff(attr_t attr) { ::wattroff(m_window, attr); }
+  void Box(chtype v_char = ACS_VLINE, chtype h_char = ACS_HLINE) {
+    ::box(m_window, v_char, h_char);
+  }
+  void Clear() { ::wclear(m_window); }
+  void Erase() { ::werase(m_window); }
+  Rect GetBounds() {
+    return Rect(GetParentOrigin(), GetSize());
+  } // Get the rectangle in our parent window
+  int GetChar() { return ::wgetch(m_window); }
+  int GetCursorX() { return getcurx(m_window); }
+  int GetCursorY() { return getcury(m_window); }
+  Rect GetFrame() {
+    return Rect(Point(), GetSize());
+  } // Get our rectangle in our own coordinate system
+  Point GetParentOrigin() { return Point(GetParentX(), GetParentY()); }
+  Size GetSize() { return Size(GetWidth(), GetHeight()); }
+  int GetParentX() { return getparx(m_window); }
+  int GetParentY() { return getpary(m_window); }
+  int GetMaxX() { return getmaxx(m_window); }
+  int GetMaxY() { return getmaxy(m_window); }
+  int GetWidth() { return GetMaxX(); }
+  int GetHeight() { return GetMaxY(); }
+  void MoveCursor(int x, int y) { ::wmove(m_window, y, x); }
+  void MoveWindow(int x, int y) { MoveWindow(Point(x, y)); }
+  void Resize(int w, int h) { ::wresize(m_window, h, w); }
+  void Resize(const Size &size) {
+    ::wresize(m_window, size.height, size.width);
+  }
+  void PutChar(int ch) { ::waddch(m_window, ch); }
+  void PutCString(const char *s, int len = -1) { ::waddnstr(m_window, s, len); }
+  void SetBackground(int color_pair_idx) {
+    ::wbkgd(m_window, COLOR_PAIR(color_pair_idx));
+  }
+
+  void PutCStringTruncated(const char *s, int right_pad) {
+    int bytes_left = GetWidth() - GetCursorX();
+    if (bytes_left > right_pad) {
+      bytes_left -= right_pad;
+      ::waddnstr(m_window, s, bytes_left);
+    }
+  }
+
+  void MoveWindow(const Point &origin) {
+    const bool moving_window = origin != GetParentOrigin();
+    if (m_is_subwin && moving_window) {
+      // Can't move subwindows, must delete and re-create
+      Size size = GetSize();
+      Reset(::subwin(m_parent->m_window, size.height, size.width, origin.y,
+                     origin.x),
+            true);
+    } else {
+      ::mvwin(m_window, origin.y, origin.x);
+    }
+  }
+
+  void SetBounds(const Rect &bounds) {
+    const bool moving_window = bounds.origin != GetParentOrigin();
+    if (m_is_subwin && moving_window) {
+      // Can't move subwindows, must delete and re-create
+      Reset(::subwin(m_parent->m_window, bounds.size.height, bounds.size.width,
+                     bounds.origin.y, bounds.origin.x),
+            true);
+    } else {
+      if (moving_window)
+        MoveWindow(bounds.origin);
+      Resize(bounds.size);
+    }
+  }
+
+  void Printf(const char *format, ...) __attribute__((format(printf, 2, 3))) {
+    va_list args;
+    va_start(args, format);
+    vwprintw(m_window, format, args);
+    va_end(args);
+  }
+
+  void Touch() {
+    ::touchwin(m_window);
+    if (m_parent)
+      m_parent->Touch();
+  }
+
+  WindowSP CreateSubWindow(const char *name, const Rect &bounds,
+                           bool make_active) {
+    auto get_window = [this, &bounds]() {
+      return m_window
+                 ? ::subwin(m_window, bounds.size.height, bounds.size.width,
+                            bounds.origin.y, bounds.origin.x)
+                 : ::newwin(bounds.size.height, bounds.size.width,
+                            bounds.origin.y, bounds.origin.x);
+    };
+    WindowSP subwindow_sp = std::make_shared<Window>(name, get_window(), true);
+    subwindow_sp->m_is_subwin = subwindow_sp.operator bool();
+    subwindow_sp->m_parent = this;
+    if (make_active) {
+      m_prev_active_window_idx = m_curr_active_window_idx;
+      m_curr_active_window_idx = m_subwindows.size();
+    }
+    m_subwindows.push_back(subwindow_sp);
+    ::top_panel(subwindow_sp->m_panel);
+    m_needs_update = true;
+    return subwindow_sp;
+  }
+
+  bool RemoveSubWindow(Window *window) {
+    Windows::iterator pos, end = m_subwindows.end();
+    size_t i = 0;
+    for (pos = m_subwindows.begin(); pos != end; ++pos, ++i) {
+      if ((*pos).get() == window) {
+        if (m_prev_active_window_idx == i)
+          m_prev_active_window_idx = UINT32_MAX;
+        else if (m_prev_active_window_idx != UINT32_MAX &&
+                 m_prev_active_window_idx > i)
+          --m_prev_active_window_idx;
+
+        if (m_curr_active_window_idx == i)
+          m_curr_active_window_idx = UINT32_MAX;
+        else if (m_curr_active_window_idx != UINT32_MAX &&
+                 m_curr_active_window_idx > i)
+          --m_curr_active_window_idx;
+        window->Erase();
+        m_subwindows.erase(pos);
+        m_needs_update = true;
+        if (m_parent)
+          m_parent->Touch();
+        else
+          ::touchwin(stdscr);
+        return true;
+      }
+    }
+    return false;
+  }
+
+  WindowSP FindSubWindow(const char *name) {
+    Windows::iterator pos, end = m_subwindows.end();
+    size_t i = 0;
+    for (pos = m_subwindows.begin(); pos != end; ++pos, ++i) {
+      if ((*pos)->m_name == name)
+        return *pos;
+    }
+    return WindowSP();
+  }
+
+  void RemoveSubWindows() {
+    m_curr_active_window_idx = UINT32_MAX;
+    m_prev_active_window_idx = UINT32_MAX;
+    for (Windows::iterator pos = m_subwindows.begin();
+         pos != m_subwindows.end(); pos = m_subwindows.erase(pos)) {
+      (*pos)->Erase();
+    }
+    if (m_parent)
+      m_parent->Touch();
+    else
+      ::touchwin(stdscr);
+  }
+
+  WINDOW *get() { return m_window; }
+
+  operator WINDOW *() { return m_window; }
+
+  // Window drawing utilities
+  void DrawTitleBox(const char *title, const char *bottom_message = nullptr) {
+    attr_t attr = 0;
+    if (IsActive())
+      attr = A_BOLD | COLOR_PAIR(2);
+    else
+      attr = 0;
+    if (attr)
+      AttributeOn(attr);
+
+    Box();
+    MoveCursor(3, 0);
+
+    if (title && title[0]) {
+      PutChar('<');
+      PutCString(title);
+      PutChar('>');
+    }
+
+    if (bottom_message && bottom_message[0]) {
+      int bottom_message_length = strlen(bottom_message);
+      int x = GetWidth() - 3 - (bottom_message_length + 2);
+
+      if (x > 0) {
+        MoveCursor(x, GetHeight() - 1);
+        PutChar('[');
+        PutCString(bottom_message);
+        PutChar(']');
+      } else {
+        MoveCursor(1, GetHeight() - 1);
+        PutChar('[');
+        PutCStringTruncated(bottom_message, 1);
+      }
+    }
+    if (attr)
+      AttributeOff(attr);
+  }
+
+  virtual void Draw(bool force) {
+    if (m_delegate_sp && m_delegate_sp->WindowDelegateDraw(*this, force))
+      return;
+
+    for (auto &subwindow_sp : m_subwindows)
+      subwindow_sp->Draw(force);
+  }
+
+  bool CreateHelpSubwindow() {
+    if (m_delegate_sp) {
+      const char *text = m_delegate_sp->WindowDelegateGetHelpText();
+      KeyHelp *key_help = m_delegate_sp->WindowDelegateGetKeyHelp();
+      if ((text && text[0]) || key_help) {
+        std::unique_ptr<HelpDialogDelegate> help_delegate_up(
+            new HelpDialogDelegate(text, key_help));
+        const size_t num_lines = help_delegate_up->GetNumLines();
+        const size_t max_length = help_delegate_up->GetMaxLineLength();
+        Rect bounds = GetBounds();
+        bounds.Inset(1, 1);
+        if (max_length + 4 < static_cast<size_t>(bounds.size.width)) {
+          bounds.origin.x += (bounds.size.width - max_length + 4) / 2;
+          bounds.size.width = max_length + 4;
+        } else {
+          if (bounds.size.width > 100) {
+            const int inset_w = bounds.size.width / 4;
+            bounds.origin.x += inset_w;
+            bounds.size.width -= 2 * inset_w;
+          }
+        }
+
+        if (num_lines + 2 < static_cast<size_t>(bounds.size.height)) {
+          bounds.origin.y += (bounds.size.height - num_lines + 2) / 2;
+          bounds.size.height = num_lines + 2;
+        } else {
+          if (bounds.size.height > 100) {
+            const int inset_h = bounds.size.height / 4;
+            bounds.origin.y += inset_h;
+            bounds.size.height -= 2 * inset_h;
+          }
+        }
+        WindowSP help_window_sp;
+        Window *parent_window = GetParent();
+        if (parent_window)
+          help_window_sp = parent_window->CreateSubWindow("Help", bounds, true);
+        else
+          help_window_sp = CreateSubWindow("Help", bounds, true);
+        help_window_sp->SetDelegate(
+            WindowDelegateSP(help_delegate_up.release()));
+        return true;
+      }
+    }
+    return false;
+  }
+
+  virtual HandleCharResult HandleChar(int key) {
+    // Always check the active window first
+    HandleCharResult result = eKeyNotHandled;
+    WindowSP active_window_sp = GetActiveWindow();
+    if (active_window_sp) {
+      result = active_window_sp->HandleChar(key);
+      if (result != eKeyNotHandled)
+        return result;
+    }
+
+    if (m_delegate_sp) {
+      result = m_delegate_sp->WindowDelegateHandleChar(*this, key);
+      if (result != eKeyNotHandled)
+        return result;
+    }
+
+    // Then check for any windows that want any keys that weren't handled. This
+    // is typically only for a menubar. Make a copy of the subwindows in case
+    // any HandleChar() functions muck with the subwindows. If we don't do
+    // this, we can crash when iterating over the subwindows.
+    Windows subwindows(m_subwindows);
+    for (auto subwindow_sp : subwindows) {
+      if (!subwindow_sp->m_can_activate) {
+        HandleCharResult result = subwindow_sp->HandleChar(key);
+        if (result != eKeyNotHandled)
+          return result;
+      }
+    }
+
+    return eKeyNotHandled;
+  }
+
+  WindowSP GetActiveWindow() {
+    if (!m_subwindows.empty()) {
+      if (m_curr_active_window_idx >= m_subwindows.size()) {
+        if (m_prev_active_window_idx < m_subwindows.size()) {
+          m_curr_active_window_idx = m_prev_active_window_idx;
+          m_prev_active_window_idx = UINT32_MAX;
+        } else if (IsActive()) {
+          m_prev_active_window_idx = UINT32_MAX;
+          m_curr_active_window_idx = UINT32_MAX;
+
+          // Find first window that wants to be active if this window is active
+          const size_t num_subwindows = m_subwindows.size();
+          for (size_t i = 0; i < num_subwindows; ++i) {
+            if (m_subwindows[i]->GetCanBeActive()) {
+              m_curr_active_window_idx = i;
+              break;
+            }
+          }
+        }
+      }
+
+      if (m_curr_active_window_idx < m_subwindows.size())
+        return m_subwindows[m_curr_active_window_idx];
+    }
+    return WindowSP();
+  }
+
+  bool GetCanBeActive() const { return m_can_activate; }
+
+  void SetCanBeActive(bool b) { m_can_activate = b; }
+
+  void SetDelegate(const WindowDelegateSP &delegate_sp) {
+    m_delegate_sp = delegate_sp;
+  }
+
+  Window *GetParent() const { return m_parent; }
+
+  bool IsActive() const {
+    if (m_parent)
+      return m_parent->GetActiveWindow().get() == this;
+    else
+      return true; // Top level window is always active
+  }
+
+  void SelectNextWindowAsActive() {
+    // Move active focus to next window
+    const size_t num_subwindows = m_subwindows.size();
+    if (m_curr_active_window_idx == UINT32_MAX) {
+      uint32_t idx = 0;
+      for (auto subwindow_sp : m_subwindows) {
+        if (subwindow_sp->GetCanBeActive()) {
+          m_curr_active_window_idx = idx;
+          break;
+        }
+        ++idx;
+      }
+    } else if (m_curr_active_window_idx + 1 < num_subwindows) {
+      bool handled = false;
+      m_prev_active_window_idx = m_curr_active_window_idx;
+      for (size_t idx = m_curr_active_window_idx + 1; idx < num_subwindows;
+           ++idx) {
+        if (m_subwindows[idx]->GetCanBeActive()) {
+          m_curr_active_window_idx = idx;
+          handled = true;
+          break;
+        }
+      }
+      if (!handled) {
+        for (size_t idx = 0; idx <= m_prev_active_window_idx; ++idx) {
+          if (m_subwindows[idx]->GetCanBeActive()) {
+            m_curr_active_window_idx = idx;
+            break;
+          }
+        }
+      }
+    } else {
+      m_prev_active_window_idx = m_curr_active_window_idx;
+      for (size_t idx = 0; idx < num_subwindows; ++idx) {
+        if (m_subwindows[idx]->GetCanBeActive()) {
+          m_curr_active_window_idx = idx;
+          break;
+        }
+      }
+    }
+  }
+
+  const char *GetName() const { return m_name.c_str(); }
+
+protected:
+  std::string m_name;
+  WINDOW *m_window;
+  PANEL *m_panel;
+  Window *m_parent;
+  Windows m_subwindows;
+  WindowDelegateSP m_delegate_sp;
+  uint32_t m_curr_active_window_idx;
+  uint32_t m_prev_active_window_idx;
+  bool m_delete;
+  bool m_needs_update;
+  bool m_can_activate;
+  bool m_is_subwin;
+
+private:
+  DISALLOW_COPY_AND_ASSIGN(Window);
+};
+
+class MenuDelegate {
+public:
+  virtual ~MenuDelegate() = default;
+
+  virtual MenuActionResult MenuDelegateAction(Menu &menu) = 0;
+};
+
+class Menu : public WindowDelegate {
+public:
+  enum class Type { Invalid, Bar, Item, Separator };
+
+  // Menubar or separator constructor
+  Menu(Type type);
+
+  // Menuitem constructor
+  Menu(const char *name, const char *key_name, int key_value,
+       uint64_t identifier);
+
+  ~Menu() override = default;
+
+  const MenuDelegateSP &GetDelegate() const { return m_delegate_sp; }
+
+  void SetDelegate(const MenuDelegateSP &delegate_sp) {
+    m_delegate_sp = delegate_sp;
+  }
+
+  void RecalculateNameLengths();
+
+  void AddSubmenu(const MenuSP &menu_sp);
+
+  int DrawAndRunMenu(Window &window);
+
+  void DrawMenuTitle(Window &window, bool highlight);
+
+  bool WindowDelegateDraw(Window &window, bool force) override;
+
+  HandleCharResult WindowDelegateHandleChar(Window &window, int key) override;
+
+  MenuActionResult ActionPrivate(Menu &menu) {
+    MenuActionResult result = MenuActionResult::NotHandled;
+    if (m_delegate_sp) {
+      result = m_delegate_sp->MenuDelegateAction(menu);
+      if (result != MenuActionResult::NotHandled)
+        return result;
+    } else if (m_parent) {
+      result = m_parent->ActionPrivate(menu);
+      if (result != MenuActionResult::NotHandled)
+        return result;
+    }
+    return m_canned_result;
+  }
+
+  MenuActionResult Action() {
+    // Call the recursive action so it can try to handle it with the menu
+    // delegate, and if not, try our parent menu
+    return ActionPrivate(*this);
+  }
+
+  void SetCannedResult(MenuActionResult result) { m_canned_result = result; }
+
+  Menus &GetSubmenus() { return m_submenus; }
+
+  const Menus &GetSubmenus() const { return m_submenus; }
+
+  int GetSelectedSubmenuIndex() const { return m_selected; }
+
+  void SetSelectedSubmenuIndex(int idx) { m_selected = idx; }
+
+  Type GetType() const { return m_type; }
+
+  int GetStartingColumn() const { return m_start_col; }
+
+  void SetStartingColumn(int col) { m_start_col = col; }
+
+  int GetKeyValue() const { return m_key_value; }
+
+  std::string &GetName() { return m_name; }
+
+  int GetDrawWidth() const {
+    return m_max_submenu_name_length + m_max_submenu_key_name_length + 8;
+  }
+
+  uint64_t GetIdentifier() const { return m_identifier; }
+
+  void SetIdentifier(uint64_t identifier) { m_identifier = identifier; }
+
+protected:
+  std::string m_name;
+  std::string m_key_name;
+  uint64_t m_identifier;
+  Type m_type;
+  int m_key_value;
+  int m_start_col;
+  int m_max_submenu_name_length;
+  int m_max_submenu_key_name_length;
+  int m_selected;
+  Menu *m_parent;
+  Menus m_submenus;
+  WindowSP m_menu_window_sp;
+  MenuActionResult m_canned_result;
+  MenuDelegateSP m_delegate_sp;
+};
+
+// Menubar or separator constructor
+Menu::Menu(Type type)
+    : m_name(), m_key_name(), m_identifier(0), m_type(type), m_key_value(0),
+      m_start_col(0), m_max_submenu_name_length(0),
+      m_max_submenu_key_name_length(0), m_selected(0), m_parent(nullptr),
+      m_submenus(), m_canned_result(MenuActionResult::NotHandled),
+      m_delegate_sp() {}
+
+// Menuitem constructor
+Menu::Menu(const char *name, const char *key_name, int key_value,
+           uint64_t identifier)
+    : m_name(), m_key_name(), m_identifier(identifier), m_type(Type::Invalid),
+      m_key_value(key_value), m_start_col(0), m_max_submenu_name_length(0),
+      m_max_submenu_key_name_length(0), m_selected(0), m_parent(nullptr),
+      m_submenus(), m_canned_result(MenuActionResult::NotHandled),
+      m_delegate_sp() {
+  if (name && name[0]) {
+    m_name = name;
+    m_type = Type::Item;
+    if (key_name && key_name[0])
+      m_key_name = key_name;
+  } else {
+    m_type = Type::Separator;
+  }
+}
+
+void Menu::RecalculateNameLengths() {
+  m_max_submenu_name_length = 0;
+  m_max_submenu_key_name_length = 0;
+  Menus &submenus = GetSubmenus();
+  const size_t num_submenus = submenus.size();
+  for (size_t i = 0; i < num_submenus; ++i) {
+    Menu *submenu = submenus[i].get();
+    if (static_cast<size_t>(m_max_submenu_name_length) < submenu->m_name.size())
+      m_max_submenu_name_length = submenu->m_name.size();
+    if (static_cast<size_t>(m_max_submenu_key_name_length) <
+        submenu->m_key_name.size())
+      m_max_submenu_key_name_length = submenu->m_key_name.size();
+  }
+}
+
+void Menu::AddSubmenu(const MenuSP &menu_sp) {
+  menu_sp->m_parent = this;
+  if (static_cast<size_t>(m_max_submenu_name_length) < menu_sp->m_name.size())
+    m_max_submenu_name_length = menu_sp->m_name.size();
+  if (static_cast<size_t>(m_max_submenu_key_name_length) <
+      menu_sp->m_key_name.size())
+    m_max_submenu_key_name_length = menu_sp->m_key_name.size();
+  m_submenus.push_back(menu_sp);
+}
+
+void Menu::DrawMenuTitle(Window &window, bool highlight) {
+  if (m_type == Type::Separator) {
+    window.MoveCursor(0, window.GetCursorY());
+    window.PutChar(ACS_LTEE);
+    int width = window.GetWidth();
+    if (width > 2) {
+      width -= 2;
+      for (int i = 0; i < width; ++i)
+        window.PutChar(ACS_HLINE);
+    }
+    window.PutChar(ACS_RTEE);
+  } else {
+    const int shortcut_key = m_key_value;
+    bool underlined_shortcut = false;
+    const attr_t hilgight_attr = A_REVERSE;
+    if (highlight)
+      window.AttributeOn(hilgight_attr);
+    if (isprint(shortcut_key)) {
+      size_t lower_pos = m_name.find(tolower(shortcut_key));
+      size_t upper_pos = m_name.find(toupper(shortcut_key));
+      const char *name = m_name.c_str();
+      size_t pos = std::min<size_t>(lower_pos, upper_pos);
+      if (pos != std::string::npos) {
+        underlined_shortcut = true;
+        if (pos > 0) {
+          window.PutCString(name, pos);
+          name += pos;
+        }
+        const attr_t shortcut_attr = A_UNDERLINE | A_BOLD;
+        window.AttributeOn(shortcut_attr);
+        window.PutChar(name[0]);
+        window.AttributeOff(shortcut_attr);
+        name++;
+        if (name[0])
+          window.PutCString(name);
+      }
+    }
+
+    if (!underlined_shortcut) {
+      window.PutCString(m_name.c_str());
+    }
+
+    if (highlight)
+      window.AttributeOff(hilgight_attr);
+
+    if (m_key_name.empty()) {
+      if (!underlined_shortcut && isprint(m_key_value)) {
+        window.AttributeOn(COLOR_PAIR(3));
+        window.Printf(" (%c)", m_key_value);
+        window.AttributeOff(COLOR_PAIR(3));
+      }
+    } else {
+      window.AttributeOn(COLOR_PAIR(3));
+      window.Printf(" (%s)", m_key_name.c_str());
+      window.AttributeOff(COLOR_PAIR(3));
+    }
+  }
+}
+
+bool Menu::WindowDelegateDraw(Window &window, bool force) {
+  Menus &submenus = GetSubmenus();
+  const size_t num_submenus = submenus.size();
+  const int selected_idx = GetSelectedSubmenuIndex();
+  Menu::Type menu_type = GetType();
+  switch (menu_type) {
+  case Menu::Type::Bar: {
+    window.SetBackground(2);
+    window.MoveCursor(0, 0);
+    for (size_t i = 0; i < num_submenus; ++i) {
+      Menu *menu = submenus[i].get();
+      if (i > 0)
+        window.PutChar(' ');
+      menu->SetStartingColumn(window.GetCursorX());
+      window.PutCString("| ");
+      menu->DrawMenuTitle(window, false);
+    }
+    window.PutCString(" |");
+  } break;
+
+  case Menu::Type::Item: {
+    int y = 1;
+    int x = 3;
+    // Draw the menu
+    int cursor_x = 0;
+    int cursor_y = 0;
+    window.Erase();
+    window.SetBackground(2);
+    window.Box();
+    for (size_t i = 0; i < num_submenus; ++i) {
+      const bool is_selected = (i == static_cast<size_t>(selected_idx));
+      window.MoveCursor(x, y + i);
+      if (is_selected) {
+        // Remember where we want the cursor to be
+        cursor_x = x - 1;
+        cursor_y = y + i;
+      }
+      submenus[i]->DrawMenuTitle(window, is_selected);
+    }
+    window.MoveCursor(cursor_x, cursor_y);
+  } break;
+
+  default:
+  case Menu::Type::Separator:
+    break;
+  }
+  return true; // Drawing handled...
+}
+
+HandleCharResult Menu::WindowDelegateHandleChar(Window &window, int key) {
+  HandleCharResult result = eKeyNotHandled;
+
+  Menus &submenus = GetSubmenus();
+  const size_t num_submenus = submenus.size();
+  const int selected_idx = GetSelectedSubmenuIndex();
+  Menu::Type menu_type = GetType();
+  if (menu_type == Menu::Type::Bar) {
+    MenuSP run_menu_sp;
+    switch (key) {
+    case KEY_DOWN:
+    case KEY_UP:
+      // Show last menu or first menu
+      if (selected_idx < static_cast<int>(num_submenus))
+        run_menu_sp = submenus[selected_idx];
+      else if (!submenus.empty())
+        run_menu_sp = submenus.front();
+      result = eKeyHandled;
+      break;
+
+    case KEY_RIGHT:
+      ++m_selected;
+      if (m_selected >= static_cast<int>(num_submenus))
+        m_selected = 0;
+      if (m_selected < static_cast<int>(num_submenus))
+        run_menu_sp = submenus[m_selected];
+      else if (!submenus.empty())
+        run_menu_sp = submenus.front();
+      result = eKeyHandled;
+      break;
+
+    case KEY_LEFT:
+      --m_selected;
+      if (m_selected < 0)
+        m_selected = num_submenus - 1;
+      if (m_selected < static_cast<int>(num_submenus))
+        run_menu_sp = submenus[m_selected];
+      else if (!submenus.empty())
+        run_menu_sp = submenus.front();
+      result = eKeyHandled;
+      break;
+
+    default:
+      for (size_t i = 0; i < num_submenus; ++i) {
+        if (submenus[i]->GetKeyValue() == key) {
+          SetSelectedSubmenuIndex(i);
+          run_menu_sp = submenus[i];
+          result = eKeyHandled;
+          break;
+        }
+      }
+      break;
+    }
+
+    if (run_menu_sp) {
+      // Run the action on this menu in case we need to populate the menu with
+      // dynamic content and also in case check marks, and any other menu
+      // decorations need to be calculated
+      if (run_menu_sp->Action() == MenuActionResult::Quit)
+        return eQuitApplication;
+
+      Rect menu_bounds;
+      menu_bounds.origin.x = run_menu_sp->GetStartingColumn();
+      menu_bounds.origin.y = 1;
+      menu_bounds.size.width = run_menu_sp->GetDrawWidth();
+      menu_bounds.size.height = run_menu_sp->GetSubmenus().size() + 2;
+      if (m_menu_window_sp)
+        window.GetParent()->RemoveSubWindow(m_menu_window_sp.get());
+
+      m_menu_window_sp = window.GetParent()->CreateSubWindow(
+          run_menu_sp->GetName().c_str(), menu_bounds, true);
+      m_menu_window_sp->SetDelegate(run_menu_sp);
+    }
+  } else if (menu_type == Menu::Type::Item) {
+    switch (key) {
+    case KEY_DOWN:
+      if (m_submenus.size() > 1) {
+        const int start_select = m_selected;
+        while (++m_selected != start_select) {
+          if (static_cast<size_t>(m_selected) >= num_submenus)
+            m_selected = 0;
+          if (m_submenus[m_selected]->GetType() == Type::Separator)
+            continue;
+          else
+            break;
+        }
+        return eKeyHandled;
+      }
+      break;
+
+    case KEY_UP:
+      if (m_submenus.size() > 1) {
+        const int start_select = m_selected;
+        while (--m_selected != start_select) {
+          if (m_selected < static_cast<int>(0))
+            m_selected = num_submenus - 1;
+          if (m_submenus[m_selected]->GetType() == Type::Separator)
+            continue;
+          else
+            break;
+        }
+        return eKeyHandled;
+      }
+      break;
+
+    case KEY_RETURN:
+      if (static_cast<size_t>(selected_idx) < num_submenus) {
+        if (submenus[selected_idx]->Action() == MenuActionResult::Quit)
+          return eQuitApplication;
+        window.GetParent()->RemoveSubWindow(&window);
+        return eKeyHandled;
+      }
+      break;
+
+    case KEY_ESCAPE: // Beware: pressing escape key has 1 to 2 second delay in
+                     // case other chars are entered for escaped sequences
+      window.GetParent()->RemoveSubWindow(&window);
+      return eKeyHandled;
+
+    default:
+      for (size_t i = 0; i < num_submenus; ++i) {
+        Menu *menu = submenus[i].get();
+        if (menu->GetKeyValue() == key) {
+          SetSelectedSubmenuIndex(i);
+          window.GetParent()->RemoveSubWindow(&window);
+          if (menu->Action() == MenuActionResult::Quit)
+            return eQuitApplication;
+          return eKeyHandled;
+        }
+      }
+      break;
+    }
+  } else if (menu_type == Menu::Type::Separator) {
+  }
+  return result;
+}
+
+class Application {
+public:
+  Application(FILE *in, FILE *out)
+      : m_window_sp(), m_screen(nullptr), m_in(in), m_out(out) {}
+
+  ~Application() {
+    m_window_delegates.clear();
+    m_window_sp.reset();
+    if (m_screen) {
+      ::delscreen(m_screen);
+      m_screen = nullptr;
+    }
+  }
+
+  void Initialize() {
+    ::setlocale(LC_ALL, "");
+    ::setlocale(LC_CTYPE, "");
+    m_screen = ::newterm(nullptr, m_out, m_in);
+    ::start_color();
+    ::curs_set(0);
+    ::noecho();
+    ::keypad(stdscr, TRUE);
+  }
+
+  void Terminate() { ::endwin(); }
+
+  void Run(Debugger &debugger) {
+    bool done = false;
+    int delay_in_tenths_of_a_second = 1;
+
+    // Alas the threading model in curses is a bit lame so we need to resort to
+    // polling every 0.5 seconds. We could poll for stdin ourselves and then
+    // pass the keys down but then we need to translate all of the escape
+    // sequences ourselves. So we resort to polling for input because we need
+    // to receive async process events while in this loop.
+
+    halfdelay(delay_in_tenths_of_a_second); // Poll using some number of tenths
+                                            // of seconds seconds when calling
+                                            // Window::GetChar()
+
+    ListenerSP listener_sp(
+        Listener::MakeListener("lldb.IOHandler.curses.Application"));
+    ConstString broadcaster_class_target(Target::GetStaticBroadcasterClass());
+    ConstString broadcaster_class_process(Process::GetStaticBroadcasterClass());
+    ConstString broadcaster_class_thread(Thread::GetStaticBroadcasterClass());
+    debugger.EnableForwardEvents(listener_sp);
+
+    bool update = true;
+#if defined(__APPLE__)
+    std::deque<int> escape_chars;
+#endif
+
+    while (!done) {
+      if (update) {
+        m_window_sp->Draw(false);
+        // All windows should be calling Window::DeferredRefresh() instead of
+        // Window::Refresh() so we can do a single update and avoid any screen
+        // blinking
+        update_panels();
+
+        // Cursor hiding isn't working on MacOSX, so hide it in the top left
+        // corner
+        m_window_sp->MoveCursor(0, 0);
+
+        doupdate();
+        update = false;
+      }
+
+#if defined(__APPLE__)
+      // Terminal.app doesn't map its function keys correctly, F1-F4 default
+      // to: \033OP, \033OQ, \033OR, \033OS, so lets take care of this here if
+      // possible
+      int ch;
+      if (escape_chars.empty())
+        ch = m_window_sp->GetChar();
+      else {
+        ch = escape_chars.front();
+        escape_chars.pop_front();
+      }
+      if (ch == KEY_ESCAPE) {
+        int ch2 = m_window_sp->GetChar();
+        if (ch2 == 'O') {
+          int ch3 = m_window_sp->GetChar();
+          switch (ch3) {
+          case 'P':
+            ch = KEY_F(1);
+            break;
+          case 'Q':
+            ch = KEY_F(2);
+            break;
+          case 'R':
+            ch = KEY_F(3);
+            break;
+          case 'S':
+            ch = KEY_F(4);
+            break;
+          default:
+            escape_chars.push_back(ch2);
+            if (ch3 != -1)
+              escape_chars.push_back(ch3);
+            break;
+          }
+        } else if (ch2 != -1)
+          escape_chars.push_back(ch2);
+      }
+#else
+      int ch = m_window_sp->GetChar();
+
+#endif
+      if (ch == -1) {
+        if (feof(m_in) || ferror(m_in)) {
+          done = true;
+        } else {
+          // Just a timeout from using halfdelay(), check for events
+          EventSP event_sp;
+          while (listener_sp->PeekAtNextEvent()) {
+            listener_sp->GetEvent(event_sp, std::chrono::seconds(0));
+
+            if (event_sp) {
+              Broadcaster *broadcaster = event_sp->GetBroadcaster();
+              if (broadcaster) {
+                // uint32_t event_type = event_sp->GetType();
+                ConstString broadcaster_class(
+                    broadcaster->GetBroadcasterClass());
+                if (broadcaster_class == broadcaster_class_process) {
+                  debugger.GetCommandInterpreter().UpdateExecutionContext(
+                      nullptr);
+                  update = true;
+                  continue; // Don't get any key, just update our view
+                }
+              }
+            }
+          }
+        }
+      } else {
+        HandleCharResult key_result = m_window_sp->HandleChar(ch);
+        switch (key_result) {
+        case eKeyHandled:
+          debugger.GetCommandInterpreter().UpdateExecutionContext(nullptr);
+          update = true;
+          break;
+        case eKeyNotHandled:
+          break;
+        case eQuitApplication:
+          done = true;
+          break;
+        }
+      }
+    }
+
+    debugger.CancelForwardEvents(listener_sp);
+  }
+
+  WindowSP &GetMainWindow() {
+    if (!m_window_sp)
+      m_window_sp = std::make_shared<Window>("main", stdscr, false);
+    return m_window_sp;
+  }
+
+protected:
+  WindowSP m_window_sp;
+  WindowDelegates m_window_delegates;
+  SCREEN *m_screen;
+  FILE *m_in;
+  FILE *m_out;
+};
+
+} // namespace curses
+
+using namespace curses;
+
+struct Row {
+  ValueObjectManager value;
+  Row *parent;
+  // The process stop ID when the children were calculated.
+  uint32_t children_stop_id;
+  int row_idx;
+  int x;
+  int y;
+  bool might_have_children;
+  bool expanded;
+  bool calculated_children;
+  std::vector<Row> children;
+
+  Row(const ValueObjectSP &v, Row *p)
+      : value(v, lldb::eDynamicDontRunTarget, true), parent(p), row_idx(0),
+        x(1), y(1), might_have_children(v ? v->MightHaveChildren() : false),
+        expanded(false), calculated_children(false), children() {}
+
+  size_t GetDepth() const {
+    if (parent)
+      return 1 + parent->GetDepth();
+    return 0;
+  }
+
+  void Expand() { expanded = true; }
+
+  std::vector<Row> &GetChildren() {
+    ProcessSP process_sp = value.GetProcessSP();
+    auto stop_id = process_sp->GetStopID();
+    if (process_sp && stop_id != children_stop_id) {
+      children_stop_id = stop_id;
+      calculated_children = false;
+    }
+    if (!calculated_children) {
+      children.clear();
+      calculated_children = true;
+      ValueObjectSP valobj = value.GetSP();
+      if (valobj) {
+        const size_t num_children = valobj->GetNumChildren();
+        for (size_t i = 0; i < num_children; ++i) {
+          children.push_back(Row(valobj->GetChildAtIndex(i, true), this));
+        }
+      }
+    }
+    return children;
+  }
+
+  void Unexpand() {
+    expanded = false;
+    calculated_children = false;
+    children.clear();
+  }
+
+  void DrawTree(Window &window) {
+    if (parent)
+      parent->DrawTreeForChild(window, this, 0);
+
+    if (might_have_children) {
+      // It we can get UTF8 characters to work we should try to use the
+      // "symbol" UTF8 string below
+      //            const char *symbol = "";
+      //            if (row.expanded)
+      //                symbol = "\xe2\x96\xbd ";
+      //            else
+      //                symbol = "\xe2\x96\xb7 ";
+      //            window.PutCString (symbol);
+
+      // The ACS_DARROW and ACS_RARROW don't look very nice they are just a 'v'
+      // or '>' character...
+      //            if (expanded)
+      //                window.PutChar (ACS_DARROW);
+      //            else
+      //                window.PutChar (ACS_RARROW);
+      // Since we can't find any good looking right arrow/down arrow symbols,
+      // just use a diamond...
+      window.PutChar(ACS_DIAMOND);
+      window.PutChar(ACS_HLINE);
+    }
+  }
+
+  void DrawTreeForChild(Window &window, Row *child, uint32_t reverse_depth) {
+    if (parent)
+      parent->DrawTreeForChild(window, this, reverse_depth + 1);
+
+    if (&GetChildren().back() == child) {
+      // Last child
+      if (reverse_depth == 0) {
+        window.PutChar(ACS_LLCORNER);
+        window.PutChar(ACS_HLINE);
+      } else {
+        window.PutChar(' ');
+        window.PutChar(' ');
+      }
+    } else {
+      if (reverse_depth == 0) {
+        window.PutChar(ACS_LTEE);
+        window.PutChar(ACS_HLINE);
+      } else {
+        window.PutChar(ACS_VLINE);
+        window.PutChar(' ');
+      }
+    }
+  }
+};
+
+struct DisplayOptions {
+  bool show_types;
+};
+
+class TreeItem;
+
+class TreeDelegate {
+public:
+  TreeDelegate() = default;
+  virtual ~TreeDelegate() = default;
+
+  virtual void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) = 0;
+  virtual void TreeDelegateGenerateChildren(TreeItem &item) = 0;
+  virtual bool TreeDelegateItemSelected(
+      TreeItem &item) = 0; // Return true if we need to update views
+};
+
+typedef std::shared_ptr<TreeDelegate> TreeDelegateSP;
+
+class TreeItem {
+public:
+  TreeItem(TreeItem *parent, TreeDelegate &delegate, bool might_have_children)
+      : m_parent(parent), m_delegate(delegate), m_user_data(nullptr),
+        m_identifier(0), m_row_idx(-1), m_children(),
+        m_might_have_children(might_have_children), m_is_expanded(false) {}
+
+  TreeItem &operator=(const TreeItem &rhs) {
+    if (this != &rhs) {
+      m_parent = rhs.m_parent;
+      m_delegate = rhs.m_delegate;
+      m_user_data = rhs.m_user_data;
+      m_identifier = rhs.m_identifier;
+      m_row_idx = rhs.m_row_idx;
+      m_children = rhs.m_children;
+      m_might_have_children = rhs.m_might_have_children;
+      m_is_expanded = rhs.m_is_expanded;
+    }
+    return *this;
+  }
+
+  TreeItem(const TreeItem &) = default;
+
+  size_t GetDepth() const {
+    if (m_parent)
+      return 1 + m_parent->GetDepth();
+    return 0;
+  }
+
+  int GetRowIndex() const { return m_row_idx; }
+
+  void ClearChildren() { m_children.clear(); }
+
+  void Resize(size_t n, const TreeItem &t) { m_children.resize(n, t); }
+
+  TreeItem &operator[](size_t i) { return m_children[i]; }
+
+  void SetRowIndex(int row_idx) { m_row_idx = row_idx; }
+
+  size_t GetNumChildren() {
+    m_delegate.TreeDelegateGenerateChildren(*this);
+    return m_children.size();
+  }
+
+  void ItemWasSelected() { m_delegate.TreeDelegateItemSelected(*this); }
+
+  void CalculateRowIndexes(int &row_idx) {
+    SetRowIndex(row_idx);
+    ++row_idx;
+
+    const bool expanded = IsExpanded();
+
+    // The root item must calculate its children, or we must calculate the
+    // number of children if the item is expanded
+    if (m_parent == nullptr || expanded)
+      GetNumChildren();
+
+    for (auto &item : m_children) {
+      if (expanded)
+        item.CalculateRowIndexes(row_idx);
+      else
+        item.SetRowIndex(-1);
+    }
+  }
+
+  TreeItem *GetParent() { return m_parent; }
+
+  bool IsExpanded() const { return m_is_expanded; }
+
+  void Expand() { m_is_expanded = true; }
+
+  void Unexpand() { m_is_expanded = false; }
+
+  bool Draw(Window &window, const int first_visible_row,
+            const uint32_t selected_row_idx, int &row_idx, int &num_rows_left) {
+    if (num_rows_left <= 0)
+      return false;
+
+    if (m_row_idx >= first_visible_row) {
+      window.MoveCursor(2, row_idx + 1);
+
+      if (m_parent)
+        m_parent->DrawTreeForChild(window, this, 0);
+
+      if (m_might_have_children) {
+        // It we can get UTF8 characters to work we should try to use the
+        // "symbol" UTF8 string below
+        //            const char *symbol = "";
+        //            if (row.expanded)
+        //                symbol = "\xe2\x96\xbd ";
+        //            else
+        //                symbol = "\xe2\x96\xb7 ";
+        //            window.PutCString (symbol);
+
+        // The ACS_DARROW and ACS_RARROW don't look very nice they are just a
+        // 'v' or '>' character...
+        //            if (expanded)
+        //                window.PutChar (ACS_DARROW);
+        //            else
+        //                window.PutChar (ACS_RARROW);
+        // Since we can't find any good looking right arrow/down arrow symbols,
+        // just use a diamond...
+        window.PutChar(ACS_DIAMOND);
+        window.PutChar(ACS_HLINE);
+      }
+      bool highlight = (selected_row_idx == static_cast<size_t>(m_row_idx)) &&
+                       window.IsActive();
+
+      if (highlight)
+        window.AttributeOn(A_REVERSE);
+
+      m_delegate.TreeDelegateDrawTreeItem(*this, window);
+
+      if (highlight)
+        window.AttributeOff(A_REVERSE);
+      ++row_idx;
+      --num_rows_left;
+    }
+
+    if (num_rows_left <= 0)
+      return false; // We are done drawing...
+
+    if (IsExpanded()) {
+      for (auto &item : m_children) {
+        // If we displayed all the rows and item.Draw() returns false we are
+        // done drawing and can exit this for loop
+        if (!item.Draw(window, first_visible_row, selected_row_idx, row_idx,
+                       num_rows_left))
+          break;
+      }
+    }
+    return num_rows_left >= 0; // Return true if not done drawing yet
+  }
+
+  void DrawTreeForChild(Window &window, TreeItem *child,
+                        uint32_t reverse_depth) {
+    if (m_parent)
+      m_parent->DrawTreeForChild(window, this, reverse_depth + 1);
+
+    if (&m_children.back() == child) {
+      // Last child
+      if (reverse_depth == 0) {
+        window.PutChar(ACS_LLCORNER);
+        window.PutChar(ACS_HLINE);
+      } else {
+        window.PutChar(' ');
+        window.PutChar(' ');
+      }
+    } else {
+      if (reverse_depth == 0) {
+        window.PutChar(ACS_LTEE);
+        window.PutChar(ACS_HLINE);
+      } else {
+        window.PutChar(ACS_VLINE);
+        window.PutChar(' ');
+      }
+    }
+  }
+
+  TreeItem *GetItemForRowIndex(uint32_t row_idx) {
+    if (static_cast<uint32_t>(m_row_idx) == row_idx)
+      return this;
+    if (m_children.empty())
+      return nullptr;
+    if (IsExpanded()) {
+      for (auto &item : m_children) {
+        TreeItem *selected_item_ptr = item.GetItemForRowIndex(row_idx);
+        if (selected_item_ptr)
+          return selected_item_ptr;
+      }
+    }
+    return nullptr;
+  }
+
+  void *GetUserData() const { return m_user_data; }
+
+  void SetUserData(void *user_data) { m_user_data = user_data; }
+
+  uint64_t GetIdentifier() const { return m_identifier; }
+
+  void SetIdentifier(uint64_t identifier) { m_identifier = identifier; }
+
+  void SetMightHaveChildren(bool b) { m_might_have_children = b; }
+
+protected:
+  TreeItem *m_parent;
+  TreeDelegate &m_delegate;
+  void *m_user_data;
+  uint64_t m_identifier;
+  int m_row_idx; // Zero based visible row index, -1 if not visible or for the
+                 // root item
+  std::vector<TreeItem> m_children;
+  bool m_might_have_children;
+  bool m_is_expanded;
+};
+
+class TreeWindowDelegate : public WindowDelegate {
+public:
+  TreeWindowDelegate(Debugger &debugger, const TreeDelegateSP &delegate_sp)
+      : m_debugger(debugger), m_delegate_sp(delegate_sp),
+        m_root(nullptr, *delegate_sp, true), m_selected_item(nullptr),
+        m_num_rows(0), m_selected_row_idx(0), m_first_visible_row(0),
+        m_min_x(0), m_min_y(0), m_max_x(0), m_max_y(0) {}
+
+  int NumVisibleRows() const { return m_max_y - m_min_y; }
+
+  bool WindowDelegateDraw(Window &window, bool force) override {
+    ExecutionContext exe_ctx(
+        m_debugger.GetCommandInterpreter().GetExecutionContext());
+    Process *process = exe_ctx.GetProcessPtr();
+
+    bool display_content = false;
+    if (process) {
+      StateType state = process->GetState();
+      if (StateIsStoppedState(state, true)) {
+        // We are stopped, so it is ok to
+        display_content = true;
+      } else if (StateIsRunningState(state)) {
+        return true; // Don't do any updating when we are running
+      }
+    }
+
+    m_min_x = 2;
+    m_min_y = 1;
+    m_max_x = window.GetWidth() - 1;
+    m_max_y = window.GetHeight() - 1;
+
+    window.Erase();
+    window.DrawTitleBox(window.GetName());
+
+    if (display_content) {
+      const int num_visible_rows = NumVisibleRows();
+      m_num_rows = 0;
+      m_root.CalculateRowIndexes(m_num_rows);
+
+      // If we unexpanded while having something selected our total number of
+      // rows is less than the num visible rows, then make sure we show all the
+      // rows by setting the first visible row accordingly.
+      if (m_first_visible_row > 0 && m_num_rows < num_visible_rows)
+        m_first_visible_row = 0;
+
+      // Make sure the selected row is always visible
+      if (m_selected_row_idx < m_first_visible_row)
+        m_first_visible_row = m_selected_row_idx;
+      else if (m_first_visible_row + num_visible_rows <= m_selected_row_idx)
+        m_first_visible_row = m_selected_row_idx - num_visible_rows + 1;
+
+      int row_idx = 0;
+      int num_rows_left = num_visible_rows;
+      m_root.Draw(window, m_first_visible_row, m_selected_row_idx, row_idx,
+                  num_rows_left);
+      // Get the selected row
+      m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
+    } else {
+      m_selected_item = nullptr;
+    }
+
+    return true; // Drawing handled
+  }
+
+  const char *WindowDelegateGetHelpText() override {
+    return "Thread window keyboard shortcuts:";
+  }
+
+  KeyHelp *WindowDelegateGetKeyHelp() override {
+    static curses::KeyHelp g_source_view_key_help[] = {
+        {KEY_UP, "Select previous item"},
+        {KEY_DOWN, "Select next item"},
+        {KEY_RIGHT, "Expand the selected item"},
+        {KEY_LEFT,
+         "Unexpand the selected item or select parent if not expanded"},
+        {KEY_PPAGE, "Page up"},
+        {KEY_NPAGE, "Page down"},
+        {'h', "Show help dialog"},
+        {' ', "Toggle item expansion"},
+        {',', "Page up"},
+        {'.', "Page down"},
+        {'\0', nullptr}};
+    return g_source_view_key_help;
+  }
+
+  HandleCharResult WindowDelegateHandleChar(Window &window, int c) override {
+    switch (c) {
+    case ',':
+    case KEY_PPAGE:
+      // Page up key
+      if (m_first_visible_row > 0) {
+        if (m_first_visible_row > m_max_y)
+          m_first_visible_row -= m_max_y;
+        else
+          m_first_visible_row = 0;
+        m_selected_row_idx = m_first_visible_row;
+        m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
+        if (m_selected_item)
+          m_selected_item->ItemWasSelected();
+      }
+      return eKeyHandled;
+
+    case '.':
+    case KEY_NPAGE:
+      // Page down key
+      if (m_num_rows > m_max_y) {
+        if (m_first_visible_row + m_max_y < m_num_rows) {
+          m_first_visible_row += m_max_y;
+          m_selected_row_idx = m_first_visible_row;
+          m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
+          if (m_selected_item)
+            m_selected_item->ItemWasSelected();
+        }
+      }
+      return eKeyHandled;
+
+    case KEY_UP:
+      if (m_selected_row_idx > 0) {
+        --m_selected_row_idx;
+        m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
+        if (m_selected_item)
+          m_selected_item->ItemWasSelected();
+      }
+      return eKeyHandled;
+
+    case KEY_DOWN:
+      if (m_selected_row_idx + 1 < m_num_rows) {
+        ++m_selected_row_idx;
+        m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
+        if (m_selected_item)
+          m_selected_item->ItemWasSelected();
+      }
+      return eKeyHandled;
+
+    case KEY_RIGHT:
+      if (m_selected_item) {
+        if (!m_selected_item->IsExpanded())
+          m_selected_item->Expand();
+      }
+      return eKeyHandled;
+
+    case KEY_LEFT:
+      if (m_selected_item) {
+        if (m_selected_item->IsExpanded())
+          m_selected_item->Unexpand();
+        else if (m_selected_item->GetParent()) {
+          m_selected_row_idx = m_selected_item->GetParent()->GetRowIndex();
+          m_selected_item = m_root.GetItemForRowIndex(m_selected_row_idx);
+          if (m_selected_item)
+            m_selected_item->ItemWasSelected();
+        }
+      }
+      return eKeyHandled;
+
+    case ' ':
+      // Toggle expansion state when SPACE is pressed
+      if (m_selected_item) {
+        if (m_selected_item->IsExpanded())
+          m_selected_item->Unexpand();
+        else
+          m_selected_item->Expand();
+      }
+      return eKeyHandled;
+
+    case 'h':
+      window.CreateHelpSubwindow();
+      return eKeyHandled;
+
+    default:
+      break;
+    }
+    return eKeyNotHandled;
+  }
+
+protected:
+  Debugger &m_debugger;
+  TreeDelegateSP m_delegate_sp;
+  TreeItem m_root;
+  TreeItem *m_selected_item;
+  int m_num_rows;
+  int m_selected_row_idx;
+  int m_first_visible_row;
+  int m_min_x;
+  int m_min_y;
+  int m_max_x;
+  int m_max_y;
+};
+
+class FrameTreeDelegate : public TreeDelegate {
+public:
+  FrameTreeDelegate() : TreeDelegate() {
+    FormatEntity::Parse(
+        "frame #${frame.index}: {${function.name}${function.pc-offset}}}",
+        m_format);
+  }
+
+  ~FrameTreeDelegate() override = default;
+
+  void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
+    Thread *thread = (Thread *)item.GetUserData();
+    if (thread) {
+      const uint64_t frame_idx = item.GetIdentifier();
+      StackFrameSP frame_sp = thread->GetStackFrameAtIndex(frame_idx);
+      if (frame_sp) {
+        StreamString strm;
+        const SymbolContext &sc =
+            frame_sp->GetSymbolContext(eSymbolContextEverything);
+        ExecutionContext exe_ctx(frame_sp);
+        if (FormatEntity::Format(m_format, strm, &sc, &exe_ctx, nullptr,
+                                 nullptr, false, false)) {
+          int right_pad = 1;
+          window.PutCStringTruncated(strm.GetString().str().c_str(), right_pad);
+        }
+      }
+    }
+  }
+
+  void TreeDelegateGenerateChildren(TreeItem &item) override {
+    // No children for frames yet...
+  }
+
+  bool TreeDelegateItemSelected(TreeItem &item) override {
+    Thread *thread = (Thread *)item.GetUserData();
+    if (thread) {
+      thread->GetProcess()->GetThreadList().SetSelectedThreadByID(
+          thread->GetID());
+      const uint64_t frame_idx = item.GetIdentifier();
+      thread->SetSelectedFrameByIndex(frame_idx);
+      return true;
+    }
+    return false;
+  }
+
+protected:
+  FormatEntity::Entry m_format;
+};
+
+class ThreadTreeDelegate : public TreeDelegate {
+public:
+  ThreadTreeDelegate(Debugger &debugger)
+      : TreeDelegate(), m_debugger(debugger), m_tid(LLDB_INVALID_THREAD_ID),
+        m_stop_id(UINT32_MAX) {
+    FormatEntity::Parse("thread #${thread.index}: tid = ${thread.id}{, stop "
+                        "reason = ${thread.stop-reason}}",
+                        m_format);
+  }
+
+  ~ThreadTreeDelegate() override = default;
+
+  ProcessSP GetProcess() {
+    return m_debugger.GetCommandInterpreter()
+        .GetExecutionContext()
+        .GetProcessSP();
+  }
+
+  ThreadSP GetThread(const TreeItem &item) {
+    ProcessSP process_sp = GetProcess();
+    if (process_sp)
+      return process_sp->GetThreadList().FindThreadByID(item.GetIdentifier());
+    return ThreadSP();
+  }
+
+  void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
+    ThreadSP thread_sp = GetThread(item);
+    if (thread_sp) {
+      StreamString strm;
+      ExecutionContext exe_ctx(thread_sp);
+      if (FormatEntity::Format(m_format, strm, nullptr, &exe_ctx, nullptr,
+                               nullptr, false, false)) {
+        int right_pad = 1;
+        window.PutCStringTruncated(strm.GetString().str().c_str(), right_pad);
+      }
+    }
+  }
+
+  void TreeDelegateGenerateChildren(TreeItem &item) override {
+    ProcessSP process_sp = GetProcess();
+    if (process_sp && process_sp->IsAlive()) {
+      StateType state = process_sp->GetState();
+      if (StateIsStoppedState(state, true)) {
+        ThreadSP thread_sp = GetThread(item);
+        if (thread_sp) {
+          if (m_stop_id == process_sp->GetStopID() &&
+              thread_sp->GetID() == m_tid)
+            return; // Children are already up to date
+          if (!m_frame_delegate_sp) {
+            // Always expand the thread item the first time we show it
+            m_frame_delegate_sp = std::make_shared<FrameTreeDelegate>();
+          }
+
+          m_stop_id = process_sp->GetStopID();
+          m_tid = thread_sp->GetID();
+
+          TreeItem t(&item, *m_frame_delegate_sp, false);
+          size_t num_frames = thread_sp->GetStackFrameCount();
+          item.Resize(num_frames, t);
+          for (size_t i = 0; i < num_frames; ++i) {
+            item[i].SetUserData(thread_sp.get());
+            item[i].SetIdentifier(i);
+          }
+        }
+        return;
+      }
+    }
+    item.ClearChildren();
+  }
+
+  bool TreeDelegateItemSelected(TreeItem &item) override {
+    ProcessSP process_sp = GetProcess();
+    if (process_sp && process_sp->IsAlive()) {
+      StateType state = process_sp->GetState();
+      if (StateIsStoppedState(state, true)) {
+        ThreadSP thread_sp = GetThread(item);
+        if (thread_sp) {
+          ThreadList &thread_list = thread_sp->GetProcess()->GetThreadList();
+          std::lock_guard<std::recursive_mutex> guard(thread_list.GetMutex());
+          ThreadSP selected_thread_sp = thread_list.GetSelectedThread();
+          if (selected_thread_sp->GetID() != thread_sp->GetID()) {
+            thread_list.SetSelectedThreadByID(thread_sp->GetID());
+            return true;
+          }
+        }
+      }
+    }
+    return false;
+  }
+
+protected:
+  Debugger &m_debugger;
+  std::shared_ptr<FrameTreeDelegate> m_frame_delegate_sp;
+  lldb::user_id_t m_tid;
+  uint32_t m_stop_id;
+  FormatEntity::Entry m_format;
+};
+
+class ThreadsTreeDelegate : public TreeDelegate {
+public:
+  ThreadsTreeDelegate(Debugger &debugger)
+      : TreeDelegate(), m_thread_delegate_sp(), m_debugger(debugger),
+        m_stop_id(UINT32_MAX) {
+    FormatEntity::Parse("process ${process.id}{, name = ${process.name}}",
+                        m_format);
+  }
+
+  ~ThreadsTreeDelegate() override = default;
+
+  ProcessSP GetProcess() {
+    return m_debugger.GetCommandInterpreter()
+        .GetExecutionContext()
+        .GetProcessSP();
+  }
+
+  void TreeDelegateDrawTreeItem(TreeItem &item, Window &window) override {
+    ProcessSP process_sp = GetProcess();
+    if (process_sp && process_sp->IsAlive()) {
+      StreamString strm;
+      ExecutionContext exe_ctx(process_sp);
+      if (FormatEntity::Format(m_format, strm, nullptr, &exe_ctx, nullptr,
+                               nullptr, false, false)) {
+        int right_pad = 1;
+        window.PutCStringTruncated(strm.GetString().str().c_str(), right_pad);
+      }
+    }
+  }
+
+  void TreeDelegateGenerateChildren(TreeItem &item) override {
+    ProcessSP process_sp = GetProcess();
+    if (process_sp && process_sp->IsAlive()) {
+      StateType state = process_sp->GetState();
+      if (StateIsStoppedState(state, true)) {
+        const uint32_t stop_id = process_sp->GetStopID();
+        if (m_stop_id == stop_id)
+          return; // Children are already up to date
+
+        m_stop_id = stop_id;
+
+        if (!m_thread_delegate_sp) {
+          // Always expand the thread item the first time we show it
+          // item.Expand();
+          m_thread_delegate_sp =
+              std::make_shared<ThreadTreeDelegate>(m_debugger);
+        }
+
+        TreeItem t(&item, *m_thread_delegate_sp, false);
+        ThreadList &threads = process_sp->GetThreadList();
+        std::lock_guard<std::recursive_mutex> guard(threads.GetMutex());
+        size_t num_threads = threads.GetSize();
+        item.Resize(num_threads, t);
+        for (size_t i = 0; i < num_threads; ++i) {
+          item[i].SetIdentifier(threads.GetThreadAtIndex(i)->GetID());
+          item[i].SetMightHaveChildren(true);
+        }
+        return;
+      }
+    }
+    item.ClearChildren();
+  }
+
+  bool TreeDelegateItemSelected(TreeItem &item) override { return false; }
+
+protected:
+  std::shared_ptr<ThreadTreeDelegate> m_thread_delegate_sp;
+  Debugger &m_debugger;
+  uint32_t m_stop_id;
+  FormatEntity::Entry m_format;
+};
+
+class ValueObjectListDelegate : public WindowDelegate {
+public:
+  ValueObjectListDelegate()
+      : m_rows(), m_selected_row(nullptr), m_selected_row_idx(0),
+        m_first_visible_row(0), m_num_rows(0), m_max_x(0), m_max_y(0) {}
+
+  ValueObjectListDelegate(ValueObjectList &valobj_list)
+      : m_rows(), m_selected_row(nullptr), m_selected_row_idx(0),
+        m_first_visible_row(0), m_num_rows(0), m_max_x(0), m_max_y(0) {
+    SetValues(valobj_list);
+  }
+
+  ~ValueObjectListDelegate() override = default;
+
+  void SetValues(ValueObjectList &valobj_list) {
+    m_selected_row = nullptr;
+    m_selected_row_idx = 0;
+    m_first_visible_row = 0;
+    m_num_rows = 0;
+    m_rows.clear();
+    for (auto &valobj_sp : valobj_list.GetObjects())
+      m_rows.push_back(Row(valobj_sp, nullptr));
+  }
+
+  bool WindowDelegateDraw(Window &window, bool force) override {
+    m_num_rows = 0;
+    m_min_x = 2;
+    m_min_y = 1;
+    m_max_x = window.GetWidth() - 1;
+    m_max_y = window.GetHeight() - 1;
+
+    window.Erase();
+    window.DrawTitleBox(window.GetName());
+
+    const int num_visible_rows = NumVisibleRows();
+    const int num_rows = CalculateTotalNumberRows(m_rows);
+
+    // If we unexpanded while having something selected our total number of
+    // rows is less than the num visible rows, then make sure we show all the
+    // rows by setting the first visible row accordingly.
+    if (m_first_visible_row > 0 && num_rows < num_visible_rows)
+      m_first_visible_row = 0;
+
+    // Make sure the selected row is always visible
+    if (m_selected_row_idx < m_first_visible_row)
+      m_first_visible_row = m_selected_row_idx;
+    else if (m_first_visible_row + num_visible_rows <= m_selected_row_idx)
+      m_first_visible_row = m_selected_row_idx - num_visible_rows + 1;
+
+    DisplayRows(window, m_rows, g_options);
+
+    // Get the selected row
+    m_selected_row = GetRowForRowIndex(m_selected_row_idx);
+    // Keep the cursor on the selected row so the highlight and the cursor are
+    // always on the same line
+    if (m_selected_row)
+      window.MoveCursor(m_selected_row->x, m_selected_row->y);
+
+    return true; // Drawing handled
+  }
+
+  KeyHelp *WindowDelegateGetKeyHelp() override {
+    static curses::KeyHelp g_source_view_key_help[] = {
+        {KEY_UP, "Select previous item"},
+        {KEY_DOWN, "Select next item"},
+        {KEY_RIGHT, "Expand selected item"},
+        {KEY_LEFT, "Unexpand selected item or select parent if not expanded"},
+        {KEY_PPAGE, "Page up"},
+        {KEY_NPAGE, "Page down"},
+        {'A', "Format as annotated address"},
+        {'b', "Format as binary"},
+        {'B', "Format as hex bytes with ASCII"},
+        {'c', "Format as character"},
+        {'d', "Format as a signed integer"},
+        {'D', "Format selected value using the default format for the type"},
+        {'f', "Format as float"},
+        {'h', "Show help dialog"},
+        {'i', "Format as instructions"},
+        {'o', "Format as octal"},
+        {'p', "Format as pointer"},
+        {'s', "Format as C string"},
+        {'t', "Toggle showing/hiding type names"},
+        {'u', "Format as an unsigned integer"},
+        {'x', "Format as hex"},
+        {'X', "Format as uppercase hex"},
+        {' ', "Toggle item expansion"},
+        {',', "Page up"},
+        {'.', "Page down"},
+        {'\0', nullptr}};
+    return g_source_view_key_help;
+  }
+
+  HandleCharResult WindowDelegateHandleChar(Window &window, int c) override {
+    switch (c) {
+    case 'x':
+    case 'X':
+    case 'o':
+    case 's':
+    case 'u':
+    case 'd':
+    case 'D':
+    case 'i':
+    case 'A':
+    case 'p':
+    case 'c':
+    case 'b':
+    case 'B':
+    case 'f':
+      // Change the format for the currently selected item
+      if (m_selected_row) {
+        auto valobj_sp = m_selected_row->value.GetSP();
+        if (valobj_sp)
+          valobj_sp->SetFormat(FormatForChar(c));
+      }
+      return eKeyHandled;
+
+    case 't':
+      // Toggle showing type names
+      g_options.show_types = !g_options.show_types;
+      return eKeyHandled;
+
+    case ',':
+    case KEY_PPAGE:
+      // Page up key
+      if (m_first_visible_row > 0) {
+        if (static_cast<int>(m_first_visible_row) > m_max_y)
+          m_first_visible_row -= m_max_y;
+        else
+          m_first_visible_row = 0;
+        m_selected_row_idx = m_first_visible_row;
+      }
+      return eKeyHandled;
+
+    case '.':
+    case KEY_NPAGE:
+      // Page down key
+      if (m_num_rows > static_cast<size_t>(m_max_y)) {
+        if (m_first_visible_row + m_max_y < m_num_rows) {
+          m_first_visible_row += m_max_y;
+          m_selected_row_idx = m_first_visible_row;
+        }
+      }
+      return eKeyHandled;
+
+    case KEY_UP:
+      if (m_selected_row_idx > 0)
+        --m_selected_row_idx;
+      return eKeyHandled;
+
+    case KEY_DOWN:
+      if (m_selected_row_idx + 1 < m_num_rows)
+        ++m_selected_row_idx;
+      return eKeyHandled;
+
+    case KEY_RIGHT:
+      if (m_selected_row) {
+        if (!m_selected_row->expanded)
+          m_selected_row->Expand();
+      }
+      return eKeyHandled;
+
+    case KEY_LEFT:
+      if (m_selected_row) {
+        if (m_selected_row->expanded)
+          m_selected_row->Unexpand();
+        else if (m_selected_row->parent)
+          m_selected_row_idx = m_selected_row->parent->row_idx;
+      }
+      return eKeyHandled;
+
+    case ' ':
+      // Toggle expansion state when SPACE is pressed
+      if (m_selected_row) {
+        if (m_selected_row->expanded)
+          m_selected_row->Unexpand();
+        else
+          m_selected_row->Expand();
+      }
+      return eKeyHandled;
+
+    case 'h':
+      window.CreateHelpSubwindow();
+      return eKeyHandled;
+
+    default:
+      break;
+    }
+    return eKeyNotHandled;
+  }
+
+protected:
+  std::vector<Row> m_rows;
+  Row *m_selected_row;
+  uint32_t m_selected_row_idx;
+  uint32_t m_first_visible_row;
+  uint32_t m_num_rows;
+  int m_min_x;
+  int m_min_y;
+  int m_max_x;
+  int m_max_y;
+
+  static Format FormatForChar(int c) {
+    switch (c) {
+    case 'x':
+      return eFormatHex;
+    case 'X':
+      return eFormatHexUppercase;
+    case 'o':
+      return eFormatOctal;
+    case 's':
+      return eFormatCString;
+    case 'u':
+      return eFormatUnsigned;
+    case 'd':
+      return eFormatDecimal;
+    case 'D':
+      return eFormatDefault;
+    case 'i':
+      return eFormatInstruction;
+    case 'A':
+      return eFormatAddressInfo;
+    case 'p':
+      return eFormatPointer;
+    case 'c':
+      return eFormatChar;
+    case 'b':
+      return eFormatBinary;
+    case 'B':
+      return eFormatBytesWithASCII;
+    case 'f':
+      return eFormatFloat;
+    }
+    return eFormatDefault;
+  }
+
+  bool DisplayRowObject(Window &window, Row &row, DisplayOptions &options,
+                        bool highlight, bool last_child) {
+    ValueObject *valobj = row.value.GetSP().get();
+
+    if (valobj == nullptr)
+      return false;
+
+    const char *type_name =
+        options.show_types ? valobj->GetTypeName().GetCString() : nullptr;
+    const char *name = valobj->GetName().GetCString();
+    const char *value = valobj->GetValueAsCString();
+    const char *summary = valobj->GetSummaryAsCString();
+
+    window.MoveCursor(row.x, row.y);
+
+    row.DrawTree(window);
+
+    if (highlight)
+      window.AttributeOn(A_REVERSE);
+
+    if (type_name && type_name[0])
+      window.Printf("(%s) ", type_name);
+
+    if (name && name[0])
+      window.PutCString(name);
+
+    attr_t changd_attr = 0;
+    if (valobj->GetValueDidChange())
+      changd_attr = COLOR_PAIR(5) | A_BOLD;
+
+    if (value && value[0]) {
+      window.PutCString(" = ");
+      if (changd_attr)
+        window.AttributeOn(changd_attr);
+      window.PutCString(value);
+      if (changd_attr)
+        window.AttributeOff(changd_attr);
+    }
+
+    if (summary && summary[0]) {
+      window.PutChar(' ');
+      if (changd_attr)
+        window.AttributeOn(changd_attr);
+      window.PutCString(summary);
+      if (changd_attr)
+        window.AttributeOff(changd_attr);
+    }
+
+    if (highlight)
+      window.AttributeOff(A_REVERSE);
+
+    return true;
+  }
+
+  void DisplayRows(Window &window, std::vector<Row> &rows,
+                   DisplayOptions &options) {
+    // >   0x25B7
+    // \/  0x25BD
+
+    bool window_is_active = window.IsActive();
+    for (auto &row : rows) {
+      const bool last_child = row.parent && &rows[rows.size() - 1] == &row;
+      // Save the row index in each Row structure
+      row.row_idx = m_num_rows;
+      if ((m_num_rows >= m_first_visible_row) &&
+          ((m_num_rows - m_first_visible_row) <
+           static_cast<size_t>(NumVisibleRows()))) {
+        row.x = m_min_x;
+        row.y = m_num_rows - m_first_visible_row + 1;
+        if (DisplayRowObject(window, row, options,
+                             window_is_active &&
+                                 m_num_rows == m_selected_row_idx,
+                             last_child)) {
+          ++m_num_rows;
+        } else {
+          row.x = 0;
+          row.y = 0;
+        }
+      } else {
+        row.x = 0;
+        row.y = 0;
+        ++m_num_rows;
+      }
+
+      auto &children = row.GetChildren();
+      if (row.expanded && !children.empty()) {
+        DisplayRows(window, children, options);
+      }
+    }
+  }
+
+  int CalculateTotalNumberRows(std::vector<Row> &rows) {
+    int row_count = 0;
+    for (auto &row : rows) {
+      ++row_count;
+      if (row.expanded)
+        row_count += CalculateTotalNumberRows(row.GetChildren());
+    }
+    return row_count;
+  }
+
+  static Row *GetRowForRowIndexImpl(std::vector<Row> &rows, size_t &row_index) {
+    for (auto &row : rows) {
+      if (row_index == 0)
+        return &row;
+      else {
+        --row_index;
+        auto &children = row.GetChildren();
+        if (row.expanded && !children.empty()) {
+          Row *result = GetRowForRowIndexImpl(children, row_index);
+          if (result)
+            return result;
+        }
+      }
+    }
+    return nullptr;
+  }
+
+  Row *GetRowForRowIndex(size_t row_index) {
+    return GetRowForRowIndexImpl(m_rows, row_index);
+  }
+
+  int NumVisibleRows() const { return m_max_y - m_min_y; }
+
+  static DisplayOptions g_options;
+};
+
+class FrameVariablesWindowDelegate : public ValueObjectListDelegate {
+public:
+  FrameVariablesWindowDelegate(Debugger &debugger)
+      : ValueObjectListDelegate(), m_debugger(debugger),
+        m_frame_block(nullptr) {}
+
+  ~FrameVariablesWindowDelegate() override = default;
+
+  const char *WindowDelegateGetHelpText() override {
+    return "Frame variable window keyboard shortcuts:";
+  }
+
+  bool WindowDelegateDraw(Window &window, bool force) override {
+    ExecutionContext exe_ctx(
+        m_debugger.GetCommandInterpreter().GetExecutionContext());
+    Process *process = exe_ctx.GetProcessPtr();
+    Block *frame_block = nullptr;
+    StackFrame *frame = nullptr;
+
+    if (process) {
+      StateType state = process->GetState();
+      if (StateIsStoppedState(state, true)) {
+        frame = exe_ctx.GetFramePtr();
+        if (frame)
+          frame_block = frame->GetFrameBlock();
+      } else if (StateIsRunningState(state)) {
+        return true; // Don't do any updating when we are running
+      }
+    }
+
+    ValueObjectList local_values;
+    if (frame_block) {
+      // Only update the variables if they have changed
+      if (m_frame_block != frame_block) {
+        m_frame_block = frame_block;
+
+        VariableList *locals = frame->GetVariableList(true);
+        if (locals) {
+          const DynamicValueType use_dynamic = eDynamicDontRunTarget;
+          for (const VariableSP &local_sp : *locals) {
+            ValueObjectSP value_sp =
+                frame->GetValueObjectForFrameVariable(local_sp, use_dynamic);
+            if (value_sp) {
+              ValueObjectSP synthetic_value_sp = value_sp->GetSyntheticValue();
+              if (synthetic_value_sp)
+                local_values.Append(synthetic_value_sp);
+              else
+                local_values.Append(value_sp);
+            }
+          }
+          // Update the values
+          SetValues(local_values);
+        }
+      }
+    } else {
+      m_frame_block = nullptr;
+      // Update the values with an empty list if there is no frame
+      SetValues(local_values);
+    }
+
+    return ValueObjectListDelegate::WindowDelegateDraw(window, force);
+  }
+
+protected:
+  Debugger &m_debugger;
+  Block *m_frame_block;
+};
+
+class RegistersWindowDelegate : public ValueObjectListDelegate {
+public:
+  RegistersWindowDelegate(Debugger &debugger)
+      : ValueObjectListDelegate(), m_debugger(debugger) {}
+
+  ~RegistersWindowDelegate() override = default;
+
+  const char *WindowDelegateGetHelpText() override {
+    return "Register window keyboard shortcuts:";
+  }
+
+  bool WindowDelegateDraw(Window &window, bool force) override {
+    ExecutionContext exe_ctx(
+        m_debugger.GetCommandInterpreter().GetExecutionContext());
+    StackFrame *frame = exe_ctx.GetFramePtr();
+
+    ValueObjectList value_list;
+    if (frame) {
+      if (frame->GetStackID() != m_stack_id) {
+        m_stack_id = frame->GetStackID();
+        RegisterContextSP reg_ctx(frame->GetRegisterContext());
+        if (reg_ctx) {
+          const uint32_t num_sets = reg_ctx->GetRegisterSetCount();
+          for (uint32_t set_idx = 0; set_idx < num_sets; ++set_idx) {
+            value_list.Append(
+                ValueObjectRegisterSet::Create(frame, reg_ctx, set_idx));
+          }
+        }
+        SetValues(value_list);
+      }
+    } else {
+      Process *process = exe_ctx.GetProcessPtr();
+      if (process && process->IsAlive())
+        return true; // Don't do any updating if we are running
+      else {
+        // Update the values with an empty list if there is no process or the
+        // process isn't alive anymore
+        SetValues(value_list);
+      }
+    }
+    return ValueObjectListDelegate::WindowDelegateDraw(window, force);
+  }
+
+protected:
+  Debugger &m_debugger;
+  StackID m_stack_id;
+};
+
+static const char *CursesKeyToCString(int ch) {
+  static char g_desc[32];
+  if (ch >= KEY_F0 && ch < KEY_F0 + 64) {
+    snprintf(g_desc, sizeof(g_desc), "F%u", ch - KEY_F0);
+    return g_desc;
+  }
+  switch (ch) {
+  case KEY_DOWN:
+    return "down";
+  case KEY_UP:
+    return "up";
+  case KEY_LEFT:
+    return "left";
+  case KEY_RIGHT:
+    return "right";
+  case KEY_HOME:
+    return "home";
+  case KEY_BACKSPACE:
+    return "backspace";
+  case KEY_DL:
+    return "delete-line";
+  case KEY_IL:
+    return "insert-line";
+  case KEY_DC:
+    return "delete-char";
+  case KEY_IC:
+    return "insert-char";
+  case KEY_CLEAR:
+    return "clear";
+  case KEY_EOS:
+    return "clear-to-eos";
+  case KEY_EOL:
+    return "clear-to-eol";
+  case KEY_SF:
+    return "scroll-forward";
+  case KEY_SR:
+    return "scroll-backward";
+  case KEY_NPAGE:
+    return "page-down";
+  case KEY_PPAGE:
+    return "page-up";
+  case KEY_STAB:
+    return "set-tab";
+  case KEY_CTAB:
+    return "clear-tab";
+  case KEY_CATAB:
+    return "clear-all-tabs";
+  case KEY_ENTER:
+    return "enter";
+  case KEY_PRINT:
+    return "print";
+  case KEY_LL:
+    return "lower-left key";
+  case KEY_A1:
+    return "upper left of keypad";
+  case KEY_A3:
+    return "upper right of keypad";
+  case KEY_B2:
+    return "center of keypad";
+  case KEY_C1:
+    return "lower left of keypad";
+  case KEY_C3:
+    return "lower right of keypad";
+  case KEY_BTAB:
+    return "back-tab key";
+  case KEY_BEG:
+    return "begin key";
+  case KEY_CANCEL:
+    return "cancel key";
+  case KEY_CLOSE:
+    return "close key";
+  case KEY_COMMAND:
+    return "command key";
+  case KEY_COPY:
+    return "copy key";
+  case KEY_CREATE:
+    return "create key";
+  case KEY_END:
+    return "end key";
+  case KEY_EXIT:
+    return "exit key";
+  case KEY_FIND:
+    return "find key";
+  case KEY_HELP:
+    return "help key";
+  case KEY_MARK:
+    return "mark key";
+  case KEY_MESSAGE:
+    return "message key";
+  case KEY_MOVE:
+    return "move key";
+  case KEY_NEXT:
+    return "next key";
+  case KEY_OPEN:
+    return "open key";
+  case KEY_OPTIONS:
+    return "options key";
+  case KEY_PREVIOUS:
+    return "previous key";
+  case KEY_REDO:
+    return "redo key";
+  case KEY_REFERENCE:
+    return "reference key";
+  case KEY_REFRESH:
+    return "refresh key";
+  case KEY_REPLACE:
+    return "replace key";
+  case KEY_RESTART:
+    return "restart key";
+  case KEY_RESUME:
+    return "resume key";
+  case KEY_SAVE:
+    return "save key";
+  case KEY_SBEG:
+    return "shifted begin key";
+  case KEY_SCANCEL:
+    return "shifted cancel key";
+  case KEY_SCOMMAND:
+    return "shifted command key";
+  case KEY_SCOPY:
+    return "shifted copy key";
+  case KEY_SCREATE:
+    return "shifted create key";
+  case KEY_SDC:
+    return "shifted delete-character key";
+  case KEY_SDL:
+    return "shifted delete-line key";
+  case KEY_SELECT:
+    return "select key";
+  case KEY_SEND:
+    return "shifted end key";
+  case KEY_SEOL:
+    return "shifted clear-to-end-of-line key";
+  case KEY_SEXIT:
+    return "shifted exit key";
+  case KEY_SFIND:
+    return "shifted find key";
+  case KEY_SHELP:
+    return "shifted help key";
+  case KEY_SHOME:
+    return "shifted home key";
+  case KEY_SIC:
+    return "shifted insert-character key";
+  case KEY_SLEFT:
+    return "shifted left-arrow key";
+  case KEY_SMESSAGE:
+    return "shifted message key";
+  case KEY_SMOVE:
+    return "shifted move key";
+  case KEY_SNEXT:
+    return "shifted next key";
+  case KEY_SOPTIONS:
+    return "shifted options key";
+  case KEY_SPREVIOUS:
+    return "shifted previous key";
+  case KEY_SPRINT:
+    return "shifted print key";
+  case KEY_SREDO:
+    return "shifted redo key";
+  case KEY_SREPLACE:
+    return "shifted replace key";
+  case KEY_SRIGHT:
+    return "shifted right-arrow key";
+  case KEY_SRSUME:
+    return "shifted resume key";
+  case KEY_SSAVE:
+    return "shifted save key";
+  case KEY_SSUSPEND:
+    return "shifted suspend key";
+  case KEY_SUNDO:
+    return "shifted undo key";
+  case KEY_SUSPEND:
+    return "suspend key";
+  case KEY_UNDO:
+    return "undo key";
+  case KEY_MOUSE:
+    return "Mouse event has occurred";
+  case KEY_RESIZE:
+    return "Terminal resize event";
+#ifdef KEY_EVENT
+  case KEY_EVENT:
+    return "We were interrupted by an event";
+#endif
+  case KEY_RETURN:
+    return "return";
+  case ' ':
+    return "space";
+  case '\t':
+    return "tab";
+  case KEY_ESCAPE:
+    return "escape";
+  default:
+    if (isprint(ch))
+      snprintf(g_desc, sizeof(g_desc), "%c", ch);
+    else
+      snprintf(g_desc, sizeof(g_desc), "\\x%2.2x", ch);
+    return g_desc;
+  }
+  return nullptr;
+}
+
+HelpDialogDelegate::HelpDialogDelegate(const char *text,
+                                       KeyHelp *key_help_array)
+    : m_text(), m_first_visible_line(0) {
+  if (text && text[0]) {
+    m_text.SplitIntoLines(text);
+    m_text.AppendString("");
+  }
+  if (key_help_array) {
+    for (KeyHelp *key = key_help_array; key->ch; ++key) {
+      StreamString key_description;
+      key_description.Printf("%10s - %s", CursesKeyToCString(key->ch),
+                             key->description);
+      m_text.AppendString(key_description.GetString());
+    }
+  }
+}
+
+HelpDialogDelegate::~HelpDialogDelegate() = default;
+
+bool HelpDialogDelegate::WindowDelegateDraw(Window &window, bool force) {
+  window.Erase();
+  const int window_height = window.GetHeight();
+  int x = 2;
+  int y = 1;
+  const int min_y = y;
+  const int max_y = window_height - 1 - y;
+  const size_t num_visible_lines = max_y - min_y + 1;
+  const size_t num_lines = m_text.GetSize();
+  const char *bottom_message;
+  if (num_lines <= num_visible_lines)
+    bottom_message = "Press any key to exit";
+  else
+    bottom_message = "Use arrows to scroll, any other key to exit";
+  window.DrawTitleBox(window.GetName(), bottom_message);
+  while (y <= max_y) {
+    window.MoveCursor(x, y);
+    window.PutCStringTruncated(
+        m_text.GetStringAtIndex(m_first_visible_line + y - min_y), 1);
+    ++y;
+  }
+  return true;
+}
+
+HandleCharResult HelpDialogDelegate::WindowDelegateHandleChar(Window &window,
+                                                              int key) {
+  bool done = false;
+  const size_t num_lines = m_text.GetSize();
+  const size_t num_visible_lines = window.GetHeight() - 2;
+
+  if (num_lines <= num_visible_lines) {
+    done = true;
+    // If we have all lines visible and don't need scrolling, then any key
+    // press will cause us to exit
+  } else {
+    switch (key) {
+    case KEY_UP:
+      if (m_first_visible_line > 0)
+        --m_first_visible_line;
+      break;
+
+    case KEY_DOWN:
+      if (m_first_visible_line + num_visible_lines < num_lines)
+        ++m_first_visible_line;
+      break;
+
+    case KEY_PPAGE:
+    case ',':
+      if (m_first_visible_line > 0) {
+        if (static_cast<size_t>(m_first_visible_line) >= num_visible_lines)
+          m_first_visible_line -= num_visible_lines;
+        else
+          m_first_visible_line = 0;
+      }
+      break;
+
+    case KEY_NPAGE:
+    case '.':
+      if (m_first_visible_line + num_visible_lines < num_lines) {
+        m_first_visible_line += num_visible_lines;
+        if (static_cast<size_t>(m_first_visible_line) > num_lines)
+          m_first_visible_line = num_lines - num_visible_lines;
+      }
+      break;
+
+    default:
+      done = true;
+      break;
+    }
+  }
+  if (done)
+    window.GetParent()->RemoveSubWindow(&window);
+  return eKeyHandled;
+}
+
+class ApplicationDelegate : public WindowDelegate, public MenuDelegate {
+public:
+  enum {
+    eMenuID_LLDB = 1,
+    eMenuID_LLDBAbout,
+    eMenuID_LLDBExit,
+
+    eMenuID_Target,
+    eMenuID_TargetCreate,
+    eMenuID_TargetDelete,
+
+    eMenuID_Process,
+    eMenuID_ProcessAttach,
+    eMenuID_ProcessDetach,
+    eMenuID_ProcessLaunch,
+    eMenuID_ProcessContinue,
+    eMenuID_ProcessHalt,
+    eMenuID_ProcessKill,
+
+    eMenuID_Thread,
+    eMenuID_ThreadStepIn,
+    eMenuID_ThreadStepOver,
+    eMenuID_ThreadStepOut,
+
+    eMenuID_View,
+    eMenuID_ViewBacktrace,
+    eMenuID_ViewRegisters,
+    eMenuID_ViewSource,
+    eMenuID_ViewVariables,
+
+    eMenuID_Help,
+    eMenuID_HelpGUIHelp
+  };
+
+  ApplicationDelegate(Application &app, Debugger &debugger)
+      : WindowDelegate(), MenuDelegate(), m_app(app), m_debugger(debugger) {}
+
+  ~ApplicationDelegate() override = default;
+
+  bool WindowDelegateDraw(Window &window, bool force) override {
+    return false; // Drawing not handled, let standard window drawing happen
+  }
+
+  HandleCharResult WindowDelegateHandleChar(Window &window, int key) override {
+    switch (key) {
+    case '\t':
+      window.SelectNextWindowAsActive();
+      return eKeyHandled;
+
+    case 'h':
+      window.CreateHelpSubwindow();
+      return eKeyHandled;
+
+    case KEY_ESCAPE:
+      return eQuitApplication;
+
+    default:
+      break;
+    }
+    return eKeyNotHandled;
+  }
+
+  const char *WindowDelegateGetHelpText() override {
+    return "Welcome to the LLDB curses GUI.\n\n"
+           "Press the TAB key to change the selected view.\n"
+           "Each view has its own keyboard shortcuts, press 'h' to open a "
+           "dialog to display them.\n\n"
+           "Common key bindings for all views:";
+  }
+
+  KeyHelp *WindowDelegateGetKeyHelp() override {
+    static curses::KeyHelp g_source_view_key_help[] = {
+        {'\t', "Select next view"},
+        {'h', "Show help dialog with view specific key bindings"},
+        {',', "Page up"},
+        {'.', "Page down"},
+        {KEY_UP, "Select previous"},
+        {KEY_DOWN, "Select next"},
+        {KEY_LEFT, "Unexpand or select parent"},
+        {KEY_RIGHT, "Expand"},
+        {KEY_PPAGE, "Page up"},
+        {KEY_NPAGE, "Page down"},
+        {'\0', nullptr}};
+    return g_source_view_key_help;
+  }
+
+  MenuActionResult MenuDelegateAction(Menu &menu) override {
+    switch (menu.GetIdentifier()) {
+    case eMenuID_ThreadStepIn: {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasThreadScope()) {
+        Process *process = exe_ctx.GetProcessPtr();
+        if (process && process->IsAlive() &&
+            StateIsStoppedState(process->GetState(), true))
+          exe_ctx.GetThreadRef().StepIn(true);
+      }
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_ThreadStepOut: {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasThreadScope()) {
+        Process *process = exe_ctx.GetProcessPtr();
+        if (process && process->IsAlive() &&
+            StateIsStoppedState(process->GetState(), true))
+          exe_ctx.GetThreadRef().StepOut();
+      }
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_ThreadStepOver: {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasThreadScope()) {
+        Process *process = exe_ctx.GetProcessPtr();
+        if (process && process->IsAlive() &&
+            StateIsStoppedState(process->GetState(), true))
+          exe_ctx.GetThreadRef().StepOver(true);
+      }
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_ProcessContinue: {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasProcessScope()) {
+        Process *process = exe_ctx.GetProcessPtr();
+        if (process && process->IsAlive() &&
+            StateIsStoppedState(process->GetState(), true))
+          process->Resume();
+      }
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_ProcessKill: {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasProcessScope()) {
+        Process *process = exe_ctx.GetProcessPtr();
+        if (process && process->IsAlive())
+          process->Destroy(false);
+      }
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_ProcessHalt: {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasProcessScope()) {
+        Process *process = exe_ctx.GetProcessPtr();
+        if (process && process->IsAlive())
+          process->Halt();
+      }
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_ProcessDetach: {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasProcessScope()) {
+        Process *process = exe_ctx.GetProcessPtr();
+        if (process && process->IsAlive())
+          process->Detach(false);
+      }
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_Process: {
+      // Populate the menu with all of the threads if the process is stopped
+      // when the Process menu gets selected and is about to display its
+      // submenu.
+      Menus &submenus = menu.GetSubmenus();
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      Process *process = exe_ctx.GetProcessPtr();
+      if (process && process->IsAlive() &&
+          StateIsStoppedState(process->GetState(), true)) {
+        if (submenus.size() == 7)
+          menu.AddSubmenu(MenuSP(new Menu(Menu::Type::Separator)));
+        else if (submenus.size() > 8)
+          submenus.erase(submenus.begin() + 8, submenus.end());
+
+        ThreadList &threads = process->GetThreadList();
+        std::lock_guard<std::recursive_mutex> guard(threads.GetMutex());
+        size_t num_threads = threads.GetSize();
+        for (size_t i = 0; i < num_threads; ++i) {
+          ThreadSP thread_sp = threads.GetThreadAtIndex(i);
+          char menu_char = '\0';
+          if (i < 9)
+            menu_char = '1' + i;
+          StreamString thread_menu_title;
+          thread_menu_title.Printf("Thread %u", thread_sp->GetIndexID());
+          const char *thread_name = thread_sp->GetName();
+          if (thread_name && thread_name[0])
+            thread_menu_title.Printf(" %s", thread_name);
+          else {
+            const char *queue_name = thread_sp->GetQueueName();
+            if (queue_name && queue_name[0])
+              thread_menu_title.Printf(" %s", queue_name);
+          }
+          menu.AddSubmenu(
+              MenuSP(new Menu(thread_menu_title.GetString().str().c_str(),
+                              nullptr, menu_char, thread_sp->GetID())));
+        }
+      } else if (submenus.size() > 7) {
+        // Remove the separator and any other thread submenu items that were
+        // previously added
+        submenus.erase(submenus.begin() + 7, submenus.end());
+      }
+      // Since we are adding and removing items we need to recalculate the name
+      // lengths
+      menu.RecalculateNameLengths();
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_ViewVariables: {
+      WindowSP main_window_sp = m_app.GetMainWindow();
+      WindowSP source_window_sp = main_window_sp->FindSubWindow("Source");
+      WindowSP variables_window_sp = main_window_sp->FindSubWindow("Variables");
+      WindowSP registers_window_sp = main_window_sp->FindSubWindow("Registers");
+      const Rect source_bounds = source_window_sp->GetBounds();
+
+      if (variables_window_sp) {
+        const Rect variables_bounds = variables_window_sp->GetBounds();
+
+        main_window_sp->RemoveSubWindow(variables_window_sp.get());
+
+        if (registers_window_sp) {
+          // We have a registers window, so give all the area back to the
+          // registers window
+          Rect registers_bounds = variables_bounds;
+          registers_bounds.size.width = source_bounds.size.width;
+          registers_window_sp->SetBounds(registers_bounds);
+        } else {
+          // We have no registers window showing so give the bottom area back
+          // to the source view
+          source_window_sp->Resize(source_bounds.size.width,
+                                   source_bounds.size.height +
+                                       variables_bounds.size.height);
+        }
+      } else {
+        Rect new_variables_rect;
+        if (registers_window_sp) {
+          // We have a registers window so split the area of the registers
+          // window into two columns where the left hand side will be the
+          // variables and the right hand side will be the registers
+          const Rect variables_bounds = registers_window_sp->GetBounds();
+          Rect new_registers_rect;
+          variables_bounds.VerticalSplitPercentage(0.50, new_variables_rect,
+                                                   new_registers_rect);
+          registers_window_sp->SetBounds(new_registers_rect);
+        } else {
+          // No variables window, grab the bottom part of the source window
+          Rect new_source_rect;
+          source_bounds.HorizontalSplitPercentage(0.70, new_source_rect,
+                                                  new_variables_rect);
+          source_window_sp->SetBounds(new_source_rect);
+        }
+        WindowSP new_window_sp = main_window_sp->CreateSubWindow(
+            "Variables", new_variables_rect, false);
+        new_window_sp->SetDelegate(
+            WindowDelegateSP(new FrameVariablesWindowDelegate(m_debugger)));
+      }
+      touchwin(stdscr);
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_ViewRegisters: {
+      WindowSP main_window_sp = m_app.GetMainWindow();
+      WindowSP source_window_sp = main_window_sp->FindSubWindow("Source");
+      WindowSP variables_window_sp = main_window_sp->FindSubWindow("Variables");
+      WindowSP registers_window_sp = main_window_sp->FindSubWindow("Registers");
+      const Rect source_bounds = source_window_sp->GetBounds();
+
+      if (registers_window_sp) {
+        if (variables_window_sp) {
+          const Rect variables_bounds = variables_window_sp->GetBounds();
+
+          // We have a variables window, so give all the area back to the
+          // variables window
+          variables_window_sp->Resize(variables_bounds.size.width +
+                                          registers_window_sp->GetWidth(),
+                                      variables_bounds.size.height);
+        } else {
+          // We have no variables window showing so give the bottom area back
+          // to the source view
+          source_window_sp->Resize(source_bounds.size.width,
+                                   source_bounds.size.height +
+                                       registers_window_sp->GetHeight());
+        }
+        main_window_sp->RemoveSubWindow(registers_window_sp.get());
+      } else {
+        Rect new_regs_rect;
+        if (variables_window_sp) {
+          // We have a variables window, split it into two columns where the
+          // left hand side will be the variables and the right hand side will
+          // be the registers
+          const Rect variables_bounds = variables_window_sp->GetBounds();
+          Rect new_vars_rect;
+          variables_bounds.VerticalSplitPercentage(0.50, new_vars_rect,
+                                                   new_regs_rect);
+          variables_window_sp->SetBounds(new_vars_rect);
+        } else {
+          // No registers window, grab the bottom part of the source window
+          Rect new_source_rect;
+          source_bounds.HorizontalSplitPercentage(0.70, new_source_rect,
+                                                  new_regs_rect);
+          source_window_sp->SetBounds(new_source_rect);
+        }
+        WindowSP new_window_sp =
+            main_window_sp->CreateSubWindow("Registers", new_regs_rect, false);
+        new_window_sp->SetDelegate(
+            WindowDelegateSP(new RegistersWindowDelegate(m_debugger)));
+      }
+      touchwin(stdscr);
+    }
+      return MenuActionResult::Handled;
+
+    case eMenuID_HelpGUIHelp:
+      m_app.GetMainWindow()->CreateHelpSubwindow();
+      return MenuActionResult::Handled;
+
+    default:
+      break;
+    }
+
+    return MenuActionResult::NotHandled;
+  }
+
+protected:
+  Application &m_app;
+  Debugger &m_debugger;
+};
+
+class StatusBarWindowDelegate : public WindowDelegate {
+public:
+  StatusBarWindowDelegate(Debugger &debugger) : m_debugger(debugger) {
+    FormatEntity::Parse("Thread: ${thread.id%tid}", m_format);
+  }
+
+  ~StatusBarWindowDelegate() override = default;
+
+  bool WindowDelegateDraw(Window &window, bool force) override {
+    ExecutionContext exe_ctx =
+        m_debugger.GetCommandInterpreter().GetExecutionContext();
+    Process *process = exe_ctx.GetProcessPtr();
+    Thread *thread = exe_ctx.GetThreadPtr();
+    StackFrame *frame = exe_ctx.GetFramePtr();
+    window.Erase();
+    window.SetBackground(2);
+    window.MoveCursor(0, 0);
+    if (process) {
+      const StateType state = process->GetState();
+      window.Printf("Process: %5" PRIu64 " %10s", process->GetID(),
+                    StateAsCString(state));
+
+      if (StateIsStoppedState(state, true)) {
+        StreamString strm;
+        if (thread && FormatEntity::Format(m_format, strm, nullptr, &exe_ctx,
+                                           nullptr, nullptr, false, false)) {
+          window.MoveCursor(40, 0);
+          window.PutCStringTruncated(strm.GetString().str().c_str(), 1);
+        }
+
+        window.MoveCursor(60, 0);
+        if (frame)
+          window.Printf("Frame: %3u  PC = 0x%16.16" PRIx64,
+                        frame->GetFrameIndex(),
+                        frame->GetFrameCodeAddress().GetOpcodeLoadAddress(
+                            exe_ctx.GetTargetPtr()));
+      } else if (state == eStateExited) {
+        const char *exit_desc = process->GetExitDescription();
+        const int exit_status = process->GetExitStatus();
+        if (exit_desc && exit_desc[0])
+          window.Printf(" with status = %i (%s)", exit_status, exit_desc);
+        else
+          window.Printf(" with status = %i", exit_status);
+      }
+    }
+    return true;
+  }
+
+protected:
+  Debugger &m_debugger;
+  FormatEntity::Entry m_format;
+};
+
+class SourceFileWindowDelegate : public WindowDelegate {
+public:
+  SourceFileWindowDelegate(Debugger &debugger)
+      : WindowDelegate(), m_debugger(debugger), m_sc(), m_file_sp(),
+        m_disassembly_scope(nullptr), m_disassembly_sp(), m_disassembly_range(),
+        m_title(), m_line_width(4), m_selected_line(0), m_pc_line(0),
+        m_stop_id(0), m_frame_idx(UINT32_MAX), m_first_visible_line(0),
+        m_min_x(0), m_min_y(0), m_max_x(0), m_max_y(0) {}
+
+  ~SourceFileWindowDelegate() override = default;
+
+  void Update(const SymbolContext &sc) { m_sc = sc; }
+
+  uint32_t NumVisibleLines() const { return m_max_y - m_min_y; }
+
+  const char *WindowDelegateGetHelpText() override {
+    return "Source/Disassembly window keyboard shortcuts:";
+  }
+
+  KeyHelp *WindowDelegateGetKeyHelp() override {
+    static curses::KeyHelp g_source_view_key_help[] = {
+        {KEY_RETURN, "Run to selected line with one shot breakpoint"},
+        {KEY_UP, "Select previous source line"},
+        {KEY_DOWN, "Select next source line"},
+        {KEY_PPAGE, "Page up"},
+        {KEY_NPAGE, "Page down"},
+        {'b', "Set breakpoint on selected source/disassembly line"},
+        {'c', "Continue process"},
+        {'d', "Detach and resume process"},
+        {'D', "Detach with process suspended"},
+        {'h', "Show help dialog"},
+        {'k', "Kill process"},
+        {'n', "Step over (source line)"},
+        {'N', "Step over (single instruction)"},
+        {'o', "Step out"},
+        {'s', "Step in (source line)"},
+        {'S', "Step in (single instruction)"},
+        {',', "Page up"},
+        {'.', "Page down"},
+        {'\0', nullptr}};
+    return g_source_view_key_help;
+  }
+
+  bool WindowDelegateDraw(Window &window, bool force) override {
+    ExecutionContext exe_ctx =
+        m_debugger.GetCommandInterpreter().GetExecutionContext();
+    Process *process = exe_ctx.GetProcessPtr();
+    Thread *thread = nullptr;
+
+    bool update_location = false;
+    if (process) {
+      StateType state = process->GetState();
+      if (StateIsStoppedState(state, true)) {
+        // We are stopped, so it is ok to
+        update_location = true;
+      }
+    }
+
+    m_min_x = 1;
+    m_min_y = 2;
+    m_max_x = window.GetMaxX() - 1;
+    m_max_y = window.GetMaxY() - 1;
+
+    const uint32_t num_visible_lines = NumVisibleLines();
+    StackFrameSP frame_sp;
+    bool set_selected_line_to_pc = false;
+
+    if (update_location) {
+      const bool process_alive = process ? process->IsAlive() : false;
+      bool thread_changed = false;
+      if (process_alive) {
+        thread = exe_ctx.GetThreadPtr();
+        if (thread) {
+          frame_sp = thread->GetSelectedFrame();
+          auto tid = thread->GetID();
+          thread_changed = tid != m_tid;
+          m_tid = tid;
+        } else {
+          if (m_tid != LLDB_INVALID_THREAD_ID) {
+            thread_changed = true;
+            m_tid = LLDB_INVALID_THREAD_ID;
+          }
+        }
+      }
+      const uint32_t stop_id = process ? process->GetStopID() : 0;
+      const bool stop_id_changed = stop_id != m_stop_id;
+      bool frame_changed = false;
+      m_stop_id = stop_id;
+      m_title.Clear();
+      if (frame_sp) {
+        m_sc = frame_sp->GetSymbolContext(eSymbolContextEverything);
+        if (m_sc.module_sp) {
+          m_title.Printf(
+              "%s", m_sc.module_sp->GetFileSpec().GetFilename().GetCString());
+          ConstString func_name = m_sc.GetFunctionName();
+          if (func_name)
+            m_title.Printf("`%s", func_name.GetCString());
+        }
+        const uint32_t frame_idx = frame_sp->GetFrameIndex();
+        frame_changed = frame_idx != m_frame_idx;
+        m_frame_idx = frame_idx;
+      } else {
+        m_sc.Clear(true);
+        frame_changed = m_frame_idx != UINT32_MAX;
+        m_frame_idx = UINT32_MAX;
+      }
+
+      const bool context_changed =
+          thread_changed || frame_changed || stop_id_changed;
+
+      if (process_alive) {
+        if (m_sc.line_entry.IsValid()) {
+          m_pc_line = m_sc.line_entry.line;
+          if (m_pc_line != UINT32_MAX)
+            --m_pc_line; // Convert to zero based line number...
+          // Update the selected line if the stop ID changed...
+          if (context_changed)
+            m_selected_line = m_pc_line;
+
+          if (m_file_sp && m_file_sp->GetFileSpec() == m_sc.line_entry.file) {
+            // Same file, nothing to do, we should either have the lines or not
+            // (source file missing)
+            if (m_selected_line >= static_cast<size_t>(m_first_visible_line)) {
+              if (m_selected_line >= m_first_visible_line + num_visible_lines)
+                m_first_visible_line = m_selected_line - 10;
+            } else {
+              if (m_selected_line > 10)
+                m_first_visible_line = m_selected_line - 10;
+              else
+                m_first_visible_line = 0;
+            }
+          } else {
+            // File changed, set selected line to the line with the PC
+            m_selected_line = m_pc_line;
+            m_file_sp =
+                m_debugger.GetSourceManager().GetFile(m_sc.line_entry.file);
+            if (m_file_sp) {
+              const size_t num_lines = m_file_sp->GetNumLines();
+              m_line_width = 1;
+              for (size_t n = num_lines; n >= 10; n = n / 10)
+                ++m_line_width;
+
+              if (num_lines < num_visible_lines ||
+                  m_selected_line < num_visible_lines)
+                m_first_visible_line = 0;
+              else
+                m_first_visible_line = m_selected_line - 10;
+            }
+          }
+        } else {
+          m_file_sp.reset();
+        }
+
+        if (!m_file_sp || m_file_sp->GetNumLines() == 0) {
+          // Show disassembly
+          bool prefer_file_cache = false;
+          if (m_sc.function) {
+            if (m_disassembly_scope != m_sc.function) {
+              m_disassembly_scope = m_sc.function;
+              m_disassembly_sp = m_sc.function->GetInstructions(
+                  exe_ctx, nullptr, prefer_file_cache);
+              if (m_disassembly_sp) {
+                set_selected_line_to_pc = true;
+                m_disassembly_range = m_sc.function->GetAddressRange();
+              } else {
+                m_disassembly_range.Clear();
+              }
+            } else {
+              set_selected_line_to_pc = context_changed;
+            }
+          } else if (m_sc.symbol) {
+            if (m_disassembly_scope != m_sc.symbol) {
+              m_disassembly_scope = m_sc.symbol;
+              m_disassembly_sp = m_sc.symbol->GetInstructions(
+                  exe_ctx, nullptr, prefer_file_cache);
+              if (m_disassembly_sp) {
+                set_selected_line_to_pc = true;
+                m_disassembly_range.GetBaseAddress() =
+                    m_sc.symbol->GetAddress();
+                m_disassembly_range.SetByteSize(m_sc.symbol->GetByteSize());
+              } else {
+                m_disassembly_range.Clear();
+              }
+            } else {
+              set_selected_line_to_pc = context_changed;
+            }
+          }
+        }
+      } else {
+        m_pc_line = UINT32_MAX;
+      }
+    }
+
+    const int window_width = window.GetWidth();
+    window.Erase();
+    window.DrawTitleBox("Sources");
+    if (!m_title.GetString().empty()) {
+      window.AttributeOn(A_REVERSE);
+      window.MoveCursor(1, 1);
+      window.PutChar(' ');
+      window.PutCStringTruncated(m_title.GetString().str().c_str(), 1);
+      int x = window.GetCursorX();
+      if (x < window_width - 1) {
+        window.Printf("%*s", window_width - x - 1, "");
+      }
+      window.AttributeOff(A_REVERSE);
+    }
+
+    Target *target = exe_ctx.GetTargetPtr();
+    const size_t num_source_lines = GetNumSourceLines();
+    if (num_source_lines > 0) {
+      // Display source
+      BreakpointLines bp_lines;
+      if (target) {
+        BreakpointList &bp_list = target->GetBreakpointList();
+        const size_t num_bps = bp_list.GetSize();
+        for (size_t bp_idx = 0; bp_idx < num_bps; ++bp_idx) {
+          BreakpointSP bp_sp = bp_list.GetBreakpointAtIndex(bp_idx);
+          const size_t num_bps_locs = bp_sp->GetNumLocations();
+          for (size_t bp_loc_idx = 0; bp_loc_idx < num_bps_locs; ++bp_loc_idx) {
+            BreakpointLocationSP bp_loc_sp =
+                bp_sp->GetLocationAtIndex(bp_loc_idx);
+            LineEntry bp_loc_line_entry;
+            if (bp_loc_sp->GetAddress().CalculateSymbolContextLineEntry(
+                    bp_loc_line_entry)) {
+              if (m_file_sp->GetFileSpec() == bp_loc_line_entry.file) {
+                bp_lines.insert(bp_loc_line_entry.line);
+              }
+            }
+          }
+        }
+      }
+
+      const attr_t selected_highlight_attr = A_REVERSE;
+      const attr_t pc_highlight_attr = COLOR_PAIR(1);
+
+      for (size_t i = 0; i < num_visible_lines; ++i) {
+        const uint32_t curr_line = m_first_visible_line + i;
+        if (curr_line < num_source_lines) {
+          const int line_y = m_min_y + i;
+          window.MoveCursor(1, line_y);
+          const bool is_pc_line = curr_line == m_pc_line;
+          const bool line_is_selected = m_selected_line == curr_line;
+          // Highlight the line as the PC line first, then if the selected line
+          // isn't the same as the PC line, highlight it differently
+          attr_t highlight_attr = 0;
+          attr_t bp_attr = 0;
+          if (is_pc_line)
+            highlight_attr = pc_highlight_attr;
+          else if (line_is_selected)
+            highlight_attr = selected_highlight_attr;
+
+          if (bp_lines.find(curr_line + 1) != bp_lines.end())
+            bp_attr = COLOR_PAIR(2);
+
+          if (bp_attr)
+            window.AttributeOn(bp_attr);
+
+          window.Printf(" %*u ", m_line_width, curr_line + 1);
+
+          if (bp_attr)
+            window.AttributeOff(bp_attr);
+
+          window.PutChar(ACS_VLINE);
+          // Mark the line with the PC with a diamond
+          if (is_pc_line)
+            window.PutChar(ACS_DIAMOND);
+          else
+            window.PutChar(' ');
+
+          if (highlight_attr)
+            window.AttributeOn(highlight_attr);
+          const uint32_t line_len =
+              m_file_sp->GetLineLength(curr_line + 1, false);
+          if (line_len > 0)
+            window.PutCString(m_file_sp->PeekLineData(curr_line + 1), line_len);
+
+          if (is_pc_line && frame_sp &&
+              frame_sp->GetConcreteFrameIndex() == 0) {
+            StopInfoSP stop_info_sp;
+            if (thread)
+              stop_info_sp = thread->GetStopInfo();
+            if (stop_info_sp) {
+              const char *stop_description = stop_info_sp->GetDescription();
+              if (stop_description && stop_description[0]) {
+                size_t stop_description_len = strlen(stop_description);
+                int desc_x = window_width - stop_description_len - 16;
+                window.Printf("%*s", desc_x - window.GetCursorX(), "");
+                // window.MoveCursor(window_width - stop_description_len - 15,
+                // line_y);
+                window.Printf("<<< Thread %u: %s ", thread->GetIndexID(),
+                              stop_description);
+              }
+            } else {
+              window.Printf("%*s", window_width - window.GetCursorX() - 1, "");
+            }
+          }
+          if (highlight_attr)
+            window.AttributeOff(highlight_attr);
+        } else {
+          break;
+        }
+      }
+    } else {
+      size_t num_disassembly_lines = GetNumDisassemblyLines();
+      if (num_disassembly_lines > 0) {
+        // Display disassembly
+        BreakpointAddrs bp_file_addrs;
+        Target *target = exe_ctx.GetTargetPtr();
+        if (target) {
+          BreakpointList &bp_list = target->GetBreakpointList();
+          const size_t num_bps = bp_list.GetSize();
+          for (size_t bp_idx = 0; bp_idx < num_bps; ++bp_idx) {
+            BreakpointSP bp_sp = bp_list.GetBreakpointAtIndex(bp_idx);
+            const size_t num_bps_locs = bp_sp->GetNumLocations();
+            for (size_t bp_loc_idx = 0; bp_loc_idx < num_bps_locs;
+                 ++bp_loc_idx) {
+              BreakpointLocationSP bp_loc_sp =
+                  bp_sp->GetLocationAtIndex(bp_loc_idx);
+              LineEntry bp_loc_line_entry;
+              const lldb::addr_t file_addr =
+                  bp_loc_sp->GetAddress().GetFileAddress();
+              if (file_addr != LLDB_INVALID_ADDRESS) {
+                if (m_disassembly_range.ContainsFileAddress(file_addr))
+                  bp_file_addrs.insert(file_addr);
+              }
+            }
+          }
+        }
+
+        const attr_t selected_highlight_attr = A_REVERSE;
+        const attr_t pc_highlight_attr = COLOR_PAIR(1);
+
+        StreamString strm;
+
+        InstructionList &insts = m_disassembly_sp->GetInstructionList();
+        Address pc_address;
+
+        if (frame_sp)
+          pc_address = frame_sp->GetFrameCodeAddress();
+        const uint32_t pc_idx =
+            pc_address.IsValid()
+                ? insts.GetIndexOfInstructionAtAddress(pc_address)
+                : UINT32_MAX;
+        if (set_selected_line_to_pc) {
+          m_selected_line = pc_idx;
+        }
+
+        const uint32_t non_visible_pc_offset = (num_visible_lines / 5);
+        if (static_cast<size_t>(m_first_visible_line) >= num_disassembly_lines)
+          m_first_visible_line = 0;
+
+        if (pc_idx < num_disassembly_lines) {
+          if (pc_idx < static_cast<uint32_t>(m_first_visible_line) ||
+              pc_idx >= m_first_visible_line + num_visible_lines)
+            m_first_visible_line = pc_idx - non_visible_pc_offset;
+        }
+
+        for (size_t i = 0; i < num_visible_lines; ++i) {
+          const uint32_t inst_idx = m_first_visible_line + i;
+          Instruction *inst = insts.GetInstructionAtIndex(inst_idx).get();
+          if (!inst)
+            break;
+
+          const int line_y = m_min_y + i;
+          window.MoveCursor(1, line_y);
+          const bool is_pc_line = frame_sp && inst_idx == pc_idx;
+          const bool line_is_selected = m_selected_line == inst_idx;
+          // Highlight the line as the PC line first, then if the selected line
+          // isn't the same as the PC line, highlight it differently
+          attr_t highlight_attr = 0;
+          attr_t bp_attr = 0;
+          if (is_pc_line)
+            highlight_attr = pc_highlight_attr;
+          else if (line_is_selected)
+            highlight_attr = selected_highlight_attr;
+
+          if (bp_file_addrs.find(inst->GetAddress().GetFileAddress()) !=
+              bp_file_addrs.end())
+            bp_attr = COLOR_PAIR(2);
+
+          if (bp_attr)
+            window.AttributeOn(bp_attr);
+
+          window.Printf(" 0x%16.16llx ",
+                        static_cast<unsigned long long>(
+                            inst->GetAddress().GetLoadAddress(target)));
+
+          if (bp_attr)
+            window.AttributeOff(bp_attr);
+
+          window.PutChar(ACS_VLINE);
+          // Mark the line with the PC with a diamond
+          if (is_pc_line)
+            window.PutChar(ACS_DIAMOND);
+          else
+            window.PutChar(' ');
+
+          if (highlight_attr)
+            window.AttributeOn(highlight_attr);
+
+          const char *mnemonic = inst->GetMnemonic(&exe_ctx);
+          const char *operands = inst->GetOperands(&exe_ctx);
+          const char *comment = inst->GetComment(&exe_ctx);
+
+          if (mnemonic != nullptr && mnemonic[0] == '\0')
+            mnemonic = nullptr;
+          if (operands != nullptr && operands[0] == '\0')
+            operands = nullptr;
+          if (comment != nullptr && comment[0] == '\0')
+            comment = nullptr;
+
+          strm.Clear();
+
+          if (mnemonic != nullptr && operands != nullptr && comment != nullptr)
+            strm.Printf("%-8s %-25s ; %s", mnemonic, operands, comment);
+          else if (mnemonic != nullptr && operands != nullptr)
+            strm.Printf("%-8s %s", mnemonic, operands);
+          else if (mnemonic != nullptr)
+            strm.Printf("%s", mnemonic);
+
+          int right_pad = 1;
+          window.PutCStringTruncated(strm.GetData(), right_pad);
+
+          if (is_pc_line && frame_sp &&
+              frame_sp->GetConcreteFrameIndex() == 0) {
+            StopInfoSP stop_info_sp;
+            if (thread)
+              stop_info_sp = thread->GetStopInfo();
+            if (stop_info_sp) {
+              const char *stop_description = stop_info_sp->GetDescription();
+              if (stop_description && stop_description[0]) {
+                size_t stop_description_len = strlen(stop_description);
+                int desc_x = window_width - stop_description_len - 16;
+                window.Printf("%*s", desc_x - window.GetCursorX(), "");
+                // window.MoveCursor(window_width - stop_description_len - 15,
+                // line_y);
+                window.Printf("<<< Thread %u: %s ", thread->GetIndexID(),
+                              stop_description);
+              }
+            } else {
+              window.Printf("%*s", window_width - window.GetCursorX() - 1, "");
+            }
+          }
+          if (highlight_attr)
+            window.AttributeOff(highlight_attr);
+        }
+      }
+    }
+    return true; // Drawing handled
+  }
+
+  size_t GetNumLines() {
+    size_t num_lines = GetNumSourceLines();
+    if (num_lines == 0)
+      num_lines = GetNumDisassemblyLines();
+    return num_lines;
+  }
+
+  size_t GetNumSourceLines() const {
+    if (m_file_sp)
+      return m_file_sp->GetNumLines();
+    return 0;
+  }
+
+  size_t GetNumDisassemblyLines() const {
+    if (m_disassembly_sp)
+      return m_disassembly_sp->GetInstructionList().GetSize();
+    return 0;
+  }
+
+  HandleCharResult WindowDelegateHandleChar(Window &window, int c) override {
+    const uint32_t num_visible_lines = NumVisibleLines();
+    const size_t num_lines = GetNumLines();
+
+    switch (c) {
+    case ',':
+    case KEY_PPAGE:
+      // Page up key
+      if (static_cast<uint32_t>(m_first_visible_line) > num_visible_lines)
+        m_first_visible_line -= num_visible_lines;
+      else
+        m_first_visible_line = 0;
+      m_selected_line = m_first_visible_line;
+      return eKeyHandled;
+
+    case '.':
+    case KEY_NPAGE:
+      // Page down key
+      {
+        if (m_first_visible_line + num_visible_lines < num_lines)
+          m_first_visible_line += num_visible_lines;
+        else if (num_lines < num_visible_lines)
+          m_first_visible_line = 0;
+        else
+          m_first_visible_line = num_lines - num_visible_lines;
+        m_selected_line = m_first_visible_line;
+      }
+      return eKeyHandled;
+
+    case KEY_UP:
+      if (m_selected_line > 0) {
+        m_selected_line--;
+        if (static_cast<size_t>(m_first_visible_line) > m_selected_line)
+          m_first_visible_line = m_selected_line;
+      }
+      return eKeyHandled;
+
+    case KEY_DOWN:
+      if (m_selected_line + 1 < num_lines) {
+        m_selected_line++;
+        if (m_first_visible_line + num_visible_lines < m_selected_line)
+          m_first_visible_line++;
+      }
+      return eKeyHandled;
+
+    case '\r':
+    case '\n':
+    case KEY_ENTER:
+      // Set a breakpoint and run to the line using a one shot breakpoint
+      if (GetNumSourceLines() > 0) {
+        ExecutionContext exe_ctx =
+            m_debugger.GetCommandInterpreter().GetExecutionContext();
+        if (exe_ctx.HasProcessScope() && exe_ctx.GetProcessRef().IsAlive()) {
+          BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint(
+              nullptr, // Don't limit the breakpoint to certain modules
+              m_file_sp->GetFileSpec(), // Source file
+              m_selected_line +
+                  1, // Source line number (m_selected_line is zero based)
+              0,     // Unspecified column.
+              0,     // No offset
+              eLazyBoolCalculate,  // Check inlines using global setting
+              eLazyBoolCalculate,  // Skip prologue using global setting,
+              false,               // internal
+              false,               // request_hardware
+              eLazyBoolCalculate); // move_to_nearest_code
+          // Make breakpoint one shot
+          bp_sp->GetOptions()->SetOneShot(true);
+          exe_ctx.GetProcessRef().Resume();
+        }
+      } else if (m_selected_line < GetNumDisassemblyLines()) {
+        const Instruction *inst = m_disassembly_sp->GetInstructionList()
+                                      .GetInstructionAtIndex(m_selected_line)
+                                      .get();
+        ExecutionContext exe_ctx =
+            m_debugger.GetCommandInterpreter().GetExecutionContext();
+        if (exe_ctx.HasTargetScope()) {
+          Address addr = inst->GetAddress();
+          BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint(
+              addr,   // lldb_private::Address
+              false,  // internal
+              false); // request_hardware
+          // Make breakpoint one shot
+          bp_sp->GetOptions()->SetOneShot(true);
+          exe_ctx.GetProcessRef().Resume();
+        }
+      }
+      return eKeyHandled;
+
+    case 'b': // 'b' == toggle breakpoint on currently selected line
+      if (m_selected_line < GetNumSourceLines()) {
+        ExecutionContext exe_ctx =
+            m_debugger.GetCommandInterpreter().GetExecutionContext();
+        if (exe_ctx.HasTargetScope()) {
+          BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint(
+              nullptr, // Don't limit the breakpoint to certain modules
+              m_file_sp->GetFileSpec(), // Source file
+              m_selected_line +
+                  1, // Source line number (m_selected_line is zero based)
+              0,     // No column specified.
+              0,     // No offset
+              eLazyBoolCalculate,  // Check inlines using global setting
+              eLazyBoolCalculate,  // Skip prologue using global setting,
+              false,               // internal
+              false,               // request_hardware
+              eLazyBoolCalculate); // move_to_nearest_code
+        }
+      } else if (m_selected_line < GetNumDisassemblyLines()) {
+        const Instruction *inst = m_disassembly_sp->GetInstructionList()
+                                      .GetInstructionAtIndex(m_selected_line)
+                                      .get();
+        ExecutionContext exe_ctx =
+            m_debugger.GetCommandInterpreter().GetExecutionContext();
+        if (exe_ctx.HasTargetScope()) {
+          Address addr = inst->GetAddress();
+          BreakpointSP bp_sp = exe_ctx.GetTargetRef().CreateBreakpoint(
+              addr,   // lldb_private::Address
+              false,  // internal
+              false); // request_hardware
+        }
+      }
+      return eKeyHandled;
+
+    case 'd': // 'd' == detach and let run
+    case 'D': // 'D' == detach and keep stopped
+    {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasProcessScope())
+        exe_ctx.GetProcessRef().Detach(c == 'D');
+    }
+      return eKeyHandled;
+
+    case 'k':
+      // 'k' == kill
+      {
+        ExecutionContext exe_ctx =
+            m_debugger.GetCommandInterpreter().GetExecutionContext();
+        if (exe_ctx.HasProcessScope())
+          exe_ctx.GetProcessRef().Destroy(false);
+      }
+      return eKeyHandled;
+
+    case 'c':
+      // 'c' == continue
+      {
+        ExecutionContext exe_ctx =
+            m_debugger.GetCommandInterpreter().GetExecutionContext();
+        if (exe_ctx.HasProcessScope())
+          exe_ctx.GetProcessRef().Resume();
+      }
+      return eKeyHandled;
+
+    case 'o':
+      // 'o' == step out
+      {
+        ExecutionContext exe_ctx =
+            m_debugger.GetCommandInterpreter().GetExecutionContext();
+        if (exe_ctx.HasThreadScope() &&
+            StateIsStoppedState(exe_ctx.GetProcessRef().GetState(), true)) {
+          exe_ctx.GetThreadRef().StepOut();
+        }
+      }
+      return eKeyHandled;
+
+    case 'n': // 'n' == step over
+    case 'N': // 'N' == step over instruction
+    {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasThreadScope() &&
+          StateIsStoppedState(exe_ctx.GetProcessRef().GetState(), true)) {
+        bool source_step = (c == 'n');
+        exe_ctx.GetThreadRef().StepOver(source_step);
+      }
+    }
+      return eKeyHandled;
+
+    case 's': // 's' == step into
+    case 'S': // 'S' == step into instruction
+    {
+      ExecutionContext exe_ctx =
+          m_debugger.GetCommandInterpreter().GetExecutionContext();
+      if (exe_ctx.HasThreadScope() &&
+          StateIsStoppedState(exe_ctx.GetProcessRef().GetState(), true)) {
+        bool source_step = (c == 's');
+        exe_ctx.GetThreadRef().StepIn(source_step);
+      }
+    }
+      return eKeyHandled;
+
+    case 'h':
+      window.CreateHelpSubwindow();
+      return eKeyHandled;
+
+    default:
+      break;
+    }
+    return eKeyNotHandled;
+  }
+
+protected:
+  typedef std::set<uint32_t> BreakpointLines;
+  typedef std::set<lldb::addr_t> BreakpointAddrs;
+
+  Debugger &m_debugger;
+  SymbolContext m_sc;
+  SourceManager::FileSP m_file_sp;
+  SymbolContextScope *m_disassembly_scope;
+  lldb::DisassemblerSP m_disassembly_sp;
+  AddressRange m_disassembly_range;
+  StreamString m_title;
+  lldb::user_id_t m_tid;
+  int m_line_width;
+  uint32_t m_selected_line; // The selected line
+  uint32_t m_pc_line;       // The line with the PC
+  uint32_t m_stop_id;
+  uint32_t m_frame_idx;
+  int m_first_visible_line;
+  int m_min_x;
+  int m_min_y;
+  int m_max_x;
+  int m_max_y;
+};
+
+DisplayOptions ValueObjectListDelegate::g_options = {true};
+
+IOHandlerCursesGUI::IOHandlerCursesGUI(Debugger &debugger)
+    : IOHandler(debugger, IOHandler::Type::Curses) {}
+
+void IOHandlerCursesGUI::Activate() {
+  IOHandler::Activate();
+  if (!m_app_ap) {
+    m_app_ap.reset(new Application(GetInputFILE(), GetOutputFILE()));
+
+    // This is both a window and a menu delegate
+    std::shared_ptr<ApplicationDelegate> app_delegate_sp(
+        new ApplicationDelegate(*m_app_ap, m_debugger));
+
+    MenuDelegateSP app_menu_delegate_sp =
+        std::static_pointer_cast<MenuDelegate>(app_delegate_sp);
+    MenuSP lldb_menu_sp(
+        new Menu("LLDB", "F1", KEY_F(1), ApplicationDelegate::eMenuID_LLDB));
+    MenuSP exit_menuitem_sp(
+        new Menu("Exit", nullptr, 'x', ApplicationDelegate::eMenuID_LLDBExit));
+    exit_menuitem_sp->SetCannedResult(MenuActionResult::Quit);
+    lldb_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "About LLDB", nullptr, 'a', ApplicationDelegate::eMenuID_LLDBAbout)));
+    lldb_menu_sp->AddSubmenu(MenuSP(new Menu(Menu::Type::Separator)));
+    lldb_menu_sp->AddSubmenu(exit_menuitem_sp);
+
+    MenuSP target_menu_sp(new Menu("Target", "F2", KEY_F(2),
+                                   ApplicationDelegate::eMenuID_Target));
+    target_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Create", nullptr, 'c', ApplicationDelegate::eMenuID_TargetCreate)));
+    target_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Delete", nullptr, 'd', ApplicationDelegate::eMenuID_TargetDelete)));
+
+    MenuSP process_menu_sp(new Menu("Process", "F3", KEY_F(3),
+                                    ApplicationDelegate::eMenuID_Process));
+    process_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Attach", nullptr, 'a', ApplicationDelegate::eMenuID_ProcessAttach)));
+    process_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Detach", nullptr, 'd', ApplicationDelegate::eMenuID_ProcessDetach)));
+    process_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Launch", nullptr, 'l', ApplicationDelegate::eMenuID_ProcessLaunch)));
+    process_menu_sp->AddSubmenu(MenuSP(new Menu(Menu::Type::Separator)));
+    process_menu_sp->AddSubmenu(
+        MenuSP(new Menu("Continue", nullptr, 'c',
+                        ApplicationDelegate::eMenuID_ProcessContinue)));
+    process_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Halt", nullptr, 'h', ApplicationDelegate::eMenuID_ProcessHalt)));
+    process_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Kill", nullptr, 'k', ApplicationDelegate::eMenuID_ProcessKill)));
+
+    MenuSP thread_menu_sp(new Menu("Thread", "F4", KEY_F(4),
+                                   ApplicationDelegate::eMenuID_Thread));
+    thread_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Step In", nullptr, 'i', ApplicationDelegate::eMenuID_ThreadStepIn)));
+    thread_menu_sp->AddSubmenu(
+        MenuSP(new Menu("Step Over", nullptr, 'v',
+                        ApplicationDelegate::eMenuID_ThreadStepOver)));
+    thread_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Step Out", nullptr, 'o', ApplicationDelegate::eMenuID_ThreadStepOut)));
+
+    MenuSP view_menu_sp(
+        new Menu("View", "F5", KEY_F(5), ApplicationDelegate::eMenuID_View));
+    view_menu_sp->AddSubmenu(
+        MenuSP(new Menu("Backtrace", nullptr, 'b',
+                        ApplicationDelegate::eMenuID_ViewBacktrace)));
+    view_menu_sp->AddSubmenu(
+        MenuSP(new Menu("Registers", nullptr, 'r',
+                        ApplicationDelegate::eMenuID_ViewRegisters)));
+    view_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "Source", nullptr, 's', ApplicationDelegate::eMenuID_ViewSource)));
+    view_menu_sp->AddSubmenu(
+        MenuSP(new Menu("Variables", nullptr, 'v',
+                        ApplicationDelegate::eMenuID_ViewVariables)));
+
+    MenuSP help_menu_sp(
+        new Menu("Help", "F6", KEY_F(6), ApplicationDelegate::eMenuID_Help));
+    help_menu_sp->AddSubmenu(MenuSP(new Menu(
+        "GUI Help", nullptr, 'g', ApplicationDelegate::eMenuID_HelpGUIHelp)));
+
+    m_app_ap->Initialize();
+    WindowSP &main_window_sp = m_app_ap->GetMainWindow();
+
+    MenuSP menubar_sp(new Menu(Menu::Type::Bar));
+    menubar_sp->AddSubmenu(lldb_menu_sp);
+    menubar_sp->AddSubmenu(target_menu_sp);
+    menubar_sp->AddSubmenu(process_menu_sp);
+    menubar_sp->AddSubmenu(thread_menu_sp);
+    menubar_sp->AddSubmenu(view_menu_sp);
+    menubar_sp->AddSubmenu(help_menu_sp);
+    menubar_sp->SetDelegate(app_menu_delegate_sp);
+
+    Rect content_bounds = main_window_sp->GetFrame();
+    Rect menubar_bounds = content_bounds.MakeMenuBar();
+    Rect status_bounds = content_bounds.MakeStatusBar();
+    Rect source_bounds;
+    Rect variables_bounds;
+    Rect threads_bounds;
+    Rect source_variables_bounds;
+    content_bounds.VerticalSplitPercentage(0.80, source_variables_bounds,
+                                           threads_bounds);
+    source_variables_bounds.HorizontalSplitPercentage(0.70, source_bounds,
+                                                      variables_bounds);
+
+    WindowSP menubar_window_sp =
+        main_window_sp->CreateSubWindow("Menubar", menubar_bounds, false);
+    // Let the menubar get keys if the active window doesn't handle the keys
+    // that are typed so it can respond to menubar key presses.
+    menubar_window_sp->SetCanBeActive(
+        false); // Don't let the menubar become the active window
+    menubar_window_sp->SetDelegate(menubar_sp);
+
+    WindowSP source_window_sp(
+        main_window_sp->CreateSubWindow("Source", source_bounds, true));
+    WindowSP variables_window_sp(
+        main_window_sp->CreateSubWindow("Variables", variables_bounds, false));
+    WindowSP threads_window_sp(
+        main_window_sp->CreateSubWindow("Threads", threads_bounds, false));
+    WindowSP status_window_sp(
+        main_window_sp->CreateSubWindow("Status", status_bounds, false));
+    status_window_sp->SetCanBeActive(
+        false); // Don't let the status bar become the active window
+    main_window_sp->SetDelegate(
+        std::static_pointer_cast<WindowDelegate>(app_delegate_sp));
+    source_window_sp->SetDelegate(
+        WindowDelegateSP(new SourceFileWindowDelegate(m_debugger)));
+    variables_window_sp->SetDelegate(
+        WindowDelegateSP(new FrameVariablesWindowDelegate(m_debugger)));
+    TreeDelegateSP thread_delegate_sp(new ThreadsTreeDelegate(m_debugger));
+    threads_window_sp->SetDelegate(WindowDelegateSP(
+        new TreeWindowDelegate(m_debugger, thread_delegate_sp)));
+    status_window_sp->SetDelegate(
+        WindowDelegateSP(new StatusBarWindowDelegate(m_debugger)));
+
+    // Show the main help window once the first time the curses GUI is launched
+    static bool g_showed_help = false;
+    if (!g_showed_help) {
+      g_showed_help = true;
+      main_window_sp->CreateHelpSubwindow();
+    }
+
+    init_pair(1, COLOR_WHITE, COLOR_BLUE);
+    init_pair(2, COLOR_BLACK, COLOR_WHITE);
+    init_pair(3, COLOR_MAGENTA, COLOR_WHITE);
+    init_pair(4, COLOR_MAGENTA, COLOR_BLACK);
+    init_pair(5, COLOR_RED, COLOR_BLACK);
+  }
+}
+
+void IOHandlerCursesGUI::Deactivate() { m_app_ap->Terminate(); }
+
+void IOHandlerCursesGUI::Run() {
+  m_app_ap->Run(m_debugger);
+  SetIsDone(true);
+}
+
+IOHandlerCursesGUI::~IOHandlerCursesGUI() = default;
+
+void IOHandlerCursesGUI::Cancel() {}
+
+bool IOHandlerCursesGUI::Interrupt() { return false; }
+
+void IOHandlerCursesGUI::GotEOF() {}
+
+#endif // LLDB_ENABLE_CURSES
diff --git a/src/llvm-project/lldb/source/Core/Mangled.cpp b/src/llvm-project/lldb/source/Core/Mangled.cpp
index c6759cc..15baffd 100644
--- a/src/llvm-project/lldb/source/Core/Mangled.cpp
+++ b/src/llvm-project/lldb/source/Core/Mangled.cpp
@@ -8,13 +8,6 @@
 
 #include "lldb/Core/Mangled.h"
 
-#if defined(_WIN32)
-#include "lldb/Host/windows/windows.h"
-
-#include <dbghelp.h>
-#pragma comment(lib, "dbghelp.lib")
-#endif
-
 #include "lldb/Core/RichManglingContext.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/Log.h"
@@ -39,37 +32,8 @@
 #include <string.h>
 using namespace lldb_private;
 
-#if defined(_MSC_VER)
-static DWORD safeUndecorateName(const char *Mangled, char *Demangled,
-                                DWORD DemangledLength) {
-  static std::mutex M;
-  std::lock_guard<std::mutex> Lock(M);
-  return ::UnDecorateSymbolName(
-      Mangled, Demangled, DemangledLength,
-      UNDNAME_NO_ACCESS_SPECIFIERS |       // Strip public, private, protected
-                                           // keywords
-          UNDNAME_NO_ALLOCATION_LANGUAGE | // Strip __thiscall, __stdcall,
-                                           // etc keywords
-          UNDNAME_NO_THROW_SIGNATURES |    // Strip throw() specifications
-          UNDNAME_NO_MEMBER_TYPE |         // Strip virtual, static, etc
-                                           // specifiers
-          UNDNAME_NO_MS_KEYWORDS           // Strip all MS extension keywords
-      );
-}
-#endif
-
-static inline Mangled::ManglingScheme cstring_mangling_scheme(const char *s) {
-  if (s) {
-    if (s[0] == '?')
-      return Mangled::eManglingSchemeMSVC;
-    if (s[0] == '_' && s[1] == 'Z')
-      return Mangled::eManglingSchemeItanium;
-  }
-  return Mangled::eManglingSchemeNone;
-}
-
-static inline bool cstring_is_mangled(const char *s) {
-  return cstring_mangling_scheme(s) != Mangled::eManglingSchemeNone;
+static inline bool cstring_is_mangled(llvm::StringRef s) {
+  return Mangled::GetManglingScheme(s) != Mangled::eManglingSchemeNone;
 }
 
 static ConstString 
@@ -124,20 +88,22 @@
 }
 
 #pragma mark Mangled
-// Default constructor
-Mangled::Mangled() : m_mangled(), m_demangled() {}
 
-// Constructor with an optional string and a boolean indicating if it is the
-// mangled version.
-Mangled::Mangled(ConstString s, bool mangled)
-    : m_mangled(), m_demangled() {
-  if (s)
-    SetValue(s, mangled);
-}
+Mangled::ManglingScheme Mangled::GetManglingScheme(llvm::StringRef const name) {
+  if (name.empty())
+    return Mangled::eManglingSchemeNone;
 
-Mangled::Mangled(llvm::StringRef name, bool is_mangled) {
-  if (!name.empty())
-    SetValue(ConstString(name), is_mangled);
+  if (name.startswith("?"))
+    return Mangled::eManglingSchemeMSVC;
+
+  if (name.startswith("_Z"))
+    return Mangled::eManglingSchemeItanium;
+
+  // ___Z is a clang extension of block invocations
+  if (name.startswith("___Z"))
+    return Mangled::eManglingSchemeItanium;
+
+  return Mangled::eManglingSchemeNone;
 }
 
 Mangled::Mangled(ConstString s) : m_mangled(), m_demangled() {
@@ -150,9 +116,6 @@
     SetValue(ConstString(name));
 }
 
-// Destructor
-Mangled::~Mangled() {}
-
 // Convert to pointer operator. This allows code to check any Mangled objects
 // to see if they contain anything valid using code such as:
 //
@@ -203,7 +166,7 @@
 
 void Mangled::SetValue(ConstString name) {
   if (name) {
-    if (cstring_is_mangled(name.GetCString())) {
+    if (cstring_is_mangled(name.GetStringRef())) {
       m_demangled.Clear();
       m_mangled = name;
     } else {
@@ -218,28 +181,20 @@
 
 // Local helpers for different demangling implementations.
 static char *GetMSVCDemangledStr(const char *M) {
-#if defined(_MSC_VER)
-  const size_t demangled_length = 2048;
-  char *demangled_cstr = static_cast<char *>(::malloc(demangled_length));
-  ::ZeroMemory(demangled_cstr, demangled_length);
-  DWORD result = safeUndecorateName(M, demangled_cstr, demangled_length);
+  char *demangled_cstr = llvm::microsoftDemangle(
+      M, nullptr, nullptr, nullptr,
+      llvm::MSDemangleFlags(llvm::MSDF_NoAccessSpecifier |
+                            llvm::MSDF_NoCallingConvention |
+                            llvm::MSDF_NoMemberType));
 
   if (Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DEMANGLE)) {
     if (demangled_cstr && demangled_cstr[0])
-      log->Printf("demangled msvc: %s -> \"%s\"", M, demangled_cstr);
+      LLDB_LOGF(log, "demangled msvc: %s -> \"%s\"", M, demangled_cstr);
     else
-      log->Printf("demangled msvc: %s -> error: 0x%lu", M, result);
+      LLDB_LOGF(log, "demangled msvc: %s -> error", M);
   }
 
-  if (result != 0) {
-    return demangled_cstr;
-  } else {
-    ::free(demangled_cstr);
-    return nullptr;
-  }
-#else
-  return nullptr;
-#endif
+  return demangled_cstr;
 }
 
 static char *GetItaniumDemangledStr(const char *M) {
@@ -261,9 +216,9 @@
 
   if (Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DEMANGLE)) {
     if (demangled_cstr)
-      log->Printf("demangled itanium: %s -> \"%s\"", M, demangled_cstr);
+      LLDB_LOGF(log, "demangled itanium: %s -> \"%s\"", M, demangled_cstr);
     else
-      log->Printf("demangled itanium: %s -> error: failed to demangle", M);
+      LLDB_LOGF(log, "demangled itanium: %s -> error: failed to demangle", M);
   }
 
   return demangled_cstr;
@@ -284,7 +239,7 @@
   assert(m_mangled);
 
   // Check whether or not we are interested in this name at all.
-  ManglingScheme scheme = cstring_mangling_scheme(m_mangled.GetCString());
+  ManglingScheme scheme = GetManglingScheme(m_mangled.GetStringRef());
   if (skip_mangled_name && skip_mangled_name(m_mangled.GetStringRef(), scheme))
     return false;
 
@@ -352,7 +307,7 @@
 
     // Don't bother running anything that isn't mangled
     const char *mangled_name = m_mangled.GetCString();
-    ManglingScheme mangling_scheme{cstring_mangling_scheme(mangled_name)};
+    ManglingScheme mangling_scheme = GetManglingScheme(m_mangled.GetStringRef());
     if (mangling_scheme != eManglingSchemeNone &&
         !m_mangled.GetMangledCounterpart(m_demangled)) {
       // We didn't already mangle this name, demangle it and if all goes well
@@ -457,6 +412,7 @@
 // within those targets.
 lldb::LanguageType Mangled::GuessLanguage() const {
   ConstString mangled = GetMangledName();
+
   if (mangled) {
     const char *mangled_name = mangled.GetCString();
     if (CPlusPlusLanguage::IsCPPMangledName(mangled_name))
diff --git a/src/llvm-project/lldb/source/Core/Module.cpp b/src/llvm-project/lldb/source/Core/Module.cpp
index 153d5a7..031892a 100644
--- a/src/llvm-project/lldb/source/Core/Module.cpp
+++ b/src/llvm-project/lldb/source/Core/Module.cpp
@@ -137,14 +137,15 @@
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_OBJECT |
                                                   LIBLLDB_LOG_MODULES));
   if (log != nullptr)
-    log->Printf("%p Module::Module((%s) '%s%s%s%s')", static_cast<void *>(this),
-                module_spec.GetArchitecture().GetArchitectureName(),
-                module_spec.GetFileSpec().GetPath().c_str(),
-                module_spec.GetObjectName().IsEmpty() ? "" : "(",
-                module_spec.GetObjectName().IsEmpty()
-                    ? ""
-                    : module_spec.GetObjectName().AsCString(""),
-                module_spec.GetObjectName().IsEmpty() ? "" : ")");
+    LLDB_LOGF(log, "%p Module::Module((%s) '%s%s%s%s')",
+              static_cast<void *>(this),
+              module_spec.GetArchitecture().GetArchitectureName(),
+              module_spec.GetFileSpec().GetPath().c_str(),
+              module_spec.GetObjectName().IsEmpty() ? "" : "(",
+              module_spec.GetObjectName().IsEmpty()
+                  ? ""
+                  : module_spec.GetObjectName().AsCString(""),
+              module_spec.GetObjectName().IsEmpty() ? "" : ")");
 
   // First extract all module specifications from the file using the local file
   // path. If there are no specifications, then don't fill anything in
@@ -164,7 +165,7 @@
   if (!modules_specs.FindMatchingModuleSpec(module_spec,
                                             matching_module_spec)) {
     if (log) {
-      log->Printf("Found local object file but the specs didn't match");
+      LLDB_LOGF(log, "Found local object file but the specs didn't match");
     }
     return;
   }
@@ -235,11 +236,11 @@
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_OBJECT |
                                                   LIBLLDB_LOG_MODULES));
   if (log != nullptr)
-    log->Printf("%p Module::Module((%s) '%s%s%s%s')", static_cast<void *>(this),
-                m_arch.GetArchitectureName(), m_file.GetPath().c_str(),
-                m_object_name.IsEmpty() ? "" : "(",
-                m_object_name.IsEmpty() ? "" : m_object_name.AsCString(""),
-                m_object_name.IsEmpty() ? "" : ")");
+    LLDB_LOGF(log, "%p Module::Module((%s) '%s%s%s%s')",
+              static_cast<void *>(this), m_arch.GetArchitectureName(),
+              m_file.GetPath().c_str(), m_object_name.IsEmpty() ? "" : "(",
+              m_object_name.IsEmpty() ? "" : m_object_name.AsCString(""),
+              m_object_name.IsEmpty() ? "" : ")");
 }
 
 Module::Module()
@@ -267,11 +268,11 @@
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_OBJECT |
                                                   LIBLLDB_LOG_MODULES));
   if (log != nullptr)
-    log->Printf("%p Module::~Module((%s) '%s%s%s%s')",
-                static_cast<void *>(this), m_arch.GetArchitectureName(),
-                m_file.GetPath().c_str(), m_object_name.IsEmpty() ? "" : "(",
-                m_object_name.IsEmpty() ? "" : m_object_name.AsCString(""),
-                m_object_name.IsEmpty() ? "" : ")");
+    LLDB_LOGF(log, "%p Module::~Module((%s) '%s%s%s%s')",
+              static_cast<void *>(this), m_arch.GetArchitectureName(),
+              m_file.GetPath().c_str(), m_object_name.IsEmpty() ? "" : "(",
+              m_object_name.IsEmpty() ? "" : m_object_name.AsCString(""),
+              m_object_name.IsEmpty() ? "" : ")");
   // Release any auto pointers before we start tearing down our member
   // variables since the object file and symbol files might need to make
   // function calls back into this module object. The ordering is important
@@ -291,7 +292,7 @@
     std::lock_guard<std::recursive_mutex> guard(m_mutex);
     if (process_sp) {
       m_did_load_objfile = true;
-      auto data_up = llvm::make_unique<DataBufferHeap>(size_to_read, 0);
+      auto data_up = std::make_unique<DataBufferHeap>(size_to_read, 0);
       Status readmem_error;
       const size_t bytes_read =
           process_sp->ReadMemory(header_addr, data_up->GetBytes(),
@@ -352,7 +353,8 @@
   }
 }
 
-TypeSystem *Module::GetTypeSystemForLanguage(LanguageType language) {
+llvm::Expected<TypeSystem &>
+Module::GetTypeSystemForLanguage(LanguageType language) {
   return m_type_system_map.GetTypeSystemForLanguage(language, this, true);
 }
 
@@ -364,7 +366,7 @@
 
   SymbolContext sc;
   sc.module_sp = shared_from_this();
-  SymbolVendor *symbols = GetSymbolVendor();
+  SymbolFile *symbols = GetSymbolFile();
 
   for (size_t cu_idx = 0; cu_idx < num_comp_units; cu_idx++) {
     sc.comp_unit = symbols->GetCompileUnitAtIndex(cu_idx).get();
@@ -404,8 +406,7 @@
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat, "Module::GetNumCompileUnits (module = %p)",
                      static_cast<void *>(this));
-  SymbolVendor *symbols = GetSymbolVendor();
-  if (symbols)
+  if (SymbolFile *symbols = GetSymbolFile())
     return symbols->GetNumCompileUnits();
   return 0;
 }
@@ -416,8 +417,7 @@
   CompUnitSP cu_sp;
 
   if (index < num_comp_units) {
-    SymbolVendor *symbols = GetSymbolVendor();
-    if (symbols)
+    if (SymbolFile *symbols = GetSymbolFile())
       cu_sp = symbols->GetCompileUnitAtIndex(index);
   }
   return cu_sp;
@@ -455,8 +455,8 @@
     sc.module_sp = shared_from_this();
     resolved_flags |= eSymbolContextModule;
 
-    SymbolVendor *sym_vendor = GetSymbolVendor();
-    if (!sym_vendor)
+    SymbolFile *symfile = GetSymbolFile();
+    if (!symfile)
       return resolved_flags;
 
     // Resolve the compile unit, function, block, line table or line entry if
@@ -467,14 +467,14 @@
         resolve_scope & eSymbolContextLineEntry ||
         resolve_scope & eSymbolContextVariable) {
       resolved_flags |=
-          sym_vendor->ResolveSymbolContext(so_addr, resolve_scope, sc);
+          symfile->ResolveSymbolContext(so_addr, resolve_scope, sc);
     }
 
     // Resolve the symbol if requested, but don't re-look it up if we've
     // already found it.
     if (resolve_scope & eSymbolContextSymbol &&
         !(resolved_flags & eSymbolContextSymbol)) {
-      Symtab *symtab = sym_vendor->GetSymtab();
+      Symtab *symtab = symfile->GetSymtab();
       if (symtab && so_addr.IsSectionOffset()) {
         Symbol *matching_symbol = nullptr;
 
@@ -507,18 +507,15 @@
             // files on MacOSX have an unstripped symbol table inside of them.
             ObjectFile *symtab_objfile = symtab->GetObjectFile();
             if (symtab_objfile && symtab_objfile->IsStripped()) {
-              SymbolFile *symfile = sym_vendor->GetSymbolFile();
-              if (symfile) {
-                ObjectFile *symfile_objfile = symfile->GetObjectFile();
-                if (symfile_objfile != symtab_objfile) {
-                  Symtab *symfile_symtab = symfile_objfile->GetSymtab();
-                  if (symfile_symtab) {
-                    Symbol *symbol =
-                        symfile_symtab->FindSymbolContainingFileAddress(
-                            so_addr.GetFileAddress());
-                    if (symbol && !symbol->IsSynthetic()) {
-                      sc.symbol = symbol;
-                    }
+              ObjectFile *symfile_objfile = symfile->GetObjectFile();
+              if (symfile_objfile != symtab_objfile) {
+                Symtab *symfile_symtab = symfile_objfile->GetSymtab();
+                if (symfile_symtab) {
+                  Symbol *symbol =
+                      symfile_symtab->FindSymbolContainingFileAddress(
+                          so_addr.GetFileAddress());
+                  if (symbol && !symbol->IsSynthetic()) {
+                    sc.symbol = symbol;
                   }
                 }
               }
@@ -590,52 +587,39 @@
 
   const uint32_t initial_count = sc_list.GetSize();
 
-  SymbolVendor *symbols = GetSymbolVendor();
-  if (symbols)
+  if (SymbolFile *symbols = GetSymbolFile())
     symbols->ResolveSymbolContext(file_spec, line, check_inlines, resolve_scope,
                                   sc_list);
 
   return sc_list.GetSize() - initial_count;
 }
 
-size_t Module::FindGlobalVariables(ConstString name,
-                                   const CompilerDeclContext *parent_decl_ctx,
-                                   size_t max_matches,
-                                   VariableList &variables) {
-  SymbolVendor *symbols = GetSymbolVendor();
-  if (symbols)
-    return symbols->FindGlobalVariables(name, parent_decl_ctx, max_matches,
-                                        variables);
-  return 0;
+void Module::FindGlobalVariables(ConstString name,
+                                 const CompilerDeclContext *parent_decl_ctx,
+                                 size_t max_matches, VariableList &variables) {
+  if (SymbolFile *symbols = GetSymbolFile())
+    symbols->FindGlobalVariables(name, parent_decl_ctx, max_matches, variables);
 }
 
-size_t Module::FindGlobalVariables(const RegularExpression &regex,
-                                   size_t max_matches,
-                                   VariableList &variables) {
-  SymbolVendor *symbols = GetSymbolVendor();
+void Module::FindGlobalVariables(const RegularExpression &regex,
+                                 size_t max_matches, VariableList &variables) {
+  SymbolFile *symbols = GetSymbolFile();
   if (symbols)
-    return symbols->FindGlobalVariables(regex, max_matches, variables);
-  return 0;
+    symbols->FindGlobalVariables(regex, max_matches, variables);
 }
 
-size_t Module::FindCompileUnits(const FileSpec &path, bool append,
-                                SymbolContextList &sc_list) {
-  if (!append)
-    sc_list.Clear();
-
-  const size_t start_size = sc_list.GetSize();
+void Module::FindCompileUnits(const FileSpec &path,
+                              SymbolContextList &sc_list) {
   const size_t num_compile_units = GetNumCompileUnits();
   SymbolContext sc;
   sc.module_sp = shared_from_this();
-  const bool compare_directory = (bool)path.GetDirectory();
   for (size_t i = 0; i < num_compile_units; ++i) {
     sc.comp_unit = GetCompileUnitAtIndex(i).get();
     if (sc.comp_unit) {
-      if (FileSpec::Equal(*sc.comp_unit, path, compare_directory))
+      if (FileSpec::Match(path, sc.comp_unit->GetPrimaryFile()))
         sc_list.Append(sc);
     }
   }
-  return sc_list.GetSize() - start_size;
 }
 
 Module::LookupInfo::LookupInfo(ConstString name,
@@ -798,18 +782,15 @@
   }
 }
 
-size_t Module::FindFunctions(ConstString name,
-                             const CompilerDeclContext *parent_decl_ctx,
-                             FunctionNameType name_type_mask,
-                             bool include_symbols, bool include_inlines,
-                             bool append, SymbolContextList &sc_list) {
-  if (!append)
-    sc_list.Clear();
-
+void Module::FindFunctions(ConstString name,
+                           const CompilerDeclContext *parent_decl_ctx,
+                           FunctionNameType name_type_mask,
+                           bool include_symbols, bool include_inlines,
+                           SymbolContextList &sc_list) {
   const size_t old_size = sc_list.GetSize();
 
   // Find all the functions (not symbols, but debug information functions...
-  SymbolVendor *symbols = GetSymbolVendor();
+  SymbolFile *symbols = GetSymbolFile();
 
   if (name_type_mask & eFunctionNameTypeAuto) {
     LookupInfo lookup_info(name, name_type_mask, eLanguageTypeUnknown);
@@ -817,7 +798,7 @@
     if (symbols) {
       symbols->FindFunctions(lookup_info.GetLookupName(), parent_decl_ctx,
                              lookup_info.GetNameTypeMask(), include_inlines,
-                             append, sc_list);
+                             sc_list);
 
       // Now check our symbol table for symbols that are code symbols if
       // requested
@@ -836,7 +817,7 @@
   } else {
     if (symbols) {
       symbols->FindFunctions(name, parent_decl_ctx, name_type_mask,
-                             include_inlines, append, sc_list);
+                             include_inlines, sc_list);
 
       // Now check our symbol table for symbols that are code symbols if
       // requested
@@ -847,21 +828,15 @@
       }
     }
   }
-
-  return sc_list.GetSize() - old_size;
 }
 
-size_t Module::FindFunctions(const RegularExpression &regex,
-                             bool include_symbols, bool include_inlines,
-                             bool append, SymbolContextList &sc_list) {
-  if (!append)
-    sc_list.Clear();
-
+void Module::FindFunctions(const RegularExpression &regex, bool include_symbols,
+                           bool include_inlines,
+                           SymbolContextList &sc_list) {
   const size_t start_size = sc_list.GetSize();
 
-  SymbolVendor *symbols = GetSymbolVendor();
-  if (symbols) {
-    symbols->FindFunctions(regex, include_inlines, append, sc_list);
+  if (SymbolFile *symbols = GetSymbolFile()) {
+    symbols->FindFunctions(regex, include_inlines, sc_list);
 
     // Now check our symbol table for symbols that are code symbols if
     // requested
@@ -923,7 +898,6 @@
       }
     }
   }
-  return sc_list.GetSize() - start_size;
 }
 
 void Module::FindAddressesForLine(const lldb::TargetSP target_sp,
@@ -945,57 +919,49 @@
   }
 }
 
-size_t Module::FindTypes_Impl(
+void Module::FindTypes_Impl(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    bool append, size_t max_matches,
+    size_t max_matches,
     llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeMap &types) {
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
-  SymbolVendor *symbols = GetSymbolVendor();
-  if (symbols)
-    return symbols->FindTypes(name, parent_decl_ctx, append, max_matches,
-                              searched_symbol_files, types);
-  return 0;
+  if (SymbolFile *symbols = GetSymbolFile())
+    symbols->FindTypes(name, parent_decl_ctx, max_matches,
+                       searched_symbol_files, types);
 }
 
-size_t Module::FindTypesInNamespace(ConstString type_name,
-                                    const CompilerDeclContext *parent_decl_ctx,
-                                    size_t max_matches, TypeList &type_list) {
-  const bool append = true;
+void Module::FindTypesInNamespace(ConstString type_name,
+                                  const CompilerDeclContext *parent_decl_ctx,
+                                  size_t max_matches, TypeList &type_list) {
   TypeMap types_map;
   llvm::DenseSet<lldb_private::SymbolFile *> searched_symbol_files;
-  size_t num_types =
-      FindTypes_Impl(type_name, parent_decl_ctx, append, max_matches,
-                     searched_symbol_files, types_map);
-  if (num_types > 0) {
+  FindTypes_Impl(type_name, parent_decl_ctx, max_matches, searched_symbol_files,
+                 types_map);
+  if (types_map.GetSize()) {
     SymbolContext sc;
     sc.module_sp = shared_from_this();
     sc.SortTypeList(types_map, type_list);
   }
-  return num_types;
 }
 
 lldb::TypeSP Module::FindFirstType(const SymbolContext &sc,
                                    ConstString name, bool exact_match) {
   TypeList type_list;
   llvm::DenseSet<lldb_private::SymbolFile *> searched_symbol_files;
-  const size_t num_matches =
-      FindTypes(name, exact_match, 1, searched_symbol_files, type_list);
-  if (num_matches)
+  FindTypes(name, exact_match, 1, searched_symbol_files, type_list);
+  if (type_list.GetSize())
     return type_list.GetTypeAtIndex(0);
   return TypeSP();
 }
 
-size_t Module::FindTypes(
+void Module::FindTypes(
     ConstString name, bool exact_match, size_t max_matches,
     llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeList &types) {
-  size_t num_matches = 0;
   const char *type_name_cstr = name.GetCString();
   llvm::StringRef type_scope;
   llvm::StringRef type_basename;
-  const bool append = true;
   TypeClass type_class = eTypeClassAny;
   TypeMap typesmap;
 
@@ -1008,58 +974,68 @@
     exact_match = type_scope.consume_front("::");
 
     ConstString type_basename_const_str(type_basename);
-    if (FindTypes_Impl(type_basename_const_str, nullptr, append, max_matches,
-                       searched_symbol_files, typesmap)) {
+    FindTypes_Impl(type_basename_const_str, nullptr, max_matches,
+                   searched_symbol_files, typesmap);
+    if (typesmap.GetSize())
       typesmap.RemoveMismatchedTypes(type_scope, type_basename, type_class,
                                      exact_match);
-      num_matches = typesmap.GetSize();
-    }
   } else {
     // The type is not in a namespace/class scope, just search for it by
     // basename
     if (type_class != eTypeClassAny && !type_basename.empty()) {
       // The "type_name_cstr" will have been modified if we have a valid type
       // class prefix (like "struct", "class", "union", "typedef" etc).
-      FindTypes_Impl(ConstString(type_basename), nullptr, append, UINT_MAX,
+      FindTypes_Impl(ConstString(type_basename), nullptr, UINT_MAX,
                      searched_symbol_files, typesmap);
       typesmap.RemoveMismatchedTypes(type_scope, type_basename, type_class,
                                      exact_match);
-      num_matches = typesmap.GetSize();
     } else {
-      num_matches = FindTypes_Impl(name, nullptr, append, UINT_MAX,
-                                   searched_symbol_files, typesmap);
+      FindTypes_Impl(name, nullptr, UINT_MAX, searched_symbol_files, typesmap);
       if (exact_match) {
         std::string name_str(name.AsCString(""));
         typesmap.RemoveMismatchedTypes(type_scope, name_str, type_class,
                                        exact_match);
-        num_matches = typesmap.GetSize();
       }
     }
   }
-  if (num_matches > 0) {
+  if (typesmap.GetSize()) {
     SymbolContext sc;
     sc.module_sp = shared_from_this();
     sc.SortTypeList(typesmap, types);
   }
-  return num_matches;
 }
 
-SymbolVendor *Module::GetSymbolVendor(bool can_create,
-                                      lldb_private::Stream *feedback_strm) {
-  if (!m_did_load_symbol_vendor.load()) {
+void Module::FindTypes(
+    llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+    llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
+    TypeMap &types) {
+  static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
+  Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
+  if (SymbolFile *symbols = GetSymbolFile())
+    symbols->FindTypes(pattern, languages, searched_symbol_files, types);
+}
+
+SymbolFile *Module::GetSymbolFile(bool can_create, Stream *feedback_strm) {
+  if (!m_did_load_symfile.load()) {
     std::lock_guard<std::recursive_mutex> guard(m_mutex);
-    if (!m_did_load_symbol_vendor.load() && can_create) {
+    if (!m_did_load_symfile.load() && can_create) {
       ObjectFile *obj_file = GetObjectFile();
       if (obj_file != nullptr) {
         static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
         Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
         m_symfile_up.reset(
             SymbolVendor::FindPlugin(shared_from_this(), feedback_strm));
-        m_did_load_symbol_vendor = true;
+        m_did_load_symfile = true;
       }
     }
   }
-  return m_symfile_up.get();
+  return m_symfile_up ? m_symfile_up->GetSymbolFile() : nullptr;
+}
+
+Symtab *Module::GetSymtab() {
+  if (SymbolFile *symbols = GetSymbolFile())
+    return symbols->GetSymtab();
+  return nullptr;
 }
 
 void Module::SetFileSpecAndObjectName(const FileSpec &file,
@@ -1083,34 +1059,35 @@
   return spec;
 }
 
-void Module::GetDescription(Stream *s, lldb::DescriptionLevel level) {
+void Module::GetDescription(llvm::raw_ostream &s,
+                            lldb::DescriptionLevel level) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
 
   if (level >= eDescriptionLevelFull) {
     if (m_arch.IsValid())
-      s->Printf("(%s) ", m_arch.GetArchitectureName());
+      s << llvm::formatv("({0}) ", m_arch.GetArchitectureName());
   }
 
   if (level == eDescriptionLevelBrief) {
     const char *filename = m_file.GetFilename().GetCString();
     if (filename)
-      s->PutCString(filename);
+      s << filename;
   } else {
     char path[PATH_MAX];
     if (m_file.GetPath(path, sizeof(path)))
-      s->PutCString(path);
+      s << path;
   }
 
   const char *object_name = m_object_name.GetCString();
   if (object_name)
-    s->Printf("(%s)", object_name);
+    s << llvm::formatv("({0})", object_name);
 }
 
 void Module::ReportError(const char *format, ...) {
   if (format && format[0]) {
     StreamString strm;
     strm.PutCString("error: ");
-    GetDescription(&strm, lldb::eDescriptionLevelBrief);
+    GetDescription(strm.AsRawOstream(), lldb::eDescriptionLevelBrief);
     strm.PutChar(' ');
     va_list args;
     va_start(args, format);
@@ -1141,7 +1118,7 @@
       if (format) {
         StreamString strm;
         strm.PutCString("error: the object file ");
-        GetDescription(&strm, lldb::eDescriptionLevelFull);
+        GetDescription(strm.AsRawOstream(), lldb::eDescriptionLevelFull);
         strm.PutCString(" has been modified\n");
 
         va_list args;
@@ -1167,7 +1144,7 @@
   if (format && format[0]) {
     StreamString strm;
     strm.PutCString("warning: ");
-    GetDescription(&strm, lldb::eDescriptionLevelFull);
+    GetDescription(strm.AsRawOstream(), lldb::eDescriptionLevelFull);
     strm.PutChar(' ');
 
     va_list args;
@@ -1188,7 +1165,7 @@
 void Module::LogMessage(Log *log, const char *format, ...) {
   if (log != nullptr) {
     StreamString log_message;
-    GetDescription(&log_message, lldb::eDescriptionLevelFull);
+    GetDescription(log_message.AsRawOstream(), lldb::eDescriptionLevelFull);
     log_message.PutCString(": ");
     va_list args;
     va_start(args, format);
@@ -1201,7 +1178,7 @@
 void Module::LogMessageVerboseBacktrace(Log *log, const char *format, ...) {
   if (log != nullptr) {
     StreamString log_message;
-    GetDescription(&log_message, lldb::eDescriptionLevelFull);
+    GetDescription(log_message.AsRawOstream(), lldb::eDescriptionLevelFull);
     log_message.PutCString(": ");
     va_list args;
     va_start(args, format);
@@ -1232,20 +1209,12 @@
   if (objfile)
     objfile->Dump(s);
 
-  SymbolVendor *symbols = GetSymbolVendor();
-  if (symbols)
-    symbols->Dump(s);
+  if (SymbolFile *symbols = GetSymbolFile())
+    symbols->Dump(*s);
 
   s->IndentLess();
 }
 
-TypeList *Module::GetTypeList() {
-  SymbolVendor *symbols = GetSymbolVendor();
-  if (symbols)
-    return &symbols->GetTypeList();
-  return nullptr;
-}
-
 ConstString Module::GetObjectName() const { return m_object_name; }
 
 ObjectFile *Module::GetObjectFile() {
@@ -1295,9 +1264,8 @@
   ObjectFile *obj_file = GetObjectFile();
   if (obj_file)
     obj_file->SectionFileAddressesChanged();
-  SymbolVendor *sym_vendor = GetSymbolVendor();
-  if (sym_vendor != nullptr)
-    sym_vendor->SectionFileAddressesChanged();
+  if (SymbolFile *symbols = GetSymbolFile())
+    symbols->SectionFileAddressesChanged();
 }
 
 UnwindTable &Module::GetUnwindTable() {
@@ -1308,7 +1276,7 @@
 
 SectionList *Module::GetUnifiedSectionList() {
   if (!m_sections_up)
-    m_sections_up = llvm::make_unique<SectionList>();
+    m_sections_up = std::make_unique<SectionList>();
   return m_sections_up.get();
 }
 
@@ -1318,13 +1286,9 @@
   Timer scoped_timer(
       func_cat, "Module::FindFirstSymbolWithNameAndType (name = %s, type = %i)",
       name.AsCString(), symbol_type);
-  SymbolVendor *sym_vendor = GetSymbolVendor();
-  if (sym_vendor) {
-    Symtab *symtab = sym_vendor->GetSymtab();
-    if (symtab)
-      return symtab->FindFirstSymbolWithNameAndType(
-          name, symbol_type, Symtab::eDebugAny, Symtab::eVisibilityAny);
-  }
+  if (Symtab *symtab = GetSymtab())
+    return symtab->FindFirstSymbolWithNameAndType(
+        name, symbol_type, Symtab::eDebugAny, Symtab::eVisibilityAny);
   return nullptr;
 }
 void Module::SymbolIndicesToSymbolContextList(
@@ -1345,23 +1309,18 @@
   }
 }
 
-size_t Module::FindFunctionSymbols(ConstString name,
+void Module::FindFunctionSymbols(ConstString name,
                                    uint32_t name_type_mask,
                                    SymbolContextList &sc_list) {
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat,
                      "Module::FindSymbolsFunctions (name = %s, mask = 0x%8.8x)",
                      name.AsCString(), name_type_mask);
-  SymbolVendor *sym_vendor = GetSymbolVendor();
-  if (sym_vendor) {
-    Symtab *symtab = sym_vendor->GetSymtab();
-    if (symtab)
-      return symtab->FindFunctionSymbols(name, name_type_mask, sc_list);
-  }
-  return 0;
+  if (Symtab *symtab = GetSymtab())
+    symtab->FindFunctionSymbols(name, name_type_mask, sc_list);
 }
 
-size_t Module::FindSymbolsWithNameAndType(ConstString name,
+void Module::FindSymbolsWithNameAndType(ConstString name,
                                           SymbolType symbol_type,
                                           SymbolContextList &sc_list) {
   // No need to protect this call using m_mutex all other method calls are
@@ -1371,22 +1330,16 @@
   Timer scoped_timer(
       func_cat, "Module::FindSymbolsWithNameAndType (name = %s, type = %i)",
       name.AsCString(), symbol_type);
-  const size_t initial_size = sc_list.GetSize();
-  SymbolVendor *sym_vendor = GetSymbolVendor();
-  if (sym_vendor) {
-    Symtab *symtab = sym_vendor->GetSymtab();
-    if (symtab) {
-      std::vector<uint32_t> symbol_indexes;
-      symtab->FindAllSymbolsWithNameAndType(name, symbol_type, symbol_indexes);
-      SymbolIndicesToSymbolContextList(symtab, symbol_indexes, sc_list);
-    }
+  if (Symtab *symtab = GetSymtab()) {
+    std::vector<uint32_t> symbol_indexes;
+    symtab->FindAllSymbolsWithNameAndType(name, symbol_type, symbol_indexes);
+    SymbolIndicesToSymbolContextList(symtab, symbol_indexes, sc_list);
   }
-  return sc_list.GetSize() - initial_size;
 }
 
-size_t Module::FindSymbolsMatchingRegExAndType(const RegularExpression &regex,
-                                               SymbolType symbol_type,
-                                               SymbolContextList &sc_list) {
+void Module::FindSymbolsMatchingRegExAndType(const RegularExpression &regex,
+                                             SymbolType symbol_type,
+                                             SymbolContextList &sc_list) {
   // No need to protect this call using m_mutex all other method calls are
   // already thread safe.
 
@@ -1395,35 +1348,27 @@
       func_cat,
       "Module::FindSymbolsMatchingRegExAndType (regex = %s, type = %i)",
       regex.GetText().str().c_str(), symbol_type);
-  const size_t initial_size = sc_list.GetSize();
-  SymbolVendor *sym_vendor = GetSymbolVendor();
-  if (sym_vendor) {
-    Symtab *symtab = sym_vendor->GetSymtab();
-    if (symtab) {
-      std::vector<uint32_t> symbol_indexes;
-      symtab->FindAllSymbolsMatchingRexExAndType(
-          regex, symbol_type, Symtab::eDebugAny, Symtab::eVisibilityAny,
-          symbol_indexes);
-      SymbolIndicesToSymbolContextList(symtab, symbol_indexes, sc_list);
-    }
+  if (Symtab *symtab = GetSymtab()) {
+    std::vector<uint32_t> symbol_indexes;
+    symtab->FindAllSymbolsMatchingRexExAndType(
+        regex, symbol_type, Symtab::eDebugAny, Symtab::eVisibilityAny,
+        symbol_indexes);
+    SymbolIndicesToSymbolContextList(symtab, symbol_indexes, sc_list);
   }
-  return sc_list.GetSize() - initial_size;
 }
 
 void Module::PreloadSymbols() {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  SymbolVendor * sym_vendor = GetSymbolVendor();
-  if (!sym_vendor) {
+  SymbolFile *sym_file = GetSymbolFile();
+  if (!sym_file)
     return;
-  }
+
   // Prime the symbol file first, since it adds symbols to the symbol table.
-  if (SymbolFile *symbol_file = sym_vendor->GetSymbolFile()) {
-    symbol_file->PreloadSymbols();
-  }
+  sym_file->PreloadSymbols();
+
   // Now we can prime the symbol table.
-  if (Symtab * symtab = sym_vendor->GetSymtab()) {
+  if (Symtab *symtab = sym_file->GetSymtab())
     symtab->PreloadSymbols();
-  }
 }
 
 void Module::SetSymbolFileFileSpec(const FileSpec &file) {
@@ -1433,7 +1378,7 @@
     // Remove any sections in the unified section list that come from the
     // current symbol vendor.
     SectionList *section_list = GetSectionList();
-    SymbolFile *symbol_file = m_symfile_up->GetSymbolFile();
+    SymbolFile *symbol_file = GetSymbolFile();
     if (section_list && symbol_file) {
       ObjectFile *obj_file = symbol_file->GetObjectFile();
       // Make sure we have an object file and that the symbol vendor's objfile
@@ -1489,7 +1434,7 @@
   }
   m_symfile_spec = file;
   m_symfile_up.reset();
-  m_did_load_symbol_vendor = false;
+  m_did_load_symfile = false;
 }
 
 bool Module::IsExecutable() {
@@ -1566,12 +1511,10 @@
               return false;
             }
             StreamString scripting_stream;
-            scripting_fspec.Dump(&scripting_stream);
-            const bool can_reload = true;
+            scripting_fspec.Dump(scripting_stream.AsRawOstream());
             const bool init_lldb_globals = false;
             bool did_load = script_interpreter->LoadScriptingModule(
-                scripting_stream.GetData(), can_reload, init_lldb_globals,
-                error);
+                scripting_stream.GetData(), init_lldb_globals, error);
             if (!did_load)
               return false;
           }
@@ -1614,19 +1557,13 @@
   }
 
   const FileSpec &file_spec = module_ref.GetFileSpec();
-  if (file_spec) {
-    if (!FileSpec::Equal(file_spec, m_file, (bool)file_spec.GetDirectory()) &&
-        !FileSpec::Equal(file_spec, m_platform_file,
-                         (bool)file_spec.GetDirectory()))
-      return false;
-  }
+  if (!FileSpec::Match(file_spec, m_file) &&
+      !FileSpec::Match(file_spec, m_platform_file))
+    return false;
 
   const FileSpec &platform_file_spec = module_ref.GetPlatformFileSpec();
-  if (platform_file_spec) {
-    if (!FileSpec::Equal(platform_file_spec, GetPlatformFileSpec(),
-                         (bool)platform_file_spec.GetDirectory()))
-      return false;
-  }
+  if (!FileSpec::Match(platform_file_spec, GetPlatformFileSpec()))
+    return false;
 
   const ArchSpec &arch = module_ref.GetArchitecture();
   if (arch.IsValid()) {
@@ -1654,6 +1591,26 @@
   return m_source_mappings.RemapPath(path, new_path);
 }
 
+bool Module::MergeArchitecture(const ArchSpec &arch_spec) {
+  if (!arch_spec.IsValid())
+    return false;
+  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT | LIBLLDB_LOG_MODULES),
+           "module has arch %s, merging/replacing with arch %s",
+           m_arch.GetTriple().getTriple().c_str(),
+           arch_spec.GetTriple().getTriple().c_str());
+  if (!m_arch.IsCompatibleMatch(arch_spec)) {
+    // The new architecture is different, we just need to replace it.
+    return SetArchitecture(arch_spec);
+  }
+
+  // Merge bits from arch_spec into "merged_arch" and set our architecture.
+  ArchSpec merged_arch(m_arch);
+  merged_arch.MergeFrom(arch_spec);
+  // SetArchitecture() is a no-op if m_arch is already valid.
+  m_arch = ArchSpec();
+  return SetArchitecture(merged_arch);
+}
+
 llvm::VersionTuple Module::GetVersion() {
   if (ObjectFile *obj_file = GetObjectFile())
     return obj_file->GetVersion();
diff --git a/src/llvm-project/lldb/source/Core/ModuleList.cpp b/src/llvm-project/lldb/source/Core/ModuleList.cpp
index 9d795f9..07100bb 100644
--- a/src/llvm-project/lldb/source/Core/ModuleList.cpp
+++ b/src/llvm-project/lldb/source/Core/ModuleList.cpp
@@ -17,6 +17,7 @@
 #include "lldb/Symbol/LocateSymbolFile.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Symbol/TypeList.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
@@ -56,40 +57,26 @@
 namespace lldb_private {
 class Target;
 }
-namespace lldb_private {
-class TypeList;
-}
 
 using namespace lldb;
 using namespace lldb_private;
 
 namespace {
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"enable-external-lookup", OptionValue::eTypeBoolean, true, true, nullptr,
-     {},
-     "Control the use of external tools and repositories to locate symbol "
-     "files. Directories listed in target.debug-file-search-paths and "
-     "directory of the executable are always checked first for separate debug "
-     "info files. Then depending on this setting: "
-     "On macOS, Spotlight would be also used to locate a matching .dSYM "
-     "bundle based on the UUID of the executable. "
-     "On NetBSD, directory /usr/libdata/debug would be also searched. "
-     "On platforms other than NetBSD directory /usr/lib/debug would be "
-     "also searched."
-    },
-    {"clang-modules-cache-path", OptionValue::eTypeFileSpec, true, 0, nullptr,
-     {},
-     "The path to the clang modules cache directory (-fmodules-cache-path)."}};
+#define LLDB_PROPERTIES_modulelist
+#include "CoreProperties.inc"
 
-enum { ePropertyEnableExternalLookup, ePropertyClangModulesCachePath };
+enum {
+#define LLDB_PROPERTIES_modulelist
+#include "CorePropertiesEnum.inc"
+};
 
 } // namespace
 
 ModuleListProperties::ModuleListProperties() {
   m_collection_sp =
       std::make_shared<OptionValueProperties>(ConstString("symbols"));
-  m_collection_sp->Initialize(g_properties);
+  m_collection_sp->Initialize(g_modulelist_properties);
 
   llvm::SmallString<128> path;
   clang::driver::Driver::getDefaultModuleCachePath(path);
@@ -99,7 +86,7 @@
 bool ModuleListProperties::GetEnableExternalLookup() const {
   const uint32_t idx = ePropertyEnableExternalLookup;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_modulelist_properties[idx].default_uint_value != 0);
 }
 
 bool ModuleListProperties::SetEnableExternalLookup(bool new_value) {
@@ -135,9 +122,9 @@
 const ModuleList &ModuleList::operator=(const ModuleList &rhs) {
   if (this != &rhs) {
     std::lock(m_modules_mutex, rhs.m_modules_mutex);
-    std::lock_guard<std::recursive_mutex> lhs_guard(m_modules_mutex, 
+    std::lock_guard<std::recursive_mutex> lhs_guard(m_modules_mutex,
                                                     std::adopt_lock);
-    std::lock_guard<std::recursive_mutex> rhs_guard(rhs.m_modules_mutex, 
+    std::lock_guard<std::recursive_mutex> rhs_guard(rhs.m_modules_mutex,
                                                     std::adopt_lock);
     m_modules = rhs.m_modules;
   }
@@ -155,8 +142,8 @@
   }
 }
 
-void ModuleList::Append(const ModuleSP &module_sp, bool notify) { 
-  AppendImpl(module_sp, notify); 
+void ModuleList::Append(const ModuleSP &module_sp, bool notify) {
+  AppendImpl(module_sp, notify);
 }
 
 void ModuleList::ReplaceEquivalent(const ModuleSP &module_sp) {
@@ -339,14 +326,10 @@
   return module_sp;
 }
 
-size_t ModuleList::FindFunctions(ConstString name,
-                                 FunctionNameType name_type_mask,
-                                 bool include_symbols, bool include_inlines,
-                                 bool append,
-                                 SymbolContextList &sc_list) const {
-  if (!append)
-    sc_list.Clear();
-
+void ModuleList::FindFunctions(ConstString name,
+                               FunctionNameType name_type_mask,
+                               bool include_symbols, bool include_inlines,
+                               SymbolContextList &sc_list) const {
   const size_t old_size = sc_list.GetSize();
 
   if (name_type_mask & eFunctionNameTypeAuto) {
@@ -357,7 +340,7 @@
     for (pos = m_modules.begin(); pos != end; ++pos) {
       (*pos)->FindFunctions(lookup_info.GetLookupName(), nullptr,
                             lookup_info.GetNameTypeMask(), include_symbols,
-                            include_inlines, true, sc_list);
+                            include_inlines, sc_list);
     }
 
     const size_t new_size = sc_list.GetSize();
@@ -369,15 +352,14 @@
     collection::const_iterator pos, end = m_modules.end();
     for (pos = m_modules.begin(); pos != end; ++pos) {
       (*pos)->FindFunctions(name, nullptr, name_type_mask, include_symbols,
-                            include_inlines, true, sc_list);
+                            include_inlines, sc_list);
     }
   }
-  return sc_list.GetSize() - old_size;
 }
 
-size_t ModuleList::FindFunctionSymbols(ConstString name,
-                                       lldb::FunctionNameType name_type_mask,
-                                       SymbolContextList &sc_list) {
+void ModuleList::FindFunctionSymbols(ConstString name,
+                                     lldb::FunctionNameType name_type_mask,
+                                     SymbolContextList &sc_list) {
   const size_t old_size = sc_list.GetSize();
 
   if (name_type_mask & eFunctionNameTypeAuto) {
@@ -401,96 +383,66 @@
       (*pos)->FindFunctionSymbols(name, name_type_mask, sc_list);
     }
   }
-
-  return sc_list.GetSize() - old_size;
 }
 
-size_t ModuleList::FindFunctions(const RegularExpression &name,
-                                 bool include_symbols, bool include_inlines,
-                                 bool append, SymbolContextList &sc_list) {
-  const size_t old_size = sc_list.GetSize();
-
+void ModuleList::FindFunctions(const RegularExpression &name,
+                               bool include_symbols, bool include_inlines,
+                               SymbolContextList &sc_list) {
   std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
   collection::const_iterator pos, end = m_modules.end();
   for (pos = m_modules.begin(); pos != end; ++pos) {
-    (*pos)->FindFunctions(name, include_symbols, include_inlines, append,
-                          sc_list);
+    (*pos)->FindFunctions(name, include_symbols, include_inlines, sc_list);
   }
-
-  return sc_list.GetSize() - old_size;
 }
 
-size_t ModuleList::FindCompileUnits(const FileSpec &path, bool append,
-                                    SymbolContextList &sc_list) const {
-  if (!append)
-    sc_list.Clear();
-
+void ModuleList::FindCompileUnits(const FileSpec &path,
+                                  SymbolContextList &sc_list) const {
   std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
   collection::const_iterator pos, end = m_modules.end();
   for (pos = m_modules.begin(); pos != end; ++pos) {
-    (*pos)->FindCompileUnits(path, true, sc_list);
+    (*pos)->FindCompileUnits(path, sc_list);
   }
-
-  return sc_list.GetSize();
 }
 
-size_t ModuleList::FindGlobalVariables(ConstString name,
-                                       size_t max_matches,
-                                       VariableList &variable_list) const {
-  size_t initial_size = variable_list.GetSize();
+void ModuleList::FindGlobalVariables(ConstString name, size_t max_matches,
+                                     VariableList &variable_list) const {
   std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
   collection::const_iterator pos, end = m_modules.end();
   for (pos = m_modules.begin(); pos != end; ++pos) {
     (*pos)->FindGlobalVariables(name, nullptr, max_matches, variable_list);
   }
-  return variable_list.GetSize() - initial_size;
 }
 
-size_t ModuleList::FindGlobalVariables(const RegularExpression &regex,
-                                       size_t max_matches,
-                                       VariableList &variable_list) const {
-  size_t initial_size = variable_list.GetSize();
+void ModuleList::FindGlobalVariables(const RegularExpression &regex,
+                                     size_t max_matches,
+                                     VariableList &variable_list) const {
   std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
   collection::const_iterator pos, end = m_modules.end();
   for (pos = m_modules.begin(); pos != end; ++pos) {
     (*pos)->FindGlobalVariables(regex, max_matches, variable_list);
   }
-  return variable_list.GetSize() - initial_size;
 }
 
-size_t ModuleList::FindSymbolsWithNameAndType(ConstString name,
-                                              SymbolType symbol_type,
-                                              SymbolContextList &sc_list,
-                                              bool append) const {
+void ModuleList::FindSymbolsWithNameAndType(ConstString name,
+                                            SymbolType symbol_type,
+                                            SymbolContextList &sc_list) const {
   std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
-  if (!append)
-    sc_list.Clear();
-  size_t initial_size = sc_list.GetSize();
-
   collection::const_iterator pos, end = m_modules.end();
   for (pos = m_modules.begin(); pos != end; ++pos)
     (*pos)->FindSymbolsWithNameAndType(name, symbol_type, sc_list);
-  return sc_list.GetSize() - initial_size;
 }
 
-size_t ModuleList::FindSymbolsMatchingRegExAndType(
+void ModuleList::FindSymbolsMatchingRegExAndType(
     const RegularExpression &regex, lldb::SymbolType symbol_type,
-    SymbolContextList &sc_list, bool append) const {
+    SymbolContextList &sc_list) const {
   std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
-  if (!append)
-    sc_list.Clear();
-  size_t initial_size = sc_list.GetSize();
-
   collection::const_iterator pos, end = m_modules.end();
   for (pos = m_modules.begin(); pos != end; ++pos)
     (*pos)->FindSymbolsMatchingRegExAndType(regex, symbol_type, sc_list);
-  return sc_list.GetSize() - initial_size;
 }
 
-size_t ModuleList::FindModules(const ModuleSpec &module_spec,
-                               ModuleList &matching_module_list) const {
-  size_t existing_matches = matching_module_list.GetSize();
-
+void ModuleList::FindModules(const ModuleSpec &module_spec,
+                             ModuleList &matching_module_list) const {
   std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
   collection::const_iterator pos, end = m_modules.end();
   for (pos = m_modules.begin(); pos != end; ++pos) {
@@ -498,7 +450,6 @@
     if (module_sp->MatchesModuleSpec(module_spec))
       matching_module_list.Append(module_sp);
   }
-  return matching_module_list.GetSize() - existing_matches;
 }
 
 ModuleSP ModuleList::FindModule(const Module *module_ptr) const {
@@ -536,44 +487,36 @@
   return module_sp;
 }
 
-size_t
-ModuleList::FindTypes(Module *search_first, ConstString name,
-                      bool name_is_fully_qualified, size_t max_matches,
-                      llvm::DenseSet<SymbolFile *> &searched_symbol_files,
-                      TypeList &types) const {
+void ModuleList::FindTypes(Module *search_first, ConstString name,
+                           bool name_is_fully_qualified, size_t max_matches,
+                           llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+                           TypeList &types) const {
   std::lock_guard<std::recursive_mutex> guard(m_modules_mutex);
 
-  size_t total_matches = 0;
   collection::const_iterator pos, end = m_modules.end();
   if (search_first) {
     for (pos = m_modules.begin(); pos != end; ++pos) {
       if (search_first == pos->get()) {
-        total_matches +=
-            search_first->FindTypes(name, name_is_fully_qualified, max_matches,
-                                    searched_symbol_files, types);
+        search_first->FindTypes(name, name_is_fully_qualified, max_matches,
+                                searched_symbol_files, types);
 
-        if (total_matches >= max_matches)
-          break;
+        if (types.GetSize() >= max_matches)
+          return;
       }
     }
   }
 
-  if (total_matches < max_matches) {
-    for (pos = m_modules.begin(); pos != end; ++pos) {
-      // Search the module if the module is not equal to the one in the symbol
-      // context "sc". If "sc" contains a empty module shared pointer, then the
-      // comparison will always be true (valid_module_ptr != nullptr).
-      if (search_first != pos->get())
-        total_matches +=
-            (*pos)->FindTypes(name, name_is_fully_qualified, max_matches,
-                              searched_symbol_files, types);
+  for (pos = m_modules.begin(); pos != end; ++pos) {
+    // Search the module if the module is not equal to the one in the symbol
+    // context "sc". If "sc" contains a empty module shared pointer, then the
+    // comparison will always be true (valid_module_ptr != nullptr).
+    if (search_first != pos->get())
+      (*pos)->FindTypes(name, name_is_fully_qualified, max_matches,
+                        searched_symbol_files, types);
 
-      if (total_matches >= max_matches)
-        break;
-    }
+    if (types.GetSize() >= max_matches)
+      return;
   }
-
-  return total_matches;
 }
 
 bool ModuleList::FindSourceFile(const FileSpec &orig_spec,
@@ -641,11 +584,11 @@
     for (pos = begin; pos != end; ++pos) {
       Module *module = pos->get();
       const FileSpec &module_file_spec = module->GetFileSpec();
-      log->Printf("%s[%u] %s (%s) \"%s\"", prefix_cstr ? prefix_cstr : "",
-                  (uint32_t)std::distance(begin, pos),
-                  module->GetUUID().GetAsString().c_str(),
-                  module->GetArchitecture().GetArchitectureName(),
-                  module_file_spec.GetPath().c_str());
+      LLDB_LOGF(log, "%s[%u] %s (%s) \"%s\"", prefix_cstr ? prefix_cstr : "",
+                (uint32_t)std::distance(begin, pos),
+                module->GetUUID().GetAsString().c_str(),
+                module->GetArchitecture().GetArchitectureName(),
+                module_file_spec.GetPath().c_str());
     }
   }
 }
@@ -757,9 +700,9 @@
   return false;
 }
 
-size_t ModuleList::FindSharedModules(const ModuleSpec &module_spec,
-                                     ModuleList &matching_module_list) {
-  return GetSharedModuleList().FindModules(module_spec, matching_module_list);
+void ModuleList::FindSharedModules(const ModuleSpec &module_spec,
+                                   ModuleList &matching_module_list) {
+  GetSharedModuleList().FindModules(module_spec, matching_module_list);
 }
 
 size_t ModuleList::RemoveOrphanSharedModules(bool mandatory) {
@@ -794,8 +737,9 @@
   // mutex list.
   if (!always_create) {
     ModuleList matching_module_list;
-    const size_t num_matching_modules =
-        shared_module_list.FindModules(module_spec, matching_module_list);
+    shared_module_list.FindModules(module_spec, matching_module_list);
+    const size_t num_matching_modules = matching_module_list.GetSize();
+
     if (num_matching_modules > 0) {
       for (size_t module_idx = 0; module_idx < num_matching_modules;
            ++module_idx) {
@@ -808,8 +752,10 @@
 
           Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_MODULES));
           if (log != nullptr)
-            log->Printf("module changed: %p, removing from global module list",
-                        static_cast<void *>(module_sp.get()));
+            LLDB_LOGF(
+                log, "%p '%s' module changed: removing from global module list",
+                static_cast<void *>(module_sp.get()),
+                module_sp->GetFileSpec().GetFilename().GetCString());
 
           shared_module_list.Remove(module_sp);
           module_sp.reset();
@@ -945,8 +891,8 @@
     platform_module_spec.GetSymbolFileSpec() =
         located_binary_modulespec.GetSymbolFileSpec();
     ModuleList matching_module_list;
-    if (shared_module_list.FindModules(platform_module_spec,
-                                       matching_module_list) > 0) {
+    shared_module_list.FindModules(platform_module_spec, matching_module_list);
+    if (!matching_module_list.IsEmpty()) {
       module_sp = matching_module_list.GetModuleAtIndex(0);
 
       // If we didn't have a UUID in mind when looking for the object file,
diff --git a/src/llvm-project/lldb/source/Core/PluginManager.cpp b/src/llvm-project/lldb/source/Core/PluginManager.cpp
index 24cadcd..e8bfef7 100644
--- a/src/llvm-project/lldb/source/Core/PluginManager.cpp
+++ b/src/llvm-project/lldb/source/Core/PluginManager.cpp
@@ -86,7 +86,7 @@
 }
 
 template <typename FPtrTy> static FPtrTy CastToFPtr(void *VPtr) {
-  return reinterpret_cast<FPtrTy>(reinterpret_cast<intptr_t>(VPtr));
+  return reinterpret_cast<FPtrTy>(VPtr);
 }
 
 static FileSystem::EnumerateDirectoryResult
@@ -1341,10 +1341,10 @@
   return nullptr;
 }
 
-size_t PluginManager::AutoCompletePlatformName(llvm::StringRef name,
-                                               StringList &matches) {
+void PluginManager::AutoCompletePlatformName(llvm::StringRef name,
+                                             CompletionRequest &request) {
   if (name.empty())
-    return matches.GetSize();
+    return;
 
   std::lock_guard<std::recursive_mutex> guard(GetPlatformInstancesMutex());
   PlatformInstances &instances = GetPlatformInstances();
@@ -1354,9 +1354,8 @@
   for (pos = instances.begin(); pos != end; ++pos) {
     llvm::StringRef plugin_name(pos->name.GetCString());
     if (plugin_name.startswith(name_sref))
-      matches.AppendString(plugin_name.data());
+      request.AddCompletion(plugin_name.data());
   }
-  return matches.GetSize();
 }
 
 #pragma mark Process
@@ -2084,12 +2083,11 @@
 #pragma mark TypeSystem
 
 struct TypeSystemInstance {
-  TypeSystemInstance() : name(), description(), create_callback(nullptr) {}
-
   ConstString name;
   std::string description;
   TypeSystemCreateInstance create_callback;
-  TypeSystemEnumerateSupportedLanguages enumerate_callback;
+  LanguageSet supported_languages_for_types;
+  LanguageSet supported_languages_for_expressions;
 };
 
 typedef std::vector<TypeSystemInstance> TypeSystemInstances;
@@ -2104,11 +2102,11 @@
   return g_instances;
 }
 
-bool PluginManager::RegisterPlugin(ConstString name,
-                                   const char *description,
-                                   TypeSystemCreateInstance create_callback,
-                                   TypeSystemEnumerateSupportedLanguages
-                                       enumerate_supported_languages_callback) {
+bool PluginManager::RegisterPlugin(
+    ConstString name, const char *description,
+    TypeSystemCreateInstance create_callback,
+    LanguageSet supported_languages_for_types,
+    LanguageSet supported_languages_for_expressions) {
   if (create_callback) {
     TypeSystemInstance instance;
     assert((bool)name);
@@ -2116,7 +2114,8 @@
     if (description && description[0])
       instance.description = description;
     instance.create_callback = create_callback;
-    instance.enumerate_callback = enumerate_supported_languages_callback;
+    instance.supported_languages_for_types = supported_languages_for_types;
+    instance.supported_languages_for_expressions = supported_languages_for_expressions;
     std::lock_guard<std::recursive_mutex> guard(GetTypeSystemMutex());
     GetTypeSystemInstances().push_back(instance);
   }
@@ -2164,30 +2163,22 @@
   return nullptr;
 }
 
-TypeSystemEnumerateSupportedLanguages
-PluginManager::GetTypeSystemEnumerateSupportedLanguagesCallbackAtIndex(
-    uint32_t idx) {
+LanguageSet PluginManager::GetAllTypeSystemSupportedLanguagesForTypes() {
   std::lock_guard<std::recursive_mutex> guard(GetTypeSystemMutex());
+  LanguageSet all;
   TypeSystemInstances &instances = GetTypeSystemInstances();
-  if (idx < instances.size())
-    return instances[idx].enumerate_callback;
-  return nullptr;
+  for (unsigned i = 0; i < instances.size(); ++i)
+    all.bitvector |= instances[i].supported_languages_for_types.bitvector;
+  return all;
 }
 
-TypeSystemEnumerateSupportedLanguages
-PluginManager::GetTypeSystemEnumerateSupportedLanguagesCallbackForPluginName(
-    ConstString name) {
-  if (name) {
-    std::lock_guard<std::recursive_mutex> guard(GetTypeSystemMutex());
-    TypeSystemInstances &instances = GetTypeSystemInstances();
-
-    TypeSystemInstances::iterator pos, end = instances.end();
-    for (pos = instances.begin(); pos != end; ++pos) {
-      if (name == pos->name)
-        return pos->enumerate_callback;
-    }
-  }
-  return nullptr;
+LanguageSet PluginManager::GetAllTypeSystemSupportedLanguagesForExpressions() {
+  std::lock_guard<std::recursive_mutex> guard(GetTypeSystemMutex());
+  LanguageSet all;
+  TypeSystemInstances &instances = GetTypeSystemInstances();
+  for (unsigned i = 0; i < instances.size(); ++i)
+    all.bitvector |= instances[i].supported_languages_for_expressions.bitvector;
+  return all;
 }
 
 #pragma mark REPL
@@ -2198,7 +2189,7 @@
   ConstString name;
   std::string description;
   REPLCreateInstance create_callback;
-  REPLEnumerateSupportedLanguages enumerate_languages_callback;
+  LanguageSet supported_languages;
 };
 
 typedef std::vector<REPLInstance> REPLInstances;
@@ -2213,10 +2204,9 @@
   return g_instances;
 }
 
-bool PluginManager::RegisterPlugin(
-    ConstString name, const char *description,
-    REPLCreateInstance create_callback,
-    REPLEnumerateSupportedLanguages enumerate_languages_callback) {
+bool PluginManager::RegisterPlugin(ConstString name, const char *description,
+                                   REPLCreateInstance create_callback,
+                                   LanguageSet supported_languages) {
   if (create_callback) {
     REPLInstance instance;
     assert((bool)name);
@@ -2224,7 +2214,7 @@
     if (description && description[0])
       instance.description = description;
     instance.create_callback = create_callback;
-    instance.enumerate_languages_callback = enumerate_languages_callback;
+    instance.supported_languages = supported_languages;
     std::lock_guard<std::recursive_mutex> guard(GetREPLMutex());
     GetREPLInstances().push_back(instance);
   }
@@ -2270,29 +2260,13 @@
   return nullptr;
 }
 
-REPLEnumerateSupportedLanguages
-PluginManager::GetREPLEnumerateSupportedLanguagesCallbackAtIndex(uint32_t idx) {
+LanguageSet PluginManager::GetREPLAllTypeSystemSupportedLanguages() {
   std::lock_guard<std::recursive_mutex> guard(GetREPLMutex());
+  LanguageSet all;
   REPLInstances &instances = GetREPLInstances();
-  if (idx < instances.size())
-    return instances[idx].enumerate_languages_callback;
-  return nullptr;
-}
-
-REPLEnumerateSupportedLanguages
-PluginManager::GetREPLSystemEnumerateSupportedLanguagesCallbackForPluginName(
-    ConstString name) {
-  if (name) {
-    std::lock_guard<std::recursive_mutex> guard(GetREPLMutex());
-    REPLInstances &instances = GetREPLInstances();
-
-    REPLInstances::iterator pos, end = instances.end();
-    for (pos = instances.begin(); pos != end; ++pos) {
-      if (name == pos->name)
-        return pos->enumerate_languages_callback;
-    }
-  }
-  return nullptr;
+  for (unsigned i = 0; i < instances.size(); ++i)
+    all.bitvector |= instances[i].supported_languages.bitvector;
+  return all;
 }
 
 #pragma mark PluginManager
diff --git a/src/llvm-project/lldb/source/Core/SearchFilter.cpp b/src/llvm-project/lldb/source/Core/SearchFilter.cpp
index 531fa07..9902166 100644
--- a/src/llvm-project/lldb/source/Core/SearchFilter.cpp
+++ b/src/llvm-project/lldb/source/Core/SearchFilter.cpp
@@ -13,7 +13,7 @@
 #include "lldb/Core/ModuleList.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/Status.h"
@@ -208,10 +208,12 @@
     return;
   empty_sc.target_sp = m_target_sp;
 
-  if (searcher.GetDepth() == lldb::eSearchDepthTarget)
-    searcher.SearchCallback(*this, empty_sc, nullptr, false);
-  else
-    DoModuleIteration(empty_sc, searcher);
+  if (searcher.GetDepth() == lldb::eSearchDepthTarget) {
+    searcher.SearchCallback(*this, empty_sc, nullptr);
+    return;
+  }
+  
+  DoModuleIteration(empty_sc, searcher);
 }
 
 void SearchFilter::SearchInModuleList(Searcher &searcher, ModuleList &modules) {
@@ -221,20 +223,20 @@
     return;
   empty_sc.target_sp = m_target_sp;
 
-  if (searcher.GetDepth() == lldb::eSearchDepthTarget)
-    searcher.SearchCallback(*this, empty_sc, nullptr, false);
-  else {
-    std::lock_guard<std::recursive_mutex> guard(modules.GetMutex());
-    const size_t numModules = modules.GetSize();
+  if (searcher.GetDepth() == lldb::eSearchDepthTarget) {
+    searcher.SearchCallback(*this, empty_sc, nullptr);
+    return;
+  }
 
-    for (size_t i = 0; i < numModules; i++) {
-      ModuleSP module_sp(modules.GetModuleAtIndexUnlocked(i));
-      if (ModulePasses(module_sp)) {
-        if (DoModuleIteration(module_sp, searcher) ==
-            Searcher::eCallbackReturnStop)
-          return;
-      }
-    }
+  std::lock_guard<std::recursive_mutex> guard(modules.GetMutex());
+  const size_t numModules = modules.GetSize();
+
+  for (size_t i = 0; i < numModules; i++) {
+    ModuleSP module_sp(modules.GetModuleAtIndexUnlocked(i));
+    if (!ModulePasses(module_sp))
+      continue;
+    if (DoModuleIteration(module_sp, searcher) == Searcher::eCallbackReturnStop)
+      return;
   }
 }
 
@@ -248,45 +250,47 @@
 Searcher::CallbackReturn
 SearchFilter::DoModuleIteration(const SymbolContext &context,
                                 Searcher &searcher) {
-  if (searcher.GetDepth() >= lldb::eSearchDepthModule) {
-    if (context.module_sp) {
-      if (searcher.GetDepth() == lldb::eSearchDepthModule) {
-        SymbolContext matchingContext(context.module_sp.get());
-        searcher.SearchCallback(*this, matchingContext, nullptr, false);
-      } else {
-        return DoCUIteration(context.module_sp, context, searcher);
-      }
+  if (searcher.GetDepth() < lldb::eSearchDepthModule)
+    return Searcher::eCallbackReturnContinue;
+
+  if (context.module_sp) {
+    if (searcher.GetDepth() != lldb::eSearchDepthModule)
+      return DoCUIteration(context.module_sp, context, searcher);
+
+    SymbolContext matchingContext(context.module_sp.get());
+    searcher.SearchCallback(*this, matchingContext, nullptr);
+    return Searcher::eCallbackReturnContinue;
+  }
+
+  const ModuleList &target_images = m_target_sp->GetImages();
+  std::lock_guard<std::recursive_mutex> guard(target_images.GetMutex());
+
+  size_t n_modules = target_images.GetSize();
+  for (size_t i = 0; i < n_modules; i++) {
+    // If this is the last level supplied, then call the callback directly,
+    // otherwise descend.
+    ModuleSP module_sp(target_images.GetModuleAtIndexUnlocked(i));
+    if (!ModulePasses(module_sp))
+      continue;
+
+    if (searcher.GetDepth() == lldb::eSearchDepthModule) {
+      SymbolContext matchingContext(m_target_sp, module_sp);
+
+      Searcher::CallbackReturn shouldContinue =
+          searcher.SearchCallback(*this, matchingContext, nullptr);
+      if (shouldContinue == Searcher::eCallbackReturnStop ||
+          shouldContinue == Searcher::eCallbackReturnPop)
+        return shouldContinue;
     } else {
-      const ModuleList &target_images = m_target_sp->GetImages();
-      std::lock_guard<std::recursive_mutex> guard(target_images.GetMutex());
-
-      size_t n_modules = target_images.GetSize();
-      for (size_t i = 0; i < n_modules; i++) {
-        // If this is the last level supplied, then call the callback directly,
-        // otherwise descend.
-        ModuleSP module_sp(target_images.GetModuleAtIndexUnlocked(i));
-        if (!ModulePasses(module_sp))
-          continue;
-
-        if (searcher.GetDepth() == lldb::eSearchDepthModule) {
-          SymbolContext matchingContext(m_target_sp, module_sp);
-
-          Searcher::CallbackReturn shouldContinue =
-              searcher.SearchCallback(*this, matchingContext, nullptr, false);
-          if (shouldContinue == Searcher::eCallbackReturnStop ||
-              shouldContinue == Searcher::eCallbackReturnPop)
-            return shouldContinue;
-        } else {
-          Searcher::CallbackReturn shouldContinue =
-              DoCUIteration(module_sp, context, searcher);
-          if (shouldContinue == Searcher::eCallbackReturnStop)
-            return shouldContinue;
-          else if (shouldContinue == Searcher::eCallbackReturnPop)
-            continue;
-        }
-      }
+      Searcher::CallbackReturn shouldContinue =
+          DoCUIteration(module_sp, context, searcher);
+      if (shouldContinue == Searcher::eCallbackReturnStop)
+        return shouldContinue;
+      else if (shouldContinue == Searcher::eCallbackReturnPop)
+        continue;
     }
   }
+
   return Searcher::eCallbackReturnContinue;
 }
 
@@ -294,57 +298,56 @@
 SearchFilter::DoCUIteration(const ModuleSP &module_sp,
                             const SymbolContext &context, Searcher &searcher) {
   Searcher::CallbackReturn shouldContinue;
-  if (context.comp_unit == nullptr) {
-    const size_t num_comp_units = module_sp->GetNumCompileUnits();
-    for (size_t i = 0; i < num_comp_units; i++) {
-      CompUnitSP cu_sp(module_sp->GetCompileUnitAtIndex(i));
-      if (cu_sp) {
-        if (!CompUnitPasses(*(cu_sp.get())))
-          continue;
-
-        if (searcher.GetDepth() == lldb::eSearchDepthCompUnit) {
-          SymbolContext matchingContext(m_target_sp, module_sp, cu_sp.get());
-
-          shouldContinue =
-              searcher.SearchCallback(*this, matchingContext, nullptr, false);
-
-          if (shouldContinue == Searcher::eCallbackReturnPop)
-            return Searcher::eCallbackReturnContinue;
-          else if (shouldContinue == Searcher::eCallbackReturnStop)
-            return shouldContinue;
-        } else {
-          // First make sure this compile unit's functions are parsed
-          // since CompUnit::ForeachFunction only iterates over already
-          // parsed functions.
-          SymbolVendor *sym_vendor = module_sp->GetSymbolVendor();
-          if (!sym_vendor)
-            continue;
-          if (!sym_vendor->ParseFunctions(*cu_sp))
-            continue;
-          // If we got any functions, use ForeachFunction to do the iteration.
-          cu_sp->ForeachFunction([&](const FunctionSP &func_sp) {
-            if (!FunctionPasses(*func_sp.get()))
-              return false; // Didn't pass the filter, just keep going.
-            if (searcher.GetDepth() == lldb::eSearchDepthFunction) {
-              SymbolContext matchingContext(m_target_sp, module_sp, 
-                                            cu_sp.get(), func_sp.get());
-              shouldContinue = searcher.SearchCallback(*this, 
-                                                       matchingContext, 
-                                                       nullptr, false);
-            } else {
-              shouldContinue = DoFunctionIteration(func_sp.get(), context, 
-                                                   searcher);
-            }
-            return shouldContinue != Searcher::eCallbackReturnContinue;
-          });
-        }
-      }
-    }
-  } else {
+  if (context.comp_unit != nullptr) {
     if (CompUnitPasses(*context.comp_unit)) {
       SymbolContext matchingContext(m_target_sp, module_sp, context.comp_unit);
-      return searcher.SearchCallback(*this, matchingContext, nullptr, false);
+      return searcher.SearchCallback(*this, matchingContext, nullptr);
     }
+    return Searcher::eCallbackReturnContinue;
+  }
+
+  const size_t num_comp_units = module_sp->GetNumCompileUnits();
+  for (size_t i = 0; i < num_comp_units; i++) {
+    CompUnitSP cu_sp(module_sp->GetCompileUnitAtIndex(i));
+    if (!cu_sp)
+      continue;
+    if (!CompUnitPasses(*(cu_sp.get())))
+      continue;
+
+    if (searcher.GetDepth() == lldb::eSearchDepthCompUnit) {
+      SymbolContext matchingContext(m_target_sp, module_sp, cu_sp.get());
+
+      shouldContinue = searcher.SearchCallback(*this, matchingContext, nullptr);
+
+      if (shouldContinue == Searcher::eCallbackReturnPop)
+        return Searcher::eCallbackReturnContinue;
+      else if (shouldContinue == Searcher::eCallbackReturnStop)
+        return shouldContinue;
+      continue;
+    }
+
+    // First make sure this compile unit's functions are parsed
+    // since CompUnit::ForeachFunction only iterates over already
+    // parsed functions.
+    SymbolFile *sym_file = module_sp->GetSymbolFile();
+    if (!sym_file)
+      continue;
+    if (!sym_file->ParseFunctions(*cu_sp))
+      continue;
+    // If we got any functions, use ForeachFunction to do the iteration.
+    cu_sp->ForeachFunction([&](const FunctionSP &func_sp) {
+      if (!FunctionPasses(*func_sp.get()))
+        return false; // Didn't pass the filter, just keep going.
+      if (searcher.GetDepth() == lldb::eSearchDepthFunction) {
+        SymbolContext matchingContext(m_target_sp, module_sp, cu_sp.get(),
+                                      func_sp.get());
+        shouldContinue =
+            searcher.SearchCallback(*this, matchingContext, nullptr);
+      } else {
+        shouldContinue = DoFunctionIteration(func_sp.get(), context, searcher);
+      }
+      return shouldContinue != Searcher::eCallbackReturnContinue;
+    });
   }
   return Searcher::eCallbackReturnContinue;
 }
@@ -384,8 +387,7 @@
     return true;
   else if (m_target_sp->ModuleIsExcludedForUnconstrainedSearches(module_sp))
     return false;
-  else
-    return true;
+  return true;
 }
 
 lldb::SearchFilterSP SearchFilterForUnconstrainedSearches::DoCopyForBreakpoint(
@@ -404,13 +406,11 @@
 
 bool SearchFilterByModule::ModulePasses(const ModuleSP &module_sp) {
   return (module_sp &&
-          FileSpec::Equal(module_sp->GetFileSpec(), m_module_spec, false));
+          FileSpec::Match(m_module_spec, module_sp->GetFileSpec()));
 }
 
 bool SearchFilterByModule::ModulePasses(const FileSpec &spec) {
-  // Do a full match only if "spec" has a directory
-  const bool full_match = (bool)spec.GetDirectory();
-  return FileSpec::Equal(spec, m_module_spec, full_match);
+  return FileSpec::Match(m_module_spec, spec);
 }
 
 bool SearchFilterByModule::AddressPasses(Address &address) {
@@ -431,7 +431,7 @@
   if (searcher.GetDepth() == lldb::eSearchDepthTarget) {
     SymbolContext empty_sc;
     empty_sc.target_sp = m_target_sp;
-    searcher.SearchCallback(*this, empty_sc, nullptr, false);
+    searcher.SearchCallback(*this, empty_sc, nullptr);
   }
 
   // If the module file spec is a full path, then we can just find the one
@@ -444,8 +444,7 @@
   const size_t num_modules = target_modules.GetSize();
   for (size_t i = 0; i < num_modules; i++) {
     Module *module = target_modules.GetModulePointerAtIndexUnlocked(i);
-    const bool full_match = (bool)m_module_spec.GetDirectory();
-    if (FileSpec::Equal(m_module_spec, module->GetFileSpec(), full_match)) {
+    if (FileSpec::Match(m_module_spec, module->GetFileSpec())) {
       SymbolContext matchingContext(m_target_sp, module->shared_from_this());
       Searcher::CallbackReturn shouldContinue;
 
@@ -524,13 +523,6 @@
     enum FilterTy filter_ty)
     : SearchFilter(target_sp, filter_ty), m_module_spec_list(module_list) {}
 
-SearchFilterByModuleList &SearchFilterByModuleList::
-operator=(const SearchFilterByModuleList &rhs) {
-  m_target_sp = rhs.m_target_sp;
-  m_module_spec_list = rhs.m_module_spec_list;
-  return *this;
-}
-
 SearchFilterByModuleList::~SearchFilterByModuleList() = default;
 
 bool SearchFilterByModuleList::ModulePasses(const ModuleSP &module_sp) {
@@ -568,7 +560,7 @@
   if (searcher.GetDepth() == lldb::eSearchDepthTarget) {
     SymbolContext empty_sc;
     empty_sc.target_sp = m_target_sp;
-    searcher.SearchCallback(*this, empty_sc, nullptr, false);
+    searcher.SearchCallback(*this, empty_sc, nullptr);
   }
 
   // If the module file spec is a full path, then we can just find the one
@@ -581,15 +573,15 @@
   const size_t num_modules = target_modules.GetSize();
   for (size_t i = 0; i < num_modules; i++) {
     Module *module = target_modules.GetModulePointerAtIndexUnlocked(i);
-    if (m_module_spec_list.FindFileIndex(0, module->GetFileSpec(), false) !=
-        UINT32_MAX) {
-      SymbolContext matchingContext(m_target_sp, module->shared_from_this());
-      Searcher::CallbackReturn shouldContinue;
+    if (m_module_spec_list.FindFileIndex(0, module->GetFileSpec(), false) ==
+        UINT32_MAX)
+      continue;
+    SymbolContext matchingContext(m_target_sp, module->shared_from_this());
+    Searcher::CallbackReturn shouldContinue;
 
-      shouldContinue = DoModuleIteration(matchingContext, searcher);
-      if (shouldContinue == Searcher::eCallbackReturnStop)
-        return;
-    }
+    shouldContinue = DoModuleIteration(matchingContext, searcher);
+    if (shouldContinue == Searcher::eCallbackReturnStop)
+      return;
   }
 }
 
@@ -600,15 +592,16 @@
     s->PutCString(
         m_module_spec_list.GetFileSpecAtIndex(0).GetFilename().AsCString(
             "<Unknown>"));
-  } else {
-    s->Printf(", modules(%" PRIu64 ") = ", (uint64_t)num_modules);
-    for (size_t i = 0; i < num_modules; i++) {
-      s->PutCString(
-          m_module_spec_list.GetFileSpecAtIndex(i).GetFilename().AsCString(
-              "<Unknown>"));
-      if (i != num_modules - 1)
-        s->PutCString(", ");
-    }
+    return;
+  }
+
+  s->Printf(", modules(%" PRIu64 ") = ", (uint64_t)num_modules);
+  for (size_t i = 0; i < num_modules; i++) {
+    s->PutCString(
+        m_module_spec_list.GetFileSpecAtIndex(i).GetFilename().AsCString(
+            "<Unknown>"));
+    if (i != num_modules - 1)
+      s->PutCString(", ");
   }
 }
 
@@ -629,21 +622,22 @@
   StructuredData::Array *modules_array;
   bool success = data_dict.GetValueForKeyAsArray(GetKey(OptionNames::ModList),
                                                  modules_array);
-  FileSpecList modules;
-  if (success) {
-    size_t num_modules = modules_array->GetSize();
-    for (size_t i = 0; i < num_modules; i++) {
-      llvm::StringRef module;
-      success = modules_array->GetItemAtIndexAsString(i, module);
-      if (!success) {
-        error.SetErrorStringWithFormat(
-            "SFBM::CFSD: filter module item %zu not a string.", i);
-        return nullptr;
-      }
-      modules.Append(FileSpec(module));
-    }
-  }
 
+  if (!success)
+    return std::make_shared<SearchFilterByModuleList>(target.shared_from_this(),
+                                                      FileSpecList{});
+  FileSpecList modules;
+  size_t num_modules = modules_array->GetSize();
+  for (size_t i = 0; i < num_modules; i++) {
+    llvm::StringRef module;
+    success = modules_array->GetItemAtIndexAsString(i, module);
+    if (!success) {
+      error.SetErrorStringWithFormat(
+          "SFBM::CFSD: filter module item %zu not a string.", i);
+      return nullptr;
+    }
+    modules.EmplaceBack(module);
+  }
   return std::make_shared<SearchFilterByModuleList>(target.shared_from_this(),
                                                     modules);
 }
@@ -670,19 +664,6 @@
                                FilterTy::ByModulesAndCU),
       m_cu_spec_list(cu_list) {}
 
-SearchFilterByModuleListAndCU::SearchFilterByModuleListAndCU(
-    const SearchFilterByModuleListAndCU &rhs) = default;
-
-SearchFilterByModuleListAndCU &SearchFilterByModuleListAndCU::
-operator=(const SearchFilterByModuleListAndCU &rhs) {
-  if (&rhs != this) {
-    m_target_sp = rhs.m_target_sp;
-    m_module_spec_list = rhs.m_module_spec_list;
-    m_cu_spec_list = rhs.m_cu_spec_list;
-  }
-  return *this;
-}
-
 SearchFilterByModuleListAndCU::~SearchFilterByModuleListAndCU() = default;
 
 lldb::SearchFilterSP SearchFilterByModuleListAndCU::CreateFromStructuredData(
@@ -703,7 +684,7 @@
             "SFBM::CFSD: filter module item %zu not a string.", i);
         return result_sp;
       }
-      modules.Append(FileSpec(module));
+      modules.EmplaceBack(module);
     }
   }
 
@@ -722,10 +703,10 @@
     success = cus_array->GetItemAtIndexAsString(i, cu);
     if (!success) {
       error.SetErrorStringWithFormat(
-          "SFBM::CFSD: filter cu item %zu not a string.", i);
+          "SFBM::CFSD: filter CU item %zu not a string.", i);
       return nullptr;
     }
-    cus.Append(FileSpec(cu));
+    cus.EmplaceBack(cu);
   }
 
   return std::make_shared<SearchFilterByModuleListAndCU>(
@@ -747,8 +728,11 @@
     if (m_cu_spec_list.GetSize() != 0)
       return false; // Has no comp_unit so can't pass the file check.
   }
-  if (m_cu_spec_list.FindFileIndex(0, sym_ctx.comp_unit, false) == UINT32_MAX)
-        return false; // Fails the file check
+  FileSpec cu_spec;
+  if (sym_ctx.comp_unit)
+    cu_spec = sym_ctx.comp_unit->GetPrimaryFile();
+  if (m_cu_spec_list.FindFileIndex(0, cu_spec, false) == UINT32_MAX)
+    return false; // Fails the file check
   return SearchFilterByModuleList::ModulePasses(sym_ctx.module_sp); 
 }
 
@@ -757,17 +741,16 @@
 }
 
 bool SearchFilterByModuleListAndCU::CompUnitPasses(CompileUnit &compUnit) {
-  bool in_cu_list =
-      m_cu_spec_list.FindFileIndex(0, compUnit, false) != UINT32_MAX;
-  if (in_cu_list) {
-    ModuleSP module_sp(compUnit.GetModule());
-    if (module_sp) {
-      bool module_passes = SearchFilterByModuleList::ModulePasses(module_sp);
-      return module_passes;
-    } else
-      return true;
-  } else
+  bool in_cu_list = m_cu_spec_list.FindFileIndex(0, compUnit.GetPrimaryFile(),
+                                                 false) != UINT32_MAX;
+  if (!in_cu_list)
     return false;
+
+  ModuleSP module_sp(compUnit.GetModule());
+  if (!module_sp)
+    return true;
+
+  return SearchFilterByModuleList::ModulePasses(module_sp);
 }
 
 void SearchFilterByModuleListAndCU::Search(Searcher &searcher) {
@@ -777,7 +760,7 @@
   if (searcher.GetDepth() == lldb::eSearchDepthTarget) {
     SymbolContext empty_sc;
     empty_sc.target_sp = m_target_sp;
-    searcher.SearchCallback(*this, empty_sc, nullptr, false);
+    searcher.SearchCallback(*this, empty_sc, nullptr);
   }
 
   // If the module file spec is a full path, then we can just find the one
@@ -792,32 +775,34 @@
   bool no_modules_in_filter = m_module_spec_list.GetSize() == 0;
   for (size_t i = 0; i < num_modules; i++) {
     lldb::ModuleSP module_sp = target_images.GetModuleAtIndexUnlocked(i);
-    if (no_modules_in_filter ||
-        m_module_spec_list.FindFileIndex(0, module_sp->GetFileSpec(), false) !=
-            UINT32_MAX) {
-      SymbolContext matchingContext(m_target_sp, module_sp);
-      Searcher::CallbackReturn shouldContinue;
+    if (!no_modules_in_filter &&
+        m_module_spec_list.FindFileIndex(0, module_sp->GetFileSpec(), false) ==
+            UINT32_MAX)
+      continue;
 
-      if (searcher.GetDepth() == lldb::eSearchDepthModule) {
-        shouldContinue = DoModuleIteration(matchingContext, searcher);
-        if (shouldContinue == Searcher::eCallbackReturnStop)
-          return;
-      } else {
-        const size_t num_cu = module_sp->GetNumCompileUnits();
-        for (size_t cu_idx = 0; cu_idx < num_cu; cu_idx++) {
-          CompUnitSP cu_sp = module_sp->GetCompileUnitAtIndex(cu_idx);
-          matchingContext.comp_unit = cu_sp.get();
-          if (matchingContext.comp_unit) {
-            if (m_cu_spec_list.FindFileIndex(0, *matchingContext.comp_unit,
-                                             false) != UINT32_MAX) {
-              shouldContinue =
-                  DoCUIteration(module_sp, matchingContext, searcher);
-              if (shouldContinue == Searcher::eCallbackReturnStop)
-                return;
-            }
-          }
-        }
-      }
+    SymbolContext matchingContext(m_target_sp, module_sp);
+    Searcher::CallbackReturn shouldContinue;
+
+    if (searcher.GetDepth() == lldb::eSearchDepthModule) {
+      shouldContinue = DoModuleIteration(matchingContext, searcher);
+      if (shouldContinue == Searcher::eCallbackReturnStop)
+        return;
+      continue;
+    }
+
+    const size_t num_cu = module_sp->GetNumCompileUnits();
+    for (size_t cu_idx = 0; cu_idx < num_cu; cu_idx++) {
+      CompUnitSP cu_sp = module_sp->GetCompileUnitAtIndex(cu_idx);
+      matchingContext.comp_unit = cu_sp.get();
+      if (!matchingContext.comp_unit)
+        continue;
+      if (m_cu_spec_list.FindFileIndex(
+              0, matchingContext.comp_unit->GetPrimaryFile(), false) ==
+          UINT32_MAX)
+        continue;
+      shouldContinue = DoCUIteration(module_sp, matchingContext, searcher);
+      if (shouldContinue == Searcher::eCallbackReturnStop)
+        return;
     }
   }
 }
diff --git a/src/llvm-project/lldb/source/Core/Section.cpp b/src/llvm-project/lldb/source/Core/Section.cpp
index f30ddd2..1697f1f 100644
--- a/src/llvm-project/lldb/source/Core/Section.cpp
+++ b/src/llvm-project/lldb/source/Core/Section.cpp
@@ -80,8 +80,12 @@
     return "dwarf-line-str";
   case eSectionTypeDWARFDebugLoc:
     return "dwarf-loc";
+  case eSectionTypeDWARFDebugLocDwo:
+    return "dwarf-loc-dwo";
   case eSectionTypeDWARFDebugLocLists:
     return "dwarf-loclists";
+  case eSectionTypeDWARFDebugLocListsDwo:
+    return "dwarf-loclists-dwo";
   case eSectionTypeDWARFDebugMacInfo:
     return "dwarf-macinfo";
   case eSectionTypeDWARFDebugMacro:
@@ -94,6 +98,8 @@
     return "dwarf-ranges";
   case eSectionTypeDWARFDebugRngLists:
     return "dwarf-rnglists";
+  case eSectionTypeDWARFDebugRngListsDwo:
+    return "dwarf-rnglists-dwo";
   case eSectionTypeDWARFDebugStr:
     return "dwarf-str";
   case eSectionTypeDWARFDebugStrDwo:
@@ -269,7 +275,7 @@
 
 bool Section::ContainsFileAddress(addr_t vm_addr) const {
   const addr_t file_addr = GetFileAddress();
-  if (file_addr != LLDB_INVALID_ADDRESS) {
+  if (file_addr != LLDB_INVALID_ADDRESS && !IsThreadSpecific()) {
     if (file_addr <= vm_addr) {
       const addr_t offset = (vm_addr - file_addr) * m_target_byte_size;
       return offset < GetByteSize();
@@ -278,29 +284,6 @@
   return false;
 }
 
-int Section::Compare(const Section &a, const Section &b) {
-  if (&a == &b)
-    return 0;
-
-  const ModuleSP a_module_sp = a.GetModule();
-  const ModuleSP b_module_sp = b.GetModule();
-  if (a_module_sp == b_module_sp) {
-    user_id_t a_sect_uid = a.GetID();
-    user_id_t b_sect_uid = b.GetID();
-    if (a_sect_uid < b_sect_uid)
-      return -1;
-    if (a_sect_uid > b_sect_uid)
-      return 1;
-    return 0;
-  } else {
-    // The modules are different, just compare the module pointers
-    if (a_module_sp.get() < b_module_sp.get())
-      return -1;
-    else
-      return 1; // We already know the modules aren't equal
-  }
-}
-
 void Section::Dump(Stream *s, Target *target, uint32_t depth) const {
   //    s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
   s->Indent();
@@ -321,7 +304,7 @@
     }
 
     VMRange range(addr, addr + m_byte_size);
-    range.Dump(s, 0);
+    range.Dump(s->AsRawOstream(), 0);
   }
 
   s->Printf("%c %c%c%c  0x%8.8" PRIx64 " 0x%8.8" PRIx64 " 0x%8.8x ",
@@ -417,10 +400,6 @@
 
 #pragma mark SectionList
 
-SectionList::SectionList() : m_sections() {}
-
-SectionList::~SectionList() {}
-
 SectionList &SectionList::operator=(const SectionList &rhs) {
   if (this != &rhs)
     m_sections = rhs.m_sections;
diff --git a/src/llvm-project/lldb/source/Core/SourceManager.cpp b/src/llvm-project/lldb/source/Core/SourceManager.cpp
index 87065ab..8e0cc57 100644
--- a/src/llvm-project/lldb/source/Core/SourceManager.cpp
+++ b/src/llvm-project/lldb/source/Core/SourceManager.cpp
@@ -64,7 +64,8 @@
 
 SourceManager::FileSP SourceManager::GetFile(const FileSpec &file_spec) {
   bool same_as_previous =
-      m_last_file_sp && m_last_file_sp->FileSpecMatches(file_spec);
+      m_last_file_sp &&
+      FileSpec::Match(file_spec, m_last_file_sp->GetFileSpec());
 
   DebuggerSP debugger_sp(m_debugger_wp.lock());
   FileSP file_sp;
@@ -324,10 +325,10 @@
         ConstString main_name("main");
         bool symbols_okay = false; // Force it to be a debug symbol.
         bool inlines_okay = true;
-        bool append = false;
-        size_t num_matches = executable_ptr->FindFunctions(
-            main_name, nullptr, lldb::eFunctionNameTypeBase, inlines_okay,
-            symbols_okay, append, sc_list);
+        executable_ptr->FindFunctions(main_name, nullptr,
+                                      lldb::eFunctionNameTypeBase, inlines_okay,
+                                      symbols_okay, sc_list);
+        size_t num_matches = sc_list.GetSize();
         for (size_t idx = 0; idx < num_matches; idx++) {
           SymbolContext sc;
           sc_list.GetContextAtIndex(idx, sc);
@@ -399,24 +400,25 @@
         if (num_matches != 0) {
           if (num_matches > 1) {
             SymbolContext sc;
-            FileSpec *test_cu_spec = nullptr;
+            CompileUnit *test_cu = nullptr;
 
             for (unsigned i = 0; i < num_matches; i++) {
               sc_list.GetContextAtIndex(i, sc);
               if (sc.comp_unit) {
-                if (test_cu_spec) {
-                  if (test_cu_spec != static_cast<FileSpec *>(sc.comp_unit))
+                if (test_cu) {
+                  if (test_cu != sc.comp_unit)
                     got_multiple = true;
                   break;
                 } else
-                  test_cu_spec = sc.comp_unit;
+                  test_cu = sc.comp_unit;
               }
             }
           }
           if (!got_multiple) {
             SymbolContext sc;
             sc_list.GetContextAtIndex(0, sc);
-            m_file_spec = sc.comp_unit;
+            if (sc.comp_unit)
+              m_file_spec = sc.comp_unit->GetPrimaryFile();
             m_mod_time = FileSystem::Instance().GetModificationTime(m_file_spec);
           }
         }
@@ -601,10 +603,6 @@
   }
 }
 
-bool SourceManager::File::FileSpecMatches(const FileSpec &file_spec) {
-  return FileSpec::Equal(m_file_spec, file_spec, false);
-}
-
 bool lldb_private::operator==(const SourceManager::File &lhs,
                               const SourceManager::File &rhs) {
   if (lhs.m_file_spec != rhs.m_file_spec)
diff --git a/src/llvm-project/lldb/source/Core/StreamFile.cpp b/src/llvm-project/lldb/source/Core/StreamFile.cpp
index ce6e1ea..475c27e 100644
--- a/src/llvm-project/lldb/source/Core/StreamFile.cpp
+++ b/src/llvm-project/lldb/source/Core/StreamFile.cpp
@@ -8,42 +8,46 @@
 
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Host/FileSystem.h"
+#include "lldb/Utility/Log.h"
 
 #include <stdio.h>
 
 using namespace lldb;
 using namespace lldb_private;
 
-// StreamFile constructor
-StreamFile::StreamFile() : Stream(), m_file() {}
-
 StreamFile::StreamFile(uint32_t flags, uint32_t addr_size, ByteOrder byte_order)
-    : Stream(flags, addr_size, byte_order), m_file() {}
-
-StreamFile::StreamFile(int fd, bool transfer_ownership)
-    : Stream(), m_file(fd, transfer_ownership) {}
-
-StreamFile::StreamFile(FILE *fh, bool transfer_ownership)
-    : Stream(), m_file(fh, transfer_ownership) {}
-
-StreamFile::StreamFile(const char *path) : Stream(), m_file() {
-  FileSystem::Instance().Open(m_file, FileSpec(path),
-                              File::eOpenOptionWrite |
-                                  File::eOpenOptionCanCreate |
-                                  File::eOpenOptionCloseOnExec);
+    : Stream(flags, addr_size, byte_order) {
+  m_file_sp = std::make_shared<File>();
 }
 
-StreamFile::StreamFile(const char *path, uint32_t options, uint32_t permissions)
-    : Stream(), m_file() {
+StreamFile::StreamFile(int fd, bool transfer_ownership) : Stream() {
+  m_file_sp =
+      std::make_shared<NativeFile>(fd, File::eOpenOptionWrite, transfer_ownership);
+}
 
-  FileSystem::Instance().Open(m_file, FileSpec(path), options, permissions);
+StreamFile::StreamFile(FILE *fh, bool transfer_ownership) : Stream() {
+  m_file_sp = std::make_shared<NativeFile>(fh, transfer_ownership);
+}
+
+StreamFile::StreamFile(const char *path, File::OpenOptions options,
+                       uint32_t permissions)
+    : Stream() {
+  auto file = FileSystem::Instance().Open(FileSpec(path), options, permissions);
+  if (file)
+    m_file_sp = std::move(file.get());
+  else {
+    // TODO refactor this so the error gets popagated up instead of logged here.
+    LLDB_LOG_ERROR(GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST), file.takeError(),
+                   "Cannot open {1}: {0}", path);
+    m_file_sp = std::make_shared<File>();
+  }
 }
 
 StreamFile::~StreamFile() {}
 
-void StreamFile::Flush() { m_file.Flush(); }
+void StreamFile::Flush() { m_file_sp->Flush(); }
 
 size_t StreamFile::WriteImpl(const void *s, size_t length) {
-  m_file.Write(s, length);
+  m_file_sp->Write(s, length);
   return length;
 }
diff --git a/src/llvm-project/lldb/source/Core/Value.cpp b/src/llvm-project/lldb/source/Core/Value.cpp
index fdb4adb..c70ab98 100644
--- a/src/llvm-project/lldb/source/Core/Value.cpp
+++ b/src/llvm-project/lldb/source/Core/Value.cpp
@@ -314,7 +314,7 @@
 }
 
 Status Value::GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data,
-                             uint32_t data_offset, Module *module) {
+                             Module *module) {
   data.Clear();
 
   Status error;
@@ -322,6 +322,12 @@
   AddressType address_type = eAddressTypeFile;
   Address file_so_addr;
   const CompilerType &ast_type = GetCompilerType();
+  llvm::Optional<uint64_t> type_size = ast_type.GetByteSize(
+      exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr);
+  // Nothing to be done for a zero-sized type.
+  if (type_size && *type_size == 0)
+    return error;
+
   switch (m_value_type) {
   case eValueTypeVector:
     if (ast_type.IsValid())
@@ -340,9 +346,8 @@
 
     uint32_t limit_byte_size = UINT32_MAX;
 
-    if (llvm::Optional<uint64_t> size = ast_type.GetByteSize(
-            exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr))
-      limit_byte_size = *size;
+    if (type_size)
+      limit_byte_size = *type_size;
 
     if (limit_byte_size <= m_value.GetByteSize()) {
       if (m_value.GetData(data, limit_byte_size))
@@ -507,10 +512,10 @@
     return error;
   }
 
-  // If we got here, we need to read the value from memory
+  // If we got here, we need to read the value from memory.
   size_t byte_size = GetValueByteSize(&error, exe_ctx);
 
-  // Bail if we encountered any errors getting the byte size
+  // Bail if we encountered any errors getting the byte size.
   if (error.Fail())
     return error;
 
@@ -520,13 +525,12 @@
 
   // Make sure we have enough room within "data", and if we don't make
   // something large enough that does
-  if (!data.ValidOffsetForDataOfSize(data_offset, byte_size)) {
-    auto data_sp =
-        std::make_shared<DataBufferHeap>(data_offset + byte_size, '\0');
+  if (!data.ValidOffsetForDataOfSize(0, byte_size)) {
+    auto data_sp = std::make_shared<DataBufferHeap>(byte_size, '\0');
     data.SetData(data_sp);
   }
 
-  uint8_t *dst = const_cast<uint8_t *>(data.PeekData(data_offset, byte_size));
+  uint8_t *dst = const_cast<uint8_t *>(data.PeekData(0, byte_size));
   if (dst != nullptr) {
     if (address_type == eAddressTypeHost) {
       // The address is an address in this process, so just copy it.
@@ -597,7 +601,7 @@
     {
       DataExtractor data;
       lldb::addr_t addr = m_value.ULongLong(LLDB_INVALID_ADDRESS);
-      Status error(GetValueAsData(exe_ctx, data, 0, nullptr));
+      Status error(GetValueAsData(exe_ctx, data, nullptr));
       if (error.Success()) {
         Scalar scalar;
         if (compiler_type.GetValueAsScalar(data, 0, data.GetByteSize(),
diff --git a/src/llvm-project/lldb/source/Core/ValueObject.cpp b/src/llvm-project/lldb/source/Core/ValueObject.cpp
index 297365b..1dd9a6c 100644
--- a/src/llvm-project/lldb/source/Core/ValueObject.cpp
+++ b/src/llvm-project/lldb/source/Core/ValueObject.cpp
@@ -22,9 +22,9 @@
 #include "lldb/DataFormatters/StringPrinter.h"
 #include "lldb/DataFormatters/TypeFormat.h"
 #include "lldb/DataFormatters/TypeSummary.h"
-#include "lldb/DataFormatters/TypeValidator.h"
 #include "lldb/DataFormatters/ValueObjectPrinter.h"
 #include "lldb/Expression/ExpressionVariable.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/CompilerType.h"
@@ -73,7 +73,6 @@
 
 using namespace lldb;
 using namespace lldb_private;
-using namespace lldb_utility;
 
 static user_id_t g_value_obj_uid = 0;
 
@@ -83,13 +82,12 @@
       m_parent(&parent), m_root(nullptr),
       m_update_point(parent.GetUpdatePoint()), m_name(), m_data(), m_value(),
       m_error(), m_value_str(), m_old_value_str(), m_location_str(),
-      m_summary_str(), m_object_desc_str(), m_validation_result(),
-      m_manager(parent.GetManager()), m_children(), m_synthetic_children(),
-      m_dynamic_value(nullptr), m_synthetic_value(nullptr),
-      m_deref_valobj(nullptr), m_format(eFormatDefault),
-      m_last_format(eFormatDefault), m_last_format_mgr_revision(0),
-      m_type_summary_sp(), m_type_format_sp(), m_synthetic_children_sp(),
-      m_type_validator_sp(), m_user_id_of_forced_summary(),
+      m_summary_str(), m_object_desc_str(), m_manager(parent.GetManager()),
+      m_children(), m_synthetic_children(), m_dynamic_value(nullptr),
+      m_synthetic_value(nullptr), m_deref_valobj(nullptr),
+      m_format(eFormatDefault), m_last_format(eFormatDefault),
+      m_last_format_mgr_revision(0), m_type_summary_sp(), m_type_format_sp(),
+      m_synthetic_children_sp(), m_user_id_of_forced_summary(),
       m_address_type_of_ptr_or_ref_children(eAddressTypeInvalid),
       m_value_checksum(),
       m_preferred_display_language(lldb::eLanguageTypeUnknown),
@@ -101,6 +99,8 @@
       m_did_calculate_complete_objc_class_type(false),
       m_is_synthetic_children_generated(
           parent.m_is_synthetic_children_generated) {
+  m_data.SetByteOrder(parent.GetDataExtractor().GetByteOrder());
+  m_data.SetAddressByteSize(parent.GetDataExtractor().GetAddressByteSize());
   m_manager->ManageObject(this);
 }
 
@@ -111,12 +111,12 @@
       m_parent(nullptr), m_root(nullptr), m_update_point(exe_scope), m_name(),
       m_data(), m_value(), m_error(), m_value_str(), m_old_value_str(),
       m_location_str(), m_summary_str(), m_object_desc_str(),
-      m_validation_result(), m_manager(), m_children(), m_synthetic_children(),
+      m_manager(), m_children(), m_synthetic_children(),
       m_dynamic_value(nullptr), m_synthetic_value(nullptr),
       m_deref_valobj(nullptr), m_format(eFormatDefault),
       m_last_format(eFormatDefault), m_last_format_mgr_revision(0),
       m_type_summary_sp(), m_type_format_sp(), m_synthetic_children_sp(),
-      m_type_validator_sp(), m_user_id_of_forced_summary(),
+      m_user_id_of_forced_summary(),
       m_address_type_of_ptr_or_ref_children(child_ptr_or_ref_addr_type),
       m_value_checksum(),
       m_preferred_display_language(lldb::eLanguageTypeUnknown),
@@ -127,6 +127,14 @@
       m_is_getting_summary(false),
       m_did_calculate_complete_objc_class_type(false),
       m_is_synthetic_children_generated(false) {
+  if (exe_scope) {
+    TargetSP target_sp(exe_scope->CalculateTarget());
+    if (target_sp) {
+      const ArchSpec &arch = target_sp->GetArchitecture();
+      m_data.SetByteOrder(arch.GetByteOrder());
+      m_data.SetAddressByteSize(arch.GetAddressByteSize());
+    }
+  }
   m_manager = new ValueObjectManager();
   m_manager->ManageObject(this);
 }
@@ -134,6 +142,58 @@
 // Destructor
 ValueObject::~ValueObject() {}
 
+void ValueObject::UpdateChildrenAddressType() {
+  Value::ValueType value_type = m_value.GetValueType();
+  ExecutionContext exe_ctx(GetExecutionContextRef());
+  Process *process = exe_ctx.GetProcessPtr();
+  const bool process_is_alive = process && process->IsAlive();
+  const uint32_t type_info = GetCompilerType().GetTypeInfo();
+  const bool is_pointer_or_ref =
+      (type_info & (lldb::eTypeIsPointer | lldb::eTypeIsReference)) != 0;
+
+  switch (value_type) {
+  case Value::eValueTypeFileAddress:
+    // If this type is a pointer, then its children will be considered load
+    // addresses if the pointer or reference is dereferenced, but only if
+    // the process is alive.
+    //
+    // There could be global variables like in the following code:
+    // struct LinkedListNode { Foo* foo; LinkedListNode* next; };
+    // Foo g_foo1;
+    // Foo g_foo2;
+    // LinkedListNode g_second_node = { &g_foo2, NULL };
+    // LinkedListNode g_first_node = { &g_foo1, &g_second_node };
+    //
+    // When we aren't running, we should be able to look at these variables
+    // using the "target variable" command. Children of the "g_first_node"
+    // always will be of the same address type as the parent. But children
+    // of the "next" member of LinkedListNode will become load addresses if
+    // we have a live process, or remain a file address if it was a file
+    // address.
+    if (process_is_alive && is_pointer_or_ref)
+      SetAddressTypeOfChildren(eAddressTypeLoad);
+    else
+      SetAddressTypeOfChildren(eAddressTypeFile);
+    break;
+  case Value::eValueTypeHostAddress:
+    // Same as above for load addresses, except children of pointer or refs
+    // are always load addresses. Host addresses are used to store freeze
+    // dried variables. If this type is a struct, the entire struct
+    // contents will be copied into the heap of the
+    // LLDB process, but we do not currently follow any pointers.
+    if (is_pointer_or_ref)
+      SetAddressTypeOfChildren(eAddressTypeLoad);
+    else
+      SetAddressTypeOfChildren(eAddressTypeHost);
+    break;
+  case Value::eValueTypeLoadAddress:
+  case Value::eValueTypeScalar:
+  case Value::eValueTypeVector:
+    SetAddressTypeOfChildren(eAddressTypeLoad);
+    break;
+  }
+}
+
 bool ValueObject::UpdateValueIfNeeded(bool update_format) {
 
   bool did_change_formats = false;
@@ -196,6 +256,7 @@
       SetValueIsValid(success);
 
       if (success) {
+        UpdateChildrenAddressType();
         const uint64_t max_checksum_size = 128;
         m_data.Checksum(m_value_checksum, max_checksum_size);
       } else {
@@ -226,12 +287,12 @@
 
 bool ValueObject::UpdateFormatsIfNeeded() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
-  if (log)
-    log->Printf("[%s %p] checking for FormatManager revisions. ValueObject "
-                "rev: %d - Global rev: %d",
-                GetName().GetCString(), static_cast<void *>(this),
-                m_last_format_mgr_revision,
-                DataVisualization::GetCurrentRevision());
+  LLDB_LOGF(log,
+            "[%s %p] checking for FormatManager revisions. ValueObject "
+            "rev: %d - Global rev: %d",
+            GetName().GetCString(), static_cast<void *>(this),
+            m_last_format_mgr_revision,
+            DataVisualization::GetCurrentRevision());
 
   bool any_change = false;
 
@@ -242,11 +303,10 @@
     SetValueFormat(DataVisualization::GetFormat(*this, eNoDynamicValues));
     SetSummaryFormat(
         DataVisualization::GetSummaryFormat(*this, GetDynamicValueType()));
-#ifndef LLDB_DISABLE_PYTHON
+#if LLDB_ENABLE_PYTHON
     SetSyntheticChildren(
         DataVisualization::GetSyntheticChildren(*this, GetDynamicValueType()));
 #endif
-    SetValidator(DataVisualization::GetValidator(*this, GetDynamicValueType()));
   }
 
   return any_change;
@@ -527,6 +587,10 @@
 
   std::vector<uint32_t> child_indexes;
   bool omit_empty_base_classes = true;
+
+  if (!GetCompilerType().IsValid())
+    return ValueObjectSP();
+
   const size_t num_child_indexes =
       GetCompilerType().GetIndexOfChildMemberWithName(
           name.GetCString(), omit_empty_base_classes, child_indexes);
@@ -811,7 +875,7 @@
 uint64_t ValueObject::GetData(DataExtractor &data, Status &error) {
   UpdateValueIfNeeded(false);
   ExecutionContext exe_ctx(GetExecutionContextRef());
-  error = m_value.GetValueAsData(&exe_ctx, data, 0, GetModule().get());
+  error = m_value.GetValueAsData(&exe_ctx, data, GetModule().get());
   if (error.Fail()) {
     if (m_data.GetByteSize()) {
       data = m_data;
@@ -1038,23 +1102,6 @@
   return {total_bytes_read, was_capped};
 }
 
-std::pair<TypeValidatorResult, std::string> ValueObject::GetValidationStatus() {
-  if (!UpdateValueIfNeeded(true))
-    return {TypeValidatorResult::Success,
-            ""}; // not the validator's job to discuss update problems
-
-  if (m_validation_result.hasValue())
-    return m_validation_result.getValue();
-
-  if (!m_type_validator_sp)
-    return {TypeValidatorResult::Success, ""}; // no validator no failure
-
-  auto outcome = m_type_validator_sp->FormatObject(this);
-
-  return (m_validation_result = {outcome.m_result, outcome.m_message})
-      .getValue();
-}
-
 const char *ValueObject::GetObjectDescription() {
   if (!UpdateValueIfNeeded(true))
     return nullptr;
@@ -1672,16 +1719,7 @@
   if (!GetVariable() || !GetVariable()->IsArtificial())
     return false;
 
-  LanguageType lang = eLanguageTypeUnknown;
-  if (auto *sym_ctx_scope = GetSymbolContextScope()) {
-    if (auto *func = sym_ctx_scope->CalculateSymbolContextFunction())
-      lang = func->GetLanguage();
-    else if (auto *comp_unit =
-                 sym_ctx_scope->CalculateSymbolContextCompileUnit())
-      lang = comp_unit->GetLanguage();
-  }
-
-  if (auto *runtime = process->GetLanguageRuntime(lang))
+  if (auto *runtime = process->GetLanguageRuntime(GetVariable()->GetLanguage()))
     if (runtime->IsWhitelistedRuntimeValue(GetName()))
       return false;
 
@@ -1980,15 +2018,14 @@
     bool parent_had_base_class =
         GetParent() && GetParent()->GetBaseClassPath(s);
     CompilerType compiler_type = GetCompilerType();
-    std::string cxx_class_name;
-    bool this_had_base_class =
-        ClangASTContext::GetCXXClassName(compiler_type, cxx_class_name);
-    if (this_had_base_class) {
+    llvm::Optional<std::string> cxx_class_name =
+        ClangASTContext::GetCXXClassName(compiler_type);
+    if (cxx_class_name) {
       if (parent_had_base_class)
         s.PutCString("::");
-      s.PutCString(cxx_class_name);
+      s.PutCString(cxx_class_name.getValue());
     }
-    return parent_had_base_class || this_had_base_class;
+    return parent_had_base_class || cxx_class_name;
   }
   return false;
 }
@@ -2726,9 +2763,9 @@
 
     if (IsBitfield()) {
       Value v(Scalar(GetValueAsUnsigned(UINT64_MAX)));
-      m_error = v.GetValueAsData(&exe_ctx, data, 0, GetModule().get());
+      m_error = v.GetValueAsData(&exe_ctx, data, GetModule().get());
     } else
-      m_error = m_value.GetValueAsData(&exe_ctx, data, 0, GetModule().get());
+      m_error = m_value.GetValueAsData(&exe_ctx, data, GetModule().get());
 
     valobj_sp = ValueObjectConstResult::Create(
         exe_ctx.GetBestExecutionContextScope(), GetCompilerType(), name, data,
@@ -3073,10 +3110,6 @@
     if (m_synthetic_value)
       m_synthetic_value = nullptr;
   }
-
-  if ((clear_mask & eClearUserVisibleDataItemsValidator) ==
-      eClearUserVisibleDataItemsValidator)
-    m_validation_result.reset();
 }
 
 SymbolContextScope *ValueObject::GetSymbolContextScope() {
@@ -3310,32 +3343,32 @@
   lldb::ProcessSP process_sp = GetProcessSP();
   if (!process_sp)
     return lldb::ValueObjectSP();
-  
+
   const uint32_t current_stop_id = process_sp->GetLastNaturalStopID();
   if (current_stop_id == m_stop_id)
     return m_user_valobj_sp;
-  
+
   m_stop_id = current_stop_id;
-  
+
   if (!m_root_valobj_sp) {
     m_user_valobj_sp.reset();
     return m_root_valobj_sp;
   }
-  
+
   m_user_valobj_sp = m_root_valobj_sp;
-  
+
   if (m_use_dynamic != lldb::eNoDynamicValues) {
     lldb::ValueObjectSP dynamic_sp = m_user_valobj_sp->GetDynamicValue(m_use_dynamic);
     if (dynamic_sp)
       m_user_valobj_sp = dynamic_sp;
   }
-  
+
   if (m_use_synthetic) {
     lldb::ValueObjectSP synthetic_sp = m_user_valobj_sp->GetSyntheticValue(m_use_synthetic);
     if (synthetic_sp)
       m_user_valobj_sp = synthetic_sp;
   }
-  
+
   return m_user_valobj_sp;
 }
 
diff --git a/src/llvm-project/lldb/source/Core/ValueObjectCast.cpp b/src/llvm-project/lldb/source/Core/ValueObjectCast.cpp
index 6ccda8c..3a74b6a7 100644
--- a/src/llvm-project/lldb/source/Core/ValueObjectCast.cpp
+++ b/src/llvm-project/lldb/source/Core/ValueObjectCast.cpp
@@ -79,7 +79,7 @@
                         m_value.GetScalar() != old_value.GetScalar());
     }
     ExecutionContext exe_ctx(GetExecutionContextRef());
-    m_error = m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
+    m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
     SetValueDidChange(m_parent->GetValueDidChange());
     return true;
   }
diff --git a/src/llvm-project/lldb/source/Core/ValueObjectChild.cpp b/src/llvm-project/lldb/source/Core/ValueObjectChild.cpp
index 01f2e20..6b4ada1 100644
--- a/src/llvm-project/lldb/source/Core/ValueObjectChild.cpp
+++ b/src/llvm-project/lldb/source/Core/ValueObjectChild.cpp
@@ -175,6 +175,30 @@
             // Set this object's scalar value to the address of its value by
             // adding its byte offset to the parent address
             m_value.GetScalar() += GetByteOffset();
+
+            // If a bitfield doesn't fit into the child_byte_size'd
+            // window at child_byte_offset, move the window forward
+            // until it fits.  The problem here is that Value has no
+            // notion of bitfields and thus the Value's DataExtractor
+            // is sized like the bitfields CompilerType; a sequence of
+            // bitfields, however, can be larger than their underlying
+            // type.
+            if (m_bitfield_bit_offset) {
+              const bool thread_and_frame_only_if_stopped = true;
+              ExecutionContext exe_ctx(GetExecutionContextRef().Lock(
+                  thread_and_frame_only_if_stopped));
+              if (auto type_bit_size = GetCompilerType().GetBitSize(
+                      exe_ctx.GetBestExecutionContextScope())) {
+                uint64_t bitfield_end =
+                    m_bitfield_bit_size + m_bitfield_bit_offset;
+                if (bitfield_end > *type_bit_size) {
+                  uint64_t overhang_bytes =
+                      (bitfield_end - *type_bit_size + 7) / 8;
+                  m_value.GetScalar() += overhang_bytes;
+                  m_bitfield_bit_offset -= overhang_bytes * 8;
+                }
+              }
+            }
           }
         } break;
 
@@ -203,7 +227,7 @@
         if (GetCompilerType().GetTypeInfo() & lldb::eTypeHasValue) {
           Value &value = is_instance_ptr_base ? m_parent->GetValue() : m_value;
           m_error =
-              value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
+              value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
         } else {
           m_error.Clear(); // No value so nothing to read...
         }
diff --git a/src/llvm-project/lldb/source/Core/ValueObjectConstResult.cpp b/src/llvm-project/lldb/source/Core/ValueObjectConstResult.cpp
index a1b2cac..7162069 100644
--- a/src/llvm-project/lldb/source/Core/ValueObjectConstResult.cpp
+++ b/src/llvm-project/lldb/source/Core/ValueObjectConstResult.cpp
@@ -182,7 +182,7 @@
   m_name = name;
   ExecutionContext exe_ctx;
   exe_scope->CalculateExecutionContext(exe_ctx);
-  m_error = m_value.GetValueAsData(&exe_ctx, m_data, 0, module);
+  m_error = m_value.GetValueAsData(&exe_ctx, m_data, module);
 }
 
 ValueObjectConstResult::~ValueObjectConstResult() {}
diff --git a/src/llvm-project/lldb/source/Core/ValueObjectDynamicValue.cpp b/src/llvm-project/lldb/source/Core/ValueObjectDynamicValue.cpp
index 90b46d1..59037e2 100644
--- a/src/llvm-project/lldb/source/Core/ValueObjectDynamicValue.cpp
+++ b/src/llvm-project/lldb/source/Core/ValueObjectDynamicValue.cpp
@@ -199,7 +199,7 @@
     ClearDynamicTypeInformation();
     m_dynamic_type_info.Clear();
     m_value = m_parent->GetValue();
-    m_error = m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
+    m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
     return m_error.Success();
   }
 
@@ -243,13 +243,13 @@
   m_value.SetValueType(value_type);
 
   if (has_changed_type && log)
-    log->Printf("[%s %p] has a new dynamic type %s", GetName().GetCString(),
-                static_cast<void *>(this), GetTypeName().GetCString());
+    LLDB_LOGF(log, "[%s %p] has a new dynamic type %s", GetName().GetCString(),
+              static_cast<void *>(this), GetTypeName().GetCString());
 
   if (m_address.IsValid() && m_dynamic_type_info) {
     // The variable value is in the Scalar value inside the m_value. We can
     // point our m_data right to it.
-    m_error = m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
+    m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
     if (m_error.Success()) {
       if (!CanProvideValue()) {
         // this value object represents an aggregate type whose children have
diff --git a/src/llvm-project/lldb/source/Core/ValueObjectMemory.cpp b/src/llvm-project/lldb/source/Core/ValueObjectMemory.cpp
index 95d4330..1a316bf 100644
--- a/src/llvm-project/lldb/source/Core/ValueObjectMemory.cpp
+++ b/src/llvm-project/lldb/source/Core/ValueObjectMemory.cpp
@@ -168,7 +168,7 @@
     case Value::eValueTypeScalar:
       // The variable value is in the Scalar value inside the m_value. We can
       // point our m_data right to it.
-      m_error = m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
+      m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
       break;
 
     case Value::eValueTypeFileAddress:
@@ -209,7 +209,7 @@
           value.SetCompilerType(m_compiler_type);
         }
 
-        m_error = value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
+        m_error = value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
       }
       break;
     }
diff --git a/src/llvm-project/lldb/source/Core/ValueObjectRegister.cpp b/src/llvm-project/lldb/source/Core/ValueObjectRegister.cpp
index 75a254f..7e97df6 100644
--- a/src/llvm-project/lldb/source/Core/ValueObjectRegister.cpp
+++ b/src/llvm-project/lldb/source/Core/ValueObjectRegister.cpp
@@ -18,6 +18,7 @@
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/DataExtractor.h"
+#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Scalar.h"
 #include "lldb/Utility/Status.h"
 #include "lldb/Utility/Stream.h"
@@ -256,15 +257,19 @@
 CompilerType ValueObjectRegister::GetCompilerTypeImpl() {
   if (!m_compiler_type.IsValid()) {
     ExecutionContext exe_ctx(GetExecutionContextRef());
-    Target *target = exe_ctx.GetTargetPtr();
-    if (target) {
-      Module *exe_module = target->GetExecutableModulePointer();
-      if (exe_module) {
-        TypeSystem *type_system =
+    if (auto *target = exe_ctx.GetTargetPtr()) {
+      if (auto *exe_module = target->GetExecutableModulePointer()) {
+        auto type_system_or_err =
             exe_module->GetTypeSystemForLanguage(eLanguageTypeC);
-        if (type_system)
-          m_compiler_type = type_system->GetBuiltinTypeForEncodingAndBitSize(
-              m_reg_info.encoding, m_reg_info.byte_size * 8);
+        if (auto err = type_system_or_err.takeError()) {
+          LLDB_LOG_ERROR(
+              lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TYPES),
+              std::move(err), "Unable to get CompilerType from TypeSystem");
+        } else {
+          m_compiler_type =
+              type_system_or_err->GetBuiltinTypeForEncodingAndBitSize(
+                  m_reg_info.encoding, m_reg_info.byte_size * 8);
+        }
       }
     }
   }
diff --git a/src/llvm-project/lldb/source/Core/ValueObjectSyntheticFilter.cpp b/src/llvm-project/lldb/source/Core/ValueObjectSyntheticFilter.cpp
index 4004732..a30be1b 100644
--- a/src/llvm-project/lldb/source/Core/ValueObjectSyntheticFilter.cpp
+++ b/src/llvm-project/lldb/source/Core/ValueObjectSyntheticFilter.cpp
@@ -48,8 +48,9 @@
 ValueObjectSynthetic::ValueObjectSynthetic(ValueObject &parent,
                                            lldb::SyntheticChildrenSP filter)
     : ValueObject(parent), m_synth_sp(filter), m_children_byindex(),
-      m_name_toindex(), m_synthetic_children_count(UINT32_MAX),
-      m_synthetic_children_cache(), m_parent_type_name(parent.GetTypeName()),
+      m_name_toindex(), m_synthetic_children_cache(),
+      m_synthetic_children_count(UINT32_MAX),
+      m_parent_type_name(parent.GetTypeName()),
       m_might_have_children(eLazyBoolCalculate),
       m_provides_value(eLazyBoolCalculate) {
   SetName(parent.GetName());
@@ -87,20 +88,18 @@
 
   if (max < UINT32_MAX) {
     size_t num_children = m_synth_filter_up->CalculateNumChildren(max);
-    if (log)
-      log->Printf("[ValueObjectSynthetic::CalculateNumChildren] for VO of name "
-                  "%s and type %s, the filter returned %zu child values",
-                  GetName().AsCString(), GetTypeName().AsCString(),
-                  num_children);
+    LLDB_LOGF(log,
+              "[ValueObjectSynthetic::CalculateNumChildren] for VO of name "
+              "%s and type %s, the filter returned %zu child values",
+              GetName().AsCString(), GetTypeName().AsCString(), num_children);
     return num_children;
   } else {
     size_t num_children = (m_synthetic_children_count =
                                m_synth_filter_up->CalculateNumChildren(max));
-    if (log)
-      log->Printf("[ValueObjectSynthetic::CalculateNumChildren] for VO of name "
-                  "%s and type %s, the filter returned %zu child values",
-                  GetName().AsCString(), GetTypeName().AsCString(),
-                  num_children);
+    LLDB_LOGF(log,
+              "[ValueObjectSynthetic::CalculateNumChildren] for VO of name "
+              "%s and type %s, the filter returned %zu child values",
+              GetName().AsCString(), GetTypeName().AsCString(), num_children);
     return num_children;
   }
 }
@@ -142,7 +141,7 @@
   }
   m_synth_filter_up = (m_synth_sp->GetFrontEnd(*valobj_for_frontend));
   if (!m_synth_filter_up)
-    m_synth_filter_up = llvm::make_unique<DummySyntheticFrontEnd>(*m_parent);
+    m_synth_filter_up = std::make_unique<DummySyntheticFrontEnd>(*m_parent);
 }
 
 bool ValueObjectSynthetic::UpdateValue() {
@@ -163,37 +162,43 @@
   // <rdar://problem/12424824>
   ConstString new_parent_type_name = m_parent->GetTypeName();
   if (new_parent_type_name != m_parent_type_name) {
-    if (log)
-      log->Printf("[ValueObjectSynthetic::UpdateValue] name=%s, type changed "
-                  "from %s to %s, recomputing synthetic filter",
-                  GetName().AsCString(), m_parent_type_name.AsCString(),
-                  new_parent_type_name.AsCString());
+    LLDB_LOGF(log,
+              "[ValueObjectSynthetic::UpdateValue] name=%s, type changed "
+              "from %s to %s, recomputing synthetic filter",
+              GetName().AsCString(), m_parent_type_name.AsCString(),
+              new_parent_type_name.AsCString());
     m_parent_type_name = new_parent_type_name;
     CreateSynthFilter();
   }
 
   // let our backend do its update
   if (!m_synth_filter_up->Update()) {
-    if (log)
-      log->Printf("[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
-                  "filter said caches are stale - clearing",
-                  GetName().AsCString());
+    LLDB_LOGF(log,
+              "[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
+              "filter said caches are stale - clearing",
+              GetName().AsCString());
     // filter said that cached values are stale
-    m_children_byindex.Clear();
-    m_name_toindex.Clear();
+    {
+      std::lock_guard<std::mutex> guard(m_child_mutex);
+      m_children_byindex.clear();
+      m_name_toindex.clear();
+    }
     // usually, an object's value can change but this does not alter its
     // children count for a synthetic VO that might indeed happen, so we need
     // to tell the upper echelons that they need to come back to us asking for
     // children
     m_children_count_valid = false;
-    m_synthetic_children_cache.Clear();
+    {
+      std::lock_guard<std::mutex> guard(m_child_mutex);
+      m_synthetic_children_cache.clear();
+    }
     m_synthetic_children_count = UINT32_MAX;
     m_might_have_children = eLazyBoolCalculate;
   } else {
-    if (log)
-      log->Printf("[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
-                  "filter said caches are still valid",
-                  GetName().AsCString());
+    LLDB_LOGF(log,
+              "[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
+              "filter said caches are still valid",
+              GetName().AsCString());
   }
 
   m_provides_value = eLazyBoolCalculate;
@@ -201,18 +206,18 @@
   lldb::ValueObjectSP synth_val(m_synth_filter_up->GetSyntheticValue());
 
   if (synth_val && synth_val->CanProvideValue()) {
-    if (log)
-      log->Printf("[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
-                  "filter said it can provide a value",
-                  GetName().AsCString());
+    LLDB_LOGF(log,
+              "[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
+              "filter said it can provide a value",
+              GetName().AsCString());
 
     m_provides_value = eLazyBoolYes;
     CopyValueData(synth_val.get());
   } else {
-    if (log)
-      log->Printf("[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
-                  "filter said it will not provide a value",
-                  GetName().AsCString());
+    LLDB_LOGF(log,
+              "[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
+              "filter said it will not provide a value",
+              GetName().AsCString());
 
     m_provides_value = eLazyBoolNo;
     CopyValueData(m_parent);
@@ -226,57 +231,69 @@
                                                           bool can_create) {
   Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS);
 
-  if (log)
-    log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, retrieving "
-                "child at index %zu",
-                GetName().AsCString(), idx);
+  LLDB_LOGF(log,
+            "[ValueObjectSynthetic::GetChildAtIndex] name=%s, retrieving "
+            "child at index %zu",
+            GetName().AsCString(), idx);
 
   UpdateValueIfNeeded();
 
   ValueObject *valobj;
-  if (!m_children_byindex.GetValueForKey(idx, valobj)) {
+  bool child_is_cached;
+  {
+    std::lock_guard<std::mutex> guard(m_child_mutex);
+    auto cached_child_it = m_children_byindex.find(idx);
+    child_is_cached = cached_child_it != m_children_byindex.end();
+    if (child_is_cached)
+      valobj = cached_child_it->second;
+  }
+
+  if (!child_is_cached) {
     if (can_create && m_synth_filter_up != nullptr) {
-      if (log)
-        log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
-                    "index %zu not cached and will be created",
-                    GetName().AsCString(), idx);
+      LLDB_LOGF(log,
+                "[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
+                "index %zu not cached and will be created",
+                GetName().AsCString(), idx);
 
       lldb::ValueObjectSP synth_guy = m_synth_filter_up->GetChildAtIndex(idx);
 
-      if (log)
-        log->Printf(
-            "[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at index "
-            "%zu created as %p (is "
-            "synthetic: %s)",
-            GetName().AsCString(), idx, static_cast<void *>(synth_guy.get()),
-            synth_guy.get()
-                ? (synth_guy->IsSyntheticChildrenGenerated() ? "yes" : "no")
-                : "no");
+      LLDB_LOGF(
+          log,
+          "[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at index "
+          "%zu created as %p (is "
+          "synthetic: %s)",
+          GetName().AsCString(), idx, static_cast<void *>(synth_guy.get()),
+          synth_guy.get()
+              ? (synth_guy->IsSyntheticChildrenGenerated() ? "yes" : "no")
+              : "no");
 
       if (!synth_guy)
         return synth_guy;
 
-      if (synth_guy->IsSyntheticChildrenGenerated())
-        m_synthetic_children_cache.AppendObject(synth_guy);
-      m_children_byindex.SetValueForKey(idx, synth_guy.get());
+      {
+        std::lock_guard<std::mutex> guard(m_child_mutex);
+        if (synth_guy->IsSyntheticChildrenGenerated())
+          m_synthetic_children_cache.push_back(synth_guy);
+        m_children_byindex[idx] = synth_guy.get();
+      }
       synth_guy->SetPreferredDisplayLanguageIfNeeded(
           GetPreferredDisplayLanguage());
       return synth_guy;
     } else {
-      if (log)
-        log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
-                    "index %zu not cached and cannot "
-                    "be created (can_create = %s, synth_filter = %p)",
-                    GetName().AsCString(), idx, can_create ? "yes" : "no",
-                    static_cast<void *>(m_synth_filter_up.get()));
+      LLDB_LOGF(log,
+                "[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
+                "index %zu not cached and cannot "
+                "be created (can_create = %s, synth_filter = %p)",
+                GetName().AsCString(), idx, can_create ? "yes" : "no",
+                static_cast<void *>(m_synth_filter_up.get()));
 
       return lldb::ValueObjectSP();
     }
   } else {
-    if (log)
-      log->Printf("[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
-                  "index %zu cached as %p",
-                  GetName().AsCString(), idx, static_cast<void *>(valobj));
+    LLDB_LOGF(log,
+              "[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
+              "index %zu cached as %p",
+              GetName().AsCString(), idx, static_cast<void *>(valobj));
 
     return valobj->GetSP();
   }
@@ -299,13 +316,21 @@
   UpdateValueIfNeeded();
 
   uint32_t found_index = UINT32_MAX;
-  bool did_find = m_name_toindex.GetValueForKey(name.GetCString(), found_index);
+  bool did_find;
+  {
+    std::lock_guard<std::mutex> guard(m_child_mutex);
+    auto name_to_index = m_name_toindex.find(name.GetCString());
+    did_find = name_to_index != m_name_toindex.end();
+    if (did_find)
+      found_index = name_to_index->second;
+  }
 
   if (!did_find && m_synth_filter_up != nullptr) {
     uint32_t index = m_synth_filter_up->GetIndexOfChildWithName(name);
     if (index == UINT32_MAX)
       return index;
-    m_name_toindex.SetValueForKey(name.GetCString(), index);
+    std::lock_guard<std::mutex> guard(m_child_mutex);
+    m_name_toindex[name.GetCString()] = index;
     return index;
   } else if (!did_find && m_synth_filter_up == nullptr)
     return UINT32_MAX;
@@ -322,7 +347,7 @@
 void ValueObjectSynthetic::CopyValueData(ValueObject *source) {
   m_value = (source->UpdateValueIfNeeded(), source->GetValue());
   ExecutionContext exe_ctx(GetExecutionContextRef());
-  m_error = m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
+  m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
 }
 
 bool ValueObjectSynthetic::CanProvideValue() {
diff --git a/src/llvm-project/lldb/source/Core/ValueObjectVariable.cpp b/src/llvm-project/lldb/source/Core/ValueObjectVariable.cpp
index 5aee824..240ebe1 100644
--- a/src/llvm-project/lldb/source/Core/ValueObjectVariable.cpp
+++ b/src/llvm-project/lldb/source/Core/ValueObjectVariable.cpp
@@ -168,51 +168,6 @@
 
       Process *process = exe_ctx.GetProcessPtr();
       const bool process_is_alive = process && process->IsAlive();
-      const uint32_t type_info = compiler_type.GetTypeInfo();
-      const bool is_pointer_or_ref =
-          (type_info & (lldb::eTypeIsPointer | lldb::eTypeIsReference)) != 0;
-
-      switch (value_type) {
-      case Value::eValueTypeFileAddress:
-        // If this type is a pointer, then its children will be considered load
-        // addresses if the pointer or reference is dereferenced, but only if
-        // the process is alive.
-        //
-        // There could be global variables like in the following code:
-        // struct LinkedListNode { Foo* foo; LinkedListNode* next; };
-        // Foo g_foo1;
-        // Foo g_foo2;
-        // LinkedListNode g_second_node = { &g_foo2, NULL };
-        // LinkedListNode g_first_node = { &g_foo1, &g_second_node };
-        //
-        // When we aren't running, we should be able to look at these variables
-        // using the "target variable" command. Children of the "g_first_node"
-        // always will be of the same address type as the parent. But children
-        // of the "next" member of LinkedListNode will become load addresses if
-        // we have a live process, or remain what a file address if it what a
-        // file address.
-        if (process_is_alive && is_pointer_or_ref)
-          SetAddressTypeOfChildren(eAddressTypeLoad);
-        else
-          SetAddressTypeOfChildren(eAddressTypeFile);
-        break;
-      case Value::eValueTypeHostAddress:
-        // Same as above for load addresses, except children of pointer or refs
-        // are always load addresses. Host addresses are used to store freeze
-        // dried variables. If this type is a struct, the entire struct
-        // contents will be copied into the heap of the
-        // LLDB process, but we do not currently follow any pointers.
-        if (is_pointer_or_ref)
-          SetAddressTypeOfChildren(eAddressTypeLoad);
-        else
-          SetAddressTypeOfChildren(eAddressTypeHost);
-        break;
-      case Value::eValueTypeLoadAddress:
-      case Value::eValueTypeScalar:
-      case Value::eValueTypeVector:
-        SetAddressTypeOfChildren(eAddressTypeLoad);
-        break;
-      }
 
       switch (value_type) {
       case Value::eValueTypeVector:
@@ -221,7 +176,7 @@
         // The variable value is in the Scalar value inside the m_value. We can
         // point our m_data right to it.
         m_error =
-            m_value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
+            m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
         break;
 
       case Value::eValueTypeFileAddress:
@@ -250,7 +205,7 @@
           Value value(m_value);
           value.SetContext(Value::eContextTypeVariable, variable);
           m_error =
-              value.GetValueAsData(&exe_ctx, m_data, 0, GetModule().get());
+              value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
 
           SetValueDidChange(value_type != old_value.GetValueType() ||
                             m_value.GetScalar() != old_value.GetScalar());
diff --git a/src/llvm-project/lldb/source/DataFormatters/CMakeLists.txt b/src/llvm-project/lldb/source/DataFormatters/CMakeLists.txt
index b859677..e727432 100644
--- a/src/llvm-project/lldb/source/DataFormatters/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/DataFormatters/CMakeLists.txt
@@ -13,7 +13,6 @@
   TypeFormat.cpp
   TypeSummary.cpp
   TypeSynthetic.cpp
-  TypeValidator.cpp
   ValueObjectPrinter.cpp
   VectorType.cpp
 
diff --git a/src/llvm-project/lldb/source/DataFormatters/DataVisualization.cpp b/src/llvm-project/lldb/source/DataFormatters/DataVisualization.cpp
index 08b3b34..99c303c 100644
--- a/src/llvm-project/lldb/source/DataFormatters/DataVisualization.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/DataVisualization.cpp
@@ -66,17 +66,6 @@
   return GetFormatManager().GetSyntheticForType(type_sp);
 }
 
-lldb::TypeValidatorImplSP
-DataVisualization::GetValidator(ValueObject &valobj,
-                                lldb::DynamicValueType use_dynamic) {
-  return GetFormatManager().GetValidator(valobj, use_dynamic);
-}
-
-lldb::TypeValidatorImplSP
-DataVisualization::GetValidatorForType(lldb::TypeNameSpecifierImplSP type_sp) {
-  return GetFormatManager().GetValidatorForType(type_sp);
-}
-
 bool DataVisualization::AnyMatches(
     ConstString type_name, TypeCategoryImpl::FormatCategoryItems items,
     bool only_enabled, const char **matching_category,
@@ -122,8 +111,7 @@
                                            TypeCategoryMap::Position pos) {
   if (GetFormatManager().GetCategory(category)->IsEnabled())
     GetFormatManager().DisableCategory(category);
-  GetFormatManager().EnableCategory(
-      category, pos, std::initializer_list<lldb::LanguageType>());
+  GetFormatManager().EnableCategory(category, pos, {});
 }
 
 void DataVisualization::Categories::Enable(lldb::LanguageType lang_type) {
diff --git a/src/llvm-project/lldb/source/DataFormatters/FormatCache.cpp b/src/llvm-project/lldb/source/DataFormatters/FormatCache.cpp
index 7e328cb..99f1407 100644
--- a/src/llvm-project/lldb/source/DataFormatters/FormatCache.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/FormatCache.cpp
@@ -17,46 +17,7 @@
 
 FormatCache::Entry::Entry()
     : m_format_cached(false), m_summary_cached(false),
-      m_synthetic_cached(false), m_validator_cached(false), m_format_sp(),
-      m_summary_sp(), m_synthetic_sp(), m_validator_sp() {}
-
-FormatCache::Entry::Entry(lldb::TypeFormatImplSP format_sp)
-    : m_summary_cached(false), m_synthetic_cached(false),
-      m_validator_cached(false), m_summary_sp(), m_synthetic_sp(),
-      m_validator_sp() {
-  SetFormat(format_sp);
-}
-
-FormatCache::Entry::Entry(lldb::TypeSummaryImplSP summary_sp)
-    : m_format_cached(false), m_synthetic_cached(false),
-      m_validator_cached(false), m_format_sp(), m_synthetic_sp(),
-      m_validator_sp() {
-  SetSummary(summary_sp);
-}
-
-FormatCache::Entry::Entry(lldb::SyntheticChildrenSP synthetic_sp)
-    : m_format_cached(false), m_summary_cached(false),
-      m_validator_cached(false), m_format_sp(), m_summary_sp(),
-      m_validator_sp() {
-  SetSynthetic(synthetic_sp);
-}
-
-FormatCache::Entry::Entry(lldb::TypeValidatorImplSP validator_sp)
-    : m_format_cached(false), m_summary_cached(false),
-      m_synthetic_cached(false), m_format_sp(), m_summary_sp(),
-      m_synthetic_sp() {
-  SetValidator(validator_sp);
-}
-
-FormatCache::Entry::Entry(lldb::TypeFormatImplSP format_sp,
-                          lldb::TypeSummaryImplSP summary_sp,
-                          lldb::SyntheticChildrenSP synthetic_sp,
-                          lldb::TypeValidatorImplSP validator_sp) {
-  SetFormat(format_sp);
-  SetSummary(summary_sp);
-  SetSynthetic(synthetic_sp);
-  SetValidator(validator_sp);
-}
+      m_synthetic_cached(false) {}
 
 bool FormatCache::Entry::IsFormatCached() { return m_format_cached; }
 
@@ -64,42 +25,33 @@
 
 bool FormatCache::Entry::IsSyntheticCached() { return m_synthetic_cached; }
 
-bool FormatCache::Entry::IsValidatorCached() { return m_validator_cached; }
-
-lldb::TypeFormatImplSP FormatCache::Entry::GetFormat() { return m_format_sp; }
-
-lldb::TypeSummaryImplSP FormatCache::Entry::GetSummary() {
-  return m_summary_sp;
+void FormatCache::Entry::Get(lldb::TypeFormatImplSP &retval) {
+  retval = m_format_sp;
 }
 
-lldb::SyntheticChildrenSP FormatCache::Entry::GetSynthetic() {
-  return m_synthetic_sp;
+void FormatCache::Entry::Get(lldb::TypeSummaryImplSP &retval) {
+  retval = m_summary_sp;
 }
 
-lldb::TypeValidatorImplSP FormatCache::Entry::GetValidator() {
-  return m_validator_sp;
+void FormatCache::Entry::Get(lldb::SyntheticChildrenSP &retval) {
+  retval = m_synthetic_sp;
 }
 
-void FormatCache::Entry::SetFormat(lldb::TypeFormatImplSP format_sp) {
+void FormatCache::Entry::Set(lldb::TypeFormatImplSP format_sp) {
   m_format_cached = true;
   m_format_sp = format_sp;
 }
 
-void FormatCache::Entry::SetSummary(lldb::TypeSummaryImplSP summary_sp) {
+void FormatCache::Entry::Set(lldb::TypeSummaryImplSP summary_sp) {
   m_summary_cached = true;
   m_summary_sp = summary_sp;
 }
 
-void FormatCache::Entry::SetSynthetic(lldb::SyntheticChildrenSP synthetic_sp) {
+void FormatCache::Entry::Set(lldb::SyntheticChildrenSP synthetic_sp) {
   m_synthetic_cached = true;
   m_synthetic_sp = synthetic_sp;
 }
 
-void FormatCache::Entry::SetValidator(lldb::TypeValidatorImplSP validator_sp) {
-  m_validator_cached = true;
-  m_validator_sp = validator_sp;
-}
-
 FormatCache::FormatCache()
     : m_map(), m_mutex()
 #ifdef LLDB_CONFIGURATION_DEBUG
@@ -117,100 +69,64 @@
   return m_map[type];
 }
 
-bool FormatCache::GetFormat(ConstString type,
-                            lldb::TypeFormatImplSP &format_sp) {
+namespace lldb_private {
+
+template<> bool FormatCache::Entry::IsCached<lldb::TypeFormatImplSP>() {
+  return IsFormatCached();
+}
+template<> bool FormatCache::Entry::IsCached<lldb::TypeSummaryImplSP> () {
+  return IsSummaryCached();
+}
+template<> bool FormatCache::Entry::IsCached<lldb::SyntheticChildrenSP>() {
+  return IsSyntheticCached();
+}
+
+} // namespace lldb_private
+
+template <typename ImplSP>
+bool FormatCache::Get(ConstString type, ImplSP &format_impl_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   auto entry = GetEntry(type);
-  if (entry.IsFormatCached()) {
+  if (entry.IsCached<ImplSP>()) {
 #ifdef LLDB_CONFIGURATION_DEBUG
     m_cache_hits++;
 #endif
-    format_sp = entry.GetFormat();
+    entry.Get(format_impl_sp);
     return true;
   }
 #ifdef LLDB_CONFIGURATION_DEBUG
   m_cache_misses++;
 #endif
-  format_sp.reset();
+  format_impl_sp.reset();
   return false;
 }
 
-bool FormatCache::GetSummary(ConstString type,
-                             lldb::TypeSummaryImplSP &summary_sp) {
+/// Explicit instantiations for the three types.
+/// \{
+template bool
+FormatCache::Get<lldb::TypeFormatImplSP>(ConstString, lldb::TypeFormatImplSP &);
+template bool
+FormatCache::Get<lldb::TypeSummaryImplSP>(ConstString,
+                                          lldb::TypeSummaryImplSP &);
+template bool
+FormatCache::Get<lldb::SyntheticChildrenSP>(ConstString,
+                                            lldb::SyntheticChildrenSP &);
+/// \}
+
+void FormatCache::Set(ConstString type, lldb::TypeFormatImplSP &format_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  auto entry = GetEntry(type);
-  if (entry.IsSummaryCached()) {
-#ifdef LLDB_CONFIGURATION_DEBUG
-    m_cache_hits++;
-#endif
-    summary_sp = entry.GetSummary();
-    return true;
-  }
-#ifdef LLDB_CONFIGURATION_DEBUG
-  m_cache_misses++;
-#endif
-  summary_sp.reset();
-  return false;
+  GetEntry(type).Set(format_sp);
 }
 
-bool FormatCache::GetSynthetic(ConstString type,
-                               lldb::SyntheticChildrenSP &synthetic_sp) {
+void FormatCache::Set(ConstString type, lldb::TypeSummaryImplSP &summary_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  auto entry = GetEntry(type);
-  if (entry.IsSyntheticCached()) {
-#ifdef LLDB_CONFIGURATION_DEBUG
-    m_cache_hits++;
-#endif
-    synthetic_sp = entry.GetSynthetic();
-    return true;
-  }
-#ifdef LLDB_CONFIGURATION_DEBUG
-  m_cache_misses++;
-#endif
-  synthetic_sp.reset();
-  return false;
+  GetEntry(type).Set(summary_sp);
 }
 
-bool FormatCache::GetValidator(ConstString type,
-                               lldb::TypeValidatorImplSP &validator_sp) {
+void FormatCache::Set(ConstString type,
+                      lldb::SyntheticChildrenSP &synthetic_sp) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  auto entry = GetEntry(type);
-  if (entry.IsValidatorCached()) {
-#ifdef LLDB_CONFIGURATION_DEBUG
-    m_cache_hits++;
-#endif
-    validator_sp = entry.GetValidator();
-    return true;
-  }
-#ifdef LLDB_CONFIGURATION_DEBUG
-  m_cache_misses++;
-#endif
-  validator_sp.reset();
-  return false;
-}
-
-void FormatCache::SetFormat(ConstString type,
-                            lldb::TypeFormatImplSP &format_sp) {
-  std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  GetEntry(type).SetFormat(format_sp);
-}
-
-void FormatCache::SetSummary(ConstString type,
-                             lldb::TypeSummaryImplSP &summary_sp) {
-  std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  GetEntry(type).SetSummary(summary_sp);
-}
-
-void FormatCache::SetSynthetic(ConstString type,
-                               lldb::SyntheticChildrenSP &synthetic_sp) {
-  std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  GetEntry(type).SetSynthetic(synthetic_sp);
-}
-
-void FormatCache::SetValidator(ConstString type,
-                               lldb::TypeValidatorImplSP &validator_sp) {
-  std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  GetEntry(type).SetValidator(validator_sp);
+  GetEntry(type).Set(synthetic_sp);
 }
 
 void FormatCache::Clear() {
diff --git a/src/llvm-project/lldb/source/DataFormatters/FormatClasses.cpp b/src/llvm-project/lldb/source/DataFormatters/FormatClasses.cpp
index 271963b..6a9279f 100644
--- a/src/llvm-project/lldb/source/DataFormatters/FormatClasses.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/FormatClasses.cpp
@@ -24,7 +24,8 @@
       m_formatters_match_vector({}, false), m_type_for_cache(),
       m_candidate_languages() {
   m_type_for_cache = FormatManager::GetTypeForCache(valobj, use_dynamic);
-  m_candidate_languages = FormatManager::GetCandidateLanguages(valobj);
+  m_candidate_languages =
+      FormatManager::GetCandidateLanguages(valobj.GetObjectRuntimeLanguage());
 }
 
 FormattersMatchVector FormattersMatchData::GetMatchesVector() {
diff --git a/src/llvm-project/lldb/source/DataFormatters/FormatManager.cpp b/src/llvm-project/lldb/source/DataFormatters/FormatManager.cpp
index dd2808a..d5db3ee 100644
--- a/src/llvm-project/lldb/source/DataFormatters/FormatManager.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/FormatManager.cpp
@@ -30,7 +30,7 @@
                            // current format
 };
 
-static FormatInfo g_format_infos[] = {
+static constexpr FormatInfo g_format_infos[] = {
     {eFormatDefault, '\0', "default"},
     {eFormatBoolean, 'B', "boolean"},
     {eFormatBinary, 'b', "binary"},
@@ -69,7 +69,13 @@
     {eFormatAddressInfo, 'A', "address"},
     {eFormatHexFloat, '\0', "hex float"},
     {eFormatInstruction, 'i', "instruction"},
-    {eFormatVoid, 'v', "void"}};
+    {eFormatVoid, 'v', "void"},
+    {eFormatUnicode8, 'u', "unicode8"},
+};
+
+static_assert((sizeof(g_format_infos) / sizeof(g_format_infos[0])) ==
+                  kNumFormats,
+              "All formats must have a corresponding info entry.");
 
 static uint32_t g_num_format_infos = llvm::array_lengthof(g_format_infos);
 
@@ -224,15 +230,38 @@
     if (non_ptr_type.IsTypedefType()) {
       CompilerType deffed_pointed_type =
           non_ptr_type.GetTypedefedType().GetPointerType();
+      const bool stripped_typedef = true;
       GetPossibleMatches(
           valobj, deffed_pointed_type,
           reason | lldb_private::eFormatterChoiceCriterionNavigatedTypedefs,
           use_dynamic, entries, did_strip_ptr, did_strip_ref,
-          true); // this is not exactly the usual meaning of stripping typedefs
+          stripped_typedef); // this is not exactly the usual meaning of
+                             // stripping typedefs
     }
   }
 
-  for (lldb::LanguageType language_type : GetCandidateLanguages(valobj)) {
+  // For arrays with typedef-ed elements, we add a candidate with the typedef
+  // stripped.
+  uint64_t array_size;
+  if (compiler_type.IsArrayType(nullptr, &array_size, nullptr)) {
+    CompilerType element_type = compiler_type.GetArrayElementType();
+    if (element_type.IsTypedefType()) {
+      // Get the stripped element type and compute the stripped array type
+      // from it.
+      CompilerType deffed_array_type =
+          element_type.GetTypedefedType().GetArrayType(array_size);
+      const bool stripped_typedef = true;
+      GetPossibleMatches(
+          valobj, deffed_array_type,
+          reason | lldb_private::eFormatterChoiceCriterionNavigatedTypedefs,
+          use_dynamic, entries, did_strip_ptr, did_strip_ref,
+          stripped_typedef); // this is not exactly the usual meaning of
+                             // stripping typedefs
+    }
+  }
+
+  for (lldb::LanguageType language_type :
+       GetCandidateLanguages(valobj.GetObjectRuntimeLanguage())) {
     if (Language *language = Language::FindPlugin(language_type)) {
       for (ConstString candidate :
            language->GetPossibleFormattersMatches(valobj, use_dynamic)) {
@@ -379,30 +408,6 @@
   return synth_chosen_sp;
 }
 
-lldb::TypeValidatorImplSP
-FormatManager::GetValidatorForType(lldb::TypeNameSpecifierImplSP type_sp) {
-  if (!type_sp)
-    return lldb::TypeValidatorImplSP();
-  lldb::TypeValidatorImplSP validator_chosen_sp;
-  uint32_t num_categories = m_categories_map.GetCount();
-  lldb::TypeCategoryImplSP category_sp;
-  uint32_t prio_category = UINT32_MAX;
-  for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
-    category_sp = GetCategoryAtIndex(category_id);
-    if (!category_sp->IsEnabled())
-      continue;
-    lldb::TypeValidatorImplSP validator_current_sp(
-        category_sp->GetValidatorForType(type_sp).get());
-    if (validator_current_sp &&
-        (validator_chosen_sp.get() == nullptr ||
-         (prio_category > category_sp->GetEnabledPosition()))) {
-      prio_category = category_sp->GetEnabledPosition();
-      validator_chosen_sp = validator_current_sp;
-    }
-  }
-  return validator_chosen_sp;
-}
-
 void FormatManager::ForEachCategory(TypeCategoryMap::ForEachCallback callback) {
   m_categories_map.ForEach(callback);
   std::lock_guard<std::recursive_mutex> guard(m_language_categories_mutex);
@@ -573,12 +578,6 @@
 }
 
 std::vector<lldb::LanguageType>
-FormatManager::GetCandidateLanguages(ValueObject &valobj) {
-  lldb::LanguageType lang_type = valobj.GetObjectRuntimeLanguage();
-  return GetCandidateLanguages(lang_type);
-}
-
-std::vector<lldb::LanguageType>
 FormatManager::GetCandidateLanguages(lldb::LanguageType lang_type) {
   switch (lang_type) {
   case lldb::eLanguageTypeC:
@@ -593,6 +592,7 @@
   default:
     return {lang_type};
   }
+  llvm_unreachable("Fully covered switch");
 }
 
 LanguageCategory *
@@ -608,317 +608,93 @@
   return lang_category;
 }
 
-lldb::TypeFormatImplSP
-FormatManager::GetHardcodedFormat(FormattersMatchData &match_data) {
-  TypeFormatImplSP retval_sp;
-
+template <typename ImplSP>
+ImplSP FormatManager::GetHardcoded(FormattersMatchData &match_data) {
+  ImplSP retval_sp;
   for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
     if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
       if (lang_category->GetHardcoded(*this, match_data, retval_sp))
-        break;
+        return retval_sp;
+    }
+  }
+  return retval_sp;
+}
+
+template <typename ImplSP>
+ImplSP FormatManager::Get(ValueObject &valobj,
+                          lldb::DynamicValueType use_dynamic) {
+  FormattersMatchData match_data(valobj, use_dynamic);
+  if (ImplSP retval_sp = GetCached<ImplSP>(match_data))
+    return retval_sp;
+
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
+
+  LLDB_LOGF(log, "[%s] Search failed. Giving language a chance.", __FUNCTION__);
+  for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
+    if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
+      ImplSP retval_sp;
+      if (lang_category->Get(match_data, retval_sp))
+        if (retval_sp) {
+          LLDB_LOGF(log, "[%s] Language search success. Returning.",
+                    __FUNCTION__);
+          return retval_sp;
+        }
     }
   }
 
+  LLDB_LOGF(log, "[%s] Search failed. Giving hardcoded a chance.",
+            __FUNCTION__);
+  return GetHardcoded<ImplSP>(match_data);
+}
+
+template <typename ImplSP>
+ImplSP FormatManager::GetCached(FormattersMatchData &match_data) {
+  ImplSP retval_sp;
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
+  if (match_data.GetTypeForCache()) {
+    LLDB_LOGF(log, "\n\n[%s] Looking into cache for type %s", __FUNCTION__,
+              match_data.GetTypeForCache().AsCString("<invalid>"));
+    if (m_format_cache.Get(match_data.GetTypeForCache(), retval_sp)) {
+      if (log) {
+        LLDB_LOGF(log, "[%s] Cache search success. Returning.", __FUNCTION__);
+        LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
+                  m_format_cache.GetCacheHits(),
+                  m_format_cache.GetCacheMisses());
+      }
+      return retval_sp;
+    }
+    LLDB_LOGF(log, "[%s] Cache search failed. Going normal route",
+              __FUNCTION__);
+  }
+
+  m_categories_map.Get(match_data, retval_sp);
+  if (match_data.GetTypeForCache() && (!retval_sp || !retval_sp->NonCacheable())) {
+    LLDB_LOGF(log, "[%s] Caching %p for type %s", __FUNCTION__,
+              static_cast<void *>(retval_sp.get()),
+              match_data.GetTypeForCache().AsCString("<invalid>"));
+    m_format_cache.Set(match_data.GetTypeForCache(), retval_sp);
+  }
+  LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
+            m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
   return retval_sp;
 }
 
 lldb::TypeFormatImplSP
 FormatManager::GetFormat(ValueObject &valobj,
                          lldb::DynamicValueType use_dynamic) {
-  FormattersMatchData match_data(valobj, use_dynamic);
-
-  TypeFormatImplSP retval;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
-  if (match_data.GetTypeForCache()) {
-    if (log)
-      log->Printf(
-          "\n\n[FormatManager::GetFormat] Looking into cache for type %s",
-          match_data.GetTypeForCache().AsCString("<invalid>"));
-    if (m_format_cache.GetFormat(match_data.GetTypeForCache(), retval)) {
-      if (log) {
-        log->Printf(
-            "[FormatManager::GetFormat] Cache search success. Returning.");
-        LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
-                  m_format_cache.GetCacheHits(),
-                  m_format_cache.GetCacheMisses());
-      }
-      return retval;
-    }
-    if (log)
-      log->Printf(
-          "[FormatManager::GetFormat] Cache search failed. Going normal route");
-  }
-
-  retval = m_categories_map.GetFormat(match_data);
-  if (!retval) {
-    if (log)
-      log->Printf("[FormatManager::GetFormat] Search failed. Giving language a "
-                  "chance.");
-    for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
-      if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
-        if (lang_category->Get(match_data, retval))
-          break;
-      }
-    }
-    if (retval) {
-      if (log)
-        log->Printf(
-            "[FormatManager::GetFormat] Language search success. Returning.");
-      return retval;
-    }
-  }
-  if (!retval) {
-    if (log)
-      log->Printf("[FormatManager::GetFormat] Search failed. Giving hardcoded "
-                  "a chance.");
-    retval = GetHardcodedFormat(match_data);
-  }
-
-  if (match_data.GetTypeForCache() && (!retval || !retval->NonCacheable())) {
-    if (log)
-      log->Printf("[FormatManager::GetFormat] Caching %p for type %s",
-                  static_cast<void *>(retval.get()),
-                  match_data.GetTypeForCache().AsCString("<invalid>"));
-    m_format_cache.SetFormat(match_data.GetTypeForCache(), retval);
-  }
-  LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
-            m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
-  return retval;
-}
-
-lldb::TypeSummaryImplSP
-FormatManager::GetHardcodedSummaryFormat(FormattersMatchData &match_data) {
-  TypeSummaryImplSP retval_sp;
-
-  for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
-    if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
-      if (lang_category->GetHardcoded(*this, match_data, retval_sp))
-        break;
-    }
-  }
-
-  return retval_sp;
+  return Get<lldb::TypeFormatImplSP>(valobj, use_dynamic);
 }
 
 lldb::TypeSummaryImplSP
 FormatManager::GetSummaryFormat(ValueObject &valobj,
                                 lldb::DynamicValueType use_dynamic) {
-  FormattersMatchData match_data(valobj, use_dynamic);
-
-  TypeSummaryImplSP retval;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
-  if (match_data.GetTypeForCache()) {
-    if (log)
-      log->Printf("\n\n[FormatManager::GetSummaryFormat] Looking into cache "
-                  "for type %s",
-                  match_data.GetTypeForCache().AsCString("<invalid>"));
-    if (m_format_cache.GetSummary(match_data.GetTypeForCache(), retval)) {
-      if (log) {
-        log->Printf("[FormatManager::GetSummaryFormat] Cache search success. "
-                    "Returning.");
-        LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
-                  m_format_cache.GetCacheHits(),
-                  m_format_cache.GetCacheMisses());
-      }
-      return retval;
-    }
-    if (log)
-      log->Printf("[FormatManager::GetSummaryFormat] Cache search failed. "
-                  "Going normal route");
-  }
-
-  retval = m_categories_map.GetSummaryFormat(match_data);
-  if (!retval) {
-    if (log)
-      log->Printf("[FormatManager::GetSummaryFormat] Search failed. Giving "
-                  "language a chance.");
-    for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
-      if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
-        if (lang_category->Get(match_data, retval))
-          break;
-      }
-    }
-    if (retval) {
-      if (log)
-        log->Printf("[FormatManager::GetSummaryFormat] Language search "
-                    "success. Returning.");
-      return retval;
-    }
-  }
-  if (!retval) {
-    if (log)
-      log->Printf("[FormatManager::GetSummaryFormat] Search failed. Giving "
-                  "hardcoded a chance.");
-    retval = GetHardcodedSummaryFormat(match_data);
-  }
-
-  if (match_data.GetTypeForCache() && (!retval || !retval->NonCacheable())) {
-    if (log)
-      log->Printf("[FormatManager::GetSummaryFormat] Caching %p for type %s",
-                  static_cast<void *>(retval.get()),
-                  match_data.GetTypeForCache().AsCString("<invalid>"));
-    m_format_cache.SetSummary(match_data.GetTypeForCache(), retval);
-  }
-  LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
-            m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
-  return retval;
-}
-
-lldb::SyntheticChildrenSP
-FormatManager::GetHardcodedSyntheticChildren(FormattersMatchData &match_data) {
-  SyntheticChildrenSP retval_sp;
-
-  for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
-    if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
-      if (lang_category->GetHardcoded(*this, match_data, retval_sp))
-        break;
-    }
-  }
-
-  return retval_sp;
+  return Get<lldb::TypeSummaryImplSP>(valobj, use_dynamic);
 }
 
 lldb::SyntheticChildrenSP
 FormatManager::GetSyntheticChildren(ValueObject &valobj,
                                     lldb::DynamicValueType use_dynamic) {
-  FormattersMatchData match_data(valobj, use_dynamic);
-
-  SyntheticChildrenSP retval;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
-  if (match_data.GetTypeForCache()) {
-    if (log)
-      log->Printf("\n\n[FormatManager::GetSyntheticChildren] Looking into "
-                  "cache for type %s",
-                  match_data.GetTypeForCache().AsCString("<invalid>"));
-    if (m_format_cache.GetSynthetic(match_data.GetTypeForCache(), retval)) {
-      if (log) {
-        log->Printf("[FormatManager::GetSyntheticChildren] Cache search "
-                    "success. Returning.");
-        LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
-                  m_format_cache.GetCacheHits(),
-                  m_format_cache.GetCacheMisses());
-      }
-      return retval;
-    }
-    if (log)
-      log->Printf("[FormatManager::GetSyntheticChildren] Cache search failed. "
-                  "Going normal route");
-  }
-
-  retval = m_categories_map.GetSyntheticChildren(match_data);
-  if (!retval) {
-    if (log)
-      log->Printf("[FormatManager::GetSyntheticChildren] Search failed. Giving "
-                  "language a chance.");
-    for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
-      if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
-        if (lang_category->Get(match_data, retval))
-          break;
-      }
-    }
-    if (retval) {
-      if (log)
-        log->Printf("[FormatManager::GetSyntheticChildren] Language search "
-                    "success. Returning.");
-      return retval;
-    }
-  }
-  if (!retval) {
-    if (log)
-      log->Printf("[FormatManager::GetSyntheticChildren] Search failed. Giving "
-                  "hardcoded a chance.");
-    retval = GetHardcodedSyntheticChildren(match_data);
-  }
-
-  if (match_data.GetTypeForCache() && (!retval || !retval->NonCacheable())) {
-    if (log)
-      log->Printf(
-          "[FormatManager::GetSyntheticChildren] Caching %p for type %s",
-          static_cast<void *>(retval.get()),
-          match_data.GetTypeForCache().AsCString("<invalid>"));
-    m_format_cache.SetSynthetic(match_data.GetTypeForCache(), retval);
-  }
-  LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
-            m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
-  return retval;
-}
-
-lldb::TypeValidatorImplSP
-FormatManager::GetValidator(ValueObject &valobj,
-                            lldb::DynamicValueType use_dynamic) {
-  FormattersMatchData match_data(valobj, use_dynamic);
-
-  TypeValidatorImplSP retval;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
-  if (match_data.GetTypeForCache()) {
-    if (log)
-      log->Printf(
-          "\n\n[FormatManager::GetValidator] Looking into cache for type %s",
-          match_data.GetTypeForCache().AsCString("<invalid>"));
-    if (m_format_cache.GetValidator(match_data.GetTypeForCache(), retval)) {
-      if (log) {
-        log->Printf(
-            "[FormatManager::GetValidator] Cache search success. Returning.");
-        LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
-                  m_format_cache.GetCacheHits(),
-                  m_format_cache.GetCacheMisses());
-      }
-      return retval;
-    }
-    if (log)
-      log->Printf("[FormatManager::GetValidator] Cache search failed. Going "
-                  "normal route");
-  }
-
-  retval = m_categories_map.GetValidator(match_data);
-  if (!retval) {
-    if (log)
-      log->Printf("[FormatManager::GetValidator] Search failed. Giving "
-                  "language a chance.");
-    for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
-      if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
-        if (lang_category->Get(match_data, retval))
-          break;
-      }
-    }
-    if (retval) {
-      if (log)
-        log->Printf("[FormatManager::GetValidator] Language search success. "
-                    "Returning.");
-      return retval;
-    }
-  }
-  if (!retval) {
-    if (log)
-      log->Printf("[FormatManager::GetValidator] Search failed. Giving "
-                  "hardcoded a chance.");
-    retval = GetHardcodedValidator(match_data);
-  }
-
-  if (match_data.GetTypeForCache() && (!retval || !retval->NonCacheable())) {
-    if (log)
-      log->Printf("[FormatManager::GetValidator] Caching %p for type %s",
-                  static_cast<void *>(retval.get()),
-                  match_data.GetTypeForCache().AsCString("<invalid>"));
-    m_format_cache.SetValidator(match_data.GetTypeForCache(), retval);
-  }
-  LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
-            m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
-  return retval;
-}
-
-lldb::TypeValidatorImplSP
-FormatManager::GetHardcodedValidator(FormattersMatchData &match_data) {
-  TypeValidatorImplSP retval_sp;
-
-  for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
-    if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
-      if (lang_category->GetHardcoded(*this, match_data, retval_sp))
-        break;
-    }
-  }
-
-  return retval_sp;
+  return Get<lldb::SyntheticChildrenSP>(valobj, use_dynamic);
 }
 
 FormatManager::FormatManager()
@@ -961,10 +737,7 @@
   lldb::TypeSummaryImplSP string_array_format(
       new StringSummaryFormat(string_array_flags, "${var%s}"));
 
-  lldb::RegularExpressionSP any_size_char_arr(
-      new RegularExpression(llvm::StringRef("char \\[[0-9]+\\]")));
-  lldb::RegularExpressionSP any_size_wchar_arr(
-      new RegularExpression(llvm::StringRef("wchar_t \\[[0-9]+\\]")));
+  RegularExpression any_size_char_arr(llvm::StringRef("char \\[[0-9]+\\]"));
 
   TypeCategoryImpl::SharedPointer sys_category_sp =
       GetCategory(m_system_category_name);
@@ -973,8 +746,8 @@
                                                     string_format);
   sys_category_sp->GetTypeSummariesContainer()->Add(
       ConstString("unsigned char *"), string_format);
-  sys_category_sp->GetRegexTypeSummariesContainer()->Add(any_size_char_arr,
-                                                         string_array_format);
+  sys_category_sp->GetRegexTypeSummariesContainer()->Add(
+      std::move(any_size_char_arr), string_array_format);
 
   lldb::TypeSummaryImplSP ostype_summary(
       new StringSummaryFormat(TypeSummaryImpl::Flags()
diff --git a/src/llvm-project/lldb/source/DataFormatters/FormattersHelpers.cpp b/src/llvm-project/lldb/source/DataFormatters/FormattersHelpers.cpp
index 8f007df..b2a5a17 100644
--- a/src/llvm-project/lldb/source/DataFormatters/FormattersHelpers.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/FormattersHelpers.cpp
@@ -29,10 +29,10 @@
 
   if (regex)
     category_sp->GetRegexTypeFormatsContainer()->Add(
-        RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
-        format_sp);
+        RegularExpression(type_name.GetStringRef()), format_sp);
   else
-    category_sp->GetTypeFormatsContainer()->Add(type_name, format_sp);
+    category_sp->GetTypeFormatsContainer()->Add(std::move(type_name),
+                                                format_sp);
 }
 
 void lldb_private::formatters::AddSummary(
@@ -40,10 +40,10 @@
     ConstString type_name, bool regex) {
   if (regex)
     category_sp->GetRegexTypeSummariesContainer()->Add(
-        RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
-        summary_sp);
+        RegularExpression(type_name.GetStringRef()), summary_sp);
   else
-    category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
+    category_sp->GetTypeSummariesContainer()->Add(std::move(type_name),
+                                                  summary_sp);
 }
 
 void lldb_private::formatters::AddStringSummary(
@@ -53,10 +53,10 @@
 
   if (regex)
     category_sp->GetRegexTypeSummariesContainer()->Add(
-        RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
-        summary_sp);
+        RegularExpression(type_name.GetStringRef()), summary_sp);
   else
-    category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
+    category_sp->GetTypeSummariesContainer()->Add(std::move(type_name),
+                                                  summary_sp);
 }
 
 void lldb_private::formatters::AddOneLineSummary(
@@ -67,10 +67,10 @@
 
   if (regex)
     category_sp->GetRegexTypeSummariesContainer()->Add(
-        RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
-        summary_sp);
+        RegularExpression(type_name.GetStringRef()), summary_sp);
   else
-    category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
+    category_sp->GetTypeSummariesContainer()->Add(std::move(type_name),
+                                                  summary_sp);
 }
 
 void lldb_private::formatters::AddCXXSummary(
@@ -81,10 +81,10 @@
       new CXXFunctionSummaryFormat(flags, funct, description));
   if (regex)
     category_sp->GetRegexTypeSummariesContainer()->Add(
-        RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
-        summary_sp);
+        RegularExpression(type_name.GetStringRef()), summary_sp);
   else
-    category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
+    category_sp->GetTypeSummariesContainer()->Add(std::move(type_name),
+                                                  summary_sp);
 }
 
 void lldb_private::formatters::AddCXXSynthetic(
@@ -96,10 +96,10 @@
       new CXXSyntheticChildren(flags, description, generator));
   if (regex)
     category_sp->GetRegexTypeSyntheticsContainer()->Add(
-        RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
-        synth_sp);
+        RegularExpression(type_name.GetStringRef()), synth_sp);
   else
-    category_sp->GetTypeSyntheticsContainer()->Add(type_name, synth_sp);
+    category_sp->GetTypeSyntheticsContainer()->Add(std::move(type_name),
+                                                   synth_sp);
 }
 
 void lldb_private::formatters::AddFilter(
@@ -111,10 +111,10 @@
     filter_sp->AddExpressionPath(child);
   if (regex)
     category_sp->GetRegexTypeFiltersContainer()->Add(
-        RegularExpressionSP(new RegularExpression(type_name.GetStringRef())),
-        filter_sp);
+        RegularExpression(type_name.GetStringRef()), filter_sp);
   else
-    category_sp->GetTypeFiltersContainer()->Add(type_name, filter_sp);
+    category_sp->GetTypeFiltersContainer()->Add(std::move(type_name),
+                                                filter_sp);
 }
 
 size_t lldb_private::formatters::ExtractIndexFromString(const char *item_name) {
diff --git a/src/llvm-project/lldb/source/DataFormatters/LanguageCategory.cpp b/src/llvm-project/lldb/source/DataFormatters/LanguageCategory.cpp
index 969b025..daf8c7a 100644
--- a/src/llvm-project/lldb/source/DataFormatters/LanguageCategory.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/LanguageCategory.cpp
@@ -14,7 +14,6 @@
 #include "lldb/DataFormatters/TypeFormat.h"
 #include "lldb/DataFormatters/TypeSummary.h"
 #include "lldb/DataFormatters/TypeSynthetic.h"
-#include "lldb/DataFormatters/TypeValidator.h"
 #include "lldb/Target/Language.h"
 
 using namespace lldb;
@@ -22,20 +21,19 @@
 
 LanguageCategory::LanguageCategory(lldb::LanguageType lang_type)
     : m_category_sp(), m_hardcoded_formats(), m_hardcoded_summaries(),
-      m_hardcoded_synthetics(), m_hardcoded_validators(), m_format_cache(),
-      m_enabled(false) {
+      m_hardcoded_synthetics(), m_format_cache(), m_enabled(false) {
   if (Language *language_plugin = Language::FindPlugin(lang_type)) {
     m_category_sp = language_plugin->GetFormatters();
     m_hardcoded_formats = language_plugin->GetHardcodedFormats();
     m_hardcoded_summaries = language_plugin->GetHardcodedSummaries();
     m_hardcoded_synthetics = language_plugin->GetHardcodedSynthetics();
-    m_hardcoded_validators = language_plugin->GetHardcodedValidators();
   }
   Enable();
 }
 
+template<typename ImplSP>
 bool LanguageCategory::Get(FormattersMatchData &match_data,
-                           lldb::TypeFormatImplSP &format_sp) {
+                           ImplSP &retval_sp) {
   if (!m_category_sp)
     return false;
 
@@ -43,168 +41,80 @@
     return false;
 
   if (match_data.GetTypeForCache()) {
-    if (m_format_cache.GetFormat(match_data.GetTypeForCache(), format_sp))
-      return format_sp.get() != nullptr;
+    if (m_format_cache.Get(match_data.GetTypeForCache(), retval_sp))
+      return (bool)retval_sp;
   }
 
   ValueObject &valobj(match_data.GetValueObject());
-  bool result =
-      m_category_sp->Get(valobj, match_data.GetMatchesVector(), format_sp);
+  bool result = m_category_sp->Get(valobj.GetObjectRuntimeLanguage(),
+                                   match_data.GetMatchesVector(), retval_sp);
   if (match_data.GetTypeForCache() &&
-      (!format_sp || !format_sp->NonCacheable())) {
-    m_format_cache.SetFormat(match_data.GetTypeForCache(), format_sp);
+      (!retval_sp || !retval_sp->NonCacheable())) {
+    m_format_cache.Set(match_data.GetTypeForCache(), retval_sp);
   }
   return result;
 }
 
-bool LanguageCategory::Get(FormattersMatchData &match_data,
-                           lldb::TypeSummaryImplSP &format_sp) {
-  if (!m_category_sp)
-    return false;
+namespace lldb_private {
 
-  if (!IsEnabled())
-    return false;
+/// Explicit instantiations for the three types.
+/// \{
+template bool
+LanguageCategory::Get<lldb::TypeFormatImplSP>(FormattersMatchData &,
+                                              lldb::TypeFormatImplSP &);
+template bool
+LanguageCategory::Get<lldb::TypeSummaryImplSP>(FormattersMatchData &,
+                                               lldb::TypeSummaryImplSP &);
+template bool
+LanguageCategory::Get<lldb::SyntheticChildrenSP>(FormattersMatchData &,
+                                                 lldb::SyntheticChildrenSP &);
+/// \}
 
-  if (match_data.GetTypeForCache()) {
-    if (m_format_cache.GetSummary(match_data.GetTypeForCache(), format_sp))
-      return format_sp.get() != nullptr;
-  }
-
-  ValueObject &valobj(match_data.GetValueObject());
-  bool result =
-      m_category_sp->Get(valobj, match_data.GetMatchesVector(), format_sp);
-  if (match_data.GetTypeForCache() &&
-      (!format_sp || !format_sp->NonCacheable())) {
-    m_format_cache.SetSummary(match_data.GetTypeForCache(), format_sp);
-  }
-  return result;
+template <>
+auto &LanguageCategory::GetHardcodedFinder<lldb::TypeFormatImplSP>() {
+  return m_hardcoded_formats;
 }
 
-bool LanguageCategory::Get(FormattersMatchData &match_data,
-                           lldb::SyntheticChildrenSP &format_sp) {
-  if (!m_category_sp)
-    return false;
-
-  if (!IsEnabled())
-    return false;
-
-  if (match_data.GetTypeForCache()) {
-    if (m_format_cache.GetSynthetic(match_data.GetTypeForCache(), format_sp))
-      return format_sp.get() != nullptr;
-  }
-
-  ValueObject &valobj(match_data.GetValueObject());
-  bool result =
-      m_category_sp->Get(valobj, match_data.GetMatchesVector(), format_sp);
-  if (match_data.GetTypeForCache() &&
-      (!format_sp || !format_sp->NonCacheable())) {
-    m_format_cache.SetSynthetic(match_data.GetTypeForCache(), format_sp);
-  }
-  return result;
+template <>
+auto &LanguageCategory::GetHardcodedFinder<lldb::TypeSummaryImplSP>() {
+  return m_hardcoded_summaries;
 }
 
-bool LanguageCategory::Get(FormattersMatchData &match_data,
-                           lldb::TypeValidatorImplSP &format_sp) {
-  if (!m_category_sp)
-    return false;
-
-  if (!IsEnabled())
-    return false;
-
-  if (match_data.GetTypeForCache()) {
-    if (m_format_cache.GetValidator(match_data.GetTypeForCache(), format_sp))
-      return format_sp.get() != nullptr;
-  }
-
-  ValueObject &valobj(match_data.GetValueObject());
-  bool result =
-      m_category_sp->Get(valobj, match_data.GetMatchesVector(), format_sp);
-  if (match_data.GetTypeForCache() &&
-      (!format_sp || !format_sp->NonCacheable())) {
-    m_format_cache.SetValidator(match_data.GetTypeForCache(), format_sp);
-  }
-  return result;
+template <>
+auto &LanguageCategory::GetHardcodedFinder<lldb::SyntheticChildrenSP>() {
+  return m_hardcoded_synthetics;
 }
 
+} // namespace lldb_private
+
+template <typename ImplSP>
 bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
                                     FormattersMatchData &match_data,
-                                    lldb::TypeFormatImplSP &format_sp) {
+                                    ImplSP &retval_sp) {
   if (!IsEnabled())
     return false;
 
   ValueObject &valobj(match_data.GetValueObject());
   lldb::DynamicValueType use_dynamic(match_data.GetDynamicValueType());
 
-  for (auto &candidate : m_hardcoded_formats) {
-    if ((format_sp = candidate(valobj, use_dynamic, fmt_mgr)))
+  for (auto &candidate : GetHardcodedFinder<ImplSP>()) {
+    if (auto result = candidate(valobj, use_dynamic, fmt_mgr)) {
+      retval_sp = result;
       break;
+    }
   }
-  if (match_data.GetTypeForCache() &&
-      (!format_sp || !format_sp->NonCacheable())) {
-    m_format_cache.SetFormat(match_data.GetTypeForCache(), format_sp);
-  }
-  return format_sp.get() != nullptr;
+  return (bool)retval_sp;
 }
 
-bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
-                                    FormattersMatchData &match_data,
-                                    lldb::TypeSummaryImplSP &format_sp) {
-  if (!IsEnabled())
-    return false;
-
-  ValueObject &valobj(match_data.GetValueObject());
-  lldb::DynamicValueType use_dynamic(match_data.GetDynamicValueType());
-
-  for (auto &candidate : m_hardcoded_summaries) {
-    if ((format_sp = candidate(valobj, use_dynamic, fmt_mgr)))
-      break;
-  }
-  if (match_data.GetTypeForCache() &&
-      (!format_sp || !format_sp->NonCacheable())) {
-    m_format_cache.SetSummary(match_data.GetTypeForCache(), format_sp);
-  }
-  return format_sp.get() != nullptr;
-}
-
-bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
-                                    FormattersMatchData &match_data,
-                                    lldb::SyntheticChildrenSP &format_sp) {
-  if (!IsEnabled())
-    return false;
-
-  ValueObject &valobj(match_data.GetValueObject());
-  lldb::DynamicValueType use_dynamic(match_data.GetDynamicValueType());
-
-  for (auto &candidate : m_hardcoded_synthetics) {
-    if ((format_sp = candidate(valobj, use_dynamic, fmt_mgr)))
-      break;
-  }
-  if (match_data.GetTypeForCache() &&
-      (!format_sp || !format_sp->NonCacheable())) {
-    m_format_cache.SetSynthetic(match_data.GetTypeForCache(), format_sp);
-  }
-  return format_sp.get() != nullptr;
-}
-
-bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
-                                    FormattersMatchData &match_data,
-                                    lldb::TypeValidatorImplSP &format_sp) {
-  if (!IsEnabled())
-    return false;
-
-  ValueObject &valobj(match_data.GetValueObject());
-  lldb::DynamicValueType use_dynamic(match_data.GetDynamicValueType());
-
-  for (auto &candidate : m_hardcoded_validators) {
-    if ((format_sp = candidate(valobj, use_dynamic, fmt_mgr)))
-      break;
-  }
-  if (match_data.GetTypeForCache() &&
-      (!format_sp || !format_sp->NonCacheable())) {
-    m_format_cache.SetValidator(match_data.GetTypeForCache(), format_sp);
-  }
-  return format_sp.get() != nullptr;
-}
+/// Explicit instantiations for the three types.
+/// \{
+template bool LanguageCategory::GetHardcoded<lldb::TypeFormatImplSP>(
+    FormatManager &, FormattersMatchData &, lldb::TypeFormatImplSP &);
+template bool LanguageCategory::GetHardcoded<lldb::TypeSummaryImplSP>(
+    FormatManager &, FormattersMatchData &, lldb::TypeSummaryImplSP &);
+template bool LanguageCategory::GetHardcoded<lldb::SyntheticChildrenSP>(
+    FormatManager &, FormattersMatchData &, lldb::SyntheticChildrenSP &);
+/// \}
 
 lldb::TypeCategoryImplSP LanguageCategory::GetCategory() const {
   return m_category_sp;
diff --git a/src/llvm-project/lldb/source/DataFormatters/TypeCategory.cpp b/src/llvm-project/lldb/source/DataFormatters/TypeCategory.cpp
index fed2dfb..8569969 100644
--- a/src/llvm-project/lldb/source/DataFormatters/TypeCategory.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/TypeCategory.cpp
@@ -13,18 +13,13 @@
 using namespace lldb;
 using namespace lldb_private;
 
-TypeCategoryImpl::TypeCategoryImpl(
-    IFormatChangeListener *clist, ConstString name,
-    std::initializer_list<lldb::LanguageType> langs)
+TypeCategoryImpl::TypeCategoryImpl(IFormatChangeListener *clist,
+                                   ConstString name)
     : m_format_cont("format", "regex-format", clist),
       m_summary_cont("summary", "regex-summary", clist),
       m_filter_cont("filter", "regex-filter", clist),
-      m_synth_cont("synth", "regex-synth", clist),
-      m_validator_cont("validator", "regex-validator", clist), m_enabled(false),
-      m_change_listener(clist), m_mutex(), m_name(name), m_languages() {
-  for (const lldb::LanguageType lang : langs)
-    AddLanguage(lang);
-}
+      m_synth_cont("synth", "regex-synth", clist), m_enabled(false),
+      m_change_listener(clist), m_mutex(), m_name(name), m_languages() {}
 
 static bool IsApplicable(lldb::LanguageType category_lang,
                          lldb::LanguageType valobj_lang) {
@@ -64,11 +59,10 @@
   }
 }
 
-bool TypeCategoryImpl::IsApplicable(ValueObject &valobj) {
-  lldb::LanguageType valobj_lang = valobj.GetObjectRuntimeLanguage();
+bool TypeCategoryImpl::IsApplicable(lldb::LanguageType lang) {
   for (size_t idx = 0; idx < GetNumLanguages(); idx++) {
     const lldb::LanguageType category_lang = GetLanguageAtIndex(idx);
-    if (::IsApplicable(category_lang, valobj_lang))
+    if (::IsApplicable(category_lang, lang))
       return true;
   }
   return false;
@@ -90,16 +84,10 @@
   m_languages.push_back(lang);
 }
 
-bool TypeCategoryImpl::HasLanguage(lldb::LanguageType lang) {
-  const auto iter = std::find(m_languages.begin(), m_languages.end(), lang),
-             end = m_languages.end();
-  return (iter != end);
-}
-
-bool TypeCategoryImpl::Get(ValueObject &valobj,
+bool TypeCategoryImpl::Get(lldb::LanguageType lang,
                            const FormattersMatchVector &candidates,
                            lldb::TypeFormatImplSP &entry, uint32_t *reason) {
-  if (!IsEnabled() || !IsApplicable(valobj))
+  if (!IsEnabled() || !IsApplicable(lang))
     return false;
   if (GetTypeFormatsContainer()->Get(candidates, entry, reason))
     return true;
@@ -109,10 +97,10 @@
   return regex;
 }
 
-bool TypeCategoryImpl::Get(ValueObject &valobj,
+bool TypeCategoryImpl::Get(lldb::LanguageType lang,
                            const FormattersMatchVector &candidates,
                            lldb::TypeSummaryImplSP &entry, uint32_t *reason) {
-  if (!IsEnabled() || !IsApplicable(valobj))
+  if (!IsEnabled() || !IsApplicable(lang))
     return false;
   if (GetTypeSummariesContainer()->Get(candidates, entry, reason))
     return true;
@@ -122,10 +110,10 @@
   return regex;
 }
 
-bool TypeCategoryImpl::Get(ValueObject &valobj,
+bool TypeCategoryImpl::Get(lldb::LanguageType lang,
                            const FormattersMatchVector &candidates,
                            lldb::SyntheticChildrenSP &entry, uint32_t *reason) {
-  if (!IsEnabled() || !IsApplicable(valobj))
+  if (!IsEnabled() || !IsApplicable(lang))
     return false;
   TypeFilterImpl::SharedPointer filter_sp;
   uint32_t reason_filter = 0;
@@ -169,20 +157,6 @@
   return false;
 }
 
-bool TypeCategoryImpl::Get(ValueObject &valobj,
-                           const FormattersMatchVector &candidates,
-                           lldb::TypeValidatorImplSP &entry, uint32_t *reason) {
-  if (!IsEnabled())
-    return false;
-  if (GetTypeValidatorsContainer()->Get(candidates, entry, reason))
-    return true;
-  bool regex =
-      GetRegexTypeValidatorsContainer()->Get(candidates, entry, reason);
-  if (regex && reason)
-    *reason |= lldb_private::eFormatterChoiceCriterionRegularExpressionSummary;
-  return regex;
-}
-
 void TypeCategoryImpl::Clear(FormatCategoryItems items) {
   if ((items & eFormatCategoryItemValue) == eFormatCategoryItemValue)
     GetTypeFormatsContainer()->Clear();
@@ -205,12 +179,6 @@
     GetTypeSyntheticsContainer()->Clear();
   if ((items & eFormatCategoryItemRegexSynth) == eFormatCategoryItemRegexSynth)
     GetRegexTypeSyntheticsContainer()->Clear();
-
-  if ((items & eFormatCategoryItemValidator) == eFormatCategoryItemValidator)
-    GetTypeValidatorsContainer()->Clear();
-  if ((items & eFormatCategoryItemRegexValidator) ==
-      eFormatCategoryItemRegexValidator)
-    GetRegexTypeValidatorsContainer()->Clear();
 }
 
 bool TypeCategoryImpl::Delete(ConstString name, FormatCategoryItems items) {
@@ -238,12 +206,6 @@
   if ((items & eFormatCategoryItemRegexSynth) == eFormatCategoryItemRegexSynth)
     success = GetRegexTypeSyntheticsContainer()->Delete(name) || success;
 
-  if ((items & eFormatCategoryItemValidator) == eFormatCategoryItemValidator)
-    success = GetTypeValidatorsContainer()->Delete(name) || success;
-  if ((items & eFormatCategoryItemRegexValidator) ==
-      eFormatCategoryItemRegexValidator)
-    success = GetRegexTypeValidatorsContainer()->Delete(name) || success;
-
   return success;
 }
 
@@ -272,12 +234,6 @@
   if ((items & eFormatCategoryItemRegexSynth) == eFormatCategoryItemRegexSynth)
     count += GetRegexTypeSyntheticsContainer()->GetCount();
 
-  if ((items & eFormatCategoryItemValidator) == eFormatCategoryItemValidator)
-    count += GetTypeValidatorsContainer()->GetCount();
-  if ((items & eFormatCategoryItemRegexValidator) ==
-      eFormatCategoryItemRegexValidator)
-    count += GetRegexTypeValidatorsContainer()->GetCount();
-
   return count;
 }
 
@@ -292,7 +248,6 @@
   lldb::TypeSummaryImplSP summary_sp;
   TypeFilterImpl::SharedPointer filter_sp;
   ScriptedSyntheticChildren::SharedPointer synth_sp;
-  TypeValidatorImpl::SharedPointer validator_sp;
 
   if ((items & eFormatCategoryItemValue) == eFormatCategoryItemValue) {
     if (GetTypeFormatsContainer()->Get(type_name, format_sp)) {
@@ -374,26 +329,6 @@
     }
   }
 
-  if ((items & eFormatCategoryItemValidator) == eFormatCategoryItemValidator) {
-    if (GetTypeValidatorsContainer()->Get(type_name, validator_sp)) {
-      if (matching_category)
-        *matching_category = m_name.GetCString();
-      if (matching_type)
-        *matching_type = eFormatCategoryItemValidator;
-      return true;
-    }
-  }
-  if ((items & eFormatCategoryItemRegexValidator) ==
-      eFormatCategoryItemRegexValidator) {
-    if (GetRegexTypeValidatorsContainer()->Get(type_name, validator_sp)) {
-      if (matching_category)
-        *matching_category = m_name.GetCString();
-      if (matching_type)
-        *matching_type = eFormatCategoryItemRegexValidator;
-      return true;
-    }
-  }
-
   return false;
 }
 
@@ -461,22 +396,6 @@
   return retval;
 }
 
-TypeCategoryImpl::ValidatorContainer::MapValueType
-TypeCategoryImpl::GetValidatorForType(lldb::TypeNameSpecifierImplSP type_sp) {
-  ValidatorContainer::MapValueType retval;
-
-  if (type_sp) {
-    if (type_sp->IsRegex())
-      GetRegexTypeValidatorsContainer()->GetExact(
-          ConstString(type_sp->GetName()), retval);
-    else
-      GetTypeValidatorsContainer()->GetExact(ConstString(type_sp->GetName()),
-                                             retval);
-  }
-
-  return retval;
-}
-
 lldb::TypeNameSpecifierImplSP
 TypeCategoryImpl::GetTypeNameSpecifierForSummaryAtIndex(size_t index) {
   if (index < GetTypeSummariesContainer()->GetCount())
@@ -549,24 +468,6 @@
         index - GetTypeSyntheticsContainer()->GetCount());
 }
 
-TypeCategoryImpl::ValidatorContainer::MapValueType
-TypeCategoryImpl::GetValidatorAtIndex(size_t index) {
-  if (index < GetTypeValidatorsContainer()->GetCount())
-    return GetTypeValidatorsContainer()->GetAtIndex(index);
-  else
-    return GetRegexTypeValidatorsContainer()->GetAtIndex(
-        index - GetTypeValidatorsContainer()->GetCount());
-}
-
-lldb::TypeNameSpecifierImplSP
-TypeCategoryImpl::GetTypeNameSpecifierForValidatorAtIndex(size_t index) {
-  if (index < GetTypeValidatorsContainer()->GetCount())
-    return GetTypeValidatorsContainer()->GetTypeNameSpecifierAtIndex(index);
-  else
-    return GetRegexTypeValidatorsContainer()->GetTypeNameSpecifierAtIndex(
-        index - GetTypeValidatorsContainer()->GetCount());
-}
-
 void TypeCategoryImpl::Enable(bool value, uint32_t position) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   if ((m_enabled = value))
diff --git a/src/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp b/src/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp
index 69757c9..ac51515 100644
--- a/src/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/TypeCategoryMap.cpp
@@ -169,8 +169,8 @@
   return false;
 }
 
-lldb::TypeFormatImplSP
-TypeCategoryMap::GetFormat(FormattersMatchData &match_data) {
+template <typename ImplSP>
+void TypeCategoryMap::Get(FormattersMatchData &match_data, ImplSP &retval) {
   std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
 
   uint32_t reason_why;
@@ -180,9 +180,10 @@
 
   if (log) {
     for (auto match : match_data.GetMatchesVector()) {
-      log->Printf(
-          "[CategoryMap::GetFormat] candidate match = %s %s %s %s reason = "
-          "%" PRIu32,
+      LLDB_LOGF(
+          log,
+          "[%s] candidate match = %s %s %s %s reason = %" PRIu32,
+          __FUNCTION__,
           match.GetTypeName().GetCString(),
           match.DidStripPointer() ? "strip-pointers" : "no-strip-pointers",
           match.DidStripReference() ? "strip-reference" : "no-strip-reference",
@@ -193,143 +194,31 @@
 
   for (begin = m_active_categories.begin(); begin != end; begin++) {
     lldb::TypeCategoryImplSP category_sp = *begin;
-    lldb::TypeFormatImplSP current_format;
-    if (log)
-      log->Printf("[TypeCategoryMap::GetFormat] Trying to use category %s",
-                  category_sp->GetName());
-    if (!category_sp->Get(match_data.GetValueObject(),
-                          match_data.GetMatchesVector(), current_format,
-                          &reason_why))
+    ImplSP current_format;
+    LLDB_LOGF(log, "[%s] Trying to use category %s", __FUNCTION__,
+              category_sp->GetName());
+    if (!category_sp->Get(
+            match_data.GetValueObject().GetObjectRuntimeLanguage(),
+            match_data.GetMatchesVector(), current_format, &reason_why))
       continue;
-    return current_format;
+
+    retval = std::move(current_format);
+    return;
   }
-  if (log)
-    log->Printf(
-        "[TypeCategoryMap::GetFormat] nothing found - returning empty SP");
-  return lldb::TypeFormatImplSP();
+  LLDB_LOGF(log, "[%s] nothing found - returning empty SP", __FUNCTION__);
 }
 
-lldb::TypeSummaryImplSP
-TypeCategoryMap::GetSummaryFormat(FormattersMatchData &match_data) {
-  std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
-
-  uint32_t reason_why;
-  ActiveCategoriesIterator begin, end = m_active_categories.end();
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
-
-  if (log) {
-    for (auto match : match_data.GetMatchesVector()) {
-      log->Printf(
-          "[CategoryMap::GetSummaryFormat] candidate match = %s %s %s %s "
-          "reason = %" PRIu32,
-          match.GetTypeName().GetCString(),
-          match.DidStripPointer() ? "strip-pointers" : "no-strip-pointers",
-          match.DidStripReference() ? "strip-reference" : "no-strip-reference",
-          match.DidStripTypedef() ? "strip-typedef" : "no-strip-typedef",
-          match.GetReason());
-    }
-  }
-
-  for (begin = m_active_categories.begin(); begin != end; begin++) {
-    lldb::TypeCategoryImplSP category_sp = *begin;
-    lldb::TypeSummaryImplSP current_format;
-    if (log)
-      log->Printf("[CategoryMap::GetSummaryFormat] Trying to use category %s",
-                  category_sp->GetName());
-    if (!category_sp->Get(match_data.GetValueObject(),
-                          match_data.GetMatchesVector(), current_format,
-                          &reason_why))
-      continue;
-    return current_format;
-  }
-  if (log)
-    log->Printf(
-        "[CategoryMap::GetSummaryFormat] nothing found - returning empty SP");
-  return lldb::TypeSummaryImplSP();
-}
-
-lldb::SyntheticChildrenSP
-TypeCategoryMap::GetSyntheticChildren(FormattersMatchData &match_data) {
-  std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
-
-  uint32_t reason_why;
-
-  ActiveCategoriesIterator begin, end = m_active_categories.end();
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
-
-  if (log) {
-    for (auto match : match_data.GetMatchesVector()) {
-      log->Printf(
-          "[CategoryMap::GetSyntheticChildren] candidate match = %s %s %s %s "
-          "reason = %" PRIu32,
-          match.GetTypeName().GetCString(),
-          match.DidStripPointer() ? "strip-pointers" : "no-strip-pointers",
-          match.DidStripReference() ? "strip-reference" : "no-strip-reference",
-          match.DidStripTypedef() ? "strip-typedef" : "no-strip-typedef",
-          match.GetReason());
-    }
-  }
-
-  for (begin = m_active_categories.begin(); begin != end; begin++) {
-    lldb::TypeCategoryImplSP category_sp = *begin;
-    lldb::SyntheticChildrenSP current_format;
-    if (log)
-      log->Printf(
-          "[CategoryMap::GetSyntheticChildren] Trying to use category %s",
-          category_sp->GetName());
-    if (!category_sp->Get(match_data.GetValueObject(),
-                          match_data.GetMatchesVector(), current_format,
-                          &reason_why))
-      continue;
-    return current_format;
-  }
-  if (log)
-    log->Printf("[CategoryMap::GetSyntheticChildren] nothing found - returning "
-                "empty SP");
-  return lldb::SyntheticChildrenSP();
-}
-
-lldb::TypeValidatorImplSP
-TypeCategoryMap::GetValidator(FormattersMatchData &match_data) {
-  std::lock_guard<std::recursive_mutex> guard(m_map_mutex);
-
-  uint32_t reason_why;
-  ActiveCategoriesIterator begin, end = m_active_categories.end();
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS));
-
-  if (log) {
-    for (auto match : match_data.GetMatchesVector()) {
-      log->Printf(
-          "[CategoryMap::GetValidator] candidate match = %s %s %s %s reason = "
-          "%" PRIu32,
-          match.GetTypeName().GetCString(),
-          match.DidStripPointer() ? "strip-pointers" : "no-strip-pointers",
-          match.DidStripReference() ? "strip-reference" : "no-strip-reference",
-          match.DidStripTypedef() ? "strip-typedef" : "no-strip-typedef",
-          match.GetReason());
-    }
-  }
-
-  for (begin = m_active_categories.begin(); begin != end; begin++) {
-    lldb::TypeCategoryImplSP category_sp = *begin;
-    lldb::TypeValidatorImplSP current_format;
-    if (log)
-      log->Printf("[CategoryMap::GetValidator] Trying to use category %s",
-                  category_sp->GetName());
-    if (!category_sp->Get(match_data.GetValueObject(),
-                          match_data.GetMatchesVector(), current_format,
-                          &reason_why))
-      continue;
-    return current_format;
-  }
-  if (log)
-    log->Printf(
-        "[CategoryMap::GetValidator] nothing found - returning empty SP");
-  return lldb::TypeValidatorImplSP();
-}
+/// Explicit instantiations for the three types.
+/// \{
+template void
+TypeCategoryMap::Get<lldb::TypeFormatImplSP>(FormattersMatchData &match_data,
+                                             lldb::TypeFormatImplSP &retval);
+template void
+TypeCategoryMap::Get<lldb::TypeSummaryImplSP>(FormattersMatchData &match_data,
+                                              lldb::TypeSummaryImplSP &retval);
+template void TypeCategoryMap::Get<lldb::SyntheticChildrenSP>(
+    FormattersMatchData &match_data, lldb::SyntheticChildrenSP &retval);
+/// \}
 
 void TypeCategoryMap::ForEach(ForEachCallback callback) {
   if (callback) {
diff --git a/src/llvm-project/lldb/source/DataFormatters/TypeFormat.cpp b/src/llvm-project/lldb/source/DataFormatters/TypeFormat.cpp
index b526e9a..b272c2e 100644
--- a/src/llvm-project/lldb/source/DataFormatters/TypeFormat.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/TypeFormat.cpp
@@ -164,7 +164,7 @@
     llvm::DenseSet<lldb_private::SymbolFile *> searched_symbol_files;
     images.FindTypes(nullptr, m_enum_type, false, UINT32_MAX,
                      searched_symbol_files, types);
-    if (types.GetSize() == 0)
+    if (types.Empty())
       return false;
     for (lldb::TypeSP type_sp : types.Types()) {
       if (!type_sp)
diff --git a/src/llvm-project/lldb/source/DataFormatters/TypeValidator.cpp b/src/llvm-project/lldb/source/DataFormatters/TypeValidator.cpp
deleted file mode 100644
index 5ce24ca..0000000
--- a/src/llvm-project/lldb/source/DataFormatters/TypeValidator.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- TypeValidator.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-
-
-
-#include "lldb/DataFormatters/TypeValidator.h"
-#include "lldb/Utility/StreamString.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-TypeValidatorImpl::TypeValidatorImpl(const Flags &flags)
-    : m_flags(flags), m_my_revision(0) {}
-
-TypeValidatorImpl::~TypeValidatorImpl() {}
-
-TypeValidatorImpl::ValidationResult TypeValidatorImpl::Success() {
-  return ValidationResult{TypeValidatorResult::Success, ""};
-}
-
-TypeValidatorImpl::ValidationResult
-TypeValidatorImpl::Failure(std::string message) {
-  return ValidationResult{TypeValidatorResult::Failure, message};
-}
-
-TypeValidatorImpl_CXX::TypeValidatorImpl_CXX(
-    ValidatorFunction f, std::string d, const TypeValidatorImpl::Flags &flags)
-    : TypeValidatorImpl(flags), m_description(d), m_validator_function(f) {}
-
-TypeValidatorImpl_CXX::~TypeValidatorImpl_CXX() {}
-
-TypeValidatorImpl::ValidationResult
-TypeValidatorImpl_CXX::FormatObject(ValueObject *valobj) const {
-  if (!valobj)
-    return Success(); // I guess there's nothing wrong with a null valueobject..
-
-  return m_validator_function(valobj);
-}
-
-std::string TypeValidatorImpl_CXX::GetDescription() {
-  StreamString sstr;
-  sstr.Printf("%s%s%s%s", m_description.c_str(),
-              Cascades() ? "" : " (not cascading)",
-              SkipsPointers() ? " (skip pointers)" : "",
-              SkipsReferences() ? " (skip references)" : "");
-  return sstr.GetString();
-}
diff --git a/src/llvm-project/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/src/llvm-project/lldb/source/DataFormatters/ValueObjectPrinter.cpp
index 409cffe..466cf39 100644
--- a/src/llvm-project/lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -75,8 +75,6 @@
     return false;
 
   if (ShouldPrintValueObject()) {
-    PrintValidationMarkerIfNeeded();
-
     PrintLocationIfNeeded();
     m_stream->Indent();
 
@@ -94,8 +92,6 @@
   else
     m_stream->EOL();
 
-  PrintValidationErrorIfNeeded();
-
   return true;
 }
 
@@ -456,7 +452,7 @@
         if (object_desc[object_end] == '\n')
             m_stream->Printf("%s", object_desc);
         else
-            m_stream->Printf("%s\n", object_desc);        
+            m_stream->Printf("%s\n", object_desc);
         return true;
       } else if (!value_printed && !summary_printed)
         return true;
@@ -751,34 +747,30 @@
 
 void ValueObjectPrinter::PrintChildrenIfNeeded(bool value_printed,
                                                bool summary_printed) {
-  // this flag controls whether we tried to display a description for this
-  // object and failed if that happens, we want to display the children, if any
+  // This flag controls whether we tried to display a description for this
+  // object and failed if that happens, we want to display the children if any.
   bool is_failed_description =
       !PrintObjectDescriptionIfNeeded(value_printed, summary_printed);
 
-  auto curr_ptr_depth = m_ptr_depth;
-  bool print_children =
+  DumpValueObjectOptions::PointerDepth curr_ptr_depth = m_ptr_depth;
+  const bool print_children =
       ShouldPrintChildren(is_failed_description, curr_ptr_depth);
-  bool print_oneline =
+  const bool print_oneline =
       (curr_ptr_depth.CanAllowExpansion() || m_options.m_show_types ||
        !m_options.m_allow_oneliner_mode || m_options.m_flat_output ||
        (m_options.m_pointer_as_array) || m_options.m_show_location)
           ? false
           : DataVisualization::ShouldPrintAsOneLiner(*m_valobj);
-  bool is_instance_ptr = IsInstancePointer();
-  uint64_t instance_ptr_value = LLDB_INVALID_ADDRESS;
-
-  if (print_children && is_instance_ptr) {
-    instance_ptr_value = m_valobj->GetValueAsUnsigned(0);
+  if (print_children && IsInstancePointer()) {
+    uint64_t instance_ptr_value = m_valobj->GetValueAsUnsigned(0);
     if (m_printed_instance_pointers->count(instance_ptr_value)) {
-      // we already printed this instance-is-pointer thing, so don't expand it
+      // We already printed this instance-is-pointer thing, so don't expand it.
       m_stream->PutCString(" {...}\n");
-
-      // we're done here - get out fast
       return;
-    } else
-      m_printed_instance_pointers->emplace(
-          instance_ptr_value); // remember this guy for future reference
+    } else {
+      // Remember this guy for future reference.
+      m_printed_instance_pointers->emplace(instance_ptr_value);
+    }
   }
 
   if (print_children) {
@@ -794,37 +786,3 @@
   } else
     m_stream->EOL();
 }
-
-bool ValueObjectPrinter::ShouldPrintValidation() {
-  return m_options.m_run_validator;
-}
-
-bool ValueObjectPrinter::PrintValidationMarkerIfNeeded() {
-  if (!ShouldPrintValidation())
-    return false;
-
-  m_validation = m_valobj->GetValidationStatus();
-
-  if (TypeValidatorResult::Failure == m_validation.first) {
-    m_stream->Printf("! ");
-    return true;
-  }
-
-  return false;
-}
-
-bool ValueObjectPrinter::PrintValidationErrorIfNeeded() {
-  if (!ShouldPrintValidation())
-    return false;
-
-  if (TypeValidatorResult::Success == m_validation.first)
-    return false;
-
-  if (m_validation.second.empty())
-    m_validation.second.assign("unknown error");
-
-  m_stream->Printf(" ! validation error: %s", m_validation.second.c_str());
-  m_stream->EOL();
-
-  return true;
-}
diff --git a/src/llvm-project/lldb/source/DataFormatters/VectorType.cpp b/src/llvm-project/lldb/source/DataFormatters/VectorType.cpp
index 18880f7..26fc03a 100644
--- a/src/llvm-project/lldb/source/DataFormatters/VectorType.cpp
+++ b/src/llvm-project/lldb/source/DataFormatters/VectorType.cpp
@@ -15,6 +15,7 @@
 #include "lldb/Target/Target.h"
 
 #include "lldb/Utility/LLDBAssert.h"
+#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -219,13 +220,20 @@
     CompilerType parent_type(m_backend.GetCompilerType());
     CompilerType element_type;
     parent_type.IsVectorType(&element_type, nullptr);
-    TargetSP target_sp(m_backend.GetTargetSP());
-    m_child_type = ::GetCompilerTypeForFormat(
-        m_parent_format, element_type,
-        target_sp
-            ? target_sp->GetScratchTypeSystemForLanguage(nullptr,
-                                                         lldb::eLanguageTypeC)
-            : nullptr);
+    TypeSystem *type_system = nullptr;
+    if (auto target_sp = m_backend.GetTargetSP()) {
+      auto type_system_or_err =
+          target_sp->GetScratchTypeSystemForLanguage(lldb::eLanguageTypeC);
+      if (auto err = type_system_or_err.takeError()) {
+        LLDB_LOG_ERROR(
+            lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS),
+            std::move(err), "Unable to update from scratch TypeSystem");
+      } else {
+        type_system = &type_system_or_err.get();
+      }
+    }
+    m_child_type =
+        ::GetCompilerTypeForFormat(m_parent_format, element_type, type_system);
     m_num_children = ::CalculateNumChildren(parent_type, m_child_type);
     m_item_format = GetItemFormatForFormat(m_parent_format, m_child_type);
     return false;
diff --git a/src/llvm-project/lldb/source/Expression/DWARFExpression.cpp b/src/llvm-project/lldb/source/Expression/DWARFExpression.cpp
index a9d3653..08cc70c 100644
--- a/src/llvm-project/lldb/source/Expression/DWARFExpression.cpp
+++ b/src/llvm-project/lldb/source/Expression/DWARFExpression.cpp
@@ -33,6 +33,7 @@
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/StackID.h"
+#include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 
 #include "Plugins/SymbolFile/DWARF/DWARFUnit.h"
@@ -46,25 +47,23 @@
   uint32_t index_size = dwarf_cu->GetAddressByteSize();
   dw_offset_t addr_base = dwarf_cu->GetAddrBase();
   lldb::offset_t offset = addr_base + index * index_size;
-  return dwarf_cu->GetSymbolFileDWARF()
-      .GetDWARFContext()
-      .getOrLoadAddrData()
-      .GetMaxU64(&offset, index_size);
+  const DWARFDataExtractor &data =
+      dwarf_cu->GetSymbolFileDWARF().GetDWARFContext().getOrLoadAddrData();
+  if (data.ValidOffsetForDataOfSize(offset, index_size))
+    return data.GetMaxU64_unchecked(&offset, index_size);
+  return LLDB_INVALID_ADDRESS;
 }
 
 // DWARFExpression constructor
 DWARFExpression::DWARFExpression()
     : m_module_wp(), m_data(), m_dwarf_cu(nullptr),
-      m_reg_kind(eRegisterKindDWARF), m_loclist_slide(LLDB_INVALID_ADDRESS) {}
+      m_reg_kind(eRegisterKindDWARF) {}
 
 DWARFExpression::DWARFExpression(lldb::ModuleSP module_sp,
                                  const DataExtractor &data,
-                                 const DWARFUnit *dwarf_cu,
-                                 lldb::offset_t data_offset,
-                                 lldb::offset_t data_length)
-    : m_module_wp(), m_data(data, data_offset, data_length),
-      m_dwarf_cu(dwarf_cu), m_reg_kind(eRegisterKindDWARF),
-      m_loclist_slide(LLDB_INVALID_ADDRESS) {
+                                 const DWARFUnit *dwarf_cu)
+    : m_module_wp(), m_data(data), m_dwarf_cu(dwarf_cu),
+      m_reg_kind(eRegisterKindDWARF) {
   if (module_sp)
     m_module_wp = module_sp;
 }
@@ -86,395 +85,18 @@
   m_data.SetAddressByteSize(addr_byte_size);
 }
 
-void DWARFExpression::DumpLocation(Stream *s, lldb::offset_t offset,
-                                   lldb::offset_t length,
+void DWARFExpression::DumpLocation(Stream *s, const DataExtractor &data,
                                    lldb::DescriptionLevel level,
                                    ABI *abi) const {
-  if (!m_data.ValidOffsetForDataOfSize(offset, length))
-    return;
-  const lldb::offset_t start_offset = offset;
-  const lldb::offset_t end_offset = offset + length;
-  while (m_data.ValidOffset(offset) && offset < end_offset) {
-    const lldb::offset_t op_offset = offset;
-    const uint8_t op = m_data.GetU8(&offset);
-
-    switch (level) {
-    default:
-      break;
-
-    case lldb::eDescriptionLevelBrief:
-      if (op_offset > start_offset)
-        s->PutChar(' ');
-      break;
-
-    case lldb::eDescriptionLevelFull:
-    case lldb::eDescriptionLevelVerbose:
-      if (op_offset > start_offset)
-        s->EOL();
-      s->Indent();
-      if (level == lldb::eDescriptionLevelFull)
-        break;
-      // Fall through for verbose and print offset and DW_OP prefix..
-      s->Printf("0x%8.8" PRIx64 ": %s", op_offset,
-                op >= DW_OP_APPLE_uninit ? "DW_OP_APPLE_" : "DW_OP_");
-      break;
-    }
-
-    switch (op) {
-    case DW_OP_addr:
-      *s << "DW_OP_addr(" << m_data.GetAddress(&offset) << ") ";
-      break; // 0x03 1 address
-    case DW_OP_deref:
-      *s << "DW_OP_deref";
-      break; // 0x06
-    case DW_OP_const1u:
-      s->Printf("DW_OP_const1u(0x%2.2x)", m_data.GetU8(&offset));
-      break; // 0x08 1 1-byte constant
-    case DW_OP_const1s:
-      s->Printf("DW_OP_const1s(0x%2.2x)", m_data.GetU8(&offset));
-      break; // 0x09 1 1-byte constant
-    case DW_OP_const2u:
-      s->Printf("DW_OP_const2u(0x%4.4x)", m_data.GetU16(&offset));
-      break; // 0x0a 1 2-byte constant
-    case DW_OP_const2s:
-      s->Printf("DW_OP_const2s(0x%4.4x)", m_data.GetU16(&offset));
-      break; // 0x0b 1 2-byte constant
-    case DW_OP_const4u:
-      s->Printf("DW_OP_const4u(0x%8.8x)", m_data.GetU32(&offset));
-      break; // 0x0c 1 4-byte constant
-    case DW_OP_const4s:
-      s->Printf("DW_OP_const4s(0x%8.8x)", m_data.GetU32(&offset));
-      break; // 0x0d 1 4-byte constant
-    case DW_OP_const8u:
-      s->Printf("DW_OP_const8u(0x%16.16" PRIx64 ")", m_data.GetU64(&offset));
-      break; // 0x0e 1 8-byte constant
-    case DW_OP_const8s:
-      s->Printf("DW_OP_const8s(0x%16.16" PRIx64 ")", m_data.GetU64(&offset));
-      break; // 0x0f 1 8-byte constant
-    case DW_OP_constu:
-      s->Printf("DW_OP_constu(0x%" PRIx64 ")", m_data.GetULEB128(&offset));
-      break; // 0x10 1 ULEB128 constant
-    case DW_OP_consts:
-      s->Printf("DW_OP_consts(0x%" PRId64 ")", m_data.GetSLEB128(&offset));
-      break; // 0x11 1 SLEB128 constant
-    case DW_OP_dup:
-      s->PutCString("DW_OP_dup");
-      break; // 0x12
-    case DW_OP_drop:
-      s->PutCString("DW_OP_drop");
-      break; // 0x13
-    case DW_OP_over:
-      s->PutCString("DW_OP_over");
-      break; // 0x14
-    case DW_OP_pick:
-      s->Printf("DW_OP_pick(0x%2.2x)", m_data.GetU8(&offset));
-      break; // 0x15 1 1-byte stack index
-    case DW_OP_swap:
-      s->PutCString("DW_OP_swap");
-      break; // 0x16
-    case DW_OP_rot:
-      s->PutCString("DW_OP_rot");
-      break; // 0x17
-    case DW_OP_xderef:
-      s->PutCString("DW_OP_xderef");
-      break; // 0x18
-    case DW_OP_abs:
-      s->PutCString("DW_OP_abs");
-      break; // 0x19
-    case DW_OP_and:
-      s->PutCString("DW_OP_and");
-      break; // 0x1a
-    case DW_OP_div:
-      s->PutCString("DW_OP_div");
-      break; // 0x1b
-    case DW_OP_minus:
-      s->PutCString("DW_OP_minus");
-      break; // 0x1c
-    case DW_OP_mod:
-      s->PutCString("DW_OP_mod");
-      break; // 0x1d
-    case DW_OP_mul:
-      s->PutCString("DW_OP_mul");
-      break; // 0x1e
-    case DW_OP_neg:
-      s->PutCString("DW_OP_neg");
-      break; // 0x1f
-    case DW_OP_not:
-      s->PutCString("DW_OP_not");
-      break; // 0x20
-    case DW_OP_or:
-      s->PutCString("DW_OP_or");
-      break; // 0x21
-    case DW_OP_plus:
-      s->PutCString("DW_OP_plus");
-      break;                // 0x22
-    case DW_OP_plus_uconst: // 0x23 1 ULEB128 addend
-      s->Printf("DW_OP_plus_uconst(0x%" PRIx64 ")",
-                m_data.GetULEB128(&offset));
-      break;
-
-    case DW_OP_shl:
-      s->PutCString("DW_OP_shl");
-      break; // 0x24
-    case DW_OP_shr:
-      s->PutCString("DW_OP_shr");
-      break; // 0x25
-    case DW_OP_shra:
-      s->PutCString("DW_OP_shra");
-      break; // 0x26
-    case DW_OP_xor:
-      s->PutCString("DW_OP_xor");
-      break; // 0x27
-    case DW_OP_skip:
-      s->Printf("DW_OP_skip(0x%4.4x)", m_data.GetU16(&offset));
-      break; // 0x2f 1 signed 2-byte constant
-    case DW_OP_bra:
-      s->Printf("DW_OP_bra(0x%4.4x)", m_data.GetU16(&offset));
-      break; // 0x28 1 signed 2-byte constant
-    case DW_OP_eq:
-      s->PutCString("DW_OP_eq");
-      break; // 0x29
-    case DW_OP_ge:
-      s->PutCString("DW_OP_ge");
-      break; // 0x2a
-    case DW_OP_gt:
-      s->PutCString("DW_OP_gt");
-      break; // 0x2b
-    case DW_OP_le:
-      s->PutCString("DW_OP_le");
-      break; // 0x2c
-    case DW_OP_lt:
-      s->PutCString("DW_OP_lt");
-      break; // 0x2d
-    case DW_OP_ne:
-      s->PutCString("DW_OP_ne");
-      break; // 0x2e
-
-    case DW_OP_lit0:  // 0x30
-    case DW_OP_lit1:  // 0x31
-    case DW_OP_lit2:  // 0x32
-    case DW_OP_lit3:  // 0x33
-    case DW_OP_lit4:  // 0x34
-    case DW_OP_lit5:  // 0x35
-    case DW_OP_lit6:  // 0x36
-    case DW_OP_lit7:  // 0x37
-    case DW_OP_lit8:  // 0x38
-    case DW_OP_lit9:  // 0x39
-    case DW_OP_lit10: // 0x3A
-    case DW_OP_lit11: // 0x3B
-    case DW_OP_lit12: // 0x3C
-    case DW_OP_lit13: // 0x3D
-    case DW_OP_lit14: // 0x3E
-    case DW_OP_lit15: // 0x3F
-    case DW_OP_lit16: // 0x40
-    case DW_OP_lit17: // 0x41
-    case DW_OP_lit18: // 0x42
-    case DW_OP_lit19: // 0x43
-    case DW_OP_lit20: // 0x44
-    case DW_OP_lit21: // 0x45
-    case DW_OP_lit22: // 0x46
-    case DW_OP_lit23: // 0x47
-    case DW_OP_lit24: // 0x48
-    case DW_OP_lit25: // 0x49
-    case DW_OP_lit26: // 0x4A
-    case DW_OP_lit27: // 0x4B
-    case DW_OP_lit28: // 0x4C
-    case DW_OP_lit29: // 0x4D
-    case DW_OP_lit30: // 0x4E
-    case DW_OP_lit31:
-      s->Printf("DW_OP_lit%i", op - DW_OP_lit0);
-      break; // 0x4f
-
-    case DW_OP_reg0:  // 0x50
-    case DW_OP_reg1:  // 0x51
-    case DW_OP_reg2:  // 0x52
-    case DW_OP_reg3:  // 0x53
-    case DW_OP_reg4:  // 0x54
-    case DW_OP_reg5:  // 0x55
-    case DW_OP_reg6:  // 0x56
-    case DW_OP_reg7:  // 0x57
-    case DW_OP_reg8:  // 0x58
-    case DW_OP_reg9:  // 0x59
-    case DW_OP_reg10: // 0x5A
-    case DW_OP_reg11: // 0x5B
-    case DW_OP_reg12: // 0x5C
-    case DW_OP_reg13: // 0x5D
-    case DW_OP_reg14: // 0x5E
-    case DW_OP_reg15: // 0x5F
-    case DW_OP_reg16: // 0x60
-    case DW_OP_reg17: // 0x61
-    case DW_OP_reg18: // 0x62
-    case DW_OP_reg19: // 0x63
-    case DW_OP_reg20: // 0x64
-    case DW_OP_reg21: // 0x65
-    case DW_OP_reg22: // 0x66
-    case DW_OP_reg23: // 0x67
-    case DW_OP_reg24: // 0x68
-    case DW_OP_reg25: // 0x69
-    case DW_OP_reg26: // 0x6A
-    case DW_OP_reg27: // 0x6B
-    case DW_OP_reg28: // 0x6C
-    case DW_OP_reg29: // 0x6D
-    case DW_OP_reg30: // 0x6E
-    case DW_OP_reg31: // 0x6F
-    {
-      uint32_t reg_num = op - DW_OP_reg0;
-      if (abi) {
-        RegisterInfo reg_info;
-        if (abi->GetRegisterInfoByKind(m_reg_kind, reg_num, reg_info)) {
-          if (reg_info.name) {
-            s->PutCString(reg_info.name);
-            break;
-          } else if (reg_info.alt_name) {
-            s->PutCString(reg_info.alt_name);
-            break;
-          }
-        }
-      }
-      s->Printf("DW_OP_reg%u", reg_num);
-      break;
-    } break;
-
-    case DW_OP_breg0:
-    case DW_OP_breg1:
-    case DW_OP_breg2:
-    case DW_OP_breg3:
-    case DW_OP_breg4:
-    case DW_OP_breg5:
-    case DW_OP_breg6:
-    case DW_OP_breg7:
-    case DW_OP_breg8:
-    case DW_OP_breg9:
-    case DW_OP_breg10:
-    case DW_OP_breg11:
-    case DW_OP_breg12:
-    case DW_OP_breg13:
-    case DW_OP_breg14:
-    case DW_OP_breg15:
-    case DW_OP_breg16:
-    case DW_OP_breg17:
-    case DW_OP_breg18:
-    case DW_OP_breg19:
-    case DW_OP_breg20:
-    case DW_OP_breg21:
-    case DW_OP_breg22:
-    case DW_OP_breg23:
-    case DW_OP_breg24:
-    case DW_OP_breg25:
-    case DW_OP_breg26:
-    case DW_OP_breg27:
-    case DW_OP_breg28:
-    case DW_OP_breg29:
-    case DW_OP_breg30:
-    case DW_OP_breg31: {
-      uint32_t reg_num = op - DW_OP_breg0;
-      int64_t reg_offset = m_data.GetSLEB128(&offset);
-      if (abi) {
-        RegisterInfo reg_info;
-        if (abi->GetRegisterInfoByKind(m_reg_kind, reg_num, reg_info)) {
-          if (reg_info.name) {
-            s->Printf("[%s%+" PRIi64 "]", reg_info.name, reg_offset);
-            break;
-          } else if (reg_info.alt_name) {
-            s->Printf("[%s%+" PRIi64 "]", reg_info.alt_name, reg_offset);
-            break;
-          }
-        }
-      }
-      s->Printf("DW_OP_breg%i(0x%" PRIx64 ")", reg_num, reg_offset);
-    } break;
-
-    case DW_OP_regx: // 0x90 1 ULEB128 register
-    {
-      uint32_t reg_num = m_data.GetULEB128(&offset);
-      if (abi) {
-        RegisterInfo reg_info;
-        if (abi->GetRegisterInfoByKind(m_reg_kind, reg_num, reg_info)) {
-          if (reg_info.name) {
-            s->PutCString(reg_info.name);
-            break;
-          } else if (reg_info.alt_name) {
-            s->PutCString(reg_info.alt_name);
-            break;
-          }
-        }
-      }
-      s->Printf("DW_OP_regx(%" PRIu32 ")", reg_num);
-      break;
-    } break;
-    case DW_OP_fbreg: // 0x91 1 SLEB128 offset
-      s->Printf("DW_OP_fbreg(%" PRIi64 ")", m_data.GetSLEB128(&offset));
-      break;
-    case DW_OP_bregx: // 0x92 2 ULEB128 register followed by SLEB128 offset
-    {
-      uint32_t reg_num = m_data.GetULEB128(&offset);
-      int64_t reg_offset = m_data.GetSLEB128(&offset);
-      if (abi) {
-        RegisterInfo reg_info;
-        if (abi->GetRegisterInfoByKind(m_reg_kind, reg_num, reg_info)) {
-          if (reg_info.name) {
-            s->Printf("[%s%+" PRIi64 "]", reg_info.name, reg_offset);
-            break;
-          } else if (reg_info.alt_name) {
-            s->Printf("[%s%+" PRIi64 "]", reg_info.alt_name, reg_offset);
-            break;
-          }
-        }
-      }
-      s->Printf("DW_OP_bregx(reg=%" PRIu32 ",offset=%" PRIi64 ")", reg_num,
-                reg_offset);
-    } break;
-    case DW_OP_piece: // 0x93 1 ULEB128 size of piece addressed
-      s->Printf("DW_OP_piece(0x%" PRIx64 ")", m_data.GetULEB128(&offset));
-      break;
-    case DW_OP_deref_size: // 0x94 1 1-byte size of data retrieved
-      s->Printf("DW_OP_deref_size(0x%2.2x)", m_data.GetU8(&offset));
-      break;
-    case DW_OP_xderef_size: // 0x95 1 1-byte size of data retrieved
-      s->Printf("DW_OP_xderef_size(0x%2.2x)", m_data.GetU8(&offset));
-      break;
-    case DW_OP_nop:
-      s->PutCString("DW_OP_nop");
-      break; // 0x96
-    case DW_OP_push_object_address:
-      s->PutCString("DW_OP_push_object_address");
-      break;          // 0x97 DWARF3
-    case DW_OP_call2: // 0x98 DWARF3 1 2-byte offset of DIE
-      s->Printf("DW_OP_call2(0x%4.4x)", m_data.GetU16(&offset));
-      break;
-    case DW_OP_call4: // 0x99 DWARF3 1 4-byte offset of DIE
-      s->Printf("DW_OP_call4(0x%8.8x)", m_data.GetU32(&offset));
-      break;
-    case DW_OP_call_ref: // 0x9a DWARF3 1 4- or 8-byte offset of DIE
-      s->Printf("DW_OP_call_ref(0x%8.8" PRIx64 ")", m_data.GetAddress(&offset));
-      break;
-    case DW_OP_form_tls_address:
-      s->PutCString("DW_OP_form_tls_address"); // 0x9b
-      break;
-    case DW_OP_GNU_addr_index: // 0xfb
-      s->Printf("DW_OP_GNU_addr_index(0x%" PRIx64 ")",
-                m_data.GetULEB128(&offset));
-      break;
-    case DW_OP_addrx:
-      s->Printf("DW_OP_addrx(0x%" PRIx64 ")",
-                m_data.GetULEB128(&offset));
-      break;
-    case DW_OP_GNU_const_index: // 0xfc
-      s->Printf("DW_OP_GNU_const_index(0x%" PRIx64 ")",
-                m_data.GetULEB128(&offset));
-      break;
-    case DW_OP_GNU_push_tls_address:
-      s->PutCString("DW_OP_GNU_push_tls_address"); // 0xe0
-      break;
-    case DW_OP_APPLE_uninit:
-      s->PutCString("DW_OP_APPLE_uninit"); // 0xF0
-      break;
-    }
-  }
+  llvm::DWARFExpression(data.GetAsLLVM(), llvm::dwarf::DWARF_VERSION,
+                        data.GetAddressByteSize())
+      .print(s->AsRawOstream(), abi ? &abi->GetMCRegisterInfo() : nullptr,
+             nullptr);
 }
 
-void DWARFExpression::SetLocationListSlide(addr_t slide) {
-  m_loclist_slide = slide;
+void DWARFExpression::SetLocationListAddresses(addr_t cu_file_addr,
+                                               addr_t func_file_addr) {
+  m_loclist_addresses = LoclistAddresses{cu_file_addr, func_file_addr};
 }
 
 int DWARFExpression::GetRegisterKind() { return m_reg_kind; }
@@ -484,7 +106,26 @@
 }
 
 bool DWARFExpression::IsLocationList() const {
-  return m_loclist_slide != LLDB_INVALID_ADDRESS;
+  return bool(m_loclist_addresses);
+}
+
+namespace {
+/// Implement enough of the DWARFObject interface in order to be able to call
+/// DWARFLocationTable::dumpLocationList. We don't have access to a real
+/// DWARFObject here because DWARFExpression is used in non-DWARF scenarios too.
+class DummyDWARFObject final: public llvm::DWARFObject {
+public:
+  DummyDWARFObject(bool IsLittleEndian) : IsLittleEndian(IsLittleEndian) {}
+
+  bool isLittleEndian() const override { return IsLittleEndian; }
+
+  llvm::Optional<llvm::RelocAddrEntry> find(const llvm::DWARFSection &Sec,
+                                            uint64_t Pos) const override {
+    return llvm::None;
+  }
+private:
+  bool IsLittleEndian;
+};
 }
 
 void DWARFExpression::GetDescription(Stream *s, lldb::DescriptionLevel level,
@@ -493,47 +134,19 @@
   if (IsLocationList()) {
     // We have a location list
     lldb::offset_t offset = 0;
-    uint32_t count = 0;
-    addr_t curr_base_addr = location_list_base_addr;
-    while (m_data.ValidOffset(offset)) {
-      addr_t begin_addr_offset = LLDB_INVALID_ADDRESS;
-      addr_t end_addr_offset = LLDB_INVALID_ADDRESS;
-      if (!AddressRangeForLocationListEntry(m_dwarf_cu, m_data, &offset,
-                                            begin_addr_offset, end_addr_offset))
-        break;
+    std::unique_ptr<llvm::DWARFLocationTable> loctable_up =
+        m_dwarf_cu->GetLocationTable(m_data);
 
-      if (begin_addr_offset == 0 && end_addr_offset == 0)
-        break;
+    llvm::MCRegisterInfo *MRI = abi ? &abi->GetMCRegisterInfo() : nullptr;
 
-      if (begin_addr_offset < end_addr_offset) {
-        if (count > 0)
-          s->PutCString(", ");
-        VMRange addr_range(curr_base_addr + begin_addr_offset,
-                           curr_base_addr + end_addr_offset);
-        addr_range.Dump(s, 0, 8);
-        s->PutChar('{');
-        lldb::offset_t location_length = m_data.GetU16(&offset);
-        DumpLocation(s, offset, location_length, level, abi);
-        s->PutChar('}');
-        offset += location_length;
-      } else {
-        if ((m_data.GetAddressByteSize() == 4 &&
-             (begin_addr_offset == UINT32_MAX)) ||
-            (m_data.GetAddressByteSize() == 8 &&
-             (begin_addr_offset == UINT64_MAX))) {
-          curr_base_addr = end_addr_offset + location_list_base_addr;
-          // We have a new base address
-          if (count > 0)
-            s->PutCString(", ");
-          *s << "base_addr = " << end_addr_offset;
-        }
-      }
-
-      count++;
-    }
+    loctable_up->dumpLocationList(
+        &offset, s->AsRawOstream(),
+        llvm::object::SectionedAddress{m_loclist_addresses->cu_file_addr}, MRI,
+        DummyDWARFObject(m_data.GetByteOrder() == eByteOrderLittle), nullptr,
+        llvm::DIDumpOptions(), s->GetIndentLevel() + 2);
   } else {
     // We have a normal location that contains DW_OP location opcodes
-    DumpLocation(s, 0, m_data.GetByteSize(), level, abi);
+    DumpLocation(s, m_data, level, abi);
   }
 }
 
@@ -583,6 +196,8 @@
   return false;
 }
 
+/// Return the length in bytes of the set of operands for \p op. No guarantees
+/// are made on the state of \p data after this call.
 static offset_t GetOpcodeDataSize(const DataExtractor &data,
                                   const lldb::offset_t data_offset,
                                   const uint8_t op) {
@@ -779,6 +394,12 @@
     return offset - data_offset;
   }
 
+  case DW_OP_entry_value: // 0xa3 ULEB128 size + variable-length block
+  {
+    uint64_t subexpr_len = data.GetULEB128(&offset);
+    return (offset - data_offset) + subexpr_len;
+  }
+
   default:
     break;
   }
@@ -848,7 +469,7 @@
                           m_data.GetByteOrder(), addr_byte_size);
 
       // Replace the address in the new buffer
-      if (encoder.PutMaxU64(offset, addr_byte_size, file_addr) == UINT32_MAX)
+      if (encoder.PutUnsigned(offset, addr_byte_size, file_addr) == UINT32_MAX)
         return false;
 
       // All went well, so now we can reset the data using a shared pointer to
@@ -954,8 +575,8 @@
         if (linked_file_addr == LLDB_INVALID_ADDRESS)
           return false;
         // Replace the address in the new buffer
-        if (encoder.PutMaxU64(const_offset, const_byte_size,
-                              linked_file_addr) == UINT32_MAX)
+        if (encoder.PutUnsigned(const_offset, const_byte_size,
+                                linked_file_addr) == UINT32_MAX)
           return false;
       }
       break;
@@ -985,95 +606,243 @@
   return true;
 }
 
-bool DWARFExpression::LocationListContainsAddress(
-    lldb::addr_t loclist_base_addr, lldb::addr_t addr) const {
-  if (addr == LLDB_INVALID_ADDRESS)
+bool DWARFExpression::LocationListContainsAddress(addr_t func_load_addr,
+                                                  lldb::addr_t addr) const {
+  if (func_load_addr == LLDB_INVALID_ADDRESS || addr == LLDB_INVALID_ADDRESS)
     return false;
 
-  if (IsLocationList()) {
-    lldb::offset_t offset = 0;
+  if (!IsLocationList())
+    return false;
 
-    if (loclist_base_addr == LLDB_INVALID_ADDRESS)
-      return false;
-
-    while (m_data.ValidOffset(offset)) {
-      // We need to figure out what the value is for the location.
-      addr_t lo_pc = LLDB_INVALID_ADDRESS;
-      addr_t hi_pc = LLDB_INVALID_ADDRESS;
-      if (!AddressRangeForLocationListEntry(m_dwarf_cu, m_data, &offset, lo_pc,
-                                            hi_pc))
-        break;
-
-      if (lo_pc == 0 && hi_pc == 0)
-        break;
-
-      lo_pc += loclist_base_addr - m_loclist_slide;
-      hi_pc += loclist_base_addr - m_loclist_slide;
-
-      if (lo_pc <= addr && addr < hi_pc)
-        return true;
-
-      offset += m_data.GetU16(&offset);
-    }
-  }
-  return false;
-}
-
-bool DWARFExpression::GetLocation(addr_t base_addr, addr_t pc,
-                                  lldb::offset_t &offset,
-                                  lldb::offset_t &length) {
-  offset = 0;
-  if (!IsLocationList()) {
-    length = m_data.GetByteSize();
-    return true;
-  }
-
-  if (base_addr != LLDB_INVALID_ADDRESS && pc != LLDB_INVALID_ADDRESS) {
-    addr_t curr_base_addr = base_addr;
-
-    while (m_data.ValidOffset(offset)) {
-      // We need to figure out what the value is for the location.
-      addr_t lo_pc = LLDB_INVALID_ADDRESS;
-      addr_t hi_pc = LLDB_INVALID_ADDRESS;
-      if (!AddressRangeForLocationListEntry(m_dwarf_cu, m_data, &offset, lo_pc,
-                                            hi_pc))
-        break;
-
-      if (lo_pc == 0 && hi_pc == 0)
-        break;
-
-      lo_pc += curr_base_addr - m_loclist_slide;
-      hi_pc += curr_base_addr - m_loclist_slide;
-
-      length = m_data.GetU16(&offset);
-
-      if (length > 0 && lo_pc <= pc && pc < hi_pc)
-        return true;
-
-      offset += length;
-    }
-  }
-  offset = LLDB_INVALID_OFFSET;
-  length = 0;
-  return false;
+  return GetLocationExpression(func_load_addr, addr) != llvm::None;
 }
 
 bool DWARFExpression::DumpLocationForAddress(Stream *s,
                                              lldb::DescriptionLevel level,
-                                             addr_t base_addr, addr_t address,
-                                             ABI *abi) {
-  lldb::offset_t offset = 0;
-  lldb::offset_t length = 0;
-
-  if (GetLocation(base_addr, address, offset, length)) {
-    if (length > 0) {
-      DumpLocation(s, offset, length, level, abi);
-      return true;
-    }
+                                             addr_t func_load_addr,
+                                             addr_t address, ABI *abi) {
+  if (!IsLocationList()) {
+    DumpLocation(s, m_data, level, abi);
+    return true;
+  }
+  if (llvm::Optional<DataExtractor> expr =
+          GetLocationExpression(func_load_addr, address)) {
+    DumpLocation(s, *expr, level, abi);
+    return true;
   }
   return false;
 }
 
+static bool Evaluate_DW_OP_entry_value(std::vector<Value> &stack,
+                                       ExecutionContext *exe_ctx,
+                                       RegisterContext *reg_ctx,
+                                       const DataExtractor &opcodes,
+                                       lldb::offset_t &opcode_offset,
+                                       Status *error_ptr, Log *log) {
+  // DW_OP_entry_value(sub-expr) describes the location a variable had upon
+  // function entry: this variable location is presumed to be optimized out at
+  // the current PC value.  The caller of the function may have call site
+  // information that describes an alternate location for the variable (e.g. a
+  // constant literal, or a spilled stack value) in the parent frame.
+  //
+  // Example (this is pseudo-code & pseudo-DWARF, but hopefully illustrative):
+  //
+  //     void child(int &sink, int x) {
+  //       ...
+  //       /* "x" gets optimized out. */
+  //
+  //       /* The location of "x" here is: DW_OP_entry_value($reg2). */
+  //       ++sink;
+  //     }
+  //
+  //     void parent() {
+  //       int sink;
+  //
+  //       /*
+  //        * The callsite information emitted here is:
+  //        *
+  //        * DW_TAG_call_site
+  //        *   DW_AT_return_pc ... (for "child(sink, 123);")
+  //        *   DW_TAG_call_site_parameter (for "sink")
+  //        *     DW_AT_location   ($reg1)
+  //        *     DW_AT_call_value ($SP - 8)
+  //        *   DW_TAG_call_site_parameter (for "x")
+  //        *     DW_AT_location   ($reg2)
+  //        *     DW_AT_call_value ($literal 123)
+  //        *
+  //        * DW_TAG_call_site
+  //        *   DW_AT_return_pc ... (for "child(sink, 456);")
+  //        *   ...
+  //        */
+  //       child(sink, 123);
+  //       child(sink, 456);
+  //     }
+  //
+  // When the program stops at "++sink" within `child`, the debugger determines
+  // the call site by analyzing the return address. Once the call site is found,
+  // the debugger determines which parameter is referenced by DW_OP_entry_value
+  // and evaluates the corresponding location for that parameter in `parent`.
+
+  // 1. Find the function which pushed the current frame onto the stack.
+  if ((!exe_ctx || !exe_ctx->HasTargetScope()) || !reg_ctx) {
+    LLDB_LOG(log, "Evaluate_DW_OP_entry_value: no exe/reg context");
+    return false;
+  }
+
+  StackFrame *current_frame = exe_ctx->GetFramePtr();
+  Thread *thread = exe_ctx->GetThreadPtr();
+  if (!current_frame || !thread) {
+    LLDB_LOG(log, "Evaluate_DW_OP_entry_value: no current frame/thread");
+    return false;
+  }
+
+  Target &target = exe_ctx->GetTargetRef();
+  StackFrameSP parent_frame = nullptr;
+  addr_t return_pc = LLDB_INVALID_ADDRESS;
+  uint32_t current_frame_idx = current_frame->GetFrameIndex();
+  uint32_t num_frames = thread->GetStackFrameCount();
+  for (uint32_t parent_frame_idx = current_frame_idx + 1;
+       parent_frame_idx < num_frames; ++parent_frame_idx) {
+    parent_frame = thread->GetStackFrameAtIndex(parent_frame_idx);
+    // Require a valid sequence of frames.
+    if (!parent_frame)
+      break;
+
+    // Record the first valid return address, even if this is an inlined frame,
+    // in order to look up the associated call edge in the first non-inlined
+    // parent frame.
+    if (return_pc == LLDB_INVALID_ADDRESS) {
+      return_pc = parent_frame->GetFrameCodeAddress().GetLoadAddress(&target);
+      LLDB_LOG(log,
+               "Evaluate_DW_OP_entry_value: immediate ancestor with pc = {0:x}",
+               return_pc);
+    }
+
+    // If we've found an inlined frame, skip it (these have no call site
+    // parameters).
+    if (parent_frame->IsInlined())
+      continue;
+
+    // We've found the first non-inlined parent frame.
+    break;
+  }
+  if (!parent_frame || !parent_frame->GetRegisterContext()) {
+    LLDB_LOG(log, "Evaluate_DW_OP_entry_value: no parent frame with reg ctx");
+    return false;
+  }
+
+  Function *parent_func =
+      parent_frame->GetSymbolContext(eSymbolContextFunction).function;
+  if (!parent_func) {
+    LLDB_LOG(log, "Evaluate_DW_OP_entry_value: no parent function");
+    return false;
+  }
+
+  // 2. Find the call edge in the parent function responsible for creating the
+  //    current activation.
+  Function *current_func =
+      current_frame->GetSymbolContext(eSymbolContextFunction).function;
+  if (!current_func) {
+    LLDB_LOG(log, "Evaluate_DW_OP_entry_value: no current function");
+    return false;
+  }
+
+  CallEdge *call_edge = nullptr;
+  ModuleList &modlist = target.GetImages();
+  ExecutionContext parent_exe_ctx = *exe_ctx;
+  parent_exe_ctx.SetFrameSP(parent_frame);
+  if (!parent_frame->IsArtificial()) {
+    // If the parent frame is not artificial, the current activation may be
+    // produced by an ambiguous tail call. In this case, refuse to proceed.
+    call_edge = parent_func->GetCallEdgeForReturnAddress(return_pc, target);
+    if (!call_edge) {
+      LLDB_LOG(log,
+               "Evaluate_DW_OP_entry_value: no call edge for retn-pc = {0:x} "
+               "in parent frame {1}",
+               return_pc, parent_func->GetName());
+      return false;
+    }
+    Function *callee_func = call_edge->GetCallee(modlist, parent_exe_ctx);
+    if (callee_func != current_func) {
+      LLDB_LOG(log, "Evaluate_DW_OP_entry_value: ambiguous call sequence, "
+                    "can't find real parent frame");
+      return false;
+    }
+  } else {
+    // The StackFrameList solver machinery has deduced that an unambiguous tail
+    // call sequence that produced the current activation.  The first edge in
+    // the parent that points to the current function must be valid.
+    for (auto &edge : parent_func->GetTailCallingEdges()) {
+      if (edge->GetCallee(modlist, parent_exe_ctx) == current_func) {
+        call_edge = edge.get();
+        break;
+      }
+    }
+  }
+  if (!call_edge) {
+    LLDB_LOG(log, "Evaluate_DW_OP_entry_value: no unambiguous edge from parent "
+                  "to current function");
+    return false;
+  }
+
+  // 3. Attempt to locate the DW_OP_entry_value expression in the set of
+  //    available call site parameters. If found, evaluate the corresponding
+  //    parameter in the context of the parent frame.
+  const uint32_t subexpr_len = opcodes.GetULEB128(&opcode_offset);
+  const void *subexpr_data = opcodes.GetData(&opcode_offset, subexpr_len);
+  if (!subexpr_data) {
+    LLDB_LOG(log, "Evaluate_DW_OP_entry_value: subexpr could not be read");
+    return false;
+  }
+
+  const CallSiteParameter *matched_param = nullptr;
+  for (const CallSiteParameter &param : call_edge->GetCallSiteParameters()) {
+    DataExtractor param_subexpr_extractor;
+    if (!param.LocationInCallee.GetExpressionData(param_subexpr_extractor))
+      continue;
+    lldb::offset_t param_subexpr_offset = 0;
+    const void *param_subexpr_data =
+        param_subexpr_extractor.GetData(&param_subexpr_offset, subexpr_len);
+    if (!param_subexpr_data ||
+        param_subexpr_extractor.BytesLeft(param_subexpr_offset) != 0)
+      continue;
+
+    // At this point, the DW_OP_entry_value sub-expression and the callee-side
+    // expression in the call site parameter are known to have the same length.
+    // Check whether they are equal.
+    //
+    // Note that an equality check is sufficient: the contents of the
+    // DW_OP_entry_value subexpression are only used to identify the right call
+    // site parameter in the parent, and do not require any special handling.
+    if (memcmp(subexpr_data, param_subexpr_data, subexpr_len) == 0) {
+      matched_param = &param;
+      break;
+    }
+  }
+  if (!matched_param) {
+    LLDB_LOG(log,
+             "Evaluate_DW_OP_entry_value: no matching call site param found");
+    return false;
+  }
+
+  // TODO: Add support for DW_OP_push_object_address within a DW_OP_entry_value
+  // subexpresion whenever llvm does.
+  Value result;
+  const DWARFExpression &param_expr = matched_param->LocationInCaller;
+  if (!param_expr.Evaluate(&parent_exe_ctx,
+                           parent_frame->GetRegisterContext().get(),
+                           /*loclist_base_addr=*/LLDB_INVALID_ADDRESS,
+                           /*initial_value_ptr=*/nullptr,
+                           /*object_address_ptr=*/nullptr, result, error_ptr)) {
+    LLDB_LOG(log,
+             "Evaluate_DW_OP_entry_value: call site param evaluation failed");
+    return false;
+  }
+
+  stack.push_back(result);
+  return true;
+}
+
 bool DWARFExpression::Evaluate(ExecutionContextScope *exe_scope,
                                lldb::addr_t loclist_base_load_addr,
                                const Value *initial_value_ptr,
@@ -1086,14 +855,13 @@
 
 bool DWARFExpression::Evaluate(ExecutionContext *exe_ctx,
                                RegisterContext *reg_ctx,
-                               lldb::addr_t loclist_base_load_addr,
+                               lldb::addr_t func_load_addr,
                                const Value *initial_value_ptr,
                                const Value *object_address_ptr, Value &result,
                                Status *error_ptr) const {
   ModuleSP module_sp = m_module_wp.lock();
 
   if (IsLocationList()) {
-    lldb::offset_t offset = 0;
     addr_t pc;
     StackFrame *frame = nullptr;
     if (reg_ctx)
@@ -1108,38 +876,18 @@
       pc = reg_ctx_sp->GetPC();
     }
 
-    if (loclist_base_load_addr != LLDB_INVALID_ADDRESS) {
+    if (func_load_addr != LLDB_INVALID_ADDRESS) {
       if (pc == LLDB_INVALID_ADDRESS) {
         if (error_ptr)
           error_ptr->SetErrorString("Invalid PC in frame.");
         return false;
       }
 
-      addr_t curr_loclist_base_load_addr = loclist_base_load_addr;
-
-      while (m_data.ValidOffset(offset)) {
-        // We need to figure out what the value is for the location.
-        addr_t lo_pc = LLDB_INVALID_ADDRESS;
-        addr_t hi_pc = LLDB_INVALID_ADDRESS;
-        if (!AddressRangeForLocationListEntry(m_dwarf_cu, m_data, &offset,
-                                              lo_pc, hi_pc))
-          break;
-
-        if (lo_pc == 0 && hi_pc == 0)
-          break;
-
-        lo_pc += curr_loclist_base_load_addr - m_loclist_slide;
-        hi_pc += curr_loclist_base_load_addr - m_loclist_slide;
-
-        uint16_t length = m_data.GetU16(&offset);
-
-        if (length > 0 && lo_pc <= pc && pc < hi_pc) {
-          return DWARFExpression::Evaluate(
-              exe_ctx, reg_ctx, module_sp, m_data, m_dwarf_cu, offset, length,
-              m_reg_kind, initial_value_ptr, object_address_ptr, result,
-              error_ptr);
-        }
-        offset += length;
+      if (llvm::Optional<DataExtractor> expr =
+              GetLocationExpression(func_load_addr, pc)) {
+        return DWARFExpression::Evaluate(
+            exe_ctx, reg_ctx, module_sp, *expr, m_dwarf_cu, m_reg_kind,
+            initial_value_ptr, object_address_ptr, result, error_ptr);
       }
     }
     if (error_ptr)
@@ -1148,20 +896,19 @@
   }
 
   // Not a location list, just a single expression.
-  return DWARFExpression::Evaluate(
-      exe_ctx, reg_ctx, module_sp, m_data, m_dwarf_cu, 0, m_data.GetByteSize(),
-      m_reg_kind, initial_value_ptr, object_address_ptr, result, error_ptr);
+  return DWARFExpression::Evaluate(exe_ctx, reg_ctx, module_sp, m_data,
+                                   m_dwarf_cu, m_reg_kind, initial_value_ptr,
+                                   object_address_ptr, result, error_ptr);
 }
 
 bool DWARFExpression::Evaluate(
     ExecutionContext *exe_ctx, RegisterContext *reg_ctx,
     lldb::ModuleSP module_sp, const DataExtractor &opcodes,
-    const DWARFUnit *dwarf_cu, const lldb::offset_t opcodes_offset,
-    const lldb::offset_t opcodes_length, const lldb::RegisterKind reg_kind,
+    const DWARFUnit *dwarf_cu, const lldb::RegisterKind reg_kind,
     const Value *initial_value_ptr, const Value *object_address_ptr,
     Value &result, Status *error_ptr) {
 
-  if (opcodes_length == 0) {
+  if (opcodes.GetByteSize() == 0) {
     if (error_ptr)
       error_ptr->SetErrorString(
           "no location, value may have been optimized out");
@@ -1182,8 +929,7 @@
   if (initial_value_ptr)
     stack.push_back(*initial_value_ptr);
 
-  lldb::offset_t offset = opcodes_offset;
-  const lldb::offset_t end_offset = opcodes_offset + opcodes_length;
+  lldb::offset_t offset = 0;
   Value tmp;
   uint32_t reg_num;
 
@@ -1191,30 +937,24 @@
   uint64_t op_piece_offset = 0;
   Value pieces; // Used for DW_OP_piece
 
-  // Make sure all of the data is available in opcodes.
-  if (!opcodes.ValidOffsetForDataOfSize(opcodes_offset, opcodes_length)) {
-    if (error_ptr)
-      error_ptr->SetErrorString(
-          "invalid offset and/or length for opcodes buffer.");
-    return false;
-  }
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  while (opcodes.ValidOffset(offset) && offset < end_offset) {
+  while (opcodes.ValidOffset(offset)) {
     const lldb::offset_t op_offset = offset;
     const uint8_t op = opcodes.GetU8(&offset);
 
     if (log && log->GetVerbose()) {
       size_t count = stack.size();
-      log->Printf("Stack before operation has %" PRIu64 " values:",
-                  (uint64_t)count);
+      LLDB_LOGF(log, "Stack before operation has %" PRIu64 " values:",
+                (uint64_t)count);
       for (size_t i = 0; i < count; ++i) {
         StreamString new_value;
         new_value.Printf("[%" PRIu64 "]", (uint64_t)i);
         stack[i].Dump(&new_value);
-        log->Printf("  %s", new_value.GetData());
+        LLDB_LOGF(log, "  %s", new_value.GetData());
       }
-      log->Printf("0x%8.8" PRIx64 ": %s", op_offset, DW_OP_value_to_name(op));
+      LLDB_LOGF(log, "0x%8.8" PRIx64 ": %s", op_offset,
+                DW_OP_value_to_name(op));
     }
 
     switch (op) {
@@ -1945,7 +1685,7 @@
     case DW_OP_skip: {
       int16_t skip_offset = (int16_t)opcodes.GetU16(&offset);
       lldb::offset_t new_offset = offset + skip_offset;
-      if (new_offset >= opcodes_offset && new_offset < end_offset)
+      if (opcodes.ValidOffset(new_offset))
         offset = new_offset;
       else {
         if (error_ptr)
@@ -1974,7 +1714,7 @@
         Scalar zero(0);
         if (tmp.ResolveValue(exe_ctx) != zero) {
           lldb::offset_t new_offset = offset + bra_offset;
-          if (new_offset >= opcodes_offset && new_offset < end_offset)
+          if (opcodes.ValidOffset(new_offset))
             offset = new_offset;
           else {
             if (error_ptr)
@@ -2331,6 +2071,10 @@
           // not available. Fill with zeros for now by resizing the data and
           // appending it
           curr_piece.ResizeData(piece_byte_size);
+          // Note that "0" is not a correct value for the unknown bits.
+          // It would be better to also return a mask of valid bits together
+          // with the expression result, so the debugger can print missing
+          // members as "<optimized out>" or something.
           ::memset(curr_piece.GetBuffer().GetBytes(), 0, piece_byte_size);
           pieces.AppendDataToHostBuffer(curr_piece);
         } else {
@@ -2388,7 +2132,8 @@
           case Value::eValueTypeScalar: {
             uint32_t bit_size = piece_byte_size * 8;
             uint32_t bit_offset = 0;
-            if (!curr_piece_source_value.GetScalar().ExtractBitfield(
+            Scalar &scalar = curr_piece_source_value.GetScalar();
+            if (!scalar.ExtractBitfield(
                     bit_size, bit_offset)) {
               if (error_ptr)
                 error_ptr->SetErrorStringWithFormat(
@@ -2399,7 +2144,14 @@
                         .GetByteSize());
               return false;
             }
-            curr_piece = curr_piece_source_value;
+            // Create curr_piece with bit_size. By default Scalar
+            // grows to the nearest host integer type.
+            llvm::APInt fail_value(1, 0, false);
+            llvm::APInt ap_int = scalar.UInt128(fail_value);
+            assert(ap_int.getBitWidth() >= bit_size);
+            llvm::ArrayRef<uint64_t> buf{ap_int.getRawData(),
+                                         ap_int.getNumWords()};
+            curr_piece.GetScalar() = Scalar(llvm::APInt(bit_size, buf));
           } break;
 
           case Value::eValueTypeVector: {
@@ -2421,7 +2173,7 @@
           if (op_piece_offset == 0) {
             // This is the first piece, we should push it back onto the stack
             // so subsequent pieces will be able to access this piece and add
-            // to it
+            // to it.
             if (pieces.AppendDataToHostBuffer(curr_piece) == 0) {
               if (error_ptr)
                 error_ptr->SetErrorString("failed to append piece data");
@@ -2429,7 +2181,7 @@
             }
           } else {
             // If this is the second or later piece there should be a value on
-            // the stack
+            // the stack.
             if (pieces.GetBuffer().GetByteSize() != op_piece_offset) {
               if (error_ptr)
                 error_ptr->SetErrorStringWithFormat(
@@ -2445,8 +2197,8 @@
               return false;
             }
           }
-          op_piece_offset += piece_byte_size;
         }
+        op_piece_offset += piece_byte_size;
       }
     } break;
 
@@ -2570,6 +2322,83 @@
       stack.back().SetValueType(Value::eValueTypeScalar);
       break;
 
+    // OPCODE: DW_OP_convert
+    // OPERANDS: 1
+    //      A ULEB128 that is either a DIE offset of a
+    //      DW_TAG_base_type or 0 for the generic (pointer-sized) type.
+    //
+    // DESCRIPTION: Pop the top stack element, convert it to a
+    // different type, and push the result.
+    case DW_OP_convert: {
+      if (stack.size() < 1) {
+        if (error_ptr)
+          error_ptr->SetErrorString(
+              "Expression stack needs at least 1 item for DW_OP_convert.");
+        return false;
+      }
+      const uint64_t die_offset = opcodes.GetULEB128(&offset);
+      Scalar::Type type = Scalar::e_void;
+      uint64_t bit_size;
+      if (die_offset == 0) {
+        // The generic type has the size of an address on the target
+        // machine and an unspecified signedness. Scalar has no
+        // "unspecified signedness", so we use unsigned types.
+        if (!module_sp) {
+          if (error_ptr)
+            error_ptr->SetErrorString("No module");
+          return false;
+        }
+        bit_size = module_sp->GetArchitecture().GetAddressByteSize() * 8;
+        if (!bit_size) {
+          if (error_ptr)
+            error_ptr->SetErrorString("unspecified architecture");
+          return false;
+        }
+        type = Scalar::GetBestTypeForBitSize(bit_size, false);
+      } else {
+        // Retrieve the type DIE that the value is being converted to.
+        // FIXME: the constness has annoying ripple effects.
+        DWARFDIE die = const_cast<DWARFUnit *>(dwarf_cu)->GetDIE(die_offset);
+        if (!die) {
+          if (error_ptr)
+            error_ptr->SetErrorString("Cannot resolve DW_OP_convert type DIE");
+          return false;
+        }
+        uint64_t encoding =
+            die.GetAttributeValueAsUnsigned(DW_AT_encoding, DW_ATE_hi_user);
+        bit_size = die.GetAttributeValueAsUnsigned(DW_AT_byte_size, 0) * 8;
+        if (!bit_size)
+          bit_size = die.GetAttributeValueAsUnsigned(DW_AT_bit_size, 0);
+        if (!bit_size) {
+          if (error_ptr)
+            error_ptr->SetErrorString("Unsupported type size in DW_OP_convert");
+          return false;
+        }
+        switch (encoding) {
+        case DW_ATE_signed:
+        case DW_ATE_signed_char:
+          type = Scalar::GetBestTypeForBitSize(bit_size, true);
+          break;
+        case DW_ATE_unsigned:
+        case DW_ATE_unsigned_char:
+          type = Scalar::GetBestTypeForBitSize(bit_size, false);
+          break;
+        default:
+          if (error_ptr)
+            error_ptr->SetErrorString("Unsupported encoding in DW_OP_convert");
+          return false;
+        }
+      }
+      if (type == Scalar::e_void) {
+        if (error_ptr)
+          error_ptr->SetErrorString("Unsupported pointer size");
+        return false;
+      }
+      Scalar &top = stack.back().ResolveValue(exe_ctx);
+      top.TruncOrExtendTo(type, bit_size);
+      break;
+    }
+
     // OPCODE: DW_OP_call_frame_cfa
     // OPERANDS: None
     // DESCRIPTION: Specifies a DWARF expression that pushes the value of
@@ -2685,10 +2514,19 @@
       stack.push_back(Scalar(value));
     } break;
 
-    default:
-      if (log)
-        log->Printf("Unhandled opcode %s in DWARFExpression.",
+    case DW_OP_entry_value: {
+      if (!Evaluate_DW_OP_entry_value(stack, exe_ctx, reg_ctx, opcodes, offset,
+                                      error_ptr, log)) {
+        LLDB_ERRORF(error_ptr, "Could not evaluate %s.",
                     DW_OP_value_to_name(op));
+        return false;
+      }
+      break;
+    }
+
+    default:
+      LLDB_LOGF(log, "Unhandled opcode %s in DWARFExpression.",
+                DW_OP_value_to_name(op));
       break;
     }
   }
@@ -2706,13 +2544,13 @@
   } else {
     if (log && log->GetVerbose()) {
       size_t count = stack.size();
-      log->Printf("Stack after operation has %" PRIu64 " values:",
-                  (uint64_t)count);
+      LLDB_LOGF(log, "Stack after operation has %" PRIu64 " values:",
+                (uint64_t)count);
       for (size_t i = 0; i < count; ++i) {
         StreamString new_value;
         new_value.Printf("[%" PRIu64 "]", (uint64_t)i);
         stack[i].Dump(&new_value);
-        log->Printf("  %s", new_value.GetData());
+        LLDB_LOGF(log, "  %s", new_value.GetData());
       }
     }
     result = stack.back();
@@ -2720,85 +2558,6 @@
   return true; // Return true on success
 }
 
-size_t DWARFExpression::LocationListSize(const DWARFUnit *dwarf_cu,
-                                         const DataExtractor &debug_loc_data,
-                                         lldb::offset_t offset) {
-  const lldb::offset_t debug_loc_offset = offset;
-  while (debug_loc_data.ValidOffset(offset)) {
-    lldb::addr_t start_addr = LLDB_INVALID_ADDRESS;
-    lldb::addr_t end_addr = LLDB_INVALID_ADDRESS;
-    if (!AddressRangeForLocationListEntry(dwarf_cu, debug_loc_data, &offset,
-                                          start_addr, end_addr))
-      break;
-
-    if (start_addr == 0 && end_addr == 0)
-      break;
-
-    uint16_t loc_length = debug_loc_data.GetU16(&offset);
-    offset += loc_length;
-  }
-
-  if (offset > debug_loc_offset)
-    return offset - debug_loc_offset;
-  return 0;
-}
-
-bool DWARFExpression::AddressRangeForLocationListEntry(
-    const DWARFUnit *dwarf_cu, const DataExtractor &debug_loc_data,
-    lldb::offset_t *offset_ptr, lldb::addr_t &low_pc, lldb::addr_t &high_pc) {
-  if (!debug_loc_data.ValidOffset(*offset_ptr))
-    return false;
-
-  DWARFExpression::LocationListFormat format =
-      dwarf_cu->GetSymbolFileDWARF().GetLocationListFormat();
-  switch (format) {
-  case NonLocationList:
-    return false;
-  case RegularLocationList:
-    low_pc = debug_loc_data.GetAddress(offset_ptr);
-    high_pc = debug_loc_data.GetAddress(offset_ptr);
-    return true;
-  case SplitDwarfLocationList:
-  case LocLists:
-    switch (debug_loc_data.GetU8(offset_ptr)) {
-    case DW_LLE_end_of_list:
-      return false;
-    case DW_LLE_startx_endx: {
-      uint64_t index = debug_loc_data.GetULEB128(offset_ptr);
-      low_pc = ReadAddressFromDebugAddrSection(dwarf_cu, index);
-      index = debug_loc_data.GetULEB128(offset_ptr);
-      high_pc = ReadAddressFromDebugAddrSection(dwarf_cu, index);
-      return true;
-    }
-    case DW_LLE_startx_length: {
-      uint64_t index = debug_loc_data.GetULEB128(offset_ptr);
-      low_pc = ReadAddressFromDebugAddrSection(dwarf_cu, index);
-      uint64_t length = (format == LocLists)
-                            ? debug_loc_data.GetULEB128(offset_ptr)
-                            : debug_loc_data.GetU32(offset_ptr);
-      high_pc = low_pc + length;
-      return true;
-    }
-    case DW_LLE_start_length: {
-      low_pc = debug_loc_data.GetAddress(offset_ptr);
-      high_pc = low_pc + debug_loc_data.GetULEB128(offset_ptr);
-      return true;
-    }
-    case DW_LLE_start_end: {
-      low_pc = debug_loc_data.GetAddress(offset_ptr);
-      high_pc = debug_loc_data.GetAddress(offset_ptr);
-      return true;
-    }
-    default:
-      // Not supported entry type
-      lldbassert(false && "Not supported location list type");
-      return false;
-    }
-  }
-  assert(false && "Not supported location list type");
-  return false;
-}
-
 static bool print_dwarf_exp_op(Stream &s, const DataExtractor &data,
                                lldb::offset_t *offset_ptr, int address_size,
                                int dwarf_ref_size) {
@@ -2823,6 +2582,11 @@
     s.Printf("%" PRIu64 " %" PRIi64, uint, sint);
     return true;
   }
+  if (opcode_class == DRC_TWOOPERANDS && opcode == DW_OP_entry_value) {
+    uint = data.GetULEB128(offset_ptr);
+    s.Printf("%" PRIu64 " ", uint);
+    return true;
+  }
   if (opcode_class != DRC_ONEOPERAND) {
     s.Printf("UNKNOWN OP %u", opcode);
     return false;
@@ -2923,6 +2687,7 @@
   case DW_OP_regx:
   case DW_OP_GNU_addr_index:
   case DW_OP_GNU_const_index:
+  case DW_OP_entry_value:
     size = 128;
     break;
   default:
@@ -3011,8 +2776,9 @@
     s.PutCString("\n            ");
     s.Indent();
     if (cu)
-      s.AddressRange(start_addr + base_addr, end_addr + base_addr,
-                     cu->GetAddressByteSize(), nullptr, ": ");
+      DumpAddressRange(s.AsRawOstream(), start_addr + base_addr,
+                       end_addr + base_addr, cu->GetAddressByteSize(), nullptr,
+                       ": ");
     uint32_t loc_length = debug_loc_data.GetU16(&offset);
 
     DataExtractor locationData(debug_loc_data, offset, loc_length);
@@ -3021,56 +2787,87 @@
   }
 }
 
-bool DWARFExpression::GetOpAndEndOffsets(StackFrame &frame,
-                                         lldb::offset_t &op_offset,
-                                         lldb::offset_t &end_offset) {
-  SymbolContext sc = frame.GetSymbolContext(eSymbolContextFunction);
-  if (!sc.function) {
-    return false;
-  }
+static DataExtractor ToDataExtractor(const llvm::DWARFLocationExpression &loc,
+                                     ByteOrder byte_order, uint32_t addr_size) {
+  auto buffer_sp =
+      std::make_shared<DataBufferHeap>(loc.Expr.data(), loc.Expr.size());
+  return DataExtractor(buffer_sp, byte_order, addr_size);
+}
 
-  addr_t loclist_base_file_addr =
-      sc.function->GetAddressRange().GetBaseAddress().GetFileAddress();
-  if (loclist_base_file_addr == LLDB_INVALID_ADDRESS) {
-    return false;
-  }
+llvm::Optional<DataExtractor>
+DWARFExpression::GetLocationExpression(addr_t load_function_start,
+                                       addr_t addr) const {
+  Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
 
-  addr_t pc_file_addr = frame.GetFrameCodeAddress().GetFileAddress();
-  lldb::offset_t opcodes_offset, opcodes_length;
-  if (!GetLocation(loclist_base_file_addr, pc_file_addr, opcodes_offset,
-                   opcodes_length)) {
-    return false;
-  }
+  std::unique_ptr<llvm::DWARFLocationTable> loctable_up =
+      m_dwarf_cu->GetLocationTable(m_data);
+  llvm::Optional<DataExtractor> result;
+  uint64_t offset = 0;
+  auto lookup_addr =
+      [&](uint32_t index) -> llvm::Optional<llvm::object::SectionedAddress> {
+    addr_t address = ReadAddressFromDebugAddrSection(m_dwarf_cu, index);
+    if (address == LLDB_INVALID_ADDRESS)
+      return llvm::None;
+    return llvm::object::SectionedAddress{address};
+  };
+  auto process_list = [&](llvm::Expected<llvm::DWARFLocationExpression> loc) {
+    if (!loc) {
+      LLDB_LOG_ERROR(log, loc.takeError(), "{0}");
+      return true;
+    }
+    if (loc->Range) {
+      // This relocates low_pc and high_pc by adding the difference between the
+      // function file address, and the actual address it is loaded in memory.
+      addr_t slide = load_function_start - m_loclist_addresses->func_file_addr;
+      loc->Range->LowPC += slide;
+      loc->Range->HighPC += slide;
 
-  if (opcodes_length == 0) {
-    return false;
-  }
-
-  op_offset = opcodes_offset;
-  end_offset = opcodes_offset + opcodes_length;
-  return true;
+      if (loc->Range->LowPC <= addr && addr < loc->Range->HighPC)
+        result = ToDataExtractor(*loc, m_data.GetByteOrder(),
+                                 m_data.GetAddressByteSize());
+    }
+    return !result;
+  };
+  llvm::Error E = loctable_up->visitAbsoluteLocationList(
+      offset, llvm::object::SectionedAddress{m_loclist_addresses->cu_file_addr},
+      lookup_addr, process_list);
+  if (E)
+    LLDB_LOG_ERROR(log, std::move(E), "{0}");
+  return result;
 }
 
 bool DWARFExpression::MatchesOperand(StackFrame &frame,
                                      const Instruction::Operand &operand) {
   using namespace OperandMatchers;
 
-  lldb::offset_t op_offset;
-  lldb::offset_t end_offset;
-  if (!GetOpAndEndOffsets(frame, op_offset, end_offset)) {
-    return false;
-  }
-
-  if (!m_data.ValidOffset(op_offset) || op_offset >= end_offset) {
-    return false;
-  }
-
   RegisterContextSP reg_ctx_sp = frame.GetRegisterContext();
   if (!reg_ctx_sp) {
     return false;
   }
 
-  DataExtractor opcodes = m_data;
+  DataExtractor opcodes;
+  if (IsLocationList()) {
+    SymbolContext sc = frame.GetSymbolContext(eSymbolContextFunction);
+    if (!sc.function)
+      return false;
+
+    addr_t load_function_start =
+        sc.function->GetAddressRange().GetBaseAddress().GetFileAddress();
+    if (load_function_start == LLDB_INVALID_ADDRESS)
+      return false;
+
+    addr_t pc = frame.GetFrameCodeAddress().GetLoadAddress(
+        frame.CalculateTarget().get());
+
+    if (llvm::Optional<DataExtractor> expr = GetLocationExpression(load_function_start, pc))
+      opcodes = std::move(*expr);
+    else
+      return false;
+  } else
+    opcodes = m_data;
+
+
+  lldb::offset_t op_offset = 0;
   uint8_t opcode = opcodes.GetU8(&op_offset);
 
   if (opcode == DW_OP_fbreg) {
diff --git a/src/llvm-project/lldb/source/Expression/DiagnosticManager.cpp b/src/llvm-project/lldb/source/Expression/DiagnosticManager.cpp
index 53d85f8..48eba35 100644
--- a/src/llvm-project/lldb/source/Expression/DiagnosticManager.cpp
+++ b/src/llvm-project/lldb/source/Expression/DiagnosticManager.cpp
@@ -47,7 +47,7 @@
 std::string DiagnosticManager::GetString(char separator) {
   std::string ret;
 
-  for (const Diagnostic *diagnostic : Diagnostics()) {
+  for (const auto &diagnostic : Diagnostics()) {
     ret.append(StringForSeverity(diagnostic->GetSeverity()));
     ret.append(diagnostic->GetMessage());
     ret.push_back(separator);
@@ -70,19 +70,9 @@
   return result;
 }
 
-size_t DiagnosticManager::PutString(DiagnosticSeverity severity,
-                                    llvm::StringRef str) {
+void DiagnosticManager::PutString(DiagnosticSeverity severity,
+                                  llvm::StringRef str) {
   if (str.empty())
-    return 0;
+    return;
   AddDiagnostic(str, severity, eDiagnosticOriginLLDB);
-  return str.size();
-}
-
-void DiagnosticManager::CopyDiagnostics(DiagnosticManager &otherDiagnostics) {
-  for (const DiagnosticList::value_type &other_diagnostic:
-       otherDiagnostics.Diagnostics()) {
-    AddDiagnostic(
-        other_diagnostic->GetMessage(), other_diagnostic->GetSeverity(),
-        other_diagnostic->getKind(), other_diagnostic->GetCompilerID());
-  }
 }
diff --git a/src/llvm-project/lldb/source/Expression/Expression.cpp b/src/llvm-project/lldb/source/Expression/Expression.cpp
index 8e1ef69..71369d0 100644
--- a/src/llvm-project/lldb/source/Expression/Expression.cpp
+++ b/src/llvm-project/lldb/source/Expression/Expression.cpp
@@ -12,18 +12,16 @@
 
 using namespace lldb_private;
 
-Expression::Expression(Target &target, ExpressionKind kind)
-    : m_kind(kind),
-      m_target_wp(target.shared_from_this()),
+Expression::Expression(Target &target)
+    : m_target_wp(target.shared_from_this()),
       m_jit_start_addr(LLDB_INVALID_ADDRESS),
       m_jit_end_addr(LLDB_INVALID_ADDRESS) {
   // Can't make any kind of expression without a target.
   assert(m_target_wp.lock());
 }
 
-Expression::Expression(ExecutionContextScope &exe_scope, ExpressionKind kind)
-    : m_kind(kind),
-      m_target_wp(exe_scope.CalculateTarget()),
+Expression::Expression(ExecutionContextScope &exe_scope)
+    : m_target_wp(exe_scope.CalculateTarget()),
       m_jit_start_addr(LLDB_INVALID_ADDRESS),
       m_jit_end_addr(LLDB_INVALID_ADDRESS) {
   assert(m_target_wp.lock());
diff --git a/src/llvm-project/lldb/source/Expression/ExpressionVariable.cpp b/src/llvm-project/lldb/source/Expression/ExpressionVariable.cpp
index 97305dc..ed8da0a 100644
--- a/src/llvm-project/lldb/source/Expression/ExpressionVariable.cpp
+++ b/src/llvm-project/lldb/source/Expression/ExpressionVariable.cpp
@@ -45,8 +45,7 @@
 
   m_execution_units.insert(execution_unit_sp);
 
-  if (log)
-    log->Printf("Registering JITted Functions:\n");
+  LLDB_LOGF(log, "Registering JITted Functions:\n");
 
   for (const IRExecutionUnit::JittedFunction &jitted_function :
        execution_unit_sp->GetJittedFunctions()) {
@@ -55,15 +54,13 @@
         jitted_function.m_remote_addr != LLDB_INVALID_ADDRESS) {
       m_symbol_map[jitted_function.m_name.GetCString()] =
           jitted_function.m_remote_addr;
-      if (log)
-        log->Printf("  Function: %s at 0x%" PRIx64 ".",
-                    jitted_function.m_name.GetCString(),
-                    jitted_function.m_remote_addr);
+      LLDB_LOGF(log, "  Function: %s at 0x%" PRIx64 ".",
+                jitted_function.m_name.GetCString(),
+                jitted_function.m_remote_addr);
     }
   }
 
-  if (log)
-    log->Printf("Registering JIIted Symbols:\n");
+  LLDB_LOGF(log, "Registering JIIted Symbols:\n");
 
   for (const IRExecutionUnit::JittedGlobalVariable &global_var :
        execution_unit_sp->GetJittedGlobalVariables()) {
@@ -74,9 +71,8 @@
       Mangled mangler(global_var.m_name);
       mangler.GetDemangledName(lldb::eLanguageTypeUnknown);
       m_symbol_map[global_var.m_name.GetCString()] = global_var.m_remote_addr;
-      if (log)
-        log->Printf("  Symbol: %s at 0x%" PRIx64 ".",
-                    global_var.m_name.GetCString(), global_var.m_remote_addr);
+      LLDB_LOGF(log, "  Symbol: %s at 0x%" PRIx64 ".",
+                global_var.m_name.GetCString(), global_var.m_remote_addr);
     }
   }
 }
diff --git a/src/llvm-project/lldb/source/Expression/FunctionCaller.cpp b/src/llvm-project/lldb/source/Expression/FunctionCaller.cpp
index 618c1a1..dc80c81 100644
--- a/src/llvm-project/lldb/source/Expression/FunctionCaller.cpp
+++ b/src/llvm-project/lldb/source/Expression/FunctionCaller.cpp
@@ -29,14 +29,16 @@
 
 using namespace lldb_private;
 
+char FunctionCaller::ID;
+
 // FunctionCaller constructor
 FunctionCaller::FunctionCaller(ExecutionContextScope &exe_scope,
                                const CompilerType &return_type,
                                const Address &functionAddress,
                                const ValueList &arg_value_list,
                                const char *name)
-    : Expression(exe_scope, eKindFunctionCaller), m_execution_unit_sp(),
-      m_parser(), m_jit_module_wp(), m_name(name ? name : "<unknown>"),
+    : Expression(exe_scope), m_execution_unit_sp(), m_parser(),
+      m_jit_module_wp(), m_name(name ? name : "<unknown>"),
       m_function_ptr(nullptr), m_function_addr(functionAddress),
       m_function_return_type(return_type),
       m_wrapper_function_name("__lldb_caller_function"),
@@ -217,9 +219,8 @@
     return false;
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-  if (log)
-    log->Printf("Call Address: 0x%" PRIx64 " Struct Address: 0x%" PRIx64 ".\n",
-                m_jit_start_addr, args_addr_ref);
+  LLDB_LOGF(log, "Call Address: 0x%" PRIx64 " Struct Address: 0x%" PRIx64 ".\n",
+            m_jit_start_addr, args_addr_ref);
 
   return true;
 }
@@ -231,10 +232,10 @@
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |
                                                   LIBLLDB_LOG_STEP));
 
-  if (log)
-    log->Printf("-- [FunctionCaller::GetThreadPlanToCallFunction] Creating "
-                "thread plan to call function \"%s\" --",
-                m_name.c_str());
+  LLDB_LOGF(log,
+            "-- [FunctionCaller::GetThreadPlanToCallFunction] Creating "
+            "thread plan to call function \"%s\" --",
+            m_name.c_str());
 
   // FIXME: Use the errors Stream for better error reporting.
   Thread *thread = exe_ctx.GetThreadPtr();
@@ -271,10 +272,10 @@
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |
                                                   LIBLLDB_LOG_STEP));
 
-  if (log)
-    log->Printf("-- [FunctionCaller::FetchFunctionResults] Fetching function "
-                "results for \"%s\"--",
-                m_name.c_str());
+  LLDB_LOGF(log,
+            "-- [FunctionCaller::FetchFunctionResults] Fetching function "
+            "results for \"%s\"--",
+            m_name.c_str());
 
   Process *process = exe_ctx.GetProcessPtr();
 
@@ -341,10 +342,9 @@
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |
                                                   LIBLLDB_LOG_STEP));
 
-  if (log)
-    log->Printf(
-        "== [FunctionCaller::ExecuteFunction] Executing function \"%s\" ==",
-        m_name.c_str());
+  LLDB_LOGF(log,
+            "== [FunctionCaller::ExecuteFunction] Executing function \"%s\" ==",
+            m_name.c_str());
 
   lldb::ThreadPlanSP call_plan_sp = GetThreadPlanToCallFunction(
       exe_ctx, args_addr, real_options, diagnostic_manager);
@@ -362,13 +362,15 @@
 
   if (log) {
     if (return_value != lldb::eExpressionCompleted) {
-      log->Printf("== [FunctionCaller::ExecuteFunction] Execution of \"%s\" "
-                  "completed abnormally ==",
-                  m_name.c_str());
+      LLDB_LOGF(log,
+                "== [FunctionCaller::ExecuteFunction] Execution of \"%s\" "
+                "completed abnormally ==",
+                m_name.c_str());
     } else {
-      log->Printf("== [FunctionCaller::ExecuteFunction] Execution of \"%s\" "
-                  "completed normally ==",
-                  m_name.c_str());
+      LLDB_LOGF(log,
+                "== [FunctionCaller::ExecuteFunction] Execution of \"%s\" "
+                "completed normally ==",
+                m_name.c_str());
     }
   }
 
diff --git a/src/llvm-project/lldb/source/Expression/IRExecutionUnit.cpp b/src/llvm-project/lldb/source/Expression/IRExecutionUnit.cpp
index 25404ad..e033b90 100644
--- a/src/llvm-project/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/src/llvm-project/lldb/source/Expression/IRExecutionUnit.cpp
@@ -122,10 +122,10 @@
     return ret;
   }
 
-  if (log)
-    log->Printf("Found function, has local address 0x%" PRIx64
-                " and remote address 0x%" PRIx64,
-                (uint64_t)func_local_addr, (uint64_t)func_remote_addr);
+  LLDB_LOGF(log,
+            "Found function, has local address 0x%" PRIx64
+            " and remote address 0x%" PRIx64,
+            (uint64_t)func_local_addr, (uint64_t)func_remote_addr);
 
   std::pair<lldb::addr_t, lldb::addr_t> func_range;
 
@@ -138,9 +138,8 @@
     return ret;
   }
 
-  if (log)
-    log->Printf("Function's code range is [0x%" PRIx64 "+0x%" PRIx64 "]",
-                func_range.first, func_range.second);
+  LLDB_LOGF(log, "Function's code range is [0x%" PRIx64 "+0x%" PRIx64 "]",
+            func_range.first, func_range.second);
 
   Target *target = exe_ctx.GetTargetPtr();
   if (!target) {
@@ -188,7 +187,7 @@
                           target->GetArchitecture().GetAddressByteSize());
 
   if (log) {
-    log->Printf("Function data has contents:");
+    LLDB_LOGF(log, "Function data has contents:");
     extractor.PutToLog(log, 0, extractor.GetByteSize(), func_remote_addr, 16,
                        DataExtractor::TypeUInt8);
   }
@@ -255,7 +254,7 @@
 
     oss.flush();
 
-    log->Printf("Module being sent to JIT: \n%s", s.c_str());
+    LLDB_LOGF(log, "Module being sent to JIT: \n%s", s.c_str());
   }
 
   m_module_up->getContext().setInlineAsmDiagnosticHandler(ReportInlineAsmError,
@@ -317,7 +316,7 @@
   };
 
   if (process_sp->GetTarget().GetEnableSaveObjects()) {
-    m_object_cache_up = llvm::make_unique<ObjectDumper>();
+    m_object_cache_up = std::make_unique<ObjectDumper>();
     m_execution_engine_up->setObjectCache(m_object_cache_up.get());
   }
 
@@ -349,7 +348,7 @@
       return;
     }
     m_jitted_functions.push_back(JittedFunction(
-        function.getName().str().c_str(), external, (lldb::addr_t)fun_ptr));
+        function.getName().str().c_str(), external, reinterpret_cast<uintptr_t>(fun_ptr)));
   }
 
   CommitAllocations(process_sp);
@@ -433,20 +432,20 @@
   }
 
   if (log) {
-    log->Printf("Code can be run in the target.");
+    LLDB_LOGF(log, "Code can be run in the target.");
 
     StreamString disassembly_stream;
 
     Status err = DisassembleFunction(disassembly_stream, process_sp);
 
     if (!err.Success()) {
-      log->Printf("Couldn't disassemble function : %s",
-                  err.AsCString("unknown error"));
+      LLDB_LOGF(log, "Couldn't disassemble function : %s",
+                err.AsCString("unknown error"));
     } else {
-      log->Printf("Function disassembly:\n%s", disassembly_stream.GetData());
+      LLDB_LOGF(log, "Function disassembly:\n%s", disassembly_stream.GetData());
     }
 
-    log->Printf("Sections: ");
+    LLDB_LOGF(log, "Sections: ");
     for (AllocationRecord &record : m_records) {
       if (record.m_process_address != LLDB_INVALID_ADDRESS) {
         record.dump(log);
@@ -599,11 +598,10 @@
       GetSectionTypeFromSectionName(SectionName, AllocationKind::Code), Size,
       Alignment, SectionID, SectionName.str().c_str()));
 
-  if (log) {
-    log->Printf("IRExecutionUnit::allocateCodeSection(Size=0x%" PRIx64
-                ", Alignment=%u, SectionID=%u) = %p",
-                (uint64_t)Size, Alignment, SectionID, (void *)return_value);
-  }
+  LLDB_LOGF(log,
+            "IRExecutionUnit::allocateCodeSection(Size=0x%" PRIx64
+            ", Alignment=%u, SectionID=%u) = %p",
+            (uint64_t)Size, Alignment, SectionID, (void *)return_value);
 
   if (m_parent.m_reported_allocations) {
     Status err;
@@ -631,11 +629,10 @@
       (uintptr_t)return_value, permissions,
       GetSectionTypeFromSectionName(SectionName, AllocationKind::Data), Size,
       Alignment, SectionID, SectionName.str().c_str()));
-  if (log) {
-    log->Printf("IRExecutionUnit::allocateDataSection(Size=0x%" PRIx64
-                ", Alignment=%u, SectionID=%u) = %p",
-                (uint64_t)Size, Alignment, SectionID, (void *)return_value);
-  }
+  LLDB_LOGF(log,
+            "IRExecutionUnit::allocateDataSection(Size=0x%" PRIx64
+            ", Alignment=%u, SectionID=%u) = %p",
+            (uint64_t)Size, Alignment, SectionID, (void *)return_value);
 
   if (m_parent.m_reported_allocations) {
     Status err;
@@ -661,11 +658,7 @@
   if (!sym_ctx.module_sp)
     return ConstString();
 
-  SymbolVendor *sym_vendor = sym_ctx.module_sp->GetSymbolVendor();
-  if (!sym_vendor)
-    return ConstString();
-
-  lldb_private::SymbolFile *sym_file = sym_vendor->GetSymbolFile();
+  lldb_private::SymbolFile *sym_file = sym_ctx.module_sp->GetSymbolFile();
   if (!sym_file)
     return ConstString();
 
@@ -676,7 +669,7 @@
   std::vector<ConstString> param_matches;
   for (size_t i = 0; i < alternates.size(); i++) {
     ConstString alternate_mangled_name = alternates[i];
-    Mangled mangled(alternate_mangled_name, true);
+    Mangled mangled(alternate_mangled_name);
     ConstString demangled = mangled.GetDemangledName(lang_type);
 
     CPlusPlusLanguage::MethodName alternate_cpp_name(demangled);
@@ -724,7 +717,7 @@
     ConstString name = C_spec.name;
 
     if (CPlusPlusLanguage::IsCPPMangledName(name.GetCString())) {
-      Mangled mangled(name, true);
+      Mangled mangled(name);
       ConstString demangled =
           mangled.GetDemangledName(lldb::eLanguageTypeC_plus_plus);
 
@@ -735,8 +728,6 @@
         if (best_alternate_mangled_name) {
           CPP_specs.push_back(best_alternate_mangled_name);
         }
-
-        CPP_specs.push_back(SearchSpec(demangled, lldb::eFunctionNameTypeFull));
       }
     }
 
@@ -861,7 +852,6 @@
       sc.module_sp->FindFunctions(spec.name, nullptr, spec.mask,
                                   true,  // include_symbols
                                   false, // include_inlines
-                                  true,  // append
                                   sc_list);
     }
 
@@ -877,7 +867,6 @@
       sc.target_sp->GetImages().FindFunctions(spec.name, spec.mask,
                                               true,  // include_symbols
                                               false, // include_inlines
-                                              true,  // append
                                               sc_list);
     }
 
@@ -986,30 +975,49 @@
 
 void IRExecutionUnit::GetStaticInitializers(
     std::vector<lldb::addr_t> &static_initializers) {
-  if (llvm::GlobalVariable *global_ctors =
-          m_module->getNamedGlobal("llvm.global_ctors")) {
-    if (llvm::ConstantArray *ctor_array = llvm::dyn_cast<llvm::ConstantArray>(
-            global_ctors->getInitializer())) {
-      for (llvm::Use &ctor_use : ctor_array->operands()) {
-        if (llvm::ConstantStruct *ctor_struct =
-                llvm::dyn_cast<llvm::ConstantStruct>(ctor_use)) {
-          lldbassert(ctor_struct->getNumOperands() ==
-                     3); // this is standardized
-          if (llvm::Function *ctor_function =
-                  llvm::dyn_cast<llvm::Function>(ctor_struct->getOperand(1))) {
-            ConstString ctor_function_name_cs(ctor_function->getName().str());
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-            for (JittedFunction &jitted_function : m_jitted_functions) {
-              if (ctor_function_name_cs == jitted_function.m_name) {
-                if (jitted_function.m_remote_addr != LLDB_INVALID_ADDRESS) {
-                  static_initializers.push_back(jitted_function.m_remote_addr);
-                }
-                break;
-              }
-            }
-          }
-        }
+  llvm::GlobalVariable *global_ctors =
+      m_module->getNamedGlobal("llvm.global_ctors");
+  if (!global_ctors) {
+    LLDB_LOG(log, "Couldn't find llvm.global_ctors.");
+    return;
+  }
+  auto *ctor_array =
+      llvm::dyn_cast<llvm::ConstantArray>(global_ctors->getInitializer());
+  if (!ctor_array) {
+    LLDB_LOG(log, "llvm.global_ctors not a ConstantArray.");
+    return;
+  }
+
+  for (llvm::Use &ctor_use : ctor_array->operands()) {
+    auto *ctor_struct = llvm::dyn_cast<llvm::ConstantStruct>(ctor_use);
+    if (!ctor_struct)
+      continue;
+    // this is standardized
+    lldbassert(ctor_struct->getNumOperands() == 3);
+    auto *ctor_function =
+        llvm::dyn_cast<llvm::Function>(ctor_struct->getOperand(1));
+    if (!ctor_function) {
+      LLDB_LOG(log, "global_ctor doesn't contain an llvm::Function");
+      continue;
+    }
+
+    ConstString ctor_function_name(ctor_function->getName().str());
+    LLDB_LOG(log, "Looking for callable jitted function with name {0}.",
+             ctor_function_name);
+
+    for (JittedFunction &jitted_function : m_jitted_functions) {
+      if (ctor_function_name != jitted_function.m_name)
+        continue;
+      if (jitted_function.m_remote_addr == LLDB_INVALID_ADDRESS) {
+        LLDB_LOG(log, "Found jitted function with invalid address.");
+        continue;
       }
+      static_initializers.push_back(jitted_function.m_remote_addr);
+      LLDB_LOG(log, "Calling function at address {0:x}.",
+               jitted_function.m_remote_addr);
+      break;
     }
   }
 }
@@ -1042,17 +1050,15 @@
   lldb::addr_t ret = m_parent.FindSymbol(name_cs, missing_weak);
 
   if (ret == LLDB_INVALID_ADDRESS) {
-    if (log)
-      log->Printf(
-          "IRExecutionUnit::getSymbolAddress(Name=\"%s\") = <not found>",
-          Name.c_str());
+    LLDB_LOGF(log,
+              "IRExecutionUnit::getSymbolAddress(Name=\"%s\") = <not found>",
+              Name.c_str());
 
     m_parent.ReportSymbolLookupError(name_cs);
     return 0;
   } else {
-    if (log)
-      log->Printf("IRExecutionUnit::getSymbolAddress(Name=\"%s\") = %" PRIx64,
-                  Name.c_str(), ret);
+    LLDB_LOGF(log, "IRExecutionUnit::getSymbolAddress(Name=\"%s\") = %" PRIx64,
+              Name.c_str(), ret);
     return ret;
   }
 }
@@ -1075,15 +1081,14 @@
       lldb::addr_t ret =
           record.m_process_address + (local_address - record.m_host_address);
 
-      if (log) {
-        log->Printf(
-            "IRExecutionUnit::GetRemoteAddressForLocal() found 0x%" PRIx64
-            " in [0x%" PRIx64 "..0x%" PRIx64 "], and returned 0x%" PRIx64
-            " from [0x%" PRIx64 "..0x%" PRIx64 "].",
-            local_address, (uint64_t)record.m_host_address,
-            (uint64_t)record.m_host_address + (uint64_t)record.m_size, ret,
-            record.m_process_address, record.m_process_address + record.m_size);
-      }
+      LLDB_LOGF(log,
+                "IRExecutionUnit::GetRemoteAddressForLocal() found 0x%" PRIx64
+                " in [0x%" PRIx64 "..0x%" PRIx64 "], and returned 0x%" PRIx64
+                " from [0x%" PRIx64 "..0x%" PRIx64 "].",
+                local_address, (uint64_t)record.m_host_address,
+                (uint64_t)record.m_host_address + (uint64_t)record.m_size, ret,
+                record.m_process_address,
+                record.m_process_address + record.m_size);
 
       return ret;
     }
@@ -1210,10 +1215,11 @@
   if (!log)
     return;
 
-  log->Printf("[0x%llx+0x%llx]->0x%llx (alignment %d, section ID %d, name %s)",
-              (unsigned long long)m_host_address, (unsigned long long)m_size,
-              (unsigned long long)m_process_address, (unsigned)m_alignment,
-              (unsigned)m_section_id, m_name.c_str());
+  LLDB_LOGF(log,
+            "[0x%llx+0x%llx]->0x%llx (alignment %d, section ID %d, name %s)",
+            (unsigned long long)m_host_address, (unsigned long long)m_size,
+            (unsigned long long)m_process_address, (unsigned)m_alignment,
+            (unsigned)m_section_id, m_name.c_str());
 }
 
 lldb::ByteOrder IRExecutionUnit::GetByteOrder() const {
diff --git a/src/llvm-project/lldb/source/Expression/IRInterpreter.cpp b/src/llvm-project/lldb/source/Expression/IRInterpreter.cpp
index 5a9814d..b2e4be5 100644
--- a/src/llvm-project/lldb/source/Expression/IRInterpreter.cpp
+++ b/src/llvm-project/lldb/source/Expression/IRInterpreter.cpp
@@ -327,10 +327,11 @@
         lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
     if (log) {
-      log->Printf("Made an allocation for argument %s",
-                  PrintValue(value).c_str());
-      log->Printf("  Data region    : %llx", (unsigned long long)address);
-      log->Printf("  Ref region     : %llx", (unsigned long long)data_address);
+      LLDB_LOGF(log, "Made an allocation for argument %s",
+                PrintValue(value).c_str());
+      LLDB_LOGF(log, "  Data region    : %llx", (unsigned long long)address);
+      LLDB_LOGF(log, "  Ref region     : %llx",
+                (unsigned long long)data_address);
     }
 
     return true;
@@ -489,13 +490,10 @@
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
   bool saw_function_with_body = false;
-
-  for (Module::iterator fi = module.begin(), fe = module.end(); fi != fe;
-       ++fi) {
-    if (fi->begin() != fi->end()) {
+  for (Function &f : module) {
+    if (f.begin() != f.end()) {
       if (saw_function_with_body) {
-        if (log)
-          log->Printf("More than one function in the module has a body");
+        LLDB_LOGF(log, "More than one function in the module has a body");
         error.SetErrorToGenericError();
         error.SetErrorString(too_many_functions_error);
         return false;
@@ -504,14 +502,11 @@
     }
   }
 
-  for (Function::iterator bbi = function.begin(), bbe = function.end();
-       bbi != bbe; ++bbi) {
-    for (BasicBlock::iterator ii = bbi->begin(), ie = bbi->end(); ii != ie;
-         ++ii) {
-      switch (ii->getOpcode()) {
+  for (BasicBlock &bb : function) {
+    for (Instruction &ii : bb) {
+      switch (ii.getOpcode()) {
       default: {
-        if (log)
-          log->Printf("Unsupported instruction: %s", PrintValue(&*ii).c_str());
+        LLDB_LOGF(log, "Unsupported instruction: %s", PrintValue(&ii).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(unsupported_opcode_error);
         return false;
@@ -523,7 +518,7 @@
       case Instruction::PHI:
         break;
       case Instruction::Call: {
-        CallInst *call_inst = dyn_cast<CallInst>(ii);
+        CallInst *call_inst = dyn_cast<CallInst>(&ii);
 
         if (!call_inst) {
           error.SetErrorToGenericError();
@@ -532,9 +527,8 @@
         }
 
         if (!CanIgnoreCall(call_inst) && !support_function_calls) {
-          if (log)
-            log->Printf("Unsupported instruction: %s",
-                        PrintValue(&*ii).c_str());
+          LLDB_LOGF(log, "Unsupported instruction: %s",
+                    PrintValue(&ii).c_str());
           error.SetErrorToGenericError();
           error.SetErrorString(unsupported_opcode_error);
           return false;
@@ -543,7 +537,7 @@
       case Instruction::GetElementPtr:
         break;
       case Instruction::ICmp: {
-        ICmpInst *icmp_inst = dyn_cast<ICmpInst>(ii);
+        ICmpInst *icmp_inst = dyn_cast<ICmpInst>(&ii);
 
         if (!icmp_inst) {
           error.SetErrorToGenericError();
@@ -553,9 +547,8 @@
 
         switch (icmp_inst->getPredicate()) {
         default: {
-          if (log)
-            log->Printf("Unsupported ICmp predicate: %s",
-                        PrintValue(&*ii).c_str());
+          LLDB_LOGF(log, "Unsupported ICmp predicate: %s",
+                    PrintValue(&ii).c_str());
 
           error.SetErrorToGenericError();
           error.SetErrorString(unsupported_opcode_error);
@@ -597,17 +590,16 @@
         break;
       }
 
-      for (int oi = 0, oe = ii->getNumOperands(); oi != oe; ++oi) {
-        Value *operand = ii->getOperand(oi);
+      for (unsigned oi = 0, oe = ii.getNumOperands(); oi != oe; ++oi) {
+        Value *operand = ii.getOperand(oi);
         Type *operand_type = operand->getType();
 
         switch (operand_type->getTypeID()) {
         default:
           break;
         case Type::VectorTyID: {
-          if (log)
-            log->Printf("Unsupported operand type: %s",
-                        PrintType(operand_type).c_str());
+          LLDB_LOGF(log, "Unsupported operand type: %s",
+                    PrintType(operand_type).c_str());
           error.SetErrorString(unsupported_operand_error);
           return false;
         }
@@ -618,18 +610,16 @@
         // we can just fall back to the JIT rather than
         // choking.
         if (operand_type->getPrimitiveSizeInBits() > 64) {
-          if (log)
-            log->Printf("Unsupported operand type: %s",
-                        PrintType(operand_type).c_str());
+          LLDB_LOGF(log, "Unsupported operand type: %s",
+                    PrintType(operand_type).c_str());
           error.SetErrorString(unsupported_operand_error);
           return false;
         }
 
         if (Constant *constant = llvm::dyn_cast<Constant>(operand)) {
           if (!CanResolveConstant(constant)) {
-            if (log)
-              log->Printf("Unsupported constant: %s",
-                          PrintValue(constant).c_str());
+            LLDB_LOGF(log, "Unsupported constant: %s",
+                      PrintValue(constant).c_str());
             error.SetErrorString(unsupported_operand_error);
             return false;
           }
@@ -659,8 +649,8 @@
 
     oss.flush();
 
-    log->Printf("Module as passed in to IRInterpreter::Interpret: \n\"%s\"",
-                s.c_str());
+    LLDB_LOGF(log, "Module as passed in to IRInterpreter::Interpret: \n\"%s\"",
+              s.c_str());
   }
 
   DataLayout data_layout(&module);
@@ -694,8 +684,7 @@
   while (frame.m_ii != frame.m_ie && (++num_insts < 4096)) {
     const Instruction *inst = &*frame.m_ii;
 
-    if (log)
-      log->Printf("Interpreting %s", PrintValue(inst).c_str());
+    LLDB_LOGF(log, "Interpreting %s", PrintValue(inst).c_str());
 
     switch (inst->getOpcode()) {
     default:
@@ -717,10 +706,10 @@
       const BinaryOperator *bin_op = dyn_cast<BinaryOperator>(inst);
 
       if (!bin_op) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns %s, but instruction is not a BinaryOperator",
-              inst->getOpcodeName());
+        LLDB_LOGF(
+            log,
+            "getOpcode() returns %s, but instruction is not a BinaryOperator",
+            inst->getOpcodeName());
         error.SetErrorToGenericError();
         error.SetErrorString(interpreter_internal_error);
         return false;
@@ -733,16 +722,14 @@
       lldb_private::Scalar R;
 
       if (!frame.EvaluateValue(L, lhs, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(lhs).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(lhs).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
       }
 
       if (!frame.EvaluateValue(R, rhs, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(rhs).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(rhs).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -806,28 +793,18 @@
       frame.AssignValue(inst, result, module);
 
       if (log) {
-        log->Printf("Interpreted a %s", inst->getOpcodeName());
-        log->Printf("  L : %s", frame.SummarizeValue(lhs).c_str());
-        log->Printf("  R : %s", frame.SummarizeValue(rhs).c_str());
-        log->Printf("  = : %s", frame.SummarizeValue(inst).c_str());
+        LLDB_LOGF(log, "Interpreted a %s", inst->getOpcodeName());
+        LLDB_LOGF(log, "  L : %s", frame.SummarizeValue(lhs).c_str());
+        LLDB_LOGF(log, "  R : %s", frame.SummarizeValue(rhs).c_str());
+        LLDB_LOGF(log, "  = : %s", frame.SummarizeValue(inst).c_str());
       }
     } break;
     case Instruction::Alloca: {
-      const AllocaInst *alloca_inst = dyn_cast<AllocaInst>(inst);
-
-      if (!alloca_inst) {
-        if (log)
-          log->Printf("getOpcode() returns Alloca, but instruction is not an "
-                      "AllocaInst");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const AllocaInst *alloca_inst = cast<AllocaInst>(inst);
 
       if (alloca_inst->isArrayAllocation()) {
-        if (log)
-          log->Printf(
-              "AllocaInsts are not handled if isArrayAllocation() is true");
+        LLDB_LOGF(log,
+                  "AllocaInsts are not handled if isArrayAllocation() is true");
         error.SetErrorToGenericError();
         error.SetErrorString(unsupported_opcode_error);
         return false;
@@ -846,8 +823,7 @@
       lldb::addr_t R = frame.Malloc(T);
 
       if (R == LLDB_INVALID_ADDRESS) {
-        if (log)
-          log->Printf("Couldn't allocate memory for an AllocaInst");
+        LLDB_LOGF(log, "Couldn't allocate memory for an AllocaInst");
         error.SetErrorToGenericError();
         error.SetErrorString(memory_allocation_error);
         return false;
@@ -856,8 +832,8 @@
       lldb::addr_t P = frame.Malloc(Tptr);
 
       if (P == LLDB_INVALID_ADDRESS) {
-        if (log)
-          log->Printf("Couldn't allocate the result pointer for an AllocaInst");
+        LLDB_LOGF(log,
+                  "Couldn't allocate the result pointer for an AllocaInst");
         error.SetErrorToGenericError();
         error.SetErrorString(memory_allocation_error);
         return false;
@@ -868,8 +844,7 @@
       execution_unit.WritePointerToMemory(P, R, write_error);
 
       if (!write_error.Success()) {
-        if (log)
-          log->Printf("Couldn't write the result pointer for an AllocaInst");
+        LLDB_LOGF(log, "Couldn't write the result pointer for an AllocaInst");
         error.SetErrorToGenericError();
         error.SetErrorString(memory_write_error);
         lldb_private::Status free_error;
@@ -881,32 +856,21 @@
       frame.m_values[alloca_inst] = P;
 
       if (log) {
-        log->Printf("Interpreted an AllocaInst");
-        log->Printf("  R : 0x%" PRIx64, R);
-        log->Printf("  P : 0x%" PRIx64, P);
+        LLDB_LOGF(log, "Interpreted an AllocaInst");
+        LLDB_LOGF(log, "  R : 0x%" PRIx64, R);
+        LLDB_LOGF(log, "  P : 0x%" PRIx64, P);
       }
     } break;
     case Instruction::BitCast:
     case Instruction::ZExt: {
-      const CastInst *cast_inst = dyn_cast<CastInst>(inst);
-
-      if (!cast_inst) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns %s, but instruction is not a BitCastInst",
-              cast_inst->getOpcodeName());
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const CastInst *cast_inst = cast<CastInst>(inst);
 
       Value *source = cast_inst->getOperand(0);
 
       lldb_private::Scalar S;
 
       if (!frame.EvaluateValue(S, source, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(source).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(source).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -915,25 +879,14 @@
       frame.AssignValue(inst, S, module);
     } break;
     case Instruction::SExt: {
-      const CastInst *cast_inst = dyn_cast<CastInst>(inst);
-
-      if (!cast_inst) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns %s, but instruction is not a BitCastInst",
-              cast_inst->getOpcodeName());
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const CastInst *cast_inst = cast<CastInst>(inst);
 
       Value *source = cast_inst->getOperand(0);
 
       lldb_private::Scalar S;
 
       if (!frame.EvaluateValue(S, source, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(source).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(source).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -946,16 +899,7 @@
       frame.AssignValue(inst, S_signextend, module);
     } break;
     case Instruction::Br: {
-      const BranchInst *br_inst = dyn_cast<BranchInst>(inst);
-
-      if (!br_inst) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns Br, but instruction is not a BranchInst");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const BranchInst *br_inst = cast<BranchInst>(inst);
 
       if (br_inst->isConditional()) {
         Value *condition = br_inst->getCondition();
@@ -963,8 +907,7 @@
         lldb_private::Scalar C;
 
         if (!frame.EvaluateValue(C, condition, module)) {
-          if (log)
-            log->Printf("Couldn't evaluate %s", PrintValue(condition).c_str());
+          LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(condition).c_str());
           error.SetErrorToGenericError();
           error.SetErrorString(bad_value_error);
           return false;
@@ -976,33 +919,25 @@
           frame.Jump(br_inst->getSuccessor(1));
 
         if (log) {
-          log->Printf("Interpreted a BrInst with a condition");
-          log->Printf("  cond : %s", frame.SummarizeValue(condition).c_str());
+          LLDB_LOGF(log, "Interpreted a BrInst with a condition");
+          LLDB_LOGF(log, "  cond : %s",
+                    frame.SummarizeValue(condition).c_str());
         }
       } else {
         frame.Jump(br_inst->getSuccessor(0));
 
         if (log) {
-          log->Printf("Interpreted a BrInst with no condition");
+          LLDB_LOGF(log, "Interpreted a BrInst with no condition");
         }
       }
     }
       continue;
     case Instruction::PHI: {
-      const PHINode *phi_inst = dyn_cast<PHINode>(inst);
-
-      if (!phi_inst) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns PHI, but instruction is not a PHINode");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const PHINode *phi_inst = cast<PHINode>(inst);
       if (!frame.m_prev_bb) {
-        if (log)
-          log->Printf("Encountered PHI node without having jumped from another "
-                      "basic block");
+        LLDB_LOGF(log,
+                  "Encountered PHI node without having jumped from another "
+                  "basic block");
         error.SetErrorToGenericError();
         error.SetErrorString(interpreter_internal_error);
         return false;
@@ -1011,8 +946,7 @@
       Value *value = phi_inst->getIncomingValueForBlock(frame.m_prev_bb);
       lldb_private::Scalar result;
       if (!frame.EvaluateValue(result, value, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(value).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(value).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -1020,22 +954,13 @@
       frame.AssignValue(inst, result, module);
 
       if (log) {
-        log->Printf("Interpreted a %s", inst->getOpcodeName());
-        log->Printf("  Incoming value : %s",
-                    frame.SummarizeValue(value).c_str());
+        LLDB_LOGF(log, "Interpreted a %s", inst->getOpcodeName());
+        LLDB_LOGF(log, "  Incoming value : %s",
+                  frame.SummarizeValue(value).c_str());
       }
     } break;
     case Instruction::GetElementPtr: {
-      const GetElementPtrInst *gep_inst = dyn_cast<GetElementPtrInst>(inst);
-
-      if (!gep_inst) {
-        if (log)
-          log->Printf("getOpcode() returns GetElementPtr, but instruction is "
-                      "not a GetElementPtrInst");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const GetElementPtrInst *gep_inst = cast<GetElementPtrInst>(inst);
 
       const Value *pointer_operand = gep_inst->getPointerOperand();
       Type *src_elem_ty = gep_inst->getSourceElementType();
@@ -1043,9 +968,8 @@
       lldb_private::Scalar P;
 
       if (!frame.EvaluateValue(P, pointer_operand, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s",
-                      PrintValue(pointer_operand).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s",
+                  PrintValue(pointer_operand).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -1067,17 +991,14 @@
           lldb_private::Scalar I;
 
           if (!frame.EvaluateValue(I, *ii, module)) {
-            if (log)
-              log->Printf("Couldn't evaluate %s", PrintValue(*ii).c_str());
+            LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(*ii).c_str());
             error.SetErrorToGenericError();
             error.SetErrorString(bad_value_error);
             return false;
           }
 
-          if (log)
-            log->Printf("Evaluated constant index %s as %llu",
-                        PrintValue(*ii).c_str(),
-                        I.ULongLong(LLDB_INVALID_ADDRESS));
+          LLDB_LOGF(log, "Evaluated constant index %s as %llu",
+                    PrintValue(*ii).c_str(), I.ULongLong(LLDB_INVALID_ADDRESS));
 
           constant_index = cast<ConstantInt>(ConstantInt::get(
               (*ii)->getType(), I.ULongLong(LLDB_INVALID_ADDRESS)));
@@ -1094,23 +1015,14 @@
       frame.AssignValue(inst, Poffset, module);
 
       if (log) {
-        log->Printf("Interpreted a GetElementPtrInst");
-        log->Printf("  P       : %s",
-                    frame.SummarizeValue(pointer_operand).c_str());
-        log->Printf("  Poffset : %s", frame.SummarizeValue(inst).c_str());
+        LLDB_LOGF(log, "Interpreted a GetElementPtrInst");
+        LLDB_LOGF(log, "  P       : %s",
+                  frame.SummarizeValue(pointer_operand).c_str());
+        LLDB_LOGF(log, "  Poffset : %s", frame.SummarizeValue(inst).c_str());
       }
     } break;
     case Instruction::ICmp: {
-      const ICmpInst *icmp_inst = dyn_cast<ICmpInst>(inst);
-
-      if (!icmp_inst) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns ICmp, but instruction is not an ICmpInst");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const ICmpInst *icmp_inst = cast<ICmpInst>(inst);
 
       CmpInst::Predicate predicate = icmp_inst->getPredicate();
 
@@ -1121,16 +1033,14 @@
       lldb_private::Scalar R;
 
       if (!frame.EvaluateValue(L, lhs, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(lhs).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(lhs).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
       }
 
       if (!frame.EvaluateValue(R, rhs, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(rhs).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(rhs).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -1192,31 +1102,21 @@
       frame.AssignValue(inst, result, module);
 
       if (log) {
-        log->Printf("Interpreted an ICmpInst");
-        log->Printf("  L : %s", frame.SummarizeValue(lhs).c_str());
-        log->Printf("  R : %s", frame.SummarizeValue(rhs).c_str());
-        log->Printf("  = : %s", frame.SummarizeValue(inst).c_str());
+        LLDB_LOGF(log, "Interpreted an ICmpInst");
+        LLDB_LOGF(log, "  L : %s", frame.SummarizeValue(lhs).c_str());
+        LLDB_LOGF(log, "  R : %s", frame.SummarizeValue(rhs).c_str());
+        LLDB_LOGF(log, "  = : %s", frame.SummarizeValue(inst).c_str());
       }
     } break;
     case Instruction::IntToPtr: {
-      const IntToPtrInst *int_to_ptr_inst = dyn_cast<IntToPtrInst>(inst);
-
-      if (!int_to_ptr_inst) {
-        if (log)
-          log->Printf("getOpcode() returns IntToPtr, but instruction is not an "
-                      "IntToPtrInst");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const IntToPtrInst *int_to_ptr_inst = cast<IntToPtrInst>(inst);
 
       Value *src_operand = int_to_ptr_inst->getOperand(0);
 
       lldb_private::Scalar I;
 
       if (!frame.EvaluateValue(I, src_operand, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(src_operand).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(src_operand).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -1225,30 +1125,20 @@
       frame.AssignValue(inst, I, module);
 
       if (log) {
-        log->Printf("Interpreted an IntToPtr");
-        log->Printf("  Src : %s", frame.SummarizeValue(src_operand).c_str());
-        log->Printf("  =   : %s", frame.SummarizeValue(inst).c_str());
+        LLDB_LOGF(log, "Interpreted an IntToPtr");
+        LLDB_LOGF(log, "  Src : %s", frame.SummarizeValue(src_operand).c_str());
+        LLDB_LOGF(log, "  =   : %s", frame.SummarizeValue(inst).c_str());
       }
     } break;
     case Instruction::PtrToInt: {
-      const PtrToIntInst *ptr_to_int_inst = dyn_cast<PtrToIntInst>(inst);
-
-      if (!ptr_to_int_inst) {
-        if (log)
-          log->Printf("getOpcode() returns PtrToInt, but instruction is not an "
-                      "PtrToIntInst");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const PtrToIntInst *ptr_to_int_inst = cast<PtrToIntInst>(inst);
 
       Value *src_operand = ptr_to_int_inst->getOperand(0);
 
       lldb_private::Scalar I;
 
       if (!frame.EvaluateValue(I, src_operand, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(src_operand).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(src_operand).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -1257,30 +1147,20 @@
       frame.AssignValue(inst, I, module);
 
       if (log) {
-        log->Printf("Interpreted a PtrToInt");
-        log->Printf("  Src : %s", frame.SummarizeValue(src_operand).c_str());
-        log->Printf("  =   : %s", frame.SummarizeValue(inst).c_str());
+        LLDB_LOGF(log, "Interpreted a PtrToInt");
+        LLDB_LOGF(log, "  Src : %s", frame.SummarizeValue(src_operand).c_str());
+        LLDB_LOGF(log, "  =   : %s", frame.SummarizeValue(inst).c_str());
       }
     } break;
     case Instruction::Trunc: {
-      const TruncInst *trunc_inst = dyn_cast<TruncInst>(inst);
-
-      if (!trunc_inst) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns Trunc, but instruction is not a TruncInst");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const TruncInst *trunc_inst = cast<TruncInst>(inst);
 
       Value *src_operand = trunc_inst->getOperand(0);
 
       lldb_private::Scalar I;
 
       if (!frame.EvaluateValue(I, src_operand, module)) {
-        if (log)
-          log->Printf("Couldn't evaluate %s", PrintValue(src_operand).c_str());
+        LLDB_LOGF(log, "Couldn't evaluate %s", PrintValue(src_operand).c_str());
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -1289,22 +1169,13 @@
       frame.AssignValue(inst, I, module);
 
       if (log) {
-        log->Printf("Interpreted a Trunc");
-        log->Printf("  Src : %s", frame.SummarizeValue(src_operand).c_str());
-        log->Printf("  =   : %s", frame.SummarizeValue(inst).c_str());
+        LLDB_LOGF(log, "Interpreted a Trunc");
+        LLDB_LOGF(log, "  Src : %s", frame.SummarizeValue(src_operand).c_str());
+        LLDB_LOGF(log, "  =   : %s", frame.SummarizeValue(inst).c_str());
       }
     } break;
     case Instruction::Load: {
-      const LoadInst *load_inst = dyn_cast<LoadInst>(inst);
-
-      if (!load_inst) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns Load, but instruction is not a LoadInst");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const LoadInst *load_inst = cast<LoadInst>(inst);
 
       // The semantics of Load are:
       //   Create a region D that will contain the loaded data
@@ -1317,8 +1188,7 @@
       Type *pointer_ty = pointer_operand->getType();
       PointerType *pointer_ptr_ty = dyn_cast<PointerType>(pointer_ty);
       if (!pointer_ptr_ty) {
-        if (log)
-          log->Printf("getPointerOperand()->getType() is not a PointerType");
+        LLDB_LOGF(log, "getPointerOperand()->getType() is not a PointerType");
         error.SetErrorToGenericError();
         error.SetErrorString(interpreter_internal_error);
         return false;
@@ -1329,16 +1199,14 @@
       lldb::addr_t P = frame.ResolveValue(pointer_operand, module);
 
       if (D == LLDB_INVALID_ADDRESS) {
-        if (log)
-          log->Printf("LoadInst's value doesn't resolve to anything");
+        LLDB_LOGF(log, "LoadInst's value doesn't resolve to anything");
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
       }
 
       if (P == LLDB_INVALID_ADDRESS) {
-        if (log)
-          log->Printf("LoadInst's pointer doesn't resolve to anything");
+        LLDB_LOGF(log, "LoadInst's pointer doesn't resolve to anything");
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -1349,8 +1217,7 @@
       execution_unit.ReadPointerFromMemory(&R, P, read_error);
 
       if (!read_error.Success()) {
-        if (log)
-          log->Printf("Couldn't read the address to be loaded for a LoadInst");
+        LLDB_LOGF(log, "Couldn't read the address to be loaded for a LoadInst");
         error.SetErrorToGenericError();
         error.SetErrorString(memory_read_error);
         return false;
@@ -1363,8 +1230,7 @@
       execution_unit.ReadMemory(buffer.GetBytes(), R, buffer.GetByteSize(),
                                 read_error);
       if (!read_error.Success()) {
-        if (log)
-          log->Printf("Couldn't read from a region on behalf of a LoadInst");
+        LLDB_LOGF(log, "Couldn't read from a region on behalf of a LoadInst");
         error.SetErrorToGenericError();
         error.SetErrorString(memory_read_error);
         return false;
@@ -1374,34 +1240,24 @@
       execution_unit.WriteMemory(D, buffer.GetBytes(), buffer.GetByteSize(),
                                  write_error);
       if (!write_error.Success()) {
-        if (log)
-          log->Printf("Couldn't write to a region on behalf of a LoadInst");
+        LLDB_LOGF(log, "Couldn't write to a region on behalf of a LoadInst");
         error.SetErrorToGenericError();
         error.SetErrorString(memory_read_error);
         return false;
       }
 
       if (log) {
-        log->Printf("Interpreted a LoadInst");
-        log->Printf("  P : 0x%" PRIx64, P);
-        log->Printf("  R : 0x%" PRIx64, R);
-        log->Printf("  D : 0x%" PRIx64, D);
+        LLDB_LOGF(log, "Interpreted a LoadInst");
+        LLDB_LOGF(log, "  P : 0x%" PRIx64, P);
+        LLDB_LOGF(log, "  R : 0x%" PRIx64, R);
+        LLDB_LOGF(log, "  D : 0x%" PRIx64, D);
       }
     } break;
     case Instruction::Ret: {
       return true;
     }
     case Instruction::Store: {
-      const StoreInst *store_inst = dyn_cast<StoreInst>(inst);
-
-      if (!store_inst) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns Store, but instruction is not a StoreInst");
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const StoreInst *store_inst = cast<StoreInst>(inst);
 
       // The semantics of Store are:
       //   Resolve the region D containing the data to be stored
@@ -1422,16 +1278,14 @@
       lldb::addr_t P = frame.ResolveValue(pointer_operand, module);
 
       if (D == LLDB_INVALID_ADDRESS) {
-        if (log)
-          log->Printf("StoreInst's value doesn't resolve to anything");
+        LLDB_LOGF(log, "StoreInst's value doesn't resolve to anything");
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
       }
 
       if (P == LLDB_INVALID_ADDRESS) {
-        if (log)
-          log->Printf("StoreInst's pointer doesn't resolve to anything");
+        LLDB_LOGF(log, "StoreInst's pointer doesn't resolve to anything");
         error.SetErrorToGenericError();
         error.SetErrorString(bad_value_error);
         return false;
@@ -1442,8 +1296,7 @@
       execution_unit.ReadPointerFromMemory(&R, P, read_error);
 
       if (!read_error.Success()) {
-        if (log)
-          log->Printf("Couldn't read the address to be loaded for a LoadInst");
+        LLDB_LOGF(log, "Couldn't read the address to be loaded for a LoadInst");
         error.SetErrorToGenericError();
         error.SetErrorString(memory_read_error);
         return false;
@@ -1456,8 +1309,7 @@
       execution_unit.ReadMemory(buffer.GetBytes(), D, buffer.GetByteSize(),
                                 read_error);
       if (!read_error.Success()) {
-        if (log)
-          log->Printf("Couldn't read from a region on behalf of a StoreInst");
+        LLDB_LOGF(log, "Couldn't read from a region on behalf of a StoreInst");
         error.SetErrorToGenericError();
         error.SetErrorString(memory_read_error);
         return false;
@@ -1467,32 +1319,21 @@
       execution_unit.WriteMemory(R, buffer.GetBytes(), buffer.GetByteSize(),
                                  write_error);
       if (!write_error.Success()) {
-        if (log)
-          log->Printf("Couldn't write to a region on behalf of a StoreInst");
+        LLDB_LOGF(log, "Couldn't write to a region on behalf of a StoreInst");
         error.SetErrorToGenericError();
         error.SetErrorString(memory_write_error);
         return false;
       }
 
       if (log) {
-        log->Printf("Interpreted a StoreInst");
-        log->Printf("  D : 0x%" PRIx64, D);
-        log->Printf("  P : 0x%" PRIx64, P);
-        log->Printf("  R : 0x%" PRIx64, R);
+        LLDB_LOGF(log, "Interpreted a StoreInst");
+        LLDB_LOGF(log, "  D : 0x%" PRIx64, D);
+        LLDB_LOGF(log, "  P : 0x%" PRIx64, P);
+        LLDB_LOGF(log, "  R : 0x%" PRIx64, R);
       }
     } break;
     case Instruction::Call: {
-      const CallInst *call_inst = dyn_cast<CallInst>(inst);
-
-      if (!call_inst) {
-        if (log)
-          log->Printf(
-              "getOpcode() returns %s, but instruction is not a CallInst",
-              inst->getOpcodeName());
-        error.SetErrorToGenericError();
-        error.SetErrorString(interpreter_internal_error);
-        return false;
-      }
+      const CallInst *call_inst = cast<CallInst>(inst);
 
       if (CanIgnoreCall(call_inst))
         break;
diff --git a/src/llvm-project/lldb/source/Expression/IRMemoryMap.cpp b/src/llvm-project/lldb/source/Expression/IRMemoryMap.cpp
index 70e62ac..02a875e 100644
--- a/src/llvm-project/lldb/source/Expression/IRMemoryMap.cpp
+++ b/src/llvm-project/lldb/source/Expression/IRMemoryMap.cpp
@@ -327,12 +327,12 @@
     break;
   case eAllocationPolicyMirror:
     process_sp = m_process_wp.lock();
-    if (log)
-      log->Printf("IRMemoryMap::%s process_sp=0x%" PRIx64
-                  ", process_sp->CanJIT()=%s, process_sp->IsAlive()=%s",
-                  __FUNCTION__, (lldb::addr_t)process_sp.get(),
-                  process_sp && process_sp->CanJIT() ? "true" : "false",
-                  process_sp && process_sp->IsAlive() ? "true" : "false");
+    LLDB_LOGF(log,
+              "IRMemoryMap::%s process_sp=0x%" PRIxPTR
+              ", process_sp->CanJIT()=%s, process_sp->IsAlive()=%s",
+              __FUNCTION__, reinterpret_cast<uintptr_t>(process_sp.get()),
+              process_sp && process_sp->CanJIT() ? "true" : "false",
+              process_sp && process_sp->IsAlive() ? "true" : "false");
     if (process_sp && process_sp->CanJIT() && process_sp->IsAlive()) {
       if (!zero_memory)
         allocation_address =
@@ -344,10 +344,10 @@
       if (!error.Success())
         return LLDB_INVALID_ADDRESS;
     } else {
-      if (log)
-        log->Printf("IRMemoryMap::%s switching to eAllocationPolicyHostOnly "
-                    "due to failed condition (see previous expr log message)",
-                    __FUNCTION__);
+      LLDB_LOGF(log,
+                "IRMemoryMap::%s switching to eAllocationPolicyHostOnly "
+                "due to failed condition (see previous expr log message)",
+                __FUNCTION__);
       policy = eAllocationPolicyHostOnly;
       allocation_address = FindSpace(allocation_size);
       if (allocation_address == LLDB_INVALID_ADDRESS) {
@@ -417,10 +417,11 @@
       break;
     }
 
-    log->Printf("IRMemoryMap::Malloc (%" PRIu64 ", 0x%" PRIx64 ", 0x%" PRIx64
-                ", %s) -> 0x%" PRIx64,
-                (uint64_t)allocation_size, (uint64_t)alignment,
-                (uint64_t)permissions, policy_string, aligned_address);
+    LLDB_LOGF(log,
+              "IRMemoryMap::Malloc (%" PRIu64 ", 0x%" PRIx64 ", 0x%" PRIx64
+              ", %s) -> 0x%" PRIx64,
+              (uint64_t)allocation_size, (uint64_t)alignment,
+              (uint64_t)permissions, policy_string, aligned_address);
   }
 
   return aligned_address;
@@ -477,10 +478,11 @@
 
   if (lldb_private::Log *log =
           lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)) {
-    log->Printf("IRMemoryMap::Free (0x%" PRIx64 ") freed [0x%" PRIx64
-                "..0x%" PRIx64 ")",
-                (uint64_t)process_address, iter->second.m_process_start,
-                iter->second.m_process_start + iter->second.m_size);
+    LLDB_LOGF(log,
+              "IRMemoryMap::Free (0x%" PRIx64 ") freed [0x%" PRIx64
+              "..0x%" PRIx64 ")",
+              (uint64_t)process_address, iter->second.m_process_start,
+              iter->second.m_process_start + iter->second.m_size);
   }
 
   m_allocations.erase(iter);
@@ -574,12 +576,13 @@
 
   if (lldb_private::Log *log =
           lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)) {
-    log->Printf("IRMemoryMap::WriteMemory (0x%" PRIx64 ", 0x%" PRIx64
-                ", 0x%" PRId64 ") went to [0x%" PRIx64 "..0x%" PRIx64 ")",
-                (uint64_t)process_address, (uint64_t)bytes, (uint64_t)size,
-                (uint64_t)allocation.m_process_start,
-                (uint64_t)allocation.m_process_start +
-                    (uint64_t)allocation.m_size);
+    LLDB_LOGF(log,
+              "IRMemoryMap::WriteMemory (0x%" PRIx64 ", 0x%" PRIxPTR
+              ", 0x%" PRId64 ") went to [0x%" PRIx64 "..0x%" PRIx64 ")",
+              (uint64_t)process_address, reinterpret_cast<uintptr_t>(bytes), (uint64_t)size,
+              (uint64_t)allocation.m_process_start,
+              (uint64_t)allocation.m_process_start +
+                  (uint64_t)allocation.m_size);
   }
 }
 
@@ -704,12 +707,13 @@
 
   if (lldb_private::Log *log =
           lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)) {
-    log->Printf("IRMemoryMap::ReadMemory (0x%" PRIx64 ", 0x%" PRIx64
-                ", 0x%" PRId64 ") came from [0x%" PRIx64 "..0x%" PRIx64 ")",
-                (uint64_t)process_address, (uint64_t)bytes, (uint64_t)size,
-                (uint64_t)allocation.m_process_start,
-                (uint64_t)allocation.m_process_start +
-                    (uint64_t)allocation.m_size);
+    LLDB_LOGF(log,
+              "IRMemoryMap::ReadMemory (0x%" PRIx64 ", 0x%" PRIxPTR
+              ", 0x%" PRId64 ") came from [0x%" PRIx64 "..0x%" PRIx64 ")",
+              (uint64_t)process_address, reinterpret_cast<uintptr_t>(bytes), (uint64_t)size,
+              (uint64_t)allocation.m_process_start,
+              (uint64_t)allocation.m_process_start +
+                  (uint64_t)allocation.m_size);
   }
 }
 
diff --git a/src/llvm-project/lldb/source/Expression/LLVMUserExpression.cpp b/src/llvm-project/lldb/source/Expression/LLVMUserExpression.cpp
index 5a1b750..1fc878b 100644
--- a/src/llvm-project/lldb/source/Expression/LLVMUserExpression.cpp
+++ b/src/llvm-project/lldb/source/Expression/LLVMUserExpression.cpp
@@ -12,13 +12,12 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Expression/DiagnosticManager.h"
+#include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Expression/IRExecutionUnit.h"
 #include "lldb/Expression/IRInterpreter.h"
 #include "lldb/Expression/Materializer.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Symbol/Block.h"
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolVendor.h"
@@ -36,22 +35,20 @@
 
 using namespace lldb_private;
 
+char LLVMUserExpression::ID;
+
 LLVMUserExpression::LLVMUserExpression(ExecutionContextScope &exe_scope,
                                        llvm::StringRef expr,
                                        llvm::StringRef prefix,
                                        lldb::LanguageType language,
                                        ResultType desired_type,
-                                       const EvaluateExpressionOptions &options,
-                                       ExpressionKind kind)
-    : UserExpression(exe_scope, expr, prefix, language, desired_type, options,
-                     kind),
+                                       const EvaluateExpressionOptions &options)
+    : UserExpression(exe_scope, expr, prefix, language, desired_type, options),
       m_stack_frame_bottom(LLDB_INVALID_ADDRESS),
       m_stack_frame_top(LLDB_INVALID_ADDRESS), m_allow_cxx(false),
       m_allow_objc(false), m_transformed_text(), m_execution_unit_sp(),
-      m_materializer_up(), m_jit_module_wp(), m_enforce_valid_object(true),
-      m_in_cplusplus_method(false), m_in_objectivec_method(false),
-      m_in_static_method(false), m_needs_object_ptr(false), m_target(nullptr),
-      m_can_interpret(false), m_materialized_address(LLDB_INVALID_ADDRESS) {}
+      m_materializer_up(), m_jit_module_wp(), m_can_interpret(false),
+      m_materialized_address(LLDB_INVALID_ADDRESS) {}
 
 LLVMUserExpression::~LLVMUserExpression() {
   if (m_target) {
@@ -73,176 +70,173 @@
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EXPRESSIONS |
                                                   LIBLLDB_LOG_STEP));
 
-  if (m_jit_start_addr != LLDB_INVALID_ADDRESS || m_can_interpret) {
-    lldb::addr_t struct_address = LLDB_INVALID_ADDRESS;
-
-    if (!PrepareToExecuteJITExpression(diagnostic_manager, exe_ctx,
-                                       struct_address)) {
-      diagnostic_manager.Printf(
-          eDiagnosticSeverityError,
-          "errored out in %s, couldn't PrepareToExecuteJITExpression",
-          __FUNCTION__);
-      return lldb::eExpressionSetupError;
-    }
-
-    lldb::addr_t function_stack_bottom = LLDB_INVALID_ADDRESS;
-    lldb::addr_t function_stack_top = LLDB_INVALID_ADDRESS;
-
-    if (m_can_interpret) {
-      llvm::Module *module = m_execution_unit_sp->GetModule();
-      llvm::Function *function = m_execution_unit_sp->GetFunction();
-
-      if (!module || !function) {
-        diagnostic_manager.PutString(
-            eDiagnosticSeverityError,
-            "supposed to interpret, but nothing is there");
-        return lldb::eExpressionSetupError;
-      }
-
-      Status interpreter_error;
-
-      std::vector<lldb::addr_t> args;
-
-      if (!AddArguments(exe_ctx, args, struct_address, diagnostic_manager)) {
-        diagnostic_manager.Printf(eDiagnosticSeverityError,
-                                  "errored out in %s, couldn't AddArguments",
-                                  __FUNCTION__);
-        return lldb::eExpressionSetupError;
-      }
-
-      function_stack_bottom = m_stack_frame_bottom;
-      function_stack_top = m_stack_frame_top;
-
-      IRInterpreter::Interpret(*module, *function, args, *m_execution_unit_sp,
-                               interpreter_error, function_stack_bottom,
-                               function_stack_top, exe_ctx);
-
-      if (!interpreter_error.Success()) {
-        diagnostic_manager.Printf(eDiagnosticSeverityError,
-                                  "supposed to interpret, but failed: %s",
-                                  interpreter_error.AsCString());
-        return lldb::eExpressionDiscarded;
-      }
-    } else {
-      if (!exe_ctx.HasThreadScope()) {
-        diagnostic_manager.Printf(eDiagnosticSeverityError,
-                                  "%s called with no thread selected",
-                                  __FUNCTION__);
-        return lldb::eExpressionSetupError;
-      }
-
-      Address wrapper_address(m_jit_start_addr);
-
-      std::vector<lldb::addr_t> args;
-
-      if (!AddArguments(exe_ctx, args, struct_address, diagnostic_manager)) {
-        diagnostic_manager.Printf(eDiagnosticSeverityError,
-                                  "errored out in %s, couldn't AddArguments",
-                                  __FUNCTION__);
-        return lldb::eExpressionSetupError;
-      }
-
-      lldb::ThreadPlanSP call_plan_sp(new ThreadPlanCallUserExpression(
-          exe_ctx.GetThreadRef(), wrapper_address, args, options,
-          shared_ptr_to_me));
-
-      StreamString ss;
-      if (!call_plan_sp || !call_plan_sp->ValidatePlan(&ss)) {
-        diagnostic_manager.PutString(eDiagnosticSeverityError, ss.GetString());
-        return lldb::eExpressionSetupError;
-      }
-
-      ThreadPlanCallUserExpression *user_expression_plan =
-          static_cast<ThreadPlanCallUserExpression *>(call_plan_sp.get());
-
-      lldb::addr_t function_stack_pointer =
-          user_expression_plan->GetFunctionStackPointer();
-
-      function_stack_bottom = function_stack_pointer - HostInfo::GetPageSize();
-      function_stack_top = function_stack_pointer;
-
-      if (log)
-        log->Printf(
-            "-- [UserExpression::Execute] Execution of expression begins --");
-
-      if (exe_ctx.GetProcessPtr())
-        exe_ctx.GetProcessPtr()->SetRunningUserExpression(true);
-
-      lldb::ExpressionResults execution_result =
-          exe_ctx.GetProcessRef().RunThreadPlan(exe_ctx, call_plan_sp, options,
-                                                diagnostic_manager);
-
-      if (exe_ctx.GetProcessPtr())
-        exe_ctx.GetProcessPtr()->SetRunningUserExpression(false);
-
-      if (log)
-        log->Printf("-- [UserExpression::Execute] Execution of expression "
-                    "completed --");
-
-      if (execution_result == lldb::eExpressionInterrupted ||
-          execution_result == lldb::eExpressionHitBreakpoint) {
-        const char *error_desc = nullptr;
-
-        if (call_plan_sp) {
-          lldb::StopInfoSP real_stop_info_sp = call_plan_sp->GetRealStopInfo();
-          if (real_stop_info_sp)
-            error_desc = real_stop_info_sp->GetDescription();
-        }
-        if (error_desc)
-          diagnostic_manager.Printf(eDiagnosticSeverityError,
-                                    "Execution was interrupted, reason: %s.",
-                                    error_desc);
-        else
-          diagnostic_manager.PutString(eDiagnosticSeverityError,
-                                       "Execution was interrupted.");
-
-        if ((execution_result == lldb::eExpressionInterrupted &&
-             options.DoesUnwindOnError()) ||
-            (execution_result == lldb::eExpressionHitBreakpoint &&
-             options.DoesIgnoreBreakpoints()))
-          diagnostic_manager.AppendMessageToDiagnostic(
-              "The process has been returned to the state before expression "
-              "evaluation.");
-        else {
-          if (execution_result == lldb::eExpressionHitBreakpoint)
-            user_expression_plan->TransferExpressionOwnership();
-          diagnostic_manager.AppendMessageToDiagnostic(
-              "The process has been left at the point where it was "
-              "interrupted, "
-              "use \"thread return -x\" to return to the state before "
-              "expression evaluation.");
-        }
-
-        return execution_result;
-      } else if (execution_result == lldb::eExpressionStoppedForDebug) {
-        diagnostic_manager.PutString(
-            eDiagnosticSeverityRemark,
-            "Execution was halted at the first instruction of the expression "
-            "function because \"debug\" was requested.\n"
-            "Use \"thread return -x\" to return to the state before expression "
-            "evaluation.");
-        return execution_result;
-      } else if (execution_result != lldb::eExpressionCompleted) {
-        diagnostic_manager.Printf(
-            eDiagnosticSeverityError,
-            "Couldn't execute function; result was %s",
-            Process::ExecutionResultAsCString(execution_result));
-        return execution_result;
-      }
-    }
-
-    if (FinalizeJITExecution(diagnostic_manager, exe_ctx, result,
-                             function_stack_bottom, function_stack_top)) {
-      return lldb::eExpressionCompleted;
-    } else {
-      return lldb::eExpressionResultUnavailable;
-    }
-  } else {
+  if (m_jit_start_addr == LLDB_INVALID_ADDRESS && !m_can_interpret) {
     diagnostic_manager.PutString(
         eDiagnosticSeverityError,
         "Expression can't be run, because there is no JIT compiled function");
     return lldb::eExpressionSetupError;
   }
+
+  lldb::addr_t struct_address = LLDB_INVALID_ADDRESS;
+
+  if (!PrepareToExecuteJITExpression(diagnostic_manager, exe_ctx,
+                                     struct_address)) {
+    diagnostic_manager.Printf(
+        eDiagnosticSeverityError,
+        "errored out in %s, couldn't PrepareToExecuteJITExpression",
+        __FUNCTION__);
+    return lldb::eExpressionSetupError;
+  }
+
+  lldb::addr_t function_stack_bottom = LLDB_INVALID_ADDRESS;
+  lldb::addr_t function_stack_top = LLDB_INVALID_ADDRESS;
+
+  if (m_can_interpret) {
+    llvm::Module *module = m_execution_unit_sp->GetModule();
+    llvm::Function *function = m_execution_unit_sp->GetFunction();
+
+    if (!module || !function) {
+      diagnostic_manager.PutString(
+          eDiagnosticSeverityError,
+          "supposed to interpret, but nothing is there");
+      return lldb::eExpressionSetupError;
+    }
+
+    Status interpreter_error;
+
+    std::vector<lldb::addr_t> args;
+
+    if (!AddArguments(exe_ctx, args, struct_address, diagnostic_manager)) {
+      diagnostic_manager.Printf(eDiagnosticSeverityError,
+                                "errored out in %s, couldn't AddArguments",
+                                __FUNCTION__);
+      return lldb::eExpressionSetupError;
+    }
+
+    function_stack_bottom = m_stack_frame_bottom;
+    function_stack_top = m_stack_frame_top;
+
+    IRInterpreter::Interpret(*module, *function, args, *m_execution_unit_sp,
+                             interpreter_error, function_stack_bottom,
+                             function_stack_top, exe_ctx);
+
+    if (!interpreter_error.Success()) {
+      diagnostic_manager.Printf(eDiagnosticSeverityError,
+                                "supposed to interpret, but failed: %s",
+                                interpreter_error.AsCString());
+      return lldb::eExpressionDiscarded;
+    }
+  } else {
+    if (!exe_ctx.HasThreadScope()) {
+      diagnostic_manager.Printf(eDiagnosticSeverityError,
+                                "%s called with no thread selected",
+                                __FUNCTION__);
+      return lldb::eExpressionSetupError;
+    }
+
+    Address wrapper_address(m_jit_start_addr);
+
+    std::vector<lldb::addr_t> args;
+
+    if (!AddArguments(exe_ctx, args, struct_address, diagnostic_manager)) {
+      diagnostic_manager.Printf(eDiagnosticSeverityError,
+                                "errored out in %s, couldn't AddArguments",
+                                __FUNCTION__);
+      return lldb::eExpressionSetupError;
+    }
+
+    lldb::ThreadPlanSP call_plan_sp(new ThreadPlanCallUserExpression(
+        exe_ctx.GetThreadRef(), wrapper_address, args, options,
+        shared_ptr_to_me));
+
+    StreamString ss;
+    if (!call_plan_sp || !call_plan_sp->ValidatePlan(&ss)) {
+      diagnostic_manager.PutString(eDiagnosticSeverityError, ss.GetString());
+      return lldb::eExpressionSetupError;
+    }
+
+    ThreadPlanCallUserExpression *user_expression_plan =
+        static_cast<ThreadPlanCallUserExpression *>(call_plan_sp.get());
+
+    lldb::addr_t function_stack_pointer =
+        user_expression_plan->GetFunctionStackPointer();
+
+    function_stack_bottom = function_stack_pointer - HostInfo::GetPageSize();
+    function_stack_top = function_stack_pointer;
+
+    LLDB_LOGF(log,
+              "-- [UserExpression::Execute] Execution of expression begins --");
+
+    if (exe_ctx.GetProcessPtr())
+      exe_ctx.GetProcessPtr()->SetRunningUserExpression(true);
+
+    lldb::ExpressionResults execution_result =
+        exe_ctx.GetProcessRef().RunThreadPlan(exe_ctx, call_plan_sp, options,
+                                              diagnostic_manager);
+
+    if (exe_ctx.GetProcessPtr())
+      exe_ctx.GetProcessPtr()->SetRunningUserExpression(false);
+
+    LLDB_LOGF(log, "-- [UserExpression::Execute] Execution of expression "
+                   "completed --");
+
+    if (execution_result == lldb::eExpressionInterrupted ||
+        execution_result == lldb::eExpressionHitBreakpoint) {
+      const char *error_desc = nullptr;
+
+      if (call_plan_sp) {
+        lldb::StopInfoSP real_stop_info_sp = call_plan_sp->GetRealStopInfo();
+        if (real_stop_info_sp)
+          error_desc = real_stop_info_sp->GetDescription();
+      }
+      if (error_desc)
+        diagnostic_manager.Printf(eDiagnosticSeverityError,
+                                  "Execution was interrupted, reason: %s.",
+                                  error_desc);
+      else
+        diagnostic_manager.PutString(eDiagnosticSeverityError,
+                                     "Execution was interrupted.");
+
+      if ((execution_result == lldb::eExpressionInterrupted &&
+           options.DoesUnwindOnError()) ||
+          (execution_result == lldb::eExpressionHitBreakpoint &&
+           options.DoesIgnoreBreakpoints()))
+        diagnostic_manager.AppendMessageToDiagnostic(
+            "The process has been returned to the state before expression "
+            "evaluation.");
+      else {
+        if (execution_result == lldb::eExpressionHitBreakpoint)
+          user_expression_plan->TransferExpressionOwnership();
+        diagnostic_manager.AppendMessageToDiagnostic(
+            "The process has been left at the point where it was "
+            "interrupted, "
+            "use \"thread return -x\" to return to the state before "
+            "expression evaluation.");
+      }
+
+      return execution_result;
+    } else if (execution_result == lldb::eExpressionStoppedForDebug) {
+      diagnostic_manager.PutString(
+          eDiagnosticSeverityRemark,
+          "Execution was halted at the first instruction of the expression "
+          "function because \"debug\" was requested.\n"
+          "Use \"thread return -x\" to return to the state before expression "
+          "evaluation.");
+      return execution_result;
+    } else if (execution_result != lldb::eExpressionCompleted) {
+      diagnostic_manager.Printf(
+          eDiagnosticSeverityError, "Couldn't execute function; result was %s",
+          Process::ExecutionResultAsCString(execution_result));
+      return execution_result;
+    }
+  }
+
+  if (FinalizeJITExecution(diagnostic_manager, exe_ctx, result,
+                           function_stack_bottom, function_stack_top)) {
+    return lldb::eExpressionCompleted;
+  } else {
+    return lldb::eExpressionResultUnavailable;
+  }
 }
 
 bool LLVMUserExpression::FinalizeJITExecution(
@@ -251,9 +245,8 @@
     lldb::addr_t function_stack_top) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("-- [UserExpression::FinalizeJITExecution] Dematerializing "
-                "after execution --");
+  LLDB_LOGF(log, "-- [UserExpression::FinalizeJITExecution] Dematerializing "
+                 "after execution --");
 
   if (!m_dematerializer_sp) {
     diagnostic_manager.Printf(eDiagnosticSeverityError,
diff --git a/src/llvm-project/lldb/source/Expression/Materializer.cpp b/src/llvm-project/lldb/source/Expression/Materializer.cpp
index 0f871fc..cd33248 100644
--- a/src/llvm-project/lldb/source/Expression/Materializer.cpp
+++ b/src/llvm-project/lldb/source/Expression/Materializer.cpp
@@ -11,7 +11,6 @@
 #include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/Expression/ExpressionVariable.h"
-#include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Symbol/Type.h"
 #include "lldb/Symbol/Variable.h"
@@ -46,20 +45,6 @@
   return ret;
 }
 
-void Materializer::Entity::SetSizeAndAlignmentFromType(CompilerType &type) {
-  if (llvm::Optional<uint64_t> size = type.GetByteSize(nullptr))
-    m_size = *size;
-
-  uint32_t bit_alignment = type.GetTypeBitAlign();
-
-  if (bit_alignment % 8) {
-    bit_alignment += 8;
-    bit_alignment &= ~((uint32_t)0x111u);
-  }
-
-  m_alignment = bit_alignment / 8;
-}
-
 class EntityPersistentVariable : public Materializer::Entity {
 public:
   EntityPersistentVariable(lldb::ExpressionVariableSP &persistent_variable_sp,
@@ -94,9 +79,8 @@
       return;
     }
 
-    if (log)
-      log->Printf("Allocated %s (0x%" PRIx64 ") successfully",
-                  m_persistent_variable_sp->GetName().GetCString(), mem);
+    LLDB_LOGF(log, "Allocated %s (0x%" PRIx64 ") successfully",
+              m_persistent_variable_sp->GetName().GetCString(), mem);
 
     // Put the location of the spare memory into the live data of the
     // ValueObject.
@@ -158,11 +142,12 @@
     const lldb::addr_t load_addr = process_address + m_offset;
 
     if (log) {
-      log->Printf("EntityPersistentVariable::Materialize [address = 0x%" PRIx64
-                  ", m_name = %s, m_flags = 0x%hx]",
-                  (uint64_t)load_addr,
-                  m_persistent_variable_sp->GetName().AsCString(),
-                  m_persistent_variable_sp->m_flags);
+      LLDB_LOGF(log,
+                "EntityPersistentVariable::Materialize [address = 0x%" PRIx64
+                ", m_name = %s, m_flags = 0x%hx]",
+                (uint64_t)load_addr,
+                m_persistent_variable_sp->GetName().AsCString(),
+                m_persistent_variable_sp->m_flags);
     }
 
     if (m_persistent_variable_sp->m_flags &
@@ -209,12 +194,12 @@
     const lldb::addr_t load_addr = process_address + m_offset;
 
     if (log) {
-      log->Printf(
-          "EntityPersistentVariable::Dematerialize [address = 0x%" PRIx64
-          ", m_name = %s, m_flags = 0x%hx]",
-          (uint64_t)process_address + m_offset,
-          m_persistent_variable_sp->GetName().AsCString(),
-          m_persistent_variable_sp->m_flags);
+      LLDB_LOGF(log,
+                "EntityPersistentVariable::Dematerialize [address = 0x%" PRIx64
+                ", m_name = %s, m_flags = 0x%hx]",
+                (uint64_t)process_address + m_offset,
+                m_persistent_variable_sp->GetName().AsCString(),
+                m_persistent_variable_sp->m_flags);
     }
 
     if (m_delegate) {
@@ -291,11 +276,10 @@
               ExpressionVariable::EVNeedsFreezeDry ||
           m_persistent_variable_sp->m_flags &
               ExpressionVariable::EVKeepInTarget) {
-        if (log)
-          log->Printf(
-              "Dematerializing %s from 0x%" PRIx64 " (size = %llu)",
-              m_persistent_variable_sp->GetName().GetCString(), (uint64_t)mem,
-              (unsigned long long)m_persistent_variable_sp->GetByteSize());
+        LLDB_LOGF(log, "Dematerializing %s from 0x%" PRIx64 " (size = %llu)",
+                  m_persistent_variable_sp->GetName().GetCString(),
+                  (uint64_t)mem,
+                  (unsigned long long)m_persistent_variable_sp->GetByteSize());
 
         // Read the contents of the spare memory area
 
@@ -441,9 +425,10 @@
 
     const lldb::addr_t load_addr = process_address + m_offset;
     if (log) {
-      log->Printf("EntityVariable::Materialize [address = 0x%" PRIx64
-                  ", m_variable_sp = %s]",
-                  (uint64_t)load_addr, m_variable_sp->GetName().AsCString());
+      LLDB_LOGF(log,
+                "EntityVariable::Materialize [address = 0x%" PRIx64
+                ", m_variable_sp = %s]",
+                (uint64_t)load_addr, m_variable_sp->GetName().AsCString());
     }
 
     ExecutionContextScope *scope = frame_sp.get();
@@ -545,12 +530,15 @@
           return;
         }
 
-        size_t bit_align =
-            m_variable_sp->GetType()->GetLayoutCompilerType().GetTypeBitAlign();
-        size_t byte_align = (bit_align + 7) / 8;
+        llvm::Optional<size_t> opt_bit_align =
+            m_variable_sp->GetType()->GetLayoutCompilerType().GetTypeBitAlign(scope);
+        if (!opt_bit_align) {
+          err.SetErrorStringWithFormat("can't get the type alignment for %s",
+                                       m_variable_sp->GetName().AsCString());
+          return;
+        }
 
-        if (!byte_align)
-          byte_align = 1;
+        size_t byte_align = (*opt_bit_align + 7) / 8;
 
         Status alloc_error;
         const bool zero_memory = false;
@@ -606,9 +594,10 @@
 
     const lldb::addr_t load_addr = process_address + m_offset;
     if (log) {
-      log->Printf("EntityVariable::Dematerialize [address = 0x%" PRIx64
-                  ", m_variable_sp = %s]",
-                  (uint64_t)load_addr, m_variable_sp->GetName().AsCString());
+      LLDB_LOGF(log,
+                "EntityVariable::Dematerialize [address = 0x%" PRIx64
+                ", m_variable_sp = %s]",
+                (uint64_t)load_addr, m_variable_sp->GetName().AsCString());
     }
 
     if (m_temporary_allocation != LLDB_INVALID_ADDRESS) {
@@ -802,11 +791,14 @@
         err.SetErrorString("can't get size of type");
         return;
       }
-      size_t bit_align = m_type.GetTypeBitAlign();
-      size_t byte_align = (bit_align + 7) / 8;
 
-      if (!byte_align)
-        byte_align = 1;
+      llvm::Optional<size_t> opt_bit_align = m_type.GetTypeBitAlign(exe_scope);
+      if (!opt_bit_align) {
+        err.SetErrorStringWithFormat("can't get the type alignment");
+        return;
+      }
+
+      size_t byte_align = (*opt_bit_align + 7) / 8;
 
       Status alloc_error;
       const bool zero_memory = true;
@@ -869,20 +861,18 @@
       return;
     }
 
-    Status type_system_error;
-    TypeSystem *type_system = target_sp->GetScratchTypeSystemForLanguage(
-        &type_system_error, m_type.GetMinimumLanguage());
+    auto type_system_or_err =
+        target_sp->GetScratchTypeSystemForLanguage(m_type.GetMinimumLanguage());
 
-    if (!type_system) {
+    if (auto error = type_system_or_err.takeError()) {
       err.SetErrorStringWithFormat("Couldn't dematerialize a result variable: "
                                    "couldn't get the corresponding type "
                                    "system: %s",
-                                   type_system_error.AsCString());
+                                   llvm::toString(std::move(error)).c_str());
       return;
     }
-
     PersistentExpressionState *persistent_state =
-        type_system->GetPersistentExpressionState();
+        type_system_or_err->GetPersistentExpressionState();
 
     if (!persistent_state) {
       err.SetErrorString("Couldn't dematerialize a result variable: "
@@ -1064,9 +1054,10 @@
     const lldb::addr_t load_addr = process_address + m_offset;
 
     if (log) {
-      log->Printf("EntitySymbol::Materialize [address = 0x%" PRIx64
-                  ", m_symbol = %s]",
-                  (uint64_t)load_addr, m_symbol.GetName().AsCString());
+      LLDB_LOGF(log,
+                "EntitySymbol::Materialize [address = 0x%" PRIx64
+                ", m_symbol = %s]",
+                (uint64_t)load_addr, m_symbol.GetName().AsCString());
     }
 
     const Address sym_address = m_symbol.GetAddress();
@@ -1110,9 +1101,10 @@
     const lldb::addr_t load_addr = process_address + m_offset;
 
     if (log) {
-      log->Printf("EntitySymbol::Dematerialize [address = 0x%" PRIx64
-                  ", m_symbol = %s]",
-                  (uint64_t)load_addr, m_symbol.GetName().AsCString());
+      LLDB_LOGF(log,
+                "EntitySymbol::Dematerialize [address = 0x%" PRIx64
+                ", m_symbol = %s]",
+                (uint64_t)load_addr, m_symbol.GetName().AsCString());
     }
 
     // no work needs to be done
@@ -1179,9 +1171,10 @@
     const lldb::addr_t load_addr = process_address + m_offset;
 
     if (log) {
-      log->Printf("EntityRegister::Materialize [address = 0x%" PRIx64
-                  ", m_register_info = %s]",
-                  (uint64_t)load_addr, m_register_info.name);
+      LLDB_LOGF(log,
+                "EntityRegister::Materialize [address = 0x%" PRIx64
+                ", m_register_info = %s]",
+                (uint64_t)load_addr, m_register_info.name);
     }
 
     RegisterValue reg_value;
@@ -1241,9 +1234,10 @@
     const lldb::addr_t load_addr = process_address + m_offset;
 
     if (log) {
-      log->Printf("EntityRegister::Dematerialize [address = 0x%" PRIx64
-                  ", m_register_info = %s]",
-                  (uint64_t)load_addr, m_register_info.name);
+      LLDB_LOGF(log,
+                "EntityRegister::Dematerialize [address = 0x%" PRIx64
+                ", m_register_info = %s]",
+                (uint64_t)load_addr, m_register_info.name);
     }
 
     Status extract_error;
@@ -1380,7 +1374,8 @@
 
   if (Log *log =
           lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)) {
-    log->Printf(
+    LLDB_LOGF(
+        log,
         "Materializer::Materialize (frame_sp = %p, process_address = 0x%" PRIx64
         ") materialized:",
         static_cast<void *>(frame_sp.get()), process_address);
@@ -1415,9 +1410,10 @@
   } else {
     if (Log *log =
             lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS)) {
-      log->Printf("Materializer::Dematerialize (frame_sp = %p, process_address "
-                  "= 0x%" PRIx64 ") about to dematerialize:",
-                  static_cast<void *>(frame_sp.get()), m_process_address);
+      LLDB_LOGF(log,
+                "Materializer::Dematerialize (frame_sp = %p, process_address "
+                "= 0x%" PRIx64 ") about to dematerialize:",
+                static_cast<void *>(frame_sp.get()), m_process_address);
       for (EntityUP &entity_up : m_materializer->m_entities)
         entity_up->DumpToLog(*m_map, m_process_address, log);
     }
diff --git a/src/llvm-project/lldb/source/Expression/REPL.cpp b/src/llvm-project/lldb/source/Expression/REPL.cpp
index f4ed887..fcd0836 100644
--- a/src/llvm-project/lldb/source/Expression/REPL.cpp
+++ b/src/llvm-project/lldb/source/Expression/REPL.cpp
@@ -96,7 +96,7 @@
   lldb::ProcessSP process_sp = m_target.GetProcessSP();
   if (process_sp && process_sp->IsAlive())
     return;
-  lldb::StreamFileSP error_sp(io_handler.GetErrorStreamFile());
+  lldb::StreamFileSP error_sp(io_handler.GetErrorStreamFileSP());
   error_sp->Printf("REPL requires a running target process.\n");
   io_handler.SetIsDone(true);
 }
@@ -180,8 +180,8 @@
 }
 
 void REPL::IOHandlerInputComplete(IOHandler &io_handler, std::string &code) {
-  lldb::StreamFileSP output_sp(io_handler.GetOutputStreamFile());
-  lldb::StreamFileSP error_sp(io_handler.GetErrorStreamFile());
+  lldb::StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
+  lldb::StreamFileSP error_sp(io_handler.GetErrorStreamFileSP());
   bool extra_line = false;
   bool did_quit = false;
 
@@ -206,7 +206,7 @@
       // Meta command
       // Strip the ':'
       code.erase(0, 1);
-      if (Args::StripSpaces(code)) {
+      if (!llvm::StringRef(code).trim().empty()) {
         // "lldb" was followed by arguments, so just execute the command dump
         // the results
 
@@ -283,6 +283,8 @@
 
       PersistentExpressionState *persistent_state =
           m_target.GetPersistentExpressionStateForLanguage(GetLanguage());
+      if (!persistent_state)
+        return;
 
       const size_t var_count_before = persistent_state->GetSize();
 
@@ -398,17 +400,22 @@
 
           // Update our code on disk
           if (!m_repl_source_path.empty()) {
-            lldb_private::File file;
-            FileSystem::Instance().Open(file, FileSpec(m_repl_source_path),
-                                        File::eOpenOptionWrite |
-                                            File::eOpenOptionTruncate |
-                                            File::eOpenOptionCanCreate,
-                                        lldb::eFilePermissionsFileDefault);
-            std::string code(m_code.CopyList());
-            code.append(1, '\n');
-            size_t bytes_written = code.size();
-            file.Write(code.c_str(), bytes_written);
-            file.Close();
+            auto file = FileSystem::Instance().Open(
+                FileSpec(m_repl_source_path),
+                File::eOpenOptionWrite | File::eOpenOptionTruncate |
+                    File::eOpenOptionCanCreate,
+                lldb::eFilePermissionsFileDefault);
+            if (file) {
+              std::string code(m_code.CopyList());
+              code.append(1, '\n');
+              size_t bytes_written = code.size();
+              file.get()->Write(code.c_str(), bytes_written);
+              file.get()->Close();
+            } else {
+              std::string message = llvm::toString(file.takeError());
+              error_sp->Printf("error: couldn't open %s: %s\n",
+                               m_repl_source_path.c_str(), message.c_str());
+            }
 
             // Now set the default file and line to the REPL source file
             m_target.GetSourceManager().SetDefaultFileAndLine(
@@ -418,7 +425,7 @@
               .SetBaseLineNumber(m_code.GetSize() + 1);
         }
         if (extra_line) {
-          fprintf(output_sp->GetFile().GetStream(), "\n");
+          output_sp->Printf("\n");
         }
       }
     }
@@ -433,31 +440,30 @@
   }
 }
 
-int REPL::IOHandlerComplete(IOHandler &io_handler, const char *current_line,
-                            const char *cursor, const char *last_char,
-                            int skip_first_n_matches, int max_matches,
-                            StringList &matches, StringList &descriptions) {
-  matches.Clear();
-
-  llvm::StringRef line(current_line, cursor - current_line);
-
+void REPL::IOHandlerComplete(IOHandler &io_handler,
+                             CompletionRequest &request) {
   // Complete an LLDB command if the first character is a colon...
-  if (!line.empty() && line[0] == ':') {
+  if (request.GetRawLine().startswith(":")) {
     Debugger &debugger = m_target.GetDebugger();
 
     // auto complete LLDB commands
-    const char *lldb_current_line = line.substr(1).data();
-    return debugger.GetCommandInterpreter().HandleCompletion(
-        lldb_current_line, cursor, last_char, skip_first_n_matches, max_matches,
-        matches, descriptions);
+    llvm::StringRef new_line = request.GetRawLine().drop_front();
+    CompletionResult sub_result;
+    CompletionRequest sub_request(new_line, request.GetRawCursorPos() - 1,
+                                  sub_result);
+    debugger.GetCommandInterpreter().HandleCompletion(sub_request);
+    StringList matches, descriptions;
+    sub_result.GetMatches(matches);
+    sub_result.GetDescriptions(descriptions);
+    request.AddCompletions(matches, descriptions);
+    return;
   }
 
   // Strip spaces from the line and see if we had only spaces
-  line = line.ltrim();
-  if (line.empty()) {
+  if (request.GetRawLine().trim().empty()) {
     // Only spaces on this line, so just indent
-    matches.AppendString(m_indent_str);
-    return 1;
+    request.AddCompletion(m_indent_str);
+    return;
   }
 
   std::string current_code;
@@ -479,12 +485,17 @@
     }
   }
 
-  if (cursor > current_line) {
-    current_code.append("\n");
-    current_code.append(current_line, cursor - current_line);
-  }
+  current_code.append("\n");
+  current_code += request.GetRawLine();
 
-  return CompleteCode(current_code, matches);
+  StringList matches;
+  int result = CompleteCode(current_code, matches);
+  if (result == -2) {
+    assert(matches.GetSize() == 1);
+    request.AddCompletion(matches.GetStringAtIndex(0), "",
+                          CompletionMode::RewriteLine);
+  } else
+    request.AddCompletions(matches);
 }
 
 bool QuitCommandOverrideCallback(void *baton, const char **argv) {
diff --git a/src/llvm-project/lldb/source/Expression/UserExpression.cpp b/src/llvm-project/lldb/source/Expression/UserExpression.cpp
index a72e2a0..3b507da 100644
--- a/src/llvm-project/lldb/source/Expression/UserExpression.cpp
+++ b/src/llvm-project/lldb/source/Expression/UserExpression.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
+
 #include <stdio.h>
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -44,13 +46,14 @@
 
 using namespace lldb_private;
 
+char UserExpression::ID;
+
 UserExpression::UserExpression(ExecutionContextScope &exe_scope,
                                llvm::StringRef expr, llvm::StringRef prefix,
                                lldb::LanguageType language,
                                ResultType desired_type,
-                               const EvaluateExpressionOptions &options,
-                               ExpressionKind kind)
-    : Expression(exe_scope, kind), m_expr_text(expr), m_expr_prefix(prefix),
+                               const EvaluateExpressionOptions &options)
+    : Expression(exe_scope), m_expr_text(expr), m_expr_prefix(prefix),
       m_language(language), m_desired_type(desired_type), m_options(options) {}
 
 UserExpression::~UserExpression() {}
@@ -81,10 +84,9 @@
   if (m_address.IsValid()) {
     if (!frame_sp)
       return false;
-    else
-      return (0 == Address::CompareLoadAddress(m_address,
-                                               frame_sp->GetFrameCodeAddress(),
-                                               target_sp.get()));
+    return (Address::CompareLoadAddress(m_address,
+                                        frame_sp->GetFrameCodeAddress(),
+                                        target_sp.get()) == 0);
   }
 
   return true;
@@ -165,9 +167,8 @@
 
   Target *target = exe_ctx.GetTargetPtr();
   if (!target) {
-    if (log)
-      log->Printf("== [UserExpression::Evaluate] Passed a NULL target, can't "
-                  "run expressions.");
+    LLDB_LOGF(log, "== [UserExpression::Evaluate] Passed a NULL target, can't "
+                   "run expressions.");
     error.SetErrorString("expression passed a null target");
     return lldb::eExpressionSetupError;
   }
@@ -176,9 +177,9 @@
 
   if (process == nullptr || process->GetState() != lldb::eStateStopped) {
     if (execution_policy == eExecutionPolicyAlways) {
-      if (log)
-        log->Printf("== [UserExpression::Evaluate] Expression may not run, but "
-                    "is not constant ==");
+      LLDB_LOGF(log,
+                "== [UserExpression::Evaluate] Expression may not run, but "
+                "is not constant ==");
 
       error.SetErrorString("expression needed to run but couldn't");
 
@@ -224,14 +225,14 @@
                                            error));
   if (error.Fail()) {
     if (log)
-      log->Printf("== [UserExpression::Evaluate] Getting expression: %s ==",
-                  error.AsCString());
+      LLDB_LOGF(log, "== [UserExpression::Evaluate] Getting expression: %s ==",
+                error.AsCString());
     return lldb::eExpressionSetupError;
   }
 
   if (log)
-    log->Printf("== [UserExpression::Evaluate] Parsing expression %s ==",
-                expr.str().c_str());
+    LLDB_LOGF(log, "== [UserExpression::Evaluate] Parsing expression %s ==",
+              expr.str().c_str());
 
   const bool keep_expression_in_memory = true;
   const bool generate_debug_info = options.GetGenerateDebugInfo();
@@ -310,8 +311,9 @@
     if (execution_policy == eExecutionPolicyNever &&
         !user_expression_sp->CanInterpret()) {
       if (log)
-        log->Printf("== [UserExpression::Evaluate] Expression may not run, but "
-                    "is not constant ==");
+        LLDB_LOGF(log,
+                  "== [UserExpression::Evaluate] Expression may not run, but "
+                  "is not constant ==");
 
       if (!diagnostic_manager.Diagnostics().size())
         error.SetExpressionError(lldb::eExpressionSetupError,
@@ -332,7 +334,7 @@
       diagnostic_manager.Clear();
 
       if (log)
-        log->Printf("== [UserExpression::Evaluate] Executing expression ==");
+        LLDB_LOGF(log, "== [UserExpression::Evaluate] Executing expression ==");
 
       execution_results =
           user_expression_sp->Execute(diagnostic_manager, exe_ctx, options,
@@ -340,8 +342,8 @@
 
       if (execution_results != lldb::eExpressionCompleted) {
         if (log)
-          log->Printf("== [UserExpression::Evaluate] Execution completed "
-                      "abnormally ==");
+          LLDB_LOGF(log, "== [UserExpression::Evaluate] Execution completed "
+                         "abnormally ==");
 
         if (!diagnostic_manager.Diagnostics().size())
           error.SetExpressionError(
@@ -354,13 +356,14 @@
           result_valobj_sp = expr_result->GetValueObject();
 
           if (log)
-            log->Printf("== [UserExpression::Evaluate] Execution completed "
-                        "normally with result %s ==",
-                        result_valobj_sp->GetValueAsCString());
+            LLDB_LOGF(log,
+                      "== [UserExpression::Evaluate] Execution completed "
+                      "normally with result %s ==",
+                      result_valobj_sp->GetValueAsCString());
         } else {
           if (log)
-            log->Printf("== [UserExpression::Evaluate] Execution completed "
-                        "normally with no result ==");
+            LLDB_LOGF(log, "== [UserExpression::Evaluate] Execution completed "
+                           "normally with no result ==");
 
           error.SetError(UserExpression::kNoResult, lldb::eErrorTypeGeneric);
         }
@@ -393,8 +396,9 @@
       diagnostic_manager, exe_ctx, options, shared_ptr_to_me, result_var);
   Target *target = exe_ctx.GetTargetPtr();
   if (options.GetResultIsInternal() && result_var && target) {
-    target->GetPersistentExpressionStateForLanguage(m_language)
-        ->RemovePersistentVariable(result_var);
+    if (auto *persistent_state =
+            target->GetPersistentExpressionStateForLanguage(m_language))
+      persistent_state->RemovePersistentVariable(result_var);
   }
   return expr_result;
 }
diff --git a/src/llvm-project/lldb/source/Expression/UtilityFunction.cpp b/src/llvm-project/lldb/source/Expression/UtilityFunction.cpp
index eeaeca1..2dbc0e9 100644
--- a/src/llvm-project/lldb/source/Expression/UtilityFunction.cpp
+++ b/src/llvm-project/lldb/source/Expression/UtilityFunction.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
+
 #include <stdio.h>
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -29,6 +31,8 @@
 using namespace lldb_private;
 using namespace lldb;
 
+char UtilityFunction::ID;
+
 /// Constructor
 ///
 /// \param[in] text
@@ -37,12 +41,9 @@
 /// \param[in] name
 ///     The name of the function, as used in the text.
 UtilityFunction::UtilityFunction(ExecutionContextScope &exe_scope,
-                                 const char *text, const char *name,
-                                 ExpressionKind kind)
-    : Expression(exe_scope, kind),
-      m_execution_unit_sp(), m_jit_module_wp(),
-      m_function_text(),
-      m_function_name(name) {}
+                                 const char *text, const char *name)
+    : Expression(exe_scope), m_execution_unit_sp(), m_jit_module_wp(),
+      m_function_text(), m_function_name(name) {}
 
 UtilityFunction::~UtilityFunction() {
   lldb::ProcessSP process_sp(m_jit_process_wp.lock());
diff --git a/src/llvm-project/lldb/source/Host/CMakeLists.txt b/src/llvm-project/lldb/source/Host/CMakeLists.txt
index 4bb8d36..2e9bb40 100644
--- a/src/llvm-project/lldb/source/Host/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Host/CMakeLists.txt
@@ -29,6 +29,7 @@
   common/HostProcess.cpp
   common/HostThread.cpp
   common/LockFileBase.cpp
+  common/LZMA.cpp
   common/MainLoop.cpp
   common/MonitoringProcessLauncher.cpp
   common/NativeProcessProtocol.cpp
@@ -51,7 +52,7 @@
   common/XML.cpp
   )
 
-if (NOT LLDB_DISABLE_LIBEDIT)
+if (LLDB_ENABLE_LIBEDIT)
   add_host_subdirectory(common
     common/Editline.cpp
     )
@@ -79,7 +80,7 @@
 else()
   add_host_subdirectory(posix
     posix/DomainSocket.cpp
-    posix/FileSystem.cpp
+    posix/FileSystemPosix.cpp
     posix/HostInfoPosix.cpp
     posix/HostProcessPosix.cpp
     posix/HostThreadPosix.cpp
@@ -154,12 +155,15 @@
 if (HAVE_LIBDL)
   list(APPEND EXTRA_LIBS ${CMAKE_DL_LIBS})
 endif()
-if (NOT LLDB_DISABLE_LIBEDIT)
-  list(APPEND EXTRA_LIBS ${libedit_LIBRARIES})
+if (LLDB_ENABLE_LIBEDIT)
+  list(APPEND EXTRA_LIBS ${LibEdit_LIBRARIES})
+endif()
+if (LLDB_ENABLE_LZMA)
+  list(APPEND EXTRA_LIBS ${LIBLZMA_LIBRARIES})
 endif()
 
-if (NOT LLDB_DISABLE_LIBEDIT)
-  list(APPEND LLDB_LIBEDIT_LIBS ${libedit_LIBRARIES})
+if (LLDB_ENABLE_LIBEDIT)
+  list(APPEND LLDB_LIBEDIT_LIBS ${LibEdit_LIBRARIES})
   if (LLVM_BUILD_STATIC)
     list(APPEND LLDB_SYSTEM_LIBS gpm)
   endif()
@@ -179,6 +183,6 @@
     Support
   )
 
-if (NOT LLDB_DISABLE_LIBEDIT)
-  target_include_directories(lldbHost PUBLIC ${libedit_INCLUDE_DIRS})
+if (LLDB_ENABLE_LIBEDIT)
+  target_include_directories(lldbHost PUBLIC ${LibEdit_INCLUDE_DIRS})
 endif()
diff --git a/src/llvm-project/lldb/source/Host/common/Editline.cpp b/src/llvm-project/lldb/source/Host/common/Editline.cpp
index d3a70ae..5fd5a0c 100644
--- a/src/llvm-project/lldb/source/Host/common/Editline.cpp
+++ b/src/llvm-project/lldb/source/Host/common/Editline.cpp
@@ -14,6 +14,7 @@
 #include "lldb/Host/Editline.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Host.h"
+#include "lldb/Utility/CompletionRequest.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/SelectHelper.h"
@@ -96,6 +97,33 @@
   return true;
 }
 
+static int GetOperation(HistoryOperation op) {
+  // The naming used by editline for the history operations is counter
+  // intuitive to how it's used here.
+  //
+  //  - The H_PREV operation returns the previous element in the history, which
+  //    is newer than the current one.
+  //
+  //  - The H_NEXT operation returns the next element in the history, which is
+  //    older than the current one.
+  //
+  // The naming of the enum entries match the semantic meaning.
+  switch(op) {
+    case HistoryOperation::Oldest:
+      return H_FIRST;
+    case HistoryOperation::Older:
+      return H_NEXT;
+    case HistoryOperation::Current:
+      return H_CURR;
+    case HistoryOperation::Newer:
+      return H_PREV;
+    case HistoryOperation::Newest:
+      return H_LAST;
+  }
+  llvm_unreachable("Fully covered switch!");
+}
+
+
 EditLineStringType CombineLines(const std::vector<EditLineStringType> &lines) {
   EditLineStringStreamType combined_stream;
   for (EditLineStringType line : lines) {
@@ -422,7 +450,8 @@
   return lines;
 }
 
-unsigned char Editline::RecallHistory(bool earlier) {
+unsigned char Editline::RecallHistory(HistoryOperation op) {
+  assert(op == HistoryOperation::Older || op == HistoryOperation::Newer);
   if (!m_history_sp || !m_history_sp->IsValid())
     return CC_ERROR;
 
@@ -432,27 +461,38 @@
 
   // Treat moving from the "live" entry differently
   if (!m_in_history) {
-    if (!earlier)
+    switch (op) {
+    case HistoryOperation::Newer:
       return CC_ERROR; // Can't go newer than the "live" entry
-    if (history_w(pHistory, &history_event, H_FIRST) == -1)
-      return CC_ERROR;
-
-    // Save any edits to the "live" entry in case we return by moving forward
-    // in history (it would be more bash-like to save over any current entry,
-    // but libedit doesn't offer the ability to add entries anywhere except the
-    // end.)
-    SaveEditedLine();
-    m_live_history_lines = m_input_lines;
-    m_in_history = true;
-  } else {
-    if (history_w(pHistory, &history_event, earlier ? H_PREV : H_NEXT) == -1) {
-      // Can't move earlier than the earliest entry
-      if (earlier)
+    case HistoryOperation::Older: {
+      if (history_w(pHistory, &history_event,
+                    GetOperation(HistoryOperation::Newest)) == -1)
         return CC_ERROR;
-
-      // ... but moving to newer than the newest yields the "live" entry
-      new_input_lines = m_live_history_lines;
-      m_in_history = false;
+      // Save any edits to the "live" entry in case we return by moving forward
+      // in history (it would be more bash-like to save over any current entry,
+      // but libedit doesn't offer the ability to add entries anywhere except
+      // the end.)
+      SaveEditedLine();
+      m_live_history_lines = m_input_lines;
+      m_in_history = true;
+    } break;
+    default:
+      llvm_unreachable("unsupported history direction");
+    }
+  } else {
+    if (history_w(pHistory, &history_event, GetOperation(op)) == -1) {
+      switch (op) {
+      case HistoryOperation::Older:
+        // Can't move earlier than the earliest entry.
+        return CC_ERROR;
+      case HistoryOperation::Newer:
+        // Moving to newer-than-the-newest entry yields the "live" entry.
+        new_input_lines = m_live_history_lines;
+        m_in_history = false;
+        break;
+      default:
+        llvm_unreachable("unsupported history direction");
+      }
     }
   }
 
@@ -467,8 +507,17 @@
 
   // Prepare to edit the last line when moving to previous entry, or the first
   // line when moving to next entry
-  SetCurrentLine(m_current_line_index =
-                     earlier ? (int)m_input_lines.size() - 1 : 0);
+  switch (op) {
+  case HistoryOperation::Older:
+    m_current_line_index = (int)m_input_lines.size() - 1;
+    break;
+  case HistoryOperation::Newer:
+    m_current_line_index = 0;
+    break;
+  default:
+    llvm_unreachable("unsupported history direction");
+  }
+  SetCurrentLine(m_current_line_index);
   MoveCursor(CursorLocation::BlockEnd, CursorLocation::EditingPrompt);
   return CC_NEWLINE;
 }
@@ -720,7 +769,7 @@
   SaveEditedLine();
 
   if (m_current_line_index == 0) {
-    return RecallHistory(true);
+    return RecallHistory(HistoryOperation::Older);
   }
 
   // Start from a known location
@@ -746,7 +795,7 @@
     // Don't add an extra line if the existing last line is blank, move through
     // history instead
     if (IsOnlySpaces()) {
-      return RecallHistory(false);
+      return RecallHistory(HistoryOperation::Newer);
     }
 
     // Determine indentation for the new line
@@ -778,13 +827,13 @@
 unsigned char Editline::PreviousHistoryCommand(int ch) {
   SaveEditedLine();
 
-  return RecallHistory(true);
+  return RecallHistory(HistoryOperation::Older);
 }
 
 unsigned char Editline::NextHistoryCommand(int ch) {
   SaveEditedLine();
 
-  return RecallHistory(false);
+  return RecallHistory(HistoryOperation::Newer);
 }
 
 unsigned char Editline::FixIndentationCommand(int ch) {
@@ -863,26 +912,59 @@
 
 /// Prints completions and their descriptions to the given file. Only the
 /// completions in the interval [start, end) are printed.
-static void PrintCompletion(FILE *output_file, size_t start, size_t end,
-                            StringList &completions, StringList &descriptions) {
-  // This is an 'int' because of printf.
-  int max_len = 0;
+static void
+PrintCompletion(FILE *output_file,
+                llvm::ArrayRef<CompletionResult::Completion> results,
+                size_t max_len) {
+  for (const CompletionResult::Completion &c : results) {
+    fprintf(output_file, "\t%-*s", (int)max_len, c.GetCompletion().c_str());
+    if (!c.GetDescription().empty())
+      fprintf(output_file, " -- %s", c.GetDescription().c_str());
+    fprintf(output_file, "\n");
+  }
+}
 
-  for (size_t i = start; i < end; i++) {
-    const char *completion_str = completions.GetStringAtIndex(i);
-    max_len = std::max((int)strlen(completion_str), max_len);
+static void
+DisplayCompletions(::EditLine *editline, FILE *output_file,
+                   llvm::ArrayRef<CompletionResult::Completion> results) {
+  assert(!results.empty());
+
+  fprintf(output_file, "\n" ANSI_CLEAR_BELOW "Available completions:\n");
+  const size_t page_size = 40;
+  bool all = false;
+
+  auto longest =
+      std::max_element(results.begin(), results.end(), [](auto &c1, auto &c2) {
+        return c1.GetCompletion().size() < c2.GetCompletion().size();
+      });
+
+  const size_t max_len = longest->GetCompletion().size();
+
+  if (results.size() < page_size) {
+    PrintCompletion(output_file, results, max_len);
+    return;
   }
 
-  for (size_t i = start; i < end; i++) {
-    const char *completion_str = completions.GetStringAtIndex(i);
-    const char *description_str = descriptions.GetStringAtIndex(i);
+  size_t cur_pos = 0;
+  while (cur_pos < results.size()) {
+    size_t remaining = results.size() - cur_pos;
+    size_t next_size = all ? remaining : std::min(page_size, remaining);
 
-    if (completion_str)
-      fprintf(output_file, "\n\t%-*s", max_len, completion_str);
+    PrintCompletion(output_file, results.slice(cur_pos, next_size), max_len);
 
-    // Print the description if we got one.
-    if (description_str && strlen(description_str))
-      fprintf(output_file, " -- %s", description_str);
+    cur_pos += next_size;
+
+    if (cur_pos >= results.size())
+      break;
+
+    fprintf(output_file, "More (Y/n/a): ");
+    char reply = 'n';
+    int got_char = el_getc(editline, &reply);
+    fprintf(output_file, "\n");
+    if (got_char == -1 || reply == 'n')
+      break;
+    if (reply == 'a')
+      all = true;
   }
 }
 
@@ -891,74 +973,64 @@
     return CC_ERROR;
 
   const LineInfo *line_info = el_line(m_editline);
-  StringList completions, descriptions;
-  int page_size = 40;
 
-  const int num_completions = m_completion_callback(
-      line_info->buffer, line_info->cursor, line_info->lastchar,
-      0,  // Don't skip any matches (start at match zero)
-      -1, // Get all the matches
-      completions, descriptions, m_completion_callback_baton);
+  llvm::StringRef line(line_info->buffer,
+                       line_info->lastchar - line_info->buffer);
+  unsigned cursor_index = line_info->cursor - line_info->buffer;
+  CompletionResult result;
+  CompletionRequest request(line, cursor_index, result);
 
-  if (num_completions == 0)
+  m_completion_callback(request, m_completion_callback_baton);
+
+  llvm::ArrayRef<CompletionResult::Completion> results = result.GetResults();
+
+  StringList completions;
+  result.GetMatches(completions);
+
+  if (results.size() == 0)
     return CC_ERROR;
-  //    if (num_completions == -1)
-  //    {
-  //        el_insertstr (m_editline, m_completion_key);
-  //        return CC_REDISPLAY;
-  //    }
-  //    else
-  if (num_completions == -2) {
-    // Replace the entire line with the first string...
-    el_deletestr(m_editline, line_info->cursor - line_info->buffer);
-    el_insertstr(m_editline, completions.GetStringAtIndex(0));
+
+  if (results.size() == 1) {
+    CompletionResult::Completion completion = results.front();
+    switch (completion.GetMode()) {
+    case CompletionMode::Normal: {
+      std::string to_add = completion.GetCompletion();
+      to_add = to_add.substr(request.GetCursorArgumentPrefix().size());
+      if (request.GetParsedArg().IsQuoted())
+        to_add.push_back(request.GetParsedArg().GetQuoteChar());
+      to_add.push_back(' ');
+      el_insertstr(m_editline, to_add.c_str());
+      break;
+    }
+    case CompletionMode::Partial: {
+      std::string to_add = completion.GetCompletion();
+      to_add = to_add.substr(request.GetCursorArgumentPrefix().size());
+      el_insertstr(m_editline, to_add.c_str());
+      break;
+    }
+    case CompletionMode::RewriteLine: {
+      el_deletestr(m_editline, line_info->cursor - line_info->buffer);
+      el_insertstr(m_editline, completion.GetCompletion().c_str());
+      break;
+    }
+    }
     return CC_REDISPLAY;
   }
 
   // If we get a longer match display that first.
-  const char *completion_str = completions.GetStringAtIndex(0);
-  if (completion_str != nullptr && *completion_str != '\0') {
-    el_insertstr(m_editline, completion_str);
+  std::string longest_prefix = completions.LongestCommonPrefix();
+  if (!longest_prefix.empty())
+    longest_prefix =
+        longest_prefix.substr(request.GetCursorArgumentPrefix().size());
+  if (!longest_prefix.empty()) {
+    el_insertstr(m_editline, longest_prefix.c_str());
     return CC_REDISPLAY;
   }
 
-  if (num_completions > 1) {
-    int num_elements = num_completions + 1;
-    fprintf(m_output_file, "\n" ANSI_CLEAR_BELOW "Available completions:");
-    if (num_completions < page_size) {
-      PrintCompletion(m_output_file, 1, num_elements, completions,
-                      descriptions);
-      fprintf(m_output_file, "\n");
-    } else {
-      int cur_pos = 1;
-      char reply;
-      int got_char;
-      while (cur_pos < num_elements) {
-        int endpoint = cur_pos + page_size;
-        if (endpoint > num_elements)
-          endpoint = num_elements;
+  DisplayCompletions(m_editline, m_output_file, results);
 
-        PrintCompletion(m_output_file, cur_pos, endpoint, completions,
-                        descriptions);
-        cur_pos = endpoint;
-
-        if (cur_pos >= num_elements) {
-          fprintf(m_output_file, "\n");
-          break;
-        }
-
-        fprintf(m_output_file, "\nMore (Y/n/a): ");
-        reply = 'n';
-        got_char = el_getc(m_editline, &reply);
-        if (got_char == -1 || reply == 'n')
-          break;
-        if (reply == 'a')
-          page_size = num_elements - cur_pos;
-      }
-    }
-    DisplayInput();
-    MoveCursor(CursorLocation::BlockEnd, CursorLocation::EditingCursor);
-  }
+  DisplayInput();
+  MoveCursor(CursorLocation::BlockEnd, CursorLocation::EditingCursor);
   return CC_REDISPLAY;
 }
 
@@ -1081,6 +1153,15 @@
   el_set(m_editline, EL_BIND, "\t", "lldb-complete",
          NULL); // Bind TAB to auto complete
 
+  // Allow ctrl-left-arrow and ctrl-right-arrow for navigation, behave like
+  // bash in emacs mode.
+  el_set(m_editline, EL_BIND, ESCAPE "[1;5C", "em-next-word", NULL);
+  el_set(m_editline, EL_BIND, ESCAPE "[1;5D", "ed-prev-word", NULL);
+  el_set(m_editline, EL_BIND, ESCAPE "[5C", "em-next-word", NULL);
+  el_set(m_editline, EL_BIND, ESCAPE "[5D", "ed-prev-word", NULL);
+  el_set(m_editline, EL_BIND, ESCAPE ESCAPE "[C", "em-next-word", NULL);
+  el_set(m_editline, EL_BIND, ESCAPE ESCAPE "[D", "ed-prev-word", NULL);
+
   // Allow user-specific customization prior to registering bindings we
   // absolutely require
   el_source(m_editline, nullptr);
@@ -1403,7 +1484,7 @@
     switch (cvt.in(state, input.begin(), input.end(), from_next, &out, &out + 1,
                    to_next)) {
     case std::codecvt_base::ok:
-      return out != WEOF;
+      return out != (int)WEOF;
 
     case std::codecvt_base::error:
     case std::codecvt_base::noconv:
diff --git a/src/llvm-project/lldb/source/Host/common/File.cpp b/src/llvm-project/lldb/source/Host/common/File.cpp
index c8c8d7a..7850222 100644
--- a/src/llvm-project/lldb/source/Host/common/File.cpp
+++ b/src/llvm-project/lldb/source/Host/common/File.cpp
@@ -37,8 +37,10 @@
 
 using namespace lldb;
 using namespace lldb_private;
+using llvm::Expected;
 
-static const char *GetStreamOpenModeFromOptions(uint32_t options) {
+Expected<const char *>
+File::GetStreamOpenModeFromOptions(File::OpenOptions options) {
   if (options & File::eOpenOptionAppend) {
     if (options & File::eOpenOptionRead) {
       if (options & File::eOpenOptionCanCreateNewOnly)
@@ -65,15 +67,188 @@
   } else if (options & File::eOpenOptionWrite) {
     return "w";
   }
-  return nullptr;
+  return llvm::createStringError(
+      llvm::inconvertibleErrorCode(),
+      "invalid options, cannot convert to mode string");
+}
+
+Expected<File::OpenOptions> File::GetOptionsFromMode(llvm::StringRef mode) {
+  OpenOptions opts =
+      llvm::StringSwitch<OpenOptions>(mode)
+          .Cases("r", "rb", eOpenOptionRead)
+          .Cases("w", "wb", eOpenOptionWrite)
+          .Cases("a", "ab",
+                 eOpenOptionWrite | eOpenOptionAppend | eOpenOptionCanCreate)
+          .Cases("r+", "rb+", "r+b", eOpenOptionRead | eOpenOptionWrite)
+          .Cases("w+", "wb+", "w+b",
+                 eOpenOptionRead | eOpenOptionWrite | eOpenOptionCanCreate |
+                     eOpenOptionTruncate)
+          .Cases("a+", "ab+", "a+b",
+                 eOpenOptionRead | eOpenOptionWrite | eOpenOptionAppend |
+                     eOpenOptionCanCreate)
+          .Default(OpenOptions());
+  if (opts)
+    return opts;
+  return llvm::createStringError(
+      llvm::inconvertibleErrorCode(),
+      "invalid mode, cannot convert to File::OpenOptions");
 }
 
 int File::kInvalidDescriptor = -1;
 FILE *File::kInvalidStream = nullptr;
 
-File::~File() { Close(); }
+Status File::Read(void *buf, size_t &num_bytes) {
+  return std::error_code(ENOTSUP, std::system_category());
+}
+Status File::Write(const void *buf, size_t &num_bytes) {
+  return std::error_code(ENOTSUP, std::system_category());
+}
 
-int File::GetDescriptor() const {
+bool File::IsValid() const { return false; }
+
+Status File::Close() { return Flush(); }
+
+IOObject::WaitableHandle File::GetWaitableHandle() {
+  return IOObject::kInvalidHandleValue;
+}
+
+Status File::GetFileSpec(FileSpec &file_spec) const {
+  file_spec.Clear();
+  return std::error_code(ENOTSUP, std::system_category());
+}
+
+int File::GetDescriptor() const { return kInvalidDescriptor; }
+
+FILE *File::GetStream() { return nullptr; }
+
+off_t File::SeekFromStart(off_t offset, Status *error_ptr) {
+  if (error_ptr)
+    *error_ptr = std::error_code(ENOTSUP, std::system_category());
+  return -1;
+}
+
+off_t File::SeekFromCurrent(off_t offset, Status *error_ptr) {
+  if (error_ptr)
+    *error_ptr = std::error_code(ENOTSUP, std::system_category());
+  return -1;
+}
+
+off_t File::SeekFromEnd(off_t offset, Status *error_ptr) {
+  if (error_ptr)
+    *error_ptr = std::error_code(ENOTSUP, std::system_category());
+  return -1;
+}
+
+Status File::Read(void *dst, size_t &num_bytes, off_t &offset) {
+  return std::error_code(ENOTSUP, std::system_category());
+}
+
+Status File::Write(const void *src, size_t &num_bytes, off_t &offset) {
+  return std::error_code(ENOTSUP, std::system_category());
+}
+
+Status File::Flush() { return Status(); }
+
+Status File::Sync() { return Flush(); }
+
+void File::CalculateInteractiveAndTerminal() {
+  const int fd = GetDescriptor();
+  if (!DescriptorIsValid(fd)) {
+    m_is_interactive = eLazyBoolNo;
+    m_is_real_terminal = eLazyBoolNo;
+    m_supports_colors = eLazyBoolNo;
+    return;
+  }
+  m_is_interactive = eLazyBoolNo;
+  m_is_real_terminal = eLazyBoolNo;
+#if defined(_WIN32)
+  if (_isatty(fd)) {
+    m_is_interactive = eLazyBoolYes;
+    m_is_real_terminal = eLazyBoolYes;
+#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
+    m_supports_colors = eLazyBoolYes;
+#endif
+  }
+#else
+  if (isatty(fd)) {
+    m_is_interactive = eLazyBoolYes;
+    struct winsize window_size;
+    if (::ioctl(fd, TIOCGWINSZ, &window_size) == 0) {
+      if (window_size.ws_col > 0) {
+        m_is_real_terminal = eLazyBoolYes;
+        if (llvm::sys::Process::FileDescriptorHasColors(fd))
+          m_supports_colors = eLazyBoolYes;
+      }
+    }
+  }
+#endif
+}
+
+bool File::GetIsInteractive() {
+  if (m_is_interactive == eLazyBoolCalculate)
+    CalculateInteractiveAndTerminal();
+  return m_is_interactive == eLazyBoolYes;
+}
+
+bool File::GetIsRealTerminal() {
+  if (m_is_real_terminal == eLazyBoolCalculate)
+    CalculateInteractiveAndTerminal();
+  return m_is_real_terminal == eLazyBoolYes;
+}
+
+bool File::GetIsTerminalWithColors() {
+  if (m_supports_colors == eLazyBoolCalculate)
+    CalculateInteractiveAndTerminal();
+  return m_supports_colors == eLazyBoolYes;
+}
+
+size_t File::Printf(const char *format, ...) {
+  va_list args;
+  va_start(args, format);
+  size_t result = PrintfVarArg(format, args);
+  va_end(args);
+  return result;
+}
+
+size_t File::PrintfVarArg(const char *format, va_list args) {
+  size_t result = 0;
+  char *s = nullptr;
+  result = vasprintf(&s, format, args);
+  if (s != nullptr) {
+    if (result > 0) {
+      size_t s_len = result;
+      Write(s, s_len);
+      result = s_len;
+    }
+    free(s);
+  }
+  return result;
+}
+
+Expected<File::OpenOptions> File::GetOptions() const {
+  return llvm::createStringError(
+      llvm::inconvertibleErrorCode(),
+      "GetOptions() not implemented for this File class");
+}
+
+uint32_t File::GetPermissions(Status &error) const {
+  int fd = GetDescriptor();
+  if (!DescriptorIsValid(fd)) {
+    error = std::error_code(ENOTSUP, std::system_category());
+    return 0;
+  }
+  struct stat file_stats;
+  if (::fstat(fd, &file_stats) == -1) {
+    error.SetErrorToErrno();
+    return 0;
+  }
+  error.Clear();
+  return file_stats.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
+}
+
+Expected<File::OpenOptions> NativeFile::GetOptions() const { return m_options; }
+
+int NativeFile::GetDescriptor() const {
   if (DescriptorIsValid())
     return m_descriptor;
 
@@ -91,21 +266,18 @@
   return kInvalidDescriptor;
 }
 
-IOObject::WaitableHandle File::GetWaitableHandle() { return m_descriptor; }
-
-void File::SetDescriptor(int fd, bool transfer_ownership) {
-  if (IsValid())
-    Close();
-  m_descriptor = fd;
-  m_should_close_fd = transfer_ownership;
+IOObject::WaitableHandle NativeFile::GetWaitableHandle() {
+  return GetDescriptor();
 }
 
-FILE *File::GetStream() {
+FILE *NativeFile::GetStream() {
   if (!StreamIsValid()) {
     if (DescriptorIsValid()) {
-      const char *mode = GetStreamOpenModeFromOptions(m_options);
-      if (mode) {
-        if (!m_should_close_fd) {
+      auto mode = GetStreamOpenModeFromOptions(m_options);
+      if (!mode)
+        llvm::consumeError(mode.takeError());
+      else {
+        if (!m_own_descriptor) {
 // We must duplicate the file descriptor if we don't own it because when you
 // call fdopen, the stream will own the fd
 #ifdef _WIN32
@@ -113,18 +285,18 @@
 #else
           m_descriptor = dup(GetDescriptor());
 #endif
-          m_should_close_fd = true;
+          m_own_descriptor = true;
         }
 
-        m_stream =
-            llvm::sys::RetryAfterSignal(nullptr, ::fdopen, m_descriptor, mode);
+        m_stream = llvm::sys::RetryAfterSignal(nullptr, ::fdopen, m_descriptor,
+                                               mode.get());
 
         // If we got a stream, then we own the stream and should no longer own
         // the descriptor because fclose() will close it for us
 
         if (m_stream) {
           m_own_stream = true;
-          m_should_close_fd = false;
+          m_own_descriptor = false;
         }
       }
     }
@@ -132,60 +304,32 @@
   return m_stream;
 }
 
-void File::SetStream(FILE *fh, bool transfer_ownership) {
-  if (IsValid())
-    Close();
-  m_stream = fh;
-  m_own_stream = transfer_ownership;
-}
-
-uint32_t File::GetPermissions(Status &error) const {
-  int fd = GetDescriptor();
-  if (fd != kInvalidDescriptor) {
-    struct stat file_stats;
-    if (::fstat(fd, &file_stats) == -1)
-      error.SetErrorToErrno();
-    else {
-      error.Clear();
-      return file_stats.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
-    }
-  } else {
-    error.SetErrorString("invalid file descriptor");
-  }
-  return 0;
-}
-
-Status File::Close() {
+Status NativeFile::Close() {
   Status error;
-  if (StreamIsValid() && m_own_stream) {
-    if (::fclose(m_stream) == EOF)
-      error.SetErrorToErrno();
+  if (StreamIsValid()) {
+    if (m_own_stream) {
+      if (::fclose(m_stream) == EOF)
+        error.SetErrorToErrno();
+    } else if (m_options & eOpenOptionWrite) {
+      if (::fflush(m_stream) == EOF)
+        error.SetErrorToErrno();
+    }
   }
-
-  if (DescriptorIsValid() && m_should_close_fd) {
+  if (DescriptorIsValid() && m_own_descriptor) {
     if (::close(m_descriptor) != 0)
       error.SetErrorToErrno();
   }
   m_descriptor = kInvalidDescriptor;
   m_stream = kInvalidStream;
-  m_options = 0;
+  m_options = OpenOptions(0);
   m_own_stream = false;
-  m_should_close_fd = false;
+  m_own_descriptor = false;
   m_is_interactive = eLazyBoolCalculate;
   m_is_real_terminal = eLazyBoolCalculate;
   return error;
 }
 
-void File::Clear() {
-  m_stream = nullptr;
-  m_descriptor = kInvalidDescriptor;
-  m_options = 0;
-  m_own_stream = false;
-  m_is_interactive = m_supports_colors = m_is_real_terminal =
-      eLazyBoolCalculate;
-}
-
-Status File::GetFileSpec(FileSpec &file_spec) const {
+Status NativeFile::GetFileSpec(FileSpec &file_spec) const {
   Status error;
 #ifdef F_GETPATH
   if (IsValid()) {
@@ -212,7 +356,8 @@
     }
   }
 #else
-  error.SetErrorString("File::GetFileSpec is not supported on this platform");
+  error.SetErrorString(
+      "NativeFile::GetFileSpec is not supported on this platform");
 #endif
 
   if (error.Fail())
@@ -220,7 +365,7 @@
   return error;
 }
 
-off_t File::SeekFromStart(off_t offset, Status *error_ptr) {
+off_t NativeFile::SeekFromStart(off_t offset, Status *error_ptr) {
   off_t result = 0;
   if (DescriptorIsValid()) {
     result = ::lseek(m_descriptor, offset, SEEK_SET);
@@ -246,7 +391,7 @@
   return result;
 }
 
-off_t File::SeekFromCurrent(off_t offset, Status *error_ptr) {
+off_t NativeFile::SeekFromCurrent(off_t offset, Status *error_ptr) {
   off_t result = -1;
   if (DescriptorIsValid()) {
     result = ::lseek(m_descriptor, offset, SEEK_CUR);
@@ -272,7 +417,7 @@
   return result;
 }
 
-off_t File::SeekFromEnd(off_t offset, Status *error_ptr) {
+off_t NativeFile::SeekFromEnd(off_t offset, Status *error_ptr) {
   off_t result = -1;
   if (DescriptorIsValid()) {
     result = ::lseek(m_descriptor, offset, SEEK_END);
@@ -298,7 +443,7 @@
   return result;
 }
 
-Status File::Flush() {
+Status NativeFile::Flush() {
   Status error;
   if (StreamIsValid()) {
     if (llvm::sys::RetryAfterSignal(EOF, ::fflush, m_stream) == EOF)
@@ -309,7 +454,7 @@
   return error;
 }
 
-Status File::Sync() {
+Status NativeFile::Sync() {
   Status error;
   if (DescriptorIsValid()) {
 #ifdef _WIN32
@@ -332,7 +477,7 @@
 #define MAX_WRITE_SIZE INT_MAX
 #endif
 
-Status File::Read(void *buf, size_t &num_bytes) {
+Status NativeFile::Read(void *buf, size_t &num_bytes) {
   Status error;
 
 #if defined(MAX_READ_SIZE)
@@ -391,7 +536,7 @@
   return error;
 }
 
-Status File::Write(const void *buf, size_t &num_bytes) {
+Status NativeFile::Write(const void *buf, size_t &num_bytes) {
   Status error;
 
 #if defined(MAX_WRITE_SIZE)
@@ -453,7 +598,7 @@
   return error;
 }
 
-Status File::Read(void *buf, size_t &num_bytes, off_t &offset) {
+Status NativeFile::Read(void *buf, size_t &num_bytes, off_t &offset) {
   Status error;
 
 #if defined(MAX_READ_SIZE)
@@ -513,51 +658,7 @@
   return error;
 }
 
-Status File::Read(size_t &num_bytes, off_t &offset, bool null_terminate,
-                  DataBufferSP &data_buffer_sp) {
-  Status error;
-
-  if (num_bytes > 0) {
-    int fd = GetDescriptor();
-    if (fd != kInvalidDescriptor) {
-      struct stat file_stats;
-      if (::fstat(fd, &file_stats) == 0) {
-        if (file_stats.st_size > offset) {
-          const size_t bytes_left = file_stats.st_size - offset;
-          if (num_bytes > bytes_left)
-            num_bytes = bytes_left;
-
-          size_t num_bytes_plus_nul_char = num_bytes + (null_terminate ? 1 : 0);
-          std::unique_ptr<DataBufferHeap> data_heap_up;
-          data_heap_up.reset(new DataBufferHeap());
-          data_heap_up->SetByteSize(num_bytes_plus_nul_char);
-
-          if (data_heap_up) {
-            error = Read(data_heap_up->GetBytes(), num_bytes, offset);
-            if (error.Success()) {
-              // Make sure we read exactly what we asked for and if we got
-              // less, adjust the array
-              if (num_bytes_plus_nul_char < data_heap_up->GetByteSize())
-                data_heap_up->SetByteSize(num_bytes_plus_nul_char);
-              data_buffer_sp.reset(data_heap_up.release());
-              return error;
-            }
-          }
-        } else
-          error.SetErrorString("file is empty");
-      } else
-        error.SetErrorToErrno();
-    } else
-      error.SetErrorString("invalid file handle");
-  } else
-    error.SetErrorString("invalid file handle");
-
-  num_bytes = 0;
-  data_buffer_sp.reset();
-  return error;
-}
-
-Status File::Write(const void *buf, size_t &num_bytes, off_t &offset) {
+Status NativeFile::Write(const void *buf, size_t &num_bytes, off_t &offset) {
   Status error;
 
 #if defined(MAX_WRITE_SIZE)
@@ -621,36 +722,15 @@
   return error;
 }
 
-// Print some formatted output to the stream.
-size_t File::Printf(const char *format, ...) {
-  va_list args;
-  va_start(args, format);
-  size_t result = PrintfVarArg(format, args);
-  va_end(args);
-  return result;
-}
-
-// Print some formatted output to the stream.
-size_t File::PrintfVarArg(const char *format, va_list args) {
-  size_t result = 0;
-  if (DescriptorIsValid()) {
-    char *s = nullptr;
-    result = vasprintf(&s, format, args);
-    if (s != nullptr) {
-      if (result > 0) {
-        size_t s_len = result;
-        Write(s, s_len);
-        result = s_len;
-      }
-      free(s);
-    }
-  } else if (StreamIsValid()) {
-    result = ::vfprintf(m_stream, format, args);
+size_t NativeFile::PrintfVarArg(const char *format, va_list args) {
+  if (StreamIsValid()) {
+    return ::vfprintf(m_stream, format, args);
+  } else {
+    return File::PrintfVarArg(format, args);
   }
-  return result;
 }
 
-mode_t File::ConvertOpenOptionsForPOSIXOpen(uint32_t open_options) {
+mode_t File::ConvertOpenOptionsForPOSIXOpen(OpenOptions open_options) {
   mode_t mode = 0;
   if (open_options & eOpenOptionRead && open_options & eOpenOptionWrite)
     mode |= O_RDWR;
@@ -674,49 +754,5 @@
   return mode;
 }
 
-void File::CalculateInteractiveAndTerminal() {
-  const int fd = GetDescriptor();
-  if (fd >= 0) {
-    m_is_interactive = eLazyBoolNo;
-    m_is_real_terminal = eLazyBoolNo;
-#if defined(_WIN32)
-    if (_isatty(fd)) {
-      m_is_interactive = eLazyBoolYes;
-      m_is_real_terminal = eLazyBoolYes;
-#if defined(ENABLE_VIRTUAL_TERMINAL_PROCESSING)
-      m_supports_colors = eLazyBoolYes;
-#endif
-    }
-#else
-    if (isatty(fd)) {
-      m_is_interactive = eLazyBoolYes;
-      struct winsize window_size;
-      if (::ioctl(fd, TIOCGWINSZ, &window_size) == 0) {
-        if (window_size.ws_col > 0) {
-          m_is_real_terminal = eLazyBoolYes;
-          if (llvm::sys::Process::FileDescriptorHasColors(fd))
-            m_supports_colors = eLazyBoolYes;
-        }
-      }
-    }
-#endif
-  }
-}
-
-bool File::GetIsInteractive() {
-  if (m_is_interactive == eLazyBoolCalculate)
-    CalculateInteractiveAndTerminal();
-  return m_is_interactive == eLazyBoolYes;
-}
-
-bool File::GetIsRealTerminal() {
-  if (m_is_real_terminal == eLazyBoolCalculate)
-    CalculateInteractiveAndTerminal();
-  return m_is_real_terminal == eLazyBoolYes;
-}
-
-bool File::GetIsTerminalWithColors() {
-  if (m_supports_colors == eLazyBoolCalculate)
-    CalculateInteractiveAndTerminal();
-  return m_supports_colors == eLazyBoolYes;
-}
+char File::ID = 0;
+char NativeFile::ID = 0;
diff --git a/src/llvm-project/lldb/source/Host/common/FileCache.cpp b/src/llvm-project/lldb/source/Host/common/FileCache.cpp
index 4bd3efd..d9dcad9 100644
--- a/src/llvm-project/lldb/source/Host/common/FileCache.cpp
+++ b/src/llvm-project/lldb/source/Host/common/FileCache.cpp
@@ -23,18 +23,20 @@
   return *m_instance;
 }
 
-lldb::user_id_t FileCache::OpenFile(const FileSpec &file_spec, uint32_t flags,
-                                    uint32_t mode, Status &error) {
+lldb::user_id_t FileCache::OpenFile(const FileSpec &file_spec,
+                                    File::OpenOptions flags, uint32_t mode,
+                                    Status &error) {
   if (!file_spec) {
     error.SetErrorString("empty path");
     return UINT64_MAX;
   }
-  FileSP file_sp(new File());
-  error = FileSystem::Instance().Open(*file_sp, file_spec, flags, mode);
-  if (!file_sp->IsValid())
+  auto file = FileSystem::Instance().Open(file_spec, flags, mode);
+  if (!file) {
+    error = file.takeError();
     return UINT64_MAX;
-  lldb::user_id_t fd = file_sp->GetDescriptor();
-  m_cache[fd] = file_sp;
+  }
+  lldb::user_id_t fd = file.get()->GetDescriptor();
+  m_cache[fd] = std::move(file.get());
   return fd;
 }
 
@@ -48,12 +50,12 @@
     error.SetErrorStringWithFormat("invalid host file descriptor %" PRIu64, fd);
     return false;
   }
-  FileSP file_sp = pos->second;
-  if (!file_sp) {
+  FileUP &file_up = pos->second;
+  if (!file_up) {
     error.SetErrorString("invalid host backing file");
     return false;
   }
-  error = file_sp->Close();
+  error = file_up->Close();
   m_cache.erase(pos);
   return error.Success();
 }
@@ -70,16 +72,16 @@
     error.SetErrorStringWithFormat("invalid host file descriptor %" PRIu64, fd);
     return false;
   }
-  FileSP file_sp = pos->second;
-  if (!file_sp) {
+  FileUP &file_up = pos->second;
+  if (!file_up) {
     error.SetErrorString("invalid host backing file");
     return UINT64_MAX;
   }
-  if (static_cast<uint64_t>(file_sp->SeekFromStart(offset, &error)) != offset ||
+  if (static_cast<uint64_t>(file_up->SeekFromStart(offset, &error)) != offset ||
       error.Fail())
     return UINT64_MAX;
   size_t bytes_written = src_len;
-  error = file_sp->Write(src, bytes_written);
+  error = file_up->Write(src, bytes_written);
   if (error.Fail())
     return UINT64_MAX;
   return bytes_written;
@@ -96,16 +98,16 @@
     error.SetErrorStringWithFormat("invalid host file descriptor %" PRIu64, fd);
     return false;
   }
-  FileSP file_sp = pos->second;
-  if (!file_sp) {
+  FileUP &file_up = pos->second;
+  if (!file_up) {
     error.SetErrorString("invalid host backing file");
     return UINT64_MAX;
   }
-  if (static_cast<uint64_t>(file_sp->SeekFromStart(offset, &error)) != offset ||
+  if (static_cast<uint64_t>(file_up->SeekFromStart(offset, &error)) != offset ||
       error.Fail())
     return UINT64_MAX;
   size_t bytes_read = dst_len;
-  error = file_sp->Read(dst, bytes_read);
+  error = file_up->Read(dst, bytes_read);
   if (error.Fail())
     return UINT64_MAX;
   return bytes_read;
diff --git a/src/llvm-project/lldb/source/Host/common/FileSystem.cpp b/src/llvm-project/lldb/source/Host/common/FileSystem.cpp
index d5ac05b..2db5bff 100644
--- a/src/llvm-project/lldb/source/Host/common/FileSystem.cpp
+++ b/src/llvm-project/lldb/source/Host/common/FileSystem.cpp
@@ -49,7 +49,7 @@
   InstanceImpl().emplace();
 }
 
-void FileSystem::Initialize(FileCollector &collector) {
+void FileSystem::Initialize(std::shared_ptr<FileCollector> collector) {
   lldbassert(!InstanceImpl() && "Already initialized.");
   InstanceImpl().emplace(collector);
 }
@@ -280,7 +280,7 @@
 FileSystem::CreateDataBuffer(const llvm::Twine &path, uint64_t size,
                              uint64_t offset) {
   if (m_collector)
-    m_collector->AddFile(path);
+    m_collector->addFile(path);
 
   const bool is_volatile = !IsLocal(path);
   const ErrorOr<std::string> external_path = GetExternalPath(path);
@@ -415,13 +415,11 @@
   return mode;
 }
 
-Status FileSystem::Open(File &File, const FileSpec &file_spec, uint32_t options,
-                        uint32_t permissions, bool should_close_fd) {
+Expected<FileUP> FileSystem::Open(const FileSpec &file_spec,
+                                  File::OpenOptions options,
+                                  uint32_t permissions, bool should_close_fd) {
   if (m_collector)
-    m_collector->AddFile(file_spec);
-
-  if (File.IsValid())
-    File.Close();
+    m_collector->addFile(file_spec.GetPath());
 
   const int open_flags = GetOpenFlags(options);
   const mode_t open_mode =
@@ -429,20 +427,19 @@
 
   auto path = GetExternalPath(file_spec);
   if (!path)
-    return Status(path.getError());
+    return errorCodeToError(path.getError());
 
   int descriptor = llvm::sys::RetryAfterSignal(
       -1, OpenWithFS, *this, path->c_str(), open_flags, open_mode);
 
-  Status error;
-  if (!File::DescriptorIsValid(descriptor)) {
-    File.SetDescriptor(descriptor, false);
-    error.SetErrorToErrno();
-  } else {
-    File.SetDescriptor(descriptor, should_close_fd);
-    File.SetOptions(options);
-  }
-  return error;
+  if (!File::DescriptorIsValid(descriptor))
+    return llvm::errorCodeToError(
+        std::error_code(errno, std::system_category()));
+
+  auto file = std::unique_ptr<File>(
+      new NativeFile(descriptor, options, should_close_fd));
+  assert(file->IsValid());
+  return std::move(file);
 }
 
 ErrorOr<std::string> FileSystem::GetExternalPath(const llvm::Twine &path) {
diff --git a/src/llvm-project/lldb/source/Host/common/Host.cpp b/src/llvm-project/lldb/source/Host/common/Host.cpp
index 3ba9ab7..5fbb655 100644
--- a/src/llvm-project/lldb/source/Host/common/Host.cpp
+++ b/src/llvm-project/lldb/source/Host/common/Host.cpp
@@ -164,8 +164,7 @@
 static thread_result_t MonitorChildProcessThreadFunction(void *arg) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
   const char *function = __FUNCTION__;
-  if (log)
-    log->Printf("%s (arg = %p) thread starting...", function, arg);
+  LLDB_LOGF(log, "%s (arg = %p) thread starting...", function, arg);
 
   MonitorInfo *info = (MonitorInfo *)arg;
 
@@ -193,9 +192,8 @@
 
   while (1) {
     log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS);
-    if (log)
-      log->Printf("%s ::waitpid (pid = %" PRIi32 ", &status, options = %i)...",
-                  function, pid, options);
+    LLDB_LOGF(log, "%s ::waitpid (pid = %" PRIi32 ", &status, options = %i)...",
+              function, pid, options);
 
     if (CheckForMonitorCancellation())
       break;
@@ -245,12 +243,12 @@
 #endif
 
         log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS);
-        if (log)
-          log->Printf("%s ::waitpid (pid = %" PRIi32
-                      ", &status, options = %i) => pid = %" PRIi32
-                      ", status = 0x%8.8x (%s), signal = %i, exit_state = %i",
-                      function, pid, options, wait_pid, status, status_cstr,
-                      signal, exit_status);
+        LLDB_LOGF(log,
+                  "%s ::waitpid (pid = %" PRIi32
+                  ", &status, options = %i) => pid = %" PRIi32
+                  ", status = 0x%8.8x (%s), signal = %i, exit_state = %i",
+                  function, pid, options, wait_pid, status, status_cstr, signal,
+                  exit_status);
 
         if (exited || (signal != 0 && monitor_signals)) {
           bool callback_return = false;
@@ -259,18 +257,18 @@
 
           // If our process exited, then this thread should exit
           if (exited && wait_pid == abs(pid)) {
-            if (log)
-              log->Printf("%s (arg = %p) thread exiting because pid received "
-                          "exit signal...",
-                          __FUNCTION__, arg);
+            LLDB_LOGF(log,
+                      "%s (arg = %p) thread exiting because pid received "
+                      "exit signal...",
+                      __FUNCTION__, arg);
             break;
           }
           // If the callback returns true, it means this process should exit
           if (callback_return) {
-            if (log)
-              log->Printf("%s (arg = %p) thread exiting because callback "
-                          "returned true...",
-                          __FUNCTION__, arg);
+            LLDB_LOGF(log,
+                      "%s (arg = %p) thread exiting because callback "
+                      "returned true...",
+                      __FUNCTION__, arg);
             break;
           }
         }
@@ -279,8 +277,7 @@
   }
 
   log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS);
-  if (log)
-    log->Printf("%s (arg = %p) thread exiting...", __FUNCTION__, arg);
+  LLDB_LOGF(log, "%s (arg = %p) thread exiting...", __FUNCTION__, arg);
 
   return nullptr;
 }
@@ -296,10 +293,21 @@
 #endif
 
 void Host::SystemLog(SystemLogType type, const char *format, ...) {
-  va_list args;
-  va_start(args, format);
-  SystemLog(type, format, args);
-  va_end(args);
+  {
+    va_list args;
+    va_start(args, format);
+    SystemLog(type, format, args);
+    va_end(args);
+  }
+
+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST));
+  if (log && log->GetVerbose()) {
+    // Log to log channel. This allows testcases to grep for log output.
+    va_list args;
+    va_start(args, format);
+    log->VAPrintf(format, args);
+    va_end(args);
+  }
 }
 
 lldb::pid_t Host::GetCurrentProcessID() { return ::getpid(); }
diff --git a/src/llvm-project/lldb/source/Host/common/HostInfoBase.cpp b/src/llvm-project/lldb/source/Host/common/HostInfoBase.cpp
index 130f0eb..8f263e9 100644
--- a/src/llvm-project/lldb/source/Host/common/HostInfoBase.cpp
+++ b/src/llvm-project/lldb/source/Host/common/HostInfoBase.cpp
@@ -47,18 +47,28 @@
     }
   }
 
-  std::string m_host_triple;
+  llvm::once_flag m_host_triple_once;
+  llvm::Triple m_host_triple;
 
+  llvm::once_flag m_host_arch_once;
   ArchSpec m_host_arch_32;
   ArchSpec m_host_arch_64;
 
+  llvm::once_flag m_lldb_so_dir_once;
   FileSpec m_lldb_so_dir;
+  llvm::once_flag m_lldb_support_exe_dir_once;
   FileSpec m_lldb_support_exe_dir;
+  llvm::once_flag m_lldb_headers_dir_once;
   FileSpec m_lldb_headers_dir;
+  llvm::once_flag m_lldb_clang_resource_dir_once;
   FileSpec m_lldb_clang_resource_dir;
+  llvm::once_flag m_lldb_system_plugin_dir_once;
   FileSpec m_lldb_system_plugin_dir;
+  llvm::once_flag m_lldb_user_plugin_dir_once;
   FileSpec m_lldb_user_plugin_dir;
+  llvm::once_flag m_lldb_process_tmp_dir_once;
   FileSpec m_lldb_process_tmp_dir;
+  llvm::once_flag m_lldb_global_tmp_dir_once;
   FileSpec m_lldb_global_tmp_dir;
 };
 
@@ -72,18 +82,16 @@
   g_fields = nullptr;
 }
 
-llvm::StringRef HostInfoBase::GetTargetTriple() {
-  static llvm::once_flag g_once_flag;
-  llvm::call_once(g_once_flag, []() {
+llvm::Triple HostInfoBase::GetTargetTriple() {
+  llvm::call_once(g_fields->m_host_triple_once, []() {
     g_fields->m_host_triple =
-        HostInfo::GetArchitecture().GetTriple().getTriple();
+        HostInfo::GetArchitecture().GetTriple();
   });
   return g_fields->m_host_triple;
 }
 
 const ArchSpec &HostInfoBase::GetArchitecture(ArchitectureKind arch_kind) {
-  static llvm::once_flag g_once_flag;
-  llvm::call_once(g_once_flag, []() {
+  llvm::call_once(g_fields->m_host_arch_once, []() {
     HostInfo::ComputeHostArchitectureSupport(g_fields->m_host_arch_32,
                                              g_fields->m_host_arch_64);
   });
@@ -108,87 +116,76 @@
 }
 
 FileSpec HostInfoBase::GetShlibDir() {
-  static llvm::once_flag g_once_flag;
-  static bool success = false;
-  llvm::call_once(g_once_flag, []() {
-    success = HostInfo::ComputeSharedLibraryDirectory(g_fields->m_lldb_so_dir);
+  llvm::call_once(g_fields->m_lldb_so_dir_once, []() {
+    if (!HostInfo::ComputeSharedLibraryDirectory(g_fields->m_lldb_so_dir))
+      g_fields->m_lldb_so_dir = FileSpec();
     Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
     LLDB_LOG(log, "shlib dir -> `{0}`", g_fields->m_lldb_so_dir);
   });
-  return success ? g_fields->m_lldb_so_dir : FileSpec();
+  return g_fields->m_lldb_so_dir;
 }
 
 FileSpec HostInfoBase::GetSupportExeDir() {
-  static llvm::once_flag g_once_flag;
-  static bool success = false;
-  llvm::call_once(g_once_flag, []() {
-    success =
-        HostInfo::ComputeSupportExeDirectory(g_fields->m_lldb_support_exe_dir);
+  llvm::call_once(g_fields->m_lldb_support_exe_dir_once, []() {
+    if (!HostInfo::ComputeSupportExeDirectory(g_fields->m_lldb_support_exe_dir))
+      g_fields->m_lldb_support_exe_dir = FileSpec();
     Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
     LLDB_LOG(log, "support exe dir -> `{0}`", g_fields->m_lldb_support_exe_dir);
   });
-  return success ? g_fields->m_lldb_support_exe_dir : FileSpec();
+  return g_fields->m_lldb_support_exe_dir;
 }
 
 FileSpec HostInfoBase::GetHeaderDir() {
-  static llvm::once_flag g_once_flag;
-  static bool success = false;
-  llvm::call_once(g_once_flag, []() {
-    success = HostInfo::ComputeHeaderDirectory(g_fields->m_lldb_headers_dir);
+  llvm::call_once(g_fields->m_lldb_headers_dir_once, []() {
+    if (!HostInfo::ComputeHeaderDirectory(g_fields->m_lldb_headers_dir))
+      g_fields->m_lldb_headers_dir = FileSpec();
     Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
     LLDB_LOG(log, "header dir -> `{0}`", g_fields->m_lldb_headers_dir);
   });
-  return success ? g_fields->m_lldb_headers_dir : FileSpec();
+  return g_fields->m_lldb_headers_dir;
 }
 
 FileSpec HostInfoBase::GetSystemPluginDir() {
-  static llvm::once_flag g_once_flag;
-  static bool success = false;
-  llvm::call_once(g_once_flag, []() {
-    success = HostInfo::ComputeSystemPluginsDirectory(
-        g_fields->m_lldb_system_plugin_dir);
+  llvm::call_once(g_fields->m_lldb_system_plugin_dir_once, []() {
+    if (!HostInfo::ComputeSystemPluginsDirectory(g_fields->m_lldb_system_plugin_dir))
+      g_fields->m_lldb_system_plugin_dir = FileSpec();
     Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
     LLDB_LOG(log, "system plugin dir -> `{0}`",
              g_fields->m_lldb_system_plugin_dir);
   });
-  return success ? g_fields->m_lldb_system_plugin_dir : FileSpec();
+  return g_fields->m_lldb_system_plugin_dir;
 }
 
 FileSpec HostInfoBase::GetUserPluginDir() {
-  static llvm::once_flag g_once_flag;
-  static bool success = false;
-  llvm::call_once(g_once_flag, []() {
-    success =
-        HostInfo::ComputeUserPluginsDirectory(g_fields->m_lldb_user_plugin_dir);
+  llvm::call_once(g_fields->m_lldb_user_plugin_dir_once, []() {
+    if (!HostInfo::ComputeUserPluginsDirectory(g_fields->m_lldb_user_plugin_dir))
+      g_fields->m_lldb_user_plugin_dir = FileSpec();
     Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
     LLDB_LOG(log, "user plugin dir -> `{0}`", g_fields->m_lldb_user_plugin_dir);
   });
-  return success ? g_fields->m_lldb_user_plugin_dir : FileSpec();
+  return g_fields->m_lldb_user_plugin_dir;
 }
 
 FileSpec HostInfoBase::GetProcessTempDir() {
-  static llvm::once_flag g_once_flag;
-  static bool success = false;
-  llvm::call_once(g_once_flag, []() {
-    success = HostInfo::ComputeProcessTempFileDirectory(
-        g_fields->m_lldb_process_tmp_dir);
+  llvm::call_once(g_fields->m_lldb_process_tmp_dir_once, []() {
+    if (!HostInfo::ComputeProcessTempFileDirectory( g_fields->m_lldb_process_tmp_dir))
+      g_fields->m_lldb_process_tmp_dir = FileSpec();
     Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
     LLDB_LOG(log, "process temp dir -> `{0}`",
              g_fields->m_lldb_process_tmp_dir);
   });
-  return success ? g_fields->m_lldb_process_tmp_dir : FileSpec();
+  return g_fields->m_lldb_process_tmp_dir;
 }
 
 FileSpec HostInfoBase::GetGlobalTempDir() {
-  static llvm::once_flag g_once_flag;
-  static bool success = false;
-  llvm::call_once(g_once_flag, []() {
-    success = HostInfo::ComputeGlobalTempFileDirectory(
-        g_fields->m_lldb_global_tmp_dir);
+  llvm::call_once(g_fields->m_lldb_global_tmp_dir_once, []() {
+    if (!HostInfo::ComputeGlobalTempFileDirectory( g_fields->m_lldb_global_tmp_dir))
+      g_fields->m_lldb_global_tmp_dir = FileSpec();
+
     Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
     LLDB_LOG(log, "global temp dir -> `{0}`", g_fields->m_lldb_global_tmp_dir);
   });
-  return success ? g_fields->m_lldb_global_tmp_dir : FileSpec();
+  return g_fields->m_lldb_global_tmp_dir;
 }
 
 ArchSpec HostInfoBase::GetAugmentedArchSpec(llvm::StringRef triple) {
@@ -221,25 +218,24 @@
     return false;
 
   std::string raw_path = lldb_file_spec.GetPath();
-  if (log)
-    log->Printf("HostInfo::%s() attempting to "
-                "derive the path %s relative to liblldb install path: %s",
-                __FUNCTION__, dir.data(), raw_path.c_str());
+  LLDB_LOGF(log,
+            "HostInfo::%s() attempting to "
+            "derive the path %s relative to liblldb install path: %s",
+            __FUNCTION__, dir.data(), raw_path.c_str());
 
   // Drop bin (windows) or lib
   llvm::StringRef parent_path = llvm::sys::path::parent_path(raw_path);
   if (parent_path.empty()) {
-    if (log)
-      log->Printf("HostInfo::%s() failed to find liblldb within the shared "
-                  "lib path",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "HostInfo::%s() failed to find liblldb within the shared "
+              "lib path",
+              __FUNCTION__);
     return false;
   }
 
   raw_path = (parent_path + dir).str();
-  if (log)
-    log->Printf("HostInfo::%s() derived the path as: %s", __FUNCTION__,
-                raw_path.c_str());
+  LLDB_LOGF(log, "HostInfo::%s() derived the path as: %s", __FUNCTION__,
+            raw_path.c_str());
   file_spec.GetDirectory().SetString(raw_path);
   return (bool)file_spec.GetDirectory();
 }
@@ -250,8 +246,8 @@
   // On other posix systems, we will get .../lib(64|32)?/liblldb.so.
 
   FileSpec lldb_file_spec(Host::GetModuleFileSpecForHostAddress(
-      reinterpret_cast<void *>(reinterpret_cast<intptr_t>(
-          HostInfoBase::ComputeSharedLibraryDirectory))));
+      reinterpret_cast<void *>(
+          HostInfoBase::ComputeSharedLibraryDirectory)));
 
   // This is necessary because when running the testsuite the shlib might be a
   // symbolic link inside the Python resource dir.
diff --git a/src/llvm-project/lldb/source/Host/common/HostNativeThreadBase.cpp b/src/llvm-project/lldb/source/Host/common/HostNativeThreadBase.cpp
index a5f876a..fe7d85a 100644
--- a/src/llvm-project/lldb/source/Host/common/HostNativeThreadBase.cpp
+++ b/src/llvm-project/lldb/source/Host/common/HostNativeThreadBase.cpp
@@ -62,8 +62,7 @@
   thread_arg_t thread_arg = info->thread_arg;
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("thread created");
+  LLDB_LOGF(log, "thread created");
 
   delete info;
   return thread_fptr(thread_arg);
diff --git a/src/llvm-project/lldb/source/Host/common/LZMA.cpp b/src/llvm-project/lldb/source/Host/common/LZMA.cpp
new file mode 100644
index 0000000..02be8a0
--- /dev/null
+++ b/src/llvm-project/lldb/source/Host/common/LZMA.cpp
@@ -0,0 +1,146 @@
+//===-- LZMA.cpp ------------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Host/Config.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Error.h"
+
+#if LLDB_ENABLE_LZMA
+#include <lzma.h>
+#endif // LLDB_ENABLE_LZMA
+
+namespace lldb_private {
+
+namespace lzma {
+
+#if !LLDB_ENABLE_LZMA
+bool isAvailable() { return false; }
+llvm::Expected<uint64_t>
+getUncompressedSize(llvm::ArrayRef<uint8_t> InputBuffer) {
+  llvm_unreachable("lzma::getUncompressedSize is unavailable");
+}
+
+llvm::Error uncompress(llvm::ArrayRef<uint8_t> InputBuffer,
+                       llvm::SmallVectorImpl<uint8_t> &Uncompressed) {
+  llvm_unreachable("lzma::uncompress is unavailable");
+}
+
+#else // LLDB_ENABLE_LZMA
+
+bool isAvailable() { return true; }
+
+static const char *convertLZMACodeToString(lzma_ret Code) {
+  switch (Code) {
+  case LZMA_STREAM_END:
+    return "lzma error: LZMA_STREAM_END";
+  case LZMA_NO_CHECK:
+    return "lzma error: LZMA_NO_CHECK";
+  case LZMA_UNSUPPORTED_CHECK:
+    return "lzma error: LZMA_UNSUPPORTED_CHECK";
+  case LZMA_GET_CHECK:
+    return "lzma error: LZMA_GET_CHECK";
+  case LZMA_MEM_ERROR:
+    return "lzma error: LZMA_MEM_ERROR";
+  case LZMA_MEMLIMIT_ERROR:
+    return "lzma error: LZMA_MEMLIMIT_ERROR";
+  case LZMA_FORMAT_ERROR:
+    return "lzma error: LZMA_FORMAT_ERROR";
+  case LZMA_OPTIONS_ERROR:
+    return "lzma error: LZMA_OPTIONS_ERROR";
+  case LZMA_DATA_ERROR:
+    return "lzma error: LZMA_DATA_ERROR";
+  case LZMA_BUF_ERROR:
+    return "lzma error: LZMA_BUF_ERROR";
+  case LZMA_PROG_ERROR:
+    return "lzma error: LZMA_PROG_ERROR";
+  default:
+    llvm_unreachable("unknown or unexpected lzma status code");
+  }
+}
+
+llvm::Expected<uint64_t>
+getUncompressedSize(llvm::ArrayRef<uint8_t> InputBuffer) {
+  lzma_stream_flags opts{};
+  if (InputBuffer.size() < LZMA_STREAM_HEADER_SIZE) {
+    return llvm::createStringError(
+        llvm::inconvertibleErrorCode(),
+        "size of xz-compressed blob (%lu bytes) is smaller than the "
+        "LZMA_STREAM_HEADER_SIZE (%lu bytes)",
+        InputBuffer.size(), LZMA_STREAM_HEADER_SIZE);
+  }
+
+  // Decode xz footer.
+  lzma_ret xzerr = lzma_stream_footer_decode(
+      &opts, InputBuffer.take_back(LZMA_STREAM_HEADER_SIZE).data());
+  if (xzerr != LZMA_OK) {
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "lzma_stream_footer_decode()=%s",
+                                   convertLZMACodeToString(xzerr));
+  }
+  if (InputBuffer.size() < (opts.backward_size + LZMA_STREAM_HEADER_SIZE)) {
+    return llvm::createStringError(
+        llvm::inconvertibleErrorCode(),
+        "xz-compressed buffer size (%lu bytes) too small (required at "
+        "least %lu bytes) ",
+        InputBuffer.size(), (opts.backward_size + LZMA_STREAM_HEADER_SIZE));
+  }
+
+  // Decode xz index.
+  lzma_index *xzindex;
+  uint64_t memlimit(UINT64_MAX);
+  size_t inpos = 0;
+  xzerr = lzma_index_buffer_decode(
+      &xzindex, &memlimit, nullptr,
+      InputBuffer.take_back(LZMA_STREAM_HEADER_SIZE + opts.backward_size)
+          .data(),
+      &inpos, InputBuffer.size());
+  if (xzerr != LZMA_OK) {
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "lzma_index_buffer_decode()=%s",
+                                   convertLZMACodeToString(xzerr));
+  }
+
+  // Get size of uncompressed file to construct an in-memory buffer of the
+  // same size on the calling end (if needed).
+  uint64_t uncompressedSize = lzma_index_uncompressed_size(xzindex);
+
+  // Deallocate xz index as it is no longer needed.
+  lzma_index_end(xzindex, nullptr);
+
+  return uncompressedSize;
+}
+
+llvm::Error uncompress(llvm::ArrayRef<uint8_t> InputBuffer,
+                       llvm::SmallVectorImpl<uint8_t> &Uncompressed) {
+  llvm::Expected<uint64_t> uncompressedSize = getUncompressedSize(InputBuffer);
+
+  if (auto err = uncompressedSize.takeError())
+    return err;
+
+  Uncompressed.resize(*uncompressedSize);
+
+  // Decompress xz buffer to buffer.
+  uint64_t memlimit = UINT64_MAX;
+  size_t inpos = 0;
+  size_t outpos = 0;
+  lzma_ret ret = lzma_stream_buffer_decode(
+      &memlimit, 0, nullptr, InputBuffer.data(), &inpos, InputBuffer.size(),
+      Uncompressed.data(), &outpos, Uncompressed.size());
+  if (ret != LZMA_OK) {
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "lzma_stream_buffer_decode()=%s",
+                                   convertLZMACodeToString(ret));
+  }
+
+  return llvm::Error::success();
+}
+
+#endif // LLDB_ENABLE_LZMA
+
+} // end of namespace lzma
+} // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/Host/common/MainLoop.cpp b/src/llvm-project/lldb/source/Host/common/MainLoop.cpp
index 1ce09a8..240320f 100644
--- a/src/llvm-project/lldb/source/Host/common/MainLoop.cpp
+++ b/src/llvm-project/lldb/source/Host/common/MainLoop.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Config/llvm-config.h"
+#include "lldb/Host/Config.h"
 
 #include "lldb/Host/MainLoop.h"
 #include "lldb/Host/PosixApi.h"
@@ -320,6 +321,7 @@
   // Even if using kqueue, the signal handler will still be invoked, so it's
   // important to replace it with our "benign" handler.
   int ret = sigaction(signo, &new_action, &info.old_action);
+  (void)ret;
   assert(ret == 0 && "sigaction failed");
 
 #if HAVE_SYS_EVENT_H
diff --git a/src/llvm-project/lldb/source/Host/common/NativeProcessProtocol.cpp b/src/llvm-project/lldb/source/Host/common/NativeProcessProtocol.cpp
index 90272cb..712c448 100644
--- a/src/llvm-project/lldb/source/Host/common/NativeProcessProtocol.cpp
+++ b/src/llvm-project/lldb/source/Host/common/NativeProcessProtocol.cpp
@@ -16,6 +16,8 @@
 #include "lldb/Utility/State.h"
 #include "lldb/lldb-enumerations.h"
 
+#include "llvm/Support/Process.h"
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -329,22 +331,23 @@
 
   if (log) {
     if (!m_delegates.empty()) {
-      log->Printf("NativeProcessProtocol::%s: sent state notification [%s] "
-                  "from process %" PRIu64,
-                  __FUNCTION__, lldb_private::StateAsCString(state), GetID());
+      LLDB_LOGF(log,
+                "NativeProcessProtocol::%s: sent state notification [%s] "
+                "from process %" PRIu64,
+                __FUNCTION__, lldb_private::StateAsCString(state), GetID());
     } else {
-      log->Printf("NativeProcessProtocol::%s: would send state notification "
-                  "[%s] from process %" PRIu64 ", but no delegates",
-                  __FUNCTION__, lldb_private::StateAsCString(state), GetID());
+      LLDB_LOGF(log,
+                "NativeProcessProtocol::%s: would send state notification "
+                "[%s] from process %" PRIu64 ", but no delegates",
+                __FUNCTION__, lldb_private::StateAsCString(state), GetID());
     }
   }
 }
 
 void NativeProcessProtocol::NotifyDidExec() {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("NativeProcessProtocol::%s - preparing to call delegates",
-                __FUNCTION__);
+  LLDB_LOGF(log, "NativeProcessProtocol::%s - preparing to call delegates",
+            __FUNCTION__);
 
   {
     std::lock_guard<std::recursive_mutex> guard(m_delegates_mutex);
@@ -524,6 +527,7 @@
 
   switch (GetArchitecture().GetMachine()) {
   case llvm::Triple::aarch64:
+  case llvm::Triple::aarch64_32:
     return llvm::makeArrayRef(g_aarch64_opcode);
 
   case llvm::Triple::x86:
@@ -560,6 +564,7 @@
 
   case llvm::Triple::arm:
   case llvm::Triple::aarch64:
+  case llvm::Triple::aarch64_32:
   case llvm::Triple::mips64:
   case llvm::Triple::mips64el:
   case llvm::Triple::mips:
@@ -659,6 +664,58 @@
   return Status();
 }
 
+llvm::Expected<llvm::StringRef>
+NativeProcessProtocol::ReadCStringFromMemory(lldb::addr_t addr, char *buffer,
+                                             size_t max_size,
+                                             size_t &total_bytes_read) {
+  static const size_t cache_line_size =
+      llvm::sys::Process::getPageSizeEstimate();
+  size_t bytes_read = 0;
+  size_t bytes_left = max_size;
+  addr_t curr_addr = addr;
+  size_t string_size;
+  char *curr_buffer = buffer;
+  total_bytes_read = 0;
+  Status status;
+
+  while (bytes_left > 0 && status.Success()) {
+    addr_t cache_line_bytes_left =
+        cache_line_size - (curr_addr % cache_line_size);
+    addr_t bytes_to_read = std::min<addr_t>(bytes_left, cache_line_bytes_left);
+    status = ReadMemory(curr_addr, static_cast<void *>(curr_buffer),
+                        bytes_to_read, bytes_read);
+
+    if (bytes_read == 0)
+      break;
+
+    void *str_end = std::memchr(curr_buffer, '\0', bytes_read);
+    if (str_end != nullptr) {
+      total_bytes_read =
+          static_cast<size_t>((static_cast<char *>(str_end) - buffer + 1));
+      status.Clear();
+      break;
+    }
+
+    total_bytes_read += bytes_read;
+    curr_buffer += bytes_read;
+    curr_addr += bytes_read;
+    bytes_left -= bytes_read;
+  }
+
+  string_size = total_bytes_read - 1;
+
+  // Make sure we return a null terminated string.
+  if (bytes_left == 0 && max_size > 0 && buffer[max_size - 1] != '\0') {
+    buffer[max_size - 1] = '\0';
+    total_bytes_read--;
+  }
+
+  if (!status.Success())
+    return status.ToError();
+
+  return llvm::StringRef(buffer, string_size);
+}
+
 lldb::StateType NativeProcessProtocol::GetState() const {
   std::lock_guard<std::recursive_mutex> guard(m_state_mutex);
   return m_state;
diff --git a/src/llvm-project/lldb/source/Host/common/NativeRegisterContext.cpp b/src/llvm-project/lldb/source/Host/common/NativeRegisterContext.cpp
index 2f30d52..fe40073 100644
--- a/src/llvm-project/lldb/source/Host/common/NativeRegisterContext.cpp
+++ b/src/llvm-project/lldb/source/Host/common/NativeRegisterContext.cpp
@@ -114,16 +114,15 @@
 
   uint32_t reg = ConvertRegisterKindToRegisterNumber(eRegisterKindGeneric,
                                                      LLDB_REGNUM_GENERIC_PC);
-  if (log)
-    log->Printf("NativeRegisterContext::%s using reg index %" PRIu32
-                " (default %" PRIu64 ")",
-                __FUNCTION__, reg, fail_value);
+  LLDB_LOGF(log,
+            "NativeRegisterContext::%s using reg index %" PRIu32
+            " (default %" PRIu64 ")",
+            __FUNCTION__, reg, fail_value);
 
   const uint64_t retval = ReadRegisterAsUnsigned(reg, fail_value);
 
-  if (log)
-    log->Printf("NativeRegisterContext::%s " PRIu32 " retval %" PRIu64,
-                __FUNCTION__, retval);
+  LLDB_LOGF(log, "NativeRegisterContext::%s " PRIu32 " retval %" PRIu64,
+            __FUNCTION__, retval);
 
   return retval;
 }
@@ -192,20 +191,19 @@
     RegisterValue value;
     Status error = ReadRegister(reg_info, value);
     if (error.Success()) {
-      if (log)
-        log->Printf("NativeRegisterContext::%s ReadRegister() succeeded, value "
-                    "%" PRIu64,
-                    __FUNCTION__, value.GetAsUInt64());
+      LLDB_LOGF(log,
+                "NativeRegisterContext::%s ReadRegister() succeeded, value "
+                "%" PRIu64,
+                __FUNCTION__, value.GetAsUInt64());
       return value.GetAsUInt64();
     } else {
-      if (log)
-        log->Printf("NativeRegisterContext::%s ReadRegister() failed, error %s",
-                    __FUNCTION__, error.AsCString());
+      LLDB_LOGF(log,
+                "NativeRegisterContext::%s ReadRegister() failed, error %s",
+                __FUNCTION__, error.AsCString());
     }
   } else {
-    if (log)
-      log->Printf("NativeRegisterContext::%s ReadRegister() null reg_info",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "NativeRegisterContext::%s ReadRegister() null reg_info",
+              __FUNCTION__);
   }
   return fail_value;
 }
diff --git a/src/llvm-project/lldb/source/Host/common/PseudoTerminal.cpp b/src/llvm-project/lldb/source/Host/common/PseudoTerminal.cpp
index 85e54f4..8582828 100644
--- a/src/llvm-project/lldb/source/Host/common/PseudoTerminal.cpp
+++ b/src/llvm-project/lldb/source/Host/common/PseudoTerminal.cpp
@@ -79,7 +79,7 @@
   if (error_str)
     error_str[0] = '\0';
 
-#if !defined(LLDB_DISABLE_POSIX)
+#if LLDB_ENABLE_POSIX
   // Open the master side of a pseudo terminal
   m_master_fd = ::posix_openpt(oflag);
   if (m_master_fd < 0) {
@@ -193,7 +193,7 @@
   if (error_str)
     error_str[0] = '\0';
   pid_t pid = LLDB_INVALID_PROCESS_ID;
-#if !defined(LLDB_DISABLE_POSIX)
+#if LLDB_ENABLE_POSIX
   int flags = O_RDWR;
   flags |= O_CLOEXEC;
   if (OpenFirstAvailableMaster(flags, error_str, error_len)) {
diff --git a/src/llvm-project/lldb/source/Host/common/Socket.cpp b/src/llvm-project/lldb/source/Host/common/Socket.cpp
index a89f117..7fba1da 100644
--- a/src/llvm-project/lldb/source/Host/common/Socket.cpp
+++ b/src/llvm-project/lldb/source/Host/common/Socket.cpp
@@ -22,7 +22,7 @@
 #include "llvm/Support/Error.h"
 #include "llvm/Support/WindowsError.h"
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include "lldb/Host/posix/DomainSocket.h"
 
 #include <arpa/inet.h>
@@ -74,9 +74,10 @@
 
 Socket::Socket(SocketProtocol protocol, bool should_close,
                bool child_processes_inherit)
-    : IOObject(eFDTypeSocket, should_close), m_protocol(protocol),
+    : IOObject(eFDTypeSocket), m_protocol(protocol),
       m_socket(kInvalidSocketValue),
-      m_child_processes_inherit(child_processes_inherit) {}
+      m_child_processes_inherit(child_processes_inherit),
+      m_should_close_fd(should_close) {}
 
 Socket::~Socket() { Close(); }
 
@@ -114,16 +115,16 @@
   switch (protocol) {
   case ProtocolTcp:
     socket_up =
-        llvm::make_unique<TCPSocket>(true, child_processes_inherit);
+        std::make_unique<TCPSocket>(true, child_processes_inherit);
     break;
   case ProtocolUdp:
     socket_up =
-        llvm::make_unique<UDPSocket>(true, child_processes_inherit);
+        std::make_unique<UDPSocket>(true, child_processes_inherit);
     break;
   case ProtocolUnixDomain:
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
     socket_up =
-        llvm::make_unique<DomainSocket>(true, child_processes_inherit);
+        std::make_unique<DomainSocket>(true, child_processes_inherit);
 #else
     error.SetErrorString(
         "Unix domain sockets are not supported on this platform.");
@@ -132,7 +133,7 @@
   case ProtocolUnixAbstract:
 #ifdef __linux__
     socket_up =
-        llvm::make_unique<AbstractSocket>(child_processes_inherit);
+        std::make_unique<AbstractSocket>(child_processes_inherit);
 #else
     error.SetErrorString(
         "Abstract domain sockets are not supported on this platform.");
@@ -149,9 +150,8 @@
 Status Socket::TcpConnect(llvm::StringRef host_and_port,
                           bool child_processes_inherit, Socket *&socket) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_COMMUNICATION));
-  if (log)
-    log->Printf("Socket::%s (host/port = %s)", __FUNCTION__,
-                host_and_port.str().c_str());
+  LLDB_LOGF(log, "Socket::%s (host/port = %s)", __FUNCTION__,
+            host_and_port.str().c_str());
 
   Status error;
   std::unique_ptr<Socket> connect_socket(
@@ -170,8 +170,7 @@
                          bool child_processes_inherit, Socket *&socket,
                          Predicate<uint16_t> *predicate, int backlog) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("Socket::%s (%s)", __FUNCTION__, host_and_port.str().c_str());
+  LLDB_LOGF(log, "Socket::%s (%s)", __FUNCTION__, host_and_port.str().c_str());
 
   Status error;
   std::string host_str;
@@ -209,9 +208,8 @@
 Status Socket::UdpConnect(llvm::StringRef host_and_port,
                           bool child_processes_inherit, Socket *&socket) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("Socket::%s (host/port = %s)", __FUNCTION__,
-                host_and_port.str().c_str());
+  LLDB_LOGF(log, "Socket::%s (host/port = %s)", __FUNCTION__,
+            host_and_port.str().c_str());
 
   return UDPSocket::Connect(host_and_port, child_processes_inherit, socket);
 }
@@ -285,27 +283,25 @@
                                int32_t &port, Status *error_ptr) {
   static RegularExpression g_regex(
       llvm::StringRef("([^:]+|\\[[0-9a-fA-F:]+.*\\]):([0-9]+)"));
-  RegularExpression::Match regex_match(2);
-  if (g_regex.Execute(host_and_port, &regex_match)) {
-    if (regex_match.GetMatchAtIndex(host_and_port, 1, host_str) &&
-        regex_match.GetMatchAtIndex(host_and_port, 2, port_str)) {
-      // IPv6 addresses are wrapped in [] when specified with ports
-      if (host_str.front() == '[' && host_str.back() == ']')
-        host_str = host_str.substr(1, host_str.size() - 2);
-      bool ok = false;
-      port = StringConvert::ToUInt32(port_str.c_str(), UINT32_MAX, 10, &ok);
-      if (ok && port <= UINT16_MAX) {
-        if (error_ptr)
-          error_ptr->Clear();
-        return true;
-      }
-      // port is too large
+  llvm::SmallVector<llvm::StringRef, 3> matches;
+  if (g_regex.Execute(host_and_port, &matches)) {
+    host_str = matches[1].str();
+    port_str = matches[2].str();
+    // IPv6 addresses are wrapped in [] when specified with ports
+    if (host_str.front() == '[' && host_str.back() == ']')
+      host_str = host_str.substr(1, host_str.size() - 2);
+    bool ok = false;
+    port = StringConvert::ToUInt32(port_str.c_str(), UINT32_MAX, 10, &ok);
+    if (ok && port <= UINT16_MAX) {
       if (error_ptr)
-        error_ptr->SetErrorStringWithFormat(
-            "invalid host:port specification: '%s'",
-            host_and_port.str().c_str());
-      return false;
+        error_ptr->Clear();
+      return true;
     }
+    // port is too large
+    if (error_ptr)
+      error_ptr->SetErrorStringWithFormat(
+          "invalid host:port specification: '%s'", host_and_port.str().c_str());
+    return false;
   }
 
   // If this was unsuccessful, then check if it's simply a signed 32-bit
@@ -345,18 +341,20 @@
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_COMMUNICATION));
   if (log) {
-    log->Printf("%p Socket::Read() (socket = %" PRIu64
-                ", src = %p, src_len = %" PRIu64 ", flags = 0) => %" PRIi64
-                " (error = %s)",
-                static_cast<void *>(this), static_cast<uint64_t>(m_socket), buf,
-                static_cast<uint64_t>(num_bytes),
-                static_cast<int64_t>(bytes_received), error.AsCString());
+    LLDB_LOGF(log,
+              "%p Socket::Read() (socket = %" PRIu64
+              ", src = %p, src_len = %" PRIu64 ", flags = 0) => %" PRIi64
+              " (error = %s)",
+              static_cast<void *>(this), static_cast<uint64_t>(m_socket), buf,
+              static_cast<uint64_t>(num_bytes),
+              static_cast<int64_t>(bytes_received), error.AsCString());
   }
 
   return error;
 }
 
 Status Socket::Write(const void *buf, size_t &num_bytes) {
+  const size_t src_len = num_bytes;
   Status error;
   int bytes_sent = 0;
   do {
@@ -371,12 +369,13 @@
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_COMMUNICATION));
   if (log) {
-    log->Printf("%p Socket::Write() (socket = %" PRIu64
-                ", src = %p, src_len = %" PRIu64 ", flags = 0) => %" PRIi64
-                " (error = %s)",
-                static_cast<void *>(this), static_cast<uint64_t>(m_socket), buf,
-                static_cast<uint64_t>(num_bytes),
-                static_cast<int64_t>(bytes_sent), error.AsCString());
+    LLDB_LOGF(log,
+              "%p Socket::Write() (socket = %" PRIu64
+              ", src = %p, src_len = %" PRIu64 ", flags = 0) => %" PRIi64
+              " (error = %s)",
+              static_cast<void *>(this), static_cast<uint64_t>(m_socket), buf,
+              static_cast<uint64_t>(src_len),
+              static_cast<int64_t>(bytes_sent), error.AsCString());
   }
 
   return error;
@@ -393,9 +392,8 @@
     return error;
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("%p Socket::Close (fd = %" PRIu64 ")",
-                static_cast<void *>(this), static_cast<uint64_t>(m_socket));
+  LLDB_LOGF(log, "%p Socket::Close (fd = %" PRIu64 ")",
+            static_cast<void *>(this), static_cast<uint64_t>(m_socket));
 
 #if defined(_WIN32)
   bool success = !!closesocket(m_socket);
@@ -479,11 +477,11 @@
   if (!child_processes_inherit) {
     flags |= SOCK_CLOEXEC;
   }
-  NativeSocket fd = llvm::sys::RetryAfterSignal(-1, ::accept4,
-      sockfd, addr, addrlen, flags);
+  NativeSocket fd = llvm::sys::RetryAfterSignal(
+      static_cast<NativeSocket>(-1), ::accept4, sockfd, addr, addrlen, flags);
 #else
-  NativeSocket fd = llvm::sys::RetryAfterSignal(-1, ::accept,
-      sockfd, addr, addrlen);
+  NativeSocket fd = llvm::sys::RetryAfterSignal(
+      static_cast<NativeSocket>(-1), ::accept, sockfd, addr, addrlen);
 #endif
   if (fd == kInvalidSocketValue)
     SetLastError(error);
diff --git a/src/llvm-project/lldb/source/Host/common/SocketAddress.cpp b/src/llvm-project/lldb/source/Host/common/SocketAddress.cpp
index 882fd24..960ed18 100644
--- a/src/llvm-project/lldb/source/Host/common/SocketAddress.cpp
+++ b/src/llvm-project/lldb/source/Host/common/SocketAddress.cpp
@@ -174,12 +174,6 @@
 }
 
 // SocketAddress assignment operator
-const SocketAddress &SocketAddress::operator=(const SocketAddress &rhs) {
-  if (this != &rhs)
-    m_socket_addr = rhs.m_socket_addr;
-  return *this;
-}
-
 const SocketAddress &SocketAddress::
 operator=(const struct addrinfo *addr_info) {
   Clear();
diff --git a/src/llvm-project/lldb/source/Host/common/TCPSocket.cpp b/src/llvm-project/lldb/source/Host/common/TCPSocket.cpp
index 58f99f7..b716935 100644
--- a/src/llvm-project/lldb/source/Host/common/TCPSocket.cpp
+++ b/src/llvm-project/lldb/source/Host/common/TCPSocket.cpp
@@ -20,7 +20,7 @@
 #include "llvm/Support/Errno.h"
 #include "llvm/Support/raw_ostream.h"
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include <arpa/inet.h>
 #include <netinet/tcp.h>
 #include <sys/socket.h>
@@ -140,8 +140,7 @@
 Status TCPSocket::Connect(llvm::StringRef name) {
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_COMMUNICATION));
-  if (log)
-    log->Printf("TCPSocket::%s (host/port = %s)", __FUNCTION__, name.data());
+  LLDB_LOGF(log, "TCPSocket::%s (host/port = %s)", __FUNCTION__, name.data());
 
   Status error;
   std::string host_str;
@@ -150,9 +149,9 @@
   if (!DecodeHostAndPort(name, host_str, port_str, port, &error))
     return error;
 
-  auto addresses = lldb_private::SocketAddress::GetAddressInfo(
+  std::vector<SocketAddress> addresses = SocketAddress::GetAddressInfo(
       host_str.c_str(), nullptr, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP);
-  for (auto address : addresses) {
+  for (SocketAddress &address : addresses) {
     error = CreateSocket(address.GetFamily());
     if (error.Fail())
       continue;
@@ -177,8 +176,7 @@
 
 Status TCPSocket::Listen(llvm::StringRef name, int backlog) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("TCPSocket::%s (%s)", __FUNCTION__, name.data());
+  LLDB_LOGF(log, "TCPSocket::%s (%s)", __FUNCTION__, name.data());
 
   Status error;
   std::string host_str;
@@ -189,9 +187,9 @@
 
   if (host_str == "*")
     host_str = "0.0.0.0";
-  auto addresses = lldb_private::SocketAddress::GetAddressInfo(
+  std::vector<SocketAddress> addresses = SocketAddress::GetAddressInfo(
       host_str.c_str(), nullptr, AF_UNSPEC, SOCK_STREAM, IPPROTO_TCP);
-  for (auto address : addresses) {
+  for (SocketAddress &address : addresses) {
     int fd = Socket::CreateSocket(address.GetFamily(), kType, IPPROTO_TCP,
                                   m_child_processes_inherit, error);
     if (error.Fail()) {
@@ -275,7 +273,7 @@
   // Loop until we are happy with our connection
   while (!accept_connection) {
     accept_loop.Run();
-    
+
     if (error.Fail())
         return error;
 
diff --git a/src/llvm-project/lldb/source/Host/common/Terminal.cpp b/src/llvm-project/lldb/source/Host/common/Terminal.cpp
index 4b536b0..e1aea26 100644
--- a/src/llvm-project/lldb/source/Host/common/Terminal.cpp
+++ b/src/llvm-project/lldb/source/Host/common/Terminal.cpp
@@ -15,7 +15,7 @@
 #include <fcntl.h>
 #include <signal.h>
 
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
 #include <termios.h>
 #endif
 
@@ -25,7 +25,7 @@
 
 bool Terminal::SetEcho(bool enabled) {
   if (FileDescriptorIsValid()) {
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
     if (IsATerminal()) {
       struct termios fd_termios;
       if (::tcgetattr(m_fd, &fd_termios) == 0) {
@@ -47,14 +47,14 @@
         return ::tcsetattr(m_fd, TCSANOW, &fd_termios) == 0;
       }
     }
-#endif // #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#endif // #if LLDB_ENABLE_TERMIOS
   }
   return false;
 }
 
 bool Terminal::SetCanonical(bool enabled) {
   if (FileDescriptorIsValid()) {
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
     if (IsATerminal()) {
       struct termios fd_termios;
       if (::tcgetattr(m_fd, &fd_termios) == 0) {
@@ -76,7 +76,7 @@
         return ::tcsetattr(m_fd, TCSANOW, &fd_termios) == 0;
       }
     }
-#endif // #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#endif // #if LLDB_ENABLE_TERMIOS
   }
   return false;
 }
@@ -84,7 +84,7 @@
 // Default constructor
 TerminalState::TerminalState()
     : m_tty(), m_tflags(-1),
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
       m_termios_up(),
 #endif
       m_process_group(-1) {
@@ -96,7 +96,7 @@
 void TerminalState::Clear() {
   m_tty.Clear();
   m_tflags = -1;
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
   m_termios_up.reset();
 #endif
   m_process_group = -1;
@@ -108,17 +108,17 @@
 bool TerminalState::Save(int fd, bool save_process_group) {
   m_tty.SetFileDescriptor(fd);
   if (m_tty.IsATerminal()) {
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
     m_tflags = ::fcntl(fd, F_GETFL, 0);
 #endif
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
     if (m_termios_up == nullptr)
       m_termios_up.reset(new struct termios);
     int err = ::tcgetattr(fd, m_termios_up.get());
     if (err != 0)
       m_termios_up.reset();
-#endif // #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
-#ifndef LLDB_DISABLE_POSIX
+#endif // #if LLDB_ENABLE_TERMIOS
+#if LLDB_ENABLE_POSIX
     if (save_process_group)
       m_process_group = ::tcgetpgrp(0);
     else
@@ -127,7 +127,7 @@
   } else {
     m_tty.Clear();
     m_tflags = -1;
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
     m_termios_up.reset();
 #endif
     m_process_group = -1;
@@ -138,16 +138,16 @@
 // Restore the state of the TTY using the cached values from a previous call to
 // Save().
 bool TerminalState::Restore() const {
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
   if (IsValid()) {
     const int fd = m_tty.GetFileDescriptor();
     if (TFlagsIsValid())
       fcntl(fd, F_SETFL, m_tflags);
 
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
     if (TTYStateIsValid())
       tcsetattr(fd, TCSANOW, m_termios_up.get());
-#endif // #ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#endif // #if LLDB_ENABLE_TERMIOS
 
     if (ProcessGroupIsValid()) {
       // Save the original signal handler.
@@ -176,7 +176,7 @@
 
 // Returns true if m_ttystate is valid
 bool TerminalState::TTYStateIsValid() const {
-#ifdef LLDB_CONFIG_TERMIOS_SUPPORTED
+#if LLDB_ENABLE_TERMIOS
   return m_termios_up != nullptr;
 #else
   return false;
diff --git a/src/llvm-project/lldb/source/Host/common/UDPSocket.cpp b/src/llvm-project/lldb/source/Host/common/UDPSocket.cpp
index 8dbf57d..0a991c3 100644
--- a/src/llvm-project/lldb/source/Host/common/UDPSocket.cpp
+++ b/src/llvm-project/lldb/source/Host/common/UDPSocket.cpp
@@ -11,7 +11,7 @@
 #include "lldb/Host/Config.h"
 #include "lldb/Utility/Log.h"
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include <arpa/inet.h>
 #include <sys/socket.h>
 #endif
@@ -58,8 +58,7 @@
   std::unique_ptr<UDPSocket> final_socket;
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("UDPSocket::%s (host/port = %s)", __FUNCTION__, name.data());
+  LLDB_LOGF(log, "UDPSocket::%s (host/port = %s)", __FUNCTION__, name.data());
 
   Status error;
   std::string host_str;
@@ -81,7 +80,7 @@
                           &service_info_list);
   if (err != 0) {
     error.SetErrorStringWithFormat(
-#if defined(_MSC_VER) && defined(UNICODE)
+#if defined(_WIN32) && defined(UNICODE)
         "getaddrinfo(%s, %s, &hints, &info) returned error %i (%S)",
 #else
         "getaddrinfo(%s, %s, &hints, &info) returned error %i (%s)",
diff --git a/src/llvm-project/lldb/source/Host/common/XML.cpp b/src/llvm-project/lldb/source/Host/common/XML.cpp
index cb23ac1..28d1f5a 100644
--- a/src/llvm-project/lldb/source/Host/common/XML.cpp
+++ b/src/llvm-project/lldb/source/Host/common/XML.cpp
@@ -8,6 +8,7 @@
 
 #include <stdlib.h> /* atof */
 
+#include "lldb/Host/Config.h"
 #include "lldb/Host/StringConvert.h"
 #include "lldb/Host/XML.h"
 
@@ -21,7 +22,7 @@
 XMLDocument::~XMLDocument() { Clear(); }
 
 void XMLDocument::Clear() {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (m_document) {
     xmlDocPtr doc = m_document;
     m_document = nullptr;
@@ -42,7 +43,7 @@
 }
 
 bool XMLDocument::ParseFile(const char *path) {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   Clear();
   xmlSetGenericErrorFunc((void *)this, XMLDocument::ErrorCallback);
   m_document = xmlParseFile(path);
@@ -53,7 +54,7 @@
 
 bool XMLDocument::ParseMemory(const char *xml, size_t xml_length,
                               const char *url) {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   Clear();
   xmlSetGenericErrorFunc((void *)this, XMLDocument::ErrorCallback);
   m_document = xmlReadMemory(xml, (int)xml_length, url, nullptr, 0);
@@ -63,7 +64,7 @@
 }
 
 XMLNode XMLDocument::GetRootElement(const char *required_name) {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid()) {
     XMLNode root_node(xmlDocGetRootElement(m_document));
     if (required_name) {
@@ -81,7 +82,7 @@
 llvm::StringRef XMLDocument::GetErrors() const { return m_errors.GetString(); }
 
 bool XMLDocument::XMLEnabled() {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   return true;
 #else
   return false;
@@ -99,7 +100,7 @@
 void XMLNode::Clear() { m_node = nullptr; }
 
 XMLNode XMLNode::GetParent() const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid())
     return XMLNode(m_node->parent);
   else
@@ -110,7 +111,7 @@
 }
 
 XMLNode XMLNode::GetSibling() const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid())
     return XMLNode(m_node->next);
   else
@@ -121,7 +122,7 @@
 }
 
 XMLNode XMLNode::GetChild() const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
   if (IsValid())
     return XMLNode(m_node->children);
@@ -135,7 +136,7 @@
 llvm::StringRef XMLNode::GetAttributeValue(const char *name,
                                            const char *fail_value) const {
   const char *attr_value = nullptr;
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
   if (IsValid())
     attr_value = (const char *)xmlGetProp(m_node, (const xmlChar *)name);
@@ -152,7 +153,7 @@
 
 bool XMLNode::GetAttributeValueAsUnsigned(const char *name, uint64_t &value,
                                           uint64_t fail_value, int base) const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   llvm::StringRef str_value = GetAttributeValue(name, "");
 #else
   llvm::StringRef str_value;
@@ -163,14 +164,14 @@
 }
 
 void XMLNode::ForEachChildNode(NodeCallback const &callback) const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid())
     GetChild().ForEachSiblingNode(callback);
 #endif
 }
 
 void XMLNode::ForEachChildElement(NodeCallback const &callback) const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   XMLNode child = GetChild();
   if (child)
     child.ForEachSiblingElement(callback);
@@ -179,7 +180,7 @@
 
 void XMLNode::ForEachChildElementWithName(const char *name,
                                           NodeCallback const &callback) const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   XMLNode child = GetChild();
   if (child)
     child.ForEachSiblingElementWithName(name, callback);
@@ -187,7 +188,7 @@
 }
 
 void XMLNode::ForEachAttribute(AttributeCallback const &callback) const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
   if (IsValid()) {
     for (xmlAttrPtr attr = m_node->properties; attr != nullptr;
@@ -210,7 +211,7 @@
 }
 
 void XMLNode::ForEachSiblingNode(NodeCallback const &callback) const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
   if (IsValid()) {
     // iterate through all siblings
@@ -223,7 +224,7 @@
 }
 
 void XMLNode::ForEachSiblingElement(NodeCallback const &callback) const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
   if (IsValid()) {
     // iterate through all siblings
@@ -241,7 +242,7 @@
 
 void XMLNode::ForEachSiblingElementWithName(
     const char *name, NodeCallback const &callback) const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
   if (IsValid()) {
     // iterate through all siblings
@@ -269,7 +270,7 @@
 }
 
 llvm::StringRef XMLNode::GetName() const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid()) {
     if (m_node->name)
       return llvm::StringRef((const char *)m_node->name);
@@ -280,7 +281,7 @@
 
 bool XMLNode::GetElementText(std::string &text) const {
   text.clear();
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid()) {
     bool success = false;
     if (m_node->type == XML_ELEMENT_NODE) {
@@ -302,7 +303,7 @@
 bool XMLNode::GetElementTextAsUnsigned(uint64_t &value, uint64_t fail_value,
                                        int base) const {
   bool success = false;
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid()) {
     std::string text;
     if (GetElementText(text))
@@ -316,7 +317,7 @@
 
 bool XMLNode::GetElementTextAsFloat(double &value, double fail_value) const {
   bool success = false;
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid()) {
     std::string text;
     if (GetElementText(text)) {
@@ -331,7 +332,7 @@
 }
 
 bool XMLNode::NameIs(const char *name) const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
   if (IsValid()) {
     // In case we are looking for a nullptr name or an exact pointer match
@@ -347,7 +348,7 @@
 XMLNode XMLNode::FindFirstChildElementWithName(const char *name) const {
   XMLNode result_node;
 
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   ForEachChildElementWithName(
       name, [&result_node](const XMLNode &node) -> bool {
         result_node = node;
@@ -362,7 +363,7 @@
 bool XMLNode::IsValid() const { return m_node != nullptr; }
 
 bool XMLNode::IsElement() const {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid())
     return m_node->type == XML_ELEMENT_NODE;
 #endif
@@ -370,7 +371,7 @@
 }
 
 XMLNode XMLNode::GetElementForPath(const NamePath &path) {
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
   if (IsValid()) {
     if (path.empty())
@@ -430,7 +431,7 @@
 
 XMLNode ApplePropertyList::GetValueNode(const char *key) const {
   XMLNode value_node;
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
   if (IsValid()) {
     m_dict_node.ForEachChildElementWithName(
@@ -454,7 +455,7 @@
 bool ApplePropertyList::ExtractStringFromValueNode(const XMLNode &node,
                                                    std::string &value) {
   value.clear();
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (node.IsValid()) {
     llvm::StringRef element_name = node.GetName();
     if (element_name == "true" || element_name == "false") {
@@ -470,7 +471,7 @@
   return false;
 }
 
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
 
 namespace {
 
@@ -532,7 +533,7 @@
 
 StructuredData::ObjectSP ApplePropertyList::GetStructuredData() {
   StructuredData::ObjectSP root_sp;
-#if defined(LIBXML2_DEFINED)
+#if LLDB_ENABLE_LIBXML2
   if (IsValid()) {
     return CreatePlistValue(m_dict_node);
   }
diff --git a/src/llvm-project/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp b/src/llvm-project/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
index e28cf4a..7fc6f43 100644
--- a/src/llvm-project/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
+++ b/src/llvm-project/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
@@ -64,13 +64,10 @@
   static FileSpec g_program_filespec;
   if (!g_program_filespec) {
     int exe_path_mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, getpid()};
-    size_t exe_path_size;
-    if (sysctl(exe_path_mib, 4, NULL, &exe_path_size, NULL, 0) == 0) {
-      char *exe_path = new char[exe_path_size];
-      if (sysctl(exe_path_mib, 4, exe_path, &exe_path_size, NULL, 0) == 0)
-        g_program_filespec.SetFile(exe_path, FileSpec::Style::native);
-      delete[] exe_path;
-    }
+    char exe_path[PATH_MAX];
+    size_t exe_path_size = sizeof(exe_path);
+    if (sysctl(exe_path_mib, 4, exe_path, &exe_path_size, NULL, 0) == 0)
+      g_program_filespec.SetFile(exe_path, FileSpec::Style::native);
   }
   return g_program_filespec;
 }
diff --git a/src/llvm-project/lldb/source/Host/linux/Host.cpp b/src/llvm-project/lldb/source/Host/linux/Host.cpp
index f6a8766..fe60d1f 100644
--- a/src/llvm-project/lldb/source/Host/linux/Host.cpp
+++ b/src/llvm-project/lldb/source/Host/linux/Host.cpp
@@ -144,61 +144,13 @@
   }
 }
 
-static bool GetProcessAndStatInfo(::pid_t pid,
-                                  ProcessInstanceInfo &process_info,
-                                  ProcessState &State, ::pid_t &tracerpid) {
-  tracerpid = 0;
-  process_info.Clear();
-
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-
-  // We can't use getProcFile here because proc/[pid]/exe is a symbolic link.
-  llvm::SmallString<64> ProcExe;
-  (llvm::Twine("/proc/") + llvm::Twine(pid) + "/exe").toVector(ProcExe);
-  std::string ExePath(PATH_MAX, '\0');
-
-  ssize_t len = readlink(ProcExe.c_str(), &ExePath[0], PATH_MAX);
-  if (len <= 0) {
-    LLDB_LOG(log, "failed to read link exe link for {0}: {1}", pid,
-             Status(errno, eErrorTypePOSIX));
-    return false;
-  }
-  ExePath.resize(len);
-
-  // If the binary has been deleted, the link name has " (deleted)" appended.
-  // Remove if there.
-  llvm::StringRef PathRef = ExePath;
-  PathRef.consume_back(" (deleted)");
-
-  process_info.SetArchitecture(GetELFProcessCPUType(PathRef));
-
-  // Get the process environment.
-  auto BufferOrError = getProcFile(pid, "environ");
+static void GetProcessArgs(::pid_t pid, ProcessInstanceInfo &process_info) {
+  auto BufferOrError = getProcFile(pid, "cmdline");
   if (!BufferOrError)
-    return false;
-  std::unique_ptr<llvm::MemoryBuffer> Environ = std::move(*BufferOrError);
-
-  // Get the command line used to start the process.
-  BufferOrError = getProcFile(pid, "cmdline");
-  if (!BufferOrError)
-    return false;
+    return;
   std::unique_ptr<llvm::MemoryBuffer> Cmdline = std::move(*BufferOrError);
 
-  // Get User and Group IDs and get tracer pid.
-  if (!GetStatusInfo(pid, process_info, State, tracerpid))
-    return false;
-
-  process_info.SetProcessID(pid);
-  process_info.GetExecutableFile().SetFile(PathRef, FileSpec::Style::native);
-
-  llvm::StringRef Rest = Environ->getBuffer();
-  while (!Rest.empty()) {
-    llvm::StringRef Var;
-    std::tie(Var, Rest) = Rest.split('\0');
-    process_info.GetEnvironment().insert(Var);
-  }
-
-  llvm::StringRef Arg0;
+  llvm::StringRef Arg0, Rest;
   std::tie(Arg0, Rest) = Cmdline->getBuffer().split('\0');
   process_info.SetArg0(Arg0);
   while (!Rest.empty()) {
@@ -206,6 +158,65 @@
     std::tie(Arg, Rest) = Rest.split('\0');
     process_info.GetArguments().AppendArgument(Arg);
   }
+}
+
+static void GetExePathAndArch(::pid_t pid, ProcessInstanceInfo &process_info) {
+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
+  std::string ExePath(PATH_MAX, '\0');
+
+  // We can't use getProcFile here because proc/[pid]/exe is a symbolic link.
+  llvm::SmallString<64> ProcExe;
+  (llvm::Twine("/proc/") + llvm::Twine(pid) + "/exe").toVector(ProcExe);
+
+  ssize_t len = readlink(ProcExe.c_str(), &ExePath[0], PATH_MAX);
+  if (len > 0) {
+    ExePath.resize(len);
+  } else {
+    LLDB_LOG(log, "failed to read link exe link for {0}: {1}", pid,
+             Status(errno, eErrorTypePOSIX));
+    ExePath.resize(0);
+  }
+  // If the binary has been deleted, the link name has " (deleted)" appended.
+  // Remove if there.
+  llvm::StringRef PathRef = ExePath;
+  PathRef.consume_back(" (deleted)");
+
+  if (!PathRef.empty()) {
+    process_info.GetExecutableFile().SetFile(PathRef, FileSpec::Style::native);
+    process_info.SetArchitecture(GetELFProcessCPUType(PathRef));
+  }
+}
+
+static void GetProcessEnviron(::pid_t pid, ProcessInstanceInfo &process_info) {
+  // Get the process environment.
+  auto BufferOrError = getProcFile(pid, "environ");
+  if (!BufferOrError)
+    return;
+
+  std::unique_ptr<llvm::MemoryBuffer> Environ = std::move(*BufferOrError);
+  llvm::StringRef Rest = Environ->getBuffer();
+  while (!Rest.empty()) {
+    llvm::StringRef Var;
+    std::tie(Var, Rest) = Rest.split('\0');
+    process_info.GetEnvironment().insert(Var);
+  }
+}
+
+static bool GetProcessAndStatInfo(::pid_t pid,
+                                  ProcessInstanceInfo &process_info,
+                                  ProcessState &State, ::pid_t &tracerpid) {
+  tracerpid = 0;
+  process_info.Clear();
+
+  process_info.SetProcessID(pid);
+
+  GetExePathAndArch(pid, process_info);
+  GetProcessArgs(pid, process_info);
+  GetProcessEnviron(pid, process_info);
+
+  // Get User and Group IDs and get tracer pid.
+  if (!GetStatusInfo(pid, process_info, State, tracerpid))
+    return false;
 
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Host/linux/HostInfoLinux.cpp b/src/llvm-project/lldb/source/Host/linux/HostInfoLinux.cpp
index 78dd77b..a008a74 100644
--- a/src/llvm-project/lldb/source/Host/linux/HostInfoLinux.cpp
+++ b/src/llvm-project/lldb/source/Host/linux/HostInfoLinux.cpp
@@ -88,8 +88,7 @@
   llvm::call_once(g_once_flag, []() {
 
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST));
-    if (log)
-      log->Printf("attempting to determine Linux distribution...");
+    LLDB_LOGF(log, "attempting to determine Linux distribution...");
 
     // check if the lsb_release command exists at one of the following paths
     const char *const exe_paths[] = {"/bin/lsb_release",
@@ -100,9 +99,8 @@
       const char *const get_distribution_info_exe = exe_paths[exe_index];
       if (access(get_distribution_info_exe, F_OK)) {
         // this exe doesn't exist, move on to next exe
-        if (log)
-          log->Printf("executable doesn't exist: %s",
-                      get_distribution_info_exe);
+        LLDB_LOGF(log, "executable doesn't exist: %s",
+                  get_distribution_info_exe);
         continue;
       }
 
@@ -112,10 +110,10 @@
 
       FILE *file = popen(get_distribution_id_command.c_str(), "r");
       if (!file) {
-        if (log)
-          log->Printf("failed to run command: \"%s\", cannot retrieve "
-                      "platform information",
-                      get_distribution_id_command.c_str());
+        LLDB_LOGF(log,
+                  "failed to run command: \"%s\", cannot retrieve "
+                  "platform information",
+                  get_distribution_id_command.c_str());
         break;
       }
 
@@ -123,9 +121,8 @@
       char distribution_id[256] = {'\0'};
       if (fgets(distribution_id, sizeof(distribution_id) - 1, file) !=
           nullptr) {
-        if (log)
-          log->Printf("distribution id command returned \"%s\"",
-                      distribution_id);
+        LLDB_LOGF(log, "distribution id command returned \"%s\"",
+                  distribution_id);
 
         const char *const distributor_id_key = "Distributor ID:\t";
         if (strstr(distribution_id, distributor_id_key)) {
@@ -140,19 +137,17 @@
               [](char ch) { return tolower(isspace(ch) ? '_' : ch); });
 
           g_fields->m_distribution_id = id_string;
-          if (log)
-            log->Printf("distribution id set to \"%s\"",
-                        g_fields->m_distribution_id.c_str());
+          LLDB_LOGF(log, "distribution id set to \"%s\"",
+                    g_fields->m_distribution_id.c_str());
         } else {
-          if (log)
-            log->Printf("failed to find \"%s\" field in \"%s\"",
-                        distributor_id_key, distribution_id);
+          LLDB_LOGF(log, "failed to find \"%s\" field in \"%s\"",
+                    distributor_id_key, distribution_id);
         }
       } else {
-        if (log)
-          log->Printf("failed to retrieve distribution id, \"%s\" returned no"
-                      " lines",
-                      get_distribution_id_command.c_str());
+        LLDB_LOGF(log,
+                  "failed to retrieve distribution id, \"%s\" returned no"
+                  " lines",
+                  get_distribution_id_command.c_str());
       }
 
       // clean up the file
diff --git a/src/llvm-project/lldb/source/Host/macosx/objcxx/Host.mm b/src/llvm-project/lldb/source/Host/macosx/objcxx/Host.mm
index 12d7ba0..9febb8f 100644
--- a/src/llvm-project/lldb/source/Host/macosx/objcxx/Host.mm
+++ b/src/llvm-project/lldb/source/Host/macosx/objcxx/Host.mm
@@ -10,8 +10,8 @@
 
 #include <AvailabilityMacros.h>
 
-#if !defined(MAC_OS_X_VERSION_10_7) ||                                         \
-    MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
+// On device doesn't have supporty for XPC.
+#if defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__))
 #define NO_XPC_SERVICES 1
 #endif
 
@@ -59,7 +59,6 @@
 #include "lldb/Host/ProcessLaunchInfo.h"
 #include "lldb/Host/ThreadLauncher.h"
 #include "lldb/Utility/ArchSpec.h"
-#include "lldb/Utility/CleanUp.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Endian.h"
@@ -71,8 +70,9 @@
 #include "lldb/Utility/StructuredData.h"
 #include "lldb/lldb-defines.h"
 
-#include "llvm/Support/FileSystem.h"
+#include "llvm/ADT/ScopeExit.h"
 #include "llvm/Support/Errno.h"
+#include "llvm/Support/FileSystem.h"
 
 #include "../cfcpp/CFCBundle.h"
 #include "../cfcpp/CFCMutableArray.h"
@@ -363,10 +363,9 @@
   CFCReleaser<CFURLRef> file_URL(::CFURLCreateWithFileSystemPath(
       NULL, file_cfstr.get(), kCFURLPOSIXPathStyle, false));
 
-  if (log)
-    log->Printf(
-        "Sending source file: \"%s\" and line: %d to external editor.\n",
-        file_path, line_no);
+  LLDB_LOGF(log,
+            "Sending source file: \"%s\" and line: %d to external editor.\n",
+            file_path, line_no);
 
   long error;
   BabelAESelInfo file_and_line_info = {
@@ -385,8 +384,7 @@
                          &(file_and_line_desc.descContent));
 
   if (error != noErr) {
-    if (log)
-      log->Printf("Error creating AEDesc: %ld.\n", error);
+    LLDB_LOGF(log, "Error creating AEDesc: %ld.\n", error);
     return false;
   }
 
@@ -403,8 +401,7 @@
   char *external_editor = ::getenv("LLDB_EXTERNAL_EDITOR");
 
   if (external_editor) {
-    if (log)
-      log->Printf("Looking for external editor \"%s\".\n", external_editor);
+    LLDB_LOGF(log, "Looking for external editor \"%s\".\n", external_editor);
 
     if (g_app_name.empty() ||
         strcmp(g_app_name.c_str(), external_editor) != 0) {
@@ -415,10 +412,9 @@
       // If we found the app, then store away the name so we don't have to
       // re-look it up.
       if (error != noErr) {
-        if (log)
-          log->Printf(
-              "Could not find External Editor application, error: %ld.\n",
-              error);
+        LLDB_LOGF(log,
+                  "Could not find External Editor application, error: %ld.\n",
+                  error);
         return false;
       }
     }
@@ -434,8 +430,7 @@
   AEDisposeDesc(&(file_and_line_desc.descContent));
 
   if (error != noErr) {
-    if (log)
-      log->Printf("LSOpenURLsWithRole failed, error: %ld.\n", error);
+    LLDB_LOGF(log, "LSOpenURLsWithRole failed, error: %ld.\n", error);
 
     return false;
   }
@@ -476,6 +471,12 @@
         break;
 #endif
 
+#if defined(CPU_TYPE_ARM64_32) && defined(CPU_SUBTYPE_ARM64_32_ALL)
+      case CPU_TYPE_ARM64_32:
+        sub = CPU_SUBTYPE_ARM64_32_ALL;
+        break;
+#endif
+
       case CPU_TYPE_ARM: {
         // Note that we fetched the cpu type from the PROCESS but we can't get a
         // cpusubtype of the
@@ -682,14 +683,16 @@
       process_info.SetEffectiveGroupID(UINT32_MAX);
 
     // Make sure our info matches before we go fetch the name and cpu type
-    if (match_info.Matches(process_info)) {
-      // Get CPU type first so we can know to look for iOS simulator is we have
-      // x86 or x86_64
-      if (GetMacOSXProcessCPUType(process_info)) {
-        if (GetMacOSXProcessArgs(&match_info, process_info)) {
-          if (match_info.Matches(process_info))
-            process_infos.Append(process_info);
-        }
+    if (!match_info.UserIDsMatch(process_info) ||
+        !match_info.ProcessIDsMatch(process_info))
+      continue;
+
+    // Get CPU type first so we can know to look for iOS simulator is we have
+    // x86 or x86_64
+    if (GetMacOSXProcessCPUType(process_info)) {
+      if (GetMacOSXProcessArgs(&match_info, process_info)) {
+        if (match_info.Matches(process_info))
+          process_infos.Append(process_info);
       }
     }
   }
@@ -1010,7 +1013,7 @@
     return false;
 
   posix_spawn_file_actions_t *file_actions =
-      reinterpret_cast<posix_spawn_file_actions_t *>(_file_actions);
+      static_cast<posix_spawn_file_actions_t *>(_file_actions);
 
   switch (info->GetAction()) {
   case FileAction::eFileActionNone:
@@ -1097,7 +1100,8 @@
   }
 
   // Make sure we clean up the posix spawn attributes before exiting this scope.
-  CleanUp cleanup_attr(posix_spawnattr_destroy, &attr);
+  auto cleanup_attr =
+      llvm::make_scope_exit([&]() { posix_spawnattr_destroy(&attr); });
 
   sigset_t no_signals;
   sigset_t all_signals;
@@ -1126,7 +1130,7 @@
   // --arch <ARCH> as part of the shell invocation
   // to do that job on OSX.
 
-  if (launch_info.GetShell() == nullptr) {
+  if (launch_info.GetShell() == FileSpec()) {
     // We don't need to do this for ARM, and we really shouldn't now that we
     // have multiple CPU subtypes and no posix_spawnattr call that allows us
     // to set which CPU subtype to launch...
@@ -1200,7 +1204,8 @@
     }
 
     // Make sure we clean up the posix file actions before exiting this scope.
-    CleanUp cleanup_fileact(posix_spawn_file_actions_destroy, &file_actions);
+    auto cleanup_fileact = llvm::make_scope_exit(
+        [&]() { posix_spawn_file_actions_destroy(&file_actions); });
 
     for (size_t i = 0; i < num_file_actions; ++i) {
       const FileAction *launch_file_action =
@@ -1369,9 +1374,12 @@
     }
     bool run_in_default_shell = true;
     bool hide_stderr = true;
-    RunShellCommand(expand_command, cwd, &status, nullptr, &output,
-                    std::chrono::seconds(10), run_in_default_shell,
-                    hide_stderr);
+    Status e = RunShellCommand(expand_command, cwd, &status, nullptr, &output,
+                               std::chrono::seconds(10), run_in_default_shell,
+                               hide_stderr);
+
+    if (e.Fail())
+      return e;
 
     if (status != 0) {
       error.SetErrorStringWithFormat("lldb-argdumper exited with error %d",
@@ -1434,12 +1442,12 @@
       DISPATCH_SOURCE_TYPE_PROC, pid, mask,
       ::dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0));
 
-  if (log)
-    log->Printf("Host::StartMonitoringChildProcess "
-                "(callback, pid=%i, monitor_signals=%i) "
-                "source = %p\n",
-                static_cast<int>(pid), monitor_signals,
-                reinterpret_cast<void *>(source));
+  LLDB_LOGF(log,
+            "Host::StartMonitoringChildProcess "
+            "(callback, pid=%i, monitor_signals=%i) "
+            "source = %p\n",
+            static_cast<int>(pid), monitor_signals,
+            static_cast<void *>(source));
 
   if (source) {
     Host::MonitorChildProcessCallback callback_copy = callback;
@@ -1473,10 +1481,10 @@
           status_cstr = "???";
         }
 
-        if (log)
-          log->Printf("::waitpid (pid = %llu, &status, 0) => pid = %i, status "
-                      "= 0x%8.8x (%s), signal = %i, exit_status = %i",
-                      pid, wait_pid, status, status_cstr, signal, exit_status);
+        LLDB_LOGF(log,
+                  "::waitpid (pid = %llu, &status, 0) => pid = %i, status "
+                  "= 0x%8.8x (%s), signal = %i, exit_status = %i",
+                  pid, wait_pid, status, status_cstr, signal, exit_status);
 
         if (callback_copy)
           cancel = callback_copy(pid, exited, signal, exit_status);
diff --git a/src/llvm-project/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/src/llvm-project/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index f13cd9d..e73d2ff 100644
--- a/src/llvm-project/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/src/llvm-project/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -42,6 +42,11 @@
 #define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64)
 #endif
 
+#ifndef CPU_TYPE_ARM64_32
+#define CPU_ARCH_ABI64_32 0x02000000
+#define CPU_TYPE_ARM64_32 (CPU_TYPE_ARM | CPU_ARCH_ABI64_32)
+#endif
+
 #include <TargetConditionals.h> // for TARGET_OS_TV, TARGET_OS_WATCH
 
 using namespace lldb_private;
@@ -71,23 +76,32 @@
   return false;
 }
 
+static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
+  @autoreleasepool {
+    NSDictionary *version_info =
+      [NSDictionary dictionaryWithContentsOfFile:
+       @"/System/Library/CoreServices/SystemVersion.plist"];
+    NSString *version_value = [version_info objectForKey: Key];
+    const char *version_str = [version_value UTF8String];
+    version.tryParse(version_str);
+  }
+}
+
 llvm::VersionTuple HostInfoMacOSX::GetOSVersion() {
   static llvm::VersionTuple g_version;
-
-  if (g_version.empty()) {
-    @autoreleasepool {
-      NSDictionary *version_info = [NSDictionary
-          dictionaryWithContentsOfFile:
-              @"/System/Library/CoreServices/SystemVersion.plist"];
-      NSString *version_value = [version_info objectForKey:@"ProductVersion"];
-      const char *version_str = [version_value UTF8String];
-      g_version.tryParse(version_str);
-    }
-  }
-
+  if (g_version.empty())
+    ParseOSVersion(g_version, @"ProductVersion");
   return g_version;
 }
 
+llvm::VersionTuple HostInfoMacOSX::GetMacCatalystVersion() {
+  static llvm::VersionTuple g_version;
+  if (g_version.empty())
+    ParseOSVersion(g_version, @"iOSSupportVersion");
+  return g_version;
+}
+
+
 FileSpec HostInfoMacOSX::GetProgramFileSpec() {
   static FileSpec g_program_filespec;
   if (!g_program_filespec) {
@@ -142,9 +156,8 @@
     FileSystem::Instance().Resolve(support_dir_spec);
     if (!FileSystem::Instance().IsDirectory(support_dir_spec)) {
       Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
-      if (log)
-        log->Printf("HostInfoMacOSX::%s(): failed to find support directory",
-                    __FUNCTION__);
+      LLDB_LOGF(log, "HostInfoMacOSX::%s(): failed to find support directory",
+                __FUNCTION__);
       return false;
     }
 
@@ -249,7 +262,9 @@
       arch_32.SetArchitecture(eArchTypeMachO, cputype & ~(CPU_ARCH_MASK),
                               cpusubtype32);
 
-      if (cputype == CPU_TYPE_ARM || cputype == CPU_TYPE_ARM64) {
+      if (cputype == CPU_TYPE_ARM || 
+          cputype == CPU_TYPE_ARM64 || 
+          cputype == CPU_TYPE_ARM64_32) {
 // When running on a watch or tv, report the host os correctly
 #if defined(TARGET_OS_TV) && TARGET_OS_TV == 1
         arch_32.GetTriple().setOS(llvm::Triple::TvOS);
@@ -257,6 +272,9 @@
 #elif defined(TARGET_OS_BRIDGE) && TARGET_OS_BRIDGE == 1
         arch_32.GetTriple().setOS(llvm::Triple::BridgeOS);
         arch_64.GetTriple().setOS(llvm::Triple::BridgeOS);
+#elif defined(TARGET_OS_WATCHOS) && TARGET_OS_WATCHOS == 1
+        arch_32.GetTriple().setOS(llvm::Triple::WatchOS);
+        arch_64.GetTriple().setOS(llvm::Triple::WatchOS);
 #else
         arch_32.GetTriple().setOS(llvm::Triple::IOS);
         arch_64.GetTriple().setOS(llvm::Triple::IOS);
diff --git a/src/llvm-project/lldb/source/Host/netbsd/Host.cpp b/src/llvm-project/lldb/source/Host/netbsd/Host.cpp
index 08fec09..20f3db3 100644
--- a/src/llvm-project/lldb/source/Host/netbsd/Host.cpp
+++ b/src/llvm-project/lldb/source/Host/netbsd/Host.cpp
@@ -78,6 +78,7 @@
                     match_info_ptr->GetProcessInfo().GetName())))
     return false;
 
+  process_info.SetArg0(cstr);
   Args &proc_args = process_info.GetArguments();
   while (1) {
     const uint8_t *p = data.PeekData(offset, 1);
diff --git a/src/llvm-project/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp b/src/llvm-project/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
index 067e859..2223e16 100644
--- a/src/llvm-project/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
+++ b/src/llvm-project/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp
@@ -26,7 +26,7 @@
 #include <string.h>
 #include <sys/types.h>
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include <termios.h>
 #include <unistd.h>
 #endif
@@ -79,23 +79,22 @@
       m_child_processes_inherit(child_processes_inherit) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION |
                                                   LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p ConnectionFileDescriptor::ConnectionFileDescriptor ()",
-                static_cast<void *>(this));
+  LLDB_LOGF(log, "%p ConnectionFileDescriptor::ConnectionFileDescriptor ()",
+            static_cast<void *>(this));
 }
 
 ConnectionFileDescriptor::ConnectionFileDescriptor(int fd, bool owns_fd)
     : Connection(), m_pipe(), m_mutex(), m_shutting_down(false),
       m_waiting_for_accept(false), m_child_processes_inherit(false) {
-  m_write_sp = std::make_shared<File>(fd, owns_fd);
-  m_read_sp = std::make_shared<File>(fd, false);
+  m_write_sp = std::make_shared<NativeFile>(fd, File::eOpenOptionWrite, owns_fd);
+  m_read_sp = std::make_shared<NativeFile>(fd, File::eOpenOptionRead, false);
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION |
                                                   LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p ConnectionFileDescriptor::ConnectionFileDescriptor (fd = "
-                "%i, owns_fd = %i)",
-                static_cast<void *>(this), fd, owns_fd);
+  LLDB_LOGF(log,
+            "%p ConnectionFileDescriptor::ConnectionFileDescriptor (fd = "
+            "%i, owns_fd = %i)",
+            static_cast<void *>(this), fd, owns_fd);
   OpenCommandPipe();
 }
 
@@ -108,9 +107,8 @@
 ConnectionFileDescriptor::~ConnectionFileDescriptor() {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION |
                                                   LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p ConnectionFileDescriptor::~ConnectionFileDescriptor ()",
-                static_cast<void *>(this));
+  LLDB_LOGF(log, "%p ConnectionFileDescriptor::~ConnectionFileDescriptor ()",
+            static_cast<void *>(this));
   Disconnect(nullptr);
   CloseCommandPipe();
 }
@@ -122,24 +120,23 @@
   // Make the command file descriptor here:
   Status result = m_pipe.CreateNew(m_child_processes_inherit);
   if (!result.Success()) {
-    if (log)
-      log->Printf("%p ConnectionFileDescriptor::OpenCommandPipe () - could not "
-                  "make pipe: %s",
-                  static_cast<void *>(this), result.AsCString());
+    LLDB_LOGF(log,
+              "%p ConnectionFileDescriptor::OpenCommandPipe () - could not "
+              "make pipe: %s",
+              static_cast<void *>(this), result.AsCString());
   } else {
-    if (log)
-      log->Printf("%p ConnectionFileDescriptor::OpenCommandPipe() - success "
-                  "readfd=%d writefd=%d",
-                  static_cast<void *>(this), m_pipe.GetReadFileDescriptor(),
-                  m_pipe.GetWriteFileDescriptor());
+    LLDB_LOGF(log,
+              "%p ConnectionFileDescriptor::OpenCommandPipe() - success "
+              "readfd=%d writefd=%d",
+              static_cast<void *>(this), m_pipe.GetReadFileDescriptor(),
+              m_pipe.GetWriteFileDescriptor());
   }
 }
 
 void ConnectionFileDescriptor::CloseCommandPipe() {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("%p ConnectionFileDescriptor::CloseCommandPipe()",
-                static_cast<void *>(this));
+  LLDB_LOGF(log, "%p ConnectionFileDescriptor::CloseCommandPipe()",
+            static_cast<void *>(this));
 
   m_pipe.Close();
 }
@@ -153,9 +150,8 @@
                                                    Status *error_ptr) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("%p ConnectionFileDescriptor::Connect (url = '%s')",
-                static_cast<void *>(this), path.str().c_str());
+  LLDB_LOGF(log, "%p ConnectionFileDescriptor::Connect (url = '%s')",
+            static_cast<void *>(this), path.str().c_str());
 
   OpenCommandPipe();
 
@@ -183,7 +179,7 @@
       // unix-abstract-connect://SOCKNAME
       return UnixAbstractSocketConnect(*addr, error_ptr);
     }
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
     else if ((addr = GetURLAddress(path, FD_SCHEME))) {
       // Just passing a native file descriptor within this current process that
       // is already opened (possibly from a service or other source).
@@ -222,8 +218,10 @@
             m_read_sp = std::move(tcp_socket);
             m_write_sp = m_read_sp;
           } else {
-            m_read_sp = std::make_shared<File>(fd, false);
-            m_write_sp = std::make_shared<File>(fd, false);
+            m_read_sp =
+                std::make_shared<NativeFile>(fd, File::eOpenOptionRead, false);
+            m_write_sp =
+                std::make_shared<NativeFile>(fd, File::eOpenOptionWrite, false);
           }
           m_uri = *addr;
           return eConnectionStatusSuccess;
@@ -272,8 +270,8 @@
           ::fcntl(fd, F_SETFL, flags);
         }
       }
-      m_read_sp = std::make_shared<File>(fd, true);
-      m_write_sp = std::make_shared<File>(fd, false);
+      m_read_sp = std::make_shared<NativeFile>(fd, File::eOpenOptionRead, true);
+      m_write_sp = std::make_shared<NativeFile>(fd, File::eOpenOptionWrite, false);
       return eConnectionStatusSuccess;
     }
 #endif
@@ -295,17 +293,15 @@
 
 ConnectionStatus ConnectionFileDescriptor::Disconnect(Status *error_ptr) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("%p ConnectionFileDescriptor::Disconnect ()",
-                static_cast<void *>(this));
+  LLDB_LOGF(log, "%p ConnectionFileDescriptor::Disconnect ()",
+            static_cast<void *>(this));
 
   ConnectionStatus status = eConnectionStatusSuccess;
 
   if (!IsConnected()) {
-    if (log)
-      log->Printf(
-          "%p ConnectionFileDescriptor::Disconnect(): Nothing to disconnect",
-          static_cast<void *>(this));
+    LLDB_LOGF(
+        log, "%p ConnectionFileDescriptor::Disconnect(): Nothing to disconnect",
+        static_cast<void *>(this));
     return eConnectionStatusSuccess;
   }
 
@@ -318,27 +314,28 @@
   // descriptor.  If that's the case, then send the "q" char to the command
   // file channel so the read will wake up and the connection will then know to
   // shut down.
-
-  m_shutting_down = true;
-
   std::unique_lock<std::recursive_mutex> locker(m_mutex, std::defer_lock);
   if (!locker.try_lock()) {
     if (m_pipe.CanWrite()) {
       size_t bytes_written = 0;
       Status result = m_pipe.Write("q", 1, bytes_written);
-      if (log)
-        log->Printf("%p ConnectionFileDescriptor::Disconnect(): Couldn't get "
-                    "the lock, sent 'q' to %d, error = '%s'.",
-                    static_cast<void *>(this), m_pipe.GetWriteFileDescriptor(),
-                    result.AsCString());
+      LLDB_LOGF(log,
+                "%p ConnectionFileDescriptor::Disconnect(): Couldn't get "
+                "the lock, sent 'q' to %d, error = '%s'.",
+                static_cast<void *>(this), m_pipe.GetWriteFileDescriptor(),
+                result.AsCString());
     } else if (log) {
-      log->Printf("%p ConnectionFileDescriptor::Disconnect(): Couldn't get the "
-                  "lock, but no command pipe is available.",
-                  static_cast<void *>(this));
+      LLDB_LOGF(log,
+                "%p ConnectionFileDescriptor::Disconnect(): Couldn't get the "
+                "lock, but no command pipe is available.",
+                static_cast<void *>(this));
     }
     locker.lock();
   }
 
+  // Prevents reads and writes during shutdown.
+  m_shutting_down = true;
+
   Status error = m_read_sp->Close();
   Status error2 = m_write_sp->Close();
   if (error.Fail() || error2.Fail())
@@ -362,10 +359,10 @@
 
   std::unique_lock<std::recursive_mutex> locker(m_mutex, std::defer_lock);
   if (!locker.try_lock()) {
-    if (log)
-      log->Printf("%p ConnectionFileDescriptor::Read () failed to get the "
-                  "connection lock.",
-                  static_cast<void *>(this));
+    LLDB_LOGF(log,
+              "%p ConnectionFileDescriptor::Read () failed to get the "
+              "connection lock.",
+              static_cast<void *>(this));
     if (error_ptr)
       error_ptr->SetErrorString("failed to get the connection lock for read.");
 
@@ -374,6 +371,8 @@
   }
 
   if (m_shutting_down) {
+    if (error_ptr)
+      error_ptr->SetErrorString("shutting down");
     status = eConnectionStatusError;
     return 0;
   }
@@ -387,12 +386,13 @@
   error = m_read_sp->Read(dst, bytes_read);
 
   if (log) {
-    log->Printf("%p ConnectionFileDescriptor::Read()  fd = %" PRIu64
-                ", dst = %p, dst_len = %" PRIu64 ") => %" PRIu64 ", error = %s",
-                static_cast<void *>(this),
-                static_cast<uint64_t>(m_read_sp->GetWaitableHandle()),
-                static_cast<void *>(dst), static_cast<uint64_t>(dst_len),
-                static_cast<uint64_t>(bytes_read), error.AsCString());
+    LLDB_LOGF(log,
+              "%p ConnectionFileDescriptor::Read()  fd = %" PRIu64
+              ", dst = %p, dst_len = %" PRIu64 ") => %" PRIu64 ", error = %s",
+              static_cast<void *>(this),
+              static_cast<uint64_t>(m_read_sp->GetWaitableHandle()),
+              static_cast<void *>(dst), static_cast<uint64_t>(dst_len),
+              static_cast<uint64_t>(bytes_read), error.AsCString());
   }
 
   if (bytes_read == 0) {
@@ -464,11 +464,11 @@
                                        ConnectionStatus &status,
                                        Status *error_ptr) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf(
-        "%p ConnectionFileDescriptor::Write (src = %p, src_len = %" PRIu64 ")",
-        static_cast<void *>(this), static_cast<const void *>(src),
-        static_cast<uint64_t>(src_len));
+  LLDB_LOGF(log,
+            "%p ConnectionFileDescriptor::Write (src = %p, src_len = %" PRIu64
+            ")",
+            static_cast<void *>(this), static_cast<const void *>(src),
+            static_cast<uint64_t>(src_len));
 
   if (!IsConnected()) {
     if (error_ptr)
@@ -477,19 +477,26 @@
     return 0;
   }
 
+  if (m_shutting_down) {
+    if (error_ptr)
+      error_ptr->SetErrorString("shutting down");
+    status = eConnectionStatusError;
+    return 0;
+  }
+
   Status error;
 
   size_t bytes_sent = src_len;
   error = m_write_sp->Write(src, bytes_sent);
 
   if (log) {
-    log->Printf("%p ConnectionFileDescriptor::Write(fd = %" PRIu64
-                ", src = %p, src_len = %" PRIu64 ") => %" PRIu64
-                " (error = %s)",
-                static_cast<void *>(this),
-                static_cast<uint64_t>(m_write_sp->GetWaitableHandle()),
-                static_cast<const void *>(src), static_cast<uint64_t>(src_len),
-                static_cast<uint64_t>(bytes_sent), error.AsCString());
+    LLDB_LOGF(log,
+              "%p ConnectionFileDescriptor::Write(fd = %" PRIu64
+              ", src = %p, src_len = %" PRIu64 ") => %" PRIu64 " (error = %s)",
+              static_cast<void *>(this),
+              static_cast<uint64_t>(m_write_sp->GetWaitableHandle()),
+              static_cast<const void *>(src), static_cast<uint64_t>(src_len),
+              static_cast<uint64_t>(bytes_sent), error.AsCString());
   }
 
   if (error_ptr)
@@ -559,7 +566,7 @@
       select_helper.SetTimeout(*timeout);
 
     select_helper.FDSetRead(handle);
-#if defined(_MSC_VER)
+#if defined(_WIN32)
     // select() won't accept pipes on Windows.  The entire Windows codepath
     // needs to be converted over to using WaitForMultipleObjects and event
     // HANDLEs, but for now at least this will allow ::select() to not return
@@ -613,10 +620,10 @@
           (void)bytes_read;
           switch (c) {
           case 'q':
-            if (log)
-              log->Printf("%p ConnectionFileDescriptor::BytesAvailable() "
-                          "got data: %c from the command channel.",
-                          static_cast<void *>(this), c);
+            LLDB_LOGF(log,
+                      "%p ConnectionFileDescriptor::BytesAvailable() "
+                      "got data: %c from the command channel.",
+                      static_cast<void *>(this), c);
             return eConnectionStatusEndOfFile;
           case 'i':
             // Interrupt the current read
diff --git a/src/llvm-project/lldb/source/Host/posix/FileSystem.cpp b/src/llvm-project/lldb/source/Host/posix/FileSystemPosix.cpp
similarity index 100%
rename from src/llvm-project/lldb/source/Host/posix/FileSystem.cpp
rename to src/llvm-project/lldb/source/Host/posix/FileSystemPosix.cpp
diff --git a/src/llvm-project/lldb/source/Host/posix/HostInfoPosix.cpp b/src/llvm-project/lldb/source/Host/posix/HostInfoPosix.cpp
index f300e22..63cc5dc 100644
--- a/src/llvm-project/lldb/source/Host/posix/HostInfoPosix.cpp
+++ b/src/llvm-project/lldb/source/Host/posix/HostInfoPosix.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Host/posix/HostInfoPosix.h"
-#include "lldb/Utility/UserIDResolver.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/UserIDResolver.h"
 
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/Twine.h"
@@ -18,7 +18,6 @@
 #include <grp.h>
 #include <limits.h>
 #include <mutex>
-#include <netdb.h>
 #include <pwd.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -32,11 +31,7 @@
   char hostname[PATH_MAX];
   hostname[sizeof(hostname) - 1] = '\0';
   if (::gethostname(hostname, sizeof(hostname) - 1) == 0) {
-    struct hostent *h = ::gethostbyname(hostname);
-    if (h)
-      s.assign(h->h_name);
-    else
-      s.assign(hostname);
+    s.assign(hostname);
     return true;
   }
   return false;
@@ -57,15 +52,19 @@
 };
 } // namespace
 
-llvm::Optional<std::string> PosixUserIDResolver::DoGetUserName(id_t uid) {
+struct PasswdEntry {
+  std::string username;
+  std::string shell;
+};
+
+static llvm::Optional<PasswdEntry> GetPassword(id_t uid) {
 #ifdef USE_GETPWUID
   // getpwuid_r is missing from android-9
-  // UserIDResolver provides some thread safety by making sure noone calls this
-  // function concurrently, but using getpwuid is ultimately not thread-safe as
-  // we don't know who else might be calling it.
-  struct passwd *user_info_ptr = ::getpwuid(uid);
-  if (user_info_ptr)
-    return std::string(user_info_ptr->pw_name);
+  // The caller should provide some thread safety by making sure no one calls
+  // this function concurrently, because using getpwuid is ultimately not
+  // thread-safe as we don't know who else might be calling it.
+  if (auto *user_info_ptr = ::getpwuid(uid))
+    return PasswdEntry{user_info_ptr->pw_name, user_info_ptr->pw_shell};
 #else
   struct passwd user_info;
   struct passwd *user_info_ptr = &user_info;
@@ -74,12 +73,18 @@
   if (::getpwuid_r(uid, &user_info, user_buffer, user_buffer_size,
                    &user_info_ptr) == 0 &&
       user_info_ptr) {
-    return std::string(user_info_ptr->pw_name);
+    return PasswdEntry{user_info_ptr->pw_name, user_info_ptr->pw_shell};
   }
 #endif
   return llvm::None;
 }
 
+llvm::Optional<std::string> PosixUserIDResolver::DoGetUserName(id_t uid) {
+  if (llvm::Optional<PasswdEntry> password = GetPassword(uid))
+    return password->username;
+  return llvm::None;
+}
+
 llvm::Optional<std::string> PosixUserIDResolver::DoGetGroupName(id_t gid) {
 #ifndef __ANDROID__
   char group_buffer[PATH_MAX];
@@ -98,8 +103,6 @@
     if (group_info_ptr)
       return std::string(group_info_ptr->gr_name);
   }
-#else
-  assert(false && "getgrgid_r() not supported on Android");
 #endif
   return llvm::None;
 }
@@ -118,7 +121,13 @@
 
 uint32_t HostInfoPosix::GetEffectiveGroupID() { return getegid(); }
 
-FileSpec HostInfoPosix::GetDefaultShell() { return FileSpec("/bin/sh"); }
+FileSpec HostInfoPosix::GetDefaultShell() {
+  if (const char *v = ::getenv("SHELL"))
+    return FileSpec(v);
+  if (llvm::Optional<PasswdEntry> password = GetPassword(::geteuid()))
+    return FileSpec(password->shell);
+  return FileSpec("/bin/sh");
+}
 
 bool HostInfoPosix::ComputeSupportExeDirectory(FileSpec &file_spec) {
   return ComputePathRelativeToLibrary(file_spec, "/bin");
diff --git a/src/llvm-project/lldb/source/Host/posix/PipePosix.cpp b/src/llvm-project/lldb/source/Host/posix/PipePosix.cpp
index efdc151..ce1baf3 100644
--- a/src/llvm-project/lldb/source/Host/posix/PipePosix.cpp
+++ b/src/llvm-project/lldb/source/Host/posix/PipePosix.cpp
@@ -270,8 +270,8 @@
   while (error.Success()) {
     error = select_helper.Select();
     if (error.Success()) {
-      auto result = ::read(fd, reinterpret_cast<char *>(buf) + bytes_read,
-                           size - bytes_read);
+      auto result =
+          ::read(fd, static_cast<char *>(buf) + bytes_read, size - bytes_read);
       if (result != -1) {
         bytes_read += result;
         if (bytes_read == size || result == 0)
@@ -301,9 +301,8 @@
   while (error.Success()) {
     error = select_helper.Select();
     if (error.Success()) {
-      auto result =
-          ::write(fd, reinterpret_cast<const char *>(buf) + bytes_written,
-                  size - bytes_written);
+      auto result = ::write(fd, static_cast<const char *>(buf) + bytes_written,
+                            size - bytes_written);
       if (result != -1) {
         bytes_written += result;
         if (bytes_written == size)
diff --git a/src/llvm-project/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp b/src/llvm-project/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
index 66cb59d..174ed73 100644
--- a/src/llvm-project/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
+++ b/src/llvm-project/lldb/source/Host/windows/ConnectionGenericFileWindows.cpp
@@ -91,9 +91,8 @@
 lldb::ConnectionStatus ConnectionGenericFile::Connect(llvm::StringRef path,
                                                       Status *error_ptr) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("%p ConnectionGenericFile::Connect (url = '%s')",
-                static_cast<void *>(this), path.str().c_str());
+  LLDB_LOGF(log, "%p ConnectionGenericFile::Connect (url = '%s')",
+            static_cast<void *>(this), path.str().c_str());
 
   if (!path.consume_front("file://")) {
     if (error_ptr)
@@ -134,9 +133,8 @@
 
 lldb::ConnectionStatus ConnectionGenericFile::Disconnect(Status *error_ptr) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log)
-    log->Printf("%p ConnectionGenericFile::Disconnect ()",
-                static_cast<void *>(this));
+  LLDB_LOGF(log, "%p ConnectionGenericFile::Disconnect ()",
+            static_cast<void *>(this));
 
   if (!IsConnected())
     return eConnectionStatusSuccess;
@@ -247,12 +245,11 @@
 
   IncrementFilePointer(return_info.GetBytes());
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log) {
-    log->Printf("%p ConnectionGenericFile::Read()  handle = %p, dst = %p, "
-                "dst_len = %zu) => %zu, error = %s",
-                this, m_file, dst, dst_len, return_info.GetBytes(),
-                return_info.GetError().AsCString());
-  }
+  LLDB_LOGF(log,
+            "%p ConnectionGenericFile::Read()  handle = %p, dst = %p, "
+            "dst_len = %zu) => %zu, error = %s",
+            static_cast<void *>(this), m_file, dst, dst_len,
+            return_info.GetBytes(), return_info.GetError().AsCString());
 
   return return_info.GetBytes();
 }
@@ -297,12 +294,11 @@
 
   IncrementFilePointer(return_info.GetBytes());
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_CONNECTION));
-  if (log) {
-    log->Printf("%p ConnectionGenericFile::Write()  handle = %p, src = %p, "
-                "src_len = %zu) => %zu, error = %s",
-                this, m_file, src, src_len, return_info.GetBytes(),
-                return_info.GetError().AsCString());
-  }
+  LLDB_LOGF(log,
+            "%p ConnectionGenericFile::Write()  handle = %p, src = %p, "
+            "src_len = %zu) => %zu, error = %s",
+            static_cast<void *>(this), m_file, src, src_len,
+            return_info.GetBytes(), return_info.GetError().AsCString());
   return return_info.GetBytes();
 }
 
diff --git a/src/llvm-project/lldb/source/Host/windows/FileSystem.cpp b/src/llvm-project/lldb/source/Host/windows/FileSystem.cpp
index 04dba44..310bf8f 100644
--- a/src/llvm-project/lldb/source/Host/windows/FileSystem.cpp
+++ b/src/llvm-project/lldb/source/Host/windows/FileSystem.cpp
@@ -8,6 +8,7 @@
 
 #include "lldb/Host/windows/windows.h"
 
+#include <share.h>
 #include <shellapi.h>
 #include <sys/stat.h>
 #include <sys/types.h>
diff --git a/src/llvm-project/lldb/source/Host/windows/Host.cpp b/src/llvm-project/lldb/source/Host/windows/Host.cpp
index 413b172..1282bbe 100644
--- a/src/llvm-project/lldb/source/Host/windows/Host.cpp
+++ b/src/llvm-project/lldb/source/Host/windows/Host.cpp
@@ -34,9 +34,11 @@
 bool GetTripleForProcess(const FileSpec &executable, llvm::Triple &triple) {
   // Open the PE File as a binary file, and parse just enough information to
   // determine the machine type.
-  File imageBinary;
-  FileSystem::Instance().Open(imageBinary, executable, File::eOpenOptionRead,
-                              lldb::eFilePermissionsUserRead);
+  auto imageBinaryP = FileSystem::Instance().Open(
+      executable, File::eOpenOptionRead, lldb::eFilePermissionsUserRead);
+  if (!imageBinaryP)
+    return llvm::errorToBool(imageBinaryP.takeError());
+  File &imageBinary = *imageBinaryP.get();
   imageBinary.SeekFromStart(0x3c);
   int32_t peOffset = 0;
   uint32_t peHead = 0;
@@ -56,6 +58,10 @@
     triple.setArch(llvm::Triple::x86_64);
   else if (machineType == 0x14c)
     triple.setArch(llvm::Triple::x86);
+  else if (machineType == 0x1c4)
+    triple.setArch(llvm::Triple::arm);
+  else if (machineType == 0xaa64)
+    triple.setArch(llvm::Triple::aarch64);
 
   return true;
 }
@@ -169,7 +175,23 @@
   GetProcessExecutableAndTriple(handle, process_info);
 
   // Need to read the PEB to get parent process and command line arguments.
-  return true;
+
+  AutoHandle snapshot(CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0));
+  if (!snapshot.IsValid())
+    return false;
+
+  PROCESSENTRY32W pe;
+  pe.dwSize = sizeof(PROCESSENTRY32W);
+  if (Process32FirstW(snapshot.get(), &pe)) {
+    do {
+      if (pe.th32ProcessID == pid) {
+        process_info.SetParentProcessID(pe.th32ParentProcessID);
+        return true;
+      }
+    } while (Process32NextW(snapshot.get(), &pe));
+  }
+
+  return false;
 }
 
 llvm::Expected<HostThread> Host::StartMonitoringChildProcess(
@@ -204,8 +226,12 @@
     int status;
     std::string output;
     std::string command = expand_command.GetString();
-    RunShellCommand(command.c_str(), launch_info.GetWorkingDirectory(), &status,
-                    nullptr, &output, std::chrono::seconds(10));
+    Status e =
+        RunShellCommand(command.c_str(), launch_info.GetWorkingDirectory(),
+                        &status, nullptr, &output, std::chrono::seconds(10));
+
+    if (e.Fail())
+      return e;
 
     if (status != 0) {
       error.SetErrorStringWithFormat("lldb-argdumper exited with error %d",
diff --git a/src/llvm-project/lldb/source/Host/windows/ProcessLauncherWindows.cpp b/src/llvm-project/lldb/source/Host/windows/ProcessLauncherWindows.cpp
index 3f5c637..b743082 100644
--- a/src/llvm-project/lldb/source/Host/windows/ProcessLauncherWindows.cpp
+++ b/src/llvm-project/lldb/source/Host/windows/ProcessLauncherWindows.cpp
@@ -46,7 +46,7 @@
 
   std::vector<llvm::StringRef> args_ref;
   for (auto &entry : args.entries())
-    args_ref.push_back(entry.ref);
+    args_ref.push_back(entry.ref());
 
   command = llvm::sys::flattenWindowsCommandLine(args_ref);
   return true;
diff --git a/src/llvm-project/lldb/source/Host/windows/Windows.cpp b/src/llvm-project/lldb/source/Host/windows/Windows.cpp
index c52f5c1..fa664f5 100644
--- a/src/llvm-project/lldb/source/Host/windows/Windows.cpp
+++ b/src/llvm-project/lldb/source/Host/windows/Windows.cpp
@@ -48,13 +48,8 @@
   size_t buflen;
   va_list ap2;
 
-#if defined(_MSC_VER) || defined(__MINGW64)
-  ap2 = ap;
-  len = _vscprintf(fmt, ap2);
-#else
   va_copy(ap2, ap);
   len = vsnprintf(NULL, 0, fmt, ap2);
-#endif
 
   if (len >= 0 &&
       (buf = (char *)malloc((buflen = (size_t)(len + 1)))) != NULL) {
@@ -199,11 +194,6 @@
   return strnicmp(s1, s2, n);
 }
 
-int usleep(uint32_t useconds) {
-  Sleep(useconds / 1000);
-  return 0;
-}
-
 #if _MSC_VER < 1900
 namespace lldb_private {
 int vsnprintf(char *buffer, size_t count, const char *format, va_list argptr) {
diff --git a/src/llvm-project/lldb/source/Initialization/SystemInitializerCommon.cpp b/src/llvm-project/lldb/source/Initialization/SystemInitializerCommon.cpp
index 8558911..7ae8ef5 100644
--- a/src/llvm-project/lldb/source/Initialization/SystemInitializerCommon.cpp
+++ b/src/llvm-project/lldb/source/Initialization/SystemInitializerCommon.cpp
@@ -25,6 +25,7 @@
 #if defined(_WIN32)
 #include "Plugins/Process/Windows/Common/ProcessWindowsLog.h"
 #include "lldb/Host/windows/windows.h"
+#include <crtdbg.h>
 #endif
 
 #include "llvm/Support/TargetSelect.h"
@@ -77,6 +78,17 @@
     } else {
       FileSystem::Initialize();
     }
+    if (llvm::Expected<std::string> cwd =
+            loader->LoadBuffer<WorkingDirectoryProvider>()) {
+      llvm::StringRef working_dir = llvm::StringRef(*cwd).rtrim();
+      if (std::error_code ec = FileSystem::Instance()
+                                   .GetVirtualFileSystem()
+                                   ->setCurrentWorkingDirectory(working_dir)) {
+        return llvm::errorCodeToError(ec);
+      }
+    } else {
+      return cwd.takeError();
+    }
   } else if (repro::Generator *g = r.GetGenerator()) {
     repro::VersionProvider &vp = g->GetOrCreate<repro::VersionProvider>();
     vp.SetVersion(lldb_private::GetVersion());
diff --git a/src/llvm-project/lldb/source/Interpreter/CMakeLists.txt b/src/llvm-project/lldb/source/Interpreter/CMakeLists.txt
index f8fed8b..0ed3986 100644
--- a/src/llvm-project/lldb/source/Interpreter/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Interpreter/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(InterpreterProperties.inc -gen-lldb-property-defs
+  SOURCE InterpreterProperties.td
+  TARGET LLDBInterpreterPropertiesGen)
+
+lldb_tablegen(InterpreterPropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE InterpreterProperties.td
+  TARGET LLDBInterpreterPropertiesEnumGen)
+
 add_lldb_library(lldbInterpreter
   CommandAlias.cpp
   CommandHistory.cpp
@@ -12,6 +20,7 @@
   OptionGroupBoolean.cpp
   OptionGroupFile.cpp
   OptionGroupFormat.cpp
+  OptionGroupPythonClassWithDict.cpp
   OptionGroupOutputFile.cpp
   OptionGroupPlatform.cpp
   OptionGroupString.cpp
@@ -27,7 +36,7 @@
   OptionValueDictionary.cpp
   OptionValueEnumeration.cpp
   OptionValueFileSpec.cpp
-  OptionValueFileSpecLIst.cpp
+  OptionValueFileSpecList.cpp
   OptionValueFormat.cpp
   OptionValueFormatEntity.cpp
   OptionValueLanguage.cpp
@@ -56,6 +65,10 @@
     Support
   )
 
-if (NOT LLDB_DISABLE_LIBEDIT)
-  target_include_directories(lldbInterpreter PRIVATE ${libedit_INCLUDE_DIRS})
-endif()
\ No newline at end of file
+add_dependencies(lldbInterpreter
+  LLDBInterpreterPropertiesGen
+  LLDBInterpreterPropertiesEnumGen)
+
+if (LLDB_ENABLE_LIBEDIT)
+  target_include_directories(lldbInterpreter PRIVATE ${LibEdit_INCLUDE_DIRS})
+endif()
diff --git a/src/llvm-project/lldb/source/Interpreter/CommandAlias.cpp b/src/llvm-project/lldb/source/Interpreter/CommandAlias.cpp
index 8c40574..5209a7b 100644
--- a/src/llvm-project/lldb/source/Interpreter/CommandAlias.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/CommandAlias.cpp
@@ -64,8 +64,9 @@
       option_arg_vector->emplace_back("<argument>", -1, options_string);
     else {
       for (auto &entry : args.entries()) {
-        if (!entry.ref.empty())
-          option_arg_vector->emplace_back("<argument>", -1, entry.ref);
+        if (!entry.ref().empty())
+          option_arg_vector->emplace_back(std::string("<argument>"), -1,
+                                          std::string(entry.ref()));
       }
     }
   }
@@ -115,18 +116,16 @@
   return false;
 }
 
-int CommandAlias::HandleCompletion(CompletionRequest &request) {
+void CommandAlias::HandleCompletion(CompletionRequest &request) {
   if (IsValid())
-    return m_underlying_command_sp->HandleCompletion(request);
-  return -1;
+    m_underlying_command_sp->HandleCompletion(request);
 }
 
-int CommandAlias::HandleArgumentCompletion(
+void CommandAlias::HandleArgumentCompletion(
     CompletionRequest &request, OptionElementVector &opt_element_vector) {
   if (IsValid())
-    return m_underlying_command_sp->HandleArgumentCompletion(
-        request, opt_element_vector);
-  return -1;
+    m_underlying_command_sp->HandleArgumentCompletion(request,
+                                                      opt_element_vector);
 }
 
 Options *CommandAlias::GetOptions() {
diff --git a/src/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp b/src/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp
index 8948037..1ee8050 100644
--- a/src/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/CommandInterpreter.cpp
@@ -16,7 +16,6 @@
 
 #include "Commands/CommandObjectApropos.h"
 #include "Commands/CommandObjectBreakpoint.h"
-#include "Commands/CommandObjectBugreport.h"
 #include "Commands/CommandObjectCommands.h"
 #include "Commands/CommandObjectDisassemble.h"
 #include "Commands/CommandObjectExpression.h"
@@ -49,7 +48,8 @@
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/Timer.h"
 
-#ifndef LLDB_DISABLE_LIBEDIT
+#include "lldb/Host/Config.h"
+#if LLDB_ENABLE_LIBEDIT
 #include "lldb/Host/Editline.h"
 #endif
 #include "lldb/Host/Host.h"
@@ -64,11 +64,14 @@
 #include "lldb/Utility/Args.h"
 
 #include "lldb/Target/Process.h"
+#include "lldb/Target/StopInfo.h"
 #include "lldb/Target/TargetList.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Target/UnixSignals.h"
 
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallString.h"
+#include "llvm/Support/FormatAdapters.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/PrettyStackTrace.h"
 
@@ -77,10 +80,6 @@
 
 static const char *k_white_space = " \t\v";
 
-static constexpr bool NoGlobalSetting = true;
-static constexpr uintptr_t DefaultValueTrue = true;
-static constexpr uintptr_t DefaultValueFalse = false;
-static constexpr const char *NoCStrDefault = nullptr;
 static constexpr const char *InitFileWarning =
     "There is a .lldbinit file in the current directory which is not being "
     "read.\n"
@@ -93,38 +92,12 @@
     "and\n"
     "accept the security risk.";
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"expand-regex-aliases", OptionValue::eTypeBoolean, NoGlobalSetting,
-     DefaultValueFalse, NoCStrDefault, {},
-     "If true, regular expression alias commands will show the "
-     "expanded command that will be executed. This can be used to "
-     "debug new regular expression alias commands."},
-    {"prompt-on-quit", OptionValue::eTypeBoolean, NoGlobalSetting,
-     DefaultValueTrue, NoCStrDefault, {},
-     "If true, LLDB will prompt you before quitting if there are any live "
-     "processes being debugged. If false, LLDB will quit without asking in any "
-     "case."},
-    {"stop-command-source-on-error", OptionValue::eTypeBoolean, NoGlobalSetting,
-     DefaultValueTrue, NoCStrDefault, {},
-     "If true, LLDB will stop running a 'command source' "
-     "script upon encountering an error."},
-    {"space-repl-prompts", OptionValue::eTypeBoolean, NoGlobalSetting,
-     DefaultValueFalse, NoCStrDefault, {},
-     "If true, blank lines will be printed between between REPL submissions."},
-    {"echo-commands", OptionValue::eTypeBoolean, NoGlobalSetting,
-     DefaultValueTrue, NoCStrDefault, {},
-     "If true, commands will be echoed before they are evaluated."},
-    {"echo-comment-commands", OptionValue::eTypeBoolean, NoGlobalSetting,
-     DefaultValueTrue, NoCStrDefault, {},
-     "If true, commands will be echoed even if they are pure comment lines."}};
+#define LLDB_PROPERTIES_interpreter
+#include "InterpreterProperties.inc"
 
 enum {
-  ePropertyExpandRegexAliases = 0,
-  ePropertyPromptOnQuit = 1,
-  ePropertyStopCmdSourceOnError = 2,
-  eSpaceReplPrompts = 3,
-  eEchoCommands = 4,
-  eEchoCommentCommands = 5
+#define LLDB_PROPERTIES_interpreter
+#include "InterpreterPropertiesEnum.inc"
 };
 
 ConstString &CommandInterpreter::GetStaticBroadcasterClass() {
@@ -139,7 +112,7 @@
       Properties(OptionValuePropertiesSP(
           new OptionValueProperties(ConstString("interpreter")))),
       IOHandlerDelegate(IOHandlerDelegate::Completion::LLDBCommand),
-      m_debugger(debugger), m_synchronous_execution(synchronous_execution),
+      m_debugger(debugger), m_synchronous_execution(true),
       m_skip_lldbinit_files(false), m_skip_app_init_files(false),
       m_command_io_handler_sp(), m_comment_char('#'),
       m_batch_command_mode(false), m_truncation_warning(eNoTruncation),
@@ -148,47 +121,48 @@
   SetEventName(eBroadcastBitThreadShouldExit, "thread-should-exit");
   SetEventName(eBroadcastBitResetPrompt, "reset-prompt");
   SetEventName(eBroadcastBitQuitCommandReceived, "quit");
+  SetSynchronous(synchronous_execution);
   CheckInWithManager();
-  m_collection_sp->Initialize(g_properties);
+  m_collection_sp->Initialize(g_interpreter_properties);
 }
 
 bool CommandInterpreter::GetExpandRegexAliases() const {
   const uint32_t idx = ePropertyExpandRegexAliases;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 bool CommandInterpreter::GetPromptOnQuit() const {
   const uint32_t idx = ePropertyPromptOnQuit;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
 }
 
-void CommandInterpreter::SetPromptOnQuit(bool b) {
+void CommandInterpreter::SetPromptOnQuit(bool enable) {
   const uint32_t idx = ePropertyPromptOnQuit;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
 }
 
 bool CommandInterpreter::GetEchoCommands() const {
-  const uint32_t idx = eEchoCommands;
+  const uint32_t idx = ePropertyEchoCommands;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
 }
 
-void CommandInterpreter::SetEchoCommands(bool b) {
-  const uint32_t idx = eEchoCommands;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+void CommandInterpreter::SetEchoCommands(bool enable) {
+  const uint32_t idx = ePropertyEchoCommands;
+  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
 }
 
 bool CommandInterpreter::GetEchoCommentCommands() const {
-  const uint32_t idx = eEchoCommentCommands;
+  const uint32_t idx = ePropertyEchoCommentCommands;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
 }
 
-void CommandInterpreter::SetEchoCommentCommands(bool b) {
-  const uint32_t idx = eEchoCommentCommands;
-  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
+void CommandInterpreter::SetEchoCommentCommands(bool enable) {
+  const uint32_t idx = ePropertyEchoCommentCommands;
+  m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, enable);
 }
 
 void CommandInterpreter::AllowExitCodeOnQuit(bool allow) {
@@ -223,13 +197,13 @@
 bool CommandInterpreter::GetStopCmdSourceOnError() const {
   const uint32_t idx = ePropertyStopCmdSourceOnError;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 bool CommandInterpreter::GetSpaceReplPrompts() const {
-  const uint32_t idx = eSpaceReplPrompts;
+  const uint32_t idx = ePropertySpaceReplPrompts;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_interpreter_properties[idx].default_uint_value != 0);
 }
 
 void CommandInterpreter::Initialize() {
@@ -389,10 +363,23 @@
                   "controlled by the type's author.");
       po->SetHelpLong("");
     }
-    AddAlias("parray", cmd_obj_sp, "--element-count %1 --")->SetHelpLong("");
-    AddAlias("poarray", cmd_obj_sp,
-             "--object-description --element-count %1 --")
-        ->SetHelpLong("");
+    CommandAlias *parray_alias =
+        AddAlias("parray", cmd_obj_sp, "--element-count %1 --");
+    if (parray_alias) {
+        parray_alias->SetHelp
+          ("parray <COUNT> <EXPRESSION> -- lldb will evaluate EXPRESSION "
+           "to get a typed-pointer-to-an-array in memory, and will display "
+           "COUNT elements of that type from the array.");
+        parray_alias->SetHelpLong("");
+    }
+    CommandAlias *poarray_alias = AddAlias("poarray", cmd_obj_sp,
+             "--object-description --element-count %1 --");
+    if (poarray_alias) {
+      poarray_alias->SetHelp("poarray <COUNT> <EXPRESSION> -- lldb will "
+          "evaluate EXPRESSION to get the address of an array of COUNT "
+          "objects in memory, and will call po on them.");
+      poarray_alias->SetHelpLong("");
+    }
   }
 
   cmd_obj_sp = GetCommandSPExact("process kill", false);
@@ -473,8 +460,6 @@
   m_command_dict["apropos"] = CommandObjectSP(new CommandObjectApropos(*this));
   m_command_dict["breakpoint"] =
       CommandObjectSP(new CommandObjectMultiwordBreakpoint(*this));
-  m_command_dict["bugreport"] =
-      CommandObjectSP(new CommandObjectMultiwordBugreport(*this));
   m_command_dict["command"] =
       CommandObjectSP(new CommandObjectMultiwordCommands(*this));
   m_command_dict["disassemble"] =
@@ -1628,8 +1613,7 @@
   llvm::PrettyStackTraceFormat stack_trace("HandleCommand(command = \"%s\")",
                                    command_line);
 
-  if (log)
-    log->Printf("Processing command: %s", command_line);
+  LLDB_LOGF(log, "Processing command: %s", command_line);
 
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat, "Handling command: %s.", command_line);
@@ -1735,13 +1719,13 @@
   // "br s -n main", command_string is now "breakpoint set -n main".
   if (log) {
     llvm::StringRef command_name = cmd_obj ? cmd_obj->GetCommandName() : "<not found>";
-    log->Printf("HandleCommand, cmd_obj : '%s'", command_name.str().c_str());
-    log->Printf("HandleCommand, (revised) command_string: '%s'",
-                command_string.c_str());
+    LLDB_LOGF(log, "HandleCommand, cmd_obj : '%s'", command_name.str().c_str());
+    LLDB_LOGF(log, "HandleCommand, (revised) command_string: '%s'",
+              command_string.c_str());
     const bool wants_raw_input =
         (cmd_obj != nullptr) ? cmd_obj->WantsRawCommandString() : false;
-    log->Printf("HandleCommand, wants_raw_input:'%s'",
-                wants_raw_input ? "True" : "False");
+    LLDB_LOGF(log, "HandleCommand, wants_raw_input:'%s'",
+              wants_raw_input ? "True" : "False");
   }
 
   // Phase 2.
@@ -1771,34 +1755,30 @@
     if (pos != 0 && pos != std::string::npos)
       remainder.erase(0, pos);
 
-    if (log)
-      log->Printf(
-          "HandleCommand, command line after removing command name(s): '%s'",
-          remainder.c_str());
+    LLDB_LOGF(
+        log, "HandleCommand, command line after removing command name(s): '%s'",
+        remainder.c_str());
 
     cmd_obj->Execute(remainder.c_str(), result);
   }
 
-  if (log)
-    log->Printf("HandleCommand, command %s",
-                (result.Succeeded() ? "succeeded" : "did not succeed"));
+  LLDB_LOGF(log, "HandleCommand, command %s",
+            (result.Succeeded() ? "succeeded" : "did not succeed"));
 
   return result.Succeeded();
 }
 
-int CommandInterpreter::HandleCompletionMatches(CompletionRequest &request) {
-  int num_command_matches = 0;
+void CommandInterpreter::HandleCompletionMatches(CompletionRequest &request) {
   bool look_for_subcommand = false;
 
   // For any of the command completions a unique match will be a complete word.
-  request.SetWordComplete(true);
 
-  if (request.GetCursorIndex() == -1) {
+  if (request.GetParsedLine().GetArgumentCount() == 0) {
     // We got nothing on the command line, so return the list of commands
     bool include_aliases = true;
     StringList new_matches, descriptions;
-    num_command_matches = GetCommandNamesMatchingPartialString(
-        "", include_aliases, new_matches, descriptions);
+    GetCommandNamesMatchingPartialString("", include_aliases, new_matches,
+                                         descriptions);
     request.AddCompletions(new_matches, descriptions);
   } else if (request.GetCursorIndex() == 0) {
     // The cursor is in the first argument, so just do a lookup in the
@@ -1808,24 +1788,18 @@
         GetCommandObject(request.GetParsedLine().GetArgumentAtIndex(0),
                          &new_matches, &new_descriptions);
 
-    if (num_command_matches == 1 && cmd_obj && cmd_obj->IsMultiwordObject() &&
+    if (new_matches.GetSize() && cmd_obj && cmd_obj->IsMultiwordObject() &&
         new_matches.GetStringAtIndex(0) != nullptr &&
         strcmp(request.GetParsedLine().GetArgumentAtIndex(0),
                new_matches.GetStringAtIndex(0)) == 0) {
-      if (request.GetParsedLine().GetArgumentCount() == 1) {
-        request.SetWordComplete(true);
-      } else {
+      if (request.GetParsedLine().GetArgumentCount() != 1) {
         look_for_subcommand = true;
-        num_command_matches = 0;
         new_matches.DeleteStringAtIndex(0);
         new_descriptions.DeleteStringAtIndex(0);
-        request.GetParsedLine().AppendArgument(llvm::StringRef());
-        request.SetCursorIndex(request.GetCursorIndex() + 1);
-        request.SetCursorCharPosition(0);
+        request.AppendEmptyArgument();
       }
     }
     request.AddCompletions(new_matches, new_descriptions);
-    num_command_matches = request.GetNumberOfMatches();
   }
 
   if (request.GetCursorIndex() > 0 || look_for_subcommand) {
@@ -1834,81 +1808,31 @@
     // matching initial command:
     CommandObject *command_object =
         GetCommandObject(request.GetParsedLine().GetArgumentAtIndex(0));
-    if (command_object == nullptr) {
-      return 0;
-    } else {
-      request.GetParsedLine().Shift();
-      request.SetCursorIndex(request.GetCursorIndex() - 1);
-      num_command_matches = command_object->HandleCompletion(request);
+    if (command_object) {
+      request.ShiftArguments();
+      command_object->HandleCompletion(request);
     }
   }
-
-  return num_command_matches;
 }
 
-int CommandInterpreter::HandleCompletion(
-    const char *current_line, const char *cursor, const char *last_char,
-    int match_start_point, int max_return_elements, StringList &matches,
-    StringList &descriptions) {
+void CommandInterpreter::HandleCompletion(CompletionRequest &request) {
 
-  llvm::StringRef command_line(current_line, last_char - current_line);
-  CompletionResult result;
-  CompletionRequest request(command_line, cursor - current_line,
-                            match_start_point, max_return_elements, result);
   // Don't complete comments, and if the line we are completing is just the
   // history repeat character, substitute the appropriate history line.
-  const char *first_arg = request.GetParsedLine().GetArgumentAtIndex(0);
-  if (first_arg) {
-    if (first_arg[0] == m_comment_char)
-      return 0;
-    else if (first_arg[0] == CommandHistory::g_repeat_char) {
-      if (auto hist_str = m_command_history.FindString(first_arg)) {
-        matches.InsertStringAtIndex(0, *hist_str);
-        descriptions.InsertStringAtIndex(0, "Previous command history event");
-        return -2;
-      } else
-        return 0;
+  llvm::StringRef first_arg = request.GetParsedLine().GetArgumentAtIndex(0);
+
+  if (!first_arg.empty()) {
+    if (first_arg.front() == m_comment_char)
+      return;
+    if (first_arg.front() == CommandHistory::g_repeat_char) {
+      if (auto hist_str = m_command_history.FindString(first_arg))
+        request.AddCompletion(*hist_str, "Previous command history event",
+                              CompletionMode::RewriteLine);
+      return;
     }
   }
 
-  // Only max_return_elements == -1 is supported at present:
-  lldbassert(max_return_elements == -1);
-
-  int num_command_matches = HandleCompletionMatches(request);
-  result.GetMatches(matches);
-  result.GetDescriptions(descriptions);
-
-  if (num_command_matches <= 0)
-    return num_command_matches;
-
-  if (request.GetParsedLine().GetArgumentCount() == 0) {
-    // If we got an empty string, insert nothing.
-    matches.InsertStringAtIndex(0, "");
-    descriptions.InsertStringAtIndex(0, "");
-  } else {
-    // Now figure out if there is a common substring, and if so put that in
-    // element 0, otherwise put an empty string in element 0.
-    std::string command_partial_str = request.GetCursorArgumentPrefix().str();
-
-    std::string common_prefix;
-    matches.LongestCommonPrefix(common_prefix);
-    const size_t partial_name_len = command_partial_str.size();
-    common_prefix.erase(0, partial_name_len);
-
-    // If we matched a unique single command, add a space... Only do this if
-    // the completer told us this was a complete word, however...
-    if (num_command_matches == 1 && request.GetWordComplete()) {
-      char quote_char = request.GetParsedLine()[request.GetCursorIndex()].quote;
-      common_prefix =
-          Args::EscapeLLDBCommandArgument(common_prefix, quote_char);
-      if (quote_char != '\0')
-        common_prefix.push_back(quote_char);
-      common_prefix.push_back(' ');
-    }
-    matches.InsertStringAtIndex(0, common_prefix.c_str());
-    descriptions.InsertStringAtIndex(0, "");
-  }
-  return num_command_matches;
+  HandleCompletionMatches(request);
 }
 
 CommandInterpreter::~CommandInterpreter() {}
@@ -2051,7 +1975,7 @@
 
     for (auto entry : llvm::enumerate(cmd_args.entries())) {
       if (!used[entry.index()] && !wants_raw_input)
-        new_args.AppendArgument(entry.value().ref);
+        new_args.AppendArgument(entry.value().ref());
     }
 
     cmd_args.Clear();
@@ -2231,6 +2155,45 @@
   return platform_sp;
 }
 
+bool CommandInterpreter::DidProcessStopAbnormally() const {
+  TargetSP target_sp = m_debugger.GetTargetList().GetSelectedTarget();
+  if (!target_sp)
+    return false;
+
+  ProcessSP process_sp(target_sp->GetProcessSP());
+  if (!process_sp)
+    return false;
+
+  if (eStateStopped != process_sp->GetState())
+    return false;
+
+  for (const auto &thread_sp : process_sp->GetThreadList().Threads()) {
+    StopInfoSP stop_info = thread_sp->GetStopInfo();
+    if (!stop_info)
+      return false;
+
+    const StopReason reason = stop_info->GetStopReason();
+    if (reason == eStopReasonException || reason == eStopReasonInstrumentation)
+      return true;
+
+    if (reason == eStopReasonSignal) {
+      const auto stop_signal = static_cast<int32_t>(stop_info->GetValue());
+      UnixSignalsSP signals_sp = process_sp->GetUnixSignals();
+      if (!signals_sp || !signals_sp->SignalIsValid(stop_signal))
+        // The signal is unknown, treat it as abnormal.
+        return true;
+
+      const auto sigint_num = signals_sp->GetSignalNumberFromName("SIGINT");
+      const auto sigstop_num = signals_sp->GetSignalNumberFromName("SIGSTOP");
+      if ((stop_signal != sigint_num) && (stop_signal != sigstop_num))
+        // The signal very likely implies a crash.
+        return true;
+    }
+  }
+
+  return false;
+}
+
 void CommandInterpreter::HandleCommands(const StringList &commands,
                                         ExecutionContext *override_context,
                                         CommandInterpreterRunOptions &options,
@@ -2341,38 +2304,22 @@
     }
 
     // Also check for "stop on crash here:
-    bool should_stop = false;
-    if (tmp_result.GetDidChangeProcessState() && options.GetStopOnCrash()) {
-      TargetSP target_sp(m_debugger.GetTargetList().GetSelectedTarget());
-      if (target_sp) {
-        ProcessSP process_sp(target_sp->GetProcessSP());
-        if (process_sp) {
-          for (ThreadSP thread_sp : process_sp->GetThreadList().Threads()) {
-            StopReason reason = thread_sp->GetStopReason();
-            if (reason == eStopReasonSignal || reason == eStopReasonException ||
-                reason == eStopReasonInstrumentation) {
-              should_stop = true;
-              break;
-            }
-          }
-        }
-      }
-      if (should_stop) {
-        if (idx != num_lines - 1)
-          result.AppendErrorWithFormat(
-              "Aborting reading of commands after command #%" PRIu64
-              ": '%s' stopped with a signal or exception.\n",
-              (uint64_t)idx + 1, cmd);
-        else
-          result.AppendMessageWithFormat(
-              "Command #%" PRIu64 " '%s' stopped with a signal or exception.\n",
-              (uint64_t)idx + 1, cmd);
+    if (tmp_result.GetDidChangeProcessState() && options.GetStopOnCrash() &&
+        DidProcessStopAbnormally()) {
+      if (idx != num_lines - 1)
+        result.AppendErrorWithFormat(
+            "Aborting reading of commands after command #%" PRIu64
+            ": '%s' stopped with a signal or exception.\n",
+            (uint64_t)idx + 1, cmd);
+      else
+        result.AppendMessageWithFormat(
+            "Command #%" PRIu64 " '%s' stopped with a signal or exception.\n",
+            (uint64_t)idx + 1, cmd);
 
-        result.SetStatus(tmp_result.GetStatus());
-        m_debugger.SetAsyncExecution(old_async_execution);
+      result.SetStatus(tmp_result.GetStatus());
+      m_debugger.SetAsyncExecution(old_async_execution);
 
-        return;
-      }
+      return;
     }
   }
 
@@ -2405,18 +2352,18 @@
     return;
   }
 
-  StreamFileSP input_file_sp(new StreamFile());
   std::string cmd_file_path = cmd_file.GetPath();
-  Status error = FileSystem::Instance().Open(input_file_sp->GetFile(), cmd_file,
-                                             File::eOpenOptionRead);
-
-  if (error.Fail()) {
-    result.AppendErrorWithFormat(
-        "error: an error occurred read file '%s': %s\n", cmd_file_path.c_str(),
-        error.AsCString());
+  auto input_file_up =
+      FileSystem::Instance().Open(cmd_file, File::eOpenOptionRead);
+  if (!input_file_up) {
+    std::string error = llvm::toString(input_file_up.takeError());
+    result.AppendErrorWithFormatv(
+        "error: an error occurred read file '{0}': {1}\n", cmd_file_path,
+        llvm::fmt_consume(input_file_up.takeError()));
     result.SetStatus(eReturnStatusFailed);
     return;
   }
+  FileSP input_file_sp = FileSP(std::move(input_file_up.get()));
 
   Debugger &debugger = GetDebugger();
 
@@ -2502,8 +2449,8 @@
   }
 
   if (flags & eHandleCommandFlagPrintResult) {
-    debugger.GetOutputFile()->Printf("Executing commands in '%s'.\n",
-                                     cmd_file_path.c_str());
+    debugger.GetOutputFile().Printf("Executing commands in '%s'.\n",
+                                    cmd_file_path.c_str());
   }
 
   // Used for inheriting the right settings when "command source" might
@@ -2541,6 +2488,9 @@
 bool CommandInterpreter::GetSynchronous() { return m_synchronous_execution; }
 
 void CommandInterpreter::SetSynchronous(bool value) {
+  // Asynchronous mode is not supported during reproducer replay.
+  if (repro::Reproducer::Instance().GetLoader())
+    return;
   m_synchronous_execution = value;
 }
 
@@ -2701,32 +2651,14 @@
   }
 }
 
-size_t CommandInterpreter::GetProcessOutput() {
-  //  The process has stuff waiting for stderr; get it and write it out to the
-  //  appropriate place.
-  char stdio_buffer[1024];
-  size_t len;
-  size_t total_bytes = 0;
-  Status error;
+void CommandInterpreter::GetProcessOutput() {
   TargetSP target_sp(m_debugger.GetTargetList().GetSelectedTarget());
-  if (target_sp) {
-    ProcessSP process_sp(target_sp->GetProcessSP());
-    if (process_sp) {
-      while ((len = process_sp->GetSTDOUT(stdio_buffer, sizeof(stdio_buffer),
-                                          error)) > 0) {
-        size_t bytes_written = len;
-        m_debugger.GetOutputFile()->Write(stdio_buffer, bytes_written);
-        total_bytes += len;
-      }
-      while ((len = process_sp->GetSTDERR(stdio_buffer, sizeof(stdio_buffer),
-                                          error)) > 0) {
-        size_t bytes_written = len;
-        m_debugger.GetErrorFile()->Write(stdio_buffer, bytes_written);
-        total_bytes += len;
-      }
-    }
-  }
-  return total_bytes;
+  if (!target_sp)
+    return;
+
+  if (ProcessSP process_sp = target_sp->GetProcessSP())
+    m_debugger.FlushProcessOutput(*process_sp, /*flush_stdout*/ true,
+                                  /*flush_stderr*/ true);
 }
 
 void CommandInterpreter::StartHandlingCommand() {
@@ -2818,8 +2750,8 @@
     // from a file) we need to echo the command out so we don't just see the
     // command output and no command...
     if (EchoCommandNonInteractive(line, io_handler.GetFlags()))
-      io_handler.GetOutputStreamFile()->Printf("%s%s\n", io_handler.GetPrompt(),
-                                               line.c_str());
+      io_handler.GetOutputStreamFileSP()->Printf(
+          "%s%s\n", io_handler.GetPrompt(), line.c_str());
   }
 
   StartHandlingCommand();
@@ -2836,13 +2768,13 @@
 
     if (!result.GetImmediateOutputStream()) {
       llvm::StringRef output = result.GetOutputData();
-      PrintCommandOutput(*io_handler.GetOutputStreamFile(), output);
+      PrintCommandOutput(*io_handler.GetOutputStreamFileSP(), output);
     }
 
     // Now emit the command error text from the command we just executed
     if (!result.GetImmediateErrorStream()) {
       llvm::StringRef error = result.GetErrorData();
-      PrintCommandOutput(*io_handler.GetErrorStreamFile(), error);
+      PrintCommandOutput(*io_handler.GetErrorStreamFileSP(), error);
     }
   }
 
@@ -2875,27 +2807,10 @@
 
   // Finally, if we're going to stop on crash, check that here:
   if (!m_quit_requested && result.GetDidChangeProcessState() &&
-      io_handler.GetFlags().Test(eHandleCommandFlagStopOnCrash)) {
-    bool should_stop = false;
-    TargetSP target_sp(m_debugger.GetTargetList().GetSelectedTarget());
-    if (target_sp) {
-      ProcessSP process_sp(target_sp->GetProcessSP());
-      if (process_sp) {
-        for (ThreadSP thread_sp : process_sp->GetThreadList().Threads()) {
-          StopReason reason = thread_sp->GetStopReason();
-          if ((reason == eStopReasonSignal || reason == eStopReasonException ||
-               reason == eStopReasonInstrumentation) &&
-              !result.GetAbnormalStopWasExpected()) {
-            should_stop = true;
-            break;
-          }
-        }
-      }
-    }
-    if (should_stop) {
-      io_handler.SetIsDone(true);
-      m_stopped_for_crash = true;
-    }
+      io_handler.GetFlags().Test(eHandleCommandFlagStopOnCrash) &&
+      DidProcessStopAbnormally()) {
+    io_handler.SetIsDone(true);
+    m_stopped_for_crash = true;
   }
 }
 
@@ -2924,8 +2839,7 @@
 }
 
 void CommandInterpreter::GetLLDBCommandsFromIOHandler(
-    const char *prompt, IOHandlerDelegate &delegate, bool asynchronously,
-    void *baton) {
+    const char *prompt, IOHandlerDelegate &delegate, void *baton) {
   Debugger &debugger = GetDebugger();
   IOHandlerSP io_handler_sp(
       new IOHandlerEditline(debugger, IOHandler::Type::CommandList,
@@ -2940,16 +2854,12 @@
 
   if (io_handler_sp) {
     io_handler_sp->SetUserData(baton);
-    if (asynchronously)
-      debugger.PushIOHandler(io_handler_sp);
-    else
-      debugger.RunIOHandler(io_handler_sp);
+    debugger.PushIOHandler(io_handler_sp);
   }
 }
 
 void CommandInterpreter::GetPythonCommandsFromIOHandler(
-    const char *prompt, IOHandlerDelegate &delegate, bool asynchronously,
-    void *baton) {
+    const char *prompt, IOHandlerDelegate &delegate, void *baton) {
   Debugger &debugger = GetDebugger();
   IOHandlerSP io_handler_sp(
       new IOHandlerEditline(debugger, IOHandler::Type::PythonCode,
@@ -2964,10 +2874,7 @@
 
   if (io_handler_sp) {
     io_handler_sp->SetUserData(baton);
-    if (asynchronously)
-      debugger.PushIOHandler(io_handler_sp);
-    else
-      debugger.RunIOHandler(io_handler_sp);
+    debugger.PushIOHandler(io_handler_sp);
   }
 }
 
@@ -3009,8 +2916,8 @@
 
     m_command_io_handler_sp = std::make_shared<IOHandlerEditline>(
         m_debugger, IOHandler::Type::CommandInterpreter,
-        m_debugger.GetInputFile(), m_debugger.GetOutputFile(),
-        m_debugger.GetErrorFile(), flags, "lldb", m_debugger.GetPrompt(),
+        m_debugger.GetInputFileSP(), m_debugger.GetOutputStreamSP(),
+        m_debugger.GetErrorStreamSP(), flags, "lldb", m_debugger.GetPrompt(),
         llvm::StringRef(), // Continuation prompt
         false, // Don't enable multiple line input, just single line commands
         m_debugger.GetUseColor(),
diff --git a/src/llvm-project/lldb/source/Interpreter/CommandObject.cpp b/src/llvm-project/lldb/source/Interpreter/CommandObject.cpp
index 8e493c7..d666852 100644
--- a/src/llvm-project/lldb/source/Interpreter/CommandObject.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/CommandObject.cpp
@@ -257,14 +257,14 @@
     m_api_locker.unlock();
 }
 
-int CommandObject::HandleCompletion(CompletionRequest &request) {
+void CommandObject::HandleCompletion(CompletionRequest &request) {
   // Default implementation of WantsCompletion() is !WantsRawCommandString().
   // Subclasses who want raw command string but desire, for example, argument
   // completion should override WantsCompletion() to return true, instead.
   if (WantsRawCommandString() && !WantsCompletion()) {
     // FIXME: Abstract telling the completion to insert the completion
     // character.
-    return -1;
+    return;
   } else {
     // Can we do anything generic with the options?
     Options *cur_options = GetOptions();
@@ -278,11 +278,11 @@
       bool handled_by_options = cur_options->HandleOptionCompletion(
           request, opt_element_vector, GetCommandInterpreter());
       if (handled_by_options)
-        return request.GetNumberOfMatches();
+        return;
     }
 
     // If we got here, the last word is not an option or an option argument.
-    return HandleArgumentCompletion(request, opt_element_vector);
+    HandleArgumentCompletion(request, opt_element_vector);
   }
 }
 
@@ -917,12 +917,21 @@
   return g_arguments_data[arg_type].help_text;
 }
 
-Target *CommandObject::GetDummyTarget() {
-  return m_interpreter.GetDebugger().GetDummyTarget();
+Target &CommandObject::GetDummyTarget() {
+  return *m_interpreter.GetDebugger().GetDummyTarget();
 }
 
-Target *CommandObject::GetSelectedOrDummyTarget(bool prefer_dummy) {
-  return m_interpreter.GetDebugger().GetSelectedOrDummyTarget(prefer_dummy);
+Target &CommandObject::GetSelectedOrDummyTarget(bool prefer_dummy) {
+  return *m_interpreter.GetDebugger().GetSelectedOrDummyTarget(prefer_dummy);
+}
+
+Target &CommandObject::GetSelectedTarget() {
+  assert(m_flags.AnySet(eCommandRequiresTarget | eCommandProcessMustBePaused |
+                        eCommandProcessMustBeLaunched | eCommandRequiresFrame |
+                        eCommandRequiresThread | eCommandRequiresProcess |
+                        eCommandRequiresRegContext) &&
+         "GetSelectedTarget called from object that may have no target");
+  return *m_interpreter.GetDebugger().GetSelectedTarget();
 }
 
 Thread *CommandObject::GetDefaultThread() {
@@ -958,7 +967,7 @@
   }
   if (!handled) {
     for (auto entry : llvm::enumerate(cmd_args.entries())) {
-      if (!entry.value().ref.empty() && entry.value().ref.front() == '`') {
+      if (!entry.value().ref().empty() && entry.value().ref().front() == '`') {
         cmd_args.ReplaceArgumentAtIndex(
             entry.index(),
             m_interpreter.ProcessEmbeddedScriptCommands(entry.value().c_str()));
@@ -1064,7 +1073,7 @@
     { eArgTypePythonScript, "python-script", CommandCompletions::eNoCompletion, { nullptr, false }, "Source code written in Python." },
     { eArgTypeQueueName, "queue-name", CommandCompletions::eNoCompletion, { nullptr, false }, "The name of the thread queue." },
     { eArgTypeRegisterName, "register-name", CommandCompletions::eNoCompletion, { RegisterNameHelpTextCallback, true }, nullptr },
-    { eArgTypeRegularExpression, "regular-expression", CommandCompletions::eNoCompletion, { nullptr, false }, "A regular expression." },
+    { eArgTypeRegularExpression, "regular-expression", CommandCompletions::eNoCompletion, { nullptr, false }, "A POSIX-compliant extended regular expression." },
     { eArgTypeRunArgs, "run-args", CommandCompletions::eNoCompletion, { nullptr, false }, "Arguments to be passed to the target program when it starts executing." },
     { eArgTypeRunMode, "run-mode", CommandCompletions::eNoCompletion, { nullptr, false }, "Help text goes here." },
     { eArgTypeScriptedCommandSynchronicity, "script-cmd-synchronicity", CommandCompletions::eNoCompletion, { nullptr, false }, "The synchronicity to use to run scripted commands with regard to LLDB event system." },
diff --git a/src/llvm-project/lldb/source/Interpreter/CommandObjectRegexCommand.cpp b/src/llvm-project/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
index 19335b9..693d18c 100644
--- a/src/llvm-project/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/CommandObjectRegexCommand.cpp
@@ -30,15 +30,14 @@
                                           CommandReturnObject &result) {
   EntryCollection::const_iterator pos, end = m_entries.end();
   for (pos = m_entries.begin(); pos != end; ++pos) {
-    RegularExpression::Match regex_match(m_max_matches);
-
-    if (pos->regex.Execute(command, &regex_match)) {
+    llvm::SmallVector<llvm::StringRef, 4> matches;
+    if (pos->regex.Execute(command, &matches)) {
       std::string new_command(pos->command);
-      std::string match_str;
       char percent_var[8];
       size_t idx, percent_var_idx;
       for (uint32_t match_idx = 1; match_idx <= m_max_matches; ++match_idx) {
-        if (regex_match.GetMatchAtIndex(command, match_idx, match_str)) {
+        if (match_idx < matches.size()) {
+          const std::string match_str = matches[match_idx].str();
           const int percent_var_len =
               ::snprintf(percent_var, sizeof(percent_var), "%%%u", match_idx);
           for (idx = 0; (percent_var_idx = new_command.find(
@@ -74,8 +73,9 @@
                                                 const char *command_cstr) {
   m_entries.resize(m_entries.size() + 1);
   // Only add the regular expression if it compiles
-  if (m_entries.back().regex.Compile(
-          llvm::StringRef::withNullAsEmpty(re_cstr))) {
+  m_entries.back().regex =
+      RegularExpression(llvm::StringRef::withNullAsEmpty(re_cstr));
+  if (m_entries.back().regex.IsValid()) {
     m_entries.back().command.assign(command_cstr);
     return true;
   }
@@ -84,13 +84,9 @@
   return false;
 }
 
-int CommandObjectRegexCommand::HandleCompletion(CompletionRequest &request) {
+void CommandObjectRegexCommand::HandleCompletion(CompletionRequest &request) {
   if (m_completion_type_mask) {
     CommandCompletions::InvokeCommonCompletionCallbacks(
         GetCommandInterpreter(), m_completion_type_mask, request, nullptr);
-    return request.GetNumberOfMatches();
-  } else {
-    request.SetWordComplete(false);
   }
-  return 0;
 }
diff --git a/src/llvm-project/lldb/source/Interpreter/CommandObjectScript.cpp b/src/llvm-project/lldb/source/Interpreter/CommandObjectScript.cpp
index edb1f67..d61d0ca 100644
--- a/src/llvm-project/lldb/source/Interpreter/CommandObjectScript.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/CommandObjectScript.cpp
@@ -7,12 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "CommandObjectScript.h"
-
-
 #include "lldb/Core/Debugger.h"
-
 #include "lldb/DataFormatters/DataVisualization.h"
-
+#include "lldb/Host/Config.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Interpreter/ScriptInterpreter.h"
@@ -35,13 +32,6 @@
 
 bool CommandObjectScript::DoExecute(llvm::StringRef command,
                                     CommandReturnObject &result) {
-#ifdef LLDB_DISABLE_PYTHON
-  // if we ever support languages other than Python this simple #ifdef won't
-  // work
-  result.AppendError("your copy of LLDB does not support scripting.");
-  result.SetStatus(eReturnStatusFailed);
-  return false;
-#else
   if (m_interpreter.GetDebugger().GetScriptLanguage() ==
       lldb::eScriptLanguageNone) {
     result.AppendError(
@@ -58,9 +48,9 @@
     return false;
   }
 
-  DataVisualization::ForceUpdate(); // script might change Python code we use
-                                    // for formatting.. make sure we keep up to
-                                    // date with it
+  // Script might change Python code we use for formatting. Make sure we keep
+  // up to date with it.
+  DataVisualization::ForceUpdate();
 
   if (command.empty()) {
     script_interpreter->ExecuteInterpreterLoop();
@@ -75,5 +65,4 @@
     result.SetStatus(eReturnStatusFailed);
 
   return result.Succeeded();
-#endif
 }
diff --git a/src/llvm-project/lldb/source/Interpreter/CommandReturnObject.cpp b/src/llvm-project/lldb/source/Interpreter/CommandReturnObject.cpp
index 3a7a875..c17390b 100644
--- a/src/llvm-project/lldb/source/Interpreter/CommandReturnObject.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/CommandReturnObject.cpp
@@ -33,8 +33,7 @@
 
 CommandReturnObject::CommandReturnObject()
     : m_out_stream(), m_err_stream(), m_status(eReturnStatusStarted),
-      m_did_change_process_state(false), m_interactive(true),
-      m_abnormal_stop_was_expected(false) {}
+      m_did_change_process_state(false), m_interactive(true) {}
 
 CommandReturnObject::~CommandReturnObject() {}
 
diff --git a/src/llvm-project/lldb/source/Interpreter/InterpreterProperties.td b/src/llvm-project/lldb/source/Interpreter/InterpreterProperties.td
new file mode 100644
index 0000000..600c1e3
--- /dev/null
+++ b/src/llvm-project/lldb/source/Interpreter/InterpreterProperties.td
@@ -0,0 +1,28 @@
+include "../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "interpreter" in {
+  def ExpandRegexAliases: Property<"expand-regex-aliases", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"If true, regular expression alias commands will show the expanded command that will be executed. This can be used to debug new regular expression alias commands.">;
+  def PromptOnQuit: Property<"prompt-on-quit", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will prompt you before quitting if there are any live processes being debugged. If false, LLDB will quit without asking in any case.">;
+  def StopCmdSourceOnError: Property<"stop-command-source-on-error", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, LLDB will stop running a 'command source' script upon encountering an error.">;
+  def SpaceReplPrompts: Property<"space-repl-prompts", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"If true, blank lines will be printed between between REPL submissions.">;
+  def EchoCommands: Property<"echo-commands", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, commands will be echoed before they are evaluated.">;
+  def EchoCommentCommands: Property<"echo-comment-commands", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, commands will be echoed even if they are pure comment lines.">;
+}
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionArgParser.cpp b/src/llvm-project/lldb/source/Interpreter/OptionArgParser.cpp
index efaac07..56d99a4 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionArgParser.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionArgParser.cpp
@@ -127,6 +127,8 @@
 
   if (s.equals_lower("python"))
     return eScriptLanguagePython;
+  if (s.equals_lower("lua"))
+    return eScriptLanguageLua;
   if (s.equals_lower("default"))
     return eScriptLanguageDefault;
   if (s.equals_lower("none"))
@@ -211,29 +213,21 @@
     // pointer types.
     static RegularExpression g_symbol_plus_offset_regex(
         "^(.*)([-\\+])[[:space:]]*(0x[0-9A-Fa-f]+|[0-9]+)[[:space:]]*$");
-    RegularExpression::Match regex_match(3);
-    if (g_symbol_plus_offset_regex.Execute(sref, &regex_match)) {
-      uint64_t offset = 0;
-      bool add = true;
-      std::string name;
-      std::string str;
-      if (regex_match.GetMatchAtIndex(s, 1, name)) {
-        if (regex_match.GetMatchAtIndex(s, 2, str)) {
-          add = str[0] == '+';
 
-          if (regex_match.GetMatchAtIndex(s, 3, str)) {
-            if (!llvm::StringRef(str).getAsInteger(0, offset)) {
-              Status error;
-              addr = ToAddress(exe_ctx, name.c_str(), LLDB_INVALID_ADDRESS,
-                               &error);
-              if (addr != LLDB_INVALID_ADDRESS) {
-                if (add)
-                  return addr + offset;
-                else
-                  return addr - offset;
-              }
-            }
-          }
+    llvm::SmallVector<llvm::StringRef, 4> matches;
+    if (g_symbol_plus_offset_regex.Execute(sref, &matches)) {
+      uint64_t offset = 0;
+      std::string name = matches[1].str();
+      std::string sign = matches[2].str();
+      std::string str_offset = matches[3].str();
+      if (!llvm::StringRef(str_offset).getAsInteger(0, offset)) {
+        Status error;
+        addr = ToAddress(exe_ctx, name.c_str(), LLDB_INVALID_ADDRESS, &error);
+        if (addr != LLDB_INVALID_ADDRESS) {
+          if (sign[0] == '+')
+            return addr + offset;
+          else
+            return addr - offset;
         }
       }
     }
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionGroupArchitecture.cpp b/src/llvm-project/lldb/source/Interpreter/OptionGroupArchitecture.cpp
index 2ee1a9c..11f786c 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionGroupArchitecture.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionGroupArchitecture.cpp
@@ -46,8 +46,7 @@
     break;
 
   default:
-    error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionGroupFormat.cpp b/src/llvm-project/lldb/source/Interpreter/OptionGroupFormat.cpp
index d9acfd6..c25e35f 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionGroupFormat.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionGroupFormat.cpp
@@ -160,8 +160,7 @@
   } break;
 
   default:
-    error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionGroupOutputFile.cpp b/src/llvm-project/lldb/source/Interpreter/OptionGroupOutputFile.cpp
index ccb99a8..3df75cf 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionGroupOutputFile.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionGroupOutputFile.cpp
@@ -50,8 +50,7 @@
     break;
 
   default:
-    error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionGroupPlatform.cpp b/src/llvm-project/lldb/source/Interpreter/OptionGroupPlatform.cpp
index 6dc2996..6ddbbf0 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionGroupPlatform.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionGroupPlatform.cpp
@@ -113,8 +113,7 @@
     break;
 
   default:
-    error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
   return error;
 }
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp b/src/llvm-project/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp
new file mode 100644
index 0000000..e41f9d7
--- /dev/null
+++ b/src/llvm-project/lldb/source/Interpreter/OptionGroupPythonClassWithDict.cpp
@@ -0,0 +1,143 @@
+//===-- OptionGroupPythonClassWithDict.cpp ----------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Interpreter/OptionGroupPythonClassWithDict.h"
+
+#include "lldb/Host/OptionParser.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+OptionGroupPythonClassWithDict::OptionGroupPythonClassWithDict
+    (const char *class_use,
+     bool is_class,
+     int class_option,
+     int key_option, 
+     int value_option) : OptionGroup(), m_is_class(is_class) {
+  m_key_usage_text.assign("The key for a key/value pair passed to the "
+                          "implementation of a ");
+  m_key_usage_text.append(class_use);
+  m_key_usage_text.append(".  Pairs can be specified more than once.");
+  
+  m_value_usage_text.assign("The value for the previous key in the pair passed "
+                            "to the implementation of a ");
+  m_value_usage_text.append(class_use);
+  m_value_usage_text.append(".  Pairs can be specified more than once.");
+  
+  m_class_usage_text.assign("The name of the ");
+  m_class_usage_text.append(m_is_class ? "class" : "function");
+  m_class_usage_text.append(" that will manage a ");
+  m_class_usage_text.append(class_use);
+  m_class_usage_text.append(".");
+  
+  m_option_definition[0].usage_mask = LLDB_OPT_SET_1;
+  m_option_definition[0].required = true;
+  m_option_definition[0].long_option = "script-class";
+  m_option_definition[0].short_option = class_option;
+  m_option_definition[0].validator = nullptr;
+  m_option_definition[0].option_has_arg = OptionParser::eRequiredArgument;
+  m_option_definition[0].enum_values = {};
+  m_option_definition[0].completion_type = 0;
+  m_option_definition[0].argument_type = eArgTypePythonClass;
+  m_option_definition[0].usage_text = m_class_usage_text.data();
+
+  m_option_definition[1].usage_mask = LLDB_OPT_SET_2;
+  m_option_definition[1].required = false;
+  m_option_definition[1].long_option = "structured-data-key";
+  m_option_definition[1].short_option = key_option;
+  m_option_definition[1].validator = nullptr;
+  m_option_definition[1].option_has_arg = OptionParser::eRequiredArgument;
+  m_option_definition[1].enum_values = {};
+  m_option_definition[1].completion_type = 0;
+  m_option_definition[1].argument_type = eArgTypeNone;
+  m_option_definition[1].usage_text = m_key_usage_text.data();
+
+  m_option_definition[2].usage_mask = LLDB_OPT_SET_2;
+  m_option_definition[2].required = false;
+  m_option_definition[2].long_option = "structured-data-value";
+  m_option_definition[2].short_option = value_option;
+  m_option_definition[2].validator = nullptr;
+  m_option_definition[2].option_has_arg = OptionParser::eRequiredArgument;
+  m_option_definition[2].enum_values = {};
+  m_option_definition[2].completion_type = 0;
+  m_option_definition[2].argument_type = eArgTypeNone;
+  m_option_definition[2].usage_text = m_value_usage_text.data();
+  
+  m_option_definition[3].usage_mask = LLDB_OPT_SET_3;
+  m_option_definition[3].required = true;
+  m_option_definition[3].long_option = "python-function";
+  m_option_definition[3].short_option = class_option;
+  m_option_definition[3].validator = nullptr;
+  m_option_definition[3].option_has_arg = OptionParser::eRequiredArgument;
+  m_option_definition[3].enum_values = {};
+  m_option_definition[3].completion_type = 0;
+  m_option_definition[3].argument_type = eArgTypePythonFunction;
+  m_option_definition[3].usage_text = m_class_usage_text.data();
+
+}
+
+OptionGroupPythonClassWithDict::~OptionGroupPythonClassWithDict() {}
+
+Status OptionGroupPythonClassWithDict::SetOptionValue(
+    uint32_t option_idx,
+    llvm::StringRef option_arg,
+    ExecutionContext *execution_context) {
+  Status error;
+  switch (option_idx) {
+  case 0:
+  case 3: {
+    m_name.assign(option_arg);
+  } break;
+  case 1: {
+      if (!m_dict_sp)
+        m_dict_sp = std::make_shared<StructuredData::Dictionary>();
+      if (m_current_key.empty())
+        m_current_key.assign(option_arg);
+      else
+        error.SetErrorStringWithFormat("Key: \"%s\" missing value.",
+                                        m_current_key.c_str());
+    
+  } break;
+  case 2: {
+      if (!m_dict_sp)
+        m_dict_sp = std::make_shared<StructuredData::Dictionary>();
+      if (!m_current_key.empty()) {
+          m_dict_sp->AddStringItem(m_current_key, option_arg);
+          m_current_key.clear();
+      }
+      else
+        error.SetErrorStringWithFormat("Value: \"%s\" missing matching key.",
+                                       option_arg.str().c_str());
+  } break;
+  default:
+    llvm_unreachable("Unimplemented option");
+  }
+  return error;
+}
+
+void OptionGroupPythonClassWithDict::OptionParsingStarting(
+  ExecutionContext *execution_context) {
+  m_current_key.erase();
+  // Leave the dictionary shared pointer unset.  That way you can tell that
+  // the user didn't pass any -k -v pairs.  We want to be able to warn if these
+  // were passed when the function they passed won't use them.
+  m_dict_sp.reset();
+  m_name.clear();
+}
+
+Status OptionGroupPythonClassWithDict::OptionParsingFinished(
+  ExecutionContext *execution_context) {
+  Status error;
+  // If we get here and there's contents in the m_current_key, somebody must
+  // have provided a key but no value.
+  if (!m_current_key.empty())
+      error.SetErrorStringWithFormat("Key: \"%s\" missing value.",
+                                     m_current_key.c_str());
+  return error;
+}
+
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionGroupUUID.cpp b/src/llvm-project/lldb/source/Interpreter/OptionGroupUUID.cpp
index e32673b..8fc330a 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionGroupUUID.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionGroupUUID.cpp
@@ -40,8 +40,7 @@
     break;
 
   default:
-    error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp b/src/llvm-project/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp
index 4e5463a..da0437a 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp
@@ -41,7 +41,7 @@
      {}, 0, eArgTypeNone, "Show variable location information."},
     {LLDB_OPT_SET_1, false, "object-description", 'O',
      OptionParser::eNoArgument, nullptr, {}, 0, eArgTypeNone,
-     "Print as an Objective-C object."},
+     "Display using a language-specific description API, if possible."},
     {LLDB_OPT_SET_1, false, "ptr-depth", 'P', OptionParser::eRequiredArgument,
      nullptr, {}, 0, eArgTypeCount, "The number of pointers to be traversed "
                                     "when dumping values (default is zero)."},
@@ -152,8 +152,7 @@
     break;
 
   default:
-    error.SetErrorStringWithFormat("unrecognized option '%c'", short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionGroupVariable.cpp b/src/llvm-project/lldb/source/Interpreter/OptionGroupVariable.cpp
index d703c3d..a9004bf 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionGroupVariable.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionGroupVariable.cpp
@@ -109,9 +109,7 @@
     error = summary_string.SetCurrentValue(option_arg);
     break;
   default:
-    error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                   short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionGroupWatchpoint.cpp b/src/llvm-project/lldb/source/Interpreter/OptionGroupWatchpoint.cpp
index 28e6b81..682f99b 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionGroupWatchpoint.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionGroupWatchpoint.cpp
@@ -16,16 +16,45 @@
 using namespace lldb_private;
 
 static constexpr OptionEnumValueElement g_watch_type[] = {
-    {OptionGroupWatchpoint::eWatchRead, "read", "Watch for read"},
-    {OptionGroupWatchpoint::eWatchWrite, "write", "Watch for write"},
-    {OptionGroupWatchpoint::eWatchReadWrite, "read_write",
-     "Watch for read/write"} };
+    {
+        OptionGroupWatchpoint::eWatchRead,
+        "read",
+        "Watch for read",
+    },
+    {
+        OptionGroupWatchpoint::eWatchWrite,
+        "write",
+        "Watch for write",
+    },
+    {
+        OptionGroupWatchpoint::eWatchReadWrite,
+        "read_write",
+        "Watch for read/write",
+    },
+};
 
 static constexpr OptionEnumValueElement g_watch_size[] = {
-    {1, "1", "Watch for byte size of 1"},
-    {2, "2", "Watch for byte size of 2"},
-    {4, "4", "Watch for byte size of 4"},
-    {8, "8", "Watch for byte size of 8"} };
+    {
+        1,
+        "1",
+        "Watch for byte size of 1",
+    },
+    {
+        2,
+        "2",
+        "Watch for byte size of 2",
+    },
+    {
+        4,
+        "4",
+        "Watch for byte size of 4",
+    },
+    {
+        8,
+        "8",
+        "Watch for byte size of 8",
+    },
+};
 
 static constexpr OptionDefinition g_option_table[] = {
     {LLDB_OPT_SET_1, false, "watch", 'w', OptionParser::eRequiredArgument,
@@ -72,9 +101,7 @@
     break;
 
   default:
-    error.SetErrorStringWithFormat("unrecognized short option '%c'",
-                                   short_option);
-    break;
+    llvm_unreachable("Unimplemented option");
   }
 
   return error;
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValue.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValue.cpp
index 00c8642..bc929aa 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValue.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValue.cpp
@@ -565,11 +565,8 @@
   return dumped_something;
 }
 
-size_t OptionValue::AutoComplete(CommandInterpreter &interpreter,
-                                 CompletionRequest &request) {
-  request.SetWordComplete(false);
-  return request.GetNumberOfMatches();
-}
+void OptionValue::AutoComplete(CommandInterpreter &interpreter,
+                               CompletionRequest &request) {}
 
 Status OptionValue::SetValueFromString(llvm::StringRef value,
                                        VarSetOperationType op) {
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueArch.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueArch.cpp
index 92dc45d..7271c14 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueArch.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueArch.cpp
@@ -68,11 +68,9 @@
   return OptionValueSP(new OptionValueArch(*this));
 }
 
-size_t OptionValueArch::AutoComplete(CommandInterpreter &interpreter,
-                                     CompletionRequest &request) {
-  request.SetWordComplete(false);
+void OptionValueArch::AutoComplete(CommandInterpreter &interpreter,
+                                   CompletionRequest &request) {
   CommandCompletions::InvokeCommonCompletionCallbacks(
       interpreter, CommandCompletions::eArchitectureCompletion, request,
       nullptr);
-  return request.GetNumberOfMatches();
 }
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueBoolean.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueBoolean.cpp
index 8be8220..6f893a9 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueBoolean.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueBoolean.cpp
@@ -71,21 +71,17 @@
   return OptionValueSP(new OptionValueBoolean(*this));
 }
 
-size_t OptionValueBoolean::AutoComplete(CommandInterpreter &interpreter,
-                                        CompletionRequest &request) {
-  request.SetWordComplete(false);
-  static const llvm::StringRef g_autocomplete_entries[] = {
-      "true", "false", "on", "off", "yes", "no", "1", "0"};
+void OptionValueBoolean::AutoComplete(CommandInterpreter &interpreter,
+                                      CompletionRequest &request) {
+  llvm::StringRef autocomplete_entries[] = {"true", "false", "on", "off",
+                                            "yes",  "no",    "1",  "0"};
 
-  auto entries = llvm::makeArrayRef(g_autocomplete_entries);
+  auto entries = llvm::makeArrayRef(autocomplete_entries);
 
   // only suggest "true" or "false" by default
   if (request.GetCursorArgumentPrefix().empty())
     entries = entries.take_front(2);
 
-  for (auto entry : entries) {
-    if (entry.startswith_lower(request.GetCursorArgumentPrefix()))
-      request.AddCompletion(entry);
-  }
-  return request.GetNumberOfMatches();
+  for (auto entry : entries)
+    request.TryCompleteCurrentArg(entry);
 }
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueDictionary.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueDictionary.cpp
index eb66c48..a402228 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueDictionary.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueDictionary.cpp
@@ -111,18 +111,18 @@
       return error;
     }
     for (const auto &entry : args) {
-      if (entry.ref.empty()) {
+      if (entry.ref().empty()) {
         error.SetErrorString("empty argument");
         return error;
       }
-      if (!entry.ref.contains('=')) {
+      if (!entry.ref().contains('=')) {
         error.SetErrorString(
             "assign operation takes one or more key=value arguments");
         return error;
       }
 
       llvm::StringRef key, value;
-      std::tie(key, value) = entry.ref.split('=');
+      std::tie(key, value) = entry.ref().split('=');
       bool key_valid = false;
       if (key.empty()) {
         error.SetErrorString("empty dictionary key");
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueEnumeration.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueEnumeration.cpp
index 0b76bd0..26933aa 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueEnumeration.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueEnumeration.cpp
@@ -102,21 +102,16 @@
   return OptionValueSP(new OptionValueEnumeration(*this));
 }
 
-size_t OptionValueEnumeration::AutoComplete(CommandInterpreter &interpreter,
-                                            CompletionRequest &request) {
-  request.SetWordComplete(false);
-
+void OptionValueEnumeration::AutoComplete(CommandInterpreter &interpreter,
+                                          CompletionRequest &request) {
   const uint32_t num_enumerators = m_enumerations.GetSize();
   if (!request.GetCursorArgumentPrefix().empty()) {
     for (size_t i = 0; i < num_enumerators; ++i) {
       llvm::StringRef name = m_enumerations.GetCStringAtIndex(i).GetStringRef();
-      if (name.startswith(request.GetCursorArgumentPrefix()))
-        request.AddCompletion(name);
+      request.TryCompleteCurrentArg(name);
     }
-  } else {
-    // only suggest "true" or "false" by default
+    return;
+  }
     for (size_t i = 0; i < num_enumerators; ++i)
       request.AddCompletion(m_enumerations.GetCStringAtIndex(i).GetStringRef());
-  }
-  return request.GetNumberOfMatches();
 }
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpec.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpec.cpp
index 062d7cc..20d3d4e 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpec.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpec.cpp
@@ -99,12 +99,10 @@
   return OptionValueSP(new OptionValueFileSpec(*this));
 }
 
-size_t OptionValueFileSpec::AutoComplete(CommandInterpreter &interpreter,
-                                         CompletionRequest &request) {
-  request.SetWordComplete(false);
+void OptionValueFileSpec::AutoComplete(CommandInterpreter &interpreter,
+                                       CompletionRequest &request) {
   CommandCompletions::InvokeCommonCompletionCallbacks(
       interpreter, m_completion_mask, request, nullptr);
-  return request.GetNumberOfMatches();
 }
 
 const lldb::DataBufferSP &OptionValueFileSpec::GetFileContents() {
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp
deleted file mode 100644
index a951888..0000000
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp
+++ /dev/null
@@ -1,170 +0,0 @@
-//===-- OptionValueFileSpecLIst.cpp -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Interpreter/OptionValueFileSpecList.h"
-
-#include "lldb/Host/StringConvert.h"
-#include "lldb/Utility/Args.h"
-#include "lldb/Utility/Stream.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-void OptionValueFileSpecList::DumpValue(const ExecutionContext *exe_ctx,
-                                        Stream &strm, uint32_t dump_mask) {
-  std::lock_guard<std::recursive_mutex> lock(m_mutex);
-  if (dump_mask & eDumpOptionType)
-    strm.Printf("(%s)", GetTypeAsCString());
-  if (dump_mask & eDumpOptionValue) {
-    const bool one_line = dump_mask & eDumpOptionCommand;
-    const uint32_t size = m_current_value.GetSize();
-    if (dump_mask & eDumpOptionType)
-      strm.Printf(" =%s",
-                  (m_current_value.GetSize() > 0 && !one_line) ? "\n" : "");
-    if (!one_line)
-      strm.IndentMore();
-    for (uint32_t i = 0; i < size; ++i) {
-      if (!one_line) {
-        strm.Indent();
-        strm.Printf("[%u]: ", i);
-      }
-      m_current_value.GetFileSpecAtIndex(i).Dump(&strm);
-      if (one_line)
-        strm << ' ';
-    }
-    if (!one_line)
-      strm.IndentLess();
-  }
-}
-
-Status OptionValueFileSpecList::SetValueFromString(llvm::StringRef value,
-                                                   VarSetOperationType op) {
-  std::lock_guard<std::recursive_mutex> lock(m_mutex);
-  Status error;
-  Args args(value.str());
-  const size_t argc = args.GetArgumentCount();
-
-  switch (op) {
-  case eVarSetOperationClear:
-    Clear();
-    NotifyValueChanged();
-    break;
-
-  case eVarSetOperationReplace:
-    if (argc > 1) {
-      uint32_t idx =
-          StringConvert::ToUInt32(args.GetArgumentAtIndex(0), UINT32_MAX);
-      const uint32_t count = m_current_value.GetSize();
-      if (idx > count) {
-        error.SetErrorStringWithFormat(
-            "invalid file list index %u, index must be 0 through %u", idx,
-            count);
-      } else {
-        for (size_t i = 1; i < argc; ++i, ++idx) {
-          FileSpec file(args.GetArgumentAtIndex(i));
-          if (idx < count)
-            m_current_value.Replace(idx, file);
-          else
-            m_current_value.Append(file);
-        }
-        NotifyValueChanged();
-      }
-    } else {
-      error.SetErrorString("replace operation takes an array index followed by "
-                           "one or more values");
-    }
-    break;
-
-  case eVarSetOperationAssign:
-    m_current_value.Clear();
-    // Fall through to append case
-    LLVM_FALLTHROUGH;
-  case eVarSetOperationAppend:
-    if (argc > 0) {
-      m_value_was_set = true;
-      for (size_t i = 0; i < argc; ++i) {
-        FileSpec file(args.GetArgumentAtIndex(i));
-        m_current_value.Append(file);
-      }
-      NotifyValueChanged();
-    } else {
-      error.SetErrorString(
-          "assign operation takes at least one file path argument");
-    }
-    break;
-
-  case eVarSetOperationInsertBefore:
-  case eVarSetOperationInsertAfter:
-    if (argc > 1) {
-      uint32_t idx =
-          StringConvert::ToUInt32(args.GetArgumentAtIndex(0), UINT32_MAX);
-      const uint32_t count = m_current_value.GetSize();
-      if (idx > count) {
-        error.SetErrorStringWithFormat(
-            "invalid insert file list index %u, index must be 0 through %u",
-            idx, count);
-      } else {
-        if (op == eVarSetOperationInsertAfter)
-          ++idx;
-        for (size_t i = 1; i < argc; ++i, ++idx) {
-          FileSpec file(args.GetArgumentAtIndex(i));
-          m_current_value.Insert(idx, file);
-        }
-        NotifyValueChanged();
-      }
-    } else {
-      error.SetErrorString("insert operation takes an array index followed by "
-                           "one or more values");
-    }
-    break;
-
-  case eVarSetOperationRemove:
-    if (argc > 0) {
-      std::vector<int> remove_indexes;
-      bool all_indexes_valid = true;
-      size_t i;
-      for (i = 0; all_indexes_valid && i < argc; ++i) {
-        const int idx =
-            StringConvert::ToSInt32(args.GetArgumentAtIndex(i), INT32_MAX);
-        if (idx == INT32_MAX)
-          all_indexes_valid = false;
-        else
-          remove_indexes.push_back(idx);
-      }
-
-      if (all_indexes_valid) {
-        size_t num_remove_indexes = remove_indexes.size();
-        if (num_remove_indexes) {
-          // Sort and then erase in reverse so indexes are always valid
-          llvm::sort(remove_indexes.begin(), remove_indexes.end());
-          for (size_t j = num_remove_indexes - 1; j < num_remove_indexes; ++j) {
-            m_current_value.Remove(j);
-          }
-        }
-        NotifyValueChanged();
-      } else {
-        error.SetErrorStringWithFormat(
-            "invalid array index '%s', aborting remove operation",
-            args.GetArgumentAtIndex(i));
-      }
-    } else {
-      error.SetErrorString("remove operation takes one or more array index");
-    }
-    break;
-
-  case eVarSetOperationInvalid:
-    error = OptionValue::SetValueFromString(value, op);
-    break;
-  }
-  return error;
-}
-
-lldb::OptionValueSP OptionValueFileSpecList::DeepCopy() const {
-  std::lock_guard<std::recursive_mutex> lock(m_mutex);
-  return OptionValueSP(new OptionValueFileSpecList(m_current_value));
-}
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpecList.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpecList.cpp
new file mode 100644
index 0000000..f2367b1
--- /dev/null
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueFileSpecList.cpp
@@ -0,0 +1,170 @@
+//===-- OptionValueFileSpecList.cpp ---------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Interpreter/OptionValueFileSpecList.h"
+
+#include "lldb/Host/StringConvert.h"
+#include "lldb/Utility/Args.h"
+#include "lldb/Utility/Stream.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+void OptionValueFileSpecList::DumpValue(const ExecutionContext *exe_ctx,
+                                        Stream &strm, uint32_t dump_mask) {
+  std::lock_guard<std::recursive_mutex> lock(m_mutex);
+  if (dump_mask & eDumpOptionType)
+    strm.Printf("(%s)", GetTypeAsCString());
+  if (dump_mask & eDumpOptionValue) {
+    const bool one_line = dump_mask & eDumpOptionCommand;
+    const uint32_t size = m_current_value.GetSize();
+    if (dump_mask & eDumpOptionType)
+      strm.Printf(" =%s",
+                  (m_current_value.GetSize() > 0 && !one_line) ? "\n" : "");
+    if (!one_line)
+      strm.IndentMore();
+    for (uint32_t i = 0; i < size; ++i) {
+      if (!one_line) {
+        strm.Indent();
+        strm.Printf("[%u]: ", i);
+      }
+      m_current_value.GetFileSpecAtIndex(i).Dump(strm.AsRawOstream());
+      if (one_line)
+        strm << ' ';
+    }
+    if (!one_line)
+      strm.IndentLess();
+  }
+}
+
+Status OptionValueFileSpecList::SetValueFromString(llvm::StringRef value,
+                                                   VarSetOperationType op) {
+  std::lock_guard<std::recursive_mutex> lock(m_mutex);
+  Status error;
+  Args args(value.str());
+  const size_t argc = args.GetArgumentCount();
+
+  switch (op) {
+  case eVarSetOperationClear:
+    Clear();
+    NotifyValueChanged();
+    break;
+
+  case eVarSetOperationReplace:
+    if (argc > 1) {
+      uint32_t idx =
+          StringConvert::ToUInt32(args.GetArgumentAtIndex(0), UINT32_MAX);
+      const uint32_t count = m_current_value.GetSize();
+      if (idx > count) {
+        error.SetErrorStringWithFormat(
+            "invalid file list index %u, index must be 0 through %u", idx,
+            count);
+      } else {
+        for (size_t i = 1; i < argc; ++i, ++idx) {
+          FileSpec file(args.GetArgumentAtIndex(i));
+          if (idx < count)
+            m_current_value.Replace(idx, file);
+          else
+            m_current_value.Append(file);
+        }
+        NotifyValueChanged();
+      }
+    } else {
+      error.SetErrorString("replace operation takes an array index followed by "
+                           "one or more values");
+    }
+    break;
+
+  case eVarSetOperationAssign:
+    m_current_value.Clear();
+    // Fall through to append case
+    LLVM_FALLTHROUGH;
+  case eVarSetOperationAppend:
+    if (argc > 0) {
+      m_value_was_set = true;
+      for (size_t i = 0; i < argc; ++i) {
+        FileSpec file(args.GetArgumentAtIndex(i));
+        m_current_value.Append(file);
+      }
+      NotifyValueChanged();
+    } else {
+      error.SetErrorString(
+          "assign operation takes at least one file path argument");
+    }
+    break;
+
+  case eVarSetOperationInsertBefore:
+  case eVarSetOperationInsertAfter:
+    if (argc > 1) {
+      uint32_t idx =
+          StringConvert::ToUInt32(args.GetArgumentAtIndex(0), UINT32_MAX);
+      const uint32_t count = m_current_value.GetSize();
+      if (idx > count) {
+        error.SetErrorStringWithFormat(
+            "invalid insert file list index %u, index must be 0 through %u",
+            idx, count);
+      } else {
+        if (op == eVarSetOperationInsertAfter)
+          ++idx;
+        for (size_t i = 1; i < argc; ++i, ++idx) {
+          FileSpec file(args.GetArgumentAtIndex(i));
+          m_current_value.Insert(idx, file);
+        }
+        NotifyValueChanged();
+      }
+    } else {
+      error.SetErrorString("insert operation takes an array index followed by "
+                           "one or more values");
+    }
+    break;
+
+  case eVarSetOperationRemove:
+    if (argc > 0) {
+      std::vector<int> remove_indexes;
+      bool all_indexes_valid = true;
+      size_t i;
+      for (i = 0; all_indexes_valid && i < argc; ++i) {
+        const int idx =
+            StringConvert::ToSInt32(args.GetArgumentAtIndex(i), INT32_MAX);
+        if (idx == INT32_MAX)
+          all_indexes_valid = false;
+        else
+          remove_indexes.push_back(idx);
+      }
+
+      if (all_indexes_valid) {
+        size_t num_remove_indexes = remove_indexes.size();
+        if (num_remove_indexes) {
+          // Sort and then erase in reverse so indexes are always valid
+          llvm::sort(remove_indexes.begin(), remove_indexes.end());
+          for (size_t j = num_remove_indexes - 1; j < num_remove_indexes; ++j) {
+            m_current_value.Remove(j);
+          }
+        }
+        NotifyValueChanged();
+      } else {
+        error.SetErrorStringWithFormat(
+            "invalid array index '%s', aborting remove operation",
+            args.GetArgumentAtIndex(i));
+      }
+    } else {
+      error.SetErrorString("remove operation takes one or more array index");
+    }
+    break;
+
+  case eVarSetOperationInvalid:
+    error = OptionValue::SetValueFromString(value, op);
+    break;
+  }
+  return error;
+}
+
+lldb::OptionValueSP OptionValueFileSpecList::DeepCopy() const {
+  std::lock_guard<std::recursive_mutex> lock(m_mutex);
+  return OptionValueSP(new OptionValueFileSpecList(m_current_value));
+}
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueFormatEntity.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueFormatEntity.cpp
index 1bb8c9f..8dc5265 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueFormatEntity.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueFormatEntity.cpp
@@ -116,7 +116,7 @@
   return OptionValueSP(new OptionValueFormatEntity(*this));
 }
 
-size_t OptionValueFormatEntity::AutoComplete(CommandInterpreter &interpreter,
-                                             CompletionRequest &request) {
-  return FormatEntity::AutoComplete(request);
+void OptionValueFormatEntity::AutoComplete(CommandInterpreter &interpreter,
+                                           CompletionRequest &request) {
+  FormatEntity::AutoComplete(request);
 }
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueLanguage.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueLanguage.cpp
index d935d5e..1d7e188 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueLanguage.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueLanguage.cpp
@@ -10,6 +10,7 @@
 
 #include "lldb/DataFormatters/FormatManager.h"
 #include "lldb/Target/Language.h"
+#include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Utility/Args.h"
 #include "lldb/Utility/Stream.h"
 
@@ -39,23 +40,20 @@
   case eVarSetOperationReplace:
   case eVarSetOperationAssign: {
     ConstString lang_name(value.trim());
-    std::set<lldb::LanguageType> languages_for_types;
-    std::set<lldb::LanguageType> languages_for_expressions;
-    Language::GetLanguagesSupportingTypeSystems(languages_for_types,
-                                                languages_for_expressions);
-
+    LanguageSet languages_for_types = Language::GetLanguagesSupportingTypeSystems();
     LanguageType new_type =
         Language::GetLanguageTypeFromString(lang_name.GetStringRef());
-    if (new_type && languages_for_types.count(new_type)) {
+    if (new_type && languages_for_types[new_type]) {
       m_value_was_set = true;
       m_current_value = new_type;
     } else {
       StreamString error_strm;
       error_strm.Printf("invalid language type '%s', ", value.str().c_str());
       error_strm.Printf("valid values are:\n");
-      for (lldb::LanguageType language : languages_for_types) {
-        error_strm.Printf("%s%s%s", "    ",
-                          Language::GetNameForLanguageType(language), "\n");
+      for (int bit : languages_for_types.bitvector.set_bits()) {
+        auto language = (LanguageType)bit;
+        error_strm.Printf("    %s\n",
+                          Language::GetNameForLanguageType(language));
       }
       error.SetErrorString(error_strm.GetString());
     }
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueProperties.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueProperties.cpp
index 4dae930..21750cf 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueProperties.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueProperties.cpp
@@ -60,10 +60,10 @@
 }
 
 void OptionValueProperties::SetValueChangedCallback(
-    uint32_t property_idx, OptionValueChangedCallback callback, void *baton) {
+    uint32_t property_idx, std::function<void()> callback) {
   Property *property = ProtectedGetPropertyAtIndex(property_idx);
   if (property)
-    property->SetValueChangedCallback(callback, baton);
+    property->SetValueChangedCallback(std::move(callback));
 }
 
 void OptionValueProperties::AppendProperty(ConstString name,
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueRegex.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueRegex.cpp
index bbe3fa7..cf806fb 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueRegex.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueRegex.cpp
@@ -46,16 +46,14 @@
 
   case eVarSetOperationReplace:
   case eVarSetOperationAssign:
-    if (m_regex.Compile(value)) {
+    m_regex = RegularExpression(value);
+    if (m_regex.IsValid()) {
       m_value_was_set = true;
       NotifyValueChanged();
+    } else if (llvm::Error err = m_regex.GetError()) {
+      error.SetErrorString(llvm::toString(std::move(err)));
     } else {
-      char regex_error[1024];
-      if (m_regex.GetErrorAsCString(regex_error, sizeof(regex_error)))
-        error.SetErrorString(regex_error);
-      else
-        error.SetErrorStringWithFormat("regex error %u",
-                                       m_regex.GetErrorCode());
+      error.SetErrorString("regex error");
     }
     break;
   }
diff --git a/src/llvm-project/lldb/source/Interpreter/OptionValueUUID.cpp b/src/llvm-project/lldb/source/Interpreter/OptionValueUUID.cpp
index f39b66b..7a6bc65 100644
--- a/src/llvm-project/lldb/source/Interpreter/OptionValueUUID.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/OptionValueUUID.cpp
@@ -62,30 +62,24 @@
   return OptionValueSP(new OptionValueUUID(*this));
 }
 
-size_t OptionValueUUID::AutoComplete(CommandInterpreter &interpreter,
-                                     CompletionRequest &request) {
-  request.SetWordComplete(false);
+void OptionValueUUID::AutoComplete(CommandInterpreter &interpreter,
+                                   CompletionRequest &request) {
   ExecutionContext exe_ctx(interpreter.GetExecutionContext());
   Target *target = exe_ctx.GetTargetPtr();
-  if (target) {
-    auto prefix = request.GetCursorArgumentPrefix();
-    llvm::SmallVector<uint8_t, 20> uuid_bytes;
-    if (UUID::DecodeUUIDBytesFromString(prefix, uuid_bytes).empty()) {
-      const size_t num_modules = target->GetImages().GetSize();
-      for (size_t i = 0; i < num_modules; ++i) {
-        ModuleSP module_sp(target->GetImages().GetModuleAtIndex(i));
-        if (module_sp) {
-          const UUID &module_uuid = module_sp->GetUUID();
-          if (module_uuid.IsValid()) {
-            llvm::ArrayRef<uint8_t> module_bytes = module_uuid.GetBytes();
-            if (module_bytes.size() >= uuid_bytes.size() &&
-                module_bytes.take_front(uuid_bytes.size()).equals(uuid_bytes)) {
-              request.AddCompletion(module_uuid.GetAsString());
-            }
-          }
-        }
-      }
-    }
+  if (!target)
+    return;
+  auto prefix = request.GetCursorArgumentPrefix();
+  llvm::SmallVector<uint8_t, 20> uuid_bytes;
+  if (!UUID::DecodeUUIDBytesFromString(prefix, uuid_bytes).empty())
+    return;
+  const size_t num_modules = target->GetImages().GetSize();
+  for (size_t i = 0; i < num_modules; ++i) {
+    ModuleSP module_sp(target->GetImages().GetModuleAtIndex(i));
+    if (!module_sp)
+      continue;
+    const UUID &module_uuid = module_sp->GetUUID();
+    if (!module_uuid.IsValid())
+      continue;
+    request.TryCompleteCurrentArg(module_uuid.GetAsString());
   }
-  return request.GetNumberOfMatches();
 }
diff --git a/src/llvm-project/lldb/source/Interpreter/Options.cpp b/src/llvm-project/lldb/source/Interpreter/Options.cpp
index ba15c02..80e9d3a 100644
--- a/src/llvm-project/lldb/source/Interpreter/Options.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/Options.cpp
@@ -645,8 +645,6 @@
 bool Options::HandleOptionCompletion(CompletionRequest &request,
                                      OptionElementVector &opt_element_vector,
                                      CommandInterpreter &interpreter) {
-  request.SetWordComplete(true);
-
   // For now we just scan the completions to see if the cursor position is in
   // an option or its argument.  Otherwise we'll call HandleArgumentCompletion.
   // In the future we can use completion to validate options as well if we
@@ -654,12 +652,11 @@
 
   auto opt_defs = GetDefinitions();
 
-  std::string cur_opt_std_str = request.GetCursorArgumentPrefix().str();
-  const char *cur_opt_str = cur_opt_std_str.c_str();
+  llvm::StringRef cur_opt_str = request.GetCursorArgumentPrefix();
 
   for (size_t i = 0; i < opt_element_vector.size(); i++) {
-    int opt_pos = opt_element_vector[i].opt_pos;
-    int opt_arg_pos = opt_element_vector[i].opt_arg_pos;
+    size_t opt_pos = static_cast<size_t>(opt_element_vector[i].opt_pos);
+    size_t opt_arg_pos = static_cast<size_t>(opt_element_vector[i].opt_arg_pos);
     int opt_defs_index = opt_element_vector[i].opt_defs_index;
     if (opt_pos == request.GetCursorIndex()) {
       // We're completing the option itself.
@@ -669,13 +666,13 @@
         // FIXME: We should scan the other options provided and only complete
         // options
         // within the option group they belong to.
-        char opt_str[3] = {'-', 'a', '\0'};
+        std::string opt_str = "-a";
 
         for (auto &def : opt_defs) {
           if (!def.short_option)
             continue;
           opt_str[1] = def.short_option;
-          request.AddCompletion(opt_str);
+          request.AddCompletion(opt_str, def.usage_text);
         }
 
         return true;
@@ -687,7 +684,7 @@
 
           full_name.erase(full_name.begin() + 2, full_name.end());
           full_name.append(def.long_option);
-          request.AddCompletion(full_name.c_str());
+          request.AddCompletion(full_name, def.usage_text);
         }
         return true;
       } else if (opt_defs_index != OptionArgElement::eUnrecognizedArg) {
@@ -695,17 +692,14 @@
         // anyway (getopt_long_only is happy with shortest unique string, but
         // it's still a nice thing to do.)  Otherwise return The string so the
         // upper level code will know this is a full match and add the " ".
-        if (cur_opt_str && strlen(cur_opt_str) > 2 && cur_opt_str[0] == '-' &&
-            cur_opt_str[1] == '-' &&
-            strcmp(opt_defs[opt_defs_index].long_option, cur_opt_str) != 0) {
-          std::string full_name("--");
-          full_name.append(opt_defs[opt_defs_index].long_option);
-          request.AddCompletion(full_name.c_str());
+        const OptionDefinition &opt = opt_defs[opt_defs_index];
+        llvm::StringRef long_option = opt.long_option;
+        if (cur_opt_str.startswith("--") && cur_opt_str != long_option) {
+          request.AddCompletion("--" + long_option.str(), opt.usage_text);
           return true;
-        } else {
-          request.AddCompletion(request.GetCursorArgument());
-          return true;
-        }
+        } else
+          request.AddCompletion(request.GetCursorArgumentPrefix());
+        return true;
       } else {
         // FIXME - not handling wrong options yet:
         // Check to see if they are writing a long option & complete it.
@@ -713,18 +707,11 @@
         // elements
         // that are not unique up to this point.  getopt_long_only does
         // shortest unique match for long options already.
-
-        if (cur_opt_str && strlen(cur_opt_str) > 2 && cur_opt_str[0] == '-' &&
-            cur_opt_str[1] == '-') {
+        if (cur_opt_str.consume_front("--")) {
           for (auto &def : opt_defs) {
-            if (!def.long_option)
-              continue;
-
-            if (strstr(def.long_option, cur_opt_str + 2) == def.long_option) {
-              std::string full_name("--");
-              full_name.append(def.long_option);
-              request.AddCompletion(full_name.c_str());
-            }
+            llvm::StringRef long_option(def.long_option);
+            if (long_option.startswith(cur_opt_str))
+              request.AddCompletion("--" + long_option.str(), def.usage_text);
           }
         }
         return true;
@@ -733,13 +720,9 @@
     } else if (opt_arg_pos == request.GetCursorIndex()) {
       // Okay the cursor is on the completion of an argument. See if it has a
       // completion, otherwise return no matches.
-
-      CompletionRequest subrequest = request;
-      subrequest.SetCursorCharPosition(subrequest.GetCursorArgument().size());
       if (opt_defs_index != -1) {
-        HandleOptionArgumentCompletion(subrequest, opt_element_vector, i,
+        HandleOptionArgumentCompletion(request, opt_element_vector, i,
                                        interpreter);
-        request.SetWordComplete(subrequest.GetWordComplete());
         return true;
       } else {
         // No completion callback means no completions...
@@ -754,34 +737,20 @@
   return false;
 }
 
-bool Options::HandleOptionArgumentCompletion(
+void Options::HandleOptionArgumentCompletion(
     CompletionRequest &request, OptionElementVector &opt_element_vector,
     int opt_element_index, CommandInterpreter &interpreter) {
   auto opt_defs = GetDefinitions();
   std::unique_ptr<SearchFilter> filter_up;
 
-  int opt_arg_pos = opt_element_vector[opt_element_index].opt_arg_pos;
   int opt_defs_index = opt_element_vector[opt_element_index].opt_defs_index;
 
   // See if this is an enumeration type option, and if so complete it here:
 
   const auto &enum_values = opt_defs[opt_defs_index].enum_values;
-  if (!enum_values.empty()) {
-    bool return_value = false;
-    std::string match_string(
-        request.GetParsedLine().GetArgumentAtIndex(opt_arg_pos),
-        request.GetParsedLine().GetArgumentAtIndex(opt_arg_pos) +
-            request.GetCursorCharPosition());
-
-    for (const auto &enum_value : enum_values) {
-      if (strstr(enum_value.string_value, match_string.c_str()) ==
-          enum_value.string_value) {
-        request.AddCompletion(enum_value.string_value);
-        return_value = true;
-      }
-    }
-    return return_value;
-  }
+  if (!enum_values.empty())
+    for (const auto &enum_value : enum_values)
+      request.TryCompleteCurrentArg(enum_value.string_value);
 
   // If this is a source file or symbol type completion, and  there is a -shlib
   // option somewhere in the supplied arguments, then make a search filter for
@@ -836,7 +805,7 @@
     }
   }
 
-  return CommandCompletions::InvokeCommonCompletionCallbacks(
+  CommandCompletions::InvokeCommonCompletionCallbacks(
       interpreter, completion_mask, request, filter_up.get());
 }
 
@@ -954,7 +923,7 @@
   for (const char *arg : parsed) {
     auto pos = FindOriginalIter(arg, original);
     assert(pos != original.end());
-    result.AppendArgument(pos->ref, pos->quote);
+    result.AppendArgument(pos->ref(), pos->GetQuoteChar());
   }
   return result;
 }
@@ -965,8 +934,8 @@
   std::string long_opt =
       llvm::formatv("--{0}", long_option.definition->long_option);
   for (const auto &entry : llvm::enumerate(args)) {
-    if (entry.value().ref.startswith(short_opt) ||
-        entry.value().ref.startswith(long_opt))
+    if (entry.value().ref().startswith(short_opt) ||
+        entry.value().ref().startswith(long_opt))
       return entry.index();
   }
 
@@ -1092,8 +1061,8 @@
     }
     if (!option_arg)
       option_arg = "<no-argument>";
-    option_arg_vector->emplace_back(option_str.GetString(), has_arg,
-                                    option_arg);
+    option_arg_vector->emplace_back(std::string(option_str.GetString()),
+                                    has_arg, std::string(option_arg));
 
     // Find option in the argument list; also see if it was supposed to take an
     // argument and if one was supplied.  Remove option (and argument, if
@@ -1105,7 +1074,7 @@
       continue;
 
     if (!input_line.empty()) {
-      auto tmp_arg = args_copy[idx].ref;
+      auto tmp_arg = args_copy[idx].ref();
       size_t pos = input_line.find(tmp_arg);
       if (pos != std::string::npos)
         input_line.erase(pos, tmp_arg.size());
@@ -1115,9 +1084,9 @@
          OptionParser::eNoArgument) &&
         (OptionParser::GetOptionArgument() != nullptr) &&
         (idx < args_copy.GetArgumentCount()) &&
-        (args_copy[idx].ref == OptionParser::GetOptionArgument())) {
+        (args_copy[idx].ref() == OptionParser::GetOptionArgument())) {
       if (input_line.size() > 0) {
-        auto tmp_arg = args_copy[idx].ref;
+        auto tmp_arg = args_copy[idx].ref();
         size_t pos = input_line.find(tmp_arg);
         if (pos != std::string::npos)
           input_line.erase(pos, tmp_arg.size());
@@ -1308,7 +1277,7 @@
   const Args::ArgEntry &cursor = args[cursor_index];
   if ((static_cast<int32_t>(dash_dash_pos) == -1 ||
        cursor_index < dash_dash_pos) &&
-      !cursor.IsQuoted() && cursor.ref == "-") {
+      !cursor.IsQuoted() && cursor.ref() == "-") {
     option_element_vector.push_back(
         OptionArgElement(OptionArgElement::eBareDash, cursor_index,
                          OptionArgElement::eBareDash));
@@ -1411,6 +1380,10 @@
                                ? nullptr
                                : OptionParser::GetOptionArgument(),
                            execution_context);
+      // If the Option setting returned an error, we should stop parsing
+      // and return the error.
+      if (error.Fail())
+        break;      
     } else {
       error.SetErrorStringWithFormat("invalid option with value '%i'", val);
     }
diff --git a/src/llvm-project/lldb/source/Interpreter/Property.cpp b/src/llvm-project/lldb/source/Interpreter/Property.cpp
index 7820931..a810983 100644
--- a/src/llvm-project/lldb/source/Interpreter/Property.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/Property.cpp
@@ -292,8 +292,7 @@
   }
 }
 
-void Property::SetValueChangedCallback(OptionValueChangedCallback callback,
-                                       void *baton) {
+void Property::SetValueChangedCallback(std::function<void()> callback) {
   if (m_value_sp)
-    m_value_sp->SetValueChangedCallback(callback, baton);
+    m_value_sp->SetValueChangedCallback(std::move(callback));
 }
diff --git a/src/llvm-project/lldb/source/Interpreter/ScriptInterpreter.cpp b/src/llvm-project/lldb/source/Interpreter/ScriptInterpreter.cpp
index d04baec..00c4606 100644
--- a/src/llvm-project/lldb/source/Interpreter/ScriptInterpreter.cpp
+++ b/src/llvm-project/lldb/source/Interpreter/ScriptInterpreter.cpp
@@ -32,32 +32,36 @@
     CommandReturnObject &result) {
   result.SetStatus(eReturnStatusFailed);
   result.AppendError(
-      "ScriptInterpreter::GetScriptCommands(StringList &) is not implemented.");
+      "This script interpreter does not support breakpoint callbacks.");
 }
 
 void ScriptInterpreter::CollectDataForWatchpointCommandCallback(
     WatchpointOptions *bp_options, CommandReturnObject &result) {
   result.SetStatus(eReturnStatusFailed);
   result.AppendError(
-      "ScriptInterpreter::GetScriptCommands(StringList &) is not implemented.");
+      "This script interpreter does not support watchpoint callbacks.");
+}
+
+bool ScriptInterpreter::LoadScriptingModule(
+    const char *filename, bool init_session, lldb_private::Status &error,
+    StructuredData::ObjectSP *module_sp) {
+  error.SetErrorString(
+      "This script interpreter does not support importing modules.");
+  return false;
 }
 
 std::string ScriptInterpreter::LanguageToString(lldb::ScriptLanguage language) {
-  std::string return_value;
-
   switch (language) {
   case eScriptLanguageNone:
-    return_value = "None";
-    break;
+    return "None";
   case eScriptLanguagePython:
-    return_value = "Python";
-    break;
+    return "Python";
+  case eScriptLanguageLua:
+    return "Lua";
   case eScriptLanguageUnknown:
-    return_value = "Unknown";
-    break;
+    return "Unknown";
   }
-
-  return return_value;
+  llvm_unreachable("Unhandled ScriptInterpreter!");
 }
 
 lldb::ScriptLanguage
@@ -66,6 +70,8 @@
     return eScriptLanguageNone;
   if (language.equals_lower(LanguageToString(eScriptLanguagePython)))
     return eScriptLanguagePython;
+  if (language.equals_lower(LanguageToString(eScriptLanguageLua)))
+    return eScriptLanguageLua;
   return eScriptLanguageUnknown;
 }
 
@@ -81,12 +87,17 @@
   return return_error;
 }
 
-void ScriptInterpreter::SetBreakpointCommandCallbackFunction(
-    std::vector<BreakpointOptions *> &bp_options_vec,
-    const char *function_name) {
+Status ScriptInterpreter::SetBreakpointCommandCallbackFunction(
+    std::vector<BreakpointOptions *> &bp_options_vec, const char *function_name,
+    StructuredData::ObjectSP extra_args_sp) {
+  Status error;
   for (BreakpointOptions *bp_options : bp_options_vec) {
-    SetBreakpointCommandCallbackFunction(bp_options, function_name);
+    error = SetBreakpointCommandCallbackFunction(bp_options, function_name,
+                                                 extra_args_sp);
+    if (!error.Success())
+      return error;
   }
+  return error;
 }
 
 std::unique_ptr<ScriptInterpreterLocker>
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/ABI/CMakeLists.txt
index c88affd..37a5447 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/ABI/CMakeLists.txt
@@ -1,14 +1,31 @@
-add_subdirectory(SysV-arm)
-add_subdirectory(SysV-arm64)
-add_subdirectory(SysV-hexagon)
-add_subdirectory(SysV-ppc)
-add_subdirectory(SysV-ppc64)
-add_subdirectory(SysV-mips)
-add_subdirectory(SysV-mips64)
-add_subdirectory(SysV-s390x)
-add_subdirectory(SysV-i386)
-add_subdirectory(SysV-x86_64)
-add_subdirectory(MacOSX-i386)
-add_subdirectory(MacOSX-arm)
-add_subdirectory(MacOSX-arm64)
-add_subdirectory(Windows-x86_64)
+if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD)
+  add_subdirectory(MacOSX-arm64)
+  add_subdirectory(SysV-arm64)
+endif()
+if ("ARM" IN_LIST LLVM_TARGETS_TO_BUILD)
+  add_subdirectory(MacOSX-arm)
+  add_subdirectory(SysV-arm)
+endif()
+if ("ARC" IN_LIST LLVM_TARGETS_TO_BUILD)
+  add_subdirectory(SysV-arc)
+endif()
+if ("Hexagon" IN_LIST LLVM_TARGETS_TO_BUILD)
+  add_subdirectory(SysV-hexagon)
+endif()
+if ("Mips" IN_LIST LLVM_TARGETS_TO_BUILD)
+  add_subdirectory(SysV-mips)
+  add_subdirectory(SysV-mips64)
+endif()
+if ("PowerPC" IN_LIST LLVM_TARGETS_TO_BUILD)
+  add_subdirectory(SysV-ppc)
+  add_subdirectory(SysV-ppc64)
+endif()
+if ("SystemZ" IN_LIST LLVM_TARGETS_TO_BUILD)
+  add_subdirectory(SysV-s390x)
+endif()
+if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD)
+  add_subdirectory(SysV-i386)
+  add_subdirectory(SysV-x86_64)
+  add_subdirectory(MacOSX-i386)
+  add_subdirectory(Windows-x86_64)
+endif()
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
index 362a80b..9dff12b 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp
@@ -1326,7 +1326,8 @@
   if (vendor_type == llvm::Triple::Apple) {
     if ((arch_type == llvm::Triple::arm) ||
         (arch_type == llvm::Triple::thumb)) {
-      return ABISP(new ABIMacOSX_arm(process_sp));
+      return ABISP(
+          new ABIMacOSX_arm(std::move(process_sp), MakeMCRegisterInfo(arch)));
     }
   }
 
@@ -1846,6 +1847,7 @@
   unwind_plan.SetSourceName("arm-apple-ios default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
 
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
index ac9ba00..e512651 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h
@@ -85,7 +85,9 @@
                            lldb_private::CompilerType &ast_type) const override;
 
 private:
-  ABIMacOSX_arm(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABIMacOSX_arm(lldb::ProcessSP process_sp,
+                std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
index 368e372..ec7588d 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp
@@ -1665,8 +1665,10 @@
   const llvm::Triple::VendorType vendor_type = arch.GetTriple().getVendor();
 
   if (vendor_type == llvm::Triple::Apple) {
-    if (arch_type == llvm::Triple::aarch64) {
-      return ABISP(new ABIMacOSX_arm64(process_sp));
+    if (arch_type == llvm::Triple::aarch64 || 
+        arch_type == llvm::Triple::aarch64_32) {
+      return ABISP(
+          new ABIMacOSX_arm64(std::move(process_sp), MakeMCRegisterInfo(arch)));
     }
   }
 
@@ -1710,9 +1712,8 @@
   for (size_t i = 0; i < args.size(); ++i) {
     const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
         eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + i);
-    if (log)
-      log->Printf("About to write arg%d (0x%" PRIx64 ") into %s",
-                  static_cast<int>(i + 1), args[i], reg_info->name);
+    LLDB_LOGF(log, "About to write arg%d (0x%" PRIx64 ") into %s",
+              static_cast<int>(i + 1), args[i], reg_info->name);
     if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
       return false;
   }
@@ -2011,6 +2012,7 @@
   unwind_plan.SetSourceName("arm64-apple-darwin default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   return true;
 }
 
@@ -2018,6 +2020,8 @@
 // registers x19 through x28 and sp are callee preserved. v8-v15 are non-
 // volatile (and specifically only the lower 8 bytes of these regs), the rest
 // of the fp/SIMD registers are volatile.
+//
+// v. https://github.com/ARM-software/software-standards/blob/master/abi/aapcs64/
 
 // We treat x29 as callee preserved also, else the unwinder won't try to
 // retrieve fp saves.
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h
index bfacbcd..c7a91ba 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h
@@ -93,7 +93,9 @@
                            lldb_private::CompilerType &ast_type) const override;
 
 private:
-  ABIMacOSX_arm64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABIMacOSX_arm64(lldb::ProcessSP process_sp,
+                  std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
index 67371b4..76ebd64 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp
@@ -710,7 +710,8 @@
   if ((arch.GetTriple().getArch() == llvm::Triple::x86) &&
       (arch.GetTriple().isMacOSX() || arch.GetTriple().isiOS() ||
        arch.GetTriple().isWatchOS())) {
-    return ABISP(new ABIMacOSX_i386(process_sp));
+    return ABISP(
+        new ABIMacOSX_i386(std::move(process_sp), MakeMCRegisterInfo(arch)));
   }
   return ABISP();
 }
@@ -1055,6 +1056,7 @@
   unwind_plan.SetSourceName("i386 default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   return true;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h
index 57def68..50062b8 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h
@@ -92,7 +92,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABIMacOSX_i386(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABIMacOSX_i386(lldb::ProcessSP process_sp,
+                 std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.cpp
new file mode 100644
index 0000000..715b5e5
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.cpp
@@ -0,0 +1,614 @@
+//===-- ABISysV_arc.cpp ---------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "ABISysV_arc.h"
+
+// C Includes
+// C++ Includes
+#include <array>
+#include <limits>
+#include <type_traits>
+
+// Other libraries and framework includes
+#include "llvm/ADT/Triple.h"
+#include "llvm/IR/DerivedTypes.h"
+#include "llvm/Support/MathExtras.h"
+
+#include "lldb/Core/Module.h"
+#include "lldb/Core/PluginManager.h"
+#include "lldb/Core/Value.h"
+#include "lldb/Core/ValueObjectConstResult.h"
+#include "lldb/Core/ValueObjectMemory.h"
+#include "lldb/Core/ValueObjectRegister.h"
+#include "lldb/Symbol/UnwindPlan.h"
+#include "lldb/Target/Process.h"
+#include "lldb/Target/RegisterContext.h"
+#include "lldb/Target/StackFrame.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Target/Thread.h"
+#include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "lldb/Utility/Status.h"
+
+#define DEFINE_REG_NAME(reg_num)      ConstString(#reg_num).GetCString()
+#define DEFINE_REG_NAME_STR(reg_name) ConstString(reg_name).GetCString()
+
+// The ABI is not a source of such information as size, offset, encoding, etc.
+// of a register. Just provides correct dwarf and eh_frame numbers.
+
+#define DEFINE_GENERIC_REGISTER_STUB(dwarf_num, str_name, generic_num)        \
+  {                                                                           \
+    DEFINE_REG_NAME(dwarf_num), DEFINE_REG_NAME_STR(str_name),                \
+    0, 0, eEncodingInvalid, eFormatDefault,                                   \
+    { dwarf_num, dwarf_num, generic_num, LLDB_INVALID_REGNUM, dwarf_num },    \
+    nullptr, nullptr, nullptr, 0                                              \
+  }
+
+#define DEFINE_REGISTER_STUB(dwarf_num, str_name) \
+  DEFINE_GENERIC_REGISTER_STUB(dwarf_num, str_name, LLDB_INVALID_REGNUM)
+
+using namespace lldb;
+using namespace lldb_private;
+
+namespace {
+namespace dwarf {
+enum regnums {
+  r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15, r16,
+  r17, r18, r19, r20, r21, r22, r23, r24, r25, r26,
+  r27, fp = r27, r28, sp = r28, r29, r30, r31, blink = r31,
+  r32, r33, r34, r35, r36, r37, r38, r39, r40, r41, r42, r43, r44, r45, r46,
+  r47, r48, r49, r50, r51, r52, r53, r54, r55, r56, r57, r58, r59, r60,
+  /*reserved,*/ /*limm indicator,*/ r63 = 63, pc = 70, status32 = 74
+};
+
+static const std::array<RegisterInfo, 64> g_register_infos = { {
+    DEFINE_GENERIC_REGISTER_STUB(r0, nullptr, LLDB_REGNUM_GENERIC_ARG1),
+    DEFINE_GENERIC_REGISTER_STUB(r1, nullptr, LLDB_REGNUM_GENERIC_ARG2),
+    DEFINE_GENERIC_REGISTER_STUB(r2, nullptr, LLDB_REGNUM_GENERIC_ARG3),
+    DEFINE_GENERIC_REGISTER_STUB(r3, nullptr, LLDB_REGNUM_GENERIC_ARG4),
+    DEFINE_GENERIC_REGISTER_STUB(r4, nullptr, LLDB_REGNUM_GENERIC_ARG5),
+    DEFINE_GENERIC_REGISTER_STUB(r5, nullptr, LLDB_REGNUM_GENERIC_ARG6),
+    DEFINE_GENERIC_REGISTER_STUB(r6, nullptr, LLDB_REGNUM_GENERIC_ARG7),
+    DEFINE_GENERIC_REGISTER_STUB(r7, nullptr, LLDB_REGNUM_GENERIC_ARG8),
+    DEFINE_REGISTER_STUB(r8, nullptr),
+    DEFINE_REGISTER_STUB(r9, nullptr),
+    DEFINE_REGISTER_STUB(r10, nullptr),
+    DEFINE_REGISTER_STUB(r11, nullptr),
+    DEFINE_REGISTER_STUB(r12, nullptr),
+    DEFINE_REGISTER_STUB(r13, nullptr),
+    DEFINE_REGISTER_STUB(r14, nullptr),
+    DEFINE_REGISTER_STUB(r15, nullptr),
+    DEFINE_REGISTER_STUB(r16, nullptr),
+    DEFINE_REGISTER_STUB(r17, nullptr),
+    DEFINE_REGISTER_STUB(r18, nullptr),
+    DEFINE_REGISTER_STUB(r19, nullptr),
+    DEFINE_REGISTER_STUB(r20, nullptr),
+    DEFINE_REGISTER_STUB(r21, nullptr),
+    DEFINE_REGISTER_STUB(r22, nullptr),
+    DEFINE_REGISTER_STUB(r23, nullptr),
+    DEFINE_REGISTER_STUB(r24, nullptr),
+    DEFINE_REGISTER_STUB(r25, nullptr),
+    DEFINE_REGISTER_STUB(r26, "gp"),
+    DEFINE_GENERIC_REGISTER_STUB(r27, "fp", LLDB_REGNUM_GENERIC_FP),
+    DEFINE_GENERIC_REGISTER_STUB(r28, "sp", LLDB_REGNUM_GENERIC_SP),
+    DEFINE_REGISTER_STUB(r29, "ilink"),
+    DEFINE_REGISTER_STUB(r30, nullptr),
+    DEFINE_GENERIC_REGISTER_STUB(r31, "blink", LLDB_REGNUM_GENERIC_RA),
+    DEFINE_REGISTER_STUB(r32, nullptr),
+    DEFINE_REGISTER_STUB(r33, nullptr),
+    DEFINE_REGISTER_STUB(r34, nullptr),
+    DEFINE_REGISTER_STUB(r35, nullptr),
+    DEFINE_REGISTER_STUB(r36, nullptr),
+    DEFINE_REGISTER_STUB(r37, nullptr),
+    DEFINE_REGISTER_STUB(r38, nullptr),
+    DEFINE_REGISTER_STUB(r39, nullptr),
+    DEFINE_REGISTER_STUB(r40, nullptr),
+    DEFINE_REGISTER_STUB(r41, nullptr),
+    DEFINE_REGISTER_STUB(r42, nullptr),
+    DEFINE_REGISTER_STUB(r43, nullptr),
+    DEFINE_REGISTER_STUB(r44, nullptr),
+    DEFINE_REGISTER_STUB(r45, nullptr),
+    DEFINE_REGISTER_STUB(r46, nullptr),
+    DEFINE_REGISTER_STUB(r47, nullptr),
+    DEFINE_REGISTER_STUB(r48, nullptr),
+    DEFINE_REGISTER_STUB(r49, nullptr),
+    DEFINE_REGISTER_STUB(r50, nullptr),
+    DEFINE_REGISTER_STUB(r51, nullptr),
+    DEFINE_REGISTER_STUB(r52, nullptr),
+    DEFINE_REGISTER_STUB(r53, nullptr),
+    DEFINE_REGISTER_STUB(r54, nullptr),
+    DEFINE_REGISTER_STUB(r55, nullptr),
+    DEFINE_REGISTER_STUB(r56, nullptr),
+    DEFINE_REGISTER_STUB(r57, nullptr),
+    DEFINE_REGISTER_STUB(r58, "accl"),
+    DEFINE_REGISTER_STUB(r59, "acch"),
+    DEFINE_REGISTER_STUB(r60, "lp_count"),
+    DEFINE_REGISTER_STUB(r63, "pcl"),
+    DEFINE_GENERIC_REGISTER_STUB(pc, nullptr, LLDB_REGNUM_GENERIC_PC),
+    DEFINE_GENERIC_REGISTER_STUB(status32, nullptr, LLDB_REGNUM_GENERIC_FLAGS)} };
+} // namespace dwarf
+} // namespace
+
+const RegisterInfo *ABISysV_arc::GetRegisterInfoArray(uint32_t &count) {
+  count = dwarf::g_register_infos.size();
+  return dwarf::g_register_infos.data();
+}
+
+size_t ABISysV_arc::GetRedZoneSize() const { return 0; }
+
+bool ABISysV_arc::IsRegisterFileReduced(RegisterContext &reg_ctx) const {
+  if (!m_is_reg_file_reduced) {
+    const auto *const rf_build_reg = reg_ctx.GetRegisterInfoByName("rf_build");
+    
+    const auto reg_value = reg_ctx.ReadRegisterAsUnsigned(rf_build_reg,
+                                                          /*fail_value*/ 0);
+    // RF_BUILD "Number of Entries" bit.
+    const uint32_t rf_entries_bit = 1U << 9U;
+    m_is_reg_file_reduced = (reg_value | rf_entries_bit) != 0;
+  }
+
+  return m_is_reg_file_reduced.getValueOr(false);
+}
+
+//------------------------------------------------------------------
+// Static Functions
+//------------------------------------------------------------------
+
+ABISP ABISysV_arc::CreateInstance(ProcessSP process_sp, const ArchSpec &arch) {
+  return llvm::Triple::arc == arch.GetTriple().getArch() ?
+      ABISP(new ABISysV_arc(std::move(process_sp), MakeMCRegisterInfo(arch))) :
+      ABISP();
+}
+
+namespace {
+const size_t word_size = 4U;
+const size_t reg_size = word_size;
+
+inline size_t AugmentArgSize(size_t size_in_bytes) {
+  return llvm::alignTo(size_in_bytes, word_size);
+}
+
+size_t TotalArgsSizeInWords(const llvm::ArrayRef<ABI::CallArgument> &args) {
+  size_t total_size = 0;
+  for (const auto &arg : args)
+    total_size +=
+        (ABI::CallArgument::TargetValue == arg.type ? AugmentArgSize(arg.size)
+                                                    : reg_size) /
+        word_size;
+
+  return total_size;
+}
+} // namespace
+
+bool ABISysV_arc::PrepareTrivialCall(Thread &thread, addr_t sp,
+                                     addr_t func_addr, addr_t return_addr,
+                                     llvm::ArrayRef<addr_t> args) const {
+  // We don't use the traditional trivial call specialized for jit.
+  return false;
+}
+
+bool ABISysV_arc::PrepareTrivialCall(Thread &thread, addr_t sp, addr_t pc,
+    addr_t ra, llvm::Type &prototype,
+    llvm::ArrayRef<ABI::CallArgument> args) const {
+  auto reg_ctx = thread.GetRegisterContext();
+  if (!reg_ctx)
+    return false;
+
+  uint32_t pc_reg = reg_ctx->ConvertRegisterKindToRegisterNumber(
+      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_PC);
+  if (pc_reg == LLDB_INVALID_REGNUM)
+    return false;
+
+  uint32_t ra_reg = reg_ctx->ConvertRegisterKindToRegisterNumber(
+      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_RA);
+  if (ra_reg == LLDB_INVALID_REGNUM)
+    return false;
+
+  uint32_t sp_reg = reg_ctx->ConvertRegisterKindToRegisterNumber(
+      eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP);
+  if (sp_reg == LLDB_INVALID_REGNUM)
+    return false;
+
+  Status error;
+  ProcessSP process = thread.GetProcess();
+  if (!process)
+    return false;
+
+  // Push host data onto target.
+  for (const auto &arg : args) {
+    // Skip over target values.
+    if (arg.type == ABI::CallArgument::TargetValue)
+      continue;
+
+    // Create space on the stack for this data 4-byte aligned.
+    sp -= AugmentArgSize(arg.size);
+
+    if (process->WriteMemory(sp, arg.data_up.get(), arg.size, error) < arg.size
+        || error.Fail())
+      return false;
+
+    // Update the argument with the target pointer.
+    *const_cast<addr_t *>(&arg.value) = sp;
+  }
+
+  // Make sure number of parameters matches prototype.
+  assert(!prototype.isFunctionVarArg());
+  assert(prototype.getFunctionNumParams() == args.size());
+  
+  const size_t regs_for_args_count = IsRegisterFileReduced(*reg_ctx) ? 4U : 8U;
+
+  // Number of arguments passed on stack.
+  auto args_size = TotalArgsSizeInWords(args);
+  auto on_stack =
+      args_size <= regs_for_args_count ? 0 : args_size - regs_for_args_count;
+  auto offset = on_stack * word_size;
+
+  uint8_t reg_value[reg_size];
+  size_t reg_index = LLDB_REGNUM_GENERIC_ARG1;
+
+  for (const auto &arg : args) {
+    auto value = reinterpret_cast<const uint8_t *>(&arg.value);
+    auto size =
+        ABI::CallArgument::TargetValue == arg.type ? arg.size : reg_size;
+
+    // Pass arguments via registers.
+    while (size > 0 && reg_index < regs_for_args_count) {
+      size_t byte_index = 0;
+      auto end = size < reg_size ? size : reg_size;
+
+      while (byte_index < end) {
+        reg_value[byte_index++] = *(value++);
+        --size;
+      }
+
+      while (byte_index < reg_size) {
+        reg_value[byte_index++] = 0;
+      }
+
+      RegisterValue reg_val_obj(reg_value, reg_size, eByteOrderLittle);
+      if (!reg_ctx->WriteRegister(
+            reg_ctx->GetRegisterInfo(eRegisterKindGeneric, reg_index),
+            reg_val_obj))
+        return false;
+
+      // NOTE: It's unsafe to iterate through LLDB_REGNUM_GENERICs.
+      ++reg_index;
+    }
+
+    if (reg_index < regs_for_args_count || size == 0)
+      continue;
+
+    // Remaining arguments are passed on the stack.
+    if (process->WriteMemory(sp - offset, value, size, error) < size ||
+        !error.Success())
+      return false;
+
+    offset -= AugmentArgSize(size);
+  }
+
+  // Set stack pointer immediately below arguments.
+  sp -= on_stack * word_size;
+
+  // Update registers with current function call state.
+  reg_ctx->WriteRegisterFromUnsigned(pc_reg, pc);
+  reg_ctx->WriteRegisterFromUnsigned(ra_reg, ra);
+  reg_ctx->WriteRegisterFromUnsigned(sp_reg, sp);
+
+  return true;
+}
+
+bool ABISysV_arc::GetArgumentValues(Thread &thread, ValueList &values) const {
+  return false;
+}
+
+Status ABISysV_arc::SetReturnValueObject(StackFrameSP &frame_sp,
+                                         ValueObjectSP &new_value_sp) {
+  Status result;
+  if (!new_value_sp) {
+    result.SetErrorString("Empty value object for return value.");
+    return result;
+  }
+
+  CompilerType compiler_type = new_value_sp->GetCompilerType();
+  if (!compiler_type) {
+    result.SetErrorString("Null clang type for return value.");
+    return result;
+  }
+
+  auto &reg_ctx = *frame_sp->GetThread()->GetRegisterContext();
+
+  bool is_signed = false;
+  if (!compiler_type.IsIntegerOrEnumerationType(is_signed) &&
+      !compiler_type.IsPointerType()) {
+    result.SetErrorString("We don't support returning other types at present");
+    return result;
+  }
+
+  DataExtractor data;
+  size_t num_bytes = new_value_sp->GetData(data, result);
+
+  if (result.Fail()) {
+    result.SetErrorStringWithFormat(
+        "Couldn't convert return value to raw data: %s", result.AsCString());
+    return result;
+  }
+
+  if (num_bytes <= 2 * reg_size) {
+    offset_t offset = 0;
+    uint64_t raw_value = data.GetMaxU64(&offset, num_bytes);
+
+    auto reg_info =
+        reg_ctx.GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
+    if (!reg_ctx.WriteRegisterFromUnsigned(reg_info, raw_value)) {
+      result.SetErrorStringWithFormat("Couldn't write value to register %s",
+                                      reg_info->name);
+      return result;
+    }
+
+    if (num_bytes <= reg_size)
+      return result; // Successfully written.
+
+    raw_value >>= 32;
+    reg_info =
+        reg_ctx.GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG2);
+    if (!reg_ctx.WriteRegisterFromUnsigned(reg_info, raw_value)) {
+      result.SetErrorStringWithFormat("Couldn't write value to register %s",
+                                      reg_info->name);
+    }
+
+    return result;
+  }
+
+  result.SetErrorString(
+      "We don't support returning large integer values at present.");
+  return result;
+}
+
+namespace {
+template <typename T>
+void SetInteger(Scalar &scalar, uint64_t raw_value, bool is_signed) {
+  raw_value &= std::numeric_limits<T>::max();
+  if (is_signed)
+    scalar = static_cast<typename std::make_signed<T>::type>(raw_value);
+  else
+    scalar = static_cast<T>(raw_value);
+}
+
+bool SetSizedInteger(Scalar &scalar, uint64_t raw_value, uint8_t size_in_bytes,
+                     bool is_signed) {
+  switch (size_in_bytes) {
+  default:
+    return false;
+
+  case sizeof(uint64_t):
+    SetInteger<uint64_t>(scalar, raw_value, is_signed);
+    break;
+
+  case sizeof(uint32_t):
+    SetInteger<uint32_t>(scalar, raw_value, is_signed);
+    break;
+
+  case sizeof(uint16_t):
+    SetInteger<uint16_t>(scalar, raw_value, is_signed);
+    break;
+
+  case sizeof(uint8_t):
+    SetInteger<uint8_t>(scalar, raw_value, is_signed);
+    break;
+  }
+
+  return true;
+}
+
+bool SetSizedFloat(Scalar &scalar, uint64_t raw_value, uint8_t size_in_bytes) {
+  switch (size_in_bytes) {
+  default:
+    return false;
+
+  case sizeof(uint64_t):
+    scalar = *reinterpret_cast<double *>(&raw_value);
+    break;
+
+  case sizeof(uint32_t):
+    scalar = *reinterpret_cast<float *>(&raw_value);
+    break;
+  }
+
+  return true;
+}
+
+uint64_t ReadRawValue(const RegisterContextSP &reg_ctx, uint8_t size_in_bytes) {
+  auto reg_info_r0 =
+      reg_ctx->GetRegisterInfo(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1);
+
+  // Extract the register context so we can read arguments from registers.
+  uint64_t raw_value =
+      reg_ctx->ReadRegisterAsUnsigned(reg_info_r0, 0) & UINT32_MAX;
+
+  if (sizeof(uint64_t) == size_in_bytes)
+    raw_value |= (reg_ctx->ReadRegisterAsUnsigned(
+                      reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
+                                               LLDB_REGNUM_GENERIC_ARG2), 0) &
+                  UINT64_MAX) << 32U;
+
+  return raw_value;
+}
+} // namespace
+
+ValueObjectSP
+ABISysV_arc::GetReturnValueObjectSimple(Thread &thread,
+                                        CompilerType &compiler_type) const {
+  if (!compiler_type)
+    return ValueObjectSP();
+
+  auto reg_ctx = thread.GetRegisterContext();
+  if (!reg_ctx)
+    return ValueObjectSP();
+
+  Value value;
+  value.SetCompilerType(compiler_type);
+
+  const uint32_t type_flags = compiler_type.GetTypeInfo();
+  // Integer return type.
+  if (type_flags & eTypeIsInteger) {
+    const size_t byte_size = compiler_type.GetByteSize(nullptr).getValueOr(0);
+    auto raw_value = ReadRawValue(reg_ctx, byte_size);
+
+    const bool is_signed = (type_flags & eTypeIsSigned) != 0;
+    if (!SetSizedInteger(value.GetScalar(), raw_value, byte_size, is_signed))
+      return ValueObjectSP();
+
+    value.SetValueType(Value::eValueTypeScalar);
+  }
+  // Pointer return type.
+  else if (type_flags & eTypeIsPointer) {
+    auto reg_info_r0 = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
+                                                LLDB_REGNUM_GENERIC_ARG1);
+    value.GetScalar() = reg_ctx->ReadRegisterAsUnsigned(reg_info_r0, 0);
+
+    value.SetValueType(Value::eValueTypeScalar);
+  }
+  // Floating point return type.
+  else if (type_flags & eTypeIsFloat) {
+    uint32_t float_count = 0;
+    bool is_complex = false;
+
+    if (compiler_type.IsFloatingPointType(float_count, is_complex) &&
+        1 == float_count && !is_complex) {
+      const size_t byte_size = compiler_type.GetByteSize(nullptr).getValueOr(0);
+      auto raw_value = ReadRawValue(reg_ctx, byte_size);
+
+      if (!SetSizedFloat(value.GetScalar(), raw_value, byte_size))
+        return ValueObjectSP();
+    }
+  }
+  // Unsupported return type.
+  else
+    return ValueObjectSP();
+
+  return ValueObjectConstResult::Create(thread.GetStackFrameAtIndex(0).get(),
+                                        value, ConstString(""));
+}
+
+ValueObjectSP ABISysV_arc::GetReturnValueObjectImpl(
+    Thread &thread, CompilerType &return_compiler_type) const {
+  ValueObjectSP return_valobj_sp;
+
+  if (!return_compiler_type)
+    return return_valobj_sp;
+
+  ExecutionContext exe_ctx(thread.shared_from_this());
+  return GetReturnValueObjectSimple(thread, return_compiler_type);
+}
+
+ValueObjectSP ABISysV_arc::GetReturnValueObjectImpl(Thread &thread,
+                                                    llvm::Type &retType) const {
+  auto reg_ctx = thread.GetRegisterContext();
+  if (!reg_ctx)
+    return ValueObjectSP();
+
+  Value value;
+  // Void return type.
+  if (retType.isVoidTy()) {
+    value.GetScalar() = 0;
+  }
+  // Integer return type.
+  else if (retType.isIntegerTy()) {
+    size_t byte_size = retType.getPrimitiveSizeInBits();
+    if (1 != byte_size) // For boolian type.
+      byte_size /= CHAR_BIT;
+
+    auto raw_value = ReadRawValue(reg_ctx, byte_size);
+
+    const bool is_signed = false; // IR Type doesn't provide this info.
+    if (!SetSizedInteger(value.GetScalar(), raw_value, byte_size, is_signed))
+      return ValueObjectSP();
+  }
+  // Pointer return type.
+  else if (retType.isPointerTy()) {
+    auto reg_info_r0 = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
+                                                LLDB_REGNUM_GENERIC_ARG1);
+    value.GetScalar() = reg_ctx->ReadRegisterAsUnsigned(reg_info_r0, 0);
+    value.SetValueType(Value::eValueTypeScalar);
+  }
+  // Floating point return type.
+  else if (retType.isFloatingPointTy()) {
+    const size_t byte_size = retType.getPrimitiveSizeInBits() / CHAR_BIT;
+    auto raw_value = ReadRawValue(reg_ctx, byte_size);
+
+    if (!SetSizedFloat(value.GetScalar(), raw_value, byte_size))
+      return ValueObjectSP();
+  }
+  // Unsupported return type.
+  else
+    return ValueObjectSP();
+
+  return ValueObjectConstResult::Create(thread.GetStackFrameAtIndex(0).get(),
+                                        value, ConstString(""));
+}
+
+bool ABISysV_arc::CreateFunctionEntryUnwindPlan(UnwindPlan &unwind_plan) {
+  unwind_plan.Clear();
+  unwind_plan.SetRegisterKind(eRegisterKindDWARF);
+
+  UnwindPlan::RowSP row(new UnwindPlan::Row);
+
+  // Our Call Frame Address is the stack pointer value.
+  row->GetCFAValue().SetIsRegisterPlusOffset(dwarf::sp, 0);
+
+  // The previous PC is in the BLINK.
+  row->SetRegisterLocationToRegister(dwarf::pc, dwarf::blink, true);
+  unwind_plan.AppendRow(row);
+
+  // All other registers are the same.
+  unwind_plan.SetSourceName("arc at-func-entry default");
+  unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
+
+  return true;
+}
+
+bool ABISysV_arc::CreateDefaultUnwindPlan(UnwindPlan &unwind_plan) {
+  return false;
+}
+
+bool ABISysV_arc::RegisterIsVolatile(const RegisterInfo *reg_info) {
+  if (nullptr == reg_info)
+    return false;
+
+  // Volatile registers are: r0..r12.
+  uint32_t regnum = reg_info->kinds[eRegisterKindDWARF];
+  if (regnum <= 12)
+    return true;
+
+  static const std::string ra_reg_name = "blink";
+  return ra_reg_name == reg_info->name;
+}
+
+void ABISysV_arc::Initialize() {
+  PluginManager::RegisterPlugin(GetPluginNameStatic(),
+                                "System V ABI for ARC targets", CreateInstance);
+}
+
+void ABISysV_arc::Terminate() {
+  PluginManager::UnregisterPlugin(CreateInstance);
+}
+
+ConstString ABISysV_arc::GetPluginNameStatic() {
+  static ConstString g_name("sysv-arc");
+  return g_name;
+}
+
+//------------------------------------------------------------------
+// PluginInterface protocol
+//------------------------------------------------------------------
+
+ConstString ABISysV_arc::GetPluginName() {
+  return GetPluginNameStatic();
+}
+
+uint32_t ABISysV_arc::GetPluginVersion() { return 1; }
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.h
new file mode 100644
index 0000000..c4b26a5
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arc/ABISysV_arc.h
@@ -0,0 +1,106 @@
+//===-- ArchitectureArc.h ---------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_ABISysV_arc_h_
+#define liblldb_ABISysV_arc_h_
+
+// Other libraries and framework includes
+#include <llvm/ADT/Optional.h>
+
+// Project includes
+#include "lldb/Target/ABI.h"
+#include "lldb/lldb-private.h"
+
+class ABISysV_arc : public lldb_private::ABI {
+public:
+  ~ABISysV_arc() override = default;
+
+  size_t GetRedZoneSize() const override;
+
+  bool PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
+                          lldb::addr_t functionAddress,
+                          lldb::addr_t returnAddress,
+                          llvm::ArrayRef<lldb::addr_t> args) const override;
+
+  // Special thread plan for GDB style non-jit function calls.
+  bool
+  PrepareTrivialCall(lldb_private::Thread &thread, lldb::addr_t sp,
+                     lldb::addr_t functionAddress, lldb::addr_t returnAddress,
+                     llvm::Type &prototype,
+                     llvm::ArrayRef<ABI::CallArgument> args) const override;
+
+  bool GetArgumentValues(lldb_private::Thread &thread,
+                         lldb_private::ValueList &values) const override;
+
+  lldb_private::Status
+  SetReturnValueObject(lldb::StackFrameSP &frame_sp,
+                       lldb::ValueObjectSP &new_value) override;
+
+  lldb::ValueObjectSP
+  GetReturnValueObjectImpl(lldb_private::Thread &thread,
+                           lldb_private::CompilerType &type) const override;
+
+  // Specialized to work with llvm IR types.
+  lldb::ValueObjectSP GetReturnValueObjectImpl(lldb_private::Thread &thread,
+                                               llvm::Type &type) const override;
+
+  bool
+  CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
+
+  bool CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override;
+
+  bool RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override;
+
+  bool CallFrameAddressIsValid(lldb::addr_t cfa) override {
+    // Stack call frame address must be 4 byte aligned.
+    return (cfa & 0x3ull) == 0;
+  }
+
+  bool CodeAddressIsValid(lldb::addr_t pc) override {
+    // Code addresse must be 2 byte aligned.
+    return (pc & 1ull) == 0;
+  }
+
+  const lldb_private::RegisterInfo *
+  GetRegisterInfoArray(uint32_t &count) override;
+
+  //------------------------------------------------------------------
+  // Static Functions
+  //------------------------------------------------------------------
+
+  static void Initialize();
+
+  static void Terminate();
+
+  static lldb::ABISP CreateInstance(lldb::ProcessSP process_sp,
+                                    const lldb_private::ArchSpec &arch);
+
+  static lldb_private::ConstString GetPluginNameStatic();
+
+  //------------------------------------------------------------------
+  // PluginInterface protocol
+  //------------------------------------------------------------------
+
+  lldb_private::ConstString GetPluginName() override;
+
+  uint32_t GetPluginVersion() override;
+
+private:
+  lldb::ValueObjectSP
+  GetReturnValueObjectSimple(lldb_private::Thread &thread,
+                             lldb_private::CompilerType &ast_type) const;
+
+  bool IsRegisterFileReduced(lldb_private::RegisterContext &reg_ctx) const;
+
+  using lldb_private::ABI::ABI; // Call CreateInstance instead.
+
+  using RegisterFileFlag = llvm::Optional<bool>;
+  mutable RegisterFileFlag m_is_reg_file_reduced;
+};
+
+#endif // liblldb_ABISysV_arc_h_
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arc/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arc/CMakeLists.txt
new file mode 100644
index 0000000..3dc0d1c
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arc/CMakeLists.txt
@@ -0,0 +1,11 @@
+add_lldb_library(lldbPluginABISysV_arc PLUGIN
+  ABISysV_arc.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbSymbol
+    lldbTarget
+    lldbPluginProcessUtility
+  LINK_COMPONENTS
+    Support
+  )
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
index dd47ac7..b6e8f88 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp
@@ -1327,7 +1327,8 @@
   if (vendor_type != llvm::Triple::Apple) {
     if ((arch_type == llvm::Triple::arm) ||
         (arch_type == llvm::Triple::thumb)) {
-      return ABISP(new ABISysV_arm(process_sp));
+      return ABISP(
+          new ABISysV_arm(std::move(process_sp), MakeMCRegisterInfo(arch)));
     }
   }
 
@@ -1960,6 +1961,7 @@
   unwind_plan.SetSourceName("arm default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
 
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h
index a0f00c8..60fb14b 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h
@@ -85,7 +85,9 @@
                            lldb_private::CompilerType &ast_type) const override;
 
 private:
-  ABISysV_arm(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_arm(lldb::ProcessSP process_sp,
+              std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
index 1d54712..89a1f2b 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp
@@ -1668,8 +1668,10 @@
   const llvm::Triple::VendorType vendor_type = arch.GetTriple().getVendor();
 
   if (vendor_type != llvm::Triple::Apple) {
-    if (arch_type == llvm::Triple::aarch64) {
-      return ABISP(new ABISysV_arm64(process_sp));
+    if (arch_type == llvm::Triple::aarch64 ||
+        arch_type == llvm::Triple::aarch64_32) {
+      return ABISP(
+          new ABISysV_arm64(std::move(process_sp), MakeMCRegisterInfo(arch)));
     }
   }
 
@@ -1706,9 +1708,8 @@
   for (size_t i = 0; i < args.size(); ++i) {
     const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
         eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + i);
-    if (log)
-      log->Printf("About to write arg%d (0x%" PRIx64 ") into %s",
-                  static_cast<int>(i + 1), args[i], reg_info->name);
+    LLDB_LOGF(log, "About to write arg%d (0x%" PRIx64 ") into %s",
+              static_cast<int>(i + 1), args[i], reg_info->name);
     if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
       return false;
   }
@@ -1958,6 +1959,7 @@
   unwind_plan.SetSourceName("arm64 at-func-entry default");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
 
   return true;
 }
@@ -1982,6 +1984,7 @@
   unwind_plan.SetSourceName("arm64 default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
 
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h
index 1fbdc79..1bf5773 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h
@@ -92,7 +92,9 @@
                            lldb_private::CompilerType &ast_type) const override;
 
 private:
-  ABISysV_arm64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_arm64(lldb::ProcessSP process_sp,
+                std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
index 9364756..34d9258 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp
@@ -1014,7 +1014,8 @@
 ABISP
 ABISysV_hexagon::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
   if (arch.GetTriple().getArch() == llvm::Triple::hexagon) {
-    return ABISP(new ABISysV_hexagon(process_sp));
+    return ABISP(
+        new ABISysV_hexagon(std::move(process_sp), MakeMCRegisterInfo(arch)));
   }
   return ABISP();
 }
@@ -1247,6 +1248,7 @@
   unwind_plan.SetSourceName("hexagon default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   return true;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h
index 459b631..bef64a2 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h
@@ -97,7 +97,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABISysV_hexagon(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_hexagon(lldb::ProcessSP process_sp,
+                  std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
index 05f5dba..69e4cff 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp
@@ -198,7 +198,8 @@
 ABISysV_i386::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
   if (arch.GetTriple().getVendor() != llvm::Triple::Apple) {
     if (arch.GetTriple().getArch() == llvm::Triple::x86) {
-      return ABISP(new ABISysV_i386(process_sp));
+      return ABISP(
+          new ABISysV_i386(std::move(process_sp), MakeMCRegisterInfo(arch)));
     }
   }
   return ABISP();
@@ -785,6 +786,7 @@
   unwind_plan.SetSourceName("i386 default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   return true;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h
index 982bdd6..2362e9a 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.h
@@ -100,7 +100,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABISysV_i386(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_i386(lldb::ProcessSP process_sp,
+               std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
index 121c730..416db9f 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp
@@ -556,7 +556,8 @@
   const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();
   if ((arch_type == llvm::Triple::mips) ||
       (arch_type == llvm::Triple::mipsel)) {
-    return ABISP(new ABISysV_mips(process_sp));
+    return ABISP(
+        new ABISysV_mips(std::move(process_sp), MakeMCRegisterInfo(arch)));
   }
   return ABISP();
 }
@@ -600,9 +601,8 @@
 
     reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
                                         LLDB_REGNUM_GENERIC_ARG1 + i);
-    if (log)
-      log->Printf("About to write arg%zd (0x%" PRIx64 ") into %s", i + 1,
-                  args[i], reg_info->name);
+    LLDB_LOGF(log, "About to write arg%zd (0x%" PRIx64 ") into %s", i + 1,
+              args[i], reg_info->name);
 
     if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
       return false;
@@ -630,9 +630,8 @@
     size_t i = 4;
     for (; ai != ae; ++ai) {
       reg_value.SetUInt32(*ai);
-      if (log)
-        log->Printf("About to write arg%zd (0x%" PRIx64 ") at  0x%" PRIx64 "",
-                    i + 1, args[i], arg_pos);
+      LLDB_LOGF(log, "About to write arg%zd (0x%" PRIx64 ") at  0x%" PRIx64 "",
+                i + 1, args[i], arg_pos);
 
       if (reg_ctx
               ->WriteRegisterValueToMemory(reg_info, arg_pos,
@@ -654,8 +653,7 @@
   const RegisterInfo *r25_info = reg_ctx->GetRegisterInfoByName("r25", 0);
   const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("zero", 0);
 
-  if (log)
-    log->Printf("Writing R0: 0x%" PRIx64, (uint64_t)0);
+  LLDB_LOGF(log, "Writing R0: 0x%" PRIx64, (uint64_t)0);
 
   /* Write r0 with 0, in case we are stopped in syscall,
    * such setting prevents automatic decrement of the PC.
@@ -664,29 +662,25 @@
   if (!reg_ctx->WriteRegisterFromUnsigned(r0_info, (uint64_t)0))
     return false;
 
-  if (log)
-    log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
+  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
 
   // Set "sp" to the requested value
   if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
     return false;
 
-  if (log)
-    log->Printf("Writing RA: 0x%" PRIx64, (uint64_t)return_addr);
+  LLDB_LOGF(log, "Writing RA: 0x%" PRIx64, (uint64_t)return_addr);
 
   // Set "ra" to the return address
   if (!reg_ctx->WriteRegisterFromUnsigned(ra_reg_info, return_addr))
     return false;
 
-  if (log)
-    log->Printf("Writing PC: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing PC: 0x%" PRIx64, (uint64_t)func_addr);
 
   // Set pc to the address of the called function.
   if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
     return false;
 
-  if (log)
-    log->Printf("Writing r25: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing r25: 0x%" PRIx64, (uint64_t)func_addr);
 
   // All callers of position independent functions must place the address of
   // the called function in t9 (r25)
@@ -997,6 +991,7 @@
   unwind_plan.SetSourceName("mips default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   return true;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h
index 6cd9c19..8143f55 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h
@@ -87,7 +87,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABISysV_mips(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_mips(lldb::ProcessSP process_sp,
+               std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
index 18011cf..72ec071 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp
@@ -554,7 +554,8 @@
 ABISP
 ABISysV_mips64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
   if (arch.GetTriple().isMIPS64())
-    return ABISP(new ABISysV_mips64(process_sp));
+    return ABISP(
+        new ABISysV_mips64(std::move(process_sp), MakeMCRegisterInfo(arch)));
   return ABISP();
 }
 
@@ -589,18 +590,16 @@
   for (size_t i = 0; i < args.size(); ++i) {
     reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
                                         LLDB_REGNUM_GENERIC_ARG1 + i);
-    if (log)
-      log->Printf("About to write arg%zd (0x%" PRIx64 ") into %s", i + 1,
-                  args[i], reg_info->name);
+    LLDB_LOGF(log, "About to write arg%zd (0x%" PRIx64 ") into %s", i + 1,
+              args[i], reg_info->name);
     if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
       return false;
   }
 
   // First, align the SP
 
-  if (log)
-    log->Printf("16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-                (uint64_t)sp, (uint64_t)(sp & ~0xfull));
+  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
+            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
 
   sp &= ~(0xfull); // 16-byte alignment
 
@@ -614,8 +613,7 @@
   const RegisterInfo *r25_info = reg_ctx->GetRegisterInfoByName("r25", 0);
   const RegisterInfo *r0_info = reg_ctx->GetRegisterInfoByName("zero", 0);
 
-  if (log)
-    log->Printf("Writing R0: 0x%" PRIx64, (uint64_t)0);
+  LLDB_LOGF(log, "Writing R0: 0x%" PRIx64, (uint64_t)0);
 
   /* Write r0 with 0, in case we are stopped in syscall,
    * such setting prevents automatic decrement of the PC.
@@ -624,29 +622,25 @@
   if (!reg_ctx->WriteRegisterFromUnsigned(r0_info, (uint64_t)0))
     return false;
 
-  if (log)
-    log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
+  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
 
   // Set "sp" to the requested value
   if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
     return false;
 
-  if (log)
-    log->Printf("Writing RA: 0x%" PRIx64, (uint64_t)return_addr);
+  LLDB_LOGF(log, "Writing RA: 0x%" PRIx64, (uint64_t)return_addr);
 
   // Set "ra" to the return address
   if (!reg_ctx->WriteRegisterFromUnsigned(ra_reg_info, return_addr))
     return false;
 
-  if (log)
-    log->Printf("Writing PC: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing PC: 0x%" PRIx64, (uint64_t)func_addr);
 
   // Set pc to the address of the called function.
   if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
     return false;
 
-  if (log)
-    log->Printf("Writing r25: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing r25: 0x%" PRIx64, (uint64_t)func_addr);
 
   // All callers of position independent functions must place the address of
   // the called function in t9 (r25)
@@ -1168,6 +1162,7 @@
   unwind_plan.SetSourceName("mips64 default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   return true;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h
index 7da71b3..76c3c54 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h
@@ -100,7 +100,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABISysV_mips64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_mips64(lldb::ProcessSP process_sp,
+                 std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
index faa9950..857b7fe 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp
@@ -218,7 +218,8 @@
 ABISP
 ABISysV_ppc::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
   if (arch.GetTriple().getArch() == llvm::Triple::ppc) {
-     return ABISP(new ABISysV_ppc(process_sp));
+    return ABISP(
+        new ABISysV_ppc(std::move(process_sp), MakeMCRegisterInfo(arch)));
   }
   return ABISP();
 }
@@ -255,18 +256,16 @@
   for (size_t i = 0; i < args.size(); ++i) {
     reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
                                         LLDB_REGNUM_GENERIC_ARG1 + i);
-    if (log)
-      log->Printf("About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-                  static_cast<uint64_t>(i + 1), args[i], reg_info->name);
+    LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
+              static_cast<uint64_t>(i + 1), args[i], reg_info->name);
     if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
       return false;
   }
 
   // First, align the SP
 
-  if (log)
-    log->Printf("16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-                (uint64_t)sp, (uint64_t)(sp & ~0xfull));
+  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
+            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
 
   sp &= ~(0xfull); // 16-byte alignment
 
@@ -281,10 +280,10 @@
 
   RegisterValue reg_value;
 
-  if (log)
-    log->Printf("Pushing the return address onto the stack: 0x%" PRIx64
-                ": 0x%" PRIx64,
-                (uint64_t)sp, (uint64_t)return_addr);
+  LLDB_LOGF(log,
+            "Pushing the return address onto the stack: 0x%" PRIx64
+            ": 0x%" PRIx64,
+            (uint64_t)sp, (uint64_t)return_addr);
 
   // Save return address onto the stack
   if (!process_sp->WritePointerToMemory(sp, return_addr, error))
@@ -292,16 +291,14 @@
 
   // %r1 is set to the actual stack value.
 
-  if (log)
-    log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
+  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
     return false;
 
   // %pc is set to the address of the called function.
 
-  if (log)
-    log->Printf("Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
     return false;
@@ -910,6 +907,7 @@
   unwind_plan.SetSourceName("ppc default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetReturnAddressRegister(dwarf_lr);
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
index 3b19985..59907c4 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h
@@ -96,7 +96,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABISysV_ppc(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_ppc(lldb::ProcessSP process_sp,
+              std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
index aa79075..935353c 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp
@@ -70,7 +70,8 @@
 ABISysV_ppc64::CreateInstance(lldb::ProcessSP process_sp,
                               const ArchSpec &arch) {
   if (arch.GetTriple().isPPC64())
-    return ABISP(new ABISysV_ppc64(process_sp));
+    return ABISP(
+        new ABISysV_ppc64(std::move(process_sp), MakeMCRegisterInfo(arch)));
   return ABISP();
 }
 
@@ -106,18 +107,16 @@
   for (size_t i = 0; i < args.size(); ++i) {
     reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
                                         LLDB_REGNUM_GENERIC_ARG1 + i);
-    if (log)
-      log->Printf("About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-                  static_cast<uint64_t>(i + 1), args[i], reg_info->name);
+    LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
+              static_cast<uint64_t>(i + 1), args[i], reg_info->name);
     if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
       return false;
   }
 
   // First, align the SP
 
-  if (log)
-    log->Printf("16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-                (uint64_t)sp, (uint64_t)(sp & ~0xfull));
+  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
+            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
 
   sp &= ~(0xfull); // 16-byte alignment
 
@@ -136,22 +135,20 @@
   const RegisterInfo *r12_reg_info = reg_ctx->GetRegisterInfoAtIndex(12);
 
   // Save return address onto the stack.
-  if (log)
-    log->Printf("Pushing the return address onto the stack: 0x%" PRIx64
-                "(+16): 0x%" PRIx64,
-                (uint64_t)sp, (uint64_t)return_addr);
+  LLDB_LOGF(log,
+            "Pushing the return address onto the stack: 0x%" PRIx64
+            "(+16): 0x%" PRIx64,
+            (uint64_t)sp, (uint64_t)return_addr);
   if (!process_sp->WritePointerToMemory(sp + 16, return_addr, error))
     return false;
 
   // Write the return address to link register.
-  if (log)
-    log->Printf("Writing LR: 0x%" PRIx64, (uint64_t)return_addr);
+  LLDB_LOGF(log, "Writing LR: 0x%" PRIx64, (uint64_t)return_addr);
   if (!reg_ctx->WriteRegisterFromUnsigned(lr_reg_info, return_addr))
     return false;
 
   // Write target address to %r12 register.
-  if (log)
-    log->Printf("Writing R12: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing R12: 0x%" PRIx64, (uint64_t)func_addr);
   if (!reg_ctx->WriteRegisterFromUnsigned(r12_reg_info, func_addr))
     return false;
 
@@ -165,10 +162,9 @@
   else
     stack_offset = 40;
 
-  if (log)
-    log->Printf("Writing R2 (TOC) at SP(0x%" PRIx64 ")+%d: 0x%" PRIx64,
-                (uint64_t)(sp + stack_offset), (int)stack_offset,
-                (uint64_t)reg_value);
+  LLDB_LOGF(log, "Writing R2 (TOC) at SP(0x%" PRIx64 ")+%d: 0x%" PRIx64,
+            (uint64_t)(sp + stack_offset), (int)stack_offset,
+            (uint64_t)reg_value);
   if (!process_sp->WritePointerToMemory(sp + stack_offset, reg_value, error))
     return false;
 
@@ -176,23 +172,20 @@
   reg_value = reg_ctx->ReadRegisterAsUnsigned(sp_reg_info, 0);
 
   // Save current SP onto the stack.
-  if (log)
-    log->Printf("Writing SP at SP(0x%" PRIx64 ")+0: 0x%" PRIx64, (uint64_t)sp,
-                (uint64_t)reg_value);
+  LLDB_LOGF(log, "Writing SP at SP(0x%" PRIx64 ")+0: 0x%" PRIx64, (uint64_t)sp,
+            (uint64_t)reg_value);
   if (!process_sp->WritePointerToMemory(sp, reg_value, error))
     return false;
 
   // %r1 is set to the actual stack value.
-  if (log)
-    log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
+  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
     return false;
 
   // %pc is set to the address of the called function.
 
-  if (log)
-    log->Printf("Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
     return false;
@@ -1017,6 +1010,7 @@
   unwind_plan.SetSourceName("ppc64 default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetReturnAddressRegister(pc_reg_num);
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
index d5fb09e..1b58975 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h
@@ -96,7 +96,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABISysV_ppc64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_ppc64(lldb::ProcessSP process_sp,
+                std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp
index abe847b..f4f803a 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.cpp
@@ -200,7 +200,7 @@
 ABISP
 ABISysV_s390x::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
   if (arch.GetTriple().getArch() == llvm::Triple::systemz) {
-    return ABISP(new ABISysV_s390x(process_sp));
+    return ABISP(new ABISysV_s390x(std::move(process_sp), MakeMCRegisterInfo(arch)));
   }
   return ABISP();
 }
@@ -252,16 +252,14 @@
     if (i < 5) {
       const RegisterInfo *reg_info = reg_ctx->GetRegisterInfo(
           eRegisterKindGeneric, LLDB_REGNUM_GENERIC_ARG1 + i);
-      if (log)
-        log->Printf("About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-                    static_cast<uint64_t>(i + 1), args[i], reg_info->name);
+      LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
+                static_cast<uint64_t>(i + 1), args[i], reg_info->name);
       if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
         return false;
     } else {
       Status error;
-      if (log)
-        log->Printf("About to write arg%" PRIu64 " (0x%" PRIx64 ") onto stack",
-                    static_cast<uint64_t>(i + 1), args[i]);
+      LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") onto stack",
+                static_cast<uint64_t>(i + 1), args[i]);
       if (!process_sp->WritePointerToMemory(arg_pos, args[i], error))
         return false;
       arg_pos += 8;
@@ -270,24 +268,21 @@
 
   // %r14 is set to the return address
 
-  if (log)
-    log->Printf("Writing RA: 0x%" PRIx64, (uint64_t)return_addr);
+  LLDB_LOGF(log, "Writing RA: 0x%" PRIx64, (uint64_t)return_addr);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(ra_reg_info, return_addr))
     return false;
 
   // %r15 is set to the actual stack value.
 
-  if (log)
-    log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
+  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
     return false;
 
   // %pc is set to the address of the called function.
 
-  if (log)
-    log->Printf("Writing PC: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing PC: 0x%" PRIx64, (uint64_t)func_addr);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
     return false;
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h
index 13df477..671d6a1 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-s390x/ABISysV_s390x.h
@@ -88,7 +88,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABISysV_s390x(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_s390x(lldb::ProcessSP process_sp,
+                std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp b/src/llvm-project/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
index 6c7b45f..bf1c48f 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp
@@ -222,17 +222,35 @@
 ABISysV_x86_64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
   const llvm::Triple::ArchType arch_type = arch.GetTriple().getArch();
   const llvm::Triple::OSType os_type = arch.GetTriple().getOS();
+  const llvm::Triple::EnvironmentType os_env =
+      arch.GetTriple().getEnvironment();
   if (arch_type == llvm::Triple::x86_64) {
     switch(os_type) {
-      case llvm::Triple::OSType::MacOSX:
-      case llvm::Triple::OSType::Linux:
-      case llvm::Triple::OSType::FreeBSD:
-      case llvm::Triple::OSType::NetBSD:
-      case llvm::Triple::OSType::Solaris:
-      case llvm::Triple::OSType::UnknownOS:
-        return ABISP(new ABISysV_x86_64(process_sp));
-      default: 
+    case llvm::Triple::OSType::IOS:
+    case llvm::Triple::OSType::TvOS:
+    case llvm::Triple::OSType::WatchOS:
+      switch (os_env) {
+      case llvm::Triple::EnvironmentType::MacABI:
+      case llvm::Triple::EnvironmentType::Simulator:
+      case llvm::Triple::EnvironmentType::UnknownEnvironment:
+        // UnknownEnvironment is needed for older compilers that don't
+        // support the simulator environment.
+        return ABISP(new ABISysV_x86_64(std::move(process_sp),
+                                        MakeMCRegisterInfo(arch)));
+      default:
         return ABISP();
+      }
+    case llvm::Triple::OSType::Darwin:
+    case llvm::Triple::OSType::FreeBSD:
+    case llvm::Triple::OSType::Linux:
+    case llvm::Triple::OSType::MacOSX:
+    case llvm::Triple::OSType::NetBSD:
+    case llvm::Triple::OSType::Solaris:
+    case llvm::Triple::OSType::UnknownOS:
+      return ABISP(
+          new ABISysV_x86_64(std::move(process_sp), MakeMCRegisterInfo(arch)));
+    default:
+      return ABISP();
     }
   }
   return ABISP();
@@ -270,18 +288,16 @@
   for (size_t i = 0; i < args.size(); ++i) {
     reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
                                         LLDB_REGNUM_GENERIC_ARG1 + i);
-    if (log)
-      log->Printf("About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-                  static_cast<uint64_t>(i + 1), args[i], reg_info->name);
+    LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
+              static_cast<uint64_t>(i + 1), args[i], reg_info->name);
     if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
       return false;
   }
 
   // First, align the SP
 
-  if (log)
-    log->Printf("16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-                (uint64_t)sp, (uint64_t)(sp & ~0xfull));
+  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
+            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
 
   sp &= ~(0xfull); // 16-byte alignment
 
@@ -295,10 +311,10 @@
   ProcessSP process_sp(thread.GetProcess());
 
   RegisterValue reg_value;
-  if (log)
-    log->Printf("Pushing the return address onto the stack: 0x%" PRIx64
-                ": 0x%" PRIx64,
-                (uint64_t)sp, (uint64_t)return_addr);
+  LLDB_LOGF(log,
+            "Pushing the return address onto the stack: 0x%" PRIx64
+            ": 0x%" PRIx64,
+            (uint64_t)sp, (uint64_t)return_addr);
 
   // Save return address onto the stack
   if (!process_sp->WritePointerToMemory(sp, return_addr, error))
@@ -306,16 +322,14 @@
 
   // %rsp is set to the actual stack value.
 
-  if (log)
-    log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
+  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
     return false;
 
   // %rip is set to the address of the called function.
 
-  if (log)
-    log->Printf("Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
     return false;
@@ -1034,6 +1048,7 @@
   unwind_plan.SetSourceName("x86_64 default unwind plan");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   return true;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h b/src/llvm-project/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
index f6704af..d445d8f 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h
@@ -98,7 +98,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABISysV_x86_64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABISysV_x86_64(lldb::ProcessSP process_sp,
+                 std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp b/src/llvm-project/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp
index 5dc7717..ac24426 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.cpp
@@ -1092,7 +1092,8 @@
 ABIWindows_x86_64::CreateInstance(lldb::ProcessSP process_sp, const ArchSpec &arch) {
   if (arch.GetTriple().getArch() == llvm::Triple::x86_64 &&
       arch.GetTriple().isOSWindows()) {
-    return ABISP(new ABIWindows_x86_64(process_sp));
+    return ABISP(
+        new ABIWindows_x86_64(std::move(process_sp), MakeMCRegisterInfo(arch)));
   }
   return ABISP();
 }
@@ -1129,18 +1130,16 @@
   for (size_t i = 0; i < args.size(); ++i) {
     reg_info = reg_ctx->GetRegisterInfo(eRegisterKindGeneric,
                                         LLDB_REGNUM_GENERIC_ARG1 + i);
-    if (log)
-      log->Printf("About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
-                  static_cast<uint64_t>(i + 1), args[i], reg_info->name);
+    LLDB_LOGF(log, "About to write arg%" PRIu64 " (0x%" PRIx64 ") into %s",
+              static_cast<uint64_t>(i + 1), args[i], reg_info->name);
     if (!reg_ctx->WriteRegisterFromUnsigned(reg_info, args[i]))
       return false;
   }
 
   // First, align the SP
 
-  if (log)
-    log->Printf("16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
-                (uint64_t)sp, (uint64_t)(sp & ~0xfull));
+  LLDB_LOGF(log, "16-byte aligning SP: 0x%" PRIx64 " to 0x%" PRIx64,
+            (uint64_t)sp, (uint64_t)(sp & ~0xfull));
 
   sp &= ~(0xfull); // 16-byte alignment
 
@@ -1154,10 +1153,10 @@
   ProcessSP process_sp(thread.GetProcess());
 
   RegisterValue reg_value;
-  if (log)
-    log->Printf("Pushing the return address onto the stack: 0x%" PRIx64
-                ": 0x%" PRIx64,
-                (uint64_t)sp, (uint64_t)return_addr);
+  LLDB_LOGF(log,
+            "Pushing the return address onto the stack: 0x%" PRIx64
+            ": 0x%" PRIx64,
+            (uint64_t)sp, (uint64_t)return_addr);
 
   // Save return address onto the stack
   if (!process_sp->WritePointerToMemory(sp, return_addr, error))
@@ -1165,16 +1164,14 @@
 
   // %rsp is set to the actual stack value.
 
-  if (log)
-    log->Printf("Writing SP: 0x%" PRIx64, (uint64_t)sp);
+  LLDB_LOGF(log, "Writing SP: 0x%" PRIx64, (uint64_t)sp);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(sp_reg_info, sp))
     return false;
 
   // %rip is set to the address of the called function.
 
-  if (log)
-    log->Printf("Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
+  LLDB_LOGF(log, "Writing IP: 0x%" PRIx64, (uint64_t)func_addr);
 
   if (!reg_ctx->WriteRegisterFromUnsigned(pc_reg_info, func_addr))
     return false;
diff --git a/src/llvm-project/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h b/src/llvm-project/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h
index 9f6b2ce..2366566 100644
--- a/src/llvm-project/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h
+++ b/src/llvm-project/lldb/source/Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h
@@ -91,7 +91,9 @@
   bool RegisterIsCalleeSaved(const lldb_private::RegisterInfo *reg_info);
 
 private:
-  ABIWindows_x86_64(lldb::ProcessSP process_sp) : lldb_private::ABI(process_sp) {
+  ABIWindows_x86_64(lldb::ProcessSP process_sp,
+                    std::unique_ptr<llvm::MCRegisterInfo> info_up)
+      : lldb_private::ABI(std::move(process_sp), std::move(info_up)) {
     // Call CreateInstance instead.
   }
 };
diff --git a/src/llvm-project/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp b/src/llvm-project/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp
index 60f1a2e..5f2f6ee 100644
--- a/src/llvm-project/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Architecture/Mips/ArchitectureMips.cpp
@@ -127,10 +127,10 @@
 
   // Adjust the breakable address
   uint64_t breakable_addr = addr - insn->GetOpcode().GetByteSize();
-  if (log)
-    log->Printf("Target::%s Breakpoint at 0x%8.8" PRIx64
-      " is adjusted to 0x%8.8" PRIx64 " due to delay slot\n",
-      __FUNCTION__, addr, breakable_addr);
+  LLDB_LOGF(log,
+            "Target::%s Breakpoint at 0x%8.8" PRIx64
+            " is adjusted to 0x%8.8" PRIx64 " due to delay slot\n",
+            __FUNCTION__, addr, breakable_addr);
 
   return breakable_addr;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp b/src/llvm-project/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
index 44c75fc9..dbdb352 100644
--- a/src/llvm-project/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp
@@ -20,6 +20,7 @@
 #include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
+#include "llvm/MC/MCTargetOptions.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/ScopedPrinter.h"
 #include "llvm/Support/TargetRegistry.h"
@@ -381,11 +382,10 @@
         static RegularExpression s_regex(
             llvm::StringRef("[ \t]*([^ ^\t]+)[ \t]*([^ ^\t].*)?"));
 
-        RegularExpression::Match matches(3);
-
+        llvm::SmallVector<llvm::StringRef, 4> matches;
         if (s_regex.Execute(out_string, &matches)) {
-          matches.GetMatchAtIndex(out_string.c_str(), 1, m_opcode_name);
-          matches.GetMatchAtIndex(out_string.c_str(), 2, m_mnemonics);
+          m_opcode_name = matches[1].str();
+          m_mnemonics = matches[2].str();
         }
       }
     }
@@ -950,8 +950,9 @@
   if (!subtarget_info_up)
     return Instance();
 
+  llvm::MCTargetOptions MCOptions;
   std::unique_ptr<llvm::MCAsmInfo> asm_info_up(
-      curr_target->createMCAsmInfo(*reg_info_up, triple));
+      curr_target->createMCAsmInfo(*reg_info_up, triple, MCOptions));
   if (!asm_info_up)
     return Instance();
 
@@ -1019,7 +1020,7 @@
 
   uint64_t new_inst_size;
   status = m_disasm_up->getInstruction(mc_inst, new_inst_size, data, pc,
-                                       llvm::nulls(), llvm::nulls());
+                                       llvm::nulls());
   if (status == llvm::MCDisassembler::Success)
     return new_inst_size;
   else
@@ -1033,8 +1034,8 @@
   llvm::raw_string_ostream comments_stream(comments_string);
 
   m_instr_printer_up->setCommentStream(comments_stream);
-  m_instr_printer_up->printInst(&mc_inst, inst_stream, llvm::StringRef(),
-                                *m_subtarget_info_up);
+  m_instr_printer_up->printInst(&mc_inst, 0, llvm::StringRef(),
+                                *m_subtarget_info_up, inst_stream);
   m_instr_printer_up->setCommentStream(llvm::nulls());
   comments_stream.flush();
 
@@ -1190,10 +1191,12 @@
 
   // If any AArch64 variant, enable the ARMv8.5 ISA with SVE extensions so we
   // can disassemble newer instructions.
-  if (triple.getArch() == llvm::Triple::aarch64)
+  if (triple.getArch() == llvm::Triple::aarch64 || 
+      triple.getArch() == llvm::Triple::aarch64_32)
     features_str += "+v8.5a,+sve2";
 
-  if (triple.getArch() == llvm::Triple::aarch64
+  if ((triple.getArch() == llvm::Triple::aarch64 ||
+       triple.getArch() == llvm::Triple::aarch64_32)
       && triple.getVendor() == llvm::Triple::Apple) {
     cpu = "apple-latest";
   }
@@ -1211,7 +1214,7 @@
   if (llvm_arch == llvm::Triple::arm) {
     std::string thumb_triple(thumb_arch.GetTriple().getTriple());
     m_alternate_disasm_up =
-        MCDisasmInstance::Create(thumb_triple.c_str(), "", features_str.c_str(), 
+        MCDisasmInstance::Create(thumb_triple.c_str(), "", features_str.c_str(),
                                  flavor, *this);
     if (!m_alternate_disasm_up)
       m_disasm_up.reset();
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt
index ffc797b..e29ddca 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(DynamicLoaderDarwinKernelProperties.inc -gen-lldb-property-defs
+  SOURCE DynamicLoaderDarwinKernelProperties.td
+  TARGET LLDBPluginDynamicLoaderDarwinKernelPropertiesGen)
+
+lldb_tablegen(DynamicLoaderDarwinKernelPropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE DynamicLoaderDarwinKernelProperties.td
+  TARGET LLDBPluginDynamicLoaderDarwinKernelPropertiesEnumGen)
+
 add_lldb_library(lldbPluginDynamicLoaderDarwinKernel PLUGIN
   DynamicLoaderDarwinKernel.cpp
 
@@ -11,3 +19,7 @@
     lldbUtility
     lldbPluginPlatformMacOSX
   )
+
+add_dependencies(lldbPluginDynamicLoaderDarwinKernel
+  LLDBPluginDynamicLoaderDarwinKernelPropertiesGen
+  LLDBPluginDynamicLoaderDarwinKernelPropertiesEnumGen)
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
index 242085a..6019a1c 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
@@ -31,8 +31,8 @@
 
 #include "DynamicLoaderDarwinKernel.h"
 
-#include <memory>
 #include <algorithm>
+#include <memory>
 
 //#define ENABLE_DEBUG_PRINTF // COMMENT THIS LINE OUT PRIOR TO CHECKIN
 #ifdef ENABLE_DEBUG_PRINTF
@@ -61,26 +61,38 @@
 };
 
 static constexpr OptionEnumValueElement g_kaslr_kernel_scan_enum_values[] = {
-    {eKASLRScanNone, "none",
-     "Do not read memory looking for a Darwin kernel when attaching."},
-    {eKASLRScanLowgloAddresses, "basic", "Check for the Darwin kernel's load "
-                                         "addr in the lowglo page "
-                                         "(boot-args=debug) only."},
-    {eKASLRScanNearPC, "fast-scan", "Scan near the pc value on attach to find "
-                                    "the Darwin kernel's load address."},
-    {eKASLRScanExhaustiveScan, "exhaustive-scan",
-     "Scan through the entire potential address range of Darwin kernel (only "
-     "on 32-bit targets)."}};
+    {
+        eKASLRScanNone,
+        "none",
+        "Do not read memory looking for a Darwin kernel when attaching.",
+    },
+    {
+        eKASLRScanLowgloAddresses,
+        "basic",
+        "Check for the Darwin kernel's load addr in the lowglo page "
+        "(boot-args=debug) only.",
+    },
+    {
+        eKASLRScanNearPC,
+        "fast-scan",
+        "Scan near the pc value on attach to find the Darwin kernel's load "
+        "address.",
+    },
+    {
+        eKASLRScanExhaustiveScan,
+        "exhaustive-scan",
+        "Scan through the entire potential address range of Darwin kernel "
+        "(only on 32-bit targets).",
+    },
+};
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"load-kexts", OptionValue::eTypeBoolean, true, true, nullptr, {},
-     "Automatically loads kext images when attaching to a kernel."},
-    {"scan-type", OptionValue::eTypeEnum, true, eKASLRScanNearPC, nullptr,
-     OptionEnumValues(g_kaslr_kernel_scan_enum_values),
-     "Control how many reads lldb will make while searching for a Darwin "
-     "kernel on attach."}};
+#define LLDB_PROPERTIES_dynamicloaderdarwinkernel
+#include "DynamicLoaderDarwinKernelProperties.inc"
 
-enum { ePropertyLoadKexts, ePropertyScanType };
+enum {
+#define LLDB_PROPERTIES_dynamicloaderdarwinkernel
+#include "DynamicLoaderDarwinKernelPropertiesEnum.inc"
+};
 
 class DynamicLoaderDarwinKernelProperties : public Properties {
 public:
@@ -91,7 +103,7 @@
 
   DynamicLoaderDarwinKernelProperties() : Properties() {
     m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_dynamicloaderdarwinkernel_properties);
   }
 
   ~DynamicLoaderDarwinKernelProperties() override {}
@@ -99,13 +111,15 @@
   bool GetLoadKexts() const {
     const uint32_t idx = ePropertyLoadKexts;
     return m_collection_sp->GetPropertyAtIndexAsBoolean(
-        nullptr, idx, g_properties[idx].default_uint_value != 0);
+        nullptr, idx,
+        g_dynamicloaderdarwinkernel_properties[idx].default_uint_value != 0);
   }
 
   KASLRScanType GetScanType() const {
     const uint32_t idx = ePropertyScanType;
     return (KASLRScanType)m_collection_sp->GetPropertyAtIndexAsEnumeration(
-        nullptr, idx, g_properties[idx].default_uint_value);
+        nullptr, idx,
+        g_dynamicloaderdarwinkernel_properties[idx].default_uint_value);
   }
 };
 
@@ -430,10 +444,10 @@
     return UUID();
   }
 
-  if (log)
-    log->Printf("DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress: "
-                "looking for kernel binary at 0x%" PRIx64,
-                addr);
+  LLDB_LOGF(log,
+            "DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress: "
+            "looking for kernel binary at 0x%" PRIx64,
+            addr);
 
   llvm::MachO::mach_header header;
 
@@ -455,11 +469,11 @@
 
     ObjectFile *exe_objfile = memory_module_sp->GetObjectFile();
     if (exe_objfile == nullptr) {
-      if (log)
-        log->Printf("DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress "
-                    "found a binary at 0x%" PRIx64
-                    " but could not create an object file from memory",
-                    addr);
+      LLDB_LOGF(log,
+                "DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress "
+                "found a binary at 0x%" PRIx64
+                " but could not create an object file from memory",
+                addr);
       return UUID();
     }
 
@@ -478,7 +492,8 @@
         } else {
           uuid_str = "and no LC_UUID found in load commands ";
         }
-        log->Printf(
+        LLDB_LOGF(
+            log,
             "DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress: "
             "kernel binary image found at 0x%" PRIx64 " with arch '%s' %s",
             addr, kernel_arch.GetTriple().str().c_str(), uuid_str.c_str());
@@ -680,11 +695,12 @@
   if (m_uuid.IsValid()) {
     if (m_uuid != memory_module_sp->GetUUID()) {
       if (log) {
-        log->Printf("KextImageInfo::ReadMemoryModule the kernel said to find "
-                    "uuid %s at 0x%" PRIx64
-                    " but instead we found uuid %s, throwing it away",
-                    m_uuid.GetAsString().c_str(), m_load_address,
-                    memory_module_sp->GetUUID().GetAsString().c_str());
+        LLDB_LOGF(log,
+                  "KextImageInfo::ReadMemoryModule the kernel said to find "
+                  "uuid %s at 0x%" PRIx64
+                  " but instead we found uuid %s, throwing it away",
+                  m_uuid.GetAsString().c_str(), m_load_address,
+                  memory_module_sp->GetUUID().GetAsString().c_str());
       }
       return false;
     }
@@ -700,8 +716,9 @@
   if (is_kernel) {
     if (log) {
       // This is unusual and probably not intended
-      log->Printf("KextImageInfo::ReadMemoryModule read the kernel binary out "
-                  "of memory");
+      LLDB_LOGF(log,
+                "KextImageInfo::ReadMemoryModule read the kernel binary out "
+                "of memory");
     }
     if (memory_module_sp->GetArchitecture().IsValid()) {
       process->GetTarget().SetArchitecture(memory_module_sp->GetArchitecture());
@@ -747,21 +764,18 @@
   if (m_uuid.IsValid() == false) {
     if (ReadMemoryModule(process) == false) {
       Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-      if (log)
-        log->Printf("Unable to read '%s' from memory at address 0x%" PRIx64
-                    " to get the segment load addresses.",
-                    m_name.c_str(), m_load_address);
+      LLDB_LOGF(log,
+                "Unable to read '%s' from memory at address 0x%" PRIx64
+                " to get the segment load addresses.",
+                m_name.c_str(), m_load_address);
       return false;
     }
   }
 
   if (IsKernel() && m_uuid.IsValid()) {
-    Stream *s = target.GetDebugger().GetOutputFile().get();
-    if (s) {
-      s->Printf("Kernel UUID: %s\n",
-                m_uuid.GetAsString().c_str());
-      s->Printf("Load Address: 0x%" PRIx64 "\n", m_load_address);
-    }
+    Stream &s = target.GetDebugger().GetOutputStream();
+    s.Printf("Kernel UUID: %s\n", m_uuid.GetAsString().c_str());
+    s.Printf("Load Address: 0x%" PRIx64 "\n", m_load_address);
   }
 
   if (!m_module_sp) {
@@ -777,18 +791,14 @@
       module_spec.GetArchitecture() = target.GetArchitecture();
 
       // For the kernel, we really do need an on-disk file copy of the binary
-      // to do anything useful. This will force a clal to
+      // to do anything useful. This will force a call to dsymForUUID if it
+      // exists, instead of depending on the DebugSymbols preferences being 
+      // set.
       if (IsKernel()) {
         if (Symbols::DownloadObjectAndSymbolFile(module_spec, true)) {
           if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) {
             m_module_sp = std::make_shared<Module>(module_spec.GetFileSpec(),
                                                    target.GetArchitecture());
-            if (m_module_sp.get() &&
-                m_module_sp->MatchesModuleSpec(module_spec)) {
-              ModuleList loaded_module_list;
-              loaded_module_list.Append(m_module_sp);
-              target.ModulesDidLoad(loaded_module_list);
-            }
           }
         }
       }
@@ -796,6 +806,8 @@
       // If the current platform is PlatformDarwinKernel, create a ModuleSpec
       // with the filename set to be the bundle ID for this kext, e.g.
       // "com.apple.filesystems.msdosfs", and ask the platform to find it.
+      // PlatformDarwinKernel does a special scan for kexts on the local
+      // system.
       PlatformSP platform_sp(target.GetPlatform());
       if (!m_module_sp && platform_sp) {
         ConstString platform_name(platform_sp->GetPluginName());
@@ -804,7 +816,7 @@
         if (platform_name == g_platform_name) {
           ModuleSpec kext_bundle_module_spec(module_spec);
           FileSpec kext_filespec(m_name.c_str());
-	  FileSpecList search_paths = target.GetExecutableSearchPaths();
+          FileSpecList search_paths = target.GetExecutableSearchPaths();
           kext_bundle_module_spec.GetFileSpec() = kext_filespec;
           platform_sp->GetSharedModule(kext_bundle_module_spec, process,
                                        m_module_sp, &search_paths, nullptr,
@@ -822,11 +834,9 @@
       }
 
       if (IsKernel() && !m_module_sp) {
-        Stream *s = target.GetDebugger().GetOutputFile().get();
-        if (s) {
-          s->Printf("WARNING: Unable to locate kernel binary on the debugger "
-                    "system.\n");
-        }
+        Stream &s = target.GetDebugger().GetOutputStream();
+        s.Printf("WARNING: Unable to locate kernel binary on the debugger "
+                 "system.\n");
       }
     }
 
@@ -835,7 +845,7 @@
     // UUIDs
     if (m_module_sp) {
       if (m_uuid.IsValid() && m_module_sp->GetUUID() == m_uuid) {
-        target.GetImages().AppendIfNeeded(m_module_sp);
+        target.GetImages().AppendIfNeeded(m_module_sp, false);
         if (IsKernel() &&
             target.GetExecutableModulePointer() != m_module_sp.get()) {
           target.SetExecutableModule(m_module_sp, eLoadDependentsNo);
@@ -915,25 +925,32 @@
   bool is_loaded = IsLoaded();
 
   if (is_loaded && m_module_sp && IsKernel()) {
-    Stream *s = target.GetDebugger().GetOutputFile().get();
-    if (s) {
-      ObjectFile *kernel_object_file = m_module_sp->GetObjectFile();
-      if (kernel_object_file) {
-        addr_t file_address =
-            kernel_object_file->GetBaseAddress().GetFileAddress();
-        if (m_load_address != LLDB_INVALID_ADDRESS &&
-            file_address != LLDB_INVALID_ADDRESS) {
-          s->Printf("Kernel slid 0x%" PRIx64 " in memory.\n",
-                    m_load_address - file_address);
-        }
+    Stream &s = target.GetDebugger().GetOutputStream();
+    ObjectFile *kernel_object_file = m_module_sp->GetObjectFile();
+    if (kernel_object_file) {
+      addr_t file_address =
+          kernel_object_file->GetBaseAddress().GetFileAddress();
+      if (m_load_address != LLDB_INVALID_ADDRESS &&
+          file_address != LLDB_INVALID_ADDRESS) {
+        s.Printf("Kernel slid 0x%" PRIx64 " in memory.\n",
+                 m_load_address - file_address);
       }
-      {
-        s->Printf("Loaded kernel file %s\n",
-                  m_module_sp->GetFileSpec().GetPath().c_str());
-      }
-      s->Flush();
     }
+    {
+      s.Printf("Loaded kernel file %s\n",
+               m_module_sp->GetFileSpec().GetPath().c_str());
+    }
+    s.Flush();
   }
+
+  // Notify the target about the module being added;
+  // set breakpoints, load dSYM scripts, etc. as needed.
+  if (is_loaded && m_module_sp) {
+    ModuleList loaded_module_list;
+    loaded_module_list.Append(m_module_sp);
+    target.ModulesDidLoad(loaded_module_list);
+  }
+
   return is_loaded;
 }
 
@@ -1054,8 +1071,7 @@
                                               user_id_t break_id,
                                               user_id_t break_loc_id) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-  if (log)
-    log->Printf("DynamicLoaderDarwinKernel::BreakpointHit (...)\n");
+  LLDB_LOGF(log, "DynamicLoaderDarwinKernel::BreakpointHit (...)\n");
 
   ReadAllKextSummaries();
 
@@ -1093,11 +1109,10 @@
           lldb::offset_t offset = 0;
           m_kext_summary_header.version = data.GetU32(&offset);
           if (m_kext_summary_header.version > 128) {
-            Stream *s =
-                m_process->GetTarget().GetDebugger().GetOutputFile().get();
-            s->Printf("WARNING: Unable to read kext summary header, got "
-                      "improbable version number %u\n",
-                      m_kext_summary_header.version);
+            Stream &s = m_process->GetTarget().GetDebugger().GetOutputStream();
+            s.Printf("WARNING: Unable to read kext summary header, got "
+                     "improbable version number %u\n",
+                     m_kext_summary_header.version);
             // If we get an improbably large version number, we're probably
             // getting bad memory.
             m_kext_summary_header_addr.Clear();
@@ -1108,11 +1123,11 @@
             if (m_kext_summary_header.entry_size > 4096) {
               // If we get an improbably large entry_size, we're probably
               // getting bad memory.
-              Stream *s =
-                  m_process->GetTarget().GetDebugger().GetOutputFile().get();
-              s->Printf("WARNING: Unable to read kext summary header, got "
-                        "improbable entry_size %u\n",
-                        m_kext_summary_header.entry_size);
+              Stream &s =
+                  m_process->GetTarget().GetDebugger().GetOutputStream();
+              s.Printf("WARNING: Unable to read kext summary header, got "
+                       "improbable entry_size %u\n",
+                       m_kext_summary_header.entry_size);
               m_kext_summary_header_addr.Clear();
               return false;
             }
@@ -1126,11 +1141,10 @@
           if (m_kext_summary_header.entry_count > 10000) {
             // If we get an improbably large number of kexts, we're probably
             // getting bad memory.
-            Stream *s =
-                m_process->GetTarget().GetDebugger().GetOutputFile().get();
-            s->Printf("WARNING: Unable to read kext summary header, got "
-                      "improbable number of kexts %u\n",
-                      m_kext_summary_header.entry_count);
+            Stream &s = m_process->GetTarget().GetDebugger().GetOutputStream();
+            s.Printf("WARNING: Unable to read kext summary header, got "
+                     "improbable number of kexts %u\n",
+                     m_kext_summary_header.entry_count);
             m_kext_summary_header_addr.Clear();
             return false;
           }
@@ -1153,9 +1167,9 @@
     const Address &kext_summary_addr, uint32_t count) {
   KextImageInfo::collection kext_summaries;
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-  if (log)
-    log->Printf("Kexts-changed breakpoint hit, there are %d kexts currently.\n",
-                count);
+  LLDB_LOGF(log,
+            "Kexts-changed breakpoint hit, there are %d kexts currently.\n",
+            count);
 
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
 
@@ -1231,32 +1245,33 @@
       number_of_old_kexts_being_removed == 0)
     return true;
 
-  Stream *s = m_process->GetTarget().GetDebugger().GetOutputFile().get();
-  if (s && load_kexts) {
+  Stream &s = m_process->GetTarget().GetDebugger().GetOutputStream();
+  if (load_kexts) {
     if (number_of_new_kexts_being_added > 0 &&
         number_of_old_kexts_being_removed > 0) {
-      s->Printf("Loading %d kext modules and unloading %d kext modules ",
-                number_of_new_kexts_being_added,
-                number_of_old_kexts_being_removed);
+      s.Printf("Loading %d kext modules and unloading %d kext modules ",
+               number_of_new_kexts_being_added,
+               number_of_old_kexts_being_removed);
     } else if (number_of_new_kexts_being_added > 0) {
-      s->Printf("Loading %d kext modules ", number_of_new_kexts_being_added);
+      s.Printf("Loading %d kext modules ", number_of_new_kexts_being_added);
     } else if (number_of_old_kexts_being_removed > 0) {
-      s->Printf("Unloading %d kext modules ",
-                number_of_old_kexts_being_removed);
+      s.Printf("Unloading %d kext modules ", number_of_old_kexts_being_removed);
     }
   }
 
   if (log) {
     if (load_kexts) {
-      log->Printf("DynamicLoaderDarwinKernel::ParseKextSummaries: %d kexts "
-                  "added, %d kexts removed",
-                  number_of_new_kexts_being_added,
-                  number_of_old_kexts_being_removed);
+      LLDB_LOGF(log,
+                "DynamicLoaderDarwinKernel::ParseKextSummaries: %d kexts "
+                "added, %d kexts removed",
+                number_of_new_kexts_being_added,
+                number_of_old_kexts_being_removed);
     } else {
-      log->Printf(
-          "DynamicLoaderDarwinKernel::ParseKextSummaries kext loading is "
-          "disabled, else would have %d kexts added, %d kexts removed",
-          number_of_new_kexts_being_added, number_of_old_kexts_being_removed);
+      LLDB_LOGF(log,
+                "DynamicLoaderDarwinKernel::ParseKextSummaries kext loading is "
+                "disabled, else would have %d kexts added, %d kexts removed",
+                number_of_new_kexts_being_added,
+                number_of_old_kexts_being_removed);
     }
   }
 
@@ -1286,11 +1301,11 @@
             m_process->GetStopID() == image_info.GetProcessStopId())
           loaded_module_list.AppendIfNeeded(image_info.GetModule());
 
-        if (s && load_kexts) {
+        if (load_kexts) {
           if (kext_successfully_added)
-            s->Printf(".");
+            s.Printf(".");
           else
-            s->Printf("-");
+            s.Printf("-");
         }
 
         if (log)
@@ -1312,8 +1327,7 @@
           if (image_info.GetModule()) {
             unloaded_module_list.AppendIfNeeded(image_info.GetModule());
           }
-          if (s)
-            s->Printf(".");
+          s.Printf(".");
           image_info.Clear();
           // should pull it out of the KextImageInfos vector but that would
           // mutate the list and invalidate the to_be_removed bool vector;
@@ -1324,12 +1338,12 @@
     }
   }
 
-  if (s && load_kexts) {
-    s->Printf(" done.\n");
+  if (load_kexts) {
+    s.Printf(" done.\n");
     if (kexts_failed_to_load.size() > 0 && number_of_new_kexts_being_added > 0) {
-      s->Printf("Failed to load %d of %d kexts:\n",
-                (int)kexts_failed_to_load.size(),
-                number_of_new_kexts_being_added);
+      s.Printf("Failed to load %d of %d kexts:\n",
+               (int)kexts_failed_to_load.size(),
+               number_of_new_kexts_being_added);
       // print a sorted list of <kext-name, uuid> kexts which failed to load
       unsigned longest_name = 0;
       std::sort(kexts_failed_to_load.begin(), kexts_failed_to_load.end());
@@ -1341,10 +1355,10 @@
         std::string uuid;
         if (ku.second.IsValid())
           uuid = ku.second.GetAsString();
-        s->Printf (" %-*s %s\n", longest_name, ku.first.c_str(), uuid.c_str());
+        s.Printf(" %-*s %s\n", longest_name, ku.first.c_str(), uuid.c_str());
       }
     }
-    s->Flush();
+    s.Flush();
   }
 
   return true;
@@ -1430,11 +1444,12 @@
     return;
 
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
-  log->Printf("gLoadedKextSummaries = 0x%16.16" PRIx64
-              " { version=%u, entry_size=%u, entry_count=%u }",
-              m_kext_summary_header_addr.GetFileAddress(),
-              m_kext_summary_header.version, m_kext_summary_header.entry_size,
-              m_kext_summary_header.entry_count);
+  LLDB_LOGF(log,
+            "gLoadedKextSummaries = 0x%16.16" PRIx64
+            " { version=%u, entry_size=%u, entry_count=%u }",
+            m_kext_summary_header_addr.GetFileAddress(),
+            m_kext_summary_header.version, m_kext_summary_header.entry_size,
+            m_kext_summary_header.entry_count);
 
   size_t i;
   const size_t count = m_known_kexts.size();
@@ -1509,8 +1524,7 @@
                                                         bool stop_others) {
   ThreadPlanSP thread_plan_sp;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-  if (log)
-    log->Printf("Could not find symbol for step through.");
+  LLDB_LOGF(log, "Could not find symbol for step through.");
   return thread_plan_sp;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernelProperties.td b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernelProperties.td
new file mode 100644
index 0000000..6c662d7
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernelProperties.td
@@ -0,0 +1,13 @@
+include "../../../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "dynamicloaderdarwinkernel" in {
+  def LoadKexts: Property<"load-kexts", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"Automatically loads kext images when attaching to a kernel.">;
+  def ScanType: Property<"scan-type", "Enum">,
+    Global,
+    DefaultEnumValue<"eKASLRScanNearPC">,
+    EnumValues<"OptionEnumValues(g_kaslr_kernel_scan_enum_values)">,
+    Desc<"Control how many reads lldb will make while searching for a Darwin kernel on attach.">;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
index 23c8416..5b19647 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
@@ -277,8 +277,7 @@
 
   // Do not try to set the breakpoint if we don't know where to put it
   if (break_addr == LLDB_INVALID_ADDRESS) {
-    if (log)
-      log->Printf("Unable to locate _rtld_debug_state breakpoint address");
+    LLDB_LOGF(log, "Unable to locate _rtld_debug_state breakpoint address");
 
     return false;
   }
@@ -301,7 +300,7 @@
                .GetID() == m_dyld_bid);
 
     if (log && dyld_break == nullptr)
-      log->Printf("Failed to create _rtld_debug_state breakpoint");
+      LLDB_LOGF(log, "Failed to create _rtld_debug_state breakpoint");
 
     // check we have successfully set bp
     return (dyld_break != nullptr);
@@ -316,8 +315,7 @@
     user_id_t break_loc_id) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
 
-  if (log)
-    log->Printf("Rendezvous breakpoint hit!");
+  LLDB_LOGF(log, "Rendezvous breakpoint hit!");
 
   DynamicLoaderHexagonDYLD *dyld_instance = nullptr;
   dyld_instance = static_cast<DynamicLoaderHexagonDYLD *>(baton);
@@ -333,11 +331,9 @@
     if (structAddr != LLDB_INVALID_ADDRESS) {
       dyld_instance->m_rendezvous.SetRendezvousAddress(structAddr);
 
-      if (log)
-        log->Printf("Found _rtld_debug structure @ 0x%08" PRIx64, structAddr);
+      LLDB_LOGF(log, "Found _rtld_debug structure @ 0x%08" PRIx64, structAddr);
     } else {
-      if (log)
-        log->Printf("Unable to resolve the _rtld_debug structure");
+      LLDB_LOGF(log, "Unable to resolve the _rtld_debug structure");
     }
   }
 
@@ -375,11 +371,11 @@
       }
 
       if (log) {
-        log->Printf("Target is loading '%s'", I->path.c_str());
+        LLDB_LOGF(log, "Target is loading '%s'", I->path.c_str());
         if (!module_sp.get())
-          log->Printf("LLDB failed to load '%s'", I->path.c_str());
+          LLDB_LOGF(log, "LLDB failed to load '%s'", I->path.c_str());
         else
-          log->Printf("LLDB successfully loaded '%s'", I->path.c_str());
+          LLDB_LOGF(log, "LLDB successfully loaded '%s'", I->path.c_str());
       }
     }
     m_process->GetTarget().ModulesDidLoad(new_modules);
@@ -400,8 +396,7 @@
         UnloadSections(module_sp);
       }
 
-      if (log)
-        log->Printf("Target is unloading '%s'", I->path.c_str());
+      LLDB_LOGF(log, "Target is unloading '%s'", I->path.c_str());
     }
     loaded_modules.Remove(old_modules);
     m_process->GetTarget().ModulesDidUnload(old_modules, false);
@@ -472,10 +467,10 @@
 
   if (!m_rendezvous.Resolve()) {
     Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-    if (log)
-      log->Printf(
-          "DynamicLoaderHexagonDYLD::%s unable to resolve rendezvous address",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log,
+        "DynamicLoaderHexagonDYLD::%s unable to resolve rendezvous address",
+        __FUNCTION__);
     return;
   }
 
@@ -493,10 +488,10 @@
       module_list.Append(module_sp);
     } else {
       Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-      if (log)
-        log->Printf("DynamicLoaderHexagonDYLD::%s failed loading module %s at "
-                    "0x%" PRIx64,
-                    __FUNCTION__, module_path, I->base_addr);
+      LLDB_LOGF(log,
+                "DynamicLoaderHexagonDYLD::%s failed loading module %s at "
+                "0x%" PRIx64,
+                __FUNCTION__, module_path, I->base_addr);
     }
   }
 
@@ -604,12 +599,11 @@
 
   Module *mod = module.get();
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-  if (log)
-    log->Printf("DynamicLoaderHexagonDYLD::Performed TLS lookup: "
-                "module=%s, link_map=0x%" PRIx64 ", tp=0x%" PRIx64
-                ", modid=%i, tls_block=0x%" PRIx64,
-                mod->GetObjectName().AsCString(""), link_map, tp, modid,
-                tls_block);
+  LLDB_LOGF(log,
+            "DynamicLoaderHexagonDYLD::Performed TLS lookup: "
+            "module=%s, link_map=0x%" PRIx64 ", tp=0x%" PRIx64
+            ", modid=%i, tls_block=0x%" PRIx64,
+            mod->GetObjectName().AsCString(""), link_map, tp, modid, tls_block);
 
   if (tls_block == LLDB_INVALID_ADDRESS)
     return LLDB_INVALID_ADDRESS;
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
index 844a06c..f478881 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
@@ -290,8 +290,9 @@
   Target &target = m_process->GetTarget();
 
   SymbolContextList list;
-  if (!target.GetImages().FindSymbolsWithNameAndType(ConstString(name),
-                                                     eSymbolTypeAny, list))
+  target.GetImages().FindSymbolsWithNameAndType(ConstString(name),
+                                                eSymbolTypeAny, list);
+  if (list.IsEmpty())
     return false;
 
   Address address = list[0].symbol->GetAddress();
@@ -339,16 +340,16 @@
     return;
 
   log->PutCString("HexagonDYLDRendezvous:");
-  log->Printf("   Address: %" PRIx64, GetRendezvousAddress());
-  log->Printf("   Version: %" PRIu64, GetVersion());
-  log->Printf("   Link   : %" PRIx64, GetLinkMapAddress());
-  log->Printf("   Break  : %" PRIx64, GetBreakAddress());
-  log->Printf("   LDBase : %" PRIx64, GetLDBase());
-  log->Printf("   State  : %s",
-              (state == eConsistent)
-                  ? "consistent"
-                  : (state == eAdd) ? "add" : (state == eDelete) ? "delete"
-                                                                 : "unknown");
+  LLDB_LOGF(log, "   Address: %" PRIx64, GetRendezvousAddress());
+  LLDB_LOGF(log, "   Version: %" PRIu64, GetVersion());
+  LLDB_LOGF(log, "   Link   : %" PRIx64, GetLinkMapAddress());
+  LLDB_LOGF(log, "   Break  : %" PRIx64, GetBreakAddress());
+  LLDB_LOGF(log, "   LDBase : %" PRIx64, GetLDBase());
+  LLDB_LOGF(log, "   State  : %s",
+            (state == eConsistent)
+                ? "consistent"
+                : (state == eAdd) ? "add"
+                                  : (state == eDelete) ? "delete" : "unknown");
 
   iterator I = begin();
   iterator E = end();
@@ -357,11 +358,11 @@
     log->PutCString("HexagonDYLDRendezvous SOEntries:");
 
   for (int i = 1; I != E; ++I, ++i) {
-    log->Printf("\n   SOEntry [%d] %s", i, I->path.c_str());
-    log->Printf("      Base : %" PRIx64, I->base_addr);
-    log->Printf("      Path : %" PRIx64, I->path_addr);
-    log->Printf("      Dyn  : %" PRIx64, I->dyn_addr);
-    log->Printf("      Next : %" PRIx64, I->next);
-    log->Printf("      Prev : %" PRIx64, I->prev);
+    LLDB_LOGF(log, "\n   SOEntry [%d] %s", i, I->path.c_str());
+    LLDB_LOGF(log, "      Base : %" PRIx64, I->base_addr);
+    LLDB_LOGF(log, "      Path : %" PRIx64, I->path_addr);
+    LLDB_LOGF(log, "      Dyn  : %" PRIx64, I->dyn_addr);
+    LLDB_LOGF(log, "      Next : %" PRIx64, I->next);
+    LLDB_LOGF(log, "      Prev : %" PRIx64, I->prev);
   }
 }
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp b/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
index 57d87eb..70064a5 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp
@@ -100,6 +100,18 @@
   const ModuleList &target_images = target.GetImages();
   ModuleSpec module_spec(image_info.file_spec);
   module_spec.GetUUID() = image_info.uuid;
+
+  // macCatalyst support: Request matching os/environment.
+  {
+    auto &target_triple = target.GetArchitecture().GetTriple();
+    if (target_triple.getOS() == llvm::Triple::IOS &&
+        target_triple.getEnvironment() == llvm::Triple::MacABI) {
+      // Request the macCatalyst variant of frameworks that have both
+      // a PLATFORM_MACOS and a PLATFORM_MACCATALYST load command.
+      module_spec.GetArchitecture() = ArchSpec(target_triple);
+    }
+  }
+
   ModuleSP module_sp(target_images.FindFirstModule(module_spec));
 
   if (module_sp && !module_spec.GetUUID().IsValid() &&
@@ -135,9 +147,8 @@
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
   Target &target = m_process->GetTarget();
-  if (log)
-    log->Printf("Removing %" PRId64 " modules.",
-                (uint64_t)solib_addresses.size());
+  LLDB_LOGF(log, "Removing %" PRId64 " modules.",
+            (uint64_t)solib_addresses.size());
 
   ModuleList unloaded_module_list;
 
@@ -147,8 +158,7 @@
       if (header.GetOffset() == 0) {
         ModuleSP module_to_remove(header.GetModule());
         if (module_to_remove.get()) {
-          if (log)
-            log->Printf("Removing module at address 0x%" PRIx64, solib_addr);
+          LLDB_LOGF(log, "Removing module at address 0x%" PRIx64, solib_addr);
           // remove the sections from the Target
           UnloadSections(module_to_remove);
           // add this to the list of modules to remove
@@ -386,6 +396,10 @@
         image_infos[i].os_type = llvm::Triple::WatchOS;
       // NEED_BRIDGEOS_TRIPLE else if (os_name == "bridgeos")
       // NEED_BRIDGEOS_TRIPLE   image_infos[i].os_type = llvm::Triple::BridgeOS;
+      else if (os_name == "maccatalyst") {
+        image_infos[i].os_type = llvm::Triple::IOS;
+        image_infos[i].os_env = llvm::Triple::MacABI;
+      }
     }
     if (image->HasKey("min_version_os_sdk")) {
       image_infos[i].min_version_os_sdk =
@@ -537,9 +551,8 @@
     ModuleSP exe_module_sp(FindTargetModuleForImageInfo(image_infos[exe_idx],
                                                         can_create, nullptr));
     if (exe_module_sp) {
-      if (log)
-        log->Printf("Found executable module: %s",
-                    exe_module_sp->GetFileSpec().GetPath().c_str());
+      LLDB_LOGF(log, "Found executable module: %s",
+                exe_module_sp->GetFileSpec().GetPath().c_str());
       target.GetImages().AppendIfNeeded(exe_module_sp);
       UpdateImageLoadAddress(exe_module_sp.get(), image_infos[exe_idx]);
       if (exe_module_sp.get() != target.GetExecutableModulePointer()) {
@@ -553,9 +566,8 @@
     ModuleSP dyld_sp = FindTargetModuleForImageInfo(image_infos[dyld_idx],
                                                     can_create, nullptr);
     if (dyld_sp.get()) {
-      if (log)
-        log->Printf("Found dyld module: %s",
-                    dyld_sp->GetFileSpec().GetPath().c_str());
+      LLDB_LOGF(log, "Found dyld module: %s",
+                dyld_sp->GetFileSpec().GetPath().c_str());
       target.GetImages().AppendIfNeeded(dyld_sp);
       UpdateImageLoadAddress(dyld_sp.get(), image_infos[dyld_idx]);
       SetDYLDModule(dyld_sp);
@@ -598,8 +610,8 @@
 
   for (uint32_t idx = 0; idx < image_infos.size(); ++idx) {
     if (log) {
-      log->Printf("Adding new image at address=0x%16.16" PRIx64 ".",
-                  image_infos[idx].address);
+      LLDB_LOGF(log, "Adding new image at address=0x%16.16" PRIx64 ".",
+                image_infos[idx].address);
       image_infos[idx].PutToLog(log);
     }
 
@@ -658,6 +670,20 @@
         target_images.AppendIfNeeded(image_module_sp);
         loaded_module_list.AppendIfNeeded(image_module_sp);
       }
+
+      // macCataylst support:
+      // Update the module's platform with the DYLD info.
+      ArchSpec dyld_spec = image_infos[idx].GetArchitecture();
+      if (dyld_spec.GetTriple().getOS() == llvm::Triple::IOS &&
+          dyld_spec.GetTriple().getEnvironment() == llvm::Triple::MacABI) {
+        image_module_sp->MergeArchitecture(dyld_spec);
+        const auto &target_triple = target.GetArchitecture().GetTriple();
+        // If dyld reports the process as being loaded as MACCATALYST,
+        // force-update the target's architecture to MACCATALYST.
+        if (!(target_triple.getOS() == llvm::Triple::IOS &&
+              target_triple.getEnvironment() == llvm::Triple::MacABI))
+          target.SetArchitecture(dyld_spec);
+      }
     }
   }
 
@@ -704,16 +730,31 @@
                                             lldb::addr_t slide) const {
   if (log) {
     if (slide == 0)
-      log->Printf("\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")",
-                  name.AsCString(""), vmaddr + slide, vmaddr + slide + vmsize);
+      LLDB_LOGF(log, "\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")",
+                name.AsCString(""), vmaddr + slide, vmaddr + slide + vmsize);
     else
-      log->Printf("\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64
-                  ") slide = 0x%" PRIx64,
-                  name.AsCString(""), vmaddr + slide, vmaddr + slide + vmsize,
-                  slide);
+      LLDB_LOGF(log,
+                "\t\t%16s [0x%16.16" PRIx64 " - 0x%16.16" PRIx64
+                ") slide = 0x%" PRIx64,
+                name.AsCString(""), vmaddr + slide, vmaddr + slide + vmsize,
+                slide);
   }
 }
 
+lldb_private::ArchSpec DynamicLoaderDarwin::ImageInfo::GetArchitecture() const {
+  // Update the module's platform with the DYLD info.
+  lldb_private::ArchSpec arch_spec(lldb_private::eArchTypeMachO, header.cputype,
+                                   header.cpusubtype);
+  if (os_type == llvm::Triple::IOS && os_env == llvm::Triple::MacABI) {
+    llvm::Triple triple(llvm::Twine("x86_64-apple-ios") + min_version_os_sdk +
+                        "-macabi");
+    ArchSpec maccatalyst_spec(triple);
+    if (arch_spec.IsCompatibleMatch(maccatalyst_spec))
+      arch_spec.MergeFrom(maccatalyst_spec);
+  }
+  return arch_spec;
+}
+
 const DynamicLoaderDarwin::Segment *
 DynamicLoaderDarwin::ImageInfo::FindSegment(ConstString name) const {
   const size_t num_segments = segments.size();
@@ -820,9 +861,9 @@
                 addr_t load_addr =
                     addr_range.GetBaseAddress().GetLoadAddress(target_sp.get());
 
-                log->Printf("Found a trampoline target symbol at 0x%" PRIx64
-                            ".",
-                            load_addr);
+                LLDB_LOGF(log,
+                          "Found a trampoline target symbol at 0x%" PRIx64 ".",
+                          load_addr);
               }
             }
           }
@@ -847,7 +888,8 @@
                     if (log) {
                       lldb::addr_t load_addr =
                           actual_symbol_addr.GetLoadAddress(target_sp.get());
-                      log->Printf(
+                      LLDB_LOGF(
+                          log,
                           "Found a re-exported symbol: %s at 0x%" PRIx64 ".",
                           actual_symbol->GetName().GetCString(), load_addr);
                     }
@@ -874,8 +916,9 @@
                 addr_t load_addr =
                     addr_range.GetBaseAddress().GetLoadAddress(target_sp.get());
 
-                log->Printf("Found an indirect target symbol at 0x%" PRIx64 ".",
-                            load_addr);
+                LLDB_LOGF(log,
+                          "Found an indirect target symbol at 0x%" PRIx64 ".",
+                          load_addr);
               }
             }
           }
@@ -890,13 +933,13 @@
       if (actual_symbol) {
         Address target_addr(actual_symbol->GetAddress());
         if (target_addr.IsValid()) {
-          if (log)
-            log->Printf(
-                "Found a re-exported symbol: %s pointing to: %s at 0x%" PRIx64
-                ".",
-                current_symbol->GetName().GetCString(),
-                actual_symbol->GetName().GetCString(),
-                target_addr.GetLoadAddress(target_sp.get()));
+          LLDB_LOGF(
+              log,
+              "Found a re-exported symbol: %s pointing to: %s at 0x%" PRIx64
+              ".",
+              current_symbol->GetName().GetCString(),
+              actual_symbol->GetName().GetCString(),
+              target_addr.GetLoadAddress(target_sp.get()));
           addresses.push_back(target_addr.GetLoadAddress(target_sp.get()));
         }
       }
@@ -915,10 +958,10 @@
               &symbol_address, error);
           if (error.Success()) {
             load_addrs.push_back(resolved_addr);
-            if (log)
-              log->Printf("ResolveIndirectFunction found resolved target for "
-                          "%s at 0x%" PRIx64 ".",
-                          symbol->GetName().GetCString(), resolved_addr);
+            LLDB_LOGF(log,
+                      "ResolveIndirectFunction found resolved target for "
+                      "%s at 0x%" PRIx64 ".",
+                      symbol->GetName().GetCString(), resolved_addr);
           }
         } else {
           load_addrs.push_back(address.GetLoadAddress(target_sp.get()));
@@ -928,22 +971,19 @@
           thread, load_addrs, stop_others);
     }
   } else {
-    if (log)
-      log->Printf("Could not find symbol for step through.");
+    LLDB_LOGF(log, "Could not find symbol for step through.");
   }
 
   return thread_plan_sp;
 }
 
-size_t DynamicLoaderDarwin::FindEquivalentSymbols(
+void DynamicLoaderDarwin::FindEquivalentSymbols(
     lldb_private::Symbol *original_symbol, lldb_private::ModuleList &images,
     lldb_private::SymbolContextList &equivalent_symbols) {
   ConstString trampoline_name = original_symbol->GetMangled().GetName(
       original_symbol->GetLanguage(), Mangled::ePreferMangled);
   if (!trampoline_name)
-    return 0;
-
-  size_t initial_size = equivalent_symbols.GetSize();
+    return;
 
   static const char *resolver_name_regex = "(_gc|_non_gc|\\$[A-Za-z0-9\\$]+)$";
   std::string equivalent_regex_buf("^");
@@ -951,11 +991,9 @@
   equivalent_regex_buf.append(resolver_name_regex);
 
   RegularExpression equivalent_name_regex(equivalent_regex_buf);
-  const bool append = true;
   images.FindSymbolsMatchingRegExAndType(equivalent_name_regex, eSymbolTypeCode,
-                                         equivalent_symbols, append);
+                                         equivalent_symbols);
 
-  return equivalent_symbols.GetSize() - initial_size;
 }
 
 lldb::ModuleSP DynamicLoaderDarwin::GetPThreadLibraryModule() {
@@ -966,8 +1004,8 @@
     module_spec.GetFileSpec().GetFilename().SetCString(
         "libsystem_pthread.dylib");
     ModuleList module_list;
-    if (m_process->GetTarget().GetImages().FindModules(module_spec,
-                                                       module_list)) {
+    m_process->GetTarget().GetImages().FindModules(module_spec, module_list);
+    if (!module_list.IsEmpty()) {
       if (module_list.GetSize() == 1) {
         module_sp = module_list.GetModuleAtIndex(0);
         if (module_sp)
@@ -1035,7 +1073,7 @@
         StackFrameSP frame_sp = thread_sp->GetStackFrameAtIndex(0);
         if (frame_sp) {
           ClangASTContext *clang_ast_context =
-              target.GetScratchClangASTContext();
+              ClangASTContext::GetScratch(target);
 
           if (!clang_ast_context)
             return LLDB_INVALID_ADDRESS;
@@ -1109,11 +1147,11 @@
 
   if (log) {
     if (use_new_spi_interface)
-      log->Printf(
-          "DynamicLoaderDarwin::UseDYLDSPI: Use new DynamicLoader plugin");
+      LLDB_LOGF(
+          log, "DynamicLoaderDarwin::UseDYLDSPI: Use new DynamicLoader plugin");
     else
-      log->Printf(
-          "DynamicLoaderDarwin::UseDYLDSPI: Use old DynamicLoader plugin");
+      LLDB_LOGF(
+          log, "DynamicLoaderDarwin::UseDYLDSPI: Use old DynamicLoader plugin");
   }
   return use_new_spi_interface;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h b/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
index aac0a5d..ea7a900 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.h
@@ -41,7 +41,7 @@
   lldb::ThreadPlanSP GetStepThroughTrampolinePlan(lldb_private::Thread &thread,
                                                   bool stop_others) override;
 
-  size_t FindEquivalentSymbols(
+  void FindEquivalentSymbols(
       lldb_private::Symbol *original_symbol,
       lldb_private::ModuleList &module_list,
       lldb_private::SymbolContextList &equivalent_symbols) override;
@@ -95,25 +95,34 @@
   };
 
   struct ImageInfo {
-    lldb::addr_t address;  // Address of mach header for this dylib
-    lldb::addr_t slide;    // The amount to slide all segments by if there is a
-                           // global slide.
-    lldb::addr_t mod_date; // Modification date for this dylib
-    lldb_private::FileSpec file_spec; // Resolved path for this dylib
-    lldb_private::UUID
-        uuid; // UUID for this dylib if it has one, else all zeros
-    llvm::MachO::mach_header header; // The mach header for this image
-    std::vector<Segment> segments;   // All segment vmaddr and vmsize pairs for
-                                   // this executable (from memory of inferior)
-    uint32_t load_stop_id; // The process stop ID that the sections for this
-                           // image were loaded
-    llvm::Triple::OSType os_type;   // LC_VERSION_MIN_... load command os type
-    std::string min_version_os_sdk; // LC_VERSION_MIN_... sdk value
+    /// Address of mach header for this dylib.
+    lldb::addr_t address = LLDB_INVALID_ADDRESS;
+    /// The amount to slide all segments by if there is a global
+    /// slide.
+    lldb::addr_t slide = 0;
+    /// Modification date for this dylib.
+    lldb::addr_t mod_date = 0;
+    /// Resolved path for this dylib.
+    lldb_private::FileSpec file_spec;
+    /// UUID for this dylib if it has one, else all zeros.
+    lldb_private::UUID uuid;
+    /// The mach header for this image.
+    llvm::MachO::mach_header header;
+    /// All segment vmaddr and vmsize pairs for this executable (from
+    /// memory of inferior).
+    std::vector<Segment> segments;
+    /// The process stop ID that the sections for this image were
+    /// loaded.
+    uint32_t load_stop_id = 0;
+    /// LC_VERSION_MIN_... load command os type.
+    llvm::Triple::OSType os_type = llvm::Triple::OSType::UnknownOS;
+    /// LC_VERSION_MIN_... load command os environment.
+    llvm::Triple::EnvironmentType os_env =
+        llvm::Triple::EnvironmentType::UnknownEnvironment;
+    /// LC_VERSION_MIN_... SDK.
+    std::string min_version_os_sdk;
 
-    ImageInfo()
-        : address(LLDB_INVALID_ADDRESS), slide(0), mod_date(0), file_spec(),
-          uuid(), header(), segments(), load_stop_id(0),
-          os_type(llvm::Triple::OSType::UnknownOS), min_version_os_sdk() {}
+    ImageInfo() = default;
 
     void Clear(bool load_cmd_data_only) {
       if (!load_cmd_data_only) {
@@ -127,6 +136,7 @@
       segments.clear();
       load_stop_id = 0;
       os_type = llvm::Triple::OSType::UnknownOS;
+      os_env = llvm::Triple::EnvironmentType::UnknownEnvironment;
       min_version_os_sdk.clear();
     }
 
@@ -135,7 +145,8 @@
              mod_date == rhs.mod_date && file_spec == rhs.file_spec &&
              uuid == rhs.uuid &&
              memcmp(&header, &rhs.header, sizeof(header)) == 0 &&
-             segments == rhs.segments && os_type == rhs.os_type;
+             segments == rhs.segments && os_type == rhs.os_type &&
+             os_env == rhs.os_env;
     }
 
     bool UUIDValid() const { return uuid.IsValid(); }
@@ -150,10 +161,7 @@
       return 0;
     }
 
-    lldb_private::ArchSpec GetArchitecture() const {
-      return lldb_private::ArchSpec(lldb_private::eArchTypeMachO,
-                                    header.cputype, header.cpusubtype);
-    }
+    lldb_private::ArchSpec GetArchitecture() const;
 
     const Segment *FindSegment(lldb_private::ConstString name) const;
 
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp b/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
index 6bc65ec..fd7d94f 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp
@@ -173,9 +173,8 @@
           ->GetAsArray()) {
     if (JSONImageInformationIntoImageInfo(all_image_info_json_sp,
                                           image_infos)) {
-      if (log)
-        log->Printf("Initial module fetch:  Adding %" PRId64 " modules.\n",
-                    (uint64_t)image_infos.size());
+      LLDB_LOGF(log, "Initial module fetch:  Adding %" PRId64 " modules.\n",
+                (uint64_t)image_infos.size());
 
       UpdateSpecialBinariesFromNewImageInfos(image_infos);
       AddModulesUsingImageInfos(image_infos);
@@ -224,7 +223,10 @@
     // get the values from the ABI:
 
     ClangASTContext *clang_ast_context =
-        process->GetTarget().GetScratchClangASTContext();
+        ClangASTContext::GetScratch(process->GetTarget());
+    if (!clang_ast_context)
+      return false;
+
     ValueList argument_values;
 
     Value mode_value;    // enum dyld_notify_mode { dyld_notify_adding=0,
@@ -310,8 +312,8 @@
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
   ImageInfo::collection image_infos;
 
-  if (log)
-    log->Printf("Adding %" PRId64 " modules.", (uint64_t)load_addresses.size());
+  LLDB_LOGF(log, "Adding %" PRId64 " modules.",
+            (uint64_t)load_addresses.size());
   StructuredData::ObjectSP binaries_info_sp =
       m_process->GetLoadedDynamicLibrariesInfos(load_addresses);
   if (binaries_info_sp.get() && binaries_info_sp->GetAsDictionary() &&
@@ -371,22 +373,18 @@
 addr_t
 DynamicLoaderMacOS::GetDyldLockVariableAddressFromModule(Module *module) {
   SymbolContext sc;
-  SymbolVendor *sym_vendor = module->GetSymbolVendor();
   Target &target = m_process->GetTarget();
-  if (sym_vendor) {
-    Symtab *symtab = sym_vendor->GetSymtab();
-    if (symtab) {
-      std::vector<uint32_t> match_indexes;
-      ConstString g_symbol_name("_dyld_global_lock_held");
-      uint32_t num_matches = 0;
-      num_matches =
-          symtab->AppendSymbolIndexesWithName(g_symbol_name, match_indexes);
-      if (num_matches == 1) {
-        Symbol *symbol = symtab->SymbolAtIndex(match_indexes[0]);
-        if (symbol &&
-            (symbol->ValueIsAddress() || symbol->GetAddressRef().IsValid())) {
-          return symbol->GetAddressRef().GetOpcodeLoadAddress(&target);
-        }
+  if (Symtab *symtab = module->GetSymtab()) {
+    std::vector<uint32_t> match_indexes;
+    ConstString g_symbol_name("_dyld_global_lock_held");
+    uint32_t num_matches = 0;
+    num_matches =
+        symtab->AppendSymbolIndexesWithName(g_symbol_name, match_indexes);
+    if (num_matches == 1) {
+      Symbol *symbol = symtab->SymbolAtIndex(match_indexes[0]);
+      if (symbol &&
+          (symbol->ValueIsAddress() || symbol->GetAddressRef().IsValid())) {
+        return symbol->GetAddressRef().GetOpcodeLoadAddress(&target);
       }
     }
   }
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
index 53424f0..253215b 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
@@ -234,7 +234,8 @@
       ReadDYLDInfoFromMemoryAndSetNotificationCallback(0x7fff5fc00000ull);
     } else if (exe_arch.GetMachine() == llvm::Triple::arm ||
                exe_arch.GetMachine() == llvm::Triple::thumb ||
-               exe_arch.GetMachine() == llvm::Triple::aarch64) {
+               exe_arch.GetMachine() == llvm::Triple::aarch64 ||
+               exe_arch.GetMachine() == llvm::Triple::aarch64_32) {
       ReadDYLDInfoFromMemoryAndSetNotificationCallback(0x2fe00000);
     } else {
       ReadDYLDInfoFromMemoryAndSetNotificationCallback(0x8fe00000);
@@ -341,7 +342,10 @@
     // get the values from the ABI:
 
     ClangASTContext *clang_ast_context =
-        process->GetTarget().GetScratchClangASTContext();
+        ClangASTContext::GetScratch(process->GetTarget());
+    if (!clang_ast_context)
+      return false;
+
     ValueList argument_values;
     Value input_value;
 
@@ -525,8 +529,7 @@
     lldb::addr_t image_infos_addr, uint32_t image_infos_count) {
   ImageInfo::collection image_infos;
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-  if (log)
-    log->Printf("Adding %d modules.\n", image_infos_count);
+  LLDB_LOGF(log, "Adding %d modules.\n", image_infos_count);
 
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   std::lock_guard<std::recursive_mutex> baseclass_guard(GetMutex());
@@ -581,14 +584,13 @@
     return false;
   }
 
-  if (log)
-    log->Printf("Removing %d modules.", image_infos_count);
+  LLDB_LOGF(log, "Removing %d modules.", image_infos_count);
 
   ModuleList unloaded_module_list;
   for (uint32_t idx = 0; idx < image_infos.size(); ++idx) {
     if (log) {
-      log->Printf("Removing module at address=0x%16.16" PRIx64 ".",
-                  image_infos[idx].address);
+      LLDB_LOGF(log, "Removing module at address=0x%16.16" PRIx64 ".",
+                image_infos[idx].address);
       image_infos[idx].PutToLog(log);
     }
 
@@ -617,7 +619,7 @@
           unloaded_module_list.AppendIfNeeded(unload_image_module_sp);
         } else {
           if (log) {
-            log->Printf("Could not find module for unloading info entry:");
+            LLDB_LOGF(log, "Could not find module for unloading info entry:");
             image_infos[idx].PutToLog(log);
           }
         }
@@ -631,7 +633,7 @@
 
     if (pos == end) {
       if (log) {
-        log->Printf("Could not find image_info entry for unloading image:");
+        LLDB_LOGF(log, "Could not find image_info entry for unloading image:");
         image_infos[idx].PutToLog(log);
       }
     }
@@ -735,8 +737,8 @@
       if (!module_sp->IsLoadedInTarget(&target)) {
         if (log) {
           StreamString s;
-          module_sp->GetDescription(&s);
-          log->Printf("Unloading pre-run module: %s.", s.GetData());
+          module_sp->GetDescription(s.AsRawOstream());
+          LLDB_LOGF(log, "Unloading pre-run module: %s.", s.GetData());
         }
         not_loaded_modules.Append(module_sp);
       }
@@ -975,12 +977,13 @@
 
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   std::lock_guard<std::recursive_mutex> baseclass_guard(GetMutex());
-  log->Printf(
-      "dyld_all_image_infos = { version=%d, count=%d, addr=0x%8.8" PRIx64
-      ", notify=0x%8.8" PRIx64 " }",
-      m_dyld_all_image_infos.version, m_dyld_all_image_infos.dylib_info_count,
-      (uint64_t)m_dyld_all_image_infos.dylib_info_addr,
-      (uint64_t)m_dyld_all_image_infos.notification);
+  LLDB_LOGF(log,
+            "dyld_all_image_infos = { version=%d, count=%d, addr=0x%8.8" PRIx64
+            ", notify=0x%8.8" PRIx64 " }",
+            m_dyld_all_image_infos.version,
+            m_dyld_all_image_infos.dylib_info_count,
+            (uint64_t)m_dyld_all_image_infos.dylib_info_addr,
+            (uint64_t)m_dyld_all_image_infos.notification);
   size_t i;
   const size_t count = m_dyld_image_infos.size();
   if (count > 0) {
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp b/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
index 0d73673..7375993 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
@@ -33,16 +33,14 @@
   Status error;
 
   if (!process) {
-    if (log)
-      log->Printf("%s null process provided", __FUNCTION__);
+    LLDB_LOGF(log, "%s null process provided", __FUNCTION__);
     return LLDB_INVALID_ADDRESS;
   }
 
   // Try to get it from our process.  This might be a remote process and might
   // grab it via some remote-specific mechanism.
   info_location = process->GetImageInfoAddress();
-  if (log)
-    log->Printf("%s info_location = 0x%" PRIx64, __FUNCTION__, info_location);
+  LLDB_LOGF(log, "%s info_location = 0x%" PRIx64, __FUNCTION__, info_location);
 
   // If the process fails to return an address, fall back to seeing if the
   // local object file can help us find it.
@@ -54,42 +52,38 @@
 
       if (addr.IsValid()) {
         info_location = addr.GetLoadAddress(target);
-        if (log)
-          log->Printf(
-              "%s resolved via direct object file approach to 0x%" PRIx64,
-              __FUNCTION__, info_location);
+        LLDB_LOGF(log,
+                  "%s resolved via direct object file approach to 0x%" PRIx64,
+                  __FUNCTION__, info_location);
       } else {
-        if (log)
-          log->Printf("%s FAILED - direct object file approach did not yield a "
-                      "valid address",
-                      __FUNCTION__);
+        LLDB_LOGF(log,
+                  "%s FAILED - direct object file approach did not yield a "
+                  "valid address",
+                  __FUNCTION__);
       }
     }
   }
 
   if (info_location == LLDB_INVALID_ADDRESS) {
-    if (log)
-      log->Printf("%s FAILED - invalid info address", __FUNCTION__);
+    LLDB_LOGF(log, "%s FAILED - invalid info address", __FUNCTION__);
     return LLDB_INVALID_ADDRESS;
   }
 
-  if (log)
-    log->Printf("%s reading pointer (%" PRIu32 " bytes) from 0x%" PRIx64,
-                __FUNCTION__, process->GetAddressByteSize(), info_location);
+  LLDB_LOGF(log, "%s reading pointer (%" PRIu32 " bytes) from 0x%" PRIx64,
+            __FUNCTION__, process->GetAddressByteSize(), info_location);
 
   info_addr = process->ReadPointerFromMemory(info_location, error);
   if (error.Fail()) {
-    if (log)
-      log->Printf("%s FAILED - could not read from the info location: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log, "%s FAILED - could not read from the info location: %s",
+              __FUNCTION__, error.AsCString());
     return LLDB_INVALID_ADDRESS;
   }
 
   if (info_addr == 0) {
-    if (log)
-      log->Printf("%s FAILED - the rendezvous address contained at 0x%" PRIx64
-                  " returned a null value",
-                  __FUNCTION__, info_location);
+    LLDB_LOGF(log,
+              "%s FAILED - the rendezvous address contained at 0x%" PRIx64
+              " returned a null value",
+              __FUNCTION__, info_location);
     return LLDB_INVALID_ADDRESS;
   }
 
@@ -109,14 +103,13 @@
     Module *exe_mod = m_process->GetTarget().GetExecutableModulePointer();
     if (exe_mod) {
       m_exe_file_spec = exe_mod->GetPlatformFileSpec();
-      if (log)
-        log->Printf("DYLDRendezvous::%s exe module executable path set: '%s'",
-                    __FUNCTION__, m_exe_file_spec.GetCString());
+      LLDB_LOGF(log, "DYLDRendezvous::%s exe module executable path set: '%s'",
+                __FUNCTION__, m_exe_file_spec.GetCString());
     } else {
-      if (log)
-        log->Printf("DYLDRendezvous::%s cannot cache exe module path: null "
-                    "executable module pointer",
-                    __FUNCTION__);
+      LLDB_LOGF(log,
+                "DYLDRendezvous::%s cannot cache exe module path: null "
+                "executable module pointer",
+                __FUNCTION__);
     }
   }
 }
@@ -133,17 +126,16 @@
 
   address_size = m_process->GetAddressByteSize();
   padding = address_size - word_size;
-  if (log)
-    log->Printf("DYLDRendezvous::%s address size: %" PRIu64
-                ", padding %" PRIu64,
-                __FUNCTION__, uint64_t(address_size), uint64_t(padding));
+  LLDB_LOGF(log,
+            "DYLDRendezvous::%s address size: %" PRIu64 ", padding %" PRIu64,
+            __FUNCTION__, uint64_t(address_size), uint64_t(padding));
 
   if (m_rendezvous_addr == LLDB_INVALID_ADDRESS)
     cursor = info_addr = ResolveRendezvousAddress(m_process);
   else
     cursor = info_addr = m_rendezvous_addr;
-  if (log)
-    log->Printf("DYLDRendezvous::%s cursor = 0x%" PRIx64, __FUNCTION__, cursor);
+  LLDB_LOGF(log, "DYLDRendezvous::%s cursor = 0x%" PRIx64, __FUNCTION__,
+            cursor);
 
   if (cursor == LLDB_INVALID_ADDRESS)
     return false;
@@ -168,7 +160,10 @@
   m_previous = m_current;
   m_current = info;
 
-  if (UpdateSOEntries(true))
+  if (m_current.map_addr == 0)
+    return false;
+
+  if (UpdateSOEntriesFromRemote())
     return true;
 
   return UpdateSOEntries();
@@ -178,53 +173,91 @@
   return m_rendezvous_addr != LLDB_INVALID_ADDRESS;
 }
 
-bool DYLDRendezvous::UpdateSOEntries(bool fromRemote) {
-  SOEntry entry;
-  LoadedModuleInfoList module_list;
+DYLDRendezvous::RendezvousAction DYLDRendezvous::GetAction() const {
+  switch (m_current.state) {
 
-  // If we can't get the SO info from the remote, return failure.
-  if (fromRemote && m_process->LoadModules(module_list) == 0)
-    return false;
+  case eConsistent:
+    switch (m_previous.state) {
+    // When the previous and current states are consistent this is the first
+    // time we have been asked to update.  Just take a snapshot of the
+    // currently loaded modules.
+    case eConsistent:
+      return eTakeSnapshot;
+    // If we are about to add or remove a shared object clear out the current
+    // state and take a snapshot of the currently loaded images.
+    case eAdd:
+      return eAddModules;
+    case eDelete:
+      return eRemoveModules;
+    }
+    break;
 
-  if (!fromRemote && m_current.map_addr == 0)
-    return false;
-
-  // When the previous and current states are consistent this is the first time
-  // we have been asked to update.  Just take a snapshot of the currently
-  // loaded modules.
-  if (m_previous.state == eConsistent && m_current.state == eConsistent)
-    return fromRemote ? SaveSOEntriesFromRemote(module_list)
-                      : TakeSnapshot(m_soentries);
-
-  // If we are about to add or remove a shared object clear out the current
-  // state and take a snapshot of the currently loaded images.
-  if (m_current.state == eAdd || m_current.state == eDelete) {
-    // Some versions of the android dynamic linker might send two notifications
-    // with state == eAdd back to back. Ignore them until we get an eConsistent
-    // notification.
+  case eAdd:
+  case eDelete:
+    // Some versions of the android dynamic linker might send two
+    // notifications with state == eAdd back to back. Ignore them until we
+    // get an eConsistent notification.
     if (!(m_previous.state == eConsistent ||
           (m_previous.state == eAdd && m_current.state == eDelete)))
-      return false;
+      return eNoAction;
 
+    return eTakeSnapshot;
+  }
+
+  return eNoAction;
+}
+
+bool DYLDRendezvous::UpdateSOEntriesFromRemote() {
+  auto action = GetAction();
+
+  if (action == eNoAction)
+    return false;
+
+  if (action == eTakeSnapshot) {
+    m_added_soentries.clear();
+    m_removed_soentries.clear();
+    // We already have the loaded list from the previous update so no need to
+    // find all the modules again.
+    if (!m_loaded_modules.m_list.empty())
+      return true;
+  }
+
+  llvm::Expected<LoadedModuleInfoList> module_list =
+      m_process->GetLoadedModuleList();
+  if (!module_list) {
+    llvm::consumeError(module_list.takeError());
+    return false;
+  }
+
+  switch (action) {
+  case eTakeSnapshot:
     m_soentries.clear();
-    if (fromRemote)
-      return SaveSOEntriesFromRemote(module_list);
+    return SaveSOEntriesFromRemote(*module_list);
+  case eAddModules:
+    return AddSOEntriesFromRemote(*module_list);
+  case eRemoveModules:
+    return RemoveSOEntriesFromRemote(*module_list);
+  case eNoAction:
+    return false;
+  }
+  llvm_unreachable("Fully covered switch above!");
+}
 
+bool DYLDRendezvous::UpdateSOEntries() {
+  switch (GetAction()) {
+  case eTakeSnapshot:
+    m_soentries.clear();
     m_added_soentries.clear();
     m_removed_soentries.clear();
     return TakeSnapshot(m_soentries);
+  case eAddModules:
+    return AddSOEntries();
+  case eRemoveModules:
+    return RemoveSOEntries();
+  case eNoAction:
+    return false;
   }
-  assert(m_current.state == eConsistent);
-
-  // Otherwise check the previous state to determine what to expect and update
-  // accordingly.
-  if (m_previous.state == eAdd)
-    return fromRemote ? AddSOEntriesFromRemote(module_list) : AddSOEntries();
-  else if (m_previous.state == eDelete)
-    return fromRemote ? RemoveSOEntriesFromRemote(module_list)
-                      : RemoveSOEntries();
-
-  return false;
+  llvm_unreachable("Fully covered switch above!");
 }
 
 bool DYLDRendezvous::FillSOEntryFromModuleInfo(
@@ -255,7 +288,7 @@
 }
 
 bool DYLDRendezvous::SaveSOEntriesFromRemote(
-    LoadedModuleInfoList &module_list) {
+    const LoadedModuleInfoList &module_list) {
   for (auto const &modInfo : module_list.m_list) {
     SOEntry entry;
     if (!FillSOEntryFromModuleInfo(modInfo, entry))
@@ -270,7 +303,8 @@
   return true;
 }
 
-bool DYLDRendezvous::AddSOEntriesFromRemote(LoadedModuleInfoList &module_list) {
+bool DYLDRendezvous::AddSOEntriesFromRemote(
+    const LoadedModuleInfoList &module_list) {
   for (auto const &modInfo : module_list.m_list) {
     bool found = false;
     for (auto const &existing : m_loaded_modules.m_list) {
@@ -288,8 +322,10 @@
       return false;
 
     // Only add shared libraries and not the executable.
-    if (!SOEntryIsMainExecutable(entry))
+    if (!SOEntryIsMainExecutable(entry)) {
       m_soentries.push_back(entry);
+      m_added_soentries.push_back(entry);
+    }
   }
 
   m_loaded_modules = module_list;
@@ -297,7 +333,7 @@
 }
 
 bool DYLDRendezvous::RemoveSOEntriesFromRemote(
-    LoadedModuleInfoList &module_list) {
+    const LoadedModuleInfoList &module_list) {
   for (auto const &existing : m_loaded_modules.m_list) {
     bool found = false;
     for (auto const &modInfo : module_list.m_list) {
@@ -321,6 +357,7 @@
         return false;
 
       m_soentries.erase(pos);
+      m_removed_soentries.push_back(entry);
     }
   }
 
@@ -521,9 +558,10 @@
   Target &target = m_process->GetTarget();
 
   SymbolContextList list;
-  if (!target.GetImages().FindSymbolsWithNameAndType(ConstString(name),
-                                                     eSymbolTypeAny, list))
-    return false;
+  target.GetImages().FindSymbolsWithNameAndType(ConstString(name),
+                                                eSymbolTypeAny, list);
+  if (list.IsEmpty())
+  return false;
 
   Address address = list[0].symbol->GetAddress();
   addr_t addr = address.GetLoadAddress(&target);
@@ -569,16 +607,16 @@
     return;
 
   log->PutCString("DYLDRendezvous:");
-  log->Printf("   Address: %" PRIx64, GetRendezvousAddress());
-  log->Printf("   Version: %" PRIu64, GetVersion());
-  log->Printf("   Link   : %" PRIx64, GetLinkMapAddress());
-  log->Printf("   Break  : %" PRIx64, GetBreakAddress());
-  log->Printf("   LDBase : %" PRIx64, GetLDBase());
-  log->Printf("   State  : %s",
-              (state == eConsistent)
-                  ? "consistent"
-                  : (state == eAdd) ? "add" : (state == eDelete) ? "delete"
-                                                                 : "unknown");
+  LLDB_LOGF(log, "   Address: %" PRIx64, GetRendezvousAddress());
+  LLDB_LOGF(log, "   Version: %" PRIu64, GetVersion());
+  LLDB_LOGF(log, "   Link   : %" PRIx64, GetLinkMapAddress());
+  LLDB_LOGF(log, "   Break  : %" PRIx64, GetBreakAddress());
+  LLDB_LOGF(log, "   LDBase : %" PRIx64, GetLDBase());
+  LLDB_LOGF(log, "   State  : %s",
+            (state == eConsistent)
+                ? "consistent"
+                : (state == eAdd) ? "add"
+                                  : (state == eDelete) ? "delete" : "unknown");
 
   iterator I = begin();
   iterator E = end();
@@ -587,11 +625,11 @@
     log->PutCString("DYLDRendezvous SOEntries:");
 
   for (int i = 1; I != E; ++I, ++i) {
-    log->Printf("\n   SOEntry [%d] %s", i, I->file_spec.GetCString());
-    log->Printf("      Base : %" PRIx64, I->base_addr);
-    log->Printf("      Path : %" PRIx64, I->path_addr);
-    log->Printf("      Dyn  : %" PRIx64, I->dyn_addr);
-    log->Printf("      Next : %" PRIx64, I->next);
-    log->Printf("      Prev : %" PRIx64, I->prev);
+    LLDB_LOGF(log, "\n   SOEntry [%d] %s", i, I->file_spec.GetCString());
+    LLDB_LOGF(log, "      Base : %" PRIx64, I->base_addr);
+    LLDB_LOGF(log, "      Path : %" PRIx64, I->path_addr);
+    LLDB_LOGF(log, "      Dyn  : %" PRIx64, I->dyn_addr);
+    LLDB_LOGF(log, "      Next : %" PRIx64, I->next);
+    LLDB_LOGF(log, "      Prev : %" PRIx64, I->prev);
   }
 }
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h b/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
index 993e62f..536eeea 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.h
@@ -222,16 +222,20 @@
 
   /// Updates the current set of SOEntries, the set of added entries, and the
   /// set of removed entries.
-  bool UpdateSOEntries(bool fromRemote = false);
+  bool UpdateSOEntries();
+
+  /// Same as UpdateSOEntries but it gets the list of loaded modules from the
+  /// remote debug server (faster when supported).
+  bool UpdateSOEntriesFromRemote();
 
   bool FillSOEntryFromModuleInfo(
       LoadedModuleInfoList::LoadedModuleInfo const &modInfo, SOEntry &entry);
 
-  bool SaveSOEntriesFromRemote(LoadedModuleInfoList &module_list);
+  bool SaveSOEntriesFromRemote(const LoadedModuleInfoList &module_list);
 
-  bool AddSOEntriesFromRemote(LoadedModuleInfoList &module_list);
+  bool AddSOEntriesFromRemote(const LoadedModuleInfoList &module_list);
 
-  bool RemoveSOEntriesFromRemote(LoadedModuleInfoList &module_list);
+  bool RemoveSOEntriesFromRemote(const LoadedModuleInfoList &module_list);
 
   bool AddSOEntries();
 
@@ -248,6 +252,17 @@
   enum PThreadField { eSize, eNElem, eOffset };
 
   bool FindMetadata(const char *name, PThreadField field, uint32_t &value);
+
+  enum RendezvousAction {
+    eNoAction,
+    eTakeSnapshot,
+    eAddModules,
+    eRemoveModules
+  };
+
+  /// Returns the current action to be taken given the current and previous
+  /// state
+  RendezvousAction GetAction() const;
 };
 
 #endif
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp b/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
index b556608..9d61c8f 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -85,32 +85,31 @@
 
 void DynamicLoaderPOSIXDYLD::DidAttach() {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::%s() pid %" PRIu64, __FUNCTION__,
-                m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID);
-  m_auxv = llvm::make_unique<AuxVector>(m_process->GetAuxvData());
+  LLDB_LOGF(log, "DynamicLoaderPOSIXDYLD::%s() pid %" PRIu64, __FUNCTION__,
+            m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID);
+  m_auxv = std::make_unique<AuxVector>(m_process->GetAuxvData());
 
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64 " reloaded auxv data",
-                __FUNCTION__,
-                m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID);
+  LLDB_LOGF(
+      log, "DynamicLoaderPOSIXDYLD::%s pid %" PRIu64 " reloaded auxv data",
+      __FUNCTION__, m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID);
 
   // ask the process if it can load any of its own modules
-  m_process->LoadModules();
+  auto error = m_process->LoadModules();
+  LLDB_LOG_ERROR(log, std::move(error), "Couldn't load modules: {0}");
 
   ModuleSP executable_sp = GetTargetExecutable();
   ResolveExecutableModule(executable_sp);
 
   // find the main process load offset
   addr_t load_offset = ComputeLoadOffset();
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
-                " executable '%s', load_offset 0x%" PRIx64,
-                __FUNCTION__,
-                m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID,
-                executable_sp ? executable_sp->GetFileSpec().GetPath().c_str()
-                              : "<null executable>",
-                load_offset);
+  LLDB_LOGF(log,
+            "DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
+            " executable '%s', load_offset 0x%" PRIx64,
+            __FUNCTION__,
+            m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID,
+            executable_sp ? executable_sp->GetFileSpec().GetPath().c_str()
+                          : "<null executable>",
+            load_offset);
 
   EvalSpecialModulesStatus();
 
@@ -137,12 +136,12 @@
     ModuleList module_list;
 
     module_list.Append(executable_sp);
-    if (log)
-      log->Printf("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
-                  " added executable '%s' to module load list",
-                  __FUNCTION__,
-                  m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID,
-                  executable_sp->GetFileSpec().GetPath().c_str());
+    LLDB_LOGF(log,
+              "DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
+              " added executable '%s' to module load list",
+              __FUNCTION__,
+              m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID,
+              executable_sp->GetFileSpec().GetPath().c_str());
 
     UpdateLoadedSections(executable_sp, LLDB_INVALID_ADDRESS, load_offset,
                          true);
@@ -151,14 +150,15 @@
 
     m_process->GetTarget().ModulesDidLoad(module_list);
     if (log) {
-      log->Printf("DynamicLoaderPOSIXDYLD::%s told the target about the "
-                  "modules that loaded:",
-                  __FUNCTION__);
+      LLDB_LOGF(log,
+                "DynamicLoaderPOSIXDYLD::%s told the target about the "
+                "modules that loaded:",
+                __FUNCTION__);
       for (auto module_sp : module_list.Modules()) {
-        log->Printf("-- [module] %s (pid %" PRIu64 ")",
-                    module_sp ? module_sp->GetFileSpec().GetPath().c_str()
-                              : "<null>",
-                    m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID);
+        LLDB_LOGF(log, "-- [module] %s (pid %" PRIu64 ")",
+                  module_sp ? module_sp->GetFileSpec().GetPath().c_str()
+                            : "<null>",
+                  m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID);
       }
     }
   }
@@ -174,13 +174,12 @@
 
 void DynamicLoaderPOSIXDYLD::DidLaunch() {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "DynamicLoaderPOSIXDYLD::%s()", __FUNCTION__);
 
   ModuleSP executable;
   addr_t load_offset;
 
-  m_auxv = llvm::make_unique<AuxVector>(m_process->GetAuxvData());
+  m_auxv = std::make_unique<AuxVector>(m_process->GetAuxvData());
 
   executable = GetTargetExecutable();
   load_offset = ComputeLoadOffset();
@@ -191,9 +190,8 @@
     module_list.Append(executable);
     UpdateLoadedSections(executable, LLDB_INVALID_ADDRESS, load_offset, true);
 
-    if (log)
-      log->Printf("DynamicLoaderPOSIXDYLD::%s about to call ProbeEntry()",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "DynamicLoaderPOSIXDYLD::%s about to call ProbeEntry()",
+              __FUNCTION__);
 
     if (!SetRendezvousBreakpoint()) {
       // If we cannot establish rendezvous breakpoint right now we'll try again
@@ -227,22 +225,20 @@
 
   const addr_t entry = GetEntryPoint();
   if (entry == LLDB_INVALID_ADDRESS) {
-    if (log)
-      log->Printf(
-          "DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
-          " GetEntryPoint() returned no address, not setting entry breakpoint",
-          __FUNCTION__,
-          m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID);
+    LLDB_LOGF(
+        log,
+        "DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
+        " GetEntryPoint() returned no address, not setting entry breakpoint",
+        __FUNCTION__, m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID);
     return;
   }
 
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
-                " GetEntryPoint() returned address 0x%" PRIx64
-                ", setting entry breakpoint",
-                __FUNCTION__,
-                m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID,
-                entry);
+  LLDB_LOGF(log,
+            "DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
+            " GetEntryPoint() returned address 0x%" PRIx64
+            ", setting entry breakpoint",
+            __FUNCTION__,
+            m_process ? m_process->GetID() : LLDB_INVALID_PROCESS_ID, entry);
 
   if (m_process) {
     Breakpoint *const entry_break =
@@ -271,11 +267,10 @@
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
   DynamicLoaderPOSIXDYLD *const dyld_instance =
       static_cast<DynamicLoaderPOSIXDYLD *>(baton);
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::%s called for pid %" PRIu64,
-                __FUNCTION__,
-                dyld_instance->m_process ? dyld_instance->m_process->GetID()
-                                         : LLDB_INVALID_PROCESS_ID);
+  LLDB_LOGF(log, "DynamicLoaderPOSIXDYLD::%s called for pid %" PRIu64,
+            __FUNCTION__,
+            dyld_instance->m_process ? dyld_instance->m_process->GetID()
+                                     : LLDB_INVALID_PROCESS_ID);
 
   // Disable the breakpoint --- if a stop happens right after this, which we've
   // seen on occasion, we don't want the breakpoint stepping thread-plan logic
@@ -287,22 +282,22 @@
     BreakpointSP breakpoint_sp =
         dyld_instance->m_process->GetTarget().GetBreakpointByID(break_id);
     if (breakpoint_sp) {
-      if (log)
-        log->Printf("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
-                    " disabling breakpoint id %" PRIu64,
-                    __FUNCTION__, dyld_instance->m_process->GetID(), break_id);
+      LLDB_LOGF(log,
+                "DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
+                " disabling breakpoint id %" PRIu64,
+                __FUNCTION__, dyld_instance->m_process->GetID(), break_id);
       breakpoint_sp->SetEnabled(false);
     } else {
-      if (log)
-        log->Printf("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
-                    " failed to find breakpoint for breakpoint id %" PRIu64,
-                    __FUNCTION__, dyld_instance->m_process->GetID(), break_id);
+      LLDB_LOGF(log,
+                "DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
+                " failed to find breakpoint for breakpoint id %" PRIu64,
+                __FUNCTION__, dyld_instance->m_process->GetID(), break_id);
     }
   } else {
-    if (log)
-      log->Printf("DynamicLoaderPOSIXDYLD::%s breakpoint id %" PRIu64
-                  " no Process instance!  Cannot disable breakpoint",
-                  __FUNCTION__, break_id);
+    LLDB_LOGF(log,
+              "DynamicLoaderPOSIXDYLD::%s breakpoint id %" PRIu64
+              " no Process instance!  Cannot disable breakpoint",
+              __FUNCTION__, break_id);
   }
 
   dyld_instance->LoadAllCurrentModules();
@@ -393,23 +388,22 @@
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
   DynamicLoaderPOSIXDYLD *const dyld_instance =
       static_cast<DynamicLoaderPOSIXDYLD *>(baton);
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::%s called for pid %" PRIu64,
-                __FUNCTION__,
-                dyld_instance->m_process ? dyld_instance->m_process->GetID()
-                                         : LLDB_INVALID_PROCESS_ID);
+  LLDB_LOGF(log, "DynamicLoaderPOSIXDYLD::%s called for pid %" PRIu64,
+            __FUNCTION__,
+            dyld_instance->m_process ? dyld_instance->m_process->GetID()
+                                     : LLDB_INVALID_PROCESS_ID);
 
   dyld_instance->RefreshModules();
 
   // Return true to stop the target, false to just let the target run.
   const bool stop_when_images_change = dyld_instance->GetStopWhenImagesChange();
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
-                " stop_when_images_change=%s",
-                __FUNCTION__,
-                dyld_instance->m_process ? dyld_instance->m_process->GetID()
-                                         : LLDB_INVALID_PROCESS_ID,
-                stop_when_images_change ? "true" : "false");
+  LLDB_LOGF(log,
+            "DynamicLoaderPOSIXDYLD::%s pid %" PRIu64
+            " stop_when_images_change=%s",
+            __FUNCTION__,
+            dyld_instance->m_process ? dyld_instance->m_process->GetID()
+                                     : LLDB_INVALID_PROCESS_ID,
+            stop_when_images_change ? "true" : "false");
   return stop_when_images_change;
 }
 
@@ -562,10 +556,10 @@
   LoadVDSO();
 
   if (!m_rendezvous.Resolve()) {
-    if (log)
-      log->Printf("DynamicLoaderPOSIXDYLD::%s unable to resolve POSIX DYLD "
-                  "rendezvous address",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "DynamicLoaderPOSIXDYLD::%s unable to resolve POSIX DYLD "
+              "rendezvous address",
+              __FUNCTION__);
     return;
   }
 
@@ -589,10 +583,10 @@
       module_list.Append(module_sp);
     } else {
       Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-      if (log)
-        log->Printf(
-            "DynamicLoaderPOSIXDYLD::%s failed loading module %s at 0x%" PRIx64,
-            __FUNCTION__, I->file_spec.GetCString(), I->base_addr);
+      LLDB_LOGF(
+          log,
+          "DynamicLoaderPOSIXDYLD::%s failed loading module %s at 0x%" PRIx64,
+          __FUNCTION__, I->file_spec.GetCString(), I->base_addr);
     }
   }
 
@@ -697,12 +691,12 @@
   addr_t tls_block = ReadPointer(dtv_slot + metadata.tls_offset);
 
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::Performed TLS lookup: "
-                "module=%s, link_map=0x%" PRIx64 ", tp=0x%" PRIx64
-                ", modid=%" PRId64 ", tls_block=0x%" PRIx64 "\n",
-                module_sp->GetObjectName().AsCString(""), link_map, tp,
-                (int64_t)modid, tls_block);
+  LLDB_LOGF(log,
+            "DynamicLoaderPOSIXDYLD::Performed TLS lookup: "
+            "module=%s, link_map=0x%" PRIx64 ", tp=0x%" PRIx64
+            ", modid=%" PRId64 ", tls_block=0x%" PRIx64 "\n",
+            module_sp->GetObjectName().AsCString(""), link_map, tp,
+            (int64_t)modid, tls_block);
 
   if (tls_block == LLDB_INVALID_ADDRESS)
     return LLDB_INVALID_ADDRESS;
@@ -722,18 +716,17 @@
 
   ProcessInstanceInfo process_info;
   if (!m_process->GetProcessInfo(process_info)) {
-    if (log)
-      log->Printf("DynamicLoaderPOSIXDYLD::%s - failed to get process info for "
-                  "pid %" PRIu64,
-                  __FUNCTION__, m_process->GetID());
+    LLDB_LOGF(log,
+              "DynamicLoaderPOSIXDYLD::%s - failed to get process info for "
+              "pid %" PRIu64,
+              __FUNCTION__, m_process->GetID());
     return;
   }
 
-  if (log)
-    log->Printf("DynamicLoaderPOSIXDYLD::%s - got executable by pid %" PRIu64
-                ": %s",
-                __FUNCTION__, m_process->GetID(),
-                process_info.GetExecutableFile().GetPath().c_str());
+  LLDB_LOGF(
+      log, "DynamicLoaderPOSIXDYLD::%s - got executable by pid %" PRIu64 ": %s",
+      __FUNCTION__, m_process->GetID(),
+      process_info.GetExecutableFile().GetPath().c_str());
 
   ModuleSpec module_spec(process_info.GetExecutableFile(),
                          process_info.GetArchitecture());
@@ -748,10 +741,10 @@
     StreamString stream;
     module_spec.Dump(stream);
 
-    if (log)
-      log->Printf("DynamicLoaderPOSIXDYLD::%s - failed to resolve executable "
-                  "with module spec \"%s\": %s",
-                  __FUNCTION__, stream.GetData(), error.AsCString());
+    LLDB_LOGF(log,
+              "DynamicLoaderPOSIXDYLD::%s - failed to resolve executable "
+              "with module spec \"%s\": %s",
+              __FUNCTION__, stream.GetData(), error.AsCString());
     return;
   }
 
diff --git a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
index fa3fbe0..25ab30e 100644
--- a/src/llvm-project/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
@@ -122,38 +122,37 @@
 
 void DynamicLoaderWindowsDYLD::DidAttach() {
     Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-  if (log)
-    log->Printf("DynamicLoaderWindowsDYLD::%s()", __FUNCTION__);
+    LLDB_LOGF(log, "DynamicLoaderWindowsDYLD::%s()", __FUNCTION__);
 
-  ModuleSP executable = GetTargetExecutable();
+    ModuleSP executable = GetTargetExecutable();
 
-  if (!executable.get())
-    return;
+    if (!executable.get())
+      return;
 
-  // Try to fetch the load address of the file from the process, since there
-  // could be randomization of the load address.
-  lldb::addr_t load_addr = GetLoadAddress(executable);
-  if (load_addr == LLDB_INVALID_ADDRESS)
-    return;
+    // Try to fetch the load address of the file from the process, since there
+    // could be randomization of the load address.
+    lldb::addr_t load_addr = GetLoadAddress(executable);
+    if (load_addr == LLDB_INVALID_ADDRESS)
+      return;
 
-  // Request the process base address.
-  lldb::addr_t image_base = m_process->GetImageInfoAddress();
-  if (image_base == load_addr)
-    return;
+    // Request the process base address.
+    lldb::addr_t image_base = m_process->GetImageInfoAddress();
+    if (image_base == load_addr)
+      return;
 
-  // Rebase the process's modules if there is a mismatch.
-  UpdateLoadedSections(executable, LLDB_INVALID_ADDRESS, load_addr, false);
+    // Rebase the process's modules if there is a mismatch.
+    UpdateLoadedSections(executable, LLDB_INVALID_ADDRESS, load_addr, false);
 
-  ModuleList module_list;
-  module_list.Append(executable);
-  m_process->GetTarget().ModulesDidLoad(module_list);
-  m_process->LoadModules();
+    ModuleList module_list;
+    module_list.Append(executable);
+    m_process->GetTarget().ModulesDidLoad(module_list);
+    auto error = m_process->LoadModules();
+    LLDB_LOG_ERROR(log, std::move(error), "failed to load modules: {0}");
 }
 
 void DynamicLoaderWindowsDYLD::DidLaunch() {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
-  if (log)
-    log->Printf("DynamicLoaderWindowsDYLD::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "DynamicLoaderWindowsDYLD::%s()", __FUNCTION__);
 
   ModuleSP executable = GetTargetExecutable();
   if (!executable.get())
@@ -167,7 +166,8 @@
     ModuleList module_list;
     module_list.Append(executable);
     m_process->GetTarget().ModulesDidLoad(module_list);
-    m_process->LoadModules();
+    auto error = m_process->LoadModules();
+    LLDB_LOG_ERROR(log, std::move(error), "failed to load modules: {0}");
   }
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp
deleted file mode 100644
index 369f883..0000000
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp
+++ /dev/null
@@ -1,108 +0,0 @@
-//===-- ASTDumper.cpp -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "ASTDumper.h"
-
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangUtil.h"
-#include "lldb/Symbol/CompilerType.h"
-#include "lldb/Utility/Log.h"
-
-#include "llvm/Support/raw_ostream.h"
-
-using namespace lldb_private;
-
-ASTDumper::ASTDumper(clang::Decl *decl) {
-  clang::DeclContext *decl_ctx = llvm::dyn_cast<clang::DeclContext>(decl);
-
-  bool has_external_lexical_storage;
-  bool has_external_visible_storage;
-
-  if (decl_ctx) {
-    has_external_lexical_storage = decl_ctx->hasExternalLexicalStorage();
-    has_external_visible_storage = decl_ctx->hasExternalVisibleStorage();
-    decl_ctx->setHasExternalLexicalStorage(false);
-    decl_ctx->setHasExternalVisibleStorage(false);
-  }
-
-  llvm::raw_string_ostream os(m_dump);
-  decl->print(os);
-  os.flush();
-
-  if (decl_ctx) {
-    decl_ctx->setHasExternalLexicalStorage(has_external_lexical_storage);
-    decl_ctx->setHasExternalVisibleStorage(has_external_visible_storage);
-  }
-}
-
-ASTDumper::ASTDumper(clang::DeclContext *decl_ctx) {
-  bool has_external_lexical_storage = decl_ctx->hasExternalLexicalStorage();
-  bool has_external_visible_storage = decl_ctx->hasExternalVisibleStorage();
-
-  decl_ctx->setHasExternalLexicalStorage(false);
-  decl_ctx->setHasExternalVisibleStorage(false);
-
-  if (clang::Decl *decl = llvm::dyn_cast<clang::Decl>(decl_ctx)) {
-    llvm::raw_string_ostream os(m_dump);
-    decl->print(os);
-    os.flush();
-  } else {
-    m_dump.assign("<DeclContext is not a Decl>");
-  }
-
-  decl_ctx->setHasExternalLexicalStorage(has_external_lexical_storage);
-  decl_ctx->setHasExternalVisibleStorage(has_external_visible_storage);
-}
-
-ASTDumper::ASTDumper(const clang::Type *type) {
-  m_dump = clang::QualType(type, 0).getAsString();
-}
-
-ASTDumper::ASTDumper(clang::QualType type) { m_dump = type.getAsString(); }
-
-ASTDumper::ASTDumper(lldb::opaque_compiler_type_t type) {
-  m_dump = clang::QualType::getFromOpaquePtr(type).getAsString();
-}
-
-ASTDumper::ASTDumper(const CompilerType &compiler_type) {
-  m_dump = ClangUtil::GetQualType(compiler_type).getAsString();
-}
-
-const char *ASTDumper::GetCString() { return m_dump.c_str(); }
-
-void ASTDumper::ToSTDERR() { fprintf(stderr, "%s\n", m_dump.c_str()); }
-
-void ASTDumper::ToLog(Log *log, const char *prefix) {
-  size_t len = m_dump.length() + 1;
-
-  char *alloc = (char *)malloc(len);
-  char *str = alloc;
-
-  memcpy(str, m_dump.c_str(), len);
-
-  char *end = nullptr;
-
-  end = strchr(str, '\n');
-
-  while (end) {
-    *end = '\0';
-
-    log->Printf("%s%s", prefix, str);
-
-    *end = '\n';
-
-    str = end + 1;
-    end = strchr(str, '\n');
-  }
-
-  log->Printf("%s%s", prefix, str);
-
-  free(alloc);
-}
-
-void ASTDumper::ToStream(lldb::StreamSP &stream) { stream->PutCString(m_dump); }
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.h
deleted file mode 100644
index ddf055d..0000000
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//===-- ASTDumper.h ---------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ASTDumper_h_
-#define liblldb_ASTDumper_h_
-
-#include "clang/AST/DeclVisitor.h"
-#include "clang/AST/TypeVisitor.h"
-
-#include "lldb/Utility/Stream.h"
-#include "llvm/ADT/DenseSet.h"
-
-namespace lldb_private {
-
-class ASTDumper {
-public:
-  ASTDumper(clang::Decl *decl);
-  ASTDumper(clang::DeclContext *decl_ctx);
-  ASTDumper(const clang::Type *type);
-  ASTDumper(clang::QualType type);
-  ASTDumper(lldb::opaque_compiler_type_t type);
-  ASTDumper(const CompilerType &compiler_type);
-
-  const char *GetCString();
-  void ToSTDERR();
-  void ToLog(Log *log, const char *prefix);
-  void ToStream(lldb::StreamSP &stream);
-
-private:
-  std::string m_dump;
-};
-
-} // namespace lldb_private
-
-#endif
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
index 526ef90..77bb954 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp
@@ -58,13 +58,13 @@
   if (NamedDecl *named_decl = dyn_cast<NamedDecl>(D)) {
     if (log && log->GetVerbose()) {
       if (named_decl->getIdentifier())
-        log->Printf("TransformTopLevelDecl(%s)",
-                    named_decl->getIdentifier()->getNameStart());
+        LLDB_LOGF(log, "TransformTopLevelDecl(%s)",
+                  named_decl->getIdentifier()->getNameStart());
       else if (ObjCMethodDecl *method_decl = dyn_cast<ObjCMethodDecl>(D))
-        log->Printf("TransformTopLevelDecl(%s)",
-                    method_decl->getSelector().getAsString().c_str());
+        LLDB_LOGF(log, "TransformTopLevelDecl(%s)",
+                  method_decl->getSelector().getAsString().c_str());
       else
-        log->Printf("TransformTopLevelDecl(<complex>)");
+        LLDB_LOGF(log, "TransformTopLevelDecl(<complex>)");
     }
 
     if (m_top_level) {
@@ -130,7 +130,7 @@
 
     os.flush();
 
-    log->Printf("Untransformed function AST:\n%s", s.c_str());
+    LLDB_LOGF(log, "Untransformed function AST:\n%s", s.c_str());
   }
 
   Stmt *function_body = function_decl->getBody();
@@ -146,7 +146,7 @@
 
     os.flush();
 
-    log->Printf("Transformed function AST:\n%s", s.c_str());
+    LLDB_LOGF(log, "Transformed function AST:\n%s", s.c_str());
   }
 
   return ret;
@@ -170,7 +170,7 @@
 
     os.flush();
 
-    log->Printf("Untransformed method AST:\n%s", s.c_str());
+    LLDB_LOGF(log, "Untransformed method AST:\n%s", s.c_str());
   }
 
   Stmt *method_body = MethodDecl->getBody();
@@ -190,7 +190,7 @@
 
     os.flush();
 
-    log->Printf("Transformed method AST:\n%s", s.c_str());
+    LLDB_LOGF(log, "Transformed method AST:\n%s", s.c_str());
   }
 
   return ret;
@@ -308,8 +308,8 @@
   if (log) {
     std::string s = expr_qual_type.getAsString();
 
-    log->Printf("Last statement is an %s with type: %s",
-                (is_lvalue ? "lvalue" : "rvalue"), s.c_str());
+    LLDB_LOGF(log, "Last statement is an %s with type: %s",
+              (is_lvalue ? "lvalue" : "rvalue"), s.c_str());
   }
 
   clang::VarDecl *result_decl = nullptr;
@@ -388,8 +388,7 @@
   // replace the old statement with the new one
   //
 
-  *last_stmt_ptr =
-      reinterpret_cast<Stmt *>(result_initialization_stmt_result.get());
+  *last_stmt_ptr = static_cast<Stmt *>(result_initialization_stmt_result.get());
 
   return true;
 }
@@ -422,8 +421,7 @@
 
   ConstString name_cs(name.str().c_str());
 
-  if (log)
-    log->Printf("Recording persistent type %s\n", name_cs.GetCString());
+  LLDB_LOGF(log, "Recording persistent type %s\n", name_cs.GetCString());
 
   m_decls.push_back(D);
 }
@@ -443,20 +441,26 @@
 
   ConstString name_cs(name.str().c_str());
 
-  if (log)
-    log->Printf("Recording persistent decl %s\n", name_cs.GetCString());
+  LLDB_LOGF(log, "Recording persistent decl %s\n", name_cs.GetCString());
 
   m_decls.push_back(D);
 }
 
 void ASTResultSynthesizer::CommitPersistentDecls() {
+  auto *state =
+      m_target.GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC);
+  if (!state)
+    return;
+
+  auto *persistent_vars = llvm::cast<ClangPersistentVariables>(state);
+  ClangASTContext *scratch_ctx = ClangASTContext::GetScratch(m_target);
+
   for (clang::NamedDecl *decl : m_decls) {
     StringRef name = decl->getName();
     ConstString name_cs(name.str().c_str());
 
     Decl *D_scratch = m_target.GetClangASTImporter()->DeportDecl(
-        m_target.GetScratchClangASTContext()->getASTContext(), m_ast_context,
-        decl);
+        &scratch_ctx->getASTContext(), decl);
 
     if (!D_scratch) {
       Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
@@ -467,17 +471,15 @@
         decl->dump(ss);
         ss.flush();
 
-        log->Printf("Couldn't commit persistent  decl: %s\n", s.c_str());
+        LLDB_LOGF(log, "Couldn't commit persistent  decl: %s\n", s.c_str());
       }
 
       continue;
     }
 
     if (NamedDecl *NamedDecl_scratch = dyn_cast<NamedDecl>(D_scratch))
-      llvm::cast<ClangPersistentVariables>(
-          m_target.GetPersistentExpressionStateForLanguage(
-              lldb::eLanguageTypeC))
-          ->RegisterPersistentDecl(name_cs, NamedDecl_scratch);
+      persistent_vars->RegisterPersistentDecl(name_cs, NamedDecl_scratch,
+                                              scratch_ctx);
   }
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
index 670ba6d..0b0f3b9 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h
@@ -135,18 +135,11 @@
   void RecordPersistentTypes(clang::DeclContext *FunDeclCtx);
 
   /// Given a TypeDecl, if it declares a type whose name starts with a dollar
-  /// sign, register it as a pointer type in the target's scratch
-  /// AST context.
-  ///
-  /// \param[in] Body
-  ///     The body of the function.
+  /// sign, register it as a pointer type in the target's scratch AST context.
   void MaybeRecordPersistentType(clang::TypeDecl *D);
 
   /// Given a NamedDecl, register it as a pointer type in the target's scratch
   /// AST context.
-  ///
-  /// \param[in] Body
-  ///     The body of the function.
   void RecordPersistentDecl(clang::NamedDecl *D);
 
   clang::ASTContext
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp
index 190eaca..a164d48 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp
@@ -30,8 +30,8 @@
                                        const char *struct_name,
                                        ClangFunctionCaller &function)
     : m_ast_context(nullptr), m_passthrough(passthrough),
-      m_passthrough_sema(nullptr), m_sema(nullptr), m_action(nullptr),
-      m_function(function), m_struct_name(struct_name) {
+      m_passthrough_sema(nullptr), m_sema(nullptr), m_function(function),
+      m_struct_name(struct_name) {
   if (!m_passthrough)
     return;
 
@@ -170,7 +170,6 @@
 
 void ASTStructExtractor::InitializeSema(Sema &S) {
   m_sema = &S;
-  m_action = reinterpret_cast<Action *>(m_sema);
 
   if (m_passthrough_sema)
     m_passthrough_sema->InitializeSema(S);
@@ -178,7 +177,6 @@
 
 void ASTStructExtractor::ForgetSema() {
   m_sema = nullptr;
-  m_action = nullptr;
 
   if (m_passthrough_sema)
     m_passthrough_sema->ForgetSema();
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h
index 7aef2e2..078cf09 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.h
@@ -121,8 +121,6 @@
                                            ///for passthrough.  NULL if it's an
                                            ///ASTConsumer.
   clang::Sema *m_sema;                     ///< The Sema to use.
-  clang::Action
-      *m_action; ///< The Sema to use, cast to an Action so it's usable.
 
   ClangFunctionCaller &m_function; ///< The function to populate with
                                    ///information about the argument structure.
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt
index 950dae6..e92d089 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CMakeLists.txt
@@ -3,11 +3,11 @@
 endif()
 
 add_lldb_library(lldbPluginExpressionParserClang PLUGIN
-  ASTDumper.cpp
   ASTResultSynthesizer.cpp
   ASTStructExtractor.cpp
   ASTUtils.cpp
   ClangASTSource.cpp
+  ClangDeclVendor.cpp
   ClangExpressionDeclMap.cpp
   ClangExpressionParser.cpp
   ClangExpressionSourceCode.cpp
@@ -18,6 +18,7 @@
   ClangPersistentVariables.cpp
   ClangUserExpression.cpp
   ClangUtilityFunction.cpp
+  CppModuleConfiguration.cpp
   IRForTarget.cpp
   IRDynamicChecks.cpp
 
@@ -25,6 +26,16 @@
   ${tablegen_deps}
 
   LINK_LIBS
+    lldbCore
+    lldbExpression
+    lldbHost
+    lldbInterpreter
+    lldbSymbol
+    lldbTarget
+    lldbUtility
+    lldbPluginCPlusPlusLanguage
+    lldbPluginCPPRuntime
+  CLANG_LIBS
     clangAST
     clangCodeGen
     clangDriver
@@ -36,15 +47,6 @@
     clangRewriteFrontend
     clangSema
     clangSerialization
-    lldbCore
-    lldbExpression
-    lldbHost
-    lldbInterpreter
-    lldbSymbol
-    lldbTarget
-    lldbUtility
-    lldbPluginCPlusPlusLanguage
-    lldbPluginCPPRuntime
   LINK_COMPONENTS
     Core
     ExecutionEngine
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
index c5778f8..42927ab 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
@@ -8,7 +8,7 @@
 
 #include "ClangASTSource.h"
 
-#include "ASTDumper.h"
+#include "ClangDeclVendor.h"
 #include "ClangModulesDeclVendor.h"
 
 #include "lldb/Core/Module.h"
@@ -18,7 +18,6 @@
 #include "lldb/Symbol/CompilerDeclContext.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/Log.h"
@@ -50,114 +49,42 @@
 };
 }
 
-ClangASTSource::ClangASTSource(const lldb::TargetSP &target)
+ClangASTSource::ClangASTSource(const lldb::TargetSP &target,
+                               const lldb::ClangASTImporterSP &importer)
     : m_import_in_progress(false), m_lookups_enabled(false), m_target(target),
       m_ast_context(nullptr), m_active_lexical_decls(), m_active_lookups() {
-  if (!target->GetUseModernTypeLookup()) {
-    m_ast_importer_sp = m_target->GetClangASTImporter();
-  }
+  m_ast_importer_sp = importer;
 }
 
-void ClangASTSource::InstallASTContext(clang::ASTContext &ast_context,
-                                       clang::FileManager &file_manager,
-                                       bool is_shared_context) {
-  m_ast_context = &ast_context;
-  m_file_manager = &file_manager;
-  if (m_target->GetUseModernTypeLookup()) {
-    // Configure the ExternalASTMerger.  The merger needs to be able to import
-    // types from any source that we would do lookups in, which includes the
-    // persistent AST context as well as the modules and Objective-C runtime
-    // AST contexts.
-
-    lldbassert(!m_merger_up);
-    clang::ExternalASTMerger::ImporterTarget target = {ast_context,
-                                                       file_manager};
-    std::vector<clang::ExternalASTMerger::ImporterSource> sources;
-    for (lldb::ModuleSP module_sp : m_target->GetImages().Modules()) {
-      if (auto *module_ast_ctx = llvm::cast_or_null<ClangASTContext>(
-              module_sp->GetTypeSystemForLanguage(lldb::eLanguageTypeC))) {
-        lldbassert(module_ast_ctx->getASTContext());
-        lldbassert(module_ast_ctx->getFileManager());
-        sources.push_back({*module_ast_ctx->getASTContext(),
-                           *module_ast_ctx->getFileManager(),
-                           module_ast_ctx->GetOriginMap()
-        });
-      }
-    }
-
-    do {
-      lldb::ProcessSP process(m_target->GetProcessSP());
-
-      if (!process)
-        break;
-
-      ObjCLanguageRuntime *language_runtime(ObjCLanguageRuntime::Get(*process));
-
-      if (!language_runtime)
-        break;
-
-      DeclVendor *runtime_decl_vendor = language_runtime->GetDeclVendor();
-
-      if (!runtime_decl_vendor)
-        break;
-
-      sources.push_back(runtime_decl_vendor->GetImporterSource());
-    } while (false);
-
-    do {
-      DeclVendor *modules_decl_vendor =
-          m_target->GetClangModulesDeclVendor();
-
-      if (!modules_decl_vendor)
-        break;
-
-      sources.push_back(modules_decl_vendor->GetImporterSource());
-    } while (false);
-
-    if (!is_shared_context) {
-      // Update the scratch AST context's merger to reflect any new sources we
-      // might have come across since the last time an expression was parsed.
-
-      auto scratch_ast_context = static_cast<ClangASTContextForExpressions*>(
-          m_target->GetScratchClangASTContext());
-
-      scratch_ast_context->GetMergerUnchecked().AddSources(sources);
-
-      sources.push_back({*scratch_ast_context->getASTContext(),
-                         *scratch_ast_context->getFileManager(),
-                         scratch_ast_context->GetOriginMap()});
-    }
-    while (false)
-      ;
-
-    m_merger_up =
-        llvm::make_unique<clang::ExternalASTMerger>(target, sources);
-  } else {
-    m_ast_importer_sp->InstallMapCompleter(&ast_context, *this);
-  }
+void ClangASTSource::InstallASTContext(ClangASTContext &clang_ast_context) {
+  m_ast_context = &clang_ast_context.getASTContext();
+  m_clang_ast_context = &clang_ast_context;
+  m_file_manager = &m_ast_context->getSourceManager().getFileManager();
+  m_ast_importer_sp->InstallMapCompleter(m_ast_context, *this);
 }
 
 ClangASTSource::~ClangASTSource() {
-  if (m_ast_importer_sp)
-    m_ast_importer_sp->ForgetDestination(m_ast_context);
+  if (!m_ast_importer_sp)
+    return;
 
+  m_ast_importer_sp->ForgetDestination(m_ast_context);
+
+  if (!m_target)
+    return;
   // We are in the process of destruction, don't create clang ast context on
   // demand by passing false to
   // Target::GetScratchClangASTContext(create_on_demand).
   ClangASTContext *scratch_clang_ast_context =
-      m_target->GetScratchClangASTContext(false);
+      ClangASTContext::GetScratch(*m_target, false);
 
   if (!scratch_clang_ast_context)
     return;
 
-  clang::ASTContext *scratch_ast_context =
+  clang::ASTContext &scratch_ast_context =
       scratch_clang_ast_context->getASTContext();
 
-  if (!scratch_ast_context)
-    return;
-
-  if (m_ast_context != scratch_ast_context && m_ast_importer_sp)
-    m_ast_importer_sp->ForgetSource(scratch_ast_context, m_ast_context);
+  if (m_ast_context != &scratch_ast_context && m_ast_importer_sp)
+    m_ast_importer_sp->ForgetSource(&scratch_ast_context, m_ast_context);
 }
 
 void ClangASTSource::StartTranslationUnit(ASTConsumer *Consumer) {
@@ -273,15 +200,14 @@
   unsigned int current_id = invocation_id++;
 
   if (log) {
-    log->Printf("    CompleteTagDecl[%u] on (ASTContext*)%p Completing "
-                "(TagDecl*)%p named %s",
-                current_id, static_cast<void *>(m_ast_context),
-                static_cast<void *>(tag_decl),
-                tag_decl->getName().str().c_str());
+    LLDB_LOGF(log,
+              "    CompleteTagDecl[%u] on (ASTContext*)%p Completing "
+              "(TagDecl*)%p named %s",
+              current_id, static_cast<void *>(m_ast_context),
+              static_cast<void *>(tag_decl), tag_decl->getName().str().c_str());
 
-    log->Printf("      CTD[%u] Before:", current_id);
-    ASTDumper dumper((Decl *)tag_decl);
-    dumper.ToLog(log, "      [CTD] ");
+    LLDB_LOG(log, "      CTD[%u] Before:\n{0}", current_id,
+             ClangUtil::DumpDecl(tag_decl));
   }
 
   auto iter = m_active_lexical_decls.find(tag_decl);
@@ -291,9 +217,6 @@
   ScopedLexicalDeclEraser eraser(m_active_lexical_decls, tag_decl);
 
   if (!m_ast_importer_sp) {
-    if (HasMerger()) {
-      GetMergerUnchecked().CompleteType(tag_decl);
-    }
     return;
   }
 
@@ -301,10 +224,10 @@
     // We couldn't complete the type.  Maybe there's a definition somewhere
     // else that can be completed.
 
-    if (log)
-      log->Printf("      CTD[%u] Type could not be completed in the module in "
-                  "which it was first found.",
-                  current_id);
+    LLDB_LOGF(log,
+              "      CTD[%u] Type could not be completed in the module in "
+              "which it was first found.",
+              current_id);
 
     bool found = false;
 
@@ -316,9 +239,9 @@
           m_ast_importer_sp->GetNamespaceMap(namespace_context);
 
       if (log && log->GetVerbose())
-        log->Printf("      CTD[%u] Inspecting namespace map %p (%d entries)",
-                    current_id, static_cast<void *>(namespace_map.get()),
-                    static_cast<int>(namespace_map->size()));
+        LLDB_LOGF(log, "      CTD[%u] Inspecting namespace map %p (%d entries)",
+                  current_id, static_cast<void *>(namespace_map.get()),
+                  static_cast<int>(namespace_map->size()));
 
       if (!namespace_map)
         return;
@@ -326,10 +249,9 @@
       for (ClangASTImporter::NamespaceMap::iterator i = namespace_map->begin(),
                                                     e = namespace_map->end();
            i != e && !found; ++i) {
-        if (log)
-          log->Printf("      CTD[%u] Searching namespace %s in module %s",
-                      current_id, i->second.GetName().AsCString(),
-                      i->first->GetFileSpec().GetFilename().GetCString());
+        LLDB_LOGF(log, "      CTD[%u] Searching namespace %s in module %s",
+                  current_id, i->second.GetName().AsCString(),
+                  i->first->GetFileSpec().GetFilename().GetCString());
 
         TypeList types;
 
@@ -366,7 +288,6 @@
       TypeList types;
 
       ConstString name(tag_decl->getName().str().c_str());
-      CompilerDeclContext namespace_decl;
 
       const ModuleList &module_list = m_target->GetImages();
 
@@ -408,49 +329,30 @@
     }
   }
 
-  if (log) {
-    log->Printf("      [CTD] After:");
-    ASTDumper dumper((Decl *)tag_decl);
-    dumper.ToLog(log, "      [CTD] ");
-  }
+  LLDB_LOG(log, "      [CTD] After:\n{0}", ClangUtil::DumpDecl(tag_decl));
 }
 
 void ClangASTSource::CompleteType(clang::ObjCInterfaceDecl *interface_decl) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log) {
-    log->Printf("    [CompleteObjCInterfaceDecl] on (ASTContext*)%p Completing "
-                "an ObjCInterfaceDecl named %s",
-                static_cast<void *>(m_ast_context),
-                interface_decl->getName().str().c_str());
-    log->Printf("      [COID] Before:");
-    ASTDumper dumper((Decl *)interface_decl);
-    dumper.ToLog(log, "      [COID] ");
-  }
+  LLDB_LOGF(log,
+            "    [CompleteObjCInterfaceDecl] on (ASTContext*)%p Completing "
+            "an ObjCInterfaceDecl named %s",
+            static_cast<void *>(m_ast_context),
+            interface_decl->getName().str().c_str());
+  LLDB_LOG(log, "      [COID] Before:\n{0}",
+           ClangUtil::DumpDecl(interface_decl));
 
   if (!m_ast_importer_sp) {
-    if (HasMerger()) {
-      ObjCInterfaceDecl *complete_iface_decl =
-        GetCompleteObjCInterface(interface_decl);
-
-      if (complete_iface_decl && (complete_iface_decl != interface_decl)) {
-        m_merger_up->ForceRecordOrigin(interface_decl, {complete_iface_decl, &complete_iface_decl->getASTContext()});
-      }
-
-      GetMergerUnchecked().CompleteType(interface_decl);
-    } else {
-      lldbassert(0 && "No mechanism for completing a type!");
-    }
+    lldbassert(0 && "No mechanism for completing a type!");
     return;
   }
 
-  Decl *original_decl = nullptr;
-  ASTContext *original_ctx = nullptr;
+  ClangASTImporter::DeclOrigin original = m_ast_importer_sp->GetDeclOrigin(interface_decl);
 
-  if (m_ast_importer_sp->ResolveDeclOrigin(interface_decl, &original_decl,
-                                           &original_ctx)) {
+  if (original.Valid()) {
     if (ObjCInterfaceDecl *original_iface_decl =
-            dyn_cast<ObjCInterfaceDecl>(original_decl)) {
+            dyn_cast<ObjCInterfaceDecl>(original.decl)) {
       ObjCInterfaceDecl *complete_iface_decl =
           GetCompleteObjCInterface(original_iface_decl);
 
@@ -467,9 +369,8 @@
     CompleteType(interface_decl->getSuperClass());
 
   if (log) {
-    log->Printf("      [COID] After:");
-    ASTDumper dumper((Decl *)interface_decl);
-    dumper.ToLog(log, "      [COID] ");
+    LLDB_LOGF(log, "      [COID] After:");
+    LLDB_LOG(log, "      [COID] {0}", ClangUtil::DumpDecl(interface_decl));
   }
 }
 
@@ -519,23 +420,9 @@
     llvm::function_ref<bool(Decl::Kind)> predicate,
     llvm::SmallVectorImpl<Decl *> &decls) {
 
-  if (HasMerger()) {
-    if (auto *interface_decl = dyn_cast<ObjCInterfaceDecl>(decl_context)) {
-      ObjCInterfaceDecl *complete_iface_decl =
-         GetCompleteObjCInterface(interface_decl);
-
-      if (complete_iface_decl && (complete_iface_decl != interface_decl)) {
-        m_merger_up->ForceRecordOrigin(interface_decl, {complete_iface_decl, &complete_iface_decl->getASTContext()});
-      }
-    }
-    return GetMergerUnchecked().FindExternalLexicalDecls(decl_context,
-                                                         predicate,
-                                                         decls);
-  } else if (!m_ast_importer_sp)
+  if (!m_ast_importer_sp)
     return;
 
-  ClangASTMetrics::RegisterLexicalQuery();
-
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
   const Decl *context_decl = dyn_cast<Decl>(decl_context);
@@ -554,60 +441,58 @@
 
   if (log) {
     if (const NamedDecl *context_named_decl = dyn_cast<NamedDecl>(context_decl))
-      log->Printf(
+      LLDB_LOGF(
+          log,
           "FindExternalLexicalDecls[%u] on (ASTContext*)%p in '%s' (%sDecl*)%p",
           current_id, static_cast<void *>(m_ast_context),
           context_named_decl->getNameAsString().c_str(),
           context_decl->getDeclKindName(),
           static_cast<const void *>(context_decl));
     else if (context_decl)
-      log->Printf(
-          "FindExternalLexicalDecls[%u] on (ASTContext*)%p in (%sDecl*)%p",
+      LLDB_LOGF(
+          log, "FindExternalLexicalDecls[%u] on (ASTContext*)%p in (%sDecl*)%p",
           current_id, static_cast<void *>(m_ast_context),
           context_decl->getDeclKindName(),
           static_cast<const void *>(context_decl));
     else
-      log->Printf(
+      LLDB_LOGF(
+          log,
           "FindExternalLexicalDecls[%u] on (ASTContext*)%p in a NULL context",
           current_id, static_cast<const void *>(m_ast_context));
   }
 
-  Decl *original_decl = nullptr;
-  ASTContext *original_ctx = nullptr;
+  ClangASTImporter::DeclOrigin original = m_ast_importer_sp->GetDeclOrigin(context_decl);
 
-  if (!m_ast_importer_sp->ResolveDeclOrigin(context_decl, &original_decl,
-                                            &original_ctx))
+  if (!original.Valid())
     return;
 
-  if (log) {
-    log->Printf("  FELD[%u] Original decl (ASTContext*)%p (Decl*)%p:",
-                current_id, static_cast<void *>(original_ctx),
-                static_cast<void *>(original_decl));
-    ASTDumper(original_decl).ToLog(log, "    ");
-  }
+  LLDB_LOG(
+      log, "  FELD[{0}] Original decl (ASTContext*){1:x} (Decl*){2:x}:\n{3}",
+      current_id, static_cast<void *>(original.ctx),
+      static_cast<void *>(original.decl), ClangUtil::DumpDecl(original.decl));
 
   if (ObjCInterfaceDecl *original_iface_decl =
-          dyn_cast<ObjCInterfaceDecl>(original_decl)) {
+          dyn_cast<ObjCInterfaceDecl>(original.decl)) {
     ObjCInterfaceDecl *complete_iface_decl =
         GetCompleteObjCInterface(original_iface_decl);
 
     if (complete_iface_decl && (complete_iface_decl != original_iface_decl)) {
-      original_decl = complete_iface_decl;
-      original_ctx = &complete_iface_decl->getASTContext();
+      original.decl = complete_iface_decl;
+      original.ctx = &complete_iface_decl->getASTContext();
 
       m_ast_importer_sp->SetDeclOrigin(context_decl, complete_iface_decl);
     }
   }
 
-  if (TagDecl *original_tag_decl = dyn_cast<TagDecl>(original_decl)) {
-    ExternalASTSource *external_source = original_ctx->getExternalSource();
+  if (TagDecl *original_tag_decl = dyn_cast<TagDecl>(original.decl)) {
+    ExternalASTSource *external_source = original.ctx->getExternalSource();
 
     if (external_source)
       external_source->CompleteType(original_tag_decl);
   }
 
   const DeclContext *original_decl_context =
-      dyn_cast<DeclContext>(original_decl);
+      dyn_cast<DeclContext>(original.decl);
 
   if (!original_decl_context)
     return;
@@ -623,16 +508,16 @@
     // See clang::ExternalASTSource::FindExternalLexicalDecls()
     if (predicate(decl->getKind())) {
       if (log) {
-        ASTDumper ast_dumper(decl);
+        std::string ast_dump = ClangUtil::DumpDecl(decl);
         if (const NamedDecl *context_named_decl =
                 dyn_cast<NamedDecl>(context_decl))
-          log->Printf("  FELD[%d] Adding [to %sDecl %s] lexical %sDecl %s",
-                      current_id, context_named_decl->getDeclKindName(),
-                      context_named_decl->getNameAsString().c_str(),
-                      decl->getDeclKindName(), ast_dumper.GetCString());
+          LLDB_LOGF(log, "  FELD[%d] Adding [to %sDecl %s] lexical %sDecl %s",
+                    current_id, context_named_decl->getDeclKindName(),
+                    context_named_decl->getNameAsString().c_str(),
+                    decl->getDeclKindName(), ast_dump.c_str());
         else
-          log->Printf("  FELD[%d] Adding lexical %sDecl %s", current_id,
-                      decl->getDeclKindName(), ast_dumper.GetCString());
+          LLDB_LOGF(log, "  FELD[%d] Adding lexical %sDecl %s", current_id,
+                    decl->getDeclKindName(), ast_dump.c_str());
       }
 
       Decl *copied_decl = CopyDecl(decl);
@@ -667,8 +552,6 @@
 void ClangASTSource::FindExternalVisibleDecls(NameSearchContext &context) {
   assert(m_ast_context);
 
-  ClangASTMetrics::RegisterVisibleQuery();
-
   const ConstString name(context.m_decl_name.getAsString().c_str());
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
@@ -678,41 +561,25 @@
 
   if (log) {
     if (!context.m_decl_context)
-      log->Printf("ClangASTSource::FindExternalVisibleDecls[%u] on "
-                  "(ASTContext*)%p for '%s' in a NULL DeclContext",
-                  current_id, static_cast<void *>(m_ast_context),
-                  name.GetCString());
+      LLDB_LOGF(log,
+                "ClangASTSource::FindExternalVisibleDecls[%u] on "
+                "(ASTContext*)%p for '%s' in a NULL DeclContext",
+                current_id, static_cast<void *>(m_ast_context),
+                name.GetCString());
     else if (const NamedDecl *context_named_decl =
                  dyn_cast<NamedDecl>(context.m_decl_context))
-      log->Printf("ClangASTSource::FindExternalVisibleDecls[%u] on "
-                  "(ASTContext*)%p for '%s' in '%s'",
-                  current_id, static_cast<void *>(m_ast_context),
-                  name.GetCString(),
-                  context_named_decl->getNameAsString().c_str());
+      LLDB_LOGF(log,
+                "ClangASTSource::FindExternalVisibleDecls[%u] on "
+                "(ASTContext*)%p for '%s' in '%s'",
+                current_id, static_cast<void *>(m_ast_context),
+                name.GetCString(),
+                context_named_decl->getNameAsString().c_str());
     else
-      log->Printf("ClangASTSource::FindExternalVisibleDecls[%u] on "
-                  "(ASTContext*)%p for '%s' in a '%s'",
-                  current_id, static_cast<void *>(m_ast_context),
-                  name.GetCString(), context.m_decl_context->getDeclKindName());
-  }
-
-  if (HasMerger() && !isa<TranslationUnitDecl>(context.m_decl_context)
-      /* possibly handle NamespaceDecls here? */) {
-    if (auto *interface_decl =
-    dyn_cast<ObjCInterfaceDecl>(context.m_decl_context)) {
-      ObjCInterfaceDecl *complete_iface_decl =
-      GetCompleteObjCInterface(interface_decl);
-
-      if (complete_iface_decl && (complete_iface_decl != interface_decl)) {
-        GetMergerUnchecked().ForceRecordOrigin(
-            interface_decl,
-            {complete_iface_decl, &complete_iface_decl->getASTContext()});
-      }
-    }
-
-    GetMergerUnchecked().FindExternalVisibleDeclsByName(context.m_decl_context,
-                                                context.m_decl_name);
-    return; // otherwise we may need to fall back
+      LLDB_LOGF(log,
+                "ClangASTSource::FindExternalVisibleDecls[%u] on "
+                "(ASTContext*)%p for '%s' in a '%s'",
+                current_id, static_cast<void *>(m_ast_context),
+                name.GetCString(), context.m_decl_context->getDeclKindName());
   }
 
   context.m_namespace_map = std::make_shared<ClangASTImporter::NamespaceMap>();
@@ -723,9 +590,9 @@
         m_ast_importer_sp->GetNamespaceMap(namespace_context) : nullptr;
 
     if (log && log->GetVerbose())
-      log->Printf("  CAS::FEVD[%u] Inspecting namespace map %p (%d entries)",
-                  current_id, static_cast<void *>(namespace_map.get()),
-                  static_cast<int>(namespace_map->size()));
+      LLDB_LOGF(log, "  CAS::FEVD[%u] Inspecting namespace map %p (%d entries)",
+                current_id, static_cast<void *>(namespace_map.get()),
+                static_cast<int>(namespace_map->size()));
 
     if (!namespace_map)
       return;
@@ -733,14 +600,13 @@
     for (ClangASTImporter::NamespaceMap::iterator i = namespace_map->begin(),
                                                   e = namespace_map->end();
          i != e; ++i) {
-      if (log)
-        log->Printf("  CAS::FEVD[%u] Searching namespace %s in module %s",
-                    current_id, i->second.GetName().AsCString(),
-                    i->first->GetFileSpec().GetFilename().GetCString());
+      LLDB_LOGF(log, "  CAS::FEVD[%u] Searching namespace %s in module %s",
+                current_id, i->second.GetName().AsCString(),
+                i->first->GetFileSpec().GetFilename().GetCString());
 
       FindExternalVisibleDecls(context, i->first, i->second, current_id);
     }
-  } else if (isa<ObjCInterfaceDecl>(context.m_decl_context) && !HasMerger()) {
+  } else if (isa<ObjCInterfaceDecl>(context.m_decl_context)) {
     FindObjCPropertyAndIvarDecls(context);
   } else if (!isa<TranslationUnitDecl>(context.m_decl_context)) {
     // we shouldn't be getting FindExternalVisibleDecls calls for these
@@ -748,8 +614,7 @@
   } else {
     CompilerDeclContext namespace_decl;
 
-    if (log)
-      log->Printf("  CAS::FEVD[%u] Searching the root namespace", current_id);
+    LLDB_LOGF(log, "  CAS::FEVD[%u] Searching the root namespace", current_id);
 
     FindExternalVisibleDecls(context, lldb::ModuleSP(), namespace_decl,
                              current_id);
@@ -757,10 +622,10 @@
 
   if (!context.m_namespace_map->empty()) {
     if (log && log->GetVerbose())
-      log->Printf("  CAS::FEVD[%u] Registering namespace map %p (%d entries)",
-                  current_id,
-                  static_cast<void *>(context.m_namespace_map.get()),
-                  static_cast<int>(context.m_namespace_map->size()));
+      LLDB_LOGF(log,
+                "  CAS::FEVD[%u] Registering namespace map %p (%d entries)",
+                current_id, static_cast<void *>(context.m_namespace_map.get()),
+                static_cast<int>(context.m_namespace_map->size()));
 
     NamespaceDecl *clang_namespace_decl =
         AddNamespace(context, context.m_namespace_map);
@@ -771,7 +636,7 @@
 }
 
 clang::Sema *ClangASTSource::getSema() {
-  return ClangASTContext::GetASTContext(m_ast_context)->getSema();
+  return m_clang_ast_context->getSema();
 }
 
 bool ClangASTSource::IgnoreName(const ConstString name,
@@ -804,27 +669,26 @@
   if (IgnoreName(name, true))
     return;
 
+  if (!m_target)
+    return;
+
   if (module_sp && namespace_decl) {
     CompilerDeclContext found_namespace_decl;
 
-    SymbolVendor *symbol_vendor = module_sp->GetSymbolVendor();
-
-    if (symbol_vendor) {
-      found_namespace_decl =
-          symbol_vendor->FindNamespace(name, &namespace_decl);
+    if (SymbolFile *symbol_file = module_sp->GetSymbolFile()) {
+      found_namespace_decl = symbol_file->FindNamespace(name, &namespace_decl);
 
       if (found_namespace_decl) {
         context.m_namespace_map->push_back(
             std::pair<lldb::ModuleSP, CompilerDeclContext>(
                 module_sp, found_namespace_decl));
 
-        if (log)
-          log->Printf("  CAS::FEVD[%u] Found namespace %s in module %s",
-                      current_id, name.GetCString(),
-                      module_sp->GetFileSpec().GetFilename().GetCString());
+        LLDB_LOGF(log, "  CAS::FEVD[%u] Found namespace %s in module %s",
+                  current_id, name.GetCString(),
+                  module_sp->GetFileSpec().GetFilename().GetCString());
       }
     }
-  } else if (!HasMerger()) {
+  } else {
     const ModuleList &target_images = m_target->GetImages();
     std::lock_guard<std::recursive_mutex> guard(target_images.GetMutex());
 
@@ -836,23 +700,21 @@
 
       CompilerDeclContext found_namespace_decl;
 
-      SymbolVendor *symbol_vendor = image->GetSymbolVendor();
+      SymbolFile *symbol_file = image->GetSymbolFile();
 
-      if (!symbol_vendor)
+      if (!symbol_file)
         continue;
 
-      found_namespace_decl =
-          symbol_vendor->FindNamespace(name, &namespace_decl);
+      found_namespace_decl = symbol_file->FindNamespace(name, &namespace_decl);
 
       if (found_namespace_decl) {
         context.m_namespace_map->push_back(
             std::pair<lldb::ModuleSP, CompilerDeclContext>(
                 image, found_namespace_decl));
 
-        if (log)
-          log->Printf("  CAS::FEVD[%u] Found namespace %s in module %s",
-                      current_id, name.GetCString(),
-                      image->GetFileSpec().GetFilename().GetCString());
+        LLDB_LOGF(log, "  CAS::FEVD[%u] Found namespace %s in module %s",
+                  current_id, name.GetCString(),
+                  image->GetFileSpec().GetFilename().GetCString());
       }
     }
   }
@@ -878,9 +740,9 @@
         if (log) {
           const char *name_string = type_sp->GetName().GetCString();
 
-          log->Printf("  CAS::FEVD[%u] Matching type found for \"%s\": %s",
-                      current_id, name.GetCString(),
-                      (name_string ? name_string : "<anonymous>"));
+          LLDB_LOGF(log, "  CAS::FEVD[%u] Matching type found for \"%s\": %s",
+                    current_id, name.GetCString(),
+                    (name_string ? name_string : "<anonymous>"));
         }
 
         CompilerType full_type = type_sp->GetFullCompilerType();
@@ -888,8 +750,8 @@
         CompilerType copied_clang_type(GuardedCopyType(full_type));
 
         if (!copied_clang_type) {
-          if (log)
-            log->Printf("  CAS::FEVD[%u] - Couldn't export a type", current_id);
+          LLDB_LOGF(log, "  CAS::FEVD[%u] - Couldn't export a type",
+                    current_id);
 
           continue;
         }
@@ -915,9 +777,10 @@
             break;
 
           if (log) {
-            log->Printf("  CAS::FEVD[%u] Matching entity found for \"%s\" in "
-                        "the modules",
-                        current_id, name.GetCString());
+            LLDB_LOGF(log,
+                      "  CAS::FEVD[%u] Matching entity found for \"%s\" in "
+                      "the modules",
+                      current_id, name.GetCString());
           }
 
           clang::NamedDecl *const decl_from_modules = decls[0];
@@ -930,10 +793,10 @@
                 copied_decl ? dyn_cast<clang::NamedDecl>(copied_decl) : nullptr;
 
             if (!copied_named_decl) {
-              if (log)
-                log->Printf(
-                    "  CAS::FEVD[%u] - Couldn't export a type from the modules",
-                    current_id);
+              LLDB_LOGF(
+                  log,
+                  "  CAS::FEVD[%u] - Couldn't export a type from the modules",
+                  current_id);
 
               break;
             }
@@ -971,11 +834,13 @@
         uint32_t max_matches = 1;
         std::vector<clang::NamedDecl *> decls;
 
-        if (!decl_vendor->FindDecls(name, append, max_matches, decls))
+        auto *clang_decl_vendor = llvm::cast<ClangDeclVendor>(decl_vendor);
+        if (!clang_decl_vendor->FindDecls(name, append, max_matches, decls))
           break;
 
         if (log) {
-          log->Printf(
+          LLDB_LOGF(
+              log,
               "  CAS::FEVD[%u] Matching type found for \"%s\" in the runtime",
               current_id, name.GetCString());
         }
@@ -985,10 +850,9 @@
             copied_decl ? dyn_cast<clang::NamedDecl>(copied_decl) : nullptr;
 
         if (!copied_named_decl) {
-          if (log)
-            log->Printf(
-                "  CAS::FEVD[%u] - Couldn't export a type from the runtime",
-                current_id);
+          LLDB_LOGF(log,
+                    "  CAS::FEVD[%u] - Couldn't export a type from the runtime",
+                    current_id);
 
           break;
         }
@@ -1036,11 +900,10 @@
 
 template <class D>
 DeclFromUser<D> DeclFromParser<D>::GetOrigin(ClangASTSource &source) {
-  DeclFromUser<> origin_decl;
-  source.ResolveDeclOrigin(this->decl, &origin_decl.decl, nullptr);
-  if (origin_decl.IsInvalid())
+  ClangASTImporter::DeclOrigin origin = source.GetDeclOrigin(this->decl);
+  if (!origin.Valid())
     return DeclFromUser<D>();
-  return DeclFromUser<D>(dyn_cast<D>(origin_decl.decl));
+  return DeclFromUser<D>(dyn_cast<D>(origin.decl));
 }
 
 template <class D>
@@ -1124,11 +987,8 @@
 
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-    if (log) {
-      ASTDumper dumper((Decl *)copied_method_decl);
-      log->Printf("  CAS::FOMD[%d] found (%s) %s", current_id, log_info,
-                  dumper.GetCString());
-    }
+    LLDB_LOG(log, "  CAS::FOMD[{0}] found ({1}) {2}", current_id, log_info,
+             ClangUtil::DumpDecl(copied_method_decl));
 
     context.AddNamedDecl(copied_method_decl);
   }
@@ -1139,21 +999,6 @@
 void ClangASTSource::FindObjCMethodDecls(NameSearchContext &context) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (HasMerger()) {
-    if (auto *interface_decl = dyn_cast<ObjCInterfaceDecl>(context.m_decl_context)) {
-      ObjCInterfaceDecl *complete_iface_decl =
-          GetCompleteObjCInterface(interface_decl);
-
-      if (complete_iface_decl && (complete_iface_decl != context.m_decl_context)) {
-        m_merger_up->ForceRecordOrigin(interface_decl, {complete_iface_decl, &complete_iface_decl->getASTContext()});
-      }
-    }
-
-    GetMergerUnchecked().FindExternalVisibleDeclsByName(context.m_decl_context,
-                                                        context.m_decl_name);
-    return;
-  }
-
   static unsigned int invocation_id = 0;
   unsigned int current_id = invocation_id++;
 
@@ -1167,17 +1012,13 @@
     return;
 
   do {
-    Decl *original_decl = nullptr;
-    ASTContext *original_ctx = nullptr;
+    ClangASTImporter::DeclOrigin original = m_ast_importer_sp->GetDeclOrigin(interface_decl);
 
-    m_ast_importer_sp->ResolveDeclOrigin(interface_decl, &original_decl,
-                                         &original_ctx);
-
-    if (!original_decl)
+    if (!original.Valid())
       break;
 
     ObjCInterfaceDecl *original_interface_decl =
-        dyn_cast<ObjCInterfaceDecl>(original_decl);
+        dyn_cast<ObjCInterfaceDecl>(original.decl);
 
     if (FindObjCMethodDeclsWithOrigin(current_id, context,
                                       original_interface_decl, "at origin"))
@@ -1205,17 +1046,16 @@
 
   ConstString selector_name(ss.GetString());
 
-  if (log)
-    log->Printf("ClangASTSource::FindObjCMethodDecls[%d] on (ASTContext*)%p "
-                "for selector [%s %s]",
-                current_id, static_cast<void *>(m_ast_context),
-                interface_decl->getNameAsString().c_str(),
-                selector_name.AsCString());
+  LLDB_LOGF(log,
+            "ClangASTSource::FindObjCMethodDecls[%d] on (ASTContext*)%p "
+            "for selector [%s %s]",
+            current_id, static_cast<void *>(m_ast_context),
+            interface_decl->getNameAsString().c_str(),
+            selector_name.AsCString());
   SymbolContextList sc_list;
 
   const bool include_symbols = false;
   const bool include_inlines = false;
-  const bool append = false;
 
   std::string interface_name = interface_decl->getNameAsString();
 
@@ -1225,9 +1065,10 @@
     ms.Flush();
     ConstString instance_method_name(ms.GetString());
 
+    sc_list.Clear();
     m_target->GetImages().FindFunctions(
         instance_method_name, lldb::eFunctionNameTypeFull, include_symbols,
-        include_inlines, append, sc_list);
+        include_inlines, sc_list);
 
     if (sc_list.GetSize())
       break;
@@ -1237,9 +1078,10 @@
     ms.Flush();
     ConstString class_method_name(ms.GetString());
 
+    sc_list.Clear();
     m_target->GetImages().FindFunctions(
         class_method_name, lldb::eFunctionNameTypeFull, include_symbols,
-        include_inlines, append, sc_list);
+        include_inlines, sc_list);
 
     if (sc_list.GetSize())
       break;
@@ -1252,7 +1094,7 @@
 
     m_target->GetImages().FindFunctions(
         selector_name, lldb::eFunctionNameTypeSelector, include_symbols,
-        include_inlines, append, candidate_sc_list);
+        include_inlines, candidate_sc_list);
 
     for (uint32_t ci = 0, ce = candidate_sc_list.GetSize(); ci != ce; ++ci) {
       SymbolContext candidate_sc;
@@ -1329,11 +1171,8 @@
         if (!copied_method_decl)
           continue;
 
-        if (log) {
-          ASTDumper dumper((Decl *)copied_method_decl);
-          log->Printf("  CAS::FOMD[%d] found (in symbols) %s", current_id,
-                      dumper.GetCString());
-        }
+        LLDB_LOG(log, "  CAS::FOMD[{0}] found (in symbols)\n{1}", current_id,
+                 ClangUtil::DumpDecl(copied_method_decl));
 
         context.AddNamedDecl(copied_method_decl);
       }
@@ -1360,11 +1199,11 @@
     if (complete_interface_decl == interface_decl)
       break; // already checked this one
 
-    if (log)
-      log->Printf("CAS::FOPD[%d] trying origin "
-                  "(ObjCInterfaceDecl*)%p/(ASTContext*)%p...",
-                  current_id, static_cast<void *>(complete_interface_decl),
-                  static_cast<void *>(&complete_iface_decl->getASTContext()));
+    LLDB_LOGF(log,
+              "CAS::FOPD[%d] trying origin "
+              "(ObjCInterfaceDecl*)%p/(ASTContext*)%p...",
+              current_id, static_cast<void *>(complete_interface_decl),
+              static_cast<void *>(&complete_iface_decl->getASTContext()));
 
     FindObjCMethodDeclsWithOrigin(current_id, context, complete_interface_decl,
                                   "in debug info");
@@ -1423,7 +1262,9 @@
     uint32_t max_matches = 1;
     std::vector<clang::NamedDecl *> decls;
 
-    if (!decl_vendor->FindDecls(interface_name, append, max_matches, decls))
+    auto *clang_decl_vendor = llvm::cast<ClangDeclVendor>(decl_vendor);
+    if (!clang_decl_vendor->FindDecls(interface_name, append, max_matches,
+                                      decls))
       break;
 
     ObjCInterfaceDecl *runtime_interface_decl =
@@ -1460,11 +1301,8 @@
     DeclFromParser<ObjCPropertyDecl> parser_property_decl(
         origin_property_decl.Import(source));
     if (parser_property_decl.IsValid()) {
-      if (log) {
-        ASTDumper dumper((Decl *)parser_property_decl.decl);
-        log->Printf("  CAS::FOPD[%d] found %s", current_id,
-                    dumper.GetCString());
-      }
+      LLDB_LOG(log, "  CAS::FOPD[{0}] found\n{1}", current_id,
+               ClangUtil::DumpDecl(parser_property_decl.decl));
 
       context.AddNamedDecl(parser_property_decl.decl);
       found = true;
@@ -1479,9 +1317,8 @@
         origin_ivar_decl.Import(source));
     if (parser_ivar_decl.IsValid()) {
       if (log) {
-        ASTDumper dumper((Decl *)parser_ivar_decl.decl);
-        log->Printf("  CAS::FOPD[%d] found %s", current_id,
-                    dumper.GetCString());
+        LLDB_LOG(log, "  CAS::FOPD[{0}] found\n{1}", current_id,
+                 ClangUtil::DumpDecl(parser_ivar_decl.decl));
       }
 
       context.AddNamedDecl(parser_ivar_decl.decl);
@@ -1505,23 +1342,23 @@
 
   ConstString class_name(parser_iface_decl->getNameAsString().c_str());
 
-  if (log)
-    log->Printf("ClangASTSource::FindObjCPropertyAndIvarDecls[%d] on "
-                "(ASTContext*)%p for '%s.%s'",
-                current_id, static_cast<void *>(m_ast_context),
-                parser_iface_decl->getNameAsString().c_str(),
-                context.m_decl_name.getAsString().c_str());
+  LLDB_LOGF(log,
+            "ClangASTSource::FindObjCPropertyAndIvarDecls[%d] on "
+            "(ASTContext*)%p for '%s.%s'",
+            current_id, static_cast<void *>(m_ast_context),
+            parser_iface_decl->getNameAsString().c_str(),
+            context.m_decl_name.getAsString().c_str());
 
   if (FindObjCPropertyAndIvarDeclsWithOrigin(
           current_id, context, *this, origin_iface_decl))
     return;
 
-  if (log)
-    log->Printf("CAS::FOPD[%d] couldn't find the property on origin "
-                "(ObjCInterfaceDecl*)%p/(ASTContext*)%p, searching "
-                "elsewhere...",
-                current_id, static_cast<const void *>(origin_iface_decl.decl),
-                static_cast<void *>(&origin_iface_decl->getASTContext()));
+  LLDB_LOGF(log,
+            "CAS::FOPD[%d] couldn't find the property on origin "
+            "(ObjCInterfaceDecl*)%p/(ASTContext*)%p, searching "
+            "elsewhere...",
+            current_id, static_cast<const void *>(origin_iface_decl.decl),
+            static_cast<void *>(&origin_iface_decl->getASTContext()));
 
   SymbolContext null_sc;
   TypeList type_list;
@@ -1542,12 +1379,11 @@
     if (complete_iface_decl.decl == origin_iface_decl.decl)
       break; // already checked this one
 
-    if (log)
-      log->Printf("CAS::FOPD[%d] trying origin "
-                  "(ObjCInterfaceDecl*)%p/(ASTContext*)%p...",
-                  current_id,
-                  static_cast<const void *>(complete_iface_decl.decl),
-                  static_cast<void *>(&complete_iface_decl->getASTContext()));
+    LLDB_LOGF(log,
+              "CAS::FOPD[%d] trying origin "
+              "(ObjCInterfaceDecl*)%p/(ASTContext*)%p...",
+              current_id, static_cast<const void *>(complete_iface_decl.decl),
+              static_cast<void *>(&complete_iface_decl->getASTContext()));
 
     FindObjCPropertyAndIvarDeclsWithOrigin(current_id, context, *this,
                                            complete_iface_decl);
@@ -1578,13 +1414,12 @@
     if (!interface_decl_from_modules.IsValid())
       break;
 
-    if (log)
-      log->Printf(
-          "CAS::FOPD[%d] trying module "
-          "(ObjCInterfaceDecl*)%p/(ASTContext*)%p...",
-          current_id,
-          static_cast<const void *>(interface_decl_from_modules.decl),
-          static_cast<void *>(&interface_decl_from_modules->getASTContext()));
+    LLDB_LOGF(
+        log,
+        "CAS::FOPD[%d] trying module "
+        "(ObjCInterfaceDecl*)%p/(ASTContext*)%p...",
+        current_id, static_cast<const void *>(interface_decl_from_modules.decl),
+        static_cast<void *>(&interface_decl_from_modules->getASTContext()));
 
     if (FindObjCPropertyAndIvarDeclsWithOrigin(current_id, context, *this,
                                                interface_decl_from_modules))
@@ -1614,7 +1449,8 @@
     uint32_t max_matches = 1;
     std::vector<clang::NamedDecl *> decls;
 
-    if (!decl_vendor->FindDecls(class_name, append, max_matches, decls))
+    auto *clang_decl_vendor = llvm::cast<ClangDeclVendor>(decl_vendor);
+    if (!clang_decl_vendor->FindDecls(class_name, append, max_matches, decls))
       break;
 
     DeclFromUser<const ObjCInterfaceDecl> interface_decl_from_runtime(
@@ -1623,13 +1459,12 @@
     if (!interface_decl_from_runtime.IsValid())
       break;
 
-    if (log)
-      log->Printf(
-          "CAS::FOPD[%d] trying runtime "
-          "(ObjCInterfaceDecl*)%p/(ASTContext*)%p...",
-          current_id,
-          static_cast<const void *>(interface_decl_from_runtime.decl),
-          static_cast<void *>(&interface_decl_from_runtime->getASTContext()));
+    LLDB_LOGF(
+        log,
+        "CAS::FOPD[%d] trying runtime "
+        "(ObjCInterfaceDecl*)%p/(ASTContext*)%p...",
+        current_id, static_cast<const void *>(interface_decl_from_runtime.decl),
+        static_cast<void *>(&interface_decl_from_runtime->getASTContext()));
 
     if (FindObjCPropertyAndIvarDeclsWithOrigin(
             current_id, context, *this, interface_decl_from_runtime))
@@ -1722,19 +1557,17 @@
                                       FieldOffsetMap &field_offsets,
                                       BaseOffsetMap &base_offsets,
                                       BaseOffsetMap &virtual_base_offsets) {
-  ClangASTMetrics::RegisterRecordLayout();
-
   static unsigned int invocation_id = 0;
   unsigned int current_id = invocation_id++;
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("LayoutRecordType[%u] on (ASTContext*)%p for (RecordDecl*)%p "
-                "[name = '%s']",
-                current_id, static_cast<void *>(m_ast_context),
-                static_cast<const void *>(record),
-                record->getNameAsString().c_str());
+  LLDB_LOGF(log,
+            "LayoutRecordType[%u] on (ASTContext*)%p for (RecordDecl*)%p "
+            "[name = '%s']",
+            current_id, static_cast<void *>(m_ast_context),
+            static_cast<const void *>(record),
+            record->getNameAsString().c_str());
 
   DeclFromParser<const RecordDecl> parser_record(record);
   DeclFromUser<const RecordDecl> origin_record(
@@ -1798,24 +1631,25 @@
               m_ast_context->getCharWidth();
 
   if (log) {
-    log->Printf("LRT[%u] returned:", current_id);
-    log->Printf("LRT[%u]   Original = (RecordDecl*)%p", current_id,
-                static_cast<const void *>(origin_record.decl));
-    log->Printf("LRT[%u]   Size = %" PRId64, current_id, size);
-    log->Printf("LRT[%u]   Alignment = %" PRId64, current_id, alignment);
-    log->Printf("LRT[%u]   Fields:", current_id);
+    LLDB_LOGF(log, "LRT[%u] returned:", current_id);
+    LLDB_LOGF(log, "LRT[%u]   Original = (RecordDecl*)%p", current_id,
+              static_cast<const void *>(origin_record.decl));
+    LLDB_LOGF(log, "LRT[%u]   Size = %" PRId64, current_id, size);
+    LLDB_LOGF(log, "LRT[%u]   Alignment = %" PRId64, current_id, alignment);
+    LLDB_LOGF(log, "LRT[%u]   Fields:", current_id);
     for (RecordDecl::field_iterator fi = record->field_begin(),
                                     fe = record->field_end();
          fi != fe; ++fi) {
-      log->Printf("LRT[%u]     (FieldDecl*)%p, Name = '%s', Offset = %" PRId64
-                  " bits",
-                  current_id, static_cast<void *>(*fi),
-                  fi->getNameAsString().c_str(), field_offsets[*fi]);
+      LLDB_LOGF(log,
+                "LRT[%u]     (FieldDecl*)%p, Name = '%s', Offset = %" PRId64
+                " bits",
+                current_id, static_cast<void *>(*fi),
+                fi->getNameAsString().c_str(), field_offsets[*fi]);
     }
     DeclFromParser<const CXXRecordDecl> parser_cxx_record =
         DynCast<const CXXRecordDecl>(parser_record);
     if (parser_cxx_record.IsValid()) {
-      log->Printf("LRT[%u]   Bases:", current_id);
+      LLDB_LOGF(log, "LRT[%u]   Bases:", current_id);
       for (CXXRecordDecl::base_class_const_iterator
                bi = parser_cxx_record->bases_begin(),
                be = parser_cxx_record->bases_end();
@@ -1828,7 +1662,8 @@
         DeclFromParser<CXXRecordDecl> base_cxx_record =
             DynCast<CXXRecordDecl>(base_record);
 
-        log->Printf(
+        LLDB_LOGF(
+            log,
             "LRT[%u]     %s(CXXRecordDecl*)%p, Name = '%s', Offset = %" PRId64
             " chars",
             current_id, (is_virtual ? "Virtual " : ""),
@@ -1839,7 +1674,7 @@
                  : base_offsets[base_cxx_record.decl].getQuantity()));
       }
     } else {
-      log->Printf("LRD[%u]   Not a CXXRecord, so no bases", current_id);
+      LLDB_LOGF(log, "LRD[%u]   Not a CXXRecord, so no bases", current_id);
     }
   }
 
@@ -1856,16 +1691,18 @@
 
   if (log) {
     if (parent_map && parent_map->size())
-      log->Printf("CompleteNamespaceMap[%u] on (ASTContext*)%p Searching for "
-                  "namespace %s in namespace %s",
-                  current_id, static_cast<void *>(m_ast_context),
-                  name.GetCString(),
-                  parent_map->begin()->second.GetName().AsCString());
+      LLDB_LOGF(log,
+                "CompleteNamespaceMap[%u] on (ASTContext*)%p Searching for "
+                "namespace %s in namespace %s",
+                current_id, static_cast<void *>(m_ast_context),
+                name.GetCString(),
+                parent_map->begin()->second.GetName().AsCString());
     else
-      log->Printf("CompleteNamespaceMap[%u] on (ASTContext*)%p Searching for "
-                  "namespace %s",
-                  current_id, static_cast<void *>(m_ast_context),
-                  name.GetCString());
+      LLDB_LOGF(log,
+                "CompleteNamespaceMap[%u] on (ASTContext*)%p Searching for "
+                "namespace %s",
+                current_id, static_cast<void *>(m_ast_context),
+                name.GetCString());
   }
 
   if (parent_map) {
@@ -1877,13 +1714,13 @@
       lldb::ModuleSP module_sp = i->first;
       CompilerDeclContext module_parent_namespace_decl = i->second;
 
-      SymbolVendor *symbol_vendor = module_sp->GetSymbolVendor();
+      SymbolFile *symbol_file = module_sp->GetSymbolFile();
 
-      if (!symbol_vendor)
+      if (!symbol_file)
         continue;
 
       found_namespace_decl =
-          symbol_vendor->FindNamespace(name, &module_parent_namespace_decl);
+          symbol_file->FindNamespace(name, &module_parent_namespace_decl);
 
       if (!found_namespace_decl)
         continue;
@@ -1891,10 +1728,9 @@
       namespace_map->push_back(std::pair<lldb::ModuleSP, CompilerDeclContext>(
           module_sp, found_namespace_decl));
 
-      if (log)
-        log->Printf("  CMN[%u] Found namespace %s in module %s", current_id,
-                    name.GetCString(),
-                    module_sp->GetFileSpec().GetFilename().GetCString());
+      LLDB_LOGF(log, "  CMN[%u] Found namespace %s in module %s", current_id,
+                name.GetCString(),
+                module_sp->GetFileSpec().GetFilename().GetCString());
     }
   } else {
     const ModuleList &target_images = m_target->GetImages();
@@ -1910,13 +1746,13 @@
 
       CompilerDeclContext found_namespace_decl;
 
-      SymbolVendor *symbol_vendor = image->GetSymbolVendor();
+      SymbolFile *symbol_file = image->GetSymbolFile();
 
-      if (!symbol_vendor)
+      if (!symbol_file)
         continue;
 
       found_namespace_decl =
-          symbol_vendor->FindNamespace(name, &null_namespace_decl);
+          symbol_file->FindNamespace(name, &null_namespace_decl);
 
       if (!found_namespace_decl)
         continue;
@@ -1924,10 +1760,9 @@
       namespace_map->push_back(std::pair<lldb::ModuleSP, CompilerDeclContext>(
           image, found_namespace_decl));
 
-      if (log)
-        log->Printf("  CMN[%u] Found namespace %s in module %s", current_id,
-                    name.GetCString(),
-                    image->GetFileSpec().GetFilename().GetCString());
+      LLDB_LOGF(log, "  CMN[%u] Found namespace %s in module %s", current_id,
+                name.GetCString(),
+                image->GetFileSpec().GetFilename().GetCString());
     }
   }
 }
@@ -1968,90 +1803,37 @@
   return dyn_cast<NamespaceDecl>(copied_decl);
 }
 
-clang::QualType ClangASTSource::CopyTypeWithMerger(
-    clang::ASTContext &from_context,
-    clang::ExternalASTMerger &merger,
-    clang::QualType type) {
-  if (!merger.HasImporterForOrigin(from_context)) {
-    lldbassert(0 && "Couldn't find the importer for a source context!");
-    return QualType();
-  }
-
-  if (llvm::Expected<QualType> type_or_error =
-          merger.ImporterForOrigin(from_context).Import(type)) {
-    return *type_or_error;
-  } else {
-    Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-    LLDB_LOG_ERROR(log, type_or_error.takeError(), "Couldn't import type: {0}");
-    return QualType();
-  }
-}
-
 clang::Decl *ClangASTSource::CopyDecl(Decl *src_decl) {
-  clang::ASTContext &from_context = src_decl->getASTContext();
   if (m_ast_importer_sp) {
-    return m_ast_importer_sp->CopyDecl(m_ast_context, &from_context, src_decl);
-  } else if (m_merger_up) {
-    if (!m_merger_up->HasImporterForOrigin(from_context)) {
-      lldbassert(0 && "Couldn't find the importer for a source context!");
-      return nullptr;
-    }
-
-    if (llvm::Expected<Decl *> decl_or_error =
-            m_merger_up->ImporterForOrigin(from_context).Import(src_decl)) {
-      return *decl_or_error;
-    } else {
-      Log *log =
-          lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-      LLDB_LOG_ERROR(log, decl_or_error.takeError(),
-                     "Couldn't import decl: {0}");
-      return nullptr;
-    }
+    return m_ast_importer_sp->CopyDecl(m_ast_context, src_decl);
   } else {
     lldbassert(0 && "No mechanism for copying a decl!");
     return nullptr;
   }
 }
 
-bool ClangASTSource::ResolveDeclOrigin(const clang::Decl *decl,
-                                       clang::Decl **original_decl,
-                                       clang::ASTContext **original_ctx) {
+ClangASTImporter::DeclOrigin ClangASTSource::GetDeclOrigin(const clang::Decl *decl) {
   if (m_ast_importer_sp) {
-    return m_ast_importer_sp->ResolveDeclOrigin(decl, original_decl,
-                                                original_ctx);
-  } else if (m_merger_up) {
-    return false; // Implement this correctly in ExternalASTMerger
+    return m_ast_importer_sp->GetDeclOrigin(decl);
   } else {
     // this can happen early enough that no ExternalASTSource is installed.
-    return false;
+    return ClangASTImporter::DeclOrigin();
   }
 }
 
-clang::ExternalASTMerger &ClangASTSource::GetMergerUnchecked() {
-  lldbassert(m_merger_up != nullptr);
-  return *m_merger_up;
-}
-
 CompilerType ClangASTSource::GuardedCopyType(const CompilerType &src_type) {
   ClangASTContext *src_ast =
       llvm::dyn_cast_or_null<ClangASTContext>(src_type.GetTypeSystem());
   if (src_ast == nullptr)
     return CompilerType();
 
-  ClangASTMetrics::RegisterLLDBImport();
-
   SetImportInProgress(true);
 
   QualType copied_qual_type;
 
   if (m_ast_importer_sp) {
-    copied_qual_type =
-        m_ast_importer_sp->CopyType(m_ast_context, src_ast->getASTContext(),
-                                    ClangUtil::GetQualType(src_type));
-  } else if (m_merger_up) {
-    copied_qual_type =
-        CopyTypeWithMerger(*src_ast->getASTContext(), *m_merger_up,
-                 ClangUtil::GetQualType(src_type));
+    copied_qual_type = ClangUtil::GetQualType(
+        m_ast_importer_sp->CopyType(*m_clang_ast_context, src_type));
   } else {
     lldbassert(0 && "No mechanism for copying a type!");
     return CompilerType();
@@ -2065,7 +1847,7 @@
     // seems to be generating bad types on occasion.
     return CompilerType();
 
-  return CompilerType(m_ast_context, copied_qual_type);
+  return m_clang_ast_context->GetType(copied_qual_type);
 }
 
 clang::NamedDecl *NameSearchContext::AddVarDecl(const CompilerType &type) {
@@ -2081,10 +1863,10 @@
 
   IdentifierInfo *ii = m_decl_name.getAsIdentifierInfo();
 
-  clang::ASTContext *ast = lldb_ast->getASTContext();
+  clang::ASTContext &ast = lldb_ast->getASTContext();
 
   clang::NamedDecl *Decl = VarDecl::Create(
-      *ast, const_cast<DeclContext *>(m_decl_context), SourceLocation(),
+      ast, const_cast<DeclContext *>(m_decl_context), SourceLocation(),
       SourceLocation(), ii, ClangUtil::GetQualType(type), nullptr, SC_Static);
   m_decls.push_back(Decl);
 
@@ -2110,7 +1892,7 @@
 
   QualType qual_type(ClangUtil::GetQualType(type));
 
-  clang::ASTContext *ast = lldb_ast->getASTContext();
+  clang::ASTContext &ast = lldb_ast->getASTContext();
 
   const bool isInlineSpecified = false;
   const bool hasWrittenPrototype = true;
@@ -2120,7 +1902,7 @@
 
   if (extern_c) {
     context = LinkageSpecDecl::Create(
-        *ast, context, SourceLocation(), SourceLocation(),
+        ast, context, SourceLocation(), SourceLocation(),
         clang::LinkageSpecDecl::LanguageIDs::lang_c, false);
   }
 
@@ -2132,7 +1914,7 @@
           : m_decl_name;
 
   clang::FunctionDecl *func_decl = FunctionDecl::Create(
-      *ast, context, SourceLocation(), SourceLocation(), decl_name, qual_type,
+      ast, context, SourceLocation(), SourceLocation(), decl_name, qual_type,
       nullptr, SC_Extern, isInlineSpecified, hasWrittenPrototype,
       isConstexprSpecified ? CSK_constexpr : CSK_unspecified);
 
@@ -2153,7 +1935,7 @@
       QualType arg_qual_type(func_proto_type->getParamType(ArgIndex));
 
       parm_var_decls.push_back(
-          ParmVarDecl::Create(*ast, const_cast<DeclContext *>(context),
+          ParmVarDecl::Create(ast, const_cast<DeclContext *>(context),
                               SourceLocation(), SourceLocation(), nullptr,
                               arg_qual_type, nullptr, SC_Static, nullptr));
     }
@@ -2162,8 +1944,7 @@
   } else {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-    if (log)
-      log->Printf("Function type wasn't a FunctionProtoType");
+    LLDB_LOGF(log, "Function type wasn't a FunctionProtoType");
   }
 
   // If this is an operator (e.g. operator new or operator==), only insert the
@@ -2194,7 +1975,7 @@
       proto_info));
 
   return AddFunDecl(
-      CompilerType(m_ast_source.m_ast_context, generic_function_type), true);
+      m_ast_source.m_clang_ast_context->GetType(generic_function_type), true);
 }
 
 clang::NamedDecl *
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
index 7a8bacf..3149b42 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h
@@ -12,10 +12,9 @@
 #include <set>
 
 #include "lldb/Symbol/ClangASTImporter.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Target/Target.h"
-#include "clang/AST/ExternalASTMerger.h"
+#include "clang/AST/ExternalASTSource.h"
 #include "clang/Basic/IdentifierTable.h"
 
 #include "llvm/ADT/SmallSet.h"
@@ -30,7 +29,7 @@
 /// knows the name it is looking for, but nothing else. The ExternalSemaSource
 /// class provides Decls (VarDecl, FunDecl, TypeDecl) to Clang for these
 /// names, consulting the ClangExpressionDeclMap to do the actual lookups.
-class ClangASTSource : public ClangExternalASTSourceCommon,
+class ClangASTSource : public clang::ExternalASTSource,
                        public ClangASTImporter::MapCompleter {
 public:
   /// Constructor
@@ -39,7 +38,11 @@
   ///
   /// \param[in] target
   ///     A reference to the target containing debug information to use.
-  ClangASTSource(const lldb::TargetSP &target);
+  ///
+  /// \param[in] importer
+  ///     The ClangASTImporter to use.
+  ClangASTSource(const lldb::TargetSP &target,
+                 const lldb::ClangASTImporterSP &importer);
 
   /// Destructor
   ~ClangASTSource() override;
@@ -57,9 +60,7 @@
   }
   void MaterializeVisibleDecls(const clang::DeclContext *DC) { return; }
 
-  void InstallASTContext(clang::ASTContext &ast_context,
-                         clang::FileManager &file_manager,
-                         bool is_shared_context = false);
+  void InstallASTContext(ClangASTContext &ast_context);
 
   //
   // APIs for ExternalASTSource
@@ -89,7 +90,7 @@
   /// \param[in] DC
   ///     The DeclContext being searched.
   ///
-  /// \param[in] isKindWeWant
+  /// \param[in] IsKindWeWant
   ///     A callback function that returns true given the
   ///     DeclKinds of desired Decls, and false otherwise.
   ///
@@ -155,7 +156,7 @@
   /// setHasExternalVisibleStorage() and setHasExternalLexicalStorage() that
   /// this object has something to say about undefined names.
   ///
-  /// \param[in] ASTConsumer
+  /// \param[in] Consumer
   ///     Unused.
   void StartTranslationUnit(clang::ASTConsumer *Consumer) override;
 
@@ -210,7 +211,7 @@
   ///
   /// Clang AST contexts like to own their AST sources, so this is a state-
   /// free proxy object.
-  class ClangASTSourceProxy : public ClangExternalASTSourceCommon {
+  class ClangASTSourceProxy : public clang::ExternalASTSource {
   public:
     ClangASTSourceProxy(ClangASTSource &original) : m_original(original) {}
 
@@ -249,18 +250,6 @@
       return m_original.StartTranslationUnit(Consumer);
     }
 
-    ClangASTMetadata *GetMetadata(const void *object) {
-      return m_original.GetMetadata(object);
-    }
-
-    void SetMetadata(const void *object, ClangASTMetadata &metadata) {
-      return m_original.SetMetadata(object, metadata);
-    }
-
-    bool HasMetadata(const void *object) {
-      return m_original.HasMetadata(object);
-    }
-
   private:
     ClangASTSource &m_original;
   };
@@ -321,13 +310,6 @@
   /// A wrapper for ClangASTContext::CopyType that sets a flag that
   /// indicates that we should not respond to queries during import.
   ///
-  /// \param[in] dest_context
-  ///     The target AST context, typically the parser's AST context.
-  ///
-  /// \param[in] source_context
-  ///     The source AST context, typically the AST context of whatever
-  ///     symbol file the type was found in.
-  ///
   /// \param[in] src_type
   ///     The source type.
   ///
@@ -341,7 +323,7 @@
   /// \param[in] name
   ///     The name to be considered.
   ///
-  /// \param[in] ignore_all_dollar_nmmes
+  /// \param[in] ignore_all_dollar_names
   ///     True if $-names of all sorts should be ignored.
   ///
   /// \return
@@ -358,24 +340,6 @@
   /// \return
   ///     A copy of the Decl in m_ast_context, or NULL if the copy failed.
   clang::Decl *CopyDecl(clang::Decl *src_decl);
-                         
-  /// Copies a single Type to the target of the given ExternalASTMerger.
-  ///
-  /// \param[in] src_context
-  ///     The ASTContext containing the type.
-  ///
-  /// \param[in] merger
-  ///     The merger to use.  This isn't just *m_merger_up because it might be
-  ///     the persistent AST context's merger.
-  ///
-  /// \param[in] type
-  ///     The type to copy.
-  ///
-  /// \return
-  ///     A copy of the Type in the merger's target context.
-	clang::QualType CopyTypeWithMerger(clang::ASTContext &src_context,
-                                     clang::ExternalASTMerger &merger,
-                                     clang::QualType type);
 
   /// Determined the origin of a single Decl, if it can be found.
   ///
@@ -390,16 +354,7 @@
   ///
   /// \return
   ///     True if lookup succeeded; false otherwise.
-  bool ResolveDeclOrigin(const clang::Decl *decl, clang::Decl **original_decl,
-                         clang::ASTContext **original_ctx);
- 
-  /// Returns m_merger_up.  Only call this if the target is configured to use
-  /// modern lookup,
-	clang::ExternalASTMerger &GetMergerUnchecked();
- 
-  /// Returns true if there is a merger.  This only occurs if the target is
-  /// using modern lookup.
-  bool HasMerger() { return (bool)m_merger_up; }
+  ClangASTImporter::DeclOrigin GetDeclOrigin(const clang::Decl *decl);
 
 protected:
   bool FindObjCMethodDeclsWithOrigin(
@@ -411,15 +366,16 @@
   bool m_import_in_progress;
   bool m_lookups_enabled;
 
-  const lldb::TargetSP
-      m_target; ///< The target to use in finding variables and types.
-  clang::ASTContext
-      *m_ast_context; ///< The AST context requests are coming in for.
-  clang::FileManager
-      *m_file_manager; ///< The file manager paired with the AST context.
-  lldb::ClangASTImporterSP m_ast_importer_sp; ///< The target's AST importer.
-  std::unique_ptr<clang::ExternalASTMerger> m_merger_up;
-      ///< The ExternalASTMerger for this parse.
+  /// The target to use in finding variables and types.
+  const lldb::TargetSP m_target;
+  /// The AST context requests are coming in for.
+  clang::ASTContext *m_ast_context;
+  /// The ClangASTContext for m_ast_context.
+  ClangASTContext *m_clang_ast_context;
+  /// The file manager paired with the AST context.
+  clang::FileManager *m_file_manager;
+  /// The target's AST importer.
+  lldb::ClangASTImporterSP m_ast_importer_sp;
   std::set<const clang::Decl *> m_active_lexical_decls;
   std::set<const char *> m_active_lookups;
 };
@@ -432,20 +388,20 @@
 /// what name is being searched for and provides helper functions to construct
 /// Decls given appropriate type information.
 struct NameSearchContext {
-  ClangASTSource &m_ast_source; ///< The AST source making the request
-  llvm::SmallVectorImpl<clang::NamedDecl *>
-      &m_decls; ///< The list of declarations already constructed
-  ClangASTImporter::NamespaceMapSP m_namespace_map; ///< The mapping of all
-                                                    ///namespaces found for this
-                                                    ///request back to their
-                                                    ///modules
-  const clang::DeclarationName &m_decl_name; ///< The name being looked for
-  const clang::DeclContext
-      *m_decl_context; ///< The DeclContext to put declarations into
-  llvm::SmallSet<CompilerType, 5> m_function_types; ///< All the types of
-                                                    ///functions that have been
-                                                    ///reported, so we don't
-                                                    ///report conflicts
+  /// The AST source making the request.
+  ClangASTSource &m_ast_source;
+  /// The list of declarations already constructed.
+  llvm::SmallVectorImpl<clang::NamedDecl *> &m_decls;
+  /// The mapping of all namespaces found for this request back to their
+  /// modules.
+  ClangASTImporter::NamespaceMapSP m_namespace_map;
+  /// The name being looked for.
+  const clang::DeclarationName &m_decl_name;
+  /// The DeclContext to put declarations into.
+  const clang::DeclContext *m_decl_context;
+  /// All the types of functions that have been reported, so we don't
+  /// report conflicts.
+  llvm::SmallSet<CompilerType, 5> m_function_types;
 
   struct {
     bool variable : 1;
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.cpp
new file mode 100644
index 0000000..c87507a
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.cpp
@@ -0,0 +1,30 @@
+//===-- ClangDeclVendor.cpp -------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Plugins/ExpressionParser/Clang/ClangDeclVendor.h"
+
+#include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Utility/ConstString.h"
+
+using namespace lldb_private;
+
+uint32_t ClangDeclVendor::FindDecls(ConstString name, bool append,
+                                    uint32_t max_matches,
+                                    std::vector<clang::NamedDecl *> &decls) {
+  if (!append)
+    decls.clear();
+
+  std::vector<CompilerDecl> compiler_decls;
+  uint32_t ret = FindDecls(name, /*append*/ false, max_matches, compiler_decls);
+  for (CompilerDecl compiler_decl : compiler_decls) {
+    clang::Decl *d = static_cast<clang::Decl *>(compiler_decl.GetOpaqueDecl());
+    clang::NamedDecl *nd = llvm::cast<clang::NamedDecl>(d);
+    decls.push_back(nd);
+  }
+  return ret;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h
new file mode 100644
index 0000000..0c888de
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDeclVendor.h
@@ -0,0 +1,39 @@
+//===-- ClangDeclVendor.h ---------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_ClangDeclVendor_h_
+#define liblldb_ClangDeclVendor_h_
+
+#include "lldb/Core/ClangForward.h"
+#include "lldb/Symbol/DeclVendor.h"
+
+namespace lldb_private {
+
+// A clang specialized extension to DeclVendor.
+class ClangDeclVendor : public DeclVendor {
+public:
+  ClangDeclVendor(DeclVendorKind kind) : DeclVendor(kind) {}
+
+  virtual ~ClangDeclVendor() {}
+
+  using DeclVendor::FindDecls;
+
+  uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches,
+                     std::vector<clang::NamedDecl *> &decls);
+
+  static bool classof(const DeclVendor *vendor) {
+    return vendor->GetKind() >= eClangDeclVendor &&
+           vendor->GetKind() < eLastClangDeclVendor;
+  }
+
+private:
+  DISALLOW_COPY_AND_ASSIGN(ClangDeclVendor);
+};
+} // namespace lldb_private
+
+#endif
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h
index db50c2a..48cd1c4 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h
@@ -29,7 +29,7 @@
     return diag->getKind() == eDiagnosticOriginClang;
   }
 
-  ClangDiagnostic(const char *message, DiagnosticSeverity severity,
+  ClangDiagnostic(llvm::StringRef message, DiagnosticSeverity severity,
                   uint32_t compiler_id)
       : Diagnostic(message, severity, eDiagnosticOriginClang, compiler_id) {}
 
@@ -42,6 +42,7 @@
   }
 
   const FixItList &FixIts() const { return m_fixit_vec; }
+private:
   FixItList m_fixit_vec;
 };
 
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
index a49a702..bf3023b 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp
@@ -8,7 +8,6 @@
 
 #include "ClangExpressionDeclMap.h"
 
-#include "ASTDumper.h"
 #include "ClangASTSource.h"
 #include "ClangModulesDeclVendor.h"
 #include "ClangPersistentVariables.h"
@@ -20,6 +19,7 @@
 #include "lldb/Core/ValueObjectVariable.h"
 #include "lldb/Expression/Materializer.h"
 #include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/CompilerDecl.h"
 #include "lldb/Symbol/CompilerDeclContext.h"
@@ -65,9 +65,10 @@
 ClangExpressionDeclMap::ClangExpressionDeclMap(
     bool keep_result_in_memory,
     Materializer::PersistentVariableDelegate *result_delegate,
-    ExecutionContext &exe_ctx, ValueObject *ctx_obj)
-    : ClangASTSource(exe_ctx.GetTargetSP()), m_found_entities(),
-      m_struct_members(), m_keep_result_in_memory(keep_result_in_memory),
+    const lldb::TargetSP &target, const lldb::ClangASTImporterSP &importer,
+    ValueObject *ctx_obj)
+    : ClangASTSource(target, importer), m_found_entities(), m_struct_members(),
+      m_keep_result_in_memory(keep_result_in_memory),
       m_result_delegate(result_delegate), m_ctx_obj(ctx_obj), m_parser_vars(),
       m_struct_vars() {
   EnableStructVars();
@@ -84,8 +85,6 @@
 
 bool ClangExpressionDeclMap::WillParse(ExecutionContext &exe_ctx,
                                        Materializer *materializer) {
-  ClangASTMetrics::ClearLocalCounters();
-
   EnableParserVars();
   m_parser_vars->m_exe_ctx = exe_ctx;
 
@@ -110,7 +109,7 @@
     m_parser_vars->m_persistent_vars = llvm::cast<ClangPersistentVariables>(
         target->GetPersistentExpressionStateForLanguage(eLanguageTypeC));
 
-    if (!target->GetScratchClangASTContext())
+    if (!ClangASTContext::GetScratch(*target))
       return false;
   }
 
@@ -127,12 +126,7 @@
 }
 
 void ClangExpressionDeclMap::DidParse() {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log)
-    ClangASTMetrics::DumpCounters(log);
-
-  if (m_parser_vars) {
+  if (m_parser_vars && m_parser_vars->m_persistent_vars) {
     for (size_t entity_index = 0, num_entities = m_found_entities.GetSize();
          entity_index < num_entities; ++entity_index) {
       ExpressionVariableSP var_sp(
@@ -180,134 +174,15 @@
   return ret;
 }
 
-namespace {
-/// This class walks an AST and ensures that all DeclContexts defined inside the
-/// current source file are properly complete.
-///
-/// This is used to ensure that persistent types defined in the current source
-/// file migrate completely to the persistent AST context before they are
-/// reused.  If that didn't happen, it would be impoossible to complete them
-/// because their origin would be gone.
-///
-/// The stragtegy used by this class is to check the SourceLocation (to be
-/// specific, the FileID) and see if it's the FileID for the current expression.
-/// Alternate strategies could include checking whether an ExternalASTMerger,
-/// set up to not have the current context as a source, can find an original for
-/// the type.
-class Completer : public clang::RecursiveASTVisitor<Completer> {
-private:
-  clang::ASTImporter &m_exporter;             /// Used to import Decl contents
-  clang::FileID m_file;                       /// The file that's going away
-  llvm::DenseSet<clang::Decl *> m_completed;  /// Visited Decls, to avoid cycles
-
-  bool ImportAndCheckCompletable(clang::Decl *decl) {
-    (void)m_exporter.Import(decl);
-    if (m_completed.count(decl))
-      return false;
-    if (!llvm::isa<DeclContext>(decl))
-      return false;
-    const clang::SourceLocation loc = decl->getLocation();
-    if (!loc.isValid())
-      return false;
-    const clang::FileID file =
-        m_exporter.getFromContext().getSourceManager().getFileID(loc);
-    if (file != m_file)
-      return false;
-    // We are assuming the Decl was parsed in this very expression, so it
-    // should not have external storage.
-    lldbassert(!llvm::cast<DeclContext>(decl)->hasExternalLexicalStorage());
-    return true;
-  }
-
-  void Complete(clang::Decl *decl) {
-    m_completed.insert(decl);
-    auto *decl_context = llvm::cast<DeclContext>(decl);
-    (void)m_exporter.Import(decl);
-    m_exporter.CompleteDecl(decl);
-    for (Decl *child : decl_context->decls())
-      if (ImportAndCheckCompletable(child))
-        Complete(child);
-  }
-
-  void MaybeComplete(clang::Decl *decl) {
-    if (ImportAndCheckCompletable(decl))
-      Complete(decl);
-  }
-
-public:
-  Completer(clang::ASTImporter &exporter, clang::FileID file)
-      : m_exporter(exporter), m_file(file) {}
-  
-  // Implements the RecursiveASTVisitor's core API.  It is called on each Decl
-  // that the RecursiveASTVisitor encounters, and returns true if the traversal
-  // should continue.
-  bool VisitDecl(clang::Decl *decl) {
-    MaybeComplete(decl);
-    return true;
-  }
-};
-}
-
-static void CompleteAllDeclContexts(clang::ASTImporter &exporter,
-                                    clang::FileID file,
-                                    clang::QualType root) {
-  clang::QualType canonical_type = root.getCanonicalType();
-  if (clang::TagDecl *tag_decl = canonical_type->getAsTagDecl()) {
-    Completer(exporter, file).TraverseDecl(tag_decl);
-  } else if (auto interface_type = llvm::dyn_cast<ObjCInterfaceType>(
-                 canonical_type.getTypePtr())) {
-    Completer(exporter, file).TraverseDecl(interface_type->getDecl());
-  } else {
-    Completer(exporter, file).TraverseType(canonical_type);
-  }
-}
-
-static clang::QualType ExportAllDeclaredTypes(
-    clang::ExternalASTMerger &merger,
-    clang::ASTContext &source, clang::FileManager &source_file_manager,
-    const clang::ExternalASTMerger::OriginMap &source_origin_map,
-    clang::FileID file, clang::QualType root) {
-  clang::ExternalASTMerger::ImporterSource importer_source =
-      { source, source_file_manager, source_origin_map };
-  merger.AddSources(importer_source);
-  clang::ASTImporter &exporter = merger.ImporterForOrigin(source);
-  CompleteAllDeclContexts(exporter, file, root);
-  llvm::Expected<clang::QualType> ret_or_error = exporter.Import(root);
-  merger.RemoveSources(importer_source);
-  if (ret_or_error) {
-    return *ret_or_error;
-  } else {
-    Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-    LLDB_LOG_ERROR(log, ret_or_error.takeError(), "Couldn't import type: {0}");
-    return clang::QualType();
-  }
-}
-
 TypeFromUser ClangExpressionDeclMap::DeportType(ClangASTContext &target,
                                                 ClangASTContext &source,
                                                 TypeFromParser parser_type) {
-  assert (&target == m_target->GetScratchClangASTContext());
-  assert ((TypeSystem*)&source == parser_type.GetTypeSystem());
-  assert (source.getASTContext() == m_ast_context);
-  
+  assert(&target == ClangASTContext::GetScratch(*m_target));
+  assert((TypeSystem *)&source == parser_type.GetTypeSystem());
+  assert(&source.getASTContext() == m_ast_context);
+
   if (m_ast_importer_sp) {
-    return TypeFromUser(m_ast_importer_sp->DeportType(
-                            target.getASTContext(), source.getASTContext(),
-                            parser_type.GetOpaqueQualType()),
-                        &target);
-  } else if (m_merger_up) {
-    clang::FileID source_file =
-        source.getASTContext()->getSourceManager().getFileID(
-            source.getASTContext()->getTranslationUnitDecl()->getLocation());
-    auto scratch_ast_context = static_cast<ClangASTContextForExpressions*>(
-        m_target->GetScratchClangASTContext());
-    clang::QualType exported_type = ExportAllDeclaredTypes(
-        scratch_ast_context->GetMergerUnchecked(),
-        *source.getASTContext(), *source.getFileManager(),
-        m_merger_up->GetOrigins(),
-        source_file,
-        clang::QualType::getFromOpaquePtr(parser_type.GetOpaqueQualType()));
-    return TypeFromUser(exported_type.getAsOpaquePtr(), &target);
+    return TypeFromUser(m_ast_importer_sp->DeportType(target, parser_type));
   } else {
     lldbassert(0 && "No mechanism for deporting a type!");
     return TypeFromUser();
@@ -334,8 +209,11 @@
     if (target == nullptr)
       return false;
 
-    TypeFromUser user_type =
-        DeportType(*target->GetScratchClangASTContext(), *ast, parser_type);
+    auto *clang_ast_context = ClangASTContext::GetScratch(*target);
+    if (!clang_ast_context)
+      return false;
+
+    TypeFromUser user_type = DeportType(*clang_ast_context, *ast, parser_type);
 
     uint32_t offset = m_parser_vars->m_materializer->AddResultVariable(
         user_type, is_lvalue, m_keep_result_in_memory, m_result_delegate, err);
@@ -370,19 +248,23 @@
   if (target == nullptr)
     return false;
 
-  ClangASTContext *context(target->GetScratchClangASTContext());
+  ClangASTContext *context = ClangASTContext::GetScratch(*target);
+  if (!context)
+    return false;
 
   TypeFromUser user_type = DeportType(*context, *ast, parser_type);
 
   if (!user_type.GetOpaqueQualType()) {
-    if (log)
-      log->Printf("Persistent variable's type wasn't copied successfully");
+    LLDB_LOGF(log, "Persistent variable's type wasn't copied successfully");
     return false;
   }
 
   if (!m_parser_vars->m_target_info.IsValid())
     return false;
 
+  if (!m_parser_vars->m_persistent_vars)
+    return false;
+
   ClangExpressionVariable *var = llvm::cast<ClangExpressionVariable>(
       m_parser_vars->m_persistent_vars
           ->CreatePersistentVariable(
@@ -415,8 +297,7 @@
     var->m_flags |= ClangExpressionVariable::EVKeepInTarget;
   }
 
-  if (log)
-    log->Printf("Created persistent variable with flags 0x%hx", var->m_flags);
+  LLDB_LOGF(log, "Created persistent variable with flags 0x%hx", var->m_flags);
 
   var->EnableParserVars(GetParserID());
 
@@ -449,7 +330,7 @@
   ClangExpressionVariable *var(ClangExpressionVariable::FindVariableInList(
       m_found_entities, decl, GetParserID()));
 
-  if (!var) {
+  if (!var && m_parser_vars->m_persistent_vars) {
     var = ClangExpressionVariable::FindVariableInList(
         *m_parser_vars->m_persistent_vars, decl, GetParserID());
     is_persistent_variable = true;
@@ -458,10 +339,9 @@
   if (!var)
     return false;
 
-  if (log)
-    log->Printf("Adding value for (NamedDecl*)%p [%s - %s] to the structure",
-                static_cast<const void *>(decl), name.GetCString(),
-                var->GetName().GetCString());
+  LLDB_LOGF(log, "Adding value for (NamedDecl*)%p [%s - %s] to the structure",
+            static_cast<const void *>(decl), name.GetCString(),
+            var->GetName().GetCString());
 
   // We know entity->m_parser_vars is valid because we used a parser variable
   // to find it
@@ -475,9 +355,8 @@
           llvm::cast<ClangExpressionVariable>(var)->GetJITVars(GetParserID())) {
     // We already laid this out; do not touch
 
-    if (log)
-      log->Printf("Already placed at 0x%llx",
-                  (unsigned long long)jit_vars->m_offset);
+    LLDB_LOGF(log, "Already placed at 0x%llx",
+              (unsigned long long)jit_vars->m_offset);
   }
 
   llvm::cast<ClangExpressionVariable>(var)->EnableJITVars(GetParserID());
@@ -512,8 +391,7 @@
     if (!err.Success())
       return false;
 
-    if (log)
-      log->Printf("Placed at 0x%llx", (unsigned long long)offset);
+    LLDB_LOGF(log, "Placed at 0x%llx", (unsigned long long)offset);
 
     jit_vars->m_offset =
         offset; // TODO DoStructLayout() should not change this.
@@ -722,7 +600,7 @@
 
 lldb::VariableSP ClangExpressionDeclMap::FindGlobalVariable(
     Target &target, ModuleSP &module, ConstString name,
-    CompilerDeclContext *namespace_decl, TypeFromUser *type) {
+    CompilerDeclContext *namespace_decl) {
   VariableList vars;
 
   if (module && namespace_decl)
@@ -730,21 +608,9 @@
   else
     target.GetImages().FindGlobalVariables(name, -1, vars);
 
-  if (vars.GetSize()) {
-    if (type) {
-      for (size_t i = 0; i < vars.GetSize(); ++i) {
-        VariableSP var_sp = vars.GetVariableAtIndex(i);
-
-        if (ClangASTContext::AreTypesSame(
-                *type, var_sp->GetType()->GetFullCompilerType()))
-          return var_sp;
-      }
-    } else {
-      return vars.GetVariableAtIndex(0);
-    }
-  }
-
-  return VariableSP();
+  if (vars.GetSize() == 0)
+    return VariableSP();
+  return vars.GetVariableAtIndex(0);
 }
 
 ClangASTContext *ClangExpressionDeclMap::GetClangASTContext() {
@@ -771,15 +637,13 @@
     NameSearchContext &context) {
   assert(m_ast_context);
 
-  ClangASTMetrics::RegisterVisibleQuery();
-
   const ConstString name(context.m_decl_name.getAsString().c_str());
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
   if (GetImportInProgress()) {
     if (log && log->GetVerbose())
-      log->Printf("Ignoring a query during an import");
+      LLDB_LOGF(log, "Ignoring a query during an import");
     return;
   }
 
@@ -788,29 +652,32 @@
 
   if (log) {
     if (!context.m_decl_context)
-      log->Printf("ClangExpressionDeclMap::FindExternalVisibleDecls[%u] for "
-                  "'%s' in a NULL DeclContext",
-                  current_id, name.GetCString());
+      LLDB_LOGF(log,
+                "ClangExpressionDeclMap::FindExternalVisibleDecls[%u] for "
+                "'%s' in a NULL DeclContext",
+                current_id, name.GetCString());
     else if (const NamedDecl *context_named_decl =
                  dyn_cast<NamedDecl>(context.m_decl_context))
-      log->Printf("ClangExpressionDeclMap::FindExternalVisibleDecls[%u] for "
-                  "'%s' in '%s'",
-                  current_id, name.GetCString(),
-                  context_named_decl->getNameAsString().c_str());
+      LLDB_LOGF(log,
+                "ClangExpressionDeclMap::FindExternalVisibleDecls[%u] for "
+                "'%s' in '%s'",
+                current_id, name.GetCString(),
+                context_named_decl->getNameAsString().c_str());
     else
-      log->Printf("ClangExpressionDeclMap::FindExternalVisibleDecls[%u] for "
-                  "'%s' in a '%s'",
-                  current_id, name.GetCString(),
-                  context.m_decl_context->getDeclKindName());
+      LLDB_LOGF(log,
+                "ClangExpressionDeclMap::FindExternalVisibleDecls[%u] for "
+                "'%s' in a '%s'",
+                current_id, name.GetCString(),
+                context.m_decl_context->getDeclKindName());
   }
 
   if (const NamespaceDecl *namespace_context =
           dyn_cast<NamespaceDecl>(context.m_decl_context)) {
     if (namespace_context->getName().str() ==
         std::string(g_lldb_local_vars_namespace_cstr)) {
-      CompilerDeclContext compiler_decl_ctx(
-          GetClangASTContext(), const_cast<void *>(static_cast<const void *>(
-                                    context.m_decl_context)));
+      CompilerDeclContext compiler_decl_ctx =
+          m_clang_ast_context->CreateDeclContext(
+              const_cast<clang::DeclContext *>(context.m_decl_context));
       FindExternalVisibleDecls(context, lldb::ModuleSP(), compiler_decl_ctx,
                                current_id);
       return;
@@ -828,7 +695,7 @@
       log->Printf("  CEDM::FEVD[%u] Inspecting (NamespaceMap*)%p (%d entries)",
                   current_id, static_cast<void *>(namespace_map.get()),
                   (int)namespace_map->size());
-    
+
     for (ClangASTImporter::NamespaceMap::iterator i = namespace_map->begin(),
                                                   e = namespace_map->end();
          i != e; ++i) {
@@ -848,357 +715,678 @@
     FindExternalVisibleDecls(context, lldb::ModuleSP(), namespace_decl,
                              current_id);
   }
-  
+
   ClangASTSource::FindExternalVisibleDecls(context);
 }
 
+void ClangExpressionDeclMap::MaybeRegisterFunctionBody(
+    FunctionDecl *copied_function_decl) {
+  if (copied_function_decl->getBody() && m_parser_vars->m_code_gen) {
+    clang::DeclGroupRef decl_group_ref(copied_function_decl);
+    m_parser_vars->m_code_gen->HandleTopLevelDecl(decl_group_ref);
+  }
+}
+
+clang::NamedDecl *ClangExpressionDeclMap::GetPersistentDecl(ConstString name) {
+  if (!m_parser_vars)
+    return nullptr;
+  Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
+  if (!target)
+    return nullptr;
+
+  ClangASTContext::GetScratch(*target);
+
+  if (!m_parser_vars->m_persistent_vars)
+    return nullptr;
+  return m_parser_vars->m_persistent_vars->GetPersistentDecl(name);
+}
+
+void ClangExpressionDeclMap::SearchPersistenDecls(NameSearchContext &context,
+                                                  const ConstString name,
+                                                  unsigned int current_id) {
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
+
+  NamedDecl *persistent_decl = GetPersistentDecl(name);
+
+  if (!persistent_decl)
+    return;
+
+  Decl *parser_persistent_decl = CopyDecl(persistent_decl);
+
+  if (!parser_persistent_decl)
+    return;
+
+  NamedDecl *parser_named_decl = dyn_cast<NamedDecl>(parser_persistent_decl);
+
+  if (!parser_named_decl)
+    return;
+
+  if (clang::FunctionDecl *parser_function_decl =
+          llvm::dyn_cast<clang::FunctionDecl>(parser_named_decl)) {
+    MaybeRegisterFunctionBody(parser_function_decl);
+  }
+
+  LLDB_LOGF(log, "  CEDM::FEVD[%u] Found persistent decl %s", current_id,
+            name.GetCString());
+
+  context.AddNamedDecl(parser_named_decl);
+}
+
+void ClangExpressionDeclMap::LookUpLldbClass(NameSearchContext &context,
+                                             unsigned int current_id) {
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
+
+  StackFrame *frame = m_parser_vars->m_exe_ctx.GetFramePtr();
+  SymbolContext sym_ctx;
+  if (frame != nullptr)
+    sym_ctx = frame->GetSymbolContext(lldb::eSymbolContextFunction |
+                                      lldb::eSymbolContextBlock);
+
+  if (m_ctx_obj) {
+    Status status;
+    lldb::ValueObjectSP ctx_obj_ptr = m_ctx_obj->AddressOf(status);
+    if (!ctx_obj_ptr || status.Fail())
+      return;
+
+    AddThisType(context, TypeFromUser(m_ctx_obj->GetCompilerType()),
+                current_id);
+
+    m_struct_vars->m_object_pointer_type =
+        TypeFromUser(ctx_obj_ptr->GetCompilerType());
+
+    return;
+  }
+
+  // Clang is looking for the type of "this"
+
+  if (frame == nullptr)
+    return;
+
+  // Find the block that defines the function represented by "sym_ctx"
+  Block *function_block = sym_ctx.GetFunctionBlock();
+
+  if (!function_block)
+    return;
+
+  CompilerDeclContext function_decl_ctx = function_block->GetDeclContext();
+
+  if (!function_decl_ctx)
+    return;
+
+  clang::CXXMethodDecl *method_decl =
+      ClangASTContext::DeclContextGetAsCXXMethodDecl(function_decl_ctx);
+
+  if (method_decl) {
+    clang::CXXRecordDecl *class_decl = method_decl->getParent();
+
+    QualType class_qual_type(class_decl->getTypeForDecl(), 0);
+
+    TypeFromUser class_user_type(class_qual_type.getAsOpaquePtr(),
+                                 function_decl_ctx.GetTypeSystem());
+
+    LLDB_LOG(log, "  CEDM::FEVD[{0}] Adding type for $__lldb_class: {1}",
+             current_id, class_qual_type.getAsString());
+
+    AddThisType(context, class_user_type, current_id);
+
+    if (method_decl->isInstance()) {
+      // self is a pointer to the object
+
+      QualType class_pointer_type =
+          method_decl->getASTContext().getPointerType(class_qual_type);
+
+      TypeFromUser self_user_type(class_pointer_type.getAsOpaquePtr(),
+                                  function_decl_ctx.GetTypeSystem());
+
+      m_struct_vars->m_object_pointer_type = self_user_type;
+    }
+    return;
+  }
+
+  // This branch will get hit if we are executing code in the context of
+  // a function that claims to have an object pointer (through
+  // DW_AT_object_pointer?) but is not formally a method of the class.
+  // In that case, just look up the "this" variable in the current scope
+  // and use its type.
+  // FIXME: This code is formally correct, but clang doesn't currently
+  // emit DW_AT_object_pointer
+  // for C++ so it hasn't actually been tested.
+
+  VariableList *vars = frame->GetVariableList(false);
+
+  lldb::VariableSP this_var = vars->FindVariable(ConstString("this"));
+
+  if (this_var && this_var->IsInScope(frame) &&
+      this_var->LocationIsValidForFrame(frame)) {
+    Type *this_type = this_var->GetType();
+
+    if (!this_type)
+      return;
+
+    TypeFromUser pointee_type =
+        this_type->GetForwardCompilerType().GetPointeeType();
+
+    LLDB_LOG(log, "  FEVD[{0}] Adding type for $__lldb_class: {1}", current_id,
+             ClangUtil::GetQualType(pointee_type).getAsString());
+
+    AddThisType(context, pointee_type, current_id);
+    TypeFromUser this_user_type(this_type->GetFullCompilerType());
+    m_struct_vars->m_object_pointer_type = this_user_type;
+  }
+}
+
+void ClangExpressionDeclMap::LookUpLldbObjCClass(NameSearchContext &context,
+                                                 unsigned int current_id) {
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
+
+  StackFrame *frame = m_parser_vars->m_exe_ctx.GetFramePtr();
+
+  if (m_ctx_obj) {
+    Status status;
+    lldb::ValueObjectSP ctx_obj_ptr = m_ctx_obj->AddressOf(status);
+    if (!ctx_obj_ptr || status.Fail())
+      return;
+
+    AddOneType(context, TypeFromUser(m_ctx_obj->GetCompilerType()), current_id);
+
+    m_struct_vars->m_object_pointer_type =
+        TypeFromUser(ctx_obj_ptr->GetCompilerType());
+
+    return;
+  }
+
+  // Clang is looking for the type of "*self"
+
+  if (!frame)
+    return;
+
+  SymbolContext sym_ctx = frame->GetSymbolContext(lldb::eSymbolContextFunction |
+                                                  lldb::eSymbolContextBlock);
+
+  // Find the block that defines the function represented by "sym_ctx"
+  Block *function_block = sym_ctx.GetFunctionBlock();
+
+  if (!function_block)
+    return;
+
+  CompilerDeclContext function_decl_ctx = function_block->GetDeclContext();
+
+  if (!function_decl_ctx)
+    return;
+
+  clang::ObjCMethodDecl *method_decl =
+      ClangASTContext::DeclContextGetAsObjCMethodDecl(function_decl_ctx);
+
+  if (method_decl) {
+    ObjCInterfaceDecl *self_interface = method_decl->getClassInterface();
+
+    if (!self_interface)
+      return;
+
+    const clang::Type *interface_type = self_interface->getTypeForDecl();
+
+    if (!interface_type)
+      return; // This is unlikely, but we have seen crashes where this
+              // occurred
+
+    TypeFromUser class_user_type(QualType(interface_type, 0).getAsOpaquePtr(),
+                                 function_decl_ctx.GetTypeSystem());
+
+    LLDB_LOG(log, "  FEVD[{0}] Adding type for $__lldb_objc_class: {1}",
+             current_id, ClangUtil::ToString(interface_type));
+
+    AddOneType(context, class_user_type, current_id);
+
+    if (method_decl->isInstanceMethod()) {
+      // self is a pointer to the object
+
+      QualType class_pointer_type =
+          method_decl->getASTContext().getObjCObjectPointerType(
+              QualType(interface_type, 0));
+
+      TypeFromUser self_user_type(class_pointer_type.getAsOpaquePtr(),
+                                  function_decl_ctx.GetTypeSystem());
+
+      m_struct_vars->m_object_pointer_type = self_user_type;
+    } else {
+      // self is a Class pointer
+      QualType class_type = method_decl->getASTContext().getObjCClassType();
+
+      TypeFromUser self_user_type(class_type.getAsOpaquePtr(),
+                                  function_decl_ctx.GetTypeSystem());
+
+      m_struct_vars->m_object_pointer_type = self_user_type;
+    }
+
+    return;
+  }
+  // This branch will get hit if we are executing code in the context of
+  // a function that claims to have an object pointer (through
+  // DW_AT_object_pointer?) but is not formally a method of the class.
+  // In that case, just look up the "self" variable in the current scope
+  // and use its type.
+
+  VariableList *vars = frame->GetVariableList(false);
+
+  lldb::VariableSP self_var = vars->FindVariable(ConstString("self"));
+
+  if (!self_var)
+    return;
+  if (!self_var->IsInScope(frame))
+    return;
+  if (!self_var->LocationIsValidForFrame(frame))
+    return;
+
+  Type *self_type = self_var->GetType();
+
+  if (!self_type)
+    return;
+
+  CompilerType self_clang_type = self_type->GetFullCompilerType();
+
+  if (ClangASTContext::IsObjCClassType(self_clang_type)) {
+    return;
+  }
+  if (!ClangASTContext::IsObjCObjectPointerType(self_clang_type))
+    return;
+  self_clang_type = self_clang_type.GetPointeeType();
+
+  if (!self_clang_type)
+    return;
+
+  LLDB_LOG(log, "  FEVD[{0}] Adding type for $__lldb_objc_class: {1}",
+           current_id, ClangUtil::ToString(self_type->GetFullCompilerType()));
+
+  TypeFromUser class_user_type(self_clang_type);
+
+  AddOneType(context, class_user_type, current_id);
+
+  TypeFromUser self_user_type(self_type->GetFullCompilerType());
+
+  m_struct_vars->m_object_pointer_type = self_user_type;
+}
+
+void ClangExpressionDeclMap::LookupLocalVarNamespace(
+    SymbolContext &sym_ctx, NameSearchContext &name_context) {
+  if (sym_ctx.block == nullptr)
+    return;
+
+  CompilerDeclContext frame_decl_context = sym_ctx.block->GetDeclContext();
+  if (!frame_decl_context)
+    return;
+
+  ClangASTContext *frame_ast = llvm::dyn_cast_or_null<ClangASTContext>(
+      frame_decl_context.GetTypeSystem());
+  if (!frame_ast)
+    return;
+
+  clang::NamespaceDecl *namespace_decl =
+      m_clang_ast_context->GetUniqueNamespaceDeclaration(
+          g_lldb_local_vars_namespace_cstr, nullptr);
+  if (!namespace_decl)
+    return;
+
+  name_context.AddNamedDecl(namespace_decl);
+  clang::DeclContext *ctxt = clang::Decl::castToDeclContext(namespace_decl);
+  ctxt->setHasExternalVisibleStorage(true);
+  name_context.m_found.local_vars_nsp = true;
+}
+
+void ClangExpressionDeclMap::LookupInModulesDeclVendor(
+    NameSearchContext &context, ConstString name, unsigned current_id) {
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
+
+  if (!m_target)
+    return;
+
+  auto *modules_decl_vendor = m_target->GetClangModulesDeclVendor();
+  if (!modules_decl_vendor)
+    return;
+
+  bool append = false;
+  uint32_t max_matches = 1;
+  std::vector<clang::NamedDecl *> decls;
+
+  if (!modules_decl_vendor->FindDecls(name, append, max_matches, decls))
+    return;
+
+  assert(!decls.empty() && "FindDecls returned true but no decls?");
+  clang::NamedDecl *const decl_from_modules = decls[0];
+
+  LLDB_LOG(log,
+           "  CAS::FEVD[{0}] Matching decl found for "
+           "\"{1}\" in the modules",
+           current_id, name);
+
+  clang::Decl *copied_decl = CopyDecl(decl_from_modules);
+  if (!copied_decl) {
+    LLDB_LOG(log,
+             "  CAS::FEVD[{0}] - Couldn't export a "
+             "declaration from the modules",
+             current_id);
+    return;
+  }
+
+  if (auto copied_function = dyn_cast<clang::FunctionDecl>(copied_decl)) {
+    MaybeRegisterFunctionBody(copied_function);
+
+    context.AddNamedDecl(copied_function);
+
+    context.m_found.function_with_type_info = true;
+    context.m_found.function = true;
+  } else if (auto copied_var = dyn_cast<clang::VarDecl>(copied_decl)) {
+    context.AddNamedDecl(copied_var);
+    context.m_found.variable = true;
+  }
+}
+
+bool ClangExpressionDeclMap::LookupLocalVariable(
+    NameSearchContext &context, ConstString name, unsigned current_id,
+    SymbolContext &sym_ctx, CompilerDeclContext &namespace_decl) {
+  if (sym_ctx.block == nullptr)
+    return false;
+
+  CompilerDeclContext decl_context = sym_ctx.block->GetDeclContext();
+  if (!decl_context)
+    return false;
+
+  // Make sure that the variables are parsed so that we have the
+  // declarations.
+  StackFrame *frame = m_parser_vars->m_exe_ctx.GetFramePtr();
+  VariableListSP vars = frame->GetInScopeVariableList(true);
+  for (size_t i = 0; i < vars->GetSize(); i++)
+    vars->GetVariableAtIndex(i)->GetDecl();
+
+  // Search for declarations matching the name. Do not include imported
+  // decls in the search if we are looking for decls in the artificial
+  // namespace $__lldb_local_vars.
+  std::vector<CompilerDecl> found_decls =
+      decl_context.FindDeclByName(name, namespace_decl.IsValid());
+
+  VariableSP var;
+  bool variable_found = false;
+  for (CompilerDecl decl : found_decls) {
+    for (size_t vi = 0, ve = vars->GetSize(); vi != ve; ++vi) {
+      VariableSP candidate_var = vars->GetVariableAtIndex(vi);
+      if (candidate_var->GetDecl() == decl) {
+        var = candidate_var;
+        break;
+      }
+    }
+
+    if (var && !variable_found) {
+      variable_found = true;
+      ValueObjectSP valobj = ValueObjectVariable::Create(frame, var);
+      AddOneVariable(context, var, valobj, current_id);
+      context.m_found.variable = true;
+    }
+  }
+  return variable_found;
+}
+
+/// Structure to hold the info needed when comparing function
+/// declarations.
+namespace {
+struct FuncDeclInfo {
+  ConstString m_name;
+  CompilerType m_copied_type;
+  uint32_t m_decl_lvl;
+  SymbolContext m_sym_ctx;
+};
+} // namespace
+
+SymbolContextList ClangExpressionDeclMap::SearchFunctionsInSymbolContexts(
+    const SymbolContextList &sc_list,
+    const CompilerDeclContext &frame_decl_context) {
+  // First, symplify things by looping through the symbol contexts to
+  // remove unwanted functions and separate out the functions we want to
+  // compare and prune into a separate list. Cache the info needed about
+  // the function declarations in a vector for efficiency.
+  uint32_t num_indices = sc_list.GetSize();
+  SymbolContextList sc_sym_list;
+  std::vector<FuncDeclInfo> decl_infos;
+  decl_infos.reserve(num_indices);
+  clang::DeclContext *frame_decl_ctx =
+      (clang::DeclContext *)frame_decl_context.GetOpaqueDeclContext();
+  ClangASTContext *ast = llvm::dyn_cast_or_null<ClangASTContext>(
+      frame_decl_context.GetTypeSystem());
+
+  for (uint32_t index = 0; index < num_indices; ++index) {
+    FuncDeclInfo fdi;
+    SymbolContext sym_ctx;
+    sc_list.GetContextAtIndex(index, sym_ctx);
+
+    // We don't know enough about symbols to compare them, but we should
+    // keep them in the list.
+    Function *function = sym_ctx.function;
+    if (!function) {
+      sc_sym_list.Append(sym_ctx);
+      continue;
+    }
+    // Filter out functions without declaration contexts, as well as
+    // class/instance methods, since they'll be skipped in the code that
+    // follows anyway.
+    CompilerDeclContext func_decl_context = function->GetDeclContext();
+    if (!func_decl_context ||
+        func_decl_context.IsClassMethod(nullptr, nullptr, nullptr))
+      continue;
+    // We can only prune functions for which we can copy the type.
+    CompilerType func_clang_type = function->GetType()->GetFullCompilerType();
+    CompilerType copied_func_type = GuardedCopyType(func_clang_type);
+    if (!copied_func_type) {
+      sc_sym_list.Append(sym_ctx);
+      continue;
+    }
+
+    fdi.m_sym_ctx = sym_ctx;
+    fdi.m_name = function->GetName();
+    fdi.m_copied_type = copied_func_type;
+    fdi.m_decl_lvl = LLDB_INVALID_DECL_LEVEL;
+    if (fdi.m_copied_type && func_decl_context) {
+      // Call CountDeclLevels to get the number of parent scopes we have
+      // to look through before we find the function declaration. When
+      // comparing functions of the same type, the one with a lower count
+      // will be closer to us in the lookup scope and shadows the other.
+      clang::DeclContext *func_decl_ctx =
+          (clang::DeclContext *)func_decl_context.GetOpaqueDeclContext();
+      fdi.m_decl_lvl = ast->CountDeclLevels(frame_decl_ctx, func_decl_ctx,
+                                            &fdi.m_name, &fdi.m_copied_type);
+    }
+    decl_infos.emplace_back(fdi);
+  }
+
+  // Loop through the functions in our cache looking for matching types,
+  // then compare their scope levels to see which is closer.
+  std::multimap<CompilerType, const FuncDeclInfo *> matches;
+  for (const FuncDeclInfo &fdi : decl_infos) {
+    const CompilerType t = fdi.m_copied_type;
+    auto q = matches.find(t);
+    if (q != matches.end()) {
+      if (q->second->m_decl_lvl > fdi.m_decl_lvl)
+        // This function is closer; remove the old set.
+        matches.erase(t);
+      else if (q->second->m_decl_lvl < fdi.m_decl_lvl)
+        // The functions in our set are closer - skip this one.
+        continue;
+    }
+    matches.insert(std::make_pair(t, &fdi));
+  }
+
+  // Loop through our matches and add their symbol contexts to our list.
+  SymbolContextList sc_func_list;
+  for (const auto &q : matches)
+    sc_func_list.Append(q.second->m_sym_ctx);
+
+  // Rejoin the lists with the functions in front.
+  sc_func_list.Append(sc_sym_list);
+  return sc_func_list;
+}
+
+void ClangExpressionDeclMap::LookupFunction(NameSearchContext &context,
+                                            lldb::ModuleSP module_sp,
+                                            ConstString name,
+                                            CompilerDeclContext &namespace_decl,
+                                            unsigned current_id) {
+  if (!m_parser_vars)
+    return;
+
+  Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
+
+  std::vector<clang::NamedDecl *> decls_from_modules;
+
+  if (target) {
+    if (ClangModulesDeclVendor *decl_vendor =
+            target->GetClangModulesDeclVendor()) {
+      decl_vendor->FindDecls(name, false, UINT32_MAX, decls_from_modules);
+    }
+  }
+
+  const bool include_inlines = false;
+  SymbolContextList sc_list;
+  if (namespace_decl && module_sp) {
+    const bool include_symbols = false;
+
+    module_sp->FindFunctions(name, &namespace_decl, eFunctionNameTypeBase,
+                             include_symbols, include_inlines, sc_list);
+  } else if (target && !namespace_decl) {
+    const bool include_symbols = true;
+
+    // TODO Fix FindFunctions so that it doesn't return
+    //   instance methods for eFunctionNameTypeBase.
+
+    target->GetImages().FindFunctions(
+        name, eFunctionNameTypeFull | eFunctionNameTypeBase, include_symbols,
+        include_inlines, sc_list);
+  }
+
+  // If we found more than one function, see if we can use the frame's decl
+  // context to remove functions that are shadowed by other functions which
+  // match in type but are nearer in scope.
+  //
+  // AddOneFunction will not add a function whose type has already been
+  // added, so if there's another function in the list with a matching type,
+  // check to see if their decl context is a parent of the current frame's or
+  // was imported via a and using statement, and pick the best match
+  // according to lookup rules.
+  if (sc_list.GetSize() > 1) {
+    // Collect some info about our frame's context.
+    StackFrame *frame = m_parser_vars->m_exe_ctx.GetFramePtr();
+    SymbolContext frame_sym_ctx;
+    if (frame != nullptr)
+      frame_sym_ctx = frame->GetSymbolContext(lldb::eSymbolContextFunction |
+                                              lldb::eSymbolContextBlock);
+    CompilerDeclContext frame_decl_context =
+        frame_sym_ctx.block != nullptr ? frame_sym_ctx.block->GetDeclContext()
+                                       : CompilerDeclContext();
+
+    // We can't do this without a compiler decl context for our frame.
+    if (frame_decl_context) {
+      sc_list = SearchFunctionsInSymbolContexts(sc_list, frame_decl_context);
+    }
+  }
+
+  if (sc_list.GetSize()) {
+    Symbol *extern_symbol = nullptr;
+    Symbol *non_extern_symbol = nullptr;
+
+    for (uint32_t index = 0, num_indices = sc_list.GetSize();
+         index < num_indices; ++index) {
+      SymbolContext sym_ctx;
+      sc_list.GetContextAtIndex(index, sym_ctx);
+
+      if (sym_ctx.function) {
+        CompilerDeclContext decl_ctx = sym_ctx.function->GetDeclContext();
+
+        if (!decl_ctx)
+          continue;
+
+        // Filter out class/instance methods.
+        if (decl_ctx.IsClassMethod(nullptr, nullptr, nullptr))
+          continue;
+
+        AddOneFunction(context, sym_ctx.function, nullptr, current_id);
+        context.m_found.function_with_type_info = true;
+        context.m_found.function = true;
+      } else if (sym_ctx.symbol) {
+        if (sym_ctx.symbol->GetType() == eSymbolTypeReExported && target) {
+          sym_ctx.symbol = sym_ctx.symbol->ResolveReExportedSymbol(*target);
+          if (sym_ctx.symbol == nullptr)
+            continue;
+        }
+
+        if (sym_ctx.symbol->IsExternal())
+          extern_symbol = sym_ctx.symbol;
+        else
+          non_extern_symbol = sym_ctx.symbol;
+      }
+    }
+
+    if (!context.m_found.function_with_type_info) {
+      for (clang::NamedDecl *decl : decls_from_modules) {
+        if (llvm::isa<clang::FunctionDecl>(decl)) {
+          clang::NamedDecl *copied_decl =
+              llvm::cast_or_null<FunctionDecl>(CopyDecl(decl));
+          if (copied_decl) {
+            context.AddNamedDecl(copied_decl);
+            context.m_found.function_with_type_info = true;
+          }
+        }
+      }
+    }
+
+    if (!context.m_found.function_with_type_info) {
+      if (extern_symbol) {
+        AddOneFunction(context, nullptr, extern_symbol, current_id);
+        context.m_found.function = true;
+      } else if (non_extern_symbol) {
+        AddOneFunction(context, nullptr, non_extern_symbol, current_id);
+        context.m_found.function = true;
+      }
+    }
+  }
+}
+
 void ClangExpressionDeclMap::FindExternalVisibleDecls(
     NameSearchContext &context, lldb::ModuleSP module_sp,
     CompilerDeclContext &namespace_decl, unsigned int current_id) {
   assert(m_ast_context);
 
-  std::function<void(clang::FunctionDecl *)> MaybeRegisterFunctionBody =
-      [this](clang::FunctionDecl *copied_function_decl) {
-        if (copied_function_decl->getBody() && m_parser_vars->m_code_gen) {
-          DeclGroupRef decl_group_ref(copied_function_decl);
-          m_parser_vars->m_code_gen->HandleTopLevelDecl(decl_group_ref);
-        }
-      };
-
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  SymbolContextList sc_list;
-
   const ConstString name(context.m_decl_name.getAsString().c_str());
   if (IgnoreName(name, false))
     return;
 
   // Only look for functions by name out in our symbols if the function doesn't
   // start with our phony prefix of '$'
-  Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
-  StackFrame *frame = m_parser_vars->m_exe_ctx.GetFramePtr();
+
+  Target *target = nullptr;
+  StackFrame *frame = nullptr;
   SymbolContext sym_ctx;
+  if (m_parser_vars) {
+    target = m_parser_vars->m_exe_ctx.GetTargetPtr();
+    frame = m_parser_vars->m_exe_ctx.GetFramePtr();
+  }
   if (frame != nullptr)
     sym_ctx = frame->GetSymbolContext(lldb::eSymbolContextFunction |
                                       lldb::eSymbolContextBlock);
 
   // Try the persistent decls, which take precedence over all else.
-  if (!namespace_decl) {
-    do {
-      if (!target)
-        break;
+  if (!namespace_decl)
+    SearchPersistenDecls(context, name, current_id);
 
-      ClangASTContext *scratch_clang_ast_context =
-          target->GetScratchClangASTContext();
-
-      if (!scratch_clang_ast_context)
-        break;
-
-      ASTContext *scratch_ast_context =
-          scratch_clang_ast_context->getASTContext();
-
-      if (!scratch_ast_context)
-        break;
-
-      NamedDecl *persistent_decl =
-          m_parser_vars->m_persistent_vars->GetPersistentDecl(name);
-
-      if (!persistent_decl)
-        break;
-
-      Decl *parser_persistent_decl = CopyDecl(persistent_decl);
-
-      if (!parser_persistent_decl)
-        break;
-
-      NamedDecl *parser_named_decl =
-          dyn_cast<NamedDecl>(parser_persistent_decl);
-
-      if (!parser_named_decl)
-        break;
-
-      if (clang::FunctionDecl *parser_function_decl =
-              llvm::dyn_cast<clang::FunctionDecl>(parser_named_decl)) {
-        MaybeRegisterFunctionBody(parser_function_decl);
-      }
-
-      if (log)
-        log->Printf("  CEDM::FEVD[%u] Found persistent decl %s", current_id,
-                    name.GetCString());
-
-      context.AddNamedDecl(parser_named_decl);
-    } while (false);
-  }
-
-  if (name.GetCString()[0] == '$' && !namespace_decl) {
-    static ConstString g_lldb_class_name("$__lldb_class");
-
-    if (name == g_lldb_class_name) {
-      if (m_ctx_obj) {
-        Status status;
-        lldb::ValueObjectSP ctx_obj_ptr = m_ctx_obj->AddressOf(status);
-        if (!ctx_obj_ptr || status.Fail())
-          return;
-
-        AddThisType(context, TypeFromUser(m_ctx_obj->GetCompilerType()),
-                    current_id);
-
-        m_struct_vars->m_object_pointer_type =
-            TypeFromUser(ctx_obj_ptr->GetCompilerType());
-
-        return;
-      }
-
-      // Clang is looking for the type of "this"
-
-      if (frame == nullptr)
-        return;
-
-      // Find the block that defines the function represented by "sym_ctx"
-      Block *function_block = sym_ctx.GetFunctionBlock();
-
-      if (!function_block)
-        return;
-
-      CompilerDeclContext function_decl_ctx = function_block->GetDeclContext();
-
-      if (!function_decl_ctx)
-        return;
-
-      clang::CXXMethodDecl *method_decl =
-          ClangASTContext::DeclContextGetAsCXXMethodDecl(function_decl_ctx);
-
-      if (method_decl) {
-        clang::CXXRecordDecl *class_decl = method_decl->getParent();
-
-        QualType class_qual_type(class_decl->getTypeForDecl(), 0);
-
-        TypeFromUser class_user_type(
-            class_qual_type.getAsOpaquePtr(),
-            ClangASTContext::GetASTContext(&class_decl->getASTContext()));
-
-        if (log) {
-          ASTDumper ast_dumper(class_qual_type);
-          log->Printf("  CEDM::FEVD[%u] Adding type for $__lldb_class: %s",
-                      current_id, ast_dumper.GetCString());
-        }
-
-        AddThisType(context, class_user_type, current_id);
-
-        if (method_decl->isInstance()) {
-          // self is a pointer to the object
-
-          QualType class_pointer_type =
-              method_decl->getASTContext().getPointerType(class_qual_type);
-
-          TypeFromUser self_user_type(
-              class_pointer_type.getAsOpaquePtr(),
-              ClangASTContext::GetASTContext(&method_decl->getASTContext()));
-
-          m_struct_vars->m_object_pointer_type = self_user_type;
-        }
-      } else {
-        // This branch will get hit if we are executing code in the context of
-        // a function that claims to have an object pointer (through
-        // DW_AT_object_pointer?) but is not formally a method of the class.
-        // In that case, just look up the "this" variable in the current scope
-        // and use its type.
-        // FIXME: This code is formally correct, but clang doesn't currently
-        // emit DW_AT_object_pointer
-        // for C++ so it hasn't actually been tested.
-
-        VariableList *vars = frame->GetVariableList(false);
-
-        lldb::VariableSP this_var = vars->FindVariable(ConstString("this"));
-
-        if (this_var && this_var->IsInScope(frame) &&
-            this_var->LocationIsValidForFrame(frame)) {
-          Type *this_type = this_var->GetType();
-
-          if (!this_type)
-            return;
-
-          TypeFromUser pointee_type =
-              this_type->GetForwardCompilerType().GetPointeeType();
-
-          if (pointee_type.IsValid()) {
-            if (log) {
-              ASTDumper ast_dumper(pointee_type);
-              log->Printf("  FEVD[%u] Adding type for $__lldb_class: %s",
-                          current_id, ast_dumper.GetCString());
-            }
-
-            AddThisType(context, pointee_type, current_id);
-            TypeFromUser this_user_type(this_type->GetFullCompilerType());
-            m_struct_vars->m_object_pointer_type = this_user_type;
-            return;
-          }
-        }
-      }
-
+  if (name.GetStringRef().startswith("$") && !namespace_decl) {
+    if (name == "$__lldb_class") {
+      LookUpLldbClass(context, current_id);
       return;
     }
 
-    static ConstString g_lldb_objc_class_name("$__lldb_objc_class");
-    if (name == g_lldb_objc_class_name) {
-      if (m_ctx_obj) {
-        Status status;
-        lldb::ValueObjectSP ctx_obj_ptr = m_ctx_obj->AddressOf(status);
-        if (!ctx_obj_ptr || status.Fail())
-          return;
-
-        AddOneType(context, TypeFromUser(m_ctx_obj->GetCompilerType()),
-                    current_id);
-
-        m_struct_vars->m_object_pointer_type =
-            TypeFromUser(ctx_obj_ptr->GetCompilerType());
-
-        return;
-      }
-
-      // Clang is looking for the type of "*self"
-
-      if (!frame)
-        return;
-
-      SymbolContext sym_ctx = frame->GetSymbolContext(
-          lldb::eSymbolContextFunction | lldb::eSymbolContextBlock);
-
-      // Find the block that defines the function represented by "sym_ctx"
-      Block *function_block = sym_ctx.GetFunctionBlock();
-
-      if (!function_block)
-        return;
-
-      CompilerDeclContext function_decl_ctx = function_block->GetDeclContext();
-
-      if (!function_decl_ctx)
-        return;
-
-      clang::ObjCMethodDecl *method_decl =
-          ClangASTContext::DeclContextGetAsObjCMethodDecl(function_decl_ctx);
-
-      if (method_decl) {
-        ObjCInterfaceDecl *self_interface = method_decl->getClassInterface();
-
-        if (!self_interface)
-          return;
-
-        const clang::Type *interface_type = self_interface->getTypeForDecl();
-
-        if (!interface_type)
-          return; // This is unlikely, but we have seen crashes where this
-                  // occurred
-
-        TypeFromUser class_user_type(
-            QualType(interface_type, 0).getAsOpaquePtr(),
-            ClangASTContext::GetASTContext(&method_decl->getASTContext()));
-
-        if (log) {
-          ASTDumper ast_dumper(interface_type);
-          log->Printf("  FEVD[%u] Adding type for $__lldb_objc_class: %s",
-                      current_id, ast_dumper.GetCString());
-        }
-
-        AddOneType(context, class_user_type, current_id);
-
-        if (method_decl->isInstanceMethod()) {
-          // self is a pointer to the object
-
-          QualType class_pointer_type =
-              method_decl->getASTContext().getObjCObjectPointerType(
-                  QualType(interface_type, 0));
-
-          TypeFromUser self_user_type(
-              class_pointer_type.getAsOpaquePtr(),
-              ClangASTContext::GetASTContext(&method_decl->getASTContext()));
-
-          m_struct_vars->m_object_pointer_type = self_user_type;
-        } else {
-          // self is a Class pointer
-          QualType class_type = method_decl->getASTContext().getObjCClassType();
-
-          TypeFromUser self_user_type(
-              class_type.getAsOpaquePtr(),
-              ClangASTContext::GetASTContext(&method_decl->getASTContext()));
-
-          m_struct_vars->m_object_pointer_type = self_user_type;
-        }
-
-        return;
-      } else {
-        // This branch will get hit if we are executing code in the context of
-        // a function that claims to have an object pointer (through
-        // DW_AT_object_pointer?) but is not formally a method of the class.
-        // In that case, just look up the "self" variable in the current scope
-        // and use its type.
-
-        VariableList *vars = frame->GetVariableList(false);
-
-        lldb::VariableSP self_var = vars->FindVariable(ConstString("self"));
-
-        if (self_var && self_var->IsInScope(frame) &&
-            self_var->LocationIsValidForFrame(frame)) {
-          Type *self_type = self_var->GetType();
-
-          if (!self_type)
-            return;
-
-          CompilerType self_clang_type = self_type->GetFullCompilerType();
-
-          if (ClangASTContext::IsObjCClassType(self_clang_type)) {
-            return;
-          } else if (ClangASTContext::IsObjCObjectPointerType(
-                         self_clang_type)) {
-            self_clang_type = self_clang_type.GetPointeeType();
-
-            if (!self_clang_type)
-              return;
-
-            if (log) {
-              ASTDumper ast_dumper(self_type->GetFullCompilerType());
-              log->Printf("  FEVD[%u] Adding type for $__lldb_objc_class: %s",
-                          current_id, ast_dumper.GetCString());
-            }
-
-            TypeFromUser class_user_type(self_clang_type);
-
-            AddOneType(context, class_user_type, current_id);
-
-            TypeFromUser self_user_type(self_type->GetFullCompilerType());
-
-            m_struct_vars->m_object_pointer_type = self_user_type;
-            return;
-          }
-        }
-      }
-
+    if (name == "$__lldb_objc_class") {
+      LookUpLldbObjCClass(context, current_id);
       return;
     }
-
-    if (name == ConstString(g_lldb_local_vars_namespace_cstr)) {
-      CompilerDeclContext frame_decl_context =
-          sym_ctx.block != nullptr ? sym_ctx.block->GetDeclContext()
-                                   : CompilerDeclContext();
-
-      if (frame_decl_context) {
-        ClangASTContext *ast = llvm::dyn_cast_or_null<ClangASTContext>(
-            frame_decl_context.GetTypeSystem());
-
-        if (ast) {
-          clang::NamespaceDecl *namespace_decl =
-              ClangASTContext::GetUniqueNamespaceDeclaration(
-                  m_ast_context, name.GetCString(), nullptr);
-          if (namespace_decl) {
-            context.AddNamedDecl(namespace_decl);
-            clang::DeclContext *clang_decl_ctx =
-                clang::Decl::castToDeclContext(namespace_decl);
-            clang_decl_ctx->setHasExternalVisibleStorage(true);
-            context.m_found.local_vars_nsp = true;
-          }
-        }
-      }
-
+    if (name == g_lldb_local_vars_namespace_cstr) {
+      LookupLocalVarNamespace(sym_ctx, context);
       return;
     }
 
@@ -1206,6 +1394,10 @@
     if (name.GetStringRef().startswith("$__lldb"))
       return;
 
+    // No ParserVars means we can't do register or variable lookup.
+    if (!m_parser_vars || !m_parser_vars->m_persistent_vars)
+      return;
+
     ExpressionVariableSP pvar_sp(
         m_parser_vars->m_persistent_vars->GetVariable(name));
 
@@ -1214,7 +1406,8 @@
       return;
     }
 
-    const char *reg_name(&name.GetCString()[1]);
+    assert(name.GetStringRef().startswith("$"));
+    llvm::StringRef reg_name = name.GetStringRef().substr(1);
 
     if (m_parser_vars->m_exe_ctx.GetRegisterContext()) {
       const RegisterInfo *reg_info(
@@ -1222,374 +1415,64 @@
               reg_name));
 
       if (reg_info) {
-        if (log)
-          log->Printf("  CEDM::FEVD[%u] Found register %s", current_id,
-                      reg_info->name);
+        LLDB_LOGF(log, "  CEDM::FEVD[%u] Found register %s", current_id,
+                  reg_info->name);
 
         AddOneRegister(context, reg_info, current_id);
       }
     }
-  } else {
+    return;
+  }
+
+  bool local_var_lookup = !namespace_decl || (namespace_decl.GetName() ==
+                                              g_lldb_local_vars_namespace_cstr);
+  if (frame && local_var_lookup)
+    if (LookupLocalVariable(context, name, current_id, sym_ctx, namespace_decl))
+      return;
+
+  if (target) {
     ValueObjectSP valobj;
     VariableSP var;
+    var = FindGlobalVariable(*target, module_sp, name, &namespace_decl);
 
-    bool local_var_lookup =
-        !namespace_decl || (namespace_decl.GetName() ==
-                            ConstString(g_lldb_local_vars_namespace_cstr));
-    if (frame && local_var_lookup) {
-      CompilerDeclContext compiler_decl_context =
-          sym_ctx.block != nullptr ? sym_ctx.block->GetDeclContext()
-                                   : CompilerDeclContext();
-
-      if (compiler_decl_context) {
-        // Make sure that the variables are parsed so that we have the
-        // declarations.
-        VariableListSP vars = frame->GetInScopeVariableList(true);
-        for (size_t i = 0; i < vars->GetSize(); i++)
-          vars->GetVariableAtIndex(i)->GetDecl();
-
-        // Search for declarations matching the name. Do not include imported
-        // decls in the search if we are looking for decls in the artificial
-        // namespace $__lldb_local_vars.
-        std::vector<CompilerDecl> found_decls =
-            compiler_decl_context.FindDeclByName(name,
-                                                 namespace_decl.IsValid());
-
-        bool variable_found = false;
-        for (CompilerDecl decl : found_decls) {
-          for (size_t vi = 0, ve = vars->GetSize(); vi != ve; ++vi) {
-            VariableSP candidate_var = vars->GetVariableAtIndex(vi);
-            if (candidate_var->GetDecl() == decl) {
-              var = candidate_var;
-              break;
-            }
-          }
-
-          if (var && !variable_found) {
-            variable_found = true;
-            valobj = ValueObjectVariable::Create(frame, var);
-            AddOneVariable(context, var, valobj, current_id);
-            context.m_found.variable = true;
-          }
-        }
-        if (variable_found)
-          return;
-      }
+    if (var) {
+      valobj = ValueObjectVariable::Create(target, var);
+      AddOneVariable(context, var, valobj, current_id);
+      context.m_found.variable = true;
+      return;
     }
-    if (target) {
-      var = FindGlobalVariable(*target, module_sp, name, &namespace_decl,
-                               nullptr);
+  }
 
-      if (var) {
-        valobj = ValueObjectVariable::Create(target, var);
-        AddOneVariable(context, var, valobj, current_id);
-        context.m_found.variable = true;
-        return;
-      }
+  LookupFunction(context, module_sp, name, namespace_decl, current_id);
+
+  // Try the modules next.
+  if (!context.m_found.function_with_type_info)
+    LookupInModulesDeclVendor(context, name, current_id);
+
+  if (target && !context.m_found.variable && !namespace_decl) {
+    // We couldn't find a non-symbol variable for this.  Now we'll hunt for a
+    // generic data symbol, and -- if it is found -- treat it as a variable.
+    Status error;
+
+    const Symbol *data_symbol =
+        m_parser_vars->m_sym_ctx.FindBestGlobalDataSymbol(name, error);
+
+    if (!error.Success()) {
+      const unsigned diag_id =
+          m_ast_context->getDiagnostics().getCustomDiagID(
+              clang::DiagnosticsEngine::Level::Error, "%0");
+      m_ast_context->getDiagnostics().Report(diag_id) << error.AsCString();
     }
 
-    std::vector<clang::NamedDecl *> decls_from_modules;
-
-    if (target) {
-      if (ClangModulesDeclVendor *decl_vendor =
-              target->GetClangModulesDeclVendor()) {
-        decl_vendor->FindDecls(name, false, UINT32_MAX, decls_from_modules);
-      }
-    }
-
-    const bool include_inlines = false;
-    const bool append = false;
-
-    if (namespace_decl && module_sp) {
-      const bool include_symbols = false;
-
-      module_sp->FindFunctions(name, &namespace_decl, eFunctionNameTypeBase,
-                               include_symbols, include_inlines, append,
-                               sc_list);
-    } else if (target && !namespace_decl) {
-      const bool include_symbols = true;
-
-      // TODO Fix FindFunctions so that it doesn't return
-      //   instance methods for eFunctionNameTypeBase.
-
-      target->GetImages().FindFunctions(name, eFunctionNameTypeFull,
-                                        include_symbols, include_inlines,
-                                        append, sc_list);
-    }
-
-    // If we found more than one function, see if we can use the frame's decl
-    // context to remove functions that are shadowed by other functions which
-    // match in type but are nearer in scope.
-    //
-    // AddOneFunction will not add a function whose type has already been
-    // added, so if there's another function in the list with a matching type,
-    // check to see if their decl context is a parent of the current frame's or
-    // was imported via a and using statement, and pick the best match
-    // according to lookup rules.
-    if (sc_list.GetSize() > 1) {
-      // Collect some info about our frame's context.
-      StackFrame *frame = m_parser_vars->m_exe_ctx.GetFramePtr();
-      SymbolContext frame_sym_ctx;
-      if (frame != nullptr)
-        frame_sym_ctx = frame->GetSymbolContext(lldb::eSymbolContextFunction |
-                                                lldb::eSymbolContextBlock);
-      CompilerDeclContext frame_decl_context =
-          frame_sym_ctx.block != nullptr ? frame_sym_ctx.block->GetDeclContext()
-                                         : CompilerDeclContext();
-
-      // We can't do this without a compiler decl context for our frame.
-      if (frame_decl_context) {
-        clang::DeclContext *frame_decl_ctx =
-            (clang::DeclContext *)frame_decl_context.GetOpaqueDeclContext();
-        ClangASTContext *ast = llvm::dyn_cast_or_null<ClangASTContext>(
-            frame_decl_context.GetTypeSystem());
-
-        // Structure to hold the info needed when comparing function
-        // declarations.
-        struct FuncDeclInfo {
-          ConstString m_name;
-          CompilerType m_copied_type;
-          uint32_t m_decl_lvl;
-          SymbolContext m_sym_ctx;
-        };
-
-        // First, symplify things by looping through the symbol contexts to
-        // remove unwanted functions and separate out the functions we want to
-        // compare and prune into a separate list. Cache the info needed about
-        // the function declarations in a vector for efficiency.
-        SymbolContextList sc_sym_list;
-        uint32_t num_indices = sc_list.GetSize();
-        std::vector<FuncDeclInfo> fdi_cache;
-        fdi_cache.reserve(num_indices);
-        for (uint32_t index = 0; index < num_indices; ++index) {
-          FuncDeclInfo fdi;
-          SymbolContext sym_ctx;
-          sc_list.GetContextAtIndex(index, sym_ctx);
-
-          // We don't know enough about symbols to compare them, but we should
-          // keep them in the list.
-          Function *function = sym_ctx.function;
-          if (!function) {
-            sc_sym_list.Append(sym_ctx);
-            continue;
-          }
-          // Filter out functions without declaration contexts, as well as
-          // class/instance methods, since they'll be skipped in the code that
-          // follows anyway.
-          CompilerDeclContext func_decl_context = function->GetDeclContext();
-          if (!func_decl_context ||
-              func_decl_context.IsClassMethod(nullptr, nullptr, nullptr))
-            continue;
-          // We can only prune functions for which we can copy the type.
-          CompilerType func_clang_type =
-              function->GetType()->GetFullCompilerType();
-          CompilerType copied_func_type = GuardedCopyType(func_clang_type);
-          if (!copied_func_type) {
-            sc_sym_list.Append(sym_ctx);
-            continue;
-          }
-
-          fdi.m_sym_ctx = sym_ctx;
-          fdi.m_name = function->GetName();
-          fdi.m_copied_type = copied_func_type;
-          fdi.m_decl_lvl = LLDB_INVALID_DECL_LEVEL;
-          if (fdi.m_copied_type && func_decl_context) {
-            // Call CountDeclLevels to get the number of parent scopes we have
-            // to look through before we find the function declaration. When
-            // comparing functions of the same type, the one with a lower count
-            // will be closer to us in the lookup scope and shadows the other.
-            clang::DeclContext *func_decl_ctx =
-                (clang::DeclContext *)func_decl_context.GetOpaqueDeclContext();
-            fdi.m_decl_lvl = ast->CountDeclLevels(
-                frame_decl_ctx, func_decl_ctx, &fdi.m_name, &fdi.m_copied_type);
-          }
-          fdi_cache.emplace_back(fdi);
-        }
-
-        // Loop through the functions in our cache looking for matching types,
-        // then compare their scope levels to see which is closer.
-        std::multimap<CompilerType, const FuncDeclInfo *> matches;
-        for (const FuncDeclInfo &fdi : fdi_cache) {
-          const CompilerType t = fdi.m_copied_type;
-          auto q = matches.find(t);
-          if (q != matches.end()) {
-            if (q->second->m_decl_lvl > fdi.m_decl_lvl)
-              // This function is closer; remove the old set.
-              matches.erase(t);
-            else if (q->second->m_decl_lvl < fdi.m_decl_lvl)
-              // The functions in our set are closer - skip this one.
-              continue;
-          }
-          matches.insert(std::make_pair(t, &fdi));
-        }
-
-        // Loop through our matches and add their symbol contexts to our list.
-        SymbolContextList sc_func_list;
-        for (const auto &q : matches)
-          sc_func_list.Append(q.second->m_sym_ctx);
-
-        // Rejoin the lists with the functions in front.
-        sc_list = sc_func_list;
-        sc_list.Append(sc_sym_list);
-      }
-    }
-
-    if (sc_list.GetSize()) {
-      Symbol *extern_symbol = nullptr;
-      Symbol *non_extern_symbol = nullptr;
-
-      for (uint32_t index = 0, num_indices = sc_list.GetSize();
-           index < num_indices; ++index) {
-        SymbolContext sym_ctx;
-        sc_list.GetContextAtIndex(index, sym_ctx);
-
-        if (sym_ctx.function) {
-          CompilerDeclContext decl_ctx = sym_ctx.function->GetDeclContext();
-
-          if (!decl_ctx)
-            continue;
-
-          // Filter out class/instance methods.
-          if (decl_ctx.IsClassMethod(nullptr, nullptr, nullptr))
-            continue;
-
-          AddOneFunction(context, sym_ctx.function, nullptr, current_id);
-          context.m_found.function_with_type_info = true;
-          context.m_found.function = true;
-        } else if (sym_ctx.symbol) {
-          if (sym_ctx.symbol->GetType() == eSymbolTypeReExported && target) {
-            sym_ctx.symbol = sym_ctx.symbol->ResolveReExportedSymbol(*target);
-            if (sym_ctx.symbol == nullptr)
-              continue;
-          }
-
-          if (sym_ctx.symbol->IsExternal())
-            extern_symbol = sym_ctx.symbol;
-          else
-            non_extern_symbol = sym_ctx.symbol;
-        }
-      }
-
-      if (!context.m_found.function_with_type_info) {
-        for (clang::NamedDecl *decl : decls_from_modules) {
-          if (llvm::isa<clang::FunctionDecl>(decl)) {
-            clang::NamedDecl *copied_decl =
-                llvm::cast_or_null<FunctionDecl>(CopyDecl(decl));
-            if (copied_decl) {
-              context.AddNamedDecl(copied_decl);
-              context.m_found.function_with_type_info = true;
-            }
-          }
-        }
-      }
-
-      if (!context.m_found.function_with_type_info) {
-        if (extern_symbol) {
-          AddOneFunction(context, nullptr, extern_symbol, current_id);
-          context.m_found.function = true;
-        } else if (non_extern_symbol) {
-          AddOneFunction(context, nullptr, non_extern_symbol, current_id);
-          context.m_found.function = true;
-        }
-      }
-    }
-
-    if (!context.m_found.function_with_type_info) {
-      // Try the modules next.
-
-      do {
-        if (ClangModulesDeclVendor *modules_decl_vendor =
-                m_target->GetClangModulesDeclVendor()) {
-          bool append = false;
-          uint32_t max_matches = 1;
-          std::vector<clang::NamedDecl *> decls;
-
-          if (!modules_decl_vendor->FindDecls(name, append, max_matches, decls))
-            break;
-
-          clang::NamedDecl *const decl_from_modules = decls[0];
-
-          if (llvm::isa<clang::FunctionDecl>(decl_from_modules)) {
-            if (log) {
-              log->Printf("  CAS::FEVD[%u] Matching function found for "
-                          "\"%s\" in the modules",
-                          current_id, name.GetCString());
-            }
-
-            clang::Decl *copied_decl = CopyDecl(decl_from_modules);
-            clang::FunctionDecl *copied_function_decl =
-                copied_decl ? dyn_cast<clang::FunctionDecl>(copied_decl)
-                            : nullptr;
-
-            if (!copied_function_decl) {
-              if (log)
-                log->Printf("  CAS::FEVD[%u] - Couldn't export a function "
-                            "declaration from the modules",
-                            current_id);
-
-              break;
-            }
-
-            MaybeRegisterFunctionBody(copied_function_decl);
-
-            context.AddNamedDecl(copied_function_decl);
-
-            context.m_found.function_with_type_info = true;
-            context.m_found.function = true;
-          } else if (llvm::isa<clang::VarDecl>(decl_from_modules)) {
-            if (log) {
-              log->Printf("  CAS::FEVD[%u] Matching variable found for "
-                          "\"%s\" in the modules",
-                          current_id, name.GetCString());
-            }
-
-            clang::Decl *copied_decl = CopyDecl(decl_from_modules);
-            clang::VarDecl *copied_var_decl =
-                copied_decl ? dyn_cast_or_null<clang::VarDecl>(copied_decl)
-                            : nullptr;
-
-            if (!copied_var_decl) {
-              if (log)
-                log->Printf("  CAS::FEVD[%u] - Couldn't export a variable "
-                            "declaration from the modules",
-                            current_id);
-
-              break;
-            }
-
-            context.AddNamedDecl(copied_var_decl);
-
-            context.m_found.variable = true;
-          }
-        }
-      } while (false);
-    }
-
-    if (target && !context.m_found.variable && !namespace_decl) {
-      // We couldn't find a non-symbol variable for this.  Now we'll hunt for a
-      // generic data symbol, and -- if it is found -- treat it as a variable.
-      Status error;
-
-      const Symbol *data_symbol =
-          m_parser_vars->m_sym_ctx.FindBestGlobalDataSymbol(name, error);
-
-      if (!error.Success()) {
-        const unsigned diag_id =
-            m_ast_context->getDiagnostics().getCustomDiagID(
-                clang::DiagnosticsEngine::Level::Error, "%0");
-        m_ast_context->getDiagnostics().Report(diag_id) << error.AsCString();
-      }
-
-      if (data_symbol) {
-        std::string warning("got name from symbols: ");
-        warning.append(name.AsCString());
-        const unsigned diag_id =
-            m_ast_context->getDiagnostics().getCustomDiagID(
-                clang::DiagnosticsEngine::Level::Warning, "%0");
-        m_ast_context->getDiagnostics().Report(diag_id) << warning.c_str();
-        AddOneGenericVariable(context, *data_symbol, current_id);
-        context.m_found.variable = true;
-      }
+    if (data_symbol) {
+      std::string warning("got name from symbols: ");
+      warning.append(name.AsCString());
+      const unsigned diag_id =
+          m_ast_context->getDiagnostics().getCustomDiagID(
+              clang::DiagnosticsEngine::Level::Warning, "%0");
+      m_ast_context->getDiagnostics().Report(diag_id) << warning.c_str();
+      AddOneGenericVariable(context, *data_symbol, current_id);
+      context.m_found.variable = true;
     }
   }
 }
@@ -1625,15 +1508,6 @@
     return false;
   }
 
-  ASTContext *ast = clang_ast->getASTContext();
-
-  if (!ast) {
-    if (log)
-      log->PutCString(
-          "There is no AST context for the current execution context");
-    return false;
-  }
-
   DWARFExpression &var_location_expr = var->LocationExpression();
 
   Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
@@ -1647,8 +1521,7 @@
                            const_value_extractor.GetByteSize());
       var_location.SetValueType(Value::eValueTypeHostAddress);
     } else {
-      if (log)
-        log->Printf("Error evaluating constant variable: %s", err.AsCString());
+      LLDB_LOGF(log, "Error evaluating constant variable: %s", err.AsCString());
       return false;
     }
   }
@@ -1656,9 +1529,8 @@
   CompilerType type_to_use = GuardedCopyType(var_clang_type);
 
   if (!type_to_use) {
-    if (log)
-      log->Printf(
-          "Couldn't copy a variable's type into the parser's AST context");
+    LLDB_LOGF(log,
+              "Couldn't copy a variable's type into the parser's AST context");
 
     return false;
   }
@@ -1748,13 +1620,10 @@
   if (is_reference)
     entity->m_flags |= ClangExpressionVariable::EVTypeIsReference;
 
-  if (log) {
-    ASTDumper orig_dumper(ut.GetOpaqueQualType());
-    ASTDumper ast_dumper(var_decl);
-    log->Printf("  CEDM::FEVD[%u] Found variable %s, returned %s (original %s)",
-                current_id, decl_name.c_str(), ast_dumper.GetCString(),
-                orig_dumper.GetCString());
-  }
+  LLDB_LOG(log,
+           "  CEDM::FEVD[{0}] Found variable {1}, returned\n{2} (original {3})",
+           current_id, decl_name, ClangUtil::DumpDecl(var_decl),
+           ClangUtil::ToString(ut));
 }
 
 void ClangExpressionDeclMap::AddOneVariable(NameSearchContext &context,
@@ -1768,9 +1637,8 @@
   TypeFromParser parser_type(GuardedCopyType(user_type));
 
   if (!parser_type.GetOpaqueQualType()) {
-    if (log)
-      log->Printf("  CEDM::FEVD[%u] Couldn't import type for pvar %s",
-                  current_id, pvar_sp->GetName().GetCString());
+    LLDB_LOGF(log, "  CEDM::FEVD[%u] Couldn't import type for pvar %s",
+              current_id, pvar_sp->GetName().GetCString());
     return;
   }
 
@@ -1787,11 +1655,8 @@
   parser_vars->m_llvm_value = nullptr;
   parser_vars->m_lldb_value.Clear();
 
-  if (log) {
-    ASTDumper ast_dumper(var_decl);
-    log->Printf("  CEDM::FEVD[%u] Added pvar %s, returned %s", current_id,
-                pvar_sp->GetName().GetCString(), ast_dumper.GetCString());
-  }
+  LLDB_LOG(log, "  CEDM::FEVD[{0}] Added pvar {1}, returned\n{2}", current_id,
+           pvar_sp->GetName(), ClangUtil::DumpDecl(var_decl));
 }
 
 void ClangExpressionDeclMap::AddOneGenericVariable(NameSearchContext &context,
@@ -1806,17 +1671,16 @@
   if (target == nullptr)
     return;
 
-  ASTContext *scratch_ast_context =
-      target->GetScratchClangASTContext()->getASTContext();
+  ClangASTContext *scratch_ast_context = ClangASTContext::GetScratch(*target);
+  if (!scratch_ast_context)
+    return;
 
-  TypeFromUser user_type(
-      ClangASTContext::GetBasicType(scratch_ast_context, eBasicTypeVoid)
-          .GetPointerType()
-          .GetLValueReferenceType());
-  TypeFromParser parser_type(
-      ClangASTContext::GetBasicType(m_ast_context, eBasicTypeVoid)
-          .GetPointerType()
-          .GetLValueReferenceType());
+  TypeFromUser user_type(scratch_ast_context->GetBasicType(eBasicTypeVoid)
+                             .GetPointerType()
+                             .GetLValueReferenceType());
+  TypeFromParser parser_type(m_clang_ast_context->GetBasicType(eBasicTypeVoid)
+                                 .GetPointerType()
+                                 .GetLValueReferenceType());
   NamedDecl *var_decl = context.AddVarDecl(parser_type);
 
   std::string decl_name(context.m_decl_name.getAsString());
@@ -1845,88 +1709,8 @@
   parser_vars->m_llvm_value = nullptr;
   parser_vars->m_lldb_sym = &symbol;
 
-  if (log) {
-    ASTDumper ast_dumper(var_decl);
-
-    log->Printf("  CEDM::FEVD[%u] Found variable %s, returned %s", current_id,
-                decl_name.c_str(), ast_dumper.GetCString());
-  }
-}
-
-bool ClangExpressionDeclMap::ResolveUnknownTypes() {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-  Target *target = m_parser_vars->m_exe_ctx.GetTargetPtr();
-
-  ClangASTContextForExpressions *scratch_ast_context =
-      static_cast<ClangASTContextForExpressions*>(
-          target->GetScratchClangASTContext());
-
-  for (size_t index = 0, num_entities = m_found_entities.GetSize();
-       index < num_entities; ++index) {
-    ExpressionVariableSP entity = m_found_entities.GetVariableAtIndex(index);
-
-    ClangExpressionVariable::ParserVars *parser_vars =
-        llvm::cast<ClangExpressionVariable>(entity.get())
-            ->GetParserVars(GetParserID());
-
-    if (entity->m_flags & ClangExpressionVariable::EVUnknownType) {
-      const NamedDecl *named_decl = parser_vars->m_named_decl;
-      const VarDecl *var_decl = dyn_cast<VarDecl>(named_decl);
-
-      if (!var_decl) {
-        if (log)
-          log->Printf("Entity of unknown type does not have a VarDecl");
-        return false;
-      }
-
-      if (log) {
-        ASTDumper ast_dumper(const_cast<VarDecl *>(var_decl));
-        log->Printf("Variable of unknown type now has Decl %s",
-                    ast_dumper.GetCString());
-      }
-
-      QualType var_type = var_decl->getType();
-      TypeFromParser parser_type(
-          var_type.getAsOpaquePtr(),
-          ClangASTContext::GetASTContext(&var_decl->getASTContext()));
-
-      lldb::opaque_compiler_type_t copied_type = nullptr;
-      if (m_ast_importer_sp) {
-        copied_type = m_ast_importer_sp->CopyType(
-            scratch_ast_context->getASTContext(), &var_decl->getASTContext(),
-            var_type.getAsOpaquePtr());
-      } else if (HasMerger()) {
-        copied_type = CopyTypeWithMerger(
-            var_decl->getASTContext(),
-            scratch_ast_context->GetMergerUnchecked(),
-            var_type).getAsOpaquePtr();
-      } else {
-        lldbassert(0 && "No mechanism to copy a resolved unknown type!");
-        return false;
-      }
-
-      if (!copied_type) {
-        if (log)
-          log->Printf("ClangExpressionDeclMap::ResolveUnknownType - Couldn't "
-                      "import the type for a variable");
-
-        return (bool)lldb::ExpressionVariableSP();
-      }
-
-      TypeFromUser user_type(copied_type, scratch_ast_context);
-
-      //            parser_vars->m_lldb_value.SetContext(Value::eContextTypeClangType,
-      //            user_type.GetOpaqueQualType());
-      parser_vars->m_lldb_value.SetCompilerType(user_type);
-      parser_vars->m_parser_type = parser_type;
-
-      entity->SetCompilerType(user_type);
-
-      entity->m_flags &= ~(ClangExpressionVariable::EVUnknownType);
-    }
-  }
-
-  return true;
+  LLDB_LOG(log, "  CEDM::FEVD[{0}] Found variable {1}, returned\n{2}",
+           current_id, decl_name, ClangUtil::DumpDecl(var_decl));
 }
 
 void ClangExpressionDeclMap::AddOneRegister(NameSearchContext &context,
@@ -1935,13 +1719,12 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
   CompilerType clang_type =
-      ClangASTContext::GetBuiltinTypeForEncodingAndBitSize(
-          m_ast_context, reg_info->encoding, reg_info->byte_size * 8);
+      m_clang_ast_context->GetBuiltinTypeForEncodingAndBitSize(
+          reg_info->encoding, reg_info->byte_size * 8);
 
   if (!clang_type) {
-    if (log)
-      log->Printf("  Tried to add a type for %s, but couldn't get one",
-                  context.m_decl_name.getAsString().c_str());
+    LLDB_LOGF(log, "  Tried to add a type for %s, but couldn't get one",
+              context.m_decl_name.getAsString().c_str());
     return;
   }
 
@@ -1967,12 +1750,9 @@
   parser_vars->m_lldb_value.Clear();
   entity->m_flags |= ClangExpressionVariable::EVBareRegister;
 
-  if (log) {
-    ASTDumper ast_dumper(var_decl);
-    log->Printf("  CEDM::FEVD[%d] Added register %s, returned %s", current_id,
-                context.m_decl_name.getAsString().c_str(),
-                ast_dumper.GetCString());
-  }
+  LLDB_LOG(log, "  CEDM::FEVD[{0}] Added register {1}, returned\n{2}",
+           current_id, context.m_decl_name.getAsString(),
+           ClangUtil::DumpDecl(var_decl));
 }
 
 void ClangExpressionDeclMap::AddOneFunction(NameSearchContext &context,
@@ -2015,45 +1795,42 @@
                   CopyDecl(function_template));
           if (copied_function_template) {
             if (log) {
-              ASTDumper ast_dumper((clang::Decl *)copied_function_template);
-              
               StreamString ss;
-              
+
               function->DumpSymbolContext(&ss);
-              
-              log->Printf("  CEDM::FEVD[%u] Imported decl for function template"
-                          " %s (description %s), returned %s",
-                          current_id,
-                          copied_function_template->getNameAsString().c_str(),
-                          ss.GetData(), ast_dumper.GetCString());
+
+              LLDB_LOG(log,
+                       "  CEDM::FEVD[{0}] Imported decl for function template"
+                       " {1} (description {2}), returned\n{3}",
+                       current_id, copied_function_template->getNameAsString(),
+                       ss.GetData(),
+                       ClangUtil::DumpDecl(copied_function_template));
             }
-            
+
             context.AddNamedDecl(copied_function_template);
           }
         } else if (src_function_decl) {
           if (clang::FunctionDecl *copied_function_decl =
                   llvm::dyn_cast_or_null<clang::FunctionDecl>(
-                       CopyDecl(src_function_decl))) {
+                      CopyDecl(src_function_decl))) {
             if (log) {
-              ASTDumper ast_dumper((clang::Decl *)copied_function_decl);
-
               StreamString ss;
 
               function->DumpSymbolContext(&ss);
 
-              log->Printf("  CEDM::FEVD[%u] Imported decl for function %s "
-                          "(description %s), returned %s",
-                          current_id,
-                          copied_function_decl->getNameAsString().c_str(),
-                          ss.GetData(), ast_dumper.GetCString());
+              LLDB_LOG(log,
+                       "  CEDM::FEVD[{0}]] Imported decl for function {1} "
+                       "(description {2}), returned\n{3}",
+                       current_id, copied_function_decl->getNameAsString(),
+                       ss.GetData(), ClangUtil::DumpDecl(copied_function_decl));
             }
 
             context.AddNamedDecl(copied_function_decl);
             return;
           } else {
             if (log) {
-              log->Printf("  Failed to import the function decl for '%s'",
-                          src_function_decl->getName().str().c_str());
+              LLDB_LOGF(log, "  Failed to import the function decl for '%s'",
+                        src_function_decl->getName().str().c_str());
             }
           }
         }
@@ -2082,7 +1859,8 @@
 
       if (!function_decl) {
         if (log) {
-          log->Printf(
+          LLDB_LOGF(
+              log,
               "  Failed to create a function decl for '%s' {0x%8.8" PRIx64 "}",
               function_type->GetName().GetCString(), function_type->GetID());
         }
@@ -2092,10 +1870,11 @@
     } else {
       // We failed to copy the type we found
       if (log) {
-        log->Printf("  Failed to import the function type '%s' {0x%8.8" PRIx64
-                    "} into the expression parser AST contenxt",
-                    function_type->GetName().GetCString(),
-                    function_type->GetID());
+        LLDB_LOGF(log,
+                  "  Failed to import the function type '%s' {0x%8.8" PRIx64
+                  "} into the expression parser AST contenxt",
+                  function_type->GetName().GetCString(),
+                  function_type->GetID());
       }
 
       return;
@@ -2145,19 +1924,17 @@
   parser_vars->m_llvm_value = nullptr;
 
   if (log) {
-    std::string function_str =
-        function_decl ? ASTDumper(function_decl).GetCString() : "nullptr";
-
     StreamString ss;
 
     fun_address.Dump(&ss,
                      m_parser_vars->m_exe_ctx.GetBestExecutionContextScope(),
                      Address::DumpStyleResolvedDescription);
 
-    log->Printf(
-        "  CEDM::FEVD[%u] Found %s function %s (description %s), returned %s",
-        current_id, (function ? "specific" : "generic"), decl_name.c_str(),
-        ss.GetData(), function_str.c_str());
+    LLDB_LOG(log,
+             "  CEDM::FEVD[{0}] Found {1} function {2} (description {3}), "
+             "returned\n{4}",
+             current_id, (function ? "specific" : "generic"), decl_name,
+             ss.GetData(), ClangUtil::DumpDecl(function_decl));
   }
 }
 
@@ -2170,7 +1947,8 @@
 
   if (!copied_clang_type) {
     if (log)
-      log->Printf(
+      LLDB_LOGF(
+          log,
           "ClangExpressionDeclMap::AddThisType - Couldn't import the type");
 
     return;
@@ -2179,11 +1957,11 @@
   if (copied_clang_type.IsAggregateType() &&
       copied_clang_type.GetCompleteType()) {
     CompilerType void_clang_type =
-        ClangASTContext::GetBasicType(m_ast_context, eBasicTypeVoid);
+        m_clang_ast_context->GetBasicType(eBasicTypeVoid);
     CompilerType void_ptr_clang_type = void_clang_type.GetPointerType();
 
-    CompilerType method_type = ClangASTContext::CreateFunctionType(
-        m_ast_context, void_clang_type, &void_ptr_clang_type, 1, false, 0);
+    CompilerType method_type = m_clang_ast_context->CreateFunctionType(
+        void_clang_type, &void_ptr_clang_type, 1, false, 0);
 
     const bool is_virtual = false;
     const bool is_static = false;
@@ -2192,21 +1970,16 @@
     const bool is_attr_used = true;
     const bool is_artificial = false;
 
-    CXXMethodDecl *method_decl =
-        ClangASTContext::GetASTContext(m_ast_context)
-            ->AddMethodToCXXRecordType(
-                copied_clang_type.GetOpaqueQualType(), "$__lldb_expr", nullptr,
-                method_type, lldb::eAccessPublic, is_virtual, is_static,
-                is_inline, is_explicit, is_attr_used, is_artificial);
+    CXXMethodDecl *method_decl = m_clang_ast_context->AddMethodToCXXRecordType(
+        copied_clang_type.GetOpaqueQualType(), "$__lldb_expr", nullptr,
+        method_type, lldb::eAccessPublic, is_virtual, is_static, is_inline,
+        is_explicit, is_attr_used, is_artificial);
 
-    if (log) {
-      ASTDumper method_ast_dumper((clang::Decl *)method_decl);
-      ASTDumper type_ast_dumper(copied_clang_type);
-
-      log->Printf("  CEDM::AddThisType Added function $__lldb_expr "
-                  "(description %s) for this type %s",
-                  method_ast_dumper.GetCString(), type_ast_dumper.GetCString());
-    }
+    LLDB_LOG(log,
+             "  CEDM::AddThisType Added function $__lldb_expr "
+             "(description {0}) for this type\n{1}",
+             ClangUtil::ToString(copied_clang_type),
+             ClangUtil::DumpDecl(method_decl));
   }
 
   if (!copied_clang_type.IsValid())
@@ -2244,8 +2017,8 @@
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
     if (log)
-      log->Printf(
-          "ClangExpressionDeclMap::AddOneType - Couldn't import the type");
+      LLDB_LOGF(
+          log, "ClangExpressionDeclMap::AddOneType - Couldn't import the type");
 
     return;
   }
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
index 03b73e6..722f5e1 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h
@@ -63,12 +63,15 @@
   ///     the result persistent variable, and instead marks the variable
   ///     as persisting.
   ///
-  /// \param[in] delegate
+  /// \param[in] result_delegate
   ///     If non-NULL, use this delegate to report result values.  This
   ///     allows the client ClangUserExpression to report a result.
   ///
-  /// \param[in] exe_ctx
-  ///     The execution context to use when parsing.
+  /// \param[in] target
+  ///     The target to use when parsing.
+  ///
+  /// \param[in] importer
+  ///     The ClangASTImporter to use when parsing.
   ///
   /// \param[in] ctx_obj
   ///     If not empty, then expression is evaluated in context of this object.
@@ -76,7 +79,7 @@
   ClangExpressionDeclMap(
       bool keep_result_in_memory,
       Materializer::PersistentVariableDelegate *result_delegate,
-      ExecutionContext &exe_ctx,
+      const lldb::TargetSP &target, const lldb::ClangASTImporterSP &importer,
       ValueObject *ctx_obj);
 
   /// Destructor
@@ -98,13 +101,6 @@
 
   void InstallCodeGenerator(clang::ASTConsumer *code_gen);
 
-  /// [Used by ClangExpressionParser] For each variable that had an unknown
-  ///     type at the beginning of parsing, determine its final type now.
-  ///
-  /// \return
-  ///     True on success; false otherwise.
-  bool ResolveUnknownTypes();
-
   /// Disable the state needed for parsing and IR transformation.
   void DidParse();
 
@@ -248,17 +244,6 @@
   lldb::addr_t GetSymbolAddress(ConstString name,
                                 lldb::SymbolType symbol_type);
 
-  /// [Used by IRInterpreter] Get basic target information.
-  ///
-  /// \param[out] byte_order
-  ///     The byte order of the target.
-  ///
-  /// \param[out] address_byte_size
-  ///     The size of a pointer in bytes.
-  ///
-  /// \return
-  ///     True if the information could be determined; false
-  ///     otherwise.
   struct TargetInfo {
     lldb::ByteOrder byte_order;
     size_t address_byte_size;
@@ -276,9 +261,6 @@
   ///
   /// \param[in] context
   ///     The NameSearchContext that can construct Decls for this name.
-  ///
-  /// \return
-  ///     True on success; false otherwise.
   void FindExternalVisibleDecls(NameSearchContext &context) override;
 
   /// Find all entities matching a given name in a given module/namespace,
@@ -296,14 +278,19 @@
   /// \param[in] current_id
   ///     The ID for the current FindExternalVisibleDecls invocation,
   ///     for logging purposes.
-  ///
-  /// \return
-  ///     True on success; false otherwise.
   void FindExternalVisibleDecls(NameSearchContext &context,
                                 lldb::ModuleSP module,
                                 CompilerDeclContext &namespace_decl,
                                 unsigned int current_id);
 
+protected:
+  /// Retrieves the declaration with the given name from the storage of
+  /// persistent declarations.
+  ///
+  /// \return
+  ///     A persistent decl with the given name or a nullptr.
+  virtual clang::NamedDecl *GetPersistentDecl(ConstString name);
+
 private:
   ExpressionVariableList
       m_found_entities; ///< All entities that were looked up for the parser.
@@ -329,7 +316,7 @@
       if (m_exe_ctx.GetTargetPtr())
         return m_exe_ctx.GetTargetPtr();
       else if (m_sym_ctx.target_sp)
-        m_sym_ctx.target_sp.get();
+        return m_sym_ctx.target_sp.get();
       return nullptr;
     }
 
@@ -356,7 +343,7 @@
   /// Activate parser-specific variables
   void EnableParserVars() {
     if (!m_parser_vars.get())
-      m_parser_vars = llvm::make_unique<ParserVars>();
+      m_parser_vars = std::make_unique<ParserVars>();
   }
 
   /// Deallocate parser-specific variables
@@ -396,6 +383,130 @@
   /// from persistent variables.
   uint64_t GetParserID() { return (uint64_t) this; }
 
+  /// Should be called on all copied functions.
+  void MaybeRegisterFunctionBody(clang::FunctionDecl *copied_function_decl);
+
+  /// Searches the persistent decls of the target for entities with the
+  /// given name.
+  ///
+  /// \param[in] context
+  ///     The NameSearchContext that can construct Decls for this name.
+  ///
+  /// \param[in] name
+  ///     The name of the entities that need to be found.
+  ///
+  /// \param[in] current_id
+  ///     The ID for the current FindExternalVisibleDecls invocation,
+  ///     for logging purposes.
+  void SearchPersistenDecls(NameSearchContext &context, const ConstString name,
+                            unsigned int current_id);
+
+  /// Handles looking up $__lldb_class which requires special treatment.
+  ///
+  /// \param[in] context
+  ///     The NameSearchContext that can construct Decls for this name.
+  ///
+  /// \param[in] current_id
+  ///     The ID for the current FindExternalVisibleDecls invocation,
+  ///     for logging purposes.
+  void LookUpLldbClass(NameSearchContext &context, unsigned int current_id);
+
+  /// Handles looking up $__lldb_objc_class which requires special treatment.
+  ///
+  /// \param[in] context
+  ///     The NameSearchContext that can construct Decls for this name.
+  ///
+  /// \param[in] current_id
+  ///     The ID for the current FindExternalVisibleDecls invocation,
+  ///     for logging purposes.
+  void LookUpLldbObjCClass(NameSearchContext &context, unsigned int current_id);
+
+  /// Handles looking up the synthetic namespace that contains our local
+  /// variables for the current frame.
+  ///
+  /// \param[in] sym_ctx
+  ///     The current SymbolContext of this frame.
+  ///
+  /// \param[in] name_context
+  ///     The NameSearchContext that can construct Decls for this name.
+  void LookupLocalVarNamespace(SymbolContext &sym_ctx,
+                               NameSearchContext &name_context);
+
+  /// Lookup entities in the ClangModulesDeclVendor.
+  /// \param[in] context
+  ///     The NameSearchContext that can construct Decls for this name.
+  ///
+  /// \param[in] name
+  ///     The name of the entities that need to be found.
+  ///
+  /// \param[in] current_id
+  ///     The ID for the current FindExternalVisibleDecls invocation,
+  ///     for logging purposes.
+  void LookupInModulesDeclVendor(NameSearchContext &context, ConstString name,
+                                 unsigned current_id);
+
+  /// Looks up a local variable.
+  ///
+  /// \param[in] context
+  ///     The NameSearchContext that can construct Decls for this name.
+  ///
+  /// \param[in] name
+  ///     The name of the entities that need to be found.
+  ///
+  /// \param[in] current_id
+  ///     The ID for the current FindExternalVisibleDecls invocation,
+  ///     for logging purposes.
+  ///
+  /// \param[in] sym_ctx
+  ///     The current SymbolContext of this frame.
+  ///
+  /// \param[in] namespace_decl
+  ///     The parent namespace if there is one.
+  ///
+  /// \return
+  ///    True iff a local variable was found.
+  bool LookupLocalVariable(NameSearchContext &context, ConstString name,
+                           unsigned current_id, SymbolContext &sym_ctx,
+                           CompilerDeclContext &namespace_decl);
+
+  /// Searches for functions in the given SymbolContextList.
+  ///
+  /// \param[in] sc_list
+  ///     The SymbolContextList to search.
+  ///
+  /// \param[in] frame_decl_context
+  ///     The current DeclContext of the current frame.
+  ///
+  /// \return
+  ///     A SymbolContextList with any found functions in the front and
+  ///     any unknown SymbolContexts which are not functions in the back.
+  ///     The SymbolContexts for the functions are ordered by how close they are
+  ///     to the DeclContext for the given frame DeclContext.
+  SymbolContextList SearchFunctionsInSymbolContexts(
+      const SymbolContextList &sc_list,
+      const CompilerDeclContext &frame_decl_context);
+
+  /// Looks up a function.
+  ///
+  /// \param[in] context
+  ///     The NameSearchContext that can construct Decls for this name.
+  ///
+  /// \param[in] module_sp
+  ///     If non-NULL, the module to query.
+  ///
+  /// \param[in] name
+  ///     The name of the function that should be find.
+  ///
+  /// \param[in] namespace_decl
+  ///     If valid and module is non-NULL, the parent namespace.
+  ///
+  /// \param[in] current_id
+  ///     The ID for the current FindExternalVisibleDecls invocation,
+  ///     for logging purposes.
+  void LookupFunction(NameSearchContext &context, lldb::ModuleSP module_sp,
+                      ConstString name, CompilerDeclContext &namespace_decl,
+                      unsigned current_id);
+
   /// Given a target, find a variable that matches the given name and type.
   ///
   /// \param[in] target
@@ -410,17 +521,11 @@
   /// \param[in] namespace_decl
   ///     If non-NULL and module is non-NULL, the parent namespace.
   ///
-  /// \param[in] type
-  ///     The required type for the variable.  This function may be called
-  ///     during parsing, in which case we don't know its type; hence the
-  ///     default.
-  ///
   /// \return
   ///     The LLDB Variable found, or NULL if none was found.
   lldb::VariableSP FindGlobalVariable(Target &target, lldb::ModuleSP &module,
                                       ConstString name,
-                                      CompilerDeclContext *namespace_decl,
-                                      TypeFromUser *type = nullptr);
+                                      CompilerDeclContext *namespace_decl);
 
   /// Get the value of a variable in a given execution context and return the
   /// associated Types if needed.
@@ -441,9 +546,6 @@
   ///     AST context.  This is only useful when the variable is being
   ///     inspected on behalf of the parser, hence the default.
   ///
-  /// \param[in] decl
-  ///     The Decl to be looked up.
-  ///
   /// \return
   ///     Return true if the value was successfully filled in.
   bool GetVariableValue(lldb::VariableSP &var,
@@ -471,7 +573,7 @@
   /// \param[in] context
   ///     The NameSearchContext to use when constructing the Decl.
   ///
-  /// \param[in] pvar
+  /// \param[in] pvar_sp
   ///     The persistent variable that needs a Decl.
   ///
   /// \param[in] current_id
@@ -483,12 +585,6 @@
 
   /// Use the NameSearchContext to generate a Decl for the given LLDB symbol
   /// (treated as a variable), and put it in the list of found entities.
-  ///
-  /// \param[in] context
-  ///     The NameSearchContext to use when constructing the Decl.
-  ///
-  /// \param[in] var
-  ///     The LLDB Variable that needs a Decl.
   void AddOneGenericVariable(NameSearchContext &context, const Symbol &symbol,
                              unsigned int current_id);
 
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
index 7d13891..8abd149 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -10,6 +10,7 @@
 #include "clang/AST/ASTDiagnostic.h"
 #include "clang/AST/ExternalASTSource.h"
 #include "clang/AST/PrettyPrinter.h"
+#include "clang/Basic/Builtins.h"
 #include "clang/Basic/DiagnosticIDs.h"
 #include "clang/Basic/SourceLocation.h"
 #include "clang/Basic/TargetInfo.h"
@@ -105,16 +106,26 @@
 class ClangExpressionParser::LLDBPreprocessorCallbacks : public PPCallbacks {
   ClangModulesDeclVendor &m_decl_vendor;
   ClangPersistentVariables &m_persistent_vars;
+  clang::SourceManager &m_source_mgr;
   StreamString m_error_stream;
   bool m_has_errors = false;
 
 public:
   LLDBPreprocessorCallbacks(ClangModulesDeclVendor &decl_vendor,
-                            ClangPersistentVariables &persistent_vars)
-      : m_decl_vendor(decl_vendor), m_persistent_vars(persistent_vars) {}
+                            ClangPersistentVariables &persistent_vars,
+                            clang::SourceManager &source_mgr)
+      : m_decl_vendor(decl_vendor), m_persistent_vars(persistent_vars),
+        m_source_mgr(source_mgr) {}
 
   void moduleImport(SourceLocation import_location, clang::ModuleIdPath path,
                     const clang::Module * /*null*/) override {
+    // Ignore modules that are imported in the wrapper code as these are not
+    // loaded by the user.
+    llvm::StringRef filename =
+        m_source_mgr.getPresumedLoc(import_location).getFilename();
+    if (filename == ClangExpressionSourceCode::g_prefix_file_name)
+      return;
+
     SourceModule module;
 
     for (const std::pair<IdentifierInfo *, SourceLocation> &component : path)
@@ -137,12 +148,14 @@
 
 class ClangDiagnosticManagerAdapter : public clang::DiagnosticConsumer {
 public:
-  ClangDiagnosticManagerAdapter()
-      : m_passthrough(new clang::TextDiagnosticBuffer) {}
-
-  ClangDiagnosticManagerAdapter(
-      const std::shared_ptr<clang::TextDiagnosticBuffer> &passthrough)
-      : m_passthrough(passthrough) {}
+  ClangDiagnosticManagerAdapter(DiagnosticOptions &opts) {
+    DiagnosticOptions *m_options = new DiagnosticOptions(opts);
+    m_options->ShowPresumedLoc = true;
+    m_options->ShowLevel = false;
+    m_os.reset(new llvm::raw_string_ostream(m_output));
+    m_passthrough.reset(
+        new clang::TextDiagnosticPrinter(*m_os, m_options, false));
+  }
 
   void ResetManager(DiagnosticManager *manager = nullptr) {
     m_manager = manager;
@@ -150,79 +163,92 @@
 
   void HandleDiagnostic(DiagnosticsEngine::Level DiagLevel,
                         const clang::Diagnostic &Info) override {
-    if (m_manager) {
-      llvm::SmallVector<char, 32> diag_str;
-      Info.FormatDiagnostic(diag_str);
-      diag_str.push_back('\0');
-      const char *data = diag_str.data();
-
-      lldb_private::DiagnosticSeverity severity;
-      bool make_new_diagnostic = true;
-
-      switch (DiagLevel) {
-      case DiagnosticsEngine::Level::Fatal:
-      case DiagnosticsEngine::Level::Error:
-        severity = eDiagnosticSeverityError;
-        break;
-      case DiagnosticsEngine::Level::Warning:
-        severity = eDiagnosticSeverityWarning;
-        break;
-      case DiagnosticsEngine::Level::Remark:
-      case DiagnosticsEngine::Level::Ignored:
-        severity = eDiagnosticSeverityRemark;
-        break;
-      case DiagnosticsEngine::Level::Note:
-        m_manager->AppendMessageToDiagnostic(data);
-        make_new_diagnostic = false;
+    if (!m_manager) {
+      // We have no DiagnosticManager before/after parsing but we still could
+      // receive diagnostics (e.g., by the ASTImporter failing to copy decls
+      // when we move the expression result ot the ScratchASTContext). Let's at
+      // least log these diagnostics until we find a way to properly render
+      // them and display them to the user.
+      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
+      if (log) {
+        llvm::SmallVector<char, 32> diag_str;
+        Info.FormatDiagnostic(diag_str);
+        diag_str.push_back('\0');
+        const char *plain_diag = diag_str.data();
+        LLDB_LOG(log, "Received diagnostic outside parsing: {0}", plain_diag);
       }
-      if (make_new_diagnostic) {
-        ClangDiagnostic *new_diagnostic =
-            new ClangDiagnostic(data, severity, Info.getID());
-        m_manager->AddDiagnostic(new_diagnostic);
-
-        // Don't store away warning fixits, since the compiler doesn't have
-        // enough context in an expression for the warning to be useful.
-        // FIXME: Should we try to filter out FixIts that apply to our generated
-        // code, and not the user's expression?
-        if (severity == eDiagnosticSeverityError) {
-          size_t num_fixit_hints = Info.getNumFixItHints();
-          for (size_t i = 0; i < num_fixit_hints; i++) {
-            const clang::FixItHint &fixit = Info.getFixItHint(i);
-            if (!fixit.isNull())
-              new_diagnostic->AddFixitHint(fixit);
-          }
-        }
-      }
+      return;
     }
 
+    // Render diagnostic message to m_output.
+    m_output.clear();
     m_passthrough->HandleDiagnostic(DiagLevel, Info);
+    m_os->flush();
+
+    lldb_private::DiagnosticSeverity severity;
+    bool make_new_diagnostic = true;
+
+    switch (DiagLevel) {
+    case DiagnosticsEngine::Level::Fatal:
+    case DiagnosticsEngine::Level::Error:
+      severity = eDiagnosticSeverityError;
+      break;
+    case DiagnosticsEngine::Level::Warning:
+      severity = eDiagnosticSeverityWarning;
+      break;
+    case DiagnosticsEngine::Level::Remark:
+    case DiagnosticsEngine::Level::Ignored:
+      severity = eDiagnosticSeverityRemark;
+      break;
+    case DiagnosticsEngine::Level::Note:
+      m_manager->AppendMessageToDiagnostic(m_output);
+      make_new_diagnostic = false;
+    }
+    if (make_new_diagnostic) {
+      // ClangDiagnostic messages are expected to have no whitespace/newlines
+      // around them.
+      std::string stripped_output = llvm::StringRef(m_output).trim();
+
+      auto new_diagnostic = std::make_unique<ClangDiagnostic>(
+          stripped_output, severity, Info.getID());
+
+      // Don't store away warning fixits, since the compiler doesn't have
+      // enough context in an expression for the warning to be useful.
+      // FIXME: Should we try to filter out FixIts that apply to our generated
+      // code, and not the user's expression?
+      if (severity == eDiagnosticSeverityError) {
+        size_t num_fixit_hints = Info.getNumFixItHints();
+        for (size_t i = 0; i < num_fixit_hints; i++) {
+          const clang::FixItHint &fixit = Info.getFixItHint(i);
+          if (!fixit.isNull())
+            new_diagnostic->AddFixitHint(fixit);
+        }
+      }
+
+      m_manager->AddDiagnostic(std::move(new_diagnostic));
+    }
   }
 
-  void FlushDiagnostics(DiagnosticsEngine &Diags) {
-    m_passthrough->FlushDiagnostics(Diags);
-  }
-
-  DiagnosticConsumer *clone(DiagnosticsEngine &Diags) const {
-    return new ClangDiagnosticManagerAdapter(m_passthrough);
-  }
-
-  clang::TextDiagnosticBuffer *GetPassthrough() { return m_passthrough.get(); }
+  clang::TextDiagnosticPrinter *GetPassthrough() { return m_passthrough.get(); }
 
 private:
   DiagnosticManager *m_manager = nullptr;
-  std::shared_ptr<clang::TextDiagnosticBuffer> m_passthrough;
+  std::shared_ptr<clang::TextDiagnosticPrinter> m_passthrough;
+  /// Output stream of m_passthrough.
+  std::shared_ptr<llvm::raw_string_ostream> m_os;
+  /// Output string filled by m_os.
+  std::string m_output;
 };
 
-static void
-SetupModuleHeaderPaths(CompilerInstance *compiler,
-                       std::vector<ConstString> include_directories,
-                       lldb::TargetSP target_sp) {
+static void SetupModuleHeaderPaths(CompilerInstance *compiler,
+                                   std::vector<std::string> include_directories,
+                                   lldb::TargetSP target_sp) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
   HeaderSearchOptions &search_opts = compiler->getHeaderSearchOpts();
 
-  for (ConstString dir : include_directories) {
-    search_opts.AddPath(dir.AsCString(), frontend::System, false, true);
+  for (const std::string &dir : include_directories) {
+    search_opts.AddPath(dir, frontend::System, false, true);
     LLDB_LOG(log, "Added user include dir: {0}", dir);
   }
 
@@ -232,27 +258,9 @@
   search_opts.ModuleCachePath = module_cache.str();
   LLDB_LOG(log, "Using module cache path: {0}", module_cache.c_str());
 
-  FileSpec clang_resource_dir = GetClangResourceDir();
-  std::string resource_dir = clang_resource_dir.GetPath();
-  if (FileSystem::Instance().IsDirectory(resource_dir)) {
-    search_opts.ResourceDir = resource_dir;
-    std::string resource_include = resource_dir + "/include";
-    search_opts.AddPath(resource_include, frontend::System, false, true);
-
-    LLDB_LOG(log, "Added resource include dir: {0}", resource_include);
-  }
+  search_opts.ResourceDir = GetClangResourceDir().GetPath();
 
   search_opts.ImplicitModuleMaps = true;
-
-  std::vector<std::string> system_include_directories =
-      target_sp->GetPlatform()->GetSystemIncludeDirectories(
-          lldb::eLanguageTypeC_plus_plus);
-
-  for (const std::string &include_dir : system_include_directories) {
-    search_opts.AddPath(include_dir, frontend::System, false, true);
-
-    LLDB_LOG(log, "Added system include dir: {0}", include_dir);
-  }
 }
 
 //===----------------------------------------------------------------------===//
@@ -261,10 +269,12 @@
 
 ClangExpressionParser::ClangExpressionParser(
     ExecutionContextScope *exe_scope, Expression &expr,
-    bool generate_debug_info, std::vector<ConstString> include_directories)
+    bool generate_debug_info, std::vector<std::string> include_directories,
+    std::string filename)
     : ExpressionParser(exe_scope, expr, generate_debug_info), m_compiler(),
       m_pp_callbacks(nullptr),
-      m_include_directories(std::move(include_directories)) {
+      m_include_directories(std::move(include_directories)),
+      m_filename(std::move(filename)) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
   // We can't compile expressions without a target.  So if the exe_scope is
@@ -331,9 +341,8 @@
 
   if (process_sp && frame_lang != lldb::eLanguageTypeUnknown) {
     lang_rt = process_sp->GetLanguageRuntime(frame_lang);
-    if (log)
-      log->Printf("Frame has language of type %s",
-                  Language::GetNameForLanguageType(frame_lang));
+    LLDB_LOGF(log, "Frame has language of type %s",
+              Language::GetNameForLanguageType(frame_lang));
   }
 
   // 2. Configure the compiler with a set of default options that are
@@ -341,9 +350,8 @@
   if (target_arch.IsValid()) {
     std::string triple = target_arch.GetTriple().str();
     m_compiler->getTargetOpts().Triple = triple;
-    if (log)
-      log->Printf("Using %s as the target triple",
-                  m_compiler->getTargetOpts().Triple.c_str());
+    LLDB_LOGF(log, "Using %s as the target triple",
+              m_compiler->getTargetOpts().Triple.c_str());
   } else {
     // If we get here we don't have a valid target and just have to guess.
     // Sometimes this will be ok to just use the host target triple (when we
@@ -352,9 +360,8 @@
     // the host triple. In such a case the language runtime should expose an
     // overridden options set (3), below.
     m_compiler->getTargetOpts().Triple = llvm::sys::getDefaultTargetTriple();
-    if (log)
-      log->Printf("Using default target triple of %s",
-                  m_compiler->getTargetOpts().Triple.c_str());
+    LLDB_LOGF(log, "Using default target triple of %s",
+              m_compiler->getTargetOpts().Triple.c_str());
   }
   // Now add some special fixes for known architectures: Any arm32 iOS
   // environment, but not on arm64
@@ -408,12 +415,13 @@
   auto target_info = TargetInfo::CreateTargetInfo(
       m_compiler->getDiagnostics(), m_compiler->getInvocation().TargetOpts);
   if (log) {
-    log->Printf("Using SIMD alignment: %d", target_info->getSimdDefaultAlign());
-    log->Printf("Target datalayout string: '%s'",
-                target_info->getDataLayout().getStringRepresentation().c_str());
-    log->Printf("Target ABI: '%s'", target_info->getABI().str().c_str());
-    log->Printf("Target vector alignment: %d",
-                target_info->getMaxVectorAlign());
+    LLDB_LOGF(log, "Using SIMD alignment: %d",
+              target_info->getSimdDefaultAlign());
+    LLDB_LOGF(log, "Target datalayout string: '%s'",
+              target_info->getDataLayout().getStringRepresentation().c_str());
+    LLDB_LOGF(log, "Target ABI: '%s'", target_info->getABI().str().c_str());
+    LLDB_LOGF(log, "Target vector alignment: %d",
+              target_info->getMaxVectorAlign());
   }
   m_compiler->setTarget(target_info);
 
@@ -508,6 +516,9 @@
     lang_opts.DoubleSquareBracketAttributes = true;
     lang_opts.CPlusPlus11 = true;
 
+    // The Darwin libc expects this macro to be set.
+    lang_opts.GNUCVersion = 40201;
+
     SetupModuleHeaderPaths(m_compiler.get(), m_include_directories,
                            target_sp);
   }
@@ -537,8 +548,8 @@
   // Set CodeGen options
   m_compiler->getCodeGenOpts().EmitDeclMetadata = true;
   m_compiler->getCodeGenOpts().InstrumentFunctions = false;
-  m_compiler->getCodeGenOpts().DisableFPElim = true;
-  m_compiler->getCodeGenOpts().OmitLeafFramePointer = false;
+  m_compiler->getCodeGenOpts().setFramePointer(
+                                    CodeGenOptions::FramePointerKind::All);
   if (generate_debug_info)
     m_compiler->getCodeGenOpts().setDebugInfo(codegenoptions::FullDebugInfo);
   else
@@ -560,7 +571,9 @@
 
   // 6. Set up the diagnostic buffer for reporting errors
 
-  m_compiler->getDiagnostics().setClient(new ClangDiagnosticManagerAdapter);
+  auto diag_mgr = new ClangDiagnosticManagerAdapter(
+      m_compiler->getDiagnostics().getDiagnosticOptions());
+  m_compiler->getDiagnostics().setClient(diag_mgr);
 
   // 7. Set up the source management objects inside the compiler
   m_compiler->createFileManager();
@@ -570,15 +583,16 @@
 
   if (ClangModulesDeclVendor *decl_vendor =
           target_sp->GetClangModulesDeclVendor()) {
-    ClangPersistentVariables *clang_persistent_vars =
-        llvm::cast<ClangPersistentVariables>(
+    if (auto *clang_persistent_vars = llvm::cast<ClangPersistentVariables>(
             target_sp->GetPersistentExpressionStateForLanguage(
-                lldb::eLanguageTypeC));
-    std::unique_ptr<PPCallbacks> pp_callbacks(
-        new LLDBPreprocessorCallbacks(*decl_vendor, *clang_persistent_vars));
-    m_pp_callbacks =
-        static_cast<LLDBPreprocessorCallbacks *>(pp_callbacks.get());
-    m_compiler->getPreprocessor().addPPCallbacks(std::move(pp_callbacks));
+                lldb::eLanguageTypeC))) {
+      std::unique_ptr<PPCallbacks> pp_callbacks(
+          new LLDBPreprocessorCallbacks(*decl_vendor, *clang_persistent_vars,
+                                        m_compiler->getSourceManager()));
+      m_pp_callbacks =
+          static_cast<LLDBPreprocessorCallbacks *>(pp_callbacks.get());
+      m_compiler->getPreprocessor().addPPCallbacks(std::move(pp_callbacks));
+    }
   }
 
   // 8. Most of this we get from the CompilerInstance, but we also want to give
@@ -592,9 +606,7 @@
   m_compiler->createASTContext();
   clang::ASTContext &ast_context = m_compiler->getASTContext();
 
-  m_ast_context.reset(
-      new ClangASTContext(m_compiler->getTargetOpts().Triple.c_str()));
-  m_ast_context->setASTContext(&ast_context);
+  m_ast_context.reset(new ClangASTContext(ast_context));
 
   std::string module_name("$__lldb_module");
 
@@ -686,10 +698,7 @@
 
 public:
   /// Constructs a CodeComplete consumer that can be attached to a Sema.
-  /// \param[out] matches
-  ///    The list of matches that the lldb completion API expects as a result.
-  ///    This may already contain matches, so it's only allowed to append
-  ///    to this variable.
+  ///
   /// \param[out] expr
   ///    The whole expression string that we are currently parsing. This
   ///    string needs to be equal to the input the user typed, and NOT the
@@ -872,8 +881,7 @@
   ClangDiagnosticManagerAdapter *adapter =
       static_cast<ClangDiagnosticManagerAdapter *>(
           m_compiler->getDiagnostics().getClient());
-  clang::TextDiagnosticBuffer *diag_buf = adapter->GetPassthrough();
-  diag_buf->FlushDiagnostics(m_compiler->getDiagnostics());
+  auto diag_buf = adapter->GetPassthrough();
 
   adapter->ResetManager(&diagnostic_manager);
 
@@ -904,16 +912,19 @@
     }
 
     if (temp_fd != -1) {
-      lldb_private::File file(temp_fd, true);
+      lldb_private::NativeFile file(temp_fd, File::eOpenOptionWrite, true);
       const size_t expr_text_len = strlen(expr_text);
       size_t bytes_written = expr_text_len;
       if (file.Write(expr_text, bytes_written).Success()) {
         if (bytes_written == expr_text_len) {
           file.Close();
-          source_mgr.setMainFileID(source_mgr.createFileID(
-              m_compiler->getFileManager().getFile(result_path),
-              SourceLocation(), SrcMgr::C_User));
-          created_main_file = true;
+          if (auto fileEntry =
+                  m_compiler->getFileManager().getFile(result_path)) {
+            source_mgr.setMainFileID(source_mgr.createFileID(
+                *fileEntry,
+                SourceLocation(), SrcMgr::C_User));
+            created_main_file = true;
+          }
         }
       }
     }
@@ -921,7 +932,7 @@
 
   if (!created_main_file) {
     std::unique_ptr<MemoryBuffer> memory_buffer =
-        MemoryBuffer::getMemBufferCopy(expr_text, "<lldb-expr>");
+        MemoryBuffer::getMemBufferCopy(expr_text, m_filename);
     source_mgr.setMainFileID(source_mgr.createFileID(std::move(memory_buffer)));
   }
 
@@ -964,7 +975,7 @@
   m_compiler->setASTConsumer(std::move(Consumer));
 
   if (ast_context.getLangOpts().Modules) {
-    m_compiler->createModuleManager();
+    m_compiler->createASTReader();
     m_ast_context->setSema(&m_compiler->getSema());
   }
 
@@ -987,7 +998,7 @@
     } else {
       ast_context.setExternalSource(ast_source);
     }
-    decl_map->InstallASTContext(ast_context, m_compiler->getFileManager());
+    decl_map->InstallASTContext(*m_ast_context);
   }
 
   // Check that the ASTReader is properly attached to ASTContext and Sema.
@@ -1024,15 +1035,6 @@
   }
 
   if (!num_errors) {
-    if (type_system_helper->DeclMap() &&
-        !type_system_helper->DeclMap()->ResolveUnknownTypes()) {
-      diagnostic_manager.Printf(eDiagnosticSeverityError,
-                                "Couldn't infer the type of a variable");
-      num_errors++;
-    }
-  }
-
-  if (!num_errors) {
     type_system_helper->CommitPersistentDecls();
   }
 
@@ -1092,8 +1094,8 @@
   if (num_diags == 0)
     return false;
 
-  for (const Diagnostic *diag : diagnostic_manager.Diagnostics()) {
-    const ClangDiagnostic *diagnostic = llvm::dyn_cast<ClangDiagnostic>(diag);
+  for (const auto &diag : diagnostic_manager.Diagnostics()) {
+    const auto *diagnostic = llvm::dyn_cast<ClangDiagnostic>(diag.get());
     if (diagnostic && diagnostic->HasFixIts()) {
       for (const FixItHint &fixit : diagnostic->FixIts()) {
         // This is cobbed from clang::Rewrite::FixItRewriter.
@@ -1181,9 +1183,8 @@
                                    m_expr.FunctionName());
       return err;
     } else {
-      if (log)
-        log->Printf("Found function %s for %s", function_name.AsCString(),
-                    m_expr.FunctionName());
+      LLDB_LOGF(log, "Found function %s for %s", function_name.AsCString(),
+                m_expr.FunctionName());
     }
   }
 
@@ -1198,9 +1199,8 @@
   LLVMUserExpression::IRPasses custom_passes;
   {
     auto lang = m_expr.Language();
-    if (log)
-      log->Printf("%s - Current expression language is %s\n", __FUNCTION__,
-                  Language::GetNameForLanguageType(lang));
+    LLDB_LOGF(log, "%s - Current expression language is %s\n", __FUNCTION__,
+              Language::GetNameForLanguageType(lang));
     lldb::ProcessSP process_sp = exe_ctx.GetProcessSP();
     if (process_sp && lang != lldb::eLanguageTypeUnknown) {
       auto runtime = process_sp->GetLanguageRuntime(lang);
@@ -1210,10 +1210,10 @@
   }
 
   if (custom_passes.EarlyPasses) {
-    if (log)
-      log->Printf("%s - Running Early IR Passes from LanguageRuntime on "
-                  "expression module '%s'",
-                  __FUNCTION__, m_expr.FunctionName());
+    LLDB_LOGF(log,
+              "%s - Running Early IR Passes from LanguageRuntime on "
+              "expression module '%s'",
+              __FUNCTION__, m_expr.FunctionName());
 
     custom_passes.EarlyPasses->run(*llvm_module_up);
   }
@@ -1230,12 +1230,10 @@
       type_system_helper->DeclMap(); // result can be NULL
 
   if (decl_map) {
-    Stream *error_stream = nullptr;
     Target *target = exe_ctx.GetTargetPtr();
-    error_stream = target->GetDebugger().GetErrorFile().get();
-
+    auto &error_stream = target->GetDebugger().GetErrorStream();
     IRForTarget ir_for_target(decl_map, m_expr.NeedsVariableResolution(),
-                              *execution_unit_sp, *error_stream,
+                              *execution_unit_sp, error_stream,
                               function_name.AsCString());
 
     bool ir_can_run =
@@ -1260,8 +1258,9 @@
           interpret_error, interpret_function_calls);
 
       if (!can_interpret && execution_policy == eExecutionPolicyNever) {
-        err.SetErrorStringWithFormat("Can't run the expression locally: %s",
-                                     interpret_error.AsCString());
+        err.SetErrorStringWithFormat(
+            "Can't evaluate the expression without a running target due to: %s",
+            interpret_error.AsCString());
         return err;
       }
     }
@@ -1298,9 +1297,8 @@
 
           process->SetDynamicCheckers(dynamic_checkers);
 
-          if (log)
-            log->Printf("== [ClangExpressionParser::PrepareForExecution] "
-                        "Finished installing dynamic checkers ==");
+          LLDB_LOGF(log, "== [ClangExpressionParser::PrepareForExecution] "
+                         "Finished installing dynamic checkers ==");
         }
 
         if (auto *checker_funcs = llvm::dyn_cast<ClangDynamicCheckerFunctions>(
@@ -1316,10 +1314,10 @@
           }
 
           if (custom_passes.LatePasses) {
-            if (log)
-              log->Printf("%s - Running Late IR Passes from LanguageRuntime on "
-                          "expression module '%s'",
-                          __FUNCTION__, m_expr.FunctionName());
+            LLDB_LOGF(log,
+                      "%s - Running Late IR Passes from LanguageRuntime on "
+                      "expression module '%s'",
+                      __FUNCTION__, m_expr.FunctionName());
 
             custom_passes.LatePasses->run(*module);
           }
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
index a42c219..4a410ce 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
@@ -42,7 +42,7 @@
   ///
   /// Initializes class variables.
   ///
-  /// \param[in] exe_scope,
+  /// \param[in] exe_scope
   ///     If non-NULL, an execution context scope that can help to
   ///     correctly create an expression with a valid process for
   ///     optional tuning Objective-C runtime support. Can be NULL.
@@ -53,9 +53,14 @@
   /// @param[in] include_directories
   ///     List of include directories that should be used when parsing the
   ///     expression.
+  ///
+  /// @param[in] filename
+  ///     Name of the source file that should be used when rendering
+  ///     diagnostics (i.e. errors, warnings or notes from Clang).
   ClangExpressionParser(ExecutionContextScope *exe_scope, Expression &expr,
                         bool generate_debug_info,
-                        std::vector<ConstString> include_directories = {});
+                        std::vector<std::string> include_directories = {},
+                        std::string filename = "<clang expression>");
 
   /// Destructor
   ~ClangExpressionParser() override;
@@ -72,7 +77,7 @@
   /// \return
   ///     The number of errors encountered during parsing.  0 means
   ///     success.
-  unsigned Parse(DiagnosticManager &diagnostic_manager) override;
+  unsigned Parse(DiagnosticManager &diagnostic_manager);
 
   bool RewriteExpression(DiagnosticManager &diagnostic_manager) override;
 
@@ -94,15 +99,6 @@
   /// \param[in] exe_ctx
   ///     The execution context to write the function into.
   ///
-  /// \param[out] evaluated_statically
-  ///     Set to true if the expression could be interpreted statically;
-  ///     untouched otherwise.
-  ///
-  /// \param[out] const_result
-  ///     If the result of the expression is constant, and the
-  ///     expression has no side effects, this is set to the result of the
-  ///     expression.
-  ///
   /// \param[in] execution_policy
   ///     Determines whether the expression must be JIT-compiled, must be
   ///     evaluated statically, or whether this decision may be made
@@ -177,7 +173,9 @@
                                              ///encounters module imports
   std::unique_ptr<ClangASTContext> m_ast_context;
 
-  std::vector<ConstString> m_include_directories;
+  std::vector<std::string> m_include_directories;
+  /// File name used for the user expression.
+  std::string m_filename;
 };
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
index f513b1e..7ebb5fe 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.cpp
@@ -29,7 +29,15 @@
 
 using namespace lldb_private;
 
-const char *ClangExpressionSourceCode::g_expression_prefix = R"(
+#define PREFIX_NAME "<lldb wrapper prefix>"
+
+const llvm::StringRef ClangExpressionSourceCode::g_prefix_file_name = PREFIX_NAME;
+
+const char *ClangExpressionSourceCode::g_expression_prefix =
+"#line 1 \"" PREFIX_NAME R"("
+#ifndef offsetof
+#define offsetof(t, d) __builtin_offsetof(t, d)
+#endif
 #ifndef NULL
 #define NULL (__null)
 #endif
@@ -64,9 +72,6 @@
 }
 )";
 
-static const char *c_start_marker = "    /*LLDB_BODY_START*/\n    ";
-static const char *c_end_marker = ";\n    /*LLDB_BODY_END*/\n";
-
 namespace {
 
 class AddMacroState {
@@ -166,6 +171,17 @@
   }
 }
 
+lldb_private::ClangExpressionSourceCode::ClangExpressionSourceCode(
+    llvm::StringRef filename, llvm::StringRef name, llvm::StringRef prefix,
+    llvm::StringRef body, Wrapping wrap)
+    : ExpressionSourceCode(name, prefix, body, wrap) {
+  // Use #line markers to pretend that we have a single-line source file
+  // containing only the user expression. This will hide our wrapper code
+  // from the user when we render diagnostics with Clang.
+  m_start_marker = "#line 1 \"" + filename.str() + "\"\n";
+  m_end_marker = "\n;\n#line 1 \"<lldb wrapper suffix>\"\n";
+}
+
 namespace {
 /// Allows checking if a token is contained in a given expression.
 class TokenVerifier {
@@ -286,7 +302,8 @@
 
   Target *target = exe_ctx.GetTargetPtr();
   if (target) {
-    if (target->GetArchitecture().GetMachine() == llvm::Triple::aarch64) {
+    if (target->GetArchitecture().GetMachine() == llvm::Triple::aarch64 ||
+        target->GetArchitecture().GetMachine() == llvm::Triple::aarch64_32) {
       target_specific_defines = "typedef bool BOOL;\n";
     }
     if (target->GetArchitecture().GetMachine() == llvm::Triple::x86_64) {
@@ -298,12 +315,10 @@
       }
     }
 
-    if (ClangModulesDeclVendor *decl_vendor =
-            target->GetClangModulesDeclVendor()) {
-      ClangPersistentVariables *persistent_vars =
-          llvm::cast<ClangPersistentVariables>(
-              target->GetPersistentExpressionStateForLanguage(
-                  lldb::eLanguageTypeC));
+    ClangModulesDeclVendor *decl_vendor = target->GetClangModulesDeclVendor();
+    auto *persistent_vars = llvm::cast<ClangPersistentVariables>(
+        target->GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC));
+    if (decl_vendor && persistent_vars) {
       const ClangModulesDeclVendor::ModuleVector &hand_imported_modules =
           persistent_vars->GetHandLoadedClangModules();
       ClangModulesDeclVendor::ModuleVector modules_for_macros;
@@ -398,9 +413,9 @@
     case lldb::eLanguageTypeC:
     case lldb::eLanguageTypeC_plus_plus:
     case lldb::eLanguageTypeObjC:
-      tagged_body.append(c_start_marker);
+      tagged_body.append(m_start_marker);
       tagged_body.append(m_body);
-      tagged_body.append(c_end_marker);
+      tagged_body.append(m_end_marker);
       break;
     }
     switch (wrapping_language) {
@@ -474,24 +489,19 @@
 bool ClangExpressionSourceCode::GetOriginalBodyBounds(
     std::string transformed_text, lldb::LanguageType wrapping_language,
     size_t &start_loc, size_t &end_loc) {
-  const char *start_marker;
-  const char *end_marker;
-
   switch (wrapping_language) {
   default:
     return false;
   case lldb::eLanguageTypeC:
   case lldb::eLanguageTypeC_plus_plus:
   case lldb::eLanguageTypeObjC:
-    start_marker = c_start_marker;
-    end_marker = c_end_marker;
     break;
   }
 
-  start_loc = transformed_text.find(start_marker);
+  start_loc = transformed_text.find(m_start_marker);
   if (start_loc == std::string::npos)
     return false;
-  start_loc += strlen(start_marker);
-  end_loc = transformed_text.find(end_marker);
+  start_loc += m_start_marker.size();
+  end_loc = transformed_text.find(m_end_marker);
   return end_loc != std::string::npos;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.h
index 8942902..1d15967 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionSourceCode.h
@@ -23,15 +23,18 @@
 
 class ClangExpressionSourceCode : public ExpressionSourceCode {
 public:
+  /// The file name we use for the wrapper code that we inject before
+  /// the user expression.
+  static const llvm::StringRef g_prefix_file_name;
   static const char *g_expression_prefix;
 
-  static ClangExpressionSourceCode *CreateWrapped(const char *prefix,
-                                             const char *body) {
-    return new ClangExpressionSourceCode("$__lldb_expr", prefix, body, true);
+  static ClangExpressionSourceCode *CreateWrapped(llvm::StringRef filename,
+                                                  llvm::StringRef prefix,
+                                                  llvm::StringRef body) {
+    return new ClangExpressionSourceCode(filename, "$__lldb_expr", prefix, body,
+                                         Wrap);
   }
 
-  uint32_t GetNumBodyLines();
-
   /// Generates the source code that will evaluate the expression.
   ///
   /// \param text output parameter containing the source code string.
@@ -56,14 +59,20 @@
   // Given a string returned by GetText, find the beginning and end of the body
   // passed to CreateWrapped. Return true if the bounds could be found.  This
   // will also work on text with FixItHints applied.
-  static bool GetOriginalBodyBounds(std::string transformed_text,
-                                    lldb::LanguageType wrapping_language,
-                                    size_t &start_loc, size_t &end_loc);
+  bool GetOriginalBodyBounds(std::string transformed_text,
+                             lldb::LanguageType wrapping_language,
+                             size_t &start_loc, size_t &end_loc);
 
 protected:
-  ClangExpressionSourceCode(const char *name, const char *prefix, const char *body,
-                       bool wrap) :
-      ExpressionSourceCode(name, prefix, body, wrap) {}
+  ClangExpressionSourceCode(llvm::StringRef filename, llvm::StringRef name,
+                            llvm::StringRef prefix, llvm::StringRef body,
+                            Wrapping wrap);
+
+private:
+  /// String marking the start of the user expression.
+  std::string m_start_marker;
+  /// String marking the end of the user expression.
+  std::string m_end_marker;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
index eb7f74f..0e6de28 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h
@@ -74,9 +74,6 @@
 
   /// Finds a variable by NamedDecl in the list.
   ///
-  /// \param[in] name
-  ///     The name of the requested variable.
-  ///
   /// \return
   ///     The variable requested, or NULL if that variable is not in the list.
   static ClangExpressionVariable *
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
index eabc96a..7f7c0a9 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp
@@ -42,6 +42,8 @@
 
 using namespace lldb_private;
 
+char ClangFunctionCaller::ID;
+
 // ClangFunctionCaller constructor
 ClangFunctionCaller::ClangFunctionCaller(ExecutionContextScope &exe_scope,
                                          const CompilerType &return_type,
@@ -179,18 +181,17 @@
   m_wrapper_function_text.append(");\n}\n");
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-  if (log)
-    log->Printf("Expression: \n\n%s\n\n", m_wrapper_function_text.c_str());
+  LLDB_LOGF(log, "Expression: \n\n%s\n\n", m_wrapper_function_text.c_str());
 
   // Okay, now compile this expression
 
   lldb::ProcessSP jit_process_sp(m_jit_process_wp.lock());
   if (jit_process_sp) {
     const bool generate_debug_info = true;
-    m_parser.reset(new ClangExpressionParser(jit_process_sp.get(), *this,
-                                             generate_debug_info));
-
-    num_errors = m_parser->Parse(diagnostic_manager);
+    auto *clang_parser = new ClangExpressionParser(jit_process_sp.get(), *this,
+                                                   generate_debug_info);
+    num_errors = clang_parser->Parse(diagnostic_manager);
+    m_parser.reset(clang_parser);
   } else {
     diagnostic_manager.PutString(eDiagnosticSeverityError,
                                  "no process - unable to inject function");
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h
index 24f6f2e..150a913 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h
@@ -59,11 +59,6 @@
 class ClangFunctionCaller : public FunctionCaller {
   friend class ASTStructExtractor;
 
-  /// LLVM-style RTTI support.
-  static bool classof(const Expression *E) {
-    return E->getKind() == eKindClangFunctionCaller;
-  }
-
   class ClangFunctionCallerHelper : public ClangExpressionHelper {
   public:
     ClangFunctionCallerHelper(ClangFunctionCaller &owner) : m_owner(owner) {}
@@ -91,18 +86,23 @@
                                                             ///layout.
   };
 
+  // LLVM RTTI support
+  static char ID;
+
 public:
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || FunctionCaller::isA(ClassID);
+  }
+  static bool classof(const Expression *obj) { return obj->isA(&ID); }
+
   /// Constructor
   ///
   /// \param[in] exe_scope
   ///     An execution context scope that gets us at least a target and
   ///     process.
   ///
-  /// \param[in] ast_context
-  ///     The AST context to evaluate argument types in.
-  ///
-  /// \param[in] return_qualtype
-  ///     An opaque Clang QualType for the function result.  Should be
+  /// \param[in] return_type
+  ///     A compiler type for the function result.  Should be
   ///     defined in ast_context.
   ///
   /// \param[in] function_address
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
index 65c5473..42d3f22 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
@@ -30,10 +30,10 @@
   if (FileSystem::Instance().IsDirectory(clang_path))
     return true;
   Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
-  if (log)
-    log->Printf("VerifyClangPath(): "
-                "failed to stat clang resource directory at \"%s\"",
-                clang_path.str().c_str());
+  LLDB_LOGF(log,
+            "VerifyClangPath(): "
+            "failed to stat clang resource directory at \"%s\"",
+            clang_path.str().c_str());
   return false;
 }
 
@@ -67,10 +67,10 @@
     llvm::sys::path::native(relative_path);
     llvm::sys::path::append(clang_dir, relative_path);
     if (!verify || VerifyClangPath(clang_dir)) {
-      if (log)
-        log->Printf("DefaultComputeClangResourceDir: Setting ClangResourceDir "
-                    "to \"%s\", verify = %s",
-                    clang_dir.str().str().c_str(), verify ? "true" : "false");
+      LLDB_LOGF(log,
+                "DefaultComputeClangResourceDir: Setting ClangResourceDir "
+                "to \"%s\", verify = %s",
+                clang_dir.str().str().c_str(), verify ? "true" : "false");
       file_spec.GetDirectory().SetString(clang_dir);
       FileSystem::Instance().Resolve(file_spec);
       return true;
@@ -160,9 +160,8 @@
       ComputeClangResourceDirectory(lldb_file_spec, g_cached_resource_dir,
                                     true);
     Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
-    if (log)
-      log->Printf("GetClangResourceDir() => '%s'",
-                  g_cached_resource_dir.GetPath().c_str());
+    LLDB_LOGF(log, "GetClangResourceDir() => '%s'",
+              g_cached_resource_dir.GetPath().c_str());
   });
   return g_cached_resource_dir;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index 4a22079..0696c66 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -27,6 +27,7 @@
 #include "lldb/Core/ModuleList.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Host/HostInfo.h"
+#include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/SourceModule.h"
 #include "lldb/Target/Target.h"
@@ -79,12 +80,10 @@
                                 Stream &error_stream) override;
 
   uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches,
-                     std::vector<clang::NamedDecl *> &decls) override;
+                     std::vector<CompilerDecl> &decls) override;
 
   void ForEachMacro(const ModuleVector &modules,
                     std::function<bool(const std::string &)> handler) override;
-
-  clang::ExternalASTMerger::ImporterSource GetImporterSource() override;
 private:
   void
   ReportModuleExportsHelper(std::set<ClangModulesDeclVendor::ModuleID> &exports,
@@ -109,7 +108,9 @@
   typedef std::set<ModuleID> ImportedModuleSet;
   ImportedModuleMap m_imported_modules;
   ImportedModuleSet m_user_imported_modules;
-  const clang::ExternalASTMerger::OriginMap m_origin_map;
+  // We assume that every ASTContext has an ClangASTContext, so we also store
+  // a custom ClangASTContext for our internal ASTContext.
+  std::unique_ptr<ClangASTContext> m_ast_context;
 };
 } // anonymous namespace
 
@@ -143,7 +144,8 @@
   }
 }
 
-ClangModulesDeclVendor::ClangModulesDeclVendor() {}
+ClangModulesDeclVendor::ClangModulesDeclVendor()
+    : ClangDeclVendor(eClangModuleDeclVendor) {}
 
 ClangModulesDeclVendor::~ClangModulesDeclVendor() {}
 
@@ -155,7 +157,11 @@
     : m_diagnostics_engine(std::move(diagnostics_engine)),
       m_compiler_invocation(std::move(compiler_invocation)),
       m_compiler_instance(std::move(compiler_instance)),
-      m_parser(std::move(parser)), m_origin_map() {}
+      m_parser(std::move(parser)) {
+
+  // Initialize our ClangASTContext.
+  m_ast_context.reset(new ClangASTContext(m_compiler_instance->getASTContext()));
+}
 
 void ClangModulesDeclVendorImpl::ReportModuleExportsHelper(
     std::set<ClangModulesDeclVendor::ModuleID> &exports,
@@ -237,11 +243,11 @@
 
       bool is_system = true;
       bool is_framework = false;
-      auto *dir =
+      auto dir =
           HS.getFileMgr().getDirectory(module.search_path.GetStringRef());
       if (!dir)
         return error();
-      auto *file = HS.lookupModuleMapFile(dir, is_framework);
+      auto *file = HS.lookupModuleMapFile(*dir, is_framework);
       if (!file)
         return error();
       if (!HS.loadModuleMapFile(file, is_system))
@@ -350,7 +356,7 @@
 uint32_t
 ClangModulesDeclVendorImpl::FindDecls(ConstString name, bool append,
                                       uint32_t max_matches,
-                                      std::vector<clang::NamedDecl *> &decls) {
+                                      std::vector<CompilerDecl> &decls) {
   if (!m_enabled) {
     return 0;
   }
@@ -376,7 +382,7 @@
     if (num_matches >= max_matches)
       return num_matches;
 
-    decls.push_back(named_decl);
+    decls.push_back(CompilerDecl(m_ast_context.get(), named_decl));
     ++num_matches;
   }
 
@@ -560,12 +566,6 @@
                                          is_inclusion_directive);
 }
 
-clang::ExternalASTMerger::ImporterSource
-ClangModulesDeclVendorImpl::GetImporterSource() {
-  return {m_compiler_instance->getASTContext(),
-          m_compiler_instance->getFileManager(), m_origin_map};
-}
-
 static const char *ModuleImportBufferName = "LLDBModulesMemoryBuffer";
 
 lldb_private::ClangModulesDeclVendor *
@@ -694,7 +694,7 @@
 
   instance->getPreprocessor().enableIncrementalProcessing();
 
-  instance->createModuleManager();
+  instance->createASTReader();
 
   instance->createSema(action->getTranslationUnitKind(), nullptr);
 
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h
index d5c8757..e099b59 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h
@@ -10,22 +10,27 @@
 #define liblldb_ClangModulesDeclVendor_h
 
 #include "lldb/Core/ClangForward.h"
-#include "lldb/Symbol/DeclVendor.h"
 #include "lldb/Symbol/SourceModule.h"
 #include "lldb/Target/Platform.h"
 
+#include "Plugins/ExpressionParser/Clang/ClangDeclVendor.h"
+
 #include <set>
 #include <vector>
 
 namespace lldb_private {
 
-class ClangModulesDeclVendor : public DeclVendor {
+class ClangModulesDeclVendor : public ClangDeclVendor {
 public:
   // Constructors and Destructors
   ClangModulesDeclVendor();
 
   ~ClangModulesDeclVendor() override;
 
+  static bool classof(const DeclVendor *vendor) {
+    return vendor->GetKind() == eClangModuleDeclVendor;
+  }
+
   static ClangModulesDeclVendor *Create(Target &target);
 
   typedef std::vector<ConstString> ModulePath;
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
index 742a149..41d62a4 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp
@@ -23,8 +23,7 @@
 using namespace lldb_private;
 
 ClangPersistentVariables::ClangPersistentVariables()
-    : lldb_private::PersistentExpressionState(LLVMCastKind::eKindClang),
-      m_next_persistent_variable_id(0) {}
+    : lldb_private::PersistentExpressionState(LLVMCastKind::eKindClang) {}
 
 ExpressionVariableSP ClangPersistentVariables::CreatePersistentVariable(
     const lldb::ValueObjectSP &valobj_sp) {
@@ -43,52 +42,60 @@
     lldb::ExpressionVariableSP variable) {
   RemoveVariable(variable);
 
-  const char *name = variable->GetName().AsCString();
+  // Check if the removed variable was the last one that was created. If yes,
+  // reuse the variable id for the next variable.
 
-  if (*name != '$')
+  // Nothing to do if we have not assigned a variable id so far.
+  if (m_next_persistent_variable_id == 0)
     return;
-  name++;
 
-  if (strtoul(name, nullptr, 0) == m_next_persistent_variable_id - 1)
+  llvm::StringRef name = variable->GetName().GetStringRef();
+  // Remove the prefix from the variable that only the indes is left.
+  if (!name.consume_front(GetPersistentVariablePrefix(false)))
+    return;
+
+  // Check if the variable contained a variable id.
+  uint32_t variable_id;
+  if (name.getAsInteger(10, variable_id))
+    return;
+  // If it's the most recent variable id that was assigned, make sure that this
+  // variable id will be used for the next persistent variable.
+  if (variable_id == m_next_persistent_variable_id - 1)
     m_next_persistent_variable_id--;
 }
 
 llvm::Optional<CompilerType>
 ClangPersistentVariables::GetCompilerTypeFromPersistentDecl(
     ConstString type_name) {
-  CompilerType compiler_type;
-  if (clang::TypeDecl *tdecl = llvm::dyn_cast_or_null<clang::TypeDecl>(
-          GetPersistentDecl(type_name))) {
-    compiler_type.SetCompilerType(
-        ClangASTContext::GetASTContext(&tdecl->getASTContext()),
-        reinterpret_cast<lldb::opaque_compiler_type_t>(
-            const_cast<clang::Type *>(tdecl->getTypeForDecl())));
-    return compiler_type;
+  PersistentDecl p = m_persistent_decls.lookup(type_name.GetCString());
+
+  if (p.m_decl == nullptr)
+    return llvm::None;
+
+  if (clang::TypeDecl *tdecl = llvm::dyn_cast<clang::TypeDecl>(p.m_decl)) {
+    opaque_compiler_type_t t = static_cast<opaque_compiler_type_t>(
+        const_cast<clang::Type *>(tdecl->getTypeForDecl()));
+    return CompilerType(p.m_context, t);
   }
   return llvm::None;
 }
 
 void ClangPersistentVariables::RegisterPersistentDecl(ConstString name,
-                                                      clang::NamedDecl *decl) {
-  m_persistent_decls.insert(
-      std::pair<const char *, clang::NamedDecl *>(name.GetCString(), decl));
+                                                      clang::NamedDecl *decl,
+                                                      ClangASTContext *ctx) {
+  PersistentDecl p = {decl, ctx};
+  m_persistent_decls.insert(std::make_pair(name.GetCString(), p));
 
   if (clang::EnumDecl *enum_decl = llvm::dyn_cast<clang::EnumDecl>(decl)) {
     for (clang::EnumConstantDecl *enumerator_decl : enum_decl->enumerators()) {
-      m_persistent_decls.insert(std::pair<const char *, clang::NamedDecl *>(
-          ConstString(enumerator_decl->getNameAsString()).GetCString(),
-          enumerator_decl));
+      p = {enumerator_decl, ctx};
+      m_persistent_decls.insert(std::make_pair(
+          ConstString(enumerator_decl->getNameAsString()).GetCString(), p));
     }
   }
 }
 
 clang::NamedDecl *
 ClangPersistentVariables::GetPersistentDecl(ConstString name) {
-  PersistentDeclMap::const_iterator i =
-      m_persistent_decls.find(name.GetCString());
-
-  if (i == m_persistent_decls.end())
-    return nullptr;
-  else
-    return i->second;
+  return m_persistent_decls.lookup(name.GetCString()).m_decl;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
index b39f89a..434196b 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h
@@ -45,15 +45,25 @@
       uint32_t addr_byte_size) override;
 
   void RemovePersistentVariable(lldb::ExpressionVariableSP variable) override;
-  llvm::StringRef
-  GetPersistentVariablePrefix(bool is_error) const override {
+
+  llvm::StringRef GetPersistentVariablePrefix(bool is_error) const override {
     return "$";
   }
 
+  /// Returns the next file name that should be used for user expressions.
+  std::string GetNextExprFileName() {
+    std::string name;
+    name.append("<user expression ");
+    name.append(std::to_string(m_next_user_file_id++));
+    name.append(">");
+    return name;
+  }
+
   llvm::Optional<CompilerType>
   GetCompilerTypeFromPersistentDecl(ConstString type_name) override;
 
-  void RegisterPersistentDecl(ConstString name, clang::NamedDecl *decl);
+  void RegisterPersistentDecl(ConstString name, clang::NamedDecl *decl,
+                              ClangASTContext *ctx);
 
   clang::NamedDecl *GetPersistentDecl(ConstString name);
 
@@ -66,10 +76,19 @@
   }
 
 private:
-  uint32_t m_next_persistent_variable_id; ///< The counter used by
-                                          ///GetNextResultName().
+  /// The counter used by GetNextExprFileName.
+  uint32_t m_next_user_file_id = 0;
+  // The counter used by GetNextPersistentVariableName
+  uint32_t m_next_persistent_variable_id = 0;
 
-  typedef llvm::DenseMap<const char *, clang::NamedDecl *> PersistentDeclMap;
+  struct PersistentDecl {
+    /// The persistent decl.
+    clang::NamedDecl *m_decl = nullptr;
+    /// The ClangASTContext for the ASTContext of m_decl.
+    ClangASTContext *m_context = nullptr;
+  };
+
+  typedef llvm::DenseMap<const char *, PersistentDecl> PersistentDeclMap;
   PersistentDeclMap
       m_persistent_decls; ///< Persistent entities declared by the user.
 
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
index 2dae5b7..6698797 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
+
 #include <stdio.h>
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>
@@ -21,9 +23,9 @@
 #include "ClangDiagnostic.h"
 #include "ClangExpressionDeclMap.h"
 #include "ClangExpressionParser.h"
-#include "ClangExpressionSourceCode.h"
 #include "ClangModulesDeclVendor.h"
 #include "ClangPersistentVariables.h"
+#include "CppModuleConfiguration.h"
 
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Module.h"
@@ -36,10 +38,11 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Symbol/Block.h"
 #include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
+#include "lldb/Symbol/ClangASTMetadata.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/ObjectFile.h"
+#include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/Type.h"
 #include "lldb/Symbol/VariableList.h"
@@ -60,13 +63,15 @@
 
 using namespace lldb_private;
 
+char ClangUserExpression::ID;
+
 ClangUserExpression::ClangUserExpression(
     ExecutionContextScope &exe_scope, llvm::StringRef expr,
     llvm::StringRef prefix, lldb::LanguageType language,
     ResultType desired_type, const EvaluateExpressionOptions &options,
     ValueObject *ctx_obj)
     : LLVMUserExpression(exe_scope, expr, prefix, language, desired_type,
-                         options, eKindClangUserExpression),
+                         options),
       m_type_system_helper(*m_target_wp.lock(), options.GetExecutionPolicy() ==
                                                     eExecutionPolicyTopLevel),
       m_result_delegate(exe_scope.CalculateTarget()), m_ctx_obj(ctx_obj) {
@@ -90,21 +95,18 @@
 void ClangUserExpression::ScanContext(ExecutionContext &exe_ctx, Status &err) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("ClangUserExpression::ScanContext()");
+  LLDB_LOGF(log, "ClangUserExpression::ScanContext()");
 
   m_target = exe_ctx.GetTargetPtr();
 
   if (!(m_allow_cxx || m_allow_objc)) {
-    if (log)
-      log->Printf("  [CUE::SC] Settings inhibit C++ and Objective-C");
+    LLDB_LOGF(log, "  [CUE::SC] Settings inhibit C++ and Objective-C");
     return;
   }
 
   StackFrame *frame = exe_ctx.GetFramePtr();
   if (frame == nullptr) {
-    if (log)
-      log->Printf("  [CUE::SC] Null stack frame");
+    LLDB_LOGF(log, "  [CUE::SC] Null stack frame");
     return;
   }
 
@@ -112,8 +114,7 @@
                                                   lldb::eSymbolContextBlock);
 
   if (!sym_ctx.function) {
-    if (log)
-      log->Printf("  [CUE::SC] Null function");
+    LLDB_LOGF(log, "  [CUE::SC] Null function");
     return;
   }
 
@@ -121,16 +122,14 @@
   Block *function_block = sym_ctx.GetFunctionBlock();
 
   if (!function_block) {
-    if (log)
-      log->Printf("  [CUE::SC] Null function block");
+    LLDB_LOGF(log, "  [CUE::SC] Null function block");
     return;
   }
 
   CompilerDeclContext decl_context = function_block->GetDeclContext();
 
   if (!decl_context) {
-    if (log)
-      log->Printf("  [CUE::SC] Null decl context");
+    LLDB_LOGF(log, "  [CUE::SC] Null decl context");
     return;
   }
 
@@ -317,17 +316,13 @@
 // count is not available, [myArray count] returns id, which can't be directly
 // cast to int without causing a clang error.
 static void ApplyObjcCastHack(std::string &expr) {
-#define OBJC_CAST_HACK_FROM "(int)["
-#define OBJC_CAST_HACK_TO "(int)(long long)["
+  const std::string from = "(int)[";
+  const std::string to = "(int)(long long)[";
 
-  size_t from_offset;
+  size_t offset;
 
-  while ((from_offset = expr.find(OBJC_CAST_HACK_FROM)) != expr.npos)
-    expr.replace(from_offset, sizeof(OBJC_CAST_HACK_FROM) - 1,
-                 OBJC_CAST_HACK_TO);
-
-#undef OBJC_CAST_HACK_TO
-#undef OBJC_CAST_HACK_FROM
+  while ((offset = expr.find(from)) != expr.npos)
+    expr.replace(offset, from.size(), to);
 }
 
 bool ClangUserExpression::SetupPersistentState(DiagnosticManager &diagnostic_manager,
@@ -336,6 +331,7 @@
     if (PersistentExpressionState *persistent_state =
             target->GetPersistentExpressionStateForLanguage(
                 lldb::eLanguageTypeC)) {
+      m_clang_state = llvm::cast<ClangPersistentVariables>(persistent_state);
       m_result_delegate.RegisterPersistentState(persistent_state);
     } else {
       diagnostic_manager.PutString(
@@ -354,11 +350,12 @@
 static void SetupDeclVendor(ExecutionContext &exe_ctx, Target *target) {
   if (ClangModulesDeclVendor *decl_vendor =
           target->GetClangModulesDeclVendor()) {
+    auto *persistent_state = llvm::cast<ClangPersistentVariables>(
+        target->GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC));
+    if (!persistent_state)
+      return;
     const ClangModulesDeclVendor::ModuleVector &hand_imported_modules =
-        llvm::cast<ClangPersistentVariables>(
-            target->GetPersistentExpressionStateForLanguage(
-                lldb::eLanguageTypeC))
-            ->GetHandLoadedClangModules();
+        persistent_state->GetHandLoadedClangModules();
     ClangModulesDeclVendor::ModuleVector modules_for_macros;
 
     for (ClangModulesDeclVendor::ModuleID module : hand_imported_modules) {
@@ -384,30 +381,34 @@
   }
 }
 
-void ClangUserExpression::UpdateLanguageForExpr(
+void ClangUserExpression::UpdateLanguageForExpr() {
+  m_expr_lang = lldb::LanguageType::eLanguageTypeUnknown;
+  if (m_options.GetExecutionPolicy() == eExecutionPolicyTopLevel)
+    return;
+  if (m_in_cplusplus_method)
+    m_expr_lang = lldb::eLanguageTypeC_plus_plus;
+  else if (m_in_objectivec_method)
+    m_expr_lang = lldb::eLanguageTypeObjC;
+  else
+    m_expr_lang = lldb::eLanguageTypeC;
+}
+
+void ClangUserExpression::CreateSourceCode(
     DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx,
     std::vector<std::string> modules_to_import, bool for_completion) {
-  m_expr_lang = lldb::LanguageType::eLanguageTypeUnknown;
 
+  m_filename = m_clang_state->GetNextExprFileName();
   std::string prefix = m_expr_prefix;
 
   if (m_options.GetExecutionPolicy() == eExecutionPolicyTopLevel) {
     m_transformed_text = m_expr_text;
   } else {
-    std::unique_ptr<ClangExpressionSourceCode> source_code(
-        ClangExpressionSourceCode::CreateWrapped(prefix.c_str(),
-                                            m_expr_text.c_str()));
+    m_source_code.reset(ClangExpressionSourceCode::CreateWrapped(
+        m_filename, prefix.c_str(), m_expr_text.c_str()));
 
-    if (m_in_cplusplus_method)
-      m_expr_lang = lldb::eLanguageTypeC_plus_plus;
-    else if (m_in_objectivec_method)
-      m_expr_lang = lldb::eLanguageTypeObjC;
-    else
-      m_expr_lang = lldb::eLanguageTypeC;
-
-    if (!source_code->GetText(m_transformed_text, m_expr_lang,
-                              m_in_static_method, exe_ctx, !m_ctx_obj,
-                              for_completion, modules_to_import)) {
+    if (!m_source_code->GetText(m_transformed_text, m_expr_lang,
+                                m_in_static_method, exe_ctx, !m_ctx_obj,
+                                for_completion, modules_to_import)) {
       diagnostic_manager.PutString(eDiagnosticSeverityError,
                                    "couldn't construct expression body");
       return;
@@ -417,7 +418,7 @@
     // transformed code. We need this later for the code completion.
     std::size_t original_start;
     std::size_t original_end;
-    bool found_bounds = source_code->GetOriginalBodyBounds(
+    bool found_bounds = m_source_code->GetOriginalBodyBounds(
         m_transformed_text, m_expr_lang, original_start, original_end);
     if (found_bounds)
       m_user_expression_start_pos = original_start;
@@ -437,48 +438,73 @@
   }
 }
 
-std::vector<std::string>
-ClangUserExpression::GetModulesToImport(ExecutionContext &exe_ctx) {
+/// Utility method that puts a message into the expression log and
+/// returns an invalid module configuration.
+static CppModuleConfiguration LogConfigError(const std::string &msg) {
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
+  LLDB_LOG(log, "[C++ module config] {0}", msg);
+  return CppModuleConfiguration();
+}
+
+CppModuleConfiguration GetModuleConfig(lldb::LanguageType language,
+                                       ExecutionContext &exe_ctx) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (!SupportsCxxModuleImport(Language()))
-    return {};
+  // Don't do anything if this is not a C++ module configuration.
+  if (!SupportsCxxModuleImport(language))
+    return LogConfigError("Language doesn't support C++ modules");
 
   Target *target = exe_ctx.GetTargetPtr();
-  if (!target || !target->GetEnableImportStdModule())
-    return {};
+  if (!target)
+    return LogConfigError("No target");
+
+  if (!target->GetEnableImportStdModule())
+    return LogConfigError("Importing std module not enabled in settings");
 
   StackFrame *frame = exe_ctx.GetFramePtr();
   if (!frame)
-    return {};
+    return LogConfigError("No frame");
 
   Block *block = frame->GetFrameBlock();
   if (!block)
-    return {};
+    return LogConfigError("No block");
 
   SymbolContext sc;
   block->CalculateSymbolContext(&sc);
   if (!sc.comp_unit)
-    return {};
+    return LogConfigError("Couldn't calculate symbol context");
 
-  if (log) {
-    for (const SourceModule &m : sc.comp_unit->GetImportedModules()) {
-      LLDB_LOG(log, "Found module in compile unit: {0:$[.]} - include dir: {1}",
-                  llvm::make_range(m.path.begin(), m.path.end()), m.search_path);
-    }
+  // Build a list of files we need to analyze to build the configuration.
+  FileSpecList files;
+  for (const FileSpec &f : sc.comp_unit->GetSupportFiles())
+    files.AppendIfUnique(f);
+  // We also need to look at external modules in the case of -gmodules as they
+  // contain the support files for libc++ and the C library.
+  llvm::DenseSet<SymbolFile *> visited_symbol_files;
+  sc.comp_unit->ForEachExternalModule(
+      visited_symbol_files, [&files](Module &module) {
+        for (std::size_t i = 0; i < module.GetNumCompileUnits(); ++i) {
+          const FileSpecList &support_files =
+              module.GetCompileUnitAtIndex(i)->GetSupportFiles();
+          for (const FileSpec &f : support_files) {
+            files.AppendIfUnique(f);
+          }
+        }
+        return false;
+      });
+
+  LLDB_LOG(log, "[C++ module config] Found {0} support files to analyze",
+           files.GetSize());
+  if (log && log->GetVerbose()) {
+    for (const FileSpec &f : files)
+      LLDB_LOGV(log, "[C++ module config] Analyzing support file: {0}",
+                f.GetPath());
   }
 
-  for (const SourceModule &m : sc.comp_unit->GetImportedModules())
-    m_include_directories.push_back(m.search_path);
-
-  // Check if we imported 'std' or any of its submodules.
-  // We currently don't support importing any other modules in the expression
-  // parser.
-  for (const SourceModule &m : sc.comp_unit->GetImportedModules())
-    if (!m.path.empty() && m.path.front() == "std")
-      return {"std"};
-
-  return {};
+  // Try to create a configuration from the files. If there is no valid
+  // configuration possible with the files, this just returns an invalid
+  // configuration.
+  return CppModuleConfiguration(files);
 }
 
 bool ClangUserExpression::PrepareForParsing(
@@ -506,14 +532,21 @@
 
   SetupDeclVendor(exe_ctx, m_target);
 
-  std::vector<std::string> used_modules = GetModulesToImport(exe_ctx);
-  m_imported_cpp_modules = !used_modules.empty();
+  CppModuleConfiguration module_config = GetModuleConfig(m_language, exe_ctx);
+  llvm::ArrayRef<std::string> imported_modules =
+      module_config.GetImportedModules();
+  m_imported_cpp_modules = !imported_modules.empty();
+  m_include_directories = module_config.GetIncludeDirs();
 
   LLDB_LOG(log, "List of imported modules in expression: {0}",
-           llvm::make_range(used_modules.begin(), used_modules.end()));
+           llvm::make_range(imported_modules.begin(), imported_modules.end()));
+  LLDB_LOG(log, "List of include directories gathered for modules: {0}",
+           llvm::make_range(m_include_directories.begin(),
+                            m_include_directories.end()));
 
-  UpdateLanguageForExpr(diagnostic_manager, exe_ctx, used_modules,
-                        for_completion);
+  UpdateLanguageForExpr();
+  CreateSourceCode(diagnostic_manager, exe_ctx, imported_modules,
+                   for_completion);
   return true;
 }
 
@@ -527,8 +560,7 @@
   if (!PrepareForParsing(diagnostic_manager, exe_ctx, /*for_completion*/ false))
     return false;
 
-  if (log)
-    log->Printf("Parsing the following code:\n%s", m_transformed_text.c_str());
+  LLDB_LOGF(log, "Parsing the following code:\n%s", m_transformed_text.c_str());
 
   ////////////////////////////////////
   // Set up the target and compiler
@@ -551,7 +583,7 @@
 
   auto on_exit = llvm::make_scope_exit([this]() { ResetDeclMap(); });
 
-  if (!DeclMap()->WillParse(exe_ctx, m_materializer_up.get())) {
+  if (!DeclMap()->WillParse(exe_ctx, GetMaterializer())) {
     diagnostic_manager.PutString(
         eDiagnosticSeverityError,
         "current process state is unsuitable for expression parsing");
@@ -573,7 +605,7 @@
   // parser_sp will never be empty.
 
   ClangExpressionParser parser(exe_scope, *this, generate_debug_info,
-                               m_include_directories);
+                               m_include_directories, m_filename);
 
   unsigned num_errors = parser.Parse(diagnostic_manager);
 
@@ -586,8 +618,11 @@
         size_t fixed_end;
         const std::string &fixed_expression =
             diagnostic_manager.GetFixedExpression();
-        if (ClangExpressionSourceCode::GetOriginalBodyBounds(
-                fixed_expression, m_expr_lang, fixed_start, fixed_end))
+        // Retrieve the original expression in case we don't have a top level
+        // expression (which has no surrounding source code).
+        if (m_source_code &&
+            m_source_code->GetOriginalBodyBounds(fixed_expression, m_expr_lang,
+                                                 fixed_start, fixed_end))
           m_fixed_text =
               fixed_expression.substr(fixed_start, fixed_end - fixed_start);
       }
@@ -649,10 +684,10 @@
     }
 
     if (register_execution_unit) {
-      llvm::cast<PersistentExpressionState>(
-          exe_ctx.GetTargetPtr()->GetPersistentExpressionStateForLanguage(
-              m_language))
-          ->RegisterExecutionUnit(m_execution_unit_sp);
+      if (auto *persistent_state =
+              exe_ctx.GetTargetPtr()->GetPersistentExpressionStateForLanguage(
+                  m_language))
+        persistent_state->RegisterExecutionUnit(m_execution_unit_sp);
     }
   }
 
@@ -726,8 +761,7 @@
   if (!PrepareForParsing(diagnostic_manager, exe_ctx, /*for_completion*/ true))
     return false;
 
-  if (log)
-    log->Printf("Parsing the following code:\n%s", m_transformed_text.c_str());
+  LLDB_LOGF(log, "Parsing the following code:\n%s", m_transformed_text.c_str());
 
   //////////////////////////
   // Parse the expression
@@ -739,7 +773,7 @@
 
   auto on_exit = llvm::make_scope_exit([this]() { ResetDeclMap(); });
 
-  if (!DeclMap()->WillParse(exe_ctx, m_materializer_up.get())) {
+  if (!DeclMap()->WillParse(exe_ctx, GetMaterializer())) {
     diagnostic_manager.PutString(
         eDiagnosticSeverityError,
         "current process state is unsuitable for expression parsing");
@@ -862,9 +896,9 @@
     Materializer::PersistentVariableDelegate &delegate,
     bool keep_result_in_memory,
     ValueObject *ctx_obj) {
-  m_expr_decl_map_up.reset(
-      new ClangExpressionDeclMap(keep_result_in_memory, &delegate, exe_ctx,
-                                 ctx_obj));
+  m_expr_decl_map_up.reset(new ClangExpressionDeclMap(
+      keep_result_in_memory, &delegate, exe_ctx.GetTargetSP(),
+      exe_ctx.GetTargetRef().GetClangASTImporter(), ctx_obj));
 }
 
 clang::ASTConsumer *
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
index 24c152b..00cbffa 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h
@@ -15,6 +15,7 @@
 #include "ASTStructExtractor.h"
 #include "ClangExpressionDeclMap.h"
 #include "ClangExpressionHelper.h"
+#include "ClangExpressionSourceCode.h"
 #include "ClangExpressionVariable.h"
 #include "IRForTarget.h"
 
@@ -37,11 +38,14 @@
 /// the objects needed to parse and interpret or JIT an expression.  It uses
 /// the Clang parser to produce LLVM IR from the expression.
 class ClangUserExpression : public LLVMUserExpression {
+  // LLVM RTTI support
+  static char ID;
+
 public:
-  /// LLVM-style RTTI support.
-  static bool classof(const Expression *E) {
-    return E->getKind() == eKindClangUserExpression;
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || LLVMUserExpression::isA(ClassID);
   }
+  static bool classof(const Expression *obj) { return obj->isA(&ID); }
 
   enum { kDefaultTimeout = 500000u };
 
@@ -92,7 +96,7 @@
   /// \param[in] expr
   ///     The expression to parse.
   ///
-  /// \param[in] expr_prefix
+  /// \param[in] prefix
   ///     If non-NULL, a C string containing translation-unit level
   ///     definitions to be included when the expression is parsed.
   ///
@@ -105,6 +109,9 @@
   ///     If not eResultTypeAny, the type to use for the expression
   ///     result.
   ///
+  /// \param[in] options
+  ///     Additional options for the expression.
+  ///
   /// \param[in] ctx_obj
   ///     The object (if any) in which context the expression
   ///     must be evaluated. For details see the comment to
@@ -175,11 +182,11 @@
                     lldb::addr_t struct_address,
                     DiagnosticManager &diagnostic_manager) override;
 
-  std::vector<std::string> GetModulesToImport(ExecutionContext &exe_ctx);
-  void UpdateLanguageForExpr(DiagnosticManager &diagnostic_manager,
-                             ExecutionContext &exe_ctx,
-                             std::vector<std::string> modules_to_import,
-                             bool for_completion);
+  void CreateSourceCode(DiagnosticManager &diagnostic_manager,
+                        ExecutionContext &exe_ctx,
+                        std::vector<std::string> modules_to_import,
+                        bool for_completion);
+  void UpdateLanguageForExpr();
   bool SetupPersistentState(DiagnosticManager &diagnostic_manager,
                                    ExecutionContext &exe_ctx);
   bool PrepareForParsing(DiagnosticManager &diagnostic_manager,
@@ -205,13 +212,17 @@
   /// The language type of the current expression.
   lldb::LanguageType m_expr_lang = lldb::eLanguageTypeUnknown;
   /// The include directories that should be used when parsing the expression.
-  std::vector<ConstString> m_include_directories;
+  std::vector<std::string> m_include_directories;
 
   /// The absolute character position in the transformed source code where the
   /// user code (as typed by the user) starts. If the variable is empty, then we
   /// were not able to calculate this position.
   llvm::Optional<size_t> m_user_expression_start_pos;
   ResultDelegate m_result_delegate;
+  ClangPersistentVariables *m_clang_state;
+  std::unique_ptr<ClangExpressionSourceCode> m_source_code;
+  /// File name used for the expression.
+  std::string m_filename;
 
   /// The object (if any) in which context the expression is evaluated.
   /// See the comment to `UserExpression::Evaluate` for details.
@@ -219,6 +230,23 @@
 
   /// True iff this expression explicitly imported C++ modules.
   bool m_imported_cpp_modules = false;
+
+  /// True if the expression parser should enforce the presence of a valid class
+  /// pointer in order to generate the expression as a method.
+  bool m_enforce_valid_object = true;
+  /// True if the expression is compiled as a C++ member function (true if it
+  /// was parsed when exe_ctx was in a C++ method).
+  bool m_in_cplusplus_method = false;
+  /// True if the expression is compiled as an Objective-C method (true if it
+  /// was parsed when exe_ctx was in an Objective-C method).
+  bool m_in_objectivec_method = false;
+  /// True if the expression is compiled as a static (or class) method
+  /// (currently true if it was parsed when exe_ctx was in an Objective-C class
+  /// method).
+  bool m_in_static_method = false;
+  /// True if "this" or "self" must be looked up and passed in.  False if the
+  /// expression doesn't really use them and they can be NULL.
+  bool m_needs_object_ptr = false;
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
index 5eec224..199e489 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
+
 #include "ClangUtilityFunction.h"
 #include "ClangExpressionDeclMap.h"
 #include "ClangExpressionParser.h"
@@ -29,6 +31,8 @@
 
 using namespace lldb_private;
 
+char ClangUtilityFunction::ID;
+
 /// Constructor
 ///
 /// \param[in] text
@@ -38,7 +42,7 @@
 ///     The name of the function, as used in the text.
 ClangUtilityFunction::ClangUtilityFunction(ExecutionContextScope &exe_scope,
                                            const char *text, const char *name)
-    : UtilityFunction(exe_scope, text, name, eKindClangUtilityFunction) {
+    : UtilityFunction(exe_scope, text, name) {
   m_function_text.assign(ClangExpressionSourceCode::g_expression_prefix);
   if (text && text[0])
     m_function_text.append(text);
@@ -155,7 +159,7 @@
 
 void ClangUtilityFunction::ClangUtilityFunctionHelper::ResetDeclMap(
     ExecutionContext &exe_ctx, bool keep_result_in_memory) {
-  m_expr_decl_map_up.reset(
-      new ClangExpressionDeclMap(keep_result_in_memory, nullptr, exe_ctx,
-                                 nullptr));
+  m_expr_decl_map_up.reset(new ClangExpressionDeclMap(
+      keep_result_in_memory, nullptr, exe_ctx.GetTargetSP(),
+      exe_ctx.GetTargetRef().GetClangASTImporter(), nullptr));
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h
index 70ebb2f..9efaa02 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h
@@ -33,11 +33,14 @@
 /// simply provide a way to push a function into the target for the debugger
 /// to call later on.
 class ClangUtilityFunction : public UtilityFunction {
+  // LLVM RTTI support
+  static char ID;
+
 public:
-  /// LLVM-style RTTI support.
-  static bool classof(const Expression *E) {
-    return E->getKind() == eKindClangUtilityFunction;
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || UtilityFunction::isA(ClassID);
   }
+  static bool classof(const Expression *obj) { return obj->isA(&ID); }
 
   class ClangUtilityFunctionHelper : public ClangExpressionHelper {
   public:
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.cpp
new file mode 100644
index 0000000..51ae732
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.cpp
@@ -0,0 +1,82 @@
+//===-- CppModuleConfiguration.cpp ----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "CppModuleConfiguration.h"
+
+#include "ClangHost.h"
+#include "lldb/Host/FileSystem.h"
+
+using namespace lldb_private;
+
+bool CppModuleConfiguration::SetOncePath::TrySet(llvm::StringRef path) {
+  // Setting for the first time always works.
+  if (m_first) {
+    m_path = path.str();
+    m_valid = true;
+    m_first = false;
+    return true;
+  }
+  // Changing the path to the same value is fine.
+  if (m_path == path)
+    return true;
+
+  // Changing the path after it was already set is not allowed.
+  m_valid = false;
+  return false;
+}
+
+bool CppModuleConfiguration::analyzeFile(const FileSpec &f) {
+  using namespace llvm::sys::path;
+  // Convert to slashes to make following operations simpler.
+  std::string dir_buffer = convert_to_slash(f.GetDirectory().GetStringRef());
+  llvm::StringRef posix_dir(dir_buffer);
+
+  // Check for /c++/vX/ that is used by libc++.
+  static llvm::Regex libcpp_regex(R"regex(/c[+][+]/v[0-9]/)regex");
+  if (libcpp_regex.match(f.GetPath())) {
+    // Strip away libc++'s /experimental directory if there is one.
+    posix_dir.consume_back("/experimental");
+    return m_std_inc.TrySet(posix_dir);
+  }
+
+  // Check for /usr/include. On Linux this might be /usr/include/bits, so
+  // we should remove that '/bits' suffix to get the actual include directory.
+  if (posix_dir.endswith("/usr/include/bits"))
+    posix_dir.consume_back("/bits");
+  if (posix_dir.endswith("/usr/include"))
+    return m_c_inc.TrySet(posix_dir);
+
+  // File wasn't interesting, continue analyzing.
+  return true;
+}
+
+bool CppModuleConfiguration::hasValidConfig() {
+  // We all these include directories to have a valid usable configuration.
+  return m_c_inc.Valid() && m_std_inc.Valid();
+}
+
+CppModuleConfiguration::CppModuleConfiguration(
+    const FileSpecList &support_files) {
+  // Analyze all files we were given to build the configuration.
+  bool error = !llvm::all_of(support_files,
+                             std::bind(&CppModuleConfiguration::analyzeFile,
+                                       this, std::placeholders::_1));
+  // If we have a valid configuration at this point, set the
+  // include directories and module list that should be used.
+  if (!error && hasValidConfig()) {
+    // Calculate the resource directory for LLDB.
+    llvm::SmallString<256> resource_dir;
+    llvm::sys::path::append(resource_dir, GetClangResourceDir().GetPath(),
+                            "include");
+    m_resource_inc = resource_dir.str();
+
+    // This order matches the way Clang orders these directories.
+    m_include_dirs = {m_std_inc.Get(), m_resource_inc, m_c_inc.Get()};
+    m_imported_modules = {"std"};
+  }
+}
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.h
new file mode 100644
index 0000000..8e892e3
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/CppModuleConfiguration.h
@@ -0,0 +1,84 @@
+//===-- CppModuleConfiguration.h --------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_CppModuleConfiguration_h_
+#define liblldb_CppModuleConfiguration_h_
+
+#include <lldb/Core/FileSpecList.h>
+#include <llvm/Support/Regex.h>
+
+namespace lldb_private {
+
+/// A Clang configuration when importing C++ modules.
+///
+/// Includes a list of include paths that should be used when importing
+/// and a list of modules that can be imported. Currently only used when
+/// importing the 'std' module and its dependencies.
+class CppModuleConfiguration {
+  /// Utility class for a path that can only be set once.
+  class SetOncePath {
+    std::string m_path;
+    bool m_valid = false;
+    /// True iff this path hasn't been set yet.
+    bool m_first = true;
+
+  public:
+    /// Try setting the path. Returns true if the path was set and false if
+    /// the path was already set.
+    LLVM_NODISCARD bool TrySet(llvm::StringRef path);
+    /// Return the path if there is one.
+    std::string Get() const {
+      assert(m_valid && "Called Get() on an invalid SetOncePath?");
+      return m_path;
+    }
+    /// Returns true iff this path was set exactly once so far.
+    bool Valid() const { return m_valid; }
+  };
+
+  /// If valid, the include path used for the std module.
+  SetOncePath m_std_inc;
+  /// If valid, the include path to the C library (e.g. /usr/include).
+  SetOncePath m_c_inc;
+  /// The Clang resource include path for this configuration.
+  std::string m_resource_inc;
+
+  std::vector<std::string> m_include_dirs;
+  std::vector<std::string> m_imported_modules;
+
+  /// Analyze a given source file to build the current configuration.
+  /// Returns false iff there was a fatal error that makes analyzing any
+  /// further files pointless as the configuration is now invalid.
+  bool analyzeFile(const FileSpec &f);
+
+public:
+  /// Creates a configuraiton by analyzing the given list of used source files.
+  ///
+  /// Currently only looks at the used paths and doesn't actually access the
+  /// files on the disk.
+  explicit CppModuleConfiguration(const FileSpecList &support_files);
+  /// Creates an empty and invalid configuration.
+  CppModuleConfiguration() {}
+
+  /// Returns true iff this is a valid configuration that can be used to
+  /// load and compile modules.
+  bool hasValidConfig();
+
+  /// Returns a list of include directories that should be used when using this
+  /// configuration (e.g. {"/usr/include", "/usr/include/c++/v1"}).
+  llvm::ArrayRef<std::string> GetIncludeDirs() const { return m_include_dirs; }
+
+  /// Returns a list of (top level) modules that should be imported when using
+  /// this configuration (e.g. {"std"}).
+  llvm::ArrayRef<std::string> GetImportedModules() const {
+    return m_imported_modules;
+  }
+};
+
+} // namespace lldb_private
+
+#endif
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp
index f8e004f..d5ffb95 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.cpp
@@ -320,9 +320,8 @@
   bool InstrumentInstruction(llvm::Instruction *inst) override {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-    if (log)
-      log->Printf("Instrumenting load/store instruction: %s\n",
-                  PrintValue(inst).c_str());
+    LLDB_LOGF(log, "Instrumenting load/store instruction: %s\n",
+              PrintValue(inst).c_str());
 
     if (!m_valid_pointer_check_func)
       m_valid_pointer_check_func =
@@ -483,9 +482,8 @@
       std::string name_str = called_function->getName().str();
       const char *name_cstr = name_str.c_str();
 
-      if (log)
-        log->Printf("Found call to %s: %s\n", name_cstr,
-                    PrintValue(call_inst).c_str());
+      LLDB_LOGF(log, "Found call to %s: %s\n", name_cstr,
+                PrintValue(call_inst).c_str());
 
       if (name_str.find("objc_msgSend") == std::string::npos)
         return true;
@@ -520,10 +518,9 @@
         return true;
       }
 
-      if (log)
-        log->Printf(
-            "Function name '%s' contains 'objc_msgSend' but is not handled",
-            name_str.c_str());
+      LLDB_LOGF(log,
+                "Function name '%s' contains 'objc_msgSend' but is not handled",
+                name_str.c_str());
 
       return true;
     }
@@ -548,8 +545,7 @@
   llvm::Function *function = M.getFunction(StringRef(m_func_name));
 
   if (!function) {
-    if (log)
-      log->Printf("Couldn't find %s() in the module", m_func_name.c_str());
+    LLDB_LOGF(log, "Couldn't find %s() in the module", m_func_name.c_str());
 
     return false;
   }
@@ -582,7 +578,7 @@
 
     oss.flush();
 
-    log->Printf("Module after dynamic checks: \n%s", s.c_str());
+    LLDB_LOGF(log, "Module after dynamic checks: \n%s", s.c_str());
   }
 
   return true;
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.h
index 60c0691..5b9c800 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRDynamicChecks.h
@@ -76,10 +76,6 @@
   ///
   /// \param[in] func_name
   ///     The name of the function to prepare for execution in the target.
-  ///
-  /// \param[in] decl_map
-  ///     The mapping used to look up entities in the target process. In
-  ///     this case, used to find objc_msgSend
   IRDynamicChecks(ClangDynamicCheckerFunctions &checker_functions,
                   const char *func_name = "$__lldb_expr");
 
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
index 07acb2e..103a7ee 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
@@ -43,6 +43,8 @@
 
 static char ID;
 
+typedef SmallVector<Instruction *, 2> InstrList;
+
 IRForTarget::FunctionValueCache::FunctionValueCache(Maker const &maker)
     : m_maker(maker), m_values() {}
 
@@ -153,6 +155,15 @@
   return DeclForGlobal(global_val, m_module);
 }
 
+/// Returns true iff the mangled symbol is for a static guard variable.
+static bool isGuardVariableSymbol(llvm::StringRef mangled_symbol,
+                                  bool check_ms_abi = true) {
+  bool result = mangled_symbol.startswith("_ZGV"); // Itanium ABI guard variable
+  if (check_ms_abi)
+    result |= mangled_symbol.endswith("@4IA"); // Microsoft ABI
+  return result;
+}
+
 bool IRForTarget::CreateResultVariable(llvm::Function &llvm_function) {
   lldb_private::Log *log(
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
@@ -164,64 +175,58 @@
 
   ValueSymbolTable &value_symbol_table = m_module->getValueSymbolTable();
 
-  std::string result_name_str;
-  const char *result_name = nullptr;
+  llvm::StringRef result_name;
+  bool found_result = false;
 
-  for (ValueSymbolTable::iterator vi = value_symbol_table.begin(),
-                                  ve = value_symbol_table.end();
-       vi != ve; ++vi) {
-    result_name_str = vi->first().str();
-    const char *value_name = result_name_str.c_str();
+  for (StringMapEntry<llvm::Value *> &value_symbol : value_symbol_table) {
+    result_name = value_symbol.first();
 
-    if (strstr(value_name, "$__lldb_expr_result_ptr") &&
-        strncmp(value_name, "_ZGV", 4)) {
-      result_name = value_name;
+    // Check if this is a guard variable. It seems this causes some hiccups
+    // on Windows, so let's only check for Itanium guard variables.
+    bool is_guard_var = isGuardVariableSymbol(result_name, /*MS ABI*/ false);
+
+    if (result_name.contains("$__lldb_expr_result_ptr") && !is_guard_var) {
+      found_result = true;
       m_result_is_pointer = true;
       break;
     }
 
-    if (strstr(value_name, "$__lldb_expr_result") &&
-        strncmp(value_name, "_ZGV", 4)) {
-      result_name = value_name;
+    if (result_name.contains("$__lldb_expr_result") && !is_guard_var) {
+      found_result = true;
       m_result_is_pointer = false;
       break;
     }
   }
 
-  if (!result_name) {
-    if (log)
-      log->PutCString("Couldn't find result variable");
+  if (!found_result) {
+    LLDB_LOG(log, "Couldn't find result variable");
 
     return true;
   }
 
-  if (log)
-    log->Printf("Result name: \"%s\"", result_name);
+  LLDB_LOG(log, "Result name: \"{0}\"", result_name);
 
   Value *result_value = m_module->getNamedValue(result_name);
 
   if (!result_value) {
-    if (log)
-      log->PutCString("Result variable had no data");
+    LLDB_LOG(log, "Result variable had no data");
 
-    m_error_stream.Printf("Internal error [IRForTarget]: Result variable's "
-                          "name (%s) exists, but not its definition\n",
+    m_error_stream.Format("Internal error [IRForTarget]: Result variable's "
+                          "name ({0}) exists, but not its definition\n",
                           result_name);
 
     return false;
   }
 
-  if (log)
-    log->Printf("Found result in the IR: \"%s\"",
-                PrintValue(result_value, false).c_str());
+  LLDB_LOG(log, "Found result in the IR: \"{0}\"",
+           PrintValue(result_value, false));
 
   GlobalVariable *result_global = dyn_cast<GlobalVariable>(result_value);
 
   if (!result_global) {
-    if (log)
-      log->PutCString("Result variable isn't a GlobalVariable");
+    LLDB_LOG(log, "Result variable isn't a GlobalVariable");
 
-    m_error_stream.Printf("Internal error [IRForTarget]: Result variable (%s) "
+    m_error_stream.Format("Internal error [IRForTarget]: Result variable ({0}) "
                           "is defined, but is not a global variable\n",
                           result_name);
 
@@ -230,10 +235,9 @@
 
   clang::NamedDecl *result_decl = DeclForGlobal(result_global);
   if (!result_decl) {
-    if (log)
-      log->PutCString("Result variable doesn't have a corresponding Decl");
+    LLDB_LOG(log, "Result variable doesn't have a corresponding Decl");
 
-    m_error_stream.Printf("Internal error [IRForTarget]: Result variable (%s) "
+    m_error_stream.Format("Internal error [IRForTarget]: Result variable ({0}) "
                           "does not have a corresponding Clang entity\n",
                           result_name);
 
@@ -246,16 +250,15 @@
     result_decl->print(decl_desc_stream);
     decl_desc_stream.flush();
 
-    log->Printf("Found result decl: \"%s\"", decl_desc_str.c_str());
+    LLDB_LOG(log, "Found result decl: \"{0}\"", decl_desc_str);
   }
 
   clang::VarDecl *result_var = dyn_cast<clang::VarDecl>(result_decl);
   if (!result_var) {
-    if (log)
-      log->PutCString("Result variable Decl isn't a VarDecl");
+    LLDB_LOG(log, "Result variable Decl isn't a VarDecl");
 
-    m_error_stream.Printf("Internal error [IRForTarget]: Result variable "
-                          "(%s)'s corresponding Clang entity isn't a "
+    m_error_stream.Format("Internal error [IRForTarget]: Result variable "
+                          "({0})'s corresponding Clang entity isn't a "
                           "variable\n",
                           result_name);
 
@@ -292,10 +295,9 @@
           lldb_private::ClangASTContext::GetASTContext(
               &result_decl->getASTContext()));
     } else {
-      if (log)
-        log->PutCString("Expected result to have pointer type, but it did not");
+      LLDB_LOG(log, "Expected result to have pointer type, but it did not");
 
-      m_error_stream.Printf("Internal error [IRForTarget]: Lvalue result (%s) "
+      m_error_stream.Format("Internal error [IRForTarget]: Lvalue result ({0}) "
                             "is not a pointer variable\n",
                             result_name);
 
@@ -316,8 +318,7 @@
     lldb_private::StreamString type_desc_stream;
     m_result_type.DumpTypeDescription(&type_desc_stream);
 
-    if (log)
-      log->Printf("Result type has unknown size");
+    LLDB_LOG(log, "Result type has unknown size");
 
     m_error_stream.Printf("Error [IRForTarget]: Size of result type '%s' "
                           "couldn't be determined\n",
@@ -329,15 +330,13 @@
     lldb_private::StreamString type_desc_stream;
     m_result_type.DumpTypeDescription(&type_desc_stream);
 
-    log->Printf("Result decl type: \"%s\"", type_desc_stream.GetData());
+    LLDB_LOG(log, "Result decl type: \"{0}\"", type_desc_stream.GetData());
   }
 
   m_result_name = lldb_private::ConstString("$RESULT_NAME");
 
-  if (log)
-    log->Printf("Creating a new result global: \"%s\" with size 0x%" PRIx64,
-                m_result_name.GetCString(),
-                m_result_type.GetByteSize(nullptr).getValueOr(0));
+  LLDB_LOG(log, "Creating a new result global: \"{0}\" with size {1}",
+           m_result_name, m_result_type.GetByteSize(nullptr).getValueOr(0));
 
   // Construct a new result global and set up its metadata
 
@@ -356,7 +355,7 @@
 
   ConstantInt *new_constant_int =
       ConstantInt::get(llvm::Type::getInt64Ty(m_module->getContext()),
-                       reinterpret_cast<uint64_t>(result_decl), false);
+                       reinterpret_cast<uintptr_t>(result_decl), false);
 
   llvm::Metadata *values[2];
   values[0] = ConstantAsMetadata::get(new_result_global);
@@ -369,10 +368,8 @@
       m_module->getNamedMetadata("clang.global.decl.ptrs");
   named_metadata->addOperand(persistent_global_md);
 
-  if (log)
-    log->Printf("Replacing \"%s\" with \"%s\"",
-                PrintValue(result_global).c_str(),
-                PrintValue(new_result_global).c_str());
+  LLDB_LOG(log, "Replacing \"{0}\" with \"{1}\"", PrintValue(result_global),
+           PrintValue(new_result_global));
 
   if (result_global->use_empty()) {
     // We need to synthesize a store for this variable, because otherwise
@@ -385,11 +382,10 @@
       return false;
 
     if (!result_global->hasInitializer()) {
-      if (log)
-        log->Printf("Couldn't find initializer for unused variable");
+      LLDB_LOG(log, "Couldn't find initializer for unused variable");
 
-      m_error_stream.Printf("Internal error [IRForTarget]: Result variable "
-                            "(%s) has no writes and no initializer\n",
+      m_error_stream.Format("Internal error [IRForTarget]: Result variable "
+                            "({0}) has no writes and no initializer\n",
                             result_name);
 
       return false;
@@ -400,9 +396,8 @@
     StoreInst *synthesized_store =
         new StoreInst(initializer, new_result_global, first_entry_instruction);
 
-    if (log)
-      log->Printf("Synthesized result store \"%s\"\n",
-                  PrintValue(synthesized_store).c_str());
+    LLDB_LOG(log, "Synthesized result store \"{0}\"\n",
+             PrintValue(synthesized_store));
   } else {
     result_global->replaceAllUsesWith(new_result_global);
   }
@@ -438,7 +433,6 @@
         m_execution_unit.FindSymbol(g_CFStringCreateWithBytes_str, 
                                     missing_weak);
     if (CFStringCreateWithBytes_addr == LLDB_INVALID_ADDRESS || missing_weak) {
-      if (log)
         log->PutCString("Couldn't find CFStringCreateWithBytes in the target");
 
       m_error_stream.Printf("Error [IRForTarget]: Rewriting an Objective-C "
@@ -448,9 +442,8 @@
       return false;
     }
 
-    if (log)
-      log->Printf("Found CFStringCreateWithBytes at 0x%" PRIx64,
-                  CFStringCreateWithBytes_addr);
+    LLDB_LOG(log, "Found CFStringCreateWithBytes at {0}",
+             CFStringCreateWithBytes_addr);
 
     // Build the function type:
     //
@@ -543,9 +536,7 @@
 
  if (!UnfoldConstant(ns_str, nullptr, CFSCWB_Caller, m_entry_instruction_finder,
                      m_error_stream)) {
-   if (log)
-     log->PutCString(
-         "Couldn't replace the NSString with the result of the call");
+   LLDB_LOG(log, "Couldn't replace the NSString with the result of the call");
 
    m_error_stream.Printf("error [IRForTarget internal]: Couldn't replace an "
                          "Objective-C constant string with a dynamic "
@@ -565,21 +556,17 @@
 
   ValueSymbolTable &value_symbol_table = m_module->getValueSymbolTable();
 
-  for (ValueSymbolTable::iterator vi = value_symbol_table.begin(),
-                                  ve = value_symbol_table.end();
-       vi != ve; ++vi) {
-    std::string value_name = vi->first().str();
-    const char *value_name_cstr = value_name.c_str();
+  for (StringMapEntry<llvm::Value *> &value_symbol : value_symbol_table) {
+    llvm::StringRef value_name = value_symbol.first();
 
-    if (strstr(value_name_cstr, "_unnamed_cfstring_")) {
-      Value *nsstring_value = vi->second;
+    if (value_name.contains("_unnamed_cfstring_")) {
+      Value *nsstring_value = value_symbol.second;
 
       GlobalVariable *nsstring_global =
           dyn_cast<GlobalVariable>(nsstring_value);
 
       if (!nsstring_global) {
-        if (log)
-          log->PutCString("NSString variable is not a GlobalVariable");
+        LLDB_LOG(log, "NSString variable is not a GlobalVariable");
 
         m_error_stream.Printf("Internal error [IRForTarget]: An Objective-C "
                               "constant string is not a global variable\n");
@@ -588,8 +575,7 @@
       }
 
       if (!nsstring_global->hasInitializer()) {
-        if (log)
-          log->PutCString("NSString variable does not have an initializer");
+        LLDB_LOG(log, "NSString variable does not have an initializer");
 
         m_error_stream.Printf("Internal error [IRForTarget]: An Objective-C "
                               "constant string does not have an initializer\n");
@@ -601,9 +587,8 @@
           dyn_cast<ConstantStruct>(nsstring_global->getInitializer());
 
       if (!nsstring_struct) {
-        if (log)
-          log->PutCString(
-              "NSString variable's initializer is not a ConstantStruct");
+        LLDB_LOG(log,
+                 "NSString variable's initializer is not a ConstantStruct");
 
         m_error_stream.Printf("Internal error [IRForTarget]: An Objective-C "
                               "constant string is not a structure constant\n");
@@ -621,10 +606,11 @@
       // };
 
       if (nsstring_struct->getNumOperands() != 4) {
-        if (log)
-          log->Printf("NSString variable's initializer structure has an "
-                      "unexpected number of members.  Should be 4, is %d",
-                      nsstring_struct->getNumOperands());
+
+        LLDB_LOG(log,
+                 "NSString variable's initializer structure has an "
+                 "unexpected number of members.  Should be 4, is {0}",
+                 nsstring_struct->getNumOperands());
 
         m_error_stream.Printf("Internal error [IRForTarget]: The struct for an "
                               "Objective-C constant string is not as "
@@ -636,8 +622,7 @@
       Constant *nsstring_member = nsstring_struct->getOperand(2);
 
       if (!nsstring_member) {
-        if (log)
-          log->PutCString("NSString initializer's str element was empty");
+        LLDB_LOG(log, "NSString initializer's str element was empty");
 
         m_error_stream.Printf("Internal error [IRForTarget]: An Objective-C "
                               "constant string does not have a string "
@@ -649,9 +634,8 @@
       ConstantExpr *nsstring_expr = dyn_cast<ConstantExpr>(nsstring_member);
 
       if (!nsstring_expr) {
-        if (log)
-          log->PutCString(
-              "NSString initializer's str element is not a ConstantExpr");
+        LLDB_LOG(log,
+                 "NSString initializer's str element is not a ConstantExpr");
 
         m_error_stream.Printf("Internal error [IRForTarget]: An Objective-C "
                               "constant string's string initializer is not "
@@ -671,9 +655,8 @@
       }
 
       if (!cstr_global) {
-        if (log)
-          log->PutCString(
-              "NSString initializer's str element is not a GlobalVariable");
+        LLDB_LOG(log,
+                 "NSString initializer's str element is not a GlobalVariable");
 
         m_error_stream.Printf("Internal error [IRForTarget]: Unhandled"
                               "constant string initializer\n");
@@ -682,9 +665,8 @@
       }
 
       if (!cstr_global->hasInitializer()) {
-        if (log)
-          log->PutCString("NSString initializer's str element does not have an "
-                          "initializer");
+        LLDB_LOG(log, "NSString initializer's str element does not have an "
+                      "initializer");
 
         m_error_stream.Printf("Internal error [IRForTarget]: An Objective-C "
                               "constant string's string initializer doesn't "
@@ -726,21 +708,18 @@
       ConstantDataArray *cstr_array =
           dyn_cast<ConstantDataArray>(cstr_global->getInitializer());
 
-      if (log) {
-        if (cstr_array)
-          log->Printf("Found NSString constant %s, which contains \"%s\"",
-                      value_name_cstr, cstr_array->getAsString().str().c_str());
-        else
-          log->Printf("Found NSString constant %s, which contains \"\"",
-                      value_name_cstr);
-      }
+      if (cstr_array)
+        LLDB_LOG(log, "Found NSString constant {0}, which contains \"{1}\"",
+                 value_name, cstr_array->getAsString());
+      else
+        LLDB_LOG(log, "Found NSString constant {0}, which contains \"\"",
+                 value_name);
 
       if (!cstr_array)
         cstr_global = nullptr;
 
       if (!RewriteObjCConstString(nsstring_global, cstr_global)) {
-        if (log)
-          log->PutCString("Error rewriting the constant string");
+        LLDB_LOG(log, "Error rewriting the constant string");
 
         // We don't print an error message here because RewriteObjCConstString
         // has done so for us.
@@ -750,19 +729,15 @@
     }
   }
 
-  for (ValueSymbolTable::iterator vi = value_symbol_table.begin(),
-                                  ve = value_symbol_table.end();
-       vi != ve; ++vi) {
-    std::string value_name = vi->first().str();
-    const char *value_name_cstr = value_name.c_str();
+  for (StringMapEntry<llvm::Value *> &value_symbol : value_symbol_table) {
+    llvm::StringRef value_name = value_symbol.first();
 
-    if (!strcmp(value_name_cstr, "__CFConstantStringClassReference")) {
-      GlobalVariable *gv = dyn_cast<GlobalVariable>(vi->second);
+    if (value_name == "__CFConstantStringClassReference") {
+      GlobalVariable *gv = dyn_cast<GlobalVariable>(value_symbol.second);
 
       if (!gv) {
-        if (log)
-          log->PutCString(
-              "__CFConstantStringClassReference is not a global variable");
+        LLDB_LOG(log,
+                 "__CFConstantStringClassReference is not a global variable");
 
         m_error_stream.Printf("Internal error [IRForTarget]: Found a "
                               "CFConstantStringClassReference, but it is not a "
@@ -850,9 +825,8 @@
 
   std::string omvn_initializer_string = omvn_initializer_array->getAsString();
 
-  if (log)
-    log->Printf("Found Objective-C selector reference \"%s\"",
-                omvn_initializer_string.c_str());
+  LLDB_LOG(log, "Found Objective-C selector reference \"{0}\"",
+           omvn_initializer_string);
 
   // Construct a call to sel_registerName
 
@@ -866,9 +840,7 @@
     if (sel_registerName_addr == LLDB_INVALID_ADDRESS || missing_weak)
       return false;
 
-    if (log)
-      log->Printf("Found sel_registerName at 0x%" PRIx64,
-                  sel_registerName_addr);
+    LLDB_LOG(log, "Found sel_registerName at {0}", sel_registerName_addr);
 
     // Build the function type: struct objc_selector
     // *sel_registerName(uint8_t*)
@@ -921,32 +893,21 @@
   lldb_private::Log *log(
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  BasicBlock::iterator ii;
-
-  typedef SmallVector<Instruction *, 2> InstrList;
-  typedef InstrList::iterator InstrIterator;
-
   InstrList selector_loads;
 
-  for (ii = basic_block.begin(); ii != basic_block.end(); ++ii) {
-    Instruction &inst = *ii;
-
+  for (Instruction &inst : basic_block) {
     if (LoadInst *load = dyn_cast<LoadInst>(&inst))
       if (IsObjCSelectorRef(load->getPointerOperand()))
         selector_loads.push_back(&inst);
   }
 
-  InstrIterator iter;
-
-  for (iter = selector_loads.begin(); iter != selector_loads.end(); ++iter) {
-    if (!RewriteObjCSelector(*iter)) {
+  for (Instruction *inst : selector_loads) {
+    if (!RewriteObjCSelector(inst)) {
       m_error_stream.Printf("Internal error [IRForTarget]: Couldn't change a "
                             "static reference to an Objective-C selector to a "
                             "dynamic reference\n");
 
-      if (log)
-        log->PutCString(
-            "Couldn't rewrite a reference to an Objective-C selector");
+      LLDB_LOG(log, "Couldn't rewrite a reference to an Objective-C selector");
 
       return false;
     }
@@ -1022,9 +983,8 @@
 
   std::string ocn_initializer_string = ocn_initializer_array->getAsString();
 
-  if (log)
-    log->Printf("Found Objective-C class reference \"%s\"",
-                ocn_initializer_string.c_str());
+  LLDB_LOG(log, "Found Objective-C class reference \"{0}\"",
+           ocn_initializer_string);
 
   // Construct a call to objc_getClass
 
@@ -1038,9 +998,7 @@
     if (objc_getClass_addr == LLDB_INVALID_ADDRESS || missing_weak)
       return false;
 
-    if (log)
-      log->Printf("Found objc_getClass at 0x%" PRIx64,
-                  objc_getClass_addr);
+    LLDB_LOG(log, "Found objc_getClass at {0}", objc_getClass_addr);
 
     // Build the function type: %struct._objc_class *objc_getClass(i8*)
 
@@ -1086,32 +1044,21 @@
   lldb_private::Log *log(
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  BasicBlock::iterator ii;
-
-  typedef SmallVector<Instruction *, 2> InstrList;
-  typedef InstrList::iterator InstrIterator;
-
   InstrList class_loads;
 
-  for (ii = basic_block.begin(); ii != basic_block.end(); ++ii) {
-    Instruction &inst = *ii;
-
+  for (Instruction &inst : basic_block) {
     if (LoadInst *load = dyn_cast<LoadInst>(&inst))
       if (IsObjCClassReference(load->getPointerOperand()))
         class_loads.push_back(&inst);
   }
 
-  InstrIterator iter;
-
-  for (iter = class_loads.begin(); iter != class_loads.end(); ++iter) {
-    if (!RewriteObjCClassReference(*iter)) {
+  for (Instruction *inst : class_loads) {
+    if (!RewriteObjCClassReference(inst)) {
       m_error_stream.Printf("Internal error [IRForTarget]: Couldn't change a "
                             "static reference to an Objective-C class to a "
                             "dynamic reference\n");
 
-      if (log)
-        log->PutCString(
-            "Couldn't rewrite a reference to an Objective-C class");
+      LLDB_LOG(log, "Couldn't rewrite a reference to an Objective-C class");
 
       return false;
     }
@@ -1180,9 +1127,8 @@
 
   LoadInst *persistent_load = new LoadInst(persistent_global, "", alloc);
 
-  if (log)
-    log->Printf("Replacing \"%s\" with \"%s\"", PrintValue(alloc).c_str(),
-                PrintValue(persistent_load).c_str());
+  LLDB_LOG(log, "Replacing \"{0}\" with \"{1}\"", PrintValue(alloc),
+           PrintValue(persistent_load));
 
   alloc->replaceAllUsesWith(persistent_load);
   alloc->eraseFromParent();
@@ -1197,23 +1143,16 @@
   lldb_private::Log *log(
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  BasicBlock::iterator ii;
-
-  typedef SmallVector<Instruction *, 2> InstrList;
-  typedef InstrList::iterator InstrIterator;
-
   InstrList pvar_allocs;
 
-  for (ii = basic_block.begin(); ii != basic_block.end(); ++ii) {
-    Instruction &inst = *ii;
+  for (Instruction &inst : basic_block) {
 
     if (AllocaInst *alloc = dyn_cast<AllocaInst>(&inst)) {
       llvm::StringRef alloc_name = alloc->getName();
 
       if (alloc_name.startswith("$") && !alloc_name.startswith("$__lldb")) {
         if (alloc_name.find_first_of("0123456789") == 1) {
-          if (log)
-            log->Printf("Rejecting a numeric persistent variable.");
+          LLDB_LOG(log, "Rejecting a numeric persistent variable.");
 
           m_error_stream.Printf("Error [IRForTarget]: Names starting with $0, "
                                 "$1, ... are reserved for use as result "
@@ -1227,16 +1166,12 @@
     }
   }
 
-  InstrIterator iter;
-
-  for (iter = pvar_allocs.begin(); iter != pvar_allocs.end(); ++iter) {
-    if (!RewritePersistentAlloc(*iter)) {
+  for (Instruction *inst : pvar_allocs) {
+    if (!RewritePersistentAlloc(inst)) {
       m_error_stream.Printf("Internal error [IRForTarget]: Couldn't rewrite "
                             "the creation of a persistent variable\n");
 
-      if (log)
-        log->PutCString(
-            "Couldn't rewrite the creation of a persistent variable");
+      LLDB_LOG(log, "Couldn't rewrite the creation of a persistent variable");
 
       return false;
     }
@@ -1245,79 +1180,12 @@
   return true;
 }
 
-bool IRForTarget::MaterializeInitializer(uint8_t *data, Constant *initializer) {
-  if (!initializer)
-    return true;
-
-  lldb_private::Log *log(
-      lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
-
-  if (log && log->GetVerbose())
-    log->Printf("  MaterializeInitializer(%p, %s)", (void *)data,
-                PrintValue(initializer).c_str());
-
-  Type *initializer_type = initializer->getType();
-
-  if (ConstantInt *int_initializer = dyn_cast<ConstantInt>(initializer)) {
-    size_t constant_size = m_target_data->getTypeStoreSize(initializer_type);
-    lldb_private::Scalar scalar = int_initializer->getValue().zextOrTrunc(
-        llvm::NextPowerOf2(constant_size) * 8);
-
-    lldb_private::Status get_data_error;
-    return scalar.GetAsMemoryData(data, constant_size,
-                                  lldb_private::endian::InlHostByteOrder(),
-                                  get_data_error) != 0;
-  } else if (ConstantDataArray *array_initializer =
-                 dyn_cast<ConstantDataArray>(initializer)) {
-    if (array_initializer->isString()) {
-      std::string array_initializer_string = array_initializer->getAsString();
-      memcpy(data, array_initializer_string.c_str(),
-             m_target_data->getTypeStoreSize(initializer_type));
-    } else {
-      ArrayType *array_initializer_type = array_initializer->getType();
-      Type *array_element_type = array_initializer_type->getElementType();
-
-      size_t element_size = m_target_data->getTypeAllocSize(array_element_type);
-
-      for (unsigned i = 0; i < array_initializer->getNumOperands(); ++i) {
-        Value *operand_value = array_initializer->getOperand(i);
-        Constant *operand_constant = dyn_cast<Constant>(operand_value);
-
-        if (!operand_constant)
-          return false;
-
-        if (!MaterializeInitializer(data + (i * element_size),
-                                    operand_constant))
-          return false;
-      }
-    }
-    return true;
-  } else if (ConstantStruct *struct_initializer =
-                 dyn_cast<ConstantStruct>(initializer)) {
-    StructType *struct_initializer_type = struct_initializer->getType();
-    const StructLayout *struct_layout =
-        m_target_data->getStructLayout(struct_initializer_type);
-
-    for (unsigned i = 0; i < struct_initializer->getNumOperands(); ++i) {
-      if (!MaterializeInitializer(data + struct_layout->getElementOffset(i),
-                                  struct_initializer->getOperand(i)))
-        return false;
-    }
-    return true;
-  } else if (isa<ConstantAggregateZero>(initializer)) {
-    memset(data, 0, m_target_data->getTypeStoreSize(initializer_type));
-    return true;
-  }
-  return false;
-}
-
 // This function does not report errors; its callers are responsible.
 bool IRForTarget::MaybeHandleVariable(Value *llvm_value_ptr) {
   lldb_private::Log *log(
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("MaybeHandleVariable (%s)", PrintValue(llvm_value_ptr).c_str());
+  LLDB_LOG(log, "MaybeHandleVariable ({0})", PrintValue(llvm_value_ptr));
 
   if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(llvm_value_ptr)) {
     switch (constant_expr->getOpcode()) {
@@ -1343,25 +1211,26 @@
       if (!global_variable->hasExternalLinkage())
         return true;
 
-      if (log)
-        log->Printf("Found global variable \"%s\" without metadata",
-                    global_variable->getName().str().c_str());
+      LLDB_LOG(log, "Found global variable \"{0}\" without metadata",
+               global_variable->getName());
 
       return false;
     }
 
-    std::string name(named_decl->getName().str());
+    llvm::StringRef name(named_decl->getName());
 
     clang::ValueDecl *value_decl = dyn_cast<clang::ValueDecl>(named_decl);
     if (value_decl == nullptr)
       return false;
 
-    lldb_private::CompilerType compiler_type(&value_decl->getASTContext(),
-                                             value_decl->getType());
+    lldb_private::CompilerType compiler_type(
+        lldb_private::ClangASTContext::GetASTContext(
+            &value_decl->getASTContext()),
+        value_decl->getType().getAsOpaquePtr());
 
     const Type *value_type = nullptr;
 
-    if (name[0] == '$') {
+    if (name.startswith("$")) {
       // The $__lldb_expr_result name indicates the return value has allocated
       // as a static variable.  Per the comment at
       // ASTResultSynthesizer::SynthesizeBodyResult, accesses to this static
@@ -1381,31 +1250,24 @@
     llvm::Optional<uint64_t> value_size = compiler_type.GetByteSize(nullptr);
     if (!value_size)
       return false;
-    lldb::offset_t value_alignment =
-        (compiler_type.GetTypeBitAlign() + 7ull) / 8ull;
+    llvm::Optional<size_t> opt_alignment = compiler_type.GetTypeBitAlign(nullptr);
+    if (!opt_alignment)
+      return false;
+    lldb::offset_t value_alignment = (*opt_alignment + 7ull) / 8ull;
 
-    if (log) {
-      log->Printf("Type of \"%s\" is [clang \"%s\", llvm \"%s\"] [size %" PRIu64
-                  ", align %" PRIu64 "]",
-                  name.c_str(),
-                  lldb_private::ClangUtil::GetQualType(compiler_type)
-                      .getAsString()
-                      .c_str(),
-                  PrintType(value_type).c_str(), *value_size, value_alignment);
-    }
+    LLDB_LOG(log,
+             "Type of \"{0}\" is [clang \"{1}\", llvm \"{2}\"] [size {3}, "
+             "align {4}]",
+             name,
+             lldb_private::ClangUtil::GetQualType(compiler_type).getAsString(),
+             PrintType(value_type), *value_size, value_alignment);
 
-    if (named_decl &&
-        !m_decl_map->AddValueToStruct(
-            named_decl, lldb_private::ConstString(name.c_str()), llvm_value_ptr,
-            *value_size, value_alignment)) {
-      if (!global_variable->hasExternalLinkage())
-        return true;
-      else
-        return true;
-    }
+    if (named_decl)
+      m_decl_map->AddValueToStruct(named_decl, lldb_private::ConstString(name),
+                                   llvm_value_ptr, *value_size,
+                                   value_alignment);
   } else if (dyn_cast<llvm::Function>(llvm_value_ptr)) {
-    if (log)
-      log->Printf("Function pointers aren't handled right now");
+    LLDB_LOG(log, "Function pointers aren't handled right now");
 
     return false;
   }
@@ -1424,14 +1286,12 @@
       m_decl_map->GetSymbolAddress(name, lldb::eSymbolTypeAny);
 
   if (symbol_addr == LLDB_INVALID_ADDRESS) {
-    if (log)
-      log->Printf("Symbol \"%s\" had no address", name.GetCString());
+    LLDB_LOG(log, "Symbol \"{0}\" had no address", name);
 
     return false;
   }
 
-  if (log)
-    log->Printf("Found \"%s\" at 0x%" PRIx64, name.GetCString(), symbol_addr);
+  LLDB_LOG(log, "Found \"{0}\" at {1}", name, symbol_addr);
 
   Type *symbol_type = symbol->getType();
 
@@ -1440,9 +1300,8 @@
   Value *symbol_addr_ptr =
       ConstantExpr::getIntToPtr(symbol_addr_int, symbol_type);
 
-  if (log)
-    log->Printf("Replacing %s with %s", PrintValue(symbol).c_str(),
-                PrintValue(symbol_addr_ptr).c_str());
+  LLDB_LOG(log, "Replacing {0} with {1}", PrintValue(symbol),
+           PrintValue(symbol_addr_ptr));
 
   symbol->replaceAllUsesWith(symbol_addr_ptr);
 
@@ -1453,14 +1312,12 @@
   lldb_private::Log *log(
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("MaybeHandleCallArguments(%s)", PrintValue(Old).c_str());
+  LLDB_LOG(log, "MaybeHandleCallArguments({0})", PrintValue(Old));
 
   for (unsigned op_index = 0, num_ops = Old->getNumArgOperands();
        op_index < num_ops; ++op_index)
-    if (!MaybeHandleVariable(Old->getArgOperand(
-            op_index))) // conservatively believe that this is a store
-    {
+    // conservatively believe that this is a store
+    if (!MaybeHandleVariable(Old->getArgOperand(op_index))) {
       m_error_stream.Printf("Internal error [IRForTarget]: Couldn't rewrite "
                             "one of the arguments of a function call.\n");
 
@@ -1493,9 +1350,8 @@
   lldb::addr_t class_ptr =
       m_decl_map->GetSymbolAddress(name_cstr, lldb::eSymbolTypeObjCClass);
 
-  if (log)
-    log->Printf("Found reference to Objective-C class %s (0x%llx)",
-                name_cstr.AsCString(), (unsigned long long)class_ptr);
+  LLDB_LOG(log, "Found reference to Objective-C class {0} ({1})", name,
+           (unsigned long long)class_ptr);
 
   if (class_ptr == LLDB_INVALID_ADDRESS)
     return false;
@@ -1528,13 +1384,9 @@
 }
 
 bool IRForTarget::RemoveCXAAtExit(BasicBlock &basic_block) {
-  BasicBlock::iterator ii;
-
   std::vector<CallInst *> calls_to_remove;
 
-  for (ii = basic_block.begin(); ii != basic_block.end(); ++ii) {
-    Instruction &inst = *ii;
-
+  for (Instruction &inst : basic_block) {
     CallInst *call = dyn_cast<CallInst>(&inst);
 
     // MaybeHandleCallArguments handles error reporting; we are silent here
@@ -1557,25 +1409,16 @@
       calls_to_remove.push_back(call);
   }
 
-  for (std::vector<CallInst *>::iterator ci = calls_to_remove.begin(),
-                                         ce = calls_to_remove.end();
-       ci != ce; ++ci) {
-    (*ci)->eraseFromParent();
-  }
+  for (CallInst *ci : calls_to_remove)
+    ci->eraseFromParent();
 
   return true;
 }
 
 bool IRForTarget::ResolveCalls(BasicBlock &basic_block) {
-  /////////////////////////////////////////////////////////////////////////
   // Prepare the current basic block for execution in the remote process
-  //
 
-  BasicBlock::iterator ii;
-
-  for (ii = basic_block.begin(); ii != basic_block.end(); ++ii) {
-    Instruction &inst = *ii;
-
+  for (Instruction &inst : basic_block) {
     CallInst *call = dyn_cast<CallInst>(&inst);
 
     // MaybeHandleCallArguments handles error reporting; we are silent here
@@ -1591,31 +1434,27 @@
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
   for (GlobalVariable &global_var : m_module->globals()) {
-    std::string global_name = global_var.getName().str();
+    llvm::StringRef global_name = global_var.getName();
 
-    if (log)
-      log->Printf("Examining %s, DeclForGlobalValue returns %p",
-                  global_name.c_str(),
-                  static_cast<void *>(DeclForGlobal(&global_var)));
+    LLDB_LOG(log, "Examining {0}, DeclForGlobalValue returns {1}", global_name,
+             static_cast<void *>(DeclForGlobal(&global_var)));
 
-    if (global_name.find("OBJC_IVAR") == 0) {
+    if (global_name.startswith("OBJC_IVAR")) {
       if (!HandleSymbol(&global_var)) {
-        m_error_stream.Printf("Error [IRForTarget]: Couldn't find Objective-C "
-                              "indirect ivar symbol %s\n",
-                              global_name.c_str());
+        m_error_stream.Format("Error [IRForTarget]: Couldn't find Objective-C "
+                              "indirect ivar symbol {0}\n",
+                              global_name);
 
         return false;
       }
-    } else if (global_name.find("OBJC_CLASSLIST_REFERENCES_$") !=
-               global_name.npos) {
+    } else if (global_name.contains("OBJC_CLASSLIST_REFERENCES_$")) {
       if (!HandleObjCClass(&global_var)) {
         m_error_stream.Printf("Error [IRForTarget]: Couldn't resolve the class "
                               "for an Objective-C static method call\n");
 
         return false;
       }
-    } else if (global_name.find("OBJC_CLASSLIST_SUP_REFS_$") !=
-               global_name.npos) {
+    } else if (global_name.contains("OBJC_CLASSLIST_SUP_REFS_$")) {
       if (!HandleObjCClass(&global_var)) {
         m_error_stream.Printf("Error [IRForTarget]: Couldn't resolve the class "
                               "for an Objective-C static method call\n");
@@ -1624,9 +1463,9 @@
       }
     } else if (DeclForGlobal(&global_var)) {
       if (!MaybeHandleVariable(&global_var)) {
-        m_error_stream.Printf("Internal error [IRForTarget]: Couldn't rewrite "
-                              "external variable %s\n",
-                              global_name.c_str());
+        m_error_stream.Format("Internal error [IRForTarget]: Couldn't rewrite "
+                              "external variable {0}\n",
+                              global_name);
 
         return false;
       }
@@ -1637,14 +1476,12 @@
 }
 
 static bool isGuardVariableRef(Value *V) {
-  Constant *Old = nullptr;
+  Constant *Old = dyn_cast<Constant>(V);
 
-  if (!(Old = dyn_cast<Constant>(V)))
+  if (!Old)
     return false;
 
-  ConstantExpr *CE = nullptr;
-
-  if ((CE = dyn_cast<ConstantExpr>(V))) {
+  if (auto CE = dyn_cast<ConstantExpr>(V)) {
     if (CE->getOpcode() != Instruction::BitCast)
       return false;
 
@@ -1653,12 +1490,8 @@
 
   GlobalVariable *GV = dyn_cast<GlobalVariable>(Old);
 
-  if (!GV || !GV->hasName() ||
-      (!GV->getName().startswith("_ZGV") && // Itanium ABI guard variable
-       !GV->getName().endswith("@4IA")))    // Microsoft ABI guard variable
-  {
+  if (!GV || !GV->hasName() || !isGuardVariableSymbol(GV->getName()))
     return false;
-  }
 
   return true;
 }
@@ -1674,20 +1507,12 @@
 }
 
 bool IRForTarget::RemoveGuards(BasicBlock &basic_block) {
-  ///////////////////////////////////////////////////////
   // Eliminate any reference to guard variables found.
-  //
-
-  BasicBlock::iterator ii;
-
-  typedef SmallVector<Instruction *, 2> InstrList;
-  typedef InstrList::iterator InstrIterator;
 
   InstrList guard_loads;
   InstrList guard_stores;
 
-  for (ii = basic_block.begin(); ii != basic_block.end(); ++ii) {
-    Instruction &inst = *ii;
+  for (Instruction &inst : basic_block) {
 
     if (LoadInst *load = dyn_cast<LoadInst>(&inst))
       if (isGuardVariableRef(load->getPointerOperand()))
@@ -1698,13 +1523,11 @@
         guard_stores.push_back(&inst);
   }
 
-  InstrIterator iter;
+  for (Instruction *inst : guard_loads)
+    TurnGuardLoadIntoZero(inst);
 
-  for (iter = guard_loads.begin(); iter != guard_loads.end(); ++iter)
-    TurnGuardLoadIntoZero(*iter);
-
-  for (iter = guard_stores.begin(); iter != guard_stores.end(); ++iter)
-    ExciseGuardStore(*iter);
+  for (Instruction *inst : guard_stores)
+    ExciseGuardStore(inst);
 
   return true;
 }
@@ -1837,8 +1660,7 @@
 
   m_decl_map->DoStructLayout();
 
-  if (log)
-    log->Printf("Element arrangement:");
+  LLDB_LOG(log, "Element arrangement:");
 
   uint32_t num_elements;
   uint32_t element_index;
@@ -1884,9 +1706,9 @@
     }
 
     if (!iter->getName().equals("_cmd")) {
-      m_error_stream.Printf("Internal error [IRForTarget]: Wrapper takes '%s' "
+      m_error_stream.Format("Internal error [IRForTarget]: Wrapper takes '{0}' "
                             "after 'self' argument (should take '_cmd')",
-                            iter->getName().str().c_str());
+                            iter->getName());
 
       return false;
     }
@@ -1905,15 +1727,14 @@
   }
 
   if (!argument->getName().equals("$__lldb_arg")) {
-    m_error_stream.Printf("Internal error [IRForTarget]: Wrapper takes an "
-                          "argument named '%s' instead of the struct pointer",
-                          argument->getName().str().c_str());
+    m_error_stream.Format("Internal error [IRForTarget]: Wrapper takes an "
+                          "argument named '{0}' instead of the struct pointer",
+                          argument->getName());
 
     return false;
   }
 
-  if (log)
-    log->Printf("Arg: \"%s\"", PrintValue(argument).c_str());
+  LLDB_LOG(log, "Arg: \"{0}\"", PrintValue(argument));
 
   BasicBlock &entry_block(llvm_function.getEntryBlock());
   Instruction *FirstEntryInstruction(entry_block.getFirstNonPHIOrDbg());
@@ -1950,13 +1771,11 @@
       return false;
     }
 
-    if (log)
-      log->Printf("  \"%s\" (\"%s\") placed at %" PRIu64, name.GetCString(),
-                  decl->getNameAsString().c_str(), offset);
+    LLDB_LOG(log, "  \"{0}\" (\"{1}\") placed at {2}", name,
+             decl->getNameAsString(), offset);
 
     if (value) {
-      if (log)
-        log->Printf("    Replacing [%s]", PrintValue(value).c_str());
+      LLDB_LOG(log, "    Replacing [{0}]", PrintValue(value));
 
       FunctionValueCache body_result_maker(
           [this, name, offset_type, offset, argument,
@@ -2005,9 +1824,8 @@
         value->replaceAllUsesWith(
             body_result_maker.GetValue(instruction->getParent()->getParent()));
       } else {
-        if (log)
-          log->Printf("Unhandled non-constant type: \"%s\"",
-                      PrintValue(value).c_str());
+        LLDB_LOG(log, "Unhandled non-constant type: \"{0}\"",
+                 PrintValue(value));
         return false;
       }
 
@@ -2016,35 +1834,12 @@
     }
   }
 
-  if (log)
-    log->Printf("Total structure [align %" PRId64 ", size %" PRIu64 "]",
-                (int64_t)alignment, (uint64_t)size);
+  LLDB_LOG(log, "Total structure [align {0}, size {1}]", (int64_t)alignment,
+           (uint64_t)size);
 
   return true;
 }
 
-llvm::Constant *IRForTarget::BuildRelocation(llvm::Type *type,
-                                             uint64_t offset) {
-  llvm::Constant *offset_int = ConstantInt::get(m_intptr_ty, offset);
-
-  llvm::Constant *offset_array[1];
-
-  offset_array[0] = offset_int;
-
-  llvm::ArrayRef<llvm::Constant *> offsets(offset_array, 1);
-  llvm::Type *char_type = llvm::Type::getInt8Ty(m_module->getContext());
-  llvm::Type *char_pointer_type = char_type->getPointerTo();
-
-  llvm::Constant *reloc_placeholder_bitcast =
-      ConstantExpr::getBitCast(m_reloc_placeholder, char_pointer_type);
-  llvm::Constant *reloc_getelementptr = ConstantExpr::getGetElementPtr(
-      char_type, reloc_placeholder_bitcast, offsets);
-  llvm::Constant *reloc_bitcast =
-      ConstantExpr::getBitCast(reloc_getelementptr, type);
-
-  return reloc_bitcast;
-}
-
 bool IRForTarget::runOnModule(Module &llvm_module) {
   lldb_private::Log *log(
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
@@ -2062,7 +1857,7 @@
 
     oss.flush();
 
-    log->Printf("Module as passed in to IRForTarget: \n\"%s\"", s.c_str());
+    LLDB_LOG(log, "Module as passed in to IRForTarget: \n\"{0}\"", s);
   }
 
   Function *const main_function =
@@ -2070,21 +1865,18 @@
                             : m_module->getFunction(m_func_name.GetStringRef());
 
   if (!m_func_name.IsEmpty() && !main_function) {
-    if (log)
-      log->Printf("Couldn't find \"%s()\" in the module",
-                  m_func_name.AsCString());
+    LLDB_LOG(log, "Couldn't find \"{0}()\" in the module", m_func_name);
 
-    m_error_stream.Printf("Internal error [IRForTarget]: Couldn't find wrapper "
-                          "'%s' in the module",
-                          m_func_name.AsCString());
+    m_error_stream.Format("Internal error [IRForTarget]: Couldn't find wrapper "
+                          "'{0}' in the module",
+                          m_func_name);
 
     return false;
   }
 
   if (main_function) {
     if (!FixFunctionLinkage(*main_function)) {
-      if (log)
-        log->Printf("Couldn't fix the linkage for the function");
+      LLDB_LOG(log, "Couldn't fix the linkage for the function");
 
       return false;
     }
@@ -2104,8 +1896,7 @@
 
   if (main_function) {
     if (!CreateResultVariable(*main_function)) {
-      if (log)
-        log->Printf("CreateResultVariable() failed");
+      LLDB_LOG(log, "CreateResultVariable() failed");
 
       // CreateResultVariable() reports its own errors, so we don't do so here
 
@@ -2121,32 +1912,21 @@
 
     oss.flush();
 
-    log->Printf("Module after creating the result variable: \n\"%s\"",
-                s.c_str());
+    LLDB_LOG(log, "Module after creating the result variable: \n\"{0}\"", s);
   }
 
-  for (Module::iterator fi = m_module->begin(), fe = m_module->end(); fi != fe;
-       ++fi) {
-    llvm::Function *function = &*fi;
-
-    if (function->begin() == function->end())
-      continue;
-
-    Function::iterator bbi;
-
-    for (bbi = function->begin(); bbi != function->end(); ++bbi) {
-      if (!RemoveGuards(*bbi)) {
-        if (log)
-          log->Printf("RemoveGuards() failed");
+  for (llvm::Function &function : *m_module) {
+    for (BasicBlock &bb : function) {
+      if (!RemoveGuards(bb)) {
+        LLDB_LOG(log, "RemoveGuards() failed");
 
         // RemoveGuards() reports its own errors, so we don't do so here
 
         return false;
       }
 
-      if (!RewritePersistentAllocs(*bbi)) {
-        if (log)
-          log->Printf("RewritePersistentAllocs() failed");
+      if (!RewritePersistentAllocs(bb)) {
+        LLDB_LOG(log, "RewritePersistentAllocs() failed");
 
         // RewritePersistentAllocs() reports its own errors, so we don't do so
         // here
@@ -2154,9 +1934,8 @@
         return false;
       }
 
-      if (!RemoveCXAAtExit(*bbi)) {
-        if (log)
-          log->Printf("RemoveCXAAtExit() failed");
+      if (!RemoveCXAAtExit(bb)) {
+        LLDB_LOG(log, "RemoveCXAAtExit() failed");
 
         // RemoveCXAAtExit() reports its own errors, so we don't do so here
 
@@ -2170,24 +1949,17 @@
   //
 
   if (!RewriteObjCConstStrings()) {
-    if (log)
-      log->Printf("RewriteObjCConstStrings() failed");
+    LLDB_LOG(log, "RewriteObjCConstStrings() failed");
 
     // RewriteObjCConstStrings() reports its own errors, so we don't do so here
 
     return false;
   }
 
-  for (Module::iterator fi = m_module->begin(), fe = m_module->end(); fi != fe;
-       ++fi) {
-    llvm::Function *function = &*fi;
-
-    for (llvm::Function::iterator bbi = function->begin(),
-                                  bbe = function->end();
-         bbi != bbe; ++bbi) {
-      if (!RewriteObjCSelectors(*bbi)) {
-        if (log)
-          log->Printf("RewriteObjCSelectors() failed");
+  for (llvm::Function &function : *m_module) {
+    for (llvm::BasicBlock &bb : function) {
+      if (!RewriteObjCSelectors(bb)) {
+        LLDB_LOG(log, "RewriteObjCSelectors() failed");
 
         // RewriteObjCSelectors() reports its own errors, so we don't do so
         // here
@@ -2195,9 +1967,8 @@
         return false;
       }
 
-      if (!RewriteObjCClassReferences(*bbi)) {
-        if (log)
-          log->Printf("RewriteObjCClassReferences() failed");
+      if (!RewriteObjCClassReferences(bb)) {
+        LLDB_LOG(log, "RewriteObjCClassReferences() failed");
 
         // RewriteObjCClasses() reports its own errors, so we don't do so here
 
@@ -2206,16 +1977,10 @@
     }
   }
 
-  for (Module::iterator fi = m_module->begin(), fe = m_module->end(); fi != fe;
-       ++fi) {
-    llvm::Function *function = &*fi;
-
-    for (llvm::Function::iterator bbi = function->begin(),
-                                  bbe = function->end();
-         bbi != bbe; ++bbi) {
-      if (!ResolveCalls(*bbi)) {
-        if (log)
-          log->Printf("ResolveCalls() failed");
+  for (llvm::Function &function : *m_module) {
+    for (BasicBlock &bb : function) {
+      if (!ResolveCalls(bb)) {
+        LLDB_LOG(log, "ResolveCalls() failed");
 
         // ResolveCalls() reports its own errors, so we don't do so here
 
@@ -2230,8 +1995,7 @@
 
   if (main_function) {
     if (!ResolveExternals(*main_function)) {
-      if (log)
-        log->Printf("ResolveExternals() failed");
+      LLDB_LOG(log, "ResolveExternals() failed");
 
       // ResolveExternals() reports its own errors, so we don't do so here
 
@@ -2239,8 +2003,7 @@
     }
 
     if (!ReplaceVariables(*main_function)) {
-      if (log)
-        log->Printf("ReplaceVariables() failed");
+      LLDB_LOG(log, "ReplaceVariables() failed");
 
       // ReplaceVariables() reports its own errors, so we don't do so here
 
@@ -2256,7 +2019,7 @@
 
     oss.flush();
 
-    log->Printf("Module after preparing for execution: \n\"%s\"", s.c_str());
+    LLDB_LOG(log, "Module after preparing for execution: \n\"{0}\"", s);
   }
 
   return true;
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
index f87fd8a..262e8ee 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
@@ -10,6 +10,7 @@
 #ifndef liblldb_IRForTarget_h_
 #define liblldb_IRForTarget_h_
 
+#include "lldb/Core/ClangForward.h"
 #include "lldb/Symbol/TaggedASTType.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/Status.h"
@@ -70,15 +71,6 @@
   ///     variables) should be resolved.  If not, only external functions
   ///     are resolved.
   ///
-  /// \param[in] execution_policy
-  ///     Determines whether an IR interpreter can be used to statically
-  ///     evaluate the expression.
-  ///
-  /// \param[in] const_result
-  ///     This variable is populated with the statically-computed result
-  ///     of the function, if it has no side-effects and the result can
-  ///     be computed statically.
-  ///
   /// \param[in] execution_unit
   ///     The holder for raw data associated with the expression.
   ///
@@ -104,10 +96,6 @@
   ///     $__lldb_expr, and that function is passed to the passes one by
   ///     one.
   ///
-  /// \param[in] interpreter_error
-  ///     An error.  If the expression fails to be interpreted, this error
-  ///     is set to a reason why.
-  ///
   /// \return
   ///     True on success; false otherwise
   bool runOnModule(llvm::Module &llvm_module) override;
@@ -141,9 +129,6 @@
 
   /// The top-level pass implementation
   ///
-  /// \param[in] llvm_module
-  ///     The module currently being processed.
-  ///
   /// \param[in] llvm_function
   ///     The function currently being processed.
   ///
@@ -183,12 +168,12 @@
   /// Find the NamedDecl corresponding to a Value.  This interface is exposed
   /// for the IR interpreter.
   ///
+  /// \param[in] global_val
+  ///     The global entity to search for
+  ///
   /// \param[in] module
   ///     The module containing metadata to search
   ///
-  /// \param[in] global
-  ///     The global entity to search for
-  ///
   /// \return
   ///     The corresponding variable declaration
 public:
@@ -286,7 +271,7 @@
 
   /// Replace a single old-style class reference
   ///
-  /// \param[in] selector_load
+  /// \param[in] class_load
   ///     The load of the statically-allocated selector.
   ///
   /// \return
@@ -331,27 +316,6 @@
   /// a call to a function pointer whose value is the address of the function
   /// in the target process.
 
-  /// Write an initializer to a memory array of assumed sufficient size.
-  ///
-  /// \param[in] data
-  ///     A pointer to the data to write to.
-  ///
-  /// \param[in] initializer
-  ///     The initializer itself.
-  ///
-  /// \return
-  ///     True on success; false otherwise
-  bool MaterializeInitializer(uint8_t *data, llvm::Constant *initializer);
-
-  /// Move an internal variable into the static allocation section.
-  ///
-  /// \param[in] global_variable
-  ///     The variable.
-  ///
-  /// \return
-  ///     True on success; false otherwise
-  bool MaterializeInternalVariable(llvm::GlobalVariable *global_variable);
-
   /// Handle a single externally-defined variable
   ///
   /// \param[in] value
@@ -382,7 +346,7 @@
 
   /// Handle all the arguments to a function call
   ///
-  /// \param[in] C
+  /// \param[in] call_inst
   ///     The call instruction.
   ///
   /// \return
@@ -401,8 +365,8 @@
   /// Remove calls to __cxa_atexit, which should never be generated by
   /// expressions.
   ///
-  /// \param[in] call_inst
-  ///     The call instruction.
+  /// \param[in] basic_block
+  ///     The basic block currently being processed.
   ///
   /// \return
   ///     True if the scan was successful; false if some operation
@@ -411,7 +375,7 @@
 
   /// The top-level pass implementation
   ///
-  /// \param[in] basic_block
+  /// \param[in] llvm_function
   ///     The function currently being processed.
   ///
   /// \return
@@ -494,28 +458,9 @@
                             ///pointer (see comments in
                             /// ASTResultSynthesizer::SynthesizeBodyResult)
 
-  llvm::GlobalVariable *m_reloc_placeholder; ///< A placeholder that will be
-                                             ///replaced by a pointer to the
-                                             ///final
-  /// location of the static allocation.
-
-  /// UnfoldConstant operates on a constant [Old] which has just been replaced
-  /// with a value [New].  We assume that new_value has been properly placed
-  /// early in the function, in front of the first instruction in the entry
-  /// basic block [FirstEntryInstruction].
-  ///
-  /// UnfoldConstant reads through the uses of Old and replaces Old in those
-  /// uses with New.  Where those uses are constants, the function generates
-  /// new instructions to compute the result of the new, non-constant
-  /// expression and places them before FirstEntryInstruction.  These
-  /// instructions replace the constant uses, so UnfoldConstant calls itself
-  /// recursively for those.
-  ///
-  /// \param[in] llvm_function
-  ///     The function currently being processed.
-  ///
-  /// \return
-  ///     True on success; false otherwise
+  /// A placeholder that will be replaced by a pointer to the final location of
+  /// the static allocation.
+  llvm::GlobalVariable *m_reloc_placeholder;
 
   class FunctionValueCache {
   public:
@@ -533,32 +478,29 @@
 
   FunctionValueCache m_entry_instruction_finder;
 
+  /// UnfoldConstant operates on a constant [Old] which has just been replaced
+  /// with a value [New].  We assume that new_value has been properly placed
+  /// early in the function, in front of the first instruction in the entry
+  /// basic block [FirstEntryInstruction].
+  ///
+  /// UnfoldConstant reads through the uses of Old and replaces Old in those
+  /// uses with New.  Where those uses are constants, the function generates
+  /// new instructions to compute the result of the new, non-constant
+  /// expression and places them before FirstEntryInstruction.  These
+  /// instructions replace the constant uses, so UnfoldConstant calls itself
+  /// recursively for those.
+  ///
+  /// \return
+  ///     True on success; false otherwise
   static bool UnfoldConstant(llvm::Constant *old_constant,
                              llvm::Function *llvm_function,
                              FunctionValueCache &value_maker,
                              FunctionValueCache &entry_instruction_finder,
                              lldb_private::Stream &error_stream);
 
-  /// Construct a reference to m_reloc_placeholder with a given type and
-  /// offset.  This typically happens after inserting data into
-  /// m_data_allocator.
-  ///
-  /// \param[in] type
-  ///     The type of the value being loaded.
-  ///
-  /// \param[in] offset
-  ///     The offset of the value from the base of m_data_allocator.
-  ///
-  /// \return
-  ///     The Constant for the reference, usually a ConstantExpr.
-  llvm::Constant *BuildRelocation(llvm::Type *type, uint64_t offset);
-
   /// Commit the allocation in m_data_allocator and use its final location to
   /// replace m_reloc_placeholder.
   ///
-  /// \param[in] module
-  ///     The module that m_data_allocator resides in
-  ///
   /// \return
   ///     True on success; false otherwise
   bool CompleteDataAllocation();
diff --git a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h
index 0e959f8..7553860 100644
--- a/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h
+++ b/src/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ModuleDependencyCollector.h
@@ -9,21 +9,23 @@
 #ifndef liblldb_ModuleDependencyCollector_h_
 #define liblldb_ModuleDependencyCollector_h_
 
-#include "lldb/Utility/FileCollector.h"
 #include "clang/Frontend/Utils.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/FileCollector.h"
 
 namespace lldb_private {
 class ModuleDependencyCollectorAdaptor
     : public clang::ModuleDependencyCollector {
 public:
-  ModuleDependencyCollectorAdaptor(FileCollector &file_collector)
+  ModuleDependencyCollectorAdaptor(
+      std::shared_ptr<llvm::FileCollector> file_collector)
       : clang::ModuleDependencyCollector(""), m_file_collector(file_collector) {
   }
 
   void addFile(llvm::StringRef Filename,
                llvm::StringRef FileDst = {}) override {
-    m_file_collector.AddFile(Filename);
+    if (m_file_collector)
+      m_file_collector->addFile(Filename);
   }
 
   bool insertSeen(llvm::StringRef Filename) override { return false; }
@@ -31,7 +33,7 @@
   void writeFileMap() override {}
 
 private:
-  FileCollector &m_file_collector;
+  std::shared_ptr<llvm::FileCollector> m_file_collector;
 };
 } // namespace lldb_private
 
diff --git a/src/llvm-project/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/src/llvm-project/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
index 6323889..ff142e6 100644
--- a/src/llvm-project/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
@@ -850,6 +850,7 @@
 
   /* On Apple iOS et al, the frame pointer register is always r7.
    * Typically on other ARM systems, thumb code uses r7; arm code uses r11.
+   * Windows on ARM, which is in thumb mode, uses r11 though.
    */
 
   uint32_t fp_regnum = 11;
@@ -857,7 +858,7 @@
   if (is_apple)
     fp_regnum = 7;
 
-  if (m_opcode_mode == eModeThumb)
+  if (m_opcode_mode == eModeThumb && !m_arch.GetTriple().isOSWindows())
     fp_regnum = 7;
 
   return fp_regnum;
@@ -879,6 +880,7 @@
 
   /* On Apple iOS et al, the frame pointer register is always r7.
    * Typically on other ARM systems, thumb code uses r7; arm code uses r11.
+   * Windows on ARM, which is in thumb mode, uses r11 though.
    */
 
   uint32_t fp_regnum = dwarf_r11;
@@ -886,7 +888,7 @@
   if (is_apple)
     fp_regnum = dwarf_r7;
 
-  if (m_opcode_mode == eModeThumb)
+  if (m_opcode_mode == eModeThumb && !m_arch.GetTriple().isOSWindows())
     fp_regnum = dwarf_r7;
 
   return fp_regnum;
@@ -1343,6 +1345,8 @@
     EmulateInstruction::Context context;
     if (Rd == 13)
       context.type = EmulateInstruction::eContextAdjustStackPointer;
+    else if (Rd == GetFramePointerRegisterNumber() && Rm == 13)
+      context.type = EmulateInstruction::eContextSetFramePointer;
     else
       context.type = EmulateInstruction::eContextRegisterPlusOffset;
     RegisterInfo dwarf_reg;
@@ -14507,6 +14511,7 @@
   unwind_plan.SetSourceName("EmulateInstructionARM");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolYes);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetReturnAddressRegister(dwarf_lr);
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp b/src/llvm-project/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
index d7e8e04..3e06fca 100644
--- a/src/llvm-project/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
@@ -149,7 +149,8 @@
                                         InstructionType inst_type) {
   if (EmulateInstructionARM64::SupportsEmulatingInstructionsOfTypeStatic(
           inst_type)) {
-    if (arch.GetTriple().getArch() == llvm::Triple::aarch64) {
+    if (arch.GetTriple().getArch() == llvm::Triple::aarch64 ||
+        arch.GetTriple().getArch() == llvm::Triple::aarch64_32) {
       return new EmulateInstructionARM64(arch);
     }
   }
@@ -479,6 +480,7 @@
   unwind_plan.SetSourceName("EmulateInstructionARM64");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolYes);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetReturnAddressRegister(gpr_lr_arm64);
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp b/src/llvm-project/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
index cbf3dda..b55eeb0 100644
--- a/src/llvm-project/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
@@ -28,6 +28,7 @@
 #include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
+#include "llvm/MC/MCTargetOptions.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/TargetSelect.h"
 
@@ -149,7 +150,9 @@
   m_insn_info.reset(target->createMCInstrInfo());
   assert(m_insn_info.get());
 
-  m_asm_info.reset(target->createMCAsmInfo(*m_reg_info, triple.getTriple()));
+  llvm::MCTargetOptions MCOptions;
+  m_asm_info.reset(
+      target->createMCAsmInfo(*m_reg_info, triple.getTriple(), MCOptions));
   m_subtype_info.reset(
       target->createMCSubtargetInfo(triple.getTriple(), cpu, features));
   assert(m_asm_info.get() && m_subtype_info.get());
@@ -978,13 +981,11 @@
   llvm::ArrayRef<uint8_t> raw_insn(data.GetDataStart(), data.GetByteSize());
 
   if (m_use_alt_disaasm)
-    decode_status =
-        m_alt_disasm->getInstruction(mc_insn, next_inst_size, raw_insn,
-                                     inst_addr, llvm::nulls(), llvm::nulls());
+    decode_status = m_alt_disasm->getInstruction(
+        mc_insn, next_inst_size, raw_insn, inst_addr, llvm::nulls());
   else
-    decode_status =
-        m_disasm->getInstruction(mc_insn, next_inst_size, raw_insn, inst_addr,
-                                 llvm::nulls(), llvm::nulls());
+    decode_status = m_disasm->getInstruction(mc_insn, next_inst_size, raw_insn,
+                                             inst_addr, llvm::nulls());
 
   if (decode_status != llvm::MCDisassembler::Success)
     return false;
@@ -1067,11 +1068,11 @@
     llvm::MCDisassembler::DecodeStatus decode_status;
     llvm::ArrayRef<uint8_t> raw_insn(data.GetDataStart(), data.GetByteSize());
     if (m_use_alt_disaasm)
-      decode_status = m_alt_disasm->getInstruction(
-          mc_insn, insn_size, raw_insn, m_addr, llvm::nulls(), llvm::nulls());
+      decode_status = m_alt_disasm->getInstruction(mc_insn, insn_size, raw_insn,
+                                                   m_addr, llvm::nulls());
     else
-      decode_status = m_disasm->getInstruction(
-          mc_insn, insn_size, raw_insn, m_addr, llvm::nulls(), llvm::nulls());
+      decode_status = m_disasm->getInstruction(mc_insn, insn_size, raw_insn,
+                                               m_addr, llvm::nulls());
 
     if (decode_status != llvm::MCDisassembler::Success)
       return false;
@@ -1150,6 +1151,7 @@
   unwind_plan.SetSourceName("EmulateInstructionMIPS");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolYes);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetReturnAddressRegister(dwarf_ra_mips);
 
   return true;
diff --git a/src/llvm-project/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp b/src/llvm-project/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
index 69f0278..3baf942 100644
--- a/src/llvm-project/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
@@ -28,6 +28,7 @@
 #include "llvm/MC/MCInstrInfo.h"
 #include "llvm/MC/MCRegisterInfo.h"
 #include "llvm/MC/MCSubtargetInfo.h"
+#include "llvm/MC/MCTargetOptions.h"
 #include "llvm/Support/TargetRegistry.h"
 #include "llvm/Support/TargetSelect.h"
 
@@ -153,7 +154,9 @@
   m_insn_info.reset(target->createMCInstrInfo());
   assert(m_insn_info.get());
 
-  m_asm_info.reset(target->createMCAsmInfo(*m_reg_info, triple.getTriple()));
+  llvm::MCTargetOptions MCOptions;
+  m_asm_info.reset(
+      target->createMCAsmInfo(*m_reg_info, triple.getTriple(), MCOptions));
   m_subtype_info.reset(
       target->createMCSubtargetInfo(triple.getTriple(), cpu, features));
   assert(m_asm_info.get() && m_subtype_info.get());
@@ -962,8 +965,8 @@
   if (m_opcode.GetData(data)) {
     llvm::MCDisassembler::DecodeStatus decode_status;
     llvm::ArrayRef<uint8_t> raw_insn(data.GetDataStart(), data.GetByteSize());
-    decode_status = m_disasm->getInstruction(
-        mc_insn, insn_size, raw_insn, m_addr, llvm::nulls(), llvm::nulls());
+    decode_status = m_disasm->getInstruction(mc_insn, insn_size, raw_insn,
+                                             m_addr, llvm::nulls());
     if (decode_status != llvm::MCDisassembler::Success)
       return false;
   }
@@ -1042,6 +1045,7 @@
   unwind_plan.SetSourceName("EmulateInstructionMIPS64");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolYes);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetReturnAddressRegister(dwarf_ra_mips64);
 
   return true;
@@ -1359,7 +1363,7 @@
   if (!success)
     return false;
 
-  if (!strcasecmp(op_name, "BEQ") || !strcasecmp(op_name, "BEQL") 
+  if (!strcasecmp(op_name, "BEQ") || !strcasecmp(op_name, "BEQL")
        || !strcasecmp(op_name, "BEQ64") ) {
     if (rs_val == rt_val)
       target = pc + offset;
@@ -1601,7 +1605,7 @@
       target = pc + offset;
     else
       target = pc + 8;
-  } else if (!strcasecmp(op_name, "BLEZL") || !strcasecmp(op_name, "BLEZ") 
+  } else if (!strcasecmp(op_name, "BLEZL") || !strcasecmp(op_name, "BLEZ")
               || !strcasecmp(op_name, "BLEZ64")) {
     if (rs_val <= 0)
       target = pc + offset;
diff --git a/src/llvm-project/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp b/src/llvm-project/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp
index c77fa04..4b8d8dd 100644
--- a/src/llvm-project/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp
@@ -135,6 +135,7 @@
   unwind_plan.SetSourceName("EmulateInstructionPPC64");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolYes);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetReturnAddressRegister(gpr_lr_ppc64le);
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp b/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp
index c8ac046..2e5dd59 100644
--- a/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp
+++ b/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/ASan/ASanRuntime.cpp
@@ -264,7 +264,7 @@
                                      *thread_sp, description, report));
 
     StreamFileSP stream_sp(
-        process_sp->GetTarget().GetDebugger().GetOutputFile());
+        process_sp->GetTarget().GetDebugger().GetOutputStreamSP());
     if (stream_sp) {
       stream_sp->Printf("AddressSanitizer report breakpoint hit. Use 'thread "
                         "info -s' to get extended information about the "
diff --git a/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp b/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
index dfe6131..b73b6c0 100644
--- a/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
+++ b/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/MainThreadChecker/MainThreadCheckerRuntime.cpp
@@ -153,7 +153,7 @@
     user_id_t break_loc_id) {
   assert(baton && "null baton");
   if (!baton)
-    return false; //< false => resume execution.
+    return false; ///< false => resume execution.
 
   MainThreadCheckerRuntime *const instance =
       static_cast<MainThreadCheckerRuntime *>(baton);
@@ -241,30 +241,30 @@
     StructuredData::ObjectSP info) {
   ThreadCollectionSP threads;
   threads = std::make_shared<ThreadCollection>();
-  
+
   ProcessSP process_sp = GetProcessSP();
-  
+
   if (info->GetObjectForDotSeparatedPath("instrumentation_class")
       ->GetStringValue() != "MainThreadChecker")
     return threads;
-  
+
   std::vector<lldb::addr_t> PCs;
   auto trace = info->GetObjectForDotSeparatedPath("trace")->GetAsArray();
   trace->ForEach([&PCs](StructuredData::Object *PC) -> bool {
     PCs.push_back(PC->GetAsInteger()->GetValue());
     return true;
   });
-  
+
   if (PCs.empty())
     return threads;
-  
+
   StructuredData::ObjectSP thread_id_obj =
       info->GetObjectForDotSeparatedPath("tid");
   tid_t tid = thread_id_obj ? thread_id_obj->GetIntegerValue() : 0;
 
   HistoryThread *history_thread = new HistoryThread(*process_sp, tid, PCs);
   ThreadSP new_thread_sp(history_thread);
-  
+
   // Save this in the Process' ExtendedThreadList so a strong pointer retains
   // the object
   process_sp->GetExtendedThreadList().AddThread(new_thread_sp);
diff --git a/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp b/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp
index 89f2139..45a3aee 100644
--- a/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp
+++ b/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/TSan/TSanRuntime.cpp
@@ -863,13 +863,11 @@
               CreateStopReasonWithInstrumentationData(
                   *thread_sp, stop_reason_description, report));
 
-    StreamFileSP stream_sp(
-        process_sp->GetTarget().GetDebugger().GetOutputFile());
-    if (stream_sp) {
-      stream_sp->Printf("ThreadSanitizer report breakpoint hit. Use 'thread "
-                        "info -s' to get extended information about the "
-                        "report.\n");
-    }
+    StreamFile &s = process_sp->GetTarget().GetDebugger().GetOutputStream();
+    s.Printf("ThreadSanitizer report breakpoint hit. Use 'thread "
+             "info -s' to get extended information about the "
+             "report.\n");
+
     return true; // Return true to stop the target
   } else
     return false; // Let target run
diff --git a/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp b/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp
index 367098b..137ecab 100644
--- a/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp
+++ b/src/llvm-project/lldb/source/Plugins/InstrumentationRuntime/UBSan/UBSanRuntime.cpp
@@ -124,7 +124,7 @@
   if (!frame_sp)
     return StructuredData::ObjectSP();
 
-  StreamFileSP Stream(target.GetDebugger().GetOutputFile());
+  StreamFileSP Stream = target.GetDebugger().GetOutputStreamSP();
 
   EvaluateExpressionOptions options;
   options.SetUnwindOnError(true);
@@ -207,7 +207,7 @@
     user_id_t break_loc_id) {
   assert(baton && "null baton");
   if (!baton)
-    return false; //< false => resume execution.
+    return false; ///< false => resume execution.
 
   UndefinedBehaviorSanitizerRuntime *const instance =
       static_cast<UndefinedBehaviorSanitizerRuntime *>(baton);
diff --git a/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/CMakeLists.txt
index 190599c..ecdff28 100644
--- a/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(JITLoaderGDBProperties.inc -gen-lldb-property-defs
+  SOURCE JITLoaderGDBProperties.td
+  TARGET LLDBPluginJITLoaderGDBPropertiesGen)
+
+lldb_tablegen(JITLoaderGDBPropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE JITLoaderGDBProperties.td
+  TARGET LLDBPluginJITLoaderGDBPropertiesEnumGen)
+
 add_lldb_library(lldbPluginJITLoaderGDB PLUGIN
   JITLoaderGDB.cpp
 
@@ -8,7 +16,11 @@
     lldbSymbol
     lldbTarget
     lldbUtility
+    lldbPluginObjectFileMachO
   LINK_COMPONENTS
     Support
   )
 
+add_dependencies(lldbPluginJITLoaderGDB
+  LLDBPluginJITLoaderGDBPropertiesGen
+  LLDBPluginJITLoaderGDBPropertiesEnumGen)
diff --git a/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp b/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
index 140d09e..fff4412 100644
--- a/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
+++ b/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp
@@ -6,9 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-
-#include "llvm/Support/MathExtras.h"
-
+#include "JITLoaderGDB.h"
+#include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
 #include "lldb/Breakpoint/Breakpoint.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -26,8 +25,7 @@
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
-
-#include "JITLoaderGDB.h"
+#include "llvm/Support/MathExtras.h"
 
 #include <memory>
 
@@ -59,21 +57,33 @@
   eEnableJITLoaderGDBOff,
 };
 
-static constexpr OptionEnumValueElement g_enable_jit_loader_gdb_enumerators[] = {
-    {eEnableJITLoaderGDBDefault, "default", "Enable JIT compilation interface "
-     "for all platforms except macOS"},
-    {eEnableJITLoaderGDBOn, "on", "Enable JIT compilation interface"},
-    {eEnableJITLoaderGDBOff, "off", "Disable JIT compilation interface"}
- };
+static constexpr OptionEnumValueElement g_enable_jit_loader_gdb_enumerators[] =
+    {
+        {
+            eEnableJITLoaderGDBDefault,
+            "default",
+            "Enable JIT compilation interface for all platforms except macOS",
+        },
+        {
+            eEnableJITLoaderGDBOn,
+            "on",
+            "Enable JIT compilation interface",
+        },
+        {
+            eEnableJITLoaderGDBOff,
+            "off",
+            "Disable JIT compilation interface",
+        },
+};
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"enable", OptionValue::eTypeEnum, true,
-     eEnableJITLoaderGDBDefault, nullptr,
-     OptionEnumValues(g_enable_jit_loader_gdb_enumerators),
-     "Enable GDB's JIT compilation interface (default: enabled on "
-     "all platforms except macOS)"}};
+#define LLDB_PROPERTIES_jitloadergdb
+#include "JITLoaderGDBProperties.inc"
 
-enum { ePropertyEnable, ePropertyEnableJITBreakpoint };
+enum {
+#define LLDB_PROPERTIES_jitloadergdb
+#include "JITLoaderGDBPropertiesEnum.inc"
+  ePropertyEnableJITBreakpoint
+};
 
 class PluginProperties : public Properties {
 public:
@@ -83,13 +93,13 @@
 
   PluginProperties() {
     m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_jitloadergdb_properties);
   }
 
   EnableJITLoaderGDB GetEnable() const {
     return (EnableJITLoaderGDB)m_collection_sp->GetPropertyAtIndexAsEnumeration(
         nullptr, ePropertyEnable,
-        g_properties[ePropertyEnable].default_uint_value);
+        g_jitloadergdb_properties[ePropertyEnable].default_uint_value);
   }
 };
 
@@ -177,8 +187,8 @@
     return;
 
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_JIT_LOADER));
-  if (log)
-    log->Printf("JITLoaderGDB::%s looking for JIT register hook", __FUNCTION__);
+  LLDB_LOGF(log, "JITLoaderGDB::%s looking for JIT register hook",
+            __FUNCTION__);
 
   addr_t jit_addr = GetSymbolAddress(
       module_list, ConstString("__jit_debug_register_code"), eSymbolTypeAny);
@@ -188,14 +198,12 @@
   m_jit_descriptor_addr = GetSymbolAddress(
       module_list, ConstString("__jit_debug_descriptor"), eSymbolTypeData);
   if (m_jit_descriptor_addr == LLDB_INVALID_ADDRESS) {
-    if (log)
-      log->Printf("JITLoaderGDB::%s failed to find JIT descriptor address",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "JITLoaderGDB::%s failed to find JIT descriptor address",
+              __FUNCTION__);
     return;
   }
 
-  if (log)
-    log->Printf("JITLoaderGDB::%s setting JIT breakpoint", __FUNCTION__);
+  LLDB_LOGF(log, "JITLoaderGDB::%s setting JIT breakpoint", __FUNCTION__);
 
   Breakpoint *bp =
       m_process->GetTarget().CreateBreakpoint(jit_addr, true, false).get();
@@ -211,8 +219,7 @@
                                          user_id_t break_id,
                                          user_id_t break_loc_id) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_JIT_LOADER));
-  if (log)
-    log->Printf("JITLoaderGDB::%s hit JIT breakpoint", __FUNCTION__);
+  LLDB_LOGF(log, "JITLoaderGDB::%s hit JIT breakpoint", __FUNCTION__);
   JITLoaderGDB *instance = static_cast<JITLoaderGDB *>(baton);
   return instance->ReadJITDescriptor(false);
 }
@@ -285,9 +292,8 @@
   size_t bytes_read = m_process->DoReadMemory(m_jit_descriptor_addr, &jit_desc,
                                               jit_desc_size, error);
   if (bytes_read != jit_desc_size || !error.Success()) {
-    if (log)
-      log->Printf("JITLoaderGDB::%s failed to read JIT descriptor",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "JITLoaderGDB::%s failed to read JIT descriptor",
+              __FUNCTION__);
     return false;
   }
 
@@ -301,9 +307,8 @@
   while (jit_relevant_entry != 0) {
     jit_code_entry<ptr_t> jit_entry;
     if (!ReadJITEntry(jit_relevant_entry, m_process, &jit_entry)) {
-      if (log)
-        log->Printf("JITLoaderGDB::%s failed to read JIT entry at 0x%" PRIx64,
-                    __FUNCTION__, jit_relevant_entry);
+      LLDB_LOGF(log, "JITLoaderGDB::%s failed to read JIT entry at 0x%" PRIx64,
+                __FUNCTION__, jit_relevant_entry);
       return false;
     }
 
@@ -312,10 +317,10 @@
     ModuleSP module_sp;
 
     if (jit_action == JIT_REGISTER_FN) {
-      if (log)
-        log->Printf("JITLoaderGDB::%s registering JIT entry at 0x%" PRIx64
-                    " (%" PRIu64 " bytes)",
-                    __FUNCTION__, symbolfile_addr, (uint64_t)symbolfile_size);
+      LLDB_LOGF(log,
+                "JITLoaderGDB::%s registering JIT entry at 0x%" PRIx64
+                " (%" PRIu64 " bytes)",
+                __FUNCTION__, symbolfile_addr, (uint64_t)symbolfile_size);
 
       char jit_name[64];
       snprintf(jit_name, 64, "JIT(0x%" PRIx64 ")", symbolfile_addr);
@@ -331,20 +336,16 @@
         module_sp->GetObjectFile()->GetSymtab();
 
         m_jit_objects.insert(std::make_pair(symbolfile_addr, module_sp));
-        if (module_sp->GetObjectFile()->GetPluginName() ==
-            ConstString("mach-o")) {
-          ObjectFile *image_object_file = module_sp->GetObjectFile();
-          if (image_object_file) {
-            const SectionList *section_list =
-                image_object_file->GetSectionList();
-            if (section_list) {
-              uint64_t vmaddrheuristic = 0;
-              uint64_t lower = (uint64_t)-1;
-              uint64_t upper = 0;
-              updateSectionLoadAddress(*section_list, target, symbolfile_addr,
-                                       symbolfile_size, vmaddrheuristic, lower,
-                                       upper);
-            }
+        if (auto image_object_file =
+                llvm::dyn_cast<ObjectFileMachO>(module_sp->GetObjectFile())) {
+          const SectionList *section_list = image_object_file->GetSectionList();
+          if (section_list) {
+            uint64_t vmaddrheuristic = 0;
+            uint64_t lower = (uint64_t)-1;
+            uint64_t upper = 0;
+            updateSectionLoadAddress(*section_list, target, symbolfile_addr,
+                                     symbolfile_size, vmaddrheuristic, lower,
+                                     upper);
           }
         } else {
           bool changed = false;
@@ -357,15 +358,14 @@
         module_list.Append(module_sp);
         target.ModulesDidLoad(module_list);
       } else {
-        if (log)
-          log->Printf("JITLoaderGDB::%s failed to load module for "
-                      "JIT entry at 0x%" PRIx64,
-                      __FUNCTION__, symbolfile_addr);
+        LLDB_LOGF(log,
+                  "JITLoaderGDB::%s failed to load module for "
+                  "JIT entry at 0x%" PRIx64,
+                  __FUNCTION__, symbolfile_addr);
       }
     } else if (jit_action == JIT_UNREGISTER_FN) {
-      if (log)
-        log->Printf("JITLoaderGDB::%s unregistering JIT entry at 0x%" PRIx64,
-                    __FUNCTION__, symbolfile_addr);
+      LLDB_LOGF(log, "JITLoaderGDB::%s unregistering JIT entry at 0x%" PRIx64,
+                __FUNCTION__, symbolfile_addr);
 
       JITObjectMap::iterator it = m_jit_objects.find(symbolfile_addr);
       if (it != m_jit_objects.end()) {
@@ -458,8 +458,8 @@
   SymbolContextList target_symbols;
   Target &target = m_process->GetTarget();
 
-  if (!module_list.FindSymbolsWithNameAndType(name, symbol_type,
-                                              target_symbols))
+  module_list.FindSymbolsWithNameAndType(name, symbol_type, target_symbols);
+  if (target_symbols.IsEmpty())
     return LLDB_INVALID_ADDRESS;
 
   SymbolContext sym_ctx;
diff --git a/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDBProperties.td b/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDBProperties.td
new file mode 100644
index 0000000..0493838
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDBProperties.td
@@ -0,0 +1,9 @@
+include "../../../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "jitloadergdb" in {
+  def Enable: Property<"enable", "Enum">,
+    Global,
+    DefaultEnumValue<"eEnableJITLoaderGDBDefault">,
+    EnumValues<"OptionEnumValues(g_enable_jit_loader_gdb_enumerators)">,
+    Desc<"Enable GDB's JIT compilation interface (default: enabled on all platforms except macOS)">;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
index 87b5b59..5cfd978 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp
@@ -17,6 +17,7 @@
 #include "lldb/Target/Target.h"
 
 #include "lldb/Utility/LLDBAssert.h"
+#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -39,16 +40,17 @@
       return;
     }
 
-    Status err;
-    TypeSystem *type_system = target_sp->GetScratchTypeSystemForLanguage(
-        &err, lldb::eLanguageTypeC_plus_plus);
-
-    if (!err.Success() || !type_system) {
+    auto type_system_or_err = target_sp->GetScratchTypeSystemForLanguage(
+        lldb::eLanguageTypeC_plus_plus);
+    if (auto err = type_system_or_err.takeError()) {
+      LLDB_LOG_ERROR(
+          lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS),
+          std::move(err), "Failed to get scratch ClangASTContext");
       return;
     }
 
     ClangASTContext *clang_ast_context =
-        llvm::dyn_cast<ClangASTContext>(type_system);
+        llvm::dyn_cast<ClangASTContext>(&type_system_or_err.get());
 
     if (!clang_ast_context) {
       return;
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
index 44b9e5e..4385a60 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
@@ -19,6 +19,7 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Demangle/ItaniumDemangle.h"
 
+#include "lldb/Core/Mangled.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/UniqueCStringMap.h"
 #include "lldb/DataFormatters/CXXFunctionPointer.h"
@@ -238,18 +239,16 @@
   return res;
 }
 
-bool CPlusPlusLanguage::IsCPPMangledName(const char *name) {
+bool CPlusPlusLanguage::IsCPPMangledName(llvm::StringRef name) {
   // FIXME!! we should really run through all the known C++ Language plugins
   // and ask each one if this is a C++ mangled name
 
-  if (name == nullptr)
+  Mangled::ManglingScheme scheme = Mangled::GetManglingScheme(name);
+
+  if (scheme == Mangled::eManglingSchemeNone)
     return false;
 
-  // MSVC style mangling
-  if (name[0] == '?')
-    return true;
-
-  return (name[0] != '\0' && name[0] == '_' && name[1] == 'Z');
+  return true;
 }
 
 bool CPlusPlusLanguage::ExtractContextAndIdentifier(
@@ -285,46 +284,34 @@
   }
 };
 
-/// Given a mangled function `Mangled`, replace all the primitive function type
-/// arguments of `Search` with type `Replace`.
-class TypeSubstitutor
-    : public llvm::itanium_demangle::AbstractManglingParser<TypeSubstitutor,
+template <typename Derived>
+class ManglingSubstitutor
+    : public llvm::itanium_demangle::AbstractManglingParser<Derived,
                                                             NodeAllocator> {
-  /// Input character until which we have constructed the respective output
-  /// already
-  const char *Written;
+  using Base =
+      llvm::itanium_demangle::AbstractManglingParser<Derived, NodeAllocator>;
 
-  llvm::StringRef Search;
-  llvm::StringRef Replace;
-  llvm::SmallString<128> Result;
+public:
+  ManglingSubstitutor() : Base(nullptr, nullptr) {}
 
-  /// Whether we have performed any substitutions.
-  bool Substituted;
+  template<typename... Ts>
+  ConstString substitute(llvm::StringRef Mangled, Ts &&... Vals) {
+    this->getDerived().reset(Mangled, std::forward<Ts>(Vals)...);
+    return substituteImpl(Mangled);
+  }
 
-  void reset(llvm::StringRef Mangled, llvm::StringRef Search,
-             llvm::StringRef Replace) {
-    AbstractManglingParser::reset(Mangled.begin(), Mangled.end());
+
+protected:
+  void reset(llvm::StringRef Mangled) {
+    Base::reset(Mangled.begin(), Mangled.end());
     Written = Mangled.begin();
-    this->Search = Search;
-    this->Replace = Replace;
     Result.clear();
     Substituted = false;
   }
 
-  void appendUnchangedInput() {
-    Result += llvm::StringRef(Written, First - Written);
-    Written = First;
-  }
-
-public:
-  TypeSubstitutor() : AbstractManglingParser(nullptr, nullptr) {}
-
-  ConstString substitute(llvm::StringRef Mangled, llvm::StringRef From,
-                         llvm::StringRef To) {
+  ConstString substituteImpl(llvm::StringRef Mangled) {
     Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE);
-
-    reset(Mangled, From, To);
-    if (parse() == nullptr) {
+    if (this->parse() == nullptr) {
       LLDB_LOG(log, "Failed to substitute mangling in {0}", Mangled);
       return ConstString();
     }
@@ -337,20 +324,69 @@
     return ConstString(Result);
   }
 
-  llvm::itanium_demangle::Node *parseType() {
-    if (llvm::StringRef(First, numLeft()).startswith(Search)) {
-      // We found a match. Append unmodified input up to this point.
-      appendUnchangedInput();
+  void trySubstitute(llvm::StringRef From, llvm::StringRef To) {
+    if (!llvm::StringRef(currentParserPos(), this->numLeft()).startswith(From))
+      return;
 
-      // And then perform the replacement.
-      Result += Replace;
-      Written += Search.size();
-      Substituted = true;
-    }
-    return AbstractManglingParser::parseType();
+    // We found a match. Append unmodified input up to this point.
+    appendUnchangedInput();
+
+    // And then perform the replacement.
+    Result += To;
+    Written += From.size();
+    Substituted = true;
+  }
+
+private:
+  /// Input character until which we have constructed the respective output
+  /// already.
+  const char *Written;
+
+  llvm::SmallString<128> Result;
+
+  /// Whether we have performed any substitutions.
+  bool Substituted;
+
+  const char *currentParserPos() const { return this->First; }
+
+  void appendUnchangedInput() {
+    Result +=
+        llvm::StringRef(Written, std::distance(Written, currentParserPos()));
+    Written = currentParserPos();
+  }
+
+};
+
+/// Given a mangled function `Mangled`, replace all the primitive function type
+/// arguments of `Search` with type `Replace`.
+class TypeSubstitutor : public ManglingSubstitutor<TypeSubstitutor> {
+  llvm::StringRef Search;
+  llvm::StringRef Replace;
+
+public:
+  void reset(llvm::StringRef Mangled, llvm::StringRef Search,
+             llvm::StringRef Replace) {
+    ManglingSubstitutor::reset(Mangled);
+    this->Search = Search;
+    this->Replace = Replace;
+  }
+
+  llvm::itanium_demangle::Node *parseType() {
+    trySubstitute(Search, Replace);
+    return ManglingSubstitutor::parseType();
   }
 };
-}
+
+class CtorDtorSubstitutor : public ManglingSubstitutor<CtorDtorSubstitutor> {
+public:
+  llvm::itanium_demangle::Node *
+  parseCtorDtorName(llvm::itanium_demangle::Node *&SoFar, NameState *State) {
+    trySubstitute("C1", "C2");
+    trySubstitute("D1", "D2");
+    return ManglingSubstitutor::parseCtorDtorName(SoFar, State);
+  }
+};
+} // namespace
 
 uint32_t CPlusPlusLanguage::FindAlternateFunctionManglings(
     const ConstString mangled_name, std::set<ConstString> &alternates) {
@@ -398,6 +434,10 @@
           TS.substitute(mangled_name.GetStringRef(), "y", "m"))
     alternates.insert(ulong_fixup);
 
+  if (ConstString ctor_fixup =
+          CtorDtorSubstitutor().substitute(mangled_name.GetStringRef()))
+    alternates.insert(ctor_fixup);
+
   return alternates.size() - start_size;
 }
 
@@ -426,6 +466,13 @@
                             "std::__[[:alnum:]]+::char_traits<char>, "
                             "std::__[[:alnum:]]+::allocator<char> >$"),
                 stl_summary_flags, true);
+  AddCXXSummary(cpp_category_sp,
+                lldb_private::formatters::LibcxxStringSummaryProviderASCII,
+                "std::string summary provider",
+                ConstString("^std::__[[:alnum:]]+::basic_string<unsigned char, "
+                            "std::__[[:alnum:]]+::char_traits<unsigned char>, "
+                            "std::__[[:alnum:]]+::allocator<unsigned char> >$"),
+                stl_summary_flags, true);
 
   AddCXXSummary(cpp_category_sp,
                 lldb_private::formatters::LibcxxStringSummaryProviderUTF16,
@@ -486,8 +533,11 @@
       cpp_category_sp,
       lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator,
       "libc++ std::list synthetic children",
-      ConstString("^std::__[[:alnum:]]+::list<.+>(( )?&)?$"), stl_deref_flags,
-      true);
+      // A POSIX variant of: "^std::__(?!cxx11:)[[:alnum:]]+::list<.+>(( )?&)?$"
+      // so that it does not clash with: "^std::(__cxx11::)?list<.+>(( )?&)?$"
+      ConstString("^std::__([A-Zabd-z0-9]|cx?[A-Za-wyz0-9]|cxx1?[A-Za-z02-9]|"
+                  "cxx11[[:alnum:]])[[:alnum:]]*::list<.+>(( )?&)?$"),
+      stl_deref_flags, true);
   AddCXXSynthetic(
       cpp_category_sp,
       lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator,
@@ -547,8 +597,8 @@
       ConstString("^std::__[[:alnum:]]+::atomic<.+>$"), stl_synth_flags, true);
 
   cpp_category_sp->GetRegexTypeSyntheticsContainer()->Add(
-      RegularExpressionSP(new RegularExpression(
-          llvm::StringRef("^(std::__[[:alnum:]]+::)deque<.+>(( )?&)?$"))),
+      RegularExpression(
+          llvm::StringRef("^(std::__[[:alnum:]]+::)deque<.+>(( )?&)?$")),
       SyntheticChildrenSP(new ScriptedSyntheticChildren(
           stl_synth_flags,
           "lldb.formatters.cpp.libcxx.stddeque_SynthProvider")));
@@ -565,12 +615,11 @@
       "weak_ptr synthetic children",
       ConstString("^(std::__[[:alnum:]]+::)weak_ptr<.+>(( )?&)?$"),
       stl_synth_flags, true);
-
-  AddCXXSummary(
-      cpp_category_sp, lldb_private::formatters::LibcxxFunctionSummaryProvider,
-      "libc++ std::function summary provider",
-      ConstString("^std::__[[:alnum:]]+::function<.+>$"), stl_summary_flags,
-      true);
+  AddCXXSummary(cpp_category_sp,
+                lldb_private::formatters::LibcxxFunctionSummaryProvider,
+                "libc++ std::function summary provider",
+                ConstString("^std::__[[:alnum:]]+::function<.+>$"),
+                stl_summary_flags, true);
 
   stl_summary_flags.SetDontShowChildren(false);
   stl_summary_flags.SetSkipPointers(false);
@@ -589,11 +638,14 @@
                 "libc++ std::list summary provider",
                 ConstString("^std::__[[:alnum:]]+::forward_list<.+>(( )?&)?$"),
                 stl_summary_flags, true);
-  AddCXXSummary(cpp_category_sp,
-                lldb_private::formatters::LibcxxContainerSummaryProvider,
-                "libc++ std::list summary provider",
-                ConstString("^std::__[[:alnum:]]+::list<.+>(( )?&)?$"),
-                stl_summary_flags, true);
+  AddCXXSummary(
+      cpp_category_sp, lldb_private::formatters::LibcxxContainerSummaryProvider,
+      "libc++ std::list summary provider",
+      // A POSIX variant of: "^std::__(?!cxx11:)[[:alnum:]]+::list<.+>(( )?&)?$"
+      // so that it does not clash with: "^std::(__cxx11::)?list<.+>(( )?&)?$"
+      ConstString("^std::__([A-Zabd-z0-9]|cx?[A-Za-wyz0-9]|cxx1?[A-Za-z02-9]|"
+                  "cxx11[[:alnum:]])[[:alnum:]]*::list<.+>(( )?&)?$"),
+      stl_summary_flags, true);
   AddCXXSummary(cpp_category_sp,
                 lldb_private::formatters::LibcxxContainerSummaryProvider,
                 "libc++ std::map summary provider",
@@ -719,6 +771,10 @@
       ConstString("std::__cxx11::basic_string<char, std::char_traits<char>, "
                   "std::allocator<char> >"),
       cxx11_string_summary_sp);
+  cpp_category_sp->GetTypeSummariesContainer()->Add(
+      ConstString("std::__cxx11::basic_string<unsigned char, std::char_traits<unsigned char>, "
+                  "std::allocator<unsigned char> >"),
+      cxx11_string_summary_sp);
 
   // making sure we force-pick the summary for printing wstring (_M_p is a
   // wchar_t*)
@@ -750,38 +806,32 @@
       false);
 
   cpp_category_sp->GetRegexTypeSyntheticsContainer()->Add(
-      RegularExpressionSP(
-          new RegularExpression(llvm::StringRef("^std::vector<.+>(( )?&)?$"))),
+      RegularExpression(llvm::StringRef("^std::vector<.+>(( )?&)?$")),
       SyntheticChildrenSP(new ScriptedSyntheticChildren(
           stl_synth_flags,
           "lldb.formatters.cpp.gnu_libstdcpp.StdVectorSynthProvider")));
   cpp_category_sp->GetRegexTypeSyntheticsContainer()->Add(
-      RegularExpressionSP(
-          new RegularExpression(llvm::StringRef("^std::map<.+> >(( )?&)?$"))),
+      RegularExpression(llvm::StringRef("^std::map<.+> >(( )?&)?$")),
       SyntheticChildrenSP(new ScriptedSyntheticChildren(
           stl_synth_flags,
           "lldb.formatters.cpp.gnu_libstdcpp.StdMapSynthProvider")));
   cpp_category_sp->GetRegexTypeSyntheticsContainer()->Add(
-      RegularExpressionSP(new RegularExpression(
-          llvm::StringRef("^std::(__cxx11::)?list<.+>(( )?&)?$"))),
+      RegularExpression(llvm::StringRef("^std::(__cxx11::)?list<.+>(( )?&)?$")),
       SyntheticChildrenSP(new ScriptedSyntheticChildren(
           stl_synth_flags,
           "lldb.formatters.cpp.gnu_libstdcpp.StdListSynthProvider")));
   stl_summary_flags.SetDontShowChildren(false);
   stl_summary_flags.SetSkipPointers(true);
   cpp_category_sp->GetRegexTypeSummariesContainer()->Add(
-      RegularExpressionSP(
-          new RegularExpression(llvm::StringRef("^std::vector<.+>(( )?&)?$"))),
+      RegularExpression(llvm::StringRef("^std::vector<.+>(( )?&)?$")),
       TypeSummaryImplSP(
           new StringSummaryFormat(stl_summary_flags, "size=${svar%#}")));
   cpp_category_sp->GetRegexTypeSummariesContainer()->Add(
-      RegularExpressionSP(
-          new RegularExpression(llvm::StringRef("^std::map<.+> >(( )?&)?$"))),
+      RegularExpression(llvm::StringRef("^std::map<.+> >(( )?&)?$")),
       TypeSummaryImplSP(
           new StringSummaryFormat(stl_summary_flags, "size=${svar%#}")));
   cpp_category_sp->GetRegexTypeSummariesContainer()->Add(
-      RegularExpressionSP(new RegularExpression(
-          llvm::StringRef("^std::(__cxx11::)?list<.+>(( )?&)?$"))),
+      RegularExpression(llvm::StringRef("^std::(__cxx11::)?list<.+>(( )?&)?$")),
       TypeSummaryImplSP(
           new StringSummaryFormat(stl_summary_flags, "size=${svar%#}")));
 
@@ -860,6 +910,14 @@
   // FIXME because of a bug in the FormattersContainer we need to add a summary
   // for both X* and const X* (<rdar://problem/12717717>)
   AddCXXSummary(
+      cpp_category_sp, lldb_private::formatters::Char8StringSummaryProvider,
+      "char8_t * summary provider", ConstString("char8_t *"), string_flags);
+  AddCXXSummary(cpp_category_sp,
+                lldb_private::formatters::Char8StringSummaryProvider,
+                "char8_t [] summary provider",
+                ConstString("char8_t \\[[0-9]+\\]"), string_array_flags, true);
+
+  AddCXXSummary(
       cpp_category_sp, lldb_private::formatters::Char16StringSummaryProvider,
       "char16_t * summary provider", ConstString("char16_t *"), string_flags);
   AddCXXSummary(cpp_category_sp,
@@ -896,6 +954,9 @@
       .SetHideItemNames(true)
       .SetShowMembersOneLiner(false);
 
+  AddCXXSummary(cpp_category_sp, lldb_private::formatters::Char8SummaryProvider,
+                "char8_t summary provider", ConstString("char8_t"),
+                widechar_flags);
   AddCXXSummary(
       cpp_category_sp, lldb_private::formatters::Char16SummaryProvider,
       "char16_t summary provider", ConstString("char16_t"), widechar_flags);
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
index d30e560..4ed45bc9 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
@@ -101,7 +101,7 @@
 
   static lldb_private::ConstString GetPluginNameStatic();
 
-  static bool IsCPPMangledName(const char *name);
+  static bool IsCPPMangledName(llvm::StringRef name);
 
   // Extract C++ context and identifier from a string using heuristic matching
   // (as opposed to
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp
index 9590790..3ea7589 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp
@@ -32,6 +32,31 @@
 using namespace lldb_private;
 using namespace lldb_private::formatters;
 
+bool lldb_private::formatters::Char8StringSummaryProvider(
+    ValueObject &valobj, Stream &stream, const TypeSummaryOptions &) {
+  ProcessSP process_sp = valobj.GetProcessSP();
+  if (!process_sp)
+    return false;
+
+  lldb::addr_t valobj_addr = GetArrayAddressOrPointerValue(valobj);
+  if (valobj_addr == 0 || valobj_addr == LLDB_INVALID_ADDRESS)
+    return false;
+
+  StringPrinter::ReadStringAndDumpToStreamOptions options(valobj);
+  options.SetLocation(valobj_addr);
+  options.SetProcessSP(process_sp);
+  options.SetStream(&stream);
+  options.SetPrefixToken("u8");
+
+  if (!StringPrinter::ReadStringAndDumpToStream<
+          StringPrinter::StringElementType::UTF8>(options)) {
+    stream.Printf("Summary Unavailable");
+    return true;
+  }
+
+  return true;
+}
+
 bool lldb_private::formatters::Char16StringSummaryProvider(
     ValueObject &valobj, Stream &stream, const TypeSummaryOptions &) {
   ProcessSP process_sp = valobj.GetProcessSP();
@@ -128,6 +153,32 @@
   return true;
 }
 
+bool lldb_private::formatters::Char8SummaryProvider(
+    ValueObject &valobj, Stream &stream, const TypeSummaryOptions &) {
+  DataExtractor data;
+  Status error;
+  valobj.GetData(data, error);
+
+  if (error.Fail())
+    return false;
+
+  std::string value;
+  valobj.GetValueAsCString(lldb::eFormatUnicode8, value);
+  if (!value.empty())
+    stream.Printf("%s ", value.c_str());
+
+  StringPrinter::ReadBufferAndDumpToStreamOptions options(valobj);
+  options.SetData(data);
+  options.SetStream(&stream);
+  options.SetPrefixToken("u8");
+  options.SetQuote('\'');
+  options.SetSourceSize(1);
+  options.SetBinaryZeroIsTerminator(false);
+
+  return StringPrinter::ReadBufferAndDumpToStream<
+      StringPrinter::StringElementType::UTF8>(options);
+}
+
 bool lldb_private::formatters::Char16SummaryProvider(
     ValueObject &valobj, Stream &stream, const TypeSummaryOptions &) {
   DataExtractor data;
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.h b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.h
index 92bef23..35498b3 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.h
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.h
@@ -16,6 +16,9 @@
 
 namespace lldb_private {
 namespace formatters {
+bool Char8StringSummaryProvider(ValueObject &valobj, Stream &stream,
+                                const TypeSummaryOptions &options); // char8_t*
+
 bool Char16StringSummaryProvider(
     ValueObject &valobj, Stream &stream,
     const TypeSummaryOptions &options); // char16_t* and unichar*
@@ -27,6 +30,9 @@
 bool WCharStringSummaryProvider(ValueObject &valobj, Stream &stream,
                                 const TypeSummaryOptions &options); // wchar_t*
 
+bool Char8SummaryProvider(ValueObject &valobj, Stream &stream,
+                          const TypeSummaryOptions &options); // char8_t
+
 bool Char16SummaryProvider(
     ValueObject &valobj, Stream &stream,
     const TypeSummaryOptions &options); // char16_t and unichar
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
index abe8903..ecadaef 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp
@@ -572,10 +572,13 @@
   location_sp->GetPointeeData(extractor, 0, size);
 
   // std::wstring::size() is measured in 'characters', not bytes
-  auto wchar_t_size = valobj.GetTargetSP()
-                          ->GetScratchClangASTContext()
-                          ->GetBasicType(lldb::eBasicTypeWChar)
-                          .GetByteSize(nullptr);
+  ClangASTContext *ast_context =
+      ClangASTContext::GetScratch(*valobj.GetTargetSP());
+  if (!ast_context)
+    return false;
+
+  auto wchar_t_size =
+      ast_context->GetBasicType(lldb::eBasicTypeWChar).GetByteSize(nullptr);
   if (!wchar_t_size)
     return false;
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
index 815dafb..78c453c 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxBitset.cpp
@@ -30,8 +30,15 @@
   ValueObjectSP GetChildAtIndex(size_t idx) override;
 
 private:
+  // The lifetime of a ValueObject and all its derivative ValueObjects
+  // (children, clones, etc.) is managed by a ClusterManager. These
+  // objects are only destroyed when every shared pointer to any of them
+  // is destroyed, so we must not store a shared pointer to any ValueObject
+  // derived from our backend ValueObject (since we're in the same cluster).
+  // Value objects created from raw data (i.e. in a different cluster) must
+  // be referenced via shared pointer to keep them alive, however.
   std::vector<ValueObjectSP> m_elements;
-  ValueObjectSP m_first;
+  ValueObject* m_first = nullptr;
   CompilerType m_bool_type;
   ByteOrder m_byte_order = eByteOrderInvalid;
   uint8_t m_byte_size = 0;
@@ -50,7 +57,7 @@
 
 bool BitsetFrontEnd::Update() {
   m_elements.clear();
-  m_first.reset();
+  m_first = nullptr;
 
   TargetSP target_sp = m_backend.GetTargetSP();
   if (!target_sp)
@@ -63,7 +70,7 @@
 
   m_elements.assign(size, ValueObjectSP());
 
-  m_first = m_backend.GetChildMemberWithName(ConstString("__first_"), true);
+  m_first = m_backend.GetChildMemberWithName(ConstString("__first_"), true).get();
   return false;
 }
 
@@ -86,7 +93,7 @@
     chunk = m_first->GetChildAtIndex(idx / *bit_size, true);
   } else {
     type = m_first->GetCompilerType();
-    chunk = m_first;
+    chunk = m_first->GetSP();
   }
   if (!type || !chunk)
     return {};
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
index 619c718..f6d8d4d 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
@@ -94,6 +94,8 @@
   MapIterator(ValueObject *entry, size_t depth = 0)
       : m_entry(entry), m_max_depth(depth), m_error(false) {}
 
+  MapIterator &operator=(const MapIterator &) = default;
+
   ValueObjectSP value() { return m_entry.GetEntry(); }
 
   ValueObjectSP advance(size_t count) {
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp
index 1160215..b1ad171 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxOptional.cpp
@@ -31,7 +31,6 @@
 
 private:
   size_t m_size = 0;
-  ValueObjectSP m_base_sp;
 };
 } // namespace
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp
index 4b72089..2f06d68 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxQueue.cpp
@@ -38,16 +38,21 @@
   }
 
 private:
-  ValueObjectSP m_container_sp;
+  // The lifetime of a ValueObject and all its derivative ValueObjects
+  // (children, clones, etc.) is managed by a ClusterManager. These
+  // objects are only destroyed when every shared pointer to any of them
+  // is destroyed, so we must not store a shared pointer to any ValueObject
+  // derived from our backend ValueObject (since we're in the same cluster).
+  ValueObject* m_container_sp = nullptr;
 };
 } // namespace
 
 bool QueueFrontEnd::Update() {
-  m_container_sp.reset();
+  m_container_sp = nullptr;
   ValueObjectSP c_sp = m_backend.GetChildMemberWithName(ConstString("c"), true);
   if (!c_sp)
     return false;
-  m_container_sp = c_sp->GetSyntheticValue();
+  m_container_sp = c_sp->GetSyntheticValue().get();
   return false;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp
index 8da7460..45294e2 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxTuple.cpp
@@ -30,47 +30,58 @@
   ValueObjectSP GetChildAtIndex(size_t idx) override;
 
 private:
-  std::vector<ValueObjectSP> m_elements;
-  ValueObjectSP m_base_sp;
+  // The lifetime of a ValueObject and all its derivative ValueObjects
+  // (children, clones, etc.) is managed by a ClusterManager. These
+  // objects are only destroyed when every shared pointer to any of them
+  // is destroyed, so we must not store a shared pointer to any ValueObject
+  // derived from our backend ValueObject (since we're in the same cluster).
+  std::vector<ValueObject*> m_elements;
+  ValueObject* m_base = nullptr;
 };
 }
 
 bool TupleFrontEnd::Update() {
   m_elements.clear();
-  m_base_sp = m_backend.GetChildMemberWithName(ConstString("__base_"), true);
-  if (! m_base_sp) {
+  m_base = nullptr;
+
+  ValueObjectSP base_sp;
+  base_sp = m_backend.GetChildMemberWithName(ConstString("__base_"), true);
+  if (!base_sp) {
     // Pre r304382 name of the base element.
-    m_base_sp = m_backend.GetChildMemberWithName(ConstString("base_"), true);
+    base_sp = m_backend.GetChildMemberWithName(ConstString("base_"), true);
   }
-  if (! m_base_sp)
+  if (!base_sp)
     return false;
-  m_elements.assign(m_base_sp->GetCompilerType().GetNumDirectBaseClasses(),
-                    ValueObjectSP());
+  m_base = base_sp.get();
+  m_elements.assign(base_sp->GetCompilerType().GetNumDirectBaseClasses(),
+                    nullptr);
   return false;
 }
 
 ValueObjectSP TupleFrontEnd::GetChildAtIndex(size_t idx) {
   if (idx >= m_elements.size())
     return ValueObjectSP();
-  if (!m_base_sp)
+  if (!m_base)
     return ValueObjectSP();
   if (m_elements[idx])
-    return m_elements[idx];
+    return m_elements[idx]->GetSP();
 
   CompilerType holder_type =
-      m_base_sp->GetCompilerType().GetDirectBaseClassAtIndex(idx, nullptr);
+      m_base->GetCompilerType().GetDirectBaseClassAtIndex(idx, nullptr);
   if (!holder_type)
     return ValueObjectSP();
-  ValueObjectSP holder_sp = m_base_sp->GetChildAtIndex(idx, true);
+  ValueObjectSP holder_sp = m_base->GetChildAtIndex(idx, true);
   if (!holder_sp)
     return ValueObjectSP();
 
   ValueObjectSP elem_sp = holder_sp->GetChildAtIndex(0, true);
   if (elem_sp)
     m_elements[idx] =
-        elem_sp->Clone(ConstString(llvm::formatv("[{0}]", idx).str()));
+        elem_sp->Clone(ConstString(llvm::formatv("[{0}]", idx).str())).get();
 
-  return m_elements[idx];
+  if (m_elements[idx])
+    return m_elements[idx]->GetSP();
+  return ValueObjectSP();
 }
 
 SyntheticChildrenFrontEnd *
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
index 491cf04..62945bd 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibCxxVariant.cpp
@@ -184,7 +184,6 @@
 
 private:
   size_t m_size = 0;
-  ValueObjectSP m_base_sp;
 };
 } // namespace
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp
index 66624e5..0ac7b8f 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibStdcppTuple.cpp
@@ -37,7 +37,12 @@
   size_t GetIndexOfChildWithName(ConstString name) override;
 
 private:
-  std::vector<ValueObjectSP> m_members;
+  // The lifetime of a ValueObject and all its derivative ValueObjects
+  // (children, clones, etc.) is managed by a ClusterManager. These
+  // objects are only destroyed when every shared pointer to any of them
+  // is destroyed, so we must not store a shared pointer to any ValueObject
+  // derived from our backend ValueObject (since we're in the same cluster).
+  std::vector<ValueObject*> m_members;
 };
 
 } // end of anonymous namespace
@@ -72,7 +77,7 @@
         if (value_sp) {
           StreamString name;
           name.Printf("[%zd]", m_members.size());
-          m_members.push_back(value_sp->Clone(ConstString(name.GetString())));
+          m_members.push_back(value_sp->Clone(ConstString(name.GetString())).get());
         }
       }
     }
@@ -85,8 +90,8 @@
 
 lldb::ValueObjectSP
 LibStdcppTupleSyntheticFrontEnd::GetChildAtIndex(size_t idx) {
-  if (idx < m_members.size())
-    return m_members[idx];
+  if (idx < m_members.size() && m_members[idx])
+    return m_members[idx]->GetSP();
   return lldb::ValueObjectSP();
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
index 3860f96..cceb511 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
@@ -39,9 +39,14 @@
   bool GetSummary(Stream &stream, const TypeSummaryOptions &options);
 
 private:
-  ValueObjectSP m_ptr_obj;
-  ValueObjectSP m_obj_obj;
-  ValueObjectSP m_del_obj;
+  // The lifetime of a ValueObject and all its derivative ValueObjects
+  // (children, clones, etc.) is managed by a ClusterManager. These
+  // objects are only destroyed when every shared pointer to any of them
+  // is destroyed, so we must not store a shared pointer to any ValueObject
+  // derived from our backend ValueObject (since we're in the same cluster).
+  ValueObject* m_ptr_obj = nullptr;
+  ValueObject* m_obj_obj = nullptr;
+  ValueObject* m_del_obj = nullptr;
 
   ValueObjectSP GetTuple();
 };
@@ -92,17 +97,17 @@
 
   ValueObjectSP ptr_obj = tuple_frontend->GetChildAtIndex(0);
   if (ptr_obj)
-    m_ptr_obj = ptr_obj->Clone(ConstString("pointer"));
+    m_ptr_obj = ptr_obj->Clone(ConstString("pointer")).get();
 
   ValueObjectSP del_obj = tuple_frontend->GetChildAtIndex(1);
   if (del_obj)
-    m_del_obj = del_obj->Clone(ConstString("deleter"));
+    m_del_obj = del_obj->Clone(ConstString("deleter")).get();
 
   if (m_ptr_obj) {
     Status error;
     ValueObjectSP obj_obj = m_ptr_obj->Dereference(error);
     if (error.Success()) {
-      m_obj_obj = obj_obj->Clone(ConstString("object"));
+      m_obj_obj = obj_obj->Clone(ConstString("object")).get();
     }
   }
 
@@ -113,12 +118,12 @@
 
 lldb::ValueObjectSP
 LibStdcppUniquePtrSyntheticFrontEnd::GetChildAtIndex(size_t idx) {
-  if (idx == 0)
-    return m_ptr_obj;
-  if (idx == 1)
-    return m_del_obj;
-  if (idx == 2)
-    return m_obj_obj;
+  if (idx == 0 && m_ptr_obj)
+    return m_ptr_obj->GetSP();
+  if (idx == 1 && m_del_obj)
+    return m_del_obj->GetSP();
+  if (idx == 2 && m_obj_obj)
+    return m_obj_obj->GetSP();
   return lldb::ValueObjectSP();
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp b/src/llvm-project/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp
index a9a1b44..3e77b16 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ClangCommon/ClangHighlighter.cpp
@@ -139,6 +139,22 @@
   FileManager file_mgr(file_opts,
                        FileSystem::Instance().GetVirtualFileSystem());
 
+  // The line might end in a backslash which would cause Clang to drop the
+  // backslash and the terminating new line. This makes sense when parsing C++,
+  // but when highlighting we care about preserving the backslash/newline. To
+  // not lose this information we remove the new line here so that Clang knows
+  // this is just a single line we are highlighting. We add back the newline
+  // after tokenizing.
+  llvm::StringRef line_ending = "";
+  // There are a few legal line endings Clang recognizes and we need to
+  // temporarily remove from the string.
+  if (line.consume_back("\r\n"))
+    line_ending = "\r\n";
+  else if (line.consume_back("\n"))
+    line_ending = "\n";
+  else if (line.consume_back("\r"))
+    line_ending = "\r";
+
   unsigned line_number = previous_lines.count('\n') + 1U;
 
   // Let's build the actual source code Clang needs and setup some utility
@@ -227,6 +243,9 @@
     color.Apply(result, to_print);
   }
 
+  // Add the line ending we trimmed before tokenizing.
+  result << line_ending;
+
   // If we went over the whole file but couldn't find our own file, then
   // somehow our setup was wrong. When we're in release mode we just give the
   // user the normal line and pretend we don't know how to highlight it. In
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/Language/ObjC/CMakeLists.txt
index afb68d4..ebb96c2 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/CMakeLists.txt
@@ -22,7 +22,6 @@
   NSString.cpp
 
   LINK_LIBS
-    clangAST
     lldbCore
     lldbDataFormatters
     lldbExpression
@@ -32,6 +31,8 @@
     lldbUtility
     lldbPluginAppleObjCRuntime
     lldbPluginClangCommon
+  CLANG_LIBS
+    clangAST
 
   EXTRA_CXXFLAGS ${EXTRA_CXXFLAGS}
 )
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/Cocoa.cpp b/src/llvm-project/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
index ddf3953..8a81abb 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/Cocoa.cpp
@@ -694,32 +694,44 @@
   CompilerType type(valobj.GetCompilerType());
   ValueObjectSP text(valobj.GetSyntheticChildAtOffset(offset_text, type, true));
   ValueObjectSP base(valobj.GetSyntheticChildAtOffset(offset_base, type, true));
-  if (!text)
+  if (!text || text->GetValueAsUnsigned(0) == 0)
     return false;
-  if (text->GetValueAsUnsigned(0) == 0)
-    return false;
-  StreamString summary;
-  if (!NSStringSummaryProvider(*text, summary, options))
-    return false;
-  if (base && base->GetValueAsUnsigned(0)) {
-    std::string summary_str = summary.GetString();
 
-    if (!summary_str.empty())
-      summary_str.pop_back();
-    summary_str += " -- ";
-    StreamString base_summary;
-    if (NSURLSummaryProvider(*base, base_summary, options) &&
-        !base_summary.Empty()) {
-      llvm::StringRef base_str = base_summary.GetString();
-      if (base_str.size() > 2)
-        base_str = base_str.drop_front(2);
-      summary_str += base_str;
-    }
-    summary.Clear();
-    summary.PutCString(summary_str);
+  StreamString base_summary;
+  if (base && base->GetValueAsUnsigned(0)) {
+    if (!NSURLSummaryProvider(*base, base_summary, options))
+      base_summary.Clear();
   }
-  if (!summary.Empty()) {
-    stream.PutCString(summary.GetString());
+  if (base_summary.Empty())
+    return NSStringSummaryProvider(*text, stream, options);
+
+  StreamString summary;
+  if (!NSStringSummaryProvider(*text, summary, options) || summary.Empty())
+    return false;
+
+  const char quote_char = '"';
+  std::string prefix, suffix;
+  if (Language *language = Language::FindPlugin(options.GetLanguage())) {
+    if (!language->GetFormatterPrefixSuffix(*text, ConstString("NSString"),
+                                            prefix, suffix)) {
+      prefix.clear();
+      suffix.clear();
+    }
+  }
+  // @"A" -> @"A
+  llvm::StringRef summary_str = summary.GetString();
+  bool back_consumed = summary_str.consume_back(quote_char + suffix);
+  assert(back_consumed);
+  UNUSED_IF_ASSERT_DISABLED(back_consumed);
+  // @"B" -> B"
+  llvm::StringRef base_summary_str = base_summary.GetString();
+  bool front_consumed = base_summary_str.consume_front(prefix + quote_char);
+  assert(front_consumed);
+  UNUSED_IF_ASSERT_DISABLED(front_consumed);
+  // @"A -- B"
+  if (!summary_str.empty() && !base_summary_str.empty()) {
+    stream.Printf("%s -- %s", summary_str.str().c_str(),
+                  base_summary_str.str().c_str());
     return true;
   }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/CoreMedia.cpp b/src/llvm-project/lldb/source/Plugins/Language/ObjC/CoreMedia.cpp
index d19290e..247429d 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/CoreMedia.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/CoreMedia.cpp
@@ -10,6 +10,7 @@
 #include "CoreMedia.h"
 
 #include "lldb/Utility/Flags.h"
+#include "lldb/Utility/Log.h"
 
 #include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Target/Target.h"
@@ -25,18 +26,21 @@
   if (!type.IsValid())
     return false;
 
-  TypeSystem *type_system =
+  auto type_system_or_err =
       valobj.GetExecutionContextRef()
           .GetTargetSP()
-          ->GetScratchTypeSystemForLanguage(nullptr, lldb::eLanguageTypeC);
-  if (!type_system)
+          ->GetScratchTypeSystemForLanguage(lldb::eLanguageTypeC);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(
+        lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DATAFORMATTERS),
+        std::move(err), "Failed to get scratch type system");
     return false;
-
+  }
   // fetch children by offset to compensate for potential lack of debug info
-  auto int64_ty =
-      type_system->GetBuiltinTypeForEncodingAndBitSize(eEncodingSint, 64);
-  auto int32_ty =
-      type_system->GetBuiltinTypeForEncodingAndBitSize(eEncodingSint, 32);
+  auto int64_ty = type_system_or_err->GetBuiltinTypeForEncodingAndBitSize(
+      eEncodingSint, 64);
+  auto int32_ty = type_system_or_err->GetBuiltinTypeForEncodingAndBitSize(
+      eEncodingSint, 32);
 
   auto value_sp(valobj.GetSyntheticChildAtOffset(0, int64_ty, true));
   auto timescale_sp(valobj.GetSyntheticChildAtOffset(8, int32_ty, true));
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSArray.cpp b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSArray.cpp
index 404dabf..73335af 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSArray.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSArray.cpp
@@ -96,31 +96,6 @@
   D64 *m_data_64;
 };
   
-namespace Foundation109 {
-  struct DataDescriptor_32 {
-    uint32_t _used;
-    uint32_t _priv1 : 2;
-    uint32_t _size : 30;
-    uint32_t _priv2 : 2;
-    uint32_t _offset : 30;
-    uint32_t _priv3;
-    uint32_t _data;
-  };
-  
-  struct DataDescriptor_64 {
-    uint64_t _used;
-    uint64_t _priv1 : 2;
-    uint64_t _size : 62;
-    uint64_t _priv2 : 2;
-    uint64_t _offset : 62;
-    uint32_t _priv3;
-    uint64_t _data;
-  };
-  
-  using NSArrayMSyntheticFrontEnd =
-      GenericNSArrayMSyntheticFrontEnd<DataDescriptor_32, DataDescriptor_64>;
-}
-  
 namespace Foundation1010 {
   struct DataDescriptor_32 {
     uint32_t _used;
@@ -461,12 +436,12 @@
     : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_ptr_size(8),
       m_id_type() {
   if (valobj_sp) {
-    clang::ASTContext *ast = valobj_sp->GetExecutionContextRef()
-                                 .GetTargetSP()
-                                 ->GetScratchClangASTContext()
-                                 ->getASTContext();
-    if (ast)
-      m_id_type = CompilerType(ast, ast->ObjCBuiltinIdTy);
+    auto *clang_ast_context = ClangASTContext::GetScratch(
+        *valobj_sp->GetExecutionContextRef().GetTargetSP());
+    if (clang_ast_context)
+      m_id_type = CompilerType(
+          clang_ast_context,
+          clang_ast_context->getASTContext().ObjCBuiltinIdTy.getAsOpaquePtr());
     if (valobj_sp->GetProcessSP())
       m_ptr_size = valobj_sp->GetProcessSP()->GetAddressByteSize();
   }
@@ -609,12 +584,11 @@
   if (valobj_sp) {
     CompilerType type = valobj_sp->GetCompilerType();
     if (type) {
-      ClangASTContext *ast = valobj_sp->GetExecutionContextRef()
-                                 .GetTargetSP()
-                                 ->GetScratchClangASTContext();
-      if (ast)
-        m_id_type = CompilerType(ast->getASTContext(),
-                                 ast->getASTContext()->ObjCBuiltinIdTy);
+      auto *clang_ast_context = ClangASTContext::GetScratch(
+          *valobj_sp->GetExecutionContextRef().GetTargetSP());
+      if (clang_ast_context)
+        m_id_type = clang_ast_context->GetType(
+            clang_ast_context->getASTContext().ObjCBuiltinIdTy);
     }
   }
 }
@@ -778,11 +752,15 @@
   static const ConstString g_zero("[0]");
 
   if (idx == 0) {
-    CompilerType id_type(
-        m_backend.GetTargetSP()->GetScratchClangASTContext()->GetBasicType(
-            lldb::eBasicTypeObjCID));
-    return m_backend.GetSyntheticChildAtOffset(
-        m_backend.GetProcessSP()->GetAddressByteSize(), id_type, true, g_zero);
+    auto *clang_ast_context =
+        ClangASTContext::GetScratch(*m_backend.GetTargetSP());
+    if (clang_ast_context) {
+      CompilerType id_type(
+          clang_ast_context->GetBasicType(lldb::eBasicTypeObjCID));
+      return m_backend.GetSyntheticChildAtOffset(
+          m_backend.GetProcessSP()->GetAddressByteSize(), id_type, true,
+          g_zero);
+    }
   }
   return lldb::ValueObjectSP();
 }
@@ -855,8 +833,6 @@
       return (new Foundation1428::NSArrayMSyntheticFrontEnd(valobj_sp));
     if (runtime->GetFoundationVersion() >= 1100)
       return (new Foundation1010::NSArrayMSyntheticFrontEnd(valobj_sp));
-    else
-      return (new Foundation109::NSArrayMSyntheticFrontEnd(valobj_sp));
   } else if (class_name == g_NSCallStackArray) {
     return (new CallStackArray::NSCallStackArraySyntheticFrontEnd(valobj_sp));
   } else {
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
index 10f66c4..ae00674 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp
@@ -65,7 +65,7 @@
 static CompilerType GetLLDBNSPairType(TargetSP target_sp) {
   CompilerType compiler_type;
 
-  ClangASTContext *target_ast_context = target_sp->GetScratchClangASTContext();
+  ClangASTContext *target_ast_context = ClangASTContext::GetScratch(*target_sp);
 
   if (target_ast_context) {
     ConstString g___lldb_autogen_nspair("__lldb_autogen_nspair");
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.h b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.h
index ecb3fcc..44d56f9 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.h
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSDictionary.h
@@ -68,10 +68,10 @@
     };
     typedef Matcher::UP MatcherUP;
 
-    MatcherUP GetFullMatch(ConstString n) { return llvm::make_unique<Full>(n); }
+    MatcherUP GetFullMatch(ConstString n) { return std::make_unique<Full>(n); }
 
     MatcherUP GetPrefixMatch(ConstString p) {
-      return llvm::make_unique<Prefix>(p);
+      return std::make_unique<Prefix>(p);
     }
   };
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSError.cpp b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSError.cpp
index 97df3be..94a97c8 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSError.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSError.cpp
@@ -86,10 +86,10 @@
 
   ValueObjectSP domain_str_sp = ValueObject::CreateValueObjectFromData(
       "domain_str", isw.GetAsData(process_sp->GetByteOrder()),
-      valobj.GetExecutionContextRef(), process_sp->GetTarget()
-                                           .GetScratchClangASTContext()
-                                           ->GetBasicType(lldb::eBasicTypeVoid)
-                                           .GetPointerType());
+      valobj.GetExecutionContextRef(),
+      ClangASTContext::GetScratch(process_sp->GetTarget())
+          ->GetBasicType(lldb::eBasicTypeVoid)
+          .GetPointerType());
 
   if (!domain_str_sp)
     return false;
@@ -156,8 +156,8 @@
     m_child_sp = CreateValueObjectFromData(
         "_userInfo", isw.GetAsData(process_sp->GetByteOrder()),
         m_backend.GetExecutionContextRef(),
-        process_sp->GetTarget().GetScratchClangASTContext()->GetBasicType(
-            lldb::eBasicTypeObjCID));
+        ClangASTContext::GetScratch(process_sp->GetTarget())
+            ->GetBasicType(lldb::eBasicTypeObjCID));
     return false;
   }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSException.cpp b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSException.cpp
index 931794a..9150787 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSException.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSException.cpp
@@ -69,10 +69,12 @@
   InferiorSizedWord userinfo_isw(userinfo, *process_sp);
   InferiorSizedWord reserved_isw(reserved, *process_sp);
 
-  CompilerType voidstar = process_sp->GetTarget()
-                              .GetScratchClangASTContext()
-                              ->GetBasicType(lldb::eBasicTypeVoid)
-                              .GetPointerType();
+  auto *clang_ast_context = ClangASTContext::GetScratch(process_sp->GetTarget());
+  if (!clang_ast_context)
+    return false;
+
+  CompilerType voidstar =
+      clang_ast_context->GetBasicType(lldb::eBasicTypeVoid).GetPointerType();
 
   if (name_sp)
     *name_sp = ValueObject::CreateValueObjectFromData(
@@ -96,21 +98,19 @@
 
 bool lldb_private::formatters::NSException_SummaryProvider(
     ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
-  lldb::ValueObjectSP name_sp;
   lldb::ValueObjectSP reason_sp;
-  if (!ExtractFields(valobj, &name_sp, &reason_sp, nullptr, nullptr))
+  if (!ExtractFields(valobj, nullptr, &reason_sp, nullptr, nullptr))
     return false;
 
-  if (!name_sp || !reason_sp)
+  if (!reason_sp) {
+    stream.Printf("No reason");
     return false;
+  }
 
-  StreamString name_str_summary;
   StreamString reason_str_summary;
-  if (NSStringSummaryProvider(*name_sp, name_str_summary, options) &&
-      NSStringSummaryProvider(*reason_sp, reason_str_summary, options) &&
-      !name_str_summary.Empty() && !reason_str_summary.Empty()) {
-    stream.Printf("name: %s - reason: %s", name_str_summary.GetData(),
-                  reason_str_summary.GetData());
+  if (NSStringSummaryProvider(*reason_sp, reason_str_summary, options) &&
+      !reason_str_summary.Empty()) {
+    stream.Printf("%s", reason_str_summary.GetData());
     return true;
   } else
     return false;
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
index 9ee6021..587dd13 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp
@@ -53,9 +53,8 @@
     if (!type_system)
       return false;
 
-    ClangASTContext *ast = m_backend.GetExecutionContextRef()
-                               .GetTargetSP()
-                               ->GetScratchClangASTContext();
+    ClangASTContext *ast = ClangASTContext::GetScratch(
+        *m_backend.GetExecutionContextRef().GetTargetSP());
     if (!ast)
       return false;
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSString.cpp b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSString.cpp
index 4800c95..ce54d65 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSString.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/NSString.cpp
@@ -35,7 +35,7 @@
 static CompilerType GetNSPathStore2Type(Target &target) {
   static ConstString g_type_name("__lldb_autogen_nspathstore2");
 
-  ClangASTContext *ast_ctx = target.GetScratchClangASTContext();
+  ClangASTContext *ast_ctx = ClangASTContext::GetScratch(target);
 
   if (!ast_ctx)
     return CompilerType();
@@ -78,12 +78,12 @@
     return false;
 
   ConstString class_name_cs = descriptor->GetClassName();
-  const char *class_name = class_name_cs.GetCString();
+  llvm::StringRef class_name = class_name_cs.GetStringRef();
 
-  if (!class_name || !*class_name)
+  if (class_name.empty())
     return false;
 
-  bool is_tagged_ptr = (0 == strcmp(class_name, "NSTaggedPointerString")) &&
+  bool is_tagged_ptr = class_name == "NSTaggedPointerString" &&
                        descriptor->GetTaggedPointerInfo();
   // for a tagged pointer, the descriptor has everything we need
   if (is_tagged_ptr)
@@ -111,7 +111,7 @@
   bool is_inline = (info_bits & 0x60) == 0;
   bool has_explicit_length = (info_bits & (1 | 4)) != 4;
   bool is_unicode = (info_bits & 0x10) == 0x10;
-  bool is_path_store = strcmp(class_name, "NSPathStore2") == 0;
+  bool is_path_store = class_name == "NSPathStore2";
   bool has_null = (info_bits & 8) == 8;
 
   size_t explicit_length = 0;
@@ -135,14 +135,14 @@
     }
   }
 
-  if (strcmp(class_name, "NSString") && strcmp(class_name, "CFStringRef") &&
-      strcmp(class_name, "CFMutableStringRef") &&
-      strcmp(class_name, "__NSCFConstantString") &&
-      strcmp(class_name, "__NSCFString") &&
-      strcmp(class_name, "NSCFConstantString") &&
-      strcmp(class_name, "NSCFString") && strcmp(class_name, "NSPathStore2")) {
+  const llvm::StringSet<> supported_string_classes = {
+      "NSString",     "CFMutableStringRef",
+      "CFStringRef",  "__NSCFConstantString",
+      "__NSCFString", "NSCFConstantString",
+      "NSCFString",   "NSPathStore2"};
+  if (supported_string_classes.count(class_name) == 0) {
     // not one of us - but tell me class name
-    stream.Printf("class name = %s", class_name);
+    stream.Printf("class name = %s", class_name_cs.GetCString());
     return true;
   }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp b/src/llvm-project/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
index f9ab186..3be548a 100644
--- a/src/llvm-project/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp
@@ -15,6 +15,7 @@
 #include "lldb/DataFormatters/DataVisualization.h"
 #include "lldb/DataFormatters/FormattersHelpers.h"
 #include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/ConstString.h"
@@ -22,6 +23,7 @@
 
 #include "llvm/Support/Threading.h"
 
+#include "Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h"
 #include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
 
 #include "CF.h"
@@ -886,7 +888,7 @@
   bool canBeObjCDynamic =
       compiler_type.IsPossibleDynamicType(nullptr, check_cpp, check_objc);
 
-  if (canBeObjCDynamic) {
+  if (canBeObjCDynamic && ClangUtil::IsClangType(compiler_type)) {
     do {
       lldb::ProcessSP process_sp = valobj.GetProcessSP();
       if (!process_sp)
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
index b392282..d556aae 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
@@ -21,6 +21,7 @@
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/UniqueCStringMap.h"
 #include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Target/ABI.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/RegisterContext.h"
@@ -28,6 +29,7 @@
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/ThreadPlanRunToAddress.h"
 #include "lldb/Target/ThreadPlanStepInRange.h"
+#include "lldb/Utility/Timer.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -58,9 +60,53 @@
   return false;
 }
 
+bool contains_lambda_identifier(llvm::StringRef &str_ref) {
+  return str_ref.contains("$_") || str_ref.contains("'lambda'");
+}
+
+CPPLanguageRuntime::LibCppStdFunctionCallableInfo
+line_entry_helper(Target &target, const SymbolContext &sc, Symbol *symbol,
+                  llvm::StringRef first_template_param_sref,
+                  bool has___invoke) {
+
+  CPPLanguageRuntime::LibCppStdFunctionCallableInfo optional_info;
+
+  AddressRange range;
+  sc.GetAddressRange(eSymbolContextEverything, 0, false, range);
+
+  Address address = range.GetBaseAddress();
+
+  Address addr;
+  if (target.ResolveLoadAddress(address.GetCallableLoadAddress(&target),
+                                addr)) {
+    LineEntry line_entry;
+    addr.CalculateSymbolContextLineEntry(line_entry);
+
+    if (contains_lambda_identifier(first_template_param_sref) || has___invoke) {
+      // Case 1 and 2
+      optional_info.callable_case = lldb_private::CPPLanguageRuntime::
+          LibCppStdFunctionCallableCase::Lambda;
+    } else {
+      // Case 3
+      optional_info.callable_case = lldb_private::CPPLanguageRuntime::
+          LibCppStdFunctionCallableCase::CallableObject;
+    }
+
+    optional_info.callable_symbol = *symbol;
+    optional_info.callable_line_entry = line_entry;
+    optional_info.callable_address = addr;
+  }
+
+  return optional_info;
+}
+
 CPPLanguageRuntime::LibCppStdFunctionCallableInfo
 CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo(
     lldb::ValueObjectSP &valobj_sp) {
+  static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
+  Timer scoped_timer(func_cat,
+                     "CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo");
+
   LibCppStdFunctionCallableInfo optional_info;
 
   if (!valobj_sp)
@@ -93,7 +139,7 @@
   //    this entry and lookup operator()() and obtain the line table entry.
   // 3) a callable object via operator()(). We will obtain the name of the
   //    object from the first template parameter from __func's vtable. We will
-  //    look up the objectc operator()() and obtain the line table entry.
+  //    look up the objects operator()() and obtain the line table entry.
   // 4) a member function. A pointer to the function will stored after the
   //    we will obtain the name from this pointer.
   // 5) a free function. A pointer to the function will stored after the vtable
@@ -113,6 +159,9 @@
 
   optional_info.member__f_pointer_value = member__f_pointer_value;
 
+  if (!member__f_pointer_value)
+    return optional_info;
+
   ExecutionContext exe_ctx(valobj_sp->GetExecutionContextRef());
   Process *process = exe_ctx.GetProcessPtr();
 
@@ -130,8 +179,14 @@
   if (status.Fail())
     return optional_info;
 
+  lldb::addr_t vtable_address_first_entry =
+      process->ReadPointerFromMemory(vtable_address + address_size, status);
+
+  if (status.Fail())
+    return optional_info;
+
   lldb::addr_t address_after_vtable = member__f_pointer_value + address_size;
-  // As commened above we may not have a function pointer but if we do we will
+  // As commented above we may not have a function pointer but if we do we will
   // need it.
   lldb::addr_t possible_function_address =
       process->ReadPointerFromMemory(address_after_vtable, status);
@@ -144,9 +199,15 @@
   if (target.GetSectionLoadList().IsEmpty())
     return optional_info;
 
+  Address vtable_first_entry_resolved;
+
+  if (!target.GetSectionLoadList().ResolveLoadAddress(
+          vtable_address_first_entry, vtable_first_entry_resolved))
+    return optional_info;
+
   Address vtable_addr_resolved;
   SymbolContext sc;
-  Symbol *symbol;
+  Symbol *symbol = nullptr;
 
   if (!target.GetSectionLoadList().ResolveLoadAddress(vtable_address,
                                                       vtable_addr_resolved))
@@ -159,7 +220,7 @@
   if (symbol == nullptr)
     return optional_info;
 
-  llvm::StringRef vtable_name(symbol->GetName().GetCString());
+  llvm::StringRef vtable_name(symbol->GetName().GetStringRef());
   bool found_expected_start_string =
       vtable_name.startswith("vtable for std::__1::__function::__func<");
 
@@ -172,6 +233,11 @@
   //  ... __func<main::$_0, std::__1::allocator<main::$_0> ...
   //             ^^^^^^^^^
   //
+  // We could see names such as:
+  //    main::$_0
+  //    Bar::add_num2(int)::'lambda'(int)
+  //    Bar
+  //
   // We do this by find the first < and , and extracting in between.
   //
   // This covers the case of the lambda known at compile time.
@@ -193,81 +259,28 @@
     symbol = sc.symbol;
   }
 
-  auto get_name = [&first_template_parameter, &symbol]() {
-    // Given case 1:
-    //
-    //    main::$_0
-    //
-    // we want to append ::operator()()
-    if (first_template_parameter.contains("$_"))
-      return llvm::Regex::escape(first_template_parameter.str()) +
-             R"(::operator\(\)\(.*\))";
-
-    if (symbol != nullptr &&
-        symbol->GetName().GetStringRef().contains("__invoke")) {
-
-      llvm::StringRef symbol_name = symbol->GetName().GetStringRef();
-      size_t pos2 = symbol_name.find_last_of(':');
-
-      // Given case 2:
-      //
-      //    main::$_1::__invoke(...)
-      //
-      // We want to slice off __invoke(...) and append operator()()
-      std::string lambda_operator =
-          llvm::Regex::escape(symbol_name.slice(0, pos2 + 1).str()) +
-          R"(operator\(\)\(.*\))";
-
-      return lambda_operator;
-    }
-
-    // Case 3
-    return first_template_parameter.str() + R"(::operator\(\)\(.*\))";
-    ;
+  // These conditions are used several times to simplify statements later on.
+  bool has___invoke =
+      (symbol ? symbol->GetName().GetStringRef().contains("__invoke") : false);
+  auto calculate_symbol_context_helper = [](auto &t,
+                                            SymbolContextList &sc_list) {
+    SymbolContext sc;
+    t->CalculateSymbolContext(&sc);
+    sc_list.Append(sc);
   };
 
-  std::string func_to_match = get_name();
+  // Case 2
+  if (has___invoke) {
+    SymbolContextList scl;
+    calculate_symbol_context_helper(symbol, scl);
 
-  SymbolContextList scl;
-
-  target.GetImages().FindSymbolsMatchingRegExAndType(
-      RegularExpression{R"(^)" + func_to_match}, eSymbolTypeAny, scl, true);
-
-  // Case 1,2 or 3
-  if (scl.GetSize() >= 1) {
-    SymbolContext sc2 = scl[0];
-
-    AddressRange range;
-    sc2.GetAddressRange(eSymbolContextEverything, 0, false, range);
-
-    Address address = range.GetBaseAddress();
-
-    Address addr;
-    if (target.ResolveLoadAddress(address.GetCallableLoadAddress(&target),
-                                  addr)) {
-      LineEntry line_entry;
-      addr.CalculateSymbolContextLineEntry(line_entry);
-
-      if (first_template_parameter.contains("$_") ||
-          (symbol != nullptr &&
-           symbol->GetName().GetStringRef().contains("__invoke"))) {
-        // Case 1 and 2
-        optional_info.callable_case = LibCppStdFunctionCallableCase::Lambda;
-      } else {
-        // Case 3
-        optional_info.callable_case =
-            LibCppStdFunctionCallableCase::CallableObject;
-      }
-
-      optional_info.callable_symbol = *symbol;
-      optional_info.callable_line_entry = line_entry;
-      optional_info.callable_address = addr;
-      return optional_info;
-    }
+    return line_entry_helper(target, scl[0], symbol, first_template_parameter,
+                             has___invoke);
   }
 
   // Case 4 or 5
-  if (symbol && !symbol->GetName().GetStringRef().startswith("vtable for")) {
+  if (symbol && !symbol->GetName().GetStringRef().startswith("vtable for") &&
+      !contains_lambda_identifier(first_template_parameter) && !has___invoke) {
     optional_info.callable_case =
         LibCppStdFunctionCallableCase::FreeOrMemberFunction;
     optional_info.callable_address = function_address_resolved;
@@ -276,6 +289,50 @@
     return optional_info;
   }
 
+  std::string func_to_match = first_template_parameter.str();
+
+  auto it = CallableLookupCache.find(func_to_match);
+  if (it != CallableLookupCache.end())
+    return it->second;
+
+  SymbolContextList scl;
+
+  CompileUnit *vtable_cu =
+      vtable_first_entry_resolved.CalculateSymbolContextCompileUnit();
+  llvm::StringRef name_to_use = func_to_match;
+
+  // Case 3, we have a callable object instead of a lambda
+  //
+  // TODO
+  // We currently don't support this case a callable object may have multiple
+  // operator()() varying on const/non-const and number of arguments and we
+  // don't have a way to currently distinguish them so we will bail out now.
+  if (!contains_lambda_identifier(name_to_use))
+    return optional_info;
+
+  if (vtable_cu && !has___invoke) {
+    lldb::FunctionSP func_sp =
+        vtable_cu->FindFunction([name_to_use](const FunctionSP &f) {
+          auto name = f->GetName().GetStringRef();
+          if (name.startswith(name_to_use) && name.contains("operator"))
+            return true;
+
+          return false;
+        });
+
+    if (func_sp) {
+      calculate_symbol_context_helper(func_sp, scl);
+    }
+  }
+
+  // Case 1 or 3
+  if (scl.GetSize() >= 1) {
+    optional_info = line_entry_helper(target, scl[0], symbol,
+                                      first_template_parameter, has___invoke);
+  }
+
+  CallableLookupCache[func_to_match] = optional_info;
+
   return optional_info;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
index 2852636..abdd79f 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.h
@@ -10,6 +10,9 @@
 #define liblldb_CPPLanguageRuntime_h_
 
 #include <vector>
+
+#include "llvm/ADT/StringMap.h"
+
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Target/LanguageRuntime.h"
 #include "lldb/lldb-private.h"
@@ -82,6 +85,11 @@
   CPPLanguageRuntime(Process *process);
 
 private:
+  using OperatorStringToCallableInfoMap =
+    llvm::StringMap<CPPLanguageRuntime::LibCppStdFunctionCallableInfo>;
+
+  OperatorStringToCallableInfoMap CallableLookupCache;
+
   DISALLOW_COPY_AND_ASSIGN(CPPLanguageRuntime);
 };
 
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
index 41f38a4..9efb021 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp
@@ -79,11 +79,10 @@
           if (name && strstr(name, vtable_demangled_prefix) == name) {
             Log *log(
                 lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-            if (log)
-              log->Printf("0x%16.16" PRIx64
-                          ": static-type = '%s' has vtable symbol '%s'\n",
-                          original_ptr, in_value.GetTypeName().GetCString(),
-                          name);
+            LLDB_LOGF(log,
+                      "0x%16.16" PRIx64
+                      ": static-type = '%s' has vtable symbol '%s'\n",
+                      original_ptr, in_value.GetTypeName().GetCString(), name);
             // We are a C++ class, that's good.  Get the class name and look it
             // up:
             const char *class_name = name + strlen(vtable_demangled_prefix);
@@ -96,87 +95,81 @@
             const bool exact_match = true;
             TypeList class_types;
 
-            uint32_t num_matches = 0;
             // First look in the module that the vtable symbol came from and
             // look for a single exact match.
             llvm::DenseSet<SymbolFile *> searched_symbol_files;
-            if (sc.module_sp) {
-              num_matches = sc.module_sp->FindTypes(
-                  ConstString(lookup_name), exact_match, 1,
-                  searched_symbol_files, class_types);
-            }
+            if (sc.module_sp)
+              sc.module_sp->FindTypes(ConstString(lookup_name), exact_match, 1,
+                                      searched_symbol_files, class_types);
 
             // If we didn't find a symbol, then move on to the entire module
             // list in the target and get as many unique matches as possible
-            if (num_matches == 0) {
-              num_matches = target.GetImages().FindTypes(
-                  nullptr, ConstString(lookup_name), exact_match, UINT32_MAX,
-                  searched_symbol_files, class_types);
-            }
+            if (class_types.Empty())
+              target.GetImages().FindTypes(nullptr, ConstString(lookup_name),
+                                           exact_match, UINT32_MAX,
+                                           searched_symbol_files, class_types);
 
             lldb::TypeSP type_sp;
-            if (num_matches == 0) {
-              if (log)
-                log->Printf("0x%16.16" PRIx64 ": is not dynamic\n",
-                            original_ptr);
+            if (class_types.Empty()) {
+              LLDB_LOGF(log, "0x%16.16" PRIx64 ": is not dynamic\n",
+                        original_ptr);
               return TypeAndOrName();
             }
-            if (num_matches == 1) {
+            if (class_types.GetSize() == 1) {
               type_sp = class_types.GetTypeAtIndex(0);
               if (type_sp) {
                 if (ClangASTContext::IsCXXClassType(
                         type_sp->GetForwardCompilerType())) {
-                  if (log)
-                    log->Printf(
-                        "0x%16.16" PRIx64
-                        ": static-type = '%s' has dynamic type: uid={0x%" PRIx64
-                        "}, type-name='%s'\n",
-                        original_ptr, in_value.GetTypeName().AsCString(),
-                        type_sp->GetID(), type_sp->GetName().GetCString());
+                  LLDB_LOGF(
+                      log,
+                      "0x%16.16" PRIx64
+                      ": static-type = '%s' has dynamic type: uid={0x%" PRIx64
+                      "}, type-name='%s'\n",
+                      original_ptr, in_value.GetTypeName().AsCString(),
+                      type_sp->GetID(), type_sp->GetName().GetCString());
                   type_info.SetTypeSP(type_sp);
                 }
               }
-            } else if (num_matches > 1) {
+            } else {
               size_t i;
               if (log) {
-                for (i = 0; i < num_matches; i++) {
+                for (i = 0; i < class_types.GetSize(); i++) {
                   type_sp = class_types.GetTypeAtIndex(i);
                   if (type_sp) {
-                    if (log)
-                      log->Printf(
-                          "0x%16.16" PRIx64
-                          ": static-type = '%s' has multiple matching dynamic "
-                          "types: uid={0x%" PRIx64 "}, type-name='%s'\n",
-                          original_ptr, in_value.GetTypeName().AsCString(),
-                          type_sp->GetID(), type_sp->GetName().GetCString());
+                    LLDB_LOGF(
+                        log,
+                        "0x%16.16" PRIx64
+                        ": static-type = '%s' has multiple matching dynamic "
+                        "types: uid={0x%" PRIx64 "}, type-name='%s'\n",
+                        original_ptr, in_value.GetTypeName().AsCString(),
+                        type_sp->GetID(), type_sp->GetName().GetCString());
                   }
                 }
               }
 
-              for (i = 0; i < num_matches; i++) {
+              for (i = 0; i < class_types.GetSize(); i++) {
                 type_sp = class_types.GetTypeAtIndex(i);
                 if (type_sp) {
                   if (ClangASTContext::IsCXXClassType(
                           type_sp->GetForwardCompilerType())) {
-                    if (log)
-                      log->Printf(
-                          "0x%16.16" PRIx64 ": static-type = '%s' has multiple "
-                                            "matching dynamic types, picking "
-                                            "this one: uid={0x%" PRIx64
-                          "}, type-name='%s'\n",
-                          original_ptr, in_value.GetTypeName().AsCString(),
-                          type_sp->GetID(), type_sp->GetName().GetCString());
+                    LLDB_LOGF(
+                        log,
+                        "0x%16.16" PRIx64 ": static-type = '%s' has multiple "
+                        "matching dynamic types, picking "
+                        "this one: uid={0x%" PRIx64 "}, type-name='%s'\n",
+                        original_ptr, in_value.GetTypeName().AsCString(),
+                        type_sp->GetID(), type_sp->GetName().GetCString());
                     type_info.SetTypeSP(type_sp);
                   }
                 }
               }
 
-              if (log && i == num_matches) {
-                log->Printf(
-                    "0x%16.16" PRIx64
-                    ": static-type = '%s' has multiple matching dynamic "
-                    "types, didn't find a C++ match\n",
-                    original_ptr, in_value.GetTypeName().AsCString());
+              if (log) {
+                LLDB_LOGF(log,
+                          "0x%16.16" PRIx64
+                          ": static-type = '%s' has multiple matching dynamic "
+                          "types, didn't find a C++ match\n",
+                          original_ptr, in_value.GetTypeName().AsCString());
               }
             }
             if (type_info)
@@ -351,7 +344,7 @@
     bool demangled_any = false;
     bool error_any = false;
     for (auto &entry : command.entries()) {
-      if (entry.ref.empty())
+      if (entry.ref().empty())
         continue;
 
       // the actual Mangled class should be strict about this, but on the
@@ -359,21 +352,21 @@
       // they will come out with an extra underscore - be willing to strip this
       // on behalf of the user.   This is the moral equivalent of the -_/-n
       // options to c++filt
-      auto name = entry.ref;
+      auto name = entry.ref();
       if (name.startswith("__Z"))
         name = name.drop_front();
 
-      Mangled mangled(name, true);
+      Mangled mangled(name);
       if (mangled.GuessLanguage() == lldb::eLanguageTypeC_plus_plus) {
         ConstString demangled(
             mangled.GetDisplayDemangledName(lldb::eLanguageTypeC_plus_plus));
         demangled_any = true;
-        result.AppendMessageWithFormat("%s ---> %s\n", entry.ref.str().c_str(),
+        result.AppendMessageWithFormat("%s ---> %s\n", entry.c_str(),
                                        demangled.GetCString());
       } else {
         error_any = true;
         result.AppendErrorWithFormat("%s is not a valid C++ mangled name\n",
-                                     entry.ref.str().c_str());
+                                     entry.ref().str().c_str());
       }
     }
 
@@ -471,8 +464,8 @@
   if (target.GetArchitecture().GetTriple().getVendor() == llvm::Triple::Apple) {
     // Limit the number of modules that are searched for these breakpoints for
     // Apple binaries.
-    filter_modules.Append(FileSpec("libc++abi.dylib"));
-    filter_modules.Append(FileSpec("libSystem.B.dylib"));
+    filter_modules.EmplaceBack("libc++abi.dylib");
+    filter_modules.EmplaceBack("libSystem.B.dylib");
   }
   return target.GetSearchFilterForModuleList(&filter_modules);
 }
@@ -544,7 +537,10 @@
     return {};
 
   ClangASTContext *clang_ast_context =
-      m_process->GetTarget().GetScratchClangASTContext();
+      ClangASTContext::GetScratch(m_process->GetTarget());
+  if (!clang_ast_context)
+    return {};
+
   CompilerType voidstar =
       clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
 
@@ -566,6 +562,9 @@
   modules.FindSymbolsWithNameAndType(
       ConstString("__cxa_current_exception_type"), eSymbolTypeCode, contexts);
   contexts.GetContextAtIndex(0, context);
+  if (!context.symbol) {
+    return {};
+  }
   Address addr = context.symbol->GetAddress();
 
   Status error;
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
index 93aa07f..859b693 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp
@@ -111,6 +111,18 @@
   m_firstSubclass = extractor.GetAddress_unchecked(&cursor);
   m_nextSiblingClass = extractor.GetAddress_unchecked(&cursor);
 
+  if (m_ro_ptr & 1) {
+    DataBufferHeap buffer(ptr_size, '\0');
+    process->ReadMemory(m_ro_ptr ^ 1, buffer.GetBytes(), ptr_size, error);
+    if (error.Fail())
+      return false;
+    cursor = 0;
+    DataExtractor extractor(buffer.GetBytes(), ptr_size,
+                            process->GetByteOrder(),
+                            process->GetAddressByteSize());
+    m_ro_ptr = extractor.GetAddress_unchecked(&cursor);
+  }
+
   return true;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
index 18f2a18..7384306 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp
@@ -8,10 +8,9 @@
 
 #include "AppleObjCDeclVendor.h"
 
-#include "Plugins/ExpressionParser/Clang/ASTDumper.h"
 #include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
 #include "lldb/Core/Module.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
+#include "lldb/Symbol/ClangASTMetadata.h"
 #include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
@@ -19,12 +18,12 @@
 
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/DeclObjC.h"
-
+#include "clang/AST/ExternalASTSource.h"
 
 using namespace lldb_private;
 
 class lldb_private::AppleObjCExternalASTSource
-    : public ClangExternalASTSourceCommon {
+    : public clang::ExternalASTSource {
 public:
   AppleObjCExternalASTSource(AppleObjCDeclVendor &decl_vendor)
       : m_decl_vendor(decl_vendor) {}
@@ -38,12 +37,13 @@
         LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
 
     if (log) {
-      log->Printf("AppleObjCExternalASTSource::FindExternalVisibleDeclsByName[%"
-                  "u] on (ASTContext*)%p Looking for %s in (%sDecl*)%p",
-                  current_id,
-                  static_cast<void *>(&decl_ctx->getParentASTContext()),
-                  name.getAsString().c_str(), decl_ctx->getDeclKindName(),
-                  static_cast<const void *>(decl_ctx));
+      LLDB_LOGF(log,
+                "AppleObjCExternalASTSource::FindExternalVisibleDeclsByName[%"
+                "u] on (ASTContext*)%p Looking for %s in (%sDecl*)%p",
+                current_id,
+                static_cast<void *>(&decl_ctx->getParentASTContext()),
+                name.getAsString().c_str(), decl_ctx->getDeclKindName(),
+                static_cast<const void *>(decl_ctx));
     }
 
     do {
@@ -76,23 +76,18 @@
     Log *log(GetLogIfAllCategoriesSet(
         LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
 
-    if (log) {
-      log->Printf("AppleObjCExternalASTSource::CompleteType[%u] on "
-                  "(ASTContext*)%p Completing (TagDecl*)%p named %s",
-                  current_id, static_cast<void *>(&tag_decl->getASTContext()),
-                  static_cast<void *>(tag_decl),
-                  tag_decl->getName().str().c_str());
+    LLDB_LOGF(log,
+              "AppleObjCExternalASTSource::CompleteType[%u] on "
+              "(ASTContext*)%p Completing (TagDecl*)%p named %s",
+              current_id, static_cast<void *>(&tag_decl->getASTContext()),
+              static_cast<void *>(tag_decl), tag_decl->getName().str().c_str());
 
-      log->Printf("  AOEAS::CT[%u] Before:", current_id);
-      ASTDumper dumper((clang::Decl *)tag_decl);
-      dumper.ToLog(log, "    [CT] ");
-    }
+    LLDB_LOG(log, "  AOEAS::CT[{0}] Before:\n{1}", current_id,
+             ClangUtil::DumpDecl(tag_decl));
 
-    if (log) {
-      log->Printf("  AOEAS::CT[%u] After:", current_id);
-      ASTDumper dumper((clang::Decl *)tag_decl);
-      dumper.ToLog(log, "    [CT] ");
-    }
+    LLDB_LOG(log, "  AOEAS::CT[{1}] After:{1}", current_id,
+             ClangUtil::DumpDecl(tag_decl));
+
     return;
   }
 
@@ -104,24 +99,23 @@
         LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
 
     if (log) {
-      log->Printf("AppleObjCExternalASTSource::CompleteType[%u] on "
-                  "(ASTContext*)%p Completing (ObjCInterfaceDecl*)%p named %s",
-                  current_id,
-                  static_cast<void *>(&interface_decl->getASTContext()),
-                  static_cast<void *>(interface_decl),
-                  interface_decl->getName().str().c_str());
+      LLDB_LOGF(log,
+                "AppleObjCExternalASTSource::CompleteType[%u] on "
+                "(ASTContext*)%p Completing (ObjCInterfaceDecl*)%p named %s",
+                current_id,
+                static_cast<void *>(&interface_decl->getASTContext()),
+                static_cast<void *>(interface_decl),
+                interface_decl->getName().str().c_str());
 
-      log->Printf("  AOEAS::CT[%u] Before:", current_id);
-      ASTDumper dumper((clang::Decl *)interface_decl);
-      dumper.ToLog(log, "    [CT] ");
+      LLDB_LOGF(log, "  AOEAS::CT[%u] Before:", current_id);
+      LLDB_LOG(log, "    [CT] {0}", ClangUtil::DumpDecl(interface_decl));
     }
 
     m_decl_vendor.FinishDecl(interface_decl);
 
     if (log) {
-      log->Printf("  [CT] After:");
-      ASTDumper dumper((clang::Decl *)interface_decl);
-      dumper.ToLog(log, "    [CT] ");
+      LLDB_LOGF(log, "  [CT] After:");
+      LLDB_LOG(log, "    [CT] {0}", ClangUtil::DumpDecl(interface_decl));
     }
     return;
   }
@@ -138,7 +132,7 @@
 
   void StartTranslationUnit(clang::ASTConsumer *Consumer) override {
     clang::TranslationUnitDecl *translation_unit_decl =
-        m_decl_vendor.m_ast_ctx.getASTContext()->getTranslationUnitDecl();
+        m_decl_vendor.m_ast_ctx.getASTContext().getTranslationUnitDecl();
     translation_unit_decl->setHasExternalVisibleStorage();
     translation_unit_decl->setHasExternalLexicalStorage();
   }
@@ -148,17 +142,16 @@
 };
 
 AppleObjCDeclVendor::AppleObjCDeclVendor(ObjCLanguageRuntime &runtime)
-    : DeclVendor(), m_runtime(runtime), m_ast_ctx(runtime.GetProcess()
-                                                      ->GetTarget()
-                                                      .GetArchitecture()
-                                                      .GetTriple()
-                                                      .getTriple()
-                                                      .c_str()),
+    : ClangDeclVendor(eAppleObjCDeclVendor), m_runtime(runtime),
+      m_ast_ctx(runtime.GetProcess()
+                    ->GetTarget()
+                    .GetArchitecture()
+                    .GetTriple()),
       m_type_realizer_sp(m_runtime.GetEncodingToType()) {
   m_external_source = new AppleObjCExternalASTSource(*this);
   llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> external_source_owning_ptr(
       m_external_source);
-  m_ast_ctx.getASTContext()->setExternalSource(external_source_owning_ptr);
+  m_ast_ctx.getASTContext().setExternalSource(external_source_owning_ptr);
 }
 
 clang::ObjCInterfaceDecl *
@@ -168,7 +161,7 @@
   if (iter != m_isa_to_interface.end())
     return iter->second;
 
-  clang::ASTContext *ast_ctx = m_ast_ctx.getASTContext();
+  clang::ASTContext &ast_ctx = m_ast_ctx.getASTContext();
 
   ObjCLanguageRuntime::ClassDescriptorSP descriptor =
       m_runtime.GetClassDescriptorFromISA(isa);
@@ -179,20 +172,20 @@
   ConstString name(descriptor->GetClassName());
 
   clang::IdentifierInfo &identifier_info =
-      ast_ctx->Idents.get(name.GetStringRef());
+      ast_ctx.Idents.get(name.GetStringRef());
 
   clang::ObjCInterfaceDecl *new_iface_decl = clang::ObjCInterfaceDecl::Create(
-      *ast_ctx, ast_ctx->getTranslationUnitDecl(), clang::SourceLocation(),
+      ast_ctx, ast_ctx.getTranslationUnitDecl(), clang::SourceLocation(),
       &identifier_info, nullptr, nullptr);
 
   ClangASTMetadata meta_data;
   meta_data.SetISAPtr(isa);
-  m_external_source->SetMetadata(new_iface_decl, meta_data);
+  m_ast_ctx.SetMetadata(new_iface_decl, meta_data);
 
   new_iface_decl->setHasExternalVisibleStorage();
   new_iface_decl->setHasExternalLexicalStorage();
 
-  ast_ctx->getTranslationUnitDecl()->addDecl(new_iface_decl);
+  ast_ctx.getTranslationUnitDecl()->addDecl(new_iface_decl);
 
   m_isa_to_interface[isa] = new_iface_decl;
 
@@ -316,7 +309,8 @@
   }
 
   clang::ObjCMethodDecl *
-  BuildMethod(clang::ObjCInterfaceDecl *interface_decl, const char *name,
+  BuildMethod(ClangASTContext &clang_ast_ctxt,
+              clang::ObjCInterfaceDecl *interface_decl, const char *name,
               bool instance,
               ObjCLanguageRuntime::EncodingToTypeSP type_realizer_sp) {
     if (!m_is_valid || m_type_vector.size() < 3)
@@ -326,7 +320,8 @@
 
     const bool isInstance = instance;
     const bool isVariadic = false;
-    const bool isSynthesized = false;
+    const bool isPropertyAccessor = false;
+    const bool isSynthesizedAccessorStub = false;
     const bool isImplicitlyDeclared = true;
     const bool isDefined = false;
     const clang::ObjCMethodDecl::ImplementationControl impControl =
@@ -364,8 +359,7 @@
 
     clang::QualType ret_type =
         ClangUtil::GetQualType(type_realizer_sp->RealizeType(
-            interface_decl->getASTContext(), m_type_vector[0].c_str(),
-            for_expression));
+            clang_ast_ctxt, m_type_vector[0].c_str(), for_expression));
 
     if (ret_type.isNull())
       return nullptr;
@@ -373,8 +367,8 @@
     clang::ObjCMethodDecl *ret = clang::ObjCMethodDecl::Create(
         ast_ctx, clang::SourceLocation(), clang::SourceLocation(), sel,
         ret_type, nullptr, interface_decl, isInstance, isVariadic,
-        isSynthesized, isImplicitlyDeclared, isDefined, impControl,
-        HasRelatedResultType);
+        isPropertyAccessor, isSynthesizedAccessorStub, isImplicitlyDeclared,
+        isDefined, impControl, HasRelatedResultType);
 
     std::vector<clang::ParmVarDecl *> parm_vars;
 
@@ -382,7 +376,7 @@
       const bool for_expression = true;
       clang::QualType arg_type =
           ClangUtil::GetQualType(type_realizer_sp->RealizeType(
-              ast_ctx, m_type_vector[ai].c_str(), for_expression));
+              clang_ast_ctxt, m_type_vector[ai].c_str(), for_expression));
 
       if (arg_type.isNull())
         return nullptr; // well, we just wasted a bunch of time.  Wish we could
@@ -417,7 +411,7 @@
   Log *log(GetLogIfAllCategoriesSet(
       LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
 
-  ClangASTMetadata *metadata = m_external_source->GetMetadata(interface_decl);
+  ClangASTMetadata *metadata = m_ast_ctx.GetMetadata(interface_decl);
   ObjCLanguageRuntime::ObjCISA objc_isa = 0;
   if (metadata)
     objc_isa = metadata->GetISAPtr();
@@ -447,9 +441,9 @@
       return;
 
     FinishDecl(superclass_decl);
-    clang::ASTContext *context = m_ast_ctx.getASTContext();
-    interface_decl->setSuperClass(context->getTrivialTypeSourceInfo(
-        context->getObjCInterfaceType(superclass_decl)));
+    clang::ASTContext &context = m_ast_ctx.getASTContext();
+    interface_decl->setSuperClass(context.getTrivialTypeSourceInfo(
+        context.getObjCInterfaceType(superclass_decl)));
   };
 
   auto instance_method_func =
@@ -459,11 +453,10 @@
 
     ObjCRuntimeMethodType method_type(types);
 
-    clang::ObjCMethodDecl *method_decl =
-        method_type.BuildMethod(interface_decl, name, true, m_type_realizer_sp);
+    clang::ObjCMethodDecl *method_decl = method_type.BuildMethod(
+        m_ast_ctx, interface_decl, name, true, m_type_realizer_sp);
 
-    if (log)
-      log->Printf("[  AOTV::FD] Instance method [%s] [%s]", name, types);
+    LLDB_LOGF(log, "[  AOTV::FD] Instance method [%s] [%s]", name, types);
 
     if (method_decl)
       interface_decl->addDecl(method_decl);
@@ -479,10 +472,9 @@
     ObjCRuntimeMethodType method_type(types);
 
     clang::ObjCMethodDecl *method_decl = method_type.BuildMethod(
-        interface_decl, name, false, m_type_realizer_sp);
+        m_ast_ctx, interface_decl, name, false, m_type_realizer_sp);
 
-    if (log)
-      log->Printf("[  AOTV::FD] Class method [%s] [%s]", name, types);
+    LLDB_LOGF(log, "[  AOTV::FD] Class method [%s] [%s]", name, types);
 
     if (method_decl)
       interface_decl->addDecl(method_decl);
@@ -498,10 +490,9 @@
 
     const bool for_expression = false;
 
-    if (log)
-      log->Printf(
-          "[  AOTV::FD] Instance variable [%s] [%s], offset at %" PRIx64, name,
-          type, offset_ptr);
+    LLDB_LOGF(log,
+              "[  AOTV::FD] Instance variable [%s] [%s], offset at %" PRIx64,
+              name, type, offset_ptr);
 
     CompilerType ivar_type = m_runtime.GetEncodingToType()->RealizeType(
         m_ast_ctx, type, for_expression);
@@ -510,8 +501,8 @@
       clang::TypeSourceInfo *const type_source_info = nullptr;
       const bool is_synthesized = false;
       clang::ObjCIvarDecl *ivar_decl = clang::ObjCIvarDecl::Create(
-          *m_ast_ctx.getASTContext(), interface_decl, clang::SourceLocation(),
-          clang::SourceLocation(), &m_ast_ctx.getASTContext()->Idents.get(name),
+          m_ast_ctx.getASTContext(), interface_decl, clang::SourceLocation(),
+          clang::SourceLocation(), &m_ast_ctx.getASTContext().Idents.get(name),
           ClangUtil::GetQualType(ivar_type),
           type_source_info, // TypeSourceInfo *
           clang::ObjCIvarDecl::Public, nullptr, is_synthesized);
@@ -524,44 +515,38 @@
     return false;
   };
 
-  if (log) {
-    ASTDumper method_dumper((clang::Decl *)interface_decl);
-
-    log->Printf("[AppleObjCDeclVendor::FinishDecl] Finishing Objective-C "
-                "interface for %s",
-                descriptor->GetClassName().AsCString());
-  }
+  LLDB_LOG(log,
+           "[AppleObjCDeclVendor::FinishDecl] Finishing Objective-C "
+           "interface for %s",
+           descriptor->GetClassName().AsCString());
 
   if (!descriptor->Describe(superclass_func, instance_method_func,
                             class_method_func, ivar_func))
     return false;
 
   if (log) {
-    ASTDumper method_dumper((clang::Decl *)interface_decl);
-
-    log->Printf(
+    LLDB_LOGF(
+        log,
         "[AppleObjCDeclVendor::FinishDecl] Finished Objective-C interface");
 
-    method_dumper.ToLog(log, "  [AOTV::FD] ");
+    LLDB_LOG(log, "  [AOTV::FD] {0}", ClangUtil::DumpDecl(interface_decl));
   }
 
   return true;
 }
 
-uint32_t
-AppleObjCDeclVendor::FindDecls(ConstString name, bool append,
-                               uint32_t max_matches,
-                               std::vector<clang::NamedDecl *> &decls) {
+uint32_t AppleObjCDeclVendor::FindDecls(ConstString name, bool append,
+                                        uint32_t max_matches,
+                                        std::vector<CompilerDecl> &decls) {
   static unsigned int invocation_id = 0;
   unsigned int current_id = invocation_id++;
 
   Log *log(GetLogIfAllCategoriesSet(
       LIBLLDB_LOG_EXPRESSIONS)); // FIXME - a more appropriate log channel?
 
-  if (log)
-    log->Printf("AppleObjCDeclVendor::FindDecls [%u] ('%s', %s, %u, )",
-                current_id, (const char *)name.AsCString(),
-                append ? "true" : "false", max_matches);
+  LLDB_LOGF(log, "AppleObjCDeclVendor::FindDecls [%u] ('%s', %s, %u, )",
+            current_id, (const char *)name.AsCString(),
+            append ? "true" : "false", max_matches);
 
   if (!append)
     decls.clear();
@@ -571,48 +556,47 @@
   do {
     // See if the type is already in our ASTContext.
 
-    clang::ASTContext *ast_ctx = m_ast_ctx.getASTContext();
+    clang::ASTContext &ast_ctx = m_ast_ctx.getASTContext();
 
     clang::IdentifierInfo &identifier_info =
-        ast_ctx->Idents.get(name.GetStringRef());
+        ast_ctx.Idents.get(name.GetStringRef());
     clang::DeclarationName decl_name =
-        ast_ctx->DeclarationNames.getIdentifier(&identifier_info);
+        ast_ctx.DeclarationNames.getIdentifier(&identifier_info);
 
     clang::DeclContext::lookup_result lookup_result =
-        ast_ctx->getTranslationUnitDecl()->lookup(decl_name);
+        ast_ctx.getTranslationUnitDecl()->lookup(decl_name);
 
     if (!lookup_result.empty()) {
       if (clang::ObjCInterfaceDecl *result_iface_decl =
               llvm::dyn_cast<clang::ObjCInterfaceDecl>(lookup_result[0])) {
         if (log) {
           clang::QualType result_iface_type =
-              ast_ctx->getObjCInterfaceType(result_iface_decl);
-          ASTDumper dumper(result_iface_type);
+              ast_ctx.getObjCInterfaceType(result_iface_decl);
 
           uint64_t isa_value = LLDB_INVALID_ADDRESS;
-          ClangASTMetadata *metadata =
-              m_external_source->GetMetadata(result_iface_decl);
+          ClangASTMetadata *metadata = m_ast_ctx.GetMetadata(result_iface_decl);
           if (metadata)
             isa_value = metadata->GetISAPtr();
 
-          log->Printf("AOCTV::FT [%u] Found %s (isa 0x%" PRIx64
-                      ") in the ASTContext",
-                      current_id, dumper.GetCString(), isa_value);
+          LLDB_LOG(log,
+                   "AOCTV::FT [%u] Found %s (isa 0x%" PRIx64
+                   ") in the ASTContext",
+                   current_id, result_iface_type.getAsString(), isa_value);
         }
 
-        decls.push_back(result_iface_decl);
+        decls.push_back(CompilerDecl(&m_ast_ctx, result_iface_decl));
         ret++;
         break;
       } else {
-        if (log)
-          log->Printf("AOCTV::FT [%u] There's something in the ASTContext, but "
-                      "it's not something we know about",
-                      current_id);
+        LLDB_LOGF(log,
+                  "AOCTV::FT [%u] There's something in the ASTContext, but "
+                  "it's not something we know about",
+                  current_id);
         break;
       }
     } else if (log) {
-      log->Printf("AOCTV::FT [%u] Couldn't find %s in the ASTContext",
-                  current_id, name.AsCString());
+      LLDB_LOGF(log, "AOCTV::FT [%u] Couldn't find %s in the ASTContext",
+                current_id, name.AsCString());
     }
 
     // It's not.  If it exists, we have to put it into our ASTContext.
@@ -620,8 +604,7 @@
     ObjCLanguageRuntime::ObjCISA isa = m_runtime.GetISA(name);
 
     if (!isa) {
-      if (log)
-        log->Printf("AOCTV::FT [%u] Couldn't find the isa", current_id);
+      LLDB_LOGF(log, "AOCTV::FT [%u] Couldn't find the isa", current_id);
 
       break;
     }
@@ -629,34 +612,25 @@
     clang::ObjCInterfaceDecl *iface_decl = GetDeclForISA(isa);
 
     if (!iface_decl) {
-      if (log)
-        log->Printf("AOCTV::FT [%u] Couldn't get the Objective-C interface for "
-                    "isa 0x%" PRIx64,
-                    current_id, (uint64_t)isa);
+      LLDB_LOGF(log,
+                "AOCTV::FT [%u] Couldn't get the Objective-C interface for "
+                "isa 0x%" PRIx64,
+                current_id, (uint64_t)isa);
 
       break;
     }
 
     if (log) {
-      clang::QualType new_iface_type =
-          ast_ctx->getObjCInterfaceType(iface_decl);
-      ASTDumper dumper(new_iface_type);
-      log->Printf("AOCTV::FT [%u] Created %s (isa 0x%" PRIx64 ")", current_id,
-                  dumper.GetCString(), (uint64_t)isa);
+      clang::QualType new_iface_type = ast_ctx.getObjCInterfaceType(iface_decl);
+
+      LLDB_LOG(log, "AOCTV::FT [{0}] Created {1} (isa 0x{2:x})", current_id,
+               new_iface_type.getAsString(), (uint64_t)isa);
     }
 
-    decls.push_back(iface_decl);
+    decls.push_back(CompilerDecl(&m_ast_ctx, iface_decl));
     ret++;
     break;
   } while (false);
 
   return ret;
 }
-
-clang::ExternalASTMerger::ImporterSource
-AppleObjCDeclVendor::GetImporterSource() {
-        return {*m_ast_ctx.getASTContext(),
-                *m_ast_ctx.getFileManager(),
-                m_ast_ctx.GetOriginMap()
-        };
-}
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h
index 77b30b7..f49ca35 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h
@@ -10,23 +10,25 @@
 #define liblldb_AppleObjCDeclVendor_h_
 
 #include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/DeclVendor.h"
 #include "lldb/lldb-private.h"
 
+#include "Plugins/ExpressionParser/Clang/ClangDeclVendor.h"
 #include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
 
 namespace lldb_private {
 
 class AppleObjCExternalASTSource;
 
-class AppleObjCDeclVendor : public DeclVendor {
+class AppleObjCDeclVendor : public ClangDeclVendor {
 public:
   AppleObjCDeclVendor(ObjCLanguageRuntime &runtime);
 
-  uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches,
-                     std::vector<clang::NamedDecl *> &decls) override;
+  static bool classof(const DeclVendor *vendor) {
+    return vendor->GetKind() == eAppleObjCDeclVendor;
+  }
 
-  clang::ExternalASTMerger::ImporterSource GetImporterSource() override;
+  uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches,
+                     std::vector<CompilerDecl> &decls) override;
 
   friend class AppleObjCExternalASTSource;
 
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
index 52ed362..7076959 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp
@@ -111,7 +111,10 @@
     }
   } else {
     // If it is not a pointer, see if we can make it into a pointer.
-    ClangASTContext *ast_context = target->GetScratchClangASTContext();
+    ClangASTContext *ast_context = ClangASTContext::GetScratch(*target);
+    if (!ast_context)
+      return false;
+
     CompilerType opaque_type = ast_context->GetBasicType(eBasicTypeObjCID);
     if (!opaque_type)
       opaque_type = ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
@@ -123,7 +126,9 @@
   arg_value_list.PushValue(value);
 
   // This is the return value:
-  ClangASTContext *ast_context = target->GetScratchClangASTContext();
+  ClangASTContext *ast_context = ClangASTContext::GetScratch(*target);
+  if (!ast_context)
+    return false;
 
   CompilerType return_compiler_type = ast_context->GetCStringType(true);
   Value ret;
@@ -223,11 +228,14 @@
     SymbolContextList contexts;
     SymbolContext context;
 
-    if ((!modules.FindSymbolsWithNameAndType(ConstString("_NSPrintForDebugger"),
-                                             eSymbolTypeCode, contexts)) &&
-        (!modules.FindSymbolsWithNameAndType(ConstString("_CFPrintForDebugger"),
-                                             eSymbolTypeCode, contexts)))
-      return nullptr;
+    modules.FindSymbolsWithNameAndType(ConstString("_NSPrintForDebugger"),
+                                        eSymbolTypeCode, contexts);
+    if (contexts.IsEmpty()) {
+      modules.FindSymbolsWithNameAndType(ConstString("_CFPrintForDebugger"),
+                                         eSymbolTypeCode, contexts);
+      if (contexts.IsEmpty())
+        return nullptr;
+    }
 
     contexts.GetContextAtIndex(0, context);
 
@@ -444,10 +452,12 @@
 
   SymbolContextList sc_list;
 
-  return target.GetImages().FindSymbolsWithNameAndType(
-             s_method_signature, eSymbolTypeCode, sc_list) ||
-         target.GetImages().FindSymbolsWithNameAndType(
-             s_arclite_method_signature, eSymbolTypeCode, sc_list);
+  target.GetImages().FindSymbolsWithNameAndType(s_method_signature,
+                                                eSymbolTypeCode, sc_list);
+  if (sc_list.IsEmpty())
+    target.GetImages().FindSymbolsWithNameAndType(s_arclite_method_signature,
+                                                  eSymbolTypeCode, sc_list);
+  return !sc_list.IsEmpty();
 }
 
 lldb::SearchFilterSP AppleObjCRuntime::CreateExceptionSearchFilter() {
@@ -489,9 +499,12 @@
   reserved_dict = reserved_dict->GetSyntheticValue();
   if (!reserved_dict) return ThreadSP();
 
+  ClangASTContext *clang_ast_context =
+      ClangASTContext::GetScratch(*exception_sp->GetTargetSP());
+  if (!clang_ast_context)
+    return ThreadSP();
   CompilerType objc_id =
-      exception_sp->GetTargetSP()->GetScratchClangASTContext()->GetBasicType(
-          lldb::eBasicTypeObjCID);
+      clang_ast_context->GetBasicType(lldb::eBasicTypeObjCID);
   ValueObjectSP return_addresses;
 
   auto objc_object_from_address = [&exception_sp, &objc_id](uint64_t addr,
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
index c8884fd..88bfe2c 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp
@@ -395,10 +395,11 @@
                         new ClassDescriptorV1(isa, process_sp));
 
                     if (log && log->GetVerbose())
-                      log->Printf("AppleObjCRuntimeV1 added (ObjCISA)0x%" PRIx64
-                                  " from _objc_debug_class_hash to "
-                                  "isa->descriptor cache",
-                                  isa);
+                      LLDB_LOGF(log,
+                                "AppleObjCRuntimeV1 added (ObjCISA)0x%" PRIx64
+                                " from _objc_debug_class_hash to "
+                                "isa->descriptor cache",
+                                isa);
 
                     AddClass(isa, descriptor_sp);
                   }
@@ -417,7 +418,8 @@
                           new ClassDescriptorV1(isa, process_sp));
 
                       if (log && log->GetVerbose())
-                        log->Printf(
+                        LLDB_LOGF(
+                            log,
                             "AppleObjCRuntimeV1 added (ObjCISA)0x%" PRIx64
                             " from _objc_debug_class_hash to isa->descriptor "
                             "cache",
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
index 635eaff..4015f10 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp
@@ -582,9 +582,9 @@
     case 0:
       break;
     case 1: {
-      regex_up.reset(new RegularExpression());
-      if (!regex_up->Compile(llvm::StringRef::withNullAsEmpty(
-              command.GetArgumentAtIndex(0)))) {
+      regex_up.reset(new RegularExpression(
+          llvm::StringRef::withNullAsEmpty(command.GetArgumentAtIndex(0))));
+      if (!regex_up->IsValid()) {
         result.AppendError(
             "invalid argument - please provide a valid regular expression");
         result.SetStatus(lldb::eReturnStatusFailed);
@@ -1209,11 +1209,11 @@
           objc_class_sp = GetClassDescriptorFromISA(isa);
           if (isa && !objc_class_sp) {
             Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-            if (log)
-              log->Printf("0x%" PRIx64
-                          ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was "
-                          "not in class descriptor cache 0x%" PRIx64,
-                          isa_pointer, isa);
+            LLDB_LOGF(log,
+                      "0x%" PRIx64
+                      ": AppleObjCRuntimeV2::GetClassDescriptor() ISA was "
+                      "not in class descriptor cache 0x%" PRIx64,
+                      isa_pointer, isa);
           }
         }
       }
@@ -1301,7 +1301,7 @@
     return DescriptorMapUpdateResult::Fail();
 
   thread_sp->CalculateExecutionContext(exe_ctx);
-  ClangASTContext *ast = process->GetTarget().GetScratchClangASTContext();
+  ClangASTContext *ast = ClangASTContext::GetScratch(process->GetTarget());
 
   if (!ast)
     return DescriptorMapUpdateResult::Fail();
@@ -1317,8 +1317,7 @@
   // Read the total number of classes from the hash table
   const uint32_t num_classes = hash_table.GetCount();
   if (num_classes == 0) {
-    if (log)
-      log->Printf("No dynamic classes found in gdb_objc_realized_classes.");
+    LLDB_LOGF(log, "No dynamic classes found in gdb_objc_realized_classes.");
     return DescriptorMapUpdateResult::Success(0);
   }
 
@@ -1337,17 +1336,16 @@
         g_get_dynamic_class_info_body, eLanguageTypeObjC,
         g_get_dynamic_class_info_name, error));
     if (error.Fail()) {
-      if (log)
-        log->Printf(
-            "Failed to get Utility Function for implementation lookup: %s",
-            error.AsCString());
+      LLDB_LOGF(log,
+                "Failed to get Utility Function for implementation lookup: %s",
+                error.AsCString());
       m_get_class_info_code.reset();
     } else {
       diagnostics.Clear();
 
       if (!m_get_class_info_code->Install(diagnostics, exe_ctx)) {
         if (log) {
-          log->Printf("Failed to install implementation lookup");
+          LLDB_LOGF(log, "Failed to install implementation lookup");
           diagnostics.Dump(log);
         }
         m_get_class_info_code.reset();
@@ -1372,17 +1370,16 @@
         clang_uint32_t_type, arguments, thread_sp, error);
 
     if (error.Fail()) {
-      if (log)
-        log->Printf(
-            "Failed to make function caller for implementation lookup: %s.",
-            error.AsCString());
+      LLDB_LOGF(log,
+                "Failed to make function caller for implementation lookup: %s.",
+                error.AsCString());
       return DescriptorMapUpdateResult::Fail();
     }
   } else {
     get_class_info_function = m_get_class_info_code->GetFunctionCaller();
     if (!get_class_info_function) {
       if (log) {
-        log->Printf("Failed to get implementation lookup function caller.");
+        LLDB_LOGF(log, "Failed to get implementation lookup function caller.");
         diagnostics.Dump(log);
       }
 
@@ -1399,10 +1396,10 @@
       class_infos_byte_size, ePermissionsReadable | ePermissionsWritable, err);
 
   if (class_infos_addr == LLDB_INVALID_ADDRESS) {
-    if (log)
-      log->Printf("unable to allocate %" PRIu32
-                  " bytes in process for shared cache read",
-                  class_infos_byte_size);
+    LLDB_LOGF(log,
+              "unable to allocate %" PRIu32
+              " bytes in process for shared cache read",
+              class_infos_byte_size);
     return DescriptorMapUpdateResult::Fail();
   }
 
@@ -1451,8 +1448,7 @@
     if (results == eExpressionCompleted) {
       // The result is the number of ClassInfo structures that were filled in
       num_class_infos = return_value.GetScalar().ULong();
-      if (log)
-        log->Printf("Discovered %u ObjC classes\n", num_class_infos);
+      LLDB_LOGF(log, "Discovered %u ObjC classes\n", num_class_infos);
       if (num_class_infos > 0) {
         // Read the ClassInfo structures
         DataBufferHeap buffer(num_class_infos * class_info_byte_size, 0);
@@ -1468,13 +1464,13 @@
       success = true;
     } else {
       if (log) {
-        log->Printf("Error evaluating our find class name function.");
+        LLDB_LOGF(log, "Error evaluating our find class name function.");
         diagnostics.Dump(log);
       }
     }
   } else {
     if (log) {
-      log->Printf("Error writing function arguments.");
+      LLDB_LOGF(log, "Error writing function arguments.");
       diagnostics.Dump(log);
     }
   }
@@ -1507,17 +1503,18 @@
 
     if (isa == 0) {
       if (should_log)
-        log->Printf(
-            "AppleObjCRuntimeV2 found NULL isa, ignoring this class info");
+        LLDB_LOGF(
+            log, "AppleObjCRuntimeV2 found NULL isa, ignoring this class info");
       continue;
     }
     // Check if we already know about this ISA, if we do, the info will never
     // change, so we can just skip it.
     if (ISAIsCached(isa)) {
       if (should_log)
-        log->Printf("AppleObjCRuntimeV2 found cached isa=0x%" PRIx64
-                    ", ignoring this class info",
-                    isa);
+        LLDB_LOGF(log,
+                  "AppleObjCRuntimeV2 found cached isa=0x%" PRIx64
+                  ", ignoring this class info",
+                  isa);
       offset += 4;
     } else {
       // Read the 32 bit hash for the class name
@@ -1536,15 +1533,16 @@
         AddClass(isa, descriptor_sp, descriptor_sp->GetClassName().AsCString(nullptr));
       num_parsed++;
       if (should_log)
-        log->Printf("AppleObjCRuntimeV2 added isa=0x%" PRIx64
-                    ", hash=0x%8.8x, name=%s",
-                    isa, name_hash,
-                    descriptor_sp->GetClassName().AsCString("<unknown>"));
+        LLDB_LOGF(log,
+                  "AppleObjCRuntimeV2 added isa=0x%" PRIx64
+                  ", hash=0x%8.8x, name=%s",
+                  isa, name_hash,
+                  descriptor_sp->GetClassName().AsCString("<unknown>"));
     }
   }
   if (should_log)
-    log->Printf("AppleObjCRuntimeV2 parsed %" PRIu32 " class infos",
-                num_parsed);
+    LLDB_LOGF(log, "AppleObjCRuntimeV2 parsed %" PRIu32 " class infos",
+              num_parsed);
   return num_parsed;
 }
 
@@ -1565,7 +1563,7 @@
     return DescriptorMapUpdateResult::Fail();
 
   thread_sp->CalculateExecutionContext(exe_ctx);
-  ClangASTContext *ast = process->GetTarget().GetScratchClangASTContext();
+  ClangASTContext *ast = ClangASTContext::GetScratch(process->GetTarget());
 
   if (!ast)
     return DescriptorMapUpdateResult::Fail();
@@ -1603,7 +1601,7 @@
     // use that in our jitted expression.  Else fall back to the old
     // class_getName.
     static ConstString g_class_getName_symbol_name("class_getName");
-    static ConstString g_class_getNameRaw_symbol_name("class_getNameRaw");
+    static ConstString g_class_getNameRaw_symbol_name("objc_debug_class_getNameRaw");
     ConstString class_name_getter_function_name = g_class_getName_symbol_name;
 
     ObjCLanguageRuntime *objc_runtime = ObjCLanguageRuntime::Get(*process);
@@ -1627,36 +1625,29 @@
     // Substitute in the correct class_getName / class_getNameRaw function name,
     // concatenate the two parts of our expression text.  The format string
     // has two %s's, so provide the name twice.
-    int prefix_string_size = snprintf (nullptr, 0, 
+    std::string shared_class_expression;
+    llvm::raw_string_ostream(shared_class_expression) << llvm::format(
                                g_shared_cache_class_name_funcptr,
                                class_name_getter_function_name.AsCString(),
                                class_name_getter_function_name.AsCString());
 
-    char *class_name_func_ptr_expr = (char*) malloc (prefix_string_size + 1);
-    snprintf (class_name_func_ptr_expr, prefix_string_size + 1,
-              g_shared_cache_class_name_funcptr,
-              class_name_getter_function_name.AsCString(),
-              class_name_getter_function_name.AsCString());
-    std::string shared_class_expression = class_name_func_ptr_expr;
     shared_class_expression += g_get_shared_cache_class_info_body;
-    free (class_name_func_ptr_expr);
 
     m_get_shared_cache_class_info_code.reset(
         GetTargetRef().GetUtilityFunctionForLanguage(
             shared_class_expression.c_str(), eLanguageTypeObjC,
             g_get_shared_cache_class_info_name, error));
     if (error.Fail()) {
-      if (log)
-        log->Printf(
-            "Failed to get Utility function for implementation lookup: %s.",
-            error.AsCString());
+      LLDB_LOGF(log,
+                "Failed to get Utility function for implementation lookup: %s.",
+                error.AsCString());
       m_get_shared_cache_class_info_code.reset();
     } else {
       diagnostics.Clear();
 
       if (!m_get_shared_cache_class_info_code->Install(diagnostics, exe_ctx)) {
         if (log) {
-          log->Printf("Failed to install implementation lookup.");
+          LLDB_LOGF(log, "Failed to install implementation lookup.");
           diagnostics.Dump(log);
         }
         m_get_shared_cache_class_info_code.reset();
@@ -1703,10 +1694,10 @@
       class_infos_byte_size, ePermissionsReadable | ePermissionsWritable, err);
 
   if (class_infos_addr == LLDB_INVALID_ADDRESS) {
-    if (log)
-      log->Printf("unable to allocate %" PRIu32
-                  " bytes in process for shared cache read",
-                  class_infos_byte_size);
+    LLDB_LOGF(log,
+              "unable to allocate %" PRIu32
+              " bytes in process for shared cache read",
+              class_infos_byte_size);
     return DescriptorMapUpdateResult::Fail();
   }
 
@@ -1757,9 +1748,8 @@
     if (results == eExpressionCompleted) {
       // The result is the number of ClassInfo structures that were filled in
       num_class_infos = return_value.GetScalar().ULong();
-      if (log)
-        log->Printf("Discovered %u ObjC classes in shared cache\n",
-                    num_class_infos);
+      LLDB_LOGF(log, "Discovered %u ObjC classes in shared cache\n",
+                num_class_infos);
       assert(num_class_infos <= num_classes);
       if (num_class_infos > 0) {
         if (num_class_infos > num_classes) {
@@ -1786,13 +1776,13 @@
       }
     } else {
       if (log) {
-        log->Printf("Error evaluating our find class name function.");
+        LLDB_LOGF(log, "Error evaluating our find class name function.");
         diagnostics.Dump(log);
       }
     }
   } else {
     if (log) {
-      log->Printf("Error writing function arguments.");
+      LLDB_LOGF(log, "Error writing function arguments.");
       diagnostics.Dump(log);
     }
   }
@@ -1827,9 +1817,10 @@
           new ClassDescriptorV2(*this, elt.second, elt.first.AsCString()));
 
       if (log && log->GetVerbose())
-        log->Printf("AppleObjCRuntimeV2 added (ObjCISA)0x%" PRIx64
-                    " (%s) from dynamic table to isa->descriptor cache",
-                    elt.second, elt.first.AsCString());
+        LLDB_LOGF(log,
+                  "AppleObjCRuntimeV2 added (ObjCISA)0x%" PRIx64
+                  " (%s) from dynamic table to isa->descriptor cache",
+                  elt.second, elt.first.AsCString());
 
       AddClass(elt.second, descriptor_sp, elt.first.AsCString());
     }
@@ -1912,14 +1903,14 @@
       DescriptorMapUpdateResult shared_cache_update_result =
           UpdateISAToDescriptorMapSharedCache();
 
-      if (log)
-        log->Printf("attempted to read objc class data - results: "
-                    "[dynamic_update]: ran: %s, count: %" PRIu32
-                    " [shared_cache_update]: ran: %s, count: %" PRIu32,
-                    dynamic_update_result.m_update_ran ? "yes" : "no",
-                    dynamic_update_result.m_num_found,
-                    shared_cache_update_result.m_update_ran ? "yes" : "no",
-                    shared_cache_update_result.m_num_found);
+      LLDB_LOGF(log,
+                "attempted to read objc class data - results: "
+                "[dynamic_update]: ran: %s, count: %" PRIu32
+                " [shared_cache_update]: ran: %s, count: %" PRIu32,
+                dynamic_update_result.m_update_ran ? "yes" : "no",
+                dynamic_update_result.m_num_found,
+                shared_cache_update_result.m_update_ran ? "yes" : "no",
+                shared_cache_update_result.m_num_found);
 
       // warn if:
       // - we could not run either expression
@@ -1987,36 +1978,6 @@
   }
 }
 
-ConstString
-AppleObjCRuntimeV2::GetActualTypeName(ObjCLanguageRuntime::ObjCISA isa) {
-  if (isa == g_objc_Tagged_ISA) {
-    static const ConstString g_objc_tagged_isa_name("_lldb_Tagged_ObjC_ISA");
-    return g_objc_tagged_isa_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSAtom) {
-    static const ConstString g_objc_tagged_isa_nsatom_name("NSAtom");
-    return g_objc_tagged_isa_nsatom_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSNumber) {
-    static const ConstString g_objc_tagged_isa_nsnumber_name("NSNumber");
-    return g_objc_tagged_isa_nsnumber_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSDateTS) {
-    static const ConstString g_objc_tagged_isa_nsdatets_name("NSDateTS");
-    return g_objc_tagged_isa_nsdatets_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSManagedObject) {
-    static const ConstString g_objc_tagged_isa_nsmanagedobject_name(
-        "NSManagedObject");
-    return g_objc_tagged_isa_nsmanagedobject_name;
-  }
-  if (isa == g_objc_Tagged_ISA_NSDate) {
-    static const ConstString g_objc_tagged_isa_nsdate_name("NSDate");
-    return g_objc_tagged_isa_nsdate_name;
-  }
-  return ObjCLanguageRuntime::GetActualTypeName(isa);
-}
-
 DeclVendor *AppleObjCRuntimeV2::GetDeclVendor() {
   if (!m_decl_vendor_up)
     m_decl_vendor_up.reset(new AppleObjCDeclVendor(*this));
@@ -2032,8 +1993,8 @@
   if (name_cstr) {
     llvm::StringRef name_strref(name_cstr);
 
-    static const llvm::StringRef ivar_prefix("OBJC_IVAR_$_");
-    static const llvm::StringRef class_prefix("OBJC_CLASS_$_");
+    llvm::StringRef ivar_prefix("OBJC_IVAR_$_");
+    llvm::StringRef class_prefix("OBJC_CLASS_$_");
 
     if (name_strref.startswith(ivar_prefix)) {
       llvm::StringRef ivar_skipped_prefix =
@@ -2516,8 +2477,7 @@
     ObjCISA isa, ObjCISA &ret_isa) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TYPES));
 
-  if (log)
-    log->Printf("AOCRT::NPI Evalulate(isa = 0x%" PRIx64 ")", (uint64_t)isa);
+  LLDB_LOGF(log, "AOCRT::NPI Evalulate(isa = 0x%" PRIx64 ")", (uint64_t)isa);
 
   if ((isa & ~m_objc_debug_isa_class_mask) == 0)
     return false;
@@ -2543,10 +2503,10 @@
       // read the count again, and update the cache if the count has been
       // updated.
       if (index > m_indexed_isa_cache.size()) {
-        if (log)
-          log->Printf("AOCRT::NPI (index = %" PRIu64
-                      ") exceeds cache (size = %" PRIu64 ")",
-                      (uint64_t)index, (uint64_t)m_indexed_isa_cache.size());
+        LLDB_LOGF(log,
+                  "AOCRT::NPI (index = %" PRIu64
+                  ") exceeds cache (size = %" PRIu64 ")",
+                  (uint64_t)index, (uint64_t)m_indexed_isa_cache.size());
 
         Process *process(m_runtime.GetProcess());
 
@@ -2561,9 +2521,8 @@
         if (error.Fail())
           return false;
 
-        if (log)
-          log->Printf("AOCRT::NPI (new class count = %" PRIu64 ")",
-                      (uint64_t)objc_indexed_classes_count);
+        LLDB_LOGF(log, "AOCRT::NPI (new class count = %" PRIu64 ")",
+                  (uint64_t)objc_indexed_classes_count);
 
         if (objc_indexed_classes_count > m_indexed_isa_cache.size()) {
           // Read the class entries we don't have.  We should just read all of
@@ -2581,9 +2540,8 @@
           if (error.Fail() || bytes_read != buffer.GetByteSize())
             return false;
 
-          if (log)
-            log->Printf("AOCRT::NPI (read new classes count = %" PRIu64 ")",
-                        (uint64_t)num_new_classes);
+          LLDB_LOGF(log, "AOCRT::NPI (read new classes count = %" PRIu64 ")",
+                    (uint64_t)num_new_classes);
 
           // Append the new entries to the existing cache.
           DataExtractor data(buffer.GetBytes(), buffer.GetByteSize(),
@@ -2600,9 +2558,8 @@
       if (index > m_indexed_isa_cache.size())
         return false;
 
-      if (log)
-        log->Printf("AOCRT::NPI Evalulate(ret_isa = 0x%" PRIx64 ")",
-                    (uint64_t)m_indexed_isa_cache[index]);
+      LLDB_LOGF(log, "AOCRT::NPI Evalulate(ret_isa = 0x%" PRIx64 ")",
+                (uint64_t)m_indexed_isa_cache[index]);
 
       ret_isa = m_indexed_isa_cache[index];
       return (ret_isa != 0); // this is a pointer so 0 is not a valid value
@@ -2647,8 +2604,9 @@
   std::function<lldb::addr_t(ConstString)> get_symbol =
       [this](ConstString sym) -> lldb::addr_t {
     SymbolContextList sc_list;
-    if (GetProcess()->GetTarget().GetImages().FindSymbolsWithNameAndType(
-            sym, lldb::eSymbolTypeData, sc_list) == 1) {
+    GetProcess()->GetTarget().GetImages().FindSymbolsWithNameAndType(
+        sym, lldb::eSymbolTypeData, sc_list);
+    if (sc_list.GetSize() == 1) {
       SymbolContext sc;
       sc_list.GetContextAtIndex(0, sc);
       if (sc.symbol)
@@ -2684,10 +2642,12 @@
     const lldb::ABISP &abi = process_sp->GetABI();
     if (!abi) return;
 
-    CompilerType voidstar = process_sp->GetTarget()
-                                .GetScratchClangASTContext()
-                                ->GetBasicType(lldb::eBasicTypeVoid)
-                                .GetPointerType();
+    ClangASTContext *clang_ast_context =
+        ClangASTContext::GetScratch(process_sp->GetTarget());
+    if (!clang_ast_context)
+      return;
+    CompilerType voidstar =
+        clang_ast_context->GetBasicType(lldb::eBasicTypeVoid).GetPointerType();
 
     ValueList args;
     Value input_value;
@@ -2705,7 +2665,7 @@
     exception = ValueObjectRecognizerSynthesizedValue::Create(
         *exception, eValueTypeVariableArgument);
     exception = exception->GetDynamicValue(eDynamicDontRunTarget);
-      
+
     m_arguments = ValueObjectListSP(new ValueObjectList());
     m_arguments->Append(exception);
   }
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
index a0fd39d..785bb39 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h
@@ -69,8 +69,6 @@
 
   void UpdateISAToDescriptorMapIfNeeded() override;
 
-  ConstString GetActualTypeName(ObjCLanguageRuntime::ObjCISA isa) override;
-
   ClassDescriptorSP GetClassDescriptor(ValueObject &in_value) override;
 
   ClassDescriptorSP GetClassDescriptorFromISA(ObjCISA isa) override;
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
index b3eb09c..36f95c0 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp
@@ -522,7 +522,10 @@
     const ABI *abi = process->GetABI().get();
 
     ClangASTContext *clang_ast_context =
-        process->GetTarget().GetScratchClangASTContext();
+        ClangASTContext::GetScratch(process->GetTarget());
+    if (!clang_ast_context)
+      return false;
+
     ValueList argument_values;
     Value input_value;
     CompilerType clang_void_ptr_type =
@@ -543,7 +546,7 @@
     Status error;
     DataExtractor data;
     error = argument_values.GetValueAtIndex(0)->GetValueAsData(&exe_ctx, data,
-                                                               0, nullptr);
+                                                               nullptr);
     lldb::offset_t offset = 0;
     lldb::addr_t region_addr = data.GetPointer(&offset);
 
@@ -593,7 +596,7 @@
     if (log) {
       StreamString s;
       m_regions.back().Dump(s);
-      log->Printf("Read vtable region: \n%s", s.GetData());
+      LLDB_LOGF(log, "Read vtable region: \n%s", s.GetData());
     }
 
     next_region = m_regions.back().GetNextRegionAddr();
@@ -704,7 +707,7 @@
     // step through any method dispatches.  Warn to that effect and get out of
     // here.
     if (process_sp->CanJIT()) {
-      process_sp->GetTarget().GetDebugger().GetErrorFile()->Printf(
+      process_sp->GetTarget().GetDebugger().GetErrorStream().Printf(
           "Could not find implementation lookup function \"%s\""
           " step in through ObjC method dispatch will not work.\n",
           get_impl_name.AsCString());
@@ -779,31 +782,33 @@
             m_lookup_implementation_function_code, eLanguageTypeObjC,
             g_lookup_implementation_function_name, error));
         if (error.Fail()) {
-          if (log)
-            log->Printf(
-                "Failed to get Utility Function for implementation lookup: %s.",
-                error.AsCString());
+          LLDB_LOGF(
+              log,
+              "Failed to get Utility Function for implementation lookup: %s.",
+              error.AsCString());
           m_impl_code.reset();
           return args_addr;
         }
 
         if (!m_impl_code->Install(diagnostics, exe_ctx)) {
           if (log) {
-            log->Printf("Failed to install implementation lookup.");
+            LLDB_LOGF(log, "Failed to install implementation lookup.");
             diagnostics.Dump(log);
           }
           m_impl_code.reset();
           return args_addr;
         }
       } else {
-        if (log)
-          log->Printf("No method lookup implementation code.");
+        LLDB_LOGF(log, "No method lookup implementation code.");
         return LLDB_INVALID_ADDRESS;
       }
 
       // Next make the runner function for our implementation utility function.
       ClangASTContext *clang_ast_context =
-          thread.GetProcess()->GetTarget().GetScratchClangASTContext();
+          ClangASTContext::GetScratch(thread.GetProcess()->GetTarget());
+      if (!clang_ast_context)
+        return LLDB_INVALID_ADDRESS;
+
       CompilerType clang_void_ptr_type =
           clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
       Status error;
@@ -811,10 +816,9 @@
       impl_function_caller = m_impl_code->MakeFunctionCaller(
           clang_void_ptr_type, dispatch_values, thread_sp, error);
       if (error.Fail()) {
-        if (log)
-          log->Printf(
-              "Error getting function caller for dispatch lookup: \"%s\".",
-              error.AsCString());
+        LLDB_LOGF(log,
+                  "Error getting function caller for dispatch lookup: \"%s\".",
+                  error.AsCString());
         return args_addr;
       }
     } else {
@@ -833,7 +837,7 @@
   if (!impl_function_caller->WriteFunctionArguments(
           exe_ctx, args_addr, dispatch_values, diagnostics)) {
     if (log) {
-      log->Printf("Error writing function arguments.");
+      LLDB_LOGF(log, "Error writing function arguments.");
       diagnostics.Dump(log);
     }
     return args_addr;
@@ -897,7 +901,10 @@
 
     TargetSP target_sp(thread.CalculateTarget());
 
-    ClangASTContext *clang_ast_context = target_sp->GetScratchClangASTContext();
+    ClangASTContext *clang_ast_context = ClangASTContext::GetScratch(*target_sp);
+    if (!clang_ast_context)
+      return ret_plan_sp;
+
     ValueList argument_values;
     Value void_ptr_value;
     CompilerType clang_void_ptr_type =
@@ -934,9 +941,9 @@
     lldb::addr_t obj_addr =
         argument_values.GetValueAtIndex(obj_index)->GetScalar().ULongLong();
     if (obj_addr == 0x0) {
-      if (log)
-        log->Printf(
-            "Asked to step to dispatch to nil object, returning empty plan.");
+      LLDB_LOGF(
+          log,
+          "Asked to step to dispatch to nil object, returning empty plan.");
       return ret_plan_sp;
     }
 
@@ -976,13 +983,11 @@
           if (super_value.GetScalar().IsValid())
             isa_addr = super_value.GetScalar().ULongLong();
           else {
-            if (log)
-              log->Printf("Failed to extract the super class value from the "
-                          "class in objc_super.");
+            LLDB_LOGF(log, "Failed to extract the super class value from the "
+                           "class in objc_super.");
           }
         } else {
-          if (log)
-            log->Printf("Failed to extract the class value from objc_super.");
+          LLDB_LOGF(log, "Failed to extract the class value from objc_super.");
         }
       } else {
         // In the objc_msgSendSuper case, we don't get the object
@@ -998,8 +1003,7 @@
         if (super_value.GetScalar().IsValid()) {
           isa_addr = super_value.GetScalar().ULongLong();
         } else {
-          if (log)
-            log->Printf("Failed to extract the class value from objc_super.");
+          LLDB_LOGF(log, "Failed to extract the class value from objc_super.");
         }
       }
     } else {
@@ -1022,8 +1026,7 @@
       if (isa_value.GetScalar().IsValid()) {
         isa_addr = isa_value.GetScalar().ULongLong();
       } else {
-        if (log)
-          log->Printf("Failed to extract the isa value from object.");
+        LLDB_LOGF(log, "Failed to extract the isa value from object.");
       }
     }
 
@@ -1033,9 +1036,10 @@
 
     if (isa_addr != LLDB_INVALID_ADDRESS) {
       if (log) {
-        log->Printf("Resolving call for class - 0x%" PRIx64
-                    " and selector - 0x%" PRIx64,
-                    isa_addr, sel_addr);
+        LLDB_LOGF(log,
+                  "Resolving call for class - 0x%" PRIx64
+                  " and selector - 0x%" PRIx64,
+                  isa_addr, sel_addr);
       }
       ObjCLanguageRuntime *objc_runtime =
           ObjCLanguageRuntime::Get(*thread.GetProcess());
@@ -1047,9 +1051,8 @@
     if (impl_addr != LLDB_INVALID_ADDRESS) {
       // Yup, it was in the cache, so we can run to that address directly.
 
-      if (log)
-        log->Printf("Found implementation address in cache: 0x%" PRIx64,
-                    impl_addr);
+      LLDB_LOGF(log, "Found implementation address in cache: 0x%" PRIx64,
+                impl_addr);
 
       ret_plan_sp = std::make_shared<ThreadPlanRunToAddress>(thread, impl_addr,
                                                              stop_others);
@@ -1137,7 +1140,7 @@
       if (log) {
         StreamString s;
         ret_plan_sp->GetDescription(&s, eDescriptionLevelFull);
-        log->Printf("Using ObjC step plan: %s.\n", s.GetData());
+        LLDB_LOGF(log, "Using ObjC step plan: %s.\n", s.GetData());
       }
     }
   }
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
index 26654e9..66f04be 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
@@ -18,7 +18,6 @@
 #include <vector>
 
 using namespace lldb_private;
-using namespace lldb_utility;
 
 AppleObjCTypeEncodingParser::AppleObjCTypeEncodingParser(
     ObjCLanguageRuntime &runtime)
@@ -27,21 +26,17 @@
     m_scratch_ast_ctx_up.reset(new ClangASTContext(runtime.GetProcess()
                                                        ->GetTarget()
                                                        .GetArchitecture()
-                                                       .GetTriple()
-                                                       .str()
-                                                       .c_str()));
+                                                       .GetTriple()));
 }
 
-std::string
-AppleObjCTypeEncodingParser::ReadStructName(lldb_utility::StringLexer &type) {
+std::string AppleObjCTypeEncodingParser::ReadStructName(StringLexer &type) {
   StreamString buffer;
   while (type.HasAtLeast(1) && type.Peek() != '=')
     buffer.Printf("%c", type.Next());
   return buffer.GetString();
 }
 
-std::string
-AppleObjCTypeEncodingParser::ReadQuotedString(lldb_utility::StringLexer &type) {
+std::string AppleObjCTypeEncodingParser::ReadQuotedString(StringLexer &type) {
   StreamString buffer;
   while (type.HasAtLeast(1) && type.Peek() != '"')
     buffer.Printf("%c", type.Next());
@@ -51,8 +46,7 @@
   return buffer.GetString();
 }
 
-uint32_t
-AppleObjCTypeEncodingParser::ReadNumber(lldb_utility::StringLexer &type) {
+uint32_t AppleObjCTypeEncodingParser::ReadNumber(StringLexer &type) {
   uint32_t total = 0;
   while (type.HasAtLeast(1) && isdigit(type.Peek()))
     total = 10 * total + (type.Next() - '0');
@@ -67,8 +61,8 @@
     : name(""), type(clang::QualType()), bitfield(0) {}
 
 AppleObjCTypeEncodingParser::StructElement
-AppleObjCTypeEncodingParser::ReadStructElement(clang::ASTContext &ast_ctx,
-                                               lldb_utility::StringLexer &type,
+AppleObjCTypeEncodingParser::ReadStructElement(ClangASTContext &ast_ctx,
+                                               StringLexer &type,
                                                bool for_expression) {
   StructElement retval;
   if (type.NextIf('"'))
@@ -81,25 +75,21 @@
   return retval;
 }
 
-clang::QualType
-AppleObjCTypeEncodingParser::BuildStruct(clang::ASTContext &ast_ctx,
-                                         lldb_utility::StringLexer &type,
-                                         bool for_expression) {
+clang::QualType AppleObjCTypeEncodingParser::BuildStruct(
+    ClangASTContext &ast_ctx, StringLexer &type, bool for_expression) {
   return BuildAggregate(ast_ctx, type, for_expression, '{', '}',
                         clang::TTK_Struct);
 }
 
-clang::QualType
-AppleObjCTypeEncodingParser::BuildUnion(clang::ASTContext &ast_ctx,
-                                        lldb_utility::StringLexer &type,
-                                        bool for_expression) {
+clang::QualType AppleObjCTypeEncodingParser::BuildUnion(
+    ClangASTContext &ast_ctx, StringLexer &type, bool for_expression) {
   return BuildAggregate(ast_ctx, type, for_expression, '(', ')',
                         clang::TTK_Union);
 }
 
 clang::QualType AppleObjCTypeEncodingParser::BuildAggregate(
-    clang::ASTContext &ast_ctx, lldb_utility::StringLexer &type,
-    bool for_expression, char opener, char closer, uint32_t kind) {
+    ClangASTContext &ast_ctx, StringLexer &type, bool for_expression,
+    char opener, char closer, uint32_t kind) {
   if (!type.NextIf(opener))
     return clang::QualType();
   std::string name(ReadStructName(type));
@@ -132,11 +122,8 @@
   if (is_templated)
     return clang::QualType(); // This is where we bail out.  Sorry!
 
-  ClangASTContext *lldb_ctx = ClangASTContext::GetASTContext(&ast_ctx);
-  if (!lldb_ctx)
-    return clang::QualType();
-  CompilerType union_type(lldb_ctx->CreateRecordType(
-      nullptr, lldb::eAccessPublic, name.c_str(), kind, lldb::eLanguageTypeC));
+  CompilerType union_type(ast_ctx.CreateRecordType(
+      nullptr, lldb::eAccessPublic, name, kind, lldb::eLanguageTypeC));
   if (union_type) {
     ClangASTContext::StartTagDeclarationDefinition(union_type);
 
@@ -148,9 +135,8 @@
         element.name = elem_name.GetString();
       }
       ClangASTContext::AddFieldToRecordType(
-          union_type, element.name.c_str(),
-          CompilerType(&ast_ctx, element.type), lldb::eAccessPublic,
-          element.bitfield);
+          union_type, element.name.c_str(), ast_ctx.GetType(element.type),
+          lldb::eAccessPublic, element.bitfield);
       ++count;
     }
     ClangASTContext::CompleteTagDeclarationDefinition(union_type);
@@ -158,21 +144,16 @@
   return ClangUtil::GetQualType(union_type);
 }
 
-clang::QualType
-AppleObjCTypeEncodingParser::BuildArray(clang::ASTContext &ast_ctx,
-                                        lldb_utility::StringLexer &type,
-                                        bool for_expression) {
+clang::QualType AppleObjCTypeEncodingParser::BuildArray(
+    ClangASTContext &ast_ctx, StringLexer &type, bool for_expression) {
   if (!type.NextIf('['))
     return clang::QualType();
   uint32_t size = ReadNumber(type);
   clang::QualType element_type(BuildType(ast_ctx, type, for_expression));
   if (!type.NextIf(']'))
     return clang::QualType();
-  ClangASTContext *lldb_ctx = ClangASTContext::GetASTContext(&ast_ctx);
-  if (!lldb_ctx)
-    return clang::QualType();
-  CompilerType array_type(lldb_ctx->CreateArrayType(
-      CompilerType(&ast_ctx, element_type), size, false));
+  CompilerType array_type(ast_ctx.CreateArrayType(
+      CompilerType(&ast_ctx, element_type.getAsOpaquePtr()), size, false));
   return ClangUtil::GetQualType(array_type);
 }
 
@@ -182,11 +163,12 @@
 // consume but ignore the type info and always return an 'id'; if anything,
 // dynamic typing will resolve things for us anyway
 clang::QualType AppleObjCTypeEncodingParser::BuildObjCObjectPointerType(
-    clang::ASTContext &ast_ctx, lldb_utility::StringLexer &type,
-    bool for_expression) {
+    ClangASTContext &clang_ast_ctx, StringLexer &type, bool for_expression) {
   if (!type.NextIf('@'))
     return clang::QualType();
 
+  clang::ASTContext &ast_ctx = clang_ast_ctx.getASTContext();
+
   std::string name;
 
   if (type.NextIf('"')) {
@@ -265,23 +247,25 @@
 }
 
 clang::QualType
-AppleObjCTypeEncodingParser::BuildType(clang::ASTContext &ast_ctx,
+AppleObjCTypeEncodingParser::BuildType(ClangASTContext &clang_ast_ctx,
                                        StringLexer &type, bool for_expression,
                                        uint32_t *bitfield_bit_size) {
   if (!type.HasAtLeast(1))
     return clang::QualType();
 
+  clang::ASTContext &ast_ctx = clang_ast_ctx.getASTContext();
+
   switch (type.Peek()) {
   default:
     break;
   case '{':
-    return BuildStruct(ast_ctx, type, for_expression);
+    return BuildStruct(clang_ast_ctx, type, for_expression);
   case '[':
-    return BuildArray(ast_ctx, type, for_expression);
+    return BuildArray(clang_ast_ctx, type, for_expression);
   case '(':
-    return BuildUnion(ast_ctx, type, for_expression);
+    return BuildUnion(clang_ast_ctx, type, for_expression);
   case '@':
-    return BuildObjCObjectPointerType(ast_ctx, type, for_expression);
+    return BuildObjCObjectPointerType(clang_ast_ctx, type, for_expression);
   }
 
   switch (type.Next()) {
@@ -297,10 +281,7 @@
   case 'l':
     return ast_ctx.getIntTypeForBitwidth(32, true);
   // this used to be done like this:
-  //   ClangASTContext *lldb_ctx = ClangASTContext::GetASTContext(&ast_ctx);
-  //   if (!lldb_ctx)
-  //      return clang::QualType();
-  //   return lldb_ctx->GetIntTypeFromBitSize(32, true).GetQualType();
+  //   return clang_ast_ctx->GetIntTypeFromBitSize(32, true).GetQualType();
   // which uses one of the constants if one is available, but we don't think
   // all this work is necessary.
   case 'q':
@@ -339,7 +320,8 @@
       return clang::QualType();
   }
   case 'r': {
-    clang::QualType target_type = BuildType(ast_ctx, type, for_expression);
+    clang::QualType target_type =
+        BuildType(clang_ast_ctx, type, for_expression);
     if (target_type.isNull())
       return clang::QualType();
     else if (target_type == ast_ctx.UnknownAnyTy)
@@ -356,7 +338,8 @@
       // practical cases
       return ast_ctx.VoidPtrTy;
     } else {
-      clang::QualType target_type = BuildType(ast_ctx, type, for_expression);
+      clang::QualType target_type =
+          BuildType(clang_ast_ctx, type, for_expression);
       if (target_type.isNull())
         return clang::QualType();
       else if (target_type == ast_ctx.UnknownAnyTy)
@@ -370,12 +353,13 @@
   }
 }
 
-CompilerType AppleObjCTypeEncodingParser::RealizeType(
-    clang::ASTContext &ast_ctx, const char *name, bool for_expression) {
+CompilerType AppleObjCTypeEncodingParser::RealizeType(ClangASTContext &ast_ctx,
+                                                      const char *name,
+                                                      bool for_expression) {
   if (name && name[0]) {
     StringLexer lexer(name);
     clang::QualType qual_type = BuildType(ast_ctx, lexer, for_expression);
-    return CompilerType(&ast_ctx, qual_type);
+    return ast_ctx.GetType(qual_type);
   }
   return CompilerType();
 }
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h
index e576e8f..e43711b 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h
@@ -15,18 +15,14 @@
 
 #include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
 
-namespace lldb_utility {
-class StringLexer;
-}
-
 namespace lldb_private {
-
+class StringLexer;
 class AppleObjCTypeEncodingParser : public ObjCLanguageRuntime::EncodingToType {
 public:
   AppleObjCTypeEncodingParser(ObjCLanguageRuntime &runtime);
   ~AppleObjCTypeEncodingParser() override = default;
 
-  CompilerType RealizeType(clang::ASTContext &ast_ctx, const char *name,
+  CompilerType RealizeType(ClangASTContext &ast_ctx, const char *name,
                            bool for_expression) override;
 
 private:
@@ -39,41 +35,35 @@
     ~StructElement() = default;
   };
 
-  clang::QualType BuildType(clang::ASTContext &ast_ctx,
-                            lldb_utility::StringLexer &type,
+  clang::QualType BuildType(ClangASTContext &clang_ast_ctx, StringLexer &type,
                             bool for_expression,
                             uint32_t *bitfield_bit_size = nullptr);
 
-  clang::QualType BuildStruct(clang::ASTContext &ast_ctx,
-                              lldb_utility::StringLexer &type,
+  clang::QualType BuildStruct(ClangASTContext &ast_ctx, StringLexer &type,
                               bool for_expression);
 
-  clang::QualType BuildAggregate(clang::ASTContext &ast_ctx,
-                                 lldb_utility::StringLexer &type,
-                                 bool for_expression, char opener, char closer,
-                                 uint32_t kind);
+  clang::QualType BuildAggregate(ClangASTContext &clang_ast_ctx,
+                                 StringLexer &type, bool for_expression,
+                                 char opener, char closer, uint32_t kind);
 
-  clang::QualType BuildUnion(clang::ASTContext &ast_ctx,
-                             lldb_utility::StringLexer &type,
+  clang::QualType BuildUnion(ClangASTContext &ast_ctx, StringLexer &type,
                              bool for_expression);
 
-  clang::QualType BuildArray(clang::ASTContext &ast_ctx,
-                             lldb_utility::StringLexer &type,
+  clang::QualType BuildArray(ClangASTContext &ast_ctx, StringLexer &type,
                              bool for_expression);
 
-  std::string ReadStructName(lldb_utility::StringLexer &type);
+  std::string ReadStructName(StringLexer &type);
 
-  StructElement ReadStructElement(clang::ASTContext &ast_ctx,
-                                  lldb_utility::StringLexer &type,
+  StructElement ReadStructElement(ClangASTContext &ast_ctx, StringLexer &type,
                                   bool for_expression);
 
-  clang::QualType BuildObjCObjectPointerType(clang::ASTContext &ast_ctx,
-                                             lldb_utility::StringLexer &type,
+  clang::QualType BuildObjCObjectPointerType(ClangASTContext &clang_ast_ctx,
+                                             StringLexer &type,
                                              bool for_expression);
 
-  uint32_t ReadNumber(lldb_utility::StringLexer &type);
+  uint32_t ReadNumber(StringLexer &type);
 
-  std::string ReadQuotedString(lldb_utility::StringLexer &type);
+  std::string ReadQuotedString(StringLexer &type);
 
   ObjCLanguageRuntime &m_runtime;
 };
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
index d18435c..af630ee 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
@@ -141,17 +141,15 @@
     target_so_addr.SetOpcodeLoadAddress(target_addr, exc_ctx.GetTargetPtr());
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
     if (target_addr == 0) {
-      if (log)
-        log->Printf("Got target implementation of 0x0, stopping.");
+      LLDB_LOGF(log, "Got target implementation of 0x0, stopping.");
       SetPlanComplete();
       return true;
     }
     if (m_trampoline_handler->AddrIsMsgForward(target_addr)) {
-      if (log)
-        log->Printf(
-            "Implementation lookup returned msgForward function: 0x%" PRIx64
-            ", stopping.",
-            target_addr);
+      LLDB_LOGF(log,
+                "Implementation lookup returned msgForward function: 0x%" PRIx64
+                ", stopping.",
+                target_addr);
 
       SymbolContext sc = m_thread.GetStackFrameAtIndex(0)->GetSymbolContext(
           eSymbolContextEverything);
@@ -167,18 +165,17 @@
       return false;
     }
 
-    if (log)
-      log->Printf("Running to ObjC method implementation: 0x%" PRIx64,
-                  target_addr);
+    LLDB_LOGF(log, "Running to ObjC method implementation: 0x%" PRIx64,
+              target_addr);
 
     ObjCLanguageRuntime *objc_runtime =
         ObjCLanguageRuntime::Get(*GetThread().GetProcess());
     assert(objc_runtime != nullptr);
     objc_runtime->AddToMethodCache(m_isa_addr, m_sel_addr, target_addr);
-    if (log)
-      log->Printf("Adding {isa-addr=0x%" PRIx64 ", sel-addr=0x%" PRIx64
-                  "} = addr=0x%" PRIx64 " to cache.",
-                  m_isa_addr, m_sel_addr, target_addr);
+    LLDB_LOGF(log,
+              "Adding {isa-addr=0x%" PRIx64 ", sel-addr=0x%" PRIx64
+              "} = addr=0x%" PRIx64 " to cache.",
+              m_isa_addr, m_sel_addr, target_addr);
 
     // Extract the target address from the value:
 
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
index 29d9ba1..bcf3240 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/CMakeLists.txt
@@ -9,7 +9,6 @@
   AppleObjCTypeEncodingParser.cpp
 
   LINK_LIBS
-    clangAST
     lldbBreakpoint
     lldbCore
     lldbExpression
@@ -20,6 +19,8 @@
     lldbUtility
     lldbPluginExpressionParserClang
     lldbPluginCPPRuntime
+  CLANG_LIBS
+    clangAST
   LINK_COMPONENTS
     Support
   )
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
index 631c15c..9eb493f 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp
@@ -64,9 +64,10 @@
                                            lldb::addr_t impl_addr) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
   if (log) {
-    log->Printf("Caching: class 0x%" PRIx64 " selector 0x%" PRIx64
-                " implementation 0x%" PRIx64 ".",
-                class_addr, selector, impl_addr);
+    LLDB_LOGF(log,
+              "Caching: class 0x%" PRIx64 " selector 0x%" PRIx64
+              " implementation 0x%" PRIx64 ".",
+              class_addr, selector, impl_addr);
   }
   m_impl_cache.insert(std::pair<ClassAndSel, lldb::addr_t>(
       ClassAndSel(class_addr, selector), impl_addr));
@@ -102,8 +103,8 @@
   const ModuleList &modules = m_process->GetTarget().GetImages();
 
   SymbolContextList sc_list;
-  const size_t matching_symbols =
-      modules.FindSymbolsWithNameAndType(name, eSymbolTypeObjCClass, sc_list);
+  modules.FindSymbolsWithNameAndType(name, eSymbolTypeObjCClass, sc_list);
+  const size_t matching_symbols = sc_list.GetSize();
 
   if (matching_symbols) {
     SymbolContext sc;
@@ -120,20 +121,17 @@
     TypeList types;
 
     llvm::DenseSet<SymbolFile *> searched_symbol_files;
-    const uint32_t num_types = module_sp->FindTypes(
-        name, exact_match, max_matches, searched_symbol_files, types);
+    module_sp->FindTypes(name, exact_match, max_matches, searched_symbol_files,
+                         types);
 
-    if (num_types) {
-      uint32_t i;
-      for (i = 0; i < num_types; ++i) {
-        TypeSP type_sp(types.GetTypeAtIndex(i));
+    for (uint32_t i = 0; i < types.GetSize(); ++i) {
+      TypeSP type_sp(types.GetTypeAtIndex(i));
 
-        if (ClangASTContext::IsObjCObjectOrInterfaceType(
-                type_sp->GetForwardCompilerType())) {
-          if (type_sp->IsCompleteObjCClass()) {
-            m_complete_class_cache[name] = type_sp;
-            return type_sp;
-          }
+      if (ClangASTContext::IsObjCObjectOrInterfaceType(
+              type_sp->GetForwardCompilerType())) {
+        if (type_sp->IsCompleteObjCClass()) {
+          m_complete_class_cache[name] = type_sp;
+          return type_sp;
         }
       }
     }
@@ -224,14 +222,6 @@
   return 0;
 }
 
-ConstString
-ObjCLanguageRuntime::GetActualTypeName(ObjCLanguageRuntime::ObjCISA isa) {
-  ClassDescriptorSP objc_class_sp(GetNonKVOClassDescriptor(isa));
-  if (objc_class_sp)
-    return objc_class_sp->GetClassName();
-  return ConstString();
-}
-
 ObjCLanguageRuntime::ClassDescriptorSP
 ObjCLanguageRuntime::GetClassDescriptorFromClassName(
     ConstString class_name) {
@@ -315,14 +305,6 @@
   return CompilerType();
 }
 
-CompilerType ObjCLanguageRuntime::EncodingToType::RealizeType(
-    ClangASTContext &ast_ctx, const char *name, bool for_expression) {
-  clang::ASTContext *clang_ast = ast_ctx.getASTContext();
-  if (!clang_ast)
-    return CompilerType();
-  return RealizeType(*clang_ast, name, for_expression);
-}
-
 ObjCLanguageRuntime::EncodingToType::~EncodingToType() {}
 
 ObjCLanguageRuntime::EncodingToTypeSP ObjCLanguageRuntime::GetEncodingToType() {
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
index 1925c78..b9a4d5d 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h
@@ -17,6 +17,7 @@
 #include "llvm/Support/Casting.h"
 
 #include "lldb/Breakpoint/BreakpointPrecondition.h"
+#include "lldb/Core/ClangForward.h"
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Core/ThreadSafeDenseMap.h"
 #include "lldb/Symbol/CompilerType.h"
@@ -144,12 +145,9 @@
     virtual ~EncodingToType();
 
     virtual CompilerType RealizeType(ClangASTContext &ast_ctx, const char *name,
-                                     bool for_expression);
+                                     bool for_expression) = 0;
     virtual CompilerType RealizeType(const char *name, bool for_expression);
 
-    virtual CompilerType RealizeType(clang::ASTContext &ast_ctx,
-                                     const char *name, bool for_expression) = 0;
-
   protected:
     std::unique_ptr<ClangASTContext> m_scratch_ast_ctx_up;
   };
@@ -273,8 +271,6 @@
 
   virtual ObjCISA GetISA(ConstString name);
 
-  virtual ConstString GetActualTypeName(ObjCISA isa);
-
   virtual ObjCISA GetParentClass(ObjCISA isa);
 
   // Finds the byte offset of the child_type ivar in parent_type.  If it can't
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
index 1a6c499..c122e09 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/CMakeLists.txt
@@ -13,7 +13,6 @@
   ${tablegen_deps}
 
   LINK_LIBS
-    clangBasic
     lldbBreakpoint
     lldbCore
     lldbDataFormatters
@@ -22,6 +21,8 @@
     lldbInterpreter
     lldbSymbol
     lldbTarget
+  CLANG_LIBS
+    clangBasic
   LINK_COMPONENTS
     Core
     IRReader
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp
index 6054966..b396781 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptExpressionOpts.cpp
@@ -140,10 +140,10 @@
     // We've been using a triple and datalayout of some ARM variant all along,
     // so we need to let the backend know that this is no longer the case.
     if (log) {
-      log->Printf("%s - Changing RS target triple to '%s'", __FUNCTION__,
-                  real_triple.str().c_str());
-      log->Printf(
-          "%s - Changing RS datalayout to '%s'", __FUNCTION__,
+      LLDB_LOGF(log, "%s - Changing RS target triple to '%s'", __FUNCTION__,
+                real_triple.str().c_str());
+      LLDB_LOGF(
+          log, "%s - Changing RS datalayout to '%s'", __FUNCTION__,
           target_machine->createDataLayout().getStringRepresentation().c_str());
     }
     module.setTargetTriple(real_triple);
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
index c9cd34c..4edb8de 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
@@ -138,9 +138,8 @@
     size_t read =
         ctx.process->ReadMemory(sp, &arg.value, sizeof(uint32_t), err);
     if (read != arg_size || !err.Success()) {
-      if (log)
-        log->Printf("%s - error reading argument: %" PRIu64 " '%s'",
-                    __FUNCTION__, uint64_t(i), err.AsCString());
+      LLDB_LOGF(log, "%s - error reading argument: %" PRIu64 " '%s'",
+                __FUNCTION__, uint64_t(i), err.AsCString());
       return false;
     }
   }
@@ -173,8 +172,7 @@
 
   // check the stack alignment was correct (16 byte aligned)
   if ((sp & 0xf) != 0x0) {
-    if (log)
-      log->Printf("%s - stack misaligned", __FUNCTION__);
+    LLDB_LOGF(log, "%s - stack misaligned", __FUNCTION__);
     return false;
   }
 
@@ -213,9 +211,8 @@
     }
     // fail if we couldn't read this argument
     if (!success) {
-      if (log)
-        log->Printf("%s - error reading argument: %" PRIu64 ", reason: %s",
-                    __FUNCTION__, uint64_t(i), err.AsCString("n/a"));
+      LLDB_LOGF(log, "%s - error reading argument: %" PRIu64 ", reason: %s",
+                __FUNCTION__, uint64_t(i), err.AsCString("n/a"));
       return false;
     }
   }
@@ -258,9 +255,8 @@
     }
     // fail if we couldn't read this argument
     if (!success) {
-      if (log)
-        log->Printf("%s - error reading argument: %" PRIu64 ", reason: %s",
-                    __FUNCTION__, uint64_t(i), err.AsCString("n/a"));
+      LLDB_LOGF(log, "%s - error reading argument: %" PRIu64 ", reason: %s",
+                __FUNCTION__, uint64_t(i), err.AsCString("n/a"));
       return false;
     }
   }
@@ -285,15 +281,13 @@
     }
     // arguments passed on the stack
     else {
-      if (log)
-        log->Printf("%s - reading arguments spilled to stack not implemented",
-                    __FUNCTION__);
+      LLDB_LOGF(log, "%s - reading arguments spilled to stack not implemented",
+                __FUNCTION__);
     }
     // fail if we couldn't read this argument
     if (!success) {
-      if (log)
-        log->Printf("%s - error reading argument: %" PRIu64, __FUNCTION__,
-                    uint64_t(i));
+      LLDB_LOGF(log, "%s - error reading argument: %" PRIu64, __FUNCTION__,
+                uint64_t(i));
       return false;
     }
   }
@@ -337,9 +331,8 @@
     }
     // fail if we couldn't read this argument
     if (!success) {
-      if (log)
-        log->Printf("%s - error reading argument: %" PRIu64 ", reason: %s",
-                    __FUNCTION__, uint64_t(i), err.AsCString("n/a"));
+      LLDB_LOGF(log, "%s - error reading argument: %" PRIu64 ", reason: %s",
+                __FUNCTION__, uint64_t(i), err.AsCString("n/a"));
       return false;
     }
   }
@@ -385,9 +378,8 @@
     }
     // fail if we couldn't read this argument
     if (!success) {
-      if (log)
-        log->Printf("%s - error reading argument: %" PRIu64 ", reason: %s",
-                    __FUNCTION__, uint64_t(i), err.AsCString("n/a"));
+      LLDB_LOGF(log, "%s - error reading argument: %" PRIu64 ", reason: %s",
+                __FUNCTION__, uint64_t(i), err.AsCString("n/a"));
       return false;
     }
   }
@@ -399,8 +391,7 @@
 
   // verify that we have a target
   if (!exe_ctx.GetTargetPtr()) {
-    if (log)
-      log->Printf("%s - invalid target", __FUNCTION__);
+    LLDB_LOGF(log, "%s - invalid target", __FUNCTION__);
     return false;
   }
 
@@ -430,9 +421,8 @@
   default:
     // unsupported architecture
     if (log) {
-      log->Printf(
-          "%s - architecture not supported: '%s'", __FUNCTION__,
-          exe_ctx.GetTargetRef().GetArchitecture().GetArchitectureName());
+      LLDB_LOGF(log, "%s - architecture not supported: '%s'", __FUNCTION__,
+                exe_ctx.GetTargetRef().GetArchitecture().GetArchitectureName());
     }
     return false;
   }
@@ -452,28 +442,20 @@
   // elements fails the contents of &coord are undefined and `false` is
   // returned, `true` otherwise
 
-  RegularExpression regex;
-  RegularExpression::Match regex_match(3);
+  llvm::SmallVector<llvm::StringRef, 4> matches;
 
-  bool matched = false;
-  if (regex.Compile(llvm::StringRef("^([0-9]+),([0-9]+),([0-9]+)$")) &&
-      regex.Execute(coord_s, &regex_match))
-    matched = true;
-  else if (regex.Compile(llvm::StringRef("^([0-9]+),([0-9]+)$")) &&
-           regex.Execute(coord_s, &regex_match))
-    matched = true;
-  else if (regex.Compile(llvm::StringRef("^([0-9]+)$")) &&
-           regex.Execute(coord_s, &regex_match))
-    matched = true;
-
-  if (!matched)
+  if (!RegularExpression("^([0-9]+),([0-9]+),([0-9]+)$")
+           .Execute(coord_s, &matches) &&
+      !RegularExpression("^([0-9]+),([0-9]+)$").Execute(coord_s, &matches) &&
+      !RegularExpression("^([0-9]+)$").Execute(coord_s, &matches))
     return false;
 
-  auto get_index = [&](int idx, uint32_t &i) -> bool {
+  auto get_index = [&](size_t idx, uint32_t &i) -> bool {
     std::string group;
     errno = 0;
-    if (regex_match.GetMatchAtIndex(coord_s.str().c_str(), idx + 1, group))
-      return !llvm::StringRef(group).getAsInteger<uint32_t>(10, i);
+    if (idx + 1 < matches.size()) {
+      return !llvm::StringRef(matches[idx + 1]).getAsInteger<uint32_t>(10, i);
+    }
     return true;
   };
 
@@ -492,9 +474,8 @@
       ConstString name = sc.GetFunctionName();
       if (offset)
         addr.Slide(offset);
-      if (log)
-        log->Printf("%s: Prologue offset for %s is %" PRIu32, __FUNCTION__,
-                    name.AsCString(), offset);
+      LLDB_LOGF(log, "%s: Prologue offset for %s is %" PRIu32, __FUNCTION__,
+                name.AsCString(), offset);
     }
     return true;
   } else
@@ -809,7 +790,7 @@
 // symbol.
 Searcher::CallbackReturn
 RSBreakpointResolver::SearchCallback(SearchFilter &filter,
-                                     SymbolContext &context, Address *, bool) {
+                                     SymbolContext &context, Address *) {
   ModuleSP module = context.module_sp;
 
   if (!module || !IsRenderScriptScriptModule(module))
@@ -839,7 +820,7 @@
 Searcher::CallbackReturn
 RSReduceBreakpointResolver::SearchCallback(lldb_private::SearchFilter &filter,
                                            lldb_private::SymbolContext &context,
-                                           Address *, bool) {
+                                           Address *) {
   // We need to have access to the list of reductions currently parsed, as
   // reduce names don't actually exist as symbols in a module. They are only
   // identifiable by parsing the .rs.info packet, or finding the expand symbol.
@@ -884,14 +865,13 @@
         if (filter.AddressPasses(address)) {
           bool new_bp;
           if (!SkipPrologue(module, address)) {
-            if (log)
-              log->Printf("%s: Error trying to skip prologue", __FUNCTION__);
+            LLDB_LOGF(log, "%s: Error trying to skip prologue", __FUNCTION__);
           }
           m_breakpoint->AddLocation(address, &new_bp);
-          if (log)
-            log->Printf("%s: %s reduction breakpoint on %s in %s", __FUNCTION__,
-                        new_bp ? "new" : "existing", kernel_name.GetCString(),
-                        address.GetModule()->GetFileSpec().GetCString());
+          LLDB_LOGF(log, "%s: %s reduction breakpoint on %s in %s",
+                    __FUNCTION__, new_bp ? "new" : "existing",
+                    kernel_name.GetCString(),
+                    address.GetModule()->GetFileSpec().GetCString());
         }
       }
     }
@@ -900,8 +880,7 @@
 }
 
 Searcher::CallbackReturn RSScriptGroupBreakpointResolver::SearchCallback(
-    SearchFilter &filter, SymbolContext &context, Address *addr,
-    bool containing) {
+    SearchFilter &filter, SymbolContext &context, Address *addr) {
 
   if (!m_breakpoint)
     return eCallbackReturnContinue;
@@ -920,48 +899,43 @@
   for (auto &name : names) {
     const RSScriptGroupDescriptorSP sg = FindScriptGroup(ConstString(name));
     if (!sg) {
-      if (log)
-        log->Printf("%s: could not find script group for %s", __FUNCTION__,
-                    name.c_str());
+      LLDB_LOGF(log, "%s: could not find script group for %s", __FUNCTION__,
+                name.c_str());
       continue;
     }
 
-    if (log)
-      log->Printf("%s: Found ScriptGroup for %s", __FUNCTION__, name.c_str());
+    LLDB_LOGF(log, "%s: Found ScriptGroup for %s", __FUNCTION__, name.c_str());
 
     for (const RSScriptGroupDescriptor::Kernel &k : sg->m_kernels) {
       if (log) {
-        log->Printf("%s: Adding breakpoint for %s", __FUNCTION__,
-                    k.m_name.AsCString());
-        log->Printf("%s: Kernel address 0x%" PRIx64, __FUNCTION__, k.m_addr);
+        LLDB_LOGF(log, "%s: Adding breakpoint for %s", __FUNCTION__,
+                  k.m_name.AsCString());
+        LLDB_LOGF(log, "%s: Kernel address 0x%" PRIx64, __FUNCTION__, k.m_addr);
       }
 
       const lldb_private::Symbol *sym =
           module->FindFirstSymbolWithNameAndType(k.m_name, eSymbolTypeCode);
       if (!sym) {
-        if (log)
-          log->Printf("%s: Unable to find symbol for %s", __FUNCTION__,
-                      k.m_name.AsCString());
+        LLDB_LOGF(log, "%s: Unable to find symbol for %s", __FUNCTION__,
+                  k.m_name.AsCString());
         continue;
       }
 
       if (log) {
-        log->Printf("%s: Found symbol name is %s", __FUNCTION__,
-                    sym->GetName().AsCString());
+        LLDB_LOGF(log, "%s: Found symbol name is %s", __FUNCTION__,
+                  sym->GetName().AsCString());
       }
 
       auto address = sym->GetAddress();
       if (!SkipPrologue(module, address)) {
-        if (log)
-          log->Printf("%s: Error trying to skip prologue", __FUNCTION__);
+        LLDB_LOGF(log, "%s: Error trying to skip prologue", __FUNCTION__);
       }
 
       bool new_bp;
       m_breakpoint->AddLocation(address, &new_bp);
 
-      if (log)
-        log->Printf("%s: Placed %sbreakpoint on %s", __FUNCTION__,
-                    new_bp ? "new " : "", k.m_name.AsCString());
+      LLDB_LOGF(log, "%s: Placed %sbreakpoint on %s", __FUNCTION__,
+                new_bp ? "new " : "", k.m_name.AsCString());
 
       // exit after placing the first breakpoint if we do not intend to stop on
       // all kernels making up this script group
@@ -1136,8 +1110,7 @@
                                        ExecutionContext &exe_ctx) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
 
-  if (log)
-    log->Printf("%s - '%s'", __FUNCTION__, hook->defn->name);
+  LLDB_LOGF(log, "%s - '%s'", __FUNCTION__, hook->defn->name);
 
   if (hook->defn->grabber) {
     (this->*(hook->defn->grabber))(hook, exe_ctx);
@@ -1163,19 +1136,18 @@
   }};
 
   if (!GetArgs(context, args.data(), args.size())) {
-    if (log)
-      log->Printf("%s - Error while reading the function parameters",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - Error while reading the function parameters",
+              __FUNCTION__);
     return;
   } else if (log) {
-    log->Printf("%s - groupName    : 0x%" PRIx64, __FUNCTION__,
-                addr_t(args[eGroupName]));
-    log->Printf("%s - groupNameSize: %" PRIu64, __FUNCTION__,
-                uint64_t(args[eGroupNameSize]));
-    log->Printf("%s - kernel       : 0x%" PRIx64, __FUNCTION__,
-                addr_t(args[eKernel]));
-    log->Printf("%s - kernelCount  : %" PRIu64, __FUNCTION__,
-                uint64_t(args[eKernelCount]));
+    LLDB_LOGF(log, "%s - groupName    : 0x%" PRIx64, __FUNCTION__,
+              addr_t(args[eGroupName]));
+    LLDB_LOGF(log, "%s - groupNameSize: %" PRIu64, __FUNCTION__,
+              uint64_t(args[eGroupNameSize]));
+    LLDB_LOGF(log, "%s - kernel       : 0x%" PRIx64, __FUNCTION__,
+              addr_t(args[eKernel]));
+    LLDB_LOGF(log, "%s - kernelCount  : %" PRIu64, __FUNCTION__,
+              uint64_t(args[eKernelCount]));
   }
 
   // parse script group name
@@ -1187,12 +1159,10 @@
     m_process->ReadMemory(addr_t(args[eGroupName]), buffer.get(), len, err);
     buffer.get()[len] = '\0';
     if (!err.Success()) {
-      if (log)
-        log->Printf("Error reading scriptgroup name from target");
+      LLDB_LOGF(log, "Error reading scriptgroup name from target");
       return;
     } else {
-      if (log)
-        log->Printf("Extracted scriptgroup name %s", buffer.get());
+      LLDB_LOGF(log, "Extracted scriptgroup name %s", buffer.get());
     }
     // write back the script group name
     group_name.SetCString(buffer.get());
@@ -1214,9 +1184,8 @@
       m_scriptGroups.push_back(group);
     } else {
       // already have this script group
-      if (log)
-        log->Printf("Attempt to add duplicate script group %s",
-                    group_name.AsCString());
+      LLDB_LOGF(log, "Attempt to add duplicate script group %s",
+                group_name.AsCString());
       return;
     }
   }
@@ -1234,21 +1203,18 @@
     size_t read =
         m_process->ReadMemory(ptr_addr, &kernel_addr, target_ptr_size, err);
     if (!err.Success() || read != target_ptr_size) {
-      if (log)
-        log->Printf("Error parsing kernel address %" PRIu64 " in script group",
-                    i);
+      LLDB_LOGF(log, "Error parsing kernel address %" PRIu64 " in script group",
+                i);
       return;
     }
-    if (log)
-      log->Printf("Extracted scriptgroup kernel address - 0x%" PRIx64,
-                  kernel_addr);
+    LLDB_LOGF(log, "Extracted scriptgroup kernel address - 0x%" PRIx64,
+              kernel_addr);
     kernel.m_addr = kernel_addr;
 
     // try to resolve the associated kernel name
     if (!ResolveKernelName(kernel.m_addr, kernel.m_name)) {
-      if (log)
-        log->Printf("Parsed scriptgroup kernel %" PRIu64 " - 0x%" PRIx64, i,
-                    kernel_addr);
+      LLDB_LOGF(log, "Parsed scriptgroup kernel %" PRIu64 " - 0x%" PRIx64, i,
+                kernel_addr);
       return;
     }
 
@@ -1261,9 +1227,8 @@
         // verify this function is a valid kernel
         if (IsKnownKernel(base_kernel)) {
           kernel.m_name = base_kernel;
-          if (log)
-            log->Printf("%s - found non expand version '%s'", __FUNCTION__,
-                        base_kernel.GetCString());
+          LLDB_LOGF(log, "%s - found non expand version '%s'", __FUNCTION__,
+                    base_kernel.GetCString());
         }
       }
     }
@@ -1276,15 +1241,13 @@
     Target &target = m_process->GetTarget();
     const BreakpointList &list = target.GetBreakpointList();
     const size_t num_breakpoints = list.GetSize();
-    if (log)
-      log->Printf("Resolving %zu breakpoints", num_breakpoints);
+    LLDB_LOGF(log, "Resolving %zu breakpoints", num_breakpoints);
     for (size_t i = 0; i < num_breakpoints; ++i) {
       const BreakpointSP bp = list.GetBreakpointAtIndex(i);
       if (bp) {
         if (bp->MatchesName(group_name.AsCString())) {
-          if (log)
-            log->Printf("Found breakpoint with name %s",
-                        group_name.AsCString());
+          LLDB_LOGF(log, "Found breakpoint with name %s",
+                    group_name.AsCString());
           bp->ResolveBreakpoint();
         }
       }
@@ -1322,9 +1285,8 @@
 
   bool success = GetArgs(exe_ctx, &args[0], args.size());
   if (!success) {
-    if (log)
-      log->Printf("%s - Error while reading the function parameters",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - Error while reading the function parameters",
+              __FUNCTION__);
     return;
   }
 
@@ -1342,10 +1304,9 @@
     uint64_t result = 0;
     size_t read = m_process->ReadMemory(addr, &result, target_ptr_size, err);
     if (read != target_ptr_size || !err.Success()) {
-      if (log)
-        log->Printf(
-            "%s - Error while reading allocation list argument %" PRIu64,
-            __FUNCTION__, i);
+      LLDB_LOGF(log,
+                "%s - Error while reading allocation list argument %" PRIu64,
+                __FUNCTION__, i);
     } else {
       allocs.push_back(result);
     }
@@ -1375,8 +1336,8 @@
       if (log) {
         if (alloc->context.isValid() &&
             *alloc->context.get() != addr_t(args[eRsContext]))
-          log->Printf("%s - Allocation used by multiple contexts",
-                      __FUNCTION__);
+          LLDB_LOGF(log, "%s - Allocation used by multiple contexts",
+                    __FUNCTION__);
       }
       alloc->context = addr_t(args[eRsContext]);
     }
@@ -1388,7 +1349,7 @@
     if (log) {
       if (script->context.isValid() &&
           *script->context.get() != addr_t(args[eRsContext]))
-        log->Printf("%s - Script used by multiple contexts", __FUNCTION__);
+        LLDB_LOGF(log, "%s - Script used by multiple contexts", __FUNCTION__);
     }
     script->context = addr_t(args[eRsContext]);
   }
@@ -1416,26 +1377,26 @@
 
   bool success = GetArgs(context, &args[0], args.size());
   if (!success) {
-    if (log)
-      log->Printf("%s - error reading the function parameters.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - error reading the function parameters.", __FUNCTION__);
     return;
   }
 
   if (log) {
-    log->Printf("%s - 0x%" PRIx64 ",0x%" PRIx64 " slot %" PRIu64 " = 0x%" PRIx64
-                ":%" PRIu64 "bytes.",
-                __FUNCTION__, uint64_t(args[eRsContext]),
-                uint64_t(args[eRsScript]), uint64_t(args[eRsId]),
-                uint64_t(args[eRsData]), uint64_t(args[eRsLength]));
+    LLDB_LOGF(log,
+              "%s - 0x%" PRIx64 ",0x%" PRIx64 " slot %" PRIu64 " = 0x%" PRIx64
+              ":%" PRIu64 "bytes.",
+              __FUNCTION__, uint64_t(args[eRsContext]),
+              uint64_t(args[eRsScript]), uint64_t(args[eRsId]),
+              uint64_t(args[eRsData]), uint64_t(args[eRsLength]));
 
     addr_t script_addr = addr_t(args[eRsScript]);
     if (m_scriptMappings.find(script_addr) != m_scriptMappings.end()) {
       auto rsm = m_scriptMappings[script_addr];
       if (uint64_t(args[eRsId]) < rsm->m_globals.size()) {
         auto rsg = rsm->m_globals[uint64_t(args[eRsId])];
-        log->Printf("%s - Setting of '%s' within '%s' inferred", __FUNCTION__,
-                    rsg.m_name.AsCString(),
-                    rsm->m_module->GetFileSpec().GetFilename().AsCString());
+        LLDB_LOGF(log, "%s - Setting of '%s' within '%s' inferred",
+                  __FUNCTION__, rsg.m_name.AsCString(),
+                  rsm->m_module->GetFileSpec().GetFilename().AsCString());
       }
     }
   }
@@ -1455,16 +1416,14 @@
 
   bool success = GetArgs(exe_ctx, &args[0], args.size());
   if (!success) {
-    if (log)
-      log->Printf("%s - error while reading the function parameters",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - error while reading the function parameters",
+              __FUNCTION__);
     return;
   }
 
-  if (log)
-    log->Printf("%s - 0x%" PRIx64 ",0x%" PRIx64 ",0x%" PRIx64 " .",
-                __FUNCTION__, uint64_t(args[eRsContext]),
-                uint64_t(args[eRsAlloc]), uint64_t(args[eRsForceZero]));
+  LLDB_LOGF(log, "%s - 0x%" PRIx64 ",0x%" PRIx64 ",0x%" PRIx64 " .",
+            __FUNCTION__, uint64_t(args[eRsContext]), uint64_t(args[eRsAlloc]),
+            uint64_t(args[eRsForceZero]));
 
   AllocationDetails *alloc = CreateAllocation(uint64_t(args[eRsAlloc]));
   if (alloc)
@@ -1487,29 +1446,25 @@
 
   bool success = GetArgs(exe_ctx, &args[0], args.size());
   if (!success) {
-    if (log)
-      log->Printf("%s - error while reading the function parameters.",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - error while reading the function parameters.",
+              __FUNCTION__);
     return;
   }
 
-  if (log)
-    log->Printf("%s - 0x%" PRIx64 ", 0x%" PRIx64 ".", __FUNCTION__,
-                uint64_t(args[eRsContext]), uint64_t(args[eRsAlloc]));
+  LLDB_LOGF(log, "%s - 0x%" PRIx64 ", 0x%" PRIx64 ".", __FUNCTION__,
+            uint64_t(args[eRsContext]), uint64_t(args[eRsAlloc]));
 
   for (auto iter = m_allocations.begin(); iter != m_allocations.end(); ++iter) {
     auto &allocation_up = *iter; // get the unique pointer
     if (allocation_up->address.isValid() &&
         *allocation_up->address.get() == addr_t(args[eRsAlloc])) {
       m_allocations.erase(iter);
-      if (log)
-        log->Printf("%s - deleted allocation entry.", __FUNCTION__);
+      LLDB_LOGF(log, "%s - deleted allocation entry.", __FUNCTION__);
       return;
     }
   }
 
-  if (log)
-    log->Printf("%s - couldn't find destroyed allocation.", __FUNCTION__);
+  LLDB_LOGF(log, "%s - couldn't find destroyed allocation.", __FUNCTION__);
 }
 
 void RenderScriptRuntime::CaptureScriptInit(RuntimeHook *hook,
@@ -1526,32 +1481,28 @@
        ArgItem{ArgItem::ePointer, 0}, ArgItem{ArgItem::ePointer, 0}}};
   bool success = GetArgs(exe_ctx, &args[0], args.size());
   if (!success) {
-    if (log)
-      log->Printf("%s - error while reading the function parameters.",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - error while reading the function parameters.",
+              __FUNCTION__);
     return;
   }
 
   std::string res_name;
   process->ReadCStringFromMemory(addr_t(args[eRsResNamePtr]), res_name, err);
   if (err.Fail()) {
-    if (log)
-      log->Printf("%s - error reading res_name: %s.", __FUNCTION__,
-                  err.AsCString());
+    LLDB_LOGF(log, "%s - error reading res_name: %s.", __FUNCTION__,
+              err.AsCString());
   }
 
   std::string cache_dir;
   process->ReadCStringFromMemory(addr_t(args[eRsCachedDirPtr]), cache_dir, err);
   if (err.Fail()) {
-    if (log)
-      log->Printf("%s - error reading cache_dir: %s.", __FUNCTION__,
-                  err.AsCString());
+    LLDB_LOGF(log, "%s - error reading cache_dir: %s.", __FUNCTION__,
+              err.AsCString());
   }
 
-  if (log)
-    log->Printf("%s - 0x%" PRIx64 ",0x%" PRIx64 " => '%s' at '%s' .",
-                __FUNCTION__, uint64_t(args[eRsContext]),
-                uint64_t(args[eRsScript]), res_name.c_str(), cache_dir.c_str());
+  LLDB_LOGF(log, "%s - 0x%" PRIx64 ",0x%" PRIx64 " => '%s' at '%s' .",
+            __FUNCTION__, uint64_t(args[eRsContext]), uint64_t(args[eRsScript]),
+            res_name.c_str(), cache_dir.c_str());
 
   if (res_name.size() > 0) {
     StreamString strm;
@@ -1566,13 +1517,14 @@
       script->context = addr_t(args[eRsContext]);
     }
 
-    if (log)
-      log->Printf("%s - '%s' tagged with context 0x%" PRIx64
-                  " and script 0x%" PRIx64 ".",
-                  __FUNCTION__, strm.GetData(), uint64_t(args[eRsContext]),
-                  uint64_t(args[eRsScript]));
+    LLDB_LOGF(log,
+              "%s - '%s' tagged with context 0x%" PRIx64
+              " and script 0x%" PRIx64 ".",
+              __FUNCTION__, strm.GetData(), uint64_t(args[eRsContext]),
+              uint64_t(args[eRsScript]));
   } else if (log) {
-    log->Printf("%s - resource name invalid, Script not tagged.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - resource name invalid, Script not tagged.",
+              __FUNCTION__);
   }
 }
 
@@ -1593,8 +1545,7 @@
       machine != llvm::Triple::ArchType::mipsel &&
       machine != llvm::Triple::ArchType::mips64el &&
       machine != llvm::Triple::ArchType::x86_64) {
-    if (log)
-      log->Printf("%s - unable to hook runtime functions.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - unable to hook runtime functions.", __FUNCTION__);
     return;
   }
 
@@ -1618,23 +1569,22 @@
         ConstString(symbol_name), eSymbolTypeCode);
     if (!sym) {
       if (log) {
-        log->Printf("%s - symbol '%s' related to the function %s not found",
-                    __FUNCTION__, symbol_name, hook_defn->name);
+        LLDB_LOGF(log, "%s - symbol '%s' related to the function %s not found",
+                  __FUNCTION__, symbol_name, hook_defn->name);
       }
       continue;
     }
 
     addr_t addr = sym->GetLoadAddress(&target);
     if (addr == LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("%s - unable to resolve the address of hook function '%s' "
-                    "with symbol '%s'.",
-                    __FUNCTION__, hook_defn->name, symbol_name);
+      LLDB_LOGF(log,
+                "%s - unable to resolve the address of hook function '%s' "
+                "with symbol '%s'.",
+                __FUNCTION__, hook_defn->name, symbol_name);
       continue;
     } else {
-      if (log)
-        log->Printf("%s - function %s, address resolved at 0x%" PRIx64,
-                    __FUNCTION__, hook_defn->name, addr);
+      LLDB_LOGF(log, "%s - function %s, address resolved at 0x%" PRIx64,
+                __FUNCTION__, hook_defn->name, addr);
     }
 
     RuntimeHookSP hook(new RuntimeHook());
@@ -1644,11 +1594,12 @@
     hook->bp_sp->SetCallback(HookCallback, hook.get(), true);
     m_runtimeHooks[addr] = hook;
     if (log) {
-      log->Printf("%s - successfully hooked '%s' in '%s' version %" PRIu64
-                  " at 0x%" PRIx64 ".",
-                  __FUNCTION__, hook_defn->name,
-                  module->GetFileSpec().GetFilename().AsCString(),
-                  (uint64_t)hook_defn->version, (uint64_t)addr);
+      LLDB_LOGF(log,
+                "%s - successfully hooked '%s' in '%s' version %" PRIu64
+                " at 0x%" PRIx64 ".",
+                __FUNCTION__, hook_defn->name,
+                module->GetFileSpec().GetFilename().AsCString(),
+                (uint64_t)hook_defn->version, (uint64_t)addr);
     }
     hook_placed[idx] = true;
   }
@@ -1661,8 +1612,8 @@
       const HookDefn &hook_defn = s_runtimeHookDefns[i];
       if (hook_defn.kind != kind)
         continue;
-      log->Printf("%s - function %s was not hooked", __FUNCTION__,
-                  hook_defn.name);
+      LLDB_LOGF(log, "%s - function %s was not hooked", __FUNCTION__,
+                hook_defn.name);
     }
   }
 }
@@ -1697,11 +1648,11 @@
     if (m_scriptMappings.find(script) != m_scriptMappings.end()) {
       // if the module we have stored is different to the one we just received.
       if (m_scriptMappings[script] != rsmodule_sp) {
-        if (log)
-          log->Printf(
-              "%s - script %" PRIx64 " wants reassigned to new rsmodule '%s'.",
-              __FUNCTION__, (uint64_t)script,
-              rsmodule_sp->m_module->GetFileSpec().GetFilename().AsCString());
+        LLDB_LOGF(
+            log,
+            "%s - script %" PRIx64 " wants reassigned to new rsmodule '%s'.",
+            __FUNCTION__, (uint64_t)script,
+            rsmodule_sp->m_module->GetFileSpec().GetFilename().AsCString());
       }
     }
     // We don't have a script mapping for the current script.
@@ -1713,11 +1664,9 @@
         rsmodule_sp->m_resname = res_name;
       // Add Script/Module pair to map.
       m_scriptMappings[script] = rsmodule_sp;
-      if (log)
-        log->Printf(
-            "%s - script %" PRIx64 " associated with rsmodule '%s'.",
-            __FUNCTION__, (uint64_t)script,
-            rsmodule_sp->m_module->GetFileSpec().GetFilename().AsCString());
+      LLDB_LOGF(log, "%s - script %" PRIx64 " associated with rsmodule '%s'.",
+                __FUNCTION__, (uint64_t)script,
+                rsmodule_sp->m_module->GetFileSpec().GetFilename().AsCString());
     }
   }
 }
@@ -1730,8 +1679,7 @@
                                            StackFrame *frame_ptr,
                                            uint64_t *result) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
-  if (log)
-    log->Printf("%s(%s)", __FUNCTION__, expr);
+  LLDB_LOGF(log, "%s(%s)", __FUNCTION__, expr);
 
   ValueObjectSP expr_result;
   EvaluateExpressionOptions options;
@@ -1741,8 +1689,7 @@
   target.EvaluateExpression(expr, frame_ptr, expr_result, options);
 
   if (!expr_result) {
-    if (log)
-      log->Printf("%s: couldn't evaluate expression.", __FUNCTION__);
+    LLDB_LOGF(log, "%s: couldn't evaluate expression.", __FUNCTION__);
     return false;
   }
 
@@ -1751,16 +1698,14 @@
     Status err = expr_result->GetError();
     // Expression returned is void, so this is actually a success
     if (err.GetError() == UserExpression::kNoResult) {
-      if (log)
-        log->Printf("%s - expression returned void.", __FUNCTION__);
+      LLDB_LOGF(log, "%s - expression returned void.", __FUNCTION__);
 
       result = nullptr;
       return true;
     }
 
-    if (log)
-      log->Printf("%s - error evaluating expression result: %s", __FUNCTION__,
-                  err.AsCString());
+    LLDB_LOGF(log, "%s - error evaluating expression result: %s", __FUNCTION__,
+              err.AsCString());
     return false;
   }
 
@@ -1769,9 +1714,8 @@
   *result = expr_result->GetValueAsUnsigned(0, &success);
 
   if (!success) {
-    if (log)
-      log->Printf("%s - couldn't convert expression result to uint32_t",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - couldn't convert expression result to uint32_t",
+              __FUNCTION__);
     return false;
   }
 
@@ -1884,8 +1828,7 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
 
   if (!alloc->address.isValid()) {
-    if (log)
-      log->Printf("%s - failed to find allocation details.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - failed to find allocation details.", __FUNCTION__);
     return false;
   }
 
@@ -1895,12 +1838,10 @@
   int written = snprintf(expr_buf, jit_max_expr_size, fmt_str,
                          *alloc->address.get(), x, y, z);
   if (written < 0) {
-    if (log)
-      log->Printf("%s - encoding error in snprintf().", __FUNCTION__);
+    LLDB_LOGF(log, "%s - encoding error in snprintf().", __FUNCTION__);
     return false;
   } else if (written >= jit_max_expr_size) {
-    if (log)
-      log->Printf("%s - expression too long.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - expression too long.", __FUNCTION__);
     return false;
   }
 
@@ -1922,8 +1863,7 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
 
   if (!alloc->address.isValid() || !alloc->context.isValid()) {
-    if (log)
-      log->Printf("%s - failed to find allocation details.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - failed to find allocation details.", __FUNCTION__);
     return false;
   }
 
@@ -1933,12 +1873,10 @@
   int written = snprintf(expr_buf, jit_max_expr_size, fmt_str,
                          *alloc->context.get(), *alloc->address.get());
   if (written < 0) {
-    if (log)
-      log->Printf("%s - encoding error in snprintf().", __FUNCTION__);
+    LLDB_LOGF(log, "%s - encoding error in snprintf().", __FUNCTION__);
     return false;
   } else if (written >= jit_max_expr_size) {
-    if (log)
-      log->Printf("%s - expression too long.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - expression too long.", __FUNCTION__);
     return false;
   }
 
@@ -1960,8 +1898,7 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
 
   if (!alloc->type_ptr.isValid() || !alloc->context.isValid()) {
-    if (log)
-      log->Printf("%s - Failed to find allocation details.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - Failed to find allocation details.", __FUNCTION__);
     return false;
   }
 
@@ -1983,12 +1920,10 @@
     int written = snprintf(expr_bufs[i], jit_max_expr_size, fmt_str,
                            *alloc->context.get(), bits, *alloc->type_ptr.get());
     if (written < 0) {
-      if (log)
-        log->Printf("%s - encoding error in snprintf().", __FUNCTION__);
+      LLDB_LOGF(log, "%s - encoding error in snprintf().", __FUNCTION__);
       return false;
     } else if (written >= jit_max_expr_size) {
-      if (log)
-        log->Printf("%s - expression too long.", __FUNCTION__);
+      LLDB_LOGF(log, "%s - expression too long.", __FUNCTION__);
       return false;
     }
 
@@ -2007,10 +1942,10 @@
   addr_t element_ptr = static_cast<lldb::addr_t>(results[3]);
   alloc->element.element_ptr = element_ptr;
 
-  if (log)
-    log->Printf("%s - dims (%" PRIu32 ", %" PRIu32 ", %" PRIu32
-                ") Element*: 0x%" PRIx64 ".",
-                __FUNCTION__, dims.dim_1, dims.dim_2, dims.dim_3, element_ptr);
+  LLDB_LOGF(log,
+            "%s - dims (%" PRIu32 ", %" PRIu32 ", %" PRIu32
+            ") Element*: 0x%" PRIx64 ".",
+            __FUNCTION__, dims.dim_1, dims.dim_2, dims.dim_3, element_ptr);
 
   return true;
 }
@@ -2024,8 +1959,7 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
 
   if (!elem.element_ptr.isValid()) {
-    if (log)
-      log->Printf("%s - failed to find allocation details.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - failed to find allocation details.", __FUNCTION__);
     return false;
   }
 
@@ -2042,12 +1976,10 @@
     int written = snprintf(expr_bufs[i], jit_max_expr_size, fmt_str, context,
                            *elem.element_ptr.get());
     if (written < 0) {
-      if (log)
-        log->Printf("%s - encoding error in snprintf().", __FUNCTION__);
+      LLDB_LOGF(log, "%s - encoding error in snprintf().", __FUNCTION__);
       return false;
     } else if (written >= jit_max_expr_size) {
-      if (log)
-        log->Printf("%s - expression too long.", __FUNCTION__);
+      LLDB_LOGF(log, "%s - expression too long.", __FUNCTION__);
       return false;
     }
 
@@ -2063,11 +1995,11 @@
   elem.type_vec_size = static_cast<uint32_t>(results[2]);
   elem.field_count = static_cast<uint32_t>(results[3]);
 
-  if (log)
-    log->Printf("%s - data type %" PRIu32 ", pixel type %" PRIu32
-                ", vector size %" PRIu32 ", field count %" PRIu32,
-                __FUNCTION__, *elem.type.get(), *elem.type_kind.get(),
-                *elem.type_vec_size.get(), *elem.field_count.get());
+  LLDB_LOGF(log,
+            "%s - data type %" PRIu32 ", pixel type %" PRIu32
+            ", vector size %" PRIu32 ", field count %" PRIu32,
+            __FUNCTION__, *elem.type.get(), *elem.type_kind.get(),
+            *elem.type_vec_size.get(), *elem.field_count.get());
 
   // If this Element has subelements then JIT rsaElementGetSubElements() for
   // details about its fields
@@ -2084,8 +2016,7 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
 
   if (!elem.element_ptr.isValid() || !elem.field_count.isValid()) {
-    if (log)
-      log->Printf("%s - failed to find allocation details.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - failed to find allocation details.", __FUNCTION__);
     return false;
   }
 
@@ -2107,12 +2038,10 @@
                              context, field_count, field_count, field_count,
                              *elem.element_ptr.get(), field_count, field_index);
       if (written < 0) {
-        if (log)
-          log->Printf("%s - encoding error in snprintf().", __FUNCTION__);
+        LLDB_LOGF(log, "%s - encoding error in snprintf().", __FUNCTION__);
         return false;
       } else if (written >= jit_max_expr_size) {
-        if (log)
-          log->Printf("%s - expression too long.", __FUNCTION__);
+        LLDB_LOGF(log, "%s - expression too long.", __FUNCTION__);
         return false;
       }
 
@@ -2120,8 +2049,7 @@
       if (!EvalRSExpression(expr_buffer, frame_ptr, &results))
         return false;
 
-      if (log)
-        log->Printf("%s - expr result 0x%" PRIx64 ".", __FUNCTION__, results);
+      LLDB_LOGF(log, "%s - expr result 0x%" PRIx64 ".", __FUNCTION__, results);
 
       switch (expr_index) {
       case 0: // Element* of child
@@ -2136,9 +2064,8 @@
         if (!err.Fail())
           child.type_name = ConstString(name);
         else {
-          if (log)
-            log->Printf("%s - warning: Couldn't read field name.",
-                        __FUNCTION__);
+          LLDB_LOGF(log, "%s - warning: Couldn't read field name.",
+                    __FUNCTION__);
         }
         break;
       }
@@ -2173,8 +2100,7 @@
 
   if (!alloc->address.isValid() || !alloc->dimension.isValid() ||
       !alloc->data_ptr.isValid() || !alloc->element.datum_size.isValid()) {
-    if (log)
-      log->Printf("%s - failed to find allocation details.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - failed to find allocation details.", __FUNCTION__);
     return false;
   }
 
@@ -2196,9 +2122,8 @@
 
     alloc->size = dim_x * dim_y * dim_z * *alloc->element.datum_size.get();
 
-    if (log)
-      log->Printf("%s - inferred size of struct allocation %" PRIu32 ".",
-                  __FUNCTION__, *alloc->size.get());
+    LLDB_LOGF(log, "%s - inferred size of struct allocation %" PRIu32 ".",
+              __FUNCTION__, *alloc->size.get());
     return true;
   }
 
@@ -2213,12 +2138,10 @@
   int written = snprintf(expr_buf, jit_max_expr_size, fmt_str,
                          *alloc->address.get(), dim_x, dim_y, dim_z);
   if (written < 0) {
-    if (log)
-      log->Printf("%s - encoding error in snprintf().", __FUNCTION__);
+    LLDB_LOGF(log, "%s - encoding error in snprintf().", __FUNCTION__);
     return false;
   } else if (written >= jit_max_expr_size) {
-    if (log)
-      log->Printf("%s - expression too long.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - expression too long.", __FUNCTION__);
     return false;
   }
 
@@ -2242,8 +2165,7 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_LANGUAGE));
 
   if (!alloc->address.isValid() || !alloc->data_ptr.isValid()) {
-    if (log)
-      log->Printf("%s - failed to find allocation details.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - failed to find allocation details.", __FUNCTION__);
     return false;
   }
 
@@ -2253,12 +2175,10 @@
   int written = snprintf(expr_buf, jit_max_expr_size, fmt_str,
                          *alloc->address.get(), 0, 1, 0);
   if (written < 0) {
-    if (log)
-      log->Printf("%s - encoding error in snprintf().", __FUNCTION__);
+    LLDB_LOGF(log, "%s - encoding error in snprintf().", __FUNCTION__);
     return false;
   } else if (written >= jit_max_expr_size) {
-    if (log)
-      log->Printf("%s - expression too long.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - expression too long.", __FUNCTION__);
     return false;
   }
 
@@ -2320,8 +2240,7 @@
   // Iterate over all the global variables looking for one with a matching type
   // to the Element. We make the assumption a match exists since there needs to
   // be a global variable to reflect the struct type back into java host code.
-  for (uint32_t i = 0; i < var_list.GetSize(); ++i) {
-    const VariableSP var_sp(var_list.GetVariableAtIndex(i));
+  for (const VariableSP &var_sp : var_list) {
     if (!var_sp)
       continue;
 
@@ -2354,9 +2273,8 @@
     // '#rs_padding_[0-9]+'
     if (found && num_children < elem.children.size()) {
       const uint32_t size_diff = elem.children.size() - num_children;
-      if (log)
-        log->Printf("%s - %" PRIu32 " padding struct entries", __FUNCTION__,
-                    size_diff);
+      LLDB_LOGF(log, "%s - %" PRIu32 " padding struct entries", __FUNCTION__,
+                size_diff);
 
       for (uint32_t i = 0; i < size_diff; ++i) {
         ConstString name = elem.children[num_children + i].type_name;
@@ -2377,9 +2295,8 @@
 
       // Save name of variable in Element.
       elem.type_name = valobj_sp->GetTypeName();
-      if (log)
-        log->Printf("%s - element name set to %s", __FUNCTION__,
-                    elem.type_name.AsCString());
+      LLDB_LOGF(log, "%s - element name set to %s", __FUNCTION__,
+                elem.type_name.AsCString());
 
       return;
     }
@@ -2424,9 +2341,8 @@
 
   elem.padding = padding;
   elem.datum_size = data_size + padding;
-  if (log)
-    log->Printf("%s - element size set to %" PRIu32, __FUNCTION__,
-                data_size + padding);
+  LLDB_LOGF(log, "%s - element size set to %" PRIu32, __FUNCTION__,
+            data_size + padding);
 }
 
 // Given an allocation, this function copies the allocation contents from
@@ -2439,13 +2355,11 @@
 
   // JIT all the allocation details
   if (alloc->ShouldRefresh()) {
-    if (log)
-      log->Printf("%s - allocation details not calculated yet, jitting info",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - allocation details not calculated yet, jitting info",
+              __FUNCTION__);
 
     if (!RefreshAllocation(alloc, frame_ptr)) {
-      if (log)
-        log->Printf("%s - couldn't JIT allocation details", __FUNCTION__);
+      LLDB_LOGF(log, "%s - couldn't JIT allocation details", __FUNCTION__);
       return nullptr;
     }
   }
@@ -2458,9 +2372,8 @@
   const uint32_t size = *alloc->size.get();
   std::shared_ptr<uint8_t> buffer(new uint8_t[size]);
   if (!buffer) {
-    if (log)
-      log->Printf("%s - couldn't allocate a %" PRIu32 " byte buffer",
-                  __FUNCTION__, size);
+    LLDB_LOGF(log, "%s - couldn't allocate a %" PRIu32 " byte buffer",
+              __FUNCTION__, size);
     return nullptr;
   }
 
@@ -2469,10 +2382,10 @@
   lldb::addr_t data_ptr = *alloc->data_ptr.get();
   GetProcess()->ReadMemory(data_ptr, buffer.get(), size, err);
   if (err.Fail()) {
-    if (log)
-      log->Printf("%s - '%s' Couldn't read %" PRIu32
-                  " bytes of allocation data from 0x%" PRIx64,
-                  __FUNCTION__, err.AsCString(), size, data_ptr);
+    LLDB_LOGF(log,
+              "%s - '%s' Couldn't read %" PRIu32
+              " bytes of allocation data from 0x%" PRIx64,
+              __FUNCTION__, err.AsCString(), size, data_ptr);
     return nullptr;
   }
 
@@ -2493,19 +2406,16 @@
   if (!alloc)
     return false;
 
-  if (log)
-    log->Printf("%s - found allocation 0x%" PRIx64, __FUNCTION__,
-                *alloc->address.get());
+  LLDB_LOGF(log, "%s - found allocation 0x%" PRIx64, __FUNCTION__,
+            *alloc->address.get());
 
   // JIT all the allocation details
   if (alloc->ShouldRefresh()) {
-    if (log)
-      log->Printf("%s - allocation details not calculated yet, jitting info.",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - allocation details not calculated yet, jitting info.",
+              __FUNCTION__);
 
     if (!RefreshAllocation(alloc, frame_ptr)) {
-      if (log)
-        log->Printf("%s - couldn't JIT allocation details", __FUNCTION__);
+      LLDB_LOGF(log, "%s - couldn't JIT allocation details", __FUNCTION__);
       return false;
     }
   }
@@ -2559,9 +2469,8 @@
                            sizeof(AllocationDetails::FileHeader),
          sizeof(AllocationDetails::ElementHeader));
 
-  if (log)
-    log->Printf("%s - header type %" PRIu32 ", element size %" PRIu32,
-                __FUNCTION__, root_el_hdr.type, root_el_hdr.element_size);
+  LLDB_LOGF(log, "%s - header type %" PRIu32 ", element size %" PRIu32,
+            __FUNCTION__, root_el_hdr.type, root_el_hdr.element_size);
 
   // Check if the target allocation and file both have the same number of bytes
   // for an Element
@@ -2717,19 +2626,16 @@
   if (!alloc)
     return false;
 
-  if (log)
-    log->Printf("%s - found allocation 0x%" PRIx64 ".", __FUNCTION__,
-                *alloc->address.get());
+  LLDB_LOGF(log, "%s - found allocation 0x%" PRIx64 ".", __FUNCTION__,
+            *alloc->address.get());
 
   // JIT all the allocation details
   if (alloc->ShouldRefresh()) {
-    if (log)
-      log->Printf("%s - allocation details not calculated yet, jitting info.",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - allocation details not calculated yet, jitting info.",
+              __FUNCTION__);
 
     if (!RefreshAllocation(alloc, frame_ptr)) {
-      if (log)
-        log->Printf("%s - couldn't JIT allocation details.", __FUNCTION__);
+      LLDB_LOGF(log, "%s - couldn't JIT allocation details.", __FUNCTION__);
       return false;
     }
   }
@@ -2743,14 +2649,14 @@
   // Check we can create writable file
   FileSpec file_spec(path);
   FileSystem::Instance().Resolve(file_spec);
-  File file;
-  FileSystem::Instance().Open(file, file_spec,
-                              File::eOpenOptionWrite |
-                                  File::eOpenOptionCanCreate |
-                                  File::eOpenOptionTruncate);
+  auto file = FileSystem::Instance().Open(
+      file_spec, File::eOpenOptionWrite | File::eOpenOptionCanCreate |
+                     File::eOpenOptionTruncate);
 
   if (!file) {
-    strm.Printf("Error: Failed to open '%s' for writing", path);
+    std::string error = llvm::toString(file.takeError());
+    strm.Printf("Error: Failed to open '%s' for writing: %s", path,
+                error.c_str());
     strm.EOL();
     return false;
   }
@@ -2779,11 +2685,10 @@
 
   // Write the file header
   size_t num_bytes = sizeof(AllocationDetails::FileHeader);
-  if (log)
-    log->Printf("%s - writing File Header, 0x%" PRIx64 " bytes", __FUNCTION__,
-                (uint64_t)num_bytes);
+  LLDB_LOGF(log, "%s - writing File Header, 0x%" PRIx64 " bytes", __FUNCTION__,
+            (uint64_t)num_bytes);
 
-  Status err = file.Write(&head, num_bytes);
+  Status err = file.get()->Write(&head, num_bytes);
   if (!err.Success()) {
     strm.Printf("Error: '%s' when writing to file '%s'", err.AsCString(), path);
     strm.EOL();
@@ -2805,11 +2710,10 @@
 
   // Write headers for allocation element type to file
   num_bytes = element_header_size;
-  if (log)
-    log->Printf("%s - writing element headers, 0x%" PRIx64 " bytes.",
-                __FUNCTION__, (uint64_t)num_bytes);
+  LLDB_LOGF(log, "%s - writing element headers, 0x%" PRIx64 " bytes.",
+            __FUNCTION__, (uint64_t)num_bytes);
 
-  err = file.Write(element_header_buffer.get(), num_bytes);
+  err = file.get()->Write(element_header_buffer.get(), num_bytes);
   if (!err.Success()) {
     strm.Printf("Error: '%s' when writing to file '%s'", err.AsCString(), path);
     strm.EOL();
@@ -2818,11 +2722,10 @@
 
   // Write allocation data to file
   num_bytes = static_cast<size_t>(*alloc->size.get());
-  if (log)
-    log->Printf("%s - writing 0x%" PRIx64 " bytes", __FUNCTION__,
-                (uint64_t)num_bytes);
+  LLDB_LOGF(log, "%s - writing 0x%" PRIx64 " bytes", __FUNCTION__,
+            (uint64_t)num_bytes);
 
-  err = file.Write(buffer.get(), num_bytes);
+  err = file.get()->Write(buffer.get(), num_bytes);
   if (!err.Success()) {
     strm.Printf("Error: '%s' when writing to file '%s'", err.AsCString(), path);
     strm.EOL();
@@ -2894,17 +2797,17 @@
           addr_t addr = debug_present->GetLoadAddress(&target);
           GetProcess()->WriteMemory(addr, &flag, sizeof(flag), err);
           if (err.Success()) {
-            if (log)
-              log->Printf("%s - debugger present flag set on debugee.",
-                          __FUNCTION__);
+            LLDB_LOGF(log, "%s - debugger present flag set on debugee.",
+                      __FUNCTION__);
 
             m_debuggerPresentFlagged = true;
           } else if (log) {
-            log->Printf("%s - error writing debugger present flags '%s' ",
-                        __FUNCTION__, err.AsCString());
+            LLDB_LOGF(log, "%s - error writing debugger present flags '%s' ",
+                      __FUNCTION__, err.AsCString());
           }
         } else if (log) {
-          log->Printf(
+          LLDB_LOGF(
+              log,
               "%s - error writing debugger present flags - symbol not found",
               __FUNCTION__);
         }
@@ -3004,8 +2907,7 @@
       return false;
     }
 
-    if (log)
-      log->Printf("Found RenderScript reduction '%s'", spec[2].str().c_str());
+    LLDB_LOGF(log, "Found RenderScript reduction '%s'", spec[2].str().c_str());
 
     m_reductions.push_back(RSReductionDescriptor(this, sig, accum_data_size,
                                                  spec[2], spec[3], spec[4],
@@ -3082,10 +2984,8 @@
   {
     const llvm::StringRef raw_rs_info((const char *)buffer->GetBytes());
     raw_rs_info.split(info_lines, '\n');
-    if (log)
-      log->Printf("'.rs.info symbol for '%s':\n%s",
-                  m_module->GetFileSpec().GetCString(),
-                  raw_rs_info.str().c_str());
+    LLDB_LOGF(log, "'.rs.info symbol for '%s':\n%s",
+              m_module->GetFileSpec().GetCString(), raw_rs_info.str().c_str());
   }
 
   enum {
@@ -3153,9 +3053,8 @@
       success = ParseVersionInfo(line, n_lines);
       break;
     default: {
-      if (log)
-        log->Printf("%s - skipping .rs.info field '%s'", __FUNCTION__,
-                    line->str().c_str());
+      LLDB_LOGF(log, "%s - skipping .rs.info field '%s'", __FUNCTION__,
+                line->str().c_str());
       continue;
     }
     }
@@ -3276,15 +3175,13 @@
   if (!alloc)
     return false; // FindAllocByID() will print error message for us here
 
-  if (log)
-    log->Printf("%s - found allocation 0x%" PRIx64, __FUNCTION__,
-                *alloc->address.get());
+  LLDB_LOGF(log, "%s - found allocation 0x%" PRIx64, __FUNCTION__,
+            *alloc->address.get());
 
   // Check we have information about the allocation, if not calculate it
   if (alloc->ShouldRefresh()) {
-    if (log)
-      log->Printf("%s - allocation details not calculated yet, jitting info.",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - allocation details not calculated yet, jitting info.",
+              __FUNCTION__);
 
     // JIT all the allocation information
     if (!RefreshAllocation(alloc, frame_ptr)) {
@@ -3313,9 +3210,8 @@
 
   const uint32_t data_size = *alloc->element.datum_size.get();
 
-  if (log)
-    log->Printf("%s - element size %" PRIu32 " bytes, including padding",
-                __FUNCTION__, data_size);
+  LLDB_LOGF(log, "%s - element size %" PRIu32 " bytes, including padding",
+            __FUNCTION__, data_size);
 
   // Allocate a buffer to copy data into
   std::shared_ptr<uint8_t> buffer = GetAllocationData(alloc, frame_ptr);
@@ -3340,10 +3236,10 @@
   const uint32_t size = *alloc->size.get(); // Size of whole allocation
   const uint32_t padding =
       alloc->element.padding.isValid() ? *alloc->element.padding.get() : 0;
-  if (log)
-    log->Printf("%s - stride %" PRIu32 " bytes, size %" PRIu32
-                " bytes, padding %" PRIu32,
-                __FUNCTION__, stride, size, padding);
+  LLDB_LOGF(log,
+            "%s - stride %" PRIu32 " bytes, size %" PRIu32
+            " bytes, padding %" PRIu32,
+            __FUNCTION__, stride, size, padding);
 
   // Find dimensions used to index loops, so need to be non-zero
   uint32_t dim_x = alloc->dimension.get()->dim_1;
@@ -3395,8 +3291,7 @@
                        *alloc->data_ptr.get() + offset);
 
           if (written < 0 || written >= jit_max_expr_size) {
-            if (log)
-              log->Printf("%s - error in snprintf().", __FUNCTION__);
+            LLDB_LOGF(log, "%s - error in snprintf().", __FUNCTION__);
             continue;
           }
 
@@ -3573,17 +3468,16 @@
     for (const auto &module : m_rsmodules)
       BreakOnModuleKernels(module);
 
-    if (log)
-      log->Printf("%s(True) - breakpoints set on all currently loaded kernels.",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "%s(True) - breakpoints set on all currently loaded kernels.",
+              __FUNCTION__);
   } else if (!do_break &&
              m_breakAllKernels) // Breakpoints won't be set on any new kernels.
   {
     m_breakAllKernels = false;
 
-    if (log)
-      log->Printf("%s(False) - breakpoints no longer automatically set.",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s(False) - breakpoints no longer automatically set.",
+              __FUNCTION__);
   }
 }
 
@@ -3595,8 +3489,8 @@
       GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE | LIBLLDB_LOG_BREAKPOINTS));
 
   if (!m_filtersp) {
-    if (log)
-      log->Printf("%s - error, no breakpoint search filter set.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - error, no breakpoint search filter set.",
+              __FUNCTION__);
     return nullptr;
   }
 
@@ -3610,9 +3504,8 @@
   Status err;
   target.AddNameToBreakpoint(bp, "RenderScriptKernel", err);
   if (err.Fail() && log)
-    if (log)
-      log->Printf("%s - error setting break name, '%s'.", __FUNCTION__,
-                  err.AsCString());
+    LLDB_LOGF(log, "%s - error setting break name, '%s'.", __FUNCTION__,
+              err.AsCString());
 
   return bp;
 }
@@ -3624,8 +3517,8 @@
       GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE | LIBLLDB_LOG_BREAKPOINTS));
 
   if (!m_filtersp) {
-    if (log)
-      log->Printf("%s - error, no breakpoint search filter set.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - error, no breakpoint search filter set.",
+              __FUNCTION__);
     return nullptr;
   }
 
@@ -3640,8 +3533,8 @@
   Status err;
   target.AddNameToBreakpoint(bp, "RenderScriptReduction", err);
   if (err.Fail() && log)
-      log->Printf("%s - error setting break name, '%s'.", __FUNCTION__,
-                  err.AsCString());
+    LLDB_LOGF(log, "%s - error setting break name, '%s'.", __FUNCTION__,
+              err.AsCString());
 
   return bp;
 }
@@ -3663,9 +3556,8 @@
           StackFrame::eExpressionPathOptionsAllowDirectIVarAccess,
       var_sp, err));
   if (!err.Success()) {
-    if (log)
-      log->Printf("%s - error, couldn't find '%s' in frame", __FUNCTION__,
-                  var_name);
+    LLDB_LOGF(log, "%s - error, couldn't find '%s' in frame", __FUNCTION__,
+              var_name);
     return false;
   }
 
@@ -3673,9 +3565,8 @@
   bool success = false;
   val = value_sp->GetValueAsUnsigned(0, &success);
   if (!success) {
-    if (log)
-      log->Printf("%s - error, couldn't parse '%s' as an uint32_t.",
-                  __FUNCTION__, var_name);
+    LLDB_LOGF(log, "%s - error, couldn't parse '%s' as an uint32_t.",
+              __FUNCTION__, var_name);
     return false;
   }
 
@@ -3695,8 +3586,7 @@
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE));
 
   if (!thread_ptr) {
-    if (log)
-      log->Printf("%s - Error, No thread pointer", __FUNCTION__);
+    LLDB_LOGF(log, "%s - Error, No thread pointer", __FUNCTION__);
 
     return false;
   }
@@ -3718,17 +3608,15 @@
     if (!func_name)
       continue;
 
-    if (log)
-      log->Printf("%s - Inspecting function '%s'", __FUNCTION__,
-                  func_name.GetCString());
+    LLDB_LOGF(log, "%s - Inspecting function '%s'", __FUNCTION__,
+              func_name.GetCString());
 
     // Check if function name has .expand suffix
     if (!func_name.GetStringRef().endswith(".expand"))
       continue;
 
-    if (log)
-      log->Printf("%s - Found .expand function '%s'", __FUNCTION__,
-                  func_name.GetCString());
+    LLDB_LOGF(log, "%s - Found .expand function '%s'", __FUNCTION__,
+              func_name.GetCString());
 
     // Get values for variables in .expand frame that tell us the current
     // kernel invocation
@@ -3770,9 +3658,8 @@
   // Coordinate we want to stop on
   RSCoordinate target_coord = *static_cast<RSCoordinate *>(baton);
 
-  if (log)
-    log->Printf("%s - Break ID %" PRIu64 ", " FMT_COORD, __FUNCTION__, break_id,
-                target_coord.x, target_coord.y, target_coord.z);
+  LLDB_LOGF(log, "%s - Break ID %" PRIu64 ", " FMT_COORD, __FUNCTION__,
+            break_id, target_coord.x, target_coord.y, target_coord.z);
 
   // Select current thread
   ExecutionContext context(ctx->exe_ctx_ref);
@@ -3782,22 +3669,19 @@
   // Find current kernel invocation from .expand frame variables
   RSCoordinate current_coord{};
   if (!GetKernelCoordinate(current_coord, thread_ptr)) {
-    if (log)
-      log->Printf("%s - Error, couldn't select .expand stack frame",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "%s - Error, couldn't select .expand stack frame",
+              __FUNCTION__);
     return false;
   }
 
-  if (log)
-    log->Printf("%s - " FMT_COORD, __FUNCTION__, current_coord.x,
-                current_coord.y, current_coord.z);
+  LLDB_LOGF(log, "%s - " FMT_COORD, __FUNCTION__, current_coord.x,
+            current_coord.y, current_coord.z);
 
   // Check if the current kernel invocation coordinate matches our target
   // coordinate
   if (target_coord == current_coord) {
-    if (log)
-      log->Printf("%s, BREAKING " FMT_COORD, __FUNCTION__, current_coord.x,
-                  current_coord.y, current_coord.z);
+    LLDB_LOGF(log, "%s, BREAKING " FMT_COORD, __FUNCTION__, current_coord.x,
+              current_coord.y, current_coord.z);
 
     BreakpointSP breakpoint_sp =
         context.GetTargetPtr()->GetBreakpointByID(break_id);
@@ -3865,8 +3749,8 @@
       GetLogIfAnyCategoriesSet(LIBLLDB_LOG_LANGUAGE | LIBLLDB_LOG_BREAKPOINTS));
 
   if (!m_filtersp) {
-    if (log)
-      log->Printf("%s - error, no breakpoint search filter set.", __FUNCTION__);
+    LLDB_LOGF(log, "%s - error, no breakpoint search filter set.",
+              __FUNCTION__);
     return nullptr;
   }
 
@@ -3880,8 +3764,8 @@
   Status err;
   target.AddNameToBreakpoint(bp, name.GetCString(), err);
   if (err.Fail() && log)
-    log->Printf("%s - error setting break name, '%s'.", __FUNCTION__,
-                err.AsCString());
+    LLDB_LOGF(log, "%s - error setting break name, '%s'.", __FUNCTION__,
+              err.AsCString());
   // ask the breakpoint to resolve itself
   bp->ResolveBreakpoint();
   return bp;
@@ -3964,9 +3848,8 @@
   auto it = m_allocations.begin();
   while (it != m_allocations.end()) {
     if (*((*it)->address) == address) {
-      if (log)
-        log->Printf("%s - Removing allocation id: %d, address: 0x%" PRIx64,
-                    __FUNCTION__, (*it)->id, address);
+      LLDB_LOGF(log, "%s - Removing allocation id: %d, address: 0x%" PRIx64,
+                __FUNCTION__, (*it)->id, address);
 
       it = m_allocations.erase(it);
     } else {
@@ -3988,9 +3871,8 @@
   Address resolved;
   // RenderScript module
   if (!target.GetSectionLoadList().ResolveLoadAddress(kernel_addr, resolved)) {
-    if (log)
-      log->Printf("%s: unable to resolve 0x%" PRIx64 " to a loaded symbol",
-                  __FUNCTION__, kernel_addr);
+    LLDB_LOGF(log, "%s: unable to resolve 0x%" PRIx64 " to a loaded symbol",
+              __FUNCTION__, kernel_addr);
     return false;
   }
 
@@ -4000,9 +3882,8 @@
 
   name = sym->GetName();
   assert(IsRenderScriptModule(resolved.CalculateSymbolContextModule()));
-  if (log)
-    log->Printf("%s: 0x%" PRIx64 " resolved to the symbol '%s'", __FUNCTION__,
-                kernel_addr, name.GetCString());
+  LLDB_LOGF(log, "%s: 0x%" PRIx64 " resolved to the symbol '%s'", __FUNCTION__,
+            kernel_addr, name.GetCString());
   return true;
 }
 
@@ -4010,7 +3891,7 @@
   int indent = strm.GetIndentLevel();
 
   strm.Indent();
-  m_module->GetFileSpec().Dump(&strm);
+  m_module->GetFileSpec().Dump(strm.AsRawOstream());
   strm.Indent(m_module->GetNumCompileUnits() ? "Debug info loaded."
                                              : "Debug info does not exist.");
   strm.EOL();
@@ -4256,13 +4137,12 @@
       // Matching a comma separated list of known words is fairly
       // straightforward with PCRE, but we're using ERE, so we end up with a
       // little ugliness...
-      RegularExpression::Match match(/* max_matches */ 5);
       RegularExpression match_type_list(
           llvm::StringRef("^([[:alpha:]]+)(,[[:alpha:]]+){0,4}$"));
 
       assert(match_type_list.IsValid());
 
-      if (!match_type_list.Execute(option_val, &match)) {
+      if (!match_type_list.Execute(option_val)) {
         err_str.PutCString(
             "a comma-separated list of kernel types is required");
         return false;
@@ -4696,32 +4576,36 @@
       return false;
     }
 
-    Stream *output_strm = nullptr;
-    StreamFile outfile_stream;
+    Stream *output_stream_p = nullptr;
+    std::unique_ptr<Stream> output_stream_storage;
+
     const FileSpec &outfile_spec =
         m_options.m_outfile; // Dump allocation to file instead
     if (outfile_spec) {
       // Open output file
       std::string path = outfile_spec.GetPath();
-      auto error = FileSystem::Instance().Open(
-          outfile_stream.GetFile(), outfile_spec,
-          File::eOpenOptionWrite | File::eOpenOptionCanCreate);
-      if (error.Success()) {
-        output_strm = &outfile_stream;
+      auto file = FileSystem::Instance().Open(
+          outfile_spec, File::eOpenOptionWrite | File::eOpenOptionCanCreate);
+      if (file) {
+        output_stream_storage =
+            std::make_unique<StreamFile>(std::move(file.get()));
+        output_stream_p = output_stream_storage.get();
         result.GetOutputStream().Printf("Results written to '%s'",
                                         path.c_str());
         result.GetOutputStream().EOL();
       } else {
-        result.AppendErrorWithFormat("Couldn't open file '%s'", path.c_str());
+        std::string error = llvm::toString(file.takeError());
+        result.AppendErrorWithFormat("Couldn't open file '%s': %s",
+                                     path.c_str(), error.c_str());
         result.SetStatus(eReturnStatusFailed);
         return false;
       }
     } else
-      output_strm = &result.GetOutputStream();
+      output_stream_p = &result.GetOutputStream();
 
-    assert(output_strm != nullptr);
+    assert(output_stream_p != nullptr);
     bool dumped =
-        runtime->DumpAllocation(*output_strm, m_exe_ctx.GetFramePtr(), id);
+        runtime->DumpAllocation(*output_stream_p, m_exe_ctx.GetFramePtr(), id);
 
     if (dumped)
       result.SetStatus(eReturnStatusSuccessFinishResult);
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
index 3923221..c3740ba 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h
@@ -67,8 +67,8 @@
   void Dump(Stream *s) const override {}
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
 
@@ -117,8 +117,8 @@
   void Dump(Stream *s) const override {}
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
 
@@ -262,8 +262,8 @@
   void Dump(Stream *s) const override {}
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override;
+                                          SymbolContext &context,
+                                          Address *addr) override;
 
   lldb::SearchDepth GetDepth() override { return lldb::eSearchDepthModule; }
 
diff --git a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
index 4725e8c..4ddff3a 100644
--- a/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
+++ b/src/llvm-project/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
@@ -72,7 +72,7 @@
   (void)module;
   if (!call_inst->hasByValArgument())
     return false;
-  for (const auto &param : call_inst->operand_values())
+  for (const auto *param : call_inst->operand_values())
     if (isRSAllocationPtrTy(param->getType()))
       return true;
   return false;
@@ -93,9 +93,8 @@
   assert(orig && "CallInst has no called function");
   llvm::FunctionType *orig_type = orig->getFunctionType();
   auto name = orig->getName();
-  if (log)
-    log->Printf("%s - cloning to StructRet function for '%s'", __FUNCTION__,
-                name.str().c_str());
+  LLDB_LOGF(log, "%s - cloning to StructRet function for '%s'", __FUNCTION__,
+            name.str().c_str());
 
   unsigned num_params = orig_type->getNumParams();
   std::vector<llvm::Type *> new_params{num_params + 1, nullptr};
@@ -113,9 +112,9 @@
   if (!return_type_ptr_type)
     return nullptr;
 
-  if (log)
-    log->Printf("%s - return type pointer type for StructRet clone @ '0x%p':\n",
-                __FUNCTION__, (void *)return_type_ptr_type);
+  LLDB_LOGF(log,
+            "%s - return type pointer type for StructRet clone @ '0x%p':\n",
+            __FUNCTION__, (void *)return_type_ptr_type);
   // put the sret pointer argument in place at the beginning of the
   // argument list.
   params.emplace(params.begin(), return_type_ptr_type);
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.cpp b/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.cpp
index d489eaf..b83b2ef 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.cpp
@@ -16,7 +16,19 @@
 using namespace lldb_private::breakpad;
 
 namespace {
-enum class Token { Unknown, Module, Info, CodeID, File, Func, Public, Stack, CFI, Init };
+enum class Token {
+  Unknown,
+  Module,
+  Info,
+  CodeID,
+  File,
+  Func,
+  Public,
+  Stack,
+  CFI,
+  Init,
+  Win,
+};
 }
 
 template<typename T>
@@ -33,6 +45,7 @@
       .Case("STACK", Token::Stack)
       .Case("CFI", Token::CFI)
       .Case("INIT", Token::Init)
+      .Case("WIN", Token::Win)
       .Default(Token::Unknown);
 }
 
@@ -59,7 +72,7 @@
       .Case("sparc", Triple::sparc)
       .Case("sparcv9", Triple::sparcv9)
       .Case("x86", Triple::x86)
-      .Case("x86_64", Triple::x86_64)
+      .Cases("x86_64", "x86_64h", Triple::x86_64)
       .Default(Triple::UnknownArch);
 }
 
@@ -127,6 +140,8 @@
     switch (Tok) {
     case Token::CFI:
       return Record::StackCFI;
+    case Token::Win:
+      return Record::StackWin;
     default:
       return llvm::None;
     }
@@ -134,13 +149,13 @@
   case Token::Unknown:
     // Optimistically assume that any unrecognised token means this is a line
     // record, those don't have a special keyword and start directly with a
-    // hex number. CODE_ID should never be at the start of a line, but if it
-    // is, it can be treated the same way as a garbled line record.
+    // hex number.
     return Record::Line;
 
   case Token::CodeID:
   case Token::CFI:
   case Token::Init:
+  case Token::Win:
     // These should never appear at the start of a valid record.
     return llvm::None;
   }
@@ -390,6 +405,81 @@
   return OS << " " << R.UnwindRules;
 }
 
+llvm::Optional<StackWinRecord> StackWinRecord::parse(llvm::StringRef Line) {
+  // STACK WIN type rva code_size prologue_size epilogue_size parameter_size
+  //     saved_register_size local_size max_stack_size has_program_string
+  //     program_string_OR_allocates_base_pointer
+
+  if (consume<Token>(Line) != Token::Stack)
+    return llvm::None;
+  if (consume<Token>(Line) != Token::Win)
+    return llvm::None;
+
+  llvm::StringRef Str;
+  uint8_t Type;
+  std::tie(Str, Line) = getToken(Line);
+  // Right now we only support the "FrameData" frame type.
+  if (!to_integer(Str, Type) || FrameType(Type) != FrameType::FrameData)
+    return llvm::None;
+
+  lldb::addr_t RVA;
+  std::tie(Str, Line) = getToken(Line);
+  if (!to_integer(Str, RVA, 16))
+    return llvm::None;
+
+  lldb::addr_t CodeSize;
+  std::tie(Str, Line) = getToken(Line);
+  if (!to_integer(Str, CodeSize, 16))
+    return llvm::None;
+
+  // Skip fields which we aren't using right now.
+  std::tie(Str, Line) = getToken(Line); // prologue_size
+  std::tie(Str, Line) = getToken(Line); // epilogue_size
+
+  lldb::addr_t ParameterSize;
+  std::tie(Str, Line) = getToken(Line);
+  if (!to_integer(Str, ParameterSize, 16))
+    return llvm::None;
+
+  lldb::addr_t SavedRegisterSize;
+  std::tie(Str, Line) = getToken(Line);
+  if (!to_integer(Str, SavedRegisterSize, 16))
+    return llvm::None;
+
+  lldb::addr_t LocalSize;
+  std::tie(Str, Line) = getToken(Line);
+  if (!to_integer(Str, LocalSize, 16))
+    return llvm::None;
+
+  std::tie(Str, Line) = getToken(Line); // max_stack_size
+
+  uint8_t HasProgramString;
+  std::tie(Str, Line) = getToken(Line);
+  if (!to_integer(Str, HasProgramString))
+    return llvm::None;
+  // FrameData records should always have a program string.
+  if (!HasProgramString)
+    return llvm::None;
+
+  return StackWinRecord(RVA, CodeSize, ParameterSize, SavedRegisterSize,
+                        LocalSize, Line.trim());
+}
+
+bool breakpad::operator==(const StackWinRecord &L, const StackWinRecord &R) {
+  return L.RVA == R.RVA && L.CodeSize == R.CodeSize &&
+         L.ParameterSize == R.ParameterSize &&
+         L.SavedRegisterSize == R.SavedRegisterSize &&
+         L.LocalSize == R.LocalSize && L.ProgramString == R.ProgramString;
+}
+
+llvm::raw_ostream &breakpad::operator<<(llvm::raw_ostream &OS,
+                                        const StackWinRecord &R) {
+  return OS << llvm::formatv(
+             "STACK WIN 4 {0:x-} {1:x-} ? ? {2} {3} {4} ? 1 {5}", R.RVA,
+             R.CodeSize, R.ParameterSize, R.SavedRegisterSize, R.LocalSize,
+             R.ProgramString);
+}
+
 llvm::StringRef breakpad::toString(Record::Kind K) {
   switch (K) {
   case Record::Module:
@@ -406,6 +496,8 @@
     return "PUBLIC";
   case Record::StackCFI:
     return "STACK CFI";
+  case Record::StackWin:
+    return "STACK WIN";
   }
   llvm_unreachable("Unknown record kind!");
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.h b/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.h
index 5d5cdb3..27bef97 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.h
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/BreakpadRecords.h
@@ -20,7 +20,7 @@
 
 class Record {
 public:
-  enum Kind { Module, Info, File, Func, Line, Public, StackCFI };
+  enum Kind { Module, Info, File, Func, Line, Public, StackCFI, StackWin };
 
   /// Attempt to guess the kind of the record present in the argument without
   /// doing a full parse. The returned kind will always be correct for valid
@@ -157,6 +157,29 @@
 bool operator==(const StackCFIRecord &L, const StackCFIRecord &R);
 llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const StackCFIRecord &R);
 
+class StackWinRecord : public Record {
+public:
+  static llvm::Optional<StackWinRecord> parse(llvm::StringRef Line);
+
+  StackWinRecord(lldb::addr_t RVA, lldb::addr_t CodeSize,
+                 lldb::addr_t ParameterSize, lldb::addr_t SavedRegisterSize,
+                 lldb::addr_t LocalSize, llvm::StringRef ProgramString)
+      : Record(StackWin), RVA(RVA), CodeSize(CodeSize),
+        ParameterSize(ParameterSize), SavedRegisterSize(SavedRegisterSize),
+        LocalSize(LocalSize), ProgramString(ProgramString) {}
+
+  enum class FrameType : uint8_t { FPO = 0, FrameData = 4 };
+  lldb::addr_t RVA;
+  lldb::addr_t CodeSize;
+  lldb::addr_t ParameterSize;
+  lldb::addr_t SavedRegisterSize;
+  lldb::addr_t LocalSize;
+  llvm::StringRef ProgramString;
+};
+
+bool operator==(const StackWinRecord &L, const StackWinRecord &R);
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const StackWinRecord &R);
+
 } // namespace breakpad
 } // namespace lldb_private
 
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp b/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
index 60dd9f9..3b9e0e2 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.cpp
@@ -42,6 +42,8 @@
   return Header{ArchSpec(triple), std::move(uuid)};
 }
 
+char ObjectFileBreakpad::ID;
+
 void ObjectFileBreakpad::Initialize() {
   PluginManager::RegisterPlugin(GetPluginNameStatic(),
                                 GetPluginDescriptionStatic(), CreateInstance,
@@ -125,7 +127,7 @@
 void ObjectFileBreakpad::CreateSections(SectionList &unified_section_list) {
   if (m_sections_up)
     return;
-  m_sections_up = llvm::make_unique<SectionList>();
+  m_sections_up = std::make_unique<SectionList>();
 
   llvm::Optional<Record::Kind> current_section;
   offset_t section_start;
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h b/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
index e8885e0..cb4bba0 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
@@ -48,6 +48,13 @@
 
   uint32_t GetPluginVersion() override { return 1; }
 
+  // LLVM RTTI support
+  static char ID;
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || ObjectFile::isA(ClassID);
+  }
+  static bool classof(const ObjectFile *obj) { return obj->isA(&ID); }
+
   // ObjectFile Protocol.
 
   bool ParseHeader() override;
@@ -78,8 +85,6 @@
 
   UUID GetUUID() override { return m_uuid; }
 
-  FileSpecList GetDebugSymbolFilePaths() override { return FileSpecList(); }
-
   uint32_t GetDependentModules(FileSpecList &files) override { return 0; }
 
   Type CalculateType() override { return eTypeDebugInfo; }
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/src/llvm-project/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index d62afa3..8b62afa 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -18,6 +18,7 @@
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/Section.h"
 #include "lldb/Host/FileSystem.h"
+#include "lldb/Host/LZMA.h"
 #include "lldb/Symbol/DWARFCallFrameInfo.h"
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Target/SectionLoadList.h"
@@ -29,12 +30,13 @@
 #include "lldb/Utility/Status.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/Timer.h"
-
 #include "llvm/ADT/IntervalMap.h"
 #include "llvm/ADT/PointerUnion.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/BinaryFormat/ELF.h"
 #include "llvm/Object/Decompressor.h"
 #include "llvm/Support/ARMBuildAttributes.h"
+#include "llvm/Support/CRC.h"
 #include "llvm/Support/MathExtras.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/MipsABIFlags.h"
@@ -80,41 +82,6 @@
 const elf_word LLDB_NT_GNU_ABI_OS_HURD = 0x01;
 const elf_word LLDB_NT_GNU_ABI_OS_SOLARIS = 0x02;
 
-// LLDB_NT_OWNER_CORE and LLDB_NT_OWNER_LINUX note contants
-#define NT_PRSTATUS 1
-#define NT_PRFPREG 2
-#define NT_PRPSINFO 3
-#define NT_TASKSTRUCT 4
-#define NT_AUXV 6
-#define NT_SIGINFO 0x53494749
-#define NT_FILE 0x46494c45
-#define NT_PRXFPREG 0x46e62b7f
-#define NT_PPC_VMX 0x100
-#define NT_PPC_SPE 0x101
-#define NT_PPC_VSX 0x102
-#define NT_386_TLS 0x200
-#define NT_386_IOPERM 0x201
-#define NT_X86_XSTATE 0x202
-#define NT_S390_HIGH_GPRS 0x300
-#define NT_S390_TIMER 0x301
-#define NT_S390_TODCMP 0x302
-#define NT_S390_TODPREG 0x303
-#define NT_S390_CTRS 0x304
-#define NT_S390_PREFIX 0x305
-#define NT_S390_LAST_BREAK 0x306
-#define NT_S390_SYSTEM_CALL 0x307
-#define NT_S390_TDB 0x308
-#define NT_S390_VXRS_LOW 0x309
-#define NT_S390_VXRS_HIGH 0x30a
-#define NT_ARM_VFP 0x400
-#define NT_ARM_TLS 0x401
-#define NT_ARM_HW_BREAK 0x402
-#define NT_ARM_HW_WATCH 0x403
-#define NT_ARM_SYSTEM_CALL 0x404
-#define NT_METAG_CBUF 0x500
-#define NT_METAG_RPIPE 0x501
-#define NT_METAG_TLS 0x502
-
 //===----------------------------------------------------------------------===//
 /// \class ELFRelocation
 /// Generic wrapper for ELFRel and ELFRela.
@@ -264,8 +231,7 @@
   const char *cstr = data.GetCStr(offset, llvm::alignTo(n_namesz, 4));
   if (cstr == nullptr) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS));
-    if (log)
-      log->Printf("Failed to parse note name lacking nul terminator");
+    LLDB_LOGF(log, "Failed to parse note name lacking nul terminator");
 
     return false;
   }
@@ -333,6 +299,8 @@
   return LLDB_INVALID_CPUTYPE;
 }
 
+char ObjectFileELF::ID;
+
 // Arbitrary constant used as UUID prefix for core files.
 const uint32_t ObjectFileELF::g_core_uuid_magic(0xE210C);
 
@@ -429,67 +397,9 @@
   return false;
 }
 
-/*
- * crc function from http://svnweb.freebsd.org/base/head/sys/libkern/crc32.c
- *
- *   COPYRIGHT (C) 1986 Gary S. Brown. You may use this program, or
- *   code or tables extracted from it, as desired without restriction.
- */
-static uint32_t calc_crc32(uint32_t crc, const void *buf, size_t size) {
-  static const uint32_t g_crc32_tab[] = {
-      0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
-      0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
-      0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
-      0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
-      0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
-      0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
-      0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
-      0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
-      0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
-      0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
-      0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
-      0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
-      0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
-      0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
-      0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
-      0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
-      0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
-      0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
-      0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
-      0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
-      0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
-      0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
-      0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
-      0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
-      0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
-      0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
-      0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
-      0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
-      0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
-      0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
-      0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
-      0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
-      0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
-      0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
-      0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
-      0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
-      0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
-      0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
-      0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
-      0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
-      0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
-      0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
-      0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d};
-  const uint8_t *p = (const uint8_t *)buf;
-
-  crc = crc ^ ~0U;
-  while (size--)
-    crc = g_crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8);
-  return crc ^ ~0U;
-}
-
-static uint32_t calc_gnu_debuglink_crc32(const void *buf, size_t size) {
-  return calc_crc32(0U, buf, size);
+static uint32_t calc_crc32(uint32_t init, const DataExtractor &data) {
+  return llvm::crc32(
+      init, llvm::makeArrayRef(data.GetDataStart(), data.GetByteSize()));
 }
 
 uint32_t ObjectFileELF::CalculateELFNotesSegmentsCRC32(
@@ -509,8 +419,7 @@
         break;
       }
 
-      core_notes_crc = calc_crc32(core_notes_crc, segment_data.GetDataStart(),
-                                  segment_data.GetByteSize());
+      core_notes_crc = calc_crc32(core_notes_crc, segment_data);
     }
   }
 
@@ -608,10 +517,9 @@
           llvm::Triple::OSType spec_ostype =
               spec.GetArchitecture().GetTriple().getOS();
 
-          if (log)
-            log->Printf("ObjectFileELF::%s file '%s' module OSABI: %s",
-                        __FUNCTION__, file.GetPath().c_str(),
-                        OSABIAsCString(header.e_ident[EI_OSABI]));
+          LLDB_LOGF(log, "ObjectFileELF::%s file '%s' module OSABI: %s",
+                    __FUNCTION__, file.GetPath().c_str(),
+                    OSABIAsCString(header.e_ident[EI_OSABI]));
 
           // SetArchitecture should have set the vendor to unknown
           vendor = spec.GetArchitecture().GetTriple().getVendor();
@@ -623,10 +531,10 @@
           GetOsFromOSABI(header.e_ident[EI_OSABI], ostype);
           assert(spec_ostype == ostype);
           if (spec_ostype != llvm::Triple::OSType::UnknownOS) {
-            if (log)
-              log->Printf("ObjectFileELF::%s file '%s' set ELF module OS type "
-                          "from ELF header OSABI.",
-                          __FUNCTION__, file.GetPath().c_str());
+            LLDB_LOGF(log,
+                      "ObjectFileELF::%s file '%s' set ELF module OS type "
+                      "from ELF header OSABI.",
+                      __FUNCTION__, file.GetPath().c_str());
           }
 
           data_sp = MapFileData(file, -1, file_offset);
@@ -652,12 +560,12 @@
 
           llvm::Triple &spec_triple = spec.GetArchitecture().GetTriple();
 
-          if (log)
-            log->Printf("ObjectFileELF::%s file '%s' module set to triple: %s "
-                        "(architecture %s)",
-                        __FUNCTION__, file.GetPath().c_str(),
-                        spec_triple.getTriple().c_str(),
-                        spec.GetArchitecture().GetArchitectureName());
+          LLDB_LOGF(log,
+                    "ObjectFileELF::%s file '%s' module set to triple: %s "
+                    "(architecture %s)",
+                    __FUNCTION__, file.GetPath().c_str(),
+                    spec_triple.getTriple().c_str(),
+                    spec.GetArchitecture().GetArchitectureName());
 
           if (!uuid.IsValid()) {
             uint32_t core_notes_crc = 0;
@@ -682,8 +590,7 @@
                 core_notes_crc =
                     CalculateELFNotesSegmentsCRC32(program_headers, data);
               } else {
-                gnu_debuglink_crc = calc_gnu_debuglink_crc32(
-                    data.GetDataStart(), data.GetByteSize());
+                gnu_debuglink_crc = calc_crc32(0, data);
               }
             }
             using u32le = llvm::support::ulittle32_t;
@@ -721,27 +628,16 @@
                              DataBufferSP &data_sp, lldb::offset_t data_offset,
                              const FileSpec *file, lldb::offset_t file_offset,
                              lldb::offset_t length)
-    : ObjectFile(module_sp, file, file_offset, length, data_sp, data_offset),
-      m_header(), m_uuid(), m_gnu_debuglink_file(), m_gnu_debuglink_crc(0),
-      m_program_headers(), m_section_headers(), m_dynamic_symbols(),
-      m_filespec_up(), m_entry_point_address(), m_arch_spec() {
+    : ObjectFile(module_sp, file, file_offset, length, data_sp, data_offset) {
   if (file)
     m_file = *file;
-  ::memset(&m_header, 0, sizeof(m_header));
 }
 
 ObjectFileELF::ObjectFileELF(const lldb::ModuleSP &module_sp,
                              DataBufferSP &header_data_sp,
                              const lldb::ProcessSP &process_sp,
                              addr_t header_addr)
-    : ObjectFile(module_sp, process_sp, header_addr, header_data_sp),
-      m_header(), m_uuid(), m_gnu_debuglink_file(), m_gnu_debuglink_crc(0),
-      m_program_headers(), m_section_headers(), m_dynamic_symbols(),
-      m_filespec_up(), m_entry_point_address(), m_arch_spec() {
-  ::memset(&m_header, 0, sizeof(m_header));
-}
-
-ObjectFileELF::~ObjectFileELF() {}
+    : ObjectFile(module_sp, process_sp, header_addr, header_data_sp) {}
 
 bool ObjectFileELF::IsExecutable() const {
   return ((m_header.e_type & ET_EXEC) != 0) || (m_header.e_entry != 0);
@@ -872,8 +768,7 @@
       }
     } else {
       if (!m_gnu_debuglink_crc)
-        m_gnu_debuglink_crc = calc_gnu_debuglink_crc32(m_data.GetDataStart(),
-                                                       m_data.GetByteSize());
+        m_gnu_debuglink_crc = calc_crc32(0, m_data);
       if (m_gnu_debuglink_crc) {
         // Use 4 bytes of crc from the .gnu_debuglink section.
         u32le data(m_gnu_debuglink_crc);
@@ -885,14 +780,10 @@
   return m_uuid;
 }
 
-lldb_private::FileSpecList ObjectFileELF::GetDebugSymbolFilePaths() {
-  FileSpecList file_spec_list;
-
-  if (!m_gnu_debuglink_file.empty()) {
-    FileSpec file_spec(m_gnu_debuglink_file);
-    file_spec_list.Append(file_spec);
-  }
-  return file_spec_list;
+llvm::Optional<FileSpec> ObjectFileELF::GetDebugLink() {
+  if (m_gnu_debuglink_file.empty())
+    return llvm::None;
+  return FileSpec(m_gnu_debuglink_file);
 }
 
 uint32_t ObjectFileELF::GetDependentModules(FileSpecList &files) {
@@ -1120,9 +1011,8 @@
       return error;
     }
 
-    if (log)
-      log->Printf("ObjectFileELF::%s parsing note name='%s', type=%" PRIu32,
-                  __FUNCTION__, note.n_name.c_str(), note.n_type);
+    LLDB_LOGF(log, "ObjectFileELF::%s parsing note name='%s', type=%" PRIu32,
+              __FUNCTION__, note.n_name.c_str(), note.n_type);
 
     // Process FreeBSD ELF notes.
     if ((note.n_name == LLDB_NT_OWNER_FREEBSD) &&
@@ -1147,11 +1037,11 @@
       arch_spec.GetTriple().setOSName(os_name);
       arch_spec.GetTriple().setVendor(llvm::Triple::VendorType::UnknownVendor);
 
-      if (log)
-        log->Printf("ObjectFileELF::%s detected FreeBSD %" PRIu32 ".%" PRIu32
-                    ".%" PRIu32,
-                    __FUNCTION__, version_major, version_minor,
-                    static_cast<uint32_t>(version_info % 1000));
+      LLDB_LOGF(log,
+                "ObjectFileELF::%s detected FreeBSD %" PRIu32 ".%" PRIu32
+                ".%" PRIu32,
+                __FUNCTION__, version_major, version_minor,
+                static_cast<uint32_t>(version_info % 1000));
     }
     // Process GNU ELF notes.
     else if (note.n_name == LLDB_NT_OWNER_GNU) {
@@ -1172,12 +1062,11 @@
             arch_spec.GetTriple().setOS(llvm::Triple::OSType::Linux);
             arch_spec.GetTriple().setVendor(
                 llvm::Triple::VendorType::UnknownVendor);
-            if (log)
-              log->Printf(
-                  "ObjectFileELF::%s detected Linux, min version %" PRIu32
-                  ".%" PRIu32 ".%" PRIu32,
-                  __FUNCTION__, version_info[1], version_info[2],
-                  version_info[3]);
+            LLDB_LOGF(log,
+                      "ObjectFileELF::%s detected Linux, min version %" PRIu32
+                      ".%" PRIu32 ".%" PRIu32,
+                      __FUNCTION__, version_info[1], version_info[2],
+                      version_info[3]);
             // FIXME we have the minimal version number, we could be propagating
             // that.  version_info[1] = OS Major, version_info[2] = OS Minor,
             // version_info[3] = Revision.
@@ -1186,30 +1075,28 @@
             arch_spec.GetTriple().setOS(llvm::Triple::OSType::UnknownOS);
             arch_spec.GetTriple().setVendor(
                 llvm::Triple::VendorType::UnknownVendor);
-            if (log)
-              log->Printf("ObjectFileELF::%s detected Hurd (unsupported), min "
-                          "version %" PRIu32 ".%" PRIu32 ".%" PRIu32,
-                          __FUNCTION__, version_info[1], version_info[2],
-                          version_info[3]);
+            LLDB_LOGF(log,
+                      "ObjectFileELF::%s detected Hurd (unsupported), min "
+                      "version %" PRIu32 ".%" PRIu32 ".%" PRIu32,
+                      __FUNCTION__, version_info[1], version_info[2],
+                      version_info[3]);
             break;
           case LLDB_NT_GNU_ABI_OS_SOLARIS:
             arch_spec.GetTriple().setOS(llvm::Triple::OSType::Solaris);
             arch_spec.GetTriple().setVendor(
                 llvm::Triple::VendorType::UnknownVendor);
-            if (log)
-              log->Printf(
-                  "ObjectFileELF::%s detected Solaris, min version %" PRIu32
-                  ".%" PRIu32 ".%" PRIu32,
-                  __FUNCTION__, version_info[1], version_info[2],
-                  version_info[3]);
+            LLDB_LOGF(log,
+                      "ObjectFileELF::%s detected Solaris, min version %" PRIu32
+                      ".%" PRIu32 ".%" PRIu32,
+                      __FUNCTION__, version_info[1], version_info[2],
+                      version_info[3]);
             break;
           default:
-            if (log)
-              log->Printf(
-                  "ObjectFileELF::%s unrecognized OS in note, id %" PRIu32
-                  ", min version %" PRIu32 ".%" PRIu32 ".%" PRIu32,
-                  __FUNCTION__, version_info[0], version_info[1],
-                  version_info[2], version_info[3]);
+            LLDB_LOGF(log,
+                      "ObjectFileELF::%s unrecognized OS in note, id %" PRIu32
+                      ", min version %" PRIu32 ".%" PRIu32 ".%" PRIu32,
+                      __FUNCTION__, version_info[0], version_info[1],
+                      version_info[2], version_info[3]);
             break;
           }
         }
@@ -1618,9 +1505,8 @@
                                             section_size) == section_size)) {
             Status error = RefineModuleDetailsFromNote(data, arch_spec, uuid);
             if (error.Fail()) {
-              if (log)
-                log->Printf("ObjectFileELF::%s ELF note processing failed: %s",
-                            __FUNCTION__, error.AsCString());
+              LLDB_LOGF(log, "ObjectFileELF::%s ELF note processing failed: %s",
+                        __FUNCTION__, error.AsCString());
             }
           }
         }
@@ -1686,8 +1572,10 @@
         .Case("info.dwo", eSectionTypeDWARFDebugInfoDwo)
         .Cases("line", "line.dwo", eSectionTypeDWARFDebugLine)
         .Cases("line_str", "line_str.dwo", eSectionTypeDWARFDebugLineStr)
-        .Cases("loc", "loc.dwo", eSectionTypeDWARFDebugLoc)
-        .Cases("loclists", "loclists.dwo", eSectionTypeDWARFDebugLocLists)
+        .Case("loc", eSectionTypeDWARFDebugLoc)
+        .Case("loc.dwo", eSectionTypeDWARFDebugLocDwo)
+        .Case("loclists", eSectionTypeDWARFDebugLocLists)
+        .Case("loclists.dwo", eSectionTypeDWARFDebugLocListsDwo)
         .Case("macinfo", eSectionTypeDWARFDebugMacInfo)
         .Cases("macro", "macro.dwo", eSectionTypeDWARFDebugMacro)
         .Case("names", eSectionTypeDWARFDebugNames)
@@ -1695,6 +1583,7 @@
         .Case("pubtypes", eSectionTypeDWARFDebugPubTypes)
         .Case("ranges", eSectionTypeDWARFDebugRanges)
         .Case("rnglists", eSectionTypeDWARFDebugRngLists)
+        .Case("rnglists.dwo", eSectionTypeDWARFDebugRngListsDwo)
         .Case("str", eSectionTypeDWARFDebugStr)
         .Case("str.dwo", eSectionTypeDWARFDebugStrDwo)
         .Case("str_offsets", eSectionTypeDWARFDebugStrOffsets)
@@ -1790,6 +1679,8 @@
   VMMap Segments = VMMap(Alloc);
   VMMap Sections = VMMap(Alloc);
   lldb_private::Log *Log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_MODULES);
+  size_t SegmentCount = 0;
+  std::string SegmentName;
 
   VMRange GetVMRange(const ELFSectionHeader &H) {
     addr_t Address = H.sh_addr;
@@ -1804,18 +1695,23 @@
   }
 
 public:
-  VMAddressProvider(ObjectFile::Type Type) : ObjectType(Type) {}
+  VMAddressProvider(ObjectFile::Type Type, llvm::StringRef SegmentName)
+      : ObjectType(Type), SegmentName(SegmentName) {}
+
+  std::string GetNextSegmentName() const {
+    return llvm::formatv("{0}[{1}]", SegmentName, SegmentCount).str();
+  }
 
   llvm::Optional<VMRange> GetAddressInfo(const ELFProgramHeader &H) {
     if (H.p_memsz == 0) {
-      LLDB_LOG(Log,
-               "Ignoring zero-sized PT_LOAD segment. Corrupt object file?");
+      LLDB_LOG(Log, "Ignoring zero-sized {0} segment. Corrupt object file?",
+               SegmentName);
       return llvm::None;
     }
 
     if (Segments.overlaps(H.p_vaddr, H.p_vaddr + H.p_memsz)) {
-      LLDB_LOG(Log,
-               "Ignoring overlapping PT_LOAD segment. Corrupt object file?");
+      LLDB_LOG(Log, "Ignoring overlapping {0} segment. Corrupt object file?",
+               SegmentName);
       return llvm::None;
     }
     return VMRange(H.p_vaddr, H.p_memsz);
@@ -1850,6 +1746,7 @@
 
   void AddSegment(const VMRange &Range, SectionSP Seg) {
     Segments.insert(Range.GetRangeBase(), Range.GetRangeEnd(), std::move(Seg));
+    ++SegmentCount;
   }
 
   void AddSection(SectionAddressInfo Info, SectionSP Sect) {
@@ -1867,29 +1764,32 @@
   if (m_sections_up)
     return;
 
-  m_sections_up = llvm::make_unique<SectionList>();
-  VMAddressProvider address_provider(GetType());
+  m_sections_up = std::make_unique<SectionList>();
+  VMAddressProvider regular_provider(GetType(), "PT_LOAD");
+  VMAddressProvider tls_provider(GetType(), "PT_TLS");
 
-  size_t LoadID = 0;
   for (const auto &EnumPHdr : llvm::enumerate(ProgramHeaders())) {
     const ELFProgramHeader &PHdr = EnumPHdr.value();
-    if (PHdr.p_type != PT_LOAD)
+    if (PHdr.p_type != PT_LOAD && PHdr.p_type != PT_TLS)
       continue;
 
-    auto InfoOr = address_provider.GetAddressInfo(PHdr);
+    VMAddressProvider &provider =
+        PHdr.p_type == PT_TLS ? tls_provider : regular_provider;
+    auto InfoOr = provider.GetAddressInfo(PHdr);
     if (!InfoOr)
       continue;
 
-    ConstString Name(("PT_LOAD[" + llvm::Twine(LoadID++) + "]").str());
     uint32_t Log2Align = llvm::Log2_64(std::max<elf_xword>(PHdr.p_align, 1));
     SectionSP Segment = std::make_shared<Section>(
-        GetModule(), this, SegmentID(EnumPHdr.index()), Name,
-        eSectionTypeContainer, InfoOr->GetRangeBase(), InfoOr->GetByteSize(),
-        PHdr.p_offset, PHdr.p_filesz, Log2Align, /*flags*/ 0);
+        GetModule(), this, SegmentID(EnumPHdr.index()),
+        ConstString(provider.GetNextSegmentName()), eSectionTypeContainer,
+        InfoOr->GetRangeBase(), InfoOr->GetByteSize(), PHdr.p_offset,
+        PHdr.p_filesz, Log2Align, /*flags*/ 0);
     Segment->SetPermissions(GetPermissions(PHdr));
+    Segment->SetIsThreadSpecific(PHdr.p_type == PT_TLS);
     m_sections_up->AddSection(Segment);
 
-    address_provider.AddSegment(*InfoOr, std::move(Segment));
+    provider.AddSegment(*InfoOr, std::move(Segment));
   }
 
   ParseSectionHeaders();
@@ -1904,7 +1804,9 @@
     const uint64_t file_size =
         header.sh_type == SHT_NOBITS ? 0 : header.sh_size;
 
-    auto InfoOr = address_provider.GetAddressInfo(header);
+    VMAddressProvider &provider =
+        header.sh_flags & SHF_TLS ? tls_provider : regular_provider;
+    auto InfoOr = provider.GetAddressInfo(header);
     if (!InfoOr)
       continue;
 
@@ -1935,13 +1837,77 @@
     section_sp->SetIsThreadSpecific(header.sh_flags & SHF_TLS);
     (InfoOr->Segment ? InfoOr->Segment->GetChildren() : *m_sections_up)
         .AddSection(section_sp);
-    address_provider.AddSection(std::move(*InfoOr), std::move(section_sp));
+    provider.AddSection(std::move(*InfoOr), std::move(section_sp));
   }
 
   // For eTypeDebugInfo files, the Symbol Vendor will take care of updating the
   // unified section list.
   if (GetType() != eTypeDebugInfo)
     unified_section_list = *m_sections_up;
+  
+  // If there's a .gnu_debugdata section, we'll try to read the .symtab that's
+  // embedded in there and replace the one in the original object file (if any).
+  // If there's none in the orignal object file, we add it to it.
+  if (auto gdd_obj_file = GetGnuDebugDataObjectFile()) {
+    if (auto gdd_objfile_section_list = gdd_obj_file->GetSectionList()) {
+      if (SectionSP symtab_section_sp =
+              gdd_objfile_section_list->FindSectionByType(
+                  eSectionTypeELFSymbolTable, true)) {
+        SectionSP module_section_sp = unified_section_list.FindSectionByType(
+            eSectionTypeELFSymbolTable, true);
+        if (module_section_sp)
+          unified_section_list.ReplaceSection(module_section_sp->GetID(),
+                                              symtab_section_sp);
+        else
+          unified_section_list.AddSection(symtab_section_sp);
+      }
+    }
+  }  
+}
+
+std::shared_ptr<ObjectFileELF> ObjectFileELF::GetGnuDebugDataObjectFile() {
+  if (m_gnu_debug_data_object_file != nullptr)
+    return m_gnu_debug_data_object_file;
+
+  SectionSP section =
+      GetSectionList()->FindSectionByName(ConstString(".gnu_debugdata"));
+  if (!section)
+    return nullptr;
+
+  if (!lldb_private::lzma::isAvailable()) {
+    GetModule()->ReportWarning(
+        "No LZMA support found for reading .gnu_debugdata section");
+    return nullptr;
+  }
+
+  // Uncompress the data
+  DataExtractor data;
+  section->GetSectionData(data);
+  llvm::SmallVector<uint8_t, 0> uncompressedData;
+  auto err = lldb_private::lzma::uncompress(data.GetData(), uncompressedData);
+  if (err) {
+    GetModule()->ReportWarning(
+        "An error occurred while decompression the section %s: %s",
+        section->GetName().AsCString(), llvm::toString(std::move(err)).c_str());
+    return nullptr;
+  }
+
+  // Construct ObjectFileELF object from decompressed buffer
+  DataBufferSP gdd_data_buf(
+      new DataBufferHeap(uncompressedData.data(), uncompressedData.size()));
+  auto fspec = GetFileSpec().CopyByAppendingPathComponent(
+      llvm::StringRef("gnu_debugdata"));
+  m_gnu_debug_data_object_file.reset(new ObjectFileELF(
+      GetModule(), gdd_data_buf, 0, &fspec, 0, gdd_data_buf->GetByteSize()));
+
+  // This line is essential; otherwise a breakpoint can be set but not hit.
+  m_gnu_debug_data_object_file->SetType(ObjectFile::eTypeDebugInfo);
+
+  ArchSpec spec = m_gnu_debug_data_object_file->GetArchitecture();
+  if (spec && m_gnu_debug_data_object_file->SetModulesArchitecture(spec))
+    return m_gnu_debug_data_object_file;
+  
+  return nullptr;
 }
 
 // Find the arm/aarch64 mapping symbol character in the given symbol name.
@@ -2246,8 +2212,6 @@
 
     bool is_global = symbol.getBinding() == STB_GLOBAL;
     uint32_t flags = symbol.st_other << 8 | symbol.st_info | additional_flags;
-    bool is_mangled = (symbol_name[0] == '_' && symbol_name[1] == 'Z');
-
     llvm::StringRef symbol_ref(symbol_name);
 
     // Symbol names may contain @VERSION suffixes. Find those and strip them
@@ -2255,7 +2219,7 @@
     size_t version_pos = symbol_ref.find('@');
     bool has_suffix = version_pos != llvm::StringRef::npos;
     llvm::StringRef symbol_bare = symbol_ref.substr(0, version_pos);
-    Mangled mangled(ConstString(symbol_bare), is_mangled);
+    Mangled mangled(symbol_bare);
 
     // Now append the suffix back to mangled and unmangled names. Only do it if
     // the demangling was successful (string is not empty).
@@ -2296,6 +2260,8 @@
         symbol_size_valid,              // Symbol size is valid
         has_suffix,                     // Contains linker annotations?
         flags);                         // Symbol flags.
+    if (symbol.getBinding() == STB_WEAK)
+      dc_symbol.SetIsWeak(true);
     symtab->AddSymbol(dc_symbol);
   }
   return i;
@@ -2486,14 +2452,11 @@
       break;
 
     const char *symbol_name = strtab_data.PeekCStr(symbol.st_name);
-    bool is_mangled =
-        symbol_name ? (symbol_name[0] == '_' && symbol_name[1] == 'Z') : false;
     uint64_t plt_index = plt_offset + i * plt_entsize;
 
     Symbol jump_symbol(
         i + start_id,          // Symbol table index
         symbol_name,           // symbol name.
-        is_mangled,            // is the symbol name mangled?
         eSymbolTypeTrampoline, // Type of this symbol
         false,                 // Is this globally visible?
         false,                 // Is this symbol debug info?
@@ -2654,7 +2617,7 @@
                ((int64_t)value > INT32_MAX && (int64_t)value < INT32_MIN))) {
             Log *log =
                 lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_MODULES);
-            log->Printf("Failed to apply debug info relocations");
+            LLDB_LOGF(log, "Failed to apply debug info relocations");
             break;
           }
           uint32_t truncated_addr = (value & 0xFFFFFFFF);
@@ -2749,19 +2712,29 @@
     // while the reverse is not necessarily true.
     Section *symtab =
         section_list->FindSectionByType(eSectionTypeELFSymbolTable, true).get();
-    if (!symtab) {
-      // The symtab section is non-allocable and can be stripped, so if it
-      // doesn't exist then use the dynsym section which should always be
-      // there.
-      symtab =
-          section_list->FindSectionByType(eSectionTypeELFDynamicSymbols, true)
-              .get();
-    }
     if (symtab) {
       m_symtab_up.reset(new Symtab(symtab->GetObjectFile()));
       symbol_id += ParseSymbolTable(m_symtab_up.get(), symbol_id, symtab);
     }
 
+    // The symtab section is non-allocable and can be stripped, while the
+    // .dynsym section which should always be always be there. To support the
+    // minidebuginfo case we parse .dynsym when there's a .gnu_debuginfo
+    // section, nomatter if .symtab was already parsed or not. This is because
+    // minidebuginfo normally removes the .symtab symbols which have their
+    // matching .dynsym counterparts.
+    if (!symtab ||
+        GetSectionList()->FindSectionByName(ConstString(".gnu_debugdata"))) {
+      Section *dynsym =
+          section_list->FindSectionByType(eSectionTypeELFDynamicSymbols, true)
+              .get();
+      if (dynsym) {
+        if (!m_symtab_up)
+          m_symtab_up.reset(new Symtab(dynsym->GetObjectFile()));
+        symbol_id += ParseSymbolTable(m_symtab_up.get(), symbol_id, dynsym);
+      }
+    }
+
     // DT_JMPREL
     //      If present, this entry's d_ptr member holds the address of
     //      relocation
@@ -2803,6 +2776,50 @@
     if (m_symtab_up == nullptr)
       m_symtab_up.reset(new Symtab(this));
 
+    // In the event that there's no symbol entry for the entry point we'll
+    // artifically create one. We delegate to the symtab object the figuring
+    // out of the proper size, this will usually make it span til the next
+    // symbol it finds in the section. This means that if there are missing
+    // symbols the entry point might span beyond its function definition.
+    // We're fine with this as it doesn't make it worse than not having a
+    // symbol entry at all.
+    if (CalculateType() == eTypeExecutable) {
+      ArchSpec arch = GetArchitecture();
+      auto entry_point_addr = GetEntryPointAddress();
+      bool is_valid_entry_point =
+          entry_point_addr.IsValid() && entry_point_addr.IsSectionOffset();
+      addr_t entry_point_file_addr = entry_point_addr.GetFileAddress();
+      if (is_valid_entry_point && !m_symtab_up->FindSymbolContainingFileAddress(
+                                      entry_point_file_addr)) {
+        uint64_t symbol_id = m_symtab_up->GetNumSymbols();
+        Symbol symbol(symbol_id,
+                      GetNextSyntheticSymbolName().GetCString(), // Symbol name.
+                      eSymbolTypeCode, // Type of this symbol.
+                      true,            // Is this globally visible?
+                      false,           // Is this symbol debug info?
+                      false,           // Is this symbol a trampoline?
+                      true,            // Is this symbol artificial?
+                      entry_point_addr.GetSection(), // Section where this
+                                                     // symbol is defined.
+                      0,     // Offset in section or symbol value.
+                      0,     // Size.
+                      false, // Size is valid.
+                      false, // Contains linker annotations?
+                      0);    // Symbol flags.
+        m_symtab_up->AddSymbol(symbol);
+        // When the entry point is arm thumb we need to explicitly set its
+        // class address to reflect that. This is important because expression
+        // evaluation relies on correctly setting a breakpoint at this
+        // address.
+        if (arch.GetMachine() == llvm::Triple::arm &&
+            (entry_point_file_addr & 1))
+          m_address_class_map[entry_point_file_addr ^ 1] =
+              AddressClass::eCodeAlternateISA;
+        else
+          m_address_class_map[entry_point_file_addr] = AddressClass::eCode;
+      }
+    }
+
     m_symtab_up->CalculateSymbolSizes();
   }
 
@@ -2881,7 +2898,6 @@
         Symbol eh_symbol(
             symbol_id,       // Symbol table index.
             symbol_name,     // Symbol name.
-            false,           // Is the symbol name mangled?
             eSymbolTypeCode, // Type of this symbol.
             true,            // Is this globally visible?
             false,           // Is this symbol debug info?
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/src/llvm-project/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
index b63a5d1..3b27389 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
@@ -56,8 +56,6 @@
 /// the ObjectFile protocol.
 class ObjectFileELF : public lldb_private::ObjectFile {
 public:
-  ~ObjectFileELF() override;
-
   // Static Functions
   static void Initialize();
 
@@ -91,6 +89,13 @@
 
   uint32_t GetPluginVersion() override;
 
+  // LLVM RTTI support
+  static char ID;
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || ObjectFile::isA(ClassID);
+  }
+  static bool classof(const ObjectFile *obj) { return obj->isA(&ID); }
+
   // ObjectFile Protocol.
   bool ParseHeader() override;
 
@@ -117,7 +122,9 @@
 
   lldb_private::UUID GetUUID() override;
 
-  lldb_private::FileSpecList GetDebugSymbolFilePaths() override;
+  /// Return the contents of the .gnu_debuglink section, if the object file
+  /// contains it. 
+  llvm::Optional<lldb_private::FileSpec> GetDebugLink();
 
   uint32_t GetDependentModules(lldb_private::FileSpecList &files) override;
 
@@ -190,7 +197,7 @@
 
   /// ELF .gnu_debuglink file and crc data if available.
   std::string m_gnu_debuglink_file;
-  uint32_t m_gnu_debuglink_crc;
+  uint32_t m_gnu_debuglink_crc = 0;
 
   /// Collection of program headers.
   ProgramHeaderColl m_program_headers;
@@ -201,6 +208,10 @@
   /// Collection of symbols from the dynamic table.
   DynamicSymbolColl m_dynamic_symbols;
 
+  /// Object file parsed from .gnu_debugdata section (\sa
+  /// GetGnuDebugDataObjectFile())
+  std::shared_ptr<ObjectFileELF> m_gnu_debug_data_object_file;
+
   /// List of file specifications corresponding to the modules (shared
   /// libraries) on which this object file depends.
   mutable std::unique_ptr<lldb_private::FileSpecList> m_filespec_up;
@@ -376,6 +387,14 @@
                               lldb_private::UUID &uuid);
 
   bool AnySegmentHasPhysicalAddress();
+  
+  /// Takes the .gnu_debugdata and returns the decompressed object file that is
+  /// stored within that section.
+  ///
+  /// \returns either the decompressed object file stored within the
+  /// .gnu_debugdata section or \c nullptr if an error occured or if there's no
+  /// section with that name.
+  std::shared_ptr<ObjectFileELF> GetGnuDebugDataObjectFile();
 };
 
 #endif // liblldb_ObjectFileELF_h_
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp b/src/llvm-project/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
index eaf973d..c55b96d 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
@@ -39,6 +39,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
+char ObjectFileJIT::ID;
+
 void ObjectFileJIT::Initialize() {
   PluginManager::RegisterPlugin(GetPluginNameStatic(),
                                 GetPluginDescriptionStatic(), CreateInstance,
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h b/src/llvm-project/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
index 99241126..c992683 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
@@ -46,6 +46,13 @@
                                         lldb::offset_t length,
                                         lldb_private::ModuleSpecList &specs);
 
+  // LLVM RTTI support
+  static char ID;
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || ObjectFile::isA(ClassID);
+  }
+  static bool classof(const ObjectFile *obj) { return obj->isA(&ID); }
+
   // Member Functions
   bool ParseHeader() override;
 
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/src/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index ce928cf..3f9b68a 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -108,6 +108,30 @@
   uint32_t nlistCount;
 };
 
+static void PrintRegisterValue(RegisterContext *reg_ctx, const char *name,
+                               const char *alt_name, size_t reg_byte_size,
+                               Stream &data) {
+  const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName(name);
+  if (reg_info == nullptr)
+    reg_info = reg_ctx->GetRegisterInfoByName(alt_name);
+  if (reg_info) {
+    lldb_private::RegisterValue reg_value;
+    if (reg_ctx->ReadRegister(reg_info, reg_value)) {
+      if (reg_info->byte_size >= reg_byte_size)
+        data.Write(reg_value.GetBytes(), reg_byte_size);
+      else {
+        data.Write(reg_value.GetBytes(), reg_info->byte_size);
+        for (size_t i = 0, n = reg_byte_size - reg_info->byte_size; i < n; ++i)
+          data.PutChar(0);
+      }
+      return;
+    }
+  }
+  // Just write zeros if all else fails
+  for (size_t i = 0; i < reg_byte_size; ++i)
+    data.PutChar(0);
+}
+
 class RegisterContextDarwin_x86_64_Mach : public RegisterContextDarwin_x86_64 {
 public:
   RegisterContextDarwin_x86_64_Mach(lldb_private::Thread &thread,
@@ -169,32 +193,6 @@
     }
   }
 
-  static size_t WriteRegister(RegisterContext *reg_ctx, const char *name,
-                              const char *alt_name, size_t reg_byte_size,
-                              Stream &data) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName(name);
-    if (reg_info == nullptr)
-      reg_info = reg_ctx->GetRegisterInfoByName(alt_name);
-    if (reg_info) {
-      lldb_private::RegisterValue reg_value;
-      if (reg_ctx->ReadRegister(reg_info, reg_value)) {
-        if (reg_info->byte_size >= reg_byte_size)
-          data.Write(reg_value.GetBytes(), reg_byte_size);
-        else {
-          data.Write(reg_value.GetBytes(), reg_info->byte_size);
-          for (size_t i = 0, n = reg_byte_size - reg_info->byte_size; i < n;
-               ++i)
-            data.PutChar(0);
-        }
-        return reg_byte_size;
-      }
-    }
-    // Just write zeros if all else fails
-    for (size_t i = 0; i < reg_byte_size; ++i)
-      data.PutChar(0);
-    return reg_byte_size;
-  }
-
   static bool Create_LC_THREAD(Thread *thread, Stream &data) {
     RegisterContextSP reg_ctx_sp(thread->GetRegisterContext());
     if (reg_ctx_sp) {
@@ -202,27 +200,27 @@
 
       data.PutHex32(GPRRegSet); // Flavor
       data.PutHex32(GPRWordCount);
-      WriteRegister(reg_ctx, "rax", nullptr, 8, data);
-      WriteRegister(reg_ctx, "rbx", nullptr, 8, data);
-      WriteRegister(reg_ctx, "rcx", nullptr, 8, data);
-      WriteRegister(reg_ctx, "rdx", nullptr, 8, data);
-      WriteRegister(reg_ctx, "rdi", nullptr, 8, data);
-      WriteRegister(reg_ctx, "rsi", nullptr, 8, data);
-      WriteRegister(reg_ctx, "rbp", nullptr, 8, data);
-      WriteRegister(reg_ctx, "rsp", nullptr, 8, data);
-      WriteRegister(reg_ctx, "r8", nullptr, 8, data);
-      WriteRegister(reg_ctx, "r9", nullptr, 8, data);
-      WriteRegister(reg_ctx, "r10", nullptr, 8, data);
-      WriteRegister(reg_ctx, "r11", nullptr, 8, data);
-      WriteRegister(reg_ctx, "r12", nullptr, 8, data);
-      WriteRegister(reg_ctx, "r13", nullptr, 8, data);
-      WriteRegister(reg_ctx, "r14", nullptr, 8, data);
-      WriteRegister(reg_ctx, "r15", nullptr, 8, data);
-      WriteRegister(reg_ctx, "rip", nullptr, 8, data);
-      WriteRegister(reg_ctx, "rflags", nullptr, 8, data);
-      WriteRegister(reg_ctx, "cs", nullptr, 8, data);
-      WriteRegister(reg_ctx, "fs", nullptr, 8, data);
-      WriteRegister(reg_ctx, "gs", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rax", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rbx", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rcx", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rdx", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rdi", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rsi", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rbp", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rsp", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r8", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r9", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r10", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r11", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r12", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r13", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r14", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r15", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rip", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rflags", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "cs", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "fs", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "gs", nullptr, 8, data);
 
       //            // Write out the FPU registers
       //            const size_t fpu_byte_size = sizeof(FPU);
@@ -311,9 +309,9 @@
       // Write out the EXC registers
       data.PutHex32(EXCRegSet);
       data.PutHex32(EXCWordCount);
-      WriteRegister(reg_ctx, "trapno", nullptr, 4, data);
-      WriteRegister(reg_ctx, "err", nullptr, 4, data);
-      WriteRegister(reg_ctx, "faultvaddr", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "trapno", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "err", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "faultvaddr", nullptr, 8, data);
       return true;
     }
     return false;
@@ -400,32 +398,6 @@
     }
   }
 
-  static size_t WriteRegister(RegisterContext *reg_ctx, const char *name,
-                              const char *alt_name, size_t reg_byte_size,
-                              Stream &data) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName(name);
-    if (reg_info == nullptr)
-      reg_info = reg_ctx->GetRegisterInfoByName(alt_name);
-    if (reg_info) {
-      lldb_private::RegisterValue reg_value;
-      if (reg_ctx->ReadRegister(reg_info, reg_value)) {
-        if (reg_info->byte_size >= reg_byte_size)
-          data.Write(reg_value.GetBytes(), reg_byte_size);
-        else {
-          data.Write(reg_value.GetBytes(), reg_info->byte_size);
-          for (size_t i = 0, n = reg_byte_size - reg_info->byte_size; i < n;
-               ++i)
-            data.PutChar(0);
-        }
-        return reg_byte_size;
-      }
-    }
-    // Just write zeros if all else fails
-    for (size_t i = 0; i < reg_byte_size; ++i)
-      data.PutChar(0);
-    return reg_byte_size;
-  }
-
   static bool Create_LC_THREAD(Thread *thread, Stream &data) {
     RegisterContextSP reg_ctx_sp(thread->GetRegisterContext());
     if (reg_ctx_sp) {
@@ -433,29 +405,29 @@
 
       data.PutHex32(GPRRegSet); // Flavor
       data.PutHex32(GPRWordCount);
-      WriteRegister(reg_ctx, "eax", nullptr, 4, data);
-      WriteRegister(reg_ctx, "ebx", nullptr, 4, data);
-      WriteRegister(reg_ctx, "ecx", nullptr, 4, data);
-      WriteRegister(reg_ctx, "edx", nullptr, 4, data);
-      WriteRegister(reg_ctx, "edi", nullptr, 4, data);
-      WriteRegister(reg_ctx, "esi", nullptr, 4, data);
-      WriteRegister(reg_ctx, "ebp", nullptr, 4, data);
-      WriteRegister(reg_ctx, "esp", nullptr, 4, data);
-      WriteRegister(reg_ctx, "ss", nullptr, 4, data);
-      WriteRegister(reg_ctx, "eflags", nullptr, 4, data);
-      WriteRegister(reg_ctx, "eip", nullptr, 4, data);
-      WriteRegister(reg_ctx, "cs", nullptr, 4, data);
-      WriteRegister(reg_ctx, "ds", nullptr, 4, data);
-      WriteRegister(reg_ctx, "es", nullptr, 4, data);
-      WriteRegister(reg_ctx, "fs", nullptr, 4, data);
-      WriteRegister(reg_ctx, "gs", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "eax", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ebx", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ecx", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "edx", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "edi", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "esi", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ebp", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "esp", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ss", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "eflags", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "eip", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "cs", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ds", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "es", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "fs", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "gs", nullptr, 4, data);
 
       // Write out the EXC registers
       data.PutHex32(EXCRegSet);
       data.PutHex32(EXCWordCount);
-      WriteRegister(reg_ctx, "trapno", nullptr, 4, data);
-      WriteRegister(reg_ctx, "err", nullptr, 4, data);
-      WriteRegister(reg_ctx, "faultvaddr", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "trapno", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "err", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "faultvaddr", nullptr, 4, data);
       return true;
     }
     return false;
@@ -507,12 +479,13 @@
       switch (flavor) {
       case GPRAltRegSet:
       case GPRRegSet:
-        for (uint32_t i = 0; i < count; ++i) {
+        // On ARM, the CPSR register is also included in the count but it is
+        // not included in gpr.r so loop until (count-1).
+        for (uint32_t i = 0; i < (count - 1); ++i) {
           gpr.r[i] = data.GetU32(&offset);
         }
-
-        // Note that gpr.cpsr is also copied by the above loop; this loop
-        // technically extends one element past the end of the gpr.r[] array.
+        // Save cpsr explicitly.
+        gpr.cpsr = data.GetU32(&offset);
 
         SetError(GPRRegSet, Read, 0);
         offset = next_thread_state;
@@ -551,32 +524,6 @@
     }
   }
 
-  static size_t WriteRegister(RegisterContext *reg_ctx, const char *name,
-                              const char *alt_name, size_t reg_byte_size,
-                              Stream &data) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName(name);
-    if (reg_info == nullptr)
-      reg_info = reg_ctx->GetRegisterInfoByName(alt_name);
-    if (reg_info) {
-      lldb_private::RegisterValue reg_value;
-      if (reg_ctx->ReadRegister(reg_info, reg_value)) {
-        if (reg_info->byte_size >= reg_byte_size)
-          data.Write(reg_value.GetBytes(), reg_byte_size);
-        else {
-          data.Write(reg_value.GetBytes(), reg_info->byte_size);
-          for (size_t i = 0, n = reg_byte_size - reg_info->byte_size; i < n;
-               ++i)
-            data.PutChar(0);
-        }
-        return reg_byte_size;
-      }
-    }
-    // Just write zeros if all else fails
-    for (size_t i = 0; i < reg_byte_size; ++i)
-      data.PutChar(0);
-    return reg_byte_size;
-  }
-
   static bool Create_LC_THREAD(Thread *thread, Stream &data) {
     RegisterContextSP reg_ctx_sp(thread->GetRegisterContext());
     if (reg_ctx_sp) {
@@ -584,23 +531,23 @@
 
       data.PutHex32(GPRRegSet); // Flavor
       data.PutHex32(GPRWordCount);
-      WriteRegister(reg_ctx, "r0", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r1", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r2", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r3", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r4", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r5", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r6", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r7", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r8", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r9", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r10", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r11", nullptr, 4, data);
-      WriteRegister(reg_ctx, "r12", nullptr, 4, data);
-      WriteRegister(reg_ctx, "sp", nullptr, 4, data);
-      WriteRegister(reg_ctx, "lr", nullptr, 4, data);
-      WriteRegister(reg_ctx, "pc", nullptr, 4, data);
-      WriteRegister(reg_ctx, "cpsr", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r0", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r1", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r2", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r3", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r4", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r5", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r6", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r7", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r8", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r9", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r10", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r11", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r12", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "sp", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "lr", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "pc", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "cpsr", nullptr, 4, data);
 
       // Write out the EXC registers
       //            data.PutHex32 (EXCRegSet);
@@ -706,32 +653,6 @@
     }
   }
 
-  static size_t WriteRegister(RegisterContext *reg_ctx, const char *name,
-                              const char *alt_name, size_t reg_byte_size,
-                              Stream &data) {
-    const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName(name);
-    if (reg_info == nullptr)
-      reg_info = reg_ctx->GetRegisterInfoByName(alt_name);
-    if (reg_info) {
-      lldb_private::RegisterValue reg_value;
-      if (reg_ctx->ReadRegister(reg_info, reg_value)) {
-        if (reg_info->byte_size >= reg_byte_size)
-          data.Write(reg_value.GetBytes(), reg_byte_size);
-        else {
-          data.Write(reg_value.GetBytes(), reg_info->byte_size);
-          for (size_t i = 0, n = reg_byte_size - reg_info->byte_size; i < n;
-               ++i)
-            data.PutChar(0);
-        }
-        return reg_byte_size;
-      }
-    }
-    // Just write zeros if all else fails
-    for (size_t i = 0; i < reg_byte_size; ++i)
-      data.PutChar(0);
-    return reg_byte_size;
-  }
-
   static bool Create_LC_THREAD(Thread *thread, Stream &data) {
     RegisterContextSP reg_ctx_sp(thread->GetRegisterContext());
     if (reg_ctx_sp) {
@@ -739,40 +660,40 @@
 
       data.PutHex32(GPRRegSet); // Flavor
       data.PutHex32(GPRWordCount);
-      WriteRegister(reg_ctx, "x0", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x1", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x2", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x3", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x4", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x5", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x6", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x7", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x8", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x9", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x10", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x11", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x12", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x13", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x14", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x15", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x16", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x17", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x18", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x19", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x20", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x21", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x22", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x23", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x24", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x25", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x26", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x27", nullptr, 8, data);
-      WriteRegister(reg_ctx, "x28", nullptr, 8, data);
-      WriteRegister(reg_ctx, "fp", nullptr, 8, data);
-      WriteRegister(reg_ctx, "lr", nullptr, 8, data);
-      WriteRegister(reg_ctx, "sp", nullptr, 8, data);
-      WriteRegister(reg_ctx, "pc", nullptr, 8, data);
-      WriteRegister(reg_ctx, "cpsr", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "x0", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x1", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x2", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x3", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x4", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x5", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x6", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x7", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x8", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x9", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x10", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x11", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x12", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x13", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x14", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x15", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x16", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x17", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x18", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x19", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x20", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x21", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x22", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x23", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x24", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x25", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x26", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x27", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x28", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "fp", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "lr", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "sp", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "pc", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "cpsr", nullptr, 4, data);
 
       // Write out the EXC registers
       //            data.PutHex32 (EXCRegSet);
@@ -830,6 +751,8 @@
 
 #define MACHO_NLIST_ARM_SYMBOL_IS_THUMB 0x0008
 
+char ObjectFileMachO::ID;
+
 void ObjectFileMachO::Initialize() {
   PluginManager::RegisterPlugin(
       GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance,
@@ -872,7 +795,7 @@
       return nullptr;
     data_offset = 0;
   }
-  auto objfile_up = llvm::make_unique<ObjectFileMachO>(
+  auto objfile_up = std::make_unique<ObjectFileMachO>(
       module_sp, data_sp, data_offset, file, file_offset, length);
   if (!objfile_up || !objfile_up->ParseHeader())
     return nullptr;
@@ -911,16 +834,11 @@
         data_offset = MachHeaderSizeFromMagic(header.magic);
       }
       if (data_sp) {
-        ModuleSpec spec;
-        spec.GetFileSpec() = file;
-        spec.SetObjectOffset(file_offset);
-        spec.SetObjectSize(length);
-
-        spec.GetArchitecture() = GetArchitecture(header, data, data_offset);
-        if (spec.GetArchitecture().IsValid()) {
-          spec.GetUUID() = GetUUID(header, data, data_offset);
-          specs.Append(spec);
-        }
+        ModuleSpec base_spec;
+        base_spec.GetFileSpec() = file;
+        base_spec.SetObjectOffset(file_offset);
+        base_spec.SetObjectSize(length);
+        GetAllArchSpecs(header, data, data_offset, base_spec, specs);
       }
     }
   }
@@ -1059,79 +977,89 @@
 
 bool ObjectFileMachO::ParseHeader() {
   ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    bool can_parse = false;
-    lldb::offset_t offset = 0;
+  if (!module_sp)
+    return false;
+
+  std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
+  bool can_parse = false;
+  lldb::offset_t offset = 0;
+  m_data.SetByteOrder(endian::InlHostByteOrder());
+  // Leave magic in the original byte order
+  m_header.magic = m_data.GetU32(&offset);
+  switch (m_header.magic) {
+  case MH_MAGIC:
     m_data.SetByteOrder(endian::InlHostByteOrder());
-    // Leave magic in the original byte order
-    m_header.magic = m_data.GetU32(&offset);
-    switch (m_header.magic) {
-    case MH_MAGIC:
-      m_data.SetByteOrder(endian::InlHostByteOrder());
-      m_data.SetAddressByteSize(4);
-      can_parse = true;
-      break;
+    m_data.SetAddressByteSize(4);
+    can_parse = true;
+    break;
 
-    case MH_MAGIC_64:
-      m_data.SetByteOrder(endian::InlHostByteOrder());
-      m_data.SetAddressByteSize(8);
-      can_parse = true;
-      break;
+  case MH_MAGIC_64:
+    m_data.SetByteOrder(endian::InlHostByteOrder());
+    m_data.SetAddressByteSize(8);
+    can_parse = true;
+    break;
 
-    case MH_CIGAM:
-      m_data.SetByteOrder(endian::InlHostByteOrder() == eByteOrderBig
-                              ? eByteOrderLittle
-                              : eByteOrderBig);
-      m_data.SetAddressByteSize(4);
-      can_parse = true;
-      break;
+  case MH_CIGAM:
+    m_data.SetByteOrder(endian::InlHostByteOrder() == eByteOrderBig
+                            ? eByteOrderLittle
+                            : eByteOrderBig);
+    m_data.SetAddressByteSize(4);
+    can_parse = true;
+    break;
 
-    case MH_CIGAM_64:
-      m_data.SetByteOrder(endian::InlHostByteOrder() == eByteOrderBig
-                              ? eByteOrderLittle
-                              : eByteOrderBig);
-      m_data.SetAddressByteSize(8);
-      can_parse = true;
-      break;
+  case MH_CIGAM_64:
+    m_data.SetByteOrder(endian::InlHostByteOrder() == eByteOrderBig
+                            ? eByteOrderLittle
+                            : eByteOrderBig);
+    m_data.SetAddressByteSize(8);
+    can_parse = true;
+    break;
 
-    default:
-      break;
-    }
+  default:
+    break;
+  }
 
-    if (can_parse) {
-      m_data.GetU32(&offset, &m_header.cputype, 6);
+  if (can_parse) {
+    m_data.GetU32(&offset, &m_header.cputype, 6);
 
-      if (ArchSpec mach_arch = GetArchitecture()) {
-        // Check if the module has a required architecture
-        const ArchSpec &module_arch = module_sp->GetArchitecture();
-        if (module_arch.IsValid() && !module_arch.IsCompatibleMatch(mach_arch))
-          return false;
+    ModuleSpecList all_specs;
+    ModuleSpec base_spec;
+    GetAllArchSpecs(m_header, m_data, MachHeaderSizeFromMagic(m_header.magic),
+                    base_spec, all_specs);
 
-        if (SetModulesArchitecture(mach_arch)) {
-          const size_t header_and_lc_size =
-              m_header.sizeofcmds + MachHeaderSizeFromMagic(m_header.magic);
-          if (m_data.GetByteSize() < header_and_lc_size) {
-            DataBufferSP data_sp;
-            ProcessSP process_sp(m_process_wp.lock());
-            if (process_sp) {
-              data_sp =
-                  ReadMemory(process_sp, m_memory_addr, header_and_lc_size);
-            } else {
-              // Read in all only the load command data from the file on disk
-              data_sp = MapFileData(m_file, header_and_lc_size, m_file_offset);
-              if (data_sp->GetByteSize() != header_and_lc_size)
-                return false;
-            }
-            if (data_sp)
-              m_data.SetData(data_sp);
+    for (unsigned i = 0, e = all_specs.GetSize(); i != e; ++i) {
+      ArchSpec mach_arch =
+          all_specs.GetModuleSpecRefAtIndex(i).GetArchitecture();
+
+      // Check if the module has a required architecture
+      const ArchSpec &module_arch = module_sp->GetArchitecture();
+      if (module_arch.IsValid() && !module_arch.IsCompatibleMatch(mach_arch))
+        continue;
+
+      if (SetModulesArchitecture(mach_arch)) {
+        const size_t header_and_lc_size =
+            m_header.sizeofcmds + MachHeaderSizeFromMagic(m_header.magic);
+        if (m_data.GetByteSize() < header_and_lc_size) {
+          DataBufferSP data_sp;
+          ProcessSP process_sp(m_process_wp.lock());
+          if (process_sp) {
+            data_sp = ReadMemory(process_sp, m_memory_addr, header_and_lc_size);
+          } else {
+            // Read in all only the load command data from the file on disk
+            data_sp = MapFileData(m_file, header_and_lc_size, m_file_offset);
+            if (data_sp->GetByteSize() != header_and_lc_size)
+              continue;
           }
+          if (data_sp)
+            m_data.SetData(data_sp);
         }
-        return true;
       }
-    } else {
-      memset(&m_header, 0, sizeof(struct mach_header));
+      return true;
     }
+    // None found.
+    return false;
+  } else {
+    memset(&m_header, 0, sizeof(struct mach_header));
   }
   return false;
 }
@@ -1144,166 +1072,174 @@
   return m_header.filetype == MH_EXECUTE;
 }
 
+bool ObjectFileMachO::IsDynamicLoader() const {
+  return m_header.filetype == MH_DYLINKER;
+}
+
 uint32_t ObjectFileMachO::GetAddressByteSize() const {
   return m_data.GetAddressByteSize();
 }
 
 AddressClass ObjectFileMachO::GetAddressClass(lldb::addr_t file_addr) {
   Symtab *symtab = GetSymtab();
-  if (symtab) {
-    Symbol *symbol = symtab->FindSymbolContainingFileAddress(file_addr);
-    if (symbol) {
-      if (symbol->ValueIsAddress()) {
-        SectionSP section_sp(symbol->GetAddressRef().GetSection());
-        if (section_sp) {
-          const lldb::SectionType section_type = section_sp->GetType();
-          switch (section_type) {
-          case eSectionTypeInvalid:
-            return AddressClass::eUnknown;
+  if (!symtab)
+    return AddressClass::eUnknown;
 
-          case eSectionTypeCode:
-            if (m_header.cputype == llvm::MachO::CPU_TYPE_ARM) {
-              // For ARM we have a bit in the n_desc field of the symbol that
-              // tells us ARM/Thumb which is bit 0x0008.
-              if (symbol->GetFlags() & MACHO_NLIST_ARM_SYMBOL_IS_THUMB)
-                return AddressClass::eCodeAlternateISA;
-            }
-            return AddressClass::eCode;
+  Symbol *symbol = symtab->FindSymbolContainingFileAddress(file_addr);
+  if (symbol) {
+    if (symbol->ValueIsAddress()) {
+      SectionSP section_sp(symbol->GetAddressRef().GetSection());
+      if (section_sp) {
+        const lldb::SectionType section_type = section_sp->GetType();
+        switch (section_type) {
+        case eSectionTypeInvalid:
+          return AddressClass::eUnknown;
 
-          case eSectionTypeContainer:
-            return AddressClass::eUnknown;
-
-          case eSectionTypeData:
-          case eSectionTypeDataCString:
-          case eSectionTypeDataCStringPointers:
-          case eSectionTypeDataSymbolAddress:
-          case eSectionTypeData4:
-          case eSectionTypeData8:
-          case eSectionTypeData16:
-          case eSectionTypeDataPointers:
-          case eSectionTypeZeroFill:
-          case eSectionTypeDataObjCMessageRefs:
-          case eSectionTypeDataObjCCFStrings:
-          case eSectionTypeGoSymtab:
-            return AddressClass::eData;
-
-          case eSectionTypeDebug:
-          case eSectionTypeDWARFDebugAbbrev:
-          case eSectionTypeDWARFDebugAbbrevDwo:
-          case eSectionTypeDWARFDebugAddr:
-          case eSectionTypeDWARFDebugAranges:
-          case eSectionTypeDWARFDebugCuIndex:
-          case eSectionTypeDWARFDebugFrame:
-          case eSectionTypeDWARFDebugInfo:
-          case eSectionTypeDWARFDebugInfoDwo:
-          case eSectionTypeDWARFDebugLine:
-          case eSectionTypeDWARFDebugLineStr:
-          case eSectionTypeDWARFDebugLoc:
-          case eSectionTypeDWARFDebugLocLists:
-          case eSectionTypeDWARFDebugMacInfo:
-          case eSectionTypeDWARFDebugMacro:
-          case eSectionTypeDWARFDebugNames:
-          case eSectionTypeDWARFDebugPubNames:
-          case eSectionTypeDWARFDebugPubTypes:
-          case eSectionTypeDWARFDebugRanges:
-          case eSectionTypeDWARFDebugRngLists:
-          case eSectionTypeDWARFDebugStr:
-          case eSectionTypeDWARFDebugStrDwo:
-          case eSectionTypeDWARFDebugStrOffsets:
-          case eSectionTypeDWARFDebugStrOffsetsDwo:
-          case eSectionTypeDWARFDebugTypes:
-          case eSectionTypeDWARFDebugTypesDwo:
-          case eSectionTypeDWARFAppleNames:
-          case eSectionTypeDWARFAppleTypes:
-          case eSectionTypeDWARFAppleNamespaces:
-          case eSectionTypeDWARFAppleObjC:
-          case eSectionTypeDWARFGNUDebugAltLink:
-            return AddressClass::eDebug;
-
-          case eSectionTypeEHFrame:
-          case eSectionTypeARMexidx:
-          case eSectionTypeARMextab:
-          case eSectionTypeCompactUnwind:
-            return AddressClass::eRuntime;
-
-          case eSectionTypeAbsoluteAddress:
-          case eSectionTypeELFSymbolTable:
-          case eSectionTypeELFDynamicSymbols:
-          case eSectionTypeELFRelocationEntries:
-          case eSectionTypeELFDynamicLinkInfo:
-          case eSectionTypeOther:
-            return AddressClass::eUnknown;
+        case eSectionTypeCode:
+          if (m_header.cputype == llvm::MachO::CPU_TYPE_ARM) {
+            // For ARM we have a bit in the n_desc field of the symbol that
+            // tells us ARM/Thumb which is bit 0x0008.
+            if (symbol->GetFlags() & MACHO_NLIST_ARM_SYMBOL_IS_THUMB)
+              return AddressClass::eCodeAlternateISA;
           }
+          return AddressClass::eCode;
+
+        case eSectionTypeContainer:
+          return AddressClass::eUnknown;
+
+        case eSectionTypeData:
+        case eSectionTypeDataCString:
+        case eSectionTypeDataCStringPointers:
+        case eSectionTypeDataSymbolAddress:
+        case eSectionTypeData4:
+        case eSectionTypeData8:
+        case eSectionTypeData16:
+        case eSectionTypeDataPointers:
+        case eSectionTypeZeroFill:
+        case eSectionTypeDataObjCMessageRefs:
+        case eSectionTypeDataObjCCFStrings:
+        case eSectionTypeGoSymtab:
+          return AddressClass::eData;
+
+        case eSectionTypeDebug:
+        case eSectionTypeDWARFDebugAbbrev:
+        case eSectionTypeDWARFDebugAbbrevDwo:
+        case eSectionTypeDWARFDebugAddr:
+        case eSectionTypeDWARFDebugAranges:
+        case eSectionTypeDWARFDebugCuIndex:
+        case eSectionTypeDWARFDebugFrame:
+        case eSectionTypeDWARFDebugInfo:
+        case eSectionTypeDWARFDebugInfoDwo:
+        case eSectionTypeDWARFDebugLine:
+        case eSectionTypeDWARFDebugLineStr:
+        case eSectionTypeDWARFDebugLoc:
+        case eSectionTypeDWARFDebugLocDwo:
+        case eSectionTypeDWARFDebugLocLists:
+        case eSectionTypeDWARFDebugLocListsDwo:
+        case eSectionTypeDWARFDebugMacInfo:
+        case eSectionTypeDWARFDebugMacro:
+        case eSectionTypeDWARFDebugNames:
+        case eSectionTypeDWARFDebugPubNames:
+        case eSectionTypeDWARFDebugPubTypes:
+        case eSectionTypeDWARFDebugRanges:
+        case eSectionTypeDWARFDebugRngLists:
+        case eSectionTypeDWARFDebugRngListsDwo:
+        case eSectionTypeDWARFDebugStr:
+        case eSectionTypeDWARFDebugStrDwo:
+        case eSectionTypeDWARFDebugStrOffsets:
+        case eSectionTypeDWARFDebugStrOffsetsDwo:
+        case eSectionTypeDWARFDebugTypes:
+        case eSectionTypeDWARFDebugTypesDwo:
+        case eSectionTypeDWARFAppleNames:
+        case eSectionTypeDWARFAppleTypes:
+        case eSectionTypeDWARFAppleNamespaces:
+        case eSectionTypeDWARFAppleObjC:
+        case eSectionTypeDWARFGNUDebugAltLink:
+          return AddressClass::eDebug;
+
+        case eSectionTypeEHFrame:
+        case eSectionTypeARMexidx:
+        case eSectionTypeARMextab:
+        case eSectionTypeCompactUnwind:
+          return AddressClass::eRuntime;
+
+        case eSectionTypeAbsoluteAddress:
+        case eSectionTypeELFSymbolTable:
+        case eSectionTypeELFDynamicSymbols:
+        case eSectionTypeELFRelocationEntries:
+        case eSectionTypeELFDynamicLinkInfo:
+        case eSectionTypeOther:
+          return AddressClass::eUnknown;
         }
       }
+    }
 
-      const SymbolType symbol_type = symbol->GetType();
-      switch (symbol_type) {
-      case eSymbolTypeAny:
-        return AddressClass::eUnknown;
-      case eSymbolTypeAbsolute:
-        return AddressClass::eUnknown;
+    const SymbolType symbol_type = symbol->GetType();
+    switch (symbol_type) {
+    case eSymbolTypeAny:
+      return AddressClass::eUnknown;
+    case eSymbolTypeAbsolute:
+      return AddressClass::eUnknown;
 
-      case eSymbolTypeCode:
-      case eSymbolTypeTrampoline:
-      case eSymbolTypeResolver:
-        if (m_header.cputype == llvm::MachO::CPU_TYPE_ARM) {
-          // For ARM we have a bit in the n_desc field of the symbol that tells
-          // us ARM/Thumb which is bit 0x0008.
-          if (symbol->GetFlags() & MACHO_NLIST_ARM_SYMBOL_IS_THUMB)
-            return AddressClass::eCodeAlternateISA;
-        }
-        return AddressClass::eCode;
-
-      case eSymbolTypeData:
-        return AddressClass::eData;
-      case eSymbolTypeRuntime:
-        return AddressClass::eRuntime;
-      case eSymbolTypeException:
-        return AddressClass::eRuntime;
-      case eSymbolTypeSourceFile:
-        return AddressClass::eDebug;
-      case eSymbolTypeHeaderFile:
-        return AddressClass::eDebug;
-      case eSymbolTypeObjectFile:
-        return AddressClass::eDebug;
-      case eSymbolTypeCommonBlock:
-        return AddressClass::eDebug;
-      case eSymbolTypeBlock:
-        return AddressClass::eDebug;
-      case eSymbolTypeLocal:
-        return AddressClass::eData;
-      case eSymbolTypeParam:
-        return AddressClass::eData;
-      case eSymbolTypeVariable:
-        return AddressClass::eData;
-      case eSymbolTypeVariableType:
-        return AddressClass::eDebug;
-      case eSymbolTypeLineEntry:
-        return AddressClass::eDebug;
-      case eSymbolTypeLineHeader:
-        return AddressClass::eDebug;
-      case eSymbolTypeScopeBegin:
-        return AddressClass::eDebug;
-      case eSymbolTypeScopeEnd:
-        return AddressClass::eDebug;
-      case eSymbolTypeAdditional:
-        return AddressClass::eUnknown;
-      case eSymbolTypeCompiler:
-        return AddressClass::eDebug;
-      case eSymbolTypeInstrumentation:
-        return AddressClass::eDebug;
-      case eSymbolTypeUndefined:
-        return AddressClass::eUnknown;
-      case eSymbolTypeObjCClass:
-        return AddressClass::eRuntime;
-      case eSymbolTypeObjCMetaClass:
-        return AddressClass::eRuntime;
-      case eSymbolTypeObjCIVar:
-        return AddressClass::eRuntime;
-      case eSymbolTypeReExported:
-        return AddressClass::eRuntime;
+    case eSymbolTypeCode:
+    case eSymbolTypeTrampoline:
+    case eSymbolTypeResolver:
+      if (m_header.cputype == llvm::MachO::CPU_TYPE_ARM) {
+        // For ARM we have a bit in the n_desc field of the symbol that tells
+        // us ARM/Thumb which is bit 0x0008.
+        if (symbol->GetFlags() & MACHO_NLIST_ARM_SYMBOL_IS_THUMB)
+          return AddressClass::eCodeAlternateISA;
       }
+      return AddressClass::eCode;
+
+    case eSymbolTypeData:
+      return AddressClass::eData;
+    case eSymbolTypeRuntime:
+      return AddressClass::eRuntime;
+    case eSymbolTypeException:
+      return AddressClass::eRuntime;
+    case eSymbolTypeSourceFile:
+      return AddressClass::eDebug;
+    case eSymbolTypeHeaderFile:
+      return AddressClass::eDebug;
+    case eSymbolTypeObjectFile:
+      return AddressClass::eDebug;
+    case eSymbolTypeCommonBlock:
+      return AddressClass::eDebug;
+    case eSymbolTypeBlock:
+      return AddressClass::eDebug;
+    case eSymbolTypeLocal:
+      return AddressClass::eData;
+    case eSymbolTypeParam:
+      return AddressClass::eData;
+    case eSymbolTypeVariable:
+      return AddressClass::eData;
+    case eSymbolTypeVariableType:
+      return AddressClass::eDebug;
+    case eSymbolTypeLineEntry:
+      return AddressClass::eDebug;
+    case eSymbolTypeLineHeader:
+      return AddressClass::eDebug;
+    case eSymbolTypeScopeBegin:
+      return AddressClass::eDebug;
+    case eSymbolTypeScopeEnd:
+      return AddressClass::eDebug;
+    case eSymbolTypeAdditional:
+      return AddressClass::eUnknown;
+    case eSymbolTypeCompiler:
+      return AddressClass::eDebug;
+    case eSymbolTypeInstrumentation:
+      return AddressClass::eDebug;
+    case eSymbolTypeUndefined:
+      return AddressClass::eUnknown;
+    case eSymbolTypeObjCClass:
+      return AddressClass::eRuntime;
+    case eSymbolTypeObjCMetaClass:
+      return AddressClass::eRuntime;
+    case eSymbolTypeObjCIVar:
+      return AddressClass::eRuntime;
+    case eSymbolTypeReExported:
+      return AddressClass::eRuntime;
     }
   }
   return AddressClass::eUnknown;
@@ -1502,7 +1438,7 @@
   if (section_name == g_sect_name_dwarf_debug_pubtypes)
     return eSectionTypeDWARFDebugPubTypes;
   if (section_name == g_sect_name_dwarf_debug_ranges)
-    return eSectionTypeDWARFDebugRanges; 
+    return eSectionTypeDWARFDebugRanges;
   if (section_name == g_sect_name_dwarf_debug_str)
     return eSectionTypeDWARFDebugStr;
   if (section_name == g_sect_name_dwarf_debug_types)
@@ -1665,7 +1601,7 @@
         // the file
         load_cmd.filesize, // Size in bytes of this section as found
         // in the file
-        0,                // Segments have no alignment information
+        0,               // Segments have no alignment information
         load_cmd.flags); // Flags for this section
 
     segment_sp->SetIsEncrypted(segment_is_encrypted);
@@ -1931,9 +1867,15 @@
           m_section_infos[n_sect].vm_range.SetByteSize(
               section_sp->GetByteSize());
         } else {
+          const char *filename = "<unknown>";
+          SectionSP first_section_sp(m_section_list->GetSectionAtIndex(0));
+          if (first_section_sp)
+            filename = first_section_sp->GetObjectFile()->GetFileSpec().GetPath().c_str();
+
           Host::SystemLog(Host::eSystemLogError,
-                          "error: unable to find section for section %u\n",
-                          n_sect);
+                          "error: unable to find section %d for a symbol in %s, corrupt file?\n",
+                          n_sect, 
+                          filename);
         }
       }
       if (m_section_infos[n_sect].vm_range.Contains(file_addr)) {
@@ -1963,18 +1905,6 @@
 };
 
 struct TrieEntry {
-  TrieEntry()
-      : name(), address(LLDB_INVALID_ADDRESS), flags(0), other(0),
-        import_name() {}
-
-  void Clear() {
-    name.Clear();
-    address = LLDB_INVALID_ADDRESS;
-    flags = 0;
-    other = 0;
-    import_name.Clear();
-  }
-
   void Dump() const {
     printf("0x%16.16llx 0x%16.16llx 0x%16.16llx \"%s\"",
            static_cast<unsigned long long>(address),
@@ -1986,9 +1916,9 @@
       printf("\n");
   }
   ConstString name;
-  uint64_t address;
-  uint64_t flags;
-  uint64_t other;
+  uint64_t address = LLDB_INVALID_ADDRESS;
+  uint64_t flags = 0;
+  uint64_t other = 0;
   ConstString import_name;
 };
 
@@ -2099,12 +2029,29 @@
   }
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS));
   if (log && dsc_uuid.IsValid()) {
-    log->Printf("Shared cache %s has UUID %s", dyld_shared_cache.GetPath().c_str(), 
-                dsc_uuid.GetAsString().c_str());
+    LLDB_LOGF(log, "Shared cache %s has UUID %s",
+              dyld_shared_cache.GetPath().c_str(),
+              dsc_uuid.GetAsString().c_str());
   }
   return dsc_uuid;
 }
 
+static llvm::Optional<struct nlist_64>
+ParseNList(DataExtractor &nlist_data, lldb::offset_t &nlist_data_offset,
+           size_t nlist_byte_size) {
+  struct nlist_64 nlist;
+  if (!nlist_data.ValidOffsetForDataOfSize(nlist_data_offset, nlist_byte_size))
+    return {};
+  nlist.n_strx = nlist_data.GetU32_unchecked(&nlist_data_offset);
+  nlist.n_type = nlist_data.GetU8_unchecked(&nlist_data_offset);
+  nlist.n_sect = nlist_data.GetU8_unchecked(&nlist_data_offset);
+  nlist.n_desc = nlist_data.GetU16_unchecked(&nlist_data_offset);
+  nlist.n_value = nlist_data.GetAddress_unchecked(&nlist_data_offset);
+  return nlist;
+}
+
+enum { DebugSymbols = true, NonDebugSymbols = false };
+
 size_t ObjectFileMachO::ParseSymtab() {
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat, "ObjectFileMachO::ParseSymtab () module = %s",
@@ -2122,9 +2069,9 @@
   uint32_t i;
   FileSpecList dylib_files;
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS));
-  static const llvm::StringRef g_objc_v2_prefix_class("_OBJC_CLASS_$_");
-  static const llvm::StringRef g_objc_v2_prefix_metaclass("_OBJC_METACLASS_$_");
-  static const llvm::StringRef g_objc_v2_prefix_ivar("_OBJC_IVAR_$_");
+  llvm::StringRef g_objc_v2_prefix_class("_OBJC_CLASS_$_");
+  llvm::StringRef g_objc_v2_prefix_metaclass("_OBJC_METACLASS_$_");
+  llvm::StringRef g_objc_v2_prefix_ivar("_OBJC_IVAR_$_");
 
   for (i = 0; i < m_header.ncmds; ++i) {
     const lldb::offset_t cmd_offset = offset;
@@ -2213,2604 +2160,2555 @@
     offset = cmd_offset + lc.cmdsize;
   }
 
-  if (symtab_load_command.cmd) {
-    Symtab *symtab = m_symtab_up.get();
-    SectionList *section_list = GetSectionList();
-    if (section_list == nullptr)
-      return 0;
+  if (!symtab_load_command.cmd)
+    return 0;
 
-    const uint32_t addr_byte_size = m_data.GetAddressByteSize();
-    const ByteOrder byte_order = m_data.GetByteOrder();
-    bool bit_width_32 = addr_byte_size == 4;
-    const size_t nlist_byte_size =
-        bit_width_32 ? sizeof(struct nlist) : sizeof(struct nlist_64);
+  Symtab *symtab = m_symtab_up.get();
+  SectionList *section_list = GetSectionList();
+  if (section_list == nullptr)
+    return 0;
 
-    DataExtractor nlist_data(nullptr, 0, byte_order, addr_byte_size);
-    DataExtractor strtab_data(nullptr, 0, byte_order, addr_byte_size);
-    DataExtractor function_starts_data(nullptr, 0, byte_order, addr_byte_size);
-    DataExtractor indirect_symbol_index_data(nullptr, 0, byte_order,
-                                             addr_byte_size);
-    DataExtractor dyld_trie_data(nullptr, 0, byte_order, addr_byte_size);
+  const uint32_t addr_byte_size = m_data.GetAddressByteSize();
+  const ByteOrder byte_order = m_data.GetByteOrder();
+  bool bit_width_32 = addr_byte_size == 4;
+  const size_t nlist_byte_size =
+      bit_width_32 ? sizeof(struct nlist) : sizeof(struct nlist_64);
 
-    const addr_t nlist_data_byte_size =
-        symtab_load_command.nsyms * nlist_byte_size;
-    const addr_t strtab_data_byte_size = symtab_load_command.strsize;
-    addr_t strtab_addr = LLDB_INVALID_ADDRESS;
+  DataExtractor nlist_data(nullptr, 0, byte_order, addr_byte_size);
+  DataExtractor strtab_data(nullptr, 0, byte_order, addr_byte_size);
+  DataExtractor function_starts_data(nullptr, 0, byte_order, addr_byte_size);
+  DataExtractor indirect_symbol_index_data(nullptr, 0, byte_order,
+                                           addr_byte_size);
+  DataExtractor dyld_trie_data(nullptr, 0, byte_order, addr_byte_size);
 
-    ProcessSP process_sp(m_process_wp.lock());
-    Process *process = process_sp.get();
+  const addr_t nlist_data_byte_size =
+      symtab_load_command.nsyms * nlist_byte_size;
+  const addr_t strtab_data_byte_size = symtab_load_command.strsize;
+  addr_t strtab_addr = LLDB_INVALID_ADDRESS;
 
-    uint32_t memory_module_load_level = eMemoryModuleLoadLevelComplete;
+  ProcessSP process_sp(m_process_wp.lock());
+  Process *process = process_sp.get();
 
-    if (process && m_header.filetype != llvm::MachO::MH_OBJECT) {
-      Target &target = process->GetTarget();
+  uint32_t memory_module_load_level = eMemoryModuleLoadLevelComplete;
 
-      memory_module_load_level = target.GetMemoryModuleLoadLevel();
+  if (process && m_header.filetype != llvm::MachO::MH_OBJECT) {
+    Target &target = process->GetTarget();
 
-      SectionSP linkedit_section_sp(
-          section_list->FindSectionByName(GetSegmentNameLINKEDIT()));
-      // Reading mach file from memory in a process or core file...
+    memory_module_load_level = target.GetMemoryModuleLoadLevel();
 
-      if (linkedit_section_sp) {
-        addr_t linkedit_load_addr =
-            linkedit_section_sp->GetLoadBaseAddress(&target);
-        if (linkedit_load_addr == LLDB_INVALID_ADDRESS) {
-          // We might be trying to access the symbol table before the
-          // __LINKEDIT's load address has been set in the target. We can't
-          // fail to read the symbol table, so calculate the right address
-          // manually
-          linkedit_load_addr = CalculateSectionLoadAddressForMemoryImage(
-              m_memory_addr, GetMachHeaderSection(), linkedit_section_sp.get());
-        }
+    SectionSP linkedit_section_sp(
+        section_list->FindSectionByName(GetSegmentNameLINKEDIT()));
+    // Reading mach file from memory in a process or core file...
 
-        const addr_t linkedit_file_offset =
-            linkedit_section_sp->GetFileOffset();
-        const addr_t symoff_addr = linkedit_load_addr +
-                                   symtab_load_command.symoff -
-                                   linkedit_file_offset;
-        strtab_addr = linkedit_load_addr + symtab_load_command.stroff -
-                      linkedit_file_offset;
+    if (linkedit_section_sp) {
+      addr_t linkedit_load_addr =
+          linkedit_section_sp->GetLoadBaseAddress(&target);
+      if (linkedit_load_addr == LLDB_INVALID_ADDRESS) {
+        // We might be trying to access the symbol table before the
+        // __LINKEDIT's load address has been set in the target. We can't
+        // fail to read the symbol table, so calculate the right address
+        // manually
+        linkedit_load_addr = CalculateSectionLoadAddressForMemoryImage(
+            m_memory_addr, GetMachHeaderSection(), linkedit_section_sp.get());
+      }
 
-        bool data_was_read = false;
+      const addr_t linkedit_file_offset = linkedit_section_sp->GetFileOffset();
+      const addr_t symoff_addr = linkedit_load_addr +
+                                 symtab_load_command.symoff -
+                                 linkedit_file_offset;
+      strtab_addr = linkedit_load_addr + symtab_load_command.stroff -
+                    linkedit_file_offset;
+
+      bool data_was_read = false;
 
 #if defined(__APPLE__) &&                                                      \
     (defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
-        if (m_header.flags & 0x80000000u &&
-            process->GetAddressByteSize() == sizeof(void *)) {
-          // This mach-o memory file is in the dyld shared cache. If this
-          // program is not remote and this is iOS, then this process will
-          // share the same shared cache as the process we are debugging and we
-          // can read the entire __LINKEDIT from the address space in this
-          // process. This is a needed optimization that is used for local iOS
-          // debugging only since all shared libraries in the shared cache do
-          // not have corresponding files that exist in the file system of the
-          // device. They have been combined into a single file. This means we
-          // always have to load these files from memory. All of the symbol and
-          // string tables from all of the __LINKEDIT sections from the shared
-          // libraries in the shared cache have been merged into a single large
-          // symbol and string table. Reading all of this symbol and string
-          // table data across can slow down debug launch times, so we optimize
-          // this by reading the memory for the __LINKEDIT section from this
-          // process.
+      if (m_header.flags & 0x80000000u &&
+          process->GetAddressByteSize() == sizeof(void *)) {
+        // This mach-o memory file is in the dyld shared cache. If this
+        // program is not remote and this is iOS, then this process will
+        // share the same shared cache as the process we are debugging and we
+        // can read the entire __LINKEDIT from the address space in this
+        // process. This is a needed optimization that is used for local iOS
+        // debugging only since all shared libraries in the shared cache do
+        // not have corresponding files that exist in the file system of the
+        // device. They have been combined into a single file. This means we
+        // always have to load these files from memory. All of the symbol and
+        // string tables from all of the __LINKEDIT sections from the shared
+        // libraries in the shared cache have been merged into a single large
+        // symbol and string table. Reading all of this symbol and string
+        // table data across can slow down debug launch times, so we optimize
+        // this by reading the memory for the __LINKEDIT section from this
+        // process.
 
-          UUID lldb_shared_cache;
-          addr_t lldb_shared_cache_addr;
-          GetLLDBSharedCacheUUID (lldb_shared_cache_addr, lldb_shared_cache);
-          UUID process_shared_cache;
-          addr_t process_shared_cache_addr;
-          GetProcessSharedCacheUUID(process, process_shared_cache_addr, process_shared_cache);
-          bool use_lldb_cache = true;
-          if (lldb_shared_cache.IsValid() && process_shared_cache.IsValid() &&
-              (lldb_shared_cache != process_shared_cache
-               || process_shared_cache_addr != lldb_shared_cache_addr)) {
-            use_lldb_cache = false;
-          }
+        UUID lldb_shared_cache;
+        addr_t lldb_shared_cache_addr;
+        GetLLDBSharedCacheUUID(lldb_shared_cache_addr, lldb_shared_cache);
+        UUID process_shared_cache;
+        addr_t process_shared_cache_addr;
+        GetProcessSharedCacheUUID(process, process_shared_cache_addr,
+                                  process_shared_cache);
+        bool use_lldb_cache = true;
+        if (lldb_shared_cache.IsValid() && process_shared_cache.IsValid() &&
+            (lldb_shared_cache != process_shared_cache ||
+             process_shared_cache_addr != lldb_shared_cache_addr)) {
+          use_lldb_cache = false;
+        }
 
-          PlatformSP platform_sp(target.GetPlatform());
-          if (platform_sp && platform_sp->IsHost() && use_lldb_cache) {
-            data_was_read = true;
-            nlist_data.SetData((void *)symoff_addr, nlist_data_byte_size,
-                               eByteOrderLittle);
-            strtab_data.SetData((void *)strtab_addr, strtab_data_byte_size,
-                                eByteOrderLittle);
-            if (function_starts_load_command.cmd) {
-              const addr_t func_start_addr =
-                  linkedit_load_addr + function_starts_load_command.dataoff -
-                  linkedit_file_offset;
-              function_starts_data.SetData(
-                  (void *)func_start_addr,
-                  function_starts_load_command.datasize, eByteOrderLittle);
-            }
+        PlatformSP platform_sp(target.GetPlatform());
+        if (platform_sp && platform_sp->IsHost() && use_lldb_cache) {
+          data_was_read = true;
+          nlist_data.SetData((void *)symoff_addr, nlist_data_byte_size,
+                             eByteOrderLittle);
+          strtab_data.SetData((void *)strtab_addr, strtab_data_byte_size,
+                              eByteOrderLittle);
+          if (function_starts_load_command.cmd) {
+            const addr_t func_start_addr =
+                linkedit_load_addr + function_starts_load_command.dataoff -
+                linkedit_file_offset;
+            function_starts_data.SetData((void *)func_start_addr,
+                                         function_starts_load_command.datasize,
+                                         eByteOrderLittle);
           }
         }
+      }
 #endif
 
-        if (!data_was_read) {
-          // Always load dyld - the dynamic linker - from memory if we didn't
-          // find a binary anywhere else. lldb will not register
-          // dylib/framework/bundle loads/unloads if we don't have the dyld
-          // symbols, we force dyld to load from memory despite the user's
-          // target.memory-module-load-level setting.
-          if (memory_module_load_level == eMemoryModuleLoadLevelComplete ||
-              m_header.filetype == llvm::MachO::MH_DYLINKER) {
-            DataBufferSP nlist_data_sp(
-                ReadMemory(process_sp, symoff_addr, nlist_data_byte_size));
-            if (nlist_data_sp)
-              nlist_data.SetData(nlist_data_sp, 0,
-                                 nlist_data_sp->GetByteSize());
-            if (m_dysymtab.nindirectsyms != 0) {
-              const addr_t indirect_syms_addr = linkedit_load_addr +
-                                                m_dysymtab.indirectsymoff -
-                                                linkedit_file_offset;
-              DataBufferSP indirect_syms_data_sp(
-                  ReadMemory(process_sp, indirect_syms_addr,
-                             m_dysymtab.nindirectsyms * 4));
-              if (indirect_syms_data_sp)
-                indirect_symbol_index_data.SetData(
-                    indirect_syms_data_sp, 0,
-                    indirect_syms_data_sp->GetByteSize());
-              // If this binary is outside the shared cache, 
-              // cache the string table.
-              // Binaries in the shared cache all share a giant string table, and
-              // we can't share the string tables across multiple ObjectFileMachO's,
-              // so we'd end up re-reading this mega-strtab for every binary
-              // in the shared cache - it would be a big perf problem.
-              // For binaries outside the shared cache, it's faster to read the
-              // entire strtab at once instead of piece-by-piece as we process
-              // the nlist records.
-              if ((m_header.flags & 0x80000000u) == 0) {
-                DataBufferSP strtab_data_sp (ReadMemory (process_sp, strtab_addr, 
-                      strtab_data_byte_size));
-                if (strtab_data_sp) {
-                  strtab_data.SetData (strtab_data_sp, 0, strtab_data_sp->GetByteSize());
-                }
+      if (!data_was_read) {
+        // Always load dyld - the dynamic linker - from memory if we didn't
+        // find a binary anywhere else. lldb will not register
+        // dylib/framework/bundle loads/unloads if we don't have the dyld
+        // symbols, we force dyld to load from memory despite the user's
+        // target.memory-module-load-level setting.
+        if (memory_module_load_level == eMemoryModuleLoadLevelComplete ||
+            m_header.filetype == llvm::MachO::MH_DYLINKER) {
+          DataBufferSP nlist_data_sp(
+              ReadMemory(process_sp, symoff_addr, nlist_data_byte_size));
+          if (nlist_data_sp)
+            nlist_data.SetData(nlist_data_sp, 0, nlist_data_sp->GetByteSize());
+          if (m_dysymtab.nindirectsyms != 0) {
+            const addr_t indirect_syms_addr = linkedit_load_addr +
+                                              m_dysymtab.indirectsymoff -
+                                              linkedit_file_offset;
+            DataBufferSP indirect_syms_data_sp(ReadMemory(
+                process_sp, indirect_syms_addr, m_dysymtab.nindirectsyms * 4));
+            if (indirect_syms_data_sp)
+              indirect_symbol_index_data.SetData(
+                  indirect_syms_data_sp, 0,
+                  indirect_syms_data_sp->GetByteSize());
+            // If this binary is outside the shared cache,
+            // cache the string table.
+            // Binaries in the shared cache all share a giant string table,
+            // and we can't share the string tables across multiple
+            // ObjectFileMachO's, so we'd end up re-reading this mega-strtab
+            // for every binary in the shared cache - it would be a big perf
+            // problem. For binaries outside the shared cache, it's faster to
+            // read the entire strtab at once instead of piece-by-piece as we
+            // process the nlist records.
+            if ((m_header.flags & 0x80000000u) == 0) {
+              DataBufferSP strtab_data_sp(
+                  ReadMemory(process_sp, strtab_addr, strtab_data_byte_size));
+              if (strtab_data_sp) {
+                strtab_data.SetData(strtab_data_sp, 0,
+                                    strtab_data_sp->GetByteSize());
               }
             }
           }
-          if (memory_module_load_level >=
-                     eMemoryModuleLoadLevelPartial) {
-            if (function_starts_load_command.cmd) {
-              const addr_t func_start_addr =
-                  linkedit_load_addr + function_starts_load_command.dataoff -
-                  linkedit_file_offset;
-              DataBufferSP func_start_data_sp(
-                  ReadMemory(process_sp, func_start_addr,
-                             function_starts_load_command.datasize));
-              if (func_start_data_sp)
-                function_starts_data.SetData(func_start_data_sp, 0,
-                                             func_start_data_sp->GetByteSize());
-            }
+        }
+        if (memory_module_load_level >= eMemoryModuleLoadLevelPartial) {
+          if (function_starts_load_command.cmd) {
+            const addr_t func_start_addr =
+                linkedit_load_addr + function_starts_load_command.dataoff -
+                linkedit_file_offset;
+            DataBufferSP func_start_data_sp(
+                ReadMemory(process_sp, func_start_addr,
+                           function_starts_load_command.datasize));
+            if (func_start_data_sp)
+              function_starts_data.SetData(func_start_data_sp, 0,
+                                           func_start_data_sp->GetByteSize());
           }
         }
       }
-    } else {
-      nlist_data.SetData(m_data, symtab_load_command.symoff,
-                         nlist_data_byte_size);
-      strtab_data.SetData(m_data, symtab_load_command.stroff,
-                          strtab_data_byte_size);
+    }
+  } else {
+    nlist_data.SetData(m_data, symtab_load_command.symoff,
+                       nlist_data_byte_size);
+    strtab_data.SetData(m_data, symtab_load_command.stroff,
+                        strtab_data_byte_size);
 
-      if (dyld_info.export_size > 0) {
-        dyld_trie_data.SetData(m_data, dyld_info.export_off,
-                               dyld_info.export_size);
-      }
-
-      if (m_dysymtab.nindirectsyms != 0) {
-        indirect_symbol_index_data.SetData(m_data, m_dysymtab.indirectsymoff,
-                                           m_dysymtab.nindirectsyms * 4);
-      }
-      if (function_starts_load_command.cmd) {
-        function_starts_data.SetData(m_data,
-                                     function_starts_load_command.dataoff,
-                                     function_starts_load_command.datasize);
-      }
+    if (dyld_info.export_size > 0) {
+      dyld_trie_data.SetData(m_data, dyld_info.export_off,
+                             dyld_info.export_size);
     }
 
-    if (nlist_data.GetByteSize() == 0 &&
-        memory_module_load_level == eMemoryModuleLoadLevelComplete) {
-      if (log)
-        module_sp->LogMessage(log, "failed to read nlist data");
-      return 0;
+    if (m_dysymtab.nindirectsyms != 0) {
+      indirect_symbol_index_data.SetData(m_data, m_dysymtab.indirectsymoff,
+                                         m_dysymtab.nindirectsyms * 4);
     }
+    if (function_starts_load_command.cmd) {
+      function_starts_data.SetData(m_data, function_starts_load_command.dataoff,
+                                   function_starts_load_command.datasize);
+    }
+  }
 
-    const bool have_strtab_data = strtab_data.GetByteSize() > 0;
-    if (!have_strtab_data) {
-      if (process) {
-        if (strtab_addr == LLDB_INVALID_ADDRESS) {
-          if (log)
-            module_sp->LogMessage(log, "failed to locate the strtab in memory");
-          return 0;
-        }
-      } else {
+  if (nlist_data.GetByteSize() == 0 &&
+      memory_module_load_level == eMemoryModuleLoadLevelComplete) {
+    if (log)
+      module_sp->LogMessage(log, "failed to read nlist data");
+    return 0;
+  }
+
+  const bool have_strtab_data = strtab_data.GetByteSize() > 0;
+  if (!have_strtab_data) {
+    if (process) {
+      if (strtab_addr == LLDB_INVALID_ADDRESS) {
         if (log)
-          module_sp->LogMessage(log, "failed to read strtab data");
+          module_sp->LogMessage(log, "failed to locate the strtab in memory");
         return 0;
       }
-    }
-
-    ConstString g_segment_name_TEXT = GetSegmentNameTEXT();
-    ConstString g_segment_name_DATA = GetSegmentNameDATA();
-    ConstString g_segment_name_DATA_DIRTY = GetSegmentNameDATA_DIRTY();
-    ConstString g_segment_name_DATA_CONST = GetSegmentNameDATA_CONST();
-    ConstString g_segment_name_OBJC = GetSegmentNameOBJC();
-    ConstString g_section_name_eh_frame = GetSectionNameEHFrame();
-    SectionSP text_section_sp(
-        section_list->FindSectionByName(g_segment_name_TEXT));
-    SectionSP data_section_sp(
-        section_list->FindSectionByName(g_segment_name_DATA));
-    SectionSP data_dirty_section_sp(
-        section_list->FindSectionByName(g_segment_name_DATA_DIRTY));
-    SectionSP data_const_section_sp(
-        section_list->FindSectionByName(g_segment_name_DATA_CONST));
-    SectionSP objc_section_sp(
-        section_list->FindSectionByName(g_segment_name_OBJC));
-    SectionSP eh_frame_section_sp;
-    if (text_section_sp.get())
-      eh_frame_section_sp = text_section_sp->GetChildren().FindSectionByName(
-          g_section_name_eh_frame);
-    else
-      eh_frame_section_sp =
-          section_list->FindSectionByName(g_section_name_eh_frame);
-
-    const bool is_arm = (m_header.cputype == llvm::MachO::CPU_TYPE_ARM);
-
-    // lldb works best if it knows the start address of all functions in a
-    // module. Linker symbols or debug info are normally the best source of
-    // information for start addr / size but they may be stripped in a released
-    // binary. Two additional sources of information exist in Mach-O binaries:
-    //    LC_FUNCTION_STARTS - a list of ULEB128 encoded offsets of each
-    //    function's start address in the
-    //                         binary, relative to the text section.
-    //    eh_frame           - the eh_frame FDEs have the start addr & size of
-    //    each function
-    //  LC_FUNCTION_STARTS is the fastest source to read in, and is present on
-    //  all modern binaries.
-    //  Binaries built to run on older releases may need to use eh_frame
-    //  information.
-
-    if (text_section_sp && function_starts_data.GetByteSize()) {
-      FunctionStarts::Entry function_start_entry;
-      function_start_entry.data = false;
-      lldb::offset_t function_start_offset = 0;
-      function_start_entry.addr = text_section_sp->GetFileAddress();
-      uint64_t delta;
-      while ((delta = function_starts_data.GetULEB128(&function_start_offset)) >
-             0) {
-        // Now append the current entry
-        function_start_entry.addr += delta;
-        function_starts.Append(function_start_entry);
-      }
     } else {
-      // If m_type is eTypeDebugInfo, then this is a dSYM - it will have the
-      // load command claiming an eh_frame but it doesn't actually have the
-      // eh_frame content.  And if we have a dSYM, we don't need to do any of
-      // this fill-in-the-missing-symbols works anyway - the debug info should
-      // give us all the functions in the module.
-      if (text_section_sp.get() && eh_frame_section_sp.get() &&
-          m_type != eTypeDebugInfo) {
-        DWARFCallFrameInfo eh_frame(*this, eh_frame_section_sp,
-                                    DWARFCallFrameInfo::EH);
-        DWARFCallFrameInfo::FunctionAddressAndSizeVector functions;
-        eh_frame.GetFunctionAddressAndSizeVector(functions);
-        addr_t text_base_addr = text_section_sp->GetFileAddress();
-        size_t count = functions.GetSize();
-        for (size_t i = 0; i < count; ++i) {
-          const DWARFCallFrameInfo::FunctionAddressAndSizeVector::Entry *func =
-              functions.GetEntryAtIndex(i);
-          if (func) {
-            FunctionStarts::Entry function_start_entry;
-            function_start_entry.addr = func->base - text_base_addr;
-            function_starts.Append(function_start_entry);
-          }
+      if (log)
+        module_sp->LogMessage(log, "failed to read strtab data");
+      return 0;
+    }
+  }
+
+  ConstString g_segment_name_TEXT = GetSegmentNameTEXT();
+  ConstString g_segment_name_DATA = GetSegmentNameDATA();
+  ConstString g_segment_name_DATA_DIRTY = GetSegmentNameDATA_DIRTY();
+  ConstString g_segment_name_DATA_CONST = GetSegmentNameDATA_CONST();
+  ConstString g_segment_name_OBJC = GetSegmentNameOBJC();
+  ConstString g_section_name_eh_frame = GetSectionNameEHFrame();
+  SectionSP text_section_sp(
+      section_list->FindSectionByName(g_segment_name_TEXT));
+  SectionSP data_section_sp(
+      section_list->FindSectionByName(g_segment_name_DATA));
+  SectionSP data_dirty_section_sp(
+      section_list->FindSectionByName(g_segment_name_DATA_DIRTY));
+  SectionSP data_const_section_sp(
+      section_list->FindSectionByName(g_segment_name_DATA_CONST));
+  SectionSP objc_section_sp(
+      section_list->FindSectionByName(g_segment_name_OBJC));
+  SectionSP eh_frame_section_sp;
+  if (text_section_sp.get())
+    eh_frame_section_sp = text_section_sp->GetChildren().FindSectionByName(
+        g_section_name_eh_frame);
+  else
+    eh_frame_section_sp =
+        section_list->FindSectionByName(g_section_name_eh_frame);
+
+  const bool is_arm = (m_header.cputype == llvm::MachO::CPU_TYPE_ARM);
+
+  // lldb works best if it knows the start address of all functions in a
+  // module. Linker symbols or debug info are normally the best source of
+  // information for start addr / size but they may be stripped in a released
+  // binary. Two additional sources of information exist in Mach-O binaries:
+  //    LC_FUNCTION_STARTS - a list of ULEB128 encoded offsets of each
+  //    function's start address in the
+  //                         binary, relative to the text section.
+  //    eh_frame           - the eh_frame FDEs have the start addr & size of
+  //    each function
+  //  LC_FUNCTION_STARTS is the fastest source to read in, and is present on
+  //  all modern binaries.
+  //  Binaries built to run on older releases may need to use eh_frame
+  //  information.
+
+  if (text_section_sp && function_starts_data.GetByteSize()) {
+    FunctionStarts::Entry function_start_entry;
+    function_start_entry.data = false;
+    lldb::offset_t function_start_offset = 0;
+    function_start_entry.addr = text_section_sp->GetFileAddress();
+    uint64_t delta;
+    while ((delta = function_starts_data.GetULEB128(&function_start_offset)) >
+           0) {
+      // Now append the current entry
+      function_start_entry.addr += delta;
+      function_starts.Append(function_start_entry);
+    }
+  } else {
+    // If m_type is eTypeDebugInfo, then this is a dSYM - it will have the
+    // load command claiming an eh_frame but it doesn't actually have the
+    // eh_frame content.  And if we have a dSYM, we don't need to do any of
+    // this fill-in-the-missing-symbols works anyway - the debug info should
+    // give us all the functions in the module.
+    if (text_section_sp.get() && eh_frame_section_sp.get() &&
+        m_type != eTypeDebugInfo) {
+      DWARFCallFrameInfo eh_frame(*this, eh_frame_section_sp,
+                                  DWARFCallFrameInfo::EH);
+      DWARFCallFrameInfo::FunctionAddressAndSizeVector functions;
+      eh_frame.GetFunctionAddressAndSizeVector(functions);
+      addr_t text_base_addr = text_section_sp->GetFileAddress();
+      size_t count = functions.GetSize();
+      for (size_t i = 0; i < count; ++i) {
+        const DWARFCallFrameInfo::FunctionAddressAndSizeVector::Entry *func =
+            functions.GetEntryAtIndex(i);
+        if (func) {
+          FunctionStarts::Entry function_start_entry;
+          function_start_entry.addr = func->base - text_base_addr;
+          function_starts.Append(function_start_entry);
         }
       }
     }
+  }
 
-    const size_t function_starts_count = function_starts.GetSize();
+  const size_t function_starts_count = function_starts.GetSize();
 
-    // For user process binaries (executables, dylibs, frameworks, bundles), if
-    // we don't have LC_FUNCTION_STARTS/eh_frame section in this binary, we're
-    // going to assume the binary has been stripped.  Don't allow assembly
-    // language instruction emulation because we don't know proper function
-    // start boundaries.
-    //
-    // For all other types of binaries (kernels, stand-alone bare board
-    // binaries, kexts), they may not have LC_FUNCTION_STARTS / eh_frame
-    // sections - we should not make any assumptions about them based on that.
-    if (function_starts_count == 0 && CalculateStrata() == eStrataUser) {
-      m_allow_assembly_emulation_unwind_plans = false;
-      Log *unwind_or_symbol_log(lldb_private::GetLogIfAnyCategoriesSet(
-          LIBLLDB_LOG_SYMBOLS | LIBLLDB_LOG_UNWIND));
+  // For user process binaries (executables, dylibs, frameworks, bundles), if
+  // we don't have LC_FUNCTION_STARTS/eh_frame section in this binary, we're
+  // going to assume the binary has been stripped.  Don't allow assembly
+  // language instruction emulation because we don't know proper function
+  // start boundaries.
+  //
+  // For all other types of binaries (kernels, stand-alone bare board
+  // binaries, kexts), they may not have LC_FUNCTION_STARTS / eh_frame
+  // sections - we should not make any assumptions about them based on that.
+  if (function_starts_count == 0 && CalculateStrata() == eStrataUser) {
+    m_allow_assembly_emulation_unwind_plans = false;
+    Log *unwind_or_symbol_log(lldb_private::GetLogIfAnyCategoriesSet(
+        LIBLLDB_LOG_SYMBOLS | LIBLLDB_LOG_UNWIND));
 
-      if (unwind_or_symbol_log)
-        module_sp->LogMessage(
-            unwind_or_symbol_log,
-            "no LC_FUNCTION_STARTS, will not allow assembly profiled unwinds");
-    }
+    if (unwind_or_symbol_log)
+      module_sp->LogMessage(
+          unwind_or_symbol_log,
+          "no LC_FUNCTION_STARTS, will not allow assembly profiled unwinds");
+  }
 
-    const user_id_t TEXT_eh_frame_sectID =
-        eh_frame_section_sp.get() ? eh_frame_section_sp->GetID()
-                                  : static_cast<user_id_t>(NO_SECT);
+  const user_id_t TEXT_eh_frame_sectID = eh_frame_section_sp.get()
+                                             ? eh_frame_section_sp->GetID()
+                                             : static_cast<user_id_t>(NO_SECT);
 
-    lldb::offset_t nlist_data_offset = 0;
+  lldb::offset_t nlist_data_offset = 0;
 
-    uint32_t N_SO_index = UINT32_MAX;
+  uint32_t N_SO_index = UINT32_MAX;
 
-    MachSymtabSectionInfo section_info(section_list);
-    std::vector<uint32_t> N_FUN_indexes;
-    std::vector<uint32_t> N_NSYM_indexes;
-    std::vector<uint32_t> N_INCL_indexes;
-    std::vector<uint32_t> N_BRAC_indexes;
-    std::vector<uint32_t> N_COMM_indexes;
-    typedef std::multimap<uint64_t, uint32_t> ValueToSymbolIndexMap;
-    typedef std::map<uint32_t, uint32_t> NListIndexToSymbolIndexMap;
-    typedef std::map<const char *, uint32_t> ConstNameToSymbolIndexMap;
-    ValueToSymbolIndexMap N_FUN_addr_to_sym_idx;
-    ValueToSymbolIndexMap N_STSYM_addr_to_sym_idx;
-    ConstNameToSymbolIndexMap N_GSYM_name_to_sym_idx;
-    // Any symbols that get merged into another will get an entry in this map
-    // so we know
-    NListIndexToSymbolIndexMap m_nlist_idx_to_sym_idx;
-    uint32_t nlist_idx = 0;
-    Symbol *symbol_ptr = nullptr;
+  MachSymtabSectionInfo section_info(section_list);
+  std::vector<uint32_t> N_FUN_indexes;
+  std::vector<uint32_t> N_NSYM_indexes;
+  std::vector<uint32_t> N_INCL_indexes;
+  std::vector<uint32_t> N_BRAC_indexes;
+  std::vector<uint32_t> N_COMM_indexes;
+  typedef std::multimap<uint64_t, uint32_t> ValueToSymbolIndexMap;
+  typedef llvm::DenseMap<uint32_t, uint32_t> NListIndexToSymbolIndexMap;
+  typedef llvm::DenseMap<const char *, uint32_t> ConstNameToSymbolIndexMap;
+  ValueToSymbolIndexMap N_FUN_addr_to_sym_idx;
+  ValueToSymbolIndexMap N_STSYM_addr_to_sym_idx;
+  ConstNameToSymbolIndexMap N_GSYM_name_to_sym_idx;
+  // Any symbols that get merged into another will get an entry in this map
+  // so we know
+  NListIndexToSymbolIndexMap m_nlist_idx_to_sym_idx;
+  uint32_t nlist_idx = 0;
+  Symbol *symbol_ptr = nullptr;
 
-    uint32_t sym_idx = 0;
-    Symbol *sym = nullptr;
-    size_t num_syms = 0;
-    std::string memory_symbol_name;
-    uint32_t unmapped_local_symbols_found = 0;
+  uint32_t sym_idx = 0;
+  Symbol *sym = nullptr;
+  size_t num_syms = 0;
+  std::string memory_symbol_name;
+  uint32_t unmapped_local_symbols_found = 0;
 
-    std::vector<TrieEntryWithOffset> trie_entries;
-    std::set<lldb::addr_t> resolver_addresses;
+  std::vector<TrieEntryWithOffset> trie_entries;
+  std::set<lldb::addr_t> resolver_addresses;
 
-    if (dyld_trie_data.GetByteSize() > 0) {
-      std::vector<llvm::StringRef> nameSlices;
-      ParseTrieEntries(dyld_trie_data, 0, is_arm, nameSlices,
-                       resolver_addresses, trie_entries);
+  if (dyld_trie_data.GetByteSize() > 0) {
+    std::vector<llvm::StringRef> nameSlices;
+    ParseTrieEntries(dyld_trie_data, 0, is_arm, nameSlices, resolver_addresses,
+                     trie_entries);
 
-      ConstString text_segment_name("__TEXT");
-      SectionSP text_segment_sp =
-          GetSectionList()->FindSectionByName(text_segment_name);
-      if (text_segment_sp) {
-        const lldb::addr_t text_segment_file_addr =
-            text_segment_sp->GetFileAddress();
-        if (text_segment_file_addr != LLDB_INVALID_ADDRESS) {
-          for (auto &e : trie_entries)
-            e.entry.address += text_segment_file_addr;
-        }
+    ConstString text_segment_name("__TEXT");
+    SectionSP text_segment_sp =
+        GetSectionList()->FindSectionByName(text_segment_name);
+    if (text_segment_sp) {
+      const lldb::addr_t text_segment_file_addr =
+          text_segment_sp->GetFileAddress();
+      if (text_segment_file_addr != LLDB_INVALID_ADDRESS) {
+        for (auto &e : trie_entries)
+          e.entry.address += text_segment_file_addr;
       }
     }
+  }
 
-    typedef std::set<ConstString> IndirectSymbols;
-    IndirectSymbols indirect_symbol_names;
+  typedef std::set<ConstString> IndirectSymbols;
+  IndirectSymbols indirect_symbol_names;
 
 #if defined(__APPLE__) &&                                                      \
     (defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
 
-    // Some recent builds of the dyld_shared_cache (hereafter: DSC) have been
-    // optimized by moving LOCAL symbols out of the memory mapped portion of
-    // the DSC. The symbol information has all been retained, but it isn't
-    // available in the normal nlist data. However, there *are* duplicate
-    // entries of *some*
-    // LOCAL symbols in the normal nlist data. To handle this situation
-    // correctly, we must first attempt
-    // to parse any DSC unmapped symbol information. If we find any, we set a
-    // flag that tells the normal nlist parser to ignore all LOCAL symbols.
+  // Some recent builds of the dyld_shared_cache (hereafter: DSC) have been
+  // optimized by moving LOCAL symbols out of the memory mapped portion of
+  // the DSC. The symbol information has all been retained, but it isn't
+  // available in the normal nlist data. However, there *are* duplicate
+  // entries of *some*
+  // LOCAL symbols in the normal nlist data. To handle this situation
+  // correctly, we must first attempt
+  // to parse any DSC unmapped symbol information. If we find any, we set a
+  // flag that tells the normal nlist parser to ignore all LOCAL symbols.
 
-    if (m_header.flags & 0x80000000u) {
-      // Before we can start mapping the DSC, we need to make certain the
-      // target process is actually using the cache we can find.
+  if (m_header.flags & 0x80000000u) {
+    // Before we can start mapping the DSC, we need to make certain the
+    // target process is actually using the cache we can find.
 
-      // Next we need to determine the correct path for the dyld shared cache.
+    // Next we need to determine the correct path for the dyld shared cache.
 
-      ArchSpec header_arch;
-      GetArchitecture(header_arch);
-      char dsc_path[PATH_MAX];
-      char dsc_path_development[PATH_MAX];
+    ArchSpec header_arch = GetArchitecture();
+    char dsc_path[PATH_MAX];
+    char dsc_path_development[PATH_MAX];
 
-      snprintf(
-          dsc_path, sizeof(dsc_path), "%s%s%s",
-          "/System/Library/Caches/com.apple.dyld/", /* IPHONE_DYLD_SHARED_CACHE_DIR
-                                                       */
-          "dyld_shared_cache_", /* DYLD_SHARED_CACHE_BASE_NAME */
-          header_arch.GetArchitectureName());
+    snprintf(
+        dsc_path, sizeof(dsc_path), "%s%s%s",
+        "/System/Library/Caches/com.apple.dyld/", /* IPHONE_DYLD_SHARED_CACHE_DIR
+                                                   */
+        "dyld_shared_cache_", /* DYLD_SHARED_CACHE_BASE_NAME */
+        header_arch.GetArchitectureName());
 
-      snprintf(
-          dsc_path_development, sizeof(dsc_path), "%s%s%s%s",
-          "/System/Library/Caches/com.apple.dyld/", /* IPHONE_DYLD_SHARED_CACHE_DIR
-                                                       */
-          "dyld_shared_cache_", /* DYLD_SHARED_CACHE_BASE_NAME */
-          header_arch.GetArchitectureName(), ".development");
+    snprintf(
+        dsc_path_development, sizeof(dsc_path), "%s%s%s%s",
+        "/System/Library/Caches/com.apple.dyld/", /* IPHONE_DYLD_SHARED_CACHE_DIR
+                                                   */
+        "dyld_shared_cache_", /* DYLD_SHARED_CACHE_BASE_NAME */
+        header_arch.GetArchitectureName(), ".development");
 
-      FileSpec dsc_nondevelopment_filespec(dsc_path, false);
-      FileSpec dsc_development_filespec(dsc_path_development, false);
-      FileSpec dsc_filespec;
+    FileSpec dsc_nondevelopment_filespec(dsc_path);
+    FileSpec dsc_development_filespec(dsc_path_development);
+    FileSpec dsc_filespec;
 
-      UUID dsc_uuid;
-      UUID process_shared_cache_uuid;
-      addr_t process_shared_cache_base_addr;
+    UUID dsc_uuid;
+    UUID process_shared_cache_uuid;
+    addr_t process_shared_cache_base_addr;
 
-      if (process) {
-        GetProcessSharedCacheUUID(process, process_shared_cache_base_addr, process_shared_cache_uuid);
-      }
+    if (process) {
+      GetProcessSharedCacheUUID(process, process_shared_cache_base_addr,
+                                process_shared_cache_uuid);
+    }
 
-      // First see if we can find an exact match for the inferior process
-      // shared cache UUID in the development or non-development shared caches
-      // on disk.
-      if (process_shared_cache_uuid.IsValid()) {
-        if (FileSystem::Instance().Exists(dsc_development_filespec)) {
-          UUID dsc_development_uuid = GetSharedCacheUUID(
-              dsc_development_filespec, byte_order, addr_byte_size);
-          if (dsc_development_uuid.IsValid() &&
-              dsc_development_uuid == process_shared_cache_uuid) {
-            dsc_filespec = dsc_development_filespec;
-            dsc_uuid = dsc_development_uuid;
-          }
-        }
-        if (!dsc_uuid.IsValid() &&
-            FileSystem::Instance().Exists(dsc_nondevelopment_filespec)) {
-          UUID dsc_nondevelopment_uuid = GetSharedCacheUUID(
-              dsc_nondevelopment_filespec, byte_order, addr_byte_size);
-          if (dsc_nondevelopment_uuid.IsValid() &&
-              dsc_nondevelopment_uuid == process_shared_cache_uuid) {
-            dsc_filespec = dsc_nondevelopment_filespec;
-            dsc_uuid = dsc_nondevelopment_uuid;
-          }
-        }
-      }
-
-      // Failing a UUID match, prefer the development dyld_shared cache if both
-      // are present.
-      if (!FileSystem::Instance().Exists(dsc_filespec)) {
-        if (FileSystem::Instance().Exists(dsc_development_filespec)) {
+    // First see if we can find an exact match for the inferior process
+    // shared cache UUID in the development or non-development shared caches
+    // on disk.
+    if (process_shared_cache_uuid.IsValid()) {
+      if (FileSystem::Instance().Exists(dsc_development_filespec)) {
+        UUID dsc_development_uuid = GetSharedCacheUUID(
+            dsc_development_filespec, byte_order, addr_byte_size);
+        if (dsc_development_uuid.IsValid() &&
+            dsc_development_uuid == process_shared_cache_uuid) {
           dsc_filespec = dsc_development_filespec;
-        } else {
+          dsc_uuid = dsc_development_uuid;
+        }
+      }
+      if (!dsc_uuid.IsValid() &&
+          FileSystem::Instance().Exists(dsc_nondevelopment_filespec)) {
+        UUID dsc_nondevelopment_uuid = GetSharedCacheUUID(
+            dsc_nondevelopment_filespec, byte_order, addr_byte_size);
+        if (dsc_nondevelopment_uuid.IsValid() &&
+            dsc_nondevelopment_uuid == process_shared_cache_uuid) {
           dsc_filespec = dsc_nondevelopment_filespec;
+          dsc_uuid = dsc_nondevelopment_uuid;
+        }
+      }
+    }
+
+    // Failing a UUID match, prefer the development dyld_shared cache if both
+    // are present.
+    if (!FileSystem::Instance().Exists(dsc_filespec)) {
+      if (FileSystem::Instance().Exists(dsc_development_filespec)) {
+        dsc_filespec = dsc_development_filespec;
+      } else {
+        dsc_filespec = dsc_nondevelopment_filespec;
+      }
+    }
+
+    /* The dyld_cache_header has a pointer to the
+       dyld_cache_local_symbols_info structure (localSymbolsOffset).
+       The dyld_cache_local_symbols_info structure gives us three things:
+         1. The start and count of the nlist records in the dyld_shared_cache
+       file
+         2. The start and size of the strings for these nlist records
+         3. The start and count of dyld_cache_local_symbols_entry entries
+
+       There is one dyld_cache_local_symbols_entry per dylib/framework in the
+       dyld shared cache.
+       The "dylibOffset" field is the Mach-O header of this dylib/framework in
+       the dyld shared cache.
+       The dyld_cache_local_symbols_entry also lists the start of this
+       dylib/framework's nlist records
+       and the count of how many nlist records there are for this
+       dylib/framework.
+    */
+
+    // Process the dyld shared cache header to find the unmapped symbols
+
+    DataBufferSP dsc_data_sp = MapFileData(
+        dsc_filespec, sizeof(struct lldb_copy_dyld_cache_header_v1), 0);
+    if (!dsc_uuid.IsValid()) {
+      dsc_uuid = GetSharedCacheUUID(dsc_filespec, byte_order, addr_byte_size);
+    }
+    if (dsc_data_sp) {
+      DataExtractor dsc_header_data(dsc_data_sp, byte_order, addr_byte_size);
+
+      bool uuid_match = true;
+      if (dsc_uuid.IsValid() && process) {
+        if (process_shared_cache_uuid.IsValid() &&
+            dsc_uuid != process_shared_cache_uuid) {
+          // The on-disk dyld_shared_cache file is not the same as the one in
+          // this process' memory, don't use it.
+          uuid_match = false;
+          ModuleSP module_sp(GetModule());
+          if (module_sp)
+            module_sp->ReportWarning("process shared cache does not match "
+                                     "on-disk dyld_shared_cache file, some "
+                                     "symbol names will be missing.");
         }
       }
 
-      /* The dyld_cache_header has a pointer to the
-         dyld_cache_local_symbols_info structure (localSymbolsOffset).
-         The dyld_cache_local_symbols_info structure gives us three things:
-           1. The start and count of the nlist records in the dyld_shared_cache
-         file
-           2. The start and size of the strings for these nlist records
-           3. The start and count of dyld_cache_local_symbols_entry entries
+      offset = offsetof(struct lldb_copy_dyld_cache_header_v1, mappingOffset);
 
-         There is one dyld_cache_local_symbols_entry per dylib/framework in the
-         dyld shared cache.
-         The "dylibOffset" field is the Mach-O header of this dylib/framework in
-         the dyld shared cache.
-         The dyld_cache_local_symbols_entry also lists the start of this
-         dylib/framework's nlist records
-         and the count of how many nlist records there are for this
-         dylib/framework.
-      */
+      uint32_t mappingOffset = dsc_header_data.GetU32(&offset);
 
-      // Process the dyld shared cache header to find the unmapped symbols
+      // If the mappingOffset points to a location inside the header, we've
+      // opened an old dyld shared cache, and should not proceed further.
+      if (uuid_match &&
+          mappingOffset >= sizeof(struct lldb_copy_dyld_cache_header_v1)) {
 
-      DataBufferSP dsc_data_sp = MapFileData(
-          dsc_filespec, sizeof(struct lldb_copy_dyld_cache_header_v1), 0);
-      if (!dsc_uuid.IsValid()) {
-        dsc_uuid = GetSharedCacheUUID(dsc_filespec, byte_order, addr_byte_size);
-      }
-      if (dsc_data_sp) {
-        DataExtractor dsc_header_data(dsc_data_sp, byte_order, addr_byte_size);
+        DataBufferSP dsc_mapping_info_data_sp = MapFileData(
+            dsc_filespec, sizeof(struct lldb_copy_dyld_cache_mapping_info),
+            mappingOffset);
 
-        bool uuid_match = true;
-        if (dsc_uuid.IsValid() && process) {
-          if (process_shared_cache_uuid.IsValid() &&
-              dsc_uuid != process_shared_cache_uuid) {
-            // The on-disk dyld_shared_cache file is not the same as the one in
-            // this process' memory, don't use it.
-            uuid_match = false;
-            ModuleSP module_sp(GetModule());
-            if (module_sp)
-              module_sp->ReportWarning("process shared cache does not match "
-                                       "on-disk dyld_shared_cache file, some "
-                                       "symbol names will be missing.");
-          }
-        }
+        DataExtractor dsc_mapping_info_data(dsc_mapping_info_data_sp,
+                                            byte_order, addr_byte_size);
+        offset = 0;
 
-        offset = offsetof(struct lldb_copy_dyld_cache_header_v1, mappingOffset);
+        // The File addresses (from the in-memory Mach-O load commands) for
+        // the shared libraries in the shared library cache need to be
+        // adjusted by an offset to match up with the dylibOffset identifying
+        // field in the dyld_cache_local_symbol_entry's.  This offset is
+        // recorded in mapping_offset_value.
+        const uint64_t mapping_offset_value =
+            dsc_mapping_info_data.GetU64(&offset);
 
-        uint32_t mappingOffset = dsc_header_data.GetU32(&offset);
+        offset =
+            offsetof(struct lldb_copy_dyld_cache_header_v1, localSymbolsOffset);
+        uint64_t localSymbolsOffset = dsc_header_data.GetU64(&offset);
+        uint64_t localSymbolsSize = dsc_header_data.GetU64(&offset);
 
-        // If the mappingOffset points to a location inside the header, we've
-        // opened an old dyld shared cache, and should not proceed further.
-        if (uuid_match &&
-            mappingOffset >= sizeof(struct lldb_copy_dyld_cache_header_v1)) {
+        if (localSymbolsOffset && localSymbolsSize) {
+          // Map the local symbols
+          DataBufferSP dsc_local_symbols_data_sp =
+              MapFileData(dsc_filespec, localSymbolsSize, localSymbolsOffset);
 
-          DataBufferSP dsc_mapping_info_data_sp = MapFileData(
-              dsc_filespec, sizeof(struct lldb_copy_dyld_cache_mapping_info),
-              mappingOffset);
+          if (dsc_local_symbols_data_sp) {
+            DataExtractor dsc_local_symbols_data(dsc_local_symbols_data_sp,
+                                                 byte_order, addr_byte_size);
 
-          DataExtractor dsc_mapping_info_data(dsc_mapping_info_data_sp,
-                                              byte_order, addr_byte_size);
-          offset = 0;
+            offset = 0;
 
-          // The File addresses (from the in-memory Mach-O load commands) for
-          // the shared libraries in the shared library cache need to be
-          // adjusted by an offset to match up with the dylibOffset identifying
-          // field in the dyld_cache_local_symbol_entry's.  This offset is
-          // recorded in mapping_offset_value.
-          const uint64_t mapping_offset_value =
-              dsc_mapping_info_data.GetU64(&offset);
+            typedef llvm::DenseMap<ConstString, uint16_t> UndefinedNameToDescMap;
+            typedef llvm::DenseMap<uint32_t, ConstString> SymbolIndexToName;
+            UndefinedNameToDescMap undefined_name_to_desc;
+            SymbolIndexToName reexport_shlib_needs_fixup;
 
-          offset = offsetof(struct lldb_copy_dyld_cache_header_v1,
-                            localSymbolsOffset);
-          uint64_t localSymbolsOffset = dsc_header_data.GetU64(&offset);
-          uint64_t localSymbolsSize = dsc_header_data.GetU64(&offset);
+            // Read the local_symbols_infos struct in one shot
+            struct lldb_copy_dyld_cache_local_symbols_info local_symbols_info;
+            dsc_local_symbols_data.GetU32(&offset,
+                                          &local_symbols_info.nlistOffset, 6);
 
-          if (localSymbolsOffset && localSymbolsSize) {
-            // Map the local symbols
-            DataBufferSP dsc_local_symbols_data_sp =
-                MapFileData(dsc_filespec, localSymbolsSize, localSymbolsOffset);
+            SectionSP text_section_sp(
+                section_list->FindSectionByName(GetSegmentNameTEXT()));
 
-            if (dsc_local_symbols_data_sp) {
-              DataExtractor dsc_local_symbols_data(dsc_local_symbols_data_sp,
-                                                   byte_order, addr_byte_size);
+            uint32_t header_file_offset =
+                (text_section_sp->GetFileAddress() - mapping_offset_value);
 
-              offset = 0;
+            offset = local_symbols_info.entriesOffset;
+            for (uint32_t entry_index = 0;
+                 entry_index < local_symbols_info.entriesCount; entry_index++) {
+              struct lldb_copy_dyld_cache_local_symbols_entry
+                  local_symbols_entry;
+              local_symbols_entry.dylibOffset =
+                  dsc_local_symbols_data.GetU32(&offset);
+              local_symbols_entry.nlistStartIndex =
+                  dsc_local_symbols_data.GetU32(&offset);
+              local_symbols_entry.nlistCount =
+                  dsc_local_symbols_data.GetU32(&offset);
 
-              typedef std::map<ConstString, uint16_t> UndefinedNameToDescMap;
-              typedef std::map<uint32_t, ConstString> SymbolIndexToName;
-              UndefinedNameToDescMap undefined_name_to_desc;
-              SymbolIndexToName reexport_shlib_needs_fixup;
+              if (header_file_offset == local_symbols_entry.dylibOffset) {
+                unmapped_local_symbols_found = local_symbols_entry.nlistCount;
 
-              // Read the local_symbols_infos struct in one shot
-              struct lldb_copy_dyld_cache_local_symbols_info local_symbols_info;
-              dsc_local_symbols_data.GetU32(&offset,
-                                            &local_symbols_info.nlistOffset, 6);
+                // The normal nlist code cannot correctly size the Symbols
+                // array, we need to allocate it here.
+                sym = symtab->Resize(
+                    symtab_load_command.nsyms + m_dysymtab.nindirectsyms +
+                    unmapped_local_symbols_found - m_dysymtab.nlocalsym);
+                num_syms = symtab->GetNumSymbols();
 
-              SectionSP text_section_sp(
-                  section_list->FindSectionByName(GetSegmentNameTEXT()));
+                nlist_data_offset =
+                    local_symbols_info.nlistOffset +
+                    (nlist_byte_size * local_symbols_entry.nlistStartIndex);
+                uint32_t string_table_offset = local_symbols_info.stringsOffset;
 
-              uint32_t header_file_offset =
-                  (text_section_sp->GetFileAddress() - mapping_offset_value);
+                for (uint32_t nlist_index = 0;
+                     nlist_index < local_symbols_entry.nlistCount;
+                     nlist_index++) {
+                  /////////////////////////////
+                  {
+                    llvm::Optional<struct nlist_64> nlist_maybe =
+                        ParseNList(dsc_local_symbols_data, nlist_data_offset,
+                                   nlist_byte_size);
+                    if (!nlist_maybe)
+                      break;
+                    struct nlist_64 nlist = *nlist_maybe;
 
-              offset = local_symbols_info.entriesOffset;
-              for (uint32_t entry_index = 0;
-                   entry_index < local_symbols_info.entriesCount;
-                   entry_index++) {
-                struct lldb_copy_dyld_cache_local_symbols_entry
-                    local_symbols_entry;
-                local_symbols_entry.dylibOffset =
-                    dsc_local_symbols_data.GetU32(&offset);
-                local_symbols_entry.nlistStartIndex =
-                    dsc_local_symbols_data.GetU32(&offset);
-                local_symbols_entry.nlistCount =
-                    dsc_local_symbols_data.GetU32(&offset);
+                    SymbolType type = eSymbolTypeInvalid;
+                    const char *symbol_name = dsc_local_symbols_data.PeekCStr(
+                        string_table_offset + nlist.n_strx);
 
-                if (header_file_offset == local_symbols_entry.dylibOffset) {
-                  unmapped_local_symbols_found = local_symbols_entry.nlistCount;
+                    if (symbol_name == NULL) {
+                      // No symbol should be NULL, even the symbols with no
+                      // string values should have an offset zero which
+                      // points to an empty C-string
+                      Host::SystemLog(
+                          Host::eSystemLogError,
+                          "error: DSC unmapped local symbol[%u] has invalid "
+                          "string table offset 0x%x in %s, ignoring symbol\n",
+                          entry_index, nlist.n_strx,
+                          module_sp->GetFileSpec().GetPath().c_str());
+                      continue;
+                    }
+                    if (symbol_name[0] == '\0')
+                      symbol_name = NULL;
 
-                  // The normal nlist code cannot correctly size the Symbols
-                  // array, we need to allocate it here.
-                  sym = symtab->Resize(
-                      symtab_load_command.nsyms + m_dysymtab.nindirectsyms +
-                      unmapped_local_symbols_found - m_dysymtab.nlocalsym);
-                  num_syms = symtab->GetNumSymbols();
+                    const char *symbol_name_non_abi_mangled = NULL;
 
-                  nlist_data_offset =
-                      local_symbols_info.nlistOffset +
-                      (nlist_byte_size * local_symbols_entry.nlistStartIndex);
-                  uint32_t string_table_offset =
-                      local_symbols_info.stringsOffset;
+                    SectionSP symbol_section;
+                    uint32_t symbol_byte_size = 0;
+                    bool add_nlist = true;
+                    bool is_debug = ((nlist.n_type & N_STAB) != 0);
+                    bool demangled_is_synthesized = false;
+                    bool is_gsym = false;
+                    bool set_value = true;
 
-                  for (uint32_t nlist_index = 0;
-                       nlist_index < local_symbols_entry.nlistCount;
-                       nlist_index++) {
-                    /////////////////////////////
-                    {
-                      struct nlist_64 nlist;
-                      if (!dsc_local_symbols_data.ValidOffsetForDataOfSize(
-                              nlist_data_offset, nlist_byte_size))
-                        break;
+                    assert(sym_idx < num_syms);
 
-                      nlist.n_strx = dsc_local_symbols_data.GetU32_unchecked(
-                          &nlist_data_offset);
-                      nlist.n_type = dsc_local_symbols_data.GetU8_unchecked(
-                          &nlist_data_offset);
-                      nlist.n_sect = dsc_local_symbols_data.GetU8_unchecked(
-                          &nlist_data_offset);
-                      nlist.n_desc = dsc_local_symbols_data.GetU16_unchecked(
-                          &nlist_data_offset);
-                      nlist.n_value =
-                          dsc_local_symbols_data.GetAddress_unchecked(
-                              &nlist_data_offset);
+                    sym[sym_idx].SetDebug(is_debug);
 
-                      SymbolType type = eSymbolTypeInvalid;
-                      const char *symbol_name = dsc_local_symbols_data.PeekCStr(
-                          string_table_offset + nlist.n_strx);
+                    if (is_debug) {
+                      switch (nlist.n_type) {
+                      case N_GSYM:
+                        // global symbol: name,,NO_SECT,type,0
+                        // Sometimes the N_GSYM value contains the address.
 
-                      if (symbol_name == NULL) {
-                        // No symbol should be NULL, even the symbols with no
-                        // string values should have an offset zero which
-                        // points to an empty C-string
-                        Host::SystemLog(
-                            Host::eSystemLogError,
-                            "error: DSC unmapped local symbol[%u] has invalid "
-                            "string table offset 0x%x in %s, ignoring symbol\n",
-                            entry_index, nlist.n_strx,
-                            module_sp->GetFileSpec().GetPath().c_str());
-                        continue;
-                      }
-                      if (symbol_name[0] == '\0')
-                        symbol_name = NULL;
+                        // FIXME: In the .o files, we have a GSYM and a debug
+                        // symbol for all the ObjC data.  They
+                        // have the same address, but we want to ensure that
+                        // we always find only the real symbol, 'cause we
+                        // don't currently correctly attribute the
+                        // GSYM one to the ObjCClass/Ivar/MetaClass
+                        // symbol type.  This is a temporary hack to make
+                        // sure the ObjectiveC symbols get treated correctly.
+                        // To do this right, we should coalesce all the GSYM
+                        // & global symbols that have the same address.
 
-                      const char *symbol_name_non_abi_mangled = NULL;
+                        is_gsym = true;
+                        sym[sym_idx].SetExternal(true);
 
-                      SectionSP symbol_section;
-                      uint32_t symbol_byte_size = 0;
-                      bool add_nlist = true;
-                      bool is_debug = ((nlist.n_type & N_STAB) != 0);
-                      bool demangled_is_synthesized = false;
-                      bool is_gsym = false;
-                      bool set_value = true;
+                        if (symbol_name && symbol_name[0] == '_' &&
+                            symbol_name[1] == 'O') {
+                          llvm::StringRef symbol_name_ref(symbol_name);
+                          if (symbol_name_ref.startswith(
+                                  g_objc_v2_prefix_class)) {
+                            symbol_name_non_abi_mangled = symbol_name + 1;
+                            symbol_name =
+                                symbol_name + g_objc_v2_prefix_class.size();
+                            type = eSymbolTypeObjCClass;
+                            demangled_is_synthesized = true;
 
-                      assert(sym_idx < num_syms);
-
-                      sym[sym_idx].SetDebug(is_debug);
-
-                      if (is_debug) {
-                        switch (nlist.n_type) {
-                        case N_GSYM:
-                          // global symbol: name,,NO_SECT,type,0
-                          // Sometimes the N_GSYM value contains the address.
-
-                          // FIXME: In the .o files, we have a GSYM and a debug
-                          // symbol for all the ObjC data.  They
-                          // have the same address, but we want to ensure that
-                          // we always find only the real symbol, 'cause we
-                          // don't currently correctly attribute the
-                          // GSYM one to the ObjCClass/Ivar/MetaClass
-                          // symbol type.  This is a temporary hack to make
-                          // sure the ObjectiveC symbols get treated correctly.
-                          // To do this right, we should coalesce all the GSYM
-                          // & global symbols that have the same address.
-
-                          is_gsym = true;
-                          sym[sym_idx].SetExternal(true);
-
-                          if (symbol_name && symbol_name[0] == '_' &&
-                              symbol_name[1] == 'O') {
-                            llvm::StringRef symbol_name_ref(symbol_name);
-                            if (symbol_name_ref.startswith(
-                                    g_objc_v2_prefix_class)) {
-                              symbol_name_non_abi_mangled = symbol_name + 1;
-                              symbol_name =
-                                  symbol_name + g_objc_v2_prefix_class.size();
-                              type = eSymbolTypeObjCClass;
-                              demangled_is_synthesized = true;
-
-                            } else if (symbol_name_ref.startswith(
-                                           g_objc_v2_prefix_metaclass)) {
-                              symbol_name_non_abi_mangled = symbol_name + 1;
-                              symbol_name = symbol_name +
-                                            g_objc_v2_prefix_metaclass.size();
-                              type = eSymbolTypeObjCMetaClass;
-                              demangled_is_synthesized = true;
-                            } else if (symbol_name_ref.startswith(
-                                           g_objc_v2_prefix_ivar)) {
-                              symbol_name_non_abi_mangled = symbol_name + 1;
-                              symbol_name =
-                                  symbol_name + g_objc_v2_prefix_ivar.size();
-                              type = eSymbolTypeObjCIVar;
-                              demangled_is_synthesized = true;
-                            }
-                          } else {
-                            if (nlist.n_value != 0)
-                              symbol_section = section_info.GetSection(
-                                  nlist.n_sect, nlist.n_value);
-                            type = eSymbolTypeData;
+                          } else if (symbol_name_ref.startswith(
+                                         g_objc_v2_prefix_metaclass)) {
+                            symbol_name_non_abi_mangled = symbol_name + 1;
+                            symbol_name =
+                                symbol_name + g_objc_v2_prefix_metaclass.size();
+                            type = eSymbolTypeObjCMetaClass;
+                            demangled_is_synthesized = true;
+                          } else if (symbol_name_ref.startswith(
+                                         g_objc_v2_prefix_ivar)) {
+                            symbol_name_non_abi_mangled = symbol_name + 1;
+                            symbol_name =
+                                symbol_name + g_objc_v2_prefix_ivar.size();
+                            type = eSymbolTypeObjCIVar;
+                            demangled_is_synthesized = true;
                           }
-                          break;
-
-                        case N_FNAME:
-                          // procedure name (f77 kludge): name,,NO_SECT,0,0
-                          type = eSymbolTypeCompiler;
-                          break;
-
-                        case N_FUN:
-                          // procedure: name,,n_sect,linenumber,address
-                          if (symbol_name) {
-                            type = eSymbolTypeCode;
+                        } else {
+                          if (nlist.n_value != 0)
                             symbol_section = section_info.GetSection(
                                 nlist.n_sect, nlist.n_value);
+                          type = eSymbolTypeData;
+                        }
+                        break;
 
-                            N_FUN_addr_to_sym_idx.insert(
-                                std::make_pair(nlist.n_value, sym_idx));
-                            // We use the current number of symbols in the
-                            // symbol table in lieu of using nlist_idx in case
-                            // we ever start trimming entries out
-                            N_FUN_indexes.push_back(sym_idx);
-                          } else {
-                            type = eSymbolTypeCompiler;
+                      case N_FNAME:
+                        // procedure name (f77 kludge): name,,NO_SECT,0,0
+                        type = eSymbolTypeCompiler;
+                        break;
 
-                            if (!N_FUN_indexes.empty()) {
-                              // Copy the size of the function into the
-                              // original
-                              // STAB entry so we don't have
-                              // to hunt for it later
-                              symtab->SymbolAtIndex(N_FUN_indexes.back())
-                                  ->SetByteSize(nlist.n_value);
-                              N_FUN_indexes.pop_back();
-                              // We don't really need the end function STAB as
-                              // it contains the size which we already placed
-                              // with the original symbol, so don't add it if
-                              // we want a minimal symbol table
-                              add_nlist = false;
-                            }
-                          }
-                          break;
+                      case N_FUN:
+                        // procedure: name,,n_sect,linenumber,address
+                        if (symbol_name) {
+                          type = eSymbolTypeCode;
+                          symbol_section = section_info.GetSection(
+                              nlist.n_sect, nlist.n_value);
 
-                        case N_STSYM:
-                          // static symbol: name,,n_sect,type,address
-                          N_STSYM_addr_to_sym_idx.insert(
+                          N_FUN_addr_to_sym_idx.insert(
                               std::make_pair(nlist.n_value, sym_idx));
-                          symbol_section = section_info.GetSection(
-                              nlist.n_sect, nlist.n_value);
-                          if (symbol_name && symbol_name[0]) {
-                            type = ObjectFile::GetSymbolTypeFromName(
-                                symbol_name + 1, eSymbolTypeData);
-                          }
-                          break;
-
-                        case N_LCSYM:
-                          // .lcomm symbol: name,,n_sect,type,address
-                          symbol_section = section_info.GetSection(
-                              nlist.n_sect, nlist.n_value);
-                          type = eSymbolTypeCommonBlock;
-                          break;
-
-                        case N_BNSYM:
-                          // We use the current number of symbols in the symbol
-                          // table in lieu of using nlist_idx in case we ever
-                          // start trimming entries out Skip these if we want
-                          // minimal symbol tables
-                          add_nlist = false;
-                          break;
-
-                        case N_ENSYM:
-                          // Set the size of the N_BNSYM to the terminating
-                          // index of this N_ENSYM so that we can always skip
-                          // the entire symbol if we need to navigate more
-                          // quickly at the source level when parsing STABS
-                          // Skip these if we want minimal symbol tables
-                          add_nlist = false;
-                          break;
-
-                        case N_OPT:
-                          // emitted with gcc2_compiled and in gcc source
+                          // We use the current number of symbols in the
+                          // symbol table in lieu of using nlist_idx in case
+                          // we ever start trimming entries out
+                          N_FUN_indexes.push_back(sym_idx);
+                        } else {
                           type = eSymbolTypeCompiler;
-                          break;
 
-                        case N_RSYM:
-                          // register sym: name,,NO_SECT,type,register
-                          type = eSymbolTypeVariable;
-                          break;
-
-                        case N_SLINE:
-                          // src line: 0,,n_sect,linenumber,address
-                          symbol_section = section_info.GetSection(
-                              nlist.n_sect, nlist.n_value);
-                          type = eSymbolTypeLineEntry;
-                          break;
-
-                        case N_SSYM:
-                          // structure elt: name,,NO_SECT,type,struct_offset
-                          type = eSymbolTypeVariableType;
-                          break;
-
-                        case N_SO:
-                          // source file name
-                          type = eSymbolTypeSourceFile;
-                          if (symbol_name == NULL) {
+                          if (!N_FUN_indexes.empty()) {
+                            // Copy the size of the function into the
+                            // original
+                            // STAB entry so we don't have
+                            // to hunt for it later
+                            symtab->SymbolAtIndex(N_FUN_indexes.back())
+                                ->SetByteSize(nlist.n_value);
+                            N_FUN_indexes.pop_back();
+                            // We don't really need the end function STAB as
+                            // it contains the size which we already placed
+                            // with the original symbol, so don't add it if
+                            // we want a minimal symbol table
                             add_nlist = false;
-                            if (N_SO_index != UINT32_MAX) {
-                              // Set the size of the N_SO to the terminating
-                              // index of this N_SO so that we can always skip
-                              // the entire N_SO if we need to navigate more
-                              // quickly at the source level when parsing STABS
-                              symbol_ptr = symtab->SymbolAtIndex(N_SO_index);
-                              symbol_ptr->SetByteSize(sym_idx);
-                              symbol_ptr->SetSizeIsSibling(true);
-                            }
-                            N_NSYM_indexes.clear();
-                            N_INCL_indexes.clear();
-                            N_BRAC_indexes.clear();
-                            N_COMM_indexes.clear();
-                            N_FUN_indexes.clear();
-                            N_SO_index = UINT32_MAX;
-                          } else {
-                            // We use the current number of symbols in the
-                            // symbol table in lieu of using nlist_idx in case
-                            // we ever start trimming entries out
-                            const bool N_SO_has_full_path =
-                                symbol_name[0] == '/';
-                            if (N_SO_has_full_path) {
-                              if ((N_SO_index == sym_idx - 1) &&
-                                  ((sym_idx - 1) < num_syms)) {
-                                // We have two consecutive N_SO entries where
-                                // the first contains a directory and the
-                                // second contains a full path.
-                                sym[sym_idx - 1].GetMangled().SetValue(
-                                    ConstString(symbol_name), false);
-                                m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
-                                add_nlist = false;
-                              } else {
-                                // This is the first entry in a N_SO that
-                                // contains a directory or
-                                // a full path to the source file
-                                N_SO_index = sym_idx;
-                              }
-                            } else if ((N_SO_index == sym_idx - 1) &&
-                                       ((sym_idx - 1) < num_syms)) {
-                              // This is usually the second N_SO entry that
-                              // contains just the filename, so here we combine
-                              // it with the first one if we are minimizing the
-                              // symbol table
-                              const char *so_path =
-                                  sym[sym_idx - 1]
-                                      .GetMangled()
-                                      .GetDemangledName(
-                                          lldb::eLanguageTypeUnknown)
-                                      .AsCString();
-                              if (so_path && so_path[0]) {
-                                std::string full_so_path(so_path);
-                                const size_t double_slash_pos =
-                                    full_so_path.find("//");
-                                if (double_slash_pos != std::string::npos) {
-                                  // The linker has been generating bad N_SO
-                                  // entries with doubled up paths
-                                  // in the format "%s%s" where the first
-                                  // string in the DW_AT_comp_dir, and the
-                                  // second is the directory for the source
-                                  // file so you end up with a path that looks
-                                  // like "/tmp/src//tmp/src/"
-                                  FileSpec so_dir(so_path, false);
-                                  if (!FileSystem::Instance().Exists(so_dir)) {
-                                    so_dir.SetFile(
-                                        &full_so_path[double_slash_pos + 1],
-                                        false);
-                                    if (FileSystem::Instance().Exists(so_dir)) {
-                                      // Trim off the incorrect path
-                                      full_so_path.erase(0,
-                                                         double_slash_pos + 1);
-                                    }
-                                  }
-                                }
-                                if (*full_so_path.rbegin() != '/')
-                                  full_so_path += '/';
-                                full_so_path += symbol_name;
-                                sym[sym_idx - 1].GetMangled().SetValue(
-                                    ConstString(full_so_path.c_str()), false);
-                                add_nlist = false;
-                                m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
-                              }
+                          }
+                        }
+                        break;
+
+                      case N_STSYM:
+                        // static symbol: name,,n_sect,type,address
+                        N_STSYM_addr_to_sym_idx.insert(
+                            std::make_pair(nlist.n_value, sym_idx));
+                        symbol_section = section_info.GetSection(nlist.n_sect,
+                                                                 nlist.n_value);
+                        if (symbol_name && symbol_name[0]) {
+                          type = ObjectFile::GetSymbolTypeFromName(
+                              symbol_name + 1, eSymbolTypeData);
+                        }
+                        break;
+
+                      case N_LCSYM:
+                        // .lcomm symbol: name,,n_sect,type,address
+                        symbol_section = section_info.GetSection(nlist.n_sect,
+                                                                 nlist.n_value);
+                        type = eSymbolTypeCommonBlock;
+                        break;
+
+                      case N_BNSYM:
+                        // We use the current number of symbols in the symbol
+                        // table in lieu of using nlist_idx in case we ever
+                        // start trimming entries out Skip these if we want
+                        // minimal symbol tables
+                        add_nlist = false;
+                        break;
+
+                      case N_ENSYM:
+                        // Set the size of the N_BNSYM to the terminating
+                        // index of this N_ENSYM so that we can always skip
+                        // the entire symbol if we need to navigate more
+                        // quickly at the source level when parsing STABS
+                        // Skip these if we want minimal symbol tables
+                        add_nlist = false;
+                        break;
+
+                      case N_OPT:
+                        // emitted with gcc2_compiled and in gcc source
+                        type = eSymbolTypeCompiler;
+                        break;
+
+                      case N_RSYM:
+                        // register sym: name,,NO_SECT,type,register
+                        type = eSymbolTypeVariable;
+                        break;
+
+                      case N_SLINE:
+                        // src line: 0,,n_sect,linenumber,address
+                        symbol_section = section_info.GetSection(nlist.n_sect,
+                                                                 nlist.n_value);
+                        type = eSymbolTypeLineEntry;
+                        break;
+
+                      case N_SSYM:
+                        // structure elt: name,,NO_SECT,type,struct_offset
+                        type = eSymbolTypeVariableType;
+                        break;
+
+                      case N_SO:
+                        // source file name
+                        type = eSymbolTypeSourceFile;
+                        if (symbol_name == NULL) {
+                          add_nlist = false;
+                          if (N_SO_index != UINT32_MAX) {
+                            // Set the size of the N_SO to the terminating
+                            // index of this N_SO so that we can always skip
+                            // the entire N_SO if we need to navigate more
+                            // quickly at the source level when parsing STABS
+                            symbol_ptr = symtab->SymbolAtIndex(N_SO_index);
+                            symbol_ptr->SetByteSize(sym_idx);
+                            symbol_ptr->SetSizeIsSibling(true);
+                          }
+                          N_NSYM_indexes.clear();
+                          N_INCL_indexes.clear();
+                          N_BRAC_indexes.clear();
+                          N_COMM_indexes.clear();
+                          N_FUN_indexes.clear();
+                          N_SO_index = UINT32_MAX;
+                        } else {
+                          // We use the current number of symbols in the
+                          // symbol table in lieu of using nlist_idx in case
+                          // we ever start trimming entries out
+                          const bool N_SO_has_full_path = symbol_name[0] == '/';
+                          if (N_SO_has_full_path) {
+                            if ((N_SO_index == sym_idx - 1) &&
+                                ((sym_idx - 1) < num_syms)) {
+                              // We have two consecutive N_SO entries where
+                              // the first contains a directory and the
+                              // second contains a full path.
+                              sym[sym_idx - 1].GetMangled().SetValue(
+                                  ConstString(symbol_name), false);
+                              m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
+                              add_nlist = false;
                             } else {
-                              // This could be a relative path to a N_SO
+                              // This is the first entry in a N_SO that
+                              // contains a directory or
+                              // a full path to the source file
                               N_SO_index = sym_idx;
                             }
+                          } else if ((N_SO_index == sym_idx - 1) &&
+                                     ((sym_idx - 1) < num_syms)) {
+                            // This is usually the second N_SO entry that
+                            // contains just the filename, so here we combine
+                            // it with the first one if we are minimizing the
+                            // symbol table
+                            const char *so_path =
+                                sym[sym_idx - 1]
+                                    .GetMangled()
+                                    .GetDemangledName(
+                                        lldb::eLanguageTypeUnknown)
+                                    .AsCString();
+                            if (so_path && so_path[0]) {
+                              std::string full_so_path(so_path);
+                              const size_t double_slash_pos =
+                                  full_so_path.find("//");
+                              if (double_slash_pos != std::string::npos) {
+                                // The linker has been generating bad N_SO
+                                // entries with doubled up paths
+                                // in the format "%s%s" where the first
+                                // string in the DW_AT_comp_dir, and the
+                                // second is the directory for the source
+                                // file so you end up with a path that looks
+                                // like "/tmp/src//tmp/src/"
+                                FileSpec so_dir(so_path);
+                                if (!FileSystem::Instance().Exists(so_dir)) {
+                                  so_dir.SetFile(
+                                      &full_so_path[double_slash_pos + 1],
+                                      FileSpec::Style::native);
+                                  if (FileSystem::Instance().Exists(so_dir)) {
+                                    // Trim off the incorrect path
+                                    full_so_path.erase(0, double_slash_pos + 1);
+                                  }
+                                }
+                              }
+                              if (*full_so_path.rbegin() != '/')
+                                full_so_path += '/';
+                              full_so_path += symbol_name;
+                              sym[sym_idx - 1].GetMangled().SetValue(
+                                  ConstString(full_so_path.c_str()), false);
+                              add_nlist = false;
+                              m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
+                            }
+                          } else {
+                            // This could be a relative path to a N_SO
+                            N_SO_index = sym_idx;
                           }
-                          break;
+                        }
+                        break;
 
-                        case N_OSO:
-                          // object file name: name,,0,0,st_mtime
-                          type = eSymbolTypeObjectFile;
-                          break;
+                      case N_OSO:
+                        // object file name: name,,0,0,st_mtime
+                        type = eSymbolTypeObjectFile;
+                        break;
 
-                        case N_LSYM:
-                          // local sym: name,,NO_SECT,type,offset
-                          type = eSymbolTypeLocal;
-                          break;
+                      case N_LSYM:
+                        // local sym: name,,NO_SECT,type,offset
+                        type = eSymbolTypeLocal;
+                        break;
 
-                        // INCL scopes
-                        case N_BINCL:
-                          // include file beginning: name,,NO_SECT,0,sum We use
-                          // the current number of symbols in the symbol table
-                          // in lieu of using nlist_idx in case we ever start
-                          // trimming entries out
-                          N_INCL_indexes.push_back(sym_idx);
-                          type = eSymbolTypeScopeBegin;
-                          break;
+                      // INCL scopes
+                      case N_BINCL:
+                        // include file beginning: name,,NO_SECT,0,sum We use
+                        // the current number of symbols in the symbol table
+                        // in lieu of using nlist_idx in case we ever start
+                        // trimming entries out
+                        N_INCL_indexes.push_back(sym_idx);
+                        type = eSymbolTypeScopeBegin;
+                        break;
 
-                        case N_EINCL:
-                          // include file end: name,,NO_SECT,0,0
-                          // Set the size of the N_BINCL to the terminating
-                          // index of this N_EINCL so that we can always skip
-                          // the entire symbol if we need to navigate more
-                          // quickly at the source level when parsing STABS
-                          if (!N_INCL_indexes.empty()) {
-                            symbol_ptr =
-                                symtab->SymbolAtIndex(N_INCL_indexes.back());
-                            symbol_ptr->SetByteSize(sym_idx + 1);
-                            symbol_ptr->SetSizeIsSibling(true);
-                            N_INCL_indexes.pop_back();
-                          }
-                          type = eSymbolTypeScopeEnd;
-                          break;
+                      case N_EINCL:
+                        // include file end: name,,NO_SECT,0,0
+                        // Set the size of the N_BINCL to the terminating
+                        // index of this N_EINCL so that we can always skip
+                        // the entire symbol if we need to navigate more
+                        // quickly at the source level when parsing STABS
+                        if (!N_INCL_indexes.empty()) {
+                          symbol_ptr =
+                              symtab->SymbolAtIndex(N_INCL_indexes.back());
+                          symbol_ptr->SetByteSize(sym_idx + 1);
+                          symbol_ptr->SetSizeIsSibling(true);
+                          N_INCL_indexes.pop_back();
+                        }
+                        type = eSymbolTypeScopeEnd;
+                        break;
 
-                        case N_SOL:
-                          // #included file name: name,,n_sect,0,address
-                          type = eSymbolTypeHeaderFile;
+                      case N_SOL:
+                        // #included file name: name,,n_sect,0,address
+                        type = eSymbolTypeHeaderFile;
 
-                          // We currently don't use the header files on darwin
+                        // We currently don't use the header files on darwin
+                        add_nlist = false;
+                        break;
+
+                      case N_PARAMS:
+                        // compiler parameters: name,,NO_SECT,0,0
+                        type = eSymbolTypeCompiler;
+                        break;
+
+                      case N_VERSION:
+                        // compiler version: name,,NO_SECT,0,0
+                        type = eSymbolTypeCompiler;
+                        break;
+
+                      case N_OLEVEL:
+                        // compiler -O level: name,,NO_SECT,0,0
+                        type = eSymbolTypeCompiler;
+                        break;
+
+                      case N_PSYM:
+                        // parameter: name,,NO_SECT,type,offset
+                        type = eSymbolTypeVariable;
+                        break;
+
+                      case N_ENTRY:
+                        // alternate entry: name,,n_sect,linenumber,address
+                        symbol_section = section_info.GetSection(nlist.n_sect,
+                                                                 nlist.n_value);
+                        type = eSymbolTypeLineEntry;
+                        break;
+
+                      // Left and Right Braces
+                      case N_LBRAC:
+                        // left bracket: 0,,NO_SECT,nesting level,address We
+                        // use the current number of symbols in the symbol
+                        // table in lieu of using nlist_idx in case we ever
+                        // start trimming entries out
+                        symbol_section = section_info.GetSection(nlist.n_sect,
+                                                                 nlist.n_value);
+                        N_BRAC_indexes.push_back(sym_idx);
+                        type = eSymbolTypeScopeBegin;
+                        break;
+
+                      case N_RBRAC:
+                        // right bracket: 0,,NO_SECT,nesting level,address
+                        // Set the size of the N_LBRAC to the terminating
+                        // index of this N_RBRAC so that we can always skip
+                        // the entire symbol if we need to navigate more
+                        // quickly at the source level when parsing STABS
+                        symbol_section = section_info.GetSection(nlist.n_sect,
+                                                                 nlist.n_value);
+                        if (!N_BRAC_indexes.empty()) {
+                          symbol_ptr =
+                              symtab->SymbolAtIndex(N_BRAC_indexes.back());
+                          symbol_ptr->SetByteSize(sym_idx + 1);
+                          symbol_ptr->SetSizeIsSibling(true);
+                          N_BRAC_indexes.pop_back();
+                        }
+                        type = eSymbolTypeScopeEnd;
+                        break;
+
+                      case N_EXCL:
+                        // deleted include file: name,,NO_SECT,0,sum
+                        type = eSymbolTypeHeaderFile;
+                        break;
+
+                      // COMM scopes
+                      case N_BCOMM:
+                        // begin common: name,,NO_SECT,0,0
+                        // We use the current number of symbols in the symbol
+                        // table in lieu of using nlist_idx in case we ever
+                        // start trimming entries out
+                        type = eSymbolTypeScopeBegin;
+                        N_COMM_indexes.push_back(sym_idx);
+                        break;
+
+                      case N_ECOML:
+                        // end common (local name): 0,,n_sect,0,address
+                        symbol_section = section_info.GetSection(nlist.n_sect,
+                                                                 nlist.n_value);
+                        // Fall through
+
+                      case N_ECOMM:
+                        // end common: name,,n_sect,0,0
+                        // Set the size of the N_BCOMM to the terminating
+                        // index of this N_ECOMM/N_ECOML so that we can
+                        // always skip the entire symbol if we need to
+                        // navigate more quickly at the source level when
+                        // parsing STABS
+                        if (!N_COMM_indexes.empty()) {
+                          symbol_ptr =
+                              symtab->SymbolAtIndex(N_COMM_indexes.back());
+                          symbol_ptr->SetByteSize(sym_idx + 1);
+                          symbol_ptr->SetSizeIsSibling(true);
+                          N_COMM_indexes.pop_back();
+                        }
+                        type = eSymbolTypeScopeEnd;
+                        break;
+
+                      case N_LENG:
+                        // second stab entry with length information
+                        type = eSymbolTypeAdditional;
+                        break;
+
+                      default:
+                        break;
+                      }
+                    } else {
+                      // uint8_t n_pext    = N_PEXT & nlist.n_type;
+                      uint8_t n_type = N_TYPE & nlist.n_type;
+                      sym[sym_idx].SetExternal((N_EXT & nlist.n_type) != 0);
+
+                      switch (n_type) {
+                      case N_INDR: {
+                        const char *reexport_name_cstr =
+                            strtab_data.PeekCStr(nlist.n_value);
+                        if (reexport_name_cstr && reexport_name_cstr[0]) {
+                          type = eSymbolTypeReExported;
+                          ConstString reexport_name(
+                              reexport_name_cstr +
+                              ((reexport_name_cstr[0] == '_') ? 1 : 0));
+                          sym[sym_idx].SetReExportedSymbolName(reexport_name);
+                          set_value = false;
+                          reexport_shlib_needs_fixup[sym_idx] = reexport_name;
+                          indirect_symbol_names.insert(ConstString(
+                              symbol_name + ((symbol_name[0] == '_') ? 1 : 0)));
+                        } else
+                          type = eSymbolTypeUndefined;
+                      } break;
+
+                      case N_UNDF:
+                        if (symbol_name && symbol_name[0]) {
+                          ConstString undefined_name(
+                              symbol_name + ((symbol_name[0] == '_') ? 1 : 0));
+                          undefined_name_to_desc[undefined_name] = nlist.n_desc;
+                        }
+                      // Fall through
+                      case N_PBUD:
+                        type = eSymbolTypeUndefined;
+                        break;
+
+                      case N_ABS:
+                        type = eSymbolTypeAbsolute;
+                        break;
+
+                      case N_SECT: {
+                        symbol_section = section_info.GetSection(nlist.n_sect,
+                                                                 nlist.n_value);
+
+                        if (symbol_section == NULL) {
+                          // TODO: warn about this?
                           add_nlist = false;
                           break;
-
-                        case N_PARAMS:
-                          // compiler parameters: name,,NO_SECT,0,0
-                          type = eSymbolTypeCompiler;
-                          break;
-
-                        case N_VERSION:
-                          // compiler version: name,,NO_SECT,0,0
-                          type = eSymbolTypeCompiler;
-                          break;
-
-                        case N_OLEVEL:
-                          // compiler -O level: name,,NO_SECT,0,0
-                          type = eSymbolTypeCompiler;
-                          break;
-
-                        case N_PSYM:
-                          // parameter: name,,NO_SECT,type,offset
-                          type = eSymbolTypeVariable;
-                          break;
-
-                        case N_ENTRY:
-                          // alternate entry: name,,n_sect,linenumber,address
-                          symbol_section = section_info.GetSection(
-                              nlist.n_sect, nlist.n_value);
-                          type = eSymbolTypeLineEntry;
-                          break;
-
-                        // Left and Right Braces
-                        case N_LBRAC:
-                          // left bracket: 0,,NO_SECT,nesting level,address We
-                          // use the current number of symbols in the symbol
-                          // table in lieu of using nlist_idx in case we ever
-                          // start trimming entries out
-                          symbol_section = section_info.GetSection(
-                              nlist.n_sect, nlist.n_value);
-                          N_BRAC_indexes.push_back(sym_idx);
-                          type = eSymbolTypeScopeBegin;
-                          break;
-
-                        case N_RBRAC:
-                          // right bracket: 0,,NO_SECT,nesting level,address
-                          // Set the size of the N_LBRAC to the terminating
-                          // index of this N_RBRAC so that we can always skip
-                          // the entire symbol if we need to navigate more
-                          // quickly at the source level when parsing STABS
-                          symbol_section = section_info.GetSection(
-                              nlist.n_sect, nlist.n_value);
-                          if (!N_BRAC_indexes.empty()) {
-                            symbol_ptr =
-                                symtab->SymbolAtIndex(N_BRAC_indexes.back());
-                            symbol_ptr->SetByteSize(sym_idx + 1);
-                            symbol_ptr->SetSizeIsSibling(true);
-                            N_BRAC_indexes.pop_back();
-                          }
-                          type = eSymbolTypeScopeEnd;
-                          break;
-
-                        case N_EXCL:
-                          // deleted include file: name,,NO_SECT,0,sum
-                          type = eSymbolTypeHeaderFile;
-                          break;
-
-                        // COMM scopes
-                        case N_BCOMM:
-                          // begin common: name,,NO_SECT,0,0
-                          // We use the current number of symbols in the symbol
-                          // table in lieu of using nlist_idx in case we ever
-                          // start trimming entries out
-                          type = eSymbolTypeScopeBegin;
-                          N_COMM_indexes.push_back(sym_idx);
-                          break;
-
-                        case N_ECOML:
-                          // end common (local name): 0,,n_sect,0,address
-                          symbol_section = section_info.GetSection(
-                              nlist.n_sect, nlist.n_value);
-                        // Fall through
-
-                        case N_ECOMM:
-                          // end common: name,,n_sect,0,0
-                          // Set the size of the N_BCOMM to the terminating
-                          // index of this N_ECOMM/N_ECOML so that we can
-                          // always skip the entire symbol if we need to
-                          // navigate more quickly at the source level when
-                          // parsing STABS
-                          if (!N_COMM_indexes.empty()) {
-                            symbol_ptr =
-                                symtab->SymbolAtIndex(N_COMM_indexes.back());
-                            symbol_ptr->SetByteSize(sym_idx + 1);
-                            symbol_ptr->SetSizeIsSibling(true);
-                            N_COMM_indexes.pop_back();
-                          }
-                          type = eSymbolTypeScopeEnd;
-                          break;
-
-                        case N_LENG:
-                          // second stab entry with length information
-                          type = eSymbolTypeAdditional;
-                          break;
-
-                        default:
-                          break;
                         }
-                      } else {
-                        // uint8_t n_pext    = N_PEXT & nlist.n_type;
-                        uint8_t n_type = N_TYPE & nlist.n_type;
-                        sym[sym_idx].SetExternal((N_EXT & nlist.n_type) != 0);
 
-                        switch (n_type) {
-                        case N_INDR: {
-                          const char *reexport_name_cstr =
-                              strtab_data.PeekCStr(nlist.n_value);
-                          if (reexport_name_cstr && reexport_name_cstr[0]) {
-                            type = eSymbolTypeReExported;
-                            ConstString reexport_name(
-                                reexport_name_cstr +
-                                ((reexport_name_cstr[0] == '_') ? 1 : 0));
-                            sym[sym_idx].SetReExportedSymbolName(reexport_name);
-                            set_value = false;
-                            reexport_shlib_needs_fixup[sym_idx] = reexport_name;
-                            indirect_symbol_names.insert(
-                                ConstString(symbol_name +
-                                            ((symbol_name[0] == '_') ? 1 : 0)));
-                          } else
-                            type = eSymbolTypeUndefined;
-                        } break;
+                        if (TEXT_eh_frame_sectID == nlist.n_sect) {
+                          type = eSymbolTypeException;
+                        } else {
+                          uint32_t section_type =
+                              symbol_section->Get() & SECTION_TYPE;
 
-                        case N_UNDF:
-                          if (symbol_name && symbol_name[0]) {
-                            ConstString undefined_name(
-                                symbol_name +
-                                ((symbol_name[0] == '_') ? 1 : 0));
-                            undefined_name_to_desc[undefined_name] =
-                                nlist.n_desc;
-                          }
-                        // Fall through
-                        case N_PBUD:
-                          type = eSymbolTypeUndefined;
-                          break;
-
-                        case N_ABS:
-                          type = eSymbolTypeAbsolute;
-                          break;
-
-                        case N_SECT: {
-                          symbol_section = section_info.GetSection(
-                              nlist.n_sect, nlist.n_value);
-
-                          if (symbol_section == NULL) {
-                            // TODO: warn about this?
-                            add_nlist = false;
+                          switch (section_type) {
+                          case S_CSTRING_LITERALS:
+                            type = eSymbolTypeData;
+                            break; // section with only literal C strings
+                          case S_4BYTE_LITERALS:
+                            type = eSymbolTypeData;
+                            break; // section with only 4 byte literals
+                          case S_8BYTE_LITERALS:
+                            type = eSymbolTypeData;
+                            break; // section with only 8 byte literals
+                          case S_LITERAL_POINTERS:
+                            type = eSymbolTypeTrampoline;
+                            break; // section with only pointers to literals
+                          case S_NON_LAZY_SYMBOL_POINTERS:
+                            type = eSymbolTypeTrampoline;
+                            break; // section with only non-lazy symbol
+                                   // pointers
+                          case S_LAZY_SYMBOL_POINTERS:
+                            type = eSymbolTypeTrampoline;
+                            break; // section with only lazy symbol pointers
+                          case S_SYMBOL_STUBS:
+                            type = eSymbolTypeTrampoline;
+                            break; // section with only symbol stubs, byte
+                                   // size of stub in the reserved2 field
+                          case S_MOD_INIT_FUNC_POINTERS:
+                            type = eSymbolTypeCode;
+                            break; // section with only function pointers for
+                                   // initialization
+                          case S_MOD_TERM_FUNC_POINTERS:
+                            type = eSymbolTypeCode;
+                            break; // section with only function pointers for
+                                   // termination
+                          case S_INTERPOSING:
+                            type = eSymbolTypeTrampoline;
+                            break; // section with only pairs of function
+                                   // pointers for interposing
+                          case S_16BYTE_LITERALS:
+                            type = eSymbolTypeData;
+                            break; // section with only 16 byte literals
+                          case S_DTRACE_DOF:
+                            type = eSymbolTypeInstrumentation;
                             break;
-                          }
-
-                          if (TEXT_eh_frame_sectID == nlist.n_sect) {
-                            type = eSymbolTypeException;
-                          } else {
-                            uint32_t section_type =
-                                symbol_section->Get() & SECTION_TYPE;
-
-                            switch (section_type) {
-                            case S_CSTRING_LITERALS:
-                              type = eSymbolTypeData;
-                              break; // section with only literal C strings
-                            case S_4BYTE_LITERALS:
-                              type = eSymbolTypeData;
-                              break; // section with only 4 byte literals
-                            case S_8BYTE_LITERALS:
-                              type = eSymbolTypeData;
-                              break; // section with only 8 byte literals
-                            case S_LITERAL_POINTERS:
-                              type = eSymbolTypeTrampoline;
-                              break; // section with only pointers to literals
-                            case S_NON_LAZY_SYMBOL_POINTERS:
-                              type = eSymbolTypeTrampoline;
-                              break; // section with only non-lazy symbol
-                                     // pointers
-                            case S_LAZY_SYMBOL_POINTERS:
-                              type = eSymbolTypeTrampoline;
-                              break; // section with only lazy symbol pointers
-                            case S_SYMBOL_STUBS:
-                              type = eSymbolTypeTrampoline;
-                              break; // section with only symbol stubs, byte
-                                     // size of stub in the reserved2 field
-                            case S_MOD_INIT_FUNC_POINTERS:
+                          case S_LAZY_DYLIB_SYMBOL_POINTERS:
+                            type = eSymbolTypeTrampoline;
+                            break;
+                          default:
+                            switch (symbol_section->GetType()) {
+                            case lldb::eSectionTypeCode:
                               type = eSymbolTypeCode;
-                              break; // section with only function pointers for
-                                     // initialization
-                            case S_MOD_TERM_FUNC_POINTERS:
-                              type = eSymbolTypeCode;
-                              break; // section with only function pointers for
-                                     // termination
-                            case S_INTERPOSING:
-                              type = eSymbolTypeTrampoline;
-                              break; // section with only pairs of function
-                                     // pointers for interposing
-                            case S_16BYTE_LITERALS:
-                              type = eSymbolTypeData;
-                              break; // section with only 16 byte literals
-                            case S_DTRACE_DOF:
-                              type = eSymbolTypeInstrumentation;
                               break;
-                            case S_LAZY_DYLIB_SYMBOL_POINTERS:
-                              type = eSymbolTypeTrampoline;
-                              break;
-                            default:
-                              switch (symbol_section->GetType()) {
-                              case lldb::eSectionTypeCode:
-                                type = eSymbolTypeCode;
-                                break;
-                              case eSectionTypeData:
-                              case eSectionTypeDataCString: // Inlined C string
-                                                            // data
-                              case eSectionTypeDataCStringPointers: // Pointers
-                                                                    // to C
-                                                                    // string
-                                                                    // data
-                              case eSectionTypeDataSymbolAddress: // Address of
+                            case eSectionTypeData:
+                            case eSectionTypeDataCString: // Inlined C string
+                                                          // data
+                            case eSectionTypeDataCStringPointers: // Pointers
+                                                                  // to C
+                                                                  // string
+                                                                  // data
+                            case eSectionTypeDataSymbolAddress:   // Address of
                                                                   // a symbol in
                                                                   // the symbol
                                                                   // table
-                              case eSectionTypeData4:
-                              case eSectionTypeData8:
-                              case eSectionTypeData16:
-                                type = eSymbolTypeData;
-                                break;
-                              default:
-                                break;
-                              }
+                            case eSectionTypeData4:
+                            case eSectionTypeData8:
+                            case eSectionTypeData16:
+                              type = eSymbolTypeData;
+                              break;
+                            default:
                               break;
                             }
+                            break;
+                          }
 
-                            if (type == eSymbolTypeInvalid) {
-                              const char *symbol_sect_name =
-                                  symbol_section->GetName().AsCString();
-                              if (symbol_section->IsDescendant(
-                                      text_section_sp.get())) {
-                                if (symbol_section->IsClear(
-                                        S_ATTR_PURE_INSTRUCTIONS |
-                                        S_ATTR_SELF_MODIFYING_CODE |
-                                        S_ATTR_SOME_INSTRUCTIONS))
-                                  type = eSymbolTypeData;
-                                else
-                                  type = eSymbolTypeCode;
-                              } else if (symbol_section->IsDescendant(
-                                             data_section_sp.get()) ||
-                                         symbol_section->IsDescendant(
-                                             data_dirty_section_sp.get()) ||
-                                         symbol_section->IsDescendant(
-                                             data_const_section_sp.get())) {
-                                if (symbol_sect_name &&
-                                    ::strstr(symbol_sect_name, "__objc") ==
-                                        symbol_sect_name) {
-                                  type = eSymbolTypeRuntime;
+                          if (type == eSymbolTypeInvalid) {
+                            const char *symbol_sect_name =
+                                symbol_section->GetName().AsCString();
+                            if (symbol_section->IsDescendant(
+                                    text_section_sp.get())) {
+                              if (symbol_section->IsClear(
+                                      S_ATTR_PURE_INSTRUCTIONS |
+                                      S_ATTR_SELF_MODIFYING_CODE |
+                                      S_ATTR_SOME_INSTRUCTIONS))
+                                type = eSymbolTypeData;
+                              else
+                                type = eSymbolTypeCode;
+                            } else if (symbol_section->IsDescendant(
+                                           data_section_sp.get()) ||
+                                       symbol_section->IsDescendant(
+                                           data_dirty_section_sp.get()) ||
+                                       symbol_section->IsDescendant(
+                                           data_const_section_sp.get())) {
+                              if (symbol_sect_name &&
+                                  ::strstr(symbol_sect_name, "__objc") ==
+                                      symbol_sect_name) {
+                                type = eSymbolTypeRuntime;
 
-                                  if (symbol_name) {
-                                    llvm::StringRef symbol_name_ref(
-                                        symbol_name);
-                                    if (symbol_name_ref.startswith("_OBJC_")) {
-                                      static const llvm::StringRef
-                                          g_objc_v2_prefix_class(
-                                              "_OBJC_CLASS_$_");
-                                      static const llvm::StringRef
-                                          g_objc_v2_prefix_metaclass(
-                                              "_OBJC_METACLASS_$_");
-                                      static const llvm::StringRef
-                                          g_objc_v2_prefix_ivar(
-                                              "_OBJC_IVAR_$_");
-                                      if (symbol_name_ref.startswith(
-                                              g_objc_v2_prefix_class)) {
-                                        symbol_name_non_abi_mangled =
-                                            symbol_name + 1;
-                                        symbol_name =
-                                            symbol_name +
-                                            g_objc_v2_prefix_class.size();
-                                        type = eSymbolTypeObjCClass;
-                                        demangled_is_synthesized = true;
-                                      } else if (
-                                          symbol_name_ref.startswith(
-                                              g_objc_v2_prefix_metaclass)) {
-                                        symbol_name_non_abi_mangled =
-                                            symbol_name + 1;
-                                        symbol_name =
-                                            symbol_name +
-                                            g_objc_v2_prefix_metaclass.size();
-                                        type = eSymbolTypeObjCMetaClass;
-                                        demangled_is_synthesized = true;
-                                      } else if (symbol_name_ref.startswith(
-                                                     g_objc_v2_prefix_ivar)) {
-                                        symbol_name_non_abi_mangled =
-                                            symbol_name + 1;
-                                        symbol_name =
-                                            symbol_name +
-                                            g_objc_v2_prefix_ivar.size();
-                                        type = eSymbolTypeObjCIVar;
-                                        demangled_is_synthesized = true;
-                                      }
+                                if (symbol_name) {
+                                  llvm::StringRef symbol_name_ref(symbol_name);
+                                  if (symbol_name_ref.startswith("_OBJC_")) {
+                                    llvm::StringRef
+                                        g_objc_v2_prefix_class(
+                                            "_OBJC_CLASS_$_");
+                                    llvm::StringRef
+                                        g_objc_v2_prefix_metaclass(
+                                            "_OBJC_METACLASS_$_");
+                                    llvm::StringRef
+                                        g_objc_v2_prefix_ivar("_OBJC_IVAR_$_");
+                                    if (symbol_name_ref.startswith(
+                                            g_objc_v2_prefix_class)) {
+                                      symbol_name_non_abi_mangled =
+                                          symbol_name + 1;
+                                      symbol_name =
+                                          symbol_name +
+                                          g_objc_v2_prefix_class.size();
+                                      type = eSymbolTypeObjCClass;
+                                      demangled_is_synthesized = true;
+                                    } else if (
+                                        symbol_name_ref.startswith(
+                                            g_objc_v2_prefix_metaclass)) {
+                                      symbol_name_non_abi_mangled =
+                                          symbol_name + 1;
+                                      symbol_name =
+                                          symbol_name +
+                                          g_objc_v2_prefix_metaclass.size();
+                                      type = eSymbolTypeObjCMetaClass;
+                                      demangled_is_synthesized = true;
+                                    } else if (symbol_name_ref.startswith(
+                                                   g_objc_v2_prefix_ivar)) {
+                                      symbol_name_non_abi_mangled =
+                                          symbol_name + 1;
+                                      symbol_name =
+                                          symbol_name +
+                                          g_objc_v2_prefix_ivar.size();
+                                      type = eSymbolTypeObjCIVar;
+                                      demangled_is_synthesized = true;
                                     }
                                   }
-                                } else if (symbol_sect_name &&
-                                           ::strstr(symbol_sect_name,
-                                                    "__gcc_except_tab") ==
-                                               symbol_sect_name) {
-                                  type = eSymbolTypeException;
-                                } else {
-                                  type = eSymbolTypeData;
                                 }
                               } else if (symbol_sect_name &&
                                          ::strstr(symbol_sect_name,
-                                                  "__IMPORT") ==
+                                                  "__gcc_except_tab") ==
                                              symbol_sect_name) {
-                                type = eSymbolTypeTrampoline;
-                              } else if (symbol_section->IsDescendant(
-                                             objc_section_sp.get())) {
-                                type = eSymbolTypeRuntime;
-                                if (symbol_name && symbol_name[0] == '.') {
-                                  llvm::StringRef symbol_name_ref(symbol_name);
-                                  static const llvm::StringRef
-                                      g_objc_v1_prefix_class(
-                                          ".objc_class_name_");
-                                  if (symbol_name_ref.startswith(
-                                          g_objc_v1_prefix_class)) {
-                                    symbol_name_non_abi_mangled = symbol_name;
-                                    symbol_name = symbol_name +
-                                                  g_objc_v1_prefix_class.size();
-                                    type = eSymbolTypeObjCClass;
-                                    demangled_is_synthesized = true;
-                                  }
-                                }
-                              }
-                            }
-                          }
-                        } break;
-                        }
-                      }
-
-                      if (add_nlist) {
-                        uint64_t symbol_value = nlist.n_value;
-                        if (symbol_name_non_abi_mangled) {
-                          sym[sym_idx].GetMangled().SetMangledName(
-                              ConstString(symbol_name_non_abi_mangled));
-                          sym[sym_idx].GetMangled().SetDemangledName(
-                              ConstString(symbol_name));
-                        } else {
-                          bool symbol_name_is_mangled = false;
-
-                          if (symbol_name && symbol_name[0] == '_') {
-                            symbol_name_is_mangled = symbol_name[1] == '_';
-                            symbol_name++; // Skip the leading underscore
-                          }
-
-                          if (symbol_name) {
-                            ConstString const_symbol_name(symbol_name);
-                            sym[sym_idx].GetMangled().SetValue(
-                                const_symbol_name, symbol_name_is_mangled);
-                            if (is_gsym && is_debug) {
-                              const char *gsym_name =
-                                  sym[sym_idx]
-                                      .GetMangled()
-                                      .GetName(lldb::eLanguageTypeUnknown,
-                                               Mangled::ePreferMangled)
-                                      .GetCString();
-                              if (gsym_name)
-                                N_GSYM_name_to_sym_idx[gsym_name] = sym_idx;
-                            }
-                          }
-                        }
-                        if (symbol_section) {
-                          const addr_t section_file_addr =
-                              symbol_section->GetFileAddress();
-                          if (symbol_byte_size == 0 &&
-                              function_starts_count > 0) {
-                            addr_t symbol_lookup_file_addr = nlist.n_value;
-                            // Do an exact address match for non-ARM addresses,
-                            // else get the closest since the symbol might be a
-                            // thumb symbol which has an address with bit zero
-                            // set
-                            FunctionStarts::Entry *func_start_entry =
-                                function_starts.FindEntry(
-                                    symbol_lookup_file_addr, !is_arm);
-                            if (is_arm && func_start_entry) {
-                              // Verify that the function start address is the
-                              // symbol address (ARM) or the symbol address + 1
-                              // (thumb)
-                              if (func_start_entry->addr !=
-                                      symbol_lookup_file_addr &&
-                                  func_start_entry->addr !=
-                                      (symbol_lookup_file_addr + 1)) {
-                                // Not the right entry, NULL it out...
-                                func_start_entry = NULL;
-                              }
-                            }
-                            if (func_start_entry) {
-                              func_start_entry->data = true;
-
-                              addr_t symbol_file_addr = func_start_entry->addr;
-                              uint32_t symbol_flags = 0;
-                              if (is_arm) {
-                                if (symbol_file_addr & 1)
-                                  symbol_flags =
-                                      MACHO_NLIST_ARM_SYMBOL_IS_THUMB;
-                                symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
-                              }
-
-                              const FunctionStarts::Entry
-                                  *next_func_start_entry =
-                                      function_starts.FindNextEntry(
-                                          func_start_entry);
-                              const addr_t section_end_file_addr =
-                                  section_file_addr +
-                                  symbol_section->GetByteSize();
-                              if (next_func_start_entry) {
-                                addr_t next_symbol_file_addr =
-                                    next_func_start_entry->addr;
-                                // Be sure the clear the Thumb address bit when
-                                // we calculate the size from the current and
-                                // next address
-                                if (is_arm)
-                                  next_symbol_file_addr &=
-                                      THUMB_ADDRESS_BIT_MASK;
-                                symbol_byte_size = std::min<lldb::addr_t>(
-                                    next_symbol_file_addr - symbol_file_addr,
-                                    section_end_file_addr - symbol_file_addr);
+                                type = eSymbolTypeException;
                               } else {
-                                symbol_byte_size =
-                                    section_end_file_addr - symbol_file_addr;
+                                type = eSymbolTypeData;
                               }
-                            }
-                          }
-                          symbol_value -= section_file_addr;
-                        }
-
-                        if (is_debug == false) {
-                          if (type == eSymbolTypeCode) {
-                            // See if we can find a N_FUN entry for any code
-                            // symbols. If we do find a match, and the name
-                            // matches, then we can merge the two into just the
-                            // function symbol to avoid duplicate entries in
-                            // the symbol table
-                            std::pair<ValueToSymbolIndexMap::const_iterator,
-                                      ValueToSymbolIndexMap::const_iterator>
-                                range;
-                            range = N_FUN_addr_to_sym_idx.equal_range(
-                                nlist.n_value);
-                            if (range.first != range.second) {
-                              bool found_it = false;
-                              for (ValueToSymbolIndexMap::const_iterator pos =
-                                       range.first;
-                                   pos != range.second; ++pos) {
-                                if (sym[sym_idx].GetMangled().GetName(
-                                        lldb::eLanguageTypeUnknown,
-                                        Mangled::ePreferMangled) ==
-                                    sym[pos->second].GetMangled().GetName(
-                                        lldb::eLanguageTypeUnknown,
-                                        Mangled::ePreferMangled)) {
-                                  m_nlist_idx_to_sym_idx[nlist_idx] =
-                                      pos->second;
-                                  // We just need the flags from the linker
-                                  // symbol, so put these flags
-                                  // into the N_FUN flags to avoid duplicate
-                                  // symbols in the symbol table
-                                  sym[pos->second].SetExternal(
-                                      sym[sym_idx].IsExternal());
-                                  sym[pos->second].SetFlags(nlist.n_type << 16 |
-                                                            nlist.n_desc);
-                                  if (resolver_addresses.find(nlist.n_value) !=
-                                      resolver_addresses.end())
-                                    sym[pos->second].SetType(
-                                        eSymbolTypeResolver);
-                                  sym[sym_idx].Clear();
-                                  found_it = true;
-                                  break;
-                                }
-                              }
-                              if (found_it)
-                                continue;
-                            } else {
-                              if (resolver_addresses.find(nlist.n_value) !=
-                                  resolver_addresses.end())
-                                type = eSymbolTypeResolver;
-                            }
-                          } else if (type == eSymbolTypeData ||
-                                     type == eSymbolTypeObjCClass ||
-                                     type == eSymbolTypeObjCMetaClass ||
-                                     type == eSymbolTypeObjCIVar) {
-                            // See if we can find a N_STSYM entry for any data
-                            // symbols. If we do find a match, and the name
-                            // matches, then we can merge the two into just the
-                            // Static symbol to avoid duplicate entries in the
-                            // symbol table
-                            std::pair<ValueToSymbolIndexMap::const_iterator,
-                                      ValueToSymbolIndexMap::const_iterator>
-                                range;
-                            range = N_STSYM_addr_to_sym_idx.equal_range(
-                                nlist.n_value);
-                            if (range.first != range.second) {
-                              bool found_it = false;
-                              for (ValueToSymbolIndexMap::const_iterator pos =
-                                       range.first;
-                                   pos != range.second; ++pos) {
-                                if (sym[sym_idx].GetMangled().GetName(
-                                        lldb::eLanguageTypeUnknown,
-                                        Mangled::ePreferMangled) ==
-                                    sym[pos->second].GetMangled().GetName(
-                                        lldb::eLanguageTypeUnknown,
-                                        Mangled::ePreferMangled)) {
-                                  m_nlist_idx_to_sym_idx[nlist_idx] =
-                                      pos->second;
-                                  // We just need the flags from the linker
-                                  // symbol, so put these flags
-                                  // into the N_STSYM flags to avoid duplicate
-                                  // symbols in the symbol table
-                                  sym[pos->second].SetExternal(
-                                      sym[sym_idx].IsExternal());
-                                  sym[pos->second].SetFlags(nlist.n_type << 16 |
-                                                            nlist.n_desc);
-                                  sym[sym_idx].Clear();
-                                  found_it = true;
-                                  break;
-                                }
-                              }
-                              if (found_it)
-                                continue;
-                            } else {
-                              const char *gsym_name =
-                                  sym[sym_idx]
-                                      .GetMangled()
-                                      .GetName(lldb::eLanguageTypeUnknown,
-                                               Mangled::ePreferMangled)
-                                      .GetCString();
-                              if (gsym_name) {
-                                // Combine N_GSYM stab entries with the non
-                                // stab symbol
-                                ConstNameToSymbolIndexMap::const_iterator pos =
-                                    N_GSYM_name_to_sym_idx.find(gsym_name);
-                                if (pos != N_GSYM_name_to_sym_idx.end()) {
-                                  const uint32_t GSYM_sym_idx = pos->second;
-                                  m_nlist_idx_to_sym_idx[nlist_idx] =
-                                      GSYM_sym_idx;
-                                  // Copy the address, because often the N_GSYM
-                                  // address has an invalid address of zero
-                                  // when the global is a common symbol
-                                  sym[GSYM_sym_idx].GetAddressRef().SetSection(
-                                      symbol_section);
-                                  sym[GSYM_sym_idx].GetAddressRef().SetOffset(
-                                      symbol_value);
-                                  // We just need the flags from the linker
-                                  // symbol, so put these flags
-                                  // into the N_GSYM flags to avoid duplicate
-                                  // symbols in the symbol table
-                                  sym[GSYM_sym_idx].SetFlags(
-                                      nlist.n_type << 16 | nlist.n_desc);
-                                  sym[sym_idx].Clear();
-                                  continue;
+                            } else if (symbol_sect_name &&
+                                       ::strstr(symbol_sect_name, "__IMPORT") ==
+                                           symbol_sect_name) {
+                              type = eSymbolTypeTrampoline;
+                            } else if (symbol_section->IsDescendant(
+                                           objc_section_sp.get())) {
+                              type = eSymbolTypeRuntime;
+                              if (symbol_name && symbol_name[0] == '.') {
+                                llvm::StringRef symbol_name_ref(symbol_name);
+                                llvm::StringRef
+                                    g_objc_v1_prefix_class(".objc_class_name_");
+                                if (symbol_name_ref.startswith(
+                                        g_objc_v1_prefix_class)) {
+                                  symbol_name_non_abi_mangled = symbol_name;
+                                  symbol_name = symbol_name +
+                                                g_objc_v1_prefix_class.size();
+                                  type = eSymbolTypeObjCClass;
+                                  demangled_is_synthesized = true;
                                 }
                               }
                             }
                           }
                         }
-
-                        sym[sym_idx].SetID(nlist_idx);
-                        sym[sym_idx].SetType(type);
-                        if (set_value) {
-                          sym[sym_idx].GetAddressRef().SetSection(
-                              symbol_section);
-                          sym[sym_idx].GetAddressRef().SetOffset(symbol_value);
-                        }
-                        sym[sym_idx].SetFlags(nlist.n_type << 16 |
-                                              nlist.n_desc);
-
-                        if (symbol_byte_size > 0)
-                          sym[sym_idx].SetByteSize(symbol_byte_size);
-
-                        if (demangled_is_synthesized)
-                          sym[sym_idx].SetDemangledNameIsSynthesized(true);
-                        ++sym_idx;
-                      } else {
-                        sym[sym_idx].Clear();
+                      } break;
                       }
                     }
-                    /////////////////////////////
-                  }
-                  break; // No more entries to consider
-                }
-              }
 
-              for (const auto &pos : reexport_shlib_needs_fixup) {
-                const auto undef_pos = undefined_name_to_desc.find(pos.second);
-                if (undef_pos != undefined_name_to_desc.end()) {
-                  const uint8_t dylib_ordinal =
-                      llvm::MachO::GET_LIBRARY_ORDINAL(undef_pos->second);
-                  if (dylib_ordinal > 0 &&
-                      dylib_ordinal < dylib_files.GetSize())
-                    sym[pos.first].SetReExportedSymbolSharedLibrary(
-                        dylib_files.GetFileSpecAtIndex(dylib_ordinal - 1));
+                    if (add_nlist) {
+                      uint64_t symbol_value = nlist.n_value;
+                      if (symbol_name_non_abi_mangled) {
+                        sym[sym_idx].GetMangled().SetMangledName(
+                            ConstString(symbol_name_non_abi_mangled));
+                        sym[sym_idx].GetMangled().SetDemangledName(
+                            ConstString(symbol_name));
+                      } else {
+                        bool symbol_name_is_mangled = false;
+
+                        if (symbol_name && symbol_name[0] == '_') {
+                          symbol_name_is_mangled = symbol_name[1] == '_';
+                          symbol_name++; // Skip the leading underscore
+                        }
+
+                        if (symbol_name) {
+                          ConstString const_symbol_name(symbol_name);
+                          sym[sym_idx].GetMangled().SetValue(
+                              const_symbol_name, symbol_name_is_mangled);
+                          if (is_gsym && is_debug) {
+                            const char *gsym_name =
+                                sym[sym_idx]
+                                    .GetMangled()
+                                    .GetName(lldb::eLanguageTypeUnknown,
+                                             Mangled::ePreferMangled)
+                                    .GetCString();
+                            if (gsym_name)
+                              N_GSYM_name_to_sym_idx[gsym_name] = sym_idx;
+                          }
+                        }
+                      }
+                      if (symbol_section) {
+                        const addr_t section_file_addr =
+                            symbol_section->GetFileAddress();
+                        if (symbol_byte_size == 0 &&
+                            function_starts_count > 0) {
+                          addr_t symbol_lookup_file_addr = nlist.n_value;
+                          // Do an exact address match for non-ARM addresses,
+                          // else get the closest since the symbol might be a
+                          // thumb symbol which has an address with bit zero
+                          // set
+                          FunctionStarts::Entry *func_start_entry =
+                              function_starts.FindEntry(symbol_lookup_file_addr,
+                                                        !is_arm);
+                          if (is_arm && func_start_entry) {
+                            // Verify that the function start address is the
+                            // symbol address (ARM) or the symbol address + 1
+                            // (thumb)
+                            if (func_start_entry->addr !=
+                                    symbol_lookup_file_addr &&
+                                func_start_entry->addr !=
+                                    (symbol_lookup_file_addr + 1)) {
+                              // Not the right entry, NULL it out...
+                              func_start_entry = NULL;
+                            }
+                          }
+                          if (func_start_entry) {
+                            func_start_entry->data = true;
+
+                            addr_t symbol_file_addr = func_start_entry->addr;
+                            uint32_t symbol_flags = 0;
+                            if (is_arm) {
+                              if (symbol_file_addr & 1)
+                                symbol_flags = MACHO_NLIST_ARM_SYMBOL_IS_THUMB;
+                              symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
+                            }
+
+                            const FunctionStarts::Entry *next_func_start_entry =
+                                function_starts.FindNextEntry(func_start_entry);
+                            const addr_t section_end_file_addr =
+                                section_file_addr +
+                                symbol_section->GetByteSize();
+                            if (next_func_start_entry) {
+                              addr_t next_symbol_file_addr =
+                                  next_func_start_entry->addr;
+                              // Be sure the clear the Thumb address bit when
+                              // we calculate the size from the current and
+                              // next address
+                              if (is_arm)
+                                next_symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
+                              symbol_byte_size = std::min<lldb::addr_t>(
+                                  next_symbol_file_addr - symbol_file_addr,
+                                  section_end_file_addr - symbol_file_addr);
+                            } else {
+                              symbol_byte_size =
+                                  section_end_file_addr - symbol_file_addr;
+                            }
+                          }
+                        }
+                        symbol_value -= section_file_addr;
+                      }
+
+                      if (is_debug == false) {
+                        if (type == eSymbolTypeCode) {
+                          // See if we can find a N_FUN entry for any code
+                          // symbols. If we do find a match, and the name
+                          // matches, then we can merge the two into just the
+                          // function symbol to avoid duplicate entries in
+                          // the symbol table
+                          auto range =
+                              N_FUN_addr_to_sym_idx.equal_range(nlist.n_value);
+                          if (range.first != range.second) {
+                            bool found_it = false;
+                            for (const auto pos = range.first;
+                                 pos != range.second; ++pos) {
+                              if (sym[sym_idx].GetMangled().GetName(
+                                      lldb::eLanguageTypeUnknown,
+                                      Mangled::ePreferMangled) ==
+                                  sym[pos->second].GetMangled().GetName(
+                                      lldb::eLanguageTypeUnknown,
+                                      Mangled::ePreferMangled)) {
+                                m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
+                                // We just need the flags from the linker
+                                // symbol, so put these flags
+                                // into the N_FUN flags to avoid duplicate
+                                // symbols in the symbol table
+                                sym[pos->second].SetExternal(
+                                    sym[sym_idx].IsExternal());
+                                sym[pos->second].SetFlags(nlist.n_type << 16 |
+                                                          nlist.n_desc);
+                                if (resolver_addresses.find(nlist.n_value) !=
+                                    resolver_addresses.end())
+                                  sym[pos->second].SetType(eSymbolTypeResolver);
+                                sym[sym_idx].Clear();
+                                found_it = true;
+                                break;
+                              }
+                            }
+                            if (found_it)
+                              continue;
+                          } else {
+                            if (resolver_addresses.find(nlist.n_value) !=
+                                resolver_addresses.end())
+                              type = eSymbolTypeResolver;
+                          }
+                        } else if (type == eSymbolTypeData ||
+                                   type == eSymbolTypeObjCClass ||
+                                   type == eSymbolTypeObjCMetaClass ||
+                                   type == eSymbolTypeObjCIVar) {
+                          // See if we can find a N_STSYM entry for any data
+                          // symbols. If we do find a match, and the name
+                          // matches, then we can merge the two into just the
+                          // Static symbol to avoid duplicate entries in the
+                          // symbol table
+                          auto range = N_STSYM_addr_to_sym_idx.equal_range(
+                              nlist.n_value);
+                          if (range.first != range.second) {
+                            bool found_it = false;
+                            for (const auto pos = range.first;
+                                 pos != range.second; ++pos) {
+                              if (sym[sym_idx].GetMangled().GetName(
+                                      lldb::eLanguageTypeUnknown,
+                                      Mangled::ePreferMangled) ==
+                                  sym[pos->second].GetMangled().GetName(
+                                      lldb::eLanguageTypeUnknown,
+                                      Mangled::ePreferMangled)) {
+                                m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
+                                // We just need the flags from the linker
+                                // symbol, so put these flags
+                                // into the N_STSYM flags to avoid duplicate
+                                // symbols in the symbol table
+                                sym[pos->second].SetExternal(
+                                    sym[sym_idx].IsExternal());
+                                sym[pos->second].SetFlags(nlist.n_type << 16 |
+                                                          nlist.n_desc);
+                                sym[sym_idx].Clear();
+                                found_it = true;
+                                break;
+                              }
+                            }
+                            if (found_it)
+                              continue;
+                          } else {
+                            const char *gsym_name =
+                                sym[sym_idx]
+                                    .GetMangled()
+                                    .GetName(lldb::eLanguageTypeUnknown,
+                                             Mangled::ePreferMangled)
+                                    .GetCString();
+                            if (gsym_name) {
+                              // Combine N_GSYM stab entries with the non
+                              // stab symbol
+                              ConstNameToSymbolIndexMap::const_iterator pos =
+                                  N_GSYM_name_to_sym_idx.find(gsym_name);
+                              if (pos != N_GSYM_name_to_sym_idx.end()) {
+                                const uint32_t GSYM_sym_idx = pos->second;
+                                m_nlist_idx_to_sym_idx[nlist_idx] =
+                                    GSYM_sym_idx;
+                                // Copy the address, because often the N_GSYM
+                                // address has an invalid address of zero
+                                // when the global is a common symbol
+                                sym[GSYM_sym_idx].GetAddressRef().SetSection(
+                                    symbol_section);
+                                sym[GSYM_sym_idx].GetAddressRef().SetOffset(
+                                    symbol_value);
+                                // We just need the flags from the linker
+                                // symbol, so put these flags
+                                // into the N_GSYM flags to avoid duplicate
+                                // symbols in the symbol table
+                                sym[GSYM_sym_idx].SetFlags(nlist.n_type << 16 |
+                                                           nlist.n_desc);
+                                sym[sym_idx].Clear();
+                                continue;
+                              }
+                            }
+                          }
+                        }
+                      }
+
+                      sym[sym_idx].SetID(nlist_idx);
+                      sym[sym_idx].SetType(type);
+                      if (set_value) {
+                        sym[sym_idx].GetAddressRef().SetSection(symbol_section);
+                        sym[sym_idx].GetAddressRef().SetOffset(symbol_value);
+                      }
+                      sym[sym_idx].SetFlags(nlist.n_type << 16 | nlist.n_desc);
+
+                      if (symbol_byte_size > 0)
+                        sym[sym_idx].SetByteSize(symbol_byte_size);
+
+                      if (demangled_is_synthesized)
+                        sym[sym_idx].SetDemangledNameIsSynthesized(true);
+                      ++sym_idx;
+                    } else {
+                      sym[sym_idx].Clear();
+                    }
+                  }
+                  /////////////////////////////
                 }
+                break; // No more entries to consider
+              }
+            }
+
+            for (const auto &pos : reexport_shlib_needs_fixup) {
+              const auto undef_pos = undefined_name_to_desc.find(pos.second);
+              if (undef_pos != undefined_name_to_desc.end()) {
+                const uint8_t dylib_ordinal =
+                    llvm::MachO::GET_LIBRARY_ORDINAL(undef_pos->second);
+                if (dylib_ordinal > 0 && dylib_ordinal < dylib_files.GetSize())
+                  sym[pos.first].SetReExportedSymbolSharedLibrary(
+                      dylib_files.GetFileSpecAtIndex(dylib_ordinal - 1));
               }
             }
           }
         }
       }
     }
+  }
 
-    // Must reset this in case it was mutated above!
-    nlist_data_offset = 0;
+  // Must reset this in case it was mutated above!
+  nlist_data_offset = 0;
 #endif
 
-    if (nlist_data.GetByteSize() > 0) {
+  if (nlist_data.GetByteSize() > 0) {
 
-      // If the sym array was not created while parsing the DSC unmapped
-      // symbols, create it now.
-      if (sym == nullptr) {
-        sym = symtab->Resize(symtab_load_command.nsyms +
-                             m_dysymtab.nindirectsyms);
-        num_syms = symtab->GetNumSymbols();
-      }
+    // If the sym array was not created while parsing the DSC unmapped
+    // symbols, create it now.
+    if (sym == nullptr) {
+      sym =
+          symtab->Resize(symtab_load_command.nsyms + m_dysymtab.nindirectsyms);
+      num_syms = symtab->GetNumSymbols();
+    }
 
-      if (unmapped_local_symbols_found) {
-        assert(m_dysymtab.ilocalsym == 0);
-        nlist_data_offset += (m_dysymtab.nlocalsym * nlist_byte_size);
-        nlist_idx = m_dysymtab.nlocalsym;
-      } else {
-        nlist_idx = 0;
-      }
+    if (unmapped_local_symbols_found) {
+      assert(m_dysymtab.ilocalsym == 0);
+      nlist_data_offset += (m_dysymtab.nlocalsym * nlist_byte_size);
+      nlist_idx = m_dysymtab.nlocalsym;
+    } else {
+      nlist_idx = 0;
+    }
 
-      typedef std::map<ConstString, uint16_t> UndefinedNameToDescMap;
-      typedef std::map<uint32_t, ConstString> SymbolIndexToName;
-      UndefinedNameToDescMap undefined_name_to_desc;
-      SymbolIndexToName reexport_shlib_needs_fixup;
-      for (; nlist_idx < symtab_load_command.nsyms; ++nlist_idx) {
-        struct nlist_64 nlist;
-        if (!nlist_data.ValidOffsetForDataOfSize(nlist_data_offset,
-                                                 nlist_byte_size))
-          break;
+    typedef llvm::DenseMap<ConstString, uint16_t> UndefinedNameToDescMap;
+    typedef llvm::DenseMap<uint32_t, ConstString> SymbolIndexToName;
+    UndefinedNameToDescMap undefined_name_to_desc;
+    SymbolIndexToName reexport_shlib_needs_fixup;
 
-        nlist.n_strx = nlist_data.GetU32_unchecked(&nlist_data_offset);
-        nlist.n_type = nlist_data.GetU8_unchecked(&nlist_data_offset);
-        nlist.n_sect = nlist_data.GetU8_unchecked(&nlist_data_offset);
-        nlist.n_desc = nlist_data.GetU16_unchecked(&nlist_data_offset);
-        nlist.n_value = nlist_data.GetAddress_unchecked(&nlist_data_offset);
+    // Symtab parsing is a huge mess. Everything is entangled and the code
+    // requires access to a ridiculous amount of variables. LLDB depends
+    // heavily on the proper merging of symbols and to get that right we need
+    // to make sure we have parsed all the debug symbols first. Therefore we
+    // invoke the lambda twice, once to parse only the debug symbols and then
+    // once more to parse the remaining symbols.
+    auto ParseSymbolLambda = [&](struct nlist_64 &nlist, uint32_t nlist_idx,
+                                 bool debug_only) {
+      const bool is_debug = ((nlist.n_type & N_STAB) != 0);
+      if (is_debug != debug_only)
+        return true;
 
-        SymbolType type = eSymbolTypeInvalid;
-        const char *symbol_name = nullptr;
+      const char *symbol_name_non_abi_mangled = nullptr;
+      const char *symbol_name = nullptr;
 
-        if (have_strtab_data) {
-          symbol_name = strtab_data.PeekCStr(nlist.n_strx);
+      if (have_strtab_data) {
+        symbol_name = strtab_data.PeekCStr(nlist.n_strx);
 
-          if (symbol_name == nullptr) {
-            // No symbol should be NULL, even the symbols with no string values
-            // should have an offset zero which points to an empty C-string
-            Host::SystemLog(Host::eSystemLogError,
-                            "error: symbol[%u] has invalid string table offset "
-                            "0x%x in %s, ignoring symbol\n",
-                            nlist_idx, nlist.n_strx,
-                            module_sp->GetFileSpec().GetPath().c_str());
-            continue;
-          }
-          if (symbol_name[0] == '\0')
-            symbol_name = nullptr;
-        } else {
-          const addr_t str_addr = strtab_addr + nlist.n_strx;
-          Status str_error;
-          if (process->ReadCStringFromMemory(str_addr, memory_symbol_name,
-                                             str_error))
-            symbol_name = memory_symbol_name.c_str();
+        if (symbol_name == nullptr) {
+          // No symbol should be NULL, even the symbols with no string values
+          // should have an offset zero which points to an empty C-string
+          Host::SystemLog(Host::eSystemLogError,
+                          "error: symbol[%u] has invalid string table offset "
+                          "0x%x in %s, ignoring symbol\n",
+                          nlist_idx, nlist.n_strx,
+                          module_sp->GetFileSpec().GetPath().c_str());
+          return true;
         }
-        const char *symbol_name_non_abi_mangled = nullptr;
+        if (symbol_name[0] == '\0')
+          symbol_name = nullptr;
+      } else {
+        const addr_t str_addr = strtab_addr + nlist.n_strx;
+        Status str_error;
+        if (process->ReadCStringFromMemory(str_addr, memory_symbol_name,
+                                           str_error))
+          symbol_name = memory_symbol_name.c_str();
+      }
 
-        SectionSP symbol_section;
-        lldb::addr_t symbol_byte_size = 0;
-        bool add_nlist = true;
-        bool is_gsym = false;
-        bool is_debug = ((nlist.n_type & N_STAB) != 0);
-        bool demangled_is_synthesized = false;
-        bool set_value = true;
-        assert(sym_idx < num_syms);
+      SymbolType type = eSymbolTypeInvalid;
+      SectionSP symbol_section;
+      lldb::addr_t symbol_byte_size = 0;
+      bool add_nlist = true;
+      bool is_gsym = false;
+      bool demangled_is_synthesized = false;
+      bool set_value = true;
 
-        sym[sym_idx].SetDebug(is_debug);
+      assert(sym_idx < num_syms);
+      sym[sym_idx].SetDebug(is_debug);
 
-        if (is_debug) {
-          switch (nlist.n_type) {
-          case N_GSYM:
-            // global symbol: name,,NO_SECT,type,0
-            // Sometimes the N_GSYM value contains the address.
+      if (is_debug) {
+        switch (nlist.n_type) {
+        case N_GSYM:
+          // global symbol: name,,NO_SECT,type,0
+          // Sometimes the N_GSYM value contains the address.
 
-            // FIXME: In the .o files, we have a GSYM and a debug symbol for all
-            // the ObjC data.  They
-            // have the same address, but we want to ensure that we always find
-            // only the real symbol, 'cause we don't currently correctly
-            // attribute the GSYM one to the ObjCClass/Ivar/MetaClass symbol
-            // type.  This is a temporary hack to make sure the ObjectiveC
-            // symbols get treated correctly.  To do this right, we should
-            // coalesce all the GSYM & global symbols that have the same
-            // address.
-            is_gsym = true;
-            sym[sym_idx].SetExternal(true);
+          // FIXME: In the .o files, we have a GSYM and a debug symbol for all
+          // the ObjC data.  They
+          // have the same address, but we want to ensure that we always find
+          // only the real symbol, 'cause we don't currently correctly
+          // attribute the GSYM one to the ObjCClass/Ivar/MetaClass symbol
+          // type.  This is a temporary hack to make sure the ObjectiveC
+          // symbols get treated correctly.  To do this right, we should
+          // coalesce all the GSYM & global symbols that have the same
+          // address.
+          is_gsym = true;
+          sym[sym_idx].SetExternal(true);
 
-            if (symbol_name && symbol_name[0] == '_' && symbol_name[1] == 'O') {
-              llvm::StringRef symbol_name_ref(symbol_name);
-              if (symbol_name_ref.startswith(g_objc_v2_prefix_class)) {
-                symbol_name_non_abi_mangled = symbol_name + 1;
-                symbol_name = symbol_name + g_objc_v2_prefix_class.size();
-                type = eSymbolTypeObjCClass;
-                demangled_is_synthesized = true;
+          if (symbol_name && symbol_name[0] == '_' && symbol_name[1] == 'O') {
+            llvm::StringRef symbol_name_ref(symbol_name);
+            if (symbol_name_ref.startswith(g_objc_v2_prefix_class)) {
+              symbol_name_non_abi_mangled = symbol_name + 1;
+              symbol_name = symbol_name + g_objc_v2_prefix_class.size();
+              type = eSymbolTypeObjCClass;
+              demangled_is_synthesized = true;
 
-              } else if (symbol_name_ref.startswith(
-                             g_objc_v2_prefix_metaclass)) {
-                symbol_name_non_abi_mangled = symbol_name + 1;
-                symbol_name = symbol_name + g_objc_v2_prefix_metaclass.size();
-                type = eSymbolTypeObjCMetaClass;
-                demangled_is_synthesized = true;
-              } else if (symbol_name_ref.startswith(g_objc_v2_prefix_ivar)) {
-                symbol_name_non_abi_mangled = symbol_name + 1;
-                symbol_name = symbol_name + g_objc_v2_prefix_ivar.size();
-                type = eSymbolTypeObjCIVar;
-                demangled_is_synthesized = true;
-              }
-            } else {
-              if (nlist.n_value != 0)
-                symbol_section =
-                    section_info.GetSection(nlist.n_sect, nlist.n_value);
-              type = eSymbolTypeData;
+            } else if (symbol_name_ref.startswith(g_objc_v2_prefix_metaclass)) {
+              symbol_name_non_abi_mangled = symbol_name + 1;
+              symbol_name = symbol_name + g_objc_v2_prefix_metaclass.size();
+              type = eSymbolTypeObjCMetaClass;
+              demangled_is_synthesized = true;
+            } else if (symbol_name_ref.startswith(g_objc_v2_prefix_ivar)) {
+              symbol_name_non_abi_mangled = symbol_name + 1;
+              symbol_name = symbol_name + g_objc_v2_prefix_ivar.size();
+              type = eSymbolTypeObjCIVar;
+              demangled_is_synthesized = true;
             }
-            break;
-
-          case N_FNAME:
-            // procedure name (f77 kludge): name,,NO_SECT,0,0
-            type = eSymbolTypeCompiler;
-            break;
-
-          case N_FUN:
-            // procedure: name,,n_sect,linenumber,address
-            if (symbol_name) {
-              type = eSymbolTypeCode;
+          } else {
+            if (nlist.n_value != 0)
               symbol_section =
                   section_info.GetSection(nlist.n_sect, nlist.n_value);
+            type = eSymbolTypeData;
+          }
+          break;
 
-              N_FUN_addr_to_sym_idx.insert(
-                  std::make_pair(nlist.n_value, sym_idx));
-              // We use the current number of symbols in the symbol table in
-              // lieu of using nlist_idx in case we ever start trimming entries
-              // out
-              N_FUN_indexes.push_back(sym_idx);
-            } else {
-              type = eSymbolTypeCompiler;
+        case N_FNAME:
+          // procedure name (f77 kludge): name,,NO_SECT,0,0
+          type = eSymbolTypeCompiler;
+          break;
 
-              if (!N_FUN_indexes.empty()) {
-                // Copy the size of the function into the original STAB entry
-                // so we don't have to hunt for it later
-                symtab->SymbolAtIndex(N_FUN_indexes.back())
-                    ->SetByteSize(nlist.n_value);
-                N_FUN_indexes.pop_back();
-                // We don't really need the end function STAB as it contains
-                // the size which we already placed with the original symbol,
-                // so don't add it if we want a minimal symbol table
-                add_nlist = false;
-              }
-            }
-            break;
+        case N_FUN:
+          // procedure: name,,n_sect,linenumber,address
+          if (symbol_name) {
+            type = eSymbolTypeCode;
+            symbol_section =
+                section_info.GetSection(nlist.n_sect, nlist.n_value);
 
-          case N_STSYM:
-            // static symbol: name,,n_sect,type,address
-            N_STSYM_addr_to_sym_idx.insert(
+            N_FUN_addr_to_sym_idx.insert(
                 std::make_pair(nlist.n_value, sym_idx));
-            symbol_section =
-                section_info.GetSection(nlist.n_sect, nlist.n_value);
-            if (symbol_name && symbol_name[0]) {
-              type = ObjectFile::GetSymbolTypeFromName(symbol_name + 1,
-                                                       eSymbolTypeData);
-            }
-            break;
-
-          case N_LCSYM:
-            // .lcomm symbol: name,,n_sect,type,address
-            symbol_section =
-                section_info.GetSection(nlist.n_sect, nlist.n_value);
-            type = eSymbolTypeCommonBlock;
-            break;
-
-          case N_BNSYM:
-            // We use the current number of symbols in the symbol table in lieu
-            // of using nlist_idx in case we ever start trimming entries out
-            // Skip these if we want minimal symbol tables
-            add_nlist = false;
-            break;
-
-          case N_ENSYM:
-            // Set the size of the N_BNSYM to the terminating index of this
-            // N_ENSYM so that we can always skip the entire symbol if we need
-            // to navigate more quickly at the source level when parsing STABS
-            // Skip these if we want minimal symbol tables
-            add_nlist = false;
-            break;
-
-          case N_OPT:
-            // emitted with gcc2_compiled and in gcc source
+            // We use the current number of symbols in the symbol table in
+            // lieu of using nlist_idx in case we ever start trimming entries
+            // out
+            N_FUN_indexes.push_back(sym_idx);
+          } else {
             type = eSymbolTypeCompiler;
-            break;
 
-          case N_RSYM:
-            // register sym: name,,NO_SECT,type,register
-            type = eSymbolTypeVariable;
-            break;
-
-          case N_SLINE:
-            // src line: 0,,n_sect,linenumber,address
-            symbol_section =
-                section_info.GetSection(nlist.n_sect, nlist.n_value);
-            type = eSymbolTypeLineEntry;
-            break;
-
-          case N_SSYM:
-            // structure elt: name,,NO_SECT,type,struct_offset
-            type = eSymbolTypeVariableType;
-            break;
-
-          case N_SO:
-            // source file name
-            type = eSymbolTypeSourceFile;
-            if (symbol_name == nullptr) {
+            if (!N_FUN_indexes.empty()) {
+              // Copy the size of the function into the original STAB entry
+              // so we don't have to hunt for it later
+              symtab->SymbolAtIndex(N_FUN_indexes.back())
+                  ->SetByteSize(nlist.n_value);
+              N_FUN_indexes.pop_back();
+              // We don't really need the end function STAB as it contains
+              // the size which we already placed with the original symbol,
+              // so don't add it if we want a minimal symbol table
               add_nlist = false;
-              if (N_SO_index != UINT32_MAX) {
-                // Set the size of the N_SO to the terminating index of this
-                // N_SO so that we can always skip the entire N_SO if we need
-                // to navigate more quickly at the source level when parsing
-                // STABS
-                symbol_ptr = symtab->SymbolAtIndex(N_SO_index);
-                symbol_ptr->SetByteSize(sym_idx);
-                symbol_ptr->SetSizeIsSibling(true);
-              }
-              N_NSYM_indexes.clear();
-              N_INCL_indexes.clear();
-              N_BRAC_indexes.clear();
-              N_COMM_indexes.clear();
-              N_FUN_indexes.clear();
-              N_SO_index = UINT32_MAX;
-            } else {
-              // We use the current number of symbols in the symbol table in
-              // lieu of using nlist_idx in case we ever start trimming entries
-              // out
-              const bool N_SO_has_full_path = symbol_name[0] == '/';
-              if (N_SO_has_full_path) {
-                if ((N_SO_index == sym_idx - 1) && ((sym_idx - 1) < num_syms)) {
-                  // We have two consecutive N_SO entries where the first
-                  // contains a directory and the second contains a full path.
-                  sym[sym_idx - 1].GetMangled().SetValue(
-                      ConstString(symbol_name), false);
-                  m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
-                  add_nlist = false;
-                } else {
-                  // This is the first entry in a N_SO that contains a
-                  // directory or a full path to the source file
-                  N_SO_index = sym_idx;
-                }
-              } else if ((N_SO_index == sym_idx - 1) &&
-                         ((sym_idx - 1) < num_syms)) {
-                // This is usually the second N_SO entry that contains just the
-                // filename, so here we combine it with the first one if we are
-                // minimizing the symbol table
-                const char *so_path =
-                    sym[sym_idx - 1]
-                        .GetMangled()
-                        .GetDemangledName(lldb::eLanguageTypeUnknown)
-                        .AsCString();
-                if (so_path && so_path[0]) {
-                  std::string full_so_path(so_path);
-                  const size_t double_slash_pos = full_so_path.find("//");
-                  if (double_slash_pos != std::string::npos) {
-                    // The linker has been generating bad N_SO entries with
-                    // doubled up paths in the format "%s%s" where the first
-                    // string in the DW_AT_comp_dir, and the second is the
-                    // directory for the source file so you end up with a path
-                    // that looks like "/tmp/src//tmp/src/"
-                    FileSpec so_dir(so_path);
-                    if (!FileSystem::Instance().Exists(so_dir)) {
-                      so_dir.SetFile(&full_so_path[double_slash_pos + 1],
-                                     FileSpec::Style::native);
-                      if (FileSystem::Instance().Exists(so_dir)) {
-                        // Trim off the incorrect path
-                        full_so_path.erase(0, double_slash_pos + 1);
-                      }
-                    }
-                  }
-                  if (*full_so_path.rbegin() != '/')
-                    full_so_path += '/';
-                  full_so_path += symbol_name;
-                  sym[sym_idx - 1].GetMangled().SetValue(
-                      ConstString(full_so_path.c_str()), false);
-                  add_nlist = false;
-                  m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
-                }
+            }
+          }
+          break;
+
+        case N_STSYM:
+          // static symbol: name,,n_sect,type,address
+          N_STSYM_addr_to_sym_idx.insert(
+              std::make_pair(nlist.n_value, sym_idx));
+          symbol_section = section_info.GetSection(nlist.n_sect, nlist.n_value);
+          if (symbol_name && symbol_name[0]) {
+            type = ObjectFile::GetSymbolTypeFromName(symbol_name + 1,
+                                                     eSymbolTypeData);
+          }
+          break;
+
+        case N_LCSYM:
+          // .lcomm symbol: name,,n_sect,type,address
+          symbol_section = section_info.GetSection(nlist.n_sect, nlist.n_value);
+          type = eSymbolTypeCommonBlock;
+          break;
+
+        case N_BNSYM:
+          // We use the current number of symbols in the symbol table in lieu
+          // of using nlist_idx in case we ever start trimming entries out
+          // Skip these if we want minimal symbol tables
+          add_nlist = false;
+          break;
+
+        case N_ENSYM:
+          // Set the size of the N_BNSYM to the terminating index of this
+          // N_ENSYM so that we can always skip the entire symbol if we need
+          // to navigate more quickly at the source level when parsing STABS
+          // Skip these if we want minimal symbol tables
+          add_nlist = false;
+          break;
+
+        case N_OPT:
+          // emitted with gcc2_compiled and in gcc source
+          type = eSymbolTypeCompiler;
+          break;
+
+        case N_RSYM:
+          // register sym: name,,NO_SECT,type,register
+          type = eSymbolTypeVariable;
+          break;
+
+        case N_SLINE:
+          // src line: 0,,n_sect,linenumber,address
+          symbol_section = section_info.GetSection(nlist.n_sect, nlist.n_value);
+          type = eSymbolTypeLineEntry;
+          break;
+
+        case N_SSYM:
+          // structure elt: name,,NO_SECT,type,struct_offset
+          type = eSymbolTypeVariableType;
+          break;
+
+        case N_SO:
+          // source file name
+          type = eSymbolTypeSourceFile;
+          if (symbol_name == nullptr) {
+            add_nlist = false;
+            if (N_SO_index != UINT32_MAX) {
+              // Set the size of the N_SO to the terminating index of this
+              // N_SO so that we can always skip the entire N_SO if we need
+              // to navigate more quickly at the source level when parsing
+              // STABS
+              symbol_ptr = symtab->SymbolAtIndex(N_SO_index);
+              symbol_ptr->SetByteSize(sym_idx);
+              symbol_ptr->SetSizeIsSibling(true);
+            }
+            N_NSYM_indexes.clear();
+            N_INCL_indexes.clear();
+            N_BRAC_indexes.clear();
+            N_COMM_indexes.clear();
+            N_FUN_indexes.clear();
+            N_SO_index = UINT32_MAX;
+          } else {
+            // We use the current number of symbols in the symbol table in
+            // lieu of using nlist_idx in case we ever start trimming entries
+            // out
+            const bool N_SO_has_full_path = symbol_name[0] == '/';
+            if (N_SO_has_full_path) {
+              if ((N_SO_index == sym_idx - 1) && ((sym_idx - 1) < num_syms)) {
+                // We have two consecutive N_SO entries where the first
+                // contains a directory and the second contains a full path.
+                sym[sym_idx - 1].GetMangled().SetValue(ConstString(symbol_name),
+                                                       false);
+                m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
+                add_nlist = false;
               } else {
-                // This could be a relative path to a N_SO
+                // This is the first entry in a N_SO that contains a
+                // directory or a full path to the source file
                 N_SO_index = sym_idx;
               }
+            } else if ((N_SO_index == sym_idx - 1) &&
+                       ((sym_idx - 1) < num_syms)) {
+              // This is usually the second N_SO entry that contains just the
+              // filename, so here we combine it with the first one if we are
+              // minimizing the symbol table
+              const char *so_path =
+                  sym[sym_idx - 1]
+                      .GetMangled()
+                      .GetDemangledName(lldb::eLanguageTypeUnknown)
+                      .AsCString();
+              if (so_path && so_path[0]) {
+                std::string full_so_path(so_path);
+                const size_t double_slash_pos = full_so_path.find("//");
+                if (double_slash_pos != std::string::npos) {
+                  // The linker has been generating bad N_SO entries with
+                  // doubled up paths in the format "%s%s" where the first
+                  // string in the DW_AT_comp_dir, and the second is the
+                  // directory for the source file so you end up with a path
+                  // that looks like "/tmp/src//tmp/src/"
+                  FileSpec so_dir(so_path);
+                  if (!FileSystem::Instance().Exists(so_dir)) {
+                    so_dir.SetFile(&full_so_path[double_slash_pos + 1],
+                                   FileSpec::Style::native);
+                    if (FileSystem::Instance().Exists(so_dir)) {
+                      // Trim off the incorrect path
+                      full_so_path.erase(0, double_slash_pos + 1);
+                    }
+                  }
+                }
+                if (*full_so_path.rbegin() != '/')
+                  full_so_path += '/';
+                full_so_path += symbol_name;
+                sym[sym_idx - 1].GetMangled().SetValue(
+                    ConstString(full_so_path.c_str()), false);
+                add_nlist = false;
+                m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
+              }
+            } else {
+              // This could be a relative path to a N_SO
+              N_SO_index = sym_idx;
             }
-            break;
+          }
+          break;
 
-          case N_OSO:
-            // object file name: name,,0,0,st_mtime
-            type = eSymbolTypeObjectFile;
-            break;
+        case N_OSO:
+          // object file name: name,,0,0,st_mtime
+          type = eSymbolTypeObjectFile;
+          break;
 
-          case N_LSYM:
-            // local sym: name,,NO_SECT,type,offset
-            type = eSymbolTypeLocal;
-            break;
+        case N_LSYM:
+          // local sym: name,,NO_SECT,type,offset
+          type = eSymbolTypeLocal;
+          break;
 
-          // INCL scopes
-          case N_BINCL:
-            // include file beginning: name,,NO_SECT,0,sum We use the current
-            // number of symbols in the symbol table in lieu of using nlist_idx
-            // in case we ever start trimming entries out
-            N_INCL_indexes.push_back(sym_idx);
-            type = eSymbolTypeScopeBegin;
-            break;
+        // INCL scopes
+        case N_BINCL:
+          // include file beginning: name,,NO_SECT,0,sum We use the current
+          // number of symbols in the symbol table in lieu of using nlist_idx
+          // in case we ever start trimming entries out
+          N_INCL_indexes.push_back(sym_idx);
+          type = eSymbolTypeScopeBegin;
+          break;
 
-          case N_EINCL:
-            // include file end: name,,NO_SECT,0,0
-            // Set the size of the N_BINCL to the terminating index of this
-            // N_EINCL so that we can always skip the entire symbol if we need
-            // to navigate more quickly at the source level when parsing STABS
-            if (!N_INCL_indexes.empty()) {
-              symbol_ptr = symtab->SymbolAtIndex(N_INCL_indexes.back());
-              symbol_ptr->SetByteSize(sym_idx + 1);
-              symbol_ptr->SetSizeIsSibling(true);
-              N_INCL_indexes.pop_back();
-            }
-            type = eSymbolTypeScopeEnd;
-            break;
+        case N_EINCL:
+          // include file end: name,,NO_SECT,0,0
+          // Set the size of the N_BINCL to the terminating index of this
+          // N_EINCL so that we can always skip the entire symbol if we need
+          // to navigate more quickly at the source level when parsing STABS
+          if (!N_INCL_indexes.empty()) {
+            symbol_ptr = symtab->SymbolAtIndex(N_INCL_indexes.back());
+            symbol_ptr->SetByteSize(sym_idx + 1);
+            symbol_ptr->SetSizeIsSibling(true);
+            N_INCL_indexes.pop_back();
+          }
+          type = eSymbolTypeScopeEnd;
+          break;
 
-          case N_SOL:
-            // #included file name: name,,n_sect,0,address
-            type = eSymbolTypeHeaderFile;
+        case N_SOL:
+          // #included file name: name,,n_sect,0,address
+          type = eSymbolTypeHeaderFile;
 
-            // We currently don't use the header files on darwin
+          // We currently don't use the header files on darwin
+          add_nlist = false;
+          break;
+
+        case N_PARAMS:
+          // compiler parameters: name,,NO_SECT,0,0
+          type = eSymbolTypeCompiler;
+          break;
+
+        case N_VERSION:
+          // compiler version: name,,NO_SECT,0,0
+          type = eSymbolTypeCompiler;
+          break;
+
+        case N_OLEVEL:
+          // compiler -O level: name,,NO_SECT,0,0
+          type = eSymbolTypeCompiler;
+          break;
+
+        case N_PSYM:
+          // parameter: name,,NO_SECT,type,offset
+          type = eSymbolTypeVariable;
+          break;
+
+        case N_ENTRY:
+          // alternate entry: name,,n_sect,linenumber,address
+          symbol_section = section_info.GetSection(nlist.n_sect, nlist.n_value);
+          type = eSymbolTypeLineEntry;
+          break;
+
+        // Left and Right Braces
+        case N_LBRAC:
+          // left bracket: 0,,NO_SECT,nesting level,address We use the
+          // current number of symbols in the symbol table in lieu of using
+          // nlist_idx in case we ever start trimming entries out
+          symbol_section = section_info.GetSection(nlist.n_sect, nlist.n_value);
+          N_BRAC_indexes.push_back(sym_idx);
+          type = eSymbolTypeScopeBegin;
+          break;
+
+        case N_RBRAC:
+          // right bracket: 0,,NO_SECT,nesting level,address Set the size of
+          // the N_LBRAC to the terminating index of this N_RBRAC so that we
+          // can always skip the entire symbol if we need to navigate more
+          // quickly at the source level when parsing STABS
+          symbol_section = section_info.GetSection(nlist.n_sect, nlist.n_value);
+          if (!N_BRAC_indexes.empty()) {
+            symbol_ptr = symtab->SymbolAtIndex(N_BRAC_indexes.back());
+            symbol_ptr->SetByteSize(sym_idx + 1);
+            symbol_ptr->SetSizeIsSibling(true);
+            N_BRAC_indexes.pop_back();
+          }
+          type = eSymbolTypeScopeEnd;
+          break;
+
+        case N_EXCL:
+          // deleted include file: name,,NO_SECT,0,sum
+          type = eSymbolTypeHeaderFile;
+          break;
+
+        // COMM scopes
+        case N_BCOMM:
+          // begin common: name,,NO_SECT,0,0
+          // We use the current number of symbols in the symbol table in lieu
+          // of using nlist_idx in case we ever start trimming entries out
+          type = eSymbolTypeScopeBegin;
+          N_COMM_indexes.push_back(sym_idx);
+          break;
+
+        case N_ECOML:
+          // end common (local name): 0,,n_sect,0,address
+          symbol_section = section_info.GetSection(nlist.n_sect, nlist.n_value);
+          LLVM_FALLTHROUGH;
+
+        case N_ECOMM:
+          // end common: name,,n_sect,0,0
+          // Set the size of the N_BCOMM to the terminating index of this
+          // N_ECOMM/N_ECOML so that we can always skip the entire symbol if
+          // we need to navigate more quickly at the source level when
+          // parsing STABS
+          if (!N_COMM_indexes.empty()) {
+            symbol_ptr = symtab->SymbolAtIndex(N_COMM_indexes.back());
+            symbol_ptr->SetByteSize(sym_idx + 1);
+            symbol_ptr->SetSizeIsSibling(true);
+            N_COMM_indexes.pop_back();
+          }
+          type = eSymbolTypeScopeEnd;
+          break;
+
+        case N_LENG:
+          // second stab entry with length information
+          type = eSymbolTypeAdditional;
+          break;
+
+        default:
+          break;
+        }
+      } else {
+        uint8_t n_type = N_TYPE & nlist.n_type;
+        sym[sym_idx].SetExternal((N_EXT & nlist.n_type) != 0);
+
+        switch (n_type) {
+        case N_INDR: {
+          const char *reexport_name_cstr = strtab_data.PeekCStr(nlist.n_value);
+          if (reexport_name_cstr && reexport_name_cstr[0]) {
+            type = eSymbolTypeReExported;
+            ConstString reexport_name(reexport_name_cstr +
+                                      ((reexport_name_cstr[0] == '_') ? 1 : 0));
+            sym[sym_idx].SetReExportedSymbolName(reexport_name);
+            set_value = false;
+            reexport_shlib_needs_fixup[sym_idx] = reexport_name;
+            indirect_symbol_names.insert(
+                ConstString(symbol_name + ((symbol_name[0] == '_') ? 1 : 0)));
+          } else
+            type = eSymbolTypeUndefined;
+        } break;
+
+        case N_UNDF:
+          if (symbol_name && symbol_name[0]) {
+            ConstString undefined_name(symbol_name +
+                                       ((symbol_name[0] == '_') ? 1 : 0));
+            undefined_name_to_desc[undefined_name] = nlist.n_desc;
+          }
+          LLVM_FALLTHROUGH;
+
+        case N_PBUD:
+          type = eSymbolTypeUndefined;
+          break;
+
+        case N_ABS:
+          type = eSymbolTypeAbsolute;
+          break;
+
+        case N_SECT: {
+          symbol_section = section_info.GetSection(nlist.n_sect, nlist.n_value);
+
+          if (!symbol_section) {
+            // TODO: warn about this?
             add_nlist = false;
             break;
-
-          case N_PARAMS:
-            // compiler parameters: name,,NO_SECT,0,0
-            type = eSymbolTypeCompiler;
-            break;
-
-          case N_VERSION:
-            // compiler version: name,,NO_SECT,0,0
-            type = eSymbolTypeCompiler;
-            break;
-
-          case N_OLEVEL:
-            // compiler -O level: name,,NO_SECT,0,0
-            type = eSymbolTypeCompiler;
-            break;
-
-          case N_PSYM:
-            // parameter: name,,NO_SECT,type,offset
-            type = eSymbolTypeVariable;
-            break;
-
-          case N_ENTRY:
-            // alternate entry: name,,n_sect,linenumber,address
-            symbol_section =
-                section_info.GetSection(nlist.n_sect, nlist.n_value);
-            type = eSymbolTypeLineEntry;
-            break;
-
-          // Left and Right Braces
-          case N_LBRAC:
-            // left bracket: 0,,NO_SECT,nesting level,address We use the
-            // current number of symbols in the symbol table in lieu of using
-            // nlist_idx in case we ever start trimming entries out
-            symbol_section =
-                section_info.GetSection(nlist.n_sect, nlist.n_value);
-            N_BRAC_indexes.push_back(sym_idx);
-            type = eSymbolTypeScopeBegin;
-            break;
-
-          case N_RBRAC:
-            // right bracket: 0,,NO_SECT,nesting level,address Set the size of
-            // the N_LBRAC to the terminating index of this N_RBRAC so that we
-            // can always skip the entire symbol if we need to navigate more
-            // quickly at the source level when parsing STABS
-            symbol_section =
-                section_info.GetSection(nlist.n_sect, nlist.n_value);
-            if (!N_BRAC_indexes.empty()) {
-              symbol_ptr = symtab->SymbolAtIndex(N_BRAC_indexes.back());
-              symbol_ptr->SetByteSize(sym_idx + 1);
-              symbol_ptr->SetSizeIsSibling(true);
-              N_BRAC_indexes.pop_back();
-            }
-            type = eSymbolTypeScopeEnd;
-            break;
-
-          case N_EXCL:
-            // deleted include file: name,,NO_SECT,0,sum
-            type = eSymbolTypeHeaderFile;
-            break;
-
-          // COMM scopes
-          case N_BCOMM:
-            // begin common: name,,NO_SECT,0,0
-            // We use the current number of symbols in the symbol table in lieu
-            // of using nlist_idx in case we ever start trimming entries out
-            type = eSymbolTypeScopeBegin;
-            N_COMM_indexes.push_back(sym_idx);
-            break;
-
-          case N_ECOML:
-            // end common (local name): 0,,n_sect,0,address
-            symbol_section =
-                section_info.GetSection(nlist.n_sect, nlist.n_value);
-            LLVM_FALLTHROUGH;
-
-          case N_ECOMM:
-            // end common: name,,n_sect,0,0
-            // Set the size of the N_BCOMM to the terminating index of this
-            // N_ECOMM/N_ECOML so that we can always skip the entire symbol if
-            // we need to navigate more quickly at the source level when
-            // parsing STABS
-            if (!N_COMM_indexes.empty()) {
-              symbol_ptr = symtab->SymbolAtIndex(N_COMM_indexes.back());
-              symbol_ptr->SetByteSize(sym_idx + 1);
-              symbol_ptr->SetSizeIsSibling(true);
-              N_COMM_indexes.pop_back();
-            }
-            type = eSymbolTypeScopeEnd;
-            break;
-
-          case N_LENG:
-            // second stab entry with length information
-            type = eSymbolTypeAdditional;
-            break;
-
-          default:
-            break;
           }
-        } else {
-          // uint8_t n_pext    = N_PEXT & nlist.n_type;
-          uint8_t n_type = N_TYPE & nlist.n_type;
-          sym[sym_idx].SetExternal((N_EXT & nlist.n_type) != 0);
 
-          switch (n_type) {
-          case N_INDR: {
-            const char *reexport_name_cstr =
-                strtab_data.PeekCStr(nlist.n_value);
-            if (reexport_name_cstr && reexport_name_cstr[0]) {
-              type = eSymbolTypeReExported;
-              ConstString reexport_name(
-                  reexport_name_cstr +
-                  ((reexport_name_cstr[0] == '_') ? 1 : 0));
-              sym[sym_idx].SetReExportedSymbolName(reexport_name);
-              set_value = false;
-              reexport_shlib_needs_fixup[sym_idx] = reexport_name;
-              indirect_symbol_names.insert(
-                  ConstString(symbol_name + ((symbol_name[0] == '_') ? 1 : 0)));
-            } else
-              type = eSymbolTypeUndefined;
-          } break;
+          if (TEXT_eh_frame_sectID == nlist.n_sect) {
+            type = eSymbolTypeException;
+          } else {
+            uint32_t section_type = symbol_section->Get() & SECTION_TYPE;
 
-          case N_UNDF:
-            if (symbol_name && symbol_name[0]) {
-              ConstString undefined_name(symbol_name +
-                                         ((symbol_name[0] == '_') ? 1 : 0));
-              undefined_name_to_desc[undefined_name] = nlist.n_desc;
-            }
-            LLVM_FALLTHROUGH;
-
-          case N_PBUD:
-            type = eSymbolTypeUndefined;
-            break;
-
-          case N_ABS:
-            type = eSymbolTypeAbsolute;
-            break;
-
-          case N_SECT: {
-            symbol_section =
-                section_info.GetSection(nlist.n_sect, nlist.n_value);
-
-            if (!symbol_section) {
-              // TODO: warn about this?
-              add_nlist = false;
+            switch (section_type) {
+            case S_CSTRING_LITERALS:
+              type = eSymbolTypeData;
+              break; // section with only literal C strings
+            case S_4BYTE_LITERALS:
+              type = eSymbolTypeData;
+              break; // section with only 4 byte literals
+            case S_8BYTE_LITERALS:
+              type = eSymbolTypeData;
+              break; // section with only 8 byte literals
+            case S_LITERAL_POINTERS:
+              type = eSymbolTypeTrampoline;
+              break; // section with only pointers to literals
+            case S_NON_LAZY_SYMBOL_POINTERS:
+              type = eSymbolTypeTrampoline;
+              break; // section with only non-lazy symbol pointers
+            case S_LAZY_SYMBOL_POINTERS:
+              type = eSymbolTypeTrampoline;
+              break; // section with only lazy symbol pointers
+            case S_SYMBOL_STUBS:
+              type = eSymbolTypeTrampoline;
+              break; // section with only symbol stubs, byte size of stub in
+                     // the reserved2 field
+            case S_MOD_INIT_FUNC_POINTERS:
+              type = eSymbolTypeCode;
+              break; // section with only function pointers for initialization
+            case S_MOD_TERM_FUNC_POINTERS:
+              type = eSymbolTypeCode;
+              break; // section with only function pointers for termination
+            case S_INTERPOSING:
+              type = eSymbolTypeTrampoline;
+              break; // section with only pairs of function pointers for
+                     // interposing
+            case S_16BYTE_LITERALS:
+              type = eSymbolTypeData;
+              break; // section with only 16 byte literals
+            case S_DTRACE_DOF:
+              type = eSymbolTypeInstrumentation;
+              break;
+            case S_LAZY_DYLIB_SYMBOL_POINTERS:
+              type = eSymbolTypeTrampoline;
+              break;
+            default:
+              switch (symbol_section->GetType()) {
+              case lldb::eSectionTypeCode:
+                type = eSymbolTypeCode;
+                break;
+              case eSectionTypeData:
+              case eSectionTypeDataCString:         // Inlined C string data
+              case eSectionTypeDataCStringPointers: // Pointers to C string
+                                                    // data
+              case eSectionTypeDataSymbolAddress:   // Address of a symbol in
+                                                    // the symbol table
+              case eSectionTypeData4:
+              case eSectionTypeData8:
+              case eSectionTypeData16:
+                type = eSymbolTypeData;
+                break;
+              default:
+                break;
+              }
               break;
             }
 
-            if (TEXT_eh_frame_sectID == nlist.n_sect) {
-              type = eSymbolTypeException;
-            } else {
-              uint32_t section_type = symbol_section->Get() & SECTION_TYPE;
-
-              switch (section_type) {
-              case S_CSTRING_LITERALS:
-                type = eSymbolTypeData;
-                break; // section with only literal C strings
-              case S_4BYTE_LITERALS:
-                type = eSymbolTypeData;
-                break; // section with only 4 byte literals
-              case S_8BYTE_LITERALS:
-                type = eSymbolTypeData;
-                break; // section with only 8 byte literals
-              case S_LITERAL_POINTERS:
-                type = eSymbolTypeTrampoline;
-                break; // section with only pointers to literals
-              case S_NON_LAZY_SYMBOL_POINTERS:
-                type = eSymbolTypeTrampoline;
-                break; // section with only non-lazy symbol pointers
-              case S_LAZY_SYMBOL_POINTERS:
-                type = eSymbolTypeTrampoline;
-                break; // section with only lazy symbol pointers
-              case S_SYMBOL_STUBS:
-                type = eSymbolTypeTrampoline;
-                break; // section with only symbol stubs, byte size of stub in
-                       // the reserved2 field
-              case S_MOD_INIT_FUNC_POINTERS:
-                type = eSymbolTypeCode;
-                break; // section with only function pointers for initialization
-              case S_MOD_TERM_FUNC_POINTERS:
-                type = eSymbolTypeCode;
-                break; // section with only function pointers for termination
-              case S_INTERPOSING:
-                type = eSymbolTypeTrampoline;
-                break; // section with only pairs of function pointers for
-                       // interposing
-              case S_16BYTE_LITERALS:
-                type = eSymbolTypeData;
-                break; // section with only 16 byte literals
-              case S_DTRACE_DOF:
-                type = eSymbolTypeInstrumentation;
-                break;
-              case S_LAZY_DYLIB_SYMBOL_POINTERS:
-                type = eSymbolTypeTrampoline;
-                break;
-              default:
-                switch (symbol_section->GetType()) {
-                case lldb::eSectionTypeCode:
-                  type = eSymbolTypeCode;
-                  break;
-                case eSectionTypeData:
-                case eSectionTypeDataCString:         // Inlined C string data
-                case eSectionTypeDataCStringPointers: // Pointers to C string
-                                                      // data
-                case eSectionTypeDataSymbolAddress:   // Address of a symbol in
-                                                      // the symbol table
-                case eSectionTypeData4:
-                case eSectionTypeData8:
-                case eSectionTypeData16:
+            if (type == eSymbolTypeInvalid) {
+              const char *symbol_sect_name =
+                  symbol_section->GetName().AsCString();
+              if (symbol_section->IsDescendant(text_section_sp.get())) {
+                if (symbol_section->IsClear(S_ATTR_PURE_INSTRUCTIONS |
+                                            S_ATTR_SELF_MODIFYING_CODE |
+                                            S_ATTR_SOME_INSTRUCTIONS))
                   type = eSymbolTypeData;
-                  break;
-                default:
-                  break;
-                }
-                break;
-              }
+                else
+                  type = eSymbolTypeCode;
+              } else if (symbol_section->IsDescendant(data_section_sp.get()) ||
+                         symbol_section->IsDescendant(
+                             data_dirty_section_sp.get()) ||
+                         symbol_section->IsDescendant(
+                             data_const_section_sp.get())) {
+                if (symbol_sect_name &&
+                    ::strstr(symbol_sect_name, "__objc") == symbol_sect_name) {
+                  type = eSymbolTypeRuntime;
 
-              if (type == eSymbolTypeInvalid) {
-                const char *symbol_sect_name =
-                    symbol_section->GetName().AsCString();
-                if (symbol_section->IsDescendant(text_section_sp.get())) {
-                  if (symbol_section->IsClear(S_ATTR_PURE_INSTRUCTIONS |
-                                              S_ATTR_SELF_MODIFYING_CODE |
-                                              S_ATTR_SOME_INSTRUCTIONS))
-                    type = eSymbolTypeData;
-                  else
-                    type = eSymbolTypeCode;
-                } else if (symbol_section->IsDescendant(
-                               data_section_sp.get()) ||
-                           symbol_section->IsDescendant(
-                               data_dirty_section_sp.get()) ||
-                           symbol_section->IsDescendant(
-                               data_const_section_sp.get())) {
-                  if (symbol_sect_name &&
-                      ::strstr(symbol_sect_name, "__objc") ==
-                          symbol_sect_name) {
-                    type = eSymbolTypeRuntime;
-
-                    if (symbol_name) {
-                      llvm::StringRef symbol_name_ref(symbol_name);
-                      if (symbol_name_ref.startswith("_OBJC_")) {
-                        static const llvm::StringRef g_objc_v2_prefix_class(
-                            "_OBJC_CLASS_$_");
-                        static const llvm::StringRef g_objc_v2_prefix_metaclass(
-                            "_OBJC_METACLASS_$_");
-                        static const llvm::StringRef g_objc_v2_prefix_ivar(
-                            "_OBJC_IVAR_$_");
-                        if (symbol_name_ref.startswith(
-                                g_objc_v2_prefix_class)) {
-                          symbol_name_non_abi_mangled = symbol_name + 1;
-                          symbol_name =
-                              symbol_name + g_objc_v2_prefix_class.size();
-                          type = eSymbolTypeObjCClass;
-                          demangled_is_synthesized = true;
-                        } else if (symbol_name_ref.startswith(
-                                       g_objc_v2_prefix_metaclass)) {
-                          symbol_name_non_abi_mangled = symbol_name + 1;
-                          symbol_name =
-                              symbol_name + g_objc_v2_prefix_metaclass.size();
-                          type = eSymbolTypeObjCMetaClass;
-                          demangled_is_synthesized = true;
-                        } else if (symbol_name_ref.startswith(
-                                       g_objc_v2_prefix_ivar)) {
-                          symbol_name_non_abi_mangled = symbol_name + 1;
-                          symbol_name =
-                              symbol_name + g_objc_v2_prefix_ivar.size();
-                          type = eSymbolTypeObjCIVar;
-                          demangled_is_synthesized = true;
-                        }
+                  if (symbol_name) {
+                    llvm::StringRef symbol_name_ref(symbol_name);
+                    if (symbol_name_ref.startswith("_OBJC_")) {
+                      llvm::StringRef g_objc_v2_prefix_class(
+                          "_OBJC_CLASS_$_");
+                      llvm::StringRef g_objc_v2_prefix_metaclass(
+                          "_OBJC_METACLASS_$_");
+                      llvm::StringRef g_objc_v2_prefix_ivar(
+                          "_OBJC_IVAR_$_");
+                      if (symbol_name_ref.startswith(g_objc_v2_prefix_class)) {
+                        symbol_name_non_abi_mangled = symbol_name + 1;
+                        symbol_name =
+                            symbol_name + g_objc_v2_prefix_class.size();
+                        type = eSymbolTypeObjCClass;
+                        demangled_is_synthesized = true;
+                      } else if (symbol_name_ref.startswith(
+                                     g_objc_v2_prefix_metaclass)) {
+                        symbol_name_non_abi_mangled = symbol_name + 1;
+                        symbol_name =
+                            symbol_name + g_objc_v2_prefix_metaclass.size();
+                        type = eSymbolTypeObjCMetaClass;
+                        demangled_is_synthesized = true;
+                      } else if (symbol_name_ref.startswith(
+                                     g_objc_v2_prefix_ivar)) {
+                        symbol_name_non_abi_mangled = symbol_name + 1;
+                        symbol_name =
+                            symbol_name + g_objc_v2_prefix_ivar.size();
+                        type = eSymbolTypeObjCIVar;
+                        demangled_is_synthesized = true;
                       }
                     }
-                  } else if (symbol_sect_name &&
-                             ::strstr(symbol_sect_name, "__gcc_except_tab") ==
-                                 symbol_sect_name) {
-                    type = eSymbolTypeException;
-                  } else {
-                    type = eSymbolTypeData;
                   }
                 } else if (symbol_sect_name &&
-                           ::strstr(symbol_sect_name, "__IMPORT") ==
+                           ::strstr(symbol_sect_name, "__gcc_except_tab") ==
                                symbol_sect_name) {
-                  type = eSymbolTypeTrampoline;
-                } else if (symbol_section->IsDescendant(
-                               objc_section_sp.get())) {
-                  type = eSymbolTypeRuntime;
-                  if (symbol_name && symbol_name[0] == '.') {
-                    llvm::StringRef symbol_name_ref(symbol_name);
-                    static const llvm::StringRef g_objc_v1_prefix_class(
-                        ".objc_class_name_");
-                    if (symbol_name_ref.startswith(g_objc_v1_prefix_class)) {
-                      symbol_name_non_abi_mangled = symbol_name;
-                      symbol_name = symbol_name + g_objc_v1_prefix_class.size();
-                      type = eSymbolTypeObjCClass;
-                      demangled_is_synthesized = true;
-                    }
+                  type = eSymbolTypeException;
+                } else {
+                  type = eSymbolTypeData;
+                }
+              } else if (symbol_sect_name &&
+                         ::strstr(symbol_sect_name, "__IMPORT") ==
+                             symbol_sect_name) {
+                type = eSymbolTypeTrampoline;
+              } else if (symbol_section->IsDescendant(objc_section_sp.get())) {
+                type = eSymbolTypeRuntime;
+                if (symbol_name && symbol_name[0] == '.') {
+                  llvm::StringRef symbol_name_ref(symbol_name);
+                  llvm::StringRef g_objc_v1_prefix_class(
+                      ".objc_class_name_");
+                  if (symbol_name_ref.startswith(g_objc_v1_prefix_class)) {
+                    symbol_name_non_abi_mangled = symbol_name;
+                    symbol_name = symbol_name + g_objc_v1_prefix_class.size();
+                    type = eSymbolTypeObjCClass;
+                    demangled_is_synthesized = true;
                   }
                 }
               }
             }
-          } break;
           }
+        } break;
+        }
+      }
+
+      if (!add_nlist) {
+        sym[sym_idx].Clear();
+        return true;
+      }
+
+      uint64_t symbol_value = nlist.n_value;
+
+      if (symbol_name_non_abi_mangled) {
+        sym[sym_idx].GetMangled().SetMangledName(
+            ConstString(symbol_name_non_abi_mangled));
+        sym[sym_idx].GetMangled().SetDemangledName(ConstString(symbol_name));
+      } else {
+        bool symbol_name_is_mangled = false;
+
+        if (symbol_name && symbol_name[0] == '_') {
+          symbol_name_is_mangled = symbol_name[1] == '_';
+          symbol_name++; // Skip the leading underscore
         }
 
-        if (add_nlist) {
-          uint64_t symbol_value = nlist.n_value;
+        if (symbol_name) {
+          ConstString const_symbol_name(symbol_name);
+          sym[sym_idx].GetMangled().SetValue(const_symbol_name,
+                                             symbol_name_is_mangled);
+        }
+      }
 
-          if (symbol_name_non_abi_mangled) {
-            sym[sym_idx].GetMangled().SetMangledName(
-                ConstString(symbol_name_non_abi_mangled));
-            sym[sym_idx].GetMangled().SetDemangledName(
-                ConstString(symbol_name));
-          } else {
-            bool symbol_name_is_mangled = false;
+      if (is_gsym) {
+        const char *gsym_name =
+            sym[sym_idx]
+                .GetMangled()
+                .GetName(lldb::eLanguageTypeUnknown, Mangled::ePreferMangled)
+                .GetCString();
+        if (gsym_name)
+          N_GSYM_name_to_sym_idx[gsym_name] = sym_idx;
+      }
 
-            if (symbol_name && symbol_name[0] == '_') {
-              symbol_name_is_mangled = symbol_name[1] == '_';
-              symbol_name++; // Skip the leading underscore
-            }
-
-            if (symbol_name) {
-              ConstString const_symbol_name(symbol_name);
-              sym[sym_idx].GetMangled().SetValue(const_symbol_name,
-                                                 symbol_name_is_mangled);
+      if (symbol_section) {
+        const addr_t section_file_addr = symbol_section->GetFileAddress();
+        if (symbol_byte_size == 0 && function_starts_count > 0) {
+          addr_t symbol_lookup_file_addr = nlist.n_value;
+          // Do an exact address match for non-ARM addresses, else get the
+          // closest since the symbol might be a thumb symbol which has an
+          // address with bit zero set.
+          FunctionStarts::Entry *func_start_entry =
+              function_starts.FindEntry(symbol_lookup_file_addr, !is_arm);
+          if (is_arm && func_start_entry) {
+            // Verify that the function start address is the symbol address
+            // (ARM) or the symbol address + 1 (thumb).
+            if (func_start_entry->addr != symbol_lookup_file_addr &&
+                func_start_entry->addr != (symbol_lookup_file_addr + 1)) {
+              // Not the right entry, NULL it out...
+              func_start_entry = nullptr;
             }
           }
+          if (func_start_entry) {
+            func_start_entry->data = true;
 
-          if (is_gsym) {
+            addr_t symbol_file_addr = func_start_entry->addr;
+            if (is_arm)
+              symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
+
+            const FunctionStarts::Entry *next_func_start_entry =
+                function_starts.FindNextEntry(func_start_entry);
+            const addr_t section_end_file_addr =
+                section_file_addr + symbol_section->GetByteSize();
+            if (next_func_start_entry) {
+              addr_t next_symbol_file_addr = next_func_start_entry->addr;
+              // Be sure the clear the Thumb address bit when we calculate the
+              // size from the current and next address
+              if (is_arm)
+                next_symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
+              symbol_byte_size = std::min<lldb::addr_t>(
+                  next_symbol_file_addr - symbol_file_addr,
+                  section_end_file_addr - symbol_file_addr);
+            } else {
+              symbol_byte_size = section_end_file_addr - symbol_file_addr;
+            }
+          }
+        }
+        symbol_value -= section_file_addr;
+      }
+
+      if (!is_debug) {
+        if (type == eSymbolTypeCode) {
+          // See if we can find a N_FUN entry for any code symbols. If we do
+          // find a match, and the name matches, then we can merge the two into
+          // just the function symbol to avoid duplicate entries in the symbol
+          // table.
+          std::pair<ValueToSymbolIndexMap::const_iterator,
+                    ValueToSymbolIndexMap::const_iterator>
+              range;
+          range = N_FUN_addr_to_sym_idx.equal_range(nlist.n_value);
+          if (range.first != range.second) {
+            for (ValueToSymbolIndexMap::const_iterator pos = range.first;
+                 pos != range.second; ++pos) {
+              if (sym[sym_idx].GetMangled().GetName(lldb::eLanguageTypeUnknown,
+                                                    Mangled::ePreferMangled) ==
+                  sym[pos->second].GetMangled().GetName(
+                      lldb::eLanguageTypeUnknown, Mangled::ePreferMangled)) {
+                m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
+                // We just need the flags from the linker symbol, so put these
+                // flags into the N_FUN flags to avoid duplicate symbols in the
+                // symbol table.
+                sym[pos->second].SetExternal(sym[sym_idx].IsExternal());
+                sym[pos->second].SetFlags(nlist.n_type << 16 | nlist.n_desc);
+                if (resolver_addresses.find(nlist.n_value) !=
+                    resolver_addresses.end())
+                  sym[pos->second].SetType(eSymbolTypeResolver);
+                sym[sym_idx].Clear();
+                return true;
+              }
+            }
+          } else {
+            if (resolver_addresses.find(nlist.n_value) !=
+                resolver_addresses.end())
+              type = eSymbolTypeResolver;
+          }
+        } else if (type == eSymbolTypeData || type == eSymbolTypeObjCClass ||
+                   type == eSymbolTypeObjCMetaClass ||
+                   type == eSymbolTypeObjCIVar) {
+          // See if we can find a N_STSYM entry for any data symbols. If we do
+          // find a match, and the name matches, then we can merge the two into
+          // just the Static symbol to avoid duplicate entries in the symbol
+          // table.
+          std::pair<ValueToSymbolIndexMap::const_iterator,
+                    ValueToSymbolIndexMap::const_iterator>
+              range;
+          range = N_STSYM_addr_to_sym_idx.equal_range(nlist.n_value);
+          if (range.first != range.second) {
+            for (ValueToSymbolIndexMap::const_iterator pos = range.first;
+                 pos != range.second; ++pos) {
+              if (sym[sym_idx].GetMangled().GetName(lldb::eLanguageTypeUnknown,
+                                                    Mangled::ePreferMangled) ==
+                  sym[pos->second].GetMangled().GetName(
+                      lldb::eLanguageTypeUnknown, Mangled::ePreferMangled)) {
+                m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
+                // We just need the flags from the linker symbol, so put these
+                // flags into the N_STSYM flags to avoid duplicate symbols in
+                // the symbol table.
+                sym[pos->second].SetExternal(sym[sym_idx].IsExternal());
+                sym[pos->second].SetFlags(nlist.n_type << 16 | nlist.n_desc);
+                sym[sym_idx].Clear();
+                return true;
+              }
+            }
+          } else {
+            // Combine N_GSYM stab entries with the non stab symbol.
             const char *gsym_name = sym[sym_idx]
                                         .GetMangled()
                                         .GetName(lldb::eLanguageTypeUnknown,
                                                  Mangled::ePreferMangled)
                                         .GetCString();
-            if (gsym_name)
-              N_GSYM_name_to_sym_idx[gsym_name] = sym_idx;
-          }
-
-          if (symbol_section) {
-            const addr_t section_file_addr = symbol_section->GetFileAddress();
-            if (symbol_byte_size == 0 && function_starts_count > 0) {
-              addr_t symbol_lookup_file_addr = nlist.n_value;
-              // Do an exact address match for non-ARM addresses, else get the
-              // closest since the symbol might be a thumb symbol which has an
-              // address with bit zero set
-              FunctionStarts::Entry *func_start_entry =
-                  function_starts.FindEntry(symbol_lookup_file_addr, !is_arm);
-              if (is_arm && func_start_entry) {
-                // Verify that the function start address is the symbol address
-                // (ARM) or the symbol address + 1 (thumb)
-                if (func_start_entry->addr != symbol_lookup_file_addr &&
-                    func_start_entry->addr != (symbol_lookup_file_addr + 1)) {
-                  // Not the right entry, NULL it out...
-                  func_start_entry = nullptr;
-                }
-              }
-              if (func_start_entry) {
-                func_start_entry->data = true;
-
-                addr_t symbol_file_addr = func_start_entry->addr;
-                if (is_arm)
-                  symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
-
-                const FunctionStarts::Entry *next_func_start_entry =
-                    function_starts.FindNextEntry(func_start_entry);
-                const addr_t section_end_file_addr =
-                    section_file_addr + symbol_section->GetByteSize();
-                if (next_func_start_entry) {
-                  addr_t next_symbol_file_addr = next_func_start_entry->addr;
-                  // Be sure the clear the Thumb address bit when we calculate
-                  // the size from the current and next address
-                  if (is_arm)
-                    next_symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
-                  symbol_byte_size = std::min<lldb::addr_t>(
-                      next_symbol_file_addr - symbol_file_addr,
-                      section_end_file_addr - symbol_file_addr);
-                } else {
-                  symbol_byte_size = section_end_file_addr - symbol_file_addr;
-                }
-              }
-            }
-            symbol_value -= section_file_addr;
-          }
-
-          if (!is_debug) {
-            if (type == eSymbolTypeCode) {
-              // See if we can find a N_FUN entry for any code symbols. If we
-              // do find a match, and the name matches, then we can merge the
-              // two into just the function symbol to avoid duplicate entries
-              // in the symbol table
-              std::pair<ValueToSymbolIndexMap::const_iterator,
-                        ValueToSymbolIndexMap::const_iterator>
-                  range;
-              range = N_FUN_addr_to_sym_idx.equal_range(nlist.n_value);
-              if (range.first != range.second) {
-                bool found_it = false;
-                for (ValueToSymbolIndexMap::const_iterator pos = range.first;
-                     pos != range.second; ++pos) {
-                  if (sym[sym_idx].GetMangled().GetName(
-                          lldb::eLanguageTypeUnknown,
-                          Mangled::ePreferMangled) ==
-                      sym[pos->second].GetMangled().GetName(
-                          lldb::eLanguageTypeUnknown,
-                          Mangled::ePreferMangled)) {
-                    m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
-                    // We just need the flags from the linker symbol, so put
-                    // these flags into the N_FUN flags to avoid duplicate
-                    // symbols in the symbol table
-                    sym[pos->second].SetExternal(sym[sym_idx].IsExternal());
-                    sym[pos->second].SetFlags(nlist.n_type << 16 |
-                                              nlist.n_desc);
-                    if (resolver_addresses.find(nlist.n_value) !=
-                        resolver_addresses.end())
-                      sym[pos->second].SetType(eSymbolTypeResolver);
-                    sym[sym_idx].Clear();
-                    found_it = true;
-                    break;
-                  }
-                }
-                if (found_it)
-                  continue;
-              } else {
-                if (resolver_addresses.find(nlist.n_value) !=
-                    resolver_addresses.end())
-                  type = eSymbolTypeResolver;
-              }
-            } else if (type == eSymbolTypeData ||
-                       type == eSymbolTypeObjCClass ||
-                       type == eSymbolTypeObjCMetaClass ||
-                       type == eSymbolTypeObjCIVar) {
-              // See if we can find a N_STSYM entry for any data symbols. If we
-              // do find a match, and the name matches, then we can merge the
-              // two into just the Static symbol to avoid duplicate entries in
-              // the symbol table
-              std::pair<ValueToSymbolIndexMap::const_iterator,
-                        ValueToSymbolIndexMap::const_iterator>
-                  range;
-              range = N_STSYM_addr_to_sym_idx.equal_range(nlist.n_value);
-              if (range.first != range.second) {
-                bool found_it = false;
-                for (ValueToSymbolIndexMap::const_iterator pos = range.first;
-                     pos != range.second; ++pos) {
-                  if (sym[sym_idx].GetMangled().GetName(
-                          lldb::eLanguageTypeUnknown,
-                          Mangled::ePreferMangled) ==
-                      sym[pos->second].GetMangled().GetName(
-                          lldb::eLanguageTypeUnknown,
-                          Mangled::ePreferMangled)) {
-                    m_nlist_idx_to_sym_idx[nlist_idx] = pos->second;
-                    // We just need the flags from the linker symbol, so put
-                    // these flags into the N_STSYM flags to avoid duplicate
-                    // symbols in the symbol table
-                    sym[pos->second].SetExternal(sym[sym_idx].IsExternal());
-                    sym[pos->second].SetFlags(nlist.n_type << 16 |
-                                              nlist.n_desc);
-                    sym[sym_idx].Clear();
-                    found_it = true;
-                    break;
-                  }
-                }
-                if (found_it)
-                  continue;
-              } else {
-                // Combine N_GSYM stab entries with the non stab symbol
-                const char *gsym_name = sym[sym_idx]
-                                            .GetMangled()
-                                            .GetName(lldb::eLanguageTypeUnknown,
-                                                     Mangled::ePreferMangled)
-                                            .GetCString();
-                if (gsym_name) {
-                  ConstNameToSymbolIndexMap::const_iterator pos =
-                      N_GSYM_name_to_sym_idx.find(gsym_name);
-                  if (pos != N_GSYM_name_to_sym_idx.end()) {
-                    const uint32_t GSYM_sym_idx = pos->second;
-                    m_nlist_idx_to_sym_idx[nlist_idx] = GSYM_sym_idx;
-                    // Copy the address, because often the N_GSYM address has
-                    // an invalid address of zero when the global is a common
-                    // symbol
-                    sym[GSYM_sym_idx].GetAddressRef().SetSection(
-                        symbol_section);
-                    sym[GSYM_sym_idx].GetAddressRef().SetOffset(symbol_value);
-                    // We just need the flags from the linker symbol, so put
-                    // these flags into the N_GSYM flags to avoid duplicate
-                    // symbols in the symbol table
-                    sym[GSYM_sym_idx].SetFlags(nlist.n_type << 16 |
-                                               nlist.n_desc);
-                    sym[sym_idx].Clear();
-                    continue;
-                  }
-                }
+            if (gsym_name) {
+              ConstNameToSymbolIndexMap::const_iterator pos =
+                  N_GSYM_name_to_sym_idx.find(gsym_name);
+              if (pos != N_GSYM_name_to_sym_idx.end()) {
+                const uint32_t GSYM_sym_idx = pos->second;
+                m_nlist_idx_to_sym_idx[nlist_idx] = GSYM_sym_idx;
+                // Copy the address, because often the N_GSYM address has an
+                // invalid address of zero when the global is a common symbol.
+                sym[GSYM_sym_idx].GetAddressRef().SetSection(symbol_section);
+                sym[GSYM_sym_idx].GetAddressRef().SetOffset(symbol_value);
+                // We just need the flags from the linker symbol, so put these
+                // flags into the N_GSYM flags to avoid duplicate symbols in
+                // the symbol table.
+                sym[GSYM_sym_idx].SetFlags(nlist.n_type << 16 | nlist.n_desc);
+                sym[sym_idx].Clear();
+                return true;
               }
             }
           }
-
-          sym[sym_idx].SetID(nlist_idx);
-          sym[sym_idx].SetType(type);
-          if (set_value) {
-            sym[sym_idx].GetAddressRef().SetSection(symbol_section);
-            sym[sym_idx].GetAddressRef().SetOffset(symbol_value);
-          }
-          sym[sym_idx].SetFlags(nlist.n_type << 16 | nlist.n_desc);
-          if (nlist.n_desc & N_WEAK_REF)
-            sym[sym_idx].SetIsWeak(true);
-
-          if (symbol_byte_size > 0)
-            sym[sym_idx].SetByteSize(symbol_byte_size);
-
-          if (demangled_is_synthesized)
-            sym[sym_idx].SetDemangledNameIsSynthesized(true);
-
-          ++sym_idx;
-        } else {
-          sym[sym_idx].Clear();
         }
       }
 
-      for (const auto &pos : reexport_shlib_needs_fixup) {
-        const auto undef_pos = undefined_name_to_desc.find(pos.second);
-        if (undef_pos != undefined_name_to_desc.end()) {
-          const uint8_t dylib_ordinal =
-              llvm::MachO::GET_LIBRARY_ORDINAL(undef_pos->second);
-          if (dylib_ordinal > 0 && dylib_ordinal < dylib_files.GetSize())
-            sym[pos.first].SetReExportedSymbolSharedLibrary(
-                dylib_files.GetFileSpecAtIndex(dylib_ordinal - 1));
-        }
+      sym[sym_idx].SetID(nlist_idx);
+      sym[sym_idx].SetType(type);
+      if (set_value) {
+        sym[sym_idx].GetAddressRef().SetSection(symbol_section);
+        sym[sym_idx].GetAddressRef().SetOffset(symbol_value);
       }
+      sym[sym_idx].SetFlags(nlist.n_type << 16 | nlist.n_desc);
+      if (nlist.n_desc & N_WEAK_REF)
+        sym[sym_idx].SetIsWeak(true);
+
+      if (symbol_byte_size > 0)
+        sym[sym_idx].SetByteSize(symbol_byte_size);
+
+      if (demangled_is_synthesized)
+        sym[sym_idx].SetDemangledNameIsSynthesized(true);
+
+      ++sym_idx;
+      return true;
+    };
+
+    // First parse all the nlists but don't process them yet. See the next
+    // comment for an explanation why.
+    std::vector<struct nlist_64> nlists;
+    nlists.reserve(symtab_load_command.nsyms);
+    for (; nlist_idx < symtab_load_command.nsyms; ++nlist_idx) {
+      if (auto nlist =
+              ParseNList(nlist_data, nlist_data_offset, nlist_byte_size))
+        nlists.push_back(*nlist);
+      else
+        break;
     }
 
-    uint32_t synthetic_sym_id = symtab_load_command.nsyms;
-
-    if (function_starts_count > 0) {
-      uint32_t num_synthetic_function_symbols = 0;
-      for (i = 0; i < function_starts_count; ++i) {
-        if (!function_starts.GetEntryRef(i).data)
-          ++num_synthetic_function_symbols;
-      }
-
-      if (num_synthetic_function_symbols > 0) {
-        if (num_syms < sym_idx + num_synthetic_function_symbols) {
-          num_syms = sym_idx + num_synthetic_function_symbols;
-          sym = symtab->Resize(num_syms);
-        }
-        for (i = 0; i < function_starts_count; ++i) {
-          const FunctionStarts::Entry *func_start_entry =
-              function_starts.GetEntryAtIndex(i);
-          if (!func_start_entry->data) {
-            addr_t symbol_file_addr = func_start_entry->addr;
-            uint32_t symbol_flags = 0;
-            if (is_arm) {
-              if (symbol_file_addr & 1)
-                symbol_flags = MACHO_NLIST_ARM_SYMBOL_IS_THUMB;
-              symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
-            }
-            Address symbol_addr;
-            if (module_sp->ResolveFileAddress(symbol_file_addr, symbol_addr)) {
-              SectionSP symbol_section(symbol_addr.GetSection());
-              uint32_t symbol_byte_size = 0;
-              if (symbol_section) {
-                const addr_t section_file_addr =
-                    symbol_section->GetFileAddress();
-                const FunctionStarts::Entry *next_func_start_entry =
-                    function_starts.FindNextEntry(func_start_entry);
-                const addr_t section_end_file_addr =
-                    section_file_addr + symbol_section->GetByteSize();
-                if (next_func_start_entry) {
-                  addr_t next_symbol_file_addr = next_func_start_entry->addr;
-                  if (is_arm)
-                    next_symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
-                  symbol_byte_size = std::min<lldb::addr_t>(
-                      next_symbol_file_addr - symbol_file_addr,
-                      section_end_file_addr - symbol_file_addr);
-                } else {
-                  symbol_byte_size = section_end_file_addr - symbol_file_addr;
-                }
-                sym[sym_idx].SetID(synthetic_sym_id++);
-                sym[sym_idx].GetMangled().SetDemangledName(
-                    GetNextSyntheticSymbolName());
-                sym[sym_idx].SetType(eSymbolTypeCode);
-                sym[sym_idx].SetIsSynthetic(true);
-                sym[sym_idx].GetAddressRef() = symbol_addr;
-                if (symbol_flags)
-                  sym[sym_idx].SetFlags(symbol_flags);
-                if (symbol_byte_size)
-                  sym[sym_idx].SetByteSize(symbol_byte_size);
-                ++sym_idx;
-              }
-            }
-          }
-        }
-      }
+    // Now parse all the debug symbols. This is needed to merge non-debug
+    // symbols in the next step. Non-debug symbols are always coalesced into
+    // the debug symbol. Doing this in one step would mean that some symbols
+    // won't be merged.
+    nlist_idx = 0;
+    for (auto &nlist : nlists) {
+      if (!ParseSymbolLambda(nlist, nlist_idx++, DebugSymbols))
+        break;
     }
 
-    // Trim our symbols down to just what we ended up with after removing any
-    // symbols.
-    if (sym_idx < num_syms) {
-      num_syms = sym_idx;
-      sym = symtab->Resize(num_syms);
+    // Finally parse all the non debug symbols.
+    nlist_idx = 0;
+    for (auto &nlist : nlists) {
+      if (!ParseSymbolLambda(nlist, nlist_idx++, NonDebugSymbols))
+        break;
     }
 
-    // Now synthesize indirect symbols
-    if (m_dysymtab.nindirectsyms != 0) {
-      if (indirect_symbol_index_data.GetByteSize()) {
-        NListIndexToSymbolIndexMap::const_iterator end_index_pos =
-            m_nlist_idx_to_sym_idx.end();
-
-        for (uint32_t sect_idx = 1; sect_idx < m_mach_sections.size();
-             ++sect_idx) {
-          if ((m_mach_sections[sect_idx].flags & SECTION_TYPE) ==
-              S_SYMBOL_STUBS) {
-            uint32_t symbol_stub_byte_size =
-                m_mach_sections[sect_idx].reserved2;
-            if (symbol_stub_byte_size == 0)
-              continue;
-
-            const uint32_t num_symbol_stubs =
-                m_mach_sections[sect_idx].size / symbol_stub_byte_size;
-
-            if (num_symbol_stubs == 0)
-              continue;
-
-            const uint32_t symbol_stub_index_offset =
-                m_mach_sections[sect_idx].reserved1;
-            for (uint32_t stub_idx = 0; stub_idx < num_symbol_stubs;
-                 ++stub_idx) {
-              const uint32_t symbol_stub_index =
-                  symbol_stub_index_offset + stub_idx;
-              const lldb::addr_t symbol_stub_addr =
-                  m_mach_sections[sect_idx].addr +
-                  (stub_idx * symbol_stub_byte_size);
-              lldb::offset_t symbol_stub_offset = symbol_stub_index * 4;
-              if (indirect_symbol_index_data.ValidOffsetForDataOfSize(
-                      symbol_stub_offset, 4)) {
-                const uint32_t stub_sym_id =
-                    indirect_symbol_index_data.GetU32(&symbol_stub_offset);
-                if (stub_sym_id & (INDIRECT_SYMBOL_ABS | INDIRECT_SYMBOL_LOCAL))
-                  continue;
-
-                NListIndexToSymbolIndexMap::const_iterator index_pos =
-                    m_nlist_idx_to_sym_idx.find(stub_sym_id);
-                Symbol *stub_symbol = nullptr;
-                if (index_pos != end_index_pos) {
-                  // We have a remapping from the original nlist index to a
-                  // current symbol index, so just look this up by index
-                  stub_symbol = symtab->SymbolAtIndex(index_pos->second);
-                } else {
-                  // We need to lookup a symbol using the original nlist symbol
-                  // index since this index is coming from the S_SYMBOL_STUBS
-                  stub_symbol = symtab->FindSymbolByID(stub_sym_id);
-                }
-
-                if (stub_symbol) {
-                  Address so_addr(symbol_stub_addr, section_list);
-
-                  if (stub_symbol->GetType() == eSymbolTypeUndefined) {
-                    // Change the external symbol into a trampoline that makes
-                    // sense These symbols were N_UNDF N_EXT, and are useless
-                    // to us, so we can re-use them so we don't have to make up
-                    // a synthetic symbol for no good reason.
-                    if (resolver_addresses.find(symbol_stub_addr) ==
-                        resolver_addresses.end())
-                      stub_symbol->SetType(eSymbolTypeTrampoline);
-                    else
-                      stub_symbol->SetType(eSymbolTypeResolver);
-                    stub_symbol->SetExternal(false);
-                    stub_symbol->GetAddressRef() = so_addr;
-                    stub_symbol->SetByteSize(symbol_stub_byte_size);
-                  } else {
-                    // Make a synthetic symbol to describe the trampoline stub
-                    Mangled stub_symbol_mangled_name(stub_symbol->GetMangled());
-                    if (sym_idx >= num_syms) {
-                      sym = symtab->Resize(++num_syms);
-                      stub_symbol = nullptr; // this pointer no longer valid
-                    }
-                    sym[sym_idx].SetID(synthetic_sym_id++);
-                    sym[sym_idx].GetMangled() = stub_symbol_mangled_name;
-                    if (resolver_addresses.find(symbol_stub_addr) ==
-                        resolver_addresses.end())
-                      sym[sym_idx].SetType(eSymbolTypeTrampoline);
-                    else
-                      sym[sym_idx].SetType(eSymbolTypeResolver);
-                    sym[sym_idx].SetIsSynthetic(true);
-                    sym[sym_idx].GetAddressRef() = so_addr;
-                    sym[sym_idx].SetByteSize(symbol_stub_byte_size);
-                    ++sym_idx;
-                  }
-                } else {
-                  if (log)
-                    log->Warning("symbol stub referencing symbol table symbol "
-                                 "%u that isn't in our minimal symbol table, "
-                                 "fix this!!!",
-                                 stub_sym_id);
-                }
-              }
-            }
-          }
-        }
+    for (const auto &pos : reexport_shlib_needs_fixup) {
+      const auto undef_pos = undefined_name_to_desc.find(pos.second);
+      if (undef_pos != undefined_name_to_desc.end()) {
+        const uint8_t dylib_ordinal =
+            llvm::MachO::GET_LIBRARY_ORDINAL(undef_pos->second);
+        if (dylib_ordinal > 0 && dylib_ordinal < dylib_files.GetSize())
+          sym[pos.first].SetReExportedSymbolSharedLibrary(
+              dylib_files.GetFileSpecAtIndex(dylib_ordinal - 1));
       }
     }
-
-    if (!trie_entries.empty()) {
-      for (const auto &e : trie_entries) {
-        if (e.entry.import_name) {
-          // Only add indirect symbols from the Trie entries if we didn't have
-          // a N_INDR nlist entry for this already
-          if (indirect_symbol_names.find(e.entry.name) ==
-              indirect_symbol_names.end()) {
-            // Make a synthetic symbol to describe re-exported symbol.
-            if (sym_idx >= num_syms)
-              sym = symtab->Resize(++num_syms);
-            sym[sym_idx].SetID(synthetic_sym_id++);
-            sym[sym_idx].GetMangled() = Mangled(e.entry.name);
-            sym[sym_idx].SetType(eSymbolTypeReExported);
-            sym[sym_idx].SetIsSynthetic(true);
-            sym[sym_idx].SetReExportedSymbolName(e.entry.import_name);
-            if (e.entry.other > 0 && e.entry.other <= dylib_files.GetSize()) {
-              sym[sym_idx].SetReExportedSymbolSharedLibrary(
-                  dylib_files.GetFileSpecAtIndex(e.entry.other - 1));
-            }
-            ++sym_idx;
-          }
-        }
-      }
-    }
-
-    //        StreamFile s(stdout, false);
-    //        s.Printf ("Symbol table before CalculateSymbolSizes():\n");
-    //        symtab->Dump(&s, NULL, eSortOrderNone);
-    // Set symbol byte sizes correctly since mach-o nlist entries don't have
-    // sizes
-    symtab->CalculateSymbolSizes();
-
-    //        s.Printf ("Symbol table after CalculateSymbolSizes():\n");
-    //        symtab->Dump(&s, NULL, eSortOrderNone);
-
-    return symtab->GetNumSymbols();
   }
-  return 0;
+
+  uint32_t synthetic_sym_id = symtab_load_command.nsyms;
+
+  if (function_starts_count > 0) {
+    uint32_t num_synthetic_function_symbols = 0;
+    for (i = 0; i < function_starts_count; ++i) {
+      if (!function_starts.GetEntryRef(i).data)
+        ++num_synthetic_function_symbols;
+    }
+
+    if (num_synthetic_function_symbols > 0) {
+      if (num_syms < sym_idx + num_synthetic_function_symbols) {
+        num_syms = sym_idx + num_synthetic_function_symbols;
+        sym = symtab->Resize(num_syms);
+      }
+      for (i = 0; i < function_starts_count; ++i) {
+        const FunctionStarts::Entry *func_start_entry =
+            function_starts.GetEntryAtIndex(i);
+        if (!func_start_entry->data) {
+          addr_t symbol_file_addr = func_start_entry->addr;
+          uint32_t symbol_flags = 0;
+          if (is_arm) {
+            if (symbol_file_addr & 1)
+              symbol_flags = MACHO_NLIST_ARM_SYMBOL_IS_THUMB;
+            symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
+          }
+          Address symbol_addr;
+          if (module_sp->ResolveFileAddress(symbol_file_addr, symbol_addr)) {
+            SectionSP symbol_section(symbol_addr.GetSection());
+            uint32_t symbol_byte_size = 0;
+            if (symbol_section) {
+              const addr_t section_file_addr = symbol_section->GetFileAddress();
+              const FunctionStarts::Entry *next_func_start_entry =
+                  function_starts.FindNextEntry(func_start_entry);
+              const addr_t section_end_file_addr =
+                  section_file_addr + symbol_section->GetByteSize();
+              if (next_func_start_entry) {
+                addr_t next_symbol_file_addr = next_func_start_entry->addr;
+                if (is_arm)
+                  next_symbol_file_addr &= THUMB_ADDRESS_BIT_MASK;
+                symbol_byte_size = std::min<lldb::addr_t>(
+                    next_symbol_file_addr - symbol_file_addr,
+                    section_end_file_addr - symbol_file_addr);
+              } else {
+                symbol_byte_size = section_end_file_addr - symbol_file_addr;
+              }
+              sym[sym_idx].SetID(synthetic_sym_id++);
+              sym[sym_idx].GetMangled().SetDemangledName(
+                  GetNextSyntheticSymbolName());
+              sym[sym_idx].SetType(eSymbolTypeCode);
+              sym[sym_idx].SetIsSynthetic(true);
+              sym[sym_idx].GetAddressRef() = symbol_addr;
+              if (symbol_flags)
+                sym[sym_idx].SetFlags(symbol_flags);
+              if (symbol_byte_size)
+                sym[sym_idx].SetByteSize(symbol_byte_size);
+              ++sym_idx;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  // Trim our symbols down to just what we ended up with after removing any
+  // symbols.
+  if (sym_idx < num_syms) {
+    num_syms = sym_idx;
+    sym = symtab->Resize(num_syms);
+  }
+
+  // Now synthesize indirect symbols
+  if (m_dysymtab.nindirectsyms != 0) {
+    if (indirect_symbol_index_data.GetByteSize()) {
+      NListIndexToSymbolIndexMap::const_iterator end_index_pos =
+          m_nlist_idx_to_sym_idx.end();
+
+      for (uint32_t sect_idx = 1; sect_idx < m_mach_sections.size();
+           ++sect_idx) {
+        if ((m_mach_sections[sect_idx].flags & SECTION_TYPE) ==
+            S_SYMBOL_STUBS) {
+          uint32_t symbol_stub_byte_size = m_mach_sections[sect_idx].reserved2;
+          if (symbol_stub_byte_size == 0)
+            continue;
+
+          const uint32_t num_symbol_stubs =
+              m_mach_sections[sect_idx].size / symbol_stub_byte_size;
+
+          if (num_symbol_stubs == 0)
+            continue;
+
+          const uint32_t symbol_stub_index_offset =
+              m_mach_sections[sect_idx].reserved1;
+          for (uint32_t stub_idx = 0; stub_idx < num_symbol_stubs; ++stub_idx) {
+            const uint32_t symbol_stub_index =
+                symbol_stub_index_offset + stub_idx;
+            const lldb::addr_t symbol_stub_addr =
+                m_mach_sections[sect_idx].addr +
+                (stub_idx * symbol_stub_byte_size);
+            lldb::offset_t symbol_stub_offset = symbol_stub_index * 4;
+            if (indirect_symbol_index_data.ValidOffsetForDataOfSize(
+                    symbol_stub_offset, 4)) {
+              const uint32_t stub_sym_id =
+                  indirect_symbol_index_data.GetU32(&symbol_stub_offset);
+              if (stub_sym_id & (INDIRECT_SYMBOL_ABS | INDIRECT_SYMBOL_LOCAL))
+                continue;
+
+              NListIndexToSymbolIndexMap::const_iterator index_pos =
+                  m_nlist_idx_to_sym_idx.find(stub_sym_id);
+              Symbol *stub_symbol = nullptr;
+              if (index_pos != end_index_pos) {
+                // We have a remapping from the original nlist index to a
+                // current symbol index, so just look this up by index
+                stub_symbol = symtab->SymbolAtIndex(index_pos->second);
+              } else {
+                // We need to lookup a symbol using the original nlist symbol
+                // index since this index is coming from the S_SYMBOL_STUBS
+                stub_symbol = symtab->FindSymbolByID(stub_sym_id);
+              }
+
+              if (stub_symbol) {
+                Address so_addr(symbol_stub_addr, section_list);
+
+                if (stub_symbol->GetType() == eSymbolTypeUndefined) {
+                  // Change the external symbol into a trampoline that makes
+                  // sense These symbols were N_UNDF N_EXT, and are useless
+                  // to us, so we can re-use them so we don't have to make up
+                  // a synthetic symbol for no good reason.
+                  if (resolver_addresses.find(symbol_stub_addr) ==
+                      resolver_addresses.end())
+                    stub_symbol->SetType(eSymbolTypeTrampoline);
+                  else
+                    stub_symbol->SetType(eSymbolTypeResolver);
+                  stub_symbol->SetExternal(false);
+                  stub_symbol->GetAddressRef() = so_addr;
+                  stub_symbol->SetByteSize(symbol_stub_byte_size);
+                } else {
+                  // Make a synthetic symbol to describe the trampoline stub
+                  Mangled stub_symbol_mangled_name(stub_symbol->GetMangled());
+                  if (sym_idx >= num_syms) {
+                    sym = symtab->Resize(++num_syms);
+                    stub_symbol = nullptr; // this pointer no longer valid
+                  }
+                  sym[sym_idx].SetID(synthetic_sym_id++);
+                  sym[sym_idx].GetMangled() = stub_symbol_mangled_name;
+                  if (resolver_addresses.find(symbol_stub_addr) ==
+                      resolver_addresses.end())
+                    sym[sym_idx].SetType(eSymbolTypeTrampoline);
+                  else
+                    sym[sym_idx].SetType(eSymbolTypeResolver);
+                  sym[sym_idx].SetIsSynthetic(true);
+                  sym[sym_idx].GetAddressRef() = so_addr;
+                  sym[sym_idx].SetByteSize(symbol_stub_byte_size);
+                  ++sym_idx;
+                }
+              } else {
+                if (log)
+                  log->Warning("symbol stub referencing symbol table symbol "
+                               "%u that isn't in our minimal symbol table, "
+                               "fix this!!!",
+                               stub_sym_id);
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  if (!trie_entries.empty()) {
+    for (const auto &e : trie_entries) {
+      if (e.entry.import_name) {
+        // Only add indirect symbols from the Trie entries if we didn't have
+        // a N_INDR nlist entry for this already
+        if (indirect_symbol_names.find(e.entry.name) ==
+            indirect_symbol_names.end()) {
+          // Make a synthetic symbol to describe re-exported symbol.
+          if (sym_idx >= num_syms)
+            sym = symtab->Resize(++num_syms);
+          sym[sym_idx].SetID(synthetic_sym_id++);
+          sym[sym_idx].GetMangled() = Mangled(e.entry.name);
+          sym[sym_idx].SetType(eSymbolTypeReExported);
+          sym[sym_idx].SetIsSynthetic(true);
+          sym[sym_idx].SetReExportedSymbolName(e.entry.import_name);
+          if (e.entry.other > 0 && e.entry.other <= dylib_files.GetSize()) {
+            sym[sym_idx].SetReExportedSymbolSharedLibrary(
+                dylib_files.GetFileSpecAtIndex(e.entry.other - 1));
+          }
+          ++sym_idx;
+        }
+      }
+    }
+  }
+
+  //        StreamFile s(stdout, false);
+  //        s.Printf ("Symbol table before CalculateSymbolSizes():\n");
+  //        symtab->Dump(&s, NULL, eSortOrderNone);
+  // Set symbol byte sizes correctly since mach-o nlist entries don't have
+  // sizes
+  symtab->CalculateSymbolSizes();
+
+  //        s.Printf ("Symbol table after CalculateSymbolSizes():\n");
+  //        symtab->Dump(&s, NULL, eSortOrderNone);
+
+  return symtab->GetNumSymbols();
 }
 
 void ObjectFileMachO::Dump(Stream *s) {
@@ -4824,11 +4722,22 @@
     else
       s->PutCString("ObjectFileMachO32");
 
-    ArchSpec header_arch = GetArchitecture();
-
-    *s << ", file = '" << m_file
-       << "', triple = " << header_arch.GetTriple().getTriple() << "\n";
-
+    *s << ", file = '" << m_file;
+    ModuleSpecList all_specs;
+    ModuleSpec base_spec;
+    GetAllArchSpecs(m_header, m_data, MachHeaderSizeFromMagic(m_header.magic),
+                    base_spec, all_specs);
+    for (unsigned i = 0, e = all_specs.GetSize(); i != e; ++i) {
+      *s << "', triple";
+      if (e)
+        s->Printf("[%d]", i);
+      *s << " = ";
+      *s << all_specs.GetModuleSpecRefAtIndex(i)
+                .GetArchitecture()
+                .GetTriple()
+                .getTriple();
+    }
+    *s << "\n";
     SectionList *sections = GetSectionList();
     if (sections)
       sections->Dump(s, nullptr, true, UINT32_MAX);
@@ -4889,172 +4798,221 @@
 }
 
 namespace {
-  struct OSEnv {
-    llvm::StringRef os_type;
-    llvm::StringRef environment;
-    OSEnv(uint32_t cmd) {
-      switch (cmd) {
-      case PLATFORM_MACOS:
-        os_type = llvm::Triple::getOSTypeName(llvm::Triple::MacOSX);
-        return;
-      case PLATFORM_IOS:
-        os_type = llvm::Triple::getOSTypeName(llvm::Triple::IOS);
-        return;
-      case PLATFORM_TVOS:
-        os_type = llvm::Triple::getOSTypeName(llvm::Triple::TvOS);
-        return;
-      case PLATFORM_WATCHOS:
-        os_type = llvm::Triple::getOSTypeName(llvm::Triple::WatchOS);
-        return;
-// NEED_BRIDGEOS_TRIPLE      case PLATFORM_BRIDGEOS:
-// NEED_BRIDGEOS_TRIPLE        os_type = llvm::Triple::getOSTypeName(llvm::Triple::BridgeOS);
-// NEED_BRIDGEOS_TRIPLE        return;
-#if defined (PLATFORM_IOSSIMULATOR) && defined (PLATFORM_TVOSSIMULATOR) && defined (PLATFORM_WATCHOSSIMULATOR)
-      case PLATFORM_IOSSIMULATOR:
-        os_type = llvm::Triple::getOSTypeName(llvm::Triple::IOS);
-        environment =
-            llvm::Triple::getEnvironmentTypeName(llvm::Triple::Simulator);
-        return;
-      case PLATFORM_TVOSSIMULATOR:
-        os_type = llvm::Triple::getOSTypeName(llvm::Triple::TvOS);
-        environment =
-            llvm::Triple::getEnvironmentTypeName(llvm::Triple::Simulator);
-        return;
-      case PLATFORM_WATCHOSSIMULATOR:
-        os_type = llvm::Triple::getOSTypeName(llvm::Triple::WatchOS);
-        environment =
-            llvm::Triple::getEnvironmentTypeName(llvm::Triple::Simulator);
-        return;
-#endif
-      default: {
-        Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS |
-                                                        LIBLLDB_LOG_PROCESS));
-        if (log)
-          log->Printf("unsupported platform in LC_BUILD_VERSION");
-      }
-      }
+struct OSEnv {
+  llvm::StringRef os_type;
+  llvm::StringRef environment;
+  OSEnv(uint32_t cmd) {
+    switch (cmd) {
+    case llvm::MachO::PLATFORM_MACOS:
+      os_type = llvm::Triple::getOSTypeName(llvm::Triple::MacOSX);
+      return;
+    case llvm::MachO::PLATFORM_IOS:
+      os_type = llvm::Triple::getOSTypeName(llvm::Triple::IOS);
+      return;
+    case llvm::MachO::PLATFORM_TVOS:
+      os_type = llvm::Triple::getOSTypeName(llvm::Triple::TvOS);
+      return;
+    case llvm::MachO::PLATFORM_WATCHOS:
+      os_type = llvm::Triple::getOSTypeName(llvm::Triple::WatchOS);
+      return;
+      // NEED_BRIDGEOS_TRIPLE      case llvm::MachO::PLATFORM_BRIDGEOS:
+      // NEED_BRIDGEOS_TRIPLE        os_type =
+      // llvm::Triple::getOSTypeName(llvm::Triple::BridgeOS);
+      // NEED_BRIDGEOS_TRIPLE        return;
+    case llvm::MachO::PLATFORM_MACCATALYST:
+      os_type = llvm::Triple::getOSTypeName(llvm::Triple::IOS);
+      environment = llvm::Triple::getEnvironmentTypeName(llvm::Triple::MacABI);
+      return;
+    case llvm::MachO::PLATFORM_IOSSIMULATOR:
+      os_type = llvm::Triple::getOSTypeName(llvm::Triple::IOS);
+      environment =
+          llvm::Triple::getEnvironmentTypeName(llvm::Triple::Simulator);
+      return;
+    case llvm::MachO::PLATFORM_TVOSSIMULATOR:
+      os_type = llvm::Triple::getOSTypeName(llvm::Triple::TvOS);
+      environment =
+          llvm::Triple::getEnvironmentTypeName(llvm::Triple::Simulator);
+      return;
+    case llvm::MachO::PLATFORM_WATCHOSSIMULATOR:
+      os_type = llvm::Triple::getOSTypeName(llvm::Triple::WatchOS);
+      environment =
+          llvm::Triple::getEnvironmentTypeName(llvm::Triple::Simulator);
+      return;
+    default: {
+      Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS |
+                                                      LIBLLDB_LOG_PROCESS));
+      LLDB_LOGF(log, "unsupported platform in LC_BUILD_VERSION");
     }
-  };
-
-  struct MinOS {
-    uint32_t major_version, minor_version, patch_version;
-    MinOS(uint32_t version)
-        : major_version(version >> 16),
-          minor_version((version >> 8) & 0xffu),
-          patch_version(version & 0xffu) {}
-  };
-} // namespace
-
-ArchSpec
-ObjectFileMachO::GetArchitecture(const llvm::MachO::mach_header &header,
-                                 const lldb_private::DataExtractor &data,
-                                 lldb::offset_t lc_offset) {
-  ArchSpec arch;
-  arch.SetArchitecture(eArchTypeMachO, header.cputype, header.cpusubtype);
-
-  if (arch.IsValid()) {
-    llvm::Triple &triple = arch.GetTriple();
-
-    // Set OS to an unspecified unknown or a "*" so it can match any OS
-    triple.setOS(llvm::Triple::UnknownOS);
-    triple.setOSName(llvm::StringRef());
-
-    if (header.filetype == MH_PRELOAD) {
-      if (header.cputype == CPU_TYPE_ARM) {
-        // If this is a 32-bit arm binary, and it's a standalone binary, force
-        // the Vendor to Apple so we don't accidentally pick up the generic
-        // armv7 ABI at runtime.  Apple's armv7 ABI always uses r7 for the
-        // frame pointer register; most other armv7 ABIs use a combination of
-        // r7 and r11.
-        triple.setVendor(llvm::Triple::Apple);
-      } else {
-        // Set vendor to an unspecified unknown or a "*" so it can match any
-        // vendor This is required for correct behavior of EFI debugging on
-        // x86_64
-        triple.setVendor(llvm::Triple::UnknownVendor);
-        triple.setVendorName(llvm::StringRef());
-      }
-      return arch;
-    } else {
-      struct load_command load_cmd;
-      llvm::SmallString<16> os_name;
-      llvm::raw_svector_ostream os(os_name);
-
-      // See if there is an LC_VERSION_MIN_* load command that can give
-      // us the OS type.
-      lldb::offset_t offset = lc_offset;
-      for (uint32_t i = 0; i < header.ncmds; ++i) {
-        const lldb::offset_t cmd_offset = offset;
-        if (data.GetU32(&offset, &load_cmd, 2) == nullptr)
-          break;
-
-        struct version_min_command version_min;
-        switch (load_cmd.cmd) {
-        case llvm::MachO::LC_VERSION_MIN_IPHONEOS:
-        case llvm::MachO::LC_VERSION_MIN_MACOSX:
-        case llvm::MachO::LC_VERSION_MIN_TVOS:
-        case llvm::MachO::LC_VERSION_MIN_WATCHOS: {
-          if (load_cmd.cmdsize != sizeof(version_min))
-            break;
-          if (data.ExtractBytes(cmd_offset, sizeof(version_min),
-                                data.GetByteOrder(), &version_min) == 0)
-            break;
-          MinOS min_os(version_min.version);
-          os << GetOSName(load_cmd.cmd) << min_os.major_version << '.'
-             << min_os.minor_version << '.' << min_os.patch_version;
-          triple.setOSName(os.str());
-          return arch;
-        }
-        default:
-          break;
-        }
-
-        offset = cmd_offset + load_cmd.cmdsize;
-      }
-
-      // See if there is an LC_BUILD_VERSION load command that can give
-      // us the OS type.
-
-      offset = lc_offset;
-      for (uint32_t i = 0; i < header.ncmds; ++i) {
-        const lldb::offset_t cmd_offset = offset;
-        if (data.GetU32(&offset, &load_cmd, 2) == nullptr)
-          break;
-        do {
-          if (load_cmd.cmd == llvm::MachO::LC_BUILD_VERSION) {
-            struct build_version_command build_version;
-            if (load_cmd.cmdsize < sizeof(build_version)) {
-              // Malformed load command.
-              break;
-            }
-            if (data.ExtractBytes(cmd_offset, sizeof(build_version),
-                                  data.GetByteOrder(), &build_version) == 0)
-              break;
-            MinOS min_os(build_version.minos);
-            OSEnv os_env(build_version.platform);
-            if (os_env.os_type.empty())
-              break;
-            os << os_env.os_type << min_os.major_version << '.'
-               << min_os.minor_version << '.' << min_os.patch_version;
-            triple.setOSName(os.str());
-            if (!os_env.environment.empty())
-              triple.setEnvironmentName(os_env.environment);
-            return arch;
-          }
-        } while (false);
-        offset = cmd_offset + load_cmd.cmdsize;
-      }
-
-      if (header.filetype != MH_KEXT_BUNDLE) {
-        // We didn't find a LC_VERSION_MIN load command and this isn't a KEXT
-        // so lets not say our Vendor is Apple, leave it as an unspecified
-        // unknown
-        triple.setVendor(llvm::Triple::UnknownVendor);
-        triple.setVendorName(llvm::StringRef());
-      }
     }
   }
-  return arch;
+};
+
+struct MinOS {
+  uint32_t major_version, minor_version, patch_version;
+  MinOS(uint32_t version)
+      : major_version(version >> 16), minor_version((version >> 8) & 0xffu),
+        patch_version(version & 0xffu) {}
+};
+} // namespace
+
+void ObjectFileMachO::GetAllArchSpecs(const llvm::MachO::mach_header &header,
+                                      const lldb_private::DataExtractor &data,
+                                      lldb::offset_t lc_offset,
+                                      ModuleSpec &base_spec,
+                                      lldb_private::ModuleSpecList &all_specs) {
+  auto &base_arch = base_spec.GetArchitecture();
+  base_arch.SetArchitecture(eArchTypeMachO, header.cputype, header.cpusubtype);
+  if (!base_arch.IsValid())
+    return;
+
+  bool found_any = false;
+  auto add_triple = [&](const llvm::Triple &triple) {
+    auto spec = base_spec;
+    spec.GetArchitecture().GetTriple() = triple;
+    if (spec.GetArchitecture().IsValid()) {
+      spec.GetUUID() = ObjectFileMachO::GetUUID(header, data, lc_offset);
+      all_specs.Append(spec);
+      found_any = true;
+    }
+  };
+
+  // Set OS to an unspecified unknown or a "*" so it can match any OS
+  llvm::Triple base_triple = base_arch.GetTriple();
+  base_triple.setOS(llvm::Triple::UnknownOS);
+  base_triple.setOSName(llvm::StringRef());
+
+  if (header.filetype == MH_PRELOAD) {
+    if (header.cputype == CPU_TYPE_ARM) {
+      // If this is a 32-bit arm binary, and it's a standalone binary, force
+      // the Vendor to Apple so we don't accidentally pick up the generic
+      // armv7 ABI at runtime.  Apple's armv7 ABI always uses r7 for the
+      // frame pointer register; most other armv7 ABIs use a combination of
+      // r7 and r11.
+      base_triple.setVendor(llvm::Triple::Apple);
+    } else {
+      // Set vendor to an unspecified unknown or a "*" so it can match any
+      // vendor This is required for correct behavior of EFI debugging on
+      // x86_64
+      base_triple.setVendor(llvm::Triple::UnknownVendor);
+      base_triple.setVendorName(llvm::StringRef());
+    }
+    return add_triple(base_triple);
+  }
+
+  struct load_command load_cmd;
+
+  // See if there is an LC_VERSION_MIN_* load command that can give
+  // us the OS type.
+  lldb::offset_t offset = lc_offset;
+  for (uint32_t i = 0; i < header.ncmds; ++i) {
+    const lldb::offset_t cmd_offset = offset;
+    if (data.GetU32(&offset, &load_cmd, 2) == NULL)
+      break;
+
+    struct version_min_command version_min;
+    switch (load_cmd.cmd) {
+    case llvm::MachO::LC_VERSION_MIN_IPHONEOS:
+    case llvm::MachO::LC_VERSION_MIN_MACOSX:
+    case llvm::MachO::LC_VERSION_MIN_TVOS:
+    case llvm::MachO::LC_VERSION_MIN_WATCHOS: {
+      if (load_cmd.cmdsize != sizeof(version_min))
+        break;
+      if (data.ExtractBytes(cmd_offset, sizeof(version_min),
+                            data.GetByteOrder(), &version_min) == 0)
+        break;
+      MinOS min_os(version_min.version);
+      llvm::SmallString<32> os_name;
+      llvm::raw_svector_ostream os(os_name);
+      os << GetOSName(load_cmd.cmd) << min_os.major_version << '.'
+         << min_os.minor_version << '.' << min_os.patch_version;
+
+      auto triple = base_triple;
+      triple.setOSName(os.str());
+      os_name.clear();
+      add_triple(triple);
+      break;
+    }
+    default:
+      break;
+    }
+
+    offset = cmd_offset + load_cmd.cmdsize;
+  }
+
+  // See if there are LC_BUILD_VERSION load commands that can give
+  // us the OS type.
+  offset = lc_offset;
+  for (uint32_t i = 0; i < header.ncmds; ++i) {
+    const lldb::offset_t cmd_offset = offset;
+    if (data.GetU32(&offset, &load_cmd, 2) == NULL)
+      break;
+
+    do {
+      if (load_cmd.cmd == llvm::MachO::LC_BUILD_VERSION) {
+        struct build_version_command build_version;
+        if (load_cmd.cmdsize < sizeof(build_version)) {
+          // Malformed load command.
+          break;
+        }
+        if (data.ExtractBytes(cmd_offset, sizeof(build_version),
+                              data.GetByteOrder(), &build_version) == 0)
+          break;
+        MinOS min_os(build_version.minos);
+        OSEnv os_env(build_version.platform);
+        llvm::SmallString<16> os_name;
+        llvm::raw_svector_ostream os(os_name);
+        os << os_env.os_type << min_os.major_version << '.'
+           << min_os.minor_version << '.' << min_os.patch_version;
+        auto triple = base_triple;
+        triple.setOSName(os.str());
+        os_name.clear();
+        if (!os_env.environment.empty())
+          triple.setEnvironmentName(os_env.environment);
+        add_triple(triple);
+      }
+    } while (0);
+    offset = cmd_offset + load_cmd.cmdsize;
+  }
+
+  if (!found_any) {
+    if (header.filetype == MH_KEXT_BUNDLE) {
+      base_triple.setVendor(llvm::Triple::Apple);
+      add_triple(base_triple);
+    } else {
+      // We didn't find a LC_VERSION_MIN load command and this isn't a KEXT
+      // so lets not say our Vendor is Apple, leave it as an unspecified
+      // unknown.
+      base_triple.setVendor(llvm::Triple::UnknownVendor);
+      base_triple.setVendorName(llvm::StringRef());
+      add_triple(base_triple);
+    }
+  }
+}
+
+ArchSpec ObjectFileMachO::GetArchitecture(
+    ModuleSP module_sp, const llvm::MachO::mach_header &header,
+    const lldb_private::DataExtractor &data, lldb::offset_t lc_offset) {
+  ModuleSpecList all_specs;
+  ModuleSpec base_spec;
+  GetAllArchSpecs(header, data, MachHeaderSizeFromMagic(header.magic),
+                  base_spec, all_specs);
+
+  // If the object file offers multiple alternative load commands,
+  // pick the one that matches the module.
+  if (module_sp) {
+    const ArchSpec &module_arch = module_sp->GetArchitecture();
+    for (unsigned i = 0, e = all_specs.GetSize(); i != e; ++i) {
+      ArchSpec mach_arch =
+          all_specs.GetModuleSpecRefAtIndex(i).GetArchitecture();
+      if (module_arch.IsCompatibleMatch(mach_arch))
+        return mach_arch;
+    }
+  }
+
+  // Return the first arch we found.
+  if (all_specs.GetSize() == 0)
+    return {};
+  return all_specs.GetModuleSpecRefAtIndex(0).GetArchitecture();
 }
 
 UUID ObjectFileMachO::GetUUID() {
@@ -5100,10 +5058,10 @@
             if (path[0] == '@') {
               if (strncmp(path, "@rpath", strlen("@rpath")) == 0)
                 rpath_relative_paths.push_back(path + strlen("@rpath"));
-              else if (strncmp(path, "@executable_path", 
-                       strlen("@executable_path")) == 0)
-                at_exec_relative_paths.push_back(path 
-                                                 + strlen("@executable_path"));
+              else if (strncmp(path, "@executable_path",
+                               strlen("@executable_path")) == 0)
+                at_exec_relative_paths.push_back(path +
+                                                 strlen("@executable_path"));
             } else {
               FileSpec file_spec(path);
               if (files.AppendIfUnique(file_spec))
@@ -5160,7 +5118,7 @@
     if (!at_exec_relative_paths.empty() && CalculateType() == eTypeExecutable) {
       FileSpec exec_dir = this_file_spec.CopyByRemovingLastPathComponent();
       for (const auto &at_exec_relative_path : at_exec_relative_paths) {
-        FileSpec file_spec = 
+        FileSpec file_spec =
             exec_dir.CopyByAppendingPathComponent(at_exec_relative_path);
         if (FileSystem::Instance().Exists(file_spec) &&
             files.AppendIfUnique(file_spec))
@@ -5177,8 +5135,10 @@
   // return that. If m_entry_point_address is valid it means we've found it
   // already, so return the cached value.
 
-  if (!IsExecutable() || m_entry_point_address.IsValid())
+  if ((!IsExecutable() && !IsDynamicLoader()) ||
+      m_entry_point_address.IsValid()) {
     return m_entry_point_address;
+  }
 
   // Otherwise, look for the UnixThread or Thread command.  The data for the
   // Thread command is given in /usr/include/mach-o.h, but it is basically:
@@ -5231,8 +5191,8 @@
           switch (m_header.cputype) {
           case llvm::MachO::CPU_TYPE_ARM:
             if (flavor == 1 ||
-                flavor == 9) // ARM_THREAD_STATE/ARM_THREAD_STATE32 from
-                             // mach/arm/thread_status.h
+                flavor == 9) // ARM_THREAD_STATE/ARM_THREAD_STATE32
+                             // from mach/arm/thread_status.h
             {
               offset += 60; // This is the offset of pc in the GPR thread state
                             // data structure.
@@ -5241,6 +5201,7 @@
             }
             break;
           case llvm::MachO::CPU_TYPE_ARM64:
+          case llvm::MachO::CPU_TYPE_ARM64_32:
             if (flavor == 6) // ARM_THREAD_STATE64 from mach/arm/thread_status.h
             {
               offset += 256; // This is the offset of pc in the GPR thread state
@@ -5300,6 +5261,17 @@
       offset = cmd_offset + load_cmd.cmdsize;
     }
 
+    if (start_address == LLDB_INVALID_ADDRESS && IsDynamicLoader()) {
+      if (GetSymtab()) {
+        Symbol *dyld_start_sym = GetSymtab()->FindFirstSymbolWithNameAndType(
+            ConstString("_dyld_start"), SymbolType::eSymbolTypeCode,
+            Symtab::eDebugAny, Symtab::eVisibilityAny);
+        if (dyld_start_sym && dyld_start_sym->GetAddress().IsValid()) {
+          start_address = dyld_start_sym->GetAddress().GetFileAddress();
+        }
+      }
+    }
+
     if (start_address != LLDB_INVALID_ADDRESS) {
       // We got the start address from the load commands, so now resolve that
       // address in the sections of this ObjectFile:
@@ -5316,8 +5288,9 @@
       if (module_sp) {
         SymbolContextList contexts;
         SymbolContext context;
-        if (module_sp->FindSymbolsWithNameAndType(ConstString("start"),
-                                                  eSymbolTypeCode, contexts)) {
+        module_sp->FindSymbolsWithNameAndType(ConstString("start"),
+                                              eSymbolTypeCode, contexts);
+        if (contexts.GetSize()) {
           if (contexts.GetContextAtIndex(0, context))
             m_entry_point_address = context.symbol->GetAddress();
         }
@@ -5382,39 +5355,34 @@
       load_command lc;
       if (m_data.GetU32(&offset, &lc.cmd, 2) == nullptr)
         break;
-      if (lc.cmd == LC_NOTE)
-      {
-          char data_owner[17];
-          m_data.CopyData (offset, 16, data_owner);
-          data_owner[16] = '\0';
-          offset += 16;
-          uint64_t fileoff = m_data.GetU64_unchecked (&offset);
-          uint64_t size = m_data.GetU64_unchecked (&offset);
+      if (lc.cmd == LC_NOTE) {
+        char data_owner[17];
+        m_data.CopyData(offset, 16, data_owner);
+        data_owner[16] = '\0';
+        offset += 16;
+        uint64_t fileoff = m_data.GetU64_unchecked(&offset);
+        uint64_t size = m_data.GetU64_unchecked(&offset);
 
-          // "kern ver str" has a uint32_t version and then a nul terminated
-          // c-string.
-          if (strcmp ("kern ver str", data_owner) == 0)
-          {
-              offset = fileoff;
-              uint32_t version;
-              if (m_data.GetU32 (&offset, &version, 1) != nullptr)
-              {
-                  if (version == 1)
-                  {
-                      uint32_t strsize = size - sizeof (uint32_t);
-                      char *buf = (char*) malloc (strsize);
-                      if (buf)
-                      {
-                          m_data.CopyData (offset, strsize, buf);
-                          buf[strsize - 1] = '\0';
-                          result = buf;
-                          if (buf)
-                              free (buf);
-                          return result;
-                      }
-                  }
+        // "kern ver str" has a uint32_t version and then a nul terminated
+        // c-string.
+        if (strcmp("kern ver str", data_owner) == 0) {
+          offset = fileoff;
+          uint32_t version;
+          if (m_data.GetU32(&offset, &version, 1) != nullptr) {
+            if (version == 1) {
+              uint32_t strsize = size - sizeof(uint32_t);
+              char *buf = (char *)malloc(strsize);
+              if (buf) {
+                m_data.CopyData(offset, strsize, buf);
+                buf[strsize - 1] = '\0';
+                result = buf;
+                if (buf)
+                  free(buf);
+                return result;
               }
+            }
           }
+        }
       }
       offset = cmd_offset + lc.cmdsize;
     }
@@ -5428,23 +5396,22 @@
       if (m_data.GetU32(&offset, &ident_command, 2) == nullptr)
         break;
       if (ident_command.cmd == LC_IDENT && ident_command.cmdsize != 0) {
-        char *buf = (char *) malloc (ident_command.cmdsize);
-        if (buf != nullptr 
-            && m_data.CopyData (offset, ident_command.cmdsize, buf) == ident_command.cmdsize) {
+        char *buf = (char *)malloc(ident_command.cmdsize);
+        if (buf != nullptr && m_data.CopyData(offset, ident_command.cmdsize,
+                                              buf) == ident_command.cmdsize) {
           buf[ident_command.cmdsize - 1] = '\0';
           result = buf;
         }
         if (buf)
-          free (buf);
+          free(buf);
       }
       offset = cmd_offset + ident_command.cmdsize;
     }
-
   }
   return result;
 }
 
-bool ObjectFileMachO::GetCorefileMainBinaryInfo (addr_t &address, UUID &uuid) {
+bool ObjectFileMachO::GetCorefileMainBinaryInfo(addr_t &address, UUID &uuid) {
   address = LLDB_INVALID_ADDRESS;
   uuid.Clear();
   ModuleSP module_sp(GetModule());
@@ -5456,41 +5423,39 @@
       load_command lc;
       if (m_data.GetU32(&offset, &lc.cmd, 2) == nullptr)
         break;
-      if (lc.cmd == LC_NOTE)
-      {
-          char data_owner[17];
-          memset (data_owner, 0, sizeof (data_owner));
-          m_data.CopyData (offset, 16, data_owner);
-          offset += 16;
-          uint64_t fileoff = m_data.GetU64_unchecked (&offset);
-          uint64_t size = m_data.GetU64_unchecked (&offset);
+      if (lc.cmd == LC_NOTE) {
+        char data_owner[17];
+        memset(data_owner, 0, sizeof(data_owner));
+        m_data.CopyData(offset, 16, data_owner);
+        offset += 16;
+        uint64_t fileoff = m_data.GetU64_unchecked(&offset);
+        uint64_t size = m_data.GetU64_unchecked(&offset);
 
-          // "main bin spec" (main binary specification) data payload is
-          // formatted:
-          //    uint32_t version       [currently 1]
-          //    uint32_t type          [0 == unspecified, 1 == kernel, 2 == user process]
-          //    uint64_t address       [ UINT64_MAX if address not specified ]
-          //    uuid_t   uuid          [ all zero's if uuid not specified ]
-          //    uint32_t log2_pagesize [ process page size in log base 2, e.g. 4k pages are 12.  0 for unspecified ]
+        // "main bin spec" (main binary specification) data payload is
+        // formatted:
+        //    uint32_t version       [currently 1]
+        //    uint32_t type          [0 == unspecified, 1 == kernel, 2 == user
+        //    process] uint64_t address       [ UINT64_MAX if address not
+        //    specified ] uuid_t   uuid          [ all zero's if uuid not
+        //    specified ] uint32_t log2_pagesize [ process page size in log base
+        //    2, e.g. 4k pages are 12.  0 for unspecified ]
 
-          if (strcmp ("main bin spec", data_owner) == 0 && size >= 32)
-          {
-              offset = fileoff;
-              uint32_t version;
-              if (m_data.GetU32 (&offset, &version, 1) != nullptr && version == 1)
-              {
-                  uint32_t type = 0;
-                  uuid_t raw_uuid;
-                  memset (raw_uuid, 0, sizeof (uuid_t));
+        if (strcmp("main bin spec", data_owner) == 0 && size >= 32) {
+          offset = fileoff;
+          uint32_t version;
+          if (m_data.GetU32(&offset, &version, 1) != nullptr && version == 1) {
+            uint32_t type = 0;
+            uuid_t raw_uuid;
+            memset(raw_uuid, 0, sizeof(uuid_t));
 
-                  if (m_data.GetU32(&offset, &type, 1) &&
-                      m_data.GetU64(&offset, &address, 1) &&
-                      m_data.CopyData(offset, sizeof(uuid_t), raw_uuid) != 0) {
-                    uuid = UUID::fromOptionalData(raw_uuid, sizeof(uuid_t));
-                    return true;
-                  }
-              }
+            if (m_data.GetU32(&offset, &type, 1) &&
+                m_data.GetU64(&offset, &address, 1) &&
+                m_data.CopyData(offset, sizeof(uuid_t), raw_uuid) != 0) {
+              uuid = UUID::fromOptionalData(raw_uuid, sizeof(uuid_t));
+              return true;
+            }
           }
+        }
       }
       offset = cmd_offset + lc.cmdsize;
     }
@@ -5518,6 +5483,7 @@
 
       switch (m_header.cputype) {
       case llvm::MachO::CPU_TYPE_ARM64:
+      case llvm::MachO::CPU_TYPE_ARM64_32:
         reg_ctx_sp =
             std::make_shared<RegisterContextDarwin_arm64_Mach>(thread, data);
         break;
@@ -5684,13 +5650,14 @@
   if (module_sp) {
     std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
 
-    return GetArchitecture(m_header, m_data,
+    return GetArchitecture(module_sp, m_header, m_data,
                            MachHeaderSizeFromMagic(m_header.magic));
   }
   return arch;
 }
 
-void ObjectFileMachO::GetProcessSharedCacheUUID(Process *process, addr_t &base_addr, UUID &uuid) {
+void ObjectFileMachO::GetProcessSharedCacheUUID(Process *process,
+                                                addr_t &base_addr, UUID &uuid) {
   uuid.Clear();
   base_addr = LLDB_INVALID_ADDRESS;
   if (process && process->GetDynamicLoader()) {
@@ -5700,9 +5667,12 @@
     dl->GetSharedCacheInformation(base_addr, uuid, using_shared_cache,
                                   private_shared_cache);
   }
-  Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS | LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("inferior process shared cache has a UUID of %s, base address 0x%" PRIx64 , uuid.GetAsString().c_str(), base_addr);
+  Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS |
+                                                  LIBLLDB_LOG_PROCESS));
+  LLDB_LOGF(
+      log,
+      "inferior process shared cache has a UUID of %s, base address 0x%" PRIx64,
+      uuid.GetAsString().c_str(), base_addr);
 }
 
 // From dyld SPI header dyld_process_info.h
@@ -5714,11 +5684,11 @@
   bool privateCache; // process is using a private copy of its dyld cache
 };
 
-// #including mach/mach.h pulls in machine.h & CPU_TYPE_ARM etc conflicts with llvm
-// enum definitions llvm::MachO::CPU_TYPE_ARM turning them into compile errors.
-// So we need to use the actual underlying types of task_t and kern_return_t
-// below.
-extern "C" unsigned int /*task_t*/ mach_task_self(); 
+// #including mach/mach.h pulls in machine.h & CPU_TYPE_ARM etc conflicts with
+// llvm enum definitions llvm::MachO::CPU_TYPE_ARM turning them into compile
+// errors. So we need to use the actual underlying types of task_t and
+// kern_return_t below.
+extern "C" unsigned int /*task_t*/ mach_task_self();
 
 void ObjectFileMachO::GetLLDBSharedCacheUUID(addr_t &base_addr, UUID &uuid) {
   uuid.Clear();
@@ -5728,7 +5698,7 @@
     (defined(__arm__) || defined(__arm64__) || defined(__aarch64__))
   uint8_t *(*dyld_get_all_image_infos)(void);
   dyld_get_all_image_infos =
-      (uint8_t * (*)())dlsym(RTLD_DEFAULT, "_dyld_get_all_image_infos");
+      (uint8_t * (*)()) dlsym(RTLD_DEFAULT, "_dyld_get_all_image_infos");
   if (dyld_get_all_image_infos) {
     uint8_t *dyld_all_image_infos_address = dyld_get_all_image_infos();
     if (dyld_all_image_infos_address) {
@@ -5742,16 +5712,20 @@
               (uuid_t *)((uint8_t *)dyld_all_image_infos_address +
                          160); // sharedCacheUUID <mach-o/dyld_images.h>
           if (*version >= 15)
-            base_addr = *(uint64_t *) ((uint8_t *) dyld_all_image_infos_address 
-                          + 176); // sharedCacheBaseAddress <mach-o/dyld_images.h>
+            base_addr =
+                *(uint64_t
+                      *)((uint8_t *)dyld_all_image_infos_address +
+                         176); // sharedCacheBaseAddress <mach-o/dyld_images.h>
         } else {
           sharedCacheUUID_address =
               (uuid_t *)((uint8_t *)dyld_all_image_infos_address +
                          84); // sharedCacheUUID <mach-o/dyld_images.h>
           if (*version >= 15) {
             base_addr = 0;
-            base_addr = *(uint32_t *) ((uint8_t *) dyld_all_image_infos_address 
-                          + 100); // sharedCacheBaseAddress <mach-o/dyld_images.h>
+            base_addr =
+                *(uint32_t
+                      *)((uint8_t *)dyld_all_image_infos_address +
+                         100); // sharedCacheBaseAddress <mach-o/dyld_images.h>
           }
         }
         uuid = UUID::fromOptionalData(sharedCacheUUID_address, sizeof(uuid_t));
@@ -5759,35 +5733,43 @@
     }
   } else {
     // Exists in macOS 10.12 and later, iOS 10.0 and later - dyld SPI
-    dyld_process_info (*dyld_process_info_create)(unsigned int /* task_t */ task, uint64_t timestamp, unsigned int /*kern_return_t*/ *kernelError);
+    dyld_process_info (*dyld_process_info_create)(
+        unsigned int /* task_t */ task, uint64_t timestamp,
+        unsigned int /*kern_return_t*/ *kernelError);
     void (*dyld_process_info_get_cache)(void *info, void *cacheInfo);
     void (*dyld_process_info_release)(dyld_process_info info);
 
-    dyld_process_info_create = (void *(*)(unsigned int /* task_t */, uint64_t, unsigned int /*kern_return_t*/ *))
-               dlsym (RTLD_DEFAULT, "_dyld_process_info_create");
-    dyld_process_info_get_cache = (void (*)(void *, void *))
-               dlsym (RTLD_DEFAULT, "_dyld_process_info_get_cache");
-    dyld_process_info_release = (void (*)(void *))
-               dlsym (RTLD_DEFAULT, "_dyld_process_info_release");
+    dyld_process_info_create = (void *(*)(unsigned int /* task_t */, uint64_t,
+                                          unsigned int /*kern_return_t*/ *))
+        dlsym(RTLD_DEFAULT, "_dyld_process_info_create");
+    dyld_process_info_get_cache = (void (*)(void *, void *))dlsym(
+        RTLD_DEFAULT, "_dyld_process_info_get_cache");
+    dyld_process_info_release =
+        (void (*)(void *))dlsym(RTLD_DEFAULT, "_dyld_process_info_release");
 
     if (dyld_process_info_create && dyld_process_info_get_cache) {
       unsigned int /*kern_return_t */ kern_ret;
-		  dyld_process_info process_info = dyld_process_info_create(::mach_task_self(), 0, &kern_ret);
+      dyld_process_info process_info =
+          dyld_process_info_create(::mach_task_self(), 0, &kern_ret);
       if (process_info) {
         struct lldb_copy__dyld_process_cache_info sc_info;
-        memset (&sc_info, 0, sizeof (struct lldb_copy__dyld_process_cache_info));
-        dyld_process_info_get_cache (process_info, &sc_info);
+        memset(&sc_info, 0, sizeof(struct lldb_copy__dyld_process_cache_info));
+        dyld_process_info_get_cache(process_info, &sc_info);
         if (sc_info.cacheBaseAddress != 0) {
           base_addr = sc_info.cacheBaseAddress;
           uuid = UUID::fromOptionalData(sc_info.cacheUUID, sizeof(uuid_t));
         }
-        dyld_process_info_release (process_info);
+        dyld_process_info_release(process_info);
       }
     }
   }
-  Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS | LIBLLDB_LOG_PROCESS));
+  Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS |
+                                                  LIBLLDB_LOG_PROCESS));
   if (log && uuid.IsValid())
-    log->Printf("lldb's in-memory shared cache has a UUID of %s base address of 0x%" PRIx64, uuid.GetAsString().c_str(), base_addr);
+    LLDB_LOGF(log,
+              "lldb's in-memory shared cache has a UUID of %s base address of "
+              "0x%" PRIx64,
+              uuid.GetAsString().c_str(), base_addr);
 #endif
 }
 
@@ -5813,27 +5795,30 @@
             m_min_os_version = llvm::VersionTuple(xxxx, yy, zz);
             break;
           }
-        } 
+        }
       } else if (lc.cmd == llvm::MachO::LC_BUILD_VERSION) {
         // struct build_version_command {
         //     uint32_t    cmd;            /* LC_BUILD_VERSION */
-        //     uint32_t    cmdsize;        /* sizeof(struct build_version_command) plus */
-        //                                 /* ntools * sizeof(struct build_tool_version) */
+        //     uint32_t    cmdsize;        /* sizeof(struct
+        //     build_version_command) plus */
+        //                                 /* ntools * sizeof(struct
+        //                                 build_tool_version) */
         //     uint32_t    platform;       /* platform */
-        //     uint32_t    minos;          /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
-        //     uint32_t    sdk;            /* X.Y.Z is encoded in nibbles xxxx.yy.zz */
-        //     uint32_t    ntools;         /* number of tool entries following this */
+        //     uint32_t    minos;          /* X.Y.Z is encoded in nibbles
+        //     xxxx.yy.zz */ uint32_t    sdk;            /* X.Y.Z is encoded in
+        //     nibbles xxxx.yy.zz */ uint32_t    ntools;         /* number of
+        //     tool entries following this */
         // };
 
-        offset += 4;  // skip platform
+        offset += 4; // skip platform
         uint32_t minos = m_data.GetU32(&offset);
 
         const uint32_t xxxx = minos >> 16;
         const uint32_t yy = (minos >> 8) & 0xffu;
         const uint32_t zz = minos & 0xffu;
         if (xxxx) {
-            m_min_os_version = llvm::VersionTuple(xxxx, yy, zz);
-            break;
+          m_min_os_version = llvm::VersionTuple(xxxx, yy, zz);
+          break;
         }
       }
 
@@ -5871,8 +5856,8 @@
             m_sdk_versions = llvm::VersionTuple(xxxx, yy, zz);
             break;
           } else {
-            GetModule()->ReportWarning(
-                "minimum OS version load command with invalid (0) version found.");
+            GetModule()->ReportWarning("minimum OS version load command with "
+                                       "invalid (0) version found.");
           }
         }
       }
@@ -5997,332 +5982,336 @@
 bool ObjectFileMachO::SetLoadAddress(Target &target, lldb::addr_t value,
                                      bool value_is_offset) {
   ModuleSP module_sp = GetModule();
-  if (module_sp) {
-    size_t num_loaded_sections = 0;
-    SectionList *section_list = GetSectionList();
-    if (section_list) {
-      const size_t num_sections = section_list->GetSize();
+  if (!module_sp)
+    return false;
 
-      if (value_is_offset) {
-        // "value" is an offset to apply to each top level segment
-        for (size_t sect_idx = 0; sect_idx < num_sections; ++sect_idx) {
-          // Iterate through the object file sections to find all of the
-          // sections that size on disk (to avoid __PAGEZERO) and load them
-          SectionSP section_sp(section_list->GetSectionAtIndex(sect_idx));
-          if (SectionIsLoadable(section_sp.get()))
-            if (target.GetSectionLoadList().SetSectionLoadAddress(
-                    section_sp, section_sp->GetFileAddress() + value))
-              ++num_loaded_sections;
-        }
-      } else {
-        // "value" is the new base address of the mach_header, adjust each
-        // section accordingly
+  SectionList *section_list = GetSectionList();
+  if (!section_list)
+    return false;
 
-        Section *mach_header_section = GetMachHeaderSection();
-        if (mach_header_section) {
-          for (size_t sect_idx = 0; sect_idx < num_sections; ++sect_idx) {
-            SectionSP section_sp(section_list->GetSectionAtIndex(sect_idx));
+  size_t num_loaded_sections = 0;
+  const size_t num_sections = section_list->GetSize();
 
-            lldb::addr_t section_load_addr =
-                CalculateSectionLoadAddressForMemoryImage(
-                    value, mach_header_section, section_sp.get());
-            if (section_load_addr != LLDB_INVALID_ADDRESS) {
-              if (target.GetSectionLoadList().SetSectionLoadAddress(
-                      section_sp, section_load_addr))
-                ++num_loaded_sections;
-            }
-          }
+  if (value_is_offset) {
+    // "value" is an offset to apply to each top level segment
+    for (size_t sect_idx = 0; sect_idx < num_sections; ++sect_idx) {
+      // Iterate through the object file sections to find all of the
+      // sections that size on disk (to avoid __PAGEZERO) and load them
+      SectionSP section_sp(section_list->GetSectionAtIndex(sect_idx));
+      if (SectionIsLoadable(section_sp.get()))
+        if (target.GetSectionLoadList().SetSectionLoadAddress(
+                section_sp, section_sp->GetFileAddress() + value))
+          ++num_loaded_sections;
+    }
+  } else {
+    // "value" is the new base address of the mach_header, adjust each
+    // section accordingly
+
+    Section *mach_header_section = GetMachHeaderSection();
+    if (mach_header_section) {
+      for (size_t sect_idx = 0; sect_idx < num_sections; ++sect_idx) {
+        SectionSP section_sp(section_list->GetSectionAtIndex(sect_idx));
+
+        lldb::addr_t section_load_addr =
+            CalculateSectionLoadAddressForMemoryImage(
+                value, mach_header_section, section_sp.get());
+        if (section_load_addr != LLDB_INVALID_ADDRESS) {
+          if (target.GetSectionLoadList().SetSectionLoadAddress(
+                  section_sp, section_load_addr))
+            ++num_loaded_sections;
         }
       }
     }
-    return num_loaded_sections > 0;
   }
-  return false;
+  return num_loaded_sections > 0;
 }
 
 bool ObjectFileMachO::SaveCore(const lldb::ProcessSP &process_sp,
                                const FileSpec &outfile, Status &error) {
-  if (process_sp) {
-    Target &target = process_sp->GetTarget();
-    const ArchSpec target_arch = target.GetArchitecture();
-    const llvm::Triple &target_triple = target_arch.GetTriple();
-    if (target_triple.getVendor() == llvm::Triple::Apple &&
-        (target_triple.getOS() == llvm::Triple::MacOSX ||
-         target_triple.getOS() == llvm::Triple::IOS ||
-         target_triple.getOS() == llvm::Triple::WatchOS ||
-         target_triple.getOS() == llvm::Triple::TvOS)) {
-         // NEED_BRIDGEOS_TRIPLE target_triple.getOS() == llvm::Triple::BridgeOS)) {
-      bool make_core = false;
-      switch (target_arch.GetMachine()) {
-      case llvm::Triple::aarch64:
-      case llvm::Triple::arm:
-      case llvm::Triple::thumb:
-      case llvm::Triple::x86:
-      case llvm::Triple::x86_64:
-        make_core = true;
-        break;
-      default:
-        error.SetErrorStringWithFormat("unsupported core architecture: %s",
-                                       target_triple.str().c_str());
-        break;
-      }
+  if (!process_sp)
+    return false;
 
-      if (make_core) {
-        std::vector<segment_command_64> segment_load_commands;
-        //                uint32_t range_info_idx = 0;
-        MemoryRegionInfo range_info;
-        Status range_error = process_sp->GetMemoryRegionInfo(0, range_info);
-        const uint32_t addr_byte_size = target_arch.GetAddressByteSize();
-        const ByteOrder byte_order = target_arch.GetByteOrder();
-        if (range_error.Success()) {
-          while (range_info.GetRange().GetRangeBase() != LLDB_INVALID_ADDRESS) {
-            const addr_t addr = range_info.GetRange().GetRangeBase();
-            const addr_t size = range_info.GetRange().GetByteSize();
-
-            if (size == 0)
-              break;
-
-            // Calculate correct protections
-            uint32_t prot = 0;
-            if (range_info.GetReadable() == MemoryRegionInfo::eYes)
-              prot |= VM_PROT_READ;
-            if (range_info.GetWritable() == MemoryRegionInfo::eYes)
-              prot |= VM_PROT_WRITE;
-            if (range_info.GetExecutable() == MemoryRegionInfo::eYes)
-              prot |= VM_PROT_EXECUTE;
-
-            if (prot != 0) {
-              uint32_t cmd_type = LC_SEGMENT_64;
-              uint32_t segment_size = sizeof(segment_command_64);
-              if (addr_byte_size == 4) {
-                cmd_type = LC_SEGMENT;
-                segment_size = sizeof(segment_command);
-              }
-              segment_command_64 segment = {
-                  cmd_type,     // uint32_t cmd;
-                  segment_size, // uint32_t cmdsize;
-                  {0},          // char segname[16];
-                  addr, // uint64_t vmaddr;    // uint32_t for 32-bit Mach-O
-                  size, // uint64_t vmsize;    // uint32_t for 32-bit Mach-O
-                  0,    // uint64_t fileoff;   // uint32_t for 32-bit Mach-O
-                  size, // uint64_t filesize;  // uint32_t for 32-bit Mach-O
-                  prot, // uint32_t maxprot;
-                  prot, // uint32_t initprot;
-                  0,    // uint32_t nsects;
-                  0};   // uint32_t flags;
-              segment_load_commands.push_back(segment);
-            } else {
-              // No protections and a size of 1 used to be returned from old
-              // debugservers when we asked about a region that was past the
-              // last memory region and it indicates the end...
-              if (size == 1)
-                break;
-            }
-
-            range_error = process_sp->GetMemoryRegionInfo(
-                range_info.GetRange().GetRangeEnd(), range_info);
-            if (range_error.Fail())
-              break;
-          }
-
-          StreamString buffer(Stream::eBinary, addr_byte_size, byte_order);
-
-          mach_header_64 mach_header;
-          if (addr_byte_size == 8) {
-            mach_header.magic = MH_MAGIC_64;
-          } else {
-            mach_header.magic = MH_MAGIC;
-          }
-          mach_header.cputype = target_arch.GetMachOCPUType();
-          mach_header.cpusubtype = target_arch.GetMachOCPUSubType();
-          mach_header.filetype = MH_CORE;
-          mach_header.ncmds = segment_load_commands.size();
-          mach_header.flags = 0;
-          mach_header.reserved = 0;
-          ThreadList &thread_list = process_sp->GetThreadList();
-          const uint32_t num_threads = thread_list.GetSize();
-
-          // Make an array of LC_THREAD data items. Each one contains the
-          // contents of the LC_THREAD load command. The data doesn't contain
-          // the load command + load command size, we will add the load command
-          // and load command size as we emit the data.
-          std::vector<StreamString> LC_THREAD_datas(num_threads);
-          for (auto &LC_THREAD_data : LC_THREAD_datas) {
-            LC_THREAD_data.GetFlags().Set(Stream::eBinary);
-            LC_THREAD_data.SetAddressByteSize(addr_byte_size);
-            LC_THREAD_data.SetByteOrder(byte_order);
-          }
-          for (uint32_t thread_idx = 0; thread_idx < num_threads;
-               ++thread_idx) {
-            ThreadSP thread_sp(thread_list.GetThreadAtIndex(thread_idx));
-            if (thread_sp) {
-              switch (mach_header.cputype) {
-              case llvm::MachO::CPU_TYPE_ARM64:
-                RegisterContextDarwin_arm64_Mach::Create_LC_THREAD(
-                    thread_sp.get(), LC_THREAD_datas[thread_idx]);
-                break;
-
-              case llvm::MachO::CPU_TYPE_ARM:
-                RegisterContextDarwin_arm_Mach::Create_LC_THREAD(
-                    thread_sp.get(), LC_THREAD_datas[thread_idx]);
-                break;
-
-              case llvm::MachO::CPU_TYPE_I386:
-                RegisterContextDarwin_i386_Mach::Create_LC_THREAD(
-                    thread_sp.get(), LC_THREAD_datas[thread_idx]);
-                break;
-
-              case llvm::MachO::CPU_TYPE_X86_64:
-                RegisterContextDarwin_x86_64_Mach::Create_LC_THREAD(
-                    thread_sp.get(), LC_THREAD_datas[thread_idx]);
-                break;
-              }
-            }
-          }
-
-          // The size of the load command is the size of the segments...
-          if (addr_byte_size == 8) {
-            mach_header.sizeofcmds = segment_load_commands.size() *
-                                     sizeof(struct segment_command_64);
-          } else {
-            mach_header.sizeofcmds =
-                segment_load_commands.size() * sizeof(struct segment_command);
-          }
-
-          // and the size of all LC_THREAD load command
-          for (const auto &LC_THREAD_data : LC_THREAD_datas) {
-            ++mach_header.ncmds;
-            mach_header.sizeofcmds += 8 + LC_THREAD_data.GetSize();
-          }
-
-          // Write the mach header
-          buffer.PutHex32(mach_header.magic);
-          buffer.PutHex32(mach_header.cputype);
-          buffer.PutHex32(mach_header.cpusubtype);
-          buffer.PutHex32(mach_header.filetype);
-          buffer.PutHex32(mach_header.ncmds);
-          buffer.PutHex32(mach_header.sizeofcmds);
-          buffer.PutHex32(mach_header.flags);
-          if (addr_byte_size == 8) {
-            buffer.PutHex32(mach_header.reserved);
-          }
-
-          // Skip the mach header and all load commands and align to the next
-          // 0x1000 byte boundary
-          addr_t file_offset = buffer.GetSize() + mach_header.sizeofcmds;
-          if (file_offset & 0x00000fff) {
-            file_offset += 0x00001000ull;
-            file_offset &= (~0x00001000ull + 1);
-          }
-
-          for (auto &segment : segment_load_commands) {
-            segment.fileoff = file_offset;
-            file_offset += segment.filesize;
-          }
-
-          // Write out all of the LC_THREAD load commands
-          for (const auto &LC_THREAD_data : LC_THREAD_datas) {
-            const size_t LC_THREAD_data_size = LC_THREAD_data.GetSize();
-            buffer.PutHex32(LC_THREAD);
-            buffer.PutHex32(8 + LC_THREAD_data_size); // cmd + cmdsize + data
-            buffer.Write(LC_THREAD_data.GetString().data(),
-                         LC_THREAD_data_size);
-          }
-
-          // Write out all of the segment load commands
-          for (const auto &segment : segment_load_commands) {
-            printf("0x%8.8x 0x%8.8x [0x%16.16" PRIx64 " - 0x%16.16" PRIx64
-                   ") [0x%16.16" PRIx64 " 0x%16.16" PRIx64
-                   ") 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x]\n",
-                   segment.cmd, segment.cmdsize, segment.vmaddr,
-                   segment.vmaddr + segment.vmsize, segment.fileoff,
-                   segment.filesize, segment.maxprot, segment.initprot,
-                   segment.nsects, segment.flags);
-
-            buffer.PutHex32(segment.cmd);
-            buffer.PutHex32(segment.cmdsize);
-            buffer.PutRawBytes(segment.segname, sizeof(segment.segname));
-            if (addr_byte_size == 8) {
-              buffer.PutHex64(segment.vmaddr);
-              buffer.PutHex64(segment.vmsize);
-              buffer.PutHex64(segment.fileoff);
-              buffer.PutHex64(segment.filesize);
-            } else {
-              buffer.PutHex32(static_cast<uint32_t>(segment.vmaddr));
-              buffer.PutHex32(static_cast<uint32_t>(segment.vmsize));
-              buffer.PutHex32(static_cast<uint32_t>(segment.fileoff));
-              buffer.PutHex32(static_cast<uint32_t>(segment.filesize));
-            }
-            buffer.PutHex32(segment.maxprot);
-            buffer.PutHex32(segment.initprot);
-            buffer.PutHex32(segment.nsects);
-            buffer.PutHex32(segment.flags);
-          }
-
-          File core_file;
-          std::string core_file_path(outfile.GetPath());
-          error = FileSystem::Instance().Open(core_file, outfile,
-                                              File::eOpenOptionWrite |
-                                                  File::eOpenOptionTruncate |
-                                                  File::eOpenOptionCanCreate);
-          if (error.Success()) {
-            // Read 1 page at a time
-            uint8_t bytes[0x1000];
-            // Write the mach header and load commands out to the core file
-            size_t bytes_written = buffer.GetString().size();
-            error = core_file.Write(buffer.GetString().data(), bytes_written);
-            if (error.Success()) {
-              // Now write the file data for all memory segments in the process
-              for (const auto &segment : segment_load_commands) {
-                if (core_file.SeekFromStart(segment.fileoff) == -1) {
-                  error.SetErrorStringWithFormat(
-                      "unable to seek to offset 0x%" PRIx64 " in '%s'",
-                      segment.fileoff, core_file_path.c_str());
-                  break;
-                }
-
-                printf("Saving %" PRId64
-                       " bytes of data for memory region at 0x%" PRIx64 "\n",
-                       segment.vmsize, segment.vmaddr);
-                addr_t bytes_left = segment.vmsize;
-                addr_t addr = segment.vmaddr;
-                Status memory_read_error;
-                while (bytes_left > 0 && error.Success()) {
-                  const size_t bytes_to_read =
-                      bytes_left > sizeof(bytes) ? sizeof(bytes) : bytes_left;
-
-                  // In a savecore setting, we don't really care about caching,
-                  // as the data is dumped and very likely never read again,
-                  // so we call ReadMemoryFromInferior to bypass it.
-                  const size_t bytes_read = process_sp->ReadMemoryFromInferior(
-                      addr, bytes, bytes_to_read, memory_read_error);
-
-                  if (bytes_read == bytes_to_read) {
-                    size_t bytes_written = bytes_read;
-                    error = core_file.Write(bytes, bytes_written);
-                    bytes_left -= bytes_read;
-                    addr += bytes_read;
-                  } else {
-                    // Some pages within regions are not readable, those should
-                    // be zero filled
-                    memset(bytes, 0, bytes_to_read);
-                    size_t bytes_written = bytes_to_read;
-                    error = core_file.Write(bytes, bytes_written);
-                    bytes_left -= bytes_to_read;
-                    addr += bytes_to_read;
-                  }
-                }
-              }
-            }
-          }
-        } else {
-          error.SetErrorString(
-              "process doesn't support getting memory region info");
-        }
-      }
-      return true; // This is the right plug to handle saving core files for
-                   // this process
+  Target &target = process_sp->GetTarget();
+  const ArchSpec target_arch = target.GetArchitecture();
+  const llvm::Triple &target_triple = target_arch.GetTriple();
+  if (target_triple.getVendor() == llvm::Triple::Apple &&
+      (target_triple.getOS() == llvm::Triple::MacOSX ||
+       target_triple.getOS() == llvm::Triple::IOS ||
+       target_triple.getOS() == llvm::Triple::WatchOS ||
+       target_triple.getOS() == llvm::Triple::TvOS)) {
+    // NEED_BRIDGEOS_TRIPLE target_triple.getOS() == llvm::Triple::BridgeOS))
+    // {
+    bool make_core = false;
+    switch (target_arch.GetMachine()) {
+    case llvm::Triple::aarch64:
+    case llvm::Triple::aarch64_32:
+    case llvm::Triple::arm:
+    case llvm::Triple::thumb:
+    case llvm::Triple::x86:
+    case llvm::Triple::x86_64:
+      make_core = true;
+      break;
+    default:
+      error.SetErrorStringWithFormat("unsupported core architecture: %s",
+                                     target_triple.str().c_str());
+      break;
     }
+
+    if (make_core) {
+      std::vector<segment_command_64> segment_load_commands;
+      //                uint32_t range_info_idx = 0;
+      MemoryRegionInfo range_info;
+      Status range_error = process_sp->GetMemoryRegionInfo(0, range_info);
+      const uint32_t addr_byte_size = target_arch.GetAddressByteSize();
+      const ByteOrder byte_order = target_arch.GetByteOrder();
+      if (range_error.Success()) {
+        while (range_info.GetRange().GetRangeBase() != LLDB_INVALID_ADDRESS) {
+          const addr_t addr = range_info.GetRange().GetRangeBase();
+          const addr_t size = range_info.GetRange().GetByteSize();
+
+          if (size == 0)
+            break;
+
+          // Calculate correct protections
+          uint32_t prot = 0;
+          if (range_info.GetReadable() == MemoryRegionInfo::eYes)
+            prot |= VM_PROT_READ;
+          if (range_info.GetWritable() == MemoryRegionInfo::eYes)
+            prot |= VM_PROT_WRITE;
+          if (range_info.GetExecutable() == MemoryRegionInfo::eYes)
+            prot |= VM_PROT_EXECUTE;
+
+          if (prot != 0) {
+            uint32_t cmd_type = LC_SEGMENT_64;
+            uint32_t segment_size = sizeof(segment_command_64);
+            if (addr_byte_size == 4) {
+              cmd_type = LC_SEGMENT;
+              segment_size = sizeof(segment_command);
+            }
+            segment_command_64 segment = {
+                cmd_type,     // uint32_t cmd;
+                segment_size, // uint32_t cmdsize;
+                {0},          // char segname[16];
+                addr, // uint64_t vmaddr;    // uint32_t for 32-bit Mach-O
+                size, // uint64_t vmsize;    // uint32_t for 32-bit Mach-O
+                0,    // uint64_t fileoff;   // uint32_t for 32-bit Mach-O
+                size, // uint64_t filesize;  // uint32_t for 32-bit Mach-O
+                prot, // uint32_t maxprot;
+                prot, // uint32_t initprot;
+                0,    // uint32_t nsects;
+                0};   // uint32_t flags;
+            segment_load_commands.push_back(segment);
+          } else {
+            // No protections and a size of 1 used to be returned from old
+            // debugservers when we asked about a region that was past the
+            // last memory region and it indicates the end...
+            if (size == 1)
+              break;
+          }
+
+          range_error = process_sp->GetMemoryRegionInfo(
+              range_info.GetRange().GetRangeEnd(), range_info);
+          if (range_error.Fail())
+            break;
+        }
+
+        StreamString buffer(Stream::eBinary, addr_byte_size, byte_order);
+
+        mach_header_64 mach_header;
+        if (addr_byte_size == 8) {
+          mach_header.magic = MH_MAGIC_64;
+        } else {
+          mach_header.magic = MH_MAGIC;
+        }
+        mach_header.cputype = target_arch.GetMachOCPUType();
+        mach_header.cpusubtype = target_arch.GetMachOCPUSubType();
+        mach_header.filetype = MH_CORE;
+        mach_header.ncmds = segment_load_commands.size();
+        mach_header.flags = 0;
+        mach_header.reserved = 0;
+        ThreadList &thread_list = process_sp->GetThreadList();
+        const uint32_t num_threads = thread_list.GetSize();
+
+        // Make an array of LC_THREAD data items. Each one contains the
+        // contents of the LC_THREAD load command. The data doesn't contain
+        // the load command + load command size, we will add the load command
+        // and load command size as we emit the data.
+        std::vector<StreamString> LC_THREAD_datas(num_threads);
+        for (auto &LC_THREAD_data : LC_THREAD_datas) {
+          LC_THREAD_data.GetFlags().Set(Stream::eBinary);
+          LC_THREAD_data.SetAddressByteSize(addr_byte_size);
+          LC_THREAD_data.SetByteOrder(byte_order);
+        }
+        for (uint32_t thread_idx = 0; thread_idx < num_threads; ++thread_idx) {
+          ThreadSP thread_sp(thread_list.GetThreadAtIndex(thread_idx));
+          if (thread_sp) {
+            switch (mach_header.cputype) {
+            case llvm::MachO::CPU_TYPE_ARM64:
+            case llvm::MachO::CPU_TYPE_ARM64_32:
+              RegisterContextDarwin_arm64_Mach::Create_LC_THREAD(
+                  thread_sp.get(), LC_THREAD_datas[thread_idx]);
+              break;
+
+            case llvm::MachO::CPU_TYPE_ARM:
+              RegisterContextDarwin_arm_Mach::Create_LC_THREAD(
+                  thread_sp.get(), LC_THREAD_datas[thread_idx]);
+              break;
+
+            case llvm::MachO::CPU_TYPE_I386:
+              RegisterContextDarwin_i386_Mach::Create_LC_THREAD(
+                  thread_sp.get(), LC_THREAD_datas[thread_idx]);
+              break;
+
+            case llvm::MachO::CPU_TYPE_X86_64:
+              RegisterContextDarwin_x86_64_Mach::Create_LC_THREAD(
+                  thread_sp.get(), LC_THREAD_datas[thread_idx]);
+              break;
+            }
+          }
+        }
+
+        // The size of the load command is the size of the segments...
+        if (addr_byte_size == 8) {
+          mach_header.sizeofcmds =
+              segment_load_commands.size() * sizeof(struct segment_command_64);
+        } else {
+          mach_header.sizeofcmds =
+              segment_load_commands.size() * sizeof(struct segment_command);
+        }
+
+        // and the size of all LC_THREAD load command
+        for (const auto &LC_THREAD_data : LC_THREAD_datas) {
+          ++mach_header.ncmds;
+          mach_header.sizeofcmds += 8 + LC_THREAD_data.GetSize();
+        }
+
+        // Write the mach header
+        buffer.PutHex32(mach_header.magic);
+        buffer.PutHex32(mach_header.cputype);
+        buffer.PutHex32(mach_header.cpusubtype);
+        buffer.PutHex32(mach_header.filetype);
+        buffer.PutHex32(mach_header.ncmds);
+        buffer.PutHex32(mach_header.sizeofcmds);
+        buffer.PutHex32(mach_header.flags);
+        if (addr_byte_size == 8) {
+          buffer.PutHex32(mach_header.reserved);
+        }
+
+        // Skip the mach header and all load commands and align to the next
+        // 0x1000 byte boundary
+        addr_t file_offset = buffer.GetSize() + mach_header.sizeofcmds;
+        if (file_offset & 0x00000fff) {
+          file_offset += 0x00001000ull;
+          file_offset &= (~0x00001000ull + 1);
+        }
+
+        for (auto &segment : segment_load_commands) {
+          segment.fileoff = file_offset;
+          file_offset += segment.filesize;
+        }
+
+        // Write out all of the LC_THREAD load commands
+        for (const auto &LC_THREAD_data : LC_THREAD_datas) {
+          const size_t LC_THREAD_data_size = LC_THREAD_data.GetSize();
+          buffer.PutHex32(LC_THREAD);
+          buffer.PutHex32(8 + LC_THREAD_data_size); // cmd + cmdsize + data
+          buffer.Write(LC_THREAD_data.GetString().data(), LC_THREAD_data_size);
+        }
+
+        // Write out all of the segment load commands
+        for (const auto &segment : segment_load_commands) {
+          printf("0x%8.8x 0x%8.8x [0x%16.16" PRIx64 " - 0x%16.16" PRIx64
+                 ") [0x%16.16" PRIx64 " 0x%16.16" PRIx64
+                 ") 0x%8.8x 0x%8.8x 0x%8.8x 0x%8.8x]\n",
+                 segment.cmd, segment.cmdsize, segment.vmaddr,
+                 segment.vmaddr + segment.vmsize, segment.fileoff,
+                 segment.filesize, segment.maxprot, segment.initprot,
+                 segment.nsects, segment.flags);
+
+          buffer.PutHex32(segment.cmd);
+          buffer.PutHex32(segment.cmdsize);
+          buffer.PutRawBytes(segment.segname, sizeof(segment.segname));
+          if (addr_byte_size == 8) {
+            buffer.PutHex64(segment.vmaddr);
+            buffer.PutHex64(segment.vmsize);
+            buffer.PutHex64(segment.fileoff);
+            buffer.PutHex64(segment.filesize);
+          } else {
+            buffer.PutHex32(static_cast<uint32_t>(segment.vmaddr));
+            buffer.PutHex32(static_cast<uint32_t>(segment.vmsize));
+            buffer.PutHex32(static_cast<uint32_t>(segment.fileoff));
+            buffer.PutHex32(static_cast<uint32_t>(segment.filesize));
+          }
+          buffer.PutHex32(segment.maxprot);
+          buffer.PutHex32(segment.initprot);
+          buffer.PutHex32(segment.nsects);
+          buffer.PutHex32(segment.flags);
+        }
+
+        std::string core_file_path(outfile.GetPath());
+        auto core_file = FileSystem::Instance().Open(
+            outfile, File::eOpenOptionWrite | File::eOpenOptionTruncate |
+                         File::eOpenOptionCanCreate);
+        if (!core_file) {
+          error = core_file.takeError();
+        } else {
+          // Read 1 page at a time
+          uint8_t bytes[0x1000];
+          // Write the mach header and load commands out to the core file
+          size_t bytes_written = buffer.GetString().size();
+          error =
+              core_file.get()->Write(buffer.GetString().data(), bytes_written);
+          if (error.Success()) {
+            // Now write the file data for all memory segments in the process
+            for (const auto &segment : segment_load_commands) {
+              if (core_file.get()->SeekFromStart(segment.fileoff) == -1) {
+                error.SetErrorStringWithFormat(
+                    "unable to seek to offset 0x%" PRIx64 " in '%s'",
+                    segment.fileoff, core_file_path.c_str());
+                break;
+              }
+
+              printf("Saving %" PRId64
+                     " bytes of data for memory region at 0x%" PRIx64 "\n",
+                     segment.vmsize, segment.vmaddr);
+              addr_t bytes_left = segment.vmsize;
+              addr_t addr = segment.vmaddr;
+              Status memory_read_error;
+              while (bytes_left > 0 && error.Success()) {
+                const size_t bytes_to_read =
+                    bytes_left > sizeof(bytes) ? sizeof(bytes) : bytes_left;
+
+                // In a savecore setting, we don't really care about caching,
+                // as the data is dumped and very likely never read again,
+                // so we call ReadMemoryFromInferior to bypass it.
+                const size_t bytes_read = process_sp->ReadMemoryFromInferior(
+                    addr, bytes, bytes_to_read, memory_read_error);
+
+                if (bytes_read == bytes_to_read) {
+                  size_t bytes_written = bytes_read;
+                  error = core_file.get()->Write(bytes, bytes_written);
+                  bytes_left -= bytes_read;
+                  addr += bytes_read;
+                } else {
+                  // Some pages within regions are not readable, those should
+                  // be zero filled
+                  memset(bytes, 0, bytes_to_read);
+                  size_t bytes_written = bytes_to_read;
+                  error = core_file.get()->Write(bytes, bytes_written);
+                  bytes_left -= bytes_to_read;
+                  addr += bytes_to_read;
+                }
+              }
+            }
+          }
+        }
+      } else {
+        error.SetErrorString(
+            "process doesn't support getting memory region info");
+      }
+    }
+    return true; // This is the right plug to handle saving core files for
+                 // this process
   }
   return false;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h b/src/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
index df6b914..eb84329 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
@@ -63,6 +63,13 @@
   static bool MagicBytesMatch(lldb::DataBufferSP &data_sp, lldb::addr_t offset,
                               lldb::addr_t length);
 
+  // LLVM RTTI support
+  static char ID;
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || ObjectFile::isA(ClassID);
+  }
+  static bool classof(const ObjectFile *obj) { return obj->isA(&ID); }
+
   // Member Functions
   bool ParseHeader() override;
 
@@ -73,6 +80,8 @@
 
   bool IsExecutable() const override;
 
+  bool IsDynamicLoader() const;
+
   uint32_t GetAddressByteSize() const override;
 
   lldb_private::AddressClass GetAddressClass(lldb::addr_t file_addr) override;
@@ -137,23 +146,37 @@
           const lldb_private::DataExtractor &data,
           lldb::offset_t lc_offset); // Offset to the first load command
 
-  static lldb_private::ArchSpec
-  GetArchitecture(const llvm::MachO::mach_header &header,
-                  const lldb_private::DataExtractor &data,
-                  lldb::offset_t lc_offset);
+  static lldb_private::ArchSpec GetArchitecture(
+      lldb::ModuleSP module_sp, const llvm::MachO::mach_header &header,
+      const lldb_private::DataExtractor &data, lldb::offset_t lc_offset);
 
-  // Intended for same-host arm device debugging where lldb needs to
-  // detect libraries in the shared cache and augment the nlist entries
-  // with an on-disk dyld_shared_cache file.  The process will record
-  // the shared cache UUID so the on-disk cache can be matched or rejected
-  // correctly.
-  void GetProcessSharedCacheUUID(lldb_private::Process *, lldb::addr_t &base_addr, lldb_private::UUID &uuid);
+  /// Enumerate all ArchSpecs supported by this Mach-O file.
+  ///
+  /// On macOS one Mach-O slice can contain multiple load commands:
+  /// One load command for being loaded into a macOS process and one
+  /// load command for being loaded into a macCatalyst process. In
+  /// contrast to ObjectContainerUniversalMachO, this is the same
+  /// binary that can be loaded into different contexts.
+  static void GetAllArchSpecs(const llvm::MachO::mach_header &header,
+                              const lldb_private::DataExtractor &data,
+                              lldb::offset_t lc_offset,
+                              lldb_private::ModuleSpec &base_spec,
+                              lldb_private::ModuleSpecList &all_specs);
 
-  // Intended for same-host arm device debugging where lldb will read
-  // shared cache libraries out of its own memory instead of the remote
-  // process' memory as an optimization.  If lldb's shared cache UUID
-  // does not match the process' shared cache UUID, this optimization
-  // should not be used.
+  /// Intended for same-host arm device debugging where lldb needs to
+  /// detect libraries in the shared cache and augment the nlist entries
+  /// with an on-disk dyld_shared_cache file.  The process will record
+  /// the shared cache UUID so the on-disk cache can be matched or rejected
+  /// correctly.
+  void GetProcessSharedCacheUUID(lldb_private::Process *,
+                                 lldb::addr_t &base_addr,
+                                 lldb_private::UUID &uuid);
+
+  /// Intended for same-host arm device debugging where lldb will read
+  /// shared cache libraries out of its own memory instead of the remote
+  /// process' memory as an optimization.  If lldb's shared cache UUID
+  /// does not match the process' shared cache UUID, this optimization
+  /// should not be used.
   void GetLLDBSharedCacheUUID(lldb::addr_t &base_addir, lldb_private::UUID &uuid);
 
   lldb_private::Section *GetMachHeaderSection();
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
index 04321f2..ad768fe 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
@@ -1,5 +1,13 @@
+# Dbghelp is used on windows for writing minidump files.
+if(WIN32)
+  set(DBGHELP_LINK_FILES dbghelp)
+else()
+  set(DBGHELP_LINK_FILES "")
+endif()
+
 add_lldb_library(lldbPluginObjectFilePECOFF PLUGIN
   ObjectFilePECOFF.cpp
+  PECallFrameInfo.cpp
   WindowsMiniDump.cpp
 
   LINK_LIBS
@@ -7,6 +15,7 @@
     lldbHost
     lldbSymbol
     lldbTarget
+    ${DBGHELP_LINK_FILES}
   LINK_COMPONENTS
     BinaryFormat
     Support
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index fab3790..750bc77 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "ObjectFilePECOFF.h"
+#include "PECallFrameInfo.h"
 #include "WindowsMiniDump.h"
 
 #include "lldb/Core/FileSpecList.h"
@@ -88,6 +89,8 @@
   return UUID();
 }
 
+char ObjectFilePECOFF::ID;
+
 void ObjectFilePECOFF::Initialize() {
   PluginManager::RegisterPlugin(
       GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance,
@@ -111,9 +114,10 @@
 ObjectFile *ObjectFilePECOFF::CreateInstance(const lldb::ModuleSP &module_sp,
                                              DataBufferSP &data_sp,
                                              lldb::offset_t data_offset,
-                                             const lldb_private::FileSpec *file,
+                                             const lldb_private::FileSpec *file_p,
                                              lldb::offset_t file_offset,
                                              lldb::offset_t length) {
+  FileSpec file = file_p ? *file_p : FileSpec();
   if (!data_sp) {
     data_sp = MapFileData(file, length, file_offset);
     if (!data_sp)
@@ -131,8 +135,8 @@
       return nullptr;
   }
 
-  auto objfile_up = llvm::make_unique<ObjectFilePECOFF>(
-      module_sp, data_sp, data_offset, file, file_offset, length);
+  auto objfile_up = std::make_unique<ObjectFilePECOFF>(
+      module_sp, data_sp, data_offset, file_p, file_offset, length);
   if (!objfile_up || !objfile_up->ParseHeader())
     return nullptr;
 
@@ -148,7 +152,7 @@
     const lldb::ProcessSP &process_sp, lldb::addr_t header_addr) {
   if (!data_sp || !ObjectFilePECOFF::MagicBytesMatch(data_sp))
     return nullptr;
-  auto objfile_up = llvm::make_unique<ObjectFilePECOFF>(
+  auto objfile_up = std::make_unique<ObjectFilePECOFF>(
       module_sp, data_sp, process_sp, header_addr);
   if (objfile_up.get() && objfile_up->ParseHeader()) {
     return objfile_up.release();
@@ -164,9 +168,15 @@
   if (!data_sp || !ObjectFilePECOFF::MagicBytesMatch(data_sp))
     return initial_count;
 
+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
+
   auto binary = llvm::object::createBinary(file.GetPath());
-  if (!binary)
+
+  if (!binary) {
+    LLDB_LOG_ERROR(log, binary.takeError(),
+                   "Failed to create binary for file ({1}): {0}", file);
     return initial_count;
+  }
 
   if (!binary->getBinary()->isCOFF() &&
       !binary->getBinary()->isCOFFImportFile())
@@ -193,7 +203,11 @@
     specs.Append(module_spec);
     break;
   case MachineArmNt:
-    spec.SetTriple("arm-pc-windows");
+    spec.SetTriple("armv7-pc-windows");
+    specs.Append(module_spec);
+    break;
+  case MachineArm64:
+    spec.SetTriple("aarch64-pc-windows");
     specs.Append(module_spec);
     break;
   default:
@@ -235,11 +249,8 @@
 
   auto binary = llvm::object::createBinary(m_file.GetPath());
   if (!binary) {
-    if (log)
-      log->Printf("ObjectFilePECOFF::CreateBinary() - failed to create binary "
-                  "for file (%s): %s",
-                  m_file ? m_file.GetPath().c_str() : "<NULL>",
-                  errorToErrorCode(binary.takeError()).message().c_str());
+    LLDB_LOG_ERROR(log, binary.takeError(),
+                   "Failed to create binary for file ({1}): {0}", m_file);
     return false;
   }
 
@@ -249,15 +260,14 @@
     return false;
 
   m_owningbin = OWNBINType(std::move(*binary));
-  if (log)
-    log->Printf("%p ObjectFilePECOFF::CreateBinary() module = %p (%s), file = "
-                "%s, binary = %p (Bin = %p)",
-                static_cast<void *>(this),
-                static_cast<void *>(GetModule().get()),
-                GetModule()->GetSpecificationDescription().c_str(),
-                m_file ? m_file.GetPath().c_str() : "<NULL>",
-                static_cast<void *>(m_owningbin.getPointer()),
-                static_cast<void *>(m_owningbin->getBinary()));
+  LLDB_LOGF(log,
+            "%p ObjectFilePECOFF::CreateBinary() module = %p (%s), file = "
+            "%s, binary = %p (Bin = %p)",
+            static_cast<void *>(this), static_cast<void *>(GetModule().get()),
+            GetModule()->GetSpecificationDescription().c_str(),
+            m_file ? m_file.GetPath().c_str() : "<NULL>",
+            static_cast<void *>(m_owningbin.getPointer()),
+            static_cast<void *>(m_owningbin->getBinary()));
   return true;
 }
 
@@ -268,11 +278,10 @@
                                    lldb::offset_t file_offset,
                                    lldb::offset_t length)
     : ObjectFile(module_sp, file, file_offset, length, data_sp, data_offset),
-      m_dos_header(), m_coff_header(), m_coff_header_opt(), m_sect_headers(),
+      m_dos_header(), m_coff_header(), m_sect_headers(),
       m_entry_point_address(), m_deps_filespec(), m_owningbin() {
   ::memset(&m_dos_header, 0, sizeof(m_dos_header));
   ::memset(&m_coff_header, 0, sizeof(m_coff_header));
-  ::memset(&m_coff_header_opt, 0, sizeof(m_coff_header_opt));
 }
 
 ObjectFilePECOFF::ObjectFilePECOFF(const lldb::ModuleSP &module_sp,
@@ -280,11 +289,10 @@
                                    const lldb::ProcessSP &process_sp,
                                    addr_t header_addr)
     : ObjectFile(module_sp, process_sp, header_addr, header_data_sp),
-      m_dos_header(), m_coff_header(), m_coff_header_opt(), m_sect_headers(),
+      m_dos_header(), m_coff_header(), m_sect_headers(),
       m_entry_point_address(), m_deps_filespec(), m_owningbin() {
   ::memset(&m_dos_header, 0, sizeof(m_dos_header));
   ::memset(&m_coff_header, 0, sizeof(m_coff_header));
-  ::memset(&m_coff_header_opt, 0, sizeof(m_coff_header_opt));
 }
 
 ObjectFilePECOFF::~ObjectFilePECOFF() {}
@@ -307,6 +315,7 @@
           ParseCOFFOptionalHeader(&offset);
         ParseSectionHeaders(offset);
       }
+      m_data.SetAddressByteSize(GetAddressByteSize());
       return true;
     }
   }
@@ -515,7 +524,26 @@
   return success;
 }
 
+uint32_t ObjectFilePECOFF::GetRVA(const Address &addr) const {
+  return addr.GetFileAddress() - m_image_base;
+}
+
+Address ObjectFilePECOFF::GetAddress(uint32_t rva) {
+  SectionList *sect_list = GetSectionList();
+  if (!sect_list)
+    return Address(GetFileAddress(rva));
+
+  return Address(GetFileAddress(rva), sect_list);
+}
+
+lldb::addr_t ObjectFilePECOFF::GetFileAddress(uint32_t rva) const {
+  return m_image_base + rva;
+}
+
 DataExtractor ObjectFilePECOFF::ReadImageData(uint32_t offset, size_t size) {
+  if (!size)
+    return {};
+
   if (m_file) {
     // A bit of a hack, but we intend to write to this buffer, so we can't
     // mmap it.
@@ -525,7 +553,7 @@
   ProcessSP process_sp(m_process_wp.lock());
   DataExtractor data;
   if (process_sp) {
-    auto data_up = llvm::make_unique<DataBufferHeap>(size, 0);
+    auto data_up = std::make_unique<DataBufferHeap>(size, 0);
     Status readmem_error;
     size_t bytes_read =
         process_sp->ReadMemory(m_image_base + offset, data_up->GetBytes(),
@@ -538,6 +566,18 @@
   return data;
 }
 
+DataExtractor ObjectFilePECOFF::ReadImageDataByRVA(uint32_t rva, size_t size) {
+  if (m_file) {
+    Address addr = GetAddress(rva);
+    SectionSP sect = addr.GetSection();
+    if (!sect)
+      return {};
+    rva = sect->GetFileOffset() + addr.GetOffset();
+  }
+
+  return ReadImageData(rva, size);
+}
+
 // ParseSectionHeaders
 bool ObjectFilePECOFF::ParseSectionHeaders(
     uint32_t section_header_data_offset) {
@@ -653,7 +693,7 @@
             symbol.naux = symtab_data.GetU8(&offset);
             symbols[i].GetMangled().SetValue(ConstString(symbol_name.c_str()));
             if ((int16_t)symbol.sect >= 1) {
-              Address symbol_addr(sect_list->GetSectionAtIndex(symbol.sect - 1),
+              Address symbol_addr(sect_list->FindSectionByID(symbol.sect),
                                   symbol.value);
               symbols[i].GetAddressRef() = symbol_addr;
               symbols[i].SetType(MapSymbolType(symbol.type));
@@ -675,14 +715,8 @@
         uint32_t data_start =
             m_coff_header_opt.data_dirs[coff_data_dir_export_table].vmaddr;
 
-        uint32_t address_rva = data_start;
-        if (m_file) {
-          Address address(m_coff_header_opt.image_base + data_start, sect_list);
-          address_rva =
-              address.GetSection()->GetFileOffset() + address.GetOffset();
-        }
-        DataExtractor symtab_data =
-            ReadImageData(address_rva, m_coff_header_opt.data_dirs[0].vmsize);
+        DataExtractor symtab_data = ReadImageDataByRVA(
+            data_start, m_coff_header_opt.data_dirs[0].vmsize);
         lldb::offset_t offset = 0;
 
         // Read export_table header
@@ -737,11 +771,98 @@
   return m_symtab_up.get();
 }
 
+std::unique_ptr<CallFrameInfo> ObjectFilePECOFF::CreateCallFrameInfo() {
+  if (coff_data_dir_exception_table >= m_coff_header_opt.data_dirs.size())
+    return {};
+
+  data_directory data_dir_exception =
+      m_coff_header_opt.data_dirs[coff_data_dir_exception_table];
+  if (!data_dir_exception.vmaddr)
+    return {};
+
+  if (m_coff_header.machine != llvm::COFF::IMAGE_FILE_MACHINE_AMD64)
+    return {};
+
+  return std::make_unique<PECallFrameInfo>(*this, data_dir_exception.vmaddr,
+                                           data_dir_exception.vmsize);
+}
+
 bool ObjectFilePECOFF::IsStripped() {
   // TODO: determine this for COFF
   return false;
 }
 
+SectionType ObjectFilePECOFF::GetSectionType(llvm::StringRef sect_name,
+                                             const section_header_t &sect) {
+  ConstString const_sect_name(sect_name);
+  static ConstString g_code_sect_name(".code");
+  static ConstString g_CODE_sect_name("CODE");
+  static ConstString g_data_sect_name(".data");
+  static ConstString g_DATA_sect_name("DATA");
+  static ConstString g_bss_sect_name(".bss");
+  static ConstString g_BSS_sect_name("BSS");
+
+  if (sect.flags & llvm::COFF::IMAGE_SCN_CNT_CODE &&
+      ((const_sect_name == g_code_sect_name) ||
+       (const_sect_name == g_CODE_sect_name))) {
+    return eSectionTypeCode;
+  }
+  if (sect.flags & llvm::COFF::IMAGE_SCN_CNT_INITIALIZED_DATA &&
+             ((const_sect_name == g_data_sect_name) ||
+              (const_sect_name == g_DATA_sect_name))) {
+    if (sect.size == 0 && sect.offset == 0)
+      return eSectionTypeZeroFill;
+    else
+      return eSectionTypeData;
+  }
+  if (sect.flags & llvm::COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA &&
+             ((const_sect_name == g_bss_sect_name) ||
+              (const_sect_name == g_BSS_sect_name))) {
+    if (sect.size == 0)
+      return eSectionTypeZeroFill;
+    else
+      return eSectionTypeData;
+  }
+
+  SectionType section_type =
+      llvm::StringSwitch<SectionType>(sect_name)
+          .Case(".debug", eSectionTypeDebug)
+          .Case(".stabstr", eSectionTypeDataCString)
+          .Case(".reloc", eSectionTypeOther)
+          .Case(".debug_abbrev", eSectionTypeDWARFDebugAbbrev)
+          .Case(".debug_aranges", eSectionTypeDWARFDebugAranges)
+          .Case(".debug_frame", eSectionTypeDWARFDebugFrame)
+          .Case(".debug_info", eSectionTypeDWARFDebugInfo)
+          .Case(".debug_line", eSectionTypeDWARFDebugLine)
+          .Case(".debug_loc", eSectionTypeDWARFDebugLoc)
+          .Case(".debug_loclists", eSectionTypeDWARFDebugLocLists)
+          .Case(".debug_macinfo", eSectionTypeDWARFDebugMacInfo)
+          .Case(".debug_names", eSectionTypeDWARFDebugNames)
+          .Case(".debug_pubnames", eSectionTypeDWARFDebugPubNames)
+          .Case(".debug_pubtypes", eSectionTypeDWARFDebugPubTypes)
+          .Case(".debug_ranges", eSectionTypeDWARFDebugRanges)
+          .Case(".debug_str", eSectionTypeDWARFDebugStr)
+          .Case(".debug_types", eSectionTypeDWARFDebugTypes)
+          // .eh_frame can be truncated to 8 chars.
+          .Cases(".eh_frame", ".eh_fram", eSectionTypeEHFrame)
+          .Case(".gosymtab", eSectionTypeGoSymtab)
+          .Default(eSectionTypeInvalid);
+  if (section_type != eSectionTypeInvalid)
+    return section_type;
+
+  if (sect.flags & llvm::COFF::IMAGE_SCN_CNT_CODE)
+    return eSectionTypeCode;
+  if (sect.flags & llvm::COFF::IMAGE_SCN_CNT_INITIALIZED_DATA)
+    return eSectionTypeData;
+  if (sect.flags & llvm::COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA) {
+    if (sect.size == 0)
+      return eSectionTypeZeroFill;
+    else
+      return eSectionTypeData;
+  }
+  return eSectionTypeOther;
+}
+
 void ObjectFilePECOFF::CreateSections(SectionList &unified_section_list) {
   if (m_sections_up)
     return;
@@ -751,126 +872,34 @@
   if (module_sp) {
     std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
 
-    SectionSP image_sp = std::make_shared<Section>(
-        module_sp, this, ~user_id_t(0), ConstString(), eSectionTypeContainer,
-        m_coff_header_opt.image_base, m_coff_header_opt.image_size,
-        /*file_offset*/ 0, /*file_size*/ 0, m_coff_header_opt.sect_alignment,
+    SectionSP header_sp = std::make_shared<Section>(
+        module_sp, this, ~user_id_t(0), ConstString("PECOFF header"),
+        eSectionTypeOther, m_coff_header_opt.image_base,
+        m_coff_header_opt.header_size,
+        /*file_offset*/ 0, m_coff_header_opt.header_size,
+        m_coff_header_opt.sect_alignment,
         /*flags*/ 0);
-    m_sections_up->AddSection(image_sp);
-    unified_section_list.AddSection(image_sp);
+    header_sp->SetPermissions(ePermissionsReadable);
+    m_sections_up->AddSection(header_sp);
+    unified_section_list.AddSection(header_sp);
 
     const uint32_t nsects = m_sect_headers.size();
     ModuleSP module_sp(GetModule());
     for (uint32_t idx = 0; idx < nsects; ++idx) {
-      ConstString const_sect_name(GetSectionName(m_sect_headers[idx]));
-      static ConstString g_code_sect_name(".code");
-      static ConstString g_CODE_sect_name("CODE");
-      static ConstString g_data_sect_name(".data");
-      static ConstString g_DATA_sect_name("DATA");
-      static ConstString g_bss_sect_name(".bss");
-      static ConstString g_BSS_sect_name("BSS");
-      static ConstString g_debug_sect_name(".debug");
-      static ConstString g_reloc_sect_name(".reloc");
-      static ConstString g_stab_sect_name(".stab");
-      static ConstString g_stabstr_sect_name(".stabstr");
-      static ConstString g_sect_name_dwarf_debug_abbrev(".debug_abbrev");
-      static ConstString g_sect_name_dwarf_debug_aranges(".debug_aranges");
-      static ConstString g_sect_name_dwarf_debug_frame(".debug_frame");
-      static ConstString g_sect_name_dwarf_debug_info(".debug_info");
-      static ConstString g_sect_name_dwarf_debug_line(".debug_line");
-      static ConstString g_sect_name_dwarf_debug_loc(".debug_loc");
-      static ConstString g_sect_name_dwarf_debug_loclists(".debug_loclists");
-      static ConstString g_sect_name_dwarf_debug_macinfo(".debug_macinfo");
-      static ConstString g_sect_name_dwarf_debug_names(".debug_names");
-      static ConstString g_sect_name_dwarf_debug_pubnames(".debug_pubnames");
-      static ConstString g_sect_name_dwarf_debug_pubtypes(".debug_pubtypes");
-      static ConstString g_sect_name_dwarf_debug_ranges(".debug_ranges");
-      static ConstString g_sect_name_dwarf_debug_str(".debug_str");
-      static ConstString g_sect_name_dwarf_debug_types(".debug_types");
-      static ConstString g_sect_name_eh_frame(".eh_frame");
-      static ConstString g_sect_name_go_symtab(".gosymtab");
-      SectionType section_type = eSectionTypeOther;
-      if (m_sect_headers[idx].flags & llvm::COFF::IMAGE_SCN_CNT_CODE &&
-          ((const_sect_name == g_code_sect_name) ||
-           (const_sect_name == g_CODE_sect_name))) {
-        section_type = eSectionTypeCode;
-      } else if (m_sect_headers[idx].flags &
-                     llvm::COFF::IMAGE_SCN_CNT_INITIALIZED_DATA &&
-                 ((const_sect_name == g_data_sect_name) ||
-                  (const_sect_name == g_DATA_sect_name))) {
-        if (m_sect_headers[idx].size == 0 && m_sect_headers[idx].offset == 0)
-          section_type = eSectionTypeZeroFill;
-        else
-          section_type = eSectionTypeData;
-      } else if (m_sect_headers[idx].flags &
-                     llvm::COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA &&
-                 ((const_sect_name == g_bss_sect_name) ||
-                  (const_sect_name == g_BSS_sect_name))) {
-        if (m_sect_headers[idx].size == 0)
-          section_type = eSectionTypeZeroFill;
-        else
-          section_type = eSectionTypeData;
-      } else if (const_sect_name == g_debug_sect_name) {
-        section_type = eSectionTypeDebug;
-      } else if (const_sect_name == g_stabstr_sect_name) {
-        section_type = eSectionTypeDataCString;
-      } else if (const_sect_name == g_reloc_sect_name) {
-        section_type = eSectionTypeOther;
-      } else if (const_sect_name == g_sect_name_dwarf_debug_abbrev)
-        section_type = eSectionTypeDWARFDebugAbbrev;
-      else if (const_sect_name == g_sect_name_dwarf_debug_aranges)
-        section_type = eSectionTypeDWARFDebugAranges;
-      else if (const_sect_name == g_sect_name_dwarf_debug_frame)
-        section_type = eSectionTypeDWARFDebugFrame;
-      else if (const_sect_name == g_sect_name_dwarf_debug_info)
-        section_type = eSectionTypeDWARFDebugInfo;
-      else if (const_sect_name == g_sect_name_dwarf_debug_line)
-        section_type = eSectionTypeDWARFDebugLine;
-      else if (const_sect_name == g_sect_name_dwarf_debug_loc)
-        section_type = eSectionTypeDWARFDebugLoc;
-      else if (const_sect_name == g_sect_name_dwarf_debug_loclists)
-        section_type = eSectionTypeDWARFDebugLocLists;
-      else if (const_sect_name == g_sect_name_dwarf_debug_macinfo)
-        section_type = eSectionTypeDWARFDebugMacInfo;
-      else if (const_sect_name == g_sect_name_dwarf_debug_names)
-        section_type = eSectionTypeDWARFDebugNames;
-      else if (const_sect_name == g_sect_name_dwarf_debug_pubnames)
-        section_type = eSectionTypeDWARFDebugPubNames;
-      else if (const_sect_name == g_sect_name_dwarf_debug_pubtypes)
-        section_type = eSectionTypeDWARFDebugPubTypes;
-      else if (const_sect_name == g_sect_name_dwarf_debug_ranges)
-        section_type = eSectionTypeDWARFDebugRanges;
-      else if (const_sect_name == g_sect_name_dwarf_debug_str)
-        section_type = eSectionTypeDWARFDebugStr;
-      else if (const_sect_name == g_sect_name_dwarf_debug_types)
-        section_type = eSectionTypeDWARFDebugTypes;
-      else if (const_sect_name == g_sect_name_eh_frame)
-        section_type = eSectionTypeEHFrame;
-      else if (const_sect_name == g_sect_name_go_symtab)
-        section_type = eSectionTypeGoSymtab;
-      else if (m_sect_headers[idx].flags & llvm::COFF::IMAGE_SCN_CNT_CODE) {
-        section_type = eSectionTypeCode;
-      } else if (m_sect_headers[idx].flags &
-                 llvm::COFF::IMAGE_SCN_CNT_INITIALIZED_DATA) {
-        section_type = eSectionTypeData;
-      } else if (m_sect_headers[idx].flags &
-                 llvm::COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA) {
-        if (m_sect_headers[idx].size == 0)
-          section_type = eSectionTypeZeroFill;
-        else
-          section_type = eSectionTypeData;
-      }
+      llvm::StringRef sect_name = GetSectionName(m_sect_headers[idx]);
+      ConstString const_sect_name(sect_name);
+      SectionType section_type = GetSectionType(sect_name, m_sect_headers[idx]);
 
       SectionSP section_sp(new Section(
-          image_sp,        // Parent section
           module_sp,       // Module to which this section belongs
           this,            // Object file to which this section belongs
           idx + 1,         // Section ID is the 1 based section index.
           const_sect_name, // Name of this section
           section_type,
-          m_sect_headers[idx].vmaddr, // File VM address == addresses as
-                                      // they are found in the object file
-          m_sect_headers[idx].vmsize, // VM size in bytes of this section
+          m_coff_header_opt.image_base +
+              m_sect_headers[idx].vmaddr, // File VM address == addresses as
+                                          // they are found in the object file
+          m_sect_headers[idx].vmsize,     // VM size in bytes of this section
           m_sect_headers[idx]
               .offset, // Offset to the data for this section in the file
           m_sect_headers[idx]
@@ -878,7 +907,17 @@
           m_coff_header_opt.sect_alignment, // Section alignment
           m_sect_headers[idx].flags));      // Flags for this section
 
-      image_sp->GetChildren().AddSection(std::move(section_sp));
+      uint32_t permissions = 0;
+      if (m_sect_headers[idx].flags & llvm::COFF::IMAGE_SCN_MEM_EXECUTE)
+        permissions |= ePermissionsExecutable;
+      if (m_sect_headers[idx].flags & llvm::COFF::IMAGE_SCN_MEM_READ)
+        permissions |= ePermissionsReadable;
+      if (m_sect_headers[idx].flags & llvm::COFF::IMAGE_SCN_MEM_WRITE)
+        permissions |= ePermissionsWritable;
+      section_sp->SetPermissions(permissions);
+
+      m_sections_up->AddSection(section_sp);
+      unified_section_list.AddSection(section_sp);
     }
   }
 }
@@ -911,13 +950,13 @@
     return 0;
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p ObjectFilePECOFF::ParseDependentModules() module = %p "
-                "(%s), binary = %p (Bin = %p)",
-                static_cast<void *>(this), static_cast<void *>(module_sp.get()),
-                module_sp->GetSpecificationDescription().c_str(),
-                static_cast<void *>(m_owningbin.getPointer()),
-                static_cast<void *>(m_owningbin->getBinary()));
+  LLDB_LOGF(log,
+            "%p ObjectFilePECOFF::ParseDependentModules() module = %p "
+            "(%s), binary = %p (Bin = %p)",
+            static_cast<void *>(this), static_cast<void *>(module_sp.get()),
+            module_sp->GetSpecificationDescription().c_str(),
+            static_cast<void *>(m_owningbin.getPointer()),
+            static_cast<void *>(m_owningbin->getBinary()));
 
   auto COFFObj =
       llvm::dyn_cast<llvm::object::COFFObjectFile>(m_owningbin->getBinary());
@@ -931,10 +970,10 @@
     auto ec = entry.getName(dll_name);
     // Report a bogus entry.
     if (ec != std::error_code()) {
-      if (log)
-        log->Printf("ObjectFilePECOFF::ParseDependentModules() - failed to get "
-                    "import directory entry name: %s",
-                    ec.message().c_str());
+      LLDB_LOGF(log,
+                "ObjectFilePECOFF::ParseDependentModules() - failed to get "
+                "import directory entry name: %s",
+                ec.message().c_str());
       continue;
     }
 
@@ -946,10 +985,10 @@
     dll_specs.GetDirectory().SetString(m_file.GetDirectory().GetCString());
 
     if (!llvm::sys::fs::real_path(dll_specs.GetPath(), dll_fullpath))
-      m_deps_filespec->Append(FileSpec(dll_fullpath));
+      m_deps_filespec->EmplaceBack(dll_fullpath);
     else {
       // Known DLLs or DLL not found in the object file directory.
-      m_deps_filespec->Append(FileSpec(dll_name));
+      m_deps_filespec->EmplaceBack(dll_name);
     }
   }
   return m_deps_filespec->GetSize();
@@ -1201,6 +1240,7 @@
   case llvm::COFF::IMAGE_FILE_MACHINE_ARM:
   case llvm::COFF::IMAGE_FILE_MACHINE_ARMNT:
   case llvm::COFF::IMAGE_FILE_MACHINE_THUMB:
+  case llvm::COFF::IMAGE_FILE_MACHINE_ARM64:
     ArchSpec arch;
     arch.SetArchitecture(eArchTypeCOFF, machine, LLDB_INVALID_CPUTYPE,
                          IsWindowsSubsystem() ? llvm::Triple::Win32
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
index 93edaa7..c0efe70 100644
--- a/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
@@ -85,6 +85,13 @@
 
   static lldb::SymbolType MapSymbolType(uint16_t coff_symbol_type);
 
+  // LLVM RTTI support
+  static char ID;
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || ObjectFile::isA(ClassID);
+  }
+  static bool classof(const ObjectFile *obj) { return obj->isA(&ID); }
+
   bool ParseHeader() override;
 
   bool SetLoadAddress(lldb_private::Target &target, lldb::addr_t value,
@@ -128,7 +135,14 @@
 
   bool IsWindowsSubsystem();
 
+  uint32_t GetRVA(const lldb_private::Address &addr) const;
+  lldb_private::Address GetAddress(uint32_t rva);
+  lldb::addr_t GetFileAddress(uint32_t rva) const;
+
   lldb_private::DataExtractor ReadImageData(uint32_t offset, size_t size);
+  lldb_private::DataExtractor ReadImageDataByRVA(uint32_t rva, size_t size);
+
+  std::unique_ptr<lldb_private::CallFrameInfo> CreateCallFrameInfo() override;
 
 protected:
   bool NeedsEndianSwap() const;
@@ -171,36 +185,36 @@
   } data_directory_t;
 
   typedef struct coff_opt_header {
-    uint16_t magic;
-    uint8_t major_linker_version;
-    uint8_t minor_linker_version;
-    uint32_t code_size;
-    uint32_t data_size;
-    uint32_t bss_size;
-    uint32_t entry;
-    uint32_t code_offset;
-    uint32_t data_offset;
+    uint16_t magic = 0;
+    uint8_t major_linker_version = 0;
+    uint8_t minor_linker_version = 0;
+    uint32_t code_size = 0;
+    uint32_t data_size = 0;
+    uint32_t bss_size = 0;
+    uint32_t entry = 0;
+    uint32_t code_offset = 0;
+    uint32_t data_offset = 0;
 
-    uint64_t image_base;
-    uint32_t sect_alignment;
-    uint32_t file_alignment;
-    uint16_t major_os_system_version;
-    uint16_t minor_os_system_version;
-    uint16_t major_image_version;
-    uint16_t minor_image_version;
-    uint16_t major_subsystem_version;
-    uint16_t minor_subsystem_version;
-    uint32_t reserved1;
-    uint32_t image_size;
-    uint32_t header_size;
-    uint32_t checksum;
-    uint16_t subsystem;
-    uint16_t dll_flags;
-    uint64_t stack_reserve_size;
-    uint64_t stack_commit_size;
-    uint64_t heap_reserve_size;
-    uint64_t heap_commit_size;
-    uint32_t loader_flags;
+    uint64_t image_base = 0;
+    uint32_t sect_alignment = 0;
+    uint32_t file_alignment = 0;
+    uint16_t major_os_system_version = 0;
+    uint16_t minor_os_system_version = 0;
+    uint16_t major_image_version = 0;
+    uint16_t minor_image_version = 0;
+    uint16_t major_subsystem_version = 0;
+    uint16_t minor_subsystem_version = 0;
+    uint32_t reserved1 = 0;
+    uint32_t image_size = 0;
+    uint32_t header_size = 0;
+    uint32_t checksum = 0;
+    uint16_t subsystem = 0;
+    uint16_t dll_flags = 0;
+    uint64_t stack_reserve_size = 0;
+    uint64_t stack_commit_size = 0;
+    uint64_t heap_reserve_size = 0;
+    uint64_t heap_commit_size = 0;
+    uint32_t loader_flags = 0;
     //    uint32_t	num_data_dir_entries;
     std::vector<data_directory>
         data_dirs; // will contain num_data_dir_entries entries
@@ -209,6 +223,7 @@
   enum coff_data_dir_type {
     coff_data_dir_export_table = 0,
     coff_data_dir_import_table = 1,
+    coff_data_dir_exception_table = 3
   };
 
   typedef struct section_header {
@@ -268,6 +283,8 @@
   void DumpDependentModules(lldb_private::Stream *s);
 
   llvm::StringRef GetSectionName(const section_header_t &sect);
+  static lldb::SectionType GetSectionType(llvm::StringRef sect_name,
+                                          const section_header_t &sect);
 
   typedef std::vector<section_header_t> SectionHeaderColl;
   typedef SectionHeaderColl::iterator SectionHeaderCollIter;
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp
new file mode 100644
index 0000000..522c9a6
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.cpp
@@ -0,0 +1,536 @@
+#include "PECallFrameInfo.h"
+
+#include "ObjectFilePECOFF.h"
+
+#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "lldb/Symbol/UnwindPlan.h"
+#include "llvm/Support/Win64EH.h"
+
+using namespace lldb;
+using namespace lldb_private;
+using namespace llvm::Win64EH;
+
+template <typename T>
+static const T *TypedRead(const DataExtractor &data_extractor, offset_t &offset,
+                          offset_t size = sizeof(T)) {
+  return static_cast<const T *>(data_extractor.GetData(&offset, size));
+}
+
+struct EHInstruction {
+  enum class Type {
+    PUSH_REGISTER,
+    ALLOCATE,
+    SET_FRAME_POINTER_REGISTER,
+    SAVE_REGISTER
+  };
+
+  uint8_t offset;
+  Type type;
+  uint32_t reg;
+  uint32_t frame_offset;
+};
+
+using EHProgram = std::vector<EHInstruction>;
+
+class UnwindCodesIterator {
+public:
+  UnwindCodesIterator(ObjectFilePECOFF &object_file, uint32_t unwind_info_rva);
+
+  bool GetNext();
+  bool IsError() const { return m_error; }
+
+  const UnwindInfo *GetUnwindInfo() const { return m_unwind_info; }
+  const UnwindCode *GetUnwindCode() const { return m_unwind_code; }
+  bool IsChained() const { return m_chained; }
+
+private:
+  ObjectFilePECOFF &m_object_file;
+
+  bool m_error;
+
+  uint32_t m_unwind_info_rva;
+  DataExtractor m_unwind_info_data;
+  const UnwindInfo *m_unwind_info;
+
+  DataExtractor m_unwind_code_data;
+  offset_t m_unwind_code_offset;
+  const UnwindCode *m_unwind_code;
+
+  bool m_chained;
+};
+
+UnwindCodesIterator::UnwindCodesIterator(ObjectFilePECOFF &object_file,
+                                         uint32_t unwind_info_rva)
+    : m_object_file(object_file), m_error(false),
+      m_unwind_info_rva(unwind_info_rva),
+      m_unwind_info(nullptr), m_unwind_code_offset{}, m_unwind_code(nullptr),
+      m_chained(false) {}
+
+bool UnwindCodesIterator::GetNext() {
+  static constexpr int UNWIND_INFO_SIZE = 4;
+
+  m_error = false;
+  m_unwind_code = nullptr;
+  while (!m_unwind_code) {
+    if (!m_unwind_info) {
+      m_unwind_info_data =
+          m_object_file.ReadImageDataByRVA(m_unwind_info_rva, UNWIND_INFO_SIZE);
+
+      offset_t offset = 0;
+      m_unwind_info =
+          TypedRead<UnwindInfo>(m_unwind_info_data, offset, UNWIND_INFO_SIZE);
+      if (!m_unwind_info) {
+        m_error = true;
+        break;
+      }
+
+      m_unwind_code_data = m_object_file.ReadImageDataByRVA(
+          m_unwind_info_rva + UNWIND_INFO_SIZE,
+          m_unwind_info->NumCodes * sizeof(UnwindCode));
+      m_unwind_code_offset = 0;
+    }
+
+    if (m_unwind_code_offset < m_unwind_code_data.GetByteSize()) {
+      m_unwind_code =
+          TypedRead<UnwindCode>(m_unwind_code_data, m_unwind_code_offset);
+      m_error = !m_unwind_code;
+      break;
+    }
+
+    if (!(m_unwind_info->getFlags() & UNW_ChainInfo))
+      break;
+
+    uint32_t runtime_function_rva =
+        m_unwind_info_rva + UNWIND_INFO_SIZE +
+        ((m_unwind_info->NumCodes + 1) & ~1) * sizeof(UnwindCode);
+    DataExtractor runtime_function_data = m_object_file.ReadImageDataByRVA(
+        runtime_function_rva, sizeof(RuntimeFunction));
+
+    offset_t offset = 0;
+    const auto *runtime_function =
+        TypedRead<RuntimeFunction>(runtime_function_data, offset);
+    if (!runtime_function) {
+      m_error = true;
+      break;
+    }
+
+    m_unwind_info_rva = runtime_function->UnwindInfoOffset;
+    m_unwind_info = nullptr;
+    m_chained = true;
+  }
+
+  return !!m_unwind_code;
+}
+
+class EHProgramBuilder {
+public:
+  EHProgramBuilder(ObjectFilePECOFF &object_file, uint32_t unwind_info_rva);
+
+  bool Build();
+
+  const EHProgram &GetProgram() const { return m_program; }
+
+private:
+  static uint32_t ConvertMachineToLLDBRegister(uint8_t machine_reg);
+  static uint32_t ConvertXMMToLLDBRegister(uint8_t xmm_reg);
+
+  bool ProcessUnwindCode(UnwindCode code);
+  void Finalize();
+
+  bool ParseBigOrScaledFrameOffset(uint32_t &result, bool big, uint32_t scale);
+  bool ParseBigFrameOffset(uint32_t &result);
+  bool ParseFrameOffset(uint32_t &result);
+
+  UnwindCodesIterator m_iterator;
+  EHProgram m_program;
+};
+
+EHProgramBuilder::EHProgramBuilder(ObjectFilePECOFF &object_file,
+                                   uint32_t unwind_info_rva)
+    : m_iterator(object_file, unwind_info_rva) {}
+
+bool EHProgramBuilder::Build() {
+  while (m_iterator.GetNext())
+    if (!ProcessUnwindCode(*m_iterator.GetUnwindCode()))
+      return false;
+
+  if (m_iterator.IsError())
+    return false;
+
+  Finalize();
+
+  return true;
+}
+
+uint32_t EHProgramBuilder::ConvertMachineToLLDBRegister(uint8_t machine_reg) {
+  static uint32_t machine_to_lldb_register[] = {
+      lldb_rax_x86_64, lldb_rcx_x86_64, lldb_rdx_x86_64, lldb_rbx_x86_64,
+      lldb_rsp_x86_64, lldb_rbp_x86_64, lldb_rsi_x86_64, lldb_rdi_x86_64,
+      lldb_r8_x86_64,  lldb_r9_x86_64,  lldb_r10_x86_64, lldb_r11_x86_64,
+      lldb_r12_x86_64, lldb_r13_x86_64, lldb_r14_x86_64, lldb_r15_x86_64};
+
+  if (machine_reg >= llvm::array_lengthof(machine_to_lldb_register))
+    return LLDB_INVALID_REGNUM;
+
+  return machine_to_lldb_register[machine_reg];
+}
+
+uint32_t EHProgramBuilder::ConvertXMMToLLDBRegister(uint8_t xmm_reg) {
+  static uint32_t xmm_to_lldb_register[] = {
+      lldb_xmm0_x86_64,  lldb_xmm1_x86_64,  lldb_xmm2_x86_64,
+      lldb_xmm3_x86_64,  lldb_xmm4_x86_64,  lldb_xmm5_x86_64,
+      lldb_xmm6_x86_64,  lldb_xmm7_x86_64,  lldb_xmm8_x86_64,
+      lldb_xmm9_x86_64,  lldb_xmm10_x86_64, lldb_xmm11_x86_64,
+      lldb_xmm12_x86_64, lldb_xmm13_x86_64, lldb_xmm14_x86_64,
+      lldb_xmm15_x86_64};
+
+  if (xmm_reg >= llvm::array_lengthof(xmm_to_lldb_register))
+    return LLDB_INVALID_REGNUM;
+
+  return xmm_to_lldb_register[xmm_reg];
+}
+
+bool EHProgramBuilder::ProcessUnwindCode(UnwindCode code) {
+  uint8_t o = m_iterator.IsChained() ? 0 : code.u.CodeOffset;
+  uint8_t unwind_operation = code.getUnwindOp();
+  uint8_t operation_info = code.getOpInfo();
+
+  switch (unwind_operation) {
+  case UOP_PushNonVol: {
+    uint32_t r = ConvertMachineToLLDBRegister(operation_info);
+    if (r == LLDB_INVALID_REGNUM)
+      return false;
+
+    m_program.emplace_back(
+        EHInstruction{o, EHInstruction::Type::PUSH_REGISTER, r, 8});
+
+    return true;
+  }
+  case UOP_AllocLarge: {
+    uint32_t fo;
+    if (!ParseBigOrScaledFrameOffset(fo, operation_info, 8))
+      return false;
+
+    m_program.emplace_back(EHInstruction{o, EHInstruction::Type::ALLOCATE,
+                                         LLDB_INVALID_REGNUM, fo});
+
+    return true;
+  }
+  case UOP_AllocSmall: {
+    m_program.emplace_back(
+        EHInstruction{o, EHInstruction::Type::ALLOCATE, LLDB_INVALID_REGNUM,
+                      static_cast<uint32_t>(operation_info) * 8 + 8});
+    return true;
+  }
+  case UOP_SetFPReg: {
+    uint32_t fpr = LLDB_INVALID_REGNUM;
+    if (m_iterator.GetUnwindInfo()->getFrameRegister())
+      fpr = ConvertMachineToLLDBRegister(
+          m_iterator.GetUnwindInfo()->getFrameRegister());
+    if (fpr == LLDB_INVALID_REGNUM)
+      return false;
+
+    uint32_t fpro =
+        static_cast<uint32_t>(m_iterator.GetUnwindInfo()->getFrameOffset()) *
+        16;
+
+    m_program.emplace_back(EHInstruction{
+        o, EHInstruction::Type::SET_FRAME_POINTER_REGISTER, fpr, fpro});
+
+    return true;
+  }
+  case UOP_SaveNonVol:
+  case UOP_SaveNonVolBig: {
+    uint32_t r = ConvertMachineToLLDBRegister(operation_info);
+    if (r == LLDB_INVALID_REGNUM)
+      return false;
+
+    uint32_t fo;
+    if (!ParseBigOrScaledFrameOffset(fo, unwind_operation == UOP_SaveNonVolBig,
+                                     8))
+      return false;
+
+    m_program.emplace_back(
+        EHInstruction{o, EHInstruction::Type::SAVE_REGISTER, r, fo});
+
+    return true;
+  }
+  case UOP_Epilog: {
+    return m_iterator.GetNext();
+  }
+  case UOP_SpareCode: {
+    // ReSharper disable once CppIdenticalOperandsInBinaryExpression
+    return m_iterator.GetNext() && m_iterator.GetNext();
+  }
+  case UOP_SaveXMM128:
+  case UOP_SaveXMM128Big: {
+    uint32_t r = ConvertXMMToLLDBRegister(operation_info);
+    if (r == LLDB_INVALID_REGNUM)
+      return false;
+
+    uint32_t fo;
+    if (!ParseBigOrScaledFrameOffset(fo, unwind_operation == UOP_SaveXMM128Big,
+                                     16))
+      return false;
+
+    m_program.emplace_back(
+        EHInstruction{o, EHInstruction::Type::SAVE_REGISTER, r, fo});
+
+    return true;
+  }
+  case UOP_PushMachFrame: {
+    if (operation_info)
+      m_program.emplace_back(EHInstruction{o, EHInstruction::Type::ALLOCATE,
+                                           LLDB_INVALID_REGNUM, 8});
+    m_program.emplace_back(EHInstruction{o, EHInstruction::Type::PUSH_REGISTER,
+                                         lldb_rip_x86_64, 8});
+    m_program.emplace_back(EHInstruction{o, EHInstruction::Type::PUSH_REGISTER,
+                                         lldb_cs_x86_64, 8});
+    m_program.emplace_back(EHInstruction{o, EHInstruction::Type::PUSH_REGISTER,
+                                         lldb_rflags_x86_64, 8});
+    m_program.emplace_back(EHInstruction{o, EHInstruction::Type::PUSH_REGISTER,
+                                         lldb_rsp_x86_64, 8});
+    m_program.emplace_back(EHInstruction{o, EHInstruction::Type::PUSH_REGISTER,
+                                         lldb_ss_x86_64, 8});
+
+    return true;
+  }
+  default:
+    return false;
+  }
+}
+
+void EHProgramBuilder::Finalize() {
+  for (const EHInstruction &i : m_program)
+    if (i.reg == lldb_rip_x86_64)
+      return;
+
+  m_program.emplace_back(
+      EHInstruction{0, EHInstruction::Type::PUSH_REGISTER, lldb_rip_x86_64, 8});
+}
+
+bool EHProgramBuilder::ParseBigOrScaledFrameOffset(uint32_t &result, bool big,
+                                                   uint32_t scale) {
+  if (big) {
+    if (!ParseBigFrameOffset(result))
+      return false;
+  } else {
+    if (!ParseFrameOffset(result))
+      return false;
+
+    result *= scale;
+  }
+
+  return true;
+}
+
+bool EHProgramBuilder::ParseBigFrameOffset(uint32_t &result) {
+  if (!m_iterator.GetNext())
+    return false;
+
+  result = m_iterator.GetUnwindCode()->FrameOffset;
+
+  if (!m_iterator.GetNext())
+    return false;
+
+  result += static_cast<uint32_t>(m_iterator.GetUnwindCode()->FrameOffset)
+            << 16;
+
+  return true;
+}
+
+bool EHProgramBuilder::ParseFrameOffset(uint32_t &result) {
+  if (!m_iterator.GetNext())
+    return false;
+
+  result = m_iterator.GetUnwindCode()->FrameOffset;
+
+  return true;
+}
+
+class EHProgramRange {
+public:
+  EHProgramRange(EHProgram::const_iterator begin,
+                 EHProgram::const_iterator end);
+
+  std::unique_ptr<UnwindPlan::Row> BuildUnwindPlanRow() const;
+
+private:
+  int32_t GetCFAFrameOffset() const;
+
+  EHProgram::const_iterator m_begin;
+  EHProgram::const_iterator m_end;
+};
+
+EHProgramRange::EHProgramRange(EHProgram::const_iterator begin,
+                               EHProgram::const_iterator end)
+    : m_begin(begin), m_end(end) {}
+
+std::unique_ptr<UnwindPlan::Row> EHProgramRange::BuildUnwindPlanRow() const {
+  std::unique_ptr<UnwindPlan::Row> row = std::make_unique<UnwindPlan::Row>();
+
+  if (m_begin != m_end)
+    row->SetOffset(m_begin->offset);
+
+  int32_t cfa_frame_offset = GetCFAFrameOffset();
+
+  bool frame_pointer_found = false;
+  for (EHProgram::const_iterator it = m_begin; it != m_end; ++it) {
+    switch (it->type) {
+    case EHInstruction::Type::SET_FRAME_POINTER_REGISTER:
+      row->GetCFAValue().SetIsRegisterPlusOffset(it->reg, cfa_frame_offset -
+                                                              it->frame_offset);
+      frame_pointer_found = true;
+      break;
+    default:
+      break;
+    }
+    if (frame_pointer_found)
+      break;
+  }
+  if (!frame_pointer_found)
+    row->GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64,
+                                               cfa_frame_offset);
+
+  int32_t rsp_frame_offset = 0;
+  for (EHProgram::const_iterator it = m_begin; it != m_end; ++it) {
+    switch (it->type) {
+    case EHInstruction::Type::PUSH_REGISTER:
+      row->SetRegisterLocationToAtCFAPlusOffset(
+          it->reg, rsp_frame_offset - cfa_frame_offset, false);
+      rsp_frame_offset += it->frame_offset;
+      break;
+    case EHInstruction::Type::ALLOCATE:
+      rsp_frame_offset += it->frame_offset;
+      break;
+    case EHInstruction::Type::SAVE_REGISTER:
+      row->SetRegisterLocationToAtCFAPlusOffset(
+          it->reg, it->frame_offset - cfa_frame_offset, false);
+      break;
+    default:
+      break;
+    }
+  }
+
+  row->SetRegisterLocationToIsCFAPlusOffset(lldb_rsp_x86_64, 0, false);
+
+  return row;
+}
+
+int32_t EHProgramRange::GetCFAFrameOffset() const {
+  int32_t result = 0;
+
+  for (EHProgram::const_iterator it = m_begin; it != m_end; ++it) {
+    switch (it->type) {
+    case EHInstruction::Type::PUSH_REGISTER:
+    case EHInstruction::Type::ALLOCATE:
+      result += it->frame_offset;
+      break;
+    default:
+      break;
+    }
+  }
+
+  return result;
+}
+
+PECallFrameInfo::PECallFrameInfo(ObjectFilePECOFF &object_file,
+                                 uint32_t exception_dir_rva,
+                                 uint32_t exception_dir_size)
+    : m_object_file(object_file),
+      m_exception_dir(object_file.ReadImageDataByRVA(exception_dir_rva,
+                                                      exception_dir_size)) {}
+
+bool PECallFrameInfo::GetAddressRange(Address addr, AddressRange &range) {
+  range.Clear();
+
+  const RuntimeFunction *runtime_function =
+      FindRuntimeFunctionIntersectsWithRange(AddressRange(addr, 1));
+  if (!runtime_function)
+    return false;
+
+  range.GetBaseAddress() =
+      m_object_file.GetAddress(runtime_function->StartAddress);
+  range.SetByteSize(runtime_function->EndAddress -
+                    runtime_function->StartAddress);
+
+  return true;
+}
+
+bool PECallFrameInfo::GetUnwindPlan(const Address &addr,
+                                    UnwindPlan &unwind_plan) {
+  return GetUnwindPlan(AddressRange(addr, 1), unwind_plan);
+}
+
+bool PECallFrameInfo::GetUnwindPlan(const AddressRange &range,
+                                    UnwindPlan &unwind_plan) {
+  unwind_plan.Clear();
+
+  unwind_plan.SetSourceName("PE EH info");
+  unwind_plan.SetSourcedFromCompiler(eLazyBoolYes);
+  unwind_plan.SetRegisterKind(eRegisterKindLLDB);
+
+  const RuntimeFunction *runtime_function =
+      FindRuntimeFunctionIntersectsWithRange(range);
+  if (!runtime_function)
+    return false;
+
+  EHProgramBuilder builder(m_object_file, runtime_function->UnwindInfoOffset);
+  if (!builder.Build())
+    return false;
+
+  std::vector<UnwindPlan::RowSP> rows;
+
+  uint32_t last_offset = UINT32_MAX;
+  for (auto it = builder.GetProgram().begin(); it != builder.GetProgram().end();
+       ++it) {
+    if (it->offset == last_offset)
+      continue;
+
+    EHProgramRange program_range =
+        EHProgramRange(it, builder.GetProgram().end());
+    rows.push_back(program_range.BuildUnwindPlanRow());
+
+    last_offset = it->offset;
+  }
+
+  for (auto it = rows.rbegin(); it != rows.rend(); ++it)
+    unwind_plan.AppendRow(*it);
+
+  unwind_plan.SetPlanValidAddressRange(AddressRange(
+      m_object_file.GetAddress(runtime_function->StartAddress),
+      runtime_function->EndAddress - runtime_function->StartAddress));
+  unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+
+  return true;
+}
+
+const RuntimeFunction *PECallFrameInfo::FindRuntimeFunctionIntersectsWithRange(
+    const AddressRange &range) const {
+  uint32_t rva = m_object_file.GetRVA(range.GetBaseAddress());
+  addr_t size = range.GetByteSize();
+
+  uint32_t begin = 0;
+  uint32_t end = m_exception_dir.GetByteSize() / sizeof(RuntimeFunction);
+  while (begin < end) {
+    uint32_t curr = (begin + end) / 2;
+
+    offset_t offset = curr * sizeof(RuntimeFunction);
+    const auto *runtime_function =
+        TypedRead<RuntimeFunction>(m_exception_dir, offset);
+    if (!runtime_function)
+      break;
+
+    if (runtime_function->StartAddress < rva + size &&
+        runtime_function->EndAddress > rva)
+      return runtime_function;
+
+    if (runtime_function->StartAddress >= rva + size)
+      end = curr;
+
+    if (runtime_function->EndAddress <= rva)
+      begin = curr + 1;
+  }
+
+  return nullptr;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.h b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.h
new file mode 100644
index 0000000..b5932dc
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ObjectFile/PECOFF/PECallFrameInfo.h
@@ -0,0 +1,47 @@
+//===-- PECallFrameInfo.h ---------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_PECallFrameInfo_h_
+#define liblldb_PECallFrameInfo_h_
+
+#include "lldb/Symbol/CallFrameInfo.h"
+#include "lldb/Utility/DataExtractor.h"
+
+class ObjectFilePECOFF;
+
+namespace llvm {
+namespace Win64EH {
+
+struct RuntimeFunction;
+
+}
+} // namespace llvm
+
+class PECallFrameInfo : public virtual lldb_private::CallFrameInfo {
+public:
+  explicit PECallFrameInfo(ObjectFilePECOFF &object_file,
+                           uint32_t exception_dir_rva,
+                           uint32_t exception_dir_size);
+
+  bool GetAddressRange(lldb_private::Address addr,
+                       lldb_private::AddressRange &range) override;
+
+  bool GetUnwindPlan(const lldb_private::Address &addr,
+                     lldb_private::UnwindPlan &unwind_plan) override;
+  bool GetUnwindPlan(const lldb_private::AddressRange &range,
+                     lldb_private::UnwindPlan &unwind_plan) override;
+
+private:
+  const llvm::Win64EH::RuntimeFunction *FindRuntimeFunctionIntersectsWithRange(
+      const lldb_private::AddressRange &range) const;
+
+  ObjectFilePECOFF &m_object_file;
+  lldb_private::DataExtractor m_exception_dir;
+};
+
+#endif // liblldb_PECallFrameInfo_h_
diff --git a/src/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/src/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
index c1fe0cc..b04ac61 100644
--- a/src/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
+++ b/src/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
@@ -6,7 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_DISABLE_PYTHON
+#include "lldb/Host/Config.h"
+
+#if LLDB_ENABLE_PYTHON
 
 #include "OperatingSystemPython.h"
 
@@ -88,13 +90,12 @@
         python_module_path.GetFilename().AsCString(""));
     if (!os_plugin_class_name.empty()) {
       const bool init_session = false;
-      const bool allow_reload = true;
       char python_module_path_cstr[PATH_MAX];
       python_module_path.GetPath(python_module_path_cstr,
                                  sizeof(python_module_path_cstr));
       Status error;
-      if (m_interpreter->LoadScriptingModule(
-              python_module_path_cstr, allow_reload, init_session, error)) {
+      if (m_interpreter->LoadScriptingModule(python_module_path_cstr,
+                                             init_session, error)) {
         // Strip the ".py" extension if there is one
         size_t py_extension_pos = os_plugin_class_name.rfind(".py");
         if (py_extension_pos != std::string::npos)
@@ -120,10 +121,10 @@
       return nullptr;
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OS));
 
-    if (log)
-      log->Printf("OperatingSystemPython::GetDynamicRegisterInfo() fetching "
-                  "thread register definitions from python for pid %" PRIu64,
-                  m_process->GetID());
+    LLDB_LOGF(log,
+              "OperatingSystemPython::GetDynamicRegisterInfo() fetching "
+              "thread register definitions from python for pid %" PRIu64,
+              m_process->GetID());
 
     StructuredData::DictionarySP dictionary =
         m_interpreter->OSPlugin_RegisterInfo(m_python_object_sp);
@@ -166,15 +167,15 @@
   Target &target = m_process->GetTarget();
   std::unique_lock<std::recursive_mutex> api_lock(target.GetAPIMutex(),
                                                   std::defer_lock);
-  api_lock.try_lock();
+  (void)api_lock.try_lock(); // See above.
   auto interpreter_lock = m_interpreter->AcquireInterpreterLock();
 
-  if (log)
-    log->Printf("OperatingSystemPython::UpdateThreadList() fetching thread "
-                "data from python for pid %" PRIu64,
-                m_process->GetID());
+  LLDB_LOGF(log,
+            "OperatingSystemPython::UpdateThreadList() fetching thread "
+            "data from python for pid %" PRIu64,
+            m_process->GetID());
 
-  // The threads that are in "new_thread_list" upon entry are the threads from
+  // The threads that are in "core_thread_list" upon entry are the threads from
   // the lldb_private::Process subclass, no memory threads will be in this
   // list.
   StructuredData::ArraySP threads_list =
@@ -190,7 +191,7 @@
     if (log) {
       StreamString strm;
       threads_list->Dump(strm);
-      log->Printf("threads_list = %s", strm.GetData());
+      LLDB_LOGF(log, "threads_list = %s", strm.GetData());
     }
 
     const uint32_t num_threads = threads_list->GetSize();
@@ -308,7 +309,7 @@
   Target &target = m_process->GetTarget();
   std::unique_lock<std::recursive_mutex> api_lock(target.GetAPIMutex(),
                                                   std::defer_lock);
-  api_lock.try_lock();
+  (void)api_lock.try_lock(); // See above.
   auto interpreter_lock = m_interpreter->AcquireInterpreterLock();
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
@@ -316,21 +317,21 @@
   if (reg_data_addr != LLDB_INVALID_ADDRESS) {
     // The registers data is in contiguous memory, just create the register
     // context using the address provided
-    if (log)
-      log->Printf("OperatingSystemPython::CreateRegisterContextForThread (tid "
-                  "= 0x%" PRIx64 ", 0x%" PRIx64 ", reg_data_addr = 0x%" PRIx64
-                  ") creating memory register context",
-                  thread->GetID(), thread->GetProtocolID(), reg_data_addr);
+    LLDB_LOGF(log,
+              "OperatingSystemPython::CreateRegisterContextForThread (tid "
+              "= 0x%" PRIx64 ", 0x%" PRIx64 ", reg_data_addr = 0x%" PRIx64
+              ") creating memory register context",
+              thread->GetID(), thread->GetProtocolID(), reg_data_addr);
     reg_ctx_sp = std::make_shared<RegisterContextMemory>(
         *thread, 0, *GetDynamicRegisterInfo(), reg_data_addr);
   } else {
     // No register data address is provided, query the python plug-in to let it
     // make up the data as it sees fit
-    if (log)
-      log->Printf("OperatingSystemPython::CreateRegisterContextForThread (tid "
-                  "= 0x%" PRIx64 ", 0x%" PRIx64
-                  ") fetching register data from python",
-                  thread->GetID(), thread->GetProtocolID());
+    LLDB_LOGF(log,
+              "OperatingSystemPython::CreateRegisterContextForThread (tid "
+              "= 0x%" PRIx64 ", 0x%" PRIx64
+              ") fetching register data from python",
+              thread->GetID(), thread->GetProtocolID());
 
     StructuredData::StringSP reg_context_data =
         m_interpreter->OSPlugin_RegisterContextData(m_python_object_sp,
@@ -351,10 +352,10 @@
   // if we still have no register data, fallback on a dummy context to avoid
   // crashing
   if (!reg_ctx_sp) {
-    if (log)
-      log->Printf("OperatingSystemPython::CreateRegisterContextForThread (tid "
-                  "= 0x%" PRIx64 ") forcing a dummy register context",
-                  thread->GetID());
+    LLDB_LOGF(log,
+              "OperatingSystemPython::CreateRegisterContextForThread (tid "
+              "= 0x%" PRIx64 ") forcing a dummy register context",
+              thread->GetID());
     reg_ctx_sp = std::make_shared<RegisterContextDummy>(
         *thread, 0, target.GetArchitecture().GetAddressByteSize());
   }
@@ -375,10 +376,10 @@
                                                    addr_t context) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
 
-  if (log)
-    log->Printf("OperatingSystemPython::CreateThread (tid = 0x%" PRIx64
-                ", context = 0x%" PRIx64 ") fetching register data from python",
-                tid, context);
+  LLDB_LOGF(log,
+            "OperatingSystemPython::CreateThread (tid = 0x%" PRIx64
+            ", context = 0x%" PRIx64 ") fetching register data from python",
+            tid, context);
 
   if (m_interpreter && m_python_object_sp) {
     // First thing we have to do is to try to get the API lock, and the
@@ -395,7 +396,7 @@
     Target &target = m_process->GetTarget();
     std::unique_lock<std::recursive_mutex> api_lock(target.GetAPIMutex(),
                                                     std::defer_lock);
-    api_lock.try_lock();
+    (void)api_lock.try_lock(); // See above.
     auto interpreter_lock = m_interpreter->AcquireInterpreterLock();
 
     StructuredData::DictionarySP thread_info_dict =
@@ -416,4 +417,4 @@
   return ThreadSP();
 }
 
-#endif // #ifndef LLDB_DISABLE_PYTHON
+#endif // #if LLDB_ENABLE_PYTHON
diff --git a/src/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h b/src/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
index e76227d..4a594cf 100644
--- a/src/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
+++ b/src/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h
@@ -9,7 +9,9 @@
 #ifndef liblldb_OperatingSystemPython_h_
 #define liblldb_OperatingSystemPython_h_
 
-#ifndef LLDB_DISABLE_PYTHON
+#include "lldb/Host/Config.h"
+
+#if LLDB_ENABLE_PYTHON
 
 #include "lldb/Target/OperatingSystem.h"
 #include "lldb/Utility/StructuredData.h"
@@ -80,6 +82,6 @@
   lldb_private::StructuredData::ObjectSP m_python_object_sp;
 };
 
-#endif // LLDB_DISABLE_PYTHON
+#endif
 
 #endif // liblldb_OperatingSystemPython_h_
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/Android/AdbClient.cpp b/src/llvm-project/lldb/source/Plugins/Platform/Android/AdbClient.cpp
index e99018d..eb3cf85 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/Android/AdbClient.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/Android/AdbClient.cpp
@@ -137,7 +137,12 @@
 Status AdbClient::Connect() {
   Status error;
   m_conn.reset(new ConnectionFileDescriptor);
-  m_conn->Connect("connect://localhost:5037", &error);
+  std::string port = "5037";
+  if (const char *env_port = std::getenv("ANDROID_ADB_SERVER_PORT")) {
+    port = env_port;
+  }
+  std::string uri = "connect://localhost:" + port;
+  m_conn->Connect(uri.c_str(), &error);
 
   return error;
 }
@@ -160,7 +165,7 @@
   llvm::SmallVector<llvm::StringRef, 4> devices;
   response.split(devices, "\n", -1, false);
 
-  for (const auto device : devices)
+  for (const auto &device : devices)
     device_list.push_back(device.split('\t').first);
 
   // Force disconnect since ADB closes connection after host:devices response
@@ -405,7 +410,7 @@
 
   const auto output_filename = output_file_spec.GetPath();
   std::error_code EC;
-  llvm::raw_fd_ostream dst(output_filename, EC, llvm::sys::fs::F_None);
+  llvm::raw_fd_ostream dst(output_filename, EC, llvm::sys::fs::OF_None);
   if (EC)
     return Status("Unable to open local file %s", output_filename.c_str());
 
@@ -432,7 +437,7 @@
   llvm::FileRemover local_file_remover(local_file_path);
 
   std::error_code EC;
-  llvm::raw_fd_ostream dst(local_file_path, EC, llvm::sys::fs::F_None);
+  llvm::raw_fd_ostream dst(local_file_path, EC, llvm::sys::fs::OF_None);
   if (EC)
     return Status("Unable to open local file %s", local_file_path.c_str());
 
@@ -590,7 +595,7 @@
   const DataBufferSP data_sp(new DataBufferHeap(kSyncPacketLen, 0));
   DataEncoder encoder(data_sp, eByteOrderLittle, sizeof(void *));
   auto offset = encoder.PutData(0, request_id, strlen(request_id));
-  encoder.PutU32(offset, data_len);
+  encoder.PutUnsigned(offset, 4, data_len);
 
   Status error;
   ConnectionStatus status;
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp b/src/llvm-project/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
index 3b8c920..93fc87d 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/Android/PlatformAndroid.cpp
@@ -68,8 +68,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformAndroid::%s(force=%s, arch={%s,%s})", __FUNCTION__,
-                force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformAndroid::%s(force=%s, arch={%s,%s})", __FUNCTION__,
+              force ? "true" : "false", arch_name, triple_cstr);
   }
 
   bool create = force;
@@ -113,16 +113,14 @@
   }
 
   if (create) {
-    if (log)
-      log->Printf("PlatformAndroid::%s() creating remote-android platform",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "PlatformAndroid::%s() creating remote-android platform",
+              __FUNCTION__);
     return PlatformSP(new PlatformAndroid(false));
   }
 
-  if (log)
-    log->Printf(
-        "PlatformAndroid::%s() aborting creation of remote-android platform",
-        __FUNCTION__);
+  LLDB_LOGF(
+      log, "PlatformAndroid::%s() aborting creation of remote-android platform",
+      __FUNCTION__);
 
   return PlatformSP();
 }
@@ -212,9 +210,8 @@
   auto source_file = source_spec.GetCString(false);
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  if (log)
-    log->Printf("Got mode == 0 on '%s': try to get file via 'shell cat'",
-                source_file);
+  LLDB_LOGF(log, "Got mode == 0 on '%s': try to get file via 'shell cat'",
+            source_file);
 
   if (strchr(source_file, '\'') != nullptr)
     return Status("Doesn't support single-quotes in filenames");
@@ -288,9 +285,8 @@
 
   if (error.Fail() || version_string.empty()) {
     Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM);
-    if (log)
-      log->Printf("Get SDK version failed. (error: %s, output: %s)",
-                  error.AsCString(), version_string.c_str());
+    LLDB_LOGF(log, "Get SDK version failed. (error: %s, output: %s)",
+              error.AsCString(), version_string.c_str());
     return 0;
   }
 
@@ -337,7 +333,7 @@
 
     Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
     if (log && error.Fail())
-      log->Printf("Failed to remove temp directory: %s", error.AsCString());
+      LLDB_LOGF(log, "Failed to remove temp directory: %s", error.AsCString());
   });
 
   FileSpec symfile_platform_filespec(tmpdir);
@@ -368,9 +364,9 @@
   const char *dl_open_name = nullptr;
   Target &target = process->GetTarget();
   for (auto name: dl_open_names) {
-    if (target.GetImages().FindFunctionSymbols(ConstString(name),
-                                               eFunctionNameTypeFull,
-                                               matching_symbols)) {
+    target.GetImages().FindFunctionSymbols(
+        ConstString(name), eFunctionNameTypeFull, matching_symbols);
+    if (matching_symbols.GetSize()) {
        dl_open_name = name;
        break;
     }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp b/src/llvm-project/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
index e36527d..64b6fdb 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.cpp
@@ -36,19 +36,16 @@
     return error;
 
   device_id = adb.GetDeviceID();
-  if (log)
-    log->Printf("Connected to Android device \"%s\"", device_id.c_str());
+  LLDB_LOGF(log, "Connected to Android device \"%s\"", device_id.c_str());
 
   if (remote_port != 0) {
-    if (log)
-      log->Printf("Forwarding remote TCP port %d to local TCP port %d",
-                  remote_port, local_port);
+    LLDB_LOGF(log, "Forwarding remote TCP port %d to local TCP port %d",
+              remote_port, local_port);
     return adb.SetPortForwarding(local_port, remote_port);
   }
 
-  if (log)
-    log->Printf("Forwarding remote socket \"%s\" to local TCP port %d",
-                remote_socket_name.str().c_str(), local_port);
+  LLDB_LOGF(log, "Forwarding remote socket \"%s\" to local TCP port %d",
+            remote_socket_name.str().c_str(), local_port);
 
   if (!socket_namespace)
     return Status("Invalid socket namespace");
@@ -95,7 +92,7 @@
   auto error =
       MakeConnectURL(pid, remote_port, socket_name.c_str(), connect_url);
   if (error.Success() && log)
-    log->Printf("gdbserver connect URL: %s", connect_url.c_str());
+    LLDB_LOGF(log, "gdbserver connect URL: %s", connect_url.c_str());
 
   return error.Success();
 }
@@ -139,8 +136,7 @@
   args.ReplaceArgumentAtIndex(0, connect_url);
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  if (log)
-    log->Printf("Rewritten platform connect URL: %s", connect_url.c_str());
+  LLDB_LOGF(log, "Rewritten platform connect URL: %s", connect_url.c_str());
 
   error = PlatformRemoteGDBServer::ConnectRemote(args);
   if (error.Fail())
@@ -164,10 +160,10 @@
   const auto port = it->second;
   const auto error = DeleteForwardPortWithAdb(port, m_device_id);
   if (error.Fail()) {
-    if (log)
-      log->Printf("Failed to delete port forwarding (pid=%" PRIu64
-                  ", port=%d, device=%s): %s",
-                  pid, port, m_device_id.c_str(), error.AsCString());
+    LLDB_LOGF(log,
+              "Failed to delete port forwarding (pid=%" PRIu64
+              ", port=%d, device=%s): %s",
+              pid, port, m_device_id.c_str(), error.AsCString());
   }
   m_port_forwards.erase(it);
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/src/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
index 946f0ea..261f44c 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
@@ -10,7 +10,7 @@
 #include "lldb/Host/Config.h"
 
 #include <stdio.h>
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include <sys/utsname.h>
 #endif
 
@@ -194,7 +194,7 @@
 void PlatformFreeBSD::GetStatus(Stream &strm) {
   Platform::GetStatus(strm);
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
   // Display local kernel information only when we are running in host mode.
   // Otherwise, we would end up printing non-FreeBSD information (when running
   // on Mac OS for example).
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/src/llvm-project/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
index d0ad2f3..485ffbe 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp
@@ -10,7 +10,7 @@
 #include "lldb/Host/Config.h"
 
 #include <stdio.h>
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include <sys/utsname.h>
 #endif
 
@@ -199,7 +199,7 @@
 void PlatformLinux::GetStatus(Stream &strm) {
   Platform::GetStatus(strm);
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
   // Display local kernel information only when we are running in host mode.
   // Otherwise, we would end up printing non-Linux information (when running on
   // Mac OS for example).
@@ -260,25 +260,6 @@
   }
 }
 
-std::vector<std::string>
-PlatformLinux::GetSystemIncludeDirectories(lldb::LanguageType lang) {
-  std::string sys_root = GetSDKRootDirectory().AsCString("");
-  switch (lang) {
-  case lldb::eLanguageTypeC:
-  case lldb::eLanguageTypeC89:
-  case lldb::eLanguageTypeC99:
-  case lldb::eLanguageTypeC11:
-  case lldb::eLanguageTypeC_plus_plus:
-  case lldb::eLanguageTypeC_plus_plus_03:
-  case lldb::eLanguageTypeC_plus_plus_11:
-  case lldb::eLanguageTypeC_plus_plus_14:
-  case lldb::eLanguageTypeObjC_plus_plus:
-    return {sys_root + "/usr/include/"};
-  default:
-    return {};
-  }
-}
-
 // For local debugging, Linux will override the debug logic to use llgs-launch
 // rather than lldb-launch, llgs-attach.  This differs from current lldb-
 // launch, debugserver-attach approach on MacOSX.
@@ -396,6 +377,8 @@
 
 void PlatformLinux::CalculateTrapHandlerSymbolNames() {
   m_trap_handlers.push_back(ConstString("_sigtramp"));
+  m_trap_handlers.push_back(ConstString("__kernel_rt_sigreturn"));
+  m_trap_handlers.push_back(ConstString("__restore_rt"));
 }
 
 MmapArgList PlatformLinux::GetMmapArgumentList(const ArchSpec &arch,
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/Linux/PlatformLinux.h b/src/llvm-project/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
index a843558..67d211a 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
+++ b/src/llvm-project/lldb/source/Plugins/Platform/Linux/PlatformLinux.h
@@ -48,9 +48,6 @@
 
   bool CanDebugProcess() override;
 
-  std::vector<std::string>
-  GetSystemIncludeDirectories(lldb::LanguageType lang) override;
-
   lldb::ProcessSP DebugProcess(ProcessLaunchInfo &launch_info,
                                Debugger &debugger, Target *target,
                                Status &error) override;
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
index 6f0d952..d5a84d8 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(PlatformMacOSXProperties.inc -gen-lldb-property-defs
+  SOURCE PlatformMacOSXProperties.td
+  TARGET LLDBPluginPlatformMacOSXPropertiesGen)
+
+lldb_tablegen(PlatformMacOSXPropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE PlatformMacOSXProperties.td
+  TARGET LLDBPluginPlatformMacOSXPropertiesEnumGen)
+
 list(APPEND PLUGIN_PLATFORM_MACOSX_SOURCES
   PlatformDarwin.cpp
   PlatformDarwinKernel.cpp
@@ -29,9 +37,8 @@
 
 add_lldb_library(lldbPluginPlatformMacOSX PLUGIN
   ${PLUGIN_PLATFORM_MACOSX_SOURCES}
-  
+
   LINK_LIBS
-    clangBasic
     lldbBreakpoint
     lldbCore
     lldbHost
@@ -41,6 +48,12 @@
     lldbUtility
     lldbPluginPlatformPOSIX
     ${OBJC_LIBS}
+  CLANG_LIBS
+    clangBasic
   LINK_COMPONENTS
     Support
     )
+
+add_dependencies(lldbPluginPlatformMacOSX
+  LLDBPluginPlatformMacOSXPropertiesGen
+  LLDBPluginPlatformMacOSXPropertiesEnumGen)
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
index 6fc9d38..40148e2 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformAppleTVSimulator.cpp
@@ -70,8 +70,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformAppleTVSimulator::%s(force=%s, arch={%s,%s})",
-                __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformAppleTVSimulator::%s(force=%s, arch={%s,%s})",
+              __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
   }
 
   bool create = force;
@@ -120,16 +120,14 @@
     }
   }
   if (create) {
-    if (log)
-      log->Printf("PlatformAppleTVSimulator::%s() creating platform",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "PlatformAppleTVSimulator::%s() creating platform",
+              __FUNCTION__);
 
     return PlatformSP(new PlatformAppleTVSimulator());
   }
 
-  if (log)
-    log->Printf("PlatformAppleTVSimulator::%s() aborting creation of platform",
-                __FUNCTION__);
+  LLDB_LOGF(log, "PlatformAppleTVSimulator::%s() aborting creation of platform",
+            __FUNCTION__);
 
   return PlatformSP();
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
index 7f271a0..0e21f3b 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.cpp
@@ -69,8 +69,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformAppleWatchSimulator::%s(force=%s, arch={%s,%s})",
-                __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformAppleWatchSimulator::%s(force=%s, arch={%s,%s})",
+              __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
   }
 
   bool create = force;
@@ -119,17 +119,15 @@
     }
   }
   if (create) {
-    if (log)
-      log->Printf("PlatformAppleWatchSimulator::%s() creating platform",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "PlatformAppleWatchSimulator::%s() creating platform",
+              __FUNCTION__);
 
     return PlatformSP(new PlatformAppleWatchSimulator());
   }
 
-  if (log)
-    log->Printf(
-        "PlatformAppleWatchSimulator::%s() aborting creation of platform",
-        __FUNCTION__);
+  LLDB_LOGF(log,
+            "PlatformAppleWatchSimulator::%s() aborting creation of platform",
+            __FUNCTION__);
 
   return PlatformSP();
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index 9559871..ae9f20d 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -72,112 +72,106 @@
     FileSpec module_spec = module.GetFileSpec();
 
     if (module_spec) {
-      SymbolVendor *symbols = module.GetSymbolVendor();
-      if (symbols) {
-        SymbolFile *symfile = symbols->GetSymbolFile();
-        if (symfile) {
-          ObjectFile *objfile = symfile->GetObjectFile();
-          if (objfile) {
-            FileSpec symfile_spec(objfile->GetFileSpec());
-            if (symfile_spec && 
-                strcasestr (symfile_spec.GetPath().c_str(), 
-                        ".dSYM/Contents/Resources/DWARF") != nullptr &&
-                FileSystem::Instance().Exists(symfile_spec)) {
-              while (module_spec.GetFilename()) {
-                std::string module_basename(
-                    module_spec.GetFilename().GetCString());
-                std::string original_module_basename(module_basename);
+      if (SymbolFile *symfile = module.GetSymbolFile()) {
+        ObjectFile *objfile = symfile->GetObjectFile();
+        if (objfile) {
+          FileSpec symfile_spec(objfile->GetFileSpec());
+          if (symfile_spec &&
+              strcasestr(symfile_spec.GetPath().c_str(),
+                         ".dSYM/Contents/Resources/DWARF") != nullptr &&
+              FileSystem::Instance().Exists(symfile_spec)) {
+            while (module_spec.GetFilename()) {
+              std::string module_basename(
+                  module_spec.GetFilename().GetCString());
+              std::string original_module_basename(module_basename);
 
-                bool was_keyword = false;
+              bool was_keyword = false;
 
-                // FIXME: for Python, we cannot allow certain characters in
-                // module
-                // filenames we import. Theoretically, different scripting
-                // languages may have different sets of forbidden tokens in
-                // filenames, and that should be dealt with by each
-                // ScriptInterpreter. For now, we just replace dots with
-                // underscores, but if we ever support anything other than
-                // Python we will need to rework this
-                std::replace(module_basename.begin(), module_basename.end(),
-                             '.', '_');
-                std::replace(module_basename.begin(), module_basename.end(),
-                             ' ', '_');
-                std::replace(module_basename.begin(), module_basename.end(),
-                             '-', '_');
-                ScriptInterpreter *script_interpreter =
-                    target->GetDebugger().GetScriptInterpreter();
-                if (script_interpreter &&
-                    script_interpreter->IsReservedWord(
-                        module_basename.c_str())) {
-                  module_basename.insert(module_basename.begin(), '_');
-                  was_keyword = true;
-                }
-
-                StreamString path_string;
-                StreamString original_path_string;
-                // for OSX we are going to be in
-                // .dSYM/Contents/Resources/DWARF/<basename> let us go to
-                // .dSYM/Contents/Resources/Python/<basename>.py and see if the
-                // file exists
-                path_string.Printf("%s/../Python/%s.py",
-                                   symfile_spec.GetDirectory().GetCString(),
-                                   module_basename.c_str());
-                original_path_string.Printf(
-                    "%s/../Python/%s.py",
-                    symfile_spec.GetDirectory().GetCString(),
-                    original_module_basename.c_str());
-                FileSpec script_fspec(path_string.GetString());
-                FileSystem::Instance().Resolve(script_fspec);
-                FileSpec orig_script_fspec(original_path_string.GetString());
-                FileSystem::Instance().Resolve(orig_script_fspec);
-
-                // if we did some replacements of reserved characters, and a
-                // file with the untampered name exists, then warn the user
-                // that the file as-is shall not be loaded
-                if (feedback_stream) {
-                  if (module_basename != original_module_basename &&
-                      FileSystem::Instance().Exists(orig_script_fspec)) {
-                    const char *reason_for_complaint =
-                        was_keyword ? "conflicts with a keyword"
-                                    : "contains reserved characters";
-                    if (FileSystem::Instance().Exists(script_fspec))
-                      feedback_stream->Printf(
-                          "warning: the symbol file '%s' contains a debug "
-                          "script. However, its name"
-                          " '%s' %s and as such cannot be loaded. LLDB will"
-                          " load '%s' instead. Consider removing the file with "
-                          "the malformed name to"
-                          " eliminate this warning.\n",
-                          symfile_spec.GetPath().c_str(),
-                          original_path_string.GetData(), reason_for_complaint,
-                          path_string.GetData());
-                    else
-                      feedback_stream->Printf(
-                          "warning: the symbol file '%s' contains a debug "
-                          "script. However, its name"
-                          " %s and as such cannot be loaded. If you intend"
-                          " to have this script loaded, please rename '%s' to "
-                          "'%s' and retry.\n",
-                          symfile_spec.GetPath().c_str(), reason_for_complaint,
-                          original_path_string.GetData(),
-                          path_string.GetData());
-                  }
-                }
-
-                if (FileSystem::Instance().Exists(script_fspec)) {
-                  file_list.Append(script_fspec);
-                  break;
-                }
-
-                // If we didn't find the python file, then keep stripping the
-                // extensions and try again
-                ConstString filename_no_extension(
-                    module_spec.GetFileNameStrippingExtension());
-                if (module_spec.GetFilename() == filename_no_extension)
-                  break;
-
-                module_spec.GetFilename() = filename_no_extension;
+              // FIXME: for Python, we cannot allow certain characters in
+              // module
+              // filenames we import. Theoretically, different scripting
+              // languages may have different sets of forbidden tokens in
+              // filenames, and that should be dealt with by each
+              // ScriptInterpreter. For now, we just replace dots with
+              // underscores, but if we ever support anything other than
+              // Python we will need to rework this
+              std::replace(module_basename.begin(), module_basename.end(), '.',
+                           '_');
+              std::replace(module_basename.begin(), module_basename.end(), ' ',
+                           '_');
+              std::replace(module_basename.begin(), module_basename.end(), '-',
+                           '_');
+              ScriptInterpreter *script_interpreter =
+                  target->GetDebugger().GetScriptInterpreter();
+              if (script_interpreter &&
+                  script_interpreter->IsReservedWord(module_basename.c_str())) {
+                module_basename.insert(module_basename.begin(), '_');
+                was_keyword = true;
               }
+
+              StreamString path_string;
+              StreamString original_path_string;
+              // for OSX we are going to be in
+              // .dSYM/Contents/Resources/DWARF/<basename> let us go to
+              // .dSYM/Contents/Resources/Python/<basename>.py and see if the
+              // file exists
+              path_string.Printf("%s/../Python/%s.py",
+                                 symfile_spec.GetDirectory().GetCString(),
+                                 module_basename.c_str());
+              original_path_string.Printf(
+                  "%s/../Python/%s.py",
+                  symfile_spec.GetDirectory().GetCString(),
+                  original_module_basename.c_str());
+              FileSpec script_fspec(path_string.GetString());
+              FileSystem::Instance().Resolve(script_fspec);
+              FileSpec orig_script_fspec(original_path_string.GetString());
+              FileSystem::Instance().Resolve(orig_script_fspec);
+
+              // if we did some replacements of reserved characters, and a
+              // file with the untampered name exists, then warn the user
+              // that the file as-is shall not be loaded
+              if (feedback_stream) {
+                if (module_basename != original_module_basename &&
+                    FileSystem::Instance().Exists(orig_script_fspec)) {
+                  const char *reason_for_complaint =
+                      was_keyword ? "conflicts with a keyword"
+                                  : "contains reserved characters";
+                  if (FileSystem::Instance().Exists(script_fspec))
+                    feedback_stream->Printf(
+                        "warning: the symbol file '%s' contains a debug "
+                        "script. However, its name"
+                        " '%s' %s and as such cannot be loaded. LLDB will"
+                        " load '%s' instead. Consider removing the file with "
+                        "the malformed name to"
+                        " eliminate this warning.\n",
+                        symfile_spec.GetPath().c_str(),
+                        original_path_string.GetData(), reason_for_complaint,
+                        path_string.GetData());
+                  else
+                    feedback_stream->Printf(
+                        "warning: the symbol file '%s' contains a debug "
+                        "script. However, its name"
+                        " %s and as such cannot be loaded. If you intend"
+                        " to have this script loaded, please rename '%s' to "
+                        "'%s' and retry.\n",
+                        symfile_spec.GetPath().c_str(), reason_for_complaint,
+                        original_path_string.GetData(), path_string.GetData());
+                }
+              }
+
+              if (FileSystem::Instance().Exists(script_fspec)) {
+                file_list.Append(script_fspec);
+                break;
+              }
+
+              // If we didn't find the python file, then keep stripping the
+              // extensions and try again
+              ConstString filename_no_extension(
+                  module_spec.GetFileNameStrippingExtension());
+              if (module_spec.GetFilename() == filename_no_extension)
+                break;
+
+              module_spec.GetFilename() = filename_no_extension;
             }
           }
         }
@@ -220,16 +214,16 @@
     lldb::ModuleSP *old_module_sp_ptr, bool *did_create_ptr) {
 
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  if (log)
-    log->Printf("[%s] Trying to find module %s/%s - platform path %s/%s symbol "
-                "path %s/%s",
-                (IsHost() ? "host" : "remote"),
-                module_spec.GetFileSpec().GetDirectory().AsCString(),
-                module_spec.GetFileSpec().GetFilename().AsCString(),
-                module_spec.GetPlatformFileSpec().GetDirectory().AsCString(),
-                module_spec.GetPlatformFileSpec().GetFilename().AsCString(),
-                module_spec.GetSymbolFileSpec().GetDirectory().AsCString(),
-                module_spec.GetSymbolFileSpec().GetFilename().AsCString());
+  LLDB_LOGF(log,
+            "[%s] Trying to find module %s/%s - platform path %s/%s symbol "
+            "path %s/%s",
+            (IsHost() ? "host" : "remote"),
+            module_spec.GetFileSpec().GetDirectory().AsCString(),
+            module_spec.GetFileSpec().GetFilename().AsCString(),
+            module_spec.GetPlatformFileSpec().GetDirectory().AsCString(),
+            module_spec.GetPlatformFileSpec().GetFilename().AsCString(),
+            module_spec.GetSymbolFileSpec().GetDirectory().AsCString(),
+            module_spec.GetSymbolFileSpec().GetFilename().AsCString());
 
   Status err;
 
@@ -256,11 +250,10 @@
           return err;
         if (FileSystem::Instance().Exists(module_cache_spec)) {
           Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
-          if (log)
-            log->Printf("[%s] module %s/%s was rsynced and is now there",
-                        (IsHost() ? "host" : "remote"),
-                        module_spec.GetFileSpec().GetDirectory().AsCString(),
-                        module_spec.GetFileSpec().GetFilename().AsCString());
+          LLDB_LOGF(log, "[%s] module %s/%s was rsynced and is now there",
+                    (IsHost() ? "host" : "remote"),
+                    module_spec.GetFileSpec().GetDirectory().AsCString(),
+                    module_spec.GetFileSpec().GetFilename().AsCString());
           ModuleSpec local_spec(module_cache_spec,
                                 module_spec.GetArchitecture());
           module_sp = std::make_shared<Module>(local_spec);
@@ -287,12 +280,11 @@
           if (low_local != low_remote || high_local != high_remote) {
             // bring in the remote file
             Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
-            if (log)
-              log->Printf(
-                  "[%s] module %s/%s needs to be replaced from remote copy",
-                  (IsHost() ? "host" : "remote"),
-                  module_spec.GetFileSpec().GetDirectory().AsCString(),
-                  module_spec.GetFileSpec().GetFilename().AsCString());
+            LLDB_LOGF(log,
+                      "[%s] module %s/%s needs to be replaced from remote copy",
+                      (IsHost() ? "host" : "remote"),
+                      module_spec.GetFileSpec().GetDirectory().AsCString(),
+                      module_spec.GetFileSpec().GetFilename().AsCString());
             Status err =
                 BringInRemoteFile(this, module_spec, module_cache_spec);
             if (err.Fail())
@@ -304,30 +296,27 @@
         module_sp = std::make_shared<Module>(local_spec);
         module_sp->SetPlatformFileSpec(module_spec.GetFileSpec());
         Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
-        if (log)
-          log->Printf("[%s] module %s/%s was found in the cache",
-                      (IsHost() ? "host" : "remote"),
-                      module_spec.GetFileSpec().GetDirectory().AsCString(),
-                      module_spec.GetFileSpec().GetFilename().AsCString());
+        LLDB_LOGF(log, "[%s] module %s/%s was found in the cache",
+                  (IsHost() ? "host" : "remote"),
+                  module_spec.GetFileSpec().GetDirectory().AsCString(),
+                  module_spec.GetFileSpec().GetFilename().AsCString());
         return Status();
       }
 
       // bring in the remote module file
-      if (log)
-        log->Printf("[%s] module %s/%s needs to come in remotely",
-                    (IsHost() ? "host" : "remote"),
-                    module_spec.GetFileSpec().GetDirectory().AsCString(),
-                    module_spec.GetFileSpec().GetFilename().AsCString());
+      LLDB_LOGF(log, "[%s] module %s/%s needs to come in remotely",
+                (IsHost() ? "host" : "remote"),
+                module_spec.GetFileSpec().GetDirectory().AsCString(),
+                module_spec.GetFileSpec().GetFilename().AsCString());
       Status err = BringInRemoteFile(this, module_spec, module_cache_spec);
       if (err.Fail())
         return err;
       if (FileSystem::Instance().Exists(module_cache_spec)) {
         Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
-        if (log)
-          log->Printf("[%s] module %s/%s is now cached and fine",
-                      (IsHost() ? "host" : "remote"),
-                      module_spec.GetFileSpec().GetDirectory().AsCString(),
-                      module_spec.GetFileSpec().GetFilename().AsCString());
+        LLDB_LOGF(log, "[%s] module %s/%s is now cached and fine",
+                  (IsHost() ? "host" : "remote"),
+                  module_spec.GetFileSpec().GetDirectory().AsCString(),
+                  module_spec.GetFileSpec().GetFilename().AsCString());
         ModuleSpec local_spec(module_cache_spec, module_spec.GetArchitecture());
         module_sp = std::make_shared<Module>(local_spec);
         module_sp->SetPlatformFileSpec(module_spec.GetFileSpec());
@@ -429,11 +418,10 @@
 
   llvm::Triple::ArchType machine = target.GetArchitecture().GetMachine();
   switch (machine) {
+  case llvm::Triple::aarch64_32:
   case llvm::Triple::aarch64: {
-    // TODO: fix this with actual darwin breakpoint opcode for arm64.
-    // right now debugging uses the Z packets with GDB remote so this is not
-    // needed, but the size needs to be correct...
-    static const uint8_t g_arm64_breakpoint_opcode[] = {0xFE, 0xDE, 0xFF, 0xE7};
+    // 'brk #0' or 0xd4200000 in BE byte order
+    static const uint8_t g_arm64_breakpoint_opcode[] = {0x00, 0x00, 0x20, 0xD4};
     trap_opcode = g_arm64_breakpoint_opcode;
     trap_opcode_size = sizeof(g_arm64_breakpoint_opcode);
   } break;
@@ -1107,6 +1095,34 @@
   return false;
 }
 
+static FileSpec GetXcodeSelectPath() {
+  static FileSpec g_xcode_select_filespec;
+
+  if (!g_xcode_select_filespec) {
+    FileSpec xcode_select_cmd("/usr/bin/xcode-select");
+    if (FileSystem::Instance().Exists(xcode_select_cmd)) {
+      int exit_status = -1;
+      int signo = -1;
+      std::string command_output;
+      Status status =
+          Host::RunShellCommand("/usr/bin/xcode-select --print-path",
+                                FileSpec(), // current working directory
+                                &exit_status, &signo, &command_output,
+                                std::chrono::seconds(2), // short timeout
+                                false);                  // don't run in a shell
+      if (status.Success() && exit_status == 0 && !command_output.empty()) {
+        size_t first_non_newline = command_output.find_last_not_of("\r\n");
+        if (first_non_newline != std::string::npos) {
+          command_output.erase(first_non_newline + 1);
+        }
+        g_xcode_select_filespec = FileSpec(command_output);
+      }
+    }
+  }
+
+  return g_xcode_select_filespec;
+}
+
 // Return a directory path like /Applications/Xcode.app/Contents/Developer
 const char *PlatformDarwin::GetDeveloperDirectory() {
   std::lock_guard<std::mutex> guard(m_mutex);
@@ -1164,34 +1180,10 @@
     }
 
     if (!developer_dir_path_valid) {
-      FileSpec xcode_select_cmd("/usr/bin/xcode-select");
-      if (FileSystem::Instance().Exists(xcode_select_cmd)) {
-        int exit_status = -1;
-        int signo = -1;
-        std::string command_output;
-        Status error =
-            Host::RunShellCommand("/usr/bin/xcode-select --print-path",
-                                  nullptr, // current working directory
-                                  &exit_status, &signo, &command_output,
-                                  std::chrono::seconds(2), // short timeout
-                                  false); // don't run in a shell
-        if (error.Success() && exit_status == 0 && !command_output.empty()) {
-          const char *cmd_output_ptr = command_output.c_str();
-          developer_dir_path[sizeof(developer_dir_path) - 1] = '\0';
-          size_t i;
-          for (i = 0; i < sizeof(developer_dir_path) - 1; i++) {
-            if (cmd_output_ptr[i] == '\r' || cmd_output_ptr[i] == '\n' ||
-                cmd_output_ptr[i] == '\0')
-              break;
-            developer_dir_path[i] = cmd_output_ptr[i];
-          }
-          developer_dir_path[i] = '\0';
-
-          FileSpec devel_dir(developer_dir_path);
-          if (FileSystem::Instance().IsDirectory(devel_dir)) {
-            developer_dir_path_valid = true;
-          }
-        }
+      FileSpec devel_dir = GetXcodeSelectPath();
+      if (FileSystem::Instance().IsDirectory(devel_dir)) {
+        devel_dir.GetPath(&developer_dir_path[0], sizeof(developer_dir_path));
+        developer_dir_path_valid = true;
       }
     }
 
@@ -1227,7 +1219,7 @@
   FileSpecList bp_modules;
   for (size_t i = 0; i < llvm::array_lengthof(g_bp_modules); i++) {
     const char *bp_module = g_bp_modules[i];
-    bp_modules.Append(FileSpec(bp_module));
+    bp_modules.EmplaceBack(bp_module);
   }
 
   bool internal = true;
@@ -1333,29 +1325,11 @@
         g_xcode_filespec = CheckPathForXcode(developer_dir_spec);
       }
 
-      // Fall back to using "xcrun" to find the selected Xcode
+      // Fall back to using "xcode-select" to find the selected Xcode
       if (!g_xcode_filespec) {
-        int status = 0;
-        int signo = 0;
-        std::string output;
-        const char *command = "/usr/bin/xcode-select -p";
-        lldb_private::Status error = Host::RunShellCommand(
-            command, // shell command to run
-            nullptr, // current working directory
-            &status, // Put the exit status of the process in here
-            &signo,  // Put the signal that caused the process to exit in here
-            &output, // Get the output from the command and place it in this
-                     // string
-            std::chrono::seconds(3));
-        if (status == 0 && !output.empty()) {
-          size_t first_non_newline = output.find_last_not_of("\r\n");
-          if (first_non_newline != std::string::npos) {
-            output.erase(first_non_newline + 1);
-          }
-          output.append("/..");
-
-          g_xcode_filespec = CheckPathForXcode(FileSpec(output));
-        }
+        FileSpec xcode_select_path(GetXcodeSelectPath());
+        xcode_select_path.RemoveLastPathComponent();
+        g_xcode_filespec = CheckPathForXcode(xcode_select_path);
       }
     }
   });
@@ -1363,6 +1337,20 @@
   return g_xcode_filespec;
 }
 
+static FileSpec GetCommandLineToolsLibraryPath() {
+  static FileSpec g_command_line_tools_filespec;
+
+  if (!g_command_line_tools_filespec) {
+    FileSpec command_line_tools_path(GetXcodeSelectPath());
+    command_line_tools_path.AppendPathComponent("Library");
+    if (FileSystem::Instance().Exists(command_line_tools_path)) {
+      g_command_line_tools_filespec = command_line_tools_path;
+    }
+  }
+
+  return g_command_line_tools_filespec;
+}
+
 bool PlatformDarwin::SDKSupportsModules(SDKType sdk_type,
                                         llvm::VersionTuple version) {
   switch (sdk_type) {
@@ -1469,6 +1457,13 @@
 
     if (!version.empty()) {
       if (SDKSupportsModules(SDKType::MacOSX, version)) {
+        // If the Xcode SDKs are not available then try to use the
+        // Command Line Tools one which is only for MacOSX.
+        if (!FileSystem::Instance().Exists(sdks_spec)) {
+          sdks_spec = GetCommandLineToolsLibraryPath();
+          sdks_spec.AppendPathComponent("SDKs");
+        }
+
         // We slightly prefer the exact SDK for this machine.  See if it is
         // there.
 
@@ -1510,7 +1505,8 @@
     Target *target, std::vector<std::string> &options, SDKType sdk_type) {
   const std::vector<std::string> apple_arguments = {
       "-x",       "objective-c++", "-fobjc-arc",
-      "-fblocks", "-D_ISO646_H",   "-D__ISO646_H"};
+      "-fblocks", "-D_ISO646_H",   "-D__ISO646_H",
+      "-fgnuc-version=4.2.1"};
 
   options.insert(options.end(), apple_arguments.begin(), apple_arguments.end());
 
@@ -1646,6 +1642,20 @@
         g_executable_dirs.push_back(dir);
       }
     }
+    // Xcode might not be installed so we also check for the Command Line Tools.
+    FileSpec command_line_tools_dir = GetCommandLineToolsLibraryPath();
+    if (command_line_tools_dir) {
+      FileSpec cmd_line_lldb_resources = command_line_tools_dir;
+      cmd_line_lldb_resources.AppendPathComponent("PrivateFrameworks");
+      cmd_line_lldb_resources.AppendPathComponent("LLDB.framework");
+      cmd_line_lldb_resources.AppendPathComponent("Resources");
+      if (FileSystem::Instance().Exists(cmd_line_lldb_resources)) {
+        FileSpec dir;
+        dir.GetDirectory().SetCString(
+            cmd_line_lldb_resources.GetPath().c_str());
+        g_executable_dirs.push_back(dir);
+      }
+    }
   });
 
   // Now search the global list of executable directories for the executable we
@@ -1713,8 +1723,11 @@
     size_t num_module_search_paths = module_search_paths_ptr->GetSize();
     for (size_t i = 0; i < num_module_search_paths; ++i) {
       Log *log_verbose = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
-      if (log_verbose)
-          log_verbose->Printf ("PlatformRemoteDarwinDevice::GetSharedModule searching for binary in search-path %s", module_search_paths_ptr->GetFileSpecAtIndex(i).GetPath().c_str());
+      LLDB_LOGF(
+          log_verbose,
+          "PlatformRemoteDarwinDevice::GetSharedModule searching for binary in "
+          "search-path %s",
+          module_search_paths_ptr->GetFileSpecAtIndex(i).GetPath().c_str());
       // Create a new FileSpec with this module_search_paths_ptr plus just the
       // filename ("UIFoundation"), then the parent dir plus filename
       // ("UIFoundation.framework/UIFoundation") etc - up to four names (to
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
index cb453b5..7ca5397 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
@@ -80,8 +80,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformDarwinKernel::%s(force=%s, arch={%s,%s})",
-                __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformDarwinKernel::%s(force=%s, arch={%s,%s})",
+              __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
   }
 
   // This is a special plugin that we don't want to activate just based on an
@@ -89,10 +89,10 @@
   // sessions and the DynamicLoaderDarwinPlugin (or a user doing 'platform
   // select') will force the creation of this Platform plugin.
   if (!force) {
-    if (log)
-      log->Printf("PlatformDarwinKernel::%s() aborting creation of platform "
-                  "because force == false",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "PlatformDarwinKernel::%s() aborting creation of platform "
+              "because force == false",
+              __FUNCTION__);
     return PlatformSP();
   }
 
@@ -154,15 +154,14 @@
     }
   }
   if (create) {
-    if (log)
-      log->Printf("PlatformDarwinKernel::%s() creating platform", __FUNCTION__);
+    LLDB_LOGF(log, "PlatformDarwinKernel::%s() creating platform",
+              __FUNCTION__);
 
     return PlatformSP(new PlatformDarwinKernel(is_ios_debug_session));
   }
 
-  if (log)
-    log->Printf("PlatformDarwinKernel::%s() aborting creation of platform",
-                __FUNCTION__);
+  LLDB_LOGF(log, "PlatformDarwinKernel::%s() aborting creation of platform",
+            __FUNCTION__);
 
   return PlatformSP();
 }
@@ -178,15 +177,13 @@
 
 /// Code to handle the PlatformDarwinKernel settings
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"search-locally-for-kexts", OptionValue::eTypeBoolean, true, true, NULL,
-     {}, "Automatically search for kexts on the local system when doing "
-           "kernel debugging."},
-    {"kext-directories", OptionValue::eTypeFileSpecList, false, 0, NULL, {},
-     "Directories/KDKs to search for kexts in when starting a kernel debug "
-     "session."}};
+#define LLDB_PROPERTIES_platformdarwinkernel
+#include "PlatformMacOSXProperties.inc"
 
-enum { ePropertySearchForKexts = 0, ePropertyKextDirectories };
+enum {
+#define LLDB_PROPERTIES_platformdarwinkernel
+#include "PlatformMacOSXPropertiesEnum.inc"
+};
 
 class PlatformDarwinKernelProperties : public Properties {
 public:
@@ -197,7 +194,7 @@
 
   PlatformDarwinKernelProperties() : Properties() {
     m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_platformdarwinkernel_properties);
   }
 
   virtual ~PlatformDarwinKernelProperties() {}
@@ -205,7 +202,8 @@
   bool GetSearchForKexts() const {
     const uint32_t idx = ePropertySearchForKexts;
     return m_collection_sp->GetPropertyAtIndexAsBoolean(
-        NULL, idx, g_properties[idx].default_uint_value != 0);
+        NULL, idx,
+        g_platformdarwinkernel_properties[idx].default_uint_value != 0);
   }
 
   FileSpecList GetKextDirectories() const {
@@ -298,24 +296,24 @@
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
   if (log) {
-    log->Printf("\nkexts with dSYMs");
+    LLDB_LOGF(log, "\nkexts with dSYMs");
     for (auto pos : m_name_to_kext_path_map_with_dsyms) {
-      log->Printf("%s", pos.second.GetPath().c_str());
+      LLDB_LOGF(log, "%s", pos.second.GetPath().c_str());
     }
-    log->Printf("\nkexts without dSYMs");
+    LLDB_LOGF(log, "\nkexts without dSYMs");
 
     for (auto pos : m_name_to_kext_path_map_without_dsyms) {
-      log->Printf("%s", pos.second.GetPath().c_str());
+      LLDB_LOGF(log, "%s", pos.second.GetPath().c_str());
     }
-    log->Printf("\nkernels with dSYMS");
+    LLDB_LOGF(log, "\nkernels with dSYMS");
     for (auto fs : m_kernel_binaries_with_dsyms) {
-      log->Printf("%s", fs.GetPath().c_str());
+      LLDB_LOGF(log, "%s", fs.GetPath().c_str());
     }
-    log->Printf("\nkernels without dSYMS");
+    LLDB_LOGF(log, "\nkernels without dSYMS");
     for (auto fs : m_kernel_binaries_without_dsyms) {
-      log->Printf("%s", fs.GetPath().c_str());
+      LLDB_LOGF(log, "%s", fs.GetPath().c_str());
     }
-    log->Printf("\n");
+    LLDB_LOGF(log, "\n");
   }
 }
 
@@ -495,8 +493,8 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
   Log *log_verbose(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM | LLDB_LOG_OPTION_VERBOSE));
 
-  if (log_verbose)
-      log_verbose->Printf ("PlatformDarwinKernel examining '%s'", file_spec.GetPath().c_str());
+  LLDB_LOGF(log_verbose, "PlatformDarwinKernel examining '%s'",
+            file_spec.GetPath().c_str());
 
   PlatformDarwinKernel *thisp = (PlatformDarwinKernel *)baton;
   if (ft == llvm::sys::fs::file_type::regular_file ||
@@ -507,18 +505,17 @@
         file_spec_extension != g_dsym_suffix) {
       if (KernelHasdSYMSibling(file_spec))
       {
-        if (log)
-        {
-            log->Printf ("PlatformDarwinKernel registering kernel binary '%s' with dSYM sibling", file_spec.GetPath().c_str());
-        }
+        LLDB_LOGF(log,
+                  "PlatformDarwinKernel registering kernel binary '%s' with "
+                  "dSYM sibling",
+                  file_spec.GetPath().c_str());
         thisp->m_kernel_binaries_with_dsyms.push_back(file_spec);
       }
       else
       {
-        if (log)
-        {
-            log->Printf ("PlatformDarwinKernel registering kernel binary '%s', no dSYM", file_spec.GetPath().c_str());
-        }
+        LLDB_LOGF(
+            log, "PlatformDarwinKernel registering kernel binary '%s', no dSYM",
+            file_spec.GetPath().c_str());
         thisp->m_kernel_binaries_without_dsyms.push_back(file_spec);
       }
       return FileSystem::eEnumerateDirectoryResultNext;
@@ -554,8 +551,9 @@
   if (recurse && file_spec_extension != g_dsym_suffix &&
       file_spec_extension != g_kext_suffix &&
       file_spec_extension != g_bundle_suffix) {
-    if (log_verbose)
-        log_verbose->Printf ("PlatformDarwinKernel descending into directory '%s'", file_spec.GetPath().c_str());
+    LLDB_LOGF(log_verbose,
+              "PlatformDarwinKernel descending into directory '%s'",
+              file_spec.GetPath().c_str());
     return FileSystem::eEnumerateDirectoryResultEnter;
   } else {
     return FileSystem::eEnumerateDirectoryResultNext;
@@ -574,19 +572,18 @@
       ConstString bundle_conststr(bundle_id_buf);
       if (KextHasdSYMSibling(file_spec))
       {
-        if (log)
-        {
-            log->Printf ("PlatformDarwinKernel registering kext binary '%s' with dSYM sibling", file_spec.GetPath().c_str());
-        }
+        LLDB_LOGF(log,
+                  "PlatformDarwinKernel registering kext binary '%s' with dSYM "
+                  "sibling",
+                  file_spec.GetPath().c_str());
         thisp->m_name_to_kext_path_map_with_dsyms.insert(
             std::pair<ConstString, FileSpec>(bundle_conststr, file_spec));
       }
       else
       {
-        if (log)
-        {
-            log->Printf ("PlatformDarwinKernel registering kext binary '%s', no dSYM", file_spec.GetPath().c_str());
-        }
+        LLDB_LOGF(log,
+                  "PlatformDarwinKernel registering kext binary '%s', no dSYM",
+                  file_spec.GetPath().c_str());
         thisp->m_name_to_kext_path_map_without_dsyms.insert(
             std::pair<ConstString, FileSpec>(bundle_conststr, file_spec));
       }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
index 51908fa..134a4c7 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
@@ -70,8 +70,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformMacOSX::%s(force=%s, arch={%s,%s})", __FUNCTION__,
-                force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformMacOSX::%s(force=%s, arch={%s,%s})", __FUNCTION__,
+              force ? "true" : "false", arch_name, triple_cstr);
   }
 
   // The only time we create an instance is when we are creating a remote
@@ -117,14 +117,12 @@
     }
   }
   if (create) {
-    if (log)
-      log->Printf("PlatformMacOSX::%s() creating platform", __FUNCTION__);
+    LLDB_LOGF(log, "PlatformMacOSX::%s() creating platform", __FUNCTION__);
     return PlatformSP(new PlatformMacOSX(is_host));
   }
 
-  if (log)
-    log->Printf("PlatformMacOSX::%s() aborting creation of platform",
-                __FUNCTION__);
+  LLDB_LOGF(log, "PlatformMacOSX::%s() aborting creation of platform",
+            __FUNCTION__);
 
   return PlatformSP();
 }
@@ -182,11 +180,11 @@
             std::string output;
             const char *command = "xcrun -sdk macosx --show-sdk-path";
             lldb_private::Status error = RunShellCommand(
-                command, // shell command to run
-                nullptr, // current working directory
-                &status, // Put the exit status of the process in here
-                &signo,  // Put the signal that caused the process to exit in
-                         // here
+                command,    // shell command to run
+                FileSpec(), // current working directory
+                &status,    // Put the exit status of the process in here
+                &signo,     // Put the signal that caused the process to exit in
+                            // here
                 &output, // Get the output from the command and place it in this
                          // string
                 std::chrono::seconds(3));
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSXProperties.td b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSXProperties.td
new file mode 100644
index 0000000..07e4e3e
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSXProperties.td
@@ -0,0 +1,11 @@
+include "../../../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "platformdarwinkernel" in {
+  def SearchForKexts: Property<"search-locally-for-kexts", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"Automatically search for kexts on the local system when doing kernel debugging.">;
+  def KextDirectories: Property<"kext-directories", "FileSpecList">,
+    DefaultStringValue<"">,
+    Desc<"Directories/KDKs to search for kexts in when starting a kernel debug session.">;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp
index 8b45a86..ca50ea2 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.cpp
@@ -68,8 +68,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformRemoteAppleBridge::%s(force=%s, arch={%s,%s})",
-                __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformRemoteAppleBridge::%s(force=%s, arch={%s,%s})",
+              __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
   }
 
   bool create = force;
@@ -112,16 +112,15 @@
   }
 
   if (create) {
-    if (log)
-      log->Printf("PlatformRemoteAppleBridge::%s() creating platform",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "PlatformRemoteAppleBridge::%s() creating platform",
+              __FUNCTION__);
 
     return lldb::PlatformSP(new PlatformRemoteAppleBridge());
   }
 
-  if (log)
-    log->Printf("PlatformRemoteAppleBridge::%s() aborting creation of platform",
-                __FUNCTION__);
+  LLDB_LOGF(log,
+            "PlatformRemoteAppleBridge::%s() aborting creation of platform",
+            __FUNCTION__);
 
   return lldb::PlatformSP();
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
index 5b50acd..10adc70 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
@@ -69,8 +69,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformRemoteAppleTV::%s(force=%s, arch={%s,%s})",
-                __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformRemoteAppleTV::%s(force=%s, arch={%s,%s})",
+              __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
   }
 
   bool create = force;
@@ -116,16 +116,14 @@
   }
 
   if (create) {
-    if (log)
-      log->Printf("PlatformRemoteAppleTV::%s() creating platform",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "PlatformRemoteAppleTV::%s() creating platform",
+              __FUNCTION__);
 
     return lldb::PlatformSP(new PlatformRemoteAppleTV());
   }
 
-  if (log)
-    log->Printf("PlatformRemoteAppleTV::%s() aborting creation of platform",
-                __FUNCTION__);
+  LLDB_LOGF(log, "PlatformRemoteAppleTV::%s() aborting creation of platform",
+            __FUNCTION__);
 
   return lldb::PlatformSP();
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
index 5dec3a0..fa190db 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
@@ -66,8 +66,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformRemoteAppleWatch::%s(force=%s, arch={%s,%s})",
-                __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformRemoteAppleWatch::%s(force=%s, arch={%s,%s})",
+              __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
   }
 
   bool create = force;
@@ -75,6 +75,7 @@
     switch (arch->GetMachine()) {
     case llvm::Triple::arm:
     case llvm::Triple::aarch64:
+    case llvm::Triple::aarch64_32:
     case llvm::Triple::thumb: {
       const llvm::Triple &triple = arch->GetTriple();
       llvm::Triple::VendorType vendor = triple.getVendor();
@@ -122,16 +123,14 @@
 #endif
 
   if (create) {
-    if (log)
-      log->Printf("PlatformRemoteAppleWatch::%s() creating platform",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "PlatformRemoteAppleWatch::%s() creating platform",
+              __FUNCTION__);
 
     return lldb::PlatformSP(new PlatformRemoteAppleWatch());
   }
 
-  if (log)
-    log->Printf("PlatformRemoteAppleWatch::%s() aborting creation of platform",
-                __FUNCTION__);
+  LLDB_LOGF(log, "PlatformRemoteAppleWatch::%s() aborting creation of platform",
+            __FUNCTION__);
 
   return lldb::PlatformSP();
 }
@@ -178,6 +177,9 @@
     case 6:
       arch.SetTriple("thumbv7s-apple-watchos");
       return true;
+    case 7:
+      arch.SetTriple("arm64_32-apple-watchos");
+      return true;
     default:
       break;
     }
@@ -206,6 +208,9 @@
     case 6:
       arch.SetTriple("thumbv7s-apple-watchos");
       return true;
+    case 7:
+      arch.SetTriple("arm64_32-apple-watchos");
+      return true;
     default:
       break;
     }
@@ -231,6 +236,9 @@
     case 5:
       arch.SetTriple("thumbv7s-apple-watchos");
       return true;
+    case 6:
+      arch.SetTriple("arm64_32-apple-watchos");
+      return true;
     default:
       break;
     }
@@ -256,6 +264,9 @@
     case 5:
       arch.SetTriple("thumbv7s-apple-watchos");
       return true;
+    case 6:
+      arch.SetTriple("arm64_32-apple-watchos");
+      return true;
     default:
       break;
     }
@@ -275,6 +286,9 @@
     case 3:
       arch.SetTriple("thumbv7-apple-watchos");
       return true;
+    case 4:
+      arch.SetTriple("arm64_32-apple-watchos");
+      return true;
     default:
       break;
     }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
index 439ca8f..0aa129c 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
@@ -150,17 +150,21 @@
       const SDKDirectoryInfo sdk_sysroot_directory_info(sdk_sysroot_fspec);
       m_sdk_directory_infos.push_back(sdk_sysroot_directory_info);
       if (log) {
-        log->Printf("PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded added "
-                    "--sysroot SDK directory %s",
-                    m_sdk_sysroot.GetCString());
+        LLDB_LOGF(
+            log,
+            "PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded added "
+            "--sysroot SDK directory %s",
+            m_sdk_sysroot.GetCString());
       }
       return true;
     }
     const char *device_support_dir = GetDeviceSupportDirectory();
     if (log) {
-      log->Printf("PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded Got "
-                  "DeviceSupport directory %s",
-                  device_support_dir);
+      LLDB_LOGF(
+          log,
+          "PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded Got "
+          "DeviceSupport directory %s",
+          device_support_dir);
     }
     if (device_support_dir) {
       const bool find_directories = true;
@@ -183,9 +187,11 @@
         if (FileSystem::Instance().Exists(sdk_symbols_symlink_fspec)) {
           m_sdk_directory_infos.push_back(sdk_directory_info);
           if (log) {
-            log->Printf("PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded "
-                        "added builtin SDK directory %s",
-                        sdk_symbols_symlink_fspec.GetPath().c_str());
+            LLDB_LOGF(
+                log,
+                "PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded "
+                "added builtin SDK directory %s",
+                sdk_symbols_symlink_fspec.GetPath().c_str());
           }
         }
       }
@@ -202,9 +208,11 @@
         FileSystem::Instance().Resolve(local_sdk_cache);
         if (FileSystem::Instance().Exists(local_sdk_cache)) {
           if (log) {
-            log->Printf("PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded "
-                        "searching %s for additional SDKs",
-                        local_sdk_cache.GetPath().c_str());
+            LLDB_LOGF(
+                log,
+                "PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded "
+                "searching %s for additional SDKs",
+                local_sdk_cache.GetPath().c_str());
           }
             char path[PATH_MAX];
             if (local_sdk_cache.GetPath(path, sizeof(path))) {
@@ -217,9 +225,12 @@
               for (uint32_t i = num_installed; i < num_sdk_infos; ++i) {
                 m_sdk_directory_infos[i].user_cached = true;
                 if (log) {
-                log->Printf("PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded "
-                            "user SDK directory %s",
-                            m_sdk_directory_infos[i].directory.GetPath().c_str());
+                  LLDB_LOGF(
+                      log,
+                      "PlatformRemoteDarwinDevice::"
+                      "UpdateSDKDirectoryInfosIfNeeded "
+                      "user SDK directory %s",
+                      m_sdk_directory_infos[i].directory.GetPath().c_str());
                 }
             }
           }
@@ -240,9 +251,11 @@
           if (FileSystem::Instance().Exists(sdk_symbols_symlink_fspec)) {
             m_sdk_directory_infos.push_back(sdk_directory_info);
             if (log) {
-              log->Printf("PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded "
-                          "added env var SDK directory %s",
-                          sdk_symbols_symlink_fspec.GetPath().c_str());
+              LLDB_LOGF(
+                  log,
+                  "PlatformRemoteDarwinDevice::UpdateSDKDirectoryInfosIfNeeded "
+                  "added env var SDK directory %s",
+                  sdk_symbols_symlink_fspec.GetPath().c_str());
             }
           }
         }
@@ -418,10 +431,8 @@
         local_file.AppendPathComponent(platform_file_path);
         FileSystem::Instance().Resolve(local_file);
         if (FileSystem::Instance().Exists(local_file)) {
-          if (log)
-            log->Printf("Found a copy of %s in the SDK dir %s/%s",
-                        platform_file_path, sdkroot_path.c_str(),
-                        paths_to_try[i]);
+          LLDB_LOGF(log, "Found a copy of %s in the SDK dir %s/%s",
+                    platform_file_path, sdkroot_path.c_str(), paths_to_try[i]);
           return true;
         }
         local_file.Clear();
@@ -438,46 +449,43 @@
   Status error;
   char platform_file_path[PATH_MAX];
   if (platform_file.GetPath(platform_file_path, sizeof(platform_file_path))) {
-    char resolved_path[PATH_MAX];
-
     const char *os_version_dir = GetDeviceSupportDirectoryForOSVersion();
     if (os_version_dir) {
-      ::snprintf(resolved_path, sizeof(resolved_path), "%s/%s", os_version_dir,
-                 platform_file_path);
+      std::string resolved_path =
+          (llvm::Twine(os_version_dir) + "/" + platform_file_path).str();
 
       local_file.SetFile(resolved_path, FileSpec::Style::native);
       FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file)) {
         if (log) {
-          log->Printf("Found a copy of %s in the DeviceSupport dir %s",
-                      platform_file_path, os_version_dir);
+          LLDB_LOGF(log, "Found a copy of %s in the DeviceSupport dir %s",
+                    platform_file_path, os_version_dir);
         }
         return error;
       }
 
-      ::snprintf(resolved_path, sizeof(resolved_path), "%s/Symbols.Internal/%s",
-                 os_version_dir, platform_file_path);
+      resolved_path = (llvm::Twine(os_version_dir) + "/Symbols.Internal/" +
+                       platform_file_path)
+                          .str();
 
       local_file.SetFile(resolved_path, FileSpec::Style::native);
       FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file)) {
-        if (log) {
-          log->Printf(
-              "Found a copy of %s in the DeviceSupport dir %s/Symbols.Internal",
-              platform_file_path, os_version_dir);
-        }
+        LLDB_LOGF(
+            log,
+            "Found a copy of %s in the DeviceSupport dir %s/Symbols.Internal",
+            platform_file_path, os_version_dir);
         return error;
       }
-      ::snprintf(resolved_path, sizeof(resolved_path), "%s/Symbols/%s",
-                 os_version_dir, platform_file_path);
+      resolved_path =
+          (llvm::Twine(os_version_dir) + "/Symbols/" + platform_file_path)
+              .str();
 
       local_file.SetFile(resolved_path, FileSpec::Style::native);
       FileSystem::Instance().Resolve(local_file);
       if (FileSystem::Instance().Exists(local_file)) {
-        if (log) {
-          log->Printf("Found a copy of %s in the DeviceSupport dir %s/Symbols",
-                      platform_file_path, os_version_dir);
-        }
+        LLDB_LOGF(log, "Found a copy of %s in the DeviceSupport dir %s/Symbols",
+                  platform_file_path, os_version_dir);
         return error;
       }
     }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
index 9e916d8..81d9fcf 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
@@ -61,8 +61,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformRemoteiOS::%s(force=%s, arch={%s,%s})", __FUNCTION__,
-                force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformRemoteiOS::%s(force=%s, arch={%s,%s})",
+              __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
   }
 
   bool create = force;
@@ -111,14 +111,14 @@
 
   if (create) {
     if (log)
-      log->Printf("PlatformRemoteiOS::%s() creating platform", __FUNCTION__);
+      LLDB_LOGF(log, "PlatformRemoteiOS::%s() creating platform", __FUNCTION__);
 
     return lldb::PlatformSP(new PlatformRemoteiOS());
   }
 
   if (log)
-    log->Printf("PlatformRemoteiOS::%s() aborting creation of platform",
-                __FUNCTION__);
+    LLDB_LOGF(log, "PlatformRemoteiOS::%s() aborting creation of platform",
+              __FUNCTION__);
 
   return lldb::PlatformSP();
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
index e455edd..6230962 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.cpp
@@ -70,8 +70,8 @@
     const char *triple_cstr =
         arch ? arch->GetTriple().getTriple().c_str() : "<null>";
 
-    log->Printf("PlatformiOSSimulator::%s(force=%s, arch={%s,%s})",
-                __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
+    LLDB_LOGF(log, "PlatformiOSSimulator::%s(force=%s, arch={%s,%s})",
+              __FUNCTION__, force ? "true" : "false", arch_name, triple_cstr);
   }
 
   bool create = force;
@@ -125,15 +125,14 @@
     }
   }
   if (create) {
-    if (log)
-      log->Printf("PlatformiOSSimulator::%s() creating platform", __FUNCTION__);
+    LLDB_LOGF(log, "PlatformiOSSimulator::%s() creating platform",
+              __FUNCTION__);
 
     return PlatformSP(new PlatformiOSSimulator());
   }
 
-  if (log)
-    log->Printf("PlatformiOSSimulator::%s() aborting creation of platform",
-                __FUNCTION__);
+  LLDB_LOGF(log, "PlatformiOSSimulator::%s() aborting creation of platform",
+            __FUNCTION__);
 
   return PlatformSP();
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
index ed18a1c..15ae82e 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
+++ b/src/llvm-project/lldb/source/Plugins/Platform/MacOSX/objcxx/PlatformiOSSimulatorCoreSimulatorSupport.mm
@@ -382,7 +382,7 @@
 
 static Status HandleFileAction(ProcessLaunchInfo &launch_info,
                                NSMutableDictionary *options, NSString *key,
-                               const int fd, File &file) {
+                               const int fd, lldb::FileSP &file) {
   Status error;
   const FileAction *file_action = launch_info.GetFileActionForFD(fd);
   if (file_action) {
@@ -425,11 +425,16 @@
           }
         }
         Status posix_error;
+        int oflag = file_action->GetActionArgument();
         int created_fd =
-            open(file_spec.GetPath().c_str(), file_action->GetActionArgument(),
-                 S_IRUSR | S_IWUSR);
+            open(file_spec.GetPath().c_str(), oflag, S_IRUSR | S_IWUSR);
         if (created_fd >= 0) {
-          file.SetDescriptor(created_fd, true);
+          auto file_options = File::OpenOptions(0);
+          if ((oflag & O_RDWR) || (oflag & O_RDONLY))
+            file_options |= File::eOpenOptionRead;
+          if ((oflag & O_RDWR) || (oflag & O_RDONLY))
+            file_options |= File::eOpenOptionWrite;
+          file = std::make_shared<NativeFile>(created_fd, file_options, true);
           [options setValue:[NSNumber numberWithInteger:created_fd] forKey:key];
           return error; // Success
         } else {
@@ -489,9 +494,9 @@
   [options setObject:env_dict forKey:kSimDeviceSpawnEnvironment];
 
   Status error;
-  File stdin_file;
-  File stdout_file;
-  File stderr_file;
+  lldb::FileSP stdin_file;
+  lldb::FileSP stdout_file;
+  lldb::FileSP stderr_file;
   error = HandleFileAction(launch_info, options, kSimDeviceSpawnStdin,
                            STDIN_FILENO, stdin_file);
 
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp b/src/llvm-project/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
index 63245d1..53f819e 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
@@ -10,7 +10,7 @@
 #include "lldb/Host/Config.h"
 
 #include <stdio.h>
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include <sys/utsname.h>
 #endif
 
@@ -168,7 +168,7 @@
 void PlatformNetBSD::GetStatus(Stream &strm) {
   Platform::GetStatus(strm);
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
   // Display local kernel information only when we are running in host mode.
   // Otherwise, we would end up printing non-NetBSD information (when running
   // on Mac OS for example).
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp b/src/llvm-project/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
index 9dfb884..1b63e2d 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp
@@ -10,7 +10,7 @@
 #include "lldb/Host/Config.h"
 
 #include <stdio.h>
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include <sys/utsname.h>
 #endif
 
@@ -173,7 +173,7 @@
 void PlatformOpenBSD::GetStatus(Stream &strm) {
   Platform::GetStatus(strm);
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
   // Display local kernel information only when we are running in host mode.
   // Otherwise, we would end up printing non-OpenBSD information (when running
   // on Mac OS for example).
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp b/src/llvm-project/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
index d105575..2b64be6 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
@@ -27,11 +27,11 @@
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
-#include "lldb/Utility/CleanUp.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
+#include "llvm/ADT/ScopeExit.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -223,7 +223,7 @@
     command.Printf(":%d", gid);
   command.Printf("%s", path);
   int status;
-  platform->RunShellCommand(command.GetData(), nullptr, &status, nullptr,
+  platform->RunShellCommand(command.GetData(), FileSpec(), &status, nullptr,
                             nullptr, std::chrono::seconds(10));
   return status;
 }
@@ -235,7 +235,7 @@
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
 
   if (IsHost()) {
-    if (FileSpec::Equal(source, destination, true))
+    if (source == destination)
       return Status();
     // cp src dst
     // chown uid:gid dst
@@ -248,7 +248,7 @@
     StreamString command;
     command.Printf("cp %s %s", src_path.c_str(), dst_path.c_str());
     int status;
-    RunShellCommand(command.GetData(), nullptr, &status, nullptr, nullptr,
+    RunShellCommand(command.GetData(), FileSpec(), &status, nullptr, nullptr,
                     std::chrono::seconds(10));
     if (status != 0)
       return Status("unable to perform copy");
@@ -276,10 +276,9 @@
       } else
         command.Printf("rsync %s %s %s:%s", GetRSyncOpts(), src_path.c_str(),
                        GetHostname(), dst_path.c_str());
-      if (log)
-        log->Printf("[PutFile] Running command: %s\n", command.GetData());
+      LLDB_LOGF(log, "[PutFile] Running command: %s\n", command.GetData());
       int retcode;
-      Host::RunShellCommand(command.GetData(), nullptr, &retcode, nullptr,
+      Host::RunShellCommand(command.GetData(), FileSpec(), &retcode, nullptr,
                             nullptr, std::chrono::minutes(1));
       if (retcode == 0) {
         // Don't chown a local file for a remote system
@@ -308,14 +307,14 @@
   if (dst_path.empty())
     return Status("unable to get file path for destination");
   if (IsHost()) {
-    if (FileSpec::Equal(source, destination, true))
+    if (source == destination)
       return Status("local scenario->source and destination are the same file "
                     "path: no operation performed");
     // cp src dst
     StreamString cp_command;
     cp_command.Printf("cp %s %s", src_path.c_str(), dst_path.c_str());
     int status;
-    RunShellCommand(cp_command.GetData(), nullptr, &status, nullptr, nullptr,
+    RunShellCommand(cp_command.GetData(), FileSpec(), &status, nullptr, nullptr,
                     std::chrono::seconds(10));
     if (status != 0)
       return Status("unable to perform copy");
@@ -334,10 +333,9 @@
         command.Printf("rsync %s %s:%s %s", GetRSyncOpts(),
                        m_remote_platform_sp->GetHostname(), src_path.c_str(),
                        dst_path.c_str());
-      if (log)
-        log->Printf("[GetFile] Running command: %s\n", command.GetData());
+      LLDB_LOGF(log, "[GetFile] Running command: %s\n", command.GetData());
       int retcode;
-      Host::RunShellCommand(command.GetData(), nullptr, &retcode, nullptr,
+      Host::RunShellCommand(command.GetData(), FileSpec(), &retcode, nullptr,
                             nullptr, std::chrono::minutes(1));
       if (retcode == 0)
         return Status();
@@ -348,8 +346,7 @@
     // read/write, read/write, read/write, ...
     // close src
     // close dst
-    if (log)
-      log->Printf("[GetFile] Using block by block transfer....\n");
+    LLDB_LOGF(log, "[GetFile] Using block by block transfer....\n");
     Status error;
     user_id_t fd_src = OpenFile(source, File::eOpenOptionRead,
                                 lldb::eFilePermissionsFileDefault, error);
@@ -515,24 +512,21 @@
       error = debugger.GetTargetList().CreateTarget(
           debugger, "", "", eLoadDependentsNo, nullptr, new_target_sp);
       target = new_target_sp.get();
-      if (log)
-        log->Printf("PlatformPOSIX::%s created new target", __FUNCTION__);
+      LLDB_LOGF(log, "PlatformPOSIX::%s created new target", __FUNCTION__);
     } else {
       error.Clear();
-      if (log)
-        log->Printf("PlatformPOSIX::%s target already existed, setting target",
-                    __FUNCTION__);
+      LLDB_LOGF(log, "PlatformPOSIX::%s target already existed, setting target",
+                __FUNCTION__);
     }
 
     if (target && error.Success()) {
       debugger.GetTargetList().SetSelectedTarget(target);
       if (log) {
         ModuleSP exe_module_sp = target->GetExecutableModule();
-        log->Printf("PlatformPOSIX::%s set selected target to %p %s",
-                    __FUNCTION__, (void *)target,
-                    exe_module_sp
-                        ? exe_module_sp->GetFileSpec().GetPath().c_str()
-                        : "<null>");
+        LLDB_LOGF(log, "PlatformPOSIX::%s set selected target to %p %s",
+                  __FUNCTION__, (void *)target,
+                  exe_module_sp ? exe_module_sp->GetFileSpec().GetPath().c_str()
+                                : "<null>");
       }
 
       process_sp =
@@ -712,7 +706,9 @@
   FunctionCaller *do_dlopen_function = nullptr;
 
   // Fetch the clang types we will need:
-  ClangASTContext *ast = process->GetTarget().GetScratchClangASTContext();
+  ClangASTContext *ast = ClangASTContext::GetScratch(process->GetTarget());
+  if (!ast)
+    return nullptr;
 
   CompilerType clang_void_pointer_type
       = ast->GetBasicType(eBasicTypeVoid).GetPointerType();
@@ -804,12 +800,13 @@
                                     "for path: %s", utility_error.AsCString());
     return LLDB_INVALID_IMAGE_TOKEN;
   }
-  
+
   // Make sure we deallocate the input string memory:
-  CleanUp path_cleanup([process, path_addr] { 
-      process->DeallocateMemory(path_addr); 
+  auto path_cleanup = llvm::make_scope_exit([process, path_addr] {
+    // Deallocate the buffer.
+    process->DeallocateMemory(path_addr);
   });
-  
+
   process->WriteMemory(path_addr, path.c_str(), path_len, utility_error);
   if (utility_error.Fail()) {
     error.SetErrorStringWithFormat("dlopen error: could not write path string:"
@@ -830,21 +827,24 @@
   }
   
   // Make sure we deallocate the result structure memory
-  CleanUp return_cleanup([process, return_addr] {
-      process->DeallocateMemory(return_addr);
+  auto return_cleanup = llvm::make_scope_exit([process, return_addr] {
+    // Deallocate the buffer
+    process->DeallocateMemory(return_addr);
   });
-  
+
   // This will be the address of the storage for paths, if we are using them,
   // or nullptr to signal we aren't.
   lldb::addr_t path_array_addr = 0x0;
-  llvm::Optional<CleanUp> path_array_cleanup;
+  llvm::Optional<llvm::detail::scope_exit<std::function<void()>>>
+      path_array_cleanup;
 
   // This is the address to a buffer large enough to hold the largest path
   // conjoined with the library name we're passing in.  This is a convenience 
   // to avoid having to call malloc in the dlopen function.
   lldb::addr_t buffer_addr = 0x0;
-  llvm::Optional<CleanUp> buffer_cleanup;
-  
+  llvm::Optional<llvm::detail::scope_exit<std::function<void()>>>
+      buffer_cleanup;
+
   // Set the values into our args and write them to the target:
   if (paths != nullptr) {
     // First insert the paths into the target.  This is expected to be a 
@@ -877,8 +877,9 @@
     }
     
     // Make sure we deallocate the paths array.
-    path_array_cleanup.emplace([process, path_array_addr] { 
-        process->DeallocateMemory(path_array_addr); 
+    path_array_cleanup.emplace([process, path_array_addr]() {
+      // Deallocate the path array.
+      process->DeallocateMemory(path_array_addr);
     });
 
     process->WriteMemory(path_array_addr, path_array.data(), 
@@ -904,8 +905,9 @@
     }
   
     // Make sure we deallocate the buffer memory:
-    buffer_cleanup.emplace([process, buffer_addr] { 
-        process->DeallocateMemory(buffer_addr); 
+    buffer_cleanup.emplace([process, buffer_addr]() {
+      // Deallocate the buffer.
+      process->DeallocateMemory(buffer_addr);
     });
   }
     
@@ -930,10 +932,11 @@
   // Make sure we clean up the args structure.  We can't reuse it because the
   // Platform lives longer than the process and the Platforms don't get a
   // signal to clean up cached data when a process goes away.
-  CleanUp args_cleanup([do_dlopen_function, &exe_ctx, func_args_addr] {
-    do_dlopen_function->DeallocateFunctionResults(exe_ctx, func_args_addr);
-  });
-  
+  auto args_cleanup =
+      llvm::make_scope_exit([do_dlopen_function, &exe_ctx, func_args_addr] {
+        do_dlopen_function->DeallocateFunctionResults(exe_ctx, func_args_addr);
+      });
+
   // Now run the caller:
   EvaluateExpressionOptions options;
   options.SetExecutionPolicy(eExecutionPolicyAlways);
@@ -947,7 +950,11 @@
 
   Value return_value;
   // Fetch the clang types we will need:
-  ClangASTContext *ast = process->GetTarget().GetScratchClangASTContext();
+  ClangASTContext *ast = ClangASTContext::GetScratch(process->GetTarget());
+  if (!ast) {
+    error.SetErrorString("dlopen error: Unable to get ClangASTContext");
+    return LLDB_INVALID_IMAGE_TOKEN;
+  }
 
   CompilerType clang_void_pointer_type
       = ast->GetBasicType(eBasicTypeVoid).GetPointerType();
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp b/src/llvm-project/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
index 9c52b59..1e62ddf 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
@@ -169,21 +169,21 @@
   const auto module_path = module_file_spec.GetPath(false);
 
   if (!m_gdb_client.GetModuleInfo(module_file_spec, arch, module_spec)) {
-    if (log)
-      log->Printf(
-          "PlatformRemoteGDBServer::%s - failed to get module info for %s:%s",
-          __FUNCTION__, module_path.c_str(),
-          arch.GetTriple().getTriple().c_str());
+    LLDB_LOGF(
+        log,
+        "PlatformRemoteGDBServer::%s - failed to get module info for %s:%s",
+        __FUNCTION__, module_path.c_str(),
+        arch.GetTriple().getTriple().c_str());
     return false;
   }
 
   if (log) {
     StreamString stream;
     module_spec.Dump(stream);
-    log->Printf(
-        "PlatformRemoteGDBServer::%s - got module info for (%s:%s) : %s",
-        __FUNCTION__, module_path.c_str(), arch.GetTriple().getTriple().c_str(),
-        stream.GetData());
+    LLDB_LOGF(log,
+              "PlatformRemoteGDBServer::%s - got module info for (%s:%s) : %s",
+              __FUNCTION__, module_path.c_str(),
+              arch.GetTriple().getTriple().c_str(), stream.GetData());
   }
 
   return true;
@@ -253,9 +253,9 @@
     Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
     FileSpec working_dir;
     if (m_gdb_client.GetWorkingDir(working_dir) && log)
-      log->Printf(
-          "PlatformRemoteGDBServer::GetRemoteWorkingDirectory() -> '%s'",
-          working_dir.GetCString());
+      LLDB_LOGF(log,
+                "PlatformRemoteGDBServer::GetRemoteWorkingDirectory() -> '%s'",
+                working_dir.GetCString());
     return working_dir;
   } else {
     return Platform::GetRemoteWorkingDirectory();
@@ -268,9 +268,8 @@
     // Clear the working directory it case it doesn't get set correctly. This
     // will for use to re-read it
     Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
-    if (log)
-      log->Printf("PlatformRemoteGDBServer::SetRemoteWorkingDirectory('%s')",
-                  working_dir.GetCString());
+    LLDB_LOGF(log, "PlatformRemoteGDBServer::SetRemoteWorkingDirectory('%s')",
+              working_dir.GetCString());
     return m_gdb_client.SetWorkingDir(working_dir) == 0;
   } else
     return Platform::SetRemoteWorkingDirectory(working_dir);
@@ -370,8 +369,7 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
   Status error;
 
-  if (log)
-    log->Printf("PlatformRemoteGDBServer::%s() called", __FUNCTION__);
+  LLDB_LOGF(log, "PlatformRemoteGDBServer::%s() called", __FUNCTION__);
 
   auto num_file_actions = launch_info.GetNumFileActions();
   for (decltype(num_file_actions) i = 0; i < num_file_actions; ++i) {
@@ -408,10 +406,10 @@
   const char *arch_triple = arch_spec.GetTriple().str().c_str();
 
   m_gdb_client.SendLaunchArchPacket(arch_triple);
-  if (log)
-    log->Printf(
-        "PlatformRemoteGDBServer::%s() set launch architecture triple to '%s'",
-        __FUNCTION__, arch_triple ? arch_triple : "<NULL>");
+  LLDB_LOGF(
+      log,
+      "PlatformRemoteGDBServer::%s() set launch architecture triple to '%s'",
+      __FUNCTION__, arch_triple ? arch_triple : "<NULL>");
 
   int arg_packet_err;
   {
@@ -427,22 +425,21 @@
       const auto pid = m_gdb_client.GetCurrentProcessID(false);
       if (pid != LLDB_INVALID_PROCESS_ID) {
         launch_info.SetProcessID(pid);
-        if (log)
-          log->Printf("PlatformRemoteGDBServer::%s() pid %" PRIu64
-                      " launched successfully",
-                      __FUNCTION__, pid);
+        LLDB_LOGF(log,
+                  "PlatformRemoteGDBServer::%s() pid %" PRIu64
+                  " launched successfully",
+                  __FUNCTION__, pid);
       } else {
-        if (log)
-          log->Printf("PlatformRemoteGDBServer::%s() launch succeeded but we "
-                      "didn't get a valid process id back!",
-                      __FUNCTION__);
+        LLDB_LOGF(log,
+                  "PlatformRemoteGDBServer::%s() launch succeeded but we "
+                  "didn't get a valid process id back!",
+                  __FUNCTION__);
         error.SetErrorString("failed to get PID");
       }
     } else {
       error.SetErrorString(error_str.c_str());
-      if (log)
-        log->Printf("PlatformRemoteGDBServer::%s() launch failed: %s",
-                    __FUNCTION__, error.AsCString());
+      LLDB_LOGF(log, "PlatformRemoteGDBServer::%s() launch failed: %s",
+                __FUNCTION__, error.AsCString());
     }
   } else {
     error.SetErrorStringWithFormat("'A' packet returned an error: %i",
@@ -600,11 +597,10 @@
                                               uint32_t mode) {
   Status error = m_gdb_client.MakeDirectory(file_spec, mode);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
-  if (log)
-    log->Printf("PlatformRemoteGDBServer::MakeDirectory(path='%s', mode=%o) "
-                "error = %u (%s)",
-                file_spec.GetCString(), mode, error.GetError(),
-                error.AsCString());
+  LLDB_LOGF(log,
+            "PlatformRemoteGDBServer::MakeDirectory(path='%s', mode=%o) "
+            "error = %u (%s)",
+            file_spec.GetCString(), mode, error.GetError(), error.AsCString());
   return error;
 }
 
@@ -612,11 +608,11 @@
                                                    uint32_t &file_permissions) {
   Status error = m_gdb_client.GetFilePermissions(file_spec, file_permissions);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
-  if (log)
-    log->Printf("PlatformRemoteGDBServer::GetFilePermissions(path='%s', "
-                "file_permissions=%o) error = %u (%s)",
-                file_spec.GetCString(), file_permissions, error.GetError(),
-                error.AsCString());
+  LLDB_LOGF(log,
+            "PlatformRemoteGDBServer::GetFilePermissions(path='%s', "
+            "file_permissions=%o) error = %u (%s)",
+            file_spec.GetCString(), file_permissions, error.GetError(),
+            error.AsCString());
   return error;
 }
 
@@ -624,16 +620,17 @@
                                                    uint32_t file_permissions) {
   Status error = m_gdb_client.SetFilePermissions(file_spec, file_permissions);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
-  if (log)
-    log->Printf("PlatformRemoteGDBServer::SetFilePermissions(path='%s', "
-                "file_permissions=%o) error = %u (%s)",
-                file_spec.GetCString(), file_permissions, error.GetError(),
-                error.AsCString());
+  LLDB_LOGF(log,
+            "PlatformRemoteGDBServer::SetFilePermissions(path='%s', "
+            "file_permissions=%o) error = %u (%s)",
+            file_spec.GetCString(), file_permissions, error.GetError(),
+            error.AsCString());
   return error;
 }
 
 lldb::user_id_t PlatformRemoteGDBServer::OpenFile(const FileSpec &file_spec,
-                                                  uint32_t flags, uint32_t mode,
+                                                  File::OpenOptions flags,
+                                                  uint32_t mode,
                                                   Status &error) {
   return m_gdb_client.OpenFile(file_spec, flags, mode, error);
 }
@@ -671,20 +668,19 @@
 {
   Status error = m_gdb_client.CreateSymlink(src, dst);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
-  if (log)
-    log->Printf("PlatformRemoteGDBServer::CreateSymlink(src='%s', dst='%s') "
-                "error = %u (%s)",
-                src.GetCString(), dst.GetCString(), error.GetError(),
-                error.AsCString());
+  LLDB_LOGF(log,
+            "PlatformRemoteGDBServer::CreateSymlink(src='%s', dst='%s') "
+            "error = %u (%s)",
+            src.GetCString(), dst.GetCString(), error.GetError(),
+            error.AsCString());
   return error;
 }
 
 Status PlatformRemoteGDBServer::Unlink(const FileSpec &file_spec) {
   Status error = m_gdb_client.Unlink(file_spec);
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
-  if (log)
-    log->Printf("PlatformRemoteGDBServer::Unlink(path='%s') error = %u (%s)",
-                file_spec.GetCString(), error.GetError(), error.AsCString());
+  LLDB_LOGF(log, "PlatformRemoteGDBServer::Unlink(path='%s') error = %u (%s)",
+            file_spec.GetCString(), error.GetError(), error.AsCString());
   return error;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h b/src/llvm-project/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
index c774daa..13edcba 100644
--- a/src/llvm-project/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
+++ b/src/llvm-project/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h
@@ -113,7 +113,7 @@
   Status SetFilePermissions(const FileSpec &file_spec,
                             uint32_t file_permissions) override;
 
-  lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags,
+  lldb::user_id_t OpenFile(const FileSpec &file_spec, File::OpenOptions flags,
                            uint32_t mode, Status &error) override;
 
   bool CloseFile(lldb::user_id_t fd, Status &error) override;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp b/src/llvm-project/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
index 3ec410f..f70ef97 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Darwin/DarwinProcessLauncher.cpp
@@ -254,9 +254,8 @@
 
   case FileAction::eFileActionNone:
   default:
-    if (log)
-      log->Printf("%s(): unsupported file action %u", __FUNCTION__,
-                  action.GetAction());
+    LLDB_LOGF(log, "%s(): unsupported file action %u", __FUNCTION__,
+              action.GetAction());
     break;
   }
 
@@ -288,8 +287,7 @@
 
   int error_code;
   if ((error_code = ::posix_spawnattr_init(&attr)) != 0) {
-    if (log)
-      log->Printf("::posix_spawnattr_init(&attr) failed");
+    LLDB_LOGF(log, "::posix_spawnattr_init(&attr) failed");
     error.SetError(error_code, eErrorTypePOSIX);
     return error;
   }
@@ -378,10 +376,10 @@
 
     error = CreatePosixSpawnFileAction(*action, &file_actions);
     if (!error.Success()) {
-      if (log)
-        log->Printf("%s(): error converting FileAction to posix_spawn "
-                    "file action: %s",
-                    __FUNCTION__, error.AsCString());
+      LLDB_LOGF(log,
+                "%s(): error converting FileAction to posix_spawn "
+                "file action: %s",
+                __FUNCTION__, error.AsCString());
       return error;
     }
   }
@@ -416,10 +414,10 @@
 
   if (actual_cpu_type) {
     *actual_cpu_type = GetCPUTypeForLocalProcess(*pid);
-    if (log)
-      log->Printf("%s(): cpu type for launched process pid=%i: "
-                  "cpu_type=0x%8.8x",
-                  __FUNCTION__, *pid, *actual_cpu_type);
+    LLDB_LOGF(log,
+              "%s(): cpu type for launched process pid=%i: "
+              "cpu_type=0x%8.8x",
+              __FUNCTION__, *pid, *actual_cpu_type);
   }
 
   return error;
@@ -477,23 +475,21 @@
   char resolved_path[PATH_MAX];
   resolved_path[0] = '\0';
 
-  if (log)
-    log->Printf("%s(): attempting to resolve given binary path: \"%s\"",
-                __FUNCTION__, given_path);
+  LLDB_LOGF(log, "%s(): attempting to resolve given binary path: \"%s\"",
+            __FUNCTION__, given_path);
 
   // If we fail to resolve the path to our executable, then just use what we
   // were given and hope for the best
   if (!ResolveExecutablePath(given_path, resolved_path,
                              sizeof(resolved_path))) {
-    if (log)
-      log->Printf("%s(): failed to resolve binary path, using "
-                  "what was given verbatim and hoping for the best",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "%s(): failed to resolve binary path, using "
+              "what was given verbatim and hoping for the best",
+              __FUNCTION__);
     ::strncpy(resolved_path, given_path, sizeof(resolved_path));
   } else {
-    if (log)
-      log->Printf("%s(): resolved given binary path to: \"%s\"", __FUNCTION__,
-                  resolved_path);
+    LLDB_LOGF(log, "%s(): resolved given binary path to: \"%s\"", __FUNCTION__,
+              resolved_path);
   }
 
   char launch_err_str[PATH_MAX];
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Darwin/MachException.cpp b/src/llvm-project/lldb/source/Plugins/Process/Darwin/MachException.cpp
index 70ad673..073ad64 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Darwin/MachException.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Darwin/MachException.cpp
@@ -67,10 +67,11 @@
   // TODO change to LIBLLDB_LOG_EXCEPTION
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
   if (log) {
-    log->Printf("::%s(exc_port = 0x%4.4x, exc_type = %d (%s), "
-                "exc_data = 0x%llx, exc_data_count = %d)",
-                __FUNCTION__, exc_port, exc_type, MachException::Name(exc_type),
-                (uint64_t)exc_data, exc_data_count);
+    LLDB_LOGF(log,
+              "::%s(exc_port = 0x%4.4x, exc_type = %d (%s), "
+              "exc_data = 0x%llx, exc_data_count = %d)",
+              __FUNCTION__, exc_port, exc_type, MachException::Name(exc_type),
+              (uint64_t)exc_data, exc_data_count);
   }
   return KERN_FAILURE;
 }
@@ -83,13 +84,14 @@
     thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
   if (log) {
-    log->Printf("::%s(exc_port = 0x%4.4x, thd_port = 0x%4.4x, "
-                "tsk_port = 0x%4.4x, exc_type = %d (%s), exc_data[%d] = "
-                "{ 0x%llx, 0x%llx })",
-                __FUNCTION__, exc_port, thread_port, task_port, exc_type,
-                MachException::Name(exc_type), exc_data_count,
-                (uint64_t)(exc_data_count > 0 ? exc_data[0] : 0xBADDBADD),
-                (uint64_t)(exc_data_count > 1 ? exc_data[1] : 0xBADDBADD));
+    LLDB_LOGF(log,
+              "::%s(exc_port = 0x%4.4x, thd_port = 0x%4.4x, "
+              "tsk_port = 0x%4.4x, exc_type = %d (%s), exc_data[%d] = "
+              "{ 0x%llx, 0x%llx })",
+              __FUNCTION__, exc_port, thread_port, task_port, exc_type,
+              MachException::Name(exc_type), exc_data_count,
+              (uint64_t)(exc_data_count > 0 ? exc_data[0] : 0xBADDBADD),
+              (uint64_t)(exc_data_count > 1 ? exc_data[1] : 0xBADDBADD));
   }
 
   return KERN_FAILURE;
@@ -102,13 +104,14 @@
                            mach_msg_type_number_t exc_data_count) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
   if (log) {
-    log->Printf("::%s(exc_port = 0x%4.4x, thd_port = 0x%4.4x, "
-                "tsk_port = 0x%4.4x, exc_type = %d (%s), exc_data[%d] "
-                "= { 0x%llx, 0x%llx })",
-                __FUNCTION__, exc_port, thread_port, task_port, exc_type,
-                MachException::Name(exc_type), exc_data_count,
-                (uint64_t)(exc_data_count > 0 ? exc_data[0] : 0xBADDBADD),
-                (uint64_t)(exc_data_count > 1 ? exc_data[1] : 0xBADDBADD));
+    LLDB_LOGF(log,
+              "::%s(exc_port = 0x%4.4x, thd_port = 0x%4.4x, "
+              "tsk_port = 0x%4.4x, exc_type = %d (%s), exc_data[%d] "
+              "= { 0x%llx, 0x%llx })",
+              __FUNCTION__, exc_port, thread_port, task_port, exc_type,
+              MachException::Name(exc_type), exc_data_count,
+              (uint64_t)(exc_data_count > 0 ? exc_data[0] : 0xBADDBADD),
+              (uint64_t)(exc_data_count > 1 ? exc_data[1] : 0xBADDBADD));
   }
 
   if (task_port == g_message->task_port) {
@@ -187,15 +190,16 @@
       options & MACH_RCV_TIMEOUT ? timeout : 0;
   if (log && ((options & MACH_RCV_TIMEOUT) == 0)) {
     // Dump this log message if we have no timeout in case it never returns
-    log->Printf("::mach_msg(msg->{bits = %#x, size = %u remote_port = %#x, "
-                "local_port = %#x, reserved = 0x%x, id = 0x%x}, "
-                "option = %#x, send_size = 0, rcv_size = %llu, "
-                "rcv_name = %#x, timeout = %u, notify = %#x)",
-                exc_msg.hdr.msgh_bits, exc_msg.hdr.msgh_size,
-                exc_msg.hdr.msgh_remote_port, exc_msg.hdr.msgh_local_port,
-                exc_msg.hdr.msgh_reserved, exc_msg.hdr.msgh_id, options,
-                (uint64_t)sizeof(exc_msg.data), port, mach_msg_timeout,
-                notify_port);
+    LLDB_LOGF(log,
+              "::mach_msg(msg->{bits = %#x, size = %u remote_port = %#x, "
+              "local_port = %#x, reserved = 0x%x, id = 0x%x}, "
+              "option = %#x, send_size = 0, rcv_size = %llu, "
+              "rcv_name = %#x, timeout = %u, notify = %#x)",
+              exc_msg.hdr.msgh_bits, exc_msg.hdr.msgh_size,
+              exc_msg.hdr.msgh_remote_port, exc_msg.hdr.msgh_local_port,
+              exc_msg.hdr.msgh_reserved, exc_msg.hdr.msgh_id, options,
+              (uint64_t)sizeof(exc_msg.data), port, mach_msg_timeout,
+              notify_port);
   }
 
   mach_msg_return_t mach_err =
@@ -213,15 +217,16 @@
 
   // Dump any errors we get
   if (error.Fail() && log) {
-    log->Printf("::mach_msg(msg->{bits = %#x, size = %u remote_port = %#x, "
-                "local_port = %#x, reserved = 0x%x, id = 0x%x}, "
-                "option = %#x, send_size = %u, rcv_size = %lu, rcv_name "
-                "= %#x, timeout = %u, notify = %#x) failed: %s",
-                exc_msg.hdr.msgh_bits, exc_msg.hdr.msgh_size,
-                exc_msg.hdr.msgh_remote_port, exc_msg.hdr.msgh_local_port,
-                exc_msg.hdr.msgh_reserved, exc_msg.hdr.msgh_id, options, 0,
-                sizeof(exc_msg.data), port, mach_msg_timeout, notify_port,
-                error.AsCString());
+    LLDB_LOGF(log,
+              "::mach_msg(msg->{bits = %#x, size = %u remote_port = %#x, "
+              "local_port = %#x, reserved = 0x%x, id = 0x%x}, "
+              "option = %#x, send_size = %u, rcv_size = %lu, rcv_name "
+              "= %#x, timeout = %u, notify = %#x) failed: %s",
+              exc_msg.hdr.msgh_bits, exc_msg.hdr.msgh_size,
+              exc_msg.hdr.msgh_remote_port, exc_msg.hdr.msgh_local_port,
+              exc_msg.hdr.msgh_reserved, exc_msg.hdr.msgh_id, options, 0,
+              sizeof(exc_msg.data), port, mach_msg_timeout, notify_port,
+              error.AsCString());
   }
   return error;
 }
@@ -264,10 +269,10 @@
   } else {
     Log *log(
         GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
-    if (log)
-      log->Printf("MachException::Message::%s(): mach_exc_server "
-                  "returned zero...",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "MachException::Message::%s(): mach_exc_server "
+              "returned zero...",
+              __FUNCTION__);
   }
   g_message = NULL;
   return success;
@@ -293,10 +298,10 @@
       auto mach_err = ::pid_for_task(state.task_port, &state_pid);
       if (mach_err) {
         error.SetError(mach_err, eErrorTypeMachKernel);
-        if (log)
-          log->Printf("MachException::Message::%s(): pid_for_task() "
-                      "failed: %s",
-                      __FUNCTION__, error.AsCString());
+        LLDB_LOGF(log,
+                  "MachException::Message::%s(): pid_for_task() "
+                  "failed: %s",
+                  __FUNCTION__, error.AsCString());
         return error;
       }
     }
@@ -309,25 +314,25 @@
         error.SetError(errno, eErrorTypePOSIX);
 
       if (!error.Success()) {
-        if (log)
-          log->Printf("::ptrace(request = PT_THUPDATE, pid = "
-                      "0x%4.4x, tid = 0x%4.4x, signal = %i)",
-                      state_pid, state.thread_port, soft_signal);
+        LLDB_LOGF(log,
+                  "::ptrace(request = PT_THUPDATE, pid = "
+                  "0x%4.4x, tid = 0x%4.4x, signal = %i)",
+                  state_pid, state.thread_port, soft_signal);
         return error;
       }
     }
   }
 
-  if (log)
-    log->Printf("::mach_msg ( msg->{bits = %#x, size = %u, remote_port "
-                "= %#x, local_port = %#x, reserved = 0x%x, id = 0x%x}, "
-                "option = %#x, send_size = %u, rcv_size = %u, rcv_name "
-                "= %#x, timeout = %u, notify = %#x)",
-                reply_msg.hdr.msgh_bits, reply_msg.hdr.msgh_size,
-                reply_msg.hdr.msgh_remote_port, reply_msg.hdr.msgh_local_port,
-                reply_msg.hdr.msgh_reserved, reply_msg.hdr.msgh_id,
-                MACH_SEND_MSG | MACH_SEND_INTERRUPT, reply_msg.hdr.msgh_size, 0,
-                MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+  LLDB_LOGF(log,
+            "::mach_msg ( msg->{bits = %#x, size = %u, remote_port "
+            "= %#x, local_port = %#x, reserved = 0x%x, id = 0x%x}, "
+            "option = %#x, send_size = %u, rcv_size = %u, rcv_name "
+            "= %#x, timeout = %u, notify = %#x)",
+            reply_msg.hdr.msgh_bits, reply_msg.hdr.msgh_size,
+            reply_msg.hdr.msgh_remote_port, reply_msg.hdr.msgh_local_port,
+            reply_msg.hdr.msgh_reserved, reply_msg.hdr.msgh_id,
+            MACH_SEND_MSG | MACH_SEND_INTERRUPT, reply_msg.hdr.msgh_size, 0,
+            MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
 
   auto mach_err =
       ::mach_msg(&reply_msg.hdr, MACH_SEND_MSG | MACH_SEND_INTERRUPT,
@@ -342,12 +347,13 @@
       log->PutCString("::mach_msg() - send interrupted");
       // TODO: keep retrying to reply???
     } else if (state.task_port == inferior_task) {
-      log->Printf("mach_msg(): returned an error when replying "
-                  "to a mach exception: error = %u (%s)",
-                  error.GetError(), error.AsCString());
+      LLDB_LOGF(log,
+                "mach_msg(): returned an error when replying "
+                "to a mach exception: error = %u (%s)",
+                error.GetError(), error.AsCString());
     } else {
-      log->Printf("::mach_msg() - failed (child of task): %u (%s)",
-                  error.GetError(), error.AsCString());
+      LLDB_LOGF(log, "::mach_msg() - failed (child of task): %u (%s)",
+                error.GetError(), error.AsCString());
     }
   }
 
@@ -377,9 +383,8 @@
   Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 
-  if (log)
-    log->Printf("MachException::PortInfo::%s(task = 0x%4.4x)", __FUNCTION__,
-                task);
+  LLDB_LOGF(log, "MachException::PortInfo::%s(task = 0x%4.4x)", __FUNCTION__,
+            task);
 
   // Be careful to be able to have debugserver built on a newer OS than what it
   // is currently running on by being able to start with all exceptions and
@@ -394,13 +399,15 @@
 
   if (log) {
     if (error.Success()) {
-      log->Printf("::task_get_exception_ports(task = 0x%4.4x, mask = "
-                  "0x%x, maskCnt => %u, ports, behaviors, flavors)",
-                  task, mask, count);
+      LLDB_LOGF(log,
+                "::task_get_exception_ports(task = 0x%4.4x, mask = "
+                "0x%x, maskCnt => %u, ports, behaviors, flavors)",
+                task, mask, count);
     } else {
-      log->Printf("::task_get_exception_ports(task = 0x%4.4x, mask = 0x%x, "
-                  "maskCnt => %u, ports, behaviors, flavors) error: %u (%s)",
-                  task, mask, count, error.GetError(), error.AsCString());
+      LLDB_LOGF(log,
+                "::task_get_exception_ports(task = 0x%4.4x, mask = 0x%x, "
+                "maskCnt => %u, ports, behaviors, flavors) error: %u (%s)",
+                task, mask, count, error.GetError(), error.AsCString());
     }
   }
 
@@ -413,15 +420,17 @@
     error.SetError(mach_err, eErrorTypeMachKernel);
     if (log) {
       if (error.Success()) {
-        log->Printf("::task_get_exception_ports(task = 0x%4.4x, "
-                    "mask = 0x%x, maskCnt => %u, ports, behaviors, "
-                    "flavors)",
-                    task, mask, count);
+        LLDB_LOGF(log,
+                  "::task_get_exception_ports(task = 0x%4.4x, "
+                  "mask = 0x%x, maskCnt => %u, ports, behaviors, "
+                  "flavors)",
+                  task, mask, count);
       } else {
-        log->Printf("::task_get_exception_ports(task = 0x%4.4x, mask = "
-                    "0x%x, maskCnt => %u, ports, behaviors, flavors) "
-                    "error: %u (%s)",
-                    task, mask, count, error.GetError(), error.AsCString());
+        LLDB_LOGF(log,
+                  "::task_get_exception_ports(task = 0x%4.4x, mask = "
+                  "0x%x, maskCnt => %u, ports, behaviors, flavors) "
+                  "error: %u (%s)",
+                  task, mask, count, error.GetError(), error.AsCString());
       }
     }
   }
@@ -437,8 +446,7 @@
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 
-  if (log)
-    log->Printf("MachException::PortInfo::Restore(task = 0x%4.4x)", task);
+  LLDB_LOGF(log, "MachException::PortInfo::Restore(task = 0x%4.4x)", task);
 
   uint32_t i = 0;
   if (count > 0) {
@@ -449,17 +457,19 @@
         error.SetError(mach_err, eErrorTypeMachKernel);
       if (log) {
         if (error.Success()) {
-          log->Printf("::task_set_exception_ports(task = 0x%4.4x, "
-                      "exception_mask = 0x%8.8x, new_port = 0x%4.4x, "
-                      "behavior = 0x%8.8x, new_flavor = 0x%8.8x)",
-                      task, masks[i], ports[i], behaviors[i], flavors[i]);
+          LLDB_LOGF(log,
+                    "::task_set_exception_ports(task = 0x%4.4x, "
+                    "exception_mask = 0x%8.8x, new_port = 0x%4.4x, "
+                    "behavior = 0x%8.8x, new_flavor = 0x%8.8x)",
+                    task, masks[i], ports[i], behaviors[i], flavors[i]);
         } else {
-          log->Printf("::task_set_exception_ports(task = 0x%4.4x, "
-                      "exception_mask = 0x%8.8x, new_port = 0x%4.4x, "
-                      "behavior = 0x%8.8x, new_flavor = 0x%8.8x): "
-                      "error %u (%s)",
-                      task, masks[i], ports[i], behaviors[i], flavors[i],
-                      error.GetError(), error.AsCString());
+          LLDB_LOGF(log,
+                    "::task_set_exception_ports(task = 0x%4.4x, "
+                    "exception_mask = 0x%8.8x, new_port = 0x%4.4x, "
+                    "behavior = 0x%8.8x, new_flavor = 0x%8.8x): "
+                    "error %u (%s)",
+                    task, masks[i], ports[i], behaviors[i], flavors[i],
+                    error.GetError(), error.AsCString());
         }
       }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp b/src/llvm-project/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
index fe7de27..18dbdda 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
@@ -75,19 +75,19 @@
 
   // Handle launch failure.
   if (!error.Success()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s() failed to launch process: "
-                  "%s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s() failed to launch process: "
+              "%s",
+              __FUNCTION__, error.AsCString());
     return error;
   }
 
   // Handle failure to return a pid.
   if (launch_info.GetProcessID() == LLDB_INVALID_PROCESS_ID) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s() launch succeeded but no "
-                  "pid was returned!  Aborting.",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s() launch succeeded but no "
+              "pid was returned!  Aborting.",
+              __FUNCTION__);
     return error;
   }
 
@@ -104,10 +104,10 @@
   // NativeProcessDarwin instance.
   error = np_darwin_sp->FinalizeLaunch(launch_flavor, mainloop);
   if (!error.Success()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s() aborting, failed to finalize"
-                  " the launching of the process: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s() aborting, failed to finalize"
+              " the launching of the process: %s",
+              __FUNCTION__, error.AsCString());
     return error;
   }
 
@@ -120,9 +120,8 @@
     lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
     MainLoop &mainloop, NativeProcessProtocolSP &native_process_sp) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("NativeProcessDarwin::%s(pid = %" PRIi64 ")", __FUNCTION__,
-                pid);
+  LLDB_LOGF(log, "NativeProcessDarwin::%s(pid = %" PRIi64 ")", __FUNCTION__,
+            pid);
 
   // Retrieve the architecture for the running process.
   ArchSpec process_arch;
@@ -173,10 +172,10 @@
 
   error = StartExceptionThread();
   if (!error.Success()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): failure starting the "
-                  "mach exception port monitor thread: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): failure starting the "
+              "mach exception port monitor thread: %s",
+              __FUNCTION__, error.AsCString());
 
     // Terminate the inferior process.  There's nothing meaningful we can do if
     // we can't receive signals and exceptions.  Since we launched the process,
@@ -195,33 +194,31 @@
     int err = ::ptrace(PT_ATTACHEXC, m_pid, 0, 0);
     if (err == 0) {
       // m_flags |= eMachProcessFlagsAttached;
-      if (log)
-        log->Printf("NativeProcessDarwin::%s(): successfully spawned "
-                    "process with pid %" PRIu64,
-                    __FUNCTION__, m_pid);
+      LLDB_LOGF(log,
+                "NativeProcessDarwin::%s(): successfully spawned "
+                "process with pid %" PRIu64,
+                __FUNCTION__, m_pid);
     } else {
       error.SetErrorToErrno();
       SetState(eStateExited);
-      if (log)
-        log->Printf("NativeProcessDarwin::%s(): error: failed to "
-                    "attach to spawned pid %" PRIu64 " (error=%d (%s))",
-                    __FUNCTION__, m_pid, (int)error.GetError(),
-                    error.AsCString());
+      LLDB_LOGF(log,
+                "NativeProcessDarwin::%s(): error: failed to "
+                "attach to spawned pid %" PRIu64 " (error=%d (%s))",
+                __FUNCTION__, m_pid, (int)error.GetError(), error.AsCString());
       return error;
     }
   }
 
-  if (log)
-    log->Printf("NativeProcessDarwin::%s(): new pid is %" PRIu64 "...",
-                __FUNCTION__, m_pid);
+  LLDB_LOGF(log, "NativeProcessDarwin::%s(): new pid is %" PRIu64 "...",
+            __FUNCTION__, m_pid);
 
   // Spawn a thread to reap our child inferior process...
   error = StartWaitpidThread(main_loop);
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): failed to start waitpid() "
-                  "thread: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): failed to start waitpid() "
+              "thread: %s",
+              __FUNCTION__, error.AsCString());
     kill(SIGKILL, static_cast<::pid_t>(m_pid));
     return error;
   }
@@ -230,10 +227,10 @@
     // We failed to get the task for our process ID which is bad. Kill our
     // process; otherwise, it will be stopped at the entry point and get
     // reparented to someone else and never go away.
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): could not get task port "
-                  "for process, sending SIGKILL and exiting: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): could not get task port "
+              "for process, sending SIGKILL and exiting: %s",
+              __FUNCTION__, error.AsCString());
     kill(SIGKILL, static_cast<::pid_t>(m_pid));
     return error;
   }
@@ -278,18 +275,17 @@
   // the exception to our internal exception stack
   m_exception_messages.push_back(message);
 
-  if (log)
-    log->Printf("NativeProcessDarwin::%s(): new queued message count: %lu",
-                __FUNCTION__, m_exception_messages.size());
+  LLDB_LOGF(log, "NativeProcessDarwin::%s(): new queued message count: %lu",
+            __FUNCTION__, m_exception_messages.size());
 }
 
 void *NativeProcessDarwin::ExceptionThread(void *arg) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
   if (!arg) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): cannot run mach exception "
-                  "thread, mandatory process arg was null",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): cannot run mach exception "
+              "thread, mandatory process arg was null",
+              __FUNCTION__);
     return nullptr;
   }
 
@@ -299,9 +295,8 @@
 void *NativeProcessDarwin::DoExceptionThread() {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 
-  if (log)
-    log->Printf("NativeProcessDarwin::%s(arg=%p) starting thread...",
-                __FUNCTION__, this);
+  LLDB_LOGF(log, "NativeProcessDarwin::%s(arg=%p) starting thread...",
+            __FUNCTION__, this);
 
   pthread_setname_np("exception monitoring thread");
 
@@ -344,20 +339,20 @@
   if (process->ProcessUsingSpringBoard()) {
     // Request a renewal for every 60 seconds if we attached using SpringBoard.
     watchdog.reset(::SBSWatchdogAssertionCreateForPID(nullptr, pid, 60));
-    if (log)
-      log->Printf("::SBSWatchdogAssertionCreateForPID(NULL, %4.4x, 60) "
-                  "=> %p",
-                  pid, watchdog.get());
+    LLDB_LOGF(log,
+              "::SBSWatchdogAssertionCreateForPID(NULL, %4.4x, 60) "
+              "=> %p",
+              pid, watchdog.get());
 
     if (watchdog.get()) {
       ::SBSWatchdogAssertionRenew(watchdog.get());
 
       CFTimeInterval watchdogRenewalInterval =
           ::SBSWatchdogAssertionGetRenewalInterval(watchdog.get());
-      if (log)
-        log->Printf("::SBSWatchdogAssertionGetRenewalInterval(%p) => "
-                    "%g seconds",
-                    watchdog.get(), watchdogRenewalInterval);
+      LLDB_LOGF(log,
+                "::SBSWatchdogAssertionGetRenewalInterval(%p) => "
+                "%g seconds",
+                watchdog.get(), watchdogRenewalInterval);
       if (watchdogRenewalInterval > 0.0) {
         watchdog_timeout = (mach_msg_timeout_t)watchdogRenewalInterval * 1000;
         if (watchdog_timeout > 3000) {
@@ -425,11 +420,11 @@
         // If we have no task port we should exit this thread, as it implies
         // the inferior went down.
         if (!IsExceptionPortValid()) {
-          if (log)
-            log->Printf("NativeProcessDarwin::%s(): the inferior "
-                        "exception port is no longer valid, "
-                        "canceling exception thread...",
-                        __FUNCTION__);
+          LLDB_LOGF(log,
+                    "NativeProcessDarwin::%s(): the inferior "
+                    "exception port is no longer valid, "
+                    "canceling exception thread...",
+                    __FUNCTION__);
           // Should we be setting a process state here?
           break;
         }
@@ -437,19 +432,19 @@
         // Make sure the inferior task is still valid.
         if (IsTaskValid()) {
           // Task is still ok.
-          if (log)
-            log->Printf("NativeProcessDarwin::%s(): interrupted, but "
-                        "the inferior task iss till valid, "
-                        "continuing...",
-                        __FUNCTION__);
+          LLDB_LOGF(log,
+                    "NativeProcessDarwin::%s(): interrupted, but "
+                    "the inferior task iss till valid, "
+                    "continuing...",
+                    __FUNCTION__);
           continue;
         } else {
           // The inferior task is no longer valid.  Time to exit as the process
           // has gone away.
-          if (log)
-            log->Printf("NativeProcessDarwin::%s(): the inferior task "
-                        "has exited, and so will we...",
-                        __FUNCTION__);
+          LLDB_LOGF(log,
+                    "NativeProcessDarwin::%s(): the inferior task "
+                    "has exited, and so will we...",
+                    __FUNCTION__);
           // Does this race at all with our waitpid()?
           SetState(eStateExited);
           break;
@@ -471,18 +466,18 @@
           // our task is still valid.
           if (IsTaskValid(task)) {
             // Task is still ok.
-            if (log)
-              log->Printf("NativeProcessDarwin::%s(): got a timeout, "
-                          "continuing...",
-                          __FUNCTION__);
+            LLDB_LOGF(log,
+                      "NativeProcessDarwin::%s(): got a timeout, "
+                      "continuing...",
+                      __FUNCTION__);
             continue;
           } else {
             // The inferior task is no longer valid.  Time to exit as the
             // process has gone away.
-            if (log)
-              log->Printf("NativeProcessDarwin::%s(): the inferior "
-                          "task has exited, and so will we...",
-                          __FUNCTION__);
+            LLDB_LOGF(log,
+                      "NativeProcessDarwin::%s(): the inferior "
+                      "task has exited, and so will we...",
+                      __FUNCTION__);
             // Does this race at all with our waitpid()?
             SetState(eStateExited);
             break;
@@ -493,18 +488,17 @@
         if (watchdog.get()) {
           watchdog_elapsed += periodic_timeout;
           if (watchdog_elapsed >= watchdog_timeout) {
-            if (log)
-              log->Printf("SBSWatchdogAssertionRenew(%p)", watchdog.get());
+            LLDB_LOGF(log, "SBSWatchdogAssertionRenew(%p)", watchdog.get());
             ::SBSWatchdogAssertionRenew(watchdog.get());
             watchdog_elapsed = 0;
           }
         }
 #endif
       } else {
-        if (log)
-          log->Printf("NativeProcessDarwin::%s(): continuing after "
-                      "receiving an unexpected error: %u (%s)",
-                      __FUNCTION__, error.GetError(), error.AsCString());
+        LLDB_LOGF(log,
+                  "NativeProcessDarwin::%s(): continuing after "
+                  "receiving an unexpected error: %u (%s)",
+                  __FUNCTION__, error.GetError(), error.AsCString());
         // TODO: notify of error?
       }
     }
@@ -523,17 +517,15 @@
   }
 #endif // #if defined (WITH_SPRINGBOARD) && !defined (WITH_BKS)
 
-  if (log)
-    log->Printf("NativeProcessDarwin::%s(%p): thread exiting...", __FUNCTION__,
-                this);
+  LLDB_LOGF(log, "NativeProcessDarwin::%s(%p): thread exiting...", __FUNCTION__,
+            this);
   return nullptr;
 }
 
 Status NativeProcessDarwin::StartExceptionThread() {
   Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("NativeProcessDarwin::%s() called", __FUNCTION__);
+  LLDB_LOGF(log, "NativeProcessDarwin::%s() called", __FUNCTION__);
 
   // Make sure we've looked up the inferior port.
   TaskPortForProcessID(error);
@@ -554,11 +546,11 @@
                                        &m_exception_port);
   error.SetError(mach_err, eErrorTypeMachKernel);
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): mach_port_allocate("
-                  "task_self=0x%4.4x, MACH_PORT_RIGHT_RECEIVE, "
-                  "&m_exception_port) failed: %u (%s)",
-                  __FUNCTION__, task_self, error.GetError(), error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): mach_port_allocate("
+              "task_self=0x%4.4x, MACH_PORT_RIGHT_RECEIVE, "
+              "&m_exception_port) failed: %u (%s)",
+              __FUNCTION__, task_self, error.GetError(), error.AsCString());
     return error;
   }
 
@@ -567,23 +559,23 @@
       task_self, m_exception_port, m_exception_port, MACH_MSG_TYPE_MAKE_SEND);
   error.SetError(mach_err, eErrorTypeMachKernel);
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): mach_port_insert_right("
-                  "task_self=0x%4.4x, m_exception_port=0x%4.4x, "
-                  "m_exception_port=0x%4.4x, MACH_MSG_TYPE_MAKE_SEND) "
-                  "failed: %u (%s)",
-                  __FUNCTION__, task_self, m_exception_port, m_exception_port,
-                  error.GetError(), error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): mach_port_insert_right("
+              "task_self=0x%4.4x, m_exception_port=0x%4.4x, "
+              "m_exception_port=0x%4.4x, MACH_MSG_TYPE_MAKE_SEND) "
+              "failed: %u (%s)",
+              __FUNCTION__, task_self, m_exception_port, m_exception_port,
+              error.GetError(), error.AsCString());
     return error;
   }
 
   // Save the original state of the exception ports for our child process.
   error = SaveExceptionPortInfo();
   if (error.Fail() || (m_exc_port_info.mask == 0)) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): SaveExceptionPortInfo() "
-                  "failed, cannot install exception handler: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): SaveExceptionPortInfo() "
+              "failed, cannot install exception handler: %s",
+              __FUNCTION__, error.AsCString());
     return error;
   }
 
@@ -593,14 +585,14 @@
       EXCEPTION_DEFAULT | MACH_EXCEPTION_CODES, THREAD_STATE_NONE);
   error.SetError(mach_err, eErrorTypeMachKernel);
   if (error.Fail()) {
-    if (log)
-      log->Printf("::task_set_exception_ports (task = 0x%4.4x, "
-                  "exception_mask = 0x%8.8x, new_port = 0x%4.4x, "
-                  "behavior = 0x%8.8x, new_flavor = 0x%8.8x) failed: "
-                  "%u (%s)",
-                  m_task, m_exc_port_info.mask, m_exception_port,
-                  (EXCEPTION_DEFAULT | MACH_EXCEPTION_CODES), THREAD_STATE_NONE,
-                  error.GetError(), error.AsCString());
+    LLDB_LOGF(log,
+              "::task_set_exception_ports (task = 0x%4.4x, "
+              "exception_mask = 0x%8.8x, new_port = 0x%4.4x, "
+              "behavior = 0x%8.8x, new_flavor = 0x%8.8x) failed: "
+              "%u (%s)",
+              m_task, m_exc_port_info.mask, m_exception_port,
+              (EXCEPTION_DEFAULT | MACH_EXCEPTION_CODES), THREAD_STATE_NONE,
+              error.GetError(), error.AsCString());
     return error;
   }
 
@@ -609,10 +601,10 @@
       ::pthread_create(&m_exception_thread, nullptr, ExceptionThread, this);
   error.SetError(pthread_err, eErrorTypePOSIX);
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): failed to create Mach "
-                  "exception-handling thread: %u (%s)",
-                  __FUNCTION__, error.GetError(), error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): failed to create Mach "
+              "exception-handling thread: %u (%s)",
+              __FUNCTION__, error.GetError(), error.AsCString());
   }
 
   return error;
@@ -677,10 +669,10 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_VERBOSE));
 
   std::lock_guard<std::recursive_mutex> locker(m_exception_messages_mutex);
-  if (log)
-    log->Printf("NativeProcessDarwin::%s(): processing %lu exception "
-                "messages.",
-                __FUNCTION__, m_exception_messages.size());
+  LLDB_LOGF(log,
+            "NativeProcessDarwin::%s(): processing %lu exception "
+            "messages.",
+            __FUNCTION__, m_exception_messages.size());
 
   if (m_exception_messages.empty()) {
     // Not particularly useful...
@@ -733,18 +725,18 @@
             const bool force_update = true;
             const task_t new_task = TaskPortForProcessID(error, force_update);
             if (old_task != new_task) {
-              if (log)
-                log->Printf("exec: inferior task port changed "
-                            "from 0x%4.4x to 0x%4.4x",
-                            old_task, new_task);
+              LLDB_LOGF(log,
+                        "exec: inferior task port changed "
+                        "from 0x%4.4x to 0x%4.4x",
+                        old_task, new_task);
             }
           }
         } else {
-          if (log)
-            log->Printf("NativeProcessDarwin::%s() warning: "
-                        "failed to read all_image_infos."
-                        "infoArrayCount from 0x%8.8llx",
-                        __FUNCTION__, info_array_count_addr);
+          LLDB_LOGF(log,
+                    "NativeProcessDarwin::%s() warning: "
+                    "failed to read all_image_infos."
+                    "infoArrayCount from 0x%8.8llx",
+                    __FUNCTION__, info_array_count_addr);
         }
       } else if ((m_sent_interrupt_signo != 0) &&
                  (signo == m_sent_interrupt_signo)) {
@@ -756,10 +748,10 @@
     if (m_did_exec) {
       cpu_type_t process_cpu_type = GetCPUTypeForLocalProcess(m_pid);
       if (m_cpu_type != process_cpu_type) {
-        if (log)
-          log->Printf("NativeProcessDarwin::%s(): arch changed from "
-                      "0x%8.8x to 0x%8.8x",
-                      __FUNCTION__, m_cpu_type, process_cpu_type);
+        LLDB_LOGF(log,
+                  "NativeProcessDarwin::%s(): arch changed from "
+                  "0x%8.8x to 0x%8.8x",
+                  __FUNCTION__, m_cpu_type, process_cpu_type);
         m_cpu_type = process_cpu_type;
         // TODO figure out if we need to do something here.
         // DNBArchProtocol::SetArchitecture (process_cpu_type);
@@ -772,10 +764,10 @@
 
     if (m_sent_interrupt_signo != 0) {
       if (received_interrupt) {
-        if (log)
-          log->Printf("NativeProcessDarwin::%s(): process "
-                      "successfully interrupted with signal %i",
-                      __FUNCTION__, m_sent_interrupt_signo);
+        LLDB_LOGF(log,
+                  "NativeProcessDarwin::%s(): process "
+                  "successfully interrupted with signal %i",
+                  __FUNCTION__, m_sent_interrupt_signo);
 
         // Mark that we received the interrupt signal
         m_sent_interrupt_signo = 0;
@@ -792,19 +784,19 @@
           // Only auto_resume if we stopped with _only_ the interrupt signal.
           if (num_task_exceptions == 1) {
             auto_resume = true;
-            if (log)
-              log->Printf("NativeProcessDarwin::%s(): auto "
-                          "resuming due to unhandled interrupt "
-                          "signal %i",
-                          __FUNCTION__, m_auto_resume_signo);
+            LLDB_LOGF(log,
+                      "NativeProcessDarwin::%s(): auto "
+                      "resuming due to unhandled interrupt "
+                      "signal %i",
+                      __FUNCTION__, m_auto_resume_signo);
           }
           m_auto_resume_signo = 0;
         }
       } else {
-        if (log)
-          log->Printf("NativeProcessDarwin::%s(): didn't get signal "
-                      "%i after MachProcess::Interrupt()",
-                      __FUNCTION__, m_sent_interrupt_signo);
+        LLDB_LOGF(log,
+                  "NativeProcessDarwin::%s(): didn't get signal "
+                  "%i after MachProcess::Interrupt()",
+                  __FUNCTION__, m_sent_interrupt_signo);
       }
     }
   }
@@ -878,10 +870,10 @@
   const bool child_inherits = false;
   error = m_waitpid_pipe.CreateNew(child_inherits);
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): failed to create waitpid "
-                  "communication pipe: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): failed to create waitpid "
+              "communication pipe: %s",
+              __FUNCTION__, error.AsCString());
     return error;
   }
 
@@ -889,8 +881,8 @@
 
   // TODO make PipePOSIX derive from IOObject.  This is goofy here.
   const bool transfer_ownership = false;
-  auto io_sp = IOObjectSP(
-      new File(m_waitpid_pipe.GetReadFileDescriptor(), transfer_ownership));
+  auto io_sp = IOObjectSP(new NativeFile(m_waitpid_pipe.GetReadFileDescriptor(),
+                                         transfer_ownership));
   m_waitpid_reader_handle = main_loop.RegisterReadObject(
       io_sp, [this](MainLoopBase &) { HandleWaitpidResult(); }, error);
 
@@ -899,10 +891,10 @@
       ::pthread_create(&m_waitpid_thread, nullptr, WaitpidThread, this);
   error.SetError(pthread_err, eErrorTypePOSIX);
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): failed to create waitpid "
-                  "handling thread: %u (%s)",
-                  __FUNCTION__, error.GetError(), error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): failed to create waitpid "
+              "handling thread: %u (%s)",
+              __FUNCTION__, error.GetError(), error.AsCString());
     return error;
   }
 
@@ -912,10 +904,10 @@
 void *NativeProcessDarwin::WaitpidThread(void *arg) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
   if (!arg) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): cannot run waitpid "
-                  "thread, mandatory process arg was null",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): cannot run waitpid "
+              "thread, mandatory process arg was null",
+              __FUNCTION__);
     return nullptr;
   }
 
@@ -938,10 +930,10 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   if (m_pid == LLDB_INVALID_PROCESS_ID) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): inferior process ID is "
-                  "not set, cannot waitpid on it",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): inferior process ID is "
+              "not set, cannot waitpid on it",
+              __FUNCTION__);
     return nullptr;
   }
 
@@ -962,41 +954,41 @@
     if (error.Fail()) {
       if (error.GetError() == EINTR) {
         // This is okay, we can keep going.
-        if (log)
-          log->Printf("NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
-                      ", &status, 0) interrupted, continuing",
-                      __FUNCTION__, m_pid);
+        LLDB_LOGF(log,
+                  "NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
+                  ", &status, 0) interrupted, continuing",
+                  __FUNCTION__, m_pid);
         continue;
       }
 
       // This error is not okay, abort.
-      if (log)
-        log->Printf("NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
-                    ", &status, 0) aborting due to error: %u (%s)",
-                    __FUNCTION__, m_pid, error.GetError(), error.AsCString());
+      LLDB_LOGF(log,
+                "NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
+                ", &status, 0) aborting due to error: %u (%s)",
+                __FUNCTION__, m_pid, error.GetError(), error.AsCString());
       break;
     }
 
     // Log the successful result.
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
-                  ", &status, 0) => %i, status = %i",
-                  __FUNCTION__, m_pid, child_pid, status);
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
+              ", &status, 0) => %i, status = %i",
+              __FUNCTION__, m_pid, child_pid, status);
 
     // Handle the result.
     if (WIFSTOPPED(status)) {
-      if (log)
-        log->Printf("NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
-                    ") received a stop, continuing waitpid() loop",
-                    __FUNCTION__, m_pid);
+      LLDB_LOGF(log,
+                "NativeProcessDarwin::%s(): waitpid(pid = %" PRIu64
+                ") received a stop, continuing waitpid() loop",
+                __FUNCTION__, m_pid);
       continue;
     } else // if (WIFEXITED(status) || WIFSIGNALED(status))
     {
-      if (log)
-        log->Printf("NativeProcessDarwin::%s(pid = %" PRIu64 "): "
-                    "waitpid thread is setting exit status for pid = "
-                    "%i to %i",
-                    __FUNCTION__, m_pid, child_pid, status);
+      LLDB_LOGF(log,
+                "NativeProcessDarwin::%s(pid = %" PRIu64 "): "
+                "waitpid thread is setting exit status for pid = "
+                "%i to %i",
+                __FUNCTION__, m_pid, child_pid, status);
 
       error = SendInferiorExitStatusToMainLoop(child_pid, status);
       return nullptr;
@@ -1005,12 +997,11 @@
 
   // We should never exit as long as our child process is alive.  If we get
   // here, something completely unexpected went wrong and we should exit.
-  if (log)
-    log->Printf(
-        "NativeProcessDarwin::%s(): internal error: waitpid thread "
-        "exited out of its main loop in an unexpected way. pid = %" PRIu64
-        ". Sending exit status of -1.",
-        __FUNCTION__, m_pid);
+  LLDB_LOGF(log,
+            "NativeProcessDarwin::%s(): internal error: waitpid thread "
+            "exited out of its main loop in an unexpected way. pid = %" PRIu64
+            ". Sending exit status of -1.",
+            __FUNCTION__, m_pid);
 
   error = SendInferiorExitStatusToMainLoop((::pid_t)m_pid, -1);
   return nullptr;
@@ -1026,11 +1017,11 @@
   // Send the pid.
   error = m_waitpid_pipe.Write(&pid, sizeof(pid), bytes_written);
   if (error.Fail() || (bytes_written < sizeof(pid))) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s() - failed to write "
-                  "waitpid exiting pid to the pipe.  Client will not "
-                  "hear about inferior exit status!",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s() - failed to write "
+              "waitpid exiting pid to the pipe.  Client will not "
+              "hear about inferior exit status!",
+              __FUNCTION__);
     return error;
   }
 
@@ -1038,11 +1029,11 @@
   bytes_written = 0;
   error = m_waitpid_pipe.Write(&status, sizeof(status), bytes_written);
   if (error.Fail() || (bytes_written < sizeof(status))) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s() - failed to write "
-                  "waitpid exit result to the pipe.  Client will not "
-                  "hear about inferior exit status!",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s() - failed to write "
+              "waitpid exit result to the pipe.  Client will not "
+              "hear about inferior exit status!",
+              __FUNCTION__);
   }
   return error;
 }
@@ -1058,11 +1049,11 @@
   size_t bytes_read = 0;
   error = m_waitpid_pipe.Read(&pid, sizeof(pid), bytes_read);
   if (error.Fail() || (bytes_read < sizeof(pid))) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s() - failed to read "
-                  "waitpid exiting pid from the pipe.  Will notify "
-                  "as if parent process died with exit status -1.",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s() - failed to read "
+              "waitpid exiting pid from the pipe.  Will notify "
+              "as if parent process died with exit status -1.",
+              __FUNCTION__);
     SetExitStatus(WaitStatus(WaitStatus::Exit, -1), notify_status);
     return error;
   }
@@ -1071,21 +1062,21 @@
   int status = -1;
   error = m_waitpid_pipe.Read(&status, sizeof(status), bytes_read);
   if (error.Fail() || (bytes_read < sizeof(status))) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s() - failed to read "
-                  "waitpid exit status from the pipe.  Will notify "
-                  "as if parent process died with exit status -1.",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s() - failed to read "
+              "waitpid exit status from the pipe.  Will notify "
+              "as if parent process died with exit status -1.",
+              __FUNCTION__);
     SetExitStatus(WaitStatus(WaitStatus::Exit, -1), notify_status);
     return error;
   }
 
   // Notify the monitor that our state has changed.
-  if (log)
-    log->Printf("NativeProcessDarwin::%s(): main loop received waitpid "
-                "exit status info: pid=%i (%s), status=%i",
-                __FUNCTION__, pid,
-                (pid == m_pid) ? "the inferior" : "not the inferior", status);
+  LLDB_LOGF(log,
+            "NativeProcessDarwin::%s(): main loop received waitpid "
+            "exit status info: pid=%i (%s), status=%i",
+            __FUNCTION__, pid,
+            (pid == m_pid) ? "the inferior" : "not the inferior", status);
 
   SetExitStatus(WaitStatus::Decode(status), notify_status);
   return error;
@@ -1096,10 +1087,10 @@
   if ((m_task == TASK_NULL) || force) {
     Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
     if (m_pid == LLDB_INVALID_PROCESS_ID) {
-      if (log)
-        log->Printf("NativeProcessDarwin::%s(): cannot get task due "
-                    "to invalid pid",
-                    __FUNCTION__);
+      LLDB_LOGF(log,
+                "NativeProcessDarwin::%s(): cannot get task due "
+                "to invalid pid",
+                __FUNCTION__);
       return TASK_NULL;
     }
 
@@ -1115,19 +1106,21 @@
         // Succeeded.  Save and return it.
         error.Clear();
         m_task = task;
-        log->Printf("NativeProcessDarwin::%s(): ::task_for_pid("
-                    "stub_port = 0x%4.4x, pid = %llu, &task) "
-                    "succeeded: inferior task port = 0x%4.4x",
-                    __FUNCTION__, task_self, m_pid, m_task);
+        LLDB_LOGF(log,
+                  "NativeProcessDarwin::%s(): ::task_for_pid("
+                  "stub_port = 0x%4.4x, pid = %llu, &task) "
+                  "succeeded: inferior task port = 0x%4.4x",
+                  __FUNCTION__, task_self, m_pid, m_task);
         return m_task;
       } else {
         // Failed to get the task for the inferior process.
         error.SetError(err, eErrorTypeMachKernel);
         if (log) {
-          log->Printf("NativeProcessDarwin::%s(): ::task_for_pid("
-                      "stub_port = 0x%4.4x, pid = %llu, &task) "
-                      "failed, err = 0x%8.8x (%s)",
-                      __FUNCTION__, task_self, m_pid, err, error.AsCString());
+          LLDB_LOGF(log,
+                    "NativeProcessDarwin::%s(): ::task_for_pid("
+                    "stub_port = 0x%4.4x, pid = %llu, &task) "
+                    "failed, err = 0x%8.8x (%s)",
+                    __FUNCTION__, task_self, m_pid, err, error.AsCString());
         }
       }
 
@@ -1156,20 +1149,21 @@
 
   if (log) {
     if (m_auto_resume_signo)
-      log->Printf("NativeProcessDarwin::%s(): task 0x%x resuming (with "
-                  "unhandled interrupt signal %i)...",
-                  __FUNCTION__, m_task, m_auto_resume_signo);
+      LLDB_LOGF(log,
+                "NativeProcessDarwin::%s(): task 0x%x resuming (with "
+                "unhandled interrupt signal %i)...",
+                __FUNCTION__, m_task, m_auto_resume_signo);
     else
-      log->Printf("NativeProcessDarwin::%s(): task 0x%x resuming...",
-                  __FUNCTION__, m_task);
+      LLDB_LOGF(log, "NativeProcessDarwin::%s(): task 0x%x resuming...",
+                __FUNCTION__, m_task);
   }
 
   error = ReplyToAllExceptions();
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): aborting, failed to "
-                  "reply to exceptions: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): aborting, failed to "
+              "reply to exceptions: %s",
+              __FUNCTION__, error.AsCString());
     return error;
   }
   //    bool stepOverBreakInstruction = step;
@@ -1196,9 +1190,8 @@
 
   TaskPortForProcessID(error);
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): no task port, aborting",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "NativeProcessDarwin::%s(): no task port, aborting",
+              __FUNCTION__);
     return error;
   }
 
@@ -1211,9 +1204,10 @@
   size_t index = 0;
   for (auto &message : m_exception_messages) {
     if (log) {
-      log->Printf("NativeProcessDarwin::%s(): replying to exception "
-                  "%zu...",
-                  __FUNCTION__, index++);
+      LLDB_LOGF(log,
+                "NativeProcessDarwin::%s(): replying to exception "
+                "%zu...",
+                __FUNCTION__, index++);
     }
 
     int thread_reply_signal = 0;
@@ -1234,9 +1228,10 @@
     if (error.Fail() && log) {
       // We log any error here, but we don't stop the exception response
       // handling.
-      log->Printf("NativeProcessDarwin::%s(): failed to reply to "
-                  "exception: %s",
-                  __FUNCTION__, error.AsCString());
+      LLDB_LOGF(log,
+                "NativeProcessDarwin::%s(): failed to reply to "
+                "exception: %s",
+                __FUNCTION__, error.AsCString());
       error.Clear();
     }
   }
@@ -1253,10 +1248,10 @@
 
   TaskPortForProcessID(error);
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): failed to get task port "
-                  "for process when attempting to resume: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): failed to get task port "
+              "for process when attempting to resume: %s",
+              __FUNCTION__, error.AsCString());
     return error;
   }
   if (m_task == TASK_NULL) {
@@ -1265,20 +1260,20 @@
     return error;
   }
 
-  if (log)
-    log->Printf("NativeProcessDarwin::%s(): requesting resume of task "
-                "0x%4.4x",
-                __FUNCTION__, m_task);
+  LLDB_LOGF(log,
+            "NativeProcessDarwin::%s(): requesting resume of task "
+            "0x%4.4x",
+            __FUNCTION__, m_task);
 
   // Get the BasicInfo struct to verify that we're suspended before we try to
   // resume the task.
   struct task_basic_info task_info;
   error = GetTaskBasicInfo(m_task, &task_info);
   if (error.Fail()) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): failed to get task "
-                  "BasicInfo when attempting to resume: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): failed to get task "
+              "BasicInfo when attempting to resume: %s",
+              __FUNCTION__, error.AsCString());
     return error;
   }
 
@@ -1289,16 +1284,16 @@
     error.SetError(mach_err, eErrorTypeMachKernel);
     if (log) {
       if (error.Success())
-        log->Printf("::task_resume(target_task = 0x%4.4x): success", m_task);
+        LLDB_LOGF(log, "::task_resume(target_task = 0x%4.4x): success", m_task);
       else
-        log->Printf("::task_resume(target_task = 0x%4.4x) error: %s", m_task,
-                    error.AsCString());
+        LLDB_LOGF(log, "::task_resume(target_task = 0x%4.4x) error: %s", m_task,
+                  error.AsCString());
     }
   } else {
-    if (log)
-      log->Printf("::task_resume(target_task = 0x%4.4x): ignored, "
-                  "already running",
-                  m_task);
+    LLDB_LOGF(log,
+              "::task_resume(target_task = 0x%4.4x): ignored, "
+              "already running",
+              m_task);
   }
 
   return error;
@@ -1353,11 +1348,11 @@
   auto err = ::task_info(m_task, TASK_BASIC_INFO, (task_info_t)info, &count);
   error.SetError(err, eErrorTypeMachKernel);
   if (error.Fail()) {
-    if (log)
-      log->Printf("::task_info(target_task = 0x%4.4x, "
-                  "flavor = TASK_BASIC_INFO, task_info_out => %p, "
-                  "task_info_outCnt => %u) failed: %u (%s)",
-                  m_task, info, count, error.GetError(), error.AsCString());
+    LLDB_LOGF(log,
+              "::task_info(target_task = 0x%4.4x, "
+              "flavor = TASK_BASIC_INFO, task_info_out => %p, "
+              "task_info_outCnt => %u) failed: %u (%s)",
+              m_task, info, count, error.GetError(), error.AsCString());
     return error;
   }
 
@@ -1368,11 +1363,12 @@
                  (float)info->user_time.microseconds / 1000000.0f;
     float system = (float)info->user_time.seconds +
                    (float)info->user_time.microseconds / 1000000.0f;
-    verbose_log->Printf("task_basic_info = { suspend_count = %i, "
-                        "virtual_size = 0x%8.8llx, resident_size = "
-                        "0x%8.8llx, user_time = %f, system_time = %f }",
-                        info->suspend_count, (uint64_t)info->virtual_size,
-                        (uint64_t)info->resident_size, user, system);
+    verbose_LLDB_LOGF(log,
+                      "task_basic_info = { suspend_count = %i, "
+                      "virtual_size = 0x%8.8llx, resident_size = "
+                      "0x%8.8llx, user_time = %f, system_time = %f }",
+                      info->suspend_count, (uint64_t)info->virtual_size,
+                      (uint64_t)info->resident_size, user, system);
   }
   return error;
 }
@@ -1383,16 +1379,15 @@
 
   if (m_task == TASK_NULL) {
     error.SetErrorString("task port is null, cannot suspend task");
-    if (log)
-      log->Printf("NativeProcessDarwin::%s() failed: %s", __FUNCTION__,
-                  error.AsCString());
+    LLDB_LOGF(log, "NativeProcessDarwin::%s() failed: %s", __FUNCTION__,
+              error.AsCString());
     return error;
   }
 
   auto mach_err = ::task_suspend(m_task);
   error.SetError(mach_err, eErrorTypeMachKernel);
   if (error.Fail() && log)
-    log->Printf("::task_suspend(target_task = 0x%4.4x)", m_task);
+    LLDB_LOGF(log, "::task_suspend(target_task = 0x%4.4x)", m_task);
 
   return error;
 }
@@ -1401,8 +1396,7 @@
   Status error;
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
-  if (log)
-    log->Printf("NativeProcessDarwin::%s() called", __FUNCTION__);
+  LLDB_LOGF(log, "NativeProcessDarwin::%s() called", __FUNCTION__);
 
   if (CanResume()) {
     m_thread_actions = resume_actions;
@@ -1412,10 +1406,10 @@
 
   auto state = GetState();
   if (state == eStateRunning) {
-    if (log)
-      log->Printf("NativeProcessDarwin::%s(): task 0x%x is already "
-                  "running, ignoring...",
-                  __FUNCTION__, TaskPortForProcessID(error));
+    LLDB_LOGF(log,
+              "NativeProcessDarwin::%s(): task 0x%x is already "
+              "running, ignoring...",
+              __FUNCTION__, TaskPortForProcessID(error));
     return error;
   }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp b/src/llvm-project/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp
index 89de92a..1faa5b2 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Darwin/NativeThreadListDarwin.cpp
@@ -301,10 +301,10 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
 
   std::lock_guard<std::recursive_mutex> locker(m_threads_mutex);
-  if (log)
-    log->Printf("NativeThreadListDarwin::%s() (pid = %" PRIu64 ", update = "
-                "%u) process stop count = %u",
-                __FUNCTION__, process.GetID(), update, process.GetStopID());
+  LLDB_LOGF(log,
+            "NativeThreadListDarwin::%s() (pid = %" PRIu64 ", update = "
+            "%u) process stop count = %u",
+            __FUNCTION__, process.GetID(), update, process.GetStopID());
 
   if (process.GetStopID() == 0) {
     // On our first stop, we'll record details like 32/64 bitness and select
@@ -346,11 +346,11 @@
     auto mach_err = ::task_threads(task, &thread_list, &thread_list_count);
     error.SetError(mach_err, eErrorTypeMachKernel);
     if (error.Fail()) {
-      if (log)
-        log->Printf("::task_threads(task = 0x%4.4x, thread_list => %p, "
-                    "thread_list_count => %u) failed: %u (%s)",
-                    task, thread_list, thread_list_count, error.GetError(),
-                    error.AsCString());
+      LLDB_LOGF(log,
+                "::task_threads(task = 0x%4.4x, thread_list => %p, "
+                "thread_list_count => %u) failed: %u (%s)",
+                task, thread_list, thread_list_count, error.GetError(),
+                error.AsCString());
       return 0;
     }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp b/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
index 7498355..0a49f96 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
@@ -288,9 +288,8 @@
 
 void FreeBSDThread::WillResume(lldb::StateType resume_state) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
-  if (log)
-    log->Printf("tid %lu resume_state = %s", GetID(),
-                lldb_private::StateAsCString(resume_state));
+  LLDB_LOGF(log, "tid %lu resume_state = %s", GetID(),
+            lldb_private::StateAsCString(resume_state));
   ProcessSP process_sp(GetProcess());
   ProcessFreeBSD *process = static_cast<ProcessFreeBSD *>(process_sp.get());
   int signo = GetResumeSignal();
@@ -322,9 +321,8 @@
   bool status;
 
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
-  if (log)
-    log->Printf("FreeBSDThread::%s (), resume_state = %s", __FUNCTION__,
-                StateAsCString(resume_state));
+  LLDB_LOGF(log, "FreeBSDThread::%s (), resume_state = %s", __FUNCTION__,
+            StateAsCString(resume_state));
 
   switch (resume_state) {
   default:
@@ -352,9 +350,8 @@
 
 void FreeBSDThread::Notify(const ProcessMessage &message) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
-  if (log)
-    log->Printf("FreeBSDThread::%s () message kind = '%s' for tid %" PRIu64,
-                __FUNCTION__, message.PrintKind(), GetID());
+  LLDB_LOGF(log, "FreeBSDThread::%s () message kind = '%s' for tid %" PRIu64,
+            __FUNCTION__, message.PrintKind(), GetID());
 
   switch (message.GetKind()) {
   default:
@@ -457,8 +454,7 @@
   // corresponding to our current PC.
   assert(GetRegisterContext());
   lldb::addr_t pc = GetRegisterContext()->GetPC();
-  if (log)
-    log->Printf("FreeBSDThread::%s () PC=0x%8.8" PRIx64, __FUNCTION__, pc);
+  LLDB_LOGF(log, "FreeBSDThread::%s () PC=0x%8.8" PRIx64, __FUNCTION__, pc);
   lldb::BreakpointSiteSP bp_site(
       GetProcess()->GetBreakpointSiteList().FindByAddress(pc));
 
@@ -490,10 +486,9 @@
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
 
   lldb::addr_t halt_addr = message.GetHWAddress();
-  if (log)
-    log->Printf(
-        "FreeBSDThread::%s () Hardware Watchpoint Address = 0x%8.8" PRIx64,
-        __FUNCTION__, halt_addr);
+  LLDB_LOGF(log,
+            "FreeBSDThread::%s () Hardware Watchpoint Address = 0x%8.8" PRIx64,
+            __FUNCTION__, halt_addr);
 
   POSIXBreakpointProtocol *reg_ctx = GetPOSIXBreakpointProtocol();
   if (reg_ctx) {
@@ -527,8 +522,7 @@
   // Try to resolve the breakpoint object corresponding to the current PC.
   assert(GetRegisterContext());
   lldb::addr_t pc = GetRegisterContext()->GetPC();
-  if (log)
-    log->Printf("FreeBSDThread::%s () PC=0x%8.8" PRIx64, __FUNCTION__, pc);
+  LLDB_LOGF(log, "FreeBSDThread::%s () PC=0x%8.8" PRIx64, __FUNCTION__, pc);
   lldb::BreakpointSiteSP bp_site(
       GetProcess()->GetBreakpointSiteList().FindByAddress(pc));
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp b/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
index 7707945..32e3320 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
@@ -154,9 +154,8 @@
     do_step = true;
   }
 
-  if (log)
-    log->Printf("process %" PRIu64 " resuming (%s)", GetID(),
-                do_step ? "step" : "continue");
+  LLDB_LOGF(log, "process %" PRIu64 " resuming (%s)", GetID(),
+            do_step ? "step" : "continue");
   if (do_step && !software_single_step)
     m_monitor->SingleStep(GetID(), m_resume_signo);
   else
@@ -168,9 +167,8 @@
 bool ProcessFreeBSD::UpdateThreadList(ThreadList &old_thread_list,
                                       ThreadList &new_thread_list) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessFreeBSD::%s (pid = %" PRIu64 ")", __FUNCTION__,
-                GetID());
+  LLDB_LOGF(log, "ProcessFreeBSD::%s (pid = %" PRIu64 ")", __FUNCTION__,
+            GetID());
 
   std::vector<lldb::pid_t> tds;
   if (!GetMonitor().GetCurrentThreadIDs(tds)) {
@@ -183,20 +181,18 @@
     ThreadSP thread_sp(old_thread_list_copy.RemoveThreadByID(tid, false));
     if (!thread_sp) {
       thread_sp.reset(new FreeBSDThread(*this, tid));
-      if (log)
-        log->Printf("ProcessFreeBSD::%s new tid = %" PRIu64, __FUNCTION__, tid);
+      LLDB_LOGF(log, "ProcessFreeBSD::%s new tid = %" PRIu64, __FUNCTION__,
+                tid);
     } else {
-      if (log)
-        log->Printf("ProcessFreeBSD::%s existing tid = %" PRIu64, __FUNCTION__,
-                    tid);
+      LLDB_LOGF(log, "ProcessFreeBSD::%s existing tid = %" PRIu64, __FUNCTION__,
+                tid);
     }
     new_thread_list.AddThread(thread_sp);
   }
   for (size_t i = 0; i < old_thread_list_copy.GetSize(false); ++i) {
     ThreadSP old_thread_sp(old_thread_list_copy.GetThreadAtIndex(i, false));
     if (old_thread_sp) {
-      if (log)
-        log->Printf("ProcessFreeBSD::%s remove tid", __FUNCTION__);
+      LLDB_LOGF(log, "ProcessFreeBSD::%s remove tid", __FUNCTION__);
     }
   }
 
@@ -698,14 +694,13 @@
     user_id_t watchID = wp->GetID();
     addr_t addr = wp->GetLoadAddress();
     Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_WATCHPOINTS));
-    if (log)
-      log->Printf("ProcessFreeBSD::EnableWatchpoint(watchID = %" PRIu64 ")",
-                  watchID);
+    LLDB_LOGF(log, "ProcessFreeBSD::EnableWatchpoint(watchID = %" PRIu64 ")",
+              watchID);
     if (wp->IsEnabled()) {
-      if (log)
-        log->Printf("ProcessFreeBSD::EnableWatchpoint(watchID = %" PRIu64
-                    ") addr = 0x%8.8" PRIx64 ": watchpoint already enabled.",
-                    watchID, (uint64_t)addr);
+      LLDB_LOGF(log,
+                "ProcessFreeBSD::EnableWatchpoint(watchID = %" PRIu64
+                ") addr = 0x%8.8" PRIx64 ": watchpoint already enabled.",
+                watchID, (uint64_t)addr);
       return error;
     }
 
@@ -753,14 +748,13 @@
     user_id_t watchID = wp->GetID();
     addr_t addr = wp->GetLoadAddress();
     Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_WATCHPOINTS));
-    if (log)
-      log->Printf("ProcessFreeBSD::DisableWatchpoint(watchID = %" PRIu64 ")",
-                  watchID);
+    LLDB_LOGF(log, "ProcessFreeBSD::DisableWatchpoint(watchID = %" PRIu64 ")",
+              watchID);
     if (!wp->IsEnabled()) {
-      if (log)
-        log->Printf("ProcessFreeBSD::DisableWatchpoint(watchID = %" PRIu64
-                    ") addr = 0x%8.8" PRIx64 ": watchpoint already disabled.",
-                    watchID, (uint64_t)addr);
+      LLDB_LOGF(log,
+                "ProcessFreeBSD::DisableWatchpoint(watchID = %" PRIu64
+                ") addr = 0x%8.8" PRIx64 ": watchpoint already disabled.",
+                watchID, (uint64_t)addr);
       // This is needed (for now) to keep watchpoints disabled correctly
       wp->SetEnabled(false, notify);
       return error;
@@ -970,8 +964,9 @@
 
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   if (log) {
-    log->Printf("ProcessFreeBSD::%s addr = 0x%" PRIx64, __FUNCTION__, addr);
-    log->Printf("SoftwareBreakpoint::%s addr = 0x%" PRIx64, __FUNCTION__, addr);
+    LLDB_LOGF(log, "ProcessFreeBSD::%s addr = 0x%" PRIx64, __FUNCTION__, addr);
+    LLDB_LOGF(log, "SoftwareBreakpoint::%s addr = 0x%" PRIx64, __FUNCTION__,
+              addr);
   }
 
   // Validate the address.
@@ -982,11 +977,10 @@
   Breakpoint *const sw_step_break =
       m_process->GetTarget().CreateBreakpoint(addr, true, false).get();
   sw_step_break->SetCallback(SingleStepBreakpointHit, this, true);
-  sw_step_break->SetBreakpointKind("software-signle-step");
+  sw_step_break->SetBreakpointKind("software-single-step");
 
-  if (log)
-    log->Printf("ProcessFreeBSD::%s addr = 0x%" PRIx64 " -- SUCCESS",
-                __FUNCTION__, addr);
+  LLDB_LOGF(log, "ProcessFreeBSD::%s addr = 0x%" PRIx64 " -- SUCCESS",
+            __FUNCTION__, addr);
 
   m_threads_stepping_with_breakpoint.insert({tid, sw_step_break->GetID()});
   return Status();
diff --git a/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp b/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
index 4b9225d..ff3fb0a 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp
@@ -37,9 +37,6 @@
 using namespace lldb;
 using namespace lldb_private;
 
-// We disable the tracing of ptrace calls for integration builds to avoid the
-// additional indirection and checks.
-#ifndef LLDB_CONFIGURATION_BUILDANDINTEGRATION
 // Wrapper for ptrace to catch errors and log calls.
 
 const char *Get_PT_IO_OP(int op) {
@@ -66,13 +63,14 @@
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PTRACE));
 
   if (log) {
-    log->Printf("ptrace(%s, %" PRIu64 ", %p, %x) called from file %s line %d",
-                reqName, pid, addr, data, file, line);
+    LLDB_LOGF(log,
+              "ptrace(%s, %" PRIu64 ", %p, %x) called from file %s line %d",
+              reqName, pid, addr, data, file, line);
     if (req == PT_IO) {
       struct ptrace_io_desc *pi = (struct ptrace_io_desc *)addr;
 
-      log->Printf("PT_IO: op=%s offs=%zx size=%zu", Get_PT_IO_OP(pi->piod_op),
-                  (size_t)pi->piod_offs, pi->piod_len);
+      LLDB_LOGF(log, "PT_IO: op=%s offs=%zx size=%zu",
+                Get_PT_IO_OP(pi->piod_op), (size_t)pi->piod_offs, pi->piod_len);
     }
   }
 
@@ -101,7 +99,7 @@
     default:
       str = "<unknown>";
     }
-    log->Printf("ptrace() failed; errno=%d (%s)", errno, str);
+    LLDB_LOGF(log, "ptrace() failed; errno=%d (%s)", errno, str);
   }
 
   if (log) {
@@ -109,15 +107,15 @@
     if (req == PT_GETREGS) {
       struct reg *r = (struct reg *)addr;
 
-      log->Printf("PT_GETREGS: rip=0x%lx rsp=0x%lx rbp=0x%lx rax=0x%lx",
-                  r->r_rip, r->r_rsp, r->r_rbp, r->r_rax);
+      LLDB_LOGF(log, "PT_GETREGS: rip=0x%lx rsp=0x%lx rbp=0x%lx rax=0x%lx",
+                r->r_rip, r->r_rsp, r->r_rbp, r->r_rax);
     }
     if (req == PT_GETDBREGS || req == PT_SETDBREGS) {
       struct dbreg *r = (struct dbreg *)addr;
       char setget = (req == PT_GETDBREGS) ? 'G' : 'S';
 
       for (int i = 0; i <= 7; i++)
-        log->Printf("PT_%cETDBREGS: dr[%d]=0x%lx", setget, i, r->dr[i]);
+        LLDB_LOGF(log, "PT_%cETDBREGS: dr[%d]=0x%lx", setget, i, r->dr[i]);
     }
 #endif
   }
@@ -136,9 +134,6 @@
 
 #define PTRACE(req, pid, addr, data)                                           \
   PtraceWrapper((req), (pid), (addr), (data), #req, __FILE__, __LINE__)
-#else
-PtraceWrapper((req), (pid), (addr), (data))
-#endif
 
 // Static implementations of ProcessMonitor::ReadMemory and
 // ProcessMonitor::WriteMemory.  This enables mutual recursion between these
@@ -708,7 +703,7 @@
     const lldb_private::ProcessLaunchInfo & /* launch_info */,
     lldb_private::Status &error)
     : m_process(static_cast<ProcessFreeBSD *>(process)),
-      m_operation_thread(nullptr), m_monitor_thread(nullptr), m_pid(LLDB_INVALID_PROCESS_ID), m_terminal_fd(-1), m_operation(0) {
+      m_operation_thread(), m_monitor_thread(), m_pid(LLDB_INVALID_PROCESS_ID), m_terminal_fd(-1), m_operation(0) {
   using namespace std::placeholders;
 
   std::unique_ptr<LaunchArgs> args(
@@ -735,20 +730,22 @@
   }
 
   // Finally, start monitoring the child process for change in state.
-  m_monitor_thread = Host::StartMonitoringChildProcess(
+  llvm::Expected<lldb_private::HostThread> monitor_thread =
+    Host::StartMonitoringChildProcess(
       std::bind(&ProcessMonitor::MonitorCallback, this, _1, _2, _3, _4),
       GetPID(), true);
-  if (!m_monitor_thread->IsJoinable()) {
+  if (!monitor_thread || !monitor_thread->IsJoinable()) {
     error.SetErrorToGenericError();
     error.SetErrorString("Process launch failed.");
     return;
   }
+  m_monitor_thread = *monitor_thread;
 }
 
 ProcessMonitor::ProcessMonitor(ProcessFreeBSD *process, lldb::pid_t pid,
                                lldb_private::Status &error)
     : m_process(static_cast<ProcessFreeBSD *>(process)),
-      m_operation_thread(nullptr), m_monitor_thread(nullptr), m_pid(pid), m_terminal_fd(-1), m_operation(0) {
+      m_operation_thread(), m_monitor_thread(), m_pid(pid), m_terminal_fd(-1), m_operation(0) {
   using namespace std::placeholders;
 
   sem_init(&m_operation_pending, 0, 0);
@@ -773,14 +770,16 @@
   }
 
   // Finally, start monitoring the child process for change in state.
-  m_monitor_thread = Host::StartMonitoringChildProcess(
+  llvm::Expected<lldb_private::HostThread> monitor_thread =
+    Host::StartMonitoringChildProcess(
       std::bind(&ProcessMonitor::MonitorCallback, this, _1, _2, _3, _4),
       GetPID(), true);
-  if (!m_monitor_thread->IsJoinable()) {
+  if (!monitor_thread || !monitor_thread->IsJoinable()) {
     error.SetErrorToGenericError();
     error.SetErrorString("Process attach failed.");
     return;
   }
+  m_monitor_thread = *monitor_thread;
 }
 
 ProcessMonitor::~ProcessMonitor() { StopMonitor(); }
@@ -789,13 +788,15 @@
 void ProcessMonitor::StartLaunchOpThread(LaunchArgs *args, Status &error) {
   static const char *g_thread_name = "lldb.process.freebsd.operation";
 
-  if (m_operation_thread->IsJoinable())
+  if (m_operation_thread && m_operation_thread->IsJoinable())
     return;
 
-  m_operation_thread =
-      ThreadLauncher::LaunchThread(g_thread_name, LaunchOpThread, args);
-  if (!m_operation_thread)
-     error = m_operation_thread.takeError();
+  llvm::Expected<lldb_private::HostThread> operation_thread =
+    ThreadLauncher::LaunchThread(g_thread_name, LaunchOpThread, args);
+  if (operation_thread)
+    m_operation_thread = *operation_thread;
+  else
+    error = operation_thread.takeError();
 }
 
 void *ProcessMonitor::LaunchOpThread(void *arg) {
@@ -957,14 +958,15 @@
                                          lldb_private::Status &error) {
   static const char *g_thread_name = "lldb.process.freebsd.operation";
 
-  if (m_operation_thread->IsJoinable())
+  if (m_operation_thread && m_operation_thread->IsJoinable())
     return;
 
-  m_operation_thread =
-      ThreadLauncher::LaunchThread(g_thread_name, AttachOpThread, args);
-
-  if (!m_operation_thread)
-	error = m_operation_thread.takeError();
+  llvm::Expected<lldb_private::HostThread> operation_thread =
+    ThreadLauncher::LaunchThread(g_thread_name, AttachOpThread, args);
+  if (operation_thread)
+    m_operation_thread = *operation_thread;
+  else
+    error = operation_thread.takeError();
 }
 
 void *ProcessMonitor::AttachOpThread(void *arg) {
@@ -1037,9 +1039,8 @@
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
 
   if (exited) {
-    if (log)
-      log->Printf("ProcessMonitor::%s() got exit signal, tid = %" PRIu64,
-                  __FUNCTION__, pid);
+    LLDB_LOGF(log, "ProcessMonitor::%s() got exit signal, tid = %" PRIu64,
+              __FUNCTION__, pid);
     message = ProcessMessage::Exit(pid, status);
     process->SendMessage(message);
     return pid == process->GetID();
@@ -1087,10 +1088,10 @@
     unsigned long data = 0;
     if (!monitor->GetEventMessage(tid, &data))
       data = -1;
-    if (log)
-      log->Printf("ProcessMonitor::%s() received exit? event, data = %lx, tid "
-                  "= %" PRIu64,
-                  __FUNCTION__, data, tid);
+    LLDB_LOGF(log,
+              "ProcessMonitor::%s() received exit? event, data = %lx, tid "
+              "= %" PRIu64,
+              __FUNCTION__, data, tid);
     message = ProcessMessage::Limbo(tid, (data >> 8));
     break;
   }
@@ -1101,26 +1102,25 @@
   // Map TRAP_CAP to a trace trap in the absense of a more specific handler.
   case TRAP_CAP:
 #endif
-    if (log)
-      log->Printf("ProcessMonitor::%s() received trace event, tid = %" PRIu64
-                  "  : si_code = %d",
-                  __FUNCTION__, tid, info->si_code);
+    LLDB_LOGF(log,
+              "ProcessMonitor::%s() received trace event, tid = %" PRIu64
+              "  : si_code = %d",
+              __FUNCTION__, tid, info->si_code);
     message = ProcessMessage::Trace(tid);
     break;
 
   case SI_KERNEL:
   case TRAP_BRKPT:
     if (monitor->m_process->IsSoftwareStepBreakpoint(tid)) {
-      if (log)
-        log->Printf("ProcessMonitor::%s() received sw single step breakpoint "
-                    "event, tid = %" PRIu64,
-                    __FUNCTION__, tid);
+      LLDB_LOGF(log,
+                "ProcessMonitor::%s() received sw single step breakpoint "
+                "event, tid = %" PRIu64,
+                __FUNCTION__, tid);
       message = ProcessMessage::Trace(tid);
     } else {
-      if (log)
-        log->Printf(
-            "ProcessMonitor::%s() received breakpoint event, tid = %" PRIu64,
-            __FUNCTION__, tid);
+      LLDB_LOGF(
+          log, "ProcessMonitor::%s() received breakpoint event, tid = %" PRIu64,
+          __FUNCTION__, tid);
       message = ProcessMessage::Break(tid);
     }
     break;
@@ -1146,22 +1146,19 @@
   //
   // Similarly, ACK signals generated by this monitor.
   if (info->si_code == SI_USER) {
-    if (log)
-      log->Printf(
-          "ProcessMonitor::%s() received signal %s with code %s, pid = %d",
-          __FUNCTION__,
-          monitor->m_process->GetUnixSignals()->GetSignalAsCString(signo),
-          "SI_USER", info->si_pid);
+    LLDB_LOGF(log,
+              "ProcessMonitor::%s() received signal %s with code %s, pid = %d",
+              __FUNCTION__,
+              monitor->m_process->GetUnixSignals()->GetSignalAsCString(signo),
+              "SI_USER", info->si_pid);
     if (info->si_pid == getpid())
       return ProcessMessage::SignalDelivered(tid, signo);
     else
       return ProcessMessage::Signal(tid, signo);
   }
 
-  if (log)
-    log->Printf(
-        "ProcessMonitor::%s() received signal %s", __FUNCTION__,
-        monitor->m_process->GetUnixSignals()->GetSignalAsCString(signo));
+  LLDB_LOGF(log, "ProcessMonitor::%s() received signal %s", __FUNCTION__,
+            monitor->m_process->GetUnixSignals()->GetSignalAsCString(signo));
 
   switch (signo) {
   case SIGSEGV:
@@ -1313,14 +1310,14 @@
         m_process->GetUnixSignals()->GetSignalAsCString(signo);
     if (signame == nullptr)
       signame = "<none>";
-    log->Printf("ProcessMonitor::%s() resuming pid %" PRIu64 " with signal %s",
-                __FUNCTION__, GetPID(), signame);
+    LLDB_LOGF(log,
+              "ProcessMonitor::%s() resuming pid %" PRIu64 " with signal %s",
+              __FUNCTION__, GetPID(), signame);
   }
   ResumeOperation op(signo, result);
   DoOperation(&op);
-  if (log)
-    log->Printf("ProcessMonitor::%s() resuming result = %s", __FUNCTION__,
-                result ? "true" : "false");
+  LLDB_LOGF(log, "ProcessMonitor::%s() resuming result = %s", __FUNCTION__,
+            result ? "true" : "false");
   return result;
 }
 
@@ -1384,7 +1381,7 @@
 }
 
 void ProcessMonitor::StopMonitoringChildProcess() {
-  if (m_monitor_thread->IsJoinable()) {
+  if (m_monitor_thread && m_monitor_thread->IsJoinable()) {
     m_monitor_thread->Cancel();
     m_monitor_thread->Join(nullptr);
     m_monitor_thread->Reset();
@@ -1422,10 +1419,9 @@
 bool ProcessMonitor::WaitForInitialTIDStop(lldb::tid_t tid) { return true; }
 
 void ProcessMonitor::StopOpThread() {
-  if (!m_operation_thread->IsJoinable())
-    return;
-
-  m_operation_thread->Cancel();
-  m_operation_thread->Join(nullptr);
-  m_operation_thread->Reset();
+  if (m_operation_thread && m_operation_thread->IsJoinable()) {
+    m_operation_thread->Cancel();
+    m_operation_thread->Join(nullptr);
+    m_operation_thread->Reset();
+  }
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h b/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h
index 2adcc44..c5edfc0 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h
@@ -183,8 +183,8 @@
 private:
   ProcessFreeBSD *m_process;
 
-  llvm::Expected<lldb_private::HostThread> m_operation_thread;
-  llvm::Expected<lldb_private::HostThread> m_monitor_thread;
+  llvm::Optional<lldb_private::HostThread> m_operation_thread;
+  llvm::Optional<lldb_private::HostThread> m_monitor_thread;
   lldb::pid_t m_pid;
 
   int m_terminal_fd;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
index c1da6f3..32be0ca 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
@@ -1591,7 +1591,7 @@
   if (m_threads.empty())
     SetCurrentThreadID(thread_id);
 
-  m_threads.push_back(llvm::make_unique<NativeThreadLinux>(*this, thread_id));
+  m_threads.push_back(std::make_unique<NativeThreadLinux>(*this, thread_id));
 
   if (m_pt_proces_trace_id != LLDB_INVALID_UID) {
     auto traceMonitor = ProcessorTraceMonitor::Create(
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
index 2f2ade0..3186b6c 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.cpp
@@ -34,7 +34,7 @@
   if (!reg_info)
     return Status("register %" PRIu32 " not found", reg_index);
 
-  return DoReadRegisterValue(reg_info->byte_offset, reg_info->name,
+  return DoReadRegisterValue(GetPtraceOffset(reg_index), reg_info->name,
                              reg_info->byte_size, reg_value);
 }
 
@@ -91,43 +91,30 @@
                   "for write register index %" PRIu32,
                   __FUNCTION__, reg_to_write);
 
-  return DoWriteRegisterValue(reg_info->byte_offset, reg_info->name, reg_value);
+  return DoWriteRegisterValue(GetPtraceOffset(reg_index), reg_info->name,
+                              reg_value);
 }
 
 Status NativeRegisterContextLinux::ReadGPR() {
-  void *buf = GetGPRBuffer();
-  if (!buf)
-    return Status("GPR buffer is NULL");
-  size_t buf_size = GetGPRSize();
-
-  return DoReadGPR(buf, buf_size);
+  return NativeProcessLinux::PtraceWrapper(
+      PTRACE_GETREGS, m_thread.GetID(), nullptr, GetGPRBuffer(), GetGPRSize());
 }
 
 Status NativeRegisterContextLinux::WriteGPR() {
-  void *buf = GetGPRBuffer();
-  if (!buf)
-    return Status("GPR buffer is NULL");
-  size_t buf_size = GetGPRSize();
-
-  return DoWriteGPR(buf, buf_size);
+  return NativeProcessLinux::PtraceWrapper(
+      PTRACE_SETREGS, m_thread.GetID(), nullptr, GetGPRBuffer(), GetGPRSize());
 }
 
 Status NativeRegisterContextLinux::ReadFPR() {
-  void *buf = GetFPRBuffer();
-  if (!buf)
-    return Status("FPR buffer is NULL");
-  size_t buf_size = GetFPRSize();
-
-  return DoReadFPR(buf, buf_size);
+  return NativeProcessLinux::PtraceWrapper(PTRACE_GETFPREGS, m_thread.GetID(),
+                                           nullptr, GetFPRBuffer(),
+                                           GetFPRSize());
 }
 
 Status NativeRegisterContextLinux::WriteFPR() {
-  void *buf = GetFPRBuffer();
-  if (!buf)
-    return Status("FPR buffer is NULL");
-  size_t buf_size = GetFPRSize();
-
-  return DoWriteFPR(buf, buf_size);
+  return NativeProcessLinux::PtraceWrapper(PTRACE_SETFPREGS, m_thread.GetID(),
+                                           nullptr, GetFPRBuffer(),
+                                           GetFPRSize());
 }
 
 Status NativeRegisterContextLinux::ReadRegisterSet(void *buf, size_t buf_size,
@@ -173,23 +160,3 @@
   return NativeProcessLinux::PtraceWrapper(
       PTRACE_POKEUSER, m_thread.GetID(), reinterpret_cast<void *>(offset), buf);
 }
-
-Status NativeRegisterContextLinux::DoReadGPR(void *buf, size_t buf_size) {
-  return NativeProcessLinux::PtraceWrapper(PTRACE_GETREGS, m_thread.GetID(),
-                                           nullptr, buf, buf_size);
-}
-
-Status NativeRegisterContextLinux::DoWriteGPR(void *buf, size_t buf_size) {
-  return NativeProcessLinux::PtraceWrapper(PTRACE_SETREGS, m_thread.GetID(),
-                                           nullptr, buf, buf_size);
-}
-
-Status NativeRegisterContextLinux::DoReadFPR(void *buf, size_t buf_size) {
-  return NativeProcessLinux::PtraceWrapper(PTRACE_GETFPREGS, m_thread.GetID(),
-                                           nullptr, buf, buf_size);
-}
-
-Status NativeRegisterContextLinux::DoWriteFPR(void *buf, size_t buf_size) {
-  return NativeProcessLinux::PtraceWrapper(PTRACE_SETFPREGS, m_thread.GetID(),
-                                           nullptr, buf, buf_size);
-}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
index 10f47ee..9a89a13 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux.h
@@ -28,6 +28,9 @@
   CreateHostNativeRegisterContextLinux(const ArchSpec &target_arch,
                                        NativeThreadProtocol &native_thread);
 
+  // Invalidates cached values in register context data structures
+  virtual void InvalidateAllRegisters(){}
+
 protected:
   lldb::ByteOrder GetByteOrder() const;
 
@@ -50,15 +53,19 @@
 
   virtual Status WriteFPR();
 
-  virtual void *GetGPRBuffer() { return nullptr; }
+  virtual void *GetGPRBuffer() = 0;
 
   virtual size_t GetGPRSize() {
     return GetRegisterInfoInterface().GetGPRSize();
   }
 
-  virtual void *GetFPRBuffer() { return nullptr; }
+  virtual void *GetFPRBuffer() = 0;
 
-  virtual size_t GetFPRSize() { return 0; }
+  virtual size_t GetFPRSize() = 0;
+
+  virtual uint32_t GetPtraceOffset(uint32_t reg_index) {
+    return GetRegisterInfoAtIndex(reg_index)->byte_offset;
+  }
 
   // The Do*** functions are executed on the privileged thread and can perform
   // ptrace
@@ -68,14 +75,6 @@
 
   virtual Status DoWriteRegisterValue(uint32_t offset, const char *reg_name,
                                       const RegisterValue &value);
-
-  virtual Status DoReadGPR(void *buf, size_t buf_size);
-
-  virtual Status DoWriteGPR(void *buf, size_t buf_size);
-
-  virtual Status DoReadFPR(void *buf, size_t buf_size);
-
-  virtual Status DoWriteFPR(void *buf, size_t buf_size);
 };
 
 } // namespace process_linux
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
index d720619..f9002cc 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.cpp
@@ -97,7 +97,7 @@
 std::unique_ptr<NativeRegisterContextLinux>
 NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
     const ArchSpec &target_arch, NativeThreadProtocol &native_thread) {
-  return llvm::make_unique<NativeRegisterContextLinux_arm>(target_arch,
+  return std::make_unique<NativeRegisterContextLinux_arm>(target_arch,
                                                            native_thread);
 }
 
@@ -346,8 +346,7 @@
 uint32_t NativeRegisterContextLinux_arm::NumSupportedHardwareBreakpoints() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
-  if (log)
-    log->Printf("NativeRegisterContextLinux_arm::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "NativeRegisterContextLinux_arm::%s()", __FUNCTION__);
 
   Status error;
 
@@ -458,8 +457,7 @@
     uint32_t &bp_index, lldb::addr_t trap_addr) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
-  if (log)
-    log->Printf("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
   lldb::addr_t break_addr;
 
@@ -479,8 +477,7 @@
 Status NativeRegisterContextLinux_arm::ClearAllHardwareBreakpoints() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
-  if (log)
-    log->Printf("NativeRegisterContextLinux_arm::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "NativeRegisterContextLinux_arm::%s()", __FUNCTION__);
 
   Status error;
 
@@ -870,7 +867,7 @@
   if (offset + sizeof(uint32_t) > sizeof(m_gpr_arm))
     return Status("Register isn't fit into the size of the GPR area");
 
-  Status error = DoReadGPR(m_gpr_arm, sizeof(m_gpr_arm));
+  Status error = ReadGPR();
   if (error.Fail())
     return error;
 
@@ -889,7 +886,7 @@
   if (offset + sizeof(uint32_t) > sizeof(m_gpr_arm))
     return Status("Register isn't fit into the size of the GPR area");
 
-  Status error = DoReadGPR(m_gpr_arm, sizeof(m_gpr_arm));
+  Status error = ReadGPR();
   if (error.Fail())
     return error;
 
@@ -907,56 +904,58 @@
   }
 
   m_gpr_arm[offset / sizeof(uint32_t)] = reg_value;
-  return DoWriteGPR(m_gpr_arm, sizeof(m_gpr_arm));
+  return WriteGPR();
 }
 
-Status NativeRegisterContextLinux_arm::DoReadGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm::ReadGPR() {
 #ifdef __arm__
-  return NativeRegisterContextLinux::DoReadGPR(buf, buf_size);
+  return NativeRegisterContextLinux::ReadGPR();
 #else  // __aarch64__
   struct iovec ioVec;
-  ioVec.iov_base = buf;
-  ioVec.iov_len = buf_size;
+  ioVec.iov_base = GetGPRBuffer();
+  ioVec.iov_len = GetGPRSize();
 
-  return ReadRegisterSet(&ioVec, buf_size, NT_PRSTATUS);
+  return ReadRegisterSet(&ioVec, GetGPRSize(), NT_PRSTATUS);
 #endif // __arm__
 }
 
-Status NativeRegisterContextLinux_arm::DoWriteGPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm::WriteGPR() {
 #ifdef __arm__
-  return NativeRegisterContextLinux::DoWriteGPR(buf, buf_size);
+  return NativeRegisterContextLinux::WriteGPR();
 #else  // __aarch64__
   struct iovec ioVec;
-  ioVec.iov_base = buf;
-  ioVec.iov_len = buf_size;
+  ioVec.iov_base = GetGPRBuffer();
+  ioVec.iov_len = GetGPRSize();
 
-  return WriteRegisterSet(&ioVec, buf_size, NT_PRSTATUS);
+  return WriteRegisterSet(&ioVec, GetGPRSize(), NT_PRSTATUS);
 #endif // __arm__
 }
 
-Status NativeRegisterContextLinux_arm::DoReadFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm::ReadFPR() {
 #ifdef __arm__
   return NativeProcessLinux::PtraceWrapper(PTRACE_GETVFPREGS, m_thread.GetID(),
-                                           nullptr, buf, buf_size);
+                                           nullptr, GetFPRBuffer(),
+                                           GetFPRSize());
 #else  // __aarch64__
   struct iovec ioVec;
-  ioVec.iov_base = buf;
-  ioVec.iov_len = buf_size;
+  ioVec.iov_base = GetFPRBuffer();
+  ioVec.iov_len = GetFPRSize();
 
-  return ReadRegisterSet(&ioVec, buf_size, NT_ARM_VFP);
+  return ReadRegisterSet(&ioVec, GetFPRSize(), NT_ARM_VFP);
 #endif // __arm__
 }
 
-Status NativeRegisterContextLinux_arm::DoWriteFPR(void *buf, size_t buf_size) {
+Status NativeRegisterContextLinux_arm::WriteFPR() {
 #ifdef __arm__
   return NativeProcessLinux::PtraceWrapper(PTRACE_SETVFPREGS, m_thread.GetID(),
-                                           nullptr, buf, buf_size);
+                                           nullptr, GetFPRBuffer(),
+                                           GetFPRSize());
 #else  // __aarch64__
   struct iovec ioVec;
-  ioVec.iov_base = buf;
-  ioVec.iov_len = buf_size;
+  ioVec.iov_base = GetFPRBuffer();
+  ioVec.iov_len = GetFPRSize();
 
-  return WriteRegisterSet(&ioVec, buf_size, NT_ARM_VFP);
+  return WriteRegisterSet(&ioVec, GetFPRSize(), NT_ARM_VFP);
 #endif // __arm__
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
index d64bcdc..6bd4db5 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm.h
@@ -83,13 +83,13 @@
   Status DoWriteRegisterValue(uint32_t offset, const char *reg_name,
                               const RegisterValue &value) override;
 
-  Status DoReadGPR(void *buf, size_t buf_size) override;
+  Status ReadGPR() override;
 
-  Status DoWriteGPR(void *buf, size_t buf_size) override;
+  Status WriteGPR() override;
 
-  Status DoReadFPR(void *buf, size_t buf_size) override;
+  Status ReadFPR() override;
 
-  Status DoWriteFPR(void *buf, size_t buf_size) override;
+  Status WriteFPR() override;
 
   void *GetGPRBuffer() override { return &m_gpr_arm; }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
index 9bb9e6b..ea7337b 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
@@ -112,10 +112,10 @@
     const ArchSpec &target_arch, NativeThreadProtocol &native_thread) {
   switch (target_arch.GetMachine()) {
   case llvm::Triple::arm:
-    return llvm::make_unique<NativeRegisterContextLinux_arm>(target_arch,
+    return std::make_unique<NativeRegisterContextLinux_arm>(target_arch,
                                                              native_thread);
   case llvm::Triple::aarch64:
-    return llvm::make_unique<NativeRegisterContextLinux_arm64>(target_arch,
+    return std::make_unique<NativeRegisterContextLinux_arm64>(target_arch,
                                                                native_thread);
   default:
     llvm_unreachable("have no register context for architecture");
@@ -152,6 +152,9 @@
   m_max_hwp_supported = 16;
   m_max_hbp_supported = 16;
   m_refresh_hwdebug_info = true;
+
+  m_gpr_is_valid = false;
+  m_fpu_is_valid = false;
 }
 
 uint32_t NativeRegisterContextLinux_arm64::GetRegisterSetCount() const {
@@ -185,41 +188,39 @@
 
   const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
 
-  if (IsFPR(reg)) {
-    error = ReadFPR();
-    if (error.Fail())
-      return error;
-  } else {
-    uint32_t full_reg = reg;
-    bool is_subreg = reg_info->invalidate_regs &&
-                     (reg_info->invalidate_regs[0] != LLDB_INVALID_REGNUM);
+  if (reg == LLDB_INVALID_REGNUM)
+    return Status("no lldb regnum for %s", reg_info && reg_info->name
+                                               ? reg_info->name
+                                               : "<unknown register>");
 
-    if (is_subreg) {
-      // Read the full aligned 64-bit register.
-      full_reg = reg_info->invalidate_regs[0];
+  uint8_t *src;
+  uint32_t offset;
+
+  if (IsGPR(reg)) {
+    if (!m_gpr_is_valid) {
+      error = ReadGPR();
+      if (error.Fail())
+        return error;
     }
 
-    error = ReadRegisterRaw(full_reg, reg_value);
+    offset = reg_info->byte_offset;
+    assert(offset < GetGPRSize());
+    src = (uint8_t *)GetGPRBuffer() + offset;
 
-    if (error.Success()) {
-      // If our read was not aligned (for ah,bh,ch,dh), shift our returned
-      // value one byte to the right.
-      if (is_subreg && (reg_info->byte_offset & 0x1))
-        reg_value.SetUInt64(reg_value.GetAsUInt64() >> 8);
+  } else if (IsFPR(reg)) {
+    if (!m_fpu_is_valid) {
 
-      // If our return byte size was greater than the return value reg size,
-      // then use the type specified by reg_info rather than the uint64_t
-      // default
-      if (reg_value.GetByteSize() > reg_info->byte_size)
-        reg_value.SetType(reg_info);
+      error = ReadFPR();
+      if (error.Fail())
+        return error;
     }
-    return error;
-  }
+    offset = CalculateFprOffset(reg_info);
+    assert(offset < GetFPRSize());
+    src = (uint8_t *)GetFPRBuffer() + offset;
+  } else
+    return Status("failed - register wasn't recognized to be a GPR or an FPR, "
+                  "write strategy unknown");
 
-  // Get pointer to m_fpr variable and set the data from it.
-  uint32_t fpr_offset = CalculateFprOffset(reg_info);
-  assert(fpr_offset < sizeof m_fpr);
-  uint8_t *src = (uint8_t *)&m_fpr + fpr_offset;
   reg_value.SetFromMemoryData(reg_info, src, reg_info->byte_size,
                               eByteOrderLittle, error);
 
@@ -228,48 +229,51 @@
 
 Status NativeRegisterContextLinux_arm64::WriteRegister(
     const RegisterInfo *reg_info, const RegisterValue &reg_value) {
+  Status error;
+
   if (!reg_info)
     return Status("reg_info NULL");
 
-  const uint32_t reg_index = reg_info->kinds[lldb::eRegisterKindLLDB];
-  if (reg_index == LLDB_INVALID_REGNUM)
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+
+  if (reg == LLDB_INVALID_REGNUM)
     return Status("no lldb regnum for %s", reg_info && reg_info->name
                                                ? reg_info->name
                                                : "<unknown register>");
 
-  if (IsGPR(reg_index))
-    return WriteRegisterRaw(reg_index, reg_value);
+  uint8_t *dst;
+  uint32_t offset;
 
-  if (IsFPR(reg_index)) {
-    // Get pointer to m_fpr variable and set the data to it.
-    uint32_t fpr_offset = CalculateFprOffset(reg_info);
-    assert(fpr_offset < sizeof m_fpr);
-    uint8_t *dst = (uint8_t *)&m_fpr + fpr_offset;
-    switch (reg_info->byte_size) {
-    case 2:
-      *(uint16_t *)dst = reg_value.GetAsUInt16();
-      break;
-    case 4:
-      *(uint32_t *)dst = reg_value.GetAsUInt32();
-      break;
-    case 8:
-      *(uint64_t *)dst = reg_value.GetAsUInt64();
-      break;
-    default:
-      assert(false && "Unhandled data size.");
-      return Status("unhandled register data size %" PRIu32,
-                    reg_info->byte_size);
+  if (IsGPR(reg)) {
+    if (!m_gpr_is_valid) {
+      error = ReadGPR();
+      if (error.Fail())
+        return error;
     }
 
-    Status error = WriteFPR();
-    if (error.Fail())
-      return error;
+    offset = reg_info->byte_offset;
+    assert(offset < GetGPRSize());
+    dst = (uint8_t *)GetGPRBuffer() + offset;
 
-    return Status();
+    ::memcpy(dst, reg_value.GetBytes(), reg_info->byte_size);
+
+    return WriteGPR();
+  } else if (IsFPR(reg)) {
+    if (!m_fpu_is_valid) {
+      error = ReadFPR();
+      if (error.Fail())
+        return error;
+    }
+    offset = CalculateFprOffset(reg_info);
+    assert(offset < GetFPRSize());
+    dst = (uint8_t *)GetFPRBuffer() + offset;
+
+    ::memcpy(dst, reg_value.GetBytes(), reg_info->byte_size);
+
+    return WriteFPR();
   }
 
-  return Status("failed - register wasn't recognized to be a GPR or an FPR, "
-                "write strategy unknown");
+  return error;
 }
 
 Status NativeRegisterContextLinux_arm64::ReadAllRegisterValues(
@@ -277,18 +281,21 @@
   Status error;
 
   data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
-  error = ReadGPR();
-  if (error.Fail())
-    return error;
+  if (!m_gpr_is_valid) {
+    error = ReadGPR();
+    if (error.Fail())
+      return error;
+  }
 
-  error = ReadFPR();
-  if (error.Fail())
-    return error;
-
+  if (!m_fpu_is_valid) {
+    error = ReadFPR();
+    if (error.Fail())
+      return error;
+  }
   uint8_t *dst = data_sp->GetBytes();
-  ::memcpy(dst, &m_gpr_arm64, GetGPRSize());
+  ::memcpy(dst, GetGPRBuffer(), GetGPRSize());
   dst += GetGPRSize();
-  ::memcpy(dst, &m_fpr, sizeof(m_fpr));
+  ::memcpy(dst, GetFPRBuffer(), GetFPRSize());
 
   return error;
 }
@@ -320,14 +327,14 @@
                                    __FUNCTION__);
     return error;
   }
-  ::memcpy(&m_gpr_arm64, src, GetRegisterInfoInterface().GetGPRSize());
+  ::memcpy(GetGPRBuffer(), src, GetRegisterInfoInterface().GetGPRSize());
 
   error = WriteGPR();
   if (error.Fail())
     return error;
 
   src += GetRegisterInfoInterface().GetGPRSize();
-  ::memcpy(&m_fpr, src, sizeof(m_fpr));
+  ::memcpy(GetFPRBuffer(), src, GetFPRSize());
 
   error = WriteFPR();
   if (error.Fail())
@@ -347,8 +354,7 @@
 uint32_t NativeRegisterContextLinux_arm64::NumSupportedHardwareBreakpoints() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
-  if (log)
-    log->Printf("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
   Status error;
 
@@ -458,8 +464,7 @@
     uint32_t &bp_index, lldb::addr_t trap_addr) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
-  if (log)
-    log->Printf("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
   lldb::addr_t break_addr;
 
@@ -479,8 +484,7 @@
 Status NativeRegisterContextLinux_arm64::ClearAllHardwareBreakpoints() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_BREAKPOINTS));
 
-  if (log)
-    log->Printf("NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "NativeRegisterContextLinux_arm64::%s()", __FUNCTION__);
 
   Status error;
 
@@ -835,133 +839,63 @@
                                            &hwbType, &ioVec, ioVec.iov_len);
 }
 
-Status NativeRegisterContextLinux_arm64::DoReadRegisterValue(
-    uint32_t offset, const char *reg_name, uint32_t size,
-    RegisterValue &value) {
+Status NativeRegisterContextLinux_arm64::ReadGPR() {
   Status error;
-  if (offset > sizeof(struct user_pt_regs)) {
-    offset -= sizeof(struct user_pt_regs);
-    if (offset > sizeof(struct user_fpsimd_state)) {
-      error.SetErrorString("invalid offset value");
-      return error;
-    }
-    elf_fpregset_t regs;
-    int regset = NT_FPREGSET;
-    struct iovec ioVec;
 
-    ioVec.iov_base = &regs;
-    ioVec.iov_len = sizeof regs;
-    error = NativeProcessLinux::PtraceWrapper(
-        PTRACE_GETREGSET, m_thread.GetID(), &regset, &ioVec, sizeof regs);
-    if (error.Success()) {
-      value.SetBytes((void *)(((unsigned char *)(&regs)) + offset), 16,
-                     m_thread.GetProcess().GetByteOrder());
-    }
-  } else {
-    elf_gregset_t regs;
-    int regset = NT_PRSTATUS;
-    struct iovec ioVec;
+  struct iovec ioVec;
 
-    ioVec.iov_base = &regs;
-    ioVec.iov_len = sizeof regs;
-    error = NativeProcessLinux::PtraceWrapper(
-        PTRACE_GETREGSET, m_thread.GetID(), &regset, &ioVec, sizeof regs);
-    if (error.Success()) {
-      value.SetBytes((void *)(((unsigned char *)(regs)) + offset), 8,
-                     m_thread.GetProcess().GetByteOrder());
-    }
-  }
+  ioVec.iov_base = GetGPRBuffer();
+  ioVec.iov_len = GetGPRSize();
+
+  error = ReadRegisterSet(&ioVec, GetGPRSize(), NT_PRSTATUS);
+
+  if (error.Success())
+    m_gpr_is_valid = true;
+
   return error;
 }
 
-Status NativeRegisterContextLinux_arm64::DoWriteRegisterValue(
-    uint32_t offset, const char *reg_name, const RegisterValue &value) {
+Status NativeRegisterContextLinux_arm64::WriteGPR() {
+  struct iovec ioVec;
+
+  m_gpr_is_valid = false;
+
+  ioVec.iov_base = GetGPRBuffer();
+  ioVec.iov_len = GetGPRSize();
+
+  return WriteRegisterSet(&ioVec, GetGPRSize(), NT_PRSTATUS);
+}
+
+Status NativeRegisterContextLinux_arm64::ReadFPR() {
   Status error;
-  ::pid_t tid = m_thread.GetID();
-  if (offset > sizeof(struct user_pt_regs)) {
-    offset -= sizeof(struct user_pt_regs);
-    if (offset > sizeof(struct user_fpsimd_state)) {
-      error.SetErrorString("invalid offset value");
-      return error;
-    }
-    elf_fpregset_t regs;
-    int regset = NT_FPREGSET;
-    struct iovec ioVec;
 
-    ioVec.iov_base = &regs;
-    ioVec.iov_len = sizeof regs;
-    error = NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET, tid, &regset,
-                                              &ioVec, sizeof regs);
+  struct iovec ioVec;
 
-    if (error.Success()) {
-      ::memcpy((void *)(((unsigned char *)(&regs)) + offset), value.GetBytes(),
-               16);
-      error = NativeProcessLinux::PtraceWrapper(PTRACE_SETREGSET, tid, &regset,
-                                                &ioVec, sizeof regs);
-    }
-  } else {
-    elf_gregset_t regs;
-    int regset = NT_PRSTATUS;
-    struct iovec ioVec;
+  ioVec.iov_base = GetFPRBuffer();
+  ioVec.iov_len = GetFPRSize();
 
-    ioVec.iov_base = &regs;
-    ioVec.iov_len = sizeof regs;
-    error = NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET, tid, &regset,
-                                              &ioVec, sizeof regs);
-    if (error.Success()) {
-      ::memcpy((void *)(((unsigned char *)(&regs)) + offset), value.GetBytes(),
-               8);
-      error = NativeProcessLinux::PtraceWrapper(PTRACE_SETREGSET, tid, &regset,
-                                                &ioVec, sizeof regs);
-    }
-  }
+  error = ReadRegisterSet(&ioVec, GetFPRSize(), NT_FPREGSET);
+
+  if (error.Success())
+    m_fpu_is_valid = true;
+
   return error;
 }
 
-Status NativeRegisterContextLinux_arm64::DoReadGPR(void *buf, size_t buf_size) {
-  int regset = NT_PRSTATUS;
+Status NativeRegisterContextLinux_arm64::WriteFPR() {
   struct iovec ioVec;
-  Status error;
 
-  ioVec.iov_base = buf;
-  ioVec.iov_len = buf_size;
-  return NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET, m_thread.GetID(),
-                                           &regset, &ioVec, buf_size);
+  m_fpu_is_valid = false;
+
+  ioVec.iov_base = GetFPRBuffer();
+  ioVec.iov_len = GetFPRSize();
+
+  return WriteRegisterSet(&ioVec, GetFPRSize(), NT_FPREGSET);
 }
 
-Status NativeRegisterContextLinux_arm64::DoWriteGPR(void *buf,
-                                                    size_t buf_size) {
-  int regset = NT_PRSTATUS;
-  struct iovec ioVec;
-  Status error;
-
-  ioVec.iov_base = buf;
-  ioVec.iov_len = buf_size;
-  return NativeProcessLinux::PtraceWrapper(PTRACE_SETREGSET, m_thread.GetID(),
-                                           &regset, &ioVec, buf_size);
-}
-
-Status NativeRegisterContextLinux_arm64::DoReadFPR(void *buf, size_t buf_size) {
-  int regset = NT_FPREGSET;
-  struct iovec ioVec;
-  Status error;
-
-  ioVec.iov_base = buf;
-  ioVec.iov_len = buf_size;
-  return NativeProcessLinux::PtraceWrapper(PTRACE_GETREGSET, m_thread.GetID(),
-                                           &regset, &ioVec, buf_size);
-}
-
-Status NativeRegisterContextLinux_arm64::DoWriteFPR(void *buf,
-                                                    size_t buf_size) {
-  int regset = NT_FPREGSET;
-  struct iovec ioVec;
-  Status error;
-
-  ioVec.iov_base = buf;
-  ioVec.iov_len = buf_size;
-  return NativeProcessLinux::PtraceWrapper(PTRACE_SETREGSET, m_thread.GetID(),
-                                           &regset, &ioVec, buf_size);
+void NativeRegisterContextLinux_arm64::InvalidateAllRegisters() {
+  m_gpr_is_valid = false;
+  m_fpu_is_valid = false;
 }
 
 uint32_t NativeRegisterContextLinux_arm64::CalculateFprOffset(
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
index 005843e..f7c501a 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
@@ -40,6 +40,8 @@
 
   Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
 
+  void InvalidateAllRegisters() override;
+
   // Hardware breakpoints/watchpoint management functions
 
   uint32_t NumSupportedHardwareBreakpoints() override;
@@ -77,19 +79,14 @@
   enum DREGType { eDREGTypeWATCH = 0, eDREGTypeBREAK };
 
 protected:
-  Status DoReadRegisterValue(uint32_t offset, const char *reg_name,
-                             uint32_t size, RegisterValue &value) override;
 
-  Status DoWriteRegisterValue(uint32_t offset, const char *reg_name,
-                              const RegisterValue &value) override;
+  Status ReadGPR() override;
 
-  Status DoReadGPR(void *buf, size_t buf_size) override;
+  Status WriteGPR() override;
 
-  Status DoWriteGPR(void *buf, size_t buf_size) override;
+  Status ReadFPR() override;
 
-  Status DoReadFPR(void *buf, size_t buf_size) override;
-
-  Status DoWriteFPR(void *buf, size_t buf_size) override;
+  Status WriteFPR() override;
 
   void *GetGPRBuffer() override { return &m_gpr_arm64; }
 
@@ -125,8 +122,17 @@
     uint32_t fpcr;
   };
 
-  uint64_t m_gpr_arm64[k_num_gpr_registers_arm64]; // 64-bit general purpose
-                                                   // registers.
+  struct GPR {
+    uint64_t x[31];
+    uint64_t sp;
+    uint64_t pc;
+    uint64_t pstate;
+  };
+
+  bool m_gpr_is_valid;
+  bool m_fpu_is_valid;
+
+  GPR m_gpr_arm64; // 64-bit general purpose registers.
   RegInfo m_reg_info;
   FPU m_fpr; // floating-point registers including extended register sets.
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
index 6e4fe59..d456cbb 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_mips64.cpp
@@ -79,7 +79,7 @@
 std::unique_ptr<NativeRegisterContextLinux>
 NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
     const ArchSpec &target_arch, NativeThreadProtocol &native_thread) {
-  return llvm::make_unique<NativeRegisterContextLinux_mips64>(target_arch,
+  return std::make_unique<NativeRegisterContextLinux_mips64>(target_arch,
                                                               native_thread);
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
index 11cf1a2..2eb60cf 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
@@ -118,7 +118,7 @@
     const ArchSpec &target_arch, NativeThreadProtocol &native_thread) {
   switch (target_arch.GetMachine()) {
   case llvm::Triple::ppc64le:
-    return llvm::make_unique<NativeRegisterContextLinux_ppc64le>(target_arch,
+    return std::make_unique<NativeRegisterContextLinux_ppc64le>(target_arch,
                                                                  native_thread);
   default:
     llvm_unreachable("have no register context for architecture");
@@ -445,34 +445,6 @@
   return (k_first_fpr_ppc64le <= reg && reg <= k_last_fpr_ppc64le);
 }
 
-Status NativeRegisterContextLinux_ppc64le::DoReadGPR(
-    void *buf, size_t buf_size) {
-  int regset = NT_PRSTATUS;
-  return NativeProcessLinux::PtraceWrapper(PTRACE_GETREGS, m_thread.GetID(),
-                                           &regset, buf, buf_size);
-}
-
-Status NativeRegisterContextLinux_ppc64le::DoWriteGPR(
-    void *buf, size_t buf_size) {
-  int regset = NT_PRSTATUS;
-  return NativeProcessLinux::PtraceWrapper(PTRACE_SETREGS, m_thread.GetID(),
-                                           &regset, buf, buf_size);
-}
-
-Status NativeRegisterContextLinux_ppc64le::DoReadFPR(void *buf,
-                                                     size_t buf_size) {
-  int regset = NT_FPREGSET;
-  return NativeProcessLinux::PtraceWrapper(PTRACE_GETFPREGS, m_thread.GetID(),
-                                           &regset, buf, buf_size);
-}
-
-Status NativeRegisterContextLinux_ppc64le::DoWriteFPR(void *buf,
-                                                      size_t buf_size) {
-  int regset = NT_FPREGSET;
-  return NativeProcessLinux::PtraceWrapper(PTRACE_SETFPREGS, m_thread.GetID(),
-                                           &regset, buf, buf_size);
-}
-
 uint32_t NativeRegisterContextLinux_ppc64le::CalculateFprOffset(
     const RegisterInfo *reg_info) const {
   return reg_info->byte_offset -
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
index 37f9f5f..2f2a92e 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.h
@@ -68,14 +68,6 @@
   bool WatchpointIsEnabled(uint32_t wp_index);
 
 protected:
-  Status DoReadGPR(void *buf, size_t buf_size) override;
-
-  Status DoWriteGPR(void *buf, size_t buf_size) override;
-
-  Status DoReadFPR(void *buf, size_t buf_size) override;
-
-  Status DoWriteFPR(void *buf, size_t buf_size) override;
-
   bool IsVMX(unsigned reg);
 
   bool IsVSX(unsigned reg);
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
index b44bb93..966147b 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.cpp
@@ -18,7 +18,6 @@
 
 #include "Plugins/Process/Utility/RegisterContextLinux_s390x.h"
 
-#include <asm/ptrace.h>
 #include <linux/uio.h>
 #include <sys/ptrace.h>
 
@@ -95,7 +94,7 @@
 std::unique_ptr<NativeRegisterContextLinux>
 NativeRegisterContextLinux::CreateHostNativeRegisterContextLinux(
     const ArchSpec &target_arch, NativeThreadProtocol &native_thread) {
-  return llvm::make_unique<NativeRegisterContextLinux_s390x>(target_arch,
+  return std::make_unique<NativeRegisterContextLinux_s390x>(target_arch,
                                                              native_thread);
 }
 
@@ -196,13 +195,12 @@
                   reg_info->name);
 
   if (IsGPR(reg)) {
-    s390_regs regs;
-    Status error = DoReadGPR(&regs, sizeof(regs));
+    Status error = ReadGPR();
     if (error.Fail())
       return error;
 
-    uint8_t *src = (uint8_t *)&regs + reg_info->byte_offset;
-    assert(reg_info->byte_offset + reg_info->byte_size <= sizeof(regs));
+    uint8_t *src = (uint8_t *)&m_regs + reg_info->byte_offset;
+    assert(reg_info->byte_offset + reg_info->byte_size <= sizeof(m_regs));
     switch (reg_info->byte_size) {
     case 4:
       reg_value.SetUInt32(*(uint32_t *)src);
@@ -218,14 +216,13 @@
   }
 
   if (IsFPR(reg)) {
-    s390_fp_regs fp_regs;
-    Status error = DoReadFPR(&fp_regs, sizeof(fp_regs));
+    Status error = ReadFPR();
     if (error.Fail())
       return error;
 
     // byte_offset is just the offset within FPR, not the whole user area.
-    uint8_t *src = (uint8_t *)&fp_regs + reg_info->byte_offset;
-    assert(reg_info->byte_offset + reg_info->byte_size <= sizeof(fp_regs));
+    uint8_t *src = (uint8_t *)&m_fp_regs + reg_info->byte_offset;
+    assert(reg_info->byte_offset + reg_info->byte_size <= sizeof(m_fp_regs));
     switch (reg_info->byte_size) {
     case 4:
       reg_value.SetUInt32(*(uint32_t *)src);
@@ -275,13 +272,12 @@
                   reg_info->name);
 
   if (IsGPR(reg)) {
-    s390_regs regs;
-    Status error = DoReadGPR(&regs, sizeof(regs));
+    Status error = ReadGPR();
     if (error.Fail())
       return error;
 
-    uint8_t *dst = (uint8_t *)&regs + reg_info->byte_offset;
-    assert(reg_info->byte_offset + reg_info->byte_size <= sizeof(regs));
+    uint8_t *dst = (uint8_t *)&m_regs + reg_info->byte_offset;
+    assert(reg_info->byte_offset + reg_info->byte_size <= sizeof(m_regs));
     switch (reg_info->byte_size) {
     case 4:
       *(uint32_t *)dst = reg_value.GetAsUInt32();
@@ -293,18 +289,17 @@
       assert(false && "Unhandled data size.");
       return Status("unhandled byte size: %" PRIu32, reg_info->byte_size);
     }
-    return DoWriteGPR(&regs, sizeof(regs));
+    return WriteGPR();
   }
 
   if (IsFPR(reg)) {
-    s390_fp_regs fp_regs;
-    Status error = DoReadFPR(&fp_regs, sizeof(fp_regs));
+    Status error = ReadFPR();
     if (error.Fail())
       return error;
 
     // byte_offset is just the offset within fp_regs, not the whole user area.
-    uint8_t *dst = (uint8_t *)&fp_regs + reg_info->byte_offset;
-    assert(reg_info->byte_offset + reg_info->byte_size <= sizeof(fp_regs));
+    uint8_t *dst = (uint8_t *)&m_fp_regs + reg_info->byte_offset;
+    assert(reg_info->byte_offset + reg_info->byte_size <= sizeof(m_fp_regs));
     switch (reg_info->byte_size) {
     case 4:
       *(uint32_t *)dst = reg_value.GetAsUInt32();
@@ -316,7 +311,7 @@
       assert(false && "Unhandled data size.");
       return Status("unhandled byte size: %" PRIu32, reg_info->byte_size);
     }
-    return DoWriteFPR(&fp_regs, sizeof(fp_regs));
+    return WriteFPR();
   }
 
   if (reg == lldb_last_break_s390x) {
@@ -337,15 +332,17 @@
 
   data_sp.reset(new DataBufferHeap(REG_CONTEXT_SIZE, 0));
   uint8_t *dst = data_sp->GetBytes();
-  error = DoReadGPR(dst, sizeof(s390_regs));
-  dst += sizeof(s390_regs);
+  error = ReadGPR();
   if (error.Fail())
     return error;
+  memcpy(dst, GetGPRBuffer(), GetGPRSize());
+  dst += GetGPRSize();
 
-  error = DoReadFPR(dst, sizeof(s390_fp_regs));
-  dst += sizeof(s390_fp_regs);
+  error = ReadFPR();
   if (error.Fail())
     return error;
+  memcpy(dst, GetFPRBuffer(), GetFPRSize());
+  dst += GetFPRSize();
 
   // Ignore errors if the regset is unsupported (happens on older kernels).
   DoReadRegisterSet(NT_S390_SYSTEM_CALL, dst, 4);
@@ -380,7 +377,7 @@
     return error;
   }
 
-  uint8_t *src = data_sp->GetBytes();
+  const uint8_t *src = data_sp->GetBytes();
   if (src == nullptr) {
     error.SetErrorStringWithFormat("NativeRegisterContextLinux_s390x::%s "
                                    "DataBuffer::GetBytes() returned a null "
@@ -389,13 +386,15 @@
     return error;
   }
 
-  error = DoWriteGPR(src, sizeof(s390_regs));
-  src += sizeof(s390_regs);
+  memcpy(GetGPRBuffer(), src, GetGPRSize());
+  src += GetGPRSize();
+  error = WriteGPR();
   if (error.Fail())
     return error;
 
-  error = DoWriteFPR(src, sizeof(s390_fp_regs));
-  src += sizeof(s390_fp_regs);
+  memcpy(GetFPRBuffer(), src, GetFPRSize());
+  src += GetFPRSize();
+  error = WriteFPR();
   if (error.Fail())
     return error;
 
@@ -441,26 +440,24 @@
                                            m_thread.GetID(), &parea);
 }
 
-Status NativeRegisterContextLinux_s390x::DoReadGPR(void *buf, size_t buf_size) {
-  assert(buf_size == sizeof(s390_regs));
-  return PeekUserArea(offsetof(user_regs_struct, psw), buf, buf_size);
+Status NativeRegisterContextLinux_s390x::ReadGPR() {
+  return PeekUserArea(offsetof(user_regs_struct, psw), GetGPRBuffer(),
+                      GetGPRSize());
 }
 
-Status NativeRegisterContextLinux_s390x::DoWriteGPR(void *buf,
-                                                    size_t buf_size) {
-  assert(buf_size == sizeof(s390_regs));
-  return PokeUserArea(offsetof(user_regs_struct, psw), buf, buf_size);
+Status NativeRegisterContextLinux_s390x::WriteGPR() {
+  return PokeUserArea(offsetof(user_regs_struct, psw), GetGPRBuffer(),
+                      GetGPRSize());
 }
 
-Status NativeRegisterContextLinux_s390x::DoReadFPR(void *buf, size_t buf_size) {
-  assert(buf_size == sizeof(s390_fp_regs));
-  return PeekUserArea(offsetof(user_regs_struct, fp_regs), buf, buf_size);
+Status NativeRegisterContextLinux_s390x::ReadFPR() {
+  return PeekUserArea(offsetof(user_regs_struct, fp_regs), GetGPRBuffer(),
+                      GetGPRSize());
 }
 
-Status NativeRegisterContextLinux_s390x::DoWriteFPR(void *buf,
-                                                    size_t buf_size) {
-  assert(buf_size == sizeof(s390_fp_regs));
-  return PokeUserArea(offsetof(user_regs_struct, fp_regs), buf, buf_size);
+Status NativeRegisterContextLinux_s390x::WriteFPR() {
+  return PokeUserArea(offsetof(user_regs_struct, fp_regs), GetGPRBuffer(),
+                      GetGPRSize());
 }
 
 Status NativeRegisterContextLinux_s390x::DoReadRegisterSet(uint32_t regset,
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
index 33fe9a6..69714e4 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_s390x.h
@@ -14,6 +14,7 @@
 #include "Plugins/Process/Linux/NativeRegisterContextLinux.h"
 #include "Plugins/Process/Utility/RegisterContext_s390x.h"
 #include "Plugins/Process/Utility/lldb-s390x-register-enums.h"
+#include <asm/ptrace.h>
 
 namespace lldb_private {
 namespace process_linux {
@@ -66,13 +67,18 @@
   Status DoWriteRegisterValue(uint32_t offset, const char *reg_name,
                               const RegisterValue &value) override;
 
-  Status DoReadGPR(void *buf, size_t buf_size) override;
+  Status ReadGPR() override;
 
-  Status DoWriteGPR(void *buf, size_t buf_size) override;
+  Status WriteGPR() override;
 
-  Status DoReadFPR(void *buf, size_t buf_size) override;
+  Status ReadFPR() override;
 
-  Status DoWriteFPR(void *buf, size_t buf_size) override;
+  Status WriteFPR() override;
+
+  void *GetGPRBuffer() override { return &m_regs; }
+  size_t GetGPRSize() override { return sizeof(m_regs); }
+  void *GetFPRBuffer() override { return &m_fp_regs; }
+  size_t GetFPRSize() override { return sizeof(m_fp_regs); }
 
 private:
   // Info about register ranges.
@@ -90,6 +96,9 @@
   RegInfo m_reg_info;
   lldb::addr_t m_watchpoint_addr;
 
+  s390_regs m_regs;
+  s390_fp_regs m_fp_regs;
+
   // Private member methods.
   bool IsRegisterSetAvailable(uint32_t set_index) const;
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
index 3c53268..0818630 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.cpp
@@ -1191,8 +1191,8 @@
         return wp_index;
     }
     if (error.Fail() && log) {
-      log->Printf("NativeRegisterContextLinux_x86_64::%s Error: %s",
-                  __FUNCTION__, error.AsCString());
+      LLDB_LOGF(log, "NativeRegisterContextLinux_x86_64::%s Error: %s",
+                __FUNCTION__, error.AsCString());
     }
   }
   return LLDB_INVALID_INDEX32;
@@ -1213,4 +1213,11 @@
   return 4;
 }
 
+uint32_t
+NativeRegisterContextLinux_x86_64::GetPtraceOffset(uint32_t reg_index) {
+  // If register is MPX, remove extra factor from gdb offset
+  return GetRegisterInfoAtIndex(reg_index)->byte_offset -
+         (IsMPX(reg_index) ? 128 : 0);
+}
+
 #endif // defined(__i386__) || defined(__x86_64__)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
index 6031ddb..58b7490 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_x86_64.h
@@ -75,6 +75,8 @@
 
   Status WriteFPR() override;
 
+  uint32_t GetPtraceOffset(uint32_t reg_index) override;
+
 private:
   // Private member types.
   enum class XStateType { Invalid, FXSAVE, XSAVE };
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
index 287a271..b2730e6 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp
@@ -133,9 +133,10 @@
   case eStateStepping:
   case eStateDetached:
     if (log) {
-      log->Printf("NativeThreadLinux::%s tid %" PRIu64
-                  " in state %s cannot answer stop reason",
-                  __FUNCTION__, GetID(), StateAsCString(m_state));
+      LLDB_LOGF(log,
+                "NativeThreadLinux::%s tid %" PRIu64
+                " in state %s cannot answer stop reason",
+                __FUNCTION__, GetID(), StateAsCString(m_state));
     }
     return false;
   }
@@ -240,6 +241,9 @@
   if (signo != LLDB_INVALID_SIGNAL_NUMBER)
     data = signo;
 
+  // Before thread resumes, clear any cached register data structures
+  GetRegisterContext().InvalidateAllRegisters();
+
   return NativeProcessLinux::PtraceWrapper(PTRACE_CONT, GetID(), nullptr,
                                            reinterpret_cast<void *>(data));
 }
@@ -261,6 +265,9 @@
   if (signo != LLDB_INVALID_SIGNAL_NUMBER)
     data = signo;
 
+  // Before thread resumes, clear any cached register data structures
+  GetRegisterContext().InvalidateAllRegisters();
+
   // If hardware single-stepping is not supported, we just do a continue. The
   // breakpoint on the next instruction has been setup in
   // NativeProcessLinux::Resume.
@@ -273,9 +280,8 @@
 void NativeThreadLinux::SetStoppedBySignal(uint32_t signo,
                                            const siginfo_t *info) {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("NativeThreadLinux::%s called with signal 0x%02" PRIx32,
-                __FUNCTION__, signo);
+  LLDB_LOGF(log, "NativeThreadLinux::%s called with signal 0x%02" PRIx32,
+            __FUNCTION__, signo);
 
   SetStopped();
 
@@ -327,8 +333,7 @@
 
 void NativeThreadLinux::SetStoppedByExec() {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("NativeThreadLinux::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "NativeThreadLinux::%s()", __FUNCTION__);
 
   SetStopped();
 
@@ -412,19 +417,19 @@
   lldb::pid_t pid = process.GetID();
   lldb::tid_t tid = GetID();
 
-  if (log)
-    log->Printf("NativeThreadLinux::%s requesting thread stop(pid: %" PRIu64
-                ", tid: %" PRIu64 ")",
-                __FUNCTION__, pid, tid);
+  LLDB_LOGF(log,
+            "NativeThreadLinux::%s requesting thread stop(pid: %" PRIu64
+            ", tid: %" PRIu64 ")",
+            __FUNCTION__, pid, tid);
 
   Status err;
   errno = 0;
   if (::tgkill(pid, tid, SIGSTOP) != 0) {
     err.SetErrorToErrno();
-    if (log)
-      log->Printf("NativeThreadLinux::%s tgkill(%" PRIu64 ", %" PRIu64
-                  ", SIGSTOP) failed: %s",
-                  __FUNCTION__, pid, tid, err.AsCString());
+    LLDB_LOGF(log,
+              "NativeThreadLinux::%s tgkill(%" PRIu64 ", %" PRIu64
+              ", SIGSTOP) failed: %s",
+              __FUNCTION__, pid, tid, err.AsCString());
   }
 
   return err;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp b/src/llvm-project/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp
index a7837da..a3b89c5 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp
@@ -172,7 +172,7 @@
   }
 
   LLDB_LOG(log, "workaround for thread {0} prepared", tid);
-  return llvm::make_unique<SingleStepWorkaround>(tid, original_set);
+  return std::make_unique<SingleStepWorkaround>(tid, original_set);
 }
 
 SingleStepWorkaround::~SingleStepWorkaround() {
diff --git a/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
index bed0e3b..ddce25c 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(ProcessKDPProperties.inc -gen-lldb-property-defs
+  SOURCE ProcessKDPProperties.td
+  TARGET LLDBPluginProcessMacOSXKernelPropertiesGen)
+
+lldb_tablegen(ProcessKDPPropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE ProcessKDPProperties.td
+  TARGET LLDBPluginProcessMacOSXKernelPropertiesEnumGen)
+
 add_lldb_library(lldbPluginProcessMacOSXKernel PLUGIN
   CommunicationKDP.cpp
   ProcessKDP.cpp
@@ -20,3 +28,7 @@
     lldbPluginDynamicLoaderStatic
     lldbPluginProcessUtility
   )
+
+add_dependencies(lldbPluginProcessMacOSXKernel
+  LLDBPluginProcessMacOSXKernelPropertiesGen
+  LLDBPluginProcessMacOSXKernelPropertiesEnumGen)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index 1a75326..5737efd 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -70,8 +70,8 @@
     if (log) {
       PacketStreamType log_strm;
       DumpPacket(log_strm, request_packet.GetData(), request_packet.GetSize());
-      log->Printf("error: kdp running, not sending packet: %.*s",
-                  (uint32_t)log_strm.GetSize(), log_strm.GetData());
+      LLDB_LOGF(log, "error: kdp running, not sending packet: %.*s",
+                (uint32_t)log_strm.GetSize(), log_strm.GetData());
     }
     return false;
   }
@@ -140,7 +140,7 @@
     if (log) {
       PacketStreamType log_strm;
       DumpPacket(log_strm, packet_data, packet_size);
-      log->Printf("%.*s", (uint32_t)log_strm.GetSize(), log_strm.GetData());
+      LLDB_LOGF(log, "%.*s", (uint32_t)log_strm.GetSize(), log_strm.GetData());
     }
     ConnectionStatus status = eConnectionStatusSuccess;
 
@@ -149,10 +149,10 @@
     if (bytes_written == packet_size)
       return true;
 
-    if (log)
-      log->Printf("error: failed to send packet entire packet %" PRIu64
-                  " of %" PRIu64 " bytes sent",
-                  (uint64_t)bytes_written, (uint64_t)packet_size);
+    LLDB_LOGF(log,
+              "error: failed to send packet entire packet %" PRIu64
+              " of %" PRIu64 " bytes sent",
+              (uint64_t)bytes_written, (uint64_t)packet_size);
   }
   return false;
 }
@@ -241,8 +241,8 @@
     if (log && log->GetVerbose()) {
       PacketStreamType log_strm;
       DumpHexBytes(&log_strm, src, src_len, UINT32_MAX, LLDB_INVALID_ADDRESS);
-      log->Printf("CommunicationKDP::%s adding %u bytes: %s", __FUNCTION__,
-                  (uint32_t)src_len, log_strm.GetData());
+      LLDB_LOGF(log, "CommunicationKDP::%s adding %u bytes: %s", __FUNCTION__,
+                (uint32_t)src_len, log_strm.GetData());
     }
     m_bytes.append((const char *)src, src_len);
   }
@@ -314,7 +314,8 @@
           PacketStreamType log_strm;
           DumpPacket(log_strm, packet);
 
-          log->Printf("%.*s", (uint32_t)log_strm.GetSize(), log_strm.GetData());
+          LLDB_LOGF(log, "%.*s", (uint32_t)log_strm.GetSize(),
+                    log_strm.GetData());
         }
         return true;
       }
@@ -323,9 +324,8 @@
     default:
       // Unrecognized reply command byte, erase this byte and try to get back
       // on track
-      if (log)
-        log->Printf("CommunicationKDP::%s: tossing junk byte: 0x%2.2x",
-                    __FUNCTION__, (uint8_t)m_bytes[0]);
+      LLDB_LOGF(log, "CommunicationKDP::%s: tossing junk byte: 0x%2.2x",
+                __FUNCTION__, (uint8_t)m_bytes[0]);
       m_bytes.erase(0, 1);
       break;
     }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 6f1bb4b..491c0b0 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -52,11 +52,13 @@
 
 namespace {
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"packet-timeout", OptionValue::eTypeUInt64, true, 5, NULL, {},
-     "Specify the default packet timeout in seconds."}};
+#define LLDB_PROPERTIES_processkdp
+#include "ProcessKDPProperties.inc"
 
-enum { ePropertyPacketTimeout };
+enum {
+#define LLDB_PROPERTIES_processkdp
+#include "ProcessKDPPropertiesEnum.inc"
+};
 
 class PluginProperties : public Properties {
 public:
@@ -66,15 +68,15 @@
 
   PluginProperties() : Properties() {
     m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_processkdp_properties);
   }
 
   virtual ~PluginProperties() {}
 
   uint64_t GetPacketTimeout() {
-    const uint32_t idx = ePropertyPacketTimeout;
+    const uint32_t idx = ePropertyKDPPacketTimeout;
     return m_collection_sp->GetPropertyAtIndexAsUInt64(
-        NULL, idx, g_properties[idx].default_uint_value);
+        NULL, idx, g_processkdp_properties[idx].default_uint_value);
   }
 };
 
@@ -394,8 +396,7 @@
   Process::DidAttach(process_arch);
 
   Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessKDP::DidAttach()");
+  LLDB_LOGF(log, "ProcessKDP::DidAttach()");
   if (GetID() != LLDB_INVALID_PROCESS_ID) {
     GetHostArchitecture(process_arch);
   }
@@ -429,15 +430,13 @@
     const StateType thread_resume_state =
         kernel_thread_sp->GetTemporaryResumeState();
 
-    if (log)
-      log->Printf("ProcessKDP::DoResume() thread_resume_state = %s",
-                  StateAsCString(thread_resume_state));
+    LLDB_LOGF(log, "ProcessKDP::DoResume() thread_resume_state = %s",
+              StateAsCString(thread_resume_state));
     switch (thread_resume_state) {
     case eStateSuspended:
       // Nothing to do here when a thread will stay suspended we just leave the
       // CPU mask bit set to zero for the thread
-      if (log)
-        log->Printf("ProcessKDP::DoResume() = suspended???");
+      LLDB_LOGF(log, "ProcessKDP::DoResume() = suspended???");
       break;
 
     case eStateStepping: {
@@ -445,9 +444,9 @@
           kernel_thread_sp->GetRegisterContext());
 
       if (reg_ctx_sp) {
-        if (log)
-          log->Printf(
-              "ProcessKDP::DoResume () reg_ctx_sp->HardwareSingleStep (true);");
+        LLDB_LOGF(
+            log,
+            "ProcessKDP::DoResume () reg_ctx_sp->HardwareSingleStep (true);");
         reg_ctx_sp->HardwareSingleStep(true);
         resume = true;
       } else {
@@ -462,9 +461,8 @@
           kernel_thread_sp->GetRegisterContext());
 
       if (reg_ctx_sp) {
-        if (log)
-          log->Printf("ProcessKDP::DoResume () reg_ctx_sp->HardwareSingleStep "
-                      "(false);");
+        LLDB_LOGF(log, "ProcessKDP::DoResume () reg_ctx_sp->HardwareSingleStep "
+                       "(false);");
         reg_ctx_sp->HardwareSingleStep(false);
         resume = true;
       } else {
@@ -481,8 +479,7 @@
   }
 
   if (resume) {
-    if (log)
-      log->Printf("ProcessKDP::DoResume () sending resume");
+    LLDB_LOGF(log, "ProcessKDP::DoResume () sending resume");
 
     if (m_comm.SendRequestResume()) {
       m_async_broadcaster.BroadcastEvent(eBroadcastBitAsyncContinue);
@@ -550,8 +547,7 @@
 Status ProcessKDP::DoDetach(bool keep_stopped) {
   Status error;
   Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessKDP::DoDetach(keep_stopped = %i)", keep_stopped);
+  LLDB_LOGF(log, "ProcessKDP::DoDetach(keep_stopped = %i)", keep_stopped);
 
   if (m_comm.IsRunning()) {
     // We are running and we can't interrupt a running kernel, so we need to
@@ -734,8 +730,7 @@
 bool ProcessKDP::StartAsyncThread() {
   Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
 
-  if (log)
-    log->Printf("ProcessKDP::StartAsyncThread ()");
+  LLDB_LOGF(log, "ProcessKDP::StartAsyncThread ()");
 
   if (m_async_thread.IsJoinable())
     return true;
@@ -755,8 +750,7 @@
 void ProcessKDP::StopAsyncThread() {
   Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
 
-  if (log)
-    log->Printf("ProcessKDP::StopAsyncThread ()");
+  LLDB_LOGF(log, "ProcessKDP::StopAsyncThread ()");
 
   m_async_broadcaster.BroadcastEvent(eBroadcastBitAsyncThreadShouldExit);
 
@@ -771,10 +765,10 @@
   const lldb::pid_t pid = process->GetID();
 
   Log *log(ProcessKDPLog::GetLogIfAllCategoriesSet(KDP_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64
-                ") thread starting...",
-                arg, pid);
+  LLDB_LOGF(log,
+            "ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64
+            ") thread starting...",
+            arg, pid);
 
   ListenerSP listener_sp(Listener::MakeListener("ProcessKDP::AsyncThread"));
   EventSP event_sp;
@@ -786,16 +780,16 @@
       desired_event_mask) {
     bool done = false;
     while (!done) {
-      if (log)
-        log->Printf("ProcessKDP::AsyncThread (pid = %" PRIu64
-                    ") listener.WaitForEvent (NULL, event_sp)...",
-                    pid);
+      LLDB_LOGF(log,
+                "ProcessKDP::AsyncThread (pid = %" PRIu64
+                ") listener.WaitForEvent (NULL, event_sp)...",
+                pid);
       if (listener_sp->GetEvent(event_sp, llvm::None)) {
         uint32_t event_type = event_sp->GetType();
-        if (log)
-          log->Printf("ProcessKDP::AsyncThread (pid = %" PRIu64
-                      ") Got an event of type: %d...",
-                      pid, event_type);
+        LLDB_LOGF(log,
+                  "ProcessKDP::AsyncThread (pid = %" PRIu64
+                  ") Got an event of type: %d...",
+                  pid, event_type);
 
         // When we are running, poll for 1 second to try and get an exception
         // to indicate the process has stopped. If we don't get one, check to
@@ -834,38 +828,38 @@
           } break;
 
           case eBroadcastBitAsyncThreadShouldExit:
-            if (log)
-              log->Printf("ProcessKDP::AsyncThread (pid = %" PRIu64
-                          ") got eBroadcastBitAsyncThreadShouldExit...",
-                          pid);
+            LLDB_LOGF(log,
+                      "ProcessKDP::AsyncThread (pid = %" PRIu64
+                      ") got eBroadcastBitAsyncThreadShouldExit...",
+                      pid);
             done = true;
             is_running = false;
             break;
 
           default:
-            if (log)
-              log->Printf("ProcessKDP::AsyncThread (pid = %" PRIu64
-                          ") got unknown event 0x%8.8x",
-                          pid, event_type);
+            LLDB_LOGF(log,
+                      "ProcessKDP::AsyncThread (pid = %" PRIu64
+                      ") got unknown event 0x%8.8x",
+                      pid, event_type);
             done = true;
             is_running = false;
             break;
           }
         } while (is_running);
       } else {
-        if (log)
-          log->Printf("ProcessKDP::AsyncThread (pid = %" PRIu64
-                      ") listener.WaitForEvent (NULL, event_sp) => false",
-                      pid);
+        LLDB_LOGF(log,
+                  "ProcessKDP::AsyncThread (pid = %" PRIu64
+                  ") listener.WaitForEvent (NULL, event_sp) => false",
+                  pid);
         done = true;
       }
     }
   }
 
-  if (log)
-    log->Printf("ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64
-                ") thread exiting...",
-                arg, pid);
+  LLDB_LOGF(log,
+            "ProcessKDP::AsyncThread (arg = %p, pid = %" PRIu64
+            ") thread exiting...",
+            arg, pid);
 
   process->m_async_thread.Reset();
   return NULL;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPProperties.td b/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPProperties.td
new file mode 100644
index 0000000..0063bdb
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDPProperties.td
@@ -0,0 +1,8 @@
+include "../../../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "processkdp" in {
+  def KDPPacketTimeout: Property<"packet-timeout", "UInt64">,
+    Global,
+    DefaultUnsignedValue<5>,
+    Desc<"Specify the default packet timeout in seconds.">;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
index 32d20d2..4313d27 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp
@@ -8,8 +8,7 @@
 
 #include "NativeProcessNetBSD.h"
 
-
-
+#include "Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h"
 #include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
 #include "lldb/Host/HostProcess.h"
 #include "lldb/Host/common/NativeRegisterContext.h"
@@ -99,6 +98,17 @@
       pid, launch_info.GetPTY().ReleaseMasterFileDescriptor(), native_delegate,
       Info.GetArchitecture(), mainloop));
 
+  // Enable event reporting
+  ptrace_event_t events;
+  status = PtraceWrapper(PT_GET_EVENT_MASK, pid, &events, sizeof(events));
+  if (status.Fail())
+    return status.ToError();
+  // TODO: PTRACE_FORK | PTRACE_VFORK | PTRACE_POSIX_SPAWN?
+  events.pe_set_event |= PTRACE_LWP_CREATE | PTRACE_LWP_EXIT;
+  status = PtraceWrapper(PT_SET_EVENT_MASK, pid, &events, sizeof(events));
+  if (status.Fail())
+    return status.ToError();
+
   status = process_up->ReinitializeThreads();
   if (status.Fail())
     return status.ToError();
@@ -140,7 +150,7 @@
                                          NativeDelegate &delegate,
                                          const ArchSpec &arch,
                                          MainLoop &mainloop)
-    : NativeProcessProtocol(pid, terminal_fd, delegate), m_arch(arch) {
+    : NativeProcessELF(pid, terminal_fd, delegate), m_arch(arch) {
   if (m_terminal_fd != -1) {
     Status status = EnsureFDFlags(m_terminal_fd, O_NONBLOCK);
     assert(status.Success());
@@ -195,6 +205,7 @@
             SIGSTOP, &info.psi_siginfo);
       }
     }
+    SetState(StateType::eStateStopped, true);
   }
 }
 
@@ -210,17 +221,32 @@
     return;
   }
 
+  NativeThreadNetBSD* thread = nullptr;
+  if (info.psi_lwpid > 0) {
+    for (const auto &t : m_threads) {
+      if (t->GetID() == static_cast<lldb::tid_t>(info.psi_lwpid)) {
+        thread = static_cast<NativeThreadNetBSD *>(t.get());
+        break;
+      }
+      static_cast<NativeThreadNetBSD *>(t.get())->SetStoppedWithNoReason();
+    }
+    if (!thread)
+      LLDB_LOG(log,
+               "thread not found in m_threads, pid = {0}, LWP = {1}", pid,
+               info.psi_lwpid);
+  }
+
   switch (info.psi_siginfo.si_code) {
   case TRAP_BRKPT:
-    for (const auto &thread : m_threads) {
-      static_cast<NativeThreadNetBSD &>(*thread).SetStoppedByBreakpoint();
-      FixupBreakpointPCAsNeeded(static_cast<NativeThreadNetBSD &>(*thread));
+    if (thread) {
+      thread->SetStoppedByBreakpoint();
+      FixupBreakpointPCAsNeeded(*thread);
     }
     SetState(StateType::eStateStopped, true);
     break;
   case TRAP_TRACE:
-    for (const auto &thread : m_threads)
-      static_cast<NativeThreadNetBSD &>(*thread).SetStoppedByTrace();
+    if (thread)
+      thread->SetStoppedByTrace();
     SetState(StateType::eStateStopped, true);
     break;
   case TRAP_EXEC: {
@@ -237,54 +263,66 @@
       static_cast<NativeThreadNetBSD &>(*thread).SetStoppedByExec();
     SetState(StateType::eStateStopped, true);
   } break;
-  case TRAP_DBREG: {
-    // Find the thread.
-    NativeThreadNetBSD* thread = nullptr;
-    for (const auto &t : m_threads) {
-      if (t->GetID() == info.psi_lwpid) {
-        thread = static_cast<NativeThreadNetBSD *>(t.get());
-        break;
-      }
-    }
-    if (!thread) {
-      LLDB_LOG(log,
-               "thread not found in m_threads, pid = {0}, LWP = {1}",
-               GetID(), info.psi_lwpid);
-      break;
+  case TRAP_LWP: {
+    ptrace_state_t pst;
+    Status error = PtraceWrapper(PT_GET_PROCESS_STATE, pid, &pst, sizeof(pst));
+    if (error.Fail()) {
+      SetState(StateType::eStateInvalid);
+      return;
     }
 
-    // If a watchpoint was hit, report it
+    switch (pst.pe_report_event) {
+      case PTRACE_LWP_CREATE: {
+        LLDB_LOG(log,
+                 "monitoring new thread, pid = {0}, LWP = {1}", pid,
+                 pst.pe_lwp);
+        NativeThreadNetBSD& t = AddThread(pst.pe_lwp);
+        error = t.CopyWatchpointsFrom(
+            static_cast<NativeThreadNetBSD &>(*GetCurrentThread()));
+        if (error.Fail()) {
+          LLDB_LOG(log,
+                   "failed to copy watchpoints to new thread {0}: {1}",
+                   pst.pe_lwp, error);
+          SetState(StateType::eStateInvalid);
+          return;
+        }
+      } break;
+      case PTRACE_LWP_EXIT:
+        LLDB_LOG(log,
+                 "removing exited thread, pid = {0}, LWP = {1}", pid,
+                 pst.pe_lwp);
+        RemoveThread(pst.pe_lwp);
+        break;
+    }
+
+    error = PtraceWrapper(PT_CONTINUE, pid, reinterpret_cast<void*>(1), 0);
+    if (error.Fail()) {
+      SetState(StateType::eStateInvalid);
+      return;
+    }
+  } break;
+  case TRAP_DBREG: {
+    if (!thread)
+      break;
+
+    auto &regctx = static_cast<NativeRegisterContextNetBSD &>(
+        thread->GetRegisterContext());
     uint32_t wp_index = LLDB_INVALID_INDEX32;
-    Status error = thread->GetRegisterContext().GetWatchpointHitIndex(
-        wp_index, (uintptr_t)info.psi_siginfo.si_addr);
+    Status error = regctx.GetWatchpointHitIndex(wp_index,
+        (uintptr_t)info.psi_siginfo.si_addr);
     if (error.Fail())
       LLDB_LOG(log,
                "received error while checking for watchpoint hits, pid = "
-               "{0}, LWP = {1}, error = {2}",
-               GetID(), info.psi_lwpid, error);
+               "{0}, LWP = {1}, error = {2}", pid, info.psi_lwpid, error);
     if (wp_index != LLDB_INVALID_INDEX32) {
-      for (const auto &thread : m_threads)
-        static_cast<NativeThreadNetBSD &>(*thread).SetStoppedByWatchpoint(
-            wp_index);
+      thread->SetStoppedByWatchpoint(wp_index);
+      regctx.ClearWatchpointHit(wp_index);
       SetState(StateType::eStateStopped, true);
       break;
     }
 
-    // If a breakpoint was hit, report it
-    uint32_t bp_index = LLDB_INVALID_INDEX32;
-    error = thread->GetRegisterContext().GetHardwareBreakHitIndex(
-        bp_index, (uintptr_t)info.psi_siginfo.si_addr);
-    if (error.Fail())
-      LLDB_LOG(log,
-               "received error while checking for hardware "
-               "breakpoint hits, pid = {0}, LWP = {1}, error = {2}",
-               GetID(), info.psi_lwpid, error);
-    if (bp_index != LLDB_INVALID_INDEX32) {
-      for (const auto &thread : m_threads)
-        static_cast<NativeThreadNetBSD &>(*thread).SetStoppedByBreakpoint();
-      SetState(StateType::eStateStopped, true);
-      break;
-    }
+    thread->SetStoppedByTrace();
+    SetState(StateType::eStateStopped, true);
   } break;
   }
 }
@@ -294,9 +332,14 @@
   const auto siginfo_err =
       PtraceWrapper(PT_GET_SIGINFO, pid, &info, sizeof(info));
 
-  for (const auto &thread : m_threads) {
-    static_cast<NativeThreadNetBSD &>(*thread).SetStoppedBySignal(
-        info.psi_siginfo.si_signo, &info.psi_siginfo);
+  for (const auto &abs_thread : m_threads) {
+    NativeThreadNetBSD &thread = static_cast<NativeThreadNetBSD &>(*abs_thread);
+    assert(info.psi_lwpid >= 0);
+    if (info.psi_lwpid == 0 ||
+        static_cast<lldb::tid_t>(info.psi_lwpid) == thread.GetID())
+      thread.SetStoppedBySignal(info.psi_siginfo.si_signo, &info.psi_siginfo);
+    else
+      thread.SetStoppedWithNoReason();
   }
   SetState(StateType::eStateStopped, true);
 }
@@ -324,66 +367,137 @@
   return error;
 }
 
+static llvm::Expected<ptrace_siginfo_t> ComputeSignalInfo(
+    const std::vector<std::unique_ptr<NativeThreadProtocol>> &threads,
+    const ResumeActionList &resume_actions) {
+  // We need to account for three possible scenarios:
+  // 1. no signal being sent.
+  // 2. a signal being sent to one thread.
+  // 3. a signal being sent to the whole process.
+
+  // Count signaled threads.  While at it, determine which signal is being sent
+  // and ensure there's only one.
+  size_t signaled_threads = 0;
+  int signal = LLDB_INVALID_SIGNAL_NUMBER;
+  lldb::tid_t signaled_lwp;
+  for (const auto &thread : threads) {
+    assert(thread && "thread list should not contain NULL threads");
+    const ResumeAction *action =
+        resume_actions.GetActionForThread(thread->GetID(), true);
+    if (action) {
+      if (action->signal != LLDB_INVALID_SIGNAL_NUMBER) {
+        signaled_threads++;
+        if (action->signal != signal) {
+          if (signal != LLDB_INVALID_SIGNAL_NUMBER)
+            return Status("NetBSD does not support passing multiple signals "
+                          "simultaneously")
+                .ToError();
+          signal = action->signal;
+          signaled_lwp = thread->GetID();
+        }
+      }
+    }
+  }
+
+  if (signaled_threads == 0) {
+    ptrace_siginfo_t siginfo;
+    siginfo.psi_siginfo.si_signo = LLDB_INVALID_SIGNAL_NUMBER;
+    return siginfo;
+  }
+
+  if (signaled_threads > 1 && signaled_threads < threads.size())
+    return Status("NetBSD does not support passing signal to 1<i<all threads")
+        .ToError();
+
+  ptrace_siginfo_t siginfo;
+  siginfo.psi_siginfo.si_signo = signal;
+  siginfo.psi_siginfo.si_code = SI_USER;
+  siginfo.psi_siginfo.si_pid = getpid();
+  siginfo.psi_siginfo.si_uid = getuid();
+  if (signaled_threads == 1)
+    siginfo.psi_lwpid = signaled_lwp;
+  else // signal for the whole process
+    siginfo.psi_lwpid = 0;
+  return siginfo;
+}
+
 Status NativeProcessNetBSD::Resume(const ResumeActionList &resume_actions) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   LLDB_LOG(log, "pid {0}", GetID());
 
-  const auto &thread = m_threads[0];
-  const ResumeAction *const action =
-      resume_actions.GetActionForThread(thread->GetID(), true);
+  Status ret;
 
-  if (action == nullptr) {
-    LLDB_LOG(log, "no action specified for pid {0} tid {1}", GetID(),
-             thread->GetID());
-    return Status();
+  Expected<ptrace_siginfo_t> siginfo =
+      ComputeSignalInfo(m_threads, resume_actions);
+  if (!siginfo)
+    return Status(siginfo.takeError());
+
+  for (const auto &abs_thread : m_threads) {
+    assert(abs_thread && "thread list should not contain NULL threads");
+    NativeThreadNetBSD &thread = static_cast<NativeThreadNetBSD &>(*abs_thread);
+
+    const ResumeAction *action =
+        resume_actions.GetActionForThread(thread.GetID(), true);
+    // we need to explicit issue suspend requests, so it is simpler to map it
+    // into proper action
+    ResumeAction suspend_action{thread.GetID(), eStateSuspended,
+                                LLDB_INVALID_SIGNAL_NUMBER};
+
+    if (action == nullptr) {
+      LLDB_LOG(log, "no action specified for pid {0} tid {1}", GetID(),
+               thread.GetID());
+      action = &suspend_action;
+    }
+
+    LLDB_LOG(
+        log,
+        "processing resume action state {0} signal {1} for pid {2} tid {3}",
+        action->state, action->signal, GetID(), thread.GetID());
+
+    switch (action->state) {
+    case eStateRunning:
+      ret = thread.Resume();
+      break;
+    case eStateStepping:
+      ret = thread.SingleStep();
+      break;
+    case eStateSuspended:
+    case eStateStopped:
+      if (action->signal != LLDB_INVALID_SIGNAL_NUMBER)
+        return Status("Passing signal to suspended thread unsupported");
+
+      ret = thread.Suspend();
+      break;
+
+    default:
+      return Status("NativeProcessNetBSD::%s (): unexpected state %s specified "
+                    "for pid %" PRIu64 ", tid %" PRIu64,
+                    __FUNCTION__, StateAsCString(action->state), GetID(),
+                    thread.GetID());
+    }
+
+    if (!ret.Success())
+      return ret;
   }
 
-  Status error;
+  int signal = 0;
+  if (siginfo->psi_siginfo.si_signo != LLDB_INVALID_SIGNAL_NUMBER) {
+    ret = PtraceWrapper(PT_SET_SIGINFO, GetID(), &siginfo.get(),
+                        sizeof(*siginfo));
+    if (!ret.Success())
+      return ret;
+    signal = siginfo->psi_siginfo.si_signo;
+  }
 
-  switch (action->state) {
-  case eStateRunning: {
-    // Run the thread, possibly feeding it the signal.
-    error = NativeProcessNetBSD::PtraceWrapper(PT_CONTINUE, GetID(), (void *)1,
-                                               action->signal);
-    if (!error.Success())
-      return error;
-    for (const auto &thread : m_threads)
-      static_cast<NativeThreadNetBSD &>(*thread).SetRunning();
+  ret = PtraceWrapper(PT_CONTINUE, GetID(), reinterpret_cast<void *>(1),
+                      signal);
+  if (ret.Success())
     SetState(eStateRunning, true);
-    break;
-  }
-  case eStateStepping:
-    // Run the thread, possibly feeding it the signal.
-    error = NativeProcessNetBSD::PtraceWrapper(PT_STEP, GetID(), (void *)1,
-                                               action->signal);
-    if (!error.Success())
-      return error;
-    for (const auto &thread : m_threads)
-      static_cast<NativeThreadNetBSD &>(*thread).SetStepping();
-    SetState(eStateStepping, true);
-    break;
-
-  case eStateSuspended:
-  case eStateStopped:
-    llvm_unreachable("Unexpected state");
-
-  default:
-    return Status("NativeProcessNetBSD::%s (): unexpected state %s specified "
-                  "for pid %" PRIu64 ", tid %" PRIu64,
-                  __FUNCTION__, StateAsCString(action->state), GetID(),
-                  thread->GetID());
-  }
-
-  return Status();
+  return ret;
 }
 
 Status NativeProcessNetBSD::Halt() {
-  Status error;
-
-  if (kill(GetID(), SIGSTOP) != 0)
-    error.SetErrorToErrno();
-
-  return error;
+  return PtraceWrapper(PT_STOP, GetID());
 }
 
 Status NativeProcessNetBSD::Detach() {
@@ -408,6 +522,10 @@
   return error;
 }
 
+Status NativeProcessNetBSD::Interrupt() {
+  return PtraceWrapper(PT_STOP, GetID());
+}
+
 Status NativeProcessNetBSD::Kill() {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_PROCESS));
   LLDB_LOG(log, "pid {0}", GetID());
@@ -647,10 +765,10 @@
 }
 
 NativeThreadNetBSD &NativeProcessNetBSD::AddThread(lldb::tid_t thread_id) {
-
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
   LLDB_LOG(log, "pid {0} adding thread with tid {1}", GetID(), thread_id);
 
+  assert(thread_id > 0);
   assert(!HasThreadNoLock(thread_id) &&
          "attempted to add a thread by id that already exists");
 
@@ -658,10 +776,26 @@
   if (m_threads.empty())
     SetCurrentThreadID(thread_id);
 
-  m_threads.push_back(llvm::make_unique<NativeThreadNetBSD>(*this, thread_id));
+  m_threads.push_back(std::make_unique<NativeThreadNetBSD>(*this, thread_id));
   return static_cast<NativeThreadNetBSD &>(*m_threads.back());
 }
 
+void NativeProcessNetBSD::RemoveThread(lldb::tid_t thread_id) {
+  Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
+  LLDB_LOG(log, "pid {0} removing thread with tid {1}", GetID(), thread_id);
+
+  assert(thread_id > 0);
+  assert(HasThreadNoLock(thread_id) &&
+         "attempted to remove a thread that does not exist");
+
+  for (auto it = m_threads.begin(); it != m_threads.end(); ++it) {
+    if ((*it)->GetID() == thread_id) {
+      m_threads.erase(it);
+      break;
+    }
+  }
+}
+
 Status NativeProcessNetBSD::Attach() {
   // Attach to the requested process.
   // An attach will cause the thread to stop with a SIGSTOP.
@@ -780,15 +914,23 @@
   m_threads.clear();
 
   // Initialize new thread
+#ifdef PT_LWPSTATUS
+  struct ptrace_lwpstatus info = {};
+  int op = PT_LWPNEXT;
+#else
   struct ptrace_lwpinfo info = {};
-  Status error = PtraceWrapper(PT_LWPINFO, GetID(), &info, sizeof(info));
+  int op = PT_LWPINFO;
+#endif
+
+  Status error = PtraceWrapper(op, GetID(), &info, sizeof(info));
+
   if (error.Fail()) {
     return error;
   }
   // Reinitialize from scratch threads and register them in process
   while (info.pl_lwpid != 0) {
     AddThread(info.pl_lwpid);
-    error = PtraceWrapper(PT_LWPINFO, GetID(), &info, sizeof(info));
+    error = PtraceWrapper(op, GetID(), &info, sizeof(info));
     if (error.Fail()) {
       return error;
     }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
index e85ca3b..6a06773 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h
@@ -9,12 +9,12 @@
 #ifndef liblldb_NativeProcessNetBSD_H_
 #define liblldb_NativeProcessNetBSD_H_
 
+#include "Plugins/Process/POSIX/NativeProcessELF.h"
 #include "lldb/Target/MemoryRegionInfo.h"
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 
 #include "NativeThreadNetBSD.h"
-#include "lldb/Host/common/NativeProcessProtocol.h"
 
 namespace lldb_private {
 namespace process_netbsd {
@@ -25,7 +25,7 @@
 /// for debugging.
 ///
 /// Changes in the inferior process state are broadcasted.
-class NativeProcessNetBSD : public NativeProcessProtocol {
+class NativeProcessNetBSD : public NativeProcessELF {
 public:
   class Factory : public NativeProcessProtocol::Factory {
   public:
@@ -47,6 +47,8 @@
 
   Status Signal(int signo) override;
 
+  Status Interrupt() override;
+
   Status Kill() override;
 
   Status GetMemoryRegionInfo(lldb::addr_t load_addr,
@@ -98,6 +100,7 @@
   bool HasThreadNoLock(lldb::tid_t thread_id);
 
   NativeThreadNetBSD &AddThread(lldb::tid_t thread_id);
+  void RemoveThread(lldb::tid_t thread_id);
 
   void MonitorCallback(lldb::pid_t pid, int signal);
   void MonitorExited(lldb::pid_t pid, WaitStatus status);
diff --git a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
index 3a9caaa..a8afa0b 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.cpp
@@ -8,6 +8,8 @@
 
 #include "NativeRegisterContextNetBSD.h"
 
+#include "Plugins/Process/NetBSD/NativeProcessNetBSD.h"
+
 #include "lldb/Host/common/NativeProcessProtocol.h"
 
 using namespace lldb_private;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
index f5dd0c3..13e023d 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h
@@ -11,12 +11,13 @@
 
 #include "lldb/Host/common/NativeThreadProtocol.h"
 
-#include "Plugins/Process/NetBSD/NativeProcessNetBSD.h"
 #include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h"
 
 namespace lldb_private {
 namespace process_netbsd {
 
+class NativeProcessNetBSD;
+
 class NativeRegisterContextNetBSD : public NativeRegisterContextRegisterInfo {
 public:
   NativeRegisterContextNetBSD(NativeThreadProtocol &native_thread,
@@ -30,6 +31,10 @@
   static NativeRegisterContextNetBSD *
   CreateHostNativeRegisterContextNetBSD(const ArchSpec &target_arch,
                                         NativeThreadProtocol &native_thread);
+  virtual Status
+  CopyHardwareWatchpointsFrom(NativeRegisterContextNetBSD &source) = 0;
+
+  virtual Status ClearWatchpointHit(uint32_t wp_index) = 0;
 
 protected:
   Status DoRegisterSet(int req, void *buf);
diff --git a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
index a7cd637..05a3540 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
@@ -84,13 +84,71 @@
                   k_num_gpr_registers_x86_64,
               "g_gpr_regnums_x86_64 has wrong number of register infos");
 
+// x86 64-bit floating point registers.
+static const uint32_t g_fpu_regnums_x86_64[] = {
+    lldb_fctrl_x86_64,     lldb_fstat_x86_64, lldb_ftag_x86_64,
+    lldb_fop_x86_64,       lldb_fiseg_x86_64, lldb_fioff_x86_64,
+    lldb_foseg_x86_64,     lldb_fooff_x86_64, lldb_mxcsr_x86_64,
+    lldb_mxcsrmask_x86_64, lldb_st0_x86_64,   lldb_st1_x86_64,
+    lldb_st2_x86_64,       lldb_st3_x86_64,   lldb_st4_x86_64,
+    lldb_st5_x86_64,       lldb_st6_x86_64,   lldb_st7_x86_64,
+    lldb_mm0_x86_64,       lldb_mm1_x86_64,   lldb_mm2_x86_64,
+    lldb_mm3_x86_64,       lldb_mm4_x86_64,   lldb_mm5_x86_64,
+    lldb_mm6_x86_64,       lldb_mm7_x86_64,   lldb_xmm0_x86_64,
+    lldb_xmm1_x86_64,      lldb_xmm2_x86_64,  lldb_xmm3_x86_64,
+    lldb_xmm4_x86_64,      lldb_xmm5_x86_64,  lldb_xmm6_x86_64,
+    lldb_xmm7_x86_64,      lldb_xmm8_x86_64,  lldb_xmm9_x86_64,
+    lldb_xmm10_x86_64,     lldb_xmm11_x86_64, lldb_xmm12_x86_64,
+    lldb_xmm13_x86_64,     lldb_xmm14_x86_64, lldb_xmm15_x86_64,
+    LLDB_INVALID_REGNUM // register sets need to end with this flag
+};
+static_assert((sizeof(g_fpu_regnums_x86_64) / sizeof(g_fpu_regnums_x86_64[0])) -
+                      1 ==
+                  k_num_fpr_registers_x86_64,
+              "g_fpu_regnums_x86_64 has wrong number of register infos");
+
+// x86 64-bit registers available via XState.
+static const uint32_t g_xstate_regnums_x86_64[] = {
+    lldb_ymm0_x86_64,   lldb_ymm1_x86_64,  lldb_ymm2_x86_64,  lldb_ymm3_x86_64,
+    lldb_ymm4_x86_64,   lldb_ymm5_x86_64,  lldb_ymm6_x86_64,  lldb_ymm7_x86_64,
+    lldb_ymm8_x86_64,   lldb_ymm9_x86_64,  lldb_ymm10_x86_64, lldb_ymm11_x86_64,
+    lldb_ymm12_x86_64,  lldb_ymm13_x86_64, lldb_ymm14_x86_64, lldb_ymm15_x86_64,
+    // Note: we currently do not provide them but this is needed to avoid
+    // unnamed groups in SBFrame::GetRegisterContext().
+    lldb_bnd0_x86_64,    lldb_bnd1_x86_64,    lldb_bnd2_x86_64,
+    lldb_bnd3_x86_64,    lldb_bndcfgu_x86_64, lldb_bndstatus_x86_64,
+    LLDB_INVALID_REGNUM // register sets need to end with this flag
+};
+static_assert((sizeof(g_xstate_regnums_x86_64) / sizeof(g_xstate_regnums_x86_64[0])) -
+                      1 ==
+                  k_num_avx_registers_x86_64 + k_num_mpx_registers_x86_64,
+              "g_xstate_regnums_x86_64 has wrong number of register infos");
+
+// x86 debug registers.
+static const uint32_t g_dbr_regnums_x86_64[] = {
+    lldb_dr0_x86_64,   lldb_dr1_x86_64,  lldb_dr2_x86_64,  lldb_dr3_x86_64,
+    lldb_dr4_x86_64,   lldb_dr5_x86_64,  lldb_dr6_x86_64,  lldb_dr7_x86_64,
+    LLDB_INVALID_REGNUM // register sets need to end with this flag
+};
+static_assert((sizeof(g_dbr_regnums_x86_64) / sizeof(g_dbr_regnums_x86_64[0])) -
+                      1 ==
+                  k_num_dbr_registers_x86_64,
+              "g_dbr_regnums_x86_64 has wrong number of register infos");
+
 // Number of register sets provided by this context.
-enum { k_num_extended_register_sets = 2, k_num_register_sets = 4 };
+enum { k_num_register_sets = 4 };
 
 // Register sets for x86 64-bit.
 static const RegisterSet g_reg_sets_x86_64[k_num_register_sets] = {
     {"General Purpose Registers", "gpr", k_num_gpr_registers_x86_64,
      g_gpr_regnums_x86_64},
+    {"Floating Point Registers", "fpu", k_num_fpr_registers_x86_64,
+     g_fpu_regnums_x86_64},
+    {"Extended State Registers", "xstate",
+     k_num_avx_registers_x86_64 + k_num_mpx_registers_x86_64,
+     g_xstate_regnums_x86_64},
+    {"Debug Registers", "dbr", k_num_dbr_registers_x86_64,
+     g_dbr_regnums_x86_64},
 };
 
 #define REG_CONTEXT_SIZE (GetRegisterInfoInterface().GetGPRSize())
@@ -667,11 +725,6 @@
   ::memcpy(dst, &m_gpr_x86_64, GetRegisterInfoInterface().GetGPRSize());
   dst += GetRegisterInfoInterface().GetGPRSize();
 
-  RegisterValue value((uint64_t)-1);
-  const RegisterInfo *reg_info =
-      GetRegisterInfoInterface().GetDynamicRegisterInfo("orig_eax");
-  if (reg_info == nullptr)
-    reg_info = GetRegisterInfoInterface().GetDynamicRegisterInfo("orig_rax");
   return error;
 }
 
@@ -795,10 +848,10 @@
   if (!is_vacant)
     return Status("Watchpoint index not vacant");
 
-  RegisterValue reg_value;
   const RegisterInfo *const reg_info_dr7 =
       GetRegisterInfoAtIndex(lldb_dr7_x86_64);
-  error = ReadRegister(reg_info_dr7, reg_value);
+  RegisterValue dr7_value;
+  error = ReadRegister(reg_info_dr7, dr7_value);
   if (error.Fail())
     return error;
 
@@ -816,16 +869,28 @@
 
   uint64_t bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
 
-  uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask;
+  uint64_t control_bits = dr7_value.GetAsUInt64() & ~bit_mask;
 
   control_bits |= enable_bit | rw_bits | size_bits;
 
   const RegisterInfo *const reg_info_drN =
       GetRegisterInfoAtIndex(lldb_dr0_x86_64 + wp_index);
-  error = WriteRegister(reg_info_drN, RegisterValue(addr));
+  RegisterValue drN_value;
+  error = ReadRegister(reg_info_drN, drN_value);
   if (error.Fail())
     return error;
 
+  // clear dr6 if address or bits changed (i.e. we're not reenabling the same
+  // watchpoint)
+  if (drN_value.GetAsUInt64() != addr ||
+      (dr7_value.GetAsUInt64() & bit_mask) != (rw_bits | size_bits)) {
+    ClearWatchpointHit(wp_index);
+
+    error = WriteRegister(reg_info_drN, RegisterValue(addr));
+    if (error.Fail())
+      return error;
+  }
+
   error = WriteRegister(reg_info_dr7, RegisterValue(control_bits));
   if (error.Fail())
     return error;
@@ -839,32 +904,36 @@
   if (wp_index >= NumSupportedHardwareWatchpoints())
     return false;
 
+  // for watchpoints 0, 1, 2, or 3, respectively, clear bits 0-1, 2-3, 4-5
+  // or 6-7 of the debug control register (DR7)
+  const RegisterInfo *const reg_info_dr7 =
+      GetRegisterInfoAtIndex(lldb_dr7_x86_64);
   RegisterValue reg_value;
+  Status error = ReadRegister(reg_info_dr7, reg_value);
+  if (error.Fail())
+    return false;
+  uint64_t bit_mask = 0x3 << (2 * wp_index);
+  uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask;
 
-  // for watchpoints 0, 1, 2, or 3, respectively, clear bits 0, 1, 2, or 3 of
+  return WriteRegister(reg_info_dr7, RegisterValue(control_bits)).Success();
+}
+
+Status NativeRegisterContextNetBSD_x86_64::ClearWatchpointHit(uint32_t wp_index) {
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return Status("Watchpoint index out of range");
+
+  // for watchpoints 0, 1, 2, or 3, respectively, check bits 0, 1, 2, or 3 of
   // the debug status register (DR6)
   const RegisterInfo *const reg_info_dr6 =
       GetRegisterInfoAtIndex(lldb_dr6_x86_64);
+  RegisterValue reg_value;
   Status error = ReadRegister(reg_info_dr6, reg_value);
   if (error.Fail())
-    return false;
+    return error;
+
   uint64_t bit_mask = 1 << wp_index;
   uint64_t status_bits = reg_value.GetAsUInt64() & ~bit_mask;
-  error = WriteRegister(reg_info_dr6, RegisterValue(status_bits));
-  if (error.Fail())
-    return false;
-
-  // for watchpoints 0, 1, 2, or 3, respectively, clear bits {0-1,16-19},
-  // {2-3,20-23}, {4-5,24-27}, or {6-7,28-31} of the debug control register
-  // (DR7)
-  const RegisterInfo *const reg_info_dr7 =
-      GetRegisterInfoAtIndex(lldb_dr7_x86_64);
-  error = ReadRegister(reg_info_dr7, reg_value);
-  if (error.Fail())
-    return false;
-  bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
-  uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask;
-  return WriteRegister(reg_info_dr7, RegisterValue(control_bits)).Success();
+  return WriteRegister(reg_info_dr6, RegisterValue(status_bits));
 }
 
 Status NativeRegisterContextNetBSD_x86_64::ClearAllHardwareWatchpoints() {
@@ -906,8 +975,8 @@
         return wp_index;
     }
     if (error.Fail() && log) {
-      log->Printf("NativeRegisterContextNetBSD_x86_64::%s Error: %s",
-                  __FUNCTION__, error.AsCString());
+      LLDB_LOGF(log, "NativeRegisterContextNetBSD_x86_64::%s Error: %s",
+                __FUNCTION__, error.AsCString());
     }
   }
   return LLDB_INVALID_INDEX32;
@@ -930,4 +999,19 @@
   return 4;
 }
 
+Status NativeRegisterContextNetBSD_x86_64::CopyHardwareWatchpointsFrom(
+    NativeRegisterContextNetBSD &source) {
+  auto &r_source = static_cast<NativeRegisterContextNetBSD_x86_64&>(source);
+  Status res = r_source.ReadRegisterSet(DBRegSet);
+  if (!res.Fail()) {
+    // copy dbregs only if any watchpoints were set
+    if ((r_source.m_dbr_x86_64.dr[7] & 0xFF) == 0)
+      return res;
+
+    m_dbr_x86_64 = r_source.m_dbr_x86_64;
+    res = WriteRegisterSet(DBRegSet);
+  }
+  return res;
+}
+
 #endif // defined(__x86_64__)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
index 0fed165..54b8a80 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h
@@ -58,6 +58,8 @@
 
   bool ClearHardwareWatchpoint(uint32_t wp_index) override;
 
+  Status ClearWatchpointHit(uint32_t wp_index) override;
+
   Status ClearAllHardwareWatchpoints() override;
 
   Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
@@ -71,9 +73,12 @@
 
   uint32_t NumSupportedHardwareWatchpoints() override;
 
+  Status
+  CopyHardwareWatchpointsFrom(NativeRegisterContextNetBSD &source) override;
+
 private:
   // Private member types.
-  enum { GPRegSet, FPRegSet, DBRegSet, XStateRegSet };
+  enum { GPRegSet, FPRegSet, XStateRegSet, DBRegSet };
 
   // Private member variables.
   struct reg m_gpr_x86_64;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
index e25975c..dd2745d 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
@@ -16,9 +16,20 @@
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/RegisterValue.h"
 #include "lldb/Utility/State.h"
+#include "llvm/Support/Errno.h"
+
+// clang-format off
+#include <sys/types.h>
+#include <sys/ptrace.h>
+// clang-format on
 
 #include <sstream>
 
+// clang-format off
+#include <sys/types.h>
+#include <sys/sysctl.h>
+// clang-format on
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_private::process_netbsd;
@@ -30,6 +41,38 @@
 NativeRegisterContextNetBSD::CreateHostNativeRegisterContextNetBSD(process.GetArchitecture(), *this)
 ), m_stop_description() {}
 
+Status NativeThreadNetBSD::Resume() {
+  Status ret = NativeProcessNetBSD::PtraceWrapper(PT_RESUME, m_process.GetID(),
+                                                  nullptr, GetID());
+  if (!ret.Success())
+    return ret;
+  ret = NativeProcessNetBSD::PtraceWrapper(PT_CLEARSTEP, m_process.GetID(),
+                                           nullptr, GetID());
+  if (ret.Success())
+    SetRunning();
+  return ret;
+}
+
+Status NativeThreadNetBSD::SingleStep() {
+  Status ret = NativeProcessNetBSD::PtraceWrapper(PT_RESUME, m_process.GetID(),
+                                                  nullptr, GetID());
+  if (!ret.Success())
+    return ret;
+  ret = NativeProcessNetBSD::PtraceWrapper(PT_SETSTEP, m_process.GetID(),
+                                           nullptr, GetID());
+  if (ret.Success())
+    SetStepping();
+  return ret;
+}
+
+Status NativeThreadNetBSD::Suspend() {
+  Status ret = NativeProcessNetBSD::PtraceWrapper(PT_SUSPEND, m_process.GetID(),
+                                                  nullptr, GetID());
+  if (ret.Success())
+    SetStopped();
+  return ret;
+}
+
 void NativeThreadNetBSD::SetStoppedBySignal(uint32_t signo,
                                             const siginfo_t *info) {
   Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
@@ -89,6 +132,13 @@
   m_stop_info.details.signal.signo = SIGTRAP;
 }
 
+void NativeThreadNetBSD::SetStoppedWithNoReason() {
+  SetStopped();
+
+  m_stop_info.reason = StopReason::eStopReasonNone;
+  m_stop_info.details.signal.signo = 0;
+}
+
 void NativeThreadNetBSD::SetStopped() {
   const StateType new_state = StateType::eStateStopped;
   m_state = new_state;
@@ -105,7 +155,49 @@
   m_stop_info.reason = StopReason::eStopReasonNone;
 }
 
-std::string NativeThreadNetBSD::GetName() { return std::string(""); }
+std::string NativeThreadNetBSD::GetName() {
+  Log *log(ProcessPOSIXLog::GetLogIfAllCategoriesSet(POSIX_LOG_THREAD));
+
+#ifdef PT_LWPSTATUS
+  struct ptrace_lwpstatus info = {};
+  info.pl_lwpid = m_tid;
+  Status error = NativeProcessNetBSD::PtraceWrapper(
+      PT_LWPSTATUS, static_cast<int>(m_process.GetID()), &info, sizeof(info));
+  if (error.Fail()) {
+    return "";
+  }
+  return info.pl_name;
+#else
+  std::vector<struct kinfo_lwp> infos;
+  int mib[5] = {CTL_KERN, KERN_LWP, static_cast<int>(m_process.GetID()),
+                sizeof(struct kinfo_lwp), 0};
+  size_t size;
+
+  if (::sysctl(mib, 5, nullptr, &size, nullptr, 0) == -1 || size == 0) {
+    LLDB_LOG(log, "sysctl() for LWP info size failed: {0}",
+             llvm::sys::StrError());
+    return "";
+  }
+
+  mib[4] = size / sizeof(size_t);
+  infos.resize(size / sizeof(struct kinfo_lwp));
+
+  if (sysctl(mib, 5, infos.data(), &size, NULL, 0) == -1 || size == 0) {
+    LLDB_LOG(log, "sysctl() for LWP info failed: {0}", llvm::sys::StrError());
+    return "";
+  }
+
+  size_t nlwps = size / sizeof(struct kinfo_lwp);
+  for (size_t i = 0; i < nlwps; i++) {
+    if (static_cast<lldb::tid_t>(infos[i].l_lid) == m_tid) {
+      return infos[i].l_name;
+    }
+  }
+
+  LLDB_LOG(log, "unable to find lwp {0} in LWP infos", m_tid);
+  return "";
+#endif
+}
 
 lldb::StateType NativeThreadNetBSD::GetState() { return m_state; }
 
@@ -140,9 +232,9 @@
   llvm_unreachable("unhandled StateType!");
 }
 
-NativeRegisterContext& NativeThreadNetBSD::GetRegisterContext() {
+NativeRegisterContextNetBSD &NativeThreadNetBSD::GetRegisterContext() {
   assert(m_reg_context_up);
-return  *m_reg_context_up;
+  return *m_reg_context_up;
 }
 
 Status NativeThreadNetBSD::SetWatchpoint(lldb::addr_t addr, size_t size,
@@ -203,3 +295,13 @@
 
   return Status("Clearing hardware breakpoint failed.");
 }
+
+Status NativeThreadNetBSD::CopyWatchpointsFrom(NativeThreadNetBSD &source) {
+  Status s = GetRegisterContext().CopyHardwareWatchpointsFrom(
+      source.GetRegisterContext());
+  if (!s.Fail()) {
+    m_watchpoint_index_map = source.m_watchpoint_index_map;
+    m_hw_break_index_map = source.m_hw_break_index_map;
+  }
+  return s;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
index 015d899..89b61ef 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.h
@@ -11,6 +11,8 @@
 
 #include "lldb/Host/common/NativeThreadProtocol.h"
 
+#include "Plugins/Process/NetBSD/NativeRegisterContextNetBSD.h"
+
 #include <csignal>
 #include <map>
 #include <string>
@@ -34,7 +36,7 @@
   bool GetStopReason(ThreadStopInfo &stop_info,
                      std::string &description) override;
 
-  NativeRegisterContext& GetRegisterContext() override;
+  NativeRegisterContextNetBSD &GetRegisterContext() override;
 
   Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
                        bool hardware) override;
@@ -48,19 +50,26 @@
 private:
   // Interface for friend classes
 
+  Status Resume();
+  Status SingleStep();
+  Status Suspend();
+
   void SetStoppedBySignal(uint32_t signo, const siginfo_t *info = nullptr);
   void SetStoppedByBreakpoint();
   void SetStoppedByTrace();
   void SetStoppedByExec();
   void SetStoppedByWatchpoint(uint32_t wp_index);
+  void SetStoppedWithNoReason();
   void SetStopped();
   void SetRunning();
   void SetStepping();
 
+  Status CopyWatchpointsFrom(NativeThreadNetBSD& source);
+
   // Member Variables
   lldb::StateType m_state;
   ThreadStopInfo m_stop_info;
-  std::unique_ptr<NativeRegisterContext> m_reg_context_up;
+  std::unique_ptr<NativeRegisterContextNetBSD> m_reg_context_up;
   std::string m_stop_description;
   using WatchpointIndexMap = std::map<lldb::addr_t, uint32_t>;
   WatchpointIndexMap m_watchpoint_index_map;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/POSIX/CrashReason.cpp b/src/llvm-project/lldb/source/Plugins/Process/POSIX/CrashReason.cpp
index 70c2687..b872269 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/POSIX/CrashReason.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/POSIX/CrashReason.cpp
@@ -136,15 +136,15 @@
 #if defined(si_lower) && defined(si_upper)
   if (reason == CrashReason::eBoundViolation) {
     str = "signal SIGSEGV";
-    AppendBounds(str, reinterpret_cast<lldb::addr_t>(info.si_lower),
-                 reinterpret_cast<lldb::addr_t>(info.si_upper),
-                 reinterpret_cast<lldb::addr_t>(info.si_addr));
+    AppendBounds(str, reinterpret_cast<uintptr_t>(info.si_lower),
+                 reinterpret_cast<uintptr_t>(info.si_upper),
+                 reinterpret_cast<uintptr_t>(info.si_addr));
     return str;
   }
 #endif
 
   return GetCrashReasonString(reason,
-                              reinterpret_cast<lldb::addr_t>(info.si_addr));
+                              reinterpret_cast<uintptr_t>(info.si_addr));
 }
 
 std::string GetCrashReasonString(CrashReason reason, lldb::addr_t fault_addr) {
@@ -229,11 +229,6 @@
 }
 
 const char *CrashReasonAsString(CrashReason reason) {
-#ifdef LLDB_CONFIGURATION_BUILDANDINTEGRATION
-  // Just return the code in ascii for integration builds.
-  chcar str[8];
-  sprintf(str, "%d", reason);
-#else
   const char *str = nullptr;
 
   switch (reason) {
@@ -315,8 +310,6 @@
     str = "eFloatSubscriptRange";
     break;
   }
-#endif
-
   return str;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp b/src/llvm-project/lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp
index 559b16c..058dc5a 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/POSIX/NativeProcessELF.cpp
@@ -21,7 +21,7 @@
     DataExtractor auxv_data(buffer_or_error.get()->getBufferStart(),
                             buffer_or_error.get()->getBufferSize(),
                             GetByteOrder(), GetAddressByteSize());
-    m_aux_vector = llvm::make_unique<AuxVector>(auxv_data);
+    m_aux_vector = std::make_unique<AuxVector>(auxv_data);
   }
 
   return m_aux_vector->GetAuxValue(type);
@@ -107,4 +107,72 @@
   return LLDB_INVALID_ADDRESS;
 }
 
-} // namespace lldb_private
\ No newline at end of file
+template <typename T>
+llvm::Expected<SVR4LibraryInfo>
+NativeProcessELF::ReadSVR4LibraryInfo(lldb::addr_t link_map_addr) {
+  ELFLinkMap<T> link_map;
+  size_t bytes_read;
+  auto error =
+      ReadMemory(link_map_addr, &link_map, sizeof(link_map), bytes_read);
+  if (!error.Success())
+    return error.ToError();
+
+  char name_buffer[PATH_MAX];
+  llvm::Expected<llvm::StringRef> string_or_error = ReadCStringFromMemory(
+      link_map.l_name, &name_buffer[0], sizeof(name_buffer), bytes_read);
+  if (!string_or_error)
+    return string_or_error.takeError();
+
+  SVR4LibraryInfo info;
+  info.name = string_or_error->str();
+  info.link_map = link_map_addr;
+  info.base_addr = link_map.l_addr;
+  info.ld_addr = link_map.l_ld;
+  info.next = link_map.l_next;
+
+  return info;
+}
+
+llvm::Expected<std::vector<SVR4LibraryInfo>>
+NativeProcessELF::GetLoadedSVR4Libraries() {
+  // Address of DT_DEBUG.d_ptr which points to r_debug
+  lldb::addr_t info_address = GetSharedLibraryInfoAddress();
+  if (info_address == LLDB_INVALID_ADDRESS)
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "Invalid shared library info address");
+  // Address of r_debug
+  lldb::addr_t address = 0;
+  size_t bytes_read;
+  auto status =
+      ReadMemory(info_address, &address, GetAddressByteSize(), bytes_read);
+  if (!status.Success())
+    return status.ToError();
+  if (address == 0)
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "Invalid r_debug address");
+  // Read r_debug.r_map
+  lldb::addr_t link_map = 0;
+  status = ReadMemory(address + GetAddressByteSize(), &link_map,
+                      GetAddressByteSize(), bytes_read);
+  if (!status.Success())
+    return status.ToError();
+  if (address == 0)
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "Invalid link_map address");
+
+  std::vector<SVR4LibraryInfo> library_list;
+  while (link_map) {
+    llvm::Expected<SVR4LibraryInfo> info =
+        GetAddressByteSize() == 8 ? ReadSVR4LibraryInfo<uint64_t>(link_map)
+                                  : ReadSVR4LibraryInfo<uint32_t>(link_map);
+    if (!info)
+      return info.takeError();
+    if (!info->name.empty() && info->base_addr != 0)
+      library_list.push_back(*info);
+    link_map = info->next;
+  }
+
+  return library_list;
+}
+
+} // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/Plugins/Process/POSIX/NativeProcessELF.h b/src/llvm-project/lldb/source/Plugins/Process/POSIX/NativeProcessELF.h
index 84dc8d0..4fb513b 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/POSIX/NativeProcessELF.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/POSIX/NativeProcessELF.h
@@ -37,6 +37,13 @@
   template <typename ELF_EHDR, typename ELF_PHDR, typename ELF_DYN>
   lldb::addr_t GetELFImageInfoAddress();
 
+  llvm::Expected<std::vector<SVR4LibraryInfo>>
+  GetLoadedSVR4Libraries() override;
+
+  template <typename T>
+  llvm::Expected<SVR4LibraryInfo>
+  ReadSVR4LibraryInfo(lldb::addr_t link_map_addr);
+
   std::unique_ptr<AuxVector> m_aux_vector;
   llvm::Optional<lldb::addr_t> m_shared_library_info_addr;
 };
diff --git a/src/llvm-project/lldb/source/Plugins/Process/POSIX/ProcessMessage.cpp b/src/llvm-project/lldb/source/Plugins/Process/POSIX/ProcessMessage.cpp
index aa84491..66286dd 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/POSIX/ProcessMessage.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/POSIX/ProcessMessage.cpp
@@ -15,11 +15,6 @@
 }
 
 const char *ProcessMessage::PrintKind(Kind kind) {
-#ifdef LLDB_CONFIGURATION_BUILDANDINTEGRATION
-  // Just return the code in ascii for integration builds.
-  chcar str[8];
-  sprintf(str, "%d", reason);
-#else
   const char *str = nullptr;
 
   switch (kind) {
@@ -60,8 +55,6 @@
     str = "eExecMessage";
     break;
   }
-#endif
-
   return str;
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/AuxVector.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/AuxVector.cpp
index aab164f..25a1d0b 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/AuxVector.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/AuxVector.cpp
@@ -43,9 +43,9 @@
 
   log->PutCString("AuxVector: ");
   for (auto entry : m_auxv_entries) {
-    log->Printf("   %s [%" PRIu64 "]: %" PRIx64,
-                GetEntryName(static_cast<EntryType>(entry.first)), entry.first,
-                entry.second);
+    LLDB_LOGF(log, "   %s [%" PRIu64 "]: %" PRIx64,
+              GetEntryName(static_cast<EntryType>(entry.first)), entry.first,
+              entry.second);
   }
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/Process/Utility/CMakeLists.txt
index 9ed2d02..91838d0 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/CMakeLists.txt
@@ -43,6 +43,8 @@
   RegisterContextPOSIX_s390x.cpp
   RegisterContextPOSIX_x86.cpp
   RegisterContextThreadMemory.cpp
+  RegisterContextWindows_i386.cpp
+  RegisterContextWindows_x86_64.cpp
   RegisterInfoPOSIX_arm.cpp
   RegisterInfoPOSIX_arm64.cpp
   RegisterInfoPOSIX_ppc64le.cpp
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
index 1afe4d9..a86880a 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
@@ -137,76 +137,67 @@
         // ends at
         static RegularExpression g_bitfield_regex(
             llvm::StringRef("([A-Za-z_][A-Za-z0-9_]*)\\[([0-9]+):([0-9]+)\\]"));
-        RegularExpression::Match regex_match(3);
-        if (g_bitfield_regex.Execute(slice_str, &regex_match)) {
-          llvm::StringRef reg_name_str;
-          std::string msbit_str;
-          std::string lsbit_str;
-          if (regex_match.GetMatchAtIndex(slice_str, 1, reg_name_str) &&
-              regex_match.GetMatchAtIndex(slice_str, 2, msbit_str) &&
-              regex_match.GetMatchAtIndex(slice_str, 3, lsbit_str)) {
-            const uint32_t msbit =
-                StringConvert::ToUInt32(msbit_str.c_str(), UINT32_MAX);
-            const uint32_t lsbit =
-                StringConvert::ToUInt32(lsbit_str.c_str(), UINT32_MAX);
-            if (msbit != UINT32_MAX && lsbit != UINT32_MAX) {
-              if (msbit > lsbit) {
-                const uint32_t msbyte = msbit / 8;
-                const uint32_t lsbyte = lsbit / 8;
+        llvm::SmallVector<llvm::StringRef, 4> matches;
+        if (g_bitfield_regex.Execute(slice_str, &matches)) {
+          std::string reg_name_str = matches[1].str();
+          std::string msbit_str = matches[2].str();
+          std::string lsbit_str = matches[3].str();
+          const uint32_t msbit =
+              StringConvert::ToUInt32(msbit_str.c_str(), UINT32_MAX);
+          const uint32_t lsbit =
+              StringConvert::ToUInt32(lsbit_str.c_str(), UINT32_MAX);
+          if (msbit != UINT32_MAX && lsbit != UINT32_MAX) {
+            if (msbit > lsbit) {
+              const uint32_t msbyte = msbit / 8;
+              const uint32_t lsbyte = lsbit / 8;
 
-                ConstString containing_reg_name(reg_name_str);
+              ConstString containing_reg_name(reg_name_str);
 
-                const RegisterInfo *containing_reg_info =
-                    GetRegisterInfo(containing_reg_name);
-                if (containing_reg_info) {
-                  const uint32_t max_bit = containing_reg_info->byte_size * 8;
-                  if (msbit < max_bit && lsbit < max_bit) {
-                    m_invalidate_regs_map[containing_reg_info
-                                              ->kinds[eRegisterKindLLDB]]
-                        .push_back(i);
-                    m_value_regs_map[i].push_back(
-                        containing_reg_info->kinds[eRegisterKindLLDB]);
-                    m_invalidate_regs_map[i].push_back(
-                        containing_reg_info->kinds[eRegisterKindLLDB]);
+              const RegisterInfo *containing_reg_info =
+                  GetRegisterInfo(containing_reg_name);
+              if (containing_reg_info) {
+                const uint32_t max_bit = containing_reg_info->byte_size * 8;
+                if (msbit < max_bit && lsbit < max_bit) {
+                  m_invalidate_regs_map[containing_reg_info
+                                            ->kinds[eRegisterKindLLDB]]
+                      .push_back(i);
+                  m_value_regs_map[i].push_back(
+                      containing_reg_info->kinds[eRegisterKindLLDB]);
+                  m_invalidate_regs_map[i].push_back(
+                      containing_reg_info->kinds[eRegisterKindLLDB]);
 
-                    if (byte_order == eByteOrderLittle) {
-                      success = true;
-                      reg_info.byte_offset =
-                          containing_reg_info->byte_offset + lsbyte;
-                    } else if (byte_order == eByteOrderBig) {
-                      success = true;
-                      reg_info.byte_offset =
-                          containing_reg_info->byte_offset + msbyte;
-                    } else {
-                      llvm_unreachable("Invalid byte order");
-                    }
+                  if (byte_order == eByteOrderLittle) {
+                    success = true;
+                    reg_info.byte_offset =
+                        containing_reg_info->byte_offset + lsbyte;
+                  } else if (byte_order == eByteOrderBig) {
+                    success = true;
+                    reg_info.byte_offset =
+                        containing_reg_info->byte_offset + msbyte;
                   } else {
-                    if (msbit > max_bit)
-                      printf("error: msbit (%u) must be less than the bitsize "
-                             "of the register (%u)\n",
-                             msbit, max_bit);
-                    else
-                      printf("error: lsbit (%u) must be less than the bitsize "
-                             "of the register (%u)\n",
-                             lsbit, max_bit);
+                    llvm_unreachable("Invalid byte order");
                   }
                 } else {
-                  printf("error: invalid concrete register \"%s\"\n",
-                         containing_reg_name.GetCString());
+                  if (msbit > max_bit)
+                    printf("error: msbit (%u) must be less than the bitsize "
+                           "of the register (%u)\n",
+                           msbit, max_bit);
+                  else
+                    printf("error: lsbit (%u) must be less than the bitsize "
+                           "of the register (%u)\n",
+                           lsbit, max_bit);
                 }
               } else {
-                printf("error: msbit (%u) must be greater than lsbit (%u)\n",
-                       msbit, lsbit);
+                printf("error: invalid concrete register \"%s\"\n",
+                       containing_reg_name.GetCString());
               }
             } else {
-              printf("error: msbit (%u) and lsbit (%u) must be valid\n", msbit,
-                     lsbit);
+              printf("error: msbit (%u) must be greater than lsbit (%u)\n",
+                     msbit, lsbit);
             }
           } else {
-            // TODO: print error invalid slice string that doesn't follow the
-            // format
-            printf("error: failed to extract regex matches for parsing the "
-                   "register bitfield regex\n");
+            printf("error: msbit (%u) and lsbit (%u) must be valid\n", msbit,
+                   lsbit);
           }
         } else {
           // TODO: print error invalid slice string that doesn't follow the
@@ -545,6 +536,7 @@
   if (!generic_regs_specified) {
     switch (arch.GetMachine()) {
     case llvm::Triple::aarch64:
+    case llvm::Triple::aarch64_32:
     case llvm::Triple::aarch64_be:
       for (auto &reg : m_regs) {
         if (strcmp(reg.name, "pc") == 0)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryThread.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
index 3cb5831..295c17e 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryThread.cpp
@@ -32,17 +32,15 @@
       m_queue_id(LLDB_INVALID_QUEUE_ID) {
   m_unwinder_up.reset(new HistoryUnwind(*this, pcs));
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p HistoryThread::HistoryThread", static_cast<void *>(this));
+  LLDB_LOGF(log, "%p HistoryThread::HistoryThread", static_cast<void *>(this));
 }
 
 //  Destructor
 
 HistoryThread::~HistoryThread() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p HistoryThread::~HistoryThread (tid=0x%" PRIx64 ")",
-                static_cast<void *>(this), GetID());
+  LLDB_LOGF(log, "%p HistoryThread::~HistoryThread (tid=0x%" PRIx64 ")",
+            static_cast<void *>(this), GetID());
   DestroyThread();
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp
index 7d473bf..83fdb01 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp
@@ -51,13 +51,15 @@
 }
 
 bool HistoryUnwind::DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
-                                          lldb::addr_t &pc) {
+                                          lldb::addr_t &pc,
+                                          bool &behaves_like_zeroth_frame) {
   // FIXME do not throw away the lock after we acquire it..
   std::unique_lock<std::recursive_mutex> guard(m_unwind_mutex);
   guard.unlock();
   if (frame_idx < m_pcs.size()) {
     cfa = frame_idx;
     pc = m_pcs[frame_idx];
+    behaves_like_zeroth_frame = (frame_idx == 0);
     return true;
   }
   return false;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryUnwind.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryUnwind.h
index 6c4522e..4d16608 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryUnwind.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/HistoryUnwind.h
@@ -29,7 +29,8 @@
   DoCreateRegisterContextForFrame(StackFrame *frame) override;
 
   bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
-                             lldb::addr_t &pc) override;
+                             lldb::addr_t &pc,
+                             bool &behaves_like_zeroth_frame) override;
   uint32_t DoGetFrameCount() override;
 
 private:
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
index 9beaf2f..ee939b0 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp
@@ -12,7 +12,7 @@
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Expression/DiagnosticManager.h"
 #include "lldb/Host/Config.h"
-#include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Platform.h"
@@ -20,7 +20,7 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/ThreadPlanCallFunction.h"
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include <sys/mman.h>
 #else
 // define them
@@ -41,13 +41,13 @@
   if (thread == nullptr)
     return false;
 
-  const bool append = true;
   const bool include_symbols = true;
   const bool include_inlines = false;
   SymbolContextList sc_list;
-  const uint32_t count = process->GetTarget().GetImages().FindFunctions(
+  process->GetTarget().GetImages().FindFunctions(
       ConstString("mmap"), eFunctionNameTypeFull, include_symbols,
-      include_inlines, append, sc_list);
+      include_inlines, sc_list);
+  const uint32_t count = sc_list.GetSize();
   if (count > 0) {
     SymbolContext sc;
     if (sc_list.GetContextAtIndex(0, sc)) {
@@ -79,17 +79,23 @@
       AddressRange mmap_range;
       if (sc.GetAddressRange(range_scope, 0, use_inline_block_range,
                              mmap_range)) {
-        ClangASTContext *clang_ast_context =
-            process->GetTarget().GetScratchClangASTContext();
-        CompilerType clang_void_ptr_type =
-            clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
+        auto type_system_or_err =
+            process->GetTarget().GetScratchTypeSystemForLanguage(
+                eLanguageTypeC);
+        if (!type_system_or_err) {
+          llvm::consumeError(type_system_or_err.takeError());
+          return false;
+        }
+        CompilerType void_ptr_type =
+            type_system_or_err->GetBasicTypeFromAST(eBasicTypeVoid)
+                .GetPointerType();
         const ArchSpec arch = process->GetTarget().GetArchitecture();
         MmapArgList args =
             process->GetTarget().GetPlatform()->GetMmapArgumentList(
                 arch, addr, length, prot_arg, flags, fd, offset);
         lldb::ThreadPlanSP call_plan_sp(
             new ThreadPlanCallFunction(*thread, mmap_range.GetBaseAddress(),
-                                       clang_void_ptr_type, args, options));
+                                       void_ptr_type, args, options));
         if (call_plan_sp) {
           DiagnosticManager diagnostics;
 
@@ -129,13 +135,13 @@
   if (thread == nullptr)
     return false;
 
-  const bool append = true;
   const bool include_symbols = true;
   const bool include_inlines = false;
   SymbolContextList sc_list;
-  const uint32_t count = process->GetTarget().GetImages().FindFunctions(
+  process->GetTarget().GetImages().FindFunctions(
       ConstString("munmap"), eFunctionNameTypeFull, include_symbols,
-      include_inlines, append, sc_list);
+      include_inlines, sc_list);
+  const uint32_t count = sc_list.GetSize();
   if (count > 0) {
     SymbolContext sc;
     if (sc_list.GetContextAtIndex(0, sc)) {
@@ -178,60 +184,3 @@
 
   return false;
 }
-
-// FIXME: This has nothing to do with Posix, it is just a convenience function
-// that calls a
-// function of the form "void * (*)(void)".  We should find a better place to
-// put this.
-
-bool lldb_private::InferiorCall(Process *process, const Address *address,
-                                addr_t &returned_func, bool trap_exceptions) {
-  Thread *thread =
-      process->GetThreadList().GetExpressionExecutionThread().get();
-  if (thread == nullptr || address == nullptr)
-    return false;
-
-  EvaluateExpressionOptions options;
-  options.SetStopOthers(true);
-  options.SetUnwindOnError(true);
-  options.SetIgnoreBreakpoints(true);
-  options.SetTryAllThreads(true);
-  options.SetDebug(false);
-  options.SetTimeout(process->GetUtilityExpressionTimeout());
-  options.SetTrapExceptions(trap_exceptions);
-
-  ClangASTContext *clang_ast_context =
-      process->GetTarget().GetScratchClangASTContext();
-  CompilerType clang_void_ptr_type =
-      clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
-  lldb::ThreadPlanSP call_plan_sp(
-      new ThreadPlanCallFunction(*thread, *address, clang_void_ptr_type,
-                                 llvm::ArrayRef<addr_t>(), options));
-  if (call_plan_sp) {
-    DiagnosticManager diagnostics;
-
-    StackFrame *frame = thread->GetStackFrameAtIndex(0).get();
-    if (frame) {
-      ExecutionContext exe_ctx;
-      frame->CalculateExecutionContext(exe_ctx);
-      ExpressionResults result =
-          process->RunThreadPlan(exe_ctx, call_plan_sp, options, diagnostics);
-      if (result == eExpressionCompleted) {
-        returned_func =
-            call_plan_sp->GetReturnValueObject()->GetValueAsUnsigned(
-                LLDB_INVALID_ADDRESS);
-
-        if (process->GetAddressByteSize() == 4) {
-          if (returned_func == UINT32_MAX)
-            return false;
-        } else if (process->GetAddressByteSize() == 8) {
-          if (returned_func == UINT64_MAX)
-            return false;
-        }
-        return true;
-      }
-    }
-  }
-
-  return false;
-}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.h
index 0431680..2008c5f 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.h
@@ -30,9 +30,6 @@
 
 bool InferiorCallMunmap(Process *proc, lldb::addr_t addr, lldb::addr_t length);
 
-bool InferiorCall(Process *proc, const Address *address,
-                  lldb::addr_t &returned_func, bool trap_exceptions = false);
-
 } // namespace lldb_private
 
 #endif // lldb_InferiorCallPOSIX_h_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
index e804a4d..173e669 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp
@@ -21,12 +21,6 @@
 
 #include <memory>
 
-// Support building against older versions of LLVM, this macro was added
-// recently.
-#ifndef LLVM_EXTENSION
-#define LLVM_EXTENSION
-#endif
-
 #include "Utility/ARM_DWARF_Registers.h"
 #include "Utility/ARM_ehframe_Registers.h"
 
@@ -1111,9 +1105,10 @@
 void RegisterContextDarwin_arm::LogDBGRegisters(Log *log, const DBG &dbg) {
   if (log) {
     for (uint32_t i = 0; i < 16; i++)
-      log->Printf("BVR%-2u/BCR%-2u = { 0x%8.8x, 0x%8.8x } WVR%-2u/WCR%-2u = { "
-                  "0x%8.8x, 0x%8.8x }",
-                  i, i, dbg.bvr[i], dbg.bcr[i], i, i, dbg.wvr[i], dbg.wcr[i]);
+      LLDB_LOGF(log,
+                "BVR%-2u/BCR%-2u = { 0x%8.8x, 0x%8.8x } WVR%-2u/WCR%-2u = { "
+                "0x%8.8x, 0x%8.8x }",
+                i, i, dbg.bvr[i], dbg.bcr[i], i, i, dbg.wvr[i], dbg.wcr[i]);
   }
 }
 
@@ -1145,10 +1140,11 @@
   case gpr_sp:
   case gpr_lr:
   case gpr_pc:
-  case gpr_cpsr:
     value.SetUInt32(gpr.r[reg - gpr_r0]);
     break;
-
+  case gpr_cpsr:
+    value.SetUInt32(gpr.cpsr);
+    break;
   case fpu_s0:
   case fpu_s1:
   case fpu_s2:
@@ -1514,8 +1510,6 @@
     // Zero is reserved for the BRP count, so don't increment it if it is zero
     if (g_num_supported_hw_breakpoints > 0)
       g_num_supported_hw_breakpoints++;
-    //        if (log) log->Printf ("DBGDIDR=0x%8.8x (number BRP pairs = %u)",
-    //        register_DBGDIDR, g_num_supported_hw_breakpoints);
   }
   return g_num_supported_hw_breakpoints;
 #else
@@ -1642,8 +1636,6 @@
     uint32_t register_DBGDIDR;
     asm("mrc p14, 0, %0, c0, c0, 0" : "=r"(register_DBGDIDR));
     g_num_supported_hw_watchpoints = Bits32(register_DBGDIDR, 31, 28) + 1;
-    //        if (log) log->Printf ("DBGDIDR=0x%8.8x (number WRP pairs = %u)",
-    //        register_DBGDIDR, g_num_supported_hw_watchpoints);
   }
   return g_num_supported_hw_watchpoints;
 #else
@@ -1656,10 +1648,6 @@
                                                           size_t size,
                                                           bool read,
                                                           bool write) {
-  //    if (log) log->Printf
-  //    ("RegisterContextDarwin_arm::EnableHardwareWatchpoint(addr = %8.8p, size
-  //    = %u, read = %u, write = %u)", addr, size, read, write);
-
   const uint32_t num_hw_watchpoints = NumSupportedHardwareWatchpoints();
 
   // Can't watch zero bytes
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
index 85d518a..fa5197c 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp
@@ -25,10 +25,9 @@
 
 #include <memory>
 
-// Support building against older versions of LLVM, this macro was added
-// recently.
-#ifndef LLVM_EXTENSION
-#define LLVM_EXTENSION
+#if defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__))
+#include <sys/types.h>
+#include <sys/sysctl.h>
 #endif
 
 #include "Utility/ARM64_DWARF_Registers.h"
@@ -285,10 +284,11 @@
 void RegisterContextDarwin_arm64::LogDBGRegisters(Log *log, const DBG &dbg) {
   if (log) {
     for (uint32_t i = 0; i < 16; i++)
-      log->Printf("BVR%-2u/BCR%-2u = { 0x%8.8" PRIu64 ", 0x%8.8" PRIu64
-                  " } WVR%-2u/WCR%-2u "
-                  "= { 0x%8.8" PRIu64 ", 0x%8.8" PRIu64 " }",
-                  i, i, dbg.bvr[i], dbg.bcr[i], i, i, dbg.wvr[i], dbg.wcr[i]);
+      LLDB_LOGF(log,
+                "BVR%-2u/BCR%-2u = { 0x%8.8" PRIu64 ", 0x%8.8" PRIu64
+                " } WVR%-2u/WCR%-2u "
+                "= { 0x%8.8" PRIu64 ", 0x%8.8" PRIu64 " }",
+                i, i, dbg.bvr[i], dbg.bcr[i], i, i, dbg.wvr[i], dbg.wcr[i]);
   }
 }
 
@@ -423,7 +423,7 @@
   case fpu_v29:
   case fpu_v30:
   case fpu_v31:
-    value.SetBytes(fpu.v[reg - fpu_v0].bytes.buffer, reg_info->byte_size,
+    value.SetBytes(fpu.v[reg - fpu_v0].bytes, reg_info->byte_size,
                    endian::InlHostByteOrder());
     break;
 
@@ -502,7 +502,7 @@
   case fpu_d31: {
     ProcessSP process_sp(m_thread.GetProcess());
     if (process_sp.get()) {
-      DataExtractor regdata(&fpu.v[reg - fpu_s0], 8, process_sp->GetByteOrder(),
+      DataExtractor regdata(&fpu.v[reg - fpu_d0], 8, process_sp->GetByteOrder(),
                             process_sp->GetAddressByteSize());
       offset_t offset = 0;
       value.SetDouble(regdata.GetDouble(&offset));
@@ -615,7 +615,7 @@
   case fpu_v29:
   case fpu_v30:
   case fpu_v31:
-    ::memcpy(fpu.v[reg - fpu_v0].bytes.buffer, value.GetBytes(),
+    ::memcpy(fpu.v[reg - fpu_v0].bytes, value.GetBytes(),
              value.GetByteSize());
     break;
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h
index 2f691c8..abb87e3 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h
@@ -73,7 +73,7 @@
   };
 
   struct VReg {
-    llvm::AlignedCharArray<16, 16> bytes;
+    alignas(16) char bytes[16];
   };
 
   // mirrors <mach/arm/thread_status.h> arm_neon_state64_t
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
index 820d280..959b047 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp
@@ -19,12 +19,6 @@
 
 #include <memory>
 
-// Support building against older versions of LLVM, this macro was added
-// recently.
-#ifndef LLVM_EXTENSION
-#define LLVM_EXTENSION
-#endif
-
 #include "RegisterContextDarwin_i386.h"
 
 using namespace lldb;
@@ -496,11 +490,11 @@
 void RegisterContextDarwin_i386::LogGPR(Log *log, const char *title) {
   if (log) {
     if (title)
-      log->Printf("%s", title);
+      LLDB_LOGF(log, "%s", title);
     for (uint32_t i = 0; i < k_num_gpr_registers; i++) {
       uint32_t reg = gpr_eax + i;
-      log->Printf("%12s = 0x%8.8x", g_register_infos[reg].name,
-                  (&gpr.eax)[reg]);
+      LLDB_LOGF(log, "%12s = 0x%8.8x", g_register_infos[reg].name,
+                (&gpr.eax)[reg]);
     }
   }
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
index 62e512a..22088a7 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp
@@ -21,12 +21,6 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Compiler.h"
 
-// Support building against older versions of LLVM, this macro was added
-// recently.
-#ifndef LLVM_EXTENSION
-#define LLVM_EXTENSION
-#endif
-
 #include "RegisterContextDarwin_x86_64.h"
 
 using namespace lldb;
@@ -554,22 +548,6 @@
   return -1;
 }
 
-void RegisterContextDarwin_x86_64::LogGPR(Log *log, const char *format, ...) {
-  if (log) {
-    if (format) {
-      va_list args;
-      va_start(args, format);
-      log->VAPrintf(format, args);
-      va_end(args);
-    }
-    for (uint32_t i = 0; i < k_num_gpr_registers; i++) {
-      uint32_t reg = gpr_rax + i;
-      log->Printf("%12s = 0x%16.16" PRIx64, g_register_infos[reg].name,
-                  (&gpr.rax)[reg]);
-    }
-  }
-}
-
 int RegisterContextDarwin_x86_64::ReadGPR(bool force) {
   int set = GPRRegSet;
   if (force || !RegisterSetIsCached(set)) {
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
index 76646d8..49a589f 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp
@@ -12,12 +12,14 @@
 #include "lldb/Core/Value.h"
 #include "lldb/Expression/DWARFExpression.h"
 #include "lldb/Symbol/ArmUnwindInfo.h"
+#include "lldb/Symbol/CallFrameInfo.h"
 #include "lldb/Symbol/DWARFCallFrameInfo.h"
 #include "lldb/Symbol/FuncUnwinders.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Symbol/SymbolContext.h"
+#include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Target/ABI.h"
 #include "lldb/Target/DynamicLoader.h"
 #include "lldb/Target/ExecutionContext.h"
@@ -150,15 +152,8 @@
     UnwindLogMsg("using architectural default unwind method");
   }
 
-  // We require either a symbol or function in the symbols context to be
-  // successfully filled in or this context is of no use to us.
-  const SymbolContextItem resolve_scope =
-      eSymbolContextFunction | eSymbolContextSymbol;
-  if (pc_module_sp.get() && (pc_module_sp->ResolveSymbolContextForAddress(
-                                 m_current_pc, resolve_scope, m_sym_ctx) &
-                             resolve_scope)) {
-    m_sym_ctx_valid = true;
-  }
+  AddressRange addr_range;
+  m_sym_ctx_valid = m_current_pc.ResolveFunctionScope(m_sym_ctx, &addr_range);
 
   if (m_sym_ctx.symbol) {
     UnwindLogMsg("with pc value of 0x%" PRIx64 ", symbol name is '%s'",
@@ -172,9 +167,6 @@
                  current_pc);
   }
 
-  AddressRange addr_range;
-  m_sym_ctx.GetAddressRange(resolve_scope, 0, false, addr_range);
-
   if (IsTrapHandlerSymbol(process, m_sym_ctx)) {
     m_frame_type = eTrapHandlerFrame;
   } else {
@@ -436,24 +428,8 @@
     return;
   }
 
-  bool resolve_tail_call_address = false; // m_current_pc can be one past the
-                                          // address range of the function...
-  // If the saved pc does not point to a function/symbol because it is beyond
-  // the bounds of the correct function and there's no symbol there, we do
-  // *not* want ResolveSymbolContextForAddress to back up the pc by 1, because
-  // then we might not find the correct unwind information later. Instead, let
-  // ResolveSymbolContextForAddress fail, and handle the case via
-  // decr_pc_and_recompute_addr_range below.
-  const SymbolContextItem resolve_scope =
-      eSymbolContextFunction | eSymbolContextSymbol;
-  uint32_t resolved_scope = pc_module_sp->ResolveSymbolContextForAddress(
-      m_current_pc, resolve_scope, m_sym_ctx, resolve_tail_call_address);
-
-  // We require either a symbol or function in the symbols context to be
-  // successfully filled in or this context is of no use to us.
-  if (resolve_scope & resolved_scope) {
-    m_sym_ctx_valid = true;
-  }
+  AddressRange addr_range;
+  m_sym_ctx_valid = m_current_pc.ResolveFunctionScope(m_sym_ctx, &addr_range);
 
   if (m_sym_ctx.symbol) {
     UnwindLogMsg("with pc value of 0x%" PRIx64 ", symbol name is '%s'", pc,
@@ -467,25 +443,30 @@
                  pc);
   }
 
-  AddressRange addr_range;
-  if (!m_sym_ctx.GetAddressRange(resolve_scope, 0, false, addr_range)) {
-    m_sym_ctx_valid = false;
-  }
+  bool decr_pc_and_recompute_addr_range;
 
-  bool decr_pc_and_recompute_addr_range = false;
-
-  // If the symbol lookup failed...
-  if (!m_sym_ctx_valid)
+  if (!m_sym_ctx_valid) {
+    // Always decrement and recompute if the symbol lookup failed
     decr_pc_and_recompute_addr_range = true;
-
-  // Or if we're in the middle of the stack (and not "above" an asynchronous
-  // event like sigtramp), and our "current" pc is the start of a function...
-  if (GetNextFrame()->m_frame_type != eTrapHandlerFrame &&
-      GetNextFrame()->m_frame_type != eDebuggerFrame &&
-      (!m_sym_ctx_valid ||
-       (addr_range.GetBaseAddress().IsValid() &&
-        addr_range.GetBaseAddress().GetSection() == m_current_pc.GetSection() &&
-        addr_range.GetBaseAddress().GetOffset() == m_current_pc.GetOffset()))) {
+  } else if (GetNextFrame()->m_frame_type == eTrapHandlerFrame ||
+             GetNextFrame()->m_frame_type == eDebuggerFrame) {
+    // Don't decrement if we're "above" an asynchronous event like
+    // sigtramp.
+    decr_pc_and_recompute_addr_range = false;
+  } else if (!addr_range.GetBaseAddress().IsValid() ||
+             addr_range.GetBaseAddress().GetSection() != m_current_pc.GetSection() ||
+             addr_range.GetBaseAddress().GetOffset() != m_current_pc.GetOffset()) {
+    // If our "current" pc isn't the start of a function, no need
+    // to decrement and recompute.
+    decr_pc_and_recompute_addr_range = false;
+  } else if (IsTrapHandlerSymbol(process, m_sym_ctx)) {
+    // Signal dispatch may set the return address of the handler it calls to
+    // point to the first byte of a return trampoline (like __kernel_rt_sigreturn),
+    // so do not decrement and recompute if the symbol we already found is a trap
+    // handler.
+    decr_pc_and_recompute_addr_range = false;
+  } else {
+    // Decrement to find the function containing the call.
     decr_pc_and_recompute_addr_range = true;
   }
 
@@ -502,18 +483,8 @@
     Address temporary_pc;
     temporary_pc.SetLoadAddress(pc - 1, &process->GetTarget());
     m_sym_ctx.Clear(false);
-    m_sym_ctx_valid = false;
-    SymbolContextItem resolve_scope =
-        eSymbolContextFunction | eSymbolContextSymbol;
+    m_sym_ctx_valid = temporary_pc.ResolveFunctionScope(m_sym_ctx, &addr_range);
 
-    ModuleSP temporary_module_sp = temporary_pc.GetModule();
-    if (temporary_module_sp &&
-        temporary_module_sp->ResolveSymbolContextForAddress(
-            temporary_pc, resolve_scope, m_sym_ctx) &
-            resolve_scope) {
-      if (m_sym_ctx.GetAddressRange(resolve_scope, 0, false, addr_range))
-        m_sym_ctx_valid = true;
-    }
     UnwindLogMsg("Symbol is now %s",
                  GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
   }
@@ -563,6 +534,7 @@
     active_row =
         m_fast_unwind_plan_sp->GetRowForFunctionOffset(m_current_offset);
     row_register_kind = m_fast_unwind_plan_sp->GetRegisterKind();
+    PropagateTrapHandlerFlagFromUnwindPlan(m_fast_unwind_plan_sp);
     if (active_row.get() && log) {
       StreamString active_row_strm;
       active_row->Dump(active_row_strm, m_fast_unwind_plan_sp.get(), &m_thread,
@@ -575,6 +547,7 @@
     if (IsUnwindPlanValidForCurrentPC(m_full_unwind_plan_sp, valid_offset)) {
       active_row = m_full_unwind_plan_sp->GetRowForFunctionOffset(valid_offset);
       row_register_kind = m_full_unwind_plan_sp->GetRegisterKind();
+      PropagateTrapHandlerFlagFromUnwindPlan(m_full_unwind_plan_sp);
       if (active_row.get() && log) {
         StreamString active_row_strm;
         active_row->Dump(active_row_strm, m_full_unwind_plan_sp.get(),
@@ -812,6 +785,16 @@
         unwind_plan_sp.reset();
     }
 
+    CallFrameInfo *object_file_unwind =
+        pc_module_sp->GetUnwindTable().GetObjectFileUnwindInfo();
+    if (object_file_unwind) {
+      unwind_plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
+      if (object_file_unwind->GetUnwindPlan(m_current_pc, *unwind_plan_sp))
+        return unwind_plan_sp;
+      else
+        unwind_plan_sp.reset();
+    }
+
     return arch_default_unwind_plan_sp;
   }
 
@@ -824,6 +807,9 @@
     m_fast_unwind_plan_sp.reset();
     unwind_plan_sp =
         func_unwinders_sp->GetEHFrameUnwindPlan(process->GetTarget());
+    if (!unwind_plan_sp)
+      unwind_plan_sp =
+          func_unwinders_sp->GetObjectFileUnwindPlan(process->GetTarget());
     if (unwind_plan_sp && unwind_plan_sp->PlanValidAtAddress(m_current_pc) &&
         unwind_plan_sp->GetSourcedFromCompiler() == eLazyBoolYes) {
       return unwind_plan_sp;
@@ -846,6 +832,9 @@
     // intend) or compact unwind (this won't work)
     unwind_plan_sp =
         func_unwinders_sp->GetEHFrameUnwindPlan(process->GetTarget());
+    if (!unwind_plan_sp)
+      unwind_plan_sp =
+          func_unwinders_sp->GetObjectFileUnwindPlan(process->GetTarget());
     if (unwind_plan_sp && unwind_plan_sp->PlanValidAtAddress(m_current_pc)) {
       UnwindLogMsgVerbose("frame uses %s for full UnwindPlan because the "
                           "DynamicLoader suggested we prefer it",
@@ -1512,8 +1501,7 @@
                             process->GetByteOrder(),
                             process->GetAddressByteSize());
     ModuleSP opcode_ctx;
-    DWARFExpression dwarfexpr(opcode_ctx, dwarfdata, nullptr, 0,
-                              unwindplan_regloc.GetDWARFExpressionLength());
+    DWARFExpression dwarfexpr(opcode_ctx, dwarfdata, nullptr);
     dwarfexpr.SetRegisterKind(unwindplan_registerkind);
     Value cfa_val = Scalar(m_cfa);
     cfa_val.SetValueType(Value::eValueTypeLoadAddress);
@@ -1698,6 +1686,7 @@
     // We've copied the fallback unwind plan into the full - now clear the
     // fallback.
     m_fallback_unwind_plan_sp.reset();
+    PropagateTrapHandlerFlagFromUnwindPlan(m_full_unwind_plan_sp);
   }
 
   return true;
@@ -1741,6 +1730,8 @@
 
     m_cfa = new_cfa;
 
+    PropagateTrapHandlerFlagFromUnwindPlan(m_full_unwind_plan_sp);
+
     UnwindLogMsg("switched unconditionally to the fallback unwindplan %s",
                  m_full_unwind_plan_sp->GetSourceName().GetCString());
     return true;
@@ -1748,6 +1739,53 @@
   return false;
 }
 
+void RegisterContextLLDB::PropagateTrapHandlerFlagFromUnwindPlan(
+    lldb::UnwindPlanSP unwind_plan) {
+  if (unwind_plan->GetUnwindPlanForSignalTrap() != eLazyBoolYes) {
+    // Unwind plan does not indicate trap handler.  Do nothing.  We may
+    // already be flagged as trap handler flag due to the symbol being
+    // in the trap handler symbol list, and that should take precedence.
+    return;
+  } else if (m_frame_type != eNormalFrame) {
+    // If this is already a trap handler frame, nothing to do.
+    // If this is a skip or debug or invalid frame, don't override that.
+    return;
+  }
+
+  m_frame_type = eTrapHandlerFrame;
+
+  if (m_current_offset_backed_up_one != m_current_offset) {
+    // We backed up the pc by 1 to compute the symbol context, but
+    // now need to undo that because the pc of the trap handler
+    // frame may in fact be the first instruction of a signal return
+    // trampoline, rather than the instruction after a call.  This
+    // happens on systems where the signal handler dispatch code, rather
+    // than calling the handler and being returned to, jumps to the
+    // handler after pushing the address of a return trampoline on the
+    // stack -- on these systems, when the handler returns, control will
+    // be transferred to the return trampoline, so that's the best
+    // symbol we can present in the callstack.
+    UnwindLogMsg("Resetting current offset and re-doing symbol lookup; "
+                 "old symbol was %s",
+                 GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
+    m_current_offset_backed_up_one = m_current_offset;
+
+    AddressRange addr_range;
+    m_sym_ctx_valid = m_current_pc.ResolveFunctionScope(m_sym_ctx, &addr_range);
+
+    UnwindLogMsg("Symbol is now %s",
+                 GetSymbolOrFunctionName(m_sym_ctx).AsCString(""));
+
+    ExecutionContext exe_ctx(m_thread.shared_from_this());
+    Process *process = exe_ctx.GetProcessPtr();
+    Target *target = &process->GetTarget();
+
+    m_start_pc = addr_range.GetBaseAddress();
+    m_current_offset =
+        m_current_pc.GetLoadAddress(target) - m_start_pc.GetLoadAddress(target);
+  }
+}
+
 bool RegisterContextLLDB::ReadFrameAddress(
     lldb::RegisterKind row_register_kind, UnwindPlan::Row::FAValue &fa,
     addr_t &address) {
@@ -1816,8 +1854,7 @@
                             process->GetByteOrder(),
                             process->GetAddressByteSize());
     ModuleSP opcode_ctx;
-    DWARFExpression dwarfexpr(opcode_ctx, dwarfdata, nullptr, 0,
-                              fa.GetDWARFExpressionLength());
+    DWARFExpression dwarfexpr(opcode_ctx, dwarfdata, nullptr);
     dwarfexpr.SetRegisterKind(row_register_kind);
     Value result;
     Status error;
@@ -1833,12 +1870,66 @@
                  error.AsCString());
     break;
   }
+  case UnwindPlan::Row::FAValue::isRaSearch: {
+    Process &process = *m_thread.GetProcess();
+    lldb::addr_t return_address_hint = GetReturnAddressHint(fa.GetOffset());
+    if (return_address_hint == LLDB_INVALID_ADDRESS)
+      return false;
+    const unsigned max_iterations = 256;
+    for (unsigned i = 0; i < max_iterations; ++i) {
+      Status st;
+      lldb::addr_t candidate_addr =
+          return_address_hint + i * process.GetAddressByteSize();
+      lldb::addr_t candidate =
+          process.ReadPointerFromMemory(candidate_addr, st);
+      if (st.Fail()) {
+        UnwindLogMsg("Cannot read memory at 0x%" PRIx64 ": %s", candidate_addr,
+                     st.AsCString());
+        return false;
+      }
+      Address addr;
+      uint32_t permissions;
+      if (process.GetLoadAddressPermissions(candidate, permissions) &&
+          permissions & lldb::ePermissionsExecutable) {
+        address = candidate_addr;
+        UnwindLogMsg("Heuristically found CFA: 0x%" PRIx64, address);
+        return true;
+      }
+    }
+    UnwindLogMsg("No suitable CFA found");
+    break;
+  }
   default:
     return false;
   }
   return false;
 }
 
+lldb::addr_t RegisterContextLLDB::GetReturnAddressHint(int32_t plan_offset) {
+  addr_t hint;
+  if (!ReadGPRValue(eRegisterKindGeneric, LLDB_REGNUM_GENERIC_SP, hint))
+    return LLDB_INVALID_ADDRESS;
+  if (!m_sym_ctx.module_sp || !m_sym_ctx.symbol)
+    return LLDB_INVALID_ADDRESS;
+
+  hint += plan_offset;
+
+  if (auto next = GetNextFrame()) {
+    if (!next->m_sym_ctx.module_sp || !next->m_sym_ctx.symbol)
+      return LLDB_INVALID_ADDRESS;
+    if (auto expected_size =
+            next->m_sym_ctx.module_sp->GetSymbolFile()->GetParameterStackSize(
+                *next->m_sym_ctx.symbol))
+      hint += *expected_size;
+    else {
+      UnwindLogMsgVerbose("Could not retrieve parameter size: %s",
+                          llvm::toString(expected_size.takeError()).c_str());
+      return LLDB_INVALID_ADDRESS;
+    }
+  }
+  return hint;
+}
+
 // Retrieve a general purpose register value for THIS frame, as saved by the
 // NEXT frame, i.e. the frame that
 // this frame called.  e.g.
@@ -2077,8 +2168,9 @@
     }
     va_end(args);
 
-    log->Printf("%*sth%d/fr%u %s", m_frame_number < 100 ? m_frame_number : 100,
-                "", m_thread.GetIndexID(), m_frame_number, logmsg);
+    LLDB_LOGF(log, "%*sth%d/fr%u %s",
+              m_frame_number < 100 ? m_frame_number : 100, "",
+              m_thread.GetIndexID(), m_frame_number, logmsg);
     free(logmsg);
   }
 }
@@ -2098,8 +2190,9 @@
     }
     va_end(args);
 
-    log->Printf("%*sth%d/fr%u %s", m_frame_number < 100 ? m_frame_number : 100,
-                "", m_thread.GetIndexID(), m_frame_number, logmsg);
+    LLDB_LOGF(log, "%*sth%d/fr%u %s",
+              m_frame_number < 100 ? m_frame_number : 100, "",
+              m_thread.GetIndexID(), m_frame_number, logmsg);
     free(logmsg);
   }
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h
index 64dd394..114ac35 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.h
@@ -120,6 +120,10 @@
   bool IsTrapHandlerSymbol(lldb_private::Process *process,
                            const lldb_private::SymbolContext &m_sym_ctx) const;
 
+  /// Check if the given unwind plan indicates a signal trap handler, and
+  /// update frame type and symbol context if so.
+  void PropagateTrapHandlerFlagFromUnwindPlan(lldb::UnwindPlanSP unwind_plan);
+
   // Provide a location for where THIS function saved the CALLER's register
   // value
   // Or a frame "below" this one saved it, i.e. a function called by this one,
@@ -197,6 +201,8 @@
   bool IsUnwindPlanValidForCurrentPC(lldb::UnwindPlanSP unwind_plan_sp,
                                      int &valid_pc_offset);
 
+  lldb::addr_t GetReturnAddressHint(int32_t plan_offset);
+
   lldb_private::Thread &m_thread;
 
   ///
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp
index 99b897d..db1aa1b 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp
@@ -109,6 +109,7 @@
 
   switch (register_info->m_target_arch.GetMachine()) {
   case llvm::Triple::aarch64:
+  case llvm::Triple::aarch64_32:
     m_reg_info.num_registers = k_num_registers_arm64;
     m_reg_info.num_gpr_registers = k_num_gpr_registers_arm64;
     m_reg_info.num_fpr_registers = k_num_fpr_registers_arm64;
@@ -184,6 +185,7 @@
   if (IsRegisterSetAvailable(set)) {
     switch (m_register_info_up->m_target_arch.GetMachine()) {
     case llvm::Triple::aarch64:
+    case llvm::Triple::aarch64_32:
       return &g_reg_sets_arm64[set];
     default:
       assert(false && "Unhandled target architecture.");
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_i386.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_i386.cpp
new file mode 100644
index 0000000..916d323
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_i386.cpp
@@ -0,0 +1,89 @@
+//===-- RegisterContextWindows_i386.cpp -------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "RegisterContextWindows_i386.h"
+#include "RegisterContext_x86.h"
+#include "lldb-x86-register-enums.h"
+
+using namespace lldb_private;
+using namespace lldb;
+
+namespace {
+// Declare our g_register_infos structure.
+typedef struct _GPR {
+  uint32_t eax;
+  uint32_t ebx;
+  uint32_t ecx;
+  uint32_t edx;
+  uint32_t edi;
+  uint32_t esi;
+  uint32_t ebp;
+  uint32_t esp;
+  uint32_t eip;
+  uint32_t eflags;
+  uint32_t cs;
+  uint32_t fs;
+  uint32_t gs;
+  uint32_t ss;
+  uint32_t ds;
+  uint32_t es;
+} GPR;
+
+#define GPR_OFFSET(regname) (LLVM_EXTENSION offsetof(GPR, regname))
+
+#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4)                       \
+  {                                                                            \
+#reg, alt, sizeof(((GPR *)nullptr)->reg), GPR_OFFSET(reg), eEncodingUint,  \
+        eFormatHex,                                                            \
+        {kind1, kind2, kind3, kind4, lldb_##reg##_i386 }, nullptr, nullptr,    \
+         nullptr, 0                                                            \
+  }
+
+// clang-format off
+static RegisterInfo g_register_infos_i386[] = {
+// General purpose registers     EH_Frame              DWARF                 Generic                     Process Plugin
+//  ===========================  ==================    ================      =========================   ====================
+    DEFINE_GPR(eax,   nullptr,   ehframe_eax_i386,     dwarf_eax_i386,       LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(ebx,   nullptr,   ehframe_ebx_i386,     dwarf_ebx_i386,       LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(ecx,   nullptr,   ehframe_ecx_i386,     dwarf_ecx_i386,       LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(edx,   nullptr,   ehframe_edx_i386,     dwarf_edx_i386,       LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(edi,   nullptr,   ehframe_edi_i386,     dwarf_edi_i386,       LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(esi,   nullptr,   ehframe_esi_i386,     dwarf_esi_i386,       LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(ebp,   "fp",      ehframe_ebp_i386,     dwarf_ebp_i386,       LLDB_REGNUM_GENERIC_FP,     LLDB_INVALID_REGNUM),
+    DEFINE_GPR(esp,   "sp",      ehframe_esp_i386,     dwarf_esp_i386,       LLDB_REGNUM_GENERIC_SP,     LLDB_INVALID_REGNUM),
+    DEFINE_GPR(eip,   "pc",      ehframe_eip_i386,     dwarf_eip_i386,       LLDB_REGNUM_GENERIC_PC,     LLDB_INVALID_REGNUM),
+    DEFINE_GPR(eflags, "flags",  ehframe_eflags_i386,  dwarf_eflags_i386,    LLDB_REGNUM_GENERIC_FLAGS,  LLDB_INVALID_REGNUM),
+    DEFINE_GPR(cs,     nullptr,  LLDB_INVALID_REGNUM,  dwarf_cs_i386,        LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(fs,     nullptr,  LLDB_INVALID_REGNUM,  dwarf_fs_i386,        LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(gs,     nullptr,  LLDB_INVALID_REGNUM,  dwarf_gs_i386,        LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(ss,     nullptr,  LLDB_INVALID_REGNUM,  dwarf_ss_i386,        LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(ds,     nullptr,  LLDB_INVALID_REGNUM,  dwarf_ds_i386,        LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(es,     nullptr,  LLDB_INVALID_REGNUM,  dwarf_es_i386,        LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+};
+// clang-format on
+} // namespace
+
+RegisterContextWindows_i386::RegisterContextWindows_i386(
+    const ArchSpec &target_arch)
+    : lldb_private::RegisterInfoInterface(target_arch) {
+  assert(target_arch.GetMachine() == llvm::Triple::x86);
+}
+
+const RegisterInfo *RegisterContextWindows_i386::GetRegisterInfo() const {
+  return g_register_infos_i386;
+}
+
+uint32_t RegisterContextWindows_i386::GetRegisterCount() const {
+  return llvm::array_lengthof(g_register_infos_i386);
+}
+
+uint32_t RegisterContextWindows_i386::GetUserRegisterCount() const {
+  return llvm::array_lengthof(g_register_infos_i386);
+}
+
+size_t RegisterContextWindows_i386::GetGPRSize() const { return sizeof(GPR); }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_i386.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_i386.h
new file mode 100644
index 0000000..7779cc3
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_i386.h
@@ -0,0 +1,27 @@
+//===-- RegisterContextWindows_i386.h ---------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_RegisterContextWindows_i386_H_
+#define liblldb_RegisterContextWindows_i386_H_
+
+#include "RegisterInfoInterface.h"
+
+class RegisterContextWindows_i386 : public lldb_private::RegisterInfoInterface {
+public:
+  RegisterContextWindows_i386(const lldb_private::ArchSpec &target_arch);
+
+  size_t GetGPRSize() const override;
+
+  const lldb_private::RegisterInfo *GetRegisterInfo() const override;
+
+  uint32_t GetRegisterCount() const override;
+
+  uint32_t GetUserRegisterCount() const override;
+};
+
+#endif
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_x86_64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_x86_64.cpp
new file mode 100644
index 0000000..e90584d
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_x86_64.cpp
@@ -0,0 +1,152 @@
+//===-- RegisterContextWindows_x86_64.cpp -----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "RegisterContextWindows_x86_64.h"
+#include "RegisterContext_x86.h"
+#include "lldb-x86-register-enums.h"
+
+#include <vector>
+
+using namespace lldb_private;
+using namespace lldb;
+
+namespace {
+typedef struct _GPR {
+  uint64_t rax;
+  uint64_t rcx;
+  uint64_t rdx;
+  uint64_t rbx;
+  uint64_t rsp;
+  uint64_t rbp;
+  uint64_t rsi;
+  uint64_t rdi;
+  uint64_t r8;
+  uint64_t r9;
+  uint64_t r10;
+  uint64_t r11;
+  uint64_t r12;
+  uint64_t r13;
+  uint64_t r14;
+  uint64_t r15;
+  uint64_t rip;
+  uint64_t rflags;
+  uint16_t cs;
+  uint16_t fs;
+  uint16_t gs;
+  uint16_t ss;
+  uint16_t ds;
+  uint16_t es;
+} GPR;
+
+#define GPR_OFFSET(regname) (LLVM_EXTENSION offsetof(GPR, regname))
+#define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4)                       \
+  {                                                                            \
+#reg, alt, sizeof(((GPR *)nullptr)->reg), GPR_OFFSET(reg), eEncodingUint,  \
+        eFormatHex,                                                            \
+        {kind1, kind2, kind3, kind4, lldb_##reg##_x86_64 }, nullptr, nullptr,  \
+         nullptr, 0                                                            \
+  }
+
+typedef struct _FPReg {
+  XMMReg xmm0;
+  XMMReg xmm1;
+  XMMReg xmm2;
+  XMMReg xmm3;
+  XMMReg xmm4;
+  XMMReg xmm5;
+  XMMReg xmm6;
+  XMMReg xmm7;
+  XMMReg xmm8;
+  XMMReg xmm9;
+  XMMReg xmm10;
+  XMMReg xmm11;
+  XMMReg xmm12;
+  XMMReg xmm13;
+  XMMReg xmm14;
+  XMMReg xmm15;
+} FPReg;
+
+#define FPR_OFFSET(regname)                                                    \
+  (sizeof(GPR) + LLVM_EXTENSION offsetof(FPReg, regname))
+
+#define DEFINE_XMM(reg)                                                        \
+  {                                                                            \
+#reg, NULL, sizeof(((FPReg *)nullptr)->reg), FPR_OFFSET(reg),              \
+        eEncodingUint, eFormatVectorOfUInt64,                                  \
+        {dwarf_##reg##_x86_64, dwarf_##reg##_x86_64, LLDB_INVALID_REGNUM,      \
+         LLDB_INVALID_REGNUM, lldb_##reg##_x86_64 },                           \
+         nullptr, nullptr, nullptr, 0                                          \
+  }
+
+// clang-format off
+static RegisterInfo g_register_infos_x86_64[] = {
+// General purpose registers     EH_Frame              DWARF                 Generic                     Process Plugin
+//  ===========================  ==================    ================      =========================   ====================
+    DEFINE_GPR(rax,    nullptr,  dwarf_rax_x86_64,     dwarf_rax_x86_64,     LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(rbx,    nullptr,  dwarf_rbx_x86_64,     dwarf_rbx_x86_64,     LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(rcx,    "arg4",   dwarf_rcx_x86_64,     dwarf_rcx_x86_64,     LLDB_REGNUM_GENERIC_ARG4,   LLDB_INVALID_REGNUM),
+    DEFINE_GPR(rdx,    "arg3",   dwarf_rdx_x86_64,     dwarf_rdx_x86_64,     LLDB_REGNUM_GENERIC_ARG3,   LLDB_INVALID_REGNUM),
+    DEFINE_GPR(rdi,    "arg1",   dwarf_rdi_x86_64,     dwarf_rdi_x86_64,     LLDB_REGNUM_GENERIC_ARG1,   LLDB_INVALID_REGNUM),
+    DEFINE_GPR(rsi,    "arg2",   dwarf_rsi_x86_64,     dwarf_rsi_x86_64,     LLDB_REGNUM_GENERIC_ARG2,   LLDB_INVALID_REGNUM),
+    DEFINE_GPR(rbp,    "fp",     dwarf_rbp_x86_64,     dwarf_rbp_x86_64,     LLDB_REGNUM_GENERIC_FP,     LLDB_INVALID_REGNUM),
+    DEFINE_GPR(rsp,    "sp",     dwarf_rsp_x86_64,     dwarf_rsp_x86_64,     LLDB_REGNUM_GENERIC_SP,     LLDB_INVALID_REGNUM),
+    DEFINE_GPR(r8,     "arg5",   dwarf_r8_x86_64,      dwarf_r8_x86_64,      LLDB_REGNUM_GENERIC_ARG5,   LLDB_INVALID_REGNUM),
+    DEFINE_GPR(r9,     "arg6",   dwarf_r9_x86_64,      dwarf_r9_x86_64,      LLDB_REGNUM_GENERIC_ARG6,   LLDB_INVALID_REGNUM),
+    DEFINE_GPR(r10,    nullptr,  dwarf_r10_x86_64,     dwarf_r10_x86_64,     LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(r11,    nullptr,  dwarf_r11_x86_64,     dwarf_r11_x86_64,     LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(r12,    nullptr,  dwarf_r12_x86_64,     dwarf_r12_x86_64,     LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(r13,    nullptr,  dwarf_r13_x86_64,     dwarf_r13_x86_64,     LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(r14,    nullptr,  dwarf_r14_x86_64,     dwarf_r14_x86_64,     LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(r15,    nullptr,  dwarf_r15_x86_64,     dwarf_r15_x86_64,     LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(rip,    "pc",     dwarf_rip_x86_64,     dwarf_rip_x86_64,     LLDB_REGNUM_GENERIC_PC,     LLDB_INVALID_REGNUM),
+    DEFINE_GPR(rflags, "flags",  dwarf_rflags_x86_64,  dwarf_rflags_x86_64,  LLDB_REGNUM_GENERIC_FLAGS,  LLDB_INVALID_REGNUM),
+    DEFINE_GPR(cs,     nullptr,  dwarf_cs_x86_64,      dwarf_cs_x86_64,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(fs,     nullptr,  dwarf_fs_x86_64,      dwarf_fs_x86_64,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(gs,     nullptr,  dwarf_gs_x86_64,      dwarf_gs_x86_64,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(ss,     nullptr,  dwarf_ss_x86_64,      dwarf_ss_x86_64,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(ds,     nullptr,  dwarf_ds_x86_64,      dwarf_ds_x86_64,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_GPR(es,     nullptr,  dwarf_es_x86_64,      dwarf_es_x86_64,      LLDB_INVALID_REGNUM,        LLDB_INVALID_REGNUM),
+    DEFINE_XMM(xmm0),
+    DEFINE_XMM(xmm1),
+    DEFINE_XMM(xmm2),
+    DEFINE_XMM(xmm3),
+    DEFINE_XMM(xmm4),
+    DEFINE_XMM(xmm5),
+    DEFINE_XMM(xmm6),
+    DEFINE_XMM(xmm7),
+    DEFINE_XMM(xmm8),
+    DEFINE_XMM(xmm9),
+    DEFINE_XMM(xmm10),
+    DEFINE_XMM(xmm11),
+    DEFINE_XMM(xmm12),
+    DEFINE_XMM(xmm13),
+    DEFINE_XMM(xmm14),
+    DEFINE_XMM(xmm15)
+};
+// clang-format on
+} // namespace
+
+RegisterContextWindows_x86_64::RegisterContextWindows_x86_64(
+    const ArchSpec &target_arch)
+    : lldb_private::RegisterInfoInterface(target_arch) {
+  assert(target_arch.GetMachine() == llvm::Triple::x86_64);
+}
+
+const RegisterInfo *RegisterContextWindows_x86_64::GetRegisterInfo() const {
+  return g_register_infos_x86_64;
+}
+
+uint32_t RegisterContextWindows_x86_64::GetRegisterCount() const {
+  return llvm::array_lengthof(g_register_infos_x86_64);
+}
+
+uint32_t RegisterContextWindows_x86_64::GetUserRegisterCount() const {
+  return llvm::array_lengthof(g_register_infos_x86_64);
+}
+
+size_t RegisterContextWindows_x86_64::GetGPRSize() const { return sizeof(GPR); }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_x86_64.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_x86_64.h
new file mode 100644
index 0000000..18198b5
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterContextWindows_x86_64.h
@@ -0,0 +1,28 @@
+//===-- RegisterContextWindows_x86_64.h --- ---------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_RegisterContextWindows_x86_64_H_
+#define liblldb_RegisterContextWindows_x86_64_H_
+
+#include "RegisterInfoInterface.h"
+
+class RegisterContextWindows_x86_64
+    : public lldb_private::RegisterInfoInterface {
+public:
+  RegisterContextWindows_x86_64(const lldb_private::ArchSpec &target_arch);
+
+  size_t GetGPRSize() const override;
+
+  const lldb_private::RegisterInfo *GetRegisterInfo() const override;
+
+  uint32_t GetRegisterCount() const override;
+
+  uint32_t GetUserRegisterCount() const override;
+};
+
+#endif
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
index f747152..8b367bd 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp
@@ -57,6 +57,7 @@
 GetRegisterInfoPtr(const lldb_private::ArchSpec &target_arch) {
   switch (target_arch.GetMachine()) {
   case llvm::Triple::aarch64:
+  case llvm::Triple::aarch64_32:
     return g_register_infos_arm64_le;
   default:
     assert(false && "Unhandled target architecture.");
@@ -68,6 +69,7 @@
 GetRegisterInfoCount(const lldb_private::ArchSpec &target_arch) {
   switch (target_arch.GetMachine()) {
   case llvm::Triple::aarch64:
+  case llvm::Triple::aarch64_32:
     return static_cast<uint32_t>(sizeof(g_register_infos_arm64_le) /
                                  sizeof(g_register_infos_arm64_le[0]));
   default:
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h
index 4ee0b52..68c12aa 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h
@@ -456,188 +456,265 @@
 static uint32_t g_d30_invalidates[] = {fpu_v30, fpu_s30, LLDB_INVALID_REGNUM};
 static uint32_t g_d31_invalidates[] = {fpu_v31, fpu_s31, LLDB_INVALID_REGNUM};
 
+// Generates register kinds array for 64-bit general purpose registers
+#define GPR64_KIND(reg, generic_kind)                                          \
+  {                                                                            \
+    arm64_ehframe::reg, arm64_dwarf::reg, generic_kind, LLDB_INVALID_REGNUM,   \
+        gpr_##reg                                                              \
+  }
+
+// Generates register kinds array for registers with lldb kind
+#define MISC_KIND(lldb_kind)                                                   \
+  {                                                                            \
+    LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,             \
+        LLDB_INVALID_REGNUM, lldb_kind                                         \
+  }
+
+// Generates register kinds array for vector registers
+#define VREG_KIND(reg)                                                         \
+  {                                                                            \
+    LLDB_INVALID_REGNUM, arm64_dwarf::reg, LLDB_INVALID_REGNUM,                \
+        LLDB_INVALID_REGNUM, fpu_##reg                                         \
+  }
+
+// Generates register kinds array for cpsr
+#define CPSR_KIND(lldb_kind)                                                   \
+  {                                                                            \
+    arm64_ehframe::cpsr, arm64_dwarf::cpsr, LLDB_REGNUM_GENERIC_FLAGS,         \
+        LLDB_INVALID_REGNUM, lldb_kind                                         \
+  }
+
+#define MISC_GPR_KIND(lldb_kind) CPSR_KIND(lldb_kind)
+#define MISC_FPU_KIND(lldb_kind) MISC_KIND(lldb_kind)
+#define MISC_EXC_KIND(lldb_kind) MISC_KIND(lldb_kind)
+
+// Defines a 64-bit general purpose register
+#define DEFINE_GPR64(reg, generic_kind)                                        \
+  {                                                                            \
+    #reg, nullptr, 8, GPR_OFFSET(gpr_##reg), lldb::eEncodingUint,              \
+        lldb::eFormatHex, GPR64_KIND(reg, generic_kind), nullptr, nullptr,     \
+        nullptr, 0                                                             \
+  }
+
+// Defines a 64-bit general purpose register
+#define DEFINE_GPR64_ALT(reg, alt, generic_kind)                               \
+  {                                                                            \
+    #reg, #alt, 8, GPR_OFFSET(gpr_##reg), lldb::eEncodingUint,                 \
+        lldb::eFormatHex, GPR64_KIND(reg, generic_kind), nullptr, nullptr,     \
+        nullptr, 0                                                             \
+  }
+
+// Defines a 32-bit general purpose pseudo register
+#define DEFINE_GPR32(wreg, xreg)                                               \
+  {                                                                            \
+    #wreg, nullptr, 4,                                                         \
+        GPR_OFFSET(gpr_##xreg) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,               \
+        lldb::eEncodingUint, lldb::eFormatHex, MISC_KIND(gpr_##wreg),          \
+        g_contained_##xreg, g_##wreg##_invalidates, nullptr, 0                 \
+  }
+
+// Defines a vector register with 16-byte size
+#define DEFINE_VREG(reg)                                                       \
+  {                                                                            \
+    #reg, nullptr, 16, FPU_OFFSET(fpu_##reg - fpu_v0), lldb::eEncodingVector,  \
+        lldb::eFormatVectorOfUInt8, VREG_KIND(reg), nullptr, nullptr, nullptr, \
+        0                                                                      \
+  }
+
+// Defines S and D pseudo registers mapping over correspondig vector register
+#define DEFINE_FPU_PSEUDO(reg, size, offset, vreg)                             \
+  {                                                                            \
+    #reg, nullptr, size, FPU_OFFSET(fpu_##vreg - fpu_v0) + offset,             \
+        lldb::eEncodingIEEE754, lldb::eFormatFloat, MISC_KIND(fpu_##reg),      \
+        g_contained_##vreg, g_##reg##_invalidates, nullptr, 0                  \
+  }
+
+// Defines miscellaneous status and control registers like cpsr, fpsr etc
+#define DEFINE_MISC_REGS(reg, size, TYPE, lldb_kind)                           \
+  {                                                                            \
+    #reg, nullptr, size, TYPE##_OFFSET_NAME(reg), lldb::eEncodingUint,         \
+        lldb::eFormatHex, MISC_##TYPE##_KIND(lldb_kind), nullptr, nullptr,     \
+        nullptr, 0                                                             \
+  }
+
 static lldb_private::RegisterInfo g_register_infos_arm64_le[] = {
-    // clang-format off
-  // General purpose registers
-  // NAME   ALT     SZ  OFFSET          ENCODING             FORMAT             EH_FRAME            DWARF             GENERIC                   PROCESS PLUGIN       LLDB      VALUE REGS      INVAL    DYNEXPR  SZ
-  // =====  ======= ==  =============   ===================  ================   =================   ===============   ========================  ===================  ======    ==============  =======  =======  ==
-    {"x0",  nullptr, 8, GPR_OFFSET(0),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x0,  arm64_dwarf::x0,  LLDB_REGNUM_GENERIC_ARG1, LLDB_INVALID_REGNUM, gpr_x0},  nullptr,        nullptr, nullptr, 0},
-    {"x1",  nullptr, 8, GPR_OFFSET(1),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x1,  arm64_dwarf::x1,  LLDB_REGNUM_GENERIC_ARG2, LLDB_INVALID_REGNUM, gpr_x1},  nullptr,        nullptr, nullptr, 0},
-    {"x2",  nullptr, 8, GPR_OFFSET(2),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x2,  arm64_dwarf::x2,  LLDB_REGNUM_GENERIC_ARG3, LLDB_INVALID_REGNUM, gpr_x2},  nullptr,        nullptr, nullptr, 0},
-    {"x3",  nullptr, 8, GPR_OFFSET(3),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x3,  arm64_dwarf::x3,  LLDB_REGNUM_GENERIC_ARG4, LLDB_INVALID_REGNUM, gpr_x3},  nullptr,        nullptr, nullptr, 0},
-    {"x4",  nullptr, 8, GPR_OFFSET(4),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x4,  arm64_dwarf::x4,  LLDB_REGNUM_GENERIC_ARG5, LLDB_INVALID_REGNUM, gpr_x4},  nullptr,        nullptr, nullptr, 0},
-    {"x5",  nullptr, 8, GPR_OFFSET(5),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x5,  arm64_dwarf::x5,  LLDB_REGNUM_GENERIC_ARG6, LLDB_INVALID_REGNUM, gpr_x5},  nullptr,        nullptr, nullptr, 0},
-    {"x6",  nullptr, 8, GPR_OFFSET(6),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x6,  arm64_dwarf::x6,  LLDB_REGNUM_GENERIC_ARG7, LLDB_INVALID_REGNUM, gpr_x6},  nullptr,        nullptr, nullptr, 0},
-    {"x7",  nullptr, 8, GPR_OFFSET(7),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x7,  arm64_dwarf::x7,  LLDB_REGNUM_GENERIC_ARG8, LLDB_INVALID_REGNUM, gpr_x7},  nullptr,        nullptr, nullptr, 0},
-    {"x8",  nullptr, 8, GPR_OFFSET(8),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x8,  arm64_dwarf::x8,  LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x8},  nullptr,        nullptr, nullptr, 0},
-    {"x9",  nullptr, 8, GPR_OFFSET(9),  lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x9,  arm64_dwarf::x9,  LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x9},  nullptr,        nullptr, nullptr, 0},
-    {"x10", nullptr, 8, GPR_OFFSET(10), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x10, arm64_dwarf::x10, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x10}, nullptr,        nullptr, nullptr, 0},
-    {"x11", nullptr, 8, GPR_OFFSET(11), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x11, arm64_dwarf::x11, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x11}, nullptr,        nullptr, nullptr, 0},
-    {"x12", nullptr, 8, GPR_OFFSET(12), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x12, arm64_dwarf::x12, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x12}, nullptr,        nullptr, nullptr, 0},
-    {"x13", nullptr, 8, GPR_OFFSET(13), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x13, arm64_dwarf::x13, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x13}, nullptr,        nullptr, nullptr, 0},
-    {"x14", nullptr, 8, GPR_OFFSET(14), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x14, arm64_dwarf::x14, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x14}, nullptr,        nullptr, nullptr, 0},
-    {"x15", nullptr, 8, GPR_OFFSET(15), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x15, arm64_dwarf::x15, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x15}, nullptr,        nullptr, nullptr, 0},
-    {"x16", nullptr, 8, GPR_OFFSET(16), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x16, arm64_dwarf::x16, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x16}, nullptr,        nullptr, nullptr, 0},
-    {"x17", nullptr, 8, GPR_OFFSET(17), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x17, arm64_dwarf::x17, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x17}, nullptr,        nullptr, nullptr, 0},
-    {"x18", nullptr, 8, GPR_OFFSET(18), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x18, arm64_dwarf::x18, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x18}, nullptr,        nullptr, nullptr, 0},
-    {"x19", nullptr, 8, GPR_OFFSET(19), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x19, arm64_dwarf::x19, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x19}, nullptr,        nullptr, nullptr, 0},
-    {"x20", nullptr, 8, GPR_OFFSET(20), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x20, arm64_dwarf::x20, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x20}, nullptr,        nullptr, nullptr, 0},
-    {"x21", nullptr, 8, GPR_OFFSET(21), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x21, arm64_dwarf::x21, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x21}, nullptr,        nullptr, nullptr, 0},
-    {"x22", nullptr, 8, GPR_OFFSET(22), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x22, arm64_dwarf::x22, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x22}, nullptr,        nullptr, nullptr, 0},
-    {"x23", nullptr, 8, GPR_OFFSET(23), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x23, arm64_dwarf::x23, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x23}, nullptr,        nullptr, nullptr, 0},
-    {"x24", nullptr, 8, GPR_OFFSET(24), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x24, arm64_dwarf::x24, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x24}, nullptr,        nullptr, nullptr, 0},
-    {"x25", nullptr, 8, GPR_OFFSET(25), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x25, arm64_dwarf::x25, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x25}, nullptr,        nullptr, nullptr, 0},
-    {"x26", nullptr, 8, GPR_OFFSET(26), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x26, arm64_dwarf::x26, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x26}, nullptr,        nullptr, nullptr, 0},
-    {"x27", nullptr, 8, GPR_OFFSET(27), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x27, arm64_dwarf::x27, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x27}, nullptr,        nullptr, nullptr, 0},
-    {"x28", nullptr, 8, GPR_OFFSET(28), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::x28, arm64_dwarf::x28, LLDB_INVALID_REGNUM,      LLDB_INVALID_REGNUM, gpr_x28}, nullptr,        nullptr, nullptr, 0},
-    {"fp",  "x29",   8, GPR_OFFSET(29), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::fp, arm64_dwarf::fp,   LLDB_REGNUM_GENERIC_FP,   LLDB_INVALID_REGNUM, gpr_fp},  nullptr,        nullptr, nullptr, 0},
-    {"lr",  "x30",   8, GPR_OFFSET(30), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::lr, arm64_dwarf::lr,   LLDB_REGNUM_GENERIC_RA,   LLDB_INVALID_REGNUM, gpr_lr},  nullptr,        nullptr, nullptr, 0},
-    {"sp",  "x31",   8, GPR_OFFSET(31), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::sp, arm64_dwarf::sp,   LLDB_REGNUM_GENERIC_SP,   LLDB_INVALID_REGNUM, gpr_sp},  nullptr,        nullptr, nullptr, 0},
-    {"pc",  nullptr, 8, GPR_OFFSET(32), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::pc, arm64_dwarf::pc,   LLDB_REGNUM_GENERIC_PC,   LLDB_INVALID_REGNUM, gpr_pc},  nullptr,        nullptr, nullptr, 0},
+    // DEFINE_GPR64(name, GENERIC KIND)
+    DEFINE_GPR64(x0, LLDB_REGNUM_GENERIC_ARG1),
+    DEFINE_GPR64(x1, LLDB_REGNUM_GENERIC_ARG2),
+    DEFINE_GPR64(x2, LLDB_REGNUM_GENERIC_ARG3),
+    DEFINE_GPR64(x3, LLDB_REGNUM_GENERIC_ARG4),
+    DEFINE_GPR64(x4, LLDB_REGNUM_GENERIC_ARG5),
+    DEFINE_GPR64(x5, LLDB_REGNUM_GENERIC_ARG6),
+    DEFINE_GPR64(x6, LLDB_REGNUM_GENERIC_ARG7),
+    DEFINE_GPR64(x7, LLDB_REGNUM_GENERIC_ARG8),
+    DEFINE_GPR64(x8, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x9, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x10, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x11, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x12, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x13, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x14, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x15, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x16, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x17, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x18, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x19, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x20, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x21, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x22, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x23, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x24, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x25, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x26, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x27, LLDB_INVALID_REGNUM),
+    DEFINE_GPR64(x28, LLDB_INVALID_REGNUM),
+    // DEFINE_GPR64(name, GENERIC KIND)
+    DEFINE_GPR64_ALT(fp, x29, LLDB_REGNUM_GENERIC_FP),
+    DEFINE_GPR64_ALT(lr, x30, LLDB_REGNUM_GENERIC_RA),
+    DEFINE_GPR64_ALT(sp, x31, LLDB_REGNUM_GENERIC_SP),
+    DEFINE_GPR64(pc, LLDB_REGNUM_GENERIC_PC),
 
-    {"cpsr",nullptr, 4, GPR_OFFSET_NAME(cpsr), lldb::eEncodingUint, lldb::eFormatHex, {arm64_ehframe::cpsr, arm64_dwarf::cpsr, LLDB_REGNUM_GENERIC_FLAGS, LLDB_INVALID_REGNUM, gpr_cpsr}, nullptr, nullptr, nullptr, 0},
+    // DEFINE_MISC_REGS(name, size, TYPE, lldb kind)
+    DEFINE_MISC_REGS(cpsr, 4, GPR, gpr_cpsr),
 
-  // NAME   ALT     SZ  OFFSET                                           ENCODING             FORMAT             EH_FRAME             DWARF                GENERIC              PROCESS PLUGIN       LLDB      VALUE            INVALIDATES        DYNEXPR  SZ
-  // =====  ======= ==  ==============================================   ===================  ================   =================    ===============      ===================  ===================  ======    ===============  =================  =======  ==
-    {"w0",  nullptr, 4, GPR_OFFSET(0) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w0},  g_contained_x0,  g_w0_invalidates,  nullptr, 0},
-    {"w1",  nullptr, 4, GPR_OFFSET(1) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w1},  g_contained_x1,  g_w1_invalidates,  nullptr, 0},
-    {"w2",  nullptr, 4, GPR_OFFSET(2) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w2},  g_contained_x2,  g_w2_invalidates,  nullptr, 0},
-    {"w3",  nullptr, 4, GPR_OFFSET(3) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w3},  g_contained_x3,  g_w3_invalidates,  nullptr, 0},
-    {"w4",  nullptr, 4, GPR_OFFSET(4) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w4},  g_contained_x4,  g_w4_invalidates,  nullptr, 0},
-    {"w5",  nullptr, 4, GPR_OFFSET(5) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w5},  g_contained_x5,  g_w5_invalidates,  nullptr, 0},
-    {"w6",  nullptr, 4, GPR_OFFSET(6) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w6},  g_contained_x6,  g_w6_invalidates,  nullptr, 0},
-    {"w7",  nullptr, 4, GPR_OFFSET(7) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w7},  g_contained_x7,  g_w7_invalidates,  nullptr, 0},
-    {"w8",  nullptr, 4, GPR_OFFSET(8) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w8},  g_contained_x8,  g_w8_invalidates,  nullptr, 0},
-    {"w9",  nullptr, 4, GPR_OFFSET(9) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET,  lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w9},  g_contained_x9,  g_w9_invalidates,  nullptr, 0},
-    {"w10", nullptr, 4, GPR_OFFSET(10) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w10}, g_contained_x10, g_w10_invalidates, nullptr, 0},
-    {"w11", nullptr, 4, GPR_OFFSET(11) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w11}, g_contained_x11, g_w11_invalidates, nullptr, 0},
-    {"w12", nullptr, 4, GPR_OFFSET(12) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w12}, g_contained_x12, g_w12_invalidates, nullptr, 0},
-    {"w13", nullptr, 4, GPR_OFFSET(13) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w13}, g_contained_x13, g_w13_invalidates, nullptr, 0},
-    {"w14", nullptr, 4, GPR_OFFSET(14) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w14}, g_contained_x14, g_w14_invalidates, nullptr, 0},
-    {"w15", nullptr, 4, GPR_OFFSET(15) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w15}, g_contained_x15, g_w15_invalidates, nullptr, 0},
-    {"w16", nullptr, 4, GPR_OFFSET(16) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w16}, g_contained_x16, g_w16_invalidates, nullptr, 0},
-    {"w17", nullptr, 4, GPR_OFFSET(17) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w17}, g_contained_x17, g_w17_invalidates, nullptr, 0},
-    {"w18", nullptr, 4, GPR_OFFSET(18) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w18}, g_contained_x18, g_w18_invalidates, nullptr, 0},
-    {"w19", nullptr, 4, GPR_OFFSET(19) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w19}, g_contained_x19, g_w19_invalidates, nullptr, 0},
-    {"w20", nullptr, 4, GPR_OFFSET(20) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w20}, g_contained_x20, g_w20_invalidates, nullptr, 0},
-    {"w21", nullptr, 4, GPR_OFFSET(21) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w21}, g_contained_x21, g_w21_invalidates, nullptr, 0},
-    {"w22", nullptr, 4, GPR_OFFSET(22) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w22}, g_contained_x22, g_w22_invalidates, nullptr, 0},
-    {"w23", nullptr, 4, GPR_OFFSET(23) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w23}, g_contained_x23, g_w23_invalidates, nullptr, 0},
-    {"w24", nullptr, 4, GPR_OFFSET(24) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w24}, g_contained_x24, g_w24_invalidates, nullptr, 0},
-    {"w25", nullptr, 4, GPR_OFFSET(25) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w25}, g_contained_x25, g_w25_invalidates, nullptr, 0},
-    {"w26", nullptr, 4, GPR_OFFSET(26) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w26}, g_contained_x26, g_w26_invalidates, nullptr, 0},
-    {"w27", nullptr, 4, GPR_OFFSET(27) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w27}, g_contained_x27, g_w27_invalidates, nullptr, 0},
-    {"w28", nullptr, 4, GPR_OFFSET(28) + GPR_W_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, gpr_w28}, g_contained_x28, g_w28_invalidates, nullptr, 0},
+    // DEFINE_GPR32(name, parent name)
+    DEFINE_GPR32(w0, x0),
+    DEFINE_GPR32(w1, x1),
+    DEFINE_GPR32(w2, x2),
+    DEFINE_GPR32(w3, x3),
+    DEFINE_GPR32(w4, x4),
+    DEFINE_GPR32(w5, x5),
+    DEFINE_GPR32(w6, x6),
+    DEFINE_GPR32(w7, x7),
+    DEFINE_GPR32(w8, x8),
+    DEFINE_GPR32(w9, x9),
+    DEFINE_GPR32(w10, x10),
+    DEFINE_GPR32(w11, x11),
+    DEFINE_GPR32(w12, x12),
+    DEFINE_GPR32(w13, x13),
+    DEFINE_GPR32(w14, x14),
+    DEFINE_GPR32(w15, x15),
+    DEFINE_GPR32(w16, x16),
+    DEFINE_GPR32(w17, x17),
+    DEFINE_GPR32(w18, x18),
+    DEFINE_GPR32(w19, x19),
+    DEFINE_GPR32(w20, x20),
+    DEFINE_GPR32(w21, x21),
+    DEFINE_GPR32(w22, x22),
+    DEFINE_GPR32(w23, x23),
+    DEFINE_GPR32(w24, x24),
+    DEFINE_GPR32(w25, x25),
+    DEFINE_GPR32(w26, x26),
+    DEFINE_GPR32(w27, x27),
+    DEFINE_GPR32(w28, x28),
 
-  // NAME   ALT      SZ  OFFSET         ENCODING                FORMAT                       EH_FRAME             DWARF             GENERIC              PROCESS PLUGIN       LLDB      VALUE REGS      INVAL    DYNEXPR  SZ
-  // =====  =======  ==  =============  ===================     ================             =================    ===============   ===================  ===================  ======    ==============  =======  =======  ==
-    {"v0",  nullptr, 16, FPU_OFFSET(0), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v0,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v0},  nullptr,        nullptr, nullptr, 0},
-    {"v1",  nullptr, 16, FPU_OFFSET(1), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v1,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v1},  nullptr,        nullptr, nullptr, 0},
-    {"v2",  nullptr, 16, FPU_OFFSET(2), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v2,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v2},  nullptr,        nullptr, nullptr, 0},
-    {"v3",  nullptr, 16, FPU_OFFSET(3), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v3,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v3},  nullptr,        nullptr, nullptr, 0},
-    {"v4",  nullptr, 16, FPU_OFFSET(4), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v4,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v4},  nullptr,        nullptr, nullptr, 0},
-    {"v5",  nullptr, 16, FPU_OFFSET(5), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v5,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v5},  nullptr,        nullptr, nullptr, 0},
-    {"v6",  nullptr, 16, FPU_OFFSET(6), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v6,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v6},  nullptr,        nullptr, nullptr, 0},
-    {"v7",  nullptr, 16, FPU_OFFSET(7), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v7,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v7},  nullptr,        nullptr, nullptr, 0},
-    {"v8",  nullptr, 16, FPU_OFFSET(8), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v8,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v8},  nullptr,        nullptr, nullptr, 0},
-    {"v9",  nullptr, 16, FPU_OFFSET(9), lldb::eEncodingVector,  lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v9,  LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v9},  nullptr,        nullptr, nullptr, 0},
-    {"v10", nullptr, 16, FPU_OFFSET(10), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v10, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v10}, nullptr,        nullptr, nullptr, 0},
-    {"v11", nullptr, 16, FPU_OFFSET(11), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v11, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v11}, nullptr,        nullptr, nullptr, 0},
-    {"v12", nullptr, 16, FPU_OFFSET(12), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v12, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v12}, nullptr,        nullptr, nullptr, 0},
-    {"v13", nullptr, 16, FPU_OFFSET(13), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v13, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v13}, nullptr,        nullptr, nullptr, 0},
-    {"v14", nullptr, 16, FPU_OFFSET(14), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v14, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v14}, nullptr,        nullptr, nullptr, 0},
-    {"v15", nullptr, 16, FPU_OFFSET(15), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v15, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v15}, nullptr,        nullptr, nullptr, 0},
-    {"v16", nullptr, 16, FPU_OFFSET(16), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v16, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v16}, nullptr,        nullptr, nullptr, 0},
-    {"v17", nullptr, 16, FPU_OFFSET(17), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v17, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v17}, nullptr,        nullptr, nullptr, 0},
-    {"v18", nullptr, 16, FPU_OFFSET(18), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v18, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v18}, nullptr,        nullptr, nullptr, 0},
-    {"v19", nullptr, 16, FPU_OFFSET(19), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v19, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v19}, nullptr,        nullptr, nullptr, 0},
-    {"v20", nullptr, 16, FPU_OFFSET(20), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v20, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v20}, nullptr,        nullptr, nullptr, 0},
-    {"v21", nullptr, 16, FPU_OFFSET(21), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v21, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v21}, nullptr,        nullptr, nullptr, 0},
-    {"v22", nullptr, 16, FPU_OFFSET(22), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v22, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v22}, nullptr,        nullptr, nullptr, 0},
-    {"v23", nullptr, 16, FPU_OFFSET(23), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v23, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v23}, nullptr,        nullptr, nullptr, 0},
-    {"v24", nullptr, 16, FPU_OFFSET(24), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v24, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v24}, nullptr,        nullptr, nullptr, 0},
-    {"v25", nullptr, 16, FPU_OFFSET(25), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v25, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v25}, nullptr,        nullptr, nullptr, 0},
-    {"v26", nullptr, 16, FPU_OFFSET(26), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v26, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v26}, nullptr,        nullptr, nullptr, 0},
-    {"v27", nullptr, 16, FPU_OFFSET(27), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v27, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v27}, nullptr,        nullptr, nullptr, 0},
-    {"v28", nullptr, 16, FPU_OFFSET(28), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v28, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v28}, nullptr,        nullptr, nullptr, 0},
-    {"v29", nullptr, 16, FPU_OFFSET(29), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v29, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v29}, nullptr,        nullptr, nullptr, 0},
-    {"v30", nullptr, 16, FPU_OFFSET(30), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v30, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v30}, nullptr,        nullptr, nullptr, 0},
-    {"v31", nullptr, 16, FPU_OFFSET(31), lldb::eEncodingVector, lldb::eFormatVectorOfUInt8, {LLDB_INVALID_REGNUM, arm64_dwarf::v31, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_v31}, nullptr,        nullptr, nullptr, 0},
+    // DEFINE_VREG(name)
+    DEFINE_VREG(v0),
+    DEFINE_VREG(v1),
+    DEFINE_VREG(v2),
+    DEFINE_VREG(v3),
+    DEFINE_VREG(v4),
+    DEFINE_VREG(v5),
+    DEFINE_VREG(v6),
+    DEFINE_VREG(v7),
+    DEFINE_VREG(v8),
+    DEFINE_VREG(v9),
+    DEFINE_VREG(v10),
+    DEFINE_VREG(v11),
+    DEFINE_VREG(v12),
+    DEFINE_VREG(v13),
+    DEFINE_VREG(v14),
+    DEFINE_VREG(v15),
+    DEFINE_VREG(v16),
+    DEFINE_VREG(v17),
+    DEFINE_VREG(v18),
+    DEFINE_VREG(v19),
+    DEFINE_VREG(v20),
+    DEFINE_VREG(v21),
+    DEFINE_VREG(v22),
+    DEFINE_VREG(v23),
+    DEFINE_VREG(v24),
+    DEFINE_VREG(v25),
+    DEFINE_VREG(v26),
+    DEFINE_VREG(v27),
+    DEFINE_VREG(v28),
+    DEFINE_VREG(v29),
+    DEFINE_VREG(v30),
+    DEFINE_VREG(v31),
 
-  // NAME   ALT     SZ  OFFSET                                           ENCODING                FORMAT               EH_FRAME             DWARF                GENERIC              PROCESS PLUGIN       LLDB      VALUE REGS       INVALIDATES        DYNEXPR  SZ
-  // =====  ======= ==  ==============================================   ===================     ================     =================    ===============      ===================  ===================  ======    ===============  =================  =======  ==
-    {"s0",  nullptr, 4, FPU_OFFSET(0)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s0},  g_contained_v0,  g_s0_invalidates,  nullptr, 0},
-    {"s1",  nullptr, 4, FPU_OFFSET(1)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s1},  g_contained_v1,  g_s1_invalidates,  nullptr, 0},
-    {"s2",  nullptr, 4, FPU_OFFSET(2)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s2},  g_contained_v2,  g_s2_invalidates,  nullptr, 0},
-    {"s3",  nullptr, 4, FPU_OFFSET(3)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s3},  g_contained_v3,  g_s3_invalidates,  nullptr, 0},
-    {"s4",  nullptr, 4, FPU_OFFSET(4)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s4},  g_contained_v4,  g_s4_invalidates,  nullptr, 0},
-    {"s5",  nullptr, 4, FPU_OFFSET(5)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s5},  g_contained_v5,  g_s5_invalidates,  nullptr, 0},
-    {"s6",  nullptr, 4, FPU_OFFSET(6)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s6},  g_contained_v6,  g_s6_invalidates,  nullptr, 0},
-    {"s7",  nullptr, 4, FPU_OFFSET(7)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s7},  g_contained_v7,  g_s7_invalidates,  nullptr, 0},
-    {"s8",  nullptr, 4, FPU_OFFSET(8)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s8},  g_contained_v8,  g_s8_invalidates,  nullptr, 0},
-    {"s9",  nullptr, 4, FPU_OFFSET(9)  + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s9},  g_contained_v9,  g_s9_invalidates,  nullptr, 0},
-    {"s10", nullptr, 4, FPU_OFFSET(10) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s10}, g_contained_v10, g_s10_invalidates, nullptr, 0},
-    {"s11", nullptr, 4, FPU_OFFSET(11) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s11}, g_contained_v11, g_s11_invalidates, nullptr, 0},
-    {"s12", nullptr, 4, FPU_OFFSET(12) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s12}, g_contained_v12, g_s12_invalidates, nullptr, 0},
-    {"s13", nullptr, 4, FPU_OFFSET(13) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s13}, g_contained_v13, g_s13_invalidates, nullptr, 0},
-    {"s14", nullptr, 4, FPU_OFFSET(14) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s14}, g_contained_v14, g_s14_invalidates, nullptr, 0},
-    {"s15", nullptr, 4, FPU_OFFSET(15) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s15}, g_contained_v15, g_s15_invalidates, nullptr, 0},
-    {"s16", nullptr, 4, FPU_OFFSET(16) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s16}, g_contained_v16, g_s16_invalidates, nullptr, 0},
-    {"s17", nullptr, 4, FPU_OFFSET(17) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s17}, g_contained_v17, g_s17_invalidates, nullptr, 0},
-    {"s18", nullptr, 4, FPU_OFFSET(18) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s18}, g_contained_v18, g_s18_invalidates, nullptr, 0},
-    {"s19", nullptr, 4, FPU_OFFSET(19) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s19}, g_contained_v19, g_s19_invalidates, nullptr, 0},
-    {"s20", nullptr, 4, FPU_OFFSET(20) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s20}, g_contained_v20, g_s20_invalidates, nullptr, 0},
-    {"s21", nullptr, 4, FPU_OFFSET(21) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s21}, g_contained_v21, g_s21_invalidates, nullptr, 0},
-    {"s22", nullptr, 4, FPU_OFFSET(22) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s22}, g_contained_v22, g_s22_invalidates, nullptr, 0},
-    {"s23", nullptr, 4, FPU_OFFSET(23) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s23}, g_contained_v23, g_s23_invalidates, nullptr, 0},
-    {"s24", nullptr, 4, FPU_OFFSET(24) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s24}, g_contained_v24, g_s24_invalidates, nullptr, 0},
-    {"s25", nullptr, 4, FPU_OFFSET(25) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s25}, g_contained_v25, g_s25_invalidates, nullptr, 0},
-    {"s26", nullptr, 4, FPU_OFFSET(26) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s26}, g_contained_v26, g_s26_invalidates, nullptr, 0},
-    {"s27", nullptr, 4, FPU_OFFSET(27) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s27}, g_contained_v27, g_s27_invalidates, nullptr, 0},
-    {"s28", nullptr, 4, FPU_OFFSET(28) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s28}, g_contained_v28, g_s28_invalidates, nullptr, 0},
-    {"s29", nullptr, 4, FPU_OFFSET(29) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s29}, g_contained_v29, g_s29_invalidates, nullptr, 0},
-    {"s30", nullptr, 4, FPU_OFFSET(30) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s30}, g_contained_v30, g_s30_invalidates, nullptr, 0},
-    {"s31", nullptr, 4, FPU_OFFSET(31) + FPU_S_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_s31}, g_contained_v31, g_s31_invalidates, nullptr, 0},
+    // DEFINE_FPU_PSEUDO(name, size, ENDIAN OFFSET, parent register)
+    DEFINE_FPU_PSEUDO(s0, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v0),
+    DEFINE_FPU_PSEUDO(s1, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v1),
+    DEFINE_FPU_PSEUDO(s2, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v2),
+    DEFINE_FPU_PSEUDO(s3, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v3),
+    DEFINE_FPU_PSEUDO(s4, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v4),
+    DEFINE_FPU_PSEUDO(s5, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v5),
+    DEFINE_FPU_PSEUDO(s6, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v6),
+    DEFINE_FPU_PSEUDO(s7, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v7),
+    DEFINE_FPU_PSEUDO(s8, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v8),
+    DEFINE_FPU_PSEUDO(s9, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v9),
+    DEFINE_FPU_PSEUDO(s10, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v10),
+    DEFINE_FPU_PSEUDO(s11, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v11),
+    DEFINE_FPU_PSEUDO(s12, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v12),
+    DEFINE_FPU_PSEUDO(s13, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v13),
+    DEFINE_FPU_PSEUDO(s14, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v14),
+    DEFINE_FPU_PSEUDO(s15, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v15),
+    DEFINE_FPU_PSEUDO(s16, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v16),
+    DEFINE_FPU_PSEUDO(s17, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v17),
+    DEFINE_FPU_PSEUDO(s18, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v18),
+    DEFINE_FPU_PSEUDO(s19, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v19),
+    DEFINE_FPU_PSEUDO(s20, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v20),
+    DEFINE_FPU_PSEUDO(s21, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v21),
+    DEFINE_FPU_PSEUDO(s22, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v22),
+    DEFINE_FPU_PSEUDO(s23, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v23),
+    DEFINE_FPU_PSEUDO(s24, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v24),
+    DEFINE_FPU_PSEUDO(s25, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v25),
+    DEFINE_FPU_PSEUDO(s26, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v26),
+    DEFINE_FPU_PSEUDO(s27, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v27),
+    DEFINE_FPU_PSEUDO(s28, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v28),
+    DEFINE_FPU_PSEUDO(s29, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v29),
+    DEFINE_FPU_PSEUDO(s30, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v30),
+    DEFINE_FPU_PSEUDO(s31, 4, FPU_S_PSEUDO_REG_ENDIAN_OFFSET, v31),
 
-    {"d0",  nullptr, 8, FPU_OFFSET(0)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d0},  g_contained_v0,  g_d0_invalidates,  nullptr, 0},
-    {"d1",  nullptr, 8, FPU_OFFSET(1)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d1},  g_contained_v1,  g_d1_invalidates,  nullptr, 0},
-    {"d2",  nullptr, 8, FPU_OFFSET(2)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d2},  g_contained_v2,  g_d2_invalidates,  nullptr, 0},
-    {"d3",  nullptr, 8, FPU_OFFSET(3)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d3},  g_contained_v3,  g_d3_invalidates,  nullptr, 0},
-    {"d4",  nullptr, 8, FPU_OFFSET(4)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d4},  g_contained_v4,  g_d4_invalidates,  nullptr, 0},
-    {"d5",  nullptr, 8, FPU_OFFSET(5)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d5},  g_contained_v5,  g_d5_invalidates,  nullptr, 0},
-    {"d6",  nullptr, 8, FPU_OFFSET(6)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d6},  g_contained_v6,  g_d6_invalidates,  nullptr, 0},
-    {"d7",  nullptr, 8, FPU_OFFSET(7)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d7},  g_contained_v7,  g_d7_invalidates,  nullptr, 0},
-    {"d8",  nullptr, 8, FPU_OFFSET(8)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d8},  g_contained_v8,  g_d8_invalidates,  nullptr, 0},
-    {"d9",  nullptr, 8, FPU_OFFSET(9)  + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d9},  g_contained_v9,  g_d9_invalidates,  nullptr, 0},
-    {"d10", nullptr, 8, FPU_OFFSET(10) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d10}, g_contained_v10, g_d10_invalidates, nullptr, 0},
-    {"d11", nullptr, 8, FPU_OFFSET(11) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d11}, g_contained_v11, g_d11_invalidates, nullptr, 0},
-    {"d12", nullptr, 8, FPU_OFFSET(12) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d12}, g_contained_v12, g_d12_invalidates, nullptr, 0},
-    {"d13", nullptr, 8, FPU_OFFSET(13) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d13}, g_contained_v13, g_d13_invalidates, nullptr, 0},
-    {"d14", nullptr, 8, FPU_OFFSET(14) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d14}, g_contained_v14, g_d14_invalidates, nullptr, 0},
-    {"d15", nullptr, 8, FPU_OFFSET(15) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d15}, g_contained_v15, g_d15_invalidates, nullptr, 0},
-    {"d16", nullptr, 8, FPU_OFFSET(16) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d16}, g_contained_v16, g_d16_invalidates, nullptr, 0},
-    {"d17", nullptr, 8, FPU_OFFSET(17) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d17}, g_contained_v17, g_d17_invalidates, nullptr, 0},
-    {"d18", nullptr, 8, FPU_OFFSET(18) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d18}, g_contained_v18, g_d18_invalidates, nullptr, 0},
-    {"d19", nullptr, 8, FPU_OFFSET(19) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d19}, g_contained_v19, g_d19_invalidates, nullptr, 0},
-    {"d20", nullptr, 8, FPU_OFFSET(20) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d20}, g_contained_v20, g_d20_invalidates, nullptr, 0},
-    {"d21", nullptr, 8, FPU_OFFSET(21) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d21}, g_contained_v21, g_d21_invalidates, nullptr, 0},
-    {"d22", nullptr, 8, FPU_OFFSET(22) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d22}, g_contained_v22, g_d22_invalidates, nullptr, 0},
-    {"d23", nullptr, 8, FPU_OFFSET(23) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d23}, g_contained_v23, g_d23_invalidates, nullptr, 0},
-    {"d24", nullptr, 8, FPU_OFFSET(24) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d24}, g_contained_v24, g_d24_invalidates, nullptr, 0},
-    {"d25", nullptr, 8, FPU_OFFSET(25) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d25}, g_contained_v25, g_d25_invalidates, nullptr, 0},
-    {"d26", nullptr, 8, FPU_OFFSET(26) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d26}, g_contained_v26, g_d26_invalidates, nullptr, 0},
-    {"d27", nullptr, 8, FPU_OFFSET(27) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d27}, g_contained_v27, g_d27_invalidates, nullptr, 0},
-    {"d28", nullptr, 8, FPU_OFFSET(28) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d28}, g_contained_v28, g_d28_invalidates, nullptr, 0},
-    {"d29", nullptr, 8, FPU_OFFSET(29) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d29}, g_contained_v29, g_d29_invalidates, nullptr, 0},
-    {"d30", nullptr, 8, FPU_OFFSET(30) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d30}, g_contained_v30, g_d30_invalidates, nullptr, 0},
-    {"d31", nullptr, 8, FPU_OFFSET(31) + FPU_D_PSEUDO_REG_ENDIAN_OFFSET, lldb::eEncodingIEEE754, lldb::eFormatFloat, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_d31}, g_contained_v31, g_d31_invalidates, nullptr, 0},
+    DEFINE_FPU_PSEUDO(d0, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v0),
+    DEFINE_FPU_PSEUDO(d1, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v1),
+    DEFINE_FPU_PSEUDO(d2, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v2),
+    DEFINE_FPU_PSEUDO(d3, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v3),
+    DEFINE_FPU_PSEUDO(d4, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v4),
+    DEFINE_FPU_PSEUDO(d5, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v5),
+    DEFINE_FPU_PSEUDO(d6, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v6),
+    DEFINE_FPU_PSEUDO(d7, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v7),
+    DEFINE_FPU_PSEUDO(d8, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v8),
+    DEFINE_FPU_PSEUDO(d9, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v9),
+    DEFINE_FPU_PSEUDO(d10, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v10),
+    DEFINE_FPU_PSEUDO(d11, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v11),
+    DEFINE_FPU_PSEUDO(d12, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v12),
+    DEFINE_FPU_PSEUDO(d13, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v13),
+    DEFINE_FPU_PSEUDO(d14, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v14),
+    DEFINE_FPU_PSEUDO(d15, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v15),
+    DEFINE_FPU_PSEUDO(d16, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v16),
+    DEFINE_FPU_PSEUDO(d17, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v17),
+    DEFINE_FPU_PSEUDO(d18, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v18),
+    DEFINE_FPU_PSEUDO(d19, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v19),
+    DEFINE_FPU_PSEUDO(d20, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v20),
+    DEFINE_FPU_PSEUDO(d21, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v21),
+    DEFINE_FPU_PSEUDO(d22, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v22),
+    DEFINE_FPU_PSEUDO(d23, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v23),
+    DEFINE_FPU_PSEUDO(d24, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v24),
+    DEFINE_FPU_PSEUDO(d25, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v25),
+    DEFINE_FPU_PSEUDO(d26, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v26),
+    DEFINE_FPU_PSEUDO(d27, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v27),
+    DEFINE_FPU_PSEUDO(d28, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v28),
+    DEFINE_FPU_PSEUDO(d29, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v29),
+    DEFINE_FPU_PSEUDO(d30, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v30),
+    DEFINE_FPU_PSEUDO(d31, 8, FPU_D_PSEUDO_REG_ENDIAN_OFFSET, v31),
 
-    {"fpsr", nullptr, 4, FPU_OFFSET_NAME(fpsr), lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_fpsr}, nullptr, nullptr, nullptr, 0},
-    {"fpcr", nullptr, 4, FPU_OFFSET_NAME(fpcr), lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, fpu_fpcr}, nullptr, nullptr, nullptr, 0},
-
-    {"far", nullptr, 8, EXC_OFFSET_NAME(far), lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, exc_far}, nullptr, nullptr, nullptr, 0},
-    {"esr", nullptr, 4, EXC_OFFSET_NAME(esr), lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, exc_esr}, nullptr, nullptr, nullptr, 0},
-    {"exception", nullptr, 4, EXC_OFFSET_NAME(exception), lldb::eEncodingUint, lldb::eFormatHex, {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM, exc_exception}, nullptr, nullptr, nullptr, 0},
+    // DEFINE_MISC_REGS(name, size, TYPE, lldb kind)
+    DEFINE_MISC_REGS(fpsr, 4, FPU, fpu_fpsr),
+    DEFINE_MISC_REGS(fpcr, 4, FPU, fpu_fpcr),
+    DEFINE_MISC_REGS(far, 8, EXC, exc_far),
+    DEFINE_MISC_REGS(esr, 4, EXC, exc_esr),
+    DEFINE_MISC_REGS(exception, 4, EXC, exc_exception),
 
     {DEFINE_DBG(bvr, 0)},
     {DEFINE_DBG(bvr, 1)},
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h
index 4a3b3c7..af3027a 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h
@@ -25,15 +25,18 @@
    LLVM_EXTENSION offsetof(FPR, xsave) +                                       \
    LLVM_EXTENSION offsetof(XSAVE, ymmh[0]) + (32 * reg_index))
 
+// Guarantees BNDR/BNDC offsets do not overlap with YMM offsets.
+#define GDB_REMOTE_OFFSET 128
+
 #define BNDR_OFFSET(reg_index)                                                 \
   (LLVM_EXTENSION offsetof(UserArea, fpr) +                                    \
    LLVM_EXTENSION offsetof(FPR, xsave) +                                       \
-   LLVM_EXTENSION offsetof(XSAVE, mpxr[reg_index]))
+   LLVM_EXTENSION offsetof(XSAVE, mpxr[reg_index]) + GDB_REMOTE_OFFSET)
 
 #define BNDC_OFFSET(reg_index)                                                 \
   (LLVM_EXTENSION offsetof(UserArea, fpr) +                                    \
    LLVM_EXTENSION offsetof(FPR, xsave) +                                       \
-   LLVM_EXTENSION offsetof(XSAVE, mpxc[reg_index]))
+   LLVM_EXTENSION offsetof(XSAVE, mpxc[reg_index]) + GDB_REMOTE_OFFSET)
 
 #ifdef DECLARE_REGISTER_INFOS_X86_64_STRUCT
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index 588015a..6d03bd5 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -30,331 +30,266 @@
 using namespace lldb_private;
 
 const char *StopInfoMachException::GetDescription() {
-  if (m_description.empty() && m_value != 0) {
-    ExecutionContext exe_ctx(m_thread_wp.lock());
-    Target *target = exe_ctx.GetTargetPtr();
-    const llvm::Triple::ArchType cpu =
-        target ? target->GetArchitecture().GetMachine()
-               : llvm::Triple::UnknownArch;
+  if (!m_description.empty())
+    return m_description.c_str();
+  if (GetValue() == eStopReasonInvalid)
+    return "invalid stop reason!";
 
-    const char *exc_desc = nullptr;
-    const char *code_label = "code";
-    const char *code_desc = nullptr;
-    const char *subcode_label = "subcode";
-    const char *subcode_desc = nullptr;
+  ExecutionContext exe_ctx(m_thread_wp.lock());
+  Target *target = exe_ctx.GetTargetPtr();
+  const llvm::Triple::ArchType cpu =
+      target ? target->GetArchitecture().GetMachine()
+             : llvm::Triple::UnknownArch;
+
+  const char *exc_desc = nullptr;
+  const char *code_label = "code";
+  const char *code_desc = nullptr;
+  const char *subcode_label = "subcode";
+  const char *subcode_desc = nullptr;
 
 #if defined(__APPLE__)
-    char code_desc_buf[32];
-    char subcode_desc_buf[32];
+  char code_desc_buf[32];
+  char subcode_desc_buf[32];
 #endif
 
-    switch (m_value) {
-    case 1: // EXC_BAD_ACCESS
-      exc_desc = "EXC_BAD_ACCESS";
-      subcode_label = "address";
-      switch (cpu) {
-      case llvm::Triple::x86:
-      case llvm::Triple::x86_64:
-        switch (m_exc_code) {
-        case 0xd:
-          code_desc = "EXC_I386_GPFLT";
-          m_exc_data_count = 1;
-          break;
-        }
+  switch (m_value) {
+  case 1: // EXC_BAD_ACCESS
+    exc_desc = "EXC_BAD_ACCESS";
+    subcode_label = "address";
+    switch (cpu) {
+    case llvm::Triple::x86:
+    case llvm::Triple::x86_64:
+      switch (m_exc_code) {
+      case 0xd:
+        code_desc = "EXC_I386_GPFLT";
+        m_exc_data_count = 1;
         break;
-      case llvm::Triple::arm:
-      case llvm::Triple::thumb:
-        switch (m_exc_code) {
-        case 0x101:
-          code_desc = "EXC_ARM_DA_ALIGN";
-          break;
-        case 0x102:
-          code_desc = "EXC_ARM_DA_DEBUG";
-          break;
-        }
+      }
+      break;
+    case llvm::Triple::arm:
+    case llvm::Triple::thumb:
+      switch (m_exc_code) {
+      case 0x101:
+        code_desc = "EXC_ARM_DA_ALIGN";
         break;
-
-      case llvm::Triple::ppc:
-      case llvm::Triple::ppc64:
-        switch (m_exc_code) {
-        case 0x101:
-          code_desc = "EXC_PPC_VM_PROT_READ";
-          break;
-        case 0x102:
-          code_desc = "EXC_PPC_BADSPACE";
-          break;
-        case 0x103:
-          code_desc = "EXC_PPC_UNALIGNED";
-          break;
-        }
-        break;
-
-      default:
+      case 0x102:
+        code_desc = "EXC_ARM_DA_DEBUG";
         break;
       }
       break;
 
-    case 2: // EXC_BAD_INSTRUCTION
-      exc_desc = "EXC_BAD_INSTRUCTION";
-      switch (cpu) {
-      case llvm::Triple::x86:
-      case llvm::Triple::x86_64:
-        if (m_exc_code == 1)
-          code_desc = "EXC_I386_INVOP";
-        break;
+    default:
+      break;
+    }
+    break;
 
-      case llvm::Triple::ppc:
-      case llvm::Triple::ppc64:
-        switch (m_exc_code) {
-        case 1:
-          code_desc = "EXC_PPC_INVALID_SYSCALL";
-          break;
-        case 2:
-          code_desc = "EXC_PPC_UNIPL_INST";
-          break;
-        case 3:
-          code_desc = "EXC_PPC_PRIVINST";
-          break;
-        case 4:
-          code_desc = "EXC_PPC_PRIVREG";
-          break;
-        case 5:
-          code_desc = "EXC_PPC_TRACE";
-          break;
-        case 6:
-          code_desc = "EXC_PPC_PERFMON";
-          break;
-        }
-        break;
+  case 2: // EXC_BAD_INSTRUCTION
+    exc_desc = "EXC_BAD_INSTRUCTION";
+    switch (cpu) {
+    case llvm::Triple::x86:
+    case llvm::Triple::x86_64:
+      if (m_exc_code == 1)
+        code_desc = "EXC_I386_INVOP";
+      break;
 
-      case llvm::Triple::arm:
-      case llvm::Triple::thumb:
-        if (m_exc_code == 1)
-          code_desc = "EXC_ARM_UNDEFINED";
-        break;
+    case llvm::Triple::arm:
+    case llvm::Triple::thumb:
+      if (m_exc_code == 1)
+        code_desc = "EXC_ARM_UNDEFINED";
+      break;
 
-      default:
+    default:
+      break;
+    }
+    break;
+
+  case 3: // EXC_ARITHMETIC
+    exc_desc = "EXC_ARITHMETIC";
+    switch (cpu) {
+    case llvm::Triple::x86:
+    case llvm::Triple::x86_64:
+      switch (m_exc_code) {
+      case 1:
+        code_desc = "EXC_I386_DIV";
+        break;
+      case 2:
+        code_desc = "EXC_I386_INTO";
+        break;
+      case 3:
+        code_desc = "EXC_I386_NOEXT";
+        break;
+      case 4:
+        code_desc = "EXC_I386_EXTOVR";
+        break;
+      case 5:
+        code_desc = "EXC_I386_EXTERR";
+        break;
+      case 6:
+        code_desc = "EXC_I386_EMERR";
+        break;
+      case 7:
+        code_desc = "EXC_I386_BOUND";
+        break;
+      case 8:
+        code_desc = "EXC_I386_SSEEXTERR";
         break;
       }
       break;
 
-    case 3: // EXC_ARITHMETIC
-      exc_desc = "EXC_ARITHMETIC";
-      switch (cpu) {
-      case llvm::Triple::x86:
-      case llvm::Triple::x86_64:
-        switch (m_exc_code) {
-        case 1:
-          code_desc = "EXC_I386_DIV";
-          break;
-        case 2:
-          code_desc = "EXC_I386_INTO";
-          break;
-        case 3:
-          code_desc = "EXC_I386_NOEXT";
-          break;
-        case 4:
-          code_desc = "EXC_I386_EXTOVR";
-          break;
-        case 5:
-          code_desc = "EXC_I386_EXTERR";
-          break;
-        case 6:
-          code_desc = "EXC_I386_EMERR";
-          break;
-        case 7:
-          code_desc = "EXC_I386_BOUND";
-          break;
-        case 8:
-          code_desc = "EXC_I386_SSEEXTERR";
-          break;
-        }
-        break;
+    default:
+      break;
+    }
+    break;
 
-      case llvm::Triple::ppc:
-      case llvm::Triple::ppc64:
-        switch (m_exc_code) {
-        case 1:
-          code_desc = "EXC_PPC_OVERFLOW";
-          break;
-        case 2:
-          code_desc = "EXC_PPC_ZERO_DIVIDE";
-          break;
-        case 3:
-          code_desc = "EXC_PPC_FLT_INEXACT";
-          break;
-        case 4:
-          code_desc = "EXC_PPC_FLT_ZERO_DIVIDE";
-          break;
-        case 5:
-          code_desc = "EXC_PPC_FLT_UNDERFLOW";
-          break;
-        case 6:
-          code_desc = "EXC_PPC_FLT_OVERFLOW";
-          break;
-        case 7:
-          code_desc = "EXC_PPC_FLT_NOT_A_NUMBER";
-          break;
-        }
-        break;
+  case 4: // EXC_EMULATION
+    exc_desc = "EXC_EMULATION";
+    break;
 
-      default:
+  case 5: // EXC_SOFTWARE
+    exc_desc = "EXC_SOFTWARE";
+    if (m_exc_code == 0x10003) {
+      subcode_desc = "EXC_SOFT_SIGNAL";
+      subcode_label = "signo";
+    }
+    break;
+
+  case 6: // EXC_BREAKPOINT
+  {
+    exc_desc = "EXC_BREAKPOINT";
+    switch (cpu) {
+    case llvm::Triple::x86:
+    case llvm::Triple::x86_64:
+      switch (m_exc_code) {
+      case 1:
+        code_desc = "EXC_I386_SGL";
+        break;
+      case 2:
+        code_desc = "EXC_I386_BPT";
         break;
       }
       break;
 
-    case 4: // EXC_EMULATION
-      exc_desc = "EXC_EMULATION";
-      break;
-
-    case 5: // EXC_SOFTWARE
-      exc_desc = "EXC_SOFTWARE";
-      if (m_exc_code == 0x10003) {
-        subcode_desc = "EXC_SOFT_SIGNAL";
-        subcode_label = "signo";
+    case llvm::Triple::arm:
+    case llvm::Triple::thumb:
+      switch (m_exc_code) {
+      case 0x101:
+        code_desc = "EXC_ARM_DA_ALIGN";
+        break;
+      case 0x102:
+        code_desc = "EXC_ARM_DA_DEBUG";
+        break;
+      case 1:
+        code_desc = "EXC_ARM_BREAKPOINT";
+        break;
+      // FIXME temporary workaround, exc_code 0 does not really mean
+      // EXC_ARM_BREAKPOINT
+      case 0:
+        code_desc = "EXC_ARM_BREAKPOINT";
+        break;
       }
       break;
 
-    case 6: // EXC_BREAKPOINT
+    default:
+      break;
+    }
+  } break;
+
+  case 7:
+    exc_desc = "EXC_SYSCALL";
+    break;
+
+  case 8:
+    exc_desc = "EXC_MACH_SYSCALL";
+    break;
+
+  case 9:
+    exc_desc = "EXC_RPC_ALERT";
+    break;
+
+  case 10:
+    exc_desc = "EXC_CRASH";
+    break;
+  case 11:
+    exc_desc = "EXC_RESOURCE";
+#if defined(__APPLE__)
     {
-      exc_desc = "EXC_BREAKPOINT";
-      switch (cpu) {
-      case llvm::Triple::x86:
-      case llvm::Triple::x86_64:
-        switch (m_exc_code) {
-        case 1:
-          code_desc = "EXC_I386_SGL";
-          break;
-        case 2:
-          code_desc = "EXC_I386_BPT";
-          break;
-        }
+      int resource_type = EXC_RESOURCE_DECODE_RESOURCE_TYPE(m_exc_code);
+
+      code_label = "limit";
+      code_desc = code_desc_buf;
+      subcode_label = "observed";
+      subcode_desc = subcode_desc_buf;
+
+      switch (resource_type) {
+      case RESOURCE_TYPE_CPU:
+        exc_desc = "EXC_RESOURCE RESOURCE_TYPE_CPU";
+        snprintf(code_desc_buf, sizeof(code_desc_buf), "%d%%",
+                 (int)EXC_RESOURCE_CPUMONITOR_DECODE_PERCENTAGE(m_exc_code));
+        snprintf(subcode_desc_buf, sizeof(subcode_desc_buf), "%d%%",
+                 (int)EXC_RESOURCE_CPUMONITOR_DECODE_PERCENTAGE_OBSERVED(
+                     m_exc_subcode));
         break;
-
-      case llvm::Triple::ppc:
-      case llvm::Triple::ppc64:
-        switch (m_exc_code) {
-        case 1:
-          code_desc = "EXC_PPC_BREAKPOINT";
-          break;
-        }
-        break;
-
-      case llvm::Triple::arm:
-      case llvm::Triple::thumb:
-        switch (m_exc_code) {
-        case 0x101:
-          code_desc = "EXC_ARM_DA_ALIGN";
-          break;
-        case 0x102:
-          code_desc = "EXC_ARM_DA_DEBUG";
-          break;
-        case 1:
-          code_desc = "EXC_ARM_BREAKPOINT";
-          break;
-        // FIXME temporary workaround, exc_code 0 does not really mean
-        // EXC_ARM_BREAKPOINT
-        case 0:
-          code_desc = "EXC_ARM_BREAKPOINT";
-          break;
-        }
-        break;
-
-      default:
-        break;
-      }
-    } break;
-
-    case 7:
-      exc_desc = "EXC_SYSCALL";
-      break;
-
-    case 8:
-      exc_desc = "EXC_MACH_SYSCALL";
-      break;
-
-    case 9:
-      exc_desc = "EXC_RPC_ALERT";
-      break;
-
-    case 10:
-      exc_desc = "EXC_CRASH";
-      break;
-    case 11:
-      exc_desc = "EXC_RESOURCE";
-#if defined(__APPLE__)
-      {
-        int resource_type = EXC_RESOURCE_DECODE_RESOURCE_TYPE(m_exc_code);
-
-        code_label = "limit";
-        code_desc = code_desc_buf;
-        subcode_label = "observed";
-        subcode_desc = subcode_desc_buf;
-
-        switch (resource_type) {
-        case RESOURCE_TYPE_CPU:
-          exc_desc = "EXC_RESOURCE RESOURCE_TYPE_CPU";
-          snprintf(code_desc_buf, sizeof(code_desc_buf), "%d%%",
-            (int)EXC_RESOURCE_CPUMONITOR_DECODE_PERCENTAGE(m_exc_code));
-          snprintf(subcode_desc_buf, sizeof(subcode_desc_buf), "%d%%",
-            (int)EXC_RESOURCE_CPUMONITOR_DECODE_PERCENTAGE_OBSERVED(m_exc_subcode));
-          break;
-        case RESOURCE_TYPE_WAKEUPS:
-          exc_desc = "EXC_RESOURCE RESOURCE_TYPE_WAKEUPS";
-          snprintf(code_desc_buf, sizeof(code_desc_buf), "%d w/s",
+      case RESOURCE_TYPE_WAKEUPS:
+        exc_desc = "EXC_RESOURCE RESOURCE_TYPE_WAKEUPS";
+        snprintf(
+            code_desc_buf, sizeof(code_desc_buf), "%d w/s",
             (int)EXC_RESOURCE_CPUMONITOR_DECODE_WAKEUPS_PERMITTED(m_exc_code));
-          snprintf(subcode_desc_buf, sizeof(subcode_desc_buf), "%d w/s",
-            (int)EXC_RESOURCE_CPUMONITOR_DECODE_WAKEUPS_OBSERVED(m_exc_subcode));
-          break;
-        case RESOURCE_TYPE_MEMORY:
-          exc_desc = "EXC_RESOURCE RESOURCE_TYPE_MEMORY";
-          snprintf(code_desc_buf, sizeof(code_desc_buf), "%d MB",
-            (int)EXC_RESOURCE_HWM_DECODE_LIMIT(m_exc_code));
-          subcode_desc = nullptr;
-          subcode_label = "unused";
-          break;
-        case RESOURCE_TYPE_IO:
-          exc_desc = "EXC_RESOURCE RESOURCE_TYPE_IO";
-          snprintf(code_desc_buf, sizeof(code_desc_buf), "%d MB",
-            (int)EXC_RESOURCE_IO_DECODE_LIMIT(m_exc_code));
-          snprintf(subcode_desc_buf, sizeof(subcode_desc_buf), "%d MB",
-            (int)EXC_RESOURCE_IO_OBSERVED(m_exc_subcode));;
-          break;
-        }
-      }
+        snprintf(subcode_desc_buf, sizeof(subcode_desc_buf), "%d w/s",
+                 (int)EXC_RESOURCE_CPUMONITOR_DECODE_WAKEUPS_OBSERVED(
+                     m_exc_subcode));
+        break;
+      case RESOURCE_TYPE_MEMORY:
+        exc_desc = "EXC_RESOURCE RESOURCE_TYPE_MEMORY";
+        snprintf(code_desc_buf, sizeof(code_desc_buf), "%d MB",
+                 (int)EXC_RESOURCE_HWM_DECODE_LIMIT(m_exc_code));
+        subcode_desc = nullptr;
+        subcode_label = "unused";
+        break;
+#if defined(RESOURCE_TYPE_IO)
+      // RESOURCE_TYPE_IO is introduced in macOS SDK 10.12.
+      case RESOURCE_TYPE_IO:
+        exc_desc = "EXC_RESOURCE RESOURCE_TYPE_IO";
+        snprintf(code_desc_buf, sizeof(code_desc_buf), "%d MB",
+                 (int)EXC_RESOURCE_IO_DECODE_LIMIT(m_exc_code));
+        snprintf(subcode_desc_buf, sizeof(subcode_desc_buf), "%d MB",
+                 (int)EXC_RESOURCE_IO_OBSERVED(m_exc_subcode));
+        ;
+        break;
 #endif
-      break;
-    case 12:
-      exc_desc = "EXC_GUARD";
-      break;
+      }
     }
-
-    StreamString strm;
-
-    if (exc_desc)
-      strm.PutCString(exc_desc);
-    else
-      strm.Printf("EXC_??? (%" PRIu64 ")", m_value);
-
-    if (m_exc_data_count >= 1) {
-      if (code_desc)
-        strm.Printf(" (%s=%s", code_label, code_desc);
-      else
-        strm.Printf(" (%s=%" PRIu64, code_label, m_exc_code);
-    }
-
-    if (m_exc_data_count >= 2) {
-      if (subcode_desc)
-        strm.Printf(", %s=%s", subcode_label, subcode_desc);
-      else
-        strm.Printf(", %s=0x%" PRIx64, subcode_label, m_exc_subcode);
-    }
-
-    if (m_exc_data_count > 0)
-      strm.PutChar(')');
-
-    m_description = strm.GetString();
+#endif
+    break;
+  case 12:
+    exc_desc = "EXC_GUARD";
+    break;
   }
+
+  StreamString strm;
+
+  if (exc_desc)
+    strm.PutCString(exc_desc);
+  else
+    strm.Printf("EXC_??? (%" PRIu64 ")", m_value);
+
+  if (m_exc_data_count >= 1) {
+    if (code_desc)
+      strm.Printf(" (%s=%s", code_label, code_desc);
+    else
+      strm.Printf(" (%s=%" PRIu64, code_label, m_exc_code);
+  }
+
+  if (m_exc_data_count >= 2) {
+    if (subcode_desc)
+      strm.Printf(", %s=%s", subcode_label, subcode_desc);
+    else
+      strm.Printf(", %s=0x%" PRIx64, subcode_label, m_exc_subcode);
+  }
+
+  if (m_exc_data_count > 0)
+    strm.PutChar(')');
+
+  m_description = strm.GetString();
   return m_description.c_str();
 }
 
@@ -362,183 +297,62 @@
     Thread &thread, uint32_t exc_type, uint32_t exc_data_count,
     uint64_t exc_code, uint64_t exc_sub_code, uint64_t exc_sub_sub_code,
     bool pc_already_adjusted, bool adjust_pc_if_needed) {
-  if (exc_type != 0) {
-    uint32_t pc_decrement = 0;
-    ExecutionContext exe_ctx(thread.shared_from_this());
-    Target *target = exe_ctx.GetTargetPtr();
-    const llvm::Triple::ArchType cpu =
-        target ? target->GetArchitecture().GetMachine()
-               : llvm::Triple::UnknownArch;
+  if (exc_type == 0)
+    return StopInfoSP();
 
-    switch (exc_type) {
-    case 1: // EXC_BAD_ACCESS
-      break;
+  uint32_t pc_decrement = 0;
+  ExecutionContext exe_ctx(thread.shared_from_this());
+  Target *target = exe_ctx.GetTargetPtr();
+  const llvm::Triple::ArchType cpu =
+      target ? target->GetArchitecture().GetMachine()
+             : llvm::Triple::UnknownArch;
 
-    case 2: // EXC_BAD_INSTRUCTION
-      switch (cpu) {
-      case llvm::Triple::ppc:
-      case llvm::Triple::ppc64:
-        switch (exc_code) {
-        case 1: // EXC_PPC_INVALID_SYSCALL
-        case 2: // EXC_PPC_UNIPL_INST
-        case 3: // EXC_PPC_PRIVINST
-        case 4: // EXC_PPC_PRIVREG
-          break;
-        case 5: // EXC_PPC_TRACE
-          return StopInfo::CreateStopReasonToTrace(thread);
-        case 6: // EXC_PPC_PERFMON
-          break;
-        }
-        break;
+  switch (exc_type) {
+  case 1: // EXC_BAD_ACCESS
+  case 2: // EXC_BAD_INSTRUCTION
+  case 3: // EXC_ARITHMETIC
+  case 4: // EXC_EMULATION
+    break;
 
-      default:
-        break;
-      }
-      break;
-
-    case 3: // EXC_ARITHMETIC
-    case 4: // EXC_EMULATION
-      break;
-
-    case 5:                    // EXC_SOFTWARE
-      if (exc_code == 0x10003) // EXC_SOFT_SIGNAL
-      {
-        if (exc_sub_code == 5) {
-          // On MacOSX, a SIGTRAP can signify that a process has called exec,
-          // so we should check with our dynamic loader to verify.
-          ProcessSP process_sp(thread.GetProcess());
-          if (process_sp) {
-            DynamicLoader *dynamic_loader = process_sp->GetDynamicLoader();
-            if (dynamic_loader && dynamic_loader->ProcessDidExec()) {
-              // The program was re-exec'ed
-              return StopInfo::CreateStopReasonWithExec(thread);
-            }
-            //                        if (!process_did_exec)
-            //                        {
-            //                            // We have a SIGTRAP, make sure we
-            //                            didn't exec by checking
-            //                            // for the PC being at
-            //                            "_dyld_start"...
-            //                            lldb::StackFrameSP frame_sp
-            //                            (thread.GetStackFrameAtIndex(0));
-            //                            if (frame_sp)
-            //                            {
-            //                                const Symbol *symbol =
-            //                                frame_sp->GetSymbolContext(eSymbolContextSymbol).symbol;
-            //                                if (symbol)
-            //                                {
-            //                                    if (symbol->GetName() ==
-            //                                    ConstString("_dyld_start"))
-            //                                        process_did_exec = true;
-            //                                }
-            //                            }
-            //                        }
-          }
-        }
-        return StopInfo::CreateStopReasonWithSignal(thread, exc_sub_code);
-      }
-      break;
-
-    case 6: // EXC_BREAKPOINT
+  case 5:                    // EXC_SOFTWARE
+    if (exc_code == 0x10003) // EXC_SOFT_SIGNAL
     {
-      bool is_actual_breakpoint = false;
-      bool is_trace_if_actual_breakpoint_missing = false;
-      switch (cpu) {
-      case llvm::Triple::x86:
-      case llvm::Triple::x86_64:
-        if (exc_code == 1) // EXC_I386_SGL
-        {
-          if (!exc_sub_code) {
-            // This looks like a plain trap.
-            // Have to check if there is a breakpoint here as well.  When you
-            // single-step onto a trap, the single step stops you not to trap.
-            // Since we also do that check below, let's just use that logic.
-            is_actual_breakpoint = true;
-            is_trace_if_actual_breakpoint_missing = true;
-          } else {
-
-            // It's a watchpoint, then.
-            // The exc_sub_code indicates the data break address.
-            lldb::WatchpointSP wp_sp;
-            if (target)
-              wp_sp = target->GetWatchpointList().FindByAddress(
-                  (lldb::addr_t)exc_sub_code);
-            if (wp_sp && wp_sp->IsEnabled()) {
-              // Debugserver may piggyback the hardware index of the fired
-              // watchpoint in the exception data. Set the hardware index if
-              // that's the case.
-              if (exc_data_count >= 3)
-                wp_sp->SetHardwareIndex((uint32_t)exc_sub_sub_code);
-              return StopInfo::CreateStopReasonWithWatchpointID(thread,
-                                                                wp_sp->GetID());
-            }
+      if (exc_sub_code == 5) {
+        // On MacOSX, a SIGTRAP can signify that a process has called exec,
+        // so we should check with our dynamic loader to verify.
+        ProcessSP process_sp(thread.GetProcess());
+        if (process_sp) {
+          DynamicLoader *dynamic_loader = process_sp->GetDynamicLoader();
+          if (dynamic_loader && dynamic_loader->ProcessDidExec()) {
+            // The program was re-exec'ed
+            return StopInfo::CreateStopReasonWithExec(thread);
           }
-        } else if (exc_code == 2 || // EXC_I386_BPT
-                   exc_code == 3)   // EXC_I386_BPTFLT
-        {
-          // KDP returns EXC_I386_BPTFLT for trace breakpoints
-          if (exc_code == 3)
-            is_trace_if_actual_breakpoint_missing = true;
-
-          is_actual_breakpoint = true;
-          if (!pc_already_adjusted)
-            pc_decrement = 1;
         }
-        break;
+      }
+      return StopInfo::CreateStopReasonWithSignal(thread, exc_sub_code);
+    }
+    break;
 
-      case llvm::Triple::ppc:
-      case llvm::Triple::ppc64:
-        is_actual_breakpoint = exc_code == 1; // EXC_PPC_BREAKPOINT
-        break;
-
-      case llvm::Triple::arm:
-      case llvm::Triple::thumb:
-        if (exc_code == 0x102) // EXC_ARM_DA_DEBUG
-        {
-          // It's a watchpoint, then, if the exc_sub_code indicates a
-          // known/enabled data break address from our watchpoint list.
-          lldb::WatchpointSP wp_sp;
-          if (target)
-            wp_sp = target->GetWatchpointList().FindByAddress(
-                (lldb::addr_t)exc_sub_code);
-          if (wp_sp && wp_sp->IsEnabled()) {
-            // Debugserver may piggyback the hardware index of the fired
-            // watchpoint in the exception data. Set the hardware index if
-            // that's the case.
-            if (exc_data_count >= 3)
-              wp_sp->SetHardwareIndex((uint32_t)exc_sub_sub_code);
-            return StopInfo::CreateStopReasonWithWatchpointID(thread,
-                                                              wp_sp->GetID());
-          } else {
-            is_actual_breakpoint = true;
-            is_trace_if_actual_breakpoint_missing = true;
-          }
-        } else if (exc_code == 1) // EXC_ARM_BREAKPOINT
-        {
+  case 6: // EXC_BREAKPOINT
+  {
+    bool is_actual_breakpoint = false;
+    bool is_trace_if_actual_breakpoint_missing = false;
+    switch (cpu) {
+    case llvm::Triple::x86:
+    case llvm::Triple::x86_64:
+      if (exc_code == 1) // EXC_I386_SGL
+      {
+        if (!exc_sub_code) {
+          // This looks like a plain trap.
+          // Have to check if there is a breakpoint here as well.  When you
+          // single-step onto a trap, the single step stops you not to trap.
+          // Since we also do that check below, let's just use that logic.
           is_actual_breakpoint = true;
           is_trace_if_actual_breakpoint_missing = true;
-        } else if (exc_code == 0) // FIXME not EXC_ARM_BREAKPOINT but a kernel
-                                  // is currently returning this so accept it
-                                  // as indicating a breakpoint until the
-                                  // kernel is fixed
-        {
-          is_actual_breakpoint = true;
-          is_trace_if_actual_breakpoint_missing = true;
-        }
-        break;
+        } else {
 
-      case llvm::Triple::aarch64: {
-        if (exc_code == 1 && exc_sub_code == 0) // EXC_ARM_BREAKPOINT
-        {
-          // This is hit when we single instruction step aka MDSCR_EL1 SS bit 0
-          // is set
-          is_actual_breakpoint = false;
-          is_trace_if_actual_breakpoint_missing = true;
-        }
-        if (exc_code == 0x102) // EXC_ARM_DA_DEBUG
-        {
-          // It's a watchpoint, then, if the exc_sub_code indicates a
-          // known/enabled data break address from our watchpoint list.
+          // It's a watchpoint, then.
+          // The exc_sub_code indicates the data break address.
           lldb::WatchpointSP wp_sp;
           if (target)
             wp_sp = target->GetWatchpointList().FindByAddress(
@@ -552,73 +366,147 @@
             return StopInfo::CreateStopReasonWithWatchpointID(thread,
                                                               wp_sp->GetID());
           }
-          // EXC_ARM_DA_DEBUG seems to be reused for EXC_BREAKPOINT as well as
-          // EXC_BAD_ACCESS
-          if (thread.GetTemporaryResumeState() == eStateStepping)
-            return StopInfo::CreateStopReasonToTrace(thread);
         }
-        // It looks like exc_sub_code has the 4 bytes of the instruction that
-        // triggered the exception, i.e. our breakpoint opcode
-        is_actual_breakpoint = exc_code == 1;
-        break;
+      } else if (exc_code == 2 || // EXC_I386_BPT
+                 exc_code == 3)   // EXC_I386_BPTFLT
+      {
+        // KDP returns EXC_I386_BPTFLT for trace breakpoints
+        if (exc_code == 3)
+          is_trace_if_actual_breakpoint_missing = true;
+
+        is_actual_breakpoint = true;
+        if (!pc_already_adjusted)
+          pc_decrement = 1;
       }
+      break;
 
-      default:
-        break;
-      }
-
-      if (is_actual_breakpoint) {
-        RegisterContextSP reg_ctx_sp(thread.GetRegisterContext());
-        addr_t pc = reg_ctx_sp->GetPC() - pc_decrement;
-
-        ProcessSP process_sp(thread.CalculateProcess());
-
-        lldb::BreakpointSiteSP bp_site_sp;
-        if (process_sp)
-          bp_site_sp = process_sp->GetBreakpointSiteList().FindByAddress(pc);
-        if (bp_site_sp && bp_site_sp->IsEnabled()) {
-          // Update the PC if we were asked to do so, but only do so if we find
-          // a breakpoint that we know about cause this could be a trap
-          // instruction in the code
-          if (pc_decrement > 0 && adjust_pc_if_needed)
-            reg_ctx_sp->SetPC(pc);
-
-          // If the breakpoint is for this thread, then we'll report the hit,
-          // but if it is for another thread, we can just report no reason.  We
-          // don't need to worry about stepping over the breakpoint here, that
-          // will be taken care of when the thread resumes and notices that
-          // there's a breakpoint under the pc. If we have an operating system
-          // plug-in, we might have set a thread specific breakpoint using the
-          // operating system thread ID, so we can't make any assumptions about
-          // the thread ID so we must always report the breakpoint regardless
-          // of the thread.
-          if (bp_site_sp->ValidForThisThread(&thread) ||
-              thread.GetProcess()->GetOperatingSystem() != nullptr)
-            return StopInfo::CreateStopReasonWithBreakpointSiteID(
-                thread, bp_site_sp->GetID());
-          else if (is_trace_if_actual_breakpoint_missing)
-            return StopInfo::CreateStopReasonToTrace(thread);
-          else
-            return StopInfoSP();
+    case llvm::Triple::arm:
+    case llvm::Triple::thumb:
+      if (exc_code == 0x102) // EXC_ARM_DA_DEBUG
+      {
+        // It's a watchpoint, then, if the exc_sub_code indicates a
+        // known/enabled data break address from our watchpoint list.
+        lldb::WatchpointSP wp_sp;
+        if (target)
+          wp_sp = target->GetWatchpointList().FindByAddress(
+              (lldb::addr_t)exc_sub_code);
+        if (wp_sp && wp_sp->IsEnabled()) {
+          // Debugserver may piggyback the hardware index of the fired
+          // watchpoint in the exception data. Set the hardware index if
+          // that's the case.
+          if (exc_data_count >= 3)
+            wp_sp->SetHardwareIndex((uint32_t)exc_sub_sub_code);
+          return StopInfo::CreateStopReasonWithWatchpointID(thread,
+                                                            wp_sp->GetID());
+        } else {
+          is_actual_breakpoint = true;
+          is_trace_if_actual_breakpoint_missing = true;
         }
+      } else if (exc_code == 1) // EXC_ARM_BREAKPOINT
+      {
+        is_actual_breakpoint = true;
+        is_trace_if_actual_breakpoint_missing = true;
+      } else if (exc_code == 0) // FIXME not EXC_ARM_BREAKPOINT but a kernel
+                                // is currently returning this so accept it
+                                // as indicating a breakpoint until the
+                                // kernel is fixed
+      {
+        is_actual_breakpoint = true;
+        is_trace_if_actual_breakpoint_missing = true;
+      }
+      break;
 
-        // Don't call this a trace if we weren't single stepping this thread.
-        if (is_trace_if_actual_breakpoint_missing &&
-            thread.GetTemporaryResumeState() == eStateStepping) {
+    case llvm::Triple::aarch64_32:
+    case llvm::Triple::aarch64: {
+      if (exc_code == 1 && exc_sub_code == 0) // EXC_ARM_BREAKPOINT
+      {
+        // This is hit when we single instruction step aka MDSCR_EL1 SS bit 0
+        // is set
+        is_actual_breakpoint = false;
+        is_trace_if_actual_breakpoint_missing = true;
+      }
+      if (exc_code == 0x102) // EXC_ARM_DA_DEBUG
+      {
+        // It's a watchpoint, then, if the exc_sub_code indicates a
+        // known/enabled data break address from our watchpoint list.
+        lldb::WatchpointSP wp_sp;
+        if (target)
+          wp_sp = target->GetWatchpointList().FindByAddress(
+              (lldb::addr_t)exc_sub_code);
+        if (wp_sp && wp_sp->IsEnabled()) {
+          // Debugserver may piggyback the hardware index of the fired
+          // watchpoint in the exception data. Set the hardware index if
+          // that's the case.
+          if (exc_data_count >= 3)
+            wp_sp->SetHardwareIndex((uint32_t)exc_sub_sub_code);
+          return StopInfo::CreateStopReasonWithWatchpointID(thread,
+                                                            wp_sp->GetID());
+        }
+        // EXC_ARM_DA_DEBUG seems to be reused for EXC_BREAKPOINT as well as
+        // EXC_BAD_ACCESS
+        if (thread.GetTemporaryResumeState() == eStateStepping)
           return StopInfo::CreateStopReasonToTrace(thread);
-        }
       }
-    } break;
-
-    case 7:  // EXC_SYSCALL
-    case 8:  // EXC_MACH_SYSCALL
-    case 9:  // EXC_RPC_ALERT
-    case 10: // EXC_CRASH
+      // It looks like exc_sub_code has the 4 bytes of the instruction that
+      // triggered the exception, i.e. our breakpoint opcode
+      is_actual_breakpoint = exc_code == 1;
       break;
     }
 
-    return StopInfoSP(new StopInfoMachException(
-        thread, exc_type, exc_data_count, exc_code, exc_sub_code));
+    default:
+      break;
+    }
+
+    if (is_actual_breakpoint) {
+      RegisterContextSP reg_ctx_sp(thread.GetRegisterContext());
+      addr_t pc = reg_ctx_sp->GetPC() - pc_decrement;
+
+      ProcessSP process_sp(thread.CalculateProcess());
+
+      lldb::BreakpointSiteSP bp_site_sp;
+      if (process_sp)
+        bp_site_sp = process_sp->GetBreakpointSiteList().FindByAddress(pc);
+      if (bp_site_sp && bp_site_sp->IsEnabled()) {
+        // Update the PC if we were asked to do so, but only do so if we find
+        // a breakpoint that we know about cause this could be a trap
+        // instruction in the code
+        if (pc_decrement > 0 && adjust_pc_if_needed)
+          reg_ctx_sp->SetPC(pc);
+
+        // If the breakpoint is for this thread, then we'll report the hit,
+        // but if it is for another thread, we can just report no reason.  We
+        // don't need to worry about stepping over the breakpoint here, that
+        // will be taken care of when the thread resumes and notices that
+        // there's a breakpoint under the pc. If we have an operating system
+        // plug-in, we might have set a thread specific breakpoint using the
+        // operating system thread ID, so we can't make any assumptions about
+        // the thread ID so we must always report the breakpoint regardless
+        // of the thread.
+        if (bp_site_sp->ValidForThisThread(&thread) ||
+            thread.GetProcess()->GetOperatingSystem() != nullptr)
+          return StopInfo::CreateStopReasonWithBreakpointSiteID(
+              thread, bp_site_sp->GetID());
+        else if (is_trace_if_actual_breakpoint_missing)
+          return StopInfo::CreateStopReasonToTrace(thread);
+        else
+          return StopInfoSP();
+      }
+
+      // Don't call this a trace if we weren't single stepping this thread.
+      if (is_trace_if_actual_breakpoint_missing &&
+          thread.GetTemporaryResumeState() == eStateStepping) {
+        return StopInfo::CreateStopReasonToTrace(thread);
+      }
+    }
+  } break;
+
+  case 7:  // EXC_SYSCALL
+  case 8:  // EXC_MACH_SYSCALL
+  case 9:  // EXC_RPC_ALERT
+  case 10: // EXC_CRASH
+    break;
   }
-  return StopInfoSP();
+
+  return StopInfoSP(new StopInfoMachException(thread, exc_type, exc_data_count,
+                                              exc_code, exc_sub_code));
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
index 38209fb..74fc90e 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp
@@ -104,8 +104,8 @@
 unwind_done:
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
   if (log) {
-    log->Printf("th%d Unwind of this thread is complete.",
-                m_thread.GetIndexID());
+    LLDB_LOGF(log, "th%d Unwind of this thread is complete.",
+              m_thread.GetIndexID());
   }
   m_unwind_complete = true;
   return false;
@@ -140,10 +140,10 @@
   // is going to blow out the stack space. If we're still unwinding at that
   // point, we're probably never going to finish.
   if (cur_idx >= max_stack_depth) {
-    if (log)
-      log->Printf("%*sFrame %d unwound too many frames, assuming unwind has "
-                  "gone astray, stopping.",
-                  cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+    LLDB_LOGF(log,
+              "%*sFrame %d unwound too many frames, assuming unwind has "
+              "gone astray, stopping.",
+              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
     return nullptr;
   }
 
@@ -161,9 +161,8 @@
       return GetOneMoreFrame(abi);
     }
 
-    if (log)
-      log->Printf("%*sFrame %d did not get a RegisterContext, stopping.",
-                  cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+    LLDB_LOGF(log, "%*sFrame %d did not get a RegisterContext, stopping.",
+              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
     return nullptr;
   }
 
@@ -181,10 +180,10 @@
       return GetOneMoreFrame(abi);
     }
 
-    if (log)
-      log->Printf("%*sFrame %d invalid RegisterContext for this frame, "
-                  "stopping stack walk",
-                  cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+    LLDB_LOGF(log,
+              "%*sFrame %d invalid RegisterContext for this frame, "
+              "stopping stack walk",
+              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
     return nullptr;
   }
   if (!reg_ctx_sp->GetCFA(cursor_sp->cfa)) {
@@ -201,10 +200,9 @@
       return GetOneMoreFrame(abi);
     }
 
-    if (log)
-      log->Printf(
-          "%*sFrame %d did not get CFA for this frame, stopping stack walk",
-          cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+    LLDB_LOGF(log,
+              "%*sFrame %d did not get CFA for this frame, stopping stack walk",
+              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
     return nullptr;
   }
   if (abi && !abi->CallFrameAddressIsValid(cursor_sp->cfa)) {
@@ -230,17 +228,17 @@
           return GetOneMoreFrame(abi);
         }
 
-        if (log)
-          log->Printf("%*sFrame %d did not get a valid CFA for this frame, "
-                      "stopping stack walk",
-                      cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+        LLDB_LOGF(log,
+                  "%*sFrame %d did not get a valid CFA for this frame, "
+                  "stopping stack walk",
+                  cur_idx < 100 ? cur_idx : 100, "", cur_idx);
         return nullptr;
       } else {
-        if (log)
-          log->Printf("%*sFrame %d had a bad CFA value but we switched the "
-                      "UnwindPlan being used and got one that looks more "
-                      "realistic.",
-                      cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+        LLDB_LOGF(log,
+                  "%*sFrame %d had a bad CFA value but we switched the "
+                  "UnwindPlan being used and got one that looks more "
+                  "realistic.",
+                  cur_idx < 100 ? cur_idx : 100, "", cur_idx);
       }
     }
   }
@@ -258,10 +256,9 @@
       return GetOneMoreFrame(abi);
     }
 
-    if (log)
-      log->Printf(
-          "%*sFrame %d did not get PC for this frame, stopping stack walk",
-          cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+    LLDB_LOGF(log,
+              "%*sFrame %d did not get PC for this frame, stopping stack walk",
+              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
     return nullptr;
   }
   if (abi && !abi->CodeAddressIsValid(cursor_sp->start_pc)) {
@@ -278,18 +275,17 @@
       return GetOneMoreFrame(abi);
     }
 
-    if (log)
-      log->Printf("%*sFrame %d did not get a valid PC, stopping stack walk",
-                  cur_idx < 100 ? cur_idx : 100, "", cur_idx);
+    LLDB_LOGF(log, "%*sFrame %d did not get a valid PC, stopping stack walk",
+              cur_idx < 100 ? cur_idx : 100, "", cur_idx);
     return nullptr;
   }
   // Infinite loop where the current cursor is the same as the previous one...
   if (prev_frame->start_pc == cursor_sp->start_pc &&
       prev_frame->cfa == cursor_sp->cfa) {
-    if (log)
-      log->Printf("th%d pc of this frame is the same as the previous frame and "
-                  "CFAs for both frames are identical -- stopping unwind",
-                  m_thread.GetIndexID());
+    LLDB_LOGF(log,
+              "th%d pc of this frame is the same as the previous frame and "
+              "CFAs for both frames are identical -- stopping unwind",
+              m_thread.GetIndexID());
     return nullptr;
   }
 
@@ -337,9 +333,8 @@
     new_frame = GetOneMoreFrame(abi);
 
   if (new_frame == nullptr) {
-    if (log)
-      log->Printf("th%d Unwind of this thread is complete.",
-                  m_thread.GetIndexID());
+    LLDB_LOGF(log, "th%d Unwind of this thread is complete.",
+              m_thread.GetIndexID());
     m_unwind_complete = true;
     return false;
   }
@@ -395,7 +390,8 @@
   return true;
 }
 
-bool UnwindLLDB::DoGetFrameInfoAtIndex(uint32_t idx, addr_t &cfa, addr_t &pc) {
+bool UnwindLLDB::DoGetFrameInfoAtIndex(uint32_t idx, addr_t &cfa, addr_t &pc,
+                                       bool &behaves_like_zeroth_frame) {
   if (m_frames.size() == 0) {
     if (!AddFirstFrame())
       return false;
@@ -410,6 +406,24 @@
   if (idx < m_frames.size()) {
     cfa = m_frames[idx]->cfa;
     pc = m_frames[idx]->start_pc;
+    if (idx == 0) {
+      // Frame zero always behaves like it.
+      behaves_like_zeroth_frame = true;
+    } else if (m_frames[idx - 1]->reg_ctx_lldb_sp->IsTrapHandlerFrame()) {
+      // This could be an asynchronous signal, thus the
+      // pc might point to the interrupted instruction rather
+      // than a post-call instruction
+      behaves_like_zeroth_frame = true;
+    } else if (m_frames[idx]->reg_ctx_lldb_sp->IsTrapHandlerFrame()) {
+      // This frame may result from signal processing installing
+      // a pointer to the first byte of a signal-return trampoline
+      // in the return address slot of the frame below, so this
+      // too behaves like the zeroth frame (i.e. the pc might not
+      // be pointing just past a call in it)
+      behaves_like_zeroth_frame = true;
+    } else {
+      behaves_like_zeroth_frame = false;
+    }
     return true;
   }
   return false;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindLLDB.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindLLDB.h
index c512929..ff5db39 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindLLDB.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindLLDB.h
@@ -73,7 +73,8 @@
   uint32_t DoGetFrameCount() override;
 
   bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
-                             lldb::addr_t &start_pc) override;
+                             lldb::addr_t &start_pc,
+                             bool &behaves_like_zeroth_frame) override;
 
   lldb::RegisterContextSP
   DoCreateRegisterContextForFrame(lldb_private::StackFrame *frame) override;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp b/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
index 7dc5a5f..558edee 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
@@ -43,9 +43,8 @@
   return m_cursors.size();
 }
 
-bool UnwindMacOSXFrameBackchain::DoGetFrameInfoAtIndex(uint32_t idx,
-                                                       addr_t &cfa,
-                                                       addr_t &pc) {
+bool UnwindMacOSXFrameBackchain::DoGetFrameInfoAtIndex(
+    uint32_t idx, addr_t &cfa, addr_t &pc, bool &behaves_like_zeroth_frame) {
   const uint32_t frame_count = GetFrameCount();
   if (idx < frame_count) {
     if (m_cursors[idx].pc == LLDB_INVALID_ADDRESS)
@@ -55,6 +54,7 @@
 
     pc = m_cursors[idx].pc;
     cfa = m_cursors[idx].fp;
+    behaves_like_zeroth_frame = (idx == 0);
 
     return true;
   }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h
index 2208bcc..f0bde90 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h
@@ -26,7 +26,8 @@
   uint32_t DoGetFrameCount() override;
 
   bool DoGetFrameInfoAtIndex(uint32_t frame_idx, lldb::addr_t &cfa,
-                             lldb::addr_t &pc) override;
+                             lldb::addr_t &pc,
+                             bool &behaves_like_zeroth_frame) override;
 
   lldb::RegisterContextSP
   DoCreateRegisterContextForFrame(lldb_private::StackFrame *frame) override;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h b/src/llvm-project/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h
index 0d2149c..bfdd586 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h
@@ -294,7 +294,8 @@
   lldb_bndstatus_x86_64,
   k_last_mpxc_x86_64 = lldb_bndstatus_x86_64,
 
-  lldb_dr0_x86_64,
+  k_first_dbr_x86_64,
+  lldb_dr0_x86_64 = k_first_dbr_x86_64,
   lldb_dr1_x86_64,
   lldb_dr2_x86_64,
   lldb_dr3_x86_64,
@@ -302,6 +303,7 @@
   lldb_dr5_x86_64,
   lldb_dr6_x86_64,
   lldb_dr7_x86_64,
+  k_last_dbr_x86_64 = lldb_dr7_x86_64,
 
   k_num_registers_x86_64,
   k_num_gpr_registers_x86_64 = k_last_gpr_x86_64 - k_first_gpr_x86_64 + 1,
@@ -312,6 +314,7 @@
                                 k_num_fpr_registers_x86_64 +
                                 k_num_avx_registers_x86_64 +
                                 k_num_mpx_registers_x86_64,
+  k_num_dbr_registers_x86_64 = k_last_dbr_x86_64 - k_first_dbr_x86_64 + 1,
 };
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt
index 1d7b8cc..876bc8c 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt
@@ -2,14 +2,23 @@
 add_lldb_library(lldbPluginProcessWindowsCommon PLUGIN
   DebuggerThread.cpp
   LocalDebugDelegate.cpp
+  NativeProcessWindows.cpp
+  NativeRegisterContextWindows.cpp
+  NativeRegisterContextWindows_arm.cpp
+  NativeRegisterContextWindows_arm64.cpp
+  NativeRegisterContextWindows_i386.cpp
+  NativeRegisterContextWindows_WoW64.cpp
+  NativeRegisterContextWindows_x86_64.cpp
+  NativeThreadWindows.cpp
   ProcessDebugger.cpp
   ProcessWindows.cpp
   ProcessWindowsLog.cpp
   RegisterContextWindows.cpp
   TargetThreadWindows.cpp
+  arm/RegisterContextWindows_arm.cpp
+  arm64/RegisterContextWindows_arm64.cpp
   x64/RegisterContextWindows_x64.cpp
   x86/RegisterContextWindows_x86.cpp
-  # TODO add support for ARM (NT) and ARM64
 
   LINK_LIBS
     lldbCore
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
index 58769bd..59bcc25 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
@@ -29,6 +29,10 @@
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/raw_ostream.h"
 
+#ifndef STATUS_WX86_BREAKPOINT
+#define STATUS_WX86_BREAKPOINT 0x4000001FL // For WOW64 
+#endif
+
 using namespace lldb;
 using namespace lldb_private;
 
@@ -350,7 +354,8 @@
     // we use simply to wake up the DebuggerThread so that we can close out the
     // debug loop.
     if (m_pid_to_detach != 0 &&
-        info.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT) {
+        (info.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT ||
+         info.ExceptionRecord.ExceptionCode == STATUS_WX86_BREAKPOINT)) {
       LLDB_LOG(log, "Breakpoint exception is cue to detach from process {0:x}",
                m_pid_to_detach.load());
       ::DebugActiveProcessStop(m_pid_to_detach);
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
new file mode 100644
index 0000000..f888d15
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
@@ -0,0 +1,602 @@
+//===-- NativeProcessWindows.cpp --------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Host/windows/windows.h"
+#include <psapi.h>
+
+#include "NativeProcessWindows.h"
+#include "NativeThreadWindows.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostNativeProcessBase.h"
+#include "lldb/Host/HostProcess.h"
+#include "lldb/Host/ProcessLaunchInfo.h"
+#include "lldb/Host/windows/AutoHandle.h"
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/ProcessLauncherWindows.h"
+#include "lldb/Target/MemoryRegionInfo.h"
+#include "lldb/Target/Process.h"
+#include "lldb/Utility/State.h"
+#include "llvm/Support/ConvertUTF.h"
+#include "llvm/Support/Errc.h"
+#include "llvm/Support/Error.h"
+#include "llvm/Support/Format.h"
+#include "llvm/Support/Threading.h"
+#include "llvm/Support/raw_ostream.h"
+
+#include "DebuggerThread.h"
+#include "ExceptionRecord.h"
+#include "ProcessWindowsLog.h"
+
+#include <tlhelp32.h>
+
+#pragma warning(disable : 4005)
+#include "winternl.h"
+#include <ntstatus.h>
+
+using namespace lldb;
+using namespace lldb_private;
+using namespace llvm;
+
+namespace lldb_private {
+
+NativeProcessWindows::NativeProcessWindows(ProcessLaunchInfo &launch_info,
+                                           NativeDelegate &delegate,
+                                           llvm::Error &E)
+    : NativeProcessProtocol(LLDB_INVALID_PROCESS_ID,
+                            launch_info.GetPTY().ReleaseMasterFileDescriptor(),
+                            delegate),
+      ProcessDebugger(), m_arch(launch_info.GetArchitecture()) {
+  ErrorAsOutParameter EOut(&E);
+  DebugDelegateSP delegate_sp(new NativeDebugDelegate(*this));
+  E = LaunchProcess(launch_info, delegate_sp).ToError();
+  if (E)
+    return;
+
+  SetID(GetDebuggedProcessId());
+}
+
+NativeProcessWindows::NativeProcessWindows(lldb::pid_t pid, int terminal_fd,
+                                           NativeDelegate &delegate,
+                                           llvm::Error &E)
+    : NativeProcessProtocol(pid, terminal_fd, delegate), ProcessDebugger() {
+  ErrorAsOutParameter EOut(&E);
+  DebugDelegateSP delegate_sp(new NativeDebugDelegate(*this));
+  ProcessAttachInfo attach_info;
+  attach_info.SetProcessID(pid);
+  E = AttachProcess(pid, attach_info, delegate_sp).ToError();
+  if (E)
+    return;
+
+  SetID(GetDebuggedProcessId());
+
+  ProcessInstanceInfo info;
+  if (!Host::GetProcessInfo(pid, info)) {
+    E = createStringError(inconvertibleErrorCode(),
+                          "Cannot get process information");
+    return;
+  }
+  m_arch = info.GetArchitecture();
+}
+
+Status NativeProcessWindows::Resume(const ResumeActionList &resume_actions) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
+  Status error;
+  llvm::sys::ScopedLock lock(m_mutex);
+
+  StateType state = GetState();
+  if (state == eStateStopped || state == eStateCrashed) {
+    LLDB_LOG(log, "process {0} is in state {1}.  Resuming...",
+             GetDebuggedProcessId(), state);
+    LLDB_LOG(log, "resuming {0} threads.", m_threads.size());
+
+    bool failed = false;
+    for (uint32_t i = 0; i < m_threads.size(); ++i) {
+      auto thread = static_cast<NativeThreadWindows *>(m_threads[i].get());
+      const ResumeAction *const action =
+          resume_actions.GetActionForThread(thread->GetID(), true);
+      if (action == nullptr)
+        continue;
+
+      switch (action->state) {
+      case eStateRunning:
+      case eStateStepping: {
+        Status result = thread->DoResume(action->state);
+        if (result.Fail()) {
+          failed = true;
+          LLDB_LOG(log,
+                   "Trying to resume thread at index {0}, but failed with "
+                   "error {1}.",
+                   i, result);
+        }
+        break;
+      }
+      case eStateSuspended:
+      case eStateStopped:
+        llvm_unreachable("Unexpected state");
+
+      default:
+        return Status(
+            "NativeProcessWindows::%s (): unexpected state %s specified "
+            "for pid %" PRIu64 ", tid %" PRIu64,
+            __FUNCTION__, StateAsCString(action->state), GetID(),
+            thread->GetID());
+      }
+    }
+
+    if (failed) {
+      error.SetErrorString("NativeProcessWindows::DoResume failed");
+    } else {
+      SetState(eStateRunning);
+    }
+
+    // Resume the debug loop.
+    ExceptionRecordSP active_exception =
+        m_session_data->m_debugger->GetActiveException().lock();
+    if (active_exception) {
+      // Resume the process and continue processing debug events.  Mask the
+      // exception so that from the process's view, there is no indication that
+      // anything happened.
+      m_session_data->m_debugger->ContinueAsyncException(
+          ExceptionResult::MaskException);
+    }
+  } else {
+    LLDB_LOG(log, "error: process {0} is in state {1}.  Returning...",
+             GetDebuggedProcessId(), GetState());
+  }
+
+  return error;
+}
+
+NativeThreadWindows *
+NativeProcessWindows::GetThreadByID(lldb::tid_t thread_id) {
+  return static_cast<NativeThreadWindows *>(
+      NativeProcessProtocol::GetThreadByID(thread_id));
+}
+
+Status NativeProcessWindows::Halt() {
+  bool caused_stop = false;
+  StateType state = GetState();
+  if (state != eStateStopped)
+    return HaltProcess(caused_stop);
+  return Status();
+}
+
+Status NativeProcessWindows::Detach() {
+  Status error;
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
+  StateType state = GetState();
+  if (state != eStateExited && state != eStateDetached) {
+    error = DetachProcess();
+    if (error.Success())
+      SetState(eStateDetached);
+    else
+      LLDB_LOG(log, "Detaching process error: {0}", error);
+  } else {
+    error.SetErrorStringWithFormatv("error: process {0} in state = {1}, but "
+                                    "cannot detach it in this state.",
+                                    GetID(), state);
+    LLDB_LOG(log, "error: {0}", error);
+  }
+  return error;
+}
+
+Status NativeProcessWindows::Signal(int signo) {
+  Status error;
+  error.SetErrorString("Windows does not support sending signals to processes");
+  return error;
+}
+
+Status NativeProcessWindows::Interrupt() { return Halt(); }
+
+Status NativeProcessWindows::Kill() {
+  StateType state = GetState();
+  return DestroyProcess(state);
+}
+
+Status NativeProcessWindows::IgnoreSignals(llvm::ArrayRef<int> signals) {
+  return Status();
+}
+
+Status NativeProcessWindows::GetMemoryRegionInfo(lldb::addr_t load_addr,
+                                                 MemoryRegionInfo &range_info) {
+  return ProcessDebugger::GetMemoryRegionInfo(load_addr, range_info);
+}
+
+Status NativeProcessWindows::ReadMemory(lldb::addr_t addr, void *buf,
+                                        size_t size, size_t &bytes_read) {
+  return ProcessDebugger::ReadMemory(addr, buf, size, bytes_read);
+}
+
+Status NativeProcessWindows::WriteMemory(lldb::addr_t addr, const void *buf,
+                                         size_t size, size_t &bytes_written) {
+  return ProcessDebugger::WriteMemory(addr, buf, size, bytes_written);
+}
+
+Status NativeProcessWindows::AllocateMemory(size_t size, uint32_t permissions,
+                                            lldb::addr_t &addr) {
+  return ProcessDebugger::AllocateMemory(size, permissions, addr);
+}
+
+Status NativeProcessWindows::DeallocateMemory(lldb::addr_t addr) {
+  return ProcessDebugger::DeallocateMemory(addr);
+}
+
+lldb::addr_t NativeProcessWindows::GetSharedLibraryInfoAddress() { return 0; }
+
+bool NativeProcessWindows::IsAlive() const {
+  StateType state = GetState();
+  switch (state) {
+  case eStateCrashed:
+  case eStateDetached:
+  case eStateExited:
+  case eStateInvalid:
+  case eStateUnloaded:
+    return false;
+  default:
+    return true;
+  }
+}
+
+void NativeProcessWindows::SetStopReasonForThread(NativeThreadWindows &thread,
+                                                  lldb::StopReason reason,
+                                                  std::string description) {
+  SetCurrentThreadID(thread.GetID());
+
+  ThreadStopInfo stop_info;
+  stop_info.reason = reason;
+
+  // No signal support on Windows but required to provide a 'valid' signum.
+  if (reason == StopReason::eStopReasonException) {
+    stop_info.details.exception.type = 0;
+    stop_info.details.exception.data_count = 0;
+  } else {
+    stop_info.details.signal.signo = SIGTRAP;
+  }
+
+  thread.SetStopReason(stop_info, description);
+}
+
+void NativeProcessWindows::StopThread(lldb::tid_t thread_id,
+                                      lldb::StopReason reason,
+                                      std::string description) {
+  NativeThreadWindows *thread = GetThreadByID(thread_id);
+  if (!thread)
+    return;
+
+  for (uint32_t i = 0; i < m_threads.size(); ++i) {
+    auto t = static_cast<NativeThreadWindows *>(m_threads[i].get());
+    Status error = t->DoStop();
+    if (error.Fail())
+      exit(1);
+  }
+  SetStopReasonForThread(*thread, reason, description);
+}
+
+size_t NativeProcessWindows::UpdateThreads() { return m_threads.size(); }
+
+llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
+NativeProcessWindows::GetAuxvData() const {
+  // Not available on this target.
+  return llvm::errc::not_supported;
+}
+
+bool NativeProcessWindows::FindSoftwareBreakpoint(lldb::addr_t addr) {
+  auto it = m_software_breakpoints.find(addr);
+  if (it == m_software_breakpoints.end())
+    return false;
+  return true;
+}
+
+Status NativeProcessWindows::SetBreakpoint(lldb::addr_t addr, uint32_t size,
+                                           bool hardware) {
+  if (hardware)
+    return SetHardwareBreakpoint(addr, size);
+  return SetSoftwareBreakpoint(addr, size);
+}
+
+Status NativeProcessWindows::RemoveBreakpoint(lldb::addr_t addr,
+                                              bool hardware) {
+  if (hardware)
+    return RemoveHardwareBreakpoint(addr);
+  return RemoveSoftwareBreakpoint(addr);
+}
+
+Status NativeProcessWindows::CacheLoadedModules() {
+  Status error;
+  if (!m_loaded_modules.empty())
+    return Status();
+
+  // Retrieve loaded modules by a Target/Module free implemenation.
+  AutoHandle snapshot(CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, GetID()));
+  if (snapshot.IsValid()) {
+    MODULEENTRY32W me;
+    me.dwSize = sizeof(MODULEENTRY32W);
+    if (Module32FirstW(snapshot.get(), &me)) {
+      do {
+        std::string path;
+        if (!llvm::convertWideToUTF8(me.szExePath, path))
+          continue;
+
+        FileSpec file_spec(path);
+        FileSystem::Instance().Resolve(file_spec);
+        m_loaded_modules[file_spec] = (addr_t)me.modBaseAddr;
+      } while (Module32Next(snapshot.get(), &me));
+    }
+
+    if (!m_loaded_modules.empty())
+      return Status();
+  }
+
+  error.SetError(::GetLastError(), lldb::ErrorType::eErrorTypeWin32);
+  return error;
+}
+
+Status NativeProcessWindows::GetLoadedModuleFileSpec(const char *module_path,
+                                                     FileSpec &file_spec) {
+  Status error = CacheLoadedModules();
+  if (error.Fail())
+    return error;
+
+  FileSpec module_file_spec(module_path);
+  FileSystem::Instance().Resolve(module_file_spec);
+  for (auto &it : m_loaded_modules) {
+    if (it.first == module_file_spec) {
+      file_spec = it.first;
+      return Status();
+    }
+  }
+  return Status("Module (%s) not found in process %" PRIu64 "!",
+                module_file_spec.GetCString(), GetID());
+}
+
+Status
+NativeProcessWindows::GetFileLoadAddress(const llvm::StringRef &file_name,
+                                         lldb::addr_t &load_addr) {
+  Status error = CacheLoadedModules();
+  if (error.Fail())
+    return error;
+
+  load_addr = LLDB_INVALID_ADDRESS;
+  FileSpec file_spec(file_name);
+  FileSystem::Instance().Resolve(file_spec);
+  for (auto &it : m_loaded_modules) {
+    if (it.first == file_spec) {
+      load_addr = it.second;
+      return Status();
+    }
+  }
+  return Status("Can't get loaded address of file (%s) in process %" PRIu64 "!",
+                file_spec.GetCString(), GetID());
+}
+
+void NativeProcessWindows::OnExitProcess(uint32_t exit_code) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
+  LLDB_LOG(log, "Process {0} exited with code {1}", GetID(), exit_code);
+
+  ProcessDebugger::OnExitProcess(exit_code);
+
+  // No signal involved.  It is just an exit event.
+  WaitStatus wait_status(WaitStatus::Exit, exit_code);
+  SetExitStatus(wait_status, true);
+
+  // Notify the native delegate.
+  SetState(eStateExited, true);
+}
+
+void NativeProcessWindows::OnDebuggerConnected(lldb::addr_t image_base) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS);
+  LLDB_LOG(log, "Debugger connected to process {0}. Image base = {1:x}",
+           GetDebuggedProcessId(), image_base);
+
+  // This is the earliest chance we can resolve the process ID and
+  // architecutre if we don't know them yet.
+  if (GetID() == LLDB_INVALID_PROCESS_ID)
+    SetID(GetDebuggedProcessId());
+
+  if (GetArchitecture().GetMachine() == llvm::Triple::UnknownArch) {
+    ProcessInstanceInfo process_info;
+    if (!Host::GetProcessInfo(GetDebuggedProcessId(), process_info)) {
+      LLDB_LOG(log, "Cannot get process information during debugger connecting "
+                    "to process");
+      return;
+    }
+    SetArchitecture(process_info.GetArchitecture());
+  }
+
+  // The very first one shall always be the main thread.
+  assert(m_threads.empty());
+  m_threads.push_back(std::make_unique<NativeThreadWindows>(
+      *this, m_session_data->m_debugger->GetMainThread()));
+}
+
+ExceptionResult
+NativeProcessWindows::OnDebugException(bool first_chance,
+                                       const ExceptionRecord &record) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EXCEPTION);
+  llvm::sys::ScopedLock lock(m_mutex);
+
+  // Let the debugger establish the internal status.
+  ProcessDebugger::OnDebugException(first_chance, record);
+
+  static bool initial_stop = false;
+  if (!first_chance) {
+    SetState(eStateStopped, false);
+  }
+
+  ExceptionResult result = ExceptionResult::SendToApplication;
+  switch (record.GetExceptionCode()) {
+  case DWORD(STATUS_SINGLE_STEP):
+  case STATUS_WX86_SINGLE_STEP: {
+    uint32_t wp_id = LLDB_INVALID_INDEX32;
+    if (NativeThreadWindows *thread = GetThreadByID(record.GetThreadID())) {
+      NativeRegisterContextWindows &reg_ctx = thread->GetRegisterContext();
+      Status error =
+          reg_ctx.GetWatchpointHitIndex(wp_id, record.GetExceptionAddress());
+      if (error.Fail())
+        LLDB_LOG(log,
+                 "received error while checking for watchpoint hits, pid = "
+                 "{0}, error = {1}",
+                 thread->GetID(), error);
+      if (wp_id != LLDB_INVALID_INDEX32) {
+        addr_t wp_addr = reg_ctx.GetWatchpointAddress(wp_id);
+        addr_t wp_hit_addr = reg_ctx.GetWatchpointHitAddress(wp_id);
+        std::string desc =
+            formatv("{0} {1} {2}", wp_addr, wp_id, wp_hit_addr).str();
+        StopThread(record.GetThreadID(), StopReason::eStopReasonWatchpoint,
+                   desc);
+      }
+    }
+    if (wp_id == LLDB_INVALID_INDEX32)
+      StopThread(record.GetThreadID(), StopReason::eStopReasonTrace);
+
+    SetState(eStateStopped, true);
+
+    // Continue the debugger.
+    return ExceptionResult::MaskException;
+  }
+  case DWORD(STATUS_BREAKPOINT):
+  case STATUS_WX86_BREAKPOINT:
+    if (FindSoftwareBreakpoint(record.GetExceptionAddress())) {
+      LLDB_LOG(log, "Hit non-loader breakpoint at address {0:x}.",
+               record.GetExceptionAddress());
+
+      StopThread(record.GetThreadID(), StopReason::eStopReasonBreakpoint);
+
+      if (NativeThreadWindows *stop_thread =
+              GetThreadByID(record.GetThreadID())) {
+        auto &register_context = stop_thread->GetRegisterContext();
+        // The current EIP is AFTER the BP opcode, which is one byte '0xCC'
+        uint64_t pc = register_context.GetPC() - 1;
+        register_context.SetPC(pc);
+      }
+
+      SetState(eStateStopped, true);
+      return ExceptionResult::MaskException;
+    }
+
+    if (!initial_stop) {
+      initial_stop = true;
+      LLDB_LOG(log,
+               "Hit loader breakpoint at address {0:x}, setting initial stop "
+               "event.",
+               record.GetExceptionAddress());
+
+      // We are required to report the reason for the first stop after
+      // launching or being attached.
+      if (NativeThreadWindows *thread = GetThreadByID(record.GetThreadID()))
+        SetStopReasonForThread(*thread, StopReason::eStopReasonBreakpoint);
+
+      // Do not notify the native delegate (e.g. llgs) since at this moment
+      // the program hasn't returned from Factory::Launch() and the delegate
+      // might not have an valid native process to operate on.
+      SetState(eStateStopped, false);
+
+      // Hit the initial stop. Continue the application.
+      return ExceptionResult::BreakInDebugger;
+    }
+
+    LLVM_FALLTHROUGH;
+  default:
+    LLDB_LOG(log,
+             "Debugger thread reported exception {0:x} at address {1:x} "
+             "(first_chance={2})",
+             record.GetExceptionCode(), record.GetExceptionAddress(),
+             first_chance);
+
+    {
+      std::string desc;
+      llvm::raw_string_ostream desc_stream(desc);
+      desc_stream << "Exception "
+                  << llvm::format_hex(record.GetExceptionCode(), 8)
+                  << " encountered at address "
+                  << llvm::format_hex(record.GetExceptionAddress(), 8);
+      StopThread(record.GetThreadID(), StopReason::eStopReasonException,
+                 desc_stream.str().c_str());
+
+      SetState(eStateStopped, true);
+    }
+
+    // For non-breakpoints, give the application a chance to handle the
+    // exception first.
+    if (first_chance)
+      result = ExceptionResult::SendToApplication;
+    else
+      result = ExceptionResult::BreakInDebugger;
+  }
+
+  return result;
+}
+
+void NativeProcessWindows::OnCreateThread(const HostThread &new_thread) {
+  llvm::sys::ScopedLock lock(m_mutex);
+
+  auto thread = std::make_unique<NativeThreadWindows>(*this, new_thread);
+  thread->GetRegisterContext().ClearAllHardwareWatchpoints();
+  for (const auto &pair : GetWatchpointMap()) {
+    const NativeWatchpoint &wp = pair.second;
+    thread->SetWatchpoint(wp.m_addr, wp.m_size, wp.m_watch_flags,
+                          wp.m_hardware);
+  }
+
+  m_threads.push_back(std::move(thread));
+}
+
+void NativeProcessWindows::OnExitThread(lldb::tid_t thread_id,
+                                        uint32_t exit_code) {
+  llvm::sys::ScopedLock lock(m_mutex);
+  NativeThreadWindows *thread = GetThreadByID(thread_id);
+  if (!thread)
+    return;
+
+  for (auto t = m_threads.begin(); t != m_threads.end();) {
+    if ((*t)->GetID() == thread_id) {
+      t = m_threads.erase(t);
+    } else {
+      ++t;
+    }
+  }
+}
+
+void NativeProcessWindows::OnLoadDll(const ModuleSpec &module_spec,
+                                     lldb::addr_t module_addr) {
+  // Simply invalidate the cached loaded modules.
+  if (!m_loaded_modules.empty())
+    m_loaded_modules.clear();
+}
+
+void NativeProcessWindows::OnUnloadDll(lldb::addr_t module_addr) {
+  if (!m_loaded_modules.empty())
+    m_loaded_modules.clear();
+}
+
+llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
+NativeProcessWindows::Factory::Launch(
+    ProcessLaunchInfo &launch_info,
+    NativeProcessProtocol::NativeDelegate &native_delegate,
+    MainLoop &mainloop) const {
+  Error E = Error::success();
+  auto process_up = std::unique_ptr<NativeProcessWindows>(
+      new NativeProcessWindows(launch_info, native_delegate, E));
+  if (E)
+    return std::move(E);
+  return std::move(process_up);
+}
+
+llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
+NativeProcessWindows::Factory::Attach(
+    lldb::pid_t pid, NativeProcessProtocol::NativeDelegate &native_delegate,
+    MainLoop &mainloop) const {
+  Error E = Error::success();
+  // Set pty master fd invalid since it is not available.
+  auto process_up = std::unique_ptr<NativeProcessWindows>(
+      new NativeProcessWindows(pid, -1, native_delegate, E));
+  if (E)
+    return std::move(E);
+  return std::move(process_up);
+}
+} // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.h
new file mode 100644
index 0000000..732273a
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeProcessWindows.h
@@ -0,0 +1,182 @@
+//===-- NativeProcessWindows.h ----------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_NativeProcessWindows_h_
+#define liblldb_NativeProcessWindows_h_
+
+#include "lldb/Host/common/NativeProcessProtocol.h"
+#include "lldb/lldb-forward.h"
+
+#include "IDebugDelegate.h"
+#include "ProcessDebugger.h"
+
+namespace lldb_private {
+
+class HostProcess;
+class NativeProcessWindows;
+class NativeThreadWindows;
+class NativeDebugDelegate;
+
+typedef std::shared_ptr<NativeDebugDelegate> NativeDebugDelegateSP;
+
+//------------------------------------------------------------------
+// NativeProcessWindows
+//------------------------------------------------------------------
+class NativeProcessWindows : public NativeProcessProtocol,
+                             public ProcessDebugger {
+
+public:
+  class Factory : public NativeProcessProtocol::Factory {
+  public:
+    llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
+    Launch(ProcessLaunchInfo &launch_info, NativeDelegate &native_delegate,
+           MainLoop &mainloop) const override;
+
+    llvm::Expected<std::unique_ptr<NativeProcessProtocol>>
+    Attach(lldb::pid_t pid, NativeDelegate &native_delegate,
+           MainLoop &mainloop) const override;
+  };
+
+  Status Resume(const ResumeActionList &resume_actions) override;
+
+  Status Halt() override;
+
+  Status Detach() override;
+
+  Status Signal(int signo) override;
+
+  Status Interrupt() override;
+
+  Status Kill() override;
+
+  Status IgnoreSignals(llvm::ArrayRef<int> signals) override;
+
+  Status GetMemoryRegionInfo(lldb::addr_t load_addr,
+                             MemoryRegionInfo &range_info) override;
+
+  Status ReadMemory(lldb::addr_t addr, void *buf, size_t size,
+                    size_t &bytes_read) override;
+
+  Status WriteMemory(lldb::addr_t addr, const void *buf, size_t size,
+                     size_t &bytes_written) override;
+
+  Status AllocateMemory(size_t size, uint32_t permissions,
+                        lldb::addr_t &addr) override;
+
+  Status DeallocateMemory(lldb::addr_t addr) override;
+
+  lldb::addr_t GetSharedLibraryInfoAddress() override;
+
+  bool IsAlive() const override;
+
+  size_t UpdateThreads() override;
+
+  const ArchSpec &GetArchitecture() const override { return m_arch; }
+
+  void SetArchitecture(const ArchSpec &arch_spec) { m_arch = arch_spec; }
+
+  Status SetBreakpoint(lldb::addr_t addr, uint32_t size,
+                       bool hardware) override;
+
+  Status RemoveBreakpoint(lldb::addr_t addr, bool hardware = false) override;
+
+  llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>>
+  GetAuxvData() const override;
+
+  Status GetLoadedModuleFileSpec(const char *module_path,
+                                 FileSpec &file_spec) override;
+
+  Status GetFileLoadAddress(const llvm::StringRef &file_name,
+                            lldb::addr_t &load_addr) override;
+
+  // ProcessDebugger Overrides
+  void OnExitProcess(uint32_t exit_code) override;
+  void OnDebuggerConnected(lldb::addr_t image_base) override;
+  ExceptionResult OnDebugException(bool first_chance,
+                                   const ExceptionRecord &record) override;
+  void OnCreateThread(const HostThread &thread) override;
+  void OnExitThread(lldb::tid_t thread_id, uint32_t exit_code) override;
+  void OnLoadDll(const ModuleSpec &module_spec,
+                 lldb::addr_t module_addr) override;
+  void OnUnloadDll(lldb::addr_t module_addr) override;
+
+protected:
+  NativeThreadWindows *GetThreadByID(lldb::tid_t thread_id);
+
+  bool FindSoftwareBreakpoint(lldb::addr_t addr);
+
+  void StopThread(lldb::tid_t thread_id, lldb::StopReason reason,
+                  std::string description = "");
+
+  void SetStopReasonForThread(NativeThreadWindows &thread,
+                              lldb::StopReason reason,
+                              std::string description = "");
+
+private:
+  ArchSpec m_arch;
+
+  NativeProcessWindows(ProcessLaunchInfo &launch_info, NativeDelegate &delegate,
+                       llvm::Error &E);
+
+  NativeProcessWindows(lldb::pid_t pid, int terminal_fd,
+                       NativeDelegate &delegate, llvm::Error &E);
+
+  Status CacheLoadedModules();
+  std::map<lldb_private::FileSpec, lldb::addr_t> m_loaded_modules;
+};
+
+//------------------------------------------------------------------
+// NativeDebugDelegate
+//------------------------------------------------------------------
+class NativeDebugDelegate : public IDebugDelegate {
+public:
+  NativeDebugDelegate(NativeProcessWindows &process) : m_process(process) {}
+
+  void OnExitProcess(uint32_t exit_code) { m_process.OnExitProcess(exit_code); }
+
+  void OnDebuggerConnected(lldb::addr_t image_base) {
+    m_process.OnDebuggerConnected(image_base);
+  }
+
+  ExceptionResult OnDebugException(bool first_chance,
+                                   const ExceptionRecord &record) {
+    return m_process.OnDebugException(first_chance, record);
+  }
+
+  void OnCreateThread(const HostThread &thread) {
+    m_process.OnCreateThread(thread);
+  }
+
+  void OnExitThread(lldb::tid_t thread_id, uint32_t exit_code) {
+    m_process.OnExitThread(thread_id, exit_code);
+  }
+
+  void OnLoadDll(const lldb_private::ModuleSpec &module_spec,
+                 lldb::addr_t module_addr) {
+    m_process.OnLoadDll(module_spec, module_addr);
+  }
+
+  void OnUnloadDll(lldb::addr_t module_addr) {
+    m_process.OnUnloadDll(module_addr);
+  }
+
+  void OnDebugString(const std::string &string) {
+    m_process.OnDebugString(string);
+  }
+
+  void OnDebuggerError(const Status &error, uint32_t type) {
+    return m_process.OnDebuggerError(error, type);
+  }
+
+private:
+  NativeProcessWindows &m_process;
+};
+
+} // namespace lldb_private
+
+#endif // #ifndef liblldb_NativeProcessWindows_h_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.cpp
new file mode 100644
index 0000000..fd82721
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.cpp
@@ -0,0 +1,28 @@
+//===-- NativeRegisterContextWindows.cpp ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Host/HostThread.h"
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/windows.h"
+#include "lldb/Utility/Log.h"
+
+#include "NativeRegisterContextWindows.h"
+#include "NativeThreadWindows.h"
+#include "ProcessWindowsLog.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+NativeRegisterContextWindows::NativeRegisterContextWindows(
+    NativeThreadProtocol &thread, RegisterInfoInterface *reg_info_interface_p)
+    : NativeRegisterContextRegisterInfo(thread, reg_info_interface_p) {}
+
+lldb::thread_t NativeRegisterContextWindows::GetThreadHandle() const {
+  auto wthread = static_cast<NativeThreadWindows *>(&m_thread);
+  return wthread->GetHostThread().GetNativeThread().GetSystemHandle();
+}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.h
new file mode 100644
index 0000000..841b854
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows.h
@@ -0,0 +1,36 @@
+//===-- NativeRegisterContextWindows.h --------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_NativeRegisterContextWindows_h_
+#define liblldb_NativeRegisterContextWindows_h_
+
+#include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h"
+#include "lldb/Host/common/NativeThreadProtocol.h"
+#include "lldb/Utility/DataBufferHeap.h"
+
+namespace lldb_private {
+
+class NativeThreadWindows;
+
+class NativeRegisterContextWindows : public NativeRegisterContextRegisterInfo {
+public:
+  NativeRegisterContextWindows(
+      NativeThreadProtocol &native_thread,
+      RegisterInfoInterface *reg_info_interface_p);
+
+  static std::unique_ptr<NativeRegisterContextWindows>
+  CreateHostNativeRegisterContextWindows(const ArchSpec &target_arch,
+                                         NativeThreadProtocol &native_thread);
+
+protected:
+  lldb::thread_t GetThreadHandle() const;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_NativeRegisterContextWindows_h_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
new file mode 100644
index 0000000..a5a86f5
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
@@ -0,0 +1,602 @@
+//===-- NativeRegisterContextWindows_WoW64.cpp ----- ------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__x86_64__) || defined(_M_X64)
+
+#include "NativeRegisterContextWindows_WoW64.h"
+
+#include "NativeThreadWindows.h"
+#include "Plugins/Process/Utility/RegisterContextWindows_i386.h"
+#include "ProcessWindowsLog.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Host/HostThread.h"
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/windows.h"
+
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "llvm/ADT/STLExtras.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+#define REG_CONTEXT_SIZE sizeof(::WOW64_CONTEXT)
+
+namespace {
+static const uint32_t g_gpr_regnums_WoW64[] = {
+    lldb_eax_i386,      lldb_ebx_i386,    lldb_ecx_i386, lldb_edx_i386,
+    lldb_edi_i386,      lldb_esi_i386,    lldb_ebp_i386, lldb_esp_i386,
+    lldb_eip_i386,      lldb_eflags_i386, lldb_cs_i386,  lldb_fs_i386,
+    lldb_gs_i386,       lldb_ss_i386,     lldb_ds_i386,  lldb_es_i386,
+    LLDB_INVALID_REGNUM // Register set must be terminated with this flag.
+};
+
+static const RegisterSet g_reg_sets_WoW64[] = {
+    {"General Purpose Registers", "gpr",
+     llvm::array_lengthof(g_gpr_regnums_WoW64) - 1, g_gpr_regnums_WoW64},
+};
+enum { k_num_register_sets = 1 };
+
+static const DWORD kWoW64ContextFlags =
+    WOW64_CONTEXT_CONTROL | WOW64_CONTEXT_INTEGER | WOW64_CONTEXT_SEGMENTS;
+
+} // namespace
+
+static RegisterInfoInterface *
+CreateRegisterInfoInterface(const ArchSpec &target_arch) {
+  // i686 32bit instruction set.
+  assert((target_arch.GetAddressByteSize() == 4 &&
+          HostInfo::GetArchitecture().GetAddressByteSize() == 8) &&
+         "Register setting path assumes this is a 64-bit host");
+  return new RegisterContextWindows_i386(target_arch);
+}
+
+static Status
+GetWoW64ThreadContextHelper(lldb::thread_t thread_handle,
+                            PWOW64_CONTEXT context_ptr,
+                            const DWORD control_flag = kWoW64ContextFlags) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+  memset(context_ptr, 0, sizeof(::WOW64_CONTEXT));
+  context_ptr->ContextFlags = control_flag;
+  if (!::Wow64GetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} Wow64GetThreadContext failed with error {1}",
+             __FUNCTION__, error);
+    return error;
+  }
+  return Status();
+}
+
+static Status SetWoW64ThreadContextHelper(lldb::thread_t thread_handle,
+                                          PWOW64_CONTEXT context_ptr) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+  if (!::Wow64SetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} Wow64SetThreadContext failed with error {1}",
+             __FUNCTION__, error);
+    return error;
+  }
+  return Status();
+}
+
+NativeRegisterContextWindows_WoW64::NativeRegisterContextWindows_WoW64(
+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread)
+    : NativeRegisterContextWindows(native_thread,
+                                   CreateRegisterInfoInterface(target_arch)) {}
+
+bool NativeRegisterContextWindows_WoW64::IsGPR(uint32_t reg_index) const {
+  return (reg_index >= k_first_gpr_i386 && reg_index < k_first_alias_i386);
+}
+
+bool NativeRegisterContextWindows_WoW64::IsDR(uint32_t reg_index) const {
+  return (reg_index >= lldb_dr0_i386 && reg_index <= lldb_dr7_i386);
+}
+
+uint32_t NativeRegisterContextWindows_WoW64::GetRegisterSetCount() const {
+  return k_num_register_sets;
+}
+
+const RegisterSet *
+NativeRegisterContextWindows_WoW64::GetRegisterSet(uint32_t set_index) const {
+  if (set_index >= k_num_register_sets)
+    return nullptr;
+  return &g_reg_sets_WoW64[set_index];
+}
+
+Status NativeRegisterContextWindows_WoW64::GPRRead(const uint32_t reg,
+                                                   RegisterValue &reg_value) {
+  ::WOW64_CONTEXT tls_context;
+  Status error = GetWoW64ThreadContextHelper(GetThreadHandle(), &tls_context);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_eax_i386:
+    reg_value.SetUInt32(tls_context.Eax);
+    break;
+  case lldb_ebx_i386:
+    reg_value.SetUInt32(tls_context.Ebx);
+    break;
+  case lldb_ecx_i386:
+    reg_value.SetUInt32(tls_context.Ecx);
+    break;
+  case lldb_edx_i386:
+    reg_value.SetUInt32(tls_context.Edx);
+    break;
+  case lldb_edi_i386:
+    reg_value.SetUInt32(tls_context.Edi);
+    break;
+  case lldb_esi_i386:
+    reg_value.SetUInt32(tls_context.Esi);
+    break;
+  case lldb_ebp_i386:
+    reg_value.SetUInt32(tls_context.Ebp);
+    break;
+  case lldb_esp_i386:
+    reg_value.SetUInt32(tls_context.Esp);
+    break;
+  case lldb_eip_i386:
+    reg_value.SetUInt32(tls_context.Eip);
+    break;
+  case lldb_eflags_i386:
+    reg_value.SetUInt32(tls_context.EFlags);
+    break;
+  case lldb_cs_i386:
+    reg_value.SetUInt32(tls_context.SegCs);
+    break;
+  case lldb_fs_i386:
+    reg_value.SetUInt32(tls_context.SegFs);
+    break;
+  case lldb_gs_i386:
+    reg_value.SetUInt32(tls_context.SegGs);
+    break;
+  case lldb_ss_i386:
+    reg_value.SetUInt32(tls_context.SegSs);
+    break;
+  case lldb_ds_i386:
+    reg_value.SetUInt32(tls_context.SegDs);
+    break;
+  case lldb_es_i386:
+    reg_value.SetUInt32(tls_context.SegEs);
+    break;
+  }
+
+  return error;
+}
+
+Status
+NativeRegisterContextWindows_WoW64::GPRWrite(const uint32_t reg,
+                                             const RegisterValue &reg_value) {
+  ::WOW64_CONTEXT tls_context;
+  auto thread_handle = GetThreadHandle();
+  Status error = GetWoW64ThreadContextHelper(thread_handle, &tls_context);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_eax_i386:
+    tls_context.Eax = reg_value.GetAsUInt32();
+    break;
+  case lldb_ebx_i386:
+    tls_context.Ebx = reg_value.GetAsUInt32();
+    break;
+  case lldb_ecx_i386:
+    tls_context.Ecx = reg_value.GetAsUInt32();
+    break;
+  case lldb_edx_i386:
+    tls_context.Edx = reg_value.GetAsUInt32();
+    break;
+  case lldb_edi_i386:
+    tls_context.Edi = reg_value.GetAsUInt32();
+    break;
+  case lldb_esi_i386:
+    tls_context.Esi = reg_value.GetAsUInt32();
+    break;
+  case lldb_ebp_i386:
+    tls_context.Ebp = reg_value.GetAsUInt32();
+    break;
+  case lldb_esp_i386:
+    tls_context.Esp = reg_value.GetAsUInt32();
+    break;
+  case lldb_eip_i386:
+    tls_context.Eip = reg_value.GetAsUInt32();
+    break;
+  case lldb_eflags_i386:
+    tls_context.EFlags = reg_value.GetAsUInt32();
+    break;
+  case lldb_cs_i386:
+    tls_context.SegCs = reg_value.GetAsUInt32();
+    break;
+  case lldb_fs_i386:
+    tls_context.SegFs = reg_value.GetAsUInt32();
+    break;
+  case lldb_gs_i386:
+    tls_context.SegGs = reg_value.GetAsUInt32();
+    break;
+  case lldb_ss_i386:
+    tls_context.SegSs = reg_value.GetAsUInt32();
+    break;
+  case lldb_ds_i386:
+    tls_context.SegDs = reg_value.GetAsUInt32();
+    break;
+  case lldb_es_i386:
+    tls_context.SegEs = reg_value.GetAsUInt32();
+    break;
+  }
+
+  return SetWoW64ThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status NativeRegisterContextWindows_WoW64::DRRead(const uint32_t reg,
+                                                  RegisterValue &reg_value) {
+  ::WOW64_CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_DEBUG_REGISTERS;
+  Status error = GetWoW64ThreadContextHelper(GetThreadHandle(), &tls_context,
+                                             context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_dr0_i386:
+    reg_value.SetUInt32(tls_context.Dr0);
+    break;
+  case lldb_dr1_i386:
+    reg_value.SetUInt32(tls_context.Dr1);
+    break;
+  case lldb_dr2_i386:
+    reg_value.SetUInt32(tls_context.Dr2);
+    break;
+  case lldb_dr3_i386:
+    reg_value.SetUInt32(tls_context.Dr3);
+    break;
+  case lldb_dr4_i386:
+    return Status("register DR4 is obsolete");
+  case lldb_dr5_i386:
+    return Status("register DR5 is obsolete");
+  case lldb_dr6_i386:
+    reg_value.SetUInt32(tls_context.Dr6);
+    break;
+  case lldb_dr7_i386:
+    reg_value.SetUInt32(tls_context.Dr7);
+    break;
+  }
+
+  return {};
+}
+
+Status
+NativeRegisterContextWindows_WoW64::DRWrite(const uint32_t reg,
+                                            const RegisterValue &reg_value) {
+  ::WOW64_CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_DEBUG_REGISTERS;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetWoW64ThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_dr0_i386:
+    tls_context.Dr0 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr1_i386:
+    tls_context.Dr1 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr2_i386:
+    tls_context.Dr2 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr3_i386:
+    tls_context.Dr3 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr4_i386:
+    return Status("register DR4 is obsolete");
+  case lldb_dr5_i386:
+    return Status("register DR5 is obsolete");
+  case lldb_dr6_i386:
+    tls_context.Dr6 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr7_i386:
+    tls_context.Dr7 = reg_value.GetAsUInt32();
+    break;
+  }
+
+  return SetWoW64ThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status
+NativeRegisterContextWindows_WoW64::ReadRegister(const RegisterInfo *reg_info,
+                                                 RegisterValue &reg_value) {
+  Status error;
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly queried.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot read directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRRead(reg, reg_value);
+
+  if (IsDR(reg))
+    return DRRead(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_WoW64::WriteRegister(
+    const RegisterInfo *reg_info, const RegisterValue &reg_value) {
+  Status error;
+
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly written.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot write directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRWrite(reg, reg_value);
+
+  if (IsDR(reg))
+    return DRWrite(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_WoW64::ReadAllRegisterValues(
+    lldb::DataBufferSP &data_sp) {
+  const size_t data_size = REG_CONTEXT_SIZE;
+  data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
+  ::WOW64_CONTEXT tls_context;
+  Status error = GetWoW64ThreadContextHelper(GetThreadHandle(), &tls_context);
+  if (error.Fail())
+    return error;
+
+  uint8_t *dst = data_sp->GetBytes();
+  ::memcpy(dst, &tls_context, data_size);
+  return error;
+}
+
+Status NativeRegisterContextWindows_WoW64::WriteAllRegisterValues(
+    const lldb::DataBufferSP &data_sp) {
+  Status error;
+  const size_t data_size = REG_CONTEXT_SIZE;
+  if (!data_sp) {
+    error.SetErrorStringWithFormat(
+        "NativeRegisterContextWindows_WoW64::%s invalid data_sp provided",
+        __FUNCTION__);
+    return error;
+  }
+
+  if (data_sp->GetByteSize() != data_size) {
+    error.SetErrorStringWithFormatv(
+        "data_sp contained mismatched data size, expected {0}, actual {1}",
+        data_size, data_sp->GetByteSize());
+    return error;
+  }
+
+  ::WOW64_CONTEXT tls_context;
+  memcpy(&tls_context, data_sp->GetBytes(), data_size);
+  return SetWoW64ThreadContextHelper(GetThreadHandle(), &tls_context);
+}
+
+Status NativeRegisterContextWindows_WoW64::IsWatchpointHit(uint32_t wp_index,
+                                                           bool &is_hit) {
+  is_hit = false;
+
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return Status("watchpoint index out of range");
+
+  RegisterValue reg_value;
+  Status error = DRRead(lldb_dr6_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  is_hit = reg_value.GetAsUInt32() & (1 << wp_index);
+
+  return {};
+}
+
+Status NativeRegisterContextWindows_WoW64::GetWatchpointHitIndex(
+    uint32_t &wp_index, lldb::addr_t trap_addr) {
+  wp_index = LLDB_INVALID_INDEX32;
+
+  for (uint32_t i = 0; i < NumSupportedHardwareWatchpoints(); i++) {
+    bool is_hit;
+    Status error = IsWatchpointHit(i, is_hit);
+    if (error.Fail())
+      return error;
+
+    if (is_hit) {
+      wp_index = i;
+      return {};
+    }
+  }
+
+  return {};
+}
+
+Status NativeRegisterContextWindows_WoW64::IsWatchpointVacant(uint32_t wp_index,
+                                                              bool &is_vacant) {
+  is_vacant = false;
+
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return Status("Watchpoint index out of range");
+
+  RegisterValue reg_value;
+  Status error = DRRead(lldb_dr7_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  is_vacant = !(reg_value.GetAsUInt32() & (1 << (2 * wp_index)));
+
+  return error;
+}
+
+bool NativeRegisterContextWindows_WoW64::ClearHardwareWatchpoint(
+    uint32_t wp_index) {
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return false;
+
+  // for watchpoints 0, 1, 2, or 3, respectively, clear bits 0, 1, 2, or 3 of
+  // the debug status register (DR6)
+
+  RegisterValue reg_value;
+  Status error = DRRead(lldb_dr6_i386, reg_value);
+  if (error.Fail())
+    return false;
+
+  uint32_t bit_mask = 1 << wp_index;
+  uint32_t status_bits = reg_value.GetAsUInt32() & ~bit_mask;
+  error = DRWrite(lldb_dr6_i386, RegisterValue(status_bits));
+  if (error.Fail())
+    return false;
+
+  // for watchpoints 0, 1, 2, or 3, respectively, clear bits {0-1,16-19},
+  // {2-3,20-23}, {4-5,24-27}, or {6-7,28-31} of the debug control register
+  // (DR7)
+
+  error = DRRead(lldb_dr7_i386, reg_value);
+  if (error.Fail())
+    return false;
+
+  bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
+  uint32_t control_bits = reg_value.GetAsUInt32() & ~bit_mask;
+  return DRWrite(lldb_dr7_i386, RegisterValue(control_bits)).Success();
+}
+
+Status NativeRegisterContextWindows_WoW64::ClearAllHardwareWatchpoints() {
+  RegisterValue reg_value;
+
+  // clear bits {0-4} of the debug status register (DR6)
+
+  Status error = DRRead(lldb_dr6_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  uint32_t status_bits = reg_value.GetAsUInt32() & ~0xF;
+  error = DRWrite(lldb_dr6_i386, RegisterValue(status_bits));
+  if (error.Fail())
+    return error;
+
+  // clear bits {0-7,16-31} of the debug control register (DR7)
+
+  error = DRRead(lldb_dr7_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  uint32_t control_bits = reg_value.GetAsUInt32() & ~0xFFFF00FF;
+  return DRWrite(lldb_dr7_i386, RegisterValue(control_bits));
+}
+
+uint32_t NativeRegisterContextWindows_WoW64::SetHardwareWatchpoint(
+    lldb::addr_t addr, size_t size, uint32_t watch_flags) {
+  switch (size) {
+  case 1:
+  case 2:
+  case 4:
+    break;
+  default:
+    return LLDB_INVALID_INDEX32;
+  }
+
+  if (watch_flags == 0x2)
+    watch_flags = 0x3;
+
+  if (watch_flags != 0x1 && watch_flags != 0x3)
+    return LLDB_INVALID_INDEX32;
+
+  for (uint32_t wp_index = 0; wp_index < NumSupportedHardwareWatchpoints();
+       ++wp_index) {
+    bool is_vacant;
+    if (IsWatchpointVacant(wp_index, is_vacant).Fail())
+      return LLDB_INVALID_INDEX32;
+
+    if (is_vacant) {
+      if (!ClearHardwareWatchpoint(wp_index))
+        return LLDB_INVALID_INDEX32;
+
+      if (ApplyHardwareBreakpoint(wp_index, addr, size, watch_flags).Fail())
+        return LLDB_INVALID_INDEX32;
+
+      return wp_index;
+    }
+  }
+  return LLDB_INVALID_INDEX32;
+}
+
+Status NativeRegisterContextWindows_WoW64::ApplyHardwareBreakpoint(
+    uint32_t wp_index, lldb::addr_t addr, size_t size, uint32_t flags) {
+  RegisterValue reg_value;
+  auto error = DRRead(lldb_dr7_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  // for watchpoints 0, 1, 2, or 3, respectively, set bits 1, 3, 5, or 7
+  uint32_t enable_bit = 1 << (2 * wp_index);
+
+  // set bits 16-17, 20-21, 24-25, or 28-29
+  // with 0b01 for write, and 0b11 for read/write
+  uint32_t rw_bits = flags << (16 + 4 * wp_index);
+
+  // set bits 18-19, 22-23, 26-27, or 30-31
+  // with 0b00, 0b01, 0b10, or 0b11
+  // for 1, 2, 8 (if supported), or 4 bytes, respectively
+  uint32_t size_bits = (size == 8 ? 0x2 : size - 1) << (18 + 4 * wp_index);
+
+  uint32_t bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
+
+  uint32_t control_bits = reg_value.GetAsUInt32() & ~bit_mask;
+  control_bits |= enable_bit | rw_bits | size_bits;
+
+  error = DRWrite(lldb_dr7_i386, RegisterValue(control_bits));
+  if (error.Fail())
+    return error;
+
+  error = DRWrite(lldb_dr0_i386 + wp_index, RegisterValue(addr));
+  if (error.Fail())
+    return error;
+
+  return {};
+}
+
+lldb::addr_t
+NativeRegisterContextWindows_WoW64::GetWatchpointAddress(uint32_t wp_index) {
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return LLDB_INVALID_ADDRESS;
+
+  RegisterValue reg_value;
+  if (DRRead(lldb_dr0_i386 + wp_index, reg_value).Fail())
+    return LLDB_INVALID_ADDRESS;
+
+  return reg_value.GetAsUInt32();
+}
+
+uint32_t NativeRegisterContextWindows_WoW64::NumSupportedHardwareWatchpoints() {
+  return 4;
+}
+
+#endif // defined(__x86_64__) || defined(_M_X64)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
new file mode 100644
index 0000000..b1bf725
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
@@ -0,0 +1,77 @@
+//===-- NativeRegisterContextWindows_WoW64.h --------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__x86_64__) || defined(_M_X64)
+#ifndef liblldb_NativeRegisterContextWindows_WoW64_h_
+#define liblldb_NativeRegisterContextWindows_WoW64_h_
+
+#include "Plugins/Process/Utility/RegisterContext_x86.h"
+#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+
+#include "NativeRegisterContextWindows.h"
+
+namespace lldb_private {
+
+class NativeThreadWindows;
+
+class NativeRegisterContextWindows_WoW64 : public NativeRegisterContextWindows {
+public:
+  NativeRegisterContextWindows_WoW64(const ArchSpec &target_arch,
+                                     NativeThreadProtocol &native_thread);
+
+  uint32_t GetRegisterSetCount() const override;
+
+  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
+
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
+
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
+
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+
+  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
+
+  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+
+  bool ClearHardwareWatchpoint(uint32_t wp_index) override;
+
+  Status ClearAllHardwareWatchpoints() override;
+
+  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
+                                 uint32_t watch_flags) override;
+
+  lldb::addr_t GetWatchpointAddress(uint32_t wp_index) override;
+
+  uint32_t NumSupportedHardwareWatchpoints() override;
+
+protected:
+  Status GPRRead(const uint32_t reg, RegisterValue &reg_value);
+  Status GPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+  Status DRRead(const uint32_t reg, RegisterValue &reg_value);
+  Status DRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+private:
+  Status ApplyHardwareBreakpoint(uint32_t wp_index, lldb::addr_t addr,
+                                 size_t size, uint32_t flags);
+
+  bool IsGPR(uint32_t reg_index) const;
+  bool IsDR(uint32_t reg_index) const;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_NativeRegisterContextWindows_WoW64_h_
+#endif // defined(__x86_64__) || defined(_M_X64)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp
new file mode 100644
index 0000000..d25b08f
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.cpp
@@ -0,0 +1,644 @@
+//===-- NativeRegisterContextWindows_arm.cpp --------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__arm__) || defined(_M_ARM)
+
+#include "NativeRegisterContextWindows_arm.h"
+#include "NativeThreadWindows.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h"
+#include "ProcessWindowsLog.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Host/HostThread.h"
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/windows.h"
+
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "llvm/ADT/STLExtras.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+#define REG_CONTEXT_SIZE sizeof(::CONTEXT)
+
+namespace {
+static const uint32_t g_gpr_regnums_arm[] = {
+    gpr_r0_arm,         gpr_r1_arm,   gpr_r2_arm,  gpr_r3_arm, gpr_r4_arm,
+    gpr_r5_arm,         gpr_r6_arm,   gpr_r7_arm,  gpr_r8_arm, gpr_r9_arm,
+    gpr_r10_arm,        gpr_r11_arm,  gpr_r12_arm, gpr_sp_arm, gpr_lr_arm,
+    gpr_pc_arm,         gpr_cpsr_arm,
+    LLDB_INVALID_REGNUM // Register set must be terminated with this flag
+};
+static_assert(((sizeof g_gpr_regnums_arm / sizeof g_gpr_regnums_arm[0]) - 1) ==
+                  k_num_gpr_registers_arm,
+              "g_gpr_regnums_arm has wrong number of register infos");
+
+static const uint32_t g_fpr_regnums_arm[] = {
+    fpu_s0_arm,         fpu_s1_arm,  fpu_s2_arm,  fpu_s3_arm,  fpu_s4_arm,
+    fpu_s5_arm,         fpu_s6_arm,  fpu_s7_arm,  fpu_s8_arm,  fpu_s9_arm,
+    fpu_s10_arm,        fpu_s11_arm, fpu_s12_arm, fpu_s13_arm, fpu_s14_arm,
+    fpu_s15_arm,        fpu_s16_arm, fpu_s17_arm, fpu_s18_arm, fpu_s19_arm,
+    fpu_s20_arm,        fpu_s21_arm, fpu_s22_arm, fpu_s23_arm, fpu_s24_arm,
+    fpu_s25_arm,        fpu_s26_arm, fpu_s27_arm, fpu_s28_arm, fpu_s29_arm,
+    fpu_s30_arm,        fpu_s31_arm,
+
+    fpu_d0_arm,         fpu_d1_arm,  fpu_d2_arm,  fpu_d3_arm,  fpu_d4_arm,
+    fpu_d5_arm,         fpu_d6_arm,  fpu_d7_arm,  fpu_d8_arm,  fpu_d9_arm,
+    fpu_d10_arm,        fpu_d11_arm, fpu_d12_arm, fpu_d13_arm, fpu_d14_arm,
+    fpu_d15_arm,        fpu_d16_arm, fpu_d17_arm, fpu_d18_arm, fpu_d19_arm,
+    fpu_d20_arm,        fpu_d21_arm, fpu_d22_arm, fpu_d23_arm, fpu_d24_arm,
+    fpu_d25_arm,        fpu_d26_arm, fpu_d27_arm, fpu_d28_arm, fpu_d29_arm,
+    fpu_d30_arm,        fpu_d31_arm,
+
+    fpu_q0_arm,         fpu_q1_arm,  fpu_q2_arm,  fpu_q3_arm,  fpu_q4_arm,
+    fpu_q5_arm,         fpu_q6_arm,  fpu_q7_arm,  fpu_q8_arm,  fpu_q9_arm,
+    fpu_q10_arm,        fpu_q11_arm, fpu_q12_arm, fpu_q13_arm, fpu_q14_arm,
+    fpu_q15_arm,
+
+    fpu_fpscr_arm,
+    LLDB_INVALID_REGNUM // Register set must be terminated with this flag
+};
+static_assert(((sizeof g_fpr_regnums_arm / sizeof g_fpr_regnums_arm[0]) - 1) ==
+                  k_num_fpr_registers_arm,
+              "g_fpu_regnums_arm has wrong number of register infos");
+
+static const RegisterSet g_reg_sets_arm[] = {
+    {"General Purpose Registers", "gpr",
+     llvm::array_lengthof(g_gpr_regnums_arm) - 1, g_gpr_regnums_arm},
+    {"Floating Point Registers", "fpr",
+     llvm::array_lengthof(g_fpr_regnums_arm) - 1, g_fpr_regnums_arm},
+};
+
+enum { k_num_register_sets = 2 };
+
+} // namespace
+
+static RegisterInfoInterface *
+CreateRegisterInfoInterface(const ArchSpec &target_arch) {
+  assert((HostInfo::GetArchitecture().GetAddressByteSize() == 8) &&
+         "Register setting path assumes this is a 64-bit host");
+  return new RegisterInfoPOSIX_arm(target_arch);
+}
+
+static Status GetThreadContextHelper(lldb::thread_t thread_handle,
+                                     PCONTEXT context_ptr,
+                                     const DWORD control_flag) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+
+  memset(context_ptr, 0, sizeof(::CONTEXT));
+  context_ptr->ContextFlags = control_flag;
+  if (!::GetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} GetThreadContext failed with error {1}", __FUNCTION__,
+             error);
+    return error;
+  }
+  return Status();
+}
+
+static Status SetThreadContextHelper(lldb::thread_t thread_handle,
+                                     PCONTEXT context_ptr) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+  // It's assumed that the thread has stopped.
+  if (!::SetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} SetThreadContext failed with error {1}", __FUNCTION__,
+             error);
+    return error;
+  }
+  return Status();
+}
+
+std::unique_ptr<NativeRegisterContextWindows>
+NativeRegisterContextWindows::CreateHostNativeRegisterContextWindows(
+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread) {
+  // TODO: Register context for a WoW64 application?
+
+  // Register context for a native 64-bit application.
+  return std::make_unique<NativeRegisterContextWindows_arm>(target_arch,
+                                                            native_thread);
+}
+
+NativeRegisterContextWindows_arm::NativeRegisterContextWindows_arm(
+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread)
+    : NativeRegisterContextWindows(native_thread,
+                                   CreateRegisterInfoInterface(target_arch)) {}
+
+bool NativeRegisterContextWindows_arm::IsGPR(uint32_t reg_index) const {
+  return (reg_index >= k_first_gpr_arm && reg_index <= k_last_gpr_arm);
+}
+
+bool NativeRegisterContextWindows_arm::IsFPR(uint32_t reg_index) const {
+  return (reg_index >= k_first_fpr_arm && reg_index <= k_last_fpr_arm);
+}
+
+uint32_t NativeRegisterContextWindows_arm::GetRegisterSetCount() const {
+  return k_num_register_sets;
+}
+
+const RegisterSet *
+NativeRegisterContextWindows_arm::GetRegisterSet(uint32_t set_index) const {
+  if (set_index >= k_num_register_sets)
+    return nullptr;
+  return &g_reg_sets_arm[set_index];
+}
+
+Status NativeRegisterContextWindows_arm::GPRRead(const uint32_t reg,
+                                                 RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_INTEGER;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case gpr_r0_arm:
+    reg_value.SetUInt32(tls_context.R0);
+    break;
+  case gpr_r1_arm:
+    reg_value.SetUInt32(tls_context.R1);
+    break;
+  case gpr_r2_arm:
+    reg_value.SetUInt32(tls_context.R2);
+    break;
+  case gpr_r3_arm:
+    reg_value.SetUInt32(tls_context.R3);
+    break;
+  case gpr_r4_arm:
+    reg_value.SetUInt32(tls_context.R4);
+    break;
+  case gpr_r5_arm:
+    reg_value.SetUInt32(tls_context.R5);
+    break;
+  case gpr_r6_arm:
+    reg_value.SetUInt32(tls_context.R6);
+    break;
+  case gpr_r7_arm:
+    reg_value.SetUInt32(tls_context.R7);
+    break;
+  case gpr_r8_arm:
+    reg_value.SetUInt32(tls_context.R8);
+    break;
+  case gpr_r9_arm:
+    reg_value.SetUInt32(tls_context.R9);
+    break;
+  case gpr_r10_arm:
+    reg_value.SetUInt32(tls_context.R10);
+    break;
+  case gpr_r11_arm:
+    reg_value.SetUInt32(tls_context.R11);
+    break;
+  case gpr_r12_arm:
+    reg_value.SetUInt32(tls_context.R12);
+    break;
+  case gpr_sp_arm:
+    reg_value.SetUInt32(tls_context.Sp);
+    break;
+  case gpr_lr_arm:
+    reg_value.SetUInt32(tls_context.Lr);
+    break;
+  case gpr_pc_arm:
+    reg_value.SetUInt32(tls_context.Pc);
+    break;
+  case gpr_cpsr_arm:
+    reg_value.SetUInt32(tls_context.Cpsr);
+    break;
+  }
+
+  return error;
+}
+
+Status
+NativeRegisterContextWindows_arm::GPRWrite(const uint32_t reg,
+                                           const RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_INTEGER;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case gpr_r0_arm:
+    tls_context.R0 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r1_arm:
+    tls_context.R1 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r2_arm:
+    tls_context.R2 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r3_arm:
+    tls_context.R3 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r4_arm:
+    tls_context.R4 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r5_arm:
+    tls_context.R5 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r6_arm:
+    tls_context.R6 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r7_arm:
+    tls_context.R7 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r8_arm:
+    tls_context.R8 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r9_arm:
+    tls_context.R9 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r10_arm:
+    tls_context.R10 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r11_arm:
+    tls_context.R11 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r12_arm:
+    tls_context.R12 = reg_value.GetAsUInt32();
+    break;
+  case gpr_sp_arm:
+    tls_context.Sp = reg_value.GetAsUInt32();
+    break;
+  case gpr_lr_arm:
+    tls_context.Lr = reg_value.GetAsUInt32();
+    break;
+  case gpr_pc_arm:
+    tls_context.Pc = reg_value.GetAsUInt32();
+    break;
+  case gpr_cpsr_arm:
+    tls_context.Cpsr = reg_value.GetAsUInt32();
+    break;
+  }
+
+  return SetThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status NativeRegisterContextWindows_arm::FPRRead(const uint32_t reg,
+                                                 RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_FLOATING_POINT;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case fpu_s0_arm:
+  case fpu_s1_arm:
+  case fpu_s2_arm:
+  case fpu_s3_arm:
+  case fpu_s4_arm:
+  case fpu_s5_arm:
+  case fpu_s6_arm:
+  case fpu_s7_arm:
+  case fpu_s8_arm:
+  case fpu_s9_arm:
+  case fpu_s10_arm:
+  case fpu_s11_arm:
+  case fpu_s12_arm:
+  case fpu_s13_arm:
+  case fpu_s14_arm:
+  case fpu_s15_arm:
+  case fpu_s16_arm:
+  case fpu_s17_arm:
+  case fpu_s18_arm:
+  case fpu_s19_arm:
+  case fpu_s20_arm:
+  case fpu_s21_arm:
+  case fpu_s22_arm:
+  case fpu_s23_arm:
+  case fpu_s24_arm:
+  case fpu_s25_arm:
+  case fpu_s26_arm:
+  case fpu_s27_arm:
+  case fpu_s28_arm:
+  case fpu_s29_arm:
+  case fpu_s30_arm:
+  case fpu_s31_arm:
+    reg_value.SetUInt32(tls_context.S[reg - fpu_s0_arm],
+                        RegisterValue::eTypeFloat);
+    break;
+
+  case fpu_d0_arm:
+  case fpu_d1_arm:
+  case fpu_d2_arm:
+  case fpu_d3_arm:
+  case fpu_d4_arm:
+  case fpu_d5_arm:
+  case fpu_d6_arm:
+  case fpu_d7_arm:
+  case fpu_d8_arm:
+  case fpu_d9_arm:
+  case fpu_d10_arm:
+  case fpu_d11_arm:
+  case fpu_d12_arm:
+  case fpu_d13_arm:
+  case fpu_d14_arm:
+  case fpu_d15_arm:
+  case fpu_d16_arm:
+  case fpu_d17_arm:
+  case fpu_d18_arm:
+  case fpu_d19_arm:
+  case fpu_d20_arm:
+  case fpu_d21_arm:
+  case fpu_d22_arm:
+  case fpu_d23_arm:
+  case fpu_d24_arm:
+  case fpu_d25_arm:
+  case fpu_d26_arm:
+  case fpu_d27_arm:
+  case fpu_d28_arm:
+  case fpu_d29_arm:
+  case fpu_d30_arm:
+  case fpu_d31_arm:
+    reg_value.SetUInt64(tls_context.D[reg - fpu_d0_arm],
+                        RegisterValue::eTypeDouble);
+    break;
+
+  case fpu_q0_arm:
+  case fpu_q1_arm:
+  case fpu_q2_arm:
+  case fpu_q3_arm:
+  case fpu_q4_arm:
+  case fpu_q5_arm:
+  case fpu_q6_arm:
+  case fpu_q7_arm:
+  case fpu_q8_arm:
+  case fpu_q9_arm:
+  case fpu_q10_arm:
+  case fpu_q11_arm:
+  case fpu_q12_arm:
+  case fpu_q13_arm:
+  case fpu_q14_arm:
+  case fpu_q15_arm:
+    reg_value.SetBytes(&tls_context.Q[reg - fpu_q0_arm], 16,
+                       endian::InlHostByteOrder());
+    break;
+
+  case fpu_fpscr_arm:
+    reg_value.SetUInt32(tls_context.Fpscr);
+    break;
+  }
+
+  return error;
+}
+
+Status
+NativeRegisterContextWindows_arm::FPRWrite(const uint32_t reg,
+                                           const RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_FLOATING_POINT;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case fpu_s0_arm:
+  case fpu_s1_arm:
+  case fpu_s2_arm:
+  case fpu_s3_arm:
+  case fpu_s4_arm:
+  case fpu_s5_arm:
+  case fpu_s6_arm:
+  case fpu_s7_arm:
+  case fpu_s8_arm:
+  case fpu_s9_arm:
+  case fpu_s10_arm:
+  case fpu_s11_arm:
+  case fpu_s12_arm:
+  case fpu_s13_arm:
+  case fpu_s14_arm:
+  case fpu_s15_arm:
+  case fpu_s16_arm:
+  case fpu_s17_arm:
+  case fpu_s18_arm:
+  case fpu_s19_arm:
+  case fpu_s20_arm:
+  case fpu_s21_arm:
+  case fpu_s22_arm:
+  case fpu_s23_arm:
+  case fpu_s24_arm:
+  case fpu_s25_arm:
+  case fpu_s26_arm:
+  case fpu_s27_arm:
+  case fpu_s28_arm:
+  case fpu_s29_arm:
+  case fpu_s30_arm:
+  case fpu_s31_arm:
+    tls_context.S[reg - fpu_s0_arm] = reg_value.GetAsUInt32();
+    break;
+
+  case fpu_d0_arm:
+  case fpu_d1_arm:
+  case fpu_d2_arm:
+  case fpu_d3_arm:
+  case fpu_d4_arm:
+  case fpu_d5_arm:
+  case fpu_d6_arm:
+  case fpu_d7_arm:
+  case fpu_d8_arm:
+  case fpu_d9_arm:
+  case fpu_d10_arm:
+  case fpu_d11_arm:
+  case fpu_d12_arm:
+  case fpu_d13_arm:
+  case fpu_d14_arm:
+  case fpu_d15_arm:
+  case fpu_d16_arm:
+  case fpu_d17_arm:
+  case fpu_d18_arm:
+  case fpu_d19_arm:
+  case fpu_d20_arm:
+  case fpu_d21_arm:
+  case fpu_d22_arm:
+  case fpu_d23_arm:
+  case fpu_d24_arm:
+  case fpu_d25_arm:
+  case fpu_d26_arm:
+  case fpu_d27_arm:
+  case fpu_d28_arm:
+  case fpu_d29_arm:
+  case fpu_d30_arm:
+  case fpu_d31_arm:
+    tls_context.D[reg - fpu_d0_arm] = reg_value.GetAsUInt64();
+    break;
+
+  case fpu_q0_arm:
+  case fpu_q1_arm:
+  case fpu_q2_arm:
+  case fpu_q3_arm:
+  case fpu_q4_arm:
+  case fpu_q5_arm:
+  case fpu_q6_arm:
+  case fpu_q7_arm:
+  case fpu_q8_arm:
+  case fpu_q9_arm:
+  case fpu_q10_arm:
+  case fpu_q11_arm:
+  case fpu_q12_arm:
+  case fpu_q13_arm:
+  case fpu_q14_arm:
+  case fpu_q15_arm:
+    memcpy(&tls_context.Q[reg - fpu_q0_arm], reg_value.GetBytes(), 16);
+    break;
+
+  case fpu_fpscr_arm:
+    tls_context.Fpscr = reg_value.GetAsUInt32();
+    break;
+  }
+
+  return SetThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status
+NativeRegisterContextWindows_arm::ReadRegister(const RegisterInfo *reg_info,
+                                               RegisterValue &reg_value) {
+  Status error;
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly queried.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot read directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRRead(reg, reg_value);
+
+  if (IsFPR(reg))
+    return FPRRead(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm::WriteRegister(
+    const RegisterInfo *reg_info, const RegisterValue &reg_value) {
+  Status error;
+
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly written.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot write directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRWrite(reg, reg_value);
+
+  if (IsFPR(reg))
+    return FPRWrite(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm::ReadAllRegisterValues(
+    lldb::DataBufferSP &data_sp) {
+  const size_t data_size = REG_CONTEXT_SIZE;
+  data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
+  ::CONTEXT tls_context;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, CONTEXT_ALL);
+  if (error.Fail())
+    return error;
+
+  uint8_t *dst = data_sp->GetBytes();
+  ::memcpy(dst, &tls_context, data_size);
+  return error;
+}
+
+Status NativeRegisterContextWindows_arm::WriteAllRegisterValues(
+    const lldb::DataBufferSP &data_sp) {
+  Status error;
+  const size_t data_size = REG_CONTEXT_SIZE;
+  if (!data_sp) {
+    error.SetErrorStringWithFormat(
+        "NativeRegisterContextWindows_arm::%s invalid data_sp provided",
+        __FUNCTION__);
+    return error;
+  }
+
+  if (data_sp->GetByteSize() != data_size) {
+    error.SetErrorStringWithFormatv(
+        "data_sp contained mismatched data size, expected {0}, actual {1}",
+        data_size, data_sp->GetByteSize());
+    return error;
+  }
+
+  ::CONTEXT tls_context;
+  memcpy(&tls_context, data_sp->GetBytes(), data_size);
+  return SetThreadContextHelper(GetThreadHandle(), &tls_context);
+}
+
+Status NativeRegisterContextWindows_arm::IsWatchpointHit(uint32_t wp_index,
+                                                         bool &is_hit) {
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm::GetWatchpointHitIndex(
+    uint32_t &wp_index, lldb::addr_t trap_addr) {
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm::IsWatchpointVacant(uint32_t wp_index,
+                                                            bool &is_vacant) {
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm::SetHardwareWatchpointWithIndex(
+    lldb::addr_t addr, size_t size, uint32_t watch_flags, uint32_t wp_index) {
+  return Status("unimplemented");
+}
+
+bool NativeRegisterContextWindows_arm::ClearHardwareWatchpoint(
+    uint32_t wp_index) {
+  return false;
+}
+
+Status NativeRegisterContextWindows_arm::ClearAllHardwareWatchpoints() {
+  return Status("unimplemented");
+}
+
+uint32_t NativeRegisterContextWindows_arm::SetHardwareWatchpoint(
+    lldb::addr_t addr, size_t size, uint32_t watch_flags) {
+  return LLDB_INVALID_INDEX32;
+}
+
+lldb::addr_t
+NativeRegisterContextWindows_arm::GetWatchpointAddress(uint32_t wp_index) {
+  return LLDB_INVALID_ADDRESS;
+}
+
+uint32_t NativeRegisterContextWindows_arm::NumSupportedHardwareWatchpoints() {
+  // Not implemented
+  return 0;
+}
+
+#endif // defined(__arm__) || defined(_M_ARM)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h
new file mode 100644
index 0000000..2778bed
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm.h
@@ -0,0 +1,80 @@
+//===-- NativeRegisterContextWindows_arm.h ----------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__arm__) || defined(_M_ARM)
+#ifndef liblldb_NativeRegisterContextWindows_arm_h_
+#define liblldb_NativeRegisterContextWindows_arm_h_
+
+#include "Plugins/Process/Utility/lldb-arm-register-enums.h"
+
+#include "NativeRegisterContextWindows.h"
+
+namespace lldb_private {
+
+class NativeThreadWindows;
+
+class NativeRegisterContextWindows_arm : public NativeRegisterContextWindows {
+public:
+  NativeRegisterContextWindows_arm(const ArchSpec &target_arch,
+                                   NativeThreadProtocol &native_thread);
+
+  uint32_t GetRegisterSetCount() const override;
+
+  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
+
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
+
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
+
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+
+  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
+
+  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+
+  bool ClearHardwareWatchpoint(uint32_t wp_index) override;
+
+  Status ClearAllHardwareWatchpoints() override;
+
+  Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
+                                        uint32_t watch_flags,
+                                        uint32_t wp_index);
+
+  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
+                                 uint32_t watch_flags) override;
+
+  lldb::addr_t GetWatchpointAddress(uint32_t wp_index) override;
+
+  uint32_t NumSupportedHardwareWatchpoints() override;
+
+protected:
+  Status GPRRead(const uint32_t reg, RegisterValue &reg_value);
+
+  Status GPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+  Status FPRRead(const uint32_t reg, RegisterValue &reg_value);
+
+  Status FPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+private:
+  bool IsGPR(uint32_t reg_index) const;
+
+  bool IsFPR(uint32_t reg_index) const;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_NativeRegisterContextWindows_arm_h_
+#endif // defined(__arm__) || defined(_M_ARM)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp
new file mode 100644
index 0000000..b3b3abf
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.cpp
@@ -0,0 +1,753 @@
+//===-- NativeRegisterContextWindows_arm64.cpp ------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__aarch64__) || defined(_M_ARM64)
+
+#include "NativeRegisterContextWindows_arm64.h"
+#include "NativeThreadWindows.h"
+#include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
+#include "ProcessWindowsLog.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Host/HostThread.h"
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/windows.h"
+
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "llvm/ADT/STLExtras.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+#define REG_CONTEXT_SIZE sizeof(::CONTEXT)
+
+namespace {
+static const uint32_t g_gpr_regnums_arm64[] = {
+    gpr_x0_arm64,       gpr_x1_arm64,   gpr_x2_arm64,  gpr_x3_arm64,
+    gpr_x4_arm64,       gpr_x5_arm64,   gpr_x6_arm64,  gpr_x7_arm64,
+    gpr_x8_arm64,       gpr_x9_arm64,   gpr_x10_arm64, gpr_x11_arm64,
+    gpr_x12_arm64,      gpr_x13_arm64,  gpr_x14_arm64, gpr_x15_arm64,
+    gpr_x16_arm64,      gpr_x17_arm64,  gpr_x18_arm64, gpr_x19_arm64,
+    gpr_x20_arm64,      gpr_x21_arm64,  gpr_x22_arm64, gpr_x23_arm64,
+    gpr_x24_arm64,      gpr_x25_arm64,  gpr_x26_arm64, gpr_x27_arm64,
+    gpr_x28_arm64,      gpr_fp_arm64,   gpr_lr_arm64,  gpr_sp_arm64,
+    gpr_pc_arm64,       gpr_cpsr_arm64, gpr_w0_arm64,  gpr_w1_arm64,
+    gpr_w2_arm64,       gpr_w3_arm64,   gpr_w4_arm64,  gpr_w5_arm64,
+    gpr_w6_arm64,       gpr_w7_arm64,   gpr_w8_arm64,  gpr_w9_arm64,
+    gpr_w10_arm64,      gpr_w11_arm64,  gpr_w12_arm64, gpr_w13_arm64,
+    gpr_w14_arm64,      gpr_w15_arm64,  gpr_w16_arm64, gpr_w17_arm64,
+    gpr_w18_arm64,      gpr_w19_arm64,  gpr_w20_arm64, gpr_w21_arm64,
+    gpr_w22_arm64,      gpr_w23_arm64,  gpr_w24_arm64, gpr_w25_arm64,
+    gpr_w26_arm64,      gpr_w27_arm64,  gpr_w28_arm64,
+    LLDB_INVALID_REGNUM // Register set must be terminated with this flag
+};
+static_assert(((sizeof g_gpr_regnums_arm64 / sizeof g_gpr_regnums_arm64[0]) -
+               1) == k_num_gpr_registers_arm64,
+              "g_gpr_regnums_arm64 has wrong number of register infos");
+
+static const uint32_t g_fpr_regnums_arm64[] = {
+    fpu_v0_arm64,       fpu_v1_arm64,   fpu_v2_arm64,  fpu_v3_arm64,
+    fpu_v4_arm64,       fpu_v5_arm64,   fpu_v6_arm64,  fpu_v7_arm64,
+    fpu_v8_arm64,       fpu_v9_arm64,   fpu_v10_arm64, fpu_v11_arm64,
+    fpu_v12_arm64,      fpu_v13_arm64,  fpu_v14_arm64, fpu_v15_arm64,
+    fpu_v16_arm64,      fpu_v17_arm64,  fpu_v18_arm64, fpu_v19_arm64,
+    fpu_v20_arm64,      fpu_v21_arm64,  fpu_v22_arm64, fpu_v23_arm64,
+    fpu_v24_arm64,      fpu_v25_arm64,  fpu_v26_arm64, fpu_v27_arm64,
+    fpu_v28_arm64,      fpu_v29_arm64,  fpu_v30_arm64, fpu_v31_arm64,
+    fpu_s0_arm64,       fpu_s1_arm64,   fpu_s2_arm64,  fpu_s3_arm64,
+    fpu_s4_arm64,       fpu_s5_arm64,   fpu_s6_arm64,  fpu_s7_arm64,
+    fpu_s8_arm64,       fpu_s9_arm64,   fpu_s10_arm64, fpu_s11_arm64,
+    fpu_s12_arm64,      fpu_s13_arm64,  fpu_s14_arm64, fpu_s15_arm64,
+    fpu_s16_arm64,      fpu_s17_arm64,  fpu_s18_arm64, fpu_s19_arm64,
+    fpu_s20_arm64,      fpu_s21_arm64,  fpu_s22_arm64, fpu_s23_arm64,
+    fpu_s24_arm64,      fpu_s25_arm64,  fpu_s26_arm64, fpu_s27_arm64,
+    fpu_s28_arm64,      fpu_s29_arm64,  fpu_s30_arm64, fpu_s31_arm64,
+
+    fpu_d0_arm64,       fpu_d1_arm64,   fpu_d2_arm64,  fpu_d3_arm64,
+    fpu_d4_arm64,       fpu_d5_arm64,   fpu_d6_arm64,  fpu_d7_arm64,
+    fpu_d8_arm64,       fpu_d9_arm64,   fpu_d10_arm64, fpu_d11_arm64,
+    fpu_d12_arm64,      fpu_d13_arm64,  fpu_d14_arm64, fpu_d15_arm64,
+    fpu_d16_arm64,      fpu_d17_arm64,  fpu_d18_arm64, fpu_d19_arm64,
+    fpu_d20_arm64,      fpu_d21_arm64,  fpu_d22_arm64, fpu_d23_arm64,
+    fpu_d24_arm64,      fpu_d25_arm64,  fpu_d26_arm64, fpu_d27_arm64,
+    fpu_d28_arm64,      fpu_d29_arm64,  fpu_d30_arm64, fpu_d31_arm64,
+    fpu_fpsr_arm64,     fpu_fpcr_arm64,
+    LLDB_INVALID_REGNUM // Register set must be terminated with this flag
+};
+static_assert(((sizeof g_fpr_regnums_arm64 / sizeof g_fpr_regnums_arm64[0]) -
+               1) == k_num_fpr_registers_arm64,
+              "g_fpu_regnums_arm64 has wrong number of register infos");
+
+static const RegisterSet g_reg_sets_arm64[] = {
+    {"General Purpose Registers", "gpr",
+     llvm::array_lengthof(g_gpr_regnums_arm64) - 1, g_gpr_regnums_arm64},
+    {"Floating Point Registers", "fpr",
+     llvm::array_lengthof(g_fpr_regnums_arm64) - 1, g_fpr_regnums_arm64},
+};
+
+enum { k_num_register_sets = 2 };
+
+} // namespace
+
+static RegisterInfoInterface *
+CreateRegisterInfoInterface(const ArchSpec &target_arch) {
+  assert((HostInfo::GetArchitecture().GetAddressByteSize() == 8) &&
+         "Register setting path assumes this is a 64-bit host");
+  return new RegisterInfoPOSIX_arm64(target_arch);
+}
+
+static Status GetThreadContextHelper(lldb::thread_t thread_handle,
+                                     PCONTEXT context_ptr,
+                                     const DWORD control_flag) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+
+  memset(context_ptr, 0, sizeof(::CONTEXT));
+  context_ptr->ContextFlags = control_flag;
+  if (!::GetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} GetThreadContext failed with error {1}", __FUNCTION__,
+             error);
+    return error;
+  }
+  return Status();
+}
+
+static Status SetThreadContextHelper(lldb::thread_t thread_handle,
+                                     PCONTEXT context_ptr) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+  // It's assumed that the thread has stopped.
+  if (!::SetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} SetThreadContext failed with error {1}", __FUNCTION__,
+             error);
+    return error;
+  }
+  return Status();
+}
+
+std::unique_ptr<NativeRegisterContextWindows>
+NativeRegisterContextWindows::CreateHostNativeRegisterContextWindows(
+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread) {
+  // Register context for a native 64-bit application.
+  return std::make_unique<NativeRegisterContextWindows_arm64>(target_arch,
+                                                              native_thread);
+}
+
+NativeRegisterContextWindows_arm64::NativeRegisterContextWindows_arm64(
+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread)
+    : NativeRegisterContextWindows(native_thread,
+                                   CreateRegisterInfoInterface(target_arch)) {}
+
+bool NativeRegisterContextWindows_arm64::IsGPR(uint32_t reg_index) const {
+  return (reg_index >= k_first_gpr_arm64 && reg_index <= k_last_gpr_arm64);
+}
+
+bool NativeRegisterContextWindows_arm64::IsFPR(uint32_t reg_index) const {
+  return (reg_index >= k_first_fpr_arm64 && reg_index <= k_last_fpr_arm64);
+}
+
+uint32_t NativeRegisterContextWindows_arm64::GetRegisterSetCount() const {
+  return k_num_register_sets;
+}
+
+const RegisterSet *
+NativeRegisterContextWindows_arm64::GetRegisterSet(uint32_t set_index) const {
+  if (set_index >= k_num_register_sets)
+    return nullptr;
+  return &g_reg_sets_arm64[set_index];
+}
+
+Status NativeRegisterContextWindows_arm64::GPRRead(const uint32_t reg,
+                                                   RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_INTEGER;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case gpr_x0_arm64:
+  case gpr_x1_arm64:
+  case gpr_x2_arm64:
+  case gpr_x3_arm64:
+  case gpr_x4_arm64:
+  case gpr_x5_arm64:
+  case gpr_x6_arm64:
+  case gpr_x7_arm64:
+  case gpr_x8_arm64:
+  case gpr_x9_arm64:
+  case gpr_x10_arm64:
+  case gpr_x11_arm64:
+  case gpr_x12_arm64:
+  case gpr_x13_arm64:
+  case gpr_x14_arm64:
+  case gpr_x15_arm64:
+  case gpr_x16_arm64:
+  case gpr_x17_arm64:
+  case gpr_x18_arm64:
+  case gpr_x19_arm64:
+  case gpr_x20_arm64:
+  case gpr_x21_arm64:
+  case gpr_x22_arm64:
+  case gpr_x23_arm64:
+  case gpr_x24_arm64:
+  case gpr_x25_arm64:
+  case gpr_x26_arm64:
+  case gpr_x27_arm64:
+  case gpr_x28_arm64:
+    reg_value.SetUInt64(tls_context.X[reg - gpr_x0_arm64]);
+    break;
+
+  case gpr_fp_arm64:
+    reg_value.SetUInt64(tls_context.Fp);
+    break;
+  case gpr_sp_arm64:
+    reg_value.SetUInt64(tls_context.Sp);
+    break;
+  case gpr_lr_arm64:
+    reg_value.SetUInt64(tls_context.Lr);
+    break;
+  case gpr_pc_arm64:
+    reg_value.SetUInt64(tls_context.Pc);
+    break;
+  case gpr_cpsr_arm64:
+    reg_value.SetUInt64(tls_context.Cpsr);
+    break;
+
+  case gpr_w0_arm64:
+  case gpr_w1_arm64:
+  case gpr_w2_arm64:
+  case gpr_w3_arm64:
+  case gpr_w4_arm64:
+  case gpr_w5_arm64:
+  case gpr_w6_arm64:
+  case gpr_w7_arm64:
+  case gpr_w8_arm64:
+  case gpr_w9_arm64:
+  case gpr_w10_arm64:
+  case gpr_w11_arm64:
+  case gpr_w12_arm64:
+  case gpr_w13_arm64:
+  case gpr_w14_arm64:
+  case gpr_w15_arm64:
+  case gpr_w16_arm64:
+  case gpr_w17_arm64:
+  case gpr_w18_arm64:
+  case gpr_w19_arm64:
+  case gpr_w20_arm64:
+  case gpr_w21_arm64:
+  case gpr_w22_arm64:
+  case gpr_w23_arm64:
+  case gpr_w24_arm64:
+  case gpr_w25_arm64:
+  case gpr_w26_arm64:
+  case gpr_w27_arm64:
+  case gpr_w28_arm64:
+    reg_value.SetUInt32(
+        static_cast<uint32_t>(tls_context.X[reg - gpr_w0_arm64] & 0xffffffff));
+    break;
+  }
+
+  return error;
+}
+
+Status
+NativeRegisterContextWindows_arm64::GPRWrite(const uint32_t reg,
+                                             const RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_INTEGER;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case gpr_x0_arm64:
+  case gpr_x1_arm64:
+  case gpr_x2_arm64:
+  case gpr_x3_arm64:
+  case gpr_x4_arm64:
+  case gpr_x5_arm64:
+  case gpr_x6_arm64:
+  case gpr_x7_arm64:
+  case gpr_x8_arm64:
+  case gpr_x9_arm64:
+  case gpr_x10_arm64:
+  case gpr_x11_arm64:
+  case gpr_x12_arm64:
+  case gpr_x13_arm64:
+  case gpr_x14_arm64:
+  case gpr_x15_arm64:
+  case gpr_x16_arm64:
+  case gpr_x17_arm64:
+  case gpr_x18_arm64:
+  case gpr_x19_arm64:
+  case gpr_x20_arm64:
+  case gpr_x21_arm64:
+  case gpr_x22_arm64:
+  case gpr_x23_arm64:
+  case gpr_x24_arm64:
+  case gpr_x25_arm64:
+  case gpr_x26_arm64:
+  case gpr_x27_arm64:
+  case gpr_x28_arm64:
+    tls_context.X[reg - gpr_x0_arm64] = reg_value.GetAsUInt64();
+    break;
+
+  case gpr_fp_arm64:
+    tls_context.Fp = reg_value.GetAsUInt64();
+    break;
+  case gpr_sp_arm64:
+    tls_context.Sp = reg_value.GetAsUInt64();
+    break;
+  case gpr_lr_arm64:
+    tls_context.Lr = reg_value.GetAsUInt64();
+    break;
+  case gpr_pc_arm64:
+    tls_context.Pc = reg_value.GetAsUInt64();
+    break;
+  case gpr_cpsr_arm64:
+    tls_context.Cpsr = reg_value.GetAsUInt64();
+    break;
+
+  case gpr_w0_arm64:
+  case gpr_w1_arm64:
+  case gpr_w2_arm64:
+  case gpr_w3_arm64:
+  case gpr_w4_arm64:
+  case gpr_w5_arm64:
+  case gpr_w6_arm64:
+  case gpr_w7_arm64:
+  case gpr_w8_arm64:
+  case gpr_w9_arm64:
+  case gpr_w10_arm64:
+  case gpr_w11_arm64:
+  case gpr_w12_arm64:
+  case gpr_w13_arm64:
+  case gpr_w14_arm64:
+  case gpr_w15_arm64:
+  case gpr_w16_arm64:
+  case gpr_w17_arm64:
+  case gpr_w18_arm64:
+  case gpr_w19_arm64:
+  case gpr_w20_arm64:
+  case gpr_w21_arm64:
+  case gpr_w22_arm64:
+  case gpr_w23_arm64:
+  case gpr_w24_arm64:
+  case gpr_w25_arm64:
+  case gpr_w26_arm64:
+  case gpr_w27_arm64:
+  case gpr_w28_arm64:
+    tls_context.X[reg - gpr_w0_arm64] = reg_value.GetAsUInt32();
+    break;
+  }
+
+  return SetThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status NativeRegisterContextWindows_arm64::FPRRead(const uint32_t reg,
+                                                   RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_FLOATING_POINT;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case fpu_v0_arm64:
+  case fpu_v1_arm64:
+  case fpu_v2_arm64:
+  case fpu_v3_arm64:
+  case fpu_v4_arm64:
+  case fpu_v5_arm64:
+  case fpu_v6_arm64:
+  case fpu_v7_arm64:
+  case fpu_v8_arm64:
+  case fpu_v9_arm64:
+  case fpu_v10_arm64:
+  case fpu_v11_arm64:
+  case fpu_v12_arm64:
+  case fpu_v13_arm64:
+  case fpu_v14_arm64:
+  case fpu_v15_arm64:
+  case fpu_v16_arm64:
+  case fpu_v17_arm64:
+  case fpu_v18_arm64:
+  case fpu_v19_arm64:
+  case fpu_v20_arm64:
+  case fpu_v21_arm64:
+  case fpu_v22_arm64:
+  case fpu_v23_arm64:
+  case fpu_v24_arm64:
+  case fpu_v25_arm64:
+  case fpu_v26_arm64:
+  case fpu_v27_arm64:
+  case fpu_v28_arm64:
+  case fpu_v29_arm64:
+  case fpu_v30_arm64:
+  case fpu_v31_arm64:
+    reg_value.SetBytes(tls_context.V[reg - fpu_v0_arm64].B, 16,
+                       endian::InlHostByteOrder());
+    break;
+
+  case fpu_s0_arm64:
+  case fpu_s1_arm64:
+  case fpu_s2_arm64:
+  case fpu_s3_arm64:
+  case fpu_s4_arm64:
+  case fpu_s5_arm64:
+  case fpu_s6_arm64:
+  case fpu_s7_arm64:
+  case fpu_s8_arm64:
+  case fpu_s9_arm64:
+  case fpu_s10_arm64:
+  case fpu_s11_arm64:
+  case fpu_s12_arm64:
+  case fpu_s13_arm64:
+  case fpu_s14_arm64:
+  case fpu_s15_arm64:
+  case fpu_s16_arm64:
+  case fpu_s17_arm64:
+  case fpu_s18_arm64:
+  case fpu_s19_arm64:
+  case fpu_s20_arm64:
+  case fpu_s21_arm64:
+  case fpu_s22_arm64:
+  case fpu_s23_arm64:
+  case fpu_s24_arm64:
+  case fpu_s25_arm64:
+  case fpu_s26_arm64:
+  case fpu_s27_arm64:
+  case fpu_s28_arm64:
+  case fpu_s29_arm64:
+  case fpu_s30_arm64:
+  case fpu_s31_arm64:
+    reg_value.SetFloat(tls_context.V[reg - fpu_s0_arm64].S[0]);
+    break;
+
+  case fpu_d0_arm64:
+  case fpu_d1_arm64:
+  case fpu_d2_arm64:
+  case fpu_d3_arm64:
+  case fpu_d4_arm64:
+  case fpu_d5_arm64:
+  case fpu_d6_arm64:
+  case fpu_d7_arm64:
+  case fpu_d8_arm64:
+  case fpu_d9_arm64:
+  case fpu_d10_arm64:
+  case fpu_d11_arm64:
+  case fpu_d12_arm64:
+  case fpu_d13_arm64:
+  case fpu_d14_arm64:
+  case fpu_d15_arm64:
+  case fpu_d16_arm64:
+  case fpu_d17_arm64:
+  case fpu_d18_arm64:
+  case fpu_d19_arm64:
+  case fpu_d20_arm64:
+  case fpu_d21_arm64:
+  case fpu_d22_arm64:
+  case fpu_d23_arm64:
+  case fpu_d24_arm64:
+  case fpu_d25_arm64:
+  case fpu_d26_arm64:
+  case fpu_d27_arm64:
+  case fpu_d28_arm64:
+  case fpu_d29_arm64:
+  case fpu_d30_arm64:
+  case fpu_d31_arm64:
+    reg_value.SetDouble(tls_context.V[reg - fpu_d0_arm64].D[0]);
+    break;
+
+  case fpu_fpsr_arm64:
+    reg_value.SetUInt32(tls_context.Fpsr);
+    break;
+
+  case fpu_fpcr_arm64:
+    reg_value.SetUInt32(tls_context.Fpcr);
+    break;
+  }
+
+  return error;
+}
+
+Status
+NativeRegisterContextWindows_arm64::FPRWrite(const uint32_t reg,
+                                             const RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_FLOATING_POINT;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case fpu_v0_arm64:
+  case fpu_v1_arm64:
+  case fpu_v2_arm64:
+  case fpu_v3_arm64:
+  case fpu_v4_arm64:
+  case fpu_v5_arm64:
+  case fpu_v6_arm64:
+  case fpu_v7_arm64:
+  case fpu_v8_arm64:
+  case fpu_v9_arm64:
+  case fpu_v10_arm64:
+  case fpu_v11_arm64:
+  case fpu_v12_arm64:
+  case fpu_v13_arm64:
+  case fpu_v14_arm64:
+  case fpu_v15_arm64:
+  case fpu_v16_arm64:
+  case fpu_v17_arm64:
+  case fpu_v18_arm64:
+  case fpu_v19_arm64:
+  case fpu_v20_arm64:
+  case fpu_v21_arm64:
+  case fpu_v22_arm64:
+  case fpu_v23_arm64:
+  case fpu_v24_arm64:
+  case fpu_v25_arm64:
+  case fpu_v26_arm64:
+  case fpu_v27_arm64:
+  case fpu_v28_arm64:
+  case fpu_v29_arm64:
+  case fpu_v30_arm64:
+  case fpu_v31_arm64:
+    memcpy(tls_context.V[reg - fpu_v0_arm64].B, reg_value.GetBytes(), 16);
+    break;
+
+  case fpu_s0_arm64:
+  case fpu_s1_arm64:
+  case fpu_s2_arm64:
+  case fpu_s3_arm64:
+  case fpu_s4_arm64:
+  case fpu_s5_arm64:
+  case fpu_s6_arm64:
+  case fpu_s7_arm64:
+  case fpu_s8_arm64:
+  case fpu_s9_arm64:
+  case fpu_s10_arm64:
+  case fpu_s11_arm64:
+  case fpu_s12_arm64:
+  case fpu_s13_arm64:
+  case fpu_s14_arm64:
+  case fpu_s15_arm64:
+  case fpu_s16_arm64:
+  case fpu_s17_arm64:
+  case fpu_s18_arm64:
+  case fpu_s19_arm64:
+  case fpu_s20_arm64:
+  case fpu_s21_arm64:
+  case fpu_s22_arm64:
+  case fpu_s23_arm64:
+  case fpu_s24_arm64:
+  case fpu_s25_arm64:
+  case fpu_s26_arm64:
+  case fpu_s27_arm64:
+  case fpu_s28_arm64:
+  case fpu_s29_arm64:
+  case fpu_s30_arm64:
+  case fpu_s31_arm64:
+    tls_context.V[reg - fpu_s0_arm64].S[0] = reg_value.GetAsFloat();
+    break;
+
+  case fpu_d0_arm64:
+  case fpu_d1_arm64:
+  case fpu_d2_arm64:
+  case fpu_d3_arm64:
+  case fpu_d4_arm64:
+  case fpu_d5_arm64:
+  case fpu_d6_arm64:
+  case fpu_d7_arm64:
+  case fpu_d8_arm64:
+  case fpu_d9_arm64:
+  case fpu_d10_arm64:
+  case fpu_d11_arm64:
+  case fpu_d12_arm64:
+  case fpu_d13_arm64:
+  case fpu_d14_arm64:
+  case fpu_d15_arm64:
+  case fpu_d16_arm64:
+  case fpu_d17_arm64:
+  case fpu_d18_arm64:
+  case fpu_d19_arm64:
+  case fpu_d20_arm64:
+  case fpu_d21_arm64:
+  case fpu_d22_arm64:
+  case fpu_d23_arm64:
+  case fpu_d24_arm64:
+  case fpu_d25_arm64:
+  case fpu_d26_arm64:
+  case fpu_d27_arm64:
+  case fpu_d28_arm64:
+  case fpu_d29_arm64:
+  case fpu_d30_arm64:
+  case fpu_d31_arm64:
+    tls_context.V[reg - fpu_d0_arm64].D[0] = reg_value.GetAsDouble();
+    break;
+
+  case fpu_fpsr_arm64:
+    tls_context.Fpsr = reg_value.GetAsUInt32();
+    break;
+
+  case fpu_fpcr_arm64:
+    tls_context.Fpcr = reg_value.GetAsUInt32();
+    break;
+  }
+
+  return SetThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status
+NativeRegisterContextWindows_arm64::ReadRegister(const RegisterInfo *reg_info,
+                                                 RegisterValue &reg_value) {
+  Status error;
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly queried.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot read directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRRead(reg, reg_value);
+
+  if (IsFPR(reg))
+    return FPRRead(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm64::WriteRegister(
+    const RegisterInfo *reg_info, const RegisterValue &reg_value) {
+  Status error;
+
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly written.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot write directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRWrite(reg, reg_value);
+
+  if (IsFPR(reg))
+    return FPRWrite(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm64::ReadAllRegisterValues(
+    lldb::DataBufferSP &data_sp) {
+  const size_t data_size = REG_CONTEXT_SIZE;
+  data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
+  ::CONTEXT tls_context;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, CONTEXT_ALL);
+  if (error.Fail())
+    return error;
+
+  uint8_t *dst = data_sp->GetBytes();
+  ::memcpy(dst, &tls_context, data_size);
+  return error;
+}
+
+Status NativeRegisterContextWindows_arm64::WriteAllRegisterValues(
+    const lldb::DataBufferSP &data_sp) {
+  Status error;
+  const size_t data_size = REG_CONTEXT_SIZE;
+  if (!data_sp) {
+    error.SetErrorStringWithFormat(
+        "NativeRegisterContextWindows_arm64::%s invalid data_sp provided",
+        __FUNCTION__);
+    return error;
+  }
+
+  if (data_sp->GetByteSize() != data_size) {
+    error.SetErrorStringWithFormatv(
+        "data_sp contained mismatched data size, expected {0}, actual {1}",
+        data_size, data_sp->GetByteSize());
+    return error;
+  }
+
+  ::CONTEXT tls_context;
+  memcpy(&tls_context, data_sp->GetBytes(), data_size);
+  return SetThreadContextHelper(GetThreadHandle(), &tls_context);
+}
+
+Status NativeRegisterContextWindows_arm64::IsWatchpointHit(uint32_t wp_index,
+                                                           bool &is_hit) {
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm64::GetWatchpointHitIndex(
+    uint32_t &wp_index, lldb::addr_t trap_addr) {
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm64::IsWatchpointVacant(uint32_t wp_index,
+                                                              bool &is_vacant) {
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_arm64::SetHardwareWatchpointWithIndex(
+    lldb::addr_t addr, size_t size, uint32_t watch_flags, uint32_t wp_index) {
+  return Status("unimplemented");
+}
+
+bool NativeRegisterContextWindows_arm64::ClearHardwareWatchpoint(
+    uint32_t wp_index) {
+  return false;
+}
+
+Status NativeRegisterContextWindows_arm64::ClearAllHardwareWatchpoints() {
+  return Status("unimplemented");
+}
+
+uint32_t NativeRegisterContextWindows_arm64::SetHardwareWatchpoint(
+    lldb::addr_t addr, size_t size, uint32_t watch_flags) {
+  return LLDB_INVALID_INDEX32;
+}
+
+lldb::addr_t
+NativeRegisterContextWindows_arm64::GetWatchpointAddress(uint32_t wp_index) {
+  return LLDB_INVALID_ADDRESS;
+}
+
+uint32_t NativeRegisterContextWindows_arm64::NumSupportedHardwareWatchpoints() {
+  // Not implemented
+  return 0;
+}
+
+#endif // defined(__aarch64__) || defined(_M_ARM64)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
new file mode 100644
index 0000000..fbf4d1f
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
@@ -0,0 +1,80 @@
+//===-- NativeRegisterContextWindows_arm64.h --------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__aarch64__) || defined(_M_ARM64)
+#ifndef liblldb_NativeRegisterContextWindows_arm64_h_
+#define liblldb_NativeRegisterContextWindows_arm64_h_
+
+#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
+
+#include "NativeRegisterContextWindows.h"
+
+namespace lldb_private {
+
+class NativeThreadWindows;
+
+class NativeRegisterContextWindows_arm64 : public NativeRegisterContextWindows {
+public:
+  NativeRegisterContextWindows_arm64(const ArchSpec &target_arch,
+                                     NativeThreadProtocol &native_thread);
+
+  uint32_t GetRegisterSetCount() const override;
+
+  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
+
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
+
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
+
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+
+  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
+
+  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+
+  bool ClearHardwareWatchpoint(uint32_t wp_index) override;
+
+  Status ClearAllHardwareWatchpoints() override;
+
+  Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
+                                        uint32_t watch_flags,
+                                        uint32_t wp_index);
+
+  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
+                                 uint32_t watch_flags) override;
+
+  lldb::addr_t GetWatchpointAddress(uint32_t wp_index) override;
+
+  uint32_t NumSupportedHardwareWatchpoints() override;
+
+protected:
+  Status GPRRead(const uint32_t reg, RegisterValue &reg_value);
+
+  Status GPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+  Status FPRRead(const uint32_t reg, RegisterValue &reg_value);
+
+  Status FPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+private:
+  bool IsGPR(uint32_t reg_index) const;
+
+  bool IsFPR(uint32_t reg_index) const;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_NativeRegisterContextWindows_arm64_h_
+#endif // defined(__aarch64__) || defined(_M_ARM64)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
new file mode 100644
index 0000000..3ad721b
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
@@ -0,0 +1,612 @@
+//===-- NativeRegisterContextWindows_i386.cpp -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__i386__) || defined(_M_IX86)
+
+#include "NativeRegisterContextWindows_i386.h"
+
+#include "NativeThreadWindows.h"
+#include "Plugins/Process/Utility/RegisterContextWindows_i386.h"
+#include "ProcessWindowsLog.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Host/HostThread.h"
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/windows.h"
+
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "llvm/ADT/STLExtras.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+#define REG_CONTEXT_SIZE sizeof(::CONTEXT)
+
+namespace {
+static const uint32_t g_gpr_regnums_i386[] = {
+    lldb_eax_i386,      lldb_ebx_i386,    lldb_ecx_i386, lldb_edx_i386,
+    lldb_edi_i386,      lldb_esi_i386,    lldb_ebp_i386, lldb_esp_i386,
+    lldb_eip_i386,      lldb_eflags_i386, lldb_cs_i386,  lldb_fs_i386,
+    lldb_gs_i386,       lldb_ss_i386,     lldb_ds_i386,  lldb_es_i386,
+    LLDB_INVALID_REGNUM // Register sets must be terminated with this flag.
+};
+
+static const RegisterSet g_reg_sets_i386[] = {
+    {"General Purpose Registers", "gpr",
+     llvm::array_lengthof(g_gpr_regnums_i386) - 1, g_gpr_regnums_i386},
+};
+
+enum { k_num_register_sets = 1 };
+
+} // namespace
+
+static RegisterInfoInterface *
+CreateRegisterInfoInterface(const ArchSpec &target_arch) {
+  assert((HostInfo::GetArchitecture().GetAddressByteSize() == 4) &&
+         "Register setting path assumes this is a 32-bit host");
+  return new RegisterContextWindows_i386(target_arch);
+}
+
+static Status GetThreadContextHelper(lldb::thread_t thread_handle,
+                                     PCONTEXT context_ptr,
+                                     const DWORD control_flag) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+
+  memset(context_ptr, 0, sizeof(::CONTEXT));
+  context_ptr->ContextFlags = control_flag;
+  if (!::GetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} GetThreadContext failed with error {1}", __FUNCTION__,
+             error);
+    return error;
+  }
+  return Status();
+}
+
+static Status SetThreadContextHelper(lldb::thread_t thread_handle,
+                                     PCONTEXT context_ptr) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+
+  if (!::SetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} SetThreadContext failed with error {1}", __FUNCTION__,
+             error);
+    return error;
+  }
+  return Status();
+}
+
+std::unique_ptr<NativeRegisterContextWindows>
+NativeRegisterContextWindows::CreateHostNativeRegisterContextWindows(
+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread) {
+  return std::make_unique<NativeRegisterContextWindows_i386>(target_arch,
+                                                             native_thread);
+}
+
+NativeRegisterContextWindows_i386::NativeRegisterContextWindows_i386(
+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread)
+    : NativeRegisterContextWindows(native_thread,
+                                   CreateRegisterInfoInterface(target_arch)) {}
+
+bool NativeRegisterContextWindows_i386::IsGPR(uint32_t reg_index) const {
+  return (reg_index < k_first_alias_i386);
+}
+
+bool NativeRegisterContextWindows_i386::IsDR(uint32_t reg_index) const {
+  return (reg_index >= lldb_dr0_i386 && reg_index <= lldb_dr7_i386);
+}
+
+uint32_t NativeRegisterContextWindows_i386::GetRegisterSetCount() const {
+  return k_num_register_sets;
+}
+
+const RegisterSet *
+NativeRegisterContextWindows_i386::GetRegisterSet(uint32_t set_index) const {
+  if (set_index >= k_num_register_sets)
+    return nullptr;
+  return &g_reg_sets_i386[set_index];
+}
+
+Status NativeRegisterContextWindows_i386::GPRRead(const uint32_t reg,
+                                                  RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_eax_i386:
+    reg_value.SetUInt32(tls_context.Eax);
+    break;
+  case lldb_ebx_i386:
+    reg_value.SetUInt32(tls_context.Ebx);
+    break;
+  case lldb_ecx_i386:
+    reg_value.SetUInt32(tls_context.Ecx);
+    break;
+  case lldb_edx_i386:
+    reg_value.SetUInt32(tls_context.Edx);
+    break;
+  case lldb_edi_i386:
+    reg_value.SetUInt32(tls_context.Edi);
+    break;
+  case lldb_esi_i386:
+    reg_value.SetUInt32(tls_context.Esi);
+    break;
+  case lldb_ebp_i386:
+    reg_value.SetUInt32(tls_context.Ebp);
+    break;
+  case lldb_esp_i386:
+    reg_value.SetUInt32(tls_context.Esp);
+    break;
+  case lldb_eip_i386:
+    reg_value.SetUInt32(tls_context.Eip);
+    break;
+  case lldb_eflags_i386:
+    reg_value.SetUInt32(tls_context.EFlags);
+    break;
+  case lldb_cs_i386:
+    reg_value.SetUInt32(tls_context.SegCs);
+    break;
+  case lldb_fs_i386:
+    reg_value.SetUInt32(tls_context.SegFs);
+    break;
+  case lldb_gs_i386:
+    reg_value.SetUInt32(tls_context.SegGs);
+    break;
+  case lldb_ss_i386:
+    reg_value.SetUInt32(tls_context.SegSs);
+    break;
+  case lldb_ds_i386:
+    reg_value.SetUInt32(tls_context.SegDs);
+    break;
+  case lldb_es_i386:
+    reg_value.SetUInt32(tls_context.SegEs);
+    break;
+  }
+
+  return error;
+}
+
+Status
+NativeRegisterContextWindows_i386::GPRWrite(const uint32_t reg,
+                                            const RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_eax_i386:
+    tls_context.Eax = reg_value.GetAsUInt32();
+    break;
+  case lldb_ebx_i386:
+    tls_context.Ebx = reg_value.GetAsUInt32();
+    break;
+  case lldb_ecx_i386:
+    tls_context.Ecx = reg_value.GetAsUInt32();
+    break;
+  case lldb_edx_i386:
+    tls_context.Edx = reg_value.GetAsUInt32();
+    break;
+  case lldb_edi_i386:
+    tls_context.Edi = reg_value.GetAsUInt32();
+    break;
+  case lldb_esi_i386:
+    tls_context.Esi = reg_value.GetAsUInt32();
+    break;
+  case lldb_ebp_i386:
+    tls_context.Ebp = reg_value.GetAsUInt32();
+    break;
+  case lldb_esp_i386:
+    tls_context.Esp = reg_value.GetAsUInt32();
+    break;
+  case lldb_eip_i386:
+    tls_context.Eip = reg_value.GetAsUInt32();
+    break;
+  case lldb_eflags_i386:
+    tls_context.EFlags = reg_value.GetAsUInt32();
+    break;
+  case lldb_cs_i386:
+    tls_context.SegCs = reg_value.GetAsUInt32();
+    break;
+  case lldb_fs_i386:
+    tls_context.SegFs = reg_value.GetAsUInt32();
+    break;
+  case lldb_gs_i386:
+    tls_context.SegGs = reg_value.GetAsUInt32();
+    break;
+  case lldb_ss_i386:
+    tls_context.SegSs = reg_value.GetAsUInt32();
+    break;
+  case lldb_ds_i386:
+    tls_context.SegDs = reg_value.GetAsUInt32();
+    break;
+  case lldb_es_i386:
+    tls_context.SegEs = reg_value.GetAsUInt32();
+    break;
+  }
+
+  return SetThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status NativeRegisterContextWindows_i386::DRRead(const uint32_t reg,
+                                                 RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_DEBUG_REGISTERS;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_dr0_i386:
+    reg_value.SetUInt32(tls_context.Dr0);
+    break;
+  case lldb_dr1_i386:
+    reg_value.SetUInt32(tls_context.Dr1);
+    break;
+  case lldb_dr2_i386:
+    reg_value.SetUInt32(tls_context.Dr2);
+    break;
+  case lldb_dr3_i386:
+    reg_value.SetUInt32(tls_context.Dr3);
+    break;
+  case lldb_dr4_i386:
+    return Status("register DR4 is obsolete");
+  case lldb_dr5_i386:
+    return Status("register DR5 is obsolete");
+  case lldb_dr6_i386:
+    reg_value.SetUInt32(tls_context.Dr6);
+    break;
+  case lldb_dr7_i386:
+    reg_value.SetUInt32(tls_context.Dr7);
+    break;
+  }
+
+  return {};
+}
+
+Status
+NativeRegisterContextWindows_i386::DRWrite(const uint32_t reg,
+                                           const RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_DEBUG_REGISTERS;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_dr0_i386:
+    tls_context.Dr0 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr1_i386:
+    tls_context.Dr1 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr2_i386:
+    tls_context.Dr2 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr3_i386:
+    tls_context.Dr3 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr4_i386:
+    return Status("register DR4 is obsolete");
+  case lldb_dr5_i386:
+    return Status("register DR5 is obsolete");
+  case lldb_dr6_i386:
+    tls_context.Dr6 = reg_value.GetAsUInt32();
+    break;
+  case lldb_dr7_i386:
+    tls_context.Dr7 = reg_value.GetAsUInt32();
+    break;
+  }
+
+  return SetThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status
+NativeRegisterContextWindows_i386::ReadRegister(const RegisterInfo *reg_info,
+                                                RegisterValue &reg_value) {
+  Status error;
+
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly queried.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot read directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRRead(reg, reg_value);
+
+  if (IsDR(reg))
+    return DRRead(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_i386::WriteRegister(
+    const RegisterInfo *reg_info, const RegisterValue &reg_value) {
+  Status error;
+
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly written.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot write directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRWrite(reg, reg_value);
+
+  if (IsDR(reg))
+    return DRWrite(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_i386::ReadAllRegisterValues(
+    lldb::DataBufferSP &data_sp) {
+  const size_t data_size = REG_CONTEXT_SIZE;
+  data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
+  ::CONTEXT tls_context;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, CONTEXT_ALL);
+  if (error.Fail())
+    return error;
+
+  uint8_t *dst = data_sp->GetBytes();
+  ::memcpy(dst, &tls_context, data_size);
+  return error;
+}
+
+Status NativeRegisterContextWindows_i386::WriteAllRegisterValues(
+    const lldb::DataBufferSP &data_sp) {
+  Status error;
+  const size_t data_size = REG_CONTEXT_SIZE;
+  if (!data_sp) {
+    error.SetErrorStringWithFormat(
+        "NativeRegisterContextWindows_i386::%s invalid data_sp provided",
+        __FUNCTION__);
+    return error;
+  }
+
+  if (data_sp->GetByteSize() != data_size) {
+    error.SetErrorStringWithFormatv(
+        "data_sp contained mismatched data size, expected {0}, actual {1}",
+        data_size, data_sp->GetByteSize());
+    return error;
+  }
+
+  ::CONTEXT tls_context;
+  memcpy(&tls_context, data_sp->GetBytes(), data_size);
+  return SetThreadContextHelper(GetThreadHandle(), &tls_context);
+}
+
+Status NativeRegisterContextWindows_i386::IsWatchpointHit(uint32_t wp_index,
+                                                          bool &is_hit) {
+  is_hit = false;
+
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return Status("watchpoint index out of range");
+
+  RegisterValue reg_value;
+  Status error = DRRead(lldb_dr6_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  is_hit = reg_value.GetAsUInt32() & (1 << wp_index);
+
+  return {};
+}
+
+Status NativeRegisterContextWindows_i386::GetWatchpointHitIndex(
+    uint32_t &wp_index, lldb::addr_t trap_addr) {
+  wp_index = LLDB_INVALID_INDEX32;
+
+  for (uint32_t i = 0; i < NumSupportedHardwareWatchpoints(); i++) {
+    bool is_hit;
+    Status error = IsWatchpointHit(i, is_hit);
+    if (error.Fail())
+      return error;
+
+    if (is_hit) {
+      wp_index = i;
+      return {};
+    }
+  }
+
+  return {};
+}
+
+Status NativeRegisterContextWindows_i386::IsWatchpointVacant(uint32_t wp_index,
+                                                             bool &is_vacant) {
+  is_vacant = false;
+
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return Status("Watchpoint index out of range");
+
+  RegisterValue reg_value;
+  Status error = DRRead(lldb_dr7_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  is_vacant = !(reg_value.GetAsUInt32() & (1 << (2 * wp_index)));
+
+  return error;
+}
+
+bool NativeRegisterContextWindows_i386::ClearHardwareWatchpoint(
+    uint32_t wp_index) {
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return false;
+
+  // for watchpoints 0, 1, 2, or 3, respectively, clear bits 0, 1, 2, or 3 of
+  // the debug status register (DR6)
+
+  RegisterValue reg_value;
+  Status error = DRRead(lldb_dr6_i386, reg_value);
+  if (error.Fail())
+    return false;
+
+  uint32_t bit_mask = 1 << wp_index;
+  uint32_t status_bits = reg_value.GetAsUInt32() & ~bit_mask;
+  error = DRWrite(lldb_dr6_i386, RegisterValue(status_bits));
+  if (error.Fail())
+    return false;
+
+  // for watchpoints 0, 1, 2, or 3, respectively, clear bits {0-1,16-19},
+  // {2-3,20-23}, {4-5,24-27}, or {6-7,28-31} of the debug control register
+  // (DR7)
+
+  error = DRRead(lldb_dr7_i386, reg_value);
+  if (error.Fail())
+    return false;
+
+  bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
+  uint32_t control_bits = reg_value.GetAsUInt32() & ~bit_mask;
+  return DRWrite(lldb_dr7_i386, RegisterValue(control_bits)).Success();
+}
+
+Status NativeRegisterContextWindows_i386::ClearAllHardwareWatchpoints() {
+  RegisterValue reg_value;
+
+  // clear bits {0-4} of the debug status register (DR6)
+
+  Status error = DRRead(lldb_dr6_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  uint32_t status_bits = reg_value.GetAsUInt32() & ~0xF;
+  error = DRWrite(lldb_dr6_i386, RegisterValue(status_bits));
+  if (error.Fail())
+    return error;
+
+  // clear bits {0-7,16-31} of the debug control register (DR7)
+
+  error = DRRead(lldb_dr7_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  uint32_t control_bits = reg_value.GetAsUInt32() & ~0xFFFF00FF;
+  return DRWrite(lldb_dr7_i386, RegisterValue(control_bits));
+}
+
+uint32_t NativeRegisterContextWindows_i386::SetHardwareWatchpoint(
+    lldb::addr_t addr, size_t size, uint32_t watch_flags) {
+  switch (size) {
+  case 1:
+  case 2:
+  case 4:
+    break;
+  default:
+    return LLDB_INVALID_INDEX32;
+  }
+
+  if (watch_flags == 0x2)
+    watch_flags = 0x3;
+
+  if (watch_flags != 0x1 && watch_flags != 0x3)
+    return LLDB_INVALID_INDEX32;
+
+  for (uint32_t wp_index = 0; wp_index < NumSupportedHardwareWatchpoints();
+       ++wp_index) {
+    bool is_vacant;
+    if (IsWatchpointVacant(wp_index, is_vacant).Fail())
+      return LLDB_INVALID_INDEX32;
+
+    if (is_vacant) {
+      if (!ClearHardwareWatchpoint(wp_index))
+        return LLDB_INVALID_INDEX32;
+
+      if (ApplyHardwareBreakpoint(wp_index, addr, size, watch_flags).Fail())
+        return LLDB_INVALID_INDEX32;
+
+      return wp_index;
+    }
+  }
+  return LLDB_INVALID_INDEX32;
+}
+
+Status NativeRegisterContextWindows_i386::ApplyHardwareBreakpoint(
+    uint32_t wp_index, lldb::addr_t addr, size_t size, uint32_t flags) {
+  RegisterValue reg_value;
+  auto error = DRRead(lldb_dr7_i386, reg_value);
+  if (error.Fail())
+    return error;
+
+  // for watchpoints 0, 1, 2, or 3, respectively, set bits 1, 3, 5, or 7
+  uint32_t enable_bit = 1 << (2 * wp_index);
+
+  // set bits 16-17, 20-21, 24-25, or 28-29
+  // with 0b01 for write, and 0b11 for read/write
+  uint32_t rw_bits = flags << (16 + 4 * wp_index);
+
+  // set bits 18-19, 22-23, 26-27, or 30-31
+  // with 0b00, 0b01, 0b10, or 0b11
+  // for 1, 2, 8 (if supported), or 4 bytes, respectively
+  uint32_t size_bits = (size == 8 ? 0x2 : size - 1) << (18 + 4 * wp_index);
+
+  uint32_t bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
+
+  uint32_t control_bits = reg_value.GetAsUInt32() & ~bit_mask;
+  control_bits |= enable_bit | rw_bits | size_bits;
+
+  error = DRWrite(lldb_dr7_i386, RegisterValue(control_bits));
+  if (error.Fail())
+    return error;
+
+  error = DRWrite(lldb_dr0_i386 + wp_index, RegisterValue(addr));
+  if (error.Fail())
+    return error;
+
+  return {};
+}
+
+lldb::addr_t
+NativeRegisterContextWindows_i386::GetWatchpointAddress(uint32_t wp_index) {
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return LLDB_INVALID_ADDRESS;
+
+  RegisterValue reg_value;
+  if (DRRead(lldb_dr0_i386 + wp_index, reg_value).Fail())
+    return LLDB_INVALID_ADDRESS;
+
+  return reg_value.GetAsUInt32();
+}
+
+uint32_t NativeRegisterContextWindows_i386::NumSupportedHardwareWatchpoints() {
+  return 4;
+}
+
+#endif
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
new file mode 100644
index 0000000..d357e63
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
@@ -0,0 +1,77 @@
+//===-- NativeRegisterContextWindows_i386.h ---------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__i386__) || defined(_M_IX86)
+#ifndef liblldb_NativeRegisterContextWindows_i386_h_
+#define liblldb_NativeRegisterContextWindows_i386_h_
+
+#include "Plugins/Process/Utility/RegisterContext_x86.h"
+#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+
+#include "NativeRegisterContextWindows.h"
+
+namespace lldb_private {
+
+class NativeThreadWindows;
+
+class NativeRegisterContextWindows_i386 : public NativeRegisterContextWindows {
+public:
+  NativeRegisterContextWindows_i386(const ArchSpec &target_arch,
+                                    NativeThreadProtocol &native_thread);
+
+  uint32_t GetRegisterSetCount() const override;
+
+  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
+
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
+
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
+
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+
+  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
+
+  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+
+  bool ClearHardwareWatchpoint(uint32_t wp_index) override;
+
+  Status ClearAllHardwareWatchpoints() override;
+
+  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
+                                 uint32_t watch_flags) override;
+
+  lldb::addr_t GetWatchpointAddress(uint32_t wp_index) override;
+
+  uint32_t NumSupportedHardwareWatchpoints() override;
+
+protected:
+  Status GPRRead(const uint32_t reg, RegisterValue &reg_value);
+  Status GPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+  Status DRRead(const uint32_t reg, RegisterValue &reg_value);
+  Status DRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+private:
+  Status ApplyHardwareBreakpoint(uint32_t wp_index, lldb::addr_t addr,
+                                 size_t size, uint32_t flags);
+
+  bool IsGPR(uint32_t reg_index) const;
+  bool IsDR(uint32_t reg_index) const;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_NativeRegisterContextWindows_i386_h_
+#endif // defined(__i386__) || defined(_M_IX86)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
new file mode 100644
index 0000000..fed64494
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
@@ -0,0 +1,818 @@
+//===-- NativeRegisterContextWindows_x86_64.cpp -----------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__x86_64__) || defined(_M_X64)
+
+#include "NativeRegisterContextWindows_x86_64.h"
+#include "NativeRegisterContextWindows_WoW64.h"
+#include "NativeThreadWindows.h"
+#include "Plugins/Process/Utility/RegisterContextWindows_i386.h"
+#include "Plugins/Process/Utility/RegisterContextWindows_x86_64.h"
+#include "ProcessWindowsLog.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Host/HostThread.h"
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/windows.h"
+
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "llvm/ADT/STLExtras.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+#define REG_CONTEXT_SIZE sizeof(::CONTEXT)
+
+namespace {
+static const uint32_t g_gpr_regnums_x86_64[] = {
+    lldb_rax_x86_64,    lldb_rbx_x86_64,    lldb_rcx_x86_64, lldb_rdx_x86_64,
+    lldb_rdi_x86_64,    lldb_rsi_x86_64,    lldb_rbp_x86_64, lldb_rsp_x86_64,
+    lldb_r8_x86_64,     lldb_r9_x86_64,     lldb_r10_x86_64, lldb_r11_x86_64,
+    lldb_r12_x86_64,    lldb_r13_x86_64,    lldb_r14_x86_64, lldb_r15_x86_64,
+    lldb_rip_x86_64,    lldb_rflags_x86_64, lldb_cs_x86_64,  lldb_fs_x86_64,
+    lldb_gs_x86_64,     lldb_ss_x86_64,     lldb_ds_x86_64,  lldb_es_x86_64,
+    LLDB_INVALID_REGNUM // Register set must be terminated with this flag
+};
+
+static const uint32_t g_fpr_regnums_x86_64[] = {
+    lldb_xmm0_x86_64,   lldb_xmm1_x86_64,  lldb_xmm2_x86_64,  lldb_xmm3_x86_64,
+    lldb_xmm4_x86_64,   lldb_xmm5_x86_64,  lldb_xmm6_x86_64,  lldb_xmm7_x86_64,
+    lldb_xmm8_x86_64,   lldb_xmm9_x86_64,  lldb_xmm10_x86_64, lldb_xmm11_x86_64,
+    lldb_xmm12_x86_64,  lldb_xmm13_x86_64, lldb_xmm14_x86_64, lldb_xmm15_x86_64,
+    LLDB_INVALID_REGNUM // Register set must be terminated with this flag
+};
+
+static const RegisterSet g_reg_sets_x86_64[] = {
+    {"General Purpose Registers", "gpr",
+     llvm::array_lengthof(g_gpr_regnums_x86_64) - 1, g_gpr_regnums_x86_64},
+    {"Floating Point Registers", "fpr",
+     llvm::array_lengthof(g_fpr_regnums_x86_64) - 1, g_fpr_regnums_x86_64}};
+
+enum { k_num_register_sets = 2 };
+
+} // namespace
+
+static RegisterInfoInterface *
+CreateRegisterInfoInterface(const ArchSpec &target_arch) {
+  assert((HostInfo::GetArchitecture().GetAddressByteSize() == 8) &&
+         "Register setting path assumes this is a 64-bit host");
+  return new RegisterContextWindows_x86_64(target_arch);
+}
+
+static Status GetThreadContextHelper(lldb::thread_t thread_handle,
+                                     PCONTEXT context_ptr,
+                                     const DWORD control_flag) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+
+  memset(context_ptr, 0, sizeof(::CONTEXT));
+  context_ptr->ContextFlags = control_flag;
+  if (!::GetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} GetThreadContext failed with error {1}", __FUNCTION__,
+             error);
+    return error;
+  }
+  return Status();
+}
+
+static Status SetThreadContextHelper(lldb::thread_t thread_handle,
+                                     PCONTEXT context_ptr) {
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  Status error;
+  // It's assumed that the thread has stopped.
+  if (!::SetThreadContext(thread_handle, context_ptr)) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} SetThreadContext failed with error {1}", __FUNCTION__,
+             error);
+    return error;
+  }
+  return Status();
+}
+
+std::unique_ptr<NativeRegisterContextWindows>
+NativeRegisterContextWindows::CreateHostNativeRegisterContextWindows(
+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread) {
+  // Register context for a WoW64 application.
+  if (target_arch.GetAddressByteSize() == 4)
+    return std::make_unique<NativeRegisterContextWindows_WoW64>(target_arch,
+                                                                native_thread);
+
+  // Register context for a native 64-bit application.
+  return std::make_unique<NativeRegisterContextWindows_x86_64>(target_arch,
+                                                               native_thread);
+}
+
+NativeRegisterContextWindows_x86_64::NativeRegisterContextWindows_x86_64(
+    const ArchSpec &target_arch, NativeThreadProtocol &native_thread)
+    : NativeRegisterContextWindows(native_thread,
+                                   CreateRegisterInfoInterface(target_arch)) {}
+
+bool NativeRegisterContextWindows_x86_64::IsGPR(uint32_t reg_index) const {
+  return (reg_index >= k_first_gpr_x86_64 && reg_index < k_first_alias_x86_64);
+}
+
+bool NativeRegisterContextWindows_x86_64::IsFPR(uint32_t reg_index) const {
+  return (reg_index >= lldb_xmm0_x86_64 && reg_index <= k_last_fpr_x86_64);
+}
+
+bool NativeRegisterContextWindows_x86_64::IsDR(uint32_t reg_index) const {
+  return (reg_index >= lldb_dr0_x86_64 && reg_index <= lldb_dr7_x86_64);
+}
+
+uint32_t NativeRegisterContextWindows_x86_64::GetRegisterSetCount() const {
+  return k_num_register_sets;
+}
+
+const RegisterSet *
+NativeRegisterContextWindows_x86_64::GetRegisterSet(uint32_t set_index) const {
+  if (set_index >= k_num_register_sets)
+    return nullptr;
+  return &g_reg_sets_x86_64[set_index];
+}
+
+Status NativeRegisterContextWindows_x86_64::GPRRead(const uint32_t reg,
+                                                    RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_rax_x86_64:
+    reg_value.SetUInt64(tls_context.Rax);
+    break;
+  case lldb_rbx_x86_64:
+    reg_value.SetUInt64(tls_context.Rbx);
+    break;
+  case lldb_rcx_x86_64:
+    reg_value.SetUInt64(tls_context.Rcx);
+    break;
+  case lldb_rdx_x86_64:
+    reg_value.SetUInt64(tls_context.Rdx);
+    break;
+  case lldb_rdi_x86_64:
+    reg_value.SetUInt64(tls_context.Rdi);
+    break;
+  case lldb_rsi_x86_64:
+    reg_value.SetUInt64(tls_context.Rsi);
+    break;
+  case lldb_rbp_x86_64:
+    reg_value.SetUInt64(tls_context.Rbp);
+    break;
+  case lldb_rsp_x86_64:
+    reg_value.SetUInt64(tls_context.Rsp);
+    break;
+  case lldb_r8_x86_64:
+    reg_value.SetUInt64(tls_context.R8);
+    break;
+  case lldb_r9_x86_64:
+    reg_value.SetUInt64(tls_context.R9);
+    break;
+  case lldb_r10_x86_64:
+    reg_value.SetUInt64(tls_context.R10);
+    break;
+  case lldb_r11_x86_64:
+    reg_value.SetUInt64(tls_context.R11);
+    break;
+  case lldb_r12_x86_64:
+    reg_value.SetUInt64(tls_context.R12);
+    break;
+  case lldb_r13_x86_64:
+    reg_value.SetUInt64(tls_context.R13);
+    break;
+  case lldb_r14_x86_64:
+    reg_value.SetUInt64(tls_context.R14);
+    break;
+  case lldb_r15_x86_64:
+    reg_value.SetUInt64(tls_context.R15);
+    break;
+  case lldb_rip_x86_64:
+    reg_value.SetUInt64(tls_context.Rip);
+    break;
+  case lldb_rflags_x86_64:
+    reg_value.SetUInt64(tls_context.EFlags | 0x2); // Bit #1 always 1
+    break;
+  case lldb_cs_x86_64:
+    reg_value.SetUInt16(tls_context.SegCs);
+    break;
+  case lldb_fs_x86_64:
+    reg_value.SetUInt16(tls_context.SegFs);
+    break;
+  case lldb_gs_x86_64:
+    reg_value.SetUInt16(tls_context.SegGs);
+    break;
+  case lldb_ss_x86_64:
+    reg_value.SetUInt16(tls_context.SegSs);
+    break;
+  case lldb_ds_x86_64:
+    reg_value.SetUInt16(tls_context.SegDs);
+    break;
+  case lldb_es_x86_64:
+    reg_value.SetUInt16(tls_context.SegEs);
+    break;
+  }
+
+  return error;
+}
+
+Status
+NativeRegisterContextWindows_x86_64::GPRWrite(const uint32_t reg,
+                                              const RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_INTEGER | CONTEXT_SEGMENTS;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_rax_x86_64:
+    tls_context.Rax = reg_value.GetAsUInt64();
+    break;
+  case lldb_rbx_x86_64:
+    tls_context.Rbx = reg_value.GetAsUInt64();
+    break;
+  case lldb_rcx_x86_64:
+    tls_context.Rcx = reg_value.GetAsUInt64();
+    break;
+  case lldb_rdx_x86_64:
+    tls_context.Rdx = reg_value.GetAsUInt64();
+    break;
+  case lldb_rdi_x86_64:
+    tls_context.Rdi = reg_value.GetAsUInt64();
+    break;
+  case lldb_rsi_x86_64:
+    tls_context.Rsi = reg_value.GetAsUInt64();
+    break;
+  case lldb_rbp_x86_64:
+    tls_context.Rbp = reg_value.GetAsUInt64();
+    break;
+  case lldb_rsp_x86_64:
+    tls_context.Rsp = reg_value.GetAsUInt64();
+    break;
+  case lldb_r8_x86_64:
+    tls_context.R8 = reg_value.GetAsUInt64();
+    break;
+  case lldb_r9_x86_64:
+    tls_context.R9 = reg_value.GetAsUInt64();
+    break;
+  case lldb_r10_x86_64:
+    tls_context.R10 = reg_value.GetAsUInt64();
+    break;
+  case lldb_r11_x86_64:
+    tls_context.R11 = reg_value.GetAsUInt64();
+    break;
+  case lldb_r12_x86_64:
+    tls_context.R12 = reg_value.GetAsUInt64();
+    break;
+  case lldb_r13_x86_64:
+    tls_context.R13 = reg_value.GetAsUInt64();
+    break;
+  case lldb_r14_x86_64:
+    tls_context.R14 = reg_value.GetAsUInt64();
+    break;
+  case lldb_r15_x86_64:
+    tls_context.R15 = reg_value.GetAsUInt64();
+    break;
+  case lldb_rip_x86_64:
+    tls_context.Rip = reg_value.GetAsUInt64();
+    break;
+  case lldb_rflags_x86_64:
+    tls_context.EFlags = reg_value.GetAsUInt64();
+    break;
+  case lldb_cs_x86_64:
+    tls_context.SegCs = reg_value.GetAsUInt16();
+    break;
+  case lldb_fs_x86_64:
+    tls_context.SegFs = reg_value.GetAsUInt16();
+    break;
+  case lldb_gs_x86_64:
+    tls_context.SegGs = reg_value.GetAsUInt16();
+    break;
+  case lldb_ss_x86_64:
+    tls_context.SegSs = reg_value.GetAsUInt16();
+    break;
+  case lldb_ds_x86_64:
+    tls_context.SegDs = reg_value.GetAsUInt16();
+    break;
+  case lldb_es_x86_64:
+    tls_context.SegEs = reg_value.GetAsUInt16();
+    break;
+  }
+
+  return SetThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status NativeRegisterContextWindows_x86_64::FPRRead(const uint32_t reg,
+                                                    RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_FLOATING_POINT;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_xmm0_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm0, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm1_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm1, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm2_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm2, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm3_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm3, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm4_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm4, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm5_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm5, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm6_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm6, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm7_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm7, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm8_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm8, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm9_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm9, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm10_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm10, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm11_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm11, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm12_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm12, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm13_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm13, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm14_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm14, 16, endian::InlHostByteOrder());
+    break;
+  case lldb_xmm15_x86_64:
+    reg_value.SetBytes(&tls_context.Xmm15, 16, endian::InlHostByteOrder());
+    break;
+  }
+
+  return error;
+}
+
+Status
+NativeRegisterContextWindows_x86_64::FPRWrite(const uint32_t reg,
+                                              const RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_CONTROL | CONTEXT_FLOATING_POINT;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_xmm0_x86_64:
+    memcpy(&tls_context.Xmm0, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm1_x86_64:
+    memcpy(&tls_context.Xmm1, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm2_x86_64:
+    memcpy(&tls_context.Xmm2, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm3_x86_64:
+    memcpy(&tls_context.Xmm3, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm4_x86_64:
+    memcpy(&tls_context.Xmm4, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm5_x86_64:
+    memcpy(&tls_context.Xmm5, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm6_x86_64:
+    memcpy(&tls_context.Xmm6, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm7_x86_64:
+    memcpy(&tls_context.Xmm7, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm8_x86_64:
+    memcpy(&tls_context.Xmm8, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm9_x86_64:
+    memcpy(&tls_context.Xmm9, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm10_x86_64:
+    memcpy(&tls_context.Xmm10, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm11_x86_64:
+    memcpy(&tls_context.Xmm11, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm12_x86_64:
+    memcpy(&tls_context.Xmm12, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm13_x86_64:
+    memcpy(&tls_context.Xmm13, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm14_x86_64:
+    memcpy(&tls_context.Xmm14, reg_value.GetBytes(), 16);
+    break;
+  case lldb_xmm15_x86_64:
+    memcpy(&tls_context.Xmm15, reg_value.GetBytes(), 16);
+    break;
+  }
+
+  return SetThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status NativeRegisterContextWindows_x86_64::DRRead(const uint32_t reg,
+                                                   RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_DEBUG_REGISTERS;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_dr0_x86_64:
+    reg_value.SetUInt64(tls_context.Dr0);
+    break;
+  case lldb_dr1_x86_64:
+    reg_value.SetUInt64(tls_context.Dr1);
+    break;
+  case lldb_dr2_x86_64:
+    reg_value.SetUInt64(tls_context.Dr2);
+    break;
+  case lldb_dr3_x86_64:
+    reg_value.SetUInt64(tls_context.Dr3);
+    break;
+  case lldb_dr4_x86_64:
+    return Status("register DR4 is obsolete");
+  case lldb_dr5_x86_64:
+    return Status("register DR5 is obsolete");
+  case lldb_dr6_x86_64:
+    reg_value.SetUInt64(tls_context.Dr6);
+    break;
+  case lldb_dr7_x86_64:
+    reg_value.SetUInt64(tls_context.Dr7);
+    break;
+  }
+
+  return {};
+}
+
+Status
+NativeRegisterContextWindows_x86_64::DRWrite(const uint32_t reg,
+                                             const RegisterValue &reg_value) {
+  ::CONTEXT tls_context;
+  DWORD context_flag = CONTEXT_DEBUG_REGISTERS;
+  auto thread_handle = GetThreadHandle();
+  Status error =
+      GetThreadContextHelper(thread_handle, &tls_context, context_flag);
+  if (error.Fail())
+    return error;
+
+  switch (reg) {
+  case lldb_dr0_x86_64:
+    tls_context.Dr0 = reg_value.GetAsUInt64();
+    break;
+  case lldb_dr1_x86_64:
+    tls_context.Dr1 = reg_value.GetAsUInt64();
+    break;
+  case lldb_dr2_x86_64:
+    tls_context.Dr2 = reg_value.GetAsUInt64();
+    break;
+  case lldb_dr3_x86_64:
+    tls_context.Dr3 = reg_value.GetAsUInt64();
+    break;
+  case lldb_dr4_x86_64:
+    return Status("register DR4 is obsolete");
+  case lldb_dr5_x86_64:
+    return Status("register DR5 is obsolete");
+  case lldb_dr6_x86_64:
+    tls_context.Dr6 = reg_value.GetAsUInt64();
+    break;
+  case lldb_dr7_x86_64:
+    tls_context.Dr7 = reg_value.GetAsUInt64();
+    break;
+  }
+
+  return SetThreadContextHelper(thread_handle, &tls_context);
+}
+
+Status
+NativeRegisterContextWindows_x86_64::ReadRegister(const RegisterInfo *reg_info,
+                                                  RegisterValue &reg_value) {
+  Status error;
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly queried.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot read directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRRead(reg, reg_value);
+
+  if (IsFPR(reg))
+    return FPRRead(reg, reg_value);
+
+  if (IsDR(reg))
+    return DRRead(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_x86_64::WriteRegister(
+    const RegisterInfo *reg_info, const RegisterValue &reg_value) {
+  Status error;
+
+  if (!reg_info) {
+    error.SetErrorString("reg_info NULL");
+    return error;
+  }
+
+  const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
+  if (reg == LLDB_INVALID_REGNUM) {
+    // This is likely an internal register for lldb use only and should not be
+    // directly written.
+    error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
+                                   "register, cannot write directly",
+                                   reg_info->name);
+    return error;
+  }
+
+  if (IsGPR(reg))
+    return GPRWrite(reg, reg_value);
+
+  if (IsFPR(reg))
+    return FPRWrite(reg, reg_value);
+
+  if (IsDR(reg))
+    return DRWrite(reg, reg_value);
+
+  return Status("unimplemented");
+}
+
+Status NativeRegisterContextWindows_x86_64::ReadAllRegisterValues(
+    lldb::DataBufferSP &data_sp) {
+  const size_t data_size = REG_CONTEXT_SIZE;
+  data_sp = std::make_shared<DataBufferHeap>(data_size, 0);
+  ::CONTEXT tls_context;
+  Status error =
+      GetThreadContextHelper(GetThreadHandle(), &tls_context, CONTEXT_ALL);
+  if (error.Fail())
+    return error;
+
+  uint8_t *dst = data_sp->GetBytes();
+  ::memcpy(dst, &tls_context, data_size);
+  return error;
+}
+
+Status NativeRegisterContextWindows_x86_64::WriteAllRegisterValues(
+    const lldb::DataBufferSP &data_sp) {
+  Status error;
+  const size_t data_size = REG_CONTEXT_SIZE;
+  if (!data_sp) {
+    error.SetErrorStringWithFormat(
+        "NativeRegisterContextWindows_x86_64::%s invalid data_sp provided",
+        __FUNCTION__);
+    return error;
+  }
+
+  if (data_sp->GetByteSize() != data_size) {
+    error.SetErrorStringWithFormatv(
+        "data_sp contained mismatched data size, expected {0}, actual {1}",
+        data_size, data_sp->GetByteSize());
+    return error;
+  }
+
+  ::CONTEXT tls_context;
+  memcpy(&tls_context, data_sp->GetBytes(), data_size);
+  return SetThreadContextHelper(GetThreadHandle(), &tls_context);
+}
+
+Status NativeRegisterContextWindows_x86_64::IsWatchpointHit(uint32_t wp_index,
+                                                            bool &is_hit) {
+  is_hit = false;
+
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return Status("watchpoint index out of range");
+
+  RegisterValue reg_value;
+  Status error = DRRead(lldb_dr6_x86_64, reg_value);
+  if (error.Fail())
+    return error;
+
+  is_hit = reg_value.GetAsUInt64() & (1ULL << wp_index);
+
+  return {};
+}
+
+Status NativeRegisterContextWindows_x86_64::GetWatchpointHitIndex(
+    uint32_t &wp_index, lldb::addr_t trap_addr) {
+  wp_index = LLDB_INVALID_INDEX32;
+
+  for (uint32_t i = 0; i < NumSupportedHardwareWatchpoints(); i++) {
+    bool is_hit;
+    Status error = IsWatchpointHit(i, is_hit);
+    if (error.Fail())
+      return error;
+
+    if (is_hit) {
+      wp_index = i;
+      return {};
+    }
+  }
+
+  return {};
+}
+
+Status
+NativeRegisterContextWindows_x86_64::IsWatchpointVacant(uint32_t wp_index,
+                                                        bool &is_vacant) {
+  is_vacant = false;
+
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return Status("Watchpoint index out of range");
+
+  RegisterValue reg_value;
+  Status error = DRRead(lldb_dr7_x86_64, reg_value);
+  if (error.Fail())
+    return error;
+
+  is_vacant = !(reg_value.GetAsUInt64() & (1ULL << (2 * wp_index)));
+
+  return error;
+}
+
+bool NativeRegisterContextWindows_x86_64::ClearHardwareWatchpoint(
+    uint32_t wp_index) {
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return false;
+
+  // for watchpoints 0, 1, 2, or 3, respectively, clear bits 0, 1, 2, or 3 of
+  // the debug status register (DR6)
+
+  RegisterValue reg_value;
+  Status error = DRRead(lldb_dr6_x86_64, reg_value);
+  if (error.Fail())
+    return false;
+
+  uint64_t bit_mask = 1ULL << wp_index;
+  uint64_t status_bits = reg_value.GetAsUInt64() & ~bit_mask;
+  error = DRWrite(lldb_dr6_x86_64, RegisterValue(status_bits));
+  if (error.Fail())
+    return false;
+
+  // for watchpoints 0, 1, 2, or 3, respectively, clear bits {0-1,16-19},
+  // {2-3,20-23}, {4-5,24-27}, or {6-7,28-31} of the debug control register
+  // (DR7)
+
+  error = DRRead(lldb_dr7_x86_64, reg_value);
+  if (error.Fail())
+    return false;
+
+  bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
+  uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask;
+  return DRWrite(lldb_dr7_x86_64, RegisterValue(control_bits)).Success();
+}
+
+Status NativeRegisterContextWindows_x86_64::ClearAllHardwareWatchpoints() {
+  RegisterValue reg_value;
+
+  // clear bits {0-4} of the debug status register (DR6)
+
+  Status error = DRRead(lldb_dr6_x86_64, reg_value);
+  if (error.Fail())
+    return error;
+
+  uint64_t status_bits = reg_value.GetAsUInt64() & ~0xFULL;
+  error = DRWrite(lldb_dr6_x86_64, RegisterValue(status_bits));
+  if (error.Fail())
+    return error;
+
+  // clear bits {0-7,16-31} of the debug control register (DR7)
+
+  error = DRRead(lldb_dr7_x86_64, reg_value);
+  if (error.Fail())
+    return error;
+
+  uint64_t control_bits = reg_value.GetAsUInt64() & ~0xFFFF00FFULL;
+  return DRWrite(lldb_dr7_x86_64, RegisterValue(control_bits));
+}
+
+uint32_t NativeRegisterContextWindows_x86_64::SetHardwareWatchpoint(
+    lldb::addr_t addr, size_t size, uint32_t watch_flags) {
+  switch (size) {
+  case 1:
+  case 2:
+  case 4:
+  case 8:
+    break;
+  default:
+    return LLDB_INVALID_INDEX32;
+  }
+
+  if (watch_flags == 0x2)
+    watch_flags = 0x3;
+
+  if (watch_flags != 0x1 && watch_flags != 0x3)
+    return LLDB_INVALID_INDEX32;
+
+  for (uint32_t wp_index = 0; wp_index < NumSupportedHardwareWatchpoints();
+       ++wp_index) {
+    bool is_vacant;
+    if (IsWatchpointVacant(wp_index, is_vacant).Fail())
+      return LLDB_INVALID_INDEX32;
+
+    if (is_vacant) {
+      if (!ClearHardwareWatchpoint(wp_index))
+        return LLDB_INVALID_INDEX32;
+
+      if (ApplyHardwareBreakpoint(wp_index, addr, size, watch_flags).Fail())
+        return LLDB_INVALID_INDEX32;
+
+      return wp_index;
+    }
+  }
+  return LLDB_INVALID_INDEX32;
+}
+
+Status NativeRegisterContextWindows_x86_64::ApplyHardwareBreakpoint(
+    uint32_t wp_index, lldb::addr_t addr, size_t size, uint32_t flags) {
+  RegisterValue reg_value;
+  auto error = DRRead(lldb_dr7_x86_64, reg_value);
+  if (error.Fail())
+    return error;
+
+  // for watchpoints 0, 1, 2, or 3, respectively, set bits 1, 3, 5, or 7
+  uint64_t enable_bit = 1ULL << (2 * wp_index);
+
+  // set bits 16-17, 20-21, 24-25, or 28-29
+  // with 0b01 for write, and 0b11 for read/write
+  uint64_t rw_bits = flags << (16 + 4 * wp_index);
+
+  // set bits 18-19, 22-23, 26-27, or 30-31
+  // with 0b00, 0b01, 0b10, or 0b11
+  // for 1, 2, 8 (if supported), or 4 bytes, respectively
+  uint64_t size_bits = (size == 8 ? 0x2 : size - 1) << (18 + 4 * wp_index);
+
+  uint64_t bit_mask = (0x3 << (2 * wp_index)) | (0xF << (16 + 4 * wp_index));
+
+  uint64_t control_bits = reg_value.GetAsUInt64() & ~bit_mask;
+  control_bits |= enable_bit | rw_bits | size_bits;
+
+  error = DRWrite(lldb_dr7_x86_64, RegisterValue(control_bits));
+  if (error.Fail())
+    return error;
+
+  error = DRWrite(lldb_dr0_x86_64 + wp_index, RegisterValue(addr));
+  if (error.Fail())
+    return error;
+
+  return {};
+}
+
+lldb::addr_t
+NativeRegisterContextWindows_x86_64::GetWatchpointAddress(uint32_t wp_index) {
+  if (wp_index >= NumSupportedHardwareWatchpoints())
+    return LLDB_INVALID_ADDRESS;
+
+  RegisterValue reg_value;
+  if (DRRead(lldb_dr0_x86_64 + wp_index, reg_value).Fail())
+    return LLDB_INVALID_ADDRESS;
+
+  return reg_value.GetAsUInt64();
+}
+
+uint32_t
+NativeRegisterContextWindows_x86_64::NumSupportedHardwareWatchpoints() {
+  return 4;
+}
+
+#endif // defined(__x86_64__) || defined(_M_X64)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
new file mode 100644
index 0000000..8699f74
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
@@ -0,0 +1,82 @@
+//===-- NativeRegisterContextWindows_x86_64.h -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__x86_64__) || defined(_M_X64)
+#ifndef liblldb_NativeRegisterContextWindows_x86_64_h_
+#define liblldb_NativeRegisterContextWindows_x86_64_h_
+
+#include "Plugins/Process/Utility/RegisterContext_x86.h"
+#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+
+#include "NativeRegisterContextWindows.h"
+
+namespace lldb_private {
+
+class NativeThreadWindows;
+
+class NativeRegisterContextWindows_x86_64
+    : public NativeRegisterContextWindows {
+public:
+  NativeRegisterContextWindows_x86_64(const ArchSpec &target_arch,
+                                      NativeThreadProtocol &native_thread);
+
+  uint32_t GetRegisterSetCount() const override;
+
+  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
+
+  Status ReadRegister(const RegisterInfo *reg_info,
+                      RegisterValue &reg_value) override;
+
+  Status WriteRegister(const RegisterInfo *reg_info,
+                       const RegisterValue &reg_value) override;
+
+  Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+
+  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+
+  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+
+  Status GetWatchpointHitIndex(uint32_t &wp_index,
+                               lldb::addr_t trap_addr) override;
+
+  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+
+  bool ClearHardwareWatchpoint(uint32_t wp_index) override;
+
+  Status ClearAllHardwareWatchpoints() override;
+
+  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
+                                 uint32_t watch_flags) override;
+
+  lldb::addr_t GetWatchpointAddress(uint32_t wp_index) override;
+
+  uint32_t NumSupportedHardwareWatchpoints() override;
+
+protected:
+  Status GPRRead(const uint32_t reg, RegisterValue &reg_value);
+  Status GPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+  Status FPRRead(const uint32_t reg, RegisterValue &reg_value);
+  Status FPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+  Status DRRead(const uint32_t reg, RegisterValue &reg_value);
+  Status DRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+private:
+  Status ApplyHardwareBreakpoint(uint32_t wp_index, lldb::addr_t addr,
+                                 size_t size, uint32_t flags);
+
+  bool IsGPR(uint32_t reg_index) const;
+  bool IsFPR(uint32_t reg_index) const;
+  bool IsDR(uint32_t reg_index) const;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_NativeRegisterContextWindows_x86_64_h_
+#endif // defined(__x86_64__) || defined(_M_X64)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp
new file mode 100644
index 0000000..45bdec4
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.cpp
@@ -0,0 +1,168 @@
+//===-- NativeThreadWindows.cpp ---------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "NativeThreadWindows.h"
+#include "NativeProcessWindows.h"
+
+#include "lldb/Host/HostThread.h"
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/windows.h"
+#include "lldb/Target/Process.h"
+#include "lldb/Utility/Log.h"
+#include "lldb/Utility/State.h"
+
+#include "lldb/lldb-forward.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+NativeThreadWindows::NativeThreadWindows(NativeProcessWindows &process,
+                                         const HostThread &thread)
+    : NativeThreadProtocol(process, thread.GetNativeThread().GetThreadId()),
+      m_stop_info(), m_stop_description(), m_host_thread(thread) {
+  m_reg_context_up =
+      (NativeRegisterContextWindows::CreateHostNativeRegisterContextWindows(
+          process.GetArchitecture(), *this));
+}
+
+Status NativeThreadWindows::DoStop() {
+  if (m_state != eStateStopped) {
+    DWORD previous_suspend_count =
+        ::SuspendThread(m_host_thread.GetNativeThread().GetSystemHandle());
+    if (previous_suspend_count == (DWORD)-1)
+      return Status(::GetLastError(), eErrorTypeWin32);
+
+    m_state = eStateStopped;
+  }
+  return Status();
+}
+
+Status NativeThreadWindows::DoResume(lldb::StateType resume_state) {
+  StateType current_state = GetState();
+  if (resume_state == current_state)
+    return Status();
+
+  if (resume_state == eStateStepping) {
+    uint32_t flags_index =
+        GetRegisterContext().ConvertRegisterKindToRegisterNumber(
+            eRegisterKindGeneric, LLDB_REGNUM_GENERIC_FLAGS);
+    uint64_t flags_value =
+        GetRegisterContext().ReadRegisterAsUnsigned(flags_index, 0);
+    flags_value |= 0x100; // Set the trap flag on the CPU
+    GetRegisterContext().WriteRegisterFromUnsigned(flags_index, flags_value);
+  }
+
+  if (resume_state == eStateStepping || resume_state == eStateRunning) {
+    DWORD previous_suspend_count = 0;
+    HANDLE thread_handle = m_host_thread.GetNativeThread().GetSystemHandle();
+    do {
+      // ResumeThread returns -1 on error, or the thread's *previous* suspend
+      // count on success. This means that the return value is 1 when the thread
+      // was restarted. Note that DWORD is an unsigned int, so we need to
+      // explicitly compare with -1.
+      previous_suspend_count = ::ResumeThread(thread_handle);
+
+      if (previous_suspend_count == (DWORD)-1)
+        return Status(::GetLastError(), eErrorTypeWin32);
+
+    } while (previous_suspend_count > 1);
+    m_state = eStateRunning;
+  }
+
+  return Status();
+}
+
+std::string NativeThreadWindows::GetName() {
+  if (!m_name.empty())
+    return m_name;
+
+  // Name is not a property of the Windows thread. Create one with the
+  // process's.
+  NativeProcessProtocol &process = GetProcess();
+  ProcessInstanceInfo process_info;
+  if (Host::GetProcessInfo(process.GetID(), process_info)) {
+    std::string process_name(process_info.GetName());
+    m_name = process_name;
+  }
+  return m_name;
+}
+
+void NativeThreadWindows::SetStopReason(ThreadStopInfo stop_info,
+                                        std::string description) {
+  m_state = eStateStopped;
+  m_stop_info = stop_info;
+  m_stop_description = description;
+}
+
+bool NativeThreadWindows::GetStopReason(ThreadStopInfo &stop_info,
+                                        std::string &description) {
+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
+
+  switch (m_state) {
+  case eStateStopped:
+  case eStateCrashed:
+  case eStateExited:
+  case eStateSuspended:
+  case eStateUnloaded:
+    stop_info = m_stop_info;
+    description = m_stop_description;
+    return true;
+
+  case eStateInvalid:
+  case eStateConnected:
+  case eStateAttaching:
+  case eStateLaunching:
+  case eStateRunning:
+  case eStateStepping:
+  case eStateDetached:
+    if (log) {
+      log->Printf("NativeThreadWindows::%s tid %" PRIu64
+                  " in state %s cannot answer stop reason",
+                  __FUNCTION__, GetID(), StateAsCString(m_state));
+    }
+    return false;
+  }
+  llvm_unreachable("unhandled StateType!");
+}
+
+Status NativeThreadWindows::SetWatchpoint(lldb::addr_t addr, size_t size,
+                                          uint32_t watch_flags, bool hardware) {
+  if (!hardware)
+    return Status("not implemented");
+  if (m_state == eStateLaunching)
+    return Status();
+  Status error = RemoveWatchpoint(addr);
+  if (error.Fail())
+    return error;
+  uint32_t wp_index =
+      m_reg_context_up->SetHardwareWatchpoint(addr, size, watch_flags);
+  if (wp_index == LLDB_INVALID_INDEX32)
+    return Status("Setting hardware watchpoint failed.");
+  m_watchpoint_index_map.insert({addr, wp_index});
+  return Status();
+}
+
+Status NativeThreadWindows::RemoveWatchpoint(lldb::addr_t addr) {
+  auto wp = m_watchpoint_index_map.find(addr);
+  if (wp == m_watchpoint_index_map.end())
+    return Status();
+  uint32_t wp_index = wp->second;
+  m_watchpoint_index_map.erase(wp);
+  if (m_reg_context_up->ClearHardwareWatchpoint(wp_index))
+    return Status();
+  return Status("Clearing hardware watchpoint failed.");
+}
+
+Status NativeThreadWindows::SetHardwareBreakpoint(lldb::addr_t addr,
+                                                  size_t size) {
+  return Status("unimplemented.");
+}
+
+Status NativeThreadWindows::RemoveHardwareBreakpoint(lldb::addr_t addr) {
+  return Status("unimplemented.");
+}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.h
new file mode 100644
index 0000000..542bf76
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/NativeThreadWindows.h
@@ -0,0 +1,70 @@
+//===-- NativeThreadWindows.h -----------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_NativeThreadWindows_h_
+#define liblldb_NativeThreadWindows_h_
+
+#include "lldb/Host/HostThread.h"
+#include "lldb/Host/common/NativeThreadProtocol.h"
+#include "lldb/lldb-private-forward.h"
+
+#include "NativeRegisterContextWindows.h"
+
+namespace lldb_private {
+
+class NativeProcessWindows;
+
+class NativeThreadWindows : public NativeThreadProtocol {
+public:
+  NativeThreadWindows(NativeProcessWindows &process, const HostThread &thread);
+
+  ~NativeThreadWindows() {}
+
+  Status DoStop();
+  Status DoResume(lldb::StateType resume_state);
+
+  std::string GetName() override;
+
+  lldb::StateType GetState() override { return m_state; }
+
+  NativeRegisterContextWindows &GetRegisterContext() override {
+    return *m_reg_context_up;
+  }
+
+  bool GetStopReason(ThreadStopInfo &stop_info,
+                     std::string &description) override;
+
+  Status SetWatchpoint(lldb::addr_t addr, size_t size, uint32_t watch_flags,
+                       bool hardware) override;
+
+  Status RemoveWatchpoint(lldb::addr_t addr) override;
+
+  Status SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
+
+  Status RemoveHardwareBreakpoint(lldb::addr_t addr) override;
+
+  void SetStopReason(ThreadStopInfo stop_info, std::string description);
+
+  const HostThread &GetHostThread() { return m_host_thread; }
+
+protected:
+  lldb::StateType m_state = lldb::StateType::eStateInvalid;
+  std::string m_name;
+  ThreadStopInfo m_stop_info;
+  std::string m_stop_description;
+  std::unique_ptr<NativeRegisterContextWindows> m_reg_context_up;
+  // Cache address and index of the watchpoints and hardware breakpoints since
+  // the register context does not.
+  using IndexMap = std::map<lldb::addr_t, uint32_t>;
+  IndexMap m_watchpoint_index_map;
+  IndexMap m_hw_breakpoint_index_map;
+  HostThread m_host_thread;
+};
+} // namespace lldb_private
+
+#endif // #ifndef liblldb_NativeThreadWindows_h_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
index 6ee882f..cd78051 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
@@ -63,6 +63,8 @@
 
 namespace lldb_private {
 
+ProcessDebugger::~ProcessDebugger() {}
+
 lldb::pid_t ProcessDebugger::GetDebuggedProcessId() const {
   if (m_session_data)
     return m_session_data->m_debugger->GetProcess().GetProcessId();
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.h
index fd0b0e5..a4db764 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.h
@@ -41,13 +41,15 @@
   HANDLE m_initial_stop_event = nullptr;
   bool m_initial_stop_received = false;
   bool m_stop_at_entry;
-  std::map<lldb::tid_t, HostThread> m_new_threads;
+  std::map<lldb::tid_t, lldb::ThreadSP> m_new_threads;
   std::set<lldb::tid_t> m_exited_threads;
 };
 
 class ProcessDebugger {
 
 public:
+  virtual ~ProcessDebugger();
+
   virtual void OnExitProcess(uint32_t exit_code);
   virtual void OnDebuggerConnected(lldb::addr_t image_base);
   virtual ExceptionResult OnDebugException(bool first_chance,
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
index 49801fe..d4e60ec 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -12,6 +12,7 @@
 #include "lldb/Host/windows/windows.h"
 #include <psapi.h>
 
+#include "lldb/Breakpoint/Watchpoint.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
@@ -80,13 +81,24 @@
   return ProcessSP(new ProcessWindows(target_sp, listener_sp));
 }
 
-void ProcessWindows::Initialize() {
-  static llvm::once_flag g_once_flag;
+static bool ShouldUseLLDBServer() {
+  llvm::StringRef use_lldb_server = ::getenv("LLDB_USE_LLDB_SERVER");
+  return use_lldb_server.equals_lower("on") ||
+         use_lldb_server.equals_lower("yes") ||
+         use_lldb_server.equals_lower("1") ||
+         use_lldb_server.equals_lower("true");
+}
 
-  llvm::call_once(g_once_flag, []() {
-    PluginManager::RegisterPlugin(GetPluginNameStatic(),
-                                  GetPluginDescriptionStatic(), CreateInstance);
-  });
+void ProcessWindows::Initialize() {
+  if (!ShouldUseLLDBServer()) {
+    static llvm::once_flag g_once_flag;
+
+    llvm::call_once(g_once_flag, []() {
+      PluginManager::RegisterPlugin(GetPluginNameStatic(),
+                                    GetPluginDescriptionStatic(),
+                                    CreateInstance);
+    });
+  }
 }
 
 void ProcessWindows::Terminate() {}
@@ -104,7 +116,10 @@
 
 ProcessWindows::ProcessWindows(lldb::TargetSP target_sp,
                                lldb::ListenerSP listener_sp)
-    : lldb_private::Process(target_sp, listener_sp) {}
+    : lldb_private::Process(target_sp, listener_sp),
+      m_watchpoint_ids(
+          RegisterContextWindows::GetNumHardwareBreakpointSlots(),
+          LLDB_INVALID_BREAK_ID) {}
 
 ProcessWindows::~ProcessWindows() {}
 
@@ -166,9 +181,9 @@
     else
       LLDB_LOG(log, "Detaching process error: {0}", error);
   } else {
-    error.SetErrorStringWithFormat("error: process {0} in state = {1}, but "
-                                   "cannot detach it in this state.",
-                                   GetID(), private_state);
+    error.SetErrorStringWithFormatv("error: process {0} in state = {1}, but "
+                                    "cannot detach it in this state.",
+                                    GetID(), private_state);
     LLDB_LOG(log, "error: {0}", error);
   }
   return error;
@@ -205,16 +220,6 @@
              m_session_data->m_debugger->GetProcess().GetProcessId(),
              GetPrivateState());
 
-    ExceptionRecordSP active_exception =
-        m_session_data->m_debugger->GetActiveException().lock();
-    if (active_exception) {
-      // Resume the process and continue processing debug events.  Mask the
-      // exception so that from the process's view, there is no indication that
-      // anything happened.
-      m_session_data->m_debugger->ContinueAsyncException(
-          ExceptionResult::MaskException);
-    }
-
     LLDB_LOG(log, "resuming {0} threads.", m_thread_list.GetSize());
 
     bool failed = false;
@@ -233,10 +238,19 @@
 
     if (failed) {
       error.SetErrorString("ProcessWindows::DoResume failed");
-      return error;
     } else {
       SetPrivateState(eStateRunning);
     }
+
+    ExceptionRecordSP active_exception =
+        m_session_data->m_debugger->GetActiveException().lock();
+    if (active_exception) {
+      // Resume the process and continue processing debug events.  Mask the
+      // exception so that from the process's view, there is no indication that
+      // anything happened.
+      m_session_data->m_debugger->ContinueAsyncException(
+          ExceptionResult::MaskException);
+    }
   } else {
     LLDB_LOG(log, "error: process {0} is in state {1}.  Returning...",
              m_session_data->m_debugger->GetProcess().GetProcessId(),
@@ -383,11 +397,35 @@
       stop_info = StopInfo::CreateStopReasonWithBreakpointSiteID(*stop_thread,
                                                                  site->GetID());
       stop_thread->SetStopInfo(stop_info);
-    } else {
-      LLDB_LOG(log, "single stepping thread {0}", stop_thread->GetID());
-      stop_info = StopInfo::CreateStopReasonToTrace(*stop_thread);
-      stop_thread->SetStopInfo(stop_info);
+
+      return;
     }
+
+    auto *reg_ctx = static_cast<RegisterContextWindows *>(
+        stop_thread->GetRegisterContext().get());
+    uint32_t slot_id = reg_ctx->GetTriggeredHardwareBreakpointSlotId();
+    if (slot_id != LLDB_INVALID_INDEX32) {
+      int id = m_watchpoint_ids[slot_id];
+      LLDB_LOG(log,
+               "Single-stepped onto a watchpoint in process {0} at address "
+               "{1:x} with watchpoint {2}",
+               m_session_data->m_debugger->GetProcess().GetProcessId(), pc, id);
+
+      if (lldb::WatchpointSP wp_sp =
+              GetTarget().GetWatchpointList().FindByID(id))
+        wp_sp->SetHardwareIndex(slot_id);
+
+      stop_info = StopInfo::CreateStopReasonWithWatchpointID(
+          *stop_thread, id, m_watchpoints[id].address);
+      stop_thread->SetStopInfo(stop_info);
+
+      return;
+    }
+
+    LLDB_LOG(log, "single stepping thread {0}", stop_thread->GetID());
+    stop_info = StopInfo::CreateStopReasonToTrace(*stop_thread);
+    stop_thread->SetStopInfo(stop_info);
+
     return;
   }
 
@@ -495,9 +533,7 @@
   // Also add all the threads that are new since the last time we broke into
   // the debugger.
   for (const auto &thread_info : m_session_data->m_new_threads) {
-    ThreadSP thread(new TargetThreadWindows(*this, thread_info.second));
-    thread->SetID(thread_info.first);
-    new_thread_list.AddThread(thread);
+    new_thread_list.AddThread(thread_info.second);
     ++new_size;
     ++new_threads;
     LLDB_LOGV(log, "Thread {0} is new since last update.", thread_info.first);
@@ -589,16 +625,7 @@
   SetProcessExitStatus(GetID(), true, 0, exit_code);
   SetPrivateState(eStateExited);
 
-  // If the process exits before any initial stop then notify the debugger 
-  // of the error otherwise WaitForDebuggerConnection() will be blocked.
-  // An example of this issue is when a process fails to load a dependent DLL. 
-  if (m_session_data && !m_session_data->m_initial_stop_received) {
-    Status error(exit_code, eErrorTypeWin32);
-    OnDebuggerError(error, 0);
-  }
-
-  // Reset the session.
-  m_session_data.reset();
+  ProcessDebugger::OnExitProcess(exit_code);
 }
 
 void ProcessWindows::OnDebuggerConnected(lldb::addr_t image_base) {
@@ -620,8 +647,8 @@
     FileSystem::Instance().Resolve(executable_file);
     ModuleSpec module_spec(executable_file);
     Status error;
-    module = GetTarget().GetOrCreateModule(module_spec, 
-                                           true /* notify */, &error);
+    module =
+        GetTarget().GetOrCreateModule(module_spec, true /* notify */, &error);
     if (!module) {
       return;
     }
@@ -637,10 +664,15 @@
   // returned from DoLaunch() / DoAttach() yet so the target may not have set
   // the process instance to `this` yet.
   llvm::sys::ScopedLock lock(m_mutex);
-  const HostThreadWindows &wmain_thread =
-      debugger->GetMainThread().GetNativeThread();
-  m_session_data->m_new_threads[wmain_thread.GetThreadId()] =
-      debugger->GetMainThread();
+
+  const HostThread &host_main_thread = debugger->GetMainThread();
+  ThreadSP main_thread =
+      std::make_shared<TargetThreadWindows>(*this, host_main_thread);
+
+  tid_t id = host_main_thread.GetNativeThread().GetThreadId();
+  main_thread->SetID(id);
+
+  m_session_data->m_new_threads[id] = main_thread;
 }
 
 ExceptionResult
@@ -712,8 +744,22 @@
 
 void ProcessWindows::OnCreateThread(const HostThread &new_thread) {
   llvm::sys::ScopedLock lock(m_mutex);
-  const HostThreadWindows &wnew_thread = new_thread.GetNativeThread();
-  m_session_data->m_new_threads[wnew_thread.GetThreadId()] = new_thread;
+
+  ThreadSP thread = std::make_shared<TargetThreadWindows>(*this, new_thread);
+
+  const HostNativeThread &native_new_thread = new_thread.GetNativeThread();
+  tid_t id = native_new_thread.GetThreadId();
+  thread->SetID(id);
+
+  m_session_data->m_new_threads[id] = thread;
+
+  for (const std::map<int, WatchpointInfo>::value_type &p : m_watchpoints) {
+    auto *reg_ctx = static_cast<RegisterContextWindows *>(
+        thread->GetRegisterContext().get());
+    reg_ctx->AddHardwareBreakpoint(p.second.slot_id, p.second.address,
+                                   p.second.size, p.second.read,
+                                   p.second.write);
+  }
 }
 
 void ProcessWindows::OnExitThread(lldb::tid_t thread_id, uint32_t exit_code) {
@@ -771,4 +817,106 @@
     return;
   }
 }
+
+Status ProcessWindows::GetWatchpointSupportInfo(uint32_t &num) {
+  num = RegisterContextWindows::GetNumHardwareBreakpointSlots();
+  return {};
+}
+
+Status ProcessWindows::GetWatchpointSupportInfo(uint32_t &num, bool &after) {
+  num = RegisterContextWindows::GetNumHardwareBreakpointSlots();
+  after = RegisterContextWindows::DoHardwareBreakpointsTriggerAfter();
+  return {};
+}
+
+Status ProcessWindows::EnableWatchpoint(Watchpoint *wp, bool notify) {
+  Status error;
+
+  if (wp->IsEnabled()) {
+    wp->SetEnabled(true, notify);
+    return error;
+  }
+
+  WatchpointInfo info;
+  for (info.slot_id = 0;
+       info.slot_id < RegisterContextWindows::GetNumHardwareBreakpointSlots();
+       info.slot_id++)
+    if (m_watchpoint_ids[info.slot_id] == LLDB_INVALID_BREAK_ID)
+      break;
+  if (info.slot_id == RegisterContextWindows::GetNumHardwareBreakpointSlots()) {
+    error.SetErrorStringWithFormat("Can't find free slot for watchpoint %i",
+                                   wp->GetID());
+    return error;
+  }
+  info.address = wp->GetLoadAddress();
+  info.size = wp->GetByteSize();
+  info.read = wp->WatchpointRead();
+  info.write = wp->WatchpointWrite();
+
+  for (unsigned i = 0U; i < m_thread_list.GetSize(); i++) {
+    Thread *thread = m_thread_list.GetThreadAtIndex(i).get();
+    auto *reg_ctx = static_cast<RegisterContextWindows *>(
+        thread->GetRegisterContext().get());
+    if (!reg_ctx->AddHardwareBreakpoint(info.slot_id, info.address, info.size,
+                                        info.read, info.write)) {
+      error.SetErrorStringWithFormat(
+          "Can't enable watchpoint %i on thread 0x%llx", wp->GetID(),
+          thread->GetID());
+      break;
+    }
+  }
+  if (error.Fail()) {
+    for (unsigned i = 0U; i < m_thread_list.GetSize(); i++) {
+      Thread *thread = m_thread_list.GetThreadAtIndex(i).get();
+      auto *reg_ctx = static_cast<RegisterContextWindows *>(
+          thread->GetRegisterContext().get());
+      reg_ctx->RemoveHardwareBreakpoint(info.slot_id);
+    }
+    return error;
+  }
+
+  m_watchpoints[wp->GetID()] = info;
+  m_watchpoint_ids[info.slot_id] = wp->GetID();
+
+  wp->SetEnabled(true, notify);
+
+  return error;
+}
+
+Status ProcessWindows::DisableWatchpoint(Watchpoint *wp, bool notify) {
+  Status error;
+
+  if (!wp->IsEnabled()) {
+    wp->SetEnabled(false, notify);
+    return error;
+  }
+
+  auto it = m_watchpoints.find(wp->GetID());
+  if (it == m_watchpoints.end()) {
+    error.SetErrorStringWithFormat("Info about watchpoint %i is not found",
+                                   wp->GetID());
+    return error;
+  }
+
+  for (unsigned i = 0U; i < m_thread_list.GetSize(); i++) {
+    Thread *thread = m_thread_list.GetThreadAtIndex(i).get();
+    auto *reg_ctx = static_cast<RegisterContextWindows *>(
+        thread->GetRegisterContext().get());
+    if (!reg_ctx->RemoveHardwareBreakpoint(it->second.slot_id)) {
+      error.SetErrorStringWithFormat(
+          "Can't disable watchpoint %i on thread 0x%llx", wp->GetID(),
+          thread->GetID());
+      break;
+    }
+  }
+  if (error.Fail())
+    return error;
+
+  m_watchpoint_ids[it->second.slot_id] = LLDB_INVALID_BREAK_ID;
+  m_watchpoints.erase(it);
+
+  wp->SetEnabled(false, notify);
+
+  return error;
+}
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
index 8d5134a..a1085df 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.h
@@ -98,6 +98,22 @@
   void OnUnloadDll(lldb::addr_t module_addr) override;
   void OnDebugString(const std::string &string) override;
   void OnDebuggerError(const Status &error, uint32_t type) override;
+
+  Status GetWatchpointSupportInfo(uint32_t &num) override;
+  Status GetWatchpointSupportInfo(uint32_t &num, bool &after) override;
+  Status EnableWatchpoint(Watchpoint *wp, bool notify = true) override;
+  Status DisableWatchpoint(Watchpoint *wp, bool notify = true) override;
+
+private:
+  struct WatchpointInfo {
+    uint32_t slot_id;
+    lldb::addr_t address;
+    uint32_t size;
+    bool read;
+    bool write;
+  };
+  std::map<lldb::break_id_t, WatchpointInfo> m_watchpoints;
+  std::vector<lldb::break_id_t> m_watchpoint_ids;
 };
 } // namespace lldb_private
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp
index 5231838..c3cb455 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp
@@ -17,6 +17,7 @@
 #include "TargetThreadWindows.h"
 
 #include "llvm/ADT/STLExtras.h"
+#include "lldb/Target/Target.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -52,13 +53,7 @@
   assert(data_sp->GetByteSize() >= sizeof(m_context));
   memcpy(&m_context, data_sp->GetBytes(), sizeof(m_context));
 
-  TargetThreadWindows &wthread = static_cast<TargetThreadWindows &>(m_thread);
-  if (!::SetThreadContext(
-          wthread.GetHostThread().GetNativeThread().GetSystemHandle(),
-          &m_context))
-    return false;
-
-  return true;
+  return ApplyAllRegisterValues();
 }
 
 uint32_t RegisterContextWindows::ConvertRegisterKindToRegisterNumber(
@@ -76,54 +71,94 @@
   return LLDB_INVALID_REGNUM;
 }
 
-// Subclasses can these functions if desired
-uint32_t RegisterContextWindows::NumSupportedHardwareBreakpoints() {
-  // Support for hardware breakpoints not yet implemented.
-  return 0;
-}
-
-uint32_t RegisterContextWindows::SetHardwareBreakpoint(lldb::addr_t addr,
-                                                       size_t size) {
-  return 0;
-}
-
-bool RegisterContextWindows::ClearHardwareBreakpoint(uint32_t hw_idx) {
-  return false;
-}
-
-uint32_t RegisterContextWindows::NumSupportedHardwareWatchpoints() {
-  // Support for hardware watchpoints not yet implemented.
-  return 0;
-}
-
-uint32_t RegisterContextWindows::SetHardwareWatchpoint(lldb::addr_t addr,
-                                                       size_t size, bool read,
-                                                       bool write) {
-  return 0;
-}
-
-bool RegisterContextWindows::ClearHardwareWatchpoint(uint32_t hw_index) {
-  return false;
-}
-
 bool RegisterContextWindows::HardwareSingleStep(bool enable) { return false; }
 
+bool RegisterContextWindows::AddHardwareBreakpoint(uint32_t slot,
+                                                   lldb::addr_t address,
+                                                   uint32_t size, bool read,
+                                                   bool write) {
+  if (slot >= NUM_HARDWARE_BREAKPOINT_SLOTS)
+    return false;
+
+  switch (size) {
+  case 1:
+  case 2:
+  case 4:
+#if defined(_WIN64)
+  case 8:
+#endif
+    break;
+  default:
+    return false;
+  }
+
+  if (!CacheAllRegisterValues())
+    return false;
+
+#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
+  unsigned shift = 2 * slot;
+  m_context.Dr7 |= 1ULL << shift;
+
+  (&m_context.Dr0)[slot] = address;
+
+  shift = 18 + 4 * slot;
+  m_context.Dr7 &= ~(3ULL << shift);
+  m_context.Dr7 |= (size == 8 ? 2ULL : size - 1) << shift;
+
+  shift = 16 + 4 * slot;
+  m_context.Dr7 &= ~(3ULL << shift);
+  m_context.Dr7 |= (read ? 3ULL : (write ? 1ULL : 0)) << shift;
+
+  return ApplyAllRegisterValues();
+
+#else
+  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
+  LLDB_LOG(log, "hardware breakpoints not currently supported on this arch");
+  return false;
+#endif
+}
+
+bool RegisterContextWindows::RemoveHardwareBreakpoint(uint32_t slot) {
+  if (slot >= NUM_HARDWARE_BREAKPOINT_SLOTS)
+    return false;
+
+  if (!CacheAllRegisterValues())
+    return false;
+
+#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
+  unsigned shift = 2 * slot;
+  m_context.Dr7 &= ~(1ULL << shift);
+
+  return ApplyAllRegisterValues();
+#else
+  return false;
+#endif
+}
+
+uint32_t RegisterContextWindows::GetTriggeredHardwareBreakpointSlotId() {
+  if (!CacheAllRegisterValues())
+    return LLDB_INVALID_INDEX32;
+
+#if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_AMD64)
+  for (unsigned i = 0UL; i < NUM_HARDWARE_BREAKPOINT_SLOTS; i++)
+    if (m_context.Dr6 & (1ULL << i))
+      return i;
+#endif
+
+  return LLDB_INVALID_INDEX32;
+}
+
 bool RegisterContextWindows::CacheAllRegisterValues() {
   Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
   if (!m_context_stale)
     return true;
 
   TargetThreadWindows &wthread = static_cast<TargetThreadWindows &>(m_thread);
-  uint8_t buffer[2048];
-  memset(buffer, 0, sizeof(buffer));
-  PCONTEXT tmpContext = NULL;
-  DWORD contextLength = (DWORD)sizeof(buffer);
-  if (!::InitializeContext(buffer, kWinContextFlags, &tmpContext,
-                           &contextLength)) {
-    return false;
-  }
-  memcpy(&m_context, tmpContext, sizeof(m_context));
-  if (!::SuspendThread(wthread.GetHostThread().GetNativeThread().GetSystemHandle())) {
+  memset(&m_context, 0, sizeof(m_context));
+  m_context.ContextFlags = kWinContextFlags;
+  if (::SuspendThread(
+          wthread.GetHostThread().GetNativeThread().GetSystemHandle()) ==
+      (DWORD)-1) {
     return false;
   }
   if (!::GetThreadContext(
@@ -135,10 +170,18 @@
         ::GetLastError());
     return false;
   }
-  if (!::ResumeThread(wthread.GetHostThread().GetNativeThread().GetSystemHandle())) {
+  if (::ResumeThread(
+          wthread.GetHostThread().GetNativeThread().GetSystemHandle()) ==
+      (DWORD)-1) {
     return false;
   }
   LLDB_LOG(log, "successfully updated the register values.");
   m_context_stale = false;
   return true;
 }
+
+bool RegisterContextWindows::ApplyAllRegisterValues() {
+  TargetThreadWindows &wthread = static_cast<TargetThreadWindows &>(m_thread);
+  return ::SetThreadContext(
+      wthread.GetHostThread().GetNativeThread().GetSystemHandle(), &m_context);
+}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.h
index 916f9f3..9ae0402 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.h
@@ -33,28 +33,28 @@
   uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind,
                                                uint32_t num) override;
 
-  // Subclasses can override these functions if desired
-  uint32_t NumSupportedHardwareBreakpoints() override;
-
-  uint32_t SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
-
-  bool ClearHardwareBreakpoint(uint32_t hw_idx) override;
-
-  uint32_t NumSupportedHardwareWatchpoints() override;
-
-  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read,
-                                 bool write) override;
-
-  bool ClearHardwareWatchpoint(uint32_t hw_index) override;
-
   bool HardwareSingleStep(bool enable) override;
 
+  static constexpr uint32_t GetNumHardwareBreakpointSlots() {
+    return NUM_HARDWARE_BREAKPOINT_SLOTS;
+  }
+  static constexpr bool DoHardwareBreakpointsTriggerAfter() { return true; }
+
+  bool AddHardwareBreakpoint(uint32_t slot, lldb::addr_t address, uint32_t size,
+                             bool read, bool write);
+  bool RemoveHardwareBreakpoint(uint32_t slot);
+
+  uint32_t GetTriggeredHardwareBreakpointSlotId();
+
 protected:
+  static constexpr unsigned NUM_HARDWARE_BREAKPOINT_SLOTS = 4;
+
   virtual bool CacheAllRegisterValues();
+  virtual bool ApplyAllRegisterValues();
 
   CONTEXT m_context;
   bool m_context_stale;
 };
-}
+} // namespace lldb_private
 
 #endif // #ifndef liblldb_RegisterContextWindows_H_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
index 0af0b56..86a302a 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
@@ -20,11 +20,14 @@
 #include "ProcessWindowsLog.h"
 #include "TargetThreadWindows.h"
 
-// TODO support _M_ARM and _M_ARM64
-#if defined(_M_AMD64)
+#if defined(__x86_64__) || defined(_M_AMD64)
 #include "x64/RegisterContextWindows_x64.h"
-#elif defined(_M_IX86)
+#elif defined(__i386__) || defined(_M_IX86)
 #include "x86/RegisterContextWindows_x86.h"
+#elif defined(__aarch64__) || defined(_M_ARM64)
+#include "arm64/RegisterContextWindows_arm64.h"
+#elif defined(__arm__) || defined(_M_ARM)
+#include "arm/RegisterContextWindows_arm.h"
 #endif
 
 using namespace lldb;
@@ -69,15 +72,25 @@
       switch (arch.GetMachine()) {
       case llvm::Triple::arm:
       case llvm::Triple::thumb:
-        LLDB_LOG(log, "debugging ARM (NT) targets is currently unsupported");
+#if defined(__arm__) || defined(_M_ARM)
+        m_thread_reg_ctx_sp.reset(
+            new RegisterContextWindows_arm(*this, concrete_frame_idx));
+#else
+        LLDB_LOG(log, "debugging foreign targets is currently unsupported");
+#endif
         break;
 
       case llvm::Triple::aarch64:
-        LLDB_LOG(log, "debugging ARM64 targets is currently unsupported");
+#if defined(__aarch64__) || defined(_M_ARM64)
+        m_thread_reg_ctx_sp.reset(
+            new RegisterContextWindows_arm64(*this, concrete_frame_idx));
+#else
+        LLDB_LOG(log, "debugging foreign targets is currently unsupported");
+#endif
         break;
 
       case llvm::Triple::x86:
-#if defined(_M_IX86)
+#if defined(__i386__) || defined(_M_IX86)
         m_thread_reg_ctx_sp.reset(
             new RegisterContextWindows_x86(*this, concrete_frame_idx));
 #else
@@ -86,7 +99,7 @@
         break;
 
       case llvm::Triple::x86_64:
-#if defined(_M_AMD64)
+#if defined(__x86_64__) || defined(_M_AMD64)
         m_thread_reg_ctx_sp.reset(
             new RegisterContextWindows_x64(*this, concrete_frame_idx));
 #else
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.cpp
new file mode 100644
index 0000000..c8bcf71
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.cpp
@@ -0,0 +1,432 @@
+//===-- RegisterContextWindows_arm.cpp --------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__arm__) || defined(_M_ARM)
+
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/windows.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "lldb/Utility/Status.h"
+#include "lldb/lldb-private-types.h"
+
+#include "RegisterContextWindows_arm.h"
+#include "TargetThreadWindows.h"
+
+#include "llvm/ADT/STLExtras.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+#define GPR_OFFSET(idx) 0
+#define FPU_OFFSET(idx) 0
+#define FPSCR_OFFSET 0
+#define EXC_OFFSET(reg) 0
+#define DBG_OFFSET_NAME(reg) 0
+
+#define DEFINE_DBG(reg, i)                                                     \
+  #reg, NULL,                                                                  \
+      0, DBG_OFFSET_NAME(reg[i]), eEncodingUint, eFormatHex,                   \
+                              {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
+                               LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
+                               LLDB_INVALID_REGNUM },                          \
+                               NULL, NULL, NULL, 0
+
+// Include RegisterInfos_arm to declare our g_register_infos_arm structure.
+#define DECLARE_REGISTER_INFOS_ARM_STRUCT
+#include "Plugins/Process/Utility/RegisterInfos_arm.h"
+#undef DECLARE_REGISTER_INFOS_ARM_STRUCT
+
+static size_t k_num_register_infos = llvm::array_lengthof(g_register_infos_arm);
+
+// Array of lldb register numbers used to define the set of all General Purpose
+// Registers
+uint32_t g_gpr_reg_indices[] = {
+    gpr_r0, gpr_r1,  gpr_r2,  gpr_r3,  gpr_r4, gpr_r5, gpr_r6, gpr_r7,   gpr_r8,
+    gpr_r9, gpr_r10, gpr_r11, gpr_r12, gpr_sp, gpr_lr, gpr_pc, gpr_cpsr,
+};
+
+uint32_t g_fpu_reg_indices[] = {
+    fpu_s0,    fpu_s1,  fpu_s2,  fpu_s3,  fpu_s4,  fpu_s5,  fpu_s6,  fpu_s7,
+    fpu_s8,    fpu_s9,  fpu_s10, fpu_s11, fpu_s12, fpu_s13, fpu_s14, fpu_s15,
+    fpu_s16,   fpu_s17, fpu_s18, fpu_s19, fpu_s20, fpu_s21, fpu_s22, fpu_s23,
+    fpu_s24,   fpu_s25, fpu_s26, fpu_s27, fpu_s28, fpu_s29, fpu_s30, fpu_s31,
+
+    fpu_d0,    fpu_d1,  fpu_d2,  fpu_d3,  fpu_d4,  fpu_d5,  fpu_d6,  fpu_d7,
+    fpu_d8,    fpu_d9,  fpu_d10, fpu_d11, fpu_d12, fpu_d13, fpu_d14, fpu_d15,
+    fpu_d16,   fpu_d17, fpu_d18, fpu_d19, fpu_d20, fpu_d21, fpu_d22, fpu_d23,
+    fpu_d24,   fpu_d25, fpu_d26, fpu_d27, fpu_d28, fpu_d29, fpu_d30, fpu_d31,
+
+    fpu_q0,    fpu_q1,  fpu_q2,  fpu_q3,  fpu_q4,  fpu_q5,  fpu_q6,  fpu_q7,
+    fpu_q8,    fpu_q9,  fpu_q10, fpu_q11, fpu_q12, fpu_q13, fpu_q14, fpu_q15,
+
+    fpu_fpscr,
+};
+
+RegisterSet g_register_sets[] = {
+    {"General Purpose Registers", "gpr",
+     llvm::array_lengthof(g_gpr_reg_indices), g_gpr_reg_indices},
+    {"Floating Point Registers", "fpu", llvm::array_lengthof(g_fpu_reg_indices),
+     g_fpu_reg_indices},
+};
+
+// Constructors and Destructors
+RegisterContextWindows_arm::RegisterContextWindows_arm(
+    Thread &thread, uint32_t concrete_frame_idx)
+    : RegisterContextWindows(thread, concrete_frame_idx) {}
+
+RegisterContextWindows_arm::~RegisterContextWindows_arm() {}
+
+size_t RegisterContextWindows_arm::GetRegisterCount() {
+  return llvm::array_lengthof(g_register_infos_arm);
+}
+
+const RegisterInfo *
+RegisterContextWindows_arm::GetRegisterInfoAtIndex(size_t reg) {
+  if (reg < k_num_register_infos)
+    return &g_register_infos_arm[reg];
+  return NULL;
+}
+
+size_t RegisterContextWindows_arm::GetRegisterSetCount() {
+  return llvm::array_lengthof(g_register_sets);
+}
+
+const RegisterSet *RegisterContextWindows_arm::GetRegisterSet(size_t reg_set) {
+  return &g_register_sets[reg_set];
+}
+
+bool RegisterContextWindows_arm::ReadRegister(const RegisterInfo *reg_info,
+                                              RegisterValue &reg_value) {
+  if (!CacheAllRegisterValues())
+    return false;
+
+  if (reg_info == nullptr)
+    return false;
+
+  const uint32_t reg = reg_info->kinds[eRegisterKindLLDB];
+
+  switch (reg) {
+  case gpr_r0:
+    reg_value.SetUInt32(m_context.R0);
+    break;
+  case gpr_r1:
+    reg_value.SetUInt32(m_context.R1);
+    break;
+  case gpr_r2:
+    reg_value.SetUInt32(m_context.R2);
+    break;
+  case gpr_r3:
+    reg_value.SetUInt32(m_context.R3);
+    break;
+  case gpr_r4:
+    reg_value.SetUInt32(m_context.R4);
+    break;
+  case gpr_r5:
+    reg_value.SetUInt32(m_context.R5);
+    break;
+  case gpr_r6:
+    reg_value.SetUInt32(m_context.R6);
+    break;
+  case gpr_r7:
+    reg_value.SetUInt32(m_context.R7);
+    break;
+  case gpr_r8:
+    reg_value.SetUInt32(m_context.R8);
+    break;
+  case gpr_r9:
+    reg_value.SetUInt32(m_context.R9);
+    break;
+  case gpr_r10:
+    reg_value.SetUInt32(m_context.R10);
+    break;
+  case gpr_r11:
+    reg_value.SetUInt32(m_context.R11);
+    break;
+  case gpr_r12:
+    reg_value.SetUInt32(m_context.R12);
+    break;
+  case gpr_sp:
+    reg_value.SetUInt32(m_context.Sp);
+    break;
+  case gpr_lr:
+    reg_value.SetUInt32(m_context.Lr);
+    break;
+  case gpr_pc:
+    reg_value.SetUInt32(m_context.Pc);
+    break;
+  case gpr_cpsr:
+    reg_value.SetUInt32(m_context.Cpsr);
+    break;
+
+  case fpu_s0:
+  case fpu_s1:
+  case fpu_s2:
+  case fpu_s3:
+  case fpu_s4:
+  case fpu_s5:
+  case fpu_s6:
+  case fpu_s7:
+  case fpu_s8:
+  case fpu_s9:
+  case fpu_s10:
+  case fpu_s11:
+  case fpu_s12:
+  case fpu_s13:
+  case fpu_s14:
+  case fpu_s15:
+  case fpu_s16:
+  case fpu_s17:
+  case fpu_s18:
+  case fpu_s19:
+  case fpu_s20:
+  case fpu_s21:
+  case fpu_s22:
+  case fpu_s23:
+  case fpu_s24:
+  case fpu_s25:
+  case fpu_s26:
+  case fpu_s27:
+  case fpu_s28:
+  case fpu_s29:
+  case fpu_s30:
+  case fpu_s31:
+    reg_value.SetUInt32(m_context.S[reg - fpu_s0], RegisterValue::eTypeFloat);
+    break;
+
+  case fpu_d0:
+  case fpu_d1:
+  case fpu_d2:
+  case fpu_d3:
+  case fpu_d4:
+  case fpu_d5:
+  case fpu_d6:
+  case fpu_d7:
+  case fpu_d8:
+  case fpu_d9:
+  case fpu_d10:
+  case fpu_d11:
+  case fpu_d12:
+  case fpu_d13:
+  case fpu_d14:
+  case fpu_d15:
+  case fpu_d16:
+  case fpu_d17:
+  case fpu_d18:
+  case fpu_d19:
+  case fpu_d20:
+  case fpu_d21:
+  case fpu_d22:
+  case fpu_d23:
+  case fpu_d24:
+  case fpu_d25:
+  case fpu_d26:
+  case fpu_d27:
+  case fpu_d28:
+  case fpu_d29:
+  case fpu_d30:
+  case fpu_d31:
+    reg_value.SetUInt64(m_context.D[reg - fpu_d0], RegisterValue::eTypeDouble);
+    break;
+
+  case fpu_q0:
+  case fpu_q1:
+  case fpu_q2:
+  case fpu_q3:
+  case fpu_q4:
+  case fpu_q5:
+  case fpu_q6:
+  case fpu_q7:
+  case fpu_q8:
+  case fpu_q9:
+  case fpu_q10:
+  case fpu_q11:
+  case fpu_q12:
+  case fpu_q13:
+  case fpu_q14:
+  case fpu_q15:
+    reg_value.SetBytes(&m_context.Q[reg - fpu_q0], reg_info->byte_size,
+                       endian::InlHostByteOrder());
+    break;
+
+  case fpu_fpscr:
+    reg_value.SetUInt32(m_context.Fpscr);
+    break;
+
+  default:
+    reg_value.SetValueToInvalid();
+    return false;
+  }
+  return true;
+}
+
+bool RegisterContextWindows_arm::WriteRegister(const RegisterInfo *reg_info,
+                                               const RegisterValue &reg_value) {
+  // Since we cannot only write a single register value to the inferior, we
+  // need to make sure our cached copy of the register values are fresh.
+  // Otherwise when writing EAX, for example, we may also overwrite some other
+  // register with a stale value.
+  if (!CacheAllRegisterValues())
+    return false;
+
+  const uint32_t reg = reg_info->kinds[eRegisterKindLLDB];
+
+  switch (reg) {
+  case gpr_r0:
+    m_context.R0 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r1:
+    m_context.R1 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r2:
+    m_context.R2 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r3:
+    m_context.R3 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r4:
+    m_context.R4 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r5:
+    m_context.R5 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r6:
+    m_context.R6 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r7:
+    m_context.R7 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r8:
+    m_context.R8 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r9:
+    m_context.R9 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r10:
+    m_context.R10 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r11:
+    m_context.R11 = reg_value.GetAsUInt32();
+    break;
+  case gpr_r12:
+    m_context.R12 = reg_value.GetAsUInt32();
+    break;
+  case gpr_sp:
+    m_context.Sp = reg_value.GetAsUInt32();
+    break;
+  case gpr_lr:
+    m_context.Lr = reg_value.GetAsUInt32();
+    break;
+  case gpr_pc:
+    m_context.Pc = reg_value.GetAsUInt32();
+    break;
+  case gpr_cpsr:
+    m_context.Cpsr = reg_value.GetAsUInt32();
+    break;
+
+  case fpu_s0:
+  case fpu_s1:
+  case fpu_s2:
+  case fpu_s3:
+  case fpu_s4:
+  case fpu_s5:
+  case fpu_s6:
+  case fpu_s7:
+  case fpu_s8:
+  case fpu_s9:
+  case fpu_s10:
+  case fpu_s11:
+  case fpu_s12:
+  case fpu_s13:
+  case fpu_s14:
+  case fpu_s15:
+  case fpu_s16:
+  case fpu_s17:
+  case fpu_s18:
+  case fpu_s19:
+  case fpu_s20:
+  case fpu_s21:
+  case fpu_s22:
+  case fpu_s23:
+  case fpu_s24:
+  case fpu_s25:
+  case fpu_s26:
+  case fpu_s27:
+  case fpu_s28:
+  case fpu_s29:
+  case fpu_s30:
+  case fpu_s31:
+    m_context.S[reg - fpu_s0] = reg_value.GetAsUInt32();
+    break;
+
+  case fpu_d0:
+  case fpu_d1:
+  case fpu_d2:
+  case fpu_d3:
+  case fpu_d4:
+  case fpu_d5:
+  case fpu_d6:
+  case fpu_d7:
+  case fpu_d8:
+  case fpu_d9:
+  case fpu_d10:
+  case fpu_d11:
+  case fpu_d12:
+  case fpu_d13:
+  case fpu_d14:
+  case fpu_d15:
+  case fpu_d16:
+  case fpu_d17:
+  case fpu_d18:
+  case fpu_d19:
+  case fpu_d20:
+  case fpu_d21:
+  case fpu_d22:
+  case fpu_d23:
+  case fpu_d24:
+  case fpu_d25:
+  case fpu_d26:
+  case fpu_d27:
+  case fpu_d28:
+  case fpu_d29:
+  case fpu_d30:
+  case fpu_d31:
+    m_context.D[reg - fpu_d0] = reg_value.GetAsUInt64();
+    break;
+
+  case fpu_q0:
+  case fpu_q1:
+  case fpu_q2:
+  case fpu_q3:
+  case fpu_q4:
+  case fpu_q5:
+  case fpu_q6:
+  case fpu_q7:
+  case fpu_q8:
+  case fpu_q9:
+  case fpu_q10:
+  case fpu_q11:
+  case fpu_q12:
+  case fpu_q13:
+  case fpu_q14:
+  case fpu_q15:
+    memcpy(&m_context.Q[reg - fpu_q0], reg_value.GetBytes(), 16);
+    break;
+
+  case fpu_fpscr:
+    m_context.Fpscr = reg_value.GetAsUInt32();
+    break;
+
+  default:
+    return false;
+  }
+
+  // Physically update the registers in the target process.
+  return ApplyAllRegisterValues();
+}
+
+#endif // defined(__arm__) || defined(_M_ARM)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.h
new file mode 100644
index 0000000..5705067
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm/RegisterContextWindows_arm.h
@@ -0,0 +1,47 @@
+//===-- RegisterContextWindows_arm.h ----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_RegisterContextWindows_arm_H_
+#define liblldb_RegisterContextWindows_arm_H_
+
+#if defined(__arm__) || defined(_M_ARM)
+
+#include "RegisterContextWindows.h"
+#include "lldb/lldb-forward.h"
+
+namespace lldb_private {
+
+class Thread;
+
+class RegisterContextWindows_arm : public RegisterContextWindows {
+public:
+  // Constructors and Destructors
+  RegisterContextWindows_arm(Thread &thread, uint32_t concrete_frame_idx);
+
+  virtual ~RegisterContextWindows_arm();
+
+  // Subclasses must override these functions
+  size_t GetRegisterCount() override;
+
+  const RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
+
+  size_t GetRegisterSetCount() override;
+
+  const RegisterSet *GetRegisterSet(size_t reg_set) override;
+
+  bool ReadRegister(const RegisterInfo *reg_info,
+                    RegisterValue &reg_value) override;
+
+  bool WriteRegister(const RegisterInfo *reg_info,
+                     const RegisterValue &reg_value) override;
+};
+} // namespace lldb_private
+
+#endif // defined(__arm__) || defined(_M_ARM)
+
+#endif // #ifndef liblldb_RegisterContextWindows_arm_H_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.cpp
new file mode 100644
index 0000000..4021ca1
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.cpp
@@ -0,0 +1,442 @@
+//===-- RegisterContextWindows_arm64.cpp ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__aarch64__) || defined(_M_ARM64)
+
+#include "lldb/Host/windows/HostThreadWindows.h"
+#include "lldb/Host/windows/windows.h"
+#include "lldb/Utility/RegisterValue.h"
+#include "lldb/Utility/Status.h"
+#include "lldb/lldb-private-types.h"
+
+#include "RegisterContextWindows_arm64.h"
+#include "TargetThreadWindows.h"
+
+#include "llvm/ADT/STLExtras.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+#define GPR_OFFSET(idx) 0
+#define GPR_OFFSET_NAME(reg) 0
+
+#define FPU_OFFSET(idx) 0
+#define FPU_OFFSET_NAME(reg) 0
+
+#define EXC_OFFSET_NAME(reg) 0
+#define DBG_OFFSET_NAME(reg) 0
+
+#define DEFINE_DBG(reg, i)                                                     \
+  #reg, NULL,                                                                  \
+      0, DBG_OFFSET_NAME(reg[i]), eEncodingUint, eFormatHex,                   \
+                              {LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
+                               LLDB_INVALID_REGNUM, LLDB_INVALID_REGNUM,       \
+                               LLDB_INVALID_REGNUM },                          \
+                               NULL, NULL, NULL, 0
+
+// Include RegisterInfos_arm64 to declare our g_register_infos_arm64 structure.
+#define DECLARE_REGISTER_INFOS_ARM64_STRUCT
+#include "Plugins/Process/Utility/RegisterInfos_arm64.h"
+#undef DECLARE_REGISTER_INFOS_ARM64_STRUCT
+
+static size_t k_num_register_infos =
+    llvm::array_lengthof(g_register_infos_arm64_le);
+
+// Array of lldb register numbers used to define the set of all General Purpose
+// Registers
+uint32_t g_gpr_reg_indices[] = {
+    gpr_x0,  gpr_x1,   gpr_x2,  gpr_x3,  gpr_x4,  gpr_x5,  gpr_x6,  gpr_x7,
+    gpr_x8,  gpr_x9,   gpr_x10, gpr_x11, gpr_x12, gpr_x13, gpr_x14, gpr_x15,
+    gpr_x16, gpr_x17,  gpr_x18, gpr_x19, gpr_x20, gpr_x21, gpr_x22, gpr_x23,
+    gpr_x24, gpr_x25,  gpr_x26, gpr_x27, gpr_x28, gpr_fp,  gpr_lr,  gpr_sp,
+    gpr_pc,  gpr_cpsr,
+
+    gpr_w0,  gpr_w1,   gpr_w2,  gpr_w3,  gpr_w4,  gpr_w5,  gpr_w6,  gpr_w7,
+    gpr_w8,  gpr_w9,   gpr_w10, gpr_w11, gpr_w12, gpr_w13, gpr_w14, gpr_w15,
+    gpr_w16, gpr_w17,  gpr_w18, gpr_w19, gpr_w20, gpr_w21, gpr_w22, gpr_w23,
+    gpr_w24, gpr_w25,  gpr_w26, gpr_w27, gpr_w28,
+};
+
+uint32_t g_fpu_reg_indices[] = {
+    fpu_v0,   fpu_v1,   fpu_v2,  fpu_v3,  fpu_v4,  fpu_v5,  fpu_v6,  fpu_v7,
+    fpu_v8,   fpu_v9,   fpu_v10, fpu_v11, fpu_v12, fpu_v13, fpu_v14, fpu_v15,
+    fpu_v16,  fpu_v17,  fpu_v18, fpu_v19, fpu_v20, fpu_v21, fpu_v22, fpu_v23,
+    fpu_v24,  fpu_v25,  fpu_v26, fpu_v27, fpu_v28, fpu_v29, fpu_v30, fpu_v31,
+
+    fpu_s0,   fpu_s1,   fpu_s2,  fpu_s3,  fpu_s4,  fpu_s5,  fpu_s6,  fpu_s7,
+    fpu_s8,   fpu_s9,   fpu_s10, fpu_s11, fpu_s12, fpu_s13, fpu_s14, fpu_s15,
+    fpu_s16,  fpu_s17,  fpu_s18, fpu_s19, fpu_s20, fpu_s21, fpu_s22, fpu_s23,
+    fpu_s24,  fpu_s25,  fpu_s26, fpu_s27, fpu_s28, fpu_s29, fpu_s30, fpu_s31,
+
+    fpu_d0,   fpu_d1,   fpu_d2,  fpu_d3,  fpu_d4,  fpu_d5,  fpu_d6,  fpu_d7,
+    fpu_d8,   fpu_d9,   fpu_d10, fpu_d11, fpu_d12, fpu_d13, fpu_d14, fpu_d15,
+    fpu_d16,  fpu_d17,  fpu_d18, fpu_d19, fpu_d20, fpu_d21, fpu_d22, fpu_d23,
+    fpu_d24,  fpu_d25,  fpu_d26, fpu_d27, fpu_d28, fpu_d29, fpu_d30, fpu_d31,
+
+    fpu_fpsr, fpu_fpcr,
+};
+
+RegisterSet g_register_sets[] = {
+    {"General Purpose Registers", "gpr",
+     llvm::array_lengthof(g_gpr_reg_indices), g_gpr_reg_indices},
+    {"Floating Point Registers", "fpu", llvm::array_lengthof(g_fpu_reg_indices),
+     g_fpu_reg_indices},
+};
+
+// Constructors and Destructors
+RegisterContextWindows_arm64::RegisterContextWindows_arm64(
+    Thread &thread, uint32_t concrete_frame_idx)
+    : RegisterContextWindows(thread, concrete_frame_idx) {}
+
+RegisterContextWindows_arm64::~RegisterContextWindows_arm64() {}
+
+size_t RegisterContextWindows_arm64::GetRegisterCount() {
+  return llvm::array_lengthof(g_register_infos_arm64_le);
+}
+
+const RegisterInfo *
+RegisterContextWindows_arm64::GetRegisterInfoAtIndex(size_t reg) {
+  if (reg < k_num_register_infos)
+    return &g_register_infos_arm64_le[reg];
+  return NULL;
+}
+
+size_t RegisterContextWindows_arm64::GetRegisterSetCount() {
+  return llvm::array_lengthof(g_register_sets);
+}
+
+const RegisterSet *
+RegisterContextWindows_arm64::GetRegisterSet(size_t reg_set) {
+  return &g_register_sets[reg_set];
+}
+
+bool RegisterContextWindows_arm64::ReadRegister(const RegisterInfo *reg_info,
+                                                RegisterValue &reg_value) {
+  if (!CacheAllRegisterValues())
+    return false;
+
+  if (reg_info == nullptr)
+    return false;
+
+  const uint32_t reg = reg_info->kinds[eRegisterKindLLDB];
+
+  switch (reg) {
+  case gpr_x0:
+  case gpr_x1:
+  case gpr_x2:
+  case gpr_x3:
+  case gpr_x4:
+  case gpr_x5:
+  case gpr_x6:
+  case gpr_x7:
+  case gpr_x8:
+  case gpr_x9:
+  case gpr_x10:
+  case gpr_x11:
+  case gpr_x12:
+  case gpr_x13:
+  case gpr_x14:
+  case gpr_x15:
+  case gpr_x16:
+  case gpr_x17:
+  case gpr_x18:
+  case gpr_x19:
+  case gpr_x20:
+  case gpr_x21:
+  case gpr_x22:
+  case gpr_x23:
+  case gpr_x24:
+  case gpr_x25:
+  case gpr_x26:
+  case gpr_x27:
+  case gpr_x28:
+    reg_value.SetUInt64(m_context.X[reg - gpr_x0]);
+    break;
+
+  case gpr_fp:
+    reg_value.SetUInt64(m_context.Fp);
+    break;
+  case gpr_sp:
+    reg_value.SetUInt64(m_context.Sp);
+    break;
+  case gpr_lr:
+    reg_value.SetUInt64(m_context.Lr);
+    break;
+  case gpr_pc:
+    reg_value.SetUInt64(m_context.Pc);
+    break;
+  case gpr_cpsr:
+    reg_value.SetUInt64(m_context.Cpsr);
+    break;
+
+  case gpr_w0:
+  case gpr_w1:
+  case gpr_w2:
+  case gpr_w3:
+  case gpr_w4:
+  case gpr_w5:
+  case gpr_w6:
+  case gpr_w7:
+  case gpr_w8:
+  case gpr_w9:
+  case gpr_w10:
+  case gpr_w11:
+  case gpr_w12:
+  case gpr_w13:
+  case gpr_w14:
+  case gpr_w15:
+  case gpr_w16:
+  case gpr_w17:
+  case gpr_w18:
+  case gpr_w19:
+  case gpr_w20:
+  case gpr_w21:
+  case gpr_w22:
+  case gpr_w23:
+  case gpr_w24:
+  case gpr_w25:
+  case gpr_w26:
+  case gpr_w27:
+  case gpr_w28:
+    reg_value.SetUInt32(
+        static_cast<uint32_t>(m_context.X[reg - gpr_w0] & 0xffffffff));
+    break;
+
+  case fpu_v0:
+  case fpu_v1:
+  case fpu_v2:
+  case fpu_v3:
+  case fpu_v4:
+  case fpu_v5:
+  case fpu_v6:
+  case fpu_v7:
+  case fpu_v8:
+  case fpu_v9:
+  case fpu_v10:
+  case fpu_v11:
+  case fpu_v12:
+  case fpu_v13:
+  case fpu_v14:
+  case fpu_v15:
+  case fpu_v16:
+  case fpu_v17:
+  case fpu_v18:
+  case fpu_v19:
+  case fpu_v20:
+  case fpu_v21:
+  case fpu_v22:
+  case fpu_v23:
+  case fpu_v24:
+  case fpu_v25:
+  case fpu_v26:
+  case fpu_v27:
+  case fpu_v28:
+  case fpu_v29:
+  case fpu_v30:
+  case fpu_v31:
+    reg_value.SetBytes(m_context.V[reg - fpu_v0].B, reg_info->byte_size,
+                       endian::InlHostByteOrder());
+    break;
+
+  case fpu_s0:
+  case fpu_s1:
+  case fpu_s2:
+  case fpu_s3:
+  case fpu_s4:
+  case fpu_s5:
+  case fpu_s6:
+  case fpu_s7:
+  case fpu_s8:
+  case fpu_s9:
+  case fpu_s10:
+  case fpu_s11:
+  case fpu_s12:
+  case fpu_s13:
+  case fpu_s14:
+  case fpu_s15:
+  case fpu_s16:
+  case fpu_s17:
+  case fpu_s18:
+  case fpu_s19:
+  case fpu_s20:
+  case fpu_s21:
+  case fpu_s22:
+  case fpu_s23:
+  case fpu_s24:
+  case fpu_s25:
+  case fpu_s26:
+  case fpu_s27:
+  case fpu_s28:
+  case fpu_s29:
+  case fpu_s30:
+  case fpu_s31:
+    reg_value.SetFloat(m_context.V[reg - fpu_s0].S[0]);
+    break;
+
+  case fpu_d0:
+  case fpu_d1:
+  case fpu_d2:
+  case fpu_d3:
+  case fpu_d4:
+  case fpu_d5:
+  case fpu_d6:
+  case fpu_d7:
+  case fpu_d8:
+  case fpu_d9:
+  case fpu_d10:
+  case fpu_d11:
+  case fpu_d12:
+  case fpu_d13:
+  case fpu_d14:
+  case fpu_d15:
+  case fpu_d16:
+  case fpu_d17:
+  case fpu_d18:
+  case fpu_d19:
+  case fpu_d20:
+  case fpu_d21:
+  case fpu_d22:
+  case fpu_d23:
+  case fpu_d24:
+  case fpu_d25:
+  case fpu_d26:
+  case fpu_d27:
+  case fpu_d28:
+  case fpu_d29:
+  case fpu_d30:
+  case fpu_d31:
+    reg_value.SetDouble(m_context.V[reg - fpu_d0].D[0]);
+    break;
+
+  case fpu_fpsr:
+    reg_value.SetUInt32(m_context.Fpsr);
+    break;
+
+  case fpu_fpcr:
+    reg_value.SetUInt32(m_context.Fpcr);
+    break;
+
+  default:
+    reg_value.SetValueToInvalid();
+    return false;
+  }
+  return true;
+}
+
+bool RegisterContextWindows_arm64::WriteRegister(
+    const RegisterInfo *reg_info, const RegisterValue &reg_value) {
+  // Since we cannot only write a single register value to the inferior, we
+  // need to make sure our cached copy of the register values are fresh.
+  // Otherwise when writing one register, we may also overwrite some other
+  // register with a stale value.
+  if (!CacheAllRegisterValues())
+    return false;
+
+  const uint32_t reg = reg_info->kinds[eRegisterKindLLDB];
+
+  switch (reg) {
+  case gpr_x0:
+  case gpr_x1:
+  case gpr_x2:
+  case gpr_x3:
+  case gpr_x4:
+  case gpr_x5:
+  case gpr_x6:
+  case gpr_x7:
+  case gpr_x8:
+  case gpr_x9:
+  case gpr_x10:
+  case gpr_x11:
+  case gpr_x12:
+  case gpr_x13:
+  case gpr_x14:
+  case gpr_x15:
+  case gpr_x16:
+  case gpr_x17:
+  case gpr_x18:
+  case gpr_x19:
+  case gpr_x20:
+  case gpr_x21:
+  case gpr_x22:
+  case gpr_x23:
+  case gpr_x24:
+  case gpr_x25:
+  case gpr_x26:
+  case gpr_x27:
+  case gpr_x28:
+    m_context.X[reg - gpr_x0] = reg_value.GetAsUInt64();
+    break;
+
+  case gpr_fp:
+    m_context.Fp = reg_value.GetAsUInt64();
+    break;
+  case gpr_sp:
+    m_context.Sp = reg_value.GetAsUInt64();
+    break;
+  case gpr_lr:
+    m_context.Lr = reg_value.GetAsUInt64();
+    break;
+  case gpr_pc:
+    m_context.Pc = reg_value.GetAsUInt64();
+    break;
+  case gpr_cpsr:
+    m_context.Cpsr = reg_value.GetAsUInt64();
+    break;
+
+  case fpu_v0:
+  case fpu_v1:
+  case fpu_v2:
+  case fpu_v3:
+  case fpu_v4:
+  case fpu_v5:
+  case fpu_v6:
+  case fpu_v7:
+  case fpu_v8:
+  case fpu_v9:
+  case fpu_v10:
+  case fpu_v11:
+  case fpu_v12:
+  case fpu_v13:
+  case fpu_v14:
+  case fpu_v15:
+  case fpu_v16:
+  case fpu_v17:
+  case fpu_v18:
+  case fpu_v19:
+  case fpu_v20:
+  case fpu_v21:
+  case fpu_v22:
+  case fpu_v23:
+  case fpu_v24:
+  case fpu_v25:
+  case fpu_v26:
+  case fpu_v27:
+  case fpu_v28:
+  case fpu_v29:
+  case fpu_v30:
+  case fpu_v31:
+    memcpy(m_context.V[reg - fpu_v0].B, reg_value.GetBytes(), 16);
+    break;
+
+  case fpu_fpsr:
+    m_context.Fpsr = reg_value.GetAsUInt32();
+    break;
+
+  case fpu_fpcr:
+    m_context.Fpcr = reg_value.GetAsUInt32();
+    break;
+
+  default:
+    return false;
+  }
+
+  // Physically update the registers in the target process.
+  return ApplyAllRegisterValues();
+}
+
+#endif // defined(__aarch64__) || defined(_M_ARM64)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.h
new file mode 100644
index 0000000..92380ee
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/arm64/RegisterContextWindows_arm64.h
@@ -0,0 +1,47 @@
+//===-- RegisterContextWindows_arm64.h --------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_RegisterContextWindows_arm64_H_
+#define liblldb_RegisterContextWindows_arm64_H_
+
+#if defined(__aarch64__) || defined(_M_ARM64)
+
+#include "RegisterContextWindows.h"
+#include "lldb/lldb-forward.h"
+
+namespace lldb_private {
+
+class Thread;
+
+class RegisterContextWindows_arm64 : public RegisterContextWindows {
+public:
+  // Constructors and Destructors
+  RegisterContextWindows_arm64(Thread &thread, uint32_t concrete_frame_idx);
+
+  virtual ~RegisterContextWindows_arm64();
+
+  // Subclasses must override these functions
+  size_t GetRegisterCount() override;
+
+  const RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
+
+  size_t GetRegisterSetCount() override;
+
+  const RegisterSet *GetRegisterSet(size_t reg_set) override;
+
+  bool ReadRegister(const RegisterInfo *reg_info,
+                    RegisterValue &reg_value) override;
+
+  bool WriteRegister(const RegisterInfo *reg_info,
+                     const RegisterValue &reg_value) override;
+};
+} // namespace lldb_private
+
+#endif // defined(__aarch64__) || defined(_M_ARM64)
+
+#endif // #ifndef liblldb_RegisterContextWindows_arm64_H_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
index 11f72c0..fc59d09 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)
+#if defined(__x86_64__) || defined(_M_X64)
 
 #include "lldb/Host/windows/HostThreadWindows.h"
 #include "lldb/Host/windows/windows.h"
@@ -532,9 +532,7 @@
   }
 
   // Physically update the registers in the target process.
-  TargetThreadWindows &wthread = static_cast<TargetThreadWindows &>(m_thread);
-  return ::SetThreadContext(
-      wthread.GetHostThread().GetNativeThread().GetSystemHandle(), &m_context);
+  return ApplyAllRegisterValues();
 }
 
-#endif // defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)
+#endif // defined(__x86_64__) || defined(_M_X64)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h
index 20d2cb9..99901ce 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h
@@ -9,7 +9,7 @@
 #ifndef liblldb_RegisterContextWindows_x64_H_
 #define liblldb_RegisterContextWindows_x64_H_
 
-#if defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)
+#if defined(__x86_64__) || defined(_M_X64)
 
 #include "RegisterContextWindows.h"
 #include "lldb/lldb-forward.h"
@@ -42,6 +42,6 @@
 };
 }
 
-#endif // defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)
+#endif // defined(__x86_64__) || defined(_M_X64)
 
 #endif // #ifndef liblldb_RegisterContextWindows_x64_H_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
index b8f7bb4..2a271ac 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
@@ -267,9 +267,7 @@
   }
 
   // Physically update the registers in the target process.
-  TargetThreadWindows &wthread = static_cast<TargetThreadWindows &>(m_thread);
-  return ::SetThreadContext(
-      wthread.GetHostThread().GetNativeThread().GetSystemHandle(), &m_context);
+  return ApplyAllRegisterValues();
 }
 
 bool RegisterContextWindows_x86::ReadRegisterHelper(
diff --git a/src/llvm-project/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/src/llvm-project/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
index 980169e..ab23589 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -33,6 +33,7 @@
 #include "ThreadElfCore.h"
 
 using namespace lldb_private;
+namespace ELF = llvm::ELF;
 
 ConstString ProcessElfCore::GetPluginNameStatic() {
   static ConstString g_name("elf-core");
@@ -117,16 +118,20 @@
   FileRange file_range(header.p_offset, header.p_filesz);
   VMRangeToFileOffset::Entry range_entry(addr, header.p_memsz, file_range);
 
-  VMRangeToFileOffset::Entry *last_entry = m_core_aranges.Back();
-  if (last_entry && last_entry->GetRangeEnd() == range_entry.GetRangeBase() &&
-      last_entry->data.GetRangeEnd() == range_entry.data.GetRangeBase() &&
-      last_entry->GetByteSize() == last_entry->data.GetByteSize()) {
-    last_entry->SetRangeEnd(range_entry.GetRangeEnd());
-    last_entry->data.SetRangeEnd(range_entry.data.GetRangeEnd());
-  } else {
-    m_core_aranges.Append(range_entry);
+  // Only add to m_core_aranges if the file size is non zero. Some core files
+  // have PT_LOAD segments for all address ranges, but set f_filesz to zero for
+  // the .text sections since they can be retrieved from the object files.
+  if (header.p_filesz > 0) {
+    VMRangeToFileOffset::Entry *last_entry = m_core_aranges.Back();
+    if (last_entry && last_entry->GetRangeEnd() == range_entry.GetRangeBase() &&
+        last_entry->data.GetRangeEnd() == range_entry.data.GetRangeBase() &&
+        last_entry->GetByteSize() == last_entry->data.GetByteSize()) {
+      last_entry->SetRangeEnd(range_entry.GetRangeEnd());
+      last_entry->data.SetRangeEnd(range_entry.data.GetRangeEnd());
+    } else {
+      m_core_aranges.Append(range_entry);
+    }
   }
-
   // Keep a separate map of permissions that that isn't coalesced so all ranges
   // are maintained.
   const uint32_t permissions =
@@ -417,7 +422,7 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
   if (log) {
     if (pr_version > 1)
-      log->Printf("FreeBSD PRSTATUS unexpected version %d", pr_version);
+      LLDB_LOGF(log, "FreeBSD PRSTATUS unexpected version %d", pr_version);
   }
 
   // Skip padding, pr_statussz, pr_gregsetsz, pr_fpregsetsz, pr_osreldate
@@ -521,8 +526,8 @@
     if (note.info.n_name != "FreeBSD")
       continue;
 
-    if ((note.info.n_type == FREEBSD::NT_PRSTATUS && have_prstatus) ||
-        (note.info.n_type == FREEBSD::NT_PRPSINFO && have_prpsinfo)) {
+    if ((note.info.n_type == ELF::NT_PRSTATUS && have_prstatus) ||
+        (note.info.n_type == ELF::NT_PRPSINFO && have_prpsinfo)) {
       assert(thread_data.gpregset.GetByteSize() > 0);
       // Add the new thread to thread list
       m_thread_data.push_back(thread_data);
@@ -532,19 +537,19 @@
     }
 
     switch (note.info.n_type) {
-    case FREEBSD::NT_PRSTATUS:
+    case ELF::NT_PRSTATUS:
       have_prstatus = true;
       ParseFreeBSDPrStatus(thread_data, note.data, GetArchitecture());
       break;
-    case FREEBSD::NT_PRPSINFO:
+    case ELF::NT_PRPSINFO:
       have_prpsinfo = true;
       break;
-    case FREEBSD::NT_THRMISC: {
+    case ELF::NT_FREEBSD_THRMISC: {
       lldb::offset_t offset = 0;
       thread_data.name = note.data.GetCStr(&offset, 20);
       break;
     }
-    case FREEBSD::NT_PROCSTAT_AUXV:
+    case ELF::NT_FREEBSD_PROCSTAT_AUXV:
       // FIXME: FreeBSD sticks an int at the beginning of the note
       m_auxv = DataExtractor(note.data, 4, note.data.GetByteSize() - 4);
       break;
@@ -771,8 +776,8 @@
     if (note.info.n_name != "CORE" && note.info.n_name != "LINUX")
       continue;
 
-    if ((note.info.n_type == LINUX::NT_PRSTATUS && have_prstatus) ||
-        (note.info.n_type == LINUX::NT_PRPSINFO && have_prpsinfo)) {
+    if ((note.info.n_type == ELF::NT_PRSTATUS && have_prstatus) ||
+        (note.info.n_type == ELF::NT_PRPSINFO && have_prpsinfo)) {
       assert(thread_data.gpregset.GetByteSize() > 0);
       // Add the new thread to thread list
       m_thread_data.push_back(thread_data);
@@ -782,7 +787,7 @@
     }
 
     switch (note.info.n_type) {
-    case LINUX::NT_PRSTATUS: {
+    case ELF::NT_PRSTATUS: {
       have_prstatus = true;
       ELFLinuxPrStatus prstatus;
       Status status = prstatus.Parse(note.data, arch);
@@ -795,7 +800,7 @@
       thread_data.gpregset = DataExtractor(note.data, header_size, len);
       break;
     }
-    case LINUX::NT_PRPSINFO: {
+    case ELF::NT_PRPSINFO: {
       have_prpsinfo = true;
       ELFLinuxPrPsInfo prpsinfo;
       Status status = prpsinfo.Parse(note.data, arch);
@@ -805,7 +810,7 @@
       SetID(prpsinfo.pr_pid);
       break;
     }
-    case LINUX::NT_SIGINFO: {
+    case ELF::NT_SIGINFO: {
       ELFLinuxSigInfo siginfo;
       Status status = siginfo.Parse(note.data, arch);
       if (status.Fail())
@@ -813,7 +818,7 @@
       thread_data.signo = siginfo.si_signo;
       break;
     }
-    case LINUX::NT_FILE: {
+    case ELF::NT_FILE: {
       m_nt_file_entries.clear();
       lldb::offset_t offset = 0;
       const uint64_t count = note.data.GetAddress(&offset);
@@ -832,7 +837,7 @@
       }
       break;
     }
-    case LINUX::NT_AUXV:
+    case ELF::NT_AUXV:
       m_auxv = note.data;
       break;
     default:
diff --git a/src/llvm-project/lldb/source/Plugins/Process/elf-core/RegisterUtilities.h b/src/llvm-project/lldb/source/Plugins/Process/elf-core/RegisterUtilities.h
index d3b3373..49ad425 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/elf-core/RegisterUtilities.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/elf-core/RegisterUtilities.h
@@ -11,21 +11,11 @@
 
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
 #include "lldb/Utility/DataExtractor.h"
+#include "llvm/BinaryFormat/ELF.h"
 
 namespace lldb_private {
 /// Core files PT_NOTE segment descriptor types
 
-namespace FREEBSD {
-enum {
-  NT_PRSTATUS = 1,
-  NT_FPREGSET,
-  NT_PRPSINFO,
-  NT_THRMISC = 7,
-  NT_PROCSTAT_AUXV = 16,
-  NT_PPC_VMX = 0x100
-};
-}
-
 namespace NETBSD {
 enum { NT_PROCINFO = 1, NT_AUXV = 2 };
 
@@ -76,22 +66,6 @@
 };
 }
 
-namespace LINUX {
-enum {
-  NT_PRSTATUS = 1,
-  NT_FPREGSET,
-  NT_PRPSINFO,
-  NT_TASKSTRUCT,
-  NT_PLATFORM,
-  NT_AUXV,
-  NT_FILE = 0x46494c45,
-  NT_SIGINFO = 0x53494749,
-  NT_PPC_VMX = 0x100,
-  NT_PPC_VSX = 0x102,
-  NT_PRXFPREG = 0x46e62b7f,
-};
-}
-
 struct CoreNote {
   ELFNote info;
   DataExtractor data;
@@ -122,24 +96,24 @@
                         llvm::ArrayRef<RegsetDesc> RegsetDescs);
 
 constexpr RegsetDesc FPR_Desc[] = {
-    {llvm::Triple::FreeBSD, llvm::Triple::UnknownArch, FREEBSD::NT_FPREGSET},
+    {llvm::Triple::FreeBSD, llvm::Triple::UnknownArch, llvm::ELF::NT_FPREGSET},
     // In a i386 core file NT_FPREGSET is present, but it's not the result
     // of the FXSAVE instruction like in 64 bit files.
     // The result from FXSAVE is in NT_PRXFPREG for i386 core files
-    {llvm::Triple::Linux, llvm::Triple::x86, LINUX::NT_PRXFPREG},
-    {llvm::Triple::Linux, llvm::Triple::UnknownArch, LINUX::NT_FPREGSET},
+    {llvm::Triple::Linux, llvm::Triple::x86, llvm::ELF::NT_PRXFPREG},
+    {llvm::Triple::Linux, llvm::Triple::UnknownArch, llvm::ELF::NT_FPREGSET},
     {llvm::Triple::NetBSD, llvm::Triple::aarch64, NETBSD::AARCH64::NT_FPREGS},
     {llvm::Triple::NetBSD, llvm::Triple::x86_64, NETBSD::AMD64::NT_FPREGS},
     {llvm::Triple::OpenBSD, llvm::Triple::UnknownArch, OPENBSD::NT_FPREGS},
 };
 
 constexpr RegsetDesc PPC_VMX_Desc[] = {
-    {llvm::Triple::FreeBSD, llvm::Triple::UnknownArch, FREEBSD::NT_PPC_VMX},
-    {llvm::Triple::Linux, llvm::Triple::UnknownArch, LINUX::NT_PPC_VMX},
+    {llvm::Triple::FreeBSD, llvm::Triple::UnknownArch, llvm::ELF::NT_PPC_VMX},
+    {llvm::Triple::Linux, llvm::Triple::UnknownArch, llvm::ELF::NT_PPC_VMX},
 };
 
 constexpr RegsetDesc PPC_VSX_Desc[] = {
-    {llvm::Triple::Linux, llvm::Triple::UnknownArch, LINUX::NT_PPC_VSX},
+    {llvm::Triple::Linux, llvm::Triple::UnknownArch, llvm::ELF::NT_PPC_VSX},
 };
 
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp b/src/llvm-project/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
index a5d1fc4..508c8a3 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp
@@ -181,9 +181,8 @@
     }
 
     if (!reg_interface) {
-      if (log)
-        log->Printf("elf-core::%s:: Architecture(%d) or OS(%d) not supported",
-                    __FUNCTION__, arch.GetMachine(), arch.GetTriple().getOS());
+      LLDB_LOGF(log, "elf-core::%s:: Architecture(%d) or OS(%d) not supported",
+                __FUNCTION__, arch.GetMachine(), arch.GetTriple().getOS());
       assert(false && "Architecture or OS not supported");
     }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
index 4eb5291..477f224 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(ProcessGDBRemoteProperties.inc -gen-lldb-property-defs
+  SOURCE ProcessGDBRemoteProperties.td
+  TARGET LLDBPluginProcessGDBRemotePropertiesGen)
+
+lldb_tablegen(ProcessGDBRemotePropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE ProcessGDBRemoteProperties.td
+  TARGET LLDBPluginProcessGDBRemotePropertiesEnumGen)
+
 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   include_directories(${LIBXML2_INCLUDE_DIR})
 endif()
@@ -40,3 +48,7 @@
   LINK_COMPONENTS
     Support
   )
+
+add_dependencies(lldbPluginProcessGDBRemote
+  LLDBPluginProcessGDBRemotePropertiesGen
+  LLDBPluginProcessGDBRemotePropertiesEnumGen)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
index fe7ef6b..064bbde 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
@@ -63,18 +63,16 @@
     case PacketResult::Success:
       break;
     default:
-      if (log)
-        log->Printf("GDBRemoteClientBase::%s () ReadPacket(...) => false",
-                    __FUNCTION__);
+      LLDB_LOGF(log, "GDBRemoteClientBase::%s () ReadPacket(...) => false",
+                __FUNCTION__);
       return eStateInvalid;
     }
     if (response.Empty())
       return eStateInvalid;
 
     const char stop_type = response.GetChar();
-    if (log)
-      log->Printf("GDBRemoteClientBase::%s () got packet: %s", __FUNCTION__,
-                  response.GetStringRef().c_str());
+    LLDB_LOGF(log, "GDBRemoteClientBase::%s () got packet: %s", __FUNCTION__,
+              response.GetStringRef().data());
 
     switch (stop_type) {
     case 'W':
@@ -84,9 +82,8 @@
       // ERROR
       return eStateInvalid;
     default:
-      if (log)
-        log->Printf("GDBRemoteClientBase::%s () unrecognized async packet",
-                    __FUNCTION__);
+      LLDB_LOGF(log, "GDBRemoteClientBase::%s () unrecognized async packet",
+                __FUNCTION__);
       return eStateInvalid;
     case 'O': {
       std::string inferior_stdout;
@@ -162,10 +159,10 @@
   if (!lock) {
     if (Log *log =
             ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS))
-      log->Printf("GDBRemoteClientBase::%s failed to get mutex, not sending "
-                  "packet '%.*s' (send_async=%d)",
-                  __FUNCTION__, int(payload.size()), payload.data(),
-                  send_async);
+      LLDB_LOGF(log,
+                "GDBRemoteClientBase::%s failed to get mutex, not sending "
+                "packet '%.*s' (send_async=%d)",
+                __FUNCTION__, int(payload.size()), payload.data(), send_async);
     return PacketResult::ErrorSendFailed;
   }
 
@@ -181,10 +178,10 @@
   if (!lock) {
     if (Log *log =
             ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS))
-      log->Printf("GDBRemoteClientBase::%s failed to get mutex, not sending "
-                  "packet '%.*s' (send_async=%d)",
-                  __FUNCTION__, int(payload.size()), payload.data(),
-                  send_async);
+      LLDB_LOGF(log,
+                "GDBRemoteClientBase::%s failed to get mutex, not sending "
+                "packet '%.*s' (send_async=%d)",
+                __FUNCTION__, int(payload.size()), payload.data(), send_async);
     return PacketResult::ErrorSendFailed;
   }
 
@@ -214,13 +211,13 @@
       return packet_result;
     // Response says it wasn't valid
     Log *log = ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PACKETS);
-    if (log)
-      log->Printf(
-          "error: packet with payload \"%.*s\" got invalid response \"%s\": %s",
-          int(payload.size()), payload.data(), response.GetStringRef().c_str(),
-          (i == (max_response_retries - 1))
-              ? "using invalid response and giving up"
-              : "ignoring response and waiting for another");
+    LLDB_LOGF(
+        log,
+        "error: packet with payload \"%.*s\" got invalid response \"%s\": %s",
+        int(payload.size()), payload.data(), response.GetStringRef().data(),
+        (i == (max_response_retries - 1))
+            ? "using invalid response and giving up"
+            : "ignoring response and waiting for another");
   }
   return packet_result;
 }
@@ -228,16 +225,14 @@
 bool GDBRemoteClientBase::SendvContPacket(llvm::StringRef payload,
                                           StringExtractorGDBRemote &response) {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  if (log)
-    log->Printf("GDBRemoteCommunicationClient::%s ()", __FUNCTION__);
+  LLDB_LOGF(log, "GDBRemoteCommunicationClient::%s ()", __FUNCTION__);
 
   // we want to lock down packet sending while we continue
   Lock lock(*this, true);
 
-  if (log)
-    log->Printf(
-        "GDBRemoteCommunicationClient::%s () sending vCont packet: %.*s",
-        __FUNCTION__, int(payload.size()), payload.data());
+  LLDB_LOGF(log,
+            "GDBRemoteCommunicationClient::%s () sending vCont packet: %.*s",
+            __FUNCTION__, int(payload.size()), payload.data());
 
   if (SendPacketNoLock(payload) != PacketResult::Success)
     return false;
@@ -315,18 +310,16 @@
 GDBRemoteClientBase::ContinueLock::LockResult
 GDBRemoteClientBase::ContinueLock::lock() {
   Log *log = ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS);
-  if (log)
-    log->Printf("GDBRemoteClientBase::ContinueLock::%s() resuming with %s",
-                __FUNCTION__, m_comm.m_continue_packet.c_str());
+  LLDB_LOGF(log, "GDBRemoteClientBase::ContinueLock::%s() resuming with %s",
+            __FUNCTION__, m_comm.m_continue_packet.c_str());
 
   lldbassert(!m_acquired);
   std::unique_lock<std::mutex> lock(m_comm.m_mutex);
   m_comm.m_cv.wait(lock, [this] { return m_comm.m_async_count == 0; });
   if (m_comm.m_should_stop) {
     m_comm.m_should_stop = false;
-    if (log)
-      log->Printf("GDBRemoteClientBase::ContinueLock::%s() cancelled",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "GDBRemoteClientBase::ContinueLock::%s() cancelled",
+              __FUNCTION__);
     return LockResult::Cancelled;
   }
   if (m_comm.SendPacketNoLock(m_comm.m_continue_packet) !=
@@ -368,9 +361,8 @@
       size_t bytes_written = m_comm.Write(&ctrl_c, 1, status, nullptr);
       if (bytes_written == 0) {
         --m_comm.m_async_count;
-        if (log)
-          log->Printf("GDBRemoteClientBase::Lock::Lock failed to send "
-                      "interrupt packet");
+        LLDB_LOGF(log, "GDBRemoteClientBase::Lock::Lock failed to send "
+                       "interrupt packet");
         return;
       }
       if (log)
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h
index 54f69e8..ea294ff 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h
@@ -24,12 +24,10 @@
     virtual void HandleAsyncMisc(llvm::StringRef data) = 0;
     virtual void HandleStopReply() = 0;
 
-    // =========================================================================
     /// Process asynchronously-received structured data.
     ///
     /// \param[in] data
     ///   The complete data packet, expected to start with JSON-async.
-    // =========================================================================
     virtual void HandleAsyncStructuredDataPacket(llvm::StringRef data) = 0;
   };
 
@@ -83,42 +81,48 @@
   virtual void OnRunPacketSent(bool first);
 
 private:
-  // Variables handling synchronization between the Continue thread and any
-  // other threads
-  // wishing to send packets over the connection. Either the continue thread has
-  // control over
-  // the connection (m_is_running == true) or the connection is free for an
-  // arbitrary number of
-  // other senders to take which indicate their interest by incrementing
-  // m_async_count.
-  // Semantics of individual states:
-  // - m_continue_packet == false, m_async_count == 0: connection is free
-  // - m_continue_packet == true, m_async_count == 0: only continue thread is
-  // present
-  // - m_continue_packet == true, m_async_count > 0: continue thread has
-  // control, async threads
-  //   should interrupt it and wait for it to set m_continue_packet to false
-  // - m_continue_packet == false, m_async_count > 0: async threads have
-  // control, continue
-  //   thread needs to wait for them to finish (m_async_count goes down to 0).
+  /// Variables handling synchronization between the Continue thread and any
+  /// other threads wishing to send packets over the connection. Either the
+  /// continue thread has control over the connection (m_is_running == true) or
+  /// the connection is free for an arbitrary number of other senders to take
+  /// which indicate their interest by incrementing m_async_count.
+  ///
+  /// Semantics of individual states:
+  ///
+  /// - m_continue_packet == false, m_async_count == 0:
+  ///   connection is free
+  /// - m_continue_packet == true, m_async_count == 0:
+  ///   only continue thread is present
+  /// - m_continue_packet == true, m_async_count > 0:
+  ///   continue thread has control, async threads should interrupt it and wait
+  ///   for it to set m_continue_packet to false
+  /// - m_continue_packet == false, m_async_count > 0:
+  ///   async threads have control, continue thread needs to wait for them to
+  ///   finish (m_async_count goes down to 0).
+  /// @{
   std::mutex m_mutex;
   std::condition_variable m_cv;
-  // Packet with which to resume after an async interrupt. Can be changed by an
-  // async thread
-  // e.g. to inject a signal.
-  std::string m_continue_packet;
-  // When was the interrupt packet sent. Used to make sure we time out if the
-  // stub does not
-  // respond to interrupt requests.
-  std::chrono::time_point<std::chrono::steady_clock> m_interrupt_time;
-  uint32_t m_async_count;
-  bool m_is_running;
-  bool m_should_stop; // Whether we should resume after a stop.
-  // end of continue thread synchronization block
 
-  // This handles the synchronization between individual async threads. For now
-  // they just use a
-  // simple mutex.
+  /// Packet with which to resume after an async interrupt. Can be changed by
+  /// an async thread e.g. to inject a signal.
+  std::string m_continue_packet;
+
+  /// When was the interrupt packet sent. Used to make sure we time out if the
+  /// stub does not respond to interrupt requests.
+  std::chrono::time_point<std::chrono::steady_clock> m_interrupt_time;
+
+  /// Number of threads interested in sending.
+  uint32_t m_async_count;
+
+  /// Whether the continue thread has control.
+  bool m_is_running;
+
+  /// Whether we should resume after a stop.
+  bool m_should_stop;
+  /// @}
+
+  /// This handles the synchronization between individual async threads. For
+  /// now they just use a simple mutex.
   std::recursive_mutex m_async_mutex;
 
   bool ShouldStop(const UnixSignals &signals,
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 11052ef..0a98f6a 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -14,6 +14,7 @@
 #include <sys/stat.h>
 
 #include "lldb/Core/StreamFile.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Host/ConnectionFileDescriptor.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Host.h"
@@ -30,6 +31,7 @@
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/RegularExpression.h"
+#include "lldb/Utility/Reproducer.h"
 #include "lldb/Utility/StreamString.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/ScopedPrinter.h"
@@ -38,6 +40,8 @@
 
 #if defined(__APPLE__)
 #define DEBUGSERVER_BASENAME "debugserver"
+#elif defined(_WIN32)
+#define DEBUGSERVER_BASENAME "lldb-server.exe"
 #else
 #define DEBUGSERVER_BASENAME "lldb-server"
 #endif
@@ -99,10 +103,8 @@
   ConnectionStatus status = eConnectionStatusSuccess;
   char ch = '+';
   const size_t bytes_written = Write(&ch, 1, status, nullptr);
-  if (log)
-    log->Printf("<%4" PRIu64 "> send packet: %c", (uint64_t)bytes_written, ch);
-  m_history.AddPacket(ch, GDBRemoteCommunicationHistory::ePacketTypeSend,
-                      bytes_written);
+  LLDB_LOGF(log, "<%4" PRIu64 "> send packet: %c", (uint64_t)bytes_written, ch);
+  m_history.AddPacket(ch, GDBRemotePacket::ePacketTypeSend, bytes_written);
   return bytes_written;
 }
 
@@ -111,10 +113,8 @@
   ConnectionStatus status = eConnectionStatusSuccess;
   char ch = '-';
   const size_t bytes_written = Write(&ch, 1, status, nullptr);
-  if (log)
-    log->Printf("<%4" PRIu64 "> send packet: %c", (uint64_t)bytes_written, ch);
-  m_history.AddPacket(ch, GDBRemoteCommunicationHistory::ePacketTypeSend,
-                      bytes_written);
+  LLDB_LOGF(log, "<%4" PRIu64 "> send packet: %c", (uint64_t)bytes_written, ch);
+  m_history.AddPacket(ch, GDBRemotePacket::ePacketTypeSend, bytes_written);
   return bytes_written;
 }
 
@@ -172,13 +172,12 @@
         strm.Printf("%*s", (int)3, p);
         log->PutString(strm.GetString());
       } else
-        log->Printf("<%4" PRIu64 "> send packet: %.*s", (uint64_t)bytes_written,
-                    (int)packet_length, packet_data);
+        LLDB_LOGF(log, "<%4" PRIu64 "> send packet: %.*s",
+                  (uint64_t)bytes_written, (int)packet_length, packet_data);
     }
 
     m_history.AddPacket(packet.str(), packet_length,
-                        GDBRemoteCommunicationHistory::ePacketTypeSend,
-                        bytes_written);
+                        GDBRemotePacket::ePacketTypeSend, bytes_written);
 
     if (bytes_written == packet_length) {
       if (!skip_ack && GetSendAcks())
@@ -186,9 +185,8 @@
       else
         return PacketResult::Success;
     } else {
-      if (log)
-        log->Printf("error: failed to send packet: %.*s", (int)packet_length,
-                    packet_data);
+      LLDB_LOGF(log, "error: failed to send packet: %.*s", (int)packet_length,
+                packet_data);
     }
   }
   return PacketResult::ErrorSendFailed;
@@ -332,11 +330,12 @@
             std::string regex_str = "^";
             regex_str += echo_packet;
             regex_str += "$";
-            response_regex.Compile(regex_str);
+            response_regex = RegularExpression(regex_str);
           } else {
             echo_packet_len =
                 ::snprintf(echo_packet, sizeof(echo_packet), "qC");
-            response_regex.Compile(llvm::StringRef("^QC[0-9A-Fa-f]+$"));
+            response_regex =
+                RegularExpression(llvm::StringRef("^QC[0-9A-Fa-f]+$"));
           }
 
           PacketResult echo_packet_result =
@@ -489,11 +488,10 @@
         llvm::StringRef(m_bytes).substr(1, hash_mark_idx - 1));
     bool success = packet_checksum == actual_checksum;
     if (!success) {
-      if (log)
-        log->Printf(
-            "error: checksum mismatch: %.*s expected 0x%2.2x, got 0x%2.2x",
-            (int)(pkt_size), m_bytes.c_str(), (uint8_t)packet_checksum,
-            (uint8_t)actual_checksum);
+      LLDB_LOGF(log,
+                "error: checksum mismatch: %.*s expected 0x%2.2x, got 0x%2.2x",
+                (int)(pkt_size), m_bytes.c_str(), (uint8_t)packet_checksum,
+                (uint8_t)actual_checksum);
     }
     // Send the ack or nack if needed
     if (!success) {
@@ -651,8 +649,8 @@
   if (src && src_len > 0) {
     if (log && log->GetVerbose()) {
       StreamString s;
-      log->Printf("GDBRemoteCommunication::%s adding %u bytes: %.*s",
-                  __FUNCTION__, (uint32_t)src_len, (uint32_t)src_len, src);
+      LLDB_LOGF(log, "GDBRemoteCommunication::%s adding %u bytes: %.*s",
+                __FUNCTION__, (uint32_t)src_len, (uint32_t)src_len, src);
     }
     m_bytes.append((const char *)src, src_len);
   }
@@ -733,9 +731,8 @@
           break;
         }
       }
-      if (log)
-        log->Printf("GDBRemoteCommunication::%s tossing %u junk bytes: '%.*s'",
-                    __FUNCTION__, idx - 1, idx - 1, m_bytes.c_str());
+      LLDB_LOGF(log, "GDBRemoteCommunication::%s tossing %u junk bytes: '%.*s'",
+                __FUNCTION__, idx - 1, idx - 1, m_bytes.c_str());
       m_bytes.erase(0, idx - 1);
     } break;
     }
@@ -752,7 +749,6 @@
       size_t content_end = content_start + content_length;
 
       bool success = true;
-      std::string &packet_str = packet.GetStringRef();
       if (log) {
         // If logging was just enabled and we have history, then dump out what
         // we have to the log so we get the historical context. The Dump() call
@@ -800,25 +796,23 @@
           log->PutString(strm.GetString());
         } else {
           if (CompressionIsEnabled())
-            log->Printf("<%4" PRIu64 ":%" PRIu64 "> read packet: %.*s",
-                        (uint64_t)original_packet_size, (uint64_t)total_length,
-                        (int)(total_length), m_bytes.c_str());
+            LLDB_LOGF(log, "<%4" PRIu64 ":%" PRIu64 "> read packet: %.*s",
+                      (uint64_t)original_packet_size, (uint64_t)total_length,
+                      (int)(total_length), m_bytes.c_str());
           else
-            log->Printf("<%4" PRIu64 "> read packet: %.*s",
-                        (uint64_t)total_length, (int)(total_length),
-                        m_bytes.c_str());
+            LLDB_LOGF(log, "<%4" PRIu64 "> read packet: %.*s",
+                      (uint64_t)total_length, (int)(total_length),
+                      m_bytes.c_str());
         }
       }
 
       m_history.AddPacket(m_bytes, total_length,
-                          GDBRemoteCommunicationHistory::ePacketTypeRecv,
-                          total_length);
+                          GDBRemotePacket::ePacketTypeRecv, total_length);
 
-      // Clear packet_str in case there is some existing data in it.
-      packet_str.clear();
       // Copy the packet from m_bytes to packet_str expanding the run-length
       // encoding in the process. Reserve enough byte for the most common case
       // (no RLE used)
+      std ::string packet_str;
       packet_str.reserve(m_bytes.length());
       for (std::string::const_iterator c = m_bytes.begin() + content_start;
            c != m_bytes.begin() + content_end; ++c) {
@@ -841,6 +835,7 @@
           packet_str.push_back(*c);
         }
       }
+      packet = StringExtractorGDBRemote(packet_str);
 
       if (m_bytes[0] == '$' || m_bytes[0] == '%') {
         assert(checksum_idx < m_bytes.size());
@@ -853,11 +848,11 @@
                 llvm::StringRef(m_bytes).slice(content_start, content_end));
             success = packet_checksum == actual_checksum;
             if (!success) {
-              if (log)
-                log->Printf("error: checksum mismatch: %.*s expected 0x%2.2x, "
-                            "got 0x%2.2x",
-                            (int)(total_length), m_bytes.c_str(),
-                            (uint8_t)packet_checksum, (uint8_t)actual_checksum);
+              LLDB_LOGF(log,
+                        "error: checksum mismatch: %.*s expected 0x%2.2x, "
+                        "got 0x%2.2x",
+                        (int)(total_length), m_bytes.c_str(),
+                        (uint8_t)packet_checksum, (uint8_t)actual_checksum);
             }
             // Send the ack or nack if needed
             if (!success)
@@ -867,9 +862,8 @@
           }
         } else {
           success = false;
-          if (log)
-            log->Printf("error: invalid checksum in packet: '%s'\n",
-                        m_bytes.c_str());
+          LLDB_LOGF(log, "error: invalid checksum in packet: '%s'\n",
+                    m_bytes.c_str());
         }
       }
 
@@ -933,10 +927,8 @@
     const char *url, Platform *platform, ProcessLaunchInfo &launch_info,
     uint16_t *port, const Args *inferior_args, int pass_comm_fd) {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  if (log)
-    log->Printf("GDBRemoteCommunication::%s(url=%s, port=%" PRIu16 ")",
-                __FUNCTION__, url ? url : "<empty>",
-                port ? *port : uint16_t(0));
+  LLDB_LOGF(log, "GDBRemoteCommunication::%s(url=%s, port=%" PRIu16 ")",
+            __FUNCTION__, url ? url : "<empty>", port ? *port : uint16_t(0));
 
   Status error;
   // If we locate debugserver, keep that located version around
@@ -953,10 +945,10 @@
   if (!env_debugserver_path.empty()) {
     debugserver_file_spec.SetFile(env_debugserver_path,
                                   FileSpec::Style::native);
-    if (log)
-      log->Printf("GDBRemoteCommunication::%s() gdb-remote stub exe path set "
-                  "from environment variable: %s",
-                  __FUNCTION__, env_debugserver_path.c_str());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunication::%s() gdb-remote stub exe path set "
+              "from environment variable: %s",
+              __FUNCTION__, env_debugserver_path.c_str());
   } else
     debugserver_file_spec = g_debugserver_file_spec;
   bool debugserver_exists =
@@ -968,10 +960,9 @@
       debugserver_file_spec.AppendPathComponent(DEBUGSERVER_BASENAME);
       debugserver_exists = FileSystem::Instance().Exists(debugserver_file_spec);
       if (debugserver_exists) {
-        if (log)
-          log->Printf(
-              "GDBRemoteCommunication::%s() found gdb-remote stub exe '%s'",
-              __FUNCTION__, debugserver_file_spec.GetPath().c_str());
+        LLDB_LOGF(log,
+                  "GDBRemoteCommunication::%s() found gdb-remote stub exe '%s'",
+                  __FUNCTION__, debugserver_file_spec.GetPath().c_str());
 
         g_debugserver_file_spec = debugserver_file_spec;
       } else {
@@ -985,10 +976,10 @@
           // exist
           debugserver_exists = true;
         } else {
-          if (log)
-            log->Printf("GDBRemoteCommunication::%s() could not find "
-                        "gdb-remote stub exe '%s'",
-                        __FUNCTION__, debugserver_file_spec.GetPath().c_str());
+          LLDB_LOGF(log,
+                    "GDBRemoteCommunication::%s() could not find "
+                    "gdb-remote stub exe '%s'",
+                    __FUNCTION__, debugserver_file_spec.GetPath().c_str());
         }
         // Don't cache the platform specific GDB server binary as it could
         // change from platform to platform
@@ -1052,10 +1043,10 @@
         error = socket_pipe.CreateWithUniqueName("debugserver-named-pipe",
                                                  false, named_pipe_path);
         if (error.Fail()) {
-          if (log)
-            log->Printf("GDBRemoteCommunication::%s() "
-                        "named pipe creation failed: %s",
-                        __FUNCTION__, error.AsCString());
+          LLDB_LOGF(log,
+                    "GDBRemoteCommunication::%s() "
+                    "named pipe creation failed: %s",
+                    __FUNCTION__, error.AsCString());
           return error;
         }
         debugserver_args.AppendArgument(llvm::StringRef("--named-pipe"));
@@ -1065,10 +1056,10 @@
         // using using an unnamed pipe...
         error = socket_pipe.CreateNew(true);
         if (error.Fail()) {
-          if (log)
-            log->Printf("GDBRemoteCommunication::%s() "
-                        "unnamed pipe creation failed: %s",
-                        __FUNCTION__, error.AsCString());
+          LLDB_LOGF(log,
+                    "GDBRemoteCommunication::%s() "
+                    "unnamed pipe creation failed: %s",
+                    __FUNCTION__, error.AsCString());
           return error;
         }
         pipe_t write = socket_pipe.GetWritePipe();
@@ -1081,10 +1072,10 @@
         // debugserver connect to us..
         error = StartListenThread("127.0.0.1", 0);
         if (error.Fail()) {
-          if (log)
-            log->Printf("GDBRemoteCommunication::%s() unable to start listen "
-                        "thread: %s",
-                        __FUNCTION__, error.AsCString());
+          LLDB_LOGF(log,
+                    "GDBRemoteCommunication::%s() unable to start listen "
+                    "thread: %s",
+                    __FUNCTION__, error.AsCString());
           return error;
         }
 
@@ -1104,9 +1095,8 @@
             *port = port_;
         } else {
           error.SetErrorString("failed to bind to port 0 on 127.0.0.1");
-          if (log)
-            log->Printf("GDBRemoteCommunication::%s() failed: %s", __FUNCTION__,
-                        error.AsCString());
+          LLDB_LOGF(log, "GDBRemoteCommunication::%s() failed: %s",
+                    __FUNCTION__, error.AsCString());
           return error;
         }
       }
@@ -1148,10 +1138,10 @@
 
       if (has_env_var) {
         debugserver_args.AppendArgument(llvm::StringRef(extra_arg));
-        if (log)
-          log->Printf("GDBRemoteCommunication::%s adding env var %s contents "
-                      "to stub command line (%s)",
-                      __FUNCTION__, env_var_name, extra_arg.c_str());
+        LLDB_LOGF(log,
+                  "GDBRemoteCommunication::%s adding env var %s contents "
+                  "to stub command line (%s)",
+                  __FUNCTION__, env_var_name, extra_arg.c_str());
       }
     } while (has_env_var);
 
@@ -1177,8 +1167,8 @@
       StreamString string_stream;
       Platform *const platform = nullptr;
       launch_info.Dump(string_stream, platform);
-      log->Printf("launch info for gdb-remote stub:\n%s",
-                  string_stream.GetData());
+      LLDB_LOGF(log, "launch info for gdb-remote stub:\n%s",
+                string_stream.GetData());
     }
     error = Host::LaunchProcess(launch_info);
 
@@ -1188,11 +1178,10 @@
       if (named_pipe_path.size() > 0) {
         error = socket_pipe.OpenAsReader(named_pipe_path, false);
         if (error.Fail())
-          if (log)
-            log->Printf("GDBRemoteCommunication::%s() "
-                        "failed to open named pipe %s for reading: %s",
-                        __FUNCTION__, named_pipe_path.c_str(),
-                        error.AsCString());
+          LLDB_LOGF(log,
+                    "GDBRemoteCommunication::%s() "
+                    "failed to open named pipe %s for reading: %s",
+                    __FUNCTION__, named_pipe_path.c_str(), error.AsCString());
       }
 
       if (socket_pipe.CanWrite())
@@ -1209,24 +1198,22 @@
           uint16_t child_port = StringConvert::ToUInt32(port_cstr, 0);
           if (*port == 0 || *port == child_port) {
             *port = child_port;
-            if (log)
-              log->Printf("GDBRemoteCommunication::%s() "
-                          "debugserver listens %u port",
-                          __FUNCTION__, *port);
+            LLDB_LOGF(log,
+                      "GDBRemoteCommunication::%s() "
+                      "debugserver listens %u port",
+                      __FUNCTION__, *port);
           } else {
-            if (log)
-              log->Printf("GDBRemoteCommunication::%s() "
-                          "debugserver listening on port "
-                          "%d but requested port was %d",
-                          __FUNCTION__, (uint32_t)child_port,
-                          (uint32_t)(*port));
+            LLDB_LOGF(log,
+                      "GDBRemoteCommunication::%s() "
+                      "debugserver listening on port "
+                      "%d but requested port was %d",
+                      __FUNCTION__, (uint32_t)child_port, (uint32_t)(*port));
           }
         } else {
-          if (log)
-            log->Printf("GDBRemoteCommunication::%s() "
-                        "failed to read a port value from pipe %s: %s",
-                        __FUNCTION__, named_pipe_path.c_str(),
-                        error.AsCString());
+          LLDB_LOGF(log,
+                    "GDBRemoteCommunication::%s() "
+                    "failed to read a port value from pipe %s: %s",
+                    __FUNCTION__, named_pipe_path.c_str(), error.AsCString());
         }
         socket_pipe.Close();
       }
@@ -1234,10 +1221,9 @@
       if (named_pipe_path.size() > 0) {
         const auto err = socket_pipe.Delete(named_pipe_path);
         if (err.Fail()) {
-          if (log)
-            log->Printf(
-                "GDBRemoteCommunication::%s failed to delete pipe %s: %s",
-                __FUNCTION__, named_pipe_path.c_str(), err.AsCString());
+          LLDB_LOGF(log,
+                    "GDBRemoteCommunication::%s failed to delete pipe %s: %s",
+                    __FUNCTION__, named_pipe_path.c_str(), err.AsCString());
         }
       }
 
@@ -1249,9 +1235,8 @@
   }
 
   if (error.Fail()) {
-    if (log)
-      log->Printf("GDBRemoteCommunication::%s() failed: %s", __FUNCTION__,
-                  error.AsCString());
+    LLDB_LOGF(log, "GDBRemoteCommunication::%s() failed: %s", __FUNCTION__,
+              error.AsCString());
   }
 
   return error;
@@ -1259,8 +1244,9 @@
 
 void GDBRemoteCommunication::DumpHistory(Stream &strm) { m_history.Dump(strm); }
 
-void GDBRemoteCommunication::SetHistoryStream(llvm::raw_ostream *strm) {
-  m_history.SetStream(strm);
+void GDBRemoteCommunication::SetPacketRecorder(
+    repro::PacketRecorder *recorder) {
+  m_history.SetRecorder(recorder);
 }
 
 llvm::Error
@@ -1351,7 +1337,7 @@
 
     if (type == PacketType::Notify) {
       // put this packet into an event
-      const char *pdata = packet.GetStringRef().c_str();
+      const char *pdata = packet.GetStringRef().data();
 
       // as the communication class, we are a broadcaster and the async thread
       // is tuned to listen to us
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
index bb777a5..0b67001 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
@@ -27,6 +27,9 @@
 #include "lldb/lldb-public.h"
 
 namespace lldb_private {
+namespace repro {
+class PacketRecorder;
+}
 namespace process_gdb_remote {
 
 enum GDBStoppointType {
@@ -133,7 +136,8 @@
                          // fork/exec to avoid having to connect/accept
 
   void DumpHistory(Stream &strm);
-  void SetHistoryStream(llvm::raw_ostream *strm);
+
+  void SetPacketRecorder(repro::PacketRecorder *recorder);
 
   static llvm::Error ConnectLocally(GDBRemoteCommunication &client,
                                     GDBRemoteCommunication &server);
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index 9797184..4dafa1d 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -23,7 +23,6 @@
 #include "lldb/Target/UnixSignals.h"
 #include "lldb/Utility/Args.h"
 #include "lldb/Utility/DataBufferHeap.h"
-#include "lldb/Utility/JSON.h"
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/State.h"
@@ -35,17 +34,15 @@
 #include "lldb/Utility/StringExtractorGDBRemote.h"
 
 #include "llvm/ADT/StringSwitch.h"
+#include "llvm/Support/JSON.h"
 
-#if defined(__APPLE__)
-#ifndef HAVE_LIBCOMPRESSION
-#define HAVE_LIBCOMPRESSION
-#endif
+#if defined(HAVE_LIBCOMPRESSION)
 #include <compression.h>
 #endif
 
 using namespace lldb;
-using namespace lldb_private;
 using namespace lldb_private::process_gdb_remote;
+using namespace lldb_private;
 using namespace std::chrono;
 
 // GDBRemoteCommunicationClient constructor
@@ -342,7 +339,7 @@
                                   // not, we assume no limit
 
   // build the qSupported packet
-  std::vector<std::string> features = {"xmlRegisters=i386,arm,mips"};
+  std::vector<std::string> features = {"xmlRegisters=i386,arm,mips,arc"};
   StreamString packet;
   packet.PutCString("qSupported");
   for (uint32_t i = 0; i < features.size(); ++i) {
@@ -354,7 +351,7 @@
   if (SendPacketAndWaitForResponse(packet.GetString(), response,
                                    /*send_async=*/false) ==
       PacketResult::Success) {
-    const char *response_cstr = response.GetStringRef().c_str();
+    const char *response_cstr = response.GetStringRef().data();
 
     // Hang on to the qSupported packet, so that platforms can do custom
     // configuration of the transport before attaching/launching the process.
@@ -439,8 +436,7 @@
         m_max_packet_size = UINT64_MAX; // Must have been a garbled response
         Log *log(
             ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-        if (log)
-          log->Printf("Garbled PacketSize spec in qSupported response");
+        LLDB_LOGF(log, "Garbled PacketSize spec in qSupported response");
       }
     }
   }
@@ -469,7 +465,7 @@
     m_supports_vCont_S = eLazyBoolNo;
     if (SendPacketAndWaitForResponse("vCont?", response, false) ==
         PacketResult::Success) {
-      const char *response_cstr = response.GetStringRef().c_str();
+      const char *response_cstr = response.GetStringRef().data();
       if (::strstr(response_cstr, ";c"))
         m_supports_vCont_c = eLazyBoolYes;
 
@@ -525,9 +521,10 @@
   if (!lock) {
     if (Log *log = ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(
             GDBR_LOG_PROCESS | GDBR_LOG_PACKETS))
-      log->Printf("GDBRemoteCommunicationClient::%s: Didn't get sequence mutex "
-                  "for %s packet.",
-                  __FUNCTION__, payload.GetData());
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationClient::%s: Didn't get sequence mutex "
+                "for %s packet.",
+                __FUNCTION__, payload.GetData());
     return PacketResult::ErrorNoSequenceLock;
   }
 
@@ -546,21 +543,24 @@
 //
 // Takes a valid thread ID because p needs to apply to a thread.
 bool GDBRemoteCommunicationClient::GetpPacketSupported(lldb::tid_t tid) {
-  if (m_supports_p == eLazyBoolCalculate) {
-    m_supports_p = eLazyBoolNo;
-    StreamString payload;
-    payload.PutCString("p0");
-    StringExtractorGDBRemote response;
-    if (SendThreadSpecificPacketAndWaitForResponse(tid, std::move(payload),
-                                                   response, false) ==
-            PacketResult::Success &&
-        response.IsNormalResponse()) {
-      m_supports_p = eLazyBoolYes;
-    }
-  }
+  if (m_supports_p == eLazyBoolCalculate)
+    m_supports_p = GetThreadPacketSupported(tid, "p0");
   return m_supports_p;
 }
 
+LazyBool GDBRemoteCommunicationClient::GetThreadPacketSupported(
+    lldb::tid_t tid, llvm::StringRef packetStr) {
+  StreamString payload;
+  payload.PutCString(packetStr);
+  StringExtractorGDBRemote response;
+  if (SendThreadSpecificPacketAndWaitForResponse(
+          tid, std::move(payload), response, false) == PacketResult::Success &&
+      response.IsNormalResponse()) {
+    return eLazyBoolYes;
+  }
+  return eLazyBoolNo;
+}
+
 StructuredData::ObjectSP GDBRemoteCommunicationClient::GetThreadsInfo() {
   // Get information on all threads at one using the "jThreadsInfo" packet
   StructuredData::ObjectSP object_sp;
@@ -660,10 +660,10 @@
   if (!lock) {
     Log *log(ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(GDBR_LOG_PROCESS |
                                                            GDBR_LOG_PACKETS));
-    if (log)
-      log->Printf("error: failed to get packet sequence mutex, not sending "
-                  "packets with prefix '%s'",
-                  payload_prefix);
+    LLDB_LOGF(log,
+              "error: failed to get packet sequence mutex, not sending "
+              "packets with prefix '%s'",
+              payload_prefix);
     return PacketResult::ErrorNoSequenceLock;
   }
 
@@ -934,6 +934,11 @@
   return m_os_version;
 }
 
+llvm::VersionTuple GDBRemoteCommunicationClient::GetMacCatalystVersion() {
+  GetHostInfo();
+  return m_maccatalyst_version;
+}
+
 bool GDBRemoteCommunicationClient::GetOSBuildString(std::string &s) {
   if (GetHostInfo()) {
     if (!m_os_build.empty()) {
@@ -1136,6 +1141,7 @@
         uint32_t sub = 0;
         std::string arch_name;
         std::string os_name;
+        std::string environment;
         std::string vendor_name;
         std::string triple;
         std::string distribution_id;
@@ -1175,7 +1181,11 @@
             extractor.GetHexByteString(m_os_kernel);
             ++num_keys_decoded;
           } else if (name.equals("ostype")) {
-            os_name = value;
+            if (value.equals("maccatalyst")) {
+              os_name = "ios";
+              environment = "macabi";
+            } else
+              os_name = value;
             ++num_keys_decoded;
           } else if (name.equals("vendor")) {
             vendor_name = value;
@@ -1199,6 +1209,9 @@
           {
             if (!m_os_version.tryParse(value))
               ++num_keys_decoded;
+          } else if (name.equals("maccatalyst_version")) {
+            if (!m_maccatalyst_version.tryParse(value))
+              ++num_keys_decoded;
           } else if (name.equals("watchpoint_exceptions_received")) {
             m_watchpoints_trigger_after_instruction =
                 llvm::StringSwitch<LazyBool>(value)
@@ -1236,6 +1249,8 @@
                     llvm::StringRef(vendor_name));
               if (!os_name.empty())
                 m_host_arch.GetTriple().setOSName(llvm::StringRef(os_name));
+              if (!environment.empty())
+                m_host_arch.GetTriple().setEnvironmentName(environment);
             }
           } else {
             std::string triple;
@@ -1259,6 +1274,7 @@
                 host_triple.getOS() == llvm::Triple::Darwin) {
               switch (m_host_arch.GetMachine()) {
               case llvm::Triple::aarch64:
+              case llvm::Triple::aarch64_32:
               case llvm::Triple::arm:
               case llvm::Triple::thumb:
                 host_triple.setOS(llvm::Triple::IOS);
@@ -1284,14 +1300,15 @@
             assert(byte_order == m_host_arch.GetByteOrder());
           }
 
-          if (log)
-            log->Printf("GDBRemoteCommunicationClient::%s parsed host "
-                        "architecture as %s, triple as %s from triple text %s",
-                        __FUNCTION__, m_host_arch.GetArchitectureName()
-                                          ? m_host_arch.GetArchitectureName()
-                                          : "<null-arch-name>",
-                        m_host_arch.GetTriple().getTriple().c_str(),
-                        triple.c_str());
+          LLDB_LOGF(log,
+                    "GDBRemoteCommunicationClient::%s parsed host "
+                    "architecture as %s, triple as %s from triple text %s",
+                    __FUNCTION__,
+                    m_host_arch.GetArchitectureName()
+                        ? m_host_arch.GetArchitectureName()
+                        : "<null-arch-name>",
+                    m_host_arch.GetTriple().getTriple().c_str(),
+                    triple.c_str());
         }
         if (!distribution_id.empty())
           m_host_arch.SetDistributionId(distribution_id.c_str());
@@ -1893,7 +1910,7 @@
       } else if (name.equals("euid")) {
         uint32_t uid = UINT32_MAX;
         value.getAsInteger(0, uid);
-        process_info.SetEffectiveGroupID(uid);
+        process_info.SetEffectiveUserID(uid);
       } else if (name.equals("gid")) {
         uint32_t gid = UINT32_MAX;
         value.getAsInteger(0, gid);
@@ -1914,6 +1931,26 @@
         std::string name;
         extractor.GetHexByteString(name);
         process_info.GetExecutableFile().SetFile(name, FileSpec::Style::native);
+      } else if (name.equals("args")) {
+        llvm::StringRef encoded_args(value), hex_arg;
+
+        bool is_arg0 = true;
+        while (!encoded_args.empty()) {
+          std::tie(hex_arg, encoded_args) = encoded_args.split('-');
+          std::string arg;
+          StringExtractor extractor(hex_arg);
+          if (extractor.GetHexByteString(arg) * 2 != hex_arg.size()) {
+            // In case of wrong encoding, we discard all the arguments
+            process_info.GetArguments().Clear();
+            process_info.SetArg0("");
+            break;
+          }
+          if (is_arg0)
+            process_info.SetArg0(arg);
+          else
+            process_info.GetArguments().AppendArgument(arg);
+          is_arg0 = false;
+        }
       } else if (name.equals("cputype")) {
         value.getAsInteger(0, cpu);
       } else if (name.equals("cpusubtype")) {
@@ -1987,6 +2024,7 @@
       uint32_t sub = 0;
       std::string arch_name;
       std::string os_name;
+      std::string environment;
       std::string vendor_name;
       std::string triple;
       std::string elf_abi;
@@ -2007,7 +2045,11 @@
           extractor.GetHexByteString(triple);
           ++num_keys_decoded;
         } else if (name.equals("ostype")) {
-          os_name = value;
+          if (value.equals("maccatalyst")) {
+            os_name = "ios";
+            environment = "macabi";
+          } else
+            os_name = value;
           ++num_keys_decoded;
         } else if (name.equals("vendor")) {
           vendor_name = value;
@@ -2048,6 +2090,8 @@
       } else if (cpu != LLDB_INVALID_CPUTYPE && !os_name.empty() &&
                  !vendor_name.empty()) {
         llvm::Triple triple(llvm::Twine("-") + vendor_name + "-" + os_name);
+        if (!environment.empty())
+            triple.setEnvironmentName(environment);
 
         assert(triple.getObjectFormat() != llvm::Triple::UnknownObjectFormat);
         assert(triple.getObjectFormat() != llvm::Triple::Wasm);
@@ -2064,12 +2108,10 @@
           break;
         case llvm::Triple::Wasm:
         case llvm::Triple::XCOFF:
-          if (log)
-            log->Printf("error: not supported target architecture");
+          LLDB_LOGF(log, "error: not supported target architecture");
           return false;
         case llvm::Triple::UnknownObjectFormat:
-          if (log)
-            log->Printf("error: failed to determine target architecture");
+          LLDB_LOGF(log, "error: failed to determine target architecture");
           return false;
         }
 
@@ -2081,8 +2123,10 @@
         }
         m_process_arch.GetTriple().setVendorName(llvm::StringRef(vendor_name));
         m_process_arch.GetTriple().setOSName(llvm::StringRef(os_name));
+        m_process_arch.GetTriple().setEnvironmentName(llvm::StringRef(environment));
         m_host_arch.GetTriple().setVendorName(llvm::StringRef(vendor_name));
         m_host_arch.GetTriple().setOSName(llvm::StringRef(os_name));
+        m_host_arch.GetTriple().setEnvironmentName(llvm::StringRef(environment));
       }
       return true;
     }
@@ -2156,8 +2200,7 @@
       if (match_info.GetProcessInfo().EffectiveGroupIDIsValid())
         packet.Printf("egid:%u;",
                       match_info.GetProcessInfo().GetEffectiveGroupID());
-      if (match_info.GetProcessInfo().EffectiveGroupIDIsValid())
-        packet.Printf("all_users:%u;", match_info.GetMatchAllUsers() ? 1 : 0);
+      packet.Printf("all_users:%u;", match_info.GetMatchAllUsers() ? 1 : 0);
       if (match_info.GetProcessInfo().GetArchitecture().IsValid()) {
         const ArchSpec &match_arch =
             match_info.GetProcessInfo().GetArchitecture();
@@ -2178,8 +2221,7 @@
         if (!DecodeProcessInfoResponse(response, process_info))
           break;
         process_infos.Append(process_info);
-        response.GetStringRef().clear();
-        response.SetFilePos(0);
+        response = StringExtractorGDBRemote();
       } while (SendPacketAndWaitForResponse("qsProcessInfo", response, false) ==
                PacketResult::Success);
     } else {
@@ -2641,9 +2683,8 @@
 uint8_t GDBRemoteCommunicationClient::SendGDBStoppointTypePacket(
     GDBStoppointType type, bool insert, addr_t addr, uint32_t length) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("GDBRemoteCommunicationClient::%s() %s at addr = 0x%" PRIx64,
-                __FUNCTION__, insert ? "add" : "remove", addr);
+  LLDB_LOGF(log, "GDBRemoteCommunicationClient::%s() %s at addr = 0x%" PRIx64,
+            __FUNCTION__, insert ? "add" : "remove", addr);
 
   // Check if the stub is known not to support this breakpoint type
   if (!SupportsGDBStoppointPacket(type))
@@ -2745,9 +2786,8 @@
 #if !defined(LLDB_CONFIGURATION_DEBUG)
     Log *log(ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(GDBR_LOG_PROCESS |
                                                            GDBR_LOG_PACKETS));
-    if (log)
-      log->Printf("error: failed to get packet sequence mutex, not sending "
-                  "packet 'qfThreadInfo'");
+    LLDB_LOGF(log, "error: failed to get packet sequence mutex, not sending "
+                   "packet 'qfThreadInfo'");
 #endif
     sequence_mutex_unavailable = true;
   }
@@ -2879,7 +2919,7 @@
 }
 lldb::user_id_t
 GDBRemoteCommunicationClient::OpenFile(const lldb_private::FileSpec &file_spec,
-                                       uint32_t flags, mode_t mode,
+                                       File::OpenOptions flags, mode_t mode,
                                        Status &error) {
   std::string path(file_spec.GetPath(false));
   lldb_private::StreamString stream;
@@ -3146,7 +3186,8 @@
       if (arch.IsValid() &&
           arch.GetTriple().getVendor() == llvm::Triple::Apple &&
           arch.GetTriple().getOS() == llvm::Triple::IOS &&
-          arch.GetTriple().getArch() == llvm::Triple::aarch64) {
+          (arch.GetTriple().getArch() == llvm::Triple::aarch64 ||
+           arch.GetTriple().getArch() == llvm::Triple::aarch64_32)) {
         m_avoid_g_packets = eLazyBoolYes;
         uint32_t gdb_server_version = GetGDBServerProgramVersion();
         if (gdb_server_version != 0) {
@@ -3592,21 +3633,21 @@
 llvm::Optional<std::vector<ModuleSpec>>
 GDBRemoteCommunicationClient::GetModulesInfo(
     llvm::ArrayRef<FileSpec> module_file_specs, const llvm::Triple &triple) {
+  namespace json = llvm::json;
+
   if (!m_supports_jModulesInfo)
     return llvm::None;
 
-  JSONArray::SP module_array_sp = std::make_shared<JSONArray>();
+  json::Array module_array;
   for (const FileSpec &module_file_spec : module_file_specs) {
-    JSONObject::SP module_sp = std::make_shared<JSONObject>();
-    module_array_sp->AppendObject(module_sp);
-    module_sp->SetObject(
-        "file", std::make_shared<JSONString>(module_file_spec.GetPath(false)));
-    module_sp->SetObject("triple",
-                         std::make_shared<JSONString>(triple.getTriple()));
+    module_array.push_back(
+        json::Object{{"file", module_file_spec.GetPath(false)},
+                     {"triple", triple.getTriple()}});
   }
   StreamString unescaped_payload;
   unescaped_payload.PutCString("jModulesInfo:");
-  module_array_sp->Write(unescaped_payload);
+  unescaped_payload.AsRawOstream() << std::move(module_array);
+
   StreamGDBRemote payload;
   payload.PutEscapedBytes(unescaped_payload.GetString().data(),
                           unescaped_payload.GetSize());
@@ -3699,7 +3740,7 @@
     case ('m'):
       if (str.length() > 1)
         output << &str[1];
-      offset += size;
+      offset += str.length() - 1;
       break;
 
     // unknown chunk
@@ -3796,8 +3837,9 @@
 
               addr_t symbol_load_addr = LLDB_INVALID_ADDRESS;
               lldb_private::SymbolContextList sc_list;
-              if (process->GetTarget().GetImages().FindSymbolsWithNameAndType(
-                      ConstString(symbol_name), eSymbolTypeAny, sc_list)) {
+              process->GetTarget().GetImages().FindSymbolsWithNameAndType(
+                  ConstString(symbol_name), eSymbolTypeAny, sc_list);
+              if (!sc_list.IsEmpty()) {
                 const size_t num_scs = sc_list.GetSize();
                 for (size_t sc_idx = 0;
                      sc_idx < num_scs &&
@@ -3873,9 +3915,9 @@
 
     } else if (Log *log = ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(
                    GDBR_LOG_PROCESS | GDBR_LOG_PACKETS)) {
-      log->Printf(
-          "GDBRemoteCommunicationClient::%s: Didn't get sequence mutex.",
-          __FUNCTION__);
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationClient::%s: Didn't get sequence mutex.",
+                __FUNCTION__);
     }
   }
 }
@@ -3899,26 +3941,27 @@
           !m_supported_async_json_packets_sp->GetAsArray()) {
         // We were returned something other than a JSON array.  This is
         // invalid.  Clear it out.
-        if (log)
-          log->Printf("GDBRemoteCommunicationClient::%s(): "
-                      "QSupportedAsyncJSONPackets returned invalid "
-                      "result: %s",
-                      __FUNCTION__, response.GetStringRef().c_str());
+        LLDB_LOGF(log,
+                  "GDBRemoteCommunicationClient::%s(): "
+                  "QSupportedAsyncJSONPackets returned invalid "
+                  "result: %s",
+                  __FUNCTION__, response.GetStringRef().data());
         m_supported_async_json_packets_sp.reset();
       }
     } else {
-      if (log)
-        log->Printf("GDBRemoteCommunicationClient::%s(): "
-                    "QSupportedAsyncJSONPackets unsupported",
-                    __FUNCTION__);
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationClient::%s(): "
+                "QSupportedAsyncJSONPackets unsupported",
+                __FUNCTION__);
     }
 
     if (log && m_supported_async_json_packets_sp) {
       StreamString stream;
       m_supported_async_json_packets_sp->Dump(stream);
-      log->Printf("GDBRemoteCommunicationClient::%s(): supported async "
-                  "JSON packets: %s",
-                  __FUNCTION__, stream.GetData());
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationClient::%s(): supported async "
+                "JSON packets: %s",
+                __FUNCTION__, stream.GetData());
     }
   }
 
@@ -3980,14 +4023,14 @@
       SendPacketAndWaitForResponse(stream.GetString(), response, send_async);
   if (result == PacketResult::Success) {
     // We failed if the config result comes back other than OK.
-    if (strcmp(response.GetStringRef().c_str(), "OK") == 0) {
+    if (strcmp(response.GetStringRef().data(), "OK") == 0) {
       // Okay!
       error.Clear();
     } else {
       error.SetErrorStringWithFormat("configuring StructuredData feature "
                                      "%s failed with error %s",
                                      type_name.AsCString(),
-                                     response.GetStringRef().c_str());
+                                     response.GetStringRef().data());
     }
   } else {
     // Can we get more data here on the failure?
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
index de85c9f..11fd40b 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
@@ -17,8 +17,9 @@
 #include <string>
 #include <vector>
 
+#include "lldb/Host/File.h"
 #include "lldb/Utility/ArchSpec.h"
-#include "lldb/Utility/StreamGDBRemote.h"
+#include "lldb/Utility/GDBRemote.h"
 #include "lldb/Utility/StructuredData.h"
 #if defined(_WIN32)
 #include "lldb/Host/windows/PosixApi.h"
@@ -88,7 +89,7 @@
   /// Sends a GDB remote protocol 'A' packet that delivers program
   /// arguments to the remote server.
   ///
-  /// \param[in] argv
+  /// \param[in] launch_info
   ///     A NULL terminated array of const C strings to use as the
   ///     arguments.
   ///
@@ -154,7 +155,7 @@
   /// Sets the path to use for stdin/out/err for a process
   /// that will be launched with the 'A' packet.
   ///
-  /// \param[in] path
+  /// \param[in] file_spec
   ///     The path to use for stdin/out/err
   ///
   /// \return
@@ -248,6 +249,8 @@
 
   llvm::VersionTuple GetOSVersion();
 
+  llvm::VersionTuple GetMacCatalystVersion();
+
   bool GetOSBuildString(std::string &s);
 
   bool GetOSKernelDescription(std::string &s);
@@ -348,7 +351,7 @@
   size_t GetCurrentThreadIDs(std::vector<lldb::tid_t> &thread_ids,
                              bool &sequence_mutex_unavailable);
 
-  lldb::user_id_t OpenFile(const FileSpec &file_spec, uint32_t flags,
+  lldb::user_id_t OpenFile(const FileSpec &file_spec, File::OpenOptions flags,
                            mode_t mode, Status &error);
 
   bool CloseFile(lldb::user_id_t fd, Status &error);
@@ -548,6 +551,7 @@
   ArchSpec m_host_arch;
   ArchSpec m_process_arch;
   llvm::VersionTuple m_os_version;
+  llvm::VersionTuple m_maccatalyst_version;
   std::string m_os_build;
   std::string m_os_kernel;
   std::string m_hostname;
@@ -592,6 +596,8 @@
   Status GetQXferMemoryMapRegionInfo(lldb::addr_t addr,
                                      MemoryRegionInfo &region);
 
+  LazyBool GetThreadPacketSupported(lldb::tid_t tid, llvm::StringRef packetStr);
+
 private:
   DISALLOW_COPY_AND_ASSIGN(GDBRemoteCommunicationClient);
 };
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp
index bcddb4f..9e56469 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.cpp
@@ -18,12 +18,6 @@
 using namespace lldb_private;
 using namespace lldb_private::process_gdb_remote;
 
-void GDBRemoteCommunicationHistory::Entry::Serialize(raw_ostream &strm) const {
-  yaml::Output yout(strm);
-  yout << const_cast<GDBRemoteCommunicationHistory::Entry &>(*this);
-  strm.flush();
-}
-
 GDBRemoteCommunicationHistory::GDBRemoteCommunicationHistory(uint32_t size)
     : m_packets(), m_curr_idx(0), m_total_packet_count(0),
       m_dumped_to_log(false) {
@@ -33,7 +27,8 @@
 
 GDBRemoteCommunicationHistory::~GDBRemoteCommunicationHistory() {}
 
-void GDBRemoteCommunicationHistory::AddPacket(char packet_char, PacketType type,
+void GDBRemoteCommunicationHistory::AddPacket(char packet_char,
+                                              GDBRemotePacket::Type type,
                                               uint32_t bytes_transmitted) {
   const size_t size = m_packets.size();
   if (size == 0)
@@ -45,12 +40,13 @@
   m_packets[idx].bytes_transmitted = bytes_transmitted;
   m_packets[idx].packet_idx = m_total_packet_count;
   m_packets[idx].tid = llvm::get_threadid();
-  if (m_stream)
-    m_packets[idx].Serialize(*m_stream);
+  if (m_recorder)
+    m_recorder->Record(m_packets[idx]);
 }
 
 void GDBRemoteCommunicationHistory::AddPacket(const std::string &src,
-                                              uint32_t src_len, PacketType type,
+                                              uint32_t src_len,
+                                              GDBRemotePacket::Type type,
                                               uint32_t bytes_transmitted) {
   const size_t size = m_packets.size();
   if (size == 0)
@@ -62,8 +58,8 @@
   m_packets[idx].bytes_transmitted = bytes_transmitted;
   m_packets[idx].packet_idx = m_total_packet_count;
   m_packets[idx].tid = llvm::get_threadid();
-  if (m_stream)
-    m_packets[idx].Serialize(*m_stream);
+  if (m_recorder)
+    m_recorder->Record(m_packets[idx]);
 }
 
 void GDBRemoteCommunicationHistory::Dump(Stream &strm) const {
@@ -72,13 +68,12 @@
   const uint32_t stop_idx = m_curr_idx + size;
   for (uint32_t i = first_idx; i < stop_idx; ++i) {
     const uint32_t idx = NormalizeIndex(i);
-    const Entry &entry = m_packets[idx];
-    if (entry.type == ePacketTypeInvalid || entry.packet.data.empty())
+    const GDBRemotePacket &entry = m_packets[idx];
+    if (entry.type == GDBRemotePacket::ePacketTypeInvalid ||
+        entry.packet.data.empty())
       break;
-    strm.Printf("history[%u] tid=0x%4.4" PRIx64 " <%4u> %s packet: %s\n",
-                entry.packet_idx, entry.tid, entry.bytes_transmitted,
-                (entry.type == ePacketTypeSend) ? "send" : "read",
-                entry.packet.data.c_str());
+    strm.Printf("history[%u] ", entry.packet_idx);
+    entry.Dump(strm);
   }
 }
 
@@ -92,51 +87,15 @@
   const uint32_t stop_idx = m_curr_idx + size;
   for (uint32_t i = first_idx; i < stop_idx; ++i) {
     const uint32_t idx = NormalizeIndex(i);
-    const Entry &entry = m_packets[idx];
-    if (entry.type == ePacketTypeInvalid || entry.packet.data.empty())
+    const GDBRemotePacket &entry = m_packets[idx];
+    if (entry.type == GDBRemotePacket::ePacketTypeInvalid ||
+        entry.packet.data.empty())
       break;
-    log->Printf("history[%u] tid=0x%4.4" PRIx64 " <%4u> %s packet: %s",
-                entry.packet_idx, entry.tid, entry.bytes_transmitted,
-                (entry.type == ePacketTypeSend) ? "send" : "read",
-                entry.packet.data.c_str());
+    LLDB_LOGF(log, "history[%u] tid=0x%4.4" PRIx64 " <%4u> %s packet: %s",
+              entry.packet_idx, entry.tid, entry.bytes_transmitted,
+              (entry.type == GDBRemotePacket::ePacketTypeSend) ? "send"
+                                                               : "read",
+              entry.packet.data.c_str());
   }
 }
 
-void yaml::ScalarEnumerationTraits<GDBRemoteCommunicationHistory::PacketType>::
-    enumeration(IO &io, GDBRemoteCommunicationHistory::PacketType &value) {
-  io.enumCase(value, "Invalid",
-              GDBRemoteCommunicationHistory::ePacketTypeInvalid);
-  io.enumCase(value, "Send", GDBRemoteCommunicationHistory::ePacketTypeSend);
-  io.enumCase(value, "Recv", GDBRemoteCommunicationHistory::ePacketTypeRecv);
-}
-
-void yaml::ScalarTraits<GDBRemoteCommunicationHistory::Entry::BinaryData>::
-    output(const GDBRemoteCommunicationHistory::Entry::BinaryData &Val, void *,
-           raw_ostream &Out) {
-  Out << toHex(Val.data);
-}
-
-StringRef
-yaml::ScalarTraits<GDBRemoteCommunicationHistory::Entry::BinaryData>::input(
-    StringRef Scalar, void *,
-    GDBRemoteCommunicationHistory::Entry::BinaryData &Val) {
-  Val.data = fromHex(Scalar);
-  return {};
-}
-
-void yaml::MappingTraits<GDBRemoteCommunicationHistory::Entry>::mapping(
-    IO &io, GDBRemoteCommunicationHistory::Entry &Entry) {
-  io.mapRequired("packet", Entry.packet);
-  io.mapRequired("type", Entry.type);
-  io.mapRequired("bytes", Entry.bytes_transmitted);
-  io.mapRequired("index", Entry.packet_idx);
-  io.mapRequired("tid", Entry.tid);
-}
-
-StringRef yaml::MappingTraits<GDBRemoteCommunicationHistory::Entry>::validate(
-    IO &io, GDBRemoteCommunicationHistory::Entry &Entry) {
-  if (Entry.bytes_transmitted != Entry.packet.data.size())
-    return "BinaryData size doesn't match bytes transmitted";
-
-  return {};
-}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.h b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.h
index 85f112b..ee265ef 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationHistory.h
@@ -12,11 +12,16 @@
 #include <string>
 #include <vector>
 
+#include "lldb/Utility/GDBRemote.h"
+#include "lldb/Utility/Reproducer.h"
 #include "lldb/lldb-public.h"
 #include "llvm/Support/YAMLTraits.h"
 #include "llvm/Support/raw_ostream.h"
 
 namespace lldb_private {
+namespace repro {
+class PacketRecorder;
+}
 namespace process_gdb_remote {
 
 /// The history keeps a circular buffer of GDB remote packets. The history is
@@ -25,51 +30,22 @@
 public:
   friend llvm::yaml::MappingTraits<GDBRemoteCommunicationHistory>;
 
-  enum PacketType { ePacketTypeInvalid = 0, ePacketTypeSend, ePacketTypeRecv };
-
-  /// Entry in the ring buffer containing the packet data, its type, size and
-  /// index. Entries can be serialized to file.
-  struct Entry {
-    Entry()
-        : packet(), type(ePacketTypeInvalid), bytes_transmitted(0),
-          packet_idx(0), tid(LLDB_INVALID_THREAD_ID) {}
-
-    void Clear() {
-      packet.data.clear();
-      type = ePacketTypeInvalid;
-      bytes_transmitted = 0;
-      packet_idx = 0;
-      tid = LLDB_INVALID_THREAD_ID;
-    }
-
-    struct BinaryData {
-      std::string data;
-    };
-
-    void Serialize(llvm::raw_ostream &strm) const;
-
-    BinaryData packet;
-    PacketType type;
-    uint32_t bytes_transmitted;
-    uint32_t packet_idx;
-    lldb::tid_t tid;
-  };
-
   GDBRemoteCommunicationHistory(uint32_t size = 0);
 
   ~GDBRemoteCommunicationHistory();
 
   // For single char packets for ack, nack and /x03
-  void AddPacket(char packet_char, PacketType type, uint32_t bytes_transmitted);
-
-  void AddPacket(const std::string &src, uint32_t src_len, PacketType type,
+  void AddPacket(char packet_char, GDBRemotePacket::Type type,
                  uint32_t bytes_transmitted);
 
+  void AddPacket(const std::string &src, uint32_t src_len,
+                 GDBRemotePacket::Type type, uint32_t bytes_transmitted);
+
   void Dump(Stream &strm) const;
   void Dump(Log *log) const;
   bool DidDumpToLog() const { return m_dumped_to_log; }
 
-  void SetStream(llvm::raw_ostream *strm) { m_stream = strm; }
+  void SetRecorder(repro::PacketRecorder *recorder) { m_recorder = recorder; }
 
 private:
   uint32_t GetFirstSavedPacketIndex() const {
@@ -97,59 +73,14 @@
     return m_packets.empty() ? 0 : i % m_packets.size();
   }
 
-  std::vector<Entry> m_packets;
+  std::vector<GDBRemotePacket> m_packets;
   uint32_t m_curr_idx;
   uint32_t m_total_packet_count;
   mutable bool m_dumped_to_log;
-  llvm::raw_ostream *m_stream = nullptr;
+  repro::PacketRecorder *m_recorder = nullptr;
 };
 
 } // namespace process_gdb_remote
 } // namespace lldb_private
 
-LLVM_YAML_IS_DOCUMENT_LIST_VECTOR(
-    lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::Entry)
-
-namespace llvm {
-namespace yaml {
-
-template <>
-struct ScalarEnumerationTraits<lldb_private::process_gdb_remote::
-                                   GDBRemoteCommunicationHistory::PacketType> {
-  static void enumeration(IO &io,
-                          lldb_private::process_gdb_remote::
-                              GDBRemoteCommunicationHistory::PacketType &value);
-};
-
-template <>
-struct ScalarTraits<lldb_private::process_gdb_remote::
-                        GDBRemoteCommunicationHistory::Entry::BinaryData> {
-  static void output(const lldb_private::process_gdb_remote::
-                         GDBRemoteCommunicationHistory::Entry::BinaryData &,
-                     void *, raw_ostream &);
-
-  static StringRef
-  input(StringRef, void *,
-        lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::Entry::
-            BinaryData &);
-
-  static QuotingType mustQuote(StringRef S) { return QuotingType::None; }
-};
-
-template <>
-struct MappingTraits<
-    lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::Entry> {
-  static void
-  mapping(IO &io,
-          lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::Entry
-              &Entry);
-
-  static StringRef validate(
-      IO &io,
-      lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::Entry &);
-};
-
-} // namespace yaml
-} // namespace llvm
-
 #endif // liblldb_GDBRemoteCommunicationHistory_h_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp
index 417f573..15c73e7 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp
@@ -9,6 +9,7 @@
 #include <errno.h>
 
 #include "lldb/Host/Config.h"
+#include "llvm/ADT/ScopeExit.h"
 
 #include "GDBRemoteCommunicationReplayServer.h"
 #include "ProcessGDBRemoteLog.h"
@@ -127,7 +128,7 @@
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
   while (!m_packet_history.empty()) {
     // Pop last packet from the history.
-    GDBRemoteCommunicationHistory::Entry entry = m_packet_history.back();
+    GDBRemotePacket entry = m_packet_history.back();
     m_packet_history.pop_back();
 
     // We've handled the handshake implicitly before. Skip the packet and move
@@ -135,28 +136,35 @@
     if (entry.packet.data == "+")
       continue;
 
-    if (entry.type == GDBRemoteCommunicationHistory::ePacketTypeSend) {
+    if (entry.type == GDBRemotePacket::ePacketTypeSend) {
       if (unexpected(entry.packet.data, packet.GetStringRef())) {
         LLDB_LOG(log,
                  "GDBRemoteCommunicationReplayServer expected packet: '{0}'",
                  entry.packet.data);
         LLDB_LOG(log, "GDBRemoteCommunicationReplayServer actual packet: '{0}'",
                  packet.GetStringRef());
-        assert(false && "Encountered unexpected packet during replay");
+#ifndef NDEBUG
+        // This behaves like a regular assert, but prints the expected and
+        // received packet before aborting.
+        printf("Reproducer expected packet: '%s'\n", entry.packet.data.c_str());
+        printf("Reproducer received packet: '%s'\n",
+               packet.GetStringRef().data());
+        llvm::report_fatal_error("Encountered unexpected packet during replay");
+#endif
         return PacketResult::ErrorSendFailed;
       }
 
       // Ignore QEnvironment packets as they're handled earlier.
       if (entry.packet.data.find("QEnvironment") == 1) {
         assert(m_packet_history.back().type ==
-               GDBRemoteCommunicationHistory::ePacketTypeRecv);
+               GDBRemotePacket::ePacketTypeRecv);
         m_packet_history.pop_back();
       }
 
       continue;
     }
 
-    if (entry.type == GDBRemoteCommunicationHistory::ePacketTypeInvalid) {
+    if (entry.type == GDBRemotePacket::ePacketTypeInvalid) {
       LLDB_LOG(
           log,
           "GDBRemoteCommunicationReplayServer skipped invalid packet: '{0}'",
@@ -175,10 +183,6 @@
   return packet_result;
 }
 
-LLVM_YAML_IS_DOCUMENT_LIST_VECTOR(
-    std::vector<
-        lldb_private::process_gdb_remote::GDBRemoteCommunicationHistory::Entry>)
-
 llvm::Error
 GDBRemoteCommunicationReplayServer::LoadReplayHistory(const FileSpec &path) {
   auto error_or_file = MemoryBuffer::getFile(path.GetPath());
@@ -207,9 +211,9 @@
         "<lldb.gdb-replay.async>",
         GDBRemoteCommunicationReplayServer::AsyncThread, this);
     if (!async_thread) {
-      LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST),
-               "failed to launch host thread: {}",
-               llvm::toString(async_thread.takeError()));
+      LLDB_LOG_ERROR(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST),
+                     async_thread.takeError(),
+                     "failed to launch host thread: {}");
       return false;
     }
     m_async_thread = *async_thread;
@@ -256,11 +260,10 @@
 thread_result_t GDBRemoteCommunicationReplayServer::AsyncThread(void *arg) {
   GDBRemoteCommunicationReplayServer *server =
       (GDBRemoteCommunicationReplayServer *)arg;
-
+  auto D = make_scope_exit([&]() { server->Disconnect(); });
   EventSP event_sp;
   bool done = false;
-
-  while (true) {
+  while (!done) {
     if (server->m_async_listener_sp->GetEvent(event_sp, llvm::None)) {
       const uint32_t event_type = event_sp->GetType();
       if (event_sp->BroadcasterIs(&server->m_async_broadcaster)) {
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.h b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.h
index 26d65e2..0b5e910 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.h
@@ -62,7 +62,7 @@
   static lldb::thread_result_t AsyncThread(void *arg);
 
   /// Replay history with the oldest packet at the end.
-  std::vector<GDBRemoteCommunicationHistory::Entry> m_packet_history;
+  std::vector<GDBRemotePacket> m_packet_history;
 
   /// Server thread.
   Broadcaster m_async_broadcaster;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
index 49cbeb0..ac6ecff 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp
@@ -59,14 +59,13 @@
       break;
 
     case StringExtractorGDBRemote::eServerPacketType_unimplemented:
-      packet_result = SendUnimplementedResponse(packet.GetStringRef().c_str());
+      packet_result = SendUnimplementedResponse(packet.GetStringRef().data());
       break;
 
     default:
       auto handler_it = m_packet_handlers.find(packet_type);
       if (handler_it == m_packet_handlers.end())
-        packet_result =
-            SendUnimplementedResponse(packet.GetStringRef().c_str());
+        packet_result = SendUnimplementedResponse(packet.GetStringRef().data());
       else
         packet_result = handler_it->second(packet, error, interrupt, quit);
       break;
@@ -139,10 +138,9 @@
 GDBRemoteCommunicationServer::SendIllFormedResponse(
     const StringExtractorGDBRemote &failed_packet, const char *message) {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PACKETS));
-  if (log)
-    log->Printf("GDBRemoteCommunicationServer::%s: ILLFORMED: '%s' (%s)",
-                __FUNCTION__, failed_packet.GetStringRef().c_str(),
-                message ? message : "");
+  LLDB_LOGF(log, "GDBRemoteCommunicationServer::%s: ILLFORMED: '%s' (%s)",
+            __FUNCTION__, failed_packet.GetStringRef().data(),
+            message ? message : "");
   return SendErrorResponse(0x03);
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
index d095c7a..4b5fc07 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp
@@ -29,12 +29,13 @@
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Target/Platform.h"
 #include "lldb/Utility/Endian.h"
-#include "lldb/Utility/JSON.h"
+#include "lldb/Utility/GDBRemote.h"
 #include "lldb/Utility/Log.h"
-#include "lldb/Utility/StreamGDBRemote.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StructuredData.h"
+#include "llvm/ADT/StringSwitch.h"
 #include "llvm/ADT/Triple.h"
+#include "llvm/Support/JSON.h"
 
 #include "ProcessGDBRemoteLog.h"
 #include "lldb/Utility/StringExtractorGDBRemote.h"
@@ -43,11 +44,10 @@
 #include "lldb/Host/android/HostInfoAndroid.h"
 #endif
 
-#include "llvm/ADT/StringSwitch.h"
 
 using namespace lldb;
-using namespace lldb_private;
 using namespace lldb_private::process_gdb_remote;
+using namespace lldb_private;
 
 #ifdef __ANDROID__
 const static uint32_t g_default_packet_timeout_sec = 20; // seconds
@@ -231,6 +231,7 @@
 
 #else
   if (host_arch.GetMachine() == llvm::Triple::aarch64 ||
+      host_arch.GetMachine() == llvm::Triple::aarch64_32 ||
       host_arch.GetMachine() == llvm::Triple::aarch64_be ||
       host_arch.GetMachine() == llvm::Triple::arm ||
       host_arch.GetMachine() == llvm::Triple::armeb || host_arch.IsMIPS())
@@ -260,6 +261,15 @@
     response.PutChar(';');
   }
 
+#if defined(__APPLE__)
+  llvm::VersionTuple maccatalyst_version = HostInfo::GetMacCatalystVersion();
+  if (!maccatalyst_version.empty()) {
+    response.Format("maccatalyst_version:{0}",
+                    maccatalyst_version.getAsString());
+    response.PutChar(';');
+  }
+#endif
+
   std::string s;
   if (HostInfo::GetOSBuildString(s)) {
     response.PutCString("os_build:");
@@ -419,10 +429,9 @@
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServerCommon::Handle_qUserName(
     StringExtractorGDBRemote &packet) {
-#if !defined(LLDB_DISABLE_POSIX)
+#if LLDB_ENABLE_POSIX
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerCommon::%s begin", __FUNCTION__);
+  LLDB_LOGF(log, "GDBRemoteCommunicationServerCommon::%s begin", __FUNCTION__);
 
   // Packet format: "qUserName:%i" where %i is the uid
   packet.SetFilePos(::strlen("qUserName:"));
@@ -435,8 +444,7 @@
       return SendPacketNoLock(response.GetString());
     }
   }
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerCommon::%s end", __FUNCTION__);
+  LLDB_LOGF(log, "GDBRemoteCommunicationServerCommon::%s end", __FUNCTION__);
 #endif
   return SendErrorResponse(5);
 }
@@ -444,7 +452,7 @@
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServerCommon::Handle_qGroupName(
     StringExtractorGDBRemote &packet) {
-#if !defined(LLDB_DISABLE_POSIX)
+#if LLDB_ENABLE_POSIX
   // Packet format: "qGroupName:%i" where %i is the gid
   packet.SetFilePos(::strlen("qGroupName:"));
   uint32_t gid = packet.GetU32(UINT32_MAX);
@@ -500,19 +508,32 @@
   packet.GetHexByteStringTerminatedBy(path, ',');
   if (!path.empty()) {
     if (packet.GetChar() == ',') {
-      uint32_t flags = packet.GetHexMaxU32(false, 0);
+      // FIXME
+      // The flag values for OpenOptions do not match the values used by GDB
+      // * https://sourceware.org/gdb/onlinedocs/gdb/Open-Flags.html#Open-Flags
+      // * rdar://problem/46788934
+      auto flags = File::OpenOptions(packet.GetHexMaxU32(false, 0));
       if (packet.GetChar() == ',') {
         mode_t mode = packet.GetHexMaxU32(false, 0600);
         FileSpec path_spec(path);
         FileSystem::Instance().Resolve(path_spec);
-        File file;
         // Do not close fd.
-        Status error =
-            FileSystem::Instance().Open(file, path_spec, flags, mode, false);
-        const int save_errno = error.GetError();
+        auto file = FileSystem::Instance().Open(path_spec, flags, mode, false);
+
+        int save_errno = 0;
+        int descriptor = File::kInvalidDescriptor;
+        if (file) {
+          descriptor = file.get()->GetDescriptor();
+        } else {
+          std::error_code code = errorToErrorCode(file.takeError());
+          if (code.category() == std::system_category()) {
+            save_errno = code.value();
+          }
+        }
+
         StreamString response;
         response.PutChar('F');
-        response.Printf("%i", file.GetDescriptor());
+        response.Printf("%i", descriptor);
         if (save_errno)
           response.Printf(",%i", save_errno);
         return SendPacketNoLock(response.GetString());
@@ -530,7 +551,7 @@
   int err = -1;
   int save_errno = 0;
   if (fd >= 0) {
-    File file(fd, true);
+    NativeFile file(fd, File::OpenOptions(0), true);
     Status error = file.Close();
     err = 0;
     save_errno = error.GetError();
@@ -552,16 +573,16 @@
   packet.SetFilePos(::strlen("vFile:pread:"));
   int fd = packet.GetS32(-1);
   if (packet.GetChar() == ',') {
-    size_t count = packet.GetU64(UINT64_MAX);
+    size_t count = packet.GetU64(SIZE_MAX);
     if (packet.GetChar() == ',') {
       off_t offset = packet.GetU64(UINT32_MAX);
-      if (count == UINT64_MAX) {
+      if (count == SIZE_MAX) {
         response.Printf("F-1:%i", EINVAL);
         return SendPacketNoLock(response.GetString());
       }
 
       std::string buffer(count, 0);
-      File file(fd, false);
+      NativeFile file(fd, File::eOpenOptionRead, false);
       Status error = file.Read(static_cast<void *>(&buffer[0]), count, offset);
       const ssize_t bytes_read = error.Success() ? count : -1;
       const int save_errno = error.GetError();
@@ -593,7 +614,7 @@
     if (packet.GetChar() == ',') {
       std::string buffer;
       if (packet.GetEscapedBinaryData(buffer)) {
-        File file(fd, false);
+        NativeFile file(fd, File::eOpenOptionWrite, false);
         size_t count = buffer.size();
         Status error =
             file.Write(static_cast<const void *>(&buffer[0]), count, offset);
@@ -825,6 +846,7 @@
 #if defined(__linux__) || defined(__NetBSD__)
   response.PutCString(";QPassSignals+");
   response.PutCString(";qXfer:auxv:read+");
+  response.PutCString(";qXfer:libraries-svr4:read+");
 #endif
 
   return SendPacketNoLock(response.GetString());
@@ -1016,9 +1038,8 @@
                   m_process_launch_info.GetExecutableFile().SetFile(
                       arg, FileSpec::Style::native);
                 m_process_launch_info.GetArguments().AppendArgument(arg);
-                if (log)
-                  log->Printf("LLGSPacketHandler::%s added arg %d: \"%s\"",
-                              __FUNCTION__, actual_arg_index, arg.c_str());
+                LLDB_LOGF(log, "LLGSPacketHandler::%s added arg %d: \"%s\"",
+                          __FUNCTION__, actual_arg_index, arg.c_str());
                 ++actual_arg_index;
               }
             }
@@ -1104,6 +1125,8 @@
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServerCommon::Handle_jModulesInfo(
     StringExtractorGDBRemote &packet) {
+  namespace json = llvm::json;
+
   packet.SetFilePos(::strlen("jModulesInfo:"));
 
   StructuredData::ObjectSP object_sp = StructuredData::ParseJSON(packet.Peek());
@@ -1114,7 +1137,7 @@
   if (!packet_array)
     return SendErrorResponse(2);
 
-  JSONArray::SP response_array_sp = std::make_shared<JSONArray>();
+  json::Array response_array;
   for (size_t i = 0; i < packet_array->GetSize(); ++i) {
     StructuredData::Dictionary *query =
         packet_array->GetItemAtIndex(i)->GetAsDictionary();
@@ -1132,27 +1155,22 @@
     const auto file_offset = matched_module_spec.GetObjectOffset();
     const auto file_size = matched_module_spec.GetObjectSize();
     const auto uuid_str = matched_module_spec.GetUUID().GetAsString("");
-
     if (uuid_str.empty())
       continue;
+    const auto triple_str =
+        matched_module_spec.GetArchitecture().GetTriple().getTriple();
+    const auto file_path = matched_module_spec.GetFileSpec().GetPath();
 
-    JSONObject::SP response = std::make_shared<JSONObject>();
-    response_array_sp->AppendObject(response);
-    response->SetObject("uuid", std::make_shared<JSONString>(uuid_str));
-    response->SetObject(
-        "triple",
-        std::make_shared<JSONString>(
-            matched_module_spec.GetArchitecture().GetTriple().getTriple()));
-    response->SetObject("file_path",
-                        std::make_shared<JSONString>(
-                            matched_module_spec.GetFileSpec().GetPath()));
-    response->SetObject("file_offset",
-                        std::make_shared<JSONNumber>(file_offset));
-    response->SetObject("file_size", std::make_shared<JSONNumber>(file_size));
+    json::Object response{{"uuid", uuid_str},
+                          {"triple", triple_str},
+                          {"file_path", file_path},
+                          {"file_offset", static_cast<int64_t>(file_offset)},
+                          {"file_size", static_cast<int64_t>(file_size)}};
+    response_array.push_back(std::move(response));
   }
 
   StreamString response;
-  response_array_sp->Write(response);
+  response.AsRawOstream() << std::move(response_array);
   StreamGDBRemote escaped_response;
   escaped_response.PutEscapedBytes(response.GetString().data(),
                                    response.GetSize());
@@ -1168,6 +1186,15 @@
       proc_info.GetEffectiveUserID(), proc_info.GetEffectiveGroupID());
   response.PutCString("name:");
   response.PutStringAsRawHex8(proc_info.GetExecutableFile().GetCString());
+
+  response.PutChar(';');
+  response.PutCString("args:");
+  response.PutStringAsRawHex8(proc_info.GetArg0());
+  for (auto &arg : proc_info.GetArguments()) {
+    response.PutChar('-');
+    response.PutStringAsRawHex8(arg.ref());
+  }
+
   response.PutChar(';');
   const ArchSpec &proc_arch = proc_info.GetArchitecture();
   if (proc_arch.IsValid()) {
@@ -1217,6 +1244,7 @@
       case llvm::Triple::arm:
       case llvm::Triple::thumb:
       case llvm::Triple::aarch64:
+      case llvm::Triple::aarch64_32:
         ostype = "ios";
         break;
       default:
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 1966076..f33f0ee 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -11,7 +11,7 @@
 #include "lldb/Host/Config.h"
 
 #include "GDBRemoteCommunicationServerLLGS.h"
-#include "lldb/Utility/StreamGDBRemote.h"
+#include "lldb/Utility/GDBRemote.h"
 
 #include <chrono>
 #include <cstring>
@@ -32,7 +32,6 @@
 #include "lldb/Utility/Args.h"
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/Endian.h"
-#include "lldb/Utility/JSON.h"
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/RegisterValue.h"
@@ -40,6 +39,7 @@
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/UriParser.h"
 #include "llvm/ADT/Triple.h"
+#include "llvm/Support/JSON.h"
 #include "llvm/Support/ScopedPrinter.h"
 
 #include "ProcessGDBRemote.h"
@@ -217,8 +217,13 @@
   m_process_launch_info.GetFlags().Set(eLaunchFlagDebug);
 
   if (should_forward_stdio) {
+    // Temporarily relax the following for Windows until we can take advantage
+    // of the recently added pty support. This doesn't really affect the use of
+    // lldb-server on Windows.
+#if !defined(_WIN32)
     if (llvm::Error Err = m_process_launch_info.SetUpPtyRedirection())
       return Status(std::move(Err));
+#endif
   }
 
   {
@@ -249,18 +254,18 @@
     // Setup stdout/stderr mapping from inferior to $O
     auto terminal_fd = m_debugged_process_up->GetTerminalFileDescriptor();
     if (terminal_fd >= 0) {
-      if (log)
-        log->Printf("ProcessGDBRemoteCommunicationServerLLGS::%s setting "
-                    "inferior STDIO fd to %d",
-                    __FUNCTION__, terminal_fd);
+      LLDB_LOGF(log,
+                "ProcessGDBRemoteCommunicationServerLLGS::%s setting "
+                "inferior STDIO fd to %d",
+                __FUNCTION__, terminal_fd);
       Status status = SetSTDIOFileDescriptor(terminal_fd);
       if (status.Fail())
         return status;
     } else {
-      if (log)
-        log->Printf("ProcessGDBRemoteCommunicationServerLLGS::%s ignoring "
-                    "inferior STDIO since terminal fd reported as %d",
-                    __FUNCTION__, terminal_fd);
+      LLDB_LOGF(log,
+                "ProcessGDBRemoteCommunicationServerLLGS::%s ignoring "
+                "inferior STDIO since terminal fd reported as %d",
+                __FUNCTION__, terminal_fd);
     }
   } else {
     LLDB_LOG(log,
@@ -278,9 +283,8 @@
 
 Status GDBRemoteCommunicationServerLLGS::AttachToProcess(lldb::pid_t pid) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64,
-                __FUNCTION__, pid);
+  LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64,
+            __FUNCTION__, pid);
 
   // Before we try to attach, make sure we aren't already monitoring something
   // else.
@@ -304,18 +308,18 @@
   // Setup stdout/stderr mapping from inferior.
   auto terminal_fd = m_debugged_process_up->GetTerminalFileDescriptor();
   if (terminal_fd >= 0) {
-    if (log)
-      log->Printf("ProcessGDBRemoteCommunicationServerLLGS::%s setting "
-                  "inferior STDIO fd to %d",
-                  __FUNCTION__, terminal_fd);
+    LLDB_LOGF(log,
+              "ProcessGDBRemoteCommunicationServerLLGS::%s setting "
+              "inferior STDIO fd to %d",
+              __FUNCTION__, terminal_fd);
     Status status = SetSTDIOFileDescriptor(terminal_fd);
     if (status.Fail())
       return status;
   } else {
-    if (log)
-      log->Printf("ProcessGDBRemoteCommunicationServerLLGS::%s ignoring "
-                  "inferior STDIO since terminal fd reported as %d",
-                  __FUNCTION__, terminal_fd);
+    LLDB_LOGF(log,
+              "ProcessGDBRemoteCommunicationServerLLGS::%s ignoring "
+              "inferior STDIO since terminal fd reported as %d",
+              __FUNCTION__, terminal_fd);
   }
 
   printf("Attached to process %" PRIu64 "...\n", pid);
@@ -327,10 +331,11 @@
   assert(process && "process cannot be NULL");
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
   if (log) {
-    log->Printf("GDBRemoteCommunicationServerLLGS::%s called with "
-                "NativeProcessProtocol pid %" PRIu64 ", current state: %s",
-                __FUNCTION__, process->GetID(),
-                StateAsCString(process->GetState()));
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s called with "
+              "NativeProcessProtocol pid %" PRIu64 ", current state: %s",
+              __FUNCTION__, process->GetID(),
+              StateAsCString(process->GetState()));
   }
 }
 
@@ -397,19 +402,21 @@
   }
 }
 
-static JSONObject::SP GetRegistersAsJSON(NativeThreadProtocol &thread) {
+static llvm::Expected<json::Object>
+GetRegistersAsJSON(NativeThreadProtocol &thread) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD));
 
   NativeRegisterContext& reg_ctx = thread.GetRegisterContext();
 
-  JSONObject::SP register_object_sp = std::make_shared<JSONObject>();
+  json::Object register_object;
 
 #ifdef LLDB_JTHREADSINFO_FULL_REGISTER_SET
   // Expedite all registers in the first register set (i.e. should be GPRs)
   // that are not contained in other registers.
   const RegisterSet *reg_set_p = reg_ctx_sp->GetRegisterSet(0);
   if (!reg_set_p)
-    return nullptr;
+    return llvm::make_error<llvm::StringError>("failed to get registers",
+                                               llvm::inconvertibleErrorCode());
   for (const uint32_t *reg_num_p = reg_set_p->registers;
        *reg_num_p != LLDB_INVALID_REGNUM; ++reg_num_p) {
     uint32_t reg_num = *reg_num_p;
@@ -431,10 +438,9 @@
     const RegisterInfo *const reg_info_p =
         reg_ctx.GetRegisterInfoAtIndex(reg_num);
     if (reg_info_p == nullptr) {
-      if (log)
-        log->Printf(
-            "%s failed to get register info for register index %" PRIu32,
-            __FUNCTION__, reg_num);
+      LLDB_LOGF(log,
+                "%s failed to get register info for register index %" PRIu32,
+                __FUNCTION__, reg_num);
       continue;
     }
 
@@ -445,11 +451,10 @@
     RegisterValue reg_value;
     Status error = reg_ctx.ReadRegister(reg_info_p, reg_value);
     if (error.Fail()) {
-      if (log)
-        log->Printf("%s failed to read register '%s' index %" PRIu32 ": %s",
-                    __FUNCTION__,
-                    reg_info_p->name ? reg_info_p->name : "<unnamed-register>",
-                    reg_num, error.AsCString());
+      LLDB_LOGF(log, "%s failed to read register '%s' index %" PRIu32 ": %s",
+                __FUNCTION__,
+                reg_info_p->name ? reg_info_p->name : "<unnamed-register>",
+                reg_num, error.AsCString());
       continue;
     }
 
@@ -457,12 +462,11 @@
     WriteRegisterValueInHexFixedWidth(stream, reg_ctx, *reg_info_p,
                                       &reg_value, lldb::eByteOrderBig);
 
-    register_object_sp->SetObject(
-        llvm::to_string(reg_num),
-        std::make_shared<JSONString>(stream.GetString()));
+    register_object.try_emplace(llvm::to_string(reg_num),
+                                stream.GetString().str());
   }
 
-  return register_object_sp;
+  return register_object;
 }
 
 static const char *GetStopReasonString(StopReason stop_reason) {
@@ -489,11 +493,11 @@
   return nullptr;
 }
 
-static JSONArray::SP GetJSONThreadsInfo(NativeProcessProtocol &process,
-                                        bool abridged) {
+static llvm::Expected<json::Array>
+GetJSONThreadsInfo(NativeProcessProtocol &process, bool abridged) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD));
 
-  JSONArray::SP threads_array_sp = std::make_shared<JSONArray>();
+  json::Array threads_array;
 
   // Ensure we can get info on the given thread.
   uint32_t thread_idx = 0;
@@ -507,61 +511,62 @@
     struct ThreadStopInfo tid_stop_info;
     std::string description;
     if (!thread->GetStopReason(tid_stop_info, description))
-      return nullptr;
+      return llvm::make_error<llvm::StringError>(
+          "failed to get stop reason", llvm::inconvertibleErrorCode());
 
     const int signum = tid_stop_info.details.signal.signo;
     if (log) {
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
-                  " tid %" PRIu64
-                  " got signal signo = %d, reason = %d, exc_type = %" PRIu64,
-                  __FUNCTION__, process.GetID(), tid, signum,
-                  tid_stop_info.reason, tid_stop_info.details.exception.type);
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
+                " tid %" PRIu64
+                " got signal signo = %d, reason = %d, exc_type = %" PRIu64,
+                __FUNCTION__, process.GetID(), tid, signum,
+                tid_stop_info.reason, tid_stop_info.details.exception.type);
     }
 
-    JSONObject::SP thread_obj_sp = std::make_shared<JSONObject>();
-    threads_array_sp->AppendObject(thread_obj_sp);
+    json::Object thread_obj;
 
     if (!abridged) {
-      if (JSONObject::SP registers_sp = GetRegistersAsJSON(*thread))
-        thread_obj_sp->SetObject("registers", registers_sp);
+      if (llvm::Expected<json::Object> registers =
+              GetRegistersAsJSON(*thread)) {
+        thread_obj.try_emplace("registers", std::move(*registers));
+      } else {
+        return registers.takeError();
+      }
     }
 
-    thread_obj_sp->SetObject("tid", std::make_shared<JSONNumber>(tid));
+    thread_obj.try_emplace("tid", static_cast<int64_t>(tid));
+
     if (signum != 0)
-      thread_obj_sp->SetObject("signal", std::make_shared<JSONNumber>(signum));
+      thread_obj.try_emplace("signal", signum);
 
     const std::string thread_name = thread->GetName();
     if (!thread_name.empty())
-      thread_obj_sp->SetObject("name",
-                               std::make_shared<JSONString>(thread_name));
+      thread_obj.try_emplace("name", thread_name);
 
-    if (const char *stop_reason_str = GetStopReasonString(tid_stop_info.reason))
-      thread_obj_sp->SetObject("reason",
-                               std::make_shared<JSONString>(stop_reason_str));
+    const char *stop_reason = GetStopReasonString(tid_stop_info.reason);
+    if (stop_reason)
+      thread_obj.try_emplace("reason", stop_reason);
 
     if (!description.empty())
-      thread_obj_sp->SetObject("description",
-                               std::make_shared<JSONString>(description));
+      thread_obj.try_emplace("description", description);
 
     if ((tid_stop_info.reason == eStopReasonException) &&
         tid_stop_info.details.exception.type) {
-      thread_obj_sp->SetObject(
-          "metype",
-          std::make_shared<JSONNumber>(tid_stop_info.details.exception.type));
+      thread_obj.try_emplace(
+          "metype", static_cast<int64_t>(tid_stop_info.details.exception.type));
 
-      JSONArray::SP medata_array_sp = std::make_shared<JSONArray>();
+      json::Array medata_array;
       for (uint32_t i = 0; i < tid_stop_info.details.exception.data_count;
            ++i) {
-        medata_array_sp->AppendObject(std::make_shared<JSONNumber>(
-            tid_stop_info.details.exception.data[i]));
+        medata_array.push_back(
+            static_cast<int64_t>(tid_stop_info.details.exception.data[i]));
       }
-      thread_obj_sp->SetObject("medata", medata_array_sp);
+      thread_obj.try_emplace("medata", std::move(medata_array));
     }
-
-    // TODO: Expedite interesting regions of inferior memory
+    threads_array.push_back(std::move(thread_obj));
   }
-
-  return threads_array_sp;
+  return threads_array;
 }
 
 GDBRemoteCommunication::PacketResult
@@ -653,19 +658,21 @@
     // is hex ascii JSON that contains the thread IDs thread stop info only for
     // threads that have stop reasons. Only send this if we have more than one
     // thread otherwise this packet has all the info it needs.
-    if (thread_index > 0) {
+    if (thread_index > 1) {
       const bool threads_with_valid_stop_info_only = true;
-      JSONArray::SP threads_info_sp = GetJSONThreadsInfo(
+      llvm::Expected<json::Array> threads_info = GetJSONThreadsInfo(
           *m_debugged_process_up, threads_with_valid_stop_info_only);
-      if (threads_info_sp) {
+      if (threads_info) {
         response.PutCString("jstopinfo:");
         StreamString unescaped_response;
-        threads_info_sp->Write(unescaped_response);
+        unescaped_response.AsRawOstream() << std::move(*threads_info);
         response.PutStringAsRawHex8(unescaped_response.GetData());
         response.PutChar(';');
-      } else
-        LLDB_LOG(log, "failed to prepare a jstopinfo field for pid {0}",
-                 m_debugged_process_up->GetID());
+      } else {
+        LLDB_LOG_ERROR(log, threads_info.takeError(),
+                       "failed to prepare a jstopinfo field for pid {1}: {0}",
+                       m_debugged_process_up->GetID());
+      }
     }
 
     uint32_t i = 0;
@@ -684,12 +691,10 @@
       RegisterValue reg_value;
       Status error = reg_ctx.ReadRegister(reg_info_p, reg_value);
       if (error.Fail()) {
-        if (log)
-          log->Printf("%s failed to read register '%s' index %" PRIu32 ": %s",
-                      __FUNCTION__,
-                      reg_info_p->name ? reg_info_p->name
-                                       : "<unnamed-register>",
-                      reg_to_read, error.AsCString());
+        LLDB_LOGF(log, "%s failed to read register '%s' index %" PRIu32 ": %s",
+                  __FUNCTION__,
+                  reg_info_p->name ? reg_info_p->name : "<unnamed-register>",
+                  reg_to_read, error.AsCString());
         continue;
       }
 
@@ -713,25 +718,24 @@
   const RegisterSet *reg_set_p;
   if (reg_ctx.GetRegisterSetCount() > 0 &&
       ((reg_set_p = reg_ctx.GetRegisterSet(0)) != nullptr)) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s expediting registers "
-                  "from set '%s' (registers set count: %zu)",
-                  __FUNCTION__,
-                  reg_set_p->name ? reg_set_p->name : "<unnamed-set>",
-                  reg_set_p->num_registers);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s expediting registers "
+              "from set '%s' (registers set count: %zu)",
+              __FUNCTION__, reg_set_p->name ? reg_set_p->name : "<unnamed-set>",
+              reg_set_p->num_registers);
 
     for (const uint32_t *reg_num_p = reg_set_p->registers;
          *reg_num_p != LLDB_INVALID_REGNUM; ++reg_num_p) {
       const RegisterInfo *const reg_info_p =
           reg_ctx.GetRegisterInfoAtIndex(*reg_num_p);
       if (reg_info_p == nullptr) {
-        if (log)
-          log->Printf("GDBRemoteCommunicationServerLLGS::%s failed to get "
-                      "register info for register set '%s', register index "
-                      "%" PRIu32,
-                      __FUNCTION__,
-                      reg_set_p->name ? reg_set_p->name : "<unnamed-set>",
-                      *reg_num_p);
+        LLDB_LOGF(log,
+                  "GDBRemoteCommunicationServerLLGS::%s failed to get "
+                  "register info for register set '%s', register index "
+                  "%" PRIu32,
+                  __FUNCTION__,
+                  reg_set_p->name ? reg_set_p->name : "<unnamed-set>",
+                  *reg_num_p);
       } else if (reg_info_p->value_regs == nullptr) {
         // Only expediate registers that are not contained in other registers.
         RegisterValue reg_value;
@@ -742,13 +746,12 @@
                                             &reg_value, lldb::eByteOrderBig);
           response.PutChar(';');
         } else {
-          if (log)
-            log->Printf("GDBRemoteCommunicationServerLLGS::%s failed to read "
-                        "register '%s' index %" PRIu32 ": %s",
-                        __FUNCTION__,
-                        reg_info_p->name ? reg_info_p->name
-                                         : "<unnamed-register>",
-                        *reg_num_p, error.AsCString());
+          LLDB_LOGF(log,
+                    "GDBRemoteCommunicationServerLLGS::%s failed to read "
+                    "register '%s' index %" PRIu32 ": %s",
+                    __FUNCTION__,
+                    reg_info_p->name ? reg_info_p->name : "<unnamed-register>",
+                    *reg_num_p, error.AsCString());
         }
       }
     }
@@ -787,15 +790,14 @@
   assert(process && "process cannot be NULL");
 
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__);
+  LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__);
 
   PacketResult result = SendStopReasonForState(StateType::eStateExited);
   if (result != PacketResult::Success) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed to send stop "
-                  "notification for PID %" PRIu64 ", state: eStateExited",
-                  __FUNCTION__, process->GetID());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed to send stop "
+              "notification for PID %" PRIu64 ", state: eStateExited",
+              __FUNCTION__, process->GetID());
   }
 
   // Close the pipe to the inferior terminal i/o if we launched it and set one
@@ -812,8 +814,7 @@
   assert(process && "process cannot be NULL");
 
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__);
+  LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__);
 
   // Send the stop reason unless this is the stop after the launch or attach.
   switch (m_inferior_prev_state) {
@@ -825,10 +826,10 @@
     // In all other cases, send the stop reason.
     PacketResult result = SendStopReasonForState(StateType::eStateStopped);
     if (result != PacketResult::Success) {
-      if (log)
-        log->Printf("GDBRemoteCommunicationServerLLGS::%s failed to send stop "
-                    "notification for PID %" PRIu64 ", state: eStateExited",
-                    __FUNCTION__, process->GetID());
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationServerLLGS::%s failed to send stop "
+                "notification for PID %" PRIu64 ", state: eStateExited",
+                __FUNCTION__, process->GetID());
     }
     break;
   }
@@ -839,9 +840,10 @@
   assert(process && "process cannot be NULL");
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
   if (log) {
-    log->Printf("GDBRemoteCommunicationServerLLGS::%s called with "
-                "NativeProcessProtocol pid %" PRIu64 ", state: %s",
-                __FUNCTION__, process->GetID(), StateAsCString(state));
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s called with "
+              "NativeProcessProtocol pid %" PRIu64 ", state: %s",
+              __FUNCTION__, process->GetID(), StateAsCString(state));
   }
 
   switch (state) {
@@ -868,9 +870,10 @@
 
   default:
     if (log) {
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s didn't handle state "
-                  "change for pid %" PRIu64 ", new state: %s",
-                  __FUNCTION__, process->GetID(), StateAsCString(state));
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationServerLLGS::%s didn't handle state "
+                "change for pid %" PRIu64 ", new state: %s",
+                __FUNCTION__, process->GetID(), StateAsCString(state));
     }
     break;
   }
@@ -888,10 +891,10 @@
 
   if (!m_handshake_completed) {
     if (!HandshakeWithClient()) {
-      if (log)
-        log->Printf("GDBRemoteCommunicationServerLLGS::%s handshake with "
-                    "client failed, exiting",
-                    __FUNCTION__);
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationServerLLGS::%s handshake with "
+                "client failed, exiting",
+                __FUNCTION__);
       m_mainloop.RequestTermination();
       return;
     }
@@ -908,10 +911,10 @@
       break; // No more packets in the queue
 
     if ((result != PacketResult::Success)) {
-      if (log)
-        log->Printf("GDBRemoteCommunicationServerLLGS::%s processing a packet "
-                    "failed: %s",
-                    __FUNCTION__, error.AsCString());
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationServerLLGS::%s processing a packet "
+                "failed: %s",
+                __FUNCTION__, error.AsCString());
       m_mainloop.RequestTermination();
       break;
     }
@@ -982,9 +985,10 @@
     // Not much we can do about the failure. Log it and continue without
     // forwarding.
     if (Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS))
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s Failed to set up stdio "
-                  "forwarding: %s",
-                  __FUNCTION__, error.AsCString());
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationServerLLGS::%s Failed to set up stdio "
+                "forwarding: %s",
+                __FUNCTION__, error.AsCString());
   }
 }
 
@@ -1008,10 +1012,11 @@
     case eConnectionStatusError:
     case eConnectionStatusNoConnection:
       if (Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS))
-        log->Printf("GDBRemoteCommunicationServerLLGS::%s Stopping stdio "
-                    "forwarding as communication returned status %d (error: "
-                    "%s)",
-                    __FUNCTION__, status, error.AsCString());
+        LLDB_LOGF(log,
+                  "GDBRemoteCommunicationServerLLGS::%s Stopping stdio "
+                  "forwarding as communication returned status %d (error: "
+                  "%s)",
+                  __FUNCTION__, status, error.AsCString());
       m_stdio_handle_up.reset();
       return;
 
@@ -1349,15 +1354,14 @@
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServerLLGS::Handle_C(StringExtractorGDBRemote &packet) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__);
+  LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__);
 
   // Ensure we have a native process.
   if (!m_debugged_process_up) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s no debugged process "
-                  "shared pointer",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s no debugged process "
+              "shared pointer",
+              __FUNCTION__);
     return SendErrorResponse(0x36);
   }
 
@@ -1376,13 +1380,14 @@
   if (packet.GetBytesLeft() > 0) {
     // FIXME add continue at address support for $C{signo}[;{continue-address}].
     if (*packet.Peek() == ';')
-      return SendUnimplementedResponse(packet.GetStringRef().c_str());
+      return SendUnimplementedResponse(packet.GetStringRef().data());
     else
       return SendIllFormedResponse(
           packet, "unexpected content after $C{signal-number}");
   }
 
-  ResumeActionList resume_actions(StateType::eStateRunning, 0);
+  ResumeActionList resume_actions(StateType::eStateRunning,
+                                  LLDB_INVALID_SIGNAL_NUMBER);
   Status error;
 
   // We have two branches: what to do if a continue thread is specified (in
@@ -1430,8 +1435,7 @@
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServerLLGS::Handle_c(StringExtractorGDBRemote &packet) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__);
+  LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s called", __FUNCTION__);
 
   packet.SetFilePos(packet.GetFilePos() + ::strlen("c"));
 
@@ -1440,20 +1444,21 @@
   if (has_continue_address) {
     LLDB_LOG(log, "not implemented for c[address] variant [{0} remains]",
              packet.Peek());
-    return SendUnimplementedResponse(packet.GetStringRef().c_str());
+    return SendUnimplementedResponse(packet.GetStringRef().data());
   }
 
   // Ensure we have a native process.
   if (!m_debugged_process_up) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s no debugged process "
-                  "shared pointer",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s no debugged process "
+              "shared pointer",
+              __FUNCTION__);
     return SendErrorResponse(0x36);
   }
 
   // Build the ResumeActionList
-  ResumeActionList actions(StateType::eStateRunning, 0);
+  ResumeActionList actions(StateType::eStateRunning,
+                           LLDB_INVALID_SIGNAL_NUMBER);
 
   Status error = m_debugged_process_up->Resume(actions);
   if (error.Fail()) {
@@ -1480,17 +1485,16 @@
 GDBRemoteCommunicationServerLLGS::Handle_vCont(
     StringExtractorGDBRemote &packet) {
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerLLGS::%s handling vCont packet",
-                __FUNCTION__);
+  LLDB_LOGF(log, "GDBRemoteCommunicationServerLLGS::%s handling vCont packet",
+            __FUNCTION__);
 
   packet.SetFilePos(::strlen("vCont"));
 
   if (packet.GetBytesLeft() == 0) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s missing action from "
-                  "vCont package",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s missing action from "
+              "vCont package",
+              __FUNCTION__);
     return SendIllFormedResponse(packet, "Missing action from vCont package");
   }
 
@@ -1521,7 +1525,7 @@
     ResumeAction thread_action;
     thread_action.tid = LLDB_INVALID_THREAD_ID;
     thread_action.state = eStateInvalid;
-    thread_action.signal = 0;
+    thread_action.signal = LLDB_INVALID_SIGNAL_NUMBER;
 
     const char action = packet.GetChar();
     switch (action) {
@@ -1958,10 +1962,10 @@
   const uint32_t reg_index =
       packet.GetHexMaxU32(false, std::numeric_limits<uint32_t>::max());
   if (reg_index == std::numeric_limits<uint32_t>::max()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, could not "
-                  "parse register number from request \"%s\"",
-                  __FUNCTION__, packet.GetStringRef().c_str());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, could not "
+              "parse register number from request \"%s\"",
+              __FUNCTION__, packet.GetStringRef().data());
     return SendErrorResponse(0x15);
   }
 
@@ -1978,20 +1982,19 @@
   // Return the end of registers response if we've iterated one past the end of
   // the register set.
   if (reg_index >= reg_context.GetUserRegisterCount()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, requested "
-                  "register %" PRIu32 " beyond register count %" PRIu32,
-                  __FUNCTION__, reg_index,
-                  reg_context.GetUserRegisterCount());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, requested "
+              "register %" PRIu32 " beyond register count %" PRIu32,
+              __FUNCTION__, reg_index, reg_context.GetUserRegisterCount());
     return SendErrorResponse(0x15);
   }
 
   const RegisterInfo *reg_info = reg_context.GetRegisterInfoAtIndex(reg_index);
   if (!reg_info) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, requested "
-                  "register %" PRIu32 " returned NULL",
-                  __FUNCTION__, reg_index);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, requested "
+              "register %" PRIu32 " returned NULL",
+              __FUNCTION__, reg_index);
     return SendErrorResponse(0x15);
   }
 
@@ -2002,20 +2005,20 @@
   RegisterValue reg_value;
   Status error = reg_context.ReadRegister(reg_info, reg_value);
   if (error.Fail()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, read of "
-                  "requested register %" PRIu32 " (%s) failed: %s",
-                  __FUNCTION__, reg_index, reg_info->name, error.AsCString());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, read of "
+              "requested register %" PRIu32 " (%s) failed: %s",
+              __FUNCTION__, reg_index, reg_info->name, error.AsCString());
     return SendErrorResponse(0x15);
   }
 
   const uint8_t *const data =
-      reinterpret_cast<const uint8_t *>(reg_value.GetBytes());
+      static_cast<const uint8_t *>(reg_value.GetBytes());
   if (!data) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed to get data "
-                  "bytes from requested register %" PRIu32,
-                  __FUNCTION__, reg_index);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed to get data "
+              "bytes from requested register %" PRIu32,
+              __FUNCTION__, reg_index);
     return SendErrorResponse(0x15);
   }
 
@@ -2039,10 +2042,10 @@
   const uint32_t reg_index =
       packet.GetHexMaxU32(false, std::numeric_limits<uint32_t>::max());
   if (reg_index == std::numeric_limits<uint32_t>::max()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, could not "
-                  "parse register number from request \"%s\"",
-                  __FUNCTION__, packet.GetStringRef().c_str());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, could not "
+              "parse register number from request \"%s\"",
+              __FUNCTION__, packet.GetStringRef().data());
     return SendErrorResponse(0x29);
   }
 
@@ -2058,10 +2061,10 @@
   // Get the thread to use.
   NativeThreadProtocol *thread = GetThreadFromSuffix(packet);
   if (!thread) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, no thread "
-                  "available (thread index 0)",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, no thread "
+              "available (thread index 0)",
+              __FUNCTION__);
     return SendErrorResponse(0x28);
   }
 
@@ -2069,20 +2072,20 @@
   NativeRegisterContext &reg_context = thread->GetRegisterContext();
   const RegisterInfo *reg_info = reg_context.GetRegisterInfoAtIndex(reg_index);
   if (!reg_info) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, requested "
-                  "register %" PRIu32 " returned NULL",
-                  __FUNCTION__, reg_index);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, requested "
+              "register %" PRIu32 " returned NULL",
+              __FUNCTION__, reg_index);
     return SendErrorResponse(0x48);
   }
 
   // Return the end of registers response if we've iterated one past the end of
   // the register set.
   if (reg_index >= reg_context.GetUserRegisterCount()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, requested "
-                  "register %" PRIu32 " beyond register count %" PRIu32,
-                  __FUNCTION__, reg_index, reg_context.GetUserRegisterCount());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, requested "
+              "register %" PRIu32 " beyond register count %" PRIu32,
+              __FUNCTION__, reg_index, reg_context.GetUserRegisterCount());
     return SendErrorResponse(0x47);
   }
 
@@ -2101,10 +2104,10 @@
       m_debugged_process_up->GetArchitecture().GetByteOrder());
   Status error = reg_context.WriteRegister(reg_info, reg_value);
   if (error.Fail()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, write of "
-                  "requested register %" PRIu32 " (%s) failed: %s",
-                  __FUNCTION__, reg_index, reg_info->name, error.AsCString());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, write of "
+              "requested register %" PRIu32 " (%s) failed: %s",
+              __FUNCTION__, reg_index, reg_info->name, error.AsCString());
     return SendErrorResponse(0x32);
   }
 
@@ -2118,20 +2121,20 @@
   // Fail if we don't have a current process.
   if (!m_debugged_process_up ||
       (m_debugged_process_up->GetID() == LLDB_INVALID_PROCESS_ID)) {
-    if (log)
-      log->Printf(
-          "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log,
+        "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
+        __FUNCTION__);
     return SendErrorResponse(0x15);
   }
 
   // Parse out which variant of $H is requested.
   packet.SetFilePos(strlen("H"));
   if (packet.GetBytesLeft() < 1) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, H command "
-                  "missing {g,c} variant",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, H command "
+              "missing {g,c} variant",
+              __FUNCTION__);
     return SendIllFormedResponse(packet, "H command missing {g,c} variant");
   }
 
@@ -2144,10 +2147,10 @@
     break;
 
   default:
-    if (log)
-      log->Printf(
-          "GDBRemoteCommunicationServerLLGS::%s failed, invalid $H variant %c",
-          __FUNCTION__, h_variant);
+    LLDB_LOGF(
+        log,
+        "GDBRemoteCommunicationServerLLGS::%s failed, invalid $H variant %c",
+        __FUNCTION__, h_variant);
     return SendIllFormedResponse(packet,
                                  "H variant unsupported, should be c or g");
   }
@@ -2162,10 +2165,10 @@
   if (tid != LLDB_INVALID_THREAD_ID && tid != 0) {
     NativeThreadProtocol *thread = m_debugged_process_up->GetThreadByID(tid);
     if (!thread) {
-      if (log)
-        log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, tid %" PRIu64
-                    " not found",
-                    __FUNCTION__, tid);
+      LLDB_LOGF(log,
+                "GDBRemoteCommunicationServerLLGS::%s failed, tid %" PRIu64
+                " not found",
+                __FUNCTION__, tid);
       return SendErrorResponse(0x15);
     }
   }
@@ -2196,10 +2199,10 @@
   // Fail if we don't have a current process.
   if (!m_debugged_process_up ||
       (m_debugged_process_up->GetID() == LLDB_INVALID_PROCESS_ID)) {
-    if (log)
-      log->Printf(
-          "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log,
+        "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
+        __FUNCTION__);
     return SendErrorResponse(0x15);
   }
 
@@ -2257,10 +2260,10 @@
 
   if (!m_debugged_process_up ||
       (m_debugged_process_up->GetID() == LLDB_INVALID_PROCESS_ID)) {
-    if (log)
-      log->Printf(
-          "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log,
+        "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
+        __FUNCTION__);
     return SendErrorResponse(0x15);
   }
 
@@ -2284,10 +2287,10 @@
 
   const uint64_t byte_count = packet.GetHexMaxU64(false, 0);
   if (byte_count == 0) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s nothing to read: "
-                  "zero-length packet",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s nothing to read: "
+              "zero-length packet",
+              __FUNCTION__);
     return SendOKResponse();
   }
 
@@ -2301,20 +2304,20 @@
   Status error = m_debugged_process_up->ReadMemoryWithoutTrap(
       read_addr, &buf[0], byte_count, bytes_read);
   if (error.Fail()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
-                  " mem 0x%" PRIx64 ": failed to read. Error: %s",
-                  __FUNCTION__, m_debugged_process_up->GetID(), read_addr,
-                  error.AsCString());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
+              " mem 0x%" PRIx64 ": failed to read. Error: %s",
+              __FUNCTION__, m_debugged_process_up->GetID(), read_addr,
+              error.AsCString());
     return SendErrorResponse(0x08);
   }
 
   if (bytes_read == 0) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
-                  " mem 0x%" PRIx64 ": read 0 of %" PRIu64 " requested bytes",
-                  __FUNCTION__, m_debugged_process_up->GetID(), read_addr,
-                  byte_count);
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
+              " mem 0x%" PRIx64 ": read 0 of %" PRIu64 " requested bytes",
+              __FUNCTION__, m_debugged_process_up->GetID(), read_addr,
+              byte_count);
     return SendErrorResponse(0x08);
   }
 
@@ -2338,10 +2341,10 @@
 
   if (!m_debugged_process_up ||
       (m_debugged_process_up->GetID() == LLDB_INVALID_PROCESS_ID)) {
-    if (log)
-      log->Printf(
-          "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log,
+        "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
+        __FUNCTION__);
     return SendErrorResponse(0x15);
   }
 
@@ -2426,10 +2429,10 @@
   // since we won't have a NativeProcessProtocol.
   if (!m_debugged_process_up ||
       (m_debugged_process_up->GetID() == LLDB_INVALID_PROCESS_ID)) {
-    if (log)
-      log->Printf(
-          "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log,
+        "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
+        __FUNCTION__);
     return SendErrorResponse(0x15);
   }
 
@@ -2454,10 +2457,10 @@
   // Ensure we have a process.
   if (!m_debugged_process_up ||
       (m_debugged_process_up->GetID() == LLDB_INVALID_PROCESS_ID)) {
-    if (log)
-      log->Printf(
-          "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log,
+        "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
+        __FUNCTION__);
     return SendErrorResponse(0x15);
   }
 
@@ -2703,10 +2706,10 @@
   // Ensure we have a process.
   if (!m_debugged_process_up ||
       (m_debugged_process_up->GetID() == LLDB_INVALID_PROCESS_ID)) {
-    if (log)
-      log->Printf(
-          "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log,
+        "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
+        __FUNCTION__);
     return SendErrorResponse(0x32);
   }
 
@@ -2725,7 +2728,7 @@
     return SendErrorResponse(0x33);
 
   // Create the step action for the given thread.
-  ResumeAction action = {tid, eStateStepping, 0};
+  ResumeAction action = {tid, eStateStepping, LLDB_INVALID_SIGNAL_NUMBER};
 
   // Setup the actions list.
   ResumeActionList actions;
@@ -2735,11 +2738,11 @@
   actions.SetDefaultThreadActionIfNeeded(eStateStopped, 0);
   Status error = m_debugged_process_up->Resume(actions);
   if (error.Fail()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
-                  " tid %" PRIu64 " Resume() failed with error: %s",
-                  __FUNCTION__, m_debugged_process_up->GetID(), tid,
-                  error.AsCString());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s pid %" PRIu64
+              " tid %" PRIu64 " Resume() failed with error: %s",
+              __FUNCTION__, m_debugged_process_up->GetID(), tid,
+              error.AsCString());
     return SendErrorResponse(0x49);
   }
 
@@ -2765,6 +2768,24 @@
     return std::move(*buffer_or_error);
   }
 
+  if (object == "libraries-svr4") {
+    auto library_list = m_debugged_process_up->GetLoadedSVR4Libraries();
+    if (!library_list)
+      return library_list.takeError();
+
+    StreamString response;
+    response.Printf("<library-list-svr4 version=\"1.0\">");
+    for (auto const &library : *library_list) {
+      response.Printf("<library name=\"%s\" ",
+                      XMLEncodeAttributeValue(library.name.c_str()).c_str());
+      response.Printf("lm=\"0x%" PRIx64 "\" ", library.link_map);
+      response.Printf("l_addr=\"0x%" PRIx64 "\" ", library.base_addr);
+      response.Printf("l_ld=\"0x%" PRIx64 "\" />", library.ld_addr);
+    }
+    response.Printf("</library-list-svr4>");
+    return MemoryBuffer::getMemBufferCopy(response.GetString(), __FUNCTION__);
+  }
+
   return llvm::make_error<PacketUnimplementedError>(
       "Xfer object not supported");
 }
@@ -2968,18 +2989,18 @@
                                  "vAttach failed to parse the process id");
 
   // Attempt to attach.
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerLLGS::%s attempting to attach to "
-                "pid %" PRIu64,
-                __FUNCTION__, pid);
+  LLDB_LOGF(log,
+            "GDBRemoteCommunicationServerLLGS::%s attempting to attach to "
+            "pid %" PRIu64,
+            __FUNCTION__, pid);
 
   Status error = AttachToProcess(pid);
 
   if (error.Fail()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed to attach to "
-                  "pid %" PRIu64 ": %s\n",
-                  __FUNCTION__, pid, error.AsCString());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed to attach to "
+              "pid %" PRIu64 ": %s\n",
+              __FUNCTION__, pid, error.AsCString());
     return SendErrorResponse(error);
   }
 
@@ -2996,10 +3017,10 @@
   // Fail if we don't have a current process.
   if (!m_debugged_process_up ||
       (m_debugged_process_up->GetID() == LLDB_INVALID_PROCESS_ID)) {
-    if (log)
-      log->Printf(
-          "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log,
+        "GDBRemoteCommunicationServerLLGS::%s failed, no process available",
+        __FUNCTION__);
     return SendErrorResponse(0x15);
   }
 
@@ -3023,11 +3044,10 @@
 
   const Status error = m_debugged_process_up->Detach();
   if (error.Fail()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed to detach from "
-                  "pid %" PRIu64 ": %s\n",
-                  __FUNCTION__, m_debugged_process_up->GetID(),
-                  error.AsCString());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed to detach from "
+              "pid %" PRIu64 ": %s\n",
+              __FUNCTION__, m_debugged_process_up->GetID(), error.AsCString());
     return SendErrorResponse(0x01);
   }
 
@@ -3042,10 +3062,10 @@
   packet.SetFilePos(strlen("qThreadStopInfo"));
   const lldb::tid_t tid = packet.GetHexMaxU32(false, LLDB_INVALID_THREAD_ID);
   if (tid == LLDB_INVALID_THREAD_ID) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s failed, could not "
-                  "parse thread id from request \"%s\"",
-                  __FUNCTION__, packet.GetStringRef().c_str());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s failed, could not "
+              "parse thread id from request \"%s\"",
+              __FUNCTION__, packet.GetStringRef().data());
     return SendErrorResponse(0x15);
   }
   return SendStopReplyPacketForThread(tid);
@@ -3064,15 +3084,16 @@
 
   StreamString response;
   const bool threads_with_valid_stop_info_only = false;
-  JSONArray::SP threads_array_sp = GetJSONThreadsInfo(
+  llvm::Expected<json::Value> threads_info = GetJSONThreadsInfo(
       *m_debugged_process_up, threads_with_valid_stop_info_only);
-  if (!threads_array_sp) {
-    LLDB_LOG(log, "failed to prepare a packet for pid {0}",
-             m_debugged_process_up->GetID());
+  if (!threads_info) {
+    LLDB_LOG_ERROR(log, threads_info.takeError(),
+                   "failed to prepare a packet for pid {1}: {0}",
+                   m_debugged_process_up->GetID());
     return SendErrorResponse(52);
   }
 
-  threads_array_sp->Write(response);
+  response.AsRawOstream() << *threads_info;
   StreamGDBRemote escaped_response;
   escaped_response.PutEscapedBytes(response.GetData(), response.GetSize());
   return SendPacketNoLock(escaped_response.GetString());
@@ -3177,15 +3198,15 @@
       connection->Disconnect(&error);
 
       if (error.Success()) {
-        if (log)
-          log->Printf("GDBRemoteCommunicationServerLLGS::%s disconnect process "
-                      "terminal stdio - SUCCESS",
-                      __FUNCTION__);
+        LLDB_LOGF(log,
+                  "GDBRemoteCommunicationServerLLGS::%s disconnect process "
+                  "terminal stdio - SUCCESS",
+                  __FUNCTION__);
       } else {
-        if (log)
-          log->Printf("GDBRemoteCommunicationServerLLGS::%s disconnect process "
-                      "terminal stdio - FAIL: %s",
-                      __FUNCTION__, error.AsCString());
+        LLDB_LOGF(log,
+                  "GDBRemoteCommunicationServerLLGS::%s disconnect process "
+                  "terminal stdio - FAIL: %s",
+                  __FUNCTION__, error.AsCString());
       }
     }
   }
@@ -3215,11 +3236,11 @@
 
   // Parse out the ';'.
   if (packet.GetBytesLeft() < 1 || packet.GetChar() != ';') {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s gdb-remote parse "
-                  "error: expected ';' prior to start of thread suffix: packet "
-                  "contents = '%s'",
-                  __FUNCTION__, packet.GetStringRef().c_str());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s gdb-remote parse "
+              "error: expected ';' prior to start of thread suffix: packet "
+              "contents = '%s'",
+              __FUNCTION__, packet.GetStringRef().data());
     return nullptr;
   }
 
@@ -3228,11 +3249,11 @@
 
   // Parse out thread: portion.
   if (strncmp(packet.Peek(), "thread:", strlen("thread:")) != 0) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerLLGS::%s gdb-remote parse "
-                  "error: expected 'thread:' but not found, packet contents = "
-                  "'%s'",
-                  __FUNCTION__, packet.GetStringRef().c_str());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerLLGS::%s gdb-remote parse "
+              "error: expected 'thread:' but not found, packet contents = "
+              "'%s'",
+              __FUNCTION__, packet.GetStringRef().data());
     return nullptr;
   }
   packet.SetFilePos(packet.GetFilePos() + strlen("thread:"));
@@ -3283,3 +3304,28 @@
 
   return GDBRemoteCommunicationServerCommon::FindModuleFile(module_path, arch);
 }
+
+std::string GDBRemoteCommunicationServerLLGS::XMLEncodeAttributeValue(
+    llvm::StringRef value) {
+  std::string result;
+  for (const char &c : value) {
+    switch (c) {
+    case '\'':
+      result += "&apos;";
+      break;
+    case '"':
+      result += "&quot;";
+      break;
+    case '<':
+      result += "&lt;";
+      break;
+    case '>':
+      result += "&gt;";
+      break;
+    default:
+      result += c;
+      break;
+    }
+  }
+  return result;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
index 068ea52..088ba92 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
@@ -196,6 +196,8 @@
   llvm::Expected<std::unique_ptr<llvm::MemoryBuffer>>
   ReadXferObject(llvm::StringRef object, llvm::StringRef annex);
 
+  static std::string XMLEncodeAttributeValue(llvm::StringRef value);
+
 private:
   void HandleInferiorState_Exited(NativeProcessProtocol *process);
 
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
index 6deb75f..25cebbb 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp
@@ -15,8 +15,10 @@
 #include <cstring>
 #include <mutex>
 #include <sstream>
+#include <thread>
 
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/JSON.h"
 #include "llvm/Support/Threading.h"
 
 #include "lldb/Host/Config.h"
@@ -26,9 +28,8 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Target/Platform.h"
 #include "lldb/Target/UnixSignals.h"
-#include "lldb/Utility/JSON.h"
+#include "lldb/Utility/GDBRemote.h"
 #include "lldb/Utility/Log.h"
-#include "lldb/Utility/StreamGDBRemote.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StructuredData.h"
 #include "lldb/Utility/UriParser.h"
@@ -36,8 +37,8 @@
 #include "lldb/Utility/StringExtractorGDBRemote.h"
 
 using namespace lldb;
-using namespace lldb_private;
 using namespace lldb_private::process_gdb_remote;
+using namespace lldb_private;
 
 // GDBRemoteCommunicationServerPlatform constructor
 GDBRemoteCommunicationServerPlatform::GDBRemoteCommunicationServerPlatform(
@@ -104,8 +105,8 @@
     hostname = "127.0.0.1";
 
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  if (log)
-    log->Printf("Launching debugserver with: %s:%u...", hostname.c_str(), port);
+  LLDB_LOGF(log, "Launching debugserver with: %s:%u...", hostname.c_str(),
+            port);
 
   // Do not run in a new session so that it can not linger after the platform
   // closes.
@@ -161,9 +162,8 @@
   // process...
 
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerPlatform::%s() called",
-                __FUNCTION__);
+  LLDB_LOGF(log, "GDBRemoteCommunicationServerPlatform::%s() called",
+            __FUNCTION__);
 
   ConnectionFileDescriptor file_conn;
   std::string hostname;
@@ -183,17 +183,17 @@
   Status error =
       LaunchGDBServer(Args(), hostname, debugserver_pid, port, socket_name);
   if (error.Fail()) {
-    if (log)
-      log->Printf("GDBRemoteCommunicationServerPlatform::%s() debugserver "
-                  "launch failed: %s",
-                  __FUNCTION__, error.AsCString());
+    LLDB_LOGF(log,
+              "GDBRemoteCommunicationServerPlatform::%s() debugserver "
+              "launch failed: %s",
+              __FUNCTION__, error.AsCString());
     return SendErrorResponse(9);
   }
 
-  if (log)
-    log->Printf("GDBRemoteCommunicationServerPlatform::%s() debugserver "
-                "launched successfully as pid %" PRIu64,
-                __FUNCTION__, debugserver_pid);
+  LLDB_LOGF(log,
+            "GDBRemoteCommunicationServerPlatform::%s() debugserver "
+            "launched successfully as pid %" PRIu64,
+            __FUNCTION__, debugserver_pid);
 
   StreamGDBRemote response;
   response.Printf("pid:%" PRIu64 ";port:%u;", debugserver_pid,
@@ -215,22 +215,21 @@
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServerPlatform::Handle_qQueryGDBServer(
     StringExtractorGDBRemote &packet) {
+  namespace json = llvm::json;
+
   if (m_pending_gdb_server.pid == LLDB_INVALID_PROCESS_ID)
     return SendErrorResponse(4);
 
-  JSONObject::SP server_sp = std::make_shared<JSONObject>();
-  server_sp->SetObject("port",
-                       std::make_shared<JSONNumber>(m_pending_gdb_server.port));
-  if (!m_pending_gdb_server.socket_name.empty())
-    server_sp->SetObject(
-        "socket_name",
-        std::make_shared<JSONString>(m_pending_gdb_server.socket_name.c_str()));
+  json::Object server{{"port", m_pending_gdb_server.port}};
 
-  JSONArray server_list;
-  server_list.AppendObject(server_sp);
+  if (!m_pending_gdb_server.socket_name.empty())
+    server.try_emplace("socket_name", m_pending_gdb_server.socket_name);
+
+  json::Array server_list;
+  server_list.push_back(std::move(server));
 
   StreamGDBRemote response;
-  server_list.Write(response);
+  response.AsRawOstream() << std::move(server_list);
 
   StreamGDBRemote escaped_response;
   escaped_response.PutEscapedBytes(response.GetString().data(),
@@ -281,10 +280,9 @@
         return true;
       }
     }
-    usleep(10000);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
   }
 
-  // check one more time after the final usleep
   {
     std::lock_guard<std::recursive_mutex> guard(m_spawned_pids_mutex);
     if (m_spawned_pids.find(pid) == m_spawned_pids.end())
@@ -303,10 +301,10 @@
         return true;
       }
     }
-    usleep(10000);
+    std::this_thread::sleep_for(std::chrono::milliseconds(10));
   }
 
-  // check one more time after the final usleep Scope for locker
+  // check one more time after the final sleep
   {
     std::lock_guard<std::recursive_mutex> guard(m_spawned_pids_mutex);
     if (m_spawned_pids.find(pid) == m_spawned_pids.end())
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
index a77e659..ec1a54a 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp
@@ -31,9 +31,11 @@
 // GDBRemoteRegisterContext constructor
 GDBRemoteRegisterContext::GDBRemoteRegisterContext(
     ThreadGDBRemote &thread, uint32_t concrete_frame_idx,
-    GDBRemoteDynamicRegisterInfo &reg_info, bool read_all_at_once)
+    GDBRemoteDynamicRegisterInfo &reg_info, bool read_all_at_once,
+    bool write_all_at_once)
     : RegisterContext(thread, concrete_frame_idx), m_reg_info(reg_info),
-      m_reg_valid(), m_reg_data(), m_read_all_at_once(read_all_at_once) {
+      m_reg_valid(), m_reg_data(), m_read_all_at_once(read_all_at_once),
+      m_write_all_at_once(write_all_at_once) {
   // Resize our vector of bools to contain one bool for every register. We will
   // use these boolean values to know when a register value is valid in
   // m_reg_data.
@@ -87,6 +89,9 @@
                                             RegisterValue &value) {
   // Read the register
   if (ReadRegisterBytes(reg_info, m_reg_data)) {
+    const uint32_t reg = reg_info->kinds[eRegisterKindLLDB];
+    if (m_reg_valid[reg] == false)
+      return false;
     const bool partial_data_ok = false;
     Status error(value.SetValueFromData(
         reg_info, m_reg_data, reg_info->byte_offset, partial_data_ok));
@@ -203,14 +208,29 @@
         if (buffer_sp->GetByteSize() >= m_reg_data.GetByteSize()) {
           SetAllRegisterValid(true);
           return true;
+        } else if (buffer_sp->GetByteSize() > 0) {
+          const int regcount = m_reg_info.GetNumRegisters();
+          for (int i = 0; i < regcount; i++) {
+            struct RegisterInfo *reginfo = m_reg_info.GetRegisterInfoAtIndex(i);
+            if (reginfo->byte_offset + reginfo->byte_size 
+                   <= buffer_sp->GetByteSize()) {
+              m_reg_valid[i] = true;
+            } else {
+              m_reg_valid[i] = false;
+            }
+          }
+          return true;
         } else {
           Log *log(ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(GDBR_LOG_THREAD |
                                                                 GDBR_LOG_PACKETS));
-          if (log)
-            log->Printf ("error: GDBRemoteRegisterContext::ReadRegisterBytes tried to read the "
-                        "entire register context at once, expected at least %" PRId64 " bytes "
-                        "but only got %" PRId64 " bytes.", m_reg_data.GetByteSize(),
-                        buffer_sp->GetByteSize());
+          LLDB_LOGF(
+              log,
+              "error: GDBRemoteRegisterContext::ReadRegisterBytes tried "
+              "to read the "
+              "entire register context at once, expected at least %" PRId64
+              " bytes "
+              "but only got %" PRId64 " bytes.",
+              m_reg_data.GetByteSize(), buffer_sp->GetByteSize());
         }
       }
       return false;
@@ -330,7 +350,7 @@
   {
     GDBRemoteClientBase::Lock lock(gdb_comm, false);
     if (lock) {
-      if (m_read_all_at_once) {
+      if (m_write_all_at_once) {
         // Invalidate all register values
         InvalidateIfNeeded(true);
 
@@ -390,13 +410,15 @@
         if (log->GetVerbose()) {
           StreamString strm;
           gdb_comm.DumpHistory(strm);
-          log->Printf("error: failed to get packet sequence mutex, not sending "
-                      "write register for \"%s\":\n%s",
-                      reg_info->name, strm.GetData());
+          LLDB_LOGF(log,
+                    "error: failed to get packet sequence mutex, not sending "
+                    "write register for \"%s\":\n%s",
+                    reg_info->name, strm.GetData());
         } else
-          log->Printf("error: failed to get packet sequence mutex, not sending "
-                      "write register for \"%s\"",
-                      reg_info->name);
+          LLDB_LOGF(log,
+                    "error: failed to get packet sequence mutex, not sending "
+                    "write register for \"%s\"",
+                    reg_info->name);
       }
     }
   }
@@ -494,12 +516,14 @@
       if (log->GetVerbose()) {
         StreamString strm;
         gdb_comm.DumpHistory(strm);
-        log->Printf("error: failed to get packet sequence mutex, not sending "
-                    "read all registers:\n%s",
-                    strm.GetData());
+        LLDB_LOGF(log,
+                  "error: failed to get packet sequence mutex, not sending "
+                  "read all registers:\n%s",
+                  strm.GetData());
       } else
-        log->Printf("error: failed to get packet sequence mutex, not sending "
-                    "read all registers");
+        LLDB_LOGF(log,
+                  "error: failed to get packet sequence mutex, not sending "
+                  "read all registers");
     }
   }
 
@@ -630,7 +654,9 @@
       if (m_thread.GetProcess().get()) {
         const ArchSpec &arch =
             m_thread.GetProcess()->GetTarget().GetArchitecture();
-        if (arch.IsValid() && arch.GetMachine() == llvm::Triple::aarch64 &&
+        if (arch.IsValid() && 
+            (arch.GetMachine() == llvm::Triple::aarch64 ||
+             arch.GetMachine() == llvm::Triple::aarch64_32) &&
             arch.GetTriple().getVendor() == llvm::Triple::Apple &&
             arch.GetTriple().getOS() == llvm::Triple::IOS) {
           arm64_debugserver = true;
@@ -667,12 +693,14 @@
       if (log->GetVerbose()) {
         StreamString strm;
         gdb_comm.DumpHistory(strm);
-        log->Printf("error: failed to get packet sequence mutex, not sending "
-                    "write all registers:\n%s",
-                    strm.GetData());
+        LLDB_LOGF(log,
+                  "error: failed to get packet sequence mutex, not sending "
+                  "write all registers:\n%s",
+                  strm.GetData());
       } else
-        log->Printf("error: failed to get packet sequence mutex, not sending "
-                    "write all registers");
+        LLDB_LOGF(log,
+                  "error: failed to get packet sequence mutex, not sending "
+                  "write all registers");
     }
   }
   return false;
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
index 25e9b71..b42c87b 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h
@@ -41,7 +41,7 @@
 public:
   GDBRemoteRegisterContext(ThreadGDBRemote &thread, uint32_t concrete_frame_idx,
                            GDBRemoteDynamicRegisterInfo &reg_info,
-                           bool read_all_at_once);
+                           bool read_all_at_once, bool write_all_at_once);
 
   ~GDBRemoteRegisterContext() override;
 
@@ -114,6 +114,7 @@
   std::vector<bool> m_reg_valid;
   DataExtractor m_reg_data;
   bool m_read_all_at_once;
+  bool m_write_all_at_once;
 
 private:
   // Helper function for ReadRegisterBytes().
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index a6fdd8d..a49db5d 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -10,7 +10,7 @@
 
 #include <errno.h>
 #include <stdlib.h>
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include <netinet/in.h>
 #include <sys/mman.h>
 #include <sys/socket.h>
@@ -63,7 +63,6 @@
 #include "lldb/Target/TargetList.h"
 #include "lldb/Target/ThreadPlanCallFunction.h"
 #include "lldb/Utility/Args.h"
-#include "lldb/Utility/CleanUp.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Reproducer.h"
 #include "lldb/Utility/State.h"
@@ -81,12 +80,12 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Utility/StringExtractorGDBRemote.h"
 
+#include "llvm/ADT/ScopeExit.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/Support/Threading.h"
 #include "llvm/Support/raw_ostream.h"
 
 #define DEBUGSERVER_BASENAME "debugserver"
-using namespace llvm;
 using namespace lldb;
 using namespace lldb_private;
 using namespace lldb_private::process_gdb_remote;
@@ -99,51 +98,25 @@
 // namespace. This allows you to attach with a debugger and call this function
 // and get the packet history dumped to a file.
 void DumpProcessGDBRemotePacketHistory(void *p, const char *path) {
-  StreamFile strm;
-  Status error = FileSystem::Instance().Open(strm.GetFile(), FileSpec(path),
-                                             File::eOpenOptionWrite |
-                                                 File::eOpenOptionCanCreate);
-  if (error.Success())
-    ((ProcessGDBRemote *)p)->GetGDBRemote().DumpHistory(strm);
+  auto file = FileSystem::Instance().Open(
+      FileSpec(path), File::eOpenOptionWrite | File::eOpenOptionCanCreate);
+  if (!file) {
+    llvm::consumeError(file.takeError());
+    return;
+  }
+  StreamFile stream(std::move(file.get()));
+  ((ProcessGDBRemote *)p)->GetGDBRemote().DumpHistory(stream);
 }
 } // namespace lldb
 
 namespace {
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"packet-timeout",
-     OptionValue::eTypeUInt64,
-     true,
-     5
-#if defined(__has_feature)
-#if __has_feature(address_sanitizer)
-         * 2
-#endif
-#endif
-     ,
-     nullptr,
-     {},
-     "Specify the default packet timeout in seconds."},
-    {"target-definition-file",
-     OptionValue::eTypeFileSpec,
-     true,
-     0,
-     nullptr,
-     {},
-     "The file that provides the description for remote target registers."},
-    {"use-libraries-svr4",
-     OptionValue::eTypeBoolean,
-     true,
-     false,
-     nullptr,
-     {},
-     "If true, the libraries-svr4 feature will be used to get a hold of the "
-     "process's loaded modules."}};
+#define LLDB_PROPERTIES_processgdbremote
+#include "ProcessGDBRemoteProperties.inc"
 
 enum {
-  ePropertyPacketTimeout,
-  ePropertyTargetDefinitionFile,
-  ePropertyUseSVR4
+#define LLDB_PROPERTIES_processgdbremote
+#include "ProcessGDBRemotePropertiesEnum.inc"
 };
 
 class PluginProperties : public Properties {
@@ -154,7 +127,7 @@
 
   PluginProperties() : Properties() {
     m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_processgdbremote_properties);
   }
 
   ~PluginProperties() override {}
@@ -162,7 +135,7 @@
   uint64_t GetPacketTimeout() {
     const uint32_t idx = ePropertyPacketTimeout;
     return m_collection_sp->GetPropertyAtIndexAsUInt64(
-        nullptr, idx, g_properties[idx].default_uint_value);
+        nullptr, idx, g_processgdbremote_properties[idx].default_uint_value);
   }
 
   bool SetPacketTimeout(uint64_t timeout) {
@@ -178,7 +151,13 @@
   bool GetUseSVR4() const {
     const uint32_t idx = ePropertyUseSVR4;
     return m_collection_sp->GetPropertyAtIndexAsBoolean(
-        nullptr, idx, g_properties[idx].default_uint_value != 0);
+        nullptr, idx,
+        g_processgdbremote_properties[idx].default_uint_value != 0);
+  }
+
+  bool GetUseGPacketForReading() const {
+    const uint32_t idx = ePropertyUseGPacketForReading;
+    return m_collection_sp->GetPropertyAtIndexAsBoolean(nullptr, idx, true);
   }
 };
 
@@ -191,45 +170,6 @@
   return g_settings_sp;
 }
 
-class ProcessGDBRemoteProvider
-    : public repro::Provider<ProcessGDBRemoteProvider> {
-public:
-  struct Info {
-    static const char *name;
-    static const char *file;
-  };
-
-  ProcessGDBRemoteProvider(const FileSpec &directory) : Provider(directory) {
-  }
-
-  raw_ostream *GetHistoryStream() {
-    FileSpec history_file = GetRoot().CopyByAppendingPathComponent(Info::file);
-
-    std::error_code EC;
-    m_stream_up = llvm::make_unique<raw_fd_ostream>(history_file.GetPath(), EC,
-                                                    sys::fs::OpenFlags::F_Text);
-    return m_stream_up.get();
-  }
-
-  void SetCallback(std::function<void()> callback) {
-    m_callback = std::move(callback);
-  }
-
-  void Keep() override { m_callback(); }
-
-  void Discard() override { m_callback(); }
-
-  static char ID;
-
-private:
-  std::function<void()> m_callback;
-  std::unique_ptr<raw_fd_ostream> m_stream_up;
-};
-
-char ProcessGDBRemoteProvider::ID = 0;
-const char *ProcessGDBRemoteProvider::Info::name = "gdb-remote";
-const char *ProcessGDBRemoteProvider::Info::file = "gdb-remote.yaml";
-
 } // namespace
 
 // TODO Randomly assigning a port is unsafe.  We should get an unused
@@ -339,12 +279,9 @@
                                    "async thread did exit");
 
   if (repro::Generator *g = repro::Reproducer::Instance().GetGenerator()) {
-    ProcessGDBRemoteProvider &provider =
-        g->GetOrCreate<ProcessGDBRemoteProvider>();
-    // Set the history stream to the stream owned by the provider.
-    m_gdb_comm.SetHistoryStream(provider.GetHistoryStream());
-    // Make sure to clear the stream again when we're finished.
-    provider.SetCallback([&]() { m_gdb_comm.SetHistoryStream(nullptr); });
+    repro::GDBRemoteProvider &provider =
+        g->GetOrCreate<repro::GDBRemoteProvider>();
+    m_gdb_comm.SetPacketRecorder(provider.GetNewPacketRecorder());
   }
 
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_ASYNC));
@@ -354,10 +291,10 @@
 
   if (m_async_listener_sp->StartListeningForEvents(
           &m_async_broadcaster, async_event_mask) != async_event_mask) {
-    if (log)
-      log->Printf("ProcessGDBRemote::%s failed to listen for "
-                  "m_async_broadcaster events",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "ProcessGDBRemote::%s failed to listen for "
+              "m_async_broadcaster events",
+              __FUNCTION__);
   }
 
   const uint32_t gdb_event_mask =
@@ -365,15 +302,18 @@
       GDBRemoteCommunication::eBroadcastBitGdbReadThreadGotNotify;
   if (m_async_listener_sp->StartListeningForEvents(
           &m_gdb_comm, gdb_event_mask) != gdb_event_mask) {
-    if (log)
-      log->Printf("ProcessGDBRemote::%s failed to listen for m_gdb_comm events",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "ProcessGDBRemote::%s failed to listen for m_gdb_comm events",
+              __FUNCTION__);
   }
 
   const uint64_t timeout_seconds =
       GetGlobalPluginProperties()->GetPacketTimeout();
   if (timeout_seconds > 0)
     m_gdb_comm.SetPacketTimeout(std::chrono::seconds(timeout_seconds));
+
+  m_use_g_packet_for_reading =
+      GetGlobalPluginProperties()->GetUseGPacketForReading();
 }
 
 // Destructor
@@ -445,36 +385,6 @@
   return false;
 }
 
-// If the remote stub didn't give us eh_frame or DWARF register numbers for a
-// register, see if the ABI can provide them.
-// DWARF and eh_frame register numbers are defined as a part of the ABI.
-static void AugmentRegisterInfoViaABI(RegisterInfo &reg_info,
-                                      ConstString reg_name, ABISP abi_sp) {
-  if (reg_info.kinds[eRegisterKindEHFrame] == LLDB_INVALID_REGNUM ||
-      reg_info.kinds[eRegisterKindDWARF] == LLDB_INVALID_REGNUM) {
-    if (abi_sp) {
-      RegisterInfo abi_reg_info;
-      if (abi_sp->GetRegisterInfoByName(reg_name, abi_reg_info)) {
-        if (reg_info.kinds[eRegisterKindEHFrame] == LLDB_INVALID_REGNUM &&
-            abi_reg_info.kinds[eRegisterKindEHFrame] != LLDB_INVALID_REGNUM) {
-          reg_info.kinds[eRegisterKindEHFrame] =
-              abi_reg_info.kinds[eRegisterKindEHFrame];
-        }
-        if (reg_info.kinds[eRegisterKindDWARF] == LLDB_INVALID_REGNUM &&
-            abi_reg_info.kinds[eRegisterKindDWARF] != LLDB_INVALID_REGNUM) {
-          reg_info.kinds[eRegisterKindDWARF] =
-              abi_reg_info.kinds[eRegisterKindDWARF];
-        }
-        if (reg_info.kinds[eRegisterKindGeneric] == LLDB_INVALID_REGNUM &&
-            abi_reg_info.kinds[eRegisterKindGeneric] != LLDB_INVALID_REGNUM) {
-          reg_info.kinds[eRegisterKindGeneric] =
-              abi_reg_info.kinds[eRegisterKindGeneric];
-        }
-      }
-    }
-  }
-}
-
 static size_t SplitCommaSeparatedRegisterNumberString(
     const llvm::StringRef &comma_separated_regiter_numbers,
     std::vector<uint32_t> &regnums, int base) {
@@ -672,12 +582,12 @@
           reg_info.invalidate_regs = invalidate_regs.data();
         }
 
+        reg_info.name = reg_name.AsCString();
         // We have to make a temporary ABI here, and not use the GetABI because
         // this code gets called in DidAttach, when the target architecture
         // (and consequently the ABI we'll get from the process) may be wrong.
-        ABISP abi_to_use = ABI::FindPlugin(shared_from_this(), arch_to_use);
-
-        AugmentRegisterInfoViaABI(reg_info, reg_name, abi_to_use);
+        if (ABISP abi_sp = ABI::FindPlugin(shared_from_this(), arch_to_use))
+          abi_sp->AugmentRegisterInfo(reg_info);
 
         m_register_info.AddRegister(reg_info, reg_name, alt_name, set_name);
       } else {
@@ -785,15 +695,15 @@
                                      pid, remote_url.str().c_str());
   }
 
-  if (log)
-    log->Printf("ProcessGDBRemote::%s pid %" PRIu64
-                ": normalizing target architecture initial triple: %s "
-                "(GetTarget().GetArchitecture().IsValid() %s, "
-                "m_gdb_comm.GetHostArchitecture().IsValid(): %s)",
-                __FUNCTION__, GetID(),
-                GetTarget().GetArchitecture().GetTriple().getTriple().c_str(),
-                GetTarget().GetArchitecture().IsValid() ? "true" : "false",
-                m_gdb_comm.GetHostArchitecture().IsValid() ? "true" : "false");
+  LLDB_LOGF(log,
+            "ProcessGDBRemote::%s pid %" PRIu64
+            ": normalizing target architecture initial triple: %s "
+            "(GetTarget().GetArchitecture().IsValid() %s, "
+            "m_gdb_comm.GetHostArchitecture().IsValid(): %s)",
+            __FUNCTION__, GetID(),
+            GetTarget().GetArchitecture().GetTriple().getTriple().c_str(),
+            GetTarget().GetArchitecture().IsValid() ? "true" : "false",
+            m_gdb_comm.GetHostArchitecture().IsValid() ? "true" : "false");
 
   if (error.Success() && !GetTarget().GetArchitecture().IsValid() &&
       m_gdb_comm.GetHostArchitecture().IsValid()) {
@@ -805,11 +715,11 @@
       GetTarget().SetArchitecture(m_gdb_comm.GetHostArchitecture());
   }
 
-  if (log)
-    log->Printf("ProcessGDBRemote::%s pid %" PRIu64
-                ": normalized target architecture triple: %s",
-                __FUNCTION__, GetID(),
-                GetTarget().GetArchitecture().GetTriple().getTriple().c_str());
+  LLDB_LOGF(log,
+            "ProcessGDBRemote::%s pid %" PRIu64
+            ": normalized target architecture triple: %s",
+            __FUNCTION__, GetID(),
+            GetTarget().GetArchitecture().GetTriple().getTriple().c_str());
 
   if (error.Success()) {
     PlatformSP platform_sp = GetTarget().GetPlatform();
@@ -834,8 +744,7 @@
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
   Status error;
 
-  if (log)
-    log->Printf("ProcessGDBRemote::%s() entered", __FUNCTION__);
+  LLDB_LOGF(log, "ProcessGDBRemote::%s() entered", __FUNCTION__);
 
   uint32_t launch_flags = launch_info.GetFlags().Get();
   FileSpec stdin_file_spec{};
@@ -862,15 +771,17 @@
 
   if (log) {
     if (stdin_file_spec || stdout_file_spec || stderr_file_spec)
-      log->Printf("ProcessGDBRemote::%s provided with STDIO paths via "
-                  "launch_info: stdin=%s, stdout=%s, stderr=%s",
-                  __FUNCTION__,
-                  stdin_file_spec ? stdin_file_spec.GetCString() : "<null>",
-                  stdout_file_spec ? stdout_file_spec.GetCString() : "<null>",
-                  stderr_file_spec ? stderr_file_spec.GetCString() : "<null>");
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::%s provided with STDIO paths via "
+                "launch_info: stdin=%s, stdout=%s, stderr=%s",
+                __FUNCTION__,
+                stdin_file_spec ? stdin_file_spec.GetCString() : "<null>",
+                stdout_file_spec ? stdout_file_spec.GetCString() : "<null>",
+                stderr_file_spec ? stderr_file_spec.GetCString() : "<null>");
     else
-      log->Printf("ProcessGDBRemote::%s no STDIO paths given via launch_info",
-                  __FUNCTION__);
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::%s no STDIO paths given via launch_info",
+                __FUNCTION__);
   }
 
   const bool disable_stdio = (launch_flags & eLaunchFlagDisableSTDIO) != 0;
@@ -925,24 +836,23 @@
           if (!stderr_file_spec)
             stderr_file_spec = slave_name;
         }
-        if (log)
-          log->Printf(
-              "ProcessGDBRemote::%s adjusted STDIO paths for local platform "
-              "(IsHost() is true) using slave: stdin=%s, stdout=%s, stderr=%s",
-              __FUNCTION__,
-              stdin_file_spec ? stdin_file_spec.GetCString() : "<null>",
-              stdout_file_spec ? stdout_file_spec.GetCString() : "<null>",
-              stderr_file_spec ? stderr_file_spec.GetCString() : "<null>");
+        LLDB_LOGF(
+            log,
+            "ProcessGDBRemote::%s adjusted STDIO paths for local platform "
+            "(IsHost() is true) using slave: stdin=%s, stdout=%s, stderr=%s",
+            __FUNCTION__,
+            stdin_file_spec ? stdin_file_spec.GetCString() : "<null>",
+            stdout_file_spec ? stdout_file_spec.GetCString() : "<null>",
+            stderr_file_spec ? stderr_file_spec.GetCString() : "<null>");
       }
 
-      if (log)
-        log->Printf("ProcessGDBRemote::%s final STDIO paths after all "
-                    "adjustments: stdin=%s, stdout=%s, stderr=%s",
-                    __FUNCTION__,
-                    stdin_file_spec ? stdin_file_spec.GetCString() : "<null>",
-                    stdout_file_spec ? stdout_file_spec.GetCString() : "<null>",
-                    stderr_file_spec ? stderr_file_spec.GetCString()
-                                     : "<null>");
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::%s final STDIO paths after all "
+                "adjustments: stdin=%s, stdout=%s, stderr=%s",
+                __FUNCTION__,
+                stdin_file_spec ? stdin_file_spec.GetCString() : "<null>",
+                stdout_file_spec ? stdout_file_spec.GetCString() : "<null>",
+                stderr_file_spec ? stderr_file_spec.GetCString() : "<null>");
 
       if (stdin_file_spec)
         m_gdb_comm.SetSTDIN(stdin_file_spec);
@@ -988,9 +898,8 @@
       }
 
       if (GetID() == LLDB_INVALID_PROCESS_ID) {
-        if (log)
-          log->Printf("failed to connect to debugserver: %s",
-                      error.AsCString());
+        LLDB_LOGF(log, "failed to connect to debugserver: %s",
+                  error.AsCString());
         KillDebugserverProcess();
         return error;
       }
@@ -1020,8 +929,7 @@
         }
       }
     } else {
-      if (log)
-        log->Printf("failed to connect to debugserver: %s", error.AsCString());
+      LLDB_LOGF(log, "failed to connect to debugserver: %s", error.AsCString());
     }
   } else {
     // Set our user ID to an invalid process ID.
@@ -1040,9 +948,8 @@
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
 
   if (!connect_url.empty()) {
-    if (log)
-      log->Printf("ProcessGDBRemote::%s Connecting to %s", __FUNCTION__,
-                  connect_url.str().c_str());
+    LLDB_LOGF(log, "ProcessGDBRemote::%s Connecting to %s", __FUNCTION__,
+              connect_url.str().c_str());
     std::unique_ptr<ConnectionFileDescriptor> conn_up(
         new ConnectionFileDescriptor());
     if (conn_up) {
@@ -1062,7 +969,7 @@
         if (retry_count >= max_retry_count)
           break;
 
-        usleep(100000);
+        std::this_thread::sleep_for(std::chrono::milliseconds(100));
       }
     }
   }
@@ -1116,8 +1023,7 @@
 
 void ProcessGDBRemote::DidLaunchOrAttach(ArchSpec &process_arch) {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessGDBRemote::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "ProcessGDBRemote::%s()", __FUNCTION__);
   if (GetID() != LLDB_INVALID_PROCESS_ID) {
     BuildDynamicRegisterInfo(false);
 
@@ -1130,43 +1036,42 @@
     const ArchSpec &remote_process_arch = m_gdb_comm.GetProcessArchitecture();
     if (remote_process_arch.IsValid()) {
       process_arch = remote_process_arch;
-      if (log)
-        log->Printf("ProcessGDBRemote::%s gdb-remote had process architecture, "
-                    "using %s %s",
-                    __FUNCTION__,
-                    process_arch.GetArchitectureName()
-                        ? process_arch.GetArchitectureName()
-                        : "<null>",
-                    process_arch.GetTriple().getTriple().c_str()
-                        ? process_arch.GetTriple().getTriple().c_str()
-                        : "<null>");
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::%s gdb-remote had process architecture, "
+                "using %s %s",
+                __FUNCTION__,
+                process_arch.GetArchitectureName()
+                    ? process_arch.GetArchitectureName()
+                    : "<null>",
+                process_arch.GetTriple().getTriple().c_str()
+                    ? process_arch.GetTriple().getTriple().c_str()
+                    : "<null>");
     } else {
       process_arch = m_gdb_comm.GetHostArchitecture();
-      if (log)
-        log->Printf("ProcessGDBRemote::%s gdb-remote did not have process "
-                    "architecture, using gdb-remote host architecture %s %s",
-                    __FUNCTION__,
-                    process_arch.GetArchitectureName()
-                        ? process_arch.GetArchitectureName()
-                        : "<null>",
-                    process_arch.GetTriple().getTriple().c_str()
-                        ? process_arch.GetTriple().getTriple().c_str()
-                        : "<null>");
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::%s gdb-remote did not have process "
+                "architecture, using gdb-remote host architecture %s %s",
+                __FUNCTION__,
+                process_arch.GetArchitectureName()
+                    ? process_arch.GetArchitectureName()
+                    : "<null>",
+                process_arch.GetTriple().getTriple().c_str()
+                    ? process_arch.GetTriple().getTriple().c_str()
+                    : "<null>");
     }
 
     if (process_arch.IsValid()) {
       const ArchSpec &target_arch = GetTarget().GetArchitecture();
       if (target_arch.IsValid()) {
-        if (log)
-          log->Printf(
-              "ProcessGDBRemote::%s analyzing target arch, currently %s %s",
-              __FUNCTION__,
-              target_arch.GetArchitectureName()
-                  ? target_arch.GetArchitectureName()
-                  : "<null>",
-              target_arch.GetTriple().getTriple().c_str()
-                  ? target_arch.GetTriple().getTriple().c_str()
-                  : "<null>");
+        LLDB_LOGF(log,
+                  "ProcessGDBRemote::%s analyzing target arch, currently %s %s",
+                  __FUNCTION__,
+                  target_arch.GetArchitectureName()
+                      ? target_arch.GetArchitectureName()
+                      : "<null>",
+                  target_arch.GetTriple().getTriple().c_str()
+                      ? target_arch.GetTriple().getTriple().c_str()
+                      : "<null>");
 
         // If the remote host is ARM and we have apple as the vendor, then
         // ARM executables and shared libraries can have mixed ARM
@@ -1180,16 +1085,16 @@
              process_arch.GetMachine() == llvm::Triple::thumb) &&
             process_arch.GetTriple().getVendor() == llvm::Triple::Apple) {
           GetTarget().SetArchitecture(process_arch);
-          if (log)
-            log->Printf("ProcessGDBRemote::%s remote process is ARM/Apple, "
-                        "setting target arch to %s %s",
-                        __FUNCTION__,
-                        process_arch.GetArchitectureName()
-                            ? process_arch.GetArchitectureName()
-                            : "<null>",
-                        process_arch.GetTriple().getTriple().c_str()
-                            ? process_arch.GetTriple().getTriple().c_str()
-                            : "<null>");
+          LLDB_LOGF(log,
+                    "ProcessGDBRemote::%s remote process is ARM/Apple, "
+                    "setting target arch to %s %s",
+                    __FUNCTION__,
+                    process_arch.GetArchitectureName()
+                        ? process_arch.GetArchitectureName()
+                        : "<null>",
+                    process_arch.GetTriple().getTriple().c_str()
+                        ? process_arch.GetTriple().getTriple().c_str()
+                        : "<null>");
         } else {
           // Fill in what is missing in the triple
           const llvm::Triple &remote_triple = process_arch.GetTriple();
@@ -1211,16 +1116,16 @@
           }
         }
 
-        if (log)
-          log->Printf("ProcessGDBRemote::%s final target arch after "
-                      "adjustments for remote architecture: %s %s",
-                      __FUNCTION__,
-                      target_arch.GetArchitectureName()
-                          ? target_arch.GetArchitectureName()
-                          : "<null>",
-                      target_arch.GetTriple().getTriple().c_str()
-                          ? target_arch.GetTriple().getTriple().c_str()
-                          : "<null>");
+        LLDB_LOGF(log,
+                  "ProcessGDBRemote::%s final target arch after "
+                  "adjustments for remote architecture: %s %s",
+                  __FUNCTION__,
+                  target_arch.GetArchitectureName()
+                      ? target_arch.GetArchitectureName()
+                      : "<null>",
+                  target_arch.GetTriple().getTriple().c_str()
+                      ? target_arch.GetTriple().getTriple().c_str()
+                      : "<null>");
       } else {
         // The target doesn't have a valid architecture yet, set it from the
         // architecture we got from the remote GDB server
@@ -1247,8 +1152,7 @@
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
   Status error;
 
-  if (log)
-    log->Printf("ProcessGDBRemote::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "ProcessGDBRemote::%s()", __FUNCTION__);
 
   // Clear out and clean up from any current state
   Clear();
@@ -1359,8 +1263,7 @@
 Status ProcessGDBRemote::DoResume() {
   Status error;
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessGDBRemote::Resume()");
+  LLDB_LOGF(log, "ProcessGDBRemote::Resume()");
 
   ListenerSP listener_sp(
       Listener::MakeListener("gdb-remote.resume-packet-sent"));
@@ -1547,9 +1450,8 @@
       EventSP event_sp;
       if (!m_async_thread.IsJoinable()) {
         error.SetErrorString("Trying to resume but the async thread is dead.");
-        if (log)
-          log->Printf("ProcessGDBRemote::DoResume: Trying to resume but the "
-                      "async thread is dead.");
+        LLDB_LOGF(log, "ProcessGDBRemote::DoResume: Trying to resume but the "
+                       "async thread is dead.");
         return error;
       }
 
@@ -1560,14 +1462,13 @@
 
       if (!listener_sp->GetEvent(event_sp, std::chrono::seconds(5))) {
         error.SetErrorString("Resume timed out.");
-        if (log)
-          log->Printf("ProcessGDBRemote::DoResume: Resume timed out.");
+        LLDB_LOGF(log, "ProcessGDBRemote::DoResume: Resume timed out.");
       } else if (event_sp->BroadcasterIs(&m_async_broadcaster)) {
         error.SetErrorString("Broadcast continue, but the async thread was "
                              "killed before we got an ack back.");
-        if (log)
-          log->Printf("ProcessGDBRemote::DoResume: Broadcast continue, but the "
-                      "async thread was killed before we got an ack back.");
+        LLDB_LOGF(log,
+                  "ProcessGDBRemote::DoResume: Broadcast continue, but the "
+                  "async thread was killed before we got an ack back.");
         return error;
       }
     }
@@ -1864,8 +1765,7 @@
       }
 
       for (const auto &pair : expedited_register_map) {
-        StringExtractor reg_value_extractor;
-        reg_value_extractor.GetStringRef() = pair.second;
+        StringExtractor reg_value_extractor(pair.second);
         DataBufferSP buffer_sp(new DataBufferHeap(
             reg_value_extractor.GetStringRef().size() / 2, 0));
         reg_value_extractor.GetHexBytes(buffer_sp->GetData(), '\xcc');
@@ -1979,8 +1879,7 @@
               if (watch_id == LLDB_INVALID_WATCH_ID) {
                 Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(
                     GDBR_LOG_WATCHPOINTS));
-                if (log)
-                  log->Printf("failed to find watchpoint");
+                LLDB_LOGF(log, "failed to find watchpoint");
               }
               thread_sp->SetStopInfo(StopInfo::CreateStopReasonWithWatchpointID(
                   *thread_sp, watch_id, wp_hit_addr));
@@ -2400,7 +2299,12 @@
         ostr.Printf("%" PRIu64 " %" PRIu32, wp_addr, wp_index);
         description = ostr.GetString();
       } else if (key.compare("library") == 0) {
-        LoadModules();
+        auto error = LoadModules();
+        if (error) {
+          Log *log(
+              ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+          LLDB_LOG_ERROR(log, std::move(error), "Failed to load modules: {0}");
+        }
       } else if (key.size() == 2 && ::isxdigit(key[0]) && ::isxdigit(key[1])) {
         uint32_t reg = UINT32_MAX;
         if (!key.getAsInteger(16, reg))
@@ -2445,21 +2349,22 @@
 
   m_thread_ids.clear();
   m_thread_pcs.clear();
+
   // Set the thread stop info. It might have a "threads" key whose value is a
   // list of all thread IDs in the current process, so m_thread_ids might get
   // set.
+  // Check to see if SetThreadStopInfo() filled in m_thread_ids?
+  if (m_thread_ids.empty()) {
+      // No, we need to fetch the thread list manually
+      UpdateThreadIDList();
+  }
+
+  // We might set some stop info's so make sure the thread list is up to
+  // date before we do that or we might overwrite what was computed here.
+  UpdateThreadListIfNeeded();
 
   // Scope for the lock
   {
-    // Check to see if SetThreadStopInfo() filled in m_thread_ids?
-    if (m_thread_ids.empty()) {
-        // No, we need to fetch the thread list manually
-        UpdateThreadIDList();
-    }
-    // We might set some stop info's so make sure the thread list is up to
-    // date before we do that or we might overwrite what was computed here.
-    UpdateThreadListIfNeeded();
-
     // Lock the thread stack while we access it
     std::lock_guard<std::recursive_mutex> guard(m_last_stop_packet_mutex);
     // Get the number of stop packets on the stack
@@ -2474,7 +2379,7 @@
     // Clear the thread stop stack
     m_stop_packet_stack.clear();
   }
-  
+
   // If we have queried for a default thread id
   if (m_initial_tid != LLDB_INVALID_THREAD_ID) {
     m_thread_list.SetSelectedThreadByID(m_initial_tid);
@@ -2501,8 +2406,7 @@
 Status ProcessGDBRemote::DoDetach(bool keep_stopped) {
   Status error;
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessGDBRemote::DoDetach(keep_stopped: %i)", keep_stopped);
+  LLDB_LOGF(log, "ProcessGDBRemote::DoDetach(keep_stopped: %i)", keep_stopped);
 
   error = m_gdb_comm.Detach(keep_stopped);
   if (log) {
@@ -2510,8 +2414,9 @@
       log->PutCString(
           "ProcessGDBRemote::DoDetach() detach packet sent successfully");
     else
-      log->Printf("ProcessGDBRemote::DoDetach() detach packet send failed: %s",
-                  error.AsCString() ? error.AsCString() : "<unknown error>");
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::DoDetach() detach packet send failed: %s",
+                error.AsCString() ? error.AsCString() : "<unknown error>");
   }
 
   if (!error.Success())
@@ -2530,8 +2435,7 @@
 Status ProcessGDBRemote::DoDestroy() {
   Status error;
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessGDBRemote::DoDestroy()");
+  LLDB_LOGF(log, "ProcessGDBRemote::DoDestroy()");
 
   // There is a bug in older iOS debugservers where they don't shut down the
   // process they are debugging properly.  If the process is sitting at a
@@ -2586,11 +2490,11 @@
               reason = stop_info_sp->GetStopReason();
             if (reason == eStopReasonBreakpoint ||
                 reason == eStopReasonException) {
-              if (log)
-                log->Printf(
-                    "ProcessGDBRemote::DoDestroy() - thread: 0x%4.4" PRIx64
-                    " stopped with reason: %s.",
-                    thread_sp->GetProtocolID(), stop_info_sp->GetDescription());
+              LLDB_LOGF(log,
+                        "ProcessGDBRemote::DoDestroy() - thread: 0x%4.4" PRIx64
+                        " stopped with reason: %s.",
+                        thread_sp->GetProtocolID(),
+                        stop_info_sp->GetDescription());
               stop_looks_like_crash = true;
               break;
             }
@@ -2622,10 +2526,10 @@
                 reason = stop_info_sp->GetStopReason();
               if (reason != eStopReasonBreakpoint &&
                   reason != eStopReasonException) {
-                if (log)
-                  log->Printf("ProcessGDBRemote::DoDestroy() - Suspending "
-                              "thread: 0x%4.4" PRIx64 " before running.",
-                              thread_sp->GetProtocolID());
+                LLDB_LOGF(log,
+                          "ProcessGDBRemote::DoDestroy() - Suspending "
+                          "thread: 0x%4.4" PRIx64 " before running.",
+                          thread_sp->GetProtocolID());
                 thread_sp->SetResumeState(eStateSuspended);
               }
             }
@@ -2669,30 +2573,28 @@
             int status;
             ::pid_t reap_pid;
             reap_pid = waitpid(GetID(), &status, WNOHANG);
-            if (log)
-              log->Printf("Reaped pid: %d, status: %d.\n", reap_pid, status);
+            LLDB_LOGF(log, "Reaped pid: %d, status: %d.\n", reap_pid, status);
           }
 #endif
           SetLastStopPacket(response);
           ClearThreadIDList();
           exit_status = response.GetHexU8();
         } else {
-          if (log)
-            log->Printf("ProcessGDBRemote::DoDestroy - got unexpected response "
-                        "to k packet: %s",
-                        response.GetStringRef().c_str());
+          LLDB_LOGF(log,
+                    "ProcessGDBRemote::DoDestroy - got unexpected response "
+                    "to k packet: %s",
+                    response.GetStringRef().data());
           exit_string.assign("got unexpected response to k packet: ");
           exit_string.append(response.GetStringRef());
         }
       } else {
-        if (log)
-          log->Printf("ProcessGDBRemote::DoDestroy - failed to send k packet");
+        LLDB_LOGF(log, "ProcessGDBRemote::DoDestroy - failed to send k packet");
         exit_string.assign("failed to send the k packet");
       }
     } else {
-      if (log)
-        log->Printf("ProcessGDBRemote::DoDestroy - killed or interrupted while "
-                    "attaching");
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::DoDestroy - killed or interrupted while "
+                "attaching");
       exit_string.assign("killed or interrupted while attaching.");
     }
   } else {
@@ -2715,8 +2617,7 @@
       response.GetStringRef().find(";reason:exec;") != std::string::npos;
   if (did_exec) {
     Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-    if (log)
-      log->Printf("ProcessGDBRemote::SetLastStopPacket () - detected exec");
+    LLDB_LOGF(log, "ProcessGDBRemote::SetLastStopPacket () - detected exec");
 
     m_thread_list_real.Clear();
     m_thread_list.Clear();
@@ -2756,9 +2657,13 @@
 
   // the loaded module list can also provides a link map address
   if (addr == LLDB_INVALID_ADDRESS) {
-    LoadedModuleInfoList list;
-    if (GetLoadedModuleList(list).Success())
-      addr = list.m_link_map;
+    llvm::Expected<LoadedModuleInfoList> list = GetLoadedModuleList();
+    if (!list) {
+      Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
+      LLDB_LOG_ERROR(log, list.takeError(), "Failed to read module list: {0}");
+    } else {
+      addr = list->m_link_map;
+    }
   }
 
   return addr;
@@ -2840,7 +2745,7 @@
     else
       error.SetErrorStringWithFormat(
           "unexpected response to GDB server memory read packet '%s': '%s'",
-          packet, response.GetStringRef().c_str());
+          packet, response.GetStringRef().data());
   } else {
     error.SetErrorStringWithFormat("failed to send packet: '%s'", packet);
   }
@@ -2950,7 +2855,7 @@
       else
         status.SetErrorStringWithFormat(
             "unexpected response to GDB server flash erase packet '%s': '%s'",
-            packet.GetData(), response.GetStringRef().c_str());
+            packet.GetData(), response.GetStringRef().data());
     }
   } else {
     status.SetErrorStringWithFormat("failed to send packet: '%s'",
@@ -2978,7 +2883,7 @@
       else
         status.SetErrorStringWithFormat(
             "unexpected response to GDB server flash done packet: '%s'",
-            response.GetStringRef().c_str());
+            response.GetStringRef().data());
     }
   } else {
     status.SetErrorStringWithFormat("failed to send flash done packet");
@@ -3041,7 +2946,7 @@
     else
       error.SetErrorStringWithFormat(
           "unexpected response to GDB server memory write packet '%s': '%s'",
-          packet.GetData(), response.GetStringRef().c_str());
+          packet.GetData(), response.GetStringRef().data());
   } else {
     error.SetErrorStringWithFormat("failed to send packet: '%s'",
                                    packet.GetData());
@@ -3078,11 +2983,11 @@
       m_addr_to_mmap_size[allocated_addr] = size;
     else {
       allocated_addr = LLDB_INVALID_ADDRESS;
-      if (log)
-        log->Printf("ProcessGDBRemote::%s no direct stub support for memory "
-                    "allocation, and InferiorCallMmap also failed - is stub "
-                    "missing register context save/restore capability?",
-                    __FUNCTION__);
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::%s no direct stub support for memory "
+                "allocation, and InferiorCallMmap also failed - is stub "
+                "missing register context save/restore capability?",
+                __FUNCTION__);
     }
   }
 
@@ -3173,17 +3078,17 @@
   const addr_t addr = bp_site->GetLoadAddress();
 
   // Log that a breakpoint was requested
-  if (log)
-    log->Printf("ProcessGDBRemote::EnableBreakpointSite (size_id = %" PRIu64
-                ") address = 0x%" PRIx64,
-                site_id, (uint64_t)addr);
+  LLDB_LOGF(log,
+            "ProcessGDBRemote::EnableBreakpointSite (size_id = %" PRIu64
+            ") address = 0x%" PRIx64,
+            site_id, (uint64_t)addr);
 
   // Breakpoint already exists and is enabled
   if (bp_site->IsEnabled()) {
-    if (log)
-      log->Printf("ProcessGDBRemote::EnableBreakpointSite (size_id = %" PRIu64
-                  ") address = 0x%" PRIx64 " -- SUCCESS (already enabled)",
-                  site_id, (uint64_t)addr);
+    LLDB_LOGF(log,
+              "ProcessGDBRemote::EnableBreakpointSite (size_id = %" PRIu64
+              ") address = 0x%" PRIx64 " -- SUCCESS (already enabled)",
+              site_id, (uint64_t)addr);
     return error;
   }
 
@@ -3231,8 +3136,7 @@
     // We reach here when software breakpoints have been found to be
     // unsupported. For future calls to set a breakpoint, we will not attempt
     // to set a breakpoint with a type that is known not to be supported.
-    if (log)
-      log->Printf("Software breakpoints are unsupported");
+    LLDB_LOGF(log, "Software breakpoints are unsupported");
 
     // So we will fall through and try a hardware breakpoint
   }
@@ -3270,8 +3174,7 @@
 
     // We will reach here when the stub gives an unsupported response to a
     // hardware breakpoint
-    if (log)
-      log->Printf("Hardware breakpoints are unsupported");
+    LLDB_LOGF(log, "Hardware breakpoints are unsupported");
 
     // Finally we will falling through to a #trap style breakpoint
   }
@@ -3293,10 +3196,10 @@
   addr_t addr = bp_site->GetLoadAddress();
   user_id_t site_id = bp_site->GetID();
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("ProcessGDBRemote::DisableBreakpointSite (site_id = %" PRIu64
-                ") addr = 0x%8.8" PRIx64,
-                site_id, (uint64_t)addr);
+  LLDB_LOGF(log,
+            "ProcessGDBRemote::DisableBreakpointSite (site_id = %" PRIu64
+            ") addr = 0x%8.8" PRIx64,
+            site_id, (uint64_t)addr);
 
   if (bp_site->IsEnabled()) {
     const size_t bp_op_size = GetSoftwareBreakpointTrapOpcode(bp_site);
@@ -3328,10 +3231,10 @@
     if (error.Success())
       bp_site->SetEnabled(false);
   } else {
-    if (log)
-      log->Printf("ProcessGDBRemote::DisableBreakpointSite (site_id = %" PRIu64
-                  ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)",
-                  site_id, (uint64_t)addr);
+    LLDB_LOGF(log,
+              "ProcessGDBRemote::DisableBreakpointSite (site_id = %" PRIu64
+              ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)",
+              site_id, (uint64_t)addr);
     return error;
   }
 
@@ -3363,14 +3266,13 @@
     addr_t addr = wp->GetLoadAddress();
     Log *log(
         ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_WATCHPOINTS));
-    if (log)
-      log->Printf("ProcessGDBRemote::EnableWatchpoint(watchID = %" PRIu64 ")",
-                  watchID);
+    LLDB_LOGF(log, "ProcessGDBRemote::EnableWatchpoint(watchID = %" PRIu64 ")",
+              watchID);
     if (wp->IsEnabled()) {
-      if (log)
-        log->Printf("ProcessGDBRemote::EnableWatchpoint(watchID = %" PRIu64
-                    ") addr = 0x%8.8" PRIx64 ": watchpoint already enabled.",
-                    watchID, (uint64_t)addr);
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::EnableWatchpoint(watchID = %" PRIu64
+                ") addr = 0x%8.8" PRIx64 ": watchpoint already enabled.",
+                watchID, (uint64_t)addr);
       return error;
     }
 
@@ -3403,16 +3305,16 @@
 
     addr_t addr = wp->GetLoadAddress();
 
-    if (log)
-      log->Printf("ProcessGDBRemote::DisableWatchpoint (watchID = %" PRIu64
-                  ") addr = 0x%8.8" PRIx64,
-                  watchID, (uint64_t)addr);
+    LLDB_LOGF(log,
+              "ProcessGDBRemote::DisableWatchpoint (watchID = %" PRIu64
+              ") addr = 0x%8.8" PRIx64,
+              watchID, (uint64_t)addr);
 
     if (!wp->IsEnabled()) {
-      if (log)
-        log->Printf("ProcessGDBRemote::DisableWatchpoint (watchID = %" PRIu64
-                    ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)",
-                    watchID, (uint64_t)addr);
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::DisableWatchpoint (watchID = %" PRIu64
+                ") addr = 0x%8.8" PRIx64 " -- SUCCESS (already disabled)",
+                watchID, (uint64_t)addr);
       // See also 'class WatchpointSentry' within StopInfo.cpp. This disabling
       // attempt might come from the user-supplied actions, we'll route it in
       // order for the watchpoint object to intelligently process this action.
@@ -3447,8 +3349,7 @@
 Status ProcessGDBRemote::DoSignal(int signo) {
   Status error;
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessGDBRemote::DoSignal (signal = %d)", signo);
+  LLDB_LOGF(log, "ProcessGDBRemote::DoSignal (signal = %d)", signo);
 
   if (!m_gdb_comm.SendAsyncSignal(signo))
     error.SetErrorStringWithFormat("failed to send signal %i", signo);
@@ -3459,16 +3360,20 @@
   if (!loader)
     return Status("No loader provided.");
 
-  // Construct replay history path.
-  FileSpec history_file = loader->GetFile<ProcessGDBRemoteProvider::Info>();
-  if (!history_file)
-    return Status("No provider for gdb-remote.");
+  static std::unique_ptr<repro::MultiLoader<repro::GDBRemoteProvider>>
+      multi_loader = repro::MultiLoader<repro::GDBRemoteProvider>::Create(
+          repro::Reproducer::Instance().GetLoader());
 
-  // Enable replay mode.
-  m_replay_mode = true;
+  if (!multi_loader)
+    return Status("No gdb remote provider found.");
+
+  llvm::Optional<std::string> history_file = multi_loader->GetNextFile();
+  if (!history_file)
+    return Status("No gdb remote packet log found.");
 
   // Load replay history.
-  if (auto error = m_gdb_replay_server.LoadReplayHistory(history_file))
+  if (auto error =
+          m_gdb_replay_server.LoadReplayHistory(FileSpec(*history_file)))
     return Status("Unable to load replay history");
 
   // Make a local connection.
@@ -3476,6 +3381,9 @@
                                                           m_gdb_replay_server))
     return Status("Unable to connect to replay server");
 
+  // Enable replay mode.
+  m_replay_mode = true;
+
   // Start server thread.
   m_gdb_replay_server.StartAsyncThread();
 
@@ -3556,8 +3464,8 @@
 
     int our_socket = sockets[0];
     int gdb_socket = sockets[1];
-    CleanUp cleanup_our(close, our_socket);
-    CleanUp cleanup_gdb(close, gdb_socket);
+    auto cleanup_our = llvm::make_scope_exit([&]() { close(our_socket); });
+    auto cleanup_gdb = llvm::make_scope_exit([&]() { close(gdb_socket); });
 
     // Don't let any child processes inherit our communication socket
     SetCloexecFlag(our_socket);
@@ -3577,7 +3485,7 @@
 #ifdef USE_SOCKETPAIR_FOR_LOCAL_CONNECTION
       // Our process spawned correctly, we can now set our connection to use
       // our end of the socket pair
-      cleanup_our.disable();
+      cleanup_our.release();
       m_gdb_comm.SetConnection(new ConnectionFileDescriptor(our_socket, true));
 #endif
       StartAsyncThread();
@@ -3586,9 +3494,8 @@
     if (error.Fail()) {
       Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
 
-      if (log)
-        log->Printf("failed to start debugserver process: %s",
-                    error.AsCString());
+      LLDB_LOGF(log, "failed to start debugserver process: %s",
+                error.AsCString());
       return error;
     }
 
@@ -3614,22 +3521,22 @@
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
   const bool handled = true;
 
-  if (log)
-    log->Printf("ProcessGDBRemote::%s(process_wp, pid=%" PRIu64
-                ", signo=%i (0x%x), exit_status=%i)",
-                __FUNCTION__, debugserver_pid, signo, signo, exit_status);
+  LLDB_LOGF(log,
+            "ProcessGDBRemote::%s(process_wp, pid=%" PRIu64
+            ", signo=%i (0x%x), exit_status=%i)",
+            __FUNCTION__, debugserver_pid, signo, signo, exit_status);
 
   std::shared_ptr<ProcessGDBRemote> process_sp = process_wp.lock();
-  if (log)
-    log->Printf("ProcessGDBRemote::%s(process = %p)", __FUNCTION__,
-                static_cast<void *>(process_sp.get()));
+  LLDB_LOGF(log, "ProcessGDBRemote::%s(process = %p)", __FUNCTION__,
+            static_cast<void *>(process_sp.get()));
   if (!process_sp || process_sp->m_debugserver_pid != debugserver_pid)
     return handled;
 
   // Sleep for a half a second to make sure our inferior process has time to
   // set its exit status before we set it incorrectly when both the debugserver
   // and the inferior process shut down.
-  usleep(500000);
+  std::this_thread::sleep_for(std::chrono::milliseconds(500));
+
   // If our process hasn't yet exited, debugserver might have died. If the
   // process did exit, then we are reaping it.
   const StateType state = process_sp->GetState();
@@ -3692,8 +3599,7 @@
 bool ProcessGDBRemote::StartAsyncThread() {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
 
-  if (log)
-    log->Printf("ProcessGDBRemote::%s ()", __FUNCTION__);
+  LLDB_LOGF(log, "ProcessGDBRemote::%s ()", __FUNCTION__);
 
   std::lock_guard<std::recursive_mutex> guard(m_async_thread_state_mutex);
   if (!m_async_thread.IsJoinable()) {
@@ -3703,16 +3609,17 @@
     llvm::Expected<HostThread> async_thread = ThreadLauncher::LaunchThread(
         "<lldb.process.gdb-remote.async>", ProcessGDBRemote::AsyncThread, this);
     if (!async_thread) {
-      LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST),
-               "failed to launch host thread: {}",
-               llvm::toString(async_thread.takeError()));
+      LLDB_LOG_ERROR(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST),
+                     async_thread.takeError(),
+                     "failed to launch host thread: {}");
       return false;
     }
     m_async_thread = *async_thread;
-  } else if (log)
-    log->Printf("ProcessGDBRemote::%s () - Called when Async thread was "
-                "already running.",
-                __FUNCTION__);
+  } else
+    LLDB_LOGF(log,
+              "ProcessGDBRemote::%s () - Called when Async thread was "
+              "already running.",
+              __FUNCTION__);
 
   return m_async_thread.IsJoinable();
 }
@@ -3720,8 +3627,7 @@
 void ProcessGDBRemote::StopAsyncThread() {
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
 
-  if (log)
-    log->Printf("ProcessGDBRemote::%s ()", __FUNCTION__);
+  LLDB_LOGF(log, "ProcessGDBRemote::%s ()", __FUNCTION__);
 
   std::lock_guard<std::recursive_mutex> guard(m_async_thread_state_mutex);
   if (m_async_thread.IsJoinable()) {
@@ -3733,8 +3639,9 @@
     // Stop the stdio thread
     m_async_thread.Join(nullptr);
     m_async_thread.Reset();
-  } else if (log)
-    log->Printf(
+  } else
+    LLDB_LOGF(
+        log,
         "ProcessGDBRemote::%s () - Called when Async thread was not running.",
         __FUNCTION__);
 }
@@ -3768,25 +3675,25 @@
   ProcessGDBRemote *process = (ProcessGDBRemote *)arg;
 
   Log *log(ProcessGDBRemoteLog::GetLogIfAllCategoriesSet(GDBR_LOG_PROCESS));
-  if (log)
-    log->Printf("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
-                ") thread starting...",
-                __FUNCTION__, arg, process->GetID());
+  LLDB_LOGF(log,
+            "ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
+            ") thread starting...",
+            __FUNCTION__, arg, process->GetID());
 
   EventSP event_sp;
   bool done = false;
   while (!done) {
-    if (log)
-      log->Printf("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
-                  ") listener.WaitForEvent (NULL, event_sp)...",
-                  __FUNCTION__, arg, process->GetID());
+    LLDB_LOGF(log,
+              "ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
+              ") listener.WaitForEvent (NULL, event_sp)...",
+              __FUNCTION__, arg, process->GetID());
     if (process->m_async_listener_sp->GetEvent(event_sp, llvm::None)) {
       const uint32_t event_type = event_sp->GetType();
       if (event_sp->BroadcasterIs(&process->m_async_broadcaster)) {
-        if (log)
-          log->Printf("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
-                      ") Got an event of type: %d...",
-                      __FUNCTION__, arg, process->GetID(), event_type);
+        LLDB_LOGF(log,
+                  "ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
+                  ") Got an event of type: %d...",
+                  __FUNCTION__, arg, process->GetID(), event_type);
 
         switch (event_type) {
         case eBroadcastBitAsyncContinue: {
@@ -3797,10 +3704,10 @@
             const char *continue_cstr =
                 (const char *)continue_packet->GetBytes();
             const size_t continue_cstr_len = continue_packet->GetByteSize();
-            if (log)
-              log->Printf("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
-                          ") got eBroadcastBitAsyncContinue: %s",
-                          __FUNCTION__, arg, process->GetID(), continue_cstr);
+            LLDB_LOGF(log,
+                      "ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
+                      ") got eBroadcastBitAsyncContinue: %s",
+                      __FUNCTION__, arg, process->GetID(), continue_cstr);
 
             if (::strstr(continue_cstr, "vAttach") == nullptr)
               process->SetPrivateState(eStateRunning);
@@ -3891,18 +3798,18 @@
         break;
 
         case eBroadcastBitAsyncThreadShouldExit:
-          if (log)
-            log->Printf("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
-                        ") got eBroadcastBitAsyncThreadShouldExit...",
-                        __FUNCTION__, arg, process->GetID());
+          LLDB_LOGF(log,
+                    "ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
+                    ") got eBroadcastBitAsyncThreadShouldExit...",
+                    __FUNCTION__, arg, process->GetID());
           done = true;
           break;
 
         default:
-          if (log)
-            log->Printf("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
-                        ") got unknown event 0x%8.8x",
-                        __FUNCTION__, arg, process->GetID(), event_type);
+          LLDB_LOGF(log,
+                    "ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
+                    ") got unknown event 0x%8.8x",
+                    __FUNCTION__, arg, process->GetID(), event_type);
           done = true;
           break;
         }
@@ -3925,27 +3832,27 @@
         }
 
         default:
-          if (log)
-            log->Printf("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
-                        ") got unknown event 0x%8.8x",
-                        __FUNCTION__, arg, process->GetID(), event_type);
+          LLDB_LOGF(log,
+                    "ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
+                    ") got unknown event 0x%8.8x",
+                    __FUNCTION__, arg, process->GetID(), event_type);
           done = true;
           break;
         }
       }
     } else {
-      if (log)
-        log->Printf("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
-                    ") listener.WaitForEvent (NULL, event_sp) => false",
-                    __FUNCTION__, arg, process->GetID());
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
+                ") listener.WaitForEvent (NULL, event_sp) => false",
+                __FUNCTION__, arg, process->GetID());
       done = true;
     }
   }
 
-  if (log)
-    log->Printf("ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
-                ") thread exiting...",
-                __FUNCTION__, arg, process->GetID());
+  LLDB_LOGF(log,
+            "ProcessGDBRemote::%s (arg = %p, pid = %" PRIu64
+            ") thread exiting...",
+            __FUNCTION__, arg, process->GetID());
 
   return {};
 }
@@ -3977,8 +3884,7 @@
   // thread when it starts to
   // run so I can stop it if that's what I want to do.
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-  if (log)
-    log->Printf("Hit New Thread Notification breakpoint.");
+  LLDB_LOGF(log, "Hit New Thread Notification breakpoint.");
   return false;
 }
 
@@ -4023,7 +3929,7 @@
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
   if (m_thread_create_bp_sp) {
     if (log && log->GetVerbose())
-      log->Printf("Enabled noticing new thread breakpoint.");
+      LLDB_LOGF(log, "Enabled noticing new thread breakpoint.");
     m_thread_create_bp_sp->SetEnabled(true);
   } else {
     PlatformSP platform_sp(GetTarget().GetPlatform());
@@ -4032,14 +3938,13 @@
           platform_sp->SetThreadCreationBreakpoint(GetTarget());
       if (m_thread_create_bp_sp) {
         if (log && log->GetVerbose())
-          log->Printf(
-              "Successfully created new thread notification breakpoint %i",
+          LLDB_LOGF(
+              log, "Successfully created new thread notification breakpoint %i",
               m_thread_create_bp_sp->GetID());
         m_thread_create_bp_sp->SetCallback(
             ProcessGDBRemote::NewThreadNotifyBreakpointHit, this, true);
       } else {
-        if (log)
-          log->Printf("Failed to create new thread notification breakpoint.");
+        LLDB_LOGF(log, "Failed to create new thread notification breakpoint.");
       }
     }
   }
@@ -4049,7 +3954,7 @@
 bool ProcessGDBRemote::StopNoticingNewThreads() {
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
   if (log && log->GetVerbose())
-    log->Printf("Disabling new thread notification breakpoint.");
+    LLDB_LOGF(log, "Disabling new thread notification breakpoint.");
 
   if (m_thread_create_bp_sp)
     m_thread_create_bp_sp->SetEnabled(false);
@@ -4325,19 +4230,18 @@
   }
 
   if (!m_gdb_comm.GetModuleInfo(module_file_spec, arch, module_spec)) {
-    if (log)
-      log->Printf("ProcessGDBRemote::%s - failed to get module info for %s:%s",
-                  __FUNCTION__, module_file_spec.GetPath().c_str(),
-                  arch.GetTriple().getTriple().c_str());
+    LLDB_LOGF(log, "ProcessGDBRemote::%s - failed to get module info for %s:%s",
+              __FUNCTION__, module_file_spec.GetPath().c_str(),
+              arch.GetTriple().getTriple().c_str());
     return false;
   }
 
   if (log) {
     StreamString stream;
     module_spec.Dump(stream);
-    log->Printf("ProcessGDBRemote::%s - got module info for (%s:%s) : %s",
-                __FUNCTION__, module_file_spec.GetPath().c_str(),
-                arch.GetTriple().getTriple().c_str(), stream.GetData());
+    LLDB_LOGF(log, "ProcessGDBRemote::%s - got module info for (%s:%s) : %s",
+              __FUNCTION__, module_file_spec.GetPath().c_str(),
+              arch.GetTriple().getTriple().c_str(), stream.GetData());
   }
 
   m_cached_module_specs[key] = module_spec;
@@ -4361,6 +4265,10 @@
   return m_gdb_comm.GetOSVersion();
 }
 
+llvm::VersionTuple ProcessGDBRemote::GetHostMacCatalystVersion() {
+  return m_gdb_comm.GetMacCatalystVersion();
+}
+
 namespace {
 
 typedef std::vector<std::string> stringVec;
@@ -4492,14 +4400,13 @@
           } else if (name == "invalidate_regnums") {
             SplitCommaSeparatedRegisterNumberString(value, invalidate_regs, 0);
           } else if (name == "dynamic_size_dwarf_expr_bytes") {
-            StringExtractor opcode_extractor;
             std::string opcode_string = value.str();
             size_t dwarf_opcode_len = opcode_string.length() / 2;
             assert(dwarf_opcode_len > 0);
 
             dwarf_opcode_bytes.resize(dwarf_opcode_len);
             reg_info.dynamic_size_dwarf_len = dwarf_opcode_len;
-            opcode_extractor.GetStringRef().swap(opcode_string);
+            StringExtractor opcode_extractor(opcode_string);
             uint32_t ret_val =
                 opcode_extractor.GetHexBytesAvail(dwarf_opcode_bytes);
             assert(dwarf_opcode_len == ret_val);
@@ -4550,7 +4457,9 @@
         }
 
         ++cur_reg_num;
-        AugmentRegisterInfoViaABI(reg_info, reg_name, abi_sp);
+        reg_info.name = reg_name.AsCString();
+        if (abi_sp)
+          abi_sp->AugmentRegisterInfo(reg_info);
         dyn_reg_info.AddRegister(reg_info, reg_name, alt_name, set_name);
 
         return true; // Keep iterating through all "reg" elements
@@ -4565,16 +4474,15 @@
 // information to the current process.  It will call itself recursively
 // for nested register definition files.  It returns true if it was able
 // to fetch and parse an xml file.
-bool ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(ArchSpec &arch_to_use, 
-                                                             std::string xml_filename,
-                                                             uint32_t &cur_reg_num,
-                                                             uint32_t &reg_offset) {
+bool ProcessGDBRemote::GetGDBServerRegisterInfoXMLAndProcess(
+    ArchSpec &arch_to_use, std::string xml_filename, uint32_t &cur_reg_num,
+    uint32_t &reg_offset) {
   // request the target xml file
   std::string raw;
   lldb_private::Status lldberr;
-  if (!m_gdb_comm.ReadExtFeature(ConstString("features"), 
-                           ConstString(xml_filename.c_str()), 
-                           raw, lldberr)) {
+  if (!m_gdb_comm.ReadExtFeature(ConstString("features"),
+                                 ConstString(xml_filename.c_str()), raw,
+                                 lldberr)) {
     return false;
   }
 
@@ -4676,8 +4584,8 @@
       }
 
       for (const auto &include : target_info.includes) {
-        GetGDBServerRegisterInfoXMLAndProcess(arch_to_use, include, 
-                                              cur_reg_num, reg_offset);
+        GetGDBServerRegisterInfoXMLAndProcess(arch_to_use, include, cur_reg_num,
+                                              reg_offset);
       }
     }
   } else {
@@ -4705,41 +4613,43 @@
   return m_register_info.GetNumRegisters() > 0;
 }
 
-Status ProcessGDBRemote::GetLoadedModuleList(LoadedModuleInfoList &list) {
+llvm::Expected<LoadedModuleInfoList> ProcessGDBRemote::GetLoadedModuleList() {
   // Make sure LLDB has an XML parser it can use first
   if (!XMLDocument::XMLEnabled())
-    return Status(0, ErrorType::eErrorTypeGeneric);
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "XML parsing not available");
 
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS);
-  if (log)
-    log->Printf("ProcessGDBRemote::%s", __FUNCTION__);
+  LLDB_LOGF(log, "ProcessGDBRemote::%s", __FUNCTION__);
 
+  LoadedModuleInfoList list;
   GDBRemoteCommunicationClient &comm = m_gdb_comm;
   bool can_use_svr4 = GetGlobalPluginProperties()->GetUseSVR4();
 
   // check that we have extended feature read support
   if (can_use_svr4 && comm.GetQXferLibrariesSVR4ReadSupported()) {
-    list.clear();
-
     // request the loaded library list
     std::string raw;
     lldb_private::Status lldberr;
 
     if (!comm.ReadExtFeature(ConstString("libraries-svr4"), ConstString(""),
                              raw, lldberr))
-      return Status(0, ErrorType::eErrorTypeGeneric);
+      return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                     "Error in libraries-svr4 packet");
 
     // parse the xml file in memory
-    if (log)
-      log->Printf("parsing: %s", raw.c_str());
+    LLDB_LOGF(log, "parsing: %s", raw.c_str());
     XMLDocument doc;
 
     if (!doc.ParseMemory(raw.c_str(), raw.size(), "noname.xml"))
-      return Status(0, ErrorType::eErrorTypeGeneric);
+      return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                     "Error reading noname.xml");
 
     XMLNode root_element = doc.GetRootElement("library-list-svr4");
     if (!root_element)
-      return Status();
+      return llvm::createStringError(
+          llvm::inconvertibleErrorCode(),
+          "Error finding library-list-svr4 xml element");
 
     // main link map structure
     llvm::StringRef main_lm = root_element.GetAttributeValue("main-lm");
@@ -4791,10 +4701,11 @@
             module.get_base_is_offset(base_is_offset);
             module.get_dynamic(ld);
 
-            log->Printf("found (link_map:0x%08" PRIx64 ", base:0x%08" PRIx64
-                        "[%s], ld:0x%08" PRIx64 ", name:'%s')",
-                        lm, base, (base_is_offset ? "offset" : "absolute"), ld,
-                        name.c_str());
+            LLDB_LOGF(log,
+                      "found (link_map:0x%08" PRIx64 ", base:0x%08" PRIx64
+                      "[%s], ld:0x%08" PRIx64 ", name:'%s')",
+                      lm, base, (base_is_offset ? "offset" : "absolute"), ld,
+                      name.c_str());
           }
 
           list.add(module);
@@ -4803,29 +4714,30 @@
         });
 
     if (log)
-      log->Printf("found %" PRId32 " modules in total",
-                  (int)list.m_list.size());
+      LLDB_LOGF(log, "found %" PRId32 " modules in total",
+                (int)list.m_list.size());
+    return list;
   } else if (comm.GetQXferLibrariesReadSupported()) {
-    list.clear();
-
     // request the loaded library list
     std::string raw;
     lldb_private::Status lldberr;
 
     if (!comm.ReadExtFeature(ConstString("libraries"), ConstString(""), raw,
                              lldberr))
-      return Status(0, ErrorType::eErrorTypeGeneric);
+      return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                     "Error in libraries packet");
 
-    if (log)
-      log->Printf("parsing: %s", raw.c_str());
+    LLDB_LOGF(log, "parsing: %s", raw.c_str());
     XMLDocument doc;
 
     if (!doc.ParseMemory(raw.c_str(), raw.size(), "noname.xml"))
-      return Status(0, ErrorType::eErrorTypeGeneric);
+      return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                     "Error reading noname.xml");
 
     XMLNode root_element = doc.GetRootElement("library-list");
     if (!root_element)
-      return Status();
+      return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                     "Error finding library-list xml element");
 
     root_element.ForEachChildElementWithName(
         "library", [log, &list](const XMLNode &library) -> bool {
@@ -4853,8 +4765,8 @@
             module.get_base(base);
             module.get_base_is_offset(base_is_offset);
 
-            log->Printf("found (base:0x%08" PRIx64 "[%s], name:'%s')", base,
-                        (base_is_offset ? "offset" : "absolute"), name.c_str());
+            LLDB_LOGF(log, "found (base:0x%08" PRIx64 "[%s], name:'%s')", base,
+                      (base_is_offset ? "offset" : "absolute"), name.c_str());
           }
 
           list.add(module);
@@ -4863,13 +4775,13 @@
         });
 
     if (log)
-      log->Printf("found %" PRId32 " modules in total",
-                  (int)list.m_list.size());
+      LLDB_LOGF(log, "found %" PRId32 " modules in total",
+                (int)list.m_list.size());
+    return list;
   } else {
-    return Status(0, ErrorType::eErrorTypeGeneric);
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "Remote libraries not supported");
   }
-
-  return Status();
 }
 
 lldb::ModuleSP ProcessGDBRemote::LoadModuleAtAddress(const FileSpec &file,
@@ -4884,17 +4796,18 @@
                                      value_is_offset);
 }
 
-size_t ProcessGDBRemote::LoadModules(LoadedModuleInfoList &module_list) {
+llvm::Error ProcessGDBRemote::LoadModules() {
   using lldb_private::process_gdb_remote::ProcessGDBRemote;
 
   // request a list of loaded libraries from GDBServer
-  if (GetLoadedModuleList(module_list).Fail())
-    return 0;
+  llvm::Expected<LoadedModuleInfoList> module_list = GetLoadedModuleList();
+  if (!module_list)
+    return module_list.takeError();
 
   // get a list of all the modules
   ModuleList new_modules;
 
-  for (LoadedModuleInfoList::LoadedModuleInfo &modInfo : module_list.m_list) {
+  for (LoadedModuleInfoList::LoadedModuleInfo &modInfo : module_list->m_list) {
     std::string mod_name;
     lldb::addr_t mod_base;
     lldb::addr_t link_map;
@@ -4961,12 +4874,7 @@
     m_process->GetTarget().ModulesDidLoad(new_modules);
   }
 
-  return new_modules.GetSize();
-}
-
-size_t ProcessGDBRemote::LoadModules() {
-  LoadedModuleInfoList module_list;
-  return LoadModules(module_list);
+  return llvm::ErrorSuccess();
 }
 
 Status ProcessGDBRemote::GetFileLoadAddress(const FileSpec &file,
@@ -5149,7 +5057,8 @@
 
   if (!packet.consume_front(s_async_json_packet_prefix)) {
     if (log) {
-      log->Printf(
+      LLDB_LOGF(
+          log,
           "GDBRemoteCommunicationClientBase::%s() received $J packet "
           "but was not a StructuredData packet: packet starts with "
           "%s",
@@ -5164,16 +5073,18 @@
   if (log) {
     if (json_sp) {
       StreamString json_str;
-      json_sp->Dump(json_str);
+      json_sp->Dump(json_str, true);
       json_str.Flush();
-      log->Printf("ProcessGDBRemote::%s() "
-                  "received Async StructuredData packet: %s",
-                  __FUNCTION__, json_str.GetData());
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::%s() "
+                "received Async StructuredData packet: %s",
+                __FUNCTION__, json_str.GetData());
     } else {
-      log->Printf("ProcessGDBRemote::%s"
-                  "() received StructuredData packet:"
-                  " parse failure",
-                  __FUNCTION__);
+      LLDB_LOGF(log,
+                "ProcessGDBRemote::%s"
+                "() received StructuredData packet:"
+                " parse failure",
+                __FUNCTION__);
     }
   }
   return json_sp;
@@ -5365,7 +5276,7 @@
         result.SetStatus(eReturnStatusSuccessFinishResult);
         Stream &output_strm = result.GetOutputStream();
         output_strm.Printf("  packet: %s\n", packet_cstr);
-        std::string &response_str = response.GetStringRef();
+        std::string response_str = response.GetStringRef();
 
         if (strstr(packet_cstr, "qGetProfileData") != nullptr) {
           response_str = process->HarmonizeThreadIdsForProfileData(response);
@@ -5374,7 +5285,7 @@
         if (response_str.empty())
           output_strm.PutCString("response: \nerror: UNIMPLEMENTED\n");
         else
-          output_strm.Printf("response: %s\n", response.GetStringRef().c_str());
+          output_strm.Printf("response: %s\n", response.GetStringRef().data());
       }
     }
     return true;
@@ -5423,7 +5334,7 @@
       if (response_str.empty())
         output_strm.PutCString("response: \nerror: UNIMPLEMENTED\n");
       else
-        output_strm.Printf("response: %s\n", response.GetStringRef().c_str());
+        output_strm.Printf("response: %s\n", response.GetStringRef().data());
     }
     return true;
   }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
index 9c41fc2..9ea3940 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
@@ -24,8 +24,8 @@
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Broadcaster.h"
 #include "lldb/Utility/ConstString.h"
+#include "lldb/Utility/GDBRemote.h"
 #include "lldb/Utility/Status.h"
-#include "lldb/Utility/StreamGDBRemote.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StringExtractor.h"
 #include "lldb/Utility/StringList.h"
@@ -199,10 +199,11 @@
                            const llvm::Triple &triple) override;
 
   llvm::VersionTuple GetHostOSVersion() override;
+  llvm::VersionTuple GetHostMacCatalystVersion() override;
 
-  size_t LoadModules(LoadedModuleInfoList &module_list) override;
+  llvm::Error LoadModules() override;
 
-  size_t LoadModules() override;
+  llvm::Expected<LoadedModuleInfoList> GetLoadedModuleList() override;
 
   Status GetFileLoadAddress(const FileSpec &file, bool &is_loaded,
                             lldb::addr_t &load_addr) override;
@@ -283,6 +284,7 @@
   lldb::CommandObjectSP m_command_sp;
   int64_t m_breakpoint_pc_offset;
   lldb::tid_t m_initial_tid; // The initial thread ID, given by stub on attach
+  bool m_use_g_packet_for_reading;
 
   bool m_replay_mode;
   bool m_allow_flash_writes;
@@ -391,9 +393,6 @@
   // Query remote GDBServer for register information
   bool GetGDBServerRegisterInfo(ArchSpec &arch);
 
-  // Query remote GDBServer for a detailed loaded library list
-  Status GetLoadedModuleList(LoadedModuleInfoList &);
-
   lldb::ModuleSP LoadModuleAtAddress(const FileSpec &file,
                                      lldb::addr_t link_map,
                                      lldb::addr_t base_addr,
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteProperties.td b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteProperties.td
new file mode 100644
index 0000000..9cbe3d4
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemoteProperties.td
@@ -0,0 +1,20 @@
+include "../../../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "processgdbremote" in {
+  def PacketTimeout: Property<"packet-timeout", "UInt64">,
+    Global,
+    DefaultUnsignedValue<5>,
+    Desc<"Specify the default packet timeout in seconds.">;
+  def TargetDefinitionFile: Property<"target-definition-file", "FileSpec">,
+    Global,
+    DefaultStringValue<"">,
+    Desc<"The file that provides the description for remote target registers.">;
+  def UseSVR4: Property<"use-libraries-svr4", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"If true, the libraries-svr4 feature will be used to get a hold of the process's loaded modules.">;
+  def UseGPacketForReading: Property<"use-g-packet-for-reading", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"Specify if the server should use 'g' packets to read registers.">;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
index 6607bce..9da4819 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
@@ -215,8 +215,7 @@
   StructuredData::ObjectSP object_sp;
   const lldb::user_id_t tid = GetProtocolID();
   Log *log(GetLogIfAnyCategoriesSet(GDBR_LOG_THREAD));
-  if (log)
-    log->Printf("Fetching extended information for thread %4.4" PRIx64, tid);
+  LLDB_LOGF(log, "Fetching extended information for thread %4.4" PRIx64, tid);
   ProcessSP process_sp(GetProcess());
   if (process_sp) {
     ProcessGDBRemote *gdb_process =
@@ -230,9 +229,8 @@
   int signo = GetResumeSignal();
   const lldb::user_id_t tid = GetProtocolID();
   Log *log(GetLogIfAnyCategoriesSet(GDBR_LOG_THREAD));
-  if (log)
-    log->Printf("Resuming thread: %4.4" PRIx64 " with state: %s.", tid,
-                StateAsCString(resume_state));
+  LLDB_LOGF(log, "Resuming thread: %4.4" PRIx64 " with state: %s.", tid,
+            StateAsCString(resume_state));
 
   ProcessSP process_sp(GetProcess());
   if (process_sp) {
@@ -303,13 +301,14 @@
     if (process_sp) {
       ProcessGDBRemote *gdb_process =
           static_cast<ProcessGDBRemote *>(process_sp.get());
-      // read_all_registers_at_once will be true if 'p' packet is not
-      // supported.
+      bool pSupported =
+          gdb_process->GetGDBRemote().GetpPacketSupported(GetID());
       bool read_all_registers_at_once =
-          !gdb_process->GetGDBRemote().GetpPacketSupported(GetID());
+          !pSupported || gdb_process->m_use_g_packet_for_reading;
+      bool write_all_registers_at_once = !pSupported;
       reg_ctx_sp = std::make_shared<GDBRemoteRegisterContext>(
           *this, concrete_frame_idx, gdb_process->m_register_info,
-          read_all_registers_at_once);
+          read_all_registers_at_once, write_all_registers_at_once);
     }
   } else {
     Unwind *unwinder = GetUnwinder();
diff --git a/src/llvm-project/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp b/src/llvm-project/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
index 11b9e45..8880442 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
@@ -160,10 +160,10 @@
     case llvm::MachO::MH_DYLINKER:
       // printf("0x%16.16" PRIx64 ": file_type = MH_DYLINKER\n", vaddr);
       // Address of dyld "struct mach_header" in the core file
-      if (log)
-        log->Printf("ProcessMachCore::GetDynamicLoaderAddress found a user "
-                    "process dyld binary image at 0x%" PRIx64,
-                    addr);
+      LLDB_LOGF(log,
+                "ProcessMachCore::GetDynamicLoaderAddress found a user "
+                "process dyld binary image at 0x%" PRIx64,
+                addr);
       m_dyld_addr = addr;
       return true;
 
@@ -172,10 +172,10 @@
       // Check MH_EXECUTABLE file types to see if the dynamic link object flag
       // is NOT set. If it isn't, then we have a mach_kernel.
       if ((header.flags & llvm::MachO::MH_DYLDLINK) == 0) {
-        if (log)
-          log->Printf("ProcessMachCore::GetDynamicLoaderAddress found a mach "
-                      "kernel binary image at 0x%" PRIx64,
-                      addr);
+        LLDB_LOGF(log,
+                  "ProcessMachCore::GetDynamicLoaderAddress found a mach "
+                  "kernel binary image at 0x%" PRIx64,
+                  addr);
         // Address of the mach kernel "struct mach_header" in the core file.
         m_mach_kernel_addr = addr;
         return true;
@@ -286,9 +286,10 @@
     {
         m_mach_kernel_addr = objfile_binary_addr;
         found_main_binary_definitively = true;
-        if (log)
-            log->Printf ("ProcessMachCore::DoLoadCore: using kernel address 0x%" PRIx64
-                         " from LC_NOTE 'main bin spec' load command.", m_mach_kernel_addr);
+        LLDB_LOGF(log,
+                  "ProcessMachCore::DoLoadCore: using kernel address 0x%" PRIx64
+                  " from LC_NOTE 'main bin spec' load command.",
+                  m_mach_kernel_addr);
     }
   }
   
@@ -317,11 +318,11 @@
     if (uuid.IsValid() && addr != LLDB_INVALID_ADDRESS) {
       m_mach_kernel_addr = addr;
       found_main_binary_definitively = true;
-      if (log)
-        log->Printf(
-            "ProcessMachCore::DoLoadCore: Using the kernel address 0x%" PRIx64
-            " from LC_IDENT/LC_NOTE 'kern ver str' string: '%s'",
-            addr, corefile_identifier.c_str());
+      LLDB_LOGF(
+          log,
+          "ProcessMachCore::DoLoadCore: Using the kernel address 0x%" PRIx64
+          " from LC_IDENT/LC_NOTE 'kern ver str' string: '%s'",
+          addr, corefile_identifier.c_str());
     }
   }
   if (found_main_binary_definitively == false 
@@ -333,49 +334,48 @@
           uuid.SetFromStringRef(uuid_str);
       }
       if (uuid.IsValid()) {
-        if (log)
-          log->Printf("ProcessMachCore::DoLoadCore: Using the EFI "
-                      "from LC_IDENT/LC_NOTE 'kern ver str' string: '%s'", 
-                      corefile_identifier.c_str());
+        LLDB_LOGF(log,
+                  "ProcessMachCore::DoLoadCore: Using the EFI "
+                  "from LC_IDENT/LC_NOTE 'kern ver str' string: '%s'",
+                  corefile_identifier.c_str());
 
-          // We're only given a UUID here, not a load address.
-          // But there are python scripts in the EFI binary's dSYM which
-          // know how to relocate the binary to the correct load address.
-          // lldb only needs to locate & load the binary + dSYM.
-          ModuleSpec module_spec;
-          module_spec.GetUUID() = uuid;
-          module_spec.GetArchitecture() = GetTarget().GetArchitecture();
+        // We're only given a UUID here, not a load address.
+        // But there are python scripts in the EFI binary's dSYM which
+        // know how to relocate the binary to the correct load address.
+        // lldb only needs to locate & load the binary + dSYM.
+        ModuleSpec module_spec;
+        module_spec.GetUUID() = uuid;
+        module_spec.GetArchitecture() = GetTarget().GetArchitecture();
 
-          // Lookup UUID locally, before attempting dsymForUUID like action
-          FileSpecList search_paths =
-              Target::GetDefaultDebugFileSearchPaths();
-          module_spec.GetSymbolFileSpec() =
-              Symbols::LocateExecutableSymbolFile(module_spec, search_paths);
-          if (module_spec.GetSymbolFileSpec()) {
-            ModuleSpec executable_module_spec =
-                Symbols::LocateExecutableObjectFile(module_spec);
-            if (FileSystem::Instance().Exists(executable_module_spec.GetFileSpec())) {
-              module_spec.GetFileSpec() =
-                  executable_module_spec.GetFileSpec();
-            }
+        // Lookup UUID locally, before attempting dsymForUUID like action
+        FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
+        module_spec.GetSymbolFileSpec() =
+            Symbols::LocateExecutableSymbolFile(module_spec, search_paths);
+        if (module_spec.GetSymbolFileSpec()) {
+          ModuleSpec executable_module_spec =
+              Symbols::LocateExecutableObjectFile(module_spec);
+          if (FileSystem::Instance().Exists(
+                  executable_module_spec.GetFileSpec())) {
+            module_spec.GetFileSpec() = executable_module_spec.GetFileSpec();
           }
+        }
 
-          // Force a a dsymForUUID lookup, if that tool is available.
-          if (!module_spec.GetSymbolFileSpec())
-            Symbols::DownloadObjectAndSymbolFile(module_spec, true);
+        // Force a a dsymForUUID lookup, if that tool is available.
+        if (!module_spec.GetSymbolFileSpec())
+          Symbols::DownloadObjectAndSymbolFile(module_spec, true);
 
-          if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) {
-            ModuleSP module_sp(new Module(module_spec));
-            if (module_sp.get() && module_sp->GetObjectFile()) {
-              // Get the current target executable
-              ModuleSP exe_module_sp(GetTarget().GetExecutableModule());
+        if (FileSystem::Instance().Exists(module_spec.GetFileSpec())) {
+          ModuleSP module_sp(new Module(module_spec));
+          if (module_sp.get() && module_sp->GetObjectFile()) {
+            // Get the current target executable
+            ModuleSP exe_module_sp(GetTarget().GetExecutableModule());
 
-              // Make sure you don't already have the right module loaded
-              // and they will be uniqued
-              if (exe_module_sp.get() != module_sp.get())
-                GetTarget().SetExecutableModule(module_sp, eLoadDependentsNo);
-            }
+            // Make sure you don't already have the right module loaded
+            // and they will be uniqued
+            if (exe_module_sp.get() != module_sp.get())
+              GetTarget().SetExecutableModule(module_sp, eLoadDependentsNo);
           }
+        }
       }
   }
 
@@ -433,9 +433,8 @@
     m_dyld_addr = saved_user_dyld_addr;
 
     if (better_kernel_address != LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("ProcessMachCore::DoLoadCore: Using the kernel address "
-                    "from DynamicLoaderDarwinKernel");
+      LLDB_LOGF(log, "ProcessMachCore::DoLoadCore: Using the kernel address "
+                     "from DynamicLoaderDarwinKernel");
       m_mach_kernel_addr = better_kernel_address;
     }
   }
@@ -444,30 +443,30 @@
   // decide which to prefer.
   if (GetCorefilePreference() == eKernelCorefile) {
     if (m_mach_kernel_addr != LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("ProcessMachCore::DoLoadCore: Using kernel corefile image "
-                    "at 0x%" PRIx64,
-                    m_mach_kernel_addr);
+      LLDB_LOGF(log,
+                "ProcessMachCore::DoLoadCore: Using kernel corefile image "
+                "at 0x%" PRIx64,
+                m_mach_kernel_addr);
       m_dyld_plugin_name = DynamicLoaderDarwinKernel::GetPluginNameStatic();
     } else if (m_dyld_addr != LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("ProcessMachCore::DoLoadCore: Using user process dyld "
-                    "image at 0x%" PRIx64,
-                    m_dyld_addr);
+      LLDB_LOGF(log,
+                "ProcessMachCore::DoLoadCore: Using user process dyld "
+                "image at 0x%" PRIx64,
+                m_dyld_addr);
       m_dyld_plugin_name = DynamicLoaderMacOSXDYLD::GetPluginNameStatic();
     }
   } else {
     if (m_dyld_addr != LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("ProcessMachCore::DoLoadCore: Using user process dyld "
-                    "image at 0x%" PRIx64,
-                    m_dyld_addr);
+      LLDB_LOGF(log,
+                "ProcessMachCore::DoLoadCore: Using user process dyld "
+                "image at 0x%" PRIx64,
+                m_dyld_addr);
       m_dyld_plugin_name = DynamicLoaderMacOSXDYLD::GetPluginNameStatic();
     } else if (m_mach_kernel_addr != LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("ProcessMachCore::DoLoadCore: Using kernel corefile image "
-                    "at 0x%" PRIx64,
-                    m_mach_kernel_addr);
+      LLDB_LOGF(log,
+                "ProcessMachCore::DoLoadCore: Using kernel corefile image "
+                "at 0x%" PRIx64,
+                m_mach_kernel_addr);
       m_dyld_plugin_name = DynamicLoaderDarwinKernel::GetPluginNameStatic();
     }
   }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp b/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
index ff015aa..3c0e1cb 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpParser.cpp
@@ -174,6 +174,7 @@
     triple.setArch(llvm::Triple::ArchType::arm);
     break;
   case ProcessorArchitecture::ARM64:
+  case ProcessorArchitecture::BP_ARM64:
     triple.setArch(llvm::Triple::ArchType::aarch64);
     break;
   default:
@@ -188,6 +189,7 @@
   case OSPlatform::Win32NT:
   case OSPlatform::Win32CE:
     triple.setOS(llvm::Triple::OSType::Win32);
+    triple.setVendor(llvm::Triple::VendorType::PC);
     break;
   case OSPlatform::Linux:
     triple.setOS(llvm::Triple::OSType::Linux);
@@ -313,13 +315,15 @@
   return filtered_modules;
 }
 
-const MinidumpExceptionStream *MinidumpParser::GetExceptionStream() {
-  llvm::ArrayRef<uint8_t> data = GetStream(StreamType::Exception);
+const minidump::ExceptionStream *MinidumpParser::GetExceptionStream() {
+  auto ExpectedStream = GetMinidumpFile().getExceptionStream();
+  if (ExpectedStream)
+    return &*ExpectedStream;
 
-  if (data.size() == 0)
-    return nullptr;
-
-  return MinidumpExceptionStream::Parse(data);
+  LLDB_LOG_ERROR(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS),
+                 ExpectedStream.takeError(),
+                 "Failed to read minidump exception stream: {0}");
+  return nullptr;
 }
 
 llvm::Optional<minidump::Range>
@@ -426,23 +430,35 @@
 static bool
 CreateRegionsCacheFromMemoryInfoList(MinidumpParser &parser,
                                      std::vector<MemoryRegionInfo> &regions) {
-  auto data = parser.GetStream(StreamType::MemoryInfoList);
-  if (data.empty())
+  Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_MODULES);
+  auto ExpectedInfo = parser.GetMinidumpFile().getMemoryInfoList();
+  if (!ExpectedInfo) {
+    LLDB_LOG_ERROR(log, ExpectedInfo.takeError(),
+                   "Failed to read memory info list: {0}");
     return false;
-  auto mem_info_list = MinidumpMemoryInfo::ParseMemoryInfoList(data);
-  if (mem_info_list.empty())
-    return false;
+  }
   constexpr auto yes = MemoryRegionInfo::eYes;
   constexpr auto no = MemoryRegionInfo::eNo;
-  regions.reserve(mem_info_list.size());
-  for (const auto &entry : mem_info_list) {
+  for (const MemoryInfo &entry : *ExpectedInfo) {
     MemoryRegionInfo region;
-    region.GetRange().SetRangeBase(entry->base_address);
-    region.GetRange().SetByteSize(entry->region_size);
-    region.SetReadable(entry->isReadable() ? yes : no);
-    region.SetWritable(entry->isWritable() ? yes : no);
-    region.SetExecutable(entry->isExecutable() ? yes : no);
-    region.SetMapped(entry->isMapped() ? yes : no);
+    region.GetRange().SetRangeBase(entry.BaseAddress);
+    region.GetRange().SetByteSize(entry.RegionSize);
+
+    MemoryProtection prot = entry.Protect;
+    region.SetReadable(bool(prot & MemoryProtection::NoAccess) ? no : yes);
+    region.SetWritable(
+        bool(prot & (MemoryProtection::ReadWrite | MemoryProtection::WriteCopy |
+                     MemoryProtection::ExecuteReadWrite |
+                     MemoryProtection::ExeciteWriteCopy))
+            ? yes
+            : no);
+    region.SetExecutable(
+        bool(prot & (MemoryProtection::Execute | MemoryProtection::ExecuteRead |
+                     MemoryProtection::ExecuteReadWrite |
+                     MemoryProtection::ExeciteWriteCopy))
+            ? yes
+            : no);
+    region.SetMapped(entry.State != MemoryState::Free ? yes : no);
     regions.push_back(region);
   }
   return !regions.empty();
@@ -503,58 +519,26 @@
   return !regions.empty();
 }
 
-MemoryRegionInfo
-MinidumpParser::FindMemoryRegion(lldb::addr_t load_addr) const {
-  auto begin = m_regions.begin();
-  auto end = m_regions.end();
-  auto pos = std::lower_bound(begin, end, load_addr);
-  if (pos != end && pos->GetRange().Contains(load_addr))
-    return *pos;
-  
-  MemoryRegionInfo region;
-  if (pos == begin)
-    region.GetRange().SetRangeBase(0);
-  else {
-    auto prev = pos - 1;
-    if (prev->GetRange().Contains(load_addr))
-      return *prev;
-    region.GetRange().SetRangeBase(prev->GetRange().GetRangeEnd());
-  }
-  if (pos == end)
-    region.GetRange().SetRangeEnd(UINT64_MAX);
-  else
-    region.GetRange().SetRangeEnd(pos->GetRange().GetRangeBase());
-  region.SetReadable(MemoryRegionInfo::eNo);
-  region.SetWritable(MemoryRegionInfo::eNo);
-  region.SetExecutable(MemoryRegionInfo::eNo);
-  region.SetMapped(MemoryRegionInfo::eNo);
-  return region;
-}
-
-MemoryRegionInfo
-MinidumpParser::GetMemoryRegionInfo(lldb::addr_t load_addr) {
-  if (!m_parsed_regions)
-    GetMemoryRegions();
-  return FindMemoryRegion(load_addr);
-}
-
-const MemoryRegionInfos &MinidumpParser::GetMemoryRegions() {
-  if (!m_parsed_regions) {
-    m_parsed_regions = true;
-    // We haven't cached our memory regions yet we will create the region cache
-    // once. We create the region cache using the best source. We start with
-    // the linux maps since they are the most complete and have names for the
-    // regions. Next we try the MemoryInfoList since it has
-    // read/write/execute/map data, and then fall back to the MemoryList and
-    // Memory64List to just get a list of the memory that is mapped in this
-    // core file
-    if (!CreateRegionsCacheFromLinuxMaps(*this, m_regions))
-      if (!CreateRegionsCacheFromMemoryInfoList(*this, m_regions))
-        if (!CreateRegionsCacheFromMemoryList(*this, m_regions))
-          CreateRegionsCacheFromMemory64List(*this, m_regions);
-    llvm::sort(m_regions.begin(), m_regions.end());
-  }
-  return m_regions;
+std::pair<MemoryRegionInfos, bool> MinidumpParser::BuildMemoryRegions() {
+  // We create the region cache using the best source. We start with
+  // the linux maps since they are the most complete and have names for the
+  // regions. Next we try the MemoryInfoList since it has
+  // read/write/execute/map data, and then fall back to the MemoryList and
+  // Memory64List to just get a list of the memory that is mapped in this
+  // core file
+  MemoryRegionInfos result;
+  const auto &return_sorted = [&](bool is_complete) {
+    llvm::sort(result);
+    return std::make_pair(std::move(result), is_complete);
+  };
+  if (CreateRegionsCacheFromLinuxMaps(*this, result))
+    return return_sorted(true);
+  if (CreateRegionsCacheFromMemoryInfoList(*this, result))
+    return return_sorted(true);
+  if (CreateRegionsCacheFromMemoryList(*this, result))
+    return return_sorted(false);
+  CreateRegionsCacheFromMemory64List(*this, result);
+  return return_sorted(false);
 }
 
 #define ENUM_TO_CSTR(ST)                                                       \
diff --git a/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpParser.h b/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpParser.h
index fce64f0..4bcb2b4 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpParser.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpParser.h
@@ -82,15 +82,15 @@
   // have the same name, it keeps the copy with the lowest load address.
   std::vector<const minidump::Module *> GetFilteredModuleList();
 
-  const MinidumpExceptionStream *GetExceptionStream();
+  const llvm::minidump::ExceptionStream *GetExceptionStream();
 
   llvm::Optional<Range> FindMemoryRange(lldb::addr_t addr);
 
   llvm::ArrayRef<uint8_t> GetMemory(lldb::addr_t addr, size_t size);
 
-  MemoryRegionInfo GetMemoryRegionInfo(lldb::addr_t load_addr);
-
-  const MemoryRegionInfos &GetMemoryRegions();
+  /// Returns a list of memory regions and a flag indicating whether the list is
+  /// complete (includes all regions mapped into the process memory).
+  std::pair<MemoryRegionInfos, bool> BuildMemoryRegions();
 
   static llvm::StringRef GetStreamTypeAsString(StreamType stream_type);
 
@@ -100,14 +100,10 @@
   MinidumpParser(lldb::DataBufferSP data_sp,
                  std::unique_ptr<llvm::object::MinidumpFile> file);
 
-  MemoryRegionInfo FindMemoryRegion(lldb::addr_t load_addr) const;
-
 private:
   lldb::DataBufferSP m_data_sp;
   std::unique_ptr<llvm::object::MinidumpFile> m_file;
   ArchSpec m_arch;
-  MemoryRegionInfos m_regions;
-  bool m_parsed_regions = false;
 };
 
 } // end namespace minidump
diff --git a/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp b/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp
index d7fc6e4..ed00b1c 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpTypes.cpp
@@ -57,17 +57,6 @@
 
 lldb::pid_t LinuxProcStatus::GetPid() const { return pid; }
 
-// Exception stuff
-const MinidumpExceptionStream *
-MinidumpExceptionStream::Parse(llvm::ArrayRef<uint8_t> &data) {
-  const MinidumpExceptionStream *exception_stream = nullptr;
-  Status error = consumeObject(data, exception_stream);
-  if (error.Fail())
-    return nullptr;
-
-  return exception_stream;
-}
-
 std::pair<llvm::ArrayRef<MinidumpMemoryDescriptor64>, uint64_t>
 MinidumpMemoryDescriptor64::ParseMemory64List(llvm::ArrayRef<uint8_t> &data) {
   const llvm::support::ulittle64_t *mem_ranges_count;
@@ -87,29 +76,3 @@
           *mem_ranges_count),
       *base_rva);
 }
-
-std::vector<const MinidumpMemoryInfo *>
-MinidumpMemoryInfo::ParseMemoryInfoList(llvm::ArrayRef<uint8_t> &data) {
-  const MinidumpMemoryInfoListHeader *header;
-  Status error = consumeObject(data, header);
-  if (error.Fail() ||
-      header->size_of_header < sizeof(MinidumpMemoryInfoListHeader) ||
-      header->size_of_entry < sizeof(MinidumpMemoryInfo))
-    return {};
-
-  data = data.drop_front(header->size_of_header -
-                         sizeof(MinidumpMemoryInfoListHeader));
-
-  if (header->size_of_entry * header->num_of_entries > data.size())
-    return {};
-
-  std::vector<const MinidumpMemoryInfo *> result;
-  result.reserve(header->num_of_entries);
-
-  for (uint64_t i = 0; i < header->num_of_entries; ++i) {
-    result.push_back(reinterpret_cast<const MinidumpMemoryInfo *>(
-        data.data() + i * header->size_of_entry));
-  }
-
-  return result;
-}
diff --git a/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpTypes.h b/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpTypes.h
index b4878e8..a9c8079 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpTypes.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/minidump/MinidumpTypes.h
@@ -85,90 +85,6 @@
 static_assert(sizeof(MinidumpMemoryDescriptor64) == 16,
               "sizeof MinidumpMemoryDescriptor64 is not correct!");
 
-// Reference:
-// https://msdn.microsoft.com/en-us/library/windows/desktop/ms680385(v=vs.85).aspx
-struct MinidumpMemoryInfoListHeader {
-  llvm::support::ulittle32_t size_of_header;
-  llvm::support::ulittle32_t size_of_entry;
-  llvm::support::ulittle64_t num_of_entries;
-};
-static_assert(sizeof(MinidumpMemoryInfoListHeader) == 16,
-              "sizeof MinidumpMemoryInfoListHeader is not correct!");
-
-enum class MinidumpMemoryInfoState : uint32_t {
-  MemCommit = 0x1000,
-  MemFree = 0x10000,
-  MemReserve = 0x2000,
-  LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ MemFree)
-};
-
-enum class MinidumpMemoryInfoType : uint32_t {
-  MemImage = 0x1000000,
-  MemMapped = 0x40000,
-  MemPrivate = 0x20000,
-  LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ MemImage)
-};
-
-// Reference:
-// https://msdn.microsoft.com/en-us/library/windows/desktop/aa366786(v=vs.85).aspx
-enum class MinidumpMemoryProtectionContants : uint32_t {
-  PageExecute = 0x10,
-  PageExecuteRead = 0x20,
-  PageExecuteReadWrite = 0x40,
-  PageExecuteWriteCopy = 0x80,
-  PageNoAccess = 0x01,
-  PageReadOnly = 0x02,
-  PageReadWrite = 0x04,
-  PageWriteCopy = 0x08,
-  PageTargetsInvalid = 0x40000000,
-  PageTargetsNoUpdate = 0x40000000,
-
-  PageWritable = PageExecuteReadWrite | PageExecuteWriteCopy | PageReadWrite |
-                 PageWriteCopy,
-  PageExecutable = PageExecute | PageExecuteRead | PageExecuteReadWrite |
-                   PageExecuteWriteCopy,
-  LLVM_MARK_AS_BITMASK_ENUM(/* LargestValue = */ PageTargetsInvalid)
-};
-
-// Reference:
-// https://msdn.microsoft.com/en-us/library/windows/desktop/ms680386(v=vs.85).aspx
-struct MinidumpMemoryInfo {
-  llvm::support::ulittle64_t base_address;
-  llvm::support::ulittle64_t allocation_base;
-  llvm::support::ulittle32_t allocation_protect;
-  llvm::support::ulittle32_t alignment1;
-  llvm::support::ulittle64_t region_size;
-  llvm::support::ulittle32_t state;
-  llvm::support::ulittle32_t protect;
-  llvm::support::ulittle32_t type;
-  llvm::support::ulittle32_t alignment2;
-
-  static std::vector<const MinidumpMemoryInfo *>
-  ParseMemoryInfoList(llvm::ArrayRef<uint8_t> &data);
-
-  bool isReadable() const {
-    const auto mask = MinidumpMemoryProtectionContants::PageNoAccess;
-    return (static_cast<uint32_t>(mask) & protect) == 0;
-  }
-
-  bool isWritable() const {
-    const auto mask = MinidumpMemoryProtectionContants::PageWritable;
-    return (static_cast<uint32_t>(mask) & protect) != 0;
-  }
-
-  bool isExecutable() const {
-    const auto mask = MinidumpMemoryProtectionContants::PageExecutable;
-    return (static_cast<uint32_t>(mask) & protect) != 0;
-  }
-  
-  bool isMapped() const {
-    return state != static_cast<uint32_t>(MinidumpMemoryInfoState::MemFree);
-  }
-};
-
-static_assert(sizeof(MinidumpMemoryInfo) == 48,
-              "sizeof MinidumpMemoryInfo is not correct!");
-
 // TODO misc2, misc3 ?
 // Reference:
 // https://msdn.microsoft.com/en-us/library/windows/desktop/ms680389(v=vs.85).aspx
@@ -202,35 +118,6 @@
   LinuxProcStatus() = default;
 };
 
-// Exception stuff
-struct MinidumpException {
-  enum : unsigned {
-    ExceptonInfoMaxParams = 15,
-    DumpRequested = 0xFFFFFFFF,
-  };
-
-  llvm::support::ulittle32_t exception_code;
-  llvm::support::ulittle32_t exception_flags;
-  llvm::support::ulittle64_t exception_record;
-  llvm::support::ulittle64_t exception_address;
-  llvm::support::ulittle32_t number_parameters;
-  llvm::support::ulittle32_t unused_alignment;
-  llvm::support::ulittle64_t exception_information[ExceptonInfoMaxParams];
-};
-static_assert(sizeof(MinidumpException) == 152,
-              "sizeof MinidumpException is not correct!");
-
-struct MinidumpExceptionStream {
-  llvm::support::ulittle32_t thread_id;
-  llvm::support::ulittle32_t alignment;
-  MinidumpException exception_record;
-  LocationDescriptor thread_context;
-
-  static const MinidumpExceptionStream *Parse(llvm::ArrayRef<uint8_t> &data);
-};
-static_assert(sizeof(MinidumpExceptionStream) == 168,
-              "sizeof MinidumpExceptionStream is not correct!");
-
 } // namespace minidump
 } // namespace lldb_private
 #endif // liblldb_MinidumpTypes_h_
diff --git a/src/llvm-project/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp b/src/llvm-project/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
index a7fc42c..5c090dc 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp
@@ -49,16 +49,19 @@
 class PlaceholderObjectFile : public ObjectFile {
 public:
   PlaceholderObjectFile(const lldb::ModuleSP &module_sp,
-                        const ModuleSpec &module_spec, lldb::offset_t base,
-                        lldb::offset_t size)
+                        const ModuleSpec &module_spec, lldb::addr_t base,
+                        lldb::addr_t size)
       : ObjectFile(module_sp, &module_spec.GetFileSpec(), /*file_offset*/ 0,
                    /*length*/ 0, /*data_sp*/ nullptr, /*data_offset*/ 0),
         m_arch(module_spec.GetArchitecture()), m_uuid(module_spec.GetUUID()),
         m_base(base), m_size(size) {
-    m_symtab_up = llvm::make_unique<Symtab>(this);
+    m_symtab_up = std::make_unique<Symtab>(this);
   }
 
-  ConstString GetPluginName() override { return ConstString("placeholder"); }
+  static ConstString GetStaticPluginName() {
+    return ConstString("placeholder");
+  }
+  ConstString GetPluginName() override { return GetStaticPluginName(); }
   uint32_t GetPluginVersion() override { return 1; }
   bool ParseHeader() override { return true; }
   Type CalculateType() override { return eTypeUnknown; }
@@ -80,7 +83,7 @@
   }
 
   void CreateSections(SectionList &unified_section_list) override {
-    m_sections_up = llvm::make_unique<SectionList>();
+    m_sections_up = std::make_unique<SectionList>();
     auto section_sp = std::make_shared<Section>(
         GetModule(), this, /*sect_id*/ 0, ConstString(".module_image"),
         eSectionTypeOther, m_base, m_size, /*file_offset*/ 0, /*file_size*/ 0,
@@ -109,11 +112,12 @@
               GetFileSpec(), m_base, m_base + m_size);
   }
 
+  lldb::addr_t GetBaseImageAddress() const { return m_base; }
 private:
   ArchSpec m_arch;
   UUID m_uuid;
-  lldb::offset_t m_base;
-  lldb::offset_t m_size;
+  lldb::addr_t m_base;
+  lldb::addr_t m_size;
 };
 } // namespace
 
@@ -215,6 +219,9 @@
 
   m_thread_list = m_minidump_parser->GetThreads();
   m_active_exception = m_minidump_parser->GetExceptionStream();
+
+  SetUnixSignals(UnixSignals::Create(GetArchitecture()));
+
   ReadModuleList();
 
   llvm::Optional<lldb::pid_t> pid = m_minidump_parser->GetPid();
@@ -234,39 +241,56 @@
 Status ProcessMinidump::DoDestroy() { return Status(); }
 
 void ProcessMinidump::RefreshStateAfterStop() {
+
   if (!m_active_exception)
     return;
 
-  if (m_active_exception->exception_record.exception_code ==
-      MinidumpException::DumpRequested) {
+  constexpr uint32_t BreakpadDumpRequested = 0xFFFFFFFF;
+  if (m_active_exception->ExceptionRecord.ExceptionCode ==
+      BreakpadDumpRequested) {
+    // This "ExceptionCode" value is a sentinel that is sometimes used
+    // when generating a dump for a process that hasn't crashed.
+
+    // TODO: The definition and use of this "dump requested" constant
+    // in Breakpad are actually Linux-specific, and for similar use
+    // cases on Mac/Windows it defines differnt constants, referring
+    // to them as "simulated" exceptions; consider moving this check
+    // down to the OS-specific paths and checking each OS for its own
+    // constant.
     return;
   }
 
   lldb::StopInfoSP stop_info;
   lldb::ThreadSP stop_thread;
 
-  Process::m_thread_list.SetSelectedThreadByID(m_active_exception->thread_id);
+  Process::m_thread_list.SetSelectedThreadByID(m_active_exception->ThreadId);
   stop_thread = Process::m_thread_list.GetSelectedThread();
   ArchSpec arch = GetArchitecture();
 
   if (arch.GetTriple().getOS() == llvm::Triple::Linux) {
+    uint32_t signo = m_active_exception->ExceptionRecord.ExceptionCode;
+
+    if (signo == 0) {
+      // No stop.
+      return;
+    }
+
     stop_info = StopInfo::CreateStopReasonWithSignal(
-        *stop_thread, m_active_exception->exception_record.exception_code);
+        *stop_thread, signo);
   } else if (arch.GetTriple().getVendor() == llvm::Triple::Apple) {
     stop_info = StopInfoMachException::CreateStopReasonWithMachException(
-        *stop_thread, m_active_exception->exception_record.exception_code, 2,
-        m_active_exception->exception_record.exception_flags,
-        m_active_exception->exception_record.exception_address, 0);
+        *stop_thread, m_active_exception->ExceptionRecord.ExceptionCode, 2,
+        m_active_exception->ExceptionRecord.ExceptionFlags,
+        m_active_exception->ExceptionRecord.ExceptionAddress, 0);
   } else {
     std::string desc;
     llvm::raw_string_ostream desc_stream(desc);
     desc_stream << "Exception "
                 << llvm::format_hex(
-                       m_active_exception->exception_record.exception_code, 8)
+                       m_active_exception->ExceptionRecord.ExceptionCode, 8)
                 << " encountered at address "
                 << llvm::format_hex(
-                       m_active_exception->exception_record.exception_address,
-                       8);
+                       m_active_exception->ExceptionRecord.ExceptionAddress, 8);
     stop_info = StopInfo::CreateStopReasonWithException(
         *stop_thread, desc_stream.str().c_str());
   }
@@ -310,15 +334,84 @@
   return ArchSpec(triple);
 }
 
+static MemoryRegionInfo GetMemoryRegionInfo(const MemoryRegionInfos &regions,
+                                            lldb::addr_t load_addr) {
+  MemoryRegionInfo region;
+  auto pos = llvm::upper_bound(regions, load_addr);
+  if (pos != regions.begin() &&
+      std::prev(pos)->GetRange().Contains(load_addr)) {
+    return *std::prev(pos);
+  }
+
+  if (pos == regions.begin())
+    region.GetRange().SetRangeBase(0);
+  else
+    region.GetRange().SetRangeBase(std::prev(pos)->GetRange().GetRangeEnd());
+
+  if (pos == regions.end())
+    region.GetRange().SetRangeEnd(UINT64_MAX);
+  else
+    region.GetRange().SetRangeEnd(pos->GetRange().GetRangeBase());
+
+  region.SetReadable(MemoryRegionInfo::eNo);
+  region.SetWritable(MemoryRegionInfo::eNo);
+  region.SetExecutable(MemoryRegionInfo::eNo);
+  region.SetMapped(MemoryRegionInfo::eNo);
+  return region;
+}
+
+void ProcessMinidump::BuildMemoryRegions() {
+  if (m_memory_regions)
+    return;
+  m_memory_regions.emplace();
+  bool is_complete;
+  std::tie(*m_memory_regions, is_complete) =
+      m_minidump_parser->BuildMemoryRegions();
+
+  if (is_complete)
+    return;
+
+  MemoryRegionInfos to_add;
+  ModuleList &modules = GetTarget().GetImages();
+  SectionLoadList &load_list = GetTarget().GetSectionLoadList();
+  modules.ForEach([&](const ModuleSP &module_sp) {
+    SectionList *sections = module_sp->GetSectionList();
+    for (size_t i = 0; i < sections->GetSize(); ++i) {
+      SectionSP section_sp = sections->GetSectionAtIndex(i);
+      addr_t load_addr = load_list.GetSectionLoadAddress(section_sp);
+      if (load_addr == LLDB_INVALID_ADDRESS)
+        continue;
+      MemoryRegionInfo::RangeType section_range(load_addr,
+                                                section_sp->GetByteSize());
+      MemoryRegionInfo region =
+          ::GetMemoryRegionInfo(*m_memory_regions, load_addr);
+      if (region.GetMapped() != MemoryRegionInfo::eYes &&
+          region.GetRange().GetRangeBase() <= section_range.GetRangeBase() &&
+          section_range.GetRangeEnd() <= region.GetRange().GetRangeEnd()) {
+        to_add.emplace_back();
+        to_add.back().GetRange() = section_range;
+        to_add.back().SetLLDBPermissions(section_sp->GetPermissions());
+        to_add.back().SetMapped(MemoryRegionInfo::eYes);
+        to_add.back().SetName(module_sp->GetFileSpec().GetPath().c_str());
+      }
+    }
+    return true;
+  });
+  m_memory_regions->insert(m_memory_regions->end(), to_add.begin(),
+                           to_add.end());
+  llvm::sort(*m_memory_regions);
+}
+
 Status ProcessMinidump::GetMemoryRegionInfo(lldb::addr_t load_addr,
-                                            MemoryRegionInfo &range_info) {
-  range_info = m_minidump_parser->GetMemoryRegionInfo(load_addr);
+                                            MemoryRegionInfo &region) {
+  BuildMemoryRegions();
+  region = ::GetMemoryRegionInfo(*m_memory_regions, load_addr);
   return Status();
 }
 
-Status ProcessMinidump::GetMemoryRegions(
-    lldb_private::MemoryRegionInfos &region_list) {
-  region_list = m_minidump_parser->GetMemoryRegions();
+Status ProcessMinidump::GetMemoryRegions(MemoryRegionInfos &region_list) {
+  BuildMemoryRegions();
+  region_list = *m_memory_regions;
   return Status();
 }
 
@@ -331,8 +424,8 @@
 
     // If the minidump contains an exception context, use it
     if (m_active_exception != nullptr &&
-        m_active_exception->thread_id == thread.ThreadId) {
-      context_location = m_active_exception->thread_context;
+        m_active_exception->ThreadId == thread.ThreadId) {
+      context_location = m_active_exception->ThreadContext;
     }
 
     llvm::ArrayRef<uint8_t> context;
@@ -351,14 +444,15 @@
   std::vector<const minidump::Module *> filtered_modules =
       m_minidump_parser->GetFilteredModuleList();
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_MODULES));
+  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
 
   for (auto module : filtered_modules) {
     std::string name = cantFail(m_minidump_parser->GetMinidumpFile().getString(
         module->ModuleNameRVA));
+    const uint64_t load_addr = module->BaseOfImage;
+    const uint64_t load_size = module->SizeOfImage;
     LLDB_LOG(log, "found module: name: {0} {1:x10}-{2:x10} size: {3}", name,
-             module->BaseOfImage, module->BaseOfImage + module->SizeOfImage,
-             module->SizeOfImage);
+             load_addr, load_addr + load_size, load_size);
 
     // check if the process is wow64 - a 32 bit windows process running on a
     // 64 bit windows
@@ -373,7 +467,7 @@
     Status error;
     // Try and find a module with a full UUID that matches. This function will
     // add the module to the target if it finds one.
-    lldb::ModuleSP module_sp = GetTarget().GetOrCreateModule(module_spec, 
+    lldb::ModuleSP module_sp = GetTarget().GetOrCreateModule(module_spec,
                                                      true /* notify */, &error);
     if (!module_sp) {
       // Try and find a module without specifying the UUID and only looking for
@@ -386,8 +480,8 @@
       ModuleSpec basename_module_spec(module_spec);
       basename_module_spec.GetUUID().Clear();
       basename_module_spec.GetFileSpec().GetDirectory().Clear();
-      module_sp = GetTarget().GetOrCreateModule(basename_module_spec, 
-                                                     true /* notify */, &error);
+      module_sp = GetTarget().GetOrCreateModule(basename_module_spec,
+                                                true /* notify */, &error);
       if (module_sp) {
         // We consider the module to be a match if the minidump UUID is a
         // prefix of the actual UUID, or if either of the UUIDs are empty.
@@ -401,6 +495,19 @@
         }
       }
     }
+    if (module_sp) {
+      // Watch out for place holder modules that have different paths, but the
+      // same UUID. If the base address is different, create a new module. If
+      // we don't then we will end up setting the load address of a different
+      // PlaceholderObjectFile and an assertion will fire.
+      auto *objfile = module_sp->GetObjectFile();
+      if (objfile && objfile->GetPluginName() ==
+          PlaceholderObjectFile::GetStaticPluginName()) {
+        if (((PlaceholderObjectFile *)objfile)->GetBaseImageAddress() !=
+            load_addr)
+          module_sp.reset();
+      }
+    }
     if (!module_sp) {
       // We failed to locate a matching local object file. Fortunately, the
       // minidump format encodes enough information about each module's memory
@@ -415,12 +522,12 @@
                name);
 
       module_sp = Module::CreateModuleFromObjectFile<PlaceholderObjectFile>(
-          module_spec, module->BaseOfImage, module->SizeOfImage);
+          module_spec, load_addr, load_size);
       GetTarget().GetImages().Append(module_sp, true /* notify */);
     }
 
     bool load_addr_changed = false;
-    module_sp->SetLoadAddress(GetTarget(), module->BaseOfImage, false,
+    module_sp->SetLoadAddress(GetTarget(), load_addr, false,
                               load_addr_changed);
   }
 }
@@ -444,7 +551,7 @@
 // debug information than needed.
 JITLoaderList &ProcessMinidump::GetJITLoaders() {
   if (!m_jit_loaders_up) {
-    m_jit_loaders_up = llvm::make_unique<JITLoaderList>();
+    m_jit_loaders_up = std::make_unique<JITLoaderList>();
   }
   return *m_jit_loaders_up;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/minidump/ProcessMinidump.h b/src/llvm-project/lldb/source/Plugins/Process/minidump/ProcessMinidump.h
index c39040f..750164c 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/minidump/ProcessMinidump.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/minidump/ProcessMinidump.h
@@ -108,9 +108,12 @@
   FileSpec m_core_file;
   lldb::DataBufferSP m_core_data;
   llvm::ArrayRef<minidump::Thread> m_thread_list;
-  const MinidumpExceptionStream *m_active_exception;
+  const minidump::ExceptionStream *m_active_exception;
   lldb::CommandObjectSP m_command_sp;
   bool m_is_wow64;
+  llvm::Optional<MemoryRegionInfos> m_memory_regions;
+
+  void BuildMemoryRegions();
 };
 
 } // namespace minidump
diff --git a/src/llvm-project/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp b/src/llvm-project/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp
index f2e4560..72dead0 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp
+++ b/src/llvm-project/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp
@@ -9,6 +9,7 @@
 #include "RegisterContextMinidump_ARM.h"
 
 #include "Utility/ARM_DWARF_Registers.h"
+#include "Utility/ARM_ehframe_Registers.h"
 #include "lldb/Utility/RegisterValue.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/LLDBAssert.h"
@@ -29,14 +30,14 @@
 #define DEF_R(i)                                                               \
   {                                                                            \
     "r" #i, nullptr, 4, OFFSET(r) + i * 4, eEncodingUint, eFormatHex,          \
-        {dwarf_r##i, dwarf_r##i, INV, INV, reg_r##i},                          \
+        {ehframe_r##i, dwarf_r##i, INV, INV, reg_r##i},                          \
         nullptr, nullptr, nullptr, 0    \
   }
 
 #define DEF_R_ARG(i, n)                                                        \
   {                                                                            \
     "r" #i, "arg" #n, 4, OFFSET(r) + i * 4, eEncodingUint, eFormatHex,         \
-        {dwarf_r##i, dwarf_r##i, LLDB_REGNUM_GENERIC_ARG1 + i, INV, reg_r##i}, \
+        {ehframe_r##i, dwarf_r##i, LLDB_REGNUM_GENERIC_ARG1 + i, INV, reg_r##i}, \
         nullptr, nullptr, nullptr, 0                                           \
   }
 
@@ -173,7 +174,7 @@
     OFFSET(r) + 7 * 4,
     eEncodingUint,
     eFormatHex,
-    {INV, dwarf_r7, LLDB_REGNUM_GENERIC_FP, INV, reg_r7},
+    {ehframe_r7, dwarf_r7, LLDB_REGNUM_GENERIC_FP, INV, reg_r7},
     nullptr,
     nullptr,
     nullptr,
@@ -186,7 +187,7 @@
     OFFSET(r) + 11 * 4,
     eEncodingUint,
     eFormatHex,
-    {INV, dwarf_r11, LLDB_REGNUM_GENERIC_FP, INV, reg_r11},
+    {ehframe_r11, dwarf_r11, LLDB_REGNUM_GENERIC_FP, INV, reg_r11},
     nullptr,
     nullptr,
     nullptr,
@@ -213,7 +214,7 @@
      OFFSET(r) + 13 * 4,
      eEncodingUint,
      eFormatHex,
-     {INV, dwarf_sp, LLDB_REGNUM_GENERIC_SP, INV, reg_sp},
+     {ehframe_sp, dwarf_sp, LLDB_REGNUM_GENERIC_SP, INV, reg_sp},
      nullptr,
      nullptr,
      nullptr,
@@ -224,7 +225,7 @@
      OFFSET(r) + 14 * 4,
      eEncodingUint,
      eFormatHex,
-     {INV, dwarf_lr, LLDB_REGNUM_GENERIC_RA, INV, reg_lr},
+     {ehframe_lr, dwarf_lr, LLDB_REGNUM_GENERIC_RA, INV, reg_lr},
      nullptr,
      nullptr,
      nullptr,
@@ -235,7 +236,7 @@
      OFFSET(r) + 15 * 4,
      eEncodingUint,
      eFormatHex,
-     {INV, dwarf_pc, LLDB_REGNUM_GENERIC_PC, INV, reg_pc},
+     {ehframe_pc, dwarf_pc, LLDB_REGNUM_GENERIC_PC, INV, reg_pc},
      nullptr,
      nullptr,
      nullptr,
@@ -246,7 +247,7 @@
      OFFSET(cpsr),
      eEncodingUint,
      eFormatHex,
-     {INV, dwarf_cpsr, LLDB_REGNUM_GENERIC_FLAGS, INV, reg_cpsr},
+     {ehframe_cpsr, dwarf_cpsr, LLDB_REGNUM_GENERIC_FLAGS, INV, reg_cpsr},
      nullptr,
      nullptr,
      nullptr,
@@ -476,12 +477,22 @@
   lldbassert(k_num_regs == k_num_reg_infos);
 }
 
-size_t RegisterContextMinidump_ARM::GetRegisterCount() { return k_num_regs; }
+size_t RegisterContextMinidump_ARM::GetRegisterCountStatic() {
+  return k_num_regs;
+}
 
+// Used for unit testing so we can verify register info is filled in for
+// all register flavors (DWARF, EH Frame, generic, etc).
+size_t RegisterContextMinidump_ARM::GetRegisterCount() {
+  return GetRegisterCountStatic();
+}
+
+// Used for unit testing so we can verify register info is filled in.
 const RegisterInfo *
-RegisterContextMinidump_ARM::GetRegisterInfoAtIndex(size_t reg) {
+RegisterContextMinidump_ARM::GetRegisterInfoAtIndexStatic(size_t reg,
+                                                          bool apple) {
   if (reg < k_num_reg_infos) {
-    if (m_apple) {
+    if (apple) {
       if (reg == reg_r7)
         return &g_reg_info_apple_fp;
     } else {
@@ -493,6 +504,11 @@
   return nullptr;
 }
 
+const RegisterInfo *
+RegisterContextMinidump_ARM::GetRegisterInfoAtIndex(size_t reg) {
+  return GetRegisterInfoAtIndexStatic(reg, m_apple);
+}
+
 size_t RegisterContextMinidump_ARM::GetRegisterSetCount() {
   return k_num_reg_sets;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h b/src/llvm-project/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h
index eff8cdf..7af3b98 100644
--- a/src/llvm-project/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h
+++ b/src/llvm-project/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.h
@@ -38,6 +38,12 @@
     // Do nothing... registers are always valid...
   }
 
+  // Used for unit testing.
+  static size_t GetRegisterCountStatic();
+  // Used for unit testing.
+  static const lldb_private::RegisterInfo *
+  GetRegisterInfoAtIndexStatic(size_t reg, bool apple);
+
   size_t GetRegisterCount() override;
 
   const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt
index 5d8642e..fa1c72a 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/CMakeLists.txt
@@ -1,4 +1,8 @@
 add_subdirectory(None)
-if (NOT LLDB_DISABLE_PYTHON)
+if (LLDB_ENABLE_PYTHON)
   add_subdirectory(Python)
 endif()
+
+if (LLDB_ENABLE_LUA)
+  add_subdirectory(Lua)
+endif()
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt
new file mode 100644
index 0000000..f5c62ee
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/CMakeLists.txt
@@ -0,0 +1,13 @@
+find_package(Lua REQUIRED)
+
+add_lldb_library(lldbPluginScriptInterpreterLua PLUGIN
+  Lua.cpp
+  ScriptInterpreterLua.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbInterpreter
+  )
+
+target_include_directories(lldbPluginScriptInterpreterLua PUBLIC ${LUA_INCLUDE_DIR})
+target_link_libraries(lldbPluginScriptInterpreterLua INTERFACE ${LUA_LIBRARIES})
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp
new file mode 100644
index 0000000..ecee8cc
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.cpp
@@ -0,0 +1,59 @@
+//===-- Lua.cpp -----------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Lua.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Utility/FileSpec.h"
+#include "llvm/Support/FormatVariadic.h"
+
+using namespace lldb_private;
+using namespace lldb;
+
+llvm::Error Lua::Run(llvm::StringRef buffer) {
+  int error =
+      luaL_loadbuffer(m_lua_state, buffer.data(), buffer.size(), "buffer") ||
+      lua_pcall(m_lua_state, 0, 0, 0);
+  if (!error)
+    return llvm::Error::success();
+
+  llvm::Error e = llvm::make_error<llvm::StringError>(
+      llvm::formatv("{0}\n", lua_tostring(m_lua_state, -1)),
+      llvm::inconvertibleErrorCode());
+  // Pop error message from the stack.
+  lua_pop(m_lua_state, 1);
+  return e;
+}
+
+llvm::Error Lua::LoadModule(llvm::StringRef filename) {
+  FileSpec file(filename);
+  if (!FileSystem::Instance().Exists(file)) {
+    return llvm::make_error<llvm::StringError>("invalid path",
+                                               llvm::inconvertibleErrorCode());
+  }
+
+  ConstString module_extension = file.GetFileNameExtension();
+  if (module_extension != ".lua") {
+    return llvm::make_error<llvm::StringError>("invalid extension",
+                                               llvm::inconvertibleErrorCode());
+  }
+
+  int error = luaL_loadfile(m_lua_state, filename.data()) ||
+              lua_pcall(m_lua_state, 0, 1, 0);
+  if (error) {
+    llvm::Error e = llvm::make_error<llvm::StringError>(
+        llvm::formatv("{0}\n", lua_tostring(m_lua_state, -1)),
+        llvm::inconvertibleErrorCode());
+    // Pop error message from the stack.
+    lua_pop(m_lua_state, 1);
+    return e;
+  }
+
+  ConstString module_name = file.GetFileNameStrippingExtension();
+  lua_setglobal(m_lua_state, module_name.GetCString());
+  return llvm::Error::success();
+}
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h
new file mode 100644
index 0000000..f2984a9
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/Lua.h
@@ -0,0 +1,48 @@
+//===-- ScriptInterpreterLua.h ----------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_Lua_h_
+#define liblldb_Lua_h_
+
+#include "lldb/lldb-types.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Error.h"
+
+#include "lua.hpp"
+
+#include <mutex>
+
+namespace lldb_private {
+
+extern "C" {
+int luaopen_lldb(lua_State *L);
+}
+
+class Lua {
+public:
+  Lua() : m_lua_state(luaL_newstate()) {
+    assert(m_lua_state);
+    luaL_openlibs(m_lua_state);
+    luaopen_lldb(m_lua_state);
+  }
+
+  ~Lua() {
+    assert(m_lua_state);
+    luaL_openlibs(m_lua_state);
+  }
+
+  llvm::Error Run(llvm::StringRef buffer);
+  llvm::Error LoadModule(llvm::StringRef filename);
+
+private:
+  lua_State *m_lua_state;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_Lua_h_
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
new file mode 100644
index 0000000..701d68d
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
@@ -0,0 +1,157 @@
+//===-- ScriptInterpreterLua.cpp --------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "ScriptInterpreterLua.h"
+#include "Lua.h"
+#include "lldb/Core/Debugger.h"
+#include "lldb/Core/PluginManager.h"
+#include "lldb/Core/StreamFile.h"
+#include "lldb/Interpreter/CommandReturnObject.h"
+#include "lldb/Utility/Stream.h"
+#include "lldb/Utility/StringList.h"
+#include "lldb/Utility/Timer.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+class IOHandlerLuaInterpreter : public IOHandlerDelegate,
+                                public IOHandlerEditline {
+public:
+  IOHandlerLuaInterpreter(Debugger &debugger,
+                          ScriptInterpreterLua &script_interpreter)
+      : IOHandlerEditline(debugger, IOHandler::Type::LuaInterpreter, "lua",
+                          ">>> ", "..> ", true, debugger.GetUseColor(), 0,
+                          *this, nullptr),
+        m_script_interpreter(script_interpreter) {
+    llvm::cantFail(m_script_interpreter.EnterSession(debugger.GetID()));
+  }
+
+  ~IOHandlerLuaInterpreter() {
+    llvm::cantFail(m_script_interpreter.LeaveSession());
+  }
+
+  void IOHandlerInputComplete(IOHandler &io_handler,
+                              std::string &data) override {
+    if (llvm::Error error = m_script_interpreter.GetLua().Run(data)) {
+      *GetOutputStreamFileSP() << llvm::toString(std::move(error));
+    }
+  }
+
+private:
+  ScriptInterpreterLua &m_script_interpreter;
+};
+
+ScriptInterpreterLua::ScriptInterpreterLua(Debugger &debugger)
+    : ScriptInterpreter(debugger, eScriptLanguageLua),
+      m_lua(std::make_unique<Lua>()) {}
+
+ScriptInterpreterLua::~ScriptInterpreterLua() {}
+
+bool ScriptInterpreterLua::ExecuteOneLine(llvm::StringRef command,
+                                          CommandReturnObject *result,
+                                          const ExecuteScriptOptions &options) {
+  if (llvm::Error e = m_lua->Run(command)) {
+    result->AppendErrorWithFormatv(
+        "lua failed attempting to evaluate '{0}': {1}\n", command,
+        llvm::toString(std::move(e)));
+    return false;
+  }
+  return true;
+}
+
+void ScriptInterpreterLua::ExecuteInterpreterLoop() {
+  static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
+  Timer scoped_timer(func_cat, LLVM_PRETTY_FUNCTION);
+
+  Debugger &debugger = m_debugger;
+
+  // At the moment, the only time the debugger does not have an input file
+  // handle is when this is called directly from lua, in which case it is
+  // both dangerous and unnecessary (not to mention confusing) to try to embed
+  // a running interpreter loop inside the already running lua interpreter
+  // loop, so we won't do it.
+
+  if (!debugger.GetInputFile().IsValid())
+    return;
+
+  IOHandlerSP io_handler_sp(new IOHandlerLuaInterpreter(debugger, *this));
+  debugger.PushIOHandler(io_handler_sp);
+}
+
+bool ScriptInterpreterLua::LoadScriptingModule(
+    const char *filename, bool init_session, lldb_private::Status &error,
+    StructuredData::ObjectSP *module_sp) {
+
+  if (llvm::Error e = m_lua->LoadModule(filename)) {
+    error.SetErrorStringWithFormatv("lua failed to import '{0}': {1}\n",
+                                    filename, llvm::toString(std::move(e)));
+    return false;
+  }
+  return true;
+}
+
+void ScriptInterpreterLua::Initialize() {
+  static llvm::once_flag g_once_flag;
+
+  llvm::call_once(g_once_flag, []() {
+    PluginManager::RegisterPlugin(GetPluginNameStatic(),
+                                  GetPluginDescriptionStatic(),
+                                  lldb::eScriptLanguageLua, CreateInstance);
+  });
+}
+
+void ScriptInterpreterLua::Terminate() {}
+
+llvm::Error ScriptInterpreterLua::EnterSession(user_id_t debugger_id) {
+  if (m_session_is_active)
+    return llvm::Error::success();
+
+  const char *fmt_str =
+      "lldb.debugger = lldb.SBDebugger.FindDebuggerWithID({0}); "
+      "lldb.target = lldb.debugger:GetSelectedTarget(); "
+      "lldb.process = lldb.target:GetProcess(); "
+      "lldb.thread = lldb.process:GetSelectedThread(); "
+      "lldb.frame = lldb.thread:GetSelectedFrame()";
+  return m_lua->Run(llvm::formatv(fmt_str, debugger_id).str());
+}
+
+llvm::Error ScriptInterpreterLua::LeaveSession() {
+  if (!m_session_is_active)
+    return llvm::Error::success();
+
+  m_session_is_active = false;
+
+  llvm::StringRef str = "lldb.debugger = nil; "
+                        "lldb.target = nil; "
+                        "lldb.process = nil; "
+                        "lldb.thread = nil; "
+                        "lldb.frame = nil";
+  return m_lua->Run(str);
+}
+
+lldb::ScriptInterpreterSP
+ScriptInterpreterLua::CreateInstance(Debugger &debugger) {
+  return std::make_shared<ScriptInterpreterLua>(debugger);
+}
+
+lldb_private::ConstString ScriptInterpreterLua::GetPluginNameStatic() {
+  static ConstString g_name("script-lua");
+  return g_name;
+}
+
+const char *ScriptInterpreterLua::GetPluginDescriptionStatic() {
+  return "Lua script interpreter";
+}
+
+lldb_private::ConstString ScriptInterpreterLua::GetPluginName() {
+  return GetPluginNameStatic();
+}
+
+uint32_t ScriptInterpreterLua::GetPluginVersion() { return 1; }
+
+Lua &ScriptInterpreterLua::GetLua() { return *m_lua; }
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h
new file mode 100644
index 0000000..4e92215
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h
@@ -0,0 +1,61 @@
+//===-- ScriptInterpreterLua.h ----------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef liblldb_ScriptInterpreterLua_h_
+#define liblldb_ScriptInterpreterLua_h_
+
+#include "lldb/Interpreter/ScriptInterpreter.h"
+
+namespace lldb_private {
+class Lua;
+class ScriptInterpreterLua : public ScriptInterpreter {
+public:
+  ScriptInterpreterLua(Debugger &debugger);
+
+  ~ScriptInterpreterLua() override;
+
+  bool ExecuteOneLine(
+      llvm::StringRef command, CommandReturnObject *result,
+      const ExecuteScriptOptions &options = ExecuteScriptOptions()) override;
+
+  void ExecuteInterpreterLoop() override;
+
+  virtual bool
+  LoadScriptingModule(const char *filename, bool init_session,
+                      lldb_private::Status &error,
+                      StructuredData::ObjectSP *module_sp = nullptr) override;
+
+  // Static Functions
+  static void Initialize();
+
+  static void Terminate();
+
+  static lldb::ScriptInterpreterSP CreateInstance(Debugger &debugger);
+
+  static lldb_private::ConstString GetPluginNameStatic();
+
+  static const char *GetPluginDescriptionStatic();
+
+  // PluginInterface protocol
+  lldb_private::ConstString GetPluginName() override;
+
+  uint32_t GetPluginVersion() override;
+
+  Lua &GetLua();
+
+  llvm::Error EnterSession(lldb::user_id_t debugger_id);
+  llvm::Error LeaveSession();
+
+private:
+  std::unique_ptr<Lua> m_lua;
+  bool m_session_is_active = false;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_ScriptInterpreterLua_h_
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp
index 7b95983..3517f83 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.cpp
@@ -28,13 +28,13 @@
 bool ScriptInterpreterNone::ExecuteOneLine(llvm::StringRef command,
                                            CommandReturnObject *,
                                            const ExecuteScriptOptions &) {
-  m_debugger.GetErrorFile()->PutCString(
+  m_debugger.GetErrorStream().PutCString(
       "error: there is no embedded script interpreter in this mode.\n");
   return false;
 }
 
 void ScriptInterpreterNone::ExecuteInterpreterLoop() {
-  m_debugger.GetErrorFile()->PutCString(
+  m_debugger.GetErrorStream().PutCString(
       "error: there is no embedded script interpreter in this mode.\n");
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
index 915f07e..761772f 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt
@@ -1,19 +1,14 @@
-if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
-  # Call a python script to gather the arch-specific libdir for
-  # modules like the lldb module.
-  execute_process(
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../../../../scripts/get_relative_lib_dir.py
-    RESULT_VARIABLE get_libdir_status
-    OUTPUT_VARIABLE relative_libdir
-    )
-  if (get_libdir_status EQUAL 0)
-    add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${relative_libdir}")
-  endif()
+if(NOT LLDB_PYTHON_RELATIVE_PATH)
+  message(FATAL_ERROR "LLDB_PYTHON_RELATIVE_PATH is not set.")
+endif()
+add_definitions(-DLLDB_PYTHON_RELATIVE_LIBDIR="${LLDB_PYTHON_RELATIVE_PATH}")
+
+if (LLDB_ENABLE_LIBEDIT)
+  list(APPEND LLDB_LIBEDIT_LIBS ${LibEdit_LIBRARIES})
 endif()
 
 add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
   PythonDataObjects.cpp
-  PythonExceptionState.cpp
   PythonReadline.cpp
   ScriptInterpreterPython.cpp
 
@@ -24,8 +19,15 @@
     lldbHost
     lldbInterpreter
     lldbTarget
-    ${PYTHON_LIBRARY}
+    ${PYTHON_LIBRARIES}
+    ${LLDB_LIBEDIT_LIBS}
 
   LINK_COMPONENTS
     Support
   )
+
+if (LLDB_ENABLE_LIBEDIT)
+  target_include_directories(lldbPluginScriptInterpreterPython PUBLIC
+    ${LibEdit_INCLUDE_DIRS}
+  )
+endif()
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 29dd037..e5a6765 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -6,11 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifdef LLDB_DISABLE_PYTHON
+#include "lldb/Host/Config.h"
 
-// Python is disabled in this build
-
-#else
+#if LLDB_ENABLE_PYTHON
 
 #include "PythonDataObjects.h"
 #include "ScriptInterpreterPython.h"
@@ -18,9 +16,11 @@
 #include "lldb/Host/File.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Interpreter/ScriptInterpreter.h"
+#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 #include "llvm/ADT/StringSwitch.h"
+#include "llvm/Support/Casting.h"
 #include "llvm/Support/ConvertUTF.h"
 #include "llvm/Support/Errno.h"
 
@@ -28,9 +28,41 @@
 
 using namespace lldb_private;
 using namespace lldb;
+using namespace lldb_private::python;
+using llvm::cantFail;
+using llvm::Error;
+using llvm::Expected;
+using llvm::Twine;
 
-void StructuredPythonObject::Dump(Stream &s, bool pretty_print) const {
-  s << "Python Obj: 0x" << GetValue();
+template <> Expected<bool> python::As<bool>(Expected<PythonObject> &&obj) {
+  if (!obj)
+    return obj.takeError();
+  return obj.get().IsTrue();
+}
+
+template <>
+Expected<long long> python::As<long long>(Expected<PythonObject> &&obj) {
+  if (!obj)
+    return obj.takeError();
+  return obj.get().AsLongLong();
+}
+
+template <>
+Expected<std::string> python::As<std::string>(Expected<PythonObject> &&obj) {
+  if (!obj)
+    return obj.takeError();
+  PyObject *str_obj = PyObject_Str(obj.get().get());
+  if (!obj)
+    return llvm::make_error<PythonException>();
+  auto str = Take<PythonString>(str_obj);
+  auto utf8 = str.AsUTF8();
+  if (!utf8)
+    return utf8.takeError();
+  return utf8.get();
+}
+
+void StructuredPythonObject::Serialize(llvm::json::OStream &s) const {
+  s.value(llvm::formatv("Python Obj: {0:X}", GetValue()).str());
 }
 
 // PythonObject
@@ -167,12 +199,6 @@
                       PyObject_GetAttr(m_py_obj, py_attr.get()));
 }
 
-bool PythonObject::IsNone() const { return m_py_obj == Py_None; }
-
-bool PythonObject::IsValid() const { return m_py_obj != nullptr; }
-
-bool PythonObject::IsAllocated() const { return IsValid() && !IsNone(); }
-
 StructuredData::ObjectSP PythonObject::CreateStructuredObject() const {
   switch (GetObjectType()) {
   case PyObjectType::Dictionary:
@@ -201,43 +227,19 @@
 }
 
 // PythonString
-PythonBytes::PythonBytes() : PythonObject() {}
 
-PythonBytes::PythonBytes(llvm::ArrayRef<uint8_t> bytes) : PythonObject() {
-  SetBytes(bytes);
-}
+PythonBytes::PythonBytes(llvm::ArrayRef<uint8_t> bytes) { SetBytes(bytes); }
 
-PythonBytes::PythonBytes(const uint8_t *bytes, size_t length) : PythonObject() {
+PythonBytes::PythonBytes(const uint8_t *bytes, size_t length) {
   SetBytes(llvm::ArrayRef<uint8_t>(bytes, length));
 }
 
-PythonBytes::PythonBytes(PyRefType type, PyObject *py_obj) : PythonObject() {
-  Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a string
-}
-
-PythonBytes::~PythonBytes() {}
-
 bool PythonBytes::Check(PyObject *py_obj) {
   if (!py_obj)
     return false;
   return PyBytes_Check(py_obj);
 }
 
-void PythonBytes::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonBytes::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
-  }
-
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
-}
-
 llvm::ArrayRef<uint8_t> PythonBytes::GetBytes() const {
   if (!IsValid())
     return llvm::ArrayRef<uint8_t>();
@@ -257,8 +259,7 @@
 
 void PythonBytes::SetBytes(llvm::ArrayRef<uint8_t> bytes) {
   const char *data = reinterpret_cast<const char *>(bytes.data());
-  PyObject *py_bytes = PyBytes_FromStringAndSize(data, bytes.size());
-  PythonObject::Reset(PyRefType::Owned, py_bytes);
+  *this = Take<PythonBytes>(PyBytes_FromStringAndSize(data, bytes.size()));
 }
 
 StructuredData::StringSP PythonBytes::CreateStructuredString() const {
@@ -275,39 +276,15 @@
 
 PythonByteArray::PythonByteArray(const uint8_t *bytes, size_t length) {
   const char *str = reinterpret_cast<const char *>(bytes);
-  Reset(PyRefType::Owned, PyByteArray_FromStringAndSize(str, length));
+  *this = Take<PythonByteArray>(PyByteArray_FromStringAndSize(str, length));
 }
 
-PythonByteArray::PythonByteArray(PyRefType type, PyObject *o) {
-  Reset(type, o);
-}
-
-PythonByteArray::PythonByteArray(const PythonBytes &object)
-    : PythonObject(object) {}
-
-PythonByteArray::~PythonByteArray() {}
-
 bool PythonByteArray::Check(PyObject *py_obj) {
   if (!py_obj)
     return false;
   return PyByteArray_Check(py_obj);
 }
 
-void PythonByteArray::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonByteArray::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
-  }
-
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
-}
-
 llvm::ArrayRef<uint8_t> PythonByteArray::GetBytes() const {
   if (!IsValid())
     return llvm::ArrayRef<uint8_t>();
@@ -334,21 +311,18 @@
 
 // PythonString
 
-PythonString::PythonString(PyRefType type, PyObject *py_obj) : PythonObject() {
-  Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a string
+Expected<PythonString> PythonString::FromUTF8(llvm::StringRef string) {
+#if PY_MAJOR_VERSION >= 3
+  PyObject *str = PyUnicode_FromStringAndSize(string.data(), string.size());
+#else
+  PyObject *str = PyString_FromStringAndSize(string.data(), string.size());
+#endif
+  if (!str)
+    return llvm::make_error<PythonException>();
+  return Take<PythonString>(str);
 }
 
-PythonString::PythonString(llvm::StringRef string) : PythonObject() {
-  SetString(string);
-}
-
-PythonString::PythonString(const char *string) : PythonObject() {
-  SetString(llvm::StringRef(string));
-}
-
-PythonString::PythonString() : PythonObject() {}
-
-PythonString::~PythonString() {}
+PythonString::PythonString(llvm::StringRef string) { SetString(string); }
 
 bool PythonString::Check(PyObject *py_obj) {
   if (!py_obj)
@@ -363,30 +337,40 @@
   return false;
 }
 
-void PythonString::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonString::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
-  }
+void PythonString::Convert(PyRefType &type, PyObject *&py_obj) {
 #if PY_MAJOR_VERSION < 3
   // In Python 2, Don't store PyUnicode objects directly, because we need
   // access to their underlying character buffers which Python 2 doesn't
   // provide.
-  if (PyUnicode_Check(py_obj))
-    result.Reset(PyRefType::Owned, PyUnicode_AsUTF8String(result.get()));
+  if (PyUnicode_Check(py_obj)) {
+    PyObject *s = PyUnicode_AsUTF8String(py_obj);
+    if (s == nullptr) {
+      PyErr_Clear();
+      if (type == PyRefType::Owned)
+        Py_DECREF(py_obj);
+      return;
+    }
+    if (type == PyRefType::Owned)
+      Py_DECREF(py_obj);
+    else
+      type = PyRefType::Owned;
+    py_obj = s;
+  }
 #endif
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
 }
 
 llvm::StringRef PythonString::GetString() const {
+  auto s = AsUTF8();
+  if (!s) {
+    llvm::consumeError(s.takeError());
+    return llvm::StringRef("");
+  }
+  return s.get();
+}
+
+Expected<llvm::StringRef> PythonString::AsUTF8() const {
   if (!IsValid())
-    return llvm::StringRef();
+    return nullDeref();
 
   Py_ssize_t size;
   const char *data;
@@ -394,10 +378,16 @@
 #if PY_MAJOR_VERSION >= 3
   data = PyUnicode_AsUTF8AndSize(m_py_obj, &size);
 #else
-  char *c;
-  PyString_AsStringAndSize(m_py_obj, &c, &size);
+  char *c = NULL;
+  int r = PyString_AsStringAndSize(m_py_obj, &c, &size);
+  if (r < 0)
+    c = NULL;
   data = c;
 #endif
+
+  if (!data)
+    return exception();
+
   return llvm::StringRef(data, size);
 }
 
@@ -413,13 +403,13 @@
 }
 
 void PythonString::SetString(llvm::StringRef string) {
-#if PY_MAJOR_VERSION >= 3
-  PyObject *unicode = PyUnicode_FromStringAndSize(string.data(), string.size());
-  PythonObject::Reset(PyRefType::Owned, unicode);
-#else
-  PyObject *str = PyString_FromStringAndSize(string.data(), string.size());
-  PythonObject::Reset(PyRefType::Owned, str);
-#endif
+  auto s = FromUTF8(string);
+  if (!s) {
+    llvm::consumeError(s.takeError());
+    Reset();
+  } else {
+    *this = std::move(s.get());
+  }
 }
 
 StructuredData::StringSP PythonString::CreateStructuredString() const {
@@ -430,18 +420,7 @@
 
 // PythonInteger
 
-PythonInteger::PythonInteger() : PythonObject() {}
-
-PythonInteger::PythonInteger(PyRefType type, PyObject *py_obj)
-    : PythonObject() {
-  Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a integer type
-}
-
-PythonInteger::PythonInteger(int64_t value) : PythonObject() {
-  SetInteger(value);
-}
-
-PythonInteger::~PythonInteger() {}
+PythonInteger::PythonInteger(int64_t value) { SetInteger(value); }
 
 bool PythonInteger::Check(PyObject *py_obj) {
   if (!py_obj)
@@ -456,16 +435,7 @@
 #endif
 }
 
-void PythonInteger::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonInteger::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
-  }
-
+void PythonInteger::Convert(PyRefType &type, PyObject *&py_obj) {
 #if PY_MAJOR_VERSION < 3
   // Always store this as a PyLong, which makes interoperability between Python
   // 2.x and Python 3.x easier.  This is only necessary in 2.x, since 3.x
@@ -474,16 +444,23 @@
     // Since we converted the original object to a different type, the new
     // object is an owned object regardless of the ownership semantics
     // requested by the user.
-    result.Reset(PyRefType::Owned, PyLong_FromLongLong(PyInt_AsLong(py_obj)));
+    long long value = PyInt_AsLong(py_obj);
+    PyObject *l = nullptr;
+    if (!PyErr_Occurred())
+      l = PyLong_FromLongLong(value);
+    if (l == nullptr) {
+      PyErr_Clear();
+      if (type == PyRefType::Owned)
+        Py_DECREF(py_obj);
+      return;
+    }
+    if (type == PyRefType::Owned)
+      Py_DECREF(py_obj);
+    else
+      type = PyRefType::Owned;
+    py_obj = l;
   }
 #endif
-
-  assert(PyLong_Check(result.get()) &&
-         "Couldn't get a PyLong from this PyObject");
-
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
 }
 
 int64_t PythonInteger::GetInteger() const {
@@ -506,7 +483,7 @@
 }
 
 void PythonInteger::SetInteger(int64_t value) {
-  PythonObject::Reset(PyRefType::Owned, PyLong_FromLongLong(value));
+  *this = Take<PythonInteger>(PyLong_FromLongLong(value));
 }
 
 StructuredData::IntegerSP PythonInteger::CreateStructuredInteger() const {
@@ -517,11 +494,6 @@
 
 // PythonBoolean
 
-PythonBoolean::PythonBoolean(PyRefType type, PyObject *py_obj)
-    : PythonObject() {
-  Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a boolean type
-}
-
 PythonBoolean::PythonBoolean(bool value) {
   SetValue(value);
 }
@@ -530,27 +502,12 @@
   return py_obj ? PyBool_Check(py_obj) : false;
 }
 
-void PythonBoolean::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonBoolean::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
-  }
-
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
-}
-
 bool PythonBoolean::GetValue() const {
   return m_py_obj ? PyObject_IsTrue(m_py_obj) : false;
 }
 
 void PythonBoolean::SetValue(bool value) {
-  PythonObject::Reset(PyRefType::Owned, PyBool_FromLong(value));
+  *this = Take<PythonBoolean>(PyBool_FromLong(value));
 }
 
 StructuredData::BooleanSP PythonBoolean::CreateStructuredBoolean() const {
@@ -561,42 +518,21 @@
 
 // PythonList
 
-PythonList::PythonList(PyInitialValue value) : PythonObject() {
+PythonList::PythonList(PyInitialValue value) {
   if (value == PyInitialValue::Empty)
-    Reset(PyRefType::Owned, PyList_New(0));
+    *this = Take<PythonList>(PyList_New(0));
 }
 
-PythonList::PythonList(int list_size) : PythonObject() {
-  Reset(PyRefType::Owned, PyList_New(list_size));
+PythonList::PythonList(int list_size) {
+  *this = Take<PythonList>(PyList_New(list_size));
 }
 
-PythonList::PythonList(PyRefType type, PyObject *py_obj) : PythonObject() {
-  Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a list
-}
-
-PythonList::~PythonList() {}
-
 bool PythonList::Check(PyObject *py_obj) {
   if (!py_obj)
     return false;
   return PyList_Check(py_obj);
 }
 
-void PythonList::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonList::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
-  }
-
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
-}
-
 uint32_t PythonList::GetSize() const {
   if (IsValid())
     return PyList_GET_SIZE(m_py_obj);
@@ -638,17 +574,13 @@
 
 // PythonTuple
 
-PythonTuple::PythonTuple(PyInitialValue value) : PythonObject() {
+PythonTuple::PythonTuple(PyInitialValue value) {
   if (value == PyInitialValue::Empty)
-    Reset(PyRefType::Owned, PyTuple_New(0));
+    *this = Take<PythonTuple>(PyTuple_New(0));
 }
 
-PythonTuple::PythonTuple(int tuple_size) : PythonObject() {
-  Reset(PyRefType::Owned, PyTuple_New(tuple_size));
-}
-
-PythonTuple::PythonTuple(PyRefType type, PyObject *py_obj) : PythonObject() {
-  Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a tuple
+PythonTuple::PythonTuple(int tuple_size) {
+  *this = Take<PythonTuple>(PyTuple_New(tuple_size));
 }
 
 PythonTuple::PythonTuple(std::initializer_list<PythonObject> objects) {
@@ -674,29 +606,12 @@
   }
 }
 
-PythonTuple::~PythonTuple() {}
-
 bool PythonTuple::Check(PyObject *py_obj) {
   if (!py_obj)
     return false;
   return PyTuple_Check(py_obj);
 }
 
-void PythonTuple::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonTuple::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
-  }
-
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
-}
-
 uint32_t PythonTuple::GetSize() const {
   if (IsValid())
     return PyTuple_GET_SIZE(m_py_obj);
@@ -730,18 +645,11 @@
 
 // PythonDictionary
 
-PythonDictionary::PythonDictionary(PyInitialValue value) : PythonObject() {
+PythonDictionary::PythonDictionary(PyInitialValue value) {
   if (value == PyInitialValue::Empty)
-    Reset(PyRefType::Owned, PyDict_New());
+    *this = Take<PythonDictionary>(PyDict_New());
 }
 
-PythonDictionary::PythonDictionary(PyRefType type, PyObject *py_obj)
-    : PythonObject() {
-  Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a dictionary
-}
-
-PythonDictionary::~PythonDictionary() {}
-
 bool PythonDictionary::Check(PyObject *py_obj) {
   if (!py_obj)
     return false;
@@ -749,21 +657,6 @@
   return PyDict_Check(py_obj);
 }
 
-void PythonDictionary::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonDictionary::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
-  }
-
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
-}
-
 uint32_t PythonDictionary::GetSize() const {
   if (IsValid())
     return PyDict_Size(m_py_obj);
@@ -777,16 +670,66 @@
 }
 
 PythonObject PythonDictionary::GetItemForKey(const PythonObject &key) const {
-  if (IsAllocated() && key.IsValid())
-    return PythonObject(PyRefType::Borrowed,
-                        PyDict_GetItem(m_py_obj, key.get()));
-  return PythonObject();
+  auto item = GetItem(key);
+  if (!item) {
+    llvm::consumeError(item.takeError());
+    return PythonObject();
+  }
+  return std::move(item.get());
+}
+
+Expected<PythonObject>
+PythonDictionary::GetItem(const PythonObject &key) const {
+  if (!IsValid())
+    return nullDeref();
+#if PY_MAJOR_VERSION >= 3
+  PyObject *o = PyDict_GetItemWithError(m_py_obj, key.get());
+  if (PyErr_Occurred())
+    return exception();
+#else
+  PyObject *o = PyDict_GetItem(m_py_obj, key.get());
+#endif
+  if (!o)
+    return keyError();
+  return Retain<PythonObject>(o);
+}
+
+Expected<PythonObject> PythonDictionary::GetItem(const Twine &key) const {
+  if (!IsValid())
+    return nullDeref();
+  PyObject *o = PyDict_GetItemString(m_py_obj, NullTerminated(key));
+  if (PyErr_Occurred())
+    return exception();
+  if (!o)
+    return keyError();
+  return Retain<PythonObject>(o);
+}
+
+Error PythonDictionary::SetItem(const PythonObject &key,
+                                const PythonObject &value) const {
+  if (!IsValid() || !value.IsValid())
+    return nullDeref();
+  int r = PyDict_SetItem(m_py_obj, key.get(), value.get());
+  if (r < 0)
+    return exception();
+  return Error::success();
+}
+
+Error PythonDictionary::SetItem(const Twine &key,
+                                const PythonObject &value) const {
+  if (!IsValid() || !value.IsValid())
+    return nullDeref();
+  int r = PyDict_SetItemString(m_py_obj, NullTerminated(key), value.get());
+  if (r < 0)
+    return exception();
+  return Error::success();
 }
 
 void PythonDictionary::SetItemForKey(const PythonObject &key,
                                      const PythonObject &value) {
-  if (IsAllocated() && key.IsValid() && value.IsValid())
-    PyDict_SetItem(m_py_obj, key.get(), value.get());
+  Error error = SetItem(key, value);
+  if (error)
+    llvm::consumeError(std::move(error));
 }
 
 StructuredData::DictionarySP
@@ -803,14 +746,6 @@
   return result;
 }
 
-PythonModule::PythonModule() : PythonObject() {}
-
-PythonModule::PythonModule(PyRefType type, PyObject *py_obj) {
-  Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a module
-}
-
-PythonModule::~PythonModule() {}
-
 PythonModule PythonModule::BuiltinsModule() {
 #if PY_MAJOR_VERSION >= 3
   return AddModule("builtins");
@@ -826,9 +761,23 @@
   return PythonModule(PyRefType::Borrowed, PyImport_AddModule(str.c_str()));
 }
 
-PythonModule PythonModule::ImportModule(llvm::StringRef module) {
-  std::string str = module.str();
-  return PythonModule(PyRefType::Owned, PyImport_ImportModule(str.c_str()));
+Expected<PythonModule> PythonModule::Import(const Twine &name) {
+  PyObject *mod = PyImport_ImportModule(NullTerminated(name));
+  if (!mod)
+    return exception();
+  return Take<PythonModule>(mod);
+}
+
+Expected<PythonObject> PythonModule::Get(const Twine &name) {
+  if (!IsValid())
+    return nullDeref();
+  PyObject *dict = PyModule_GetDict(m_py_obj);
+  if (!dict)
+    return exception();
+  PyObject *item = PyDict_GetItemString(dict, NullTerminated(name));
+  if (!item)
+    return exception();
+  return Retain<PythonObject>(item);
 }
 
 bool PythonModule::Check(PyObject *py_obj) {
@@ -838,33 +787,12 @@
   return PyModule_Check(py_obj);
 }
 
-void PythonModule::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonModule::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
-  }
-
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
-}
-
 PythonDictionary PythonModule::GetDictionary() const {
-  return PythonDictionary(PyRefType::Borrowed, PyModule_GetDict(m_py_obj));
+  if (!IsValid())
+    return PythonDictionary();
+  return Retain<PythonDictionary>(PyModule_GetDict(m_py_obj));
 }
 
-PythonCallable::PythonCallable() : PythonObject() {}
-
-PythonCallable::PythonCallable(PyRefType type, PyObject *py_obj) {
-  Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a callable
-}
-
-PythonCallable::~PythonCallable() {}
-
 bool PythonCallable::Check(PyObject *py_obj) {
   if (!py_obj)
     return false;
@@ -872,32 +800,68 @@
   return PyCallable_Check(py_obj);
 }
 
-void PythonCallable::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
+#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3
+static const char get_arg_info_script[] = R"(
+from inspect import signature, Parameter, ismethod
+from collections import namedtuple
+ArgInfo = namedtuple('ArgInfo', ['count', 'has_varargs'])
+def main(f):
+    count = 0
+    varargs = False
+    for parameter in signature(f).parameters.values():
+        kind = parameter.kind
+        if kind in (Parameter.POSITIONAL_ONLY,
+                    Parameter.POSITIONAL_OR_KEYWORD):
+            count += 1
+        elif kind == Parameter.VAR_POSITIONAL:
+            varargs = True
+        elif kind in (Parameter.KEYWORD_ONLY,
+                      Parameter.VAR_KEYWORD):
+            pass
+        else:
+            raise Exception(f'unknown parameter kind: {kind}')
+    return ArgInfo(count, varargs)
+)";
+#endif
 
-  if (!PythonCallable::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
+Expected<PythonCallable::ArgInfo> PythonCallable::GetArgInfo() const {
+  ArgInfo result = {};
+  if (!IsValid())
+    return nullDeref();
+
+#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3
+
+  // no need to synchronize access to this global, we already have the GIL
+  static PythonScript get_arg_info(get_arg_info_script);
+  Expected<PythonObject> pyarginfo = get_arg_info(*this);
+  if (!pyarginfo)
+    return pyarginfo.takeError();
+  long long count =
+      cantFail(As<long long>(pyarginfo.get().GetAttribute("count")));
+  bool has_varargs =
+      cantFail(As<bool>(pyarginfo.get().GetAttribute("has_varargs")));
+  result.max_positional_args = has_varargs ? ArgInfo::UNBOUNDED : count;
+
+#else
+  PyObject *py_func_obj;
+  bool is_bound_method = false;
+  bool is_class = false;
+
+  if (PyType_Check(m_py_obj) || PyClass_Check(m_py_obj)) {
+    auto init = GetAttribute("__init__");
+    if (!init)
+      return init.takeError();
+    py_func_obj = init.get().get();
+    is_class = true;
+  } else {
+    py_func_obj = m_py_obj;
   }
 
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
-}
-
-PythonCallable::ArgInfo PythonCallable::GetNumArguments() const {
-  ArgInfo result = {0, false, false, false};
-  if (!IsValid())
-    return result;
-
-  PyObject *py_func_obj = m_py_obj;
   if (PyMethod_Check(py_func_obj)) {
     py_func_obj = PyMethod_GET_FUNCTION(py_func_obj);
     PythonObject im_self = GetAttributeValue("im_self");
     if (im_self.IsValid() && !im_self.IsNone())
-      result.is_bound_method = true;
+      is_bound_method = true;
   } else {
     // see if this is a callable object with an __call__ method
     if (!PyFunction_Check(py_func_obj)) {
@@ -906,9 +870,9 @@
         auto __callable__ = __call__.AsType<PythonCallable>();
         if (__callable__.IsValid()) {
           py_func_obj = PyMethod_GET_FUNCTION(__callable__.get());
-          PythonObject im_self = GetAttributeValue("im_self");
+          PythonObject im_self = __callable__.GetAttributeValue("im_self");
           if (im_self.IsValid() && !im_self.IsNone())
-            result.is_bound_method = true;
+            is_bound_method = true;
         }
       }
     }
@@ -921,12 +885,20 @@
   if (!code)
     return result;
 
-  result.count = code->co_argcount;
-  result.has_varargs = !!(code->co_flags & CO_VARARGS);
-  result.has_kwargs = !!(code->co_flags & CO_VARKEYWORDS);
+  auto count = code->co_argcount;
+  bool has_varargs = !!(code->co_flags & CO_VARARGS);
+  result.max_positional_args =
+      has_varargs ? ArgInfo::UNBOUNDED
+                  : (count - (int)is_bound_method) - (int)is_class;
+
+#endif
+
   return result;
 }
 
+constexpr unsigned
+    PythonCallable::ArgInfo::UNBOUNDED; // FIXME delete after c++17
+
 PythonObject PythonCallable::operator()() {
   return PythonObject(PyRefType::Owned, PyObject_CallObject(m_py_obj, nullptr));
 }
@@ -945,21 +917,9 @@
                       PyObject_CallObject(m_py_obj, arg_tuple.get()));
 }
 
-PythonFile::PythonFile() : PythonObject() {}
-
-PythonFile::PythonFile(File &file, const char *mode) { Reset(file, mode); }
-
-PythonFile::PythonFile(const char *path, const char *mode) {
-  lldb_private::File file;
-  FileSystem::Instance().Open(file, FileSpec(path), GetOptionsFromMode(mode));
-  Reset(file, mode);
-}
-
-PythonFile::PythonFile(PyRefType type, PyObject *o) { Reset(type, o); }
-
-PythonFile::~PythonFile() {}
-
 bool PythonFile::Check(PyObject *py_obj) {
+  if (!py_obj)
+    return false;
 #if PY_MAJOR_VERSION < 3
   return PyFile_Check(py_obj);
 #else
@@ -967,86 +927,644 @@
   // first-class object type anymore.  `PyFile_FromFd` is just a thin wrapper
   // over `io.open()`, which returns some object derived from `io.IOBase`. As a
   // result, the only way to detect a file in Python 3 is to check whether it
-  // inherits from `io.IOBase`.  Since it is possible for non-files to also
-  // inherit from `io.IOBase`, we additionally verify that it has the `fileno`
-  // attribute, which should guarantee that it is backed by the file system.
-  PythonObject io_module(PyRefType::Owned, PyImport_ImportModule("io"));
-  PythonDictionary io_dict(PyRefType::Borrowed,
-                           PyModule_GetDict(io_module.get()));
-  PythonObject io_base_class = io_dict.GetItemForKey(PythonString("IOBase"));
-
-  PythonObject object_type(PyRefType::Owned, PyObject_Type(py_obj));
-
-  if (1 != PyObject_IsSubclass(object_type.get(), io_base_class.get()))
+  // inherits from `io.IOBase`.
+  auto io_module = PythonModule::Import("io");
+  if (!io_module) {
+    llvm::consumeError(io_module.takeError());
     return false;
-  if (!object_type.HasAttribute("fileno"))
+  }
+  auto iobase = io_module.get().Get("IOBase");
+  if (!iobase) {
+    llvm::consumeError(iobase.takeError());
     return false;
-
-  return true;
+  }
+  int r = PyObject_IsInstance(py_obj, iobase.get().get());
+  if (r < 0) {
+    llvm::consumeError(exception()); // clear the exception and log it.
+    return false;
+  }
+  return !!r;
 #endif
 }
 
-void PythonFile::Reset(PyRefType type, PyObject *py_obj) {
-  // Grab the desired reference type so that if we end up rejecting `py_obj` it
-  // still gets decremented if necessary.
-  PythonObject result(type, py_obj);
-
-  if (!PythonFile::Check(py_obj)) {
-    PythonObject::Reset();
-    return;
+namespace {
+class GIL {
+public:
+  GIL() {
+    m_state = PyGILState_Ensure();
+    assert(!PyErr_Occurred());
   }
+  ~GIL() { PyGILState_Release(m_state); }
 
-  // Calling PythonObject::Reset(const PythonObject&) will lead to stack
-  // overflow since it calls back into the virtual implementation.
-  PythonObject::Reset(PyRefType::Borrowed, result.get());
+protected:
+  PyGILState_STATE m_state;
+};
+} // namespace
+
+const char *PythonException::toCString() const {
+  if (!m_repr_bytes)
+    return "unknown exception";
+  return PyBytes_AS_STRING(m_repr_bytes);
 }
 
-void PythonFile::Reset(File &file, const char *mode) {
-  if (!file.IsValid()) {
-    Reset();
-    return;
+PythonException::PythonException(const char *caller) {
+  assert(PyErr_Occurred());
+  m_exception_type = m_exception = m_traceback = m_repr_bytes = NULL;
+  PyErr_Fetch(&m_exception_type, &m_exception, &m_traceback);
+  PyErr_NormalizeException(&m_exception_type, &m_exception, &m_traceback);
+  PyErr_Clear();
+  if (m_exception) {
+    PyObject *repr = PyObject_Repr(m_exception);
+    if (repr) {
+      m_repr_bytes = PyUnicode_AsEncodedString(repr, "utf-8", nullptr);
+      if (!m_repr_bytes) {
+        PyErr_Clear();
+      }
+      Py_XDECREF(repr);
+    } else {
+      PyErr_Clear();
+    }
+  }
+  Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT);
+  if (caller)
+    LLDB_LOGF(log, "%s failed with exception: %s", caller, toCString());
+  else
+    LLDB_LOGF(log, "python exception: %s", toCString());
+}
+void PythonException::Restore() {
+  if (m_exception_type && m_exception) {
+    PyErr_Restore(m_exception_type, m_exception, m_traceback);
+  } else {
+    PyErr_SetString(PyExc_Exception, toCString());
+  }
+  m_exception_type = m_exception = m_traceback = NULL;
+}
+
+PythonException::~PythonException() {
+  Py_XDECREF(m_exception_type);
+  Py_XDECREF(m_exception);
+  Py_XDECREF(m_traceback);
+  Py_XDECREF(m_repr_bytes);
+}
+
+void PythonException::log(llvm::raw_ostream &OS) const { OS << toCString(); }
+
+std::error_code PythonException::convertToErrorCode() const {
+  return llvm::inconvertibleErrorCode();
+}
+
+bool PythonException::Matches(PyObject *exc) const {
+  return PyErr_GivenExceptionMatches(m_exception_type, exc);
+}
+
+const char read_exception_script[] = R"(
+import sys
+from traceback import print_exception
+if sys.version_info.major < 3:
+  from StringIO import StringIO
+else:
+  from io import StringIO
+def main(exc_type, exc_value, tb):
+  f = StringIO()
+  print_exception(exc_type, exc_value, tb, file=f)
+  return f.getvalue()
+)";
+
+std::string PythonException::ReadBacktrace() const {
+
+  if (!m_traceback)
+    return toCString();
+
+  // no need to synchronize access to this global, we already have the GIL
+  static PythonScript read_exception(read_exception_script);
+
+  Expected<std::string> backtrace = As<std::string>(
+      read_exception(m_exception_type, m_exception, m_traceback));
+
+  if (!backtrace) {
+    std::string message =
+        std::string(toCString()) + "\n" +
+        "Traceback unavailble, an error occurred while reading it:\n";
+    return (message + llvm::toString(backtrace.takeError()));
   }
 
-  char *cmode = const_cast<char *>(mode);
+  return std::move(backtrace.get());
+}
+
+char PythonException::ID = 0;
+
+llvm::Expected<File::OpenOptions>
+GetOptionsForPyObject(const PythonObject &obj) {
 #if PY_MAJOR_VERSION >= 3
-  Reset(PyRefType::Owned, PyFile_FromFd(file.GetDescriptor(), nullptr, cmode,
-                                        -1, nullptr, "ignore", nullptr, 0));
+  auto options = File::OpenOptions(0);
+  auto readable = As<bool>(obj.CallMethod("readable"));
+  if (!readable)
+    return readable.takeError();
+  auto writable = As<bool>(obj.CallMethod("writable"));
+  if (!writable)
+    return writable.takeError();
+  if (readable.get())
+    options |= File::eOpenOptionRead;
+  if (writable.get())
+    options |= File::eOpenOptionWrite;
+  return options;
 #else
-  // Read through the Python source, doesn't seem to modify these strings
-  Reset(PyRefType::Owned,
-        PyFile_FromFile(file.GetStream(), const_cast<char *>(""), cmode,
-                        nullptr));
+  PythonString py_mode = obj.GetAttributeValue("mode").AsType<PythonString>();
+  return File::GetOptionsFromMode(py_mode.GetString());
 #endif
 }
 
-uint32_t PythonFile::GetOptionsFromMode(llvm::StringRef mode) {
-  if (mode.empty())
-    return 0;
+// Base class template for python files.   All it knows how to do
+// is hold a reference to the python object and close or flush it
+// when the File is closed.
+namespace {
+template <typename Base> class OwnedPythonFile : public Base {
+public:
+  template <typename... Args>
+  OwnedPythonFile(const PythonFile &file, bool borrowed, Args... args)
+      : Base(args...), m_py_obj(file), m_borrowed(borrowed) {
+    assert(m_py_obj);
+  }
 
-  return llvm::StringSwitch<uint32_t>(mode.str())
-      .Case("r", File::eOpenOptionRead)
-      .Case("w", File::eOpenOptionWrite)
-      .Case("a", File::eOpenOptionWrite | File::eOpenOptionAppend |
-                     File::eOpenOptionCanCreate)
-      .Case("r+", File::eOpenOptionRead | File::eOpenOptionWrite)
-      .Case("w+", File::eOpenOptionRead | File::eOpenOptionWrite |
-                      File::eOpenOptionCanCreate | File::eOpenOptionTruncate)
-      .Case("a+", File::eOpenOptionRead | File::eOpenOptionWrite |
-                      File::eOpenOptionAppend | File::eOpenOptionCanCreate)
-      .Default(0);
+  ~OwnedPythonFile() override {
+    assert(m_py_obj);
+    GIL takeGIL;
+    Close();
+    // we need to ensure the python object is released while we still
+    // hold the GIL
+    m_py_obj.Reset();
+  }
+
+  bool IsPythonSideValid() const {
+    GIL takeGIL;
+    auto closed = As<bool>(m_py_obj.GetAttribute("closed"));
+    if (!closed) {
+      llvm::consumeError(closed.takeError());
+      return false;
+    }
+    return !closed.get();
+  }
+
+  bool IsValid() const override {
+    return IsPythonSideValid() && Base::IsValid();
+  }
+
+  Status Close() override {
+    assert(m_py_obj);
+    Status py_error, base_error;
+    GIL takeGIL;
+    if (!m_borrowed) {
+      auto r = m_py_obj.CallMethod("close");
+      if (!r)
+        py_error = Status(r.takeError());
+    }
+    base_error = Base::Close();
+    if (py_error.Fail())
+      return py_error;
+    return base_error;
+  };
+
+  PyObject *GetPythonObject() const {
+    assert(m_py_obj.IsValid());
+    return m_py_obj.get();
+  }
+
+  static bool classof(const File *file) = delete;
+
+protected:
+  PythonFile m_py_obj;
+  bool m_borrowed;
+};
+} // namespace
+
+// A SimplePythonFile is a OwnedPythonFile that just does all I/O as
+// a NativeFile
+namespace {
+class SimplePythonFile : public OwnedPythonFile<NativeFile> {
+public:
+  SimplePythonFile(const PythonFile &file, bool borrowed, int fd,
+                   File::OpenOptions options)
+      : OwnedPythonFile(file, borrowed, fd, options, false) {}
+
+  static char ID;
+  bool isA(const void *classID) const override {
+    return classID == &ID || NativeFile::isA(classID);
+  }
+  static bool classof(const File *file) { return file->isA(&ID); }
+};
+char SimplePythonFile::ID = 0;
+} // namespace
+
+#if PY_MAJOR_VERSION >= 3
+
+namespace {
+class PythonBuffer {
+public:
+  PythonBuffer &operator=(const PythonBuffer &) = delete;
+  PythonBuffer(const PythonBuffer &) = delete;
+
+  static Expected<PythonBuffer> Create(PythonObject &obj,
+                                       int flags = PyBUF_SIMPLE) {
+    Py_buffer py_buffer = {};
+    PyObject_GetBuffer(obj.get(), &py_buffer, flags);
+    if (!py_buffer.obj)
+      return llvm::make_error<PythonException>();
+    return PythonBuffer(py_buffer);
+  }
+
+  PythonBuffer(PythonBuffer &&other) {
+    m_buffer = other.m_buffer;
+    other.m_buffer.obj = nullptr;
+  }
+
+  ~PythonBuffer() {
+    if (m_buffer.obj)
+      PyBuffer_Release(&m_buffer);
+  }
+
+  Py_buffer &get() { return m_buffer; }
+
+private:
+  // takes ownership of the buffer.
+  PythonBuffer(const Py_buffer &py_buffer) : m_buffer(py_buffer) {}
+  Py_buffer m_buffer;
+};
+} // namespace
+
+// Shared methods between TextPythonFile and BinaryPythonFile
+namespace {
+class PythonIOFile : public OwnedPythonFile<File> {
+public:
+  PythonIOFile(const PythonFile &file, bool borrowed)
+      : OwnedPythonFile(file, borrowed) {}
+
+  ~PythonIOFile() override { Close(); }
+
+  bool IsValid() const override { return IsPythonSideValid(); }
+
+  Status Close() override {
+    assert(m_py_obj);
+    GIL takeGIL;
+    if (m_borrowed)
+      return Flush();
+    auto r = m_py_obj.CallMethod("close");
+    if (!r)
+      return Status(r.takeError());
+    return Status();
+  }
+
+  Status Flush() override {
+    GIL takeGIL;
+    auto r = m_py_obj.CallMethod("flush");
+    if (!r)
+      return Status(r.takeError());
+    return Status();
+  }
+
+  Expected<File::OpenOptions> GetOptions() const override {
+    GIL takeGIL;
+    return GetOptionsForPyObject(m_py_obj);
+  }
+
+  static char ID;
+  bool isA(const void *classID) const override {
+    return classID == &ID || File::isA(classID);
+  }
+  static bool classof(const File *file) { return file->isA(&ID); }
+};
+char PythonIOFile::ID = 0;
+} // namespace
+
+namespace {
+class BinaryPythonFile : public PythonIOFile {
+protected:
+  int m_descriptor;
+
+public:
+  BinaryPythonFile(int fd, const PythonFile &file, bool borrowed)
+      : PythonIOFile(file, borrowed),
+        m_descriptor(File::DescriptorIsValid(fd) ? fd
+                                                 : File::kInvalidDescriptor) {}
+
+  int GetDescriptor() const override { return m_descriptor; }
+
+  Status Write(const void *buf, size_t &num_bytes) override {
+    GIL takeGIL;
+    PyObject *pybuffer_p = PyMemoryView_FromMemory(
+        const_cast<char *>((const char *)buf), num_bytes, PyBUF_READ);
+    if (!pybuffer_p)
+      return Status(llvm::make_error<PythonException>());
+    auto pybuffer = Take<PythonObject>(pybuffer_p);
+    num_bytes = 0;
+    auto bytes_written = As<long long>(m_py_obj.CallMethod("write", pybuffer));
+    if (!bytes_written)
+      return Status(bytes_written.takeError());
+    if (bytes_written.get() < 0)
+      return Status(".write() method returned a negative number!");
+    static_assert(sizeof(long long) >= sizeof(size_t), "overflow");
+    num_bytes = bytes_written.get();
+    return Status();
+  }
+
+  Status Read(void *buf, size_t &num_bytes) override {
+    GIL takeGIL;
+    static_assert(sizeof(long long) >= sizeof(size_t), "overflow");
+    auto pybuffer_obj =
+        m_py_obj.CallMethod("read", (unsigned long long)num_bytes);
+    if (!pybuffer_obj)
+      return Status(pybuffer_obj.takeError());
+    num_bytes = 0;
+    if (pybuffer_obj.get().IsNone()) {
+      // EOF
+      num_bytes = 0;
+      return Status();
+    }
+    auto pybuffer = PythonBuffer::Create(pybuffer_obj.get());
+    if (!pybuffer)
+      return Status(pybuffer.takeError());
+    memcpy(buf, pybuffer.get().get().buf, pybuffer.get().get().len);
+    num_bytes = pybuffer.get().get().len;
+    return Status();
+  }
+};
+} // namespace
+
+namespace {
+class TextPythonFile : public PythonIOFile {
+protected:
+  int m_descriptor;
+
+public:
+  TextPythonFile(int fd, const PythonFile &file, bool borrowed)
+      : PythonIOFile(file, borrowed),
+        m_descriptor(File::DescriptorIsValid(fd) ? fd
+                                                 : File::kInvalidDescriptor) {}
+
+  int GetDescriptor() const override { return m_descriptor; }
+
+  Status Write(const void *buf, size_t &num_bytes) override {
+    GIL takeGIL;
+    auto pystring =
+        PythonString::FromUTF8(llvm::StringRef((const char *)buf, num_bytes));
+    if (!pystring)
+      return Status(pystring.takeError());
+    num_bytes = 0;
+    auto bytes_written =
+        As<long long>(m_py_obj.CallMethod("write", pystring.get()));
+    if (!bytes_written)
+      return Status(bytes_written.takeError());
+    if (bytes_written.get() < 0)
+      return Status(".write() method returned a negative number!");
+    static_assert(sizeof(long long) >= sizeof(size_t), "overflow");
+    num_bytes = bytes_written.get();
+    return Status();
+  }
+
+  Status Read(void *buf, size_t &num_bytes) override {
+    GIL takeGIL;
+    size_t num_chars = num_bytes / 6;
+    size_t orig_num_bytes = num_bytes;
+    num_bytes = 0;
+    if (orig_num_bytes < 6) {
+      return Status("can't read less than 6 bytes from a utf8 text stream");
+    }
+    auto pystring = As<PythonString>(
+        m_py_obj.CallMethod("read", (unsigned long long)num_chars));
+    if (!pystring)
+      return Status(pystring.takeError());
+    if (pystring.get().IsNone()) {
+      // EOF
+      return Status();
+    }
+    auto stringref = pystring.get().AsUTF8();
+    if (!stringref)
+      return Status(stringref.takeError());
+    num_bytes = stringref.get().size();
+    memcpy(buf, stringref.get().begin(), num_bytes);
+    return Status();
+  }
+};
+} // namespace
+
+#endif
+
+llvm::Expected<FileSP> PythonFile::ConvertToFile(bool borrowed) {
+  if (!IsValid())
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "invalid PythonFile");
+
+  int fd = PyObject_AsFileDescriptor(m_py_obj);
+  if (fd < 0) {
+    PyErr_Clear();
+    return ConvertToFileForcingUseOfScriptingIOMethods(borrowed);
+  }
+  auto options = GetOptionsForPyObject(*this);
+  if (!options)
+    return options.takeError();
+
+  if (options.get() & File::eOpenOptionWrite) {
+    // LLDB and python will not share I/O buffers.  We should probably
+    // flush the python buffers now.
+    auto r = CallMethod("flush");
+    if (!r)
+      return r.takeError();
+  }
+
+  FileSP file_sp;
+  if (borrowed) {
+    // In this case we we don't need to retain the python
+    // object at all.
+    file_sp = std::make_shared<NativeFile>(fd, options.get(), false);
+  } else {
+    file_sp = std::static_pointer_cast<File>(
+        std::make_shared<SimplePythonFile>(*this, borrowed, fd, options.get()));
+  }
+  if (!file_sp->IsValid())
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "invalid File");
+
+  return file_sp;
 }
 
-bool PythonFile::GetUnderlyingFile(File &file) const {
-  if (!IsValid())
-    return false;
+llvm::Expected<FileSP>
+PythonFile::ConvertToFileForcingUseOfScriptingIOMethods(bool borrowed) {
 
-  file.Close();
-  // We don't own the file descriptor returned by this function, make sure the
-  // File object knows about that.
-  file.SetDescriptor(PyObject_AsFileDescriptor(m_py_obj), false);
-  PythonString py_mode = GetAttributeValue("mode").AsType<PythonString>();
-  file.SetOptions(PythonFile::GetOptionsFromMode(py_mode.GetString()));
-  return file.IsValid();
+  assert(!PyErr_Occurred());
+
+  if (!IsValid())
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "invalid PythonFile");
+
+#if PY_MAJOR_VERSION < 3
+
+  return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                 "not supported on python 2");
+
+#else
+
+  int fd = PyObject_AsFileDescriptor(m_py_obj);
+  if (fd < 0) {
+    PyErr_Clear();
+    fd = File::kInvalidDescriptor;
+  }
+
+  auto io_module = PythonModule::Import("io");
+  if (!io_module)
+    return io_module.takeError();
+  auto textIOBase = io_module.get().Get("TextIOBase");
+  if (!textIOBase)
+    return textIOBase.takeError();
+  auto rawIOBase = io_module.get().Get("RawIOBase");
+  if (!rawIOBase)
+    return rawIOBase.takeError();
+  auto bufferedIOBase = io_module.get().Get("BufferedIOBase");
+  if (!bufferedIOBase)
+    return bufferedIOBase.takeError();
+
+  FileSP file_sp;
+
+  auto isTextIO = IsInstance(textIOBase.get());
+  if (!isTextIO)
+    return isTextIO.takeError();
+  if (isTextIO.get())
+    file_sp = std::static_pointer_cast<File>(
+        std::make_shared<TextPythonFile>(fd, *this, borrowed));
+
+  auto isRawIO = IsInstance(rawIOBase.get());
+  if (!isRawIO)
+    return isRawIO.takeError();
+  auto isBufferedIO = IsInstance(bufferedIOBase.get());
+  if (!isBufferedIO)
+    return isBufferedIO.takeError();
+
+  if (isRawIO.get() || isBufferedIO.get()) {
+    file_sp = std::static_pointer_cast<File>(
+        std::make_shared<BinaryPythonFile>(fd, *this, borrowed));
+  }
+
+  if (!file_sp)
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "python file is neither text nor binary");
+
+  if (!file_sp->IsValid())
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "invalid File");
+
+  return file_sp;
+
+#endif
+}
+
+Expected<PythonFile> PythonFile::FromFile(File &file, const char *mode) {
+  if (!file.IsValid())
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "invalid file");
+
+  if (auto *simple = llvm::dyn_cast<SimplePythonFile>(&file))
+    return Retain<PythonFile>(simple->GetPythonObject());
+#if PY_MAJOR_VERSION >= 3
+  if (auto *pythonio = llvm::dyn_cast<PythonIOFile>(&file))
+    return Retain<PythonFile>(pythonio->GetPythonObject());
+#endif
+
+  if (!mode) {
+    auto m = file.GetOpenMode();
+    if (!m)
+      return m.takeError();
+    mode = m.get();
+  }
+
+  PyObject *file_obj;
+#if PY_MAJOR_VERSION >= 3
+  file_obj = PyFile_FromFd(file.GetDescriptor(), nullptr, mode, -1, nullptr,
+                           "ignore", nullptr, /*closefd=*/0);
+#else
+  // I'd like to pass ::fflush here if the file is writable,  so that
+  // when the python side destructs the file object it will be flushed.
+  // However, this would be dangerous.    It can cause fflush to be called
+  // after fclose if the python program keeps a reference to the file after
+  // the original lldb_private::File has been destructed.
+  //
+  // It's all well and good to ask a python program not to use a closed file
+  // but asking a python program to make sure objects get released in a
+  // particular order is not safe.
+  //
+  // The tradeoff here is that if a python 2 program wants to make sure this
+  // file gets flushed, they'll have to do it explicitly or wait untill the
+  // original lldb File itself gets flushed.
+  file_obj = PyFile_FromFile(file.GetStream(), py2_const_cast(""),
+                             py2_const_cast(mode), [](FILE *) { return 0; });
+#endif
+
+  if (!file_obj)
+    return exception();
+
+  return Take<PythonFile>(file_obj);
+}
+
+Error PythonScript::Init() {
+  if (function.IsValid())
+    return Error::success();
+
+  PythonDictionary globals(PyInitialValue::Empty);
+  auto builtins = PythonModule::BuiltinsModule();
+  if (Error error = globals.SetItem("__builtins__", builtins))
+    return error;
+  PyObject *o =
+      PyRun_String(script, Py_file_input, globals.get(), globals.get());
+  if (!o)
+    return exception();
+  Take<PythonObject>(o);
+  auto f = As<PythonCallable>(globals.GetItem("main"));
+  if (!f)
+    return f.takeError();
+  function = std::move(f.get());
+
+  return Error::success();
+}
+
+llvm::Expected<PythonObject>
+python::runStringOneLine(const llvm::Twine &string,
+                         const PythonDictionary &globals,
+                         const PythonDictionary &locals) {
+  if (!globals.IsValid() || !locals.IsValid())
+    return nullDeref();
+
+  PyObject *code =
+      Py_CompileString(NullTerminated(string), "<string>", Py_eval_input);
+  if (!code) {
+    PyErr_Clear();
+    code =
+        Py_CompileString(NullTerminated(string), "<string>", Py_single_input);
+  }
+  if (!code)
+    return exception();
+  auto code_ref = Take<PythonObject>(code);
+
+#if PY_MAJOR_VERSION < 3
+  PyObject *result =
+      PyEval_EvalCode((PyCodeObject *)code, globals.get(), locals.get());
+#else
+  PyObject *result = PyEval_EvalCode(code, globals.get(), locals.get());
+#endif
+
+  if (!result)
+    return exception();
+
+  return Take<PythonObject>(result);
+}
+
+llvm::Expected<PythonObject>
+python::runStringMultiLine(const llvm::Twine &string,
+                           const PythonDictionary &globals,
+                           const PythonDictionary &locals) {
+  if (!globals.IsValid() || !locals.IsValid())
+    return nullDeref();
+  PyObject *result = PyRun_String(NullTerminated(string), Py_file_input,
+                                  globals.get(), locals.get());
+  if (!result)
+    return exception();
+  return Take<PythonObject>(result);
 }
 
 #endif
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
index 049ce90..b75045b 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
@@ -6,10 +6,51 @@
 //
 //===----------------------------------------------------------------------===//
 
+//
+// !! FIXME FIXME FIXME !!
+//
+// Python APIs nearly all can return an exception.   They do this
+// by returning NULL, or -1, or some such value and setting
+// the exception state with PyErr_Set*().   Exceptions must be
+// handled before further python API functions are called.   Failure
+// to do so will result in asserts on debug builds of python.
+// It will also sometimes, but not usually result in crashes of
+// release builds.
+//
+// Nearly all the code in this header does not handle python exceptions
+// correctly.  It should all be converted to return Expected<> or
+// Error types to capture the exception.
+//
+// Everything in this file except functions that return Error or
+// Expected<> is considered deprecated and should not be
+// used in new code.  If you need to use it, fix it first.
+//
+//
+// TODOs for this file
+//
+// * Make all methods safe for exceptions.
+//
+// * Eliminate method signatures that must translate exceptions into
+//   empty objects or NULLs.   Almost everything here should return
+//   Expected<>.   It should be acceptable for certain operations that
+//   can never fail to assert instead, such as the creation of
+//   PythonString from a string literal.
+//
+// * Elimintate Reset(), and make all non-default constructors private.
+//   Python objects should be created with Retain<> or Take<>, and they
+//   should be assigned with operator=
+//
+// * Eliminate default constructors, make python objects always
+//   nonnull, and use optionals where necessary.
+//
+
+
 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H
 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H
 
-#ifndef LLDB_DISABLE_PYTHON
+#include "lldb/Host/Config.h"
+
+#if LLDB_ENABLE_PYTHON
 
 // LLDB Python header must be included first
 #include "lldb-python.h"
@@ -20,12 +61,15 @@
 #include "llvm/ADT/ArrayRef.h"
 
 namespace lldb_private {
+namespace python {
 
+class PythonObject;
 class PythonBytes;
 class PythonString;
 class PythonList;
 class PythonDictionary;
 class PythonInteger;
+class PythonException;
 
 class StructuredPythonObject : public StructuredData::Generic {
 public:
@@ -43,7 +87,7 @@
 
   bool IsValid() const override { return GetValue() && GetValue() != Py_None; }
 
-  void Dump(Stream &s, bool pretty_print = true) const override;
+  void Serialize(llvm::json::OStream &s) const override;
 
 private:
   DISALLOW_COPY_AND_ASSIGN(StructuredPythonObject);
@@ -72,61 +116,145 @@
             // not call Py_INCREF.
 };
 
+
+// Take a reference that you already own, and turn it into
+// a PythonObject.
+//
+// Most python API methods will return a +1 reference
+// if they succeed or NULL if and only if
+// they set an exception.   Use this to collect such return
+// values, after checking for NULL.
+//
+// If T is not just PythonObject, then obj must be already be
+// checked to be of the correct type.
+template <typename T> T Take(PyObject *obj) {
+  assert(obj);
+  assert(!PyErr_Occurred());
+  T thing(PyRefType::Owned, obj);
+  assert(thing.IsValid());
+  return thing;
+}
+
+// Retain a reference you have borrowed, and turn it into
+// a PythonObject.
+//
+// A minority of python APIs return a borrowed reference
+// instead of a +1.   They will also return NULL if and only
+// if they set an exception.   Use this to collect such return
+// values, after checking for NULL.
+//
+// If T is not just PythonObject, then obj must be already be
+// checked to be of the correct type.
+template <typename T> T Retain(PyObject *obj) {
+  assert(obj);
+  assert(!PyErr_Occurred());
+  T thing(PyRefType::Borrowed, obj);
+  assert(thing.IsValid());
+  return thing;
+}
+
+// This class can be used like a utility function to convert from
+// a llvm-friendly Twine into a null-terminated const char *,
+// which is the form python C APIs want their strings in.
+//
+// Example:
+// const llvm::Twine &some_twine;
+// PyFoo_Bar(x, y, z, NullTerminated(some_twine));
+//
+// Why a class instead of a function?  If the twine isn't already null
+// terminated, it will need a temporary buffer to copy the string
+// into.   We need that buffer to stick around for the lifetime of the
+// statement.
+class NullTerminated {
+  const char *str;
+  llvm::SmallString<32> storage;
+
+public:
+  NullTerminated(const llvm::Twine &twine) {
+    llvm::StringRef ref = twine.toNullTerminatedStringRef(storage);
+    str = ref.begin();
+  }
+  operator const char *() { return str; }
+};
+
+inline llvm::Error nullDeref() {
+  return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                 "A NULL PyObject* was dereferenced");
+}
+
+inline llvm::Error exception(const char *s = nullptr) {
+  return llvm::make_error<PythonException>(s);
+}
+
+inline llvm::Error keyError() {
+  return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                 "key not in dict");
+}
+
+#if PY_MAJOR_VERSION < 3
+// The python 2 API declares some arguments as char* that should
+// be const char *, but it doesn't actually modify them.
+inline char *py2_const_cast(const char *s) { return const_cast<char *>(s); }
+#else
+inline const char *py2_const_cast(const char *s) { return s; }
+#endif
+
 enum class PyInitialValue { Invalid, Empty };
 
+template <typename T, typename Enable = void> struct PythonFormat;
+
+template <> struct PythonFormat<unsigned long long> {
+  static constexpr char format = 'K';
+  static auto get(unsigned long long value) { return value; }
+};
+
+template <> struct PythonFormat<long long> {
+  static constexpr char format = 'L';
+  static auto get(long long value) { return value; }
+};
+
+template <> struct PythonFormat<PyObject *> {
+  static constexpr char format = 'O';
+  static auto get(PyObject *value) { return value; }
+};
+
+template <typename T>
+struct PythonFormat<
+    T, typename std::enable_if<std::is_base_of<PythonObject, T>::value>::type> {
+  static constexpr char format = 'O';
+  static auto get(const T &value) { return value.get(); }
+};
+
 class PythonObject {
 public:
   PythonObject() : m_py_obj(nullptr) {}
 
-  PythonObject(PyRefType type, PyObject *py_obj) : m_py_obj(nullptr) {
-    Reset(type, py_obj);
-  }
-
-  PythonObject(const PythonObject &rhs) : m_py_obj(nullptr) { Reset(rhs); }
-
-  virtual ~PythonObject() { Reset(); }
-
-  void Reset() {
-    // Avoid calling the virtual method since it's not necessary
-    // to actually validate the type of the PyObject if we're
-    // just setting to null.
-    if (Py_IsInitialized())
-      Py_XDECREF(m_py_obj);
-    m_py_obj = nullptr;
-  }
-
-  void Reset(const PythonObject &rhs) {
-    // Avoid calling the virtual method if it's not necessary
-    // to actually validate the type of the PyObject.
-    if (!rhs.IsValid())
-      Reset();
-    else
-      Reset(PyRefType::Borrowed, rhs.m_py_obj);
-  }
-
-  // PythonObject is implicitly convertible to PyObject *, which will call the
-  // wrong overload.  We want to explicitly disallow this, since a PyObject
-  // *always* owns its reference.  Therefore the overload which takes a
-  // PyRefType doesn't make sense, and the copy constructor should be used.
-  void Reset(PyRefType type, const PythonObject &ref) = delete;
-
-  virtual void Reset(PyRefType type, PyObject *py_obj) {
-    if (py_obj == m_py_obj)
-      return;
-
-    if (Py_IsInitialized())
-      Py_XDECREF(m_py_obj);
-
+  PythonObject(PyRefType type, PyObject *py_obj) {
     m_py_obj = py_obj;
-
     // If this is a borrowed reference, we need to convert it to
     // an owned reference by incrementing it.  If it is an owned
     // reference (for example the caller allocated it with PyDict_New()
     // then we must *not* increment it.
-    if (Py_IsInitialized() && type == PyRefType::Borrowed)
+    if (m_py_obj && Py_IsInitialized() && type == PyRefType::Borrowed)
       Py_XINCREF(m_py_obj);
   }
 
+  PythonObject(const PythonObject &rhs)
+      : PythonObject(PyRefType::Borrowed, rhs.m_py_obj) {}
+
+  PythonObject(PythonObject &&rhs) {
+    m_py_obj = rhs.m_py_obj;
+    rhs.m_py_obj = nullptr;
+  }
+
+  ~PythonObject() { Reset(); }
+
+  void Reset() {
+    if (m_py_obj && Py_IsInitialized())
+      Py_DECREF(m_py_obj);
+    m_py_obj = nullptr;
+  }
+
   void Dump() const {
     if (m_py_obj)
       _PyObject_Dump(m_py_obj);
@@ -144,8 +272,9 @@
     return result;
   }
 
-  PythonObject &operator=(const PythonObject &other) {
-    Reset(PyRefType::Borrowed, other.get());
+  PythonObject &operator=(PythonObject other) {
+    Reset();
+    m_py_obj = std::exchange(other.m_py_obj, nullptr);
     return *this;
   }
 
@@ -174,11 +303,13 @@
 
   PythonObject GetAttributeValue(llvm::StringRef attribute) const;
 
-  bool IsValid() const;
+  bool IsNone() const { return m_py_obj == Py_None; }
 
-  bool IsAllocated() const;
+  bool IsValid() const { return m_py_obj != nullptr; }
 
-  bool IsNone() const;
+  bool IsAllocated() const { return IsValid() && !IsNone(); }
+
+  explicit operator bool() const { return IsValid() && !IsNone(); }
 
   template <typename T> T AsType() const {
     if (!T::Check(m_py_obj))
@@ -188,26 +319,117 @@
 
   StructuredData::ObjectSP CreateStructuredObject() const;
 
+public:
+  template <typename... T>
+  llvm::Expected<PythonObject> CallMethod(const char *name,
+                                          const T &... t) const {
+    const char format[] = {'(', PythonFormat<T>::format..., ')', 0};
+    PyObject *obj =
+        PyObject_CallMethod(m_py_obj, py2_const_cast(name),
+                            py2_const_cast(format), PythonFormat<T>::get(t)...);
+    if (!obj)
+      return exception();
+    return python::Take<PythonObject>(obj);
+  }
+
+  template <typename... T>
+  llvm::Expected<PythonObject> Call(const T &... t) const {
+    const char format[] = {'(', PythonFormat<T>::format..., ')', 0};
+    PyObject *obj = PyObject_CallFunction(m_py_obj, py2_const_cast(format),
+                                          PythonFormat<T>::get(t)...);
+    if (!obj)
+      return exception();
+    return python::Take<PythonObject>(obj);
+  }
+
+  llvm::Expected<PythonObject> GetAttribute(const llvm::Twine &name) const {
+    if (!m_py_obj)
+      return nullDeref();
+    PyObject *obj = PyObject_GetAttrString(m_py_obj, NullTerminated(name));
+    if (!obj)
+      return exception();
+    return python::Take<PythonObject>(obj);
+  }
+
+  llvm::Expected<bool> IsTrue() {
+    if (!m_py_obj)
+      return nullDeref();
+    int r = PyObject_IsTrue(m_py_obj);
+    if (r < 0)
+      return exception();
+    return !!r;
+  }
+
+  llvm::Expected<long long> AsLongLong() {
+    if (!m_py_obj)
+      return nullDeref();
+    assert(!PyErr_Occurred());
+    long long r = PyLong_AsLongLong(m_py_obj);
+    if (PyErr_Occurred())
+      return exception();
+    return r;
+  }
+
+  llvm::Expected<bool> IsInstance(const PythonObject &cls) {
+    if (!m_py_obj || !cls.IsValid())
+      return nullDeref();
+    int r = PyObject_IsInstance(m_py_obj, cls.get());
+    if (r < 0)
+      return exception();
+    return !!r;
+  }
+
 protected:
   PyObject *m_py_obj;
 };
 
-class PythonBytes : public PythonObject {
+
+// This is why C++ needs monads.
+template <typename T> llvm::Expected<T> As(llvm::Expected<PythonObject> &&obj) {
+  if (!obj)
+    return obj.takeError();
+  if (!T::Check(obj.get().get()))
+    return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                   "type error");
+  return T(PyRefType::Borrowed, std::move(obj.get().get()));
+}
+
+template <> llvm::Expected<bool> As<bool>(llvm::Expected<PythonObject> &&obj);
+
+template <>
+llvm::Expected<long long> As<long long>(llvm::Expected<PythonObject> &&obj);
+
+template <>
+llvm::Expected<std::string> As<std::string>(llvm::Expected<PythonObject> &&obj);
+
+
+template <class T> class TypedPythonObject : public PythonObject {
 public:
-  PythonBytes();
+  // override to perform implicit type conversions on Reset
+  // This can be eliminated once we drop python 2 support.
+  static void Convert(PyRefType &type, PyObject *&py_obj) {}
+
+  TypedPythonObject(PyRefType type, PyObject *py_obj) {
+    if (!py_obj)
+      return;
+    T::Convert(type, py_obj);
+    if (T::Check(py_obj))
+      PythonObject::operator=(PythonObject(type, py_obj));
+    else if (type == PyRefType::Owned)
+      Py_DECREF(py_obj);
+  }
+
+  TypedPythonObject() {}
+};
+
+class PythonBytes : public TypedPythonObject<PythonBytes> {
+public:
+  using TypedPythonObject::TypedPythonObject;
   explicit PythonBytes(llvm::ArrayRef<uint8_t> bytes);
   PythonBytes(const uint8_t *bytes, size_t length);
-  PythonBytes(PyRefType type, PyObject *o);
-
-  ~PythonBytes() override;
 
   static bool Check(PyObject *py_obj);
 
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
-
-  void Reset(PyRefType type, PyObject *py_obj) override;
-
   llvm::ArrayRef<uint8_t> GetBytes() const;
 
   size_t GetSize() const;
@@ -217,23 +439,15 @@
   StructuredData::StringSP CreateStructuredString() const;
 };
 
-class PythonByteArray : public PythonObject {
+class PythonByteArray : public TypedPythonObject<PythonByteArray> {
 public:
-  PythonByteArray();
+  using TypedPythonObject::TypedPythonObject;
   explicit PythonByteArray(llvm::ArrayRef<uint8_t> bytes);
   PythonByteArray(const uint8_t *bytes, size_t length);
-  PythonByteArray(PyRefType type, PyObject *o);
   PythonByteArray(const PythonBytes &object);
 
-  ~PythonByteArray() override;
-
   static bool Check(PyObject *py_obj);
 
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
-
-  void Reset(PyRefType type, PyObject *py_obj) override;
-
   llvm::ArrayRef<uint8_t> GetBytes() const;
 
   size_t GetSize() const;
@@ -243,45 +457,39 @@
   StructuredData::StringSP CreateStructuredString() const;
 };
 
-class PythonString : public PythonObject {
+class PythonString : public TypedPythonObject<PythonString> {
 public:
-  PythonString();
-  explicit PythonString(llvm::StringRef string);
-  explicit PythonString(const char *string);
-  PythonString(PyRefType type, PyObject *o);
+  using TypedPythonObject::TypedPythonObject;
+  static llvm::Expected<PythonString> FromUTF8(llvm::StringRef string);
 
-  ~PythonString() override;
+  PythonString() : TypedPythonObject() {} // MSVC requires this for some reason
+
+  explicit PythonString(llvm::StringRef string); // safe, null on error
 
   static bool Check(PyObject *py_obj);
+  static void Convert(PyRefType &type, PyObject *&py_obj);
 
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
+  llvm::StringRef GetString() const; // safe, empty string on error
 
-  void Reset(PyRefType type, PyObject *py_obj) override;
-
-  llvm::StringRef GetString() const;
+  llvm::Expected<llvm::StringRef> AsUTF8() const;
 
   size_t GetSize() const;
 
-  void SetString(llvm::StringRef string);
+  void SetString(llvm::StringRef string); // safe, null on error
 
   StructuredData::StringSP CreateStructuredString() const;
 };
 
-class PythonInteger : public PythonObject {
+class PythonInteger : public TypedPythonObject<PythonInteger> {
 public:
-  PythonInteger();
-  explicit PythonInteger(int64_t value);
-  PythonInteger(PyRefType type, PyObject *o);
+  using TypedPythonObject::TypedPythonObject;
 
-  ~PythonInteger() override;
+  PythonInteger() : TypedPythonObject() {} // MSVC requires this for some reason
+
+  explicit PythonInteger(int64_t value);
 
   static bool Check(PyObject *py_obj);
-
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
-
-  void Reset(PyRefType type, PyObject *py_obj) override;
+  static void Convert(PyRefType &type, PyObject *&py_obj);
 
   int64_t GetInteger() const;
 
@@ -290,21 +498,14 @@
   StructuredData::IntegerSP CreateStructuredInteger() const;
 };
 
-class PythonBoolean : public PythonObject {
+class PythonBoolean : public TypedPythonObject<PythonBoolean> {
 public:
-  PythonBoolean() = default;
-  explicit PythonBoolean(bool value);
-  PythonBoolean(PyRefType type, PyObject *o);
+  using TypedPythonObject::TypedPythonObject;
 
-  ~PythonBoolean() override = default;
+  explicit PythonBoolean(bool value);
 
   static bool Check(PyObject *py_obj);
 
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
-
-  void Reset(PyRefType type, PyObject *py_obj) override;
-
   bool GetValue() const;
 
   void SetValue(bool value);
@@ -312,22 +513,17 @@
   StructuredData::BooleanSP CreateStructuredBoolean() const;
 };
 
-class PythonList : public PythonObject {
+class PythonList : public TypedPythonObject<PythonList> {
 public:
-  PythonList() {}
+  using TypedPythonObject::TypedPythonObject;
+
+  PythonList() : TypedPythonObject() {} // MSVC requires this for some reason
+
   explicit PythonList(PyInitialValue value);
   explicit PythonList(int list_size);
-  PythonList(PyRefType type, PyObject *o);
-
-  ~PythonList() override;
 
   static bool Check(PyObject *py_obj);
 
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
-
-  void Reset(PyRefType type, PyObject *py_obj) override;
-
   uint32_t GetSize() const;
 
   PythonObject GetItemAtIndex(uint32_t index) const;
@@ -339,24 +535,17 @@
   StructuredData::ArraySP CreateStructuredArray() const;
 };
 
-class PythonTuple : public PythonObject {
+class PythonTuple : public TypedPythonObject<PythonTuple> {
 public:
-  PythonTuple() {}
+  using TypedPythonObject::TypedPythonObject;
+
   explicit PythonTuple(PyInitialValue value);
   explicit PythonTuple(int tuple_size);
-  PythonTuple(PyRefType type, PyObject *o);
   PythonTuple(std::initializer_list<PythonObject> objects);
   PythonTuple(std::initializer_list<PyObject *> objects);
 
-  ~PythonTuple() override;
-
   static bool Check(PyObject *py_obj);
 
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
-
-  void Reset(PyRefType type, PyObject *py_obj) override;
-
   uint32_t GetSize() const;
 
   PythonObject GetItemAtIndex(uint32_t index) const;
@@ -366,37 +555,35 @@
   StructuredData::ArraySP CreateStructuredArray() const;
 };
 
-class PythonDictionary : public PythonObject {
+class PythonDictionary : public TypedPythonObject<PythonDictionary> {
 public:
-  PythonDictionary() {}
-  explicit PythonDictionary(PyInitialValue value);
-  PythonDictionary(PyRefType type, PyObject *o);
+  using TypedPythonObject::TypedPythonObject;
 
-  ~PythonDictionary() override;
+  PythonDictionary() : TypedPythonObject() {} // MSVC requires this for some reason
+
+  explicit PythonDictionary(PyInitialValue value);
 
   static bool Check(PyObject *py_obj);
 
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
-
-  void Reset(PyRefType type, PyObject *py_obj) override;
-
   uint32_t GetSize() const;
 
   PythonList GetKeys() const;
 
-  PythonObject GetItemForKey(const PythonObject &key) const;
-  void SetItemForKey(const PythonObject &key, const PythonObject &value);
+  PythonObject GetItemForKey(const PythonObject &key) const; // DEPRECATED
+  void SetItemForKey(const PythonObject &key,
+                     const PythonObject &value); // DEPRECATED
+
+  llvm::Expected<PythonObject> GetItem(const PythonObject &key) const;
+  llvm::Expected<PythonObject> GetItem(const llvm::Twine &key) const;
+  llvm::Error SetItem(const PythonObject &key, const PythonObject &value) const;
+  llvm::Error SetItem(const llvm::Twine &key, const PythonObject &value) const;
 
   StructuredData::DictionarySP CreateStructuredDictionary() const;
 };
 
-class PythonModule : public PythonObject {
+class PythonModule : public TypedPythonObject<PythonModule> {
 public:
-  PythonModule();
-  PythonModule(PyRefType type, PyObject *o);
-
-  ~PythonModule() override;
+  using TypedPythonObject::TypedPythonObject;
 
   static bool Check(PyObject *py_obj);
 
@@ -406,38 +593,39 @@
 
   static PythonModule AddModule(llvm::StringRef module);
 
-  static PythonModule ImportModule(llvm::StringRef module);
+  // safe, returns invalid on error;
+  static PythonModule ImportModule(llvm::StringRef name) {
+    std::string s = name;
+    auto mod = Import(s.c_str());
+    if (!mod) {
+      llvm::consumeError(mod.takeError());
+      return PythonModule();
+    }
+    return std::move(mod.get());
+  }
 
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
+  static llvm::Expected<PythonModule> Import(const llvm::Twine &name);
 
-  void Reset(PyRefType type, PyObject *py_obj) override;
+  llvm::Expected<PythonObject> Get(const llvm::Twine &name);
 
   PythonDictionary GetDictionary() const;
 };
 
-class PythonCallable : public PythonObject {
+class PythonCallable : public TypedPythonObject<PythonCallable> {
 public:
+  using TypedPythonObject::TypedPythonObject;
+
   struct ArgInfo {
-    size_t count;
-    bool is_bound_method : 1;
-    bool has_varargs : 1;
-    bool has_kwargs : 1;
+    /* the largest number of positional arguments this callable
+     * can accept, or UNBOUNDED, ie UINT_MAX if it's a varargs
+     * function and can accept an arbitrary number */
+    unsigned max_positional_args;
+    static constexpr unsigned UNBOUNDED = UINT_MAX; // FIXME c++17 inline
   };
 
-  PythonCallable();
-  PythonCallable(PyRefType type, PyObject *o);
-
-  ~PythonCallable() override;
-
   static bool Check(PyObject *py_obj);
 
-  // Bring in the no-argument base class version
-  using PythonObject::Reset;
-
-  void Reset(PyRefType type, PyObject *py_obj) override;
-
-  ArgInfo GetNumArguments() const;
+  llvm::Expected<ArgInfo> GetArgInfo() const;
 
   PythonObject operator()();
 
@@ -451,27 +639,123 @@
   }
 };
 
-class PythonFile : public PythonObject {
+class PythonFile : public TypedPythonObject<PythonFile> {
 public:
-  PythonFile();
-  PythonFile(File &file, const char *mode);
-  PythonFile(const char *path, const char *mode);
-  PythonFile(PyRefType type, PyObject *o);
+  using TypedPythonObject::TypedPythonObject;
 
-  ~PythonFile() override;
+  PythonFile() : TypedPythonObject() {} // MSVC requires this for some reason
 
   static bool Check(PyObject *py_obj);
 
-  using PythonObject::Reset;
+  static llvm::Expected<PythonFile> FromFile(File &file,
+                                             const char *mode = nullptr);
 
-  void Reset(PyRefType type, PyObject *py_obj) override;
-  void Reset(File &file, const char *mode);
-
-  static uint32_t GetOptionsFromMode(llvm::StringRef mode);
-
-  bool GetUnderlyingFile(File &file) const;
+  llvm::Expected<lldb::FileSP> ConvertToFile(bool borrowed = false);
+  llvm::Expected<lldb::FileSP>
+  ConvertToFileForcingUseOfScriptingIOMethods(bool borrowed = false);
 };
 
+class PythonException : public llvm::ErrorInfo<PythonException> {
+private:
+  PyObject *m_exception_type, *m_exception, *m_traceback;
+  PyObject *m_repr_bytes;
+
+public:
+  static char ID;
+  const char *toCString() const;
+  PythonException(const char *caller = nullptr);
+  void Restore();
+  ~PythonException();
+  void log(llvm::raw_ostream &OS) const override;
+  std::error_code convertToErrorCode() const override;
+  bool Matches(PyObject *exc) const;
+  std::string ReadBacktrace() const;
+};
+
+// This extracts the underlying T out of an Expected<T> and returns it.
+// If the Expected is an Error instead of a T, that error will be converted
+// into a python exception, and this will return a default-constructed T.
+//
+// This is appropriate for use right at the boundary of python calling into
+// C++, such as in a SWIG typemap.   In such a context you should simply
+// check if the returned T is valid, and if it is, return a NULL back
+// to python.   This will result in the Error being raised as an exception
+// from python code's point of view.
+//
+// For example:
+// ```
+// Expected<Foo *> efoop = some_cpp_function();
+// Foo *foop = unwrapOrSetPythonException(efoop);
+// if (!foop)
+//    return NULL;
+// do_something(*foop);
+//
+// If the Error returned was itself created because a python exception was
+// raised when C++ code called into python, then the original exception
+// will be restored.   Otherwise a simple string exception will be raised.
+template <typename T> T unwrapOrSetPythonException(llvm::Expected<T> expected) {
+  if (expected)
+    return expected.get();
+  llvm::handleAllErrors(
+      expected.takeError(), [](PythonException &E) { E.Restore(); },
+      [](const llvm::ErrorInfoBase &E) {
+        PyErr_SetString(PyExc_Exception, E.message().c_str());
+      });
+  return T();
+}
+
+// This is only here to help incrementally migrate old, exception-unsafe
+// code.
+template <typename T> T unwrapIgnoringErrors(llvm::Expected<T> expected) {
+  if (expected)
+    return std::move(expected.get());
+  llvm::consumeError(expected.takeError());
+  return T();
+}
+
+llvm::Expected<PythonObject> runStringOneLine(const llvm::Twine &string,
+                                              const PythonDictionary &globals,
+                                              const PythonDictionary &locals);
+
+llvm::Expected<PythonObject> runStringMultiLine(const llvm::Twine &string,
+                                                const PythonDictionary &globals,
+                                                const PythonDictionary &locals);
+
+// Sometimes the best way to interact with a python interpreter is
+// to run some python code.   You construct a PythonScript with
+// script string.   The script assigns some function to `_function_`
+// and you get a C++ callable object that calls the python function.
+//
+// Example:
+//
+// const char script[] = R"(
+// def main(x, y):
+//    ....
+// )";
+//
+// Expected<PythonObject> cpp_foo_wrapper(PythonObject x, PythonObject y) {
+//   // no need to synchronize access to this global, we already have the GIL
+//   static PythonScript foo(script)
+//   return  foo(x, y);
+// }
+class PythonScript {
+  const char *script;
+  PythonCallable function;
+
+  llvm::Error Init();
+
+public:
+  PythonScript(const char *script) : script(script), function() {}
+
+  template <typename... Args>
+  llvm::Expected<PythonObject> operator()(Args &&... args) {
+    if (llvm::Error error = Init())
+      return std::move(error);
+    return function.Call(std::forward<Args>(args)...);
+  }
+};
+
+} // namespace python
 } // namespace lldb_private
 
 #endif
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp
deleted file mode 100644
index c9d834c..0000000
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-//===-- PythonExceptionState.cpp --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_DISABLE_PYTHON
-
-// LLDB Python header must be included first
-#include "lldb-python.h"
-
-#include "PythonExceptionState.h"
-
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/raw_ostream.h"
-
-using namespace lldb_private;
-
-PythonExceptionState::PythonExceptionState(bool restore_on_exit)
-    : m_restore_on_exit(restore_on_exit) {
-  Acquire(restore_on_exit);
-}
-
-PythonExceptionState::~PythonExceptionState() {
-  if (m_restore_on_exit)
-    Restore();
-}
-
-void PythonExceptionState::Acquire(bool restore_on_exit) {
-  // If a state is already acquired, the user needs to decide whether they want
-  // to discard or restore it.  Don't allow the potential silent loss of a
-  // valid state.
-  assert(!IsError());
-
-  if (!HasErrorOccurred())
-    return;
-
-  PyObject *py_type = nullptr;
-  PyObject *py_value = nullptr;
-  PyObject *py_traceback = nullptr;
-  PyErr_Fetch(&py_type, &py_value, &py_traceback);
-  // PyErr_Fetch clears the error flag.
-  assert(!HasErrorOccurred());
-
-  // Ownership of the objects returned by `PyErr_Fetch` is transferred to us.
-  m_type.Reset(PyRefType::Owned, py_type);
-  m_value.Reset(PyRefType::Owned, py_value);
-  m_traceback.Reset(PyRefType::Owned, py_traceback);
-  m_restore_on_exit = restore_on_exit;
-}
-
-void PythonExceptionState::Restore() {
-  if (m_type.IsValid()) {
-    // The documentation for PyErr_Restore says "Do not pass a null type and
-    // non-null value or traceback.  So only restore if type was non-null to
-    // begin with.  In this case we're passing ownership back to Python so
-    // release them all.
-    PyErr_Restore(m_type.release(), m_value.release(), m_traceback.release());
-  }
-
-  // After we restore, we should not hold onto the exception state.  Demand
-  // that it be re-acquired.
-  Discard();
-}
-
-void PythonExceptionState::Discard() {
-  m_type.Reset();
-  m_value.Reset();
-  m_traceback.Reset();
-}
-
-void PythonExceptionState::Reset() {
-  if (m_restore_on_exit)
-    Restore();
-  else
-    Discard();
-}
-
-bool PythonExceptionState::HasErrorOccurred() { return PyErr_Occurred(); }
-
-bool PythonExceptionState::IsError() const {
-  return m_type.IsValid() || m_value.IsValid() || m_traceback.IsValid();
-}
-
-PythonObject PythonExceptionState::GetType() const { return m_type; }
-
-PythonObject PythonExceptionState::GetValue() const { return m_value; }
-
-PythonObject PythonExceptionState::GetTraceback() const { return m_traceback; }
-
-std::string PythonExceptionState::Format() const {
-  // Don't allow this function to modify the error state.
-  PythonExceptionState state(true);
-
-  std::string backtrace = ReadBacktrace();
-  if (!IsError())
-    return std::string();
-
-  // It's possible that ReadPythonBacktrace generated another exception. If
-  // this happens we have to clear the exception, because otherwise
-  // PyObject_Str() will assert below.  That's why we needed to do the save /
-  // restore at the beginning of this function.
-  PythonExceptionState bt_error_state(false);
-
-  std::string error_string;
-  llvm::raw_string_ostream error_stream(error_string);
-  error_stream << m_value.Str().GetString() << "\n";
-
-  if (!bt_error_state.IsError()) {
-    // If we were able to read the backtrace, just append it.
-    error_stream << backtrace << "\n";
-  } else {
-    // Otherwise, append some information about why we were unable to obtain
-    // the backtrace.
-    PythonString bt_error = bt_error_state.GetValue().Str();
-    error_stream << "An error occurred while retrieving the backtrace: "
-                 << bt_error.GetString() << "\n";
-  }
-  return error_stream.str();
-}
-
-std::string PythonExceptionState::ReadBacktrace() const {
-  std::string retval("backtrace unavailable");
-
-  auto traceback_module = PythonModule::ImportModule("traceback");
-#if PY_MAJOR_VERSION >= 3
-  auto stringIO_module = PythonModule::ImportModule("io");
-#else
-  auto stringIO_module = PythonModule::ImportModule("StringIO");
-#endif
-  if (!m_traceback.IsAllocated())
-    return retval;
-
-  if (!traceback_module.IsAllocated() || !stringIO_module.IsAllocated())
-    return retval;
-
-  auto stringIO_builder =
-      stringIO_module.ResolveName<PythonCallable>("StringIO");
-  if (!stringIO_builder.IsAllocated())
-    return retval;
-
-  auto stringIO_buffer = stringIO_builder();
-  if (!stringIO_buffer.IsAllocated())
-    return retval;
-
-  auto printTB = traceback_module.ResolveName<PythonCallable>("print_tb");
-  if (!printTB.IsAllocated())
-    return retval;
-
-  auto printTB_result =
-      printTB(m_traceback.get(), Py_None, stringIO_buffer.get());
-  auto stringIO_getvalue =
-      stringIO_buffer.ResolveName<PythonCallable>("getvalue");
-  if (!stringIO_getvalue.IsAllocated())
-    return retval;
-
-  auto printTB_string = stringIO_getvalue().AsType<PythonString>();
-  if (!printTB_string.IsAllocated())
-    return retval;
-
-  llvm::StringRef string_data(printTB_string.GetString());
-  retval.assign(string_data.data(), string_data.size());
-
-  return retval;
-}
-
-#endif
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h
deleted file mode 100644
index 3a88aa0..0000000
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonExceptionState.h
+++ /dev/null
@@ -1,56 +0,0 @@
-//===-- PythonExceptionState.h ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONEXCEPTIONSTATE_H
-#define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONEXCEPTIONSTATE_H
-
-#ifndef LLDB_DISABLE_PYTHON
-
-#include "PythonDataObjects.h"
-
-namespace lldb_private {
-
-class PythonExceptionState {
-public:
-  explicit PythonExceptionState(bool restore_on_exit);
-  ~PythonExceptionState();
-
-  void Acquire(bool restore_on_exit);
-
-  void Restore();
-
-  void Discard();
-
-  void Reset();
-
-  static bool HasErrorOccurred();
-
-  bool IsError() const;
-
-  PythonObject GetType() const;
-
-  PythonObject GetValue() const;
-
-  PythonObject GetTraceback() const;
-
-  std::string Format() const;
-
-private:
-  std::string ReadBacktrace() const;
-
-  bool m_restore_on_exit;
-
-  PythonObject m_type;
-  PythonObject m_value;
-  PythonObject m_traceback;
-};
-}
-
-#endif
-
-#endif
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
index 674ec9b..5f6429f 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp
@@ -67,7 +67,7 @@
   char *ret = (char *)PyMem_Malloc(n + 2);
 #endif
   if (ret) {
-    strncpy(ret, line, n);
+    memcpy(ret, line, n);
     free(line);
     ret[n] = '\n';
     ret[n + 1] = '\0';
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
index faf95bb..c75219e 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.h
@@ -9,7 +9,9 @@
 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONREADLINE_H
 
-#if !defined(LLDB_DISABLE_LIBEDIT) && defined(__linux__)
+#include "lldb/Host/Config.h"
+
+#if LLDB_ENABLE_LIBEDIT && defined(__linux__)
 // NOTE: Since Python may define some pre-processor definitions which affect the
 // standard headers on some systems, you must include Python.h before any
 // standard headers are included.
@@ -19,7 +21,7 @@
 //
 #define LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE 1
 
-extern "C" PyMODINIT_FUNC initlldb_readline(void);
+PyMODINIT_FUNC initlldb_readline(void);
 
 #endif
 
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
index e470dfe..06e0d5b 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
@@ -6,17 +6,14 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifdef LLDB_DISABLE_PYTHON
+#include "lldb/Host/Config.h"
 
-// Python is disabled in this build
-
-#else
+#if LLDB_ENABLE_PYTHON
 
 // LLDB Python header must be included first
 #include "lldb-python.h"
 
 #include "PythonDataObjects.h"
-#include "PythonExceptionState.h"
 #include "PythonReadline.h"
 #include "ScriptInterpreterPythonImpl.h"
 
@@ -46,6 +43,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/FileSystem.h"
+#include "llvm/Support/FormatAdapters.h"
 
 #include <memory>
 #include <mutex>
@@ -55,6 +53,8 @@
 
 using namespace lldb;
 using namespace lldb_private;
+using namespace lldb_private::python;
+using llvm::Expected;
 
 // Defined in the SWIG source file
 #if PY_MAJOR_VERSION >= 3
@@ -71,10 +71,28 @@
 // These prototypes are the Pythonic implementations of the required callbacks.
 // Although these are scripting-language specific, their definition depends on
 // the public API.
-extern "C" bool LLDBSwigPythonBreakpointCallbackFunction(
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
+
+// Disable warning C4190: 'LLDBSwigPythonBreakpointCallbackFunction' has
+// C-linkage specified, but returns UDT 'llvm::Expected<bool>' which is
+// incompatible with C
+#if _MSC_VER
+#pragma warning (push)
+#pragma warning (disable : 4190)
+#endif
+
+extern "C" llvm::Expected<bool> LLDBSwigPythonBreakpointCallbackFunction(
     const char *python_function_name, const char *session_dictionary_name,
     const lldb::StackFrameSP &sb_frame,
-    const lldb::BreakpointLocationSP &sb_bp_loc);
+    const lldb::BreakpointLocationSP &sb_bp_loc, StructuredDataImpl *args_impl);
+
+#if _MSC_VER
+#pragma warning (pop)
+#endif
+
+#pragma clang diagnostic pop
 
 extern "C" bool LLDBSwigPythonWatchpointCallbackFunction(
     const char *python_function_name, const char *session_dictionary_name,
@@ -97,6 +115,8 @@
 
 extern "C" void *LLDBSwigPythonCreateScriptedThreadPlan(
     const char *python_class_name, const char *session_dictionary_name,
+    StructuredDataImpl *args_data,
+    std::string &error_string,
     const lldb::ThreadPlanSP &thread_plan_sp);
 
 extern "C" bool LLDBSWIGPythonCallThreadPlan(void *implementor,
@@ -319,39 +339,26 @@
   auto rend = llvm::sys::path::rend(path_ref);
   auto framework = std::find(rbegin, rend, "LLDB.framework");
   if (framework == rend) {
-    ComputePythonDirForPosix(path);
+    ComputePythonDir(path);
     return;
   }
   path.resize(framework - rend);
   llvm::sys::path::append(path, style, "LLDB.framework", "Resources", "Python");
 }
 
-void ScriptInterpreterPython::ComputePythonDirForPosix(
+void ScriptInterpreterPython::ComputePythonDir(
     llvm::SmallVectorImpl<char> &path) {
-  auto style = llvm::sys::path::Style::posix;
-#if defined(LLDB_PYTHON_RELATIVE_LIBDIR)
   // Build the path by backing out of the lib dir, then building with whatever
   // the real python interpreter uses.  (e.g. lib for most, lib64 on RHEL
-  // x86_64).
-  llvm::sys::path::remove_filename(path, style);
-  llvm::sys::path::append(path, style, LLDB_PYTHON_RELATIVE_LIBDIR);
-#else
-  llvm::sys::path::append(path, style,
-                          "python" + llvm::Twine(PY_MAJOR_VERSION) + "." +
-                              llvm::Twine(PY_MINOR_VERSION),
-                          "site-packages");
-#endif
-}
+  // x86_64, or bin on Windows).
+  llvm::sys::path::remove_filename(path);
+  llvm::sys::path::append(path, LLDB_PYTHON_RELATIVE_LIBDIR);
 
-void ScriptInterpreterPython::ComputePythonDirForWindows(
-    llvm::SmallVectorImpl<char> &path) {
-  auto style = llvm::sys::path::Style::windows;
-  llvm::sys::path::remove_filename(path, style);
-  llvm::sys::path::append(path, style, "lib", "site-packages");
-
+#if defined(_WIN32)
   // This will be injected directly through FileSpec.GetDirectory().SetString(),
   // so we need to normalize manually.
   std::replace(path.begin(), path.end(), '\\', '/');
+#endif
 }
 
 FileSpec ScriptInterpreterPython::GetPythonDir() {
@@ -364,10 +371,8 @@
 
 #if defined(__APPLE__)
     ComputePythonDirForApple(path);
-#elif defined(_WIN32)
-    ComputePythonDirForWindows(path);
 #else
-    ComputePythonDirForPosix(path);
+    ComputePythonDir(path);
 #endif
     spec.GetDirectory().SetString(path);
     return spec;
@@ -399,7 +404,7 @@
 
 ScriptInterpreterPythonImpl::Locker::Locker(
     ScriptInterpreterPythonImpl *py_interpreter, uint16_t on_entry,
-    uint16_t on_leave, FILE *in, FILE *out, FILE *err)
+    uint16_t on_leave, FileSP in, FileSP out, FileSP err)
     : ScriptInterpreterLocker(),
       m_teardown_session((on_leave & TearDownSession) == TearDownSession),
       m_python_interpreter(py_interpreter) {
@@ -429,8 +434,8 @@
 }
 
 bool ScriptInterpreterPythonImpl::Locker::DoInitSession(uint16_t on_entry_flags,
-                                                        FILE *in, FILE *out,
-                                                        FILE *err) {
+                                                        FileSP in, FileSP out,
+                                                        FileSP err) {
   if (!m_python_interpreter)
     return false;
   return m_python_interpreter->EnterSession(on_entry_flags, in, out, err);
@@ -465,9 +470,9 @@
       m_sys_module_dict(PyInitialValue::Invalid), m_run_one_line_function(),
       m_run_one_line_str_global(),
       m_dictionary_name(m_debugger.GetInstanceName().AsCString()),
-      m_terminal_state(), m_active_io_handler(eIOHandlerNone),
-      m_session_is_active(false), m_pty_slave_is_open(false),
-      m_valid_session(true), m_lock_count(0), m_command_thread_state(nullptr) {
+      m_active_io_handler(eIOHandlerNone), m_session_is_active(false),
+      m_pty_slave_is_open(false), m_valid_session(true), m_lock_count(0),
+      m_command_thread_state(nullptr) {
   InitializePrivate();
 
   m_dictionary_name.append("_dict");
@@ -552,7 +557,7 @@
   }
 
   if (instructions) {
-    StreamFileSP output_sp(io_handler.GetOutputStreamFile());
+    StreamFileSP output_sp(io_handler.GetOutputStreamFileSP());
     if (output_sp && interactive) {
       output_sp->PutCString(instructions);
       output_sp->Flush();
@@ -575,20 +580,22 @@
       if (!bp_options)
         continue;
 
-      auto data_up = llvm::make_unique<CommandDataPython>();
+      auto data_up = std::make_unique<CommandDataPython>();
       if (!data_up)
         break;
       data_up->user_source.SplitIntoLines(data);
 
+      StructuredData::ObjectSP empty_args_sp;
       if (GenerateBreakpointCommandCallbackData(data_up->user_source,
-                                                data_up->script_source)
+                                                data_up->script_source,
+                                                false)
               .Success()) {
         auto baton_sp = std::make_shared<BreakpointOptions::CommandBaton>(
             std::move(data_up));
         bp_options->SetCallback(
             ScriptInterpreterPythonImpl::BreakpointCallbackFunction, baton_sp);
       } else if (!batch_mode) {
-        StreamFileSP error_sp = io_handler.GetErrorStreamFile();
+        StreamFileSP error_sp = io_handler.GetErrorStreamFileSP();
         if (error_sp) {
           error_sp->Printf("Warning: No command attached to breakpoint.\n");
           error_sp->Flush();
@@ -600,7 +607,7 @@
   case eIOHandlerWatchpoint: {
     WatchpointOptions *wp_options =
         (WatchpointOptions *)io_handler.GetUserData();
-    auto data_up = llvm::make_unique<WatchpointOptions::CommandData>();
+    auto data_up = std::make_unique<WatchpointOptions::CommandData>();
     data_up->user_source.SplitIntoLines(data);
 
     if (GenerateWatchpointCommandCallbackData(data_up->user_source,
@@ -610,7 +617,7 @@
       wp_options->SetCallback(
           ScriptInterpreterPythonImpl::WatchpointCallbackFunction, baton_sp);
     } else if (!batch_mode) {
-      StreamFileSP error_sp = io_handler.GetErrorStreamFile();
+      StreamFileSP error_sp = io_handler.GetErrorStreamFileSP();
       if (error_sp) {
         error_sp->Printf("Warning: No command attached to breakpoint.\n");
         error_sp->Flush();
@@ -626,29 +633,15 @@
   return std::make_shared<ScriptInterpreterPythonImpl>(debugger);
 }
 
-void ScriptInterpreterPythonImpl::ResetOutputFileHandle(FILE *fh) {}
-
-void ScriptInterpreterPythonImpl::SaveTerminalState(int fd) {
-  // Python mucks with the terminal state of STDIN. If we can possibly avoid
-  // this by setting the file handles up correctly prior to entering the
-  // interpreter we should. For now we save and restore the terminal state on
-  // the input file handle.
-  m_terminal_state.Save(fd, false);
-}
-
-void ScriptInterpreterPythonImpl::RestoreTerminalState() {
-  // Python mucks with the terminal state of STDIN. If we can possibly avoid
-  // this by setting the file handles up correctly prior to entering the
-  // interpreter we should. For now we save and restore the terminal state on
-  // the input file handle.
-  m_terminal_state.Restore();
-}
-
 void ScriptInterpreterPythonImpl::LeaveSession() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT));
   if (log)
     log->PutCString("ScriptInterpreterPythonImpl::LeaveSession()");
 
+  // Unset the LLDB global variables.
+  PyRun_SimpleString("lldb.debugger = None; lldb.target = None; lldb.process "
+                     "= None; lldb.thread = None; lldb.frame = None");
+
   // checking that we have a valid thread state - since we use our own
   // threading and locking in some (rare) cases during cleanup Python may end
   // up believing we have no thread state and PyImport_AddModule will crash if
@@ -679,45 +672,52 @@
   m_session_is_active = false;
 }
 
-bool ScriptInterpreterPythonImpl::SetStdHandle(File &file, const char *py_name,
-                                               PythonFile &save_file,
+bool ScriptInterpreterPythonImpl::SetStdHandle(FileSP file_sp,
+                                               const char *py_name,
+                                               PythonObject &save_file,
                                                const char *mode) {
-  if (file.IsValid()) {
-    // Flush the file before giving it to python to avoid interleaved output.
-    file.Flush();
-
-    PythonDictionary &sys_module_dict = GetSysModuleDictionary();
-
-    save_file = sys_module_dict.GetItemForKey(PythonString(py_name))
-                    .AsType<PythonFile>();
-
-    PythonFile new_file(file, mode);
-    sys_module_dict.SetItemForKey(PythonString(py_name), new_file);
-    return true;
-  } else
+  if (!file_sp || !*file_sp) {
     save_file.Reset();
-  return false;
+    return false;
+  }
+  File &file = *file_sp;
+
+  // Flush the file before giving it to python to avoid interleaved output.
+  file.Flush();
+
+  PythonDictionary &sys_module_dict = GetSysModuleDictionary();
+
+  auto new_file = PythonFile::FromFile(file, mode);
+  if (!new_file) {
+    llvm::consumeError(new_file.takeError());
+    return false;
+  }
+
+  save_file = sys_module_dict.GetItemForKey(PythonString(py_name));
+
+  sys_module_dict.SetItemForKey(PythonString(py_name), new_file.get());
+  return true;
 }
 
 bool ScriptInterpreterPythonImpl::EnterSession(uint16_t on_entry_flags,
-                                               FILE *in, FILE *out, FILE *err) {
+                                               FileSP in_sp, FileSP out_sp,
+                                               FileSP err_sp) {
   // If we have already entered the session, without having officially 'left'
   // it, then there is no need to 'enter' it again.
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SCRIPT));
   if (m_session_is_active) {
-    if (log)
-      log->Printf(
-          "ScriptInterpreterPythonImpl::EnterSession(on_entry_flags=0x%" PRIx16
-          ") session is already active, returning without doing anything",
-          on_entry_flags);
+    LLDB_LOGF(
+        log,
+        "ScriptInterpreterPythonImpl::EnterSession(on_entry_flags=0x%" PRIx16
+        ") session is already active, returning without doing anything",
+        on_entry_flags);
     return false;
   }
 
-  if (log)
-    log->Printf(
-        "ScriptInterpreterPythonImpl::EnterSession(on_entry_flags=0x%" PRIx16
-        ")",
-        on_entry_flags);
+  LLDB_LOGF(
+      log,
+      "ScriptInterpreterPythonImpl::EnterSession(on_entry_flags=0x%" PRIx16 ")",
+      on_entry_flags);
 
   m_session_is_active = true;
 
@@ -750,33 +750,29 @@
 
   PythonDictionary &sys_module_dict = GetSysModuleDictionary();
   if (sys_module_dict.IsValid()) {
-    File in_file(in, false);
-    File out_file(out, false);
-    File err_file(err, false);
-
-    lldb::StreamFileSP in_sp;
-    lldb::StreamFileSP out_sp;
-    lldb::StreamFileSP err_sp;
-    if (!in_file.IsValid() || !out_file.IsValid() || !err_file.IsValid())
-      m_debugger.AdoptTopIOHandlerFilesIfInvalid(in_sp, out_sp, err_sp);
+    lldb::FileSP top_in_sp;
+    lldb::StreamFileSP top_out_sp, top_err_sp;
+    if (!in_sp || !out_sp || !err_sp || !*in_sp || !*out_sp || !*err_sp)
+      m_debugger.AdoptTopIOHandlerFilesIfInvalid(top_in_sp, top_out_sp,
+                                                 top_err_sp);
 
     if (on_entry_flags & Locker::NoSTDIN) {
       m_saved_stdin.Reset();
     } else {
-      if (!SetStdHandle(in_file, "stdin", m_saved_stdin, "r")) {
-        if (in_sp)
-          SetStdHandle(in_sp->GetFile(), "stdin", m_saved_stdin, "r");
+      if (!SetStdHandle(in_sp, "stdin", m_saved_stdin, "r")) {
+        if (top_in_sp)
+          SetStdHandle(top_in_sp, "stdin", m_saved_stdin, "r");
       }
     }
 
-    if (!SetStdHandle(out_file, "stdout", m_saved_stdout, "w")) {
-      if (out_sp)
-        SetStdHandle(out_sp->GetFile(), "stdout", m_saved_stdout, "w");
+    if (!SetStdHandle(out_sp, "stdout", m_saved_stdout, "w")) {
+      if (top_out_sp)
+        SetStdHandle(top_out_sp->GetFileSP(), "stdout", m_saved_stdout, "w");
     }
 
-    if (!SetStdHandle(err_file, "stderr", m_saved_stderr, "w")) {
-      if (err_sp)
-        SetStdHandle(err_sp->GetFile(), "stderr", m_saved_stderr, "w");
+    if (!SetStdHandle(err_sp, "stderr", m_saved_stderr, "w")) {
+      if (top_err_sp)
+        SetStdHandle(top_err_sp->GetFileSP(), "stderr", m_saved_stderr, "w");
     }
   }
 
@@ -786,9 +782,9 @@
   return true;
 }
 
-PythonObject &ScriptInterpreterPythonImpl::GetMainModule() {
+PythonModule &ScriptInterpreterPythonImpl::GetMainModule() {
   if (!m_main_module.IsValid())
-    m_main_module.Reset(PyRefType::Borrowed, PyImport_AddModule("__main__"));
+    m_main_module = unwrapIgnoringErrors(PythonModule::Import("__main__"));
   return m_main_module;
 }
 
@@ -805,22 +801,45 @@
   if (!main_dict.IsValid())
     return m_session_dict;
 
-  PythonObject item = main_dict.GetItemForKey(PythonString(m_dictionary_name));
-  m_session_dict.Reset(PyRefType::Borrowed, item.get());
+  m_session_dict = unwrapIgnoringErrors(
+      As<PythonDictionary>(main_dict.GetItem(m_dictionary_name)));
   return m_session_dict;
 }
 
 PythonDictionary &ScriptInterpreterPythonImpl::GetSysModuleDictionary() {
   if (m_sys_module_dict.IsValid())
     return m_sys_module_dict;
-
-  PythonObject sys_module(PyRefType::Borrowed, PyImport_AddModule("sys"));
-  if (sys_module.IsValid())
-    m_sys_module_dict.Reset(PyRefType::Borrowed,
-                            PyModule_GetDict(sys_module.get()));
+  PythonModule sys_module = unwrapIgnoringErrors(PythonModule::Import("sys"));
+  m_sys_module_dict = sys_module.GetDictionary();
   return m_sys_module_dict;
 }
 
+llvm::Expected<unsigned>
+ScriptInterpreterPythonImpl::GetMaxPositionalArgumentsForCallable(
+    const llvm::StringRef &callable_name) {
+  if (callable_name.empty()) {
+    return llvm::createStringError(
+        llvm::inconvertibleErrorCode(),
+        "called with empty callable name.");
+  }
+  Locker py_lock(this, Locker::AcquireLock |
+                 Locker::InitSession |
+                 Locker::NoSTDIN);
+  auto dict = PythonModule::MainModule()
+      .ResolveName<PythonDictionary>(m_dictionary_name);
+  auto pfunc = PythonObject::ResolveNameWithDictionary<PythonCallable>(
+      callable_name, dict);
+  if (!pfunc.IsAllocated()) {
+    return llvm::createStringError(
+        llvm::inconvertibleErrorCode(),
+        "can't find callable: %s", callable_name.str().c_str());
+  }
+  llvm::Expected<PythonCallable::ArgInfo> arg_info = pfunc.GetArgInfo();
+  if (!arg_info)
+    return arg_info.takeError();
+  return arg_info.get().max_positional_args;
+}
+
 static std::string GenerateUniqueName(const char *base_name_wanted,
                                       uint32_t &functions_counter,
                                       const void *name_token = nullptr) {
@@ -884,7 +903,7 @@
     // directly down to Python.
     Debugger &debugger = m_debugger;
 
-    StreamFileSP input_file_sp;
+    FileSP input_file_sp;
     StreamFileSP output_file_sp;
     StreamFileSP error_file_sp;
     Communication output_comm(
@@ -892,7 +911,7 @@
     bool join_read_thread = false;
     if (options.GetEnableIO()) {
       if (result) {
-        input_file_sp = debugger.GetInputFile();
+        input_file_sp = debugger.GetInputFileSP();
         // Set output to a temporary file so we can forward the results on to
         // the result object
 
@@ -923,9 +942,9 @@
               ::setbuf(outfile_handle, nullptr);
 
             result->SetImmediateOutputFile(
-                debugger.GetOutputFile()->GetFile().GetStream());
+                debugger.GetOutputStream().GetFileSP());
             result->SetImmediateErrorFile(
-                debugger.GetErrorFile()->GetFile().GetStream());
+                debugger.GetErrorStream().GetFileSP());
           }
         }
       }
@@ -933,22 +952,26 @@
         debugger.AdoptTopIOHandlerFilesIfInvalid(input_file_sp, output_file_sp,
                                                  error_file_sp);
     } else {
-      input_file_sp = std::make_shared<StreamFile>();
-      FileSystem::Instance().Open(input_file_sp->GetFile(),
+      auto nullin = FileSystem::Instance().Open(
                                   FileSpec(FileSystem::DEV_NULL),
                                   File::eOpenOptionRead);
-
-      output_file_sp = std::make_shared<StreamFile>();
-      FileSystem::Instance().Open(output_file_sp->GetFile(),
+      auto nullout = FileSystem::Instance().Open(
                                   FileSpec(FileSystem::DEV_NULL),
                                   File::eOpenOptionWrite);
-
-      error_file_sp = output_file_sp;
+      if (!nullin) {
+        result->AppendErrorWithFormatv("failed to open /dev/null: {0}\n",
+                                       llvm::fmt_consume(nullin.takeError()));
+        return false;
+      }
+      if (!nullout) {
+        result->AppendErrorWithFormatv("failed to open /dev/null: {0}\n",
+                                       llvm::fmt_consume(nullout.takeError()));
+        return false;
+      }
+      input_file_sp = std::move(nullin.get());
+      error_file_sp = output_file_sp = std::make_shared<StreamFile>(std::move(nullout.get()));
     }
 
-    FILE *in_file = input_file_sp->GetFile().GetStream();
-    FILE *out_file = output_file_sp->GetFile().GetStream();
-    FILE *err_file = error_file_sp->GetFile().GetStream();
     bool success = false;
     {
       // WARNING!  It's imperative that this RAII scope be as tight as
@@ -964,8 +987,8 @@
           Locker::AcquireLock | Locker::InitSession |
               (options.GetSetLLDBGlobals() ? Locker::InitGlobals : 0) |
               ((result && result->GetInteractive()) ? 0 : Locker::NoSTDIN),
-          Locker::FreeAcquiredLock | Locker::TearDownSession, in_file, out_file,
-          err_file);
+          Locker::FreeAcquiredLock | Locker::TearDownSession, input_file_sp,
+          output_file_sp->GetFileSP(), error_file_sp->GetFileSP());
 
       // Find the correct script interpreter dictionary in the main module.
       PythonDictionary &session_dict = GetSessionDictionary();
@@ -992,9 +1015,8 @@
       }
 
       // Flush our output and error file handles
-      ::fflush(out_file);
-      if (out_file != err_file)
-        ::fflush(err_file);
+      output_file_sp->Flush();
+      error_file_sp->Flush();
     }
 
     if (join_read_thread) {
@@ -1037,7 +1059,7 @@
   // a running interpreter loop inside the already running Python interpreter
   // loop, so we won't do it.
 
-  if (!debugger.GetInputFile()->GetFile().IsValid())
+  if (!debugger.GetInputFile().IsValid())
     return;
 
   IOHandlerSP io_handler_sp(new IOHandlerPythonInterpreter(debugger, this));
@@ -1057,19 +1079,19 @@
       long tid = state->thread_id;
       PyThreadState_Swap(state);
       int num_threads = PyThreadState_SetAsyncExc(tid, PyExc_KeyboardInterrupt);
-      if (log)
-        log->Printf("ScriptInterpreterPythonImpl::Interrupt() sending "
-                    "PyExc_KeyboardInterrupt (tid = %li, num_threads = %i)...",
-                    tid, num_threads);
+      LLDB_LOGF(log,
+                "ScriptInterpreterPythonImpl::Interrupt() sending "
+                "PyExc_KeyboardInterrupt (tid = %li, num_threads = %i)...",
+                tid, num_threads);
       return true;
     }
   }
-  if (log)
-    log->Printf(
-        "ScriptInterpreterPythonImpl::Interrupt() python code not running, "
-        "can't interrupt");
+  LLDB_LOGF(log,
+            "ScriptInterpreterPythonImpl::Interrupt() python code not running, "
+            "can't interrupt");
   return false;
 }
+
 bool ScriptInterpreterPythonImpl::ExecuteOneLineWithReturn(
     llvm::StringRef in_string, ScriptInterpreter::ScriptReturnType return_type,
     void *ret_value, const ExecuteScriptOptions &options) {
@@ -1080,152 +1102,112 @@
                     Locker::NoSTDIN,
                 Locker::FreeAcquiredLock | Locker::TearDownSession);
 
-  PythonObject py_return;
-  PythonObject &main_module = GetMainModule();
-  PythonDictionary globals(PyRefType::Borrowed,
-                           PyModule_GetDict(main_module.get()));
-  PythonObject py_error;
-  bool ret_success = false;
-  int success;
+  PythonModule &main_module = GetMainModule();
+  PythonDictionary globals = main_module.GetDictionary();
 
   PythonDictionary locals = GetSessionDictionary();
-
-  if (!locals.IsValid()) {
-    locals.Reset(
-        PyRefType::Owned,
-        PyObject_GetAttrString(globals.get(), m_dictionary_name.c_str()));
-  }
-
+  if (!locals.IsValid())
+    locals = unwrapIgnoringErrors(
+        As<PythonDictionary>(globals.GetAttribute(m_dictionary_name)));
   if (!locals.IsValid())
     locals = globals;
 
-  py_error.Reset(PyRefType::Borrowed, PyErr_Occurred());
-  if (py_error.IsValid())
-    PyErr_Clear();
+  Expected<PythonObject> maybe_py_return =
+      runStringOneLine(in_string, globals, locals);
 
-  std::string as_string = in_string.str();
-  { // scope for PythonInputReaderManager
-    // PythonInputReaderManager py_input(options.GetEnableIO() ? this : NULL);
-    py_return.Reset(PyRefType::Owned,
-                    PyRun_String(as_string.c_str(), Py_eval_input,
-                                 globals.get(), locals.get()));
-    if (!py_return.IsValid()) {
-      py_error.Reset(PyRefType::Borrowed, PyErr_Occurred());
-      if (py_error.IsValid())
-        PyErr_Clear();
-
-      py_return.Reset(PyRefType::Owned,
-                      PyRun_String(as_string.c_str(), Py_single_input,
-                                   globals.get(), locals.get()));
-    }
+  if (!maybe_py_return) {
+    llvm::handleAllErrors(
+        maybe_py_return.takeError(),
+        [&](PythonException &E) {
+          E.Restore();
+          if (options.GetMaskoutErrors()) {
+            if (E.Matches(PyExc_SyntaxError)) {
+              PyErr_Print();
+            }
+            PyErr_Clear();
+          }
+        },
+        [](const llvm::ErrorInfoBase &E) {});
+    return false;
   }
 
-  if (py_return.IsValid()) {
-    switch (return_type) {
-    case eScriptReturnTypeCharPtr: // "char *"
-    {
-      const char format[3] = "s#";
-      success = PyArg_Parse(py_return.get(), format, (char **)ret_value);
-      break;
-    }
-    case eScriptReturnTypeCharStrOrNone: // char* or NULL if py_return ==
-                                         // Py_None
-    {
-      const char format[3] = "z";
-      success = PyArg_Parse(py_return.get(), format, (char **)ret_value);
-      break;
-    }
-    case eScriptReturnTypeBool: {
-      const char format[2] = "b";
-      success = PyArg_Parse(py_return.get(), format, (bool *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeShortInt: {
-      const char format[2] = "h";
-      success = PyArg_Parse(py_return.get(), format, (short *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeShortIntUnsigned: {
-      const char format[2] = "H";
-      success =
-          PyArg_Parse(py_return.get(), format, (unsigned short *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeInt: {
-      const char format[2] = "i";
-      success = PyArg_Parse(py_return.get(), format, (int *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeIntUnsigned: {
-      const char format[2] = "I";
-      success = PyArg_Parse(py_return.get(), format, (unsigned int *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeLongInt: {
-      const char format[2] = "l";
-      success = PyArg_Parse(py_return.get(), format, (long *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeLongIntUnsigned: {
-      const char format[2] = "k";
-      success =
-          PyArg_Parse(py_return.get(), format, (unsigned long *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeLongLong: {
-      const char format[2] = "L";
-      success = PyArg_Parse(py_return.get(), format, (long long *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeLongLongUnsigned: {
-      const char format[2] = "K";
-      success =
-          PyArg_Parse(py_return.get(), format, (unsigned long long *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeFloat: {
-      const char format[2] = "f";
-      success = PyArg_Parse(py_return.get(), format, (float *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeDouble: {
-      const char format[2] = "d";
-      success = PyArg_Parse(py_return.get(), format, (double *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeChar: {
-      const char format[2] = "c";
-      success = PyArg_Parse(py_return.get(), format, (char *)ret_value);
-      break;
-    }
-    case eScriptReturnTypeOpaqueObject: {
-      success = true;
-      PyObject *saved_value = py_return.get();
-      Py_XINCREF(saved_value);
-      *((PyObject **)ret_value) = saved_value;
-      break;
-    }
-    }
+  PythonObject py_return = std::move(maybe_py_return.get());
+  assert(py_return.IsValid());
 
-    ret_success = success;
+  switch (return_type) {
+  case eScriptReturnTypeCharPtr: // "char *"
+  {
+    const char format[3] = "s#";
+    return PyArg_Parse(py_return.get(), format, (char **)ret_value);
   }
-
-  py_error.Reset(PyRefType::Borrowed, PyErr_Occurred());
-  if (py_error.IsValid()) {
-    ret_success = false;
-    if (options.GetMaskoutErrors()) {
-      if (PyErr_GivenExceptionMatches(py_error.get(), PyExc_SyntaxError))
-        PyErr_Print();
-      PyErr_Clear();
-    }
+  case eScriptReturnTypeCharStrOrNone: // char* or NULL if py_return ==
+                                       // Py_None
+  {
+    const char format[3] = "z";
+    return PyArg_Parse(py_return.get(), format, (char **)ret_value);
   }
-
-  return ret_success;
+  case eScriptReturnTypeBool: {
+    const char format[2] = "b";
+    return PyArg_Parse(py_return.get(), format, (bool *)ret_value);
+  }
+  case eScriptReturnTypeShortInt: {
+    const char format[2] = "h";
+    return PyArg_Parse(py_return.get(), format, (short *)ret_value);
+  }
+  case eScriptReturnTypeShortIntUnsigned: {
+    const char format[2] = "H";
+    return PyArg_Parse(py_return.get(), format, (unsigned short *)ret_value);
+  }
+  case eScriptReturnTypeInt: {
+    const char format[2] = "i";
+    return PyArg_Parse(py_return.get(), format, (int *)ret_value);
+  }
+  case eScriptReturnTypeIntUnsigned: {
+    const char format[2] = "I";
+    return PyArg_Parse(py_return.get(), format, (unsigned int *)ret_value);
+  }
+  case eScriptReturnTypeLongInt: {
+    const char format[2] = "l";
+    return PyArg_Parse(py_return.get(), format, (long *)ret_value);
+  }
+  case eScriptReturnTypeLongIntUnsigned: {
+    const char format[2] = "k";
+    return PyArg_Parse(py_return.get(), format, (unsigned long *)ret_value);
+  }
+  case eScriptReturnTypeLongLong: {
+    const char format[2] = "L";
+    return PyArg_Parse(py_return.get(), format, (long long *)ret_value);
+  }
+  case eScriptReturnTypeLongLongUnsigned: {
+    const char format[2] = "K";
+    return PyArg_Parse(py_return.get(), format,
+                       (unsigned long long *)ret_value);
+  }
+  case eScriptReturnTypeFloat: {
+    const char format[2] = "f";
+    return PyArg_Parse(py_return.get(), format, (float *)ret_value);
+  }
+  case eScriptReturnTypeDouble: {
+    const char format[2] = "d";
+    return PyArg_Parse(py_return.get(), format, (double *)ret_value);
+  }
+  case eScriptReturnTypeChar: {
+    const char format[2] = "c";
+    return PyArg_Parse(py_return.get(), format, (char *)ret_value);
+  }
+  case eScriptReturnTypeOpaqueObject: {
+    *((PyObject **)ret_value) = py_return.release();
+    return true;
+  }
+  }
+  llvm_unreachable("Fully covered switch!");
 }
 
 Status ScriptInterpreterPythonImpl::ExecuteMultipleLines(
     const char *in_string, const ExecuteScriptOptions &options) {
-  Status error;
+
+  if (in_string == nullptr)
+    return Status();
 
   Locker locker(this,
                 Locker::AcquireLock | Locker::InitSession |
@@ -1233,52 +1215,32 @@
                     Locker::NoSTDIN,
                 Locker::FreeAcquiredLock | Locker::TearDownSession);
 
-  PythonObject return_value;
-  PythonObject &main_module = GetMainModule();
-  PythonDictionary globals(PyRefType::Borrowed,
-                           PyModule_GetDict(main_module.get()));
-  PythonObject py_error;
+  PythonModule &main_module = GetMainModule();
+  PythonDictionary globals = main_module.GetDictionary();
 
   PythonDictionary locals = GetSessionDictionary();
-
   if (!locals.IsValid())
-    locals.Reset(
-        PyRefType::Owned,
-        PyObject_GetAttrString(globals.get(), m_dictionary_name.c_str()));
-
+    locals = unwrapIgnoringErrors(
+        As<PythonDictionary>(globals.GetAttribute(m_dictionary_name)));
   if (!locals.IsValid())
     locals = globals;
 
-  py_error.Reset(PyRefType::Borrowed, PyErr_Occurred());
-  if (py_error.IsValid())
-    PyErr_Clear();
+  Expected<PythonObject> return_value =
+      runStringMultiLine(in_string, globals, locals);
 
-  if (in_string != nullptr) {
-    PythonObject code_object;
-    code_object.Reset(PyRefType::Owned,
-                      Py_CompileString(in_string, "temp.py", Py_file_input));
-
-    if (code_object.IsValid()) {
-// In Python 2.x, PyEval_EvalCode takes a PyCodeObject, but in Python 3.x, it
-// takes a PyObject.  They are convertible (hence the function
-// PyCode_Check(PyObject*), so we have to do the cast for Python 2.x
-#if PY_MAJOR_VERSION >= 3
-      PyObject *py_code_obj = code_object.get();
-#else
-      PyCodeObject *py_code_obj =
-          reinterpret_cast<PyCodeObject *>(code_object.get());
-#endif
-      return_value.Reset(
-          PyRefType::Owned,
-          PyEval_EvalCode(py_code_obj, globals.get(), locals.get()));
-    }
+  if (!return_value) {
+    llvm::Error error =
+        llvm::handleErrors(return_value.takeError(), [&](PythonException &E) {
+          llvm::Error error = llvm::createStringError(
+              llvm::inconvertibleErrorCode(), E.ReadBacktrace());
+          if (!options.GetMaskoutErrors())
+            E.Restore();
+          return error;
+        });
+    return Status(std::move(error));
   }
 
-  PythonExceptionState exception_state(!options.GetMaskoutErrors());
-  if (exception_state.IsError())
-    error.SetErrorString(exception_state.Format().c_str());
-
-  return error;
+  return Status();
 }
 
 void ScriptInterpreterPythonImpl::CollectDataForBreakpointCommandCallback(
@@ -1286,24 +1248,56 @@
     CommandReturnObject &result) {
   m_active_io_handler = eIOHandlerBreakpoint;
   m_debugger.GetCommandInterpreter().GetPythonCommandsFromIOHandler(
-      "    ", *this, true, &bp_options_vec);
+      "    ", *this, &bp_options_vec);
 }
 
 void ScriptInterpreterPythonImpl::CollectDataForWatchpointCommandCallback(
     WatchpointOptions *wp_options, CommandReturnObject &result) {
   m_active_io_handler = eIOHandlerWatchpoint;
   m_debugger.GetCommandInterpreter().GetPythonCommandsFromIOHandler(
-      "    ", *this, true, wp_options);
+      "    ", *this, wp_options);
 }
 
-void ScriptInterpreterPythonImpl::SetBreakpointCommandCallbackFunction(
-    BreakpointOptions *bp_options, const char *function_name) {
+Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallbackFunction(
+    BreakpointOptions *bp_options, const char *function_name,
+    StructuredData::ObjectSP extra_args_sp) {
+  Status error;
   // For now just cons up a oneliner that calls the provided function.
   std::string oneliner("return ");
   oneliner += function_name;
-  oneliner += "(frame, bp_loc, internal_dict)";
-  m_debugger.GetScriptInterpreter()->SetBreakpointCommandCallback(
-      bp_options, oneliner.c_str());
+
+  llvm::Expected<unsigned> maybe_args =
+      GetMaxPositionalArgumentsForCallable(function_name);
+  if (!maybe_args) {
+    error.SetErrorStringWithFormat(
+        "could not get num args: %s",
+        llvm::toString(maybe_args.takeError()).c_str());
+    return error;
+  }
+  size_t max_args = *maybe_args;
+
+  bool uses_extra_args = false;
+  if (max_args >= 4) {
+    uses_extra_args = true;
+    oneliner += "(frame, bp_loc, extra_args, internal_dict)";
+  } else if (max_args >= 3) {
+    if (extra_args_sp) {
+      error.SetErrorString("cannot pass extra_args to a three argument callback"
+                          );
+      return error;
+    }
+    uses_extra_args = false;
+    oneliner += "(frame, bp_loc, internal_dict)";
+  } else {
+    error.SetErrorStringWithFormat("expected 3 or 4 argument "
+                                   "function, %s can only take %zu",
+                                   function_name, max_args);
+    return error;
+  }
+
+  SetBreakpointCommandCallback(bp_options, oneliner.c_str(), extra_args_sp,
+                               uses_extra_args);
+  return error;
 }
 
 Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
@@ -1311,7 +1305,8 @@
     std::unique_ptr<BreakpointOptions::CommandData> &cmd_data_up) {
   Status error;
   error = GenerateBreakpointCommandCallbackData(cmd_data_up->user_source,
-                                                cmd_data_up->script_source);
+                                                cmd_data_up->script_source,
+                                                false);
   if (error.Fail()) {
     return error;
   }
@@ -1322,11 +1317,17 @@
   return error;
 }
 
-// Set a Python one-liner as the callback for the breakpoint.
 Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
     BreakpointOptions *bp_options, const char *command_body_text) {
-  auto data_up = llvm::make_unique<CommandDataPython>();
+  return SetBreakpointCommandCallback(bp_options, command_body_text, {},false);
+}
 
+// Set a Python one-liner as the callback for the breakpoint.
+Status ScriptInterpreterPythonImpl::SetBreakpointCommandCallback(
+    BreakpointOptions *bp_options, const char *command_body_text,
+    StructuredData::ObjectSP extra_args_sp,
+    bool uses_extra_args) {
+  auto data_up = std::make_unique<CommandDataPython>(extra_args_sp);
   // Split the command_body_text into lines, and pass that to
   // GenerateBreakpointCommandCallbackData.  That will wrap the body in an
   // auto-generated function, and return the function name in script_source.
@@ -1334,7 +1335,8 @@
 
   data_up->user_source.SplitIntoLines(command_body_text);
   Status error = GenerateBreakpointCommandCallbackData(data_up->user_source,
-                                                       data_up->script_source);
+                                                       data_up->script_source,
+                                                       uses_extra_args);
   if (error.Success()) {
     auto baton_sp =
         std::make_shared<BreakpointOptions::CommandBaton>(std::move(data_up));
@@ -1348,7 +1350,7 @@
 // Set a Python one-liner as the callback for the watchpoint.
 void ScriptInterpreterPythonImpl::SetWatchpointCommandCallback(
     WatchpointOptions *wp_options, const char *oneliner) {
-  auto data_up = llvm::make_unique<WatchpointOptions::CommandData>();
+  auto data_up = std::make_unique<WatchpointOptions::CommandData>();
 
   // It's necessary to set both user_source and script_source to the oneliner.
   // The former is used to generate callback description (as in watchpoint
@@ -1870,12 +1872,13 @@
 }
 
 StructuredData::ObjectSP ScriptInterpreterPythonImpl::CreateScriptedThreadPlan(
-    const char *class_name, lldb::ThreadPlanSP thread_plan_sp) {
+    const char *class_name, StructuredDataImpl *args_data,
+    std::string &error_str, lldb::ThreadPlanSP thread_plan_sp) {
   if (class_name == nullptr || class_name[0] == '\0')
     return StructuredData::ObjectSP();
 
   if (!thread_plan_sp.get())
-    return StructuredData::ObjectSP();
+    return {};
 
   Debugger &debugger = thread_plan_sp->GetTarget().GetDebugger();
   ScriptInterpreter *script_interpreter = debugger.GetScriptInterpreter();
@@ -1883,17 +1886,18 @@
       static_cast<ScriptInterpreterPythonImpl *>(script_interpreter);
 
   if (!script_interpreter)
-    return StructuredData::ObjectSP();
+    return {};
 
   void *ret_val;
 
   {
     Locker py_lock(this,
                    Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
-
     ret_val = LLDBSwigPythonCreateScriptedThreadPlan(
         class_name, python_interpreter->m_dictionary_name.c_str(),
-        thread_plan_sp);
+        args_data, error_str, thread_plan_sp);
+    if (!ret_val)
+      return {};
   }
 
   return StructuredData::ObjectSP(new StructuredPythonObject(ret_val));
@@ -2053,8 +2057,7 @@
 
   StructuredData::ObjectSP module_sp;
 
-  if (LoadScriptingModule(file_spec.GetPath().c_str(), true, true, error,
-                          &module_sp))
+  if (LoadScriptingModule(file_spec.GetPath().c_str(), true, error, &module_sp))
     return module_sp;
 
   return StructuredData::ObjectSP();
@@ -2069,15 +2072,22 @@
   if (!generic)
     return StructuredData::DictionarySP();
 
-  PythonObject reply_pyobj;
   Locker py_lock(this,
                  Locker::AcquireLock | Locker::InitSession | Locker::NoSTDIN);
   TargetSP target_sp(target->shared_from_this());
-  reply_pyobj.Reset(PyRefType::Owned,
-                    (PyObject *)LLDBSWIGPython_GetDynamicSetting(
-                        generic->GetValue(), setting_name, target_sp));
 
-  PythonDictionary py_dict(PyRefType::Borrowed, reply_pyobj.get());
+  auto setting = (PyObject *)LLDBSWIGPython_GetDynamicSetting(
+      generic->GetValue(), setting_name, target_sp);
+
+  if (!setting)
+    return StructuredData::DictionarySP();
+
+  PythonDictionary py_dict =
+      unwrapIgnoringErrors(As<PythonDictionary>(Take<PythonObject>(setting)));
+
+  if (!py_dict)
+    return StructuredData::DictionarySP();
+
   return py_dict.CreateStructuredDictionary();
 }
 
@@ -2153,7 +2163,8 @@
 }
 
 Status ScriptInterpreterPythonImpl::GenerateBreakpointCommandCallbackData(
-    StringList &user_input, std::string &output) {
+    StringList &user_input, std::string &output,
+    bool has_extra_args) {
   static uint32_t num_created_functions = 0;
   user_input.RemoveBlankLines();
   StreamString sstr;
@@ -2165,8 +2176,12 @@
 
   std::string auto_generated_function_name(GenerateUniqueName(
       "lldb_autogen_python_bp_callback_func_", num_created_functions));
-  sstr.Printf("def %s (frame, bp_loc, internal_dict):",
-              auto_generated_function_name.c_str());
+  if (has_extra_args)
+    sstr.Printf("def %s (frame, bp_loc, extra_args, internal_dict):",
+                auto_generated_function_name.c_str());
+  else
+    sstr.Printf("def %s (frame, bp_loc, internal_dict):",
+                auto_generated_function_name.c_str());
 
   error = GenerateFunction(sstr.GetData(), user_input);
   if (!error.Success())
@@ -2247,18 +2262,6 @@
   return ret_val;
 }
 
-void ScriptInterpreterPythonImpl::Clear() {
-  // Release any global variables that might have strong references to
-  // LLDB objects when clearing the python script interpreter.
-  Locker locker(this, Locker::AcquireLock, Locker::FreeAcquiredLock);
-
-  // This may be called as part of Py_Finalize.  In that case the modules are
-  // destroyed in random order and we can't guarantee that we can access these.
-  if (Py_IsInitialized())
-    PyRun_SimpleString("lldb.debugger = None; lldb.target = None; lldb.process "
-                       "= None; lldb.thread = None; lldb.frame = None");
-}
-
 bool ScriptInterpreterPythonImpl::BreakpointCallbackFunction(
     void *baton, StoppointCallbackContext *context, user_id_t break_id,
     user_id_t break_loc_id) {
@@ -2295,10 +2298,26 @@
           Locker py_lock(python_interpreter, Locker::AcquireLock |
                                                  Locker::InitSession |
                                                  Locker::NoSTDIN);
-          ret_val = LLDBSwigPythonBreakpointCallbackFunction(
-              python_function_name,
-              python_interpreter->m_dictionary_name.c_str(), stop_frame_sp,
-              bp_loc_sp);
+          Expected<bool> maybe_ret_val =
+              LLDBSwigPythonBreakpointCallbackFunction(
+                  python_function_name,
+                  python_interpreter->m_dictionary_name.c_str(), stop_frame_sp,
+                  bp_loc_sp, bp_option_data->m_extra_args_up.get());
+
+          if (!maybe_ret_val) {
+
+            llvm::handleAllErrors(
+                maybe_ret_val.takeError(),
+                [&](PythonException &E) {
+                  debugger.GetErrorStream() << E.ReadBacktrace();
+                },
+                [&](const llvm::ErrorInfoBase &E) {
+                  debugger.GetErrorStream() << E.message();
+                });
+
+          } else {
+            ret_val = maybe_ret_val.get();
+          }
         }
         return ret_val;
       }
@@ -2717,8 +2736,8 @@
 }
 
 bool ScriptInterpreterPythonImpl::LoadScriptingModule(
-    const char *pathname, bool can_reload, bool init_session,
-    lldb_private::Status &error, StructuredData::ObjectSP *module_sp) {
+    const char *pathname, bool init_session, lldb_private::Status &error,
+    StructuredData::ObjectSP *module_sp) {
   if (!pathname || !pathname[0]) {
     error.SetErrorString("invalid pathname");
     return false;
@@ -2818,11 +2837,6 @@
 
     bool was_imported = (was_imported_globally || was_imported_locally);
 
-    if (was_imported && !can_reload) {
-      error.SetErrorString("module already imported");
-      return false;
-    }
-
     // now actually do the import
     command_stream.Clear();
 
@@ -3273,4 +3287,4 @@
 //
 // void ScriptInterpreterPythonImpl::Terminate() { Py_Finalize (); }
 
-#endif // LLDB_DISABLE_PYTHON
+#endif
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
index 24941ec..e59fedb 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h
@@ -9,14 +9,13 @@
 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H
 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H
 
-#ifdef LLDB_DISABLE_PYTHON
+#include "lldb/Host/Config.h"
 
-// Python is disabled in this build
-
-#else
+#if LLDB_ENABLE_PYTHON
 
 #include "lldb/Breakpoint/BreakpointOptions.h"
 #include "lldb/Core/IOHandler.h"
+#include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Interpreter/ScriptInterpreter.h"
 #include "lldb/lldb-private.h"
 
@@ -34,6 +33,13 @@
     CommandDataPython() : BreakpointOptions::CommandData() {
       interpreter = lldb::eScriptLanguagePython;
     }
+    CommandDataPython(StructuredData::ObjectSP extra_args_sp) :
+        BreakpointOptions::CommandData(),
+        m_extra_args_up(new StructuredDataImpl()) {
+        interpreter = lldb::eScriptLanguagePython;
+        m_extra_args_up->SetObjectSP(extra_args_sp);
+    }
+    lldb::StructuredDataImplUP m_extra_args_up;
   };
 
   ScriptInterpreterPython(Debugger &debugger)
@@ -48,10 +54,9 @@
 
 protected:
   static void ComputePythonDirForApple(llvm::SmallVectorImpl<char> &path);
-  static void ComputePythonDirForPosix(llvm::SmallVectorImpl<char> &path);
-  static void ComputePythonDirForWindows(llvm::SmallVectorImpl<char> &path);
+  static void ComputePythonDir(llvm::SmallVectorImpl<char> &path);
 };
 } // namespace lldb_private
 
-#endif // LLDB_DISABLE_PYTHON
+#endif // LLDB_ENABLE_PYTHON
 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
index a9993c4..1fa198b0 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
@@ -6,11 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifdef LLDB_DISABLE_PYTHON
+#include "lldb/Host/Config.h"
 
-// Python is disabled in this build
-
-#else
+#if LLDB_ENABLE_PYTHON
 
 #include "lldb-python.h"
 
@@ -78,6 +76,8 @@
 
   StructuredData::ObjectSP
   CreateScriptedThreadPlan(const char *class_name,
+                           StructuredDataImpl *args_data,
+                           std::string &error_str,
                            lldb::ThreadPlanSP thread_plan) override;
 
   bool ScriptedThreadPlanExplainsStop(StructuredData::ObjectSP implementor_sp,
@@ -177,8 +177,10 @@
   Status GenerateFunction(const char *signature,
                           const StringList &input) override;
 
-  Status GenerateBreakpointCommandCallbackData(StringList &input,
-                                               std::string &output) override;
+  Status GenerateBreakpointCommandCallbackData(
+      StringList &input,
+      std::string &output,
+      bool has_extra_args) override;
 
   bool GenerateWatchpointCommandCallbackData(StringList &input,
                                              std::string &output) override;
@@ -188,8 +190,6 @@
                           const TypeSummaryOptions &options,
                           std::string &retval) override;
 
-  void Clear() override;
-
   bool GetDocumentationForItem(const char *item, std::string &dest) override;
 
   bool GetShortHelpForCommandObject(StructuredData::GenericSP cmd_obj_sp,
@@ -224,7 +224,7 @@
                               std::string &output, Status &error) override;
 
   bool
-  LoadScriptingModule(const char *filename, bool can_reload, bool init_session,
+  LoadScriptingModule(const char *filename, bool init_session,
                       lldb_private::Status &error,
                       StructuredData::ObjectSP *module_sp = nullptr) override;
 
@@ -244,20 +244,25 @@
   Status SetBreakpointCommandCallback(BreakpointOptions *bp_options,
                                       const char *callback_body) override;
 
-  void SetBreakpointCommandCallbackFunction(BreakpointOptions *bp_options,
-                                            const char *function_name) override;
+  Status SetBreakpointCommandCallbackFunction(
+      BreakpointOptions *bp_options,
+      const char *function_name,
+      StructuredData::ObjectSP extra_args_sp) override;
 
   /// This one is for deserialization:
   Status SetBreakpointCommandCallback(
       BreakpointOptions *bp_options,
       std::unique_ptr<BreakpointOptions::CommandData> &data_up) override;
 
+  Status SetBreakpointCommandCallback(BreakpointOptions *bp_options,
+                                      const char *command_body_text,
+                                      StructuredData::ObjectSP extra_args_sp,
+                                      bool uses_extra_args);
+
   /// Set a one-liner as the callback for the watchpoint.
   void SetWatchpointCommandCallback(WatchpointOptions *wp_options,
                                     const char *oneliner) override;
 
-  void ResetOutputFileHandle(FILE *new_fh) override;
-
   const char *GetDictionaryName() { return m_dictionary_name.c_str(); }
 
   PyThreadState *GetThreadState() { return m_command_thread_state; }
@@ -296,17 +301,19 @@
       TearDownSession = 0x0004
     };
 
-    Locker(ScriptInterpreterPythonImpl *py_interpreter = nullptr,
+    Locker(ScriptInterpreterPythonImpl *py_interpreter,
            uint16_t on_entry = AcquireLock | InitSession,
-           uint16_t on_leave = FreeLock | TearDownSession, FILE *in = nullptr,
-           FILE *out = nullptr, FILE *err = nullptr);
+           uint16_t on_leave = FreeLock | TearDownSession,
+           lldb::FileSP in = nullptr, lldb::FileSP out = nullptr,
+           lldb::FileSP err = nullptr);
 
     ~Locker() override;
 
   private:
     bool DoAcquireLock();
 
-    bool DoInitSession(uint16_t on_entry_flags, FILE *in, FILE *out, FILE *err);
+    bool DoInitSession(uint16_t on_entry_flags, lldb::FileSP in,
+                       lldb::FileSP out, lldb::FileSP err);
 
     bool DoFreeLock();
 
@@ -314,7 +321,6 @@
 
     bool m_teardown_session;
     ScriptInterpreterPythonImpl *m_python_interpreter;
-    //    	FILE*                    m_tmp_fh;
     PyGILState_STATE m_GILState;
   };
 
@@ -343,14 +349,11 @@
 
   static void AddToSysPath(AddLocation location, std::string path);
 
-  bool EnterSession(uint16_t on_entry_flags, FILE *in, FILE *out, FILE *err);
+  bool EnterSession(uint16_t on_entry_flags, lldb::FileSP in, lldb::FileSP out,
+                    lldb::FileSP err);
 
   void LeaveSession();
 
-  void SaveTerminalState(int fd);
-
-  void RestoreTerminalState();
-
   uint32_t IsExecutingPython() const { return m_lock_count > 0; }
 
   uint32_t IncrementLockCount() { return ++m_lock_count; }
@@ -367,27 +370,29 @@
     eIOHandlerWatchpoint
   };
 
-  PythonObject &GetMainModule();
+  python::PythonModule &GetMainModule();
 
-  PythonDictionary &GetSessionDictionary();
+  python::PythonDictionary &GetSessionDictionary();
 
-  PythonDictionary &GetSysModuleDictionary();
+  python::PythonDictionary &GetSysModuleDictionary();
+
+  llvm::Expected<unsigned> GetMaxPositionalArgumentsForCallable(
+      const llvm::StringRef &callable_name) override;
 
   bool GetEmbeddedInterpreterModuleObjects();
 
-  bool SetStdHandle(File &file, const char *py_name, PythonFile &save_file,
-                    const char *mode);
+  bool SetStdHandle(lldb::FileSP file, const char *py_name,
+                    python::PythonObject &save_file, const char *mode);
 
-  PythonFile m_saved_stdin;
-  PythonFile m_saved_stdout;
-  PythonFile m_saved_stderr;
-  PythonObject m_main_module;
-  PythonDictionary m_session_dict;
-  PythonDictionary m_sys_module_dict;
-  PythonObject m_run_one_line_function;
-  PythonObject m_run_one_line_str_global;
+  python::PythonObject m_saved_stdin;
+  python::PythonObject m_saved_stdout;
+  python::PythonObject m_saved_stderr;
+  python::PythonModule m_main_module;
+  python::PythonDictionary m_session_dict;
+  python::PythonDictionary m_sys_module_dict;
+  python::PythonObject m_run_one_line_function;
+  python::PythonObject m_run_one_line_str_global;
   std::string m_dictionary_name;
-  TerminalState m_terminal_state;
   ActiveIOHandler m_active_io_handler;
   bool m_session_is_active;
   bool m_pty_slave_is_open;
diff --git a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
index 884514d..48f27b0 100644
--- a/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
+++ b/src/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
@@ -9,12 +9,12 @@
 #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H
 #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H
 
+#include "lldb/Host/Config.h"
+
 // Python.h needs to be included before any system headers in order to avoid
 // redefinition of macros
 
-#ifdef LLDB_DISABLE_PYTHON
-// Python is disabled in this build
-#else
+#if LLDB_ENABLE_PYTHON
 #include "llvm/Support/Compiler.h"
 #if defined(_WIN32)
 // If anyone #includes Host/PosixApi.h later, it will try to typedef pid_t.  We
@@ -40,6 +40,6 @@
 
 // Include python for non windows machines
 #include <Python.h>
-#endif // LLDB_DISABLE_PYTHON
+#endif
 
 #endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_LLDB_PYTHON_H
diff --git a/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/CMakeLists.txt
index 4df3912..7d1d03f 100644
--- a/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(StructuredDataDarwinLogProperties.inc -gen-lldb-property-defs
+  SOURCE StructuredDataDarwinLogProperties.td
+  TARGET LLDBPluginStructuredDataDarwinLogPropertiesGen)
+
+lldb_tablegen(StructuredDataDarwinLogPropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE StructuredDataDarwinLogProperties.td
+  TARGET LLDBPluginStructuredDataDarwinLogPropertiesEnumGen)
+
 add_lldb_library(lldbPluginStructuredDataDarwinLog PLUGIN
   StructuredDataDarwinLog.cpp
 
@@ -8,3 +16,7 @@
     lldbInterpreter
     lldbTarget
   )
+
+add_dependencies(lldbPluginStructuredDataDarwinLog
+  LLDBPluginStructuredDataDarwinLogPropertiesGen
+  LLDBPluginStructuredDataDarwinLogPropertiesEnumGen)
diff --git a/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
index 81a2712..c6b234b 100644
--- a/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
+++ b/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp
@@ -104,30 +104,13 @@
 
 /// Code to handle the StructuredDataDarwinLog settings
 
-static constexpr PropertyDefinition g_properties[] = {
-    {
-        "enable-on-startup",       // name
-        OptionValue::eTypeBoolean, // type
-        true,                      // global
-        false,                     // default uint value
-        nullptr,                   // default cstring value
-        {},                        // enum values
-        "Enable Darwin os_log collection when debugged process is launched "
-        "or attached." // description
-    },
-    {
-        "auto-enable-options",    // name
-        OptionValue::eTypeString, // type
-        true,                     // global
-        0,                        // default uint value
-        "",                       // default cstring value
-        {},                       // enum values
-        "Specify the options to 'plugin structured-data darwin-log enable' "
-        "that should be applied when automatically enabling logging on "
-        "startup/attach." // description
-    }};
+#define LLDB_PROPERTIES_darwinlog
+#include "StructuredDataDarwinLogProperties.inc"
 
-enum { ePropertyEnableOnStartup = 0, ePropertyAutoEnableOptions = 1 };
+enum {
+#define LLDB_PROPERTIES_darwinlog
+#include "StructuredDataDarwinLogPropertiesEnum.inc"
+};
 
 class StructuredDataDarwinLogProperties : public Properties {
 public:
@@ -138,7 +121,7 @@
 
   StructuredDataDarwinLogProperties() : Properties() {
     m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_darwinlog_properties);
   }
 
   ~StructuredDataDarwinLogProperties() override {}
@@ -146,13 +129,13 @@
   bool GetEnableOnStartup() const {
     const uint32_t idx = ePropertyEnableOnStartup;
     return m_collection_sp->GetPropertyAtIndexAsBoolean(
-        nullptr, idx, g_properties[idx].default_uint_value != 0);
+        nullptr, idx, g_darwinlog_properties[idx].default_uint_value != 0);
   }
 
   llvm::StringRef GetAutoEnableOptions() const {
     const uint32_t idx = ePropertyAutoEnableOptions;
     return m_collection_sp->GetPropertyAtIndexAsString(
-        nullptr, idx, g_properties[idx].default_cstr_value);
+        nullptr, idx, g_darwinlog_properties[idx].default_cstr_value);
   }
 
   const char *GetLoggingModuleName() const { return "libsystem_trace.dylib"; }
@@ -305,11 +288,8 @@
 
     // Instantiate the regex so we can report any errors.
     auto regex = RegularExpression(op_arg);
-    if (!regex.IsValid()) {
-      char error_text[256];
-      error_text[0] = '\0';
-      regex.GetErrorAsCString(error_text, sizeof(error_text));
-      error.SetErrorString(error_text);
+    if (llvm::Error err = regex.GetError()) {
+      error.SetErrorString(llvm::toString(std::move(err)));
       return FilterRuleSP();
     }
 
@@ -807,15 +787,10 @@
 
     // Now check if we have a running process.  If so, we should instruct the
     // process monitor to enable/disable DarwinLog support now.
-    Target *target = GetSelectedOrDummyTarget();
-    if (!target) {
-      // No target, so there is nothing more to do right now.
-      result.SetStatus(eReturnStatusSuccessFinishNoResult);
-      return true;
-    }
+    Target &target = GetSelectedOrDummyTarget();
 
     // Grab the active process.
-    auto process_sp = target->GetProcessSP();
+    auto process_sp = target.GetProcessSP();
     if (!process_sp) {
       // No active process, so there is nothing more to do right now.
       result.SetStatus(eReturnStatusSuccessFinishNoResult);
@@ -897,9 +872,9 @@
 
     // Figure out if we've got a process.  If so, we can tell if DarwinLog is
     // available for that process.
-    Target *target = GetSelectedOrDummyTarget();
-    auto process_sp = target ? target->GetProcessSP() : ProcessSP();
-    if (!target || !process_sp) {
+    Target &target = GetSelectedOrDummyTarget();
+    auto process_sp = target.GetProcessSP();
+    if (!process_sp) {
       stream.PutCString("Availability: unknown (requires process)\n");
       stream.PutCString("Enabled: not applicable "
                         "(requires process)\n");
@@ -1119,26 +1094,26 @@
       object_sp->Dump(json_stream);
     else
       json_stream.PutCString("<null>");
-    log->Printf("StructuredDataDarwinLog::%s() called with json: %s",
-                __FUNCTION__, json_stream.GetData());
+    LLDB_LOGF(log, "StructuredDataDarwinLog::%s() called with json: %s",
+              __FUNCTION__, json_stream.GetData());
   }
 
   // Ignore empty structured data.
   if (!object_sp) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() StructuredData object "
-                  "is null",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() StructuredData object "
+              "is null",
+              __FUNCTION__);
     return;
   }
 
   // Ignore any data that isn't for us.
   if (type_name != GetDarwinLogTypeName()) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() StructuredData type "
-                  "expected to be %s but was %s, ignoring",
-                  __FUNCTION__, GetDarwinLogTypeName().AsCString(),
-                  type_name.AsCString());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() StructuredData type "
+              "expected to be %s but was %s, ignoring",
+              __FUNCTION__, GetDarwinLogTypeName().AsCString(),
+              type_name.AsCString());
     return;
   }
 
@@ -1148,9 +1123,8 @@
   DebuggerSP debugger_sp = process.GetTarget().GetDebugger().shared_from_this();
   auto options_sp = GetGlobalEnableOptions(debugger_sp);
   if (options_sp && options_sp->GetBroadcastEvents()) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() broadcasting event",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "StructuredDataDarwinLog::%s() broadcasting event",
+              __FUNCTION__);
     process.BroadcastStructuredData(object_sp, shared_from_this());
   }
 
@@ -1263,19 +1237,18 @@
 void StructuredDataDarwinLog::ModulesDidLoad(Process &process,
                                              ModuleList &module_list) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("StructuredDataDarwinLog::%s called (process uid %u)",
-                __FUNCTION__, process.GetUniqueID());
+  LLDB_LOGF(log, "StructuredDataDarwinLog::%s called (process uid %u)",
+            __FUNCTION__, process.GetUniqueID());
 
   // Check if we should enable the darwin log support on startup/attach.
   if (!GetGlobalProperties()->GetEnableOnStartup() &&
       !s_is_explicitly_enabled) {
     // We're neither auto-enabled or explicitly enabled, so we shouldn't try to
     // enable here.
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s not applicable, we're not "
-                  "enabled (process uid %u)",
-                  __FUNCTION__, process.GetUniqueID());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s not applicable, we're not "
+              "enabled (process uid %u)",
+              __FUNCTION__, process.GetUniqueID());
     return;
   }
 
@@ -1283,10 +1256,10 @@
   {
     std::lock_guard<std::mutex> locker(m_added_breakpoint_mutex);
     if (m_added_breakpoint) {
-      if (log)
-        log->Printf("StructuredDataDarwinLog::%s process uid %u's "
-                    "post-libtrace-init breakpoint is already set",
-                    __FUNCTION__, process.GetUniqueID());
+      LLDB_LOGF(log,
+                "StructuredDataDarwinLog::%s process uid %u's "
+                "post-libtrace-init breakpoint is already set",
+                __FUNCTION__, process.GetUniqueID());
       return;
     }
   }
@@ -1298,11 +1271,11 @@
       GetGlobalProperties()->GetLoggingModuleName();
   if (!logging_module_cstr || (logging_module_cstr[0] == 0)) {
     // We need this.  Bail.
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s no logging module name "
-                  "specified, we don't know where to set a breakpoint "
-                  "(process uid %u)",
-                  __FUNCTION__, process.GetUniqueID());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s no logging module name "
+              "specified, we don't know where to set a breakpoint "
+              "(process uid %u)",
+              __FUNCTION__, process.GetUniqueID());
     return;
   }
 
@@ -1324,23 +1297,23 @@
   }
 
   if (!found_logging_support_module) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s logging module %s "
-                  "has not yet been loaded, can't set a breakpoint "
-                  "yet (process uid %u)",
-                  __FUNCTION__, logging_module_name.AsCString(),
-                  process.GetUniqueID());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s logging module %s "
+              "has not yet been loaded, can't set a breakpoint "
+              "yet (process uid %u)",
+              __FUNCTION__, logging_module_name.AsCString(),
+              process.GetUniqueID());
     return;
   }
 
   // Time to enqueue the breakpoint so we can wait for logging support to be
   // initialized before we try to tap the libtrace stream.
   AddInitCompletionHook(process);
-  if (log)
-    log->Printf("StructuredDataDarwinLog::%s post-init hook breakpoint "
-                "set for logging module %s (process uid %u)",
-                __FUNCTION__, logging_module_name.AsCString(),
-                process.GetUniqueID());
+  LLDB_LOGF(log,
+            "StructuredDataDarwinLog::%s post-init hook breakpoint "
+            "set for logging module %s (process uid %u)",
+            __FUNCTION__, logging_module_name.AsCString(),
+            process.GetUniqueID());
 
   // We need to try the enable here as well, which will succeed in the event
   // that we're attaching to (rather than launching) the process and the
@@ -1519,38 +1492,36 @@
   // we can execute our logic to enable the logging support.
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("StructuredDataDarwinLog::%s() called", __FUNCTION__);
+  LLDB_LOGF(log, "StructuredDataDarwinLog::%s() called", __FUNCTION__);
 
   // Get the current thread.
   if (!context) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() warning: no context, "
-                  "ignoring",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() warning: no context, "
+              "ignoring",
+              __FUNCTION__);
     return false;
   }
 
   // Get the plugin from the process.
   auto process_sp = context->exe_ctx_ref.GetProcessSP();
   if (!process_sp) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() warning: invalid "
-                  "process in context, ignoring",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() warning: invalid "
+              "process in context, ignoring",
+              __FUNCTION__);
     return false;
   }
-  if (log)
-    log->Printf("StructuredDataDarwinLog::%s() call is for process uid %d",
-                __FUNCTION__, process_sp->GetUniqueID());
+  LLDB_LOGF(log, "StructuredDataDarwinLog::%s() call is for process uid %d",
+            __FUNCTION__, process_sp->GetUniqueID());
 
   auto plugin_sp = process_sp->GetStructuredDataPlugin(GetDarwinLogTypeName());
   if (!plugin_sp) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() warning: no plugin for "
-                  "feature %s in process uid %u",
-                  __FUNCTION__, GetDarwinLogTypeName().AsCString(),
-                  process_sp->GetUniqueID());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() warning: no plugin for "
+              "feature %s in process uid %u",
+              __FUNCTION__, GetDarwinLogTypeName().AsCString(),
+              process_sp->GetUniqueID());
     return false;
   }
 
@@ -1561,51 +1532,51 @@
   std::weak_ptr<StructuredDataPlugin> plugin_wp(plugin_sp);
   ThreadPlanCallOnFunctionExit::Callback callback =
       [plugin_wp, &called_enable_method, log, process_uid]() {
-        if (log)
-          log->Printf("StructuredDataDarwinLog::post-init callback: "
-                      "called (process uid %u)",
-                      process_uid);
+        LLDB_LOGF(log,
+                  "StructuredDataDarwinLog::post-init callback: "
+                  "called (process uid %u)",
+                  process_uid);
 
         auto strong_plugin_sp = plugin_wp.lock();
         if (!strong_plugin_sp) {
-          if (log)
-            log->Printf("StructuredDataDarwinLog::post-init callback: "
-                        "plugin no longer exists, ignoring (process "
-                        "uid %u)",
-                        process_uid);
+          LLDB_LOGF(log,
+                    "StructuredDataDarwinLog::post-init callback: "
+                    "plugin no longer exists, ignoring (process "
+                    "uid %u)",
+                    process_uid);
           return;
         }
         // Make sure we only call it once, just in case the thread plan hits
         // the breakpoint twice.
         if (!called_enable_method) {
-          if (log)
-            log->Printf("StructuredDataDarwinLog::post-init callback: "
-                        "calling EnableNow() (process uid %u)",
-                        process_uid);
+          LLDB_LOGF(log,
+                    "StructuredDataDarwinLog::post-init callback: "
+                    "calling EnableNow() (process uid %u)",
+                    process_uid);
           static_cast<StructuredDataDarwinLog *>(strong_plugin_sp.get())
               ->EnableNow();
           called_enable_method = true;
         } else {
           // Our breakpoint was hit more than once.  Unexpected but no harm
           // done.  Log it.
-          if (log)
-            log->Printf("StructuredDataDarwinLog::post-init callback: "
-                        "skipping EnableNow(), already called by "
-                        "callback [we hit this more than once] "
-                        "(process uid %u)",
-                        process_uid);
+          LLDB_LOGF(log,
+                    "StructuredDataDarwinLog::post-init callback: "
+                    "skipping EnableNow(), already called by "
+                    "callback [we hit this more than once] "
+                    "(process uid %u)",
+                    process_uid);
         }
       };
 
   // Grab the current thread.
   auto thread_sp = context->exe_ctx_ref.GetThreadSP();
   if (!thread_sp) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() warning: failed to "
-                  "retrieve the current thread from the execution "
-                  "context, nowhere to run the thread plan (process uid "
-                  "%u)",
-                  __FUNCTION__, process_sp->GetUniqueID());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() warning: failed to "
+              "retrieve the current thread from the execution "
+              "context, nowhere to run the thread plan (process uid "
+              "%u)",
+              __FUNCTION__, process_sp->GetUniqueID());
     return false;
   }
 
@@ -1614,10 +1585,10 @@
       ThreadPlanSP(new ThreadPlanCallOnFunctionExit(*thread_sp, callback));
   const bool abort_other_plans = false;
   thread_sp->QueueThreadPlan(thread_plan_sp, abort_other_plans);
-  if (log)
-    log->Printf("StructuredDataDarwinLog::%s() queuing thread plan on "
-                "trace library init method entry (process uid %u)",
-                __FUNCTION__, process_sp->GetUniqueID());
+  LLDB_LOGF(log,
+            "StructuredDataDarwinLog::%s() queuing thread plan on "
+            "trace library init method entry (process uid %u)",
+            __FUNCTION__, process_sp->GetUniqueID());
 
   // We return false here to indicate that it isn't a public stop.
   return false;
@@ -1625,18 +1596,17 @@
 
 void StructuredDataDarwinLog::AddInitCompletionHook(Process &process) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("StructuredDataDarwinLog::%s() called (process uid %u)",
-                __FUNCTION__, process.GetUniqueID());
+  LLDB_LOGF(log, "StructuredDataDarwinLog::%s() called (process uid %u)",
+            __FUNCTION__, process.GetUniqueID());
 
   // Make sure we haven't already done this.
   {
     std::lock_guard<std::mutex> locker(m_added_breakpoint_mutex);
     if (m_added_breakpoint) {
-      if (log)
-        log->Printf("StructuredDataDarwinLog::%s() ignoring request, "
-                    "breakpoint already set (process uid %u)",
-                    __FUNCTION__, process.GetUniqueID());
+      LLDB_LOGF(log,
+                "StructuredDataDarwinLog::%s() ignoring request, "
+                "breakpoint already set (process uid %u)",
+                __FUNCTION__, process.GetUniqueID());
       return;
     }
 
@@ -1669,22 +1639,22 @@
       eLanguageTypeC, offset, skip_prologue, internal, hardware);
   if (!breakpoint_sp) {
     // Huh?  Bail here.
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() failed to set "
-                  "breakpoint in module %s, function %s (process uid %u)",
-                  __FUNCTION__, GetGlobalProperties()->GetLoggingModuleName(),
-                  func_name, process.GetUniqueID());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() failed to set "
+              "breakpoint in module %s, function %s (process uid %u)",
+              __FUNCTION__, GetGlobalProperties()->GetLoggingModuleName(),
+              func_name, process.GetUniqueID());
     return;
   }
 
   // Set our callback.
   breakpoint_sp->SetCallback(InitCompletionHookCallback, nullptr);
   m_breakpoint_id = breakpoint_sp->GetID();
-  if (log)
-    log->Printf("StructuredDataDarwinLog::%s() breakpoint set in module %s,"
-                "function %s (process uid %u)",
-                __FUNCTION__, GetGlobalProperties()->GetLoggingModuleName(),
-                func_name, process.GetUniqueID());
+  LLDB_LOGF(log,
+            "StructuredDataDarwinLog::%s() breakpoint set in module %s,"
+            "function %s (process uid %u)",
+            __FUNCTION__, GetGlobalProperties()->GetLoggingModuleName(),
+            func_name, process.GetUniqueID());
 }
 
 void StructuredDataDarwinLog::DumpTimestamp(Stream &stream,
@@ -1825,22 +1795,20 @@
 
 void StructuredDataDarwinLog::EnableNow() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("StructuredDataDarwinLog::%s() called", __FUNCTION__);
+  LLDB_LOGF(log, "StructuredDataDarwinLog::%s() called", __FUNCTION__);
 
   // Run the enable command.
   auto process_sp = GetProcess();
   if (!process_sp) {
     // Nothing to do.
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() warning: failed to get "
-                  "valid process, skipping",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() warning: failed to get "
+              "valid process, skipping",
+              __FUNCTION__);
     return;
   }
-  if (log)
-    log->Printf("StructuredDataDarwinLog::%s() call is for process uid %u",
-                __FUNCTION__, process_sp->GetUniqueID());
+  LLDB_LOGF(log, "StructuredDataDarwinLog::%s() call is for process uid %u",
+            __FUNCTION__, process_sp->GetUniqueID());
 
   // If we have configuration data, we can directly enable it now. Otherwise,
   // we need to run through the command interpreter to parse the auto-run
@@ -1849,10 +1817,10 @@
   DebuggerSP debugger_sp =
       process_sp->GetTarget().GetDebugger().shared_from_this();
   if (!debugger_sp) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() warning: failed to get "
-                  "debugger shared pointer, skipping (process uid %u)",
-                  __FUNCTION__, process_sp->GetUniqueID());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() warning: failed to get "
+              "debugger shared pointer, skipping (process uid %u)",
+              __FUNCTION__, process_sp->GetUniqueID());
     return;
   }
 
@@ -1864,13 +1832,15 @@
     const bool success = RunEnableCommand(interpreter);
     if (log) {
       if (success)
-        log->Printf("StructuredDataDarwinLog::%s() ran enable command "
-                    "successfully for (process uid %u)",
-                    __FUNCTION__, process_sp->GetUniqueID());
+        LLDB_LOGF(log,
+                  "StructuredDataDarwinLog::%s() ran enable command "
+                  "successfully for (process uid %u)",
+                  __FUNCTION__, process_sp->GetUniqueID());
       else
-        log->Printf("StructuredDataDarwinLog::%s() error: running "
-                    "enable command failed (process uid %u)",
-                    __FUNCTION__, process_sp->GetUniqueID());
+        LLDB_LOGF(log,
+                  "StructuredDataDarwinLog::%s() error: running "
+                  "enable command failed (process uid %u)",
+                  __FUNCTION__, process_sp->GetUniqueID());
     }
     // Report failures to the debugger error stream.
     auto error_stream_sp = debugger_sp->GetAsyncErrorStream();
@@ -1886,11 +1856,11 @@
   // specified options.
   auto config_sp = options_sp->BuildConfigurationData(true);
   if (!config_sp) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() warning: failed to "
-                  "build configuration data for enable options, skipping "
-                  "(process uid %u)",
-                  __FUNCTION__, process_sp->GetUniqueID());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() warning: failed to "
+              "build configuration data for enable options, skipping "
+              "(process uid %u)",
+              __FUNCTION__, process_sp->GetUniqueID());
     return;
   }
 
@@ -1901,11 +1871,11 @@
 
   // Report results.
   if (!error.Success()) {
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() "
-                  "ConfigureStructuredData() call failed "
-                  "(process uid %u): %s",
-                  __FUNCTION__, process_sp->GetUniqueID(), error.AsCString());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() "
+              "ConfigureStructuredData() call failed "
+              "(process uid %u): %s",
+              __FUNCTION__, process_sp->GetUniqueID(), error.AsCString());
     auto error_stream_sp = debugger_sp->GetAsyncErrorStream();
     if (error_stream_sp) {
       error_stream_sp->Printf("failed to configure DarwinLog "
@@ -1916,9 +1886,9 @@
     m_is_enabled = false;
   } else {
     m_is_enabled = true;
-    if (log)
-      log->Printf("StructuredDataDarwinLog::%s() success via direct "
-                  "configuration (process uid %u)",
-                  __FUNCTION__, process_sp->GetUniqueID());
+    LLDB_LOGF(log,
+              "StructuredDataDarwinLog::%s() success via direct "
+              "configuration (process uid %u)",
+              __FUNCTION__, process_sp->GetUniqueID());
   }
 }
diff --git a/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLogProperties.td b/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLogProperties.td
new file mode 100644
index 0000000..5c22158
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLogProperties.td
@@ -0,0 +1,12 @@
+include "../../../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "darwinlog" in {
+  def EnableOnStartup: Property<"enable-on-startup", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"Enable Darwin os_log collection when debugged process is launched or attached.">;
+  def AutoEnableOptions: Property<"auto-enable-options", "String">,
+    Global,
+    DefaultStringValue<"">,
+    Desc<"Specify the options to 'plugin structured-data darwin-log enable' that should be applied when automatically enabling logging on startup/attach.">;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
index d425827..b2c4d08 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.cpp
@@ -15,7 +15,6 @@
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/PostfixExpression.h"
 #include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/TypeMap.h"
 #include "lldb/Utility/Log.h"
@@ -26,6 +25,8 @@
 using namespace lldb_private;
 using namespace lldb_private::breakpad;
 
+char SymbolFileBreakpad::ID;
+
 class SymbolFileBreakpad::LineIterator {
 public:
   // begin iterator for sections of given type
@@ -126,8 +127,8 @@
 
 llvm::iterator_range<SymbolFileBreakpad::LineIterator>
 SymbolFileBreakpad::lines(Record::Kind section_type) {
-  return llvm::make_range(LineIterator(*m_obj_file, section_type),
-                          LineIterator(*m_obj_file));
+  return llvm::make_range(LineIterator(*m_objfile_sp, section_type),
+                          LineIterator(*m_objfile_sp));
 }
 
 namespace {
@@ -179,15 +180,13 @@
 }
 
 uint32_t SymbolFileBreakpad::CalculateAbilities() {
-  if (!m_obj_file)
-    return 0;
-  if (m_obj_file->GetPluginName() != ObjectFileBreakpad::GetPluginNameStatic())
+  if (!m_objfile_sp || !llvm::isa<ObjectFileBreakpad>(*m_objfile_sp))
     return 0;
 
   return CompileUnits | Functions | LineTables;
 }
 
-uint32_t SymbolFileBreakpad::GetNumCompileUnits() {
+uint32_t SymbolFileBreakpad::CalculateNumCompileUnits() {
   ParseCUData();
   return m_cu_data->GetSize();
 }
@@ -204,7 +203,8 @@
 
   // The FileSpec of the compile unit will be the file corresponding to the
   // first LINE record.
-  LineIterator It(*m_obj_file, Record::Func, data.bookmark), End(*m_obj_file);
+  LineIterator It(*m_objfile_sp, Record::Func, data.bookmark),
+      End(*m_objfile_sp);
   assert(Record::classify(*It) == Record::Func);
   ++It; // Skip FUNC record.
   if (It != End) {
@@ -213,12 +213,12 @@
       spec = (*m_files)[record->FileNum];
   }
 
-  auto cu_sp = std::make_shared<CompileUnit>(m_obj_file->GetModule(),
+  auto cu_sp = std::make_shared<CompileUnit>(m_objfile_sp->GetModule(),
                                              /*user_data*/ nullptr, spec, index,
                                              eLanguageTypeUnknown,
                                              /*is_optimized*/ eLazyBoolNo);
 
-  GetSymbolVendor().SetCompileUnitAtIndex(index, cu_sp);
+  SetCompileUnitAtIndex(index, cu_sp);
   return cu_sp;
 }
 
@@ -228,6 +228,7 @@
 }
 
 bool SymbolFileBreakpad::ParseLineTable(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   CompUnitData &data = m_cu_data->GetEntryRef(comp_unit.GetID()).data;
 
   if (!data.line_table_up)
@@ -239,6 +240,7 @@
 
 bool SymbolFileBreakpad::ParseSupportFiles(CompileUnit &comp_unit,
                                            FileSpecList &support_files) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   CompUnitData &data = m_cu_data->GetEntryRef(comp_unit.GetID()).data;
   if (!data.support_files)
     ParseLineTableAndSupportFiles(comp_unit, data);
@@ -251,6 +253,7 @@
 SymbolFileBreakpad::ResolveSymbolContext(const Address &so_addr,
                                          SymbolContextItem resolve_scope,
                                          SymbolContext &sc) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (!(resolve_scope & (eSymbolContextCompUnit | eSymbolContextLineEntry)))
     return 0;
 
@@ -260,7 +263,7 @@
   if (idx == UINT32_MAX)
     return 0;
 
-  sc.comp_unit = GetSymbolVendor().GetCompileUnitAtIndex(idx).get();
+  sc.comp_unit = GetCompileUnitAtIndex(idx).get();
   SymbolContextItem result = eSymbolContextCompUnit;
   if (resolve_scope & eSymbolContextLineEntry) {
     if (sc.comp_unit->GetLineTable()->FindLineEntryByAddress(so_addr,
@@ -275,57 +278,44 @@
 uint32_t SymbolFileBreakpad::ResolveSymbolContext(
     const FileSpec &file_spec, uint32_t line, bool check_inlines,
     lldb::SymbolContextItem resolve_scope, SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (!(resolve_scope & eSymbolContextCompUnit))
     return 0;
 
   uint32_t old_size = sc_list.GetSize();
   for (size_t i = 0, size = GetNumCompileUnits(); i < size; ++i) {
-    CompileUnit &cu = *GetSymbolVendor().GetCompileUnitAtIndex(i);
+    CompileUnit &cu = *GetCompileUnitAtIndex(i);
     cu.ResolveSymbolContext(file_spec, line, check_inlines,
                             /*exact*/ false, resolve_scope, sc_list);
   }
   return sc_list.GetSize() - old_size;
 }
 
-uint32_t SymbolFileBreakpad::FindFunctions(
+void SymbolFileBreakpad::FindFunctions(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    FunctionNameType name_type_mask, bool include_inlines, bool append,
+    FunctionNameType name_type_mask, bool include_inlines,
     SymbolContextList &sc_list) {
   // TODO
-  if (!append)
-    sc_list.Clear();
-  return sc_list.GetSize();
 }
 
-uint32_t SymbolFileBreakpad::FindFunctions(const RegularExpression &regex,
-                                           bool include_inlines, bool append,
-                                           SymbolContextList &sc_list) {
+void SymbolFileBreakpad::FindFunctions(const RegularExpression &regex,
+                                       bool include_inlines,
+                                       SymbolContextList &sc_list) {
   // TODO
-  if (!append)
-    sc_list.Clear();
-  return sc_list.GetSize();
 }
 
-uint32_t SymbolFileBreakpad::FindTypes(
+void SymbolFileBreakpad::FindTypes(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    bool append, uint32_t max_matches,
-    llvm::DenseSet<SymbolFile *> &searched_symbol_files, TypeMap &types) {
-  if (!append)
-    types.Clear();
-  return types.GetSize();
-}
+    uint32_t max_matches, llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+    TypeMap &types) {}
 
-size_t
-SymbolFileBreakpad::FindTypes(const std::vector<CompilerContext> &context,
-                              bool append, TypeMap &types) {
-  if (!append)
-    types.Clear();
-  return types.GetSize();
-}
+void SymbolFileBreakpad::FindTypes(
+    llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+    llvm::DenseSet<SymbolFile *> &searched_symbol_files, TypeMap &types) {}
 
 void SymbolFileBreakpad::AddSymbols(Symtab &symtab) {
   Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS);
-  Module &module = *m_obj_file->GetModule();
+  Module &module = *m_objfile_sp->GetModule();
   addr_t base = GetBaseFileAddress();
   if (base == LLDB_INVALID_ADDRESS) {
     LLDB_LOG(log, "Unable to fetch the base address of object file. Skipping "
@@ -347,8 +337,8 @@
       return;
     }
     symbols.try_emplace(
-        address, /*symID*/ 0, Mangled(name, /*is_mangled*/ false),
-        eSymbolTypeCode, /*is_global*/ true, /*is_debug*/ false,
+        address, /*symID*/ 0, Mangled(name), eSymbolTypeCode,
+        /*is_global*/ true, /*is_debug*/ false,
         /*is_trampoline*/ false, /*is_artificial*/ false,
         AddressRange(section_sp, address - section_sp->GetFileAddress(),
                      size.getValueOr(0)),
@@ -372,6 +362,20 @@
   symtab.CalculateSymbolSizes();
 }
 
+llvm::Expected<lldb::addr_t>
+SymbolFileBreakpad::GetParameterStackSize(Symbol &symbol) {
+  ParseUnwindData();
+  if (auto *entry = m_unwind_data->win.FindEntryThatContains(
+          symbol.GetAddress().GetFileAddress())) {
+    auto record = StackWinRecord::parse(
+        *LineIterator(*m_objfile_sp, Record::StackWin, entry->data));
+    assert(record.hasValue());
+    return record->ParameterSize;
+  }
+  return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                 "Parameter size unknown.");
+}
+
 static llvm::Optional<std::pair<llvm::StringRef, llvm::StringRef>>
 GetRule(llvm::StringRef &unwind_rules) {
   // Unwind rules are of the form
@@ -418,7 +422,17 @@
   return ResolveRegister(resolver, name);
 }
 
-bool SymbolFileBreakpad::ParseUnwindRow(llvm::StringRef unwind_rules,
+llvm::ArrayRef<uint8_t> SymbolFileBreakpad::SaveAsDWARF(postfix::Node &node) {
+  ArchSpec arch = m_objfile_sp->GetArchitecture();
+  StreamString dwarf(Stream::eBinary, arch.GetAddressByteSize(),
+                     arch.GetByteOrder());
+  ToDWARF(node, dwarf);
+  uint8_t *saved = m_allocator.Allocate<uint8_t>(dwarf.GetSize());
+  std::memcpy(saved, dwarf.GetData(), dwarf.GetSize());
+  return {saved, dwarf.GetSize()};
+}
+
+bool SymbolFileBreakpad::ParseCFIUnwindRow(llvm::StringRef unwind_rules,
                                         const RegisterInfoResolver &resolver,
                                         UnwindPlan::Row &row) {
   Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS);
@@ -427,7 +441,7 @@
   while (auto rule = GetRule(unwind_rules)) {
     node_alloc.Reset();
     llvm::StringRef lhs = rule->first;
-    postfix::Node *rhs = postfix::Parse(rule->second, node_alloc);
+    postfix::Node *rhs = postfix::ParseOneExpression(rule->second, node_alloc);
     if (!rhs) {
       LLDB_LOG(log, "Could not parse `{0}` as unwind rhs.", rule->second);
       return false;
@@ -451,18 +465,12 @@
       return false;
     }
 
-    ArchSpec arch = m_obj_file->GetArchitecture();
-    StreamString dwarf(Stream::eBinary, arch.GetAddressByteSize(),
-                       arch.GetByteOrder());
-    ToDWARF(*rhs, dwarf);
-    uint8_t *saved = m_allocator.Allocate<uint8_t>(dwarf.GetSize());
-    std::memcpy(saved, dwarf.GetData(), dwarf.GetSize());
-
+    llvm::ArrayRef<uint8_t> saved = SaveAsDWARF(*rhs);
     if (lhs == ".cfa") {
-      row.GetCFAValue().SetIsDWARFExpression(saved, dwarf.GetSize());
+      row.GetCFAValue().SetIsDWARFExpression(saved.data(), saved.size());
     } else if (const RegisterInfo *info = ResolveRegisterOrRA(resolver, lhs)) {
       UnwindPlan::Row::RegisterLocation loc;
-      loc.SetIsDWARFExpression(saved, dwarf.GetSize());
+      loc.SetIsDWARFExpression(saved.data(), saved.size());
       row.SetRegisterInfo(info->kinds[eRegisterKindLLDB], loc);
     } else
       LLDB_LOG(log, "Invalid register `{0}` in unwind rule.", lhs);
@@ -478,31 +486,40 @@
 SymbolFileBreakpad::GetUnwindPlan(const Address &address,
                                   const RegisterInfoResolver &resolver) {
   ParseUnwindData();
-  const UnwindMap::Entry *entry =
-      m_unwind_data->FindEntryThatContains(address.GetFileAddress());
-  if (!entry)
-    return nullptr;
+  if (auto *entry =
+          m_unwind_data->cfi.FindEntryThatContains(address.GetFileAddress()))
+    return ParseCFIUnwindPlan(entry->data, resolver);
+  if (auto *entry =
+          m_unwind_data->win.FindEntryThatContains(address.GetFileAddress()))
+    return ParseWinUnwindPlan(entry->data, resolver);
+  return nullptr;
+}
 
+UnwindPlanSP
+SymbolFileBreakpad::ParseCFIUnwindPlan(const Bookmark &bookmark,
+                                       const RegisterInfoResolver &resolver) {
   addr_t base = GetBaseFileAddress();
   if (base == LLDB_INVALID_ADDRESS)
     return nullptr;
 
-  LineIterator It(*m_obj_file, Record::StackCFI, entry->data), End(*m_obj_file);
+  LineIterator It(*m_objfile_sp, Record::StackCFI, bookmark),
+      End(*m_objfile_sp);
   llvm::Optional<StackCFIRecord> init_record = StackCFIRecord::parse(*It);
-  assert(init_record.hasValue());
-  assert(init_record->Size.hasValue());
+  assert(init_record.hasValue() && init_record->Size.hasValue() &&
+         "Record already parsed successfully in ParseUnwindData!");
 
   auto plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindLLDB);
   plan_sp->SetSourceName("breakpad STACK CFI");
   plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  plan_sp->SetUnwindPlanForSignalTrap(eLazyBoolNo);
   plan_sp->SetSourcedFromCompiler(eLazyBoolYes);
   plan_sp->SetPlanValidAddressRange(
       AddressRange(base + init_record->Address, *init_record->Size,
-                   m_obj_file->GetModule()->GetSectionList()));
+                   m_objfile_sp->GetModule()->GetSectionList()));
 
   auto row_sp = std::make_shared<UnwindPlan::Row>();
   row_sp->SetOffset(0);
-  if (!ParseUnwindRow(init_record->UnwindRules, resolver, *row_sp))
+  if (!ParseCFIUnwindRow(init_record->UnwindRules, resolver, *row_sp))
     return nullptr;
   plan_sp->AppendRow(row_sp);
   for (++It; It != End; ++It) {
@@ -514,19 +531,107 @@
 
     row_sp = std::make_shared<UnwindPlan::Row>(*row_sp);
     row_sp->SetOffset(record->Address - init_record->Address);
-    if (!ParseUnwindRow(record->UnwindRules, resolver, *row_sp))
+    if (!ParseCFIUnwindRow(record->UnwindRules, resolver, *row_sp))
       return nullptr;
     plan_sp->AppendRow(row_sp);
   }
   return plan_sp;
 }
 
-SymbolVendor &SymbolFileBreakpad::GetSymbolVendor() {
-  return *m_obj_file->GetModule()->GetSymbolVendor();
+UnwindPlanSP
+SymbolFileBreakpad::ParseWinUnwindPlan(const Bookmark &bookmark,
+                                       const RegisterInfoResolver &resolver) {
+  Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS);
+  addr_t base = GetBaseFileAddress();
+  if (base == LLDB_INVALID_ADDRESS)
+    return nullptr;
+
+  LineIterator It(*m_objfile_sp, Record::StackWin, bookmark);
+  llvm::Optional<StackWinRecord> record = StackWinRecord::parse(*It);
+  assert(record.hasValue() &&
+         "Record already parsed successfully in ParseUnwindData!");
+
+  auto plan_sp = std::make_shared<UnwindPlan>(lldb::eRegisterKindLLDB);
+  plan_sp->SetSourceName("breakpad STACK WIN");
+  plan_sp->SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  plan_sp->SetUnwindPlanForSignalTrap(eLazyBoolNo);
+  plan_sp->SetSourcedFromCompiler(eLazyBoolYes);
+  plan_sp->SetPlanValidAddressRange(
+      AddressRange(base + record->RVA, record->CodeSize,
+                   m_objfile_sp->GetModule()->GetSectionList()));
+
+  auto row_sp = std::make_shared<UnwindPlan::Row>();
+  row_sp->SetOffset(0);
+
+  llvm::BumpPtrAllocator node_alloc;
+  std::vector<std::pair<llvm::StringRef, postfix::Node *>> program =
+      postfix::ParseFPOProgram(record->ProgramString, node_alloc);
+
+  if (program.empty()) {
+    LLDB_LOG(log, "Invalid unwind rule: {0}.", record->ProgramString);
+    return nullptr;
+  }
+  auto it = program.begin();
+  const auto &symbol_resolver =
+      [&](postfix::SymbolNode &symbol) -> postfix::Node * {
+    llvm::StringRef name = symbol.GetName();
+    for (const auto &rule : llvm::make_range(program.begin(), it)) {
+      if (rule.first == name)
+        return rule.second;
+    }
+    if (const RegisterInfo *info = ResolveRegister(resolver, name))
+      return postfix::MakeNode<postfix::RegisterNode>(
+          node_alloc, info->kinds[eRegisterKindLLDB]);
+    return nullptr;
+  };
+
+  // We assume the first value will be the CFA. It is usually called T0, but
+  // clang will use T1, if it needs to realign the stack.
+  auto *symbol = llvm::dyn_cast<postfix::SymbolNode>(it->second);
+  if (symbol && symbol->GetName() == ".raSearch") {
+    row_sp->GetCFAValue().SetRaSearch(record->LocalSize +
+                                      record->SavedRegisterSize);
+  } else {
+    if (!postfix::ResolveSymbols(it->second, symbol_resolver)) {
+      LLDB_LOG(log, "Resolving symbols in `{0}` failed.",
+               record->ProgramString);
+      return nullptr;
+    }
+    llvm::ArrayRef<uint8_t> saved  = SaveAsDWARF(*it->second);
+    row_sp->GetCFAValue().SetIsDWARFExpression(saved.data(), saved.size());
+  }
+
+  // Replace the node value with InitialValueNode, so that subsequent
+  // expressions refer to the CFA value instead of recomputing the whole
+  // expression.
+  it->second = postfix::MakeNode<postfix::InitialValueNode>(node_alloc);
+
+
+  // Now process the rest of the assignments.
+  for (++it; it != program.end(); ++it) {
+    const RegisterInfo *info = ResolveRegister(resolver, it->first);
+    // It is not an error if the resolution fails because the program may
+    // contain temporary variables.
+    if (!info)
+      continue;
+    if (!postfix::ResolveSymbols(it->second, symbol_resolver)) {
+      LLDB_LOG(log, "Resolving symbols in `{0}` failed.",
+               record->ProgramString);
+      return nullptr;
+    }
+
+    llvm::ArrayRef<uint8_t> saved = SaveAsDWARF(*it->second);
+    UnwindPlan::Row::RegisterLocation loc;
+    loc.SetIsDWARFExpression(saved.data(), saved.size());
+    row_sp->SetRegisterInfo(info->kinds[eRegisterKindLLDB], loc);
+  }
+
+  plan_sp->AppendRow(row_sp);
+  return plan_sp;
 }
 
 addr_t SymbolFileBreakpad::GetBaseFileAddress() {
-  return m_obj_file->GetModule()
+  return m_objfile_sp->GetModule()
       ->GetObjectFile()
       ->GetBaseAddress()
       .GetFileAddress();
@@ -569,8 +674,8 @@
 
   // We shall create one compile unit for each FUNC record. So, count the number
   // of FUNC records, and store them in m_cu_data, together with their ranges.
-  for (LineIterator It(*m_obj_file, Record::Func), End(*m_obj_file); It != End;
-       ++It) {
+  for (LineIterator It(*m_objfile_sp, Record::Func), End(*m_objfile_sp);
+       It != End; ++It) {
     if (auto record = FuncRecord::parse(*It)) {
       m_cu_data->Append(CompUnitMap::Entry(base + record->Address, record->Size,
                                            CompUnitData(It.GetBookmark())));
@@ -589,7 +694,7 @@
          "How did we create compile units without a base address?");
 
   SupportFileMap map;
-  data.line_table_up = llvm::make_unique<LineTable>(&cu);
+  data.line_table_up = std::make_unique<LineTable>(&cu);
   std::unique_ptr<LineSequence> line_seq_up(
       data.line_table_up->CreateLineSequenceContainer());
   llvm::Optional<addr_t> next_addr;
@@ -603,7 +708,8 @@
     line_seq_up->Clear();
   };
 
-  LineIterator It(*m_obj_file, Record::Func, data.bookmark), End(*m_obj_file);
+  LineIterator It(*m_objfile_sp, Record::Func, data.bookmark),
+      End(*m_objfile_sp);
   assert(Record::classify(*It) == Record::Func);
   for (++It; It != End; ++It) {
     auto record = LineRecord::parse(*It);
@@ -625,14 +731,14 @@
   }
   if (next_addr)
     finish_sequence();
-  data.support_files = map.translate(cu, *m_files);
+  data.support_files = map.translate(cu.GetPrimaryFile(), *m_files);
 }
 
 void SymbolFileBreakpad::ParseUnwindData() {
   if (m_unwind_data)
     return;
-
   m_unwind_data.emplace();
+
   Log *log = GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS);
   addr_t base = GetBaseFileAddress();
   if (base == LLDB_INVALID_ADDRESS) {
@@ -640,14 +746,24 @@
                   "of object file.");
   }
 
-  for (LineIterator It(*m_obj_file, Record::StackCFI), End(*m_obj_file);
+  for (LineIterator It(*m_objfile_sp, Record::StackCFI), End(*m_objfile_sp);
        It != End; ++It) {
     if (auto record = StackCFIRecord::parse(*It)) {
       if (record->Size)
-        m_unwind_data->Append(UnwindMap::Entry(
+        m_unwind_data->cfi.Append(UnwindMap::Entry(
             base + record->Address, *record->Size, It.GetBookmark()));
     } else
       LLDB_LOG(log, "Failed to parse: {0}. Skipping record.", *It);
   }
-  m_unwind_data->Sort();
+  m_unwind_data->cfi.Sort();
+
+  for (LineIterator It(*m_objfile_sp, Record::StackWin), End(*m_objfile_sp);
+       It != End; ++It) {
+    if (auto record = StackWinRecord::parse(*It)) {
+      m_unwind_data->win.Append(UnwindMap::Entry(
+          base + record->RVA, record->CodeSize, It.GetBookmark()));
+    } else
+      LLDB_LOG(log, "Failed to parse: {0}. Skipping record.", *It);
+  }
+  m_unwind_data->win.Sort();
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
index 8a0b764..de27122 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/Breakpad/SymbolFileBreakpad.h
@@ -12,6 +12,7 @@
 #include "Plugins/ObjectFile/Breakpad/BreakpadRecords.h"
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Symbol/LineTable.h"
+#include "lldb/Symbol/PostfixExpression.h"
 #include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/UnwindPlan.h"
 
@@ -20,7 +21,18 @@
 namespace breakpad {
 
 class SymbolFileBreakpad : public SymbolFile {
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
+  /// LLVM RTTI support.
+  /// \{
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || SymbolFile::isA(ClassID);
+  }
+  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
+  /// \}
+
   // Static Functions
   static void Initialize();
   static void Terminate();
@@ -31,12 +43,13 @@
     return "Breakpad debug symbol file reader.";
   }
 
-  static SymbolFile *CreateInstance(ObjectFile *obj_file) {
-    return new SymbolFileBreakpad(obj_file);
+  static SymbolFile *CreateInstance(lldb::ObjectFileSP objfile_sp) {
+    return new SymbolFileBreakpad(std::move(objfile_sp));
   }
 
   // Constructors and Destructors
-  SymbolFileBreakpad(ObjectFile *object_file) : SymbolFile(object_file) {}
+  SymbolFileBreakpad(lldb::ObjectFileSP objfile_sp)
+      : SymbolFile(std::move(objfile_sp)) {}
 
   ~SymbolFileBreakpad() override {}
 
@@ -46,10 +59,6 @@
 
   // Compile Unit function calls
 
-  uint32_t GetNumCompileUnits() override;
-
-  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
-
   lldb::LanguageType ParseLanguage(CompileUnit &comp_unit) override {
     return lldb::eLanguageTypeUnknown;
   }
@@ -72,12 +81,10 @@
 
   size_t ParseBlocksRecursive(Function &func) override { return 0; }
 
-  uint32_t FindGlobalVariables(ConstString name,
-                               const CompilerDeclContext *parent_decl_ctx,
-                               uint32_t max_matches,
-                               VariableList &variables) override {
-    return 0;
-  }
+  void FindGlobalVariables(ConstString name,
+                           const CompilerDeclContext *parent_decl_ctx,
+                           uint32_t max_matches,
+                           VariableList &variables) override {}
 
   size_t ParseVariablesForContext(const SymbolContext &sc) override {
     return 0;
@@ -99,31 +106,31 @@
                                 lldb::SymbolContextItem resolve_scope,
                                 SymbolContextList &sc_list) override;
 
-  size_t GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
-                  TypeList &type_list) override {
-    return 0;
-  }
+  void GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
+                TypeList &type_list) override {}
 
-  uint32_t FindFunctions(ConstString name,
-                         const CompilerDeclContext *parent_decl_ctx,
-                         lldb::FunctionNameType name_type_mask,
-                         bool include_inlines, bool append,
-                         SymbolContextList &sc_list) override;
+  void FindFunctions(ConstString name,
+                     const CompilerDeclContext *parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
+                     bool include_inlines, SymbolContextList &sc_list) override;
 
-  uint32_t FindFunctions(const RegularExpression &regex, bool include_inlines,
-                         bool append, SymbolContextList &sc_list) override;
+  void FindFunctions(const RegularExpression &regex, bool include_inlines,
+                     SymbolContextList &sc_list) override;
 
-  uint32_t FindTypes(ConstString name,
-                     const CompilerDeclContext *parent_decl_ctx, bool append,
-                     uint32_t max_matches,
-                     llvm::DenseSet<SymbolFile *> &searched_symbol_files,
-                     TypeMap &types) override;
+  void FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx,
+                 uint32_t max_matches,
+                 llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+                 TypeMap &types) override;
 
-  size_t FindTypes(const std::vector<CompilerContext> &context, bool append,
-                   TypeMap &types) override;
+  void FindTypes(llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+                 llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+                 TypeMap &types) override;
 
-  TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language) override {
-    return nullptr;
+  llvm::Expected<TypeSystem &>
+  GetTypeSystemForLanguage(lldb::LanguageType language) override {
+    return llvm::make_error<llvm::StringError>(
+        "SymbolFileBreakpad does not support GetTypeSystemForLanguage",
+        llvm::inconvertibleErrorCode());
   }
 
   CompilerDeclContext
@@ -134,6 +141,8 @@
 
   void AddSymbols(Symtab &symtab) override;
 
+  llvm::Expected<lldb::addr_t> GetParameterStackSize(Symbol &symbol) override;
+
   lldb::UnwindPlanSP
   GetUnwindPlan(const Address &address,
                 const RegisterInfoResolver &resolver) override;
@@ -196,15 +205,22 @@
 
   };
 
-  SymbolVendor &GetSymbolVendor();
+  uint32_t CalculateNumCompileUnits() override;
+  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
+
   lldb::addr_t GetBaseFileAddress();
   void ParseFileRecords();
   void ParseCUData();
   void ParseLineTableAndSupportFiles(CompileUnit &cu, CompUnitData &data);
   void ParseUnwindData();
-  bool ParseUnwindRow(llvm::StringRef unwind_rules,
-                      const RegisterInfoResolver &resolver,
-                      UnwindPlan::Row &row);
+  llvm::ArrayRef<uint8_t> SaveAsDWARF(postfix::Node &node);
+  lldb::UnwindPlanSP ParseCFIUnwindPlan(const Bookmark &bookmark,
+                                        const RegisterInfoResolver &resolver);
+  bool ParseCFIUnwindRow(llvm::StringRef unwind_rules,
+                         const RegisterInfoResolver &resolver,
+                         UnwindPlan::Row &row);
+  lldb::UnwindPlanSP ParseWinUnwindPlan(const Bookmark &bookmark,
+                                        const RegisterInfoResolver &resolver);
 
   using CompUnitMap = RangeDataVector<lldb::addr_t, lldb::addr_t, CompUnitData>;
 
@@ -212,7 +228,11 @@
   llvm::Optional<CompUnitMap> m_cu_data;
 
   using UnwindMap = RangeDataVector<lldb::addr_t, lldb::addr_t, Bookmark>;
-  llvm::Optional<UnwindMap> m_unwind_data;
+  struct UnwindData {
+    UnwindMap cfi;
+    UnwindMap win;
+  };
+  llvm::Optional<UnwindData> m_unwind_data;
   llvm::BumpPtrAllocator m_allocator;
 };
 
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
index 9ae047d..0a5073b 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
@@ -21,30 +21,30 @@
     Module &module, DWARFDataExtractor apple_names,
     DWARFDataExtractor apple_namespaces, DWARFDataExtractor apple_types,
     DWARFDataExtractor apple_objc, DWARFDataExtractor debug_str) {
-  auto apple_names_table_up = llvm::make_unique<DWARFMappedHash::MemoryTable>(
+  auto apple_names_table_up = std::make_unique<DWARFMappedHash::MemoryTable>(
       apple_names, debug_str, ".apple_names");
   if (!apple_names_table_up->IsValid())
     apple_names_table_up.reset();
 
   auto apple_namespaces_table_up =
-      llvm::make_unique<DWARFMappedHash::MemoryTable>(
+      std::make_unique<DWARFMappedHash::MemoryTable>(
           apple_namespaces, debug_str, ".apple_namespaces");
   if (!apple_namespaces_table_up->IsValid())
     apple_namespaces_table_up.reset();
 
-  auto apple_types_table_up = llvm::make_unique<DWARFMappedHash::MemoryTable>(
+  auto apple_types_table_up = std::make_unique<DWARFMappedHash::MemoryTable>(
       apple_types, debug_str, ".apple_types");
   if (!apple_types_table_up->IsValid())
     apple_types_table_up.reset();
 
-  auto apple_objc_table_up = llvm::make_unique<DWARFMappedHash::MemoryTable>(
+  auto apple_objc_table_up = std::make_unique<DWARFMappedHash::MemoryTable>(
       apple_objc, debug_str, ".apple_objc");
   if (!apple_objc_table_up->IsValid())
     apple_objc_table_up.reset();
 
   if (apple_names_table_up || apple_names_table_up || apple_types_table_up ||
       apple_objc_table_up)
-    return llvm::make_unique<AppleDWARFIndex>(
+    return std::make_unique<AppleDWARFIndex>(
         module, std::move(apple_names_table_up),
         std::move(apple_namespaces_table_up), std::move(apple_types_table_up),
         std::move(apple_objc_table_up));
@@ -110,6 +110,7 @@
   const bool has_qualified_name_hash =
       m_apple_types_up->GetHeader().header_data.ContainsAtom(
           DWARFMappedHash::eAtomTypeQualNameHash);
+
   const ConstString type_name(context[0].name);
   const dw_tag_t tag = context[0].tag;
   if (has_tag && has_qualified_name_hash) {
@@ -119,12 +120,32 @@
       m_module.LogMessage(log, "FindByNameAndTagAndQualifiedNameHash()");
     m_apple_types_up->FindByNameAndTagAndQualifiedNameHash(
         type_name.GetStringRef(), tag, qualified_name_hash, offsets);
-  } else if (has_tag) {
+    return;
+  }
+
+  if (has_tag) {
+    // When searching for a scoped type (for example,
+    // "std::vector<int>::const_iterator") searching for the innermost
+    // name alone ("const_iterator") could yield many false
+    // positives. By searching for the parent type ("vector<int>")
+    // first we can avoid extracting type DIEs from object files that
+    // would fail the filter anyway.
+    if (!has_qualified_name_hash && (context.GetSize() > 1) &&
+        (context[1].tag == DW_TAG_class_type ||
+         context[1].tag == DW_TAG_structure_type)) {
+      DIEArray class_matches;
+      m_apple_types_up->FindByName(context[1].name, class_matches);
+      if (class_matches.empty())
+        return;
+    }
+
     if (log)
       m_module.LogMessage(log, "FindByNameAndTag()");
     m_apple_types_up->FindByNameAndTag(type_name.GetStringRef(), tag, offsets);
-  } else
-    m_apple_types_up->FindByName(type_name.GetStringRef(), offsets);
+    return;
+  }
+
+  m_apple_types_up->FindByName(type_name.GetStringRef(), offsets);
 }
 
 void AppleDWARFIndex::GetNamespaces(ConstString name, DIEArray &offsets) {
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
index cd588cb..4a3bc81 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(SymbolFileDWARFProperties.inc -gen-lldb-property-defs
+  SOURCE SymbolFileDWARFProperties.td
+  TARGET LLDBPluginSymbolFileDWARFPropertiesGen)
+
+lldb_tablegen(SymbolFileDWARFPropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE SymbolFileDWARFProperties.td
+  TARGET LLDBPluginSymbolFileDWARFPropertiesEnumGen)
+
 add_lldb_library(lldbPluginSymbolFileDWARF PLUGIN
   AppleDWARFIndex.cpp
   DebugNamesDWARFIndex.cpp
@@ -14,7 +22,6 @@
   DWARFDebugArangeSet.cpp
   DWARFDebugInfo.cpp
   DWARFDebugInfoEntry.cpp
-  DWARFDebugLine.cpp
   DWARFDebugMacro.cpp
   DWARFDebugRanges.cpp
   DWARFDeclContext.cpp
@@ -36,8 +43,6 @@
   UniqueDWARFASTType.cpp
 
   LINK_LIBS
-    clangAST
-    clangBasic
     lldbCore
     lldbExpression
     lldbHost
@@ -48,7 +53,14 @@
     lldbPluginObjCLanguage
     lldbPluginCPlusPlusLanguage
     lldbPluginExpressionParserClang
+  CLANG_LIBS
+    clangAST
+    clangBasic
   LINK_COMPONENTS
     DebugInfoDWARF
     Support
   )
+
+add_dependencies(lldbPluginSymbolFileDWARF
+  LLDBPluginSymbolFileDWARFPropertiesGen
+  LLDBPluginSymbolFileDWARFPropertiesEnumGen)
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
index e7927b31..7ee4727 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h
@@ -28,7 +28,6 @@
 
   virtual lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc,
                                           const DWARFDIE &die,
-                                          lldb_private::Log *log,
                                           bool *type_is_new_ptr) = 0;
 
   virtual lldb_private::Function *
@@ -48,8 +47,8 @@
   virtual lldb_private::CompilerDeclContext
   GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) = 0;
 
-  virtual std::vector<DWARFDIE>
-  GetDIEForDeclContext(lldb_private::CompilerDeclContext decl_context) = 0;
+  virtual void EnsureAllDIEsInDeclContextHaveBeenParsed(
+      lldb_private::CompilerDeclContext decl_context) = 0;
 
   static llvm::Optional<lldb_private::SymbolFile::ArrayInfo>
   ParseChildArrayInfo(const DWARFDIE &parent_die,
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index b85ab54..6166aa7 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -9,7 +9,6 @@
 #include <stdlib.h>
 
 #include "DWARFASTParserClang.h"
-#include "DWARFDIE.h"
 #include "DWARFDebugInfo.h"
 #include "DWARFDeclContext.h"
 #include "DWARFDefines.h"
@@ -23,12 +22,12 @@
 #include "lldb/Core/Value.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Symbol/ClangASTImporter.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
+#include "lldb/Symbol/ClangASTMetadata.h"
 #include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/TypeList.h"
 #include "lldb/Symbol/TypeMap.h"
 #include "lldb/Target/Language.h"
@@ -86,35 +85,6 @@
   return false;
 }
 
-struct BitfieldInfo {
-  uint64_t bit_size;
-  uint64_t bit_offset;
-
-  BitfieldInfo()
-      : bit_size(LLDB_INVALID_ADDRESS), bit_offset(LLDB_INVALID_ADDRESS) {}
-
-  void Clear() {
-    bit_size = LLDB_INVALID_ADDRESS;
-    bit_offset = LLDB_INVALID_ADDRESS;
-  }
-
-  bool IsValid() const {
-    return (bit_size != LLDB_INVALID_ADDRESS) &&
-           (bit_offset != LLDB_INVALID_ADDRESS);
-  }
-
-  bool NextBitfieldOffsetIsValid(const uint64_t next_bit_offset) const {
-    if (IsValid()) {
-      // This bitfield info is valid, so any subsequent bitfields must not
-      // overlap and must be at a higher bit offset than any previous bitfield
-      // + size.
-      return (bit_size + bit_offset) <= next_bit_offset;
-    } else {
-      // If the this BitfieldInfo is not valid, then any offset isOK
-      return true;
-    }
-  }
-};
 
 ClangASTImporter &DWARFASTParserClang::GetClangASTImporter() {
   if (!m_clang_ast_importer_up) {
@@ -136,59 +106,113 @@
   return false;
 }
 
-TypeSP DWARFASTParserClang::ParseTypeFromDWO(const DWARFDIE &die, Log *log) {
-  ModuleSP dwo_module_sp = die.GetContainingDWOModule();
-  if (!dwo_module_sp)
-    return TypeSP();
-
-  // If this type comes from a Clang module, look in the DWARF section
-  // of the pcm file in the module cache. Clang generates DWO skeleton
-  // units as breadcrumbs to find them.
-  std::vector<CompilerContext> decl_context;
-  die.GetDeclContext(decl_context);
-  TypeMap dwo_types;
-
-  if (!dwo_module_sp->GetSymbolVendor()->FindTypes(decl_context, true,
-                                                   dwo_types)) {
-    if (!IsClangModuleFwdDecl(die))
-      return TypeSP();
-
-    // Since this this type is defined in one of the Clang modules imported by
-    // this symbol file, search all of them.
-    auto &sym_file = die.GetCU()->GetSymbolFileDWARF();
-    for (const auto &name_module : sym_file.getExternalTypeModules()) {
-      if (!name_module.second)
-        continue;
-      SymbolVendor *sym_vendor = name_module.second->GetSymbolVendor();
-      if (sym_vendor->FindTypes(decl_context, true, dwo_types))
+static DWARFDIE GetContainingClangModuleDIE(const DWARFDIE &die) {
+  if (die.IsValid()) {
+    DWARFDIE top_module_die;
+    // Now make sure this DIE is scoped in a DW_TAG_module tag and return true
+    // if so
+    for (DWARFDIE parent = die.GetParent(); parent.IsValid();
+         parent = parent.GetParent()) {
+      const dw_tag_t tag = parent.Tag();
+      if (tag == DW_TAG_module)
+        top_module_die = parent;
+      else if (tag == DW_TAG_compile_unit || tag == DW_TAG_partial_unit)
         break;
     }
+
+    return top_module_die;
+  }
+  return DWARFDIE();
+}
+
+static lldb::ModuleSP GetContainingClangModule(const DWARFDIE &die) {
+  if (die.IsValid()) {
+    DWARFDIE clang_module_die = GetContainingClangModuleDIE(die);
+
+    if (clang_module_die) {
+      const char *module_name = clang_module_die.GetName();
+      if (module_name)
+        return die.GetDWARF()->GetExternalModule(
+            lldb_private::ConstString(module_name));
+    }
+  }
+  return lldb::ModuleSP();
+}
+
+TypeSP DWARFASTParserClang::ParseTypeFromClangModule(const SymbolContext &sc,
+                                                     const DWARFDIE &die,
+                                                     Log *log) {
+  ModuleSP clang_module_sp = GetContainingClangModule(die);
+  if (!clang_module_sp)
+    return TypeSP();
+
+  // If this type comes from a Clang module, recursively look in the
+  // DWARF section of the .pcm file in the module cache. Clang
+  // generates DWO skeleton units as breadcrumbs to find them.
+  llvm::SmallVector<CompilerContext, 4> decl_context;
+  die.GetDeclContext(decl_context);
+  TypeMap pcm_types;
+
+  // The type in the Clang module must have the same language as the current CU.
+  LanguageSet languages;
+  languages.Insert(die.GetCU()->GetLanguageType());
+  llvm::DenseSet<SymbolFile *> searched_symbol_files;
+  clang_module_sp->GetSymbolFile()->FindTypes(decl_context, languages,
+                                              searched_symbol_files, pcm_types);
+  if (pcm_types.Empty()) {
+    // Since this type is defined in one of the Clang modules imported
+    // by this symbol file, search all of them. Instead of calling
+    // sym_file->FindTypes(), which would return this again, go straight
+    // to the imported modules.
+    auto &sym_file = die.GetCU()->GetSymbolFileDWARF();
+
+    // Well-formed clang modules never form cycles; guard against corrupted
+    // ones by inserting the current file.
+    searched_symbol_files.insert(&sym_file);
+    sym_file.ForEachExternalModule(
+        *sc.comp_unit, searched_symbol_files, [&](Module &module) {
+          module.GetSymbolFile()->FindTypes(decl_context, languages,
+                                            searched_symbol_files, pcm_types);
+          return pcm_types.GetSize();
+        });
   }
 
-  if (dwo_types.GetSize() != 1)
+  if (!pcm_types.GetSize())
     return TypeSP();
 
   // We found a real definition for this type in the Clang module, so lets use
   // it and cache the fact that we found a complete type for this die.
-  TypeSP dwo_type_sp = dwo_types.GetTypeAtIndex(0);
-  if (!dwo_type_sp)
+  TypeSP pcm_type_sp = pcm_types.GetTypeAtIndex(0);
+  if (!pcm_type_sp)
     return TypeSP();
 
-  lldb_private::CompilerType dwo_type = dwo_type_sp->GetForwardCompilerType();
-
+  lldb_private::CompilerType pcm_type = pcm_type_sp->GetForwardCompilerType();
   lldb_private::CompilerType type =
-      GetClangASTImporter().CopyType(m_ast, dwo_type);
+      GetClangASTImporter().CopyType(m_ast, pcm_type);
 
   if (!type)
     return TypeSP();
 
+  // Under normal operation pcm_type is a shallow forward declaration
+  // that gets completed later. This is necessary to support cyclic
+  // data structures. If, however, pcm_type is already complete (for
+  // example, because it was loaded for a different target before),
+  // the definition needs to be imported right away, too.
+  // Type::ResolveClangType() effectively ignores the ResolveState
+  // inside type_sp and only looks at IsDefined(), so it never calls
+  // ClangASTImporter::ASTImporterDelegate::ImportDefinitionTo(),
+  // which does extra work for Objective-C classes. This would result
+  // in only the forward declaration to be visible.
+  if (pcm_type.IsDefined())
+    GetClangASTImporter().RequireCompleteType(ClangUtil::GetQualType(type));
+
   SymbolFileDWARF *dwarf = die.GetDWARF();
   TypeSP type_sp(new Type(
-      die.GetID(), dwarf, dwo_type_sp->GetName(), dwo_type_sp->GetByteSize(),
+      die.GetID(), dwarf, pcm_type_sp->GetName(), pcm_type_sp->GetByteSize(),
       nullptr, LLDB_INVALID_UID, Type::eEncodingInvalid,
-      &dwo_type_sp->GetDeclaration(), type, Type::eResolveStateForward));
+      &pcm_type_sp->GetDeclaration(), type, Type::ResolveState::Forward));
 
-  dwarf->GetTypeList()->Insert(type_sp);
+  dwarf->GetTypeList().Insert(type_sp);
   dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
   clang::TagDecl *tag_decl = ClangASTContext::GetAsTagDecl(type);
   if (tag_decl)
@@ -202,7 +226,8 @@
   return type_sp;
 }
 
-static void CompleteExternalTagDeclType(ClangASTImporter &ast_importer,
+static void CompleteExternalTagDeclType(ClangASTContext &ast,
+                                        ClangASTImporter &ast_importer,
                                         clang::DeclContext *decl_ctx,
                                         DWARFDIE die,
                                         const char *type_name_cstr) {
@@ -211,7 +236,7 @@
     return;
 
   // If this type was not imported from an external AST, there's nothing to do.
-  CompilerType type = ClangASTContext::GetTypeForDecl(tag_decl_ctx);
+  CompilerType type = ast.GetTypeForDecl(tag_decl_ctx);
   if (!type || !ast_importer.CanImport(type))
     return;
 
@@ -228,42 +253,7 @@
   }
 }
 
-namespace {
-/// Parsed form of all attributes that are relevant for type reconstruction.
-/// Some attributes are relevant for all kinds of types (declaration), while
-/// others are only meaningful to a specific type (is_virtual)
-struct ParsedTypeAttributes {
-  explicit ParsedTypeAttributes(const DWARFDIE &die);
-
-  AccessType accessibility = eAccessNone;
-  bool is_artificial = false;
-  bool is_complete_objc_class = false;
-  bool is_explicit = false;
-  bool is_forward_declaration = false;
-  bool is_inline = false;
-  bool is_scoped_enum = false;
-  bool is_vector = false;
-  bool is_virtual = false;
-  clang::StorageClass storage = clang::SC_None;
-  const char *mangled_name = nullptr;
-  ConstString name;
-  Declaration decl;
-  DWARFDIE object_pointer;
-  DWARFFormValue abstract_origin;
-  DWARFFormValue containing_type;
-  DWARFFormValue signature;
-  DWARFFormValue specification;
-  DWARFFormValue type;
-  LanguageType class_language = eLanguageTypeUnknown;
-  llvm::Optional<uint64_t> byte_size;
-  size_t calling_convention = llvm::dwarf::DW_CC_normal;
-  uint32_t bit_stride = 0;
-  uint32_t byte_stride = 0;
-  uint32_t encoding = 0;
-};
-} // namespace
-
-ParsedTypeAttributes::ParsedTypeAttributes(const DWARFDIE &die) {
+ParsedDWARFTypeAttributes::ParsedDWARFTypeAttributes(const DWARFDIE &die) {
   DWARFAttributes attributes;
   size_t num_attributes = die.GetAttributes(attributes);
   for (size_t i = 0; i < num_attributes; ++i) {
@@ -372,6 +362,10 @@
       is_complete_objc_class = form_value.Signed();
       break;
 
+    case DW_AT_APPLE_objc_direct:
+      is_objc_direct_call = true;
+      break;
+
     case DW_AT_APPLE_runtime_class:
       class_language = (LanguageType)form_value.Signed();
       break;
@@ -379,6 +373,9 @@
     case DW_AT_GNU_vector:
       is_vector = form_value.Boolean();
       break;
+    case DW_AT_export_symbols:
+      exports_symbols = form_value.Boolean();
+      break;
     }
   }
 }
@@ -390,13 +387,17 @@
 }
 
 TypeSP DWARFASTParserClang::ParseTypeFromDWARF(const SymbolContext &sc,
-                                               const DWARFDIE &die, Log *log,
+                                               const DWARFDIE &die,
                                                bool *type_is_new_ptr) {
   if (type_is_new_ptr)
     *type_is_new_ptr = false;
 
   if (!die)
     return nullptr;
+
+  Log *log(LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION |
+                                        DWARF_LOG_LOOKUPS));
+
   SymbolFileDWARF *dwarf = die.GetDWARF();
   if (log) {
     DWARFDIE context_die;
@@ -405,13 +406,12 @@
 
     dwarf->GetObjectFile()->GetModule()->LogMessage(
         log,
-        "SymbolFileDWARF::ParseType (die = 0x%8.8x, decl_ctx = %p (die "
-        "0x%8.8x)) %s name = '%s')",
+        "DWARFASTParserClang::ParseTypeFromDWARF "
+        "(die = 0x%8.8x, decl_ctx = %p (die 0x%8.8x)) %s name = '%s')",
         die.GetOffset(), static_cast<void *>(context), context_die.GetOffset(),
         die.GetTagAsCString(), die.GetName());
   }
 
-
   Type *type_ptr = dwarf->GetDIEToType().lookup(die.GetDIE());
   if (type_ptr == DIE_IS_BEING_PARSED)
     return nullptr;
@@ -420,11 +420,11 @@
   // Set a bit that lets us know that we are currently parsing this
   dwarf->GetDIEToType()[die.GetDIE()] = DIE_IS_BEING_PARSED;
 
-  ParsedTypeAttributes attrs(die);
+  ParsedDWARFTypeAttributes attrs(die);
 
   if (DWARFDIE signature_die = attrs.signature.Reference()) {
     if (TypeSP type_sp =
-            ParseTypeFromDWARF(sc, signature_die, log, type_is_new_ptr)) {
+            ParseTypeFromDWARF(sc, signature_die, type_is_new_ptr)) {
       dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
       if (clang::DeclContext *decl_ctx =
               GetCachedClangDeclContextForDIE(signature_die))
@@ -434,19 +434,13 @@
     return nullptr;
   }
 
-  TypeList *type_list = dwarf->GetTypeList();
   if (type_is_new_ptr)
     *type_is_new_ptr = true;
 
   const dw_tag_t tag = die.Tag();
 
-  Type::ResolveState resolve_state = Type::eResolveStateUnresolved;
-
-  Type::EncodingDataType encoding_data_type = Type::eEncodingIsUID;
-  CompilerType clang_type;
-
   TypeSP type_sp;
-  LanguageType cu_language = die.GetLanguage();
+
   switch (tag) {
   case DW_TAG_typedef:
   case DW_TAG_base_type:
@@ -456,1191 +450,36 @@
   case DW_TAG_const_type:
   case DW_TAG_restrict_type:
   case DW_TAG_volatile_type:
+  case DW_TAG_atomic_type:
   case DW_TAG_unspecified_type: {
-    if (tag == DW_TAG_typedef && attrs.type.IsValid()) {
-      // Try to parse a typedef from the DWO file first as modules can
-      // contain typedef'ed structures that have no names like:
-      //
-      //  typedef struct { int a; } Foo;
-      //
-      // In this case we will have a structure with no name and a typedef
-      // named "Foo" that points to this unnamed structure. The name in the
-      // typedef is the only identifier for the struct, so always try to
-      // get typedefs from DWO files if possible.
-      //
-      // The type_sp returned will be empty if the typedef doesn't exist in
-      // a DWO file, so it is cheap to call this function just to check.
-      //
-      // If we don't do this we end up creating a TypeSP that says this is
-      // a typedef to type 0x123 (the DW_AT_type value would be 0x123 in
-      // the DW_TAG_typedef), and this is the unnamed structure type. We
-      // will have a hard time tracking down an unnammed structure type in
-      // the module DWO file, so we make sure we don't get into this
-      // situation by always resolving typedefs from the DWO file.
-      const DWARFDIE encoding_die = attrs.type.Reference();
-
-      // First make sure that the die that this is typedef'ed to _is_ just
-      // a declaration (DW_AT_declaration == 1), not a full definition
-      // since template types can't be represented in modules since only
-      // concrete instances of templates are ever emitted and modules won't
-      // contain those
-      if (encoding_die &&
-          encoding_die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0) == 1) {
-        type_sp = ParseTypeFromDWO(die, log);
-        if (type_sp)
-          return type_sp;
-      }
-    }
-
-    DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\") type => 0x%8.8lx\n",
-                 die.GetID(), DW_TAG_value_to_name(tag), type_name_cstr,
-                 encoding_uid.Reference());
-
-    switch (tag) {
-    default:
-      break;
-
-    case DW_TAG_unspecified_type:
-      if (attrs.name == "nullptr_t" || attrs.name == "decltype(nullptr)") {
-        resolve_state = Type::eResolveStateFull;
-        clang_type = m_ast.GetBasicType(eBasicTypeNullPtr);
-        break;
-      }
-      // Fall through to base type below in case we can handle the type
-      // there...
-      LLVM_FALLTHROUGH;
-
-    case DW_TAG_base_type:
-      resolve_state = Type::eResolveStateFull;
-      clang_type = m_ast.GetBuiltinTypeForDWARFEncodingAndBitSize(
-          attrs.name.GetCString(), attrs.encoding,
-          attrs.byte_size.getValueOr(0) * 8);
-      break;
-
-    case DW_TAG_pointer_type:
-      encoding_data_type = Type::eEncodingIsPointerUID;
-      break;
-    case DW_TAG_reference_type:
-      encoding_data_type = Type::eEncodingIsLValueReferenceUID;
-      break;
-    case DW_TAG_rvalue_reference_type:
-      encoding_data_type = Type::eEncodingIsRValueReferenceUID;
-      break;
-    case DW_TAG_typedef:
-      encoding_data_type = Type::eEncodingIsTypedefUID;
-      break;
-    case DW_TAG_const_type:
-      encoding_data_type = Type::eEncodingIsConstUID;
-      break;
-    case DW_TAG_restrict_type:
-      encoding_data_type = Type::eEncodingIsRestrictUID;
-      break;
-    case DW_TAG_volatile_type:
-      encoding_data_type = Type::eEncodingIsVolatileUID;
-      break;
-    }
-
-    if (!clang_type && (encoding_data_type == Type::eEncodingIsPointerUID ||
-                        encoding_data_type == Type::eEncodingIsTypedefUID)) {
-      if (tag == DW_TAG_pointer_type) {
-        DWARFDIE target_die = die.GetReferencedDIE(DW_AT_type);
-
-        if (target_die.GetAttributeValueAsUnsigned(DW_AT_APPLE_block, 0)) {
-          // Blocks have a __FuncPtr inside them which is a pointer to a
-          // function of the proper type.
-
-          for (DWARFDIE child_die = target_die.GetFirstChild();
-               child_die.IsValid(); child_die = child_die.GetSibling()) {
-            if (!strcmp(child_die.GetAttributeValueAsString(DW_AT_name, ""),
-                        "__FuncPtr")) {
-              DWARFDIE function_pointer_type =
-                  child_die.GetReferencedDIE(DW_AT_type);
-
-              if (function_pointer_type) {
-                DWARFDIE function_type =
-                    function_pointer_type.GetReferencedDIE(DW_AT_type);
-
-                bool function_type_is_new_pointer;
-                TypeSP lldb_function_type_sp = ParseTypeFromDWARF(
-                    sc, function_type, log, &function_type_is_new_pointer);
-
-                if (lldb_function_type_sp) {
-                  clang_type = m_ast.CreateBlockPointerType(
-                      lldb_function_type_sp->GetForwardCompilerType());
-                  encoding_data_type = Type::eEncodingIsUID;
-                  attrs.type.Clear();
-                  resolve_state = Type::eResolveStateFull;
-                }
-              }
-
-              break;
-            }
-          }
-        }
-      }
-
-      if (cu_language == eLanguageTypeObjC ||
-          cu_language == eLanguageTypeObjC_plus_plus) {
-        if (attrs.name) {
-          static ConstString g_objc_type_name_id("id");
-          static ConstString g_objc_type_name_Class("Class");
-          static ConstString g_objc_type_name_selector("SEL");
-
-          if (attrs.name == g_objc_type_name_id) {
-            if (log)
-              dwarf->GetObjectFile()->GetModule()->LogMessage(
-                  log,
-                  "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' "
-                  "is Objective-C 'id' built-in type.",
-                  die.GetOffset(), die.GetTagAsCString(), die.GetName());
-            clang_type = m_ast.GetBasicType(eBasicTypeObjCID);
-            encoding_data_type = Type::eEncodingIsUID;
-            attrs.type.Clear();
-            resolve_state = Type::eResolveStateFull;
-
-          } else if (attrs.name == g_objc_type_name_Class) {
-            if (log)
-              dwarf->GetObjectFile()->GetModule()->LogMessage(
-                  log,
-                  "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' "
-                  "is Objective-C 'Class' built-in type.",
-                  die.GetOffset(), die.GetTagAsCString(), die.GetName());
-            clang_type = m_ast.GetBasicType(eBasicTypeObjCClass);
-            encoding_data_type = Type::eEncodingIsUID;
-            attrs.type.Clear();
-            resolve_state = Type::eResolveStateFull;
-          } else if (attrs.name == g_objc_type_name_selector) {
-            if (log)
-              dwarf->GetObjectFile()->GetModule()->LogMessage(
-                  log,
-                  "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' "
-                  "is Objective-C 'selector' built-in type.",
-                  die.GetOffset(), die.GetTagAsCString(), die.GetName());
-            clang_type = m_ast.GetBasicType(eBasicTypeObjCSel);
-            encoding_data_type = Type::eEncodingIsUID;
-            attrs.type.Clear();
-            resolve_state = Type::eResolveStateFull;
-          }
-        } else if (encoding_data_type == Type::eEncodingIsPointerUID &&
-                   attrs.type.IsValid()) {
-          // Clang sometimes erroneously emits id as objc_object*.  In that
-          // case we fix up the type to "id".
-
-          const DWARFDIE encoding_die = attrs.type.Reference();
-
-          if (encoding_die && encoding_die.Tag() == DW_TAG_structure_type) {
-            if (const char *struct_name = encoding_die.GetName()) {
-              if (!strcmp(struct_name, "objc_object")) {
-                if (log)
-                  dwarf->GetObjectFile()->GetModule()->LogMessage(
-                      log,
-                      "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s "
-                      "'%s' is 'objc_object*', which we overrode to "
-                      "'id'.",
-                      die.GetOffset(), die.GetTagAsCString(), die.GetName());
-                clang_type = m_ast.GetBasicType(eBasicTypeObjCID);
-                encoding_data_type = Type::eEncodingIsUID;
-                attrs.type.Clear();
-                resolve_state = Type::eResolveStateFull;
-              }
-            }
-          }
-        }
-      }
-    }
-
-    type_sp = std::make_shared<Type>(
-        die.GetID(), dwarf, attrs.name, attrs.byte_size, nullptr,
-        dwarf->GetUID(attrs.type.Reference()), encoding_data_type, &attrs.decl,
-        clang_type, resolve_state);
-
-    dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
-  } break;
+    type_sp = ParseTypeModifier(sc, die, attrs);
+    break;
+  }
 
   case DW_TAG_structure_type:
   case DW_TAG_union_type:
   case DW_TAG_class_type: {
-    // UniqueDWARFASTType is large, so don't create a local variables on
-    // the stack, put it on the heap. This function is often called
-    // recursively and clang isn't good and sharing the stack space for
-    // variables in different blocks.
-    std::unique_ptr<UniqueDWARFASTType> unique_ast_entry_up(
-        new UniqueDWARFASTType());
-
-    ConstString unique_typename(attrs.name);
-    Declaration unique_decl(attrs.decl);
-
-    if (attrs.name) {
-      if (Language::LanguageIsCPlusPlus(cu_language)) {
-        // For C++, we rely solely upon the one definition rule that says
-        // only one thing can exist at a given decl context. We ignore the
-        // file and line that things are declared on.
-        std::string qualified_name;
-        if (die.GetQualifiedName(qualified_name))
-          unique_typename = ConstString(qualified_name);
-        unique_decl.Clear();
-      }
-
-      if (dwarf->GetUniqueDWARFASTTypeMap().Find(
-              unique_typename, die, unique_decl, attrs.byte_size.getValueOr(-1),
-              *unique_ast_entry_up)) {
-        type_sp = unique_ast_entry_up->m_type_sp;
-        if (type_sp) {
-          dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
-          return type_sp;
-        }
-      }
-    }
-
-    DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
-                 DW_TAG_value_to_name(tag), type_name_cstr);
-
-    int tag_decl_kind = -1;
-    AccessType default_accessibility = eAccessNone;
-    if (tag == DW_TAG_structure_type) {
-      tag_decl_kind = clang::TTK_Struct;
-      default_accessibility = eAccessPublic;
-    } else if (tag == DW_TAG_union_type) {
-      tag_decl_kind = clang::TTK_Union;
-      default_accessibility = eAccessPublic;
-    } else if (tag == DW_TAG_class_type) {
-      tag_decl_kind = clang::TTK_Class;
-      default_accessibility = eAccessPrivate;
-    }
-
-    if (attrs.byte_size && *attrs.byte_size == 0 && attrs.name &&
-        !die.HasChildren() && cu_language == eLanguageTypeObjC) {
-      // Work around an issue with clang at the moment where forward
-      // declarations for objective C classes are emitted as:
-      //  DW_TAG_structure_type [2]
-      //  DW_AT_name( "ForwardObjcClass" )
-      //  DW_AT_byte_size( 0x00 )
-      //  DW_AT_decl_file( "..." )
-      //  DW_AT_decl_line( 1 )
-      //
-      // Note that there is no DW_AT_declaration and there are no children,
-      // and the byte size is zero.
-      attrs.is_forward_declaration = true;
-    }
-
-    if (attrs.class_language == eLanguageTypeObjC ||
-        attrs.class_language == eLanguageTypeObjC_plus_plus) {
-      if (!attrs.is_complete_objc_class &&
-          die.Supports_DW_AT_APPLE_objc_complete_type()) {
-        // We have a valid eSymbolTypeObjCClass class symbol whose name
-        // matches the current objective C class that we are trying to find
-        // and this DIE isn't the complete definition (we checked
-        // is_complete_objc_class above and know it is false), so the real
-        // definition is in here somewhere
-        type_sp =
-            dwarf->FindCompleteObjCDefinitionTypeForDIE(die, attrs.name, true);
-
-        if (!type_sp) {
-          SymbolFileDWARFDebugMap *debug_map_symfile =
-              dwarf->GetDebugMapSymfile();
-          if (debug_map_symfile) {
-            // We weren't able to find a full declaration in this DWARF,
-            // see if we have a declaration anywhere else...
-            type_sp = debug_map_symfile->FindCompleteObjCDefinitionTypeForDIE(
-                die, attrs.name, true);
-          }
-        }
-
-        if (type_sp) {
-          if (log) {
-            dwarf->GetObjectFile()->GetModule()->LogMessage(
-                log,
-                "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is an "
-                "incomplete objc type, complete type is 0x%8.8" PRIx64,
-                static_cast<void *>(this), die.GetOffset(),
-                DW_TAG_value_to_name(tag), attrs.name.GetCString(),
-                type_sp->GetID());
-          }
-
-          // We found a real definition for this type elsewhere so lets use
-          // it and cache the fact that we found a complete type for this
-          // die
-          dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
-          return type_sp;
-        }
-      }
-    }
-
-    if (attrs.is_forward_declaration) {
-      // We have a forward declaration to a type and we need to try and
-      // find a full declaration. We look in the current type index just in
-      // case we have a forward declaration followed by an actual
-      // declarations in the DWARF. If this fails, we need to look
-      // elsewhere...
-      if (log) {
-        dwarf->GetObjectFile()->GetModule()->LogMessage(
-            log,
-            "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a "
-            "forward declaration, trying to find complete type",
-            static_cast<void *>(this), die.GetOffset(),
-            DW_TAG_value_to_name(tag), attrs.name.GetCString());
-      }
-
-      // See if the type comes from a DWO module and if so, track down that
-      // type.
-      type_sp = ParseTypeFromDWO(die, log);
-      if (type_sp)
-        return type_sp;
-
-      DWARFDeclContext die_decl_ctx;
-      die.GetDWARFDeclContext(die_decl_ctx);
-
-      // type_sp = FindDefinitionTypeForDIE (dwarf_cu, die,
-      // type_name_const_str);
-      type_sp = dwarf->FindDefinitionTypeForDWARFDeclContext(die_decl_ctx);
-
-      if (!type_sp) {
-        SymbolFileDWARFDebugMap *debug_map_symfile =
-            dwarf->GetDebugMapSymfile();
-        if (debug_map_symfile) {
-          // We weren't able to find a full declaration in this DWARF, see
-          // if we have a declaration anywhere else...
-          type_sp = debug_map_symfile->FindDefinitionTypeForDWARFDeclContext(
-              die_decl_ctx);
-        }
-      }
-
-      if (type_sp) {
-        if (log) {
-          dwarf->GetObjectFile()->GetModule()->LogMessage(
-              log,
-              "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a "
-              "forward declaration, complete type is 0x%8.8" PRIx64,
-              static_cast<void *>(this), die.GetOffset(),
-              DW_TAG_value_to_name(tag), attrs.name.GetCString(),
-              type_sp->GetID());
-        }
-
-        // We found a real definition for this type elsewhere so lets use
-        // it and cache the fact that we found a complete type for this die
-        dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
-        clang::DeclContext *defn_decl_ctx =
-            GetCachedClangDeclContextForDIE(dwarf->GetDIE(type_sp->GetID()));
-        if (defn_decl_ctx)
-          LinkDeclContextToDIE(defn_decl_ctx, die);
-        return type_sp;
-      }
-    }
-    assert(tag_decl_kind != -1);
-    bool clang_type_was_created = false;
-    clang_type.SetCompilerType(
-        &m_ast, dwarf->GetForwardDeclDieToClangType().lookup(die.GetDIE()));
-    if (!clang_type) {
-      clang::DeclContext *decl_ctx =
-          GetClangDeclContextContainingDIE(die, nullptr);
-
-      // If your decl context is a record that was imported from another
-      // AST context (in the gmodules case), we need to make sure the type
-      // backing the Decl is complete before adding children to it. This is
-      // not an issue in the non-gmodules case because the debug info will
-      // always contain a full definition of parent types in that case.
-      CompleteExternalTagDeclType(GetClangASTImporter(), decl_ctx, die,
-                                  attrs.name.GetCString());
-
-      if (attrs.accessibility == eAccessNone && decl_ctx) {
-        // Check the decl context that contains this class/struct/union. If
-        // it is a class we must give it an accessibility.
-        const clang::Decl::Kind containing_decl_kind = decl_ctx->getDeclKind();
-        if (DeclKindIsCXXClass(containing_decl_kind))
-          attrs.accessibility = default_accessibility;
-      }
-
-      ClangASTMetadata metadata;
-      metadata.SetUserID(die.GetID());
-      metadata.SetIsDynamicCXXType(dwarf->ClassOrStructIsVirtual(die));
-
-      if (attrs.name.GetStringRef().contains('<')) {
-        ClangASTContext::TemplateParameterInfos template_param_infos;
-        if (ParseTemplateParameterInfos(die, template_param_infos)) {
-          clang::ClassTemplateDecl *class_template_decl =
-              m_ast.ParseClassTemplateDecl(decl_ctx, attrs.accessibility,
-                                           attrs.name.GetCString(),
-                                           tag_decl_kind, template_param_infos);
-          if (!class_template_decl) {
-            if (log) {
-              dwarf->GetObjectFile()->GetModule()->LogMessage(
-                  log,
-                  "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" "
-                  "clang::ClassTemplateDecl failed to return a decl.",
-                  static_cast<void *>(this), die.GetOffset(),
-                  DW_TAG_value_to_name(tag), attrs.name.GetCString());
-            }
-            return TypeSP();
-          }
-
-          clang::ClassTemplateSpecializationDecl *class_specialization_decl =
-              m_ast.CreateClassTemplateSpecializationDecl(
-                  decl_ctx, class_template_decl, tag_decl_kind,
-                  template_param_infos);
-          clang_type = m_ast.CreateClassTemplateSpecializationType(
-              class_specialization_decl);
-          clang_type_was_created = true;
-
-          m_ast.SetMetadata(class_template_decl, metadata);
-          m_ast.SetMetadata(class_specialization_decl, metadata);
-        }
-      }
-
-      if (!clang_type_was_created) {
-        clang_type_was_created = true;
-        clang_type = m_ast.CreateRecordType(
-            decl_ctx, attrs.accessibility, attrs.name.GetCString(),
-            tag_decl_kind, attrs.class_language, &metadata);
-      }
-    }
-
-    // Store a forward declaration to this class type in case any
-    // parameters in any class methods need it for the clang types for
-    // function prototypes.
-    LinkDeclContextToDIE(m_ast.GetDeclContextForType(clang_type), die);
-    type_sp = std::make_shared<Type>(die.GetID(), dwarf, attrs.name,
-                                     attrs.byte_size, nullptr, LLDB_INVALID_UID,
-                                     Type::eEncodingIsUID, &attrs.decl, clang_type,
-                                     Type::eResolveStateForward);
-
-    type_sp->SetIsCompleteObjCClass(attrs.is_complete_objc_class);
-
-    // Add our type to the unique type map so we don't end up creating many
-    // copies of the same type over and over in the ASTContext for our
-    // module
-    unique_ast_entry_up->m_type_sp = type_sp;
-    unique_ast_entry_up->m_die = die;
-    unique_ast_entry_up->m_declaration = unique_decl;
-    unique_ast_entry_up->m_byte_size = attrs.byte_size.getValueOr(0);
-    dwarf->GetUniqueDWARFASTTypeMap().Insert(unique_typename,
-                                             *unique_ast_entry_up);
-
-    if (attrs.is_forward_declaration && die.HasChildren()) {
-      // Check to see if the DIE actually has a definition, some version of
-      // GCC will
-      // emit DIEs with DW_AT_declaration set to true, but yet still have
-      // subprogram, members, or inheritance, so we can't trust it
-      DWARFDIE child_die = die.GetFirstChild();
-      while (child_die) {
-        switch (child_die.Tag()) {
-        case DW_TAG_inheritance:
-        case DW_TAG_subprogram:
-        case DW_TAG_member:
-        case DW_TAG_APPLE_property:
-        case DW_TAG_class_type:
-        case DW_TAG_structure_type:
-        case DW_TAG_enumeration_type:
-        case DW_TAG_typedef:
-        case DW_TAG_union_type:
-          child_die.Clear();
-          attrs.is_forward_declaration = false;
-          break;
-        default:
-          child_die = child_die.GetSibling();
-          break;
-        }
-      }
-    }
-
-    if (!attrs.is_forward_declaration) {
-      // Always start the definition for a class type so that if the class
-      // has child classes or types that require the class to be created
-      // for use as their decl contexts the class will be ready to accept
-      // these child definitions.
-      if (!die.HasChildren()) {
-        // No children for this struct/union/class, lets finish it
-        if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) {
-          ClangASTContext::CompleteTagDeclarationDefinition(clang_type);
-        } else {
-          dwarf->GetObjectFile()->GetModule()->ReportError(
-              "DWARF DIE at 0x%8.8x named \"%s\" was not able to start its "
-              "definition.\nPlease file a bug and attach the file at the "
-              "start of this error message",
-              die.GetOffset(), attrs.name.GetCString());
-        }
-
-        if (tag == DW_TAG_structure_type) // this only applies in C
-        {
-          clang::RecordDecl *record_decl =
-              ClangASTContext::GetAsRecordDecl(clang_type);
-
-          if (record_decl) {
-            GetClangASTImporter().InsertRecordDecl(
-                record_decl, ClangASTImporter::LayoutInfo());
-          }
-        }
-      } else if (clang_type_was_created) {
-        // Start the definition if the class is not objective C since the
-        // underlying decls respond to isCompleteDefinition(). Objective
-        // C decls don't respond to isCompleteDefinition() so we can't
-        // start the declaration definition right away. For C++
-        // class/union/structs we want to start the definition in case the
-        // class is needed as the declaration context for a contained class
-        // or type without the need to complete that type..
-
-        if (attrs.class_language != eLanguageTypeObjC &&
-            attrs.class_language != eLanguageTypeObjC_plus_plus)
-          ClangASTContext::StartTagDeclarationDefinition(clang_type);
-
-        // Leave this as a forward declaration until we need to know the
-        // details of the type. lldb_private::Type will automatically call
-        // the SymbolFile virtual function
-        // "SymbolFileDWARF::CompleteType(Type *)" When the definition
-        // needs to be defined.
-        assert(!dwarf->GetForwardDeclClangTypeToDie().count(
-                   ClangUtil::RemoveFastQualifiers(clang_type)
-                       .GetOpaqueQualType()) &&
-               "Type already in the forward declaration map!");
-        // Can't assume m_ast.GetSymbolFile() is actually a
-        // SymbolFileDWARF, it can be a SymbolFileDWARFDebugMap for Apple
-        // binaries.
-        dwarf->GetForwardDeclDieToClangType()[die.GetDIE()] =
-            clang_type.GetOpaqueQualType();
-        dwarf->GetForwardDeclClangTypeToDie()
-            [ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType()] =
-            die.GetID();
-        m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), true);
-      }
-    }
-
-    // If we made a clang type, set the trivial abi if applicable: We only
-    // do this for pass by value - which implies the Trivial ABI. There
-    // isn't a way to assert that something that would normally be pass by
-    // value is pass by reference, so we ignore that attribute if set.
-    if (attrs.calling_convention == llvm::dwarf::DW_CC_pass_by_value) {
-      clang::CXXRecordDecl *record_decl =
-          m_ast.GetAsCXXRecordDecl(clang_type.GetOpaqueQualType());
-      if (record_decl) {
-        record_decl->setHasTrivialSpecialMemberForCall();
-      }
-    }
-
-    if (attrs.calling_convention == llvm::dwarf::DW_CC_pass_by_reference) {
-      clang::CXXRecordDecl *record_decl =
-          m_ast.GetAsCXXRecordDecl(clang_type.GetOpaqueQualType());
-      if (record_decl)
-        record_decl->setArgPassingRestrictions(
-            clang::RecordDecl::APK_CannotPassInRegs);
-    }
-
-  } break;
+    type_sp = ParseStructureLikeDIE(sc, die, attrs);
+    break;
+  }
 
   case DW_TAG_enumeration_type: {
-    if (attrs.is_forward_declaration) {
-      type_sp = ParseTypeFromDWO(die, log);
-      if (type_sp)
-        return type_sp;
-
-      DWARFDeclContext die_decl_ctx;
-      die.GetDWARFDeclContext(die_decl_ctx);
-
-      type_sp = dwarf->FindDefinitionTypeForDWARFDeclContext(die_decl_ctx);
-
-      if (!type_sp) {
-        SymbolFileDWARFDebugMap *debug_map_symfile =
-            dwarf->GetDebugMapSymfile();
-        if (debug_map_symfile) {
-          // We weren't able to find a full declaration in this DWARF,
-          // see if we have a declaration anywhere else...
-          type_sp = debug_map_symfile->FindDefinitionTypeForDWARFDeclContext(
-              die_decl_ctx);
-        }
-      }
-
-      if (type_sp) {
-        if (log) {
-          dwarf->GetObjectFile()->GetModule()->LogMessage(
-              log,
-              "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a "
-              "forward declaration, complete type is 0x%8.8" PRIx64,
-              static_cast<void *>(this), die.GetOffset(),
-              DW_TAG_value_to_name(tag), attrs.name.GetCString(),
-              type_sp->GetID());
-        }
-
-        // We found a real definition for this type elsewhere so lets use
-        // it and cache the fact that we found a complete type for this
-        // die
-        dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
-        clang::DeclContext *defn_decl_ctx =
-            GetCachedClangDeclContextForDIE(dwarf->GetDIE(type_sp->GetID()));
-        if (defn_decl_ctx)
-          LinkDeclContextToDIE(defn_decl_ctx, die);
-        return type_sp;
-      }
-    }
-    DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
-                 DW_TAG_value_to_name(tag), type_name_cstr);
-
-    CompilerType enumerator_clang_type;
-    clang_type.SetCompilerType(
-        &m_ast, dwarf->GetForwardDeclDieToClangType().lookup(die.GetDIE()));
-    if (!clang_type) {
-      if (attrs.type.IsValid()) {
-        Type *enumerator_type =
-            dwarf->ResolveTypeUID(attrs.type.Reference(), true);
-        if (enumerator_type)
-          enumerator_clang_type = enumerator_type->GetFullCompilerType();
-      }
-
-      if (!enumerator_clang_type) {
-        if (attrs.byte_size) {
-          enumerator_clang_type =
-              m_ast.GetBuiltinTypeForDWARFEncodingAndBitSize(
-                  NULL, DW_ATE_signed, *attrs.byte_size * 8);
-        } else {
-          enumerator_clang_type = m_ast.GetBasicType(eBasicTypeInt);
-        }
-      }
-
-      clang_type = m_ast.CreateEnumerationType(
-          attrs.name.GetCString(),
-          GetClangDeclContextContainingDIE(die, nullptr), attrs.decl,
-          enumerator_clang_type, attrs.is_scoped_enum);
-    } else {
-      enumerator_clang_type =
-          m_ast.GetEnumerationIntegerType(clang_type.GetOpaqueQualType());
-    }
-
-    LinkDeclContextToDIE(ClangASTContext::GetDeclContextForType(clang_type),
-                         die);
-
-    type_sp = std::make_shared<Type>(
-        die.GetID(), dwarf, attrs.name, attrs.byte_size, nullptr,
-        dwarf->GetUID(attrs.type.Reference()), Type::eEncodingIsUID,
-        &attrs.decl, clang_type, Type::eResolveStateForward);
-
-    if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) {
-      if (die.HasChildren()) {
-        bool is_signed = false;
-        enumerator_clang_type.IsIntegerType(is_signed);
-        ParseChildEnumerators(clang_type, is_signed,
-                              type_sp->GetByteSize().getValueOr(0), die);
-      }
-      ClangASTContext::CompleteTagDeclarationDefinition(clang_type);
-    } else {
-      dwarf->GetObjectFile()->GetModule()->ReportError(
-          "DWARF DIE at 0x%8.8x named \"%s\" was not able to start its "
-          "definition.\nPlease file a bug and attach the file at the "
-          "start of this error message",
-          die.GetOffset(), attrs.name.GetCString());
-    }
-  } break;
+    type_sp = ParseEnum(sc, die, attrs);
+    break;
+  }
 
   case DW_TAG_inlined_subroutine:
   case DW_TAG_subprogram:
   case DW_TAG_subroutine_type: {
-    bool is_variadic = false;
-    bool is_static = false;
-    bool has_template_params = false;
-
-    unsigned type_quals = 0;
-
-    std::string object_pointer_name;
-    if (attrs.object_pointer) {
-      const char *object_pointer_name_cstr = attrs.object_pointer.GetName();
-      if (object_pointer_name_cstr)
-        object_pointer_name = object_pointer_name_cstr;
-    }
-
-    DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
-                 DW_TAG_value_to_name(tag), type_name_cstr);
-
-    CompilerType return_clang_type;
-    Type *func_type = NULL;
-
-    if (attrs.type.IsValid())
-      func_type = dwarf->ResolveTypeUID(attrs.type.Reference(), true);
-
-    if (func_type)
-      return_clang_type = func_type->GetForwardCompilerType();
-    else
-      return_clang_type = m_ast.GetBasicType(eBasicTypeVoid);
-
-    std::vector<CompilerType> function_param_types;
-    std::vector<clang::ParmVarDecl *> function_param_decls;
-
-    // Parse the function children for the parameters
-
-    DWARFDIE decl_ctx_die;
-    clang::DeclContext *containing_decl_ctx =
-        GetClangDeclContextContainingDIE(die, &decl_ctx_die);
-    const clang::Decl::Kind containing_decl_kind =
-        containing_decl_ctx->getDeclKind();
-
-    bool is_cxx_method = DeclKindIsCXXClass(containing_decl_kind);
-    // Start off static. This will be set to false in
-    // ParseChildParameters(...) if we find a "this" parameters as the
-    // first parameter
-    if (is_cxx_method) {
-      is_static = true;
-    }
-
-    if (die.HasChildren()) {
-      bool skip_artificial = true;
-      ParseChildParameters(containing_decl_ctx, die, skip_artificial, is_static,
-                           is_variadic, has_template_params,
-                           function_param_types, function_param_decls,
-                           type_quals);
-    }
-
-    bool ignore_containing_context = false;
-    // Check for templatized class member functions. If we had any
-    // DW_TAG_template_type_parameter or DW_TAG_template_value_parameter
-    // the DW_TAG_subprogram DIE, then we can't let this become a method in
-    // a class. Why? Because templatized functions are only emitted if one
-    // of the templatized methods is used in the current compile unit and
-    // we will end up with classes that may or may not include these member
-    // functions and this means one class won't match another class
-    // definition and it affects our ability to use a class in the clang
-    // expression parser. So for the greater good, we currently must not
-    // allow any template member functions in a class definition.
-    if (is_cxx_method && has_template_params) {
-      ignore_containing_context = true;
-      is_cxx_method = false;
-    }
-
-    // clang_type will get the function prototype clang type after this
-    // call
-    clang_type = m_ast.CreateFunctionType(
-        return_clang_type, function_param_types.data(),
-        function_param_types.size(), is_variadic, type_quals);
-
-    if (attrs.name) {
-      bool type_handled = false;
-      if (tag == DW_TAG_subprogram || tag == DW_TAG_inlined_subroutine) {
-        ObjCLanguage::MethodName objc_method(attrs.name.GetStringRef(), true);
-        if (objc_method.IsValid(true)) {
-          CompilerType class_opaque_type;
-          ConstString class_name(objc_method.GetClassName());
-          if (class_name) {
-            TypeSP complete_objc_class_type_sp(
-                dwarf->FindCompleteObjCDefinitionTypeForDIE(DWARFDIE(),
-                                                            class_name, false));
-
-            if (complete_objc_class_type_sp) {
-              CompilerType type_clang_forward_type =
-                  complete_objc_class_type_sp->GetForwardCompilerType();
-              if (ClangASTContext::IsObjCObjectOrInterfaceType(
-                      type_clang_forward_type))
-                class_opaque_type = type_clang_forward_type;
-            }
-          }
-
-          if (class_opaque_type) {
-            // If accessibility isn't set to anything valid, assume public
-            // for now...
-            if (attrs.accessibility == eAccessNone)
-              attrs.accessibility = eAccessPublic;
-
-            clang::ObjCMethodDecl *objc_method_decl =
-                m_ast.AddMethodToObjCObjectType(
-                    class_opaque_type, attrs.name.GetCString(), clang_type,
-                    attrs.accessibility, attrs.is_artificial, is_variadic);
-            type_handled = objc_method_decl != NULL;
-            if (type_handled) {
-              LinkDeclContextToDIE(
-                  ClangASTContext::GetAsDeclContext(objc_method_decl), die);
-              m_ast.SetMetadataAsUserID(objc_method_decl, die.GetID());
-            } else {
-              dwarf->GetObjectFile()->GetModule()->ReportError(
-                  "{0x%8.8x}: invalid Objective-C method 0x%4.4x (%s), "
-                  "please file a bug and attach the file at the start of "
-                  "this error message",
-                  die.GetOffset(), tag, DW_TAG_value_to_name(tag));
-            }
-          }
-        } else if (is_cxx_method) {
-          // Look at the parent of this DIE and see if is is a class or
-          // struct and see if this is actually a C++ method
-          Type *class_type = dwarf->ResolveType(decl_ctx_die);
-          if (class_type) {
-            bool alternate_defn = false;
-            if (class_type->GetID() != decl_ctx_die.GetID() ||
-                decl_ctx_die.GetContainingDWOModuleDIE()) {
-              alternate_defn = true;
-
-              // We uniqued the parent class of this function to another
-              // class so we now need to associate all dies under
-              // "decl_ctx_die" to DIEs in the DIE for "class_type"...
-              DWARFDIE class_type_die = dwarf->GetDIE(class_type->GetID());
-
-              if (class_type_die) {
-                std::vector<DWARFDIE> failures;
-
-                CopyUniqueClassMethodTypes(decl_ctx_die, class_type_die,
-                                           class_type, failures);
-
-                // FIXME do something with these failures that's smarter
-                // than
-                // just dropping them on the ground.  Unfortunately classes
-                // don't like having stuff added to them after their
-                // definitions are complete...
-
-                type_ptr = dwarf->GetDIEToType()[die.GetDIE()];
-                if (type_ptr && type_ptr != DIE_IS_BEING_PARSED) {
-                  type_sp = type_ptr->shared_from_this();
-                  break;
-                }
-              }
-            }
-
-            if (attrs.specification.IsValid()) {
-              // We have a specification which we are going to base our
-              // function prototype off of, so we need this type to be
-              // completed so that the m_die_to_decl_ctx for the method in
-              // the specification has a valid clang decl context.
-              class_type->GetForwardCompilerType();
-              // If we have a specification, then the function type should
-              // have been made with the specification and not with this
-              // die.
-              DWARFDIE spec_die = attrs.specification.Reference();
-              clang::DeclContext *spec_clang_decl_ctx =
-                  GetClangDeclContextForDIE(spec_die);
-              if (spec_clang_decl_ctx) {
-                LinkDeclContextToDIE(spec_clang_decl_ctx, die);
-              } else {
-                dwarf->GetObjectFile()->GetModule()->ReportWarning(
-                    "0x%8.8" PRIx64 ": DW_AT_specification(0x%8.8x"
-                    ") has no decl\n",
-                    die.GetID(), spec_die.GetOffset());
-              }
-              type_handled = true;
-            } else if (attrs.abstract_origin.IsValid()) {
-              // We have a specification which we are going to base our
-              // function prototype off of, so we need this type to be
-              // completed so that the m_die_to_decl_ctx for the method in
-              // the abstract origin has a valid clang decl context.
-              class_type->GetForwardCompilerType();
-
-              DWARFDIE abs_die = attrs.abstract_origin.Reference();
-              clang::DeclContext *abs_clang_decl_ctx =
-                  GetClangDeclContextForDIE(abs_die);
-              if (abs_clang_decl_ctx) {
-                LinkDeclContextToDIE(abs_clang_decl_ctx, die);
-              } else {
-                dwarf->GetObjectFile()->GetModule()->ReportWarning(
-                    "0x%8.8" PRIx64 ": DW_AT_abstract_origin(0x%8.8x"
-                    ") has no decl\n",
-                    die.GetID(), abs_die.GetOffset());
-              }
-              type_handled = true;
-            } else {
-              CompilerType class_opaque_type =
-                  class_type->GetForwardCompilerType();
-              if (ClangASTContext::IsCXXClassType(class_opaque_type)) {
-                if (class_opaque_type.IsBeingDefined() || alternate_defn) {
-                  if (!is_static && !die.HasChildren()) {
-                    // We have a C++ member function with no children (this
-                    // pointer!) and clang will get mad if we try and make
-                    // a function that isn't well formed in the DWARF, so
-                    // we will just skip it...
-                    type_handled = true;
-                  } else {
-                    bool add_method = true;
-                    if (alternate_defn) {
-                      // If an alternate definition for the class exists,
-                      // then add the method only if an equivalent is not
-                      // already present.
-                      clang::CXXRecordDecl *record_decl =
-                          m_ast.GetAsCXXRecordDecl(
-                              class_opaque_type.GetOpaqueQualType());
-                      if (record_decl) {
-                        for (auto method_iter = record_decl->method_begin();
-                             method_iter != record_decl->method_end();
-                             method_iter++) {
-                          clang::CXXMethodDecl *method_decl = *method_iter;
-                          if (method_decl->getNameInfo().getAsString() ==
-                              attrs.name.GetStringRef()) {
-                            if (method_decl->getType() ==
-                                ClangUtil::GetQualType(clang_type)) {
-                              add_method = false;
-                              LinkDeclContextToDIE(
-                                  ClangASTContext::GetAsDeclContext(
-                                      method_decl),
-                                  die);
-                              type_handled = true;
-
-                              break;
-                            }
-                          }
-                        }
-                      }
-                    }
-
-                    if (add_method) {
-                      llvm::PrettyStackTraceFormat stack_trace(
-                          "SymbolFileDWARF::ParseType() is adding a method "
-                          "%s to class %s in DIE 0x%8.8" PRIx64 " from %s",
-                          attrs.name.GetCString(),
-                          class_type->GetName().GetCString(), die.GetID(),
-                          dwarf->GetObjectFile()
-                              ->GetFileSpec()
-                              .GetPath()
-                              .c_str());
-
-                      const bool is_attr_used = false;
-                      // Neither GCC 4.2 nor clang++ currently set a valid
-                      // accessibility in the DWARF for C++ methods...
-                      // Default to public for now...
-                      if (attrs.accessibility == eAccessNone)
-                        attrs.accessibility = eAccessPublic;
-
-                      clang::CXXMethodDecl *cxx_method_decl =
-                          m_ast.AddMethodToCXXRecordType(
-                              class_opaque_type.GetOpaqueQualType(),
-                              attrs.name.GetCString(), attrs.mangled_name,
-                              clang_type, attrs.accessibility, attrs.is_virtual,
-                              is_static, attrs.is_inline, attrs.is_explicit,
-                              is_attr_used, attrs.is_artificial);
-
-                      type_handled = cxx_method_decl != NULL;
-
-                      if (type_handled) {
-                        LinkDeclContextToDIE(
-                            ClangASTContext::GetAsDeclContext(cxx_method_decl),
-                            die);
-
-                        ClangASTMetadata metadata;
-                        metadata.SetUserID(die.GetID());
-
-                        if (!object_pointer_name.empty()) {
-                          metadata.SetObjectPtrName(
-                              object_pointer_name.c_str());
-                          if (log)
-                            log->Printf(
-                                "Setting object pointer name: %s on method "
-                                "object %p.\n",
-                                object_pointer_name.c_str(),
-                                static_cast<void *>(cxx_method_decl));
-                        }
-                        m_ast.SetMetadata(cxx_method_decl, metadata);
-                      } else {
-                        ignore_containing_context = true;
-                      }
-                    }
-                  }
-                } else {
-                  // We were asked to parse the type for a method in a
-                  // class, yet the class hasn't been asked to complete
-                  // itself through the clang::ExternalASTSource protocol,
-                  // so we need to just have the class complete itself and
-                  // do things the right way, then our
-                  // DIE should then have an entry in the
-                  // dwarf->GetDIEToType() map. First
-                  // we need to modify the dwarf->GetDIEToType() so it
-                  // doesn't think we are trying to parse this DIE
-                  // anymore...
-                  dwarf->GetDIEToType()[die.GetDIE()] = NULL;
-
-                  // Now we get the full type to force our class type to
-                  // complete itself using the clang::ExternalASTSource
-                  // protocol which will parse all base classes and all
-                  // methods (including the method for this DIE).
-                  class_type->GetFullCompilerType();
-
-                  // The type for this DIE should have been filled in the
-                  // function call above
-                  type_ptr = dwarf->GetDIEToType()[die.GetDIE()];
-                  if (type_ptr && type_ptr != DIE_IS_BEING_PARSED) {
-                    type_sp = type_ptr->shared_from_this();
-                    break;
-                  }
-
-                  // FIXME This is fixing some even uglier behavior but we
-                  // really need to
-                  // uniq the methods of each class as well as the class
-                  // itself. <rdar://problem/11240464>
-                  type_handled = true;
-                }
-              }
-            }
-          }
-        }
-      }
-
-      if (!type_handled) {
-        clang::FunctionDecl *function_decl = nullptr;
-        clang::FunctionDecl *template_function_decl = nullptr;
-
-        if (attrs.abstract_origin.IsValid()) {
-          DWARFDIE abs_die = attrs.abstract_origin.Reference();
-
-          if (dwarf->ResolveType(abs_die)) {
-            function_decl = llvm::dyn_cast_or_null<clang::FunctionDecl>(
-                GetCachedClangDeclContextForDIE(abs_die));
-
-            if (function_decl) {
-              LinkDeclContextToDIE(function_decl, die);
-            }
-          }
-        }
-
-        if (!function_decl) {
-          // We just have a function that isn't part of a class
-          function_decl = m_ast.CreateFunctionDeclaration(
-              ignore_containing_context ? m_ast.GetTranslationUnitDecl()
-                                        : containing_decl_ctx,
-              attrs.name.GetCString(), clang_type, attrs.storage,
-              attrs.is_inline);
-
-          if (has_template_params) {
-            ClangASTContext::TemplateParameterInfos template_param_infos;
-            ParseTemplateParameterInfos(die, template_param_infos);
-            template_function_decl = m_ast.CreateFunctionDeclaration(
-                ignore_containing_context ? m_ast.GetTranslationUnitDecl()
-                                          : containing_decl_ctx,
-                attrs.name.GetCString(), clang_type, attrs.storage,
-                attrs.is_inline);
-            clang::FunctionTemplateDecl *func_template_decl =
-                m_ast.CreateFunctionTemplateDecl(
-                    containing_decl_ctx, template_function_decl,
-                    attrs.name.GetCString(), template_param_infos);
-            m_ast.CreateFunctionTemplateSpecializationInfo(
-                function_decl, func_template_decl, template_param_infos);
-          }
-
-          lldbassert(function_decl);
-
-          if (function_decl) {
-            LinkDeclContextToDIE(function_decl, die);
-
-            if (!function_param_decls.empty()) {
-              m_ast.SetFunctionParameters(function_decl,
-                                          &function_param_decls.front(),
-                                          function_param_decls.size());
-              if (template_function_decl)
-                m_ast.SetFunctionParameters(template_function_decl,
-                                            &function_param_decls.front(),
-                                            function_param_decls.size());
-            }
-
-            ClangASTMetadata metadata;
-            metadata.SetUserID(die.GetID());
-
-            if (!object_pointer_name.empty()) {
-              metadata.SetObjectPtrName(object_pointer_name.c_str());
-              if (log)
-                log->Printf("Setting object pointer name: %s on function "
-                            "object %p.",
-                            object_pointer_name.c_str(),
-                            static_cast<void *>(function_decl));
-            }
-            m_ast.SetMetadata(function_decl, metadata);
-          }
-        }
-      }
-    }
-    type_sp = std::make_shared<Type>(
-        die.GetID(), dwarf, attrs.name, llvm::None, nullptr, LLDB_INVALID_UID,
-        Type::eEncodingIsUID, &attrs.decl, clang_type, Type::eResolveStateFull);
-    assert(type_sp.get());
-  } break;
-
+    type_sp = ParseSubroutine(die, attrs);
+    break;
+  }
   case DW_TAG_array_type: {
-    DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
-                 DW_TAG_value_to_name(tag), type_name_cstr);
-
-    DWARFDIE type_die = attrs.type.Reference();
-    Type *element_type = dwarf->ResolveTypeUID(type_die, true);
-
-    if (element_type) {
-      auto array_info = ParseChildArrayInfo(die);
-      if (array_info) {
-        attrs.byte_stride = array_info->byte_stride;
-        attrs.bit_stride = array_info->bit_stride;
-      }
-      if (attrs.byte_stride == 0 && attrs.bit_stride == 0)
-        attrs.byte_stride = element_type->GetByteSize().getValueOr(0);
-      CompilerType array_element_type = element_type->GetForwardCompilerType();
-
-      if (ClangASTContext::IsCXXClassType(array_element_type) &&
-          !array_element_type.GetCompleteType()) {
-        ModuleSP module_sp = die.GetModule();
-        if (module_sp) {
-          if (die.GetCU()->GetProducer() == eProducerClang)
-            module_sp->ReportError(
-                "DWARF DW_TAG_array_type DIE at 0x%8.8x has a "
-                "class/union/struct element type DIE 0x%8.8x that is a "
-                "forward declaration, not a complete definition.\nTry "
-                "compiling the source file with -fstandalone-debug or "
-                "disable -gmodules",
-                die.GetOffset(), type_die.GetOffset());
-          else
-            module_sp->ReportError(
-                "DWARF DW_TAG_array_type DIE at 0x%8.8x has a "
-                "class/union/struct element type DIE 0x%8.8x that is a "
-                "forward declaration, not a complete definition.\nPlease "
-                "file a bug against the compiler and include the "
-                "preprocessed output for %s",
-                die.GetOffset(), type_die.GetOffset(),
-                GetUnitName(die).c_str());
-        }
-
-        // We have no choice other than to pretend that the element class
-        // type is complete. If we don't do this, clang will crash when
-        // trying to layout the class. Since we provide layout
-        // assistance, all ivars in this class and other classes will be
-        // fine, this is the best we can do short of crashing.
-        if (ClangASTContext::StartTagDeclarationDefinition(
-                array_element_type)) {
-          ClangASTContext::CompleteTagDeclarationDefinition(array_element_type);
-        } else {
-          module_sp->ReportError("DWARF DIE at 0x%8.8x was not able to "
-                                 "start its definition.\nPlease file a "
-                                 "bug and attach the file at the start "
-                                 "of this error message",
-                                 type_die.GetOffset());
-        }
-      }
-
-      uint64_t array_element_bit_stride =
-          attrs.byte_stride * 8 + attrs.bit_stride;
-      if (array_info && array_info->element_orders.size() > 0) {
-        uint64_t num_elements = 0;
-        auto end = array_info->element_orders.rend();
-        for (auto pos = array_info->element_orders.rbegin(); pos != end;
-             ++pos) {
-          num_elements = *pos;
-          clang_type = m_ast.CreateArrayType(array_element_type, num_elements,
-                                             attrs.is_vector);
-          array_element_type = clang_type;
-          array_element_bit_stride =
-              num_elements ? array_element_bit_stride * num_elements
-                           : array_element_bit_stride;
-        }
-      } else {
-        clang_type = m_ast.CreateArrayType(array_element_type, 0, attrs.is_vector);
-      }
-      ConstString empty_name;
-      type_sp = std::make_shared<Type>(
-          die.GetID(), dwarf, empty_name, array_element_bit_stride / 8, nullptr,
-          dwarf->GetUID(type_die), Type::eEncodingIsUID, &attrs.decl,
-          clang_type, Type::eResolveStateFull);
-      type_sp->SetEncodingType(element_type);
-      m_ast.SetMetadataAsUserID(clang_type.GetOpaqueQualType(), die.GetID());
-    }
-  } break;
-
+    type_sp = ParseArrayType(die, attrs);
+    break;
+  }
   case DW_TAG_ptr_to_member_type: {
-    Type *pointee_type = dwarf->ResolveTypeUID(attrs.type.Reference(), true);
-    Type *class_type =
-        dwarf->ResolveTypeUID(attrs.containing_type.Reference(), true);
-
-    CompilerType pointee_clang_type = pointee_type->GetForwardCompilerType();
-    CompilerType class_clang_type = class_type->GetLayoutCompilerType();
-
-    clang_type = ClangASTContext::CreateMemberPointerType(class_clang_type,
-                                                          pointee_clang_type);
-
-    if (llvm::Optional<uint64_t> clang_type_size =
-            clang_type.GetByteSize(nullptr)) {
-      type_sp = std::make_shared<Type>(
-          die.GetID(), dwarf, attrs.name, *clang_type_size, nullptr,
-          LLDB_INVALID_UID, Type::eEncodingIsUID, nullptr, clang_type,
-          Type::eResolveStateForward);
-    }
-
+    type_sp = ParsePointerToMemberType(die, attrs);
     break;
   }
   default:
@@ -1651,31 +490,1264 @@
     break;
   }
 
-  if (type_sp.get()) {
-    DWARFDIE sc_parent_die = SymbolFileDWARF::GetParentSymbolContextDIE(die);
-    dw_tag_t sc_parent_tag = sc_parent_die.Tag();
+  // TODO: We should consider making the switch above exhaustive to simplify
+  // control flow in ParseTypeFromDWARF. Then, we could simply replace this
+  // return statement with a call to llvm_unreachable.
+  return UpdateSymbolContextScopeForType(sc, die, type_sp);
+}
 
-    SymbolContextScope *symbol_context_scope = NULL;
-    if (sc_parent_tag == DW_TAG_compile_unit ||
-        sc_parent_tag == DW_TAG_partial_unit) {
-      symbol_context_scope = sc.comp_unit;
-    } else if (sc.function != NULL && sc_parent_die) {
-      symbol_context_scope =
-          sc.function->GetBlock(true).FindBlockByID(sc_parent_die.GetID());
-      if (symbol_context_scope == NULL)
-        symbol_context_scope = sc.function;
-    } else
-      symbol_context_scope = sc.module_sp.get();
+lldb::TypeSP
+DWARFASTParserClang::ParseTypeModifier(const SymbolContext &sc,
+                                       const DWARFDIE &die,
+                                       ParsedDWARFTypeAttributes &attrs) {
+  Log *log(LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION |
+                                        DWARF_LOG_LOOKUPS));
+  SymbolFileDWARF *dwarf = die.GetDWARF();
+  const dw_tag_t tag = die.Tag();
+  LanguageType cu_language = die.GetLanguage();
+  Type::ResolveState resolve_state = Type::ResolveState::Unresolved;
+  Type::EncodingDataType encoding_data_type = Type::eEncodingIsUID;
+  TypeSP type_sp;
+  CompilerType clang_type;
 
-    if (symbol_context_scope != NULL) {
-      type_sp->SetSymbolContextScope(symbol_context_scope);
+  if (tag == DW_TAG_typedef && attrs.type.IsValid()) {
+    // Try to parse a typedef from the (DWARF embedded in the) Clang
+    // module file first as modules can contain typedef'ed
+    // structures that have no names like:
+    //
+    //  typedef struct { int a; } Foo;
+    //
+    // In this case we will have a structure with no name and a
+    // typedef named "Foo" that points to this unnamed
+    // structure. The name in the typedef is the only identifier for
+    // the struct, so always try to get typedefs from Clang modules
+    // if possible.
+    //
+    // The type_sp returned will be empty if the typedef doesn't
+    // exist in a module file, so it is cheap to call this function
+    // just to check.
+    //
+    // If we don't do this we end up creating a TypeSP that says
+    // this is a typedef to type 0x123 (the DW_AT_type value would
+    // be 0x123 in the DW_TAG_typedef), and this is the unnamed
+    // structure type. We will have a hard time tracking down an
+    // unnammed structure type in the module debug info, so we make
+    // sure we don't get into this situation by always resolving
+    // typedefs from the module.
+    const DWARFDIE encoding_die = attrs.type.Reference();
+
+    // First make sure that the die that this is typedef'ed to _is_
+    // just a declaration (DW_AT_declaration == 1), not a full
+    // definition since template types can't be represented in
+    // modules since only concrete instances of templates are ever
+    // emitted and modules won't contain those
+    if (encoding_die &&
+        encoding_die.GetAttributeValueAsUnsigned(DW_AT_declaration, 0) == 1) {
+      type_sp = ParseTypeFromClangModule(sc, die, log);
+      if (type_sp)
+        return type_sp;
+    }
+  }
+
+  DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\") type => 0x%8.8lx\n", die.GetID(),
+               DW_TAG_value_to_name(tag), type_name_cstr,
+               encoding_uid.Reference());
+
+  switch (tag) {
+  default:
+    break;
+
+  case DW_TAG_unspecified_type:
+    if (attrs.name == "nullptr_t" || attrs.name == "decltype(nullptr)") {
+      resolve_state = Type::ResolveState::Full;
+      clang_type = m_ast.GetBasicType(eBasicTypeNullPtr);
+      break;
+    }
+    // Fall through to base type below in case we can handle the type
+    // there...
+    LLVM_FALLTHROUGH;
+
+  case DW_TAG_base_type:
+    resolve_state = Type::ResolveState::Full;
+    clang_type = m_ast.GetBuiltinTypeForDWARFEncodingAndBitSize(
+        attrs.name.GetStringRef(), attrs.encoding,
+        attrs.byte_size.getValueOr(0) * 8);
+    break;
+
+  case DW_TAG_pointer_type:
+    encoding_data_type = Type::eEncodingIsPointerUID;
+    break;
+  case DW_TAG_reference_type:
+    encoding_data_type = Type::eEncodingIsLValueReferenceUID;
+    break;
+  case DW_TAG_rvalue_reference_type:
+    encoding_data_type = Type::eEncodingIsRValueReferenceUID;
+    break;
+  case DW_TAG_typedef:
+    encoding_data_type = Type::eEncodingIsTypedefUID;
+    break;
+  case DW_TAG_const_type:
+    encoding_data_type = Type::eEncodingIsConstUID;
+    break;
+  case DW_TAG_restrict_type:
+    encoding_data_type = Type::eEncodingIsRestrictUID;
+    break;
+  case DW_TAG_volatile_type:
+    encoding_data_type = Type::eEncodingIsVolatileUID;
+    break;
+  case DW_TAG_atomic_type:
+    encoding_data_type = Type::eEncodingIsAtomicUID;
+    break;
+  }
+
+  if (!clang_type && (encoding_data_type == Type::eEncodingIsPointerUID ||
+                      encoding_data_type == Type::eEncodingIsTypedefUID)) {
+    if (tag == DW_TAG_pointer_type) {
+      DWARFDIE target_die = die.GetReferencedDIE(DW_AT_type);
+
+      if (target_die.GetAttributeValueAsUnsigned(DW_AT_APPLE_block, 0)) {
+        // Blocks have a __FuncPtr inside them which is a pointer to a
+        // function of the proper type.
+
+        for (DWARFDIE child_die = target_die.GetFirstChild();
+             child_die.IsValid(); child_die = child_die.GetSibling()) {
+          if (!strcmp(child_die.GetAttributeValueAsString(DW_AT_name, ""),
+                      "__FuncPtr")) {
+            DWARFDIE function_pointer_type =
+                child_die.GetReferencedDIE(DW_AT_type);
+
+            if (function_pointer_type) {
+              DWARFDIE function_type =
+                  function_pointer_type.GetReferencedDIE(DW_AT_type);
+
+              bool function_type_is_new_pointer;
+              TypeSP lldb_function_type_sp = ParseTypeFromDWARF(
+                  sc, function_type, &function_type_is_new_pointer);
+
+              if (lldb_function_type_sp) {
+                clang_type = m_ast.CreateBlockPointerType(
+                    lldb_function_type_sp->GetForwardCompilerType());
+                encoding_data_type = Type::eEncodingIsUID;
+                attrs.type.Clear();
+                resolve_state = Type::ResolveState::Full;
+              }
+            }
+
+            break;
+          }
+        }
+      }
     }
 
-    // We are ready to put this type into the uniqued list up at the module
-    // level
-    type_list->Insert(type_sp);
+    if (cu_language == eLanguageTypeObjC ||
+        cu_language == eLanguageTypeObjC_plus_plus) {
+      if (attrs.name) {
+        if (attrs.name == "id") {
+          if (log)
+            dwarf->GetObjectFile()->GetModule()->LogMessage(
+                log,
+                "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' "
+                "is Objective-C 'id' built-in type.",
+                die.GetOffset(), die.GetTagAsCString(), die.GetName());
+          clang_type = m_ast.GetBasicType(eBasicTypeObjCID);
+          encoding_data_type = Type::eEncodingIsUID;
+          attrs.type.Clear();
+          resolve_state = Type::ResolveState::Full;
+        } else if (attrs.name == "Class") {
+          if (log)
+            dwarf->GetObjectFile()->GetModule()->LogMessage(
+                log,
+                "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' "
+                "is Objective-C 'Class' built-in type.",
+                die.GetOffset(), die.GetTagAsCString(), die.GetName());
+          clang_type = m_ast.GetBasicType(eBasicTypeObjCClass);
+          encoding_data_type = Type::eEncodingIsUID;
+          attrs.type.Clear();
+          resolve_state = Type::ResolveState::Full;
+        } else if (attrs.name == "SEL") {
+          if (log)
+            dwarf->GetObjectFile()->GetModule()->LogMessage(
+                log,
+                "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s '%s' "
+                "is Objective-C 'selector' built-in type.",
+                die.GetOffset(), die.GetTagAsCString(), die.GetName());
+          clang_type = m_ast.GetBasicType(eBasicTypeObjCSel);
+          encoding_data_type = Type::eEncodingIsUID;
+          attrs.type.Clear();
+          resolve_state = Type::ResolveState::Full;
+        }
+      } else if (encoding_data_type == Type::eEncodingIsPointerUID &&
+                 attrs.type.IsValid()) {
+        // Clang sometimes erroneously emits id as objc_object*.  In that
+        // case we fix up the type to "id".
 
-    dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
+        const DWARFDIE encoding_die = attrs.type.Reference();
+
+        if (encoding_die && encoding_die.Tag() == DW_TAG_structure_type) {
+          llvm::StringRef struct_name = encoding_die.GetName();
+          if (struct_name == "objc_object") {
+            if (log)
+              dwarf->GetObjectFile()->GetModule()->LogMessage(
+                  log,
+                  "SymbolFileDWARF::ParseType (die = 0x%8.8x) %s "
+                  "'%s' is 'objc_object*', which we overrode to "
+                  "'id'.",
+                  die.GetOffset(), die.GetTagAsCString(), die.GetName());
+            clang_type = m_ast.GetBasicType(eBasicTypeObjCID);
+            encoding_data_type = Type::eEncodingIsUID;
+            attrs.type.Clear();
+            resolve_state = Type::ResolveState::Full;
+          }
+        }
+      }
+    }
+  }
+
+  type_sp = std::make_shared<Type>(
+      die.GetID(), dwarf, attrs.name, attrs.byte_size, nullptr,
+      dwarf->GetUID(attrs.type.Reference()), encoding_data_type, &attrs.decl,
+      clang_type, resolve_state);
+
+  dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
+  return type_sp;
+}
+
+TypeSP DWARFASTParserClang::ParseEnum(const SymbolContext &sc,
+                                      const DWARFDIE &die,
+                                      ParsedDWARFTypeAttributes &attrs) {
+  Log *log(LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION |
+                                        DWARF_LOG_LOOKUPS));
+  SymbolFileDWARF *dwarf = die.GetDWARF();
+  const dw_tag_t tag = die.Tag();
+  TypeSP type_sp;
+
+  if (attrs.is_forward_declaration) {
+    type_sp = ParseTypeFromClangModule(sc, die, log);
+    if (type_sp)
+      return type_sp;
+
+    DWARFDeclContext die_decl_ctx;
+    die.GetDWARFDeclContext(die_decl_ctx);
+
+    type_sp = dwarf->FindDefinitionTypeForDWARFDeclContext(die_decl_ctx);
+
+    if (!type_sp) {
+      SymbolFileDWARFDebugMap *debug_map_symfile = dwarf->GetDebugMapSymfile();
+      if (debug_map_symfile) {
+        // We weren't able to find a full declaration in this DWARF,
+        // see if we have a declaration anywhere else...
+        type_sp = debug_map_symfile->FindDefinitionTypeForDWARFDeclContext(
+            die_decl_ctx);
+      }
+    }
+
+    if (type_sp) {
+      if (log) {
+        dwarf->GetObjectFile()->GetModule()->LogMessage(
+            log,
+            "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a "
+            "forward declaration, complete type is 0x%8.8" PRIx64,
+            static_cast<void *>(this), die.GetOffset(),
+            DW_TAG_value_to_name(tag), attrs.name.GetCString(),
+            type_sp->GetID());
+      }
+
+      // We found a real definition for this type elsewhere so lets use
+      // it and cache the fact that we found a complete type for this
+      // die
+      dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
+      clang::DeclContext *defn_decl_ctx =
+          GetCachedClangDeclContextForDIE(dwarf->GetDIE(type_sp->GetID()));
+      if (defn_decl_ctx)
+        LinkDeclContextToDIE(defn_decl_ctx, die);
+      return type_sp;
+    }
+  }
+  DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
+               DW_TAG_value_to_name(tag), type_name_cstr);
+
+  CompilerType enumerator_clang_type;
+  CompilerType clang_type;
+  clang_type.SetCompilerType(
+      &m_ast, dwarf->GetForwardDeclDieToClangType().lookup(die.GetDIE()));
+  if (!clang_type) {
+    if (attrs.type.IsValid()) {
+      Type *enumerator_type =
+          dwarf->ResolveTypeUID(attrs.type.Reference(), true);
+      if (enumerator_type)
+        enumerator_clang_type = enumerator_type->GetFullCompilerType();
+    }
+
+    if (!enumerator_clang_type) {
+      if (attrs.byte_size) {
+        enumerator_clang_type = m_ast.GetBuiltinTypeForDWARFEncodingAndBitSize(
+            "", DW_ATE_signed, *attrs.byte_size * 8);
+      } else {
+        enumerator_clang_type = m_ast.GetBasicType(eBasicTypeInt);
+      }
+    }
+
+    clang_type = m_ast.CreateEnumerationType(
+        attrs.name.GetCString(), GetClangDeclContextContainingDIE(die, nullptr),
+        attrs.decl, enumerator_clang_type, attrs.is_scoped_enum);
+  } else {
+    enumerator_clang_type =
+        m_ast.GetEnumerationIntegerType(clang_type.GetOpaqueQualType());
+  }
+
+  LinkDeclContextToDIE(ClangASTContext::GetDeclContextForType(clang_type), die);
+
+  type_sp = std::make_shared<Type>(
+      die.GetID(), dwarf, attrs.name, attrs.byte_size, nullptr,
+      dwarf->GetUID(attrs.type.Reference()), Type::eEncodingIsUID, &attrs.decl,
+      clang_type, Type::ResolveState::Forward);
+
+  if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) {
+    if (die.HasChildren()) {
+      bool is_signed = false;
+      enumerator_clang_type.IsIntegerType(is_signed);
+      ParseChildEnumerators(clang_type, is_signed,
+                            type_sp->GetByteSize().getValueOr(0), die);
+    }
+    ClangASTContext::CompleteTagDeclarationDefinition(clang_type);
+  } else {
+    dwarf->GetObjectFile()->GetModule()->ReportError(
+        "DWARF DIE at 0x%8.8x named \"%s\" was not able to start its "
+        "definition.\nPlease file a bug and attach the file at the "
+        "start of this error message",
+        die.GetOffset(), attrs.name.GetCString());
+  }
+  return type_sp;
+}
+
+TypeSP DWARFASTParserClang::ParseSubroutine(const DWARFDIE &die,
+                           ParsedDWARFTypeAttributes &attrs) {
+  Log *log(LogChannelDWARF::GetLogIfAny(DWARF_LOG_TYPE_COMPLETION |
+                                        DWARF_LOG_LOOKUPS));
+
+  SymbolFileDWARF *dwarf = die.GetDWARF();
+  const dw_tag_t tag = die.Tag();
+
+  bool is_variadic = false;
+  bool is_static = false;
+  bool has_template_params = false;
+
+  unsigned type_quals = 0;
+
+  std::string object_pointer_name;
+  if (attrs.object_pointer) {
+    const char *object_pointer_name_cstr = attrs.object_pointer.GetName();
+    if (object_pointer_name_cstr)
+      object_pointer_name = object_pointer_name_cstr;
+  }
+
+  DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
+               DW_TAG_value_to_name(tag), type_name_cstr);
+
+  CompilerType return_clang_type;
+  Type *func_type = NULL;
+
+  if (attrs.type.IsValid())
+    func_type = dwarf->ResolveTypeUID(attrs.type.Reference(), true);
+
+  if (func_type)
+    return_clang_type = func_type->GetForwardCompilerType();
+  else
+    return_clang_type = m_ast.GetBasicType(eBasicTypeVoid);
+
+  std::vector<CompilerType> function_param_types;
+  std::vector<clang::ParmVarDecl *> function_param_decls;
+
+  // Parse the function children for the parameters
+
+  DWARFDIE decl_ctx_die;
+  clang::DeclContext *containing_decl_ctx =
+      GetClangDeclContextContainingDIE(die, &decl_ctx_die);
+  const clang::Decl::Kind containing_decl_kind =
+      containing_decl_ctx->getDeclKind();
+
+  bool is_cxx_method = DeclKindIsCXXClass(containing_decl_kind);
+  // Start off static. This will be set to false in
+  // ParseChildParameters(...) if we find a "this" parameters as the
+  // first parameter
+  if (is_cxx_method) {
+    is_static = true;
+  }
+
+  if (die.HasChildren()) {
+    bool skip_artificial = true;
+    ParseChildParameters(containing_decl_ctx, die, skip_artificial, is_static,
+                         is_variadic, has_template_params,
+                         function_param_types, function_param_decls,
+                         type_quals);
+  }
+
+  bool ignore_containing_context = false;
+  // Check for templatized class member functions. If we had any
+  // DW_TAG_template_type_parameter or DW_TAG_template_value_parameter
+  // the DW_TAG_subprogram DIE, then we can't let this become a method in
+  // a class. Why? Because templatized functions are only emitted if one
+  // of the templatized methods is used in the current compile unit and
+  // we will end up with classes that may or may not include these member
+  // functions and this means one class won't match another class
+  // definition and it affects our ability to use a class in the clang
+  // expression parser. So for the greater good, we currently must not
+  // allow any template member functions in a class definition.
+  if (is_cxx_method && has_template_params) {
+    ignore_containing_context = true;
+    is_cxx_method = false;
+  }
+
+  // clang_type will get the function prototype clang type after this
+  // call
+  CompilerType clang_type = m_ast.CreateFunctionType(
+      return_clang_type, function_param_types.data(),
+      function_param_types.size(), is_variadic, type_quals);
+
+  if (attrs.name) {
+    bool type_handled = false;
+    if (tag == DW_TAG_subprogram || tag == DW_TAG_inlined_subroutine) {
+      ObjCLanguage::MethodName objc_method(attrs.name.GetStringRef(), true);
+      if (objc_method.IsValid(true)) {
+        CompilerType class_opaque_type;
+        ConstString class_name(objc_method.GetClassName());
+        if (class_name) {
+          TypeSP complete_objc_class_type_sp(
+              dwarf->FindCompleteObjCDefinitionTypeForDIE(DWARFDIE(),
+                                                          class_name, false));
+
+          if (complete_objc_class_type_sp) {
+            CompilerType type_clang_forward_type =
+                complete_objc_class_type_sp->GetForwardCompilerType();
+            if (ClangASTContext::IsObjCObjectOrInterfaceType(
+                    type_clang_forward_type))
+              class_opaque_type = type_clang_forward_type;
+          }
+        }
+
+        if (class_opaque_type) {
+          // If accessibility isn't set to anything valid, assume public
+          // for now...
+          if (attrs.accessibility == eAccessNone)
+            attrs.accessibility = eAccessPublic;
+
+          clang::ObjCMethodDecl *objc_method_decl =
+              m_ast.AddMethodToObjCObjectType(
+                  class_opaque_type, attrs.name.GetCString(), clang_type,
+                  attrs.accessibility, attrs.is_artificial, is_variadic,
+                  attrs.is_objc_direct_call);
+          type_handled = objc_method_decl != NULL;
+          if (type_handled) {
+            LinkDeclContextToDIE(objc_method_decl, die);
+            m_ast.SetMetadataAsUserID(objc_method_decl, die.GetID());
+          } else {
+            dwarf->GetObjectFile()->GetModule()->ReportError(
+                "{0x%8.8x}: invalid Objective-C method 0x%4.4x (%s), "
+                "please file a bug and attach the file at the start of "
+                "this error message",
+                die.GetOffset(), tag, DW_TAG_value_to_name(tag));
+          }
+        }
+      } else if (is_cxx_method) {
+        // Look at the parent of this DIE and see if is is a class or
+        // struct and see if this is actually a C++ method
+        Type *class_type = dwarf->ResolveType(decl_ctx_die);
+        if (class_type) {
+          bool alternate_defn = false;
+          if (class_type->GetID() != decl_ctx_die.GetID() ||
+              IsClangModuleFwdDecl(decl_ctx_die)) {
+            alternate_defn = true;
+
+            // We uniqued the parent class of this function to another
+            // class so we now need to associate all dies under
+            // "decl_ctx_die" to DIEs in the DIE for "class_type"...
+            DWARFDIE class_type_die = dwarf->GetDIE(class_type->GetID());
+
+            if (class_type_die) {
+              std::vector<DWARFDIE> failures;
+
+              CopyUniqueClassMethodTypes(decl_ctx_die, class_type_die,
+                                         class_type, failures);
+
+              // FIXME do something with these failures that's
+              // smarter than just dropping them on the ground.
+              // Unfortunately classes don't like having stuff added
+              // to them after their definitions are complete...
+
+              Type *type_ptr = dwarf->GetDIEToType()[die.GetDIE()];
+              if (type_ptr && type_ptr != DIE_IS_BEING_PARSED) {
+                return type_ptr->shared_from_this();
+              }
+            }
+          }
+
+          if (attrs.specification.IsValid()) {
+            // We have a specification which we are going to base our
+            // function prototype off of, so we need this type to be
+            // completed so that the m_die_to_decl_ctx for the method in
+            // the specification has a valid clang decl context.
+            class_type->GetForwardCompilerType();
+            // If we have a specification, then the function type should
+            // have been made with the specification and not with this
+            // die.
+            DWARFDIE spec_die = attrs.specification.Reference();
+            clang::DeclContext *spec_clang_decl_ctx =
+                GetClangDeclContextForDIE(spec_die);
+            if (spec_clang_decl_ctx) {
+              LinkDeclContextToDIE(spec_clang_decl_ctx, die);
+            } else {
+              dwarf->GetObjectFile()->GetModule()->ReportWarning(
+                  "0x%8.8" PRIx64 ": DW_AT_specification(0x%8.8x"
+                  ") has no decl\n",
+                  die.GetID(), spec_die.GetOffset());
+            }
+            type_handled = true;
+          } else if (attrs.abstract_origin.IsValid()) {
+            // We have a specification which we are going to base our
+            // function prototype off of, so we need this type to be
+            // completed so that the m_die_to_decl_ctx for the method in
+            // the abstract origin has a valid clang decl context.
+            class_type->GetForwardCompilerType();
+
+            DWARFDIE abs_die = attrs.abstract_origin.Reference();
+            clang::DeclContext *abs_clang_decl_ctx =
+                GetClangDeclContextForDIE(abs_die);
+            if (abs_clang_decl_ctx) {
+              LinkDeclContextToDIE(abs_clang_decl_ctx, die);
+            } else {
+              dwarf->GetObjectFile()->GetModule()->ReportWarning(
+                  "0x%8.8" PRIx64 ": DW_AT_abstract_origin(0x%8.8x"
+                  ") has no decl\n",
+                  die.GetID(), abs_die.GetOffset());
+            }
+            type_handled = true;
+          } else {
+            CompilerType class_opaque_type =
+                class_type->GetForwardCompilerType();
+            if (ClangASTContext::IsCXXClassType(class_opaque_type)) {
+              if (class_opaque_type.IsBeingDefined() || alternate_defn) {
+                if (!is_static && !die.HasChildren()) {
+                  // We have a C++ member function with no children (this
+                  // pointer!) and clang will get mad if we try and make
+                  // a function that isn't well formed in the DWARF, so
+                  // we will just skip it...
+                  type_handled = true;
+                } else {
+                  bool add_method = true;
+                  if (alternate_defn) {
+                    // If an alternate definition for the class exists,
+                    // then add the method only if an equivalent is not
+                    // already present.
+                    clang::CXXRecordDecl *record_decl =
+                        m_ast.GetAsCXXRecordDecl(
+                            class_opaque_type.GetOpaqueQualType());
+                    if (record_decl) {
+                      for (auto method_iter = record_decl->method_begin();
+                           method_iter != record_decl->method_end();
+                           method_iter++) {
+                        clang::CXXMethodDecl *method_decl = *method_iter;
+                        if (method_decl->getNameInfo().getAsString() ==
+                            attrs.name.GetStringRef()) {
+                          if (method_decl->getType() ==
+                              ClangUtil::GetQualType(clang_type)) {
+                            add_method = false;
+                            LinkDeclContextToDIE(method_decl, die);
+                            type_handled = true;
+
+                            break;
+                          }
+                        }
+                      }
+                    }
+                  }
+
+                  if (add_method) {
+                    llvm::PrettyStackTraceFormat stack_trace(
+                        "SymbolFileDWARF::ParseType() is adding a method "
+                        "%s to class %s in DIE 0x%8.8" PRIx64 " from %s",
+                        attrs.name.GetCString(),
+                        class_type->GetName().GetCString(), die.GetID(),
+                        dwarf->GetObjectFile()
+                            ->GetFileSpec()
+                            .GetPath()
+                            .c_str());
+
+                    const bool is_attr_used = false;
+                    // Neither GCC 4.2 nor clang++ currently set a valid
+                    // accessibility in the DWARF for C++ methods...
+                    // Default to public for now...
+                    if (attrs.accessibility == eAccessNone)
+                      attrs.accessibility = eAccessPublic;
+
+                    clang::CXXMethodDecl *cxx_method_decl =
+                        m_ast.AddMethodToCXXRecordType(
+                            class_opaque_type.GetOpaqueQualType(),
+                            attrs.name.GetCString(), attrs.mangled_name,
+                            clang_type, attrs.accessibility, attrs.is_virtual,
+                            is_static, attrs.is_inline, attrs.is_explicit,
+                            is_attr_used, attrs.is_artificial);
+
+                    type_handled = cxx_method_decl != NULL;
+                    // Artificial methods are always handled even when we
+                    // don't create a new declaration for them.
+                    type_handled |= attrs.is_artificial;
+
+                    if (cxx_method_decl) {
+                      LinkDeclContextToDIE(cxx_method_decl, die);
+
+                      ClangASTMetadata metadata;
+                      metadata.SetUserID(die.GetID());
+
+                      if (!object_pointer_name.empty()) {
+                        metadata.SetObjectPtrName(
+                            object_pointer_name.c_str());
+                        LLDB_LOGF(log,
+                                  "Setting object pointer name: %s on method "
+                                  "object %p.\n",
+                                  object_pointer_name.c_str(),
+                                  static_cast<void *>(cxx_method_decl));
+                      }
+                      m_ast.SetMetadata(cxx_method_decl, metadata);
+                    } else {
+                      ignore_containing_context = true;
+                    }
+                  }
+                }
+              } else {
+                // We were asked to parse the type for a method in a
+                // class, yet the class hasn't been asked to complete
+                // itself through the clang::ExternalASTSource protocol,
+                // so we need to just have the class complete itself and
+                // do things the right way, then our
+                // DIE should then have an entry in the
+                // dwarf->GetDIEToType() map. First
+                // we need to modify the dwarf->GetDIEToType() so it
+                // doesn't think we are trying to parse this DIE
+                // anymore...
+                dwarf->GetDIEToType()[die.GetDIE()] = NULL;
+
+                // Now we get the full type to force our class type to
+                // complete itself using the clang::ExternalASTSource
+                // protocol which will parse all base classes and all
+                // methods (including the method for this DIE).
+                class_type->GetFullCompilerType();
+
+                // The type for this DIE should have been filled in the
+                // function call above
+                Type *type_ptr = dwarf->GetDIEToType()[die.GetDIE()];
+                if (type_ptr && type_ptr != DIE_IS_BEING_PARSED) {
+                  return type_ptr->shared_from_this();
+                }
+
+                // FIXME This is fixing some even uglier behavior but we
+                // really need to
+                // uniq the methods of each class as well as the class
+                // itself. <rdar://problem/11240464>
+                type_handled = true;
+              }
+            }
+          }
+        }
+      }
+    }
+
+    if (!type_handled) {
+      clang::FunctionDecl *function_decl = nullptr;
+      clang::FunctionDecl *template_function_decl = nullptr;
+
+      if (attrs.abstract_origin.IsValid()) {
+        DWARFDIE abs_die = attrs.abstract_origin.Reference();
+
+        if (dwarf->ResolveType(abs_die)) {
+          function_decl = llvm::dyn_cast_or_null<clang::FunctionDecl>(
+              GetCachedClangDeclContextForDIE(abs_die));
+
+          if (function_decl) {
+            LinkDeclContextToDIE(function_decl, die);
+          }
+        }
+      }
+
+      if (!function_decl) {
+        // We just have a function that isn't part of a class
+        function_decl = m_ast.CreateFunctionDeclaration(
+            ignore_containing_context ? m_ast.GetTranslationUnitDecl()
+                                      : containing_decl_ctx,
+            attrs.name.GetCString(), clang_type, attrs.storage,
+            attrs.is_inline);
+
+        if (has_template_params) {
+          ClangASTContext::TemplateParameterInfos template_param_infos;
+          ParseTemplateParameterInfos(die, template_param_infos);
+          template_function_decl = m_ast.CreateFunctionDeclaration(
+              ignore_containing_context ? m_ast.GetTranslationUnitDecl()
+                                        : containing_decl_ctx,
+              attrs.name.GetCString(), clang_type, attrs.storage,
+              attrs.is_inline);
+          clang::FunctionTemplateDecl *func_template_decl =
+              m_ast.CreateFunctionTemplateDecl(
+                  containing_decl_ctx, template_function_decl,
+                  attrs.name.GetCString(), template_param_infos);
+          m_ast.CreateFunctionTemplateSpecializationInfo(
+              function_decl, func_template_decl, template_param_infos);
+        }
+
+        lldbassert(function_decl);
+
+        if (function_decl) {
+          LinkDeclContextToDIE(function_decl, die);
+
+          if (!function_param_decls.empty()) {
+            m_ast.SetFunctionParameters(function_decl,
+                                        &function_param_decls.front(),
+                                        function_param_decls.size());
+            if (template_function_decl)
+              m_ast.SetFunctionParameters(template_function_decl,
+                                          &function_param_decls.front(),
+                                          function_param_decls.size());
+          }
+
+          ClangASTMetadata metadata;
+          metadata.SetUserID(die.GetID());
+
+          if (!object_pointer_name.empty()) {
+            metadata.SetObjectPtrName(object_pointer_name.c_str());
+            LLDB_LOGF(log,
+                      "Setting object pointer name: %s on function "
+                      "object %p.",
+                      object_pointer_name.c_str(),
+                      static_cast<void *>(function_decl));
+          }
+          m_ast.SetMetadata(function_decl, metadata);
+        }
+      }
+    }
+  }
+  return std::make_shared<Type>(
+      die.GetID(), dwarf, attrs.name, llvm::None, nullptr, LLDB_INVALID_UID,
+      Type::eEncodingIsUID, &attrs.decl, clang_type, Type::ResolveState::Full);
+}
+
+TypeSP DWARFASTParserClang::ParseArrayType(const DWARFDIE &die,
+                                           ParsedDWARFTypeAttributes &attrs) {
+  SymbolFileDWARF *dwarf = die.GetDWARF();
+
+  DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
+               DW_TAG_value_to_name(tag), type_name_cstr);
+
+  DWARFDIE type_die = attrs.type.Reference();
+  Type *element_type = dwarf->ResolveTypeUID(type_die, true);
+
+  if (!element_type)
+    return nullptr;
+
+  llvm::Optional<SymbolFile::ArrayInfo> array_info = ParseChildArrayInfo(die);
+  if (array_info) {
+    attrs.byte_stride = array_info->byte_stride;
+    attrs.bit_stride = array_info->bit_stride;
+  }
+  if (attrs.byte_stride == 0 && attrs.bit_stride == 0)
+    attrs.byte_stride = element_type->GetByteSize().getValueOr(0);
+  CompilerType array_element_type = element_type->GetForwardCompilerType();
+
+  if (ClangASTContext::IsCXXClassType(array_element_type) &&
+      !array_element_type.GetCompleteType()) {
+    ModuleSP module_sp = die.GetModule();
+    if (module_sp) {
+      if (die.GetCU()->GetProducer() == eProducerClang)
+        module_sp->ReportError(
+            "DWARF DW_TAG_array_type DIE at 0x%8.8x has a "
+            "class/union/struct element type DIE 0x%8.8x that is a "
+            "forward declaration, not a complete definition.\nTry "
+            "compiling the source file with -fstandalone-debug or "
+            "disable -gmodules",
+            die.GetOffset(), type_die.GetOffset());
+      else
+        module_sp->ReportError(
+            "DWARF DW_TAG_array_type DIE at 0x%8.8x has a "
+            "class/union/struct element type DIE 0x%8.8x that is a "
+            "forward declaration, not a complete definition.\nPlease "
+            "file a bug against the compiler and include the "
+            "preprocessed output for %s",
+            die.GetOffset(), type_die.GetOffset(), GetUnitName(die).c_str());
+    }
+
+    // We have no choice other than to pretend that the element class
+    // type is complete. If we don't do this, clang will crash when
+    // trying to layout the class. Since we provide layout
+    // assistance, all ivars in this class and other classes will be
+    // fine, this is the best we can do short of crashing.
+    if (ClangASTContext::StartTagDeclarationDefinition(array_element_type)) {
+      ClangASTContext::CompleteTagDeclarationDefinition(array_element_type);
+    } else {
+      module_sp->ReportError("DWARF DIE at 0x%8.8x was not able to "
+                             "start its definition.\nPlease file a "
+                             "bug and attach the file at the start "
+                             "of this error message",
+                             type_die.GetOffset());
+    }
+  }
+
+  uint64_t array_element_bit_stride =
+      attrs.byte_stride * 8 + attrs.bit_stride;
+  CompilerType clang_type;
+  if (array_info && array_info->element_orders.size() > 0) {
+    uint64_t num_elements = 0;
+    auto end = array_info->element_orders.rend();
+    for (auto pos = array_info->element_orders.rbegin(); pos != end; ++pos) {
+      num_elements = *pos;
+      clang_type = m_ast.CreateArrayType(array_element_type, num_elements,
+                                         attrs.is_vector);
+      array_element_type = clang_type;
+      array_element_bit_stride = num_elements
+                                     ? array_element_bit_stride * num_elements
+                                     : array_element_bit_stride;
+    }
+  } else {
+    clang_type =
+        m_ast.CreateArrayType(array_element_type, 0, attrs.is_vector);
+  }
+  ConstString empty_name;
+  TypeSP type_sp = std::make_shared<Type>(
+      die.GetID(), dwarf, empty_name, array_element_bit_stride / 8, nullptr,
+      dwarf->GetUID(type_die), Type::eEncodingIsUID, &attrs.decl, clang_type,
+      Type::ResolveState::Full);
+  type_sp->SetEncodingType(element_type);
+  const clang::Type *type = ClangUtil::GetQualType(clang_type).getTypePtr();
+  m_ast.SetMetadataAsUserID(type, die.GetID());
+  return type_sp;
+}
+
+TypeSP DWARFASTParserClang::ParsePointerToMemberType(
+    const DWARFDIE &die, const ParsedDWARFTypeAttributes &attrs) {
+  SymbolFileDWARF *dwarf = die.GetDWARF();
+  Type *pointee_type = dwarf->ResolveTypeUID(attrs.type.Reference(), true);
+  Type *class_type =
+      dwarf->ResolveTypeUID(attrs.containing_type.Reference(), true);
+
+  CompilerType pointee_clang_type = pointee_type->GetForwardCompilerType();
+  CompilerType class_clang_type = class_type->GetLayoutCompilerType();
+
+  CompilerType clang_type = ClangASTContext::CreateMemberPointerType(
+      class_clang_type, pointee_clang_type);
+
+  if (llvm::Optional<uint64_t> clang_type_size =
+          clang_type.GetByteSize(nullptr)) {
+    return std::make_shared<Type>(die.GetID(), dwarf, attrs.name,
+                                  *clang_type_size, nullptr, LLDB_INVALID_UID,
+                                  Type::eEncodingIsUID, nullptr, clang_type,
+                                  Type::ResolveState::Forward);
+  }
+  return nullptr;
+}
+
+TypeSP DWARFASTParserClang::UpdateSymbolContextScopeForType(
+    const SymbolContext &sc, const DWARFDIE &die, TypeSP type_sp) {
+  if (!type_sp)
+    return type_sp;
+
+  SymbolFileDWARF *dwarf = die.GetDWARF();
+  TypeList &type_list = dwarf->GetTypeList();
+  DWARFDIE sc_parent_die = SymbolFileDWARF::GetParentSymbolContextDIE(die);
+  dw_tag_t sc_parent_tag = sc_parent_die.Tag();
+
+  SymbolContextScope *symbol_context_scope = nullptr;
+  if (sc_parent_tag == DW_TAG_compile_unit ||
+      sc_parent_tag == DW_TAG_partial_unit) {
+    symbol_context_scope = sc.comp_unit;
+  } else if (sc.function != nullptr && sc_parent_die) {
+    symbol_context_scope =
+        sc.function->GetBlock(true).FindBlockByID(sc_parent_die.GetID());
+    if (symbol_context_scope == nullptr)
+      symbol_context_scope = sc.function;
+  } else {
+    symbol_context_scope = sc.module_sp.get();
+  }
+
+  if (symbol_context_scope != nullptr)
+    type_sp->SetSymbolContextScope(symbol_context_scope);
+
+  // We are ready to put this type into the uniqued list up at the module
+  // level.
+  type_list.Insert(type_sp);
+
+  dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
+  return type_sp;
+}
+
+TypeSP
+DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
+                                           const DWARFDIE &die,
+                                           ParsedDWARFTypeAttributes &attrs) {
+  TypeSP type_sp;
+  CompilerType clang_type;
+  const dw_tag_t tag = die.Tag();
+  SymbolFileDWARF *dwarf = die.GetDWARF();
+  LanguageType cu_language = die.GetLanguage();
+  Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_TYPE_COMPLETION |
+                                          DWARF_LOG_LOOKUPS);
+
+  // UniqueDWARFASTType is large, so don't create a local variables on the
+  // stack, put it on the heap. This function is often called recursively and
+  // clang isn't good at sharing the stack space for variables in different
+  // blocks.
+  auto unique_ast_entry_up = std::make_unique<UniqueDWARFASTType>();
+
+  ConstString unique_typename(attrs.name);
+  Declaration unique_decl(attrs.decl);
+
+  if (attrs.name) {
+    if (Language::LanguageIsCPlusPlus(cu_language)) {
+      // For C++, we rely solely upon the one definition rule that says
+      // only one thing can exist at a given decl context. We ignore the
+      // file and line that things are declared on.
+      std::string qualified_name;
+      if (die.GetQualifiedName(qualified_name))
+        unique_typename = ConstString(qualified_name);
+      unique_decl.Clear();
+    }
+
+    if (dwarf->GetUniqueDWARFASTTypeMap().Find(
+            unique_typename, die, unique_decl, attrs.byte_size.getValueOr(-1),
+            *unique_ast_entry_up)) {
+      type_sp = unique_ast_entry_up->m_type_sp;
+      if (type_sp) {
+        dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
+        LinkDeclContextToDIE(
+            GetCachedClangDeclContextForDIE(unique_ast_entry_up->m_die), die);
+        return type_sp;
+      }
+    }
+  }
+
+  DEBUG_PRINTF("0x%8.8" PRIx64 ": %s (\"%s\")\n", die.GetID(),
+               DW_TAG_value_to_name(tag), type_name_cstr);
+
+  int tag_decl_kind = -1;
+  AccessType default_accessibility = eAccessNone;
+  if (tag == DW_TAG_structure_type) {
+    tag_decl_kind = clang::TTK_Struct;
+    default_accessibility = eAccessPublic;
+  } else if (tag == DW_TAG_union_type) {
+    tag_decl_kind = clang::TTK_Union;
+    default_accessibility = eAccessPublic;
+  } else if (tag == DW_TAG_class_type) {
+    tag_decl_kind = clang::TTK_Class;
+    default_accessibility = eAccessPrivate;
+  }
+
+  if (attrs.byte_size && *attrs.byte_size == 0 && attrs.name &&
+      !die.HasChildren() && cu_language == eLanguageTypeObjC) {
+    // Work around an issue with clang at the moment where forward
+    // declarations for objective C classes are emitted as:
+    //  DW_TAG_structure_type [2]
+    //  DW_AT_name( "ForwardObjcClass" )
+    //  DW_AT_byte_size( 0x00 )
+    //  DW_AT_decl_file( "..." )
+    //  DW_AT_decl_line( 1 )
+    //
+    // Note that there is no DW_AT_declaration and there are no children,
+    // and the byte size is zero.
+    attrs.is_forward_declaration = true;
+  }
+
+  if (attrs.class_language == eLanguageTypeObjC ||
+      attrs.class_language == eLanguageTypeObjC_plus_plus) {
+    if (!attrs.is_complete_objc_class &&
+        die.Supports_DW_AT_APPLE_objc_complete_type()) {
+      // We have a valid eSymbolTypeObjCClass class symbol whose name
+      // matches the current objective C class that we are trying to find
+      // and this DIE isn't the complete definition (we checked
+      // is_complete_objc_class above and know it is false), so the real
+      // definition is in here somewhere
+      type_sp =
+          dwarf->FindCompleteObjCDefinitionTypeForDIE(die, attrs.name, true);
+
+      if (!type_sp) {
+        SymbolFileDWARFDebugMap *debug_map_symfile =
+            dwarf->GetDebugMapSymfile();
+        if (debug_map_symfile) {
+          // We weren't able to find a full declaration in this DWARF,
+          // see if we have a declaration anywhere else...
+          type_sp = debug_map_symfile->FindCompleteObjCDefinitionTypeForDIE(
+              die, attrs.name, true);
+        }
+      }
+
+      if (type_sp) {
+        if (log) {
+          dwarf->GetObjectFile()->GetModule()->LogMessage(
+              log,
+              "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is an "
+              "incomplete objc type, complete type is 0x%8.8" PRIx64,
+              static_cast<void *>(this), die.GetOffset(),
+              DW_TAG_value_to_name(tag), attrs.name.GetCString(),
+              type_sp->GetID());
+        }
+
+        // We found a real definition for this type elsewhere so lets use
+        // it and cache the fact that we found a complete type for this
+        // die
+        dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
+        return type_sp;
+      }
+    }
+  }
+
+  if (attrs.is_forward_declaration) {
+    // We have a forward declaration to a type and we need to try and
+    // find a full declaration. We look in the current type index just in
+    // case we have a forward declaration followed by an actual
+    // declarations in the DWARF. If this fails, we need to look
+    // elsewhere...
+    if (log) {
+      dwarf->GetObjectFile()->GetModule()->LogMessage(
+          log,
+          "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a "
+          "forward declaration, trying to find complete type",
+          static_cast<void *>(this), die.GetOffset(), DW_TAG_value_to_name(tag),
+          attrs.name.GetCString());
+    }
+
+    // See if the type comes from a Clang module and if so, track down
+    // that type.
+    type_sp = ParseTypeFromClangModule(sc, die, log);
+    if (type_sp)
+      return type_sp;
+
+    DWARFDeclContext die_decl_ctx;
+    die.GetDWARFDeclContext(die_decl_ctx);
+
+    // type_sp = FindDefinitionTypeForDIE (dwarf_cu, die,
+    // type_name_const_str);
+    type_sp = dwarf->FindDefinitionTypeForDWARFDeclContext(die_decl_ctx);
+
+    if (!type_sp) {
+      SymbolFileDWARFDebugMap *debug_map_symfile = dwarf->GetDebugMapSymfile();
+      if (debug_map_symfile) {
+        // We weren't able to find a full declaration in this DWARF, see
+        // if we have a declaration anywhere else...
+        type_sp = debug_map_symfile->FindDefinitionTypeForDWARFDeclContext(
+            die_decl_ctx);
+      }
+    }
+
+    if (type_sp) {
+      if (log) {
+        dwarf->GetObjectFile()->GetModule()->LogMessage(
+            log,
+            "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" is a "
+            "forward declaration, complete type is 0x%8.8" PRIx64,
+            static_cast<void *>(this), die.GetOffset(),
+            DW_TAG_value_to_name(tag), attrs.name.GetCString(),
+            type_sp->GetID());
+      }
+
+      // We found a real definition for this type elsewhere so lets use
+      // it and cache the fact that we found a complete type for this die
+      dwarf->GetDIEToType()[die.GetDIE()] = type_sp.get();
+      clang::DeclContext *defn_decl_ctx =
+          GetCachedClangDeclContextForDIE(dwarf->GetDIE(type_sp->GetID()));
+      if (defn_decl_ctx)
+        LinkDeclContextToDIE(defn_decl_ctx, die);
+      return type_sp;
+    }
+  }
+  assert(tag_decl_kind != -1);
+  bool clang_type_was_created = false;
+  clang_type.SetCompilerType(
+      &m_ast, dwarf->GetForwardDeclDieToClangType().lookup(die.GetDIE()));
+  if (!clang_type) {
+    clang::DeclContext *decl_ctx =
+        GetClangDeclContextContainingDIE(die, nullptr);
+
+    // If your decl context is a record that was imported from another
+    // AST context (in the gmodules case), we need to make sure the type
+    // backing the Decl is complete before adding children to it. This is
+    // not an issue in the non-gmodules case because the debug info will
+    // always contain a full definition of parent types in that case.
+    CompleteExternalTagDeclType(m_ast, GetClangASTImporter(), decl_ctx, die,
+                                attrs.name.GetCString());
+
+    if (attrs.accessibility == eAccessNone && decl_ctx) {
+      // Check the decl context that contains this class/struct/union. If
+      // it is a class we must give it an accessibility.
+      const clang::Decl::Kind containing_decl_kind = decl_ctx->getDeclKind();
+      if (DeclKindIsCXXClass(containing_decl_kind))
+        attrs.accessibility = default_accessibility;
+    }
+
+    ClangASTMetadata metadata;
+    metadata.SetUserID(die.GetID());
+    metadata.SetIsDynamicCXXType(dwarf->ClassOrStructIsVirtual(die));
+
+    if (attrs.name.GetStringRef().contains('<')) {
+      ClangASTContext::TemplateParameterInfos template_param_infos;
+      if (ParseTemplateParameterInfos(die, template_param_infos)) {
+        clang::ClassTemplateDecl *class_template_decl =
+            m_ast.ParseClassTemplateDecl(decl_ctx, attrs.accessibility,
+                                         attrs.name.GetCString(), tag_decl_kind,
+                                         template_param_infos);
+        if (!class_template_decl) {
+          if (log) {
+            dwarf->GetObjectFile()->GetModule()->LogMessage(
+                log,
+                "SymbolFileDWARF(%p) - 0x%8.8x: %s type \"%s\" "
+                "clang::ClassTemplateDecl failed to return a decl.",
+                static_cast<void *>(this), die.GetOffset(),
+                DW_TAG_value_to_name(tag), attrs.name.GetCString());
+          }
+          return TypeSP();
+        }
+
+        clang::ClassTemplateSpecializationDecl *class_specialization_decl =
+            m_ast.CreateClassTemplateSpecializationDecl(
+                decl_ctx, class_template_decl, tag_decl_kind,
+                template_param_infos);
+        clang_type = m_ast.CreateClassTemplateSpecializationType(
+            class_specialization_decl);
+        clang_type_was_created = true;
+
+        m_ast.SetMetadata(class_template_decl, metadata);
+        m_ast.SetMetadata(class_specialization_decl, metadata);
+      }
+    }
+
+    if (!clang_type_was_created) {
+      clang_type_was_created = true;
+      clang_type = m_ast.CreateRecordType(
+          decl_ctx, attrs.accessibility, attrs.name.GetCString(), tag_decl_kind,
+          attrs.class_language, &metadata, attrs.exports_symbols);
+    }
+  }
+
+  // Store a forward declaration to this class type in case any
+  // parameters in any class methods need it for the clang types for
+  // function prototypes.
+  LinkDeclContextToDIE(m_ast.GetDeclContextForType(clang_type), die);
+  type_sp = std::make_shared<Type>(die.GetID(), dwarf, attrs.name,
+                                   attrs.byte_size, nullptr, LLDB_INVALID_UID,
+                                   Type::eEncodingIsUID, &attrs.decl,
+                                   clang_type, Type::ResolveState::Forward);
+
+  type_sp->SetIsCompleteObjCClass(attrs.is_complete_objc_class);
+
+  // Add our type to the unique type map so we don't end up creating many
+  // copies of the same type over and over in the ASTContext for our
+  // module
+  unique_ast_entry_up->m_type_sp = type_sp;
+  unique_ast_entry_up->m_die = die;
+  unique_ast_entry_up->m_declaration = unique_decl;
+  unique_ast_entry_up->m_byte_size = attrs.byte_size.getValueOr(0);
+  dwarf->GetUniqueDWARFASTTypeMap().Insert(unique_typename,
+                                           *unique_ast_entry_up);
+
+  if (attrs.is_forward_declaration && die.HasChildren()) {
+    // Check to see if the DIE actually has a definition, some version of
+    // GCC will
+    // emit DIEs with DW_AT_declaration set to true, but yet still have
+    // subprogram, members, or inheritance, so we can't trust it
+    DWARFDIE child_die = die.GetFirstChild();
+    while (child_die) {
+      switch (child_die.Tag()) {
+      case DW_TAG_inheritance:
+      case DW_TAG_subprogram:
+      case DW_TAG_member:
+      case DW_TAG_APPLE_property:
+      case DW_TAG_class_type:
+      case DW_TAG_structure_type:
+      case DW_TAG_enumeration_type:
+      case DW_TAG_typedef:
+      case DW_TAG_union_type:
+        child_die.Clear();
+        attrs.is_forward_declaration = false;
+        break;
+      default:
+        child_die = child_die.GetSibling();
+        break;
+      }
+    }
+  }
+
+  if (!attrs.is_forward_declaration) {
+    // Always start the definition for a class type so that if the class
+    // has child classes or types that require the class to be created
+    // for use as their decl contexts the class will be ready to accept
+    // these child definitions.
+    if (!die.HasChildren()) {
+      // No children for this struct/union/class, lets finish it
+      if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) {
+        ClangASTContext::CompleteTagDeclarationDefinition(clang_type);
+      } else {
+        dwarf->GetObjectFile()->GetModule()->ReportError(
+            "DWARF DIE at 0x%8.8x named \"%s\" was not able to start its "
+            "definition.\nPlease file a bug and attach the file at the "
+            "start of this error message",
+            die.GetOffset(), attrs.name.GetCString());
+      }
+
+      if (tag == DW_TAG_structure_type) // this only applies in C
+      {
+        clang::RecordDecl *record_decl =
+            ClangASTContext::GetAsRecordDecl(clang_type);
+
+        if (record_decl) {
+          GetClangASTImporter().SetRecordLayout(
+              record_decl, ClangASTImporter::LayoutInfo());
+        }
+      }
+    } else if (clang_type_was_created) {
+      // Start the definition if the class is not objective C since the
+      // underlying decls respond to isCompleteDefinition(). Objective
+      // C decls don't respond to isCompleteDefinition() so we can't
+      // start the declaration definition right away. For C++
+      // class/union/structs we want to start the definition in case the
+      // class is needed as the declaration context for a contained class
+      // or type without the need to complete that type..
+
+      if (attrs.class_language != eLanguageTypeObjC &&
+          attrs.class_language != eLanguageTypeObjC_plus_plus)
+        ClangASTContext::StartTagDeclarationDefinition(clang_type);
+
+      // Leave this as a forward declaration until we need to know the
+      // details of the type. lldb_private::Type will automatically call
+      // the SymbolFile virtual function
+      // "SymbolFileDWARF::CompleteType(Type *)" When the definition
+      // needs to be defined.
+      assert(!dwarf->GetForwardDeclClangTypeToDie().count(
+                 ClangUtil::RemoveFastQualifiers(clang_type)
+                     .GetOpaqueQualType()) &&
+             "Type already in the forward declaration map!");
+      // Can't assume m_ast.GetSymbolFile() is actually a
+      // SymbolFileDWARF, it can be a SymbolFileDWARFDebugMap for Apple
+      // binaries.
+      dwarf->GetForwardDeclDieToClangType()[die.GetDIE()] =
+          clang_type.GetOpaqueQualType();
+      dwarf->GetForwardDeclClangTypeToDie()
+          [ClangUtil::RemoveFastQualifiers(clang_type).GetOpaqueQualType()] =
+          die.GetID();
+      m_ast.SetHasExternalStorage(clang_type.GetOpaqueQualType(), true);
+    }
+  }
+
+  // If we made a clang type, set the trivial abi if applicable: We only
+  // do this for pass by value - which implies the Trivial ABI. There
+  // isn't a way to assert that something that would normally be pass by
+  // value is pass by reference, so we ignore that attribute if set.
+  if (attrs.calling_convention == llvm::dwarf::DW_CC_pass_by_value) {
+    clang::CXXRecordDecl *record_decl =
+        m_ast.GetAsCXXRecordDecl(clang_type.GetOpaqueQualType());
+    if (record_decl && record_decl->getDefinition()) {
+      record_decl->setHasTrivialSpecialMemberForCall();
+    }
+  }
+
+  if (attrs.calling_convention == llvm::dwarf::DW_CC_pass_by_reference) {
+    clang::CXXRecordDecl *record_decl =
+        m_ast.GetAsCXXRecordDecl(clang_type.GetOpaqueQualType());
+    if (record_decl)
+      record_decl->setArgPassingRestrictions(
+          clang::RecordDecl::APK_CannotPassInRegs);
   }
   return type_sp;
 }
@@ -1809,7 +1881,7 @@
         }
       }
 
-      clang::ASTContext *ast = m_ast.getASTContext();
+      clang::ASTContext &ast = m_ast.getASTContext();
       if (!clang_type)
         clang_type = m_ast.GetBasicType(eBasicTypeVoid);
 
@@ -1829,7 +1901,7 @@
             return false;
           llvm::APInt apint(*size, uval64, is_signed);
           template_param_infos.args.push_back(
-              clang::TemplateArgument(*ast, llvm::APSInt(apint, !is_signed),
+              clang::TemplateArgument(ast, llvm::APSInt(apint, !is_signed),
                                       ClangUtil::GetQualType(clang_type)));
         } else {
           template_param_infos.args.push_back(
@@ -1879,6 +1951,182 @@
   return template_param_infos.args.size() == template_param_infos.names.size();
 }
 
+bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die,
+                                             lldb_private::Type *type,
+                                             CompilerType &clang_type) {
+  const dw_tag_t tag = die.Tag();
+  SymbolFileDWARF *dwarf = die.GetDWARF();
+
+  ClangASTImporter::LayoutInfo layout_info;
+
+  {
+    if (die.HasChildren()) {
+      LanguageType class_language = eLanguageTypeUnknown;
+      if (ClangASTContext::IsObjCObjectOrInterfaceType(clang_type)) {
+        class_language = eLanguageTypeObjC;
+        // For objective C we don't start the definition when the class is
+        // created.
+        ClangASTContext::StartTagDeclarationDefinition(clang_type);
+      }
+
+      int tag_decl_kind = -1;
+      AccessType default_accessibility = eAccessNone;
+      if (tag == DW_TAG_structure_type) {
+        tag_decl_kind = clang::TTK_Struct;
+        default_accessibility = eAccessPublic;
+      } else if (tag == DW_TAG_union_type) {
+        tag_decl_kind = clang::TTK_Union;
+        default_accessibility = eAccessPublic;
+      } else if (tag == DW_TAG_class_type) {
+        tag_decl_kind = clang::TTK_Class;
+        default_accessibility = eAccessPrivate;
+      }
+
+      std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> bases;
+      std::vector<int> member_accessibilities;
+      bool is_a_class = false;
+      // Parse members and base classes first
+      std::vector<DWARFDIE> member_function_dies;
+
+      DelayedPropertyList delayed_properties;
+      ParseChildMembers(die, clang_type, class_language, bases,
+                        member_accessibilities, member_function_dies,
+                        delayed_properties, default_accessibility, is_a_class,
+                        layout_info);
+
+      // Now parse any methods if there were any...
+      for (const DWARFDIE &die : member_function_dies)
+        dwarf->ResolveType(die);
+
+      if (class_language == eLanguageTypeObjC) {
+        ConstString class_name(clang_type.GetTypeName());
+        if (class_name) {
+          DIEArray method_die_offsets;
+          dwarf->GetObjCMethodDIEOffsets(class_name, method_die_offsets);
+
+          if (!method_die_offsets.empty()) {
+            DWARFDebugInfo *debug_info = dwarf->DebugInfo();
+
+            const size_t num_matches = method_die_offsets.size();
+            for (size_t i = 0; i < num_matches; ++i) {
+              const DIERef &die_ref = method_die_offsets[i];
+              DWARFDIE method_die = debug_info->GetDIE(die_ref);
+
+              if (method_die)
+                method_die.ResolveType();
+            }
+          }
+
+          for (DelayedPropertyList::iterator pi = delayed_properties.begin(),
+                                             pe = delayed_properties.end();
+               pi != pe; ++pi)
+            pi->Finalize();
+        }
+      }
+
+      // If we have a DW_TAG_structure_type instead of a DW_TAG_class_type we
+      // need to tell the clang type it is actually a class.
+      if (class_language != eLanguageTypeObjC) {
+        if (is_a_class && tag_decl_kind != clang::TTK_Class)
+          m_ast.SetTagTypeKind(ClangUtil::GetQualType(clang_type),
+                               clang::TTK_Class);
+      }
+
+      // Since DW_TAG_structure_type gets used for both classes and
+      // structures, we may need to set any DW_TAG_member fields to have a
+      // "private" access if none was specified. When we parsed the child
+      // members we tracked that actual accessibility value for each
+      // DW_TAG_member in the "member_accessibilities" array. If the value
+      // for the member is zero, then it was set to the
+      // "default_accessibility" which for structs was "public". Below we
+      // correct this by setting any fields to "private" that weren't
+      // correctly set.
+      if (is_a_class && !member_accessibilities.empty()) {
+        // This is a class and all members that didn't have their access
+        // specified are private.
+        m_ast.SetDefaultAccessForRecordFields(
+            m_ast.GetAsRecordDecl(clang_type), eAccessPrivate,
+            &member_accessibilities.front(), member_accessibilities.size());
+      }
+
+      if (!bases.empty()) {
+        // Make sure all base classes refer to complete types and not forward
+        // declarations. If we don't do this, clang will crash with an
+        // assertion in the call to clang_type.TransferBaseClasses()
+        for (const auto &base_class : bases) {
+          clang::TypeSourceInfo *type_source_info =
+              base_class->getTypeSourceInfo();
+          if (type_source_info) {
+            CompilerType base_class_type =
+                m_ast.GetType(type_source_info->getType());
+            if (!base_class_type.GetCompleteType()) {
+              auto module = dwarf->GetObjectFile()->GetModule();
+              module->ReportError(":: Class '%s' has a base class '%s' which "
+                                  "does not have a complete definition.",
+                                  die.GetName(),
+                                  base_class_type.GetTypeName().GetCString());
+              if (die.GetCU()->GetProducer() == eProducerClang)
+                module->ReportError(":: Try compiling the source file with "
+                                    "-fstandalone-debug.");
+
+              // We have no choice other than to pretend that the base class
+              // is complete. If we don't do this, clang will crash when we
+              // call setBases() inside of
+              // "clang_type.TransferBaseClasses()" below. Since we
+              // provide layout assistance, all ivars in this class and other
+              // classes will be fine, this is the best we can do short of
+              // crashing.
+              if (ClangASTContext::StartTagDeclarationDefinition(
+                      base_class_type)) {
+                ClangASTContext::CompleteTagDeclarationDefinition(
+                    base_class_type);
+              }
+            }
+          }
+        }
+
+        m_ast.TransferBaseClasses(clang_type.GetOpaqueQualType(),
+                                  std::move(bases));
+      }
+    }
+  }
+
+  m_ast.AddMethodOverridesForCXXRecordType(clang_type.GetOpaqueQualType());
+  ClangASTContext::BuildIndirectFields(clang_type);
+  ClangASTContext::CompleteTagDeclarationDefinition(clang_type);
+
+  if (!layout_info.field_offsets.empty() || !layout_info.base_offsets.empty() ||
+      !layout_info.vbase_offsets.empty()) {
+    if (type)
+      layout_info.bit_size = type->GetByteSize().getValueOr(0) * 8;
+    if (layout_info.bit_size == 0)
+      layout_info.bit_size =
+          die.GetAttributeValueAsUnsigned(DW_AT_byte_size, 0) * 8;
+
+    clang::CXXRecordDecl *record_decl =
+        m_ast.GetAsCXXRecordDecl(clang_type.GetOpaqueQualType());
+    if (record_decl)
+      GetClangASTImporter().SetRecordLayout(record_decl, layout_info);
+  }
+
+  return (bool)clang_type;
+}
+
+bool DWARFASTParserClang::CompleteEnumType(const DWARFDIE &die,
+                                           lldb_private::Type *type,
+                                           CompilerType &clang_type) {
+  if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) {
+    if (die.HasChildren()) {
+      bool is_signed = false;
+      clang_type.IsIntegerType(is_signed);
+      ParseChildEnumerators(clang_type, is_signed,
+                            type->GetByteSize().getValueOr(0), die);
+    }
+    ClangASTContext::CompleteTagDeclarationDefinition(clang_type);
+  }
+  return (bool)clang_type;
+}
+
 bool DWARFASTParserClang::CompleteTypeFromDWARF(const DWARFDIE &die,
                                                 lldb_private::Type *type,
                                                 CompilerType &clang_type) {
@@ -1894,39 +2142,6 @@
   if (!die)
     return false;
 
-#if defined LLDB_CONFIGURATION_DEBUG
-  // For debugging purposes, the LLDB_DWARF_DONT_COMPLETE_TYPENAMES environment
-  // variable can be set with one or more typenames separated by ';'
-  // characters. This will cause this function to not complete any types whose
-  // names match.
-  //
-  // Examples of setting this environment variable:
-  //
-  // LLDB_DWARF_DONT_COMPLETE_TYPENAMES=Foo
-  // LLDB_DWARF_DONT_COMPLETE_TYPENAMES=Foo;Bar;Baz
-  const char *dont_complete_typenames_cstr =
-      getenv("LLDB_DWARF_DONT_COMPLETE_TYPENAMES");
-  if (dont_complete_typenames_cstr && dont_complete_typenames_cstr[0]) {
-    const char *die_name = die.GetName();
-    if (die_name && die_name[0]) {
-      const char *match = strstr(dont_complete_typenames_cstr, die_name);
-      if (match) {
-        size_t die_name_length = strlen(die_name);
-        while (match) {
-          const char separator_char = ';';
-          const char next_char = match[die_name_length];
-          if (next_char == '\0' || next_char == separator_char) {
-            if (match == dont_complete_typenames_cstr ||
-                match[-1] == separator_char)
-              return false;
-          }
-          match = strstr(match + 1, die_name);
-        }
-      }
-    }
-  }
-#endif
-
   const dw_tag_t tag = die.Tag();
 
   Log *log =
@@ -1940,239 +2155,10 @@
   switch (tag) {
   case DW_TAG_structure_type:
   case DW_TAG_union_type:
-  case DW_TAG_class_type: {
-    ClangASTImporter::LayoutInfo layout_info;
-
-    {
-      if (die.HasChildren()) {
-        LanguageType class_language = eLanguageTypeUnknown;
-        if (ClangASTContext::IsObjCObjectOrInterfaceType(clang_type)) {
-          class_language = eLanguageTypeObjC;
-          // For objective C we don't start the definition when the class is
-          // created.
-          ClangASTContext::StartTagDeclarationDefinition(clang_type);
-        }
-
-        int tag_decl_kind = -1;
-        AccessType default_accessibility = eAccessNone;
-        if (tag == DW_TAG_structure_type) {
-          tag_decl_kind = clang::TTK_Struct;
-          default_accessibility = eAccessPublic;
-        } else if (tag == DW_TAG_union_type) {
-          tag_decl_kind = clang::TTK_Union;
-          default_accessibility = eAccessPublic;
-        } else if (tag == DW_TAG_class_type) {
-          tag_decl_kind = clang::TTK_Class;
-          default_accessibility = eAccessPrivate;
-        }
-
-        std::vector<std::unique_ptr<clang::CXXBaseSpecifier>> bases;
-        std::vector<int> member_accessibilities;
-        bool is_a_class = false;
-        // Parse members and base classes first
-        std::vector<DWARFDIE> member_function_dies;
-
-        DelayedPropertyList delayed_properties;
-        ParseChildMembers(die, clang_type, class_language, bases,
-                          member_accessibilities, member_function_dies,
-                          delayed_properties, default_accessibility, is_a_class,
-                          layout_info);
-
-        // Now parse any methods if there were any...
-        for (const DWARFDIE &die : member_function_dies)
-          dwarf->ResolveType(die);
-
-        if (class_language == eLanguageTypeObjC) {
-          ConstString class_name(clang_type.GetTypeName());
-          if (class_name) {
-            DIEArray method_die_offsets;
-            dwarf->GetObjCMethodDIEOffsets(class_name, method_die_offsets);
-
-            if (!method_die_offsets.empty()) {
-              DWARFDebugInfo *debug_info = dwarf->DebugInfo();
-
-              const size_t num_matches = method_die_offsets.size();
-              for (size_t i = 0; i < num_matches; ++i) {
-                const DIERef &die_ref = method_die_offsets[i];
-                DWARFDIE method_die = debug_info->GetDIE(die_ref);
-
-                if (method_die)
-                  method_die.ResolveType();
-              }
-            }
-
-            for (DelayedPropertyList::iterator pi = delayed_properties.begin(),
-                                               pe = delayed_properties.end();
-                 pi != pe; ++pi)
-              pi->Finalize();
-          }
-        }
-
-        // If we have a DW_TAG_structure_type instead of a DW_TAG_class_type we
-        // need to tell the clang type it is actually a class.
-        if (class_language != eLanguageTypeObjC) {
-          if (is_a_class && tag_decl_kind != clang::TTK_Class)
-            m_ast.SetTagTypeKind(ClangUtil::GetQualType(clang_type),
-                                 clang::TTK_Class);
-        }
-
-        // Since DW_TAG_structure_type gets used for both classes and
-        // structures, we may need to set any DW_TAG_member fields to have a
-        // "private" access if none was specified. When we parsed the child
-        // members we tracked that actual accessibility value for each
-        // DW_TAG_member in the "member_accessibilities" array. If the value
-        // for the member is zero, then it was set to the
-        // "default_accessibility" which for structs was "public". Below we
-        // correct this by setting any fields to "private" that weren't
-        // correctly set.
-        if (is_a_class && !member_accessibilities.empty()) {
-          // This is a class and all members that didn't have their access
-          // specified are private.
-          m_ast.SetDefaultAccessForRecordFields(
-              m_ast.GetAsRecordDecl(clang_type), eAccessPrivate,
-              &member_accessibilities.front(), member_accessibilities.size());
-        }
-
-        if (!bases.empty()) {
-          // Make sure all base classes refer to complete types and not forward
-          // declarations. If we don't do this, clang will crash with an
-          // assertion in the call to clang_type.TransferBaseClasses()
-          for (const auto &base_class : bases) {
-            clang::TypeSourceInfo *type_source_info =
-                base_class->getTypeSourceInfo();
-            if (type_source_info) {
-              CompilerType base_class_type(
-                  &m_ast, type_source_info->getType().getAsOpaquePtr());
-              if (!base_class_type.GetCompleteType()) {
-                auto module = dwarf->GetObjectFile()->GetModule();
-                module->ReportError(":: Class '%s' has a base class '%s' which "
-                                    "does not have a complete definition.",
-                                    die.GetName(),
-                                    base_class_type.GetTypeName().GetCString());
-                if (die.GetCU()->GetProducer() == eProducerClang)
-                  module->ReportError(":: Try compiling the source file with "
-                                      "-fstandalone-debug.");
-
-                // We have no choice other than to pretend that the base class
-                // is complete. If we don't do this, clang will crash when we
-                // call setBases() inside of
-                // "clang_type.TransferBaseClasses()" below. Since we
-                // provide layout assistance, all ivars in this class and other
-                // classes will be fine, this is the best we can do short of
-                // crashing.
-                if (ClangASTContext::StartTagDeclarationDefinition(
-                        base_class_type)) {
-                  ClangASTContext::CompleteTagDeclarationDefinition(
-                      base_class_type);
-                }
-              }
-            }
-          }
-
-          m_ast.TransferBaseClasses(clang_type.GetOpaqueQualType(),
-                                    std::move(bases));
-        }
-      }
-    }
-
-    m_ast.AddMethodOverridesForCXXRecordType(clang_type.GetOpaqueQualType());
-    ClangASTContext::BuildIndirectFields(clang_type);
-    ClangASTContext::CompleteTagDeclarationDefinition(clang_type);
-
-    if (!layout_info.field_offsets.empty() ||
-        !layout_info.base_offsets.empty() ||
-        !layout_info.vbase_offsets.empty()) {
-      if (type)
-        layout_info.bit_size = type->GetByteSize().getValueOr(0) * 8;
-      if (layout_info.bit_size == 0)
-        layout_info.bit_size =
-            die.GetAttributeValueAsUnsigned(DW_AT_byte_size, 0) * 8;
-
-      clang::CXXRecordDecl *record_decl =
-          m_ast.GetAsCXXRecordDecl(clang_type.GetOpaqueQualType());
-      if (record_decl) {
-        if (log) {
-          ModuleSP module_sp = dwarf->GetObjectFile()->GetModule();
-
-          if (module_sp) {
-            module_sp->LogMessage(
-                log,
-                "ClangASTContext::CompleteTypeFromDWARF (clang_type = %p) "
-                "caching layout info for record_decl = %p, bit_size = %" PRIu64
-                ", alignment = %" PRIu64
-                ", field_offsets[%u], base_offsets[%u], vbase_offsets[%u])",
-                static_cast<void *>(clang_type.GetOpaqueQualType()),
-                static_cast<void *>(record_decl), layout_info.bit_size,
-                layout_info.alignment,
-                static_cast<uint32_t>(layout_info.field_offsets.size()),
-                static_cast<uint32_t>(layout_info.base_offsets.size()),
-                static_cast<uint32_t>(layout_info.vbase_offsets.size()));
-
-            uint32_t idx;
-            {
-              llvm::DenseMap<const clang::FieldDecl *, uint64_t>::const_iterator
-                  pos,
-                  end = layout_info.field_offsets.end();
-              for (idx = 0, pos = layout_info.field_offsets.begin(); pos != end;
-                   ++pos, ++idx) {
-                module_sp->LogMessage(
-                    log, "ClangASTContext::CompleteTypeFromDWARF (clang_type = "
-                         "%p) field[%u] = { bit_offset=%u, name='%s' }",
-                    static_cast<void *>(clang_type.GetOpaqueQualType()), idx,
-                    static_cast<uint32_t>(pos->second),
-                    pos->first->getNameAsString().c_str());
-              }
-            }
-
-            {
-              llvm::DenseMap<const clang::CXXRecordDecl *,
-                             clang::CharUnits>::const_iterator base_pos,
-                  base_end = layout_info.base_offsets.end();
-              for (idx = 0, base_pos = layout_info.base_offsets.begin();
-                   base_pos != base_end; ++base_pos, ++idx) {
-                module_sp->LogMessage(
-                    log, "ClangASTContext::CompleteTypeFromDWARF (clang_type = "
-                         "%p) base[%u] = { byte_offset=%u, name='%s' }",
-                    clang_type.GetOpaqueQualType(), idx,
-                    (uint32_t)base_pos->second.getQuantity(),
-                    base_pos->first->getNameAsString().c_str());
-              }
-            }
-            {
-              llvm::DenseMap<const clang::CXXRecordDecl *,
-                             clang::CharUnits>::const_iterator vbase_pos,
-                  vbase_end = layout_info.vbase_offsets.end();
-              for (idx = 0, vbase_pos = layout_info.vbase_offsets.begin();
-                   vbase_pos != vbase_end; ++vbase_pos, ++idx) {
-                module_sp->LogMessage(
-                    log, "ClangASTContext::CompleteTypeFromDWARF (clang_type = "
-                         "%p) vbase[%u] = { byte_offset=%u, name='%s' }",
-                    static_cast<void *>(clang_type.GetOpaqueQualType()), idx,
-                    static_cast<uint32_t>(vbase_pos->second.getQuantity()),
-                    vbase_pos->first->getNameAsString().c_str());
-              }
-            }
-          }
-        }
-        GetClangASTImporter().InsertRecordDecl(record_decl, layout_info);
-      }
-    }
-  }
-
-    return (bool)clang_type;
-
+  case DW_TAG_class_type:
+    return CompleteRecordType(die, type, clang_type);
   case DW_TAG_enumeration_type:
-    if (ClangASTContext::StartTagDeclarationDefinition(clang_type)) {
-      if (die.HasChildren()) {
-        bool is_signed = false;
-        clang_type.IsIntegerType(is_signed);
-        ParseChildEnumerators(clang_type, is_signed,
-                              type->GetByteSize().getValueOr(0), die);
-      }
-      ClangASTContext::CompleteTagDeclarationDefinition(clang_type);
-    }
-    return (bool)clang_type;
-
+    return CompleteEnumType(die, type, clang_type);
   default:
     assert(false && "not a forward clang type decl!");
     break;
@@ -2181,14 +2167,16 @@
   return false;
 }
 
-std::vector<DWARFDIE> DWARFASTParserClang::GetDIEForDeclContext(
+void DWARFASTParserClang::EnsureAllDIEsInDeclContextHaveBeenParsed(
     lldb_private::CompilerDeclContext decl_context) {
-  std::vector<DWARFDIE> result;
-  for (auto it = m_decl_ctx_to_die.find(
-           (clang::DeclContext *)decl_context.GetOpaqueDeclContext());
-       it != m_decl_ctx_to_die.end(); it++)
-    result.push_back(it->second);
-  return result;
+  auto opaque_decl_ctx =
+      (clang::DeclContext *)decl_context.GetOpaqueDeclContext();
+  for (auto it = m_decl_ctx_to_die.find(opaque_decl_ctx);
+       it != m_decl_ctx_to_die.end() && it->first == opaque_decl_ctx;
+       it = m_decl_ctx_to_die.erase(it))
+    for (DWARFDIE decl = it->second.GetFirstChild(); decl;
+         decl = decl.GetSibling())
+      GetClangDeclForDIE(decl);
 }
 
 CompilerDecl DWARFASTParserClang::GetDeclForUIDFromDWARF(const DWARFDIE &die) {
@@ -2202,7 +2190,7 @@
 DWARFASTParserClang::GetDeclContextForUIDFromDWARF(const DWARFDIE &die) {
   clang::DeclContext *clang_decl_ctx = GetClangDeclContextForDIE(die);
   if (clang_decl_ctx)
-    return CompilerDeclContext(&m_ast, clang_decl_ctx);
+    return m_ast.CreateDeclContext(clang_decl_ctx);
   return CompilerDeclContext();
 }
 
@@ -2211,7 +2199,7 @@
   clang::DeclContext *clang_decl_ctx =
       GetClangDeclContextContainingDIE(die, nullptr);
   if (clang_decl_ctx)
-    return CompilerDeclContext(&m_ast, clang_decl_ctx);
+    return m_ast.CreateDeclContext(clang_decl_ctx);
   return CompilerDeclContext();
 }
 
@@ -2281,54 +2269,6 @@
   return enumerators_added;
 }
 
-#if defined(LLDB_CONFIGURATION_DEBUG) || defined(LLDB_CONFIGURATION_RELEASE)
-
-class DIEStack {
-public:
-  void Push(const DWARFDIE &die) { m_dies.push_back(die); }
-
-  void LogDIEs(Log *log) {
-    StreamString log_strm;
-    const size_t n = m_dies.size();
-    log_strm.Printf("DIEStack[%" PRIu64 "]:\n", (uint64_t)n);
-    for (size_t i = 0; i < n; i++) {
-      std::string qualified_name;
-      const DWARFDIE &die = m_dies[i];
-      die.GetQualifiedName(qualified_name);
-      log_strm.Printf("[%" PRIu64 "] 0x%8.8x: %s name='%s'\n", (uint64_t)i,
-                      die.GetOffset(), die.GetTagAsCString(),
-                      qualified_name.c_str());
-    }
-    log->PutCString(log_strm.GetData());
-  }
-  void Pop() { m_dies.pop_back(); }
-
-  class ScopedPopper {
-  public:
-    ScopedPopper(DIEStack &die_stack)
-        : m_die_stack(die_stack), m_valid(false) {}
-
-    void Push(const DWARFDIE &die) {
-      m_valid = true;
-      m_die_stack.Push(die);
-    }
-
-    ~ScopedPopper() {
-      if (m_valid)
-        m_die_stack.Pop();
-    }
-
-  protected:
-    DIEStack &m_die_stack;
-    bool m_valid;
-  };
-
-protected:
-  typedef std::vector<DWARFDIE> Stack;
-  Stack m_dies;
-};
-#endif
-
 Function *DWARFASTParserClang::ParseFunctionFromDWARF(CompileUnit &comp_unit,
                                                       const DWARFDIE &die) {
   DWARFRangeList func_ranges;
@@ -2442,6 +2382,442 @@
   return nullptr;
 }
 
+void DWARFASTParserClang::ParseSingleMember(
+    const DWARFDIE &die, const DWARFDIE &parent_die,
+    lldb_private::CompilerType &class_clang_type,
+    const lldb::LanguageType class_language,
+    std::vector<int> &member_accessibilities,
+    lldb::AccessType &default_accessibility,
+    DelayedPropertyList &delayed_properties,
+    lldb_private::ClangASTImporter::LayoutInfo &layout_info,
+    FieldInfo &last_field_info) {
+  ModuleSP module_sp = parent_die.GetDWARF()->GetObjectFile()->GetModule();
+  const dw_tag_t tag = die.Tag();
+  // Get the parent byte size so we can verify any members will fit
+  const uint64_t parent_byte_size =
+      parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX);
+  const uint64_t parent_bit_size =
+      parent_byte_size == UINT64_MAX ? UINT64_MAX : parent_byte_size * 8;
+
+  DWARFAttributes attributes;
+  const size_t num_attributes = die.GetAttributes(attributes);
+  if (num_attributes > 0) {
+    const char *name = nullptr;
+    const char *prop_name = nullptr;
+    const char *prop_getter_name = nullptr;
+    const char *prop_setter_name = nullptr;
+    uint32_t prop_attributes = 0;
+
+    bool is_artificial = false;
+    DWARFFormValue encoding_form;
+    AccessType accessibility = eAccessNone;
+    uint32_t member_byte_offset =
+        (parent_die.Tag() == DW_TAG_union_type) ? 0 : UINT32_MAX;
+    llvm::Optional<uint64_t> byte_size;
+    int64_t bit_offset = 0;
+    uint64_t data_bit_offset = UINT64_MAX;
+    size_t bit_size = 0;
+    bool is_external =
+        false; // On DW_TAG_members, this means the member is static
+    uint32_t i;
+    for (i = 0; i < num_attributes && !is_artificial; ++i) {
+      const dw_attr_t attr = attributes.AttributeAtIndex(i);
+      DWARFFormValue form_value;
+      if (attributes.ExtractFormValueAtIndex(i, form_value)) {
+        // DW_AT_data_member_location indicates the byte offset of the
+        // word from the base address of the structure.
+        //
+        // DW_AT_bit_offset indicates how many bits into the word
+        // (according to the host endianness) the low-order bit of the
+        // field starts.  AT_bit_offset can be negative.
+        //
+        // DW_AT_bit_size indicates the size of the field in bits.
+        switch (attr) {
+        case DW_AT_name:
+          name = form_value.AsCString();
+          break;
+        case DW_AT_type:
+          encoding_form = form_value;
+          break;
+        case DW_AT_bit_offset:
+          bit_offset = form_value.Signed();
+          break;
+        case DW_AT_bit_size:
+          bit_size = form_value.Unsigned();
+          break;
+        case DW_AT_byte_size:
+          byte_size = form_value.Unsigned();
+          break;
+        case DW_AT_data_bit_offset:
+          data_bit_offset = form_value.Unsigned();
+          break;
+        case DW_AT_data_member_location:
+          if (form_value.BlockData()) {
+            Value initialValue(0);
+            Value memberOffset(0);
+            const DWARFDataExtractor &debug_info_data = die.GetData();
+            uint32_t block_length = form_value.Unsigned();
+            uint32_t block_offset =
+                form_value.BlockData() - debug_info_data.GetDataStart();
+            if (DWARFExpression::Evaluate(
+                    nullptr, // ExecutionContext *
+                    nullptr, // RegisterContext *
+                    module_sp,
+                    DataExtractor(debug_info_data, block_offset, block_length),
+                    die.GetCU(), eRegisterKindDWARF, &initialValue, nullptr,
+                    memberOffset, nullptr)) {
+              member_byte_offset = memberOffset.ResolveValue(nullptr).UInt();
+            }
+          } else {
+            // With DWARF 3 and later, if the value is an integer constant,
+            // this form value is the offset in bytes from the beginning of
+            // the containing entity.
+            member_byte_offset = form_value.Unsigned();
+          }
+          break;
+
+        case DW_AT_accessibility:
+          accessibility = DW_ACCESS_to_AccessType(form_value.Unsigned());
+          break;
+        case DW_AT_artificial:
+          is_artificial = form_value.Boolean();
+          break;
+        case DW_AT_APPLE_property_name:
+          prop_name = form_value.AsCString();
+          break;
+        case DW_AT_APPLE_property_getter:
+          prop_getter_name = form_value.AsCString();
+          break;
+        case DW_AT_APPLE_property_setter:
+          prop_setter_name = form_value.AsCString();
+          break;
+        case DW_AT_APPLE_property_attribute:
+          prop_attributes = form_value.Unsigned();
+          break;
+        case DW_AT_external:
+          is_external = form_value.Boolean();
+          break;
+
+        default:
+        case DW_AT_declaration:
+        case DW_AT_description:
+        case DW_AT_mutable:
+        case DW_AT_visibility:
+        case DW_AT_sibling:
+          break;
+        }
+      }
+    }
+
+    if (prop_name) {
+      ConstString fixed_setter;
+
+      // Check if the property getter/setter were provided as full names.
+      // We want basenames, so we extract them.
+
+      if (prop_getter_name && prop_getter_name[0] == '-') {
+        ObjCLanguage::MethodName prop_getter_method(prop_getter_name, true);
+        prop_getter_name = prop_getter_method.GetSelector().GetCString();
+      }
+
+      if (prop_setter_name && prop_setter_name[0] == '-') {
+        ObjCLanguage::MethodName prop_setter_method(prop_setter_name, true);
+        prop_setter_name = prop_setter_method.GetSelector().GetCString();
+      }
+
+      // If the names haven't been provided, they need to be filled in.
+
+      if (!prop_getter_name) {
+        prop_getter_name = prop_name;
+      }
+      if (!prop_setter_name && prop_name[0] &&
+          !(prop_attributes & DW_APPLE_PROPERTY_readonly)) {
+        StreamString ss;
+
+        ss.Printf("set%c%s:", toupper(prop_name[0]), &prop_name[1]);
+
+        fixed_setter.SetString(ss.GetString());
+        prop_setter_name = fixed_setter.GetCString();
+      }
+    }
+
+    // Clang has a DWARF generation bug where sometimes it represents
+    // fields that are references with bad byte size and bit size/offset
+    // information such as:
+    //
+    //  DW_AT_byte_size( 0x00 )
+    //  DW_AT_bit_size( 0x40 )
+    //  DW_AT_bit_offset( 0xffffffffffffffc0 )
+    //
+    // So check the bit offset to make sure it is sane, and if the values
+    // are not sane, remove them. If we don't do this then we will end up
+    // with a crash if we try to use this type in an expression when clang
+    // becomes unhappy with its recycled debug info.
+
+    if (byte_size.getValueOr(0) == 0 && bit_offset < 0) {
+      bit_size = 0;
+      bit_offset = 0;
+    }
+
+    // FIXME: Make Clang ignore Objective-C accessibility for expressions
+    if (class_language == eLanguageTypeObjC ||
+        class_language == eLanguageTypeObjC_plus_plus)
+      accessibility = eAccessNone;
+
+    // Handle static members
+    if (is_external && member_byte_offset == UINT32_MAX) {
+      Type *var_type = die.ResolveTypeUID(encoding_form.Reference());
+
+      if (var_type) {
+        if (accessibility == eAccessNone)
+          accessibility = eAccessPublic;
+        ClangASTContext::AddVariableToRecordType(
+            class_clang_type, name, var_type->GetLayoutCompilerType(),
+            accessibility);
+      }
+      return;
+    }
+
+    if (!is_artificial) {
+      Type *member_type = die.ResolveTypeUID(encoding_form.Reference());
+
+      clang::FieldDecl *field_decl = nullptr;
+      const uint64_t character_width = 8;
+      const uint64_t word_width = 32;
+      if (tag == DW_TAG_member) {
+        if (member_type) {
+          CompilerType member_clang_type = member_type->GetLayoutCompilerType();
+
+          if (accessibility == eAccessNone)
+            accessibility = default_accessibility;
+          member_accessibilities.push_back(accessibility);
+
+          uint64_t field_bit_offset =
+              (member_byte_offset == UINT32_MAX ? 0 : (member_byte_offset * 8));
+
+          if (bit_size > 0) {
+            FieldInfo this_field_info;
+            this_field_info.bit_offset = field_bit_offset;
+            this_field_info.bit_size = bit_size;
+
+            if (data_bit_offset != UINT64_MAX) {
+              this_field_info.bit_offset = data_bit_offset;
+            } else {
+              if (!byte_size)
+                byte_size = member_type->GetByteSize();
+
+              ObjectFile *objfile = die.GetDWARF()->GetObjectFile();
+              if (objfile->GetByteOrder() == eByteOrderLittle) {
+                this_field_info.bit_offset += byte_size.getValueOr(0) * 8;
+                this_field_info.bit_offset -= (bit_offset + bit_size);
+              } else {
+                this_field_info.bit_offset += bit_offset;
+              }
+            }
+
+            if ((this_field_info.bit_offset >= parent_bit_size) ||
+                (last_field_info.IsBitfield() &&
+                 !last_field_info.NextBitfieldOffsetIsValid(
+                     this_field_info.bit_offset))) {
+              ObjectFile *objfile = die.GetDWARF()->GetObjectFile();
+              objfile->GetModule()->ReportWarning(
+                  "0x%8.8" PRIx64 ": %s bitfield named \"%s\" has invalid "
+                  "bit offset (0x%8.8" PRIx64
+                  ") member will be ignored. Please file a bug against the "
+                  "compiler and include the preprocessed output for %s\n",
+                  die.GetID(), DW_TAG_value_to_name(tag), name,
+                  this_field_info.bit_offset, GetUnitName(parent_die).c_str());
+              return;
+            }
+
+            // Update the field bit offset we will report for layout
+            field_bit_offset = this_field_info.bit_offset;
+
+            // Objective-C has invalid DW_AT_bit_offset values in older
+            // versions of clang, so we have to be careful and only insert
+            // unnamed bitfields if we have a new enough clang.
+            bool detect_unnamed_bitfields = true;
+
+            if (class_language == eLanguageTypeObjC ||
+                class_language == eLanguageTypeObjC_plus_plus)
+              detect_unnamed_bitfields =
+                  die.GetCU()->Supports_unnamed_objc_bitfields();
+
+            if (detect_unnamed_bitfields) {
+              clang::Optional<FieldInfo> unnamed_field_info;
+              uint64_t last_field_end = 0;
+
+              last_field_end =
+                  last_field_info.bit_offset + last_field_info.bit_size;
+
+              if (!last_field_info.IsBitfield()) {
+                // The last field was not a bit-field...
+                // but if it did take up the entire word then we need to extend
+                // last_field_end so the bit-field does not step into the last
+                // fields padding.
+                if (last_field_end != 0 && ((last_field_end % word_width) != 0))
+                  last_field_end += word_width - (last_field_end % word_width);
+              }
+
+              // If we have a gap between the last_field_end and the current
+              // field we have an unnamed bit-field
+              if (this_field_info.bit_offset != last_field_end &&
+                  !(this_field_info.bit_offset < last_field_end)) {
+                unnamed_field_info = FieldInfo{};
+                unnamed_field_info->bit_size =
+                    this_field_info.bit_offset - last_field_end;
+                unnamed_field_info->bit_offset = last_field_end;
+              }
+
+              if (unnamed_field_info) {
+                clang::FieldDecl *unnamed_bitfield_decl =
+                    ClangASTContext::AddFieldToRecordType(
+                        class_clang_type, llvm::StringRef(),
+                        m_ast.GetBuiltinTypeForEncodingAndBitSize(eEncodingSint,
+                                                                  word_width),
+                        accessibility, unnamed_field_info->bit_size);
+
+                layout_info.field_offsets.insert(std::make_pair(
+                    unnamed_bitfield_decl, unnamed_field_info->bit_offset));
+              }
+            }
+
+            last_field_info = this_field_info;
+            last_field_info.SetIsBitfield(true);
+          } else {
+            last_field_info.bit_offset = field_bit_offset;
+
+            if (llvm::Optional<uint64_t> clang_type_size =
+                    member_clang_type.GetByteSize(nullptr)) {
+              last_field_info.bit_size = *clang_type_size * character_width;
+            }
+
+            last_field_info.SetIsBitfield(false);
+          }
+
+          if (!member_clang_type.IsCompleteType())
+            member_clang_type.GetCompleteType();
+
+          {
+            // Older versions of clang emit array[0] and array[1] in the
+            // same way (<rdar://problem/12566646>). If the current field
+            // is at the end of the structure, then there is definitely no
+            // room for extra elements and we override the type to
+            // array[0].
+
+            CompilerType member_array_element_type;
+            uint64_t member_array_size;
+            bool member_array_is_incomplete;
+
+            if (member_clang_type.IsArrayType(&member_array_element_type,
+                                              &member_array_size,
+                                              &member_array_is_incomplete) &&
+                !member_array_is_incomplete) {
+              uint64_t parent_byte_size =
+                  parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size,
+                                                         UINT64_MAX);
+
+              if (member_byte_offset >= parent_byte_size) {
+                if (member_array_size != 1 &&
+                    (member_array_size != 0 ||
+                     member_byte_offset > parent_byte_size)) {
+                  module_sp->ReportError(
+                      "0x%8.8" PRIx64
+                      ": DW_TAG_member '%s' refers to type 0x%8.8x"
+                      " which extends beyond the bounds of 0x%8.8" PRIx64,
+                      die.GetID(), name, encoding_form.Reference().GetOffset(),
+                      parent_die.GetID());
+                }
+
+                member_clang_type =
+                    m_ast.CreateArrayType(member_array_element_type, 0, false);
+              }
+            }
+          }
+
+          if (ClangASTContext::IsCXXClassType(member_clang_type) &&
+              !member_clang_type.GetCompleteType()) {
+            if (die.GetCU()->GetProducer() == eProducerClang)
+              module_sp->ReportError(
+                  "DWARF DIE at 0x%8.8x (class %s) has a member variable "
+                  "0x%8.8x (%s) whose type is a forward declaration, not a "
+                  "complete definition.\nTry compiling the source file "
+                  "with -fstandalone-debug",
+                  parent_die.GetOffset(), parent_die.GetName(), die.GetOffset(),
+                  name);
+            else
+              module_sp->ReportError(
+                  "DWARF DIE at 0x%8.8x (class %s) has a member variable "
+                  "0x%8.8x (%s) whose type is a forward declaration, not a "
+                  "complete definition.\nPlease file a bug against the "
+                  "compiler and include the preprocessed output for %s",
+                  parent_die.GetOffset(), parent_die.GetName(), die.GetOffset(),
+                  name, GetUnitName(parent_die).c_str());
+            // We have no choice other than to pretend that the member
+            // class is complete. If we don't do this, clang will crash
+            // when trying to layout the class. Since we provide layout
+            // assistance, all ivars in this class and other classes will
+            // be fine, this is the best we can do short of crashing.
+            if (ClangASTContext::StartTagDeclarationDefinition(
+                    member_clang_type)) {
+              ClangASTContext::CompleteTagDeclarationDefinition(
+                  member_clang_type);
+            } else {
+              module_sp->ReportError(
+                  "DWARF DIE at 0x%8.8x (class %s) has a member variable "
+                  "0x%8.8x (%s) whose type claims to be a C++ class but we "
+                  "were not able to start its definition.\nPlease file a "
+                  "bug and attach the file at the start of this error "
+                  "message",
+                  parent_die.GetOffset(), parent_die.GetName(), die.GetOffset(),
+                  name);
+            }
+          }
+
+          field_decl = ClangASTContext::AddFieldToRecordType(
+              class_clang_type, name, member_clang_type, accessibility,
+              bit_size);
+
+          m_ast.SetMetadataAsUserID(field_decl, die.GetID());
+
+          layout_info.field_offsets.insert(
+              std::make_pair(field_decl, field_bit_offset));
+        } else {
+          if (name)
+            module_sp->ReportError(
+                "0x%8.8" PRIx64 ": DW_TAG_member '%s' refers to type 0x%8.8x"
+                " which was unable to be parsed",
+                die.GetID(), name, encoding_form.Reference().GetOffset());
+          else
+            module_sp->ReportError(
+                "0x%8.8" PRIx64 ": DW_TAG_member refers to type 0x%8.8x"
+                " which was unable to be parsed",
+                die.GetID(), encoding_form.Reference().GetOffset());
+        }
+      }
+
+      if (prop_name != nullptr && member_type) {
+        clang::ObjCIvarDecl *ivar_decl = nullptr;
+
+        if (field_decl) {
+          ivar_decl = clang::dyn_cast<clang::ObjCIvarDecl>(field_decl);
+          assert(ivar_decl != nullptr);
+        }
+
+        ClangASTMetadata metadata;
+        metadata.SetUserID(die.GetID());
+        delayed_properties.push_back(DelayedAddObjCClassProperty(
+            class_clang_type, prop_name, member_type->GetLayoutCompilerType(),
+            ivar_decl, prop_setter_name, prop_getter_name, prop_attributes,
+            &metadata));
+
+        if (ivar_decl)
+          m_ast.SetMetadataAsUserID(ivar_decl, die.GetID());
+      }
+    }
+  }
+}
+
 bool DWARFASTParserClang::ParseChildMembers(
     const DWARFDIE &parent_die, CompilerType &class_clang_type,
     const LanguageType class_language,
@@ -2453,14 +2829,7 @@
   if (!parent_die)
     return false;
 
-  // Get the parent byte size so we can verify any members will fit
-  const uint64_t parent_byte_size =
-      parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size, UINT64_MAX);
-  const uint64_t parent_bit_size =
-      parent_byte_size == UINT64_MAX ? UINT64_MAX : parent_byte_size * 8;
-
-  uint32_t member_idx = 0;
-  BitfieldInfo last_field_info;
+  FieldInfo last_field_info;
 
   ModuleSP module_sp = parent_die.GetDWARF()->GetObjectFile()->GetModule();
   ClangASTContext *ast =
@@ -2474,461 +2843,11 @@
 
     switch (tag) {
     case DW_TAG_member:
-    case DW_TAG_APPLE_property: {
-      DWARFAttributes attributes;
-      const size_t num_attributes = die.GetAttributes(attributes);
-      if (num_attributes > 0) {
-        const char *name = nullptr;
-        const char *prop_name = nullptr;
-        const char *prop_getter_name = nullptr;
-        const char *prop_setter_name = nullptr;
-        uint32_t prop_attributes = 0;
-
-        bool is_artificial = false;
-        DWARFFormValue encoding_form;
-        AccessType accessibility = eAccessNone;
-        uint32_t member_byte_offset =
-            (parent_die.Tag() == DW_TAG_union_type) ? 0 : UINT32_MAX;
-        llvm::Optional<uint64_t> byte_size;
-        int64_t bit_offset = 0;
-        uint64_t data_bit_offset = UINT64_MAX;
-        size_t bit_size = 0;
-        bool is_external =
-            false; // On DW_TAG_members, this means the member is static
-        uint32_t i;
-        for (i = 0; i < num_attributes && !is_artificial; ++i) {
-          const dw_attr_t attr = attributes.AttributeAtIndex(i);
-          DWARFFormValue form_value;
-          if (attributes.ExtractFormValueAtIndex(i, form_value)) {
-            switch (attr) {
-            case DW_AT_name:
-              name = form_value.AsCString();
-              break;
-            case DW_AT_type:
-              encoding_form = form_value;
-              break;
-            case DW_AT_bit_offset:
-              bit_offset = form_value.Signed();
-              break;
-            case DW_AT_bit_size:
-              bit_size = form_value.Unsigned();
-              break;
-            case DW_AT_byte_size:
-              byte_size = form_value.Unsigned();
-              break;
-            case DW_AT_data_bit_offset:
-              data_bit_offset = form_value.Unsigned();
-              break;
-            case DW_AT_data_member_location:
-              if (form_value.BlockData()) {
-                Value initialValue(0);
-                Value memberOffset(0);
-                const DWARFDataExtractor &debug_info_data = die.GetData();
-                uint32_t block_length = form_value.Unsigned();
-                uint32_t block_offset =
-                    form_value.BlockData() - debug_info_data.GetDataStart();
-                if (DWARFExpression::Evaluate(
-                        nullptr, // ExecutionContext *
-                        nullptr, // RegisterContext *
-                        module_sp, debug_info_data, die.GetCU(), block_offset,
-                        block_length, eRegisterKindDWARF, &initialValue,
-                        nullptr, memberOffset, nullptr)) {
-                  member_byte_offset =
-                      memberOffset.ResolveValue(nullptr).UInt();
-                }
-              } else {
-                // With DWARF 3 and later, if the value is an integer constant,
-                // this form value is the offset in bytes from the beginning of
-                // the containing entity.
-                member_byte_offset = form_value.Unsigned();
-              }
-              break;
-
-            case DW_AT_accessibility:
-              accessibility = DW_ACCESS_to_AccessType(form_value.Unsigned());
-              break;
-            case DW_AT_artificial:
-              is_artificial = form_value.Boolean();
-              break;
-            case DW_AT_APPLE_property_name:
-              prop_name = form_value.AsCString();
-              break;
-            case DW_AT_APPLE_property_getter:
-              prop_getter_name = form_value.AsCString();
-              break;
-            case DW_AT_APPLE_property_setter:
-              prop_setter_name = form_value.AsCString();
-              break;
-            case DW_AT_APPLE_property_attribute:
-              prop_attributes = form_value.Unsigned();
-              break;
-            case DW_AT_external:
-              is_external = form_value.Boolean();
-              break;
-
-            default:
-            case DW_AT_declaration:
-            case DW_AT_description:
-            case DW_AT_mutable:
-            case DW_AT_visibility:
-            case DW_AT_sibling:
-              break;
-            }
-          }
-        }
-
-        if (prop_name) {
-          ConstString fixed_getter;
-          ConstString fixed_setter;
-
-          // Check if the property getter/setter were provided as full names.
-          // We want basenames, so we extract them.
-
-          if (prop_getter_name && prop_getter_name[0] == '-') {
-            ObjCLanguage::MethodName prop_getter_method(prop_getter_name, true);
-            prop_getter_name = prop_getter_method.GetSelector().GetCString();
-          }
-
-          if (prop_setter_name && prop_setter_name[0] == '-') {
-            ObjCLanguage::MethodName prop_setter_method(prop_setter_name, true);
-            prop_setter_name = prop_setter_method.GetSelector().GetCString();
-          }
-
-          // If the names haven't been provided, they need to be filled in.
-
-          if (!prop_getter_name) {
-            prop_getter_name = prop_name;
-          }
-          if (!prop_setter_name && prop_name[0] &&
-              !(prop_attributes & DW_APPLE_PROPERTY_readonly)) {
-            StreamString ss;
-
-            ss.Printf("set%c%s:", toupper(prop_name[0]), &prop_name[1]);
-
-            fixed_setter.SetString(ss.GetString());
-            prop_setter_name = fixed_setter.GetCString();
-          }
-        }
-
-        // Clang has a DWARF generation bug where sometimes it represents
-        // fields that are references with bad byte size and bit size/offset
-        // information such as:
-        //
-        //  DW_AT_byte_size( 0x00 )
-        //  DW_AT_bit_size( 0x40 )
-        //  DW_AT_bit_offset( 0xffffffffffffffc0 )
-        //
-        // So check the bit offset to make sure it is sane, and if the values
-        // are not sane, remove them. If we don't do this then we will end up
-        // with a crash if we try to use this type in an expression when clang
-        // becomes unhappy with its recycled debug info.
-
-        if (byte_size.getValueOr(0) == 0 && bit_offset < 0) {
-          bit_size = 0;
-          bit_offset = 0;
-        }
-
-        // FIXME: Make Clang ignore Objective-C accessibility for expressions
-        if (class_language == eLanguageTypeObjC ||
-            class_language == eLanguageTypeObjC_plus_plus)
-          accessibility = eAccessNone;
-
-        // Handle static members
-        if (is_external && member_byte_offset == UINT32_MAX) {
-          Type *var_type = die.ResolveTypeUID(encoding_form.Reference());
-
-          if (var_type) {
-            if (accessibility == eAccessNone)
-              accessibility = eAccessPublic;
-            ClangASTContext::AddVariableToRecordType(
-                class_clang_type, name, var_type->GetLayoutCompilerType(),
-                accessibility);
-          }
-          break;
-        }
-
-        if (!is_artificial) {
-          Type *member_type = die.ResolveTypeUID(encoding_form.Reference());
-
-          clang::FieldDecl *field_decl = nullptr;
-          if (tag == DW_TAG_member) {
-            if (member_type) {
-              if (accessibility == eAccessNone)
-                accessibility = default_accessibility;
-              member_accessibilities.push_back(accessibility);
-
-              uint64_t field_bit_offset =
-                  (member_byte_offset == UINT32_MAX ? 0
-                                                    : (member_byte_offset * 8));
-              if (bit_size > 0) {
-
-                BitfieldInfo this_field_info;
-                this_field_info.bit_offset = field_bit_offset;
-                this_field_info.bit_size = bit_size;
-
-                /////////////////////////////////////////////////////////////
-                // How to locate a field given the DWARF debug information
-                //
-                // AT_byte_size indicates the size of the word in which the bit
-                // offset must be interpreted.
-                //
-                // AT_data_member_location indicates the byte offset of the
-                // word from the base address of the structure.
-                //
-                // AT_bit_offset indicates how many bits into the word
-                // (according to the host endianness) the low-order bit of the
-                // field starts.  AT_bit_offset can be negative.
-                //
-                // AT_bit_size indicates the size of the field in bits.
-                /////////////////////////////////////////////////////////////
-
-                if (data_bit_offset != UINT64_MAX) {
-                  this_field_info.bit_offset = data_bit_offset;
-                } else {
-                  if (!byte_size)
-                    byte_size = member_type->GetByteSize();
-
-                  ObjectFile *objfile = die.GetDWARF()->GetObjectFile();
-                  if (objfile->GetByteOrder() == eByteOrderLittle) {
-                    this_field_info.bit_offset += byte_size.getValueOr(0) * 8;
-                    this_field_info.bit_offset -= (bit_offset + bit_size);
-                  } else {
-                    this_field_info.bit_offset += bit_offset;
-                  }
-                }
-
-                if ((this_field_info.bit_offset >= parent_bit_size) ||
-                    !last_field_info.NextBitfieldOffsetIsValid(
-                        this_field_info.bit_offset)) {
-                  ObjectFile *objfile = die.GetDWARF()->GetObjectFile();
-                  objfile->GetModule()->ReportWarning(
-                      "0x%8.8" PRIx64 ": %s bitfield named \"%s\" has invalid "
-                      "bit offset (0x%8.8" PRIx64
-                      ") member will be ignored. Please file a bug against the "
-                      "compiler and include the preprocessed output for %s\n",
-                      die.GetID(), DW_TAG_value_to_name(tag), name,
-                      this_field_info.bit_offset,
-                      GetUnitName(parent_die).c_str());
-                  this_field_info.Clear();
-                  continue;
-                }
-
-                // Update the field bit offset we will report for layout
-                field_bit_offset = this_field_info.bit_offset;
-
-                // If the member to be emitted did not start on a character
-                // boundary and there is empty space between the last field and
-                // this one, then we need to emit an anonymous member filling
-                // up the space up to its start.  There are three cases here:
-                //
-                // 1 If the previous member ended on a character boundary, then
-                // we can emit an
-                //   anonymous member starting at the most recent character
-                //   boundary.
-                //
-                // 2 If the previous member did not end on a character boundary
-                // and the distance
-                //   from the end of the previous member to the current member
-                //   is less than a
-                //   word width, then we can emit an anonymous member starting
-                //   right after the
-                //   previous member and right before this member.
-                //
-                // 3 If the previous member did not end on a character boundary
-                // and the distance
-                //   from the end of the previous member to the current member
-                //   is greater than
-                //   or equal a word width, then we act as in Case 1.
-
-                const uint64_t character_width = 8;
-                const uint64_t word_width = 32;
-
-                // Objective-C has invalid DW_AT_bit_offset values in older
-                // versions of clang, so we have to be careful and only insert
-                // unnamed bitfields if we have a new enough clang.
-                bool detect_unnamed_bitfields = true;
-
-                if (class_language == eLanguageTypeObjC ||
-                    class_language == eLanguageTypeObjC_plus_plus)
-                  detect_unnamed_bitfields =
-                      die.GetCU()->Supports_unnamed_objc_bitfields();
-
-                if (detect_unnamed_bitfields) {
-                  BitfieldInfo anon_field_info;
-
-                  if ((this_field_info.bit_offset % character_width) !=
-                      0) // not char aligned
-                  {
-                    uint64_t last_field_end = 0;
-
-                    if (last_field_info.IsValid())
-                      last_field_end =
-                          last_field_info.bit_offset + last_field_info.bit_size;
-
-                    if (this_field_info.bit_offset != last_field_end) {
-                      if (((last_field_end % character_width) == 0) || // case 1
-                          (this_field_info.bit_offset - last_field_end >=
-                           word_width)) // case 3
-                      {
-                        anon_field_info.bit_size =
-                            this_field_info.bit_offset % character_width;
-                        anon_field_info.bit_offset =
-                            this_field_info.bit_offset -
-                            anon_field_info.bit_size;
-                      } else // case 2
-                      {
-                        anon_field_info.bit_size =
-                            this_field_info.bit_offset - last_field_end;
-                        anon_field_info.bit_offset = last_field_end;
-                      }
-                    }
-                  }
-
-                  if (anon_field_info.IsValid()) {
-                    clang::FieldDecl *unnamed_bitfield_decl =
-                        ClangASTContext::AddFieldToRecordType(
-                            class_clang_type, llvm::StringRef(),
-                            m_ast.GetBuiltinTypeForEncodingAndBitSize(
-                                eEncodingSint, word_width),
-                            accessibility, anon_field_info.bit_size);
-
-                    layout_info.field_offsets.insert(std::make_pair(
-                        unnamed_bitfield_decl, anon_field_info.bit_offset));
-                  }
-                }
-                last_field_info = this_field_info;
-              } else {
-                last_field_info.Clear();
-              }
-
-              CompilerType member_clang_type =
-                  member_type->GetLayoutCompilerType();
-              if (!member_clang_type.IsCompleteType())
-                member_clang_type.GetCompleteType();
-
-              {
-                // Older versions of clang emit array[0] and array[1] in the
-                // same way (<rdar://problem/12566646>). If the current field
-                // is at the end of the structure, then there is definitely no
-                // room for extra elements and we override the type to
-                // array[0].
-
-                CompilerType member_array_element_type;
-                uint64_t member_array_size;
-                bool member_array_is_incomplete;
-
-                if (member_clang_type.IsArrayType(
-                        &member_array_element_type, &member_array_size,
-                        &member_array_is_incomplete) &&
-                    !member_array_is_incomplete) {
-                  uint64_t parent_byte_size =
-                      parent_die.GetAttributeValueAsUnsigned(DW_AT_byte_size,
-                                                             UINT64_MAX);
-
-                  if (member_byte_offset >= parent_byte_size) {
-                    if (member_array_size != 1 &&
-                        (member_array_size != 0 ||
-                         member_byte_offset > parent_byte_size)) {
-                      module_sp->ReportError(
-                          "0x%8.8" PRIx64
-                          ": DW_TAG_member '%s' refers to type 0x%8.8x"
-                          " which extends beyond the bounds of 0x%8.8" PRIx64,
-                          die.GetID(), name,
-                          encoding_form.Reference().GetOffset(),
-                          parent_die.GetID());
-                    }
-
-                    member_clang_type = m_ast.CreateArrayType(
-                        member_array_element_type, 0, false);
-                  }
-                }
-              }
-
-              if (ClangASTContext::IsCXXClassType(member_clang_type) &&
-                  !member_clang_type.GetCompleteType()) {
-                if (die.GetCU()->GetProducer() == eProducerClang)
-                  module_sp->ReportError(
-                      "DWARF DIE at 0x%8.8x (class %s) has a member variable "
-                      "0x%8.8x (%s) whose type is a forward declaration, not a "
-                      "complete definition.\nTry compiling the source file "
-                      "with -fstandalone-debug",
-                      parent_die.GetOffset(), parent_die.GetName(),
-                      die.GetOffset(), name);
-                else
-                  module_sp->ReportError(
-                      "DWARF DIE at 0x%8.8x (class %s) has a member variable "
-                      "0x%8.8x (%s) whose type is a forward declaration, not a "
-                      "complete definition.\nPlease file a bug against the "
-                      "compiler and include the preprocessed output for %s",
-                      parent_die.GetOffset(), parent_die.GetName(),
-                      die.GetOffset(), name, GetUnitName(parent_die).c_str());
-                // We have no choice other than to pretend that the member
-                // class is complete. If we don't do this, clang will crash
-                // when trying to layout the class. Since we provide layout
-                // assistance, all ivars in this class and other classes will
-                // be fine, this is the best we can do short of crashing.
-                if (ClangASTContext::StartTagDeclarationDefinition(
-                        member_clang_type)) {
-                  ClangASTContext::CompleteTagDeclarationDefinition(
-                      member_clang_type);
-                } else {
-                  module_sp->ReportError(
-                      "DWARF DIE at 0x%8.8x (class %s) has a member variable "
-                      "0x%8.8x (%s) whose type claims to be a C++ class but we "
-                      "were not able to start its definition.\nPlease file a "
-                      "bug and attach the file at the start of this error "
-                      "message",
-                      parent_die.GetOffset(), parent_die.GetName(),
-                      die.GetOffset(), name);
-                }
-              }
-
-              field_decl = ClangASTContext::AddFieldToRecordType(
-                  class_clang_type, name, member_clang_type, accessibility,
-                  bit_size);
-
-              m_ast.SetMetadataAsUserID(field_decl, die.GetID());
-
-              layout_info.field_offsets.insert(
-                  std::make_pair(field_decl, field_bit_offset));
-            } else {
-              if (name)
-                module_sp->ReportError(
-                    "0x%8.8" PRIx64
-                    ": DW_TAG_member '%s' refers to type 0x%8.8x"
-                    " which was unable to be parsed",
-                    die.GetID(), name, encoding_form.Reference().GetOffset());
-              else
-                module_sp->ReportError(
-                    "0x%8.8" PRIx64 ": DW_TAG_member refers to type 0x%8.8x"
-                    " which was unable to be parsed",
-                    die.GetID(), encoding_form.Reference().GetOffset());
-            }
-          }
-
-          if (prop_name != nullptr && member_type) {
-            clang::ObjCIvarDecl *ivar_decl = nullptr;
-
-            if (field_decl) {
-              ivar_decl = clang::dyn_cast<clang::ObjCIvarDecl>(field_decl);
-              assert(ivar_decl != nullptr);
-            }
-
-            ClangASTMetadata metadata;
-            metadata.SetUserID(die.GetID());
-            delayed_properties.push_back(DelayedAddObjCClassProperty(
-                class_clang_type, prop_name,
-                member_type->GetLayoutCompilerType(), ivar_decl,
-                prop_setter_name, prop_getter_name, prop_attributes,
-                &metadata));
-
-            if (ivar_decl)
-              m_ast.SetMetadataAsUserID(ivar_decl, die.GetID());
-          }
-        }
-      }
-      ++member_idx;
-    } break;
+    case DW_TAG_APPLE_property:
+      ParseSingleMember(die, parent_die, class_clang_type, class_language,
+                        member_accessibilities, default_accessibility,
+                        delayed_properties, layout_info, last_field_info);
+      break;
 
     case DW_TAG_subprogram:
       // Let the type parsing code handle this one for us.
@@ -2965,11 +2884,12 @@
                 uint32_t block_length = form_value.Unsigned();
                 uint32_t block_offset =
                     form_value.BlockData() - debug_info_data.GetDataStart();
-                if (DWARFExpression::Evaluate(nullptr, nullptr, module_sp,
-                                              debug_info_data, die.GetCU(),
-                                              block_offset, block_length,
-                                              eRegisterKindDWARF, &initialValue,
-                                              nullptr, memberOffset, nullptr)) {
+                if (DWARFExpression::Evaluate(
+                        nullptr, nullptr, module_sp,
+                        DataExtractor(debug_info_data, block_offset,
+                                      block_length),
+                        die.GetCU(), eRegisterKindDWARF, &initialValue, nullptr,
+                        memberOffset, nullptr)) {
                   member_byte_offset =
                       memberOffset.ResolveValue(nullptr).UInt();
                 }
@@ -3270,6 +3190,8 @@
         array_info.element_orders.push_back(num_elements);
       }
     } break;
+    default:
+      break;
     }
   }
   return array_info;
@@ -3544,18 +3466,20 @@
         SymbolFileDWARF *dwarf = die.GetDWARF();
         if (namespace_name) {
           dwarf->GetObjectFile()->GetModule()->LogMessage(
-              log, "ASTContext => %p: 0x%8.8" PRIx64
-                   ": DW_TAG_namespace with DW_AT_name(\"%s\") => "
-                   "clang::NamespaceDecl *%p (original = %p)",
-              static_cast<void *>(m_ast.getASTContext()), die.GetID(),
+              log,
+              "ASTContext => %p: 0x%8.8" PRIx64
+              ": DW_TAG_namespace with DW_AT_name(\"%s\") => "
+              "clang::NamespaceDecl *%p (original = %p)",
+              static_cast<void *>(&m_ast.getASTContext()), die.GetID(),
               namespace_name, static_cast<void *>(namespace_decl),
               static_cast<void *>(namespace_decl->getOriginalNamespace()));
         } else {
           dwarf->GetObjectFile()->GetModule()->LogMessage(
-              log, "ASTContext => %p: 0x%8.8" PRIx64
-                   ": DW_TAG_namespace (anonymous) => clang::NamespaceDecl *%p "
-                   "(original = %p)",
-              static_cast<void *>(m_ast.getASTContext()), die.GetID(),
+              log,
+              "ASTContext => %p: 0x%8.8" PRIx64
+              ": DW_TAG_namespace (anonymous) => clang::NamespaceDecl *%p "
+              "(original = %p)",
+              static_cast<void *>(&m_ast.getASTContext()), die.GetID(),
               static_cast<void *>(namespace_decl),
               static_cast<void *>(namespace_decl->getOriginalNamespace()));
         }
@@ -3672,11 +3596,11 @@
 
   if (src_size != dst_size) {
     if (src_size != 0 && dst_size != 0) {
-      if (log)
-        log->Printf("warning: trying to unique class DIE 0x%8.8x to 0x%8.8x, "
-                    "but they didn't have the same size (src=%d, dst=%d)",
-                    src_class_die.GetOffset(), dst_class_die.GetOffset(),
-                    src_size, dst_size);
+      LLDB_LOGF(log,
+                "warning: trying to unique class DIE 0x%8.8x to 0x%8.8x, "
+                "but they didn't have the same size (src=%d, dst=%d)",
+                src_class_die.GetOffset(), dst_class_die.GetOffset(), src_size,
+                dst_size);
     }
 
     fast_path = false;
@@ -3690,12 +3614,12 @@
       dst_die = dst_name_to_die.GetValueAtIndexUnchecked(idx);
 
       if (src_die.Tag() != dst_die.Tag()) {
-        if (log)
-          log->Printf("warning: tried to unique class DIE 0x%8.8x to 0x%8.8x, "
-                      "but 0x%8.8x (%s) tags didn't match 0x%8.8x (%s)",
-                      src_class_die.GetOffset(), dst_class_die.GetOffset(),
-                      src_die.GetOffset(), src_die.GetTagAsCString(),
-                      dst_die.GetOffset(), dst_die.GetTagAsCString());
+        LLDB_LOGF(log,
+                  "warning: tried to unique class DIE 0x%8.8x to 0x%8.8x, "
+                  "but 0x%8.8x (%s) tags didn't match 0x%8.8x (%s)",
+                  src_class_die.GetOffset(), dst_class_die.GetOffset(),
+                  src_die.GetOffset(), src_die.GetTagAsCString(),
+                  dst_die.GetOffset(), dst_die.GetTagAsCString());
         fast_path = false;
       }
 
@@ -3706,12 +3630,11 @@
       if (src_name == dst_name || (strcmp(src_name, dst_name) == 0))
         continue;
 
-      if (log)
-        log->Printf("warning: tried to unique class DIE 0x%8.8x to 0x%8.8x, "
-                    "but 0x%8.8x (%s) names didn't match 0x%8.8x (%s)",
-                    src_class_die.GetOffset(), dst_class_die.GetOffset(),
-                    src_die.GetOffset(), src_name, dst_die.GetOffset(),
-                    dst_name);
+      LLDB_LOGF(log,
+                "warning: tried to unique class DIE 0x%8.8x to 0x%8.8x, "
+                "but 0x%8.8x (%s) names didn't match 0x%8.8x (%s)",
+                src_class_die.GetOffset(), dst_class_die.GetOffset(),
+                src_die.GetOffset(), src_name, dst_die.GetOffset(), dst_name);
 
       fast_path = false;
     }
@@ -3733,32 +3656,31 @@
       clang::DeclContext *src_decl_ctx =
           src_dwarf_ast_parser->m_die_to_decl_ctx[src_die.GetDIE()];
       if (src_decl_ctx) {
-        if (log)
-          log->Printf("uniquing decl context %p from 0x%8.8x for 0x%8.8x",
-                      static_cast<void *>(src_decl_ctx), src_die.GetOffset(),
-                      dst_die.GetOffset());
+        LLDB_LOGF(log, "uniquing decl context %p from 0x%8.8x for 0x%8.8x",
+                  static_cast<void *>(src_decl_ctx), src_die.GetOffset(),
+                  dst_die.GetOffset());
         dst_dwarf_ast_parser->LinkDeclContextToDIE(src_decl_ctx, dst_die);
       } else {
-        if (log)
-          log->Printf("warning: tried to unique decl context from 0x%8.8x for "
-                      "0x%8.8x, but none was found",
-                      src_die.GetOffset(), dst_die.GetOffset());
+        LLDB_LOGF(log,
+                  "warning: tried to unique decl context from 0x%8.8x for "
+                  "0x%8.8x, but none was found",
+                  src_die.GetOffset(), dst_die.GetOffset());
       }
 
       Type *src_child_type =
           dst_die.GetDWARF()->GetDIEToType()[src_die.GetDIE()];
       if (src_child_type) {
-        if (log)
-          log->Printf(
-              "uniquing type %p (uid=0x%" PRIx64 ") from 0x%8.8x for 0x%8.8x",
-              static_cast<void *>(src_child_type), src_child_type->GetID(),
-              src_die.GetOffset(), dst_die.GetOffset());
+        LLDB_LOGF(log,
+                  "uniquing type %p (uid=0x%" PRIx64
+                  ") from 0x%8.8x for 0x%8.8x",
+                  static_cast<void *>(src_child_type), src_child_type->GetID(),
+                  src_die.GetOffset(), dst_die.GetOffset());
         dst_die.GetDWARF()->GetDIEToType()[dst_die.GetDIE()] = src_child_type;
       } else {
-        if (log)
-          log->Printf("warning: tried to unique lldb_private::Type from "
-                      "0x%8.8x for 0x%8.8x, but none was found",
-                      src_die.GetOffset(), dst_die.GetOffset());
+        LLDB_LOGF(log,
+                  "warning: tried to unique lldb_private::Type from "
+                  "0x%8.8x for 0x%8.8x, but none was found",
+                  src_die.GetOffset(), dst_die.GetOffset());
       }
     }
   } else {
@@ -3778,39 +3700,36 @@
           clang::DeclContext *src_decl_ctx =
               src_dwarf_ast_parser->m_die_to_decl_ctx[src_die.GetDIE()];
           if (src_decl_ctx) {
-            if (log)
-              log->Printf("uniquing decl context %p from 0x%8.8x for 0x%8.8x",
-                          static_cast<void *>(src_decl_ctx),
-                          src_die.GetOffset(), dst_die.GetOffset());
+            LLDB_LOGF(log, "uniquing decl context %p from 0x%8.8x for 0x%8.8x",
+                      static_cast<void *>(src_decl_ctx), src_die.GetOffset(),
+                      dst_die.GetOffset());
             dst_dwarf_ast_parser->LinkDeclContextToDIE(src_decl_ctx, dst_die);
           } else {
-            if (log)
-              log->Printf("warning: tried to unique decl context from 0x%8.8x "
-                          "for 0x%8.8x, but none was found",
-                          src_die.GetOffset(), dst_die.GetOffset());
+            LLDB_LOGF(log,
+                      "warning: tried to unique decl context from 0x%8.8x "
+                      "for 0x%8.8x, but none was found",
+                      src_die.GetOffset(), dst_die.GetOffset());
           }
 
           Type *src_child_type =
               dst_die.GetDWARF()->GetDIEToType()[src_die.GetDIE()];
           if (src_child_type) {
-            if (log)
-              log->Printf("uniquing type %p (uid=0x%" PRIx64
-                          ") from 0x%8.8x for 0x%8.8x",
-                          static_cast<void *>(src_child_type),
-                          src_child_type->GetID(), src_die.GetOffset(),
-                          dst_die.GetOffset());
+            LLDB_LOGF(
+                log,
+                "uniquing type %p (uid=0x%" PRIx64 ") from 0x%8.8x for 0x%8.8x",
+                static_cast<void *>(src_child_type), src_child_type->GetID(),
+                src_die.GetOffset(), dst_die.GetOffset());
             dst_die.GetDWARF()->GetDIEToType()[dst_die.GetDIE()] =
                 src_child_type;
           } else {
-            if (log)
-              log->Printf("warning: tried to unique lldb_private::Type from "
-                          "0x%8.8x for 0x%8.8x, but none was found",
-                          src_die.GetOffset(), dst_die.GetOffset());
+            LLDB_LOGF(log,
+                      "warning: tried to unique lldb_private::Type from "
+                      "0x%8.8x for 0x%8.8x, but none was found",
+                      src_die.GetOffset(), dst_die.GetOffset());
           }
         } else {
-          if (log)
-            log->Printf("warning: couldn't find a match for 0x%8.8x",
-                        dst_die.GetOffset());
+          LLDB_LOGF(log, "warning: couldn't find a match for 0x%8.8x",
+                    dst_die.GetOffset());
 
           failures.push_back(dst_die);
         }
@@ -3836,32 +3755,31 @@
         clang::DeclContext *src_decl_ctx =
             src_dwarf_ast_parser->m_die_to_decl_ctx[src_die.GetDIE()];
         if (src_decl_ctx) {
-          if (log)
-            log->Printf("uniquing decl context %p from 0x%8.8x for 0x%8.8x",
-                        static_cast<void *>(src_decl_ctx), src_die.GetOffset(),
-                        dst_die.GetOffset());
+          LLDB_LOGF(log, "uniquing decl context %p from 0x%8.8x for 0x%8.8x",
+                    static_cast<void *>(src_decl_ctx), src_die.GetOffset(),
+                    dst_die.GetOffset());
           dst_dwarf_ast_parser->LinkDeclContextToDIE(src_decl_ctx, dst_die);
         } else {
-          if (log)
-            log->Printf("warning: tried to unique decl context from 0x%8.8x "
-                        "for 0x%8.8x, but none was found",
-                        src_die.GetOffset(), dst_die.GetOffset());
+          LLDB_LOGF(log,
+                    "warning: tried to unique decl context from 0x%8.8x "
+                    "for 0x%8.8x, but none was found",
+                    src_die.GetOffset(), dst_die.GetOffset());
         }
 
         Type *src_child_type =
             dst_die.GetDWARF()->GetDIEToType()[src_die.GetDIE()];
         if (src_child_type) {
-          if (log)
-            log->Printf(
-                "uniquing type %p (uid=0x%" PRIx64 ") from 0x%8.8x for 0x%8.8x",
-                static_cast<void *>(src_child_type), src_child_type->GetID(),
-                src_die.GetOffset(), dst_die.GetOffset());
+          LLDB_LOGF(
+              log,
+              "uniquing type %p (uid=0x%" PRIx64 ") from 0x%8.8x for 0x%8.8x",
+              static_cast<void *>(src_child_type), src_child_type->GetID(),
+              src_die.GetOffset(), dst_die.GetOffset());
           dst_die.GetDWARF()->GetDIEToType()[dst_die.GetDIE()] = src_child_type;
         } else {
-          if (log)
-            log->Printf("warning: tried to unique lldb_private::Type from "
-                        "0x%8.8x for 0x%8.8x, but none was found",
-                        src_die.GetOffset(), dst_die.GetOffset());
+          LLDB_LOGF(log,
+                    "warning: tried to unique lldb_private::Type from "
+                    "0x%8.8x for 0x%8.8x, but none was found",
+                    src_die.GetOffset(), dst_die.GetOffset());
         }
       }
     }
@@ -3872,10 +3790,10 @@
       ConstString dst_name_artificial =
           dst_name_to_die_artificial.GetCStringAtIndex(idx);
       dst_die = dst_name_to_die_artificial.GetValueAtIndexUnchecked(idx);
-      if (log)
-        log->Printf("warning: need to create artificial method for 0x%8.8x for "
-                    "method '%s'",
-                    dst_die.GetOffset(), dst_name_artificial.GetCString());
+      LLDB_LOGF(log,
+                "warning: need to create artificial method for 0x%8.8x for "
+                "method '%s'",
+                dst_die.GetOffset(), dst_name_artificial.GetCString());
 
       failures.push_back(dst_die);
     }
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
index 5b5d83d..8a78299 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
@@ -15,7 +15,10 @@
 #include "llvm/ADT/SmallVector.h"
 
 #include "DWARFASTParser.h"
+#include "DWARFDIE.h"
 #include "DWARFDefines.h"
+#include "DWARFFormValue.h"
+#include "LogChannelDWARF.h"
 #include "lldb/Core/ClangForward.h"
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Symbol/ClangASTContext.h"
@@ -29,6 +32,8 @@
 class DWARFDebugInfoEntry;
 class SymbolFileDWARF;
 
+struct ParsedDWARFTypeAttributes;
+
 class DWARFASTParserClang : public DWARFASTParser {
 public:
   DWARFASTParserClang(lldb_private::ClangASTContext &ast);
@@ -37,7 +42,7 @@
 
   // DWARFASTParser interface.
   lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc,
-                                  const DWARFDIE &die, lldb_private::Log *log,
+                                  const DWARFDIE &die,
                                   bool *type_is_new_ptr) override;
 
   lldb_private::Function *
@@ -51,8 +56,8 @@
   lldb_private::CompilerDecl
   GetDeclForUIDFromDWARF(const DWARFDIE &die) override;
 
-  std::vector<DWARFDIE>
-  GetDIEForDeclContext(lldb_private::CompilerDeclContext decl_context) override;
+  void EnsureAllDIEsInDeclContextHaveBeenParsed(
+      lldb_private::CompilerDeclContext decl_context) override;
 
   lldb_private::CompilerDeclContext
   GetDeclContextForUIDFromDWARF(const DWARFDIE &die) override;
@@ -63,9 +68,28 @@
   lldb_private::ClangASTImporter &GetClangASTImporter();
 
 protected:
+  /// Protected typedefs and members.
+  /// @{
   class DelayedAddObjCClassProperty;
   typedef std::vector<DelayedAddObjCClassProperty> DelayedPropertyList;
 
+  typedef llvm::SmallPtrSet<const DWARFDebugInfoEntry *, 4> DIEPointerSet;
+  typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::DeclContext *>
+      DIEToDeclContextMap;
+  typedef std::multimap<const clang::DeclContext *, const DWARFDIE>
+      DeclContextToDIEMap;
+  typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::Decl *>
+      DIEToDeclMap;
+  typedef llvm::DenseMap<const clang::Decl *, DIEPointerSet> DeclToDIEMap;
+
+  lldb_private::ClangASTContext &m_ast;
+  DIEToDeclMap m_die_to_decl;
+  DeclToDIEMap m_decl_to_die;
+  DIEToDeclContextMap m_die_to_decl_ctx;
+  DeclContextToDIEMap m_decl_ctx_to_die;
+  std::unique_ptr<lldb_private::ClangASTImporter> m_clang_ast_importer_up;
+  /// @}
+
   clang::DeclContext *GetDeclContextForBlock(const DWARFDIE &die);
 
   clang::BlockDecl *ResolveBlockDIE(const DWARFDIE &die);
@@ -103,6 +127,11 @@
                                bool is_signed, uint32_t enumerator_byte_size,
                                const DWARFDIE &parent_die);
 
+  /// Parse a structure, class, or union type DIE.
+  lldb::TypeSP ParseStructureLikeDIE(const lldb_private::SymbolContext &sc,
+                                     const DWARFDIE &die,
+                                     ParsedDWARFTypeAttributes &attrs);
+
   lldb_private::Type *GetTypeForDIE(const DWARFDIE &die);
 
   clang::Decl *GetClangDeclForDIE(const DWARFDIE &die);
@@ -123,29 +152,103 @@
 
   void LinkDeclToDIE(clang::Decl *decl, const DWARFDIE &die);
 
-  lldb::TypeSP ParseTypeFromDWO(const DWARFDIE &die, lldb_private::Log *log);
+  /// If \p type_sp is valid, calculate and set its symbol context scope, and
+  /// update the type list for its backing symbol file.
+  ///
+  /// Returns \p type_sp.
+  lldb::TypeSP
+  UpdateSymbolContextScopeForType(const lldb_private::SymbolContext &sc,
+                                  const DWARFDIE &die, lldb::TypeSP type_sp);
+
+  /// Follow Clang Module Skeleton CU references to find a type definition.
+  lldb::TypeSP ParseTypeFromClangModule(const lldb_private::SymbolContext &sc,
+                                        const DWARFDIE &die,
+                                        lldb_private::Log *log);
 
   // Return true if this type is a declaration to a type in an external
   // module.
   lldb::ModuleSP GetModuleForType(const DWARFDIE &die);
 
-  typedef llvm::SmallPtrSet<const DWARFDebugInfoEntry *, 4> DIEPointerSet;
-  typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::DeclContext *>
-      DIEToDeclContextMap;
-  // typedef llvm::DenseMap<const clang::DeclContext *, DIEPointerSet>
-  // DeclContextToDIEMap;
-  typedef std::multimap<const clang::DeclContext *, const DWARFDIE>
-      DeclContextToDIEMap;
-  typedef llvm::DenseMap<const DWARFDebugInfoEntry *, clang::Decl *>
-      DIEToDeclMap;
-  typedef llvm::DenseMap<const clang::Decl *, DIEPointerSet> DeclToDIEMap;
+private:
+  struct FieldInfo {
+    uint64_t bit_size = 0;
+    uint64_t bit_offset = 0;
+    bool is_bitfield = false;
 
-  lldb_private::ClangASTContext &m_ast;
-  DIEToDeclMap m_die_to_decl;
-  DeclToDIEMap m_decl_to_die;
-  DIEToDeclContextMap m_die_to_decl_ctx;
-  DeclContextToDIEMap m_decl_ctx_to_die;
-  std::unique_ptr<lldb_private::ClangASTImporter> m_clang_ast_importer_up;
+    FieldInfo() = default;
+
+    void SetIsBitfield(bool flag) { is_bitfield = flag; }
+    bool IsBitfield() { return is_bitfield; }
+
+    bool NextBitfieldOffsetIsValid(const uint64_t next_bit_offset) const {
+      // Any subsequent bitfields must not overlap and must be at a higher
+      // bit offset than any previous bitfield + size.
+      return (bit_size + bit_offset) <= next_bit_offset;
+    }
+  };
+
+  void
+  ParseSingleMember(const DWARFDIE &die, const DWARFDIE &parent_die,
+                    lldb_private::CompilerType &class_clang_type,
+                    const lldb::LanguageType class_language,
+                    std::vector<int> &member_accessibilities,
+                    lldb::AccessType &default_accessibility,
+                    DelayedPropertyList &delayed_properties,
+                    lldb_private::ClangASTImporter::LayoutInfo &layout_info,
+                    FieldInfo &last_field_info);
+
+  bool CompleteRecordType(const DWARFDIE &die, lldb_private::Type *type,
+                          lldb_private::CompilerType &clang_type);
+  bool CompleteEnumType(const DWARFDIE &die, lldb_private::Type *type,
+                        lldb_private::CompilerType &clang_type);
+
+  lldb::TypeSP ParseTypeModifier(const lldb_private::SymbolContext &sc,
+                                 const DWARFDIE &die,
+                                 ParsedDWARFTypeAttributes &attrs);
+  lldb::TypeSP ParseEnum(const lldb_private::SymbolContext &sc,
+                         const DWARFDIE &die, ParsedDWARFTypeAttributes &attrs);
+  lldb::TypeSP ParseSubroutine(const DWARFDIE &die,
+                               ParsedDWARFTypeAttributes &attrs);
+  // FIXME: attrs should be passed as a const reference.
+  lldb::TypeSP ParseArrayType(const DWARFDIE &die,
+                              ParsedDWARFTypeAttributes &attrs);
+  lldb::TypeSP ParsePointerToMemberType(const DWARFDIE &die,
+                                        const ParsedDWARFTypeAttributes &attrs);
+};
+
+/// Parsed form of all attributes that are relevant for type reconstruction.
+/// Some attributes are relevant for all kinds of types (declaration), while
+/// others are only meaningful to a specific type (is_virtual)
+struct ParsedDWARFTypeAttributes {
+  explicit ParsedDWARFTypeAttributes(const DWARFDIE &die);
+
+  lldb::AccessType accessibility = lldb::eAccessNone;
+  bool is_artificial = false;
+  bool is_complete_objc_class = false;
+  bool is_explicit = false;
+  bool is_forward_declaration = false;
+  bool is_inline = false;
+  bool is_scoped_enum = false;
+  bool is_vector = false;
+  bool is_virtual = false;
+  bool is_objc_direct_call = false;
+  bool exports_symbols = false;
+  clang::StorageClass storage = clang::SC_None;
+  const char *mangled_name = nullptr;
+  lldb_private::ConstString name;
+  lldb_private::Declaration decl;
+  DWARFDIE object_pointer;
+  DWARFFormValue abstract_origin;
+  DWARFFormValue containing_type;
+  DWARFFormValue signature;
+  DWARFFormValue specification;
+  DWARFFormValue type;
+  lldb::LanguageType class_language = lldb::eLanguageTypeUnknown;
+  llvm::Optional<uint64_t> byte_size;
+  size_t calling_convention = llvm::dwarf::DW_CC_normal;
+  uint32_t bit_stride = 0;
+  uint32_t byte_stride = 0;
+  uint32_t encoding = 0;
 };
 
 #endif // SymbolFileDWARF_DWARFASTParserClang_h_
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
index 6128163..741669b 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
@@ -18,7 +18,8 @@
 using namespace lldb_private;
 
 DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration()
-    : m_code(InvalidCode), m_tag(0), m_has_children(0), m_attributes() {}
+    : m_code(InvalidCode), m_tag(llvm::dwarf::DW_TAG_null), m_has_children(0),
+      m_attributes() {}
 
 DWARFAbbreviationDeclaration::DWARFAbbreviationDeclaration(dw_tag_t tag,
                                                            uint8_t has_children)
@@ -33,7 +34,7 @@
     return DWARFEnumState::Complete;
 
   m_attributes.clear();
-  m_tag = data.GetULEB128(offset_ptr);
+  m_tag = static_cast<dw_tag_t>(data.GetULEB128(offset_ptr));
   if (m_tag == DW_TAG_null)
     return llvm::make_error<llvm::object::GenericBinaryError>(
         "abbrev decl requires non-null tag.");
@@ -68,7 +69,7 @@
 }
 
 bool DWARFAbbreviationDeclaration::IsValid() {
-  return m_code != 0 && m_tag != 0;
+  return m_code != 0 && m_tag != llvm::dwarf::DW_TAG_null;
 }
 
 uint32_t
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp
index 96adb72..033105e 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp
@@ -14,6 +14,7 @@
 
 #include "lldb/Core/Module.h"
 #include "lldb/Symbol/ObjectFile.h"
+#include "lldb/Utility/Log.h"
 
 using namespace lldb_private;
 
@@ -29,7 +30,7 @@
   if (m_die)
     return m_die->Tag();
   else
-    return 0;
+    return llvm::dwarf::DW_TAG_null;
 }
 
 const char *DWARFBaseDIE::GetTagAsCString() const {
@@ -102,19 +103,22 @@
     return nullptr;
 }
 
-lldb_private::TypeSystem *DWARFBaseDIE::GetTypeSystem() const {
-  if (m_cu)
-    return m_cu->GetTypeSystem();
-  else
-    return nullptr;
+llvm::Expected<lldb_private::TypeSystem &> DWARFBaseDIE::GetTypeSystem() const {
+  if (!m_cu)
+    return llvm::make_error<llvm::StringError>(
+        "Unable to get TypeSystem, no compilation unit available",
+        llvm::inconvertibleErrorCode());
+  return m_cu->GetTypeSystem();
 }
 
 DWARFASTParser *DWARFBaseDIE::GetDWARFParser() const {
-  lldb_private::TypeSystem *type_system = GetTypeSystem();
-  if (type_system)
-    return type_system->GetDWARFParser();
-  else
+  auto type_system_or_err = GetTypeSystem();
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to get DWARFASTParser");
     return nullptr;
+  }
+  return type_system_or_err->GetDWARFParser();
 }
 
 bool DWARFBaseDIE::HasChildren() const {
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
index 0058043..9652d79 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.h
@@ -12,6 +12,8 @@
 #include "lldb/Core/dwarf.h"
 #include "lldb/lldb-types.h"
 
+#include "llvm/Support/Error.h"
+
 class DIERef;
 class DWARFASTParser;
 class DWARFAttributes;
@@ -55,7 +57,7 @@
 
   llvm::Optional<DIERef> GetDIERef() const;
 
-  lldb_private::TypeSystem *GetTypeSystem() const;
+  llvm::Expected<lldb_private::TypeSystem &> GetTypeSystem() const;
 
   DWARFASTParser *GetDWARFParser() const;
 
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
index 75647db..454637e 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
@@ -24,8 +24,8 @@
   DWARFCompileUnit(SymbolFileDWARF &dwarf, lldb::user_id_t uid,
                    const DWARFUnitHeader &header,
                    const DWARFAbbreviationDeclarationSet &abbrevs,
-                   DIERef::Section section)
-      : DWARFUnit(dwarf, uid, header, abbrevs, section) {}
+                   DIERef::Section section, bool is_dwo)
+      : DWARFUnit(dwarf, uid, header, abbrevs, section, is_dwo) {}
 
   DISALLOW_COPY_AND_ASSIGN(DWARFCompileUnit);
 
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
index eb307ce..5052b82 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
@@ -70,6 +70,17 @@
                           m_data_debug_line_str);
 }
 
+const DWARFDataExtractor &DWARFContext::getOrLoadLocData() {
+  return LoadOrGetSection(eSectionTypeDWARFDebugLoc,
+                          eSectionTypeDWARFDebugLocDwo, m_data_debug_loc);
+}
+
+const DWARFDataExtractor &DWARFContext::getOrLoadLocListsData() {
+  return LoadOrGetSection(eSectionTypeDWARFDebugLocLists,
+                          eSectionTypeDWARFDebugLocListsDwo,
+                          m_data_debug_loclists);
+}
+
 const DWARFDataExtractor &DWARFContext::getOrLoadMacroData() {
   return LoadOrGetSection(eSectionTypeDWARFDebugMacro, llvm::None,
                           m_data_debug_macro);
@@ -81,7 +92,8 @@
 }
 
 const DWARFDataExtractor &DWARFContext::getOrLoadRngListsData() {
-  return LoadOrGetSection(eSectionTypeDWARFDebugRngLists, llvm::None,
+  return LoadOrGetSection(eSectionTypeDWARFDebugRngLists,
+                          eSectionTypeDWARFDebugRngListsDwo,
                           m_data_debug_rnglists);
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
index add0423..8691001 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.h
@@ -34,6 +34,8 @@
   SectionData m_data_debug_info;
   SectionData m_data_debug_line;
   SectionData m_data_debug_line_str;
+  SectionData m_data_debug_loc;
+  SectionData m_data_debug_loclists;
   SectionData m_data_debug_macro;
   SectionData m_data_debug_ranges;
   SectionData m_data_debug_rnglists;
@@ -41,8 +43,6 @@
   SectionData m_data_debug_str_offsets;
   SectionData m_data_debug_types;
 
-  bool isDwo() { return m_dwo_section_list != nullptr; }
-
   const DWARFDataExtractor &
   LoadOrGetSection(lldb::SectionType main_section_type,
                    llvm::Optional<lldb::SectionType> dwo_section_type,
@@ -60,6 +60,8 @@
   const DWARFDataExtractor &getOrLoadDebugInfoData();
   const DWARFDataExtractor &getOrLoadLineData();
   const DWARFDataExtractor &getOrLoadLineStrData();
+  const DWARFDataExtractor &getOrLoadLocData();
+  const DWARFDataExtractor &getOrLoadLocListsData();
   const DWARFDataExtractor &getOrLoadMacroData();
   const DWARFDataExtractor &getOrLoadRangesData();
   const DWARFDataExtractor &getOrLoadRngListsData();
@@ -67,6 +69,8 @@
   const DWARFDataExtractor &getOrLoadStrOffsetsData();
   const DWARFDataExtractor &getOrLoadDebugTypesData();
 
+  bool isDwo() { return m_dwo_section_list != nullptr; }
+
   llvm::DWARFContext &GetAsLLVM();
 };
 } // namespace lldb_private
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
index 9d97ca1..c5411a1 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
@@ -342,7 +342,8 @@
   }
 }
 
-void DWARFDIE::GetDeclContext(std::vector<CompilerContext> &context) const {
+void DWARFDIE::GetDeclContext(
+    llvm::SmallVectorImpl<lldb_private::CompilerContext> &context) const {
   const dw_tag_t tag = Tag();
   if (tag == DW_TAG_compile_unit || tag == DW_TAG_partial_unit)
     return;
@@ -351,40 +352,33 @@
     parent.GetDeclContext(context);
   switch (tag) {
   case DW_TAG_module:
-    context.push_back(
-        CompilerContext(CompilerContextKind::Module, ConstString(GetName())));
+    context.push_back({CompilerContextKind::Module, ConstString(GetName())});
     break;
   case DW_TAG_namespace:
-    context.push_back(CompilerContext(CompilerContextKind::Namespace,
-                                      ConstString(GetName())));
+    context.push_back({CompilerContextKind::Namespace, ConstString(GetName())});
     break;
   case DW_TAG_structure_type:
-    context.push_back(CompilerContext(CompilerContextKind::Structure,
-                                      ConstString(GetName())));
+    context.push_back({CompilerContextKind::Struct, ConstString(GetName())});
     break;
   case DW_TAG_union_type:
-    context.push_back(
-        CompilerContext(CompilerContextKind::Union, ConstString(GetName())));
+    context.push_back({CompilerContextKind::Union, ConstString(GetName())});
     break;
   case DW_TAG_class_type:
-    context.push_back(
-        CompilerContext(CompilerContextKind::Class, ConstString(GetName())));
+    context.push_back({CompilerContextKind::Class, ConstString(GetName())});
     break;
   case DW_TAG_enumeration_type:
-    context.push_back(CompilerContext(CompilerContextKind::Enumeration,
-                                      ConstString(GetName())));
+    context.push_back({CompilerContextKind::Enum, ConstString(GetName())});
     break;
   case DW_TAG_subprogram:
-    context.push_back(CompilerContext(CompilerContextKind::Function,
-                                      ConstString(GetPubname())));
+    context.push_back(
+        {CompilerContextKind::Function, ConstString(GetPubname())});
     break;
   case DW_TAG_variable:
-    context.push_back(CompilerContext(CompilerContextKind::Variable,
-                                      ConstString(GetPubname())));
+    context.push_back(
+        {CompilerContextKind::Variable, ConstString(GetPubname())});
     break;
   case DW_TAG_typedef:
-    context.push_back(
-        CompilerContext(CompilerContextKind::Typedef, ConstString(GetName())));
+    context.push_back({CompilerContextKind::Typedef, ConstString(GetName())});
     break;
   default:
     break;
@@ -412,39 +406,6 @@
   return false;
 }
 
-DWARFDIE
-DWARFDIE::GetContainingDWOModuleDIE() const {
-  if (IsValid()) {
-    DWARFDIE top_module_die;
-    // Now make sure this DIE is scoped in a DW_TAG_module tag and return true
-    // if so
-    for (DWARFDIE parent = GetParent(); parent.IsValid();
-         parent = parent.GetParent()) {
-      const dw_tag_t tag = parent.Tag();
-      if (tag == DW_TAG_module)
-        top_module_die = parent;
-      else if (tag == DW_TAG_compile_unit || tag == DW_TAG_partial_unit)
-        break;
-    }
-
-    return top_module_die;
-  }
-  return DWARFDIE();
-}
-
-lldb::ModuleSP DWARFDIE::GetContainingDWOModule() const {
-  if (IsValid()) {
-    DWARFDIE dwo_module_die = GetContainingDWOModuleDIE();
-
-    if (dwo_module_die) {
-      const char *module_name = dwo_module_die.GetName();
-      if (module_name)
-        return GetDWARF()->GetDWOModule(lldb_private::ConstString(module_name));
-    }
-  }
-  return lldb::ModuleSP();
-}
-
 bool DWARFDIE::GetDIENamesAndRanges(
     const char *&name, const char *&mangled, DWARFRangeList &ranges,
     int &decl_file, int &decl_line, int &decl_column, int &call_file,
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
index 7753ec9..87d52ee 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h
@@ -22,10 +22,6 @@
   bool IsMethod() const;
 
   // Accessors
-  lldb::ModuleSP GetContainingDWOModule() const;
-
-  DWARFDIE
-  GetContainingDWOModuleDIE() const;
 
   // Accessing information about a DIE
   const char *GetMangledName() const;
@@ -78,8 +74,8 @@
 
   /// Return this DIE's decl context as it is needed to look up types
   /// in Clang's -gmodules debug info format.
-  void
-  GetDeclContext(std::vector<lldb_private::CompilerContext> &context) const;
+  void GetDeclContext(
+      llvm::SmallVectorImpl<lldb_private::CompilerContext> &context) const;
 
   // Getting attribute values from the DIE.
   //
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
index ccf33e6..c8da238 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
@@ -66,8 +66,8 @@
   for (size_t i = 0; i < num_entries; ++i) {
     const RangeToDIE::Entry *entry = m_aranges.GetEntryAtIndex(i);
     if (entry)
-      log->Printf("0x%8.8x: [0x%" PRIx64 " - 0x%" PRIx64 ")", entry->data,
-                  entry->GetRangeBase(), entry->GetRangeEnd());
+      LLDB_LOGF(log, "0x%8.8x: [0x%" PRIx64 " - 0x%" PRIx64 ")", entry->data,
+                entry->GetRangeBase(), entry->GetRangeEnd());
   }
 }
 
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
index 100f35f..1e04bac 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp
@@ -38,7 +38,7 @@
   if (m_cu_aranges_up)
     return *m_cu_aranges_up;
 
-  m_cu_aranges_up = llvm::make_unique<DWARFDebugAranges>();
+  m_cu_aranges_up = std::make_unique<DWARFDebugAranges>();
   const DWARFDataExtractor &debug_aranges_data =
       m_context.getOrLoadArangesData();
   if (llvm::Error error = m_cu_aranges_up->extract(debug_aranges_data))
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
index d1b066f..056cf33 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h
@@ -16,7 +16,6 @@
 #include "DWARFTypeUnit.h"
 #include "DWARFUnit.h"
 #include "SymbolFileDWARF.h"
-#include "lldb/Core/STLUtils.h"
 #include "lldb/lldb-private.h"
 #include "llvm/Support/Error.h"
 
@@ -24,11 +23,6 @@
 class DWARFContext;
 }
 
-typedef std::multimap<const char *, dw_offset_t, CStringCompareFunctionObject>
-    CStringToDIEMap;
-typedef CStringToDIEMap::iterator CStringToDIEMapIter;
-typedef CStringToDIEMap::const_iterator CStringToDIEMapConstIter;
-
 class DWARFDebugInfo {
 public:
   typedef dw_offset_t (*Callback)(SymbolFileDWARF *dwarf2Data,
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index 2f55b7d..320500f 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -156,6 +156,7 @@
 
           // signed or unsigned LEB 128 values
           case DW_FORM_addrx:
+          case DW_FORM_loclistx:
           case DW_FORM_rnglistx:
           case DW_FORM_sdata:
           case DW_FORM_udata:
@@ -192,7 +193,7 @@
     *offset_ptr = offset;
     return true;
   } else {
-    m_tag = 0;
+    m_tag = llvm::dwarf::DW_TAG_null;
     m_has_children = false;
     return true; // NULL debug tag entry
   }
@@ -200,7 +201,7 @@
   return false;
 }
 
-static DWARFRangeList GetRangesOrReportError(const DWARFUnit &unit,
+static DWARFRangeList GetRangesOrReportError(DWARFUnit &unit,
                                              const DWARFDebugInfoEntry &die,
                                              const DWARFFormValue &value) {
   llvm::Expected<DWARFRangeList> expected_ranges =
@@ -223,7 +224,7 @@
 // Gets the valid address ranges for a given DIE by looking for a
 // DW_AT_low_pc/DW_AT_high_pc pair, DW_AT_entry_pc, or DW_AT_ranges attributes.
 bool DWARFDebugInfoEntry::GetDIENamesAndRanges(
-    const DWARFUnit *cu, const char *&name, const char *&mangled,
+    DWARFUnit *cu, const char *&name, const char *&mangled,
     DWARFRangeList &ranges, int &decl_file, int &decl_line, int &decl_column,
     int &call_file, int &call_line, int &call_column,
     DWARFExpression *frame_base) const {
@@ -340,22 +341,18 @@
               uint32_t block_offset =
                   form_value.BlockData() - data.GetDataStart();
               uint32_t block_length = form_value.Unsigned();
-              *frame_base = DWARFExpression(module, data, cu,
-                                            block_offset, block_length);
+              *frame_base = DWARFExpression(
+                  module, DataExtractor(data, block_offset, block_length), cu);
             } else {
-              const DWARFDataExtractor &debug_loc_data = dwarf.DebugLocData();
-              const dw_offset_t debug_loc_offset = form_value.Unsigned();
-
-              size_t loc_list_length = DWARFExpression::LocationListSize(
-                  cu, debug_loc_data, debug_loc_offset);
-              if (loc_list_length > 0) {
-                *frame_base =
-                    DWARFExpression(module, debug_loc_data, cu,
-                                    debug_loc_offset, loc_list_length);
+              DataExtractor data = cu->GetLocationData();
+              const dw_offset_t offset = form_value.Unsigned();
+              if (data.ValidOffset(offset)) {
+                data = DataExtractor(data, offset, data.GetByteSize() - offset);
+                *frame_base = DWARFExpression(module, data, cu);
                 if (lo_pc != LLDB_INVALID_ADDRESS) {
                   assert(lo_pc >= cu->GetBaseAddress());
-                  frame_base->SetLocationListSlide(lo_pc -
-                                                   cu->GetBaseAddress());
+                  frame_base->SetLocationListAddresses(cu->GetBaseAddress(),
+                                                       lo_pc);
                 } else {
                   set_frame_base_loclist_addr = true;
                 }
@@ -383,7 +380,7 @@
   if (set_frame_base_loclist_addr) {
     dw_addr_t lowest_range_pc = ranges.GetMinRangeBase(0);
     assert(lowest_range_pc >= cu->GetBaseAddress());
-    frame_base->SetLocationListSlide(lowest_range_pc - cu->GetBaseAddress());
+    frame_base->SetLocationListAddresses(cu->GetBaseAddress(), lowest_range_pc);
   }
 
   if (ranges.IsEmpty() || name == nullptr || mangled == nullptr) {
@@ -481,8 +478,6 @@
 
   s.PutCString("( ");
 
-  SymbolFileDWARF &dwarf = cu->GetSymbolFileDWARF();
-
   // Check to see if we have any special attribute formatters
   switch (attr) {
   case DW_AT_stmt_list:
@@ -512,7 +507,7 @@
       // We have a location list offset as the value that is the offset into
       // the .debug_loc section that describes the value over it's lifetime
       uint64_t debug_loc_offset = form_value.Unsigned();
-      DWARFExpression::PrintDWARFLocationList(s, cu, dwarf.DebugLocData(),
+      DWARFExpression::PrintDWARFLocationList(s, cu, cu->GetLocationData(),
                                               debug_loc_offset);
     }
   } break;
@@ -650,25 +645,7 @@
       }
     }
   }
-
-  // If we're a unit DIE, also check the attributes of the dwo unit (if any).
-  if (GetParent())
-    return 0;
-  SymbolFileDWARFDwo *dwo_symbol_file = cu->GetDwoSymbolFile();
-  if (!dwo_symbol_file)
-    return 0;
-
-  DWARFCompileUnit *dwo_cu = dwo_symbol_file->GetCompileUnit();
-  if (!dwo_cu)
-    return 0;
-
-  DWARFBaseDIE dwo_cu_die = dwo_cu->GetUnitDIEOnly();
-  if (!dwo_cu_die.IsValid())
-    return 0;
-
-  return dwo_cu_die.GetDIE()->GetAttributeValue(
-      dwo_cu, attr, form_value, end_attr_offset_ptr,
-      check_specification_or_abstract_origin);
+  return 0;
 }
 
 // GetAttributeValueAsString
@@ -770,7 +747,7 @@
 }
 
 size_t DWARFDebugInfoEntry::GetAttributeAddressRanges(
-    const DWARFUnit *cu, DWARFRangeList &ranges, bool check_hi_lo_pc,
+    DWARFUnit *cu, DWARFRangeList &ranges, bool check_hi_lo_pc,
     bool check_specification_or_abstract_origin) const {
   ranges.Clear();
 
@@ -1016,8 +993,7 @@
   return storage.c_str();
 }
 
-bool DWARFDebugInfoEntry::LookupAddress(const dw_addr_t address,
-                                        const DWARFUnit *cu,
+bool DWARFDebugInfoEntry::LookupAddress(const dw_addr_t address, DWARFUnit *cu,
                                         DWARFDebugInfoEntry **function_die,
                                         DWARFDebugInfoEntry **block_die) {
   bool found_address = false;
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
index 1e7b5f2..f35af6e 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h
@@ -23,6 +23,10 @@
 
 #define DIE_SIBLING_IDX_BITSIZE 31
 
+/// DWARFDebugInfoEntry objects assume that they are living in one big
+/// vector and do pointer arithmetic on their this pointers. Don't
+/// pass them by value. Due to the way they are constructed in a
+/// std::vector, we cannot delete the copy constructor.
 class DWARFDebugInfoEntry {
 public:
   typedef std::vector<DWARFDebugInfoEntry> collection;
@@ -31,7 +35,7 @@
 
   DWARFDebugInfoEntry()
       : m_offset(DW_INVALID_OFFSET), m_parent_idx(0), m_sibling_idx(0),
-        m_has_children(false), m_abbr_idx(0), m_tag(0) {}
+        m_has_children(false), m_abbr_idx(0), m_tag(llvm::dwarf::DW_TAG_null) {}
 
   explicit operator bool() const { return m_offset != DW_INVALID_OFFSET; }
   bool operator==(const DWARFDebugInfoEntry &rhs) const;
@@ -46,7 +50,7 @@
   bool Extract(const lldb_private::DWARFDataExtractor &data,
                const DWARFUnit *cu, lldb::offset_t *offset_ptr);
 
-  bool LookupAddress(const dw_addr_t address, const DWARFUnit *cu,
+  bool LookupAddress(const dw_addr_t address, DWARFUnit *cu,
                      DWARFDebugInfoEntry **function_die,
                      DWARFDebugInfoEntry **block_die);
 
@@ -87,7 +91,7 @@
       bool check_specification_or_abstract_origin = false) const;
 
   size_t GetAttributeAddressRanges(
-      const DWARFUnit *cu, DWARFRangeList &ranges, bool check_hi_lo_pc,
+      DWARFUnit *cu, DWARFRangeList &ranges, bool check_hi_lo_pc,
       bool check_specification_or_abstract_origin = false) const;
 
   const char *GetName(const DWARFUnit *cu) const;
@@ -112,7 +116,7 @@
                 dw_attr_t attr, DWARFFormValue &form_value);
 
   bool GetDIENamesAndRanges(
-      const DWARFUnit *cu, const char *&name, const char *&mangled,
+      DWARFUnit *cu, const char *&name, const char *&mangled,
       DWARFRangeList &rangeList, int &decl_file, int &decl_line,
       int &decl_column, int &call_file, int &call_line, int &call_column,
       lldb_private::DWARFExpression *frame_base = nullptr) const;
@@ -178,8 +182,9 @@
       // a single NULL terminating child.
       m_has_children : 1;
   uint16_t m_abbr_idx;
-  uint16_t m_tag; // A copy of the DW_TAG value so we don't have to go through
-                  // the compile unit abbrev table
+  /// A copy of the DW_TAG value so we don't have to go through the compile
+  /// unit abbrev table
+  dw_tag_t m_tag = llvm::dwarf::DW_TAG_null;
 };
 
 #endif // SymbolFileDWARF_DWARFDebugInfoEntry_h_
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
deleted file mode 100644
index 953089f..0000000
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
+++ /dev/null
@@ -1,1038 +0,0 @@
-//===-- DWARFDebugLine.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "DWARFDebugLine.h"
-
-//#define ENABLE_DEBUG_PRINTF   // DO NOT LEAVE THIS DEFINED: DEBUG ONLY!!!
-#include <assert.h>
-
-#include <memory>
-
-#include "lldb/Core/FileSpecList.h"
-#include "lldb/Core/Module.h"
-#include "lldb/Host/Host.h"
-#include "lldb/Utility/Log.h"
-#include "lldb/Utility/Timer.h"
-
-#include "DWARFUnit.h"
-#include "LogChannelDWARF.h"
-#include "SymbolFileDWARF.h"
-
-using namespace lldb;
-using namespace lldb_private;
-using namespace std;
-
-// Parse
-//
-// Parse all information in the debug_line_data into an internal
-// representation.
-void DWARFDebugLine::Parse(const DWARFDataExtractor &debug_line_data) {
-  m_lineTableMap.clear();
-  lldb::offset_t offset = 0;
-  LineTable::shared_ptr line_table_sp(new LineTable);
-  while (debug_line_data.ValidOffset(offset)) {
-    const lldb::offset_t debug_line_offset = offset;
-
-    if (line_table_sp.get() == nullptr)
-      break;
-
-    if (ParseStatementTable(debug_line_data, &offset, line_table_sp.get(), nullptr)) {
-      // Make sure we don't don't loop infinitely
-      if (offset <= debug_line_offset)
-        break;
-      // DEBUG_PRINTF("m_lineTableMap[0x%8.8x] = line_table_sp\n",
-      // debug_line_offset);
-      m_lineTableMap[debug_line_offset] = line_table_sp;
-      line_table_sp = std::make_shared<LineTable>();
-    } else
-      ++offset; // Try next byte in line table
-  }
-}
-
-void DWARFDebugLine::ParseIfNeeded(const DWARFDataExtractor &debug_line_data) {
-  if (m_lineTableMap.empty())
-    Parse(debug_line_data);
-}
-
-// DWARFDebugLine::GetLineTable
-DWARFDebugLine::LineTable::shared_ptr
-DWARFDebugLine::GetLineTable(const dw_offset_t offset) const {
-  DWARFDebugLine::LineTable::shared_ptr line_table_shared_ptr;
-  LineTableConstIter pos = m_lineTableMap.find(offset);
-  if (pos != m_lineTableMap.end())
-    line_table_shared_ptr = pos->second;
-  return line_table_shared_ptr;
-}
-
-// Parse
-//
-// Parse the entire line table contents calling callback each time a new
-// prologue is parsed and every time a new row is to be added to the line
-// table.
-void DWARFDebugLine::Parse(const DWARFDataExtractor &debug_line_data,
-                           DWARFDebugLine::State::Callback callback,
-                           void *userData) {
-  lldb::offset_t offset = 0;
-  if (debug_line_data.ValidOffset(offset)) {
-    if (!ParseStatementTable(debug_line_data, &offset, callback, userData, nullptr))
-      ++offset; // Skip to next byte in .debug_line section
-  }
-}
-
-namespace {
-struct EntryDescriptor {
-  dw_sleb128_t code;
-  dw_sleb128_t form;
-};
-
-static std::vector<EntryDescriptor>
-ReadDescriptors(const DWARFDataExtractor &debug_line_data,
-                lldb::offset_t *offset_ptr) {
-  std::vector<EntryDescriptor> ret;
-  uint8_t n = debug_line_data.GetU8(offset_ptr);
-  for (uint8_t i = 0; i < n; ++i) {
-    EntryDescriptor ent;
-    ent.code = debug_line_data.GetULEB128(offset_ptr);
-    ent.form = debug_line_data.GetULEB128(offset_ptr);
-    ret.push_back(ent);
-  }
-  return ret;
-}
-} // namespace
-
-// DWARFDebugLine::ParsePrologue
-bool DWARFDebugLine::ParsePrologue(const DWARFDataExtractor &debug_line_data,
-                                   lldb::offset_t *offset_ptr,
-                                   Prologue *prologue, DWARFUnit *dwarf_cu) {
-  const lldb::offset_t prologue_offset = *offset_ptr;
-
-  // DEBUG_PRINTF("0x%8.8x: ParsePrologue()\n", *offset_ptr);
-
-  prologue->Clear();
-  uint32_t i;
-  const char *s;
-  prologue->total_length = debug_line_data.GetDWARFInitialLength(offset_ptr);
-  prologue->version = debug_line_data.GetU16(offset_ptr);
-  if (prologue->version < 2 || prologue->version > 5)
-    return false;
-
-  if (prologue->version >= 5) {
-    prologue->address_size = debug_line_data.GetU8(offset_ptr);
-    prologue->segment_selector_size = debug_line_data.GetU8(offset_ptr);
-  }
-
-  prologue->prologue_length = debug_line_data.GetDWARFOffset(offset_ptr);
-  const lldb::offset_t end_prologue_offset =
-      prologue->prologue_length + *offset_ptr;
-  prologue->min_inst_length = debug_line_data.GetU8(offset_ptr);
-  if (prologue->version >= 4)
-    prologue->maximum_operations_per_instruction =
-        debug_line_data.GetU8(offset_ptr);
-  else
-    prologue->maximum_operations_per_instruction = 1;
-  prologue->default_is_stmt = debug_line_data.GetU8(offset_ptr);
-  prologue->line_base = debug_line_data.GetU8(offset_ptr);
-  prologue->line_range = debug_line_data.GetU8(offset_ptr);
-  prologue->opcode_base = debug_line_data.GetU8(offset_ptr);
-
-  prologue->standard_opcode_lengths.reserve(prologue->opcode_base - 1);
-
-  for (i = 1; i < prologue->opcode_base; ++i) {
-    uint8_t op_len = debug_line_data.GetU8(offset_ptr);
-    prologue->standard_opcode_lengths.push_back(op_len);
-  }
-
-  if (prologue->version >= 5) {
-    std::vector<EntryDescriptor> dirEntryFormatV =
-        ReadDescriptors(debug_line_data, offset_ptr);
-    uint8_t dirCount = debug_line_data.GetULEB128(offset_ptr);
-    for (int i = 0; i < dirCount; ++i) {
-      for (EntryDescriptor &ent : dirEntryFormatV) {
-        DWARFFormValue value(dwarf_cu, ent.form);
-        if (ent.code != DW_LNCT_path) {
-          if (!value.SkipValue(debug_line_data, offset_ptr))
-            return false;
-          continue;
-        }
-
-        if (!value.ExtractValue(debug_line_data, offset_ptr))
-          return false;
-        prologue->include_directories.push_back(value.AsCString());
-      }
-    }
-
-    std::vector<EntryDescriptor> filesEntryFormatV =
-        ReadDescriptors(debug_line_data, offset_ptr);
-    llvm::DenseSet<std::pair<uint64_t, uint64_t>> seen;
-    uint8_t n = debug_line_data.GetULEB128(offset_ptr);
-    for (int i = 0; i < n; ++i) {
-      FileNameEntry entry;
-      for (EntryDescriptor &ent : filesEntryFormatV) {
-        DWARFFormValue value(dwarf_cu, ent.form);
-        if (!value.ExtractValue(debug_line_data, offset_ptr))
-          return false;
-
-        switch (ent.code) {
-        case DW_LNCT_path:
-          entry.name = value.AsCString();
-          break;
-        case DW_LNCT_directory_index:
-          entry.dir_idx = value.Unsigned();
-          break;
-        case DW_LNCT_timestamp:
-          entry.mod_time = value.Unsigned();
-          break;
-        case DW_LNCT_size:
-          entry.length = value.Unsigned();
-          break;
-        case DW_LNCT_MD5:
-          assert(value.Unsigned() == 16);
-          std::uninitialized_copy_n(value.BlockData(), 16,
-                                    entry.checksum.Bytes.begin());
-          break;
-        default:
-          break;
-        }
-      }
-
-      if (seen.insert(entry.checksum.words()).second)
-        prologue->file_names.push_back(entry);
-    }
-  } else {
-    while (*offset_ptr < end_prologue_offset) {
-      s = debug_line_data.GetCStr(offset_ptr);
-      if (s && s[0])
-        prologue->include_directories.push_back(s);
-      else
-        break;
-    }
-
-    while (*offset_ptr < end_prologue_offset) {
-      const char *name = debug_line_data.GetCStr(offset_ptr);
-      if (name && name[0]) {
-        FileNameEntry fileEntry;
-        fileEntry.name = name;
-        fileEntry.dir_idx = debug_line_data.GetULEB128(offset_ptr);
-        fileEntry.mod_time = debug_line_data.GetULEB128(offset_ptr);
-        fileEntry.length = debug_line_data.GetULEB128(offset_ptr);
-        prologue->file_names.push_back(fileEntry);
-      } else
-        break;
-    }
-  }
-
-  // XXX GNU as is broken for 64-Bit DWARF
-  if (*offset_ptr != end_prologue_offset) {
-    Host::SystemLog(Host::eSystemLogWarning,
-                    "warning: parsing line table prologue at 0x%8.8" PRIx64
-                    " should have ended at 0x%8.8" PRIx64
-                    " but it ended at 0x%8.8" PRIx64 "\n",
-                    prologue_offset, end_prologue_offset, *offset_ptr);
-  }
-  return end_prologue_offset;
-}
-
-bool DWARFDebugLine::ParseSupportFiles(
-    const lldb::ModuleSP &module_sp, const DWARFDataExtractor &debug_line_data,
-    dw_offset_t stmt_list, FileSpecList &support_files, DWARFUnit *dwarf_cu) {
-  lldb::offset_t offset = stmt_list;
-
-  Prologue prologue;
-  if (!ParsePrologue(debug_line_data, &offset, &prologue, dwarf_cu)) {
-    Host::SystemLog(Host::eSystemLogError, "error: parsing line table prologue "
-                                           "at 0x%8.8x (parsing ended around "
-                                           "0x%8.8" PRIx64 "\n",
-                    stmt_list, offset);
-    return false;
-  }
-
-  FileSpec file_spec;
-  std::string remapped_file;
-
-  for (uint32_t file_idx = 1;
-       prologue.GetFile(file_idx, dwarf_cu->GetCompilationDirectory(),
-                        dwarf_cu->GetPathStyle(), file_spec);
-       ++file_idx) {
-    if (module_sp->RemapSourceFile(file_spec.GetPath(), remapped_file))
-      file_spec.SetFile(remapped_file, FileSpec::Style::native);
-    support_files.Append(file_spec);
-  }
-  return true;
-}
-
-// ParseStatementTable
-//
-// Parse a single line table (prologue and all rows) and call the callback
-// function once for the prologue (row in state will be zero) and each time a
-// row is to be added to the line table.
-bool DWARFDebugLine::ParseStatementTable(
-    const DWARFDataExtractor &debug_line_data, lldb::offset_t *offset_ptr,
-    DWARFDebugLine::State::Callback callback, void *userData, DWARFUnit *dwarf_cu) {
-  Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_LINE));
-  Prologue::shared_ptr prologue(new Prologue());
-
-  const dw_offset_t debug_line_offset = *offset_ptr;
-
-  static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
-  Timer scoped_timer(
-      func_cat, "DWARFDebugLine::ParseStatementTable (.debug_line[0x%8.8x])",
-      debug_line_offset);
-
-  if (!ParsePrologue(debug_line_data, offset_ptr, prologue.get(), dwarf_cu)) {
-    if (log)
-      log->Error("failed to parse DWARF line table prologue");
-    // Restore our offset and return false to indicate failure!
-    *offset_ptr = debug_line_offset;
-    return false;
-  }
-
-  if (log)
-    prologue->Dump(log);
-
-  const dw_offset_t end_offset =
-      debug_line_offset + prologue->total_length +
-      (debug_line_data.GetDWARFSizeofInitialLength());
-
-  State state(prologue, log, callback, userData);
-
-  while (*offset_ptr < end_offset) {
-    // DEBUG_PRINTF("0x%8.8x: ", *offset_ptr);
-    uint8_t opcode = debug_line_data.GetU8(offset_ptr);
-
-    if (opcode == 0) {
-      // Extended Opcodes always start with a zero opcode followed by a uleb128
-      // length so you can skip ones you don't know about
-      lldb::offset_t ext_offset = *offset_ptr;
-      dw_uleb128_t len = debug_line_data.GetULEB128(offset_ptr);
-      dw_offset_t arg_size = len - (*offset_ptr - ext_offset);
-
-      // DEBUG_PRINTF("Extended: <%2u> ", len);
-      uint8_t sub_opcode = debug_line_data.GetU8(offset_ptr);
-      switch (sub_opcode) {
-      case DW_LNE_end_sequence:
-        // Set the end_sequence register of the state machine to true and
-        // append a row to the matrix using the current values of the state-
-        // machine registers. Then reset the registers to the initial values
-        // specified above. Every statement program sequence must end with a
-        // DW_LNE_end_sequence instruction which creates a row whose address is
-        // that of the byte after the last target machine instruction of the
-        // sequence.
-        state.end_sequence = true;
-        state.AppendRowToMatrix(*offset_ptr);
-        state.Reset();
-        break;
-
-      case DW_LNE_set_address:
-        // Takes a single relocatable address as an operand. The size of the
-        // operand is the size appropriate to hold an address on the target
-        // machine. Set the address register to the value given by the
-        // relocatable address. All of the other statement program opcodes that
-        // affect the address register add a delta to it. This instruction
-        // stores a relocatable value into it instead.
-        if (arg_size == 4)
-          state.address = debug_line_data.GetU32(offset_ptr);
-        else // arg_size == 8
-          state.address = debug_line_data.GetU64(offset_ptr);
-        break;
-
-      case DW_LNE_define_file:
-        // Takes 4 arguments. The first is a null terminated string containing
-        // a source file name. The second is an unsigned LEB128 number
-        // representing the directory index of the directory in which the file
-        // was found. The third is an unsigned LEB128 number representing the
-        // time of last modification of the file. The fourth is an unsigned
-        // LEB128 number representing the length in bytes of the file. The time
-        // and length fields may contain LEB128(0) if the information is not
-        // available.
-        //
-        // The directory index represents an entry in the include_directories
-        // section of the statement program prologue. The index is LEB128(0) if
-        // the file was found in the current directory of the compilation,
-        // LEB128(1) if it was found in the first directory in the
-        // include_directories section, and so on. The directory index is
-        // ignored for file names that represent full path names.
-        //
-        // The files are numbered, starting at 1, in the order in which they
-        // appear; the names in the prologue come before names defined by the
-        // DW_LNE_define_file instruction. These numbers are used in the file
-        // register of the state machine.
-        {
-          FileNameEntry fileEntry;
-          fileEntry.name = debug_line_data.GetCStr(offset_ptr);
-          fileEntry.dir_idx = debug_line_data.GetULEB128(offset_ptr);
-          fileEntry.mod_time = debug_line_data.GetULEB128(offset_ptr);
-          fileEntry.length = debug_line_data.GetULEB128(offset_ptr);
-          state.prologue->file_names.push_back(fileEntry);
-        }
-        break;
-
-      default:
-        // Length doesn't include the zero opcode byte or the length itself,
-        // but it does include the sub_opcode, so we have to adjust for that
-        // below
-        (*offset_ptr) += arg_size;
-        break;
-      }
-    } else if (opcode < prologue->opcode_base) {
-      switch (opcode) {
-      // Standard Opcodes
-      case DW_LNS_copy:
-        // Takes no arguments. Append a row to the matrix using the current
-        // values of the state-machine registers. Then set the basic_block
-        // register to false.
-        state.AppendRowToMatrix(*offset_ptr);
-        break;
-
-      case DW_LNS_advance_pc:
-        // Takes a single unsigned LEB128 operand, multiplies it by the
-        // min_inst_length field of the prologue, and adds the result to the
-        // address register of the state machine.
-        state.address +=
-            debug_line_data.GetULEB128(offset_ptr) * prologue->min_inst_length;
-        break;
-
-      case DW_LNS_advance_line:
-        // Takes a single signed LEB128 operand and adds that value to the line
-        // register of the state machine.
-        state.line += debug_line_data.GetSLEB128(offset_ptr);
-        break;
-
-      case DW_LNS_set_file:
-        // Takes a single unsigned LEB128 operand and stores it in the file
-        // register of the state machine.
-        state.file = debug_line_data.GetULEB128(offset_ptr);
-        break;
-
-      case DW_LNS_set_column:
-        // Takes a single unsigned LEB128 operand and stores it in the column
-        // register of the state machine.
-        state.column = debug_line_data.GetULEB128(offset_ptr);
-        break;
-
-      case DW_LNS_negate_stmt:
-        // Takes no arguments. Set the is_stmt register of the state machine to
-        // the logical negation of its current value.
-        state.is_stmt = !state.is_stmt;
-        break;
-
-      case DW_LNS_set_basic_block:
-        // Takes no arguments. Set the basic_block register of the state
-        // machine to true
-        state.basic_block = true;
-        break;
-
-      case DW_LNS_const_add_pc:
-        // Takes no arguments. Add to the address register of the state machine
-        // the address increment value corresponding to special opcode 255. The
-        // motivation for DW_LNS_const_add_pc is this: when the statement
-        // program needs to advance the address by a small amount, it can use a
-        // single special opcode, which occupies a single byte. When it needs
-        // to advance the address by up to twice the range of the last special
-        // opcode, it can use DW_LNS_const_add_pc followed by a special opcode,
-        // for a total of two bytes. Only if it needs to advance the address by
-        // more than twice that range will it need to use both
-        // DW_LNS_advance_pc and a special opcode, requiring three or more
-        // bytes.
-        {
-          uint8_t adjust_opcode = 255 - prologue->opcode_base;
-          dw_addr_t addr_offset = (adjust_opcode / prologue->line_range) *
-                                  prologue->min_inst_length;
-          state.address += addr_offset;
-        }
-        break;
-
-      case DW_LNS_fixed_advance_pc:
-        // Takes a single uhalf operand. Add to the address register of the
-        // state machine the value of the (unencoded) operand. This is the only
-        // extended opcode that takes an argument that is not a variable length
-        // number. The motivation for DW_LNS_fixed_advance_pc is this: existing
-        // assemblers cannot emit DW_LNS_advance_pc or special opcodes because
-        // they cannot encode LEB128 numbers or judge when the computation of a
-        // special opcode overflows and requires the use of DW_LNS_advance_pc.
-        // Such assemblers, however, can use DW_LNS_fixed_advance_pc instead,
-        // sacrificing compression.
-        state.address += debug_line_data.GetU16(offset_ptr);
-        break;
-
-      case DW_LNS_set_prologue_end:
-        // Takes no arguments. Set the prologue_end register of the state
-        // machine to true
-        state.prologue_end = true;
-        break;
-
-      case DW_LNS_set_epilogue_begin:
-        // Takes no arguments. Set the basic_block register of the state
-        // machine to true
-        state.epilogue_begin = true;
-        break;
-
-      case DW_LNS_set_isa:
-        // Takes a single unsigned LEB128 operand and stores it in the column
-        // register of the state machine.
-        state.isa = debug_line_data.GetULEB128(offset_ptr);
-        break;
-
-      default:
-        // Handle any unknown standard opcodes here. We know the lengths of
-        // such opcodes because they are specified in the prologue as a
-        // multiple of LEB128 operands for each opcode.
-        {
-          uint8_t i;
-          assert(static_cast<size_t>(opcode - 1) <
-                 prologue->standard_opcode_lengths.size());
-          const uint8_t opcode_length =
-              prologue->standard_opcode_lengths[opcode - 1];
-          for (i = 0; i < opcode_length; ++i)
-            debug_line_data.Skip_LEB128(offset_ptr);
-        }
-        break;
-      }
-    } else {
-      // Special Opcodes
-
-      // A special opcode value is chosen based on the amount that needs
-      // to be added to the line and address registers. The maximum line
-      // increment for a special opcode is the value of the line_base field in
-      // the header, plus the value of the line_range field, minus 1 (line base
-      // + line range - 1). If the desired line increment is greater than the
-      // maximum line increment, a standard opcode must be used instead of a
-      // special opcode. The "address advance" is calculated by dividing the
-      // desired address increment by the minimum_instruction_length field from
-      // the header. The special opcode is then calculated using the following
-      // formula:
-      //
-      //  opcode = (desired line increment - line_base) + (line_range * address
-      //  advance) + opcode_base
-      //
-      // If the resulting opcode is greater than 255, a standard opcode must be
-      // used instead.
-      //
-      // To decode a special opcode, subtract the opcode_base from the opcode
-      // itself to give the adjusted opcode. The amount to increment the
-      // address register is the result of the adjusted opcode divided by the
-      // line_range multiplied by the minimum_instruction_length field from the
-      // header. That is:
-      //
-      //  address increment = (adjusted opcode / line_range) *
-      //  minimum_instruction_length
-      //
-      // The amount to increment the line register is the line_base plus the
-      // result of the adjusted opcode modulo the line_range. That is:
-      //
-      // line increment = line_base + (adjusted opcode % line_range)
-
-      uint8_t adjust_opcode = opcode - prologue->opcode_base;
-      dw_addr_t addr_offset =
-          (adjust_opcode / prologue->line_range) * prologue->min_inst_length;
-      int32_t line_offset =
-          prologue->line_base + (adjust_opcode % prologue->line_range);
-      state.line += line_offset;
-      state.address += addr_offset;
-      state.AppendRowToMatrix(*offset_ptr);
-    }
-  }
-
-  state.Finalize(*offset_ptr);
-
-  return end_offset;
-}
-
-// ParseStatementTableCallback
-static void ParseStatementTableCallback(dw_offset_t offset,
-                                        const DWARFDebugLine::State &state,
-                                        void *userData) {
-  DWARFDebugLine::LineTable *line_table = (DWARFDebugLine::LineTable *)userData;
-  if (state.row == DWARFDebugLine::State::StartParsingLineTable) {
-    // Just started parsing the line table, so lets keep a reference to the
-    // prologue using the supplied shared pointer
-    line_table->prologue = state.prologue;
-  } else if (state.row == DWARFDebugLine::State::DoneParsingLineTable) {
-    // Done parsing line table, nothing to do for the cleanup
-  } else {
-    // We have a new row, lets append it
-    line_table->AppendRow(state);
-  }
-}
-
-// ParseStatementTable
-//
-// Parse a line table at offset and populate the LineTable class with the
-// prologue and all rows.
-bool DWARFDebugLine::ParseStatementTable(
-    const DWARFDataExtractor &debug_line_data, lldb::offset_t *offset_ptr,
-    LineTable *line_table, DWARFUnit *dwarf_cu) {
-  return ParseStatementTable(debug_line_data, offset_ptr,
-                             ParseStatementTableCallback, line_table, dwarf_cu);
-}
-
-inline bool DWARFDebugLine::Prologue::IsValid() const {
-  return SymbolFileDWARF::SupportedVersion(version);
-}
-
-// DWARFDebugLine::Prologue::Dump
-void DWARFDebugLine::Prologue::Dump(Log *log) {
-  uint32_t i;
-
-  log->Printf("Line table prologue:");
-  log->Printf("   total_length: 0x%8.8x", total_length);
-  log->Printf("        version: %u", version);
-  log->Printf("prologue_length: 0x%8.8x", prologue_length);
-  log->Printf("min_inst_length: %u", min_inst_length);
-  log->Printf("default_is_stmt: %u", default_is_stmt);
-  log->Printf("      line_base: %i", line_base);
-  log->Printf("     line_range: %u", line_range);
-  log->Printf("    opcode_base: %u", opcode_base);
-
-  for (i = 0; i < standard_opcode_lengths.size(); ++i) {
-    log->Printf("standard_opcode_lengths[%s] = %u", DW_LNS_value_to_name(i + 1),
-                standard_opcode_lengths[i]);
-  }
-
-  if (!include_directories.empty()) {
-    for (i = 0; i < include_directories.size(); ++i) {
-      log->Printf("include_directories[%3u] = '%s'", i + 1,
-                  include_directories[i]);
-    }
-  }
-
-  if (!file_names.empty()) {
-    log->PutCString("                Dir  Mod Time   File Len   File Name");
-    log->PutCString("                ---- ---------- ---------- "
-                    "---------------------------");
-    for (i = 0; i < file_names.size(); ++i) {
-      const FileNameEntry &fileEntry = file_names[i];
-      log->Printf("file_names[%3u] %4u 0x%8.8x 0x%8.8x %s", i + 1,
-                  fileEntry.dir_idx, fileEntry.mod_time, fileEntry.length,
-                  fileEntry.name);
-    }
-  }
-}
-
-// DWARFDebugLine::ParsePrologue::Append
-//
-// Append the contents of the prologue to the binary stream buffer
-// void
-// DWARFDebugLine::Prologue::Append(BinaryStreamBuf& buff) const
-//{
-//  uint32_t i;
-//
-//  buff.Append32(total_length);
-//  buff.Append16(version);
-//  buff.Append32(prologue_length);
-//  buff.Append8(min_inst_length);
-//  buff.Append8(default_is_stmt);
-//  buff.Append8(line_base);
-//  buff.Append8(line_range);
-//  buff.Append8(opcode_base);
-//
-//  for (i=0; i<standard_opcode_lengths.size(); ++i)
-//      buff.Append8(standard_opcode_lengths[i]);
-//
-//  for (i=0; i<include_directories.size(); ++i)
-//      buff.AppendCStr(include_directories[i].c_str());
-//  buff.Append8(0);    // Terminate the include directory section with empty
-//  string
-//
-//  for (i=0; i<file_names.size(); ++i)
-//  {
-//      buff.AppendCStr(file_names[i].name.c_str());
-//      buff.Append32_as_ULEB128(file_names[i].dir_idx);
-//      buff.Append32_as_ULEB128(file_names[i].mod_time);
-//      buff.Append32_as_ULEB128(file_names[i].length);
-//  }
-//  buff.Append8(0);    // Terminate the file names section with empty string
-//}
-
-bool DWARFDebugLine::Prologue::GetFile(uint32_t file_idx,
-                                       const FileSpec &comp_dir,
-                                       FileSpec::Style style,
-                                       FileSpec &file) const {
-  uint32_t idx = file_idx - 1; // File indexes are 1 based...
-  if (idx < file_names.size()) {
-    file.SetFile(file_names[idx].name, style);
-    if (file.IsRelative()) {
-      if (file_names[idx].dir_idx > 0) {
-        const uint32_t dir_idx = file_names[idx].dir_idx - 1;
-        if (dir_idx < include_directories.size()) {
-          file.PrependPathComponent(include_directories[dir_idx]);
-          if (!file.IsRelative())
-            return true;
-        }
-      }
-
-      if (comp_dir)
-        file.PrependPathComponent(comp_dir);
-    }
-    return true;
-  }
-  return false;
-}
-
-void DWARFDebugLine::LineTable::AppendRow(const DWARFDebugLine::Row &state) {
-  rows.push_back(state);
-}
-
-// Compare function for the binary search in
-// DWARFDebugLine::LineTable::LookupAddress()
-static bool FindMatchingAddress(const DWARFDebugLine::Row &row1,
-                                const DWARFDebugLine::Row &row2) {
-  return row1.address < row2.address;
-}
-
-// DWARFDebugLine::LineTable::LookupAddress
-uint32_t DWARFDebugLine::LineTable::LookupAddress(dw_addr_t address,
-                                                  dw_addr_t cu_high_pc) const {
-  uint32_t index = UINT32_MAX;
-  if (!rows.empty()) {
-    // Use the lower_bound algorithm to perform a binary search since we know
-    // that our line table data is ordered by address.
-    DWARFDebugLine::Row row;
-    row.address = address;
-    Row::const_iterator begin_pos = rows.begin();
-    Row::const_iterator end_pos = rows.end();
-    Row::const_iterator pos =
-        lower_bound(begin_pos, end_pos, row, FindMatchingAddress);
-    if (pos == end_pos) {
-      if (address < cu_high_pc)
-        return rows.size() - 1;
-    } else {
-      // Rely on fact that we are using a std::vector and we can do pointer
-      // arithmetic to find the row index (which will be one less that what we
-      // found since it will find the first position after the current address)
-      // since std::vector iterators are just pointers to the container type.
-      index = pos - begin_pos;
-      if (pos->address > address) {
-        if (index > 0)
-          --index;
-        else
-          index = UINT32_MAX;
-      }
-    }
-  }
-  return index; // Failed to find address
-}
-
-// DWARFDebugLine::Row::Row
-DWARFDebugLine::Row::Row(bool default_is_stmt)
-    : address(0), line(1), column(0), file(1), is_stmt(default_is_stmt),
-      basic_block(false), end_sequence(false), prologue_end(false),
-      epilogue_begin(false), isa(0) {}
-
-// Called after a row is appended to the matrix
-void DWARFDebugLine::Row::PostAppend() {
-  basic_block = false;
-  prologue_end = false;
-  epilogue_begin = false;
-}
-
-// DWARFDebugLine::Row::Reset
-void DWARFDebugLine::Row::Reset(bool default_is_stmt) {
-  address = 0;
-  line = 1;
-  column = 0;
-  file = 1;
-  is_stmt = default_is_stmt;
-  basic_block = false;
-  end_sequence = false;
-  prologue_end = false;
-  epilogue_begin = false;
-  isa = 0;
-}
-// DWARFDebugLine::Row::Dump
-void DWARFDebugLine::Row::Dump(Log *log) const {
-  log->Printf("0x%16.16" PRIx64 " %6u %6u %6u %3u %s%s%s%s%s", address, line,
-              column, file, isa, is_stmt ? " is_stmt" : "",
-              basic_block ? " basic_block" : "",
-              prologue_end ? " prologue_end" : "",
-              epilogue_begin ? " epilogue_begin" : "",
-              end_sequence ? " end_sequence" : "");
-}
-
-// Compare function LineTable structures
-static bool AddressLessThan(const DWARFDebugLine::Row &a,
-                            const DWARFDebugLine::Row &b) {
-  return a.address < b.address;
-}
-
-// Insert a row at the correct address if the addresses can be out of order
-// which can only happen when we are linking a line table that may have had
-// it's contents rearranged.
-void DWARFDebugLine::Row::Insert(Row::collection &state_coll,
-                                 const Row &state) {
-  // If we don't have anything yet, or if the address of the last state in our
-  // line table is less than the current one, just append the current state
-  if (state_coll.empty() || AddressLessThan(state_coll.back(), state)) {
-    state_coll.push_back(state);
-  } else {
-    // Do a binary search for the correct entry
-    pair<Row::iterator, Row::iterator> range(equal_range(
-        state_coll.begin(), state_coll.end(), state, AddressLessThan));
-
-    // If the addresses are equal, we can safely replace the previous entry
-    // with the current one if the one it is replacing is an end_sequence
-    // entry. We currently always place an extra end sequence when ever we exit
-    // a valid address range for a function in case the functions get
-    // rearranged by optimizations or by order specifications. These extra end
-    // sequences will disappear by getting replaced with valid consecutive
-    // entries within a compile unit if there are no gaps.
-    if (range.first == range.second) {
-      state_coll.insert(range.first, state);
-    } else {
-      if ((distance(range.first, range.second) == 1) &&
-          range.first->end_sequence == true) {
-        *range.first = state;
-      } else {
-        state_coll.insert(range.second, state);
-      }
-    }
-  }
-}
-
-// DWARFDebugLine::State::State
-DWARFDebugLine::State::State(Prologue::shared_ptr &p, Log *l,
-                             DWARFDebugLine::State::Callback cb, void *userData)
-    : Row(p->default_is_stmt), prologue(p), log(l), callback(cb),
-      callbackUserData(userData), row(StartParsingLineTable) {
-  // Call the callback with the initial row state of zero for the prologue
-  if (callback)
-    callback(0, *this, callbackUserData);
-}
-
-// DWARFDebugLine::State::Reset
-void DWARFDebugLine::State::Reset() { Row::Reset(prologue->default_is_stmt); }
-
-// DWARFDebugLine::State::AppendRowToMatrix
-void DWARFDebugLine::State::AppendRowToMatrix(dw_offset_t offset) {
-  // Each time we are to add an entry into the line table matrix call the
-  // callback function so that someone can do something with the current state
-  // of the state machine (like build a line table or dump the line table!)
-  if (log) {
-    if (row == 0) {
-      log->PutCString("Address            Line   Column File   ISA Flags");
-      log->PutCString(
-          "------------------ ------ ------ ------ --- -------------");
-    }
-    Dump(log);
-  }
-
-  ++row; // Increase the row number before we call our callback for a real row
-  if (callback)
-    callback(offset, *this, callbackUserData);
-  PostAppend();
-}
-
-// DWARFDebugLine::State::Finalize
-void DWARFDebugLine::State::Finalize(dw_offset_t offset) {
-  // Call the callback with a special row state when we are done parsing a line
-  // table
-  row = DoneParsingLineTable;
-  if (callback)
-    callback(offset, *this, callbackUserData);
-}
-
-// void
-// DWARFDebugLine::AppendLineTableData
-//(
-//  const DWARFDebugLine::Prologue* prologue,
-//  const DWARFDebugLine::Row::collection& state_coll,
-//  const uint32_t addr_size,
-//  BinaryStreamBuf &debug_line_data
-//)
-//{
-//  if (state_coll.empty())
-//  {
-//      // We have no entries, just make an empty line table
-//      debug_line_data.Append8(0);
-//      debug_line_data.Append8(1);
-//      debug_line_data.Append8(DW_LNE_end_sequence);
-//  }
-//  else
-//  {
-//      DWARFDebugLine::Row::const_iterator pos;
-//      Row::const_iterator end = state_coll.end();
-//      bool default_is_stmt = prologue->default_is_stmt;
-//      const DWARFDebugLine::Row reset_state(default_is_stmt);
-//      const DWARFDebugLine::Row* prev_state = &reset_state;
-//      const int32_t max_line_increment_for_special_opcode =
-//      prologue->MaxLineIncrementForSpecialOpcode();
-//      for (pos = state_coll.begin(); pos != end; ++pos)
-//      {
-//          const DWARFDebugLine::Row& curr_state = *pos;
-//          int32_t line_increment  = 0;
-//          dw_addr_t addr_offset   = curr_state.address - prev_state->address;
-//          dw_addr_t addr_advance  = (addr_offset) / prologue->min_inst_length;
-//          line_increment = (int32_t)(curr_state.line - prev_state->line);
-//
-//          // If our previous state was the reset state, then let's emit the
-//          // address to keep GDB's DWARF parser happy. If we don't start each
-//          // sequence with a DW_LNE_set_address opcode, the line table won't
-//          // get slid properly in GDB.
-//
-//          if (prev_state == &reset_state)
-//          {
-//              debug_line_data.Append8(0); // Extended opcode
-//              debug_line_data.Append32_as_ULEB128(addr_size + 1); // Length of
-//              opcode bytes
-//              debug_line_data.Append8(DW_LNE_set_address);
-//              debug_line_data.AppendMax64(curr_state.address, addr_size);
-//              addr_advance = 0;
-//          }
-//
-//          if (prev_state->file != curr_state.file)
-//          {
-//              debug_line_data.Append8(DW_LNS_set_file);
-//              debug_line_data.Append32_as_ULEB128(curr_state.file);
-//          }
-//
-//          if (prev_state->column != curr_state.column)
-//          {
-//              debug_line_data.Append8(DW_LNS_set_column);
-//              debug_line_data.Append32_as_ULEB128(curr_state.column);
-//          }
-//
-//          // Don't do anything fancy if we are at the end of a sequence
-//          // as we don't want to push any extra rows since the
-//          DW_LNE_end_sequence
-//          // will push a row itself!
-//          if (curr_state.end_sequence)
-//          {
-//              if (line_increment != 0)
-//              {
-//                  debug_line_data.Append8(DW_LNS_advance_line);
-//                  debug_line_data.Append32_as_SLEB128(line_increment);
-//              }
-//
-//              if (addr_advance > 0)
-//              {
-//                  debug_line_data.Append8(DW_LNS_advance_pc);
-//                  debug_line_data.Append32_as_ULEB128(addr_advance);
-//              }
-//
-//              // Now push the end sequence on!
-//              debug_line_data.Append8(0);
-//              debug_line_data.Append8(1);
-//              debug_line_data.Append8(DW_LNE_end_sequence);
-//
-//              prev_state = &reset_state;
-//          }
-//          else
-//          {
-//              if (line_increment || addr_advance)
-//              {
-//                  if (line_increment > max_line_increment_for_special_opcode)
-//                  {
-//                      debug_line_data.Append8(DW_LNS_advance_line);
-//                      debug_line_data.Append32_as_SLEB128(line_increment);
-//                      line_increment = 0;
-//                  }
-//
-//                  uint32_t special_opcode = (line_increment >=
-//                  prologue->line_base) ? ((line_increment -
-//                  prologue->line_base) + (prologue->line_range * addr_advance)
-//                  + prologue->opcode_base) : 256;
-//                  if (special_opcode > 255)
-//                  {
-//                      // Both the address and line won't fit in one special
-//                      opcode
-//                      // check to see if just the line advance will?
-//                      uint32_t special_opcode_line = ((line_increment >=
-//                      prologue->line_base) && (line_increment != 0)) ?
-//                              ((line_increment - prologue->line_base) +
-//                              prologue->opcode_base) : 256;
-//
-//
-//                      if (special_opcode_line > 255)
-//                      {
-//                          // Nope, the line advance won't fit by itself, check
-//                          the address increment by itself
-//                          uint32_t special_opcode_addr = addr_advance ?
-//                              ((0 - prologue->line_base) +
-//                              (prologue->line_range * addr_advance) +
-//                              prologue->opcode_base) : 256;
-//
-//                          if (special_opcode_addr > 255)
-//                          {
-//                              // Neither the address nor the line will fit in
-//                              a
-//                              // special opcode, we must manually enter both
-//                              then
-//                              // do a DW_LNS_copy to push a row (special
-//                              opcode
-//                              // automatically imply a new row is pushed)
-//                              if (line_increment != 0)
-//                              {
-//                                  debug_line_data.Append8(DW_LNS_advance_line);
-//                                  debug_line_data.Append32_as_SLEB128(line_increment);
-//                              }
-//
-//                              if (addr_advance > 0)
-//                              {
-//                                  debug_line_data.Append8(DW_LNS_advance_pc);
-//                                  debug_line_data.Append32_as_ULEB128(addr_advance);
-//                              }
-//
-//                              // Now push a row onto the line table manually
-//                              debug_line_data.Append8(DW_LNS_copy);
-//
-//                          }
-//                          else
-//                          {
-//                              // The address increment alone will fit into a
-//                              special opcode
-//                              // so modify our line change, then issue a
-//                              special opcode
-//                              // for the address increment and it will push a
-//                              row into the
-//                              // line table
-//                              if (line_increment != 0)
-//                              {
-//                                  debug_line_data.Append8(DW_LNS_advance_line);
-//                                  debug_line_data.Append32_as_SLEB128(line_increment);
-//                              }
-//
-//                              // Advance of line and address will fit into a
-//                              single byte special opcode
-//                              // and this will also push a row onto the line
-//                              table
-//                              debug_line_data.Append8(special_opcode_addr);
-//                          }
-//                      }
-//                      else
-//                      {
-//                          // The line change alone will fit into a special
-//                          opcode
-//                          // so modify our address increment first, then issue
-//                          a
-//                          // special opcode for the line change and it will
-//                          push
-//                          // a row into the line table
-//                          if (addr_advance > 0)
-//                          {
-//                              debug_line_data.Append8(DW_LNS_advance_pc);
-//                              debug_line_data.Append32_as_ULEB128(addr_advance);
-//                          }
-//
-//                          // Advance of line and address will fit into a
-//                          single byte special opcode
-//                          // and this will also push a row onto the line table
-//                          debug_line_data.Append8(special_opcode_line);
-//                      }
-//                  }
-//                  else
-//                  {
-//                      // Advance of line and address will fit into a single
-//                      byte special opcode
-//                      // and this will also push a row onto the line table
-//                      debug_line_data.Append8(special_opcode);
-//                  }
-//              }
-//              prev_state = &curr_state;
-//          }
-//      }
-//  }
-//}
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
deleted file mode 100644
index 0d236ca..0000000
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.h
+++ /dev/null
@@ -1,227 +0,0 @@
-//===-- DWARFDebugLine.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef SymbolFileDWARF_DWARFDebugLine_h_
-#define SymbolFileDWARF_DWARFDebugLine_h_
-
-#include <map>
-#include <string>
-#include <vector>
-
-#include "lldb/Utility/FileSpec.h"
-#include "lldb/lldb-private.h"
-
-#include "DWARFDataExtractor.h"
-#include "DWARFDefines.h"
-
-#include "llvm/Support/MD5.h"
-
-class DWARFUnit;
-class SymbolFileDWARF;
-
-// DWARFDebugLine
-class DWARFDebugLine {
-public:
-  // FileNameEntry
-  struct FileNameEntry {
-    FileNameEntry()
-        : name(nullptr), dir_idx(0), mod_time(0), length(0), checksum() {}
-
-    const char *name;
-    dw_sleb128_t dir_idx;
-    dw_sleb128_t mod_time;
-    dw_sleb128_t length;
-    llvm::MD5::MD5Result checksum;
-  };
-
-  // Prologue
-  struct Prologue {
-
-    Prologue()
-        : total_length(0), version(0), prologue_length(0), min_inst_length(0),
-          default_is_stmt(0), line_base(0), line_range(0), opcode_base(0),
-          standard_opcode_lengths(), include_directories(), file_names() {}
-
-    typedef std::shared_ptr<Prologue> shared_ptr;
-
-    uint32_t total_length; // The size in bytes of the statement information for
-                           // this compilation unit (not including the
-                           // total_length field itself).
-    uint16_t
-        version; // Version identifier for the statement information format.
-
-    uint8_t address_size;
-    uint8_t segment_selector_size;
-
-    uint32_t prologue_length; // The number of bytes following the
-                              // prologue_length field to the beginning of the
-                              // first byte of the statement program itself.
-    uint8_t min_inst_length; // The size in bytes of the smallest target machine
-                             // instruction. Statement program opcodes that
-                             // alter the address register first multiply their
-                             // operands by this value.
-    uint8_t maximum_operations_per_instruction; // New in DWARF4. The maximum
-                                                // number of individual
-                                                // operations that may be
-                                                // encoded in an instruction.
-    uint8_t default_is_stmt; // The initial value of theis_stmtregister.
-    int8_t line_base;    // This parameter affects the meaning of the special
-                         // opcodes. See below.
-    uint8_t line_range;  // This parameter affects the meaning of the special
-                         // opcodes. See below.
-    uint8_t opcode_base; // The number assigned to the first special opcode.
-    std::vector<uint8_t> standard_opcode_lengths;
-    std::vector<const char *> include_directories;
-    std::vector<FileNameEntry> file_names;
-
-    int32_t MaxLineIncrementForSpecialOpcode() const {
-      return line_base + (int8_t)line_range - 1;
-    }
-    bool IsValid() const;
-    //      void Append(BinaryStreamBuf& buff) const;
-    void Dump(lldb_private::Log *log);
-    void Clear() {
-      total_length = version = prologue_length = min_inst_length = line_base =
-          line_range = opcode_base = 0;
-      line_base = 0;
-      standard_opcode_lengths.clear();
-      include_directories.clear();
-      file_names.clear();
-    }
-    bool GetFile(uint32_t file_idx, const lldb_private::FileSpec &cu_comp_dir,
-                 lldb_private::FileSpec::Style style,
-                 lldb_private::FileSpec &file) const;
-  };
-
-  // Standard .debug_line state machine structure
-  struct Row {
-    typedef std::vector<Row> collection;
-    typedef collection::iterator iterator;
-    typedef collection::const_iterator const_iterator;
-
-    Row(bool default_is_stmt = false);
-    virtual ~Row() {}
-    void PostAppend();
-    void Reset(bool default_is_stmt);
-    void Dump(lldb_private::Log *log) const;
-    static void Insert(Row::collection &state_coll, const Row &state);
-
-    dw_addr_t address; // The program-counter value corresponding to a machine
-                       // instruction generated by the compiler.
-    uint32_t line; // An unsigned integer indicating a source line number. Lines
-                   // are numbered beginning at 1. The compiler may emit the
-                   // value 0 in cases where an instruction cannot be attributed
-                   // to any source line.
-    uint16_t column; // An unsigned integer indicating a column number within a
-                     // source line. Columns are numbered beginning at 1. The
-                     // value 0 is reserved to indicate that a statement begins
-                     // at the 'left edge' of the line.
-    uint16_t file; // An unsigned integer indicating the identity of the source
-                   // file corresponding to a machine instruction.
-    uint8_t is_stmt : 1, // A boolean indicating that the current instruction is
-                         // the beginning of a statement.
-        basic_block : 1, // A boolean indicating that the current instruction is
-                         // the beginning of a basic block.
-        end_sequence : 1, // A boolean indicating that the current address is
-                          // that of the first byte after the end of a sequence
-                          // of target machine instructions.
-        prologue_end : 1, // A boolean indicating that the current address is
-                          // one (of possibly many) where execution should be
-                          // suspended for an entry breakpoint of a function.
-        epilogue_begin : 1; // A boolean indicating that the current address is
-                            // one (of possibly many) where execution should be
-                            // suspended for an exit breakpoint of a function.
-    uint32_t isa; // An unsigned integer whose value encodes the applicable
-                  // instruction set architecture for the current instruction.
-  };
-
-  // LineTable
-  struct LineTable {
-    typedef std::shared_ptr<LineTable> shared_ptr;
-
-    LineTable() : prologue(), rows() {}
-
-    void AppendRow(const DWARFDebugLine::Row &state);
-    void Clear() {
-      prologue.reset();
-      rows.clear();
-    }
-
-    uint32_t LookupAddress(dw_addr_t address, dw_addr_t cu_high_pc) const;
-
-    Prologue::shared_ptr prologue;
-    Row::collection rows;
-  };
-
-  // State
-  struct State : public Row {
-    typedef void (*Callback)(dw_offset_t offset, const State &state,
-                             void *userData);
-
-    // Special row codes used when calling the callback
-    enum { StartParsingLineTable = 0, DoneParsingLineTable = -1 };
-
-    State(Prologue::shared_ptr &prologue_sp, lldb_private::Log *log,
-          Callback callback, void *userData);
-
-    void AppendRowToMatrix(dw_offset_t offset);
-
-    void Finalize(dw_offset_t offset);
-
-    void Reset();
-
-    Prologue::shared_ptr prologue;
-    lldb_private::Log *log;
-    Callback callback; // Callback function that gets called each time an entry
-                       // is to be added to the matrix
-    void *callbackUserData;
-    int row; // The row number that starts at zero for the prologue, and
-             // increases for each row added to the matrix
-  private:
-    DISALLOW_COPY_AND_ASSIGN(State);
-  };
-
-  static bool
-  ParseSupportFiles(const lldb::ModuleSP &module_sp,
-                    const lldb_private::DWARFDataExtractor &debug_line_data,
-                    dw_offset_t stmt_list,
-                    lldb_private::FileSpecList &support_files,
-                    DWARFUnit *dwarf_cu);
-  static bool
-  ParsePrologue(const lldb_private::DWARFDataExtractor &debug_line_data,
-                lldb::offset_t *offset_ptr, Prologue *prologue,
-                DWARFUnit *dwarf_cu = nullptr);
-  static bool
-  ParseStatementTable(const lldb_private::DWARFDataExtractor &debug_line_data,
-                      lldb::offset_t *offset_ptr, State::Callback callback,
-                      void *userData, DWARFUnit *dwarf_cu);
-  static bool
-  ParseStatementTable(const lldb_private::DWARFDataExtractor &debug_line_data,
-                      lldb::offset_t *offset_ptr, LineTable *line_table,
-                      DWARFUnit *dwarf_cu);
-  static void Parse(const lldb_private::DWARFDataExtractor &debug_line_data,
-                    DWARFDebugLine::State::Callback callback, void *userData);
-  //  static void AppendLineTableData(const DWARFDebugLine::Prologue* prologue,
-  //  const DWARFDebugLine::Row::collection& state_coll, const uint32_t
-  //  addr_size, BinaryStreamBuf &debug_line_data);
-
-  DWARFDebugLine() : m_lineTableMap() {}
-
-  void Parse(const lldb_private::DWARFDataExtractor &debug_line_data);
-  void ParseIfNeeded(const lldb_private::DWARFDataExtractor &debug_line_data);
-  LineTable::shared_ptr GetLineTable(const dw_offset_t offset) const;
-
-protected:
-  typedef std::map<dw_offset_t, LineTable::shared_ptr> LineTableMap;
-  typedef LineTableMap::iterator LineTableIter;
-  typedef LineTableMap::const_iterator LineTableConstIter;
-
-  LineTableMap m_lineTableMap;
-};
-
-#endif // SymbolFileDWARF_DWARFDebugLine_h_
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
index 207c712..6c07400 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.cpp
@@ -95,13 +95,15 @@
     } else if (begin == LLDB_INVALID_ADDRESS) {
       // A base address selection entry
       base_addr = end;
-      s.Address(base_addr, sizeof(dw_addr_t), " Base address = ");
+      DumpAddress(s.AsRawOstream(), base_addr, sizeof(dw_addr_t),
+                  " Base address = ");
     } else {
       // Convert from offset to an address
       dw_addr_t begin_addr = begin + base_addr;
       dw_addr_t end_addr = end + base_addr;
 
-      s.AddressRange(begin_addr, end_addr, sizeof(dw_addr_t), nullptr);
+      DumpAddressRange(s.AsRawOstream(), begin_addr, end_addr,
+                       sizeof(dw_addr_t), nullptr);
     }
   }
 }
@@ -122,169 +124,3 @@
   }
   return false;
 }
-
-uint64_t DWARFDebugRanges::GetOffset(size_t Index) const {
-  lldbassert(false && "DW_FORM_rnglistx is not present before DWARF5");
-  return 0;
-}
-
-bool DWARFDebugRngLists::ExtractRangeList(
-    const DWARFDataExtractor &data, uint8_t addrSize,
-    lldb::offset_t *offset_ptr, std::vector<RngListEntry> &rangeList) {
-  rangeList.clear();
-
-  bool error = false;
-  while (!error) {
-    switch (data.GetU8(offset_ptr)) {
-    case DW_RLE_end_of_list:
-      return true;
-
-    case DW_RLE_start_length: {
-      dw_addr_t begin = data.GetMaxU64(offset_ptr, addrSize);
-      dw_addr_t len = data.GetULEB128(offset_ptr);
-      rangeList.push_back({DW_RLE_start_length, begin, len});
-      break;
-    }
-
-    case DW_RLE_start_end: {
-      dw_addr_t begin = data.GetMaxU64(offset_ptr, addrSize);
-      dw_addr_t end = data.GetMaxU64(offset_ptr, addrSize);
-      rangeList.push_back({DW_RLE_start_end, begin, end});
-      break;
-    }
-
-    case DW_RLE_base_address: {
-      dw_addr_t base = data.GetMaxU64(offset_ptr, addrSize);
-      rangeList.push_back({DW_RLE_base_address, base, 0});
-      break;
-    }
-
-    case DW_RLE_offset_pair: {
-      dw_addr_t begin = data.GetULEB128(offset_ptr);
-      dw_addr_t end = data.GetULEB128(offset_ptr);
-      rangeList.push_back({DW_RLE_offset_pair, begin, end});
-      break;
-    }
-
-    case DW_RLE_base_addressx: {
-      dw_addr_t base = data.GetULEB128(offset_ptr);
-      rangeList.push_back({DW_RLE_base_addressx, base, 0});
-      break;
-    }
-
-    case DW_RLE_startx_endx: {
-      dw_addr_t start = data.GetULEB128(offset_ptr);
-      dw_addr_t end = data.GetULEB128(offset_ptr);
-      rangeList.push_back({DW_RLE_startx_endx, start, end});
-      break;
-    }
-
-    case DW_RLE_startx_length: {
-      dw_addr_t start = data.GetULEB128(offset_ptr);
-      dw_addr_t length = data.GetULEB128(offset_ptr);
-      rangeList.push_back({DW_RLE_startx_length, start, length});
-      break;
-    }
-
-    default:
-      lldbassert(0 && "unknown range list entry encoding");
-      error = true;
-    }
-  }
-
-  return false;
-}
-
-static uint64_t ReadAddressFromDebugAddrSection(const DWARFUnit *cu,
-                                                uint32_t index) {
-  uint32_t index_size = cu->GetAddressByteSize();
-  dw_offset_t addr_base = cu->GetAddrBase();
-  lldb::offset_t offset = addr_base + index * index_size;
-  return cu->GetSymbolFileDWARF()
-      .GetDWARFContext()
-      .getOrLoadAddrData()
-      .GetMaxU64(&offset, index_size);
-}
-
-bool DWARFDebugRngLists::FindRanges(const DWARFUnit *cu,
-                                    dw_offset_t debug_ranges_offset,
-                                    DWARFRangeList &range_list) const {
-  range_list.Clear();
-  dw_addr_t debug_ranges_address = cu->GetRangesBase() + debug_ranges_offset;
-  auto pos = m_range_map.find(debug_ranges_address);
-  if (pos != m_range_map.end()) {
-    dw_addr_t BaseAddr = cu->GetBaseAddress();
-    for (const RngListEntry &E : pos->second) {
-      switch (E.encoding) {
-      case DW_RLE_start_length:
-        range_list.Append(DWARFRangeList::Entry(E.value0, E.value1));
-        break;
-      case DW_RLE_base_address:
-        BaseAddr = E.value0;
-        break;
-      case DW_RLE_start_end:
-        range_list.Append(DWARFRangeList::Entry(E.value0, E.value1 - E.value0));
-        break;
-      case DW_RLE_offset_pair:
-        range_list.Append(
-            DWARFRangeList::Entry(BaseAddr + E.value0, E.value1 - E.value0));
-        break;
-      case DW_RLE_base_addressx: {
-        BaseAddr = ReadAddressFromDebugAddrSection(cu, E.value0);
-        break;
-      }
-      case DW_RLE_startx_endx: {
-        dw_addr_t start = ReadAddressFromDebugAddrSection(cu, E.value0);
-        dw_addr_t end = ReadAddressFromDebugAddrSection(cu, E.value1);
-        range_list.Append(DWARFRangeList::Entry(start, end - start));
-        break;
-      }
-      case DW_RLE_startx_length: {
-        dw_addr_t start = ReadAddressFromDebugAddrSection(cu, E.value0);
-        range_list.Append(DWARFRangeList::Entry(start, E.value1));
-        break;
-      }
-      default:
-        llvm_unreachable("unexpected encoding");
-      }
-    }
-    return true;
-  }
-  return false;
-}
-
-void DWARFDebugRngLists::Extract(DWARFContext &context) {
-  const DWARFDataExtractor &data = context.getOrLoadRngListsData();
-  lldb::offset_t offset = 0;
-
-  uint64_t length = data.GetU32(&offset);
-  // FIXME: Handle DWARF64.
-  lldb::offset_t end = offset + length;
-
-  // Check version.
-  if (data.GetU16(&offset) < 5)
-    return;
-
-  uint8_t addrSize = data.GetU8(&offset);
-
-  // We do not support non-zero segment selector size.
-  if (data.GetU8(&offset) != 0) {
-    lldbassert(0 && "not implemented");
-    return;
-  }
-
-  uint32_t offsetsAmount = data.GetU32(&offset);
-  for (uint32_t i = 0; i < offsetsAmount; ++i)
-    Offsets.push_back(data.GetMaxU64(&offset, 4));
-
-  lldb::offset_t listOffset = offset;
-  std::vector<RngListEntry> rangeList;
-  while (offset < end && ExtractRangeList(data, addrSize, &offset, rangeList)) {
-    m_range_map[listOffset] = rangeList;
-    listOffset = offset;
-  }
-}
-
-uint64_t DWARFDebugRngLists::GetOffset(size_t Index) const {
-  return Offsets[Index];
-}
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
index baf2667..1888a77 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugRanges.h
@@ -17,24 +17,13 @@
 class DWARFContext;
 }
 
-class DWARFDebugRangesBase {
-public:
-  virtual ~DWARFDebugRangesBase(){};
-
-  virtual void Extract(lldb_private::DWARFContext &context) = 0;
-  virtual bool FindRanges(const DWARFUnit *cu, dw_offset_t debug_ranges_offset,
-                          DWARFRangeList &range_list) const = 0;
-  virtual uint64_t GetOffset(size_t Index) const = 0;
-};
-
-class DWARFDebugRanges final : public DWARFDebugRangesBase {
+class DWARFDebugRanges {
 public:
   DWARFDebugRanges();
 
-  void Extract(lldb_private::DWARFContext &context) override;
+  void Extract(lldb_private::DWARFContext &context);
   bool FindRanges(const DWARFUnit *cu, dw_offset_t debug_ranges_offset,
-                  DWARFRangeList &range_list) const override;
-  uint64_t GetOffset(size_t Index) const override;
+                  DWARFRangeList &range_list) const;
 
   static void Dump(lldb_private::Stream &s,
                    const lldb_private::DWARFDataExtractor &debug_ranges_data,
@@ -50,27 +39,4 @@
   range_map m_range_map;
 };
 
-// DWARF v5 .debug_rnglists section.
-class DWARFDebugRngLists final : public DWARFDebugRangesBase {
-  struct RngListEntry {
-    uint8_t encoding;
-    uint64_t value0;
-    uint64_t value1;
-  };
-
-public:
-  void Extract(lldb_private::DWARFContext &context) override;
-  bool FindRanges(const DWARFUnit *cu, dw_offset_t debug_ranges_offset,
-                  DWARFRangeList &range_list) const override;
-  uint64_t GetOffset(size_t Index) const override;
-
-protected:
-  bool ExtractRangeList(const lldb_private::DWARFDataExtractor &data,
-                        uint8_t addrSize, lldb::offset_t *offset_ptr,
-                        std::vector<RngListEntry> &list);
-
-  std::vector<uint64_t> Offsets;
-  std::map<dw_offset_t, std::vector<RngListEntry>> m_range_map;
-};
-
 #endif // SymbolFileDWARF_DWARFDebugRanges_h_
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h
index d0d70dd..348b334 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h
@@ -23,7 +23,7 @@
 class DWARFDeclContext {
 public:
   struct Entry {
-    Entry() : tag(0), name(nullptr) {}
+    Entry() : tag(llvm::dwarf::DW_TAG_null), name(nullptr) {}
     Entry(dw_tag_t t, const char *n) : tag(t), name(n) {}
 
     bool NameMatches(const Entry &rhs) const {
@@ -63,7 +63,7 @@
 
   const char *GetQualifiedName() const;
 
-  // Same as GetQaulifiedName, but the life time of the returned string will
+  // Same as GetQualifiedName, but the life time of the returned string will
   // be that of the LLDB session.
   lldb_private::ConstString GetQualifiedNameAsConstString() const {
     return lldb_private::ConstString(GetQualifiedName());
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp
index 3bf0bb0..2ae1bbc 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.cpp
@@ -59,6 +59,8 @@
 }
 
 DRC_class DW_OP_value_to_class(uint32_t val) {
+  // FIXME: If we just used llvm's DWARFExpression printer, we could delete
+  // all this code (and more in lldb's DWARFExpression.cpp).
   switch (val) {
   case 0x03:
     return DRC_ONEOPERAND;
@@ -358,6 +360,8 @@
     return DRC_DWARFv3 | DRC_ONEOPERAND;
   case 0x9a:
     return DRC_DWARFv3 | DRC_ONEOPERAND;
+  case 0xa3: /* DW_OP_entry_value */
+    return DRC_TWOOPERANDS;
   case 0xf0:
     return DRC_ZEROOPERANDS; /* DW_OP_APPLE_uninit */
   case 0xe0:
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
index 046ae67..f660cc3 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
@@ -107,6 +107,7 @@
       m_value.value.uval = data.GetU64(offset_ptr);
       break;
     case DW_FORM_addrx:
+    case DW_FORM_loclistx:
     case DW_FORM_rnglistx:
     case DW_FORM_strx:
     case DW_FORM_udata:
@@ -305,6 +306,7 @@
 
     // signed or unsigned LEB 128 values
     case DW_FORM_addrx:
+    case DW_FORM_loclistx:
     case DW_FORM_rnglistx:
     case DW_FORM_sdata:
     case DW_FORM_udata:
@@ -333,7 +335,7 @@
 
   switch (m_form) {
   case DW_FORM_addr:
-    s.Address(uvalue, sizeof(uint64_t));
+    DumpAddress(s.AsRawOstream(), uvalue, sizeof(uint64_t));
     break;
   case DW_FORM_flag:
   case DW_FORM_data1:
@@ -409,10 +411,11 @@
     assert(m_unit); // Unit must be valid for DW_FORM_ref_addr objects or we
                     // will get this wrong
     if (m_unit->GetVersion() <= 2)
-      s.Address(uvalue, sizeof(uint64_t) * 2);
+      DumpAddress(s.AsRawOstream(), uvalue, sizeof(uint64_t) * 2);
     else
-      s.Address(uvalue, 4 * 2); // 4 for DWARF32, 8 for DWARF64, but we don't
-                                // support DWARF64 yet
+      DumpAddress(s.AsRawOstream(), uvalue,
+                  4 * 2); // 4 for DWARF32, 8 for DWARF64, but we don't
+                          // support DWARF64 yet
     break;
   }
   case DW_FORM_ref1:
@@ -599,105 +602,11 @@
   return false;
 }
 
-int DWARFFormValue::Compare(const DWARFFormValue &a_value,
-                            const DWARFFormValue &b_value) {
-  dw_form_t a_form = a_value.Form();
-  dw_form_t b_form = b_value.Form();
-  if (a_form < b_form)
-    return -1;
-  if (a_form > b_form)
-    return 1;
-  switch (a_form) {
-  case DW_FORM_addr:
-  case DW_FORM_addrx:
-  case DW_FORM_flag:
-  case DW_FORM_data1:
-  case DW_FORM_data2:
-  case DW_FORM_data4:
-  case DW_FORM_data8:
-  case DW_FORM_udata:
-  case DW_FORM_ref_addr:
-  case DW_FORM_sec_offset:
-  case DW_FORM_flag_present:
-  case DW_FORM_ref_sig8:
-  case DW_FORM_GNU_addr_index: {
-    uint64_t a = a_value.Unsigned();
-    uint64_t b = b_value.Unsigned();
-    if (a < b)
-      return -1;
-    if (a > b)
-      return 1;
-    return 0;
-  }
-
-  case DW_FORM_sdata: {
-    int64_t a = a_value.Signed();
-    int64_t b = b_value.Signed();
-    if (a < b)
-      return -1;
-    if (a > b)
-      return 1;
-    return 0;
-  }
-
-  case DW_FORM_string:
-  case DW_FORM_strp:
-  case DW_FORM_GNU_str_index: {
-    const char *a_string = a_value.AsCString();
-    const char *b_string = b_value.AsCString();
-    if (a_string == b_string)
-      return 0;
-    else if (a_string && b_string)
-      return strcmp(a_string, b_string);
-    else if (a_string == nullptr)
-      return -1; // A string is NULL, and B is valid
-    else
-      return 1; // A string valid, and B is NULL
-  }
-
-  case DW_FORM_block:
-  case DW_FORM_block1:
-  case DW_FORM_block2:
-  case DW_FORM_block4:
-  case DW_FORM_exprloc: {
-    uint64_t a_len = a_value.Unsigned();
-    uint64_t b_len = b_value.Unsigned();
-    if (a_len < b_len)
-      return -1;
-    if (a_len > b_len)
-      return 1;
-    // The block lengths are the same
-    return memcmp(a_value.BlockData(), b_value.BlockData(), a_value.Unsigned());
-  } break;
-
-  case DW_FORM_ref1:
-  case DW_FORM_ref2:
-  case DW_FORM_ref4:
-  case DW_FORM_ref8:
-  case DW_FORM_ref_udata: {
-    uint64_t a = a_value.m_value.value.uval;
-    uint64_t b = b_value.m_value.value.uval;
-    if (a < b)
-      return -1;
-    if (a > b)
-      return 1;
-    return 0;
-  }
-
-  case DW_FORM_indirect:
-    llvm_unreachable(
-        "This shouldn't happen after the form has been extracted...");
-
-  default:
-    llvm_unreachable("Unhandled DW_FORM");
-  }
-  return -1;
-}
-
 bool DWARFFormValue::FormIsSupported(dw_form_t form) {
   switch (form) {
     case DW_FORM_addr:
     case DW_FORM_addrx:
+    case DW_FORM_loclistx:
     case DW_FORM_rnglistx:
     case DW_FORM_block2:
     case DW_FORM_block4:
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.h
index 6ff73ec..8967509 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFTypeUnit.h
@@ -28,8 +28,8 @@
   DWARFTypeUnit(SymbolFileDWARF &dwarf, lldb::user_id_t uid,
                 const DWARFUnitHeader &header,
                 const DWARFAbbreviationDeclarationSet &abbrevs,
-                DIERef::Section section)
-      : DWARFUnit(dwarf, uid, header, abbrevs, section) {}
+                DIERef::Section section, bool is_dwo)
+      : DWARFUnit(dwarf, uid, header, abbrevs, section, is_dwo) {}
 
   friend class DWARFUnit;
 };
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
index 33e83d1..22e3e40 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
@@ -32,9 +32,9 @@
 DWARFUnit::DWARFUnit(SymbolFileDWARF &dwarf, lldb::user_id_t uid,
                      const DWARFUnitHeader &header,
                      const DWARFAbbreviationDeclarationSet &abbrevs,
-                     DIERef::Section section)
+                     DIERef::Section section, bool is_dwo)
     : UserID(uid), m_dwarf(dwarf), m_header(header), m_abbrevs(&abbrevs),
-      m_cancel_scopes(false), m_section(section) {}
+      m_cancel_scopes(false), m_section(section), m_is_dwo(is_dwo) {}
 
 DWARFUnit::~DWARFUnit() = default;
 
@@ -287,15 +287,27 @@
 
   DWARFAttributes attributes;
   size_t num_attributes = cu_die.GetAttributes(this, attributes);
+
+  // Extract DW_AT_addr_base first, as other attributes may need it.
+  for (size_t i = 0; i < num_attributes; ++i) {
+    if (attributes.AttributeAtIndex(i) != DW_AT_addr_base)
+      continue;
+    DWARFFormValue form_value;
+    if (attributes.ExtractFormValueAtIndex(i, form_value)) {
+      addr_base = form_value.Unsigned();
+      SetAddrBase(*addr_base);
+      break;
+    }
+  }
+
   for (size_t i = 0; i < num_attributes; ++i) {
     dw_attr_t attr = attributes.AttributeAtIndex(i);
     DWARFFormValue form_value;
     if (!attributes.ExtractFormValueAtIndex(i, form_value))
       continue;
     switch (attr) {
-    case DW_AT_addr_base:
-      addr_base = form_value.Unsigned();
-      SetAddrBase(*addr_base);
+    case DW_AT_loclists_base:
+      SetLoclistsBase(form_value.Unsigned());
       break;
     case DW_AT_rnglists_base:
       ranges_base = form_value.Unsigned();
@@ -324,6 +336,9 @@
     }
   }
 
+  if (m_is_dwo)
+    return;
+
   std::unique_ptr<SymbolFileDWARFDwo> dwo_symbol_file =
       m_dwarf.GetDwoSymbolFileForCompileUnit(*this, cu_die);
   if (!dwo_symbol_file)
@@ -358,10 +373,18 @@
   else if (gnu_addr_base)
     dwo_cu->SetAddrBase(*gnu_addr_base);
 
-  if (ranges_base)
-    dwo_cu->SetRangesBase(*ranges_base);
-  else if (gnu_ranges_base)
+  if (GetVersion() <= 4 && gnu_ranges_base)
     dwo_cu->SetRangesBase(*gnu_ranges_base);
+  else if (m_dwo_symbol_file->GetDWARFContext()
+               .getOrLoadRngListsData()
+               .GetByteSize() > 0)
+    dwo_cu->SetRangesBase(llvm::DWARFListTableHeader::getHeaderSize(DWARF32));
+
+  if (GetVersion() >= 5 && m_dwo_symbol_file->GetDWARFContext()
+                                   .getOrLoadLocListsData()
+                                   .GetByteSize() > 0)
+    dwo_cu->SetLoclistsBase(llvm::DWARFListTableHeader::getHeaderSize(DWARF32));
+  dwo_cu->SetBaseAddress(GetBaseAddress());
 
   for (size_t i = 0; i < m_dwo_symbol_file->DebugInfo()->GetNumUnits(); ++i) {
     DWARFUnit *unit = m_dwo_symbol_file->DebugInfo()->GetUnitAtIndex(i);
@@ -380,24 +403,6 @@
   return DWARFDIE();
 }
 
-size_t DWARFUnit::AppendDIEsWithTag(const dw_tag_t tag,
-                                    std::vector<DWARFDIE> &dies,
-                                    uint32_t depth) const {
-  size_t old_size = dies.size();
-  {
-    llvm::sys::ScopedReader lock(m_die_array_mutex);
-    DWARFDebugInfoEntry::const_iterator pos;
-    DWARFDebugInfoEntry::const_iterator end = m_die_array.end();
-    for (pos = m_die_array.begin(); pos != end; ++pos) {
-      if (pos->Tag() == tag)
-        dies.emplace_back(this, &(*pos));
-    }
-  }
-
-  // Return the number of DIEs added to the collection
-  return dies.size() - old_size;
-}
-
 size_t DWARFUnit::GetDebugInfoSize() const {
   return GetLengthByteSize() + GetLength() - GetHeaderByteSize();
 }
@@ -417,8 +422,79 @@
 
 void DWARFUnit::SetAddrBase(dw_addr_t addr_base) { m_addr_base = addr_base; }
 
+// Parse the rangelist table header, including the optional array of offsets
+// following it (DWARF v5 and later).
+template <typename ListTableType>
+static llvm::Expected<ListTableType>
+ParseListTableHeader(const llvm::DWARFDataExtractor &data, uint64_t offset,
+                     DwarfFormat format) {
+  // We are expected to be called with Offset 0 or pointing just past the table
+  // header. Correct Offset in the latter case so that it points to the start
+  // of the header.
+  if (offset > 0) {
+    uint64_t HeaderSize = llvm::DWARFListTableHeader::getHeaderSize(format);
+    if (offset < HeaderSize)
+      return llvm::createStringError(errc::invalid_argument,
+                                     "did not detect a valid"
+                                     " list table with base = 0x%" PRIx64 "\n",
+                                     offset);
+    offset -= HeaderSize;
+  }
+  ListTableType Table;
+  if (llvm::Error E = Table.extractHeaderAndOffsets(data, &offset))
+    return std::move(E);
+  return Table;
+}
+
+void DWARFUnit::SetLoclistsBase(dw_addr_t loclists_base) {
+  m_loclists_base = loclists_base;
+
+  uint64_t header_size = llvm::DWARFListTableHeader::getHeaderSize(DWARF32);
+  if (loclists_base < header_size)
+    return;
+
+  m_loclist_table_header.emplace(".debug_loclists", "locations");
+  uint64_t offset = loclists_base - header_size;
+  if (llvm::Error E = m_loclist_table_header->extract(
+          m_dwarf.GetDWARFContext().getOrLoadLocListsData().GetAsLLVM(),
+          &offset)) {
+    GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError(
+        "Failed to extract location list table at offset 0x%" PRIx64 ": %s",
+        loclists_base, toString(std::move(E)).c_str());
+  }
+}
+
+std::unique_ptr<llvm::DWARFLocationTable>
+DWARFUnit::GetLocationTable(const DataExtractor &data) const {
+  llvm::DWARFDataExtractor llvm_data(
+      toStringRef(data.GetData()),
+      data.GetByteOrder() == lldb::eByteOrderLittle, data.GetAddressByteSize());
+
+  if (m_is_dwo || GetVersion() >= 5)
+    return std::make_unique<llvm::DWARFDebugLoclists>(llvm_data, GetVersion());
+  return std::make_unique<llvm::DWARFDebugLoc>(llvm_data);
+}
+
+const DWARFDataExtractor &DWARFUnit::GetLocationData() const {
+  DWARFContext &Ctx = GetSymbolFileDWARF().GetDWARFContext();
+  return GetVersion() >= 5 ? Ctx.getOrLoadLocListsData()
+                           : Ctx.getOrLoadLocData();
+}
+
 void DWARFUnit::SetRangesBase(dw_addr_t ranges_base) {
   m_ranges_base = ranges_base;
+
+  if (GetVersion() < 5)
+    return;
+
+  if (auto table_or_error = ParseListTableHeader<llvm::DWARFDebugRnglistTable>(
+          m_dwarf.GetDWARFContext().getOrLoadRngListsData().GetAsLLVM(),
+          ranges_base, DWARF32))
+    m_rnglist_table = std::move(table_or_error.get());
+  else
+    GetSymbolFileDWARF().GetObjectFile()->GetModule()->ReportError(
+        "Failed to extract range list table at offset 0x%" PRIx64 ": %s",
+        ranges_base, toString(table_or_error.takeError()).c_str());
 }
 
 void DWARFUnit::SetStrOffsetsBase(dw_offset_t str_offsets_base) {
@@ -438,7 +514,7 @@
   return m_dwarf.GetObjectFile()->GetByteOrder();
 }
 
-TypeSystem *DWARFUnit::GetTypeSystem() {
+llvm::Expected<TypeSystem &> DWARFUnit::GetTypeSystem() {
   return m_dwarf.GetTypeSystemForLanguage(GetLanguageType());
 }
 
@@ -540,19 +616,15 @@
       } else if (strstr(producer_cstr, "clang")) {
         static RegularExpression g_clang_version_regex(
             llvm::StringRef("clang-([0-9]+)\\.([0-9]+)\\.([0-9]+)"));
-        RegularExpression::Match regex_match(3);
+        llvm::SmallVector<llvm::StringRef, 4> matches;
         if (g_clang_version_regex.Execute(llvm::StringRef(producer_cstr),
-                                          &regex_match)) {
-          std::string str;
-          if (regex_match.GetMatchAtIndex(producer_cstr, 1, str))
-            m_producer_version_major =
-                StringConvert::ToUInt32(str.c_str(), UINT32_MAX, 10);
-          if (regex_match.GetMatchAtIndex(producer_cstr, 2, str))
-            m_producer_version_minor =
-                StringConvert::ToUInt32(str.c_str(), UINT32_MAX, 10);
-          if (regex_match.GetMatchAtIndex(producer_cstr, 3, str))
-            m_producer_version_update =
-                StringConvert::ToUInt32(str.c_str(), UINT32_MAX, 10);
+                                          &matches)) {
+          m_producer_version_major =
+              StringConvert::ToUInt32(matches[1].str().c_str(), UINT32_MAX, 10);
+          m_producer_version_minor =
+              StringConvert::ToUInt32(matches[2].str().c_str(), UINT32_MAX, 10);
+          m_producer_version_update =
+              StringConvert::ToUInt32(matches[3].str().c_str(), UINT32_MAX, 10);
         }
         m_producer = eProducerClang;
       } else if (strstr(producer_cstr, "GNU"))
@@ -650,6 +722,8 @@
 // Remove the host part if present.
 static llvm::StringRef
 removeHostnameFromPathname(llvm::StringRef path_from_dwarf) {
+  if (!path_from_dwarf.contains(':'))
+    return path_from_dwarf;
   llvm::StringRef host, path;
   std::tie(host, path) = path_from_dwarf.split(':');
 
@@ -719,7 +793,8 @@
     m_file_spec->MakeAbsolute(GetCompilationDirectory());
 }
 
-SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile() const {
+SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile() {
+  ExtractUnitDIEIfNeeded();
   return m_dwo_symbol_file.get();
 }
 
@@ -820,11 +895,12 @@
     return llvm::make_error<llvm::object::GenericBinaryError>(
         "No abbrev exists at the specified offset.");
 
+  bool is_dwo = dwarf.GetDWARFContext().isDwo();
   if (expected_header->IsTypeUnit())
-    return DWARFUnitSP(
-        new DWARFTypeUnit(dwarf, uid, *expected_header, *abbrevs, section));
-  return DWARFUnitSP(
-      new DWARFCompileUnit(dwarf, uid, *expected_header, *abbrevs, section));
+    return DWARFUnitSP(new DWARFTypeUnit(dwarf, uid, *expected_header, *abbrevs,
+                                         section, is_dwo));
+  return DWARFUnitSP(new DWARFCompileUnit(dwarf, uid, *expected_header,
+                                          *abbrevs, section, is_dwo));
 }
 
 const lldb_private::DWARFDataExtractor &DWARFUnit::GetData() const {
@@ -849,30 +925,56 @@
 }
 
 llvm::Expected<DWARFRangeList>
-DWARFUnit::FindRnglistFromOffset(dw_offset_t offset) const {
-  const DWARFDebugRangesBase *debug_ranges;
-  llvm::StringRef section;
+DWARFUnit::FindRnglistFromOffset(dw_offset_t offset) {
   if (GetVersion() <= 4) {
-    debug_ranges = m_dwarf.GetDebugRanges();
-    section = "debug_ranges";
-  } else {
-    debug_ranges = m_dwarf.GetDebugRngLists();
-    section = "debug_rnglists";
+    const DWARFDebugRanges *debug_ranges = m_dwarf.GetDebugRanges();
+    if (!debug_ranges)
+      return llvm::make_error<llvm::object::GenericBinaryError>(
+          "No debug_ranges section");
+    DWARFRangeList ranges;
+    debug_ranges->FindRanges(this, offset, ranges);
+    return ranges;
   }
-  if (!debug_ranges)
-    return llvm::make_error<llvm::object::GenericBinaryError>("No " + section +
-                                                              " section");
+
+  if (!m_rnglist_table)
+    return llvm::createStringError(errc::invalid_argument,
+                                   "missing or invalid range list table");
+
+  auto range_list_or_error = m_rnglist_table->findList(
+      m_dwarf.GetDWARFContext().getOrLoadRngListsData().GetAsLLVM(), offset);
+  if (!range_list_or_error)
+    return range_list_or_error.takeError();
+
+  llvm::Expected<llvm::DWARFAddressRangesVector> llvm_ranges =
+      range_list_or_error->getAbsoluteRanges(
+          llvm::object::SectionedAddress{GetBaseAddress()},
+          [&](uint32_t index) {
+            uint32_t index_size = GetAddressByteSize();
+            dw_offset_t addr_base = GetAddrBase();
+            lldb::offset_t offset = addr_base + index * index_size;
+            return llvm::object::SectionedAddress{
+                m_dwarf.GetDWARFContext().getOrLoadAddrData().GetMaxU64(
+                    &offset, index_size)};
+          });
+  if (!llvm_ranges)
+    return llvm_ranges.takeError();
 
   DWARFRangeList ranges;
-  debug_ranges->FindRanges(this, offset, ranges);
+  for (const llvm::DWARFAddressRange &llvm_range : *llvm_ranges) {
+    ranges.Append(DWARFRangeList::Entry(llvm_range.LowPC,
+                                        llvm_range.HighPC - llvm_range.LowPC));
+  }
   return ranges;
 }
 
 llvm::Expected<DWARFRangeList>
-DWARFUnit::FindRnglistFromIndex(uint32_t index) const {
-  const DWARFDebugRangesBase *debug_rnglists = m_dwarf.GetDebugRngLists();
-  if (!debug_rnglists)
-    return llvm::make_error<llvm::object::GenericBinaryError>(
-        "No debug_rnglists section");
-  return FindRnglistFromOffset(debug_rnglists->GetOffset(index));
+DWARFUnit::FindRnglistFromIndex(uint32_t index) {
+  if (llvm::Optional<uint64_t> offset = GetRnglistOffset(index))
+    return FindRnglistFromOffset(*offset);
+  if (m_rnglist_table)
+    return llvm::createStringError(errc::invalid_argument,
+                                   "invalid range list table index %d", index);
+
+  return llvm::createStringError(errc::invalid_argument,
+                                 "missing or invalid range list table");
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
index 8aa1e44..217f9bb 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
@@ -95,8 +95,6 @@
   ScopedExtractDIEs ExtractDIEsScoped();
 
   DWARFDIE LookupAddress(const dw_addr_t address);
-  size_t AppendDIEsWithTag(const dw_tag_t tag, std::vector<DWARFDIE> &dies,
-                           uint32_t depth = UINT32_MAX) const;
   bool Verify(lldb_private::Stream *s) const;
   virtual void Dump(lldb_private::Stream *s) const = 0;
   /// Get the data that contains the DIE information for this unit.
@@ -147,13 +145,14 @@
   dw_addr_t GetRangesBase() const { return m_ranges_base; }
   dw_addr_t GetStrOffsetsBase() const { return m_str_offsets_base; }
   void SetAddrBase(dw_addr_t addr_base);
+  void SetLoclistsBase(dw_addr_t loclists_base);
   void SetRangesBase(dw_addr_t ranges_base);
   void SetStrOffsetsBase(dw_offset_t str_offsets_base);
   virtual void BuildAddressRangeTable(DWARFDebugAranges *debug_aranges) = 0;
 
   lldb::ByteOrder GetByteOrder() const;
 
-  lldb_private::TypeSystem *GetTypeSystem();
+  llvm::Expected<lldb_private::TypeSystem &> GetTypeSystem();
 
   const DWARFDebugAranges &GetFunctionAranges();
 
@@ -202,7 +201,7 @@
   lldb_private::FileSpec GetFile(size_t file_idx);
   lldb_private::FileSpec::Style GetPathStyle();
 
-  SymbolFileDWARFDwo *GetDwoSymbolFile() const;
+  SymbolFileDWARFDwo *GetDwoSymbolFile();
 
   die_iterator_range dies() {
     ExtractDIEsIfNeeded();
@@ -216,18 +215,46 @@
 
   /// Return a list of address ranges resulting from a (possibly encoded)
   /// range list starting at a given offset in the appropriate ranges section.
-  llvm::Expected<DWARFRangeList> FindRnglistFromOffset(dw_offset_t offset) const;
+  llvm::Expected<DWARFRangeList> FindRnglistFromOffset(dw_offset_t offset);
 
   /// Return a list of address ranges retrieved from an encoded range
   /// list whose offset is found via a table lookup given an index (DWARF v5
   /// and later).
-  llvm::Expected<DWARFRangeList> FindRnglistFromIndex(uint32_t index) const;
+  llvm::Expected<DWARFRangeList> FindRnglistFromIndex(uint32_t index);
+
+  /// Return a rangelist's offset based on an index. The index designates
+  /// an entry in the rangelist table's offset array and is supplied by
+  /// DW_FORM_rnglistx.
+  llvm::Optional<uint64_t> GetRnglistOffset(uint32_t Index) const {
+    if (!m_rnglist_table)
+      return llvm::None;
+    if (llvm::Optional<uint64_t> off = m_rnglist_table->getOffsetEntry(Index))
+      return *off + m_ranges_base;
+    return llvm::None;
+  }
+
+  llvm::Optional<uint64_t> GetLoclistOffset(uint32_t Index) {
+    if (!m_loclist_table_header)
+      return llvm::None;
+
+    llvm::Optional<uint64_t> Offset =  m_loclist_table_header->getOffsetEntry(Index);
+    if (!Offset)
+      return llvm::None;
+    return *Offset + m_loclists_base;
+  }
+
+  /// Return the location table for parsing the given location list data. The
+  /// format is chosen according to the unit type. Never returns null.
+  std::unique_ptr<llvm::DWARFLocationTable>
+  GetLocationTable(const lldb_private::DataExtractor &data) const;
+
+  const lldb_private::DWARFDataExtractor &GetLocationData() const;
 
 protected:
   DWARFUnit(SymbolFileDWARF &dwarf, lldb::user_id_t uid,
             const DWARFUnitHeader &header,
             const DWARFAbbreviationDeclarationSet &abbrevs,
-            DIERef::Section section);
+            DIERef::Section section, bool is_dwo);
 
   llvm::Error ExtractHeader(SymbolFileDWARF &dwarf,
                             const lldb_private::DWARFDataExtractor &data,
@@ -281,14 +308,20 @@
   lldb_private::LazyBool m_is_optimized = lldb_private::eLazyBoolCalculate;
   llvm::Optional<lldb_private::FileSpec> m_comp_dir;
   llvm::Optional<lldb_private::FileSpec> m_file_spec;
-  dw_addr_t m_addr_base = 0;   // Value of DW_AT_addr_base
-  dw_addr_t m_ranges_base = 0; // Value of DW_AT_ranges_base
+  dw_addr_t m_addr_base = 0;     ///< Value of DW_AT_addr_base.
+  dw_addr_t m_loclists_base = 0; ///< Value of DW_AT_loclists_base.
+  dw_addr_t m_ranges_base = 0;   ///< Value of DW_AT_rnglists_base.
 
   /// Value of DW_AT_stmt_list.
   dw_offset_t m_line_table_offset = DW_INVALID_OFFSET;
 
   dw_offset_t m_str_offsets_base = 0; // Value of DW_AT_str_offsets_base.
+
+  llvm::Optional<llvm::DWARFDebugRnglistTable> m_rnglist_table;
+  llvm::Optional<llvm::DWARFListTableHeader> m_loclist_table_header;
+
   const DIERef::Section m_section;
+  bool m_is_dwo;
 
 private:
   void ParseProducerInfo();
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
index 9746ad7..007ef2e 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
@@ -24,7 +24,7 @@
     return llvm::make_error<llvm::StringError>("debug info null",
                                                llvm::inconvertibleErrorCode());
   }
-  auto index_up = llvm::make_unique<DebugNames>(debug_names.GetAsLLVM(),
+  auto index_up = std::make_unique<DebugNames>(debug_names.GetAsLLVM(),
                                                 debug_str.GetAsLLVM());
   if (llvm::Error E = index_up->extract())
     return std::move(E);
@@ -105,7 +105,7 @@
       if (!regex.Execute(nte.getString()))
         continue;
 
-      uint32_t entry_offset = nte.getEntryOffset();
+      uint64_t entry_offset = nte.getEntryOffset();
       llvm::Expected<DebugNames::Entry> entry_or = ni.getEntry(&entry_offset);
       for (; entry_or; entry_or = ni.getEntry(&entry_offset)) {
         if (entry_or->tag() != DW_TAG_variable)
@@ -125,7 +125,7 @@
   uint64_t cu_offset = cu.GetOffset();
   for (const DebugNames::NameIndex &ni: *m_debug_names_up) {
     for (DebugNames::NameTableEntry nte: ni) {
-      uint32_t entry_offset = nte.getEntryOffset();
+      uint64_t entry_offset = nte.getEntryOffset();
       llvm::Expected<DebugNames::Entry> entry_or = ni.getEntry(&entry_offset);
       for (; entry_or; entry_or = ni.getEntry(&entry_offset)) {
         if (entry_or->tag() != DW_TAG_variable)
@@ -248,7 +248,7 @@
       if (!regex.Execute(nte.getString()))
         continue;
 
-      uint32_t entry_offset = nte.getEntryOffset();
+      uint64_t entry_offset = nte.getEntryOffset();
       llvm::Expected<DebugNames::Entry> entry_or = ni.getEntry(&entry_offset);
       for (; entry_or; entry_or = ni.getEntry(&entry_offset)) {
         Tag tag = entry_or->tag();
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
index 62b0ad3..88a29f4 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp
@@ -125,7 +125,7 @@
     : die_base_offset(_die_base_offset), atoms(), atom_mask(0),
       min_hash_data_byte_size(0), hash_data_has_fixed_byte_size(true) {
   // Define an array of DIE offsets by first defining an array, and then define
-  // the atom type for the array, in this case we have an array of DIE offsets
+  // the atom type for the array, in this case we have an array of DIE offsets.
   AppendAtom(eAtomTypeDIEOffset, DW_FORM_data4);
 }
 
@@ -208,9 +208,10 @@
 
   const uint32_t atom_count = data.GetU32(&offset);
   if (atom_count == 0x00060003u) {
-    // Old format, deal with contents of old pre-release format
-    while (data.GetU32(&offset))
+    // Old format, deal with contents of old pre-release format.
+    while (data.GetU32(&offset)) {
       /* do nothing */;
+    }
 
     // Hardcode to the only known value for now.
     AppendAtom(eAtomTypeDIEOffset, DW_FORM_data4);
@@ -226,7 +227,7 @@
 
 size_t DWARFMappedHash::Prologue::GetByteSize() const {
   // Add an extra count to the atoms size for the zero termination Atom that
-  // gets written to disk
+  // gets written to disk.
   return sizeof(die_base_offset) + sizeof(uint32_t) +
          atoms.size() * sizeof(Atom);
 }
@@ -286,7 +287,7 @@
       break;
 
     default:
-      // We can always skip atoms we don't know about
+      // We can always skip atoms we don't know about.
       break;
     }
   }
@@ -308,8 +309,8 @@
 bool DWARFMappedHash::MemoryTable::ReadHashData(uint32_t hash_data_offset,
                                                 HashData &hash_data) const {
   lldb::offset_t offset = hash_data_offset;
-  offset += 4; // Skip string table offset that contains offset of hash name in
-               // .debug_str
+  // Skip string table offset that contains offset of hash name in .debug_str.
+  offset += 4;
   const uint32_t count = m_data.GetU32(&offset);
   if (count > 0) {
     hash_data.resize(count);
@@ -335,7 +336,7 @@
     return eResultEndOfHashData;
 
   // There definitely should be a string for this string offset, if there
-  // isn't, there is something wrong, return and error
+  // isn't, there is something wrong, return and error.
   const char *strp_cstr = m_string_table.PeekCStr(pair.key);
   if (strp_cstr == nullptr) {
     *hash_data_offset_ptr = UINT32_MAX;
@@ -345,9 +346,8 @@
   const uint32_t count = m_data.GetU32(hash_data_offset_ptr);
   const size_t min_total_hash_data_size =
       count * m_header.header_data.GetMinimumHashDataByteSize();
-  if (count > 0 &&
-      m_data.ValidOffsetForDataOfSize(*hash_data_offset_ptr,
-                                      min_total_hash_data_size)) {
+  if (count > 0 && m_data.ValidOffsetForDataOfSize(*hash_data_offset_ptr,
+                                                   min_total_hash_data_size)) {
     // We have at least one HashData entry, and we have enough data to parse at
     // least "count" HashData entries.
 
@@ -370,21 +370,22 @@
           if (match)
             pair.value.push_back(die_info);
         } else {
-          // Something went wrong while reading the data
+          // Something went wrong while reading the data.
           *hash_data_offset_ptr = UINT32_MAX;
           return eResultError;
         }
       }
     }
     // Return the correct response depending on if the string matched or not...
-    if (match)
-      return eResultKeyMatch; // The key (cstring) matches and we have lookup
-                              // results!
-    else
-      return eResultKeyMismatch; // The key doesn't match, this function will
-                                 // get called
-    // again for the next key/value or the key terminator which in our case is
-    // a zero .debug_str offset.
+    if (match) {
+      // The key (cstring) matches and we have lookup results!
+      return eResultKeyMatch;
+    } else {
+      // The key doesn't match, this function will get called again for the
+      // next key/value or the key terminator which in our case is a zero
+      // .debug_str offset.
+      return eResultKeyMismatch;
+    }
   } else {
     *hash_data_offset_ptr = UINT32_MAX;
     return eResultError;
@@ -402,7 +403,7 @@
     return eResultEndOfHashData;
 
   // There definitely should be a string for this string offset, if there
-  // isn't, there is something wrong, return and error
+  // isn't, there is something wrong, return and error.
   const char *strp_cstr = m_string_table.PeekCStr(pair.key);
   if (strp_cstr == nullptr)
     return eResultError;
@@ -410,9 +411,8 @@
   const uint32_t count = m_data.GetU32(hash_data_offset_ptr);
   const size_t min_total_hash_data_size =
       count * m_header.header_data.GetMinimumHashDataByteSize();
-  if (count > 0 &&
-      m_data.ValidOffsetForDataOfSize(*hash_data_offset_ptr,
-                                      min_total_hash_data_size)) {
+  if (count > 0 && m_data.ValidOffsetForDataOfSize(*hash_data_offset_ptr,
+                                                   min_total_hash_data_size)) {
     const bool match = regex.Execute(llvm::StringRef(strp_cstr));
 
     if (!match && m_header.header_data.HashDataHasFixedByteSize()) {
@@ -438,14 +438,15 @@
       }
     }
     // Return the correct response depending on if the string matched or not...
-    if (match)
-      return eResultKeyMatch; // The key (cstring) matches and we have lookup
-                              // results!
-    else
-      return eResultKeyMismatch; // The key doesn't match, this function will
-                                 // get called
-    // again for the next key/value or the key terminator which in our case is
-    // a zero .debug_str offset.
+    if (match) {
+      // The key (cstring) matches and we have lookup results!
+      return eResultKeyMatch;
+    } else {
+      // The key doesn't match, this function will get called again for the
+      // next key/value or the key terminator which in our case is a zero
+      // .debug_str offset.
+      return eResultKeyMismatch;
+    }
   } else {
     *hash_data_offset_ptr = UINT32_MAX;
     return eResultError;
@@ -466,7 +467,7 @@
       if (prev_hash_data_offset == hash_data_offset)
         break;
 
-      // Check the result of getting our hash data
+      // Check the result of getting our hash data.
       switch (hash_result) {
       case eResultKeyMatch:
       case eResultKeyMismatch:
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
index a01612b..56d9bc5 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
@@ -24,37 +24,41 @@
 public:
   enum AtomType : uint16_t {
     eAtomTypeNULL = 0u,
-    eAtomTypeDIEOffset = 1u, // DIE offset, check form for encoding
-    eAtomTypeCUOffset = 2u,  // DIE offset of the compiler unit header that
-                             // contains the item in question
-    eAtomTypeTag = 3u, // DW_TAG_xxx value, should be encoded as DW_FORM_data1
-                       // (if no tags exceed 255) or DW_FORM_data2
-    eAtomTypeNameFlags = 4u,   // Flags from enum NameFlags
-    eAtomTypeTypeFlags = 5u,   // Flags from enum TypeFlags,
-    eAtomTypeQualNameHash = 6u // A 32 bit hash of the full qualified name
-                               // (since all hash entries are basename only)
-    // For example a type like "std::vector<int>::iterator" would have a name of
-    // "iterator"
-    // and a 32 bit hash for "std::vector<int>::iterator" to allow us to not
-    // have to pull
-    // in debug info for a type when we know the fully qualified name.
+    /// DIE offset, check form for encoding.
+    eAtomTypeDIEOffset = 1u,
+    /// DIE offset of the compiler unit header that contains the item in
+    /// question.
+    eAtomTypeCUOffset = 2u,
+    /// DW_TAG_xxx value, should be encoded as DW_FORM_data1 (if no tags exceed
+    /// 255) or DW_FORM_data2.
+    eAtomTypeTag = 3u,
+    // Flags from enum NameFlags.
+    eAtomTypeNameFlags = 4u,
+    // Flags from enum TypeFlags.
+    eAtomTypeTypeFlags = 5u,
+    /// A 32 bit hash of the full qualified name (since all hash entries are
+    /// basename only) For example a type like "std::vector<int>::iterator"
+    /// would have a name of "iterator" and a 32 bit hash for
+    /// "std::vector<int>::iterator" to allow us to not have to pull in debug
+    /// info for a type when we know the fully qualified name.
+    eAtomTypeQualNameHash = 6u
   };
 
-  // Bit definitions for the eAtomTypeTypeFlags flags
+  /// Bit definitions for the eAtomTypeTypeFlags flags.
   enum TypeFlags {
-    // Always set for C++, only set for ObjC if this is the
-    // @implementation for class
+    /// Always set for C++, only set for ObjC if this is the
+    /// @implementation for class.
     eTypeFlagClassIsImplementation = (1u << 1)
   };
 
   struct DIEInfo {
     dw_offset_t die_offset = DW_INVALID_OFFSET;
-    dw_tag_t tag = 0;
+    dw_tag_t tag = llvm::dwarf::DW_TAG_null;
 
-    /// Any flags for this DIEInfo
+    /// Any flags for this DIEInfo.
     uint32_t type_flags = 0;
 
-    /// A 32 bit hash of the fully qualified name
+    /// A 32 bit hash of the fully qualified name.
     uint32_t qualified_name_hash = 0;
 
     DIEInfo() = default;
@@ -94,7 +98,7 @@
 
     bool HashDataHasFixedByteSize() const;
 
-    // DIE offset base so die offsets in hash_data can be CU relative
+    /// DIE offset base so die offsets in hash_data can be CU relative.
     dw_offset_t die_base_offset;
     AtomArray atoms;
     uint32_t atom_mask;
@@ -113,8 +117,8 @@
               lldb::offset_t *offset_ptr, DIEInfo &hash_data) const;
   };
 
-  // A class for reading and using a saved hash table from a block of data
-  // in memory
+  /// A class for reading and using a saved hash table from a block of data in
+  /// memory.
   class MemoryTable
       : public MappedHash::MemoryTable<uint32_t, DWARFMappedHash::Header,
                                        DIEInfoArray> {
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
index aff8b5d..1e5927b 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
@@ -401,8 +401,6 @@
 
   if (name_type_mask & eFunctionNameTypeFull) {
     DIEArray offsets;
-    m_set.function_basenames.Find(name, offsets);
-    m_set.function_methods.Find(name, offsets);
     m_set.function_fullnames.Find(name, offsets);
     for (const DIERef &die_ref: offsets) {
       DWARFDIE die = dwarf.GetDIE(die_ref);
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index e2ddcfc..d45a8b5 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -8,6 +8,7 @@
 
 #include "SymbolFileDWARF.h"
 
+#include "llvm/ADT/Optional.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/Threading.h"
 
@@ -43,7 +44,7 @@
 #include "lldb/Symbol/LineTable.h"
 #include "lldb/Symbol/LocateSymbolFile.h"
 #include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/TypeMap.h"
 #include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Symbol/VariableList.h"
@@ -58,7 +59,6 @@
 #include "DWARFDebugAbbrev.h"
 #include "DWARFDebugAranges.h"
 #include "DWARFDebugInfo.h"
-#include "DWARFDebugLine.h"
 #include "DWARFDebugMacro.h"
 #include "DWARFDebugRanges.h"
 #include "DWARFDeclContext.h"
@@ -72,6 +72,7 @@
 #include "SymbolFileDWARFDwo.h"
 #include "SymbolFileDWARFDwp.h"
 
+#include "llvm/DebugInfo/DWARF/DWARFContext.h"
 #include "llvm/Support/FileSystem.h"
 
 #include <algorithm>
@@ -93,6 +94,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
+char SymbolFileDWARF::ID;
+
 // static inline bool
 // child_requires_parent_class_union_or_struct_to_be_completed (dw_tag_t tag)
 //{
@@ -113,18 +116,12 @@
 
 namespace {
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"comp-dir-symlink-paths", OptionValue::eTypeFileSpecList, true, 0, nullptr,
-     {},
-     "If the DW_AT_comp_dir matches any of these paths the symbolic "
-     "links will be resolved at DWARF parse time."},
-    {"ignore-file-indexes", OptionValue::eTypeBoolean, true, 0, nullptr, {},
-     "Ignore indexes present in the object files and always index DWARF "
-     "manually."}};
+#define LLDB_PROPERTIES_symbolfiledwarf
+#include "SymbolFileDWARFProperties.inc"
 
 enum {
-  ePropertySymLinkPaths,
-  ePropertyIgnoreIndexes,
+#define LLDB_PROPERTIES_symbolfiledwarf
+#include "SymbolFileDWARFPropertiesEnum.inc"
 };
 
 class PluginProperties : public Properties {
@@ -135,7 +132,7 @@
 
   PluginProperties() {
     m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_symbolfiledwarf_properties);
   }
 
   FileSpecList GetSymLinkPaths() {
@@ -159,7 +156,76 @@
   return g_settings_sp;
 }
 
-} // anonymous namespace end
+} // namespace
+
+static const llvm::DWARFDebugLine::LineTable *
+ParseLLVMLineTable(lldb_private::DWARFContext &context,
+                   llvm::DWARFDebugLine &line, dw_offset_t line_offset,
+                   dw_offset_t unit_offset) {
+  Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO);
+
+  llvm::DWARFDataExtractor data = context.getOrLoadLineData().GetAsLLVM();
+  llvm::DWARFContext &ctx = context.GetAsLLVM();
+  llvm::Expected<const llvm::DWARFDebugLine::LineTable *> line_table =
+      line.getOrParseLineTable(
+          data, line_offset, ctx, nullptr, [&](llvm::Error e) {
+            LLDB_LOG_ERROR(log, std::move(e),
+                           "SymbolFileDWARF::ParseLineTable failed to parse");
+          });
+
+  if (!line_table) {
+    LLDB_LOG_ERROR(log, line_table.takeError(),
+                   "SymbolFileDWARF::ParseLineTable failed to parse");
+    return nullptr;
+  }
+  return *line_table;
+}
+
+static llvm::Optional<std::string>
+GetFileByIndex(const llvm::DWARFDebugLine::Prologue &prologue, size_t idx,
+               llvm::StringRef compile_dir, FileSpec::Style style) {
+  // Try to get an absolute path first.
+  std::string abs_path;
+  auto absolute = llvm::DILineInfoSpecifier::FileLineInfoKind::AbsoluteFilePath;
+  if (prologue.getFileNameByIndex(idx, compile_dir, absolute, abs_path, style))
+    return std::move(abs_path);
+
+  // Otherwise ask for a relative path.
+  std::string rel_path;
+  auto relative = llvm::DILineInfoSpecifier::FileLineInfoKind::Default;
+  if (!prologue.getFileNameByIndex(idx, compile_dir, relative, rel_path, style))
+    return {};
+  return std::move(rel_path);
+}
+
+static FileSpecList
+ParseSupportFilesFromPrologue(const lldb::ModuleSP &module,
+                              const llvm::DWARFDebugLine::Prologue &prologue,
+                              FileSpec::Style style,
+                              llvm::StringRef compile_dir = {}) {
+  FileSpecList support_files;
+  size_t first_file = 0;
+  if (prologue.getVersion() <= 4) {
+    // File index 0 is not valid before DWARF v5. Add a dummy entry to ensure
+    // support file list indices match those we get from the debug info and line
+    // tables.
+    support_files.Append(FileSpec());
+    first_file = 1;
+  }
+
+  const size_t number_of_files = prologue.FileNames.size();
+  for (size_t idx = first_file; idx <= number_of_files; ++idx) {
+    std::string remapped_file;
+    if (auto file_path = GetFileByIndex(prologue, idx, compile_dir, style))
+      if (!module->RemapSourceFile(llvm::StringRef(*file_path), remapped_file))
+        remapped_file = std::move(*file_path);
+
+    // Unconditionally add an entry, so the indices match up.
+    support_files.EmplaceBack(remapped_file, style);
+  }
+
+  return support_files;
+}
 
 FileSpecList SymbolFileDWARF::GetSymlinkPaths() {
   return GetGlobalPluginProperties()->GetSymLinkPaths();
@@ -197,20 +263,16 @@
   return "DWARF and DWARF3 debug symbol file reader.";
 }
 
-SymbolFile *SymbolFileDWARF::CreateInstance(ObjectFile *obj_file) {
-  return new SymbolFileDWARF(obj_file,
+SymbolFile *SymbolFileDWARF::CreateInstance(ObjectFileSP objfile_sp) {
+  return new SymbolFileDWARF(std::move(objfile_sp),
                              /*dwo_section_list*/ nullptr);
 }
 
-TypeList *SymbolFileDWARF::GetTypeList() {
-  // This method can be called without going through the symbol vendor so we
-  // need to lock the module.
+TypeList &SymbolFileDWARF::GetTypeList() {
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
-  SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile();
-  if (debug_map_symfile)
+  if (SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile())
     return debug_map_symfile->GetTypeList();
-  else
-    return m_obj_file->GetModule()->GetTypeList();
+  return SymbolFile::GetTypeList();
 }
 void SymbolFileDWARF::GetTypes(const DWARFDIE &die, dw_offset_t min_die_offset,
                                dw_offset_t max_die_offset, uint32_t type_mask,
@@ -264,6 +326,8 @@
       case DW_TAG_ptr_to_member_type:
         add_type = (type_mask & eTypeClassMemberPointer) != 0;
         break;
+      default:
+        break;
       }
 
       if (add_type) {
@@ -283,11 +347,11 @@
   }
 }
 
-size_t SymbolFileDWARF::GetTypes(SymbolContextScope *sc_scope,
-                                 TypeClass type_mask, TypeList &type_list)
+void SymbolFileDWARF::GetTypes(SymbolContextScope *sc_scope,
+                               TypeClass type_mask, TypeList &type_list)
 
 {
-  ASSERT_MODULE_LOCK(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   TypeSet type_set;
 
   CompileUnit *comp_unit = nullptr;
@@ -297,8 +361,8 @@
 
   if (comp_unit) {
     dwarf_cu = GetDWARFCompileUnit(comp_unit);
-    if (dwarf_cu == nullptr)
-      return 0;
+    if (!dwarf_cu)
+      return;
     GetTypes(dwarf_cu->DIE(), dwarf_cu->GetOffset(),
              dwarf_cu->GetNextUnitOffset(), type_mask, type_set);
   } else {
@@ -315,16 +379,13 @@
   }
 
   std::set<CompilerType> compiler_type_set;
-  size_t num_types_added = 0;
   for (Type *type : type_set) {
     CompilerType compiler_type = type->GetForwardCompilerType();
     if (compiler_type_set.find(compiler_type) == compiler_type_set.end()) {
       compiler_type_set.insert(compiler_type);
       type_list.Insert(type->shared_from_this());
-      ++num_types_added;
     }
   }
-  return num_types_added;
 }
 
 // Gets the first parent that is a lexical block, function or inlined
@@ -342,19 +403,21 @@
     case DW_TAG_inlined_subroutine:
     case DW_TAG_lexical_block:
       return die;
+    default:
+      break;
     }
   }
   return DWARFDIE();
 }
 
-SymbolFileDWARF::SymbolFileDWARF(ObjectFile *objfile,
+SymbolFileDWARF::SymbolFileDWARF(ObjectFileSP objfile_sp,
                                  SectionList *dwo_section_list)
-    : SymbolFile(objfile),
+    : SymbolFile(std::move(objfile_sp)),
       UserID(0x7fffffff00000000), // Used by SymbolFileDWARFDebugMap to
                                   // when this class parses .o files to
                                   // contain the .o file index/ID
       m_debug_map_module_wp(), m_debug_map_symfile(nullptr),
-      m_context(objfile->GetModule()->GetSectionList(), dwo_section_list),
+      m_context(m_objfile_sp->GetModule()->GetSectionList(), dwo_section_list),
       m_data_debug_loc(), m_abbr(), m_info(), m_fetched_external_modules(false),
       m_supports_DW_AT_APPLE_objc_complete_type(eLazyBoolCalculate),
       m_unique_ast_type_map() {}
@@ -374,17 +437,17 @@
     return m_unique_ast_type_map;
 }
 
-TypeSystem *SymbolFileDWARF::GetTypeSystemForLanguage(LanguageType language) {
-  SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile();
-  TypeSystem *type_system;
-  if (debug_map_symfile) {
-    type_system = debug_map_symfile->GetTypeSystemForLanguage(language);
-  } else {
-    type_system = m_obj_file->GetModule()->GetTypeSystemForLanguage(language);
-    if (type_system)
-      type_system->SetSymbolFile(this);
+llvm::Expected<TypeSystem &>
+SymbolFileDWARF::GetTypeSystemForLanguage(LanguageType language) {
+  if (SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile())
+    return debug_map_symfile->GetTypeSystemForLanguage(language);
+
+  auto type_system_or_err =
+      m_objfile_sp->GetModule()->GetTypeSystemForLanguage(language);
+  if (type_system_or_err) {
+    type_system_or_err->SetSymbolFile(this);
   }
-  return type_system;
+  return type_system_or_err;
 }
 
 void SymbolFileDWARF::InitializeObject() {
@@ -420,7 +483,7 @@
     }
   }
 
-  m_index = llvm::make_unique<ManualDWARFIndex>(*GetObjectFile()->GetModule(),
+  m_index = std::make_unique<ManualDWARFIndex>(*GetObjectFile()->GetModule(),
                                                 DebugInfo());
 }
 
@@ -430,9 +493,9 @@
 
 uint32_t SymbolFileDWARF::CalculateAbilities() {
   uint32_t abilities = 0;
-  if (m_obj_file != nullptr) {
+  if (m_objfile_sp != nullptr) {
     const Section *section = nullptr;
-    const SectionList *section_list = m_obj_file->GetSectionList();
+    const SectionList *section_list = m_objfile_sp->GetSectionList();
     if (section_list == nullptr)
       return 0;
 
@@ -462,10 +525,12 @@
         abbrev->GetUnsupportedForms(invalid_forms);
         if (!invalid_forms.empty()) {
           StreamString error;
-          error.Printf("unsupported DW_FORM value%s:", invalid_forms.size() > 1 ? "s" : "");
+          error.Printf("unsupported DW_FORM value%s:",
+                       invalid_forms.size() > 1 ? "s" : "");
           for (auto form : invalid_forms)
             error.Printf(" %#x", form);
-          m_obj_file->GetModule()->ReportWarning("%s", error.GetString().str().c_str());
+          m_objfile_sp->GetModule()->ReportWarning(
+              "%s", error.GetString().str().c_str());
           return 0;
         }
       }
@@ -477,10 +542,10 @@
         debug_line_file_size = section->GetFileSize();
     } else {
       const char *symfile_dir_cstr =
-          m_obj_file->GetFileSpec().GetDirectory().GetCString();
+          m_objfile_sp->GetFileSpec().GetDirectory().GetCString();
       if (symfile_dir_cstr) {
         if (strcasestr(symfile_dir_cstr, ".dsym")) {
-          if (m_obj_file->GetType() == ObjectFile::eTypeDebugInfo) {
+          if (m_objfile_sp->GetType() == ObjectFile::eTypeDebugInfo) {
             // We have a dSYM file that didn't have a any debug info. If the
             // string table has a size of 1, then it was made from an
             // executable with no debug info, or from an executable that was
@@ -489,7 +554,7 @@
                 section_list->FindSectionByType(eSectionTypeDWARFDebugStr, true)
                     .get();
             if (section && section->GetFileSize() == 1) {
-              m_obj_file->GetModule()->ReportWarning(
+              m_objfile_sp->GetModule()->ReportWarning(
                   "empty dSYM file detected, dSYM was created with an "
                   "executable with no debug info.");
             }
@@ -519,7 +584,7 @@
 
 void SymbolFileDWARF::LoadSectionData(lldb::SectionType sect_type,
                                       DWARFDataExtractor &data) {
-  ModuleSP module_sp(m_obj_file->GetModule());
+  ModuleSP module_sp(m_objfile_sp->GetModule());
   const SectionList *section_list = module_sp->GetSectionList();
   if (!section_list)
     return;
@@ -529,23 +594,7 @@
     return;
 
   data.Clear();
-  m_obj_file->ReadSectionData(section_sp.get(), data);
-}
-
-const DWARFDataExtractor &SymbolFileDWARF::DebugLocData() {
-  const DWARFDataExtractor &debugLocData = get_debug_loc_data();
-  if (debugLocData.GetByteSize() > 0)
-    return debugLocData;
-  return get_debug_loclists_data();
-}
-
-const DWARFDataExtractor &SymbolFileDWARF::get_debug_loc_data() {
-  return GetCachedSectionData(eSectionTypeDWARFDebugLoc, m_data_debug_loc);
-}
-
-const DWARFDataExtractor &SymbolFileDWARF::get_debug_loclists_data() {
-  return GetCachedSectionData(eSectionTypeDWARFDebugLocLists,
-                              m_data_debug_loclists);
+  m_objfile_sp->ReadSectionData(section_sp.get(), data);
 }
 
 DWARFDebugAbbrev *SymbolFileDWARF::DebugAbbrev() {
@@ -556,7 +605,7 @@
   if (debug_abbrev_data.GetByteSize() == 0)
     return nullptr;
 
-  auto abbr = llvm::make_unique<DWARFDebugAbbrev>();
+  auto abbr = std::make_unique<DWARFDebugAbbrev>();
   llvm::Error error = abbr->parse(debug_abbrev_data);
   if (error) {
     Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO);
@@ -579,7 +628,7 @@
     Timer scoped_timer(func_cat, "%s this = %p", LLVM_PRETTY_FUNCTION,
                        static_cast<void *>(this));
     if (m_context.getOrLoadDebugInfoData().GetByteSize() > 0)
-      m_info = llvm::make_unique<DWARFDebugInfo>(*this, m_context);
+      m_info = std::make_unique<DWARFDebugInfo>(*this, m_context);
   }
   return m_info.get();
 }
@@ -604,7 +653,7 @@
   return nullptr;
 }
 
-DWARFDebugRangesBase *SymbolFileDWARF::GetDebugRanges() {
+DWARFDebugRanges *SymbolFileDWARF::GetDebugRanges() {
   if (!m_ranges) {
     static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
     Timer scoped_timer(func_cat, "%s this = %p", LLVM_PRETTY_FUNCTION,
@@ -619,21 +668,6 @@
   return m_ranges.get();
 }
 
-DWARFDebugRangesBase *SymbolFileDWARF::GetDebugRngLists() {
-  if (!m_rnglists) {
-    static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
-    Timer scoped_timer(func_cat, "%s this = %p", LLVM_PRETTY_FUNCTION,
-                       static_cast<void *>(this));
-
-    if (m_context.getOrLoadRngListsData().GetByteSize() > 0)
-      m_rnglists.reset(new DWARFDebugRngLists());
-
-    if (m_rnglists)
-      m_rnglists->Extract(m_context);
-  }
-  return m_rnglists.get();
-}
-
 lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFCompileUnit &dwarf_cu) {
   CompUnitSP cu_sp;
   CompileUnit *comp_unit = (CompileUnit *)dwarf_cu.GetUserData();
@@ -648,9 +682,10 @@
       cu_sp = m_debug_map_symfile->GetCompileUnit(this);
       dwarf_cu.SetUserData(cu_sp.get());
     } else {
-      ModuleSP module_sp(m_obj_file->GetModule());
+      ModuleSP module_sp(m_objfile_sp->GetModule());
       if (module_sp) {
-        const DWARFDIE cu_die = dwarf_cu.DIE();
+        const DWARFBaseDIE cu_die =
+            dwarf_cu.GetNonSkeletonUnit().GetUnitDIEOnly();
         if (cu_die) {
           FileSpec cu_file_spec(cu_die.GetName(), dwarf_cu.GetPathStyle());
           if (cu_file_spec) {
@@ -668,7 +703,7 @@
           LanguageType cu_language = DWARFUnit::LanguageTypeFromDWARF(
               cu_die.GetAttributeValueAsUnsigned(DW_AT_language, 0));
 
-          bool is_optimized = dwarf_cu.GetIsOptimized();
+          bool is_optimized = dwarf_cu.GetNonSkeletonUnit().GetIsOptimized();
           BuildCuTranslationTable();
           cu_sp = std::make_shared<CompileUnit>(
               module_sp, &dwarf_cu, cu_file_spec,
@@ -677,8 +712,7 @@
 
           dwarf_cu.SetUserData(cu_sp.get());
 
-          m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex(
-              dwarf_cu.GetID(), cu_sp);
+          SetCompileUnitAtIndex(dwarf_cu.GetID(), cu_sp);
         }
       }
     }
@@ -715,7 +749,7 @@
   return m_lldb_cu_to_dwarf_unit[cu_idx];
 }
 
-uint32_t SymbolFileDWARF::GetNumCompileUnits() {
+uint32_t SymbolFileDWARF::CalculateNumCompileUnits() {
   DWARFDebugInfo *info = DebugInfo();
   if (!info)
     return 0;
@@ -741,17 +775,21 @@
 Function *SymbolFileDWARF::ParseFunction(CompileUnit &comp_unit,
                                          const DWARFDIE &die) {
   ASSERT_MODULE_LOCK(this);
-  if (die.IsValid()) {
-    TypeSystem *type_system =
-        GetTypeSystemForLanguage(die.GetCU()->GetLanguageType());
+  if (!die.IsValid())
+    return nullptr;
 
-    if (type_system) {
-      DWARFASTParser *dwarf_ast = type_system->GetDWARFParser();
-      if (dwarf_ast)
-        return dwarf_ast->ParseFunctionFromDWARF(comp_unit, die);
-    }
+  auto type_system_or_err =
+      GetTypeSystemForLanguage(die.GetCU()->GetLanguageType());
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to parse function");
+    return nullptr;
   }
-  return nullptr;
+  DWARFASTParser *dwarf_ast = type_system_or_err->GetDWARFParser();
+  if (!dwarf_ast)
+    return nullptr;
+
+  return dwarf_ast->ParseFunctionFromDWARF(comp_unit, die);
 }
 
 bool SymbolFileDWARF::FixupAddress(Address &addr) {
@@ -763,7 +801,7 @@
   return true;
 }
 lldb::LanguageType SymbolFileDWARF::ParseLanguage(CompileUnit &comp_unit) {
-  ASSERT_MODULE_LOCK(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (dwarf_cu)
     return dwarf_cu->GetLanguageType();
@@ -772,15 +810,20 @@
 }
 
 size_t SymbolFileDWARF::ParseFunctions(CompileUnit &comp_unit) {
-  ASSERT_MODULE_LOCK(this);
+  static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
+  Timer scoped_timer(func_cat, "SymbolFileDWARF::ParseFunctions");
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (!dwarf_cu)
     return 0;
 
   size_t functions_added = 0;
-  std::vector<DWARFDIE> function_dies;
-  dwarf_cu->AppendDIEsWithTag(DW_TAG_subprogram, function_dies);
-  for (const DWARFDIE &die : function_dies) {
+  dwarf_cu = &dwarf_cu->GetNonSkeletonUnit();
+  for (DWARFDebugInfoEntry &entry : dwarf_cu->dies()) {
+    if (entry.Tag() != DW_TAG_subprogram)
+      continue;
+
+    DWARFDIE die(dwarf_cu, &entry);
     if (comp_unit.FindFunctionByUID(die.GetID()))
       continue;
     if (ParseFunction(comp_unit, die))
@@ -790,23 +833,41 @@
   return functions_added;
 }
 
-bool SymbolFileDWARF::ParseSupportFiles(CompileUnit &comp_unit,
-                                        FileSpecList &support_files) {
-  ASSERT_MODULE_LOCK(this);
-  if (DWARFUnit *unit = GetDWARFCompileUnit(&comp_unit)) {
-    const dw_offset_t stmt_list = unit->GetLineTableOffset();
-    if (stmt_list != DW_INVALID_OFFSET) {
-      // All file indexes in DWARF are one based and a file of index zero is
-      // supposed to be the compile unit itself.
-      support_files.Append(comp_unit);
-      return DWARFDebugLine::ParseSupportFiles(comp_unit.GetModule(),
-                                               m_context.getOrLoadLineData(),
-                                               stmt_list, support_files, unit);
+bool SymbolFileDWARF::ForEachExternalModule(
+    CompileUnit &comp_unit,
+    llvm::DenseSet<lldb_private::SymbolFile *> &visited_symbol_files,
+    llvm::function_ref<bool(Module &)> lambda) {
+  // Only visit each symbol file once.
+  if (!visited_symbol_files.insert(this).second)
+    return false;
+
+  UpdateExternalModuleListIfNeeded();
+  for (auto &p : m_external_type_modules) {
+    ModuleSP module = p.second;
+    if (!module)
+      continue;
+
+    // Invoke the action and potentially early-exit.
+    if (lambda(*module))
+      return true;
+
+    for (std::size_t i = 0; i < module->GetNumCompileUnits(); ++i) {
+      auto cu = module->GetCompileUnitAtIndex(i);
+      bool early_exit = cu->ForEachExternalModule(visited_symbol_files, lambda);
+      if (early_exit)
+        return true;
     }
   }
   return false;
 }
 
+bool SymbolFileDWARF::ParseSupportFiles(CompileUnit &comp_unit,
+                                        FileSpecList &support_files) {
+  if (!comp_unit.GetLineTable())
+    ParseLineTable(comp_unit);
+  return true;
+}
+
 FileSpec SymbolFileDWARF::GetFile(DWARFUnit &unit, size_t file_idx) {
   if (auto *dwarf_cu = llvm::dyn_cast<DWARFCompileUnit>(&unit)) {
     if (CompileUnit *lldb_cu = GetCompUnitForDWARFCompUnit(*dwarf_cu))
@@ -833,16 +894,26 @@
   auto iter_bool = m_type_unit_support_files.try_emplace(offset);
   FileSpecList &list = iter_bool.first->second;
   if (iter_bool.second) {
-    list.Append(FileSpec());
-    DWARFDebugLine::ParseSupportFiles(GetObjectFile()->GetModule(),
-                                      m_context.getOrLoadLineData(), offset,
-                                      list, &tu);
+    uint64_t line_table_offset = offset;
+    llvm::DWARFDataExtractor data = m_context.getOrLoadLineData().GetAsLLVM();
+    llvm::DWARFContext &ctx = m_context.GetAsLLVM();
+    llvm::DWARFDebugLine::Prologue prologue;
+    llvm::Error error = prologue.parse(data, &line_table_offset, ctx);
+    if (error) {
+      Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO);
+      LLDB_LOG_ERROR(log, std::move(error),
+                     "SymbolFileDWARF::GetTypeUnitSupportFiles failed to parse "
+                     "the line table prologue");
+    } else {
+      list = ParseSupportFilesFromPrologue(GetObjectFile()->GetModule(),
+                                           prologue, tu.GetPathStyle());
+    }
   }
   return list;
 }
 
 bool SymbolFileDWARF::ParseIsOptimized(CompileUnit &comp_unit) {
-  ASSERT_MODULE_LOCK(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (dwarf_cu)
     return dwarf_cu->GetIsOptimized();
@@ -852,7 +923,7 @@
 bool SymbolFileDWARF::ParseImportedModules(
     const lldb_private::SymbolContext &sc,
     std::vector<SourceModule> &imported_modules) {
-  ASSERT_MODULE_LOCK(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   assert(sc.comp_unit);
   DWARFUnit *dwarf_cu = GetDWARFCompileUnit(sc.comp_unit);
   if (!dwarf_cu)
@@ -893,7 +964,7 @@
               DW_AT_LLVM_include_path, nullptr))
         module.search_path = ConstString(include_path);
       if (const char *sysroot = module_die.GetAttributeValueAsString(
-              DW_AT_LLVM_isysroot, nullptr))
+              DW_AT_LLVM_sysroot, nullptr))
         module.sysroot = ConstString(sysroot);
       imported_modules.push_back(module);
     }
@@ -901,102 +972,63 @@
   return true;
 }
 
-struct ParseDWARFLineTableCallbackInfo {
-  LineTable *line_table;
-  std::unique_ptr<LineSequence> sequence_up;
-  lldb::addr_t addr_mask;
-};
-
-// ParseStatementTableCallback
-static void ParseDWARFLineTableCallback(dw_offset_t offset,
-                                        const DWARFDebugLine::State &state,
-                                        void *userData) {
-  if (state.row == DWARFDebugLine::State::StartParsingLineTable) {
-    // Just started parsing the line table
-  } else if (state.row == DWARFDebugLine::State::DoneParsingLineTable) {
-    // Done parsing line table, nothing to do for the cleanup
-  } else {
-    ParseDWARFLineTableCallbackInfo *info =
-        (ParseDWARFLineTableCallbackInfo *)userData;
-    LineTable *line_table = info->line_table;
-
-    // If this is our first time here, we need to create a sequence container.
-    if (!info->sequence_up) {
-      info->sequence_up.reset(line_table->CreateLineSequenceContainer());
-      assert(info->sequence_up.get());
-    }
-    line_table->AppendLineEntryToSequence(
-        info->sequence_up.get(), state.address & info->addr_mask, state.line,
-        state.column, state.file, state.is_stmt, state.basic_block,
-        state.prologue_end, state.epilogue_begin, state.end_sequence);
-    if (state.end_sequence) {
-      // First, put the current sequence into the line table.
-      line_table->InsertSequence(info->sequence_up.get());
-      // Then, empty it to prepare for the next sequence.
-      info->sequence_up->Clear();
-    }
-  }
-}
-
 bool SymbolFileDWARF::ParseLineTable(CompileUnit &comp_unit) {
-  ASSERT_MODULE_LOCK(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (comp_unit.GetLineTable() != nullptr)
     return true;
 
   DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
-  if (dwarf_cu) {
-    const DWARFBaseDIE dwarf_cu_die = dwarf_cu->GetUnitDIEOnly();
-    if (dwarf_cu_die) {
-      const dw_offset_t cu_line_offset =
-          dwarf_cu_die.GetAttributeValueAsUnsigned(DW_AT_stmt_list,
-                                                   DW_INVALID_OFFSET);
-      if (cu_line_offset != DW_INVALID_OFFSET) {
-        std::unique_ptr<LineTable> line_table_up(new LineTable(&comp_unit));
-        if (line_table_up) {
-          ParseDWARFLineTableCallbackInfo info;
-          info.line_table = line_table_up.get();
+  if (!dwarf_cu)
+    return false;
 
-          /*
-           * MIPS:
-           * The SymbolContext may not have a valid target, thus we may not be
-           * able
-           * to call Address::GetOpcodeLoadAddress() which would clear the bit
-           * #0
-           * for MIPS. Use ArchSpec to clear the bit #0.
-          */
-          switch (GetObjectFile()->GetArchitecture().GetMachine()) {
-          case llvm::Triple::mips:
-          case llvm::Triple::mipsel:
-          case llvm::Triple::mips64:
-          case llvm::Triple::mips64el:
-            info.addr_mask = ~((lldb::addr_t)1);
-            break;
-          default:
-            info.addr_mask = ~((lldb::addr_t)0);
-            break;
-          }
+  const DWARFBaseDIE dwarf_cu_die = dwarf_cu->GetUnitDIEOnly();
+  if (!dwarf_cu_die)
+    return false;
 
-          lldb::offset_t offset = cu_line_offset;
-          DWARFDebugLine::ParseStatementTable(
-              m_context.getOrLoadLineData(), &offset,
-              ParseDWARFLineTableCallback, &info, dwarf_cu);
-          SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile();
-          if (debug_map_symfile) {
-            // We have an object file that has a line table with addresses that
-            // are not linked. We need to link the line table and convert the
-            // addresses that are relative to the .o file into addresses for
-            // the main executable.
-            comp_unit.SetLineTable(
-                debug_map_symfile->LinkOSOLineTable(this, line_table_up.get()));
-          } else {
-            comp_unit.SetLineTable(line_table_up.release());
-            return true;
-          }
-        }
-      }
+  const dw_offset_t cu_line_offset = dwarf_cu_die.GetAttributeValueAsUnsigned(
+      DW_AT_stmt_list, DW_INVALID_OFFSET);
+  if (cu_line_offset == DW_INVALID_OFFSET)
+    return false;
+
+  llvm::DWARFDebugLine line;
+  const llvm::DWARFDebugLine::LineTable *line_table = ParseLLVMLineTable(
+      m_context, line, cu_line_offset, dwarf_cu->GetOffset());
+
+  if (!line_table)
+    return false;
+
+  // FIXME: Rather than parsing the whole line table and then copying it over
+  // into LLDB, we should explore using a callback to populate the line table
+  // while we parse to reduce memory usage.
+  std::unique_ptr<LineTable> line_table_up =
+      std::make_unique<LineTable>(&comp_unit);
+  LineSequence *sequence = line_table_up->CreateLineSequenceContainer();
+  for (auto &row : line_table->Rows) {
+    line_table_up->AppendLineEntryToSequence(
+        sequence, row.Address.Address, row.Line, row.Column, row.File,
+        row.IsStmt, row.BasicBlock, row.PrologueEnd, row.EpilogueBegin,
+        row.EndSequence);
+    if (row.EndSequence) {
+      line_table_up->InsertSequence(sequence);
+      sequence = line_table_up->CreateLineSequenceContainer();
     }
   }
-  return false;
+
+  if (SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile()) {
+    // We have an object file that has a line table with addresses that are not
+    // linked. We need to link the line table and convert the addresses that
+    // are relative to the .o file into addresses for the main executable.
+    comp_unit.SetLineTable(
+        debug_map_symfile->LinkOSOLineTable(this, line_table_up.get()));
+  } else {
+    comp_unit.SetLineTable(line_table_up.release());
+  }
+
+  comp_unit.SetSupportFiles(ParseSupportFilesFromPrologue(
+      comp_unit.GetModule(), line_table->Prologue, dwarf_cu->GetPathStyle(),
+      dwarf_cu->GetCompilationDirectory().GetCString()));
+
+  return true;
 }
 
 lldb_private::DebugMacrosSP
@@ -1022,7 +1054,7 @@
 }
 
 bool SymbolFileDWARF::ParseDebugMacros(CompileUnit &comp_unit) {
-  ASSERT_MODULE_LOCK(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
 
   DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (dwarf_cu == nullptr)
@@ -1114,7 +1146,7 @@
                 "0x%8.8" PRIx64 ": adding range [0x%" PRIx64 "-0x%" PRIx64
                 ") which has a base that is less than the function's low PC "
                 "0x%" PRIx64 ". Please file a bug and attach the file at the "
-                             "start of this error message",
+                "start of this error message",
                 block->GetID(), range_base, range.GetRangeEnd(),
                 subprogram_low_pc);
           }
@@ -1188,15 +1220,10 @@
 }
 
 void SymbolFileDWARF::ParseDeclsForContext(CompilerDeclContext decl_ctx) {
-  TypeSystem *type_system = decl_ctx.GetTypeSystem();
-  DWARFASTParser *ast_parser = type_system->GetDWARFParser();
-  std::vector<DWARFDIE> decl_ctx_die_list =
-      ast_parser->GetDIEForDeclContext(decl_ctx);
-
-  for (DWARFDIE decl_ctx_die : decl_ctx_die_list)
-    for (DWARFDIE decl = decl_ctx_die.GetFirstChild(); decl;
-         decl = decl.GetSibling())
-      ast_parser->GetDeclForUIDFromDWARF(decl);
+  auto *type_system = decl_ctx.GetTypeSystem();
+  if (type_system != nullptr)
+    type_system->GetDWARFParser()->EnsureAllDIEsInDeclContextHaveBeenParsed(
+        decl_ctx);
 }
 
 user_id_t SymbolFileDWARF::GetUID(DIERef ref) {
@@ -1281,8 +1308,6 @@
 
 CompilerDeclContext
 SymbolFileDWARF::GetDeclContextContainingUID(lldb::user_id_t type_uid) {
-  // This method can be called without going through the symbol vendor so we
-  // need to lock the module.
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   // Anytime we have a lldb::user_id_t, we must get the DIE by calling
   // SymbolFileDWARF::GetDIE(). See comments inside the
@@ -1293,8 +1318,6 @@
 }
 
 Type *SymbolFileDWARF::ResolveTypeUID(lldb::user_id_t type_uid) {
-  // This method can be called without going through the symbol vendor so we
-  // need to lock the module.
   std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   // Anytime we have a lldb::user_id_t, we must get the DIE by calling
   // SymbolFileDWARF::GetDIE(). See comments inside the
@@ -1341,8 +1364,9 @@
           // Get the type, which could be a forward declaration
           if (log)
             GetObjectFile()->GetModule()->LogMessage(
-                log, "SymbolFileDWARF::ResolveTypeUID (die = 0x%8.8x) %s '%s' "
-                     "resolve parent forward type for 0x%8.8x",
+                log,
+                "SymbolFileDWARF::ResolveTypeUID (die = 0x%8.8x) %s '%s' "
+                "resolve parent forward type for 0x%8.8x",
                 die.GetOffset(), die.GetTagAsCString(), die.GetName(),
                 decl_ctx_die.GetOffset());
         } break;
@@ -1486,7 +1510,7 @@
   return false;
 }
 
-lldb::ModuleSP SymbolFileDWARF::GetDWOModule(ConstString name) {
+lldb::ModuleSP SymbolFileDWARF::GetExternalModule(ConstString name) {
   UpdateExternalModuleListIfNeeded();
   const auto &pos = m_external_type_modules.find(name);
   if (pos != m_external_type_modules.end())
@@ -1504,7 +1528,6 @@
         ->GetDIE(die_ref);
   }
 
-
   DWARFDebugInfo *debug_info = DebugInfo();
   if (debug_info)
     return debug_info->GetDIE(die_ref);
@@ -1512,12 +1535,48 @@
     return DWARFDIE();
 }
 
+/// Return the DW_AT_(GNU_)dwo_name.
+static const char *GetDWOName(DWARFCompileUnit &dwarf_cu,
+                              const DWARFDebugInfoEntry &cu_die) {
+  const char *dwo_name =
+      cu_die.GetAttributeValueAsString(&dwarf_cu, DW_AT_GNU_dwo_name, nullptr);
+  if (!dwo_name)
+    dwo_name =
+        cu_die.GetAttributeValueAsString(&dwarf_cu, DW_AT_dwo_name, nullptr);
+  return dwo_name;
+}
+
+/// Return the DW_AT_(GNU_)dwo_id.
+/// FIXME: Technically 0 is a valid hash.
+static uint64_t GetDWOId(DWARFCompileUnit &dwarf_cu,
+                         const DWARFDebugInfoEntry &cu_die) {
+  uint64_t dwo_id =
+      cu_die.GetAttributeValueAsUnsigned(&dwarf_cu, DW_AT_GNU_dwo_id, 0);
+  if (!dwo_id)
+    dwo_id = cu_die.GetAttributeValueAsUnsigned(&dwarf_cu, DW_AT_dwo_id, 0);
+  return dwo_id;
+}
+
+llvm::Optional<uint64_t> SymbolFileDWARF::GetDWOId() {
+  if (GetNumCompileUnits() == 1) {
+    if (auto comp_unit = GetCompileUnitAtIndex(0))
+      if (DWARFCompileUnit *cu = llvm::dyn_cast_or_null<DWARFCompileUnit>(
+              GetDWARFCompileUnit(comp_unit.get())))
+        if (DWARFDebugInfoEntry *cu_die = cu->DIE().GetDIE())
+          if (uint64_t dwo_id = ::GetDWOId(*cu, *cu_die))
+            return dwo_id;
+  }
+  return {};
+}
+
 std::unique_ptr<SymbolFileDWARFDwo>
 SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(
     DWARFUnit &unit, const DWARFDebugInfoEntry &cu_die) {
-  // If we are using a dSYM file, we never want the standard DWO files since
-  // the -gmodules support uses the same DWO machanism to specify full debug
-  // info files for modules.
+  // If this is a Darwin-style debug map (non-.dSYM) symbol file,
+  // never attempt to load ELF-style DWO files since the -gmodules
+  // support uses the same DWO machanism to specify full debug info
+  // files for modules. This is handled in
+  // UpdateExternalModuleListIfNeeded().
   if (GetDebugMapSymfile())
     return nullptr;
 
@@ -1526,15 +1585,13 @@
   if (!dwarf_cu)
     return nullptr;
 
-  const char *dwo_name =
-      cu_die.GetAttributeValueAsString(dwarf_cu, DW_AT_GNU_dwo_name, nullptr);
+  const char *dwo_name = GetDWOName(*dwarf_cu, cu_die);
   if (!dwo_name)
     return nullptr;
 
   SymbolFileDWARFDwp *dwp_symfile = GetDwpSymbolFile();
   if (dwp_symfile) {
-    uint64_t dwo_id =
-        cu_die.GetAttributeValueAsUnsigned(dwarf_cu, DW_AT_GNU_dwo_id, 0);
+    uint64_t dwo_id = ::GetDWOId(*dwarf_cu, cu_die);
     std::unique_ptr<SymbolFileDWARFDwo> dwo_symfile =
         dwp_symfile->GetSymbolFileForDwoId(*dwarf_cu, dwo_id);
     if (dwo_symfile)
@@ -1567,83 +1624,108 @@
   if (dwo_obj_file == nullptr)
     return nullptr;
 
-  return llvm::make_unique<SymbolFileDWARFDwo>(dwo_obj_file, *dwarf_cu);
+  return std::make_unique<SymbolFileDWARFDwo>(dwo_obj_file, *dwarf_cu);
 }
 
 void SymbolFileDWARF::UpdateExternalModuleListIfNeeded() {
   if (m_fetched_external_modules)
     return;
   m_fetched_external_modules = true;
-
   DWARFDebugInfo *debug_info = DebugInfo();
 
+  // Follow DWO skeleton unit breadcrumbs.
   const uint32_t num_compile_units = GetNumCompileUnits();
   for (uint32_t cu_idx = 0; cu_idx < num_compile_units; ++cu_idx) {
-    DWARFUnit *dwarf_cu = debug_info->GetUnitAtIndex(cu_idx);
+    auto *dwarf_cu =
+        llvm::dyn_cast<DWARFCompileUnit>(debug_info->GetUnitAtIndex(cu_idx));
+    if (!dwarf_cu)
+      continue;
 
     const DWARFBaseDIE die = dwarf_cu->GetUnitDIEOnly();
-    if (die && !die.HasChildren()) {
-      const char *name = die.GetAttributeValueAsString(DW_AT_name, nullptr);
+    if (!die || die.HasChildren() || !die.GetDIE())
+      continue;
 
-      if (name) {
-        ConstString const_name(name);
-        if (m_external_type_modules.find(const_name) ==
-            m_external_type_modules.end()) {
-          ModuleSP module_sp;
-          const char *dwo_path =
-              die.GetAttributeValueAsString(DW_AT_GNU_dwo_name, nullptr);
-          if (dwo_path) {
-            ModuleSpec dwo_module_spec;
-            dwo_module_spec.GetFileSpec().SetFile(dwo_path,
-                                                  FileSpec::Style::native);
-            if (dwo_module_spec.GetFileSpec().IsRelative()) {
-              const char *comp_dir =
-                  die.GetAttributeValueAsString(DW_AT_comp_dir, nullptr);
-              if (comp_dir) {
-                dwo_module_spec.GetFileSpec().SetFile(comp_dir,
-                                                      FileSpec::Style::native);
-                FileSystem::Instance().Resolve(dwo_module_spec.GetFileSpec());
-                dwo_module_spec.GetFileSpec().AppendPathComponent(dwo_path);
-              }
-            }
-            dwo_module_spec.GetArchitecture() =
-                m_obj_file->GetModule()->GetArchitecture();
+    const char *name = die.GetAttributeValueAsString(DW_AT_name, nullptr);
+    if (!name)
+      continue;
 
-            // When LLDB loads "external" modules it looks at the presence of
-            // DW_AT_GNU_dwo_name. However, when the already created module
-            // (corresponding to .dwo itself) is being processed, it will see
-            // the presence of DW_AT_GNU_dwo_name (which contains the name of
-            // dwo file) and will try to call ModuleList::GetSharedModule
-            // again. In some cases (i.e. for empty files) Clang 4.0 generates
-            // a *.dwo file which has DW_AT_GNU_dwo_name, but no
-            // DW_AT_comp_dir. In this case the method
-            // ModuleList::GetSharedModule will fail and the warning will be
-            // printed. However, as one can notice in this case we don't
-            // actually need to try to load the already loaded module
-            // (corresponding to .dwo) so we simply skip it.
-            if (m_obj_file->GetFileSpec().GetFileNameExtension() == ".dwo" &&
-                llvm::StringRef(m_obj_file->GetFileSpec().GetPath())
-                    .endswith(dwo_module_spec.GetFileSpec().GetPath())) {
-              continue;
-            }
+    ConstString const_name(name);
+    ModuleSP &module_sp = m_external_type_modules[const_name];
+    if (module_sp)
+      continue;
 
-            Status error = ModuleList::GetSharedModule(
-                dwo_module_spec, module_sp, nullptr, nullptr, nullptr);
-            if (!module_sp) {
-              GetObjectFile()->GetModule()->ReportWarning(
-                  "0x%8.8x: unable to locate module needed for external types: "
-                  "%s\nerror: %s\nDebugging will be degraded due to missing "
-                  "types. Rebuilding your project will regenerate the needed "
-                  "module files.",
-                  die.GetOffset(),
-                  dwo_module_spec.GetFileSpec().GetPath().c_str(),
-                  error.AsCString("unknown error"));
-            }
-          }
-          m_external_type_modules[const_name] = module_sp;
-        }
+    const char *dwo_path = GetDWOName(*dwarf_cu, *die.GetDIE());
+    if (!dwo_path)
+      continue;
+
+    ModuleSpec dwo_module_spec;
+    dwo_module_spec.GetFileSpec().SetFile(dwo_path, FileSpec::Style::native);
+    if (dwo_module_spec.GetFileSpec().IsRelative()) {
+      const char *comp_dir =
+          die.GetAttributeValueAsString(DW_AT_comp_dir, nullptr);
+      if (comp_dir) {
+        dwo_module_spec.GetFileSpec().SetFile(comp_dir,
+                                              FileSpec::Style::native);
+        FileSystem::Instance().Resolve(dwo_module_spec.GetFileSpec());
+        dwo_module_spec.GetFileSpec().AppendPathComponent(dwo_path);
       }
     }
+    dwo_module_spec.GetArchitecture() =
+        m_objfile_sp->GetModule()->GetArchitecture();
+
+    // When LLDB loads "external" modules it looks at the presence of
+    // DW_AT_dwo_name. However, when the already created module
+    // (corresponding to .dwo itself) is being processed, it will see
+    // the presence of DW_AT_dwo_name (which contains the name of dwo
+    // file) and will try to call ModuleList::GetSharedModule
+    // again. In some cases (i.e., for empty files) Clang 4.0
+    // generates a *.dwo file which has DW_AT_dwo_name, but no
+    // DW_AT_comp_dir. In this case the method
+    // ModuleList::GetSharedModule will fail and the warning will be
+    // printed. However, as one can notice in this case we don't
+    // actually need to try to load the already loaded module
+    // (corresponding to .dwo) so we simply skip it.
+    if (m_objfile_sp->GetFileSpec().GetFileNameExtension() == ".dwo" &&
+        llvm::StringRef(m_objfile_sp->GetFileSpec().GetPath())
+            .endswith(dwo_module_spec.GetFileSpec().GetPath())) {
+      continue;
+    }
+
+    Status error = ModuleList::GetSharedModule(dwo_module_spec, module_sp,
+                                               nullptr, nullptr, nullptr);
+    if (!module_sp) {
+      GetObjectFile()->GetModule()->ReportWarning(
+          "0x%8.8x: unable to locate module needed for external types: "
+          "%s\nerror: %s\nDebugging will be degraded due to missing "
+          "types. Rebuilding the project will regenerate the needed "
+          "module files.",
+          die.GetOffset(), dwo_module_spec.GetFileSpec().GetPath().c_str(),
+          error.AsCString("unknown error"));
+      continue;
+    }
+
+    // Verify the DWO hash.
+    // FIXME: Technically "0" is a valid hash.
+    uint64_t dwo_id = ::GetDWOId(*dwarf_cu, *die.GetDIE());
+    if (!dwo_id)
+      continue;
+
+    auto *dwo_symfile =
+        llvm::dyn_cast_or_null<SymbolFileDWARF>(module_sp->GetSymbolFile());
+    if (!dwo_symfile)
+      continue;
+    llvm::Optional<uint64_t> dwo_dwo_id = dwo_symfile->GetDWOId();
+    if (!dwo_dwo_id)
+      continue;
+
+    if (dwo_id != dwo_dwo_id) {
+      GetObjectFile()->GetModule()->ReportWarning(
+          "0x%8.8x: Module %s is out-of-date (hash mismatch). Type information "
+          "from this module may be incomplete or inconsistent with the rest of "
+          "the program. Rebuilding the project will regenerate the needed "
+          "module files.",
+          die.GetOffset(), dwo_module_spec.GetFileSpec().GetPath().c_str());
+    }
   }
 }
 
@@ -1694,6 +1776,7 @@
 uint32_t SymbolFileDWARF::ResolveSymbolContext(const Address &so_addr,
                                                SymbolContextItem resolve_scope,
                                                SymbolContext &sc) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat,
                      "SymbolFileDWARF::"
@@ -1837,6 +1920,7 @@
                                                bool check_inlines,
                                                SymbolContextItem resolve_scope,
                                                SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   const uint32_t prev_size = sc_list.GetSize();
   if (resolve_scope & eSymbolContextCompUnit) {
     for (uint32_t cu_idx = 0, num_cus = GetNumCompileUnits(); cu_idx < num_cus;
@@ -1845,11 +1929,10 @@
       if (!dc_cu)
         continue;
 
-      const bool full_match = (bool)file_spec.GetDirectory();
       bool file_spec_matches_cu_file_spec =
-          FileSpec::Equal(file_spec, *dc_cu, full_match);
+          FileSpec::Match(file_spec, dc_cu->GetPrimaryFile());
       if (check_inlines || file_spec_matches_cu_file_spec) {
-        SymbolContext sc(m_obj_file->GetModule());
+        SymbolContext sc(m_objfile_sp->GetModule());
         sc.comp_unit = dc_cu;
         uint32_t file_idx = UINT32_MAX;
 
@@ -1961,9 +2044,16 @@
   }
 
   TypeSystem *decl_ctx_type_system = decl_ctx->GetTypeSystem();
-  TypeSystem *type_system = GetTypeSystemForLanguage(
+  auto type_system_or_err = GetTypeSystemForLanguage(
       decl_ctx_type_system->GetMinimumLanguage(nullptr));
-  if (decl_ctx_type_system == type_system)
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err),
+                   "Unable to match namespace decl using TypeSystem");
+    return false;
+  }
+
+  if (decl_ctx_type_system == &type_system_or_err.get())
     return true; // The type systems match, return true
 
   // The namespace AST was valid, and it does not match...
@@ -1976,9 +2066,10 @@
   return false;
 }
 
-uint32_t SymbolFileDWARF::FindGlobalVariables(
+void SymbolFileDWARF::FindGlobalVariables(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
     uint32_t max_matches, VariableList &variables) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
 
   if (log)
@@ -1990,11 +2081,11 @@
         max_matches);
 
   if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx))
-    return 0;
+    return;
 
   DWARFDebugInfo *info = DebugInfo();
-  if (info == nullptr)
-    return 0;
+  if (!info)
+    return;
 
   // Remember how many variables are in the list before we search.
   const uint32_t original_size = variables.GetSize();
@@ -2012,7 +2103,7 @@
   const size_t num_die_matches = die_offsets.size();
   if (num_die_matches) {
     SymbolContext sc;
-    sc.module_sp = m_obj_file->GetModule();
+    sc.module_sp = m_objfile_sp->GetModule();
     assert(sc.module_sp);
 
     // Loop invariant: Variables up to this index have been checked for context
@@ -2081,12 +2172,12 @@
         name.GetCString(), static_cast<const void *>(parent_decl_ctx),
         max_matches, num_matches);
   }
-  return num_matches;
 }
 
-uint32_t SymbolFileDWARF::FindGlobalVariables(const RegularExpression &regex,
-                                              uint32_t max_matches,
-                                              VariableList &variables) {
+void SymbolFileDWARF::FindGlobalVariables(const RegularExpression &regex,
+                                          uint32_t max_matches,
+                                          VariableList &variables) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
 
   if (log) {
@@ -2098,8 +2189,8 @@
   }
 
   DWARFDebugInfo *info = DebugInfo();
-  if (info == nullptr)
-    return 0;
+  if (!info)
+    return;
 
   // Remember how many variables are in the list before we search.
   const uint32_t original_size = variables.GetSize();
@@ -2108,7 +2199,7 @@
   m_index->GetGlobalVariables(regex, die_offsets);
 
   SymbolContext sc;
-  sc.module_sp = m_obj_file->GetModule();
+  sc.module_sp = m_objfile_sp->GetModule();
   assert(sc.module_sp);
 
   const size_t num_matches = die_offsets.size();
@@ -2132,9 +2223,6 @@
         m_index->ReportInvalidDIERef(die_ref, regex.GetText());
     }
   }
-
-  // Return the number of variable that were appended to the list
-  return variables.GetSize() - original_size;
 }
 
 bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die,
@@ -2181,9 +2269,12 @@
       addr = sc.function->GetAddressRange().GetBaseAddress();
     }
 
-    if (addr.IsValid()) {
-      sc_list.Append(sc);
-      return true;
+
+    if (auto section_sp = addr.GetSection()) {
+      if (section_sp->GetPermissions() & ePermissionsExecutable) {
+        sc_list.Append(sc);
+        return true;
+      }
     }
   }
 
@@ -2210,10 +2301,12 @@
   return false;
 }
 
-uint32_t SymbolFileDWARF::FindFunctions(
-    ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    FunctionNameType name_type_mask, bool include_inlines, bool append,
-    SymbolContextList &sc_list) {
+void SymbolFileDWARF::FindFunctions(ConstString name,
+                                    const CompilerDeclContext *parent_decl_ctx,
+                                    FunctionNameType name_type_mask,
+                                    bool include_inlines,
+                                    SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat, "SymbolFileDWARF::FindFunctions (name = '%s')",
                      name.AsCString());
@@ -2226,21 +2319,17 @@
 
   if (log) {
     GetObjectFile()->GetModule()->LogMessage(
-        log, "SymbolFileDWARF::FindFunctions (name=\"%s\", "
-             "name_type_mask=0x%x, append=%u, sc_list)",
-        name.GetCString(), name_type_mask, append);
+        log,
+        "SymbolFileDWARF::FindFunctions (name=\"%s\", name_type_mask=0x%x, sc_list)",
+        name.GetCString(), name_type_mask);
   }
 
-  // If we aren't appending the results to this list, then clear the list
-  if (!append)
-    sc_list.Clear();
-
   if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx))
-    return 0;
+    return;
 
   // If name is empty then we won't find anything.
   if (name.IsEmpty())
-    return 0;
+    return;
 
   // Remember how many sc_list are in the list before we search in case we are
   // appending the results to a variable list.
@@ -2255,7 +2344,7 @@
 
   std::vector<DWARFDIE> dies;
   m_index->GetFunctions(name, *this, *parent_decl_ctx, name_type_mask, dies);
-  for (const DWARFDIE &die: dies) {
+  for (const DWARFDIE &die : dies) {
     if (resolved_dies.insert(die.GetDIE()).second)
       ResolveFunction(die, include_inlines, sc_list);
   }
@@ -2265,18 +2354,18 @@
 
   if (log && num_matches > 0) {
     GetObjectFile()->GetModule()->LogMessage(
-        log, "SymbolFileDWARF::FindFunctions (name=\"%s\", "
-             "name_type_mask=0x%x, include_inlines=%d, append=%u, sc_list) => "
-             "%u",
-        name.GetCString(), name_type_mask, include_inlines, append,
+        log,
+        "SymbolFileDWARF::FindFunctions (name=\"%s\", "
+        "name_type_mask=0x%x, include_inlines=%d, sc_list) => %u",
+        name.GetCString(), name_type_mask, include_inlines,
         num_matches);
   }
-  return num_matches;
 }
 
-uint32_t SymbolFileDWARF::FindFunctions(const RegularExpression &regex,
-                                        bool include_inlines, bool append,
-                                        SymbolContextList &sc_list) {
+void SymbolFileDWARF::FindFunctions(const RegularExpression &regex,
+                                    bool include_inlines,
+                                    SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat, "SymbolFileDWARF::FindFunctions (regex = '%s')",
                      regex.GetText().str().c_str());
@@ -2285,22 +2374,13 @@
 
   if (log) {
     GetObjectFile()->GetModule()->LogMessage(
-        log,
-        "SymbolFileDWARF::FindFunctions (regex=\"%s\", append=%u, sc_list)",
-        regex.GetText().str().c_str(), append);
+        log, "SymbolFileDWARF::FindFunctions (regex=\"%s\", sc_list)",
+        regex.GetText().str().c_str());
   }
 
-  // If we aren't appending the results to this list, then clear the list
-  if (!append)
-    sc_list.Clear();
-
   DWARFDebugInfo *info = DebugInfo();
   if (!info)
-    return 0;
-
-  // Remember how many sc_list are in the list before we search in case we are
-  // appending the results to a variable list.
-  uint32_t original_size = sc_list.GetSize();
+    return;
 
   DIEArray offsets;
   m_index->GetFunctions(regex, offsets);
@@ -2315,9 +2395,6 @@
     if (resolved_dies.insert(die.GetDIE()).second)
       ResolveFunction(die, include_inlines, sc_list);
   }
-
-  // Return the number of variable that were appended to the list
-  return sc_list.GetSize() - original_size;
 }
 
 void SymbolFileDWARF::GetMangledNamesForFunction(
@@ -2345,156 +2422,155 @@
   }
 }
 
-uint32_t SymbolFileDWARF::FindTypes(
+void SymbolFileDWARF::FindTypes(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    bool append, uint32_t max_matches,
+    uint32_t max_matches,
     llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeMap &types) {
-  // If we aren't appending the results to this list, then clear the list
-  if (!append)
-    types.Clear();
-
-  // Make sure we haven't already searched this SymbolFile before...
-  if (searched_symbol_files.count(this))
-    return 0;
-  else
-    searched_symbol_files.insert(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+  // Make sure we haven't already searched this SymbolFile before.
+  if (!searched_symbol_files.insert(this).second)
+    return;
 
   DWARFDebugInfo *info = DebugInfo();
-  if (info == nullptr)
-    return 0;
+  if (!info)
+    return;
 
   Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
 
   if (log) {
     if (parent_decl_ctx)
       GetObjectFile()->GetModule()->LogMessage(
-          log, "SymbolFileDWARF::FindTypes (sc, name=\"%s\", parent_decl_ctx = "
-               "%p (\"%s\"), append=%u, max_matches=%u, type_list)",
+          log,
+          "SymbolFileDWARF::FindTypes (sc, name=\"%s\", parent_decl_ctx = "
+          "%p (\"%s\"), max_matches=%u, type_list)",
           name.GetCString(), static_cast<const void *>(parent_decl_ctx),
-          parent_decl_ctx->GetName().AsCString("<NULL>"), append, max_matches);
+          parent_decl_ctx->GetName().AsCString("<NULL>"), max_matches);
     else
       GetObjectFile()->GetModule()->LogMessage(
-          log, "SymbolFileDWARF::FindTypes (sc, name=\"%s\", parent_decl_ctx = "
-               "NULL, append=%u, max_matches=%u, type_list)",
-          name.GetCString(), append, max_matches);
+          log,
+          "SymbolFileDWARF::FindTypes (sc, name=\"%s\", parent_decl_ctx = "
+          "NULL, max_matches=%u, type_list)",
+          name.GetCString(), max_matches);
   }
 
   if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx))
-    return 0;
+    return;
 
   DIEArray die_offsets;
   m_index->GetTypes(name, die_offsets);
   const size_t num_die_matches = die_offsets.size();
 
-  if (num_die_matches) {
-    const uint32_t initial_types_size = types.GetSize();
-    for (size_t i = 0; i < num_die_matches; ++i) {
-      const DIERef &die_ref = die_offsets[i];
-      DWARFDIE die = GetDIE(die_ref);
+  for (size_t i = 0; i < num_die_matches; ++i) {
+    const DIERef &die_ref = die_offsets[i];
+    DWARFDIE die = GetDIE(die_ref);
+    if (die) {
+      if (!DIEInDeclContext(parent_decl_ctx, die))
+        continue; // The containing decl contexts don't match
 
-      if (die) {
-        if (!DIEInDeclContext(parent_decl_ctx, die))
-          continue; // The containing decl contexts don't match
+      Type *matching_type = ResolveType(die, true, true);
+      if (matching_type) {
+        // We found a type pointer, now find the shared pointer form our type
+        // list
+        types.InsertUnique(matching_type->shared_from_this());
+        if (types.GetSize() >= max_matches)
+          break;
+      }
+    } else {
+      m_index->ReportInvalidDIERef(die_ref, name.GetStringRef());
+    }
+  }
 
-        Type *matching_type = ResolveType(die, true, true);
-        if (matching_type) {
-          // We found a type pointer, now find the shared pointer form our type
-          // list
-          types.InsertUnique(matching_type->shared_from_this());
-          if (types.GetSize() >= max_matches)
-            break;
-        }
-      } else {
-        m_index->ReportInvalidDIERef(die_ref, name.GetStringRef());
-      }
-    }
-    const uint32_t num_matches = types.GetSize() - initial_types_size;
-    if (log && num_matches) {
-      if (parent_decl_ctx) {
-        GetObjectFile()->GetModule()->LogMessage(
-            log, "SymbolFileDWARF::FindTypes (sc, name=\"%s\", parent_decl_ctx "
-                 "= %p (\"%s\"), append=%u, max_matches=%u, type_list) => %u",
-            name.GetCString(), static_cast<const void *>(parent_decl_ctx),
-            parent_decl_ctx->GetName().AsCString("<NULL>"), append, max_matches,
-            num_matches);
-      } else {
-        GetObjectFile()->GetModule()->LogMessage(
-            log, "SymbolFileDWARF::FindTypes (sc, name=\"%s\", parent_decl_ctx "
-                 "= NULL, append=%u, max_matches=%u, type_list) => %u",
-            name.GetCString(), append, max_matches, num_matches);
-      }
-    }
-    return num_matches;
-  } else {
+  // Next search through the reachable Clang modules. This only applies for
+  // DWARF objects compiled with -gmodules that haven't been processed by
+  // dsymutil.
+  if (num_die_matches < max_matches) {
     UpdateExternalModuleListIfNeeded();
 
-    for (const auto &pair : m_external_type_modules) {
-      ModuleSP external_module_sp = pair.second;
-      if (external_module_sp) {
-        SymbolVendor *sym_vendor = external_module_sp->GetSymbolVendor();
-        if (sym_vendor) {
-          const uint32_t num_external_matches =
-              sym_vendor->FindTypes(name, parent_decl_ctx, append, max_matches,
-                                    searched_symbol_files, types);
-          if (num_external_matches)
-            return num_external_matches;
-        }
-      }
-    }
+    for (const auto &pair : m_external_type_modules)
+      if (ModuleSP external_module_sp = pair.second) 
+        if (SymbolFile *sym_file = external_module_sp->GetSymbolFile())
+          sym_file->FindTypes(name, parent_decl_ctx, max_matches,
+                              searched_symbol_files, types);
   }
 
-  return 0;
+  if (log && types.GetSize()) {
+    if (parent_decl_ctx) {
+      GetObjectFile()->GetModule()->LogMessage(
+          log,
+          "SymbolFileDWARF::FindTypes (sc, name=\"%s\", parent_decl_ctx "
+          "= %p (\"%s\"), max_matches=%u, type_list) => %u",
+          name.GetCString(), static_cast<const void *>(parent_decl_ctx),
+          parent_decl_ctx->GetName().AsCString("<NULL>"), max_matches,
+          types.GetSize());
+    } else {
+      GetObjectFile()->GetModule()->LogMessage(
+          log,
+          "SymbolFileDWARF::FindTypes (sc, name=\"%s\", parent_decl_ctx "
+          "= NULL, max_matches=%u, type_list) => %u",
+          name.GetCString(), max_matches, types.GetSize());
+    }
+  }
 }
 
-size_t SymbolFileDWARF::FindTypes(const std::vector<CompilerContext> &context,
-                                  bool append, TypeMap &types) {
-  if (!append)
-    types.Clear();
+void SymbolFileDWARF::FindTypes(
+    llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+    llvm::DenseSet<SymbolFile *> &searched_symbol_files, TypeMap &types) {
+  // Make sure we haven't already searched this SymbolFile before.
+  if (!searched_symbol_files.insert(this).second)
+    return;
 
-  if (context.empty())
-    return 0;
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+  if (pattern.empty())
+    return;
 
-  ConstString name = context.back().name;
+  ConstString name = pattern.back().name;
 
   if (!name)
-    return 0;
+    return;
 
   DIEArray die_offsets;
   m_index->GetTypes(name, die_offsets);
   const size_t num_die_matches = die_offsets.size();
 
-  if (num_die_matches) {
-    size_t num_matches = 0;
-    for (size_t i = 0; i < num_die_matches; ++i) {
-      const DIERef &die_ref = die_offsets[i];
-      DWARFDIE die = GetDIE(die_ref);
+  for (size_t i = 0; i < num_die_matches; ++i) {
+    const DIERef &die_ref = die_offsets[i];
+    DWARFDIE die = GetDIE(die_ref);
 
-      if (die) {
-        std::vector<CompilerContext> die_context;
-        die.GetDeclContext(die_context);
-        if (die_context != context)
-          continue;
-
-        Type *matching_type = ResolveType(die, true, true);
-        if (matching_type) {
-          // We found a type pointer, now find the shared pointer form our type
-          // list
-          types.InsertUnique(matching_type->shared_from_this());
-          ++num_matches;
-        }
-      } else {
-        m_index->ReportInvalidDIERef(die_ref, name.GetStringRef());
-      }
+    if (!die) {
+      m_index->ReportInvalidDIERef(die_ref, name.GetStringRef());
+      continue;
     }
-    return num_matches;
+    if (!languages[die.GetCU()->GetLanguageType()])
+      continue;
+
+    llvm::SmallVector<CompilerContext, 4> die_context;
+    die.GetDeclContext(die_context);
+    if (!contextMatches(die_context, pattern))
+      continue;
+
+    if (Type *matching_type = ResolveType(die, true, true)) {
+      // We found a type pointer, now find the shared pointer form our type
+      // list.
+      types.InsertUnique(matching_type->shared_from_this());
+    }
   }
-  return 0;
+
+  // Next search through the reachable Clang modules. This only applies for
+  // DWARF objects compiled with -gmodules that haven't been processed by
+  // dsymutil.
+  UpdateExternalModuleListIfNeeded();
+
+  for (const auto &pair : m_external_type_modules)
+    if (ModuleSP external_module_sp = pair.second)
+      external_module_sp->FindTypes(pattern, languages, searched_symbol_files,
+                                    types);
 }
 
 CompilerDeclContext
 SymbolFileDWARF::FindNamespace(ConstString name,
                                const CompilerDeclContext *parent_decl_ctx) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_LOOKUPS));
 
   if (log) {
@@ -2536,8 +2612,9 @@
   }
   if (log && namespace_decl_ctx) {
     GetObjectFile()->GetModule()->LogMessage(
-        log, "SymbolFileDWARF::FindNamespace (sc, name=\"%s\") => "
-             "CompilerDeclContext(%p/%p) \"%s\"",
+        log,
+        "SymbolFileDWARF::FindNamespace (sc, name=\"%s\") => "
+        "CompilerDeclContext(%p/%p) \"%s\"",
         name.GetCString(),
         static_cast<const void *>(namespace_decl_ctx.GetTypeSystem()),
         static_cast<const void *>(namespace_decl_ctx.GetOpaqueDeclContext()),
@@ -2632,11 +2709,10 @@
   return DWARFDIE();
 }
 
-Symbol *
-SymbolFileDWARF::GetObjCClassSymbol(ConstString objc_class_name) {
+Symbol *SymbolFileDWARF::GetObjCClassSymbol(ConstString objc_class_name) {
   Symbol *objc_class_symbol = nullptr;
-  if (m_obj_file) {
-    Symtab *symtab = m_obj_file->GetSymtab();
+  if (m_objfile_sp) {
+    Symtab *symtab = m_objfile_sp->GetSymtab();
     if (symtab) {
       objc_class_symbol = symtab->FindFirstSymbolWithNameAndType(
           objc_class_name, eSymbolTypeObjCClass, Symtab::eDebugNo,
@@ -2653,8 +2729,7 @@
 // worry about the debug map
 // DWARF file
 // if we are doing darwin DWARF in .o file debugging.
-bool SymbolFileDWARF::Supports_DW_AT_APPLE_objc_complete_type(
-    DWARFUnit *cu) {
+bool SymbolFileDWARF::Supports_DW_AT_APPLE_objc_complete_type(DWARFUnit *cu) {
   if (m_supports_DW_AT_APPLE_objc_complete_type == eLazyBoolCalculate) {
     m_supports_DW_AT_APPLE_objc_complete_type = eLazyBoolNo;
     if (cu && cu->Supports_DW_AT_APPLE_objc_complete_type())
@@ -2681,8 +2756,7 @@
 // This function can be used when a DIE is found that is a forward declaration
 // DIE and we want to try and find a type that has the complete definition.
 TypeSP SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE(
-    const DWARFDIE &die, ConstString type_name,
-    bool must_be_implementation) {
+    const DWARFDIE &die, ConstString type_name, bool must_be_implementation) {
 
   TypeSP type_sp;
 
@@ -2727,7 +2801,7 @@
               DEBUG_PRINTF("resolved 0x%8.8" PRIx64 " from %s to 0x%8.8" PRIx64
                            " (cu 0x%8.8" PRIx64 ")\n",
                            die.GetID(),
-                           m_obj_file->GetFileSpec().GetFilename().AsCString(
+                           m_objfile_sp->GetFileSpec().GetFilename().AsCString(
                                "<Unknown>"),
                            type_die.GetID(), type_cu->GetID());
 
@@ -2849,8 +2923,9 @@
                                             DWARF_LOG_LOOKUPS));
       if (log) {
         GetObjectFile()->GetModule()->LogMessage(
-            log, "SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(tag=%"
-                 "s, qualified-name='%s')",
+            log,
+            "SymbolFileDWARF::FindDefinitionTypeForDWARFDeclContext(tag=%"
+            "s, qualified-name='%s')",
             DW_TAG_value_to_name(dwarf_decl_ctx[0].tag),
             dwarf_decl_ctx.GetQualifiedName());
       }
@@ -2863,10 +2938,18 @@
       // use this to ensure any matches we find are in a language that this
       // type system supports
       const LanguageType language = dwarf_decl_ctx.GetLanguage();
-      TypeSystem *type_system = (language == eLanguageTypeUnknown)
-                                    ? nullptr
-                                    : GetTypeSystemForLanguage(language);
-
+      TypeSystem *type_system = nullptr;
+      if (language != eLanguageTypeUnknown) {
+        auto type_system_or_err = GetTypeSystemForLanguage(language);
+        if (auto err = type_system_or_err.takeError()) {
+          LLDB_LOG_ERROR(
+              lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+              std::move(err), "Cannot get TypeSystem for language {}",
+              Language::GetNameForLanguageType(language));
+        } else {
+          type_system = &type_system_or_err.get();
+        }
+      }
       if (num_matches) {
         for (size_t i = 0; i < num_matches; ++i) {
           const DIERef &die_ref = die_offsets[i];
@@ -2916,9 +2999,10 @@
 
               if (log) {
                 GetObjectFile()->GetModule()->LogMessage(
-                    log, "SymbolFileDWARF::"
-                         "FindDefinitionTypeForDWARFDeclContext(tag=%s, "
-                         "qualified-name='%s') trying die=0x%8.8x (%s)",
+                    log,
+                    "SymbolFileDWARF::"
+                    "FindDefinitionTypeForDWARFDeclContext(tag=%s, "
+                    "qualified-name='%s') trying die=0x%8.8x (%s)",
                     DW_TAG_value_to_name(dwarf_decl_ctx[0].tag),
                     dwarf_decl_ctx.GetQualifiedName(), type_die.GetOffset(),
                     type_dwarf_decl_ctx.GetQualifiedName());
@@ -2937,9 +3021,10 @@
                 std::string qualified_name;
                 type_die.GetQualifiedName(qualified_name);
                 GetObjectFile()->GetModule()->LogMessage(
-                    log, "SymbolFileDWARF::"
-                         "FindDefinitionTypeForDWARFDeclContext(tag=%s, "
-                         "qualified-name='%s') ignoring die=0x%8.8x (%s)",
+                    log,
+                    "SymbolFileDWARF::"
+                    "FindDefinitionTypeForDWARFDeclContext(tag=%s, "
+                    "qualified-name='%s') ignoring die=0x%8.8x (%s)",
                     DW_TAG_value_to_name(dwarf_decl_ctx[0].tag),
                     dwarf_decl_ctx.GetQualifiedName(), type_die.GetOffset(),
                     qualified_name.c_str());
@@ -2960,21 +3045,21 @@
   if (!die)
     return {};
 
-  TypeSystem *type_system =
+  auto type_system_or_err =
       GetTypeSystemForLanguage(die.GetCU()->GetLanguageType());
-  if (!type_system)
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to parse type");
     return {};
+  }
 
-  DWARFASTParser *dwarf_ast = type_system->GetDWARFParser();
+  DWARFASTParser *dwarf_ast = type_system_or_err->GetDWARFParser();
   if (!dwarf_ast)
     return {};
 
-  Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO);
-  TypeSP type_sp = dwarf_ast->ParseTypeFromDWARF(sc, die, log, type_is_new_ptr);
+  TypeSP type_sp = dwarf_ast->ParseTypeFromDWARF(sc, die, type_is_new_ptr);
   if (type_sp) {
-    TypeList *type_list = GetTypeList();
-    if (type_list)
-      type_list->Insert(type_sp);
+    GetTypeList().Insert(type_sp);
 
     if (die.Tag() == DW_TAG_subprogram) {
       std::string scope_qualified_name(GetDeclContextForUID(die.GetID())
@@ -2995,12 +3080,21 @@
                                    bool parse_siblings, bool parse_children) {
   size_t types_added = 0;
   DWARFDIE die = orig_die;
+
   while (die) {
+    const dw_tag_t tag = die.Tag();
     bool type_is_new = false;
-    if (ParseType(sc, die, &type_is_new).get()) {
-      if (type_is_new)
-        ++types_added;
-    }
+
+    Tag dwarf_tag = static_cast<Tag>(tag);
+
+    // TODO: Currently ParseTypeFromDWARF(...) which is called by ParseType(...)
+    // does not handle DW_TAG_subrange_type. It is not clear if this is a bug or
+    // not.
+    if (isType(dwarf_tag) && tag != DW_TAG_subrange_type)
+      ParseType(sc, die, &type_is_new);
+
+    if (type_is_new)
+      ++types_added;
 
     if (parse_children && die.HasChildren()) {
       if (die.Tag() == DW_TAG_subprogram) {
@@ -3020,7 +3114,7 @@
 }
 
 size_t SymbolFileDWARF::ParseBlocksRecursive(Function &func) {
-  ASSERT_MODULE_LOCK(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   CompileUnit *comp_unit = func.GetCompileUnit();
   lldbassert(comp_unit);
 
@@ -3040,7 +3134,7 @@
 }
 
 size_t SymbolFileDWARF::ParseTypes(CompileUnit &comp_unit) {
-  ASSERT_MODULE_LOCK(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   size_t types_added = 0;
   DWARFUnit *dwarf_cu = GetDWARFCompileUnit(&comp_unit);
   if (dwarf_cu) {
@@ -3056,7 +3150,7 @@
 }
 
 size_t SymbolFileDWARF::ParseVariablesForContext(const SymbolContext &sc) {
-  ASSERT_MODULE_LOCK(this);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (sc.comp_unit != nullptr) {
     DWARFDebugInfo *info = DebugInfo();
     if (info == nullptr)
@@ -3193,15 +3287,18 @@
                 uint32_t block_offset =
                     form_value.BlockData() - debug_info_data.GetDataStart();
                 uint32_t block_length = form_value.Unsigned();
-                location = DWARFExpression(module, debug_info_data, die.GetCU(),
-                                           block_offset, block_length);
+                location = DWARFExpression(
+                    module,
+                    DataExtractor(debug_info_data, block_offset, block_length),
+                    die.GetCU());
               } else if (DWARFFormValue::IsDataForm(form_value.Form())) {
                 // Retrieve the value as a data expression.
                 uint32_t data_offset = attributes.DIEOffsetAtIndex(i);
                 if (auto data_length = form_value.GetFixedSize())
-                  location =
-                      DWARFExpression(module, debug_info_data, die.GetCU(),
-                                      data_offset, *data_length);
+                  location = DWARFExpression(
+                      module,
+                      DataExtractor(debug_info_data, data_offset, *data_length),
+                      die.GetCU());
                 else {
                   const uint8_t *data_pointer = form_value.BlockData();
                   if (data_pointer) {
@@ -3217,17 +3314,21 @@
                 if (form_value.Form() == DW_FORM_strp) {
                   uint32_t data_offset = attributes.DIEOffsetAtIndex(i);
                   if (auto data_length = form_value.GetFixedSize())
-                    location =
-                        DWARFExpression(module, debug_info_data, die.GetCU(),
-                                        data_offset, *data_length);
+                    location = DWARFExpression(module,
+                                               DataExtractor(debug_info_data,
+                                                             data_offset,
+                                                             *data_length),
+                                               die.GetCU());
                 } else {
                   const char *str = form_value.AsCString();
                   uint32_t string_offset =
                       str - (const char *)debug_info_data.GetDataStart();
                   uint32_t string_length = strlen(str) + 1;
-                  location =
-                      DWARFExpression(module, debug_info_data, die.GetCU(),
-                                      string_offset, string_length);
+                  location = DWARFExpression(module,
+                                             DataExtractor(debug_info_data,
+                                                           string_offset,
+                                                           string_length),
+                                             die.GetCU());
                 }
               }
             }
@@ -3241,21 +3342,21 @@
               uint32_t block_offset =
                   form_value.BlockData() - data.GetDataStart();
               uint32_t block_length = form_value.Unsigned();
-              location = DWARFExpression(module, data, die.GetCU(),
-                                         block_offset, block_length);
+              location = DWARFExpression(
+                  module, DataExtractor(data, block_offset, block_length),
+                  die.GetCU());
             } else {
-              const DWARFDataExtractor &debug_loc_data = DebugLocData();
-              const dw_offset_t debug_loc_offset = form_value.Unsigned();
-
-              size_t loc_list_length = DWARFExpression::LocationListSize(
-                  die.GetCU(), debug_loc_data, debug_loc_offset);
-              if (loc_list_length > 0) {
-                location = DWARFExpression(module, debug_loc_data, die.GetCU(),
-                                           debug_loc_offset, loc_list_length);
+              DataExtractor data = die.GetCU()->GetLocationData();
+              dw_offset_t offset = form_value.Unsigned();
+              if (form_value.Form() == DW_FORM_loclistx)
+                offset = die.GetCU()->GetLoclistOffset(offset).getValueOr(-1);
+              if (data.ValidOffset(offset)) {
+                data = DataExtractor(data, offset, data.GetByteSize() - offset);
+                location = DWARFExpression(module, data, die.GetCU());
                 assert(func_low_pc != LLDB_INVALID_ADDRESS);
-                location.SetLocationListSlide(
-                    func_low_pc -
-                    attributes.CompileUnitAtIndex(i)->GetBaseAddress());
+                location.SetLocationListAddresses(
+                    attributes.CompileUnitAtIndex(i)->GetBaseAddress(),
+                    func_low_pc);
               }
             }
           } break;
@@ -3522,6 +3623,8 @@
           spec_block_die_offset)
         return die;
     } break;
+    default:
+      break;
     }
 
     // Give the concrete function die specified by "func_die_offset", find the
@@ -3577,8 +3680,7 @@
             } else {
               GetObjectFile()->GetModule()->ReportError(
                   "parent 0x%8.8" PRIx64 " %s with no valid compile unit in "
-                                         "symbol context for 0x%8.8" PRIx64
-                  " %s.\n",
+                  "symbol context for 0x%8.8" PRIx64 " %s.\n",
                   sc_parent_die.GetID(), sc_parent_die.GetTagAsCString(),
                   orig_die.GetID(), orig_die.GetTagAsCString());
             }
@@ -3654,9 +3756,57 @@
   return vars_added;
 }
 
+/// Collect call site parameters in a DW_TAG_call_site DIE.
+static CallSiteParameterArray
+CollectCallSiteParameters(ModuleSP module, DWARFDIE call_site_die) {
+  CallSiteParameterArray parameters;
+  for (DWARFDIE child = call_site_die.GetFirstChild(); child.IsValid();
+       child = child.GetSibling()) {
+    if (child.Tag() != DW_TAG_call_site_parameter)
+      continue;
+
+    llvm::Optional<DWARFExpression> LocationInCallee;
+    llvm::Optional<DWARFExpression> LocationInCaller;
+
+    DWARFAttributes attributes;
+    const size_t num_attributes = child.GetAttributes(attributes);
+
+    // Parse the location at index \p attr_index within this call site parameter
+    // DIE, or return None on failure.
+    auto parse_simple_location =
+        [&](int attr_index) -> llvm::Optional<DWARFExpression> {
+      DWARFFormValue form_value;
+      if (!attributes.ExtractFormValueAtIndex(attr_index, form_value))
+        return {};
+      if (!DWARFFormValue::IsBlockForm(form_value.Form()))
+        return {};
+      auto data = child.GetData();
+      uint32_t block_offset = form_value.BlockData() - data.GetDataStart();
+      uint32_t block_length = form_value.Unsigned();
+      return DWARFExpression(module,
+                             DataExtractor(data, block_offset, block_length),
+                             child.GetCU());
+    };
+
+    for (size_t i = 0; i < num_attributes; ++i) {
+      dw_attr_t attr = attributes.AttributeAtIndex(i);
+      if (attr == DW_AT_location)
+        LocationInCallee = parse_simple_location(i);
+      if (attr == DW_AT_call_value)
+        LocationInCaller = parse_simple_location(i);
+    }
+
+    if (LocationInCallee && LocationInCaller) {
+      CallSiteParameter param = {*LocationInCallee, *LocationInCaller};
+      parameters.push_back(param);
+    }
+  }
+  return parameters;
+}
+
 /// Collect call graph edges present in a function DIE.
-static std::vector<lldb_private::CallEdge>
-CollectCallEdges(DWARFDIE function_die) {
+static std::vector<std::unique_ptr<lldb_private::CallEdge>>
+CollectCallEdges(ModuleSP module, DWARFDIE function_die) {
   // Check if the function has a supported call site-related attribute.
   // TODO: In the future it may be worthwhile to support call_all_source_calls.
   uint64_t has_call_edges =
@@ -3673,38 +3823,111 @@
   // to be DWARF5-compliant. This may need to be done lazily to be performant.
   // For now, assume that all entries are nested directly under the subprogram
   // (this is the kind of DWARF LLVM produces) and parse them eagerly.
-  std::vector<CallEdge> call_edges;
+  std::vector<std::unique_ptr<CallEdge>> call_edges;
   for (DWARFDIE child = function_die.GetFirstChild(); child.IsValid();
        child = child.GetSibling()) {
     if (child.Tag() != DW_TAG_call_site)
       continue;
 
-    // Extract DW_AT_call_origin (the call target's DIE).
-    DWARFDIE call_origin = child.GetReferencedDIE(DW_AT_call_origin);
-    if (!call_origin.IsValid()) {
-      LLDB_LOG(log, "CollectCallEdges: Invalid call origin in {0}",
-               function_die.GetPubname());
+    llvm::Optional<DWARFDIE> call_origin;
+    llvm::Optional<DWARFExpression> call_target;
+    addr_t return_pc = LLDB_INVALID_ADDRESS;
+
+    DWARFAttributes attributes;
+    const size_t num_attributes = child.GetAttributes(attributes);
+    for (size_t i = 0; i < num_attributes; ++i) {
+      DWARFFormValue form_value;
+      if (!attributes.ExtractFormValueAtIndex(i, form_value)) {
+        LLDB_LOG(log, "CollectCallEdges: Could not extract TAG_call_site form");
+        break;
+      }
+
+      dw_attr_t attr = attributes.AttributeAtIndex(i);
+
+      // Extract DW_AT_call_origin (the call target's DIE).
+      if (attr == DW_AT_call_origin) {
+        call_origin = form_value.Reference();
+        if (!call_origin->IsValid()) {
+          LLDB_LOG(log, "CollectCallEdges: Invalid call origin in {0}",
+                   function_die.GetPubname());
+          break;
+        }
+      }
+
+      // Extract DW_AT_call_return_pc (the PC the call returns to) if it's
+      // available. It should only ever be unavailable for tail call edges, in
+      // which case use LLDB_INVALID_ADDRESS.
+      if (attr == DW_AT_call_return_pc)
+        return_pc = form_value.Address();
+
+      // Extract DW_AT_call_target (the location of the address of the indirect
+      // call).
+      if (attr == DW_AT_call_target) {
+        if (!DWARFFormValue::IsBlockForm(form_value.Form())) {
+          LLDB_LOG(log,
+                   "CollectCallEdges: AT_call_target does not have block form");
+          break;
+        }
+
+        auto data = child.GetData();
+        uint32_t block_offset = form_value.BlockData() - data.GetDataStart();
+        uint32_t block_length = form_value.Unsigned();
+        call_target = DWARFExpression(
+            module, DataExtractor(data, block_offset, block_length),
+            child.GetCU());
+      }
+    }
+    if (!call_origin && !call_target) {
+      LLDB_LOG(log, "CollectCallEdges: call site without any call target");
       continue;
     }
 
-    // Extract DW_AT_call_return_pc (the PC the call returns to) if it's
-    // available. It should only ever be unavailable for tail call edges, in
-    // which case use LLDB_INVALID_ADDRESS.
-    addr_t return_pc = child.GetAttributeValueAsAddress(DW_AT_call_return_pc,
-                                                        LLDB_INVALID_ADDRESS);
+    // Extract call site parameters.
+    CallSiteParameterArray parameters =
+        CollectCallSiteParameters(module, child);
 
-    LLDB_LOG(log, "CollectCallEdges: Found call origin: {0} (retn-PC: {1:x})",
-             call_origin.GetPubname(), return_pc);
-    call_edges.emplace_back(call_origin.GetMangledName(), return_pc);
+    std::unique_ptr<CallEdge> edge;
+    if (call_origin) {
+      LLDB_LOG(log, "CollectCallEdges: Found call origin: {0} (retn-PC: {1:x})",
+               call_origin->GetPubname(), return_pc);
+      edge = std::make_unique<DirectCallEdge>(call_origin->GetMangledName(),
+                                              return_pc, std::move(parameters));
+    } else {
+      if (log) {
+        StreamString call_target_desc;
+        call_target->GetDescription(&call_target_desc, eDescriptionLevelBrief,
+                                    LLDB_INVALID_ADDRESS, nullptr);
+        LLDB_LOG(log, "CollectCallEdges: Found indirect call target: {0}",
+                 call_target_desc.GetString());
+      }
+      edge = std::make_unique<IndirectCallEdge>(*call_target, return_pc,
+                                                std::move(parameters));
+    }
+
+    if (log && parameters.size()) {
+      for (const CallSiteParameter &param : parameters) {
+        StreamString callee_loc_desc, caller_loc_desc;
+        param.LocationInCallee.GetDescription(&callee_loc_desc,
+                                              eDescriptionLevelBrief,
+                                              LLDB_INVALID_ADDRESS, nullptr);
+        param.LocationInCaller.GetDescription(&caller_loc_desc,
+                                              eDescriptionLevelBrief,
+                                              LLDB_INVALID_ADDRESS, nullptr);
+        LLDB_LOG(log, "CollectCallEdges: \tparam: {0} => {1}",
+                 callee_loc_desc.GetString(), caller_loc_desc.GetString());
+      }
+    }
+
+    call_edges.push_back(std::move(edge));
   }
   return call_edges;
 }
 
-std::vector<lldb_private::CallEdge>
+std::vector<std::unique_ptr<lldb_private::CallEdge>>
 SymbolFileDWARF::ParseCallEdgesInFunction(UserID func_id) {
   DWARFDIE func_die = GetDIE(func_id.GetID());
   if (func_die.IsValid())
-    return CollectCallEdges(func_die);
+    return CollectCallEdges(GetObjectFile()->GetModule(), func_die);
   return {};
 }
 
@@ -3713,11 +3936,17 @@
 
 uint32_t SymbolFileDWARF::GetPluginVersion() { return 1; }
 
-void SymbolFileDWARF::Dump(lldb_private::Stream &s) { m_index->Dump(s); }
+void SymbolFileDWARF::Dump(lldb_private::Stream &s) {
+  SymbolFile::Dump(s);
+  m_index->Dump(s);
+}
 
 void SymbolFileDWARF::DumpClangAST(Stream &s) {
-  TypeSystem *ts = GetTypeSystemForLanguage(eLanguageTypeC_plus_plus);
-  ClangASTContext *clang = llvm::dyn_cast_or_null<ClangASTContext>(ts);
+  auto ts_or_err = GetTypeSystemForLanguage(eLanguageTypeC_plus_plus);
+  if (!ts_or_err)
+    return;
+  ClangASTContext *clang =
+      llvm::dyn_cast_or_null<ClangASTContext>(&ts_or_err.get());
   if (!clang)
     return;
   clang->Dump(s);
@@ -3727,28 +3956,19 @@
   if (m_debug_map_symfile == nullptr && !m_debug_map_module_wp.expired()) {
     lldb::ModuleSP module_sp(m_debug_map_module_wp.lock());
     if (module_sp) {
-      SymbolVendor *sym_vendor = module_sp->GetSymbolVendor();
-      if (sym_vendor)
-        m_debug_map_symfile =
-            (SymbolFileDWARFDebugMap *)sym_vendor->GetSymbolFile();
+      m_debug_map_symfile =
+          (SymbolFileDWARFDebugMap *)module_sp->GetSymbolFile();
     }
   }
   return m_debug_map_symfile;
 }
 
-DWARFExpression::LocationListFormat
-SymbolFileDWARF::GetLocationListFormat() const {
-  if (m_data_debug_loclists.m_data.GetByteSize() > 0)
-    return DWARFExpression::LocLists;
-  return DWARFExpression::RegularLocationList;
-}
-
 SymbolFileDWARFDwp *SymbolFileDWARF::GetDwpSymbolFile() {
   llvm::call_once(m_dwp_symfile_once_flag, [this]() {
     ModuleSpec module_spec;
-    module_spec.GetFileSpec() = m_obj_file->GetFileSpec();
+    module_spec.GetFileSpec() = m_objfile_sp->GetFileSpec();
     module_spec.GetSymbolFileSpec() =
-        FileSpec(m_obj_file->GetFileSpec().GetPath() + ".dwp");
+        FileSpec(m_objfile_sp->GetFileSpec().GetPath() + ".dwp");
 
     FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
     FileSpec dwp_filespec =
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
index 018af47..23e2673 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
@@ -21,7 +21,6 @@
 
 #include "lldb/Core/UniqueCStringMap.h"
 #include "lldb/Core/dwarf.h"
-#include "lldb/Expression/DWARFExpression.h"
 #include "lldb/Symbol/DebugMacros.h"
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Symbol/SymbolFile.h"
@@ -46,7 +45,7 @@
 class DWARFDebugInfo;
 class DWARFDebugInfoEntry;
 class DWARFDebugLine;
-class DWARFDebugRangesBase;
+class DWARFDebugRanges;
 class DWARFDeclContext;
 class DWARFFormValue;
 class DWARFTypeUnit;
@@ -58,7 +57,18 @@
 
 class SymbolFileDWARF : public lldb_private::SymbolFile,
                         public lldb_private::UserID {
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
+  /// LLVM RTTI support.
+  /// \{
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || SymbolFile::isA(ClassID);
+  }
+  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
+  /// \}
+
   friend class SymbolFileDWARFDebugMap;
   friend class SymbolFileDWARFDwo;
   friend class DebugMapModule;
@@ -78,13 +88,13 @@
   static const char *GetPluginDescriptionStatic();
 
   static lldb_private::SymbolFile *
-  CreateInstance(lldb_private::ObjectFile *obj_file);
+  CreateInstance(lldb::ObjectFileSP objfile_sp);
 
   static lldb_private::FileSpecList GetSymlinkPaths();
 
   // Constructors and Destructors
 
-  SymbolFileDWARF(lldb_private::ObjectFile *ofile,
+  SymbolFileDWARF(lldb::ObjectFileSP objfile_sp,
                   lldb_private::SectionList *dwo_section_list);
 
   ~SymbolFileDWARF() override;
@@ -95,10 +105,6 @@
 
   // Compile Unit function calls
 
-  uint32_t GetNumCompileUnits() override;
-
-  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
-
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
@@ -108,6 +114,10 @@
 
   bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override;
 
+  bool ForEachExternalModule(
+      lldb_private::CompileUnit &, llvm::DenseSet<lldb_private::SymbolFile *> &,
+      llvm::function_ref<bool(lldb_private::Module &)>) override;
+
   bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit,
                          lldb_private::FileSpecList &support_files) override;
 
@@ -156,47 +166,47 @@
                        lldb::SymbolContextItem resolve_scope,
                        lldb_private::SymbolContextList &sc_list) override;
 
-  uint32_t
+  void
   FindGlobalVariables(lldb_private::ConstString name,
                       const lldb_private::CompilerDeclContext *parent_decl_ctx,
                       uint32_t max_matches,
                       lldb_private::VariableList &variables) override;
 
-  uint32_t FindGlobalVariables(const lldb_private::RegularExpression &regex,
-                               uint32_t max_matches,
-                               lldb_private::VariableList &variables) override;
+  void FindGlobalVariables(const lldb_private::RegularExpression &regex,
+                           uint32_t max_matches,
+                           lldb_private::VariableList &variables) override;
 
-  uint32_t
-  FindFunctions(lldb_private::ConstString name,
-                const lldb_private::CompilerDeclContext *parent_decl_ctx,
-                lldb::FunctionNameType name_type_mask, bool include_inlines,
-                bool append, lldb_private::SymbolContextList &sc_list) override;
+  void FindFunctions(lldb_private::ConstString name,
+                     const lldb_private::CompilerDeclContext *parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
+                     bool include_inlines,
+                     lldb_private::SymbolContextList &sc_list) override;
 
-  uint32_t FindFunctions(const lldb_private::RegularExpression &regex,
-                         bool include_inlines, bool append,
-                         lldb_private::SymbolContextList &sc_list) override;
+  void FindFunctions(const lldb_private::RegularExpression &regex,
+                     bool include_inlines,
+                     lldb_private::SymbolContextList &sc_list) override;
 
   void GetMangledNamesForFunction(
       const std::string &scope_qualified_name,
       std::vector<lldb_private::ConstString> &mangled_names) override;
 
-  uint32_t
+  void
   FindTypes(lldb_private::ConstString name,
             const lldb_private::CompilerDeclContext *parent_decl_ctx,
-            bool append, uint32_t max_matches,
+            uint32_t max_matches,
             llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
             lldb_private::TypeMap &types) override;
 
-  size_t FindTypes(const std::vector<lldb_private::CompilerContext> &context,
-                   bool append, lldb_private::TypeMap &types) override;
+  void FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> pattern,
+                 lldb_private::LanguageSet languages,
+                 llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+                 lldb_private::TypeMap &types) override;
 
-  lldb_private::TypeList *GetTypeList() override;
+  void GetTypes(lldb_private::SymbolContextScope *sc_scope,
+                lldb::TypeClass type_mask,
+                lldb_private::TypeList &type_list) override;
 
-  size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
-                  lldb::TypeClass type_mask,
-                  lldb_private::TypeList &type_list) override;
-
-  lldb_private::TypeSystem *
+  llvm::Expected<lldb_private::TypeSystem &>
   GetTypeSystemForLanguage(lldb::LanguageType language) override;
 
   lldb_private::CompilerDeclContext FindNamespace(
@@ -212,9 +222,6 @@
 
   uint32_t GetPluginVersion() override;
 
-  const lldb_private::DWARFDataExtractor &get_debug_loc_data();
-  const lldb_private::DWARFDataExtractor &get_debug_loclists_data();
-
   DWARFDebugAbbrev *DebugAbbrev();
 
   const DWARFDebugAbbrev *DebugAbbrev() const;
@@ -223,10 +230,7 @@
 
   const DWARFDebugInfo *DebugInfo() const;
 
-  DWARFDebugRangesBase *GetDebugRanges();
-  DWARFDebugRangesBase *GetDebugRngLists();
-
-  const lldb_private::DWARFDataExtractor &DebugLocData();
+  DWARFDebugRanges *GetDebugRanges();
 
   static bool SupportedVersion(uint16_t version);
 
@@ -250,10 +254,7 @@
 
   virtual lldb::CompUnitSP ParseCompileUnit(DWARFCompileUnit &dwarf_cu);
 
-  virtual lldb_private::DWARFExpression::LocationListFormat
-  GetLocationListFormat() const;
-
-  lldb::ModuleSP GetDWOModule(lldb_private::ConstString name);
+  lldb::ModuleSP GetExternalModule(lldb_private::ConstString name);
 
   typedef std::map<lldb_private::ConstString, lldb::ModuleSP>
       ExternalTypeModuleMap;
@@ -277,7 +278,7 @@
 
   lldb::user_id_t GetUID(DIERef ref);
 
-  virtual std::unique_ptr<SymbolFileDWARFDwo>
+  std::unique_ptr<SymbolFileDWARFDwo>
   GetDwoSymbolFileForCompileUnit(DWARFUnit &dwarf_cu,
                                  const DWARFDebugInfoEntry &cu_die);
 
@@ -288,11 +289,14 @@
 
   virtual llvm::Optional<uint32_t> GetDwoNum() { return llvm::None; }
 
+  /// If this is a DWARF object with a single CU, return its DW_AT_dwo_id.
+  llvm::Optional<uint64_t> GetDWOId();
+
   static bool
   DIEInDeclContext(const lldb_private::CompilerDeclContext *parent_decl_ctx,
                    const DWARFDIE &die);
 
-  std::vector<lldb_private::CallEdge>
+  std::vector<std::unique_ptr<lldb_private::CallEdge>>
   ParseCallEdgesInFunction(UserID func_id) override;
 
   void Dump(lldb_private::Stream &s) override;
@@ -331,6 +335,12 @@
   bool DeclContextMatchesThisSymbolFile(
       const lldb_private::CompilerDeclContext *decl_ctx);
 
+  uint32_t CalculateNumCompileUnits() override;
+
+  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
+
+  lldb_private::TypeList &GetTypeList() override;
+
   virtual DWARFUnit *
   GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit);
 
@@ -477,8 +487,7 @@
   typedef std::set<lldb::user_id_t> DIERefSet;
   typedef llvm::StringMap<DIERefSet> NameToOffsetMap;
   NameToOffsetMap m_function_scope_qualified_name_map;
-  std::unique_ptr<DWARFDebugRangesBase> m_ranges;
-  std::unique_ptr<DWARFDebugRangesBase> m_rnglists;
+  std::unique_ptr<DWARFDebugRanges> m_ranges;
   UniqueDWARFASTTypeMap m_unique_ast_type_map;
   DIEToTypePtr m_die_to_type;
   DIEToVariableSP m_die_to_variable_sp;
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 8ec64db..cce666a 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -39,9 +39,11 @@
 using namespace lldb;
 using namespace lldb_private;
 
+char SymbolFileDWARFDebugMap::ID;
+
 // Subclass lldb_private::Module so we can intercept the
 // "Module::GetObjectFile()" (so we can fixup the object file sections) and
-// also for "Module::GetSymbolVendor()" (so we can fixup the symbol file id.
+// also for "Module::GetSymbolFile()" (so we can fixup the symbol file id.
 
 const SymbolFileDWARFDebugMap::FileRangeMap &
 SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(
@@ -60,11 +62,11 @@
     return file_range_map;
 
   Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_MAP));
-  if (log)
-    log->Printf(
-        "%p: SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap ('%s')",
-        static_cast<void *>(this),
-        oso_module->GetSpecificationDescription().c_str());
+  LLDB_LOGF(
+      log,
+      "%p: SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap ('%s')",
+      static_cast<void *>(this),
+      oso_module->GetSpecificationDescription().c_str());
 
   std::vector<SymbolFileDWARFDebugMap::CompileUnitInfo *> cu_infos;
   if (exe_symfile->GetCompUnitInfosForModule(oso_module, cu_infos)) {
@@ -173,12 +175,12 @@
 
   ~DebugMapModule() override = default;
 
-  SymbolVendor *
-  GetSymbolVendor(bool can_create = true,
-                  lldb_private::Stream *feedback_strm = nullptr) override {
+  SymbolFile *
+  GetSymbolFile(bool can_create = true,
+                lldb_private::Stream *feedback_strm = nullptr) override {
     // Scope for locker
     if (m_symfile_up.get() || !can_create)
-      return m_symfile_up.get();
+      return m_symfile_up ? m_symfile_up->GetSymbolFile() : nullptr;
 
     ModuleSP exe_module_sp(m_exe_module_wp.lock());
     if (exe_module_sp) {
@@ -186,30 +188,28 @@
       ObjectFile *oso_objfile = GetObjectFile();
       if (oso_objfile) {
         std::lock_guard<std::recursive_mutex> guard(m_mutex);
-        SymbolVendor *symbol_vendor =
-            Module::GetSymbolVendor(can_create, feedback_strm);
-        if (symbol_vendor) {
+        if (SymbolFile *symfile =
+                Module::GetSymbolFile(can_create, feedback_strm)) {
           // Set a pointer to this class to set our OSO DWARF file know that
           // the DWARF is being used along with a debug map and that it will
           // have the remapped sections that we do below.
           SymbolFileDWARF *oso_symfile =
-              SymbolFileDWARFDebugMap::GetSymbolFileAsSymbolFileDWARF(
-                  symbol_vendor->GetSymbolFile());
+              SymbolFileDWARFDebugMap::GetSymbolFileAsSymbolFileDWARF(symfile);
 
           if (!oso_symfile)
             return nullptr;
 
           ObjectFile *exe_objfile = exe_module_sp->GetObjectFile();
-          SymbolVendor *exe_sym_vendor = exe_module_sp->GetSymbolVendor();
+          SymbolFile *exe_symfile = exe_module_sp->GetSymbolFile();
 
-          if (exe_objfile && exe_sym_vendor) {
+          if (exe_objfile && exe_symfile) {
             oso_symfile->SetDebugMapModule(exe_module_sp);
             // Set the ID of the symbol file DWARF to the index of the OSO
             // shifted left by 32 bits to provide a unique prefix for any
             // UserID's that get created in the symbol file.
             oso_symfile->SetID(((uint64_t)m_cu_idx + 1ull) << 32ull);
           }
-          return symbol_vendor;
+          return symfile;
         }
       }
     }
@@ -239,13 +239,13 @@
   return "DWARF and DWARF3 debug symbol file reader (debug map).";
 }
 
-SymbolFile *SymbolFileDWARFDebugMap::CreateInstance(ObjectFile *obj_file) {
-  return new SymbolFileDWARFDebugMap(obj_file);
+SymbolFile *SymbolFileDWARFDebugMap::CreateInstance(ObjectFileSP objfile_sp) {
+  return new SymbolFileDWARFDebugMap(std::move(objfile_sp));
 }
 
-SymbolFileDWARFDebugMap::SymbolFileDWARFDebugMap(ObjectFile *ofile)
-    : SymbolFile(ofile), m_flags(), m_compile_unit_infos(), m_func_indexes(),
-      m_glob_indexes(),
+SymbolFileDWARFDebugMap::SymbolFileDWARFDebugMap(ObjectFileSP objfile_sp)
+    : SymbolFile(std::move(objfile_sp)), m_flags(), m_compile_unit_infos(),
+      m_func_indexes(), m_glob_indexes(),
       m_supports_DW_AT_APPLE_objc_complete_type(eLazyBoolCalculate) {}
 
 SymbolFileDWARFDebugMap::~SymbolFileDWARFDebugMap() {}
@@ -260,12 +260,12 @@
 
   // If the object file has been stripped, there is no sense in looking further
   // as all of the debug symbols for the debug map will not be available
-  if (m_obj_file->IsStripped())
+  if (m_objfile_sp->IsStripped())
     return;
 
   // Also make sure the file type is some sort of executable. Core files, debug
   // info files (dSYM), object files (.o files), and stub libraries all can
-  switch (m_obj_file->GetType()) {
+  switch (m_objfile_sp->GetType()) {
   case ObjectFile::eTypeInvalid:
   case ObjectFile::eTypeCoreFile:
   case ObjectFile::eTypeDebugInfo:
@@ -286,7 +286,7 @@
   // these files exist and also contain valid DWARF. If we get any of that then
   // we return the abilities of the first N_OSO's DWARF.
 
-  Symtab *symtab = m_obj_file->GetSymtab();
+  Symtab *symtab = m_objfile_sp->GetSymtab();
   if (symtab) {
     Log *log(LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_MAP));
 
@@ -352,7 +352,7 @@
           // The sibling index can't be less that or equal to the current index
           // "i"
           if (sibling_idx == UINT32_MAX) {
-            m_obj_file->GetModule()->ReportError(
+            m_objfile_sp->GetModule()->ReportError(
                 "N_SO in symbol with UID %u has invalid sibling in debug map, "
                 "please file a bug and attach the binary listed in this error",
                 so_symbol->GetID());
@@ -363,28 +363,27 @@
             m_compile_unit_infos[i].first_symbol_id = so_symbol->GetID();
             m_compile_unit_infos[i].last_symbol_id = last_symbol->GetID();
 
-            if (log)
-              log->Printf("Initialized OSO 0x%8.8x: file=%s", i,
-                          oso_symbol->GetName().GetCString());
+            LLDB_LOGF(log, "Initialized OSO 0x%8.8x: file=%s", i,
+                      oso_symbol->GetName().GetCString());
           }
         } else {
           if (oso_symbol == nullptr)
-            m_obj_file->GetModule()->ReportError(
+            m_objfile_sp->GetModule()->ReportError(
                 "N_OSO symbol[%u] can't be found, please file a bug and attach "
                 "the binary listed in this error",
                 oso_idx);
           else if (so_symbol == nullptr)
-            m_obj_file->GetModule()->ReportError(
+            m_objfile_sp->GetModule()->ReportError(
                 "N_SO not found for N_OSO symbol[%u], please file a bug and "
                 "attach the binary listed in this error",
                 oso_idx);
           else if (so_symbol->GetType() != eSymbolTypeSourceFile)
-            m_obj_file->GetModule()->ReportError(
+            m_objfile_sp->GetModule()->ReportError(
                 "N_SO has incorrect symbol type (%u) for N_OSO symbol[%u], "
                 "please file a bug and attach the binary listed in this error",
                 so_symbol->GetType(), oso_idx);
           else if (oso_symbol->GetType() != eSymbolTypeSourceFile)
-            m_obj_file->GetModule()->ReportError(
+            m_objfile_sp->GetModule()->ReportError(
                 "N_OSO has incorrect symbol type (%u) for N_OSO symbol[%u], "
                 "please file a bug and attach the binary listed in this error",
                 oso_symbol->GetType(), oso_idx);
@@ -421,7 +420,11 @@
         // than the one from the CU.
         auto oso_mod_time = std::chrono::time_point_cast<std::chrono::seconds>(
             FileSystem::Instance().GetModificationTime(oso_file));
-        if (oso_mod_time != comp_unit_info->oso_mod_time) {
+        // A timestamp of 0 means that the linker was in deterministic mode. In
+        // that case, we should skip the check against the filesystem last
+        // modification timestamp, since it will never match.
+        if (comp_unit_info->oso_mod_time != llvm::sys::TimePoint<>() &&
+            oso_mod_time != comp_unit_info->oso_mod_time) {
           obj_file->GetModule()->ReportError(
               "debug map object file '%s' has changed (actual time is "
               "%s, debug map time is %s"
@@ -448,7 +451,7 @@
       // since .o files for "i386-apple-ios" will historically show up as "i386
       // -apple-macosx" due to the lack of a LC_VERSION_MIN_MACOSX or
       // LC_VERSION_MIN_IPHONEOS load command...
-      oso_arch.SetTriple(m_obj_file->GetModule()
+      oso_arch.SetTriple(m_objfile_sp->GetModule()
                              ->GetArchitecture()
                              .GetTriple()
                              .getArchName()
@@ -534,12 +537,8 @@
 
 SymbolFileDWARF *SymbolFileDWARFDebugMap::GetSymbolFileByCompUnitInfo(
     CompileUnitInfo *comp_unit_info) {
-  Module *oso_module = GetModuleByCompUnitInfo(comp_unit_info);
-  if (oso_module) {
-    SymbolVendor *sym_vendor = oso_module->GetSymbolVendor();
-    if (sym_vendor)
-      return GetSymbolFileAsSymbolFileDWARF(sym_vendor->GetSymbolFile());
-  }
+  if (Module *oso_module = GetModuleByCompUnitInfo(comp_unit_info))
+    return GetSymbolFileAsSymbolFileDWARF(oso_module->GetSymbolFile());
   return nullptr;
 }
 
@@ -562,7 +561,7 @@
   return 0;
 }
 
-uint32_t SymbolFileDWARFDebugMap::GetNumCompileUnits() {
+uint32_t SymbolFileDWARFDebugMap::CalculateNumCompileUnits() {
   InitOSO();
   return m_compile_unit_infos.size();
 }
@@ -581,13 +580,12 @@
         lldb::user_id_t cu_id = 0;
         m_compile_unit_infos[cu_idx].compile_unit_sp =
             std::make_shared<CompileUnit>(
-                m_obj_file->GetModule(), nullptr, so_file_spec, cu_id,
+                m_objfile_sp->GetModule(), nullptr, so_file_spec, cu_id,
                 eLanguageTypeUnknown, eLazyBoolCalculate);
 
         if (m_compile_unit_infos[cu_idx].compile_unit_sp) {
-          // Let our symbol vendor know about this compile unit
-          m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex(
-              cu_idx, m_compile_unit_infos[cu_idx].compile_unit_sp);
+          SetCompileUnitAtIndex(cu_idx,
+                                m_compile_unit_infos[cu_idx].compile_unit_sp);
         }
       }
     }
@@ -606,7 +604,7 @@
 SymbolFileDWARFDebugMap::GetCompUnitInfo(const CompileUnit &comp_unit) {
   const uint32_t cu_count = GetNumCompileUnits();
   for (uint32_t i = 0; i < cu_count; ++i) {
-    if (comp_unit == m_compile_unit_infos[i].compile_unit_sp.get())
+    if (&comp_unit == m_compile_unit_infos[i].compile_unit_sp.get())
       return &m_compile_unit_infos[i];
   }
   return nullptr;
@@ -625,6 +623,7 @@
 
 lldb::LanguageType
 SymbolFileDWARFDebugMap::ParseLanguage(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
   if (oso_dwarf)
     return oso_dwarf->ParseLanguage(comp_unit);
@@ -632,6 +631,7 @@
 }
 
 size_t SymbolFileDWARFDebugMap::ParseFunctions(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
   if (oso_dwarf)
     return oso_dwarf->ParseFunctions(comp_unit);
@@ -639,6 +639,7 @@
 }
 
 bool SymbolFileDWARFDebugMap::ParseLineTable(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
   if (oso_dwarf)
     return oso_dwarf->ParseLineTable(comp_unit);
@@ -646,14 +647,27 @@
 }
 
 bool SymbolFileDWARFDebugMap::ParseDebugMacros(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
   if (oso_dwarf)
     return oso_dwarf->ParseDebugMacros(comp_unit);
   return false;
 }
 
+bool SymbolFileDWARFDebugMap::ForEachExternalModule(
+    CompileUnit &comp_unit,
+    llvm::DenseSet<lldb_private::SymbolFile *> &visited_symbol_files,
+    llvm::function_ref<bool(Module &)> f) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+  SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
+  if (oso_dwarf)
+    return oso_dwarf->ForEachExternalModule(comp_unit, visited_symbol_files, f);
+  return false;
+}
+
 bool SymbolFileDWARFDebugMap::ParseSupportFiles(CompileUnit &comp_unit,
                                                 FileSpecList &support_files) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
   if (oso_dwarf)
     return oso_dwarf->ParseSupportFiles(comp_unit, support_files);
@@ -661,6 +675,7 @@
 }
 
 bool SymbolFileDWARFDebugMap::ParseIsOptimized(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
   if (oso_dwarf)
     return oso_dwarf->ParseIsOptimized(comp_unit);
@@ -669,6 +684,7 @@
 
 bool SymbolFileDWARFDebugMap::ParseImportedModules(
     const SymbolContext &sc, std::vector<SourceModule> &imported_modules) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(sc);
   if (oso_dwarf)
     return oso_dwarf->ParseImportedModules(sc, imported_modules);
@@ -676,6 +692,7 @@
 }
 
 size_t SymbolFileDWARFDebugMap::ParseBlocksRecursive(Function &func) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   CompileUnit *comp_unit = func.GetCompileUnit();
   if (!comp_unit)
     return 0;
@@ -687,6 +704,7 @@
 }
 
 size_t SymbolFileDWARFDebugMap::ParseTypes(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(comp_unit);
   if (oso_dwarf)
     return oso_dwarf->ParseTypes(comp_unit);
@@ -695,6 +713,7 @@
 
 size_t
 SymbolFileDWARFDebugMap::ParseVariablesForContext(const SymbolContext &sc) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   SymbolFileDWARF *oso_dwarf = GetSymbolFile(sc);
   if (oso_dwarf)
     return oso_dwarf->ParseVariablesForContext(sc);
@@ -702,6 +721,7 @@
 }
 
 Type *SymbolFileDWARFDebugMap::ResolveTypeUID(lldb::user_id_t type_uid) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   const uint64_t oso_idx = GetOSOIndexFromUserID(type_uid);
   SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex(oso_idx);
   if (oso_dwarf)
@@ -738,8 +758,9 @@
 SymbolFileDWARFDebugMap::ResolveSymbolContext(const Address &exe_so_addr,
                                               SymbolContextItem resolve_scope,
                                               SymbolContext &sc) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   uint32_t resolved_flags = 0;
-  Symtab *symtab = m_obj_file->GetSymtab();
+  Symtab *symtab = m_objfile_sp->GetSymtab();
   if (symtab) {
     const addr_t exe_file_addr = exe_so_addr.GetFileAddress();
 
@@ -766,7 +787,7 @@
             Address oso_so_addr;
             if (oso_module->ResolveFileAddress(oso_file_addr, oso_so_addr)) {
               resolved_flags |=
-                  oso_module->GetSymbolVendor()->ResolveSymbolContext(
+                  oso_module->GetSymbolFile()->ResolveSymbolContext(
                       oso_so_addr, resolve_scope, sc);
             }
           }
@@ -780,6 +801,7 @@
 uint32_t SymbolFileDWARFDebugMap::ResolveSymbolContext(
     const FileSpec &file_spec, uint32_t line, bool check_inlines,
     SymbolContextItem resolve_scope, SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   const uint32_t initial = sc_list.GetSize();
   const uint32_t cu_count = GetNumCompileUnits();
 
@@ -790,12 +812,8 @@
 
     if (!resolve) {
       FileSpec so_file_spec;
-      if (GetFileSpecForSO(i, so_file_spec)) {
-        // Match the full path if the incoming file_spec has a directory (not
-        // just a basename)
-        const bool full_match = (bool)file_spec.GetDirectory();
-        resolve = FileSpec::Equal(file_spec, so_file_spec, full_match);
-      }
+      if (GetFileSpecForSO(i, so_file_spec))
+        resolve = FileSpec::Match(file_spec, so_file_spec);
     }
     if (resolve) {
       SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex(i);
@@ -807,12 +825,11 @@
   return sc_list.GetSize() - initial;
 }
 
-uint32_t SymbolFileDWARFDebugMap::PrivateFindGlobalVariables(
+void SymbolFileDWARFDebugMap::PrivateFindGlobalVariables(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
     const std::vector<uint32_t>
         &indexes, // Indexes into the symbol table that match "name"
     uint32_t max_matches, VariableList &variables) {
-  const uint32_t original_size = variables.GetSize();
   const size_t match_count = indexes.size();
   for (size_t i = 0; i < match_count; ++i) {
     uint32_t oso_idx;
@@ -821,28 +838,26 @@
     if (comp_unit_info) {
       SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex(oso_idx);
       if (oso_dwarf) {
-        if (oso_dwarf->FindGlobalVariables(name, parent_decl_ctx, max_matches,
-                                           variables))
-          if (variables.GetSize() > max_matches)
-            break;
+        oso_dwarf->FindGlobalVariables(name, parent_decl_ctx, max_matches,
+                                       variables);
+        if (variables.GetSize() > max_matches)
+          break;
       }
     }
   }
-  return variables.GetSize() - original_size;
 }
 
-uint32_t SymbolFileDWARFDebugMap::FindGlobalVariables(
+void SymbolFileDWARFDebugMap::FindGlobalVariables(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
     uint32_t max_matches, VariableList &variables) {
-
-  // Remember how many variables are in the list before we search.
-  const uint32_t original_size = variables.GetSize();
-
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   uint32_t total_matches = 0;
 
   ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
-    const uint32_t oso_matches = oso_dwarf->FindGlobalVariables(
-        name, parent_decl_ctx, max_matches, variables);
+    const uint32_t old_size = variables.GetSize();
+    oso_dwarf->FindGlobalVariables(name, parent_decl_ctx, max_matches,
+                                   variables);
+    const uint32_t oso_matches = variables.GetSize() - old_size;
     if (oso_matches > 0) {
       total_matches += oso_matches;
 
@@ -861,22 +876,18 @@
 
     return false;
   });
-
-  // Return the number of variable that were appended to the list
-  return variables.GetSize() - original_size;
 }
 
-uint32_t
-SymbolFileDWARFDebugMap::FindGlobalVariables(const RegularExpression &regex,
-                                             uint32_t max_matches,
-                                             VariableList &variables) {
-  // Remember how many variables are in the list before we search.
-  const uint32_t original_size = variables.GetSize();
-
+void SymbolFileDWARFDebugMap::FindGlobalVariables(
+    const RegularExpression &regex, uint32_t max_matches,
+    VariableList &variables) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   uint32_t total_matches = 0;
   ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
-    const uint32_t oso_matches =
-        oso_dwarf->FindGlobalVariables(regex, max_matches, variables);
+    const uint32_t old_size = variables.GetSize();
+    oso_dwarf->FindGlobalVariables(regex, max_matches, variables);
+
+    const uint32_t oso_matches = variables.GetSize() - old_size;
     if (oso_matches > 0) {
       total_matches += oso_matches;
 
@@ -895,9 +906,6 @@
 
     return false;
   });
-
-  // Return the number of variable that were appended to the list
-  return variables.GetSize() - original_size;
 }
 
 int SymbolFileDWARFDebugMap::SymbolContainsSymbolWithIndex(
@@ -993,71 +1001,58 @@
   }
 }
 
-uint32_t SymbolFileDWARFDebugMap::FindFunctions(
+void SymbolFileDWARFDebugMap::FindFunctions(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    FunctionNameType name_type_mask, bool include_inlines, bool append,
+    FunctionNameType name_type_mask, bool include_inlines,
     SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat,
                      "SymbolFileDWARFDebugMap::FindFunctions (name = %s)",
                      name.GetCString());
 
-  uint32_t initial_size = 0;
-  if (append)
-    initial_size = sc_list.GetSize();
-  else
-    sc_list.Clear();
-
   ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
     uint32_t sc_idx = sc_list.GetSize();
-    if (oso_dwarf->FindFunctions(name, parent_decl_ctx, name_type_mask,
-                                 include_inlines, true, sc_list)) {
-      RemoveFunctionsWithModuleNotEqualTo(m_obj_file->GetModule(), sc_list,
+    oso_dwarf->FindFunctions(name, parent_decl_ctx, name_type_mask,
+                             include_inlines, sc_list);
+    if (!sc_list.IsEmpty()) {
+      RemoveFunctionsWithModuleNotEqualTo(m_objfile_sp->GetModule(), sc_list,
                                           sc_idx);
     }
     return false;
   });
-
-  return sc_list.GetSize() - initial_size;
 }
 
-uint32_t SymbolFileDWARFDebugMap::FindFunctions(const RegularExpression &regex,
-                                                bool include_inlines,
-                                                bool append,
-                                                SymbolContextList &sc_list) {
+void SymbolFileDWARFDebugMap::FindFunctions(const RegularExpression &regex,
+                                            bool include_inlines,
+                                            SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat,
                      "SymbolFileDWARFDebugMap::FindFunctions (regex = '%s')",
                      regex.GetText().str().c_str());
 
-  uint32_t initial_size = 0;
-  if (append)
-    initial_size = sc_list.GetSize();
-  else
-    sc_list.Clear();
-
   ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
     uint32_t sc_idx = sc_list.GetSize();
 
-    if (oso_dwarf->FindFunctions(regex, include_inlines, true, sc_list)) {
-      RemoveFunctionsWithModuleNotEqualTo(m_obj_file->GetModule(), sc_list,
+    oso_dwarf->FindFunctions(regex, include_inlines, sc_list);
+    if (!sc_list.IsEmpty()) {
+      RemoveFunctionsWithModuleNotEqualTo(m_objfile_sp->GetModule(), sc_list,
                                           sc_idx);
     }
     return false;
   });
-
-  return sc_list.GetSize() - initial_size;
 }
 
-size_t SymbolFileDWARFDebugMap::GetTypes(SymbolContextScope *sc_scope,
-                                         lldb::TypeClass type_mask,
-                                         TypeList &type_list) {
+void SymbolFileDWARFDebugMap::GetTypes(SymbolContextScope *sc_scope,
+                                       lldb::TypeClass type_mask,
+                                       TypeList &type_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat,
                      "SymbolFileDWARFDebugMap::GetTypes (type_mask = 0x%8.8x)",
                      type_mask);
 
-  uint32_t initial_size = type_list.GetSize();
   SymbolFileDWARF *oso_dwarf = nullptr;
   if (sc_scope) {
     SymbolContext sc;
@@ -1075,10 +1070,9 @@
       return false;
     });
   }
-  return type_list.GetSize() - initial_size;
 }
 
-std::vector<lldb_private::CallEdge>
+std::vector<std::unique_ptr<lldb_private::CallEdge>>
 SymbolFileDWARFDebugMap::ParseCallEdgesInFunction(UserID func_id) {
   uint32_t oso_idx = GetOSOIndexFromUserID(func_id.GetID());
   SymbolFileDWARF *oso_dwarf = GetSymbolFileByOSOIndex(oso_idx);
@@ -1124,7 +1118,7 @@
   // N_SO.
   SymbolFileDWARF *oso_dwarf = nullptr;
   TypeSP type_sp;
-  ObjectFile *module_objfile = m_obj_file->GetModule()->GetObjectFile();
+  ObjectFile *module_objfile = m_objfile_sp->GetModule()->GetObjectFile();
   if (module_objfile) {
     Symtab *symtab = module_objfile->GetSymtab();
     if (symtab) {
@@ -1177,23 +1171,27 @@
   return TypeSP();
 }
 
-uint32_t SymbolFileDWARFDebugMap::FindTypes(
+void SymbolFileDWARFDebugMap::FindTypes(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    bool append, uint32_t max_matches,
+    uint32_t max_matches,
     llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
     TypeMap &types) {
-  if (!append)
-    types.Clear();
-
-  const uint32_t initial_types_size = types.GetSize();
-
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
-    oso_dwarf->FindTypes(name, parent_decl_ctx, append, max_matches,
+    oso_dwarf->FindTypes(name, parent_decl_ctx, max_matches,
                          searched_symbol_files, types);
     return types.GetSize() >= max_matches;
   });
+}
 
-  return types.GetSize() - initial_types_size;
+void SymbolFileDWARFDebugMap::FindTypes(
+    llvm::ArrayRef<CompilerContext> context, LanguageSet languages,
+    llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
+    TypeMap &types) {
+  ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
+    oso_dwarf->FindTypes(context, languages, searched_symbol_files, types);
+    return false;
+  });
 }
 
 //
@@ -1212,6 +1210,7 @@
 CompilerDeclContext SymbolFileDWARFDebugMap::FindNamespace(
     lldb_private::ConstString name,
     const CompilerDeclContext *parent_decl_ctx) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   CompilerDeclContext matching_namespace;
 
   ForEachSymbolFile([&](SymbolFileDWARF *oso_dwarf) -> bool {
@@ -1284,8 +1283,7 @@
                  cu_sp.get());
         } else {
           m_compile_unit_infos[cu_idx].compile_unit_sp = cu_sp;
-          m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex(
-              cu_idx, cu_sp);
+          SetCompileUnitAtIndex(cu_idx, cu_sp);
         }
       }
     }
@@ -1388,8 +1386,8 @@
   if (addr_module == exe_module)
     return true; // Address is already in terms of the main executable module
 
-  CompileUnitInfo *cu_info = GetCompileUnitInfo(GetSymbolFileAsSymbolFileDWARF(
-      addr_module->GetSymbolVendor()->GetSymbolFile()));
+  CompileUnitInfo *cu_info = GetCompileUnitInfo(
+      GetSymbolFileAsSymbolFileDWARF(addr_module->GetSymbolFile()));
   if (cu_info) {
     const lldb::addr_t oso_file_addr = addr.GetFileAddress();
     const FileRangeMap::Entry *oso_range_entry =
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
index afc6142..035a902 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -23,7 +23,18 @@
 class DWARFDeclContext;
 
 class SymbolFileDWARFDebugMap : public lldb_private::SymbolFile {
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
+  /// LLVM RTTI support.
+  /// \{
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || SymbolFile::isA(ClassID);
+  }
+  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
+  /// \}
+
   // Static Functions
   static void Initialize();
 
@@ -34,19 +45,16 @@
   static const char *GetPluginDescriptionStatic();
 
   static lldb_private::SymbolFile *
-  CreateInstance(lldb_private::ObjectFile *obj_file);
+  CreateInstance(lldb::ObjectFileSP objfile_sp);
 
   // Constructors and Destructors
-  SymbolFileDWARFDebugMap(lldb_private::ObjectFile *ofile);
+  SymbolFileDWARFDebugMap(lldb::ObjectFileSP objfile_sp);
   ~SymbolFileDWARFDebugMap() override;
 
   uint32_t CalculateAbilities() override;
   void InitializeObject() override;
 
   // Compile Unit function calls
-  uint32_t GetNumCompileUnits() override;
-  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
-
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
@@ -56,6 +64,10 @@
 
   bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override;
 
+  bool ForEachExternalModule(
+      lldb_private::CompileUnit &, llvm::DenseSet<lldb_private::SymbolFile *> &,
+      llvm::function_ref<bool(lldb_private::Module &)>) override;
+
   bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit,
                          lldb_private::FileSpecList &support_files) override;
 
@@ -91,35 +103,40 @@
                        bool check_inlines,
                        lldb::SymbolContextItem resolve_scope,
                        lldb_private::SymbolContextList &sc_list) override;
-  uint32_t
+  void
   FindGlobalVariables(lldb_private::ConstString name,
                       const lldb_private::CompilerDeclContext *parent_decl_ctx,
                       uint32_t max_matches,
                       lldb_private::VariableList &variables) override;
-  uint32_t FindGlobalVariables(const lldb_private::RegularExpression &regex,
-                               uint32_t max_matches,
-                               lldb_private::VariableList &variables) override;
-  uint32_t
-  FindFunctions(lldb_private::ConstString name,
-                const lldb_private::CompilerDeclContext *parent_decl_ctx,
-                lldb::FunctionNameType name_type_mask, bool include_inlines,
-                bool append, lldb_private::SymbolContextList &sc_list) override;
-  uint32_t FindFunctions(const lldb_private::RegularExpression &regex,
-                         bool include_inlines, bool append,
-                         lldb_private::SymbolContextList &sc_list) override;
-  uint32_t
+  void FindGlobalVariables(const lldb_private::RegularExpression &regex,
+                           uint32_t max_matches,
+                           lldb_private::VariableList &variables) override;
+  void FindFunctions(lldb_private::ConstString name,
+                     const lldb_private::CompilerDeclContext *parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
+                     bool include_inlines,
+                     lldb_private::SymbolContextList &sc_list) override;
+  void FindFunctions(const lldb_private::RegularExpression &regex,
+                     bool include_inlines,
+                     lldb_private::SymbolContextList &sc_list) override;
+  void
   FindTypes(lldb_private::ConstString name,
             const lldb_private::CompilerDeclContext *parent_decl_ctx,
-            bool append, uint32_t max_matches,
+            uint32_t max_matches,
+            llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
+            lldb_private::TypeMap &types) override;
+  void
+  FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> context,
+            lldb_private::LanguageSet languages,
             llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
             lldb_private::TypeMap &types) override;
   lldb_private::CompilerDeclContext FindNamespace(
       lldb_private::ConstString name,
       const lldb_private::CompilerDeclContext *parent_decl_ctx) override;
-  size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
-                  lldb::TypeClass type_mask,
-                  lldb_private::TypeList &type_list) override;
-  std::vector<lldb_private::CallEdge>
+  void GetTypes(lldb_private::SymbolContextScope *sc_scope,
+                lldb::TypeClass type_mask,
+                lldb_private::TypeList &type_list) override;
+  std::vector<std::unique_ptr<lldb_private::CallEdge>>
   ParseCallEdgesInFunction(lldb_private::UserID func_id) override;
 
   void DumpClangAST(lldb_private::Stream &s) override;
@@ -174,6 +191,9 @@
   // Protected Member Functions
   void InitOSO();
 
+  uint32_t CalculateNumCompileUnits() override;
+  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
+
   static uint32_t GetOSOIndexFromUserID(lldb::user_id_t uid) {
     return (uint32_t)((uid >> 32ull) - 1ull);
   }
@@ -232,7 +252,7 @@
   static int SymbolContainsSymbolWithID(lldb::user_id_t *symbol_idx_ptr,
                                         const CompileUnitInfo *comp_unit_info);
 
-  uint32_t PrivateFindGlobalVariables(
+  void PrivateFindGlobalVariables(
       lldb_private::ConstString name,
       const lldb_private::CompilerDeclContext *parent_decl_ctx,
       const std::vector<uint32_t> &name_symbol_indexes, uint32_t max_matches,
@@ -344,8 +364,8 @@
   /// \param[in] oso_symfile
   ///     The DWARF symbol file that produced the \a line_table
   ///
-  /// \param[in] addr
-  ///     A section offset address from a .o file
+  /// \param[in] line_table
+  ///     A pointer to the line table.
   ///
   /// \return
   ///     Returns a valid line table full of linked addresses, or NULL
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
index c5b54b6..f75f06f 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
@@ -21,23 +21,25 @@
 using namespace lldb;
 using namespace lldb_private;
 
+char SymbolFileDWARFDwo::ID;
+
 SymbolFileDWARFDwo::SymbolFileDWARFDwo(ObjectFileSP objfile,
                                        DWARFCompileUnit &dwarf_cu)
-    : SymbolFileDWARF(objfile.get(), objfile->GetSectionList(
-                                         /*update_module_section_list*/ false)),
-      m_obj_file_sp(objfile), m_base_dwarf_cu(dwarf_cu) {
+    : SymbolFileDWARF(objfile, objfile->GetSectionList(
+                                   /*update_module_section_list*/ false)),
+      m_base_dwarf_cu(dwarf_cu) {
   SetID(((lldb::user_id_t)dwarf_cu.GetID()) << 32);
 }
 
 void SymbolFileDWARFDwo::LoadSectionData(lldb::SectionType sect_type,
                                          DWARFDataExtractor &data) {
   const SectionList *section_list =
-      m_obj_file->GetSectionList(false /* update_module_section_list */);
+      m_objfile_sp->GetSectionList(false /* update_module_section_list */);
   if (section_list) {
     SectionSP section_sp(section_list->FindSectionByType(sect_type, true));
     if (section_sp) {
 
-      if (m_obj_file->ReadSectionData(section_sp.get(), data) != 0)
+      if (m_objfile_sp->ReadSectionData(section_sp.get(), data) != 0)
         return;
 
       data.Clear();
@@ -135,12 +137,7 @@
   return m_base_dwarf_cu.GetSymbolFileDWARF();
 }
 
-DWARFExpression::LocationListFormat
-SymbolFileDWARFDwo::GetLocationListFormat() const {
-  return DWARFExpression::SplitDwarfLocationList;
-}
-
-TypeSystem *
+llvm::Expected<TypeSystem &>
 SymbolFileDWARFDwo::GetTypeSystemForLanguage(LanguageType language) {
   return GetBaseSymbolFile().GetTypeSystemForLanguage(language);
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
index 9b2f3bb..0855dba 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h
@@ -12,7 +12,18 @@
 #include "SymbolFileDWARF.h"
 
 class SymbolFileDWARFDwo : public SymbolFileDWARF {
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
+  /// LLVM RTTI support.
+  /// \{
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || SymbolFileDWARF::isA(ClassID);
+  }
+  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
+  /// \}
+
   SymbolFileDWARFDwo(lldb::ObjectFileSP objfile, DWARFCompileUnit &dwarf_cu);
 
   ~SymbolFileDWARFDwo() override = default;
@@ -24,24 +35,15 @@
   DWARFUnit *
   GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) override;
 
-  lldb_private::DWARFExpression::LocationListFormat
-  GetLocationListFormat() const override;
-
   size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name,
                                  DIEArray &method_die_offsets) override;
 
-  lldb_private::TypeSystem *
+  llvm::Expected<lldb_private::TypeSystem &>
   GetTypeSystemForLanguage(lldb::LanguageType language) override;
 
   DWARFDIE
   GetDIE(const DIERef &die_ref) override;
 
-  std::unique_ptr<SymbolFileDWARFDwo>
-  GetDwoSymbolFileForCompileUnit(DWARFUnit &dwarf_cu,
-                                 const DWARFDebugInfoEntry &cu_die) override {
-    return nullptr;
-  }
-
   DWARFCompileUnit *GetBaseCompileUnit() override { return &m_base_dwarf_cu; }
 
   llvm::Optional<uint32_t> GetDwoNum() override { return GetID() >> 32; }
@@ -71,7 +73,6 @@
 
   DWARFCompileUnit *ComputeCompileUnit();
 
-  lldb::ObjectFileSP m_obj_file_sp;
   DWARFCompileUnit &m_base_dwarf_cu;
   DWARFCompileUnit *m_cu = nullptr;
 };
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp
index efea192..4288dcb 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.cpp
@@ -19,6 +19,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
+char SymbolFileDWARFDwoDwp::ID;
+
 SymbolFileDWARFDwoDwp::SymbolFileDWARFDwoDwp(SymbolFileDWARFDwp *dwp_symfile,
                                              ObjectFileSP objfile,
                                              DWARFCompileUnit &dwarf_cu,
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h
index 2105e1a..a55795b 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwoDwp.h
@@ -13,7 +13,17 @@
 #include "SymbolFileDWARFDwp.h"
 
 class SymbolFileDWARFDwoDwp : public SymbolFileDWARFDwo {
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
+  /// LLVM RTTI support.
+  /// \{
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || SymbolFileDWARFDwo::isA(ClassID);
+  }
+  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
+  /// \}
   SymbolFileDWARFDwoDwp(SymbolFileDWARFDwp *dwp_symfile,
                         lldb::ObjectFileSP objfile, DWARFCompileUnit &dwarf_cu,
                         uint64_t dwo_id);
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFProperties.td b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFProperties.td
new file mode 100644
index 0000000..ef6ae349
--- /dev/null
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFProperties.td
@@ -0,0 +1,12 @@
+include "../../../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "symbolfiledwarf" in {
+  def SymLinkPaths: Property<"comp-dir-symlink-paths", "FileSpecList">,
+    Global,
+    DefaultStringValue<"">,
+    Desc<"If the DW_AT_comp_dir matches any of these paths the symbolic links will be resolved at DWARF parse time.">;
+  def IgnoreIndexes: Property<"ignore-file-indexes", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"Ignore indexes present in the object files and always index DWARF manually.">;
+}
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp
index 8da7e22..4862fea 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/DWARF/UniqueDWARFASTType.cpp
@@ -55,6 +55,8 @@
               case DW_TAG_partial_unit:
                 done = true;
                 break;
+              default:
+                break;
               }
             }
             parent_arg_die = parent_arg_die.GetParent();
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt
index 52b431d..aaecec4 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/CMakeLists.txt
@@ -11,11 +11,12 @@
   UdtRecordCompleter.cpp
 
   LINK_LIBS
-    clangAST
-    clangLex
     lldbCore
     lldbSymbol
     lldbUtility
+  CLANG_LIBS
+    clangAST
+    clangLex
   LINK_COMPONENTS
     DebugInfoCodeView
     DebugInfoPDB
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.cpp
index 1838204..830d78f 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/CompileUnitIndex.cpp
@@ -130,7 +130,7 @@
 
   if (!stream_data) {
     llvm::pdb::ModuleDebugStreamRef debug_stream(descriptor, nullptr);
-    cci = llvm::make_unique<CompilandIndexItem>(PdbCompilandId{ modi }, debug_stream, std::move(descriptor));
+    cci = std::make_unique<CompilandIndexItem>(PdbCompilandId{ modi }, debug_stream, std::move(descriptor));
     return *cci;
   }
 
@@ -139,7 +139,7 @@
 
   cantFail(debug_stream.reload());
 
-  cci = llvm::make_unique<CompilandIndexItem>(
+  cci = std::make_unique<CompilandIndexItem>(
       PdbCompilandId{modi}, std::move(debug_stream), std::move(descriptor));
   ParseExtendedInfo(m_index, *cci);
 
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp
index 3d8bfb0..6aaff06 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp
@@ -122,7 +122,7 @@
   DataBufferSP buffer =
       std::make_shared<DataBufferHeap>(stream.GetData(), stream.GetSize());
   DataExtractor extractor(buffer, byte_order, address_size, byte_size);
-  DWARFExpression result(module, extractor, nullptr, 0, buffer->GetByteSize());
+  DWARFExpression result(module, extractor, nullptr);
   result.SetRegisterKind(register_kind);
 
   return result;
@@ -247,6 +247,6 @@
               .take_front(size);
   buffer->CopyData(bytes.data(), size);
   DataExtractor extractor(buffer, lldb::eByteOrderLittle, address_size);
-  DWARFExpression result(nullptr, extractor, nullptr, 0, size);
+  DWARFExpression result(nullptr, extractor, nullptr);
   return result;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
index 4991be8..4588c80 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
@@ -17,7 +17,7 @@
 #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
+#include "lldb/Symbol/ClangASTMetadata.h"
 #include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/LLDBAssert.h"
@@ -121,13 +121,6 @@
   return false;
 }
 
-static ClangASTContext &GetClangASTContext(ObjectFile &obj) {
-  TypeSystem *ts =
-      obj.GetModule()->GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
-  lldbassert(ts);
-  return static_cast<ClangASTContext &>(*ts);
-}
-
 static llvm::Optional<clang::CallingConv>
 TranslateCallingConvention(llvm::codeview::CallingConvention conv) {
   using CC = llvm::codeview::CallingConvention;
@@ -209,8 +202,8 @@
   return name == "`anonymous namespace'" || name == "`anonymous-namespace'";
 }
 
-PdbAstBuilder::PdbAstBuilder(ObjectFile &obj, PdbIndex &index)
-    : m_index(index), m_clang(GetClangASTContext(obj)) {
+PdbAstBuilder::PdbAstBuilder(ObjectFile &obj, PdbIndex &index, ClangASTContext &clang)
+    : m_index(index), m_clang(clang) {
   BuildParentMap();
 }
 
@@ -465,9 +458,9 @@
   }
 }
 
-clang::Decl *PdbAstBuilder::GetOrCreateDeclForUid(PdbSymUid uid) {
+llvm::Optional<CompilerDecl> PdbAstBuilder::GetOrCreateDeclForUid(PdbSymUid uid) {
   if (clang::Decl *result = TryGetDecl(uid))
-    return result;
+    return ToCompilerDecl(*result);
 
   clang::Decl *result = nullptr;
   switch (uid.kind()) {
@@ -480,13 +473,13 @@
       result = tag;
       break;
     }
-    return nullptr;
+    return llvm::None;
   }
   default:
-    return nullptr;
+    return llvm::None;
   }
   m_uid_to_decl[toOpaqueUid(uid)] = result;
-  return result;
+  return ToCompilerDecl(*result);
 }
 
 clang::DeclContext *PdbAstBuilder::GetOrCreateDeclContextForUid(PdbSymUid uid) {
@@ -494,8 +487,10 @@
     if (uid.asCompilandSym().offset == 0)
       return FromCompilerDeclContext(GetTranslationUnitDecl());
   }
-
-  clang::Decl *decl = GetOrCreateDeclForUid(uid);
+  auto option = GetOrCreateDeclForUid(uid);
+  if (!option)
+    return nullptr;
+  clang::Decl *decl = FromCompilerDecl(option.getValue());
   if (!decl)
     return nullptr;
 
@@ -660,7 +655,7 @@
 
   lldbassert(IsTagRecord(type_id, m_index.tpi()));
 
-  clang::QualType tag_qt = m_clang.getASTContext()->getTypeDeclType(&tag);
+  clang::QualType tag_qt = m_clang.getASTContext().getTypeDeclType(&tag);
   ClangASTContext::SetHasExternalStorage(tag_qt.getAsOpaquePtr(), false);
 
   TypeIndex tag_ti = type_id.index;
@@ -705,7 +700,7 @@
 
   if (ti.getSimpleMode() != SimpleTypeMode::Direct) {
     clang::QualType direct_type = GetOrCreateType(ti.makeDirect());
-    return m_clang.getASTContext()->getPointerType(direct_type);
+    return m_clang.getASTContext().getPointerType(direct_type);
   }
 
   if (ti.getSimpleKind() == SimpleTypeKind::NotTranslated)
@@ -730,19 +725,17 @@
     MemberPointerInfo mpi = pointer.getMemberInfo();
     clang::QualType class_type = GetOrCreateType(mpi.ContainingType);
 
-    return m_clang.getASTContext()->getMemberPointerType(
+    return m_clang.getASTContext().getMemberPointerType(
         pointee_type, class_type.getTypePtr());
   }
 
   clang::QualType pointer_type;
   if (pointer.getMode() == PointerMode::LValueReference)
-    pointer_type =
-        m_clang.getASTContext()->getLValueReferenceType(pointee_type);
+    pointer_type = m_clang.getASTContext().getLValueReferenceType(pointee_type);
   else if (pointer.getMode() == PointerMode::RValueReference)
-    pointer_type =
-        m_clang.getASTContext()->getRValueReferenceType(pointee_type);
+    pointer_type = m_clang.getASTContext().getRValueReferenceType(pointee_type);
   else
-    pointer_type = m_clang.getASTContext()->getPointerType(pointee_type);
+    pointer_type = m_clang.getASTContext().getPointerType(pointee_type);
 
   if ((pointer.getOptions() & PointerOptions::Const) != PointerOptions::None)
     pointer_type.addConst();
@@ -783,9 +776,8 @@
   metadata.SetUserID(toOpaqueUid(id));
   metadata.SetIsDynamicCXXType(false);
 
-  CompilerType ct =
-      m_clang.CreateRecordType(context, access, uname.c_str(), ttk,
-                               lldb::eLanguageTypeC_plus_plus, &metadata);
+  CompilerType ct = m_clang.CreateRecordType(
+      context, access, uname, ttk, lldb::eLanguageTypeC_plus_plus, &metadata);
 
   lldbassert(ct.IsValid());
 
@@ -1086,10 +1078,10 @@
     PdbCompilandSymId param_uid(func_id.modi, record_offset);
     clang::QualType qt = GetOrCreateType(param_type);
 
-    CompilerType param_type_ct(&m_clang, qt.getAsOpaquePtr());
+    CompilerType param_type_ct = m_clang.GetType(qt);
     clang::ParmVarDecl *param = m_clang.CreateParameterDeclaration(
         &function_decl, param_name.str().c_str(), param_type_ct,
-        clang::SC_None);
+        clang::SC_None, true);
     lldbassert(m_uid_to_decl.count(toOpaqueUid(param_uid)) == 0);
 
     m_uid_to_decl[toOpaqueUid(param_uid)] = param;
@@ -1351,7 +1343,7 @@
 
 CompilerDeclContext
 PdbAstBuilder::ToCompilerDeclContext(clang::DeclContext &context) {
-  return {&m_clang, &context};
+  return m_clang.CreateDeclContext(&context);
 }
 
 clang::Decl * PdbAstBuilder::FromCompilerDecl(CompilerDecl decl) {
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
index 67d0247..a4242e9 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
@@ -51,11 +51,12 @@
 class PdbAstBuilder {
 public:
   // Constructors and Destructors
-  PdbAstBuilder(ObjectFile &obj, PdbIndex &index);
+  PdbAstBuilder(ObjectFile &obj, PdbIndex &index, ClangASTContext &clang);
 
   lldb_private::CompilerDeclContext GetTranslationUnitDecl();
 
-  clang::Decl *GetOrCreateDeclForUid(PdbSymUid uid);
+  llvm::Optional<lldb_private::CompilerDecl>
+  GetOrCreateDeclForUid(PdbSymUid uid);
   clang::DeclContext *GetOrCreateDeclContextForUid(PdbSymUid uid);
   clang::DeclContext *GetParentDeclContext(PdbSymUid uid);
 
@@ -76,7 +77,7 @@
   CompilerDecl ToCompilerDecl(clang::Decl &decl);
   CompilerType ToCompilerType(clang::QualType qt);
   CompilerDeclContext ToCompilerDeclContext(clang::DeclContext &context);
-  clang::Decl * FromCompilerDecl(CompilerDecl decl);
+  clang::Decl *FromCompilerDecl(CompilerDecl decl);
   clang::DeclContext *FromCompilerDeclContext(CompilerDeclContext context);
 
   ClangASTContext &clang() { return m_clang; }
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp
index 79dd010..a7bc235 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbFPOProgramToDWARFExpression.cpp
@@ -51,54 +51,23 @@
   return npdb::GetLLDBRegisterNumber(arch_type, reg_id);
 }
 
-static bool ParseFPOSingleAssignmentProgram(llvm::StringRef program,
-                                            llvm::BumpPtrAllocator &alloc,
-                                            llvm::StringRef &register_name,
-                                            Node *&ast) {
-  // lvalue of assignment is always first token
-  // rvalue program goes next
-  std::tie(register_name, program) = getToken(program);
-  if (register_name.empty())
-    return false;
-
-  ast = Parse(program, alloc);
-  return ast != nullptr;
-}
-
-static Node *ParseFPOProgram(llvm::StringRef program,
+static Node *ResolveFPOProgram(llvm::StringRef program,
                              llvm::StringRef register_name,
                              llvm::Triple::ArchType arch_type,
                              llvm::BumpPtrAllocator &alloc) {
-  llvm::DenseMap<llvm::StringRef, Node *> dependent_programs;
+  std::vector<std::pair<llvm::StringRef, Node *>> parsed =
+      postfix::ParseFPOProgram(program, alloc);
 
-  size_t cur = 0;
-  while (true) {
-    size_t assign_index = program.find('=', cur);
-    if (assign_index == llvm::StringRef::npos) {
-      llvm::StringRef tail = program.slice(cur, llvm::StringRef::npos);
-      if (!tail.trim().empty()) {
-        // missing assign operator
-        return nullptr;
-      }
-      break;
-    }
-    llvm::StringRef assignment_program = program.slice(cur, assign_index);
-
-    llvm::StringRef lvalue_name;
-    Node *rvalue_ast = nullptr;
-    if (!ParseFPOSingleAssignmentProgram(assignment_program, alloc, lvalue_name,
-                                         rvalue_ast)) {
-      return nullptr;
-    }
-
-    lldbassert(rvalue_ast);
-
+  for (auto it = parsed.begin(), end = parsed.end(); it != end; ++it) {
     // Emplace valid dependent subtrees to make target assignment independent
     // from predecessors. Resolve all other SymbolNodes as registers.
     bool success =
-        ResolveSymbols(rvalue_ast, [&](SymbolNode &symbol) -> Node * {
-          if (Node *node = dependent_programs.lookup(symbol.GetName()))
-            return node;
+        ResolveSymbols(it->second, [&](SymbolNode &symbol) -> Node * {
+          for (const auto &pair : llvm::make_range(parsed.begin(), it)) {
+            if (pair.first == symbol.GetName())
+              return pair.second;
+          }
+
           uint32_t reg_num =
               ResolveLLDBRegisterNum(symbol.GetName().drop_front(1), arch_type);
 
@@ -110,13 +79,10 @@
     if (!success)
       return nullptr;
 
-    if (lvalue_name == register_name) {
+    if (it->first == register_name) {
       // found target assignment program - no need to parse further
-      return rvalue_ast;
+      return it->second;
     }
-
-    dependent_programs[lvalue_name] = rvalue_ast;
-    cur = assign_index + 1;
   }
 
   return nullptr;
@@ -127,7 +93,7 @@
     llvm::Triple::ArchType arch_type, Stream &stream) {
   llvm::BumpPtrAllocator node_alloc;
   Node *target_program =
-      ParseFPOProgram(program, register_name, arch_type, node_alloc);
+      ResolveFPOProgram(program, register_name, arch_type, node_alloc);
   if (target_program == nullptr) {
     return false;
   }
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp
index 1f5c97d..fc047e2 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp
@@ -641,14 +641,14 @@
         llvm::StringRef program;
         if (GetFrameDataProgram(index, ranges, program)) {
           result.location =
-              MakeVFrameRelLocationExpression(program, loc.Offset, module);
+              MakeVFrameRelLocationExpression(program, loc.Hdr.Offset, module);
           result.ranges = std::move(ranges);
         } else {
           // invalid variable
         }
       } else {
         result.location =
-            MakeRegRelLocationExpression(base_reg, loc.Offset, module);
+            MakeRegRelLocationExpression(base_reg, loc.Hdr.Offset, module);
         result.ranges = std::move(ranges);
       }
     } else if (loc_specifier_cvs.kind() == S_DEFRANGE_REGISTER_REL) {
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
index e27d469..370c339 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
@@ -20,8 +20,6 @@
 #include "lldb/Core/StreamBuffer.h"
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangASTImporter.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
 #include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/LineTable.h"
@@ -30,6 +28,7 @@
 #include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/Variable.h"
 #include "lldb/Symbol/VariableList.h"
+#include "lldb/Utility/Log.h"
 
 #include "llvm/DebugInfo/CodeView/CVRecord.h"
 #include "llvm/DebugInfo/CodeView/CVTypeVisitor.h"
@@ -67,6 +66,8 @@
 using namespace llvm::codeview;
 using namespace llvm::pdb;
 
+char SymbolFileNativePDB::ID;
+
 static lldb::LanguageType TranslateLanguage(PDB_Lang lang) {
   switch (lang) {
   case PDB_Lang::Cpp:
@@ -90,10 +91,10 @@
   std::unique_ptr<llvm::MemoryBuffer> Buffer = std::move(*ErrorOrBuffer);
 
   llvm::StringRef Path = Buffer->getBufferIdentifier();
-  auto Stream = llvm::make_unique<llvm::MemoryBufferByteStream>(
+  auto Stream = std::make_unique<llvm::MemoryBufferByteStream>(
       std::move(Buffer), llvm::support::little);
 
-  auto File = llvm::make_unique<PDBFile>(Path, std::move(Stream), Allocator);
+  auto File = std::make_unique<PDBFile>(Path, std::move(Stream), Allocator);
   if (auto EC = File->parseFileHeaders()) {
     llvm::consumeError(std::move(EC));
     return nullptr;
@@ -119,6 +120,8 @@
   }
   OwningBinary<Binary> binary = std::move(*expected_binary);
 
+  // TODO: Avoid opening the PE/COFF binary twice by reading this information
+  // directly from the lldb_private::ObjectFile.
   auto *obj = llvm::dyn_cast<llvm::object::COFFObjectFile>(binary.getBinary());
   if (!obj)
     return nullptr;
@@ -264,27 +267,27 @@
   return "Microsoft PDB debug symbol cross-platform file reader.";
 }
 
-SymbolFile *SymbolFileNativePDB::CreateInstance(ObjectFile *obj_file) {
-  return new SymbolFileNativePDB(obj_file);
+SymbolFile *SymbolFileNativePDB::CreateInstance(ObjectFileSP objfile_sp) {
+  return new SymbolFileNativePDB(std::move(objfile_sp));
 }
 
-SymbolFileNativePDB::SymbolFileNativePDB(ObjectFile *object_file)
-    : SymbolFile(object_file) {}
+SymbolFileNativePDB::SymbolFileNativePDB(ObjectFileSP objfile_sp)
+    : SymbolFile(std::move(objfile_sp)) {}
 
 SymbolFileNativePDB::~SymbolFileNativePDB() {}
 
 uint32_t SymbolFileNativePDB::CalculateAbilities() {
   uint32_t abilities = 0;
-  if (!m_obj_file)
+  if (!m_objfile_sp)
     return 0;
 
   if (!m_index) {
     // Lazily load and match the PDB file, but only do this once.
     std::unique_ptr<PDBFile> file_up =
-        loadMatchingPDBFile(m_obj_file->GetFileSpec().GetPath(), m_allocator);
+        loadMatchingPDBFile(m_objfile_sp->GetFileSpec().GetPath(), m_allocator);
 
     if (!file_up) {
-      auto module_sp = m_obj_file->GetModule();
+      auto module_sp = m_objfile_sp->GetModule();
       if (!module_sp)
         return 0;
       // See if any symbol file is specified through `--symfile` option.
@@ -317,19 +320,24 @@
 }
 
 void SymbolFileNativePDB::InitializeObject() {
-  m_obj_load_address = m_obj_file->GetBaseAddress().GetFileAddress();
+  m_obj_load_address = m_objfile_sp->GetBaseAddress().GetFileAddress();
   m_index->SetLoadAddress(m_obj_load_address);
   m_index->ParseSectionContribs();
 
-  TypeSystem *ts = m_obj_file->GetModule()->GetTypeSystemForLanguage(
+  auto ts_or_err = m_objfile_sp->GetModule()->GetTypeSystemForLanguage(
       lldb::eLanguageTypeC_plus_plus);
-  if (ts)
-    ts->SetSymbolFile(this);
-
-  m_ast = llvm::make_unique<PdbAstBuilder>(*m_obj_file, *m_index);
+  if (auto err = ts_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Failed to initialize");
+  } else {
+    ts_or_err->SetSymbolFile(this);
+    auto *clang = llvm::cast_or_null<ClangASTContext>(&ts_or_err.get());
+    lldbassert(clang);
+    m_ast = std::make_unique<PdbAstBuilder>(*m_objfile_sp, *m_index, *clang);
+  }
 }
 
-uint32_t SymbolFileNativePDB::GetNumCompileUnits() {
+uint32_t SymbolFileNativePDB::CalculateNumCompileUnits() {
   const DbiModuleList &modules = m_index->dbi().modules();
   uint32_t count = modules.getModuleCount();
   if (count == 0)
@@ -430,11 +438,10 @@
   FileSpec fs(source_file_name);
 
   CompUnitSP cu_sp =
-      std::make_shared<CompileUnit>(m_obj_file->GetModule(), nullptr, fs,
+      std::make_shared<CompileUnit>(m_objfile_sp->GetModule(), nullptr, fs,
                                     toOpaqueUid(cci.m_id), lang, optimized);
 
-  m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex(
-      cci.m_id.modi, cu_sp);
+  SetCompileUnitAtIndex(cci.m_id.modi, cu_sp);
   return cu_sp;
 }
 
@@ -454,7 +461,7 @@
   return std::make_shared<Type>(toOpaqueUid(type_id), this, ConstString(name),
                                 modified_type->GetByteSize(), nullptr,
                                 LLDB_INVALID_UID, Type::eEncodingIsUID, decl,
-                                ct, Type::eResolveStateFull);
+                                ct, Type::ResolveState::Full);
 }
 
 lldb::TypeSP
@@ -474,7 +481,7 @@
   return std::make_shared<Type>(toOpaqueUid(type_id), this, ConstString(),
                                 pr.getSize(), nullptr, LLDB_INVALID_UID,
                                 Type::eEncodingIsUID, decl, ct,
-                                Type::eResolveStateFull);
+                                Type::ResolveState::Full);
 }
 
 lldb::TypeSP SymbolFileNativePDB::CreateSimpleType(TypeIndex ti,
@@ -484,7 +491,7 @@
     Declaration decl;
     return std::make_shared<Type>(
         uid, this, ConstString("std::nullptr_t"), 0, nullptr, LLDB_INVALID_UID,
-        Type::eEncodingIsUID, decl, ct, Type::eResolveStateFull);
+        Type::eEncodingIsUID, decl, ct, Type::ResolveState::Full);
   }
 
   if (ti.getSimpleMode() != SimpleTypeMode::Direct) {
@@ -505,7 +512,7 @@
     Declaration decl;
     return std::make_shared<Type>(
         uid, this, ConstString(), pointer_size, nullptr, LLDB_INVALID_UID,
-        Type::eEncodingIsUID, decl, ct, Type::eResolveStateFull);
+        Type::eEncodingIsUID, decl, ct, Type::ResolveState::Full);
   }
 
   if (ti.getSimpleKind() == SimpleTypeKind::NotTranslated)
@@ -517,7 +524,7 @@
   Declaration decl;
   return std::make_shared<Type>(uid, this, ConstString(type_name), size,
                                 nullptr, LLDB_INVALID_UID, Type::eEncodingIsUID,
-                                decl, ct, Type::eResolveStateFull);
+                                decl, ct, Type::ResolveState::Full);
 }
 
 static std::string GetUnqualifiedTypeName(const TagRecord &record) {
@@ -551,7 +558,7 @@
   return std::make_shared<Type>(toOpaqueUid(type_id), this, ConstString(uname),
                                 size, nullptr, LLDB_INVALID_UID,
                                 Type::eEncodingIsUID, decl, ct,
-                                Type::eResolveStateForward);
+                                Type::ResolveState::Forward);
 }
 
 lldb::TypeSP SymbolFileNativePDB::CreateTagType(PdbTypeSymId type_id,
@@ -578,7 +585,7 @@
       toOpaqueUid(type_id), this, ConstString(uname),
       underlying_type->GetByteSize(), nullptr, LLDB_INVALID_UID,
       lldb_private::Type::eEncodingIsUID, decl, ct,
-      lldb_private::Type::eResolveStateForward);
+      lldb_private::Type::ResolveState::Forward);
 }
 
 TypeSP SymbolFileNativePDB::CreateArrayType(PdbTypeSymId type_id,
@@ -590,7 +597,7 @@
   TypeSP array_sp = std::make_shared<lldb_private::Type>(
       toOpaqueUid(type_id), this, ConstString(), ar.Size, nullptr,
       LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, decl, ct,
-      lldb_private::Type::eResolveStateFull);
+      lldb_private::Type::ResolveState::Full);
   array_sp->SetEncodingType(element_type.get());
   return array_sp;
 }
@@ -603,7 +610,7 @@
   return std::make_shared<lldb_private::Type>(
       toOpaqueUid(type_id), this, ConstString(), 0, nullptr, LLDB_INVALID_UID,
       lldb_private::Type::eEncodingIsUID, decl, ct,
-      lldb_private::Type::eResolveStateFull);
+      lldb_private::Type::ResolveState::Full);
 }
 
 TypeSP SymbolFileNativePDB::CreateProcedureType(PdbTypeSymId type_id,
@@ -613,7 +620,7 @@
   return std::make_shared<lldb_private::Type>(
       toOpaqueUid(type_id), this, ConstString(), 0, nullptr, LLDB_INVALID_UID,
       lldb_private::Type::eEncodingIsUID, decl, ct,
-      lldb_private::Type::eResolveStateFull);
+      lldb_private::Type::ResolveState::Full);
 }
 
 TypeSP SymbolFileNativePDB::CreateType(PdbTypeSymId type_id, CompilerType ct) {
@@ -730,7 +737,7 @@
 
   TypeSP type = CreateAndCacheType(type_id);
   if (type)
-    m_obj_file->GetModule()->GetTypeList()->Insert(type);
+    GetTypeList().Insert(type);
   return type;
 }
 
@@ -900,6 +907,7 @@
 }
 
 lldb::LanguageType SymbolFileNativePDB::ParseLanguage(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   PdbSymUid uid(comp_unit.GetID());
   lldbassert(uid.kind() == PdbSymUidKind::Compiland);
 
@@ -915,6 +923,7 @@
 void SymbolFileNativePDB::AddSymbols(Symtab &symtab) { return; }
 
 size_t SymbolFileNativePDB::ParseFunctions(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   PdbSymUid uid{comp_unit.GetID()};
   lldbassert(uid.kind() == PdbSymUidKind::Compiland);
   uint16_t modi = uid.asCompiland().modi;
@@ -948,6 +957,7 @@
 
 uint32_t SymbolFileNativePDB::ResolveSymbolContext(
     const Address &addr, SymbolContextItem resolve_scope, SymbolContext &sc) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   uint32_t resolved_flags = 0;
   lldb::addr_t file_addr = addr.GetFileAddress();
 
@@ -1052,12 +1062,13 @@
   // all at once, even if all it really needs is line info for a specific
   // function.  In the future it would be nice if it could set the sc.m_function
   // member, and we could only get the line info for the function in question.
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   PdbSymUid cu_id(comp_unit.GetID());
   lldbassert(cu_id.kind() == PdbSymUidKind::Compiland);
   CompilandIndexItem *cci =
       m_index->compilands().GetCompiland(cu_id.asCompiland().modi);
   lldbassert(cci);
-  auto line_table = llvm::make_unique<LineTable>(&comp_unit);
+  auto line_table = std::make_unique<LineTable>(&comp_unit);
 
   // This is basically a copy of the .debug$S subsections from all original COFF
   // object files merged together with address relocations applied.  We are
@@ -1098,9 +1109,7 @@
       // LLDB wants the index of the file in the list of support files.
       auto fn_iter = llvm::find(cci->m_file_list, *efn);
       lldbassert(fn_iter != cci->m_file_list.end());
-      // LLDB support file indices are 1-based.
-      uint32_t file_index =
-          1 + std::distance(cci->m_file_list.begin(), fn_iter);
+      uint32_t file_index = std::distance(cci->m_file_list.begin(), fn_iter);
 
       std::unique_ptr<LineSequence> sequence(
           line_table->CreateLineSequenceContainer());
@@ -1130,6 +1139,7 @@
 
 bool SymbolFileNativePDB::ParseSupportFiles(CompileUnit &comp_unit,
                                             FileSpecList &support_files) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   PdbSymUid cu_id(comp_unit.GetID());
   lldbassert(cu_id.kind() == PdbSymUidKind::Compiland);
   CompilandIndexItem *cci =
@@ -1142,14 +1152,6 @@
     FileSpec spec(f, style);
     support_files.Append(spec);
   }
-
-  llvm::SmallString<64> main_source_file =
-      m_index->compilands().GetMainSourceFile(*cci);
-  FileSpec::Style style = main_source_file.startswith("/")
-                              ? FileSpec::Style::posix
-                              : FileSpec::Style::windows;
-  FileSpec spec(main_source_file, style);
-  support_files.Insert(0, spec);
   return true;
 }
 
@@ -1160,6 +1162,7 @@
 }
 
 size_t SymbolFileNativePDB::ParseBlocksRecursive(Function &func) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   GetOrCreateBlock(PdbSymUid(func.GetID()).asCompilandSym());
   // FIXME: Parse child blocks
   return 1;
@@ -1167,9 +1170,10 @@
 
 void SymbolFileNativePDB::DumpClangAST(Stream &s) { m_ast->Dump(s); }
 
-uint32_t SymbolFileNativePDB::FindGlobalVariables(
+void SymbolFileNativePDB::FindGlobalVariables(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
     uint32_t max_matches, VariableList &variables) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   using SymbolAndOffset = std::pair<uint32_t, llvm::codeview::CVSymbol>;
 
   std::vector<SymbolAndOffset> results = m_index->globals().findRecordsByName(
@@ -1191,16 +1195,16 @@
       continue;
     }
   }
-  return variables.GetSize();
 }
 
-uint32_t SymbolFileNativePDB::FindFunctions(
+void SymbolFileNativePDB::FindFunctions(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    FunctionNameType name_type_mask, bool include_inlines, bool append,
+    FunctionNameType name_type_mask, bool include_inlines,
     SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   // For now we only support lookup by method name.
   if (!(name_type_mask & eFunctionNameTypeMethod))
-    return 0;
+    return;
 
   using SymbolAndOffset = std::pair<uint32_t, llvm::codeview::CVSymbol>;
 
@@ -1225,45 +1229,35 @@
 
     sc_list.Append(sc);
   }
-
-  return sc_list.GetSize();
 }
 
-uint32_t SymbolFileNativePDB::FindFunctions(const RegularExpression &regex,
-                                            bool include_inlines, bool append,
-                                            SymbolContextList &sc_list) {
-  return 0;
-}
+void SymbolFileNativePDB::FindFunctions(const RegularExpression &regex,
+                                        bool include_inlines,
+                                        SymbolContextList &sc_list) {}
 
-uint32_t SymbolFileNativePDB::FindTypes(
+void SymbolFileNativePDB::FindTypes(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    bool append, uint32_t max_matches,
-    llvm::DenseSet<SymbolFile *> &searched_symbol_files, TypeMap &types) {
-  if (!append)
-    types.Clear();
+    uint32_t max_matches, llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+    TypeMap &types) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (!name)
-    return 0;
+    return;
 
   searched_symbol_files.clear();
   searched_symbol_files.insert(this);
 
   // There is an assumption 'name' is not a regex
-  size_t match_count = FindTypesByName(name.GetStringRef(), max_matches, types);
-
-  return match_count;
+  FindTypesByName(name.GetStringRef(), max_matches, types);
 }
 
-size_t
-SymbolFileNativePDB::FindTypes(const std::vector<CompilerContext> &context,
-                               bool append, TypeMap &types) {
-  return 0;
-}
+void SymbolFileNativePDB::FindTypes(
+    llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+    llvm::DenseSet<SymbolFile *> &searched_symbol_files, TypeMap &types) {}
 
-size_t SymbolFileNativePDB::FindTypesByName(llvm::StringRef name,
-                                            uint32_t max_matches,
-                                            TypeMap &types) {
+void SymbolFileNativePDB::FindTypesByName(llvm::StringRef name,
+                                          uint32_t max_matches,
+                                          TypeMap &types) {
 
-  size_t match_count = 0;
   std::vector<TypeIndex> matches = m_index->tpi().findRecordsByName(name);
   if (max_matches > 0 && max_matches < matches.size())
     matches.resize(max_matches);
@@ -1274,17 +1268,16 @@
       continue;
 
     types.Insert(type);
-    ++match_count;
   }
-  return match_count;
 }
 
 size_t SymbolFileNativePDB::ParseTypes(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   // Only do the full type scan the first time.
   if (m_done_full_type_scan)
     return 0;
 
-  size_t old_count = m_obj_file->GetModule()->GetTypeList()->GetSize();
+  const size_t old_count = GetTypeList().GetSize();
   LazyRandomTypeCollection &types = m_index->tpi().typeCollection();
 
   // First process the entire TPI stream.
@@ -1314,7 +1307,7 @@
       GetOrCreateTypedef(global);
   }
 
-  size_t new_count = m_obj_file->GetModule()->GetTypeList()->GetSize();
+  const size_t new_count = GetTypeList().GetSize();
 
   m_done_full_type_scan = true;
 
@@ -1385,7 +1378,7 @@
       toOpaqueUid(id), this, ConstString(udt.Name), target_type->GetByteSize(),
       nullptr, target_type->GetID(), lldb_private::Type::eEncodingIsTypedefUID,
       decl, target_type->GetForwardCompilerType(),
-      lldb_private::Type::eResolveStateForward);
+      lldb_private::Type::ResolveState::Forward);
 }
 
 TypeSP SymbolFileNativePDB::GetOrCreateTypedef(PdbGlobalSymId id) {
@@ -1476,6 +1469,7 @@
 }
 
 size_t SymbolFileNativePDB::ParseVariablesForContext(const SymbolContext &sc) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   lldbassert(sc.function || sc.comp_unit);
 
   VariableListSP variables;
@@ -1506,9 +1500,10 @@
 }
 
 CompilerDecl SymbolFileNativePDB::GetDeclForUID(lldb::user_id_t uid) {
-  clang::Decl *decl = m_ast->GetOrCreateDeclForUid(PdbSymUid(uid));
-
-  return m_ast->ToCompilerDecl(*decl);
+  if (auto decl = m_ast->GetOrCreateDeclForUid(uid))
+    return decl.getValue();
+  else
+    return CompilerDecl();
 }
 
 CompilerDeclContext
@@ -1528,6 +1523,7 @@
 }
 
 Type *SymbolFileNativePDB::ResolveTypeUID(lldb::user_id_t type_uid) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   auto iter = m_types.find(type_uid);
   // lldb should not be passing us non-sensical type uids.  the only way it
   // could have a type uid in the first place is if we handed it out, in which
@@ -1561,11 +1557,9 @@
   return m_ast->CompleteType(qt);
 }
 
-size_t SymbolFileNativePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope,
-                                     TypeClass type_mask,
-                                     lldb_private::TypeList &type_list) {
-  return 0;
-}
+void SymbolFileNativePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope,
+                                   TypeClass type_mask,
+                                   lldb_private::TypeList &type_list) {}
 
 CompilerDeclContext
 SymbolFileNativePDB::FindNamespace(ConstString name,
@@ -1573,13 +1567,14 @@
   return {};
 }
 
-TypeSystem *
+llvm::Expected<TypeSystem &>
 SymbolFileNativePDB::GetTypeSystemForLanguage(lldb::LanguageType language) {
-  auto type_system =
-      m_obj_file->GetModule()->GetTypeSystemForLanguage(language);
-  if (type_system)
-    type_system->SetSymbolFile(this);
-  return type_system;
+  auto type_system_or_err =
+      m_objfile_sp->GetModule()->GetTypeSystemForLanguage(language);
+  if (type_system_or_err) {
+    type_system_or_err->SetSymbolFile(this);
+  }
+  return type_system_or_err;
 }
 
 ConstString SymbolFileNativePDB::GetPluginName() {
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
index 20daff2..a37de0f 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
@@ -9,7 +9,6 @@
 #ifndef LLDB_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H
 #define LLDB_PLUGINS_SYMBOLFILE_NATIVEPDB_SYMBOLFILENATIVEPDB_H
 
-#include "lldb/Symbol/ClangASTImporter.h"
 #include "lldb/Symbol/SymbolFile.h"
 
 #include "llvm/ADT/DenseMap.h"
@@ -35,7 +34,6 @@
 } // namespace llvm
 
 namespace lldb_private {
-class ClangASTImporter;
 
 namespace npdb {
 class PdbAstBuilder;
@@ -43,7 +41,18 @@
 class SymbolFileNativePDB : public SymbolFile {
   friend class UdtRecordCompleter;
 
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
+  /// LLVM RTTI support.
+  /// \{
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || SymbolFile::isA(ClassID);
+  }
+  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
+  /// \}
+
   // Static Functions
   static void Initialize();
 
@@ -55,10 +64,10 @@
 
   static const char *GetPluginDescriptionStatic();
 
-  static SymbolFile *CreateInstance(ObjectFile *obj_file);
+  static SymbolFile *CreateInstance(lldb::ObjectFileSP objfile_sp);
 
   // Constructors and Destructors
-  SymbolFileNativePDB(ObjectFile *ofile);
+  SymbolFileNativePDB(lldb::ObjectFileSP objfile_sp);
 
   ~SymbolFileNativePDB() override;
 
@@ -68,13 +77,9 @@
 
   // Compile Unit function calls
 
-  uint32_t GetNumCompileUnits() override;
-
   void
   ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override;
 
-  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
-
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
@@ -94,10 +99,10 @@
 
   size_t ParseBlocksRecursive(Function &func) override;
 
-  uint32_t FindGlobalVariables(ConstString name,
-                               const CompilerDeclContext *parent_decl_ctx,
-                               uint32_t max_matches,
-                               VariableList &variables) override;
+  void FindGlobalVariables(ConstString name,
+                           const CompilerDeclContext *parent_decl_ctx,
+                           uint32_t max_matches,
+                           VariableList &variables) override;
 
   size_t ParseVariablesForContext(const SymbolContext &sc) override;
 
@@ -120,28 +125,28 @@
                                 lldb::SymbolContextItem resolve_scope,
                                 SymbolContextList &sc_list) override;
 
-  size_t GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
-                  TypeList &type_list) override;
+  void GetTypes(SymbolContextScope *sc_scope, lldb::TypeClass type_mask,
+                TypeList &type_list) override;
 
-  uint32_t FindFunctions(ConstString name,
-                         const CompilerDeclContext *parent_decl_ctx,
-                         lldb::FunctionNameType name_type_mask,
-                         bool include_inlines, bool append,
-                         SymbolContextList &sc_list) override;
+  void FindFunctions(ConstString name,
+                     const CompilerDeclContext *parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
+                     bool include_inlines, SymbolContextList &sc_list) override;
 
-  uint32_t FindFunctions(const RegularExpression &regex, bool include_inlines,
-                         bool append, SymbolContextList &sc_list) override;
+  void FindFunctions(const RegularExpression &regex, bool include_inlines,
+                     SymbolContextList &sc_list) override;
 
-  uint32_t FindTypes(ConstString name,
-                     const CompilerDeclContext *parent_decl_ctx, bool append,
-                     uint32_t max_matches,
-                     llvm::DenseSet<SymbolFile *> &searched_symbol_files,
-                     TypeMap &types) override;
+  void FindTypes(ConstString name, const CompilerDeclContext *parent_decl_ctx,
+                 uint32_t max_matches,
+                 llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+                 TypeMap &types) override;
 
-  size_t FindTypes(const std::vector<CompilerContext> &context, bool append,
-                   TypeMap &types) override;
+  void FindTypes(llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+                 llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+                 TypeMap &types) override;
 
-  TypeSystem *GetTypeSystemForLanguage(lldb::LanguageType language) override;
+  llvm::Expected<TypeSystem &>
+  GetTypeSystemForLanguage(lldb::LanguageType language) override;
 
   CompilerDeclContext
   FindNamespace(ConstString name,
@@ -157,9 +162,12 @@
   void DumpClangAST(Stream &s) override;
 
 private:
+  uint32_t CalculateNumCompileUnits() override;
 
-  size_t FindTypesByName(llvm::StringRef name, uint32_t max_matches,
-                         TypeMap &types);
+  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
+
+  void FindTypesByName(llvm::StringRef name, uint32_t max_matches,
+                       TypeMap &types);
 
   lldb::TypeSP CreateModifierType(PdbTypeSymId type_id,
                                   const llvm::codeview::ModifierRecord &mr,
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
index 3c494dc..7221144 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp
@@ -231,6 +231,6 @@
   ClangASTContext::CompleteTagDeclarationDefinition(m_derived_ct);
 
   if (auto *record_decl = llvm::dyn_cast<clang::CXXRecordDecl>(&m_tag_decl)) {
-    m_ast_builder.importer().InsertRecordDecl(record_decl, m_layout);
+    m_ast_builder.importer().SetRecordLayout(record_decl, m_layout);
   }
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
index 64168d0..79bdce4 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
@@ -4,12 +4,13 @@
   SymbolFilePDB.cpp
 
   LINK_LIBS
-    clangAST
-    clangLex
     lldbCore
+    lldbPluginSymbolFileNativePDB
     lldbSymbol
     lldbUtility
-  lldbPluginSymbolFileNativePDB
+  CLANG_LIBS
+    clangAST
+    clangLex
   LINK_COMPONENTS
     DebugInfoPDB
     Support
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
index 82cfcfb..6b2dbd9 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
@@ -16,7 +16,7 @@
 
 #include "lldb/Core/Module.h"
 #include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
+#include "lldb/Symbol/ClangASTMetadata.h"
 #include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Symbol/Declaration.h"
 #include "lldb/Symbol/SymbolFile.h"
@@ -103,9 +103,7 @@
 GetBuiltinTypeForPDBEncodingAndBitSize(ClangASTContext &clang_ast,
                                        const PDBSymbolTypeBuiltin &pdb_type,
                                        Encoding encoding, uint32_t width) {
-  auto *ast = clang_ast.getASTContext();
-  if (!ast)
-    return CompilerType();
+  clang::ASTContext &ast = clang_ast.getASTContext();
 
   switch (pdb_type.getBuiltinType()) {
   default:
@@ -119,25 +117,25 @@
   case PDB_BuiltinType::Bool:
     return clang_ast.GetBasicType(eBasicTypeBool);
   case PDB_BuiltinType::Long:
-    if (width == ast->getTypeSize(ast->LongTy))
-      return CompilerType(ast, ast->LongTy);
-    if (width == ast->getTypeSize(ast->LongLongTy))
-      return CompilerType(ast, ast->LongLongTy);
+    if (width == ast.getTypeSize(ast.LongTy))
+      return CompilerType(&clang_ast, ast.LongTy.getAsOpaquePtr());
+    if (width == ast.getTypeSize(ast.LongLongTy))
+      return CompilerType(&clang_ast, ast.LongLongTy.getAsOpaquePtr());
     break;
   case PDB_BuiltinType::ULong:
-    if (width == ast->getTypeSize(ast->UnsignedLongTy))
-      return CompilerType(ast, ast->UnsignedLongTy);
-    if (width == ast->getTypeSize(ast->UnsignedLongLongTy))
-      return CompilerType(ast, ast->UnsignedLongLongTy);
+    if (width == ast.getTypeSize(ast.UnsignedLongTy))
+      return CompilerType(&clang_ast, ast.UnsignedLongTy.getAsOpaquePtr());
+    if (width == ast.getTypeSize(ast.UnsignedLongLongTy))
+      return CompilerType(&clang_ast, ast.UnsignedLongLongTy.getAsOpaquePtr());
     break;
   case PDB_BuiltinType::WCharT:
-    if (width == ast->getTypeSize(ast->WCharTy))
-      return CompilerType(ast, ast->WCharTy);
+    if (width == ast.getTypeSize(ast.WCharTy))
+      return CompilerType(&clang_ast, ast.WCharTy.getAsOpaquePtr());
     break;
   case PDB_BuiltinType::Char16:
-    return CompilerType(ast, ast->Char16Ty);
+    return CompilerType(&clang_ast, ast.Char16Ty.getAsOpaquePtr());
   case PDB_BuiltinType::Char32:
-    return CompilerType(ast, ast->Char32Ty);
+    return CompilerType(&clang_ast, ast.Char32Ty.getAsOpaquePtr());
   case PDB_BuiltinType::Float:
     // Note: types `long double` and `double` have same bit size in MSVC and
     // there is no information in the PDB to distinguish them. So when falling
@@ -398,7 +396,7 @@
     // This may occur with const or volatile types. There are separate type
     // symbols in PDB for types with const or volatile modifiers, but we need
     // to create only one declaration for them all.
-    Type::ResolveStateTag type_resolve_state_tag;
+    Type::ResolveState type_resolve_state;
     CompilerType clang_type = m_ast.GetTypeForIdentifier<clang::CXXRecordDecl>(
         ConstString(name), decl_context);
     if (!clang_type.IsValid()) {
@@ -410,9 +408,9 @@
       metadata.SetUserID(type.getSymIndexId());
       metadata.SetIsDynamicCXXType(false);
 
-      clang_type = m_ast.CreateRecordType(
-          decl_context, access, name.c_str(), tag_type_kind,
-          lldb::eLanguageTypeC_plus_plus, &metadata);
+      clang_type =
+          m_ast.CreateRecordType(decl_context, access, name, tag_type_kind,
+                                 lldb::eLanguageTypeC_plus_plus, &metadata);
       assert(clang_type.IsValid());
 
       auto record_decl =
@@ -421,7 +419,7 @@
       m_uid_to_decl[type.getSymIndexId()] = record_decl;
 
       auto inheritance_attr = clang::MSInheritanceAttr::CreateImplicit(
-          *m_ast.getASTContext(), GetMSInheritance(*udt));
+          m_ast.getASTContext(), GetMSInheritance(*udt));
       record_decl->addAttr(inheritance_attr);
 
       ClangASTContext::StartTagDeclarationDefinition(clang_type);
@@ -435,7 +433,7 @@
         ClangASTContext::SetHasExternalStorage(clang_type.GetOpaqueQualType(),
                                                false);
 
-        type_resolve_state_tag = Type::eResolveStateFull;
+        type_resolve_state = Type::ResolveState::Full;
       } else {
         // Add the type to the forward declarations. It will help us to avoid
         // an endless recursion in CompleteTypeFromUdt function.
@@ -444,10 +442,10 @@
         ClangASTContext::SetHasExternalStorage(clang_type.GetOpaqueQualType(),
                                                true);
 
-        type_resolve_state_tag = Type::eResolveStateForward;
+        type_resolve_state = Type::ResolveState::Forward;
       }
     } else
-      type_resolve_state_tag = Type::eResolveStateForward;
+      type_resolve_state = Type::ResolveState::Forward;
 
     if (udt->isConstType())
       clang_type = clang_type.AddConstModifier();
@@ -460,7 +458,7 @@
         type.getSymIndexId(), m_ast.GetSymbolFile(), ConstString(name),
         udt->getLength(), nullptr, LLDB_INVALID_UID,
         lldb_private::Type::eEncodingIsUID, decl, clang_type,
-        type_resolve_state_tag);
+        type_resolve_state);
   } break;
   case PDB_SymType::Enum: {
     auto enum_type = llvm::dyn_cast<PDBSymbolTypeEnum>(&type);
@@ -528,7 +526,7 @@
     return std::make_shared<lldb_private::Type>(
         type.getSymIndexId(), m_ast.GetSymbolFile(), ConstString(name), bytes,
         nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, decl,
-        ast_enum, lldb_private::Type::eResolveStateFull);
+        ast_enum, lldb_private::Type::ResolveState::Full);
   } break;
   case PDB_SymType::Typedef: {
     auto type_def = llvm::dyn_cast<PDBSymbolTypeTypedef>(&type);
@@ -551,7 +549,7 @@
       CompilerType target_ast_type = target_type->GetFullCompilerType();
 
       ast_typedef = m_ast.CreateTypedefType(
-          target_ast_type, name.c_str(), CompilerDeclContext(&m_ast, decl_ctx));
+          target_ast_type, name.c_str(), m_ast.CreateDeclContext(decl_ctx));
       if (!ast_typedef)
         return nullptr;
 
@@ -574,7 +572,7 @@
         type_def->getSymIndexId(), m_ast.GetSymbolFile(), ConstString(name),
         size, nullptr, target_type->GetID(),
         lldb_private::Type::eEncodingIsTypedefUID, decl, ast_typedef,
-        lldb_private::Type::eResolveStateFull);
+        lldb_private::Type::ResolveState::Full);
   } break;
   case PDB_SymType::Function:
   case PDB_SymType::FunctionSig: {
@@ -642,7 +640,7 @@
         type.getSymIndexId(), m_ast.GetSymbolFile(), ConstString(name),
         llvm::None, nullptr, LLDB_INVALID_UID,
         lldb_private::Type::eEncodingIsUID, decl, func_sig_ast_type,
-        lldb_private::Type::eResolveStateFull);
+        lldb_private::Type::ResolveState::Full);
   } break;
   case PDB_SymType::ArrayType: {
     auto array_type = llvm::dyn_cast<PDBSymbolTypeArray>(&type);
@@ -676,7 +674,7 @@
     TypeSP type_sp = std::make_shared<lldb_private::Type>(
         array_type->getSymIndexId(), m_ast.GetSymbolFile(), ConstString(),
         bytes, nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID,
-        decl, array_ast_type, lldb_private::Type::eResolveStateFull);
+        decl, array_ast_type, lldb_private::Type::ResolveState::Full);
     type_sp->SetEncodingType(element_type);
     return type_sp;
   } break;
@@ -705,7 +703,7 @@
     return std::make_shared<lldb_private::Type>(
         builtin_type->getSymIndexId(), m_ast.GetSymbolFile(), type_name, bytes,
         nullptr, LLDB_INVALID_UID, lldb_private::Type::eEncodingIsUID, decl,
-        builtin_ast_type, lldb_private::Type::eResolveStateFull);
+        builtin_ast_type, lldb_private::Type::ResolveState::Full);
   } break;
   case PDB_SymType::PointerType: {
     auto *pointer_type = llvm::dyn_cast<PDBSymbolTypePointer>(&type);
@@ -732,7 +730,7 @@
           pointer_type->getSymIndexId(), m_ast.GetSymbolFile(), ConstString(),
           pointer_type->getLength(), nullptr, LLDB_INVALID_UID,
           lldb_private::Type::eEncodingIsUID, decl, pointer_ast_type,
-          lldb_private::Type::eResolveStateForward);
+          lldb_private::Type::ResolveState::Forward);
     }
 
     CompilerType pointer_ast_type;
@@ -757,7 +755,7 @@
         pointer_type->getSymIndexId(), m_ast.GetSymbolFile(), ConstString(),
         pointer_type->getLength(), nullptr, LLDB_INVALID_UID,
         lldb_private::Type::eEncodingIsUID, decl, pointer_ast_type,
-        lldb_private::Type::eResolveStateFull);
+        lldb_private::Type::ResolveState::Full);
   } break;
   default:
     break;
@@ -893,7 +891,7 @@
 
     // Check if the current context already contains the symbol with the name.
     clang::Decl *decl =
-        GetDeclFromContextByName(*m_ast.getASTContext(), *decl_context, name);
+        GetDeclFromContextByName(m_ast.getASTContext(), *decl_context, name);
     if (!decl) {
       auto type = symbol_file->ResolveTypeUID(data->getTypeId());
       if (!type)
@@ -940,7 +938,7 @@
 
           clang::ParmVarDecl *param = m_ast.CreateParameterDeclaration(
               decl, nullptr, arg_type->GetForwardCompilerType(),
-              clang::SC_None);
+              clang::SC_None, true);
           if (param)
             params.push_back(param);
         }
@@ -1153,7 +1151,7 @@
   }
   CompilerType underlying_type =
       m_ast.GetEnumerationIntegerType(enum_type.GetOpaqueQualType());
-  uint32_t byte_size = m_ast.getASTContext()->getTypeSize(
+  uint32_t byte_size = m_ast.getASTContext().getTypeSize(
       ClangUtil::GetQualType(underlying_type));
   auto enum_constant_decl = m_ast.AddEnumerationValueToEnumerationType(
       enum_type, decl, name.c_str(), raw_value, byte_size * 8);
@@ -1200,7 +1198,7 @@
   if (!record_decl)
     return static_cast<bool>(compiler_type);
 
-  GetClangASTImporter().InsertRecordDecl(record_decl, layout_info);
+  GetClangASTImporter().SetRecordLayout(record_decl, layout_info);
 
   return static_cast<bool>(compiler_type);
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp
index 1c17bf6..42bf1b3 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/PDBLocationToDWARFExpression.cpp
@@ -174,7 +174,7 @@
   DataBufferSP buffer =
       std::make_shared<DataBufferHeap>(stream.GetData(), stream.GetSize());
   DataExtractor extractor(buffer, byte_order, address_size, byte_size);
-  DWARFExpression result(module, extractor, nullptr, 0, buffer->GetByteSize());
+  DWARFExpression result(module, extractor, nullptr);
   result.SetRegisterKind(register_kind);
 
   return result;
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
index 17dfcda..917ab68 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -24,6 +24,7 @@
 #include "lldb/Symbol/TypeList.h"
 #include "lldb/Symbol/TypeMap.h"
 #include "lldb/Symbol/Variable.h"
+#include "lldb/Utility/Log.h"
 #include "lldb/Utility/RegularExpression.h"
 
 #include "llvm/DebugInfo/PDB/GenericError.h"
@@ -57,6 +58,8 @@
 using namespace lldb_private;
 using namespace llvm::pdb;
 
+char SymbolFilePDB::ID;
+
 namespace {
 lldb::LanguageType TranslateLanguage(PDB_Lang lang) {
   switch (lang) {
@@ -118,29 +121,28 @@
 }
 
 lldb_private::SymbolFile *
-SymbolFilePDB::CreateInstance(lldb_private::ObjectFile *obj_file) {
-  return new SymbolFilePDB(obj_file);
+SymbolFilePDB::CreateInstance(ObjectFileSP objfile_sp) {
+  return new SymbolFilePDB(std::move(objfile_sp));
 }
 
-SymbolFilePDB::SymbolFilePDB(lldb_private::ObjectFile *object_file)
-    : SymbolFile(object_file), m_session_up(), m_global_scope_up(),
-      m_cached_compile_unit_count(0) {}
+SymbolFilePDB::SymbolFilePDB(lldb::ObjectFileSP objfile_sp)
+    : SymbolFile(std::move(objfile_sp)), m_session_up(), m_global_scope_up() {}
 
 SymbolFilePDB::~SymbolFilePDB() {}
 
 uint32_t SymbolFilePDB::CalculateAbilities() {
   uint32_t abilities = 0;
-  if (!m_obj_file)
+  if (!m_objfile_sp)
     return 0;
 
   if (!m_session_up) {
     // Lazily load and match the PDB file, but only do this once.
-    std::string exePath = m_obj_file->GetFileSpec().GetPath();
+    std::string exePath = m_objfile_sp->GetFileSpec().GetPath();
     auto error = loadDataForEXE(PDB_ReaderType::DIA, llvm::StringRef(exePath),
                                 m_session_up);
     if (error) {
       llvm::consumeError(std::move(error));
-      auto module_sp = m_obj_file->GetModule();
+      auto module_sp = m_objfile_sp->GetModule();
       if (!module_sp)
         return 0;
       // See if any symbol file is specified through `--symfile` option.
@@ -183,7 +185,8 @@
 }
 
 void SymbolFilePDB::InitializeObject() {
-  lldb::addr_t obj_load_address = m_obj_file->GetBaseAddress().GetFileAddress();
+  lldb::addr_t obj_load_address =
+      m_objfile_sp->GetBaseAddress().GetFileAddress();
   lldbassert(obj_load_address && obj_load_address != LLDB_INVALID_ADDRESS);
   m_session_up->setLoadAddress(obj_load_address);
   if (!m_global_scope_up)
@@ -191,33 +194,30 @@
   lldbassert(m_global_scope_up.get());
 }
 
-uint32_t SymbolFilePDB::GetNumCompileUnits() {
-  if (m_cached_compile_unit_count == 0) {
-    auto compilands = m_global_scope_up->findAllChildren<PDBSymbolCompiland>();
-    if (!compilands)
-      return 0;
+uint32_t SymbolFilePDB::CalculateNumCompileUnits() {
+  auto compilands = m_global_scope_up->findAllChildren<PDBSymbolCompiland>();
+  if (!compilands)
+    return 0;
 
-    // The linker could link *.dll (compiland language = LINK), or import
-    // *.dll. For example, a compiland with name `Import:KERNEL32.dll` could be
-    // found as a child of the global scope (PDB executable). Usually, such
-    // compilands contain `thunk` symbols in which we are not interested for
-    // now. However we still count them in the compiland list. If we perform
-    // any compiland related activity, like finding symbols through
-    // llvm::pdb::IPDBSession methods, such compilands will all be searched
-    // automatically no matter whether we include them or not.
-    m_cached_compile_unit_count = compilands->getChildCount();
+  // The linker could link *.dll (compiland language = LINK), or import
+  // *.dll. For example, a compiland with name `Import:KERNEL32.dll` could be
+  // found as a child of the global scope (PDB executable). Usually, such
+  // compilands contain `thunk` symbols in which we are not interested for
+  // now. However we still count them in the compiland list. If we perform
+  // any compiland related activity, like finding symbols through
+  // llvm::pdb::IPDBSession methods, such compilands will all be searched
+  // automatically no matter whether we include them or not.
+  uint32_t compile_unit_count = compilands->getChildCount();
 
-    // The linker can inject an additional "dummy" compilation unit into the
-    // PDB. Ignore this special compile unit for our purposes, if it is there.
-    // It is always the last one.
-    auto last_compiland_up =
-        compilands->getChildAtIndex(m_cached_compile_unit_count - 1);
-    lldbassert(last_compiland_up.get());
-    std::string name = last_compiland_up->getName();
-    if (name == "* Linker *")
-      --m_cached_compile_unit_count;
-  }
-  return m_cached_compile_unit_count;
+  // The linker can inject an additional "dummy" compilation unit into the
+  // PDB. Ignore this special compile unit for our purposes, if it is there.
+  // It is always the last one.
+  auto last_compiland_up = compilands->getChildAtIndex(compile_unit_count - 1);
+  lldbassert(last_compiland_up.get());
+  std::string name = last_compiland_up->getName();
+  if (name == "* Linker *")
+    --compile_unit_count;
+  return compile_unit_count;
 }
 
 void SymbolFilePDB::GetCompileUnitIndex(
@@ -261,6 +261,7 @@
 }
 
 lldb::LanguageType SymbolFilePDB::ParseLanguage(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   auto compiland_up = GetPDBCompilandByUID(comp_unit.GetID());
   if (!compiland_up)
     return lldb::eLanguageTypeUnknown;
@@ -302,11 +303,15 @@
   comp_unit.AddFunction(func_sp);
 
   LanguageType lang = ParseLanguage(comp_unit);
-  TypeSystem *type_system = GetTypeSystemForLanguage(lang);
-  if (!type_system)
+  auto type_system_or_err = GetTypeSystemForLanguage(lang);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to parse PDBFunc");
     return nullptr;
+  }
+
   ClangASTContext *clang_type_system =
-    llvm::dyn_cast_or_null<ClangASTContext>(type_system);
+    llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
   if (!clang_type_system)
     return nullptr;
   clang_type_system->GetPDBParser()->GetDeclForSymbol(pdb_func);
@@ -315,6 +320,7 @@
 }
 
 size_t SymbolFilePDB::ParseFunctions(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   size_t func_added = 0;
   auto compiland_up = GetPDBCompilandByUID(comp_unit.GetID());
   if (!compiland_up)
@@ -333,6 +339,7 @@
 }
 
 bool SymbolFilePDB::ParseLineTable(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (comp_unit.GetLineTable())
     return true;
   return ParseCompileUnitLineTable(comp_unit, 0);
@@ -351,6 +358,7 @@
   // second time seems like a waste.  Unfortunately, there's no good way around
   // this short of a moderate refactor since SymbolVendor depends on being able
   // to cache this list.
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   auto compiland_up = GetPDBCompilandByUID(comp_unit.GetID());
   if (!compiland_up)
     return false;
@@ -363,10 +371,6 @@
     support_files.AppendIfUnique(spec);
   }
 
-  // LLDB uses the DWARF-like file numeration (one based),
-  // the zeroth file is the compile unit itself
-  support_files.Insert(0, comp_unit);
-
   return true;
 }
 
@@ -428,6 +432,7 @@
 }
 
 size_t SymbolFilePDB::ParseBlocksRecursive(Function &func) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   size_t num_added = 0;
   auto uid = func.GetID();
   auto pdb_func_up = m_session_up->getConcreteSymbolById<PDBSymbolFunc>(uid);
@@ -440,6 +445,7 @@
 }
 
 size_t SymbolFilePDB::ParseTypes(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
 
   size_t num_added = 0;
   auto compiland = GetPDBCompilandByUID(comp_unit.GetID());
@@ -492,6 +498,7 @@
 
 size_t
 SymbolFilePDB::ParseVariablesForContext(const lldb_private::SymbolContext &sc) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (!sc.comp_unit)
     return 0;
 
@@ -540,14 +547,21 @@
 }
 
 lldb_private::Type *SymbolFilePDB::ResolveTypeUID(lldb::user_id_t type_uid) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   auto find_result = m_types.find(type_uid);
   if (find_result != m_types.end())
     return find_result->second.get();
 
-  TypeSystem *type_system =
+  auto type_system_or_err =
       GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to ResolveTypeUID");
+    return nullptr;
+  }
+
   ClangASTContext *clang_type_system =
-      llvm::dyn_cast_or_null<ClangASTContext>(type_system);
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
   if (!clang_type_system)
     return nullptr;
   PDBASTParser *pdb = clang_type_system->GetPDBParser();
@@ -561,9 +575,7 @@
   lldb::TypeSP result = pdb->CreateLLDBTypeFromPDBType(*pdb_type);
   if (result) {
     m_types.insert(std::make_pair(type_uid, result));
-    auto type_list = GetTypeList();
-    if (type_list)
-      type_list->Insert(result);
+    GetTypeList().Insert(result);
   }
   return result.get();
 }
@@ -577,8 +589,17 @@
   std::lock_guard<std::recursive_mutex> guard(
       GetObjectFile()->GetModule()->GetMutex());
 
-  ClangASTContext *clang_ast_ctx = llvm::dyn_cast_or_null<ClangASTContext>(
-      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus));
+  auto type_system_or_err =
+      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to get dynamic array info for UID");
+    return false;
+  }
+
+  ClangASTContext *clang_ast_ctx =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
+
   if (!clang_ast_ctx)
     return false;
 
@@ -590,8 +611,16 @@
 }
 
 lldb_private::CompilerDecl SymbolFilePDB::GetDeclForUID(lldb::user_id_t uid) {
-  ClangASTContext *clang_ast_ctx = llvm::dyn_cast_or_null<ClangASTContext>(
-      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus));
+  auto type_system_or_err =
+      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to get decl for UID");
+    return CompilerDecl();
+  }
+
+  ClangASTContext *clang_ast_ctx =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
   if (!clang_ast_ctx)
     return CompilerDecl();
 
@@ -612,8 +641,16 @@
 
 lldb_private::CompilerDeclContext
 SymbolFilePDB::GetDeclContextForUID(lldb::user_id_t uid) {
-  ClangASTContext *clang_ast_ctx = llvm::dyn_cast_or_null<ClangASTContext>(
-      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus));
+  auto type_system_or_err =
+      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to get DeclContext for UID");
+    return CompilerDeclContext();
+  }
+
+  ClangASTContext *clang_ast_ctx =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
   if (!clang_ast_ctx)
     return CompilerDeclContext();
 
@@ -629,13 +666,21 @@
   if (!decl_context)
     return GetDeclContextContainingUID(uid);
 
-  return CompilerDeclContext(clang_ast_ctx, decl_context);
+  return clang_ast_ctx->CreateDeclContext(decl_context);
 }
 
 lldb_private::CompilerDeclContext
 SymbolFilePDB::GetDeclContextContainingUID(lldb::user_id_t uid) {
-  ClangASTContext *clang_ast_ctx = llvm::dyn_cast_or_null<ClangASTContext>(
-      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus));
+  auto type_system_or_err =
+      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to get DeclContext containing UID");
+    return CompilerDeclContext();
+  }
+
+  ClangASTContext *clang_ast_ctx =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
   if (!clang_ast_ctx)
     return CompilerDeclContext();
 
@@ -650,13 +695,21 @@
   auto decl_context = pdb->GetDeclContextContainingSymbol(*symbol);
   assert(decl_context);
 
-  return CompilerDeclContext(clang_ast_ctx, decl_context);
+  return clang_ast_ctx->CreateDeclContext(decl_context);
 }
 
 void SymbolFilePDB::ParseDeclsForContext(
     lldb_private::CompilerDeclContext decl_ctx) {
-  ClangASTContext *clang_ast_ctx = llvm::dyn_cast_or_null<ClangASTContext>(
-      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus));
+  auto type_system_or_err =
+      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to parse decls for context");
+    return;
+  }
+
+  ClangASTContext *clang_ast_ctx =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
   if (!clang_ast_ctx)
     return;
 
@@ -672,6 +725,7 @@
 SymbolFilePDB::ResolveSymbolContext(const lldb_private::Address &so_addr,
                                     SymbolContextItem resolve_scope,
                                     lldb_private::SymbolContext &sc) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   uint32_t resolved_flags = 0;
   if (resolve_scope & eSymbolContextCompUnit ||
       resolve_scope & eSymbolContextVariable ||
@@ -680,7 +734,7 @@
       resolve_scope & eSymbolContextLineEntry) {
     auto cu_sp = GetCompileUnitContainsAddress(so_addr);
     if (!cu_sp) {
-      if (resolved_flags | eSymbolContextVariable) {
+      if (resolved_flags & eSymbolContextVariable) {
         // TODO: Resolve variables
       }
       return 0;
@@ -732,6 +786,7 @@
 uint32_t SymbolFilePDB::ResolveSymbolContext(
     const lldb_private::FileSpec &file_spec, uint32_t line, bool check_inlines,
     SymbolContextItem resolve_scope, lldb_private::SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   const size_t old_size = sc_list.GetSize();
   if (resolve_scope & lldb::eSymbolContextCompUnit) {
     // Locate all compilation units with line numbers referencing the specified
@@ -1040,18 +1095,19 @@
   return num_added;
 }
 
-uint32_t SymbolFilePDB::FindGlobalVariables(
+void SymbolFilePDB::FindGlobalVariables(
     lldb_private::ConstString name,
     const lldb_private::CompilerDeclContext *parent_decl_ctx,
     uint32_t max_matches, lldb_private::VariableList &variables) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx))
-    return 0;
+    return;
   if (name.IsEmpty())
-    return 0;
+    return;
 
   auto results = m_global_scope_up->findAllChildren<PDBSymbolData>();
   if (!results)
-    return 0;
+    return;
 
   uint32_t matches = 0;
   size_t old_size = variables.GetSize();
@@ -1061,7 +1117,7 @@
       break;
 
     SymbolContext sc;
-    sc.module_sp = m_obj_file->GetModule();
+    sc.module_sp = m_objfile_sp->GetModule();
     lldbassert(sc.module_sp.get());
 
     if (!name.GetStringRef().equals(
@@ -1080,19 +1136,17 @@
     ParseVariables(sc, *pdb_data, &variables);
     matches = variables.GetSize() - old_size;
   }
-
-  return matches;
 }
 
-uint32_t
-SymbolFilePDB::FindGlobalVariables(const lldb_private::RegularExpression &regex,
-                                   uint32_t max_matches,
-                                   lldb_private::VariableList &variables) {
+void SymbolFilePDB::FindGlobalVariables(
+    const lldb_private::RegularExpression &regex, uint32_t max_matches,
+    lldb_private::VariableList &variables) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (!regex.IsValid())
-    return 0;
+    return;
   auto results = m_global_scope_up->findAllChildren<PDBSymbolData>();
   if (!results)
-    return 0;
+    return;
 
   uint32_t matches = 0;
   size_t old_size = variables.GetSize();
@@ -1106,7 +1160,7 @@
     if (!regex.Execute(var_name))
       continue;
     SymbolContext sc;
-    sc.module_sp = m_obj_file->GetModule();
+    sc.module_sp = m_objfile_sp->GetModule();
     lldbassert(sc.module_sp.get());
 
     sc.comp_unit = ParseCompileUnitForUID(GetCompilandId(*pdb_data)).get();
@@ -1117,8 +1171,6 @@
     ParseVariables(sc, *pdb_data, &variables);
     matches = variables.GetSize() - old_size;
   }
-
-  return matches;
 }
 
 bool SymbolFilePDB::ResolveFunction(const llvm::pdb::PDBSymbolFunc &pdb_func,
@@ -1240,23 +1292,21 @@
   m_func_base_names.SizeToFit();
 }
 
-uint32_t SymbolFilePDB::FindFunctions(
+void SymbolFilePDB::FindFunctions(
     lldb_private::ConstString name,
     const lldb_private::CompilerDeclContext *parent_decl_ctx,
-    FunctionNameType name_type_mask, bool include_inlines, bool append,
+    FunctionNameType name_type_mask, bool include_inlines,
     lldb_private::SymbolContextList &sc_list) {
-  if (!append)
-    sc_list.Clear();
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   lldbassert((name_type_mask & eFunctionNameTypeAuto) == 0);
 
   if (name_type_mask == eFunctionNameTypeNone)
-    return 0;
+    return;
   if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx))
-    return 0;
+    return;
   if (name.IsEmpty())
-    return 0;
+    return;
 
-  auto old_size = sc_list.GetSize();
   if (name_type_mask & eFunctionNameTypeFull ||
       name_type_mask & eFunctionNameTypeBase ||
       name_type_mask & eFunctionNameTypeMethod) {
@@ -1286,26 +1336,20 @@
       ResolveFn(m_func_base_names);
       ResolveFn(m_func_method_names);
     }
-    if (name_type_mask & eFunctionNameTypeBase) {
+    if (name_type_mask & eFunctionNameTypeBase)
       ResolveFn(m_func_base_names);
-    }
-    if (name_type_mask & eFunctionNameTypeMethod) {
+    if (name_type_mask & eFunctionNameTypeMethod)
       ResolveFn(m_func_method_names);
-    }
   }
-  return sc_list.GetSize() - old_size;
 }
 
-uint32_t
-SymbolFilePDB::FindFunctions(const lldb_private::RegularExpression &regex,
-                             bool include_inlines, bool append,
-                             lldb_private::SymbolContextList &sc_list) {
-  if (!append)
-    sc_list.Clear();
+void SymbolFilePDB::FindFunctions(const lldb_private::RegularExpression &regex,
+                                  bool include_inlines,
+                                  lldb_private::SymbolContextList &sc_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (!regex.IsValid())
-    return 0;
+    return;
 
-  auto old_size = sc_list.GetSize();
   CacheFunctionNames();
 
   std::set<uint32_t> resolved_ids;
@@ -1322,8 +1366,6 @@
   };
   ResolveFn(m_func_full_names);
   ResolveFn(m_func_base_names);
-
-  return sc_list.GetSize() - old_size;
 }
 
 void SymbolFilePDB::GetMangledNamesForFunction(
@@ -1339,7 +1381,7 @@
   if (!results)
     return;
 
-  auto section_list = m_obj_file->GetSectionList();
+  auto section_list = m_objfile_sp->GetSectionList();
   if (!section_list)
     return;
 
@@ -1361,7 +1403,6 @@
     symtab.AddSymbol(
         Symbol(pub_symbol->getSymIndexId(),   // symID
                pub_symbol->getName().c_str(), // name
-               true,                          // name_is_mangled
                pub_symbol->isCode() ? eSymbolTypeCode : eSymbolTypeData, // type
                true,      // external
                false,     // is_debug
@@ -1380,34 +1421,39 @@
   symtab.Finalize();
 }
 
-uint32_t SymbolFilePDB::FindTypes(
+void SymbolFilePDB::FindTypes(
     lldb_private::ConstString name,
-    const lldb_private::CompilerDeclContext *parent_decl_ctx, bool append,
+    const lldb_private::CompilerDeclContext *parent_decl_ctx,
     uint32_t max_matches,
     llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
     lldb_private::TypeMap &types) {
-  if (!append)
-    types.Clear();
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   if (!name)
-    return 0;
+    return;
   if (!DeclContextMatchesThisSymbolFile(parent_decl_ctx))
-    return 0;
+    return;
 
   searched_symbol_files.clear();
   searched_symbol_files.insert(this);
 
   // There is an assumption 'name' is not a regex
   FindTypesByName(name.GetStringRef(), parent_decl_ctx, max_matches, types);
-
-  return types.GetSize();
 }
 
 void SymbolFilePDB::DumpClangAST(Stream &s) {
-  auto type_system = GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
-  auto clang = llvm::dyn_cast_or_null<ClangASTContext>(type_system);
-  if (!clang)
+  auto type_system_or_err =
+      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to dump ClangAST");
     return;
-  clang->Dump(s);
+  }
+
+  auto *clang_type_system =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
+  if (!clang_type_system)
+    return;
+  clang_type_system->Dump(s);
 }
 
 void SymbolFilePDB::FindTypesByRegex(
@@ -1514,15 +1560,10 @@
   }
 }
 
-size_t SymbolFilePDB::FindTypes(
-    const std::vector<lldb_private::CompilerContext> &contexts, bool append,
-    lldb_private::TypeMap &types) {
-  return 0;
-}
-
-lldb_private::TypeList *SymbolFilePDB::GetTypeList() {
-  return m_obj_file->GetModule()->GetTypeList();
-}
+void SymbolFilePDB::FindTypes(
+    llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
+    llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+    lldb_private::TypeMap &types) {}
 
 void SymbolFilePDB::GetTypesForPDBSymbol(const llvm::pdb::PDBSymbol &pdb_symbol,
                                          uint32_t type_mask,
@@ -1574,17 +1615,17 @@
     GetTypesForPDBSymbol(*symbol_up, type_mask, type_collection);
 }
 
-size_t SymbolFilePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope,
-                               TypeClass type_mask,
-                               lldb_private::TypeList &type_list) {
+void SymbolFilePDB::GetTypes(lldb_private::SymbolContextScope *sc_scope,
+                             TypeClass type_mask,
+                             lldb_private::TypeList &type_list) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   TypeCollection type_collection;
-  uint32_t old_size = type_list.GetSize();
   CompileUnit *cu =
       sc_scope ? sc_scope->CalculateSymbolContextCompileUnit() : nullptr;
   if (cu) {
     auto compiland_up = GetPDBCompilandByUID(cu->GetID());
     if (!compiland_up)
-      return 0;
+      return;
     GetTypesForPDBSymbol(*compiland_up, type_mask, type_collection);
   } else {
     for (uint32_t cu_idx = 0; cu_idx < GetNumCompileUnits(); ++cu_idx) {
@@ -1600,21 +1641,29 @@
     type->GetForwardCompilerType();
     type_list.Insert(type->shared_from_this());
   }
-  return type_list.GetSize() - old_size;
 }
 
-lldb_private::TypeSystem *
+llvm::Expected<lldb_private::TypeSystem &>
 SymbolFilePDB::GetTypeSystemForLanguage(lldb::LanguageType language) {
-  auto type_system =
-      m_obj_file->GetModule()->GetTypeSystemForLanguage(language);
-  if (type_system)
-    type_system->SetSymbolFile(this);
-  return type_system;
+  auto type_system_or_err =
+      m_objfile_sp->GetModule()->GetTypeSystemForLanguage(language);
+  if (type_system_or_err) {
+    type_system_or_err->SetSymbolFile(this);
+  }
+  return type_system_or_err;
 }
 
 PDBASTParser *SymbolFilePDB::GetPDBAstParser() {
-  auto type_system = GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
-  auto clang_type_system = llvm::dyn_cast_or_null<ClangASTContext>(type_system);
+  auto type_system_or_err =
+      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to get PDB AST parser");
+    return nullptr;
+  }
+
+  auto *clang_type_system =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
   if (!clang_type_system)
     return nullptr;
 
@@ -1625,8 +1674,18 @@
 lldb_private::CompilerDeclContext SymbolFilePDB::FindNamespace(
     lldb_private::ConstString name,
     const lldb_private::CompilerDeclContext *parent_decl_ctx) {
-  auto type_system = GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
-  auto clang_type_system = llvm::dyn_cast_or_null<ClangASTContext>(type_system);
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+  auto type_system_or_err =
+      GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+                   std::move(err), "Unable to find namespace {}",
+                   name.AsCString());
+    return CompilerDeclContext();
+  }
+
+  auto *clang_type_system =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
   if (!clang_type_system)
     return CompilerDeclContext();
 
@@ -1644,8 +1703,7 @@
   if (!namespace_decl)
     return CompilerDeclContext();
 
-  return CompilerDeclContext(type_system,
-                             static_cast<clang::DeclContext *>(namespace_decl));
+  return clang_type_system->CreateDeclContext(namespace_decl);
 }
 
 lldb_private::ConstString SymbolFilePDB::GetPluginName() {
@@ -1688,7 +1746,7 @@
   // Don't support optimized code for now, DebugInfoPDB does not return this
   // information.
   LazyBool optimized = eLazyBoolNo;
-  auto cu_sp = std::make_shared<CompileUnit>(m_obj_file->GetModule(), nullptr,
+  auto cu_sp = std::make_shared<CompileUnit>(m_objfile_sp->GetModule(), nullptr,
                                              path.c_str(), id, lang, optimized);
 
   if (!cu_sp)
@@ -1698,8 +1756,7 @@
   if (index == UINT32_MAX)
     GetCompileUnitIndex(*compiland_up, index);
   lldbassert(index != UINT32_MAX);
-  m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex(index,
-                                                                    cu_sp);
+  SetCompileUnitAtIndex(index, cu_sp);
   return cu_sp;
 }
 
@@ -1715,10 +1772,9 @@
   // to do a mapping so that we can hand out indices.
   llvm::DenseMap<uint32_t, uint32_t> index_map;
   BuildSupportFileIdToSupportFileIndexMap(*compiland_up, index_map);
-  auto line_table = llvm::make_unique<LineTable>(&comp_unit);
+  auto line_table = std::make_unique<LineTable>(&comp_unit);
 
   // Find contributions to `compiland` from all source and header files.
-  std::string path = comp_unit.GetPath();
   auto files = m_session_up->getSourceFilesForCompiland(*compiland_up);
   if (!files)
     return false;
@@ -1820,9 +1876,7 @@
   if (!source_files)
     return;
 
-  // LLDB uses the DWARF-like file numeration (one based)
-  int index = 1;
-
+  int index = 0;
   while (auto file = source_files->getNext()) {
     uint32_t source_id = file->getUniqueId();
     index_map[source_id] = index++;
@@ -1925,9 +1979,17 @@
   TypeSystem *decl_ctx_type_system = decl_ctx->GetTypeSystem();
   if (!decl_ctx_type_system)
     return false;
-  TypeSystem *type_system = GetTypeSystemForLanguage(
+  auto type_system_or_err = GetTypeSystemForLanguage(
       decl_ctx_type_system->GetMinimumLanguage(nullptr));
-  if (decl_ctx_type_system == type_system)
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(
+        lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+        std::move(err),
+        "Unable to determine if DeclContext matches this symbol file");
+    return false;
+  }
+
+  if (decl_ctx_type_system == &type_system_or_err.get())
     return true; // The type systems match, return true
 
   return false;
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
index ba3099a..7a4eee4 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.h
@@ -22,7 +22,18 @@
 class PDBASTParser;
 
 class SymbolFilePDB : public lldb_private::SymbolFile {
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
+  /// LLVM RTTI support.
+  /// \{
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || SymbolFile::isA(ClassID);
+  }
+  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
+  /// \}
+
   // Static Functions
   static void Initialize();
 
@@ -35,10 +46,10 @@
   static const char *GetPluginDescriptionStatic();
 
   static lldb_private::SymbolFile *
-  CreateInstance(lldb_private::ObjectFile *obj_file);
+  CreateInstance(lldb::ObjectFileSP objfile_sp);
 
   // Constructors and Destructors
-  SymbolFilePDB(lldb_private::ObjectFile *ofile);
+  SymbolFilePDB(lldb::ObjectFileSP objfile_sp);
 
   ~SymbolFilePDB() override;
 
@@ -48,10 +59,6 @@
 
   // Compile Unit function calls
 
-  uint32_t GetNumCompileUnits() override;
-
-  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
-
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
@@ -103,25 +110,25 @@
                        lldb::SymbolContextItem resolve_scope,
                        lldb_private::SymbolContextList &sc_list) override;
 
-  uint32_t
+  void
   FindGlobalVariables(lldb_private::ConstString name,
                       const lldb_private::CompilerDeclContext *parent_decl_ctx,
                       uint32_t max_matches,
                       lldb_private::VariableList &variables) override;
 
-  uint32_t FindGlobalVariables(const lldb_private::RegularExpression &regex,
-                               uint32_t max_matches,
-                               lldb_private::VariableList &variables) override;
+  void FindGlobalVariables(const lldb_private::RegularExpression &regex,
+                           uint32_t max_matches,
+                           lldb_private::VariableList &variables) override;
 
-  uint32_t
-  FindFunctions(lldb_private::ConstString name,
-                const lldb_private::CompilerDeclContext *parent_decl_ctx,
-                lldb::FunctionNameType name_type_mask, bool include_inlines,
-                bool append, lldb_private::SymbolContextList &sc_list) override;
+  void FindFunctions(lldb_private::ConstString name,
+                     const lldb_private::CompilerDeclContext *parent_decl_ctx,
+                     lldb::FunctionNameType name_type_mask,
+                     bool include_inlines,
+                     lldb_private::SymbolContextList &sc_list) override;
 
-  uint32_t FindFunctions(const lldb_private::RegularExpression &regex,
-                         bool include_inlines, bool append,
-                         lldb_private::SymbolContextList &sc_list) override;
+  void FindFunctions(const lldb_private::RegularExpression &regex,
+                     bool include_inlines,
+                     lldb_private::SymbolContextList &sc_list) override;
 
   void GetMangledNamesForFunction(
       const std::string &scope_qualified_name,
@@ -129,26 +136,26 @@
 
   void AddSymbols(lldb_private::Symtab &symtab) override;
 
-  uint32_t
+  void
   FindTypes(lldb_private::ConstString name,
             const lldb_private::CompilerDeclContext *parent_decl_ctx,
-            bool append, uint32_t max_matches,
+            uint32_t max_matches,
             llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
             lldb_private::TypeMap &types) override;
 
-  size_t FindTypes(const std::vector<lldb_private::CompilerContext> &context,
-                   bool append, lldb_private::TypeMap &types) override;
+  void FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> pattern,
+                 lldb_private::LanguageSet languages,
+                 llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+                 lldb_private::TypeMap &types) override;
 
   void FindTypesByRegex(const lldb_private::RegularExpression &regex,
                         uint32_t max_matches, lldb_private::TypeMap &types);
 
-  lldb_private::TypeList *GetTypeList() override;
+  void GetTypes(lldb_private::SymbolContextScope *sc_scope,
+                lldb::TypeClass type_mask,
+                lldb_private::TypeList &type_list) override;
 
-  size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
-                  lldb::TypeClass type_mask,
-                  lldb_private::TypeList &type_list) override;
-
-  lldb_private::TypeSystem *
+  llvm::Expected<lldb_private::TypeSystem &>
   GetTypeSystemForLanguage(lldb::LanguageType language) override;
 
   lldb_private::CompilerDeclContext FindNamespace(
@@ -173,6 +180,10 @@
   };
   using SecContribsMap = std::map<uint32_t, std::vector<SecContribInfo>>;
 
+  uint32_t CalculateNumCompileUnits() override;
+
+  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
+
   lldb::CompUnitSP ParseCompileUnitForUID(uint32_t id,
                                           uint32_t index = UINT32_MAX);
 
@@ -245,7 +256,6 @@
   std::vector<lldb::TypeSP> m_builtin_types;
   std::unique_ptr<llvm::pdb::IPDBSession> m_session_up;
   std::unique_ptr<llvm::pdb::PDBSymbolExe> m_global_scope_up;
-  uint32_t m_cached_compile_unit_count;
 
   lldb_private::UniqueCStringMap<uint32_t> m_func_full_names;
   lldb_private::UniqueCStringMap<uint32_t> m_func_base_names;
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp b/src/llvm-project/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
index a1b21e5..305efea 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
@@ -25,6 +25,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
+char SymbolFileSymtab::ID;
+
 void SymbolFileSymtab::Initialize() {
   PluginManager::RegisterPlugin(GetPluginNameStatic(),
                                 GetPluginDescriptionStatic(), CreateInstance);
@@ -43,26 +45,24 @@
   return "Reads debug symbols from an object file's symbol table.";
 }
 
-SymbolFile *SymbolFileSymtab::CreateInstance(ObjectFile *obj_file) {
-  return new SymbolFileSymtab(obj_file);
+SymbolFile *SymbolFileSymtab::CreateInstance(ObjectFileSP objfile_sp) {
+  return new SymbolFileSymtab(std::move(objfile_sp));
 }
 
-size_t SymbolFileSymtab::GetTypes(SymbolContextScope *sc_scope,
-                                  TypeClass type_mask,
-                                  lldb_private::TypeList &type_list) {
-  return 0;
-}
+void SymbolFileSymtab::GetTypes(SymbolContextScope *sc_scope,
+                                TypeClass type_mask,
+                                lldb_private::TypeList &type_list) {}
 
-SymbolFileSymtab::SymbolFileSymtab(ObjectFile *obj_file)
-    : SymbolFile(obj_file), m_source_indexes(), m_func_indexes(),
+SymbolFileSymtab::SymbolFileSymtab(ObjectFileSP objfile_sp)
+    : SymbolFile(std::move(objfile_sp)), m_source_indexes(), m_func_indexes(),
       m_code_indexes(), m_objc_class_name_to_index() {}
 
 SymbolFileSymtab::~SymbolFileSymtab() {}
 
 uint32_t SymbolFileSymtab::CalculateAbilities() {
   uint32_t abilities = 0;
-  if (m_obj_file) {
-    const Symtab *symtab = m_obj_file->GetSymtab();
+  if (m_objfile_sp) {
+    const Symtab *symtab = m_objfile_sp->GetSymtab();
     if (symtab) {
       // The snippet of code below will get the indexes the module symbol table
       // entries that are code, data, or function related (debug info), sort
@@ -104,7 +104,7 @@
   return abilities;
 }
 
-uint32_t SymbolFileSymtab::GetNumCompileUnits() {
+uint32_t SymbolFileSymtab::CalculateNumCompileUnits() {
   // If we don't have any source file symbols we will just have one compile
   // unit for the entire object file
   if (m_source_indexes.empty())
@@ -122,10 +122,10 @@
   // unit for the entire object file
   if (idx < m_source_indexes.size()) {
     const Symbol *cu_symbol =
-        m_obj_file->GetSymtab()->SymbolAtIndex(m_source_indexes[idx]);
+        m_objfile_sp->GetSymtab()->SymbolAtIndex(m_source_indexes[idx]);
     if (cu_symbol)
-      cu_sp = std::make_shared<CompileUnit>(m_obj_file->GetModule(), nullptr,
-                                  cu_symbol->GetName().AsCString(), 0,
+      cu_sp = std::make_shared<CompileUnit>(m_objfile_sp->GetModule(), nullptr,
+                                            cu_symbol->GetName().AsCString(), 0,
                                             eLanguageTypeUnknown, eLazyBoolNo);
   }
   return cu_sp;
@@ -136,12 +136,13 @@
 }
 
 size_t SymbolFileSymtab::ParseFunctions(CompileUnit &comp_unit) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
   size_t num_added = 0;
   // We must at least have a valid compile unit
-  const Symtab *symtab = m_obj_file->GetSymtab();
+  const Symtab *symtab = m_objfile_sp->GetSymtab();
   const Symbol *curr_symbol = nullptr;
   const Symbol *next_symbol = nullptr;
-  //  const char *prefix = m_obj_file->SymbolPrefix();
+  //  const char *prefix = m_objfile_sp->SymbolPrefix();
   //  if (prefix == NULL)
   //      prefix == "";
   //
@@ -246,12 +247,13 @@
 uint32_t SymbolFileSymtab::ResolveSymbolContext(const Address &so_addr,
                                                 SymbolContextItem resolve_scope,
                                                 SymbolContext &sc) {
-  if (m_obj_file->GetSymtab() == nullptr)
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+  if (m_objfile_sp->GetSymtab() == nullptr)
     return 0;
 
   uint32_t resolved_flags = 0;
   if (resolve_scope & eSymbolContextSymbol) {
-    sc.symbol = m_obj_file->GetSymtab()->FindSymbolContainingFileAddress(
+    sc.symbol = m_objfile_sp->GetSymtab()->FindSymbolContainingFileAddress(
         so_addr.GetFileAddress());
     if (sc.symbol)
       resolved_flags |= eSymbolContextSymbol;
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h b/src/llvm-project/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
index bc9a531..1fff818 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
+++ b/src/llvm-project/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h
@@ -16,9 +16,20 @@
 #include "lldb/Symbol/Symtab.h"
 
 class SymbolFileSymtab : public lldb_private::SymbolFile {
+  /// LLVM RTTI support.
+  static char ID;
+
 public:
+  /// LLVM RTTI support.
+  /// \{
+  bool isA(const void *ClassID) const override {
+    return ClassID == &ID || SymbolFile::isA(ClassID);
+  }
+  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
+  /// \}
+
   // Constructors and Destructors
-  SymbolFileSymtab(lldb_private::ObjectFile *obj_file);
+  SymbolFileSymtab(lldb::ObjectFileSP objfile_sp);
 
   ~SymbolFileSymtab() override;
 
@@ -32,15 +43,11 @@
   static const char *GetPluginDescriptionStatic();
 
   static lldb_private::SymbolFile *
-  CreateInstance(lldb_private::ObjectFile *obj_file);
+  CreateInstance(lldb::ObjectFileSP objfile_sp);
 
   uint32_t CalculateAbilities() override;
 
   // Compile Unit function calls
-  uint32_t GetNumCompileUnits() override;
-
-  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
-
   lldb::LanguageType
   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
 
@@ -75,9 +82,9 @@
                                 lldb::SymbolContextItem resolve_scope,
                                 lldb_private::SymbolContext &sc) override;
 
-  size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
-                  lldb::TypeClass type_mask,
-                  lldb_private::TypeList &type_list) override;
+  void GetTypes(lldb_private::SymbolContextScope *sc_scope,
+                lldb::TypeClass type_mask,
+                lldb_private::TypeList &type_list) override;
 
   // PluginInterface protocol
   lldb_private::ConstString GetPluginName() override;
@@ -85,6 +92,10 @@
   uint32_t GetPluginVersion() override;
 
 protected:
+  uint32_t CalculateNumCompileUnits() override;
+
+  lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
+
   typedef std::map<lldb_private::ConstString, lldb::TypeSP> TypeMap;
 
   lldb_private::Symtab::IndexCollection m_source_indexes;
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolVendor/ELF/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/SymbolVendor/ELF/CMakeLists.txt
index e742fac..86562c4 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolVendor/ELF/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/SymbolVendor/ELF/CMakeLists.txt
@@ -5,4 +5,5 @@
     lldbCore
     lldbHost
     lldbSymbol
+    lldbPluginObjectFileELF
   )
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp b/src/llvm-project/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
index f279af6..d4d7a89 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
@@ -10,6 +10,7 @@
 
 #include <string.h>
 
+#include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
@@ -61,99 +62,89 @@
   if (!module_sp)
     return nullptr;
 
-  ObjectFile *obj_file = module_sp->GetObjectFile();
+  ObjectFileELF *obj_file =
+      llvm::dyn_cast_or_null<ObjectFileELF>(module_sp->GetObjectFile());
   if (!obj_file)
     return nullptr;
 
-  static ConstString obj_file_elf("elf");
-  ConstString obj_name = obj_file->GetPluginName();
-  if (obj_name != obj_file_elf)
-    return nullptr;
-
   lldb_private::UUID uuid = obj_file->GetUUID();
   if (!uuid)
     return nullptr;
 
-  // Get the .gnu_debuglink file (if specified).
-  FileSpecList file_spec_list = obj_file->GetDebugSymbolFilePaths();
-
-  // If the module specified a filespec, use it first.
-  FileSpec debug_symbol_fspec(module_sp->GetSymbolFileFileSpec());
-  if (debug_symbol_fspec)
-    file_spec_list.Insert(0, debug_symbol_fspec);
-
-  // If we have no debug symbol files, then nothing to do.
-  if (file_spec_list.IsEmpty())
+  // If the main object file already contains debug info, then we are done.
+  if (obj_file->GetSectionList()->FindSectionByType(
+          lldb::eSectionTypeDWARFDebugInfo, true))
     return nullptr;
 
+  // If the module specified a filespec, use that.
+  FileSpec fspec = module_sp->GetSymbolFileFileSpec();
+  // Otherwise, try gnu_debuglink, if one exists.
+  if (!fspec)
+    fspec = obj_file->GetDebugLink().getValueOr(FileSpec());
+
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat, "SymbolVendorELF::CreateInstance (module = %s)",
                      module_sp->GetFileSpec().GetPath().c_str());
 
-  for (size_t idx = 0; idx < file_spec_list.GetSize(); ++idx) {
-    ModuleSpec module_spec;
-    const FileSpec fspec = file_spec_list.GetFileSpecAtIndex(idx);
+  ModuleSpec module_spec;
 
-    module_spec.GetFileSpec() = obj_file->GetFileSpec();
-    FileSystem::Instance().Resolve(module_spec.GetFileSpec());
-    module_spec.GetSymbolFileSpec() = fspec;
-    module_spec.GetUUID() = uuid;
-    FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
-    FileSpec dsym_fspec =
-        Symbols::LocateExecutableSymbolFile(module_spec, search_paths);
-    if (dsym_fspec) {
-      DataBufferSP dsym_file_data_sp;
-      lldb::offset_t dsym_file_data_offset = 0;
-      ObjectFileSP dsym_objfile_sp =
-          ObjectFile::FindPlugin(module_sp, &dsym_fspec, 0,
-                                 FileSystem::Instance().GetByteSize(dsym_fspec),
-                                 dsym_file_data_sp, dsym_file_data_offset);
-      if (dsym_objfile_sp) {
-        // This objfile is for debugging purposes. Sadly, ObjectFileELF won't
-        // be able to figure this out consistently as the symbol file may not
-        // have stripped the code sections, etc.
-        dsym_objfile_sp->SetType(ObjectFile::eTypeDebugInfo);
+  module_spec.GetFileSpec() = obj_file->GetFileSpec();
+  FileSystem::Instance().Resolve(module_spec.GetFileSpec());
+  module_spec.GetSymbolFileSpec() = fspec;
+  module_spec.GetUUID() = uuid;
+  FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
+  FileSpec dsym_fspec =
+      Symbols::LocateExecutableSymbolFile(module_spec, search_paths);
+  if (!dsym_fspec)
+    return nullptr;
 
-        SymbolVendorELF *symbol_vendor = new SymbolVendorELF(module_sp);
-        if (symbol_vendor) {
-          // Get the module unified section list and add our debug sections to
-          // that.
-          SectionList *module_section_list = module_sp->GetSectionList();
-          SectionList *objfile_section_list = dsym_objfile_sp->GetSectionList();
+  DataBufferSP dsym_file_data_sp;
+  lldb::offset_t dsym_file_data_offset = 0;
+  ObjectFileSP dsym_objfile_sp = ObjectFile::FindPlugin(
+      module_sp, &dsym_fspec, 0, FileSystem::Instance().GetByteSize(dsym_fspec),
+      dsym_file_data_sp, dsym_file_data_offset);
+  if (!dsym_objfile_sp)
+    return nullptr;
 
-          static const SectionType g_sections[] = {
-              eSectionTypeDWARFDebugAbbrev,   eSectionTypeDWARFDebugAddr,
-              eSectionTypeDWARFDebugAranges,  eSectionTypeDWARFDebugCuIndex,
-              eSectionTypeDWARFDebugFrame,    eSectionTypeDWARFDebugInfo,
-              eSectionTypeDWARFDebugLine,     eSectionTypeDWARFDebugLoc,
-              eSectionTypeDWARFDebugMacInfo,  eSectionTypeDWARFDebugPubNames,
-              eSectionTypeDWARFDebugPubTypes, eSectionTypeDWARFDebugRanges,
-              eSectionTypeDWARFDebugStr,      eSectionTypeDWARFDebugStrOffsets,
-              eSectionTypeELFSymbolTable,     eSectionTypeDWARFGNUDebugAltLink,
-          };
-          for (size_t idx = 0; idx < sizeof(g_sections) / sizeof(g_sections[0]);
-               ++idx) {
-            SectionType section_type = g_sections[idx];
-            SectionSP section_sp(
-                objfile_section_list->FindSectionByType(section_type, true));
-            if (section_sp) {
-              SectionSP module_section_sp(
-                  module_section_list->FindSectionByType(section_type, true));
-              if (module_section_sp)
-                module_section_list->ReplaceSection(module_section_sp->GetID(),
-                                                    section_sp);
-              else
-                module_section_list->AddSection(section_sp);
-            }
-          }
+  // This objfile is for debugging purposes. Sadly, ObjectFileELF won't
+  // be able to figure this out consistently as the symbol file may not
+  // have stripped the code sections, etc.
+  dsym_objfile_sp->SetType(ObjectFile::eTypeDebugInfo);
 
-          symbol_vendor->AddSymbolFileRepresentation(dsym_objfile_sp);
-          return symbol_vendor;
-        }
-      }
+  SymbolVendorELF *symbol_vendor = new SymbolVendorELF(module_sp);
+
+  // Get the module unified section list and add our debug sections to
+  // that.
+  SectionList *module_section_list = module_sp->GetSectionList();
+  SectionList *objfile_section_list = dsym_objfile_sp->GetSectionList();
+
+  static const SectionType g_sections[] = {
+      eSectionTypeDWARFDebugAbbrev,     eSectionTypeDWARFDebugAddr,
+      eSectionTypeDWARFDebugAranges,    eSectionTypeDWARFDebugCuIndex,
+      eSectionTypeDWARFDebugFrame,      eSectionTypeDWARFDebugInfo,
+      eSectionTypeDWARFDebugLine,       eSectionTypeDWARFDebugLineStr,
+      eSectionTypeDWARFDebugLoc,        eSectionTypeDWARFDebugLocLists,
+      eSectionTypeDWARFDebugMacInfo,    eSectionTypeDWARFDebugMacro,
+      eSectionTypeDWARFDebugNames,      eSectionTypeDWARFDebugPubNames,
+      eSectionTypeDWARFDebugPubTypes,   eSectionTypeDWARFDebugRanges,
+      eSectionTypeDWARFDebugRngLists,   eSectionTypeDWARFDebugStr,
+      eSectionTypeDWARFDebugStrOffsets, eSectionTypeDWARFDebugTypes,
+      eSectionTypeELFSymbolTable,       eSectionTypeDWARFGNUDebugAltLink,
+  };
+  for (SectionType section_type : g_sections) {
+    if (SectionSP section_sp =
+            objfile_section_list->FindSectionByType(section_type, true)) {
+      if (SectionSP module_section_sp =
+              module_section_list->FindSectionByType(section_type, true))
+        module_section_list->ReplaceSection(module_section_sp->GetID(),
+                                            section_sp);
+      else
+        module_section_list->AddSection(section_sp);
     }
   }
-  return nullptr;
+
+  symbol_vendor->AddSymbolFileRepresentation(dsym_objfile_sp);
+  return symbol_vendor;
 }
 
 // PluginInterface protocol
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt b/src/llvm-project/lldb/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
index bbcdff9..8e82eae 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Plugins/SymbolVendor/MacOSX/CMakeLists.txt
@@ -7,4 +7,5 @@
     lldbCore
     lldbHost
     lldbSymbol
+    lldbPluginObjectFileMachO
   )
diff --git a/src/llvm-project/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp b/src/llvm-project/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
index af9ea0a..bb37d77 100644
--- a/src/llvm-project/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
@@ -10,6 +10,7 @@
 
 #include <string.h>
 
+#include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
@@ -41,7 +42,7 @@
       if (feedback_strm) {
         feedback_strm->PutCString(
             "warning: failed to get the uuid for object file: '");
-        ofile->GetFileSpec().Dump(feedback_strm);
+        ofile->GetFileSpec().Dump(feedback_strm->AsRawOstream());
         feedback_strm->PutCString("\n");
       }
       return false;
@@ -56,11 +57,11 @@
           "warning: UUID mismatch detected between modules:\n    ");
       module->GetUUID().Dump(feedback_strm);
       feedback_strm->PutChar(' ');
-      module->GetFileSpec().Dump(feedback_strm);
+      module->GetFileSpec().Dump(feedback_strm->AsRawOstream());
       feedback_strm->PutCString("\n    ");
       dsym_uuid.Dump(feedback_strm);
       feedback_strm->PutChar(' ');
-      ofile->GetFileSpec().Dump(feedback_strm);
+      ofile->GetFileSpec().Dump(feedback_strm->AsRawOstream());
       feedback_strm->EOL();
     }
   }
@@ -97,15 +98,11 @@
   if (!module_sp)
     return NULL;
 
-  ObjectFile *obj_file = module_sp->GetObjectFile();
+  ObjectFile *obj_file =
+      llvm::dyn_cast_or_null<ObjectFileMachO>(module_sp->GetObjectFile());
   if (!obj_file)
     return NULL;
 
-  static ConstString obj_file_macho("mach-o");
-  ConstString obj_name = obj_file->GetPluginName();
-  if (obj_name != obj_file_macho)
-    return NULL;
-
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(func_cat,
                      "SymbolVendorMacOSX::CreateInstance (module = %s)",
diff --git a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
index c97eb98..571e1d8 100644
--- a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
@@ -150,50 +150,51 @@
                 g_get_item_info_function_code, eLanguageTypeObjC,
                 g_get_item_info_function_name, error));
         if (error.Fail()) {
-          if (log)
-            log->Printf("Failed to get utility function: %s.",
-                        error.AsCString());
+          LLDB_LOGF(log, "Failed to get utility function: %s.",
+                    error.AsCString());
           return args_addr;
         }
 
         if (!m_get_item_info_impl_code->Install(diagnostics, exe_ctx)) {
           if (log) {
-            log->Printf("Failed to install get-item-info introspection.");
+            LLDB_LOGF(log, "Failed to install get-item-info introspection.");
             diagnostics.Dump(log);
           }
           m_get_item_info_impl_code.reset();
           return args_addr;
         }
       } else {
-        if (log)
-          log->Printf("No get-item-info introspection code found.");
+        LLDB_LOGF(log, "No get-item-info introspection code found.");
         return LLDB_INVALID_ADDRESS;
       }
 
       // Next make the runner function for our implementation utility function.
-      Status error;
-
-      TypeSystem *type_system =
+      auto type_system_or_err =
           thread.GetProcess()->GetTarget().GetScratchTypeSystemForLanguage(
-              nullptr, eLanguageTypeC);
+              eLanguageTypeC);
+      if (auto err = type_system_or_err.takeError()) {
+        LLDB_LOG_ERROR(log, std::move(err),
+                       "Error inseting get-item-info function");
+        return args_addr;
+      }
       CompilerType get_item_info_return_type =
-          type_system->GetBasicTypeFromAST(eBasicTypeVoid).GetPointerType();
+          type_system_or_err->GetBasicTypeFromAST(eBasicTypeVoid)
+              .GetPointerType();
 
+      Status error;
       get_item_info_caller = m_get_item_info_impl_code->MakeFunctionCaller(
           get_item_info_return_type, get_item_info_arglist,
           thread.shared_from_this(), error);
       if (error.Fail() || get_item_info_caller == nullptr) {
-        if (log)
-          log->Printf("Error Inserting get-item-info function: \"%s\".",
-                      error.AsCString());
+        LLDB_LOGF(log, "Error Inserting get-item-info function: \"%s\".",
+                  error.AsCString());
         return args_addr;
       }
     } else {
       // If it's already made, then we can just retrieve the caller:
       get_item_info_caller = m_get_item_info_impl_code->GetFunctionCaller();
       if (!get_item_info_caller) {
-        if (log)
-          log->Printf("Failed to get get-item-info introspection caller.");
+        LLDB_LOGF(log, "Failed to get get-item-info introspection caller.");
         m_get_item_info_impl_code.reset();
         return args_addr;
       }
@@ -210,7 +211,7 @@
   if (!get_item_info_caller->WriteFunctionArguments(
           exe_ctx, args_addr, get_item_info_arglist, diagnostics)) {
     if (log) {
-      log->Printf("Error writing get-item-info function arguments.");
+      LLDB_LOGF(log, "Error writing get-item-info function arguments.");
       diagnostics.Dump(log);
     }
 
@@ -228,7 +229,7 @@
   lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
   ProcessSP process_sp(thread.CalculateProcess());
   TargetSP target_sp(thread.CalculateTarget());
-  ClangASTContext *clang_ast_context = target_sp->GetScratchClangASTContext();
+  ClangASTContext *clang_ast_context = ClangASTContext::GetScratch(*target_sp);
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
 
   GetItemInfoReturnInfo return_value;
@@ -238,9 +239,8 @@
   error.Clear();
 
   if (!thread.SafeToCallFunctions()) {
-    if (log)
-      log->Printf("Not safe to call functions on thread 0x%" PRIx64,
-                  thread.GetID());
+    LLDB_LOGF(log, "Not safe to call functions on thread 0x%" PRIx64,
+              thread.GetID());
     error.SetErrorString("Not safe to call functions on this thread.");
     return return_value;
   }
@@ -297,9 +297,8 @@
     addr_t bufaddr = process_sp->AllocateMemory(
         32, ePermissionsReadable | ePermissionsWritable, error);
     if (!error.Success() || bufaddr == LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("Failed to allocate memory for return buffer for get "
-                    "current queues func call");
+      LLDB_LOGF(log, "Failed to allocate memory for return buffer for get "
+                     "current queues func call");
       return return_value;
     }
     m_get_item_info_return_buffer_addr = bufaddr;
@@ -333,6 +332,11 @@
   options.SetUnwindOnError(true);
   options.SetIgnoreBreakpoints(true);
   options.SetStopOthers(true);
+#if __has_feature(address_sanitizer)
+  options.SetTimeout(process_sp->GetUtilityExpressionTimeout());
+#else
+  options.SetTimeout(std::chrono::milliseconds(500));
+#endif
   options.SetTimeout(process_sp->GetUtilityExpressionTimeout());
   options.SetTryAllThreads(false);
   options.SetIsForUtilityExpr(true);
@@ -348,9 +352,8 @@
   Value results;
   FunctionCaller *func_caller = m_get_item_info_impl_code->GetFunctionCaller();
   if (!func_caller) {
-    if (log)
-      log->Printf("Could not retrieve function caller for "
-                  "__introspection_dispatch_queue_item_get_info.");
+    LLDB_LOGF(log, "Could not retrieve function caller for "
+                   "__introspection_dispatch_queue_item_get_info.");
     error.SetErrorString("Could not retrieve function caller for "
                          "__introspection_dispatch_queue_item_get_info.");
     return return_value;
@@ -359,11 +362,11 @@
   func_call_ret = func_caller->ExecuteFunction(exe_ctx, &args_addr, options,
                                                diagnostics, results);
   if (func_call_ret != eExpressionCompleted || !error.Success()) {
-    if (log)
-      log->Printf("Unable to call "
-                  "__introspection_dispatch_queue_item_get_info(), got "
-                  "ExpressionResults %d, error contains %s",
-                  func_call_ret, error.AsCString(""));
+    LLDB_LOGF(log,
+              "Unable to call "
+              "__introspection_dispatch_queue_item_get_info(), got "
+              "ExpressionResults %d, error contains %s",
+              func_call_ret, error.AsCString(""));
     error.SetErrorString("Unable to call "
                          "__introspection_dispatch_queue_get_item_info() for "
                          "list of queues");
@@ -385,13 +388,13 @@
     return_value.item_buffer_ptr = LLDB_INVALID_ADDRESS;
     return return_value;
   }
-  if (log)
-    log->Printf("AppleGetItemInfoHandler called "
-                "__introspection_dispatch_queue_item_get_info (page_to_free == "
-                "0x%" PRIx64 ", size = %" PRId64
-                "), returned page is at 0x%" PRIx64 ", size %" PRId64,
-                page_to_free, page_to_free_size, return_value.item_buffer_ptr,
-                return_value.item_buffer_size);
+  LLDB_LOGF(log,
+            "AppleGetItemInfoHandler called "
+            "__introspection_dispatch_queue_item_get_info (page_to_free == "
+            "0x%" PRIx64 ", size = %" PRId64 "), returned page is at 0x%" PRIx64
+            ", size %" PRId64,
+            page_to_free, page_to_free_size, return_value.item_buffer_ptr,
+            return_value.item_buffer_size);
 
   return return_value;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
index 12fad7f..be1b100 100644
--- a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
@@ -154,31 +154,30 @@
                 g_get_pending_items_function_code, eLanguageTypeObjC,
                 g_get_pending_items_function_name, error));
         if (error.Fail()) {
-          if (log)
-            log->Printf("Failed to get UtilityFunction for pending-items "
-                        "introspection: %s.",
-                        error.AsCString());
+          LLDB_LOGF(log,
+                    "Failed to get UtilityFunction for pending-items "
+                    "introspection: %s.",
+                    error.AsCString());
           return args_addr;
         }
 
         if (!m_get_pending_items_impl_code->Install(diagnostics, exe_ctx)) {
           if (log) {
-            log->Printf("Failed to install pending-items introspection.");
+            LLDB_LOGF(log, "Failed to install pending-items introspection.");
             diagnostics.Dump(log);
           }
           m_get_pending_items_impl_code.reset();
           return args_addr;
         }
       } else {
-        if (log)
-          log->Printf("No pending-items introspection code found.");
+        LLDB_LOGF(log, "No pending-items introspection code found.");
         return LLDB_INVALID_ADDRESS;
       }
 
       // Next make the runner function for our implementation utility function.
       Status error;
       ClangASTContext *clang_ast_context =
-          thread.GetProcess()->GetTarget().GetScratchClangASTContext();
+          ClangASTContext::GetScratch(thread.GetProcess()->GetTarget());
       CompilerType get_pending_items_return_type =
           clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
       get_pending_items_caller =
@@ -186,10 +185,10 @@
               get_pending_items_return_type, get_pending_items_arglist,
               thread_sp, error);
       if (error.Fail() || get_pending_items_caller == nullptr) {
-        if (log)
-          log->Printf("Failed to install pending-items introspection function "
-                      "caller: %s.",
-                      error.AsCString());
+        LLDB_LOGF(log,
+                  "Failed to install pending-items introspection function "
+                  "caller: %s.",
+                  error.AsCString());
         m_get_pending_items_impl_code.reset();
         return args_addr;
       }
@@ -199,8 +198,7 @@
   diagnostics.Clear();
 
   if (get_pending_items_caller == nullptr) {
-    if (log)
-      log->Printf("Failed to get get_pending_items_caller.");
+    LLDB_LOGF(log, "Failed to get get_pending_items_caller.");
     return LLDB_INVALID_ADDRESS;
   }
 
@@ -212,7 +210,7 @@
   if (!get_pending_items_caller->WriteFunctionArguments(
           exe_ctx, args_addr, get_pending_items_arglist, diagnostics)) {
     if (log) {
-      log->Printf("Error writing pending-items function arguments.");
+      LLDB_LOGF(log, "Error writing pending-items function arguments.");
       diagnostics.Dump(log);
     }
 
@@ -230,7 +228,7 @@
   lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
   ProcessSP process_sp(thread.CalculateProcess());
   TargetSP target_sp(thread.CalculateTarget());
-  ClangASTContext *clang_ast_context = target_sp->GetScratchClangASTContext();
+  ClangASTContext *clang_ast_context = ClangASTContext::GetScratch(*target_sp);
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
 
   GetPendingItemsReturnInfo return_value;
@@ -241,9 +239,8 @@
   error.Clear();
 
   if (!thread.SafeToCallFunctions()) {
-    if (log)
-      log->Printf("Not safe to call functions on thread 0x%" PRIx64,
-                  thread.GetID());
+    LLDB_LOGF(log, "Not safe to call functions on thread 0x%" PRIx64,
+              thread.GetID());
     error.SetErrorString("Not safe to call functions on this thread.");
     return return_value;
   }
@@ -303,9 +300,8 @@
     addr_t bufaddr = process_sp->AllocateMemory(
         32, ePermissionsReadable | ePermissionsWritable, error);
     if (!error.Success() || bufaddr == LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("Failed to allocate memory for return buffer for get "
-                    "current queues func call");
+      LLDB_LOGF(log, "Failed to allocate memory for return buffer for get "
+                     "current queues func call");
       return return_value;
     }
     m_get_pending_items_return_buffer_addr = bufaddr;
@@ -342,7 +338,11 @@
   options.SetUnwindOnError(true);
   options.SetIgnoreBreakpoints(true);
   options.SetStopOthers(true);
+#if __has_feature(address_sanitizer)
   options.SetTimeout(process_sp->GetUtilityExpressionTimeout());
+#else
+  options.SetTimeout(std::chrono::milliseconds(500));
+#endif
   options.SetTryAllThreads(false);
   options.SetIsForUtilityExpr(true);
   thread.CalculateExecutionContext(exe_ctx);
@@ -358,11 +358,11 @@
   func_call_ret = get_pending_items_caller->ExecuteFunction(
       exe_ctx, &args_addr, options, diagnostics, results);
   if (func_call_ret != eExpressionCompleted || !error.Success()) {
-    if (log)
-      log->Printf("Unable to call "
-                  "__introspection_dispatch_queue_get_pending_items(), got "
-                  "ExpressionResults %d, error contains %s",
-                  func_call_ret, error.AsCString(""));
+    LLDB_LOGF(log,
+              "Unable to call "
+              "__introspection_dispatch_queue_get_pending_items(), got "
+              "ExpressionResults %d, error contains %s",
+              func_call_ret, error.AsCString(""));
     error.SetErrorString("Unable to call "
                          "__introspection_dispatch_queue_get_pending_items() "
                          "for list of queues");
@@ -392,14 +392,14 @@
     return return_value;
   }
 
-  if (log)
-    log->Printf("AppleGetPendingItemsHandler called "
-                "__introspection_dispatch_queue_get_pending_items "
-                "(page_to_free == 0x%" PRIx64 ", size = %" PRId64
-                "), returned page is at 0x%" PRIx64 ", size %" PRId64
-                ", count = %" PRId64,
-                page_to_free, page_to_free_size, return_value.items_buffer_ptr,
-                return_value.items_buffer_size, return_value.count);
+  LLDB_LOGF(log,
+            "AppleGetPendingItemsHandler called "
+            "__introspection_dispatch_queue_get_pending_items "
+            "(page_to_free == 0x%" PRIx64 ", size = %" PRId64
+            "), returned page is at 0x%" PRIx64 ", size %" PRId64
+            ", count = %" PRId64,
+            page_to_free, page_to_free_size, return_value.items_buffer_ptr,
+            return_value.items_buffer_size, return_value.count);
 
   return return_value;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
index e1dabae..338d63d 100644
--- a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
@@ -165,16 +165,16 @@
                 g_get_current_queues_function_code, eLanguageTypeC,
                 g_get_current_queues_function_name, error));
         if (error.Fail()) {
-          if (log)
-            log->Printf(
-                "Failed to get UtilityFunction for queues introspection: %s.",
-                error.AsCString());
+          LLDB_LOGF(
+              log,
+              "Failed to get UtilityFunction for queues introspection: %s.",
+              error.AsCString());
           return args_addr;
         }
 
         if (!m_get_queues_impl_code_up->Install(diagnostics, exe_ctx)) {
           if (log) {
-            log->Printf("Failed to install queues introspection");
+            LLDB_LOGF(log, "Failed to install queues introspection");
             diagnostics.Dump(log);
           }
           m_get_queues_impl_code_up.reset();
@@ -182,7 +182,7 @@
         }
       } else {
         if (log) {
-          log->Printf("No queues introspection code found.");
+          LLDB_LOGF(log, "No queues introspection code found.");
           diagnostics.Dump(log);
         }
         return LLDB_INVALID_ADDRESS;
@@ -191,17 +191,16 @@
 
     // Next make the runner function for our implementation utility function.
     ClangASTContext *clang_ast_context =
-        thread.GetProcess()->GetTarget().GetScratchClangASTContext();
+        ClangASTContext::GetScratch(thread.GetProcess()->GetTarget());
     CompilerType get_queues_return_type =
         clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
     Status error;
     get_queues_caller = m_get_queues_impl_code_up->MakeFunctionCaller(
         get_queues_return_type, get_queues_arglist, thread_sp, error);
     if (error.Fail() || get_queues_caller == nullptr) {
-      if (log)
-        log->Printf(
-            "Could not get function caller for get-queues function: %s.",
-            error.AsCString());
+      LLDB_LOGF(log,
+                "Could not get function caller for get-queues function: %s.",
+                error.AsCString());
       return args_addr;
     }
   }
@@ -216,7 +215,7 @@
   if (!get_queues_caller->WriteFunctionArguments(
           exe_ctx, args_addr, get_queues_arglist, diagnostics)) {
     if (log) {
-      log->Printf("Error writing get-queues function arguments.");
+      LLDB_LOGF(log, "Error writing get-queues function arguments.");
       diagnostics.Dump(log);
     }
     return args_addr;
@@ -232,7 +231,7 @@
   lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
   ProcessSP process_sp(thread.CalculateProcess());
   TargetSP target_sp(thread.CalculateTarget());
-  ClangASTContext *clang_ast_context = target_sp->GetScratchClangASTContext();
+  ClangASTContext *clang_ast_context = ClangASTContext::GetScratch(*target_sp);
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
 
   GetQueuesReturnInfo return_value;
@@ -243,9 +242,8 @@
   error.Clear();
 
   if (!thread.SafeToCallFunctions()) {
-    if (log)
-      log->Printf("Not safe to call functions on thread 0x%" PRIx64,
-                  thread.GetID());
+    LLDB_LOGF(log, "Not safe to call functions on thread 0x%" PRIx64,
+              thread.GetID());
     error.SetErrorString("Not safe to call functions on this thread.");
     return return_value;
   }
@@ -299,9 +297,8 @@
     addr_t bufaddr = process_sp->AllocateMemory(
         32, ePermissionsReadable | ePermissionsWritable, error);
     if (!error.Success() || bufaddr == LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("Failed to allocate memory for return buffer for get "
-                    "current queues func call");
+      LLDB_LOGF(log, "Failed to allocate memory for return buffer for get "
+                     "current queues func call");
       return return_value;
     }
     m_get_queues_return_buffer_addr = bufaddr;
@@ -347,7 +344,11 @@
   options.SetUnwindOnError(true);
   options.SetIgnoreBreakpoints(true);
   options.SetStopOthers(true);
+#if __has_feature(address_sanitizer)
   options.SetTimeout(process_sp->GetUtilityExpressionTimeout());
+#else
+  options.SetTimeout(std::chrono::milliseconds(500));
+#endif
   options.SetTryAllThreads(false);
   options.SetIsForUtilityExpr(true);
   thread.CalculateExecutionContext(exe_ctx);
@@ -357,10 +358,10 @@
   func_call_ret = get_queues_caller->ExecuteFunction(
       exe_ctx, &args_addr, options, diagnostics, results);
   if (func_call_ret != eExpressionCompleted || !error.Success()) {
-    if (log)
-      log->Printf("Unable to call introspection_get_dispatch_queues(), got "
-                  "ExpressionResults %d, error contains %s",
-                  func_call_ret, error.AsCString(""));
+    LLDB_LOGF(log,
+              "Unable to call introspection_get_dispatch_queues(), got "
+              "ExpressionResults %d, error contains %s",
+              func_call_ret, error.AsCString(""));
     error.SetErrorString("Unable to call introspection_get_dispatch_queues() "
                          "for list of queues");
     return return_value;
@@ -389,14 +390,13 @@
     return return_value;
   }
 
-  if (log)
-    log->Printf("AppleGetQueuesHandler called "
-                "__introspection_dispatch_get_queues (page_to_free == "
-                "0x%" PRIx64 ", size = %" PRId64
-                "), returned page is at 0x%" PRIx64 ", size %" PRId64
-                ", count = %" PRId64,
-                page_to_free, page_to_free_size, return_value.queues_buffer_ptr,
-                return_value.queues_buffer_size, return_value.count);
+  LLDB_LOGF(log,
+            "AppleGetQueuesHandler called "
+            "__introspection_dispatch_get_queues (page_to_free == "
+            "0x%" PRIx64 ", size = %" PRId64 "), returned page is at 0x%" PRIx64
+            ", size %" PRId64 ", count = %" PRId64,
+            page_to_free, page_to_free_size, return_value.queues_buffer_ptr,
+            return_value.queues_buffer_size, return_value.count);
 
   return return_value;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
index 7d0cbc0..22beda8 100644
--- a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
@@ -160,18 +160,18 @@
                 g_get_thread_item_info_function_code, eLanguageTypeC,
                 g_get_thread_item_info_function_name, error));
         if (error.Fail()) {
-          if (log)
-            log->Printf("Failed to get UtilityFunction for "
-                        "get-thread-item-info introspection: %s.",
-                        error.AsCString());
+          LLDB_LOGF(log,
+                    "Failed to get UtilityFunction for "
+                    "get-thread-item-info introspection: %s.",
+                    error.AsCString());
           m_get_thread_item_info_impl_code.reset();
           return args_addr;
         }
 
         if (!m_get_thread_item_info_impl_code->Install(diagnostics, exe_ctx)) {
           if (log) {
-            log->Printf(
-                "Failed to install get-thread-item-info introspection.");
+            LLDB_LOGF(log,
+                      "Failed to install get-thread-item-info introspection.");
             diagnostics.Dump(log);
           }
 
@@ -179,15 +179,14 @@
           return args_addr;
         }
       } else {
-        if (log)
-          log->Printf("No get-thread-item-info introspection code found.");
+        LLDB_LOGF(log, "No get-thread-item-info introspection code found.");
         return LLDB_INVALID_ADDRESS;
       }
 
       // Also make the FunctionCaller for this UtilityFunction:
 
       ClangASTContext *clang_ast_context =
-          thread.GetProcess()->GetTarget().GetScratchClangASTContext();
+          ClangASTContext::GetScratch(thread.GetProcess()->GetTarget());
       CompilerType get_thread_item_info_return_type =
           clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType();
 
@@ -196,10 +195,10 @@
               get_thread_item_info_return_type, get_thread_item_info_arglist,
               thread_sp, error);
       if (error.Fail() || get_thread_item_info_caller == nullptr) {
-        if (log)
-          log->Printf("Failed to install get-thread-item-info introspection "
-                      "caller: %s.",
-                      error.AsCString());
+        LLDB_LOGF(log,
+                  "Failed to install get-thread-item-info introspection "
+                  "caller: %s.",
+                  error.AsCString());
         m_get_thread_item_info_impl_code.reset();
         return args_addr;
       }
@@ -220,7 +219,7 @@
   if (!get_thread_item_info_caller->WriteFunctionArguments(
           exe_ctx, args_addr, get_thread_item_info_arglist, diagnostics)) {
     if (log) {
-      log->Printf("Error writing get-thread-item-info function arguments");
+      LLDB_LOGF(log, "Error writing get-thread-item-info function arguments");
       diagnostics.Dump(log);
     }
     return args_addr;
@@ -238,7 +237,7 @@
   lldb::StackFrameSP thread_cur_frame = thread.GetStackFrameAtIndex(0);
   ProcessSP process_sp(thread.CalculateProcess());
   TargetSP target_sp(thread.CalculateTarget());
-  ClangASTContext *clang_ast_context = target_sp->GetScratchClangASTContext();
+  ClangASTContext *clang_ast_context = ClangASTContext::GetScratch(*target_sp);
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYSTEM_RUNTIME));
 
   GetThreadItemInfoReturnInfo return_value;
@@ -248,9 +247,8 @@
   error.Clear();
 
   if (!thread.SafeToCallFunctions()) {
-    if (log)
-      log->Printf("Not safe to call functions on thread 0x%" PRIx64,
-                  thread.GetID());
+    LLDB_LOGF(log, "Not safe to call functions on thread 0x%" PRIx64,
+              thread.GetID());
     error.SetErrorString("Not safe to call functions on this thread.");
     return return_value;
   }
@@ -305,9 +303,8 @@
     addr_t bufaddr = process_sp->AllocateMemory(
         32, ePermissionsReadable | ePermissionsWritable, error);
     if (!error.Success() || bufaddr == LLDB_INVALID_ADDRESS) {
-      if (log)
-        log->Printf("Failed to allocate memory for return buffer for get "
-                    "current queues func call");
+      LLDB_LOGF(log, "Failed to allocate memory for return buffer for get "
+                     "current queues func call");
       return return_value;
     }
     m_get_thread_item_info_return_buffer_addr = bufaddr;
@@ -344,7 +341,11 @@
   options.SetUnwindOnError(true);
   options.SetIgnoreBreakpoints(true);
   options.SetStopOthers(true);
+#if __has_feature(address_sanitizer)
   options.SetTimeout(process_sp->GetUtilityExpressionTimeout());
+#else
+  options.SetTimeout(std::chrono::milliseconds(500));
+#endif
   options.SetTryAllThreads(false);
   options.SetIsForUtilityExpr(true);
   thread.CalculateExecutionContext(exe_ctx);
@@ -369,11 +370,11 @@
   func_call_ret = get_thread_item_info_caller->ExecuteFunction(
       exe_ctx, &args_addr, options, diagnostics, results);
   if (func_call_ret != eExpressionCompleted || !error.Success()) {
-    if (log)
-      log->Printf("Unable to call "
-                  "__introspection_dispatch_thread_get_item_info(), got "
-                  "ExpressionResults %d, error contains %s",
-                  func_call_ret, error.AsCString(""));
+    LLDB_LOGF(log,
+              "Unable to call "
+              "__introspection_dispatch_thread_get_item_info(), got "
+              "ExpressionResults %d, error contains %s",
+              func_call_ret, error.AsCString(""));
     error.SetErrorString("Unable to call "
                          "__introspection_dispatch_thread_get_item_info() for "
                          "list of queues");
@@ -397,13 +398,13 @@
     return return_value;
   }
 
-  if (log)
-    log->Printf("AppleGetThreadItemInfoHandler called "
-                "__introspection_dispatch_thread_get_item_info (page_to_free "
-                "== 0x%" PRIx64 ", size = %" PRId64
-                "), returned page is at 0x%" PRIx64 ", size %" PRId64,
-                page_to_free, page_to_free_size, return_value.item_buffer_ptr,
-                return_value.item_buffer_size);
+  LLDB_LOGF(log,
+            "AppleGetThreadItemInfoHandler called "
+            "__introspection_dispatch_thread_get_item_info (page_to_free "
+            "== 0x%" PRIx64 ", size = %" PRId64
+            "), returned page is at 0x%" PRIx64 ", size %" PRId64,
+            page_to_free, page_to_free_size, return_value.item_buffer_ptr,
+            return_value.item_buffer_size);
 
   return return_value;
 }
diff --git a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
index dfcc6ac..69a4470 100644
--- a/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
+++ b/src/llvm-project/lldb/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.cpp
@@ -412,9 +412,8 @@
 #endif
 
     ClangASTContext *ast_ctx =
-        m_process->GetTarget().GetScratchClangASTContext();
-    if (ast_ctx->getASTContext() &&
-        m_dispatch_tsd_indexes_addr != LLDB_INVALID_ADDRESS) {
+        ClangASTContext::GetScratch(m_process->GetTarget());
+    if (m_dispatch_tsd_indexes_addr != LLDB_INVALID_ADDRESS) {
       CompilerType uint16 =
           ast_ctx->GetBuiltinTypeForEncodingAndBitSize(eEncodingUint, 16);
       CompilerType dispatch_tsd_indexes_s = ast_ctx->CreateRecordType(
@@ -579,9 +578,9 @@
   static ConstString introspection_dispatch_queue_info_version(
       "__introspection_dispatch_queue_info_version");
   SymbolContextList sc_list;
-  if (m_process->GetTarget().GetImages().FindSymbolsWithNameAndType(
-          introspection_dispatch_queue_info_version, eSymbolTypeData, sc_list) >
-      0) {
+  m_process->GetTarget().GetImages().FindSymbolsWithNameAndType(
+      introspection_dispatch_queue_info_version, eSymbolTypeData, sc_list);
+  if (!sc_list.IsEmpty()) {
     SymbolContext sc;
     sc_list.GetContextAtIndex(0, sc);
     AddressRange addr_range;
@@ -593,9 +592,9 @@
 
   static ConstString introspection_dispatch_queue_info_data_offset(
       "__introspection_dispatch_queue_info_data_offset");
-  if (m_process->GetTarget().GetImages().FindSymbolsWithNameAndType(
-          introspection_dispatch_queue_info_data_offset, eSymbolTypeData,
-          sc_list) > 0) {
+  m_process->GetTarget().GetImages().FindSymbolsWithNameAndType(
+      introspection_dispatch_queue_info_data_offset, eSymbolTypeData, sc_list);
+  if (!sc_list.IsEmpty()) {
     SymbolContext sc;
     sc_list.GetContextAtIndex(0, sc);
     AddressRange addr_range;
@@ -607,9 +606,9 @@
 
   static ConstString introspection_dispatch_item_info_version(
       "__introspection_dispatch_item_info_version");
-  if (m_process->GetTarget().GetImages().FindSymbolsWithNameAndType(
-          introspection_dispatch_item_info_version, eSymbolTypeData, sc_list) >
-      0) {
+  m_process->GetTarget().GetImages().FindSymbolsWithNameAndType(
+      introspection_dispatch_item_info_version, eSymbolTypeData, sc_list);
+  if (!sc_list.IsEmpty()) {
     SymbolContext sc;
     sc_list.GetContextAtIndex(0, sc);
     AddressRange addr_range;
@@ -621,9 +620,9 @@
 
   static ConstString introspection_dispatch_item_info_data_offset(
       "__introspection_dispatch_item_info_data_offset");
-  if (m_process->GetTarget().GetImages().FindSymbolsWithNameAndType(
-          introspection_dispatch_item_info_data_offset, eSymbolTypeData,
-          sc_list) > 0) {
+  m_process->GetTarget().GetImages().FindSymbolsWithNameAndType(
+      introspection_dispatch_item_info_data_offset, eSymbolTypeData, sc_list);
+  if (!sc_list.IsEmpty()) {
     SymbolContext sc;
     sc_list.GetContextAtIndex(0, sc);
     AddressRange addr_range;
@@ -927,13 +926,13 @@
       offset_t start_of_next_item = start_of_this_item + offset_to_next;
       offset = start_of_next_item;
 
-      if (log)
-        log->Printf("SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR added "
-                    "queue with dispatch_queue_t 0x%" PRIx64
-                    ", serial number 0x%" PRIx64
-                    ", running items %d, pending items %d, name '%s'",
-                    queue, serialnum, running_work_items_count,
-                    pending_work_items_count, queue_label);
+      LLDB_LOGF(log,
+                "SystemRuntimeMacOSX::PopulateQueuesUsingLibBTR added "
+                "queue with dispatch_queue_t 0x%" PRIx64
+                ", serial number 0x%" PRIx64
+                ", running items %d, pending items %d, name '%s'",
+                queue, serialnum, running_work_items_count,
+                pending_work_items_count, queue_label);
 
       QueueSP queue_sp(
           new Queue(m_process->shared_from_this(), serialnum, queue_label));
diff --git a/src/llvm-project/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp b/src/llvm-project/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
index 43041ca..bf6f60a 100644
--- a/src/llvm-project/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
+++ b/src/llvm-project/lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp
@@ -1328,6 +1328,7 @@
   unwind_plan.SetSourceName("assembly insn profiling");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolNo);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolYes);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
 
   return true;
 }
@@ -1370,7 +1371,6 @@
   int row_id = 1;
   bool unwind_plan_updated = false;
   UnwindPlan::RowSP row(new UnwindPlan::Row(*first_row));
-  m_cur_insn = data + offset;
 
   // After a mid-function epilogue we will need to re-insert the original
   // unwind rules so unwinds work for the remainder of the function.  These
@@ -1380,19 +1380,17 @@
   while (offset < size) {
     m_cur_insn = data + offset;
     int insn_len;
-    if (!instruction_length(m_cur_insn, insn_len, size - offset)
-        || insn_len == 0 
-        || insn_len > kMaxInstructionByteSize) {
+    if (!instruction_length(m_cur_insn, insn_len, size - offset) ||
+        insn_len == 0 || insn_len > kMaxInstructionByteSize) {
       // An unrecognized/junk instruction.
       break;
     }
 
     // Advance offsets.
     offset += insn_len;
-    m_cur_insn = data + offset;
 
     // offset is pointing beyond the bounds of the function; stop looping.
-    if (offset >= size) 
+    if (offset >= size)
       continue;
 
     if (reinstate_unwind_state) {
@@ -1546,16 +1544,18 @@
       //     [0x5d] pop %rbp/%ebp
       //  => [0xc3] ret
       if (pop_rbp_pattern_p() || leave_pattern_p()) {
-        offset += 1;
-        row->SetOffset(offset);
-        row->GetCFAValue().SetIsRegisterPlusOffset(
-            first_row->GetCFAValue().GetRegisterNumber(), m_wordsize);
+        m_cur_insn++;
+        if (ret_pattern_p()) {
+          row->SetOffset(offset);
+          row->GetCFAValue().SetIsRegisterPlusOffset(
+              first_row->GetCFAValue().GetRegisterNumber(), m_wordsize);
 
-        UnwindPlan::RowSP new_row(new UnwindPlan::Row(*row));
-        unwind_plan.InsertRow(new_row);
-        unwind_plan_updated = true;
-        reinstate_unwind_state = true;
-        continue;
+          UnwindPlan::RowSP new_row(new UnwindPlan::Row(*row));
+          unwind_plan.InsertRow(new_row);
+          unwind_plan_updated = true;
+          reinstate_unwind_state = true;
+          continue;
+        }
       }
     } else {
       // CFA register is not sp or fp.
diff --git a/src/llvm-project/lldb/source/Symbol/ArmUnwindInfo.cpp b/src/llvm-project/lldb/source/Symbol/ArmUnwindInfo.cpp
index b9fd84b..fdf4e30 100644
--- a/src/llvm-project/lldb/source/Symbol/ArmUnwindInfo.cpp
+++ b/src/llvm-project/lldb/source/Symbol/ArmUnwindInfo.cpp
@@ -344,6 +344,7 @@
   unwind_plan.SetSourceName("ARM.exidx unwind info");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolYes);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetRegisterKind(eRegisterKindDWARF);
 
   return true;
diff --git a/src/llvm-project/lldb/source/Symbol/Block.cpp b/src/llvm-project/lldb/source/Symbol/Block.cpp
index 6fe6170..bf38006 100644
--- a/src/llvm-project/lldb/source/Symbol/Block.cpp
+++ b/src/llvm-project/lldb/source/Symbol/Block.cpp
@@ -12,7 +12,6 @@
 #include "lldb/Core/Section.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Utility/Log.h"
 
@@ -45,8 +44,8 @@
     s->Printf(", range%s = ", num_ranges > 1 ? "s" : "");
     for (size_t i = 0; i < num_ranges; ++i) {
       const Range &range = m_ranges.GetEntryRef(i);
-      s->AddressRange(base_addr + range.GetRangeBase(),
-                      base_addr + range.GetRangeEnd(), 4);
+      DumpAddressRange(s->AsRawOstream(), base_addr + range.GetRangeBase(),
+                       base_addr + range.GetRangeEnd(), 4);
     }
   }
 
@@ -88,8 +87,8 @@
         *s << '!';
       else
         *s << ' ';
-      s->AddressRange(base_addr + range.GetRangeBase(),
-                      base_addr + range.GetRangeEnd(), 4);
+      DumpAddressRange(s->AsRawOstream(), base_addr + range.GetRangeBase(),
+                       base_addr + range.GetRangeEnd(), 4);
     }
   }
   s->EOL();
@@ -161,8 +160,8 @@
     size_t num_ranges = m_ranges.GetSize();
     for (size_t i = 0; i < num_ranges; ++i) {
       const Range &range = m_ranges.GetEntryRef(i);
-      s->AddressRange(base_addr + range.GetRangeBase(),
-                      base_addr + range.GetRangeEnd(), 4);
+      DumpAddressRange(s->AsRawOstream(), base_addr + range.GetRangeBase(),
+                       base_addr + range.GetRangeEnd(), 4);
     }
   }
 }
@@ -337,22 +336,24 @@
 
       const Declaration &func_decl = func_type->GetDeclaration();
       if (func_decl.GetLine()) {
-        log->Printf("warning: %s:%u block {0x%8.8" PRIx64
-                    "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64
-                    ") which is not contained in parent block {0x%8.8" PRIx64
-                    "} in function {0x%8.8" PRIx64 "} from %s",
-                    func_decl.GetFile().GetPath().c_str(), func_decl.GetLine(),
-                    GetID(), (uint32_t)m_ranges.GetSize(), block_start_addr,
-                    block_end_addr, parent_block->GetID(), function->GetID(),
-                    module_sp->GetFileSpec().GetPath().c_str());
+        LLDB_LOGF(log,
+                  "warning: %s:%u block {0x%8.8" PRIx64
+                  "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64
+                  ") which is not contained in parent block {0x%8.8" PRIx64
+                  "} in function {0x%8.8" PRIx64 "} from %s",
+                  func_decl.GetFile().GetPath().c_str(), func_decl.GetLine(),
+                  GetID(), (uint32_t)m_ranges.GetSize(), block_start_addr,
+                  block_end_addr, parent_block->GetID(), function->GetID(),
+                  module_sp->GetFileSpec().GetPath().c_str());
       } else {
-        log->Printf("warning: block {0x%8.8" PRIx64
-                    "} has range[%u] [0x%" PRIx64 " - 0x%" PRIx64
-                    ") which is not contained in parent block {0x%8.8" PRIx64
-                    "} in function {0x%8.8" PRIx64 "} from %s",
-                    GetID(), (uint32_t)m_ranges.GetSize(), block_start_addr,
-                    block_end_addr, parent_block->GetID(), function->GetID(),
-                    module_sp->GetFileSpec().GetPath().c_str());
+        LLDB_LOGF(log,
+                  "warning: block {0x%8.8" PRIx64 "} has range[%u] [0x%" PRIx64
+                  " - 0x%" PRIx64
+                  ") which is not contained in parent block {0x%8.8" PRIx64
+                  "} in function {0x%8.8" PRIx64 "} from %s",
+                  GetID(), (uint32_t)m_ranges.GetSize(), block_start_addr,
+                  block_end_addr, parent_block->GetID(), function->GetID(),
+                  module_sp->GetFileSpec().GetPath().c_str());
       }
     }
     parent_block->AddRange(range);
@@ -391,7 +392,7 @@
       SymbolContext sc;
       CalculateSymbolContext(&sc);
       assert(sc.module_sp);
-      sc.module_sp->GetSymbolVendor()->ParseVariablesForContext(sc);
+      sc.module_sp->GetSymbolFile()->ParseVariablesForContext(sc);
     }
   }
   return m_variable_list_sp;
@@ -405,11 +406,10 @@
   uint32_t num_variables_added = 0;
   VariableList *block_var_list = GetBlockVariableList(can_create).get();
   if (block_var_list) {
-    for (size_t i = 0; i < block_var_list->GetSize(); ++i) {
-      VariableSP variable = block_var_list->GetVariableAtIndex(i);
-      if (filter(variable.get())) {
+    for (const VariableSP &var_sp : *block_var_list) {
+      if (filter(var_sp.get())) {
         num_variables_added++;
-        variable_list->AddVariable(variable);
+        variable_list->AddVariable(var_sp);
       }
     }
   }
@@ -462,8 +462,7 @@
 
 SymbolFile *Block::GetSymbolFile() {
   if (ModuleSP module_sp = CalculateSymbolContextModule())
-    if (SymbolVendor *sym_vendor = module_sp->GetSymbolVendor())
-      return sym_vendor->GetSymbolFile();
+    return module_sp->GetSymbolFile();
   return nullptr;
 }
 
diff --git a/src/llvm-project/lldb/source/Symbol/CMakeLists.txt b/src/llvm-project/lldb/source/Symbol/CMakeLists.txt
index 4b922c2..4bfef89 100644
--- a/src/llvm-project/lldb/source/Symbol/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Symbol/CMakeLists.txt
@@ -9,8 +9,8 @@
   Block.cpp
   ClangASTContext.cpp
   ClangASTImporter.cpp
+  ClangASTMetadata.cpp
   ClangExternalASTSourceCallbacks.cpp
-  ClangExternalASTSourceCommon.cpp
   ClangUtil.cpp
   CompactUnwindInfo.cpp
   CompileUnit.cpp
@@ -42,14 +42,10 @@
   UnwindTable.cpp
   Variable.cpp
   VariableList.cpp
-  VerifyDecl.cpp
 
   ${PLATFORM_SOURCES}
 
   LINK_LIBS
-    clangAST
-    clangBasic
-    clangFrontend
     lldbCore
     lldbExpression
     lldbHost
@@ -61,6 +57,11 @@
     lldbPluginObjCLanguage
     lldbPluginObjCRuntime
 
+  CLANG_LIBS
+    clangAST
+    clangBasic
+    clangFrontend
+
   LINK_COMPONENTS
     Support
   )
diff --git a/src/llvm-project/lldb/source/Symbol/ClangASTContext.cpp b/src/llvm-project/lldb/source/Symbol/ClangASTContext.cpp
index 2055233..ac3bce1 100644
--- a/src/llvm-project/lldb/source/Symbol/ClangASTContext.cpp
+++ b/src/llvm-project/lldb/source/Symbol/ClangASTContext.cpp
@@ -15,24 +15,6 @@
 #include <string>
 #include <vector>
 
-
-// Clang headers like to use NDEBUG inside of them to enable/disable debug
-// related features using "#ifndef NDEBUG" preprocessor blocks to do one thing
-// or another. This is bad because it means that if clang was built in release
-// mode, it assumes that you are building in release mode which is not always
-// the case. You can end up with functions that are defined as empty in header
-// files when NDEBUG is not defined, and this can cause link errors with the
-// clang .a files that you have since you might be missing functions in the .a
-// file. So we have to define NDEBUG when including clang headers to avoid any
-// mismatches. This is covered by rdar://problem/8691220
-
-#if !defined(NDEBUG) && !defined(LLVM_NDEBUG_OFF)
-#define LLDB_DEFINED_NDEBUG_FOR_CLANG
-#define NDEBUG
-// Need to include assert.h so it is as clang would expect it to be (disabled)
-#include <assert.h>
-#endif
-
 #include "clang/AST/ASTContext.h"
 #include "clang/AST/ASTImporter.h"
 #include "clang/AST/Attr.h"
@@ -47,24 +29,18 @@
 #include "clang/Basic/Diagnostic.h"
 #include "clang/Basic/FileManager.h"
 #include "clang/Basic/FileSystemOptions.h"
+#include "clang/Basic/LangStandard.h"
 #include "clang/Basic/SourceManager.h"
 #include "clang/Basic/TargetInfo.h"
 #include "clang/Basic/TargetOptions.h"
 #include "clang/Frontend/FrontendOptions.h"
-#include "clang/Frontend/LangStandard.h"
 #include "clang/Sema/Sema.h"
 
-#ifdef LLDB_DEFINED_NDEBUG_FOR_CLANG
-#undef NDEBUG
-#undef LLDB_DEFINED_NDEBUG_FOR_CLANG
-// Need to re-include assert.h so it is as _we_ would expect it to be (enabled)
-#include <assert.h>
-#endif
-
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/Threading.h"
 
 #include "Plugins/ExpressionParser/Clang/ClangFunctionCaller.h"
+#include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h"
 #include "Plugins/ExpressionParser/Clang/ClangUserExpression.h"
 #include "Plugins/ExpressionParser/Clang/ClangUtilityFunction.h"
 #include "lldb/Utility/ArchSpec.h"
@@ -76,14 +52,12 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/ThreadSafeDenseMap.h"
 #include "lldb/Core/UniqueCStringMap.h"
-#include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/ClangASTImporter.h"
+#include "lldb/Symbol/ClangASTMetadata.h"
 #include "lldb/Symbol/ClangExternalASTSourceCallbacks.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
 #include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/VerifyDecl.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Language.h"
 #include "lldb/Target/Process.h"
@@ -104,17 +78,24 @@
 
 using namespace lldb;
 using namespace lldb_private;
-using namespace llvm;
 using namespace clang;
+using llvm::StringSwitch;
 
 namespace {
+#ifdef LLDB_CONFIGURATION_DEBUG
+static void VerifyDecl(clang::Decl *decl) {
+  assert(decl && "VerifyDecl called with nullptr?");
+  decl->getAccess();
+}
+#endif
+
 static inline bool
 ClangASTContextSupportsLanguage(lldb::LanguageType language) {
   return language == eLanguageTypeUnknown || // Clang is the default type system
-         Language::LanguageIsC(language) ||
-         Language::LanguageIsCPlusPlus(language) ||
-         Language::LanguageIsObjC(language) ||
-         Language::LanguageIsPascal(language) ||
+         lldb_private::Language::LanguageIsC(language) ||
+         lldb_private::Language::LanguageIsCPlusPlus(language) ||
+         lldb_private::Language::LanguageIsObjC(language) ||
+         lldb_private::Language::LanguageIsPascal(language) ||
          // Use Clang for Rust until there is a proper language plugin for it
          language == eLanguageTypeRust ||
          language == eLanguageTypeExtRenderScript ||
@@ -331,219 +312,84 @@
   return *g_map_ptr;
 }
 
-bool ClangASTContext::IsOperator(const char *name,
+char ClangASTContext::ID;
+
+bool ClangASTContext::IsOperator(llvm::StringRef name,
                                  clang::OverloadedOperatorKind &op_kind) {
-  if (name == nullptr || name[0] == '\0')
+  // All operators have to start with "operator".
+  if (!name.consume_front("operator"))
     return false;
 
-#define OPERATOR_PREFIX "operator"
-#define OPERATOR_PREFIX_LENGTH (sizeof(OPERATOR_PREFIX) - 1)
+  // Remember if there was a space after "operator". This is necessary to
+  // check for collisions with strangely named functions like "operatorint()".
+  bool space_after_operator = name.consume_front(" ");
 
-  const char *post_op_name = nullptr;
+  op_kind = StringSwitch<clang::OverloadedOperatorKind>(name)
+                .Case("+", clang::OO_Plus)
+                .Case("+=", clang::OO_PlusEqual)
+                .Case("++", clang::OO_PlusPlus)
+                .Case("-", clang::OO_Minus)
+                .Case("-=", clang::OO_MinusEqual)
+                .Case("--", clang::OO_MinusMinus)
+                .Case("->", clang::OO_Arrow)
+                .Case("->*", clang::OO_ArrowStar)
+                .Case("*", clang::OO_Star)
+                .Case("*=", clang::OO_StarEqual)
+                .Case("/", clang::OO_Slash)
+                .Case("/=", clang::OO_SlashEqual)
+                .Case("%", clang::OO_Percent)
+                .Case("%=", clang::OO_PercentEqual)
+                .Case("^", clang::OO_Caret)
+                .Case("^=", clang::OO_CaretEqual)
+                .Case("&", clang::OO_Amp)
+                .Case("&=", clang::OO_AmpEqual)
+                .Case("&&", clang::OO_AmpAmp)
+                .Case("|", clang::OO_Pipe)
+                .Case("|=", clang::OO_PipeEqual)
+                .Case("||", clang::OO_PipePipe)
+                .Case("~", clang::OO_Tilde)
+                .Case("!", clang::OO_Exclaim)
+                .Case("!=", clang::OO_ExclaimEqual)
+                .Case("=", clang::OO_Equal)
+                .Case("==", clang::OO_EqualEqual)
+                .Case("<", clang::OO_Less)
+                .Case("<<", clang::OO_LessLess)
+                .Case("<<=", clang::OO_LessLessEqual)
+                .Case("<=", clang::OO_LessEqual)
+                .Case(">", clang::OO_Greater)
+                .Case(">>", clang::OO_GreaterGreater)
+                .Case(">>=", clang::OO_GreaterGreaterEqual)
+                .Case(">=", clang::OO_GreaterEqual)
+                .Case("()", clang::OO_Call)
+                .Case("[]", clang::OO_Subscript)
+                .Case(",", clang::OO_Comma)
+                .Default(clang::NUM_OVERLOADED_OPERATORS);
 
-  bool no_space = true;
+  // We found a fitting operator, so we can exit now.
+  if (op_kind != clang::NUM_OVERLOADED_OPERATORS)
+    return true;
 
-  if (::strncmp(name, OPERATOR_PREFIX, OPERATOR_PREFIX_LENGTH))
-    return false;
+  // After the "operator " or "operator" part is something unknown. This means
+  // it's either one of the named operators (new/delete), a conversion operator
+  // (e.g. operator bool) or a function which name starts with "operator"
+  // (e.g. void operatorbool).
 
-  post_op_name = name + OPERATOR_PREFIX_LENGTH;
+  // If it's a function that starts with operator it can't have a space after
+  // "operator" because identifiers can't contain spaces.
+  // E.g. "operator int" (conversion operator)
+  //  vs. "operatorint" (function with colliding name).
+  if (!space_after_operator)
+    return false; // not an operator.
 
-  if (post_op_name[0] == ' ') {
-    post_op_name++;
-    no_space = false;
-  }
-
-#undef OPERATOR_PREFIX
-#undef OPERATOR_PREFIX_LENGTH
-
-  // This is an operator, set the overloaded operator kind to invalid in case
-  // this is a conversion operator...
-  op_kind = clang::NUM_OVERLOADED_OPERATORS;
-
-  switch (post_op_name[0]) {
-  default:
-    if (no_space)
-      return false;
-    break;
-  case 'n':
-    if (no_space)
-      return false;
-    if (strcmp(post_op_name, "new") == 0)
-      op_kind = clang::OO_New;
-    else if (strcmp(post_op_name, "new[]") == 0)
-      op_kind = clang::OO_Array_New;
-    break;
-
-  case 'd':
-    if (no_space)
-      return false;
-    if (strcmp(post_op_name, "delete") == 0)
-      op_kind = clang::OO_Delete;
-    else if (strcmp(post_op_name, "delete[]") == 0)
-      op_kind = clang::OO_Array_Delete;
-    break;
-
-  case '+':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Plus;
-    else if (post_op_name[2] == '\0') {
-      if (post_op_name[1] == '=')
-        op_kind = clang::OO_PlusEqual;
-      else if (post_op_name[1] == '+')
-        op_kind = clang::OO_PlusPlus;
-    }
-    break;
-
-  case '-':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Minus;
-    else if (post_op_name[2] == '\0') {
-      switch (post_op_name[1]) {
-      case '=':
-        op_kind = clang::OO_MinusEqual;
-        break;
-      case '-':
-        op_kind = clang::OO_MinusMinus;
-        break;
-      case '>':
-        op_kind = clang::OO_Arrow;
-        break;
-      }
-    } else if (post_op_name[3] == '\0') {
-      if (post_op_name[2] == '*')
-        op_kind = clang::OO_ArrowStar;
-      break;
-    }
-    break;
-
-  case '*':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Star;
-    else if (post_op_name[1] == '=' && post_op_name[2] == '\0')
-      op_kind = clang::OO_StarEqual;
-    break;
-
-  case '/':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Slash;
-    else if (post_op_name[1] == '=' && post_op_name[2] == '\0')
-      op_kind = clang::OO_SlashEqual;
-    break;
-
-  case '%':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Percent;
-    else if (post_op_name[1] == '=' && post_op_name[2] == '\0')
-      op_kind = clang::OO_PercentEqual;
-    break;
-
-  case '^':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Caret;
-    else if (post_op_name[1] == '=' && post_op_name[2] == '\0')
-      op_kind = clang::OO_CaretEqual;
-    break;
-
-  case '&':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Amp;
-    else if (post_op_name[2] == '\0') {
-      switch (post_op_name[1]) {
-      case '=':
-        op_kind = clang::OO_AmpEqual;
-        break;
-      case '&':
-        op_kind = clang::OO_AmpAmp;
-        break;
-      }
-    }
-    break;
-
-  case '|':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Pipe;
-    else if (post_op_name[2] == '\0') {
-      switch (post_op_name[1]) {
-      case '=':
-        op_kind = clang::OO_PipeEqual;
-        break;
-      case '|':
-        op_kind = clang::OO_PipePipe;
-        break;
-      }
-    }
-    break;
-
-  case '~':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Tilde;
-    break;
-
-  case '!':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Exclaim;
-    else if (post_op_name[1] == '=' && post_op_name[2] == '\0')
-      op_kind = clang::OO_ExclaimEqual;
-    break;
-
-  case '=':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Equal;
-    else if (post_op_name[1] == '=' && post_op_name[2] == '\0')
-      op_kind = clang::OO_EqualEqual;
-    break;
-
-  case '<':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Less;
-    else if (post_op_name[2] == '\0') {
-      switch (post_op_name[1]) {
-      case '<':
-        op_kind = clang::OO_LessLess;
-        break;
-      case '=':
-        op_kind = clang::OO_LessEqual;
-        break;
-      }
-    } else if (post_op_name[3] == '\0') {
-      if (post_op_name[2] == '=')
-        op_kind = clang::OO_LessLessEqual;
-    }
-    break;
-
-  case '>':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Greater;
-    else if (post_op_name[2] == '\0') {
-      switch (post_op_name[1]) {
-      case '>':
-        op_kind = clang::OO_GreaterGreater;
-        break;
-      case '=':
-        op_kind = clang::OO_GreaterEqual;
-        break;
-      }
-    } else if (post_op_name[1] == '>' && post_op_name[2] == '=' &&
-               post_op_name[3] == '\0') {
-      op_kind = clang::OO_GreaterGreaterEqual;
-    }
-    break;
-
-  case ',':
-    if (post_op_name[1] == '\0')
-      op_kind = clang::OO_Comma;
-    break;
-
-  case '(':
-    if (post_op_name[1] == ')' && post_op_name[2] == '\0')
-      op_kind = clang::OO_Call;
-    break;
-
-  case '[':
-    if (post_op_name[1] == ']' && post_op_name[2] == '\0')
-      op_kind = clang::OO_Subscript;
-    break;
-  }
+  // Now the operator is either one of the named operators or a conversion
+  // operator.
+  op_kind = StringSwitch<clang::OverloadedOperatorKind>(name)
+                .Case("new", clang::OO_New)
+                .Case("new[]", clang::OO_Array_New)
+                .Case("delete", clang::OO_Delete)
+                .Case("delete[]", clang::OO_Array_Delete)
+                // conversion operators hit this case.
+                .Default(clang::NUM_OVERLOADED_OPERATORS);
 
   return true;
 }
@@ -571,7 +417,7 @@
   // Set some properties which depend solely on the input kind; it would be
   // nice to move these to the language standard, and have the driver resolve
   // the input kind + language standard.
-  if (IK.getLanguage() == InputKind::Asm) {
+  if (IK.getLanguage() == clang::Language::Asm) {
     Opts.AsmPreprocessor = 1;
   } else if (IK.isObjectiveC()) {
     Opts.ObjC = 1;
@@ -582,26 +428,26 @@
   if (LangStd == LangStandard::lang_unspecified) {
     // Based on the base language, pick one.
     switch (IK.getLanguage()) {
-    case InputKind::Unknown:
-    case InputKind::LLVM_IR:
-    case InputKind::RenderScript:
+    case clang::Language::Unknown:
+    case clang::Language::LLVM_IR:
+    case clang::Language::RenderScript:
       llvm_unreachable("Invalid input kind!");
-    case InputKind::OpenCL:
+    case clang::Language::OpenCL:
       LangStd = LangStandard::lang_opencl10;
       break;
-    case InputKind::CUDA:
+    case clang::Language::CUDA:
       LangStd = LangStandard::lang_cuda;
       break;
-    case InputKind::Asm:
-    case InputKind::C:
-    case InputKind::ObjC:
+    case clang::Language::Asm:
+    case clang::Language::C:
+    case clang::Language::ObjC:
       LangStd = LangStandard::lang_gnu99;
       break;
-    case InputKind::CXX:
-    case InputKind::ObjCXX:
+    case clang::Language::CXX:
+    case clang::Language::ObjCXX:
       LangStd = LangStandard::lang_gnucxx98;
       break;
-    case InputKind::HIP:
+    case clang::Language::HIP:
       LangStd = LangStandard::lang_hip;
       break;
     }
@@ -625,7 +471,7 @@
     Opts.OpenCL = 1;
     Opts.AltiVec = 1;
     Opts.CXXOperatorNames = 1;
-    Opts.LaxVectorConversions = 1;
+    Opts.setLaxVectorConversions(LangOptions::LaxVectorConversionKind::All);
   }
 
   // OpenCL and C++ both have bool, true, false keywords.
@@ -653,15 +499,19 @@
   Opts.NoInlineDefine = !Opt;
 }
 
-ClangASTContext::ClangASTContext(const char *target_triple)
-    : TypeSystem(TypeSystem::eKindClang), m_target_triple(), m_ast_up(),
-      m_language_options_up(), m_source_manager_up(), m_diagnostics_engine_up(),
-      m_target_options_rp(), m_target_info_up(), m_identifier_table_up(),
-      m_selector_table_up(), m_builtins_up(), m_callback_tag_decl(nullptr),
-      m_callback_objc_decl(nullptr), m_callback_baton(nullptr),
-      m_pointer_byte_size(0), m_ast_owned(false) {
-  if (target_triple && target_triple[0])
-    SetTargetTriple(target_triple);
+ClangASTContext::ClangASTContext(llvm::Triple target_triple) {
+  if (!target_triple.str().empty())
+    SetTargetTriple(target_triple.str());
+  // The caller didn't pass an ASTContext so create a new one for this
+  // ClangASTContext.
+  CreateASTContext();
+}
+
+ClangASTContext::ClangASTContext(ASTContext &existing_ctxt) {
+  SetTargetTriple(existing_ctxt.getTargetInfo().getTriple().str());
+
+  m_ast_up.reset(&existing_ctxt);
+  GetASTMap().Insert(&existing_ctxt, this);
 }
 
 // Destructor
@@ -680,81 +530,69 @@
 lldb::TypeSystemSP ClangASTContext::CreateInstance(lldb::LanguageType language,
                                                    lldb_private::Module *module,
                                                    Target *target) {
-  if (ClangASTContextSupportsLanguage(language)) {
-    ArchSpec arch;
-    if (module)
-      arch = module->GetArchitecture();
-    else if (target)
-      arch = target->GetArchitecture();
+  if (!ClangASTContextSupportsLanguage(language))
+    return lldb::TypeSystemSP();
+  ArchSpec arch;
+  if (module)
+    arch = module->GetArchitecture();
+  else if (target)
+    arch = target->GetArchitecture();
 
-    if (arch.IsValid()) {
-      ArchSpec fixed_arch = arch;
-      // LLVM wants this to be set to iOS or MacOSX; if we're working on
-      // a bare-boards type image, change the triple for llvm's benefit.
-      if (fixed_arch.GetTriple().getVendor() == llvm::Triple::Apple &&
-          fixed_arch.GetTriple().getOS() == llvm::Triple::UnknownOS) {
-        if (fixed_arch.GetTriple().getArch() == llvm::Triple::arm ||
-            fixed_arch.GetTriple().getArch() == llvm::Triple::aarch64 ||
-            fixed_arch.GetTriple().getArch() == llvm::Triple::thumb) {
-          fixed_arch.GetTriple().setOS(llvm::Triple::IOS);
-        } else {
-          fixed_arch.GetTriple().setOS(llvm::Triple::MacOSX);
-        }
-      }
+  if (!arch.IsValid())
+    return lldb::TypeSystemSP();
 
-      if (module) {
-        std::shared_ptr<ClangASTContext> ast_sp(new ClangASTContext);
-        if (ast_sp) {
-          ast_sp->SetArchitecture(fixed_arch);
-        }
-        return ast_sp;
-      } else if (target && target->IsValid()) {
-        std::shared_ptr<ClangASTContextForExpressions> ast_sp(
-            new ClangASTContextForExpressions(*target));
-        if (ast_sp) {
-          ast_sp->SetArchitecture(fixed_arch);
-          ast_sp->m_scratch_ast_source_up.reset(
-              new ClangASTSource(target->shared_from_this()));
-          lldbassert(ast_sp->getFileManager());
-          ast_sp->m_scratch_ast_source_up->InstallASTContext(
-              *ast_sp->getASTContext(), *ast_sp->getFileManager(), true);
-          llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> proxy_ast_source(
-              ast_sp->m_scratch_ast_source_up->CreateProxy());
-          ast_sp->SetExternalSource(proxy_ast_source);
-          return ast_sp;
-        }
-      }
+  llvm::Triple triple = arch.GetTriple();
+  // LLVM wants this to be set to iOS or MacOSX; if we're working on
+  // a bare-boards type image, change the triple for llvm's benefit.
+  if (triple.getVendor() == llvm::Triple::Apple &&
+      triple.getOS() == llvm::Triple::UnknownOS) {
+    if (triple.getArch() == llvm::Triple::arm ||
+        triple.getArch() == llvm::Triple::aarch64 ||
+        triple.getArch() == llvm::Triple::aarch64_32 ||
+        triple.getArch() == llvm::Triple::thumb) {
+      triple.setOS(llvm::Triple::IOS);
+    } else {
+      triple.setOS(llvm::Triple::MacOSX);
     }
   }
+
+  if (module)
+    return std::make_shared<ClangASTContext>(triple);
+  else if (target && target->IsValid())
+    return std::make_shared<ClangASTContextForExpressions>(*target, triple);
   return lldb::TypeSystemSP();
 }
 
-void ClangASTContext::EnumerateSupportedLanguages(
-    std::set<lldb::LanguageType> &languages_for_types,
-    std::set<lldb::LanguageType> &languages_for_expressions) {
-  static std::vector<lldb::LanguageType> s_supported_languages_for_types(
-      {lldb::eLanguageTypeC89, lldb::eLanguageTypeC, lldb::eLanguageTypeC11,
-       lldb::eLanguageTypeC_plus_plus, lldb::eLanguageTypeC99,
-       lldb::eLanguageTypeObjC, lldb::eLanguageTypeObjC_plus_plus,
-       lldb::eLanguageTypeC_plus_plus_03, lldb::eLanguageTypeC_plus_plus_11,
-       lldb::eLanguageTypeC11, lldb::eLanguageTypeC_plus_plus_14});
+LanguageSet ClangASTContext::GetSupportedLanguagesForTypes() {
+  LanguageSet languages;
+  languages.Insert(lldb::eLanguageTypeC89);
+  languages.Insert(lldb::eLanguageTypeC);
+  languages.Insert(lldb::eLanguageTypeC11);
+  languages.Insert(lldb::eLanguageTypeC_plus_plus);
+  languages.Insert(lldb::eLanguageTypeC99);
+  languages.Insert(lldb::eLanguageTypeObjC);
+  languages.Insert(lldb::eLanguageTypeObjC_plus_plus);
+  languages.Insert(lldb::eLanguageTypeC_plus_plus_03);
+  languages.Insert(lldb::eLanguageTypeC_plus_plus_11);
+  languages.Insert(lldb::eLanguageTypeC11);
+  languages.Insert(lldb::eLanguageTypeC_plus_plus_14);
+  return languages;
+}
 
-  static std::vector<lldb::LanguageType> s_supported_languages_for_expressions(
-      {lldb::eLanguageTypeC_plus_plus, lldb::eLanguageTypeObjC_plus_plus,
-       lldb::eLanguageTypeC_plus_plus_03, lldb::eLanguageTypeC_plus_plus_11,
-       lldb::eLanguageTypeC_plus_plus_14});
-
-  languages_for_types.insert(s_supported_languages_for_types.begin(),
-                             s_supported_languages_for_types.end());
-  languages_for_expressions.insert(
-      s_supported_languages_for_expressions.begin(),
-      s_supported_languages_for_expressions.end());
+LanguageSet ClangASTContext::GetSupportedLanguagesForExpressions() {
+  LanguageSet languages;
+  languages.Insert(lldb::eLanguageTypeC_plus_plus);
+  languages.Insert(lldb::eLanguageTypeObjC_plus_plus);
+  languages.Insert(lldb::eLanguageTypeC_plus_plus_03);
+  languages.Insert(lldb::eLanguageTypeC_plus_plus_11);
+  languages.Insert(lldb::eLanguageTypeC_plus_plus_14);
+  return languages;
 }
 
 void ClangASTContext::Initialize() {
-  PluginManager::RegisterPlugin(GetPluginNameStatic(),
-                                "clang base AST context plug-in",
-                                CreateInstance, EnumerateSupportedLanguages);
+  PluginManager::RegisterPlugin(
+      GetPluginNameStatic(), "clang base AST context plug-in", CreateInstance,
+      GetSupportedLanguagesForTypes(), GetSupportedLanguagesForExpressions());
 }
 
 void ClangASTContext::Terminate() {
@@ -762,11 +600,10 @@
 }
 
 void ClangASTContext::Finalize() {
-  if (m_ast_up) {
-    GetASTMap().Erase(m_ast_up.get());
-    if (!m_ast_owned)
-      m_ast_up.release();
-  }
+  assert(m_ast_up);
+  GetASTMap().Erase(m_ast_up.get());
+  if (!m_ast_owned)
+    m_ast_up.release();
 
   m_builtins_up.reset();
   m_selector_table_up.reset();
@@ -776,21 +613,6 @@
   m_diagnostics_engine_up.reset();
   m_source_manager_up.reset();
   m_language_options_up.reset();
-  m_ast_up.reset();
-  m_scratch_ast_source_up.reset();
-}
-
-void ClangASTContext::Clear() {
-  m_ast_up.reset();
-  m_language_options_up.reset();
-  m_source_manager_up.reset();
-  m_diagnostics_engine_up.reset();
-  m_target_options_rp.reset();
-  m_target_info_up.reset();
-  m_identifier_table_up.reset();
-  m_selector_table_up.reset();
-  m_builtins_up.reset();
-  m_pointer_byte_size = 0;
 }
 
 void ClangASTContext::setSema(Sema *s) {
@@ -803,145 +625,20 @@
   return m_target_triple.c_str();
 }
 
-void ClangASTContext::SetTargetTriple(const char *target_triple) {
-  Clear();
-  m_target_triple.assign(target_triple);
-}
-
-void ClangASTContext::SetArchitecture(const ArchSpec &arch) {
-  SetTargetTriple(arch.GetTriple().str().c_str());
-}
-
-bool ClangASTContext::HasExternalSource() {
-  ASTContext *ast = getASTContext();
-  if (ast)
-    return ast->getExternalSource() != nullptr;
-  return false;
+void ClangASTContext::SetTargetTriple(llvm::StringRef target_triple) {
+  m_target_triple = target_triple.str();
 }
 
 void ClangASTContext::SetExternalSource(
     llvm::IntrusiveRefCntPtr<ExternalASTSource> &ast_source_up) {
-  ASTContext *ast = getASTContext();
-  if (ast) {
-    ast->setExternalSource(ast_source_up);
-    ast->getTranslationUnitDecl()->setHasExternalLexicalStorage(true);
-  }
+  ASTContext &ast = getASTContext();
+  ast.setExternalSource(ast_source_up);
+  ast.getTranslationUnitDecl()->setHasExternalLexicalStorage(true);
 }
 
-void ClangASTContext::RemoveExternalSource() {
-  ASTContext *ast = getASTContext();
-
-  if (ast) {
-    llvm::IntrusiveRefCntPtr<ExternalASTSource> empty_ast_source_up;
-    ast->setExternalSource(empty_ast_source_up);
-    ast->getTranslationUnitDecl()->setHasExternalLexicalStorage(false);
-  }
-}
-
-void ClangASTContext::setASTContext(clang::ASTContext *ast_ctx) {
-  if (!m_ast_owned) {
-    m_ast_up.release();
-  }
-  m_ast_owned = false;
-  m_ast_up.reset(ast_ctx);
-  GetASTMap().Insert(ast_ctx, this);
-}
-
-ASTContext *ClangASTContext::getASTContext() {
-  if (m_ast_up == nullptr) {
-    m_ast_owned = true;
-    m_ast_up.reset(new ASTContext(*getLanguageOptions(), *getSourceManager(),
-                                  *getIdentifierTable(), *getSelectorTable(),
-                                  *getBuiltinContext()));
-
-    m_ast_up->getDiagnostics().setClient(getDiagnosticConsumer(), false);
-
-    // This can be NULL if we don't know anything about the architecture or if
-    // the target for an architecture isn't enabled in the llvm/clang that we
-    // built
-    TargetInfo *target_info = getTargetInfo();
-    if (target_info)
-      m_ast_up->InitBuiltinTypes(*target_info);
-
-    if ((m_callback_tag_decl || m_callback_objc_decl) && m_callback_baton) {
-      m_ast_up->getTranslationUnitDecl()->setHasExternalLexicalStorage();
-      // m_ast_up->getTranslationUnitDecl()->setHasExternalVisibleStorage();
-    }
-
-    GetASTMap().Insert(m_ast_up.get(), this);
-
-    llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> ast_source_up(
-        new ClangExternalASTSourceCallbacks(
-            ClangASTContext::CompleteTagDecl,
-            ClangASTContext::CompleteObjCInterfaceDecl, nullptr,
-            ClangASTContext::LayoutRecordType, this));
-    SetExternalSource(ast_source_up);
-  }
-  return m_ast_up.get();
-}
-
-ClangASTContext *ClangASTContext::GetASTContext(clang::ASTContext *ast) {
-  ClangASTContext *clang_ast = GetASTMap().Lookup(ast);
-  return clang_ast;
-}
-
-Builtin::Context *ClangASTContext::getBuiltinContext() {
-  if (m_builtins_up == nullptr)
-    m_builtins_up.reset(new Builtin::Context());
-  return m_builtins_up.get();
-}
-
-IdentifierTable *ClangASTContext::getIdentifierTable() {
-  if (m_identifier_table_up == nullptr)
-    m_identifier_table_up.reset(
-        new IdentifierTable(*ClangASTContext::getLanguageOptions(), nullptr));
-  return m_identifier_table_up.get();
-}
-
-LangOptions *ClangASTContext::getLanguageOptions() {
-  if (m_language_options_up == nullptr) {
-    m_language_options_up.reset(new LangOptions());
-    ParseLangArgs(*m_language_options_up, InputKind::ObjCXX, GetTargetTriple());
-    //        InitializeLangOptions(*m_language_options_up, InputKind::ObjCXX);
-  }
-  return m_language_options_up.get();
-}
-
-SelectorTable *ClangASTContext::getSelectorTable() {
-  if (m_selector_table_up == nullptr)
-    m_selector_table_up.reset(new SelectorTable());
-  return m_selector_table_up.get();
-}
-
-clang::FileManager *ClangASTContext::getFileManager() {
-  if (m_file_manager_up == nullptr) {
-    clang::FileSystemOptions file_system_options;
-    m_file_manager_up.reset(new clang::FileManager(
-        file_system_options, FileSystem::Instance().GetVirtualFileSystem()));
-  }
-  return m_file_manager_up.get();
-}
-
-clang::SourceManager *ClangASTContext::getSourceManager() {
-  if (m_source_manager_up == nullptr)
-    m_source_manager_up.reset(
-        new clang::SourceManager(*getDiagnosticsEngine(), *getFileManager()));
-  return m_source_manager_up.get();
-}
-
-clang::DiagnosticsEngine *ClangASTContext::getDiagnosticsEngine() {
-  if (m_diagnostics_engine_up == nullptr) {
-    llvm::IntrusiveRefCntPtr<DiagnosticIDs> diag_id_sp(new DiagnosticIDs());
-    m_diagnostics_engine_up.reset(
-        new DiagnosticsEngine(diag_id_sp, new DiagnosticOptions()));
-  }
-  return m_diagnostics_engine_up.get();
-}
-
-clang::MangleContext *ClangASTContext::getMangleContext() {
-  if (m_mangle_ctx_up == nullptr)
-    m_mangle_ctx_up.reset(getASTContext()->createMangleContext());
-  return m_mangle_ctx_up.get();
+ASTContext &ClangASTContext::getASTContext() {
+  assert(m_ast_up);
+  return *m_ast_up;
 }
 
 class NullDiagnosticConsumer : public DiagnosticConsumer {
@@ -956,7 +653,7 @@
       llvm::SmallVector<char, 32> diag_str(10);
       info.FormatDiagnostic(diag_str);
       diag_str.push_back('\0');
-      m_log->Printf("Compiler diagnostic: %s\n", diag_str.data());
+      LLDB_LOGF(m_log, "Compiler diagnostic: %s\n", diag_str.data());
     }
   }
 
@@ -968,11 +665,60 @@
   Log *m_log;
 };
 
-DiagnosticConsumer *ClangASTContext::getDiagnosticConsumer() {
-  if (m_diagnostic_consumer_up == nullptr)
-    m_diagnostic_consumer_up.reset(new NullDiagnosticConsumer);
+void ClangASTContext::CreateASTContext() {
+  assert(!m_ast_up);
+  m_ast_owned = true;
 
-  return m_diagnostic_consumer_up.get();
+  m_language_options_up.reset(new LangOptions());
+  ParseLangArgs(*m_language_options_up, clang::Language::ObjCXX,
+                GetTargetTriple());
+
+  m_identifier_table_up.reset(
+      new IdentifierTable(*m_language_options_up, nullptr));
+  m_builtins_up.reset(new Builtin::Context());
+
+  m_selector_table_up.reset(new SelectorTable());
+
+  clang::FileSystemOptions file_system_options;
+  m_file_manager_up.reset(new clang::FileManager(
+      file_system_options, FileSystem::Instance().GetVirtualFileSystem()));
+
+  llvm::IntrusiveRefCntPtr<DiagnosticIDs> diag_id_sp(new DiagnosticIDs());
+  m_diagnostics_engine_up.reset(
+      new DiagnosticsEngine(diag_id_sp, new DiagnosticOptions()));
+
+  m_source_manager_up.reset(
+      new clang::SourceManager(*m_diagnostics_engine_up, *m_file_manager_up));
+  m_ast_up.reset(new ASTContext(*m_language_options_up, *m_source_manager_up,
+                                *m_identifier_table_up, *m_selector_table_up,
+                                *m_builtins_up));
+
+  m_diagnostic_consumer_up.reset(new NullDiagnosticConsumer);
+  m_ast_up->getDiagnostics().setClient(m_diagnostic_consumer_up.get(), false);
+
+  // This can be NULL if we don't know anything about the architecture or if
+  // the target for an architecture isn't enabled in the llvm/clang that we
+  // built
+  TargetInfo *target_info = getTargetInfo();
+  if (target_info)
+    m_ast_up->InitBuiltinTypes(*target_info);
+
+  GetASTMap().Insert(m_ast_up.get(), this);
+
+  llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> ast_source_up(
+      new ClangExternalASTSourceCallbacks(*this));
+  SetExternalSource(ast_source_up);
+}
+
+ClangASTContext *ClangASTContext::GetASTContext(clang::ASTContext *ast) {
+  ClangASTContext *clang_ast = GetASTMap().Lookup(ast);
+  return clang_ast;
+}
+
+clang::MangleContext *ClangASTContext::getMangleContext() {
+  if (m_mangle_ctx_up == nullptr)
+    m_mangle_ctx_up.reset(getASTContext().createMangleContext());
+  return m_mangle_ctx_up.get();
 }
 
 std::shared_ptr<clang::TargetOptions> &ClangASTContext::getTargetOptions() {
@@ -987,82 +733,74 @@
 TargetInfo *ClangASTContext::getTargetInfo() {
   // target_triple should be something like "x86_64-apple-macosx"
   if (m_target_info_up == nullptr && !m_target_triple.empty())
-    m_target_info_up.reset(TargetInfo::CreateTargetInfo(*getDiagnosticsEngine(),
-                                                        getTargetOptions()));
+    m_target_info_up.reset(TargetInfo::CreateTargetInfo(
+        getASTContext().getDiagnostics(), getTargetOptions()));
   return m_target_info_up.get();
 }
 
 #pragma mark Basic Types
 
 static inline bool QualTypeMatchesBitSize(const uint64_t bit_size,
-                                          ASTContext *ast, QualType qual_type) {
-  uint64_t qual_type_bit_size = ast->getTypeSize(qual_type);
+                                          ASTContext &ast, QualType qual_type) {
+  uint64_t qual_type_bit_size = ast.getTypeSize(qual_type);
   return qual_type_bit_size == bit_size;
 }
 
 CompilerType
 ClangASTContext::GetBuiltinTypeForEncodingAndBitSize(Encoding encoding,
                                                      size_t bit_size) {
-  return ClangASTContext::GetBuiltinTypeForEncodingAndBitSize(
-      getASTContext(), encoding, bit_size);
-}
-
-CompilerType ClangASTContext::GetBuiltinTypeForEncodingAndBitSize(
-    ASTContext *ast, Encoding encoding, uint32_t bit_size) {
-  if (!ast)
-    return CompilerType();
+  ASTContext &ast = getASTContext();
   switch (encoding) {
   case eEncodingInvalid:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->VoidPtrTy))
-      return CompilerType(ast, ast->VoidPtrTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.VoidPtrTy))
+      return GetType(ast.VoidPtrTy);
     break;
 
   case eEncodingUint:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedCharTy))
-      return CompilerType(ast, ast->UnsignedCharTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedShortTy))
-      return CompilerType(ast, ast->UnsignedShortTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedIntTy))
-      return CompilerType(ast, ast->UnsignedIntTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedLongTy))
-      return CompilerType(ast, ast->UnsignedLongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedLongLongTy))
-      return CompilerType(ast, ast->UnsignedLongLongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedInt128Ty))
-      return CompilerType(ast, ast->UnsignedInt128Ty);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
+      return GetType(ast.UnsignedCharTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
+      return GetType(ast.UnsignedShortTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedIntTy))
+      return GetType(ast.UnsignedIntTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongTy))
+      return GetType(ast.UnsignedLongTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongLongTy))
+      return GetType(ast.UnsignedLongLongTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedInt128Ty))
+      return GetType(ast.UnsignedInt128Ty);
     break;
 
   case eEncodingSint:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->SignedCharTy))
-      return CompilerType(ast, ast->SignedCharTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->ShortTy))
-      return CompilerType(ast, ast->ShortTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->IntTy))
-      return CompilerType(ast, ast->IntTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->LongTy))
-      return CompilerType(ast, ast->LongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->LongLongTy))
-      return CompilerType(ast, ast->LongLongTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->Int128Ty))
-      return CompilerType(ast, ast->Int128Ty);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.SignedCharTy))
+      return GetType(ast.SignedCharTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.ShortTy))
+      return GetType(ast.ShortTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.IntTy))
+      return GetType(ast.IntTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongTy))
+      return GetType(ast.LongTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongLongTy))
+      return GetType(ast.LongLongTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.Int128Ty))
+      return GetType(ast.Int128Ty);
     break;
 
   case eEncodingIEEE754:
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->FloatTy))
-      return CompilerType(ast, ast->FloatTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->DoubleTy))
-      return CompilerType(ast, ast->DoubleTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->LongDoubleTy))
-      return CompilerType(ast, ast->LongDoubleTy);
-    if (QualTypeMatchesBitSize(bit_size, ast, ast->HalfTy))
-      return CompilerType(ast, ast->HalfTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.FloatTy))
+      return GetType(ast.FloatTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.DoubleTy))
+      return GetType(ast.DoubleTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongDoubleTy))
+      return GetType(ast.LongDoubleTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.HalfTy))
+      return GetType(ast.HalfTy);
     break;
 
   case eEncodingVector:
     // Sanity check that bit_size is a multiple of 8's.
     if (bit_size && !(bit_size & 0x7u))
-      return CompilerType(
-          ast, ast->getExtVectorType(ast->UnsignedCharTy, bit_size / 8));
+      return GetType(ast.getExtVectorType(ast.UnsignedCharTy, bit_size / 8));
     break;
   }
 
@@ -1135,15 +873,6 @@
   return eBasicTypeInvalid;
 }
 
-CompilerType ClangASTContext::GetBasicType(ASTContext *ast,
-                                           ConstString name) {
-  if (ast) {
-    lldb::BasicType basic_type = ClangASTContext::GetBasicTypeEnumeration(name);
-    return ClangASTContext::GetBasicType(ast, basic_type);
-  }
-  return CompilerType();
-}
-
 uint32_t ClangASTContext::GetPointerByteSize() {
   if (m_pointer_byte_size == 0)
     if (auto size = GetBasicType(lldb::eBasicTypeVoid)
@@ -1154,231 +883,220 @@
 }
 
 CompilerType ClangASTContext::GetBasicType(lldb::BasicType basic_type) {
-  return GetBasicType(getASTContext(), basic_type);
-}
+  clang::ASTContext &ast = getASTContext();
 
-CompilerType ClangASTContext::GetBasicType(ASTContext *ast,
-                                           lldb::BasicType basic_type) {
-  if (!ast)
-    return CompilerType();
   lldb::opaque_compiler_type_t clang_type =
-      GetOpaqueCompilerType(ast, basic_type);
+      GetOpaqueCompilerType(&ast, basic_type);
 
   if (clang_type)
-    return CompilerType(GetASTContext(ast), clang_type);
+    return CompilerType(this, clang_type);
   return CompilerType();
 }
 
 CompilerType ClangASTContext::GetBuiltinTypeForDWARFEncodingAndBitSize(
-    const char *type_name, uint32_t dw_ate, uint32_t bit_size) {
-  ASTContext *ast = getASTContext();
+    llvm::StringRef type_name, uint32_t dw_ate, uint32_t bit_size) {
+  ASTContext &ast = getASTContext();
 
-#define streq(a, b) strcmp(a, b) == 0
-  assert(ast != nullptr);
-  if (ast) {
-    switch (dw_ate) {
-    default:
-      break;
+  switch (dw_ate) {
+  default:
+    break;
 
-    case DW_ATE_address:
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->VoidPtrTy))
-        return CompilerType(ast, ast->VoidPtrTy);
-      break;
+  case DW_ATE_address:
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.VoidPtrTy))
+      return GetType(ast.VoidPtrTy);
+    break;
 
-    case DW_ATE_boolean:
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->BoolTy))
-        return CompilerType(ast, ast->BoolTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedCharTy))
-        return CompilerType(ast, ast->UnsignedCharTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedShortTy))
-        return CompilerType(ast, ast->UnsignedShortTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedIntTy))
-        return CompilerType(ast, ast->UnsignedIntTy);
-      break;
+  case DW_ATE_boolean:
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.BoolTy))
+      return GetType(ast.BoolTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
+      return GetType(ast.UnsignedCharTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
+      return GetType(ast.UnsignedShortTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedIntTy))
+      return GetType(ast.UnsignedIntTy);
+    break;
 
-    case DW_ATE_lo_user:
-      // This has been seen to mean DW_AT_complex_integer
-      if (type_name) {
-        if (::strstr(type_name, "complex")) {
-          CompilerType complex_int_clang_type =
-              GetBuiltinTypeForDWARFEncodingAndBitSize("int", DW_ATE_signed,
-                                                       bit_size / 2);
-          return CompilerType(ast, ast->getComplexType(ClangUtil::GetQualType(
-                                       complex_int_clang_type)));
-        }
-      }
-      break;
-
-    case DW_ATE_complex_float:
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->FloatComplexTy))
-        return CompilerType(ast, ast->FloatComplexTy);
-      else if (QualTypeMatchesBitSize(bit_size, ast, ast->DoubleComplexTy))
-        return CompilerType(ast, ast->DoubleComplexTy);
-      else if (QualTypeMatchesBitSize(bit_size, ast, ast->LongDoubleComplexTy))
-        return CompilerType(ast, ast->LongDoubleComplexTy);
-      else {
-        CompilerType complex_float_clang_type =
-            GetBuiltinTypeForDWARFEncodingAndBitSize("float", DW_ATE_float,
-                                                     bit_size / 2);
-        return CompilerType(ast, ast->getComplexType(ClangUtil::GetQualType(
-                                     complex_float_clang_type)));
-      }
-      break;
-
-    case DW_ATE_float:
-      if (streq(type_name, "float") &&
-          QualTypeMatchesBitSize(bit_size, ast, ast->FloatTy))
-        return CompilerType(ast, ast->FloatTy);
-      if (streq(type_name, "double") &&
-          QualTypeMatchesBitSize(bit_size, ast, ast->DoubleTy))
-        return CompilerType(ast, ast->DoubleTy);
-      if (streq(type_name, "long double") &&
-          QualTypeMatchesBitSize(bit_size, ast, ast->LongDoubleTy))
-        return CompilerType(ast, ast->LongDoubleTy);
-      // Fall back to not requiring a name match
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->FloatTy))
-        return CompilerType(ast, ast->FloatTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->DoubleTy))
-        return CompilerType(ast, ast->DoubleTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->LongDoubleTy))
-        return CompilerType(ast, ast->LongDoubleTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->HalfTy))
-        return CompilerType(ast, ast->HalfTy);
-      break;
-
-    case DW_ATE_signed:
-      if (type_name) {
-        if (streq(type_name, "wchar_t") &&
-            QualTypeMatchesBitSize(bit_size, ast, ast->WCharTy) &&
-            (getTargetInfo() &&
-             TargetInfo::isTypeSigned(getTargetInfo()->getWCharType())))
-          return CompilerType(ast, ast->WCharTy);
-        if (streq(type_name, "void") &&
-            QualTypeMatchesBitSize(bit_size, ast, ast->VoidTy))
-          return CompilerType(ast, ast->VoidTy);
-        if (strstr(type_name, "long long") &&
-            QualTypeMatchesBitSize(bit_size, ast, ast->LongLongTy))
-          return CompilerType(ast, ast->LongLongTy);
-        if (strstr(type_name, "long") &&
-            QualTypeMatchesBitSize(bit_size, ast, ast->LongTy))
-          return CompilerType(ast, ast->LongTy);
-        if (strstr(type_name, "short") &&
-            QualTypeMatchesBitSize(bit_size, ast, ast->ShortTy))
-          return CompilerType(ast, ast->ShortTy);
-        if (strstr(type_name, "char")) {
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->CharTy))
-            return CompilerType(ast, ast->CharTy);
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->SignedCharTy))
-            return CompilerType(ast, ast->SignedCharTy);
-        }
-        if (strstr(type_name, "int")) {
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->IntTy))
-            return CompilerType(ast, ast->IntTy);
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->Int128Ty))
-            return CompilerType(ast, ast->Int128Ty);
-        }
-      }
-      // We weren't able to match up a type name, just search by size
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->CharTy))
-        return CompilerType(ast, ast->CharTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->ShortTy))
-        return CompilerType(ast, ast->ShortTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->IntTy))
-        return CompilerType(ast, ast->IntTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->LongTy))
-        return CompilerType(ast, ast->LongTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->LongLongTy))
-        return CompilerType(ast, ast->LongLongTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->Int128Ty))
-        return CompilerType(ast, ast->Int128Ty);
-      break;
-
-    case DW_ATE_signed_char:
-      if (ast->getLangOpts().CharIsSigned && type_name &&
-          streq(type_name, "char")) {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast->CharTy))
-          return CompilerType(ast, ast->CharTy);
-      }
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->SignedCharTy))
-        return CompilerType(ast, ast->SignedCharTy);
-      break;
-
-    case DW_ATE_unsigned:
-      if (type_name) {
-        if (streq(type_name, "wchar_t")) {
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->WCharTy)) {
-            if (!(getTargetInfo() &&
-                  TargetInfo::isTypeSigned(getTargetInfo()->getWCharType())))
-              return CompilerType(ast, ast->WCharTy);
-          }
-        }
-        if (strstr(type_name, "long long")) {
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedLongLongTy))
-            return CompilerType(ast, ast->UnsignedLongLongTy);
-        } else if (strstr(type_name, "long")) {
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedLongTy))
-            return CompilerType(ast, ast->UnsignedLongTy);
-        } else if (strstr(type_name, "short")) {
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedShortTy))
-            return CompilerType(ast, ast->UnsignedShortTy);
-        } else if (strstr(type_name, "char")) {
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedCharTy))
-            return CompilerType(ast, ast->UnsignedCharTy);
-        } else if (strstr(type_name, "int")) {
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedIntTy))
-            return CompilerType(ast, ast->UnsignedIntTy);
-          if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedInt128Ty))
-            return CompilerType(ast, ast->UnsignedInt128Ty);
-        }
-      }
-      // We weren't able to match up a type name, just search by size
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedCharTy))
-        return CompilerType(ast, ast->UnsignedCharTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedShortTy))
-        return CompilerType(ast, ast->UnsignedShortTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedIntTy))
-        return CompilerType(ast, ast->UnsignedIntTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedLongTy))
-        return CompilerType(ast, ast->UnsignedLongTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedLongLongTy))
-        return CompilerType(ast, ast->UnsignedLongLongTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedInt128Ty))
-        return CompilerType(ast, ast->UnsignedInt128Ty);
-      break;
-
-    case DW_ATE_unsigned_char:
-      if (!ast->getLangOpts().CharIsSigned && type_name &&
-          streq(type_name, "char")) {
-        if (QualTypeMatchesBitSize(bit_size, ast, ast->CharTy))
-          return CompilerType(ast, ast->CharTy);
-      }
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedCharTy))
-        return CompilerType(ast, ast->UnsignedCharTy);
-      if (QualTypeMatchesBitSize(bit_size, ast, ast->UnsignedShortTy))
-        return CompilerType(ast, ast->UnsignedShortTy);
-      break;
-
-    case DW_ATE_imaginary_float:
-      break;
-
-    case DW_ATE_UTF:
-      if (type_name) {
-        if (streq(type_name, "char16_t")) {
-          return CompilerType(ast, ast->Char16Ty);
-        } else if (streq(type_name, "char32_t")) {
-          return CompilerType(ast, ast->Char32Ty);
-        }
-      }
-      break;
+  case DW_ATE_lo_user:
+    // This has been seen to mean DW_AT_complex_integer
+    if (type_name.contains("complex")) {
+      CompilerType complex_int_clang_type =
+          GetBuiltinTypeForDWARFEncodingAndBitSize("int", DW_ATE_signed,
+                                                   bit_size / 2);
+      return GetType(
+          ast.getComplexType(ClangUtil::GetQualType(complex_int_clang_type)));
     }
+    break;
+
+  case DW_ATE_complex_float:
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.FloatComplexTy))
+      return GetType(ast.FloatComplexTy);
+    else if (QualTypeMatchesBitSize(bit_size, ast, ast.DoubleComplexTy))
+      return GetType(ast.DoubleComplexTy);
+    else if (QualTypeMatchesBitSize(bit_size, ast, ast.LongDoubleComplexTy))
+      return GetType(ast.LongDoubleComplexTy);
+    else {
+      CompilerType complex_float_clang_type =
+          GetBuiltinTypeForDWARFEncodingAndBitSize("float", DW_ATE_float,
+                                                   bit_size / 2);
+      return GetType(
+          ast.getComplexType(ClangUtil::GetQualType(complex_float_clang_type)));
+    }
+    break;
+
+  case DW_ATE_float:
+    if (type_name == "float" &&
+        QualTypeMatchesBitSize(bit_size, ast, ast.FloatTy))
+      return GetType(ast.FloatTy);
+    if (type_name == "double" &&
+        QualTypeMatchesBitSize(bit_size, ast, ast.DoubleTy))
+      return GetType(ast.DoubleTy);
+    if (type_name == "long double" &&
+        QualTypeMatchesBitSize(bit_size, ast, ast.LongDoubleTy))
+      return GetType(ast.LongDoubleTy);
+    // Fall back to not requiring a name match
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.FloatTy))
+      return GetType(ast.FloatTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.DoubleTy))
+      return GetType(ast.DoubleTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongDoubleTy))
+      return GetType(ast.LongDoubleTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.HalfTy))
+      return GetType(ast.HalfTy);
+    break;
+
+  case DW_ATE_signed:
+    if (!type_name.empty()) {
+      if (type_name == "wchar_t" &&
+          QualTypeMatchesBitSize(bit_size, ast, ast.WCharTy) &&
+          (getTargetInfo() &&
+           TargetInfo::isTypeSigned(getTargetInfo()->getWCharType())))
+        return GetType(ast.WCharTy);
+      if (type_name == "void" &&
+          QualTypeMatchesBitSize(bit_size, ast, ast.VoidTy))
+        return GetType(ast.VoidTy);
+      if (type_name.contains("long long") &&
+          QualTypeMatchesBitSize(bit_size, ast, ast.LongLongTy))
+        return GetType(ast.LongLongTy);
+      if (type_name.contains("long") &&
+          QualTypeMatchesBitSize(bit_size, ast, ast.LongTy))
+        return GetType(ast.LongTy);
+      if (type_name.contains("short") &&
+          QualTypeMatchesBitSize(bit_size, ast, ast.ShortTy))
+        return GetType(ast.ShortTy);
+      if (type_name.contains("char")) {
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.CharTy))
+          return GetType(ast.CharTy);
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.SignedCharTy))
+          return GetType(ast.SignedCharTy);
+      }
+      if (type_name.contains("int")) {
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.IntTy))
+          return GetType(ast.IntTy);
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.Int128Ty))
+          return GetType(ast.Int128Ty);
+      }
+    }
+    // We weren't able to match up a type name, just search by size
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.CharTy))
+      return GetType(ast.CharTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.ShortTy))
+      return GetType(ast.ShortTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.IntTy))
+      return GetType(ast.IntTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongTy))
+      return GetType(ast.LongTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.LongLongTy))
+      return GetType(ast.LongLongTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.Int128Ty))
+      return GetType(ast.Int128Ty);
+    break;
+
+  case DW_ATE_signed_char:
+    if (ast.getLangOpts().CharIsSigned && type_name == "char") {
+      if (QualTypeMatchesBitSize(bit_size, ast, ast.CharTy))
+        return GetType(ast.CharTy);
+    }
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.SignedCharTy))
+      return GetType(ast.SignedCharTy);
+    break;
+
+  case DW_ATE_unsigned:
+    if (!type_name.empty()) {
+      if (type_name == "wchar_t") {
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.WCharTy)) {
+          if (!(getTargetInfo() &&
+                TargetInfo::isTypeSigned(getTargetInfo()->getWCharType())))
+            return GetType(ast.WCharTy);
+        }
+      }
+      if (type_name.contains("long long")) {
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongLongTy))
+          return GetType(ast.UnsignedLongLongTy);
+      } else if (type_name.contains("long")) {
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongTy))
+          return GetType(ast.UnsignedLongTy);
+      } else if (type_name.contains("short")) {
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
+          return GetType(ast.UnsignedShortTy);
+      } else if (type_name.contains("char")) {
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
+          return GetType(ast.UnsignedCharTy);
+      } else if (type_name.contains("int")) {
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedIntTy))
+          return GetType(ast.UnsignedIntTy);
+        if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedInt128Ty))
+          return GetType(ast.UnsignedInt128Ty);
+      }
+    }
+    // We weren't able to match up a type name, just search by size
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
+      return GetType(ast.UnsignedCharTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
+      return GetType(ast.UnsignedShortTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedIntTy))
+      return GetType(ast.UnsignedIntTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongTy))
+      return GetType(ast.UnsignedLongTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedLongLongTy))
+      return GetType(ast.UnsignedLongLongTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedInt128Ty))
+      return GetType(ast.UnsignedInt128Ty);
+    break;
+
+  case DW_ATE_unsigned_char:
+    if (!ast.getLangOpts().CharIsSigned && type_name == "char") {
+      if (QualTypeMatchesBitSize(bit_size, ast, ast.CharTy))
+        return GetType(ast.CharTy);
+    }
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedCharTy))
+      return GetType(ast.UnsignedCharTy);
+    if (QualTypeMatchesBitSize(bit_size, ast, ast.UnsignedShortTy))
+      return GetType(ast.UnsignedShortTy);
+    break;
+
+  case DW_ATE_imaginary_float:
+    break;
+
+  case DW_ATE_UTF:
+    if (!type_name.empty()) {
+      if (type_name == "char16_t")
+        return GetType(ast.Char16Ty);
+      if (type_name == "char32_t")
+        return GetType(ast.Char32Ty);
+      if (type_name == "char8_t")
+        return GetType(ast.Char8Ty);
+    }
+    break;
   }
   // This assert should fire for anything that we don't catch above so we know
   // to fix any issues we run into.
-  if (type_name) {
-    Host::SystemLog(Host::eSystemLogError, "error: need to add support for "
-                                           "DW_TAG_base_type '%s' encoded with "
-                                           "DW_ATE = 0x%x, bit_size = %u\n",
-                    type_name, dw_ate, bit_size);
+  if (!type_name.empty()) {
+    std::string type_name_str = type_name.str();
+    Host::SystemLog(Host::eSystemLogError,
+                    "error: need to add support for DW_TAG_base_type '%s' "
+                    "encoded with DW_ATE = 0x%x, bit_size = %u\n",
+                    type_name_str.c_str(), dw_ate, bit_size);
   } else {
     Host::SystemLog(Host::eSystemLogError, "error: need to add support for "
                                            "DW_TAG_base_type encoded with "
@@ -1388,41 +1106,14 @@
   return CompilerType();
 }
 
-CompilerType ClangASTContext::GetUnknownAnyType(clang::ASTContext *ast) {
-  if (ast)
-    return CompilerType(ast, ast->UnknownAnyTy);
-  return CompilerType();
-}
-
 CompilerType ClangASTContext::GetCStringType(bool is_const) {
-  ASTContext *ast = getASTContext();
-  QualType char_type(ast->CharTy);
+  ASTContext &ast = getASTContext();
+  QualType char_type(ast.CharTy);
 
   if (is_const)
     char_type.addConst();
 
-  return CompilerType(ast, ast->getPointerType(char_type));
-}
-
-clang::DeclContext *
-ClangASTContext::GetTranslationUnitDecl(clang::ASTContext *ast) {
-  return ast->getTranslationUnitDecl();
-}
-
-clang::Decl *ClangASTContext::CopyDecl(ASTContext *dst_ast, ASTContext *src_ast,
-                                       clang::Decl *source_decl) {
-  FileSystemOptions file_system_options;
-  FileManager file_manager(file_system_options);
-  ASTImporter importer(*dst_ast, file_manager, *src_ast, file_manager, false);
-
-  if (llvm::Expected<clang::Decl *> ret_or_error =
-          importer.Import(source_decl)) {
-    return *ret_or_error;
-  } else {
-    Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-    LLDB_LOG_ERROR(log, ret_or_error.takeError(), "Couldn't import decl: {0}");
-    return nullptr;
-  }
+  return GetType(ast.getPointerType(char_type));
 }
 
 bool ClangASTContext::AreTypesSame(CompilerType type1, CompilerType type2,
@@ -1443,12 +1134,28 @@
     type2_qual = type2_qual.getUnqualifiedType();
   }
 
-  return ast->getASTContext()->hasSameType(type1_qual, type2_qual);
+  return ast->getASTContext().hasSameType(type1_qual, type2_qual);
+}
+
+CompilerType ClangASTContext::GetTypeForDecl(void *opaque_decl) {
+  if (!opaque_decl)
+    return CompilerType();
+
+  clang::Decl *decl = static_cast<clang::Decl *>(opaque_decl);
+  if (auto *named_decl = llvm::dyn_cast<clang::NamedDecl>(decl))
+    return GetTypeForDecl(named_decl);
+  return CompilerType();
+}
+
+CompilerDeclContext ClangASTContext::CreateDeclContext(DeclContext *ctx) {
+  // Check that the DeclContext actually belongs to this ASTContext.
+  assert(&ctx->getParentASTContext() == &getASTContext());
+  return CompilerDeclContext(this, ctx);
 }
 
 CompilerType ClangASTContext::GetTypeForDecl(clang::NamedDecl *decl) {
   if (clang::ObjCInterfaceDecl *interface_decl =
-          llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl))
+      llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl))
     return GetTypeForDecl(interface_decl);
   if (clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(decl))
     return GetTypeForDecl(tag_decl);
@@ -1456,37 +1163,25 @@
 }
 
 CompilerType ClangASTContext::GetTypeForDecl(TagDecl *decl) {
-  // No need to call the getASTContext() accessor (which can create the AST if
-  // it isn't created yet, because we can't have created a decl in this
-  // AST if our AST didn't already exist...
-  ASTContext *ast = &decl->getASTContext();
-  if (ast)
-    return CompilerType(ast, ast->getTagDeclType(decl));
-  return CompilerType();
+  return GetType(getASTContext().getTagDeclType(decl));
 }
 
 CompilerType ClangASTContext::GetTypeForDecl(ObjCInterfaceDecl *decl) {
-  // No need to call the getASTContext() accessor (which can create the AST if
-  // it isn't created yet, because we can't have created a decl in this
-  // AST if our AST didn't already exist...
-  ASTContext *ast = &decl->getASTContext();
-  if (ast)
-    return CompilerType(ast, ast->getObjCInterfaceType(decl));
-  return CompilerType();
+  return GetType(getASTContext().getObjCInterfaceType(decl));
 }
 
 #pragma mark Structure, Unions, Classes
 
 CompilerType ClangASTContext::CreateRecordType(DeclContext *decl_ctx,
                                                AccessType access_type,
-                                               const char *name, int kind,
+                                               llvm::StringRef name, int kind,
                                                LanguageType language,
-                                               ClangASTMetadata *metadata) {
-  ASTContext *ast = getASTContext();
-  assert(ast != nullptr);
+                                               ClangASTMetadata *metadata,
+                                               bool exports_symbols) {
+  ASTContext &ast = getASTContext();
 
   if (decl_ctx == nullptr)
-    decl_ctx = ast->getTranslationUnitDecl();
+    decl_ctx = ast.getTranslationUnitDecl();
 
   if (language == eLanguageTypeObjC ||
       language == eLanguageTypeObjC_plus_plus) {
@@ -1501,18 +1196,44 @@
   // something is struct or a class, so we default to always use the more
   // complete definition just in case.
 
-  bool is_anonymous = (!name) || (!name[0]);
+  bool has_name = !name.empty();
 
   CXXRecordDecl *decl = CXXRecordDecl::Create(
-      *ast, (TagDecl::TagKind)kind, decl_ctx, SourceLocation(),
-      SourceLocation(), is_anonymous ? nullptr : &ast->Idents.get(name));
+      ast, (TagDecl::TagKind)kind, decl_ctx, SourceLocation(), SourceLocation(),
+      has_name ? &ast.Idents.get(name) : nullptr);
 
-  if (is_anonymous)
-    decl->setAnonymousStructOrUnion(true);
+  if (!has_name) {
+    // In C++ a lambda is also represented as an unnamed class. This is
+    // different from an *anonymous class* that the user wrote:
+    //
+    // struct A {
+    //  // anonymous class (GNU/MSVC extension)
+    //  struct {
+    //    int x;
+    //  };
+    //  // unnamed class within a class
+    //  struct {
+    //    int y;
+    //  } B;
+    // };
+    //
+    // void f() {
+    //    // unammed class outside of a class
+    //    struct {
+    //      int z;
+    //    } C;
+    // }
+    //
+    // Anonymous classes is a GNU/MSVC extension that clang supports. It
+    // requires the anonymous class be embedded within a class. So the new
+    // heuristic verifies this condition.
+    if (isa<CXXRecordDecl>(decl_ctx) && exports_symbols)
+      decl->setAnonymousStructOrUnion(true);
+  }
 
   if (decl) {
     if (metadata)
-      SetMetadata(ast, decl, *metadata);
+      SetMetadata(decl, *metadata);
 
     if (access_type != eAccessNone)
       decl->setAccess(ConvertAccessTypeToAccessSpecifier(access_type));
@@ -1520,7 +1241,7 @@
     if (decl_ctx)
       decl_ctx->addDecl(decl);
 
-    return CompilerType(ast, ast->getTagDeclType(decl));
+    return GetType(ast.getTagDeclType(decl));
   }
   return CompilerType();
 }
@@ -1593,14 +1314,14 @@
     clang::DeclContext *decl_ctx, clang::FunctionDecl *func_decl,
     const char *name, const TemplateParameterInfos &template_param_infos) {
   //    /// Create a function template node.
-  ASTContext *ast = getASTContext();
+  ASTContext &ast = getASTContext();
 
   llvm::SmallVector<NamedDecl *, 8> template_param_decls;
 
   TemplateParameterList *template_param_list = CreateTemplateParameterList(
-      ast, template_param_infos, template_param_decls);
+      &ast, template_param_infos, template_param_decls);
   FunctionTemplateDecl *func_tmpl_decl = FunctionTemplateDecl::Create(
-      *ast, decl_ctx, func_decl->getLocation(), func_decl->getDeclName(),
+      ast, decl_ctx, func_decl->getLocation(), func_decl->getDeclName(),
       template_param_list, func_decl);
 
   for (size_t i = 0, template_param_decl_count = template_param_decls.size();
@@ -1608,6 +1329,11 @@
     // TODO: verify which decl context we should put template_param_decls into..
     template_param_decls[i]->setDeclContext(func_decl);
   }
+  // Function templates inside a record need to have an access specifier.
+  // It doesn't matter what access specifier we give the template as LLDB
+  // anyway allows accessing everything inside a record.
+  if (decl_ctx->isRecord())
+    func_tmpl_decl->setAccess(clang::AccessSpecifier::AS_public);
 
   return func_tmpl_decl;
 }
@@ -1625,13 +1351,13 @@
 ClassTemplateDecl *ClangASTContext::CreateClassTemplateDecl(
     DeclContext *decl_ctx, lldb::AccessType access_type, const char *class_name,
     int kind, const TemplateParameterInfos &template_param_infos) {
-  ASTContext *ast = getASTContext();
+  ASTContext &ast = getASTContext();
 
   ClassTemplateDecl *class_template_decl = nullptr;
   if (decl_ctx == nullptr)
-    decl_ctx = ast->getTranslationUnitDecl();
+    decl_ctx = ast.getTranslationUnitDecl();
 
-  IdentifierInfo &identifier_info = ast->Idents.get(class_name);
+  IdentifierInfo &identifier_info = ast.Idents.get(class_name);
   DeclarationName decl_name(&identifier_info);
 
   clang::DeclContext::lookup_result result = decl_ctx->lookup(decl_name);
@@ -1645,10 +1371,10 @@
   llvm::SmallVector<NamedDecl *, 8> template_param_decls;
 
   TemplateParameterList *template_param_list = CreateTemplateParameterList(
-      ast, template_param_infos, template_param_decls);
+      &ast, template_param_infos, template_param_decls);
 
   CXXRecordDecl *template_cxx_decl = CXXRecordDecl::Create(
-      *ast, (TagDecl::TagKind)kind,
+      ast, (TagDecl::TagKind)kind,
       decl_ctx, // What decl context do we use here? TU? The actual decl
                 // context?
       SourceLocation(), SourceLocation(), &identifier_info);
@@ -1664,7 +1390,7 @@
   // template_cxx_decl->completeDefinition();
 
   class_template_decl = ClassTemplateDecl::Create(
-      *ast,
+      ast,
       decl_ctx, // What decl context do we use here? TU? The actual decl
                 // context?
       SourceLocation(), decl_name, template_param_list, template_cxx_decl);
@@ -1690,23 +1416,23 @@
 
 TemplateTemplateParmDecl *
 ClangASTContext::CreateTemplateTemplateParmDecl(const char *template_name) {
-  ASTContext *ast = getASTContext();
+  ASTContext &ast = getASTContext();
 
-  auto *decl_ctx = ast->getTranslationUnitDecl();
+  auto *decl_ctx = ast.getTranslationUnitDecl();
 
-  IdentifierInfo &identifier_info = ast->Idents.get(template_name);
+  IdentifierInfo &identifier_info = ast.Idents.get(template_name);
   llvm::SmallVector<NamedDecl *, 8> template_param_decls;
 
   ClangASTContext::TemplateParameterInfos template_param_infos;
   TemplateParameterList *template_param_list = CreateTemplateParameterList(
-      ast, template_param_infos, template_param_decls);
+      &ast, template_param_infos, template_param_decls);
 
   // LLDB needs to create those decls only to be able to display a
   // type that includes a template template argument. Only the name matters for
   // this purpose, so we use dummy values for the other characterisitcs of the
   // type.
   return TemplateTemplateParmDecl::Create(
-      *ast, decl_ctx, SourceLocation(),
+      ast, decl_ctx, SourceLocation(),
       /*Depth*/ 0, /*Position*/ 0,
       /*IsParameterPack*/ false, &identifier_info, template_param_list);
 }
@@ -1715,7 +1441,7 @@
 ClangASTContext::CreateClassTemplateSpecializationDecl(
     DeclContext *decl_ctx, ClassTemplateDecl *class_template_decl, int kind,
     const TemplateParameterInfos &template_param_infos) {
-  ASTContext *ast = getASTContext();
+  ASTContext &ast = getASTContext();
   llvm::SmallVector<clang::TemplateArgument, 2> args(
       template_param_infos.args.size() +
       (template_param_infos.packed_args ? 1 : 0));
@@ -1723,13 +1449,12 @@
             args.begin());
   if (template_param_infos.packed_args) {
     args[args.size() - 1] = TemplateArgument::CreatePackCopy(
-        *ast, template_param_infos.packed_args->args);
+        ast, template_param_infos.packed_args->args);
   }
   ClassTemplateSpecializationDecl *class_template_specialization_decl =
       ClassTemplateSpecializationDecl::Create(
-          *ast, (TagDecl::TagKind)kind, decl_ctx, SourceLocation(),
-          SourceLocation(), class_template_decl, args,
-          nullptr);
+          ast, (TagDecl::TagKind)kind, decl_ctx, SourceLocation(),
+          SourceLocation(), class_template_decl, args, nullptr);
 
   class_template_specialization_decl->setSpecializationKind(
       TSK_ExplicitSpecialization);
@@ -1740,10 +1465,8 @@
 CompilerType ClangASTContext::CreateClassTemplateSpecializationType(
     ClassTemplateSpecializationDecl *class_template_specialization_decl) {
   if (class_template_specialization_decl) {
-    ASTContext *ast = getASTContext();
-    if (ast)
-      return CompilerType(
-          ast, ast->getTagDeclType(class_template_specialization_decl));
+    ASTContext &ast = getASTContext();
+    return GetType(ast.getTagDeclType(class_template_specialization_decl));
   }
   return CompilerType();
 }
@@ -1808,19 +1531,15 @@
 
 bool ClangASTContext::FieldIsBitfield(FieldDecl *field,
                                       uint32_t &bitfield_bit_size) {
-  return FieldIsBitfield(getASTContext(), field, bitfield_bit_size);
-}
-
-bool ClangASTContext::FieldIsBitfield(ASTContext *ast, FieldDecl *field,
-                                      uint32_t &bitfield_bit_size) {
-  if (ast == nullptr || field == nullptr)
+  ASTContext &ast = getASTContext();
+  if (field == nullptr)
     return false;
 
   if (field->isBitField()) {
     Expr *bit_width_expr = field->getBitWidth();
     if (bit_width_expr) {
       llvm::APSInt bit_width_apsint;
-      if (bit_width_expr->isIntegerConstantExpr(bit_width_apsint, *ast)) {
+      if (bit_width_expr->isIntegerConstantExpr(bit_width_apsint, ast)) {
         bitfield_bit_size = bit_width_apsint.getLimitedValue(UINT32_MAX);
         return true;
       }
@@ -1854,27 +1573,26 @@
 
 #pragma mark Objective-C Classes
 
-CompilerType ClangASTContext::CreateObjCClass(const char *name,
+CompilerType ClangASTContext::CreateObjCClass(llvm::StringRef name,
                                               DeclContext *decl_ctx,
                                               bool isForwardDecl,
                                               bool isInternal,
                                               ClangASTMetadata *metadata) {
-  ASTContext *ast = getASTContext();
-  assert(ast != nullptr);
-  assert(name && name[0]);
+  ASTContext &ast = getASTContext();
+  assert(!name.empty());
   if (decl_ctx == nullptr)
-    decl_ctx = ast->getTranslationUnitDecl();
+    decl_ctx = ast.getTranslationUnitDecl();
 
   ObjCInterfaceDecl *decl = ObjCInterfaceDecl::Create(
-      *ast, decl_ctx, SourceLocation(), &ast->Idents.get(name), nullptr,
-      nullptr, SourceLocation(),
+      ast, decl_ctx, SourceLocation(), &ast.Idents.get(name), nullptr, nullptr,
+      SourceLocation(),
       /*isForwardDecl,*/
       isInternal);
 
   if (decl && metadata)
-    SetMetadata(ast, decl, *metadata);
+    SetMetadata(decl, *metadata);
 
-  return CompilerType(ast, ast->getObjCInterfaceType(decl));
+  return GetType(ast.getObjCInterfaceType(decl));
 }
 
 static inline bool BaseSpecifierIsEmpty(const CXXBaseSpecifier *b) {
@@ -1909,13 +1627,13 @@
 NamespaceDecl *ClangASTContext::GetUniqueNamespaceDeclaration(
     const char *name, DeclContext *decl_ctx, bool is_inline) {
   NamespaceDecl *namespace_decl = nullptr;
-  ASTContext *ast = getASTContext();
-  TranslationUnitDecl *translation_unit_decl = ast->getTranslationUnitDecl();
+  ASTContext &ast = getASTContext();
+  TranslationUnitDecl *translation_unit_decl = ast.getTranslationUnitDecl();
   if (decl_ctx == nullptr)
     decl_ctx = translation_unit_decl;
 
   if (name) {
-    IdentifierInfo &identifier_info = ast->Idents.get(name);
+    IdentifierInfo &identifier_info = ast.Idents.get(name);
     DeclarationName decl_name(&identifier_info);
     clang::DeclContext::lookup_result result = decl_ctx->lookup(decl_name);
     for (NamedDecl *decl : result) {
@@ -1925,7 +1643,7 @@
     }
 
     namespace_decl =
-        NamespaceDecl::Create(*ast, decl_ctx, is_inline, SourceLocation(),
+        NamespaceDecl::Create(ast, decl_ctx, is_inline, SourceLocation(),
                               SourceLocation(), &identifier_info, nullptr);
 
     decl_ctx->addDecl(namespace_decl);
@@ -1936,7 +1654,7 @@
         return namespace_decl;
 
       namespace_decl =
-          NamespaceDecl::Create(*ast, decl_ctx, false, SourceLocation(),
+          NamespaceDecl::Create(ast, decl_ctx, false, SourceLocation(),
                                 SourceLocation(), nullptr, nullptr);
       translation_unit_decl->setAnonymousNamespace(namespace_decl);
       translation_unit_decl->addDecl(namespace_decl);
@@ -1948,7 +1666,7 @@
         if (namespace_decl)
           return namespace_decl;
         namespace_decl =
-            NamespaceDecl::Create(*ast, decl_ctx, false, SourceLocation(),
+            NamespaceDecl::Create(ast, decl_ctx, false, SourceLocation(),
                                   SourceLocation(), nullptr, nullptr);
         parent_namespace_decl->setAnonymousNamespace(namespace_decl);
         parent_namespace_decl->addDecl(namespace_decl);
@@ -1966,21 +1684,11 @@
   return namespace_decl;
 }
 
-NamespaceDecl *ClangASTContext::GetUniqueNamespaceDeclaration(
-    clang::ASTContext *ast, const char *name, clang::DeclContext *decl_ctx,
-    bool is_inline) {
-  ClangASTContext *ast_ctx = ClangASTContext::GetASTContext(ast);
-  if (ast_ctx == nullptr)
-    return nullptr;
-
-  return ast_ctx->GetUniqueNamespaceDeclaration(name, decl_ctx, is_inline);
-}
-
 clang::BlockDecl *
 ClangASTContext::CreateBlockDeclaration(clang::DeclContext *ctx) {
   if (ctx != nullptr) {
-    clang::BlockDecl *decl = clang::BlockDecl::Create(*getASTContext(), ctx,
-                                                      clang::SourceLocation());
+    clang::BlockDecl *decl =
+        clang::BlockDecl::Create(getASTContext(), ctx, clang::SourceLocation());
     ctx->addDecl(decl);
     return decl;
   }
@@ -2007,10 +1715,9 @@
 clang::UsingDirectiveDecl *ClangASTContext::CreateUsingDirectiveDeclaration(
     clang::DeclContext *decl_ctx, clang::NamespaceDecl *ns_decl) {
   if (decl_ctx != nullptr && ns_decl != nullptr) {
-    clang::TranslationUnitDecl *translation_unit =
-        (clang::TranslationUnitDecl *)GetTranslationUnitDecl(getASTContext());
+    auto *translation_unit = getASTContext().getTranslationUnitDecl();
     clang::UsingDirectiveDecl *using_decl = clang::UsingDirectiveDecl::Create(
-        *getASTContext(), decl_ctx, clang::SourceLocation(),
+        getASTContext(), decl_ctx, clang::SourceLocation(),
         clang::SourceLocation(), clang::NestedNameSpecifierLoc(),
         clang::SourceLocation(), ns_decl,
         FindLCABetweenDecls(decl_ctx, ns_decl, translation_unit));
@@ -2025,10 +1732,10 @@
                                         clang::NamedDecl *target) {
   if (current_decl_ctx != nullptr && target != nullptr) {
     clang::UsingDecl *using_decl = clang::UsingDecl::Create(
-        *getASTContext(), current_decl_ctx, clang::SourceLocation(),
+        getASTContext(), current_decl_ctx, clang::SourceLocation(),
         clang::NestedNameSpecifierLoc(), clang::DeclarationNameInfo(), false);
     clang::UsingShadowDecl *shadow_decl = clang::UsingShadowDecl::Create(
-        *getASTContext(), current_decl_ctx, clang::SourceLocation(), using_decl,
+        getASTContext(), current_decl_ctx, clang::SourceLocation(), using_decl,
         target);
     using_decl->addShadowDecl(shadow_decl);
     current_decl_ctx->addDecl(using_decl);
@@ -2041,9 +1748,9 @@
     clang::DeclContext *decl_context, const char *name, clang::QualType type) {
   if (decl_context != nullptr) {
     clang::VarDecl *var_decl = clang::VarDecl::Create(
-        *getASTContext(), decl_context, clang::SourceLocation(),
+        getASTContext(), decl_context, clang::SourceLocation(),
         clang::SourceLocation(),
-        name && name[0] ? &getASTContext()->Idents.getOwn(name) : nullptr, type,
+        name && name[0] ? &getASTContext().Idents.getOwn(name) : nullptr, type,
         nullptr, clang::SC_None);
     var_decl->setAccess(clang::AS_public);
     decl_context->addDecl(var_decl);
@@ -2133,7 +1840,7 @@
 
   clang::OverloadedOperatorKind op_kind = clang::NUM_OVERLOADED_OPERATORS;
   if (!IsOperator(name, op_kind) || op_kind == clang::NUM_OVERLOADED_OPERATORS)
-    return DeclarationName(&getASTContext()->Idents.get(
+    return DeclarationName(&getASTContext().Idents.get(
         name)); // Not operator, but a regular function.
 
   // Check the number of operator parameters. Sometimes we have seen bad DWARF
@@ -2152,16 +1859,16 @@
           is_method, op_kind, num_params))
     return clang::DeclarationName();
 
-  return getASTContext()->DeclarationNames.getCXXOperatorName(op_kind);
+  return getASTContext().DeclarationNames.getCXXOperatorName(op_kind);
 }
 
 FunctionDecl *ClangASTContext::CreateFunctionDeclaration(
     DeclContext *decl_ctx, const char *name,
     const CompilerType &function_clang_type, int storage, bool is_inline) {
   FunctionDecl *func_decl = nullptr;
-  ASTContext *ast = getASTContext();
+  ASTContext &ast = getASTContext();
   if (decl_ctx == nullptr)
-    decl_ctx = ast->getTranslationUnitDecl();
+    decl_ctx = ast.getTranslationUnitDecl();
 
   const bool hasWrittenPrototype = true;
   const bool isConstexprSpecified = false;
@@ -2169,7 +1876,7 @@
   clang::DeclarationName declarationName =
       GetDeclarationName(name, function_clang_type);
   func_decl = FunctionDecl::Create(
-      *ast, decl_ctx, SourceLocation(), SourceLocation(), declarationName,
+      ast, decl_ctx, SourceLocation(), SourceLocation(), declarationName,
       ClangUtil::GetQualType(function_clang_type), nullptr,
       (clang::StorageClass)storage, is_inline, hasWrittenPrototype,
       isConstexprSpecified ? CSK_constexpr : CSK_unspecified);
@@ -2183,13 +1890,11 @@
   return func_decl;
 }
 
-CompilerType ClangASTContext::CreateFunctionType(
-    ASTContext *ast, const CompilerType &result_type, const CompilerType *args,
-    unsigned num_args, bool is_variadic, unsigned type_quals,
-    clang::CallingConv cc) {
-  if (ast == nullptr)
-    return CompilerType(); // invalid AST
-
+CompilerType
+ClangASTContext::CreateFunctionType(const CompilerType &result_type,
+                                    const CompilerType *args, unsigned num_args,
+                                    bool is_variadic, unsigned type_quals,
+                                    clang::CallingConv cc) {
   if (!result_type || !ClangUtil::IsClangType(result_type))
     return CompilerType(); // invalid return type
 
@@ -2220,22 +1925,22 @@
   proto_info.TypeQuals = clang::Qualifiers::fromFastMask(type_quals);
   proto_info.RefQualifier = RQ_None;
 
-  return CompilerType(ast,
-                      ast->getFunctionType(ClangUtil::GetQualType(result_type),
-                                           qual_type_args, proto_info));
+  return GetType(getASTContext().getFunctionType(
+      ClangUtil::GetQualType(result_type), qual_type_args, proto_info));
 }
 
 ParmVarDecl *ClangASTContext::CreateParameterDeclaration(
     clang::DeclContext *decl_ctx, const char *name,
-    const CompilerType &param_type, int storage) {
-  ASTContext *ast = getASTContext();
-  assert(ast != nullptr);
+    const CompilerType &param_type, int storage, bool add_decl) {
+  ASTContext &ast = getASTContext();
   auto *decl =
-      ParmVarDecl::Create(*ast, decl_ctx, SourceLocation(), SourceLocation(),
-                          name && name[0] ? &ast->Idents.get(name) : nullptr,
+      ParmVarDecl::Create(ast, decl_ctx, SourceLocation(), SourceLocation(),
+                          name && name[0] ? &ast.Idents.get(name) : nullptr,
                           ClangUtil::GetQualType(param_type), nullptr,
                           (clang::StorageClass)storage, nullptr);
-  decl_ctx->addDecl(decl);
+  if (add_decl)
+    decl_ctx->addDecl(decl);
+
   return decl;
 }
 
@@ -2251,7 +1956,7 @@
   QualType block_type = m_ast_up->getBlockPointerType(
       clang::QualType::getFromOpaquePtr(function_type.GetOpaqueQualType()));
 
-  return CompilerType(this, block_type.getAsOpaquePtr());
+  return GetType(block_type);
 }
 
 #pragma mark Array Types
@@ -2260,25 +1965,21 @@
                                               size_t element_count,
                                               bool is_vector) {
   if (element_type.IsValid()) {
-    ASTContext *ast = getASTContext();
-    assert(ast != nullptr);
+    ASTContext &ast = getASTContext();
 
     if (is_vector) {
-      return CompilerType(
-          ast, ast->getExtVectorType(ClangUtil::GetQualType(element_type),
-                                     element_count));
+      return GetType(ast.getExtVectorType(ClangUtil::GetQualType(element_type),
+                                          element_count));
     } else {
 
       llvm::APInt ap_element_count(64, element_count);
       if (element_count == 0) {
-        return CompilerType(ast, ast->getIncompleteArrayType(
-                                     ClangUtil::GetQualType(element_type),
-                                     clang::ArrayType::Normal, 0));
+        return GetType(ast.getIncompleteArrayType(
+            ClangUtil::GetQualType(element_type), clang::ArrayType::Normal, 0));
       } else {
-        return CompilerType(
-            ast, ast->getConstantArrayType(ClangUtil::GetQualType(element_type),
-                                           ap_element_count,
-                                           clang::ArrayType::Normal, 0));
+        return GetType(ast.getConstantArrayType(
+            ClangUtil::GetQualType(element_type), ap_element_count, nullptr,
+            clang::ArrayType::Normal, 0));
       }
     }
   }
@@ -2331,14 +2032,14 @@
                                        bool is_scoped) {
   // TODO: Do something intelligent with the Declaration object passed in
   // like maybe filling in the SourceLocation with it...
-  ASTContext *ast = getASTContext();
+  ASTContext &ast = getASTContext();
 
   // TODO: ask about these...
   //    const bool IsFixed = false;
 
   EnumDecl *enum_decl = EnumDecl::Create(
-      *ast, decl_ctx, SourceLocation(), SourceLocation(),
-      name && name[0] ? &ast->Idents.get(name) : nullptr, nullptr,
+      ast, decl_ctx, SourceLocation(), SourceLocation(),
+      name && name[0] ? &ast.Idents.get(name) : nullptr, nullptr,
       is_scoped, // IsScoped
       is_scoped, // IsScopedUsingClassTag
       false);    // IsFixed
@@ -2352,62 +2053,58 @@
 
     enum_decl->setAccess(AS_public); // TODO respect what's in the debug info
 
-    return CompilerType(ast, ast->getTagDeclType(enum_decl));
+    return GetType(ast.getTagDeclType(enum_decl));
   }
   return CompilerType();
 }
 
-CompilerType ClangASTContext::GetIntTypeFromBitSize(clang::ASTContext *ast,
-                                                    size_t bit_size,
+CompilerType ClangASTContext::GetIntTypeFromBitSize(size_t bit_size,
                                                     bool is_signed) {
-  if (ast) {
-    if (is_signed) {
-      if (bit_size == ast->getTypeSize(ast->SignedCharTy))
-        return CompilerType(ast, ast->SignedCharTy);
+  clang::ASTContext &ast = getASTContext();
 
-      if (bit_size == ast->getTypeSize(ast->ShortTy))
-        return CompilerType(ast, ast->ShortTy);
+  if (is_signed) {
+    if (bit_size == ast.getTypeSize(ast.SignedCharTy))
+      return GetType(ast.SignedCharTy);
 
-      if (bit_size == ast->getTypeSize(ast->IntTy))
-        return CompilerType(ast, ast->IntTy);
+    if (bit_size == ast.getTypeSize(ast.ShortTy))
+      return GetType(ast.ShortTy);
 
-      if (bit_size == ast->getTypeSize(ast->LongTy))
-        return CompilerType(ast, ast->LongTy);
+    if (bit_size == ast.getTypeSize(ast.IntTy))
+      return GetType(ast.IntTy);
 
-      if (bit_size == ast->getTypeSize(ast->LongLongTy))
-        return CompilerType(ast, ast->LongLongTy);
+    if (bit_size == ast.getTypeSize(ast.LongTy))
+      return GetType(ast.LongTy);
 
-      if (bit_size == ast->getTypeSize(ast->Int128Ty))
-        return CompilerType(ast, ast->Int128Ty);
-    } else {
-      if (bit_size == ast->getTypeSize(ast->UnsignedCharTy))
-        return CompilerType(ast, ast->UnsignedCharTy);
+    if (bit_size == ast.getTypeSize(ast.LongLongTy))
+      return GetType(ast.LongLongTy);
 
-      if (bit_size == ast->getTypeSize(ast->UnsignedShortTy))
-        return CompilerType(ast, ast->UnsignedShortTy);
+    if (bit_size == ast.getTypeSize(ast.Int128Ty))
+      return GetType(ast.Int128Ty);
+  } else {
+    if (bit_size == ast.getTypeSize(ast.UnsignedCharTy))
+      return GetType(ast.UnsignedCharTy);
 
-      if (bit_size == ast->getTypeSize(ast->UnsignedIntTy))
-        return CompilerType(ast, ast->UnsignedIntTy);
+    if (bit_size == ast.getTypeSize(ast.UnsignedShortTy))
+      return GetType(ast.UnsignedShortTy);
 
-      if (bit_size == ast->getTypeSize(ast->UnsignedLongTy))
-        return CompilerType(ast, ast->UnsignedLongTy);
+    if (bit_size == ast.getTypeSize(ast.UnsignedIntTy))
+      return GetType(ast.UnsignedIntTy);
 
-      if (bit_size == ast->getTypeSize(ast->UnsignedLongLongTy))
-        return CompilerType(ast, ast->UnsignedLongLongTy);
+    if (bit_size == ast.getTypeSize(ast.UnsignedLongTy))
+      return GetType(ast.UnsignedLongTy);
 
-      if (bit_size == ast->getTypeSize(ast->UnsignedInt128Ty))
-        return CompilerType(ast, ast->UnsignedInt128Ty);
-    }
+    if (bit_size == ast.getTypeSize(ast.UnsignedLongLongTy))
+      return GetType(ast.UnsignedLongLongTy);
+
+    if (bit_size == ast.getTypeSize(ast.UnsignedInt128Ty))
+      return GetType(ast.UnsignedInt128Ty);
   }
   return CompilerType();
 }
 
-CompilerType ClangASTContext::GetPointerSizedIntType(clang::ASTContext *ast,
-                                                     bool is_signed) {
-  if (ast)
-    return GetIntTypeFromBitSize(ast, ast->getTypeSize(ast->VoidPtrTy),
-                                 is_signed);
-  return CompilerType();
+CompilerType ClangASTContext::GetPointerSizedIntType(bool is_signed) {
+  return GetIntTypeFromBitSize(
+      getASTContext().getTypeSize(getASTContext().VoidPtrTy), is_signed);
 }
 
 void ClangASTContext::DumpDeclContextHiearchy(clang::DeclContext *decl_ctx) {
@@ -2565,41 +2262,42 @@
   }
 }
 
-void ClangASTContext::SetMetadataAsUserID(const void *object,
+void ClangASTContext::SetMetadataAsUserID(const clang::Decl *decl,
                                           user_id_t user_id) {
   ClangASTMetadata meta_data;
   meta_data.SetUserID(user_id);
-  SetMetadata(object, meta_data);
+  SetMetadata(decl, meta_data);
 }
 
-void ClangASTContext::SetMetadata(clang::ASTContext *ast, const void *object,
+void ClangASTContext::SetMetadataAsUserID(const clang::Type *type,
+                                          user_id_t user_id) {
+  ClangASTMetadata meta_data;
+  meta_data.SetUserID(user_id);
+  SetMetadata(type, meta_data);
+}
+
+void ClangASTContext::SetMetadata(const clang::Decl *object,
                                   ClangASTMetadata &metadata) {
-  ClangExternalASTSourceCommon *external_source =
-      ClangExternalASTSourceCommon::Lookup(ast->getExternalSource());
-
-  if (external_source)
-    external_source->SetMetadata(object, metadata);
+  m_decl_metadata[object] = metadata;
 }
 
-ClangASTMetadata *ClangASTContext::GetMetadata(clang::ASTContext *ast,
-                                               const void *object) {
-  ClangExternalASTSourceCommon *external_source =
-      ClangExternalASTSourceCommon::Lookup(ast->getExternalSource());
-
-  if (external_source && external_source->HasMetadata(object))
-    return external_source->GetMetadata(object);
-  else
-    return nullptr;
+void ClangASTContext::SetMetadata(const clang::Type *object,
+                                  ClangASTMetadata &metadata) {
+  m_type_metadata[object] = metadata;
 }
 
-clang::DeclContext *
-ClangASTContext::GetAsDeclContext(clang::CXXMethodDecl *cxx_method_decl) {
-  return llvm::dyn_cast<clang::DeclContext>(cxx_method_decl);
+ClangASTMetadata *ClangASTContext::GetMetadata(const clang::Decl *object) {
+  auto It = m_decl_metadata.find(object);
+  if (It != m_decl_metadata.end())
+    return &It->second;
+  return nullptr;
 }
 
-clang::DeclContext *
-ClangASTContext::GetAsDeclContext(clang::ObjCMethodDecl *objc_method_decl) {
-  return llvm::dyn_cast<clang::DeclContext>(objc_method_decl);
+ClangASTMetadata *ClangASTContext::GetMetadata(const clang::Type *object) {
+  auto It = m_type_metadata.find(object);
+  if (It != m_type_metadata.end())
+    return &It->second;
+  return nullptr;
 }
 
 bool ClangASTContext::SetTagTypeKind(clang::QualType tag_qual_type,
@@ -2643,12 +2341,42 @@
   return GetDeclContextForType(ClangUtil::GetQualType(type));
 }
 
+/// Aggressively desugar the provided type, skipping past various kinds of
+/// syntactic sugar and other constructs one typically wants to ignore.
+/// The \p mask argument allows one to skip certain kinds of simplifications,
+/// when one wishes to handle a certain kind of type directly.
+static QualType
+RemoveWrappingTypes(QualType type, ArrayRef<clang::Type::TypeClass> mask = {}) {
+  while (true) {
+    if (find(mask, type->getTypeClass()) != mask.end())
+      return type;
+    switch (type->getTypeClass()) {
+    // This is not fully correct as _Atomic is more than sugar, but it is
+    // sufficient for the purposes we care about.
+    case clang::Type::Atomic:
+      type = cast<clang::AtomicType>(type)->getValueType();
+      break;
+    case clang::Type::Auto:
+    case clang::Type::Decltype:
+    case clang::Type::Elaborated:
+    case clang::Type::Paren:
+    case clang::Type::Typedef:
+    case clang::Type::TypeOf:
+    case clang::Type::TypeOfExpr:
+      type = type->getLocallyUnqualifiedSingleStepDesugaredType();
+      break;
+    default:
+      return type;
+    }
+  }
+}
+
 clang::DeclContext *
 ClangASTContext::GetDeclContextForType(clang::QualType type) {
   if (type.isNull())
     return nullptr;
 
-  clang::QualType qual_type = type.getCanonicalType();
+  clang::QualType qual_type = RemoveWrappingTypes(type.getCanonicalType());
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::ObjCInterface:
@@ -2662,19 +2390,6 @@
     return llvm::cast<clang::RecordType>(qual_type)->getDecl();
   case clang::Type::Enum:
     return llvm::cast<clang::EnumType>(qual_type)->getDecl();
-  case clang::Type::Typedef:
-    return GetDeclContextForType(llvm::cast<clang::TypedefType>(qual_type)
-                                     ->getDecl()
-                                     ->getUnderlyingType());
-  case clang::Type::Auto:
-    return GetDeclContextForType(
-        llvm::cast<clang::AutoType>(qual_type)->getDeducedType());
-  case clang::Type::Elaborated:
-    return GetDeclContextForType(
-        llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType());
-  case clang::Type::Paren:
-    return GetDeclContextForType(
-        llvm::cast<clang::ParenType>(qual_type)->desugar());
   default:
     break;
   }
@@ -2685,6 +2400,7 @@
 static bool GetCompleteQualType(clang::ASTContext *ast,
                                 clang::QualType qual_type,
                                 bool allow_completion = true) {
+  qual_type = RemoveWrappingTypes(qual_type);
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::ConstantArray:
@@ -2786,27 +2502,6 @@
     }
   } break;
 
-  case clang::Type::Typedef:
-    return GetCompleteQualType(ast, llvm::cast<clang::TypedefType>(qual_type)
-                                        ->getDecl()
-                                        ->getUnderlyingType(),
-                               allow_completion);
-
-  case clang::Type::Auto:
-    return GetCompleteQualType(
-        ast, llvm::cast<clang::AutoType>(qual_type)->getDeducedType(),
-        allow_completion);
-
-  case clang::Type::Elaborated:
-    return GetCompleteQualType(
-        ast, llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType(),
-        allow_completion);
-
-  case clang::Type::Paren:
-    return GetCompleteQualType(
-        ast, llvm::cast<clang::ParenType>(qual_type)->desugar(),
-        allow_completion);
-
   case clang::Type::Attributed:
     return GetCompleteQualType(
         ast, llvm::cast<clang::AttributedType>(qual_type)->getModifiedType(),
@@ -2839,7 +2534,7 @@
 // Tests
 
 bool ClangASTContext::IsAggregateType(lldb::opaque_compiler_type_t type) {
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
 
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
@@ -2852,22 +2547,6 @@
   case clang::Type::ObjCObject:
   case clang::Type::ObjCInterface:
     return true;
-  case clang::Type::Auto:
-    return IsAggregateType(llvm::cast<clang::AutoType>(qual_type)
-                               ->getDeducedType()
-                               .getAsOpaquePtr());
-  case clang::Type::Elaborated:
-    return IsAggregateType(llvm::cast<clang::ElaboratedType>(qual_type)
-                               ->getNamedType()
-                               .getAsOpaquePtr());
-  case clang::Type::Typedef:
-    return IsAggregateType(llvm::cast<clang::TypedefType>(qual_type)
-                               ->getDecl()
-                               ->getUnderlyingType()
-                               .getAsOpaquePtr());
-  case clang::Type::Paren:
-    return IsAggregateType(
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr());
   default:
     break;
   }
@@ -2876,7 +2555,7 @@
 }
 
 bool ClangASTContext::IsAnonymousType(lldb::opaque_compiler_type_t type) {
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
 
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
@@ -2890,22 +2569,6 @@
     }
     break;
   }
-  case clang::Type::Auto:
-    return IsAnonymousType(llvm::cast<clang::AutoType>(qual_type)
-                               ->getDeducedType()
-                               .getAsOpaquePtr());
-  case clang::Type::Elaborated:
-    return IsAnonymousType(llvm::cast<clang::ElaboratedType>(qual_type)
-                               ->getNamedType()
-                               .getAsOpaquePtr());
-  case clang::Type::Typedef:
-    return IsAnonymousType(llvm::cast<clang::TypedefType>(qual_type)
-                               ->getDecl()
-                               ->getUnderlyingType()
-                               .getAsOpaquePtr());
-  case clang::Type::Paren:
-    return IsAnonymousType(
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr());
   default:
     break;
   }
@@ -2916,7 +2579,7 @@
 bool ClangASTContext::IsArrayType(lldb::opaque_compiler_type_t type,
                                   CompilerType *element_type_ptr,
                                   uint64_t *size, bool *is_incomplete) {
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
 
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
@@ -2926,8 +2589,9 @@
   case clang::Type::ConstantArray:
     if (element_type_ptr)
       element_type_ptr->SetCompilerType(
-          getASTContext(),
-          llvm::cast<clang::ConstantArrayType>(qual_type)->getElementType());
+          this, llvm::cast<clang::ConstantArrayType>(qual_type)
+                    ->getElementType()
+                    .getAsOpaquePtr());
     if (size)
       *size = llvm::cast<clang::ConstantArrayType>(qual_type)
                   ->getSize()
@@ -2939,8 +2603,9 @@
   case clang::Type::IncompleteArray:
     if (element_type_ptr)
       element_type_ptr->SetCompilerType(
-          getASTContext(),
-          llvm::cast<clang::IncompleteArrayType>(qual_type)->getElementType());
+          this, llvm::cast<clang::IncompleteArrayType>(qual_type)
+                    ->getElementType()
+                    .getAsOpaquePtr());
     if (size)
       *size = 0;
     if (is_incomplete)
@@ -2950,8 +2615,9 @@
   case clang::Type::VariableArray:
     if (element_type_ptr)
       element_type_ptr->SetCompilerType(
-          getASTContext(),
-          llvm::cast<clang::VariableArrayType>(qual_type)->getElementType());
+          this, llvm::cast<clang::VariableArrayType>(qual_type)
+                    ->getElementType()
+                    .getAsOpaquePtr());
     if (size)
       *size = 0;
     if (is_incomplete)
@@ -2961,34 +2627,14 @@
   case clang::Type::DependentSizedArray:
     if (element_type_ptr)
       element_type_ptr->SetCompilerType(
-          getASTContext(), llvm::cast<clang::DependentSizedArrayType>(qual_type)
-                               ->getElementType());
+          this, llvm::cast<clang::DependentSizedArrayType>(qual_type)
+                    ->getElementType()
+                    .getAsOpaquePtr());
     if (size)
       *size = 0;
     if (is_incomplete)
       *is_incomplete = false;
     return true;
-
-  case clang::Type::Typedef:
-    return IsArrayType(llvm::cast<clang::TypedefType>(qual_type)
-                           ->getDecl()
-                           ->getUnderlyingType()
-                           .getAsOpaquePtr(),
-                       element_type_ptr, size, is_incomplete);
-  case clang::Type::Auto:
-    return IsArrayType(llvm::cast<clang::AutoType>(qual_type)
-                           ->getDeducedType()
-                           .getAsOpaquePtr(),
-                       element_type_ptr, size, is_incomplete);
-  case clang::Type::Elaborated:
-    return IsArrayType(llvm::cast<clang::ElaboratedType>(qual_type)
-                           ->getNamedType()
-                           .getAsOpaquePtr(),
-                       element_type_ptr, size, is_incomplete);
-  case clang::Type::Paren:
-    return IsArrayType(
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-        element_type_ptr, size, is_incomplete);
   }
   if (element_type_ptr)
     element_type_ptr->Clear();
@@ -3012,8 +2658,7 @@
       if (size)
         *size = vector_type->getNumElements();
       if (element_type)
-        *element_type =
-            CompilerType(getASTContext(), vector_type->getElementType());
+        *element_type = GetType(vector_type->getElementType());
     }
     return true;
   } break;
@@ -3025,7 +2670,7 @@
         *size = ext_vector_type->getNumElements();
       if (element_type)
         *element_type =
-            CompilerType(getASTContext(), ext_vector_type->getElementType());
+            CompilerType(this, ext_vector_type->getElementType().getAsOpaquePtr());
     }
     return true;
   }
@@ -3037,8 +2682,7 @@
 
 bool ClangASTContext::IsRuntimeGeneratedType(
     lldb::opaque_compiler_type_t type) {
-  clang::DeclContext *decl_ctx = ClangASTContext::GetASTContext(getASTContext())
-                                     ->GetDeclContextForType(GetQualType(type));
+  clang::DeclContext *decl_ctx = GetDeclContextForType(GetQualType(type));
   if (!decl_ctx)
     return false;
 
@@ -3048,8 +2692,7 @@
   clang::ObjCInterfaceDecl *result_iface_decl =
       llvm::dyn_cast<clang::ObjCInterfaceDecl>(decl_ctx);
 
-  ClangASTMetadata *ast_metadata =
-      ClangASTContext::GetMetadata(getASTContext(), result_iface_decl);
+  ClangASTMetadata *ast_metadata = GetMetadata(result_iface_decl);
   if (!ast_metadata)
     return false;
   return (ast_metadata->GetISAPtr() != 0);
@@ -3061,7 +2704,7 @@
 
 bool ClangASTContext::IsCompleteType(lldb::opaque_compiler_type_t type) {
   const bool allow_completion = false;
-  return GetCompleteQualType(getASTContext(), GetQualType(type),
+  return GetCompleteQualType(&getASTContext(), GetQualType(type),
                              allow_completion);
 }
 
@@ -3097,7 +2740,7 @@
 bool ClangASTContext::IsFunctionType(lldb::opaque_compiler_type_t type,
                                      bool *is_variadic_ptr) {
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
 
     if (qual_type->isFunctionType()) {
       if (is_variadic_ptr) {
@@ -3115,26 +2758,6 @@
     switch (type_class) {
     default:
       break;
-    case clang::Type::Typedef:
-      return IsFunctionType(llvm::cast<clang::TypedefType>(qual_type)
-                                ->getDecl()
-                                ->getUnderlyingType()
-                                .getAsOpaquePtr(),
-                            nullptr);
-    case clang::Type::Auto:
-      return IsFunctionType(llvm::cast<clang::AutoType>(qual_type)
-                                ->getDeducedType()
-                                .getAsOpaquePtr(),
-                            nullptr);
-    case clang::Type::Elaborated:
-      return IsFunctionType(llvm::cast<clang::ElaboratedType>(qual_type)
-                                ->getNamedType()
-                                .getAsOpaquePtr(),
-                            nullptr);
-    case clang::Type::Paren:
-      return IsFunctionType(
-          llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-          nullptr);
     case clang::Type::LValueReference:
     case clang::Type::RValueReference: {
       const clang::ReferenceType *reference_type =
@@ -3155,7 +2778,7 @@
   if (!type)
     return 0;
 
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Record:
@@ -3183,7 +2806,7 @@
           for (field_pos = record_decl->field_begin(); field_pos != field_end;
                ++field_pos) {
             clang::QualType field_qual_type = field_pos->getType();
-            uint64_t field_bitwidth = getASTContext()->getTypeSize(qual_type);
+            uint64_t field_bitwidth = getASTContext().getTypeSize(qual_type);
             if (field_qual_type->isFloatingType()) {
               if (field_qual_type->isComplexType())
                 return 0;
@@ -3218,31 +2841,13 @@
             ++num_fields;
           }
           if (base_type_ptr)
-            *base_type_ptr = CompilerType(getASTContext(), base_qual_type);
+            *base_type_ptr = CompilerType(this, base_qual_type.getAsOpaquePtr());
           return num_fields;
         }
       }
     }
     break;
 
-  case clang::Type::Typedef:
-    return IsHomogeneousAggregate(llvm::cast<clang::TypedefType>(qual_type)
-                                      ->getDecl()
-                                      ->getUnderlyingType()
-                                      .getAsOpaquePtr(),
-                                  base_type_ptr);
-
-  case clang::Type::Auto:
-    return IsHomogeneousAggregate(llvm::cast<clang::AutoType>(qual_type)
-                                      ->getDeducedType()
-                                      .getAsOpaquePtr(),
-                                  base_type_ptr);
-
-  case clang::Type::Elaborated:
-    return IsHomogeneousAggregate(llvm::cast<clang::ElaboratedType>(qual_type)
-                                      ->getNamedType()
-                                      .getAsOpaquePtr(),
-                                  base_type_ptr);
   default:
     break;
   }
@@ -3270,7 +2875,7 @@
         llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
     if (func) {
       if (index < func->getNumParams())
-        return CompilerType(getASTContext(), func->getParamType(index));
+        return CompilerType(this, func->getParamType(index).getAsOpaquePtr());
     }
   }
   return CompilerType();
@@ -3278,7 +2883,7 @@
 
 bool ClangASTContext::IsFunctionPointerType(lldb::opaque_compiler_type_t type) {
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
 
     if (qual_type->isFunctionPointerType())
       return true;
@@ -3287,22 +2892,6 @@
     switch (type_class) {
     default:
       break;
-    case clang::Type::Typedef:
-      return IsFunctionPointerType(llvm::cast<clang::TypedefType>(qual_type)
-                                       ->getDecl()
-                                       ->getUnderlyingType()
-                                       .getAsOpaquePtr());
-    case clang::Type::Auto:
-      return IsFunctionPointerType(llvm::cast<clang::AutoType>(qual_type)
-                                       ->getDeducedType()
-                                       .getAsOpaquePtr());
-    case clang::Type::Elaborated:
-      return IsFunctionPointerType(llvm::cast<clang::ElaboratedType>(qual_type)
-                                       ->getNamedType()
-                                       .getAsOpaquePtr());
-    case clang::Type::Paren:
-      return IsFunctionPointerType(
-          llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr());
 
     case clang::Type::LValueReference:
     case clang::Type::RValueReference: {
@@ -3321,7 +2910,7 @@
     lldb::opaque_compiler_type_t type,
     CompilerType *function_pointer_type_ptr) {
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
 
     if (qual_type->isBlockPointerType()) {
       if (function_pointer_type_ptr) {
@@ -3330,7 +2919,7 @@
         QualType pointee_type = block_pointer_type->getPointeeType();
         QualType function_pointer_type = m_ast_up->getPointerType(pointee_type);
         *function_pointer_type_ptr =
-            CompilerType(getASTContext(), function_pointer_type);
+            CompilerType(this, function_pointer_type.getAsOpaquePtr());
       }
       return true;
     }
@@ -3339,26 +2928,6 @@
     switch (type_class) {
     default:
       break;
-    case clang::Type::Typedef:
-      return IsBlockPointerType(llvm::cast<clang::TypedefType>(qual_type)
-                                    ->getDecl()
-                                    ->getUnderlyingType()
-                                    .getAsOpaquePtr(),
-                                function_pointer_type_ptr);
-    case clang::Type::Auto:
-      return IsBlockPointerType(llvm::cast<clang::AutoType>(qual_type)
-                                    ->getDeducedType()
-                                    .getAsOpaquePtr(),
-                                function_pointer_type_ptr);
-    case clang::Type::Elaborated:
-      return IsBlockPointerType(llvm::cast<clang::ElaboratedType>(qual_type)
-                                    ->getNamedType()
-                                    .getAsOpaquePtr(),
-                                function_pointer_type_ptr);
-    case clang::Type::Paren:
-      return IsBlockPointerType(
-          llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-          function_pointer_type_ptr);
 
     case clang::Type::LValueReference:
     case clang::Type::RValueReference: {
@@ -3412,7 +2981,7 @@
 bool ClangASTContext::IsPointerType(lldb::opaque_compiler_type_t type,
                                     CompilerType *pointee_type) {
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
     const clang::Type::TypeClass type_class = qual_type->getTypeClass();
     switch (type_class) {
     case clang::Type::Builtin:
@@ -3427,47 +2996,31 @@
     case clang::Type::ObjCObjectPointer:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(), llvm::cast<clang::ObjCObjectPointerType>(qual_type)
-                                 ->getPointeeType());
+            this, llvm::cast<clang::ObjCObjectPointerType>(qual_type)
+                      ->getPointeeType()
+                      .getAsOpaquePtr());
       return true;
     case clang::Type::BlockPointer:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::BlockPointerType>(qual_type)->getPointeeType());
+            this, llvm::cast<clang::BlockPointerType>(qual_type)
+                      ->getPointeeType()
+                      .getAsOpaquePtr());
       return true;
     case clang::Type::Pointer:
       if (pointee_type)
-        pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::PointerType>(qual_type)->getPointeeType());
+        pointee_type->SetCompilerType(this,
+                                      llvm::cast<clang::PointerType>(qual_type)
+                                          ->getPointeeType()
+                                          .getAsOpaquePtr());
       return true;
     case clang::Type::MemberPointer:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::MemberPointerType>(qual_type)->getPointeeType());
+            this, llvm::cast<clang::MemberPointerType>(qual_type)
+                      ->getPointeeType()
+                      .getAsOpaquePtr());
       return true;
-    case clang::Type::Typedef:
-      return IsPointerType(llvm::cast<clang::TypedefType>(qual_type)
-                               ->getDecl()
-                               ->getUnderlyingType()
-                               .getAsOpaquePtr(),
-                           pointee_type);
-    case clang::Type::Auto:
-      return IsPointerType(llvm::cast<clang::AutoType>(qual_type)
-                               ->getDeducedType()
-                               .getAsOpaquePtr(),
-                           pointee_type);
-    case clang::Type::Elaborated:
-      return IsPointerType(llvm::cast<clang::ElaboratedType>(qual_type)
-                               ->getNamedType()
-                               .getAsOpaquePtr(),
-                           pointee_type);
-    case clang::Type::Paren:
-      return IsPointerType(
-          llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-          pointee_type);
     default:
       break;
     }
@@ -3480,7 +3033,7 @@
 bool ClangASTContext::IsPointerOrReferenceType(
     lldb::opaque_compiler_type_t type, CompilerType *pointee_type) {
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
     const clang::Type::TypeClass type_class = qual_type->getTypeClass();
     switch (type_class) {
     case clang::Type::Builtin:
@@ -3495,60 +3048,44 @@
     case clang::Type::ObjCObjectPointer:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(), llvm::cast<clang::ObjCObjectPointerType>(qual_type)
-                                 ->getPointeeType());
+            this, llvm::cast<clang::ObjCObjectPointerType>(qual_type)
+                                 ->getPointeeType().getAsOpaquePtr());
       return true;
     case clang::Type::BlockPointer:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::BlockPointerType>(qual_type)->getPointeeType());
+            this, llvm::cast<clang::BlockPointerType>(qual_type)
+                      ->getPointeeType()
+                      .getAsOpaquePtr());
       return true;
     case clang::Type::Pointer:
       if (pointee_type)
-        pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::PointerType>(qual_type)->getPointeeType());
+        pointee_type->SetCompilerType(this,
+                                      llvm::cast<clang::PointerType>(qual_type)
+                                          ->getPointeeType()
+                                          .getAsOpaquePtr());
       return true;
     case clang::Type::MemberPointer:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::MemberPointerType>(qual_type)->getPointeeType());
+            this, llvm::cast<clang::MemberPointerType>(qual_type)
+                      ->getPointeeType()
+                      .getAsOpaquePtr());
       return true;
     case clang::Type::LValueReference:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::LValueReferenceType>(qual_type)->desugar());
+            this, llvm::cast<clang::LValueReferenceType>(qual_type)
+                      ->desugar()
+                      .getAsOpaquePtr());
       return true;
     case clang::Type::RValueReference:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::RValueReferenceType>(qual_type)->desugar());
+            this, llvm::cast<clang::RValueReferenceType>(qual_type)
+                      ->desugar()
+                      .getAsOpaquePtr());
       return true;
-    case clang::Type::Typedef:
-      return IsPointerOrReferenceType(llvm::cast<clang::TypedefType>(qual_type)
-                                          ->getDecl()
-                                          ->getUnderlyingType()
-                                          .getAsOpaquePtr(),
-                                      pointee_type);
-    case clang::Type::Auto:
-      return IsPointerOrReferenceType(llvm::cast<clang::AutoType>(qual_type)
-                                          ->getDeducedType()
-                                          .getAsOpaquePtr(),
-                                      pointee_type);
-    case clang::Type::Elaborated:
-      return IsPointerOrReferenceType(
-          llvm::cast<clang::ElaboratedType>(qual_type)
-              ->getNamedType()
-              .getAsOpaquePtr(),
-          pointee_type);
-    case clang::Type::Paren:
-      return IsPointerOrReferenceType(
-          llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-          pointee_type);
     default:
       break;
     }
@@ -3562,46 +3099,28 @@
                                       CompilerType *pointee_type,
                                       bool *is_rvalue) {
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
     const clang::Type::TypeClass type_class = qual_type->getTypeClass();
 
     switch (type_class) {
     case clang::Type::LValueReference:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::LValueReferenceType>(qual_type)->desugar());
+            this, llvm::cast<clang::LValueReferenceType>(qual_type)
+                      ->desugar()
+                      .getAsOpaquePtr());
       if (is_rvalue)
         *is_rvalue = false;
       return true;
     case clang::Type::RValueReference:
       if (pointee_type)
         pointee_type->SetCompilerType(
-            getASTContext(),
-            llvm::cast<clang::RValueReferenceType>(qual_type)->desugar());
+            this, llvm::cast<clang::RValueReferenceType>(qual_type)
+                      ->desugar()
+                      .getAsOpaquePtr());
       if (is_rvalue)
         *is_rvalue = true;
       return true;
-    case clang::Type::Typedef:
-      return IsReferenceType(llvm::cast<clang::TypedefType>(qual_type)
-                                 ->getDecl()
-                                 ->getUnderlyingType()
-                                 .getAsOpaquePtr(),
-                             pointee_type, is_rvalue);
-    case clang::Type::Auto:
-      return IsReferenceType(llvm::cast<clang::AutoType>(qual_type)
-                                 ->getDeducedType()
-                                 .getAsOpaquePtr(),
-                             pointee_type, is_rvalue);
-    case clang::Type::Elaborated:
-      return IsReferenceType(llvm::cast<clang::ElaboratedType>(qual_type)
-                                 ->getNamedType()
-                                 .getAsOpaquePtr(),
-                             pointee_type, is_rvalue);
-    case clang::Type::Paren:
-      return IsReferenceType(
-          llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-          pointee_type, is_rvalue);
 
     default:
       break;
@@ -3677,7 +3196,7 @@
 }
 
 bool ClangASTContext::IsObjCClassType(const CompilerType &type) {
-  if (type) {
+  if (ClangUtil::IsClangType(type)) {
     clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
 
     const clang::ObjCObjectPointerType *obj_pointer_type =
@@ -3743,7 +3262,7 @@
                                             bool check_objc) {
   clang::QualType pointee_qual_type;
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
     bool success = false;
     const clang::Type::TypeClass type_class = qual_type->getTypeClass();
     switch (type_class) {
@@ -3770,9 +3289,9 @@
         }
         if (dynamic_pointee_type)
           dynamic_pointee_type->SetCompilerType(
-              getASTContext(),
-              llvm::cast<clang::ObjCObjectPointerType>(qual_type)
-                  ->getPointeeType());
+              this, llvm::cast<clang::ObjCObjectPointerType>(qual_type)
+                        ->getPointeeType()
+                        .getAsOpaquePtr());
         return true;
       }
       break;
@@ -3790,32 +3309,6 @@
       success = true;
       break;
 
-    case clang::Type::Typedef:
-      return IsPossibleDynamicType(llvm::cast<clang::TypedefType>(qual_type)
-                                       ->getDecl()
-                                       ->getUnderlyingType()
-                                       .getAsOpaquePtr(),
-                                   dynamic_pointee_type, check_cplusplus,
-                                   check_objc);
-
-    case clang::Type::Auto:
-      return IsPossibleDynamicType(llvm::cast<clang::AutoType>(qual_type)
-                                       ->getDeducedType()
-                                       .getAsOpaquePtr(),
-                                   dynamic_pointee_type, check_cplusplus,
-                                   check_objc);
-
-    case clang::Type::Elaborated:
-      return IsPossibleDynamicType(llvm::cast<clang::ElaboratedType>(qual_type)
-                                       ->getNamedType()
-                                       .getAsOpaquePtr(),
-                                   dynamic_pointee_type, check_cplusplus,
-                                   check_objc);
-
-    case clang::Type::Paren:
-      return IsPossibleDynamicType(
-          llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-          dynamic_pointee_type, check_cplusplus, check_objc);
     default:
       break;
     }
@@ -3832,8 +3325,8 @@
         case clang::BuiltinType::UnknownAny:
         case clang::BuiltinType::Void:
           if (dynamic_pointee_type)
-            dynamic_pointee_type->SetCompilerType(getASTContext(),
-                                                  pointee_qual_type);
+            dynamic_pointee_type->SetCompilerType(
+                this, pointee_qual_type.getAsOpaquePtr());
           return true;
         default:
           break;
@@ -3850,13 +3343,11 @@
             if (is_complete)
               success = cxx_record_decl->isDynamicClass();
             else {
-              ClangASTMetadata *metadata = ClangASTContext::GetMetadata(
-                  getASTContext(), cxx_record_decl);
+              ClangASTMetadata *metadata = GetMetadata(cxx_record_decl);
               if (metadata)
                 success = metadata->GetIsDynamicCXXType();
               else {
-                is_complete = CompilerType(getASTContext(), pointee_qual_type)
-                                  .GetCompleteType();
+                is_complete = GetType(pointee_qual_type).GetCompleteType();
                 if (is_complete)
                   success = cxx_record_decl->isDynamicClass();
                 else
@@ -3866,8 +3357,8 @@
 
             if (success) {
               if (dynamic_pointee_type)
-                dynamic_pointee_type->SetCompilerType(getASTContext(),
-                                                      pointee_qual_type);
+                dynamic_pointee_type->SetCompilerType(
+                    this, pointee_qual_type.getAsOpaquePtr());
               return true;
             }
           }
@@ -3878,8 +3369,8 @@
       case clang::Type::ObjCInterface:
         if (check_objc) {
           if (dynamic_pointee_type)
-            dynamic_pointee_type->SetCompilerType(getASTContext(),
-                                                  pointee_qual_type);
+            dynamic_pointee_type->SetCompilerType(
+                this, pointee_qual_type.getAsOpaquePtr());
           return true;
         }
         break;
@@ -3925,20 +3416,20 @@
   return ClangASTContextSupportsLanguage(language);
 }
 
-bool ClangASTContext::GetCXXClassName(const CompilerType &type,
-                                      std::string &class_name) {
-  if (type) {
-    clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
-    if (!qual_type.isNull()) {
-      clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl();
-      if (cxx_record_decl) {
-        class_name.assign(cxx_record_decl->getIdentifier()->getNameStart());
-        return true;
-      }
-    }
-  }
-  class_name.clear();
-  return false;
+Optional<std::string>
+ClangASTContext::GetCXXClassName(const CompilerType &type) {
+  if (!type)
+    return llvm::None;
+
+  clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
+  if (qual_type.isNull())
+    return llvm::None;
+
+  clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl();
+  if (!cxx_record_decl)
+    return llvm::None;
+
+  return std::string(cxx_record_decl->getIdentifier()->getNameStart());
 }
 
 bool ClangASTContext::IsCXXClassType(const CompilerType &type) {
@@ -3961,7 +3452,7 @@
 
 bool ClangASTContext::IsObjCObjectPointerType(const CompilerType &type,
                                               CompilerType *class_type_ptr) {
-  if (!type)
+  if (!ClangUtil::IsClangType(type))
     return false;
 
   clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
@@ -3987,39 +3478,20 @@
   return false;
 }
 
-bool ClangASTContext::GetObjCClassName(const CompilerType &type,
-                                       std::string &class_name) {
-  if (!type)
-    return false;
-
-  clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
-
-  const clang::ObjCObjectType *object_type =
-      llvm::dyn_cast<clang::ObjCObjectType>(qual_type);
-  if (object_type) {
-    const clang::ObjCInterfaceDecl *interface = object_type->getInterface();
-    if (interface) {
-      class_name = interface->getNameAsString();
-      return true;
-    }
-  }
-  return false;
-}
-
 // Type Completion
 
 bool ClangASTContext::GetCompleteType(lldb::opaque_compiler_type_t type) {
   if (!type)
     return false;
   const bool allow_completion = true;
-  return GetCompleteQualType(getASTContext(), GetQualType(type),
+  return GetCompleteQualType(&getASTContext(), GetQualType(type),
                              allow_completion);
 }
 
 ConstString ClangASTContext::GetTypeName(lldb::opaque_compiler_type_t type) {
   std::string type_name;
   if (type) {
-    clang::PrintingPolicy printing_policy(getASTContext()->getPrintingPolicy());
+    clang::PrintingPolicy printing_policy(getASTContext().getPrintingPolicy());
     clang::QualType qual_type(GetQualType(type));
     printing_policy.SuppressTagKeyword = true;
     const clang::TypedefType *typedef_type =
@@ -4043,7 +3515,8 @@
   if (pointee_or_element_clang_type)
     pointee_or_element_clang_type->Clear();
 
-  clang::QualType qual_type(GetQualType(type));
+  clang::QualType qual_type =
+      RemoveWrappingTypes(GetQualType(type), {clang::Type::Typedef});
 
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
@@ -4062,14 +3535,14 @@
     case clang::BuiltinType::ObjCClass:
       if (pointee_or_element_clang_type)
         pointee_or_element_clang_type->SetCompilerType(
-            getASTContext(), getASTContext()->ObjCBuiltinClassTy);
+            this, getASTContext().ObjCBuiltinClassTy.getAsOpaquePtr());
       builtin_type_flags |= eTypeIsPointer | eTypeIsObjC;
       break;
 
     case clang::BuiltinType::ObjCSel:
       if (pointee_or_element_clang_type)
-        pointee_or_element_clang_type->SetCompilerType(getASTContext(),
-                                                       getASTContext()->CharTy);
+        pointee_or_element_clang_type->SetCompilerType(
+            this, getASTContext().CharTy.getAsOpaquePtr());
       builtin_type_flags |= eTypeIsPointer | eTypeIsObjC;
       break;
 
@@ -4112,7 +3585,7 @@
   case clang::Type::BlockPointer:
     if (pointee_or_element_clang_type)
       pointee_or_element_clang_type->SetCompilerType(
-          getASTContext(), qual_type->getPointeeType());
+          this, qual_type->getPointeeType().getAsOpaquePtr());
     return eTypeIsPointer | eTypeHasChildren | eTypeIsBlock;
 
   case clang::Type::Complex: {
@@ -4136,8 +3609,9 @@
   case clang::Type::VariableArray:
     if (pointee_or_element_clang_type)
       pointee_or_element_clang_type->SetCompilerType(
-          getASTContext(), llvm::cast<clang::ArrayType>(qual_type.getTypePtr())
-                               ->getElementType());
+          this, llvm::cast<clang::ArrayType>(qual_type.getTypePtr())
+                    ->getElementType()
+                    .getAsOpaquePtr());
     return eTypeHasChildren | eTypeIsArray;
 
   case clang::Type::DependentName:
@@ -4146,34 +3620,16 @@
     return eTypeHasChildren | eTypeIsVector;
   case clang::Type::DependentTemplateSpecialization:
     return eTypeIsTemplate;
-  case clang::Type::Decltype:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::DecltypeType>(qual_type)->getUnderlyingType())
-        .GetTypeInfo(pointee_or_element_clang_type);
 
   case clang::Type::Enum:
     if (pointee_or_element_clang_type)
       pointee_or_element_clang_type->SetCompilerType(
-          getASTContext(),
-          llvm::cast<clang::EnumType>(qual_type)->getDecl()->getIntegerType());
+          this, llvm::cast<clang::EnumType>(qual_type)
+                    ->getDecl()
+                    ->getIntegerType()
+                    .getAsOpaquePtr());
     return eTypeIsEnumeration | eTypeHasValue;
 
-  case clang::Type::Auto:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-        .GetTypeInfo(pointee_or_element_clang_type);
-  case clang::Type::Elaborated:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-        .GetTypeInfo(pointee_or_element_clang_type);
-  case clang::Type::Paren:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::ParenType>(qual_type)->desugar())
-        .GetTypeInfo(pointee_or_element_clang_type);
-
   case clang::Type::FunctionProto:
     return eTypeIsFuncPrototype | eTypeHasValue;
   case clang::Type::FunctionNoProto:
@@ -4185,9 +3641,9 @@
   case clang::Type::RValueReference:
     if (pointee_or_element_clang_type)
       pointee_or_element_clang_type->SetCompilerType(
-          getASTContext(),
-          llvm::cast<clang::ReferenceType>(qual_type.getTypePtr())
-              ->getPointeeType());
+          this, llvm::cast<clang::ReferenceType>(qual_type.getTypePtr())
+                    ->getPointeeType()
+                    .getAsOpaquePtr());
     return eTypeHasChildren | eTypeIsReference | eTypeHasValue;
 
   case clang::Type::MemberPointer:
@@ -4196,7 +3652,7 @@
   case clang::Type::ObjCObjectPointer:
     if (pointee_or_element_clang_type)
       pointee_or_element_clang_type->SetCompilerType(
-          getASTContext(), qual_type->getPointeeType());
+          this, qual_type->getPointeeType().getAsOpaquePtr());
     return eTypeHasChildren | eTypeIsObjC | eTypeIsClass | eTypeIsPointer |
            eTypeHasValue;
 
@@ -4208,7 +3664,7 @@
   case clang::Type::Pointer:
     if (pointee_or_element_clang_type)
       pointee_or_element_clang_type->SetCompilerType(
-          getASTContext(), qual_type->getPointeeType());
+          this, qual_type->getPointeeType().getAsOpaquePtr());
     return eTypeHasChildren | eTypeIsPointer | eTypeHasValue;
 
   case clang::Type::Record:
@@ -4225,23 +3681,10 @@
     return eTypeIsTemplate;
 
   case clang::Type::Typedef:
-    return eTypeIsTypedef |
-           CompilerType(getASTContext(),
-                        llvm::cast<clang::TypedefType>(qual_type)
-                            ->getDecl()
-                            ->getUnderlyingType())
-               .GetTypeInfo(pointee_or_element_clang_type);
-  case clang::Type::TypeOfExpr:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::TypeOfExprType>(qual_type)
-                            ->getUnderlyingExpr()
-                            ->getType())
-        .GetTypeInfo(pointee_or_element_clang_type);
-  case clang::Type::TypeOf:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::TypeOfType>(qual_type)->getUnderlyingType())
-        .GetTypeInfo(pointee_or_element_clang_type);
+    return eTypeIsTypedef | GetType(llvm::cast<clang::TypedefType>(qual_type)
+                                        ->getDecl()
+                                        ->getUnderlyingType())
+                                .GetTypeInfo(pointee_or_element_clang_type);
   case clang::Type::UnresolvedUsing:
     return 0;
 
@@ -4285,7 +3728,7 @@
     if (pointee_type->isObjCClassType())
       return lldb::eLanguageTypeObjC;
     if (pointee_type.getTypePtr() ==
-        getASTContext()->ObjCBuiltinIdTy.getTypePtr())
+        getASTContext().ObjCBuiltinIdTy.getTypePtr())
       return lldb::eLanguageTypeObjC;
   } else {
     if (qual_type->isObjCObjectOrInterfaceType())
@@ -4339,10 +3782,9 @@
       }
       break;
     case clang::Type::Typedef:
-      return CompilerType(getASTContext(),
-                          llvm::cast<clang::TypedefType>(qual_type)
-                              ->getDecl()
-                              ->getUnderlyingType())
+      return GetType(llvm::cast<clang::TypedefType>(qual_type)
+                         ->getDecl()
+                         ->getUnderlyingType())
           .GetMinimumLanguage();
     }
   }
@@ -4354,9 +3796,18 @@
   if (!type)
     return lldb::eTypeClassInvalid;
 
-  clang::QualType qual_type(GetQualType(type));
+  clang::QualType qual_type =
+      RemoveWrappingTypes(GetQualType(type), {clang::Type::Typedef});
 
   switch (qual_type->getTypeClass()) {
+  case clang::Type::Atomic:
+  case clang::Type::Auto:
+  case clang::Type::Decltype:
+  case clang::Type::Elaborated:
+  case clang::Type::Paren:
+  case clang::Type::TypeOf:
+  case clang::Type::TypeOfExpr:
+    llvm_unreachable("Handled in RemoveWrappingTypes!");
   case clang::Type::UnaryTransform:
     break;
   case clang::Type::FunctionNoProto:
@@ -4419,20 +3870,6 @@
     return lldb::eTypeClassTypedef;
   case clang::Type::UnresolvedUsing:
     break;
-  case clang::Type::Paren:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::ParenType>(qual_type)->desugar())
-        .GetTypeClass();
-  case clang::Type::Auto:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-        .GetTypeClass();
-  case clang::Type::Elaborated:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-        .GetTypeClass();
 
   case clang::Type::Attributed:
     break;
@@ -4451,28 +3888,10 @@
   case clang::Type::PackExpansion:
     break;
 
-  case clang::Type::TypeOfExpr:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::TypeOfExprType>(qual_type)
-                            ->getUnderlyingExpr()
-                            ->getType())
-        .GetTypeClass();
-  case clang::Type::TypeOf:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::TypeOfType>(qual_type)->getUnderlyingType())
-        .GetTypeClass();
-  case clang::Type::Decltype:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::TypeOfType>(qual_type)->getUnderlyingType())
-        .GetTypeClass();
   case clang::Type::TemplateSpecialization:
     break;
   case clang::Type::DeducedTemplateSpecialization:
     break;
-  case clang::Type::Atomic:
-    break;
   case clang::Type::Pipe:
     break;
 
@@ -4505,7 +3924,7 @@
 ClangASTContext::GetArrayElementType(lldb::opaque_compiler_type_t type,
                                      uint64_t *stride) {
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type(GetQualType(type));
 
     const clang::Type *array_eletype =
         qual_type.getTypePtr()->getArrayElementTypeNoTypeQual();
@@ -4513,8 +3932,7 @@
     if (!array_eletype)
       return CompilerType();
 
-    CompilerType element_type(getASTContext(),
-                              array_eletype->getCanonicalTypeUnqualified());
+    CompilerType element_type = GetType(clang::QualType(array_eletype, 0));
 
     // TODO: the real stride will be >= this value.. find the real one!
     if (stride)
@@ -4530,18 +3948,14 @@
                                            uint64_t size) {
   if (type) {
     clang::QualType qual_type(GetCanonicalQualType(type));
-    if (clang::ASTContext *ast_ctx = getASTContext()) {
-      if (size != 0)
-        return CompilerType(
-            ast_ctx, ast_ctx->getConstantArrayType(
-                         qual_type, llvm::APInt(64, size),
-                         clang::ArrayType::ArraySizeModifier::Normal, 0));
-      else
-        return CompilerType(
-            ast_ctx,
-            ast_ctx->getIncompleteArrayType(
-                qual_type, clang::ArrayType::ArraySizeModifier::Normal, 0));
-    }
+    clang::ASTContext &ast_ctx = getASTContext();
+    if (size != 0)
+      return GetType(ast_ctx.getConstantArrayType(
+          qual_type, llvm::APInt(64, size), nullptr,
+          clang::ArrayType::ArraySizeModifier::Normal, 0));
+    else
+      return GetType(ast_ctx.getIncompleteArrayType(
+          qual_type, clang::ArrayType::ArraySizeModifier::Normal, 0));
   }
 
   return CompilerType();
@@ -4550,7 +3964,7 @@
 CompilerType
 ClangASTContext::GetCanonicalType(lldb::opaque_compiler_type_t type) {
   if (type)
-    return CompilerType(getASTContext(), GetCanonicalQualType(type));
+    return GetType(GetCanonicalQualType(type));
   return CompilerType();
 }
 
@@ -4570,9 +3984,8 @@
 CompilerType
 ClangASTContext::GetFullyUnqualifiedType(lldb::opaque_compiler_type_t type) {
   if (type)
-    return CompilerType(
-        getASTContext(),
-        GetFullyUnqualifiedType_Impl(getASTContext(), GetQualType(type)));
+    return GetType(
+        GetFullyUnqualifiedType_Impl(&getASTContext(), GetQualType(type)));
   return CompilerType();
 }
 
@@ -4595,7 +4008,7 @@
     if (func) {
       const uint32_t num_args = func->getNumParams();
       if (idx < num_args)
-        return CompilerType(getASTContext(), func->getParamType(idx));
+        return GetType(func->getParamType(idx));
     }
   }
   return CompilerType();
@@ -4608,7 +4021,7 @@
     const clang::FunctionProtoType *func =
         llvm::dyn_cast<clang::FunctionProtoType>(qual_type.getTypePtr());
     if (func)
-      return CompilerType(getASTContext(), func->getReturnType());
+      return GetType(func->getReturnType());
   }
   return CompilerType();
 }
@@ -4617,10 +4030,10 @@
 ClangASTContext::GetNumMemberFunctions(lldb::opaque_compiler_type_t type) {
   size_t num_functions = 0;
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
     switch (qual_type->getTypeClass()) {
     case clang::Type::Record:
-      if (GetCompleteQualType(getASTContext(), qual_type)) {
+      if (GetCompleteQualType(&getASTContext(), qual_type)) {
         const clang::RecordType *record_type =
             llvm::cast<clang::RecordType>(qual_type.getTypePtr());
         const clang::RecordDecl *record_decl = record_type->getDecl();
@@ -4666,30 +4079,6 @@
       }
       break;
 
-    case clang::Type::Typedef:
-      return CompilerType(getASTContext(),
-                          llvm::cast<clang::TypedefType>(qual_type)
-                              ->getDecl()
-                              ->getUnderlyingType())
-          .GetNumMemberFunctions();
-
-    case clang::Type::Auto:
-      return CompilerType(
-                 getASTContext(),
-                 llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-          .GetNumMemberFunctions();
-
-    case clang::Type::Elaborated:
-      return CompilerType(
-                 getASTContext(),
-                 llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-          .GetNumMemberFunctions();
-
-    case clang::Type::Paren:
-      return CompilerType(getASTContext(),
-                          llvm::cast<clang::ParenType>(qual_type)->desugar())
-          .GetNumMemberFunctions();
-
     default:
       break;
     }
@@ -4705,10 +4094,10 @@
   CompilerType clang_type;
   CompilerDecl clang_decl;
   if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
     switch (qual_type->getTypeClass()) {
     case clang::Type::Record:
-      if (GetCompleteQualType(getASTContext(), qual_type)) {
+      if (GetCompleteQualType(&getASTContext(), qual_type)) {
         const clang::RecordType *record_type =
             llvm::cast<clang::RecordType>(qual_type.getTypePtr());
         const clang::RecordDecl *record_decl = record_type->getDecl();
@@ -4733,8 +4122,7 @@
                 kind = lldb::eMemberFunctionKindDestructor;
               else
                 kind = lldb::eMemberFunctionKindInstanceMethod;
-              clang_type = CompilerType(
-                  this, cxx_method_decl->getType().getAsOpaquePtr());
+              clang_type = GetType(cxx_method_decl->getType());
               clang_decl = CompilerDecl(this, cxx_method_decl);
             }
           }
@@ -4804,31 +4192,6 @@
       }
       break;
 
-    case clang::Type::Typedef:
-      return GetMemberFunctionAtIndex(llvm::cast<clang::TypedefType>(qual_type)
-                                          ->getDecl()
-                                          ->getUnderlyingType()
-                                          .getAsOpaquePtr(),
-                                      idx);
-
-    case clang::Type::Auto:
-      return GetMemberFunctionAtIndex(llvm::cast<clang::AutoType>(qual_type)
-                                          ->getDeducedType()
-                                          .getAsOpaquePtr(),
-                                      idx);
-
-    case clang::Type::Elaborated:
-      return GetMemberFunctionAtIndex(
-          llvm::cast<clang::ElaboratedType>(qual_type)
-              ->getNamedType()
-              .getAsOpaquePtr(),
-          idx);
-
-    case clang::Type::Paren:
-      return GetMemberFunctionAtIndex(
-          llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-          idx);
-
     default:
       break;
     }
@@ -4843,8 +4206,7 @@
 CompilerType
 ClangASTContext::GetNonReferenceType(lldb::opaque_compiler_type_t type) {
   if (type)
-    return CompilerType(getASTContext(),
-                        GetQualType(type).getNonReferenceType());
+    return GetType(GetQualType(type).getNonReferenceType());
   return CompilerType();
 }
 
@@ -4856,25 +4218,25 @@
         llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
     if (!ast)
       return CompilerType();
-    clang::ASTContext *clang_ast = ast->getASTContext();
+    clang::ASTContext &clang_ast = ast->getASTContext();
     clang::QualType qual_type(ClangUtil::GetQualType(type));
 
     clang::DeclContext *decl_ctx =
         ClangASTContext::DeclContextGetAsDeclContext(compiler_decl_ctx);
     if (decl_ctx == nullptr)
-      decl_ctx = ast->getASTContext()->getTranslationUnitDecl();
+      decl_ctx = ast->getASTContext().getTranslationUnitDecl();
 
     clang::TypedefDecl *decl = clang::TypedefDecl::Create(
-        *clang_ast, decl_ctx, clang::SourceLocation(), clang::SourceLocation(),
-        &clang_ast->Idents.get(typedef_name),
-        clang_ast->getTrivialTypeSourceInfo(qual_type));
+        clang_ast, decl_ctx, clang::SourceLocation(), clang::SourceLocation(),
+        &clang_ast.Idents.get(typedef_name),
+        clang_ast.getTrivialTypeSourceInfo(qual_type));
 
     decl->setAccess(clang::AS_public); // TODO respect proper access specifier
 
     decl_ctx->addDecl(decl);
 
     // Get a uniqued clang::QualType for the typedef decl type
-    return CompilerType(clang_ast, clang_ast->getTypedefType(decl));
+    return ast->GetType(clang_ast.getTypedefType(decl));
   }
   return CompilerType();
 }
@@ -4883,8 +4245,7 @@
 ClangASTContext::GetPointeeType(lldb::opaque_compiler_type_t type) {
   if (type) {
     clang::QualType qual_type(GetQualType(type));
-    return CompilerType(getASTContext(),
-                        qual_type.getTypePtr()->getPointeeType());
+    return GetType(qual_type.getTypePtr()->getPointeeType());
   }
   return CompilerType();
 }
@@ -4898,12 +4259,10 @@
     switch (type_class) {
     case clang::Type::ObjCObject:
     case clang::Type::ObjCInterface:
-      return CompilerType(getASTContext(),
-                          getASTContext()->getObjCObjectPointerType(qual_type));
+      return GetType(getASTContext().getObjCObjectPointerType(qual_type));
 
     default:
-      return CompilerType(getASTContext(),
-                          getASTContext()->getPointerType(qual_type));
+      return GetType(getASTContext().getPointerType(qual_type));
     }
   }
   return CompilerType();
@@ -4912,9 +4271,7 @@
 CompilerType
 ClangASTContext::GetLValueReferenceType(lldb::opaque_compiler_type_t type) {
   if (type)
-    return CompilerType(this, getASTContext()
-                                  ->getLValueReferenceType(GetQualType(type))
-                                  .getAsOpaquePtr());
+    return GetType(getASTContext().getLValueReferenceType(GetQualType(type)));
   else
     return CompilerType();
 }
@@ -4922,19 +4279,23 @@
 CompilerType
 ClangASTContext::GetRValueReferenceType(lldb::opaque_compiler_type_t type) {
   if (type)
-    return CompilerType(this, getASTContext()
-                                  ->getRValueReferenceType(GetQualType(type))
-                                  .getAsOpaquePtr());
+    return GetType(getASTContext().getRValueReferenceType(GetQualType(type)));
   else
     return CompilerType();
 }
 
+CompilerType ClangASTContext::GetAtomicType(lldb::opaque_compiler_type_t type) {
+  if (!type)
+    return CompilerType();
+  return GetType(getASTContext().getAtomicType(GetQualType(type)));
+}
+
 CompilerType
 ClangASTContext::AddConstModifier(lldb::opaque_compiler_type_t type) {
   if (type) {
     clang::QualType result(GetQualType(type));
     result.addConst();
-    return CompilerType(this, result.getAsOpaquePtr());
+    return GetType(result);
   }
   return CompilerType();
 }
@@ -4944,7 +4305,7 @@
   if (type) {
     clang::QualType result(GetQualType(type));
     result.addVolatile();
-    return CompilerType(this, result.getAsOpaquePtr());
+    return GetType(result);
   }
   return CompilerType();
 }
@@ -4954,7 +4315,7 @@
   if (type) {
     clang::QualType result(GetQualType(type));
     result.addRestrict();
-    return CompilerType(this, result.getAsOpaquePtr());
+    return GetType(result);
   }
   return CompilerType();
 }
@@ -4964,18 +4325,18 @@
                                const char *typedef_name,
                                const CompilerDeclContext &compiler_decl_ctx) {
   if (type) {
-    clang::ASTContext *clang_ast = getASTContext();
+    clang::ASTContext &clang_ast = getASTContext();
     clang::QualType qual_type(GetQualType(type));
 
     clang::DeclContext *decl_ctx =
         ClangASTContext::DeclContextGetAsDeclContext(compiler_decl_ctx);
     if (decl_ctx == nullptr)
-      decl_ctx = getASTContext()->getTranslationUnitDecl();
+      decl_ctx = getASTContext().getTranslationUnitDecl();
 
     clang::TypedefDecl *decl = clang::TypedefDecl::Create(
-        *clang_ast, decl_ctx, clang::SourceLocation(), clang::SourceLocation(),
-        &clang_ast->Idents.get(typedef_name),
-        clang_ast->getTrivialTypeSourceInfo(qual_type));
+        clang_ast, decl_ctx, clang::SourceLocation(), clang::SourceLocation(),
+        &clang_ast.Idents.get(typedef_name),
+        clang_ast.getTrivialTypeSourceInfo(qual_type));
 
     clang::TagDecl *tdecl = nullptr;
     if (!qual_type.isNull()) {
@@ -4994,7 +4355,7 @@
     decl->setAccess(clang::AS_public); // TODO respect proper access specifier
 
     // Get a uniqued clang::QualType for the typedef decl type
-    return CompilerType(this, clang_ast->getTypedefType(decl).getAsOpaquePtr());
+    return GetType(clang_ast.getTypedefType(decl));
   }
   return CompilerType();
 }
@@ -5005,8 +4366,7 @@
     const clang::TypedefType *typedef_type =
         llvm::dyn_cast<clang::TypedefType>(GetQualType(type));
     if (typedef_type)
-      return CompilerType(getASTContext(),
-                          typedef_type->getDecl()->getUnderlyingType());
+      return GetType(typedef_type->getDecl()->getUnderlyingType());
   }
   return CompilerType();
 }
@@ -5014,10 +4374,25 @@
 // Create related types using the current type's AST
 
 CompilerType ClangASTContext::GetBasicTypeFromAST(lldb::BasicType basic_type) {
-  return ClangASTContext::GetBasicType(getASTContext(), basic_type);
+  return ClangASTContext::GetBasicType(basic_type);
 }
 // Exploring the type
 
+const llvm::fltSemantics &
+ClangASTContext::GetFloatTypeSemantics(size_t byte_size) {
+  clang::ASTContext &ast = getASTContext();
+  const size_t bit_size = byte_size * 8;
+  if (bit_size == ast.getTypeSize(ast.FloatTy))
+    return ast.getFloatTypeSemantics(ast.FloatTy);
+  else if (bit_size == ast.getTypeSize(ast.DoubleTy))
+    return ast.getFloatTypeSemantics(ast.DoubleTy);
+  else if (bit_size == ast.getTypeSize(ast.LongDoubleTy))
+    return ast.getFloatTypeSemantics(ast.LongDoubleTy);
+  else if (bit_size == ast.getTypeSize(ast.HalfTy))
+    return ast.getFloatTypeSemantics(ast.HalfTy);
+  return llvm::APFloatBase::Bogus();
+}
+
 Optional<uint64_t>
 ClangASTContext::GetBitSize(lldb::opaque_compiler_type_t type,
                             ExecutionContextScope *exe_scope) {
@@ -5027,7 +4402,7 @@
     switch (type_class) {
     case clang::Type::Record:
       if (GetCompleteType(type))
-        return getASTContext()->getTypeSize(qual_type);
+        return getASTContext().getTypeSize(qual_type);
       else
         return None;
       break;
@@ -5040,8 +4415,7 @@
         ObjCLanguageRuntime *objc_runtime = ObjCLanguageRuntime::Get(*process);
         if (objc_runtime) {
           uint64_t bit_size = 0;
-          if (objc_runtime->GetTypeBitSize(
-                  CompilerType(getASTContext(), qual_type), bit_size))
+          if (objc_runtime->GetTypeBitSize(GetType(qual_type), bit_size))
             return bit_size;
         }
       } else {
@@ -5063,17 +4437,16 @@
     }
       LLVM_FALLTHROUGH;
     default:
-      const uint32_t bit_size = getASTContext()->getTypeSize(qual_type);
+      const uint32_t bit_size = getASTContext().getTypeSize(qual_type);
       if (bit_size == 0) {
         if (qual_type->isIncompleteArrayType())
-          return getASTContext()->getTypeSize(
+          return getASTContext().getTypeSize(
               qual_type->getArrayElementTypeNoTypeQual()
                   ->getCanonicalTypeUnqualified());
       }
       if (qual_type->isObjCObjectOrInterfaceType())
         return bit_size +
-               getASTContext()->getTypeSize(
-                   getASTContext()->ObjCBuiltinClassTy);
+               getASTContext().getTypeSize(getASTContext().ObjCBuiltinClassTy);
       // Function types actually have a size of 0, that's not an error.
       if (qual_type->isFunctionProtoType())
         return bit_size;
@@ -5084,10 +4457,12 @@
   return None;
 }
 
-size_t ClangASTContext::GetTypeBitAlign(lldb::opaque_compiler_type_t type) {
+llvm::Optional<size_t>
+ClangASTContext::GetTypeBitAlign(lldb::opaque_compiler_type_t type,
+                                 ExecutionContextScope *exe_scope) {
   if (GetCompleteType(type))
-    return getASTContext()->getTypeAlign(GetQualType(type));
-  return 0;
+    return getASTContext().getTypeAlign(GetQualType(type));
+  return {};
 }
 
 lldb::Encoding ClangASTContext::GetEncoding(lldb::opaque_compiler_type_t type,
@@ -5096,9 +4471,19 @@
     return lldb::eEncodingInvalid;
 
   count = 1;
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
 
   switch (qual_type->getTypeClass()) {
+  case clang::Type::Atomic:
+  case clang::Type::Auto:
+  case clang::Type::Decltype:
+  case clang::Type::Elaborated:
+  case clang::Type::Paren:
+  case clang::Type::Typedef:
+  case clang::Type::TypeOf:
+  case clang::Type::TypeOfExpr:
+    llvm_unreachable("Handled in RemoveWrappingTypes!");
+
   case clang::Type::UnaryTransform:
     break;
 
@@ -5255,6 +4640,20 @@
     case clang::BuiltinType::OCLIntelSubgroupAVCImeSingleRefStreamin:
     case clang::BuiltinType::OCLIntelSubgroupAVCImeDualRefStreamin:
       break;
+
+    case clang::BuiltinType::SveBool:
+    case clang::BuiltinType::SveInt8:
+    case clang::BuiltinType::SveInt16:
+    case clang::BuiltinType::SveInt32:
+    case clang::BuiltinType::SveInt64:
+    case clang::BuiltinType::SveUint8:
+    case clang::BuiltinType::SveUint16:
+    case clang::BuiltinType::SveUint32:
+    case clang::BuiltinType::SveUint64:
+    case clang::BuiltinType::SveFloat16:
+    case clang::BuiltinType::SveFloat32:
+    case clang::BuiltinType::SveFloat64:
+      break;
     }
     break;
   // All pointer types are represented as unsigned integer encodings. We may
@@ -5274,8 +4673,7 @@
       const clang::ComplexType *complex_type =
           qual_type->getAsComplexIntegerType();
       if (complex_type)
-        encoding = CompilerType(getASTContext(), complex_type->getElementType())
-                       .GetEncoding(count);
+        encoding = GetType(complex_type->getElementType()).GetEncoding(count);
       else
         encoding = lldb::eEncodingSint;
     }
@@ -5289,45 +4687,6 @@
     break;
   case clang::Type::Enum:
     return lldb::eEncodingSint;
-  case clang::Type::Typedef:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::TypedefType>(qual_type)
-                            ->getDecl()
-                            ->getUnderlyingType())
-        .GetEncoding(count);
-
-  case clang::Type::Auto:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-        .GetEncoding(count);
-
-  case clang::Type::Elaborated:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-        .GetEncoding(count);
-
-  case clang::Type::Paren:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::ParenType>(qual_type)->desugar())
-        .GetEncoding(count);
-  case clang::Type::TypeOfExpr:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::TypeOfExprType>(qual_type)
-                            ->getUnderlyingExpr()
-                            ->getType())
-        .GetEncoding(count);
-  case clang::Type::TypeOf:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::TypeOfType>(qual_type)->getUnderlyingType())
-        .GetEncoding(count);
-  case clang::Type::Decltype:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::DecltypeType>(qual_type)->getUnderlyingType())
-        .GetEncoding(count);
   case clang::Type::DependentSizedArray:
   case clang::Type::DependentSizedExtVector:
   case clang::Type::UnresolvedUsing:
@@ -5343,7 +4702,6 @@
 
   case clang::Type::TemplateSpecialization:
   case clang::Type::DeducedTemplateSpecialization:
-  case clang::Type::Atomic:
   case clang::Type::Adjusted:
   case clang::Type::Pipe:
     break;
@@ -5367,9 +4725,18 @@
   if (!type)
     return lldb::eFormatDefault;
 
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
 
   switch (qual_type->getTypeClass()) {
+  case clang::Type::Atomic:
+  case clang::Type::Auto:
+  case clang::Type::Decltype:
+  case clang::Type::Elaborated:
+  case clang::Type::Paren:
+  case clang::Type::Typedef:
+  case clang::Type::TypeOf:
+  case clang::Type::TypeOfExpr:
+    llvm_unreachable("Handled in RemoveWrappingTypes!");
   case clang::Type::UnaryTransform:
     break;
 
@@ -5462,41 +4829,6 @@
     break;
   case clang::Type::Enum:
     return lldb::eFormatEnum;
-  case clang::Type::Typedef:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::TypedefType>(qual_type)
-                            ->getDecl()
-                            ->getUnderlyingType())
-        .GetFormat();
-  case clang::Type::Auto:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::AutoType>(qual_type)->desugar())
-        .GetFormat();
-  case clang::Type::Paren:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::ParenType>(qual_type)->desugar())
-        .GetFormat();
-  case clang::Type::Elaborated:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-        .GetFormat();
-  case clang::Type::TypeOfExpr:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::TypeOfExprType>(qual_type)
-                            ->getUnderlyingExpr()
-                            ->getType())
-        .GetFormat();
-  case clang::Type::TypeOf:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::TypeOfType>(qual_type)->getUnderlyingType())
-        .GetFormat();
-  case clang::Type::Decltype:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::DecltypeType>(qual_type)->getUnderlyingType())
-        .GetFormat();
   case clang::Type::DependentSizedArray:
   case clang::Type::DependentSizedExtVector:
   case clang::Type::UnresolvedUsing:
@@ -5512,7 +4844,6 @@
 
   case clang::Type::TemplateSpecialization:
   case clang::Type::DeducedTemplateSpecialization:
-  case clang::Type::Atomic:
   case clang::Type::Adjusted:
   case clang::Type::Pipe:
     break;
@@ -5551,7 +4882,7 @@
                     clang::QualType qual_type,
                     const ExecutionContext *exe_ctx) {
   if (qual_type->isIncompleteArrayType())
-    if (auto *metadata = ast.GetMetadata(qual_type.getAsOpaquePtr()))
+    if (auto *metadata = ast.GetMetadata(qual_type.getTypePtr()))
       return sym_file->GetDynamicArrayInfoForUID(metadata->GetUserID(),
                                                  exe_ctx);
   return llvm::None;
@@ -5564,7 +4895,7 @@
     return 0;
 
   uint32_t num_children = 0;
-  clang::QualType qual_type(GetQualType(type));
+  clang::QualType qual_type(RemoveWrappingTypes(GetQualType(type)));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Builtin:
@@ -5582,7 +4913,7 @@
   case clang::Type::Complex:
     return 0;
   case clang::Type::Record:
-    if (GetCompleteQualType(getASTContext(), qual_type)) {
+    if (GetCompleteQualType(&getASTContext(), qual_type)) {
       const clang::RecordType *record_type =
           llvm::cast<clang::RecordType>(qual_type.getTypePtr());
       const clang::RecordDecl *record_decl = record_type->getDecl();
@@ -5626,7 +4957,7 @@
 
   case clang::Type::ObjCObject:
   case clang::Type::ObjCInterface:
-    if (GetCompleteQualType(getASTContext(), qual_type)) {
+    if (GetCompleteQualType(&getASTContext(), qual_type)) {
       const clang::ObjCObjectType *objc_class_type =
           llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
       assert(objc_class_type);
@@ -5657,8 +4988,7 @@
         llvm::cast<clang::ObjCObjectPointerType>(qual_type.getTypePtr());
     clang::QualType pointee_type = pointer_type->getPointeeType();
     uint32_t num_pointee_children =
-        CompilerType(getASTContext(), pointee_type)
-            .GetNumChildren(omit_empty_base_classes, exe_ctx);
+        GetType(pointee_type).GetNumChildren(omit_empty_base_classes, exe_ctx);
     // If this type points to a simple type, then it has 1 child
     if (num_pointee_children == 0)
       num_children = 1;
@@ -5691,8 +5021,7 @@
         llvm::cast<clang::PointerType>(qual_type.getTypePtr());
     clang::QualType pointee_type(pointer_type->getPointeeType());
     uint32_t num_pointee_children =
-        CompilerType(getASTContext(), pointee_type)
-      .GetNumChildren(omit_empty_base_classes, exe_ctx);
+        GetType(pointee_type).GetNumChildren(omit_empty_base_classes, exe_ctx);
     if (num_pointee_children == 0) {
       // We have a pointer to a pointee type that claims it has no children. We
       // will want to look at
@@ -5707,8 +5036,7 @@
         llvm::cast<clang::ReferenceType>(qual_type.getTypePtr());
     clang::QualType pointee_type = reference_type->getPointeeType();
     uint32_t num_pointee_children =
-        CompilerType(getASTContext(), pointee_type)
-            .GetNumChildren(omit_empty_base_classes, exe_ctx);
+        GetType(pointee_type).GetNumChildren(omit_empty_base_classes, exe_ctx);
     // If this type points to a simple type, then it has 1 child
     if (num_pointee_children == 0)
       num_children = 1;
@@ -5716,35 +5044,6 @@
       num_children = num_pointee_children;
   } break;
 
-  case clang::Type::Typedef:
-    num_children =
-        CompilerType(getASTContext(), llvm::cast<clang::TypedefType>(qual_type)
-                                          ->getDecl()
-                                          ->getUnderlyingType())
-            .GetNumChildren(omit_empty_base_classes, exe_ctx);
-    break;
-
-  case clang::Type::Auto:
-    num_children =
-        CompilerType(getASTContext(),
-                     llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-            .GetNumChildren(omit_empty_base_classes, exe_ctx);
-    break;
-
-  case clang::Type::Elaborated:
-    num_children =
-        CompilerType(
-            getASTContext(),
-            llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-            .GetNumChildren(omit_empty_base_classes, exe_ctx);
-    break;
-
-  case clang::Type::Paren:
-    num_children =
-        CompilerType(getASTContext(),
-                     llvm::cast<clang::ParenType>(qual_type)->desugar())
-            .GetNumChildren(omit_empty_base_classes, exe_ctx);
-    break;
   default:
     break;
   }
@@ -5838,8 +5137,7 @@
   if (enum_type) {
     const clang::EnumDecl *enum_decl = enum_type->getDecl();
     if (enum_decl) {
-      CompilerType integer_type(this,
-                                enum_decl->getIntegerType().getAsOpaquePtr());
+      CompilerType integer_type = GetType(enum_decl->getIntegerType());
 
       clang::EnumDecl::enumerator_iterator enum_pos, enum_end_pos;
       for (enum_pos = enum_decl->enumerator_begin(),
@@ -5860,7 +5158,7 @@
     return 0;
 
   uint32_t count = 0;
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Record:
@@ -5882,34 +5180,6 @@
     }
     break;
 
-  case clang::Type::Typedef:
-    count =
-        CompilerType(getASTContext(), llvm::cast<clang::TypedefType>(qual_type)
-                                          ->getDecl()
-                                          ->getUnderlyingType())
-            .GetNumFields();
-    break;
-
-  case clang::Type::Auto:
-    count =
-        CompilerType(getASTContext(),
-                     llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-            .GetNumFields();
-    break;
-
-  case clang::Type::Elaborated:
-    count = CompilerType(
-                getASTContext(),
-                llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-                .GetNumFields();
-    break;
-
-  case clang::Type::Paren:
-    count = CompilerType(getASTContext(),
-                         llvm::cast<clang::ParenType>(qual_type)->desugar())
-                .GetNumFields();
-    break;
-
   case clang::Type::ObjCObjectPointer: {
     const clang::ObjCObjectPointerType *objc_class_type =
         qual_type->getAs<clang::ObjCObjectPointerType>();
@@ -6008,7 +5278,7 @@
   if (!type)
     return CompilerType();
 
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Record:
@@ -6030,7 +5300,7 @@
           // alignment (field_type_info.second) from the AST context.
           if (bit_offset_ptr) {
             const clang::ASTRecordLayout &record_layout =
-                getASTContext()->getASTRecordLayout(record_decl);
+                getASTContext().getASTRecordLayout(record_decl);
             *bit_offset_ptr = record_layout.getFieldOffset(field_idx);
           }
 
@@ -6044,7 +5314,7 @@
               clang::Expr::EvalResult result;
               if (bitfield_bit_size_expr &&
                   bitfield_bit_size_expr->EvaluateAsInt(result,
-                                                        *getASTContext())) {
+                                                        getASTContext())) {
                 llvm::APSInt bitfield_apsint = result.Val.getInt();
                 *bitfield_bit_size_ptr = bitfield_apsint.getLimitedValue();
               }
@@ -6053,7 +5323,7 @@
           if (is_bitfield_ptr)
             *is_bitfield_ptr = is_bitfield;
 
-          return CompilerType(getASTContext(), field->getType());
+          return GetType(field->getType());
         }
       }
     }
@@ -6071,7 +5341,7 @@
           objc_interface_type->getDecl();
       if (class_interface_decl) {
         return CompilerType(
-            this, GetObjCFieldAtIndex(getASTContext(), class_interface_decl,
+            this, GetObjCFieldAtIndex(&getASTContext(), class_interface_decl,
                                       idx, name, bit_offset_ptr,
                                       bitfield_bit_size_ptr, is_bitfield_ptr));
       }
@@ -6089,41 +5359,13 @@
         clang::ObjCInterfaceDecl *class_interface_decl =
             objc_class_type->getInterface();
         return CompilerType(
-            this, GetObjCFieldAtIndex(getASTContext(), class_interface_decl,
+            this, GetObjCFieldAtIndex(&getASTContext(), class_interface_decl,
                                       idx, name, bit_offset_ptr,
                                       bitfield_bit_size_ptr, is_bitfield_ptr));
       }
     }
     break;
 
-  case clang::Type::Typedef:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::TypedefType>(qual_type)
-                            ->getDecl()
-                            ->getUnderlyingType())
-        .GetFieldAtIndex(idx, name, bit_offset_ptr, bitfield_bit_size_ptr,
-                         is_bitfield_ptr);
-
-  case clang::Type::Auto:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-        .GetFieldAtIndex(idx, name, bit_offset_ptr, bitfield_bit_size_ptr,
-                         is_bitfield_ptr);
-
-  case clang::Type::Elaborated:
-    return CompilerType(
-               getASTContext(),
-               llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-        .GetFieldAtIndex(idx, name, bit_offset_ptr, bitfield_bit_size_ptr,
-                         is_bitfield_ptr);
-
-  case clang::Type::Paren:
-    return CompilerType(getASTContext(),
-                        llvm::cast<clang::ParenType>(qual_type)->desugar())
-        .GetFieldAtIndex(idx, name, bit_offset_ptr, bitfield_bit_size_ptr,
-                         is_bitfield_ptr);
-
   default:
     break;
   }
@@ -6133,7 +5375,7 @@
 uint32_t
 ClangASTContext::GetNumDirectBaseClasses(lldb::opaque_compiler_type_t type) {
   uint32_t count = 0;
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Record:
@@ -6176,29 +5418,6 @@
     }
     break;
 
-  case clang::Type::Typedef:
-    count = GetNumDirectBaseClasses(llvm::cast<clang::TypedefType>(qual_type)
-                                        ->getDecl()
-                                        ->getUnderlyingType()
-                                        .getAsOpaquePtr());
-    break;
-
-  case clang::Type::Auto:
-    count = GetNumDirectBaseClasses(llvm::cast<clang::AutoType>(qual_type)
-                                        ->getDeducedType()
-                                        .getAsOpaquePtr());
-    break;
-
-  case clang::Type::Elaborated:
-    count = GetNumDirectBaseClasses(llvm::cast<clang::ElaboratedType>(qual_type)
-                                        ->getNamedType()
-                                        .getAsOpaquePtr());
-    break;
-
-  case clang::Type::Paren:
-    return GetNumDirectBaseClasses(
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr());
-
   default:
     break;
   }
@@ -6208,7 +5427,7 @@
 uint32_t
 ClangASTContext::GetNumVirtualBaseClasses(lldb::opaque_compiler_type_t type) {
   uint32_t count = 0;
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Record:
@@ -6220,31 +5439,6 @@
     }
     break;
 
-  case clang::Type::Typedef:
-    count = GetNumVirtualBaseClasses(llvm::cast<clang::TypedefType>(qual_type)
-                                         ->getDecl()
-                                         ->getUnderlyingType()
-                                         .getAsOpaquePtr());
-    break;
-
-  case clang::Type::Auto:
-    count = GetNumVirtualBaseClasses(llvm::cast<clang::AutoType>(qual_type)
-                                         ->getDeducedType()
-                                         .getAsOpaquePtr());
-    break;
-
-  case clang::Type::Elaborated:
-    count =
-        GetNumVirtualBaseClasses(llvm::cast<clang::ElaboratedType>(qual_type)
-                                     ->getNamedType()
-                                     .getAsOpaquePtr());
-    break;
-
-  case clang::Type::Paren:
-    count = GetNumVirtualBaseClasses(
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr());
-    break;
-
   default:
     break;
   }
@@ -6253,7 +5447,7 @@
 
 CompilerType ClangASTContext::GetDirectBaseClassAtIndex(
     lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) {
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Record:
@@ -6270,7 +5464,7 @@
           if (curr_idx == idx) {
             if (bit_offset_ptr) {
               const clang::ASTRecordLayout &record_layout =
-                  getASTContext()->getASTRecordLayout(cxx_record_decl);
+                  getASTContext().getASTRecordLayout(cxx_record_decl);
               const clang::CXXRecordDecl *base_class_decl =
                   llvm::cast<clang::CXXRecordDecl>(
                       base_class->getType()
@@ -6287,7 +5481,7 @@
                         .getQuantity() *
                     8;
             }
-            return CompilerType(this, base_class->getType().getAsOpaquePtr());
+            return GetType(base_class->getType());
           }
         }
       }
@@ -6311,9 +5505,8 @@
           if (superclass_interface_decl) {
             if (bit_offset_ptr)
               *bit_offset_ptr = 0;
-            return CompilerType(getASTContext(),
-                                getASTContext()->getObjCInterfaceType(
-                                    superclass_interface_decl));
+            return GetType(getASTContext().getObjCInterfaceType(
+                superclass_interface_decl));
           }
         }
       }
@@ -6333,40 +5526,14 @@
           if (superclass_interface_decl) {
             if (bit_offset_ptr)
               *bit_offset_ptr = 0;
-            return CompilerType(getASTContext(),
-                                getASTContext()->getObjCInterfaceType(
-                                    superclass_interface_decl));
+            return GetType(getASTContext().getObjCInterfaceType(
+                superclass_interface_decl));
           }
         }
       }
     }
     break;
 
-  case clang::Type::Typedef:
-    return GetDirectBaseClassAtIndex(llvm::cast<clang::TypedefType>(qual_type)
-                                         ->getDecl()
-                                         ->getUnderlyingType()
-                                         .getAsOpaquePtr(),
-                                     idx, bit_offset_ptr);
-
-  case clang::Type::Auto:
-    return GetDirectBaseClassAtIndex(llvm::cast<clang::AutoType>(qual_type)
-                                         ->getDeducedType()
-                                         .getAsOpaquePtr(),
-                                     idx, bit_offset_ptr);
-
-  case clang::Type::Elaborated:
-    return GetDirectBaseClassAtIndex(
-        llvm::cast<clang::ElaboratedType>(qual_type)
-            ->getNamedType()
-            .getAsOpaquePtr(),
-        idx, bit_offset_ptr);
-
-  case clang::Type::Paren:
-    return GetDirectBaseClassAtIndex(
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-        idx, bit_offset_ptr);
-
   default:
     break;
   }
@@ -6375,7 +5542,7 @@
 
 CompilerType ClangASTContext::GetVirtualBaseClassAtIndex(
     lldb::opaque_compiler_type_t type, size_t idx, uint32_t *bit_offset_ptr) {
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Record:
@@ -6392,7 +5559,7 @@
           if (curr_idx == idx) {
             if (bit_offset_ptr) {
               const clang::ASTRecordLayout &record_layout =
-                  getASTContext()->getASTRecordLayout(cxx_record_decl);
+                  getASTContext().getASTRecordLayout(cxx_record_decl);
               const clang::CXXRecordDecl *base_class_decl =
                   llvm::cast<clang::CXXRecordDecl>(
                       base_class->getType()
@@ -6403,38 +5570,13 @@
                       .getQuantity() *
                   8;
             }
-            return CompilerType(this, base_class->getType().getAsOpaquePtr());
+            return GetType(base_class->getType());
           }
         }
       }
     }
     break;
 
-  case clang::Type::Typedef:
-    return GetVirtualBaseClassAtIndex(llvm::cast<clang::TypedefType>(qual_type)
-                                          ->getDecl()
-                                          ->getUnderlyingType()
-                                          .getAsOpaquePtr(),
-                                      idx, bit_offset_ptr);
-
-  case clang::Type::Auto:
-    return GetVirtualBaseClassAtIndex(llvm::cast<clang::AutoType>(qual_type)
-                                          ->getDeducedType()
-                                          .getAsOpaquePtr(),
-                                      idx, bit_offset_ptr);
-
-  case clang::Type::Elaborated:
-    return GetVirtualBaseClassAtIndex(
-        llvm::cast<clang::ElaboratedType>(qual_type)
-            ->getNamedType()
-            .getAsOpaquePtr(),
-        idx, bit_offset_ptr);
-
-  case clang::Type::Paren:
-    return GetVirtualBaseClassAtIndex(
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-        idx, bit_offset_ptr);
-
   default:
     break;
   }
@@ -6450,7 +5592,7 @@
   if (type.isNull())
     return 0;
 
-  clang::QualType qual_type(type.getCanonicalType());
+  clang::QualType qual_type = RemoveWrappingTypes(type.getCanonicalType());
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Builtin:
@@ -6551,29 +5693,6 @@
     return 0; // When we function pointers, they have no children...
   case clang::Type::UnresolvedUsing:
     return 0;
-  case clang::Type::Paren:
-    return GetNumPointeeChildren(
-        llvm::cast<clang::ParenType>(qual_type)->desugar());
-  case clang::Type::Typedef:
-    return GetNumPointeeChildren(llvm::cast<clang::TypedefType>(qual_type)
-                                     ->getDecl()
-                                     ->getUnderlyingType());
-  case clang::Type::Auto:
-    return GetNumPointeeChildren(
-        llvm::cast<clang::AutoType>(qual_type)->getDeducedType());
-  case clang::Type::Elaborated:
-    return GetNumPointeeChildren(
-        llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType());
-  case clang::Type::TypeOfExpr:
-    return GetNumPointeeChildren(llvm::cast<clang::TypeOfExprType>(qual_type)
-                                     ->getUnderlyingExpr()
-                                     ->getType());
-  case clang::Type::TypeOf:
-    return GetNumPointeeChildren(
-        llvm::cast<clang::TypeOfType>(qual_type)->getUnderlyingType());
-  case clang::Type::Decltype:
-    return GetNumPointeeChildren(
-        llvm::cast<clang::DecltypeType>(qual_type)->getUnderlyingType());
   case clang::Type::Record:
     return 0;
   case clang::Type::Enum:
@@ -6617,7 +5736,8 @@
     return exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr;
   };
 
-  clang::QualType parent_qual_type(GetCanonicalQualType(type));
+  clang::QualType parent_qual_type(
+      RemoveWrappingTypes(GetCanonicalQualType(type)));
   const clang::Type::TypeClass parent_type_class =
       parent_qual_type->getTypeClass();
   child_bitfield_bit_size = 0;
@@ -6636,10 +5756,9 @@
       case clang::BuiltinType::ObjCClass:
         child_name = "isa";
         child_byte_size =
-            getASTContext()->getTypeSize(getASTContext()->ObjCBuiltinClassTy) /
+            getASTContext().getTypeSize(getASTContext().ObjCBuiltinClassTy) /
             CHAR_BIT;
-        return CompilerType(getASTContext(),
-                            getASTContext()->ObjCBuiltinClassTy);
+        return GetType(getASTContext().ObjCBuiltinClassTy);
 
       default:
         break;
@@ -6654,7 +5773,7 @@
       const clang::RecordDecl *record_decl = record_type->getDecl();
       assert(record_decl);
       const clang::ASTRecordLayout &record_layout =
-          getASTContext()->getASTRecordLayout(record_decl);
+          getASTContext().getASTRecordLayout(record_decl);
       uint32_t child_idx = 0;
 
       const clang::CXXRecordDecl *cxx_record_decl =
@@ -6685,7 +5804,7 @@
               bool handled = false;
               if (valobj) {
                 clang::VTableContextBase *vtable_ctx =
-                    getASTContext()->getVTableContext();
+                    getASTContext().getVTableContext();
                 if (vtable_ctx)
                   handled = GetVBaseBitOffset(*vtable_ctx, *valobj,
                                               record_layout, cxx_record_decl,
@@ -6702,8 +5821,7 @@
 
             // Base classes should be a multiple of 8 bits in size
             child_byte_offset = bit_offset / 8;
-            CompilerType base_class_clang_type(getASTContext(),
-                                               base_class->getType());
+            CompilerType base_class_clang_type = GetType(base_class->getType());
             child_name = base_class_clang_type.GetTypeName().AsCString("");
             Optional<uint64_t> size =
                 base_class_clang_type.GetBitSize(get_exe_scope());
@@ -6735,7 +5853,7 @@
 
           // Figure out the type byte size (field_type_info.first) and
           // alignment (field_type_info.second) from the AST context.
-          CompilerType field_clang_type(getASTContext(), field->getType());
+          CompilerType field_clang_type = GetType(field->getType());
           assert(field_idx < record_layout.getFieldCount());
           Optional<uint64_t> size =
               field_clang_type.GetByteSize(get_exe_scope());
@@ -6747,8 +5865,7 @@
           // Figure out the field offset within the current struct/union/class
           // type
           bit_offset = record_layout.getFieldOffset(field_idx);
-          if (ClangASTContext::FieldIsBitfield(getASTContext(), *field,
-                                               child_bitfield_bit_size)) {
+          if (FieldIsBitfield(*field, child_bitfield_bit_size)) {
             child_bitfield_bit_offset = bit_offset % child_bit_size;
             const uint32_t child_bit_offset =
                 bit_offset - child_bitfield_bit_offset;
@@ -6777,32 +5894,32 @@
         if (class_interface_decl) {
 
           const clang::ASTRecordLayout &interface_layout =
-              getASTContext()->getASTObjCInterfaceLayout(class_interface_decl);
+              getASTContext().getASTObjCInterfaceLayout(class_interface_decl);
           clang::ObjCInterfaceDecl *superclass_interface_decl =
               class_interface_decl->getSuperClass();
           if (superclass_interface_decl) {
             if (omit_empty_base_classes) {
-              CompilerType base_class_clang_type(
-                  getASTContext(), getASTContext()->getObjCInterfaceType(
-                                       superclass_interface_decl));
+              CompilerType base_class_clang_type =
+                  GetType(getASTContext().getObjCInterfaceType(
+                      superclass_interface_decl));
               if (base_class_clang_type.GetNumChildren(omit_empty_base_classes,
                                                        exe_ctx) > 0) {
                 if (idx == 0) {
                   clang::QualType ivar_qual_type(
-                      getASTContext()->getObjCInterfaceType(
+                      getASTContext().getObjCInterfaceType(
                           superclass_interface_decl));
 
                   child_name.assign(
                       superclass_interface_decl->getNameAsString());
 
                   clang::TypeInfo ivar_type_info =
-                      getASTContext()->getTypeInfo(ivar_qual_type.getTypePtr());
+                      getASTContext().getTypeInfo(ivar_qual_type.getTypePtr());
 
                   child_byte_size = ivar_type_info.Width / 8;
                   child_byte_offset = 0;
                   child_is_base_class = true;
 
-                  return CompilerType(getASTContext(), ivar_qual_type);
+                  return GetType(ivar_qual_type);
                 }
 
                 ++child_idx;
@@ -6827,7 +5944,7 @@
                 child_name.assign(ivar_decl->getNameAsString());
 
                 clang::TypeInfo ivar_type_info =
-                    getASTContext()->getTypeInfo(ivar_qual_type.getTypePtr());
+                    getASTContext().getTypeInfo(ivar_qual_type.getTypePtr());
 
                 child_byte_size = ivar_type_info.Width / 8;
 
@@ -6846,8 +5963,7 @@
                   ObjCLanguageRuntime *objc_runtime =
                       ObjCLanguageRuntime::Get(*process);
                   if (objc_runtime != nullptr) {
-                    CompilerType parent_ast_type(getASTContext(),
-                                                 parent_qual_type);
+                    CompilerType parent_ast_type = GetType(parent_qual_type);
                     child_byte_offset = objc_runtime->GetByteOffsetForIvar(
                         parent_ast_type, ivar_decl->getNameAsString().c_str());
                   }
@@ -6870,15 +5986,14 @@
                 // offset from, we still need to get the bit offset for
                 // bitfields from the layout.
 
-                if (ClangASTContext::FieldIsBitfield(getASTContext(), ivar_decl,
-                                                     child_bitfield_bit_size)) {
+                if (FieldIsBitfield(ivar_decl, child_bitfield_bit_size)) {
                   if (bit_offset == INT32_MAX)
                     bit_offset = interface_layout.getFieldOffset(
                         child_idx - superclass_idx);
 
                   child_bitfield_bit_offset = bit_offset % 8;
                 }
-                return CompilerType(getASTContext(), ivar_qual_type);
+                return GetType(ivar_qual_type);
               }
               ++child_idx;
             }
@@ -6929,7 +6044,7 @@
       const clang::VectorType *array =
           llvm::cast<clang::VectorType>(parent_qual_type.getTypePtr());
       if (array) {
-        CompilerType element_type(getASTContext(), array->getElementType());
+        CompilerType element_type = GetType(array->getElementType());
         if (element_type.GetCompleteType()) {
           char element_name[64];
           ::snprintf(element_name, sizeof(element_name), "[%" PRIu64 "]",
@@ -6951,7 +6066,7 @@
     if (ignore_array_bounds || idx_is_valid) {
       const clang::ArrayType *array = GetQualType(type)->getAsArrayTypeUnsafe();
       if (array) {
-        CompilerType element_type(getASTContext(), array->getElementType());
+        CompilerType element_type = GetType(array->getElementType());
         if (element_type.GetCompleteType()) {
           child_name = llvm::formatv("[{0}]", idx);
           if (Optional<uint64_t> size =
@@ -7009,8 +6124,8 @@
     if (idx_is_valid) {
       const clang::ReferenceType *reference_type =
           llvm::cast<clang::ReferenceType>(parent_qual_type.getTypePtr());
-      CompilerType pointee_clang_type(getASTContext(),
-                                      reference_type->getPointeeType());
+      CompilerType pointee_clang_type =
+          GetType(reference_type->getPointeeType());
       if (transparent_pointers && pointee_clang_type.IsAggregateType()) {
         child_is_deref_of_parent = false;
         bool tmp_child_is_deref_of_parent = false;
@@ -7041,51 +6156,6 @@
     }
     break;
 
-  case clang::Type::Typedef: {
-    CompilerType typedefed_clang_type(
-        getASTContext(), llvm::cast<clang::TypedefType>(parent_qual_type)
-                             ->getDecl()
-                             ->getUnderlyingType());
-    return typedefed_clang_type.GetChildCompilerTypeAtIndex(
-        exe_ctx, idx, transparent_pointers, omit_empty_base_classes,
-        ignore_array_bounds, child_name, child_byte_size, child_byte_offset,
-        child_bitfield_bit_size, child_bitfield_bit_offset, child_is_base_class,
-        child_is_deref_of_parent, valobj, language_flags);
-  } break;
-
-  case clang::Type::Auto: {
-    CompilerType elaborated_clang_type(
-        getASTContext(),
-        llvm::cast<clang::AutoType>(parent_qual_type)->getDeducedType());
-    return elaborated_clang_type.GetChildCompilerTypeAtIndex(
-        exe_ctx, idx, transparent_pointers, omit_empty_base_classes,
-        ignore_array_bounds, child_name, child_byte_size, child_byte_offset,
-        child_bitfield_bit_size, child_bitfield_bit_offset, child_is_base_class,
-        child_is_deref_of_parent, valobj, language_flags);
-  }
-
-  case clang::Type::Elaborated: {
-    CompilerType elaborated_clang_type(
-        getASTContext(),
-        llvm::cast<clang::ElaboratedType>(parent_qual_type)->getNamedType());
-    return elaborated_clang_type.GetChildCompilerTypeAtIndex(
-        exe_ctx, idx, transparent_pointers, omit_empty_base_classes,
-        ignore_array_bounds, child_name, child_byte_size, child_byte_offset,
-        child_bitfield_bit_size, child_bitfield_bit_offset, child_is_base_class,
-        child_is_deref_of_parent, valobj, language_flags);
-  }
-
-  case clang::Type::Paren: {
-    CompilerType paren_clang_type(
-        getASTContext(),
-        llvm::cast<clang::ParenType>(parent_qual_type)->desugar());
-    return paren_clang_type.GetChildCompilerTypeAtIndex(
-        exe_ctx, idx, transparent_pointers, omit_empty_base_classes,
-        ignore_array_bounds, child_name, child_byte_size, child_byte_offset,
-        child_bitfield_bit_size, child_bitfield_bit_offset, child_is_base_class,
-        child_is_deref_of_parent, valobj, language_flags);
-  }
-
   default:
     break;
   }
@@ -7184,7 +6254,7 @@
     lldb::opaque_compiler_type_t type, const char *name,
     bool omit_empty_base_classes, std::vector<uint32_t> &child_indexes) {
   if (type && name && name[0]) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
     const clang::Type::TypeClass type_class = qual_type->getTypeClass();
     switch (type_class) {
     case clang::Type::Record:
@@ -7207,7 +6277,7 @@
              field != field_end; ++field, ++child_idx) {
           llvm::StringRef field_name = field->getName();
           if (field_name.empty()) {
-            CompilerType field_type(getASTContext(), field->getType());
+            CompilerType field_type = GetType(field->getType());
             child_indexes.push_back(child_idx);
             if (field_type.GetIndexOfChildMemberWithName(
                     name, omit_empty_base_classes, child_indexes))
@@ -7231,7 +6301,7 @@
           // const Decl *root_cdecl = cxx_record_decl->getCanonicalDecl();
           // Didn't find things easily, lets let clang do its thang...
           clang::IdentifierInfo &ident_ref =
-              getASTContext()->Idents.get(name_sref);
+              getASTContext().Idents.get(name_sref);
           clang::DeclarationName decl_name(&ident_ref);
 
           clang::CXXBasePaths paths;
@@ -7318,9 +6388,9 @@
               // superclass...
               child_indexes.push_back(0);
 
-              CompilerType superclass_clang_type(
-                  getASTContext(), getASTContext()->getObjCInterfaceType(
-                                       superclass_interface_decl));
+              CompilerType superclass_clang_type =
+                  GetType(getASTContext().getObjCInterfaceType(
+                      superclass_interface_decl));
               if (superclass_clang_type.GetIndexOfChildMemberWithName(
                       name, omit_empty_base_classes, child_indexes)) {
                 // We did find an ivar in a superclass so just return the
@@ -7338,8 +6408,7 @@
       break;
 
     case clang::Type::ObjCObjectPointer: {
-      CompilerType objc_object_clang_type(
-          getASTContext(),
+      CompilerType objc_object_clang_type = GetType(
           llvm::cast<clang::ObjCObjectPointerType>(qual_type.getTypePtr())
               ->getPointeeType());
       return objc_object_clang_type.GetIndexOfChildMemberWithName(
@@ -7391,7 +6460,7 @@
       const clang::ReferenceType *reference_type =
           llvm::cast<clang::ReferenceType>(qual_type.getTypePtr());
       clang::QualType pointee_type(reference_type->getPointeeType());
-      CompilerType pointee_clang_type(getASTContext(), pointee_type);
+      CompilerType pointee_clang_type = GetType(pointee_type);
 
       if (pointee_clang_type.IsAggregateType()) {
         return pointee_clang_type.GetIndexOfChildMemberWithName(
@@ -7408,34 +6477,6 @@
       }
     } break;
 
-    case clang::Type::Typedef:
-      return CompilerType(getASTContext(),
-                          llvm::cast<clang::TypedefType>(qual_type)
-                              ->getDecl()
-                              ->getUnderlyingType())
-          .GetIndexOfChildMemberWithName(name, omit_empty_base_classes,
-                                         child_indexes);
-
-    case clang::Type::Auto:
-      return CompilerType(
-                 getASTContext(),
-                 llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-          .GetIndexOfChildMemberWithName(name, omit_empty_base_classes,
-                                         child_indexes);
-
-    case clang::Type::Elaborated:
-      return CompilerType(
-                 getASTContext(),
-                 llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-          .GetIndexOfChildMemberWithName(name, omit_empty_base_classes,
-                                         child_indexes);
-
-    case clang::Type::Paren:
-      return CompilerType(getASTContext(),
-                          llvm::cast<clang::ParenType>(qual_type)->desugar())
-          .GetIndexOfChildMemberWithName(name, omit_empty_base_classes,
-                                         child_indexes);
-
     default:
       break;
     }
@@ -7452,7 +6493,7 @@
                                          const char *name,
                                          bool omit_empty_base_classes) {
   if (type && name && name[0]) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
+    clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
 
     const clang::Type::TypeClass type_class = qual_type->getTypeClass();
 
@@ -7485,8 +6526,7 @@
                 !ClangASTContext::RecordHasFields(base_class_decl))
               continue;
 
-            CompilerType base_class_clang_type(getASTContext(),
-                                               base_class->getType());
+            CompilerType base_class_clang_type = GetType(base_class->getType());
             std::string base_class_type_name(
                 base_class_clang_type.GetTypeName().AsCString(""));
             if (base_class_type_name == name)
@@ -7549,8 +6589,7 @@
       break;
 
     case clang::Type::ObjCObjectPointer: {
-      CompilerType pointee_clang_type(
-          getASTContext(),
+      CompilerType pointee_clang_type = GetType(
           llvm::cast<clang::ObjCObjectPointerType>(qual_type.getTypePtr())
               ->getPointeeType());
       return pointee_clang_type.GetIndexOfChildWithName(
@@ -7601,8 +6640,7 @@
     case clang::Type::RValueReference: {
       const clang::ReferenceType *reference_type =
           llvm::cast<clang::ReferenceType>(qual_type.getTypePtr());
-      CompilerType pointee_type(getASTContext(),
-                                reference_type->getPointeeType());
+      CompilerType pointee_type = GetType(reference_type->getPointeeType());
 
       if (pointee_type.IsAggregateType()) {
         return pointee_type.GetIndexOfChildWithName(name,
@@ -7613,8 +6651,7 @@
     case clang::Type::Pointer: {
       const clang::PointerType *pointer_type =
           llvm::cast<clang::PointerType>(qual_type.getTypePtr());
-      CompilerType pointee_type(getASTContext(),
-                                pointer_type->getPointeeType());
+      CompilerType pointee_type = GetType(pointer_type->getPointeeType());
 
       if (pointee_type.IsAggregateType()) {
         return pointee_type.GetIndexOfChildWithName(name,
@@ -7639,30 +6676,6 @@
       }
     } break;
 
-    case clang::Type::Auto:
-      return CompilerType(
-                 getASTContext(),
-                 llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-          .GetIndexOfChildWithName(name, omit_empty_base_classes);
-
-    case clang::Type::Elaborated:
-      return CompilerType(
-                 getASTContext(),
-                 llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-          .GetIndexOfChildWithName(name, omit_empty_base_classes);
-
-    case clang::Type::Paren:
-      return CompilerType(getASTContext(),
-                          llvm::cast<clang::ParenType>(qual_type)->desugar())
-          .GetIndexOfChildWithName(name, omit_empty_base_classes);
-
-    case clang::Type::Typedef:
-      return CompilerType(getASTContext(),
-                          llvm::cast<clang::TypedefType>(qual_type)
-                              ->getDecl()
-                              ->getUnderlyingType())
-          .GetIndexOfChildWithName(name, omit_empty_base_classes);
-
     default:
       break;
     }
@@ -7675,7 +6688,7 @@
   if (!type)
     return 0;
 
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type = RemoveWrappingTypes(GetCanonicalQualType(type));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Record:
@@ -7692,30 +6705,6 @@
     }
     break;
 
-  case clang::Type::Typedef:
-    return (CompilerType(getASTContext(),
-                         llvm::cast<clang::TypedefType>(qual_type)
-                             ->getDecl()
-                             ->getUnderlyingType()))
-        .GetNumTemplateArguments();
-
-  case clang::Type::Auto:
-    return (CompilerType(
-                getASTContext(),
-                llvm::cast<clang::AutoType>(qual_type)->getDeducedType()))
-        .GetNumTemplateArguments();
-
-  case clang::Type::Elaborated:
-    return (CompilerType(
-                getASTContext(),
-                llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType()))
-        .GetNumTemplateArguments();
-
-  case clang::Type::Paren:
-    return (CompilerType(getASTContext(),
-                         llvm::cast<clang::ParenType>(qual_type)->desugar()))
-        .GetNumTemplateArguments();
-
   default:
     break;
   }
@@ -7729,7 +6718,7 @@
   if (!type)
     return nullptr;
 
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
   case clang::Type::Record: {
@@ -7743,27 +6732,6 @@
         cxx_record_decl);
   }
 
-  case clang::Type::Typedef:
-    return GetAsTemplateSpecialization(llvm::cast<clang::TypedefType>(qual_type)
-                                           ->getDecl()
-                                           ->getUnderlyingType()
-                                           .getAsOpaquePtr());
-
-  case clang::Type::Auto:
-    return GetAsTemplateSpecialization(llvm::cast<clang::AutoType>(qual_type)
-                                           ->getDeducedType()
-                                           .getAsOpaquePtr());
-
-  case clang::Type::Elaborated:
-    return GetAsTemplateSpecialization(
-        llvm::cast<clang::ElaboratedType>(qual_type)
-            ->getNamedType()
-            .getAsOpaquePtr());
-
-  case clang::Type::Paren:
-    return GetAsTemplateSpecialization(
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr());
-
   default:
     return nullptr;
   }
@@ -7821,7 +6789,7 @@
   if (template_arg.getKind() != clang::TemplateArgument::Type)
     return CompilerType();
 
-  return CompilerType(getASTContext(), template_arg.getAsType());
+  return GetType(template_arg.getAsType());
 }
 
 Optional<CompilerType::IntegralTemplateArgument>
@@ -7837,8 +6805,8 @@
   if (template_arg.getKind() != clang::TemplateArgument::Integral)
     return llvm::None;
 
-  return {{template_arg.getAsIntegral(),
-           CompilerType(getASTContext(), template_arg.getIntegralType())}};
+  return {
+      {template_arg.getAsIntegral(), GetType(template_arg.getIntegralType())}};
 }
 
 CompilerType ClangASTContext::GetTypeForFormatters(void *type) {
@@ -7901,26 +6869,26 @@
       llvm::dyn_cast_or_null<ClangASTContext>(type.GetTypeSystem());
   if (!ast)
     return nullptr;
-  clang::ASTContext *clang_ast = ast->getASTContext();
+  clang::ASTContext &clang_ast = ast->getASTContext();
   clang::IdentifierInfo *ident = nullptr;
   if (!name.empty())
-    ident = &clang_ast->Idents.get(name);
+    ident = &clang_ast.Idents.get(name);
 
   clang::FieldDecl *field = nullptr;
 
   clang::Expr *bit_width = nullptr;
   if (bitfield_bit_size != 0) {
-    llvm::APInt bitfield_bit_size_apint(
-        clang_ast->getTypeSize(clang_ast->IntTy), bitfield_bit_size);
-    bit_width = new (*clang_ast)
-        clang::IntegerLiteral(*clang_ast, bitfield_bit_size_apint,
-                              clang_ast->IntTy, clang::SourceLocation());
+    llvm::APInt bitfield_bit_size_apint(clang_ast.getTypeSize(clang_ast.IntTy),
+                                        bitfield_bit_size);
+    bit_width = new (clang_ast)
+        clang::IntegerLiteral(clang_ast, bitfield_bit_size_apint,
+                              clang_ast.IntTy, clang::SourceLocation());
   }
 
   clang::RecordDecl *record_decl = ast->GetAsRecordDecl(type);
   if (record_decl) {
     field = clang::FieldDecl::Create(
-        *clang_ast, record_decl, clang::SourceLocation(),
+        clang_ast, record_decl, clang::SourceLocation(),
         clang::SourceLocation(),
         ident,                                    // Identifier
         ClangUtil::GetQualType(field_clang_type), // Field type
@@ -7963,7 +6931,7 @@
       field_clang_type.GetCompleteType();
 
       field = clang::ObjCIvarDecl::Create(
-          *clang_ast, class_interface_decl, clang::SourceLocation(),
+          clang_ast, class_interface_decl, clang::SourceLocation(),
           clang::SourceLocation(),
           ident,                                    // Identifier
           ClangUtil::GetQualType(field_clang_type), // Field type
@@ -8025,12 +6993,12 @@
         if (clang::FieldDecl *nested_field_decl =
                 llvm::dyn_cast<clang::FieldDecl>(*di)) {
           clang::NamedDecl **chain =
-              new (*ast->getASTContext()) clang::NamedDecl *[2];
+              new (ast->getASTContext()) clang::NamedDecl *[2];
           chain[0] = *field_pos;
           chain[1] = nested_field_decl;
           clang::IndirectFieldDecl *indirect_field =
               clang::IndirectFieldDecl::Create(
-                  *ast->getASTContext(), record_decl, clang::SourceLocation(),
+                  ast->getASTContext(), record_decl, clang::SourceLocation(),
                   nested_field_decl->getIdentifier(),
                   nested_field_decl->getType(), {chain, 2});
 
@@ -8044,7 +7012,7 @@
                        llvm::dyn_cast<clang::IndirectFieldDecl>(*di)) {
           size_t nested_chain_size =
               nested_indirect_field_decl->getChainingSize();
-          clang::NamedDecl **chain = new (*ast->getASTContext())
+          clang::NamedDecl **chain = new (ast->getASTContext())
               clang::NamedDecl *[nested_chain_size + 1];
           chain[0] = *field_pos;
 
@@ -8059,7 +7027,7 @@
 
           clang::IndirectFieldDecl *indirect_field =
               clang::IndirectFieldDecl::Create(
-                  *ast->getASTContext(), record_decl, clang::SourceLocation(),
+                  ast->getASTContext(), record_decl, clang::SourceLocation(),
                   nested_indirect_field_decl->getIdentifier(),
                   nested_indirect_field_decl->getType(),
                   {chain, nested_chain_size + 1});
@@ -8100,7 +7068,7 @@
         return;
 
       record_decl->addAttr(
-          clang::PackedAttr::CreateImplicit(*ast->getASTContext()));
+          clang::PackedAttr::CreateImplicit(ast->getASTContext()));
     }
   }
 }
@@ -8122,10 +7090,10 @@
   clang::VarDecl *var_decl = nullptr;
   clang::IdentifierInfo *ident = nullptr;
   if (!name.empty())
-    ident = &ast->getASTContext()->Idents.get(name);
+    ident = &ast->getASTContext().Idents.get(name);
 
   var_decl = clang::VarDecl::Create(
-      *ast->getASTContext(),            // ASTContext &
+      ast->getASTContext(),             // ASTContext &
       record_decl,                      // DeclContext *
       clang::SourceLocation(),          // clang::SourceLocation StartLoc
       clang::SourceLocation(),          // clang::SourceLocation IdLoc
@@ -8148,12 +7116,11 @@
 }
 
 clang::CXXMethodDecl *ClangASTContext::AddMethodToCXXRecordType(
-    lldb::opaque_compiler_type_t type, const char *name, const char *mangled_name,
-    const CompilerType &method_clang_type, lldb::AccessType access,
-    bool is_virtual, bool is_static, bool is_inline, bool is_explicit,
-    bool is_attr_used, bool is_artificial) {
-  if (!type || !method_clang_type.IsValid() || name == nullptr ||
-      name[0] == '\0')
+    lldb::opaque_compiler_type_t type, llvm::StringRef name,
+    const char *mangled_name, const CompilerType &method_clang_type,
+    lldb::AccessType access, bool is_virtual, bool is_static, bool is_inline,
+    bool is_explicit, bool is_attr_used, bool is_artificial) {
+  if (!type || !method_clang_type.IsValid() || name.empty())
     return nullptr;
 
   clang::QualType record_qual_type(GetCanonicalQualType(type));
@@ -8168,7 +7135,7 @@
 
   clang::CXXMethodDecl *cxx_method_decl = nullptr;
 
-  clang::DeclarationName decl_name(&getASTContext()->Idents.get(name));
+  clang::DeclarationName decl_name(&getASTContext().Idents.get(name));
 
   const clang::FunctionType *function_type =
       llvm::dyn_cast<clang::FunctionType>(method_qual_type.getTypePtr());
@@ -8194,21 +7161,22 @@
       nullptr /*expr*/, is_explicit
                             ? clang::ExplicitSpecKind::ResolvedTrue
                             : clang::ExplicitSpecKind::ResolvedFalse);
-  if (name[0] == '~') {
+  if (name.startswith("~")) {
     cxx_dtor_decl = clang::CXXDestructorDecl::Create(
-        *getASTContext(), cxx_record_decl, clang::SourceLocation(),
+        getASTContext(), cxx_record_decl, clang::SourceLocation(),
         clang::DeclarationNameInfo(
-            getASTContext()->DeclarationNames.getCXXDestructorName(
-                getASTContext()->getCanonicalType(record_qual_type)),
+            getASTContext().DeclarationNames.getCXXDestructorName(
+                getASTContext().getCanonicalType(record_qual_type)),
             clang::SourceLocation()),
-        method_qual_type, nullptr, is_inline, is_artificial);
+        method_qual_type, nullptr, is_inline, is_artificial,
+        ConstexprSpecKind::CSK_unspecified);
     cxx_method_decl = cxx_dtor_decl;
   } else if (decl_name == cxx_record_decl->getDeclName()) {
     cxx_ctor_decl = clang::CXXConstructorDecl::Create(
-        *getASTContext(), cxx_record_decl, clang::SourceLocation(),
+        getASTContext(), cxx_record_decl, clang::SourceLocation(),
         clang::DeclarationNameInfo(
-            getASTContext()->DeclarationNames.getCXXConstructorName(
-                getASTContext()->getCanonicalType(record_qual_type)),
+            getASTContext().DeclarationNames.getCXXConstructorName(
+                getASTContext().getCanonicalType(record_qual_type)),
             clang::SourceLocation()),
         method_qual_type,
         nullptr, // TypeSourceInfo *
@@ -8229,9 +7197,9 @@
                 is_method, op_kind, num_params))
           return nullptr;
         cxx_method_decl = clang::CXXMethodDecl::Create(
-            *getASTContext(), cxx_record_decl, clang::SourceLocation(),
+            getASTContext(), cxx_record_decl, clang::SourceLocation(),
             clang::DeclarationNameInfo(
-                getASTContext()->DeclarationNames.getCXXOperatorName(op_kind),
+                getASTContext().DeclarationNames.getCXXOperatorName(op_kind),
                 clang::SourceLocation()),
             method_qual_type,
             nullptr, // TypeSourceInfo *
@@ -8239,22 +7207,21 @@
       } else if (num_params == 0) {
         // Conversion operators don't take params...
         cxx_method_decl = clang::CXXConversionDecl::Create(
-            *getASTContext(), cxx_record_decl, clang::SourceLocation(),
+            getASTContext(), cxx_record_decl, clang::SourceLocation(),
             clang::DeclarationNameInfo(
-                getASTContext()->DeclarationNames.getCXXConversionFunctionName(
-                    getASTContext()->getCanonicalType(
+                getASTContext().DeclarationNames.getCXXConversionFunctionName(
+                    getASTContext().getCanonicalType(
                         function_type->getReturnType())),
                 clang::SourceLocation()),
             method_qual_type,
             nullptr, // TypeSourceInfo *
-            is_inline, explicit_spec, CSK_unspecified,
-            clang::SourceLocation());
+            is_inline, explicit_spec, CSK_unspecified, clang::SourceLocation());
       }
     }
 
     if (cxx_method_decl == nullptr) {
       cxx_method_decl = clang::CXXMethodDecl::Create(
-          *getASTContext(), cxx_record_decl, clang::SourceLocation(),
+          getASTContext(), cxx_record_decl, clang::SourceLocation(),
           clang::DeclarationNameInfo(decl_name, clang::SourceLocation()),
           method_qual_type,
           nullptr, // TypeSourceInfo *
@@ -8269,11 +7236,11 @@
   cxx_method_decl->setVirtualAsWritten(is_virtual);
 
   if (is_attr_used)
-    cxx_method_decl->addAttr(clang::UsedAttr::CreateImplicit(*getASTContext()));
+    cxx_method_decl->addAttr(clang::UsedAttr::CreateImplicit(getASTContext()));
 
   if (mangled_name != nullptr) {
-    cxx_method_decl->addAttr(
-        clang::AsmLabelAttr::CreateImplicit(*getASTContext(), mangled_name));
+    cxx_method_decl->addAttr(clang::AsmLabelAttr::CreateImplicit(
+        getASTContext(), mangled_name, /*literal=*/false));
   }
 
   // Populate the method decl with parameter decls
@@ -8282,7 +7249,7 @@
 
   for (unsigned param_index = 0; param_index < num_params; ++param_index) {
     params.push_back(clang::ParmVarDecl::Create(
-        *getASTContext(), cxx_method_decl, clang::SourceLocation(),
+        getASTContext(), cxx_method_decl, clang::SourceLocation(),
         clang::SourceLocation(),
         nullptr, // anonymous
         method_function_prototype->getParamType(param_index), nullptr,
@@ -8327,24 +7294,6 @@
   VerifyDecl(cxx_method_decl);
 #endif
 
-  //    printf ("decl->isPolymorphic()             = %i\n",
-  //    cxx_record_decl->isPolymorphic());
-  //    printf ("decl->isAggregate()               = %i\n",
-  //    cxx_record_decl->isAggregate());
-  //    printf ("decl->isPOD()                     = %i\n",
-  //    cxx_record_decl->isPOD());
-  //    printf ("decl->isEmpty()                   = %i\n",
-  //    cxx_record_decl->isEmpty());
-  //    printf ("decl->isAbstract()                = %i\n",
-  //    cxx_record_decl->isAbstract());
-  //    printf ("decl->hasTrivialConstructor()     = %i\n",
-  //    cxx_record_decl->hasTrivialConstructor());
-  //    printf ("decl->hasTrivialCopyConstructor() = %i\n",
-  //    cxx_record_decl->hasTrivialCopyConstructor());
-  //    printf ("decl->hasTrivialCopyAssignment()  = %i\n",
-  //    cxx_record_decl->hasTrivialCopyAssignment());
-  //    printf ("decl->hasTrivialDestructor()      = %i\n",
-  //    cxx_record_decl->hasTrivialDestructor());
   return cxx_method_decl;
 }
 
@@ -8364,10 +7313,10 @@
   if (!type)
     return nullptr;
 
-  return llvm::make_unique<clang::CXXBaseSpecifier>(
+  return std::make_unique<clang::CXXBaseSpecifier>(
       clang::SourceRange(), is_virtual, base_of_class,
       ClangASTContext::ConvertAccessTypeToAccessSpecifier(access),
-      getASTContext()->getTrivialTypeSourceInfo(GetQualType(type)),
+      getASTContext().getTrivialTypeSourceInfo(GetQualType(type)),
       clang::SourceLocation());
 }
 
@@ -8396,7 +7345,7 @@
       llvm::dyn_cast_or_null<ClangASTContext>(type.GetTypeSystem());
   if (!ast)
     return false;
-  clang::ASTContext *clang_ast = ast->getASTContext();
+  clang::ASTContext &clang_ast = ast->getASTContext();
 
   if (type && superclass_clang_type.IsValid() &&
       superclass_clang_type.GetTypeSystem() == type.GetTypeSystem()) {
@@ -8405,8 +7354,8 @@
     clang::ObjCInterfaceDecl *super_interface_decl =
         GetAsObjCInterfaceDecl(superclass_clang_type);
     if (class_interface_decl && super_interface_decl) {
-      class_interface_decl->setSuperClass(clang_ast->getTrivialTypeSourceInfo(
-          clang_ast->getObjCInterfaceType(super_interface_decl)));
+      class_interface_decl->setSuperClass(clang_ast.getTrivialTypeSourceInfo(
+          clang_ast.getObjCInterfaceType(super_interface_decl)));
       return true;
     }
   }
@@ -8424,188 +7373,182 @@
   ClangASTContext *ast = llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
   if (!ast)
     return false;
-  clang::ASTContext *clang_ast = ast->getASTContext();
+  clang::ASTContext &clang_ast = ast->getASTContext();
 
   clang::ObjCInterfaceDecl *class_interface_decl = GetAsObjCInterfaceDecl(type);
+  if (!class_interface_decl)
+    return false;
 
-  if (class_interface_decl) {
-    CompilerType property_clang_type_to_access;
+  CompilerType property_clang_type_to_access;
 
-    if (property_clang_type.IsValid())
-      property_clang_type_to_access = property_clang_type;
-    else if (ivar_decl)
-      property_clang_type_to_access =
-          CompilerType(clang_ast, ivar_decl->getType());
+  if (property_clang_type.IsValid())
+    property_clang_type_to_access = property_clang_type;
+  else if (ivar_decl)
+    property_clang_type_to_access = ast->GetType(ivar_decl->getType());
 
-    if (class_interface_decl && property_clang_type_to_access.IsValid()) {
-      clang::TypeSourceInfo *prop_type_source;
-      if (ivar_decl)
-        prop_type_source =
-            clang_ast->getTrivialTypeSourceInfo(ivar_decl->getType());
-      else
-        prop_type_source = clang_ast->getTrivialTypeSourceInfo(
-            ClangUtil::GetQualType(property_clang_type));
+  if (!class_interface_decl || !property_clang_type_to_access.IsValid())
+    return false;
 
-      clang::ObjCPropertyDecl *property_decl = clang::ObjCPropertyDecl::Create(
-          *clang_ast, class_interface_decl,
-          clang::SourceLocation(), // Source Location
-          &clang_ast->Idents.get(property_name),
-          clang::SourceLocation(), // Source Location for AT
-          clang::SourceLocation(), // Source location for (
-          ivar_decl ? ivar_decl->getType()
-                    : ClangUtil::GetQualType(property_clang_type),
-          prop_type_source);
+  clang::TypeSourceInfo *prop_type_source;
+  if (ivar_decl)
+    prop_type_source = clang_ast.getTrivialTypeSourceInfo(ivar_decl->getType());
+  else
+    prop_type_source = clang_ast.getTrivialTypeSourceInfo(
+        ClangUtil::GetQualType(property_clang_type));
 
-      if (property_decl) {
-        if (metadata)
-          ClangASTContext::SetMetadata(clang_ast, property_decl, *metadata);
+  clang::ObjCPropertyDecl *property_decl = clang::ObjCPropertyDecl::Create(
+      clang_ast, class_interface_decl,
+      clang::SourceLocation(), // Source Location
+      &clang_ast.Idents.get(property_name),
+      clang::SourceLocation(), // Source Location for AT
+      clang::SourceLocation(), // Source location for (
+      ivar_decl ? ivar_decl->getType()
+                : ClangUtil::GetQualType(property_clang_type),
+      prop_type_source);
 
-        class_interface_decl->addDecl(property_decl);
+  if (!property_decl)
+    return false;
 
-        clang::Selector setter_sel, getter_sel;
+  if (metadata)
+    ast->SetMetadata(property_decl, *metadata);
 
-        if (property_setter_name != nullptr) {
-          std::string property_setter_no_colon(
-              property_setter_name, strlen(property_setter_name) - 1);
-          clang::IdentifierInfo *setter_ident =
-              &clang_ast->Idents.get(property_setter_no_colon);
-          setter_sel = clang_ast->Selectors.getSelector(1, &setter_ident);
-        } else if (!(property_attributes & DW_APPLE_PROPERTY_readonly)) {
-          std::string setter_sel_string("set");
-          setter_sel_string.push_back(::toupper(property_name[0]));
-          setter_sel_string.append(&property_name[1]);
-          clang::IdentifierInfo *setter_ident =
-              &clang_ast->Idents.get(setter_sel_string);
-          setter_sel = clang_ast->Selectors.getSelector(1, &setter_ident);
-        }
-        property_decl->setSetterName(setter_sel);
-        property_decl->setPropertyAttributes(
-            clang::ObjCPropertyDecl::OBJC_PR_setter);
+  class_interface_decl->addDecl(property_decl);
 
-        if (property_getter_name != nullptr) {
-          clang::IdentifierInfo *getter_ident =
-              &clang_ast->Idents.get(property_getter_name);
-          getter_sel = clang_ast->Selectors.getSelector(0, &getter_ident);
-        } else {
-          clang::IdentifierInfo *getter_ident =
-              &clang_ast->Idents.get(property_name);
-          getter_sel = clang_ast->Selectors.getSelector(0, &getter_ident);
-        }
-        property_decl->setGetterName(getter_sel);
-        property_decl->setPropertyAttributes(
-            clang::ObjCPropertyDecl::OBJC_PR_getter);
+  clang::Selector setter_sel, getter_sel;
 
-        if (ivar_decl)
-          property_decl->setPropertyIvarDecl(ivar_decl);
+  if (property_setter_name) {
+    std::string property_setter_no_colon(property_setter_name,
+                                         strlen(property_setter_name) - 1);
+    clang::IdentifierInfo *setter_ident =
+        &clang_ast.Idents.get(property_setter_no_colon);
+    setter_sel = clang_ast.Selectors.getSelector(1, &setter_ident);
+  } else if (!(property_attributes & DW_APPLE_PROPERTY_readonly)) {
+    std::string setter_sel_string("set");
+    setter_sel_string.push_back(::toupper(property_name[0]));
+    setter_sel_string.append(&property_name[1]);
+    clang::IdentifierInfo *setter_ident =
+        &clang_ast.Idents.get(setter_sel_string);
+    setter_sel = clang_ast.Selectors.getSelector(1, &setter_ident);
+  }
+  property_decl->setSetterName(setter_sel);
+  property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_setter);
 
-        if (property_attributes & DW_APPLE_PROPERTY_readonly)
-          property_decl->setPropertyAttributes(
-              clang::ObjCPropertyDecl::OBJC_PR_readonly);
-        if (property_attributes & DW_APPLE_PROPERTY_readwrite)
-          property_decl->setPropertyAttributes(
-              clang::ObjCPropertyDecl::OBJC_PR_readwrite);
-        if (property_attributes & DW_APPLE_PROPERTY_assign)
-          property_decl->setPropertyAttributes(
-              clang::ObjCPropertyDecl::OBJC_PR_assign);
-        if (property_attributes & DW_APPLE_PROPERTY_retain)
-          property_decl->setPropertyAttributes(
-              clang::ObjCPropertyDecl::OBJC_PR_retain);
-        if (property_attributes & DW_APPLE_PROPERTY_copy)
-          property_decl->setPropertyAttributes(
-              clang::ObjCPropertyDecl::OBJC_PR_copy);
-        if (property_attributes & DW_APPLE_PROPERTY_nonatomic)
-          property_decl->setPropertyAttributes(
-              clang::ObjCPropertyDecl::OBJC_PR_nonatomic);
-        if (property_attributes & clang::ObjCPropertyDecl::OBJC_PR_nullability)
-          property_decl->setPropertyAttributes(
-              clang::ObjCPropertyDecl::OBJC_PR_nullability);
-        if (property_attributes &
-            clang::ObjCPropertyDecl::OBJC_PR_null_resettable)
-          property_decl->setPropertyAttributes(
-              clang::ObjCPropertyDecl::OBJC_PR_null_resettable);
-        if (property_attributes & clang::ObjCPropertyDecl::OBJC_PR_class)
-          property_decl->setPropertyAttributes(
-              clang::ObjCPropertyDecl::OBJC_PR_class);
+  if (property_getter_name != nullptr) {
+    clang::IdentifierInfo *getter_ident =
+        &clang_ast.Idents.get(property_getter_name);
+    getter_sel = clang_ast.Selectors.getSelector(0, &getter_ident);
+  } else {
+    clang::IdentifierInfo *getter_ident = &clang_ast.Idents.get(property_name);
+    getter_sel = clang_ast.Selectors.getSelector(0, &getter_ident);
+  }
+  property_decl->setGetterName(getter_sel);
+  property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_getter);
 
-        const bool isInstance =
-            (property_attributes & clang::ObjCPropertyDecl::OBJC_PR_class) == 0;
+  if (ivar_decl)
+    property_decl->setPropertyIvarDecl(ivar_decl);
 
-        if (!getter_sel.isNull() &&
-            !(isInstance
-                  ? class_interface_decl->lookupInstanceMethod(getter_sel)
-                  : class_interface_decl->lookupClassMethod(getter_sel))) {
-          const bool isVariadic = false;
-          const bool isSynthesized = false;
-          const bool isImplicitlyDeclared = true;
-          const bool isDefined = false;
-          const clang::ObjCMethodDecl::ImplementationControl impControl =
-              clang::ObjCMethodDecl::None;
-          const bool HasRelatedResultType = false;
+  if (property_attributes & DW_APPLE_PROPERTY_readonly)
+    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readonly);
+  if (property_attributes & DW_APPLE_PROPERTY_readwrite)
+    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_readwrite);
+  if (property_attributes & DW_APPLE_PROPERTY_assign)
+    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_assign);
+  if (property_attributes & DW_APPLE_PROPERTY_retain)
+    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_retain);
+  if (property_attributes & DW_APPLE_PROPERTY_copy)
+    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_copy);
+  if (property_attributes & DW_APPLE_PROPERTY_nonatomic)
+    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_nonatomic);
+  if (property_attributes & ObjCPropertyDecl::OBJC_PR_nullability)
+    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_nullability);
+  if (property_attributes & ObjCPropertyDecl::OBJC_PR_null_resettable)
+    property_decl->setPropertyAttributes(
+        ObjCPropertyDecl::OBJC_PR_null_resettable);
+  if (property_attributes & ObjCPropertyDecl::OBJC_PR_class)
+    property_decl->setPropertyAttributes(ObjCPropertyDecl::OBJC_PR_class);
 
-          clang::ObjCMethodDecl *getter = clang::ObjCMethodDecl::Create(
-              *clang_ast, clang::SourceLocation(), clang::SourceLocation(),
-              getter_sel, ClangUtil::GetQualType(property_clang_type_to_access),
-              nullptr, class_interface_decl, isInstance, isVariadic,
-              isSynthesized, isImplicitlyDeclared, isDefined, impControl,
-              HasRelatedResultType);
+  const bool isInstance =
+      (property_attributes & ObjCPropertyDecl::OBJC_PR_class) == 0;
 
-          if (getter && metadata)
-            ClangASTContext::SetMetadata(clang_ast, getter, *metadata);
+  clang::ObjCMethodDecl *getter = nullptr;
+  if (!getter_sel.isNull())
+    getter = isInstance ? class_interface_decl->lookupInstanceMethod(getter_sel)
+                        : class_interface_decl->lookupClassMethod(getter_sel);
+  if (!getter_sel.isNull() && !getter) {
+    const bool isVariadic = false;
+    const bool isPropertyAccessor = false;
+    const bool isSynthesizedAccessorStub = false;
+    const bool isImplicitlyDeclared = true;
+    const bool isDefined = false;
+    const clang::ObjCMethodDecl::ImplementationControl impControl =
+        clang::ObjCMethodDecl::None;
+    const bool HasRelatedResultType = false;
 
-          if (getter) {
-            getter->setMethodParams(*clang_ast,
-                                    llvm::ArrayRef<clang::ParmVarDecl *>(),
-                                    llvm::ArrayRef<clang::SourceLocation>());
+    getter = clang::ObjCMethodDecl::Create(
+        clang_ast, clang::SourceLocation(), clang::SourceLocation(), getter_sel,
+        ClangUtil::GetQualType(property_clang_type_to_access), nullptr,
+        class_interface_decl, isInstance, isVariadic, isPropertyAccessor,
+        isSynthesizedAccessorStub, isImplicitlyDeclared, isDefined, impControl,
+        HasRelatedResultType);
 
-            class_interface_decl->addDecl(getter);
-          }
-        }
+    if (getter) {
+      if (metadata)
+        ast->SetMetadata(getter, *metadata);
 
-        if (!setter_sel.isNull() &&
-            !(isInstance
-                  ? class_interface_decl->lookupInstanceMethod(setter_sel)
-                  : class_interface_decl->lookupClassMethod(setter_sel))) {
-          clang::QualType result_type = clang_ast->VoidTy;
-          const bool isVariadic = false;
-          const bool isSynthesized = false;
-          const bool isImplicitlyDeclared = true;
-          const bool isDefined = false;
-          const clang::ObjCMethodDecl::ImplementationControl impControl =
-              clang::ObjCMethodDecl::None;
-          const bool HasRelatedResultType = false;
-
-          clang::ObjCMethodDecl *setter = clang::ObjCMethodDecl::Create(
-              *clang_ast, clang::SourceLocation(), clang::SourceLocation(),
-              setter_sel, result_type, nullptr, class_interface_decl,
-              isInstance, isVariadic, isSynthesized, isImplicitlyDeclared,
-              isDefined, impControl, HasRelatedResultType);
-
-          if (setter && metadata)
-            ClangASTContext::SetMetadata(clang_ast, setter, *metadata);
-
-          llvm::SmallVector<clang::ParmVarDecl *, 1> params;
-
-          params.push_back(clang::ParmVarDecl::Create(
-              *clang_ast, setter, clang::SourceLocation(),
-              clang::SourceLocation(),
-              nullptr, // anonymous
-              ClangUtil::GetQualType(property_clang_type_to_access), nullptr,
-              clang::SC_Auto, nullptr));
-
-          if (setter) {
-            setter->setMethodParams(
-                *clang_ast, llvm::ArrayRef<clang::ParmVarDecl *>(params),
-                llvm::ArrayRef<clang::SourceLocation>());
-
-            class_interface_decl->addDecl(setter);
-          }
-        }
-
-        return true;
-      }
+      getter->setMethodParams(clang_ast, llvm::ArrayRef<clang::ParmVarDecl *>(),
+                              llvm::ArrayRef<clang::SourceLocation>());
+      class_interface_decl->addDecl(getter);
     }
   }
-  return false;
+  if (getter) {
+    getter->setPropertyAccessor(true);
+    property_decl->setGetterMethodDecl(getter);
+  }
+
+  clang::ObjCMethodDecl *setter = nullptr;
+    setter = isInstance ? class_interface_decl->lookupInstanceMethod(setter_sel)
+                        : class_interface_decl->lookupClassMethod(setter_sel);
+  if (!setter_sel.isNull() && !setter) {
+    clang::QualType result_type = clang_ast.VoidTy;
+    const bool isVariadic = false;
+    const bool isPropertyAccessor = true;
+    const bool isSynthesizedAccessorStub = false;
+    const bool isImplicitlyDeclared = true;
+    const bool isDefined = false;
+    const clang::ObjCMethodDecl::ImplementationControl impControl =
+        clang::ObjCMethodDecl::None;
+    const bool HasRelatedResultType = false;
+
+    setter = clang::ObjCMethodDecl::Create(
+        clang_ast, clang::SourceLocation(), clang::SourceLocation(), setter_sel,
+        result_type, nullptr, class_interface_decl, isInstance, isVariadic,
+        isPropertyAccessor, isSynthesizedAccessorStub, isImplicitlyDeclared,
+        isDefined, impControl, HasRelatedResultType);
+
+    if (setter) {
+      if (metadata)
+        ast->SetMetadata(setter, *metadata);
+
+      llvm::SmallVector<clang::ParmVarDecl *, 1> params;
+      params.push_back(clang::ParmVarDecl::Create(
+          clang_ast, setter, clang::SourceLocation(), clang::SourceLocation(),
+          nullptr, // anonymous
+          ClangUtil::GetQualType(property_clang_type_to_access), nullptr,
+          clang::SC_Auto, nullptr));
+
+      setter->setMethodParams(clang_ast,
+                              llvm::ArrayRef<clang::ParmVarDecl *>(params),
+                              llvm::ArrayRef<clang::SourceLocation>());
+
+      class_interface_decl->addDecl(setter);
+    }
+  }
+  if (setter) {
+    setter->setPropertyAccessor(true);
+    property_decl->setSetterMethodDecl(setter);
+  }
+
+  return true;
 }
 
 bool ClangASTContext::IsObjCClassTypeAndHasIVars(const CompilerType &type,
@@ -8622,7 +7565,7 @@
                       // (lldb::opaque_compiler_type_t type, "-[NString
                       // stringWithCString:]")
     const CompilerType &method_clang_type, lldb::AccessType access,
-    bool is_artificial, bool is_variadic) {
+    bool is_artificial, bool is_variadic, bool is_objc_direct_call) {
   if (!type || !method_clang_type.IsValid())
     return nullptr;
 
@@ -8634,7 +7577,7 @@
       llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
   if (lldb_ast == nullptr)
     return nullptr;
-  clang::ASTContext *ast = lldb_ast->getASTContext();
+  clang::ASTContext &ast = lldb_ast->getASTContext();
 
   const char *selector_start = ::strchr(name, ' ');
   if (selector_start == nullptr)
@@ -8654,7 +7597,7 @@
     bool has_arg = (start[len] == ':');
     if (has_arg)
       ++num_selectors_with_args;
-    selector_idents.push_back(&ast->Idents.get(llvm::StringRef(start, len)));
+    selector_idents.push_back(&ast.Idents.get(llvm::StringRef(start, len)));
     if (has_arg)
       len += 1;
   }
@@ -8662,7 +7605,7 @@
   if (selector_idents.size() == 0)
     return nullptr;
 
-  clang::Selector method_selector = ast->Selectors.getSelector(
+  clang::Selector method_selector = ast.Selectors.getSelector(
       num_selectors_with_args ? selector_idents.size() : 0,
       selector_idents.data());
 
@@ -8680,10 +7623,16 @@
   if (!method_function_prototype)
     return nullptr;
 
-  bool is_synthesized = false;
-  bool is_defined = false;
-  clang::ObjCMethodDecl::ImplementationControl imp_control =
+  const bool isInstance = (name[0] == '-');
+  const bool isVariadic = is_variadic;
+  const bool isPropertyAccessor = false;
+  const bool isSynthesizedAccessorStub = false;
+  /// Force this to true because we don't have source locations.
+  const bool isImplicitlyDeclared = true;
+  const bool isDefined = false;
+  const clang::ObjCMethodDecl::ImplementationControl impControl =
       clang::ObjCMethodDecl::None;
+  const bool HasRelatedResultType = false;
 
   const unsigned num_args = method_function_prototype->getNumParams();
 
@@ -8692,17 +7641,14 @@
                     // deal with it.
 
   clang::ObjCMethodDecl *objc_method_decl = clang::ObjCMethodDecl::Create(
-      *ast,
+      ast,
       clang::SourceLocation(), // beginLoc,
       clang::SourceLocation(), // endLoc,
       method_selector, method_function_prototype->getReturnType(),
       nullptr, // TypeSourceInfo *ResultTInfo,
-      ClangASTContext::GetASTContext(ast)->GetDeclContextForType(
-          ClangUtil::GetQualType(type)),
-      name[0] == '-', is_variadic, is_synthesized,
-      true, // is_implicitly_declared; we force this to true because we don't
-            // have source locations
-      is_defined, imp_control, false /*has_related_result_type*/);
+      lldb_ast->GetDeclContextForType(ClangUtil::GetQualType(type)), isInstance,
+      isVariadic, isPropertyAccessor, isSynthesizedAccessorStub,
+      isImplicitlyDeclared, isDefined, impControl, HasRelatedResultType);
 
   if (objc_method_decl == nullptr)
     return nullptr;
@@ -8712,7 +7658,7 @@
 
     for (unsigned param_index = 0; param_index < num_args; ++param_index) {
       params.push_back(clang::ParmVarDecl::Create(
-          *ast, objc_method_decl, clang::SourceLocation(),
+          ast, objc_method_decl, clang::SourceLocation(),
           clang::SourceLocation(),
           nullptr, // anonymous
           method_function_prototype->getParamType(param_index), nullptr,
@@ -8720,10 +7666,22 @@
     }
 
     objc_method_decl->setMethodParams(
-        *ast, llvm::ArrayRef<clang::ParmVarDecl *>(params),
+        ast, llvm::ArrayRef<clang::ParmVarDecl *>(params),
         llvm::ArrayRef<clang::SourceLocation>());
   }
 
+  if (is_objc_direct_call) {
+    // Add a the objc_direct attribute to the declaration we generate that
+    // we generate a direct method call for this ObjCMethodDecl.
+    objc_method_decl->addAttr(
+        clang::ObjCDirectAttr::CreateImplicit(ast, SourceLocation()));
+    // Usually Sema is creating implicit parameters (e.g., self) when it
+    // parses the method. We don't have a parsing Sema when we build our own
+    // AST here so we manually need to create these implicit parameters to
+    // make the direct call code generation happy.
+    objc_method_decl->createImplicitParams(ast, class_interface_decl);
+  }
+
   class_interface_decl->addDecl(objc_method_decl);
 
 #ifdef LLDB_CONFIGURATION_DEBUG
@@ -8733,80 +7691,12 @@
   return objc_method_decl;
 }
 
-bool ClangASTContext::GetHasExternalStorage(const CompilerType &type) {
-  if (ClangUtil::IsClangType(type))
-    return false;
-
-  clang::QualType qual_type(ClangUtil::GetCanonicalQualType(type));
-
-  const clang::Type::TypeClass type_class = qual_type->getTypeClass();
-  switch (type_class) {
-  case clang::Type::Record: {
-    clang::CXXRecordDecl *cxx_record_decl = qual_type->getAsCXXRecordDecl();
-    if (cxx_record_decl)
-      return cxx_record_decl->hasExternalLexicalStorage() ||
-             cxx_record_decl->hasExternalVisibleStorage();
-  } break;
-
-  case clang::Type::Enum: {
-    clang::EnumDecl *enum_decl =
-        llvm::cast<clang::EnumType>(qual_type)->getDecl();
-    if (enum_decl)
-      return enum_decl->hasExternalLexicalStorage() ||
-             enum_decl->hasExternalVisibleStorage();
-  } break;
-
-  case clang::Type::ObjCObject:
-  case clang::Type::ObjCInterface: {
-    const clang::ObjCObjectType *objc_class_type =
-        llvm::dyn_cast<clang::ObjCObjectType>(qual_type.getTypePtr());
-    assert(objc_class_type);
-    if (objc_class_type) {
-      clang::ObjCInterfaceDecl *class_interface_decl =
-          objc_class_type->getInterface();
-
-      if (class_interface_decl)
-        return class_interface_decl->hasExternalLexicalStorage() ||
-               class_interface_decl->hasExternalVisibleStorage();
-    }
-  } break;
-
-  case clang::Type::Typedef:
-    return GetHasExternalStorage(CompilerType(
-        type.GetTypeSystem(), llvm::cast<clang::TypedefType>(qual_type)
-                                  ->getDecl()
-                                  ->getUnderlyingType()
-                                  .getAsOpaquePtr()));
-
-  case clang::Type::Auto:
-    return GetHasExternalStorage(CompilerType(
-        type.GetTypeSystem(), llvm::cast<clang::AutoType>(qual_type)
-                                  ->getDeducedType()
-                                  .getAsOpaquePtr()));
-
-  case clang::Type::Elaborated:
-    return GetHasExternalStorage(CompilerType(
-        type.GetTypeSystem(), llvm::cast<clang::ElaboratedType>(qual_type)
-                                  ->getNamedType()
-                                  .getAsOpaquePtr()));
-
-  case clang::Type::Paren:
-    return GetHasExternalStorage(CompilerType(
-        type.GetTypeSystem(),
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr()));
-
-  default:
-    break;
-  }
-  return false;
-}
-
 bool ClangASTContext::SetHasExternalStorage(lldb::opaque_compiler_type_t type,
                                             bool has_extern) {
   if (!type)
     return false;
 
-  clang::QualType qual_type(GetCanonicalQualType(type));
+  clang::QualType qual_type(RemoveWrappingTypes(GetCanonicalQualType(type)));
 
   const clang::Type::TypeClass type_class = qual_type->getTypeClass();
   switch (type_class) {
@@ -8846,30 +7736,6 @@
     }
   } break;
 
-  case clang::Type::Typedef:
-    return SetHasExternalStorage(llvm::cast<clang::TypedefType>(qual_type)
-                                     ->getDecl()
-                                     ->getUnderlyingType()
-                                     .getAsOpaquePtr(),
-                                 has_extern);
-
-  case clang::Type::Auto:
-    return SetHasExternalStorage(llvm::cast<clang::AutoType>(qual_type)
-                                     ->getDeducedType()
-                                     .getAsOpaquePtr(),
-                                 has_extern);
-
-  case clang::Type::Elaborated:
-    return SetHasExternalStorage(llvm::cast<clang::ElaboratedType>(qual_type)
-                                     ->getNamedType()
-                                     .getAsOpaquePtr(),
-                                 has_extern);
-
-  case clang::Type::Paren:
-    return SetHasExternalStorage(
-        llvm::cast<clang::ParenType>(qual_type)->desugar().getAsOpaquePtr(),
-        has_extern);
-
   default:
     break;
   }
@@ -8906,70 +7772,65 @@
 bool ClangASTContext::CompleteTagDeclarationDefinition(
     const CompilerType &type) {
   clang::QualType qual_type(ClangUtil::GetQualType(type));
-  if (!qual_type.isNull()) {
-    // Make sure we use the same methodology as
-    // ClangASTContext::StartTagDeclarationDefinition() as to how we start/end
-    // the definition. Previously we were calling
-    const clang::TagType *tag_type = qual_type->getAs<clang::TagType>();
-    if (tag_type) {
-      clang::TagDecl *tag_decl = tag_type->getDecl();
-      if (tag_decl) {
-        clang::CXXRecordDecl *cxx_record_decl =
-            llvm::dyn_cast_or_null<clang::CXXRecordDecl>(tag_decl);
+  if (qual_type.isNull())
+    return false;
 
-        if (cxx_record_decl) {
-          if (!cxx_record_decl->isCompleteDefinition())
-            cxx_record_decl->completeDefinition();
-          cxx_record_decl->setHasLoadedFieldsFromExternalStorage(true);
-          cxx_record_decl->setHasExternalLexicalStorage(false);
-          cxx_record_decl->setHasExternalVisibleStorage(false);
-          return true;
-        }
-      }
-    }
+  // Make sure we use the same methodology as
+  // ClangASTContext::StartTagDeclarationDefinition() as to how we start/end
+  // the definition.
+  const clang::TagType *tag_type = qual_type->getAs<clang::TagType>();
+  if (tag_type) {
+    clang::TagDecl *tag_decl = tag_type->getDecl();
 
-    const clang::EnumType *enutype = qual_type->getAs<clang::EnumType>();
-
-    if (enutype) {
-      clang::EnumDecl *enum_decl = enutype->getDecl();
-
-      if (enum_decl) {
-        if (!enum_decl->isCompleteDefinition()) {
-          ClangASTContext *lldb_ast =
-              llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
-          if (lldb_ast == nullptr)
-            return false;
-          clang::ASTContext *ast = lldb_ast->getASTContext();
-
-          /// TODO This really needs to be fixed.
-
-          QualType integer_type(enum_decl->getIntegerType());
-          if (!integer_type.isNull()) {
-            unsigned NumPositiveBits = 1;
-            unsigned NumNegativeBits = 0;
-
-            clang::QualType promotion_qual_type;
-            // If the enum integer type is less than an integer in bit width,
-            // then we must promote it to an integer size.
-            if (ast->getTypeSize(enum_decl->getIntegerType()) <
-                ast->getTypeSize(ast->IntTy)) {
-              if (enum_decl->getIntegerType()->isSignedIntegerType())
-                promotion_qual_type = ast->IntTy;
-              else
-                promotion_qual_type = ast->UnsignedIntTy;
-            } else
-              promotion_qual_type = enum_decl->getIntegerType();
-
-            enum_decl->completeDefinition(enum_decl->getIntegerType(),
-                                          promotion_qual_type, NumPositiveBits,
-                                          NumNegativeBits);
-          }
-        }
-        return true;
-      }
+    if (auto *cxx_record_decl = llvm::dyn_cast<CXXRecordDecl>(tag_decl)) {
+      if (!cxx_record_decl->isCompleteDefinition())
+        cxx_record_decl->completeDefinition();
+      cxx_record_decl->setHasLoadedFieldsFromExternalStorage(true);
+      cxx_record_decl->setHasExternalLexicalStorage(false);
+      cxx_record_decl->setHasExternalVisibleStorage(false);
+      return true;
     }
   }
-  return false;
+
+  const clang::EnumType *enutype = qual_type->getAs<clang::EnumType>();
+
+  if (!enutype)
+    return false;
+  clang::EnumDecl *enum_decl = enutype->getDecl();
+
+  if (enum_decl->isCompleteDefinition())
+    return true;
+
+  ClangASTContext *lldb_ast =
+      llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
+  if (lldb_ast == nullptr)
+    return false;
+  clang::ASTContext &ast = lldb_ast->getASTContext();
+
+  /// TODO This really needs to be fixed.
+
+  QualType integer_type(enum_decl->getIntegerType());
+  if (!integer_type.isNull()) {
+    unsigned NumPositiveBits = 1;
+    unsigned NumNegativeBits = 0;
+
+    clang::QualType promotion_qual_type;
+    // If the enum integer type is less than an integer in bit width,
+    // then we must promote it to an integer size.
+    if (ast.getTypeSize(enum_decl->getIntegerType()) <
+        ast.getTypeSize(ast.IntTy)) {
+      if (enum_decl->getIntegerType()->isSignedIntegerType())
+        promotion_qual_type = ast.IntTy;
+      else
+        promotion_qual_type = ast.UnsignedIntTy;
+    } else
+      promotion_qual_type = enum_decl->getIntegerType();
+
+    enum_decl->completeDefinition(enum_decl->getIntegerType(),
+                                  promotion_qual_type, NumPositiveBits,
+                                  NumNegativeBits);
+  }
+  return true;
 }
 
 clang::EnumConstantDecl *ClangASTContext::AddEnumerationValueToEnumerationType(
@@ -9001,8 +7862,8 @@
     return nullptr;
 
   clang::EnumConstantDecl *enumerator_decl = clang::EnumConstantDecl::Create(
-      *getASTContext(), enutype->getDecl(), clang::SourceLocation(),
-      name ? &getASTContext()->Idents.get(name) : nullptr, // Identifier
+      getASTContext(), enutype->getDecl(), clang::SourceLocation(),
+      name ? &getASTContext().Idents.get(name) : nullptr, // Identifier
       clang::QualType(enutype, 0), nullptr, value);
 
   if (!enumerator_decl)
@@ -9041,7 +7902,7 @@
     if (enutype) {
       clang::EnumDecl *enum_decl = enutype->getDecl();
       if (enum_decl)
-        return CompilerType(getASTContext(), enum_decl->getIntegerType());
+        return GetType(enum_decl->getIntegerType());
     }
   }
   return CompilerType();
@@ -9056,47 +7917,13 @@
         llvm::dyn_cast<ClangASTContext>(type.GetTypeSystem());
     if (!ast)
       return CompilerType();
-    return CompilerType(ast->getASTContext(),
-                        ast->getASTContext()->getMemberPointerType(
-                            ClangUtil::GetQualType(pointee_type),
-                            ClangUtil::GetQualType(type).getTypePtr()));
+    return ast->GetType(ast->getASTContext().getMemberPointerType(
+        ClangUtil::GetQualType(pointee_type),
+        ClangUtil::GetQualType(type).getTypePtr()));
   }
   return CompilerType();
 }
 
-size_t
-ClangASTContext::ConvertStringToFloatValue(lldb::opaque_compiler_type_t type,
-                                           const char *s, uint8_t *dst,
-                                           size_t dst_size) {
-  if (type) {
-    clang::QualType qual_type(GetCanonicalQualType(type));
-    uint32_t count = 0;
-    bool is_complex = false;
-    if (IsFloatingPointType(type, count, is_complex)) {
-      // TODO: handle complex and vector types
-      if (count != 1)
-        return false;
-
-      llvm::StringRef s_sref(s);
-      llvm::APFloat ap_float(getASTContext()->getFloatTypeSemantics(qual_type),
-                             s_sref);
-
-      const uint64_t bit_size = getASTContext()->getTypeSize(qual_type);
-      const uint64_t byte_size = bit_size / 8;
-      if (dst_size >= byte_size) {
-        Scalar scalar = ap_float.bitcastToAPInt().zextOrTrunc(
-            llvm::NextPowerOf2(byte_size) * 8);
-        lldb_private::Status get_data_error;
-        if (scalar.GetAsMemoryData(dst, byte_size,
-                                   lldb_private::endian::InlHostByteOrder(),
-                                   get_data_error))
-          return byte_size;
-      }
-    }
-  }
-  return 0;
-}
-
 // Dumping types
 #define DEPTH_INCREMENT 2
 
@@ -9115,9 +7942,49 @@
   tu->dump(s.AsRawOstream());
 }
 
+void ClangASTContext::DumpFromSymbolFile(Stream &s,
+                                         llvm::StringRef symbol_name) {
+  SymbolFile *symfile = GetSymbolFile();
+
+  if (!symfile)
+    return;
+
+  lldb_private::TypeList type_list;
+  symfile->GetTypes(nullptr, eTypeClassAny, type_list);
+  size_t ntypes = type_list.GetSize();
+
+  for (size_t i = 0; i < ntypes; ++i) {
+    TypeSP type = type_list.GetTypeAtIndex(i);
+
+    if (!symbol_name.empty())
+      if (symbol_name != type->GetName().GetStringRef())
+        continue;
+
+    s << type->GetName().AsCString() << "\n";
+
+    CompilerType full_type = type->GetFullCompilerType();
+    if (clang::TagDecl *tag_decl = GetAsTagDecl(full_type)) {
+      tag_decl->dump(s.AsRawOstream());
+      continue;
+    }
+    if (clang::TypedefNameDecl *typedef_decl = GetAsTypedefDecl(full_type)) {
+      typedef_decl->dump(s.AsRawOstream());
+      continue;
+    }
+    if (auto *objc_obj = llvm::dyn_cast<clang::ObjCObjectType>(
+            ClangUtil::GetQualType(full_type).getTypePtr())) {
+      if (clang::ObjCInterfaceDecl *interface_decl = objc_obj->getInterface()) {
+        interface_decl->dump(s.AsRawOstream());
+        continue;
+      }
+    }
+    GetCanonicalQualType(full_type.GetOpaqueQualType()).dump(s.AsRawOstream());
+  }
+}
+
 void ClangASTContext::DumpValue(
     lldb::opaque_compiler_type_t type, ExecutionContext *exe_ctx, Stream *s,
-    lldb::Format format, const DataExtractor &data,
+    lldb::Format format, const lldb_private::DataExtractor &data,
     lldb::offset_t data_byte_offset, size_t data_byte_size,
     uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset, bool show_types,
     bool show_summary, bool verbose, uint32_t depth) {
@@ -9135,7 +8002,7 @@
       uint32_t field_bit_offset = 0;
       uint32_t field_byte_offset = 0;
       const clang::ASTRecordLayout &record_layout =
-          getASTContext()->getASTRecordLayout(record_decl);
+          getASTContext().getASTRecordLayout(record_decl);
       uint32_t child_idx = 0;
 
       const clang::CXXRecordDecl *cxx_record_decl =
@@ -9179,10 +8046,10 @@
                     base_class_type_name);
 
           clang::TypeInfo base_class_type_info =
-              getASTContext()->getTypeInfo(base_class_qual_type);
+              getASTContext().getTypeInfo(base_class_qual_type);
 
           // Dump the value of the member
-          CompilerType base_clang_type(getASTContext(), base_class_qual_type);
+          CompilerType base_clang_type = GetType(base_class_qual_type);
           base_clang_type.DumpValue(
               exe_ctx,
               s, // Stream to dump to
@@ -9225,7 +8092,7 @@
         // Figure out the type byte size (field_type_info.first) and alignment
         // (field_type_info.second) from the AST context.
         clang::TypeInfo field_type_info =
-            getASTContext()->getTypeInfo(field_type);
+            getASTContext().getTypeInfo(field_type);
         assert(field_idx < record_layout.getFieldCount());
         // Figure out the field offset within the current struct/union/class
         // type
@@ -9233,8 +8100,7 @@
         field_byte_offset = field_bit_offset / 8;
         uint32_t field_bitfield_bit_size = 0;
         uint32_t field_bitfield_bit_offset = 0;
-        if (ClangASTContext::FieldIsBitfield(getASTContext(), *field,
-                                             field_bitfield_bit_size))
+        if (FieldIsBitfield(*field, field_bitfield_bit_size))
           field_bitfield_bit_offset = field_bit_offset % 8;
 
         if (show_types) {
@@ -9249,7 +8115,7 @@
         s->Printf("%s = ", field->getNameAsString().c_str());
 
         // Dump the value of the member
-        CompilerType field_clang_type(getASTContext(), field_type);
+        CompilerType field_clang_type = GetType(field_type);
         field_clang_type.DumpValue(
             exe_ctx,
             s, // Stream to dump to
@@ -9314,7 +8180,7 @@
     const uint64_t element_count = array->getSize().getLimitedValue();
 
     clang::TypeInfo field_type_info =
-        getASTContext()->getTypeInfo(element_qual_type);
+        getASTContext().getTypeInfo(element_qual_type);
 
     uint32_t element_idx = 0;
     uint32_t element_offset = 0;
@@ -9329,7 +8195,7 @@
       s->PutChar('"');
       return;
     } else {
-      CompilerType element_clang_type(getASTContext(), element_qual_type);
+      CompilerType element_clang_type = GetType(element_qual_type);
       lldb::Format element_format = element_clang_type.GetFormat();
 
       for (element_idx = 0; element_idx < element_count; ++element_idx) {
@@ -9380,10 +8246,10 @@
             ->getDecl()
             ->getUnderlyingType();
 
-    CompilerType typedef_clang_type(getASTContext(), typedef_qual_type);
+    CompilerType typedef_clang_type = GetType(typedef_qual_type);
     lldb::Format typedef_format = typedef_clang_type.GetFormat();
     clang::TypeInfo typedef_type_info =
-        getASTContext()->getTypeInfo(typedef_qual_type);
+        getASTContext().getTypeInfo(typedef_qual_type);
     uint64_t typedef_byte_size = typedef_type_info.Width / 8;
 
     return typedef_clang_type.DumpValue(
@@ -9405,10 +8271,10 @@
   case clang::Type::Auto: {
     clang::QualType elaborated_qual_type =
         llvm::cast<clang::AutoType>(qual_type)->getDeducedType();
-    CompilerType elaborated_clang_type(getASTContext(), elaborated_qual_type);
+    CompilerType elaborated_clang_type = GetType(elaborated_qual_type);
     lldb::Format elaborated_format = elaborated_clang_type.GetFormat();
     clang::TypeInfo elaborated_type_info =
-        getASTContext()->getTypeInfo(elaborated_qual_type);
+        getASTContext().getTypeInfo(elaborated_qual_type);
     uint64_t elaborated_byte_size = elaborated_type_info.Width / 8;
 
     return elaborated_clang_type.DumpValue(
@@ -9430,10 +8296,10 @@
   case clang::Type::Elaborated: {
     clang::QualType elaborated_qual_type =
         llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType();
-    CompilerType elaborated_clang_type(getASTContext(), elaborated_qual_type);
+    CompilerType elaborated_clang_type = GetType(elaborated_qual_type);
     lldb::Format elaborated_format = elaborated_clang_type.GetFormat();
     clang::TypeInfo elaborated_type_info =
-        getASTContext()->getTypeInfo(elaborated_qual_type);
+        getASTContext().getTypeInfo(elaborated_qual_type);
     uint64_t elaborated_byte_size = elaborated_type_info.Width / 8;
 
     return elaborated_clang_type.DumpValue(
@@ -9455,11 +8321,11 @@
   case clang::Type::Paren: {
     clang::QualType desugar_qual_type =
         llvm::cast<clang::ParenType>(qual_type)->desugar();
-    CompilerType desugar_clang_type(getASTContext(), desugar_qual_type);
+    CompilerType desugar_clang_type = GetType(desugar_qual_type);
 
     lldb::Format desugar_format = desugar_clang_type.GetFormat();
     clang::TypeInfo desugar_type_info =
-        getASTContext()->getTypeInfo(desugar_qual_type);
+        getASTContext().getTypeInfo(desugar_qual_type);
     uint64_t desugar_byte_size = desugar_type_info.Width / 8;
 
     return desugar_clang_type.DumpValue(
@@ -9490,10 +8356,90 @@
   }
 }
 
+static bool DumpEnumValue(const clang::QualType &qual_type, Stream *s,
+                          const DataExtractor &data, lldb::offset_t byte_offset,
+                          size_t byte_size, uint32_t bitfield_bit_offset,
+                          uint32_t bitfield_bit_size) {
+  const clang::EnumType *enutype =
+      llvm::cast<clang::EnumType>(qual_type.getTypePtr());
+  const clang::EnumDecl *enum_decl = enutype->getDecl();
+  assert(enum_decl);
+  lldb::offset_t offset = byte_offset;
+  const uint64_t enum_svalue = data.GetMaxS64Bitfield(
+      &offset, byte_size, bitfield_bit_size, bitfield_bit_offset);
+  bool can_be_bitfield = true;
+  uint64_t covered_bits = 0;
+  int num_enumerators = 0;
+
+  // Try to find an exact match for the value.
+  // At the same time, we're applying a heuristic to determine whether we want
+  // to print this enum as a bitfield. We're likely dealing with a bitfield if
+  // every enumrator is either a one bit value or a superset of the previous
+  // enumerators. Also 0 doesn't make sense when the enumerators are used as
+  // flags.
+  for (auto enumerator : enum_decl->enumerators()) {
+    uint64_t val = enumerator->getInitVal().getSExtValue();
+    val = llvm::SignExtend64(val, 8*byte_size);
+    if (llvm::countPopulation(val) != 1 && (val & ~covered_bits) != 0)
+      can_be_bitfield = false;
+    covered_bits |= val;
+    ++num_enumerators;
+    if (val == enum_svalue) {
+      // Found an exact match, that's all we need to do.
+      s->PutCString(enumerator->getNameAsString());
+      return true;
+    }
+  }
+
+  // Unsigned values make more sense for flags.
+  offset = byte_offset;
+  const uint64_t enum_uvalue = data.GetMaxU64Bitfield(
+      &offset, byte_size, bitfield_bit_size, bitfield_bit_offset);
+
+  // No exact match, but we don't think this is a bitfield. Print the value as
+  // decimal.
+  if (!can_be_bitfield) {
+    if (qual_type->isSignedIntegerOrEnumerationType())
+      s->Printf("%" PRIi64, enum_svalue);
+    else
+      s->Printf("%" PRIu64, enum_uvalue);
+    return true;
+  }
+
+  uint64_t remaining_value = enum_uvalue;
+  std::vector<std::pair<uint64_t, llvm::StringRef>> values;
+  values.reserve(num_enumerators);
+  for (auto enumerator : enum_decl->enumerators())
+    if (auto val = enumerator->getInitVal().getZExtValue())
+      values.emplace_back(val, enumerator->getName());
+
+  // Sort in reverse order of the number of the population count,  so that in
+  // `enum {A, B, ALL = A|B }` we visit ALL first. Use a stable sort so that
+  // A | C where A is declared before C is displayed in this order.
+  std::stable_sort(values.begin(), values.end(), [](const auto &a, const auto &b) {
+        return llvm::countPopulation(a.first) > llvm::countPopulation(b.first);
+      });
+
+  for (const auto &val : values) {
+    if ((remaining_value & val.first) != val.first)
+      continue;
+    remaining_value &= ~val.first;
+    s->PutCString(val.second);
+    if (remaining_value)
+      s->PutCString(" | ");
+  }
+
+  // If there is a remainder that is not covered by the value, print it as hex.
+  if (remaining_value)
+    s->Printf("0x%" PRIx64, remaining_value);
+
+  return true;
+}
+
 bool ClangASTContext::DumpTypeValue(
     lldb::opaque_compiler_type_t type, Stream *s, lldb::Format format,
-    const DataExtractor &data, lldb::offset_t byte_offset, size_t byte_size,
-    uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
+    const lldb_private::DataExtractor &data, lldb::offset_t byte_offset,
+    size_t byte_size, uint32_t bitfield_bit_size, uint32_t bitfield_bit_offset,
     ExecutionContextScope *exe_scope) {
   if (!type)
     return false;
@@ -9503,17 +8449,24 @@
     clang::QualType qual_type(GetQualType(type));
 
     const clang::Type::TypeClass type_class = qual_type->getTypeClass();
+
+    if (type_class == clang::Type::Elaborated) {
+      qual_type = llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType();
+      return DumpTypeValue(qual_type.getAsOpaquePtr(), s, format, data, byte_offset, byte_size,
+                           bitfield_bit_size, bitfield_bit_offset, exe_scope);
+    }
+
     switch (type_class) {
     case clang::Type::Typedef: {
       clang::QualType typedef_qual_type =
           llvm::cast<clang::TypedefType>(qual_type)
               ->getDecl()
               ->getUnderlyingType();
-      CompilerType typedef_clang_type(getASTContext(), typedef_qual_type);
+      CompilerType typedef_clang_type = GetType(typedef_qual_type);
       if (format == eFormatDefault)
         format = typedef_clang_type.GetFormat();
       clang::TypeInfo typedef_type_info =
-          getASTContext()->getTypeInfo(typedef_qual_type);
+          getASTContext().getTypeInfo(typedef_qual_type);
       uint64_t typedef_byte_size = typedef_type_info.Width / 8;
 
       return typedef_clang_type.DumpTypeValue(
@@ -9533,45 +8486,9 @@
       // If our format is enum or default, show the enumeration value as its
       // enumeration string value, else just display it as requested.
       if ((format == eFormatEnum || format == eFormatDefault) &&
-          GetCompleteType(type)) {
-        const clang::EnumType *enutype =
-            llvm::cast<clang::EnumType>(qual_type.getTypePtr());
-        const clang::EnumDecl *enum_decl = enutype->getDecl();
-        assert(enum_decl);
-        clang::EnumDecl::enumerator_iterator enum_pos, enum_end_pos;
-        const bool is_signed = qual_type->isSignedIntegerOrEnumerationType();
-        lldb::offset_t offset = byte_offset;
-        if (is_signed) {
-          const int64_t enum_svalue = data.GetMaxS64Bitfield(
-              &offset, byte_size, bitfield_bit_size, bitfield_bit_offset);
-          for (enum_pos = enum_decl->enumerator_begin(),
-              enum_end_pos = enum_decl->enumerator_end();
-               enum_pos != enum_end_pos; ++enum_pos) {
-            if (enum_pos->getInitVal().getSExtValue() == enum_svalue) {
-              s->PutCString(enum_pos->getNameAsString());
-              return true;
-            }
-          }
-          // If we have gotten here we didn't get find the enumerator in the
-          // enum decl, so just print the integer.
-          s->Printf("%" PRIi64, enum_svalue);
-        } else {
-          const uint64_t enum_uvalue = data.GetMaxU64Bitfield(
-              &offset, byte_size, bitfield_bit_size, bitfield_bit_offset);
-          for (enum_pos = enum_decl->enumerator_begin(),
-              enum_end_pos = enum_decl->enumerator_end();
-               enum_pos != enum_end_pos; ++enum_pos) {
-            if (enum_pos->getInitVal().getZExtValue() == enum_uvalue) {
-              s->PutCString(enum_pos->getNameAsString());
-              return true;
-            }
-          }
-          // If we have gotten here we didn't get find the enumerator in the
-          // enum decl, so just print the integer.
-          s->Printf("%" PRIu64, enum_uvalue);
-        }
-        return true;
-      }
+          GetCompleteType(type))
+        return DumpEnumValue(qual_type, s, data, byte_offset, byte_size,
+                             bitfield_bit_offset, bitfield_bit_size);
       // format was not enum, just fall through and dump the value as
       // requested....
       LLVM_FALLTHROUGH;
@@ -9690,8 +8607,10 @@
 void ClangASTContext::DumpTypeDescription(lldb::opaque_compiler_type_t type) {
   StreamFile s(stdout, false);
   DumpTypeDescription(type, &s);
-  ClangASTMetadata *metadata =
-      ClangASTContext::GetMetadata(getASTContext(), type);
+
+  CompilerType ct(this, type);
+  const clang::Type *clang_type = ClangUtil::GetQualType(ct).getTypePtr();
+  ClangASTMetadata *metadata = GetMetadata(clang_type);
   if (metadata) {
     metadata->Dump(&s);
   }
@@ -9700,7 +8619,8 @@
 void ClangASTContext::DumpTypeDescription(lldb::opaque_compiler_type_t type,
                                           Stream *s) {
   if (type) {
-    clang::QualType qual_type(GetQualType(type));
+    clang::QualType qual_type =
+        RemoveWrappingTypes(GetQualType(type), {clang::Type::Typedef});
 
     llvm::SmallVector<char, 1024> buf;
     llvm::raw_svector_ostream llvm_ostrm(buf);
@@ -9718,7 +8638,7 @@
         clang::ObjCInterfaceDecl *class_interface_decl =
             objc_class_type->getInterface();
         if (class_interface_decl) {
-          clang::PrintingPolicy policy = getASTContext()->getPrintingPolicy();
+          clang::PrintingPolicy policy = getASTContext().getPrintingPolicy();
           class_interface_decl->print(llvm_ostrm, policy, s->GetIndentLevel());
         }
       }
@@ -9738,24 +8658,6 @@
       }
     } break;
 
-    case clang::Type::Auto:
-      CompilerType(getASTContext(),
-                   llvm::cast<clang::AutoType>(qual_type)->getDeducedType())
-          .DumpTypeDescription(s);
-      return;
-
-    case clang::Type::Elaborated:
-      CompilerType(getASTContext(),
-                   llvm::cast<clang::ElaboratedType>(qual_type)->getNamedType())
-          .DumpTypeDescription(s);
-      return;
-
-    case clang::Type::Paren:
-      CompilerType(getASTContext(),
-                   llvm::cast<clang::ParenType>(qual_type)->desugar())
-          .DumpTypeDescription(s);
-      return;
-
     case clang::Type::Record: {
       GetCompleteType(type);
 
@@ -9766,10 +8668,10 @@
           llvm::dyn_cast<clang::CXXRecordDecl>(record_decl);
 
       if (cxx_record_decl)
-        cxx_record_decl->print(llvm_ostrm, getASTContext()->getPrintingPolicy(),
+        cxx_record_decl->print(llvm_ostrm, getASTContext().getPrintingPolicy(),
                                s->GetIndentLevel());
       else
-        record_decl->print(llvm_ostrm, getASTContext()->getPrintingPolicy(),
+        record_decl->print(llvm_ostrm, getASTContext().getPrintingPolicy(),
                            s->GetIndentLevel());
     } break;
 
@@ -9881,9 +8783,8 @@
   return nullptr;
 }
 
-void ClangASTContext::CompleteTagDecl(void *baton, clang::TagDecl *decl) {
-  ClangASTContext *ast = (ClangASTContext *)baton;
-  SymbolFile *sym_file = ast->GetSymbolFile();
+void ClangASTContext::CompleteTagDecl(clang::TagDecl *decl) {
+  SymbolFile *sym_file = GetSymbolFile();
   if (sym_file) {
     CompilerType clang_type = GetTypeForDecl(decl);
     if (clang_type)
@@ -9892,9 +8793,8 @@
 }
 
 void ClangASTContext::CompleteObjCInterfaceDecl(
-    void *baton, clang::ObjCInterfaceDecl *decl) {
-  ClangASTContext *ast = (ClangASTContext *)baton;
-  SymbolFile *sym_file = ast->GetSymbolFile();
+    clang::ObjCInterfaceDecl *decl) {
+  SymbolFile *sym_file = GetSymbolFile();
   if (sym_file) {
     CompilerType clang_type = GetTypeForDecl(decl);
     if (clang_type)
@@ -9915,19 +8815,18 @@
 }
 
 bool ClangASTContext::LayoutRecordType(
-    void *baton, const clang::RecordDecl *record_decl, uint64_t &bit_size,
+    const clang::RecordDecl *record_decl, uint64_t &bit_size,
     uint64_t &alignment,
     llvm::DenseMap<const clang::FieldDecl *, uint64_t> &field_offsets,
     llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
         &base_offsets,
     llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
         &vbase_offsets) {
-  ClangASTContext *ast = (ClangASTContext *)baton;
   lldb_private::ClangASTImporter *importer = nullptr;
-  if (ast->m_dwarf_ast_parser_up)
-    importer = &ast->m_dwarf_ast_parser_up->GetClangASTImporter();
-  if (!importer && ast->m_pdb_ast_parser_up)
-    importer = &ast->m_pdb_ast_parser_up->GetClangASTImporter();
+  if (m_dwarf_ast_parser_up)
+    importer = &m_dwarf_ast_parser_up->GetClangASTImporter();
+  if (!importer && m_pdb_ast_parser_up)
+    importer = &m_pdb_ast_parser_up->GetClangASTImporter();
   if (!importer)
     return false;
 
@@ -9975,19 +8874,17 @@
 
 CompilerDeclContext ClangASTContext::DeclGetDeclContext(void *opaque_decl) {
   if (opaque_decl)
-    return CompilerDeclContext(this,
-                               ((clang::Decl *)opaque_decl)->getDeclContext());
-  else
-    return CompilerDeclContext();
+    return CreateDeclContext(((clang::Decl *)opaque_decl)->getDeclContext());
+  return CompilerDeclContext();
 }
 
 CompilerType ClangASTContext::DeclGetFunctionReturnType(void *opaque_decl) {
   if (clang::FunctionDecl *func_decl =
           llvm::dyn_cast<clang::FunctionDecl>((clang::Decl *)opaque_decl))
-    return CompilerType(this, func_decl->getReturnType().getAsOpaquePtr());
+    return GetType(func_decl->getReturnType());
   if (clang::ObjCMethodDecl *objc_method =
           llvm::dyn_cast<clang::ObjCMethodDecl>((clang::Decl *)opaque_decl))
-    return CompilerType(this, objc_method->getReturnType().getAsOpaquePtr());
+    return GetType(objc_method->getReturnType());
   else
     return CompilerType();
 }
@@ -10010,15 +8907,13 @@
     if (idx < func_decl->param_size()) {
       ParmVarDecl *var_decl = func_decl->getParamDecl(idx);
       if (var_decl)
-        return CompilerType(this, var_decl->getOriginalType().getAsOpaquePtr());
+        return GetType(var_decl->getOriginalType());
     }
   } else if (clang::ObjCMethodDecl *objc_method =
                  llvm::dyn_cast<clang::ObjCMethodDecl>(
                      (clang::Decl *)opaque_decl)) {
     if (idx < objc_method->param_size())
-      return CompilerType(
-          this,
-          objc_method->parameters()[idx]->getOriginalType().getAsOpaquePtr());
+      return GetType(objc_method->parameters()[idx]->getOriginalType());
   }
   return CompilerType();
 }
@@ -10044,7 +8939,7 @@
         if (!searched.insert(it->second).second)
           continue;
         symbol_file->ParseDeclsForContext(
-            CompilerDeclContext(this, it->second));
+            CreateDeclContext(it->second));
 
         for (clang::Decl *child : it->second->decls()) {
           if (clang::UsingDirectiveDecl *ud =
@@ -10159,7 +9054,7 @@
 
         searched.insert(it->second);
         symbol_file->ParseDeclsForContext(
-            CompilerDeclContext(this, it->second));
+            CreateDeclContext(it->second));
 
         for (clang::Decl *child : it->second->decls()) {
           if (clang::UsingDirectiveDecl *ud =
@@ -10186,7 +9081,7 @@
                   continue;
                 // Check types, if one was provided.
                 if (child_type) {
-                  CompilerType clang_type = ClangASTContext::GetTypeForDecl(nd);
+                  CompilerType clang_type = GetTypeForDecl(nd);
                   if (!AreTypesSame(clang_type, *child_type,
                                     /*ignore_qualifiers=*/true))
                     continue;
@@ -10204,13 +9099,6 @@
   return LLDB_INVALID_DECL_LEVEL;
 }
 
-bool ClangASTContext::DeclContextIsStructUnionOrClass(void *opaque_decl_ctx) {
-  if (opaque_decl_ctx)
-    return ((clang::DeclContext *)opaque_decl_ctx)->isRecord();
-  else
-    return false;
-}
-
 ConstString ClangASTContext::DeclContextGetName(void *opaque_decl_ctx) {
   if (opaque_decl_ctx) {
     clang::NamedDecl *named_decl =
@@ -10258,8 +9146,7 @@
       return true;
     } else if (clang::FunctionDecl *function_decl =
                    llvm::dyn_cast<clang::FunctionDecl>(decl_ctx)) {
-      ClangASTMetadata *metadata =
-          GetMetadata(&decl_ctx->getParentASTContext(), function_decl);
+      ClangASTMetadata *metadata = GetMetadata(function_decl);
       if (metadata && metadata->HasObjectPtr()) {
         if (is_instance_method_ptr)
           *is_instance_method_ptr = true;
@@ -10291,16 +9178,20 @@
   return false;
 }
 
+static bool IsClangDeclContext(const CompilerDeclContext &dc) {
+  return dc.IsValid() && isa<ClangASTContext>(dc.GetTypeSystem());
+}
+
 clang::DeclContext *
 ClangASTContext::DeclContextGetAsDeclContext(const CompilerDeclContext &dc) {
-  if (dc.IsClang())
+  if (IsClangDeclContext(dc))
     return (clang::DeclContext *)dc.GetOpaqueDeclContext();
   return nullptr;
 }
 
 ObjCMethodDecl *
 ClangASTContext::DeclContextGetAsObjCMethodDecl(const CompilerDeclContext &dc) {
-  if (dc.IsClang())
+  if (IsClangDeclContext(dc))
     return llvm::dyn_cast<clang::ObjCMethodDecl>(
         (clang::DeclContext *)dc.GetOpaqueDeclContext());
   return nullptr;
@@ -10308,7 +9199,7 @@
 
 CXXMethodDecl *
 ClangASTContext::DeclContextGetAsCXXMethodDecl(const CompilerDeclContext &dc) {
-  if (dc.IsClang())
+  if (IsClangDeclContext(dc))
     return llvm::dyn_cast<clang::CXXMethodDecl>(
         (clang::DeclContext *)dc.GetOpaqueDeclContext());
   return nullptr;
@@ -10316,7 +9207,7 @@
 
 clang::FunctionDecl *
 ClangASTContext::DeclContextGetAsFunctionDecl(const CompilerDeclContext &dc) {
-  if (dc.IsClang())
+  if (IsClangDeclContext(dc))
     return llvm::dyn_cast<clang::FunctionDecl>(
         (clang::DeclContext *)dc.GetOpaqueDeclContext());
   return nullptr;
@@ -10324,7 +9215,7 @@
 
 clang::NamespaceDecl *
 ClangASTContext::DeclContextGetAsNamespaceDecl(const CompilerDeclContext &dc) {
-  if (dc.IsClang())
+  if (IsClangDeclContext(dc))
     return llvm::dyn_cast<clang::NamespaceDecl>(
         (clang::DeclContext *)dc.GetOpaqueDeclContext());
   return nullptr;
@@ -10332,11 +9223,9 @@
 
 ClangASTMetadata *
 ClangASTContext::DeclContextGetMetaData(const CompilerDeclContext &dc,
-                                        const void *object) {
-  clang::ASTContext *ast = DeclContextGetClangASTContext(dc);
-  if (ast)
-    return ClangASTContext::GetMetadata(ast, object);
-  return nullptr;
+                                        const Decl *object) {
+  ClangASTContext *ast = llvm::cast<ClangASTContext>(dc.GetTypeSystem());
+  return ast->GetMetadata(object);
 }
 
 clang::ASTContext *
@@ -10344,14 +9233,26 @@
   ClangASTContext *ast =
       llvm::dyn_cast_or_null<ClangASTContext>(dc.GetTypeSystem());
   if (ast)
-    return ast->getASTContext();
+    return &ast->getASTContext();
   return nullptr;
 }
 
-ClangASTContextForExpressions::ClangASTContextForExpressions(Target &target)
-    : ClangASTContext(target.GetArchitecture().GetTriple().getTriple().c_str()),
-      m_target_wp(target.shared_from_this()),
-      m_persistent_variables(new ClangPersistentVariables) {}
+ClangASTContextForExpressions::ClangASTContextForExpressions(
+    Target &target, llvm::Triple triple)
+    : ClangASTContext(triple), m_target_wp(target.shared_from_this()),
+      m_persistent_variables(new ClangPersistentVariables) {
+  m_scratch_ast_source_up.reset(new ClangASTSource(
+      target.shared_from_this(), target.GetClangASTImporter()));
+  m_scratch_ast_source_up->InstallASTContext(*this);
+  llvm::IntrusiveRefCntPtr<clang::ExternalASTSource> proxy_ast_source(
+      m_scratch_ast_source_up->CreateProxy());
+  SetExternalSource(proxy_ast_source);
+}
+
+void ClangASTContextForExpressions::Finalize() {
+  ClangASTContext::Finalize();
+  m_scratch_ast_source_up.reset();
+}
 
 UserExpression *ClangASTContextForExpressions::GetUserExpression(
     llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language,
@@ -10395,9 +9296,3 @@
 ClangASTContextForExpressions::GetPersistentExpressionState() {
   return m_persistent_variables.get();
 }
-
-clang::ExternalASTMerger &
-ClangASTContextForExpressions::GetMergerUnchecked() {
-  lldbassert(m_scratch_ast_source_up != nullptr);
-  return m_scratch_ast_source_up->GetMergerUnchecked();
-}
diff --git a/src/llvm-project/lldb/source/Symbol/ClangASTImporter.cpp b/src/llvm-project/lldb/source/Symbol/ClangASTImporter.cpp
index 32d0c47..8cb4042 100644
--- a/src/llvm-project/lldb/source/Symbol/ClangASTImporter.cpp
+++ b/src/llvm-project/lldb/source/Symbol/ClangASTImporter.cpp
@@ -9,7 +9,7 @@
 #include "lldb/Symbol/ClangASTImporter.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
+#include "lldb/Symbol/ClangASTMetadata.h"
 #include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Utility/LLDBAssert.h"
 #include "lldb/Utility/Log.h"
@@ -25,90 +25,46 @@
 using namespace lldb_private;
 using namespace clang;
 
-ClangASTMetrics::Counters ClangASTMetrics::global_counters = {0, 0, 0, 0, 0, 0};
-ClangASTMetrics::Counters ClangASTMetrics::local_counters = {0, 0, 0, 0, 0, 0};
+CompilerType ClangASTImporter::CopyType(ClangASTContext &dst_ast,
+                                        const CompilerType &src_type) {
+  clang::ASTContext &dst_clang_ast = dst_ast.getASTContext();
 
-void ClangASTMetrics::DumpCounters(Log *log,
-                                   ClangASTMetrics::Counters &counters) {
-  log->Printf("  Number of visible Decl queries by name     : %" PRIu64,
-              counters.m_visible_query_count);
-  log->Printf("  Number of lexical Decl queries             : %" PRIu64,
-              counters.m_lexical_query_count);
-  log->Printf("  Number of imports initiated by LLDB        : %" PRIu64,
-              counters.m_lldb_import_count);
-  log->Printf("  Number of imports conducted by Clang       : %" PRIu64,
-              counters.m_clang_import_count);
-  log->Printf("  Number of Decls completed                  : %" PRIu64,
-              counters.m_decls_completed_count);
-  log->Printf("  Number of records laid out                 : %" PRIu64,
-              counters.m_record_layout_count);
-}
+  ClangASTContext *src_ast =
+      llvm::dyn_cast_or_null<ClangASTContext>(src_type.GetTypeSystem());
+  if (!src_ast)
+    return CompilerType();
 
-void ClangASTMetrics::DumpCounters(Log *log) {
-  if (!log)
-    return;
+  clang::ASTContext &src_clang_ast = src_ast->getASTContext();
 
-  log->Printf("== ClangASTMetrics output ==");
-  log->Printf("-- Global metrics --");
-  DumpCounters(log, global_counters);
-  log->Printf("-- Local metrics --");
-  DumpCounters(log, local_counters);
-}
+  clang::QualType src_qual_type = ClangUtil::GetQualType(src_type);
 
-clang::QualType ClangASTImporter::CopyType(clang::ASTContext *dst_ast,
-                                           clang::ASTContext *src_ast,
-                                           clang::QualType type) {
-  ImporterDelegateSP delegate_sp(GetDelegate(dst_ast, src_ast));
-
-  ASTImporterDelegate::CxxModuleScope std_scope(*delegate_sp, dst_ast);
-
+  ImporterDelegateSP delegate_sp(GetDelegate(&dst_clang_ast, &src_clang_ast));
   if (!delegate_sp)
-    return QualType();
+    return CompilerType();
 
-  llvm::Expected<QualType> ret_or_error = delegate_sp->Import(type);
+  ASTImporterDelegate::CxxModuleScope std_scope(*delegate_sp, &dst_clang_ast);
+
+  llvm::Expected<QualType> ret_or_error = delegate_sp->Import(src_qual_type);
   if (!ret_or_error) {
     Log *log =
       lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
     LLDB_LOG_ERROR(log, ret_or_error.takeError(),
         "Couldn't import type: {0}");
-    return QualType();
+    return CompilerType();
   }
-  return *ret_or_error;
-}
 
-lldb::opaque_compiler_type_t
-ClangASTImporter::CopyType(clang::ASTContext *dst_ast,
-                           clang::ASTContext *src_ast,
-                           lldb::opaque_compiler_type_t type) {
-  return CopyType(dst_ast, src_ast, QualType::getFromOpaquePtr(type))
-      .getAsOpaquePtr();
-}
+  lldb::opaque_compiler_type_t dst_clang_type = ret_or_error->getAsOpaquePtr();
 
-CompilerType ClangASTImporter::CopyType(ClangASTContext &dst_ast,
-                                        const CompilerType &src_type) {
-  clang::ASTContext *dst_clang_ast = dst_ast.getASTContext();
-  if (dst_clang_ast) {
-    ClangASTContext *src_ast =
-        llvm::dyn_cast_or_null<ClangASTContext>(src_type.GetTypeSystem());
-    if (src_ast) {
-      clang::ASTContext *src_clang_ast = src_ast->getASTContext();
-      if (src_clang_ast) {
-        lldb::opaque_compiler_type_t dst_clang_type = CopyType(
-            dst_clang_ast, src_clang_ast, src_type.GetOpaqueQualType());
-
-        if (dst_clang_type)
-          return CompilerType(&dst_ast, dst_clang_type);
-      }
-    }
-  }
+  if (dst_clang_type)
+    return CompilerType(&dst_ast, dst_clang_type);
   return CompilerType();
 }
 
 clang::Decl *ClangASTImporter::CopyDecl(clang::ASTContext *dst_ast,
-                                        clang::ASTContext *src_ast,
                                         clang::Decl *decl) {
   ImporterDelegateSP delegate_sp;
 
+  clang::ASTContext *src_ast = &decl->getASTContext();
   delegate_sp = GetDelegate(dst_ast, src_ast);
 
   ASTImporterDelegate::CxxModuleScope std_scope(*delegate_sp, dst_ast);
@@ -127,14 +83,16 @@
         user_id = metadata->GetUserID();
 
       if (NamedDecl *named_decl = dyn_cast<NamedDecl>(decl))
-        log->Printf("  [ClangASTImporter] WARNING: Failed to import a %s "
-                    "'%s', metadata 0x%" PRIx64,
-                    decl->getDeclKindName(),
-                    named_decl->getNameAsString().c_str(), user_id);
+        LLDB_LOGF(log,
+                  "  [ClangASTImporter] WARNING: Failed to import a %s "
+                  "'%s', metadata 0x%" PRIx64,
+                  decl->getDeclKindName(),
+                  named_decl->getNameAsString().c_str(), user_id);
       else
-        log->Printf("  [ClangASTImporter] WARNING: Failed to import a %s, "
-                    "metadata 0x%" PRIx64,
-                    decl->getDeclKindName(), user_id);
+        LLDB_LOGF(log,
+                  "  [ClangASTImporter] WARNING: Failed to import a %s, "
+                  "metadata 0x%" PRIx64,
+                  decl->getDeclKindName(), user_id);
     }
     return nullptr;
   }
@@ -149,7 +107,7 @@
     clang::DeclContext *lexical_decl_context;
   };
 
-  std::map<clang::Decl *, Backup> m_backups;
+  llvm::DenseMap<clang::Decl *, Backup> m_backups;
 
   void OverrideOne(clang::Decl *decl) {
     if (m_backups.find(decl) != m_backups.end()) {
@@ -211,12 +169,12 @@
     if (clang::Decl *escaped_child = GetEscapedChild(decl)) {
       Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-      if (log)
-        log->Printf("    [ClangASTImporter] DeclContextOverride couldn't "
-                    "override (%sDecl*)%p - its child (%sDecl*)%p escapes",
-                    decl->getDeclKindName(), static_cast<void *>(decl),
-                    escaped_child->getDeclKindName(),
-                    static_cast<void *>(escaped_child));
+      LLDB_LOGF(log,
+                "    [ClangASTImporter] DeclContextOverride couldn't "
+                "override (%sDecl*)%p - its child (%sDecl*)%p escapes",
+                decl->getDeclKindName(), static_cast<void *>(decl),
+                escaped_child->getDeclKindName(),
+                static_cast<void *>(escaped_child));
       lldbassert(0 && "Couldn't override!");
     }
 
@@ -248,84 +206,142 @@
   }
 };
 
-lldb::opaque_compiler_type_t
-ClangASTImporter::DeportType(clang::ASTContext *dst_ctx,
-                             clang::ASTContext *src_ctx,
-                             lldb::opaque_compiler_type_t type) {
+namespace {
+/// Completes all imported TagDecls at the end of the scope.
+///
+/// While in a CompleteTagDeclsScope, every decl that could be completed will
+/// be completed at the end of the scope (including all Decls that are
+/// imported while completing the original Decls).
+class CompleteTagDeclsScope : public ClangASTImporter::NewDeclListener {
+  ClangASTImporter::ImporterDelegateSP m_delegate;
+  llvm::SmallVector<NamedDecl *, 32> m_decls_to_complete;
+  llvm::SmallPtrSet<NamedDecl *, 32> m_decls_already_completed;
+  clang::ASTContext *m_dst_ctx;
+  clang::ASTContext *m_src_ctx;
+  ClangASTImporter &importer;
+
+public:
+  /// Constructs a CompleteTagDeclsScope.
+  /// \param importer The ClangASTImporter that we should observe.
+  /// \param dst_ctx The ASTContext to which Decls are imported.
+  /// \param src_ctx The ASTContext from which Decls are imported.
+  explicit CompleteTagDeclsScope(ClangASTImporter &importer,
+                            clang::ASTContext *dst_ctx,
+                            clang::ASTContext *src_ctx)
+      : m_delegate(importer.GetDelegate(dst_ctx, src_ctx)), m_dst_ctx(dst_ctx),
+        m_src_ctx(src_ctx), importer(importer) {
+    m_delegate->SetImportListener(this);
+  }
+
+  virtual ~CompleteTagDeclsScope() {
+    ClangASTImporter::ASTContextMetadataSP to_context_md =
+        importer.GetContextMetadata(m_dst_ctx);
+
+    // Complete all decls we collected until now.
+    while (!m_decls_to_complete.empty()) {
+      NamedDecl *decl = m_decls_to_complete.pop_back_val();
+      m_decls_already_completed.insert(decl);
+
+      // We should only complete decls coming from the source context.
+      assert(to_context_md->m_origins[decl].ctx == m_src_ctx);
+
+      Decl *original_decl = to_context_md->m_origins[decl].decl;
+
+      // Complete the decl now.
+      ClangASTContext::GetCompleteDecl(m_src_ctx, original_decl);
+      if (auto *tag_decl = dyn_cast<TagDecl>(decl)) {
+        if (auto *original_tag_decl = dyn_cast<TagDecl>(original_decl)) {
+          if (original_tag_decl->isCompleteDefinition()) {
+            m_delegate->ImportDefinitionTo(tag_decl, original_tag_decl);
+            tag_decl->setCompleteDefinition(true);
+          }
+        }
+
+        tag_decl->setHasExternalLexicalStorage(false);
+        tag_decl->setHasExternalVisibleStorage(false);
+      } else if (auto *container_decl = dyn_cast<ObjCContainerDecl>(decl)) {
+        container_decl->setHasExternalLexicalStorage(false);
+        container_decl->setHasExternalVisibleStorage(false);
+      }
+
+      to_context_md->m_origins.erase(decl);
+    }
+
+    // Stop listening to imported decls. We do this after clearing the
+    // Decls we needed to import to catch all Decls they might have pulled in.
+    m_delegate->RemoveImportListener();
+  }
+
+  void NewDeclImported(clang::Decl *from, clang::Decl *to) override {
+    // Filter out decls that we can't complete later.
+    if (!isa<TagDecl>(to) && !isa<ObjCInterfaceDecl>(to))
+      return;
+    RecordDecl *from_record_decl = dyn_cast<RecordDecl>(from);
+    // We don't need to complete injected class name decls.
+    if (from_record_decl && from_record_decl->isInjectedClassName())
+      return;
+
+    NamedDecl *to_named_decl = dyn_cast<NamedDecl>(to);
+    // Check if we already completed this type.
+    if (m_decls_already_completed.count(to_named_decl) != 0)
+      return;
+    m_decls_to_complete.push_back(to_named_decl);
+  }
+};
+} // namespace
+
+CompilerType ClangASTImporter::DeportType(ClangASTContext &dst,
+                                          const CompilerType &src_type) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("    [ClangASTImporter] DeportType called on (%sType*)0x%llx "
-                "from (ASTContext*)%p to (ASTContext*)%p",
-                QualType::getFromOpaquePtr(type)->getTypeClassName(),
-                (unsigned long long)type, static_cast<void *>(src_ctx),
-                static_cast<void *>(dst_ctx));
+  ClangASTContext *src_ctxt =
+      llvm::cast<ClangASTContext>(src_type.GetTypeSystem());
 
-  ImporterDelegateSP delegate_sp(GetDelegate(dst_ctx, src_ctx));
-
-  if (!delegate_sp)
-    return nullptr;
-
-  std::set<NamedDecl *> decls_to_deport;
-  std::set<NamedDecl *> decls_already_deported;
+  LLDB_LOG(log,
+           "    [ClangASTImporter] DeportType called on ({0}Type*){1:x} "
+           "from (ASTContext*){2:x} to (ASTContext*){3:x}",
+           src_type.GetTypeName(), src_type.GetOpaqueQualType(),
+           &src_ctxt->getASTContext(), &dst.getASTContext());
 
   DeclContextOverride decl_context_override;
 
-  if (const clang::TagType *tag_type =
-          clang::QualType::getFromOpaquePtr(type)->getAs<TagType>()) {
-    decl_context_override.OverrideAllDeclsFromContainingFunction(
-        tag_type->getDecl());
-  }
+  if (auto *t = ClangUtil::GetQualType(src_type)->getAs<TagType>())
+    decl_context_override.OverrideAllDeclsFromContainingFunction(t->getDecl());
 
-  delegate_sp->InitDeportWorkQueues(&decls_to_deport, &decls_already_deported);
-
-  lldb::opaque_compiler_type_t result = CopyType(dst_ctx, src_ctx, type);
-
-  delegate_sp->ExecuteDeportWorkQueues();
-
-  if (!result)
-    return nullptr;
-
-  return result;
+  CompleteTagDeclsScope complete_scope(*this, &dst.getASTContext(),
+                                       &src_ctxt->getASTContext());
+  return CopyType(dst, src_type);
 }
 
 clang::Decl *ClangASTImporter::DeportDecl(clang::ASTContext *dst_ctx,
-                                          clang::ASTContext *src_ctx,
                                           clang::Decl *decl) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("    [ClangASTImporter] DeportDecl called on (%sDecl*)%p from "
-                "(ASTContext*)%p to (ASTContext*)%p",
-                decl->getDeclKindName(), static_cast<void *>(decl),
-                static_cast<void *>(src_ctx), static_cast<void *>(dst_ctx));
-
-  ImporterDelegateSP delegate_sp(GetDelegate(dst_ctx, src_ctx));
-
-  if (!delegate_sp)
-    return nullptr;
-
-  std::set<NamedDecl *> decls_to_deport;
-  std::set<NamedDecl *> decls_already_deported;
+  clang::ASTContext *src_ctx = &decl->getASTContext();
+  LLDB_LOGF(log,
+            "    [ClangASTImporter] DeportDecl called on (%sDecl*)%p from "
+            "(ASTContext*)%p to (ASTContext*)%p",
+            decl->getDeclKindName(), static_cast<void *>(decl),
+            static_cast<void *>(src_ctx), static_cast<void *>(dst_ctx));
 
   DeclContextOverride decl_context_override;
 
   decl_context_override.OverrideAllDeclsFromContainingFunction(decl);
 
-  delegate_sp->InitDeportWorkQueues(&decls_to_deport, &decls_already_deported);
-
-  clang::Decl *result = CopyDecl(dst_ctx, src_ctx, decl);
-
-  delegate_sp->ExecuteDeportWorkQueues();
+  clang::Decl *result;
+  {
+    CompleteTagDeclsScope complete_scope(*this, dst_ctx, src_ctx);
+    result = CopyDecl(dst_ctx, decl);
+  }
 
   if (!result)
     return nullptr;
 
-  if (log)
-    log->Printf(
-        "    [ClangASTImporter] DeportDecl deported (%sDecl*)%p to (%sDecl*)%p",
-        decl->getDeclKindName(), static_cast<void *>(decl),
-        result->getDeclKindName(), static_cast<void *>(result));
+  LLDB_LOGF(
+      log,
+      "    [ClangASTImporter] DeportDecl deported (%sDecl*)%p to (%sDecl*)%p",
+      decl->getDeclKindName(), static_cast<void *>(decl),
+      result->getDeclKindName(), static_cast<void *>(result));
 
   return result;
 }
@@ -346,7 +362,7 @@
     const clang::CXXRecordDecl *cxx_record_decl =
         qual_type->getAsCXXRecordDecl();
     if (cxx_record_decl) {
-      if (ResolveDeclOrigin(cxx_record_decl, nullptr, nullptr))
+      if (GetDeclOrigin(cxx_record_decl).Valid())
         return true;
     }
   } break;
@@ -355,7 +371,7 @@
     clang::EnumDecl *enum_decl =
         llvm::cast<clang::EnumType>(qual_type)->getDecl();
     if (enum_decl) {
-      if (ResolveDeclOrigin(enum_decl, nullptr, nullptr))
+      if (GetDeclOrigin(enum_decl).Valid())
         return true;
     }
   } break;
@@ -370,7 +386,7 @@
       // We currently can't complete objective C types through the newly added
       // ASTContext because it only supports TagDecl objects right now...
       if (class_interface_decl) {
-        if (ResolveDeclOrigin(class_interface_decl, nullptr, nullptr))
+        if (GetDeclOrigin(class_interface_decl).Valid())
           return true;
       }
     }
@@ -422,7 +438,7 @@
     const clang::CXXRecordDecl *cxx_record_decl =
         qual_type->getAsCXXRecordDecl();
     if (cxx_record_decl) {
-      if (ResolveDeclOrigin(cxx_record_decl, nullptr, nullptr))
+      if (GetDeclOrigin(cxx_record_decl).Valid())
         return CompleteAndFetchChildren(qual_type);
     }
   } break;
@@ -431,7 +447,7 @@
     clang::EnumDecl *enum_decl =
         llvm::cast<clang::EnumType>(qual_type)->getDecl();
     if (enum_decl) {
-      if (ResolveDeclOrigin(enum_decl, nullptr, nullptr))
+      if (GetDeclOrigin(enum_decl).Valid())
         return CompleteAndFetchChildren(qual_type);
     }
   } break;
@@ -446,7 +462,7 @@
       // We currently can't complete objective C types through the newly added
       // ASTContext because it only supports TagDecl objects right now...
       if (class_interface_decl) {
-        if (ResolveDeclOrigin(class_interface_decl, nullptr, nullptr))
+        if (GetDeclOrigin(class_interface_decl).Valid())
           return CompleteAndFetchChildren(qual_type);
       }
     }
@@ -525,7 +541,7 @@
   return success;
 }
 
-void ClangASTImporter::InsertRecordDecl(clang::RecordDecl *decl,
+void ClangASTImporter::SetRecordLayout(clang::RecordDecl *decl,
                                         const LayoutInfo &layout) {
   m_record_decl_to_layout_map.insert(std::make_pair(decl, layout));
 }
@@ -533,9 +549,8 @@
 void ClangASTImporter::CompleteDecl(clang::Decl *decl) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("    [ClangASTImporter] CompleteDecl called on (%sDecl*)%p",
-                decl->getDeclKindName(), static_cast<void *>(decl));
+  LLDB_LOGF(log, "    [ClangASTImporter] CompleteDecl called on (%sDecl*)%p",
+            decl->getDeclKindName(), static_cast<void *>(decl));
 
   if (ObjCInterfaceDecl *interface_decl = dyn_cast<ObjCInterfaceDecl>(decl)) {
     if (!interface_decl->getDefinition()) {
@@ -558,8 +573,6 @@
 }
 
 bool ClangASTImporter::CompleteTagDecl(clang::TagDecl *decl) {
-  ClangASTMetrics::RegisterDeclCompletion();
-
   DeclOrigin decl_origin = GetDeclOrigin(decl);
 
   if (!decl_origin.Valid())
@@ -581,8 +594,6 @@
 
 bool ClangASTImporter::CompleteTagDeclWithOrigin(clang::TagDecl *decl,
                                                  clang::TagDecl *origin_decl) {
-  ClangASTMetrics::RegisterDeclCompletion();
-
   clang::ASTContext *origin_ast_ctx = &origin_decl->getASTContext();
 
   if (!ClangASTContext::GetCompleteDecl(origin_ast_ctx, origin_decl))
@@ -605,8 +616,6 @@
 
 bool ClangASTImporter::CompleteObjCInterfaceDecl(
     clang::ObjCInterfaceDecl *interface_decl) {
-  ClangASTMetrics::RegisterDeclCompletion();
-
   DeclOrigin decl_origin = GetDeclOrigin(interface_decl);
 
   if (!decl_origin.Valid())
@@ -659,9 +668,8 @@
       }
     }
 
-    if (RecordDecl *record_decl = dyn_cast<RecordDecl>(origin_tag_decl)) {
+    if (RecordDecl *record_decl = dyn_cast<RecordDecl>(origin_tag_decl))
       record_decl->setHasLoadedFieldsFromExternalStorage(true);
-    }
 
     return true;
   }
@@ -691,9 +699,8 @@
       }
 
       return true;
-    } else {
-      return false;
     }
+    return false;
   }
 
   return true;
@@ -715,15 +722,12 @@
     if (ObjCInterfaceDecl *objc_interface_decl =
             objc_object_type->getInterface())
       return CompleteObjCInterfaceDecl(objc_interface_decl);
-    else
-      return false;
+    return false;
   }
-  if (const ArrayType *array_type = type->getAsArrayTypeUnsafe()) {
+  if (const ArrayType *array_type = type->getAsArrayTypeUnsafe())
     return RequireCompleteType(array_type->getElementType());
-  }
-  if (const AtomicType *atomic_type = type->getAs<AtomicType>()) {
+  if (const AtomicType *atomic_type = type->getAs<AtomicType>())
     return RequireCompleteType(atomic_type->getPointeeType());
-  }
 
   return true;
 }
@@ -731,10 +735,12 @@
 ClangASTMetadata *ClangASTImporter::GetDeclMetadata(const clang::Decl *decl) {
   DeclOrigin decl_origin = GetDeclOrigin(decl);
 
-  if (decl_origin.Valid())
-    return ClangASTContext::GetMetadata(decl_origin.ctx, decl_origin.decl);
-  else
-    return ClangASTContext::GetMetadata(&decl->getASTContext(), decl);
+  if (decl_origin.Valid()) {
+    ClangASTContext *ast = ClangASTContext::GetASTContext(decl_origin.ctx);
+    return ast->GetMetadata(decl_origin.decl);
+  }
+  ClangASTContext *ast = ClangASTContext::GetASTContext(&decl->getASTContext());
+  return ast->GetMetadata(decl);
 }
 
 ClangASTImporter::DeclOrigin
@@ -747,8 +753,7 @@
 
   if (iter != origins.end())
     return iter->second;
-  else
-    return DeclOrigin();
+  return DeclOrigin();
 }
 
 void ClangASTImporter::SetDeclOrigin(const clang::Decl *decl,
@@ -762,9 +767,9 @@
   if (iter != origins.end()) {
     iter->second.decl = original_decl;
     iter->second.ctx = &original_decl->getASTContext();
-  } else {
-    origins[decl] = DeclOrigin(&original_decl->getASTContext(), original_decl);
+    return;
   }
+  origins[decl] = DeclOrigin(&original_decl->getASTContext(), original_decl);
 }
 
 void ClangASTImporter::RegisterNamespaceMap(const clang::NamespaceDecl *decl,
@@ -784,8 +789,7 @@
 
   if (iter != namespace_maps.end())
     return iter->second;
-  else
-    return NamespaceMapSP();
+  return NamespaceMapSP();
 }
 
 void ClangASTImporter::BuildNamespaceMap(const clang::NamespaceDecl *decl) {
@@ -817,9 +821,9 @@
 void ClangASTImporter::ForgetDestination(clang::ASTContext *dst_ast) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("    [ClangASTImporter] Forgetting destination (ASTContext*)%p",
-                static_cast<void *>(dst_ast));
+  LLDB_LOGF(log,
+            "    [ClangASTImporter] Forgetting destination (ASTContext*)%p",
+            static_cast<void *>(dst_ast));
 
   m_metadata_map.erase(dst_ast);
 }
@@ -830,10 +834,10 @@
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
-  if (log)
-    log->Printf("    [ClangASTImporter] Forgetting source->dest "
-                "(ASTContext*)%p->(ASTContext*)%p",
-                static_cast<void *>(src_ast), static_cast<void *>(dst_ast));
+  LLDB_LOGF(log,
+            "    [ClangASTImporter] Forgetting source->dest "
+            "(ASTContext*)%p->(ASTContext*)%p",
+            static_cast<void *>(src_ast), static_cast<void *>(dst_ast));
 
   if (!md)
     return;
@@ -866,64 +870,40 @@
     }
   }
 
-  return ASTImporter::ImportImpl(From);
-}
-
-void ClangASTImporter::ASTImporterDelegate::InitDeportWorkQueues(
-    std::set<clang::NamedDecl *> *decls_to_deport,
-    std::set<clang::NamedDecl *> *decls_already_deported) {
-  assert(!m_decls_to_deport);
-  assert(!m_decls_already_deported);
-
-  m_decls_to_deport = decls_to_deport;
-  m_decls_already_deported = decls_already_deported;
-}
-
-void ClangASTImporter::ASTImporterDelegate::ExecuteDeportWorkQueues() {
-  assert(m_decls_to_deport);
-  assert(m_decls_already_deported);
-
-  ASTContextMetadataSP to_context_md =
-      m_master.GetContextMetadata(&getToContext());
-
-  while (!m_decls_to_deport->empty()) {
-    NamedDecl *decl = *m_decls_to_deport->begin();
-
-    m_decls_already_deported->insert(decl);
-    m_decls_to_deport->erase(decl);
-
-    DeclOrigin &origin = to_context_md->m_origins[decl];
-    UNUSED_IF_ASSERT_DISABLED(origin);
-
-    assert(origin.ctx ==
-           m_source_ctx); // otherwise we should never have added this
-                          // because it doesn't need to be deported
-
-    Decl *original_decl = to_context_md->m_origins[decl].decl;
-
-    ClangASTContext::GetCompleteDecl(m_source_ctx, original_decl);
-
-    if (TagDecl *tag_decl = dyn_cast<TagDecl>(decl)) {
-      if (TagDecl *original_tag_decl = dyn_cast<TagDecl>(original_decl)) {
-        if (original_tag_decl->isCompleteDefinition()) {
-          ImportDefinitionTo(tag_decl, original_tag_decl);
-          tag_decl->setCompleteDefinition(true);
-        }
-      }
-
-      tag_decl->setHasExternalLexicalStorage(false);
-      tag_decl->setHasExternalVisibleStorage(false);
-    } else if (ObjCContainerDecl *container_decl =
-                   dyn_cast<ObjCContainerDecl>(decl)) {
-      container_decl->setHasExternalLexicalStorage(false);
-      container_decl->setHasExternalVisibleStorage(false);
-    }
-
-    to_context_md->m_origins.erase(decl);
+  // Check which ASTContext this declaration originally came from.
+  DeclOrigin origin = m_master.GetDeclOrigin(From);
+  // If it originally came from the target ASTContext then we can just
+  // pretend that the original is the one we imported. This can happen for
+  // example when inspecting a persistent declaration from the scratch
+  // ASTContext (which will provide the declaration when parsing the
+  // expression and then we later try to copy the declaration back to the
+  // scratch ASTContext to store the result).
+  // Without this check we would ask the ASTImporter to import a declaration
+  // into the same ASTContext where it came from (which doesn't make a lot of
+  // sense).
+  if (origin.Valid() && origin.ctx == &getToContext()) {
+      RegisterImportedDecl(From, origin.decl);
+      return origin.decl;
   }
 
-  m_decls_to_deport = nullptr;
-  m_decls_already_deported = nullptr;
+  // This declaration came originally from another ASTContext. Instead of
+  // copying our potentially incomplete 'From' Decl we instead go to the
+  // original ASTContext and copy the original to the target. This is not
+  // only faster than first completing our current decl and then copying it
+  // to the target, but it also prevents that indirectly copying the same
+  // declaration to the same target requires the ASTImporter to merge all
+  // the different decls that appear to come from different ASTContexts (even
+  // though all these different source ASTContexts just got a copy from
+  // one source AST).
+  if (origin.Valid()) {
+    auto R = m_master.CopyDecl(&getToContext(), origin.decl);
+    if (R) {
+      RegisterImportedDecl(From, R);
+      return R;
+    }
+  }
+
+  return ASTImporter::ImportImpl(From);
 }
 
 void ClangASTImporter::ASTImporterDelegate::ImportDefinitionTo(
@@ -1024,8 +1004,6 @@
 
 void ClangASTImporter::ASTImporterDelegate::Imported(clang::Decl *from,
                                                      clang::Decl *to) {
-  ClangASTMetrics::RegisterClangImport();
-
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 
   // Some decls shouldn't be tracked here because they were not created by
@@ -1045,15 +1023,17 @@
       from_named_decl->printName(name_stream);
       name_stream.flush();
 
-      log->Printf("    [ClangASTImporter] Imported (%sDecl*)%p, named %s (from "
-                  "(Decl*)%p), metadata 0x%" PRIx64,
-                  from->getDeclKindName(), static_cast<void *>(to),
-                  name_string.c_str(), static_cast<void *>(from), user_id);
+      LLDB_LOGF(log,
+                "    [ClangASTImporter] Imported (%sDecl*)%p, named %s (from "
+                "(Decl*)%p), metadata 0x%" PRIx64,
+                from->getDeclKindName(), static_cast<void *>(to),
+                name_string.c_str(), static_cast<void *>(from), user_id);
     } else {
-      log->Printf("    [ClangASTImporter] Imported (%sDecl*)%p (from "
-                  "(Decl*)%p), metadata 0x%" PRIx64,
-                  from->getDeclKindName(), static_cast<void *>(to),
-                  static_cast<void *>(from), user_id);
+      LLDB_LOGF(log,
+                "    [ClangASTImporter] Imported (%sDecl*)%p (from "
+                "(Decl*)%p), metadata 0x%" PRIx64,
+                from->getDeclKindName(), static_cast<void *>(to),
+                static_cast<void *>(from), user_id);
     }
   }
 
@@ -1080,37 +1060,27 @@
       if (direct_completer.get() != this)
         direct_completer->ASTImporter::Imported(origin_iter->second.decl, to);
 
-      if (log)
-        log->Printf("    [ClangASTImporter] Propagated origin "
-                    "(Decl*)%p/(ASTContext*)%p from (ASTContext*)%p to "
-                    "(ASTContext*)%p",
-                    static_cast<void *>(origin_iter->second.decl),
-                    static_cast<void *>(origin_iter->second.ctx),
-                    static_cast<void *>(&from->getASTContext()),
-                    static_cast<void *>(&to->getASTContext()));
+      LLDB_LOGF(log,
+                "    [ClangASTImporter] Propagated origin "
+                "(Decl*)%p/(ASTContext*)%p from (ASTContext*)%p to "
+                "(ASTContext*)%p",
+                static_cast<void *>(origin_iter->second.decl),
+                static_cast<void *>(origin_iter->second.ctx),
+                static_cast<void *>(&from->getASTContext()),
+                static_cast<void *>(&to->getASTContext()));
     } else {
-      if (m_decls_to_deport && m_decls_already_deported) {
-        if (isa<TagDecl>(to) || isa<ObjCInterfaceDecl>(to)) {
-          RecordDecl *from_record_decl = dyn_cast<RecordDecl>(from);
-          if (from_record_decl == nullptr ||
-              !from_record_decl->isInjectedClassName()) {
-            NamedDecl *to_named_decl = dyn_cast<NamedDecl>(to);
-
-            if (!m_decls_already_deported->count(to_named_decl))
-              m_decls_to_deport->insert(to_named_decl);
-          }
-        }
-      }
+      if (m_new_decl_listener)
+        m_new_decl_listener->NewDeclImported(from, to);
 
       if (to_context_md->m_origins.find(to) == to_context_md->m_origins.end() ||
           user_id != LLDB_INVALID_UID) {
         to_context_md->m_origins[to] = DeclOrigin(m_source_ctx, from);
       }
 
-      if (log)
-        log->Printf("    [ClangASTImporter] Decl has no origin information in "
-                    "(ASTContext*)%p",
-                    static_cast<void *>(&from->getASTContext()));
+      LLDB_LOGF(log,
+                "    [ClangASTImporter] Decl has no origin information in "
+                "(ASTContext*)%p",
+                static_cast<void *>(&from->getASTContext()));
     }
 
     if (clang::NamespaceDecl *to_namespace =
@@ -1130,11 +1100,11 @@
   } else {
     to_context_md->m_origins[to] = DeclOrigin(m_source_ctx, from);
 
-    if (log)
-      log->Printf("    [ClangASTImporter] Sourced origin "
-                  "(Decl*)%p/(ASTContext*)%p into (ASTContext*)%p",
-                  static_cast<void *>(from), static_cast<void *>(m_source_ctx),
-                  static_cast<void *>(&to->getASTContext()));
+    LLDB_LOGF(log,
+              "    [ClangASTImporter] Sourced origin "
+              "(Decl*)%p/(ASTContext*)%p into (ASTContext*)%p",
+              static_cast<void *>(from), static_cast<void *>(m_source_ctx),
+              static_cast<void *>(&to->getASTContext()));
   }
 
   if (TagDecl *from_tag_decl = dyn_cast<TagDecl>(from)) {
@@ -1143,13 +1113,13 @@
     to_tag_decl->setHasExternalLexicalStorage();
     to_tag_decl->getPrimaryContext()->setMustBuildLookupTable();
 
-    if (log)
-      log->Printf(
-          "    [ClangASTImporter] To is a TagDecl - attributes %s%s [%s->%s]",
-          (to_tag_decl->hasExternalLexicalStorage() ? " Lexical" : ""),
-          (to_tag_decl->hasExternalVisibleStorage() ? " Visible" : ""),
-          (from_tag_decl->isCompleteDefinition() ? "complete" : "incomplete"),
-          (to_tag_decl->isCompleteDefinition() ? "complete" : "incomplete"));
+    LLDB_LOGF(
+        log,
+        "    [ClangASTImporter] To is a TagDecl - attributes %s%s [%s->%s]",
+        (to_tag_decl->hasExternalLexicalStorage() ? " Lexical" : ""),
+        (to_tag_decl->hasExternalVisibleStorage() ? " Visible" : ""),
+        (from_tag_decl->isCompleteDefinition() ? "complete" : "incomplete"),
+        (to_tag_decl->isCompleteDefinition() ? "complete" : "incomplete"));
   }
 
   if (isa<NamespaceDecl>(from)) {
@@ -1171,15 +1141,16 @@
     if (log) {
       if (ObjCInterfaceDecl *to_interface_decl =
               llvm::dyn_cast<ObjCInterfaceDecl>(to_container_decl)) {
-        log->Printf(
+        LLDB_LOGF(
+            log,
             "    [ClangASTImporter] To is an ObjCInterfaceDecl - attributes "
             "%s%s%s",
             (to_interface_decl->hasExternalLexicalStorage() ? " Lexical" : ""),
             (to_interface_decl->hasExternalVisibleStorage() ? " Visible" : ""),
             (to_interface_decl->hasDefinition() ? " HasDefinition" : ""));
       } else {
-        log->Printf(
-            "    [ClangASTImporter] To is an %sDecl - attributes %s%s",
+        LLDB_LOGF(
+            log, "    [ClangASTImporter] To is an %sDecl - attributes %s%s",
             ((Decl *)to_container_decl)->getDeclKindName(),
             (to_container_decl->hasExternalLexicalStorage() ? " Lexical" : ""),
             (to_container_decl->hasExternalVisibleStorage() ? " Visible" : ""));
@@ -1190,16 +1161,5 @@
 
 clang::Decl *
 ClangASTImporter::ASTImporterDelegate::GetOriginalDecl(clang::Decl *To) {
-  ASTContextMetadataSP to_context_md =
-      m_master.GetContextMetadata(&To->getASTContext());
-
-  if (!to_context_md)
-    return nullptr;
-
-  OriginMap::iterator iter = to_context_md->m_origins.find(To);
-
-  if (iter == to_context_md->m_origins.end())
-    return nullptr;
-
-  return const_cast<clang::Decl *>(iter->second.decl);
+  return m_master.GetDeclOrigin(To).decl;
 }
diff --git a/src/llvm-project/lldb/source/Symbol/ClangASTMetadata.cpp b/src/llvm-project/lldb/source/Symbol/ClangASTMetadata.cpp
new file mode 100644
index 0000000..31b012f
--- /dev/null
+++ b/src/llvm-project/lldb/source/Symbol/ClangASTMetadata.cpp
@@ -0,0 +1,35 @@
+//===-- ClangASTMetadata.cpp ------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Symbol/ClangASTMetadata.h"
+#include "lldb/Utility/Stream.h"
+
+using namespace lldb_private;
+
+void ClangASTMetadata::Dump(Stream *s) {
+  lldb::user_id_t uid = GetUserID();
+
+  if (uid != LLDB_INVALID_UID) {
+    s->Printf("uid=0x%" PRIx64, uid);
+  }
+
+  uint64_t isa_ptr = GetISAPtr();
+  if (isa_ptr != 0) {
+    s->Printf("isa_ptr=0x%" PRIx64, isa_ptr);
+  }
+
+  const char *obj_ptr_name = GetObjectPtrName();
+  if (obj_ptr_name) {
+    s->Printf("obj_ptr_name=\"%s\" ", obj_ptr_name);
+  }
+
+  if (m_is_dynamic_cxx) {
+    s->Printf("is_dynamic_cxx=%i ", m_is_dynamic_cxx);
+  }
+  s->EOL();
+}
diff --git a/src/llvm-project/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp b/src/llvm-project/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp
index c35fc58..008c2ac 100644
--- a/src/llvm-project/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp
+++ b/src/llvm-project/lldb/source/Symbol/ClangExternalASTSourceCallbacks.cpp
@@ -7,69 +7,19 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Symbol/ClangExternalASTSourceCallbacks.h"
+#include "lldb/Symbol/ClangASTContext.h"
 
-
-// Clang headers like to use NDEBUG inside of them to enable/disable debug
-// related features using "#ifndef NDEBUG" preprocessor blocks to do one thing
-// or another. This is bad because it means that if clang was built in release
-// mode, it assumes that you are building in release mode which is not always
-// the case. You can end up with functions that are defined as empty in header
-// files when NDEBUG is not defined, and this can cause link errors with the
-// clang .a files that you have since you might be missing functions in the .a
-// file. So we have to define NDEBUG when including clang headers to avoid any
-// mismatches. This is covered by rdar://problem/8691220
-
-#if !defined(NDEBUG) && !defined(LLVM_NDEBUG_OFF)
-#define LLDB_DEFINED_NDEBUG_FOR_CLANG
-#define NDEBUG
-// Need to include assert.h so it is as clang would expect it to be (disabled)
-#include <assert.h>
-#endif
-
-#include "clang/AST/DeclBase.h"
-#include "clang/AST/DeclarationName.h"
-
-#ifdef LLDB_DEFINED_NDEBUG_FOR_CLANG
-#undef NDEBUG
-#undef LLDB_DEFINED_NDEBUG_FOR_CLANG
-// Need to re-include assert.h so it is as _we_ would expect it to be (enabled)
-#include <assert.h>
-#endif
-
-#include "lldb/Utility/Log.h"
 #include "clang/AST/Decl.h"
 
-using namespace clang;
 using namespace lldb_private;
 
-bool ClangExternalASTSourceCallbacks::FindExternalVisibleDeclsByName(
-    const clang::DeclContext *decl_ctx,
-    clang::DeclarationName clang_decl_name) {
-  if (m_callback_find_by_name) {
-    llvm::SmallVector<clang::NamedDecl *, 3> results;
-
-    m_callback_find_by_name(m_callback_baton, decl_ctx, clang_decl_name,
-                            &results);
-
-    SetExternalVisibleDeclsForName(decl_ctx, clang_decl_name, results);
-
-    return (results.size() != 0);
-  }
-
-  std::string decl_name(clang_decl_name.getAsString());
-  SetNoExternalVisibleDeclsForName(decl_ctx, clang_decl_name);
-  return false;
-}
-
-void ClangExternalASTSourceCallbacks::CompleteType(TagDecl *tag_decl) {
-  if (m_callback_tag_decl)
-    m_callback_tag_decl(m_callback_baton, tag_decl);
+void ClangExternalASTSourceCallbacks::CompleteType(clang::TagDecl *tag_decl) {
+  m_ast.CompleteTagDecl(tag_decl);
 }
 
 void ClangExternalASTSourceCallbacks::CompleteType(
-    ObjCInterfaceDecl *objc_decl) {
-  if (m_callback_objc_decl)
-    m_callback_objc_decl(m_callback_baton, objc_decl);
+    clang::ObjCInterfaceDecl *objc_decl) {
+  m_ast.CompleteObjCInterfaceDecl(objc_decl);
 }
 
 bool ClangExternalASTSourceCallbacks::layoutRecordType(
@@ -78,19 +28,15 @@
     llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits> &BaseOffsets,
     llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
         &VirtualBaseOffsets) {
-  if (m_callback_layout_record_type)
-    return m_callback_layout_record_type(m_callback_baton, Record, Size,
-                                         Alignment, FieldOffsets, BaseOffsets,
-                                         VirtualBaseOffsets);
-
-  return false;
+  return m_ast.LayoutRecordType(Record, Size, Alignment, FieldOffsets,
+                                BaseOffsets, VirtualBaseOffsets);
 }
 
 void ClangExternalASTSourceCallbacks::FindExternalLexicalDecls(
     const clang::DeclContext *decl_ctx,
     llvm::function_ref<bool(clang::Decl::Kind)> IsKindWeWant,
     llvm::SmallVectorImpl<clang::Decl *> &decls) {
-  if (m_callback_tag_decl && decl_ctx) {
+  if (decl_ctx) {
     clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(
         const_cast<clang::DeclContext *>(decl_ctx));
     if (tag_decl)
diff --git a/src/llvm-project/lldb/source/Symbol/ClangExternalASTSourceCommon.cpp b/src/llvm-project/lldb/source/Symbol/ClangExternalASTSourceCommon.cpp
deleted file mode 100644
index 3dcf905..0000000
--- a/src/llvm-project/lldb/source/Symbol/ClangExternalASTSourceCommon.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-//===-- ClangExternalASTSourceCommon.cpp ------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
-#include "lldb/Utility/Stream.h"
-
-#include <mutex>
-
-using namespace lldb_private;
-
-uint64_t g_TotalSizeOfMetadata = 0;
-
-typedef llvm::DenseMap<clang::ExternalASTSource *,
-                       ClangExternalASTSourceCommon *>
-    ASTSourceMap;
-
-static ASTSourceMap &GetSourceMap(std::unique_lock<std::mutex> &guard) {
-  // Intentionally leaked to avoid problems with global destructors.
-  static ASTSourceMap *s_source_map = new ASTSourceMap;
-  static std::mutex s_mutex;
-  std::unique_lock<std::mutex> locked_guard(s_mutex);
-  guard.swap(locked_guard);
-  return *s_source_map;
-}
-
-ClangExternalASTSourceCommon *
-ClangExternalASTSourceCommon::Lookup(clang::ExternalASTSource *source) {
-  std::unique_lock<std::mutex> guard;
-  ASTSourceMap &source_map = GetSourceMap(guard);
-
-  ASTSourceMap::iterator iter = source_map.find(source);
-
-  if (iter != source_map.end()) {
-    return iter->second;
-  } else {
-    return nullptr;
-  }
-}
-
-ClangExternalASTSourceCommon::ClangExternalASTSourceCommon()
-    : clang::ExternalASTSource() {
-  g_TotalSizeOfMetadata += m_metadata.size();
-  std::unique_lock<std::mutex> guard;
-  GetSourceMap(guard)[this] = this;
-}
-
-ClangExternalASTSourceCommon::~ClangExternalASTSourceCommon() {
-  std::unique_lock<std::mutex> guard;
-  GetSourceMap(guard).erase(this);
-  g_TotalSizeOfMetadata -= m_metadata.size();
-}
-
-ClangASTMetadata *
-ClangExternalASTSourceCommon::GetMetadata(const void *object) {
-  if (HasMetadata(object))
-    return &m_metadata[object];
-  else
-    return nullptr;
-}
-
-void ClangExternalASTSourceCommon::SetMetadata(const void *object,
-                                               ClangASTMetadata &metadata) {
-  uint64_t orig_size = m_metadata.size();
-  m_metadata[object] = metadata;
-  uint64_t new_size = m_metadata.size();
-  g_TotalSizeOfMetadata += (new_size - orig_size);
-}
-
-bool ClangExternalASTSourceCommon::HasMetadata(const void *object) {
-  return m_metadata.find(object) != m_metadata.end();
-}
-
-void ClangASTMetadata::Dump(Stream *s) {
-  lldb::user_id_t uid = GetUserID();
-
-  if (uid != LLDB_INVALID_UID) {
-    s->Printf("uid=0x%" PRIx64, uid);
-  }
-
-  uint64_t isa_ptr = GetISAPtr();
-  if (isa_ptr != 0) {
-    s->Printf("isa_ptr=0x%" PRIx64, isa_ptr);
-  }
-
-  const char *obj_ptr_name = GetObjectPtrName();
-  if (obj_ptr_name) {
-    s->Printf("obj_ptr_name=\"%s\" ", obj_ptr_name);
-  }
-
-  if (m_is_dynamic_cxx) {
-    s->Printf("is_dynamic_cxx=%i ", m_is_dynamic_cxx);
-  }
-  s->EOL();
-}
diff --git a/src/llvm-project/lldb/source/Symbol/ClangUtil.cpp b/src/llvm-project/lldb/source/Symbol/ClangUtil.cpp
index 86be895..52ea4f5 100644
--- a/src/llvm-project/lldb/source/Symbol/ClangUtil.cpp
+++ b/src/llvm-project/lldb/source/Symbol/ClangUtil.cpp
@@ -15,6 +15,10 @@
 using namespace lldb_private;
 
 bool ClangUtil::IsClangType(const CompilerType &ct) {
+  // Invalid types are never Clang types.
+  if (!ct)
+    return false;
+
   if (llvm::dyn_cast_or_null<ClangASTContext>(ct.GetTypeSystem()) == nullptr)
     return false;
 
@@ -55,3 +59,24 @@
 
   return qual_type->getAsTagDecl();
 }
+
+std::string ClangUtil::DumpDecl(const clang::Decl *d) {
+  if (!d)
+    return "nullptr";
+
+  std::string result;
+  llvm::raw_string_ostream stream(result);
+  bool deserialize = false;
+  d->dump(stream, deserialize);
+
+  stream.flush();
+  return result;
+}
+
+std::string ClangUtil::ToString(const clang::Type *t) {
+  return clang::QualType(t, 0).getAsString();
+}
+
+std::string ClangUtil::ToString(const CompilerType &c) {
+  return ClangUtil::GetQualType(c).getAsString();
+}
diff --git a/src/llvm-project/lldb/source/Symbol/CompactUnwindInfo.cpp b/src/llvm-project/lldb/source/Symbol/CompactUnwindInfo.cpp
index 3a2a4d3..3eee7f7 100644
--- a/src/llvm-project/lldb/source/Symbol/CompactUnwindInfo.cpp
+++ b/src/llvm-project/lldb/source/Symbol/CompactUnwindInfo.cpp
@@ -190,8 +190,8 @@
             Address::DumpStyle::DumpStyleResolvedDescriptionNoFunctionArguments,
             Address::DumpStyle::DumpStyleFileAddress,
             arch.GetAddressByteSize());
-        log->Printf("Got compact unwind encoding 0x%x for function %s",
-                    function_info.encoding, strm.GetData());
+        LLDB_LOGF(log, "Got compact unwind encoding 0x%x for function %s",
+                  function_info.encoding, strm.GetData());
       }
 
       if (function_info.valid_range_offset_start != 0 &&
@@ -213,7 +213,8 @@
         return CreateUnwindPlan_x86_64(target, function_info, unwind_plan,
                                        addr);
       }
-      if (arch.GetTriple().getArch() == llvm::Triple::aarch64) {
+      if (arch.GetTriple().getArch() == llvm::Triple::aarch64 ||
+          arch.GetTriple().getArch() == llvm::Triple::aarch64_32) {
         return CreateUnwindPlan_arm64(target, function_info, unwind_plan, addr);
       }
       if (arch.GetTriple().getArch() == llvm::Triple::x86) {
@@ -737,6 +738,7 @@
   unwind_plan.SetSourceName("compact unwind info");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolYes);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetRegisterKind(eRegisterKindEHFrame);
 
   unwind_plan.SetLSDAAddress(function_info.lsda_address);
@@ -1008,6 +1010,7 @@
   unwind_plan.SetSourceName("compact unwind info");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolYes);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetRegisterKind(eRegisterKindEHFrame);
 
   unwind_plan.SetLSDAAddress(function_info.lsda_address);
@@ -1304,6 +1307,7 @@
   unwind_plan.SetSourceName("compact unwind info");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolYes);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetRegisterKind(eRegisterKindEHFrame);
 
   unwind_plan.SetLSDAAddress(function_info.lsda_address);
@@ -1437,6 +1441,7 @@
   unwind_plan.SetSourceName("compact unwind info");
   unwind_plan.SetSourcedFromCompiler(eLazyBoolYes);
   unwind_plan.SetUnwindPlanValidAtAllInstructions(eLazyBoolNo);
+  unwind_plan.SetUnwindPlanForSignalTrap(eLazyBoolNo);
   unwind_plan.SetRegisterKind(eRegisterKindEHFrame);
 
   unwind_plan.SetLSDAAddress(function_info.lsda_address);
diff --git a/src/llvm-project/lldb/source/Symbol/CompileUnit.cpp b/src/llvm-project/lldb/source/Symbol/CompileUnit.cpp
index 5fb9b6b..b05036e 100644
--- a/src/llvm-project/lldb/source/Symbol/CompileUnit.cpp
+++ b/src/llvm-project/lldb/source/Symbol/CompileUnit.cpp
@@ -9,9 +9,10 @@
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Symbol/LineTable.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/Language.h"
+#include "lldb/Utility/Timer.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -20,30 +21,21 @@
                          const char *pathname, const lldb::user_id_t cu_sym_id,
                          lldb::LanguageType language,
                          lldb_private::LazyBool is_optimized)
-    : ModuleChild(module_sp), FileSpec(pathname), UserID(cu_sym_id),
-      m_user_data(user_data), m_language(language), m_flags(0),
-      m_support_files(), m_line_table_up(), m_variables(),
-      m_is_optimized(is_optimized) {
-  if (language != eLanguageTypeUnknown)
-    m_flags.Set(flagsParsedLanguage);
-  assert(module_sp);
-}
+    : CompileUnit(module_sp, user_data, FileSpec(pathname), cu_sym_id, language,
+                  is_optimized) {}
 
 CompileUnit::CompileUnit(const lldb::ModuleSP &module_sp, void *user_data,
                          const FileSpec &fspec, const lldb::user_id_t cu_sym_id,
                          lldb::LanguageType language,
                          lldb_private::LazyBool is_optimized)
-    : ModuleChild(module_sp), FileSpec(fspec), UserID(cu_sym_id),
-      m_user_data(user_data), m_language(language), m_flags(0),
-      m_support_files(), m_line_table_up(), m_variables(),
+    : ModuleChild(module_sp), UserID(cu_sym_id), m_user_data(user_data),
+      m_language(language), m_flags(0), m_file_spec(fspec),
       m_is_optimized(is_optimized) {
   if (language != eLanguageTypeUnknown)
     m_flags.Set(flagsParsedLanguage);
   assert(module_sp);
 }
 
-CompileUnit::~CompileUnit() {}
-
 void CompileUnit::CalculateSymbolContext(SymbolContext *sc) {
   sc->comp_unit = this;
   GetModule()->CalculateSymbolContext(sc);
@@ -62,7 +54,7 @@
                                  lldb::DescriptionLevel level) const {
   const char *language = Language::GetNameForLanguageType(m_language);
   *s << "id = " << (const UserID &)*this << ", file = \""
-     << (const FileSpec &)*this << "\", language = \"" << language << '"';
+     << this->GetPrimaryFile() << "\", language = \"" << language << '"';
 }
 
 void CompileUnit::ForeachFunction(
@@ -81,6 +73,31 @@
       return;
 }
 
+lldb::FunctionSP CompileUnit::FindFunction(
+    llvm::function_ref<bool(const FunctionSP &)> matching_lambda) {
+  static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
+  Timer scoped_timer(func_cat, "CompileUnit::FindFunction");
+
+  lldb::ModuleSP module = CalculateSymbolContextModule();
+
+  if (!module)
+    return {};
+
+  SymbolFile *symbol_file = module->GetSymbolFile();
+
+  if (!symbol_file)
+    return {};
+
+  // m_functions_by_uid is filled in lazily but we need all the entries.
+  symbol_file->ParseFunctions(*this);
+
+  for (auto &p : m_functions_by_uid) {
+    if (matching_lambda(p.second))
+      return p.second;
+  }
+  return {};
+}
+
 // Dump the current contents of this object. No functions that cause on demand
 // parsing of functions, globals, statics are called, so this is a good
 // function to call to get an idea of the current contents of the CompileUnit
@@ -91,8 +108,7 @@
   s->Printf("%p: ", static_cast<const void *>(this));
   s->Indent();
   *s << "CompileUnit" << static_cast<const UserID &>(*this) << ", language = \""
-     << language << "\", file = '" << static_cast<const FileSpec &>(*this)
-     << "'\n";
+     << language << "\", file = '" << GetPrimaryFile() << "'\n";
 
   //  m_types.Dump(s);
 
@@ -119,49 +135,6 @@
   m_functions_by_uid[funcSP->GetID()] = funcSP;
 }
 
-// Find functions using the Mangled::Tokens token list. This function currently
-// implements an interactive approach designed to find all instances of certain
-// functions. It isn't designed to the quickest way to lookup functions as it
-// will need to iterate through all functions and see if they match, though it
-// does provide a powerful and context sensitive way to search for all
-// functions with a certain name, all functions in a namespace, or all
-// functions of a template type. See Mangled::Tokens::Parse() comments for more
-// information.
-//
-// The function prototype will need to change to return a list of results. It
-// was originally used to help debug the Mangled class and the
-// Mangled::Tokens::MatchesQuery() function and it currently will print out a
-// list of matching results for the functions that are currently in this
-// compile unit.
-//
-// A FindFunctions method should be called prior to this that takes
-// a regular function name (const char * or ConstString as a parameter) before
-// resorting to this slower but more complete function. The other FindFunctions
-// method should be able to take advantage of any accelerator tables available
-// in the debug information (which is parsed by the SymbolFile parser plug-ins
-// and registered with each Module).
-// void
-// CompileUnit::FindFunctions(const Mangled::Tokens& tokens)
-//{
-//  if (!m_functions.empty())
-//  {
-//      Stream s(stdout);
-//      std::vector<FunctionSP>::const_iterator pos;
-//      std::vector<FunctionSP>::const_iterator end = m_functions.end();
-//      for (pos = m_functions.begin(); pos != end; ++pos)
-//      {
-//          const ConstString& demangled = (*pos)->Mangled().Demangled();
-//          if (demangled)
-//          {
-//              const Mangled::Tokens& func_tokens =
-//              (*pos)->Mangled().GetTokens();
-//              if (func_tokens.MatchesQuery (tokens))
-//                  s << "demangled MATCH found: " << demangled << "\n";
-//          }
-//      }
-//  }
-//}
-
 FunctionSP CompileUnit::FindFunctionByUID(lldb::user_id_t func_uid) {
   auto it = m_functions_by_uid.find(func_uid);
   if (it == m_functions_by_uid.end())
@@ -173,10 +146,8 @@
   if (m_language == eLanguageTypeUnknown) {
     if (m_flags.IsClear(flagsParsedLanguage)) {
       m_flags.Set(flagsParsedLanguage);
-      SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor();
-      if (symbol_vendor) {
-        m_language = symbol_vendor->ParseLanguage(*this);
-      }
+      if (SymbolFile *symfile = GetModule()->GetSymbolFile())
+        m_language = symfile->ParseLanguage(*this);
     }
   }
   return m_language;
@@ -186,9 +157,8 @@
   if (m_line_table_up == nullptr) {
     if (m_flags.IsClear(flagsParsedLineTable)) {
       m_flags.Set(flagsParsedLineTable);
-      SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor();
-      if (symbol_vendor)
-        symbol_vendor->ParseLineTable(*this);
+      if (SymbolFile *symfile = GetModule()->GetSymbolFile())
+        symfile->ParseLineTable(*this);
     }
   }
   return m_line_table_up.get();
@@ -202,14 +172,16 @@
   m_line_table_up.reset(line_table);
 }
 
+void CompileUnit::SetSupportFiles(const FileSpecList &support_files) {
+  m_support_files = support_files;
+}
+
 DebugMacros *CompileUnit::GetDebugMacros() {
   if (m_debug_macros_sp.get() == nullptr) {
     if (m_flags.IsClear(flagsParsedDebugMacros)) {
       m_flags.Set(flagsParsedDebugMacros);
-      SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor();
-      if (symbol_vendor) {
-        symbol_vendor->ParseDebugMacros(*this);
-      }
+      if (SymbolFile *symfile = GetModule()->GetSymbolFile())
+        symfile->ParseDebugMacros(*this);
     }
   }
 
@@ -229,59 +201,56 @@
     SymbolContext sc;
     CalculateSymbolContext(&sc);
     assert(sc.module_sp);
-    sc.module_sp->GetSymbolVendor()->ParseVariablesForContext(sc);
+    sc.module_sp->GetSymbolFile()->ParseVariablesForContext(sc);
   }
 
   return m_variables;
 }
 
+std::vector<uint32_t> FindFileIndexes(const FileSpecList &files, const FileSpec &file) {
+  std::vector<uint32_t> result;
+  uint32_t idx = -1;
+  while ((idx = files.FindFileIndex(idx + 1, file, /*full=*/true)) !=
+         UINT32_MAX)
+    result.push_back(idx);
+  return result;
+}
+
 uint32_t CompileUnit::FindLineEntry(uint32_t start_idx, uint32_t line,
                                     const FileSpec *file_spec_ptr, bool exact,
                                     LineEntry *line_entry_ptr) {
-  uint32_t file_idx = 0;
+  if (!file_spec_ptr)
+    file_spec_ptr = &GetPrimaryFile();
+  std::vector<uint32_t> file_indexes = FindFileIndexes(GetSupportFiles(), *file_spec_ptr);
+  if (file_indexes.empty())
+    return UINT32_MAX;
 
-  if (file_spec_ptr) {
-    file_idx = GetSupportFiles().FindFileIndex(1, *file_spec_ptr, true);
-    if (file_idx == UINT32_MAX)
-      return UINT32_MAX;
-  } else {
-    // All the line table entries actually point to the version of the Compile
-    // Unit that is in the support files (the one at 0 was artificially added.)
-    // So prefer the one further on in the support files if it exists...
-    const FileSpecList &support_files = GetSupportFiles();
-    const bool full = true;
-    file_idx = support_files.FindFileIndex(
-        1, support_files.GetFileSpecAtIndex(0), full);
-    if (file_idx == UINT32_MAX)
-      file_idx = 0;
-  }
   LineTable *line_table = GetLineTable();
   if (line_table)
-    return line_table->FindLineEntryIndexByFileIndex(start_idx, file_idx, line,
-                                                     exact, line_entry_ptr);
+    return line_table->FindLineEntryIndexByFileIndex(
+        start_idx, file_indexes, line, exact, line_entry_ptr);
   return UINT32_MAX;
 }
 
-uint32_t CompileUnit::ResolveSymbolContext(const FileSpec &file_spec,
-                                           uint32_t line, bool check_inlines,
-                                           bool exact,
-                                           SymbolContextItem resolve_scope,
-                                           SymbolContextList &sc_list) {
+void CompileUnit::ResolveSymbolContext(const FileSpec &file_spec,
+                                       uint32_t line, bool check_inlines,
+                                       bool exact,
+                                       SymbolContextItem resolve_scope,
+                                       SymbolContextList &sc_list) {
   // First find all of the file indexes that match our "file_spec". If
   // "file_spec" has an empty directory, then only compare the basenames when
   // finding file indexes
   std::vector<uint32_t> file_indexes;
-  const bool full_match = (bool)file_spec.GetDirectory();
   bool file_spec_matches_cu_file_spec =
-      FileSpec::Equal(file_spec, *this, full_match);
+      FileSpec::Match(file_spec, this->GetPrimaryFile());
 
   // If we are not looking for inlined functions and our file spec doesn't
   // match then we are done...
   if (!file_spec_matches_cu_file_spec && !check_inlines)
-    return 0;
+    return;
 
   uint32_t file_idx =
-      GetSupportFiles().FindFileIndex(1, file_spec, true);
+      GetSupportFiles().FindFileIndex(0, file_spec, true);
   while (file_idx != UINT32_MAX) {
     file_indexes.push_back(file_idx);
     file_idx = GetSupportFiles().FindFileIndex(file_idx + 1, file_spec, true);
@@ -289,91 +258,74 @@
 
   const size_t num_file_indexes = file_indexes.size();
   if (num_file_indexes == 0)
-    return 0;
-
-  const uint32_t prev_size = sc_list.GetSize();
+    return;
 
   SymbolContext sc(GetModule());
   sc.comp_unit = this;
 
-  if (line != 0) {
-    LineTable *line_table = sc.comp_unit->GetLineTable();
-
-    if (line_table != nullptr) {
-      uint32_t found_line;
-      uint32_t line_idx;
-
-      if (num_file_indexes == 1) {
-        // We only have a single support file that matches, so use the line
-        // table function that searches for a line entries that match a single
-        // support file index
-        LineEntry line_entry;
-        line_idx = line_table->FindLineEntryIndexByFileIndex(
-            0, file_indexes.front(), line, exact, &line_entry);
-
-        // If "exact == true", then "found_line" will be the same as "line". If
-        // "exact == false", the "found_line" will be the closest line entry
-        // with a line number greater than "line" and we will use this for our
-        // subsequent line exact matches below.
-        found_line = line_entry.line;
-
-        while (line_idx != UINT32_MAX) {
-          // If they only asked for the line entry, then we're done, we can
-          // just copy that over. But if they wanted more than just the line
-          // number, fill it in.
-          if (resolve_scope == eSymbolContextLineEntry) {
-            sc.line_entry = line_entry;
-          } else {
-            line_entry.range.GetBaseAddress().CalculateSymbolContext(
-                &sc, resolve_scope);
-          }
-
-          sc_list.Append(sc);
-          line_idx = line_table->FindLineEntryIndexByFileIndex(
-              line_idx + 1, file_indexes.front(), found_line, true,
-              &line_entry);
-        }
-      } else {
-        // We found multiple support files that match "file_spec" so use the
-        // line table function that searches for a line entries that match a
-        // multiple support file indexes.
-        LineEntry line_entry;
-        line_idx = line_table->FindLineEntryIndexByFileIndex(
-            0, file_indexes, line, exact, &line_entry);
-
-        // If "exact == true", then "found_line" will be the same as "line". If
-        // "exact == false", the "found_line" will be the closest line entry
-        // with a line number greater than "line" and we will use this for our
-        // subsequent line exact matches below.
-        found_line = line_entry.line;
-
-        while (line_idx != UINT32_MAX) {
-          if (resolve_scope == eSymbolContextLineEntry) {
-            sc.line_entry = line_entry;
-          } else {
-            line_entry.range.GetBaseAddress().CalculateSymbolContext(
-                &sc, resolve_scope);
-          }
-
-          sc_list.Append(sc);
-          line_idx = line_table->FindLineEntryIndexByFileIndex(
-              line_idx + 1, file_indexes, found_line, true, &line_entry);
-        }
-      }
+  if (line == 0) {
+    if (file_spec_matches_cu_file_spec && !check_inlines) {
+      // only append the context if we aren't looking for inline call sites by
+      // file and line and if the file spec matches that of the compile unit
+      sc_list.Append(sc);
     }
-  } else if (file_spec_matches_cu_file_spec && !check_inlines) {
-    // only append the context if we aren't looking for inline call sites by
-    // file and line and if the file spec matches that of the compile unit
-    sc_list.Append(sc);
+    return;
   }
-  return sc_list.GetSize() - prev_size;
+
+  LineTable *line_table = sc.comp_unit->GetLineTable();
+
+  if (line_table == nullptr)
+    return;
+
+  uint32_t line_idx;
+  LineEntry line_entry;
+
+  if (num_file_indexes == 1) {
+    // We only have a single support file that matches, so use the line
+    // table function that searches for a line entries that match a single
+    // support file index
+    line_idx = line_table->FindLineEntryIndexByFileIndex(
+        0, file_indexes.front(), line, exact, &line_entry);
+  } else {
+    // We found multiple support files that match "file_spec" so use the
+    // line table function that searches for a line entries that match a
+    // multiple support file indexes.
+    line_idx = line_table->FindLineEntryIndexByFileIndex(0, file_indexes, line,
+                                                         exact, &line_entry);
+  }
+  
+  // If "exact == true", then "found_line" will be the same as "line". If
+  // "exact == false", the "found_line" will be the closest line entry
+  // with a line number greater than "line" and we will use this for our
+  // subsequent line exact matches below.
+  uint32_t found_line = line_entry.line;
+  
+  while (line_idx != UINT32_MAX) {
+    // If they only asked for the line entry, then we're done, we can
+    // just copy that over. But if they wanted more than just the line
+    // number, fill it in.
+    if (resolve_scope == eSymbolContextLineEntry) {
+      sc.line_entry = line_entry;
+    } else {
+      line_entry.range.GetBaseAddress().CalculateSymbolContext(&sc,
+                                                               resolve_scope);
+    }
+
+    sc_list.Append(sc);
+    if (num_file_indexes == 1)
+      line_idx = line_table->FindLineEntryIndexByFileIndex(
+          line_idx + 1, file_indexes.front(), found_line, true, &line_entry);
+    else
+      line_idx = line_table->FindLineEntryIndexByFileIndex(
+          line_idx + 1, file_indexes, found_line, true, &line_entry);
+  }
 }
 
 bool CompileUnit::GetIsOptimized() {
   if (m_is_optimized == eLazyBoolCalculate) {
     m_is_optimized = eLazyBoolNo;
-    if (SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor()) {
-      if (symbol_vendor->ParseIsOptimized(*this))
+    if (SymbolFile *symfile = GetModule()->GetSymbolFile()) {
+      if (symfile->ParseIsOptimized(*this))
         m_is_optimized = eLazyBoolYes;
     }
   }
@@ -388,23 +340,29 @@
   if (m_imported_modules.empty() &&
       m_flags.IsClear(flagsParsedImportedModules)) {
     m_flags.Set(flagsParsedImportedModules);
-    if (SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor()) {
+    if (SymbolFile *symfile = GetModule()->GetSymbolFile()) {
       SymbolContext sc;
       CalculateSymbolContext(&sc);
-      symbol_vendor->ParseImportedModules(sc, m_imported_modules);
+      symfile->ParseImportedModules(sc, m_imported_modules);
     }
   }
   return m_imported_modules;
 }
 
+bool CompileUnit::ForEachExternalModule(
+    llvm::DenseSet<SymbolFile *> &visited_symbol_files,
+    llvm::function_ref<bool(Module &)> lambda) {
+  if (SymbolFile *symfile = GetModule()->GetSymbolFile())
+    return symfile->ForEachExternalModule(*this, visited_symbol_files, lambda);
+  return false;
+}
+
 const FileSpecList &CompileUnit::GetSupportFiles() {
   if (m_support_files.GetSize() == 0) {
     if (m_flags.IsClear(flagsParsedSupportFiles)) {
       m_flags.Set(flagsParsedSupportFiles);
-      SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor();
-      if (symbol_vendor) {
-        symbol_vendor->ParseSupportFiles(*this, m_support_files);
-      }
+      if (SymbolFile *symfile = GetModule()->GetSymbolFile())
+        symfile->ParseSupportFiles(*this, m_support_files);
     }
   }
   return m_support_files;
diff --git a/src/llvm-project/lldb/source/Symbol/CompilerDecl.cpp b/src/llvm-project/lldb/source/Symbol/CompilerDecl.cpp
index 2c64113..48d9169 100644
--- a/src/llvm-project/lldb/source/Symbol/CompilerDecl.cpp
+++ b/src/llvm-project/lldb/source/Symbol/CompilerDecl.cpp
@@ -12,10 +12,6 @@
 
 using namespace lldb_private;
 
-bool CompilerDecl::IsClang() const {
-  return IsValid() && m_type_system->getKind() == TypeSystem::eKindClang;
-}
-
 ConstString CompilerDecl::GetName() const {
   return m_type_system->DeclGetName(m_opaque_decl);
 }
diff --git a/src/llvm-project/lldb/source/Symbol/CompilerDeclContext.cpp b/src/llvm-project/lldb/source/Symbol/CompilerDeclContext.cpp
index a6f046c..581e087 100644
--- a/src/llvm-project/lldb/source/Symbol/CompilerDeclContext.cpp
+++ b/src/llvm-project/lldb/source/Symbol/CompilerDeclContext.cpp
@@ -19,33 +19,19 @@
   if (IsValid())
     return m_type_system->DeclContextFindDeclByName(m_opaque_decl_ctx, name,
                                                     ignore_using_decls);
-  else
-    return std::vector<CompilerDecl>();
-}
-
-bool CompilerDeclContext::IsClang() const {
-  return IsValid() && m_type_system->getKind() == TypeSystem::eKindClang;
+  return std::vector<CompilerDecl>();
 }
 
 ConstString CompilerDeclContext::GetName() const {
   if (IsValid())
     return m_type_system->DeclContextGetName(m_opaque_decl_ctx);
-  else
-    return ConstString();
+  return ConstString();
 }
 
 ConstString CompilerDeclContext::GetScopeQualifiedName() const {
   if (IsValid())
     return m_type_system->DeclContextGetScopeQualifiedName(m_opaque_decl_ctx);
-  else
-    return ConstString();
-}
-
-bool CompilerDeclContext::IsStructUnionOrClass() const {
-  if (IsValid())
-    return m_type_system->DeclContextIsStructUnionOrClass(m_opaque_decl_ctx);
-  else
-    return false;
+  return ConstString();
 }
 
 bool CompilerDeclContext::IsClassMethod(lldb::LanguageType *language_ptr,
@@ -55,8 +41,7 @@
     return m_type_system->DeclContextIsClassMethod(
         m_opaque_decl_ctx, language_ptr, is_instance_method_ptr,
         language_object_name_ptr);
-  else
-    return false;
+  return false;
 }
 
 bool CompilerDeclContext::IsContainedInLookup(CompilerDeclContext other) const {
diff --git a/src/llvm-project/lldb/source/Symbol/CompilerType.cpp b/src/llvm-project/lldb/source/Symbol/CompilerType.cpp
index bb9a1a6..09930f7 100644
--- a/src/llvm-project/lldb/source/Symbol/CompilerType.cpp
+++ b/src/llvm-project/lldb/source/Symbol/CompilerType.cpp
@@ -10,8 +10,6 @@
 
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/StreamFile.h"
-#include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
 #include "lldb/Symbol/Type.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
@@ -28,19 +26,6 @@
 using namespace lldb;
 using namespace lldb_private;
 
-CompilerType::CompilerType(TypeSystem *type_system,
-                           lldb::opaque_compiler_type_t type)
-    : m_type(type), m_type_system(type_system) {}
-
-CompilerType::CompilerType(clang::ASTContext *ast, clang::QualType qual_type)
-    : m_type(qual_type.getAsOpaquePtr()),
-      m_type_system(ClangASTContext::GetASTContext(ast)) {
-  if (m_type)
-    assert(m_type_system != nullptr);
-}
-
-CompilerType::~CompilerType() {}
-
 // Tests
 
 bool CompilerType::IsAggregateType() const {
@@ -333,12 +318,6 @@
   m_type = type;
 }
 
-void CompilerType::SetCompilerType(clang::ASTContext *ast,
-                                   clang::QualType qual_type) {
-  m_type_system = ClangASTContext::GetASTContext(ast);
-  m_type = qual_type.getAsOpaquePtr();
-}
-
 unsigned CompilerType::GetTypeQualifiers() const {
   if (IsValid())
     return m_type_system->GetTypeQualifiers(m_type);
@@ -442,6 +421,12 @@
     return CompilerType();
 }
 
+CompilerType CompilerType::GetAtomicType() const {
+  if (IsValid())
+    return m_type_system->GetAtomicType(m_type);
+  return CompilerType();
+}
+
 CompilerType CompilerType::AddConstModifier() const {
   if (IsValid())
     return m_type_system->AddConstModifier(m_type);
@@ -503,10 +488,10 @@
   return {};
 }
 
-size_t CompilerType::GetTypeBitAlign() const {
+llvm::Optional<size_t> CompilerType::GetTypeBitAlign(ExecutionContextScope *exe_scope) const {
   if (IsValid())
-    return m_type_system->GetTypeBitAlign(m_type);
-  return 0;
+    return m_type_system->GetTypeBitAlign(m_type, exe_scope);
+  return {};
 }
 
 lldb::Encoding CompilerType::GetEncoding(uint64_t &count) const {
@@ -729,13 +714,6 @@
   return UINT32_MAX;
 }
 
-size_t CompilerType::ConvertStringToFloatValue(const char *s, uint8_t *dst,
-                                               size_t dst_size) const {
-  if (IsValid())
-    return m_type_system->ConvertStringToFloatValue(m_type, s, dst, dst_size);
-  return 0;
-}
-
 // Dumping types
 #define DEPTH_INCREMENT 2
 
@@ -896,173 +874,6 @@
   return false;
 }
 
-bool CompilerType::SetValueFromScalar(const Scalar &value, Stream &strm) {
-  if (!IsValid())
-    return false;
-
-  // Aggregate types don't have scalar values
-  if (!IsAggregateType()) {
-    strm.GetFlags().Set(Stream::eBinary);
-    uint64_t count = 0;
-    lldb::Encoding encoding = GetEncoding(count);
-
-    if (encoding == lldb::eEncodingInvalid || count != 1)
-      return false;
-
-    llvm::Optional<uint64_t> bit_width = GetBitSize(nullptr);
-    if (!bit_width)
-      return false;
-
-    // This function doesn't currently handle non-byte aligned assignments
-    if ((*bit_width % 8) != 0)
-      return false;
-
-    const uint64_t byte_size = (*bit_width + 7) / 8;
-    switch (encoding) {
-    case lldb::eEncodingInvalid:
-      break;
-    case lldb::eEncodingVector:
-      break;
-    case lldb::eEncodingUint:
-      switch (byte_size) {
-      case 1:
-        strm.PutHex8(value.UInt());
-        return true;
-      case 2:
-        strm.PutHex16(value.UInt());
-        return true;
-      case 4:
-        strm.PutHex32(value.UInt());
-        return true;
-      case 8:
-        strm.PutHex64(value.ULongLong());
-        return true;
-      default:
-        break;
-      }
-      break;
-
-    case lldb::eEncodingSint:
-      switch (byte_size) {
-      case 1:
-        strm.PutHex8(value.SInt());
-        return true;
-      case 2:
-        strm.PutHex16(value.SInt());
-        return true;
-      case 4:
-        strm.PutHex32(value.SInt());
-        return true;
-      case 8:
-        strm.PutHex64(value.SLongLong());
-        return true;
-      default:
-        break;
-      }
-      break;
-
-    case lldb::eEncodingIEEE754:
-      if (byte_size <= sizeof(long double)) {
-        if (byte_size == sizeof(float)) {
-          strm.PutFloat(value.Float());
-          return true;
-        } else if (byte_size == sizeof(double)) {
-          strm.PutDouble(value.Double());
-          return true;
-        } else if (byte_size == sizeof(long double)) {
-          strm.PutDouble(value.LongDouble());
-          return true;
-        }
-      }
-      break;
-    }
-  }
-  return false;
-}
-
-bool CompilerType::ReadFromMemory(lldb_private::ExecutionContext *exe_ctx,
-                                  lldb::addr_t addr, AddressType address_type,
-                                  lldb_private::DataExtractor &data) {
-  if (!IsValid())
-    return false;
-
-  // Can't convert a file address to anything valid without more context (which
-  // Module it came from)
-  if (address_type == eAddressTypeFile)
-    return false;
-
-  if (!GetCompleteType())
-    return false;
-
-  auto byte_size =
-      GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr);
-  if (!byte_size)
-    return false;
-
-  if (data.GetByteSize() < *byte_size) {
-    lldb::DataBufferSP data_sp(new DataBufferHeap(*byte_size, '\0'));
-    data.SetData(data_sp);
-  }
-
-  uint8_t *dst = const_cast<uint8_t *>(data.PeekData(0, *byte_size));
-  if (dst != nullptr) {
-    if (address_type == eAddressTypeHost) {
-      if (addr == 0)
-        return false;
-      // The address is an address in this process, so just copy it
-      memcpy(dst, reinterpret_cast<uint8_t *>(addr), *byte_size);
-      return true;
-    } else {
-      Process *process = nullptr;
-      if (exe_ctx)
-        process = exe_ctx->GetProcessPtr();
-      if (process) {
-        Status error;
-        return process->ReadMemory(addr, dst, *byte_size, error) == *byte_size;
-      }
-    }
-  }
-  return false;
-}
-
-bool CompilerType::WriteToMemory(lldb_private::ExecutionContext *exe_ctx,
-                                 lldb::addr_t addr, AddressType address_type,
-                                 StreamString &new_value) {
-  if (!IsValid())
-    return false;
-
-  // Can't convert a file address to anything valid without more context (which
-  // Module it came from)
-  if (address_type == eAddressTypeFile)
-    return false;
-
-  if (!GetCompleteType())
-    return false;
-
-  auto byte_size =
-      GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope() : nullptr);
-  if (!byte_size)
-    return false;
-
-  if (*byte_size > 0) {
-    if (address_type == eAddressTypeHost) {
-      // The address is an address in this process, so just copy it
-      memcpy((void *)addr, new_value.GetData(), *byte_size);
-      return true;
-    } else {
-      Process *process = nullptr;
-      if (exe_ctx)
-        process = exe_ctx->GetProcessPtr();
-      if (process) {
-        Status error;
-        return process->WriteMemory(addr, new_value.GetData(), *byte_size,
-                                    error) == *byte_size;
-      }
-    }
-  }
-  return false;
-}
-
 bool lldb_private::operator==(const lldb_private::CompilerType &lhs,
                               const lldb_private::CompilerType &rhs) {
   return lhs.GetTypeSystem() == rhs.GetTypeSystem() &&
diff --git a/src/llvm-project/lldb/source/Symbol/CxxModuleHandler.cpp b/src/llvm-project/lldb/source/Symbol/CxxModuleHandler.cpp
index 68a2aab..19e80e5 100644
--- a/src/llvm-project/lldb/source/Symbol/CxxModuleHandler.cpp
+++ b/src/llvm-project/lldb/source/Symbol/CxxModuleHandler.cpp
@@ -175,6 +175,8 @@
 }
 
 llvm::Optional<Decl *> CxxModuleHandler::tryInstantiateStdTemplate(Decl *d) {
+  Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
+
   // If we don't have a template to instiantiate, then there is nothing to do.
   auto td = dyn_cast<ClassTemplateSpecializationDecl>(d);
   if (!td)
@@ -196,9 +198,15 @@
 
   // Find the local DeclContext that corresponds to the DeclContext of our
   // decl we want to import.
-  auto to_context = getEqualLocalDeclContext(*m_sema, td->getDeclContext());
-  if (!to_context)
+  llvm::Expected<DeclContext *> to_context =
+      getEqualLocalDeclContext(*m_sema, td->getDeclContext());
+  if (!to_context) {
+    LLDB_LOG_ERROR(log, to_context.takeError(),
+                   "Got error while searching equal local DeclContext for decl "
+                   "'{1}':\n{0}",
+                   td->getName());
     return {};
+  }
 
   // Look up the template in our local context.
   std::unique_ptr<LookupResult> lookup =
@@ -215,8 +223,6 @@
   // Import the foreign template arguments.
   llvm::SmallVector<TemplateArgument, 4> imported_args;
 
-  Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS);
-
   // If this logic is changed, also update templateArgsAreSupported.
   for (const TemplateArgument &arg : foreign_args.asArray()) {
     switch (arg.getKind()) {
diff --git a/src/llvm-project/lldb/source/Symbol/DWARFCallFrameInfo.cpp b/src/llvm-project/lldb/source/Symbol/DWARFCallFrameInfo.cpp
index 0ab9fa4..b4e74e9 100644
--- a/src/llvm-project/lldb/source/Symbol/DWARFCallFrameInfo.cpp
+++ b/src/llvm-project/lldb/source/Symbol/DWARFCallFrameInfo.cpp
@@ -19,6 +19,7 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Timer.h"
 #include <list>
+#include <cstring>
 
 using namespace lldb;
 using namespace lldb_private;
@@ -601,6 +602,9 @@
     }
     offset += aug_data_len;
   }
+  unwind_plan.SetUnwindPlanForSignalTrap(
+    strchr(cie->augmentation, 'S') ? eLazyBoolYes : eLazyBoolNo);
+
   Address lsda_data;
   Address personality_function_ptr;
 
@@ -769,13 +773,12 @@
           // useful for compilers that move epilogue code into the body of a
           // function.)
           if (stack.empty()) {
-            if (log)
-              log->Printf("DWARFCallFrameInfo::%s(dwarf_offset: %" PRIx32
-                          ", startaddr: %" PRIx64
-                          " encountered DW_CFA_restore_state but state stack "
-                          "is empty. Corrupt unwind info?",
-                          __FUNCTION__, dwarf_offset,
-                          startaddr.GetFileAddress());
+            LLDB_LOGF(log,
+                      "DWARFCallFrameInfo::%s(dwarf_offset: %" PRIx32
+                      ", startaddr: %" PRIx64
+                      " encountered DW_CFA_restore_state but state stack "
+                      "is empty. Corrupt unwind info?",
+                      __FUNCTION__, dwarf_offset, startaddr.GetFileAddress());
             break;
           }
           lldb::addr_t offset = row->GetOffset();
diff --git a/src/llvm-project/lldb/source/Symbol/DeclVendor.cpp b/src/llvm-project/lldb/source/Symbol/DeclVendor.cpp
index 0a912a2..9ccf422 100644
--- a/src/llvm-project/lldb/source/Symbol/DeclVendor.cpp
+++ b/src/llvm-project/lldb/source/Symbol/DeclVendor.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Symbol/DeclVendor.h"
-
-#include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/CompilerDecl.h"
+#include "lldb/Symbol/TypeSystem.h"
 
 #include <vector>
 
@@ -20,10 +20,11 @@
   // FIXME: This depends on clang, but should be able to support any
   // TypeSystem.
   std::vector<CompilerType> ret;
-  std::vector<clang::NamedDecl *> decls;
+  std::vector<CompilerDecl> decls;
   if (FindDecls(name, /*append*/ true, max_matches, decls))
-    for (auto *decl : decls)
-      if (auto type = ClangASTContext::GetTypeForDecl(decl))
+    for (auto decl : decls)
+      if (auto type =
+              decl.GetTypeSystem()->GetTypeForDecl(decl.GetOpaqueDecl()))
         ret.push_back(type);
   return ret;
 }
diff --git a/src/llvm-project/lldb/source/Symbol/Declaration.cpp b/src/llvm-project/lldb/source/Symbol/Declaration.cpp
index d78ba96..4d0975d 100644
--- a/src/llvm-project/lldb/source/Symbol/Declaration.cpp
+++ b/src/llvm-project/lldb/source/Symbol/Declaration.cpp
@@ -90,12 +90,9 @@
 
 bool lldb_private::operator==(const Declaration &lhs, const Declaration &rhs) {
 #ifdef LLDB_ENABLE_DECLARATION_COLUMNS
-  if (lhs.GetColumn() == rhs.GetColumn())
-    if (lhs.GetLine() == rhs.GetLine())
-      return lhs.GetFile() == rhs.GetFile();
+  if (lhs.GetColumn() != rhs.GetColumn())
+    return false;
 #else
-  if (lhs.GetLine() == rhs.GetLine())
-    return FileSpec::Equal(lhs.GetFile(), rhs.GetFile(), true);
+  return lhs.GetLine() == rhs.GetLine() && lhs.GetFile() == rhs.GetFile();
 #endif
-  return false;
 }
diff --git a/src/llvm-project/lldb/source/Symbol/FuncUnwinders.cpp b/src/llvm-project/lldb/source/Symbol/FuncUnwinders.cpp
index 09cb9b0..7a6f3ce 100644
--- a/src/llvm-project/lldb/source/Symbol/FuncUnwinders.cpp
+++ b/src/llvm-project/lldb/source/Symbol/FuncUnwinders.cpp
@@ -10,6 +10,7 @@
 #include "lldb/Core/Address.h"
 #include "lldb/Core/AddressRange.h"
 #include "lldb/Symbol/ArmUnwindInfo.h"
+#include "lldb/Symbol/CallFrameInfo.h"
 #include "lldb/Symbol/CompactUnwindInfo.h"
 #include "lldb/Symbol/DWARFCallFrameInfo.h"
 #include "lldb/Symbol/ObjectFile.h"
@@ -40,7 +41,9 @@
       m_unwind_plan_arch_default_sp(),
       m_unwind_plan_arch_default_at_func_entry_sp(),
       m_tried_unwind_plan_assembly(false), m_tried_unwind_plan_eh_frame(false),
+      m_tried_unwind_plan_object_file(false),
       m_tried_unwind_plan_debug_frame(false),
+      m_tried_unwind_plan_object_file_augmented(false),
       m_tried_unwind_plan_eh_frame_augmented(false),
       m_tried_unwind_plan_debug_frame_augmented(false),
       m_tried_unwind_plan_compact_unwind(false),
@@ -58,6 +61,8 @@
                                                     Thread &thread) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
 
+  if (UnwindPlanSP plan_sp = GetObjectFileUnwindPlan(target))
+    return plan_sp;
   if (UnwindPlanSP plan_sp = GetSymbolFileUnwindPlan(thread))
     return plan_sp;
   if (UnwindPlanSP plan_sp = GetDebugFrameUnwindPlan(target))
@@ -97,6 +102,26 @@
   return UnwindPlanSP();
 }
 
+lldb::UnwindPlanSP FuncUnwinders::GetObjectFileUnwindPlan(Target &target) {
+  std::lock_guard<std::recursive_mutex> guard(m_mutex);
+  if (m_unwind_plan_object_file_sp.get() ||
+      m_tried_unwind_plan_object_file)
+    return m_unwind_plan_object_file_sp;
+
+  m_tried_unwind_plan_object_file = true;
+  if (m_range.GetBaseAddress().IsValid()) {
+    CallFrameInfo *object_file_frame = m_unwind_table.GetObjectFileUnwindInfo();
+    if (object_file_frame) {
+      m_unwind_plan_object_file_sp =
+          std::make_shared<UnwindPlan>(lldb::eRegisterKindGeneric);
+      if (!object_file_frame->GetUnwindPlan(m_range,
+                                            *m_unwind_plan_object_file_sp))
+        m_unwind_plan_object_file_sp.reset();
+    }
+  }
+  return m_unwind_plan_object_file_sp;
+}
+
 UnwindPlanSP FuncUnwinders::GetEHFrameUnwindPlan(Target &target) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
   if (m_unwind_plan_eh_frame_sp.get() || m_tried_unwind_plan_eh_frame)
@@ -185,6 +210,38 @@
   return m_unwind_plan_symbol_file_sp;
 }
 
+UnwindPlanSP
+FuncUnwinders::GetObjectFileAugmentedUnwindPlan(Target &target,
+                                                     Thread &thread) {
+  std::lock_guard<std::recursive_mutex> guard(m_mutex);
+  if (m_unwind_plan_object_file_augmented_sp.get() ||
+      m_tried_unwind_plan_object_file_augmented)
+    return m_unwind_plan_object_file_augmented_sp;
+
+  m_tried_unwind_plan_object_file_augmented = true;
+
+  UnwindPlanSP object_file_unwind_plan = GetObjectFileUnwindPlan(target);
+  if (!object_file_unwind_plan)
+    return m_unwind_plan_object_file_augmented_sp;
+
+  m_unwind_plan_object_file_augmented_sp =
+      std::make_shared<UnwindPlan>(*object_file_unwind_plan);
+
+  // Augment the instructions with epilogue descriptions if necessary
+  // so the UnwindPlan can be used at any instruction in the function.
+
+  UnwindAssemblySP assembly_profiler_sp(GetUnwindAssemblyProfiler(target));
+  if (assembly_profiler_sp) {
+    if (!assembly_profiler_sp->AugmentUnwindPlanFromCallSite(
+            m_range, thread, *m_unwind_plan_object_file_augmented_sp)) {
+      m_unwind_plan_object_file_augmented_sp.reset();
+    }
+  } else {
+    m_unwind_plan_object_file_augmented_sp.reset();
+  }
+  return m_unwind_plan_object_file_augmented_sp;
+}
+
 UnwindPlanSP FuncUnwinders::GetEHFrameAugmentedUnwindPlan(Target &target,
                                                           Thread &thread) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -328,6 +385,8 @@
   UnwindPlanSP eh_frame_sp = GetEHFrameUnwindPlan(target);
   if (!eh_frame_sp)
     eh_frame_sp = GetDebugFrameUnwindPlan(target);
+  if (!eh_frame_sp)
+    eh_frame_sp = GetObjectFileUnwindPlan(target);
   UnwindPlanSP arch_default_at_entry_sp =
       GetUnwindPlanArchitectureDefaultAtFunctionEntry(thread);
   UnwindPlanSP arch_default_sp = GetUnwindPlanArchitectureDefault(thread);
@@ -366,6 +425,8 @@
     return plan_sp;
   if (UnwindPlanSP plan_sp = GetEHFrameAugmentedUnwindPlan(target, thread))
     return plan_sp;
+  if (UnwindPlanSP plan_sp = GetObjectFileAugmentedUnwindPlan(target, thread))
+    return plan_sp;
 
   return assembly_sp;
 }
@@ -473,6 +534,9 @@
   if (unwind_plan_sp.get() == nullptr) {
     unwind_plan_sp = GetCompactUnwindUnwindPlan(target);
   }
+  if (unwind_plan_sp.get() == nullptr) {
+    unwind_plan_sp = GetObjectFileUnwindPlan(target);
+  }
   if (unwind_plan_sp.get() && unwind_plan_sp->GetLSDAAddress().IsValid()) {
     lsda_addr = unwind_plan_sp->GetLSDAAddress();
   }
@@ -486,6 +550,9 @@
   if (unwind_plan_sp.get() == nullptr) {
     unwind_plan_sp = GetCompactUnwindUnwindPlan(target);
   }
+  if (unwind_plan_sp.get() == nullptr) {
+    unwind_plan_sp = GetObjectFileUnwindPlan(target);
+  }
   if (unwind_plan_sp.get() &&
       unwind_plan_sp->GetPersonalityFunctionPtr().IsValid()) {
     personality_addr = unwind_plan_sp->GetPersonalityFunctionPtr();
diff --git a/src/llvm-project/lldb/source/Symbol/Function.cpp b/src/llvm-project/lldb/source/Symbol/Function.cpp
index 951392c..e92585c 100644
--- a/src/llvm-project/lldb/source/Symbol/Function.cpp
+++ b/src/llvm-project/lldb/source/Symbol/Function.cpp
@@ -16,8 +16,8 @@
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Symbol/LineTable.h"
 #include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Target/Language.h"
+#include "lldb/Target/Target.h"
 #include "lldb/Utility/Log.h"
 #include "llvm/Support/Casting.h"
 
@@ -60,10 +60,11 @@
   return m_name.MemorySize() + m_declaration.MemorySize();
 }
 
-InlineFunctionInfo::InlineFunctionInfo(const char *name, const char *mangled,
+InlineFunctionInfo::InlineFunctionInfo(const char *name,
+                                       llvm::StringRef mangled,
                                        const Declaration *decl_ptr,
                                        const Declaration *call_decl_ptr)
-    : FunctionInfo(name, decl_ptr), m_mangled(ConstString(mangled), true),
+    : FunctionInfo(name, decl_ptr), m_mangled(mangled),
       m_call_decl(call_decl_ptr) {}
 
 InlineFunctionInfo::InlineFunctionInfo(ConstString name,
@@ -75,16 +76,6 @@
 
 InlineFunctionInfo::~InlineFunctionInfo() {}
 
-int InlineFunctionInfo::Compare(const InlineFunctionInfo &a,
-                                const InlineFunctionInfo &b) {
-
-  int result = FunctionInfo::Compare(a, b);
-  if (result)
-    return result;
-  // only compare the mangled names if both have them
-  return Mangled::Compare(a.m_mangled, a.m_mangled);
-}
-
 void InlineFunctionInfo::Dump(Stream *s, bool show_fullpaths) const {
   FunctionInfo::Dump(s, show_fullpaths);
   if (m_mangled)
@@ -127,38 +118,42 @@
   return FunctionInfo::MemorySize() + m_mangled.MemorySize();
 }
 
-//
-CallEdge::CallEdge(const char *symbol_name, lldb::addr_t return_pc)
-    : return_pc(return_pc), resolved(false) {
-  lazy_callee.symbol_name = symbol_name;
+/// @name Call site related structures
+/// @{
+
+lldb::addr_t CallEdge::GetReturnPCAddress(Function &caller,
+                                          Target &target) const {
+  const Address &base = caller.GetAddressRange().GetBaseAddress();
+  return base.GetLoadAddress(&target) + return_pc;
 }
 
-void CallEdge::ParseSymbolFileAndResolve(ModuleList &images) {
+void DirectCallEdge::ParseSymbolFileAndResolve(ModuleList &images) {
   if (resolved)
     return;
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-  LLDB_LOG(log, "CallEdge: Lazily parsing the call graph for {0}",
+  LLDB_LOG(log, "DirectCallEdge: Lazily parsing the call graph for {0}",
            lazy_callee.symbol_name);
 
   auto resolve_lazy_callee = [&]() -> Function * {
     ConstString callee_name{lazy_callee.symbol_name};
     SymbolContextList sc_list;
-    size_t num_matches =
-        images.FindFunctionSymbols(callee_name, eFunctionNameTypeAuto, sc_list);
+    images.FindFunctionSymbols(callee_name, eFunctionNameTypeAuto, sc_list);
+    size_t num_matches = sc_list.GetSize();
     if (num_matches == 0 || !sc_list[0].symbol) {
-      LLDB_LOG(log, "CallEdge: Found no symbols for {0}, cannot resolve it",
+      LLDB_LOG(log,
+               "DirectCallEdge: Found no symbols for {0}, cannot resolve it",
                callee_name);
       return nullptr;
     }
     Address callee_addr = sc_list[0].symbol->GetAddress();
     if (!callee_addr.IsValid()) {
-      LLDB_LOG(log, "CallEdge: Invalid symbol address");
+      LLDB_LOG(log, "DirectCallEdge: Invalid symbol address");
       return nullptr;
     }
     Function *f = callee_addr.CalculateSymbolContextFunction();
     if (!f) {
-      LLDB_LOG(log, "CallEdge: Could not find complete function");
+      LLDB_LOG(log, "DirectCallEdge: Could not find complete function");
       return nullptr;
     }
     return f;
@@ -167,17 +162,50 @@
   resolved = true;
 }
 
-Function *CallEdge::GetCallee(ModuleList &images) {
+Function *DirectCallEdge::GetCallee(ModuleList &images, ExecutionContext &) {
   ParseSymbolFileAndResolve(images);
+  assert(resolved && "Did not resolve lazy callee");
   return lazy_callee.def;
 }
 
-lldb::addr_t CallEdge::GetReturnPCAddress(Function &caller,
-                                          Target &target) const {
-  const Address &base = caller.GetAddressRange().GetBaseAddress();
-  return base.GetLoadAddress(&target) + return_pc;
+Function *IndirectCallEdge::GetCallee(ModuleList &images,
+                                      ExecutionContext &exe_ctx) {
+  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
+  Status error;
+  Value callee_addr_val;
+  if (!call_target.Evaluate(&exe_ctx, exe_ctx.GetRegisterContext(),
+                            /*loclist_base_addr=*/LLDB_INVALID_ADDRESS,
+                            /*initial_value_ptr=*/nullptr,
+                            /*object_address_ptr=*/nullptr, callee_addr_val,
+                            &error)) {
+    LLDB_LOGF(log, "IndirectCallEdge: Could not evaluate expression: %s",
+              error.AsCString());
+    return nullptr;
+  }
+
+  addr_t raw_addr = callee_addr_val.GetScalar().ULongLong(LLDB_INVALID_ADDRESS);
+  if (raw_addr == LLDB_INVALID_ADDRESS) {
+    LLDB_LOG(log, "IndirectCallEdge: Could not extract address from scalar");
+    return nullptr;
+  }
+
+  Address callee_addr;
+  if (!exe_ctx.GetTargetPtr()->ResolveLoadAddress(raw_addr, callee_addr)) {
+    LLDB_LOG(log, "IndirectCallEdge: Could not resolve callee's load address");
+    return nullptr;
+  }
+
+  Function *f = callee_addr.CalculateSymbolContextFunction();
+  if (!f) {
+    LLDB_LOG(log, "IndirectCallEdge: Could not find complete function");
+    return nullptr;
+  }
+
+  return f;
 }
 
+/// @}
+
 //
 Function::Function(CompileUnit *comp_unit, lldb::user_id_t func_uid,
                    lldb::user_id_t type_uid, const Mangled &mangled, Type *type,
@@ -240,7 +268,7 @@
   }
 }
 
-llvm::MutableArrayRef<CallEdge> Function::GetCallEdges() {
+llvm::ArrayRef<std::unique_ptr<CallEdge>> Function::GetCallEdges() {
   if (m_call_edges_resolved)
     return m_call_edges;
 
@@ -261,33 +289,49 @@
 
   // Sort the call edges to speed up return_pc lookups.
   llvm::sort(m_call_edges.begin(), m_call_edges.end(),
-             [](const CallEdge &LHS, const CallEdge &RHS) {
-               return LHS.GetUnresolvedReturnPCAddress() <
-                      RHS.GetUnresolvedReturnPCAddress();
+             [](const std::unique_ptr<CallEdge> &LHS,
+                const std::unique_ptr<CallEdge> &RHS) {
+               return LHS->GetUnresolvedReturnPCAddress() <
+                      RHS->GetUnresolvedReturnPCAddress();
              });
 
   return m_call_edges;
 }
 
-llvm::MutableArrayRef<CallEdge> Function::GetTailCallingEdges() {
+llvm::ArrayRef<std::unique_ptr<CallEdge>> Function::GetTailCallingEdges() {
   // Call edges are sorted by return PC, and tail calling edges have invalid
   // return PCs. Find them at the end of the list.
-  return GetCallEdges().drop_until([](const CallEdge &edge) {
-    return edge.GetUnresolvedReturnPCAddress() == LLDB_INVALID_ADDRESS;
+  return GetCallEdges().drop_until([](const std::unique_ptr<CallEdge> &edge) {
+    return edge->GetUnresolvedReturnPCAddress() == LLDB_INVALID_ADDRESS;
   });
 }
 
+CallEdge *Function::GetCallEdgeForReturnAddress(addr_t return_pc,
+                                                Target &target) {
+  auto edges = GetCallEdges();
+  auto edge_it =
+      std::lower_bound(edges.begin(), edges.end(), return_pc,
+                       [&](const std::unique_ptr<CallEdge> &edge, addr_t pc) {
+                         return edge->GetReturnPCAddress(*this, target) < pc;
+                       });
+  if (edge_it == edges.end() ||
+      edge_it->get()->GetReturnPCAddress(*this, target) != return_pc)
+    return nullptr;
+  return &const_cast<CallEdge &>(*edge_it->get());
+}
+
 Block &Function::GetBlock(bool can_create) {
   if (!m_block.BlockInfoHasBeenParsed() && can_create) {
     ModuleSP module_sp = CalculateSymbolContextModule();
     if (module_sp) {
-      module_sp->GetSymbolVendor()->ParseBlocksRecursive(*this);
+      module_sp->GetSymbolFile()->ParseBlocksRecursive(*this);
     } else {
       Host::SystemLog(Host::eSystemLogError,
                       "error: unable to find module "
                       "shared pointer for function '%s' "
                       "in %s\n",
-                      GetName().GetCString(), m_comp_unit->GetPath().c_str());
+                      GetName().GetCString(),
+                      m_comp_unit->GetPrimaryFile().GetPath().c_str());
     }
     m_block.SetBlockInfoHasBeenParsed(true, true);
   }
@@ -428,14 +472,8 @@
   ModuleSP module_sp = CalculateSymbolContextModule();
 
   if (module_sp) {
-    SymbolVendor *sym_vendor = module_sp->GetSymbolVendor();
-
-    if (sym_vendor) {
-      SymbolFile *sym_file = sym_vendor->GetSymbolFile();
-
-      if (sym_file)
-        return sym_file->GetDeclContextForUID(GetID());
-    }
+    if (SymbolFile *sym_file = module_sp->GetSymbolFile())
+      return sym_file->GetDeclContextForUID(GetID());
   }
   return CompilerDeclContext();
 }
@@ -449,12 +487,7 @@
     if (!sc.module_sp)
       return nullptr;
 
-    SymbolVendor *sym_vendor = sc.module_sp->GetSymbolVendor();
-
-    if (sym_vendor == nullptr)
-      return nullptr;
-
-    SymbolFile *sym_file = sym_vendor->GetSymbolFile();
+    SymbolFile *sym_file = sc.module_sp->GetSymbolFile();
 
     if (sym_file == nullptr)
       return nullptr;
diff --git a/src/llvm-project/lldb/source/Symbol/LineEntry.cpp b/src/llvm-project/lldb/source/Symbol/LineEntry.cpp
index 959a327..bb3828f 100644
--- a/src/llvm-project/lldb/source/Symbol/LineEntry.cpp
+++ b/src/llvm-project/lldb/source/Symbol/LineEntry.cpp
@@ -51,7 +51,7 @@
 bool LineEntry::DumpStopContext(Stream *s, bool show_fullpaths) const {
   if (file) {
     if (show_fullpaths)
-      file.Dump(s);
+      file.Dump(s->AsRawOstream());
     else
       file.GetFilename().Dump(s);
 
diff --git a/src/llvm-project/lldb/source/Symbol/LineTable.cpp b/src/llvm-project/lldb/source/Symbol/LineTable.cpp
index 8d4d72c..fecc90c 100644
--- a/src/llvm-project/lldb/source/Symbol/LineTable.cpp
+++ b/src/llvm-project/lldb/source/Symbol/LineTable.cpp
@@ -34,11 +34,9 @@
               is_start_of_basic_block, is_prologue_end, is_epilogue_begin,
               is_terminal_entry);
 
-  entry_collection::iterator begin_pos = m_entries.begin();
-  entry_collection::iterator end_pos = m_entries.end();
   LineTable::Entry::LessThanBinaryPredicate less_than_bp(this);
   entry_collection::iterator pos =
-      upper_bound(begin_pos, end_pos, entry, less_than_bp);
+      llvm::upper_bound(m_entries, entry, less_than_bp);
 
   //  Stream s(stdout);
   //  s << "\n\nBefore:\n";
@@ -241,33 +239,47 @@
 
 bool LineTable::ConvertEntryAtIndexToLineEntry(uint32_t idx,
                                                LineEntry &line_entry) {
-  if (idx < m_entries.size()) {
-    const Entry &entry = m_entries[idx];
-    ModuleSP module_sp(m_comp_unit->GetModule());
-    if (module_sp &&
-        module_sp->ResolveFileAddress(entry.file_addr,
-                                      line_entry.range.GetBaseAddress())) {
-      if (!entry.is_terminal_entry && idx + 1 < m_entries.size())
-        line_entry.range.SetByteSize(m_entries[idx + 1].file_addr -
-                                     entry.file_addr);
-      else
-        line_entry.range.SetByteSize(0);
+  if (idx >= m_entries.size())
+    return false;
 
-      line_entry.file =
-          m_comp_unit->GetSupportFiles().GetFileSpecAtIndex(entry.file_idx);
-      line_entry.original_file =
-          m_comp_unit->GetSupportFiles().GetFileSpecAtIndex(entry.file_idx);
-      line_entry.line = entry.line;
-      line_entry.column = entry.column;
-      line_entry.is_start_of_statement = entry.is_start_of_statement;
-      line_entry.is_start_of_basic_block = entry.is_start_of_basic_block;
-      line_entry.is_prologue_end = entry.is_prologue_end;
-      line_entry.is_epilogue_begin = entry.is_epilogue_begin;
-      line_entry.is_terminal_entry = entry.is_terminal_entry;
-      return true;
-    }
-  }
-  return false;
+  const Entry &entry = m_entries[idx];
+  ModuleSP module_sp(m_comp_unit->GetModule());
+  if (!module_sp)
+    return false;
+
+  addr_t file_addr = entry.file_addr;
+
+  // A terminal entry can point outside of a module or a section. Decrement the
+  // address to ensure it resolves correctly.
+  if (entry.is_terminal_entry)
+    --file_addr;
+
+  if (!module_sp->ResolveFileAddress(file_addr,
+                                     line_entry.range.GetBaseAddress()))
+    return false;
+
+  // Now undo the decrement above.
+  if (entry.is_terminal_entry)
+    line_entry.range.GetBaseAddress().Slide(1);
+
+  if (!entry.is_terminal_entry && idx + 1 < m_entries.size())
+    line_entry.range.SetByteSize(m_entries[idx + 1].file_addr -
+                                 entry.file_addr);
+  else
+    line_entry.range.SetByteSize(0);
+
+  line_entry.file =
+      m_comp_unit->GetSupportFiles().GetFileSpecAtIndex(entry.file_idx);
+  line_entry.original_file =
+      m_comp_unit->GetSupportFiles().GetFileSpecAtIndex(entry.file_idx);
+  line_entry.line = entry.line;
+  line_entry.column = entry.column;
+  line_entry.is_start_of_statement = entry.is_start_of_statement;
+  line_entry.is_start_of_basic_block = entry.is_start_of_basic_block;
+  line_entry.is_prologue_end = entry.is_prologue_end;
+  line_entry.is_epilogue_begin = entry.is_epilogue_begin;
+  line_entry.is_terminal_entry = entry.is_terminal_entry;
+  return true;
 }
 
 uint32_t LineTable::FindLineEntryIndexByFileIndex(
@@ -275,8 +287,6 @@
     uint32_t line, bool exact, LineEntry *line_entry_ptr) {
 
   const size_t count = m_entries.size();
-  std::vector<uint32_t>::const_iterator begin_pos = file_indexes.begin();
-  std::vector<uint32_t>::const_iterator end_pos = file_indexes.end();
   size_t best_match = UINT32_MAX;
 
   for (size_t idx = start_idx; idx < count; ++idx) {
@@ -285,7 +295,7 @@
     if (m_entries[idx].is_terminal_entry)
       continue;
 
-    if (find(begin_pos, end_pos, m_entries[idx].file_idx) == end_pos)
+    if (llvm::find(file_indexes, m_entries[idx].file_idx) == file_indexes.end())
       continue;
 
     // Exact match always wins.  Otherwise try to find the closest line > the
diff --git a/src/llvm-project/lldb/source/Symbol/LocateSymbolFile.cpp b/src/llvm-project/lldb/source/Symbol/LocateSymbolFile.cpp
index bfdb6e7..d2b39d6 100644
--- a/src/llvm-project/lldb/source/Symbol/LocateSymbolFile.cpp
+++ b/src/llvm-project/lldb/source/Symbol/LocateSymbolFile.cpp
@@ -157,8 +157,8 @@
     if (::LookForDsymNextToExecutablePath(module_spec, exec_fspec,
                                           dsym_fspec)) {
       if (log) {
-        log->Printf("dSYM with matching UUID & arch found at %s",
-                    dsym_fspec.GetPath().c_str());
+        LLDB_LOGF(log, "dSYM with matching UUID & arch found at %s",
+                  dsym_fspec.GetPath().c_str());
       }
       return true;
     } else {
@@ -189,8 +189,8 @@
           if (::LookForDsymNextToExecutablePath(module_spec, parent_dirs,
                                                 dsym_fspec)) {
             if (log) {
-              log->Printf("dSYM with matching UUID & arch found at %s",
-                          dsym_fspec.GetPath().c_str());
+              LLDB_LOGF(log, "dSYM with matching UUID & arch found at %s",
+                        dsym_fspec.GetPath().c_str());
             }
             return true;
           }
@@ -230,19 +230,19 @@
 
 ModuleSpec Symbols::LocateExecutableObjectFile(const ModuleSpec &module_spec) {
   ModuleSpec result;
-  const FileSpec *exec_fspec = module_spec.GetFileSpecPtr();
+  const FileSpec &exec_fspec = module_spec.GetFileSpec();
   const ArchSpec *arch = module_spec.GetArchitecturePtr();
   const UUID *uuid = module_spec.GetUUIDPtr();
   static Timer::Category func_cat(LLVM_PRETTY_FUNCTION);
   Timer scoped_timer(
       func_cat, "LocateExecutableObjectFile (file = %s, arch = %s, uuid = %p)",
-      exec_fspec ? exec_fspec->GetFilename().AsCString("<NULL>") : "<NULL>",
+      exec_fspec ? exec_fspec.GetFilename().AsCString("<NULL>") : "<NULL>",
       arch ? arch->GetArchitectureName() : "<NULL>", (const void *)uuid);
 
   ModuleSpecList module_specs;
   ModuleSpec matched_module_spec;
   if (exec_fspec &&
-      ObjectFile::GetModuleSpecifications(*exec_fspec, 0, 0, module_specs) &&
+      ObjectFile::GetModuleSpecifications(exec_fspec, 0, 0, module_specs) &&
       module_specs.FindMatchingModuleSpec(module_spec, matched_module_spec)) {
     result.GetFileSpec() = exec_fspec;
   } else {
@@ -261,107 +261,110 @@
       FileSystem::Instance().Exists(symbol_file_spec))
     return symbol_file_spec;
 
-  const char *symbol_filename = symbol_file_spec.GetFilename().AsCString();
-  if (symbol_filename && symbol_filename[0]) {
-    FileSpecList debug_file_search_paths = default_search_paths;
+  FileSpecList debug_file_search_paths = default_search_paths;
 
-    // Add module directory.
-    FileSpec module_file_spec = module_spec.GetFileSpec();
-    // We keep the unresolved pathname if it fails.
-    FileSystem::Instance().ResolveSymbolicLink(module_file_spec,
-                                               module_file_spec);
+  // Add module directory.
+  FileSpec module_file_spec = module_spec.GetFileSpec();
+  // We keep the unresolved pathname if it fails.
+  FileSystem::Instance().ResolveSymbolicLink(module_file_spec,
+                                             module_file_spec);
 
-    ConstString file_dir = module_file_spec.GetDirectory();
+  ConstString file_dir = module_file_spec.GetDirectory();
+  {
+    FileSpec file_spec(file_dir.AsCString("."));
+    FileSystem::Instance().Resolve(file_spec);
+    debug_file_search_paths.AppendIfUnique(file_spec);
+  }
+
+  if (ModuleList::GetGlobalModuleListProperties().GetEnableExternalLookup()) {
+
+    // Add current working directory.
     {
-      FileSpec file_spec(file_dir.AsCString("."));
+      FileSpec file_spec(".");
       FileSystem::Instance().Resolve(file_spec);
       debug_file_search_paths.AppendIfUnique(file_spec);
     }
 
-    if (ModuleList::GetGlobalModuleListProperties().GetEnableExternalLookup()) {
-
-      // Add current working directory.
-      {
-        FileSpec file_spec(".");
-        FileSystem::Instance().Resolve(file_spec);
-        debug_file_search_paths.AppendIfUnique(file_spec);
-      }
-
 #ifndef _WIN32
 #if defined(__NetBSD__)
-      // Add /usr/libdata/debug directory.
-      {
-        FileSpec file_spec("/usr/libdata/debug");
-        FileSystem::Instance().Resolve(file_spec);
-        debug_file_search_paths.AppendIfUnique(file_spec);
-      }
+    // Add /usr/libdata/debug directory.
+    {
+      FileSpec file_spec("/usr/libdata/debug");
+      FileSystem::Instance().Resolve(file_spec);
+      debug_file_search_paths.AppendIfUnique(file_spec);
+    }
 #else
-      // Add /usr/lib/debug directory.
-      {
-        FileSpec file_spec("/usr/lib/debug");
-        FileSystem::Instance().Resolve(file_spec);
-        debug_file_search_paths.AppendIfUnique(file_spec);
-      }
+    // Add /usr/lib/debug directory.
+    {
+      FileSpec file_spec("/usr/lib/debug");
+      FileSystem::Instance().Resolve(file_spec);
+      debug_file_search_paths.AppendIfUnique(file_spec);
+    }
 #endif
 #endif // _WIN32
-    }
+  }
 
-    std::string uuid_str;
-    const UUID &module_uuid = module_spec.GetUUID();
-    if (module_uuid.IsValid()) {
-      // Some debug files are stored in the .build-id directory like this:
-      //   /usr/lib/debug/.build-id/ff/e7fe727889ad82bb153de2ad065b2189693315.debug
-      uuid_str = module_uuid.GetAsString("");
-      std::transform(uuid_str.begin(), uuid_str.end(), uuid_str.begin(),
-                     ::tolower);
-      uuid_str.insert(2, 1, '/');
-      uuid_str = uuid_str + ".debug";
-    }
+  std::string uuid_str;
+  const UUID &module_uuid = module_spec.GetUUID();
+  if (module_uuid.IsValid()) {
+    // Some debug files are stored in the .build-id directory like this:
+    //   /usr/lib/debug/.build-id/ff/e7fe727889ad82bb153de2ad065b2189693315.debug
+    uuid_str = module_uuid.GetAsString("");
+    std::transform(uuid_str.begin(), uuid_str.end(), uuid_str.begin(),
+                   ::tolower);
+    uuid_str.insert(2, 1, '/');
+    uuid_str = uuid_str + ".debug";
+  }
 
-    size_t num_directories = debug_file_search_paths.GetSize();
-    for (size_t idx = 0; idx < num_directories; ++idx) {
-      FileSpec dirspec = debug_file_search_paths.GetFileSpecAtIndex(idx);
-      FileSystem::Instance().Resolve(dirspec);
-      if (!FileSystem::Instance().IsDirectory(dirspec))
-        continue;
+  size_t num_directories = debug_file_search_paths.GetSize();
+  for (size_t idx = 0; idx < num_directories; ++idx) {
+    FileSpec dirspec = debug_file_search_paths.GetFileSpecAtIndex(idx);
+    FileSystem::Instance().Resolve(dirspec);
+    if (!FileSystem::Instance().IsDirectory(dirspec))
+      continue;
 
-      std::vector<std::string> files;
-      std::string dirname = dirspec.GetPath();
+    std::vector<std::string> files;
+    std::string dirname = dirspec.GetPath();
 
-      files.push_back(dirname + "/" + symbol_filename);
-      files.push_back(dirname + "/.debug/" + symbol_filename);
+    if (!uuid_str.empty())
       files.push_back(dirname + "/.build-id/" + uuid_str);
+    if (symbol_file_spec.GetFilename()) {
+      files.push_back(dirname + "/" +
+                      symbol_file_spec.GetFilename().GetCString());
+      files.push_back(dirname + "/.debug/" +
+                      symbol_file_spec.GetFilename().GetCString());
 
       // Some debug files may stored in the module directory like this:
       //   /usr/lib/debug/usr/lib/library.so.debug
       if (!file_dir.IsEmpty())
-        files.push_back(dirname + file_dir.AsCString() + "/" + symbol_filename);
+        files.push_back(dirname + file_dir.AsCString() + "/" +
+                        symbol_file_spec.GetFilename().GetCString());
+    }
 
-      const uint32_t num_files = files.size();
-      for (size_t idx_file = 0; idx_file < num_files; ++idx_file) {
-        const std::string &filename = files[idx_file];
-        FileSpec file_spec(filename);
-        FileSystem::Instance().Resolve(file_spec);
+    const uint32_t num_files = files.size();
+    for (size_t idx_file = 0; idx_file < num_files; ++idx_file) {
+      const std::string &filename = files[idx_file];
+      FileSpec file_spec(filename);
+      FileSystem::Instance().Resolve(file_spec);
 
-        if (llvm::sys::fs::equivalent(file_spec.GetPath(),
-                                      module_file_spec.GetPath()))
-          continue;
+      if (llvm::sys::fs::equivalent(file_spec.GetPath(),
+                                    module_file_spec.GetPath()))
+        continue;
 
-        if (FileSystem::Instance().Exists(file_spec)) {
-          lldb_private::ModuleSpecList specs;
-          const size_t num_specs =
-              ObjectFile::GetModuleSpecifications(file_spec, 0, 0, specs);
-          assert(num_specs <= 1 &&
-                 "Symbol Vendor supports only a single architecture");
-          if (num_specs == 1) {
-            ModuleSpec mspec;
-            if (specs.GetModuleSpecAtIndex(0, mspec)) {
-              // Skip the uuids check if module_uuid is invalid. For example,
-              // this happens for *.dwp files since at the moment llvm-dwp
-              // doesn't output build ids, nor does binutils dwp.
-              if (!module_uuid.IsValid() || module_uuid == mspec.GetUUID())
-                return file_spec;
-            }
+      if (FileSystem::Instance().Exists(file_spec)) {
+        lldb_private::ModuleSpecList specs;
+        const size_t num_specs =
+            ObjectFile::GetModuleSpecifications(file_spec, 0, 0, specs);
+        assert(num_specs <= 1 &&
+               "Symbol Vendor supports only a single architecture");
+        if (num_specs == 1) {
+          ModuleSpec mspec;
+          if (specs.GetModuleSpecAtIndex(0, mspec)) {
+            // Skip the uuids check if module_uuid is invalid. For example,
+            // this happens for *.dwp files since at the moment llvm-dwp
+            // doesn't output build ids, nor does binutils dwp.
+            if (!module_uuid.IsValid() || module_uuid == mspec.GetUUID())
+              return file_spec;
           }
         }
       }
diff --git a/src/llvm-project/lldb/source/Symbol/LocateSymbolFileMacOSX.cpp b/src/llvm-project/lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
index 4e16382..5ee632e 100644
--- a/src/llvm-project/lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
+++ b/src/llvm-project/lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
@@ -23,7 +23,6 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/ArchSpec.h"
-#include "lldb/Utility/CleanUp.h"
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Endian.h"
@@ -33,6 +32,7 @@
 #include "lldb/Utility/UUID.h"
 #include "mach/machine.h"
 
+#include "llvm/ADT/ScopeExit.h"
 #include "llvm/Support/FileSystem.h"
 
 using namespace lldb;
@@ -45,8 +45,7 @@
                                        ModuleSpec &return_module_spec) {
   Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
   if (!ModuleList::GetGlobalModuleListProperties().GetEnableExternalLookup()) {
-    if (log)
-      log->Printf("Spotlight lookup for .dSYM bundles is disabled.");
+    LLDB_LOGF(log, "Spotlight lookup for .dSYM bundles is disabled.");
     return 0;
   }
 
@@ -102,9 +101,10 @@
           if (::CFURLGetFileSystemRepresentation(
                   dsym_url.get(), true, (UInt8 *)path, sizeof(path) - 1)) {
             if (log) {
-              log->Printf("DebugSymbols framework returned dSYM path of %s for "
-                          "UUID %s -- looking for the dSYM",
-                          path, uuid->GetAsString().c_str());
+              LLDB_LOGF(log,
+                        "DebugSymbols framework returned dSYM path of %s for "
+                        "UUID %s -- looking for the dSYM",
+                        path, uuid->GetAsString().c_str());
             }
             FileSpec dsym_filespec(path);
             if (path[0] == '~')
@@ -124,9 +124,10 @@
           if (log) {
             if (::CFURLGetFileSystemRepresentation(
                     dsym_url.get(), true, (UInt8 *)path, sizeof(path) - 1)) {
-              log->Printf("DebugSymbols framework returned dSYM path of %s for "
-                          "UUID %s -- looking for an exec file",
-                          path, uuid->GetAsString().c_str());
+              LLDB_LOGF(log,
+                        "DebugSymbols framework returned dSYM path of %s for "
+                        "UUID %s -- looking for an exec file",
+                        path, uuid->GetAsString().c_str());
             }
           }
 
@@ -145,8 +146,8 @@
             if (exec_cf_path && ::CFStringGetFileSystemRepresentation(
                                     exec_cf_path, path, sizeof(path))) {
               if (log) {
-                log->Printf("plist bundle has exec path of %s for UUID %s",
-                            path, uuid->GetAsString().c_str());
+                LLDB_LOGF(log, "plist bundle has exec path of %s for UUID %s",
+                          path, uuid->GetAsString().c_str());
               }
               ++items_found;
               FileSpec exec_filespec(path);
@@ -168,9 +169,10 @@
               if (dsym_extension_pos) {
                 *dsym_extension_pos = '\0';
                 if (log) {
-                  log->Printf("Looking for executable binary next to dSYM "
-                              "bundle with name with name %s",
-                              path);
+                  LLDB_LOGF(log,
+                            "Looking for executable binary next to dSYM "
+                            "bundle with name with name %s",
+                            path);
                 }
                 FileSpec file_spec(path);
                 FileSystem::Instance().Resolve(file_spec);
@@ -199,9 +201,10 @@
                         ++items_found;
                         return_module_spec.GetFileSpec() = bundle_exe_file_spec;
                         if (log) {
-                          log->Printf("Executable binary %s next to dSYM is "
-                                      "compatible; using",
-                                      path);
+                          LLDB_LOGF(log,
+                                    "Executable binary %s next to dSYM is "
+                                    "compatible; using",
+                                    path);
                         }
                       }
                     }
@@ -228,9 +231,10 @@
                     ++items_found;
                     return_module_spec.GetFileSpec() = file_spec;
                     if (log) {
-                      log->Printf("Executable binary %s next to dSYM is "
-                                  "compatible; using",
-                                  path);
+                      LLDB_LOGF(log,
+                                "Executable binary %s next to dSYM is "
+                                "compatible; using",
+                                path);
                     }
                   }
                   break;
@@ -260,7 +264,7 @@
     return {};
 
   // Make sure we close the directory before exiting this scope.
-  CleanUp cleanup_dir(closedir, dirp);
+  auto cleanup_dir = llvm::make_scope_exit([&]() { closedir(dirp); });
 
   FileSpec dsym_fspec;
   dsym_fspec.GetDirectory().SetCString(path);
@@ -315,9 +319,9 @@
         module_spec.GetFileSpec().SetFile(str.c_str(), FileSpec::Style::native);
         FileSystem::Instance().Resolve(module_spec.GetFileSpec());
         if (log) {
-          log->Printf(
-              "From dsymForUUID plist: Symbol rich executable is at '%s'",
-              str.c_str());
+          LLDB_LOGF(log,
+                    "From dsymForUUID plist: Symbol rich executable is at '%s'",
+                    str.c_str());
         }
       }
     }
@@ -331,7 +335,8 @@
         FileSystem::Instance().Resolve(module_spec.GetFileSpec());
         success = true;
         if (log) {
-          log->Printf("From dsymForUUID plist: dSYM is at '%s'", str.c_str());
+          LLDB_LOGF(log, "From dsymForUUID plist: dSYM is at '%s'",
+                    str.c_str());
         }
       }
     }
@@ -582,15 +587,15 @@
         std::string command_output;
         if (log) {
           if (!uuid_str.empty())
-            log->Printf("Calling %s with UUID %s to find dSYM",
-                        g_dsym_for_uuid_exe_path, uuid_str.c_str());
+            LLDB_LOGF(log, "Calling %s with UUID %s to find dSYM",
+                      g_dsym_for_uuid_exe_path, uuid_str.c_str());
           else if (file_path[0] != '\0')
-            log->Printf("Calling %s with file %s to find dSYM",
-                        g_dsym_for_uuid_exe_path, file_path);
+            LLDB_LOGF(log, "Calling %s with file %s to find dSYM",
+                      g_dsym_for_uuid_exe_path, file_path);
         }
         Status error = Host::RunShellCommand(
             command.GetData(),
-            NULL,            // current working directory
+            FileSpec(),      // current working directory
             &exit_status,    // Exit status
             &signo,          // Signal int *
             &command_output, // Command output
@@ -643,11 +648,11 @@
         } else {
           if (log) {
             if (!uuid_str.empty())
-              log->Printf("Called %s on %s, no matches",
-                          g_dsym_for_uuid_exe_path, uuid_str.c_str());
+              LLDB_LOGF(log, "Called %s on %s, no matches",
+                        g_dsym_for_uuid_exe_path, uuid_str.c_str());
             else if (file_path[0] != '\0')
-              log->Printf("Called %s on %s, no matches",
-                          g_dsym_for_uuid_exe_path, file_path);
+              LLDB_LOGF(log, "Called %s on %s, no matches",
+                        g_dsym_for_uuid_exe_path, file_path);
           }
         }
       }
diff --git a/src/llvm-project/lldb/source/Symbol/ObjectFile.cpp b/src/llvm-project/lldb/source/Symbol/ObjectFile.cpp
index 172d2b3..8a72b5f 100644
--- a/src/llvm-project/lldb/source/Symbol/ObjectFile.cpp
+++ b/src/llvm-project/lldb/source/Symbol/ObjectFile.cpp
@@ -11,6 +11,7 @@
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/Section.h"
+#include "lldb/Symbol/CallFrameInfo.h"
 #include "lldb/Symbol/ObjectContainer.h"
 #include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Target/Process.h"
@@ -19,13 +20,14 @@
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Log.h"
-#include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/Timer.h"
 #include "lldb/lldb-private.h"
 
 using namespace lldb;
 using namespace lldb_private;
 
+char ObjectFile::ID;
+
 ObjectFileSP
 ObjectFile::FindPlugin(const lldb::ModuleSP &module_sp, const FileSpec *file,
                        lldb::offset_t file_offset, lldb::offset_t file_size,
@@ -81,9 +83,8 @@
 
       if (!data_sp || data_sp->GetByteSize() == 0) {
         // Check for archive file with format "/path/to/archive.a(object.o)"
-        char path_with_object[PATH_MAX * 2];
-        module_sp->GetFileSpec().GetPath(path_with_object,
-                                         sizeof(path_with_object));
+        llvm::SmallString<256> path_with_object;
+        module_sp->GetFileSpec().GetPath(path_with_object);
 
         ConstString archive_object;
         const bool must_exist = true;
@@ -271,13 +272,13 @@
   if (data_sp)
     m_data.SetData(data_sp, data_offset, length);
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p ObjectFile::ObjectFile() module = %p (%s), file = %s, "
-                "file_offset = 0x%8.8" PRIx64 ", size = %" PRIu64,
-                static_cast<void *>(this), static_cast<void *>(module_sp.get()),
-                module_sp->GetSpecificationDescription().c_str(),
-                m_file ? m_file.GetPath().c_str() : "<NULL>", m_file_offset,
-                m_length);
+  LLDB_LOGF(log,
+            "%p ObjectFile::ObjectFile() module = %p (%s), file = %s, "
+            "file_offset = 0x%8.8" PRIx64 ", size = %" PRIu64,
+            static_cast<void *>(this), static_cast<void *>(module_sp.get()),
+            module_sp->GetSpecificationDescription().c_str(),
+            m_file ? m_file.GetPath().c_str() : "<NULL>", m_file_offset,
+            m_length);
 }
 
 ObjectFile::ObjectFile(const lldb::ModuleSP &module_sp,
@@ -290,18 +291,17 @@
   if (header_data_sp)
     m_data.SetData(header_data_sp, 0, header_data_sp->GetByteSize());
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p ObjectFile::ObjectFile() module = %p (%s), process = %p, "
-                "header_addr = 0x%" PRIx64,
-                static_cast<void *>(this), static_cast<void *>(module_sp.get()),
-                module_sp->GetSpecificationDescription().c_str(),
-                static_cast<void *>(process_sp.get()), m_memory_addr);
+  LLDB_LOGF(log,
+            "%p ObjectFile::ObjectFile() module = %p (%s), process = %p, "
+            "header_addr = 0x%" PRIx64,
+            static_cast<void *>(this), static_cast<void *>(module_sp.get()),
+            module_sp->GetSpecificationDescription().c_str(),
+            static_cast<void *>(process_sp.get()), m_memory_addr);
 }
 
 ObjectFile::~ObjectFile() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p ObjectFile::~ObjectFile ()\n", static_cast<void *>(this));
+  LLDB_LOGF(log, "%p ObjectFile::~ObjectFile ()\n", static_cast<void *>(this));
 }
 
 bool ObjectFile::SetModulesArchitecture(const ArchSpec &new_arch) {
@@ -352,7 +352,9 @@
           case eSectionTypeDWARFDebugLine:
           case eSectionTypeDWARFDebugLineStr:
           case eSectionTypeDWARFDebugLoc:
+          case eSectionTypeDWARFDebugLocDwo:
           case eSectionTypeDWARFDebugLocLists:
+          case eSectionTypeDWARFDebugLocListsDwo:
           case eSectionTypeDWARFDebugMacInfo:
           case eSectionTypeDWARFDebugMacro:
           case eSectionTypeDWARFDebugNames:
@@ -360,6 +362,7 @@
           case eSectionTypeDWARFDebugPubTypes:
           case eSectionTypeDWARFDebugRanges:
           case eSectionTypeDWARFDebugRngLists:
+          case eSectionTypeDWARFDebugRngListsDwo:
           case eSectionTypeDWARFDebugStr:
           case eSectionTypeDWARFDebugStrDwo:
           case eSectionTypeDWARFDebugStrOffsets:
@@ -570,24 +573,22 @@
   }
 }
 
-bool ObjectFile::SplitArchivePathWithObject(const char *path_with_object,
+bool ObjectFile::SplitArchivePathWithObject(llvm::StringRef path_with_object,
                                             FileSpec &archive_file,
                                             ConstString &archive_object,
                                             bool must_exist) {
-  RegularExpression g_object_regex(llvm::StringRef("(.*)\\(([^\\)]+)\\)$"));
-  RegularExpression::Match regex_match(2);
-  if (g_object_regex.Execute(llvm::StringRef::withNullAsEmpty(path_with_object),
-                             &regex_match)) {
-    std::string path;
-    std::string obj;
-    if (regex_match.GetMatchAtIndex(path_with_object, 1, path) &&
-        regex_match.GetMatchAtIndex(path_with_object, 2, obj)) {
-      archive_file.SetFile(path, FileSpec::Style::native);
-      archive_object.SetCString(obj.c_str());
-      return !(must_exist && !FileSystem::Instance().Exists(archive_file));
-    }
-  }
-  return false;
+  size_t len = path_with_object.size();
+  if (len < 2 || path_with_object.back() != ')')
+    return false;
+  llvm::StringRef archive = path_with_object.substr(0, path_with_object.rfind('('));
+  if (archive.empty())
+    return false;
+  llvm::StringRef object = path_with_object.substr(archive.size() + 1).drop_back();
+  archive_file.SetFile(archive, FileSpec::Style::native);
+  if (must_exist && !FileSystem::Instance().Exists(archive_file))
+    return false;
+  archive_object.SetString(object);
+  return true;
 }
 
 void ObjectFile::ClearSymtab() {
@@ -595,10 +596,9 @@
   if (module_sp) {
     std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-    if (log)
-      log->Printf("%p ObjectFile::ClearSymtab () symtab = %p",
-                  static_cast<void *>(this),
-                  static_cast<void *>(m_symtab_up.get()));
+    LLDB_LOGF(log, "%p ObjectFile::ClearSymtab () symtab = %p",
+              static_cast<void *>(this),
+              static_cast<void *>(m_symtab_up.get()));
     m_symtab_up.reset();
   }
 }
@@ -674,6 +674,10 @@
   return loadables;
 }
 
+std::unique_ptr<CallFrameInfo> ObjectFile::CreateCallFrameInfo() {
+  return {};
+}
+
 void ObjectFile::RelocateSection(lldb_private::Section *section)
 {
 }
diff --git a/src/llvm-project/lldb/source/Symbol/PostfixExpression.cpp b/src/llvm-project/lldb/source/Symbol/PostfixExpression.cpp
index 1486535..8ecd571 100644
--- a/src/llvm-project/lldb/source/Symbol/PostfixExpression.cpp
+++ b/src/llvm-project/lldb/source/Symbol/PostfixExpression.cpp
@@ -41,7 +41,8 @@
   return llvm::None;
 }
 
-Node *postfix::Parse(llvm::StringRef expr, llvm::BumpPtrAllocator &alloc) {
+Node *postfix::ParseOneExpression(llvm::StringRef expr,
+                                  llvm::BumpPtrAllocator &alloc) {
   llvm::SmallVector<Node *, 4> stack;
 
   llvm::StringRef token;
@@ -83,6 +84,26 @@
   return stack.back();
 }
 
+std::vector<std::pair<llvm::StringRef, Node *>>
+postfix::ParseFPOProgram(llvm::StringRef prog, llvm::BumpPtrAllocator &alloc) {
+  llvm::SmallVector<llvm::StringRef, 4> exprs;
+  prog.split(exprs, '=');
+  if (exprs.empty() || !exprs.back().trim().empty())
+    return {};
+  exprs.pop_back();
+
+  std::vector<std::pair<llvm::StringRef, Node *>> result;
+  for (llvm::StringRef expr : exprs) {
+    llvm::StringRef lhs;
+    std::tie(lhs, expr) = getToken(expr);
+    Node *rhs = ParseOneExpression(expr, alloc);
+    if (!rhs)
+      return {};
+    result.emplace_back(lhs, rhs);
+  }
+  return result;
+}
+
 namespace {
 class SymbolResolver : public Visitor<bool> {
 public:
diff --git a/src/llvm-project/lldb/source/Symbol/Symbol.cpp b/src/llvm-project/lldb/source/Symbol/Symbol.cpp
index 589f692..3ace153 100644
--- a/src/llvm-project/lldb/source/Symbol/Symbol.cpp
+++ b/src/llvm-project/lldb/source/Symbol/Symbol.cpp
@@ -31,9 +31,8 @@
       m_is_weak(false), m_type(eSymbolTypeInvalid), m_mangled(), m_addr_range(),
       m_flags() {}
 
-Symbol::Symbol(uint32_t symID, const char *name, bool name_is_mangled,
-               SymbolType type, bool external, bool is_debug,
-               bool is_trampoline, bool is_artificial,
+Symbol::Symbol(uint32_t symID, llvm::StringRef name, SymbolType type, bool external,
+               bool is_debug, bool is_trampoline, bool is_artificial,
                const lldb::SectionSP &section_sp, addr_t offset, addr_t size,
                bool size_is_valid, bool contains_linker_annotations,
                uint32_t flags)
@@ -42,9 +41,9 @@
       m_is_debug(is_debug), m_is_external(external), m_size_is_sibling(false),
       m_size_is_synthesized(false), m_size_is_valid(size_is_valid || size > 0),
       m_demangled_is_synthesized(false),
-      m_contains_linker_annotations(contains_linker_annotations), 
+      m_contains_linker_annotations(contains_linker_annotations),
       m_is_weak(false), m_type(type),
-      m_mangled(ConstString(name), name_is_mangled),
+      m_mangled(name),
       m_addr_range(section_sp, offset, size), m_flags(flags) {}
 
 Symbol::Symbol(uint32_t symID, const Mangled &mangled, SymbolType type,
@@ -211,7 +210,8 @@
     s->Printf(", mangled=\"%s\"", m_mangled.GetMangledName().AsCString());
 }
 
-void Symbol::Dump(Stream *s, Target *target, uint32_t index) const {
+void Symbol::Dump(Stream *s, Target *target, uint32_t index,
+                  Mangled::NamePreference name_preference) const {
   s->Printf("[%5u] %6u %c%c%c %-15s ", index, GetID(), m_is_debug ? 'D' : ' ',
             m_is_synthetic ? 'S' : ' ', m_is_external ? 'X' : ' ',
             GetTypeAsString());
@@ -219,7 +219,7 @@
   // Make sure the size of the symbol is up to date before dumping
   GetByteSize();
 
-  ConstString name = m_mangled.GetName(GetLanguage());
+  ConstString name = m_mangled.GetName(GetLanguage(), name_preference);
   if (ValueIsAddress()) {
     if (!m_addr_range.GetBaseAddress().Dump(s, nullptr,
                                             Address::DumpStyleFileAddress))
diff --git a/src/llvm-project/lldb/source/Symbol/SymbolContext.cpp b/src/llvm-project/lldb/source/Symbol/SymbolContext.cpp
index a0b35cf..9eb8059 100644
--- a/src/llvm-project/lldb/source/Symbol/SymbolContext.cpp
+++ b/src/llvm-project/lldb/source/Symbol/SymbolContext.cpp
@@ -13,7 +13,6 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Host/StringConvert.h"
 #include "lldb/Symbol/Block.h"
-#include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/Symbol.h"
@@ -22,6 +21,7 @@
 #include "lldb/Symbol/Variable.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/Log.h"
+#include "lldb/Utility/StreamString.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -55,20 +55,6 @@
 
 SymbolContext::~SymbolContext() {}
 
-const SymbolContext &SymbolContext::operator=(const SymbolContext &rhs) {
-  if (this != &rhs) {
-    target_sp = rhs.target_sp;
-    module_sp = rhs.module_sp;
-    comp_unit = rhs.comp_unit;
-    function = rhs.function;
-    block = rhs.block;
-    line_entry = rhs.line_entry;
-    symbol = rhs.symbol;
-    variable = rhs.variable;
-  }
-  return *this;
-}
-
 void SymbolContext::Clear(bool clear_target) {
   if (clear_target)
     target_sp.reset();
@@ -198,7 +184,7 @@
                                    Target *target) const {
   if (module_sp) {
     s->Indent("     Module: file = \"");
-    module_sp->GetFileSpec().Dump(s);
+    module_sp->GetFileSpec().Dump(s->AsRawOstream());
     *s << '"';
     if (module_sp->GetArchitecture().IsValid())
       s->Printf(", arch = \"%s\"",
@@ -324,19 +310,19 @@
   s->Indent();
   *s << "Module       = " << module_sp.get() << ' ';
   if (module_sp)
-    module_sp->GetFileSpec().Dump(s);
+    module_sp->GetFileSpec().Dump(s->AsRawOstream());
   s->EOL();
   s->Indent();
   *s << "CompileUnit  = " << comp_unit;
   if (comp_unit != nullptr)
-    *s << " {0x" << comp_unit->GetID() << "} "
-       << *(static_cast<FileSpec *>(comp_unit));
+    s->Format(" {{{0:x-16}} {1}", comp_unit->GetID(),
+              comp_unit->GetPrimaryFile());
   s->EOL();
   s->Indent();
   *s << "Function     = " << function;
   if (function != nullptr) {
-    *s << " {0x" << function->GetID() << "} " << function->GetType()->GetName()
-       << ", address-range = ";
+    s->Format(" {{{0:x-16}} {1}, address-range = ", function->GetID(),
+              function->GetType()->GetName());
     function->GetAddressRange().Dump(s, target, Address::DumpStyleLoadAddress,
                                      Address::DumpStyleModuleWithFileAddress);
     s->EOL();
@@ -351,10 +337,7 @@
   s->Indent();
   *s << "Block        = " << block;
   if (block != nullptr)
-    *s << " {0x" << block->GetID() << '}';
-  // Dump the block and pass it a negative depth to we print all the parent
-  // blocks if (block != NULL)
-  //  block->Dump(s, function->GetFileAddress(), INT_MIN);
+    s->Format(" {{{0:x-16}}", block->GetID());
   s->EOL();
   s->Indent();
   *s << "LineEntry    = ";
@@ -368,7 +351,8 @@
   s->EOL();
   *s << "Variable     = " << variable;
   if (variable != nullptr) {
-    *s << " {0x" << variable->GetID() << "} " << variable->GetType()->GetName();
+    s->Format(" {{{0:x-16}} {1}", variable->GetID(),
+              variable->GetType()->GetName());
     s->EOL();
   }
   s->IndentLess();
@@ -494,7 +478,8 @@
         Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS));
 
         if (log) {
-          log->Printf(
+          LLDB_LOGF(
+              log,
               "warning: inlined block 0x%8.8" PRIx64
               " doesn't have a range that contains file address 0x%" PRIx64,
               curr_inlined_block->GetID(), curr_frame_pc.GetFileAddress());
@@ -503,12 +488,8 @@
         else {
           ObjectFile *objfile = nullptr;
           if (module_sp) {
-            SymbolVendor *symbol_vendor = module_sp->GetSymbolVendor();
-            if (symbol_vendor) {
-              SymbolFile *symbol_file = symbol_vendor->GetSymbolFile();
-              if (symbol_file)
-                objfile = symbol_file->GetObjectFile();
-            }
+            if (SymbolFile *symbol_file = module_sp->GetSymbolFile())
+              objfile = symbol_file->GetObjectFile();
           }
           if (objfile) {
             Host::SystemLog(
@@ -762,9 +743,8 @@
   }
 
   Block *func_block = GetFunctionBlock();
-  if (func_block &&
-      func_block->GetRangeIndexContainingAddress(
-          end_entry.range.GetBaseAddress()) == UINT32_MAX) {
+  if (func_block && func_block->GetRangeIndexContainingAddress(
+                        end_entry.range.GetBaseAddress()) == UINT32_MAX) {
     error.SetErrorStringWithFormat(
         "end line number %d is not contained within the current function.",
         end_line);
@@ -777,8 +757,8 @@
   return true;
 }
 
-const Symbol *
-SymbolContext::FindBestGlobalDataSymbol(ConstString name, Status &error) {
+const Symbol *SymbolContext::FindBestGlobalDataSymbol(ConstString name,
+                                                      Status &error) {
   error.Clear();
 
   if (!target_sp) {
@@ -788,8 +768,9 @@
   Target &target = *target_sp;
   Module *module = module_sp.get();
 
-  auto ProcessMatches = [this, &name, &target, module]
-  (SymbolContextList &sc_list, Status &error) -> const Symbol* {
+  auto ProcessMatches = [this, &name, &target,
+                         module](SymbolContextList &sc_list,
+                                 Status &error) -> const Symbol * {
     llvm::SmallVector<const Symbol *, 1> external_symbols;
     llvm::SmallVector<const Symbol *, 1> internal_symbols;
     const uint32_t matches = sc_list.GetSize();
@@ -802,77 +783,77 @@
 
         if (sym_address.IsValid()) {
           switch (symbol->GetType()) {
-            case eSymbolTypeData:
-            case eSymbolTypeRuntime:
-            case eSymbolTypeAbsolute:
-            case eSymbolTypeObjCClass:
-            case eSymbolTypeObjCMetaClass:
-            case eSymbolTypeObjCIVar:
-              if (symbol->GetDemangledNameIsSynthesized()) {
-                // If the demangled name was synthesized, then don't use it for
-                // expressions. Only let the symbol match if the mangled named
-                // matches for these symbols.
-                if (symbol->GetMangled().GetMangledName() != name)
-                  break;
-              }
-              if (symbol->IsExternal()) {
-                external_symbols.push_back(symbol);
-              } else {
-                internal_symbols.push_back(symbol);
-              }
-              break;
-            case eSymbolTypeReExported: {
-              ConstString reexport_name = symbol->GetReExportedSymbolName();
-              if (reexport_name) {
-                ModuleSP reexport_module_sp;
-                ModuleSpec reexport_module_spec;
-                reexport_module_spec.GetPlatformFileSpec() =
-                symbol->GetReExportedSymbolSharedLibrary();
-                if (reexport_module_spec.GetPlatformFileSpec()) {
-                  reexport_module_sp =
-                  target.GetImages().FindFirstModule(reexport_module_spec);
-                  if (!reexport_module_sp) {
-                    reexport_module_spec.GetPlatformFileSpec()
-                    .GetDirectory()
-                    .Clear();
-                    reexport_module_sp =
+          case eSymbolTypeData:
+          case eSymbolTypeRuntime:
+          case eSymbolTypeAbsolute:
+          case eSymbolTypeObjCClass:
+          case eSymbolTypeObjCMetaClass:
+          case eSymbolTypeObjCIVar:
+            if (symbol->GetDemangledNameIsSynthesized()) {
+              // If the demangled name was synthesized, then don't use it for
+              // expressions. Only let the symbol match if the mangled named
+              // matches for these symbols.
+              if (symbol->GetMangled().GetMangledName() != name)
+                break;
+            }
+            if (symbol->IsExternal()) {
+              external_symbols.push_back(symbol);
+            } else {
+              internal_symbols.push_back(symbol);
+            }
+            break;
+          case eSymbolTypeReExported: {
+            ConstString reexport_name = symbol->GetReExportedSymbolName();
+            if (reexport_name) {
+              ModuleSP reexport_module_sp;
+              ModuleSpec reexport_module_spec;
+              reexport_module_spec.GetPlatformFileSpec() =
+                  symbol->GetReExportedSymbolSharedLibrary();
+              if (reexport_module_spec.GetPlatformFileSpec()) {
+                reexport_module_sp =
                     target.GetImages().FindFirstModule(reexport_module_spec);
-                  }
+                if (!reexport_module_sp) {
+                  reexport_module_spec.GetPlatformFileSpec()
+                      .GetDirectory()
+                      .Clear();
+                  reexport_module_sp =
+                      target.GetImages().FindFirstModule(reexport_module_spec);
                 }
-                // Don't allow us to try and resolve a re-exported symbol if it
-                // is the same as the current symbol
-                if (name == symbol->GetReExportedSymbolName() &&
-                    module == reexport_module_sp.get())
-                  return nullptr;
-
-                return FindBestGlobalDataSymbol(
-                    symbol->GetReExportedSymbolName(), error);
               }
-            } break;
+              // Don't allow us to try and resolve a re-exported symbol if it
+              // is the same as the current symbol
+              if (name == symbol->GetReExportedSymbolName() &&
+                  module == reexport_module_sp.get())
+                return nullptr;
 
-            case eSymbolTypeCode: // We already lookup functions elsewhere
-            case eSymbolTypeVariable:
-            case eSymbolTypeLocal:
-            case eSymbolTypeParam:
-            case eSymbolTypeTrampoline:
-            case eSymbolTypeInvalid:
-            case eSymbolTypeException:
-            case eSymbolTypeSourceFile:
-            case eSymbolTypeHeaderFile:
-            case eSymbolTypeObjectFile:
-            case eSymbolTypeCommonBlock:
-            case eSymbolTypeBlock:
-            case eSymbolTypeVariableType:
-            case eSymbolTypeLineEntry:
-            case eSymbolTypeLineHeader:
-            case eSymbolTypeScopeBegin:
-            case eSymbolTypeScopeEnd:
-            case eSymbolTypeAdditional:
-            case eSymbolTypeCompiler:
-            case eSymbolTypeInstrumentation:
-            case eSymbolTypeUndefined:
-            case eSymbolTypeResolver:
-              break;
+              return FindBestGlobalDataSymbol(symbol->GetReExportedSymbolName(),
+                                              error);
+            }
+          } break;
+
+          case eSymbolTypeCode: // We already lookup functions elsewhere
+          case eSymbolTypeVariable:
+          case eSymbolTypeLocal:
+          case eSymbolTypeParam:
+          case eSymbolTypeTrampoline:
+          case eSymbolTypeInvalid:
+          case eSymbolTypeException:
+          case eSymbolTypeSourceFile:
+          case eSymbolTypeHeaderFile:
+          case eSymbolTypeObjectFile:
+          case eSymbolTypeCommonBlock:
+          case eSymbolTypeBlock:
+          case eSymbolTypeVariableType:
+          case eSymbolTypeLineEntry:
+          case eSymbolTypeLineHeader:
+          case eSymbolTypeScopeBegin:
+          case eSymbolTypeScopeEnd:
+          case eSymbolTypeAdditional:
+          case eSymbolTypeCompiler:
+          case eSymbolTypeInstrumentation:
+          case eSymbolTypeUndefined:
+          case eSymbolTypeResolver:
+            break;
           }
         }
       }
@@ -933,7 +914,6 @@
   return nullptr; // no error; we just didn't find anything
 }
 
-
 //
 //  SymbolContextSpecifier
 //
@@ -1046,8 +1026,7 @@
           return false;
       } else {
         FileSpec module_file_spec(m_module_spec);
-        if (!FileSpec::Equal(module_file_spec, sc.module_sp->GetFileSpec(),
-                             false))
+        if (!FileSpec::Match(module_file_spec, sc.module_sp->GetFileSpec()))
           return false;
       }
     }
@@ -1066,8 +1045,8 @@
             sc.block->GetInlinedFunctionInfo();
         if (inline_info != nullptr) {
           was_inlined = true;
-          if (!FileSpec::Equal(inline_info->GetDeclaration().GetFile(),
-                               *(m_file_spec_up.get()), false))
+          if (!FileSpec::Match(*m_file_spec_up,
+                               inline_info->GetDeclaration().GetFile()))
             return false;
         }
       }
@@ -1075,7 +1054,7 @@
       // Next check the comp unit, but only if the SymbolContext was not
       // inlined.
       if (!was_inlined && sc.comp_unit != nullptr) {
-        if (!FileSpec::Equal(*(sc.comp_unit), *(m_file_spec_up.get()), false))
+        if (!FileSpec::Match(*m_file_spec_up, sc.comp_unit->GetPrimaryFile()))
           return false;
       }
     }
@@ -1296,6 +1275,8 @@
 
 uint32_t SymbolContextList::GetSize() const { return m_symbol_contexts.size(); }
 
+bool SymbolContextList::IsEmpty() const { return m_symbol_contexts.empty(); }
+
 uint32_t SymbolContextList::NumLineEntriesWithLine(uint32_t line) const {
   uint32_t match_count = 0;
   const size_t size = m_symbol_contexts.size();
diff --git a/src/llvm-project/lldb/source/Symbol/SymbolFile.cpp b/src/llvm-project/lldb/source/Symbol/SymbolFile.cpp
index 77ab222..90f7d10 100644
--- a/src/llvm-project/lldb/source/Symbol/SymbolFile.cpp
+++ b/src/llvm-project/lldb/source/Symbol/SymbolFile.cpp
@@ -10,6 +10,7 @@
 
 #include "lldb/Core/Module.h"
 #include "lldb/Core/PluginManager.h"
+#include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/TypeMap.h"
 #include "lldb/Symbol/TypeSystem.h"
@@ -21,6 +22,9 @@
 #include <future>
 
 using namespace lldb_private;
+using namespace lldb;
+
+char SymbolFile::ID;
 
 void SymbolFile::PreloadSymbols() {
   // No-op for most implementations.
@@ -29,21 +33,24 @@
 std::recursive_mutex &SymbolFile::GetModuleMutex() const {
   return GetObjectFile()->GetModule()->GetMutex();
 }
+ObjectFile *SymbolFile::GetMainObjectFile() {
+  return m_objfile_sp->GetModule()->GetObjectFile();
+}
 
-SymbolFile *SymbolFile::FindPlugin(ObjectFile *obj_file) {
+SymbolFile *SymbolFile::FindPlugin(ObjectFileSP objfile_sp) {
   std::unique_ptr<SymbolFile> best_symfile_up;
-  if (obj_file != nullptr) {
+  if (objfile_sp != nullptr) {
 
     // We need to test the abilities of this section list. So create what it
-    // would be with this new obj_file.
-    lldb::ModuleSP module_sp(obj_file->GetModule());
+    // would be with this new objfile_sp.
+    lldb::ModuleSP module_sp(objfile_sp->GetModule());
     if (module_sp) {
       // Default to the main module section list.
       ObjectFile *module_obj_file = module_sp->GetObjectFile();
-      if (module_obj_file != obj_file) {
+      if (module_obj_file != objfile_sp.get()) {
         // Make sure the main object file's sections are created
         module_obj_file->GetSectionList();
-        obj_file->CreateSections(*module_sp->GetUnifiedSectionList());
+        objfile_sp->CreateSections(*module_sp->GetUnifiedSectionList());
       }
     }
 
@@ -57,7 +64,7 @@
          (create_callback = PluginManager::GetSymbolFileCreateCallbackAtIndex(
               idx)) != nullptr;
          ++idx) {
-      std::unique_ptr<SymbolFile> curr_symfile_up(create_callback(obj_file));
+      std::unique_ptr<SymbolFile> curr_symfile_up(create_callback(objfile_sp));
 
       if (curr_symfile_up) {
         const uint32_t sym_file_abilities = curr_symfile_up->GetAbilities();
@@ -80,18 +87,14 @@
   return best_symfile_up.release();
 }
 
-TypeList *SymbolFile::GetTypeList() {
-  if (m_obj_file)
-    return m_obj_file->GetModule()->GetTypeList();
-  return nullptr;
-}
-
-TypeSystem *SymbolFile::GetTypeSystemForLanguage(lldb::LanguageType language) {
-  TypeSystem *type_system =
-      m_obj_file->GetModule()->GetTypeSystemForLanguage(language);
-  if (type_system)
-    type_system->SetSymbolFile(this);
-  return type_system;
+llvm::Expected<TypeSystem &>
+SymbolFile::GetTypeSystemForLanguage(lldb::LanguageType language) {
+  auto type_system_or_err =
+      m_objfile_sp->GetModule()->GetTypeSystemForLanguage(language);
+  if (type_system_or_err) {
+    type_system_or_err->SetSymbolFile(this);
+  }
+  return type_system_or_err;
 }
 
 uint32_t SymbolFile::ResolveSymbolContext(const FileSpec &file_spec,
@@ -101,36 +104,24 @@
   return 0;
 }
 
-uint32_t
-SymbolFile::FindGlobalVariables(ConstString name,
-                                const CompilerDeclContext *parent_decl_ctx,
-                                uint32_t max_matches, VariableList &variables) {
-  return 0;
-}
+void SymbolFile::FindGlobalVariables(ConstString name,
+                                     const CompilerDeclContext *parent_decl_ctx,
+                                     uint32_t max_matches,
+                                     VariableList &variables) {}
 
-uint32_t SymbolFile::FindGlobalVariables(const RegularExpression &regex,
-                                         uint32_t max_matches,
-                                         VariableList &variables) {
-  return 0;
-}
+void SymbolFile::FindGlobalVariables(const RegularExpression &regex,
+                                     uint32_t max_matches,
+                                     VariableList &variables) {}
 
-uint32_t SymbolFile::FindFunctions(ConstString name,
-                                   const CompilerDeclContext *parent_decl_ctx,
-                                   lldb::FunctionNameType name_type_mask,
-                                   bool include_inlines, bool append,
-                                   SymbolContextList &sc_list) {
-  if (!append)
-    sc_list.Clear();
-  return 0;
-}
+void SymbolFile::FindFunctions(ConstString name,
+                               const CompilerDeclContext *parent_decl_ctx,
+                               lldb::FunctionNameType name_type_mask,
+                               bool include_inlines,
+                               SymbolContextList &sc_list) {}
 
-uint32_t SymbolFile::FindFunctions(const RegularExpression &regex,
-                                   bool include_inlines, bool append,
-                                   SymbolContextList &sc_list) {
-  if (!append)
-    sc_list.Clear();
-  return 0;
-}
+void SymbolFile::FindFunctions(const RegularExpression &regex,
+                               bool include_inlines,
+                               SymbolContextList &sc_list) {}
 
 void SymbolFile::GetMangledNamesForFunction(
     const std::string &scope_qualified_name,
@@ -138,22 +129,16 @@
   return;
 }
 
-uint32_t SymbolFile::FindTypes(
+void SymbolFile::FindTypes(
     ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    bool append, uint32_t max_matches,
+    uint32_t max_matches,
     llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
-    TypeMap &types) {
-  if (!append)
-    types.Clear();
-  return 0;
-}
+    TypeMap &types) {}
 
-size_t SymbolFile::FindTypes(const std::vector<CompilerContext> &context,
-                             bool append, TypeMap &types) {
-  if (!append)
-    types.Clear();
-  return 0;
-}
+void SymbolFile::FindTypes(llvm::ArrayRef<CompilerContext> pattern,
+                           LanguageSet languages,
+                           llvm::DenseSet<SymbolFile *> &searched_symbol_files,
+                           TypeMap &types) {}
 
 void SymbolFile::AssertModuleLock() {
   // The code below is too expensive to leave enabled in release builds. It's
@@ -169,4 +154,85 @@
 #endif
 }
 
+uint32_t SymbolFile::GetNumCompileUnits() {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+  if (!m_compile_units) {
+    // Create an array of compile unit shared pointers -- which will each
+    // remain NULL until someone asks for the actual compile unit information.
+    m_compile_units.emplace(CalculateNumCompileUnits());
+  }
+  return m_compile_units->size();
+}
+
+CompUnitSP SymbolFile::GetCompileUnitAtIndex(uint32_t idx) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+  uint32_t num = GetNumCompileUnits();
+  if (idx >= num)
+    return nullptr;
+  lldb::CompUnitSP &cu_sp = (*m_compile_units)[idx];
+  if (!cu_sp)
+    cu_sp = ParseCompileUnitAtIndex(idx);
+  return cu_sp;
+}
+
+void SymbolFile::SetCompileUnitAtIndex(uint32_t idx, const CompUnitSP &cu_sp) {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+  const size_t num_compile_units = GetNumCompileUnits();
+  assert(idx < num_compile_units);
+  (void)num_compile_units;
+
+  // Fire off an assertion if this compile unit already exists for now. The
+  // partial parsing should take care of only setting the compile unit
+  // once, so if this assertion fails, we need to make sure that we don't
+  // have a race condition, or have a second parse of the same compile
+  // unit.
+  assert((*m_compile_units)[idx] == nullptr);
+  (*m_compile_units)[idx] = cu_sp;
+}
+
+Symtab *SymbolFile::GetSymtab() {
+  std::lock_guard<std::recursive_mutex> guard(GetModuleMutex());
+  if (m_symtab)
+    return m_symtab;
+
+  // Fetch the symtab from the main object file.
+  m_symtab = GetMainObjectFile()->GetSymtab();
+
+  // Then add our symbols to it.
+  if (m_symtab)
+    AddSymbols(*m_symtab);
+
+  return m_symtab;
+}
+
+void SymbolFile::SectionFileAddressesChanged() {
+  ObjectFile *module_objfile = GetMainObjectFile();
+  ObjectFile *symfile_objfile = GetObjectFile();
+  if (symfile_objfile != module_objfile)
+    symfile_objfile->SectionFileAddressesChanged();
+  if (m_symtab)
+    m_symtab->SectionFileAddressesChanged();
+}
+
+void SymbolFile::Dump(Stream &s) {
+  s.Format("SymbolFile {0} ({1})\n", GetPluginName(),
+           GetMainObjectFile()->GetFileSpec());
+  s.PutCString("Types:\n");
+  m_type_list.Dump(&s, /*show_context*/ false);
+  s.PutChar('\n');
+
+  s.PutCString("Compile units:\n");
+  if (m_compile_units) {
+    for (const CompUnitSP &cu_sp : *m_compile_units) {
+      // We currently only dump the compile units that have been parsed
+      if (cu_sp)
+        cu_sp->Dump(&s, /*show_context*/ false);
+    }
+  }
+  s.PutChar('\n');
+
+  if (Symtab *symtab = GetSymtab())
+    symtab->Dump(&s, nullptr, eSortOrderNone);
+}
+
 SymbolFile::RegisterInfoResolver::~RegisterInfoResolver() = default;
diff --git a/src/llvm-project/lldb/source/Symbol/SymbolVendor.cpp b/src/llvm-project/lldb/source/Symbol/SymbolVendor.cpp
index b9f3a5f..1e1dea7 100644
--- a/src/llvm-project/lldb/source/Symbol/SymbolVendor.cpp
+++ b/src/llvm-project/lldb/source/Symbol/SymbolVendor.cpp
@@ -58,8 +58,7 @@
 
 // SymbolVendor constructor
 SymbolVendor::SymbolVendor(const lldb::ModuleSP &module_sp)
-    : ModuleChild(module_sp), m_type_list(), m_compile_units(), m_sym_file_up(),
-      m_symtab() {}
+    : ModuleChild(module_sp), m_sym_file_up() {}
 
 // Destructor
 SymbolVendor::~SymbolVendor() {}
@@ -69,414 +68,8 @@
   ModuleSP module_sp(GetModule());
   if (module_sp) {
     std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (objfile_sp) {
-      m_objfile_sp = objfile_sp;
-      m_sym_file_up.reset(SymbolFile::FindPlugin(objfile_sp.get()));
-    }
-  }
-}
-
-bool SymbolVendor::SetCompileUnitAtIndex(size_t idx, const CompUnitSP &cu_sp) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    const size_t num_compile_units = GetNumCompileUnits();
-    if (idx < num_compile_units) {
-      // Fire off an assertion if this compile unit already exists for now. The
-      // partial parsing should take care of only setting the compile unit
-      // once, so if this assertion fails, we need to make sure that we don't
-      // have a race condition, or have a second parse of the same compile
-      // unit.
-      assert(m_compile_units[idx].get() == nullptr);
-      m_compile_units[idx] = cu_sp;
-      return true;
-    } else {
-      // This should NOT happen, and if it does, we want to crash and know
-      // about it
-      assert(idx < num_compile_units);
-    }
-  }
-  return false;
-}
-
-size_t SymbolVendor::GetNumCompileUnits() {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_compile_units.empty()) {
-      if (m_sym_file_up) {
-        // Resize our array of compile unit shared pointers -- which will each
-        // remain NULL until someone asks for the actual compile unit
-        // information. When this happens, the symbol file will be asked to
-        // parse this compile unit information.
-        m_compile_units.resize(m_sym_file_up->GetNumCompileUnits());
-      }
-    }
-  }
-  return m_compile_units.size();
-}
-
-lldb::LanguageType SymbolVendor::ParseLanguage(CompileUnit &comp_unit) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseLanguage(comp_unit);
-  }
-  return eLanguageTypeUnknown;
-}
-
-size_t SymbolVendor::ParseFunctions(CompileUnit &comp_unit) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseFunctions(comp_unit);
-  }
-  return 0;
-}
-
-bool SymbolVendor::ParseLineTable(CompileUnit &comp_unit) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseLineTable(comp_unit);
-  }
-  return false;
-}
-
-bool SymbolVendor::ParseDebugMacros(CompileUnit &comp_unit) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseDebugMacros(comp_unit);
-  }
-  return false;
-}
-bool SymbolVendor::ParseSupportFiles(CompileUnit &comp_unit,
-                                     FileSpecList &support_files) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseSupportFiles(comp_unit, support_files);
-  }
-  return false;
-}
-
-bool SymbolVendor::ParseIsOptimized(CompileUnit &comp_unit) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseIsOptimized(comp_unit);
-  }
-  return false;
-}
-
-bool SymbolVendor::ParseImportedModules(
-    const SymbolContext &sc, std::vector<SourceModule> &imported_modules) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseImportedModules(sc, imported_modules);
-  }
-  return false;
-}
-
-size_t SymbolVendor::ParseBlocksRecursive(Function &func) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseBlocksRecursive(func);
-  }
-  return 0;
-}
-
-size_t SymbolVendor::ParseTypes(CompileUnit &comp_unit) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseTypes(comp_unit);
-  }
-  return 0;
-}
-
-size_t SymbolVendor::ParseVariablesForContext(const SymbolContext &sc) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ParseVariablesForContext(sc);
-  }
-  return 0;
-}
-
-Type *SymbolVendor::ResolveTypeUID(lldb::user_id_t type_uid) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ResolveTypeUID(type_uid);
-  }
-  return nullptr;
-}
-
-uint32_t SymbolVendor::ResolveSymbolContext(const Address &so_addr,
-                                            SymbolContextItem resolve_scope,
-                                            SymbolContext &sc) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ResolveSymbolContext(so_addr, resolve_scope, sc);
-  }
-  return 0;
-}
-
-uint32_t SymbolVendor::ResolveSymbolContext(const FileSpec &file_spec,
-                                            uint32_t line, bool check_inlines,
-                                            SymbolContextItem resolve_scope,
-                                            SymbolContextList &sc_list) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->ResolveSymbolContext(file_spec, line, check_inlines,
-                                                 resolve_scope, sc_list);
-  }
-  return 0;
-}
-
-size_t
-SymbolVendor::FindGlobalVariables(ConstString name,
-                                  const CompilerDeclContext *parent_decl_ctx,
-                                  size_t max_matches, VariableList &variables) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->FindGlobalVariables(name, parent_decl_ctx,
-                                                max_matches, variables);
-  }
-  return 0;
-}
-
-size_t SymbolVendor::FindGlobalVariables(const RegularExpression &regex,
-                                         size_t max_matches,
-                                         VariableList &variables) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->FindGlobalVariables(regex, max_matches, variables);
-  }
-  return 0;
-}
-
-size_t SymbolVendor::FindFunctions(ConstString name,
-                                   const CompilerDeclContext *parent_decl_ctx,
-                                   FunctionNameType name_type_mask,
-                                   bool include_inlines, bool append,
-                                   SymbolContextList &sc_list) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->FindFunctions(name, parent_decl_ctx, name_type_mask,
-                                          include_inlines, append, sc_list);
-  }
-  return 0;
-}
-
-size_t SymbolVendor::FindFunctions(const RegularExpression &regex,
-                                   bool include_inlines, bool append,
-                                   SymbolContextList &sc_list) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->FindFunctions(regex, include_inlines, append,
-                                          sc_list);
-  }
-  return 0;
-}
-
-size_t SymbolVendor::FindTypes(
-    ConstString name, const CompilerDeclContext *parent_decl_ctx,
-    bool append, size_t max_matches,
-    llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
-    TypeMap &types) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->FindTypes(name, parent_decl_ctx, append,
-                                      max_matches, searched_symbol_files,
-                                      types);
-  }
-  if (!append)
-    types.Clear();
-  return 0;
-}
-
-size_t SymbolVendor::FindTypes(const std::vector<CompilerContext> &context,
-                               bool append, TypeMap &types) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->FindTypes(context, append, types);
-  }
-  if (!append)
-    types.Clear();
-  return 0;
-}
-
-size_t SymbolVendor::GetTypes(SymbolContextScope *sc_scope, TypeClass type_mask,
-                              lldb_private::TypeList &type_list) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      return m_sym_file_up->GetTypes(sc_scope, type_mask, type_list);
-  }
-  return 0;
-}
-
-CompilerDeclContext
-SymbolVendor::FindNamespace(ConstString name,
-                            const CompilerDeclContext *parent_decl_ctx) {
-  CompilerDeclContext namespace_decl_ctx;
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    if (m_sym_file_up)
-      namespace_decl_ctx = m_sym_file_up->FindNamespace(name, parent_decl_ctx);
-  }
-  return namespace_decl_ctx;
-}
-
-void SymbolVendor::Dump(Stream *s) {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-
-    bool show_context = false;
-
-    s->Printf("%p: ", static_cast<void *>(this));
-    s->Indent();
-    s->PutCString("SymbolVendor");
-    if (m_sym_file_up) {
-      *s << " " << m_sym_file_up->GetPluginName();
-      ObjectFile *objfile = m_sym_file_up->GetObjectFile();
-      if (objfile) {
-        const FileSpec &objfile_file_spec = objfile->GetFileSpec();
-        if (objfile_file_spec) {
-          s->PutCString(" (");
-          objfile_file_spec.Dump(s);
-          s->PutChar(')');
-        }
-      }
-    }
-    s->EOL();
-    if (m_sym_file_up)
-      m_sym_file_up->Dump(*s);
-    s->IndentMore();
-    m_type_list.Dump(s, show_context);
-
-    CompileUnitConstIter cu_pos, cu_end;
-    cu_end = m_compile_units.end();
-    for (cu_pos = m_compile_units.begin(); cu_pos != cu_end; ++cu_pos) {
-      // We currently only dump the compile units that have been parsed
-      if (*cu_pos)
-        (*cu_pos)->Dump(s, show_context);
-    }
-
-    if (Symtab *symtab = GetSymtab())
-      symtab->Dump(s, nullptr, eSortOrderNone);
-
-    s->IndentLess();
-  }
-}
-
-CompUnitSP SymbolVendor::GetCompileUnitAtIndex(size_t idx) {
-  CompUnitSP cu_sp;
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-    const size_t num_compile_units = GetNumCompileUnits();
-    if (idx < num_compile_units) {
-      cu_sp = m_compile_units[idx];
-      if (cu_sp.get() == nullptr) {
-        m_compile_units[idx] = m_sym_file_up->ParseCompileUnitAtIndex(idx);
-        cu_sp = m_compile_units[idx];
-      }
-    }
-  }
-  return cu_sp;
-}
-
-FileSpec SymbolVendor::GetMainFileSpec() const {
-  if (m_sym_file_up) {
-    const ObjectFile *symfile_objfile = m_sym_file_up->GetObjectFile();
-    if (symfile_objfile)
-      return symfile_objfile->GetFileSpec();
-  }
-
-  return FileSpec();
-}
-
-Symtab *SymbolVendor::GetSymtab() {
-  ModuleSP module_sp(GetModule());
-  if (!module_sp)
-    return nullptr;
-
-  std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-
-  if (m_symtab)
-    return m_symtab;
-
-  ObjectFile *objfile = module_sp->GetObjectFile();
-  if (!objfile)
-    return nullptr;
-
-  m_symtab = objfile->GetSymtab();
-  if (m_symtab && m_sym_file_up)
-    m_sym_file_up->AddSymbols(*m_symtab);
-
-  return m_symtab;
-}
-
-void SymbolVendor::ClearSymtab() {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    ObjectFile *objfile = module_sp->GetObjectFile();
-    if (objfile) {
-      // Clear symbol table from unified section list.
-      objfile->ClearSymtab();
-    }
-  }
-}
-
-void SymbolVendor::SectionFileAddressesChanged() {
-  ModuleSP module_sp(GetModule());
-  if (module_sp) {
-    ObjectFile *module_objfile = module_sp->GetObjectFile();
-    if (m_sym_file_up) {
-      ObjectFile *symfile_objfile = m_sym_file_up->GetObjectFile();
-      if (symfile_objfile != module_objfile)
-        symfile_objfile->SectionFileAddressesChanged();
-    }
-    Symtab *symtab = GetSymtab();
-    if (symtab) {
-      symtab->SectionFileAddressesChanged();
-    }
+    if (objfile_sp)
+      m_sym_file_up.reset(SymbolFile::FindPlugin(objfile_sp));
   }
 }
 
diff --git a/src/llvm-project/lldb/source/Symbol/Symtab.cpp b/src/llvm-project/lldb/source/Symbol/Symtab.cpp
index 5203eba..f5bd22e 100644
--- a/src/llvm-project/lldb/source/Symbol/Symtab.cpp
+++ b/src/llvm-project/lldb/source/Symbol/Symtab.cpp
@@ -13,7 +13,6 @@
 
 #include "lldb/Core/Module.h"
 #include "lldb/Core/RichManglingContext.h"
-#include "lldb/Core/STLUtils.h"
 #include "lldb/Core/Section.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/Symbol.h"
@@ -29,7 +28,7 @@
 using namespace lldb_private;
 
 Symtab::Symtab(ObjectFile *objfile)
-    : m_objfile(objfile), m_symbols(), m_file_addr_to_index(),
+    : m_objfile(objfile), m_symbols(), m_file_addr_to_index(*this),
       m_name_to_index(), m_mutex(), m_file_addr_to_index_computed(false),
       m_name_indexes_computed(false) {}
 
@@ -70,7 +69,8 @@
   m_file_addr_to_index_computed = false;
 }
 
-void Symtab::Dump(Stream *s, Target *target, SortOrder sort_order) {
+void Symtab::Dump(Stream *s, Target *target, SortOrder sort_order,
+                  Mangled::NamePreference name_preference) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
 
   //    s->Printf("%.*p: ", (int)sizeof(void*) * 2, this);
@@ -97,7 +97,7 @@
       const_iterator end = m_symbols.end();
       for (const_iterator pos = m_symbols.begin(); pos != end; ++pos) {
         s->Indent();
-        pos->Dump(s, target, std::distance(begin, pos));
+        pos->Dump(s, target, std::distance(begin, pos), name_preference);
       }
     } break;
 
@@ -106,10 +106,8 @@
       // sorted by name. So we must make the ordered symbol list up ourselves.
       s->PutCString(" (sorted by name):\n");
       DumpSymbolHeader(s);
-      typedef std::multimap<const char *, const Symbol *,
-                            CStringCompareFunctionObject>
-          CStringToSymbol;
-      CStringToSymbol name_map;
+
+      std::multimap<llvm::StringRef, const Symbol *> name_map;
       for (const_iterator pos = m_symbols.begin(), end = m_symbols.end();
            pos != end; ++pos) {
         const char *name = pos->GetName().AsCString();
@@ -117,11 +115,10 @@
           name_map.insert(std::make_pair(name, &(*pos)));
       }
 
-      for (CStringToSymbol::const_iterator pos = name_map.begin(),
-                                           end = name_map.end();
-           pos != end; ++pos) {
+      for (const auto &name_to_symbol : name_map) {
+        const Symbol *symbol = name_to_symbol.second;
         s->Indent();
-        pos->second->Dump(s, target, pos->second - &m_symbols[0]);
+        symbol->Dump(s, target, symbol - &m_symbols[0], name_preference);
       }
     } break;
 
@@ -134,7 +131,7 @@
       for (size_t i = 0; i < num_entries; ++i) {
         s->Indent();
         const uint32_t symbol_idx = m_file_addr_to_index.GetEntryRef(i).data;
-        m_symbols[symbol_idx].Dump(s, target, symbol_idx);
+        m_symbols[symbol_idx].Dump(s, target, symbol_idx, name_preference);
       }
       break;
     }
@@ -143,8 +140,8 @@
   }
 }
 
-void Symtab::Dump(Stream *s, Target *target,
-                  std::vector<uint32_t> &indexes) const {
+void Symtab::Dump(Stream *s, Target *target, std::vector<uint32_t> &indexes,
+                  Mangled::NamePreference name_preference) const {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
 
   const size_t num_symbols = GetNumSymbols();
@@ -162,7 +159,7 @@
       size_t idx = *pos;
       if (idx < num_symbols) {
         s->Indent();
-        m_symbols[idx].Dump(s, target, idx);
+        m_symbols[idx].Dump(s, target, idx, name_preference);
       }
     }
   }
@@ -738,7 +735,7 @@
   return nullptr;
 }
 
-size_t
+void
 Symtab::FindAllSymbolsWithNameAndType(ConstString name,
                                       SymbolType symbol_type,
                                       std::vector<uint32_t> &symbol_indexes) {
@@ -756,10 +753,9 @@
     // the symbols and match the symbol_type if any was given.
     AppendSymbolIndexesWithNameAndType(name, symbol_type, symbol_indexes);
   }
-  return symbol_indexes.size();
 }
 
-size_t Symtab::FindAllSymbolsWithNameAndType(
+void Symtab::FindAllSymbolsWithNameAndType(
     ConstString name, SymbolType symbol_type, Debug symbol_debug_type,
     Visibility symbol_visibility, std::vector<uint32_t> &symbol_indexes) {
   std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -777,10 +773,9 @@
     AppendSymbolIndexesWithNameAndType(name, symbol_type, symbol_debug_type,
                                        symbol_visibility, symbol_indexes);
   }
-  return symbol_indexes.size();
 }
 
-size_t Symtab::FindAllSymbolsMatchingRexExAndType(
+void Symtab::FindAllSymbolsMatchingRexExAndType(
     const RegularExpression &regex, SymbolType symbol_type,
     Debug symbol_debug_type, Visibility symbol_visibility,
     std::vector<uint32_t> &symbol_indexes) {
@@ -788,7 +783,6 @@
 
   AppendSymbolIndexesMatchingRegExAndType(regex, symbol_type, symbol_debug_type,
                                           symbol_visibility, symbol_indexes);
-  return symbol_indexes.size();
 }
 
 Symbol *Symtab::FindFirstSymbolWithNameAndType(ConstString name,
@@ -1018,10 +1012,8 @@
   }
 }
 
-size_t Symtab::FindFunctionSymbols(ConstString name,
-                                   uint32_t name_type_mask,
-                                   SymbolContextList &sc_list) {
-  size_t count = 0;
+void Symtab::FindFunctionSymbols(ConstString name, uint32_t name_type_mask,
+                                 SymbolContextList &sc_list) {
   std::vector<uint32_t> symbol_indexes;
 
   // eFunctionNameTypeAuto should be pre-resolved by a call to
@@ -1102,11 +1094,8 @@
     symbol_indexes.erase(
         std::unique(symbol_indexes.begin(), symbol_indexes.end()),
         symbol_indexes.end());
-    count = symbol_indexes.size();
     SymbolIndicesToSymbolContextList(symbol_indexes, sc_list);
   }
-
-  return count;
 }
 
 const Symbol *Symtab::GetParent(Symbol *child_symbol) const {
diff --git a/src/llvm-project/lldb/source/Symbol/Type.cpp b/src/llvm-project/lldb/source/Symbol/Type.cpp
index 4ee8330..f194356 100644
--- a/src/llvm-project/lldb/source/Symbol/Type.cpp
+++ b/src/llvm-project/lldb/source/Symbol/Type.cpp
@@ -11,6 +11,7 @@
 #include "lldb/Core/Module.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataExtractor.h"
+#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Scalar.h"
 #include "lldb/Utility/StreamString.h"
 
@@ -29,15 +30,41 @@
 
 #include "llvm/ADT/StringRef.h"
 
-#include "clang/AST/Decl.h"
-#include "clang/AST/DeclObjC.h"
-
 using namespace lldb;
 using namespace lldb_private;
 
+bool lldb_private::contextMatches(llvm::ArrayRef<CompilerContext> context_chain,
+                                  llvm::ArrayRef<CompilerContext> pattern) {
+  auto ctx = context_chain.begin();
+  auto ctx_end = context_chain.end();
+  for (const CompilerContext &pat : pattern) {
+    // Early exit if the pattern is too long.
+    if (ctx == ctx_end)
+      return false;
+    if (*ctx != pat) {
+      // Skip any number of module matches.
+      if (pat.kind == CompilerContextKind::AnyModule) {
+        // Greedily match 0..n modules.
+        ctx = std::find_if(ctx, ctx_end, [](const CompilerContext &ctx) {
+          return ctx.kind != CompilerContextKind::Module;
+        });
+        continue;
+      }
+      // See if there is a kind mismatch; they should have 1 bit in common.
+      if (((uint16_t)ctx->kind & (uint16_t)pat.kind) == 0)
+        return false;
+      // The name is ignored for AnyModule, but not for AnyType.
+      if (pat.kind != CompilerContextKind::AnyModule && ctx->name != pat.name)
+        return false;
+    }
+    ++ctx;
+  }
+  return true;
+}
+
 void CompilerContext::Dump() const {
-  switch (type) {
-  case CompilerContextKind::Invalid:
+  switch (kind) {
+  default:
     printf("Invalid");
     break;
   case CompilerContextKind::TranslationUnit:
@@ -52,7 +79,7 @@
   case CompilerContextKind::Class:
     printf("Class");
     break;
-  case CompilerContextKind::Structure:
+  case CompilerContextKind::Struct:
     printf("Structure");
     break;
   case CompilerContextKind::Union:
@@ -64,12 +91,18 @@
   case CompilerContextKind::Variable:
     printf("Variable");
     break;
-  case CompilerContextKind::Enumeration:
+  case CompilerContextKind::Enum:
     printf("Enumeration");
     break;
   case CompilerContextKind::Typedef:
     printf("Typedef");
     break;
+  case CompilerContextKind::AnyModule:
+    printf("AnyModule");
+    break;
+  case CompilerContextKind::AnyType:
+    printf("AnyType");
+    break;
   }
   printf("(\"%s\")\n", name.GetCString());
 }
@@ -106,16 +139,19 @@
   return m_type_sp.get();
 }
 
-Type::Type(lldb::user_id_t uid, SymbolFile *symbol_file,
-           ConstString name, llvm::Optional<uint64_t> byte_size,
-           SymbolContextScope *context, user_id_t encoding_uid,
-           EncodingDataType encoding_uid_type, const Declaration &decl,
-           const CompilerType &compiler_type,
+Type::Type(lldb::user_id_t uid, SymbolFile *symbol_file, ConstString name,
+           llvm::Optional<uint64_t> byte_size, SymbolContextScope *context,
+           user_id_t encoding_uid, EncodingDataType encoding_uid_type,
+           const Declaration &decl, const CompilerType &compiler_type,
            ResolveState compiler_type_resolve_state)
     : std::enable_shared_from_this<Type>(), UserID(uid), m_name(name),
       m_symbol_file(symbol_file), m_context(context), m_encoding_type(nullptr),
       m_encoding_uid(encoding_uid), m_encoding_uid_type(encoding_uid_type),
-      m_decl(decl), m_compiler_type(compiler_type) {
+      m_decl(decl), m_compiler_type(compiler_type),
+      m_compiler_type_resolve_state(
+          compiler_type ? compiler_type_resolve_state
+                        : ResolveState::Unresolved),
+      m_is_complete_objc_class(false) {
   if (byte_size) {
     m_byte_size = *byte_size;
     m_byte_size_has_value = true;
@@ -123,19 +159,15 @@
     m_byte_size = 0;
     m_byte_size_has_value = false;
   }
-  m_flags.compiler_type_resolve_state =
-      (compiler_type ? compiler_type_resolve_state : eResolveStateUnresolved);
-  m_flags.is_complete_objc_class = false;
 }
 
 Type::Type()
     : std::enable_shared_from_this<Type>(), UserID(0), m_name("<INVALID TYPE>"),
       m_symbol_file(nullptr), m_context(nullptr), m_encoding_type(nullptr),
       m_encoding_uid(LLDB_INVALID_UID), m_encoding_uid_type(eEncodingInvalid),
-      m_byte_size(0), m_byte_size_has_value(false), m_decl(),
-      m_compiler_type() {
-  m_flags.compiler_type_resolve_state = eResolveStateUnresolved;
-  m_flags.is_complete_objc_class = false;
+      m_compiler_type_resolve_state(ResolveState::Unresolved) {
+  m_byte_size = 0;
+  m_byte_size_has_value = false;
 }
 
 void Type::GetDescription(Stream *s, lldb::DescriptionLevel level,
@@ -181,6 +213,9 @@
     case eEncodingIsVolatileUID:
       s->PutCString(" (unresolved volatile type)");
       break;
+    case eEncodingIsAtomicUID:
+      s->PutCString(" (unresolved atomic type)");
+      break;
     case eEncodingIsTypedefUID:
       s->PutCString(" (unresolved typedef)");
       break;
@@ -223,7 +258,7 @@
     *s << ", compiler_type = " << m_compiler_type.GetOpaqueQualType() << ' ';
     GetForwardCompilerType().DumpTypeDescription(s);
   } else if (m_encoding_uid != LLDB_INVALID_UID) {
-    *s << ", type_data = " << (uint64_t)m_encoding_uid;
+    s->Format(", type_data = {0:x-16}", m_encoding_uid);
     switch (m_encoding_uid_type) {
     case eEncodingInvalid:
       break;
@@ -239,6 +274,9 @@
     case eEncodingIsVolatileUID:
       s->PutCString(" (unresolved volatile type)");
       break;
+    case eEncodingIsAtomicUID:
+      s->PutCString(" (unresolved atomic type)");
+      break;
     case eEncodingIsTypedefUID:
       s->PutCString(" (unresolved typedef)");
       break;
@@ -275,7 +313,7 @@
                      const DataExtractor &data, uint32_t data_byte_offset,
                      bool show_types, bool show_summary, bool verbose,
                      lldb::Format format) {
-  if (ResolveClangType(eResolveStateForward)) {
+  if (ResolveClangType(ResolveState::Forward)) {
     if (show_types) {
       s->PutChar('(');
       if (verbose)
@@ -311,6 +349,7 @@
   case eEncodingIsConstUID:
   case eEncodingIsRestrictUID:
   case eEncodingIsVolatileUID:
+  case eEncodingIsAtomicUID:
   case eEncodingIsTypedefUID: {
     Type *encoding_type = GetEncodingType();
     if (encoding_type)
@@ -425,8 +464,6 @@
   return false;
 }
 
-TypeList *Type::GetTypeList() { return GetSymbolFile()->GetTypeList(); }
-
 const Declaration &Type::GetDeclaration() const { return m_decl; }
 
 bool Type::ResolveClangType(ResolveState compiler_type_resolve_state) {
@@ -441,8 +478,8 @@
             encoding_type->GetForwardCompilerType();
         if (encoding_compiler_type.IsValid()) {
           m_compiler_type = encoding_compiler_type;
-          m_flags.compiler_type_resolve_state =
-              encoding_type->m_flags.compiler_type_resolve_state;
+          m_compiler_type_resolve_state =
+              encoding_type->m_compiler_type_resolve_state;
         }
       } break;
 
@@ -461,6 +498,11 @@
             encoding_type->GetForwardCompilerType().AddVolatileModifier();
         break;
 
+      case eEncodingIsAtomicUID:
+        m_compiler_type =
+            encoding_type->GetForwardCompilerType().GetAtomicType();
+        break;
+
       case eEncodingIsTypedefUID:
         m_compiler_type = encoding_type->GetForwardCompilerType().CreateTypedef(
             m_name.AsCString("__lldb_invalid_typedef_name"),
@@ -488,47 +530,58 @@
       }
     } else {
       // We have no encoding type, return void?
-      TypeSystem *type_system =
+      auto type_system_or_err =
           m_symbol_file->GetTypeSystemForLanguage(eLanguageTypeC);
-      CompilerType void_compiler_type =
-          type_system->GetBasicTypeFromAST(eBasicTypeVoid);
-      switch (m_encoding_uid_type) {
-      case eEncodingIsUID:
-        m_compiler_type = void_compiler_type;
-        break;
+      if (auto err = type_system_or_err.takeError()) {
+        LLDB_LOG_ERROR(
+            lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_SYMBOLS),
+            std::move(err),
+            "Unable to construct void type from ClangASTContext");
+      } else {
+        CompilerType void_compiler_type =
+            type_system_or_err->GetBasicTypeFromAST(eBasicTypeVoid);
+        switch (m_encoding_uid_type) {
+        case eEncodingIsUID:
+          m_compiler_type = void_compiler_type;
+          break;
 
-      case eEncodingIsConstUID:
-        m_compiler_type = void_compiler_type.AddConstModifier();
-        break;
+        case eEncodingIsConstUID:
+          m_compiler_type = void_compiler_type.AddConstModifier();
+          break;
 
-      case eEncodingIsRestrictUID:
-        m_compiler_type = void_compiler_type.AddRestrictModifier();
-        break;
+        case eEncodingIsRestrictUID:
+          m_compiler_type = void_compiler_type.AddRestrictModifier();
+          break;
 
-      case eEncodingIsVolatileUID:
-        m_compiler_type = void_compiler_type.AddVolatileModifier();
-        break;
+        case eEncodingIsVolatileUID:
+          m_compiler_type = void_compiler_type.AddVolatileModifier();
+          break;
 
-      case eEncodingIsTypedefUID:
-        m_compiler_type = void_compiler_type.CreateTypedef(
-            m_name.AsCString("__lldb_invalid_typedef_name"),
-            GetSymbolFile()->GetDeclContextContainingUID(GetID()));
-        break;
+        case eEncodingIsAtomicUID:
+          m_compiler_type = void_compiler_type.GetAtomicType();
+          break;
 
-      case eEncodingIsPointerUID:
-        m_compiler_type = void_compiler_type.GetPointerType();
-        break;
+        case eEncodingIsTypedefUID:
+          m_compiler_type = void_compiler_type.CreateTypedef(
+              m_name.AsCString("__lldb_invalid_typedef_name"),
+              GetSymbolFile()->GetDeclContextContainingUID(GetID()));
+          break;
 
-      case eEncodingIsLValueReferenceUID:
-        m_compiler_type = void_compiler_type.GetLValueReferenceType();
-        break;
+        case eEncodingIsPointerUID:
+          m_compiler_type = void_compiler_type.GetPointerType();
+          break;
 
-      case eEncodingIsRValueReferenceUID:
-        m_compiler_type = void_compiler_type.GetRValueReferenceType();
-        break;
+        case eEncodingIsLValueReferenceUID:
+          m_compiler_type = void_compiler_type.GetLValueReferenceType();
+          break;
 
-      default:
-        llvm_unreachable("Unhandled encoding_data_type.");
+        case eEncodingIsRValueReferenceUID:
+          m_compiler_type = void_compiler_type.GetRValueReferenceType();
+          break;
+
+        default:
+          llvm_unreachable("Unhandled encoding_data_type.");
+        }
       }
     }
 
@@ -536,16 +589,16 @@
     // set to eResolveStateUnresolved so we need to update it to say that we
     // now have a forward declaration since that is what we created above.
     if (m_compiler_type.IsValid())
-      m_flags.compiler_type_resolve_state = eResolveStateForward;
+      m_compiler_type_resolve_state = ResolveState::Forward;
   }
 
   // Check if we have a forward reference to a class/struct/union/enum?
-  if (compiler_type_resolve_state == eResolveStateLayout ||
-      compiler_type_resolve_state == eResolveStateFull) {
+  if (compiler_type_resolve_state == ResolveState::Layout ||
+      compiler_type_resolve_state == ResolveState::Full) {
     // Check if we have a forward reference to a class/struct/union/enum?
     if (m_compiler_type.IsValid() &&
-        m_flags.compiler_type_resolve_state < compiler_type_resolve_state) {
-      m_flags.compiler_type_resolve_state = eResolveStateFull;
+        m_compiler_type_resolve_state < compiler_type_resolve_state) {
+      m_compiler_type_resolve_state = ResolveState::Full;
       if (!m_compiler_type.IsDefined()) {
         // We have a forward declaration, we need to resolve it to a complete
         // definition.
@@ -563,12 +616,12 @@
       ResolveState encoding_compiler_type_resolve_state =
           compiler_type_resolve_state;
 
-      if (compiler_type_resolve_state == eResolveStateLayout) {
+      if (compiler_type_resolve_state == ResolveState::Layout) {
         switch (m_encoding_uid_type) {
         case eEncodingIsPointerUID:
         case eEncodingIsLValueReferenceUID:
         case eEncodingIsRValueReferenceUID:
-          encoding_compiler_type_resolve_state = eResolveStateForward;
+          encoding_compiler_type_resolve_state = ResolveState::Forward;
           break;
         default:
           break;
@@ -589,31 +642,20 @@
 }
 
 CompilerType Type::GetFullCompilerType() {
-  ResolveClangType(eResolveStateFull);
+  ResolveClangType(ResolveState::Full);
   return m_compiler_type;
 }
 
 CompilerType Type::GetLayoutCompilerType() {
-  ResolveClangType(eResolveStateLayout);
+  ResolveClangType(ResolveState::Layout);
   return m_compiler_type;
 }
 
 CompilerType Type::GetForwardCompilerType() {
-  ResolveClangType(eResolveStateForward);
+  ResolveClangType(ResolveState::Forward);
   return m_compiler_type;
 }
 
-int Type::Compare(const Type &a, const Type &b) {
-  // Just compare the UID values for now...
-  lldb::user_id_t a_uid = a.GetID();
-  lldb::user_id_t b_uid = b.GetID();
-  if (a_uid < b_uid)
-    return -1;
-  if (a_uid > b_uid)
-    return 1;
-  return 0;
-}
-
 ConstString Type::GetQualifiedName() {
   return GetForwardCompilerType().GetConstTypeName();
 }
diff --git a/src/llvm-project/lldb/source/Symbol/TypeMap.cpp b/src/llvm-project/lldb/source/Symbol/TypeMap.cpp
index bc6e272..4ee1026 100644
--- a/src/llvm-project/lldb/source/Symbol/TypeMap.cpp
+++ b/src/llvm-project/lldb/source/Symbol/TypeMap.cpp
@@ -8,18 +8,6 @@
 
 #include <vector>
 
-#include "clang/AST/ASTConsumer.h"
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/DeclCXX.h"
-#include "clang/AST/DeclGroup.h"
-
-#include "clang/Basic/Builtins.h"
-#include "clang/Basic/IdentifierTable.h"
-#include "clang/Basic/LangOptions.h"
-#include "clang/Basic/SourceManager.h"
-#include "clang/Basic/TargetInfo.h"
-
 #include "llvm/Support/FormattedStream.h"
 #include "llvm/Support/raw_ostream.h"
 
@@ -30,7 +18,6 @@
 
 using namespace lldb;
 using namespace lldb_private;
-using namespace clang;
 
 TypeMap::TypeMap() : m_types() {}
 
diff --git a/src/llvm-project/lldb/source/Symbol/TypeSystem.cpp b/src/llvm-project/lldb/source/Symbol/TypeSystem.cpp
index fb9c8e7..29a49a6 100644
--- a/src/llvm-project/lldb/source/Symbol/TypeSystem.cpp
+++ b/src/llvm-project/lldb/source/Symbol/TypeSystem.cpp
@@ -20,11 +20,28 @@
 
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Symbol/CompilerType.h"
+#include "lldb/Target/Language.h"
 
 using namespace lldb_private;
 using namespace lldb;
 
-TypeSystem::TypeSystem(LLVMCastKind kind) : m_kind(kind), m_sym_file(nullptr) {}
+/// A 64-bit SmallBitVector is only small up to 64-7 bits, and the
+/// setBitsInMask interface wants to write full bytes.
+static const size_t g_num_small_bitvector_bits = 64 - 8;
+static_assert(eNumLanguageTypes < g_num_small_bitvector_bits,
+              "Languages bit vector is no longer small on 64 bit systems");
+LanguageSet::LanguageSet() : bitvector(eNumLanguageTypes, 0) {}
+
+llvm::Optional<LanguageType> LanguageSet::GetSingularLanguage() {
+  if (bitvector.count() == 1)
+    return (LanguageType)bitvector.find_first();
+  return {};
+}
+
+void LanguageSet::Insert(LanguageType language) { bitvector.set(language); }
+size_t LanguageSet::Size() const { return bitvector.count(); }
+bool LanguageSet::Empty() const { return bitvector.none(); }
+bool LanguageSet::operator[](unsigned i) const { return bitvector[i]; }
 
 TypeSystem::~TypeSystem() {}
 
@@ -72,6 +89,10 @@
   return CompilerType();
 }
 
+CompilerType TypeSystem::GetAtomicType(lldb::opaque_compiler_type_t type) {
+  return CompilerType();
+}
+
 CompilerType TypeSystem::AddConstModifier(lldb::opaque_compiler_type_t type) {
   return CompilerType();
 }
@@ -198,65 +219,140 @@
   }
 }
 
-TypeSystem *TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType language,
-                                                    Module *module,
-                                                    bool can_create) {
+llvm::Expected<TypeSystem &>
+TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType language,
+                                        Module *module, bool can_create) {
+  llvm::Error error = llvm::Error::success();
+  assert(!error); // Check the success value when assertions are enabled
   std::lock_guard<std::mutex> guard(m_mutex);
-  collection::iterator pos = m_map.find(language);
-  if (pos != m_map.end())
-    return pos->second.get();
+  if (m_clear_in_progress) {
+    error = llvm::make_error<llvm::StringError>(
+        "Unable to get TypeSystem because TypeSystemMap is being cleared",
+        llvm::inconvertibleErrorCode());
+  } else {
+    collection::iterator pos = m_map.find(language);
+    if (pos != m_map.end()) {
+      auto *type_system = pos->second.get();
+      if (type_system) {
+        llvm::consumeError(std::move(error));
+        return *type_system;
+      }
+      error = llvm::make_error<llvm::StringError>(
+          "TypeSystem for language " +
+              llvm::toStringRef(Language::GetNameForLanguageType(language)) +
+              " doesn't exist",
+          llvm::inconvertibleErrorCode());
+      return std::move(error);
+    }
 
-  for (const auto &pair : m_map) {
-    if (pair.second && pair.second->SupportsLanguage(language)) {
-      // Add a new mapping for "language" to point to an already existing
-      // TypeSystem that supports this language
-      AddToMap(language, pair.second);
-      return pair.second.get();
+    for (const auto &pair : m_map) {
+      if (pair.second && pair.second->SupportsLanguage(language)) {
+        // Add a new mapping for "language" to point to an already existing
+        // TypeSystem that supports this language
+        m_map[language] = pair.second;
+        if (pair.second.get()) {
+          llvm::consumeError(std::move(error));
+          return *pair.second.get();
+        }
+        error = llvm::make_error<llvm::StringError>(
+            "TypeSystem for language " +
+                llvm::toStringRef(Language::GetNameForLanguageType(language)) +
+                " doesn't exist",
+            llvm::inconvertibleErrorCode());
+        return std::move(error);
+      }
+    }
+
+    if (!can_create) {
+      error = llvm::make_error<llvm::StringError>(
+          "Unable to find type system for language " +
+              llvm::toStringRef(Language::GetNameForLanguageType(language)),
+          llvm::inconvertibleErrorCode());
+    } else {
+      // Cache even if we get a shared pointer that contains a null type system
+      // back
+      auto type_system_sp = TypeSystem::CreateInstance(language, module);
+      m_map[language] = type_system_sp;
+      if (type_system_sp.get()) {
+        llvm::consumeError(std::move(error));
+        return *type_system_sp.get();
+      }
+      error = llvm::make_error<llvm::StringError>(
+          "TypeSystem for language " +
+              llvm::toStringRef(Language::GetNameForLanguageType(language)) +
+              " doesn't exist",
+          llvm::inconvertibleErrorCode());
     }
   }
 
-  if (!can_create)
-    return nullptr;
-
-  // Cache even if we get a shared pointer that contains null type system back
-  lldb::TypeSystemSP type_system_sp =
-      TypeSystem::CreateInstance(language, module);
-  AddToMap(language, type_system_sp);
-  return type_system_sp.get();
+  return std::move(error);
 }
 
-TypeSystem *TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType language,
-                                                    Target *target,
-                                                    bool can_create) {
+llvm::Expected<TypeSystem &>
+TypeSystemMap::GetTypeSystemForLanguage(lldb::LanguageType language,
+                                        Target *target, bool can_create) {
+  llvm::Error error = llvm::Error::success();
+  assert(!error); // Check the success value when assertions are enabled
   std::lock_guard<std::mutex> guard(m_mutex);
-  collection::iterator pos = m_map.find(language);
-  if (pos != m_map.end())
-    return pos->second.get();
+  if (m_clear_in_progress) {
+    error = llvm::make_error<llvm::StringError>(
+        "Unable to get TypeSystem because TypeSystemMap is being cleared",
+        llvm::inconvertibleErrorCode());
+  } else {
+    collection::iterator pos = m_map.find(language);
+    if (pos != m_map.end()) {
+      auto *type_system = pos->second.get();
+      if (type_system) {
+        llvm::consumeError(std::move(error));
+        return *type_system;
+      }
+      error = llvm::make_error<llvm::StringError>(
+          "TypeSystem for language " +
+              llvm::toStringRef(Language::GetNameForLanguageType(language)) +
+              " doesn't exist",
+          llvm::inconvertibleErrorCode());
+      return std::move(error);
+    }
 
-  for (const auto &pair : m_map) {
-    if (pair.second && pair.second->SupportsLanguage(language)) {
-      // Add a new mapping for "language" to point to an already existing
-      // TypeSystem that supports this language
+    for (const auto &pair : m_map) {
+      if (pair.second && pair.second->SupportsLanguage(language)) {
+        // Add a new mapping for "language" to point to an already existing
+        // TypeSystem that supports this language
+        m_map[language] = pair.second;
+        if (pair.second.get()) {
+          llvm::consumeError(std::move(error));
+          return *pair.second.get();
+        }
+        error = llvm::make_error<llvm::StringError>(
+            "TypeSystem for language " +
+                llvm::toStringRef(Language::GetNameForLanguageType(language)) +
+                " doesn't exist",
+            llvm::inconvertibleErrorCode());
+        return std::move(error);
+      }
+    }
 
-      AddToMap(language, pair.second);
-      return pair.second.get();
+    if (!can_create) {
+      error = llvm::make_error<llvm::StringError>(
+          "Unable to find type system for language " +
+              llvm::toStringRef(Language::GetNameForLanguageType(language)),
+          llvm::inconvertibleErrorCode());
+    } else {
+      // Cache even if we get a shared pointer that contains a null type system
+      // back
+      auto type_system_sp = TypeSystem::CreateInstance(language, target);
+      m_map[language] = type_system_sp;
+      if (type_system_sp.get()) {
+        llvm::consumeError(std::move(error));
+        return *type_system_sp.get();
+      }
+      error = llvm::make_error<llvm::StringError>(
+          "TypeSystem for language " +
+              llvm::toStringRef(Language::GetNameForLanguageType(language)) +
+              " doesn't exist",
+          llvm::inconvertibleErrorCode());
     }
   }
 
-  if (!can_create)
-    return nullptr;
-
-  // Cache even if we get a shared pointer that contains null type system back
-  lldb::TypeSystemSP type_system_sp;
-  if (!m_clear_in_progress)
-    type_system_sp = TypeSystem::CreateInstance(language, target);
-
-  AddToMap(language, type_system_sp);
-  return type_system_sp.get();
-}
-
-void TypeSystemMap::AddToMap(lldb::LanguageType language,
-                             lldb::TypeSystemSP const &type_system_sp) {
-  if (!m_clear_in_progress)
-    m_map[language] = type_system_sp;
+  return std::move(error);
 }
diff --git a/src/llvm-project/lldb/source/Symbol/UnwindPlan.cpp b/src/llvm-project/lldb/source/Symbol/UnwindPlan.cpp
index 774f9cb..15443ce 100644
--- a/src/llvm-project/lldb/source/Symbol/UnwindPlan.cpp
+++ b/src/llvm-project/lldb/source/Symbol/UnwindPlan.cpp
@@ -170,7 +170,8 @@
   if (m_type == rhs.m_type) {
     switch (m_type) {
     case unspecified:
-      return true;
+    case isRaSearch:
+      return m_value.ra_search_offset == rhs.m_value.ra_search_offset;
 
     case isRegisterPlusOffset:
       return m_value.reg.offset == rhs.m_value.reg.offset;
@@ -205,9 +206,12 @@
                   llvm::makeArrayRef(m_value.expr.opcodes, m_value.expr.length),
                   thread);
     break;
-  default:
+  case unspecified:
     s.PutCString("unspecified");
     break;
+  case isRaSearch:
+    s.Printf("RaSearch@SP%+d", m_value.ra_search_offset);
+    break;
   }
 }
 
@@ -402,10 +406,10 @@
     return m_row_list[idx];
   else {
     Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-    if (log)
-      log->Printf("error: UnwindPlan::GetRowAtIndex(idx = %u) invalid index "
-                  "(number rows is %u)",
-                  idx, (uint32_t)m_row_list.size());
+    LLDB_LOGF(log,
+              "error: UnwindPlan::GetRowAtIndex(idx = %u) invalid index "
+              "(number rows is %u)",
+              idx, (uint32_t)m_row_list.size());
     return UnwindPlan::RowSP();
   }
 }
@@ -413,8 +417,7 @@
 const UnwindPlan::RowSP UnwindPlan::GetLastRow() const {
   if (m_row_list.empty()) {
     Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_UNWIND));
-    if (log)
-      log->Printf("UnwindPlan::GetLastRow() when rows are empty");
+    LLDB_LOGF(log, "UnwindPlan::GetLastRow() when rows are empty");
     return UnwindPlan::RowSP();
   }
   return m_row_list.back();
@@ -434,13 +437,14 @@
     if (log) {
       StreamString s;
       if (addr.Dump(&s, nullptr, Address::DumpStyleSectionNameOffset)) {
-        log->Printf("UnwindPlan is invalid -- no unwind rows for UnwindPlan "
-                    "'%s' at address %s",
-                    m_source_name.GetCString(), s.GetData());
+        LLDB_LOGF(log,
+                  "UnwindPlan is invalid -- no unwind rows for UnwindPlan "
+                  "'%s' at address %s",
+                  m_source_name.GetCString(), s.GetData());
       } else {
-        log->Printf(
-            "UnwindPlan is invalid -- no unwind rows for UnwindPlan '%s'",
-            m_source_name.GetCString());
+        LLDB_LOGF(log,
+                  "UnwindPlan is invalid -- no unwind rows for UnwindPlan '%s'",
+                  m_source_name.GetCString());
       }
     }
     return false;
@@ -456,13 +460,15 @@
     if (log) {
       StreamString s;
       if (addr.Dump(&s, nullptr, Address::DumpStyleSectionNameOffset)) {
-        log->Printf("UnwindPlan is invalid -- no CFA register defined in row 0 "
-                    "for UnwindPlan '%s' at address %s",
-                    m_source_name.GetCString(), s.GetData());
+        LLDB_LOGF(log,
+                  "UnwindPlan is invalid -- no CFA register defined in row 0 "
+                  "for UnwindPlan '%s' at address %s",
+                  m_source_name.GetCString(), s.GetData());
       } else {
-        log->Printf("UnwindPlan is invalid -- no CFA register defined in row 0 "
-                    "for UnwindPlan '%s'",
-                    m_source_name.GetCString());
+        LLDB_LOGF(log,
+                  "UnwindPlan is invalid -- no CFA register defined in row 0 "
+                  "for UnwindPlan '%s'",
+                  m_source_name.GetCString());
       }
     }
     return false;
diff --git a/src/llvm-project/lldb/source/Symbol/UnwindTable.cpp b/src/llvm-project/lldb/source/Symbol/UnwindTable.cpp
index a8f451d..045957a 100644
--- a/src/llvm-project/lldb/source/Symbol/UnwindTable.cpp
+++ b/src/llvm-project/lldb/source/Symbol/UnwindTable.cpp
@@ -13,6 +13,7 @@
 #include "lldb/Core/Module.h"
 #include "lldb/Core/Section.h"
 #include "lldb/Symbol/ArmUnwindInfo.h"
+#include "lldb/Symbol/CallFrameInfo.h"
 #include "lldb/Symbol/CompactUnwindInfo.h"
 #include "lldb/Symbol/DWARFCallFrameInfo.h"
 #include "lldb/Symbol/FuncUnwinders.h"
@@ -29,7 +30,8 @@
 
 UnwindTable::UnwindTable(Module &module)
     : m_module(module), m_unwinds(), m_initialized(false), m_mutex(),
-      m_eh_frame_up(), m_compact_unwind_up(), m_arm_unwind_up() {}
+      m_object_file_unwind_up(), m_eh_frame_up(), m_compact_unwind_up(),
+      m_arm_unwind_up() {}
 
 // We can't do some of this initialization when the ObjectFile is running its
 // ctor; delay doing it until needed for something.
@@ -47,6 +49,8 @@
   if (!object_file)
     return;
 
+  m_object_file_unwind_up = object_file->CreateCallFrameInfo();
+
   SectionList *sl = m_module.GetSectionList();
   if (!sl)
     return;
@@ -83,7 +87,12 @@
                                                           SymbolContext &sc) {
   AddressRange range;
 
-  // First check the symbol context
+  // First check the unwind info from the object file plugin
+  if (m_object_file_unwind_up &&
+      m_object_file_unwind_up->GetAddressRange(addr, range))
+    return range;
+
+  // Check the symbol context
   if (sc.GetAddressRange(eSymbolContextFunction | eSymbolContextSymbol, 0,
                          false, range) &&
       range.GetBaseAddress().IsValid())
@@ -162,6 +171,11 @@
   s.EOL();
 }
 
+lldb_private::CallFrameInfo *UnwindTable::GetObjectFileUnwindInfo() {
+  Initialize();
+  return m_object_file_unwind_up.get();
+}
+
 DWARFCallFrameInfo *UnwindTable::GetEHFrameInfo() {
   Initialize();
   return m_eh_frame_up.get();
@@ -182,11 +196,7 @@
   return m_arm_unwind_up.get();
 }
 
-SymbolFile *UnwindTable::GetSymbolFile() {
-  if (SymbolVendor *vendor = m_module.GetSymbolVendor())
-    return vendor->GetSymbolFile();
-  return nullptr;
-}
+SymbolFile *UnwindTable::GetSymbolFile() { return m_module.GetSymbolFile(); }
 
 ArchSpec UnwindTable::GetArchitecture() { return m_module.GetArchitecture(); }
 
diff --git a/src/llvm-project/lldb/source/Symbol/Variable.cpp b/src/llvm-project/lldb/source/Symbol/Variable.cpp
index 29a7a51..a049682 100644
--- a/src/llvm-project/lldb/source/Symbol/Variable.cpp
+++ b/src/llvm-project/lldb/source/Symbol/Variable.cpp
@@ -35,14 +35,12 @@
 using namespace lldb;
 using namespace lldb_private;
 
-// Variable constructor
-Variable::Variable(
-    lldb::user_id_t uid, const char *name,
-    const char *mangled, // The mangled or fully qualified name of the variable.
-    const lldb::SymbolFileTypeSP &symfile_type_sp, ValueType scope,
-    SymbolContextScope *context, const RangeList &scope_range,
-    Declaration *decl_ptr, const DWARFExpression &location, bool external,
-    bool artificial, bool static_member)
+Variable::Variable(lldb::user_id_t uid, const char *name, const char *mangled,
+                   const lldb::SymbolFileTypeSP &symfile_type_sp,
+                   ValueType scope, SymbolContextScope *context,
+                   const RangeList &scope_range, Declaration *decl_ptr,
+                   const DWARFExpression &location, bool external,
+                   bool artificial, bool static_member)
     : UserID(uid), m_name(name), m_mangled(ConstString(mangled)),
       m_symfile_type_sp(symfile_type_sp), m_scope(scope),
       m_owner_scope(context), m_scope_range(scope_range),
@@ -50,14 +48,22 @@
       m_artificial(artificial), m_loc_is_const_data(false),
       m_static_member(static_member) {}
 
-// Destructor
 Variable::~Variable() {}
 
 lldb::LanguageType Variable::GetLanguage() const {
-  SymbolContext variable_sc;
-  m_owner_scope->CalculateSymbolContext(&variable_sc);
-  if (variable_sc.comp_unit)
-    return variable_sc.comp_unit->GetLanguage();
+  lldb::LanguageType lang = m_mangled.GuessLanguage();
+  if (lang != lldb::eLanguageTypeUnknown)
+    return lang;
+
+  if (auto *func = m_owner_scope->CalculateSymbolContextFunction()) {
+    if ((lang = func->GetLanguage()) != lldb::eLanguageTypeUnknown)
+      return lang;
+  } else if (auto *comp_unit =
+                 m_owner_scope->CalculateSymbolContextCompileUnit()) {
+    if ((lang = comp_unit->GetLanguage()) != lldb::eLanguageTypeUnknown)
+      return lang;
+  }
+
   return lldb::eLanguageTypeUnknown;
 }
 
@@ -106,7 +112,7 @@
   if (m_symfile_type_sp) {
     Type *type = m_symfile_type_sp->GetType();
     if (type) {
-      *s << ", type = {" << type->GetID() << "} " << (void *)type << " (";
+      s->Format(", type = {{{0:x-16}} {1} (", type->GetID(), type);
       type->DumpTypeName(s);
       s->PutChar(')');
     }
@@ -128,7 +134,7 @@
       s->PutCString("thread local");
       break;
     default:
-      *s << "??? (" << m_scope << ')';
+      s->AsRawOstream() << "??? (" << m_scope << ')';
     }
   }
 
@@ -381,21 +387,15 @@
   default: {
     static RegularExpression g_regex(
         llvm::StringRef("^([A-Za-z_:][A-Za-z_0-9:]*)(.*)"));
-    RegularExpression::Match regex_match(1);
-    std::string variable_name;
+    llvm::SmallVector<llvm::StringRef, 2> matches;
     variable_list.Clear();
-    if (!g_regex.Execute(variable_expr_path, &regex_match)) {
+    if (!g_regex.Execute(variable_expr_path, &matches)) {
       error.SetErrorStringWithFormat(
           "unable to extract a variable name from '%s'",
           variable_expr_path.str().c_str());
       return error;
     }
-    if (!regex_match.GetMatchAtIndex(variable_expr_path, 1, variable_name)) {
-      error.SetErrorStringWithFormat(
-          "unable to extract a variable name from '%s'",
-          variable_expr_path.str().c_str());
-      return error;
-    }
+    std::string variable_name = matches[1].str();
     if (!callback(baton, variable_name.c_str(), variable_list)) {
       error.SetErrorString("unknown error");
       return error;
@@ -485,24 +485,14 @@
     StackFrame *frame, llvm::StringRef partial_path,
     const llvm::Twine
         &prefix_path, // Anything that has been resolved already will be in here
-    const CompilerType &compiler_type,
-    StringList &matches, bool &word_complete);
+    const CompilerType &compiler_type, CompletionRequest &request);
 
 static void PrivateAutoCompleteMembers(
     StackFrame *frame, const std::string &partial_member_name,
     llvm::StringRef partial_path,
     const llvm::Twine
         &prefix_path, // Anything that has been resolved already will be in here
-    const CompilerType &compiler_type,
-    StringList &matches, bool &word_complete);
-
-static void PrivateAutoCompleteMembers(
-    StackFrame *frame, const std::string &partial_member_name,
-    llvm::StringRef partial_path,
-    const llvm::Twine
-        &prefix_path, // Anything that has been resolved already will be in here
-    const CompilerType &compiler_type,
-    StringList &matches, bool &word_complete) {
+    const CompilerType &compiler_type, CompletionRequest &request) {
 
   // We are in a type parsing child members
   const uint32_t num_bases = compiler_type.GetNumDirectBaseClasses();
@@ -512,9 +502,9 @@
       CompilerType base_class_type =
           compiler_type.GetDirectBaseClassAtIndex(i, nullptr);
 
-      PrivateAutoCompleteMembers(
-          frame, partial_member_name, partial_path, prefix_path,
-          base_class_type.GetCanonicalType(), matches, word_complete);
+      PrivateAutoCompleteMembers(frame, partial_member_name, partial_path,
+                                 prefix_path,
+                                 base_class_type.GetCanonicalType(), request);
     }
   }
 
@@ -525,9 +515,9 @@
       CompilerType vbase_class_type =
           compiler_type.GetVirtualBaseClassAtIndex(i, nullptr);
 
-      PrivateAutoCompleteMembers(
-          frame, partial_member_name, partial_path, prefix_path,
-          vbase_class_type.GetCanonicalType(), matches, word_complete);
+      PrivateAutoCompleteMembers(frame, partial_member_name, partial_path,
+                                 prefix_path,
+                                 vbase_class_type.GetCanonicalType(), request);
     }
   }
 
@@ -548,9 +538,9 @@
               frame, partial_path,
               prefix_path + member_name, // Anything that has been resolved
                                          // already will be in here
-              member_compiler_type.GetCanonicalType(), matches, word_complete);
+              member_compiler_type.GetCanonicalType(), request);
         } else {
-          matches.AppendString((prefix_path + member_name).str());
+          request.AddCompletion((prefix_path + member_name).str());
         }
       }
     }
@@ -561,8 +551,7 @@
     StackFrame *frame, llvm::StringRef partial_path,
     const llvm::Twine
         &prefix_path, // Anything that has been resolved already will be in here
-    const CompilerType &compiler_type,
-    StringList &matches, bool &word_complete) {
+    const CompilerType &compiler_type, CompletionRequest &request) {
   //    printf ("\nPrivateAutoComplete()\n\tprefix_path = '%s'\n\tpartial_path =
   //    '%s'\n", prefix_path.c_str(), partial_path.c_str());
   std::string remaining_partial_path;
@@ -583,15 +572,14 @@
       case eTypeClassReference:
       case eTypeClassTypedef:
       case eTypeClassVector: {
-        matches.AppendString(prefix_path.str());
-        word_complete = matches.GetSize() == 1;
+        request.AddCompletion(prefix_path.str());
       } break;
 
       case eTypeClassClass:
       case eTypeClassStruct:
       case eTypeClassUnion:
         if (prefix_path.str().back() != '.')
-          matches.AppendString((prefix_path + ".").str());
+          request.AddCompletion((prefix_path + ".").str());
         break;
 
       case eTypeClassObjCObject:
@@ -601,10 +589,9 @@
       case eTypeClassPointer: {
         bool omit_empty_base_classes = true;
         if (compiler_type.GetNumChildren(omit_empty_base_classes, nullptr) > 0)
-          matches.AppendString((prefix_path + "->").str());
+          request.AddCompletion((prefix_path + "->").str());
         else {
-          matches.AppendString(prefix_path.str());
-          word_complete = true;
+          request.AddCompletion(prefix_path.str());
         }
       } break;
       }
@@ -615,11 +602,8 @@
         VariableList *variable_list = frame->GetVariableList(get_file_globals);
 
         if (variable_list) {
-          const size_t num_variables = variable_list->GetSize();
-          for (size_t i = 0; i < num_variables; ++i) {
-            Variable *variable = variable_list->GetVariableAtIndex(i).get();
-            matches.AppendString(variable->GetName().AsCString());
-          }
+          for (const VariableSP &var_sp : *variable_list)
+            request.AddCompletion(var_sp->GetName().AsCString());
         }
       }
     }
@@ -629,14 +613,14 @@
     case '*':
       if (prefix_path.str().empty()) {
         PrivateAutoComplete(frame, partial_path.substr(1), "*", compiler_type,
-                            matches, word_complete);
+                            request);
       }
       break;
 
     case '&':
       if (prefix_path.isTriviallyEmpty()) {
         PrivateAutoComplete(frame, partial_path.substr(1), std::string("&"),
-                            compiler_type, matches, word_complete);
+                            compiler_type, request);
       }
       break;
 
@@ -648,14 +632,14 @@
           CompilerType pointee_type(compiler_type.GetPointeeType());
           if (partial_path.size() > 2 && partial_path[2]) {
             // If there is more after the "->", then search deeper
-            PrivateAutoComplete(
-                frame, partial_path.substr(2), prefix_path + "->",
-                pointee_type.GetCanonicalType(), matches, word_complete);
+            PrivateAutoComplete(frame, partial_path.substr(2),
+                                prefix_path + "->",
+                                pointee_type.GetCanonicalType(), request);
           } else {
             // Nothing after the "->", so list all members
             PrivateAutoCompleteMembers(
                 frame, std::string(), std::string(), prefix_path + "->",
-                pointee_type.GetCanonicalType(), matches, word_complete);
+                pointee_type.GetCanonicalType(), request);
           }
         } break;
         default:
@@ -673,14 +657,13 @@
           if (partial_path.size() > 1 && partial_path[1]) {
             // If there is more after the ".", then search deeper
             PrivateAutoComplete(frame, partial_path.substr(1),
-                                prefix_path + ".", compiler_type, matches,
-                                word_complete);
+                                prefix_path + ".", compiler_type, request);
 
           } else {
             // Nothing after the ".", so list all members
             PrivateAutoCompleteMembers(frame, std::string(), partial_path,
                                        prefix_path + ".", compiler_type,
-                                       matches, word_complete);
+                                       request);
           }
           break;
         default:
@@ -706,8 +689,7 @@
 
         if (compiler_type.IsValid()) {
           PrivateAutoCompleteMembers(frame, token, remaining_partial_path,
-                                     prefix_path, compiler_type, matches,
-                                     word_complete);
+                                     prefix_path, compiler_type, request);
         } else if (frame) {
           // We haven't found our variable yet
           const bool get_file_globals = true;
@@ -718,17 +700,15 @@
           if (!variable_list)
             break;
 
-          const size_t num_variables = variable_list->GetSize();
-          for (size_t i = 0; i < num_variables; ++i) {
-            Variable *variable = variable_list->GetVariableAtIndex(i).get();
+          for (VariableSP var_sp : *variable_list) {
 
-            if (!variable)
+            if (!var_sp)
               continue;
 
-            const char *variable_name = variable->GetName().AsCString();
-            if (strstr(variable_name, token.c_str()) == variable_name) {
-              if (strcmp(variable_name, token.c_str()) == 0) {
-                Type *variable_type = variable->GetType();
+            llvm::StringRef variable_name = var_sp->GetName().GetStringRef();
+            if (variable_name.startswith(token)) {
+              if (variable_name == token) {
+                Type *variable_type = var_sp->GetType();
                 if (variable_type) {
                   CompilerType variable_compiler_type(
                       variable_type->GetForwardCompilerType());
@@ -736,13 +716,12 @@
                       frame, remaining_partial_path,
                       prefix_path + token, // Anything that has been resolved
                                            // already will be in here
-                      variable_compiler_type.GetCanonicalType(), matches,
-                      word_complete);
+                      variable_compiler_type.GetCanonicalType(), request);
                 } else {
-                  matches.AppendString((prefix_path + variable_name).str());
+                  request.AddCompletion((prefix_path + variable_name).str());
                 }
               } else if (remaining_partial_path.empty()) {
-                matches.AppendString((prefix_path + variable_name).str());
+                request.AddCompletion((prefix_path + variable_name).str());
               }
             }
           }
@@ -753,16 +732,10 @@
   }
 }
 
-size_t Variable::AutoComplete(const ExecutionContext &exe_ctx,
-                              CompletionRequest &request) {
+void Variable::AutoComplete(const ExecutionContext &exe_ctx,
+                            CompletionRequest &request) {
   CompilerType compiler_type;
 
-  bool word_complete = false;
-  StringList matches;
   PrivateAutoComplete(exe_ctx.GetFramePtr(), request.GetCursorArgumentPrefix(),
-                      "", compiler_type, matches, word_complete);
-  request.SetWordComplete(word_complete);
-  request.AddCompletions(matches);
-
-  return request.GetNumberOfMatches();
+                      "", compiler_type, request);
 }
diff --git a/src/llvm-project/lldb/source/Symbol/VerifyDecl.cpp b/src/llvm-project/lldb/source/Symbol/VerifyDecl.cpp
deleted file mode 100644
index 1873d3a..0000000
--- a/src/llvm-project/lldb/source/Symbol/VerifyDecl.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-//===-- VerifyDecl.cpp ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Symbol/VerifyDecl.h"
-#include "clang/AST/DeclBase.h"
-
-void lldb_private::VerifyDecl(clang::Decl *decl) {
-  assert(decl && "VerifyDecl called with nullptr?");
-  decl->getAccess();
-}
diff --git a/src/llvm-project/lldb/source/Target/ABI.cpp b/src/llvm-project/lldb/source/Target/ABI.cpp
index 28cd9ae..58396ba 100644
--- a/src/llvm-project/lldb/source/Target/ABI.cpp
+++ b/src/llvm-project/lldb/source/Target/ABI.cpp
@@ -15,6 +15,8 @@
 #include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Utility/Log.h"
+#include "llvm/Support/TargetRegistry.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -61,24 +63,6 @@
   return false;
 }
 
-bool ABI::GetRegisterInfoByKind(RegisterKind reg_kind, uint32_t reg_num,
-                                RegisterInfo &info) {
-  if (reg_kind < eRegisterKindEHFrame || reg_kind >= kNumRegisterKinds)
-    return false;
-
-  uint32_t count = 0;
-  const RegisterInfo *register_info_array = GetRegisterInfoArray(count);
-  if (register_info_array) {
-    for (uint32_t i = 0; i < count; ++i) {
-      if (register_info_array[i].kinds[reg_kind] == reg_num) {
-        info = register_info_array[i];
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
 ValueObjectSP ABI::GetReturnValueObject(Thread &thread, CompilerType &ast_type,
                                         bool persistent) const {
   if (!ast_type.IsValid())
@@ -103,7 +87,7 @@
             ast_type.GetMinimumLanguage());
 
     if (!persistent_expression_state)
-      return ValueObjectSP();
+      return {};
 
     auto prefix = persistent_expression_state->GetPersistentVariablePrefix();
     ConstString persistent_variable_name =
@@ -210,3 +194,37 @@
 
   return false;
 }
+
+std::unique_ptr<llvm::MCRegisterInfo> ABI::MakeMCRegisterInfo(const ArchSpec &arch) {
+  std::string triple = arch.GetTriple().getTriple();
+  std::string lookup_error;
+  const llvm::Target *target =
+      llvm::TargetRegistry::lookupTarget(triple, lookup_error);
+  if (!target) {
+    LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS),
+             "Failed to create an llvm target for {0}: {1}", triple,
+             lookup_error);
+    return nullptr;
+  }
+  std::unique_ptr<llvm::MCRegisterInfo> info_up(
+      target->createMCRegInfo(triple));
+  assert(info_up);
+  return info_up;
+}
+
+void ABI::AugmentRegisterInfo(RegisterInfo &info) {
+  if (info.kinds[eRegisterKindEHFrame] != LLDB_INVALID_REGNUM &&
+      info.kinds[eRegisterKindDWARF] != LLDB_INVALID_REGNUM)
+    return;
+
+  RegisterInfo abi_info;
+  if (!GetRegisterInfoByName(ConstString(info.name), abi_info))
+    return;
+
+  if (info.kinds[eRegisterKindEHFrame] == LLDB_INVALID_REGNUM)
+    info.kinds[eRegisterKindEHFrame] = abi_info.kinds[eRegisterKindEHFrame];
+  if (info.kinds[eRegisterKindDWARF] == LLDB_INVALID_REGNUM)
+    info.kinds[eRegisterKindDWARF] = abi_info.kinds[eRegisterKindDWARF];
+  if (info.kinds[eRegisterKindGeneric] == LLDB_INVALID_REGNUM)
+    info.kinds[eRegisterKindGeneric] = abi_info.kinds[eRegisterKindGeneric];
+}
diff --git a/src/llvm-project/lldb/source/Target/CMakeLists.txt b/src/llvm-project/lldb/source/Target/CMakeLists.txt
index 2f59a48..a92951e 100644
--- a/src/llvm-project/lldb/source/Target/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Target/CMakeLists.txt
@@ -1,3 +1,11 @@
+lldb_tablegen(TargetProperties.inc -gen-lldb-property-defs
+  SOURCE TargetProperties.td
+  TARGET LLDBTargetPropertiesGen)
+
+lldb_tablegen(TargetPropertiesEnum.inc -gen-lldb-property-enum-defs
+  SOURCE TargetProperties.td
+  TARGET LLDBTargetPropertiesEnumGen)
+
 add_lldb_library(lldbTarget
   ABI.cpp
   ExecutionContext.cpp
@@ -9,6 +17,7 @@
   LanguageRuntime.cpp
   Memory.cpp
   MemoryHistory.cpp
+  MemoryRegionInfo.cpp
   ModuleCache.cpp
   OperatingSystem.cpp
   PathMappingList.cpp
@@ -70,3 +79,7 @@
   LINK_COMPONENTS
     Support
   )
+
+add_dependencies(lldbTarget
+  LLDBTargetPropertiesGen
+  LLDBTargetPropertiesEnumGen)
diff --git a/src/llvm-project/lldb/source/Target/ExecutionContext.cpp b/src/llvm-project/lldb/source/Target/ExecutionContext.cpp
index 7732737..a24a098 100644
--- a/src/llvm-project/lldb/source/Target/ExecutionContext.cpp
+++ b/src/llvm-project/lldb/source/Target/ExecutionContext.cpp
@@ -183,9 +183,9 @@
 
 lldb::ByteOrder ExecutionContext::GetByteOrder() const {
   if (m_target_sp && m_target_sp->GetArchitecture().IsValid())
-    m_target_sp->GetArchitecture().GetByteOrder();
+    return m_target_sp->GetArchitecture().GetByteOrder();
   if (m_process_sp)
-    m_process_sp->GetByteOrder();
+    return m_process_sp->GetByteOrder();
   return endian::InlHostByteOrder();
 }
 
diff --git a/src/llvm-project/lldb/source/Target/Language.cpp b/src/llvm-project/lldb/source/Target/Language.cpp
index 3c3ef28..10a9ddd 100644
--- a/src/llvm-project/lldb/source/Target/Language.cpp
+++ b/src/llvm-project/lldb/source/Target/Language.cpp
@@ -134,11 +134,6 @@
   return {};
 }
 
-HardcodedFormatters::HardcodedValidatorFinder
-Language::GetHardcodedValidators() {
-  return {};
-}
-
 std::vector<ConstString>
 Language::GetPossibleFormattersMatches(ValueObject &valobj,
                                        lldb::DynamicValueType use_dynamic) {
@@ -357,26 +352,16 @@
   return supported_languages;
 }
 
-void Language::GetLanguagesSupportingTypeSystems(
-    std::set<lldb::LanguageType> &languages,
-    std::set<lldb::LanguageType> &languages_for_expressions) {
-  uint32_t idx = 0;
-
-  while (TypeSystemEnumerateSupportedLanguages enumerate = PluginManager::
-             GetTypeSystemEnumerateSupportedLanguagesCallbackAtIndex(idx++)) {
-    (*enumerate)(languages, languages_for_expressions);
-  }
+LanguageSet Language::GetLanguagesSupportingTypeSystems() {
+  return PluginManager::GetAllTypeSystemSupportedLanguagesForTypes();
 }
 
-void Language::GetLanguagesSupportingREPLs(
-    std::set<lldb::LanguageType> &languages) {
-  uint32_t idx = 0;
+LanguageSet Language::GetLanguagesSupportingTypeSystemsForExpressions() {
+  return PluginManager::GetAllTypeSystemSupportedLanguagesForExpressions();
+}
 
-  while (REPLEnumerateSupportedLanguages enumerate =
-             PluginManager::GetREPLEnumerateSupportedLanguagesCallbackAtIndex(
-                 idx++)) {
-    (*enumerate)(languages);
-  }
+LanguageSet Language::GetLanguagesSupportingREPLs() {
+  return PluginManager::GetREPLAllTypeSystemSupportedLanguages();
 }
 
 std::unique_ptr<Language::TypeScavenger> Language::GetTypeScavenger() {
diff --git a/src/llvm-project/lldb/source/Target/LanguageRuntime.cpp b/src/llvm-project/lldb/source/Target/LanguageRuntime.cpp
index dd44158..32dd805 100644
--- a/src/llvm-project/lldb/source/Target/LanguageRuntime.cpp
+++ b/src/llvm-project/lldb/source/Target/LanguageRuntime.cpp
@@ -111,12 +111,11 @@
   ~ExceptionBreakpointResolver() override = default;
 
   Searcher::CallbackReturn SearchCallback(SearchFilter &filter,
-                                          SymbolContext &context, Address *addr,
-                                          bool containing) override {
+                                          SymbolContext &context,
+                                          Address *addr) override {
 
     if (SetActualResolver())
-      return m_actual_resolver_sp->SearchCallback(filter, context, addr,
-                                                  containing);
+      return m_actual_resolver_sp->SearchCallback(filter, context, addr);
     else
       return eCallbackReturnStop;
   }
@@ -156,8 +155,10 @@
 
 protected:
   BreakpointResolverSP CopyForBreakpoint(Breakpoint &breakpoint) override {
-    return BreakpointResolverSP(
+    BreakpointResolverSP ret_sp(
         new ExceptionBreakpointResolver(m_language, m_catch_bp, m_throw_bp));
+    ret_sp->SetBreakpoint(&breakpoint);
+    return ret_sp;
   }
 
   bool SetActualResolver() {
diff --git a/src/llvm-project/lldb/source/Target/Memory.cpp b/src/llvm-project/lldb/source/Target/Memory.cpp
index 31a3780..7c77cc0 100644
--- a/src/llvm-project/lldb/source/Target/Memory.cpp
+++ b/src/llvm-project/lldb/source/Target/Memory.cpp
@@ -348,10 +348,11 @@
 
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
   if (log) {
-    log->Printf("Process::DoAllocateMemory (byte_size = 0x%8.8" PRIx32
-                ", permissions = %s) => 0x%16.16" PRIx64,
-                (uint32_t)page_byte_size, GetPermissionsAsCString(permissions),
-                (uint64_t)addr);
+    LLDB_LOGF(log,
+              "Process::DoAllocateMemory (byte_size = 0x%8.8" PRIx32
+              ", permissions = %s) => 0x%16.16" PRIx64,
+              (uint32_t)page_byte_size, GetPermissionsAsCString(permissions),
+              (uint64_t)addr);
   }
 
   if (addr != LLDB_INVALID_ADDRESS) {
@@ -385,12 +386,11 @@
       addr = block_sp->ReserveBlock(byte_size);
   }
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf(
-        "AllocatedMemoryCache::AllocateMemory (byte_size = 0x%8.8" PRIx32
-        ", permissions = %s) => 0x%16.16" PRIx64,
-        (uint32_t)byte_size, GetPermissionsAsCString(permissions),
-        (uint64_t)addr);
+  LLDB_LOGF(log,
+            "AllocatedMemoryCache::AllocateMemory (byte_size = 0x%8.8" PRIx32
+            ", permissions = %s) => 0x%16.16" PRIx64,
+            (uint32_t)byte_size, GetPermissionsAsCString(permissions),
+            (uint64_t)addr);
   return addr;
 }
 
@@ -406,9 +406,9 @@
     }
   }
   Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("AllocatedMemoryCache::DeallocateMemory (addr = 0x%16.16" PRIx64
-                ") => %i",
-                (uint64_t)addr, success);
+  LLDB_LOGF(log,
+            "AllocatedMemoryCache::DeallocateMemory (addr = 0x%16.16" PRIx64
+            ") => %i",
+            (uint64_t)addr, success);
   return success;
 }
diff --git a/src/llvm-project/lldb/source/Target/MemoryRegionInfo.cpp b/src/llvm-project/lldb/source/Target/MemoryRegionInfo.cpp
new file mode 100644
index 0000000..2c31563
--- /dev/null
+++ b/src/llvm-project/lldb/source/Target/MemoryRegionInfo.cpp
@@ -0,0 +1,40 @@
+//===-- MemoryRegionInfo.cpp ------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Target/MemoryRegionInfo.h"
+
+using namespace lldb_private;
+
+llvm::raw_ostream &lldb_private::operator<<(llvm::raw_ostream &OS,
+                                            const MemoryRegionInfo &Info) {
+  return OS << llvm::formatv("MemoryRegionInfo([{0}, {1}), {2:r}{3:w}{4:x}, "
+                             "{5}, `{6}`, {7}, {8})",
+                             Info.GetRange().GetRangeBase(),
+                             Info.GetRange().GetRangeEnd(), Info.GetReadable(),
+                             Info.GetWritable(), Info.GetExecutable(),
+                             Info.GetMapped(), Info.GetName(), Info.GetFlash(),
+                             Info.GetBlocksize());
+}
+
+void llvm::format_provider<MemoryRegionInfo::OptionalBool>::format(
+    const MemoryRegionInfo::OptionalBool &B, raw_ostream &OS,
+    StringRef Options) {
+  assert(Options.size() <= 1);
+  bool Empty = Options.empty();
+  switch (B) {
+  case lldb_private::MemoryRegionInfo::eNo:
+    OS << (Empty ? "no" : "-");
+    return;
+  case lldb_private::MemoryRegionInfo::eYes:
+    OS << (Empty ? "yes" : Options);
+    return;
+  case lldb_private::MemoryRegionInfo::eDontKnow:
+    OS << (Empty ? "don't know" : "?");
+    return;
+  }
+}
diff --git a/src/llvm-project/lldb/source/Target/ModuleCache.cpp b/src/llvm-project/lldb/source/Target/ModuleCache.cpp
index 444c980..124cdac 100644
--- a/src/llvm-project/lldb/source/Target/ModuleCache.cpp
+++ b/src/llvm-project/lldb/source/Target/ModuleCache.cpp
@@ -48,7 +48,7 @@
 
 class ModuleLock {
 private:
-  File m_file;
+  FileUP m_file_up;
   std::unique_ptr<lldb_private::LockFile> m_lock;
   FileSpec m_file_spec;
 
@@ -94,9 +94,8 @@
   Status error;
   ModuleLock lock(root_dir_spec, module_uuid, error);
   if (error.Fail()) {
-    if (log)
-      log->Printf("Failed to lock module %s: %s",
-                  module_uuid.GetAsString().c_str(), error.AsCString());
+    LLDB_LOGF(log, "Failed to lock module %s: %s",
+              module_uuid.GetAsString().c_str(), error.AsCString());
   }
 
   namespace fs = llvm::sys::fs;
@@ -158,16 +157,19 @@
     return;
 
   m_file_spec = JoinPath(lock_dir_spec, uuid.GetAsString().c_str());
-  FileSystem::Instance().Open(m_file, m_file_spec,
-                              File::eOpenOptionWrite |
-                                  File::eOpenOptionCanCreate |
-                                  File::eOpenOptionCloseOnExec);
-  if (!m_file) {
-    error.SetErrorToErrno();
+
+  auto file = FileSystem::Instance().Open(
+      m_file_spec, File::eOpenOptionWrite | File::eOpenOptionCanCreate |
+                       File::eOpenOptionCloseOnExec);
+  if (file)
+    m_file_up = std::move(file.get());
+  else {
+    m_file_up.reset();
+    error = Status(file.takeError());
     return;
   }
 
-  m_lock.reset(new lldb_private::LockFile(m_file.GetDescriptor()));
+  m_lock.reset(new lldb_private::LockFile(m_file_up->GetDescriptor()));
   error = m_lock->WriteLock(0, 1);
   if (error.Fail())
     error.SetErrorStringWithFormat("Failed to lock file: %s",
@@ -175,10 +177,11 @@
 }
 
 void ModuleLock::Delete() {
-  if (!m_file)
+  if (!m_file_up)
     return;
 
-  m_file.Close();
+  m_file_up->Close();
+  m_file_up.reset();
   llvm::sys::fs::remove(m_file_spec.GetPath());
 }
 
diff --git a/src/llvm-project/lldb/source/Target/Platform.cpp b/src/llvm-project/lldb/source/Target/Platform.cpp
index 710f82e..aaf48f3 100644
--- a/src/llvm-project/lldb/source/Target/Platform.cpp
+++ b/src/llvm-project/lldb/source/Target/Platform.cpp
@@ -63,13 +63,13 @@
 
 namespace {
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"use-module-cache", OptionValue::eTypeBoolean, true, true, nullptr,
-     {}, "Use module cache."},
-    {"module-cache-directory", OptionValue::eTypeFileSpec, true, 0, nullptr,
-     {}, "Root directory for cached modules."}};
+#define LLDB_PROPERTIES_platform
+#include "TargetProperties.inc"
 
-enum { ePropertyUseModuleCache, ePropertyModuleCacheDirectory };
+enum {
+#define LLDB_PROPERTIES_platform
+#include "TargetPropertiesEnum.inc"
+};
 
 } // namespace
 
@@ -80,7 +80,7 @@
 
 PlatformProperties::PlatformProperties() {
   m_collection_sp = std::make_shared<OptionValueProperties>(GetSettingName());
-  m_collection_sp->Initialize(g_properties);
+  m_collection_sp->Initialize(g_platform_properties);
 
   auto module_cache_dir = GetModuleCacheDirectory();
   if (module_cache_dir)
@@ -99,7 +99,7 @@
 bool PlatformProperties::GetUseModuleCache() const {
   const auto idx = ePropertyUseModuleCache;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_platform_properties[idx].default_uint_value != 0);
 }
 
 bool PlatformProperties::SetUseModuleCache(bool use_module_cache) {
@@ -384,10 +384,9 @@
       m_rsync_opts(), m_rsync_prefix(), m_supports_ssh(false), m_ssh_opts(),
       m_ignores_remote_hostname(false), m_trap_handlers(),
       m_calculated_trap_handlers(false),
-      m_module_cache(llvm::make_unique<ModuleCache>()) {
+      m_module_cache(std::make_unique<ModuleCache>()) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p Platform::Platform()", static_cast<void *>(this));
+  LLDB_LOGF(log, "%p Platform::Platform()", static_cast<void *>(this));
 }
 
 /// Destructor.
@@ -396,8 +395,7 @@
 /// inherited from by the plug-in instance.
 Platform::~Platform() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p Platform::~Platform()", static_cast<void *>(this));
+  LLDB_LOGF(log, "%p Platform::~Platform()", static_cast<void *>(this));
 }
 
 void Platform::GetStatus(Stream &strm) {
@@ -408,7 +406,7 @@
   if (arch.IsValid()) {
     if (!arch.GetTriple().str().empty()) {
       strm.Printf("    Triple: ");
-      arch.DumpTriple(strm);
+      arch.DumpTriple(strm.AsRawOstream());
       strm.EOL();
     }
   }
@@ -637,9 +635,8 @@
   Status error;
 
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
-  if (log)
-    log->Printf("Platform::Install (src='%s', dst='%s')", src.GetPath().c_str(),
-                dst.GetPath().c_str());
+  LLDB_LOGF(log, "Platform::Install (src='%s', dst='%s')",
+            src.GetPath().c_str(), dst.GetPath().c_str());
   FileSpec fixed_dst(dst);
 
   if (!fixed_dst.GetFilename())
@@ -690,10 +687,9 @@
     }
   }
 
-  if (log)
-    log->Printf("Platform::Install (src='%s', dst='%s') fixed_dst='%s'",
-                src.GetPath().c_str(), dst.GetPath().c_str(),
-                fixed_dst.GetPath().c_str());
+  LLDB_LOGF(log, "Platform::Install (src='%s', dst='%s') fixed_dst='%s'",
+            src.GetPath().c_str(), dst.GetPath().c_str(),
+            fixed_dst.GetPath().c_str());
 
   if (GetSupportsRSync()) {
     error = PutFile(src, dst);
@@ -821,9 +817,8 @@
 
 bool Platform::SetRemoteWorkingDirectory(const FileSpec &working_dir) {
   Log *log = GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PLATFORM);
-  if (log)
-    log->Printf("Platform::SetRemoteWorkingDirectory('%s')",
-                working_dir.GetCString());
+  LLDB_LOGF(log, "Platform::SetRemoteWorkingDirectory('%s')",
+            working_dir.GetCString());
   m_working_dir = working_dir;
   return true;
 }
@@ -1010,8 +1005,7 @@
 Status Platform::LaunchProcess(ProcessLaunchInfo &launch_info) {
   Status error;
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  if (log)
-    log->Printf("Platform::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "Platform::%s()", __FUNCTION__);
 
   // Take care of the host case so that each subclass can just call this
   // function to get the host functionality.
@@ -1027,10 +1021,10 @@
       if (log) {
         const FileSpec &shell = launch_info.GetShell();
         std::string shell_str = (shell) ? shell.GetPath() : "<null>";
-        log->Printf(
-            "Platform::%s GetResumeCountForLaunchInfo() returned %" PRIu32
-            ", shell is '%s'",
-            __FUNCTION__, num_resumes, shell_str.c_str());
+        LLDB_LOGF(log,
+                  "Platform::%s GetResumeCountForLaunchInfo() returned %" PRIu32
+                  ", shell is '%s'",
+                  __FUNCTION__, num_resumes, shell_str.c_str());
       }
 
       if (!launch_info.ConvertArgumentsForLaunchingInShell(
@@ -1048,9 +1042,8 @@
       }
     }
 
-    if (log)
-      log->Printf("Platform::%s final launch_info resume count: %" PRIu32,
-                  __FUNCTION__, launch_info.GetResumeCount());
+    LLDB_LOGF(log, "Platform::%s final launch_info resume count: %" PRIu32,
+              __FUNCTION__, launch_info.GetResumeCount());
 
     error = Host::LaunchProcess(launch_info);
   } else
@@ -1067,8 +1060,7 @@
 
 Status Platform::KillProcess(const lldb::pid_t pid) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  if (log)
-    log->Printf("Platform::%s, pid %" PRIu64, __FUNCTION__, pid);
+  LLDB_LOGF(log, "Platform::%s, pid %" PRIu64, __FUNCTION__, pid);
 
   // Try to find a process plugin to handle this Kill request.  If we can't,
   // fall back to the default OS implementation.
@@ -1098,9 +1090,8 @@
                                        // new target, else use existing one
                        Status &error) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  if (log)
-    log->Printf("Platform::%s entered (target %p)", __FUNCTION__,
-                static_cast<void *>(target));
+  LLDB_LOGF(log, "Platform::%s entered (target %p)", __FUNCTION__,
+            static_cast<void *>(target));
 
   ProcessSP process_sp;
   // Make sure we stop at the entry point
@@ -1124,10 +1115,10 @@
       // Give this ProcessLaunchInfo filter a chance to adjust the launch info.
       error = (*filter_callback)(launch_info, target);
       if (!error.Success()) {
-        if (log)
-          log->Printf("Platform::%s() StructuredDataPlugin launch "
-                      "filter failed.",
-                      __FUNCTION__);
+        LLDB_LOGF(log,
+                  "Platform::%s() StructuredDataPlugin launch "
+                  "filter failed.",
+                  __FUNCTION__);
         return process_sp;
       }
     }
@@ -1135,17 +1126,15 @@
 
   error = LaunchProcess(launch_info);
   if (error.Success()) {
-    if (log)
-      log->Printf("Platform::%s LaunchProcess() call succeeded (pid=%" PRIu64
-                  ")",
-                  __FUNCTION__, launch_info.GetProcessID());
+    LLDB_LOGF(log,
+              "Platform::%s LaunchProcess() call succeeded (pid=%" PRIu64 ")",
+              __FUNCTION__, launch_info.GetProcessID());
     if (launch_info.GetProcessID() != LLDB_INVALID_PROCESS_ID) {
       ProcessAttachInfo attach_info(launch_info);
       process_sp = Attach(attach_info, debugger, target, error);
       if (process_sp) {
-        if (log)
-          log->Printf("Platform::%s Attach() succeeded, Process plugin: %s",
-                      __FUNCTION__, process_sp->GetPluginName().AsCString());
+        LLDB_LOGF(log, "Platform::%s Attach() succeeded, Process plugin: %s",
+                  __FUNCTION__, process_sp->GetPluginName().AsCString());
         launch_info.SetHijackListener(attach_info.GetHijackListener());
 
         // Since we attached to the process, it will think it needs to detach
@@ -1163,20 +1152,18 @@
           process_sp->SetSTDIOFileDescriptor(pty_fd);
         }
       } else {
-        if (log)
-          log->Printf("Platform::%s Attach() failed: %s", __FUNCTION__,
-                      error.AsCString());
+        LLDB_LOGF(log, "Platform::%s Attach() failed: %s", __FUNCTION__,
+                  error.AsCString());
       }
     } else {
-      if (log)
-        log->Printf("Platform::%s LaunchProcess() returned launch_info with "
-                    "invalid process id",
-                    __FUNCTION__);
+      LLDB_LOGF(log,
+                "Platform::%s LaunchProcess() returned launch_info with "
+                "invalid process id",
+                __FUNCTION__);
     }
   } else {
-    if (log)
-      log->Printf("Platform::%s LaunchProcess() failed: %s", __FUNCTION__,
-                  error.AsCString());
+    LLDB_LOGF(log, "Platform::%s LaunchProcess() failed: %s", __FUNCTION__,
+              error.AsCString());
   }
 
   return process_sp;
@@ -1231,30 +1218,28 @@
 Status Platform::PutFile(const FileSpec &source, const FileSpec &destination,
                          uint32_t uid, uint32_t gid) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PLATFORM));
-  if (log)
-    log->Printf("[PutFile] Using block by block transfer....\n");
+  LLDB_LOGF(log, "[PutFile] Using block by block transfer....\n");
 
-  uint32_t source_open_options =
+  auto source_open_options =
       File::eOpenOptionRead | File::eOpenOptionCloseOnExec;
   namespace fs = llvm::sys::fs;
   if (fs::is_symlink_file(source.GetPath()))
     source_open_options |= File::eOpenOptionDontFollowSymlinks;
 
-  File source_file;
-  Status error = FileSystem::Instance().Open(
-      source_file, source, source_open_options, lldb::eFilePermissionsUserRW);
-  uint32_t permissions = source_file.GetPermissions(error);
+  auto source_file = FileSystem::Instance().Open(source, source_open_options,
+                                                 lldb::eFilePermissionsUserRW);
+  if (!source_file)
+    return Status(source_file.takeError());
+  Status error;
+  uint32_t permissions = source_file.get()->GetPermissions(error);
   if (permissions == 0)
     permissions = lldb::eFilePermissionsFileDefault;
 
-  if (!source_file.IsValid())
-    return Status("PutFile: unable to open source file");
   lldb::user_id_t dest_file = OpenFile(
       destination, File::eOpenOptionCanCreate | File::eOpenOptionWrite |
                        File::eOpenOptionTruncate | File::eOpenOptionCloseOnExec,
       permissions, error);
-  if (log)
-    log->Printf("dest_file = %" PRIu64 "\n", dest_file);
+  LLDB_LOGF(log, "dest_file = %" PRIu64 "\n", dest_file);
 
   if (error.Fail())
     return error;
@@ -1264,7 +1249,7 @@
   uint64_t offset = 0;
   for (;;) {
     size_t bytes_read = buffer_sp->GetByteSize();
-    error = source_file.Read(buffer_sp->GetBytes(), bytes_read);
+    error = source_file.get()->Read(buffer_sp->GetBytes(), bytes_read);
     if (error.Fail() || bytes_read == 0)
       break;
 
@@ -1277,7 +1262,7 @@
     if (bytes_written != bytes_read) {
       // We didn't write the correct number of bytes, so adjust the file
       // position in the source file we are reading from...
-      source_file.SeekFromStart(offset);
+      source_file.get()->SeekFromStart(offset);
     }
   }
   CloseFile(dest_file, error);
@@ -1630,10 +1615,9 @@
   if (error.Success())
     return true;
 
-  if (log)
-    log->Printf("Platform::%s - module %s not found in local cache: %s",
-                __FUNCTION__, module_spec.GetUUID().GetAsString().c_str(),
-                error.AsCString());
+  LLDB_LOGF(log, "Platform::%s - module %s not found in local cache: %s",
+            __FUNCTION__, module_spec.GetUUID().GetAsString().c_str(),
+            error.AsCString());
   return false;
 }
 
@@ -1644,7 +1628,7 @@
   Status error;
 
   std::error_code EC;
-  llvm::raw_fd_ostream dst(dst_file_spec.GetPath(), EC, llvm::sys::fs::F_None);
+  llvm::raw_fd_ostream dst(dst_file_spec.GetPath(), EC, llvm::sys::fs::OF_None);
   if (EC) {
     error.SetErrorStringWithFormat("unable to open destination file: %s",
                                    dst_file_spec.GetPath().c_str());
@@ -1736,7 +1720,7 @@
         return LLDB_INVALID_IMAGE_TOKEN;
     }
     return DoLoadImage(process, target_file, nullptr, error);
-  } 
+  }
 
   if (remote_file) {
     // Only remote file was specified so we don't have to do any copying
@@ -1769,7 +1753,7 @@
                            remote_filename.GetPathStyle());
   else
     file_to_use = remote_filename;
-    
+
   return DoLoadImage(process, file_to_use, &paths, error, loaded_path);
 }
 
@@ -1812,8 +1796,7 @@
   if (!process_sp)
     return nullptr;
 
-  error =
-      process_sp->ConnectRemote(debugger.GetOutputFile().get(), connect_url);
+  error = process_sp->ConnectRemote(&debugger.GetOutputStream(), connect_url);
   if (error.Fail())
     return nullptr;
 
@@ -1833,12 +1816,19 @@
   size_t trap_opcode_size = 0;
 
   switch (arch.GetMachine()) {
+  case llvm::Triple::aarch64_32:
   case llvm::Triple::aarch64: {
     static const uint8_t g_aarch64_opcode[] = {0x00, 0x00, 0x20, 0xd4};
     trap_opcode = g_aarch64_opcode;
     trap_opcode_size = sizeof(g_aarch64_opcode);
   } break;
 
+  case llvm::Triple::arc: {
+    static const uint8_t g_hex_opcode[] = { 0xff, 0x7f };
+    trap_opcode = g_hex_opcode;
+    trap_opcode_size = sizeof(g_hex_opcode);
+  } break;
+
   // TODO: support big-endian arm and thumb trap codes.
   case llvm::Triple::arm: {
     // The ARM reference recommends the use of 0xe7fddefe and 0xdefe but the
diff --git a/src/llvm-project/lldb/source/Target/Process.cpp b/src/llvm-project/lldb/source/Target/Process.cpp
index 6c634db..6711dc3 100644
--- a/src/llvm-project/lldb/source/Target/Process.cpp
+++ b/src/llvm-project/lldb/source/Target/Process.cpp
@@ -13,7 +13,6 @@
 #include "llvm/Support/ScopedPrinter.h"
 #include "llvm/Support/Threading.h"
 
-#include "Plugins/Process/Utility/InferiorCallPOSIX.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
 #include "lldb/Breakpoint/StoppointCallbackContext.h"
 #include "lldb/Core/Debugger.h"
@@ -59,6 +58,7 @@
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadPlan.h"
 #include "lldb/Target/ThreadPlanBase.h"
+#include "lldb/Target/ThreadPlanCallFunction.h"
 #include "lldb/Target/UnixSignals.h"
 #include "lldb/Utility/Event.h"
 #include "lldb/Utility/Log.h"
@@ -112,55 +112,12 @@
   }
 };
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"disable-memory-cache", OptionValue::eTypeBoolean, false,
-     DISABLE_MEM_CACHE_DEFAULT, nullptr, {},
-     "Disable reading and caching of memory in fixed-size units."},
-    {"extra-startup-command", OptionValue::eTypeArray, false,
-     OptionValue::eTypeString, nullptr, {},
-     "A list containing extra commands understood by the particular process "
-     "plugin used.  "
-     "For instance, to turn on debugserver logging set this to "
-     "\"QSetLogging:bitmask=LOG_DEFAULT;\""},
-    {"ignore-breakpoints-in-expressions", OptionValue::eTypeBoolean, true, true,
-     nullptr, {},
-     "If true, breakpoints will be ignored during expression evaluation."},
-    {"unwind-on-error-in-expressions", OptionValue::eTypeBoolean, true, true,
-     nullptr, {}, "If true, errors in expression evaluation will unwind "
-                  "the stack back to the state before the call."},
-    {"python-os-plugin-path", OptionValue::eTypeFileSpec, false, true, nullptr,
-     {}, "A path to a python OS plug-in module file that contains a "
-         "OperatingSystemPlugIn class."},
-    {"stop-on-sharedlibrary-events", OptionValue::eTypeBoolean, true, false,
-     nullptr, {},
-     "If true, stop when a shared library is loaded or unloaded."},
-    {"detach-keeps-stopped", OptionValue::eTypeBoolean, true, false, nullptr,
-     {}, "If true, detach will attempt to keep the process stopped."},
-    {"memory-cache-line-size", OptionValue::eTypeUInt64, false, 512, nullptr,
-     {}, "The memory cache line size"},
-    {"optimization-warnings", OptionValue::eTypeBoolean, false, true, nullptr,
-     {}, "If true, warn when stopped in code that is optimized where "
-         "stepping and variable availability may not behave as expected."},
-    {"stop-on-exec", OptionValue::eTypeBoolean, true, true,
-     nullptr, {},
-     "If true, stop when a shared library is loaded or unloaded."},
-    {"utility-expression-timeout", OptionValue::eTypeUInt64, false, 15,
-     nullptr, {},
-     "The time in seconds to wait for LLDB-internal utility expressions."}
-};
+#define LLDB_PROPERTIES_process
+#include "TargetProperties.inc"
 
 enum {
-  ePropertyDisableMemCache,
-  ePropertyExtraStartCommand,
-  ePropertyIgnoreBreakpointsInExpressions,
-  ePropertyUnwindOnErrorInExpressions,
-  ePropertyPythonOSPluginPath,
-  ePropertyStopOnSharedLibraryEvents,
-  ePropertyDetachKeepsStopped,
-  ePropertyMemCacheLineSize,
-  ePropertyWarningOptimization,
-  ePropertyStopOnExec,
-  ePropertyUtilityExpressionTimeout,
+#define LLDB_PROPERTIES_process
+#include "TargetPropertiesEnum.inc"
 };
 
 ProcessProperties::ProcessProperties(lldb_private::Process *process)
@@ -171,7 +128,7 @@
     // Global process properties, set them up one time
     m_collection_sp =
         std::make_shared<ProcessOptionValueProperties>(ConstString("process"));
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_process_properties);
     m_collection_sp->AppendProperty(
         ConstString("thread"), ConstString("Settings specific to threads."),
         true, Thread::GetGlobalProperties()->GetValueProperties());
@@ -180,29 +137,22 @@
         Process::GetGlobalProperties().get());
     m_collection_sp->SetValueChangedCallback(
         ePropertyPythonOSPluginPath,
-        ProcessProperties::OptionValueChangedCallback, this);
+        [this] { m_process->LoadOperatingSystemPlugin(true); });
   }
 }
 
 ProcessProperties::~ProcessProperties() = default;
 
-void ProcessProperties::OptionValueChangedCallback(void *baton,
-                                                   OptionValue *option_value) {
-  ProcessProperties *properties = (ProcessProperties *)baton;
-  if (properties->m_process)
-    properties->m_process->LoadOperatingSystemPlugin(true);
-}
-
 bool ProcessProperties::GetDisableMemoryCache() const {
   const uint32_t idx = ePropertyDisableMemCache;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_process_properties[idx].default_uint_value != 0);
 }
 
 uint64_t ProcessProperties::GetMemoryCacheLineSize() const {
   const uint32_t idx = ePropertyMemCacheLineSize;
   return m_collection_sp->GetPropertyAtIndexAsUInt64(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_process_properties[idx].default_uint_value);
 }
 
 Args ProcessProperties::GetExtraStartupCommands() const {
@@ -230,7 +180,7 @@
 bool ProcessProperties::GetIgnoreBreakpointsInExpressions() const {
   const uint32_t idx = ePropertyIgnoreBreakpointsInExpressions;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_process_properties[idx].default_uint_value != 0);
 }
 
 void ProcessProperties::SetIgnoreBreakpointsInExpressions(bool ignore) {
@@ -241,7 +191,7 @@
 bool ProcessProperties::GetUnwindOnErrorInExpressions() const {
   const uint32_t idx = ePropertyUnwindOnErrorInExpressions;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_process_properties[idx].default_uint_value != 0);
 }
 
 void ProcessProperties::SetUnwindOnErrorInExpressions(bool ignore) {
@@ -252,7 +202,7 @@
 bool ProcessProperties::GetStopOnSharedLibraryEvents() const {
   const uint32_t idx = ePropertyStopOnSharedLibraryEvents;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_process_properties[idx].default_uint_value != 0);
 }
 
 void ProcessProperties::SetStopOnSharedLibraryEvents(bool stop) {
@@ -263,7 +213,7 @@
 bool ProcessProperties::GetDetachKeepsStopped() const {
   const uint32_t idx = ePropertyDetachKeepsStopped;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_process_properties[idx].default_uint_value != 0);
 }
 
 void ProcessProperties::SetDetachKeepsStopped(bool stop) {
@@ -274,19 +224,19 @@
 bool ProcessProperties::GetWarningsOptimization() const {
   const uint32_t idx = ePropertyWarningOptimization;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_process_properties[idx].default_uint_value != 0);
 }
 
 bool ProcessProperties::GetStopOnExec() const {
   const uint32_t idx = ePropertyStopOnExec;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_process_properties[idx].default_uint_value != 0);
 }
 
 std::chrono::seconds ProcessProperties::GetUtilityExpressionTimeout() const {
   const uint32_t idx = ePropertyUtilityExpressionTimeout;
   uint64_t value = m_collection_sp->GetPropertyAtIndexAsUInt64(
-     nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_process_properties[idx].default_uint_value);
   return std::chrono::seconds(value);
 }
 
@@ -544,8 +494,7 @@
   CheckInWithManager();
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p Process::Process()", static_cast<void *>(this));
+  LLDB_LOGF(log, "%p Process::Process()", static_cast<void *>(this));
 
   if (!m_unix_signals_sp)
     m_unix_signals_sp = std::make_shared<UnixSignals>();
@@ -593,8 +542,7 @@
 
 Process::~Process() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p Process::~Process()", static_cast<void *>(this));
+  LLDB_LOGF(log, "%p Process::~Process()", static_cast<void *>(this));
   StopPrivateStateThread();
 
   // ThreadList::Clear() will try to acquire this process's mutex, so
@@ -781,10 +729,10 @@
 
   if (!wait_always && StateIsStoppedState(state, true) &&
       StateIsStoppedState(GetPrivateState(), true)) {
-    if (log)
-      log->Printf("Process::%s returning without waiting for events; process "
-                  "private and public states are already 'stopped'.",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "Process::%s returning without waiting for events; process "
+              "private and public states are already 'stopped'.",
+              __FUNCTION__);
     // We need to toggle the run lock as this won't get done in
     // SetPublicState() if the process is hijacked.
     if (hijack_listener_sp && use_run_lock)
@@ -1073,19 +1021,17 @@
 Event *Process::PeekAtStateChangedEvents() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
-  if (log)
-    log->Printf("Process::%s...", __FUNCTION__);
+  LLDB_LOGF(log, "Process::%s...", __FUNCTION__);
 
   Event *event_ptr;
   event_ptr = m_listener_sp->PeekAtNextEventForBroadcasterWithType(
       this, eBroadcastBitStateChanged);
   if (log) {
     if (event_ptr) {
-      log->Printf(
-          "Process::%s (event_ptr) => %s", __FUNCTION__,
-          StateAsCString(ProcessEventData::GetStateFromEvent(event_ptr)));
+      LLDB_LOGF(log, "Process::%s (event_ptr) => %s", __FUNCTION__,
+                StateAsCString(ProcessEventData::GetStateFromEvent(event_ptr)));
     } else {
-      log->Printf("Process::%s no events found", __FUNCTION__);
+      LLDB_LOGF(log, "Process::%s no events found", __FUNCTION__);
     }
   }
   return event_ptr;
@@ -1149,17 +1095,14 @@
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_STATE |
                                                   LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf(
-        "Process::SetExitStatus (status=%i (0x%8.8x), description=%s%s%s)",
-        status, status, cstr ? "\"" : "", cstr ? cstr : "NULL",
-        cstr ? "\"" : "");
+  LLDB_LOGF(
+      log, "Process::SetExitStatus (status=%i (0x%8.8x), description=%s%s%s)",
+      status, status, cstr ? "\"" : "", cstr ? cstr : "NULL", cstr ? "\"" : "");
 
   // We were already in the exited state
   if (m_private_state.GetValue() == eStateExited) {
-    if (log)
-      log->Printf("Process::SetExitStatus () ignoring exit status because "
-                  "state was already set to eStateExited");
+    LLDB_LOGF(log, "Process::SetExitStatus () ignoring exit status because "
+                   "state was already set to eStateExited");
     return false;
   }
 
@@ -1207,10 +1150,10 @@
     int exit_status // Exit value of process if signal is zero
     ) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("Process::SetProcessExitStatus (pid=%" PRIu64
-                ", exited=%i, signal=%i, exit_status=%i)\n",
-                pid, exited, signo, exit_status);
+  LLDB_LOGF(log,
+            "Process::SetProcessExitStatus (pid=%" PRIu64
+            ", exited=%i, signal=%i, exit_status=%i)\n",
+            pid, exited, signo, exit_status);
 
   if (exited) {
     TargetSP target_sp(Debugger::FindTargetWithProcessID(pid));
@@ -1353,9 +1296,8 @@
 void Process::SetPublicState(StateType new_state, bool restarted) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_STATE |
                                                   LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("Process::SetPublicState (state = %s, restarted = %i)",
-                StateAsCString(new_state), restarted);
+  LLDB_LOGF(log, "Process::SetPublicState (state = %s, restarted = %i)",
+            StateAsCString(new_state), restarted);
   const StateType old_state = m_public_state.GetValue();
   m_public_state.SetValue(new_state);
 
@@ -1364,19 +1306,17 @@
   // program to run.
   if (!StateChangedIsExternallyHijacked()) {
     if (new_state == eStateDetached) {
-      if (log)
-        log->Printf(
-            "Process::SetPublicState (%s) -- unlocking run lock for detach",
-            StateAsCString(new_state));
+      LLDB_LOGF(log,
+                "Process::SetPublicState (%s) -- unlocking run lock for detach",
+                StateAsCString(new_state));
       m_public_run_lock.SetStopped();
     } else {
       const bool old_state_is_stopped = StateIsStoppedState(old_state, false);
       const bool new_state_is_stopped = StateIsStoppedState(new_state, false);
       if ((old_state_is_stopped != new_state_is_stopped)) {
         if (new_state_is_stopped && !restarted) {
-          if (log)
-            log->Printf("Process::SetPublicState (%s) -- unlocking run lock",
-                        StateAsCString(new_state));
+          LLDB_LOGF(log, "Process::SetPublicState (%s) -- unlocking run lock",
+                    StateAsCString(new_state));
           m_public_run_lock.SetStopped();
         }
       }
@@ -1387,12 +1327,10 @@
 Status Process::Resume() {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_STATE |
                                                   LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("Process::Resume -- locking run lock");
+  LLDB_LOGF(log, "Process::Resume -- locking run lock");
   if (!m_public_run_lock.TrySetRunning()) {
     Status error("Resume request failed - process still running.");
-    if (log)
-      log->Printf("Process::Resume: -- TrySetRunning failed, not resuming.");
+    LLDB_LOGF(log, "Process::Resume: -- TrySetRunning failed, not resuming.");
     return error;
   }
   Status error = PrivateResume();
@@ -1408,12 +1346,10 @@
 Status Process::ResumeSynchronous(Stream *stream) {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_STATE |
                                                   LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("Process::ResumeSynchronous -- locking run lock");
+  LLDB_LOGF(log, "Process::ResumeSynchronous -- locking run lock");
   if (!m_public_run_lock.TrySetRunning()) {
     Status error("Resume request failed - process still running.");
-    if (log)
-      log->Printf("Process::Resume: -- TrySetRunning failed, not resuming.");
+    LLDB_LOGF(log, "Process::Resume: -- TrySetRunning failed, not resuming.");
     return error;
   }
 
@@ -1472,8 +1408,7 @@
                                                   LIBLLDB_LOG_PROCESS));
   bool state_changed = false;
 
-  if (log)
-    log->Printf("Process::SetPrivateState (%s)", StateAsCString(new_state));
+  LLDB_LOGF(log, "Process::SetPrivateState (%s)", StateAsCString(new_state));
 
   std::lock_guard<std::recursive_mutex> thread_guard(m_thread_list.GetMutex());
   std::lock_guard<std::recursive_mutex> guard(m_private_state.GetMutex());
@@ -1512,9 +1447,8 @@
       if (!m_mod_id.IsLastResumeForUserExpression())
         m_mod_id.SetStopEventForLastNaturalStopID(event_sp);
       m_memory_cache.Clear();
-      if (log)
-        log->Printf("Process::SetPrivateState (%s) stop_id = %u",
-                    StateAsCString(new_state), m_mod_id.GetStopID());
+      LLDB_LOGF(log, "Process::SetPrivateState (%s) stop_id = %u",
+                StateAsCString(new_state), m_mod_id.GetStopID());
     }
 
     // Use our target to get a shared pointer to ourselves...
@@ -1523,10 +1457,9 @@
     else
       m_private_state_broadcaster.BroadcastEvent(event_sp);
   } else {
-    if (log)
-      log->Printf(
-          "Process::SetPrivateState (%s) state didn't change. Ignoring...",
-          StateAsCString(new_state));
+    LLDB_LOGF(log,
+              "Process::SetPrivateState (%s) state didn't change. Ignoring...",
+              StateAsCString(new_state));
   }
 }
 
@@ -1546,8 +1479,7 @@
   return m_abi_sp;
 }
 
-std::vector<LanguageRuntime *>
-Process::GetLanguageRuntimes(bool retry_if_null) {
+std::vector<LanguageRuntime *> Process::GetLanguageRuntimes() {
   std::vector<LanguageRuntime *> language_runtimes;
 
   if (m_finalizing)
@@ -1560,15 +1492,14 @@
   // yet or the proper condition for loading wasn't yet met (e.g. libc++.so
   // hadn't been loaded).
   for (const lldb::LanguageType lang_type : Language::GetSupportedLanguages()) {
-    if (LanguageRuntime *runtime = GetLanguageRuntime(lang_type, retry_if_null))
+    if (LanguageRuntime *runtime = GetLanguageRuntime(lang_type))
       language_runtimes.emplace_back(runtime);
   }
 
   return language_runtimes;
 }
 
-LanguageRuntime *Process::GetLanguageRuntime(lldb::LanguageType language,
-                                             bool retry_if_null) {
+LanguageRuntime *Process::GetLanguageRuntime(lldb::LanguageType language) {
   if (m_finalizing)
     return nullptr;
 
@@ -1577,7 +1508,7 @@
   std::lock_guard<std::recursive_mutex> guard(m_language_runtimes_mutex);
   LanguageRuntimeCollection::iterator pos;
   pos = m_language_runtimes.find(language);
-  if (pos == m_language_runtimes.end() || (retry_if_null && !pos->second)) {
+  if (pos == m_language_runtimes.end() || !pos->second) {
     lldb::LanguageRuntimeSP runtime_sp(
         LanguageRuntime::FindPlugin(this, language));
 
@@ -1709,7 +1640,7 @@
       Address symbol_address = symbol->GetAddress();
       load_addr = ResolveIndirectFunction(&symbol_address, error);
       if (!error.Success() && show_error) {
-        GetTarget().GetDebugger().GetErrorFile()->Printf(
+        GetTarget().GetDebugger().GetErrorStream().Printf(
             "warning: failed to resolve indirect function at 0x%" PRIx64
             " for breakpoint %i.%i: %s\n",
             symbol->GetLoadAddress(&GetTarget()),
@@ -1748,7 +1679,7 @@
         } else {
           if (show_error || use_hardware) {
             // Report error for setting breakpoint...
-            GetTarget().GetDebugger().GetErrorFile()->Printf(
+            GetTarget().GetDebugger().GetErrorStream().Printf(
                 "warning: failed to set breakpoint site at 0x%" PRIx64
                 " for breakpoint %i.%i: %s\n",
                 load_addr, owner->GetBreakpoint().GetID(), owner->GetID(),
@@ -1816,16 +1747,15 @@
   assert(bp_site != nullptr);
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
   const addr_t bp_addr = bp_site->GetLoadAddress();
-  if (log)
-    log->Printf(
-        "Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64,
-        bp_site->GetID(), (uint64_t)bp_addr);
+  LLDB_LOGF(
+      log, "Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64,
+      bp_site->GetID(), (uint64_t)bp_addr);
   if (bp_site->IsEnabled()) {
-    if (log)
-      log->Printf(
-          "Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64
-          " -- already enabled",
-          bp_site->GetID(), (uint64_t)bp_addr);
+    LLDB_LOGF(
+        log,
+        "Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64
+        " -- already enabled",
+        bp_site->GetID(), (uint64_t)bp_addr);
     return error;
   }
 
@@ -1864,10 +1794,10 @@
                        bp_opcode_size) == 0) {
             bp_site->SetEnabled(true);
             bp_site->SetType(BreakpointSite::eSoftware);
-            if (log)
-              log->Printf("Process::EnableSoftwareBreakpoint (site_id = %d) "
-                          "addr = 0x%" PRIx64 " -- SUCCESS",
-                          bp_site->GetID(), (uint64_t)bp_addr);
+            LLDB_LOGF(log,
+                      "Process::EnableSoftwareBreakpoint (site_id = %d) "
+                      "addr = 0x%" PRIx64 " -- SUCCESS",
+                      bp_site->GetID(), (uint64_t)bp_addr);
           } else
             error.SetErrorString(
                 "failed to verify the breakpoint trap in memory.");
@@ -1880,7 +1810,8 @@
       error.SetErrorString("Unable to read memory at breakpoint address.");
   }
   if (log && error.Fail())
-    log->Printf(
+    LLDB_LOGF(
+        log,
         "Process::EnableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64
         " -- FAILED: %s",
         bp_site->GetID(), (uint64_t)bp_addr, error.AsCString());
@@ -1893,10 +1824,10 @@
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
   addr_t bp_addr = bp_site->GetLoadAddress();
   lldb::user_id_t breakID = bp_site->GetID();
-  if (log)
-    log->Printf("Process::DisableSoftwareBreakpoint (breakID = %" PRIu64
-                ") addr = 0x%" PRIx64,
-                breakID, (uint64_t)bp_addr);
+  LLDB_LOGF(log,
+            "Process::DisableSoftwareBreakpoint (breakID = %" PRIu64
+            ") addr = 0x%" PRIx64,
+            breakID, (uint64_t)bp_addr);
 
   if (bp_site->IsHardware()) {
     error.SetErrorString("Breakpoint site is a hardware breakpoint.");
@@ -1943,10 +1874,10 @@
                          break_op_size) == 0) {
               // SUCCESS
               bp_site->SetEnabled(false);
-              if (log)
-                log->Printf("Process::DisableSoftwareBreakpoint (site_id = %d) "
-                            "addr = 0x%" PRIx64 " -- SUCCESS",
-                            bp_site->GetID(), (uint64_t)bp_addr);
+              LLDB_LOGF(log,
+                        "Process::DisableSoftwareBreakpoint (site_id = %d) "
+                        "addr = 0x%" PRIx64 " -- SUCCESS",
+                        bp_site->GetID(), (uint64_t)bp_addr);
               return error;
             } else {
               if (break_op_found)
@@ -1961,19 +1892,19 @@
             "Unable to read memory that should contain the breakpoint trap.");
     }
   } else {
-    if (log)
-      log->Printf(
-          "Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64
-          " -- already disabled",
-          bp_site->GetID(), (uint64_t)bp_addr);
+    LLDB_LOGF(
+        log,
+        "Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64
+        " -- already disabled",
+        bp_site->GetID(), (uint64_t)bp_addr);
     return error;
   }
 
-  if (log)
-    log->Printf(
-        "Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64
-        " -- FAILED: %s",
-        bp_site->GetID(), (uint64_t)bp_addr, error.AsCString());
+  LLDB_LOGF(
+      log,
+      "Process::DisableSoftwareBreakpoint (site_id = %d) addr = 0x%" PRIx64
+      " -- FAILED: %s",
+      bp_site->GetID(), (uint64_t)bp_addr, error.AsCString());
   return error;
 }
 
@@ -2371,13 +2302,13 @@
 #else
   addr_t allocated_addr = DoAllocateMemory(size, permissions, error);
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("Process::AllocateMemory(size=%" PRIu64
-                ", permissions=%s) => 0x%16.16" PRIx64
-                " (m_stop_id = %u m_memory_id = %u)",
-                (uint64_t)size, GetPermissionsAsCString(permissions),
-                (uint64_t)allocated_addr, m_mod_id.GetStopID(),
-                m_mod_id.GetMemoryID());
+  LLDB_LOGF(log,
+            "Process::AllocateMemory(size=%" PRIu64
+            ", permissions=%s) => 0x%16.16" PRIx64
+            " (m_stop_id = %u m_memory_id = %u)",
+            (uint64_t)size, GetPermissionsAsCString(permissions),
+            (uint64_t)allocated_addr, m_mod_id.GetStopID(),
+            m_mod_id.GetMemoryID());
   return allocated_addr;
 #endif
 }
@@ -2403,16 +2334,16 @@
 
     if (err.Success()) {
       m_can_jit = eCanJITYes;
-      if (log)
-        log->Printf("Process::%s pid %" PRIu64
-                    " allocation test passed, CanJIT () is true",
-                    __FUNCTION__, GetID());
+      LLDB_LOGF(log,
+                "Process::%s pid %" PRIu64
+                " allocation test passed, CanJIT () is true",
+                __FUNCTION__, GetID());
     } else {
       m_can_jit = eCanJITNo;
-      if (log)
-        log->Printf("Process::%s pid %" PRIu64
-                    " allocation test failed, CanJIT () is false: %s",
-                    __FUNCTION__, GetID(), err.AsCString());
+      LLDB_LOGF(log,
+                "Process::%s pid %" PRIu64
+                " allocation test failed, CanJIT () is false: %s",
+                __FUNCTION__, GetID(), err.AsCString());
     }
 
     DeallocateMemory(allocated_memory);
@@ -2441,11 +2372,11 @@
   error = DoDeallocateMemory(ptr);
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("Process::DeallocateMemory(addr=0x%16.16" PRIx64
-                ") => err = %s (m_stop_id = %u, m_memory_id = %u)",
-                ptr, error.AsCString("SUCCESS"), m_mod_id.GetStopID(),
-                m_mod_id.GetMemoryID());
+  LLDB_LOGF(log,
+            "Process::DeallocateMemory(addr=0x%16.16" PRIx64
+            ") => err = %s (m_stop_id = %u, m_memory_id = %u)",
+            ptr, error.AsCString("SUCCESS"), m_mod_id.GetStopID(),
+            m_mod_id.GetMemoryID());
 #endif
   return error;
 }
@@ -2455,8 +2386,9 @@
                                        size_t size_to_read) {
   Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
   if (log) {
-    log->Printf("Process::ReadModuleFromMemory reading %s binary from memory",
-                file_spec.GetPath().c_str());
+    LLDB_LOGF(log,
+              "Process::ReadModuleFromMemory reading %s binary from memory",
+              file_spec.GetPath().c_str());
   }
   ModuleSP module_sp(new Module(file_spec, ArchSpec()));
   if (module_sp) {
@@ -2691,9 +2623,8 @@
 
     if (!StateIsStoppedState(state, false)) {
       Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-      if (log)
-        log->Printf("Process::Halt() failed to stop, state is: %s",
-                    StateAsCString(state));
+      LLDB_LOGF(log, "Process::Halt() failed to stop, state is: %s",
+                StateAsCString(state));
       error.SetErrorString(
           "Did not get stopped event after loading the core file.");
     }
@@ -2728,10 +2659,10 @@
                                                           uint32_t exec_count)
     : NextEventAction(process), m_exec_count(exec_count) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf(
-        "Process::AttachCompletionHandler::%s process=%p, exec_count=%" PRIu32,
-        __FUNCTION__, static_cast<void *>(process), exec_count);
+  LLDB_LOGF(
+      log,
+      "Process::AttachCompletionHandler::%s process=%p, exec_count=%" PRIu32,
+      __FUNCTION__, static_cast<void *>(process), exec_count);
 }
 
 Process::NextEventAction::EventActionResult
@@ -2739,10 +2670,9 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
   StateType state = ProcessEventData::GetStateFromEvent(event_sp.get());
-  if (log)
-    log->Printf(
-        "Process::AttachCompletionHandler::%s called with state %s (%d)",
-        __FUNCTION__, StateAsCString(state), static_cast<int>(state));
+  LLDB_LOGF(log,
+            "Process::AttachCompletionHandler::%s called with state %s (%d)",
+            __FUNCTION__, StateAsCString(state), static_cast<int>(state));
 
   switch (state) {
   case eStateAttaching:
@@ -2764,18 +2694,18 @@
     if (m_exec_count > 0) {
       --m_exec_count;
 
-      if (log)
-        log->Printf("Process::AttachCompletionHandler::%s state %s: reduced "
-                    "remaining exec count to %" PRIu32 ", requesting resume",
-                    __FUNCTION__, StateAsCString(state), m_exec_count);
+      LLDB_LOGF(log,
+                "Process::AttachCompletionHandler::%s state %s: reduced "
+                "remaining exec count to %" PRIu32 ", requesting resume",
+                __FUNCTION__, StateAsCString(state), m_exec_count);
 
       RequestResume();
       return eEventActionRetry;
     } else {
-      if (log)
-        log->Printf("Process::AttachCompletionHandler::%s state %s: no more "
-                    "execs expected to start, continuing with attach",
-                    __FUNCTION__, StateAsCString(state));
+      LLDB_LOGF(log,
+                "Process::AttachCompletionHandler::%s state %s: no more "
+                "execs expected to start, continuing with attach",
+                __FUNCTION__, StateAsCString(state));
 
       m_process->CompleteAttach();
       return eEventActionSuccess;
@@ -2932,8 +2862,7 @@
 void Process::CompleteAttach() {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS |
                                                   LIBLLDB_LOG_TARGET));
-  if (log)
-    log->Printf("Process::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "Process::%s()", __FUNCTION__);
 
   // Let the process subclass figure out at much as it can about the process
   // before we go looking for a dynamic loader plug-in.
@@ -2944,9 +2873,10 @@
     GetTarget().SetArchitecture(process_arch);
     if (log) {
       const char *triple_str = process_arch.GetTriple().getTriple().c_str();
-      log->Printf("Process::%s replacing process architecture with DidAttach() "
-                  "architecture: %s",
-                  __FUNCTION__, triple_str ? triple_str : "<null>");
+      LLDB_LOGF(log,
+                "Process::%s replacing process architecture with DidAttach() "
+                "architecture: %s",
+                __FUNCTION__, triple_str ? triple_str : "<null>");
     }
   }
 
@@ -2965,11 +2895,11 @@
       if (platform_sp) {
         GetTarget().SetPlatform(platform_sp);
         GetTarget().SetArchitecture(platform_arch);
-        if (log)
-          log->Printf("Process::%s switching platform to %s and architecture "
-                      "to %s based on info from attach",
-                      __FUNCTION__, platform_sp->GetName().AsCString(""),
-                      platform_arch.GetTriple().getTriple().c_str());
+        LLDB_LOGF(log,
+                  "Process::%s switching platform to %s and architecture "
+                  "to %s based on info from attach",
+                  __FUNCTION__, platform_sp->GetName().AsCString(""),
+                  platform_arch.GetTriple().getTriple().c_str());
       }
     } else if (!process_arch.IsValid()) {
       ProcessInstanceInfo process_info;
@@ -2978,11 +2908,11 @@
       if (process_arch.IsValid() &&
           !GetTarget().GetArchitecture().IsExactMatch(process_arch)) {
         GetTarget().SetArchitecture(process_arch);
-        if (log)
-          log->Printf("Process::%s switching architecture to %s based on info "
-                      "the platform retrieved for pid %" PRIu64,
-                      __FUNCTION__,
-                      process_arch.GetTriple().getTriple().c_str(), GetID());
+        LLDB_LOGF(log,
+                  "Process::%s switching architecture to %s based on info "
+                  "the platform retrieved for pid %" PRIu64,
+                  __FUNCTION__, process_arch.GetTriple().getTriple().c_str(),
+                  GetID());
       }
     }
   }
@@ -2994,12 +2924,13 @@
     dyld->DidAttach();
     if (log) {
       ModuleSP exe_module_sp = GetTarget().GetExecutableModule();
-      log->Printf("Process::%s after DynamicLoader::DidAttach(), target "
-                  "executable is %s (using %s plugin)",
-                  __FUNCTION__,
-                  exe_module_sp ? exe_module_sp->GetFileSpec().GetPath().c_str()
-                                : "<none>",
-                  dyld->GetPluginName().AsCString("<unnamed>"));
+      LLDB_LOGF(log,
+                "Process::%s after DynamicLoader::DidAttach(), target "
+                "executable is %s (using %s plugin)",
+                __FUNCTION__,
+                exe_module_sp ? exe_module_sp->GetFileSpec().GetPath().c_str()
+                              : "<none>",
+                dyld->GetPluginName().AsCString("<unnamed>"));
     }
   }
 
@@ -3010,12 +2941,13 @@
     system_runtime->DidAttach();
     if (log) {
       ModuleSP exe_module_sp = GetTarget().GetExecutableModule();
-      log->Printf("Process::%s after SystemRuntime::DidAttach(), target "
-                  "executable is %s (using %s plugin)",
-                  __FUNCTION__,
-                  exe_module_sp ? exe_module_sp->GetFileSpec().GetPath().c_str()
-                                : "<none>",
-                  system_runtime->GetPluginName().AsCString("<unnamed>"));
+      LLDB_LOGF(log,
+                "Process::%s after SystemRuntime::DidAttach(), target "
+                "executable is %s (using %s plugin)",
+                __FUNCTION__,
+                exe_module_sp ? exe_module_sp->GetFileSpec().GetPath().c_str()
+                              : "<none>",
+                system_runtime->GetPluginName().AsCString("<unnamed>"));
     }
   }
 
@@ -3048,7 +2980,8 @@
                                     eLoadDependentsNo);
     if (log) {
       ModuleSP exe_module_sp = GetTarget().GetExecutableModule();
-      log->Printf(
+      LLDB_LOGF(
+          log,
           "Process::%s after looping through modules, target executable is %s",
           __FUNCTION__,
           exe_module_sp ? exe_module_sp->GetFileSpec().GetPath().c_str()
@@ -3092,11 +3025,11 @@
 Status Process::PrivateResume() {
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS |
                                                   LIBLLDB_LOG_STEP));
-  if (log)
-    log->Printf("Process::PrivateResume() m_stop_id = %u, public state: %s "
-                "private state: %s",
-                m_mod_id.GetStopID(), StateAsCString(m_public_state.GetValue()),
-                StateAsCString(m_private_state.GetValue()));
+  LLDB_LOGF(log,
+            "Process::PrivateResume() m_stop_id = %u, public state: %s "
+            "private state: %s",
+            m_mod_id.GetStopID(), StateAsCString(m_public_state.GetValue()),
+            StateAsCString(m_private_state.GetValue()));
 
   // If signals handing status changed we might want to update our signal
   // filters before resuming.
@@ -3123,12 +3056,9 @@
         if (error.Success()) {
           DidResume();
           m_thread_list.DidResume();
-          if (log)
-            log->Printf("Process thinks the process has resumed.");
+          LLDB_LOGF(log, "Process thinks the process has resumed.");
         } else {
-          if (log)
-            log->Printf(
-                "Process::PrivateResume() DoResume failed.");
+          LLDB_LOGF(log, "Process::PrivateResume() DoResume failed.");
           return error;
         }
       }
@@ -3137,16 +3067,15 @@
       // from one frame of a set of inlined frames that share the same PC to
       // another.)  So generate a continue & a stopped event, and let the world
       // handle them.
-      if (log)
-        log->Printf(
-            "Process::PrivateResume() asked to simulate a start & stop.");
+      LLDB_LOGF(log,
+                "Process::PrivateResume() asked to simulate a start & stop.");
 
       SetPrivateState(eStateRunning);
       SetPrivateState(eStateStopped);
     }
-  } else if (log)
-    log->Printf("Process::PrivateResume() got an error \"%s\".",
-                error.AsCString("<unknown error>"));
+  } else
+    LLDB_LOGF(log, "Process::PrivateResume() got an error \"%s\".",
+              error.AsCString("<unknown error>"));
   return error;
 }
 
@@ -3199,8 +3128,7 @@
   if (m_public_state.GetValue() == eStateRunning ||
       m_private_state.GetValue() == eStateRunning) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-    if (log)
-      log->Printf("Process::%s() About to stop.", __FUNCTION__);
+    LLDB_LOGF(log, "Process::%s() About to stop.", __FUNCTION__);
 
     ListenerSP listener_sp(
         Listener::MakeListener("lldb.Process.StopForDestroyOrDetach.hijack"));
@@ -3220,17 +3148,15 @@
     // anymore...
 
     if (state == eStateExited || m_private_state.GetValue() == eStateExited) {
-      if (log)
-        log->Printf("Process::%s() Process exited while waiting to stop.",
-                    __FUNCTION__);
+      LLDB_LOGF(log, "Process::%s() Process exited while waiting to stop.",
+                __FUNCTION__);
       return error;
     } else
       exit_event_sp.reset(); // It is ok to consume any non-exit stop events
 
     if (state != eStateStopped) {
-      if (log)
-        log->Printf("Process::%s() failed to stop, state is: %s", __FUNCTION__,
-                    StateAsCString(state));
+      LLDB_LOGF(log, "Process::%s() failed to stop, state is: %s", __FUNCTION__,
+                StateAsCString(state));
       // If we really couldn't stop the process then we should just error out
       // here, but if the lower levels just bobbled sending the event and we
       // really are stopped, then continue on.
@@ -3475,10 +3401,10 @@
     m_stdio_communication.SynchronizeWithReadThread();
     RefreshStateAfterStop();
     if (ProcessEventData::GetInterruptedFromEvent(event_ptr)) {
-      if (log)
-        log->Printf("Process::ShouldBroadcastEvent (%p) stopped due to an "
-                    "interrupt, state: %s",
-                    static_cast<void *>(event_ptr), StateAsCString(state));
+      LLDB_LOGF(log,
+                "Process::ShouldBroadcastEvent (%p) stopped due to an "
+                "interrupt, state: %s",
+                static_cast<void *>(event_ptr), StateAsCString(state));
       // Even though we know we are going to stop, we should let the threads
       // have a look at the stop, so they can properly set their state.
       m_thread_list.ShouldStop(event_ptr);
@@ -3496,11 +3422,11 @@
 
       if (was_restarted || should_resume || m_resume_requested) {
         Vote stop_vote = m_thread_list.ShouldReportStop(event_ptr);
-        if (log)
-          log->Printf("Process::ShouldBroadcastEvent: should_resume: %i state: "
-                      "%s was_restarted: %i stop_vote: %d.",
-                      should_resume, StateAsCString(state), was_restarted,
-                      stop_vote);
+        LLDB_LOGF(log,
+                  "Process::ShouldBroadcastEvent: should_resume: %i state: "
+                  "%s was_restarted: %i stop_vote: %d.",
+                  should_resume, StateAsCString(state), was_restarted,
+                  stop_vote);
 
         switch (stop_vote) {
         case eVoteYes:
@@ -3513,10 +3439,10 @@
         }
 
         if (!was_restarted) {
-          if (log)
-            log->Printf("Process::ShouldBroadcastEvent (%p) Restarting process "
-                        "from state: %s",
-                        static_cast<void *>(event_ptr), StateAsCString(state));
+          LLDB_LOGF(log,
+                    "Process::ShouldBroadcastEvent (%p) Restarting process "
+                    "from state: %s",
+                    static_cast<void *>(event_ptr), StateAsCString(state));
           ProcessEventData::SetRestartedInEvent(event_ptr, true);
           PrivateResume();
         }
@@ -3543,12 +3469,12 @@
   if (return_value)
     m_last_broadcast_state = state;
 
-  if (log)
-    log->Printf("Process::ShouldBroadcastEvent (%p) => new state: %s, last "
-                "broadcast state: %s - %s",
-                static_cast<void *>(event_ptr), StateAsCString(state),
-                StateAsCString(m_last_broadcast_state),
-                return_value ? "YES" : "NO");
+  LLDB_LOGF(log,
+            "Process::ShouldBroadcastEvent (%p) => new state: %s, last "
+            "broadcast state: %s - %s",
+            static_cast<void *>(event_ptr), StateAsCString(state),
+            StateAsCString(m_last_broadcast_state),
+            return_value ? "YES" : "NO");
   return return_value;
 }
 
@@ -3556,10 +3482,9 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS));
 
   bool already_running = PrivateStateThreadIsValid();
-  if (log)
-    log->Printf("Process::%s()%s ", __FUNCTION__,
-                already_running ? " already running"
-                                : " starting private state thread");
+  LLDB_LOGF(log, "Process::%s()%s ", __FUNCTION__,
+            already_running ? " already running"
+                            : " starting private state thread");
 
   if (!is_secondary_thread && already_running)
     return true;
@@ -3617,9 +3542,9 @@
     ControlPrivateStateThread(eBroadcastInternalStateControlStop);
   else {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-    if (log)
-      log->Printf(
-          "Went to stop the private state thread, but it was already invalid.");
+    LLDB_LOGF(
+        log,
+        "Went to stop the private state thread, but it was already invalid.");
   }
 }
 
@@ -3630,8 +3555,7 @@
          signal == eBroadcastInternalStateControlPause ||
          signal == eBroadcastInternalStateControlResume);
 
-  if (log)
-    log->Printf("Process::%s (signal = %d)", __FUNCTION__, signal);
+  LLDB_LOGF(log, "Process::%s (signal = %d)", __FUNCTION__, signal);
 
   // Signal the private state thread
   if (m_private_state_thread.IsJoinable()) {
@@ -3640,8 +3564,7 @@
     // possible that the thread state is invalid but that the thread is waiting
     // on a control event instead of simply being on its way out (this should
     // not happen, but it apparently can).
-    if (log)
-      log->Printf("Sending control event of type: %d.", signal);
+    LLDB_LOGF(log, "Sending control event of type: %d.", signal);
     std::shared_ptr<EventDataReceipt> event_receipt_sp(new EventDataReceipt());
     m_private_state_control_broadcaster.BroadcastEvent(signal,
                                                        event_receipt_sp);
@@ -3669,9 +3592,9 @@
       m_private_state_thread.Reset();
     }
   } else {
-    if (log)
-      log->Printf(
-          "Private state thread already dead, no need to signal it to stop.");
+    LLDB_LOGF(
+        log,
+        "Private state thread already dead, no need to signal it to stop.");
   }
 }
 
@@ -3694,8 +3617,7 @@
   if (m_next_event_action_up) {
     NextEventAction::EventActionResult action_result =
         m_next_event_action_up->PerformAction(event_sp);
-    if (log)
-      log->Printf("Ran next event action, result was %d.", action_result);
+    LLDB_LOGF(log, "Ran next event action, result was %d.", action_result);
 
     switch (action_result) {
     case NextEventAction::eEventActionSuccess:
@@ -3726,11 +3648,12 @@
   if (should_broadcast) {
     const bool is_hijacked = IsHijackedForEvent(eBroadcastBitStateChanged);
     if (log) {
-      log->Printf("Process::%s (pid = %" PRIu64
-                  ") broadcasting new state %s (old state %s) to %s",
-                  __FUNCTION__, GetID(), StateAsCString(new_state),
-                  StateAsCString(GetState()),
-                  is_hijacked ? "hijacked" : "public");
+      LLDB_LOGF(log,
+                "Process::%s (pid = %" PRIu64
+                ") broadcasting new state %s (old state %s) to %s",
+                __FUNCTION__, GetID(), StateAsCString(new_state),
+                StateAsCString(GetState()),
+                is_hijacked ? "hijacked" : "public");
     }
     Process::ProcessEventData::SetUpdateStateOnRemoval(event_sp.get());
     if (StateIsRunningState(new_state)) {
@@ -3742,9 +3665,8 @@
         PushProcessIOHandler();
         m_iohandler_sync.SetValue(m_iohandler_sync.GetValue() + 1,
                                   eBroadcastAlways);
-        if (log)
-          log->Printf("Process::%s updated m_iohandler_sync to %d",
-                      __FUNCTION__, m_iohandler_sync.GetValue());
+        LLDB_LOGF(log, "Process::%s updated m_iohandler_sync to %d",
+                  __FUNCTION__, m_iohandler_sync.GetValue());
       }
     } else if (StateIsStoppedState(new_state, false)) {
       if (!Process::ProcessEventData::GetRestartedFromEvent(event_sp.get())) {
@@ -3785,7 +3707,8 @@
     BroadcastEvent(event_sp);
   } else {
     if (log) {
-      log->Printf(
+      LLDB_LOGF(
+          log,
           "Process::%s (pid = %" PRIu64
           ") suppressing state %s (old state %s): should_broadcast == false",
           __FUNCTION__, GetID(), StateAsCString(new_state),
@@ -3820,9 +3743,8 @@
   bool control_only = true;
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("Process::%s (arg = %p, pid = %" PRIu64 ") thread starting...",
-                __FUNCTION__, static_cast<void *>(this), GetID());
+  LLDB_LOGF(log, "Process::%s (arg = %p, pid = %" PRIu64 ") thread starting...",
+            __FUNCTION__, static_cast<void *>(this), GetID());
 
   bool exit_now = false;
   bool interrupt_requested = false;
@@ -3830,11 +3752,11 @@
     EventSP event_sp;
     GetEventsPrivate(event_sp, llvm::None, control_only);
     if (event_sp->BroadcasterIs(&m_private_state_control_broadcaster)) {
-      if (log)
-        log->Printf("Process::%s (arg = %p, pid = %" PRIu64
-                    ") got a control event: %d",
-                    __FUNCTION__, static_cast<void *>(this), GetID(),
-                    event_sp->GetType());
+      LLDB_LOGF(log,
+                "Process::%s (arg = %p, pid = %" PRIu64
+                ") got a control event: %d",
+                __FUNCTION__, static_cast<void *>(this), GetID(),
+                event_sp->GetType());
 
       switch (event_sp->GetType()) {
       case eBroadcastInternalStateControlStop:
@@ -3853,23 +3775,24 @@
       continue;
     } else if (event_sp->GetType() == eBroadcastBitInterrupt) {
       if (m_public_state.GetValue() == eStateAttaching) {
-        if (log)
-          log->Printf("Process::%s (arg = %p, pid = %" PRIu64
-                      ") woke up with an interrupt while attaching - "
-                      "forwarding interrupt.",
-                      __FUNCTION__, static_cast<void *>(this), GetID());
+        LLDB_LOGF(log,
+                  "Process::%s (arg = %p, pid = %" PRIu64
+                  ") woke up with an interrupt while attaching - "
+                  "forwarding interrupt.",
+                  __FUNCTION__, static_cast<void *>(this), GetID());
         BroadcastEvent(eBroadcastBitInterrupt, nullptr);
       } else if (StateIsRunningState(m_last_broadcast_state)) {
-        if (log)
-          log->Printf("Process::%s (arg = %p, pid = %" PRIu64
-                      ") woke up with an interrupt - Halting.",
-                      __FUNCTION__, static_cast<void *>(this), GetID());
+        LLDB_LOGF(log,
+                  "Process::%s (arg = %p, pid = %" PRIu64
+                  ") woke up with an interrupt - Halting.",
+                  __FUNCTION__, static_cast<void *>(this), GetID());
         Status error = HaltPrivate();
         if (error.Fail() && log)
-          log->Printf("Process::%s (arg = %p, pid = %" PRIu64
-                      ") failed to halt the process: %s",
-                      __FUNCTION__, static_cast<void *>(this), GetID(),
-                      error.AsCString());
+          LLDB_LOGF(log,
+                    "Process::%s (arg = %p, pid = %" PRIu64
+                    ") failed to halt the process: %s",
+                    __FUNCTION__, static_cast<void *>(this), GetID(),
+                    error.AsCString());
         // Halt should generate a stopped event. Make a note of the fact that
         // we were doing the interrupt, so we can set the interrupted flag
         // after we receive the event. We deliberately set this to true even if
@@ -3883,10 +3806,9 @@
         // request. We use m_last_broadcast_state, because the Stopped event
         // may not have been popped of the event queue yet, which is when the
         // public state gets updated.
-        if (log)
-          log->Printf(
-              "Process::%s ignoring interrupt as we have already stopped.",
-              __FUNCTION__);
+        LLDB_LOGF(log,
+                  "Process::%s ignoring interrupt as we have already stopped.",
+                  __FUNCTION__);
       }
       continue;
     }
@@ -3908,9 +3830,10 @@
           ProcessEventData::SetInterruptedInEvent(event_sp.get(), true);
           interrupt_requested = false;
         } else if (log) {
-          log->Printf("Process::%s interrupt_requested, but a non-stopped "
-                      "state '%s' received.",
-                      __FUNCTION__, StateAsCString(internal_state));
+          LLDB_LOGF(log,
+                    "Process::%s interrupt_requested, but a non-stopped "
+                    "state '%s' received.",
+                    __FUNCTION__, StateAsCString(internal_state));
         }
       }
 
@@ -3919,20 +3842,19 @@
 
     if (internal_state == eStateInvalid || internal_state == eStateExited ||
         internal_state == eStateDetached) {
-      if (log)
-        log->Printf("Process::%s (arg = %p, pid = %" PRIu64
-                    ") about to exit with internal state %s...",
-                    __FUNCTION__, static_cast<void *>(this), GetID(),
-                    StateAsCString(internal_state));
+      LLDB_LOGF(log,
+                "Process::%s (arg = %p, pid = %" PRIu64
+                ") about to exit with internal state %s...",
+                __FUNCTION__, static_cast<void *>(this), GetID(),
+                StateAsCString(internal_state));
 
       break;
     }
   }
 
   // Verify log is still enabled before attempting to write to it...
-  if (log)
-    log->Printf("Process::%s (arg = %p, pid = %" PRIu64 ") thread exiting...",
-                __FUNCTION__, static_cast<void *>(this), GetID());
+  LLDB_LOGF(log, "Process::%s (arg = %p, pid = %" PRIu64 ") thread exiting...",
+            __FUNCTION__, static_cast<void *>(this), GetID());
 
   // If we are a secondary thread, then the primary thread we are working for
   // will have already acquired the public_run_lock, and isn't done with what
@@ -4042,10 +3964,10 @@
       if (curr_thread_list.GetSize() != num_threads) {
         Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_STEP |
                                                         LIBLLDB_LOG_PROCESS));
-        if (log)
-          log->Printf(
-              "Number of threads changed from %u to %u while processing event.",
-              num_threads, curr_thread_list.GetSize());
+        LLDB_LOGF(
+            log,
+            "Number of threads changed from %u to %u while processing event.",
+            num_threads, curr_thread_list.GetSize());
         break;
       }
 
@@ -4054,10 +3976,10 @@
       if (thread_sp->GetIndexID() != thread_index_array[idx]) {
         Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_STEP |
                                                         LIBLLDB_LOG_PROCESS));
-        if (log)
-          log->Printf("The thread at position %u changed from %u to %u while "
-                      "processing event.",
-                      idx, thread_index_array[idx], thread_sp->GetIndexID());
+        LLDB_LOGF(log,
+                  "The thread at position %u changed from %u to %u while "
+                  "processing event.",
+                  idx, thread_index_array[idx], thread_sp->GetIndexID());
         break;
       }
 
@@ -4303,9 +4225,8 @@
   size_t bytes_available = one_profile_data.size();
   if (bytes_available > 0) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-    if (log)
-      log->Printf("Process::GetProfileData (buf = %p, size = %" PRIu64 ")",
-                  static_cast<void *>(buf), static_cast<uint64_t>(buf_size));
+    LLDB_LOGF(log, "Process::GetProfileData (buf = %p, size = %" PRIu64 ")",
+              static_cast<void *>(buf), static_cast<uint64_t>(buf_size));
     if (bytes_available > buf_size) {
       memcpy(buf, one_profile_data.c_str(), buf_size);
       one_profile_data.erase(0, buf_size);
@@ -4325,9 +4246,8 @@
   size_t bytes_available = m_stdout_data.size();
   if (bytes_available > 0) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-    if (log)
-      log->Printf("Process::GetSTDOUT (buf = %p, size = %" PRIu64 ")",
-                  static_cast<void *>(buf), static_cast<uint64_t>(buf_size));
+    LLDB_LOGF(log, "Process::GetSTDOUT (buf = %p, size = %" PRIu64 ")",
+              static_cast<void *>(buf), static_cast<uint64_t>(buf_size));
     if (bytes_available > buf_size) {
       memcpy(buf, m_stdout_data.c_str(), buf_size);
       m_stdout_data.erase(0, buf_size);
@@ -4345,9 +4265,8 @@
   size_t bytes_available = m_stderr_data.size();
   if (bytes_available > 0) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-    if (log)
-      log->Printf("Process::GetSTDERR (buf = %p, size = %" PRIu64 ")",
-                  static_cast<void *>(buf), static_cast<uint64_t>(buf_size));
+    LLDB_LOGF(log, "Process::GetSTDERR (buf = %p, size = %" PRIu64 ")",
+              static_cast<void *>(buf), static_cast<uint64_t>(buf_size));
     if (bytes_available > buf_size) {
       memcpy(buf, m_stderr_data.c_str(), buf_size);
       m_stderr_data.erase(0, buf_size);
@@ -4371,9 +4290,10 @@
   IOHandlerProcessSTDIO(Process *process, int write_fd)
       : IOHandler(process->GetTarget().GetDebugger(),
                   IOHandler::Type::ProcessIO),
-        m_process(process), m_write_file(write_fd, false) {
+        m_process(process),
+        m_read_file(GetInputFD(), File::eOpenOptionRead, false),
+        m_write_file(write_fd, File::eOpenOptionWrite, false) {
     m_pipe.CreateNew(false);
-    m_read_file.SetDescriptor(GetInputFD(), false);
   }
 
   ~IOHandlerProcessSTDIO() override = default;
@@ -4493,9 +4413,9 @@
 
 protected:
   Process *m_process;
-  File m_read_file;  // Read from this file (usually actual STDIN for LLDB
-  File m_write_file; // Write to this file (usually the master pty for getting
-                     // io to debuggee)
+  NativeFile m_read_file;  // Read from this file (usually actual STDIN for LLDB
+  NativeFile m_write_file; // Write to this file (usually the master pty for
+                           // getting io to debuggee)
   Pipe m_pipe;
   std::atomic<bool> m_is_running{false};
 };
@@ -4532,8 +4452,7 @@
   IOHandlerSP io_handler_sp(m_process_input_reader);
   if (io_handler_sp) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-    if (log)
-      log->Printf("Process::%s pushing IO handler", __FUNCTION__);
+    LLDB_LOGF(log, "Process::%s pushing IO handler", __FUNCTION__);
 
     io_handler_sp->SetIsDone(false);
     // If we evaluate an utility function, then we don't cancel the current
@@ -4797,9 +4716,8 @@
     // public events. The simplest thing to do is to spin up a temporary thread
     // to handle private state thread events while we are fielding public
     // events here.
-    if (log)
-      log->Printf("Running thread plan on private state thread, spinning up "
-                  "another state thread to handle the events.");
+    LLDB_LOGF(log, "Running thread plan on private state thread, spinning up "
+                   "another state thread to handle the events.");
 
     backup_private_state_thread = m_private_state_thread;
 
@@ -4854,9 +4772,10 @@
     if (log) {
       StreamString s;
       thread_plan_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
-      log->Printf("Process::RunThreadPlan(): Resuming thread %u - 0x%4.4" PRIx64
-                  " to run thread plan \"%s\".",
-                  thread->GetIndexID(), thread->GetID(), s.GetData());
+      LLDB_LOGF(log,
+                "Process::RunThreadPlan(): Resuming thread %u - 0x%4.4" PRIx64
+                " to run thread plan \"%s\".",
+                thread->GetIndexID(), thread->GetID(), s.GetData());
     }
 
     bool got_event;
@@ -4877,10 +4796,9 @@
     if (!options.GetStopOthers() || !options.GetTryAllThreads())
       before_first_timeout = false;
 
-    if (log)
-      log->Printf("Stop others: %u, try all: %u, before_first: %u.\n",
-                  options.GetStopOthers(), options.GetTryAllThreads(),
-                  before_first_timeout);
+    LLDB_LOGF(log, "Stop others: %u, try all: %u, before_first: %u.\n",
+              options.GetStopOthers(), options.GetTryAllThreads(),
+              before_first_timeout);
 
     // This isn't going to work if there are unfetched events on the queue. Are
     // there cases where we might want to run the remaining events here, and
@@ -4919,10 +4837,10 @@
       // loop. The only exception is if we get two running events with no
       // intervening stop, which can happen, we will just wait for then next
       // stop event.
-      if (log)
-        log->Printf("Top of while loop: do_resume: %i handle_running_event: %i "
-                    "before_first_timeout: %i.",
-                    do_resume, handle_running_event, before_first_timeout);
+      LLDB_LOGF(log,
+                "Top of while loop: do_resume: %i handle_running_event: %i "
+                "before_first_timeout: %i.",
+                do_resume, handle_running_event, before_first_timeout);
 
       if (do_resume || handle_running_event) {
         // Do the initial resume and wait for the running event before going
@@ -4944,10 +4862,10 @@
         got_event =
             listener_sp->GetEvent(event_sp, GetUtilityExpressionTimeout());
         if (!got_event) {
-          if (log)
-            log->Printf("Process::RunThreadPlan(): didn't get any event after "
-                        "resume %" PRIu32 ", exiting.",
-                        num_resumes);
+          LLDB_LOGF(log,
+                    "Process::RunThreadPlan(): didn't get any event after "
+                    "resume %" PRIu32 ", exiting.",
+                    num_resumes);
 
           diagnostic_manager.Printf(eDiagnosticSeverityError,
                                     "didn't get any event after resume %" PRIu32
@@ -4966,13 +4884,13 @@
           if (stop_state == eStateStopped) {
             restarted = Process::ProcessEventData::GetRestartedFromEvent(
                 event_sp.get());
-            if (log)
-              log->Printf(
-                  "Process::RunThreadPlan(): didn't get running event after "
-                  "resume %d, got %s instead (restarted: %i, do_resume: %i, "
-                  "handle_running_event: %i).",
-                  num_resumes, StateAsCString(stop_state), restarted, do_resume,
-                  handle_running_event);
+            LLDB_LOGF(
+                log,
+                "Process::RunThreadPlan(): didn't get running event after "
+                "resume %d, got %s instead (restarted: %i, do_resume: %i, "
+                "handle_running_event: %i).",
+                num_resumes, StateAsCString(stop_state), restarted, do_resume,
+                handle_running_event);
           }
 
           if (restarted) {
@@ -5015,19 +4933,20 @@
       if (log) {
         if (timeout) {
           auto now = system_clock::now();
-          log->Printf("Process::RunThreadPlan(): about to wait - now is %s - "
-                      "endpoint is %s",
-                      llvm::to_string(now).c_str(),
-                      llvm::to_string(now + *timeout).c_str());
+          LLDB_LOGF(log,
+                    "Process::RunThreadPlan(): about to wait - now is %s - "
+                    "endpoint is %s",
+                    llvm::to_string(now).c_str(),
+                    llvm::to_string(now + *timeout).c_str());
         } else {
-          log->Printf("Process::RunThreadPlan(): about to wait forever.");
+          LLDB_LOGF(log, "Process::RunThreadPlan(): about to wait forever.");
         }
       }
 
 #ifdef LLDB_RUN_THREAD_HALT_WITH_EVENT
       // See comment above...
       if (miss_first_event) {
-        usleep(1000);
+        std::this_thread::sleep_for(std::chrono::milliseconds(1));
         miss_first_event = false;
         got_event = false;
       } else
@@ -5044,17 +4963,15 @@
             return_value = eExpressionInterrupted;
             diagnostic_manager.PutString(eDiagnosticSeverityRemark,
                                          "execution halted by user interrupt.");
-            if (log)
-              log->Printf("Process::RunThreadPlan(): Got  interrupted by "
-                          "eBroadcastBitInterrupted, exiting.");
+            LLDB_LOGF(log, "Process::RunThreadPlan(): Got  interrupted by "
+                           "eBroadcastBitInterrupted, exiting.");
             break;
           } else {
             stop_state =
                 Process::ProcessEventData::GetStateFromEvent(event_sp.get());
-            if (log)
-              log->Printf(
-                  "Process::RunThreadPlan(): in while loop, got event: %s.",
-                  StateAsCString(stop_state));
+            LLDB_LOGF(log,
+                      "Process::RunThreadPlan(): in while loop, got event: %s.",
+                      StateAsCString(stop_state));
 
             switch (stop_state) {
             case lldb::eStateStopped: {
@@ -5064,18 +4981,18 @@
               if (!thread_sp) {
                 // Ooh, our thread has vanished.  Unlikely that this was
                 // successful execution...
-                if (log)
-                  log->Printf("Process::RunThreadPlan(): execution completed "
-                              "but our thread (index-id=%u) has vanished.",
-                              thread_idx_id);
+                LLDB_LOGF(log,
+                          "Process::RunThreadPlan(): execution completed "
+                          "but our thread (index-id=%u) has vanished.",
+                          thread_idx_id);
                 return_value = eExpressionInterrupted;
               } else if (Process::ProcessEventData::GetRestartedFromEvent(
                              event_sp.get())) {
                 // If we were restarted, we just need to go back up to fetch
                 // another event.
                 if (log) {
-                  log->Printf("Process::RunThreadPlan(): Got a stop and "
-                              "restart, so we'll continue waiting.");
+                  LLDB_LOGF(log, "Process::RunThreadPlan(): Got a stop and "
+                                 "restart, so we'll continue waiting.");
                 }
                 keep_going = true;
                 do_resume = false;
@@ -5098,10 +5015,10 @@
               break;
 
             default:
-              if (log)
-                log->Printf("Process::RunThreadPlan(): execution stopped with "
-                            "unexpected state: %s.",
-                            StateAsCString(stop_state));
+              LLDB_LOGF(log,
+                        "Process::RunThreadPlan(): execution stopped with "
+                        "unexpected state: %s.",
+                        StateAsCString(stop_state));
 
               if (stop_state == eStateExited)
                 event_to_broadcast_sp = event_sp;
@@ -5162,8 +5079,7 @@
         while (try_halt_again < num_retries) {
           Status halt_error;
           if (do_halt) {
-            if (log)
-              log->Printf("Process::RunThreadPlan(): Running Halt.");
+            LLDB_LOGF(log, "Process::RunThreadPlan(): Running Halt.");
             const bool clear_thread_plans = false;
             const bool use_run_lock = false;
             Halt(clear_thread_plans, use_run_lock);
@@ -5179,8 +5095,9 @@
               stop_state =
                   Process::ProcessEventData::GetStateFromEvent(event_sp.get());
               if (log) {
-                log->Printf("Process::RunThreadPlan(): Stopped with event: %s",
-                            StateAsCString(stop_state));
+                LLDB_LOGF(log,
+                          "Process::RunThreadPlan(): Stopped with event: %s",
+                          StateAsCString(stop_state));
                 if (stop_state == lldb::eStateStopped &&
                     Process::ProcessEventData::GetInterruptedFromEvent(
                         event_sp.get()))
@@ -5379,24 +5296,25 @@
         } while (false);
 
         if (event_explanation)
-          log->Printf("Process::RunThreadPlan(): execution interrupted: %s %s",
-                      s.GetData(), event_explanation);
+          LLDB_LOGF(log,
+                    "Process::RunThreadPlan(): execution interrupted: %s %s",
+                    s.GetData(), event_explanation);
         else
-          log->Printf("Process::RunThreadPlan(): execution interrupted: %s",
-                      s.GetData());
+          LLDB_LOGF(log, "Process::RunThreadPlan(): execution interrupted: %s",
+                    s.GetData());
       }
 
       if (should_unwind) {
-        if (log)
-          log->Printf("Process::RunThreadPlan: ExecutionInterrupted - "
-                      "discarding thread plans up to %p.",
-                      static_cast<void *>(thread_plan_sp.get()));
+        LLDB_LOGF(log,
+                  "Process::RunThreadPlan: ExecutionInterrupted - "
+                  "discarding thread plans up to %p.",
+                  static_cast<void *>(thread_plan_sp.get()));
         thread->DiscardThreadPlansUpToPlan(thread_plan_sp);
       } else {
-        if (log)
-          log->Printf("Process::RunThreadPlan: ExecutionInterrupted - for "
-                      "plan: %p not discarding.",
-                      static_cast<void *>(thread_plan_sp.get()));
+        LLDB_LOGF(log,
+                  "Process::RunThreadPlan: ExecutionInterrupted - for "
+                  "plan: %p not discarding.",
+                  static_cast<void *>(thread_plan_sp.get()));
       }
     } else if (return_value == eExpressionSetupError) {
       if (log)
@@ -5559,9 +5477,8 @@
       ++num_thread_infos_dumped;
     } else {
       Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
-      if (log)
-        log->Printf("Process::GetThreadStatus - thread 0x" PRIu64
-                    " vanished while running Thread::GetStatus.");
+      LLDB_LOGF(log, "Process::GetThreadStatus - thread 0x" PRIu64
+                     " vanished while running Thread::GetStatus.");
     }
   }
   return num_thread_infos_dumped;
@@ -5612,6 +5529,12 @@
     return m_public_run_lock;
 }
 
+bool Process::CurrentThreadIsPrivateStateThread()
+{
+  return m_private_state_thread.EqualsThread(Host::GetCurrentThread());
+}
+
+
 void Process::Flush() {
   m_thread_list.Flush();
   m_extended_thread_list.Flush();
@@ -5622,8 +5545,7 @@
 
 void Process::DidExec() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("Process::%s()", __FUNCTION__);
+  LLDB_LOGF(log, "Process::%s()", __FUNCTION__);
 
   Target &target = GetTarget();
   target.CleanupProcess();
@@ -5669,7 +5591,7 @@
   if (iter != m_resolved_indirect_addresses.end()) {
     function_addr = (*iter).second;
   } else {
-    if (!InferiorCall(this, address, function_addr)) {
+    if (!CallVoidArgVoidPtrReturn(address, function_addr)) {
       Symbol *symbol = address->CalculateSymbolContextSymbol();
       error.SetErrorStringWithFormat(
           "Unable to call resolver for indirect function %s",
@@ -5871,7 +5793,8 @@
 
   uint32_t branch_index =
       insn_list->GetIndexOfNextBranchInstruction(insn_offset, target,
-                                                 false /* ignore_calls*/);
+                                                 false /* ignore_calls*/,
+                                                 nullptr);
   if (branch_index == UINT32_MAX) {
     return retval;
   }
@@ -5929,19 +5852,18 @@
 
   // Bail out early if there are no type names to map.
   if (supported_type_names.GetSize() == 0) {
-    if (log)
-      log->Printf("Process::%s(): no structured data types supported",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "Process::%s(): no structured data types supported",
+              __FUNCTION__);
     return;
   }
 
   // Convert StructuredData type names to ConstString instances.
   std::set<ConstString> const_type_names;
 
-  if (log)
-    log->Printf("Process::%s(): the process supports the following async "
-                "structured data types:",
-                __FUNCTION__);
+  LLDB_LOGF(log,
+            "Process::%s(): the process supports the following async "
+            "structured data types:",
+            __FUNCTION__);
 
   supported_type_names.ForEach(
       [&const_type_names, &log](StructuredData::Object *object) {
@@ -5988,11 +5910,11 @@
         m_structured_data_plugin_map.insert(
             std::make_pair(type_name, plugin_sp));
         names_to_remove.push_back(type_name);
-        if (log)
-          log->Printf("Process::%s(): using plugin %s for type name "
-                      "%s",
-                      __FUNCTION__, plugin_sp->GetPluginName().GetCString(),
-                      type_name.GetCString());
+        LLDB_LOGF(log,
+                  "Process::%s(): using plugin %s for type name "
+                  "%s",
+                  __FUNCTION__, plugin_sp->GetPluginName().GetCString(),
+                  type_name.GetCString());
       }
     }
 
@@ -6042,7 +5964,62 @@
     llvm::function_ref<std::unique_ptr<UtilityFunction>()> factory) {
   if (platform != GetTarget().GetPlatform().get())
     return nullptr;
-  std::call_once(m_dlopen_utility_func_flag_once,
-                 [&] { m_dlopen_utility_func_up = factory(); });
+  llvm::call_once(m_dlopen_utility_func_flag_once,
+                  [&] { m_dlopen_utility_func_up = factory(); });
   return m_dlopen_utility_func_up.get();
 }
+
+bool Process::CallVoidArgVoidPtrReturn(const Address *address,
+                                       addr_t &returned_func,
+                                       bool trap_exceptions) {
+  Thread *thread = GetThreadList().GetExpressionExecutionThread().get();
+  if (thread == nullptr || address == nullptr)
+    return false;
+
+  EvaluateExpressionOptions options;
+  options.SetStopOthers(true);
+  options.SetUnwindOnError(true);
+  options.SetIgnoreBreakpoints(true);
+  options.SetTryAllThreads(true);
+  options.SetDebug(false);
+  options.SetTimeout(GetUtilityExpressionTimeout());
+  options.SetTrapExceptions(trap_exceptions);
+
+  auto type_system_or_err =
+      GetTarget().GetScratchTypeSystemForLanguage(eLanguageTypeC);
+  if (!type_system_or_err) {
+    llvm::consumeError(type_system_or_err.takeError());
+    return false;
+  }
+  CompilerType void_ptr_type =
+      type_system_or_err->GetBasicTypeFromAST(eBasicTypeVoid).GetPointerType();
+  lldb::ThreadPlanSP call_plan_sp(new ThreadPlanCallFunction(
+      *thread, *address, void_ptr_type, llvm::ArrayRef<addr_t>(), options));
+  if (call_plan_sp) {
+    DiagnosticManager diagnostics;
+
+    StackFrame *frame = thread->GetStackFrameAtIndex(0).get();
+    if (frame) {
+      ExecutionContext exe_ctx;
+      frame->CalculateExecutionContext(exe_ctx);
+      ExpressionResults result =
+          RunThreadPlan(exe_ctx, call_plan_sp, options, diagnostics);
+      if (result == eExpressionCompleted) {
+        returned_func =
+            call_plan_sp->GetReturnValueObject()->GetValueAsUnsigned(
+                LLDB_INVALID_ADDRESS);
+
+        if (GetAddressByteSize() == 4) {
+          if (returned_func == UINT32_MAX)
+            return false;
+        } else if (GetAddressByteSize() == 8) {
+          if (returned_func == UINT64_MAX)
+            return false;
+        }
+        return true;
+      }
+    }
+  }
+
+  return false;
+}
diff --git a/src/llvm-project/lldb/source/Target/RegisterContext.cpp b/src/llvm-project/lldb/source/Target/RegisterContext.cpp
index c960260..f29cf43 100644
--- a/src/llvm-project/lldb/source/Target/RegisterContext.cpp
+++ b/src/llvm-project/lldb/source/Target/RegisterContext.cpp
@@ -82,14 +82,12 @@
   DataExtractor dwarf_data(dwarf_opcode_ptr, dwarf_opcode_len,
                            arch.GetByteOrder(), addr_size);
   ModuleSP opcode_ctx;
-  DWARFExpression dwarf_expr(opcode_ctx, dwarf_data, nullptr, 0,
-                             dwarf_opcode_len);
+  DWARFExpression dwarf_expr(opcode_ctx, dwarf_data, nullptr);
   Value result;
   Status error;
-  const lldb::offset_t offset = 0;
   if (dwarf_expr.Evaluate(&exe_ctx, this, opcode_ctx, dwarf_data, nullptr,
-                          offset, dwarf_opcode_len, eRegisterKindDWARF, nullptr,
-                          nullptr, result, &error)) {
+                          eRegisterKindDWARF, nullptr, nullptr, result,
+                          &error)) {
     expr_result = result.GetScalar().SInt(-1);
     switch (expr_result) {
     case 0:
diff --git a/src/llvm-project/lldb/source/Target/RemoteAwarePlatform.cpp b/src/llvm-project/lldb/source/Target/RemoteAwarePlatform.cpp
index 1704e15..faa217a 100644
--- a/src/llvm-project/lldb/source/Target/RemoteAwarePlatform.cpp
+++ b/src/llvm-project/lldb/source/Target/RemoteAwarePlatform.cpp
@@ -61,8 +61,8 @@
 }
 
 lldb::user_id_t RemoteAwarePlatform::OpenFile(const FileSpec &file_spec,
-                                              uint32_t flags, uint32_t mode,
-                                              Status &error) {
+                                              File::OpenOptions flags,
+                                              uint32_t mode, Status &error) {
   if (IsHost())
     return FileCache::GetInstance().OpenFile(file_spec, flags, mode, error);
   if (m_remote_platform_sp)
diff --git a/src/llvm-project/lldb/source/Target/SectionLoadList.cpp b/src/llvm-project/lldb/source/Target/SectionLoadList.cpp
index 598f49c..f2546a8 100644
--- a/src/llvm-project/lldb/source/Target/SectionLoadList.cpp
+++ b/src/llvm-project/lldb/source/Target/SectionLoadList.cpp
@@ -121,7 +121,8 @@
 
   } else {
     if (log) {
-      log->Printf(
+      LLDB_LOGF(
+          log,
           "SectionLoadList::%s (section = %p (%s), load_addr = 0x%16.16" PRIx64
           ") error: module has been deleted",
           __FUNCTION__, static_cast<void *>(section.get()),
@@ -145,9 +146,9 @@
             section_sp->GetModule()->GetFileSpec());
         module_name = module_file_spec.GetPath();
       }
-      log->Printf("SectionLoadList::%s (section = %p (%s.%s))", __FUNCTION__,
-                  static_cast<void *>(section_sp.get()), module_name.c_str(),
-                  section_sp->GetName().AsCString());
+      LLDB_LOGF(log, "SectionLoadList::%s (section = %p (%s.%s))", __FUNCTION__,
+                static_cast<void *>(section_sp.get()), module_name.c_str(),
+                section_sp->GetName().AsCString());
     }
 
     std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -179,7 +180,8 @@
       const FileSpec &module_file_spec(section_sp->GetModule()->GetFileSpec());
       module_name = module_file_spec.GetPath();
     }
-    log->Printf(
+    LLDB_LOGF(
+        log,
         "SectionLoadList::%s (section = %p (%s.%s), load_addr = 0x%16.16" PRIx64
         ")",
         __FUNCTION__, static_cast<void *>(section_sp.get()),
diff --git a/src/llvm-project/lldb/source/Target/StackFrame.cpp b/src/llvm-project/lldb/source/Target/StackFrame.cpp
index f8b22d9..5c6ea7a 100644
--- a/src/llvm-project/lldb/source/Target/StackFrame.cpp
+++ b/src/llvm-project/lldb/source/Target/StackFrame.cpp
@@ -29,6 +29,7 @@
 #include "lldb/Target/StackFrameRecognizer.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Utility/Log.h"
 #include "lldb/Utility/RegisterValue.h"
 
 #include "lldb/lldb-enumerations.h"
@@ -50,14 +51,16 @@
 StackFrame::StackFrame(const ThreadSP &thread_sp, user_id_t frame_idx,
                        user_id_t unwind_frame_index, addr_t cfa,
                        bool cfa_is_valid, addr_t pc, StackFrame::Kind kind,
+                       bool behaves_like_zeroth_frame,
                        const SymbolContext *sc_ptr)
     : m_thread_wp(thread_sp), m_frame_index(frame_idx),
       m_concrete_frame_index(unwind_frame_index), m_reg_context_sp(),
       m_id(pc, cfa, nullptr), m_frame_code_addr(pc), m_sc(), m_flags(),
       m_frame_base(), m_frame_base_error(), m_cfa_is_valid(cfa_is_valid),
-      m_stack_frame_kind(kind), m_variable_list_sp(),
-      m_variable_list_value_objects(), m_recognized_frame_sp(), m_disassembly(),
-      m_mutex() {
+      m_stack_frame_kind(kind),
+      m_behaves_like_zeroth_frame(behaves_like_zeroth_frame),
+      m_variable_list_sp(), m_variable_list_value_objects(),
+      m_recognized_frame_sp(), m_disassembly(), m_mutex() {
   // If we don't have a CFA value, use the frame index for our StackID so that
   // recursive functions properly aren't confused with one another on a history
   // stack.
@@ -74,15 +77,17 @@
 StackFrame::StackFrame(const ThreadSP &thread_sp, user_id_t frame_idx,
                        user_id_t unwind_frame_index,
                        const RegisterContextSP &reg_context_sp, addr_t cfa,
-                       addr_t pc, const SymbolContext *sc_ptr)
+                       addr_t pc, bool behaves_like_zeroth_frame,
+                       const SymbolContext *sc_ptr)
     : m_thread_wp(thread_sp), m_frame_index(frame_idx),
       m_concrete_frame_index(unwind_frame_index),
       m_reg_context_sp(reg_context_sp), m_id(pc, cfa, nullptr),
       m_frame_code_addr(pc), m_sc(), m_flags(), m_frame_base(),
       m_frame_base_error(), m_cfa_is_valid(true),
-      m_stack_frame_kind(StackFrame::Kind::Regular), m_variable_list_sp(),
-      m_variable_list_value_objects(), m_recognized_frame_sp(), m_disassembly(),
-      m_mutex() {
+      m_stack_frame_kind(StackFrame::Kind::Regular),
+      m_behaves_like_zeroth_frame(behaves_like_zeroth_frame),
+      m_variable_list_sp(), m_variable_list_value_objects(),
+      m_recognized_frame_sp(), m_disassembly(), m_mutex() {
   if (sc_ptr != nullptr) {
     m_sc = *sc_ptr;
     m_flags.Set(m_sc.GetResolvedMask());
@@ -98,7 +103,8 @@
 StackFrame::StackFrame(const ThreadSP &thread_sp, user_id_t frame_idx,
                        user_id_t unwind_frame_index,
                        const RegisterContextSP &reg_context_sp, addr_t cfa,
-                       const Address &pc_addr, const SymbolContext *sc_ptr)
+                       const Address &pc_addr, bool behaves_like_zeroth_frame,
+                       const SymbolContext *sc_ptr)
     : m_thread_wp(thread_sp), m_frame_index(frame_idx),
       m_concrete_frame_index(unwind_frame_index),
       m_reg_context_sp(reg_context_sp),
@@ -106,9 +112,10 @@
            nullptr),
       m_frame_code_addr(pc_addr), m_sc(), m_flags(), m_frame_base(),
       m_frame_base_error(), m_cfa_is_valid(true),
-      m_stack_frame_kind(StackFrame::Kind::Regular), m_variable_list_sp(),
-      m_variable_list_value_objects(), m_recognized_frame_sp(), m_disassembly(),
-      m_mutex() {
+      m_stack_frame_kind(StackFrame::Kind::Regular),
+      m_behaves_like_zeroth_frame(behaves_like_zeroth_frame),
+      m_variable_list_sp(), m_variable_list_value_objects(),
+      m_recognized_frame_sp(), m_disassembly(), m_mutex() {
   if (sc_ptr != nullptr) {
     m_sc = *sc_ptr;
     m_flags.Set(m_sc.GetResolvedMask());
@@ -288,7 +295,7 @@
     // following the function call instruction...
 
     Address lookup_addr(GetFrameCodeAddress());
-    if (m_frame_index > 0 && lookup_addr.IsValid()) {
+    if (!m_behaves_like_zeroth_frame && lookup_addr.IsValid()) {
       addr_t offset = lookup_addr.GetOffset();
       if (offset > 0) {
         lookup_addr.SetOffset(offset - 1);
@@ -566,8 +573,7 @@
   if (!var_sp && (options & eExpressionPathOptionsInspectAnonymousUnions)) {
     // Check if any anonymous unions are there which contain a variable with
     // the name we need
-    for (size_t i = 0; i < variable_list->GetSize(); i++) {
-      VariableSP variable_sp = variable_list->GetVariableAtIndex(i);
+    for (const VariableSP &variable_sp : *variable_list) {
       if (!variable_sp)
         continue;
       if (!variable_sp->GetName().IsEmpty())
@@ -1357,13 +1363,16 @@
       if (target_sp->ResolveLoadAddress(base_and_offset.first->m_immediate +
                                             base_and_offset.second,
                                         addr)) {
-        TypeSystem *c_type_system =
-            target_sp->GetScratchTypeSystemForLanguage(nullptr, eLanguageTypeC);
-        if (!c_type_system) {
+        auto c_type_system_or_err =
+            target_sp->GetScratchTypeSystemForLanguage(eLanguageTypeC);
+        if (auto err = c_type_system_or_err.takeError()) {
+          LLDB_LOG_ERROR(
+              lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_THREAD),
+              std::move(err), "Unable to guess value for given address");
           return ValueObjectSP();
         } else {
           CompilerType void_ptr_type =
-              c_type_system
+              c_type_system_or_err
                   ->GetBasicTypeFromAST(lldb::BasicType::eBasicTypeChar)
                   .GetPointerType();
           return ValueObjectMemory::Create(this, "", addr, void_ptr_type);
@@ -1519,11 +1528,9 @@
              : Instruction::Operand::BuildDereference(
                    Instruction::Operand::BuildRegister(reg));
 
-  for (size_t vi = 0, ve = variables.GetSize(); vi != ve; ++vi) {
-    VariableSP var_sp = variables.GetVariableAtIndex(vi);
-    if (var_sp->LocationExpression().MatchesOperand(frame, op)) {
+  for (VariableSP var_sp : variables) {
+    if (var_sp->LocationExpression().MatchesOperand(frame, op))
       return frame.GetValueObjectForFrameVariable(var_sp, eNoDynamicValues);
-    }
   }
 
   const uint32_t current_inst =
diff --git a/src/llvm-project/lldb/source/Target/StackFrameList.cpp b/src/llvm-project/lldb/source/Target/StackFrameList.cpp
index 5492dda..87b4984 100644
--- a/src/llvm-project/lldb/source/Target/StackFrameList.cpp
+++ b/src/llvm-project/lldb/source/Target/StackFrameList.cpp
@@ -67,7 +67,8 @@
       m_current_inlined_depth = UINT32_MAX;
       Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
       if (log && log->GetVerbose())
-        log->Printf(
+        LLDB_LOGF(
+            log,
             "GetCurrentInlinedDepth: invalidating current inlined depth.\n");
     }
     return m_current_inlined_depth;
@@ -90,7 +91,8 @@
     m_current_inlined_pc = LLDB_INVALID_ADDRESS;
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
     if (log && log->GetVerbose())
-      log->Printf(
+      LLDB_LOGF(
+          log,
           "ResetCurrentInlinedDepth: Invalidating current inlined depth.\n");
     return;
   }
@@ -184,9 +186,10 @@
     m_current_inlined_depth = num_inlined_functions + 1;
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
     if (log && log->GetVerbose())
-      log->Printf("ResetCurrentInlinedDepth: setting inlined "
-                  "depth: %d 0x%" PRIx64 ".\n",
-                  m_current_inlined_depth, curr_pc);
+      LLDB_LOGF(log,
+                "ResetCurrentInlinedDepth: setting inlined "
+                "depth: %d 0x%" PRIx64 ".\n",
+                m_current_inlined_depth, curr_pc);
 
     break;
   }
@@ -240,33 +243,27 @@
 /// \p return_pc) to \p end. On success this path is stored into \p path, and 
 /// on failure \p path is unchanged.
 static void FindInterveningFrames(Function &begin, Function &end,
-                                  Target &target, addr_t return_pc,
+                                  ExecutionContext &exe_ctx, Target &target,
+                                  addr_t return_pc,
                                   std::vector<Function *> &path,
                                   ModuleList &images, Log *log) {
   LLDB_LOG(log, "Finding frames between {0} and {1}, retn-pc={2:x}",
            begin.GetDisplayName(), end.GetDisplayName(), return_pc);
 
   // Find a non-tail calling edge with the correct return PC.
-  auto first_level_edges = begin.GetCallEdges();
   if (log)
-    for (const CallEdge &edge : first_level_edges)
+    for (const auto &edge : begin.GetCallEdges())
       LLDB_LOG(log, "FindInterveningFrames: found call with retn-PC = {0:x}",
-               edge.GetReturnPCAddress(begin, target));
-  auto first_edge_it = std::lower_bound(
-      first_level_edges.begin(), first_level_edges.end(), return_pc,
-      [&](const CallEdge &edge, addr_t target_pc) {
-        return edge.GetReturnPCAddress(begin, target) < target_pc;
-      });
-  if (first_edge_it == first_level_edges.end() ||
-      first_edge_it->GetReturnPCAddress(begin, target) != return_pc) {
+               edge->GetReturnPCAddress(begin, target));
+  CallEdge *first_edge = begin.GetCallEdgeForReturnAddress(return_pc, target);
+  if (!first_edge) {
     LLDB_LOG(log, "No call edge outgoing from {0} with retn-PC == {1:x}",
              begin.GetDisplayName(), return_pc);
     return;
   }
-  CallEdge &first_edge = const_cast<CallEdge &>(*first_edge_it);
 
   // The first callee may not be resolved, or there may be nothing to fill in.
-  Function *first_callee = first_edge.GetCallee(images);
+  Function *first_callee = first_edge->GetCallee(images, exe_ctx);
   if (!first_callee) {
     LLDB_LOG(log, "Could not resolve callee");
     return;
@@ -287,18 +284,20 @@
     bool ambiguous = false;
     Function *end;
     ModuleList &images;
+    ExecutionContext &context;
 
-    DFS(Function *end, ModuleList &images) : end(end), images(images) {}
+    DFS(Function *end, ModuleList &images, ExecutionContext &context)
+        : end(end), images(images), context(context) {}
 
-    void search(Function *first_callee, std::vector<Function *> &path) {
+    void search(Function &first_callee, std::vector<Function *> &path) {
       dfs(first_callee);
       if (!ambiguous)
         path = std::move(solution_path);
     }
 
-    void dfs(Function *callee) {
+    void dfs(Function &callee) {
       // Found a path to the target function.
-      if (callee == end) {
+      if (&callee == end) {
         if (solution_path.empty())
           solution_path = active_path;
         else
@@ -310,19 +309,19 @@
       // there's more than one way to reach a target. This errs on the side of
       // caution: it conservatively stops searching when some solutions are
       // still possible to save time in the average case.
-      if (!visited_nodes.insert(callee).second) {
+      if (!visited_nodes.insert(&callee).second) {
         ambiguous = true;
         return;
       }
 
       // Search the calls made from this callee.
-      active_path.push_back(callee);
-      for (CallEdge &edge : callee->GetTailCallingEdges()) {
-        Function *next_callee = edge.GetCallee(images);
+      active_path.push_back(&callee);
+      for (const auto &edge : callee.GetTailCallingEdges()) {
+        Function *next_callee = edge->GetCallee(images, context);
         if (!next_callee)
           continue;
 
-        dfs(next_callee);
+        dfs(*next_callee);
         if (ambiguous)
           return;
       }
@@ -330,7 +329,7 @@
     }
   };
 
-  DFS(&end, images).search(first_callee, path);
+  DFS(&end, images, exe_ctx).search(*first_callee, path);
 }
 
 /// Given that \p next_frame will be appended to the frame list, synthesize
@@ -383,8 +382,10 @@
   addr_t return_pc = next_reg_ctx_sp->GetPC();
   Target &target = *target_sp.get();
   ModuleList &images = next_frame.CalculateTarget()->GetImages();
-  FindInterveningFrames(*next_func, *prev_func, target, return_pc, path, images,
-                        log);
+  ExecutionContext exe_ctx(target_sp, /*get_process=*/true);
+  exe_ctx.SetFramePtr(&next_frame);
+  FindInterveningFrames(*next_func, *prev_func, exe_ctx, target, return_pc,
+                        path, images, log);
 
   // Push synthetic tail call frames.
   for (Function *callee : llvm::reverse(path)) {
@@ -394,11 +395,13 @@
     bool cfa_is_valid = false;
     addr_t pc =
         callee->GetAddressRange().GetBaseAddress().GetLoadAddress(&target);
+    constexpr bool behaves_like_zeroth_frame = false;
     SymbolContext sc;
     callee->CalculateSymbolContext(&sc);
     auto synth_frame = std::make_shared<StackFrame>(
         m_thread.shared_from_this(), frame_idx, concrete_frame_idx, cfa,
-        cfa_is_valid, pc, StackFrame::Kind::Artificial, &sc);
+        cfa_is_valid, pc, StackFrame::Kind::Artificial,
+        behaves_like_zeroth_frame, &sc);
     m_frames.push_back(synth_frame);
     LLDB_LOG(log, "Pushed frame {0}", callee->GetDisplayName());
   }
@@ -448,6 +451,7 @@
     uint32_t idx = m_concrete_frames_fetched++;
     lldb::addr_t pc = LLDB_INVALID_ADDRESS;
     lldb::addr_t cfa = LLDB_INVALID_ADDRESS;
+    bool behaves_like_zeroth_frame = (idx == 0);
     if (idx == 0) {
       // We might have already created frame zero, only create it if we need
       // to.
@@ -455,8 +459,9 @@
         RegisterContextSP reg_ctx_sp(m_thread.GetRegisterContext());
 
         if (reg_ctx_sp) {
-          const bool success =
-              unwinder && unwinder->GetFrameInfoAtIndex(idx, cfa, pc);
+          const bool success = unwinder &&
+                               unwinder->GetFrameInfoAtIndex(
+                                   idx, cfa, pc, behaves_like_zeroth_frame);
           // There shouldn't be any way not to get the frame info for frame
           // 0. But if the unwinder can't make one, lets make one by hand
           // with the SP as the CFA and see if that gets any further.
@@ -467,7 +472,7 @@
 
           unwind_frame_sp = std::make_shared<StackFrame>(
               m_thread.shared_from_this(), m_frames.size(), idx, reg_ctx_sp,
-              cfa, pc, nullptr);
+              cfa, pc, behaves_like_zeroth_frame, nullptr);
           m_frames.push_back(unwind_frame_sp);
         }
       } else {
@@ -475,8 +480,9 @@
         cfa = unwind_frame_sp->m_id.GetCallFrameAddress();
       }
     } else {
-      const bool success =
-          unwinder && unwinder->GetFrameInfoAtIndex(idx, cfa, pc);
+      const bool success = unwinder &&
+                           unwinder->GetFrameInfoAtIndex(
+                               idx, cfa, pc, behaves_like_zeroth_frame);
       if (!success) {
         // We've gotten to the end of the stack.
         SetAllFramesFetched();
@@ -485,7 +491,7 @@
       const bool cfa_is_valid = true;
       unwind_frame_sp = std::make_shared<StackFrame>(
           m_thread.shared_from_this(), m_frames.size(), idx, cfa, cfa_is_valid,
-          pc, StackFrame::Kind::Regular, nullptr);
+          pc, StackFrame::Kind::Regular, behaves_like_zeroth_frame, nullptr);
 
       // Create synthetic tail call frames between the previous frame and the
       // newly-found frame. The new frame's index may change after this call,
@@ -527,10 +533,11 @@
       while (unwind_sc.GetParentOfInlinedScope(
           curr_frame_address, next_frame_sc, next_frame_address)) {
         next_frame_sc.line_entry.ApplyFileMappings(target_sp);
-        StackFrameSP frame_sp(
-            new StackFrame(m_thread.shared_from_this(), m_frames.size(), idx,
-                           unwind_frame_sp->GetRegisterContextSP(), cfa,
-                           next_frame_address, &next_frame_sc));
+        behaves_like_zeroth_frame = false;
+        StackFrameSP frame_sp(new StackFrame(
+            m_thread.shared_from_this(), m_frames.size(), idx,
+            unwind_frame_sp->GetRegisterContextSP(), cfa, next_frame_address,
+            behaves_like_zeroth_frame, &next_frame_sc));
 
         m_frames.push_back(frame_sp);
         unwind_sc = next_frame_sc;
@@ -661,11 +668,13 @@
       Unwind *unwinder = m_thread.GetUnwinder();
       if (unwinder) {
         addr_t pc, cfa;
-        if (unwinder->GetFrameInfoAtIndex(idx, cfa, pc)) {
+        bool behaves_like_zeroth_frame = (idx == 0);
+        if (unwinder->GetFrameInfoAtIndex(idx, cfa, pc,
+                                          behaves_like_zeroth_frame)) {
           const bool cfa_is_valid = true;
           frame_sp = std::make_shared<StackFrame>(
               m_thread.shared_from_this(), idx, idx, cfa, cfa_is_valid, pc,
-              StackFrame::Kind::Regular, nullptr);
+              StackFrame::Kind::Regular, behaves_like_zeroth_frame, nullptr);
 
           Function *function =
               frame_sp->GetSymbolContext(eSymbolContextFunction).function;
diff --git a/src/llvm-project/lldb/source/Target/StackFrameRecognizer.cpp b/src/llvm-project/lldb/source/Target/StackFrameRecognizer.cpp
index 567d694..75a6cd2 100644
--- a/src/llvm-project/lldb/source/Target/StackFrameRecognizer.cpp
+++ b/src/llvm-project/lldb/source/Target/StackFrameRecognizer.cpp
@@ -39,7 +39,7 @@
   ValueObjectListSP args =
       m_interpreter->GetRecognizedArguments(m_python_object_sp, frame);
   auto args_synthesized = ValueObjectListSP(new ValueObjectList());
-  for (const auto o : args->GetObjects()) {
+  for (const auto &o : args->GetObjects()) {
     args_synthesized->Append(ValueObjectRecognizerSynthesizedValue::Create(
         *o, eValueTypeVariableArgument));
   }
diff --git a/src/llvm-project/lldb/source/Target/StopInfo.cpp b/src/llvm-project/lldb/source/Target/StopInfo.cpp
index 6db0c2b..28179b7 100644
--- a/src/llvm-project/lldb/source/Target/StopInfo.cpp
+++ b/src/llvm-project/lldb/source/Target/StopInfo.cpp
@@ -147,10 +147,10 @@
         } else {
           Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
-          if (log)
-            log->Printf(
-                "Process::%s could not find breakpoint site id: %" PRId64 "...",
-                __FUNCTION__, m_value);
+          LLDB_LOGF(log,
+                    "Process::%s could not find breakpoint site id: %" PRId64
+                    "...",
+                    __FUNCTION__, m_value);
 
           m_should_stop = true;
         }
@@ -270,7 +270,7 @@
       if (!thread_sp->IsValid()) {
         // This shouldn't ever happen, but just in case, don't do more harm.
         if (log) {
-          log->Printf("PerformAction got called with an invalid thread.");
+          LLDB_LOGF(log, "PerformAction got called with an invalid thread.");
         }
         m_should_stop = true;
         m_should_stop_is_valid = true;
@@ -339,10 +339,9 @@
               return;
             }
 
-            if (log)
-              log->Printf("StopInfoBreakpoint::PerformAction - Hit a "
-                          "breakpoint while running an expression,"
-                          " not running commands to avoid recursion.");
+            LLDB_LOGF(log, "StopInfoBreakpoint::PerformAction - Hit a "
+                           "breakpoint while running an expression,"
+                           " not running commands to avoid recursion.");
             bool ignoring_breakpoints =
                 process->GetIgnoreBreakpointsInExpressions();
             if (ignoring_breakpoints) {
@@ -359,10 +358,10 @@
             } else {
               m_should_stop = true;
             }
-            if (log)
-              log->Printf("StopInfoBreakpoint::PerformAction - in expression, "
-                          "continuing: %s.",
-                          m_should_stop ? "true" : "false");
+            LLDB_LOGF(log,
+                      "StopInfoBreakpoint::PerformAction - in expression, "
+                      "continuing: %s.",
+                      m_should_stop ? "true" : "false");
             process->GetTarget().GetDebugger().GetAsyncOutputStream()->Printf(
                 "Warning: hit breakpoint while running function, skipping "
                 "commands and conditions to prevent recursion.\n");
@@ -402,10 +401,11 @@
             // aren't:
             if (!bp_loc_sp->ValidForThisThread(thread_sp.get())) {
               if (log) {
-                log->Printf("Breakpoint %s hit on thread 0x%llx but it was not "
-                            "for this thread, continuing.",
-                            loc_desc.GetData(), static_cast<unsigned long long>(
-                                             thread_sp->GetID()));
+                LLDB_LOGF(log,
+                          "Breakpoint %s hit on thread 0x%llx but it was not "
+                          "for this thread, continuing.",
+                          loc_desc.GetData(),
+                          static_cast<unsigned long long>(thread_sp->GetID()));
               }
               continue;
             }
@@ -445,21 +445,18 @@
                 error_sp->EOL();
                 const char *err_str =
                     condition_error.AsCString("<Unknown Error>");
-                if (log)
-                  log->Printf("Error evaluating condition: \"%s\"\n", err_str);
+                LLDB_LOGF(log, "Error evaluating condition: \"%s\"\n", err_str);
 
                 error_sp->PutCString(err_str);
                 error_sp->EOL();
                 error_sp->Flush();
               } else {
-                if (log) {
-                  log->Printf("Condition evaluated for breakpoint %s on thread "
-                              "0x%llx conditon_says_stop: %i.",
-                              loc_desc.GetData(), 
-                              static_cast<unsigned long long>(
-                                               thread_sp->GetID()),
-                              condition_says_stop);
-                }
+                LLDB_LOGF(log,
+                          "Condition evaluated for breakpoint %s on thread "
+                          "0x%llx conditon_says_stop: %i.",
+                          loc_desc.GetData(),
+                          static_cast<unsigned long long>(thread_sp->GetID()),
+                          condition_says_stop);
                 if (!condition_says_stop) {
                   // We don't want to increment the hit count of breakpoints if
                   // the condition fails. We've already bumped it by the time
@@ -479,9 +476,9 @@
             bool auto_continue_says_stop = true;
             if (bp_loc_sp->IsAutoContinue())
             {
-              if (log)
-                log->Printf("Continuing breakpoint %s as AutoContinue was set.",
-                            loc_desc.GetData());
+              LLDB_LOGF(log,
+                        "Continuing breakpoint %s as AutoContinue was set.",
+                        loc_desc.GetData());
               // We want this stop reported, so you will know we auto-continued
               // but only for external breakpoints:
               if (!internal_breakpoint)
@@ -533,10 +530,10 @@
         Log *log_process(
             lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
-        if (log_process)
-          log_process->Printf(
-              "Process::%s could not find breakpoint site id: %" PRId64 "...",
-              __FUNCTION__, m_value);
+        LLDB_LOGF(log_process,
+                  "Process::%s could not find breakpoint site id: %" PRId64
+                  "...",
+                  __FUNCTION__, m_value);
       }
 
       if ((!m_should_stop || internal_breakpoint) &&
@@ -546,15 +543,15 @@
         // additionally to the breakpoint
         m_should_stop = true;
         
-        // Here we clean the preset stop info so the next GetStopInfo call will
-        // find the appropriate stop info, which should be the stop info
-        // related to the completed plan
-        thread_sp->ResetStopInfo();
+        // We know we're stopping for a completed plan and we don't want to
+        // show the breakpoint stop, so compute the public stop info immediately
+        // here.
+        thread_sp->CalculatePublicStopInfo();
       }
 
-      if (log)
-        log->Printf("Process::%s returning from action with m_should_stop: %d.",
-                    __FUNCTION__, m_should_stop);
+      LLDB_LOGF(log,
+                "Process::%s returning from action with m_should_stop: %d.",
+                __FUNCTION__, m_should_stop);
     }
   }
 
@@ -664,11 +661,10 @@
       } else {
         Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
-        if (log)
-          log->Printf(
-              "Process::%s could not find watchpoint location id: %" PRId64
-              "...",
-              __FUNCTION__, GetValue());
+        LLDB_LOGF(log,
+                  "Process::%s could not find watchpoint location id: %" PRId64
+                  "...",
+                  __FUNCTION__, GetValue());
 
         m_should_stop = true;
       }
@@ -817,15 +813,14 @@
                   m_should_stop = false;
                 } else
                   m_should_stop = true;
-                if (log)
-                  log->Printf(
-                      "Condition successfully evaluated, result is %s.\n",
-                      m_should_stop ? "true" : "false");
+                LLDB_LOGF(log,
+                          "Condition successfully evaluated, result is %s.\n",
+                          m_should_stop ? "true" : "false");
               } else {
                 m_should_stop = true;
-                if (log)
-                  log->Printf(
-                      "Failed to get an integer result from the expression.");
+                LLDB_LOGF(
+                    log,
+                    "Failed to get an integer result from the expression.");
               }
             }
           } else {
@@ -836,8 +831,7 @@
             error_sp->Printf(": \"%s\"", wp_sp->GetConditionText());
             error_sp->EOL();
             const char *err_str = error.AsCString("<Unknown Error>");
-            if (log)
-              log->Printf("Error evaluating condition: \"%s\"\n", err_str);
+            LLDB_LOGF(log, "Error evaluating condition: \"%s\"\n", err_str);
 
             error_sp->PutCString(err_str);
             error_sp->EOL();
@@ -889,14 +883,13 @@
         Log *log_process(
             lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_PROCESS));
 
-        if (log_process)
-          log_process->Printf(
-              "Process::%s could not find watchpoint id: %" PRId64 "...",
-              __FUNCTION__, m_value);
+        LLDB_LOGF(log_process,
+                  "Process::%s could not find watchpoint id: %" PRId64 "...",
+                  __FUNCTION__, m_value);
       }
-      if (log)
-        log->Printf("Process::%s returning from action with m_should_stop: %d.",
-                    __FUNCTION__, m_should_stop);
+      LLDB_LOGF(log,
+                "Process::%s returning from action with m_should_stop: %d.",
+                __FUNCTION__, m_should_stop);
 
       m_should_stop_is_valid = true;
     }
diff --git a/src/llvm-project/lldb/source/Target/Target.cpp b/src/llvm-project/lldb/source/Target/Target.cpp
index 4941cb5..83e6f30 100644
--- a/src/llvm-project/lldb/source/Target/Target.cpp
+++ b/src/llvm-project/lldb/source/Target/Target.cpp
@@ -71,7 +71,7 @@
     : m_spec(spec),
       m_plugin_up(PluginManager::CreateArchitectureInstance(spec)) {}
 
-const Target::Arch& Target::Arch::operator=(const ArchSpec &spec) {
+const Target::Arch &Target::Arch::operator=(const ArchSpec &spec) {
   m_spec = spec;
   m_plugin_up = PluginManager::CreateArchitectureInstance(spec);
   return *this;
@@ -106,21 +106,19 @@
 
   CheckInWithManager();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p Target::Target()", static_cast<void *>(this));
+  LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT),
+           "{0} Target::Target()", static_cast<void *>(this));
   if (target_arch.IsValid()) {
-    LogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET,
-                          "Target::Target created with architecture %s (%s)",
-                          target_arch.GetArchitectureName(),
-                          target_arch.GetTriple().getTriple().c_str());
+    LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TARGET),
+             "Target::Target created with architecture {0} ({1})",
+             target_arch.GetArchitectureName(),
+             target_arch.GetTriple().getTriple().c_str());
   }
 }
 
 Target::~Target() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p Target::~Target()", static_cast<void *>(this));
+  LLDB_LOG(log, "{0} Target::~Target()", static_cast<void *>(this));
   DeleteCurrentProcess();
 }
 
@@ -137,10 +135,9 @@
     BreakpointSP new_bp(new Breakpoint(*this, *breakpoint_sp.get()));
     AddBreakpoint(new_bp, false);
   }
-  
-  for (auto bp_name_entry : target->m_breakpoint_names)
-  {
-    
+
+  for (auto bp_name_entry : target->m_breakpoint_names) {
+
     BreakpointName *new_bp_name = new BreakpointName(*bp_name_entry.second);
     AddBreakpointName(new_bp_name);
   }
@@ -209,13 +206,11 @@
 lldb::REPLSP Target::GetREPL(Status &err, lldb::LanguageType language,
                              const char *repl_options, bool can_create) {
   if (language == eLanguageTypeUnknown) {
-    std::set<LanguageType> repl_languages;
+    LanguageSet repl_languages = Language::GetLanguagesSupportingREPLs();
 
-    Language::GetLanguagesSupportingREPLs(repl_languages);
-
-    if (repl_languages.size() == 1) {
-      language = *repl_languages.begin();
-    } else if (repl_languages.size() == 0) {
+    if (auto single_lang = repl_languages.GetSingularLanguage()) {
+      language = *single_lang;
+    } else if (repl_languages.Empty()) {
       err.SetErrorStringWithFormat(
           "LLDB isn't configured with REPL support for any languages.");
       return REPLSP();
@@ -310,14 +305,14 @@
     const FileSpecList *containingModules,
     const FileSpecList *source_file_spec_list,
     const std::unordered_set<std::string> &function_names,
-    RegularExpression &source_regex, bool internal, bool hardware,
+    RegularExpression source_regex, bool internal, bool hardware,
     LazyBool move_to_nearest_code) {
   SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList(
       containingModules, source_file_spec_list));
   if (move_to_nearest_code == eLazyBoolCalculate)
     move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : eLazyBoolNo;
   BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex(
-      nullptr, source_regex, function_names,
+      nullptr, std::move(source_regex), function_names,
       !static_cast<bool>(move_to_nearest_code)));
 
   return CreateBreakpoint(filter_sp, resolver_sp, internal, hardware, true);
@@ -409,8 +404,8 @@
                                         bool request_hardware) {
   SearchFilterSP filter_sp(
       new SearchFilterForUnconstrainedSearches(shared_from_this()));
-  BreakpointResolverSP resolver_sp(
-      new BreakpointResolverAddress(nullptr, file_addr, file_spec));
+  BreakpointResolverSP resolver_sp(new BreakpointResolverAddress(
+      nullptr, file_addr, file_spec ? *file_spec : FileSpec()));
   return CreateBreakpoint(filter_sp, resolver_sp, internal, request_hardware,
                           false);
 }
@@ -552,7 +547,7 @@
 
 BreakpointSP Target::CreateFuncRegexBreakpoint(
     const FileSpecList *containingModules,
-    const FileSpecList *containingSourceFiles, RegularExpression &func_regex,
+    const FileSpecList *containingSourceFiles, RegularExpression func_regex,
     lldb::LanguageType requested_language, LazyBool skip_prologue,
     bool internal, bool hardware) {
   SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList(
@@ -561,7 +556,7 @@
                   ? GetSkipPrologue()
                   : static_cast<bool>(skip_prologue);
   BreakpointResolverSP resolver_sp(new BreakpointResolverName(
-      nullptr, func_regex, requested_language, 0, skip));
+      nullptr, std::move(func_regex), requested_language, 0, skip));
 
   return CreateBreakpoint(filter_sp, resolver_sp, internal, hardware, true);
 }
@@ -584,46 +579,40 @@
   return exc_bkpt_sp;
 }
 
-lldb::BreakpointSP
-Target::CreateScriptedBreakpoint(const llvm::StringRef class_name,
-                                 const FileSpecList *containingModules,
-                                 const FileSpecList *containingSourceFiles,
-                                 bool internal,
-                                 bool request_hardware,
-                                 StructuredData::ObjectSP extra_args_sp,
-                                 Status *creation_error)
-{
+lldb::BreakpointSP Target::CreateScriptedBreakpoint(
+    const llvm::StringRef class_name, const FileSpecList *containingModules,
+    const FileSpecList *containingSourceFiles, bool internal,
+    bool request_hardware, StructuredData::ObjectSP extra_args_sp,
+    Status *creation_error) {
   SearchFilterSP filter_sp;
-  
+
   lldb::SearchDepth depth = lldb::eSearchDepthTarget;
-  bool has_files = containingSourceFiles && containingSourceFiles->GetSize() > 0;
+  bool has_files =
+      containingSourceFiles && containingSourceFiles->GetSize() > 0;
   bool has_modules = containingModules && containingModules->GetSize() > 0;
-  
+
   if (has_files && has_modules) {
-    filter_sp = GetSearchFilterForModuleAndCUList(
-      containingModules, containingSourceFiles);
+    filter_sp = GetSearchFilterForModuleAndCUList(containingModules,
+                                                  containingSourceFiles);
   } else if (has_files) {
-    filter_sp = GetSearchFilterForModuleAndCUList(
-      nullptr, containingSourceFiles);
+    filter_sp =
+        GetSearchFilterForModuleAndCUList(nullptr, containingSourceFiles);
   } else if (has_modules) {
     filter_sp = GetSearchFilterForModuleList(containingModules);
   } else {
     filter_sp = std::make_shared<SearchFilterForUnconstrainedSearches>(
         shared_from_this());
   }
-  
+
   StructuredDataImpl *extra_args_impl = new StructuredDataImpl();
   if (extra_args_sp)
     extra_args_impl->SetObjectSP(extra_args_sp);
 
   BreakpointResolverSP resolver_sp(new BreakpointResolverScripted(
-      nullptr, class_name, depth, extra_args_impl,
-      *GetDebugger().GetScriptInterpreter()));
+      nullptr, class_name, depth, extra_args_impl));
   return CreateBreakpoint(filter_sp, resolver_sp, internal, false, true);
-
 }
 
-
 BreakpointSP Target::CreateBreakpoint(SearchFilterSP &filter_sp,
                                       BreakpointResolverSP &resolver_sp,
                                       bool internal, bool request_hardware,
@@ -651,8 +640,8 @@
   if (log) {
     StreamString s;
     bp_sp->GetDescription(&s, lldb::eDescriptionLevelVerbose);
-    log->Printf("Target::%s (internal = %s) => break_id = %s\n", __FUNCTION__,
-                bp_sp->IsInternal() ? "yes" : "no", s.GetData());
+    LLDB_LOGF(log, "Target::%s (internal = %s) => break_id = %s\n",
+              __FUNCTION__, bp_sp->IsInternal() ? "yes" : "no", s.GetData());
   }
 
   bp_sp->ResolveBreakpoint();
@@ -662,71 +651,61 @@
   }
 }
 
-void Target::AddNameToBreakpoint(BreakpointID &id,
-                                 const char *name,
-                                 Status &error)
- {
-   BreakpointSP bp_sp 
-       = m_breakpoint_list.FindBreakpointByID(id.GetBreakpointID());
-   if (!bp_sp)
-   {
-     StreamString s;
-     id.GetDescription(&s, eDescriptionLevelBrief);
-     error.SetErrorStringWithFormat("Could not find breakpoint %s", 
-                                    s.GetData());
-     return;
-   }
-   AddNameToBreakpoint(bp_sp, name, error);
- }
+void Target::AddNameToBreakpoint(BreakpointID &id, const char *name,
+                                 Status &error) {
+  BreakpointSP bp_sp =
+      m_breakpoint_list.FindBreakpointByID(id.GetBreakpointID());
+  if (!bp_sp) {
+    StreamString s;
+    id.GetDescription(&s, eDescriptionLevelBrief);
+    error.SetErrorStringWithFormat("Could not find breakpoint %s", s.GetData());
+    return;
+  }
+  AddNameToBreakpoint(bp_sp, name, error);
+}
 
-void Target::AddNameToBreakpoint(BreakpointSP &bp_sp,
-                                 const char *name, 
-                                 Status &error)
- {
-   if (!bp_sp)
-     return;
-     
-   BreakpointName *bp_name = FindBreakpointName(ConstString(name), true, error);
-   if (!bp_name)
-     return;
+void Target::AddNameToBreakpoint(BreakpointSP &bp_sp, const char *name,
+                                 Status &error) {
+  if (!bp_sp)
+    return;
 
-   bp_name->ConfigureBreakpoint(bp_sp);
-   bp_sp->AddName(name);
- }
+  BreakpointName *bp_name = FindBreakpointName(ConstString(name), true, error);
+  if (!bp_name)
+    return;
+
+  bp_name->ConfigureBreakpoint(bp_sp);
+  bp_sp->AddName(name);
+}
 
 void Target::AddBreakpointName(BreakpointName *bp_name) {
   m_breakpoint_names.insert(std::make_pair(bp_name->GetName(), bp_name));
 }
 
-BreakpointName *Target::FindBreakpointName(ConstString name, 
-                                           bool can_create, 
-                                           Status &error)
-{
+BreakpointName *Target::FindBreakpointName(ConstString name, bool can_create,
+                                           Status &error) {
   BreakpointID::StringIsBreakpointName(name.GetStringRef(), error);
   if (!error.Success())
     return nullptr;
 
   BreakpointNameList::iterator iter = m_breakpoint_names.find(name);
   if (iter == m_breakpoint_names.end()) {
-    if (!can_create)
-    {
+    if (!can_create) {
       error.SetErrorStringWithFormat("Breakpoint name \"%s\" doesn't exist and "
-                                     "can_create is false.", name.AsCString());
+                                     "can_create is false.",
+                                     name.AsCString());
       return nullptr;
     }
 
-    iter = m_breakpoint_names.insert(std::make_pair(name,
-                                                    new BreakpointName(name)))
-                                                        .first;
+    iter = m_breakpoint_names
+               .insert(std::make_pair(name, new BreakpointName(name)))
+               .first;
   }
   return (iter->second);
 }
 
-void
-Target::DeleteBreakpointName(ConstString name)
-{
+void Target::DeleteBreakpointName(ConstString name) {
   BreakpointNameList::iterator iter = m_breakpoint_names.find(name);
-  
+
   if (iter != m_breakpoint_names.end()) {
     const char *name_cstr = name.AsCString();
     m_breakpoint_names.erase(iter);
@@ -736,31 +715,34 @@
 }
 
 void Target::RemoveNameFromBreakpoint(lldb::BreakpointSP &bp_sp,
-                                ConstString name)
-{
+                                      ConstString name) {
   bp_sp->RemoveName(name.AsCString());
 }
 
-void Target::ConfigureBreakpointName(BreakpointName &bp_name,
-                               const BreakpointOptions &new_options,
-                               const BreakpointName::Permissions &new_permissions)
-{
+void Target::ConfigureBreakpointName(
+    BreakpointName &bp_name, const BreakpointOptions &new_options,
+    const BreakpointName::Permissions &new_permissions) {
   bp_name.GetOptions().CopyOverSetOptions(new_options);
   bp_name.GetPermissions().MergeInto(new_permissions);
   ApplyNameToBreakpoints(bp_name);
 }
 
 void Target::ApplyNameToBreakpoints(BreakpointName &bp_name) {
-  BreakpointList bkpts_with_name(false);
-  m_breakpoint_list.FindBreakpointsByName(bp_name.GetName().AsCString(), 
-                                          bkpts_with_name);
+  llvm::Expected<std::vector<BreakpointSP>> expected_vector =
+      m_breakpoint_list.FindBreakpointsByName(bp_name.GetName().AsCString());
 
-  for (auto bp_sp : bkpts_with_name.Breakpoints())
+  if (!expected_vector) {
+    LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS),
+             "invalid breakpoint name: {}",
+             llvm::toString(expected_vector.takeError()));
+    return;
+  }
+
+  for (auto bp_sp : *expected_vector)
     bp_name.ConfigureBreakpoint(bp_sp);
 }
 
-void Target::GetBreakpointNames(std::vector<std::string> &names)
-{
+void Target::GetBreakpointNames(std::vector<std::string> &names) {
   names.clear();
   for (auto bp_name : m_breakpoint_names) {
     names.push_back(bp_name.first.AsCString());
@@ -797,10 +779,10 @@
                                       const CompilerType *type, uint32_t kind,
                                       Status &error) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s (addr = 0x%8.8" PRIx64 " size = %" PRIu64
-                " type = %u)\n",
-                __FUNCTION__, addr, (uint64_t)size, kind);
+  LLDB_LOGF(log,
+            "Target::%s (addr = 0x%8.8" PRIx64 " size = %" PRIu64
+            " type = %u)\n",
+            __FUNCTION__, addr, (uint64_t)size, kind);
 
   WatchpointSP wp_sp;
   if (!ProcessIsValid()) {
@@ -855,10 +837,9 @@
   }
 
   error = m_process_sp->EnableWatchpoint(wp_sp.get(), notify);
-  if (log)
-    log->Printf("Target::%s (creation of watchpoint %s with id = %u)\n",
-                __FUNCTION__, error.Success() ? "succeeded" : "failed",
-                wp_sp->GetID());
+  LLDB_LOGF(log, "Target::%s (creation of watchpoint %s with id = %u)\n",
+            __FUNCTION__, error.Success() ? "succeeded" : "failed",
+            wp_sp->GetID());
 
   if (error.Fail()) {
     // Enabling the watchpoint on the device side failed. Remove the said
@@ -875,22 +856,19 @@
   return wp_sp;
 }
 
-void Target::RemoveAllowedBreakpoints ()
-{
+void Target::RemoveAllowedBreakpoints() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Target::%s \n", __FUNCTION__);
+  LLDB_LOGF(log, "Target::%s \n", __FUNCTION__);
 
   m_breakpoint_list.RemoveAllowed(true);
-  
+
   m_last_created_breakpoint.reset();
 }
 
 void Target::RemoveAllBreakpoints(bool internal_also) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Target::%s (internal_also = %s)\n", __FUNCTION__,
-                internal_also ? "yes" : "no");
+  LLDB_LOGF(log, "Target::%s (internal_also = %s)\n", __FUNCTION__,
+            internal_also ? "yes" : "no");
 
   m_breakpoint_list.RemoveAll(true);
   if (internal_also)
@@ -901,9 +879,8 @@
 
 void Target::DisableAllBreakpoints(bool internal_also) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Target::%s (internal_also = %s)\n", __FUNCTION__,
-                internal_also ? "yes" : "no");
+  LLDB_LOGF(log, "Target::%s (internal_also = %s)\n", __FUNCTION__,
+            internal_also ? "yes" : "no");
 
   m_breakpoint_list.SetEnabledAll(false);
   if (internal_also)
@@ -912,17 +889,15 @@
 
 void Target::DisableAllowedBreakpoints() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Target::%s", __FUNCTION__);
+  LLDB_LOGF(log, "Target::%s", __FUNCTION__);
 
   m_breakpoint_list.SetEnabledAllowed(false);
 }
 
 void Target::EnableAllBreakpoints(bool internal_also) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Target::%s (internal_also = %s)\n", __FUNCTION__,
-                internal_also ? "yes" : "no");
+  LLDB_LOGF(log, "Target::%s (internal_also = %s)\n", __FUNCTION__,
+            internal_also ? "yes" : "no");
 
   m_breakpoint_list.SetEnabledAll(true);
   if (internal_also)
@@ -931,17 +906,15 @@
 
 void Target::EnableAllowedBreakpoints() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Target::%s", __FUNCTION__);
+  LLDB_LOGF(log, "Target::%s", __FUNCTION__);
 
   m_breakpoint_list.SetEnabledAllowed(true);
 }
 
 bool Target::RemoveBreakpointByID(break_id_t break_id) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Target::%s (break_id = %i, internal = %s)\n", __FUNCTION__,
-                break_id, LLDB_BREAK_ID_IS_INTERNAL(break_id) ? "yes" : "no");
+  LLDB_LOGF(log, "Target::%s (break_id = %i, internal = %s)\n", __FUNCTION__,
+            break_id, LLDB_BREAK_ID_IS_INTERNAL(break_id) ? "yes" : "no");
 
   if (DisableBreakpointByID(break_id)) {
     if (LLDB_BREAK_ID_IS_INTERNAL(break_id))
@@ -960,9 +933,8 @@
 
 bool Target::DisableBreakpointByID(break_id_t break_id) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Target::%s (break_id = %i, internal = %s)\n", __FUNCTION__,
-                break_id, LLDB_BREAK_ID_IS_INTERNAL(break_id) ? "yes" : "no");
+  LLDB_LOGF(log, "Target::%s (break_id = %i, internal = %s)\n", __FUNCTION__,
+            break_id, LLDB_BREAK_ID_IS_INTERNAL(break_id) ? "yes" : "no");
 
   BreakpointSP bp_sp;
 
@@ -979,9 +951,8 @@
 
 bool Target::EnableBreakpointByID(break_id_t break_id) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS));
-  if (log)
-    log->Printf("Target::%s (break_id = %i, internal = %s)\n", __FUNCTION__,
-                break_id, LLDB_BREAK_ID_IS_INTERNAL(break_id) ? "yes" : "no");
+  LLDB_LOGF(log, "Target::%s (break_id = %i, internal = %s)\n", __FUNCTION__,
+            break_id, LLDB_BREAK_ID_IS_INTERNAL(break_id) ? "yes" : "no");
 
   BreakpointSP bp_sp;
 
@@ -1031,10 +1002,9 @@
   }
 
   StreamFile out_file(path.c_str(),
-                      File::OpenOptions::eOpenOptionTruncate |
-                          File::OpenOptions::eOpenOptionWrite |
-                          File::OpenOptions::eOpenOptionCanCreate |
-                          File::OpenOptions::eOpenOptionCloseOnExec,
+                      File::eOpenOptionTruncate | File::eOpenOptionWrite |
+                          File::eOpenOptionCanCreate |
+                          File::eOpenOptionCloseOnExec,
                       lldb::eFilePermissionsFileDefault);
   if (!out_file.GetFile().IsValid()) {
     error.SetErrorStringWithFormat("Unable to open output file: %s.",
@@ -1159,8 +1129,7 @@
 // to end operations.
 bool Target::RemoveAllWatchpoints(bool end_to_end) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s\n", __FUNCTION__);
+  LLDB_LOGF(log, "Target::%s\n", __FUNCTION__);
 
   if (!end_to_end) {
     m_watchpoint_list.RemoveAll(true);
@@ -1191,8 +1160,7 @@
 // to end operations.
 bool Target::DisableAllWatchpoints(bool end_to_end) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s\n", __FUNCTION__);
+  LLDB_LOGF(log, "Target::%s\n", __FUNCTION__);
 
   if (!end_to_end) {
     m_watchpoint_list.SetEnabledAll(false);
@@ -1221,8 +1189,7 @@
 // to end operations.
 bool Target::EnableAllWatchpoints(bool end_to_end) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s\n", __FUNCTION__);
+  LLDB_LOGF(log, "Target::%s\n", __FUNCTION__);
 
   if (!end_to_end) {
     m_watchpoint_list.SetEnabledAll(true);
@@ -1250,8 +1217,7 @@
 // Assumption: Caller holds the list mutex lock for m_watchpoint_list.
 bool Target::ClearAllWatchpointHitCounts() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s\n", __FUNCTION__);
+  LLDB_LOGF(log, "Target::%s\n", __FUNCTION__);
 
   size_t num_watchpoints = m_watchpoint_list.GetSize();
   for (size_t i = 0; i < num_watchpoints; ++i) {
@@ -1267,8 +1233,7 @@
 // Assumption: Caller holds the list mutex lock for m_watchpoint_list.
 bool Target::ClearAllWatchpointHistoricValues() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s\n", __FUNCTION__);
+  LLDB_LOGF(log, "Target::%s\n", __FUNCTION__);
 
   size_t num_watchpoints = m_watchpoint_list.GetSize();
   for (size_t i = 0; i < num_watchpoints; ++i) {
@@ -1285,8 +1250,7 @@
 // these operations.
 bool Target::IgnoreAllWatchpoints(uint32_t ignore_count) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s\n", __FUNCTION__);
+  LLDB_LOGF(log, "Target::%s\n", __FUNCTION__);
 
   if (!ProcessIsValid())
     return false;
@@ -1305,8 +1269,7 @@
 // Assumption: Caller holds the list mutex lock for m_watchpoint_list.
 bool Target::DisableWatchpointByID(lldb::watch_id_t watch_id) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s (watch_id = %i)\n", __FUNCTION__, watch_id);
+  LLDB_LOGF(log, "Target::%s (watch_id = %i)\n", __FUNCTION__, watch_id);
 
   if (!ProcessIsValid())
     return false;
@@ -1325,8 +1288,7 @@
 // Assumption: Caller holds the list mutex lock for m_watchpoint_list.
 bool Target::EnableWatchpointByID(lldb::watch_id_t watch_id) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s (watch_id = %i)\n", __FUNCTION__, watch_id);
+  LLDB_LOGF(log, "Target::%s (watch_id = %i)\n", __FUNCTION__, watch_id);
 
   if (!ProcessIsValid())
     return false;
@@ -1345,8 +1307,7 @@
 // Assumption: Caller holds the list mutex lock for m_watchpoint_list.
 bool Target::RemoveWatchpointByID(lldb::watch_id_t watch_id) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s (watch_id = %i)\n", __FUNCTION__, watch_id);
+  LLDB_LOGF(log, "Target::%s (watch_id = %i)\n", __FUNCTION__, watch_id);
 
   WatchpointSP watch_to_remove_sp = m_watchpoint_list.FindByID(watch_id);
   if (watch_to_remove_sp == m_last_created_watchpoint)
@@ -1363,8 +1324,7 @@
 bool Target::IgnoreWatchpointByID(lldb::watch_id_t watch_id,
                                   uint32_t ignore_count) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_WATCHPOINTS));
-  if (log)
-    log->Printf("Target::%s (watch_id = %i)\n", __FUNCTION__, watch_id);
+  LLDB_LOGF(log, "Target::%s (watch_id = %i)\n", __FUNCTION__, watch_id);
 
   if (!ProcessIsValid())
     return false;
@@ -1399,19 +1359,18 @@
                                            Target *target) {
   Status error;
   StreamString feedback_stream;
-  if (module_sp &&
-      !module_sp->LoadScriptingResourceInTarget(target, error,
-                                                &feedback_stream)) {
+  if (module_sp && !module_sp->LoadScriptingResourceInTarget(
+                       target, error, &feedback_stream)) {
     if (error.AsCString())
-      target->GetDebugger().GetErrorFile()->Printf(
+      target->GetDebugger().GetErrorStream().Printf(
           "unable to load scripting data for module %s - error reported was "
           "%s\n",
           module_sp->GetFileSpec().GetFileNameStrippingExtension().GetCString(),
           error.AsCString());
   }
   if (feedback_stream.GetSize())
-    target->GetDebugger().GetErrorFile()->Printf("%s\n",
-                                                 feedback_stream.GetData());
+    target->GetDebugger().GetErrorStream().Printf("%s\n",
+                                                  feedback_stream.GetData());
 }
 
 void Target::ClearModules(bool delete_locations) {
@@ -1440,7 +1399,8 @@
                        executable_sp->GetFileSpec().GetPath().c_str());
 
     const bool notify = true;
-    m_images.Append(executable_sp, notify); // The first image is our executable file
+    m_images.Append(executable_sp,
+                    notify); // The first image is our executable file
 
     // If we haven't set an architecture yet, reset our architecture based on
     // what we found in the executable module.
@@ -1471,8 +1431,7 @@
       ModuleList added_modules;
       executable_objfile->GetDependentModules(dependent_files);
       for (uint32_t i = 0; i < dependent_files.GetSize(); i++) {
-        FileSpec dependent_file_spec(
-            dependent_files.GetFileSpecPointerAtIndex(i));
+        FileSpec dependent_file_spec(dependent_files.GetFileSpecAtIndex(i));
         FileSpec platform_dependent_file_spec;
         if (m_platform_sp)
           m_platform_sp->GetFileWithUUID(dependent_file_spec, nullptr,
@@ -1481,10 +1440,10 @@
           platform_dependent_file_spec = dependent_file_spec;
 
         ModuleSpec module_spec(platform_dependent_file_spec, m_arch.GetSpec());
-        ModuleSP image_module_sp(GetOrCreateModule(module_spec, 
-                                 false /* notify */));
+        ModuleSP image_module_sp(
+            GetOrCreateModule(module_spec, false /* notify */));
         if (image_module_sp) {
-          added_modules.AppendIfNeeded (image_module_sp, false);
+          added_modules.AppendIfNeeded(image_module_sp, false);
           ObjectFile *objfile = image_module_sp->GetObjectFile();
           if (objfile)
             objfile->GetDependentModules(dependent_files);
@@ -1531,8 +1490,9 @@
         bool arch_changed, vendor_changed, os_changed, os_ver_changed,
             env_changed;
 
-        m_arch.GetSpec().PiecewiseTripleCompare(other, arch_changed, vendor_changed,
-                                      os_changed, os_ver_changed, env_changed);
+        m_arch.GetSpec().PiecewiseTripleCompare(other, arch_changed,
+                                                vendor_changed, os_changed,
+                                                os_ver_changed, env_changed);
 
         if (!arch_changed && !vendor_changed && !os_changed && !env_changed)
           replace_local_arch = false;
@@ -1554,10 +1514,9 @@
 
   // If we have an executable file, try to reset the executable to the desired
   // architecture
-  if (log)
-    log->Printf("Target::SetArchitecture changing architecture to %s (%s)",
-                arch_spec.GetArchitectureName(),
-                arch_spec.GetTriple().getTriple().c_str());
+  LLDB_LOGF(log, "Target::SetArchitecture changing architecture to %s (%s)",
+            arch_spec.GetArchitectureName(),
+            arch_spec.GetTriple().getTriple().c_str());
   m_arch = other;
   ModuleSP executable_sp = GetExecutableModule();
 
@@ -1565,16 +1524,15 @@
   // Need to do something about unsetting breakpoints.
 
   if (executable_sp) {
-    if (log)
-      log->Printf("Target::SetArchitecture Trying to select executable file "
-                  "architecture %s (%s)",
-                  arch_spec.GetArchitectureName(),
-                  arch_spec.GetTriple().getTriple().c_str());
+    LLDB_LOGF(log,
+              "Target::SetArchitecture Trying to select executable file "
+              "architecture %s (%s)",
+              arch_spec.GetArchitectureName(),
+              arch_spec.GetTriple().getTriple().c_str());
     ModuleSpec module_spec(executable_sp->GetFileSpec(), other);
     FileSpecList search_paths = GetExecutableSearchPaths();
     Status error = ModuleList::GetSharedModule(module_spec, executable_sp,
-                                               &search_paths,
-                                               nullptr, nullptr);
+                                               &search_paths, nullptr, nullptr);
 
     if (!error.Fail() && executable_sp) {
       SetExecutableModule(executable_sp, eLoadDependentsYes);
@@ -1591,11 +1549,11 @@
       // The current target arch is compatible with "arch_spec", see if we can
       // improve our current architecture using bits from "arch_spec"
 
-      if (log)
-        log->Printf("Target::MergeArchitecture target has arch %s, merging with "
-                    "arch %s", 
-                    m_arch.GetSpec().GetTriple().getTriple().c_str(),
-                    arch_spec.GetTriple().getTriple().c_str());
+      LLDB_LOGF(log,
+                "Target::MergeArchitecture target has arch %s, merging with "
+                "arch %s",
+                m_arch.GetSpec().GetTriple().getTriple().c_str(),
+                arch_spec.GetTriple().getTriple().c_str());
 
       // Merge bits from arch_spec into "merged_arch" and set our architecture
       ArchSpec merged_arch(m_arch.GetSpec());
@@ -1612,7 +1570,7 @@
 void Target::NotifyWillClearList(const ModuleList &module_list) {}
 
 void Target::NotifyModuleAdded(const ModuleList &module_list,
-                         const ModuleSP &module_sp) {
+                               const ModuleSP &module_sp) {
   // A module is being added to this target for the first time
   if (m_valid) {
     ModuleList my_module_list;
@@ -1622,7 +1580,7 @@
 }
 
 void Target::NotifyModuleRemoved(const ModuleList &module_list,
-                           const ModuleSP &module_sp) {
+                                 const ModuleSP &module_sp) {
   // A module is being removed from this target.
   if (m_valid) {
     ModuleList my_module_list;
@@ -1632,8 +1590,8 @@
 }
 
 void Target::NotifyModuleUpdated(const ModuleList &module_list,
-                           const ModuleSP &old_module_sp,
-                           const ModuleSP &new_module_sp) {
+                                 const ModuleSP &old_module_sp,
+                                 const ModuleSP &new_module_sp) {
   // A module is replacing an already added module
   if (m_valid) {
     m_breakpoint_list.UpdateBreakpointsWhenModuleIsReplaced(old_module_sp,
@@ -1644,10 +1602,9 @@
 }
 
 void Target::NotifyModulesRemoved(lldb_private::ModuleList &module_list) {
-  ModulesDidUnload (module_list, false);
+  ModulesDidUnload(module_list, false);
 }
 
-
 void Target::ModulesDidLoad(ModuleList &module_list) {
   const size_t num_images = module_list.GetSize();
   if (m_valid && num_images) {
@@ -1696,11 +1653,11 @@
   if (GetBreakpointsConsultPlatformAvoidList()) {
     ModuleList matchingModules;
     ModuleSpec module_spec(module_file_spec);
-    size_t num_modules = GetImages().FindModules(module_spec, matchingModules);
+    GetImages().FindModules(module_spec, matchingModules);
+    size_t num_modules = matchingModules.GetSize();
 
-    // If there is more than one module for this file spec, only return true if
-    // ALL the modules are on the
-    // black list.
+    // If there is more than one module for this file spec, only
+    // return true if ALL the modules are on the black list.
     if (num_modules > 0) {
       for (size_t i = 0; i < num_modules; i++) {
         if (!ModuleIsExcludedForUnconstrainedSearches(
@@ -1967,8 +1924,8 @@
                                    Status &error, Address &pointer_addr) {
   Scalar scalar;
   if (ReadScalarIntegerFromMemory(addr, prefer_file_cache,
-                                  m_arch.GetSpec().GetAddressByteSize(), false, scalar,
-                                  error)) {
+                                  m_arch.GetSpec().GetAddressByteSize(), false,
+                                  scalar, error)) {
     addr_t pointer_vm_addr = scalar.ULongLong(LLDB_INVALID_ADDRESS);
     if (pointer_vm_addr != LLDB_INVALID_ADDRESS) {
       SectionLoadList &section_load_list = GetSectionLoadList();
@@ -2021,8 +1978,8 @@
         transformed_spec.GetFileSpec().GetFilename() =
             module_spec.GetFileSpec().GetFilename();
         error = ModuleList::GetSharedModule(transformed_spec, module_sp,
-                                            &search_paths,
-                                            &old_module_sp, &did_create_module);
+                                            &search_paths, &old_module_sp,
+                                            &did_create_module);
       }
     }
 
@@ -2037,9 +1994,9 @@
       // cache.
       if (module_spec.GetUUID().IsValid()) {
         // We have a UUID, it is OK to check the global module list...
-        error = ModuleList::GetSharedModule(module_spec, module_sp,
-                                            &search_paths,
-                                            &old_module_sp, &did_create_module);
+        error =
+            ModuleList::GetSharedModule(module_spec, module_sp, &search_paths,
+                                        &old_module_sp, &did_create_module);
       }
 
       if (!module_sp) {
@@ -2047,8 +2004,8 @@
         // module in the shared module cache.
         if (m_platform_sp) {
           error = m_platform_sp->GetSharedModule(
-              module_spec, m_process_sp.get(), module_sp,
-              &search_paths, &old_module_sp, &did_create_module);
+              module_spec, m_process_sp.get(), module_sp, &search_paths,
+              &old_module_sp, &did_create_module);
         } else {
           error.SetErrorString("no platform is currently set");
         }
@@ -2107,11 +2064,9 @@
             module_spec_copy.GetUUID().Clear();
 
             ModuleList found_modules;
-            size_t num_found =
-                m_images.FindModules(module_spec_copy, found_modules);
-            if (num_found == 1) {
+            m_images.FindModules(module_spec_copy, found_modules);
+            if (found_modules.GetSize() == 1)
               old_module_sp = found_modules.GetModuleAtIndex(0);
-            }
           }
         }
 
@@ -2120,9 +2075,8 @@
         if (GetPreloadSymbols())
           module_sp->PreloadSymbols();
 
-        if (old_module_sp &&
-            m_images.GetIndexForModule(old_module_sp.get()) !=
-                LLDB_INVALID_INDEX32) {
+        if (old_module_sp && m_images.GetIndexForModule(old_module_sp.get()) !=
+                                 LLDB_INVALID_INDEX32) {
           m_images.ReplaceModule(old_module_sp, module_sp);
           Module *old_module_ptr = old_module_sp.get();
           old_module_sp.reset();
@@ -2164,34 +2118,28 @@
     target->SetExecutableModule(exe_module_sp, eLoadDependentsYes);
 }
 
-TypeSystem *Target::GetScratchTypeSystemForLanguage(Status *error,
-                                                    lldb::LanguageType language,
-                                                    bool create_on_demand) {
+llvm::Expected<TypeSystem &>
+Target::GetScratchTypeSystemForLanguage(lldb::LanguageType language,
+                                        bool create_on_demand) {
   if (!m_valid)
-    return nullptr;
-
-  if (error) {
-    error->Clear();
-  }
+    return llvm::make_error<llvm::StringError>("Invalid Target",
+                                               llvm::inconvertibleErrorCode());
 
   if (language == eLanguageTypeMipsAssembler // GNU AS and LLVM use it for all
                                              // assembly code
       || language == eLanguageTypeUnknown) {
-    std::set<lldb::LanguageType> languages_for_types;
-    std::set<lldb::LanguageType> languages_for_expressions;
+    LanguageSet languages_for_expressions =
+        Language::GetLanguagesSupportingTypeSystemsForExpressions();
 
-    Language::GetLanguagesSupportingTypeSystems(languages_for_types,
-                                                languages_for_expressions);
-
-    if (languages_for_expressions.count(eLanguageTypeC)) {
+    if (languages_for_expressions[eLanguageTypeC]) {
       language = eLanguageTypeC; // LLDB's default.  Override by setting the
                                  // target language.
     } else {
-      if (languages_for_expressions.empty()) {
-        return nullptr;
-      } else {
-        language = *languages_for_expressions.begin();
-      }
+      if (languages_for_expressions.Empty())
+        return llvm::make_error<llvm::StringError>(
+            "No expression support for any languages",
+            llvm::inconvertibleErrorCode());
+      language = (LanguageType)languages_for_expressions.bitvector.find_first();
     }
   }
 
@@ -2199,39 +2147,63 @@
                                                             create_on_demand);
 }
 
+std::vector<TypeSystem *> Target::GetScratchTypeSystems(bool create_on_demand) {
+  if (!m_valid)
+    return {};
+
+  std::vector<TypeSystem *> scratch_type_systems;
+
+  LanguageSet languages_for_expressions =
+      Language::GetLanguagesSupportingTypeSystemsForExpressions();
+
+  for (auto bit : languages_for_expressions.bitvector.set_bits()) {
+    auto language = (LanguageType)bit;
+    auto type_system_or_err =
+        GetScratchTypeSystemForLanguage(language, create_on_demand);
+    if (!type_system_or_err)
+      LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET),
+                     type_system_or_err.takeError(),
+                     "Language '{}' has expression support but no scratch type "
+                     "system available",
+                     Language::GetNameForLanguageType(language));
+    else
+      scratch_type_systems.emplace_back(&type_system_or_err.get());
+  }
+
+  return scratch_type_systems;
+}
+
 PersistentExpressionState *
 Target::GetPersistentExpressionStateForLanguage(lldb::LanguageType language) {
-  TypeSystem *type_system =
-      GetScratchTypeSystemForLanguage(nullptr, language, true);
+  auto type_system_or_err = GetScratchTypeSystemForLanguage(language, true);
 
-  if (type_system) {
-    return type_system->GetPersistentExpressionState();
-  } else {
+  if (auto err = type_system_or_err.takeError()) {
+    LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET),
+                   std::move(err),
+                   "Unable to get persistent expression state for language {}",
+                   Language::GetNameForLanguageType(language));
     return nullptr;
   }
+
+  return type_system_or_err->GetPersistentExpressionState();
 }
 
 UserExpression *Target::GetUserExpressionForLanguage(
     llvm::StringRef expr, llvm::StringRef prefix, lldb::LanguageType language,
     Expression::ResultType desired_type,
-    const EvaluateExpressionOptions &options,
-    ValueObject *ctx_obj, Status &error) {
-  Status type_system_error;
-
-  TypeSystem *type_system =
-      GetScratchTypeSystemForLanguage(&type_system_error, language);
-  UserExpression *user_expr = nullptr;
-
-  if (!type_system) {
+    const EvaluateExpressionOptions &options, ValueObject *ctx_obj,
+    Status &error) {
+  auto type_system_or_err = GetScratchTypeSystemForLanguage(language);
+  if (auto err = type_system_or_err.takeError()) {
     error.SetErrorStringWithFormat(
         "Could not find type system for language %s: %s",
         Language::GetNameForLanguageType(language),
-        type_system_error.AsCString());
+        llvm::toString(std::move(err)).c_str());
     return nullptr;
   }
 
-  user_expr = type_system->GetUserExpression(expr, prefix, language,
-                                             desired_type, options, ctx_obj);
+  auto *user_expr = type_system_or_err->GetUserExpression(
+      expr, prefix, language, desired_type, options, ctx_obj);
   if (!user_expr)
     error.SetErrorStringWithFormat(
         "Could not create an expression for language %s",
@@ -2244,21 +2216,17 @@
     lldb::LanguageType language, const CompilerType &return_type,
     const Address &function_address, const ValueList &arg_value_list,
     const char *name, Status &error) {
-  Status type_system_error;
-  TypeSystem *type_system =
-      GetScratchTypeSystemForLanguage(&type_system_error, language);
-  FunctionCaller *persistent_fn = nullptr;
-
-  if (!type_system) {
+  auto type_system_or_err = GetScratchTypeSystemForLanguage(language);
+  if (auto err = type_system_or_err.takeError()) {
     error.SetErrorStringWithFormat(
         "Could not find type system for language %s: %s",
         Language::GetNameForLanguageType(language),
-        type_system_error.AsCString());
-    return persistent_fn;
+        llvm::toString(std::move(err)).c_str());
+    return nullptr;
   }
 
-  persistent_fn = type_system->GetFunctionCaller(return_type, function_address,
-                                                 arg_value_list, name);
+  auto *persistent_fn = type_system_or_err->GetFunctionCaller(
+      return_type, function_address, arg_value_list, name);
   if (!persistent_fn)
     error.SetErrorStringWithFormat(
         "Could not create an expression for language %s",
@@ -2271,20 +2239,17 @@
 Target::GetUtilityFunctionForLanguage(const char *text,
                                       lldb::LanguageType language,
                                       const char *name, Status &error) {
-  Status type_system_error;
-  TypeSystem *type_system =
-      GetScratchTypeSystemForLanguage(&type_system_error, language);
-  UtilityFunction *utility_fn = nullptr;
+  auto type_system_or_err = GetScratchTypeSystemForLanguage(language);
 
-  if (!type_system) {
+  if (auto err = type_system_or_err.takeError()) {
     error.SetErrorStringWithFormat(
         "Could not find type system for language %s: %s",
         Language::GetNameForLanguageType(language),
-        type_system_error.AsCString());
-    return utility_fn;
+        llvm::toString(std::move(err)).c_str());
+    return nullptr;
   }
 
-  utility_fn = type_system->GetUtilityFunction(text, name);
+  auto *utility_fn = type_system_or_err->GetUtilityFunction(text, name);
   if (!utility_fn)
     error.SetErrorStringWithFormat(
         "Could not create an expression for language %s",
@@ -2293,15 +2258,6 @@
   return utility_fn;
 }
 
-ClangASTContext *Target::GetScratchClangASTContext(bool create_on_demand) {
-  if (m_valid) {
-    if (TypeSystem *type_system = GetScratchTypeSystemForLanguage(
-            nullptr, eLanguageTypeC, create_on_demand))
-      return llvm::dyn_cast<ClangASTContext>(type_system);
-  }
-  return nullptr;
-}
-
 ClangASTImporterSP Target::GetClangASTImporter() {
   if (m_valid) {
     if (!m_ast_importer_sp) {
@@ -2340,10 +2296,10 @@
 void Target::SetDefaultArchitecture(const ArchSpec &arch) {
   TargetPropertiesSP properties_sp(Target::GetGlobalProperties());
   if (properties_sp) {
-    LogIfAnyCategoriesSet(
-        LIBLLDB_LOG_TARGET, "Target::SetDefaultArchitecture setting target's "
-                            "default architecture to  %s (%s)",
-        arch.GetArchitectureName(), arch.GetTriple().getTriple().c_str());
+    LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TARGET),
+             "Target::SetDefaultArchitecture setting target's "
+             "default architecture to  {0} ({1})",
+             arch.GetArchitectureName(), arch.GetTriple().getTriple());
     return properties_sp->SetDefaultArchitecture(arch);
   }
 }
@@ -2378,7 +2334,8 @@
   bool old_suppress_value = m_suppress_stop_hooks;
   m_suppress_stop_hooks = true;
   auto on_exit = llvm::make_scope_exit([this, old_suppress_value]() {
-      m_suppress_stop_hooks = old_suppress_value; });
+    m_suppress_stop_hooks = old_suppress_value;
+  });
 
   ExecutionContext exe_ctx;
 
@@ -2392,13 +2349,19 @@
 
   // Make sure we aren't just trying to see the value of a persistent variable
   // (something like "$0")
-  lldb::ExpressionVariableSP persistent_var_sp;
   // Only check for persistent variables the expression starts with a '$'
-  if (expr[0] == '$')
-    persistent_var_sp = GetScratchTypeSystemForLanguage(nullptr, eLanguageTypeC)
-                            ->GetPersistentExpressionState()
-                            ->GetVariable(expr);
-
+  lldb::ExpressionVariableSP persistent_var_sp;
+  if (expr[0] == '$') {
+    auto type_system_or_err =
+            GetScratchTypeSystemForLanguage(eLanguageTypeC);
+    if (auto err = type_system_or_err.takeError()) {
+      LLDB_LOG_ERROR(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET),
+                     std::move(err), "Unable to get scratch type system");
+    } else {
+      persistent_var_sp =
+          type_system_or_err->GetPersistentExpressionState()->GetVariable(expr);
+    }
+  }
   if (persistent_var_sp) {
     result_valobj_sp = persistent_var_sp->GetValueObject();
     execution_results = eExpressionCompleted;
@@ -2415,8 +2378,7 @@
   return execution_results;
 }
 
-lldb::ExpressionVariableSP
-Target::GetPersistentVariable(ConstString name) {
+lldb::ExpressionVariableSP Target::GetPersistentVariable(ConstString name) {
   lldb::ExpressionVariableSP variable_sp;
   m_scratch_type_system_map.ForEach(
       [name, &variable_sp](TypeSystem *type_system) -> bool {
@@ -2448,24 +2410,61 @@
   return address;
 }
 
+llvm::Expected<lldb_private::Address> Target::GetEntryPointAddress() {
+  Module *exe_module = GetExecutableModulePointer();
+  llvm::Error error = llvm::Error::success();
+  assert(!error); // Check the success value when assertions are enabled.
+
+  if (!exe_module || !exe_module->GetObjectFile()) {
+    error = llvm::make_error<llvm::StringError>("No primary executable found",
+                                                llvm::inconvertibleErrorCode());
+  } else {
+    Address entry_addr = exe_module->GetObjectFile()->GetEntryPointAddress();
+    if (entry_addr.IsValid())
+      return entry_addr;
+
+    error = llvm::make_error<llvm::StringError>(
+        "Could not find entry point address for executable module \"" +
+            exe_module->GetFileSpec().GetFilename().GetStringRef() + "\"",
+        llvm::inconvertibleErrorCode());
+  }
+
+  const ModuleList &modules = GetImages();
+  const size_t num_images = modules.GetSize();
+  for (size_t idx = 0; idx < num_images; ++idx) {
+    ModuleSP module_sp(modules.GetModuleAtIndex(idx));
+    if (!module_sp || !module_sp->GetObjectFile())
+      continue;
+
+    Address entry_addr = module_sp->GetObjectFile()->GetEntryPointAddress();
+    if (entry_addr.IsValid()) {
+      // Discard the error.
+      llvm::consumeError(std::move(error));
+      return entry_addr;
+    }
+  }
+
+  return std::move(error);
+}
+
 lldb::addr_t Target::GetCallableLoadAddress(lldb::addr_t load_addr,
                                             AddressClass addr_class) const {
   auto arch_plugin = GetArchitecturePlugin();
-  return arch_plugin ?
-      arch_plugin->GetCallableLoadAddress(load_addr, addr_class) : load_addr;
+  return arch_plugin
+             ? arch_plugin->GetCallableLoadAddress(load_addr, addr_class)
+             : load_addr;
 }
 
 lldb::addr_t Target::GetOpcodeLoadAddress(lldb::addr_t load_addr,
                                           AddressClass addr_class) const {
   auto arch_plugin = GetArchitecturePlugin();
-  return arch_plugin ?
-      arch_plugin->GetOpcodeLoadAddress(load_addr, addr_class) : load_addr;
+  return arch_plugin ? arch_plugin->GetOpcodeLoadAddress(load_addr, addr_class)
+                     : load_addr;
 }
 
 lldb::addr_t Target::GetBreakableLoadAddress(lldb::addr_t addr) {
   auto arch_plugin = GetArchitecturePlugin();
-  return arch_plugin ?
-      arch_plugin->GetBreakableLoadAddress(addr, *this) : addr;
+  return arch_plugin ? arch_plugin->GetBreakableLoadAddress(addr, *this) : addr;
 }
 
 SourceManager &Target::GetSourceManager() {
@@ -2539,7 +2538,7 @@
 
   if (!m_process_sp)
     return;
-    
+
   // Somebody might have restarted the process:
   if (m_process_sp->GetState() != eStateStopped)
     return;
@@ -2658,11 +2657,12 @@
           // But only complain if there were more stop hooks to do:
           StopHookCollection::iterator tmp = pos;
           if (++tmp != end)
-            result.AppendMessageWithFormat("\nAborting stop hooks, hook %" PRIu64
-                                           " set the program running.\n"
-                                           "  Consider using '-G true' to make "
-                                           "stop hooks auto-continue.\n",
-                                           cur_hook_sp->GetID());
+            result.AppendMessageWithFormat(
+                "\nAborting stop hooks, hook %" PRIu64
+                " set the program running.\n"
+                "  Consider using '-G true' to make "
+                "stop hooks auto-continue.\n",
+                cur_hook_sp->GetID());
           keep_going = false;
           did_restart = true;
         }
@@ -2820,9 +2820,8 @@
   Status error;
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_TARGET));
 
-  if (log)
-    log->Printf("Target::%s() called for %s", __FUNCTION__,
-                launch_info.GetExecutableFile().GetPath().c_str());
+  LLDB_LOGF(log, "Target::%s() called for %s", __FUNCTION__,
+            launch_info.GetExecutableFile().GetPath().c_str());
 
   StateType state = eStateInvalid;
 
@@ -2834,14 +2833,12 @@
 
     if (process_sp) {
       state = process_sp->GetState();
-      if (log)
-        log->Printf(
-            "Target::%s the process exists, and its current state is %s",
-            __FUNCTION__, StateAsCString(state));
+      LLDB_LOGF(log,
+                "Target::%s the process exists, and its current state is %s",
+                __FUNCTION__, StateAsCString(state));
     } else {
-      if (log)
-        log->Printf("Target::%s the process instance doesn't currently exist.",
-                    __FUNCTION__);
+      LLDB_LOGF(log, "Target::%s the process instance doesn't currently exist.",
+                __FUNCTION__);
     }
   }
 
@@ -2873,24 +2870,23 @@
   // that can launch a process for debugging, go ahead and do that here.
   if (state != eStateConnected && platform_sp &&
       platform_sp->CanDebugProcess()) {
-    if (log)
-      log->Printf("Target::%s asking the platform to debug the process",
-                  __FUNCTION__);
+    LLDB_LOGF(log, "Target::%s asking the platform to debug the process",
+              __FUNCTION__);
 
     // If there was a previous process, delete it before we make the new one.
     // One subtle point, we delete the process before we release the reference
     // to m_process_sp.  That way even if we are the last owner, the process
     // will get Finalized before it gets destroyed.
     DeleteCurrentProcess();
-    
+
     m_process_sp =
         GetPlatform()->DebugProcess(launch_info, debugger, this, error);
 
   } else {
-    if (log)
-      log->Printf("Target::%s the platform doesn't know how to debug a "
-                  "process, getting a process plugin to do this for us.",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "Target::%s the platform doesn't know how to debug a "
+              "process, getting a process plugin to do this for us.",
+              __FUNCTION__);
 
     if (state == eStateConnected) {
       assert(m_process_sp);
@@ -2928,9 +2924,9 @@
       if (state == eStateStopped) {
         if (!launch_info.GetFlags().Test(eLaunchFlagStopAtEntry)) {
           if (synchronous_execution) {
-            // Now we have handled the stop-from-attach, and we are just switching
-            // to a synchronous resume.  So we should switch to the SyncResume
-            // hijacker.
+            // Now we have handled the stop-from-attach, and we are just
+            // switching to a synchronous resume.  So we should switch to the
+            // SyncResume hijacker.
             m_process_sp->RestoreProcessEvents();
             m_process_sp->ResumeSynchronous(stream);
           } else {
@@ -3172,7 +3168,7 @@
 
 void Target::StopHook::GetDescription(Stream *s,
                                       lldb::DescriptionLevel level) const {
-  int indent_level = s->GetIndentLevel();
+  unsigned indent_level = s->GetIndentLevel();
 
   s->SetIndentLevel(indent_level + 2);
 
@@ -3213,33 +3209,51 @@
   s->SetIndentLevel(indent_level);
 }
 
-// class TargetProperties
-
-// clang-format off
 static constexpr OptionEnumValueElement g_dynamic_value_types[] = {
-    {eNoDynamicValues, "no-dynamic-values",
-     "Don't calculate the dynamic type of values"},
-    {eDynamicCanRunTarget, "run-target", "Calculate the dynamic type of values "
-                                         "even if you have to run the target."},
-    {eDynamicDontRunTarget, "no-run-target",
-     "Calculate the dynamic type of values, but don't run the target."} };
+    {
+        eNoDynamicValues,
+        "no-dynamic-values",
+        "Don't calculate the dynamic type of values",
+    },
+    {
+        eDynamicCanRunTarget,
+        "run-target",
+        "Calculate the dynamic type of values "
+        "even if you have to run the target.",
+    },
+    {
+        eDynamicDontRunTarget,
+        "no-run-target",
+        "Calculate the dynamic type of values, but don't run the target.",
+    },
+};
 
 OptionEnumValues lldb_private::GetDynamicValueTypes() {
   return OptionEnumValues(g_dynamic_value_types);
 }
 
 static constexpr OptionEnumValueElement g_inline_breakpoint_enums[] = {
-    {eInlineBreakpointsNever, "never", "Never look for inline breakpoint "
-                                       "locations (fastest). This setting "
-                                       "should only be used if you know that "
-                                       "no inlining occurs in your programs."},
-    {eInlineBreakpointsHeaders, "headers",
-     "Only check for inline breakpoint locations when setting breakpoints in "
-     "header files, but not when setting breakpoint in implementation source "
-     "files (default)."},
-    {eInlineBreakpointsAlways, "always",
-     "Always look for inline breakpoint locations when setting file and line "
-     "breakpoints (slower but most accurate)."} };
+    {
+        eInlineBreakpointsNever,
+        "never",
+        "Never look for inline breakpoint locations (fastest). This setting "
+        "should only be used if you know that no inlining occurs in your"
+        "programs.",
+    },
+    {
+        eInlineBreakpointsHeaders,
+        "headers",
+        "Only check for inline breakpoint locations when setting breakpoints "
+        "in header files, but not when setting breakpoint in implementation "
+        "source files (default).",
+    },
+    {
+        eInlineBreakpointsAlways,
+        "always",
+        "Always look for inline breakpoint locations when setting file and "
+        "line breakpoints (slower but most accurate).",
+    },
+};
 
 enum x86DisassemblyFlavor {
   eX86DisFlavorDefault,
@@ -3248,258 +3262,99 @@
 };
 
 static constexpr OptionEnumValueElement g_x86_dis_flavor_value_types[] = {
-    {eX86DisFlavorDefault, "default", "Disassembler default (currently att)."},
-    {eX86DisFlavorIntel, "intel", "Intel disassembler flavor."},
-    {eX86DisFlavorATT, "att", "AT&T disassembler flavor."} };
+    {
+        eX86DisFlavorDefault,
+        "default",
+        "Disassembler default (currently att).",
+    },
+    {
+        eX86DisFlavorIntel,
+        "intel",
+        "Intel disassembler flavor.",
+    },
+    {
+        eX86DisFlavorATT,
+        "att",
+        "AT&T disassembler flavor.",
+    },
+};
 
 static constexpr OptionEnumValueElement g_hex_immediate_style_values[] = {
-    {Disassembler::eHexStyleC, "c", "C-style (0xffff)."},
-    {Disassembler::eHexStyleAsm, "asm", "Asm-style (0ffffh)."} };
+    {
+        Disassembler::eHexStyleC,
+        "c",
+        "C-style (0xffff).",
+    },
+    {
+        Disassembler::eHexStyleAsm,
+        "asm",
+        "Asm-style (0ffffh).",
+    },
+};
 
 static constexpr OptionEnumValueElement g_load_script_from_sym_file_values[] = {
-    {eLoadScriptFromSymFileTrue, "true",
-     "Load debug scripts inside symbol files"},
-    {eLoadScriptFromSymFileFalse, "false",
-     "Do not load debug scripts inside symbol files."},
-    {eLoadScriptFromSymFileWarn, "warn",
-     "Warn about debug scripts inside symbol files but do not load them."} };
+    {
+        eLoadScriptFromSymFileTrue,
+        "true",
+        "Load debug scripts inside symbol files",
+    },
+    {
+        eLoadScriptFromSymFileFalse,
+        "false",
+        "Do not load debug scripts inside symbol files.",
+    },
+    {
+        eLoadScriptFromSymFileWarn,
+        "warn",
+        "Warn about debug scripts inside symbol files but do not load them.",
+    },
+};
 
-static constexpr
-OptionEnumValueElement g_load_current_working_dir_lldbinit_values[] = {
-    {eLoadCWDlldbinitTrue, "true",
-     "Load .lldbinit files from current directory"},
-    {eLoadCWDlldbinitFalse, "false",
-     "Do not load .lldbinit files from current directory"},
-    {eLoadCWDlldbinitWarn, "warn",
-     "Warn about loading .lldbinit files from current directory"} };
+static constexpr OptionEnumValueElement g_load_cwd_lldbinit_values[] = {
+    {
+        eLoadCWDlldbinitTrue,
+        "true",
+        "Load .lldbinit files from current directory",
+    },
+    {
+        eLoadCWDlldbinitFalse,
+        "false",
+        "Do not load .lldbinit files from current directory",
+    },
+    {
+        eLoadCWDlldbinitWarn,
+        "warn",
+        "Warn about loading .lldbinit files from current directory",
+    },
+};
 
 static constexpr OptionEnumValueElement g_memory_module_load_level_values[] = {
-    {eMemoryModuleLoadLevelMinimal, "minimal",
-     "Load minimal information when loading modules from memory. Currently "
-     "this setting loads sections only."},
-    {eMemoryModuleLoadLevelPartial, "partial",
-     "Load partial information when loading modules from memory. Currently "
-     "this setting loads sections and function bounds."},
-    {eMemoryModuleLoadLevelComplete, "complete",
-     "Load complete information when loading modules from memory. Currently "
-     "this setting loads sections and all symbols."} };
+    {
+        eMemoryModuleLoadLevelMinimal,
+        "minimal",
+        "Load minimal information when loading modules from memory. Currently "
+        "this setting loads sections only.",
+    },
+    {
+        eMemoryModuleLoadLevelPartial,
+        "partial",
+        "Load partial information when loading modules from memory. Currently "
+        "this setting loads sections and function bounds.",
+    },
+    {
+        eMemoryModuleLoadLevelComplete,
+        "complete",
+        "Load complete information when loading modules from memory. Currently "
+        "this setting loads sections and all symbols.",
+    },
+};
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"default-arch", OptionValue::eTypeArch, true, 0, nullptr, {},
-     "Default architecture to choose, when there's a choice."},
-    {"move-to-nearest-code", OptionValue::eTypeBoolean, false, true, nullptr,
-     {}, "Move breakpoints to nearest code."},
-    {"language", OptionValue::eTypeLanguage, false, eLanguageTypeUnknown,
-     nullptr, {},
-     "The language to use when interpreting expressions entered in commands."},
-    {"expr-prefix", OptionValue::eTypeFileSpec, false, 0, nullptr, {},
-     "Path to a file containing expressions to be prepended to all "
-     "expressions."},
-    {"prefer-dynamic-value", OptionValue::eTypeEnum, false,
-     eDynamicDontRunTarget, nullptr, OptionEnumValues(g_dynamic_value_types),
-     "Should printed values be shown as their dynamic value."},
-    {"enable-synthetic-value", OptionValue::eTypeBoolean, false, true, nullptr,
-     {}, "Should synthetic values be used by default whenever available."},
-    {"skip-prologue", OptionValue::eTypeBoolean, false, true, nullptr, {},
-     "Skip function prologues when setting breakpoints by name."},
-    {"source-map", OptionValue::eTypePathMap, false, 0, nullptr, {},
-     "Source path remappings are used to track the change of location between "
-     "a source file when built, and "
-     "where it exists on the current system.  It consists of an array of "
-     "duples, the first element of each duple is "
-     "some part (starting at the root) of the path to the file when it was "
-     "built, "
-     "and the second is where the remainder of the original build hierarchy is "
-     "rooted on the local system.  "
-     "Each element of the array is checked in order and the first one that "
-     "results in a match wins."},
-    {"exec-search-paths", OptionValue::eTypeFileSpecList, false, 0, nullptr,
-     {}, "Executable search paths to use when locating executable files "
-         "whose paths don't match the local file system."},
-    {"debug-file-search-paths", OptionValue::eTypeFileSpecList, false, 0,
-     nullptr, {},
-     "List of directories to be searched when locating debug symbol files. "
-     "See also symbols.enable-external-lookup."},
-    {"clang-module-search-paths", OptionValue::eTypeFileSpecList, false, 0,
-     nullptr, {},
-     "List of directories to be searched when locating modules for Clang."},
-    {"auto-import-clang-modules", OptionValue::eTypeBoolean, false, true,
-     nullptr, {},
-     "Automatically load Clang modules referred to by the program."},
-    {"import-std-module", OptionValue::eTypeBoolean, false, false,
-     nullptr, {},
-     "Import the C++ std module to improve debugging STL containers."},
-    {"auto-apply-fixits", OptionValue::eTypeBoolean, false, true, nullptr,
-     {}, "Automatically apply fix-it hints to expressions."},
-    {"notify-about-fixits", OptionValue::eTypeBoolean, false, true, nullptr,
-     {}, "Print the fixed expression text."},
-    {"save-jit-objects", OptionValue::eTypeBoolean, false, false, nullptr,
-     {}, "Save intermediate object files generated by the LLVM JIT"},
-    {"max-children-count", OptionValue::eTypeSInt64, false, 256, nullptr,
-     {}, "Maximum number of children to expand in any level of depth."},
-    {"max-string-summary-length", OptionValue::eTypeSInt64, false, 1024,
-     nullptr, {},
-     "Maximum number of characters to show when using %s in summary strings."},
-    {"max-memory-read-size", OptionValue::eTypeSInt64, false, 1024, nullptr,
-     {}, "Maximum number of bytes that 'memory read' will fetch before "
-         "--force must be specified."},
-    {"breakpoints-use-platform-avoid-list", OptionValue::eTypeBoolean, false,
-     true, nullptr, {}, "Consult the platform module avoid list when "
-                        "setting non-module specific breakpoints."},
-    {"arg0", OptionValue::eTypeString, false, 0, nullptr, {},
-     "The first argument passed to the program in the argument array which can "
-     "be different from the executable itself."},
-    {"run-args", OptionValue::eTypeArgs, false, 0, nullptr, {},
-     "A list containing all the arguments to be passed to the executable when "
-     "it is run. Note that this does NOT include the argv[0] which is in "
-     "target.arg0."},
-    {"env-vars", OptionValue::eTypeDictionary, false, OptionValue::eTypeString,
-     nullptr, {}, "A list of all the environment variables to be passed "
-                  "to the executable's environment, and their values."},
-    {"inherit-env", OptionValue::eTypeBoolean, false, true, nullptr, {},
-     "Inherit the environment from the process that is running LLDB."},
-    {"input-path", OptionValue::eTypeFileSpec, false, 0, nullptr, {},
-     "The file/path to be used by the executable program for reading its "
-     "standard input."},
-    {"output-path", OptionValue::eTypeFileSpec, false, 0, nullptr, {},
-     "The file/path to be used by the executable program for writing its "
-     "standard output."},
-    {"error-path", OptionValue::eTypeFileSpec, false, 0, nullptr, {},
-     "The file/path to be used by the executable program for writing its "
-     "standard error."},
-    {"detach-on-error", OptionValue::eTypeBoolean, false, true, nullptr,
-     {}, "debugserver will detach (rather than killing) a process if it "
-              "loses connection with lldb."},
-    {"preload-symbols", OptionValue::eTypeBoolean, false, true, nullptr, {},
-     "Enable loading of symbol tables before they are needed."},
-    {"disable-aslr", OptionValue::eTypeBoolean, false, true, nullptr, {},
-     "Disable Address Space Layout Randomization (ASLR)"},
-    {"disable-stdio", OptionValue::eTypeBoolean, false, false, nullptr, {},
-     "Disable stdin/stdout for process (e.g. for a GUI application)"},
-    {"inline-breakpoint-strategy", OptionValue::eTypeEnum, false,
-     eInlineBreakpointsAlways, nullptr,
-     OptionEnumValues(g_inline_breakpoint_enums),
-     "The strategy to use when settings breakpoints by file and line. "
-     "Breakpoint locations can end up being inlined by the compiler, so that a "
-     "compile unit 'a.c' might contain an inlined function from another source "
-     "file. "
-     "Usually this is limited to breakpoint locations from inlined functions "
-     "from header or other include files, or more accurately "
-     "non-implementation source files. "
-     "Sometimes code might #include implementation files and cause inlined "
-     "breakpoint locations in inlined implementation files. "
-     "Always checking for inlined breakpoint locations can be expensive "
-     "(memory and time), so if you have a project with many headers "
-     "and find that setting breakpoints is slow, then you can change this "
-     "setting to headers. "
-     "This setting allows you to control exactly which strategy is used when "
-     "setting "
-     "file and line breakpoints."},
-    // FIXME: This is the wrong way to do per-architecture settings, but we
-    // don't have a general per architecture settings system in place yet.
-    {"x86-disassembly-flavor", OptionValue::eTypeEnum, false,
-     eX86DisFlavorDefault, nullptr,
-     OptionEnumValues(g_x86_dis_flavor_value_types),
-     "The default disassembly flavor to use for x86 or x86-64 targets."},
-    {"use-hex-immediates", OptionValue::eTypeBoolean, false, true, nullptr,
-     {}, "Show immediates in disassembly as hexadecimal."},
-    {"hex-immediate-style", OptionValue::eTypeEnum, false,
-     Disassembler::eHexStyleC, nullptr,
-     OptionEnumValues(g_hex_immediate_style_values),
-     "Which style to use for printing hexadecimal disassembly values."},
-    {"use-fast-stepping", OptionValue::eTypeBoolean, false, true, nullptr,
-     {}, "Use a fast stepping algorithm based on running from branch to "
-         "branch rather than instruction single-stepping."},
-    {"load-script-from-symbol-file", OptionValue::eTypeEnum, false,
-     eLoadScriptFromSymFileWarn, nullptr,
-     OptionEnumValues(g_load_script_from_sym_file_values),
-     "Allow LLDB to load scripting resources embedded in symbol files when "
-     "available."},
-    {"load-cwd-lldbinit", OptionValue::eTypeEnum, false, eLoadCWDlldbinitWarn,
-     nullptr, OptionEnumValues(g_load_current_working_dir_lldbinit_values),
-     "Allow LLDB to .lldbinit files from the current directory automatically."},
-    {"memory-module-load-level", OptionValue::eTypeEnum, false,
-     eMemoryModuleLoadLevelComplete, nullptr,
-     OptionEnumValues(g_memory_module_load_level_values),
-     "Loading modules from memory can be slow as reading the symbol tables and "
-     "other data can take a long time depending on your connection to the "
-     "debug target. "
-     "This setting helps users control how much information gets loaded when "
-     "loading modules from memory."
-     "'complete' is the default value for this setting which will load all "
-     "sections and symbols by reading them from memory (slowest, most "
-     "accurate). "
-     "'partial' will load sections and attempt to find function bounds without "
-     "downloading the symbol table (faster, still accurate, missing symbol "
-     "names). "
-     "'minimal' is the fastest setting and will load section data with no "
-     "symbols, but should rarely be used as stack frames in these memory "
-     "regions will be inaccurate and not provide any context (fastest). "},
-    {"display-expression-in-crashlogs", OptionValue::eTypeBoolean, false, false,
-     nullptr, {}, "Expressions that crash will show up in crash logs if "
-                  "the host system supports executable specific crash log "
-                  "strings and this setting is set to true."},
-    {"trap-handler-names", OptionValue::eTypeArray, true,
-     OptionValue::eTypeString, nullptr, {},
-     "A list of trap handler function names, e.g. a common Unix user process "
-     "one is _sigtramp."},
-    {"display-runtime-support-values", OptionValue::eTypeBoolean, false, false,
-     nullptr, {}, "If true, LLDB will show variables that are meant to "
-                  "support the operation of a language's runtime support."},
-    {"display-recognized-arguments", OptionValue::eTypeBoolean, false, false,
-     nullptr, {}, "Show recognized arguments in variable listings by default."},
-    {"non-stop-mode", OptionValue::eTypeBoolean, false, 0, nullptr, {},
-     "Disable lock-step debugging, instead control threads independently."},
-    {"require-hardware-breakpoint", OptionValue::eTypeBoolean, false, 0,
-     nullptr, {}, "Require all breakpoints to be hardware breakpoints."}};
-// clang-format on
+#define LLDB_PROPERTIES_target
+#include "TargetProperties.inc"
 
 enum {
-  ePropertyDefaultArch,
-  ePropertyMoveToNearestCode,
-  ePropertyLanguage,
-  ePropertyExprPrefix,
-  ePropertyPreferDynamic,
-  ePropertyEnableSynthetic,
-  ePropertySkipPrologue,
-  ePropertySourceMap,
-  ePropertyExecutableSearchPaths,
-  ePropertyDebugFileSearchPaths,
-  ePropertyClangModuleSearchPaths,
-  ePropertyAutoImportClangModules,
-  ePropertyImportStdModule,
-  ePropertyAutoApplyFixIts,
-  ePropertyNotifyAboutFixIts,
-  ePropertySaveObjects,
-  ePropertyMaxChildrenCount,
-  ePropertyMaxSummaryLength,
-  ePropertyMaxMemReadSize,
-  ePropertyBreakpointUseAvoidList,
-  ePropertyArg0,
-  ePropertyRunArgs,
-  ePropertyEnvVars,
-  ePropertyInheritEnv,
-  ePropertyInputPath,
-  ePropertyOutputPath,
-  ePropertyErrorPath,
-  ePropertyDetachOnError,
-  ePropertyPreloadSymbols,
-  ePropertyDisableASLR,
-  ePropertyDisableSTDIO,
-  ePropertyInlineStrategy,
-  ePropertyDisassemblyFlavor,
-  ePropertyUseHexImmediates,
-  ePropertyHexImmediateStyle,
-  ePropertyUseFastStepping,
-  ePropertyLoadScriptFromSymbolFile,
-  ePropertyLoadCWDlldbinitFile,
-  ePropertyMemoryModuleLoadLevel,
-  ePropertyDisplayExpressionsInCrashlogs,
-  ePropertyTrapHandlerNames,
-  ePropertyDisplayRuntimeSupportValues,
-  ePropertyDisplayRecognizedArguments,
-  ePropertyNonStopModeEnabled,
-  ePropertyRequireHardwareBreakpoints,
+#define LLDB_PROPERTIES_target
+#include "TargetPropertiesEnum.inc"
   ePropertyExperimental,
 };
 
@@ -3547,7 +3402,7 @@
         m_got_host_env = true;
         const uint32_t idx = ePropertyInheritEnv;
         if (GetPropertyAtIndexAsBoolean(
-                nullptr, idx, g_properties[idx].default_uint_value != 0)) {
+                nullptr, idx, g_target_properties[idx].default_uint_value != 0)) {
           PlatformSP platform_sp(m_target->GetPlatform());
           if (platform_sp) {
             Environment env = platform_sp->GetEnvironment();
@@ -3575,17 +3430,13 @@
 };
 
 // TargetProperties
-static constexpr PropertyDefinition g_experimental_properties[]{
-    {"inject-local-vars", OptionValue::eTypeBoolean, true, true, nullptr,
-     {},
-     "If true, inject local variables explicitly into the expression text.  "
-     "This will fix symbol resolution when there are name collisions between "
-     "ivars and local variables.  "
-     "But it can make expressions run much more slowly."},
-    {"use-modern-type-lookup", OptionValue::eTypeBoolean, true, false, nullptr,
-     {}, "If true, use Clang's modern type lookup infrastructure."}};
+#define LLDB_PROPERTIES_experimental
+#include "TargetProperties.inc"
 
-enum { ePropertyInjectLocalVars = 0, ePropertyUseModernTypeLookup };
+enum {
+#define LLDB_PROPERTIES_experimental
+#include "TargetPropertiesEnum.inc"
+};
 
 class TargetExperimentalOptionValueProperties : public OptionValueProperties {
 public:
@@ -3610,29 +3461,24 @@
     // Set callbacks to update launch_info whenever "settins set" updated any
     // of these properties
     m_collection_sp->SetValueChangedCallback(
-        ePropertyArg0, TargetProperties::Arg0ValueChangedCallback, this);
+        ePropertyArg0, [this] { Arg0ValueChangedCallback(); });
     m_collection_sp->SetValueChangedCallback(
-        ePropertyRunArgs, TargetProperties::RunArgsValueChangedCallback, this);
+        ePropertyRunArgs, [this] { RunArgsValueChangedCallback(); });
     m_collection_sp->SetValueChangedCallback(
-        ePropertyEnvVars, TargetProperties::EnvVarsValueChangedCallback, this);
+        ePropertyEnvVars, [this] { EnvVarsValueChangedCallback(); });
     m_collection_sp->SetValueChangedCallback(
-        ePropertyInputPath, TargetProperties::InputPathValueChangedCallback,
-        this);
+        ePropertyInputPath, [this] { InputPathValueChangedCallback(); });
     m_collection_sp->SetValueChangedCallback(
-        ePropertyOutputPath, TargetProperties::OutputPathValueChangedCallback,
-        this);
+        ePropertyOutputPath, [this] { OutputPathValueChangedCallback(); });
     m_collection_sp->SetValueChangedCallback(
-        ePropertyErrorPath, TargetProperties::ErrorPathValueChangedCallback,
-        this);
+        ePropertyErrorPath, [this] { ErrorPathValueChangedCallback(); });
+    m_collection_sp->SetValueChangedCallback(ePropertyDetachOnError, [this] {
+      DetachOnErrorValueChangedCallback();
+    });
     m_collection_sp->SetValueChangedCallback(
-        ePropertyDetachOnError,
-        TargetProperties::DetachOnErrorValueChangedCallback, this);
+        ePropertyDisableASLR, [this] { DisableASLRValueChangedCallback(); });
     m_collection_sp->SetValueChangedCallback(
-        ePropertyDisableASLR, TargetProperties::DisableASLRValueChangedCallback,
-        this);
-    m_collection_sp->SetValueChangedCallback(
-        ePropertyDisableSTDIO,
-        TargetProperties::DisableSTDIOValueChangedCallback, this);
+        ePropertyDisableSTDIO, [this] { DisableSTDIOValueChangedCallback(); });
 
     m_experimental_properties_up.reset(new TargetExperimentalProperties());
     m_collection_sp->AppendProperty(
@@ -3642,20 +3488,20 @@
         true, m_experimental_properties_up->GetValueProperties());
 
     // Update m_launch_info once it was created
-    Arg0ValueChangedCallback(this, nullptr);
-    RunArgsValueChangedCallback(this, nullptr);
-    // EnvVarsValueChangedCallback(this, nullptr); // FIXME: cause segfault in
+    Arg0ValueChangedCallback();
+    RunArgsValueChangedCallback();
+    // EnvVarsValueChangedCallback(); // FIXME: cause segfault in
     // Target::GetPlatform()
-    InputPathValueChangedCallback(this, nullptr);
-    OutputPathValueChangedCallback(this, nullptr);
-    ErrorPathValueChangedCallback(this, nullptr);
-    DetachOnErrorValueChangedCallback(this, nullptr);
-    DisableASLRValueChangedCallback(this, nullptr);
-    DisableSTDIOValueChangedCallback(this, nullptr);
+    InputPathValueChangedCallback();
+    OutputPathValueChangedCallback();
+    ErrorPathValueChangedCallback();
+    DetachOnErrorValueChangedCallback();
+    DisableASLRValueChangedCallback();
+    DisableSTDIOValueChangedCallback();
   } else {
     m_collection_sp =
         std::make_shared<TargetOptionValueProperties>(ConstString("target"));
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_target_properties);
     m_experimental_properties_up.reset(new TargetExperimentalProperties());
     m_collection_sp->AppendProperty(
         ConstString(Properties::GetExperimentalSettingsName()),
@@ -3694,18 +3540,6 @@
                                             true);
 }
 
-bool TargetProperties::GetUseModernTypeLookup() const {
-  const Property *exp_property = m_collection_sp->GetPropertyAtIndex(
-      nullptr, false, ePropertyExperimental);
-  OptionValueProperties *exp_values =
-      exp_property->GetValue()->GetAsProperties();
-  if (exp_values)
-    return exp_values->GetPropertyAtIndexAsBoolean(
-        nullptr, ePropertyUseModernTypeLookup, true);
-  else
-    return true;
-}
-
 ArchSpec TargetProperties::GetDefaultArchitecture() const {
   OptionValueArch *value = m_collection_sp->GetPropertyAtIndexAsOptionValueArch(
       nullptr, ePropertyDefaultArch);
@@ -3724,14 +3558,14 @@
 bool TargetProperties::GetMoveToNearestCode() const {
   const uint32_t idx = ePropertyMoveToNearestCode;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 lldb::DynamicValueType TargetProperties::GetPreferDynamicValue() const {
   const uint32_t idx = ePropertyPreferDynamic;
   return (lldb::DynamicValueType)
       m_collection_sp->GetPropertyAtIndexAsEnumeration(
-          nullptr, idx, g_properties[idx].default_uint_value);
+          nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 bool TargetProperties::SetPreferDynamicValue(lldb::DynamicValueType d) {
@@ -3742,7 +3576,7 @@
 bool TargetProperties::GetPreloadSymbols() const {
   const uint32_t idx = ePropertyPreloadSymbols;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetPreloadSymbols(bool b) {
@@ -3753,7 +3587,7 @@
 bool TargetProperties::GetDisableASLR() const {
   const uint32_t idx = ePropertyDisableASLR;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetDisableASLR(bool b) {
@@ -3764,7 +3598,7 @@
 bool TargetProperties::GetDetachOnError() const {
   const uint32_t idx = ePropertyDetachOnError;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetDetachOnError(bool b) {
@@ -3775,7 +3609,7 @@
 bool TargetProperties::GetDisableSTDIO() const {
   const uint32_t idx = ePropertyDisableSTDIO;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetDisableSTDIO(bool b) {
@@ -3789,7 +3623,7 @@
 
   x86DisassemblyFlavor flavor_value =
       (x86DisassemblyFlavor)m_collection_sp->GetPropertyAtIndexAsEnumeration(
-          nullptr, idx, g_properties[idx].default_uint_value);
+          nullptr, idx, g_target_properties[idx].default_uint_value);
   return_value = g_x86_dis_flavor_value_types[flavor_value].string_value;
   return return_value;
 }
@@ -3797,18 +3631,18 @@
 InlineStrategy TargetProperties::GetInlineStrategy() const {
   const uint32_t idx = ePropertyInlineStrategy;
   return (InlineStrategy)m_collection_sp->GetPropertyAtIndexAsEnumeration(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 llvm::StringRef TargetProperties::GetArg0() const {
   const uint32_t idx = ePropertyArg0;
-  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx, llvm::StringRef());
+  return m_collection_sp->GetPropertyAtIndexAsString(nullptr, idx,
+                                                     llvm::StringRef());
 }
 
 void TargetProperties::SetArg0(llvm::StringRef arg) {
   const uint32_t idx = ePropertyArg0;
-  m_collection_sp->SetPropertyAtIndexAsString(
-      nullptr, idx, arg);
+  m_collection_sp->SetPropertyAtIndexAsString(nullptr, idx, arg);
   m_launch_info.SetArg0(arg);
 }
 
@@ -3841,7 +3675,7 @@
 bool TargetProperties::GetSkipPrologue() const {
   const uint32_t idx = ePropertySkipPrologue;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 PathMappingList &TargetProperties::GetSourcePathMap() const {
@@ -3853,7 +3687,7 @@
   return option_value->GetCurrentValue();
 }
 
-void TargetProperties::AppendExecutableSearchPaths(const FileSpec& dir) {
+void TargetProperties::AppendExecutableSearchPaths(const FileSpec &dir) {
   const uint32_t idx = ePropertyExecutableSearchPaths;
   OptionValueFileSpecList *option_value =
       m_collection_sp->GetPropertyAtIndexAsOptionValueFileSpecList(nullptr,
@@ -3892,55 +3726,61 @@
 bool TargetProperties::GetEnableAutoImportClangModules() const {
   const uint32_t idx = ePropertyAutoImportClangModules;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetEnableImportStdModule() const {
   const uint32_t idx = ePropertyImportStdModule;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetEnableAutoApplyFixIts() const {
   const uint32_t idx = ePropertyAutoApplyFixIts;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetEnableNotifyAboutFixIts() const {
   const uint32_t idx = ePropertyNotifyAboutFixIts;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetEnableSaveObjects() const {
   const uint32_t idx = ePropertySaveObjects;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetEnableSyntheticValue() const {
   const uint32_t idx = ePropertyEnableSynthetic;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
+}
+
+uint32_t TargetProperties::GetMaxZeroPaddingInFloatFormat() const {
+  const uint32_t idx = ePropertyMaxZeroPaddingInFloatFormat;
+  return m_collection_sp->GetPropertyAtIndexAsUInt64(
+      nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 uint32_t TargetProperties::GetMaximumNumberOfChildrenToDisplay() const {
   const uint32_t idx = ePropertyMaxChildrenCount;
   return m_collection_sp->GetPropertyAtIndexAsSInt64(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 uint32_t TargetProperties::GetMaximumSizeOfStringSummary() const {
   const uint32_t idx = ePropertyMaxSummaryLength;
   return m_collection_sp->GetPropertyAtIndexAsSInt64(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 uint32_t TargetProperties::GetMaximumMemReadSize() const {
   const uint32_t idx = ePropertyMaxMemReadSize;
   return m_collection_sp->GetPropertyAtIndexAsSInt64(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 FileSpec TargetProperties::GetStandardInputPath() const {
@@ -4000,52 +3840,52 @@
 bool TargetProperties::GetBreakpointsConsultPlatformAvoidList() {
   const uint32_t idx = ePropertyBreakpointUseAvoidList;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetUseHexImmediates() const {
   const uint32_t idx = ePropertyUseHexImmediates;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetUseFastStepping() const {
   const uint32_t idx = ePropertyUseFastStepping;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 bool TargetProperties::GetDisplayExpressionsInCrashlogs() const {
   const uint32_t idx = ePropertyDisplayExpressionsInCrashlogs;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 LoadScriptFromSymFile TargetProperties::GetLoadScriptFromSymbolFile() const {
   const uint32_t idx = ePropertyLoadScriptFromSymbolFile;
   return (LoadScriptFromSymFile)
       m_collection_sp->GetPropertyAtIndexAsEnumeration(
-          nullptr, idx, g_properties[idx].default_uint_value);
+          nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 LoadCWDlldbinitFile TargetProperties::GetLoadCWDlldbinitFile() const {
   const uint32_t idx = ePropertyLoadCWDlldbinitFile;
   return (LoadCWDlldbinitFile)m_collection_sp->GetPropertyAtIndexAsEnumeration(
-      nullptr, idx, g_properties[idx].default_uint_value);
+      nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 Disassembler::HexImmediateStyle TargetProperties::GetHexImmediateStyle() const {
   const uint32_t idx = ePropertyHexImmediateStyle;
   return (Disassembler::HexImmediateStyle)
       m_collection_sp->GetPropertyAtIndexAsEnumeration(
-          nullptr, idx, g_properties[idx].default_uint_value);
+          nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 MemoryModuleLoadLevel TargetProperties::GetMemoryModuleLoadLevel() const {
   const uint32_t idx = ePropertyMemoryModuleLoadLevel;
   return (MemoryModuleLoadLevel)
       m_collection_sp->GetPropertyAtIndexAsEnumeration(
-          nullptr, idx, g_properties[idx].default_uint_value);
+          nullptr, idx, g_target_properties[idx].default_uint_value);
 }
 
 bool TargetProperties::GetUserSpecifiedTrapHandlerNames(Args &args) const {
@@ -4122,7 +3962,7 @@
 bool TargetProperties::GetRequireHardwareBreakpoints() const {
   const uint32_t idx = ePropertyRequireHardwareBreakpoints;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_target_properties[idx].default_uint_value != 0);
 }
 
 void TargetProperties::SetRequireHardwareBreakpoints(bool b) {
@@ -4130,81 +3970,54 @@
   m_collection_sp->SetPropertyAtIndexAsBoolean(nullptr, idx, b);
 }
 
-void TargetProperties::Arg0ValueChangedCallback(void *target_property_ptr,
-                                                OptionValue *) {
-  TargetProperties *this_ =
-      reinterpret_cast<TargetProperties *>(target_property_ptr);
-  this_->m_launch_info.SetArg0(this_->GetArg0());
+void TargetProperties::Arg0ValueChangedCallback() {
+  m_launch_info.SetArg0(GetArg0());
 }
 
-void TargetProperties::RunArgsValueChangedCallback(void *target_property_ptr,
-                                                   OptionValue *) {
-  TargetProperties *this_ =
-      reinterpret_cast<TargetProperties *>(target_property_ptr);
+void TargetProperties::RunArgsValueChangedCallback() {
   Args args;
-  if (this_->GetRunArguments(args))
-    this_->m_launch_info.GetArguments() = args;
+  if (GetRunArguments(args))
+    m_launch_info.GetArguments() = args;
 }
 
-void TargetProperties::EnvVarsValueChangedCallback(void *target_property_ptr,
-                                                   OptionValue *) {
-  TargetProperties *this_ =
-      reinterpret_cast<TargetProperties *>(target_property_ptr);
-  this_->m_launch_info.GetEnvironment() = this_->GetEnvironment();
+void TargetProperties::EnvVarsValueChangedCallback() {
+  m_launch_info.GetEnvironment() = GetEnvironment();
 }
 
-void TargetProperties::InputPathValueChangedCallback(void *target_property_ptr,
-                                                     OptionValue *) {
-  TargetProperties *this_ =
-      reinterpret_cast<TargetProperties *>(target_property_ptr);
-  this_->m_launch_info.AppendOpenFileAction(
-      STDIN_FILENO, this_->GetStandardInputPath(), true, false);
+void TargetProperties::InputPathValueChangedCallback() {
+  m_launch_info.AppendOpenFileAction(STDIN_FILENO, GetStandardInputPath(), true,
+                                     false);
 }
 
-void TargetProperties::OutputPathValueChangedCallback(void *target_property_ptr,
-                                                      OptionValue *) {
-  TargetProperties *this_ =
-      reinterpret_cast<TargetProperties *>(target_property_ptr);
-  this_->m_launch_info.AppendOpenFileAction(
-      STDOUT_FILENO, this_->GetStandardOutputPath(), false, true);
+void TargetProperties::OutputPathValueChangedCallback() {
+  m_launch_info.AppendOpenFileAction(STDOUT_FILENO, GetStandardOutputPath(),
+                                     false, true);
 }
 
-void TargetProperties::ErrorPathValueChangedCallback(void *target_property_ptr,
-                                                     OptionValue *) {
-  TargetProperties *this_ =
-      reinterpret_cast<TargetProperties *>(target_property_ptr);
-  this_->m_launch_info.AppendOpenFileAction(
-      STDERR_FILENO, this_->GetStandardErrorPath(), false, true);
+void TargetProperties::ErrorPathValueChangedCallback() {
+  m_launch_info.AppendOpenFileAction(STDERR_FILENO, GetStandardErrorPath(),
+                                     false, true);
 }
 
-void TargetProperties::DetachOnErrorValueChangedCallback(
-    void *target_property_ptr, OptionValue *) {
-  TargetProperties *this_ =
-      reinterpret_cast<TargetProperties *>(target_property_ptr);
-  if (this_->GetDetachOnError())
-    this_->m_launch_info.GetFlags().Set(lldb::eLaunchFlagDetachOnError);
+void TargetProperties::DetachOnErrorValueChangedCallback() {
+  if (GetDetachOnError())
+    m_launch_info.GetFlags().Set(lldb::eLaunchFlagDetachOnError);
   else
-    this_->m_launch_info.GetFlags().Clear(lldb::eLaunchFlagDetachOnError);
+    m_launch_info.GetFlags().Clear(lldb::eLaunchFlagDetachOnError);
 }
 
-void TargetProperties::DisableASLRValueChangedCallback(
-    void *target_property_ptr, OptionValue *) {
-  TargetProperties *this_ =
-      reinterpret_cast<TargetProperties *>(target_property_ptr);
-  if (this_->GetDisableASLR())
-    this_->m_launch_info.GetFlags().Set(lldb::eLaunchFlagDisableASLR);
+void TargetProperties::DisableASLRValueChangedCallback() {
+  if (GetDisableASLR())
+    m_launch_info.GetFlags().Set(lldb::eLaunchFlagDisableASLR);
   else
-    this_->m_launch_info.GetFlags().Clear(lldb::eLaunchFlagDisableASLR);
+    m_launch_info.GetFlags().Clear(lldb::eLaunchFlagDisableASLR);
 }
 
-void TargetProperties::DisableSTDIOValueChangedCallback(
-    void *target_property_ptr, OptionValue *) {
-  TargetProperties *this_ =
-      reinterpret_cast<TargetProperties *>(target_property_ptr);
-  if (this_->GetDisableSTDIO())
-    this_->m_launch_info.GetFlags().Set(lldb::eLaunchFlagDisableSTDIO);
+void TargetProperties::DisableSTDIOValueChangedCallback() {
+  if (GetDisableSTDIO())
+    m_launch_info.GetFlags().Set(lldb::eLaunchFlagDisableSTDIO);
   else
-    this_->m_launch_info.GetFlags().Clear(lldb::eLaunchFlagDisableSTDIO);
+    m_launch_info.GetFlags().Clear(lldb::eLaunchFlagDisableSTDIO);
 }
 
 // Target::TargetEventData
@@ -4228,7 +4041,7 @@
     if (i != 0)
       *s << ", ";
     m_module_list.GetModuleAtIndex(i)->GetDescription(
-        s, lldb::eDescriptionLevelBrief);
+        s->AsRawOstream(), lldb::eDescriptionLevelBrief);
   }
 }
 
@@ -4259,3 +4072,10 @@
     module_list = event_data->m_module_list;
   return module_list;
 }
+
+std::recursive_mutex &Target::GetAPIMutex() { 
+  if (GetProcessSP() && GetProcessSP()->CurrentThreadIsPrivateStateThread())
+    return m_private_mutex;
+  else
+    return m_mutex;
+}
diff --git a/src/llvm-project/lldb/source/Target/TargetList.cpp b/src/llvm-project/lldb/source/Target/TargetList.cpp
index 7c7a36e..1b4db0c 100644
--- a/src/llvm-project/lldb/source/Target/TargetList.cpp
+++ b/src/llvm-project/lldb/source/Target/TargetList.cpp
@@ -144,9 +144,9 @@
               StreamString platform_arch_strm;
               StreamString module_arch_strm;
 
-              platform_arch.DumpTriple(platform_arch_strm);
+              platform_arch.DumpTriple(platform_arch_strm.AsRawOstream());
               matching_module_spec.GetArchitecture().DumpTriple(
-                  module_arch_strm);
+                  module_arch_strm.AsRawOstream());
               error.SetErrorStringWithFormat(
                   "the specified architecture '%s' is not compatible with '%s' "
                   "in '%s'",
@@ -457,15 +457,12 @@
     const FileSpec &exe_file_spec, const ArchSpec *exe_arch_ptr) const {
   std::lock_guard<std::recursive_mutex> guard(m_target_list_mutex);
   TargetSP target_sp;
-  bool full_match = (bool)exe_file_spec.GetDirectory();
-
   collection::const_iterator pos, end = m_target_list.end();
   for (pos = m_target_list.begin(); pos != end; ++pos) {
     Module *exe_module = (*pos)->GetExecutableModulePointer();
 
     if (exe_module) {
-      if (FileSpec::Equal(exe_file_spec, exe_module->GetFileSpec(),
-                          full_match)) {
+      if (FileSpec::Match(exe_file_spec, exe_module->GetFileSpec())) {
         if (exe_arch_ptr) {
           if (!exe_arch_ptr->IsCompatibleMatch(exe_module->GetArchitecture()))
             continue;
diff --git a/src/llvm-project/lldb/source/Target/TargetProperties.td b/src/llvm-project/lldb/source/Target/TargetProperties.td
new file mode 100644
index 0000000..ff8062a
--- /dev/null
+++ b/src/llvm-project/lldb/source/Target/TargetProperties.td
@@ -0,0 +1,234 @@
+include "../../include/lldb/Core/PropertiesBase.td"
+
+let Definition = "experimental" in {
+  def InjectLocalVars : Property<"inject-local-vars", "Boolean">,
+    Global, DefaultTrue,
+    Desc<"If true, inject local variables explicitly into the expression text. This will fix symbol resolution when there are name collisions between ivars and local variables. But it can make expressions run much more slowly.">;
+}
+
+let Definition = "target" in {
+  def DefaultArch: Property<"default-arch", "Arch">,
+    Global,
+    DefaultStringValue<"">,
+    Desc<"Default architecture to choose, when there's a choice.">;
+  def MoveToNearestCode: Property<"move-to-nearest-code", "Boolean">,
+    DefaultTrue,
+    Desc<"Move breakpoints to nearest code.">;
+  def Language: Property<"language", "Language">,
+    DefaultEnumValue<"eLanguageTypeUnknown">,
+    Desc<"The language to use when interpreting expressions entered in commands.">;
+  def ExprPrefix: Property<"expr-prefix", "FileSpec">,
+    DefaultStringValue<"">,
+    Desc<"Path to a file containing expressions to be prepended to all expressions.">;
+  def PreferDynamic: Property<"prefer-dynamic-value", "Enum">,
+    DefaultEnumValue<"eDynamicDontRunTarget">,
+    EnumValues<"OptionEnumValues(g_dynamic_value_types)">,
+    Desc<"Should printed values be shown as their dynamic value.">;
+  def EnableSynthetic: Property<"enable-synthetic-value", "Boolean">,
+    DefaultTrue,
+    Desc<"Should synthetic values be used by default whenever available.">;
+  def SkipPrologue: Property<"skip-prologue", "Boolean">,
+    DefaultTrue,
+    Desc<"Skip function prologues when setting breakpoints by name.">;
+  def SourceMap: Property<"source-map", "PathMap">,
+    DefaultStringValue<"">,
+    Desc<"Source path remappings are used to track the change of location between a source file when built, and where it exists on the current system.  It consists of an array of duples, the first element of each duple is some part (starting at the root) of the path to the file when it was built, and the second is where the remainder of the original build hierarchy is rooted on the local system.  Each element of the array is checked in order and the first one that results in a match wins.">;
+  def ExecutableSearchPaths: Property<"exec-search-paths", "FileSpecList">,
+    DefaultStringValue<"">,
+    Desc<"Executable search paths to use when locating executable files whose paths don't match the local file system.">;
+  def DebugFileSearchPaths: Property<"debug-file-search-paths", "FileSpecList">,
+    DefaultStringValue<"">,
+    Desc<"List of directories to be searched when locating debug symbol files. See also symbols.enable-external-lookup.">;
+  def ClangModuleSearchPaths: Property<"clang-module-search-paths", "FileSpecList">,
+    DefaultStringValue<"">,
+    Desc<"List of directories to be searched when locating modules for Clang.">;
+  def AutoImportClangModules: Property<"auto-import-clang-modules", "Boolean">,
+    DefaultTrue,
+    Desc<"Automatically load Clang modules referred to by the program.">;
+  def ImportStdModule: Property<"import-std-module", "Boolean">,
+    DefaultFalse,
+    Desc<"Import the C++ std module to improve debugging STL containers.">;
+  def AutoApplyFixIts: Property<"auto-apply-fixits", "Boolean">,
+    DefaultTrue,
+    Desc<"Automatically apply fix-it hints to expressions.">;
+  def NotifyAboutFixIts: Property<"notify-about-fixits", "Boolean">,
+    DefaultTrue,
+    Desc<"Print the fixed expression text.">;
+  def SaveObjects: Property<"save-jit-objects", "Boolean">,
+    DefaultFalse,
+    Desc<"Save intermediate object files generated by the LLVM JIT">;
+  def MaxZeroPaddingInFloatFormat: Property<"max-zero-padding-in-float-format", "UInt64">,
+    DefaultUnsignedValue<6>,
+    Desc<"The maximum number of zeroes to insert when displaying a very small float before falling back to scientific notation.">;
+  def MaxChildrenCount: Property<"max-children-count", "SInt64">,
+    DefaultUnsignedValue<256>,
+    Desc<"Maximum number of children to expand in any level of depth.">;
+  def MaxSummaryLength: Property<"max-string-summary-length", "SInt64">,
+    DefaultUnsignedValue<1024>,
+    Desc<"Maximum number of characters to show when using %s in summary strings.">;
+  def MaxMemReadSize: Property<"max-memory-read-size", "SInt64">,
+    DefaultUnsignedValue<1024>,
+    Desc<"Maximum number of bytes that 'memory read' will fetch before --force must be specified.">;
+  def BreakpointUseAvoidList: Property<"breakpoints-use-platform-avoid-list", "Boolean">,
+    DefaultTrue,
+    Desc<"Consult the platform module avoid list when setting non-module specific breakpoints.">;
+  def Arg0: Property<"arg0", "String">,
+    DefaultStringValue<"">,
+    Desc<"The first argument passed to the program in the argument array which can be different from the executable itself.">;
+  def RunArgs: Property<"run-args", "Args">,
+    DefaultStringValue<"">,
+    Desc<"A list containing all the arguments to be passed to the executable when it is run. Note that this does NOT include the argv[0] which is in target.arg0.">;
+  def EnvVars: Property<"env-vars", "Dictionary">,
+    DefaultUnsignedValue<16>,
+    Desc<"A list of all the environment variables to be passed to the executable's environment, and their values.">;
+  def InheritEnv: Property<"inherit-env", "Boolean">,
+    DefaultTrue,
+    Desc<"Inherit the environment from the process that is running LLDB.">;
+  def InputPath: Property<"input-path", "FileSpec">,
+    DefaultStringValue<"">,
+    Desc<"The file/path to be used by the executable program for reading its standard input.">;
+  def OutputPath: Property<"output-path", "FileSpec">,
+    DefaultStringValue<"">,
+    Desc<"The file/path to be used by the executable program for writing its standard output.">;
+  def ErrorPath: Property<"error-path", "FileSpec">,
+    DefaultStringValue<"">,
+    Desc<"The file/path to be used by the executable program for writing its standard error.">;
+  def DetachOnError: Property<"detach-on-error", "Boolean">,
+    DefaultTrue,
+    Desc<"debugserver will detach (rather than killing) a process if it loses connection with lldb.">;
+  def PreloadSymbols: Property<"preload-symbols", "Boolean">,
+    DefaultTrue,
+    Desc<"Enable loading of symbol tables before they are needed.">;
+  def DisableASLR: Property<"disable-aslr", "Boolean">,
+    DefaultTrue,
+    Desc<"Disable Address Space Layout Randomization (ASLR)">;
+  def DisableSTDIO: Property<"disable-stdio", "Boolean">,
+    DefaultFalse,
+    Desc<"Disable stdin/stdout for process (e.g. for a GUI application)">;
+  def InlineStrategy: Property<"inline-breakpoint-strategy", "Enum">,
+    DefaultEnumValue<"eInlineBreakpointsAlways">,
+    EnumValues<"OptionEnumValues(g_inline_breakpoint_enums)">,
+    Desc<"The strategy to use when settings breakpoints by file and line. Breakpoint locations can end up being inlined by the compiler, so that a compile unit 'a.c' might contain an inlined function from another source file. Usually this is limited to breakpoint locations from inlined functions from header or other include files, or more accurately non-implementation source files. Sometimes code might #include implementation files and cause inlined breakpoint locations in inlined implementation files. Always checking for inlined breakpoint locations can be expensive (memory and time), so if you have a project with many headers and find that setting breakpoints is slow, then you can change this setting to headers. This setting allows you to control exactly which strategy is used when setting file and line breakpoints.">;
+  def DisassemblyFlavor: Property<"x86-disassembly-flavor", "Enum">,
+    DefaultEnumValue<"eX86DisFlavorDefault">,
+    EnumValues<"OptionEnumValues(g_x86_dis_flavor_value_types)">,
+    Desc<"The default disassembly flavor to use for x86 or x86-64 targets.">;
+  def UseHexImmediates: Property<"use-hex-immediates", "Boolean">,
+    DefaultTrue,
+    Desc<"Show immediates in disassembly as hexadecimal.">;
+  def HexImmediateStyle: Property<"hex-immediate-style", "Enum">,
+    DefaultEnumValue<"Disassembler::eHexStyleC">,
+    EnumValues<"OptionEnumValues(g_hex_immediate_style_values)">,
+    Desc<"Which style to use for printing hexadecimal disassembly values.">;
+  def UseFastStepping: Property<"use-fast-stepping", "Boolean">,
+    DefaultTrue,
+    Desc<"Use a fast stepping algorithm based on running from branch to branch rather than instruction single-stepping.">;
+  def LoadScriptFromSymbolFile: Property<"load-script-from-symbol-file", "Enum">,
+    DefaultEnumValue<"eLoadScriptFromSymFileWarn">,
+    EnumValues<"OptionEnumValues(g_load_script_from_sym_file_values)">,
+    Desc<"Allow LLDB to load scripting resources embedded in symbol files when available.">;
+  def LoadCWDlldbinitFile: Property<"load-cwd-lldbinit", "Enum">,
+    DefaultEnumValue<"eLoadCWDlldbinitWarn">,
+    EnumValues<"OptionEnumValues(g_load_cwd_lldbinit_values)">,
+    Desc<"Allow LLDB to .lldbinit files from the current directory automatically.">;
+  def MemoryModuleLoadLevel: Property<"memory-module-load-level", "Enum">,
+    DefaultEnumValue<"eMemoryModuleLoadLevelComplete">,
+    EnumValues<"OptionEnumValues(g_memory_module_load_level_values)">,
+    Desc<"Loading modules from memory can be slow as reading the symbol tables and other data can take a long time depending on your connection to the debug target. This setting helps users control how much information gets loaded when loading modules from memory.'complete' is the default value for this setting which will load all sections and symbols by reading them from memory (slowest, most accurate). 'partial' will load sections and attempt to find function bounds without downloading the symbol table (faster, still accurate, missing symbol names). 'minimal' is the fastest setting and will load section data with no symbols, but should rarely be used as stack frames in these memory regions will be inaccurate and not provide any context (fastest). ">;
+  def DisplayExpressionsInCrashlogs: Property<"display-expression-in-crashlogs", "Boolean">,
+    DefaultFalse,
+    Desc<"Expressions that crash will show up in crash logs if the host system supports executable specific crash log strings and this setting is set to true.">;
+  def TrapHandlerNames: Property<"trap-handler-names", "Array">,
+    Global,
+    DefaultUnsignedValue<16>,
+    Desc<"A list of trap handler function names, e.g. a common Unix user process one is _sigtramp.">;
+  def DisplayRuntimeSupportValues: Property<"display-runtime-support-values", "Boolean">,
+    DefaultFalse,
+    Desc<"If true, LLDB will show variables that are meant to support the operation of a language's runtime support.">;
+  def DisplayRecognizedArguments: Property<"display-recognized-arguments", "Boolean">,
+    DefaultFalse,
+    Desc<"Show recognized arguments in variable listings by default.">;
+  def NonStopModeEnabled: Property<"non-stop-mode", "Boolean">,
+    DefaultFalse,
+    Desc<"Disable lock-step debugging, instead control threads independently.">;
+  def RequireHardwareBreakpoints: Property<"require-hardware-breakpoint", "Boolean">,
+    DefaultFalse,
+    Desc<"Require all breakpoints to be hardware breakpoints.">;
+}
+
+let Definition = "process" in {
+  def DisableMemCache: Property<"disable-memory-cache", "Boolean">,
+    DefaultFalse,
+    Desc<"Disable reading and caching of memory in fixed-size units.">;
+  def ExtraStartCommand: Property<"extra-startup-command", "Array">,
+    DefaultUnsignedValue<16>,
+    Desc<"A list containing extra commands understood by the particular process plugin used.  For instance, to turn on debugserver logging set this to 'QSetLogging:bitmask=LOG_DEFAULT;'">;
+  def IgnoreBreakpointsInExpressions: Property<"ignore-breakpoints-in-expressions", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, breakpoints will be ignored during expression evaluation.">;
+  def UnwindOnErrorInExpressions: Property<"unwind-on-error-in-expressions", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, errors in expression evaluation will unwind the stack back to the state before the call.">;
+  def PythonOSPluginPath: Property<"python-os-plugin-path", "FileSpec">,
+    DefaultUnsignedValue<1>,
+    Desc<"A path to a python OS plug-in module file that contains a OperatingSystemPlugIn class.">;
+  def StopOnSharedLibraryEvents: Property<"stop-on-sharedlibrary-events", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"If true, stop when a shared library is loaded or unloaded.">;
+  def DetachKeepsStopped: Property<"detach-keeps-stopped", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"If true, detach will attempt to keep the process stopped.">;
+  def MemCacheLineSize: Property<"memory-cache-line-size", "UInt64">,
+    DefaultUnsignedValue<512>,
+    Desc<"The memory cache line size">;
+  def WarningOptimization: Property<"optimization-warnings", "Boolean">,
+    DefaultTrue,
+    Desc<"If true, warn when stopped in code that is optimized where stepping and variable availability may not behave as expected.">;
+  def StopOnExec: Property<"stop-on-exec", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, stop when a shared library is loaded or unloaded.">;
+  def UtilityExpressionTimeout: Property<"utility-expression-timeout", "UInt64">,
+    DefaultUnsignedValue<15>,
+    Desc<"The time in seconds to wait for LLDB-internal utility expressions.">;
+}
+
+let Definition = "platform" in {
+  def UseModuleCache: Property<"use-module-cache", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"Use module cache.">;
+  def ModuleCacheDirectory: Property<"module-cache-directory", "FileSpec">,
+    Global,
+    DefaultStringValue<"">,
+    Desc<"Root directory for cached modules.">;
+}
+
+let Definition = "thread" in {
+  def StepInAvoidsNoDebug: Property<"step-in-avoid-nodebug", "Boolean">,
+    Global,
+    DefaultTrue,
+    Desc<"If true, step-in will not stop in functions with no debug information.">;
+  def StepOutAvoidsNoDebug: Property<"step-out-avoid-nodebug", "Boolean">,
+    Global,
+    DefaultFalse,
+    Desc<"If true, when step-in/step-out/step-over leave the current frame, they will continue to step out till they come to a function with debug information. Passing a frame argument to step-out will override this option.">;
+  def StepAvoidRegex: Property<"step-avoid-regexp", "Regex">,
+    Global,
+    DefaultStringValue<"^std::">,
+    Desc<"A regular expression defining functions step-in won't stop in.">;
+  def StepAvoidLibraries: Property<"step-avoid-libraries", "FileSpecList">,
+    Global,
+    DefaultStringValue<"">,
+    Desc<"A list of libraries that source stepping won't stop in.">;
+  def EnableThreadTrace: Property<"trace-thread", "Boolean">,
+    DefaultFalse,
+    Desc<"If true, this thread will single-step and log execution.">;
+  def MaxBacktraceDepth: Property<"max-backtrace-depth", "UInt64">,
+    DefaultUnsignedValue<300000>,
+    Desc<"Maximum number of frames to backtrace.">;
+}
diff --git a/src/llvm-project/lldb/source/Target/Thread.cpp b/src/llvm-project/lldb/source/Target/Thread.cpp
index 7a6b49e..e12b905 100644
--- a/src/llvm-project/lldb/source/Target/Thread.cpp
+++ b/src/llvm-project/lldb/source/Target/Thread.cpp
@@ -13,6 +13,7 @@
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/FormatEntity.h"
 #include "lldb/Core/Module.h"
+#include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Interpreter/OptionValueFileSpecList.h"
@@ -63,31 +64,12 @@
   return *g_settings_sp_ptr;
 }
 
-static constexpr PropertyDefinition g_properties[] = {
-    {"step-in-avoid-nodebug", OptionValue::eTypeBoolean, true, true, nullptr,
-     {},
-     "If true, step-in will not stop in functions with no debug information."},
-    {"step-out-avoid-nodebug", OptionValue::eTypeBoolean, true, false, nullptr,
-     {}, "If true, when step-in/step-out/step-over leave the current frame, "
-         "they will continue to step out till they come to a function with "
-         "debug information. Passing a frame argument to step-out will "
-         "override this option."},
-    {"step-avoid-regexp", OptionValue::eTypeRegex, true, 0, "^std::", {},
-     "A regular expression defining functions step-in won't stop in."},
-    {"step-avoid-libraries", OptionValue::eTypeFileSpecList, true, 0, nullptr,
-     {}, "A list of libraries that source stepping won't stop in."},
-    {"trace-thread", OptionValue::eTypeBoolean, false, false, nullptr, {},
-     "If true, this thread will single-step and log execution."},
-    {"max-backtrace-depth", OptionValue::eTypeUInt64, false, 300000, nullptr,
-     {}, "Maximum number of frames to backtrace."}};
+#define LLDB_PROPERTIES_thread
+#include "TargetProperties.inc"
 
 enum {
-  ePropertyStepInAvoidsNoDebug,
-  ePropertyStepOutAvoidsNoDebug,
-  ePropertyStepAvoidRegex,
-  ePropertyStepAvoidLibraries,
-  ePropertyEnableThreadTrace,
-  ePropertyMaxBacktraceDepth
+#define LLDB_PROPERTIES_thread
+#include "TargetPropertiesEnum.inc"
 };
 
 class ThreadOptionValueProperties : public OptionValueProperties {
@@ -125,7 +107,7 @@
   if (is_global) {
     m_collection_sp =
         std::make_shared<ThreadOptionValueProperties>(ConstString("thread"));
-    m_collection_sp->Initialize(g_properties);
+    m_collection_sp->Initialize(g_thread_properties);
   } else
     m_collection_sp = std::make_shared<ThreadOptionValueProperties>(
         Thread::GetGlobalProperties().get());
@@ -150,25 +132,25 @@
 bool ThreadProperties::GetTraceEnabledState() const {
   const uint32_t idx = ePropertyEnableThreadTrace;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_thread_properties[idx].default_uint_value != 0);
 }
 
 bool ThreadProperties::GetStepInAvoidsNoDebug() const {
   const uint32_t idx = ePropertyStepInAvoidsNoDebug;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_thread_properties[idx].default_uint_value != 0);
 }
 
 bool ThreadProperties::GetStepOutAvoidsNoDebug() const {
   const uint32_t idx = ePropertyStepOutAvoidsNoDebug;
   return m_collection_sp->GetPropertyAtIndexAsBoolean(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_thread_properties[idx].default_uint_value != 0);
 }
 
 uint64_t ThreadProperties::GetMaxBacktraceDepth() const {
   const uint32_t idx = ePropertyMaxBacktraceDepth;
   return m_collection_sp->GetPropertyAtIndexAsUInt64(
-      nullptr, idx, g_properties[idx].default_uint_value != 0);
+      nullptr, idx, g_thread_properties[idx].default_uint_value != 0);
 }
 
 // Thread Event Data
@@ -256,9 +238,8 @@
       m_override_should_notify(eLazyBoolCalculate),
       m_extended_info_fetched(false), m_extended_info() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p Thread::Thread(tid = 0x%4.4" PRIx64 ")",
-                static_cast<void *>(this), GetID());
+  LLDB_LOGF(log, "%p Thread::Thread(tid = 0x%4.4" PRIx64 ")",
+            static_cast<void *>(this), GetID());
 
   CheckInWithManager();
 
@@ -267,9 +248,8 @@
 
 Thread::~Thread() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
-  if (log)
-    log->Printf("%p Thread::~Thread(tid = 0x%4.4" PRIx64 ")",
-                static_cast<void *>(this), GetID());
+  LLDB_LOGF(log, "%p Thread::~Thread(tid = 0x%4.4" PRIx64 ")",
+            static_cast<void *>(this), GetID());
   /// If you hit this assert, it means your derived class forgot to call
   /// DoDestroy in its destructor.
   assert(m_destroy_called);
@@ -411,6 +391,11 @@
   }
 }
 
+void Thread::CalculatePublicStopInfo() {
+  ResetStopInfo();
+  SetStopInfo(GetStopInfo());
+}
+
 lldb::StopInfoSP Thread::GetPrivateStopInfo() {
   if (m_destroy_called)
     return m_stop_info_sp;
@@ -490,11 +475,10 @@
   else
     m_stop_info_stop_id = UINT32_MAX;
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("%p: tid = 0x%" PRIx64 ": stop info = %s (stop_id = %u)",
-                static_cast<void *>(this), GetID(),
-                stop_info_sp ? stop_info_sp->GetDescription() : "<NULL>",
-                m_stop_info_stop_id);
+  LLDB_LOGF(log, "%p: tid = 0x%" PRIx64 ": stop info = %s (stop_id = %u)",
+            static_cast<void *>(this), GetID(),
+            stop_info_sp ? stop_info_sp->GetDescription() : "<NULL>",
+            m_stop_info_stop_id);
 }
 
 void Thread::SetShouldReportStop(Vote vote) {
@@ -721,18 +705,18 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
 
   if (GetResumeState() == eStateSuspended) {
-    if (log)
-      log->Printf("Thread::%s for tid = 0x%4.4" PRIx64 " 0x%4.4" PRIx64
-                  ", should_stop = 0 (ignore since thread was suspended)",
-                  __FUNCTION__, GetID(), GetProtocolID());
+    LLDB_LOGF(log,
+              "Thread::%s for tid = 0x%4.4" PRIx64 " 0x%4.4" PRIx64
+              ", should_stop = 0 (ignore since thread was suspended)",
+              __FUNCTION__, GetID(), GetProtocolID());
     return false;
   }
 
   if (GetTemporaryResumeState() == eStateSuspended) {
-    if (log)
-      log->Printf("Thread::%s for tid = 0x%4.4" PRIx64 " 0x%4.4" PRIx64
-                  ", should_stop = 0 (ignore since thread was suspended)",
-                  __FUNCTION__, GetID(), GetProtocolID());
+    LLDB_LOGF(log,
+              "Thread::%s for tid = 0x%4.4" PRIx64 " 0x%4.4" PRIx64
+              ", should_stop = 0 (ignore since thread was suspended)",
+              __FUNCTION__, GetID(), GetProtocolID());
     return false;
   }
 
@@ -740,28 +724,28 @@
   // thread caused the process to stop. NOTE: this must take place before the
   // plan is moved from the current plan stack to the completed plan stack.
   if (!ThreadStoppedForAReason()) {
-    if (log)
-      log->Printf("Thread::%s for tid = 0x%4.4" PRIx64 " 0x%4.4" PRIx64
-                  ", pc = 0x%16.16" PRIx64
-                  ", should_stop = 0 (ignore since no stop reason)",
-                  __FUNCTION__, GetID(), GetProtocolID(),
-                  GetRegisterContext() ? GetRegisterContext()->GetPC()
-                                       : LLDB_INVALID_ADDRESS);
+    LLDB_LOGF(log,
+              "Thread::%s for tid = 0x%4.4" PRIx64 " 0x%4.4" PRIx64
+              ", pc = 0x%16.16" PRIx64
+              ", should_stop = 0 (ignore since no stop reason)",
+              __FUNCTION__, GetID(), GetProtocolID(),
+              GetRegisterContext() ? GetRegisterContext()->GetPC()
+                                   : LLDB_INVALID_ADDRESS);
     return false;
   }
 
   if (log) {
-    log->Printf("Thread::%s(%p) for tid = 0x%4.4" PRIx64 " 0x%4.4" PRIx64
-                ", pc = 0x%16.16" PRIx64,
-                __FUNCTION__, static_cast<void *>(this), GetID(),
-                GetProtocolID(),
-                GetRegisterContext() ? GetRegisterContext()->GetPC()
-                                     : LLDB_INVALID_ADDRESS);
-    log->Printf("^^^^^^^^ Thread::ShouldStop Begin ^^^^^^^^");
+    LLDB_LOGF(log,
+              "Thread::%s(%p) for tid = 0x%4.4" PRIx64 " 0x%4.4" PRIx64
+              ", pc = 0x%16.16" PRIx64,
+              __FUNCTION__, static_cast<void *>(this), GetID(), GetProtocolID(),
+              GetRegisterContext() ? GetRegisterContext()->GetPC()
+                                   : LLDB_INVALID_ADDRESS);
+    LLDB_LOGF(log, "^^^^^^^^ Thread::ShouldStop Begin ^^^^^^^^");
     StreamString s;
     s.IndentMore();
     DumpThreadPlans(&s);
-    log->Printf("Plan stack initial state:\n%s", s.GetData());
+    LLDB_LOGF(log, "Plan stack initial state:\n%s", s.GetData());
   }
 
   // The top most plan always gets to do the trace log...
@@ -774,9 +758,8 @@
   StopInfoSP private_stop_info(GetPrivateStopInfo());
   if (private_stop_info &&
       !private_stop_info->ShouldStopSynchronous(event_ptr)) {
-    if (log)
-      log->Printf("StopInfo::ShouldStop async callback says we should not "
-                  "stop, returning ShouldStop of false.");
+    LLDB_LOGF(log, "StopInfo::ShouldStop async callback says we should not "
+                   "stop, returning ShouldStop of false.");
     return false;
   }
 
@@ -840,15 +823,13 @@
   if (!done_processing_current_plan) {
     bool over_ride_stop = current_plan->ShouldAutoContinue(event_ptr);
 
-    if (log)
-      log->Printf("Plan %s explains stop, auto-continue %i.",
-                  current_plan->GetName(), over_ride_stop);
+    LLDB_LOGF(log, "Plan %s explains stop, auto-continue %i.",
+              current_plan->GetName(), over_ride_stop);
 
     // We're starting from the base plan, so just let it decide;
     if (PlanIsBasePlan(current_plan)) {
       should_stop = current_plan->ShouldStop(event_ptr);
-      if (log)
-        log->Printf("Base plan says should stop: %i.", should_stop);
+      LLDB_LOGF(log, "Base plan says should stop: %i.", should_stop);
     } else {
       // Otherwise, don't let the base plan override what the other plans say
       // to do, since presumably if there were other plans they would know what
@@ -858,9 +839,8 @@
           break;
 
         should_stop = current_plan->ShouldStop(event_ptr);
-        if (log)
-          log->Printf("Plan %s should stop: %d.", current_plan->GetName(),
-                      should_stop);
+        LLDB_LOGF(log, "Plan %s should stop: %d.", current_plan->GetName(),
+                  should_stop);
         if (current_plan->MischiefManaged()) {
           if (should_stop)
             current_plan->WillStop();
@@ -907,10 +887,10 @@
       plan_ptr = GetPreviousPlan(examined_plan);
 
       if (stale) {
-        if (log)
-          log->Printf(
-              "Plan %s being discarded in cleanup, it says it is already done.",
-              examined_plan->GetName());
+        LLDB_LOGF(
+            log,
+            "Plan %s being discarded in cleanup, it says it is already done.",
+            examined_plan->GetName());
         while (GetCurrentPlan() != examined_plan) {
           DiscardPlan();
         }
@@ -929,9 +909,9 @@
     StreamString s;
     s.IndentMore();
     DumpThreadPlans(&s);
-    log->Printf("Plan stack final state:\n%s", s.GetData());
-    log->Printf("vvvvvvvv Thread::ShouldStop End (returning %i) vvvvvvvv",
-                should_stop);
+    LLDB_LOGF(log, "Plan stack final state:\n%s", s.GetData());
+    LLDB_LOGF(log, "vvvvvvvv Thread::ShouldStop End (returning %i) vvvvvvvv",
+              should_stop);
   }
   return should_stop;
 }
@@ -943,37 +923,36 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
 
   if (thread_state == eStateSuspended || thread_state == eStateInvalid) {
-    if (log)
-      log->Printf("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
-                  ": returning vote %i (state was suspended or invalid)",
-                  GetID(), eVoteNoOpinion);
+    LLDB_LOGF(log,
+              "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
+              ": returning vote %i (state was suspended or invalid)",
+              GetID(), eVoteNoOpinion);
     return eVoteNoOpinion;
   }
 
   if (temp_thread_state == eStateSuspended ||
       temp_thread_state == eStateInvalid) {
-    if (log)
-      log->Printf(
-          "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
-          ": returning vote %i (temporary state was suspended or invalid)",
-          GetID(), eVoteNoOpinion);
+    LLDB_LOGF(log,
+              "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
+              ": returning vote %i (temporary state was suspended or invalid)",
+              GetID(), eVoteNoOpinion);
     return eVoteNoOpinion;
   }
 
   if (!ThreadStoppedForAReason()) {
-    if (log)
-      log->Printf("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
-                  ": returning vote %i (thread didn't stop for a reason.)",
-                  GetID(), eVoteNoOpinion);
+    LLDB_LOGF(log,
+              "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
+              ": returning vote %i (thread didn't stop for a reason.)",
+              GetID(), eVoteNoOpinion);
     return eVoteNoOpinion;
   }
 
   if (m_completed_plan_stack.size() > 0) {
     // Don't use GetCompletedPlan here, since that suppresses private plans.
-    if (log)
-      log->Printf("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
-                  ": returning vote  for complete stack's back plan",
-                  GetID());
+    LLDB_LOGF(log,
+              "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
+              ": returning vote  for complete stack's back plan",
+              GetID());
     return m_completed_plan_stack.back()->ShouldReportStop(event_ptr);
   } else {
     Vote thread_vote = eVoteNoOpinion;
@@ -988,10 +967,10 @@
       else
         plan_ptr = GetPreviousPlan(plan_ptr);
     }
-    if (log)
-      log->Printf("Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
-                  ": returning vote %i for current plan",
-                  GetID(), thread_vote);
+    LLDB_LOGF(log,
+              "Thread::ShouldReportStop() tid = 0x%4.4" PRIx64
+              ": returning vote %i for current plan",
+              GetID(), thread_vote);
 
     return thread_vote;
   }
@@ -1007,21 +986,21 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
   if (m_completed_plan_stack.size() > 0) {
     // Don't use GetCompletedPlan here, since that suppresses private plans.
-    if (log)
-      log->Printf("Current Plan for thread %d(%p) (0x%4.4" PRIx64
-                  ", %s): %s being asked whether we should report run.",
-                  GetIndexID(), static_cast<void *>(this), GetID(),
-                  StateAsCString(GetTemporaryResumeState()),
-                  m_completed_plan_stack.back()->GetName());
+    LLDB_LOGF(log,
+              "Current Plan for thread %d(%p) (0x%4.4" PRIx64
+              ", %s): %s being asked whether we should report run.",
+              GetIndexID(), static_cast<void *>(this), GetID(),
+              StateAsCString(GetTemporaryResumeState()),
+              m_completed_plan_stack.back()->GetName());
 
     return m_completed_plan_stack.back()->ShouldReportRun(event_ptr);
   } else {
-    if (log)
-      log->Printf("Current Plan for thread %d(%p) (0x%4.4" PRIx64
-                  ", %s): %s being asked whether we should report run.",
-                  GetIndexID(), static_cast<void *>(this), GetID(),
-                  StateAsCString(GetTemporaryResumeState()),
-                  GetCurrentPlan()->GetName());
+    LLDB_LOGF(log,
+              "Current Plan for thread %d(%p) (0x%4.4" PRIx64
+              ", %s): %s being asked whether we should report run.",
+              GetIndexID(), static_cast<void *>(this), GetID(),
+              StateAsCString(GetTemporaryResumeState()),
+              GetCurrentPlan()->GetName());
 
     return GetCurrentPlan()->ShouldReportRun(event_ptr);
   }
@@ -1048,9 +1027,9 @@
     if (log) {
       StreamString s;
       thread_plan_sp->GetDescription(&s, lldb::eDescriptionLevelFull);
-      log->Printf("Thread::PushPlan(0x%p): \"%s\", tid = 0x%4.4" PRIx64 ".",
-                  static_cast<void *>(this), s.GetData(),
-                  thread_plan_sp->GetThread().GetID());
+      LLDB_LOGF(log, "Thread::PushPlan(0x%p): \"%s\", tid = 0x%4.4" PRIx64 ".",
+                static_cast<void *>(this), s.GetData(),
+                thread_plan_sp->GetThread().GetID());
     }
   }
 }
@@ -1063,8 +1042,8 @@
   else {
     ThreadPlanSP &plan = m_plan_stack.back();
     if (log) {
-      log->Printf("Popping plan: \"%s\", tid = 0x%4.4" PRIx64 ".",
-                  plan->GetName(), plan->GetThread().GetID());
+      LLDB_LOGF(log, "Popping plan: \"%s\", tid = 0x%4.4" PRIx64 ".",
+                plan->GetName(), plan->GetThread().GetID());
     }
     m_completed_plan_stack.push_back(plan);
     plan->WillPop();
@@ -1076,9 +1055,8 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
   if (m_plan_stack.size() > 1) {
     ThreadPlanSP &plan = m_plan_stack.back();
-    if (log)
-      log->Printf("Discarding plan: \"%s\", tid = 0x%4.4" PRIx64 ".",
-                  plan->GetName(), plan->GetThread().GetID());
+    LLDB_LOGF(log, "Discarding plan: \"%s\", tid = 0x%4.4" PRIx64 ".",
+              plan->GetName(), plan->GetThread().GetID());
 
     m_discarded_plan_stack.push_back(plan);
     plan->WillPop();
@@ -1252,10 +1230,10 @@
 
 void Thread::DiscardThreadPlansUpToPlan(ThreadPlan *up_to_plan_ptr) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-  if (log)
-    log->Printf("Discarding thread plans for thread tid = 0x%4.4" PRIx64
-                ", up to %p",
-                GetID(), static_cast<void *>(up_to_plan_ptr));
+  LLDB_LOGF(log,
+            "Discarding thread plans for thread tid = 0x%4.4" PRIx64
+            ", up to %p",
+            GetID(), static_cast<void *>(up_to_plan_ptr));
 
   int stack_size = m_plan_stack.size();
 
@@ -1285,9 +1263,10 @@
 void Thread::DiscardThreadPlans(bool force) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
   if (log) {
-    log->Printf("Discarding thread plans for thread (tid = 0x%4.4" PRIx64
-                ", force %d)",
-                GetID(), force);
+    LLDB_LOGF(log,
+              "Discarding thread plans for thread (tid = 0x%4.4" PRIx64
+              ", force %d)",
+              GetID(), force);
   }
 
   if (force) {
@@ -1504,9 +1483,18 @@
 }
 
 lldb::ThreadPlanSP Thread::QueueThreadPlanForStepScripted(
-    bool abort_other_plans, const char *class_name, bool stop_other_threads,
+    bool abort_other_plans, const char *class_name, 
+    StructuredData::ObjectSP extra_args_sp,  bool stop_other_threads,
     Status &status) {
-  ThreadPlanSP thread_plan_sp(new ThreadPlanPython(*this, class_name));
+    
+  StructuredDataImpl *extra_args_impl = nullptr; 
+  if (extra_args_sp) {
+    extra_args_impl = new StructuredDataImpl();
+    extra_args_impl->SetObjectSP(extra_args_sp);
+  }
+
+  ThreadPlanSP thread_plan_sp(new ThreadPlanPython(*this, class_name, 
+                                                   extra_args_impl));
 
   status = QueueThreadPlan(thread_plan_sp, abort_other_plans);
   return thread_plan_sp;
@@ -2062,6 +2050,7 @@
     case llvm::Triple::x86:
     case llvm::Triple::arm:
     case llvm::Triple::aarch64:
+    case llvm::Triple::aarch64_32:
     case llvm::Triple::thumb:
     case llvm::Triple::mips:
     case llvm::Triple::mipsel:
@@ -2072,6 +2061,7 @@
     case llvm::Triple::ppc64le:
     case llvm::Triple::systemz:
     case llvm::Triple::hexagon:
+    case llvm::Triple::arc:
       m_unwinder_up.reset(new UnwindLLDB(*this));
       break;
 
diff --git a/src/llvm-project/lldb/source/Target/ThreadList.cpp b/src/llvm-project/lldb/source/Target/ThreadList.cpp
index afdfda3..183b39c 100644
--- a/src/llvm-project/lldb/source/Target/ThreadList.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadList.cpp
@@ -267,10 +267,11 @@
 
   if (log) {
     log->PutCString("");
-    log->Printf("ThreadList::%s: %" PRIu64 " threads, %" PRIu64
-                " unsuspended threads",
-                __FUNCTION__, (uint64_t)m_threads.size(),
-                (uint64_t)threads_copy.size());
+    LLDB_LOGF(log,
+              "ThreadList::%s: %" PRIu64 " threads, %" PRIu64
+              " unsuspended threads",
+              __FUNCTION__, (uint64_t)m_threads.size(),
+              (uint64_t)threads_copy.size());
   }
 
   bool did_anybody_stop_for_a_reason = false;
@@ -279,10 +280,9 @@
   // what.  Otherwise, presume we won't stop.
   bool should_stop = false;
   if (Process::ProcessEventData::GetInterruptedFromEvent(event_ptr)) {
-    if (log)
-      log->Printf(
-          "ThreadList::%s handling interrupt event, should stop set to true",
-          __FUNCTION__);
+    LLDB_LOGF(
+        log, "ThreadList::%s handling interrupt event, should stop set to true",
+        __FUNCTION__);
 
     should_stop = true;
   }
@@ -334,15 +334,14 @@
 
   if (!should_stop && !did_anybody_stop_for_a_reason) {
     should_stop = true;
-    if (log)
-      log->Printf("ThreadList::%s we stopped but no threads had a stop reason, "
-                  "overriding should_stop and stopping.",
-                  __FUNCTION__);
+    LLDB_LOGF(log,
+              "ThreadList::%s we stopped but no threads had a stop reason, "
+              "overriding should_stop and stopping.",
+              __FUNCTION__);
   }
 
-  if (log)
-    log->Printf("ThreadList::%s overall should_stop = %i", __FUNCTION__,
-                should_stop);
+  LLDB_LOGF(log, "ThreadList::%s overall should_stop = %i", __FUNCTION__,
+            should_stop);
 
   if (should_stop) {
     for (pos = threads_copy.begin(); pos != end; ++pos) {
@@ -363,9 +362,8 @@
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
 
-  if (log)
-    log->Printf("ThreadList::%s %" PRIu64 " threads", __FUNCTION__,
-                (uint64_t)m_threads.size());
+  LLDB_LOGF(log, "ThreadList::%s %" PRIu64 " threads", __FUNCTION__,
+            (uint64_t)m_threads.size());
 
   // Run through the threads and ask whether we should report this event. For
   // stopping, a YES vote wins over everything.  A NO vote wins over NO
@@ -430,10 +428,10 @@
           result = eVoteYes;
         break;
       case eVoteNo:
-        if (log)
-          log->Printf("ThreadList::ShouldReportRun() thread %d (0x%4.4" PRIx64
-                      ") says don't report.",
-                      (*pos)->GetIndexID(), (*pos)->GetID());
+        LLDB_LOGF(log,
+                  "ThreadList::ShouldReportRun() thread %d (0x%4.4" PRIx64
+                  ") says don't report.",
+                  (*pos)->GetIndexID(), (*pos)->GetID());
         result = eVoteNo;
         break;
       }
@@ -464,8 +462,9 @@
 
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
   if (log && log->GetVerbose())
-    log->Printf("Turning off notification of new threads while single stepping "
-                "a thread.");
+    LLDB_LOGF(log,
+              "Turning off notification of new threads while single stepping "
+              "a thread.");
 
   collection::iterator pos, end = m_threads.end();
   for (pos = m_threads.begin(); pos != end; ++pos)
@@ -517,14 +516,14 @@
   if (wants_solo_run) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
     if (log && log->GetVerbose())
-      log->Printf("Turning on notification of new threads while single "
-                  "stepping a thread.");
+      LLDB_LOGF(log, "Turning on notification of new threads while single "
+                     "stepping a thread.");
     m_process->StartNoticingNewThreads();
   } else {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
     if (log && log->GetVerbose())
-      log->Printf("Turning off notification of new threads while single "
-                  "stepping a thread.");
+      LLDB_LOGF(log, "Turning off notification of new threads while single "
+                     "stepping a thread.");
     m_process->StopNoticingNewThreads();
   }
 
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlan.cpp b/src/llvm-project/lldb/source/Target/ThreadPlan.cpp
index 1d8cc18..ba56f8d 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlan.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlan.cpp
@@ -108,7 +108,8 @@
       addr_t pc = reg_ctx->GetPC();
       addr_t sp = reg_ctx->GetSP();
       addr_t fp = reg_ctx->GetFP();
-      log->Printf(
+      LLDB_LOGF(
+          log,
           "%s Thread #%u (0x%p): tid = 0x%4.4" PRIx64 ", pc = 0x%8.8" PRIx64
           ", sp = 0x%8.8" PRIx64 ", fp = 0x%8.8" PRIx64 ", "
           "plan = '%s', state = %s, stop others = %d",
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanBase.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanBase.cpp
index 9cd4bcb..821643d 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanBase.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanBase.cpp
@@ -92,11 +92,11 @@
         // If we are going to stop for a breakpoint, then unship the other
         // plans at this point.  Don't force the discard, however, so Master
         // plans can stay in place if they want to.
-        if (log)
-          log->Printf(
-              "Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64
-              " (breakpoint hit.)",
-              m_thread.GetID());
+        LLDB_LOGF(
+            log,
+            "Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64
+            " (breakpoint hit.)",
+            m_thread.GetID());
         m_thread.DiscardThreadPlans(false);
         return true;
       }
@@ -122,11 +122,11 @@
       // If we crashed, discard thread plans and stop.  Don't force the
       // discard, however, since on rerun the target may clean up this
       // exception and continue normally from there.
-      if (log)
-        log->Printf(
-            "Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64
-            " (exception: %s)",
-            m_thread.GetID(), stop_info_sp->GetDescription());
+      LLDB_LOGF(
+          log,
+          "Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64
+          " (exception: %s)",
+          m_thread.GetID(), stop_info_sp->GetDescription());
       m_thread.DiscardThreadPlans(false);
       return true;
 
@@ -134,22 +134,22 @@
       // If we crashed, discard thread plans and stop.  Don't force the
       // discard, however, since on rerun the target may clean up this
       // exception and continue normally from there.
-      if (log)
-        log->Printf(
-            "Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64
-            " (exec.)",
-            m_thread.GetID());
+      LLDB_LOGF(
+          log,
+          "Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64
+          " (exec.)",
+          m_thread.GetID());
       m_thread.DiscardThreadPlans(false);
       return true;
 
     case eStopReasonThreadExiting:
     case eStopReasonSignal:
       if (stop_info_sp->ShouldStop(event_ptr)) {
-        if (log)
-          log->Printf(
-              "Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64
-              " (signal: %s)",
-              m_thread.GetID(), stop_info_sp->GetDescription());
+        LLDB_LOGF(
+            log,
+            "Base plan discarding thread plans for thread tid = 0x%4.4" PRIx64
+            " (signal: %s)",
+            m_thread.GetID(), stop_info_sp->GetDescription());
         m_thread.DiscardThreadPlans(false);
         return true;
       } else {
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp
index 68d771c..23d114e 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -59,46 +59,21 @@
     m_constructor_errors.Printf(
         "Trying to put the stack in unreadable memory at: 0x%" PRIx64 ".",
         m_function_sp);
-    if (log)
-      log->Printf("ThreadPlanCallFunction(%p): %s.", static_cast<void *>(this),
-                  m_constructor_errors.GetData());
+    LLDB_LOGF(log, "ThreadPlanCallFunction(%p): %s.", static_cast<void *>(this),
+              m_constructor_errors.GetData());
     return false;
   }
 
-  Module *exe_module = GetTarget().GetExecutableModulePointer();
-
-  if (exe_module == nullptr) {
+  llvm::Expected<Address> start_address = GetTarget().GetEntryPointAddress();
+  if (!start_address) {
     m_constructor_errors.Printf(
-        "Can't execute code without an executable module.");
-    if (log)
-      log->Printf("ThreadPlanCallFunction(%p): %s.", static_cast<void *>(this),
-                  m_constructor_errors.GetData());
+        "%s", llvm::toString(start_address.takeError()).c_str());
+    LLDB_LOGF(log, "ThreadPlanCallFunction(%p): %s.", static_cast<void *>(this),
+              m_constructor_errors.GetData());
     return false;
-  } else {
-    ObjectFile *objectFile = exe_module->GetObjectFile();
-    if (!objectFile) {
-      m_constructor_errors.Printf(
-          "Could not find object file for module \"%s\".",
-          exe_module->GetFileSpec().GetFilename().AsCString());
-
-      if (log)
-        log->Printf("ThreadPlanCallFunction(%p): %s.",
-                    static_cast<void *>(this), m_constructor_errors.GetData());
-      return false;
-    }
-
-    m_start_addr = objectFile->GetEntryPointAddress();
-    if (!m_start_addr.IsValid()) {
-      m_constructor_errors.Printf(
-          "Could not find entry point address for executable module \"%s\".",
-          exe_module->GetFileSpec().GetFilename().AsCString());
-      if (log)
-        log->Printf("ThreadPlanCallFunction(%p): %s.",
-                    static_cast<void *>(this), m_constructor_errors.GetData());
-      return false;
-    }
   }
 
+  m_start_addr = *start_address;
   start_load_addr = m_start_addr.GetLoadAddress(&GetTarget());
 
   // Checkpoint the thread state so we can restore it later.
@@ -109,9 +84,8 @@
   if (!thread.CheckpointThreadState(m_stored_thread_state)) {
     m_constructor_errors.Printf("Setting up ThreadPlanCallFunction, failed to "
                                 "checkpoint thread state.");
-    if (log)
-      log->Printf("ThreadPlanCallFunction(%p): %s.", static_cast<void *>(this),
-                  m_constructor_errors.GetData());
+    LLDB_LOGF(log, "ThreadPlanCallFunction(%p): %s.", static_cast<void *>(this),
+              m_constructor_errors.GetData());
     return false;
   }
   function_load_addr = m_function_addr.GetLoadAddress(&GetTarget());
@@ -196,10 +170,10 @@
 
   if (!m_valid) {
     // Don't call DoTakedown if we were never valid to begin with.
-    if (log)
-      log->Printf("ThreadPlanCallFunction(%p): Log called on "
-                  "ThreadPlanCallFunction that was never valid.",
-                  static_cast<void *>(this));
+    LLDB_LOGF(log,
+              "ThreadPlanCallFunction(%p): Log called on "
+              "ThreadPlanCallFunction that was never valid.",
+              static_cast<void *>(this));
     return;
   }
 
@@ -207,20 +181,20 @@
     if (success) {
       SetReturnValue();
     }
-    if (log)
-      log->Printf("ThreadPlanCallFunction(%p): DoTakedown called for thread "
-                  "0x%4.4" PRIx64 ", m_valid: %d complete: %d.\n",
-                  static_cast<void *>(this), m_thread.GetID(), m_valid,
-                  IsPlanComplete());
+    LLDB_LOGF(log,
+              "ThreadPlanCallFunction(%p): DoTakedown called for thread "
+              "0x%4.4" PRIx64 ", m_valid: %d complete: %d.\n",
+              static_cast<void *>(this), m_thread.GetID(), m_valid,
+              IsPlanComplete());
     m_takedown_done = true;
     m_stop_address =
         m_thread.GetStackFrameAtIndex(0)->GetRegisterContext()->GetPC();
     m_real_stop_info_sp = GetPrivateStopInfo();
     if (!m_thread.RestoreRegisterStateFromCheckpoint(m_stored_thread_state)) {
-      if (log)
-        log->Printf("ThreadPlanCallFunction(%p): DoTakedown failed to restore "
-                    "register state",
-                    static_cast<void *>(this));
+      LLDB_LOGF(log,
+                "ThreadPlanCallFunction(%p): DoTakedown failed to restore "
+                "register state",
+                static_cast<void *>(this));
     }
     SetPlanComplete(success);
     ClearBreakpoints();
@@ -228,11 +202,11 @@
       ReportRegisterState("Restoring thread state after function call.  "
                           "Restored register state:");
   } else {
-    if (log)
-      log->Printf("ThreadPlanCallFunction(%p): DoTakedown called as no-op for "
-                  "thread 0x%4.4" PRIx64 ", m_valid: %d complete: %d.\n",
-                  static_cast<void *>(this), m_thread.GetID(), m_valid,
-                  IsPlanComplete());
+    LLDB_LOGF(log,
+              "ThreadPlanCallFunction(%p): DoTakedown called as no-op for "
+              "thread 0x%4.4" PRIx64 ", m_valid: %d complete: %d.\n",
+              static_cast<void *>(this), m_thread.GetID(), m_valid,
+              IsPlanComplete());
   }
 }
 
@@ -288,10 +262,9 @@
     stop_reason = eStopReasonNone;
   else
     stop_reason = m_real_stop_info_sp->GetStopReason();
-  if (log)
-    log->Printf(
-        "ThreadPlanCallFunction::PlanExplainsStop: Got stop reason - %s.",
-        Thread::StopReasonAsCString(stop_reason));
+  LLDB_LOGF(log,
+            "ThreadPlanCallFunction::PlanExplainsStop: Got stop reason - %s.",
+            Thread::StopReasonAsCString(stop_reason));
 
   if (stop_reason == eStopReasonBreakpoint && BreakpointsExplainStop())
     return true;
@@ -300,9 +273,8 @@
   // then we should not consider ourselves complete.  Return true to
   // acknowledge the stop.
   if (Process::ProcessEventData::GetInterruptedFromEvent(event_ptr)) {
-    if (log)
-      log->Printf("ThreadPlanCallFunction::PlanExplainsStop: The event is an "
-                  "Interrupt, returning true.");
+    LLDB_LOGF(log, "ThreadPlanCallFunction::PlanExplainsStop: The event is an "
+                   "Interrupt, returning true.");
     return true;
   }
   // We control breakpoints separately from other "stop reasons."  So first,
@@ -321,10 +293,10 @@
       bool is_internal = true;
       for (uint32_t i = 0; i < num_owners; i++) {
         Breakpoint &bp = bp_site_sp->GetOwnerAtIndex(i)->GetBreakpoint();
-        if (log)
-          log->Printf("ThreadPlanCallFunction::PlanExplainsStop: hit "
-                      "breakpoint %d while calling function",
-                      bp.GetID());
+        LLDB_LOGF(log,
+                  "ThreadPlanCallFunction::PlanExplainsStop: hit "
+                  "breakpoint %d while calling function",
+                  bp.GetID());
 
         if (!bp.IsInternal()) {
           is_internal = false;
@@ -332,25 +304,23 @@
         }
       }
       if (is_internal) {
-        if (log)
-          log->Printf("ThreadPlanCallFunction::PlanExplainsStop hit an "
-                      "internal breakpoint, not stopping.");
+        LLDB_LOGF(log, "ThreadPlanCallFunction::PlanExplainsStop hit an "
+                       "internal breakpoint, not stopping.");
         return false;
       }
     }
 
     if (m_ignore_breakpoints) {
-      if (log)
-        log->Printf("ThreadPlanCallFunction::PlanExplainsStop: we are ignoring "
-                    "breakpoints, overriding breakpoint stop info ShouldStop, "
-                    "returning true");
+      LLDB_LOGF(log,
+                "ThreadPlanCallFunction::PlanExplainsStop: we are ignoring "
+                "breakpoints, overriding breakpoint stop info ShouldStop, "
+                "returning true");
       m_real_stop_info_sp->OverrideShouldStop(false);
       return true;
     } else {
-      if (log)
-        log->Printf("ThreadPlanCallFunction::PlanExplainsStop: we are not "
-                    "ignoring breakpoints, overriding breakpoint stop info "
-                    "ShouldStop, returning true");
+      LLDB_LOGF(log, "ThreadPlanCallFunction::PlanExplainsStop: we are not "
+                     "ignoring breakpoints, overriding breakpoint stop info "
+                     "ShouldStop, returning true");
       m_real_stop_info_sp->OverrideShouldStop(true);
       return false;
     }
@@ -418,9 +388,8 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
 
   if (IsPlanComplete()) {
-    if (log)
-      log->Printf("ThreadPlanCallFunction(%p): Completed call function plan.",
-                  static_cast<void *>(this));
+    LLDB_LOGF(log, "ThreadPlanCallFunction(%p): Completed call function plan.",
+              static_cast<void *>(this));
 
     ThreadPlan::MischiefManaged();
     return true;
@@ -469,9 +438,8 @@
          m_objc_language_runtime->ExceptionBreakpointsExplainStop(
              stop_info_sp))) {
       Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_STEP));
-      if (log)
-        log->Printf("ThreadPlanCallFunction::BreakpointsExplainStop - Hit an "
-                    "exception breakpoint, setting plan complete.");
+      LLDB_LOGF(log, "ThreadPlanCallFunction::BreakpointsExplainStop - Hit an "
+                     "exception breakpoint, setting plan complete.");
 
       SetPlanComplete(false);
 
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanCallUserExpression.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanCallUserExpression.cpp
index 864808a..436938c 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanCallUserExpression.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanCallUserExpression.cpp
@@ -69,9 +69,8 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
 
   if (IsPlanComplete()) {
-    if (log)
-      log->Printf("ThreadPlanCallFunction(%p): Completed call function plan.",
-                  static_cast<void *>(this));
+    LLDB_LOGF(log, "ThreadPlanCallFunction(%p): Completed call function plan.",
+              static_cast<void *>(this));
 
     if (m_manage_materialization && PlanSucceeded() && m_user_expression_sp) {
       lldb::addr_t function_stack_top;
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanPython.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanPython.cpp
index 8b30c4e..df432a0 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanPython.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanPython.cpp
@@ -25,10 +25,11 @@
 
 // ThreadPlanPython
 
-ThreadPlanPython::ThreadPlanPython(Thread &thread, const char *class_name)
+ThreadPlanPython::ThreadPlanPython(Thread &thread, const char *class_name, 
+                                   StructuredDataImpl *args_data)
     : ThreadPlan(ThreadPlan::eKindPython, "Python based Thread Plan", thread,
                  eVoteNoOpinion, eVoteNoOpinion),
-      m_class_name(class_name), m_did_push(false) {
+      m_class_name(class_name), m_args_data(args_data), m_did_push(false) {
   SetIsMasterPlan(true);
   SetOkayToDiscard(true);
   SetPrivate(false);
@@ -45,7 +46,9 @@
 
   if (!m_implementation_sp) {
     if (error)
-      error->Printf("Python thread plan does not have an implementation");
+      error->Printf("Error constructing Python ThreadPlan: %s",
+          m_error_str.empty() ? "<unknown error>"
+                                : m_error_str.c_str());
     return false;
   }
 
@@ -63,16 +66,16 @@
                                            .GetScriptInterpreter();
     if (script_interp) {
       m_implementation_sp = script_interp->CreateScriptedThreadPlan(
-          m_class_name.c_str(), this->shared_from_this());
+          m_class_name.c_str(), m_args_data, m_error_str, 
+          this->shared_from_this());
     }
   }
 }
 
 bool ThreadPlanPython::ShouldStop(Event *event_ptr) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
-                m_class_name.c_str());
+  LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
+            m_class_name.c_str());
 
   bool should_stop = true;
   if (m_implementation_sp) {
@@ -93,9 +96,8 @@
 
 bool ThreadPlanPython::IsPlanStale() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
-                m_class_name.c_str());
+  LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
+            m_class_name.c_str());
 
   bool is_stale = true;
   if (m_implementation_sp) {
@@ -116,9 +118,8 @@
 
 bool ThreadPlanPython::DoPlanExplainsStop(Event *event_ptr) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
-                m_class_name.c_str());
+  LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
+            m_class_name.c_str());
 
   bool explains_stop = true;
   if (m_implementation_sp) {
@@ -139,9 +140,8 @@
 
 bool ThreadPlanPython::MischiefManaged() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
-                m_class_name.c_str());
+  LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
+            m_class_name.c_str());
   bool mischief_managed = true;
   if (m_implementation_sp) {
     // I don't really need mischief_managed, since it's simpler to just call
@@ -155,9 +155,8 @@
 
 lldb::StateType ThreadPlanPython::GetPlanRunState() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
-                m_class_name.c_str());
+  LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
+            m_class_name.c_str());
   lldb::StateType run_state = eStateRunning;
   if (m_implementation_sp) {
     ScriptInterpreter *script_interp = m_thread.GetProcess()
@@ -188,8 +187,7 @@
 
 bool ThreadPlanPython::WillStop() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD));
-  if (log)
-    log->Printf("%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
-                m_class_name.c_str());
+  LLDB_LOGF(log, "%s called on Python Thread Plan: %s )", LLVM_PRETTY_FUNCTION,
+            m_class_name.c_str());
   return true;
 }
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanRunToAddress.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanRunToAddress.cpp
index a973bd1..32ea2e6 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanRunToAddress.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanRunToAddress.cpp
@@ -97,7 +97,7 @@
       s->Printf("run to addresses: ");
 
     for (size_t i = 0; i < num_addresses; i++) {
-      s->Address(m_addresses[i], sizeof(addr_t));
+      DumpAddress(s->AsRawOstream(), m_addresses[i], sizeof(addr_t));
       s->Printf(" ");
     }
   } else {
@@ -116,7 +116,7 @@
         s->Indent();
       }
 
-      s->Address(m_addresses[i], sizeof(addr_t));
+      DumpAddress(s->AsRawOstream(), m_addresses[i], sizeof(addr_t));
       s->Printf(" using breakpoint: %d - ", m_break_ids[i]);
       Breakpoint *breakpoint =
           m_thread.CalculateTarget()->GetBreakpointByID(m_break_ids[i]).get();
@@ -143,7 +143,7 @@
       all_bps_good = false;
       if (error) {
         error->Printf("Could not set breakpoint for address: ");
-        error->Address(m_addresses[i], sizeof(addr_t));
+        DumpAddress(error->AsRawOstream(), m_addresses[i], sizeof(addr_t));
         error->Printf("\n");
       }
     }
@@ -182,8 +182,7 @@
         m_break_ids[i] = LLDB_INVALID_BREAK_ID;
       }
     }
-    if (log)
-      log->Printf("Completed run to address plan.");
+    LLDB_LOGF(log, "Completed run to address plan.");
     ThreadPlan::MischiefManaged();
     return true;
   } else
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanShouldStopHere.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanShouldStopHere.cpp
index a0b7072..9599d81 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanShouldStopHere.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanShouldStopHere.cpp
@@ -46,8 +46,8 @@
       lldb::addr_t current_addr =
           m_owner->GetThread().GetRegisterContext()->GetPC(0);
 
-      log->Printf("ShouldStopHere callback returned %u from 0x%" PRIx64 ".",
-                  should_stop_here, current_addr);
+      LLDB_LOGF(log, "ShouldStopHere callback returned %u from 0x%" PRIx64 ".",
+                should_stop_here, current_addr);
     }
   }
 
@@ -69,8 +69,7 @@
       (operation == eFrameCompareSameParent &&
        flags.Test(eStepInAvoidNoDebug))) {
     if (!frame->HasDebugInformation()) {
-      if (log)
-        log->Printf("Stepping out of frame with no debug info");
+      LLDB_LOGF(log, "Stepping out of frame with no debug info");
 
       should_stop_here = false;
     }
@@ -118,16 +117,14 @@
       symbol_end.Slide(sc.symbol->GetByteSize() - 1);
       if (range.ContainsFileAddress(sc.symbol->GetAddress()) &&
           range.ContainsFileAddress(symbol_end)) {
-        if (log)
-          log->Printf("Stopped in a function with only line 0 lines, just "
-                      "stepping out.");
+        LLDB_LOGF(log, "Stopped in a function with only line 0 lines, just "
+                       "stepping out.");
         just_step_out = true;
       }
     }
     if (!just_step_out) {
-      if (log)
-        log->Printf("ThreadPlanShouldStopHere::DefaultStepFromHereCallback "
-                    "Queueing StepInRange plan to step through line 0 code.");
+      LLDB_LOGF(log, "ThreadPlanShouldStopHere::DefaultStepFromHereCallback "
+                     "Queueing StepInRange plan to step through line 0 code.");
 
       return_plan_sp = current_plan->GetThread().QueueThreadPlanForStepInRange(
           false, range, sc, nullptr, eOnlyDuringStepping, status,
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanStepInRange.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanStepInRange.cpp
index 2065fa5..ab1f6a2 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanStepInRange.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanStepInRange.cpp
@@ -145,10 +145,10 @@
 
   if (log) {
     StreamString s;
-    s.Address(
-        m_thread.GetRegisterContext()->GetPC(),
+    DumpAddress(
+        s.AsRawOstream(), m_thread.GetRegisterContext()->GetPC(),
         m_thread.CalculateTarget()->GetArchitecture().GetAddressByteSize());
-    log->Printf("ThreadPlanStepInRange reached %s.", s.GetData());
+    LLDB_LOGF(log, "ThreadPlanStepInRange reached %s.", s.GetData());
   }
 
   if (IsPlanComplete())
@@ -197,13 +197,14 @@
             CheckShouldStopHereAndQueueStepOut(frame_order, m_status);
         if (log) {
           if (m_sub_plan_sp)
-            log->Printf("ShouldStopHere found plan to step out of this frame.");
+            LLDB_LOGF(log,
+                      "ShouldStopHere found plan to step out of this frame.");
           else
-            log->Printf("ShouldStopHere no plan to step out of this frame.");
+            LLDB_LOGF(log, "ShouldStopHere no plan to step out of this frame.");
         }
       } else if (log) {
-        log->Printf(
-            "Thought I stepped out, but in fact arrived at a trampoline.");
+        LLDB_LOGF(
+            log, "Thought I stepped out, but in fact arrived at a trampoline.");
       }
     } else if (frame_order == eFrameCompareEqual && InSymbol()) {
       // If we are not in a place we should step through, we're done. One
@@ -237,9 +238,10 @@
 
     if (log) {
       if (m_sub_plan_sp)
-        log->Printf("Found a step through plan: %s", m_sub_plan_sp->GetName());
+        LLDB_LOGF(log, "Found a step through plan: %s",
+                  m_sub_plan_sp->GetName());
       else
-        log->Printf("No step through plan found.");
+        LLDB_LOGF(log, "No step through plan found.");
     }
 
     // If not, give the "should_stop" callback a chance to push a plan to get
@@ -289,8 +291,7 @@
         if (bytes_to_skip != 0) {
           func_start_address.Slide(bytes_to_skip);
           log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP);
-          if (log)
-            log->Printf("Pushing past prologue ");
+          LLDB_LOGF(log, "Pushing past prologue ");
 
           m_sub_plan_sp = m_thread.QueueThreadPlanForRunToAddress(
               false, func_start_address, true, m_status);
@@ -312,10 +313,10 @@
 
 void ThreadPlanStepInRange::SetAvoidRegexp(const char *name) {
   auto name_ref = llvm::StringRef::withNullAsEmpty(name);
-  if (!m_avoid_regexp_up)
+  if (m_avoid_regexp_up)
+    *m_avoid_regexp_up = RegularExpression(name_ref);
+  else
     m_avoid_regexp_up.reset(new RegularExpression(name_ref));
-
-  m_avoid_regexp_up->Compile(name_ref);
 }
 
 void ThreadPlanStepInRange::SetDefaultFlagValue(uint32_t new_value) {
@@ -338,7 +339,7 @@
     if (frame_library) {
       for (size_t i = 0; i < num_libraries; i++) {
         const FileSpec &file_spec(libraries_to_avoid.GetFileSpecAtIndex(i));
-        if (FileSpec::Equal(file_spec, frame_library, false)) {
+        if (FileSpec::Match(file_spec, frame_library)) {
           libraries_say_avoid = true;
           break;
         }
@@ -360,25 +361,17 @@
           sc.GetFunctionName(Mangled::ePreferDemangledWithoutArguments)
               .GetCString();
       if (frame_function_name) {
-        size_t num_matches = 0;
-        Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-        if (log)
-          num_matches = 1;
-
-        RegularExpression::Match regex_match(num_matches);
-
+        llvm::SmallVector<llvm::StringRef, 2> matches;
         bool return_value =
-            avoid_regexp_to_use->Execute(frame_function_name, &regex_match);
-        if (return_value) {
-          if (log) {
-            std::string match;
-            regex_match.GetMatchAtIndex(frame_function_name, 0, match);
-            log->Printf("Stepping out of function \"%s\" because it matches "
-                        "the avoid regexp \"%s\" - match substring: \"%s\".",
-                        frame_function_name,
-                        avoid_regexp_to_use->GetText().str().c_str(),
-                        match.c_str());
-          }
+            avoid_regexp_to_use->Execute(frame_function_name, &matches);
+        if (return_value && matches.size() > 1) {
+          std::string match = matches[1].str();
+          LLDB_LOGF(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP),
+                    "Stepping out of function \"%s\" because it matches "
+                    "the avoid regexp \"%s\" - match substring: \"%s\".",
+                    frame_function_name,
+                    avoid_regexp_to_use->GetText().str().c_str(),
+                    match.c_str());
         }
         return return_value;
       }
@@ -399,7 +392,7 @@
   should_stop_here = ThreadPlanShouldStopHere::DefaultShouldStopHereCallback(
       current_plan, flags, operation, status, baton);
   if (!should_stop_here)
-    return should_stop_here;
+    return false;
 
   if (should_stop_here && current_plan->GetKind() == eKindStepInRange &&
       operation == eFrameCompareYounger) {
@@ -424,10 +417,11 @@
             should_stop_here = false;
         }
         if (log && !should_stop_here)
-          log->Printf("Stepping out of frame %s which did not match step into "
-                      "target %s.",
-                      sc.GetFunctionName().AsCString(),
-                      step_in_range_plan->m_step_into_target.AsCString());
+          LLDB_LOGF(log,
+                    "Stepping out of frame %s which did not match step into "
+                    "target %s.",
+                    sc.GetFunctionName().AsCString(),
+                    step_in_range_plan->m_step_into_target.AsCString());
       }
     }
 
@@ -496,10 +490,10 @@
     bool step_without_resume = m_thread.DecrementCurrentInlinedDepth();
     if (step_without_resume) {
       Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-      if (log)
-        log->Printf("ThreadPlanStepInRange::DoWillResume: returning false, "
-                    "inline_depth: %d",
-                    m_thread.GetCurrentInlinedDepth());
+      LLDB_LOGF(log,
+                "ThreadPlanStepInRange::DoWillResume: returning false, "
+                "inline_depth: %d",
+                m_thread.GetCurrentInlinedDepth());
       SetStopInfo(StopInfo::CreateStopReasonToTrace(m_thread));
 
       // FIXME: Maybe it would be better to create a InlineStep stop reason, but
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanStepInstruction.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanStepInstruction.cpp
index a11b623..afcc9d6 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanStepInstruction.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanStepInstruction.cpp
@@ -65,7 +65,7 @@
     PrintFailureIfAny();
   } else {
     s->Printf("Stepping one instruction past ");
-    s->Address(m_instruction_addr, sizeof(addr_t));
+    DumpAddress(s->AsRawOstream(), m_instruction_addr, sizeof(addr_t));
     if (!m_start_has_symbol)
       s->Printf(" which has no symbol");
 
@@ -114,8 +114,9 @@
     return !m_step_over;
   } else {
     if (log) {
-      log->Printf("ThreadPlanStepInstruction::IsPlanStale - Current frame is "
-                  "older than start frame, plan is stale.");
+      LLDB_LOGF(log,
+                "ThreadPlanStepInstruction::IsPlanStale - Current frame is "
+                "older than start frame, plan is stale.");
     }
     return true;
   }
@@ -127,9 +128,9 @@
 
     StackFrameSP cur_frame_sp = m_thread.GetStackFrameAtIndex(0);
     if (!cur_frame_sp) {
-      if (log)
-        log->Printf(
-            "ThreadPlanStepInstruction couldn't get the 0th frame, stopping.");
+      LLDB_LOGF(
+          log,
+          "ThreadPlanStepInstruction couldn't get the 0th frame, stopping.");
       SetPlanComplete();
       return true;
     }
@@ -168,8 +169,9 @@
                     cur_frame_sp->GetConcreteFrameIndex()) {
               SetPlanComplete();
               if (log) {
-                log->Printf("Frame we stepped into is inlined into the frame "
-                            "we were stepping from, stopping.");
+                LLDB_LOGF(log,
+                          "Frame we stepped into is inlined into the frame "
+                          "we were stepping from, stopping.");
               }
               return true;
             }
@@ -180,15 +182,17 @@
             s.PutCString("Stepped in to: ");
             addr_t stop_addr =
                 m_thread.GetStackFrameAtIndex(0)->GetRegisterContext()->GetPC();
-            s.Address(stop_addr, m_thread.CalculateTarget()
-                                     ->GetArchitecture()
-                                     .GetAddressByteSize());
+            DumpAddress(s.AsRawOstream(), stop_addr,
+                        m_thread.CalculateTarget()
+                            ->GetArchitecture()
+                            .GetAddressByteSize());
             s.PutCString(" stepping out to: ");
             addr_t return_addr = return_frame->GetRegisterContext()->GetPC();
-            s.Address(return_addr, m_thread.CalculateTarget()
-                                       ->GetArchitecture()
-                                       .GetAddressByteSize());
-            log->Printf("%s.", s.GetData());
+            DumpAddress(s.AsRawOstream(), return_addr,
+                        m_thread.CalculateTarget()
+                            ->GetArchitecture()
+                            .GetAddressByteSize());
+            LLDB_LOGF(log, "%s.", s.GetData());
           }
 
           // StepInstruction should probably have the tri-state RunMode, but
@@ -209,8 +213,7 @@
           return true;
         }
       } else {
-        if (log)
-          log->Printf("Could not find previous frame, stopping.");
+        LLDB_LOGF(log, "Could not find previous frame, stopping.");
         SetPlanComplete();
         return true;
       }
@@ -243,8 +246,7 @@
 bool ThreadPlanStepInstruction::MischiefManaged() {
   if (IsPlanComplete()) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-    if (log)
-      log->Printf("Completed single instruction step plan.");
+    LLDB_LOGF(log, "Completed single instruction step plan.");
     ThreadPlan::MischiefManaged();
     return true;
   } else {
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanStepOut.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanStepOut.cpp
index bf55c37..f15a343 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanStepOut.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanStepOut.cpp
@@ -126,6 +126,25 @@
     if (m_return_addr == LLDB_INVALID_ADDRESS)
       return;
 
+    // Perform some additional validation on the return address.
+    uint32_t permissions = 0;
+    if (!m_thread.GetProcess()->GetLoadAddressPermissions(m_return_addr,
+                                                          permissions)) {
+      m_constructor_errors.Printf("Return address (0x%" PRIx64
+                                  ") permissions not found.",
+                                  m_return_addr);
+      LLDB_LOGF(log, "ThreadPlanStepOut(%p): %s", static_cast<void *>(this),
+                m_constructor_errors.GetData());
+      return;
+    } else if (!(permissions & ePermissionsExecutable)) {
+      m_constructor_errors.Printf("Return address (0x%" PRIx64
+                                  ") did not point to executable memory.",
+                                  m_return_addr);
+      LLDB_LOGF(log, "ThreadPlanStepOut(%p): %s", static_cast<void *>(this),
+                m_constructor_errors.GetData());
+      return;
+    }
+
     Breakpoint *return_bp = m_thread.CalculateTarget()
                                 ->CreateBreakpoint(m_return_addr, true, false)
                                 .get();
@@ -238,8 +257,13 @@
   }
 
   if (m_return_bp_id == LLDB_INVALID_BREAK_ID) {
-    if (error)
+    if (error) {
       error->PutCString("Could not create return address breakpoint.");
+      if (m_constructor_errors.GetSize() > 0) {
+        error->PutCString(" ");
+        error->PutCString(m_constructor_errors.GetString());
+      }
+    }
     return false;
   }
 
@@ -408,7 +432,7 @@
 
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
     if (log)
-      log->Printf("Completed step out plan.");
+      LLDB_LOGF(log, "Completed step out plan.");
     if (m_return_bp_id != LLDB_INVALID_BREAK_ID) {
       m_thread.CalculateTarget()->RemoveBreakpointByID(m_return_bp_id);
       m_return_bp_id = LLDB_INVALID_BREAK_ID;
@@ -433,7 +457,7 @@
   if (log) {
     StreamString s;
     immediate_return_from_sp->Dump(&s, true, false);
-    log->Printf("Queuing inlined frame to step past: %s.", s.GetData());
+    LLDB_LOGF(log, "Queuing inlined frame to step past: %s.", s.GetData());
   }
 
   Block *from_block = immediate_return_from_sp->GetFrameBlock();
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
index 4770b57..725669b 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanStepOverBreakpoint.cpp
@@ -62,11 +62,9 @@
     StopReason reason = stop_info_sp->GetStopReason();
 
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
+    LLDB_LOGF(log, "Step over breakpoint stopped for reason: %s.",
+              Thread::StopReasonAsCString(reason));
 
-    if (log)
-      log->Printf("Step over breakpoint stopped for reason: %s.", 
-          Thread::StopReasonAsCString(reason));
-  
     switch (reason) {
       case eStopReasonTrace:
       case eStopReasonNone:
@@ -91,9 +89,10 @@
         lldb::addr_t pc_addr = m_thread.GetRegisterContext()->GetPC();
 
         if (pc_addr == m_breakpoint_addr) {
-          if (log)
-            log->Printf("Got breakpoint stop reason but pc: 0x%" PRIx64
-                        "hasn't changed.", pc_addr);
+          LLDB_LOGF(log,
+                    "Got breakpoint stop reason but pc: 0x%" PRIx64
+                    "hasn't changed.",
+                    pc_addr);
           return true;
         }
 
@@ -149,8 +148,7 @@
     return false;
   } else {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-    if (log)
-      log->Printf("Completed step over breakpoint plan.");
+    LLDB_LOGF(log, "Completed step over breakpoint plan.");
     // Otherwise, re-enable the breakpoint we were stepping over, and we're
     // done.
     ReenableBreakpointSite();
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanStepOverRange.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanStepOverRange.cpp
index 3aaeac9..3dc1967 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanStepOverRange.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanStepOverRange.cpp
@@ -128,10 +128,10 @@
 
   if (log) {
     StreamString s;
-    s.Address(
-        m_thread.GetRegisterContext()->GetPC(),
+    DumpAddress(
+        s.AsRawOstream(), m_thread.GetRegisterContext()->GetPC(),
         m_thread.CalculateTarget()->GetArchitecture().GetAddressByteSize());
-    log->Printf("ThreadPlanStepOverRange reached %s.", s.GetData());
+    LLDB_LOGF(log, "ThreadPlanStepOverRange reached %s.", s.GetData());
   }
 
   // If we're out of the range but in the same frame or in our caller's frame
@@ -155,8 +155,8 @@
                                                          stop_others, m_status);
 
     if (new_plan_sp && log)
-      log->Printf(
-          "Thought I stepped out, but in fact arrived at a trampoline.");
+      LLDB_LOGF(log,
+                "Thought I stepped out, but in fact arrived at a trampoline.");
   } else if (frame_order == eFrameCompareYounger) {
     // Make sure we really are in a new frame.  Do that by unwinding and seeing
     // if the start function really is our start function...
@@ -371,10 +371,10 @@
       bool in_inlined_stack = m_thread.DecrementCurrentInlinedDepth();
       if (in_inlined_stack) {
         Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-        if (log)
-          log->Printf("ThreadPlanStepInRange::DoWillResume: adjusting range to "
-                      "the frame at inlined depth %d.",
-                      m_thread.GetCurrentInlinedDepth());
+        LLDB_LOGF(log,
+                  "ThreadPlanStepInRange::DoWillResume: adjusting range to "
+                  "the frame at inlined depth %d.",
+                  m_thread.GetCurrentInlinedDepth());
         StackFrameSP stack_sp = m_thread.GetStackFrameAtIndex(0);
         if (stack_sp) {
           Block *frame_block = stack_sp->GetFrameBlock();
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanStepRange.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanStepRange.cpp
index 49c72db..d1c5616 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanStepRange.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanStepRange.cpp
@@ -68,9 +68,8 @@
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
 
   const Vote vote = IsPlanComplete() ? eVoteYes : eVoteNo;
-  if (log)
-    log->Printf("ThreadPlanStepRange::ShouldReportStop() returning vote %i\n",
-                vote);
+  LLDB_LOGF(log, "ThreadPlanStepRange::ShouldReportStop() returning vote %i\n",
+            vote);
   return vote;
 }
 
@@ -137,7 +136,8 @@
                                            true, Address::DumpStyleLoadAddress,
                                            Address::DumpStyleLoadAddress, true);
 
-            log->Printf(
+            LLDB_LOGF(
+                log,
                 "Step range plan stepped to another range of same line: %s",
                 s.GetData());
           }
@@ -155,9 +155,10 @@
                                            true, Address::DumpStyleLoadAddress,
                                            Address::DumpStyleLoadAddress, true);
 
-            log->Printf("Step range plan stepped to a range at linenumber 0 "
-                        "stepping through that range: %s",
-                        s.GetData());
+            LLDB_LOGF(log,
+                      "Step range plan stepped to a range at linenumber 0 "
+                      "stepping through that range: %s",
+                      s.GetData());
           }
         } else if (new_context.line_entry.range.GetBaseAddress().GetLoadAddress(
                        m_thread.CalculateTarget().get()) != pc_load_addr) {
@@ -177,9 +178,10 @@
                                            true, Address::DumpStyleLoadAddress,
                                            Address::DumpStyleLoadAddress, true);
 
-            log->Printf("Step range plan stepped to the middle of new "
-                        "line(%d): %s, continuing to clear this line.",
-                        new_context.line_entry.line, s.GetData());
+            LLDB_LOGF(log,
+                      "Step range plan stepped to the middle of new "
+                      "line(%d): %s, continuing to clear this line.",
+                      new_context.line_entry.line, s.GetData());
           }
         }
       }
@@ -187,7 +189,7 @@
   }
 
   if (!ret_value && log)
-    log->Printf("Step range plan out of range to 0x%" PRIx64, pc_load_addr);
+    LLDB_LOGF(log, "Step range plan out of range to 0x%" PRIx64, pc_load_addr);
 
   return ret_value;
 }
@@ -236,8 +238,19 @@
 }
 
 bool ThreadPlanStepRange::StopOthers() {
-  return (m_stop_others == lldb::eOnlyThisThread ||
-          m_stop_others == lldb::eOnlyDuringStepping);
+  switch (m_stop_others) {
+  case lldb::eOnlyThisThread:
+    return true;
+  case lldb::eOnlyDuringStepping:
+    // If there is a call in the range of the next branch breakpoint,
+    // then we should always run all threads, since a call can execute
+    // arbitrary code which might for instance take a lock that's held
+    // by another thread.
+    return !m_found_calls;
+  case lldb::eAllThreads:
+    return false;
+  }
+  llvm_unreachable("Unhandled run mode!");
 }
 
 InstructionList *ThreadPlanStepRange::GetInstructionsForAddress(
@@ -285,12 +298,12 @@
 void ThreadPlanStepRange::ClearNextBranchBreakpoint() {
   if (m_next_branch_bp_sp) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-    if (log)
-      log->Printf("Removing next branch breakpoint: %d.",
-                  m_next_branch_bp_sp->GetID());
+    LLDB_LOGF(log, "Removing next branch breakpoint: %d.",
+              m_next_branch_bp_sp->GetID());
     GetTarget().RemoveBreakpointByID(m_next_branch_bp_sp->GetID());
     m_next_branch_bp_sp.reset();
     m_could_not_resolve_hw_bp = false;
+    m_found_calls = false;
   }
 }
 
@@ -304,6 +317,9 @@
   if (!m_use_fast_step)
     return false;
 
+  // clear the m_found_calls, we'll rediscover it for this range.
+  m_found_calls = false;
+  
   lldb::addr_t cur_addr = GetThread().GetRegisterContext()->GetPC();
   // Find the current address in our address ranges, and fetch the disassembly
   // if we haven't already:
@@ -318,7 +334,8 @@
     const bool ignore_calls = GetKind() == eKindStepOverRange;
     uint32_t branch_index =
         instructions->GetIndexOfNextBranchInstruction(pc_index, target,
-                                                      ignore_calls);
+                                                      ignore_calls, 
+                                                      &m_found_calls);
 
     Address run_to_address;
 
@@ -357,11 +374,12 @@
               bp_site_id = bp_site->GetID();
             }
           }
-          log->Printf("ThreadPlanStepRange::SetNextBranchBreakpoint - Setting "
-                      "breakpoint %d (site %d) to run to address 0x%" PRIx64,
-                      m_next_branch_bp_sp->GetID(), bp_site_id,
-                      run_to_address.GetLoadAddress(
-                          &m_thread.GetProcess()->GetTarget()));
+          LLDB_LOGF(log,
+                    "ThreadPlanStepRange::SetNextBranchBreakpoint - Setting "
+                    "breakpoint %d (site %d) to run to address 0x%" PRIx64,
+                    m_next_branch_bp_sp->GetID(), bp_site_id,
+                    run_to_address.GetLoadAddress(
+                        &m_thread.GetProcess()->GetTarget()));
         }
 
         m_next_branch_bp_sp->SetThreadID(m_thread.GetID());
@@ -402,11 +420,11 @@
         break;
       }
     }
-    if (log)
-      log->Printf("ThreadPlanStepRange::NextRangeBreakpointExplainsStop - Hit "
-                  "next range breakpoint which has %" PRIu64
-                  " owners - explains stop: %u.",
-                  (uint64_t)num_owners, explains_stop);
+    LLDB_LOGF(log,
+              "ThreadPlanStepRange::NextRangeBreakpointExplainsStop - Hit "
+              "next range breakpoint which has %" PRIu64
+              " owners - explains stop: %u.",
+              (uint64_t)num_owners, explains_stop);
     ClearNextBranchBreakpoint();
     return explains_stop;
   }
@@ -445,8 +463,7 @@
 
   if (done) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-    if (log)
-      log->Printf("Completed step through range plan.");
+    LLDB_LOGF(log, "Completed step through range plan.");
     ClearNextBranchBreakpoint();
     ThreadPlan::MischiefManaged();
     return true;
@@ -461,8 +478,8 @@
 
   if (frame_order == eFrameCompareOlder) {
     if (log) {
-      log->Printf("ThreadPlanStepRange::IsPlanStale returning true, we've "
-                  "stepped out.");
+      LLDB_LOGF(log, "ThreadPlanStepRange::IsPlanStale returning true, we've "
+                     "stepped out.");
     }
     return true;
   } else if (frame_order == eFrameCompareEqual && InSymbol()) {
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanStepThrough.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanStepThrough.cpp
index e46eba0..8c7b180 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanStepThrough.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanStepThrough.cpp
@@ -64,8 +64,8 @@
       }
       Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
       if (log) {
-        log->Printf("Setting backstop breakpoint %d at address: 0x%" PRIx64,
-                    m_backstop_bkpt_id, m_backstop_addr);
+        LLDB_LOGF(log, "Setting backstop breakpoint %d at address: 0x%" PRIx64,
+                  m_backstop_bkpt_id, m_backstop_addr);
       }
     }
   }
@@ -103,11 +103,12 @@
     if (m_sub_plan_sp) {
       StreamString s;
       m_sub_plan_sp->GetDescription(&s, lldb::eDescriptionLevelFull);
-      log->Printf("Found step through plan from 0x%" PRIx64 ": %s",
-                  current_address, s.GetData());
+      LLDB_LOGF(log, "Found step through plan from 0x%" PRIx64 ": %s",
+                current_address, s.GetData());
     } else {
-      log->Printf("Couldn't find step through plan from address 0x%" PRIx64 ".",
-                  current_address);
+      LLDB_LOGF(log,
+                "Couldn't find step through plan from address 0x%" PRIx64 ".",
+                current_address);
     }
   }
 }
@@ -118,11 +119,11 @@
     s->Printf("Step through");
   else {
     s->PutCString("Stepping through trampoline code from: ");
-    s->Address(m_start_address, sizeof(addr_t));
+    DumpAddress(s->AsRawOstream(), m_start_address, sizeof(addr_t));
     if (m_backstop_bkpt_id != LLDB_INVALID_BREAK_ID) {
       s->Printf(" with backstop breakpoint ID: %d at address: ",
                 m_backstop_bkpt_id);
-      s->Address(m_backstop_addr, sizeof(addr_t));
+      DumpAddress(s->AsRawOstream(), m_backstop_addr, sizeof(addr_t));
     } else
       s->PutCString(" unable to set a backstop breakpoint.");
   }
@@ -234,8 +235,7 @@
   if (!IsPlanComplete()) {
     return false;
   } else {
-    if (log)
-      log->Printf("Completed step through step plan.");
+    LLDB_LOGF(log, "Completed step through step plan.");
 
     ClearBackstopBreakpoint();
     ThreadPlan::MischiefManaged();
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanStepUntil.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanStepUntil.cpp
index d4109c3..54d2763 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanStepUntil.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanStepUntil.cpp
@@ -326,8 +326,7 @@
   bool done = false;
   if (IsPlanComplete()) {
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_STEP));
-    if (log)
-      log->Printf("Completed step until plan.");
+    LLDB_LOGF(log, "Completed step until plan.");
 
     Clear();
     done = true;
diff --git a/src/llvm-project/lldb/source/Target/ThreadPlanTracer.cpp b/src/llvm-project/lldb/source/Target/ThreadPlanTracer.cpp
index 4e79b6b..b50c163 100644
--- a/src/llvm-project/lldb/source/Target/ThreadPlanTracer.cpp
+++ b/src/llvm-project/lldb/source/Target/ThreadPlanTracer.cpp
@@ -46,7 +46,7 @@
   else {
     TargetSP target_sp(m_thread.CalculateTarget());
     if (target_sp)
-      return target_sp->GetDebugger().GetOutputFile().get();
+      return &(target_sp->GetDebugger().GetOutputStream());
   }
   return nullptr;
 }
@@ -93,15 +93,20 @@
 
 TypeFromUser ThreadPlanAssemblyTracer::GetIntPointerType() {
   if (!m_intptr_type.IsValid()) {
-    TargetSP target_sp(m_thread.CalculateTarget());
-    if (target_sp) {
-      TypeSystem *type_system =
-          target_sp->GetScratchTypeSystemForLanguage(nullptr, eLanguageTypeC);
-      if (type_system)
-        m_intptr_type =
-            TypeFromUser(type_system->GetBuiltinTypeForEncodingAndBitSize(
+    if (auto target_sp = m_thread.CalculateTarget()) {
+      auto type_system_or_err =
+          target_sp->GetScratchTypeSystemForLanguage(eLanguageTypeC);
+      if (auto err = type_system_or_err.takeError()) {
+        LLDB_LOG_ERROR(
+            lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TYPES),
+            std::move(err),
+            "Unable to get integer pointer type from TypeSystem");
+      } else {
+        m_intptr_type = TypeFromUser(
+            type_system_or_err->GetBuiltinTypeForEncodingAndBitSize(
                 eEncodingUint,
                 target_sp->GetArchitecture().GetAddressByteSize() * 8));
+      }
     }
   }
   return m_intptr_type;
@@ -110,10 +115,6 @@
 ThreadPlanAssemblyTracer::~ThreadPlanAssemblyTracer() = default;
 
 void ThreadPlanAssemblyTracer::TracingStarted() {
-  RegisterContext *reg_ctx = m_thread.GetRegisterContext().get();
-
-  if (m_register_values.empty())
-    m_register_values.resize(reg_ctx->GetRegisterCount());
 }
 
 void ThreadPlanAssemblyTracer::TracingEnded() { m_register_values.clear(); }
@@ -203,6 +204,11 @@
     }
   }
 
+  if (m_register_values.empty()) {
+    RegisterContext *reg_ctx = m_thread.GetRegisterContext().get();
+    m_register_values.resize(reg_ctx->GetRegisterCount());
+  }
+
   RegisterValue reg_value;
   for (uint32_t reg_num = 0, num_registers = reg_ctx->GetRegisterCount();
        reg_num < num_registers; ++reg_num) {
diff --git a/src/llvm-project/lldb/source/Utility/ArchSpec.cpp b/src/llvm-project/lldb/source/Utility/ArchSpec.cpp
index 81b87ff..3dae25c 100644
--- a/src/llvm-project/lldb/source/Utility/ArchSpec.cpp
+++ b/src/llvm-project/lldb/source/Utility/ArchSpec.cpp
@@ -9,17 +9,13 @@
 #include "lldb/Utility/ArchSpec.h"
 
 #include "lldb/Utility/Log.h"
-#include "lldb/Utility/NameMatches.h"
-#include "lldb/Utility/Stream.h"
 #include "lldb/Utility/StringList.h"
 #include "lldb/lldb-defines.h"
 #include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Twine.h"
 #include "llvm/BinaryFormat/COFF.h"
 #include "llvm/BinaryFormat/ELF.h"
 #include "llvm/BinaryFormat/MachO.h"
 #include "llvm/Support/Compiler.h"
-#include "llvm/Support/Host.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -61,6 +57,8 @@
      "armv6m"},
     {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7,
      "armv7"},
+    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7l,
+     "armv7l"},
     {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7f,
      "armv7f"},
     {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7s,
@@ -101,6 +99,10 @@
      ArchSpec::eCore_arm_arm64, "arm64"},
     {eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64,
      ArchSpec::eCore_arm_armv8, "armv8"},
+    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm,
+      ArchSpec::eCore_arm_armv8l, "armv8l"},
+    {eByteOrderLittle, 4, 4, 4, llvm::Triple::aarch64_32,
+      ArchSpec::eCore_arm_arm64_32, "arm64_32"},
     {eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64,
      ArchSpec::eCore_arm_aarch64, "aarch64"},
 
@@ -214,6 +216,7 @@
      ArchSpec::eCore_uknownMach32, "unknown-mach-32"},
     {eByteOrderLittle, 8, 4, 4, llvm::Triple::UnknownArch,
      ArchSpec::eCore_uknownMach64, "unknown-mach-64"},
+    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arc, ArchSpec::eCore_arc, "arc"}
 };
 
 // Ensure that we have an entry in the g_core_definitions for each core. If you
@@ -243,19 +246,9 @@
     list.AppendString(g_core_definitions[i].name);
 }
 
-size_t ArchSpec::AutoComplete(CompletionRequest &request) {
-  if (!request.GetCursorArgumentPrefix().empty()) {
-    for (uint32_t i = 0; i < llvm::array_lengthof(g_core_definitions); ++i) {
-      if (NameMatches(g_core_definitions[i].name, NameMatch::StartsWith,
-                      request.GetCursorArgumentPrefix()))
-        request.AddCompletion(g_core_definitions[i].name);
-    }
-  } else {
-    StringList matches;
-    ListSupportedArchNames(matches);
-    request.AddCompletions(matches);
-  }
-  return request.GetNumberOfMatches();
+void ArchSpec::AutoComplete(CompletionRequest &request) {
+  for (uint32_t i = 0; i < llvm::array_lengthof(g_core_definitions); ++i)
+    request.TryCompleteCurrentArg(g_core_definitions[i].name);
 }
 
 #define CPU_ANY (UINT32_MAX)
@@ -306,6 +299,10 @@
      SUBTYPE_MASK},
     {ArchSpec::eCore_arm_arm64, llvm::MachO::CPU_TYPE_ARM64, 13, UINT32_MAX,
      SUBTYPE_MASK},
+    {ArchSpec::eCore_arm_arm64_32, llvm::MachO::CPU_TYPE_ARM64_32, 0,
+     UINT32_MAX, SUBTYPE_MASK},
+    {ArchSpec::eCore_arm_arm64_32, llvm::MachO::CPU_TYPE_ARM64_32, 1,
+     UINT32_MAX, SUBTYPE_MASK},
     {ArchSpec::eCore_arm_arm64, llvm::MachO::CPU_TYPE_ARM64, CPU_ANY,
      UINT32_MAX, SUBTYPE_MASK},
     {ArchSpec::eCore_thumb, llvm::MachO::CPU_TYPE_ARM, 0, UINT32_MAX,
@@ -446,6 +443,8 @@
      ArchSpec::eMIPSSubType_mips64r6el, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips64r6el
     {ArchSpec::eCore_hexagon_generic, llvm::ELF::EM_HEXAGON,
      LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // HEXAGON
+    {ArchSpec::eCore_arc, llvm::ELF::EM_ARC_COMPACT2, LLDB_INVALID_CPUTYPE,
+     0xFFFFFFFFu, 0xFFFFFFFFu}, // ARC
 };
 
 static const ArchDefinition g_elf_arch_def = {
@@ -469,7 +468,9 @@
     {ArchSpec::eCore_thumb, llvm::COFF::IMAGE_FILE_MACHINE_THUMB,
      LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // ARMv7
     {ArchSpec::eCore_x86_64_x86_64, llvm::COFF::IMAGE_FILE_MACHINE_AMD64,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu} // AMD64
+     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // AMD64
+    {ArchSpec::eCore_arm_arm64, llvm::COFF::IMAGE_FILE_MACHINE_ARM64,
+     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu} // ARM64
 };
 
 static const ArchDefinition g_coff_arch_def = {
@@ -563,20 +564,6 @@
 
 ArchSpec::~ArchSpec() = default;
 
-//===----------------------------------------------------------------------===//
-// Assignment and initialization.
-
-const ArchSpec &ArchSpec::operator=(const ArchSpec &rhs) {
-  if (this != &rhs) {
-    m_triple = rhs.m_triple;
-    m_core = rhs.m_core;
-    m_byte_order = rhs.m_byte_order;
-    m_distribution_id = rhs.m_distribution_id;
-    m_flags = rhs.m_flags;
-  }
-  return *this;
-}
-
 void ArchSpec::Clear() {
   m_triple = llvm::Triple();
   m_core = kCore_invalid;
@@ -760,6 +747,7 @@
     return true;
 
   case llvm::Triple::aarch64:
+  case llvm::Triple::aarch64_32:
   case llvm::Triple::aarch64_be:
   case llvm::Triple::arm:
   case llvm::Triple::armeb:
@@ -876,7 +864,7 @@
       IsCompatibleMatch(other) && GetCore() == ArchSpec::eCore_arm_generic &&
       other.GetCore() != ArchSpec::eCore_arm_generic) {
     m_core = other.GetCore();
-    CoreUpdated(true);
+    CoreUpdated(false);
   }
   if (GetFlags() == 0) {
     SetFlags(other.GetFlags());
@@ -946,8 +934,10 @@
       }
     } else {
       Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET | LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_PLATFORM));
-      if (log)
-        log->Printf("Unable to find a core definition for cpu 0x%" PRIx32 " sub %" PRId32, cpu, sub);
+      LLDB_LOGF(log,
+                "Unable to find a core definition for cpu 0x%" PRIx32
+                " sub %" PRId32,
+                cpu, sub);
     }
   }
   CoreUpdated(update_triple);
@@ -1198,6 +1188,8 @@
   case ArchSpec::eCore_arm_armv7f:
   case ArchSpec::eCore_arm_armv7k:
   case ArchSpec::eCore_arm_armv7s:
+  case ArchSpec::eCore_arm_armv7l:
+  case ArchSpec::eCore_arm_armv8l:
     if (!enforce_exact_match) {
       if (core2 == ArchSpec::eCore_arm_generic)
         return true;
@@ -1245,6 +1237,14 @@
     }
     break;
 
+  case ArchSpec::eCore_arm_arm64_32:
+    if (!enforce_exact_match) {
+      if (core2 == ArchSpec::eCore_arm_generic)
+        return true;
+      try_inverse = false;
+    }
+    break;
+
   case ArchSpec::eCore_mips32:
     if (!enforce_exact_match) {
       if (core2 >= ArchSpec::kCore_mips32_first &&
@@ -1439,21 +1439,24 @@
         GetCore() == ArchSpec::Core::eCore_thumbv6m) {
       return true;
     }
+    // Windows on ARM is always thumb.
+    if (GetTriple().isOSWindows())
+      return true;
   }
   return false;
 }
 
-void ArchSpec::DumpTriple(Stream &s) const {
+void ArchSpec::DumpTriple(llvm::raw_ostream &s) const {
   const llvm::Triple &triple = GetTriple();
   llvm::StringRef arch_str = triple.getArchName();
   llvm::StringRef vendor_str = triple.getVendorName();
   llvm::StringRef os_str = triple.getOSName();
   llvm::StringRef environ_str = triple.getEnvironmentName();
 
-  s.Printf("%s-%s-%s", arch_str.empty() ? "*" : arch_str.str().c_str(),
-           vendor_str.empty() ? "*" : vendor_str.str().c_str(),
-           os_str.empty() ? "*" : os_str.str().c_str());
+  s << llvm::formatv("{0}-{1}-{2}", arch_str.empty() ? "*" : arch_str,
+                     vendor_str.empty() ? "*" : vendor_str,
+                     os_str.empty() ? "*" : os_str);
 
   if (!environ_str.empty())
-    s.Printf("-%s", environ_str.str().c_str());
+    s << "-" << environ_str;
 }
diff --git a/src/llvm-project/lldb/source/Utility/Args.cpp b/src/llvm-project/lldb/source/Utility/Args.cpp
index 77b0d43..9fcc833 100644
--- a/src/llvm-project/lldb/source/Utility/Args.cpp
+++ b/src/llvm-project/lldb/source/Utility/Args.cpp
@@ -163,7 +163,6 @@
 
   ::memcpy(data(), str.data() ? str.data() : "", size);
   ptr[size] = 0;
-  ref = llvm::StringRef(c_str(), size);
 }
 
 // Args constructor
@@ -172,8 +171,8 @@
 Args::Args(const Args &rhs) { *this = rhs; }
 
 Args::Args(const StringList &list) : Args() {
-  for (size_t i = 0; i < list.GetSize(); ++i)
-    AppendArgument(list[i]);
+  for (const std::string &arg : list)
+    AppendArgument(arg);
 }
 
 Args &Args::operator=(const Args &rhs) {
@@ -182,7 +181,7 @@
   m_argv.clear();
   m_entries.clear();
   for (auto &entry : rhs.m_entries) {
-    m_entries.emplace_back(entry.ref, entry.quote);
+    m_entries.emplace_back(entry.ref(), entry.quote);
     m_argv.push_back(m_entries.back().data());
   }
   m_argv.push_back(nullptr);
@@ -199,7 +198,7 @@
   int i = 0;
   for (auto &entry : m_entries) {
     s.Indent();
-    s.Format("{0}[{1}]=\"{2}\"\n", label_name, i++, entry.ref);
+    s.Format("{0}[{1}]=\"{2}\"\n", label_name, i++, entry.ref());
   }
   s.Format("{0}[{1}]=NULL\n", label_name, i);
   s.EOL();
@@ -211,7 +210,7 @@
   for (size_t i = 0; i < m_entries.size(); ++i) {
     if (i > 0)
       command += ' ';
-    command += m_entries[i].ref;
+    command += m_entries[i].ref();
   }
 
   return !m_entries.empty();
@@ -226,10 +225,10 @@
 
     if (m_entries[i].quote) {
       command += m_entries[i].quote;
-      command += m_entries[i].ref;
+      command += m_entries[i].ref();
       command += m_entries[i].quote;
     } else {
-      command += m_entries[i].ref;
+      command += m_entries[i].ref();
     }
   }
 
@@ -260,12 +259,6 @@
   return nullptr;
 }
 
-char Args::GetArgumentQuoteCharAtIndex(size_t idx) const {
-  if (idx < m_entries.size())
-    return m_entries[idx].quote;
-  return '\0';
-}
-
 char **Args::GetArgumentVector() {
   assert(!m_argv.empty());
   // TODO: functions like execve and posix_spawnp exhibit undefined behavior
@@ -299,7 +292,7 @@
   assert(m_argv.back() == nullptr);
   m_argv.pop_back();
   for (auto &entry : rhs.m_entries) {
-    m_entries.emplace_back(entry.ref, entry.quote);
+    m_entries.emplace_back(entry.ref(), entry.quote);
     m_argv.push_back(m_entries.back().data());
   }
   m_argv.push_back(nullptr);
@@ -342,15 +335,8 @@
   if (idx >= m_entries.size())
     return;
 
-  if (arg_str.size() > m_entries[idx].ref.size()) {
-    m_entries[idx] = ArgEntry(arg_str, quote_char);
-    m_argv[idx] = m_entries[idx].data();
-  } else {
-    const char *src_data = arg_str.data() ? arg_str.data() : "";
-    ::memcpy(m_entries[idx].data(), src_data, arg_str.size());
-    m_entries[idx].ptr[arg_str.size()] = 0;
-    m_entries[idx].ref = m_entries[idx].ref.take_front(arg_str.size());
-  }
+  m_entries[idx] = ArgEntry(arg_str, quote_char);
+  m_argv[idx] = m_entries[idx].data();
 }
 
 void Args::DeleteArgumentAtIndex(size_t idx) {
@@ -388,29 +374,6 @@
   m_argv.push_back(nullptr);
 }
 
-const char *Args::StripSpaces(std::string &s, bool leading, bool trailing,
-                              bool return_null_if_empty) {
-  static const char *k_white_space = " \t\v";
-  if (!s.empty()) {
-    if (leading) {
-      size_t pos = s.find_first_not_of(k_white_space);
-      if (pos == std::string::npos)
-        s.clear();
-      else if (pos > 0)
-        s.erase(0, pos);
-    }
-
-    if (trailing) {
-      size_t rpos = s.find_last_not_of(k_white_space);
-      if (rpos != std::string::npos && rpos + 1 < s.size())
-        s.erase(rpos + 1);
-    }
-  }
-  if (return_null_if_empty && s.empty())
-    return nullptr;
-  return s.c_str();
-}
-
 const char *Args::GetShellSafeArgument(const FileSpec &shell,
                                        const char *unsafe_arg,
                                        std::string &safe_arg) {
diff --git a/src/llvm-project/lldb/source/Utility/Baton.cpp b/src/llvm-project/lldb/source/Utility/Baton.cpp
index 84e295e2..7bba10d 100644
--- a/src/llvm-project/lldb/source/Utility/Baton.cpp
+++ b/src/llvm-project/lldb/source/Utility/Baton.cpp
@@ -8,5 +8,6 @@
 
 #include "lldb/Utility/Baton.h"
 
-void lldb_private::UntypedBaton::GetDescription(
-    Stream *s, lldb::DescriptionLevel level) const {}
+void lldb_private::UntypedBaton::GetDescription(llvm::raw_ostream &s,
+                                                lldb::DescriptionLevel level,
+                                                unsigned indentation) const {}
diff --git a/src/llvm-project/lldb/source/Utility/Broadcaster.cpp b/src/llvm-project/lldb/source/Utility/Broadcaster.cpp
index 597888c..ee0c39f 100644
--- a/src/llvm-project/lldb/source/Utility/Broadcaster.cpp
+++ b/src/llvm-project/lldb/source/Utility/Broadcaster.cpp
@@ -17,7 +17,6 @@
 
 #include <algorithm>
 #include <memory>
-#include <type_traits>
 #include <utility>
 
 #include <assert.h>
@@ -214,11 +213,12 @@
   if (Log *log = lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_EVENTS)) {
     StreamString event_description;
     event_sp->Dump(&event_description);
-    log->Printf("%p Broadcaster(\"%s\")::BroadcastEvent (event_sp = {%s}, "
-                "unique =%i) hijack = %p",
-                static_cast<void *>(this), GetBroadcasterName(),
-                event_description.GetData(), unique,
-                static_cast<void *>(hijacking_listener_sp.get()));
+    LLDB_LOGF(log,
+              "%p Broadcaster(\"%s\")::BroadcastEvent (event_sp = {%s}, "
+              "unique =%i) hijack = %p",
+              static_cast<void *>(this), GetBroadcasterName(),
+              event_description.GetData(), unique,
+              static_cast<void *>(hijacking_listener_sp.get()));
   }
 
   if (hijacking_listener_sp) {
@@ -317,9 +317,6 @@
   return GetBroadcasterClass() < rhs.GetBroadcasterClass();
 }
 
-BroadcastEventSpec &BroadcastEventSpec::
-operator=(const BroadcastEventSpec &rhs) = default;
-
 BroadcasterManager::BroadcasterManager() : m_manager_mutex() {}
 
 lldb::BroadcasterManagerSP BroadcasterManager::MakeBroadcasterManager() {
diff --git a/src/llvm-project/lldb/source/Utility/CMakeLists.txt b/src/llvm-project/lldb/source/Utility/CMakeLists.txt
index 03254c3..df486e2 100644
--- a/src/llvm-project/lldb/source/Utility/CMakeLists.txt
+++ b/src/llvm-project/lldb/source/Utility/CMakeLists.txt
@@ -15,19 +15,18 @@
   Args.cpp
   Baton.cpp
   Broadcaster.cpp
+  CompletionRequest.cpp
   Connection.cpp
   ConstString.cpp
-  CompletionRequest.cpp
   DataBufferHeap.cpp
   DataBufferLLVM.cpp
   DataEncoder.cpp
   DataExtractor.cpp
   Environment.cpp
-  FileCollector.cpp
   Event.cpp
   FileSpec.cpp
+  GDBRemote.cpp
   IOObject.cpp
-  JSON.cpp
   LLDBAssert.cpp
   Listener.cpp
   Log.cpp
@@ -45,7 +44,6 @@
   Status.cpp
   Stream.cpp
   StreamCallback.cpp
-  StreamGDBRemote.cpp
   StreamString.cpp
   StringExtractor.cpp
   StringExtractorGDBRemote.cpp
@@ -54,10 +52,10 @@
   StructuredData.cpp
   TildeExpressionResolver.cpp
   Timer.cpp
+  UUID.cpp
+  UriParser.cpp
   UserID.cpp
   UserIDResolver.cpp
-  UriParser.cpp
-  UUID.cpp
   VASprintf.cpp
   VMRange.cpp
 
diff --git a/src/llvm-project/lldb/source/Utility/CompletionRequest.cpp b/src/llvm-project/lldb/source/Utility/CompletionRequest.cpp
index c62ec4f..3b5a457 100644
--- a/src/llvm-project/lldb/source/Utility/CompletionRequest.cpp
+++ b/src/llvm-project/lldb/source/Utility/CompletionRequest.cpp
@@ -13,46 +13,32 @@
 
 CompletionRequest::CompletionRequest(llvm::StringRef command_line,
                                      unsigned raw_cursor_pos,
-                                     int match_start_point,
-                                     int max_return_elements,
                                      CompletionResult &result)
     : m_command(command_line), m_raw_cursor_pos(raw_cursor_pos),
-      m_match_start_point(match_start_point),
-      m_max_return_elements(max_return_elements), m_result(result) {
+      m_result(result) {
+  assert(raw_cursor_pos <= command_line.size() && "Out of bounds cursor?");
 
   // We parse the argument up to the cursor, so the last argument in
   // parsed_line is the one containing the cursor, and the cursor is after the
   // last character.
-  m_parsed_line = Args(command_line);
-  m_partial_parsed_line = Args(command_line.substr(0, raw_cursor_pos));
+  llvm::StringRef partial_command(command_line.substr(0, raw_cursor_pos));
+  m_parsed_line = Args(partial_command);
 
-  m_cursor_index = m_partial_parsed_line.GetArgumentCount() - 1;
-
-  if (m_cursor_index == -1)
+  if (GetParsedLine().GetArgumentCount() == 0) {
+    m_cursor_index = 0;
     m_cursor_char_position = 0;
-  else
+  } else {
+    m_cursor_index = GetParsedLine().GetArgumentCount() - 1U;
     m_cursor_char_position =
-        strlen(m_partial_parsed_line.GetArgumentAtIndex(m_cursor_index));
-
-  const char *cursor = command_line.data() + raw_cursor_pos;
-  if (raw_cursor_pos > 0 && cursor[-1] == ' ') {
-    // We are just after a space.  If we are in an argument, then we will
-    // continue parsing, but if we are between arguments, then we have to
-    // complete whatever the next element would be. We can distinguish the two
-    // cases because if we are in an argument (e.g. because the space is
-    // protected by a quote) then the space will also be in the parsed
-    // argument...
-
-    const char *current_elem =
-        m_partial_parsed_line.GetArgumentAtIndex(m_cursor_index);
-    if (m_cursor_char_position == 0 ||
-        current_elem[m_cursor_char_position - 1] != ' ') {
-      m_parsed_line.InsertArgumentAtIndex(m_cursor_index + 1, llvm::StringRef(),
-                                          '\0');
-      m_cursor_index++;
-      m_cursor_char_position = 0;
-    }
+        strlen(GetParsedLine().GetArgumentAtIndex(m_cursor_index));
   }
+
+  // The cursor is after a space but the space is not part of the argument.
+  // Let's add an empty fake argument to the end to make sure the completion
+  // code. Note: The space could be part of the last argument when it's quoted.
+  if (partial_command.endswith(" ") &&
+      !GetCursorArgumentPrefix().endswith(" "))
+    AppendEmptyArgument();
 }
 
 std::string CompletionResult::Completion::GetUniqueKey() const {
@@ -66,13 +52,16 @@
   std::string result;
   result.append(std::to_string(m_completion.size()));
   result.append(m_completion);
+  result.append(std::to_string(static_cast<int>(m_mode)));
+  result.append(":");
   result.append(m_descripton);
   return result;
 }
 
 void CompletionResult::AddResult(llvm::StringRef completion,
-                                 llvm::StringRef description) {
-  Completion r(completion, description);
+                                 llvm::StringRef description,
+                                 CompletionMode mode) {
+  Completion r(completion, description, mode);
 
   // Add the completion if we haven't seen the same value before.
   if (m_added_values.insert(r.GetUniqueKey()).second)
@@ -82,11 +71,11 @@
 void CompletionResult::GetMatches(StringList &matches) const {
   matches.Clear();
   for (const Completion &completion : m_results)
-    matches.AppendString(completion.m_completion);
+    matches.AppendString(completion.GetCompletion());
 }
 
 void CompletionResult::GetDescriptions(StringList &descriptions) const {
   descriptions.Clear();
   for (const Completion &completion : m_results)
-    descriptions.AppendString(completion.m_descripton);
+    descriptions.AppendString(completion.GetDescription());
 }
diff --git a/src/llvm-project/lldb/source/Utility/ConstString.cpp b/src/llvm-project/lldb/source/Utility/ConstString.cpp
index 46b7ab2..e90bb92 100644
--- a/src/llvm-project/lldb/source/Utility/ConstString.cpp
+++ b/src/llvm-project/lldb/source/Utility/ConstString.cpp
@@ -18,7 +18,6 @@
 #include "llvm/Support/RWMutex.h"
 #include "llvm/Support/Threading.h"
 
-#include <algorithm>
 #include <array>
 #include <utility>
 
@@ -59,23 +58,6 @@
     return nullptr;
   }
 
-  bool SetMangledCounterparts(const char *key_ccstr, const char *value_ccstr) {
-    if (key_ccstr != nullptr && value_ccstr != nullptr) {
-      {
-        const uint8_t h = hash(llvm::StringRef(key_ccstr));
-        llvm::sys::SmartScopedWriter<false> wlock(m_string_pools[h].m_mutex);
-        GetStringMapEntryFromKeyData(key_ccstr).setValue(value_ccstr);
-      }
-      {
-        const uint8_t h = hash(llvm::StringRef(value_ccstr));
-        llvm::sys::SmartScopedWriter<false> wlock(m_string_pools[h].m_mutex);
-        GetStringMapEntryFromKeyData(value_ccstr).setValue(key_ccstr);
-      }
-      return true;
-    }
-    return false;
-  }
-
   const char *GetConstCString(const char *cstr) {
     if (cstr != nullptr)
       return GetConstCStringWithLength(cstr, strlen(cstr));
diff --git a/src/llvm-project/lldb/source/Utility/DataBufferLLVM.cpp b/src/llvm-project/lldb/source/Utility/DataBufferLLVM.cpp
index 4227e9b..c20e1b0 100644
--- a/src/llvm-project/lldb/source/Utility/DataBufferLLVM.cpp
+++ b/src/llvm-project/lldb/source/Utility/DataBufferLLVM.cpp
@@ -8,12 +8,9 @@
 
 #include "lldb/Utility/DataBufferLLVM.h"
 
-#include "llvm/ADT/Twine.h"
-#include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
 
 #include <assert.h>
-#include <type_traits>
 
 using namespace lldb_private;
 
diff --git a/src/llvm-project/lldb/source/Utility/DataEncoder.cpp b/src/llvm-project/lldb/source/Utility/DataEncoder.cpp
index 13c505e..8a1036e 100644
--- a/src/llvm-project/lldb/source/Utility/DataEncoder.cpp
+++ b/src/llvm-project/lldb/source/Utility/DataEncoder.cpp
@@ -13,9 +13,7 @@
 
 #include "llvm/Support/Endian.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Support/MathExtras.h"
 
-#include <cassert>
 #include <cstddef>
 
 #include <string.h>
@@ -61,42 +59,6 @@
   m_data_sp.reset();
 }
 
-// If this object contains shared data, this function returns the offset into
-// that shared data. Else zero is returned.
-size_t DataEncoder::GetSharedDataOffset() const {
-  if (m_start != nullptr) {
-    const DataBuffer *data = m_data_sp.get();
-    if (data != nullptr) {
-      const uint8_t *data_bytes = data->GetBytes();
-      if (data_bytes != nullptr) {
-        assert(m_start >= data_bytes);
-        return m_start - data_bytes;
-      }
-    }
-  }
-  return 0;
-}
-
-// Set the data with which this object will extract from to data starting at
-// BYTES and set the length of the data to LENGTH bytes long. The data is
-// externally owned must be around at least as long as this object points to
-// the data. No copy of the data is made, this object just refers to this data
-// and can extract from it. If this object refers to any shared data upon
-// entry, the reference to that data will be released. Is SWAP is set to true,
-// any data extracted will be endian swapped.
-uint32_t DataEncoder::SetData(void *bytes, uint32_t length, ByteOrder endian) {
-  m_byte_order = endian;
-  m_data_sp.reset();
-  if (bytes == nullptr || length == 0) {
-    m_start = nullptr;
-    m_end = nullptr;
-  } else {
-    m_start = static_cast<uint8_t *>(bytes);
-    m_end = m_start + length;
-  }
-  return GetByteSize();
-}
-
 // Assign the data for this object to be a subrange of the shared data in
 // "data_sp" starting "data_offset" bytes into "data_sp" and ending
 // "data_length" bytes later. If "data_offset" is not a valid offset into
@@ -187,16 +149,8 @@
   return UINT32_MAX;
 }
 
-// Extract a single integer value from the data and update the offset pointed
-// to by "offset_ptr". The size of the extracted integer is specified by the
-// "byte_size" argument. "byte_size" should have a value >= 1 and <= 8 since
-// the return value is only 64 bits wide. Any "byte_size" values less than 1 or
-// greater than 8 will result in nothing being extracted, and zero being
-// returned.
-//
-// RETURNS the integer value that was extracted, or zero on failure.
-uint32_t DataEncoder::PutMaxU64(uint32_t offset, uint32_t byte_size,
-                                uint64_t value) {
+uint32_t DataEncoder::PutUnsigned(uint32_t offset, uint32_t byte_size,
+                                  uint64_t value) {
   switch (byte_size) {
   case 1:
     return PutU8(offset, value);
@@ -225,7 +179,7 @@
 }
 
 uint32_t DataEncoder::PutAddress(uint32_t offset, lldb::addr_t addr) {
-  return PutMaxU64(offset, GetAddressByteSize(), addr);
+  return PutUnsigned(offset, m_addr_size, addr);
 }
 
 uint32_t DataEncoder::PutCString(uint32_t offset, const char *cstr) {
diff --git a/src/llvm-project/lldb/source/Utility/DataExtractor.cpp b/src/llvm-project/lldb/source/Utility/DataExtractor.cpp
index 79a1f75..fed2a13 100644
--- a/src/llvm-project/lldb/source/Utility/DataExtractor.cpp
+++ b/src/llvm-project/lldb/source/Utility/DataExtractor.cpp
@@ -129,9 +129,8 @@
 DataExtractor::DataExtractor(const void *data, offset_t length,
                              ByteOrder endian, uint32_t addr_size,
                              uint32_t target_byte_size /*=1*/)
-    : m_start(const_cast<uint8_t *>(reinterpret_cast<const uint8_t *>(data))),
-      m_end(const_cast<uint8_t *>(reinterpret_cast<const uint8_t *>(data)) +
-            length),
+    : m_start(const_cast<uint8_t *>(static_cast<const uint8_t *>(data))),
+      m_end(const_cast<uint8_t *>(static_cast<const uint8_t *>(data)) + length),
       m_byte_order(endian), m_addr_size(addr_size), m_data_sp(),
       m_target_byte_size(target_byte_size) {
   assert(addr_size == 4 || addr_size == 8);
@@ -232,7 +231,7 @@
     m_start = nullptr;
     m_end = nullptr;
   } else {
-    m_start = const_cast<uint8_t *>(reinterpret_cast<const uint8_t *>(bytes));
+    m_start = const_cast<uint8_t *>(static_cast<const uint8_t *>(bytes));
     m_end = m_start + length;
   }
   return GetByteSize();
@@ -577,18 +576,28 @@
 uint64_t DataExtractor::GetMaxU64Bitfield(offset_t *offset_ptr, size_t size,
                                           uint32_t bitfield_bit_size,
                                           uint32_t bitfield_bit_offset) const {
+  assert(bitfield_bit_size <= 64);
   uint64_t uval64 = GetMaxU64(offset_ptr, size);
-  if (bitfield_bit_size > 0) {
-    int32_t lsbcount = bitfield_bit_offset;
-    if (m_byte_order == eByteOrderBig)
-      lsbcount = size * 8 - bitfield_bit_offset - bitfield_bit_size;
-    if (lsbcount > 0)
-      uval64 >>= lsbcount;
-    uint64_t bitfield_mask = ((1ul << bitfield_bit_size) - 1);
-    if (!bitfield_mask && bitfield_bit_offset == 0 && bitfield_bit_size == 64)
-      return uval64;
-    uval64 &= bitfield_mask;
-  }
+
+  if (bitfield_bit_size == 0)
+    return uval64;
+
+  int32_t lsbcount = bitfield_bit_offset;
+  if (m_byte_order == eByteOrderBig)
+    lsbcount = size * 8 - bitfield_bit_offset - bitfield_bit_size;
+
+  if (lsbcount > 0)
+    uval64 >>= lsbcount;
+
+  uint64_t bitfield_mask =
+      (bitfield_bit_size == 64
+           ? std::numeric_limits<uint64_t>::max()
+           : ((static_cast<uint64_t>(1) << bitfield_bit_size) - 1));
+  if (!bitfield_mask && bitfield_bit_offset == 0 && bitfield_bit_size == 64)
+    return uval64;
+
+  uval64 &= bitfield_mask;
+
   return uval64;
 }
 
@@ -816,26 +825,25 @@
 // non-zero and there aren't enough available bytes, nullptr will be returned
 // and "offset_ptr" will not be updated.
 const char *DataExtractor::GetCStr(offset_t *offset_ptr) const {
-  const char *cstr = reinterpret_cast<const char *>(PeekData(*offset_ptr, 1));
-  if (cstr) {
-    const char *cstr_end = cstr;
-    const char *end = reinterpret_cast<const char *>(m_end);
-    while (cstr_end < end && *cstr_end)
-      ++cstr_end;
+  const char *start = reinterpret_cast<const char *>(PeekData(*offset_ptr, 1));
+  // Already at the end of the data.
+  if (!start)
+    return nullptr;
 
-    // Now we are either at the end of the data or we point to the
-    // NULL C string terminator with cstr_end...
-    if (*cstr_end == '\0') {
-      // Advance the offset with one extra byte for the NULL terminator
-      *offset_ptr += (cstr_end - cstr + 1);
-      return cstr;
-    }
+  const char *end = reinterpret_cast<const char *>(m_end);
 
-    // We reached the end of the data without finding a NULL C string
-    // terminator. Fall through and return nullptr otherwise anyone that would
-    // have used the result as a C string can wander into unknown memory...
-  }
-  return nullptr;
+  // Check all bytes for a null terminator that terminates a C string.
+  const char *terminator_or_end = std::find(start, end, '\0');
+
+  // We didn't find a null terminator, so return nullptr to indicate that there
+  // is no valid C string at that offset.
+  if (terminator_or_end == end)
+    return nullptr;
+
+  // Update offset_ptr for the caller to point to the data behind the
+  // terminator (which is 1 byte long).
+  *offset_ptr += (terminator_or_end - start + 1UL);
+  return start;
 }
 
 // Extracts a NULL terminated C string from the fixed length field of length
@@ -976,8 +984,7 @@
 lldb::offset_t DataExtractor::PutToLog(Log *log, offset_t start_offset,
                                        offset_t length, uint64_t base_addr,
                                        uint32_t num_per_line,
-                                       DataExtractor::Type type,
-                                       const char *format) const {
+                                       DataExtractor::Type type) const {
   if (log == nullptr)
     return start_offset;
 
@@ -1001,29 +1008,29 @@
 
     switch (type) {
     case TypeUInt8:
-      sstr.Printf(format ? format : " %2.2x", GetU8(&offset));
+      sstr.Printf(" %2.2x", GetU8(&offset));
       break;
     case TypeChar: {
       char ch = GetU8(&offset);
-      sstr.Printf(format ? format : " %c", isprint(ch) ? ch : ' ');
+      sstr.Printf(" %c", isprint(ch) ? ch : ' ');
     } break;
     case TypeUInt16:
-      sstr.Printf(format ? format : " %4.4x", GetU16(&offset));
+      sstr.Printf(" %4.4x", GetU16(&offset));
       break;
     case TypeUInt32:
-      sstr.Printf(format ? format : " %8.8x", GetU32(&offset));
+      sstr.Printf(" %8.8x", GetU32(&offset));
       break;
     case TypeUInt64:
-      sstr.Printf(format ? format : " %16.16" PRIx64, GetU64(&offset));
+      sstr.Printf(" %16.16" PRIx64, GetU64(&offset));
       break;
     case TypePointer:
-      sstr.Printf(format ? format : " 0x%" PRIx64, GetAddress(&offset));
+      sstr.Printf(" 0x%" PRIx64, GetAddress(&offset));
       break;
     case TypeULEB128:
-      sstr.Printf(format ? format : " 0x%" PRIx64, GetULEB128(&offset));
+      sstr.Printf(" 0x%" PRIx64, GetULEB128(&offset));
       break;
     case TypeSLEB128:
-      sstr.Printf(format ? format : " %" PRId64, GetSLEB128(&offset));
+      sstr.Printf(" %" PRId64, GetSLEB128(&offset));
       break;
     }
   }
diff --git a/src/llvm-project/lldb/source/Utility/Environment.cpp b/src/llvm-project/lldb/source/Utility/Environment.cpp
index 1405336..8cafd30 100644
--- a/src/llvm-project/lldb/source/Utility/Environment.cpp
+++ b/src/llvm-project/lldb/source/Utility/Environment.cpp
@@ -13,7 +13,7 @@
 char *Environment::Envp::make_entry(llvm::StringRef Key,
                                     llvm::StringRef Value) {
   const size_t size = Key.size() + 1 /*=*/ + Value.size() + 1 /*\0*/;
-  char *Result = reinterpret_cast<char *>(
+  char *Result = static_cast<char *>(
       Allocator.Allocate(sizeof(char) * size, alignof(char)));
   char *Next = Result;
 
@@ -26,7 +26,7 @@
 }
 
 Environment::Envp::Envp(const Environment &Env) {
-  Data = reinterpret_cast<char **>(
+  Data = static_cast<char **>(
       Allocator.Allocate(sizeof(char *) * (Env.size() + 1), alignof(char *)));
   char **Next = Data;
   for (const auto &KV : Env)
diff --git a/src/llvm-project/lldb/source/Utility/FileCollector.cpp b/src/llvm-project/lldb/source/Utility/FileCollector.cpp
deleted file mode 100644
index ed93591..0000000
--- a/src/llvm-project/lldb/source/Utility/FileCollector.cpp
+++ /dev/null
@@ -1,182 +0,0 @@
-//===-- FileCollector.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Utility/FileCollector.h"
-
-#include "llvm/ADT/SmallString.h"
-#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/Path.h"
-#include "llvm/Support/Process.h"
-
-using namespace lldb_private;
-using namespace llvm;
-
-static bool IsCaseSensitivePath(StringRef path) {
-  SmallString<256> tmp_dest = path, upper_dest, real_dest;
-
-  // Remove component traversals, links, etc.
-  if (!sys::fs::real_path(path, tmp_dest))
-    return true; // Current default value in vfs.yaml
-  path = tmp_dest;
-
-  // Change path to all upper case and ask for its real path, if the latter
-  // exists and is equal to path, it's not case sensitive. Default to case
-  // sensitive in the absence of real_path, since this is the YAMLVFSWriter
-  // default.
-  upper_dest = path.upper();
-  if (sys::fs::real_path(upper_dest, real_dest) && path.equals(real_dest))
-    return false;
-  return true;
-}
-
-FileCollector::FileCollector(const FileSpec &root, const FileSpec &overlay_root)
-    : m_root(root), m_overlay_root(overlay_root) {
-  sys::fs::create_directories(m_root.GetPath(), true);
-}
-
-bool FileCollector::GetRealPath(StringRef src_path,
-                                SmallVectorImpl<char> &result) {
-  SmallString<256> real_path;
-  StringRef FileName = sys::path::filename(src_path);
-  std::string directory = sys::path::parent_path(src_path).str();
-  auto dir_with_symlink = m_symlink_map.find(directory);
-
-  // Use real_path to fix any symbolic link component present in a path.
-  // Computing the real path is expensive, cache the search through the
-  // parent path directory.
-  if (dir_with_symlink == m_symlink_map.end()) {
-    auto ec = sys::fs::real_path(directory, real_path);
-    if (ec)
-      return false;
-    m_symlink_map[directory] = real_path.str();
-  } else {
-    real_path = dir_with_symlink->second;
-  }
-
-  sys::path::append(real_path, FileName);
-  result.swap(real_path);
-  return true;
-}
-
-void FileCollector::AddFile(const Twine &file) {
-  std::lock_guard<std::mutex> lock(m_mutex);
-  std::string file_str = file.str();
-  if (MarkAsSeen(file_str))
-    AddFileImpl(file_str);
-}
-
-void FileCollector::AddFileImpl(StringRef src_path) {
-  std::string root = m_root.GetPath();
-
-  // We need an absolute src path to append to the root.
-  SmallString<256> absolute_src = src_path;
-  sys::fs::make_absolute(absolute_src);
-
-  // Canonicalize src to a native path to avoid mixed separator styles.
-  sys::path::native(absolute_src);
-
-  // Remove redundant leading "./" pieces and consecutive separators.
-  absolute_src = sys::path::remove_leading_dotslash(absolute_src);
-
-  // Canonicalize the source path by removing "..", "." components.
-  SmallString<256> virtual_path = absolute_src;
-  sys::path::remove_dots(virtual_path, /*remove_dot_dot=*/true);
-
-  // If a ".." component is present after a symlink component, remove_dots may
-  // lead to the wrong real destination path. Let the source be canonicalized
-  // like that but make sure we always use the real path for the destination.
-  SmallString<256> copy_from;
-  if (!GetRealPath(absolute_src, copy_from))
-    copy_from = virtual_path;
-
-  SmallString<256> dst_path = StringRef(root);
-  sys::path::append(dst_path, sys::path::relative_path(copy_from));
-
-  // Always map a canonical src path to its real path into the YAML, by doing
-  // this we map different virtual src paths to the same entry in the VFS
-  // overlay, which is a way to emulate symlink inside the VFS; this is also
-  // needed for correctness, not doing that can lead to module redefinition
-  // errors.
-  AddFileToMapping(virtual_path, dst_path);
-}
-
-/// Set the access and modification time for the given file from the given
-/// status object.
-static std::error_code
-CopyAccessAndModificationTime(StringRef filename,
-                              const sys::fs::file_status &stat) {
-  int fd;
-
-  if (auto ec =
-          sys::fs::openFileForWrite(filename, fd, sys::fs::CD_OpenExisting))
-    return ec;
-
-  if (auto ec = sys::fs::setLastAccessAndModificationTime(
-          fd, stat.getLastAccessedTime(), stat.getLastModificationTime()))
-    return ec;
-
-  if (auto ec = sys::Process::SafelyCloseFileDescriptor(fd))
-    return ec;
-
-  return {};
-}
-
-std::error_code FileCollector::CopyFiles(bool stop_on_error) {
-  for (auto &entry : m_vfs_writer.getMappings()) {
-    // Create directory tree.
-    if (std::error_code ec =
-            sys::fs::create_directories(sys::path::parent_path(entry.RPath),
-                                        /*IgnoreExisting=*/true)) {
-      if (stop_on_error)
-        return ec;
-    }
-
-    // Copy file over.
-    if (std::error_code ec = sys::fs::copy_file(entry.VPath, entry.RPath)) {
-      if (stop_on_error)
-        return ec;
-    }
-
-    // Copy over permissions.
-    if (auto perms = sys::fs::getPermissions(entry.VPath)) {
-      if (std::error_code ec = sys::fs::setPermissions(entry.RPath, *perms)) {
-        if (stop_on_error)
-          return ec;
-      }
-    }
-
-    // Copy over modification time.
-    sys::fs::file_status stat;
-    if (std::error_code ec = sys::fs::status(entry.VPath, stat)) {
-      if (stop_on_error)
-        return ec;
-      continue;
-    }
-    CopyAccessAndModificationTime(entry.RPath, stat);
-  }
-  return {};
-}
-
-std::error_code FileCollector::WriteMapping(const FileSpec &mapping_file) {
-  std::lock_guard<std::mutex> lock(m_mutex);
-
-  std::string root = m_overlay_root.GetPath();
-
-  m_vfs_writer.setOverlayDir(root);
-  m_vfs_writer.setCaseSensitivity(IsCaseSensitivePath(root));
-  m_vfs_writer.setUseExternalNames(false);
-
-  std::error_code ec;
-  raw_fd_ostream os(mapping_file.GetPath(), ec, sys::fs::F_Text);
-  if (ec)
-    return ec;
-
-  m_vfs_writer.write(os);
-
-  return {};
-}
diff --git a/src/llvm-project/lldb/source/Utility/FileSpec.cpp b/src/llvm-project/lldb/source/Utility/FileSpec.cpp
index 35d2240..5c216d9 100644
--- a/src/llvm-project/lldb/source/Utility/FileSpec.cpp
+++ b/src/llvm-project/lldb/source/Utility/FileSpec.cpp
@@ -72,17 +72,8 @@
   SetFile(path, style);
 }
 
-FileSpec::FileSpec(llvm::StringRef path, const llvm::Triple &Triple)
-    : FileSpec{path, Triple.isOSWindows() ? Style::windows : Style::posix} {}
-
-// Copy constructor
-FileSpec::FileSpec(const FileSpec *rhs) : m_directory(), m_filename() {
-  if (rhs)
-    *this = *rhs;
-}
-
-// Virtual destructor in case anyone inherits from this class.
-FileSpec::~FileSpec() {}
+FileSpec::FileSpec(llvm::StringRef path, const llvm::Triple &triple)
+    : FileSpec{path, triple.isOSWindows() ? Style::windows : Style::posix} {}
 
 namespace {
 /// Safely get a character at the specified index.
@@ -174,16 +165,6 @@
 
 
 }
-// Assignment operator.
-const FileSpec &FileSpec::operator=(const FileSpec &rhs) {
-  if (this != &rhs) {
-    m_directory = rhs.m_directory;
-    m_filename = rhs.m_filename;
-    m_is_resolved = rhs.m_is_resolved;
-    m_style = rhs.m_style;
-  }
-  return *this;
-}
 
 void FileSpec::SetFile(llvm::StringRef pathname) { SetFile(pathname, m_style); }
 
@@ -228,8 +209,8 @@
     m_directory.SetString(directory);
 }
 
-void FileSpec::SetFile(llvm::StringRef path, const llvm::Triple &Triple) {
-  return SetFile(path, Triple.isOSWindows() ? Style::windows : Style::posix);
+void FileSpec::SetFile(llvm::StringRef path, const llvm::Triple &triple) {
+  return SetFile(path, triple.isOSWindows() ? Style::windows : Style::posix);
 }
 
 // Convert to pointer operator. This allows code to check any FileSpec objects
@@ -271,7 +252,7 @@
 
 // Dump a FileSpec object to a stream
 Stream &lldb_private::operator<<(Stream &s, const FileSpec &f) {
-  f.Dump(&s);
+  f.Dump(s.AsRawOstream());
   return s;
 }
 
@@ -312,20 +293,18 @@
 }
 
 bool FileSpec::Equal(const FileSpec &a, const FileSpec &b, bool full) {
-  // case sensitivity of equality test
-  const bool case_sensitive = a.IsCaseSensitive() || b.IsCaseSensitive();
+  if (full || (a.GetDirectory() && b.GetDirectory()))
+    return a == b;
 
-  const bool filenames_equal = ConstString::Equals(a.m_filename,
-                                                   b.m_filename,
-                                                   case_sensitive);
+  return a.FileEquals(b);
+}
 
-  if (!filenames_equal)
-    return false;
-
-  if (!full && (a.GetDirectory().IsEmpty() || b.GetDirectory().IsEmpty()))
-    return filenames_equal;
-
-  return a == b;
+bool FileSpec::Match(const FileSpec &pattern, const FileSpec &file) {
+  if (pattern.GetDirectory())
+    return pattern == file;
+  if (pattern.GetFilename())
+    return pattern.FileEquals(file);
+  return true;
 }
 
 llvm::Optional<FileSpec::Style> FileSpec::GuessPathStyle(llvm::StringRef absolute_path) {
@@ -342,14 +321,12 @@
 // Dump the object to the supplied stream. If the object contains a valid
 // directory name, it will be displayed followed by a directory delimiter, and
 // the filename.
-void FileSpec::Dump(Stream *s) const {
-  if (s) {
-    std::string path{GetPath(true)};
-    s->PutCString(path);
-    char path_separator = GetPreferredPathSeparator(m_style);
-    if (!m_filename && !path.empty() && path.back() != path_separator)
-      s->PutChar(path_separator);
-  }
+void FileSpec::Dump(llvm::raw_ostream &s) const {
+  std::string path{GetPath(true)};
+  s << path;
+  char path_separator = GetPreferredPathSeparator(m_style);
+  if (!m_filename && !path.empty() && path.back() != path_separator)
+    s << path_separator;
 }
 
 FileSpec::Style FileSpec::GetPathStyle() const { return m_style; }
diff --git a/src/llvm-project/lldb/source/Utility/GDBRemote.cpp b/src/llvm-project/lldb/source/Utility/GDBRemote.cpp
new file mode 100644
index 0000000..f267d00
--- /dev/null
+++ b/src/llvm-project/lldb/source/Utility/GDBRemote.cpp
@@ -0,0 +1,160 @@
+//===-- GDBRemote.cpp -----------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Utility/GDBRemote.h"
+
+#include "lldb/Utility/Flags.h"
+#include "lldb/Utility/Stream.h"
+
+#include <stdio.h>
+
+using namespace lldb;
+using namespace lldb_private::repro;
+using namespace lldb_private;
+using namespace llvm;
+
+StreamGDBRemote::StreamGDBRemote() : StreamString() {}
+
+StreamGDBRemote::StreamGDBRemote(uint32_t flags, uint32_t addr_size,
+                                 ByteOrder byte_order)
+    : StreamString(flags, addr_size, byte_order) {}
+
+StreamGDBRemote::~StreamGDBRemote() {}
+
+int StreamGDBRemote::PutEscapedBytes(const void *s, size_t src_len) {
+  int bytes_written = 0;
+  const uint8_t *src = static_cast<const uint8_t *>(s);
+  bool binary_is_set = m_flags.Test(eBinary);
+  m_flags.Clear(eBinary);
+  while (src_len) {
+    uint8_t byte = *src;
+    src++;
+    src_len--;
+    if (byte == 0x23 || byte == 0x24 || byte == 0x7d || byte == 0x2a) {
+      bytes_written += PutChar(0x7d);
+      byte ^= 0x20;
+    }
+    bytes_written += PutChar(byte);
+  };
+  if (binary_is_set)
+    m_flags.Set(eBinary);
+  return bytes_written;
+}
+
+llvm::StringRef GDBRemotePacket::GetTypeStr() const {
+  switch (type) {
+  case GDBRemotePacket::ePacketTypeSend:
+    return "send";
+  case GDBRemotePacket::ePacketTypeRecv:
+    return "read";
+  case GDBRemotePacket::ePacketTypeInvalid:
+    return "invalid";
+  }
+  llvm_unreachable("All enum cases should be handled");
+}
+
+void GDBRemotePacket::Dump(Stream &strm) const {
+  strm.Printf("tid=0x%4.4" PRIx64 " <%4u> %s packet: %s\n", tid,
+              bytes_transmitted, GetTypeStr().data(), packet.data.c_str());
+}
+
+void yaml::ScalarEnumerationTraits<GDBRemotePacket::Type>::enumeration(
+    IO &io, GDBRemotePacket::Type &value) {
+  io.enumCase(value, "Invalid", GDBRemotePacket::ePacketTypeInvalid);
+  io.enumCase(value, "Send", GDBRemotePacket::ePacketTypeSend);
+  io.enumCase(value, "Recv", GDBRemotePacket::ePacketTypeRecv);
+}
+
+void yaml::ScalarTraits<GDBRemotePacket::BinaryData>::output(
+    const GDBRemotePacket::BinaryData &Val, void *, raw_ostream &Out) {
+  Out << toHex(Val.data);
+}
+
+StringRef yaml::ScalarTraits<GDBRemotePacket::BinaryData>::input(
+    StringRef Scalar, void *, GDBRemotePacket::BinaryData &Val) {
+  Val.data = fromHex(Scalar);
+  return {};
+}
+
+void yaml::MappingTraits<GDBRemotePacket>::mapping(IO &io,
+                                                   GDBRemotePacket &Packet) {
+  io.mapRequired("packet", Packet.packet);
+  io.mapRequired("type", Packet.type);
+  io.mapRequired("bytes", Packet.bytes_transmitted);
+  io.mapRequired("index", Packet.packet_idx);
+  io.mapRequired("tid", Packet.tid);
+}
+
+StringRef
+yaml::MappingTraits<GDBRemotePacket>::validate(IO &io,
+                                               GDBRemotePacket &Packet) {
+  return {};
+}
+
+void GDBRemoteProvider::Keep() {
+  std::vector<std::string> files;
+  for (auto &recorder : m_packet_recorders) {
+    files.push_back(recorder->GetFilename().GetPath());
+  }
+
+  FileSpec file = GetRoot().CopyByAppendingPathComponent(Info::file);
+  std::error_code ec;
+  llvm::raw_fd_ostream os(file.GetPath(), ec, llvm::sys::fs::OF_Text);
+  if (ec)
+    return;
+  yaml::Output yout(os);
+  yout << files;
+}
+
+void GDBRemoteProvider::Discard() { m_packet_recorders.clear(); }
+
+llvm::Expected<std::unique_ptr<PacketRecorder>>
+PacketRecorder::Create(const FileSpec &filename) {
+  std::error_code ec;
+  auto recorder = std::make_unique<PacketRecorder>(std::move(filename), ec);
+  if (ec)
+    return llvm::errorCodeToError(ec);
+  return std::move(recorder);
+}
+
+PacketRecorder *GDBRemoteProvider::GetNewPacketRecorder() {
+  std::size_t i = m_packet_recorders.size() + 1;
+  std::string filename = (llvm::Twine(Info::name) + llvm::Twine("-") +
+                          llvm::Twine(i) + llvm::Twine(".yaml"))
+                             .str();
+  auto recorder_or_error =
+      PacketRecorder::Create(GetRoot().CopyByAppendingPathComponent(filename));
+  if (!recorder_or_error) {
+    llvm::consumeError(recorder_or_error.takeError());
+    return nullptr;
+  }
+
+  m_packet_recorders.push_back(std::move(*recorder_or_error));
+  return m_packet_recorders.back().get();
+}
+
+void PacketRecorder::Record(const GDBRemotePacket &packet) {
+  if (!m_record)
+    return;
+  yaml::Output yout(m_os);
+  yout << const_cast<GDBRemotePacket &>(packet);
+  m_os.flush();
+}
+
+llvm::raw_ostream *GDBRemoteProvider::GetHistoryStream() {
+  FileSpec history_file = GetRoot().CopyByAppendingPathComponent(Info::file);
+
+  std::error_code EC;
+  m_stream_up = std::make_unique<raw_fd_ostream>(history_file.GetPath(), EC,
+                                                 sys::fs::OpenFlags::OF_Text);
+  return m_stream_up.get();
+}
+
+char GDBRemoteProvider::ID = 0;
+const char *GDBRemoteProvider::Info::file = "gdb-remote.yaml";
+const char *GDBRemoteProvider::Info::name = "gdb-remote";
diff --git a/src/llvm-project/lldb/source/Utility/JSON.cpp b/src/llvm-project/lldb/source/Utility/JSON.cpp
deleted file mode 100644
index 2c3f622..0000000
--- a/src/llvm-project/lldb/source/Utility/JSON.cpp
+++ /dev/null
@@ -1,550 +0,0 @@
-//===--------------------- JSON.cpp -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Utility/JSON.h"
-
-#include "lldb/Utility/Stream.h"
-#include "lldb/Utility/StreamString.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/ErrorHandling.h"
-
-#include <inttypes.h>
-#include <limits.h>
-#include <stddef.h>
-#include <utility>
-
-using namespace lldb_private;
-
-std::string JSONString::json_string_quote_metachars(const std::string &s) {
-  if (s.find_first_of("\\\n\"") == std::string::npos)
-    return s;
-
-  std::string output;
-  const size_t s_size = s.size();
-  const char *s_chars = s.c_str();
-  for (size_t i = 0; i < s_size; i++) {
-    unsigned char ch = *(s_chars + i);
-    if (ch == '"' || ch == '\\' || ch == '\n') {
-      output.push_back('\\');
-      if (ch == '\n') ch = 'n';
-    }
-    output.push_back(ch);
-  }
-  return output;
-}
-
-JSONString::JSONString() : JSONValue(JSONValue::Kind::String), m_data() {}
-
-JSONString::JSONString(const char *s)
-    : JSONValue(JSONValue::Kind::String), m_data(s ? s : "") {}
-
-JSONString::JSONString(const std::string &s)
-    : JSONValue(JSONValue::Kind::String), m_data(s) {}
-
-void JSONString::Write(Stream &s) {
-  s.Printf("\"%s\"", json_string_quote_metachars(m_data).c_str());
-}
-
-uint64_t JSONNumber::GetAsUnsigned() const {
-  switch (m_data_type) {
-  case DataType::Unsigned:
-    return m_data.m_unsigned;
-  case DataType::Signed:
-    return static_cast<uint64_t>(m_data.m_signed);
-  case DataType::Double:
-    return static_cast<uint64_t>(m_data.m_double);
-  }
-  llvm_unreachable("Unhandled data type");
-}
-
-int64_t JSONNumber::GetAsSigned() const {
-  switch (m_data_type) {
-  case DataType::Unsigned:
-    return static_cast<int64_t>(m_data.m_unsigned);
-  case DataType::Signed:
-    return m_data.m_signed;
-  case DataType::Double:
-    return static_cast<int64_t>(m_data.m_double);
-  }
-  llvm_unreachable("Unhandled data type");
-}
-
-double JSONNumber::GetAsDouble() const {
-  switch (m_data_type) {
-  case DataType::Unsigned:
-    return static_cast<double>(m_data.m_unsigned);
-  case DataType::Signed:
-    return static_cast<double>(m_data.m_signed);
-  case DataType::Double:
-    return m_data.m_double;
-  }
-  llvm_unreachable("Unhandled data type");
-}
-
-void JSONNumber::Write(Stream &s) {
-  switch (m_data_type) {
-  case DataType::Unsigned:
-    s.Printf("%" PRIu64, m_data.m_unsigned);
-    break;
-  case DataType::Signed:
-    s.Printf("%" PRId64, m_data.m_signed);
-    break;
-  case DataType::Double:
-    s.Printf("%g", m_data.m_double);
-    break;
-  }
-}
-
-JSONTrue::JSONTrue() : JSONValue(JSONValue::Kind::True) {}
-
-void JSONTrue::Write(Stream &s) { s.Printf("true"); }
-
-JSONFalse::JSONFalse() : JSONValue(JSONValue::Kind::False) {}
-
-void JSONFalse::Write(Stream &s) { s.Printf("false"); }
-
-JSONNull::JSONNull() : JSONValue(JSONValue::Kind::Null) {}
-
-void JSONNull::Write(Stream &s) { s.Printf("null"); }
-
-JSONObject::JSONObject() : JSONValue(JSONValue::Kind::Object) {}
-
-void JSONObject::Write(Stream &s) {
-  bool first = true;
-  s.PutChar('{');
-  auto iter = m_elements.begin(), end = m_elements.end();
-  for (; iter != end; iter++) {
-    if (first)
-      first = false;
-    else
-      s.PutChar(',');
-    JSONString key(iter->first);
-    JSONValue::SP value(iter->second);
-    key.Write(s);
-    s.PutChar(':');
-    value->Write(s);
-  }
-  s.PutChar('}');
-}
-
-bool JSONObject::SetObject(const std::string &key, JSONValue::SP value) {
-  if (key.empty() || nullptr == value.get())
-    return false;
-  m_elements[key] = value;
-  return true;
-}
-
-JSONValue::SP JSONObject::GetObject(const std::string &key) {
-  auto iter = m_elements.find(key), end = m_elements.end();
-  if (iter == end)
-    return JSONValue::SP();
-  return iter->second;
-}
-
-JSONArray::JSONArray() : JSONValue(JSONValue::Kind::Array) {}
-
-void JSONArray::Write(Stream &s) {
-  bool first = true;
-  s.PutChar('[');
-  auto iter = m_elements.begin(), end = m_elements.end();
-  for (; iter != end; iter++) {
-    if (first)
-      first = false;
-    else
-      s.PutChar(',');
-    (*iter)->Write(s);
-  }
-  s.PutChar(']');
-}
-
-bool JSONArray::SetObject(Index i, JSONValue::SP value) {
-  if (value.get() == nullptr)
-    return false;
-  if (i < m_elements.size()) {
-    m_elements[i] = value;
-    return true;
-  }
-  if (i == m_elements.size()) {
-    m_elements.push_back(value);
-    return true;
-  }
-  return false;
-}
-
-bool JSONArray::AppendObject(JSONValue::SP value) {
-  if (value.get() == nullptr)
-    return false;
-  m_elements.push_back(value);
-  return true;
-}
-
-JSONValue::SP JSONArray::GetObject(Index i) {
-  if (i < m_elements.size())
-    return m_elements[i];
-  return JSONValue::SP();
-}
-
-JSONArray::Size JSONArray::GetNumElements() { return m_elements.size(); }
-
-JSONParser::JSONParser(llvm::StringRef data) : StringExtractor(data) {}
-
-JSONParser::Token JSONParser::GetToken(std::string &value) {
-  StreamString error;
-
-  value.clear();
-  SkipSpaces();
-  const uint64_t start_index = m_index;
-  const char ch = GetChar();
-  switch (ch) {
-  case '{':
-    return Token::ObjectStart;
-  case '}':
-    return Token::ObjectEnd;
-  case '[':
-    return Token::ArrayStart;
-  case ']':
-    return Token::ArrayEnd;
-  case ',':
-    return Token::Comma;
-  case ':':
-    return Token::Colon;
-  case '\0':
-    return Token::EndOfFile;
-  case 't':
-    if (GetChar() == 'r')
-      if (GetChar() == 'u')
-        if (GetChar() == 'e')
-          return Token::True;
-    break;
-
-  case 'f':
-    if (GetChar() == 'a')
-      if (GetChar() == 'l')
-        if (GetChar() == 's')
-          if (GetChar() == 'e')
-            return Token::False;
-    break;
-
-  case 'n':
-    if (GetChar() == 'u')
-      if (GetChar() == 'l')
-        if (GetChar() == 'l')
-          return Token::Null;
-    break;
-
-  case '"': {
-    while (true) {
-      bool was_escaped = false;
-      int escaped_ch = GetEscapedChar(was_escaped);
-      if (escaped_ch == -1) {
-        error.Printf(
-            "error: an error occurred getting a character from offset %" PRIu64,
-            start_index);
-        value = std::move(error.GetString());
-        return Token::Status;
-
-      } else {
-        const bool is_end_quote = escaped_ch == '"';
-        const bool is_null = escaped_ch == 0;
-        if (was_escaped || (!is_end_quote && !is_null)) {
-          if (CHAR_MIN <= escaped_ch && escaped_ch <= CHAR_MAX) {
-            value.append(1, static_cast<char>(escaped_ch));
-          } else {
-            error.Printf("error: wide character support is needed for unicode "
-                         "character 0x%4.4x at offset %" PRIu64,
-                         escaped_ch, start_index);
-            value = std::move(error.GetString());
-            return Token::Status;
-          }
-        } else if (is_end_quote) {
-          return Token::String;
-        } else if (is_null) {
-          value = "error: missing end quote for string";
-          return Token::Status;
-        }
-      }
-    }
-  } break;
-
-  case '-':
-  case '0':
-  case '1':
-  case '2':
-  case '3':
-  case '4':
-  case '5':
-  case '6':
-  case '7':
-  case '8':
-  case '9': {
-    bool done = false;
-    bool got_decimal_point = false;
-    uint64_t exp_index = 0;
-    bool got_int_digits = (ch >= '0') && (ch <= '9');
-    bool got_frac_digits = false;
-    bool got_exp_digits = false;
-    while (!done) {
-      const char next_ch = PeekChar();
-      switch (next_ch) {
-      case '0':
-      case '1':
-      case '2':
-      case '3':
-      case '4':
-      case '5':
-      case '6':
-      case '7':
-      case '8':
-      case '9':
-        if (exp_index != 0) {
-          got_exp_digits = true;
-        } else if (got_decimal_point) {
-          got_frac_digits = true;
-        } else {
-          got_int_digits = true;
-        }
-        ++m_index; // Skip this character
-        break;
-
-      case '.':
-        if (got_decimal_point) {
-          error.Printf("error: extra decimal point found at offset %" PRIu64,
-                       start_index);
-          value = std::move(error.GetString());
-          return Token::Status;
-        } else {
-          got_decimal_point = true;
-          ++m_index; // Skip this character
-        }
-        break;
-
-      case 'e':
-      case 'E':
-        if (exp_index != 0) {
-          error.Printf(
-              "error: extra exponent character found at offset %" PRIu64,
-              start_index);
-          value = std::move(error.GetString());
-          return Token::Status;
-        } else {
-          exp_index = m_index;
-          ++m_index; // Skip this character
-        }
-        break;
-
-      case '+':
-      case '-':
-        // The '+' and '-' can only come after an exponent character...
-        if (exp_index == m_index - 1) {
-          ++m_index; // Skip the exponent sign character
-        } else {
-          error.Printf("error: unexpected %c character at offset %" PRIu64,
-                       next_ch, start_index);
-          value = std::move(error.GetString());
-          return Token::Status;
-        }
-        break;
-
-      default:
-        done = true;
-        break;
-      }
-    }
-
-    if (m_index > start_index) {
-      value = m_packet.substr(start_index, m_index - start_index);
-      if (got_decimal_point) {
-        if (exp_index != 0) {
-          // We have an exponent, make sure we got exponent digits
-          if (got_exp_digits) {
-            return Token::Float;
-          } else {
-            error.Printf("error: got exponent character but no exponent digits "
-                         "at offset in float value \"%s\"",
-                         value.c_str());
-            value = std::move(error.GetString());
-            return Token::Status;
-          }
-        } else {
-          // No exponent, but we need at least one decimal after the decimal
-          // point
-          if (got_frac_digits) {
-            return Token::Float;
-          } else {
-            error.Printf("error: no digits after decimal point \"%s\"",
-                         value.c_str());
-            value = std::move(error.GetString());
-            return Token::Status;
-          }
-        }
-      } else {
-        // No decimal point
-        if (got_int_digits) {
-          // We need at least some integer digits to make an integer
-          return Token::Integer;
-        } else {
-          error.Printf("error: no digits negate sign \"%s\"", value.c_str());
-          value = std::move(error.GetString());
-          return Token::Status;
-        }
-      }
-    } else {
-      error.Printf("error: invalid number found at offset %" PRIu64,
-                   start_index);
-      value = std::move(error.GetString());
-      return Token::Status;
-    }
-  } break;
-  default:
-    break;
-  }
-  error.Printf("error: failed to parse token at offset %" PRIu64
-               " (around character '%c')",
-               start_index, ch);
-  value = std::move(error.GetString());
-  return Token::Status;
-}
-
-int JSONParser::GetEscapedChar(bool &was_escaped) {
-  was_escaped = false;
-  const char ch = GetChar();
-  if (ch == '\\') {
-    was_escaped = true;
-    const char ch2 = GetChar();
-    switch (ch2) {
-    case '"':
-    case '\\':
-    case '/':
-    default:
-      break;
-
-    case 'b':
-      return '\b';
-    case 'f':
-      return '\f';
-    case 'n':
-      return '\n';
-    case 'r':
-      return '\r';
-    case 't':
-      return '\t';
-    case 'u': {
-      const int hi_byte = DecodeHexU8();
-      const int lo_byte = DecodeHexU8();
-      if (hi_byte >= 0 && lo_byte >= 0)
-        return hi_byte << 8 | lo_byte;
-      return -1;
-    } break;
-    }
-    return ch2;
-  }
-  return ch;
-}
-
-JSONValue::SP JSONParser::ParseJSONObject() {
-  // The "JSONParser::Token::ObjectStart" token should have already been
-  // consumed by the time this function is called
-  std::unique_ptr<JSONObject> dict_up(new JSONObject());
-
-  std::string value;
-  std::string key;
-  while (true) {
-    JSONParser::Token token = GetToken(value);
-
-    if (token == JSONParser::Token::String) {
-      key.swap(value);
-      token = GetToken(value);
-      if (token == JSONParser::Token::Colon) {
-        JSONValue::SP value_sp = ParseJSONValue();
-        if (value_sp)
-          dict_up->SetObject(key, value_sp);
-        else
-          break;
-      }
-    } else if (token == JSONParser::Token::ObjectEnd) {
-      return JSONValue::SP(dict_up.release());
-    } else if (token == JSONParser::Token::Comma) {
-      continue;
-    } else {
-      break;
-    }
-  }
-  return JSONValue::SP();
-}
-
-JSONValue::SP JSONParser::ParseJSONArray() {
-  // The "JSONParser::Token::ObjectStart" token should have already been
-  // consumed by the time this function is called
-  std::unique_ptr<JSONArray> array_up(new JSONArray());
-
-  std::string value;
-  std::string key;
-  while (true) {
-    JSONValue::SP value_sp = ParseJSONValue();
-    if (value_sp)
-      array_up->AppendObject(value_sp);
-    else
-      break;
-
-    JSONParser::Token token = GetToken(value);
-    if (token == JSONParser::Token::Comma) {
-      continue;
-    } else if (token == JSONParser::Token::ArrayEnd) {
-      return JSONValue::SP(array_up.release());
-    } else {
-      break;
-    }
-  }
-  return JSONValue::SP();
-}
-
-JSONValue::SP JSONParser::ParseJSONValue() {
-  std::string value;
-  const JSONParser::Token token = GetToken(value);
-  switch (token) {
-  case JSONParser::Token::ObjectStart:
-    return ParseJSONObject();
-
-  case JSONParser::Token::ArrayStart:
-    return ParseJSONArray();
-
-  case JSONParser::Token::Integer: {
-    if (value.front() == '-') {
-      int64_t sval = 0;
-      if (!llvm::StringRef(value).getAsInteger(0, sval))
-        return JSONValue::SP(new JSONNumber(sval));
-    } else {
-      uint64_t uval = 0;
-      if (!llvm::StringRef(value).getAsInteger(0, uval))
-        return JSONValue::SP(new JSONNumber(uval));
-    }
-  } break;
-
-  case JSONParser::Token::Float: {
-    double D;
-    if (!llvm::StringRef(value).getAsDouble(D))
-      return JSONValue::SP(new JSONNumber(D));
-  } break;
-
-  case JSONParser::Token::String:
-    return JSONValue::SP(new JSONString(value));
-
-  case JSONParser::Token::True:
-    return JSONValue::SP(new JSONTrue());
-
-  case JSONParser::Token::False:
-    return JSONValue::SP(new JSONFalse());
-
-  case JSONParser::Token::Null:
-    return JSONValue::SP(new JSONNull());
-
-  default:
-    break;
-  }
-  return JSONValue::SP();
-}
diff --git a/src/llvm-project/lldb/source/Utility/LLDBAssert.cpp b/src/llvm-project/lldb/source/Utility/LLDBAssert.cpp
index 75530d8..361d6d0 100644
--- a/src/llvm-project/lldb/source/Utility/LLDBAssert.cpp
+++ b/src/llvm-project/lldb/source/Utility/LLDBAssert.cpp
@@ -21,10 +21,10 @@
   if (LLVM_LIKELY(expression))
     return;
 
-  // In a Debug configuration lldb_assert() behaves like assert(0).
-  llvm_unreachable("lldb_assert failed");
+  // If asserts are enabled abort here.
+  assert(false && "lldb_assert failed");
 
-  // In a Release configuration it will print a warning and encourage the user
+  // In a release configuration it will print a warning and encourage the user
   // to file a bug report, similar to LLVM’s crash handler, and then return
   // execution.
   errs() << format("Assertion failed: (%s), function %s, file %s, line %u\n",
diff --git a/src/llvm-project/lldb/source/Utility/Listener.cpp b/src/llvm-project/lldb/source/Utility/Listener.cpp
index 50c5640..c2e537b 100644
--- a/src/llvm-project/lldb/source/Utility/Listener.cpp
+++ b/src/llvm-project/lldb/source/Utility/Listener.cpp
@@ -42,8 +42,8 @@
       m_events_mutex() {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OBJECT));
   if (log != nullptr)
-    log->Printf("%p Listener::Listener('%s')", static_cast<void *>(this),
-                m_name.c_str());
+    LLDB_LOGF(log, "%p Listener::Listener('%s')", static_cast<void *>(this),
+              m_name.c_str());
 }
 
 Listener::~Listener() {
@@ -51,9 +51,8 @@
 
   Clear();
 
-  if (log)
-    log->Printf("%p Listener::%s('%s')", static_cast<void *>(this),
-                __FUNCTION__, m_name.c_str());
+  LLDB_LOGF(log, "%p Listener::%s('%s')", static_cast<void *>(this),
+            __FUNCTION__, m_name.c_str());
 }
 
 void Listener::Clear() {
@@ -78,9 +77,8 @@
       manager_sp->RemoveListener(this);
   }
 
-  if (log)
-    log->Printf("%p Listener::%s('%s')", static_cast<void *>(this),
-                __FUNCTION__, m_name.c_str());
+  LLDB_LOGF(log, "%p Listener::%s('%s')", static_cast<void *>(this),
+            __FUNCTION__, m_name.c_str());
 }
 
 uint32_t Listener::StartListeningForEvents(Broadcaster *broadcaster,
@@ -101,10 +99,11 @@
 
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS));
     if (log != nullptr)
-      log->Printf("%p Listener::StartListeningForEvents (broadcaster = %p, "
-                  "mask = 0x%8.8x) acquired_mask = 0x%8.8x for %s",
-                  static_cast<void *>(this), static_cast<void *>(broadcaster),
-                  event_mask, acquired_mask, m_name.c_str());
+      LLDB_LOGF(log,
+                "%p Listener::StartListeningForEvents (broadcaster = %p, "
+                "mask = 0x%8.8x) acquired_mask = 0x%8.8x for %s",
+                static_cast<void *>(this), static_cast<void *>(broadcaster),
+                event_mask, acquired_mask, m_name.c_str());
 
     return acquired_mask;
   }
@@ -132,12 +131,13 @@
     Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS));
     if (log != nullptr) {
       void **pointer = reinterpret_cast<void **>(&callback);
-      log->Printf("%p Listener::StartListeningForEvents (broadcaster = %p, "
-                  "mask = 0x%8.8x, callback = %p, user_data = %p) "
-                  "acquired_mask = 0x%8.8x for %s",
-                  static_cast<void *>(this), static_cast<void *>(broadcaster),
-                  event_mask, *pointer, static_cast<void *>(callback_user_data),
-                  acquired_mask, m_name.c_str());
+      LLDB_LOGF(log,
+                "%p Listener::StartListeningForEvents (broadcaster = %p, "
+                "mask = 0x%8.8x, callback = %p, user_data = %p) "
+                "acquired_mask = 0x%8.8x for %s",
+                static_cast<void *>(this), static_cast<void *>(broadcaster),
+                event_mask, *pointer, static_cast<void *>(callback_user_data),
+                acquired_mask, m_name.c_str());
     }
 
     return acquired_mask;
@@ -202,9 +202,9 @@
 void Listener::AddEvent(EventSP &event_sp) {
   Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS));
   if (log != nullptr)
-    log->Printf("%p Listener('%s')::AddEvent (event_sp = {%p})",
-                static_cast<void *>(this), m_name.c_str(),
-                static_cast<void *>(event_sp.get()));
+    LLDB_LOGF(log, "%p Listener('%s')::AddEvent (event_sp = {%p})",
+              static_cast<void *>(this), m_name.c_str(),
+              static_cast<void *>(event_sp.get()));
 
   std::lock_guard<std::mutex> guard(m_events_mutex);
   m_events.push_back(event_sp);
@@ -290,14 +290,15 @@
     event_sp = *pos;
 
     if (log != nullptr)
-      log->Printf("%p '%s' Listener::FindNextEventInternal(broadcaster=%p, "
-                  "broadcaster_names=%p[%u], event_type_mask=0x%8.8x, "
-                  "remove=%i) event %p",
-                  static_cast<void *>(this), GetName(),
-                  static_cast<void *>(broadcaster),
-                  static_cast<const void *>(broadcaster_names),
-                  num_broadcaster_names, event_type_mask, remove,
-                  static_cast<void *>(event_sp.get()));
+      LLDB_LOGF(log,
+                "%p '%s' Listener::FindNextEventInternal(broadcaster=%p, "
+                "broadcaster_names=%p[%u], event_type_mask=0x%8.8x, "
+                "remove=%i) event %p",
+                static_cast<void *>(this), GetName(),
+                static_cast<void *>(broadcaster),
+                static_cast<const void *>(broadcaster_names),
+                num_broadcaster_names, event_type_mask, remove,
+                static_cast<void *>(event_sp.get()));
 
     if (remove) {
       m_events.erase(pos);
@@ -366,15 +367,13 @@
 
       if (result == std::cv_status::timeout) {
         log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS);
-        if (log)
-          log->Printf("%p Listener::GetEventInternal() timed out for %s",
-                      static_cast<void *>(this), m_name.c_str());
+        LLDB_LOGF(log, "%p Listener::GetEventInternal() timed out for %s",
+                  static_cast<void *>(this), m_name.c_str());
         return false;
       } else if (result != std::cv_status::no_timeout) {
         log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_EVENTS);
-        if (log)
-          log->Printf("%p Listener::GetEventInternal() unknown error for %s",
-                      static_cast<void *>(this), m_name.c_str());
+        LLDB_LOGF(log, "%p Listener::GetEventInternal() unknown error for %s",
+                  static_cast<void *>(this), m_name.c_str());
         return false;
       }
     }
diff --git a/src/llvm-project/lldb/source/Utility/Log.cpp b/src/llvm-project/lldb/source/Utility/Log.cpp
index 217b0d2..ab5e630 100644
--- a/src/llvm-project/lldb/source/Utility/Log.cpp
+++ b/src/llvm-project/lldb/source/Utility/Log.cpp
@@ -9,7 +9,6 @@
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/VASPrintf.h"
 
-#include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/ADT/iterator.h"
@@ -38,13 +37,22 @@
 
 llvm::ManagedStatic<Log::ChannelMap> Log::g_channel_map;
 
-void Log::ListCategories(llvm::raw_ostream &stream, const ChannelMap::value_type &entry) {
-  stream << llvm::formatv("Logging categories for '{0}':\n", entry.first());
-  stream << "  all - all available logging categories\n";
-  stream << "  default - default set of logging categories\n";
+void Log::ForEachCategory(
+    const Log::ChannelMap::value_type &entry,
+    llvm::function_ref<void(llvm::StringRef, llvm::StringRef)> lambda) {
+  lambda("all", "all available logging categories");
+  lambda("default", "default set of logging categories");
   for (const auto &category : entry.second.m_channel.categories)
-    stream << llvm::formatv("  {0} - {1}\n", category.name,
-                            category.description);
+    lambda(category.name, category.description);
+}
+
+void Log::ListCategories(llvm::raw_ostream &stream,
+                         const ChannelMap::value_type &entry) {
+  stream << llvm::formatv("Logging categories for '{0}':\n", entry.first());
+  ForEachCategory(entry,
+                  [&stream](llvm::StringRef name, llvm::StringRef description) {
+                    stream << llvm::formatv("  {0} - {1}\n", name, description);
+                  });
 }
 
 uint32_t Log::GetFlags(llvm::raw_ostream &stream, const ChannelMap::value_type &entry,
@@ -237,6 +245,23 @@
     entry.second.Disable(UINT32_MAX);
 }
 
+void Log::ForEachChannelCategory(
+    llvm::StringRef channel,
+    llvm::function_ref<void(llvm::StringRef, llvm::StringRef)> lambda) {
+  auto ch = g_channel_map->find(channel);
+  if (ch == g_channel_map->end())
+    return;
+
+  ForEachCategory(*ch, lambda);
+}
+
+std::vector<llvm::StringRef> Log::ListChannels() {
+  std::vector<llvm::StringRef> result;
+  for (const auto &channel : *g_channel_map)
+    result.push_back(channel.first());
+  return result;
+}
+
 void Log::ListAllLogChannels(llvm::raw_ostream &stream) {
   if (g_channel_map->empty()) {
     stream << "No logging channels are currently registered.\n";
diff --git a/src/llvm-project/lldb/source/Utility/Logging.cpp b/src/llvm-project/lldb/source/Utility/Logging.cpp
index c0856e5..22f3819 100644
--- a/src/llvm-project/lldb/source/Utility/Logging.cpp
+++ b/src/llvm-project/lldb/source/Utility/Logging.cpp
@@ -62,13 +62,3 @@
 Log *lldb_private::GetLogIfAnyCategoriesSet(uint32_t mask) {
   return g_log_channel.GetLogIfAny(mask);
 }
-
-
-void lldb_private::LogIfAnyCategoriesSet(uint32_t mask, const char *format, ...) {
-  if (Log *log = GetLogIfAnyCategoriesSet(mask)) {
-    va_list args;
-    va_start(args, format);
-    log->VAPrintf(format, args);
-    va_end(args);
-  }
-}
diff --git a/src/llvm-project/lldb/source/Utility/PPC64LE_ehframe_Registers.h b/src/llvm-project/lldb/source/Utility/PPC64LE_ehframe_Registers.h
deleted file mode 100644
index 77cb3e5..0000000
--- a/src/llvm-project/lldb/source/Utility/PPC64LE_ehframe_Registers.h
+++ /dev/null
@@ -1,193 +0,0 @@
-//===-- PPC64LE_ehframe_Registers.h -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef utility_PPC64LE_ehframe_Registers_h_
-#define utility_PPC64LE_ehframe_Registers_h_
-
-// The register numbers used in the eh_frame unwind information.
-// Should be the same as DWARF register numbers.
-
-namespace ppc64le_ehframe {
-
-enum {
-  r0 = 0,
-  r1,
-  r2,
-  r3,
-  r4,
-  r5,
-  r6,
-  r7,
-  r8,
-  r9,
-  r10,
-  r11,
-  r12,
-  r13,
-  r14,
-  r15,
-  r16,
-  r17,
-  r18,
-  r19,
-  r20,
-  r21,
-  r22,
-  r23,
-  r24,
-  r25,
-  r26,
-  r27,
-  r28,
-  r29,
-  r30,
-  r31,
-  f0,
-  f1,
-  f2,
-  f3,
-  f4,
-  f5,
-  f6,
-  f7,
-  f8,
-  f9,
-  f10,
-  f11,
-  f12,
-  f13,
-  f14,
-  f15,
-  f16,
-  f17,
-  f18,
-  f19,
-  f20,
-  f21,
-  f22,
-  f23,
-  f24,
-  f25,
-  f26,
-  f27,
-  f28,
-  f29,
-  f30,
-  f31,
-  lr = 65,
-  ctr,
-  cr = 68,
-  xer = 76,
-  vr0,
-  vr1,
-  vr2,
-  vr3,
-  vr4,
-  vr5,
-  vr6,
-  vr7,
-  vr8,
-  vr9,
-  vr10,
-  vr11,
-  vr12,
-  vr13,
-  vr14,
-  vr15,
-  vr16,
-  vr17,
-  vr18,
-  vr19,
-  vr20,
-  vr21,
-  vr22,
-  vr23,
-  vr24,
-  vr25,
-  vr26,
-  vr27,
-  vr28,
-  vr29,
-  vr30,
-  vr31,
-  vscr = 110,
-  vrsave = 117,
-  pc,
-  softe,
-  trap,
-  origr3,
-  fpscr,
-  msr,
-  vs0,
-  vs1,
-  vs2,
-  vs3,
-  vs4,
-  vs5,
-  vs6,
-  vs7,
-  vs8,
-  vs9,
-  vs10,
-  vs11,
-  vs12,
-  vs13,
-  vs14,
-  vs15,
-  vs16,
-  vs17,
-  vs18,
-  vs19,
-  vs20,
-  vs21,
-  vs22,
-  vs23,
-  vs24,
-  vs25,
-  vs26,
-  vs27,
-  vs28,
-  vs29,
-  vs30,
-  vs31,
-  vs32,
-  vs33,
-  vs34,
-  vs35,
-  vs36,
-  vs37,
-  vs38,
-  vs39,
-  vs40,
-  vs41,
-  vs42,
-  vs43,
-  vs44,
-  vs45,
-  vs46,
-  vs47,
-  vs48,
-  vs49,
-  vs50,
-  vs51,
-  vs52,
-  vs53,
-  vs54,
-  vs55,
-  vs56,
-  vs57,
-  vs58,
-  vs59,
-  vs60,
-  vs61,
-  vs62,
-  vs63,
-};
-}
-
-#endif // utility_PPC64LE_ehframe_Registers_h_
diff --git a/src/llvm-project/lldb/source/Utility/ProcessInfo.cpp b/src/llvm-project/lldb/source/Utility/ProcessInfo.cpp
index b67ae87..b159e26 100644
--- a/src/llvm-project/lldb/source/Utility/ProcessInfo.cpp
+++ b/src/llvm-project/lldb/source/Utility/ProcessInfo.cpp
@@ -42,14 +42,14 @@
   return m_executable.GetFilename().GetCString();
 }
 
-size_t ProcessInfo::GetNameLength() const {
-  return m_executable.GetFilename().GetLength();
+llvm::StringRef ProcessInfo::GetNameAsStringRef() const {
+  return m_executable.GetFilename().GetStringRef();
 }
 
 void ProcessInfo::Dump(Stream &s, Platform *platform) const {
   s << "Executable: " << GetName() << "\n";
   s << "Triple: ";
-  m_arch.DumpTriple(s);
+  m_arch.DumpTriple(s.AsRawOstream());
   s << "\n";
 
   s << "Arguments:\n";
@@ -119,7 +119,7 @@
   if (m_executable) {
     s.Printf("   name = %s\n", m_executable.GetFilename().GetCString());
     s.PutCString("   file = ");
-    m_executable.Dump(&s);
+    m_executable.Dump(s.AsRawOstream());
     s.EOL();
   }
   const uint32_t argc = m_arguments.GetArgumentCount();
@@ -137,7 +137,7 @@
 
   if (m_arch.IsValid()) {
     s.Printf("   arch = ");
-    m_arch.DumpTriple(s);
+    m_arch.DumpTriple(s.AsRawOstream());
     s.EOL();
   }
 
@@ -169,13 +169,15 @@
 
   if (verbose) {
     s.Printf("PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE "
-             "                  %s\n",
+             "                        %s\n",
              label);
-    s.PutCString("====== ====== ========== ========== ========== ========== "
-                 "======================== ============================\n");
+    s.PutCString(
+        "====== ====== ========== ========== ========== ========== "
+        "============================== ============================\n");
   } else {
-    s.Printf("PID    PARENT USER       TRIPLE                   %s\n", label);
-    s.PutCString("====== ====== ========== ======================== "
+    s.Printf("PID    PARENT USER       TRIPLE                         %s\n",
+             label);
+    s.PutCString("====== ====== ========== ============================== "
                  "============================\n");
   }
 }
@@ -187,36 +189,49 @@
 
     StreamString arch_strm;
     if (m_arch.IsValid())
-      m_arch.DumpTriple(arch_strm);
+      m_arch.DumpTriple(arch_strm.AsRawOstream());
 
-    auto print = [&](UserIDResolver::id_t id,
-                     llvm::Optional<llvm::StringRef> (UserIDResolver::*get)(
+    auto print = [&](bool (ProcessInstanceInfo::*isValid)() const,
+                     uint32_t (ProcessInstanceInfo::*getID)() const,
+                     llvm::Optional<llvm::StringRef> (UserIDResolver::*getName)(
                          UserIDResolver::id_t id)) {
-      if (auto name = (resolver.*get)(id))
-        s.Format("{0,-10} ", *name);
+      const char *format = "{0,-10} ";
+      if (!(this->*isValid)()) {
+        s.Format(format, "");
+        return;
+      }
+      uint32_t id = (this->*getID)();
+      if (auto name = (resolver.*getName)(id))
+        s.Format(format, *name);
       else
-        s.Format("{0,-10} ", id);
+        s.Format(format, id);
     };
     if (verbose) {
-      print(m_uid, &UserIDResolver::GetUserName);
-      print(m_gid, &UserIDResolver::GetGroupName);
-      print(m_euid, &UserIDResolver::GetUserName);
-      print(m_egid, &UserIDResolver::GetGroupName);
+      print(&ProcessInstanceInfo::UserIDIsValid,
+            &ProcessInstanceInfo::GetUserID, &UserIDResolver::GetUserName);
+      print(&ProcessInstanceInfo::GroupIDIsValid,
+            &ProcessInstanceInfo::GetGroupID, &UserIDResolver::GetGroupName);
+      print(&ProcessInstanceInfo::EffectiveUserIDIsValid,
+            &ProcessInstanceInfo::GetEffectiveUserID,
+            &UserIDResolver::GetUserName);
+      print(&ProcessInstanceInfo::EffectiveGroupIDIsValid,
+            &ProcessInstanceInfo::GetEffectiveGroupID,
+            &UserIDResolver::GetGroupName);
 
-      s.Printf("%-24s ", arch_strm.GetData());
+      s.Printf("%-30s ", arch_strm.GetData());
     } else {
-      print(m_euid, &UserIDResolver::GetUserName);
-      s.Printf(" %-24s ", arch_strm.GetData());
+      print(&ProcessInstanceInfo::EffectiveUserIDIsValid,
+            &ProcessInstanceInfo::GetEffectiveUserID,
+            &UserIDResolver::GetUserName);
+      s.Printf("%-30s ", arch_strm.GetData());
     }
 
     if (verbose || show_args) {
+      s.PutCString(m_arg0);
       const uint32_t argc = m_arguments.GetArgumentCount();
-      if (argc > 0) {
-        for (uint32_t i = 0; i < argc; i++) {
-          if (i > 0)
-            s.PutChar(' ');
-          s.PutCString(m_arguments.GetArgumentAtIndex(i));
-        }
+      for (uint32_t i = 0; i < argc; i++) {
+        s.PutChar(' ');
+        s.PutCString(m_arguments.GetArgumentAtIndex(i));
       }
     } else {
       s.PutCString(GetName());
@@ -226,8 +241,14 @@
   }
 }
 
+bool ProcessInstanceInfoMatch::ArchitectureMatches(
+    const ArchSpec &arch_spec) const {
+  return !m_match_info.GetArchitecture().IsValid() ||
+         m_match_info.GetArchitecture().IsCompatibleMatch(arch_spec);
+}
+
 bool ProcessInstanceInfoMatch::NameMatches(const char *process_name) const {
-  if (m_name_match_type == NameMatch::Ignore || process_name == nullptr)
+  if (m_name_match_type == NameMatch::Ignore)
     return true;
   const char *match_name = m_match_info.GetName();
   if (!match_name)
@@ -236,11 +257,8 @@
   return lldb_private::NameMatches(process_name, m_name_match_type, match_name);
 }
 
-bool ProcessInstanceInfoMatch::Matches(
+bool ProcessInstanceInfoMatch::ProcessIDsMatch(
     const ProcessInstanceInfo &proc_info) const {
-  if (!NameMatches(proc_info.GetName()))
-    return false;
-
   if (m_match_info.ProcessIDIsValid() &&
       m_match_info.GetProcessID() != proc_info.GetProcessID())
     return false;
@@ -248,7 +266,11 @@
   if (m_match_info.ParentProcessIDIsValid() &&
       m_match_info.GetParentProcessID() != proc_info.GetParentProcessID())
     return false;
+  return true;
+}
 
+bool ProcessInstanceInfoMatch::UserIDsMatch(
+    const ProcessInstanceInfo &proc_info) const {
   if (m_match_info.UserIDIsValid() &&
       m_match_info.GetUserID() != proc_info.GetUserID())
     return false;
@@ -264,13 +286,14 @@
   if (m_match_info.EffectiveGroupIDIsValid() &&
       m_match_info.GetEffectiveGroupID() != proc_info.GetEffectiveGroupID())
     return false;
-
-  if (m_match_info.GetArchitecture().IsValid() &&
-      !m_match_info.GetArchitecture().IsCompatibleMatch(
-          proc_info.GetArchitecture()))
-    return false;
   return true;
 }
+bool ProcessInstanceInfoMatch::Matches(
+    const ProcessInstanceInfo &proc_info) const {
+  return ArchitectureMatches(proc_info.GetArchitecture()) &&
+         ProcessIDsMatch(proc_info) && UserIDsMatch(proc_info) &&
+         NameMatches(proc_info.GetName());
+}
 
 bool ProcessInstanceInfoMatch::MatchAllProcesses() const {
   if (m_name_match_type != NameMatch::Ignore)
diff --git a/src/llvm-project/lldb/source/Utility/RegisterValue.cpp b/src/llvm-project/lldb/source/Utility/RegisterValue.cpp
index a01c35a..36790f5 100644
--- a/src/llvm-project/lldb/source/Utility/RegisterValue.cpp
+++ b/src/llvm-project/lldb/source/Utility/RegisterValue.cpp
@@ -8,7 +8,6 @@
 
 #include "lldb/Utility/RegisterValue.h"
 
-#include "lldb/Utility/Args.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Scalar.h"
 #include "lldb/Utility/Status.h"
@@ -330,6 +329,35 @@
   return true;
 }
 
+static bool UInt64ValueIsValidForByteSize(uint64_t uval64,
+                                          size_t total_byte_size) {
+  if (total_byte_size > 8)
+    return false;
+
+  if (total_byte_size == 8)
+    return true;
+
+  const uint64_t max =
+      (static_cast<uint64_t>(1) << static_cast<uint64_t>(total_byte_size * 8)) -
+      1;
+  return uval64 <= max;
+}
+
+static bool SInt64ValueIsValidForByteSize(int64_t sval64,
+                                          size_t total_byte_size) {
+  if (total_byte_size > 8)
+    return false;
+
+  if (total_byte_size == 8)
+    return true;
+
+  const int64_t max = (static_cast<int64_t>(1)
+                       << static_cast<uint64_t>(total_byte_size * 8 - 1)) -
+                      1;
+  const int64_t min = ~(max);
+  return min <= sval64 && sval64 <= max;
+}
+
 Status RegisterValue::SetValueFromString(const RegisterInfo *reg_info,
                                          llvm::StringRef value_str) {
   Status error;
@@ -368,7 +396,7 @@
       break;
     }
 
-    if (!Args::UInt64ValueIsValidForByteSize(uval64, byte_size)) {
+    if (!UInt64ValueIsValidForByteSize(uval64, byte_size)) {
       error.SetErrorStringWithFormat(
           "value 0x%" PRIx64
           " is too large to fit in a %u byte unsigned integer value",
@@ -397,7 +425,7 @@
       break;
     }
 
-    if (!Args::SInt64ValueIsValidForByteSize(ival64, byte_size)) {
+    if (!SInt64ValueIsValidForByteSize(ival64, byte_size)) {
       error.SetErrorStringWithFormat(
           "value 0x%" PRIx64
           " is too large to fit in a %u byte signed integer value",
diff --git a/src/llvm-project/lldb/source/Utility/RegularExpression.cpp b/src/llvm-project/lldb/source/Utility/RegularExpression.cpp
index 0192e8b..fd9d963 100644
--- a/src/llvm-project/lldb/source/Utility/RegularExpression.cpp
+++ b/src/llvm-project/lldb/source/Utility/RegularExpression.cpp
@@ -8,168 +8,34 @@
 
 #include "lldb/Utility/RegularExpression.h"
 
-#include "llvm/ADT/StringRef.h"
-
 #include <string>
 
-// Enable enhanced mode if it is available. This allows for things like \d for
-// digit, \s for space, and many more, but it isn't available everywhere.
-#if defined(REG_ENHANCED)
-#define DEFAULT_COMPILE_FLAGS (REG_ENHANCED | REG_EXTENDED)
-#else
-#define DEFAULT_COMPILE_FLAGS (REG_EXTENDED)
-#endif
-
 using namespace lldb_private;
 
-RegularExpression::RegularExpression() : m_re(), m_comp_err(1), m_preg() {
-  memset(&m_preg, 0, sizeof(m_preg));
-}
-
-// Constructor that compiles "re" using "flags" and stores the resulting
-// compiled regular expression into this object.
 RegularExpression::RegularExpression(llvm::StringRef str)
-    : RegularExpression() {
-  Compile(str);
-}
+    : m_regex_text(str),
+      // m_regex does not reference str anymore after it is constructed.
+      m_regex(llvm::Regex(str)) {}
 
 RegularExpression::RegularExpression(const RegularExpression &rhs)
-    : RegularExpression() {
-  Compile(rhs.GetText());
-}
+    : RegularExpression(rhs.GetText()) {}
 
-const RegularExpression &RegularExpression::
-operator=(const RegularExpression &rhs) {
-  if (&rhs != this)
-    Compile(rhs.GetText());
-  return *this;
-}
-
-// Destructor
-//
-// Any previously compiled regular expression contained in this object will be
-// freed.
-RegularExpression::~RegularExpression() { Free(); }
-
-// Compile a regular expression using the supplied regular expression text and
-// flags. The compiled regular expression lives in this object so that it can
-// be readily used for regular expression matches. Execute() can be called
-// after the regular expression is compiled. Any previously compiled regular
-// expression contained in this object will be freed.
-//
-// RETURNS
-//  True if the regular expression compiles successfully, false
-//  otherwise.
-bool RegularExpression::Compile(llvm::StringRef str) {
-  Free();
-
-  // regcomp() on darwin does not recognize "" as a valid regular expression,
-  // so we substitute it with an equivalent non-empty one.
-  m_re = str.empty() ? "()" : str;
-  m_comp_err = ::regcomp(&m_preg, m_re.c_str(), DEFAULT_COMPILE_FLAGS);
-  return m_comp_err == 0;
-}
-
-// Execute a regular expression match using the compiled regular expression
-// that is already in this object against the match string "s". If any parens
-// are used for regular expression matches "match_count" should indicate the
-// number of regmatch_t values that are present in "match_ptr". The regular
-// expression will be executed using the "execute_flags".
-bool RegularExpression::Execute(llvm::StringRef str, Match *match) const {
-  int err = 1;
-  if (m_comp_err == 0) {
-    // Argument to regexec must be null-terminated.
-    std::string reg_str = str;
-    if (match) {
-      err = ::regexec(&m_preg, reg_str.c_str(), match->GetSize(),
-                      match->GetData(), 0);
-    } else {
-      err = ::regexec(&m_preg, reg_str.c_str(), 0, nullptr, 0);
-    }
-  }
-
-  if (err != 0) {
-    // The regular expression didn't compile, so clear the matches
-    if (match)
-      match->Clear();
+bool RegularExpression::Execute(
+    llvm::StringRef str,
+    llvm::SmallVectorImpl<llvm::StringRef> *matches) const {
+  if (!IsValid())
     return false;
-  }
-  return true;
+  return m_regex.match(str, matches);
 }
 
-bool RegularExpression::Match::GetMatchAtIndex(llvm::StringRef s, uint32_t idx,
-                                               std::string &match_str) const {
-  llvm::StringRef match_str_ref;
-  if (GetMatchAtIndex(s, idx, match_str_ref)) {
-    match_str = match_str_ref.str();
-    return true;
-  }
-  return false;
-}
+bool RegularExpression::IsValid() const { return m_regex.isValid(); }
 
-bool RegularExpression::Match::GetMatchAtIndex(
-    llvm::StringRef s, uint32_t idx, llvm::StringRef &match_str) const {
-  if (idx < m_matches.size()) {
-    if (m_matches[idx].rm_eo == -1 && m_matches[idx].rm_so == -1)
-      return false;
+llvm::StringRef RegularExpression::GetText() const { return m_regex_text; }
 
-    if (m_matches[idx].rm_eo == m_matches[idx].rm_so) {
-      // Matched the empty string...
-      match_str = llvm::StringRef();
-      return true;
-    } else if (m_matches[idx].rm_eo > m_matches[idx].rm_so) {
-      match_str = s.substr(m_matches[idx].rm_so,
-                           m_matches[idx].rm_eo - m_matches[idx].rm_so);
-      return true;
-    }
-  }
-  return false;
-}
-
-bool RegularExpression::Match::GetMatchSpanningIndices(
-    llvm::StringRef s, uint32_t idx1, uint32_t idx2,
-    llvm::StringRef &match_str) const {
-  if (idx1 < m_matches.size() && idx2 < m_matches.size()) {
-    if (m_matches[idx1].rm_so == m_matches[idx2].rm_eo) {
-      // Matched the empty string...
-      match_str = llvm::StringRef();
-      return true;
-    } else if (m_matches[idx1].rm_so < m_matches[idx2].rm_eo) {
-      match_str = s.substr(m_matches[idx1].rm_so,
-                           m_matches[idx2].rm_eo - m_matches[idx1].rm_so);
-      return true;
-    }
-  }
-  return false;
-}
-
-// Returns true if the regular expression compiled and is ready for execution.
-bool RegularExpression::IsValid() const { return m_comp_err == 0; }
-
-// Returns the text that was used to compile the current regular expression.
-llvm::StringRef RegularExpression::GetText() const { return m_re; }
-
-// Free any contained compiled regular expressions.
-void RegularExpression::Free() {
-  if (m_comp_err == 0) {
-    m_re.clear();
-    regfree(&m_preg);
-    // Set a compile error since we no longer have a valid regex
-    m_comp_err = 1;
-  }
-}
-
-size_t RegularExpression::GetErrorAsCString(char *err_str,
-                                            size_t err_str_max_len) const {
-  if (m_comp_err == 0) {
-    if (err_str && err_str_max_len)
-      *err_str = '\0';
-    return 0;
-  }
-
-  return ::regerror(m_comp_err, &m_preg, err_str, err_str_max_len);
-}
-
-bool RegularExpression::operator<(const RegularExpression &rhs) const {
-  return (m_re < rhs.m_re);
+llvm::Error RegularExpression::GetError() const {
+  std::string error;
+  if (!m_regex.isValid(error))
+    return llvm::make_error<llvm::StringError>(llvm::inconvertibleErrorCode(),
+                                               error);
+  return llvm::Error::success();
 }
diff --git a/src/llvm-project/lldb/source/Utility/Reproducer.cpp b/src/llvm-project/lldb/source/Utility/Reproducer.cpp
index 479ed31..b11e1a5 100644
--- a/src/llvm-project/lldb/source/Utility/Reproducer.cpp
+++ b/src/llvm-project/lldb/source/Utility/Reproducer.cpp
@@ -25,6 +25,16 @@
   lldbassert(!InstanceImpl() && "Already initialized.");
   InstanceImpl().emplace();
 
+  // The environment can override the capture mode.
+  if (mode != ReproducerMode::Replay) {
+    std::string env =
+        llvm::StringRef(getenv("LLDB_CAPTURE_REPRODUCER")).lower();
+    if (env == "0" || env == "off")
+      mode = ReproducerMode::Off;
+    else if (env == "1" || env == "on")
+      mode = ReproducerMode::Capture;
+  }
+
   switch (mode) {
   case ReproducerMode::Capture: {
     if (!root) {
@@ -136,9 +146,21 @@
   return {};
 }
 
-Generator::Generator(const FileSpec &root) : m_root(root), m_done(false) {}
+static FileSpec MakeAbsolute(FileSpec file_spec) {
+  SmallString<128> path;
+  file_spec.GetPath(path, false);
+  llvm::sys::fs::make_absolute(path);
+  return FileSpec(path, file_spec.GetPathStyle());
+}
 
-Generator::~Generator() {}
+Generator::Generator(FileSpec root) : m_root(MakeAbsolute(std::move(root))) {
+  GetOrCreate<repro::WorkingDirectoryProvider>();
+}
+
+Generator::~Generator() {
+  if (!m_done)
+    Discard();
+}
 
 ProviderBase *Generator::Register(std::unique_ptr<ProviderBase> provider) {
   std::lock_guard<std::mutex> lock(m_providers_mutex);
@@ -175,8 +197,8 @@
   index.AppendPathComponent("index.yaml");
 
   std::error_code EC;
-  auto strm = llvm::make_unique<raw_fd_ostream>(index.GetPath(), EC,
-                                                sys::fs::OpenFlags::F_None);
+  auto strm = std::make_unique<raw_fd_ostream>(index.GetPath(), EC,
+                                               sys::fs::OpenFlags::OF_None);
   yaml::Output yout(*strm);
 
   std::vector<std::string> files;
@@ -188,7 +210,8 @@
   yout << files;
 }
 
-Loader::Loader(const FileSpec &root) : m_root(root), m_loaded(false) {}
+Loader::Loader(FileSpec root)
+    : m_root(MakeAbsolute(std::move(root))), m_loaded(false) {}
 
 llvm::Error Loader::LoadIndex() {
   if (m_loaded)
@@ -223,7 +246,7 @@
 llvm::Expected<std::unique_ptr<DataRecorder>>
 DataRecorder::Create(const FileSpec &filename) {
   std::error_code ec;
-  auto recorder = llvm::make_unique<DataRecorder>(std::move(filename), ec);
+  auto recorder = std::make_unique<DataRecorder>(std::move(filename), ec);
   if (ec)
     return llvm::errorCodeToError(ec);
   return std::move(recorder);
@@ -232,7 +255,7 @@
 DataRecorder *CommandProvider::GetNewDataRecorder() {
   std::size_t i = m_data_recorders.size() + 1;
   std::string filename = (llvm::Twine(Info::name) + llvm::Twine("-") +
-                          llvm::Twine(i) + llvm::Twine(".txt"))
+                          llvm::Twine(i) + llvm::Twine(".yaml"))
                              .str();
   auto recorder_or_error =
       DataRecorder::Create(GetRoot().CopyByAppendingPathComponent(filename));
@@ -254,7 +277,7 @@
 
   FileSpec file = GetRoot().CopyByAppendingPathComponent(Info::file);
   std::error_code ec;
-  llvm::raw_fd_ostream os(file.GetPath(), ec, llvm::sys::fs::F_Text);
+  llvm::raw_fd_ostream os(file.GetPath(), ec, llvm::sys::fs::OF_Text);
   if (ec)
     return;
   yaml::Output yout(os);
@@ -266,20 +289,32 @@
 void VersionProvider::Keep() {
   FileSpec file = GetRoot().CopyByAppendingPathComponent(Info::file);
   std::error_code ec;
-  llvm::raw_fd_ostream os(file.GetPath(), ec, llvm::sys::fs::F_Text);
+  llvm::raw_fd_ostream os(file.GetPath(), ec, llvm::sys::fs::OF_Text);
   if (ec)
     return;
   os << m_version << "\n";
 }
 
+void WorkingDirectoryProvider::Keep() {
+  FileSpec file = GetRoot().CopyByAppendingPathComponent(Info::file);
+  std::error_code ec;
+  llvm::raw_fd_ostream os(file.GetPath(), ec, llvm::sys::fs::OF_Text);
+  if (ec)
+    return;
+  os << m_cwd << "\n";
+}
+
 void ProviderBase::anchor() {}
-char ProviderBase::ID = 0;
 char CommandProvider::ID = 0;
 char FileProvider::ID = 0;
+char ProviderBase::ID = 0;
 char VersionProvider::ID = 0;
+char WorkingDirectoryProvider::ID = 0;
 const char *CommandProvider::Info::file = "command-interpreter.yaml";
 const char *CommandProvider::Info::name = "command-interpreter";
 const char *FileProvider::Info::file = "files.yaml";
 const char *FileProvider::Info::name = "files";
 const char *VersionProvider::Info::file = "version.txt";
 const char *VersionProvider::Info::name = "version";
+const char *WorkingDirectoryProvider::Info::file = "cwd.txt";
+const char *WorkingDirectoryProvider::Info::name = "cwd";
diff --git a/src/llvm-project/lldb/source/Utility/Scalar.cpp b/src/llvm-project/lldb/source/Utility/Scalar.cpp
index 23d50b9..a9293e8 100644
--- a/src/llvm-project/lldb/source/Utility/Scalar.cpp
+++ b/src/llvm-project/lldb/source/Utility/Scalar.cpp
@@ -74,7 +74,7 @@
 bool Scalar::GetData(DataExtractor &data, size_t limit_byte_size) const {
   size_t byte_size = GetByteSize();
   if (byte_size > 0) {
-    const uint8_t *bytes = reinterpret_cast<const uint8_t *>(GetBytes());
+    const uint8_t *bytes = static_cast<const uint8_t *>(GetBytes());
 
     if (limit_byte_size < byte_size) {
       if (endian::InlHostByteOrder() == eByteOrderLittle) {
@@ -132,7 +132,7 @@
       swapped_words[1] = apint_words[0];
       apint_words = swapped_words;
     }
-    return reinterpret_cast<const void *>(apint_words);
+    return static_cast<const void *>(apint_words);
   case e_sint256:
   case e_uint256:
     apint_words = m_integer.getRawData();
@@ -143,7 +143,7 @@
       swapped_words[3] = apint_words[0];
       apint_words = swapped_words;
     }
-    return reinterpret_cast<const void *>(apint_words);
+    return static_cast<const void *>(apint_words);
   case e_sint512:
   case e_uint512:
     apint_words = m_integer.getRawData();
@@ -158,13 +158,13 @@
       swapped_words[7] = apint_words[0];
       apint_words = swapped_words;
     }
-    return reinterpret_cast<const void *>(apint_words);
+    return static_cast<const void *>(apint_words);
   case e_float:
     flt_val = m_float.convertToFloat();
-    return reinterpret_cast<const void *>(&flt_val);
+    return static_cast<const void *>(&flt_val);
   case e_double:
     dbl_val = m_float.convertToDouble();
-    return reinterpret_cast<const void *>(&dbl_val);
+    return static_cast<const void *>(&dbl_val);
   case e_long_double:
     llvm::APInt ldbl_val = m_float.bitcastToAPInt();
     apint_words = ldbl_val.getRawData();
@@ -176,7 +176,7 @@
       swapped_words[1] = apint_words[0];
       apint_words = swapped_words;
     }
-    return reinterpret_cast<const void *>(apint_words);
+    return static_cast<const void *>(apint_words);
   }
   return nullptr;
 }
@@ -305,15 +305,6 @@
   return "<invalid Scalar type>";
 }
 
-Scalar &Scalar::operator=(const Scalar &rhs) {
-  if (this != &rhs) {
-    m_type = rhs.m_type;
-    m_integer = llvm::APInt(rhs.m_integer);
-    m_float = rhs.m_float;
-  }
-  return *this;
-}
-
 Scalar &Scalar::operator=(const int v) {
   m_type = e_sint;
   m_integer = llvm::APInt(sizeof(int) * 8, v, true);
@@ -416,6 +407,51 @@
 
 Scalar::~Scalar() = default;
 
+Scalar::Type Scalar::GetBestTypeForBitSize(size_t bit_size, bool sign) {
+  // Scalar types are always host types, hence the sizeof().
+  if (sign) {
+    if (bit_size <= sizeof(int)*8) return Scalar::e_sint;
+    if (bit_size <= sizeof(long)*8) return Scalar::e_slong;
+    if (bit_size <= sizeof(long long)*8) return Scalar::e_slonglong;
+    if (bit_size <= 128) return Scalar::e_sint128;
+    if (bit_size <= 256) return Scalar::e_sint256;
+    if (bit_size <= 512) return Scalar::e_sint512;
+  } else {
+    if (bit_size <= sizeof(unsigned int)*8) return Scalar::e_uint;
+    if (bit_size <= sizeof(unsigned long)*8) return Scalar::e_ulong;
+    if (bit_size <= sizeof(unsigned long long)*8) return Scalar::e_ulonglong;
+    if (bit_size <= 128) return Scalar::e_uint128;
+    if (bit_size <= 256) return Scalar::e_uint256;
+    if (bit_size <= 512) return Scalar::e_uint512;
+  }
+  return Scalar::e_void;
+}
+
+void Scalar::TruncOrExtendTo(Scalar::Type type, uint16_t bits) {
+  switch (type) {
+  case e_sint:
+  case e_slong:
+  case e_slonglong:
+  case e_sint128:
+  case e_sint256:
+  case e_sint512:
+    m_integer = m_integer.sextOrTrunc(bits);
+    break;
+  case e_uint:
+  case e_ulong:
+  case e_ulonglong:
+  case e_uint128:
+  case e_uint256:
+  case e_uint512:
+    m_integer = m_integer.zextOrTrunc(bits);
+    break;
+  default:
+    llvm_unreachable("Promoting a Scalar to a specific number of bits is only "
+                     "supported for integer types.");
+  }
+  m_type = type;
+}
+
 bool Scalar::Promote(Scalar::Type type) {
   bool success = false;
   switch (m_type) {
diff --git a/src/llvm-project/lldb/source/Utility/SelectHelper.cpp b/src/llvm-project/lldb/source/Utility/SelectHelper.cpp
index ff21d99..9f5ca58 100644
--- a/src/llvm-project/lldb/source/Utility/SelectHelper.cpp
+++ b/src/llvm-project/lldb/source/Utility/SelectHelper.cpp
@@ -92,7 +92,7 @@
 
 lldb_private::Status SelectHelper::Select() {
   lldb_private::Status error;
-#ifdef _MSC_VER
+#ifdef _WIN32
   // On windows FD_SETSIZE limits the number of file descriptors, not their
   // numeric value.
   lldbassert(m_fd_map.size() <= FD_SETSIZE);
@@ -107,7 +107,7 @@
   for (auto &pair : m_fd_map) {
     pair.second.PrepareForSelect();
     const lldb::socket_t fd = pair.first;
-#if !defined(__APPLE__) && !defined(_MSC_VER)
+#if !defined(__APPLE__) && !defined(_WIN32)
     lldbassert(fd < static_cast<int>(FD_SETSIZE));
     if (fd >= static_cast<int>(FD_SETSIZE)) {
       error.SetErrorStringWithFormat("%i is too large for select()", fd);
diff --git a/src/llvm-project/lldb/source/Utility/Status.cpp b/src/llvm-project/lldb/source/Utility/Status.cpp
index 3d64fb8..b74db72 100644
--- a/src/llvm-project/lldb/source/Utility/Status.cpp
+++ b/src/llvm-project/lldb/source/Utility/Status.cpp
@@ -93,16 +93,6 @@
                                              llvm::inconvertibleErrorCode());
 }
 
-// Assignment operator
-const Status &Status::operator=(const Status &rhs) {
-  if (this != &rhs) {
-    m_code = rhs.m_code;
-    m_type = rhs.m_type;
-    m_string = rhs.m_string;
-  }
-  return *this;
-}
-
 Status::~Status() = default;
 
 #ifdef _WIN32
@@ -110,14 +100,23 @@
   char *buffer = nullptr;
   std::string message;
   // Retrieve win32 system error.
+  // First, attempt to load a en-US message
   if (::FormatMessageA(
           FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM |
               FORMAT_MESSAGE_MAX_WIDTH_MASK,
-          NULL, error_code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+          NULL, error_code, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
           (LPSTR)&buffer, 0, NULL)) {
     message.assign(buffer);
     ::LocalFree(buffer);
   }
+  // If the previous didn't work, use the default OS language
+  else if (::FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
+                                FORMAT_MESSAGE_FROM_SYSTEM |
+                                FORMAT_MESSAGE_MAX_WIDTH_MASK,
+                            NULL, error_code, 0, (LPSTR)&buffer, 0, NULL)) {
+    message.assign(buffer);
+    ::LocalFree(buffer);
+  }
   return message;
 }
 #endif
diff --git a/src/llvm-project/lldb/source/Utility/Stream.cpp b/src/llvm-project/lldb/source/Utility/Stream.cpp
index c48a12a..b336cb6 100644
--- a/src/llvm-project/lldb/source/Utility/Stream.cpp
+++ b/src/llvm-project/lldb/source/Utility/Stream.cpp
@@ -11,6 +11,7 @@
 #include "lldb/Utility/Endian.h"
 #include "lldb/Utility/VASPrintf.h"
 #include "llvm/ADT/SmallString.h"
+#include "llvm/Support/Format.h"
 #include "llvm/Support/LEB128.h"
 
 #include <string>
@@ -76,28 +77,27 @@
 
 // Put an address "addr" out to the stream with optional prefix and suffix
 // strings.
-void Stream::Address(uint64_t addr, uint32_t addr_size, const char *prefix,
-                     const char *suffix) {
+void lldb_private::DumpAddress(llvm::raw_ostream &s, uint64_t addr,
+                               uint32_t addr_size, const char *prefix,
+                               const char *suffix) {
   if (prefix == nullptr)
     prefix = "";
   if (suffix == nullptr)
     suffix = "";
-  //    int addr_width = m_addr_size << 1;
-  //    Printf ("%s0x%0*" PRIx64 "%s", prefix, addr_width, addr, suffix);
-  Printf("%s0x%0*" PRIx64 "%s", prefix, addr_size * 2, addr, suffix);
+  s << prefix << llvm::format_hex(addr, 2 + 2 * addr_size) << suffix;
 }
 
 // Put an address range out to the stream with optional prefix and suffix
 // strings.
-void Stream::AddressRange(uint64_t lo_addr, uint64_t hi_addr,
-                          uint32_t addr_size, const char *prefix,
-                          const char *suffix) {
+void lldb_private::DumpAddressRange(llvm::raw_ostream &s, uint64_t lo_addr,
+                                    uint64_t hi_addr, uint32_t addr_size,
+                                    const char *prefix, const char *suffix) {
   if (prefix && prefix[0])
-    PutCString(prefix);
-  Address(lo_addr, addr_size, "[");
-  Address(hi_addr, addr_size, "-", ")");
+    s << prefix;
+  DumpAddress(s, lo_addr, addr_size, "[");
+  DumpAddress(s, hi_addr, addr_size, "-", ")");
   if (suffix && suffix[0])
-    PutCString(suffix);
+    s << suffix;
 }
 
 size_t Stream::PutChar(char ch) { return Write(&ch, 1); }
@@ -160,65 +160,19 @@
   return *this;
 }
 
-// Stream a uint8_t "uval" out to this stream.
-Stream &Stream::operator<<(uint8_t uval) {
-  PutHex8(uval);
-  return *this;
-}
-
-// Stream a uint16_t "uval" out to this stream.
-Stream &Stream::operator<<(uint16_t uval) {
-  PutHex16(uval, m_byte_order);
-  return *this;
-}
-
-// Stream a uint32_t "uval" out to this stream.
-Stream &Stream::operator<<(uint32_t uval) {
-  PutHex32(uval, m_byte_order);
-  return *this;
-}
-
-// Stream a uint64_t "uval" out to this stream.
-Stream &Stream::operator<<(uint64_t uval) {
-  PutHex64(uval, m_byte_order);
-  return *this;
-}
-
-// Stream a int8_t "sval" out to this stream.
-Stream &Stream::operator<<(int8_t sval) {
-  Printf("%i", static_cast<int>(sval));
-  return *this;
-}
-
-// Stream a int16_t "sval" out to this stream.
-Stream &Stream::operator<<(int16_t sval) {
-  Printf("%i", static_cast<int>(sval));
-  return *this;
-}
-
-// Stream a int32_t "sval" out to this stream.
-Stream &Stream::operator<<(int32_t sval) {
-  Printf("%i", static_cast<int>(sval));
-  return *this;
-}
-
-// Stream a int64_t "sval" out to this stream.
-Stream &Stream::operator<<(int64_t sval) {
-  Printf("%" PRIi64, sval);
-  return *this;
-}
-
 // Get the current indentation level
-int Stream::GetIndentLevel() const { return m_indent_level; }
+unsigned Stream::GetIndentLevel() const { return m_indent_level; }
 
 // Set the current indentation level
-void Stream::SetIndentLevel(int indent_level) { m_indent_level = indent_level; }
+void Stream::SetIndentLevel(unsigned indent_level) {
+  m_indent_level = indent_level;
+}
 
 // Increment the current indentation level
-void Stream::IndentMore(int amount) { m_indent_level += amount; }
+void Stream::IndentMore(unsigned amount) { m_indent_level += amount; }
 
 // Decrement the current indentation level
-void Stream::IndentLess(int amount) {
+void Stream::IndentLess(unsigned amount) {
   if (m_indent_level >= amount)
     m_indent_level -= amount;
   else
diff --git a/src/llvm-project/lldb/source/Utility/StreamGDBRemote.cpp b/src/llvm-project/lldb/source/Utility/StreamGDBRemote.cpp
deleted file mode 100644
index c710bbe..0000000
--- a/src/llvm-project/lldb/source/Utility/StreamGDBRemote.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-//===-- StreamGDBRemote.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Utility/StreamGDBRemote.h"
-
-#include "lldb/Utility/Flags.h"
-#include "lldb/Utility/Stream.h"
-
-#include <stdio.h>
-
-using namespace lldb;
-using namespace lldb_private;
-
-StreamGDBRemote::StreamGDBRemote() : StreamString() {}
-
-StreamGDBRemote::StreamGDBRemote(uint32_t flags, uint32_t addr_size,
-                                 ByteOrder byte_order)
-    : StreamString(flags, addr_size, byte_order) {}
-
-StreamGDBRemote::~StreamGDBRemote() {}
-
-int StreamGDBRemote::PutEscapedBytes(const void *s, size_t src_len) {
-  int bytes_written = 0;
-  const uint8_t *src = static_cast<const uint8_t *>(s);
-  bool binary_is_set = m_flags.Test(eBinary);
-  m_flags.Clear(eBinary);
-  while (src_len) {
-    uint8_t byte = *src;
-    src++;
-    src_len--;
-    if (byte == 0x23 || byte == 0x24 || byte == 0x7d || byte == 0x2a) {
-      bytes_written += PutChar(0x7d);
-      byte ^= 0x20;
-    }
-    bytes_written += PutChar(byte);
-  };
-  if (binary_is_set)
-    m_flags.Set(eBinary);
-  return bytes_written;
-}
diff --git a/src/llvm-project/lldb/source/Utility/StreamString.cpp b/src/llvm-project/lldb/source/Utility/StreamString.cpp
index bf9814d..6b5b7d3 100644
--- a/src/llvm-project/lldb/source/Utility/StreamString.cpp
+++ b/src/llvm-project/lldb/source/Utility/StreamString.cpp
@@ -24,7 +24,7 @@
 }
 
 size_t StreamString::WriteImpl(const void *s, size_t length) {
-  m_packet.append(reinterpret_cast<const char *>(s), length);
+  m_packet.append(static_cast<const char *>(s), length);
   return length;
 }
 
diff --git a/src/llvm-project/lldb/source/Utility/StringExtractor.cpp b/src/llvm-project/lldb/source/Utility/StringExtractor.cpp
index 502f468..87fe4f1 100644
--- a/src/llvm-project/lldb/source/Utility/StringExtractor.cpp
+++ b/src/llvm-project/lldb/source/Utility/StringExtractor.cpp
@@ -296,34 +296,6 @@
   return bytes_extracted;
 }
 
-// Consume ASCII hex nibble character pairs until we have decoded byte_size
-// bytes of data.
-
-uint64_t StringExtractor::GetHexWithFixedSize(uint32_t byte_size,
-                                              bool little_endian,
-                                              uint64_t fail_value) {
-  if (byte_size <= 8 && GetBytesLeft() >= byte_size * 2) {
-    uint64_t result = 0;
-    uint32_t i;
-    if (little_endian) {
-      // Little Endian
-      uint32_t shift_amount;
-      for (i = 0, shift_amount = 0; i < byte_size && IsGood();
-           ++i, shift_amount += 8) {
-        result |= (static_cast<uint64_t>(GetHexU8()) << shift_amount);
-      }
-    } else {
-      // Big Endian
-      for (i = 0; i < byte_size && IsGood(); ++i) {
-        result <<= 8;
-        result |= GetHexU8();
-      }
-    }
-  }
-  m_index = UINT64_MAX;
-  return fail_value;
-}
-
 size_t StringExtractor::GetHexByteString(std::string &str) {
   str.clear();
   str.reserve(GetBytesLeft() / 2);
diff --git a/src/llvm-project/lldb/source/Utility/StringLexer.cpp b/src/llvm-project/lldb/source/Utility/StringLexer.cpp
index 958a958..c357cb0 100644
--- a/src/llvm-project/lldb/source/Utility/StringLexer.cpp
+++ b/src/llvm-project/lldb/source/Utility/StringLexer.cpp
@@ -11,7 +11,7 @@
 #include <algorithm>
 #include <assert.h>
 
-using namespace lldb_utility;
+using namespace lldb_private;
 
 StringLexer::StringLexer(std::string s) : m_data(s), m_position(0) {}
 
diff --git a/src/llvm-project/lldb/source/Utility/StringList.cpp b/src/llvm-project/lldb/source/Utility/StringList.cpp
index fb0d9be..5e06b6b 100644
--- a/src/llvm-project/lldb/source/Utility/StringList.cpp
+++ b/src/llvm-project/lldb/source/Utility/StringList.cpp
@@ -61,10 +61,8 @@
 }
 
 void StringList::AppendList(StringList strings) {
-  size_t len = strings.GetSize();
-
-  for (size_t i = 0; i < len; ++i)
-    m_strings.push_back(strings.GetStringAtIndex(i));
+  m_strings.reserve(m_strings.size() + strings.GetSize());
+  m_strings.insert(m_strings.end(), strings.begin(), strings.end());
 }
 
 size_t StringList::GetSize() const { return m_strings.size(); }
@@ -100,10 +98,9 @@
 
 void StringList::Clear() { m_strings.clear(); }
 
-void StringList::LongestCommonPrefix(std::string &common_prefix) {
-  common_prefix.clear();
+std::string StringList::LongestCommonPrefix() {
   if (m_strings.empty())
-    return;
+    return {};
 
   auto args = llvm::makeArrayRef(m_strings);
   llvm::StringRef prefix = args.front();
@@ -115,7 +112,7 @@
     }
     prefix = prefix.take_front(count);
   }
-  common_prefix = prefix;
+  return prefix.str();
 }
 
 void StringList::InsertStringAtIndex(size_t idx, const char *str) {
@@ -226,29 +223,6 @@
   return *this;
 }
 
-size_t StringList::AutoComplete(llvm::StringRef s, StringList &matches,
-                                size_t &exact_idx) const {
-  matches.Clear();
-  exact_idx = SIZE_MAX;
-  if (s.empty()) {
-    // No string, so it matches everything
-    matches = *this;
-    return matches.GetSize();
-  }
-
-  const size_t s_len = s.size();
-  const size_t num_strings = m_strings.size();
-
-  for (size_t i = 0; i < num_strings; ++i) {
-    if (m_strings[i].find(s) == 0) {
-      if (exact_idx == SIZE_MAX && m_strings[i].size() == s_len)
-        exact_idx = matches.GetSize();
-      matches.AppendString(m_strings[i]);
-    }
-  }
-  return matches.GetSize();
-}
-
 void StringList::LogDump(Log *log, const char *name) {
   if (!log)
     return;
diff --git a/src/llvm-project/lldb/source/Utility/StructuredData.cpp b/src/llvm-project/lldb/source/Utility/StructuredData.cpp
index 0e203f9..d5d7a7e 100644
--- a/src/llvm-project/lldb/source/Utility/StructuredData.cpp
+++ b/src/llvm-project/lldb/source/Utility/StructuredData.cpp
@@ -7,25 +7,28 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Utility/StructuredData.h"
-#include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/FileSpec.h"
-#include "lldb/Utility/JSON.h"
 #include "lldb/Utility/Status.h"
-#include "lldb/Utility/Stream.h"
-#include "lldb/Utility/StreamString.h"
-#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include <cerrno>
 #include <cstdlib>
 #include <inttypes.h>
-#include <limits>
 
 using namespace lldb_private;
+using namespace llvm;
 
-// Functions that use a JSONParser to parse JSON into StructuredData
-static StructuredData::ObjectSP ParseJSONValue(JSONParser &json_parser);
-static StructuredData::ObjectSP ParseJSONObject(JSONParser &json_parser);
-static StructuredData::ObjectSP ParseJSONArray(JSONParser &json_parser);
+static StructuredData::ObjectSP ParseJSONValue(json::Value &value);
+static StructuredData::ObjectSP ParseJSONObject(json::Object *object);
+static StructuredData::ObjectSP ParseJSONArray(json::Array *array);
+
+StructuredData::ObjectSP StructuredData::ParseJSON(std::string json_text) {
+  llvm::Expected<json::Value> value = json::parse(json_text);
+  if (!value) {
+    llvm::consumeError(value.takeError());
+    return nullptr;
+  }
+  return ParseJSONValue(*value);
+}
 
 StructuredData::ObjectSP
 StructuredData::ParseJSONFromFile(const FileSpec &input_spec, Status &error) {
@@ -38,112 +41,53 @@
                                     buffer_or_error.getError().message());
     return return_sp;
   }
-
-  JSONParser json_parser(buffer_or_error.get()->getBuffer());
-  return_sp = ParseJSONValue(json_parser);
-  return return_sp;
+  return ParseJSON(buffer_or_error.get()->getBuffer().str());
 }
 
-static StructuredData::ObjectSP ParseJSONObject(JSONParser &json_parser) {
-  // The "JSONParser::Token::ObjectStart" token should have already been
-  // consumed by the time this function is called
-  auto dict_up = llvm::make_unique<StructuredData::Dictionary>();
+static StructuredData::ObjectSP ParseJSONValue(json::Value &value) {
+  if (json::Object *O = value.getAsObject())
+    return ParseJSONObject(O);
 
-  std::string value;
-  std::string key;
-  while (true) {
-    JSONParser::Token token = json_parser.GetToken(value);
+  if (json::Array *A = value.getAsArray())
+    return ParseJSONArray(A);
 
-    if (token == JSONParser::Token::String) {
-      key.swap(value);
-      token = json_parser.GetToken(value);
-      if (token == JSONParser::Token::Colon) {
-        StructuredData::ObjectSP value_sp = ParseJSONValue(json_parser);
-        if (value_sp)
-          dict_up->AddItem(key, value_sp);
-        else
-          break;
-      }
-    } else if (token == JSONParser::Token::ObjectEnd) {
-      return StructuredData::ObjectSP(dict_up.release());
-    } else if (token == JSONParser::Token::Comma) {
-      continue;
-    } else {
-      break;
-    }
-  }
+  std::string s;
+  if (json::fromJSON(value, s))
+    return std::make_shared<StructuredData::String>(s);
+
+  bool b;
+  if (json::fromJSON(value, b))
+    return std::make_shared<StructuredData::Boolean>(b);
+
+  int64_t i;
+  if (json::fromJSON(value, i))
+    return std::make_shared<StructuredData::Integer>(i);
+
+  double d;
+  if (json::fromJSON(value, d))
+    return std::make_shared<StructuredData::Float>(d);
+
   return StructuredData::ObjectSP();
 }
 
-static StructuredData::ObjectSP ParseJSONArray(JSONParser &json_parser) {
-  // The "JSONParser::Token::ObjectStart" token should have already been
-  // consumed by the time this function is called
-  auto array_up = llvm::make_unique<StructuredData::Array>();
+static StructuredData::ObjectSP ParseJSONObject(json::Object *object) {
+  auto dict_up = std::make_unique<StructuredData::Dictionary>();
+  for (auto &KV : *object) {
+    StringRef key = KV.first;
+    json::Value value = KV.second;
+    if (StructuredData::ObjectSP value_sp = ParseJSONValue(value))
+      dict_up->AddItem(key, value_sp);
+  }
+  return std::move(dict_up);
+}
 
-  std::string value;
-  std::string key;
-  while (true) {
-    StructuredData::ObjectSP value_sp = ParseJSONValue(json_parser);
-    if (value_sp)
+static StructuredData::ObjectSP ParseJSONArray(json::Array *array) {
+  auto array_up = std::make_unique<StructuredData::Array>();
+  for (json::Value &value : *array) {
+    if (StructuredData::ObjectSP value_sp = ParseJSONValue(value))
       array_up->AddItem(value_sp);
-    else
-      break;
-
-    JSONParser::Token token = json_parser.GetToken(value);
-    if (token == JSONParser::Token::Comma) {
-      continue;
-    } else if (token == JSONParser::Token::ArrayEnd) {
-      return StructuredData::ObjectSP(array_up.release());
-    } else {
-      break;
-    }
   }
-  return StructuredData::ObjectSP();
-}
-
-static StructuredData::ObjectSP ParseJSONValue(JSONParser &json_parser) {
-  std::string value;
-  const JSONParser::Token token = json_parser.GetToken(value);
-  switch (token) {
-  case JSONParser::Token::ObjectStart:
-    return ParseJSONObject(json_parser);
-
-  case JSONParser::Token::ArrayStart:
-    return ParseJSONArray(json_parser);
-
-  case JSONParser::Token::Integer: {
-    uint64_t uval;
-    if (llvm::to_integer(value, uval, 0))
-      return std::make_shared<StructuredData::Integer>(uval);
-  } break;
-
-  case JSONParser::Token::Float: {
-    double val;
-    if (llvm::to_float(value, val))
-      return std::make_shared<StructuredData::Float>(val);
-  } break;
-
-  case JSONParser::Token::String:
-    return std::make_shared<StructuredData::String>(value);
-
-  case JSONParser::Token::True:
-  case JSONParser::Token::False:
-    return std::make_shared<StructuredData::Boolean>(token ==
-                                                     JSONParser::Token::True);
-
-  case JSONParser::Token::Null:
-    return std::make_shared<StructuredData::Null>();
-
-  default:
-    break;
-  }
-  return StructuredData::ObjectSP();
-}
-
-StructuredData::ObjectSP StructuredData::ParseJSON(std::string json_text) {
-  JSONParser json_parser(json_text);
-  StructuredData::ObjectSP object_sp = ParseJSONValue(json_parser);
-  return object_sp;
+  return std::move(array_up);
 }
 
 StructuredData::ObjectSP
@@ -181,98 +125,48 @@
 }
 
 void StructuredData::Object::DumpToStdout(bool pretty_print) const {
-  StreamString stream;
-  Dump(stream, pretty_print);
-  llvm::outs() << stream.GetString();
+  json::OStream stream(llvm::outs(), pretty_print ? 2 : 0);
+  Serialize(stream);
 }
 
-void StructuredData::Array::Dump(Stream &s, bool pretty_print) const {
-  bool first = true;
-  s << "[";
-  if (pretty_print) {
-    s << "\n";
-    s.IndentMore();
-  }
+void StructuredData::Array::Serialize(json::OStream &s) const {
+  s.arrayBegin();
   for (const auto &item_sp : m_items) {
-    if (first) {
-      first = false;
-    } else {
-      s << ",";
-      if (pretty_print)
-        s << "\n";
-    }
-
-    if (pretty_print)
-      s.Indent();
-    item_sp->Dump(s, pretty_print);
+    item_sp->Serialize(s);
   }
-  if (pretty_print) {
-    s.IndentLess();
-    s.EOL();
-    s.Indent();
-  }
-  s << "]";
+  s.arrayEnd();
 }
 
-void StructuredData::Integer::Dump(Stream &s, bool pretty_print) const {
-  s.Printf("%" PRIu64, m_value);
+void StructuredData::Integer::Serialize(json::OStream &s) const {
+  s.value(static_cast<int64_t>(m_value));
 }
 
-void StructuredData::Float::Dump(Stream &s, bool pretty_print) const {
-  s.Printf("%lg", m_value);
+void StructuredData::Float::Serialize(json::OStream &s) const {
+  s.value(m_value);
 }
 
-void StructuredData::Boolean::Dump(Stream &s, bool pretty_print) const {
-  if (m_value)
-    s.PutCString("true");
-  else
-    s.PutCString("false");
+void StructuredData::Boolean::Serialize(json::OStream &s) const {
+  s.value(m_value);
 }
 
-void StructuredData::String::Dump(Stream &s, bool pretty_print) const {
-  std::string quoted;
-  const size_t strsize = m_value.size();
-  for (size_t i = 0; i < strsize; ++i) {
-    char ch = m_value[i];
-    if (ch == '"' || ch == '\\')
-      quoted.push_back('\\');
-    quoted.push_back(ch);
-  }
-  s.Printf("\"%s\"", quoted.c_str());
+void StructuredData::String::Serialize(json::OStream &s) const {
+  s.value(m_value);
 }
 
-void StructuredData::Dictionary::Dump(Stream &s, bool pretty_print) const {
-  bool first = true;
-  s << "{";
-  if (pretty_print) {
-    s << "\n";
-    s.IndentMore();
-  }
+void StructuredData::Dictionary::Serialize(json::OStream &s) const {
+  s.objectBegin();
   for (const auto &pair : m_dict) {
-    if (first)
-      first = false;
-    else {
-      s << ",";
-      if (pretty_print)
-        s << "\n";
-    }
-    if (pretty_print)
-      s.Indent();
-    s << "\"" << pair.first.AsCString() << "\" : ";
-    pair.second->Dump(s, pretty_print);
+    s.attributeBegin(pair.first.AsCString());
+    pair.second->Serialize(s);
+    s.attributeEnd();
   }
-  if (pretty_print) {
-    s.IndentLess();
-    s.EOL();
-    s.Indent();
-  }
-  s << "}";
+  s.objectEnd();
 }
 
-void StructuredData::Null::Dump(Stream &s, bool pretty_print) const {
-  s << "null";
+void StructuredData::Null::Serialize(json::OStream &s) const {
+  s.value(nullptr);
 }
 
-void StructuredData::Generic::Dump(Stream &s, bool pretty_print) const {
-  s << "0x" << m_object;
+void StructuredData::Generic::Serialize(json::OStream &s) const {
+  s.value(llvm::formatv("{0:X}", m_object));
 }
diff --git a/src/llvm-project/lldb/source/Utility/VMRange.cpp b/src/llvm-project/lldb/source/Utility/VMRange.cpp
index f3f4ae7..c8c3334 100644
--- a/src/llvm-project/lldb/source/Utility/VMRange.cpp
+++ b/src/llvm-project/lldb/source/Utility/VMRange.cpp
@@ -35,9 +35,10 @@
          }) != coll.end();
 }
 
-void VMRange::Dump(Stream *s, lldb::addr_t offset, uint32_t addr_width) const {
-  s->AddressRange(offset + GetBaseAddress(), offset + GetEndAddress(),
-                  addr_width);
+void VMRange::Dump(llvm::raw_ostream &s, lldb::addr_t offset,
+                   uint32_t addr_width) const {
+  DumpAddressRange(s, offset + GetBaseAddress(), offset + GetEndAddress(),
+                   addr_width);
 }
 
 bool lldb_private::operator==(const VMRange &lhs, const VMRange &rhs) {
diff --git a/src/llvm-project/lldb/test/API/CMakeLists.txt b/src/llvm-project/lldb/test/API/CMakeLists.txt
new file mode 100644
index 0000000..16daa1e
--- /dev/null
+++ b/src/llvm-project/lldb/test/API/CMakeLists.txt
@@ -0,0 +1,169 @@
+function(add_python_test_target name test_script args comment)
+  set(PYTHON_TEST_COMMAND
+    ${PYTHON_EXECUTABLE}
+    ${test_script}
+    ${args}
+    )
+
+  add_custom_target(${name}
+    COMMAND ${PYTHON_TEST_COMMAND} ${ARG_DEFAULT_ARGS}
+    COMMENT "${comment}"
+    USES_TERMINAL
+    )
+  add_dependencies(${name} lldb-test-deps)
+endfunction()
+
+# The default architecture with which to compile test executables is the default LLVM target
+# architecture, which itself defaults to the host architecture.
+string(TOLOWER "${LLVM_TARGET_ARCH}" LLDB_DEFAULT_TEST_ARCH)
+if( LLDB_DEFAULT_TEST_ARCH STREQUAL "host" )
+  string(REGEX MATCH "^[^-]*" LLDB_DEFAULT_TEST_ARCH ${LLVM_HOST_TRIPLE})
+endif ()
+
+# Allow the user to override the default by setting LLDB_TEST_ARCH
+set(LLDB_TEST_ARCH
+  ${LLDB_DEFAULT_TEST_ARCH}
+  CACHE STRING "Specify the architecture to run LLDB tests as (x86|x64).  Determines whether tests are compiled with -m32 or -m64")
+
+# Users can override LLDB_TEST_USER_ARGS to specify arbitrary arguments to pass to the script
+set(LLDB_TEST_USER_ARGS
+  ""
+  CACHE STRING "Specify additional arguments to pass to test runner. For example: '-C gcc -C clang -A i386 -A x86_64'")
+
+# The .noindex suffix is a marker for Spotlight to never index the
+# build directory.  LLDB queries Spotlight to locate .dSYM bundles
+# based on the UUID embedded in a binary, and because the UUID is a
+# hash of filename and .text section, there *will* be conflicts inside
+# the build directory.
+set(LLDB_TEST_COMMON_ARGS
+  -s
+  ${CMAKE_BINARY_DIR}/lldb-test-traces
+  -S nm
+  -u CXXFLAGS
+  -u CFLAGS
+  )
+
+# Set the path to the default lldb test executable.
+set(LLDB_DEFAULT_TEST_EXECUTABLE "${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb${CMAKE_EXECUTABLE_SUFFIX}")
+
+# Set the paths to default llvm tools.
+set(LLDB_DEFAULT_TEST_DSYMUTIL "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/dsymutil${CMAKE_EXECUTABLE_SUFFIX}")
+set(LLDB_DEFAULT_TEST_FILECHECK "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/FileCheck${CMAKE_EXECUTABLE_SUFFIX}")
+
+if (TARGET clang)
+  set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/clang${CMAKE_EXECUTABLE_SUFFIX}")
+else()
+  set(LLDB_DEFAULT_TEST_COMPILER "")
+endif()
+
+set(LLDB_TEST_EXECUTABLE "${LLDB_DEFAULT_TEST_EXECUTABLE}" CACHE PATH "lldb executable used for testing")
+set(LLDB_TEST_COMPILER "${LLDB_DEFAULT_TEST_COMPILER}" CACHE PATH "C Compiler to use for building LLDB test inferiors")
+set(LLDB_TEST_DSYMUTIL "${LLDB_DEFAULT_TEST_DSYMUTIL}" CACHE PATH "dsymutil used for generating dSYM bundles")
+set(LLDB_TEST_FILECHECK "${LLDB_DEFAULT_TEST_FILECHECK}" CACHE PATH "FileCheck used for testing purposes")
+
+if ("${LLDB_TEST_COMPILER}" STREQUAL "")
+  message(FATAL_ERROR "LLDB test compiler not specified. Tests will not run.")
+endif()
+
+if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
+  # All tests are currently flaky on Windows, so rerun them all once when they fail.
+  set(LLDB_TEST_COMMON_ARGS ${LLDB_TEST_COMMON_ARGS} --rerun-all-issues)
+
+  set(LLDB_TEST_DEBUG_TEST_CRASHES
+    0
+    CACHE BOOL "(Windows only) Enables debugging of tests in the test suite by showing the crash dialog when lldb crashes")
+
+  set(LLDB_TEST_HIDE_CONSOLE_WINDOWS
+    1
+    CACHE BOOL "(Windows only) Hides the console window for an inferior when it is launched through the test suite")
+
+  if (LLDB_TEST_DEBUG_TEST_CRASHES)
+    set(LLDB_TEST_COMMON_ARGS ${LLDB_TEST_COMMON_ARGS} --enable-crash-dialog)
+  endif()
+
+  if (NOT LLDB_TEST_HIDE_CONSOLE_WINDOWS)
+    set(LLDB_TEST_COMMON_ARGS ${LLDB_TEST_COMMON_ARGS} --show-inferior-console)
+  endif()
+endif()
+
+if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows|Darwin")
+  list(APPEND LLDB_TEST_COMMON_ARGS
+    --env ARCHIVER=${CMAKE_AR} --env OBJCOPY=${CMAKE_OBJCOPY})
+endif()
+
+if (NOT "${LLDB_LIT_TOOLS_DIR}" STREQUAL "")
+  if (NOT EXISTS "${LLDB_LIT_TOOLS_DIR}")
+    message(WARNING "LLDB_LIT_TOOLS_DIR ${LLDB_LIT_TOOLS_DIR} does not exist.")
+  endif()
+endif()
+
+if(CMAKE_HOST_APPLE)
+  if(LLDB_BUILD_FRAMEWORK)
+    list(APPEND LLDB_TEST_COMMON_ARGS --framework ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework)
+  endif()
+
+  # Use the same identity for testing
+  get_property(code_sign_identity_used GLOBAL PROPERTY LLDB_DEBUGSERVER_CODESIGN_IDENTITY)
+  if(code_sign_identity_used)
+    list(APPEND LLDB_TEST_COMMON_ARGS --codesign-identity "${code_sign_identity_used}")
+  endif()
+
+  if(LLDB_USE_SYSTEM_DEBUGSERVER)
+    lldb_find_system_debugserver(system_debugserver_path)
+    add_custom_target(debugserver
+      COMMAND ${CMAKE_COMMAND} -E copy_if_different
+      ${system_debugserver_path} ${LLVM_RUNTIME_OUTPUT_INTDIR}
+      COMMENT "Copying the system debugserver to LLDB's binaries directory for testing.")
+    message(STATUS "LLDB tests use out-of-tree debugserver: ${system_debugserver_path}")
+    list(APPEND LLDB_TEST_COMMON_ARGS --out-of-tree-debugserver)
+    add_lldb_test_dependency(debugserver)
+  elseif(TARGET debugserver)
+    set(debugserver_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/debugserver)
+    message(STATUS "LLDB Tests use just-built debugserver: ${debugserver_path}")
+    list(APPEND LLDB_TEST_COMMON_ARGS --server ${debugserver_path})
+    add_lldb_test_dependency(debugserver)
+  elseif(TARGET lldb-server)
+    set(lldb_server_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/lldb-server)
+    message(STATUS "LLDB Tests use just-built lldb-server: ${lldb_server_path}")
+    list(APPEND LLDB_TEST_COMMON_ARGS --server ${lldb_server_path})
+    add_lldb_test_dependency(lldb-server)
+  else()
+    message(WARNING "LLDB Tests enabled, but no server available")
+  endif()
+endif()
+
+set(LLDB_DOTEST_ARGS ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS} CACHE INTERNAL STRING)
+set(dotest_args_replacement ${LLVM_BUILD_MODE})
+
+if(LLDB_BUILT_STANDALONE)
+  # In paths to our build-tree, replace CMAKE_CFG_INTDIR with our configuration name placeholder.
+  string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} config_runtime_output_dir ${LLVM_RUNTIME_OUTPUT_INTDIR})
+  string(REPLACE ${LLVM_RUNTIME_OUTPUT_INTDIR} ${config_runtime_output_dir} LLDB_DOTEST_ARGS "${LLDB_DOTEST_ARGS}")
+
+  # Remaining ones must be paths to the provided LLVM build-tree.
+  if(LLVM_CONFIGURATION_TYPES)
+    # LLDB uses single-config; LLVM multi-config; pick one and prefer Release types.
+    # Otherwise, if both use multi-config the default is fine.
+    if(NOT CMAKE_CONFIGURATION_TYPES)
+      if(RelWithDebInfo IN_LIST LLVM_CONFIGURATION_TYPES)
+        set(dotest_args_replacement RelWithDebInfo)
+      elseif(Release IN_LIST LLVM_CONFIGURATION_TYPES)
+        set(dotest_args_replacement Release)
+      else()
+        list(GET LLVM_CONFIGURATION_TYPES 0 dotest_args_replacement)
+      endif()
+    endif()
+  else()
+    # Common case: LLVM used a single-configuration generator like Ninja.
+    set(dotest_args_replacement ".")
+  endif()
+endif()
+
+string(REPLACE ${CMAKE_CFG_INTDIR} ${dotest_args_replacement} LLDB_DOTEST_ARGS "${LLDB_DOTEST_ARGS}")
+
+# Configure the API test suite.
+configure_lit_site_cfg(
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
+  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
+  MAIN_CONFIG
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py)
diff --git a/src/llvm-project/lldb/test/API/README.md b/src/llvm-project/lldb/test/API/README.md
new file mode 100644
index 0000000..fbb3713
--- /dev/null
+++ b/src/llvm-project/lldb/test/API/README.md
@@ -0,0 +1,4 @@
+# LLDB API Tests
+
+This directory only exists for the lit test driver. The actual tests live in
+the `tests` directory in top level LLDB directory.
diff --git a/src/llvm-project/lldb/test/dotest.py b/src/llvm-project/lldb/test/API/dotest.py
similarity index 100%
rename from src/llvm-project/lldb/test/dotest.py
rename to src/llvm-project/lldb/test/API/dotest.py
diff --git a/src/llvm-project/lldb/test/API/lit.cfg.py b/src/llvm-project/lldb/test/API/lit.cfg.py
new file mode 100644
index 0000000..631a8a4
--- /dev/null
+++ b/src/llvm-project/lldb/test/API/lit.cfg.py
@@ -0,0 +1,130 @@
+# -*- Python -*-
+
+# Configuration file for the 'lit' test runner.
+
+import os
+import platform
+import shlex
+import shutil
+
+import lit.formats
+
+# name: The name of this test suite.
+config.name = 'lldb-api'
+
+# suffixes: A list of file extensions to treat as test files.
+config.suffixes = ['.py']
+
+# test_source_root: The root path where tests are located.
+# test_exec_root: The root path where tests should be run.
+config.test_source_root = os.path.join(config.lldb_src_root, 'packages',
+                                       'Python', 'lldbsuite', 'test')
+config.test_exec_root = config.test_source_root
+
+if 'Address' in config.llvm_use_sanitizer:
+  config.environment['ASAN_OPTIONS'] = 'detect_stack_use_after_return=1'
+  # macOS flags needed for LLDB built with address sanitizer.
+  if 'Darwin' in config.host_os and 'x86' in config.host_triple:
+    import subprocess
+    resource_dir = subprocess.check_output(
+        [config.cmake_cxx_compiler,
+         '-print-resource-dir']).decode('utf-8').strip()
+    runtime = os.path.join(resource_dir, 'lib', 'darwin',
+                           'libclang_rt.asan_osx_dynamic.dylib')
+    config.environment['DYLD_INSERT_LIBRARIES'] = runtime
+
+
+def find_shlibpath_var():
+  if platform.system() in ['Linux', 'FreeBSD', 'NetBSD', 'SunOS']:
+    yield 'LD_LIBRARY_PATH'
+  elif platform.system() == 'Darwin':
+    yield 'DYLD_LIBRARY_PATH'
+  elif platform.system() == 'Windows':
+    yield 'PATH'
+
+
+# Shared library build of LLVM may require LD_LIBRARY_PATH or equivalent.
+if config.shared_libs:
+  for shlibpath_var in find_shlibpath_var():
+    # In stand-alone build llvm_shlib_dir specifies LLDB's lib directory while
+    # llvm_libs_dir specifies LLVM's lib directory.
+    shlibpath = os.path.pathsep.join(
+        (config.llvm_shlib_dir, config.llvm_libs_dir,
+         config.environment.get(shlibpath_var, '')))
+    config.environment[shlibpath_var] = shlibpath
+  else:
+    lit_config.warning("unable to inject shared library path on '{}'".format(
+        platform.system()))
+
+# Propagate LLDB_CAPTURE_REPRODUCER
+if 'LLDB_CAPTURE_REPRODUCER' in os.environ:
+  config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[
+      'LLDB_CAPTURE_REPRODUCER']
+
+# Clean the module caches in the test build directory. This is necessary in an
+# incremental build whenever clang changes underneath, so doing it once per
+# lit.py invocation is close enough.
+for cachedir in [config.clang_module_cache, config.lldb_module_cache]:
+  if os.path.isdir(cachedir):
+    print("Deleting module cache at %s." % cachedir)
+    shutil.rmtree(cachedir)
+
+# Set a default per-test timeout of 10 minutes. Setting a timeout per test
+# requires that killProcessAndChildren() is supported on the platform and
+# lit complains if the value is set but it is not supported.
+supported, errormsg = lit_config.maxIndividualTestTimeIsSupported
+if supported:
+  lit_config.maxIndividualTestTime = 600
+else:
+  lit_config.warning("Could not set a default per-test timeout. " + errormsg)
+
+# Build dotest command.
+dotest_cmd = [config.dotest_path]
+dotest_cmd += ['--arch', config.test_arch]
+dotest_cmd.extend(config.dotest_args_str.split(';'))
+
+# Library path may be needed to locate just-built clang.
+if config.llvm_libs_dir:
+  dotest_cmd += ['--env', 'LLVM_LIBS_DIR=' + config.llvm_libs_dir]
+
+# Forward ASan-specific environment variables to tests, as a test may load an
+# ASan-ified dylib.
+for env_var in ('ASAN_OPTIONS', 'DYLD_INSERT_LIBRARIES'):
+  if env_var in config.environment:
+    dotest_cmd += ['--inferior-env', env_var + '=' + config.environment[env_var]]
+
+if config.lldb_build_directory:
+  dotest_cmd += ['--build-dir', config.lldb_build_directory]
+
+if config.lldb_module_cache:
+  dotest_cmd += ['--lldb-module-cache-dir', config.lldb_module_cache]
+
+if config.clang_module_cache:
+  dotest_cmd += ['--clang-module-cache-dir', config.clang_module_cache]
+
+if config.lldb_executable:
+  dotest_cmd += ['--executable', config.lldb_executable]
+
+if config.test_compiler:
+  dotest_cmd += ['--compiler', config.test_compiler]
+
+if config.dsymutil:
+  dotest_cmd += ['--dsymutil', config.dsymutil]
+
+if config.filecheck:
+  dotest_cmd += ['--filecheck', config.filecheck]
+
+# We don't want to force users passing arguments to lit to use `;` as a
+# separator. We use Python's simple lexical analyzer to turn the args into a
+# list. Pass there arguments last so they can override anything that was
+# already configured.
+if config.dotest_lit_args_str:
+  dotest_cmd.extend(shlex.split(config.dotest_lit_args_str))
+
+
+# Load LLDB test format.
+sys.path.append(os.path.join(config.lldb_src_root, "test", "API"))
+import lldbtest
+
+# testFormat: The test format to use to interpret tests.
+config.test_format = lldbtest.LLDBTest(dotest_cmd)
diff --git a/src/llvm-project/lldb/test/API/lit.site.cfg.py.in b/src/llvm-project/lldb/test/API/lit.site.cfg.py.in
new file mode 100644
index 0000000..d7e2764
--- /dev/null
+++ b/src/llvm-project/lldb/test/API/lit.site.cfg.py.in
@@ -0,0 +1,52 @@
+@LIT_SITE_CFG_IN_HEADER@
+
+config.test_exec_root = "@LLDB_BINARY_DIR@"
+config.llvm_src_root = "@LLVM_SOURCE_DIR@"
+config.llvm_obj_root = "@LLVM_BINARY_DIR@"
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
+config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
+config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
+config.lldb_obj_root = "@LLDB_BINARY_DIR@"
+config.lldb_src_root = "@LLDB_SOURCE_DIR@"
+config.cmake_cxx_compiler = "@CMAKE_CXX_COMPILER@"
+config.host_os = "@HOST_OS@"
+config.host_triple = "@LLVM_HOST_TRIPLE@"
+config.shared_libs = @LLVM_ENABLE_SHARED_LIBS@
+config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
+config.target_triple = "@TARGET_TRIPLE@"
+config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@"
+config.python_executable = "@PYTHON_EXECUTABLE@"
+config.dotest_path = "@LLDB_SOURCE_DIR@/test/API/dotest.py"
+config.dotest_args_str = "@LLDB_DOTEST_ARGS@"
+config.lldb_enable_python = @LLDB_ENABLE_PYTHON@
+config.dotest_lit_args_str = None
+config.lldb_executable = '@LLDB_TEST_EXECUTABLE@'
+config.test_arch = '@LLDB_TEST_ARCH@'
+config.test_compiler = '@LLDB_TEST_COMPILER@'
+config.dsymutil = '@LLDB_TEST_DSYMUTIL@'
+config.filecheck = '@LLDB_TEST_FILECHECK@'
+# The API tests use their own module caches.
+config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-api")
+config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-api")
+
+# Additional dotest arguments can be passed to lit by providing a
+# semicolon-separates list: --param dotest-args="arg;arg".
+dotest_lit_args_str = lit_config.params.get('dotest-args', None)
+if dotest_lit_args_str:
+    config.dotest_lit_args_str = dotest_lit_args_str
+
+# Support substitution of the tools and libs dirs with user parameters. This is
+# used when we can't determine the tool dir at configuration time.
+try:
+    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
+    config.dotest_args_str = config.dotest_args_str % lit_config.params
+    config.llvm_build_mode = config.llvm_build_mode % lit_config.params
+except KeyError as e:
+    key, = e.args
+    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
+
+# Let the main config do the real work.
+lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/API/lit.cfg.py")
diff --git a/src/llvm-project/lldb/test/API/lldbtest.py b/src/llvm-project/lldb/test/API/lldbtest.py
new file mode 100644
index 0000000..349a67f
--- /dev/null
+++ b/src/llvm-project/lldb/test/API/lldbtest.py
@@ -0,0 +1,118 @@
+from __future__ import absolute_import
+import os
+
+import subprocess
+import sys
+
+import lit.Test
+import lit.TestRunner
+import lit.util
+from lit.formats.base import TestFormat
+
+def getBuildDir(cmd):
+    found = False
+    for arg in cmd:
+        if found:
+            return arg
+        if arg == '--build-dir':
+            found = True
+    return None
+
+def mkdir_p(path):
+    import errno
+    try:
+        os.makedirs(path)
+    except OSError as e:
+        if e.errno != errno.EEXIST:
+            raise
+    if not os.path.isdir(path):
+        raise OSError(errno.ENOTDIR, "%s is not a directory"%path)
+
+class LLDBTest(TestFormat):
+    def __init__(self, dotest_cmd):
+        self.dotest_cmd = dotest_cmd
+
+    def getTestsInDirectory(self, testSuite, path_in_suite, litConfig,
+                            localConfig):
+        source_path = testSuite.getSourcePath(path_in_suite)
+        for filename in os.listdir(source_path):
+            # Ignore dot files and excluded tests.
+            if (filename.startswith('.') or filename in localConfig.excludes):
+                continue
+
+            # Ignore files that don't start with 'Test'.
+            if not filename.startswith('Test'):
+                continue
+
+            filepath = os.path.join(source_path, filename)
+            if not os.path.isdir(filepath):
+                base, ext = os.path.splitext(filename)
+                if ext in localConfig.suffixes:
+                    yield lit.Test.Test(testSuite, path_in_suite +
+                                        (filename, ), localConfig)
+
+    def execute(self, test, litConfig):
+        if litConfig.noExecute:
+            return lit.Test.PASS, ''
+
+        if not test.config.lldb_enable_python:
+            return (lit.Test.UNSUPPORTED, 'Python module disabled')
+
+        if test.config.unsupported:
+            return (lit.Test.UNSUPPORTED, 'Test is unsupported')
+
+        testPath, testFile = os.path.split(test.getSourcePath())
+        # On Windows, the system does not always correctly interpret
+        # shebang lines.  To make sure we can execute the tests, add
+        # python exe as the first parameter of the command.
+        cmd = [sys.executable] + self.dotest_cmd + [testPath, '-p', testFile]
+
+        # The macOS system integrity protection (SIP) doesn't allow injecting
+        # libraries into system binaries, but this can be worked around by
+        # copying the binary into a different location.
+        if 'DYLD_INSERT_LIBRARIES' in test.config.environment and \
+                (sys.executable.startswith('/System/') or \
+                sys.executable.startswith('/usr/bin/')):
+            builddir = getBuildDir(cmd)
+            mkdir_p(builddir)
+            copied_python = os.path.join(builddir, 'copied-system-python')
+            if not os.path.isfile(copied_python):
+                import shutil, subprocess
+                python = subprocess.check_output([
+                    sys.executable,
+                    '-c',
+                    'import sys; print(sys.executable)'
+                ]).decode('utf-8').strip()
+                shutil.copy(python, copied_python)
+            cmd[0] = copied_python
+
+        try:
+            out, err, exitCode = lit.util.executeCommand(
+                cmd,
+                env=test.config.environment,
+                timeout=litConfig.maxIndividualTestTime)
+        except lit.util.ExecuteCommandTimeoutException:
+            return (lit.Test.TIMEOUT, 'Reached timeout of {} seconds'.format(
+                litConfig.maxIndividualTestTime))
+
+        if exitCode:
+            # Match FAIL but not XFAIL.
+            for line in out.splitlines() + err.splitlines():
+                if line.startswith('FAIL:'):
+                    return lit.Test.FAIL, out + err
+
+            if 'XPASS:' in out or 'XPASS:' in err:
+                return lit.Test.XPASS, out + err
+
+        has_unsupported_tests = 'UNSUPPORTED:' in out or 'UNSUPPORTED:' in err
+        has_passing_tests = 'PASS:' in out or 'PASS:' in err
+        if has_unsupported_tests and not has_passing_tests:
+            return lit.Test.UNSUPPORTED, out + err
+
+        passing_test_line = 'RESULT: PASSED'
+        if passing_test_line not in out and passing_test_line not in err:
+            msg = ('Unable to find %r in dotest output (exit code %d):\n\n%s%s'
+                   % (passing_test_line, exitCode, out, err))
+            return lit.Test.UNRESOLVED, msg
+
+        return lit.Test.PASS, ''
diff --git a/src/llvm-project/lldb/test/API/testcases b/src/llvm-project/lldb/test/API/testcases
new file mode 120000
index 0000000..3707559
--- /dev/null
+++ b/src/llvm-project/lldb/test/API/testcases
@@ -0,0 +1 @@
+../../packages/Python/lldbsuite/test
\ No newline at end of file
diff --git a/src/llvm-project/lldb/test/use_lldb_suite.py b/src/llvm-project/lldb/test/API/use_lldb_suite.py
similarity index 100%
rename from src/llvm-project/lldb/test/use_lldb_suite.py
rename to src/llvm-project/lldb/test/API/use_lldb_suite.py
diff --git a/src/llvm-project/lldb/test/CMakeLists.txt b/src/llvm-project/lldb/test/CMakeLists.txt
index 00225e7..4d9dfa5 100644
--- a/src/llvm-project/lldb/test/CMakeLists.txt
+++ b/src/llvm-project/lldb/test/CMakeLists.txt
@@ -1,148 +1,177 @@
-function(add_python_test_target name test_script args comment)
-  set(PYTHON_TEST_COMMAND
-    ${PYTHON_EXECUTABLE}
-    ${test_script}
-    ${args}
-    )
+# Test runner infrastructure for LLDB. This configures the LLDB test trees
+# for use by Lit, and delegates to LLVM's lit test handlers.
 
-  add_custom_target(${name}
-    COMMAND ${PYTHON_TEST_COMMAND} ${ARG_DEFAULT_ARGS}
-    COMMENT "${comment}"
-    USES_TERMINAL
-    )
-  add_dependencies(${name} ${LLDB_TEST_DEPS})
-endfunction()
+# Configure the build directory.
+set(LLDB_TEST_BUILD_DIRECTORY "${PROJECT_BINARY_DIR}/lldb-test-build.noindex" CACHE PATH "The build root for building tests.")
 
-# The default architecture with which to compile test executables is the default LLVM target
-# architecture, which itself defaults to the host architecture.
-string(TOLOWER "${LLVM_TARGET_ARCH}" LLDB_DEFAULT_TEST_ARCH)
-if( LLDB_DEFAULT_TEST_ARCH STREQUAL "host" )
-  string(REGEX MATCH "^[^-]*" LLDB_DEFAULT_TEST_ARCH ${LLVM_HOST_TRIPLE})
+# Configure and create module cache directories.
+set(LLDB_TEST_MODULE_CACHE_LLDB "${LLDB_TEST_BUILD_DIRECTORY}/module-cache-lldb" CACHE PATH "The Clang module cache used by the Clang embedded in LLDB while running tests.")
+set(LLDB_TEST_MODULE_CACHE_CLANG "${LLDB_TEST_BUILD_DIRECTORY}/module-cache-clang" CACHE PATH "The Clang module cache used by the Clang while building tests.")
+file(MAKE_DIRECTORY ${LLDB_TEST_MODULE_CACHE_LLDB})
+file(MAKE_DIRECTORY ${LLDB_TEST_MODULE_CACHE_CLANG})
+
+# LLVM_BUILD_MODE is used in lit.site.cfg
+if (CMAKE_CFG_INTDIR STREQUAL ".")
+  set(LLVM_BUILD_MODE ".")
+else ()
+  set(LLVM_BUILD_MODE "%(build_mode)s")
 endif ()
 
-# Allow the user to override the default by setting LLDB_TEST_ARCH
-set(LLDB_TEST_ARCH
-  ${LLDB_DEFAULT_TEST_ARCH}
-  CACHE STRING "Specify the architecture to run LLDB tests as (x86|x64).  Determines whether tests are compiled with -m32 or -m64")
+string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_LIBS_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
 
-# Users can override LLDB_TEST_USER_ARGS to specify arbitrary arguments to pass to the script
-set(LLDB_TEST_USER_ARGS
-  ""
-  CACHE STRING "Specify additional arguments to pass to test runner. For example: '-C gcc -C clang -A i386 -A x86_64'")
+# Create a custom target to track test dependencies.
+add_custom_target(lldb-test-deps)
+set_target_properties(lldb-test-deps PROPERTIES FOLDER "lldb misc")
 
-# The .noindex suffix is a marker for Spotlight to never index the
-# build directory.  LLDB queries Spotlight to locate .dSYM bundles
-# based on the UUID embedded in a binary, and because the UUID is a
-# hash of filename and .text section, there *will* be conflicts inside
-# the build directory.
-set(LLDB_TEST_COMMON_ARGS
-  --arch=${LLDB_TEST_ARCH}
-  -s
-  ${CMAKE_BINARY_DIR}/lldb-test-traces
-  --build-dir
-  ${CMAKE_BINARY_DIR}/lldb-test-build.noindex
-  -S nm
-  -u CXXFLAGS
-  -u CFLAGS
+function(add_lldb_test_dependency)
+  foreach(dependency ${ARGN})
+    add_dependencies(lldb-test-deps ${dependency})
+  endforeach()
+endfunction(add_lldb_test_dependency)
+
+# lldb itself and lldb-test is an hard dependency for the testsuites.
+add_lldb_test_dependency(lldb)
+add_lldb_test_dependency(lldb-test)
+
+# On Darwin, darwin-debug is an hard dependency for the testsuites.
+if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
+  add_lldb_test_dependency(darwin-debug)
+endif()
+
+if(TARGET lldb-server)
+  add_lldb_test_dependency(lldb-server)
+endif()
+
+if(TARGET lldb-vscode)
+  add_lldb_test_dependency(lldb-vscode)
+endif()
+
+if(TARGET lldb-instr)
+  add_lldb_test_dependency(lldb-instr)
+endif()
+
+if(TARGET liblldb)
+  add_lldb_test_dependency(liblldb)
+endif()
+
+if(TARGET lldb-framework)
+  add_lldb_test_dependency(lldb-framework)
+endif()
+
+# Add dependencies that are not exported targets when building standalone.
+if(NOT LLDB_BUILT_STANDALONE)
+  add_lldb_test_dependency(
+    FileCheck
+    count
+    dsymutil
+    llvm-strip
+    not
+    yaml2obj
+  )
+endif()
+
+# Add dependencies if we test with the in-tree clang.
+# This works with standalone builds as they import the clang target.
+if(TARGET clang)
+  add_lldb_test_dependency(clang)
+
+  if(TARGET asan)
+    add_lldb_test_dependency(asan)
+  endif()
+
+  if(TARGET tsan)
+    add_lldb_test_dependency(tsan)
+  endif()
+
+  if(APPLE)
+    # FIXME: Standalone builds should import the cxx target as well.
+    if(LLDB_BUILT_STANDALONE)
+      # For now check that the include directory exists.
+      set(cxx_dir "${LLVM_BINARY_DIR}/include/c++")
+      if(NOT EXISTS ${cxx_dir})
+        message(WARNING "LLDB test suite requires libc++ in llvm/projects/libcxx or an existing build symlinked to ${cxx_dir}")
+      endif()
+    else()
+      # We require libcxx for the test suite, so if we aren't building it,
+      # try to provide a helpful error about how to resolve the situation.
+      if(NOT TARGET cxx)
+        if(LLVM_ENABLE_PROJECTS STREQUAL "")
+          # If `LLVM_ENABLE_PROJECTS` is not being used (implying that we are
+          # using the old layout), suggest checking it out.
+          message(FATAL_ERROR
+            "LLDB test suite requires libc++, but it is currently disabled. "
+            "Please checkout `libcxx` in `llvm/projects` or disable tests "
+            "via `LLDB_INCLUDE_TESTS=OFF`.")
+        else()
+          # If `LLVM_ENABLE_PROJECTS` is being used, suggest adding it.
+          message(FATAL_ERROR
+            "LLDB test suite requires libc++, but it is currently disabled. "
+            "Please add `libcxx` to `LLVM_ENABLE_PROJECTS` or disable tests "
+            "via `LLDB_INCLUDE_TESTS=OFF`.")
+        endif()
+      endif()
+      add_lldb_test_dependency(cxx)
+    endif()
+  endif()
+endif()
+
+add_lldb_test_dependency(
+  lit-cpuid
+  llc
+  lli
+  llvm-config
+  llvm-dwarfdump
+  llvm-nm
+  llvm-mc
+  llvm-objcopy
+  llvm-readobj
   )
 
-list(APPEND LLDB_TEST_COMMON_ARGS
-  --executable ${LLDB_TEST_EXECUTABLE}
-  --dsymutil ${LLDB_TEST_DSYMUTIL}
-  --filecheck ${LLDB_TEST_FILECHECK}
-  -C ${LLDB_TEST_C_COMPILER}
-  )
-
-if ( CMAKE_SYSTEM_NAME MATCHES "Windows" )
-  # All tests are currently flaky on Windows, so rerun them all once when they fail.
-  set(LLDB_TEST_COMMON_ARGS ${LLDB_TEST_COMMON_ARGS} --rerun-all-issues)
-
-  set(LLDB_TEST_DEBUG_TEST_CRASHES
-    0
-    CACHE BOOL "(Windows only) Enables debugging of tests in the test suite by showing the crash dialog when lldb crashes")
-
-  set(LLDB_TEST_HIDE_CONSOLE_WINDOWS
-    1
-    CACHE BOOL "(Windows only) Hides the console window for an inferior when it is launched through the test suite")
-
-  if (LLDB_TEST_DEBUG_TEST_CRASHES)
-    set(LLDB_TEST_COMMON_ARGS ${LLDB_TEST_COMMON_ARGS} --enable-crash-dialog)
-  endif()
-
-  if (NOT LLDB_TEST_HIDE_CONSOLE_WINDOWS)
-    set(LLDB_TEST_COMMON_ARGS ${LLDB_TEST_COMMON_ARGS} --show-inferior-console)
+if(TARGET lld)
+  add_lldb_test_dependency(lld)
+else()
+  # LLD is required to link test executables on Windows.
+  if (CMAKE_SYSTEM_NAME MATCHES "Windows")
+    message(WARNING "lld required to test LLDB on Windows")
   endif()
 endif()
 
-if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows|Darwin")
-  list(APPEND LLDB_TEST_COMMON_ARGS
-    --env ARCHIVER=${CMAKE_AR} --env OBJCOPY=${CMAKE_OBJCOPY})
+if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+  set(LLDB_IS_64_BITS 1)
 endif()
 
-if (NOT "${LLDB_LIT_TOOLS_DIR}" STREQUAL "")
-  if (NOT EXISTS "${LLDB_LIT_TOOLS_DIR}")
-    message(WARNING "LLDB_LIT_TOOLS_DIR ${LLDB_LIT_TOOLS_DIR} does not exist.")
-  endif()
-endif()
+# These values are not canonicalized within LLVM.
+llvm_canonicalize_cmake_booleans(
+  LLDB_ENABLE_PYTHON
+  LLDB_ENABLE_LUA
+  LLDB_ENABLE_LZMA
+  LLVM_ENABLE_ZLIB
+  LLVM_ENABLE_SHARED_LIBS
+  LLDB_IS_64_BITS)
 
-if(CMAKE_HOST_APPLE)
-  if(LLDB_BUILD_FRAMEWORK)
-    get_target_property(framework_build_dir liblldb LIBRARY_OUTPUT_DIRECTORY)
-    list(APPEND LLDB_TEST_COMMON_ARGS --framework ${framework_build_dir}/LLDB.framework)
-  endif()
+# Configure the individual test suites.
+add_subdirectory(API)
+add_subdirectory(Shell)
+add_subdirectory(Unit)
 
-  # Use the same identity for testing
-  get_property(code_sign_identity_used GLOBAL PROPERTY LLDB_DEBUGSERVER_CODESIGN_IDENTITY)
-  if(code_sign_identity_used)
-    list(APPEND LLDB_TEST_COMMON_ARGS --codesign-identity "${code_sign_identity_used}")
-  endif()
+# Configure the top level test suite.
+configure_lit_site_cfg(
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
+  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
+  MAIN_CONFIG
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py)
 
-  if(LLDB_USE_SYSTEM_DEBUGSERVER)
-    lldb_find_system_debugserver(system_debugserver_path)
-    message(STATUS "LLDB tests use out-of-tree debugserver: ${system_debugserver_path}")
-    list(APPEND LLDB_TEST_COMMON_ARGS --out-of-tree-debugserver)
-  else()
-    set(debugserver_path ${LLVM_RUNTIME_OUTPUT_INTDIR}/debugserver)
-    message(STATUS "LLDB Tests use just-built debugserver: ${debugserver_path}")
-    list(APPEND LLDB_TEST_COMMON_ARGS --server ${debugserver_path})
-    add_dependencies(lldb-test-deps debugserver)
-  endif()
-endif()
+add_lit_testsuites(LLDB
+  ${CMAKE_CURRENT_SOURCE_DIR}
+  DEPENDS lldb-test-deps)
 
-set(LLDB_DOTEST_ARGS ${LLDB_TEST_COMMON_ARGS};${LLDB_TEST_USER_ARGS})
-set_property(GLOBAL PROPERTY LLDB_DOTEST_ARGS_PROPERTY ${LLDB_DOTEST_ARGS})
+add_lit_testsuite(check-lldb-lit "Running lldb lit test suite"
+  ${CMAKE_CURRENT_BINARY_DIR}
+  DEPENDS lldb-test-deps)
+set_target_properties(check-lldb-lit PROPERTIES FOLDER "lldb tests")
 
-add_python_test_target(check-lldb-single
-  ${LLDB_SOURCE_DIR}/test/dotest.py
-  "--no-multiprocess;${LLDB_DOTEST_ARGS}"
-  "Testing LLDB with args: ${LLDB_DOTEST_ARGS}"
-  )
-set_target_properties(check-lldb-single PROPERTIES FOLDER "lldb misc")
-
-# If tests crash cause LLDB to crash, or things are otherwise unstable, or if machine-parsable
-# output is desired (i.e. in continuous integration contexts) check-lldb-single is a better target.
 add_custom_target(check-lldb)
 add_dependencies(check-lldb lldb-test-deps)
 set_target_properties(check-lldb PROPERTIES FOLDER "lldb misc")
-
-# If we're building with an in-tree clang, then list clang as a dependency
-# to run tests.
-if (TARGET clang)
-  add_dependencies(check-lldb clang)
-endif()
-
-# LLD is required to link test executables on Windows.
-if (CMAKE_SYSTEM_NAME MATCHES "Windows")
-  if (TARGET lld)
-    add_dependencies(check-lldb lld)
-  else ()
-    message(WARNING "lld required to test LLDB on Windows")
-  endif ()
-endif ()
-
-# Run the lit-style tests and the unittests as part of the check-lldb target.
 add_dependencies(check-lldb check-lldb-lit)
-
-# This will add LLDB's test dependencies to the dependencies for check-all and
-# include them in the test-depends target.
-set_property(GLOBAL APPEND PROPERTY LLVM_LIT_DEPENDS ${ARG_DEPENDS})
diff --git a/src/llvm-project/lldb/test/Shell/.clang-format b/src/llvm-project/lldb/test/Shell/.clang-format
new file mode 100644
index 0000000..e032e3d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/.clang-format
@@ -0,0 +1,3 @@
+BasedOnStyle: LLVM
+# We don't want clang-format to introduce line breaks in RUN commands.
+ColumnLimit: 999
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/case-sensitive.c b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/case-sensitive.c
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/case-sensitive.c
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/case-sensitive.c
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_addrx.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_addrx.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_addrx.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_addrx.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_rnglist_basic.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_rnglist_basic.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_rnglist_basic.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_rnglist_basic.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_rnglist_offset_pair.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_rnglist_offset_pair.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_rnglist_offset_pair.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_rnglist_offset_pair.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_rnglist_rlestartend.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_rnglist_rlestartend.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_rnglist_rlestartend.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_rnglist_rlestartend.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_rnglistx_rlex.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_rnglistx_rlex.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/debug_rnglistx_rlex.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/debug_rnglistx_rlex.yaml
diff --git a/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/dummy-target.c b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/dummy-target.c
new file mode 100644
index 0000000..76e8197
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/dummy-target.c
@@ -0,0 +1 @@
+int main() { return 0; }
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/implicit_const_form_support.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/implicit_const_form_support.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/implicit_const_form_support.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/implicit_const_form_support.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/jitbp.cpp b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/jitbp.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/jitbp.cpp
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/jitbp.cpp
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/ppc64-localentry.s b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/ppc64-localentry.s
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/ppc64-localentry.s
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/ppc64-localentry.s
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.o.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/single-file-split-dwarf.o.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.o.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/single-file-split-dwarf.o.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/single-file-split-dwarf.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/single-file-split-dwarf.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/single-file-split-dwarf.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.dwo.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf-5-addrbase.dwo.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.dwo.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf-5-addrbase.dwo.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf-5-addrbase.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf-5-addrbase.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf-5-addrbase.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file1.dwo.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-file2.dwo.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-main.yaml b/src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-main.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-main.yaml
rename to src/llvm-project/lldb/test/Shell/Breakpoint/Inputs/split-dwarf5-debug-stroffsets-main.yaml
diff --git a/src/llvm-project/lldb/lit/Breakpoint/case-insensitive.test b/src/llvm-project/lldb/test/Shell/Breakpoint/case-insensitive.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/case-insensitive.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/case-insensitive.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/case-sensitive.test b/src/llvm-project/lldb/test/Shell/Breakpoint/case-sensitive.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/case-sensitive.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/case-sensitive.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/debug_addrx.test b/src/llvm-project/lldb/test/Shell/Breakpoint/debug_addrx.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/debug_addrx.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/debug_addrx.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/debug_rnglist_basic.test b/src/llvm-project/lldb/test/Shell/Breakpoint/debug_rnglist_basic.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/debug_rnglist_basic.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/debug_rnglist_basic.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/debug_rnglist_offset_pair.test b/src/llvm-project/lldb/test/Shell/Breakpoint/debug_rnglist_offset_pair.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/debug_rnglist_offset_pair.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/debug_rnglist_offset_pair.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/debug_rnglist_rlestartend.test b/src/llvm-project/lldb/test/Shell/Breakpoint/debug_rnglist_rlestartend.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/debug_rnglist_rlestartend.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/debug_rnglist_rlestartend.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/debug_rnglistx_rlex.test b/src/llvm-project/lldb/test/Shell/Breakpoint/debug_rnglistx_rlex.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/debug_rnglistx_rlex.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/debug_rnglistx_rlex.test
diff --git a/src/llvm-project/lldb/test/Shell/Breakpoint/dummy-target.test b/src/llvm-project/lldb/test/Shell/Breakpoint/dummy-target.test
new file mode 100644
index 0000000..873a4d3
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Breakpoint/dummy-target.test
@@ -0,0 +1,23 @@
+# RUN: mkdir -p %t
+# RUN: cd %t
+# RUN: %build %p/Inputs/dummy-target.c -o dummy.out
+# RUN: %lldb -b -s %s dummy.out | FileCheck %s
+
+breakpoint set -D -n main
+# CHECK: Breakpoint {{[0-9]}}: no locations (pending).
+# CHECK: Breakpoint set in dummy target
+
+breakpoint list
+# CHECK: No breakpoints currently set
+
+breakpoint list -D
+# CHECK: name = 'main', locations = 0 (pending)
+
+target delete
+# CHECK: 1 targets deleted
+
+target create dummy.out
+# CHECK: Current executable set to {{.*}}dummy.out
+
+breakpoint list
+# CHECK: name = 'main', locations = {{[1-9]}}
diff --git a/src/llvm-project/lldb/lit/Breakpoint/implicit_const_form_support.test b/src/llvm-project/lldb/test/Shell/Breakpoint/implicit_const_form_support.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/implicit_const_form_support.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/implicit_const_form_support.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/jitbp_elf.test b/src/llvm-project/lldb/test/Shell/Breakpoint/jitbp_elf.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/jitbp_elf.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/jitbp_elf.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/ppc64-localentry.test b/src/llvm-project/lldb/test/Shell/Breakpoint/ppc64-localentry.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/ppc64-localentry.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/ppc64-localentry.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/single-file-split-dwarf.test b/src/llvm-project/lldb/test/Shell/Breakpoint/single-file-split-dwarf.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/single-file-split-dwarf.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/single-file-split-dwarf.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/split-dwarf-5-addrbase.test b/src/llvm-project/lldb/test/Shell/Breakpoint/split-dwarf-5-addrbase.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/split-dwarf-5-addrbase.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/split-dwarf-5-addrbase.test
diff --git a/src/llvm-project/lldb/lit/Breakpoint/split-dwarf5-debug-stroffsets.test b/src/llvm-project/lldb/test/Shell/Breakpoint/split-dwarf5-debug-stroffsets.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Breakpoint/split-dwarf5-debug-stroffsets.test
rename to src/llvm-project/lldb/test/Shell/Breakpoint/split-dwarf5-debug-stroffsets.test
diff --git a/src/llvm-project/lldb/lit/BuildScript/compiler-full-path.test b/src/llvm-project/lldb/test/Shell/BuildScript/compiler-full-path.test
similarity index 100%
rename from src/llvm-project/lldb/lit/BuildScript/compiler-full-path.test
rename to src/llvm-project/lldb/test/Shell/BuildScript/compiler-full-path.test
diff --git a/src/llvm-project/lldb/lit/BuildScript/modes.test b/src/llvm-project/lldb/test/Shell/BuildScript/modes.test
similarity index 100%
rename from src/llvm-project/lldb/lit/BuildScript/modes.test
rename to src/llvm-project/lldb/test/Shell/BuildScript/modes.test
diff --git a/src/llvm-project/lldb/lit/BuildScript/script-args.test b/src/llvm-project/lldb/test/Shell/BuildScript/script-args.test
similarity index 100%
rename from src/llvm-project/lldb/lit/BuildScript/script-args.test
rename to src/llvm-project/lldb/test/Shell/BuildScript/script-args.test
diff --git a/src/llvm-project/lldb/lit/BuildScript/toolchain-clang-cl.test b/src/llvm-project/lldb/test/Shell/BuildScript/toolchain-clang-cl.test
similarity index 100%
rename from src/llvm-project/lldb/lit/BuildScript/toolchain-clang-cl.test
rename to src/llvm-project/lldb/test/Shell/BuildScript/toolchain-clang-cl.test
diff --git a/src/llvm-project/lldb/lit/BuildScript/toolchain-clang.test b/src/llvm-project/lldb/test/Shell/BuildScript/toolchain-clang.test
similarity index 100%
rename from src/llvm-project/lldb/lit/BuildScript/toolchain-clang.test
rename to src/llvm-project/lldb/test/Shell/BuildScript/toolchain-clang.test
diff --git a/src/llvm-project/lldb/lit/BuildScript/toolchain-msvc.test b/src/llvm-project/lldb/test/Shell/BuildScript/toolchain-msvc.test
similarity index 100%
rename from src/llvm-project/lldb/lit/BuildScript/toolchain-msvc.test
rename to src/llvm-project/lldb/test/Shell/BuildScript/toolchain-msvc.test
diff --git a/src/llvm-project/lldb/test/Shell/CMakeLists.txt b/src/llvm-project/lldb/test/Shell/CMakeLists.txt
new file mode 100644
index 0000000..91b4e28
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/CMakeLists.txt
@@ -0,0 +1,9 @@
+# Configure the Shell test suite.
+configure_lit_site_cfg(
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
+  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
+  MAIN_CONFIG
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py)
+configure_file(
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit-lldb-init.in
+  ${CMAKE_CURRENT_BINARY_DIR}/lit-lldb-init)
diff --git a/src/llvm-project/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputConsole.test b/src/llvm-project/lldb/test/Shell/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputConsole.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputConsole.test
rename to src/llvm-project/lldb/test/Shell/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputConsole.test
diff --git a/src/llvm-project/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test b/src/llvm-project/lldb/test/Shell/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test
rename to src/llvm-project/lldb/test/Shell/Commands/CommandScriptImmediateOutput/CommandScriptImmediateOutputFile.test
diff --git a/src/llvm-project/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py b/src/llvm-project/lldb/test/Shell/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py
similarity index 100%
rename from src/llvm-project/lldb/lit/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py
rename to src/llvm-project/lldb/test/Shell/Commands/CommandScriptImmediateOutput/Inputs/custom_command.py
diff --git a/src/llvm-project/lldb/lit/Commands/CommandScriptImmediateOutput/lit.local.cfg b/src/llvm-project/lldb/test/Shell/Commands/CommandScriptImmediateOutput/lit.local.cfg
similarity index 100%
rename from src/llvm-project/lldb/lit/Commands/CommandScriptImmediateOutput/lit.local.cfg
rename to src/llvm-project/lldb/test/Shell/Commands/CommandScriptImmediateOutput/lit.local.cfg
diff --git a/src/llvm-project/lldb/test/Shell/Commands/Inputs/frame.py b/src/llvm-project/lldb/test/Shell/Commands/Inputs/frame.py
new file mode 100644
index 0000000..4059174
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Commands/Inputs/frame.py
@@ -0,0 +1,2 @@
+import lldb
+print("frame.py: {}".format(lldb.frame))
diff --git a/src/llvm-project/lldb/lit/Settings/Inputs/main.c b/src/llvm-project/lldb/test/Shell/Commands/Inputs/main.c
similarity index 100%
copy from src/llvm-project/lldb/lit/Settings/Inputs/main.c
copy to src/llvm-project/lldb/test/Shell/Commands/Inputs/main.c
diff --git a/src/llvm-project/lldb/lit/Commands/command-backtrace.test b/src/llvm-project/lldb/test/Shell/Commands/command-backtrace.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Commands/command-backtrace.test
rename to src/llvm-project/lldb/test/Shell/Commands/command-backtrace.test
diff --git a/src/llvm-project/lldb/lit/Commands/command-regex-delete.test b/src/llvm-project/lldb/test/Shell/Commands/command-regex-delete.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Commands/command-regex-delete.test
rename to src/llvm-project/lldb/test/Shell/Commands/command-regex-delete.test
diff --git a/src/llvm-project/lldb/lit/Commands/command-regex-unalias.test b/src/llvm-project/lldb/test/Shell/Commands/command-regex-unalias.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Commands/command-regex-unalias.test
rename to src/llvm-project/lldb/test/Shell/Commands/command-regex-unalias.test
diff --git a/src/llvm-project/lldb/test/Shell/Commands/command-script-import.test b/src/llvm-project/lldb/test/Shell/Commands/command-script-import.test
new file mode 100644
index 0000000..ab18844
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Commands/command-script-import.test
@@ -0,0 +1,13 @@
+# REQUIRES: python
+# RUN: echo 'b main' > %t.in
+# RUN: echo 'run' >> %t.in
+# RUN: echo 'command script import %S/Inputs/frame.py' >> %t.in
+
+# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out
+# RUN: %lldb -b -s %t.in -o 'script print("script: {}".format(lldb.frame))' %t.out | FileCheck %s
+
+# Make sure that we don't have access to lldb.frame from the Python script.
+# CHECK: frame.py: None
+
+# Make sure that we do have access to lldb.frame from the script command.
+# CHECK: script: frame #0
diff --git a/src/llvm-project/lldb/lit/Commands/command-source.test b/src/llvm-project/lldb/test/Shell/Commands/command-source.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Commands/command-source.test
rename to src/llvm-project/lldb/test/Shell/Commands/command-source.test
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/.lldbinit b/src/llvm-project/lldb/test/Shell/Driver/Inputs/.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/.lldbinit
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/.lldbinit
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/Print0.in b/src/llvm-project/lldb/test/Shell/Driver/Inputs/Print0.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/Print0.in
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/Print0.in
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/Print2.in b/src/llvm-project/lldb/test/Shell/Driver/Inputs/Print2.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/Print2.in
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/Print2.in
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/Print4.in b/src/llvm-project/lldb/test/Shell/Driver/Inputs/Print4.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/Print4.in
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/Print4.in
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/Print6.in b/src/llvm-project/lldb/test/Shell/Driver/Inputs/Print6.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/Print6.in
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/Print6.in
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/convenience.in b/src/llvm-project/lldb/test/Shell/Driver/Inputs/convenience.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/convenience.in
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/convenience.in
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/hello.c b/src/llvm-project/lldb/test/Shell/Driver/Inputs/hello.c
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/hello.c
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/hello.c
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/hello.cpp b/src/llvm-project/lldb/test/Shell/Driver/Inputs/hello.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/hello.cpp
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/hello.cpp
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/process_attach_pid.in b/src/llvm-project/lldb/test/Shell/Driver/Inputs/process_attach_pid.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/process_attach_pid.in
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/process_attach_pid.in
diff --git a/src/llvm-project/lldb/lit/Driver/Inputs/syntax_error.py b/src/llvm-project/lldb/test/Shell/Driver/Inputs/syntax_error.py
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/Inputs/syntax_error.py
rename to src/llvm-project/lldb/test/Shell/Driver/Inputs/syntax_error.py
diff --git a/src/llvm-project/lldb/lit/Driver/LocalLLDBInit.test b/src/llvm-project/lldb/test/Shell/Driver/LocalLLDBInit.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/LocalLLDBInit.test
rename to src/llvm-project/lldb/test/Shell/Driver/LocalLLDBInit.test
diff --git a/src/llvm-project/lldb/lit/Driver/TestCommands.test b/src/llvm-project/lldb/test/Shell/Driver/TestCommands.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/TestCommands.test
rename to src/llvm-project/lldb/test/Shell/Driver/TestCommands.test
diff --git a/src/llvm-project/lldb/test/Shell/Driver/TestConvenienceVariables.test b/src/llvm-project/lldb/test/Shell/Driver/TestConvenienceVariables.test
new file mode 100644
index 0000000..d9c8f75
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Driver/TestConvenienceVariables.test
@@ -0,0 +1,20 @@
+REQUIRES: python
+RUN: mkdir -p %t
+RUN: %build %p/Inputs/hello.cpp -o %t/target.out
+RUN: %lldb %t/target.out -s %p/Inputs/convenience.in -o quit | FileCheck %s
+
+CHECK: stop reason = breakpoint 1.1
+CHECK: script print(lldb.debugger)
+CHECK-NEXT: Debugger (instance: {{.*}}, id: {{[0-9]+}})
+CHECK: script print(lldb.target)
+CHECK-NEXT: target.out
+CHECK: script print(lldb.process)
+CHECK-NEXT: SBProcess: pid = {{[0-9]+}}, state = stopped, threads = {{[0-9]+}}, executable = target.out
+CHECK: script print(lldb.thread.GetStopDescription(100))
+CHECK-NEXT: breakpoint 1.1
+CHECK: script lldb.frame.GetLineEntry().GetLine()
+CHECK-NEXT: 8
+CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
+CHECK-NEXT: hello.c
+CHECK: script lldb.frame.GetFunctionName()
+CHECK-NEXT: main
diff --git a/src/llvm-project/lldb/lit/Driver/TestCore.test b/src/llvm-project/lldb/test/Shell/Driver/TestCore.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/TestCore.test
rename to src/llvm-project/lldb/test/Shell/Driver/TestCore.test
diff --git a/src/llvm-project/lldb/lit/Driver/TestFile.test b/src/llvm-project/lldb/test/Shell/Driver/TestFile.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/TestFile.test
rename to src/llvm-project/lldb/test/Shell/Driver/TestFile.test
diff --git a/src/llvm-project/lldb/lit/Driver/TestNoUseColor.test b/src/llvm-project/lldb/test/Shell/Driver/TestNoUseColor.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/TestNoUseColor.test
rename to src/llvm-project/lldb/test/Shell/Driver/TestNoUseColor.test
diff --git a/src/llvm-project/lldb/lit/Driver/TestProcessAttach.test b/src/llvm-project/lldb/test/Shell/Driver/TestProcessAttach.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/TestProcessAttach.test
rename to src/llvm-project/lldb/test/Shell/Driver/TestProcessAttach.test
diff --git a/src/llvm-project/lldb/lit/Driver/TestRepl.test b/src/llvm-project/lldb/test/Shell/Driver/TestRepl.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Driver/TestRepl.test
rename to src/llvm-project/lldb/test/Shell/Driver/TestRepl.test
diff --git a/src/llvm-project/lldb/test/Shell/Driver/TestSingleQuote.test b/src/llvm-project/lldb/test/Shell/Driver/TestSingleQuote.test
new file mode 100644
index 0000000..af321ba
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Driver/TestSingleQuote.test
@@ -0,0 +1,6 @@
+# Make sure lldb can handle filenames with single quotes in them.
+# RUN: %clang_host %p/Inputs/hello.c -g -o "%t-'pat"
+# RUN: %lldb -s %s "%t-'pat" | FileCheck %s
+
+br set -p return
+# CHECK: Breakpoint 1: where = TestSingleQuote.test.tmp-'pat`main
diff --git a/src/llvm-project/lldb/test/Shell/Driver/TestTarget.test b/src/llvm-project/lldb/test/Shell/Driver/TestTarget.test
new file mode 100644
index 0000000..59ab3a4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Driver/TestTarget.test
@@ -0,0 +1,7 @@
+# Make sure lldb resolves the target path.
+# RUN: mkdir -p %t/foo
+# RUN: cd %t/foo
+# RUN: %clang_host %p/Inputs/hello.c -g -o a.out
+# RUN: %lldb -b a.out | FileCheck %s
+
+# CHECK: Current executable set to '{{.*}}foo{{[/\\\\]+}}a.out'
diff --git a/src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-1.lldbinit b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-1.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-1.lldbinit
rename to src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-1.lldbinit
diff --git a/src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit
rename to src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-2.lldbinit
diff --git a/src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit
rename to src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-3.lldbinit
diff --git a/src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-threads-1.lldbinit b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-threads-1.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-threads-1.lldbinit
rename to src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-threads-1.lldbinit
diff --git a/src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-threads-2.lldbinit b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-threads-2.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-threads-2.lldbinit
rename to src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-threads-2.lldbinit
diff --git a/src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-threads.cpp b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-threads.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook-threads.cpp
rename to src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook-threads.cpp
diff --git a/src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook.c b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook.c
similarity index 100%
rename from src/llvm-project/lldb/lit/ExecControl/StopHook/Inputs/stop-hook.c
rename to src/llvm-project/lldb/test/Shell/ExecControl/StopHook/Inputs/stop-hook.c
diff --git a/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test
new file mode 100644
index 0000000..9deaa86
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/stop-hook-threads.test
@@ -0,0 +1,35 @@
+# RUN: %clangxx_host -std=c++11 %p/Inputs/stop-hook-threads.cpp -g -o %t
+# RUN: %lldb -b -s %p/Inputs/stop-hook-threads-1.lldbinit -s %s -f %t \
+# RUN:     | FileCheck --check-prefix=CHECK --check-prefix=CHECK-NO-FILTER %s
+# RUN: %lldb -b -s %p/Inputs/stop-hook-threads-2.lldbinit -s %s -f %t \
+# RUN:     | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FILTER %s
+# XFAIL: system-netbsd
+# UNSUPPORTED: system-windows
+# This test is flakey and hangs on windows periodically: llvm.org/pr38373
+# UNSUPPORTED: system-linux, system-darwin
+
+thread list
+break set -f stop-hook-threads.cpp -p "Set break point at this line"
+target stop-hook list
+
+# CHECK: Hook: 1
+# CHECK-NEXT:  State: enabled
+# CHECK-NO-FILTER-NEXT: AutoContinue on
+# CHECK-FILTER-NEXT:  Thread
+# CHECK-FILTER-NEXT:  index: 2
+# CHECK-NEXT:  Commands: 
+# CHECK-NEXT:    expr lldb_val += 1
+# CHECK-NEXT:    thread list
+
+# CHECK-FILTER: Hook: 2
+# CHECK-FILTER-NEXT:  State: enabled
+# CHECK-FILTER-NEXT:  AutoContinue on
+# CHECK-FILTER-NEXT:  Commands: 
+# CHECK-FILTER-NEXT:    script print('Hit stop hook')
+
+# Get the threads going
+continue
+
+# Now make sure we hit the command the right number of times:
+# CHECK-NO-FILTER: lldb_val was set to: 15.
+# CHECK-FILTER: lldb_val was set to: 5.
diff --git a/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/stop-hook.test b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/stop-hook.test
new file mode 100644
index 0000000..a06de66
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ExecControl/StopHook/stop-hook.test
@@ -0,0 +1,76 @@
+# RUN: %clang_host %p/Inputs/stop-hook.c -g -o %t
+# Test setting stop-hook per-function
+# RUN: %lldb -b -s %p/Inputs/stop-hook-1.lldbinit -s %s -f %t \
+# RUN:      | FileCheck --check-prefix=CHECK --check-prefix=CHECK-FUNC %s
+# Test setting stop-hook per-line range
+# RUN: %lldb -b -s %p/Inputs/stop-hook-2.lldbinit -s %s -f %t | FileCheck %s
+# Test setting stop-hook with multi-line expression
+# RUN: %lldb -b -s %p/Inputs/stop-hook-3.lldbinit -s %s -f %t | FileCheck %s
+# This test is not "unsupported" on Windows, but it fails because "expr ptr"
+# does not evaluate correctly. However, the error message contains the expected
+# string, so the test "passes" despite the fact that the commands failed
+# llvm.org/pr40119
+# UNSUPPORTED: system-windows
+
+break set -f stop-hook.c -p "// Set breakpoint here to test target stop-hook"
+break set -f stop-hook.c -p "// Another breakpoint which is outside of the stop-hook range"
+target stop-hook list
+
+# CHECK: Hook: 1
+# CHECK-NEXT:  State: enabled
+# CHECK-NEXT:  Specifier:
+# CHECK-FUNC-NEXT:    Function: b.
+# CHECK-NEXT:  Commands: 
+# CHECK-NEXT:    expr ptr
+
+target stop-hook disable
+
+target stop-hook list
+# CHECK: Hook: 1
+# CHECK-NEXT:  State: disabled
+# CHECK-NEXT:  Specifier:
+# CHECK-FUNC-NEXT:    Function: b.
+# CHECK-NEXT:  Commands: 
+# CHECK-NEXT:    expr ptr
+
+target stop-hook enable
+
+target stop-hook list
+# CHECK: Hook: 1
+# CHECK-NEXT:  State: enabled
+# CHECK-NEXT:  Specifier:
+# CHECK-FUNC-NEXT:    Function: b.
+# CHECK-NEXT:  Commands: 
+# CHECK-NEXT:    expr ptr
+
+run
+# Stopping inside of the stop hook range
+# CHECK: (lldb) run
+# CHECK-NEXT: (void *) $0 = 0x
+
+thread step-over
+# Stepping inside of the stop hook range
+# CHECK: (lldb) thread step-over
+# CHECK-NEXT: (void *) $1 = 0x
+# CHECK: ->{{.*}} // We should stop here after stepping.
+
+process continue
+# Stopping outside of the stop hook range
+# CHECK: (lldb) process continue
+# CHECK-NOT: (void *)
+# CHECK: ->{{.*}} // Another breakpoint which is outside of the stop-hook range.
+
+thread step-over
+# Stepping inside of the stop hook range
+# CHECK: (lldb) thread step-over
+# CHECK-NOT: (void *)
+
+settings set auto-confirm true
+target stop-hook delete
+
+target stop-hook list
+# CHECK: (lldb) target stop-hook list
+# CHECK-NOT: Hook: 1
+# CHECK: No stop hooks
+# CHECK-NOT: Hook: 1
+
diff --git a/src/llvm-project/lldb/lit/Expr/Inputs/call-function.cpp b/src/llvm-project/lldb/test/Shell/Expr/Inputs/call-function.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Expr/Inputs/call-function.cpp
rename to src/llvm-project/lldb/test/Shell/Expr/Inputs/call-function.cpp
diff --git a/src/llvm-project/lldb/lit/Expr/Inputs/ir-memory-map-basic b/src/llvm-project/lldb/test/Shell/Expr/Inputs/ir-memory-map-basic
similarity index 100%
rename from src/llvm-project/lldb/lit/Expr/Inputs/ir-memory-map-basic
rename to src/llvm-project/lldb/test/Shell/Expr/Inputs/ir-memory-map-basic
diff --git a/src/llvm-project/lldb/lit/Expr/Inputs/ir-memory-map-mix-malloc-free b/src/llvm-project/lldb/test/Shell/Expr/Inputs/ir-memory-map-mix-malloc-free
similarity index 100%
rename from src/llvm-project/lldb/lit/Expr/Inputs/ir-memory-map-mix-malloc-free
rename to src/llvm-project/lldb/test/Shell/Expr/Inputs/ir-memory-map-mix-malloc-free
diff --git a/src/llvm-project/lldb/lit/Expr/Inputs/ir-memory-map-overlap1 b/src/llvm-project/lldb/test/Shell/Expr/Inputs/ir-memory-map-overlap1
similarity index 100%
rename from src/llvm-project/lldb/lit/Expr/Inputs/ir-memory-map-overlap1
rename to src/llvm-project/lldb/test/Shell/Expr/Inputs/ir-memory-map-overlap1
diff --git a/src/llvm-project/lldb/test/Shell/Expr/TestIRMemoryMap.test b/src/llvm-project/lldb/test/Shell/Expr/TestIRMemoryMap.test
new file mode 100644
index 0000000..9dd0413
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Expr/TestIRMemoryMap.test
@@ -0,0 +1,12 @@
+# UNSUPPORTED: system-windows
+
+# RUN: %clangxx_host %p/Inputs/call-function.cpp -g -o %t
+
+# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-basic
+# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-basic
+
+# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-overlap1
+# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-overlap1
+
+# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-mix-malloc-free
+# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-mix-malloc-free
diff --git a/src/llvm-project/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test b/src/llvm-project/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test
new file mode 100644
index 0000000..ae29492
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Expr/TestIRMemoryMapWindows.test
@@ -0,0 +1,13 @@
+# REQUIRES: system-windows
+
+# RUN: %clang_cl_host /Zi /GS- %p/Inputs/call-function.cpp /c /o %t.obj
+# RUN: %msvc_link /debug:full %t.obj /out:%t
+
+# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-basic
+# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-basic
+
+# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-overlap1
+# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-overlap1
+
+# RUN: lldb-test ir-memory-map %t %S/Inputs/ir-memory-map-mix-malloc-free
+# RUN: lldb-test ir-memory-map -host-only %t %S/Inputs/ir-memory-map-mix-malloc-free
diff --git a/src/llvm-project/lldb/lit/Expr/TestMultilineExpr.test b/src/llvm-project/lldb/test/Shell/Expr/TestMultilineExpr.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Expr/TestMultilineExpr.test
rename to src/llvm-project/lldb/test/Shell/Expr/TestMultilineExpr.test
diff --git a/src/llvm-project/lldb/lit/Expr/TestTypeOfDeclTypeExpr.test b/src/llvm-project/lldb/test/Shell/Expr/TestTypeOfDeclTypeExpr.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Expr/TestTypeOfDeclTypeExpr.test
rename to src/llvm-project/lldb/test/Shell/Expr/TestTypeOfDeclTypeExpr.test
diff --git a/src/llvm-project/lldb/lit/Heap/Inputs/cstr.c b/src/llvm-project/lldb/test/Shell/Heap/Inputs/cstr.c
similarity index 100%
rename from src/llvm-project/lldb/lit/Heap/Inputs/cstr.c
rename to src/llvm-project/lldb/test/Shell/Heap/Inputs/cstr.c
diff --git a/src/llvm-project/lldb/test/Shell/Heap/heap-cstr.test b/src/llvm-project/lldb/test/Shell/Heap/heap-cstr.test
new file mode 100644
index 0000000..4515eb5
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Heap/heap-cstr.test
@@ -0,0 +1,10 @@
+# REQUIRES: system-darwin
+# RUN: %clang_host %p/Inputs/cstr.c -g -o %t
+# RUN: %lldb -b -s %s -f %t | FileCheck %s
+
+br set -p return
+command script import lldb.macosx.heap
+run
+cstr "patatino"
+
+# CHECK: {{.*}}: malloc(    16) -> {{.*}}
diff --git a/src/llvm-project/lldb/test/Shell/Host/Inputs/simple.c b/src/llvm-project/lldb/test/Shell/Host/Inputs/simple.c
new file mode 100644
index 0000000..06e216a
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Host/Inputs/simple.c
@@ -0,0 +1 @@
+int main(int argc, char const *argv[]) { return 0; }
diff --git a/src/llvm-project/lldb/test/Shell/Host/TestCustomShell.test b/src/llvm-project/lldb/test/Shell/Host/TestCustomShell.test
new file mode 100644
index 0000000..fd97b4c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Host/TestCustomShell.test
@@ -0,0 +1,15 @@
+# This test applies to POSIX.
+# UNSUPPORTED: system-windows
+
+# FIXME: ShellExpandArguments is unimplemented on the following targets.
+# UNSUPPORTED: system-linux
+# XFAIL: system-freebsd
+# XFAIL: system-netbsd
+# XFAIL: system-openbsd
+
+# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out
+# RUN: SHELL=bogus %lldb %t.out -b -o 'run' 2>&1 | FileCheck %s --check-prefix ERROR
+# RUN: env -i %lldb %t.out -b -o 'run' 2>&1 | FileCheck %s
+
+# ERROR: error: shell expansion failed
+# CHECK-NOT: error: shell expansion failed
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Inputs/basic-elf.yaml b/src/llvm-project/lldb/test/Shell/Minidump/Inputs/basic-elf.yaml
new file mode 100644
index 0000000..e6dc1b5
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Inputs/basic-elf.yaml
@@ -0,0 +1,40 @@
+--- !ELF
+FileHeader:      
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+Sections:        
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x0000000000004000
+    AddressAlign:    0x0000000000001000
+    Size:            0xb0
+  - Name:            .data
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_WRITE ]
+    Address:         0x0000000000005000
+    AddressAlign:    0x0000000000001000
+    Size:            0x42
+  - Name:            .note.gnu.build-id
+    Type:            SHT_NOTE
+    Flags:           [ SHF_ALLOC ]
+    Address:         0x0000000000005042
+    AddressAlign:    0x0000000000000004
+    Content:         040000000800000003000000474E5500DEADBEEFBAADF00D
+ProgramHeaders:
+  - Type: PT_LOAD
+    Flags: [ PF_X, PF_R ]
+    VAddr: 0x4000
+    Align: 0x1000
+    Sections:
+      - Section: .text
+  - Type: PT_LOAD
+    Flags: [ PF_W, PF_R ]
+    VAddr: 0x5000
+    Align: 0x1000
+    Sections:
+      - Section: .data
+      - Section: .note.gnu.build-id
+...
diff --git a/src/llvm-project/lldb/lit/Minidump/Inputs/linux-x86_64.syms b/src/llvm-project/lldb/test/Shell/Minidump/Inputs/linux-x86_64.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Minidump/Inputs/linux-x86_64.syms
rename to src/llvm-project/lldb/test/Shell/Minidump/Inputs/linux-x86_64.syms
diff --git a/src/llvm-project/lldb/lit/Minidump/Inputs/linux-x86_64.yaml b/src/llvm-project/lldb/test/Shell/Minidump/Inputs/linux-x86_64.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Minidump/Inputs/linux-x86_64.yaml
rename to src/llvm-project/lldb/test/Shell/Minidump/Inputs/linux-x86_64.yaml
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/arm-fp-unwind.dmp.yaml b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/arm-fp-unwind.dmp.yaml
new file mode 100644
index 0000000..330a761
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/arm-fp-unwind.dmp.yaml
@@ -0,0 +1,37 @@
+--- !minidump
+Version:         0xA0BAA793
+Flags:           0x0000000000000800
+Streams:
+  - Type:            ThreadList
+    Threads:
+      - Thread Id:       0x00004034
+        Suspend Count:   0x00000001
+        Priority Class:  0x00000020
+        Environment Block: 0x00000000007E6000
+        Context:         0000000000000000
+        Stack:
+          Start of Memory Range: 0x00000000008FF758
+          Content:         00000000000000
+  - Type:            ModuleList
+    Modules:
+      - Base of Image:   0x0000000000C70000
+        Size of Image:   0x00002000
+        Time Date Stamp: 1574942531
+        Module Name:     'arm-fp-unwind.exe'
+        CodeView Record: ''
+        Reserved0:       0x0000000000008140
+  - Type:            SystemInfo
+    Processor Arch:  ARM
+    Processor Level: 2049
+    Processor Revision: 2564
+    Number of Processors: 8
+    Product type:    1
+    Major Version:   10
+    Build Number:    18362
+    Platform ID:     Win32NT
+    Suite Mask:      0x0100
+    CPU:
+      CPUID:           0xEB8C1004
+  - Type:            MiscInfo
+    Content:         54050000F7010000183800002EB9DF5D00000000000000006C0700002B0100006C0700000400000003000000002000000D000000000000000100000088FFFFFF46004C00450020005300740061006E0064006100720064002000540069006D00650000000000000000000000000000000000000000000000000000000000000000000A000000050004000000000000000000000046004C00450020004400610079006C0069006700680074002000540069006D00650000000000000000000000000000000000000000000000000000000000000000000300000005000300000000000000C4FFFFFF310038003300360032002E003200330039002E00610072006D006600720065002E0031003900680031005F00720065006C0065006100730065005F007300760063005F00700072006F00640031002E003100390030003600320038002D0031003600340031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064006200670063006F00720065002E0077006F0061002C00310030002E0030002E00310038003300360032002E003100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+...
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/arm-fp-unwind.exe.yaml b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/arm-fp-unwind.exe.yaml
new file mode 100644
index 0000000..f322906
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/arm-fp-unwind.exe.yaml
@@ -0,0 +1,92 @@
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4097
+  ImageBase:       4194304
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ImportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  CertificateTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Architecture:
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader:
+    RelativeVirtualAddress: 0
+    Size:            0
+header:
+  Machine:         IMAGE_FILE_MACHINE_ARMNT
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_32BIT_MACHINE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     38
+    SectionData:     2DE90048EB46ADF5007D684600F004F80DF5007DBDE8008800BE01784278415C805C08447047
+symbols:
+  - Name:            .text
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+  - Name:            entry
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+  - Name:            other
+    Value:           24
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/broken-unwind.dmp.yaml b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/broken-unwind.dmp.yaml
new file mode 100644
index 0000000..2771104
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/broken-unwind.dmp.yaml
@@ -0,0 +1,35 @@
+--- !minidump
+Streams:
+  - Type:            ModuleList
+    Modules:
+      - Base of Image:   0x00000000000B0000
+        Size of Image:   0x00005000
+        Module Name:     'find-module.exe'
+        CodeView Record: 52534453E092B2141AD8F1B44C4C44205044422E01000000433A5C70726F6A656374735C746573745F6170705C436F6E736F6C654170706C69636174696F6E315C44656275675C436F6E736F6C654170706C69636174696F6E312E70646200
+  - Type:            SystemInfo
+    Processor Arch:  X86
+    Processor Level: 23
+    Processor Revision: 2050
+    Number of Processors: 32
+    Product type:    1
+    Major Version:   10
+    Build Number:    17134
+    Platform ID:     Win32NT
+    Suite Mask:      0x0300
+    CPU:
+      Vendor ID:       AuthenticAMD
+      Version Info:    0x00800F82
+      Feature Info:    0x178BFBFF
+      AMD Extended Features: 0x2FD3FBFF
+  - Type:            MiscInfo
+    Content:         54050000F703000008290000C883495D0000000000000000AC0D000098080000AC0D00000200000002000000002000000D0000000000000002000000C4FFFFFF430065006E007400720061006C0020004500750072006F007000650020005300740061006E0064006100720064002000540069006D006500000000000000000000000A0000000500030000000000000000000000430065006E007400720061006C0020004500750072006F00700065002000530075006D006D00650072002000540069006D00650000000000000000000000000000000300000005000200000000000000C4FFFFFF310037003100330034002E0031002E007800380036006600720065002E007200730034005F00720065006C0065006100730065002E003100380030003400310030002D00310038003000340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064006200670063006F00720065002E0069003300380036002C00310030002E0030002E00310037003100330034002E0031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006C816B92
+  - Type:            ThreadList
+    Threads:
+      - Thread Id:       0x0000290C
+        Priority Class:  0x00000020
+        Environment Block: 0x0000000000A98000
+        Context:         3F0001000000000000000000000000000000000000000000000000007F02000000000000FFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002B000000530000002B0000002B00000080100B0080100B000050A90080100B0080100B0000000000E4FECF0092100B0023000000440301007CFECF002B0000007F0200000000000000000000000000000000000000000000801F0000FFFF020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144E3D6C2000000001000000EA1E00F4C000E50700000000FC0100002CE3C014D8E202010000E507880F401D839DC60100000000400000007F00000000000000880F401D0A000000900F401D0000000000000100EA1E00009808E5077F00000000000000000000009008E507990100006002E5072CABC87708346474B42300000100000044E3C014200000000000000020532777A80F401D4F346474D00F401D6F378CCC5C4CD5010000000000000000000000000000000000000000000000003AFCD72F90E3C01418CE3470B4230000B80F401DC00F401DC80F401DD00F401D
+        Stack:
+          Start of Memory Range: 0x0000000000CFFE78
+          Content:         0000000079100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0085100B0094842777
+...
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/broken-unwind.exe.yaml b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/broken-unwind.exe.yaml
new file mode 100644
index 0000000..1a62023
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/broken-unwind.exe.yaml
@@ -0,0 +1,87 @@
+# The ExceptionTable RelativeVirtualAddress below points outside of allocated
+# sections.
+
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4224
+  ImageBase:       4194304
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_NO_SEH, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:     
+    RelativeVirtualAddress: 8327
+    Size:            90
+  ImportTable:     
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:   
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:  
+    RelativeVirtualAddress: 12303
+    Size:            12
+  CertificateTable: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:           
+    RelativeVirtualAddress: 8192
+    Size:            28
+  Architecture:    
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:       
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:        
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:     
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:             
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader: 
+    RelativeVirtualAddress: 0
+    Size:            0
+header:
+  Machine:         IMAGE_FILE_MACHINE_I386
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_32BIT_MACHINE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     22
+    SectionData:     50894C24048B4C24040FAF4C2404890C248B042459C3
+  - Name:            .rdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  8192
+    VirtualSize:     236
+    SectionData:     00000000A565B65C00000000020000006B0000001C2000001C06000052534453E092B2141AD8F1B44C4C44205044422E01000000443A5C757073747265616D5C6275696C645C746F6F6C735C6C6C64625C6C69745C4D6F64756C65735C5045434F46465C4F75747075745C6578706F72742D646C6C66756E632E79616D6C2E746D702E70646200000000000000000000000000AF200000000000000200000001000000CB200000D3200000D72000006578706F72742D646C6C66756E632E79616D6C2E746D702E646C6C000000000000100000D92000000100446C6C46756E63000000000101010001020000
+  - Name:            .pdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  12288
+    VirtualSize:     12
+    SectionData:     '0010000016100000E4200000'
+symbols:         []
+...
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/find-module.dmp.yaml b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/find-module.dmp.yaml
new file mode 100644
index 0000000..aef94e3
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/find-module.dmp.yaml
@@ -0,0 +1,26 @@
+--- !minidump
+Streams:
+  - Type:            ModuleList
+    Modules:
+      - Base of Image:   0x00000000000B0000
+        Size of Image:   0x00005000
+        Module Name:     'find-module.exe'
+        CodeView Record: 525344533ED87D89C8A8184197F3A925EE4BF74101000000433A5C70726F6A656374735C746573745F6170705C436F6E736F6C654170706C69636174696F6E315C44656275675C436F6E736F6C654170706C69636174696F6E312E70646200
+  - Type:            SystemInfo
+    Processor Arch:  X86
+    Processor Level: 23
+    Processor Revision: 2050
+    Number of Processors: 32
+    Product type:    1
+    Major Version:   10
+    Build Number:    17134
+    Platform ID:     Win32NT
+    Suite Mask:      0x0300
+    CPU:
+      Vendor ID:       AuthenticAMD
+      Version Info:    0x00800F82
+      Feature Info:    0x178BFBFF
+      AMD Extended Features: 0x2FD3FBFF
+  - Type:            MiscInfo
+    Content:         54050000F703000008290000C883495D0000000000000000AC0D000098080000AC0D00000200000002000000002000000D0000000000000002000000C4FFFFFF430065006E007400720061006C0020004500750072006F007000650020005300740061006E0064006100720064002000540069006D006500000000000000000000000A0000000500030000000000000000000000430065006E007400720061006C0020004500750072006F00700065002000530075006D006D00650072002000540069006D00650000000000000000000000000000000300000005000200000000000000C4FFFFFF310037003100330034002E0031002E007800380036006600720065002E007200730034005F00720065006C0065006100730065002E003100380030003400310030002D00310038003000340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064006200670063006F00720065002E0069003300380036002C00310030002E0030002E00310037003100330034002E0031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006C816B92
+...
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/find-module.exe.yaml b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/find-module.exe.yaml
new file mode 100644
index 0000000..42ccc6d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Inputs/find-module.exe.yaml
@@ -0,0 +1,32 @@
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4224
+  ImageBase:       4194304
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_NO_SEH, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+header:
+  Machine:         IMAGE_FILE_MACHINE_I386
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_32BIT_MACHINE ]
+sections:
+  - Name:            .rdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  8192
+    VirtualSize:     304
+  - Name:            .reloc
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  16384
+    VirtualSize:     48
+symbols:         []
+...
diff --git a/src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
rename to src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.cpp
diff --git a/src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/Inputs/sigsegv.dmp b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.dmp
similarity index 100%
rename from src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/Inputs/sigsegv.dmp
rename to src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.dmp
Binary files differ
diff --git a/src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/Inputs/sigsegv.lldbinit b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/Inputs/sigsegv.lldbinit
rename to src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.lldbinit
diff --git a/src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/Inputs/sigsegv.pdb b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.pdb
similarity index 100%
rename from src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/Inputs/sigsegv.pdb
rename to src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/Inputs/sigsegv.pdb
Binary files differ
diff --git a/src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/sigsegv.test b/src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/sigsegv.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Minidump/Windows/Sigsegv/sigsegv.test
rename to src/llvm-project/lldb/test/Shell/Minidump/Windows/Sigsegv/sigsegv.test
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Windows/arm-fp-unwind.test b/src/llvm-project/lldb/test/Shell/Minidump/Windows/arm-fp-unwind.test
new file mode 100644
index 0000000..35ea7c8
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Windows/arm-fp-unwind.test
@@ -0,0 +1,17 @@
+Test that unwind plans use the frame pointer register correctly.
+
+REQUIRES: arm
+
+RUN: yaml2obj %S/Inputs/arm-fp-unwind.exe.yaml > %T/arm-fp-unwind.exe
+RUN: yaml2obj %S/Inputs/arm-fp-unwind.dmp.yaml > %T/arm-fp-unwind.dmp
+RUN: %lldb -O "settings set target.exec-search-paths %T" \
+RUN:   -c %T/arm-fp-unwind.dmp -o "image show-unwind -a 0x00c71010" -b \
+RUN:   | FileCheck %s
+
+CHECK: Assembly language inspection UnwindPlan:
+CHECK-NEXT: This UnwindPlan originally sourced from EmulateInstructionARM
+CHECK-NEXT: This UnwindPlan is sourced from the compiler: no.
+CHECK-NEXT: This UnwindPlan is valid at all instruction locations: yes.
+CHECK-NEXT: row[0]:    0: CFA=sp +0 =>
+CHECK-NEXT: row[1]:    4: CFA=sp +8 => fp=[CFA-8] lr=[CFA-4]
+CHECK-NEXT: row[2]:    6: CFA=fp +8 => fp=[CFA-8] lr=[CFA-4]
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Windows/broken-unwind.test b/src/llvm-project/lldb/test/Shell/Minidump/Windows/broken-unwind.test
new file mode 100644
index 0000000..b83cc60
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Windows/broken-unwind.test
@@ -0,0 +1,7 @@
+Test that we can cope with broken unwind information that suggests
+reading out of bounds.
+
+RUN: yaml2obj %S/Inputs/broken-unwind.exe.yaml > %T/broken-unwind.exe
+RUN: yaml2obj %S/Inputs/broken-unwind.dmp.yaml > %T/broken-unwind.dmp
+RUN: %lldb -O "settings set target.exec-search-paths %T" \
+RUN:   -c %T/broken-unwind.dmp -o "image show-unwind -a 0xb1000" -o exit
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/Windows/find-module.test b/src/llvm-project/lldb/test/Shell/Minidump/Windows/find-module.test
new file mode 100644
index 0000000..170a180
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/Windows/find-module.test
@@ -0,0 +1,10 @@
+Test that we correctly find a PE/COFF file in our executable search path, and
+use it when opening minidumps.
+
+RUN: yaml2obj %S/Inputs/find-module.exe.yaml > %T/find-module.exe
+RUN: yaml2obj %S/Inputs/find-module.dmp.yaml > %T/find-module.dmp
+RUN: %lldb -O "settings set target.exec-search-paths %T" \
+RUN:   -c %T/find-module.dmp -o "image dump objfile" -o exit | FileCheck %s
+
+CHECK-LABEL: image dump objfile
+CHECK: ObjectFilePECOFF, file = '{{.*}}find-module.exe', arch = i386
diff --git a/src/llvm-project/lldb/lit/Minidump/breakpad-symbols.test b/src/llvm-project/lldb/test/Shell/Minidump/breakpad-symbols.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Minidump/breakpad-symbols.test
rename to src/llvm-project/lldb/test/Shell/Minidump/breakpad-symbols.test
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/disassemble-no-module.yaml b/src/llvm-project/lldb/test/Shell/Minidump/disassemble-no-module.yaml
new file mode 100644
index 0000000..14637d5
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/disassemble-no-module.yaml
@@ -0,0 +1,48 @@
+# RUN: yaml2obj %s > %t
+# RUN: %lldb -c %t -o bt -o disassemble 2>&1 | FileCheck %s
+
+# CHECK-LABEL: (lldb) bt
+# CHECK: frame #0: 0x0000000000400430
+# CHECK-LABEL: (lldb) disassemble
+# CHECK-NEXT: error: error reading data from section .module_image
+# CHECK-NEXT: error: Failed to disassemble memory at 0x00400430.
+
+--- !minidump
+Streams:         
+  - Type:            ThreadList
+    Threads:         
+      - Thread Id:       0x000074F3
+        Context:         0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B001000000000006CAE000000006B7FC05A0000C81D415A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000A2BF9E5A6B7F0000000000000000000000000000000000008850C14BFD7F00009850C14BFD7F00000100000000000000B04AC14BFD7F0000000000000000000060812D01000000000800000000000000B065E05A6B7F00008004400000000000E050C14BFD7F00000000000000000000000000000000000030044000000000007F03FFFF0000FFFFFFFFFFFF000000000000000000000000801F00006B7F00000400000000000000B84CC14BFD7F0000304D405A6B7F0000C84DC14BFD7F0000C0AA405A6B7F00004F033D0000000000B84DC14BFD7F0000E84DC14BFD7F0000000000000000000000000000000000000070E05A6B7F000078629E5A6B7F0000C81D415A6B7F0000804F9E5A6B7F00000000000001000000E603000001000000E093115A6B7F0000804EC14BFD7F0000584EC14BFD7F000099ADC05A6B7F00000100000000000000AAAAD77D0000000002000000000000000800000000000000B065E05A6B7F0000E6B7C05A6B7F0000010000006B7F0000884DC14BFD7F0000106F7C5A6B7F0000984EC14BFD7F0000488B7C5A6B7F0000C4A71CB90000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F0000702AE25A6B7F0000D84DC14BFD7F000030489E5A6B7F0000E84EC14BFD7F0000E05E9E5A6B7F00000991F0460000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F00000100000000000000284EC14BFD7F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        Stack:           
+          Start of Memory Range: 0x00007FFD4BC15080
+          Content:         30044000000000000000000000000000
+  - Type:            ModuleList
+    Modules:         
+      - Base of Image:   0x0000000000400000
+        Size of Image:   0x00001000
+        Module Name:     'nonexisting-module'
+        CodeView Record: 4C4570426CCF3F60FFA7CC4B86AE8FF44DB2576A68983611
+  - Type:            MemoryList
+    Memory Ranges:   
+      - Start of Memory Range: 0x00007FFD4BC15080
+        Content:         30044000000000000000000000000000
+  - Type:            SystemInfo
+    Processor Arch:  AMD64
+    Platform ID:     Linux
+    CPU:             
+      Vendor ID:       GenuineIntel
+      Version Info:    0x00000000
+      Feature Info:    0x00000000
+  - Type:            LinuxProcStatus
+    Text:             |
+      Name:	nonexisting-module
+      State:	t (tracing stop)
+      Tgid:	29939
+      Ngid:	0
+      Pid:	29939
+      PPid:	29370
+      TracerPid:	29940
+      Uid:	1001	1001	1001	1001
+      Gid:	1001	1001	1001	1001
+
+...
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/dump-all.test b/src/llvm-project/lldb/test/Shell/Minidump/dump-all.test
new file mode 100644
index 0000000..507c168
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/dump-all.test
@@ -0,0 +1,126 @@
+# RUN: yaml2obj %s > %t
+# RUN: %lldb -c %t -o 'process plugin dump --all' | \
+# RUN: FileCheck --check-prefix=CHECKDIR --check-prefix=CHECKCPU \
+# RUN: --check-prefix=CHECKSTATUS --check-prefix=CHECKLSB \
+# RUN: --check-prefix=CHECKCMD --check-prefix=CHECKENV \
+# RUN: --check-prefix=CHECKAUX --check-prefix=CHECKMAP \
+# RUN: --check-prefix=CHECKSTAT --check-prefix=CHECKUP --check-prefix=CHECKFD %s
+# RUN: %lldb -c %t -o 'process plugin dump -a' | \
+# RUN: FileCheck --check-prefix=CHECKDIR --check-prefix=CHECKCPU \
+# RUN: --check-prefix=CHECKSTATUS --check-prefix=CHECKLSB \
+# RUN: --check-prefix=CHECKCMD --check-prefix=CHECKENV \
+# RUN: --check-prefix=CHECKAUX --check-prefix=CHECKMAP \
+# RUN: --check-prefix=CHECKSTAT --check-prefix=CHECKUP --check-prefix=CHECKFD %s
+# RUN: %lldb -c %t -o 'process plugin dump --directory' | FileCheck --check-prefix=CHECKDIR %s
+# RUN: %lldb -c %t -o 'process plugin dump -d' | FileCheck --check-prefix=CHECKDIR %s
+# RUN: %lldb -c %t -o 'process plugin dump --linux' | \
+# RUN: FileCheck --check-prefix=CHECKCPU --check-prefix=CHECKSTATUS \
+# RUN: --check-prefix=CHECKLSB --check-prefix=CHECKCMD --check-prefix=CHECKENV \
+# RUN: --check-prefix=CHECKAUX --check-prefix=CHECKMAP --check-prefix=CHECKSTAT \
+# RUN: --check-prefix=CHECKUP --check-prefix=CHECKFD %s
+# RUN: %lldb -c %t -o 'process plugin dump --cpuinfo'     | FileCheck --check-prefix=CHECKCPU %s
+# RUN: %lldb -c %t -o 'process plugin dump -C'            | FileCheck --check-prefix=CHECKCPU %s
+# RUN: %lldb -c %t -o 'process plugin dump --status'      | FileCheck --check-prefix=CHECKSTATUS %s
+# RUN: %lldb -c %t -o 'process plugin dump -s'            | FileCheck --check-prefix=CHECKSTATUS %s
+# RUN: %lldb -c %t -o 'process plugin dump --lsb-release' | FileCheck --check-prefix=CHECKLSB %s
+# RUN: %lldb -c %t -o 'process plugin dump -r'            | FileCheck --check-prefix=CHECKLSB %s
+# RUN: %lldb -c %t -o 'process plugin dump --cmdline'     | FileCheck --check-prefix=CHECKCMD %s
+# RUN: %lldb -c %t -o 'process plugin dump -c'            | FileCheck --check-prefix=CHECKCMD %s
+# RUN: %lldb -c %t -o 'process plugin dump --environ'     | FileCheck --check-prefix=CHECKENV %s
+# RUN: %lldb -c %t -o 'process plugin dump -e'            | FileCheck --check-prefix=CHECKENV %s
+# RUN: %lldb -c %t -o 'process plugin dump --auxv'        | FileCheck --check-prefix=CHECKAUX %s
+# RUN: %lldb -c %t -o 'process plugin dump -x'            | FileCheck --check-prefix=CHECKAUX %s
+# RUN: %lldb -c %t -o 'process plugin dump --maps'        | FileCheck --check-prefix=CHECKMAP %s
+# RUN: %lldb -c %t -o 'process plugin dump -m'            | FileCheck --check-prefix=CHECKMAP %s
+# RUN: %lldb -c %t -o 'process plugin dump --stat'        | FileCheck --check-prefix=CHECKSTAT %s
+# RUN: %lldb -c %t -o 'process plugin dump -S'            | FileCheck --check-prefix=CHECKSTAT %s
+# RUN: %lldb -c %t -o 'process plugin dump --uptime'      | FileCheck --check-prefix=CHECKUP %s
+# RUN: %lldb -c %t -o 'process plugin dump -u'            | FileCheck --check-prefix=CHECKUP %s
+# RUN: %lldb -c %t -o 'process plugin dump --fd'          | FileCheck --check-prefix=CHECKFD %s
+# RUN: %lldb -c %t -o 'process plugin dump -f'            | FileCheck --check-prefix=CHECKFD %s
+
+# CHECKDIR:      RVA        SIZE       TYPE       StreamType
+# CHECKDIR-NEXT: ---------- ---------- ---------- --------------------------
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000038 0x00000007 SystemInfo
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x0000000f MiscInfo
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000010 0x47670003 LinuxCPUInfo
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000001a 0x47670004 LinuxProcStatus
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x47670005 LinuxLSBRelease
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000001b 0x47670006 LinuxCMDLine
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000001b 0x47670007 LinuxEnviron
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x47670008 LinuxAuxv
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x000000bb 0x47670009 LinuxMaps
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x4767000b LinuxProcStat
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000000e 0x4767000c LinuxProcUptime
+# CHECKDIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000016 0x4767000d LinuxProcFD
+
+--- !minidump
+Streams:         
+  - Type:            SystemInfo
+    Processor Arch:  BP_ARM64
+    Platform ID:     Linux
+    CSD Version:     '15E216'
+    CPU:             
+      CPUID:           0x00000000
+  - Type:            MiscInfo
+    Content:         00000000010000007B000000000000000000000000000000
+  - Type:            LinuxCPUInfo
+    Text:             |
+      cpu info output
+
+# CHECKCPU:      /proc/cpuinfo:
+# CHECKCPU-NEXT: cpu info output
+  - Type:            LinuxProcStatus
+    Text:             |
+      /proc/<pid>/status output
+
+# CHECKSTATUS:      /proc/PID/status:
+# CHECKSTATUS-NEXT: /proc/<pid>/status output
+  - Type:            LinuxLSBRelease
+    Text:             |
+      /etc/lsb-release output
+
+# CHECKLSB:      /etc/lsb-release:
+# CHECKLSB-NEXT: /etc/lsb-release output
+  - Type:            LinuxCMDLine
+    Text:             |
+      /proc/<pid>/cmdline output
+
+# CHECKCMD:      /proc/PID/cmdline:
+# CHECKCMD-NEXT: /proc/<pid>/cmdline output
+  - Type:            LinuxEnviron
+    Content:         2F70726F632F3C7069643E2F656E7669726F6E206F757470757400
+# CHECKENV:      /proc/PID/environ:
+# CHECKENV-NEXT: /proc/<pid>/environ output
+  - Type:            LinuxAuxv
+    Content:         2F70726F632F3C7069643E2F61757876206F757470757400
+# CHECKAUX:      /proc/PID/auxv:
+# CHECKAUX-NEXT: 0x00000000: 2f 70 72 6f 63 2f 3c 70 69 64 3e 2f 61 75 78 76  /proc/<pid>/auxv
+# CHECKAUX-NEXT: 0x00000010: 20 6f 75 74 70 75 74 00                           output.
+  - Type:            LinuxMaps
+    Text:             |
+      400d9000-400db000 r-xp 00000000 b3:04 227        /system/bin/app_process
+      400db000-400dc000 r--p 00001000 b3:04 227        /system/bin/app_process
+      400dc000-400dd000 rw-p 00000000 00:00 0 
+
+# CHECKMAP:      /proc/PID/maps:
+# CHECKMAP-NEXT: 400d9000-400db000 r-xp 00000000 b3:04 227        /system/bin/app_process
+# CHECKMAP-NEXT: 400db000-400dc000 r--p 00001000 b3:04 227        /system/bin/app_process
+# CHECKMAP-NEXT: 400dc000-400dd000 rw-p 00000000 00:00 0 
+  - Type:            LinuxProcStat
+    Text:             |
+      /proc/<pid>/stat output
+
+# CHECKSTAT:      /proc/PID/stat:
+# CHECKSTAT-NEXT: /proc/<pid>/stat output
+  - Type:            LinuxProcUptime
+    Text:             |
+      uptime output
+
+# CHECKUP:      uptime:
+# CHECKUP-NEXT: uptime output
+  - Type:            LinuxProcFD
+    Content:         2F70726F632F3C7069643E2F6664206F757470757400
+# CHECKFD:      /proc/PID/fd:
+# CHECKFD-NEXT: /proc/<pid>/fd output
+...
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/fb-dump.test b/src/llvm-project/lldb/test/Shell/Minidump/fb-dump.test
new file mode 100644
index 0000000..319db2f
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/fb-dump.test
@@ -0,0 +1,126 @@
+# RUN: yaml2obj %s > %t
+# RUN: %lldb -c %t -o 'process plugin dump --all' | \
+# RUN:   FileCheck --check-prefix=CHECK-DIR --check-prefix=CHECK-APPDATA \
+# RUN:   --check-prefix=CHECK-BUILD --check-prefix=CHECK-VERSION \
+# RUN:   --check-prefix=CHECK-JAVA --check-prefix=CHECK-DALVIK \
+# RUN:   --check-prefix=CHECK-UNWIND --check-prefix=CHECK-ERROR \
+# RUN:   --check-prefix=CHECK-APPSTATE --check-prefix=CHECK-ABORT \
+# RUN:   --check-prefix=CHECK-THREAD --check-prefix=CHECK-LOGCAT %s
+# RUN: %lldb -c %t -o 'process plugin dump -a' | \
+# RUN:   FileCheck --check-prefix=CHECK-DIR --check-prefix=CHECK-APPDATA \
+# RUN:   --check-prefix=CHECK-BUILD --check-prefix=CHECK-VERSION \
+# RUN:   --check-prefix=CHECK-JAVA --check-prefix=CHECK-DALVIK \
+# RUN:   --check-prefix=CHECK-UNWIND --check-prefix=CHECK-ERROR \
+# RUN:   --check-prefix=CHECK-APPSTATE --check-prefix=CHECK-ABORT \
+# RUN:   --check-prefix=CHECK-THREAD --check-prefix=CHECK-LOGCAT %s
+# RUN: %lldb -c %t -o 'process plugin dump --facebook' | \
+# RUN:   FileCheck --check-prefix=CHECK-APPDATA \
+# RUN:   --check-prefix=CHECK-BUILD --check-prefix=CHECK-VERSION \
+# RUN:   --check-prefix=CHECK-JAVA --check-prefix=CHECK-DALVIK \
+# RUN:   --check-prefix=CHECK-UNWIND --check-prefix=CHECK-ERROR \
+# RUN:   --check-prefix=CHECK-APPSTATE --check-prefix=CHECK-ABORT \
+# RUN:   --check-prefix=CHECK-THREAD --check-prefix=CHECK-LOGCAT %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-app-data' | \
+# RUN:   FileCheck --check-prefix=CHECK-APPDATA %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-build-id' | \
+# RUN:   FileCheck --check-prefix=CHECK-BUILD %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-version' | \
+# RUN:   FileCheck --check-prefix=CHECK-VERSION %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-java-stack' | \
+# RUN:   FileCheck --check-prefix=CHECK-JAVA %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-dalvik-info' | \
+# RUN:   FileCheck --check-prefix=CHECK-DALVIK %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-unwind-symbols' | \
+# RUN:   FileCheck --check-prefix=CHECK-UNWIND %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-error-log' | \
+# RUN:   FileCheck --check-prefix=CHECK-ERROR %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-app-state-log' | \
+# RUN:   FileCheck --check-prefix=CHECK-APPSTATE %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-abort-reason' | \
+# RUN:   FileCheck --check-prefix=CHECK-ABORT %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-thread-name' | \
+# RUN:   FileCheck --check-prefix=CHECK-THREAD %s
+# RUN: %lldb -c %t -o 'process plugin dump --fb-logcat' | \
+# RUN:   FileCheck --check-prefix=CHECK-LOGCAT %s
+# CHECK-DIR:      RVA        SIZE       TYPE       StreamType
+# CHECK-DIR-NEXT: ---------- ---------- ---------- --------------------------
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000038 0x00000007 SystemInfo
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000018 0x0000000f MiscInfo
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000013 0xfacecb00 FacebookDumpErrorLog
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000015 0xfacee000 FacebookThreadName
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000010 0xface1ca7 FacebookLogcat
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000017 0xfacecccc FacebookAppStateLog
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000016 0xfacedead FacebookAbortReason
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000039 0xfacecafa FacebookAppCustomData
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000005 0xfacecafb FacebookBuildID
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x0000000d 0xfacecafc FacebookAppVersionName
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000019 0xfacecafd FacebookJavaStack
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000015 0xfacecafe FacebookDalvikInfo
+# CHECK-DIR-NEXT: 0x{{[0-9a-f]{8} }}0x00000005 0xfacecaff FacebookUnwindSymbols
+
+--- !minidump
+Streams:         
+  - Type:            SystemInfo
+    Processor Arch:  BP_ARM64
+    Platform ID:     Linux
+    CSD Version:     '15E216'
+    CPU:             
+      CPUID:           0x00000000
+  - Type:            MiscInfo
+    Content:         00000000010000007B000000000000000000000000000000
+  - Type:            FacebookDumpErrorLog
+    Content:         46616365626F6F6B206572726F72206C6F6700
+  - Type:            FacebookThreadName
+    Content:         46616365626F6F6B20746872656164206E616D6500
+  - Type:            FacebookLogcat
+    Content:         46616365626F6F6B206C6F6763617400
+  - Type:            FacebookAppStateLog
+    Content:         46616365626F6F6B20617070207374617465206C6F6700
+  - Type:            FacebookAbortReason
+    Content:         46616365626F6F6B2061626F727420726561736F6E00
+  - Type:            FacebookAppCustomData
+    Content:         7B22676C6F62616C223A207B2246696E6765727072696E74223A22696E76616C6964206465766963652066696E6765727072696E74227D7D00
+  - Type:            FacebookBuildID
+    Content:         '0403020100'
+  - Type:            FacebookAppVersionName
+    Content:         3230372E302E302E302E383600
+  - Type:            FacebookJavaStack
+    Content:         46616365626F6F6B206A61766120737461636B20696E666F00
+  - Type:            FacebookDalvikInfo
+    Content:         46616365626F6F6B2064616C76696B20696E666F00
+  - Type:            FacebookUnwindSymbols
+    Content:         '1122334400'
+...
+
+# CHECK-APPDATA:      Facebook App Data:
+# CHECK-APPDATA-NEXT: {"global": {"Fingerprint":"invalid device fingerprint"}}
+
+# CHECK-BUILD:      Facebook Build ID:
+# CHECK-BUILD-NEXT: 16909060
+
+# CHECK-VERSION:      Facebook Version String:
+# CHECK-VERSION-NEXT: 207.0.0.0.86
+
+# CHECK-JAVA:      Facebook Java Stack:
+# CHECK-JAVA-NEXT: Facebook java stack info
+
+# CHECK-DALVIK:      Facebook Dalvik Info:
+# CHECK-DALVIK-NEXT: Facebook dalvik info
+
+# CHECK-UNWIND:      Facebook Unwind Symbols Bytes:
+# CHECK-UNWIND-NEXT: 0x00000000: 11 22 33 44 00
+
+# CHECK-ERROR:      Facebook Error Log:
+# CHECK-ERROR-NEXT: Facebook error log
+
+# CHECK-APPSTATE:      Faceook Application State Log:
+# CHECK-APPSTATE-NEXT: Facebook app state log
+
+# CHECK-ABORT:      Facebook Abort Reason:
+# CHECK-ABORT-NEXT: Facebook abort reason
+
+# CHECK-THREAD:      Facebook Thread Name:
+# CHECK-THREAD-NEXT: Facebook thread name
+
+# CHECK-LOGCAT:      Facebook Logcat:
+# CHECK-LOGCAT-NEXT: Facebook logcat
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/lit.local.cfg b/src/llvm-project/lldb/test/Shell/Minidump/lit.local.cfg
new file mode 100644
index 0000000..db82cc2
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.test', '.yaml']
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/memory-region-from-module.yaml b/src/llvm-project/lldb/test/Shell/Minidump/memory-region-from-module.yaml
new file mode 100644
index 0000000..fb6c4a4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/memory-region-from-module.yaml
@@ -0,0 +1,90 @@
+# Check that memory region parsing works correctly, with a particular emphasis
+# on the boundary conditions.
+
+# RUN: yaml2obj --docnum=1 %s > %t1.dmp
+# RUN: yaml2obj --docnum=2 %s > %t2.dmp
+# RUN: yaml2obj %S/Inputs/basic-elf.yaml >%T/memory-region-from-module.exe
+
+# RUN: %lldb -b -c %t1.dmp %T/memory-region-from-module.exe \
+# RUN:   -o "memory region 0" -o "memory region 0x4000" \
+# RUN:   -o "memory region 0x5000" -o "memory region 0x6000" \
+# RUN:   | FileCheck --check-prefix=ALL --check-prefix=CHECK1 %s
+
+# RUN: %lldb -b -c %t2.dmp %T/memory-region-from-module.exe \
+# RUN:   -o "memory region 0" -o "memory region 0x4000" \
+# RUN:   -o "memory region 0x5000" -o "memory region 0x6000" \
+# RUN:   | FileCheck --check-prefix=ALL --check-prefix=CHECK2 %s
+
+# ALL-LABEL: (lldb) memory region 0
+# ALL: [0x0000000000000000-0x0000000000004000) ---
+# ALL-LABEL: (lldb) memory region 0x4000
+# CHECK1: [0x0000000000004000-0x00000000000040b0) r-x {{.*}}memory-region-from-module.exe PT_LOAD[0]
+# CHECK2: [0x0000000000004000-0x0000000000004010) r??
+# ALL-LABEL: (lldb) memory region 0x5000
+# ALL: [0x0000000000005000-0x000000000000505c) rw- {{.*}}memory-region-from-module.exe PT_LOAD[1]
+# ALL-LABEL: (lldb) memory region 0x6000
+# ALL: [0x000000000000505c-0xffffffffffffffff) ---
+
+--- !minidump
+Streams:
+  - Type:            ModuleList
+    Modules:
+      - Base of Image:   0x0000000000004000
+        Size of Image:   0x00002000
+        Module Name:     'memory-region-from-module.exe'
+        CodeView Record: 4C457042DEADBEEFBAADF00D
+
+  - Type:            SystemInfo
+    Processor Arch:  AMD64
+    Platform ID:     Linux
+    CPU:
+      Vendor ID:       GenuineIntel
+      Version Info:    0x00000000
+      Feature Info:    0x00000000
+  - Type:            LinuxProcStatus
+    Text:             |
+      Name:	memory-region-from-module.exe
+      State:	t (tracing stop)
+      Tgid:	29939
+      Ngid:	0
+      Pid:	29939
+      PPid:	29370
+      TracerPid:	29940
+      Uid:	1001	1001	1001	1001
+      Gid:	1001	1001	1001	1001
+
+...
+
+--- !minidump
+Streams:
+  - Type:            MemoryList
+    Memory Ranges:   
+      - Start of Memory Range: 0x0000000000004000
+        Content:         30044000000000000000000000000000
+  - Type:            ModuleList
+    Modules:
+      - Base of Image:   0x0000000000004000
+        Size of Image:   0x00002000
+        Module Name:     'memory-region-from-module.exe'
+        CodeView Record: 4C457042DEADBEEFBAADF00D
+
+  - Type:            SystemInfo
+    Processor Arch:  AMD64
+    Platform ID:     Linux
+    CPU:
+      Vendor ID:       GenuineIntel
+      Version Info:    0x00000000
+      Feature Info:    0x00000000
+  - Type:            LinuxProcStatus
+    Text:             |
+      Name:	memory-region-from-module.exe
+      State:	t (tracing stop)
+      Tgid:	29939
+      Ngid:	0
+      Pid:	29939
+      PPid:	29370
+      TracerPid:	29940
+      Uid:	1001	1001	1001	1001
+      Gid:	1001	1001	1001	1001
+
+...
diff --git a/src/llvm-project/lldb/test/Shell/Minidump/memory-region.yaml b/src/llvm-project/lldb/test/Shell/Minidump/memory-region.yaml
new file mode 100644
index 0000000..6727d28
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Minidump/memory-region.yaml
@@ -0,0 +1,49 @@
+# Check that memory region parsing works correctly, with a particular emphasis
+# on the boundary conditions.
+
+# RUN: yaml2obj %s > %t
+# RUN: %lldb -b -c %t \
+# RUN:   -o "memory region 0" -o "memory region 0xd9000" \
+# RUN:   -o "memory region 0xd9001" -o "memory region 0xdafff" \
+# RUN:   -o "memory region 0xdb000" -o "memory region 0xdd000" | FileCheck %s
+
+# CHECK-LABEL: (lldb) memory region 0
+# CHECK: [0x0000000000000000-0x00000000000d9000) ---
+# CHECK-LABEL: (lldb) memory region 0xd9000
+# CHECK: [0x00000000000d9000-0x00000000000db000) r-x /system/bin/app_process
+# CHECK-LABEL: (lldb) memory region 0xd9001
+# CHECK: [0x00000000000d9000-0x00000000000db000) r-x /system/bin/app_process
+# CHECK-LABEL: (lldb) memory region 0xdafff
+# CHECK: [0x00000000000d9000-0x00000000000db000) r-x /system/bin/app_process
+# CHECK-LABEL: (lldb) memory region 0xdb000
+# CHECK: [0x00000000000db000-0x00000000000dc000) ---
+# CHECK-LABEL: (lldb) memory region 0xdd000
+# CHECK: [0x00000000000dd000-0xffffffffffffffff) ---
+
+--- !minidump
+Streams:         
+  - Type:            SystemInfo
+    Processor Arch:  AMD64
+    Platform ID:     Linux
+    CPU:             
+      Vendor ID:       GenuineIntel
+      Version Info:    0x00000000
+      Feature Info:    0x00000000
+  - Type:            LinuxProcStatus
+    Text:             |
+      Name:	nonexisting-module
+      State:	t (tracing stop)
+      Tgid:	29939
+      Ngid:	0
+      Pid:	29939
+      PPid:	29370
+      TracerPid:	29940
+      Uid:	1001	1001	1001	1001
+      Gid:	1001	1001	1001	1001
+
+  - Type:            LinuxMaps
+    Text:             |
+      000d9000-000db000 r-xp 00000000 b3:04 227        /system/bin/app_process
+      000dc000-000dd000 rw-p 00000000 00:00 0
+
+...
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/bad-module-id-1.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/bad-module-id-1.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/bad-module-id-1.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/bad-module-id-1.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/bad-module-id-2.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/bad-module-id-2.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/bad-module-id-2.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/bad-module-id-2.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/bad-module-id-3.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/bad-module-id-3.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/bad-module-id-3.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/bad-module-id-3.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/discontiguous-sections.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/discontiguous-sections.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/discontiguous-sections.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/discontiguous-sections.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/identification-linux.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/identification-linux.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/identification-linux.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/identification-linux.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/identification-macosx-arm64e.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/identification-macosx-arm64e.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/identification-macosx-arm64e.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/identification-macosx-arm64e.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/identification-macosx.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/identification-macosx.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/identification-macosx.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/identification-macosx.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/identification-windows.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/identification-windows.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/identification-windows.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/identification-windows.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/sections-trailing-func.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/sections-trailing-func.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/sections-trailing-func.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/sections-trailing-func.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/sections.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/sections.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/sections.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/sections.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/uuid-matching-mac.syms b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/uuid-matching-mac.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/uuid-matching-mac.syms
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/uuid-matching-mac.syms
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/uuid-matching-mac.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/uuid-matching-mac.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/Inputs/uuid-matching-mac.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/Inputs/uuid-matching-mac.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/breakpad-identification.test b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/breakpad-identification.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/breakpad-identification.test
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/breakpad-identification.test
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/discontiguous-sections.test b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/discontiguous-sections.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/discontiguous-sections.test
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/discontiguous-sections.test
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/lit.local.cfg b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/lit.local.cfg
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/lit.local.cfg
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/lit.local.cfg
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/sections-trailing-func.test b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/sections-trailing-func.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/sections-trailing-func.test
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/sections-trailing-func.test
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/sections.test b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/sections.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/sections.test
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/sections.test
diff --git a/src/llvm-project/lldb/lit/Modules/Breakpad/uuid-matching-mac.test b/src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/uuid-matching-mac.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/Breakpad/uuid-matching-mac.test
rename to src/llvm-project/lldb/test/Shell/ObjectFile/Breakpad/uuid-matching-mac.test
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/Inputs/PT_LOAD-overlap-section.elf b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/Inputs/PT_LOAD-overlap-section.elf
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/Inputs/PT_LOAD-overlap-section.elf
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/Inputs/PT_LOAD-overlap-section.elf
Binary files differ
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/Inputs/minidebuginfo-main.c b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/Inputs/minidebuginfo-main.c
new file mode 100644
index 0000000..8f11daf
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/Inputs/minidebuginfo-main.c
@@ -0,0 +1,12 @@
+// This function will be embedded within the .symtab section of the
+// .gnu_debugdata section.
+int multiplyByFour(int num) { return num * 4; }
+
+// This function will be embedded within the .dynsym section of the main binary.
+int multiplyByThree(int num) { return num * 3; }
+
+int main(int argc, char *argv[]) {
+  int x = multiplyByThree(argc);
+  int y = multiplyByFour(x);
+  return y;
+}
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/Inputs/netbsd-amd64.core b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/Inputs/netbsd-amd64.core
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/Inputs/netbsd-amd64.core
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/Inputs/netbsd-amd64.core
Binary files differ
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD-empty.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-empty.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD-empty.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-empty.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD-overlap-PT_INTERP.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_INTERP.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD-overlap-PT_INTERP.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_INTERP.yaml
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml
new file mode 100644
index 0000000..d684466
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-PT_TLS.yaml
@@ -0,0 +1,63 @@
+# Overlapping PT_LOAD and PT_TLS segments should be able to exist side by side.
+
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test object-file %t | FileCheck %s
+# RUN: lldb %t -o "image lookup -a 0x1000" -b | FileCheck --check-prefix=LOOKUP %s
+
+# CHECK:        Index: 0
+# CHECK-NEXT:   ID: 0xffffffffffffffff
+# CHECK-NEXT:   Name: PT_TLS[0]
+# CHECK-NEXT:   Type: container
+# CHECK-NEXT:   Permissions: rw-
+# CHECK-NEXT:   Thread specific: yes
+# CHECK-NEXT:   VM address: 0x1000
+# CHECK-NEXT:   VM size: 16
+# CHECK-NEXT:   File size: 0
+# CHECK-NEXT:   Showing 1 subsections
+
+# CHECK:        Index: 1
+# CHECK-NEXT:   ID: 0xfffffffffffffffe
+# CHECK-NEXT:   Name: PT_LOAD[0]
+# CHECK-NEXT:   Type: container
+# CHECK-NEXT:   Permissions: rw-
+# CHECK-NEXT:   Thread specific: no
+# CHECK-NEXT:   VM address: 0x1000
+# CHECK-NEXT:   VM size: 16
+# CHECK-NEXT:   File size: 16
+# CHECK-NEXT:   Showing 1 subsections
+
+# LOOKUP-LABEL: image lookup -a 0x1000
+# LOOKUP:       Address: {{.*}}.PT_LOAD[0]..data + 0)
+
+!ELF
+FileHeader:
+  Class:           ELFCLASS32
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_ARM
+Sections:
+  - Name:            .tbss
+    Type:            SHT_NOBITS
+    Flags:           [ SHF_ALLOC, SHF_WRITE, SHF_TLS ]
+    Address:         0x1000
+    AddressAlign:    0x4
+    Size:            0x10
+  - Name:            .data
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_WRITE ]
+    Address:         0x1000
+    AddressAlign:    0x4
+    Size:            0x10
+ProgramHeaders:
+  - Type: PT_TLS
+    Flags: [ PF_R, PF_W ]
+    VAddr: 0x1000
+    Align: 0x4
+    Sections:
+      - Section: .tbss
+  - Type: PT_LOAD
+    Flags: [ PF_W, PF_R ]
+    VAddr: 0x1000
+    Align: 0x4
+    Sections:
+      - Section: .data
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD-overlap-section.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-section.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD-overlap-section.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap-section.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD-overlap.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD-overlap.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD-overlap.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/PT_LOAD.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_LOAD.yaml
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_TLS-overlap-PT_LOAD.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_TLS-overlap-PT_LOAD.yaml
new file mode 100644
index 0000000..cd3939e
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/PT_TLS-overlap-PT_LOAD.yaml
@@ -0,0 +1,63 @@
+# Overlapping PT_LOAD and PT_TLS segments should be able to exist side by side.
+
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test object-file %t | FileCheck %s
+# RUN: lldb %t -o "image lookup -a 0x1000" -b | FileCheck --check-prefix=LOOKUP %s
+
+# CHECK:        Index: 0
+# CHECK-NEXT:   ID: 0xffffffffffffffff
+# CHECK-NEXT:   Name: PT_LOAD[0]
+# CHECK-NEXT:   Type: container
+# CHECK-NEXT:   Permissions: rw-
+# CHECK-NEXT:   Thread specific: no
+# CHECK-NEXT:   VM address: 0x1000
+# CHECK-NEXT:   VM size: 16
+# CHECK-NEXT:   File size: 16
+# CHECK-NEXT:   Showing 1 subsections
+
+# CHECK:        Index: 1
+# CHECK-NEXT:   ID: 0xfffffffffffffffe
+# CHECK-NEXT:   Name: PT_TLS[0]
+# CHECK-NEXT:   Type: container
+# CHECK-NEXT:   Permissions: rw-
+# CHECK-NEXT:   Thread specific: yes
+# CHECK-NEXT:   VM address: 0x1000
+# CHECK-NEXT:   VM size: 16
+# CHECK-NEXT:   File size: 0
+# CHECK-NEXT:   Showing 1 subsections
+
+# LOOKUP-LABEL: image lookup -a 0x1000
+# LOOKUP:       Address: {{.*}}.PT_LOAD[0]..data + 0)
+
+!ELF
+FileHeader:
+  Class:           ELFCLASS32
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_ARM
+Sections:
+  - Name:            .data
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_WRITE ]
+    Address:         0x1000
+    AddressAlign:    0x4
+    Size:            0x10
+  - Name:            .tbss
+    Type:            SHT_NOBITS
+    Flags:           [ SHF_ALLOC, SHF_WRITE, SHF_TLS ]
+    Address:         0x1000
+    AddressAlign:    0x4
+    Size:            0x10
+ProgramHeaders:
+  - Type: PT_LOAD
+    Flags: [ PF_W, PF_R ]
+    VAddr: 0x1000
+    Align: 0x4
+    Sections:
+      - Section: .data
+  - Type: PT_TLS
+    Flags: [ PF_R, PF_W ]
+    VAddr: 0x1000
+    Align: 0x4
+    Sections:
+      - Section: .tbss
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/aarch64-relocations.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/aarch64-relocations.yaml
new file mode 100644
index 0000000..b9433a0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/aarch64-relocations.yaml
@@ -0,0 +1,93 @@
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test object-file -contents %t | FileCheck %s
+
+# CHECK:      Name: .debug_info
+# CHECK:      Data:  (
+# CHECK-NEXT:     0000: 47000000 04000000 00000801 00000000 0C002D00 00000000 00003700 00000000
+# CHECK-NEXT:     0020: 00000000 00000800 00000200 00000000 00000008 00000001 6F490000 00010243
+# CHECK-NEXT:     0040: 00000003 4B000000 050400
+# CHECK-NEXT: )
+
+--- !ELF
+FileHeader:      
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_REL
+  Machine:         EM_AARCH64
+Sections:        
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    AddressAlign:    0x0000000000000004
+    Content:         E0031B32C0035FD6
+  - Name:            .debug_str
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_MERGE, SHF_STRINGS ]
+    AddressAlign:    0x0000000000000001
+    Size:            0x50
+  - Name:            .debug_abbrev
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Size:            0x10
+  - Name:            .debug_info
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         470000000400000000000801000000000C0000000000000000000000000000000000000000000800000002000000000000000008000000016F000000000102430000000300000000050400
+  - Name:            .rela.debug_info
+    Type:            SHT_RELA
+    Link:            .symtab
+    AddressAlign:    0x0000000000000008
+    Info:            .debug_info
+    Relocations:     
+      - Offset:          0x0000000000000006
+        Symbol:          .debug_abbrev
+        Type:            R_AARCH64_ABS32
+      - Offset:          0x000000000000000C
+        Symbol:          .debug_str
+        Type:            R_AARCH64_ABS32
+      - Offset:          0x0000000000000012
+        Symbol:          .debug_str
+        Type:            R_AARCH64_ABS32
+        Addend:          45
+      - Offset:          0x0000000000000016
+        Symbol:          .debug_line
+        Type:            R_AARCH64_ABS32
+      - Offset:          0x000000000000001A
+        Symbol:          .debug_str
+        Type:            R_AARCH64_ABS32
+        Addend:          55
+      - Offset:          0x000000000000001E
+        Symbol:          .text
+        Type:            R_AARCH64_ABS64
+      - Offset:          0x000000000000002B
+        Symbol:          .text
+        Type:            R_AARCH64_ABS64
+      - Offset:          0x0000000000000039
+        Symbol:          .debug_str
+        Type:            R_AARCH64_ABS32
+        Addend:          73
+      - Offset:          0x0000000000000044
+        Symbol:          .debug_str
+        Type:            R_AARCH64_ABS32
+        Addend:          75
+  - Name:            .debug_line
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Size:            0x20
+Symbols:         
+  - Name:            .text
+    Type:            STT_SECTION
+    Section:         .text
+  - Name:            .debug_str
+    Type:            STT_SECTION
+    Section:         .debug_str
+  - Name:            .debug_abbrev
+    Type:            STT_SECTION
+    Section:         .debug_abbrev
+  - Name:            .debug_info
+    Type:            STT_SECTION
+    Section:         .debug_info
+  - Name:            .debug_line
+    Type:            STT_SECTION
+    Section:         .debug_line
+...
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/base-address.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/base-address.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/base-address.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/base-address.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/basic-info.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/basic-info.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/basic-info.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/basic-info.yaml
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/build-id-case.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/build-id-case.yaml
new file mode 100644
index 0000000..0836605
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/build-id-case.yaml
@@ -0,0 +1,110 @@
+# RUN: mkdir -p %t/.build-id/1b
+# RUN: yaml2obj %s > %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug
+# RUN: cd %t
+# RUN: llvm-objcopy --strip-all %t/.build-id/1b/8a73ac238390e32a7ff4ac8ebe4d6a41ecf5c9.debug %t/stripped.out
+# RUN: lldb-test object-file %t/stripped.out | FileCheck %s
+
+# CHECK: Name: .debug_abbrev
+# CHECK: Name: .debug_addr
+# CHECK: Name: .debug_aranges
+# CHECK: Name: .debug_frame
+# CHECK: Name: .debug_info
+# CHECK: Name: .debug_line
+# CHECK: Name: .debug_line_str
+# CHECK: Name: .debug_loc
+# CHECK: Name: .debug_loclists
+# CHECK: Name: .debug_macinfo
+# CHECK: Name: .debug_macro
+# CHECK: Name: .debug_names
+# CHECK: Name: .debug_pubnames
+# CHECK: Name: .debug_pubtypes
+# CHECK: Name: .debug_ranges
+# CHECK: Name: .debug_rnglists
+# CHECK: Name: .debug_str
+# CHECK: Name: .debug_str_offsets
+# CHECK: Name: .debug_types
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+  Entry:           0x00000000004003D0
+Sections:
+  - Name:            .note.gnu.build-id
+    Type:            SHT_NOTE
+    Flags:           [ SHF_ALLOC ]
+    Address:         0x0000000000400274
+    AddressAlign:    0x0000000000000004
+    Content:         040000001400000003000000474E55001B8A73AC238390E32A7FF4AC8EBE4D6A41ECF5C9
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x00000000004003D0
+    AddressAlign:    0x0000000000000010
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_abbrev
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_addr
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_aranges
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_frame
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_info
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_line
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_line_str
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_loc
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_loclists
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_macinfo
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_macro
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_names
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_pubnames
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_pubtypes
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_ranges
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_rnglists
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_str
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_str_offsets
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_types
+    Type:            SHT_PROGBITS
+    Content:         DEADBEEFBAADF00D
+Symbols:
+  - Name:            main
+    Type:            STT_FUNC
+    Section:         .text
+    Value:           0x00000000004003D0
+    Size:            0x0000000000000008
+...
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/compressed-sections.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/compressed-sections.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/compressed-sections.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/compressed-sections.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/duplicate-section.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/duplicate-section.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/duplicate-section.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/duplicate-section.yaml
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/gnu-debuglink.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/gnu-debuglink.yaml
new file mode 100644
index 0000000..b39b318
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/gnu-debuglink.yaml
@@ -0,0 +1,32 @@
+# RUN: yaml2obj %s > %t
+# RUN: llvm-objcopy --strip-all --add-gnu-debuglink=%t %t %t.stripped
+# RUN: lldb-test object-file %t.stripped | FileCheck %s
+
+# CHECK: Name: .debug_frame
+# CHECK-NEXT: Type: dwarf-frame
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+  Entry:           0x00000000004003D0
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x00000000004003D0
+    AddressAlign:    0x0000000000000010
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_frame
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000008
+    Content:         DEADBEEFBAADF00D
+Symbols:
+  - Name:            main
+    Type:            STT_FUNC
+    Section:         .text
+    Value:           0x00000000004003D0
+    Size:            0x0000000000000008
+...
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/many-sections.s b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/many-sections.s
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/many-sections.s
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/many-sections.s
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-corrupt-xz.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-corrupt-xz.yaml
new file mode 100644
index 0000000..938688c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-corrupt-xz.yaml
@@ -0,0 +1,24 @@
+# REQUIRES: lzma
+
+# This test checks that an error occurs when a corrupted
+# .gnu_debugdata section is trying to be xz uncompressed.
+
+# RUN: yaml2obj %s > %t.obj
+
+# RUN: %lldb -b -o 'image dump symtab' %t.obj 2>&1 | FileCheck %s
+
+# CHECK: warning: (x86_64) {{.*}}.obj An error occurred while decompression the section .gnu_debugdata: lzma_stream_buffer_decode()=lzma error: LZMA_DATA_ERROR
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+  Entry:           0x00000000004004C0
+Sections:
+  - Name:            .gnu_debugdata
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         FD377A585A000004E6D6B4460200210116000000742FE5A3E0180F05BA5D003F914584683D89A6DA8ACC93E24ED90802EC1FE2A7102958F4A42B6A7134F23922F6F35F529E133A8B5588025CFAC876C68510A157DBBCF8CA75E9854DED10FDD5CE0CDC136F6459B13B9847AEF79E9B1C7CD70EF4F3AF709F5DA0C1F40780154D72120A6A62A3F1A216E20DC597CE55BB23B48785957321A15FEE48808C1428B925DBC8022541CC594BD0AF2B51C6BE2854C81611017704DF6E509D21013B80BEC27D8919ACD3157E89353A08F4C86781ED708E89AB322D010F0F1605DAD9B9CE2B13C387769C83F5F85C647FD9C551E0E9C7D4A5CBE297970E486CB94AC283F98A7C6412A57F9C37952327549EEC4634D2CFA55B0F99923A14992D4293E0D87CEEF7FB6160C45928DE25074EEBF5329B5579AF01DB23DF22CBD48C8037B68FFFBE5CEA6CD26A936DD07D9B2E6006B7C6E5CC751072185EFE995D3F3C8DACF9039D4BEFB1F376B491568F6F00DB50FF477F36B90413E4FA30AE7C561A1249FD45FDFF884F70247FC21E57195A764151D8E341267E724D856C512BD243CDB33AB313758443877B2CB58F7F8F0461DE9766647F333A3531BDC4A26E9537EB314708D31212FCF4C21E9CB139F4DBFD21BB16A126C35E2BB3F7E30BF5A54961CECD4DD4D91A3757356F618754B21533C34F2BD97D70A02B1F338588BDBA9CDF5FC9FBE973E550194F07EC7A1E8E3C005FD60F8853223427628987E82E701CA7E2FDFA1B0ED564C37D115A72C3EC01E29C85C3630D8A385C4AE12F4F75F9F0BC12F2698345DD62A1F546A5953AF5CF3C0F22C7DA510F6739EB8CDB0E8A5A3BC13CFC31C1875C313908EFF23678869B76A6E1C10FE699E43BFFDE8F0752ED994A4A84BC0AD9D7381131D457C4917C4F6656F5C95D3221A79166C802D5F5A7C68554E54C42CA535465D224C7B641CF3417C3EAFD03CE5709BEA33DC7C9155CAC9D3C8033AF7CDA622020606A7C139D77FF85BC19323BF956C9C4662F60079BC7FE5F67B46211716A1A6CE4AB8AAB307D6444310CBC101071703EECC0B4622D91D705F5DA2932DA8BCEDA8E1CB0CDB20AAD652B8F86A521D3421287F1C175AE3BE6458AE6F8F3FB6FB7ED97B616B580D791E5FE0B74973F8604F419039B5B9D9A14397EE509F2B33AE404FF96DD0551472C5302E67910F0794B15CFE837351C6AF89B2FE88488B557BE8ACFFA331FB7AD553D35CAEB7D8BCEFB6CFF4A58E91355FE931408CF4CAFA9B97518B9E5C02078F64CE81279801B090348213DCAA7D12DC098BFF58C5A3202EFC38F64AD894379747B54AB5A9843F82E5FF1F394C8B78344A8F1655DDEF8D5FE09EBB3E703853ABD716743507000696FB6B35216B088E499F53880375521442ED45DCDD1B31AAEBDAD3C7DA958593425206C4B2A0BC6CADE3B0B1598499E08016E84F33E3EB9D7B03B9C9DFA91B8CE5C74DEF2BC97FEE9982B0AEC16C75EEB7AE9A858A9C37F6C12B040C68A49111DCF0F3A4780F3879E93D904676BE908FDC66373D34AA715A39EFBC2795C6C8F058CA24392FB2591AD06ACD6AED8746F926886180C2B007ED58C9884A8BEF6CCA1F549F5C4FB411A3FF78770D1147363AC80B98B5A8FDB3DEC4E61709F66A622BDA835B1FD67B7C7CB166ABB163FB7C5204AE200C71C6A18B532C407647323B8F2FAC7ECB68C250877FC8DD5FE05B2B39E66F687EBB6EEFB7D5209E22F451B76F57D90BB6641DFFDE1A1821C4D783E4756F3CEE7F63B9BA284F8E114B0D9A086D83233BED4A8F5B60933DC16AF4DDE19C9FC59BCC1646343ECE7007B1C4DC65C4A939CDD47F6ED8855913183149BECE66D8FE7793AE607EB8E28513749B9548252764110D3B58D1D8B348DB18F7F24F8CA0C7D9CB515D90F7F1848FF58472B2EF52EBAB123AFC7F87890CE9FC55B31160014294A9B7F81638A27335E29E15A10B1068D5E049B1C239814DBBCC1BB30E11EEBAD5ACF8FB1B986C4F48D73FEA6129D9708A0B5AC435402BEC8C79C71DB94394811B9A604141A125A4669F9A139A0264E93E822117BE8E0D93A1487C51214E9FBF5763A3FBE9DA700B9C9B435472AF9F0B4446B000000003239307DD8B645100001D60B90300000CA1EC9E9B1C467FB020000000004595A
+...
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-find-symbols.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-find-symbols.yaml
new file mode 100644
index 0000000..e6ebb03
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-find-symbols.yaml
@@ -0,0 +1,21 @@
+# REQUIRES: lzma
+
+# RUN: yaml2obj %s > %t.obj
+
+# RUN: %lldb -b -o 'image dump symtab' %t.obj | FileCheck %s
+
+# CHECK: [ 0] 1 X Code 0x00000000004005b0 0x000000000000000f 0x00000012 multiplyByFour
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+  Entry:           0x00000000004004C0
+Sections:
+  - Name:            .gnu_debugdata
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         FD377A585A000004E6D6B4460200210116000000742FE5A3E0180F05BA5D003F914584683D89A6DA8ACC93E24ED90802EC1FE2A7102958F4A42B6A7134F23922F6F35F529E133A8B5588025CFAC876C68510A157DBBCF8CA75E9854DED10FDD5CE0CDC136F6459B13B9847AEF79E9B1C7CD70EF4F3AF709F5DA0C1F40780154D72120A6A62A3F1A216E20DC597CE55BB23B48785957321A15FEE48808C1428B925DBC8022541CC594BD0AF2B51C6BE2854C81611017704DF6E509D21013B80BEC27D8919ACD3157E89353A08F4C86781ED708E89AB322D010F0F1605DAD9B9CE2B13C387769C83F5F85C647FD9C551E0E9C7D4A5CBE297970E486CB94AC283F98A7C6412A57F9C37952327549EEC4634D2CFA55B0F99923A14992D4293E0D87CEEF7FB6160C45928DE25074EEBF5329B5579AF01DB23DF22CBD48C8037B68FFFBE5CEA6CD26A936DD07D9B2E6006B7C6E5CC751072185EFE995D3F3C8DACF9039D4BEFB1F376B491568F6F00DB50FF477F36B90413E4FA30AE7C561A1249FD45FDFF884F70247FC21E57195A764151D8E341267E724D856C512BD243CDB33AB313758443877B2CB58F7F8F0461DE9766647F333A3531BDC4A26E9537EB314708D31212FCF4C21E9CB139F4DBFD21BB16A126C35E2BB3F7E30BF5A54961CECD4DD4D91A3757356F618754B21533C34F2BD97D70A02B1F338588BDBA9CDF5FC9FBE973E550194F07EC7A1E8E3C005FD60F8853223427628987E82E701CA7E2FDFA1B0ED564C37D115A72C3EC01E29C85C3630D8A385C4AE12F4F75F9F0BC12F2698345DD62A1F546A5953AF5CF3C0F22C7DA510F6739EB8CDB0E8A5A3BC13CFC31C1875C313908EFF23678869B76A6E1C10FE699E43BFFDE8F0752ED994A4A84BC0AD9D7381131D457C4917C4F6656F5C95D3221A79166C802D5F5A7C68554E54C42CA535465D224C7B641CF3417C3EAFD03CE5709BEA33DC7C9155CAC9D3C8033AF7CDA622020606A7C139D77FF85BC19323BF956C9C4662F60079BC7FE5F67B46211716A1A6CE4AB8AAB307D6444310CBC101071703EECC0B4622D91D705F5DA2932DA8BCEDA8E1CB0CDB20AAD652B8F86A521D3421287F1C175AE3BE6458AE6F8F3FB6FB7ED97B616B580D791E5FE0B74973F8604F419039B5B9D9A14397EE509F2B33AE404FF96DD0551472C5302E67910F0794B15CFE837351C6AF89B2FE88488B557BE8ACFFA331FB7AD553D35CAEB7D8BCEFB6CFF4A58E91355FE931408CF4CAFA9B97518B9E5C02078F64CE81279801B090348213DCAA7D12DC098BFF58C5A3202EFC38F64AD894379747B54AB5A9843F82E5FF1F394C8B783C3A8F1655DDEF8D5FE09EBB3E703853ABD716743507000696FB6B35216B088E499F53880375521442ED45DCDD1B31AAEBDAD3C7DA958593425206C4B2A0BC6CADE3B0B1598499E08016E84F33E3EB9D7B03B9C9DFA91B8CE5C74DEF2BC97FEE9982B0AEC16C75EEB7AE9A858A9C37F6C12B040C68A49111DCF0F3A4780F3879E93D904676BE908FDC66373D34AA715A39EFBC2795C6C8F058CA24392FB2591AD06ACD6AED8746F926886180C2B007ED58C9884A8BEF6CCA1F549F5C4FB411A3FF78770D1147363AC80B98B5A8FDB3DEC4E61709F66A622BDA835B1FD67B7C7CB166ABB163FB7C5204AE200C71C6A18B532C407647323B8F2FAC7ECB68C250877FC8DD5FE05B2B39E66F687EBB6EEFB7D5209E22F451B76F57D90BB6641DFFDE1A1821C4D783E4756F3CEE7F63B9BA284F8E114B0D9A086D83233BED4A8F5B60933DC16AF4DDE19C9FC59BCC1646343ECE7007B1C4DC65C4A939CDD47F6ED8855913183149BECE66D8FE7793AE607EB8E28513749B9548252764110D3B58D1D8B348DB18F7F24F8CA0C7D9CB515D90F7F1848FF58472B2EF52EBAB123AFC7F87890CE9FC55B31160014294A9B7F81638A27335E29E15A10B1068D5E049B1C239814DBBCC1BB30E11EEBAD5ACF8FB1B986C4F48D73FEA6129D9708A0B5AC435402BEC8C79C71DB94394811B9A604141A125A4669F9A139A0264E93E822117BE8E0D93A1487C51214E9FBF5763A3FBE9DA700B9C9B435472AF9F0B4446B000000003239307DD8B645100001D60B90300000CA1EC9E9B1C467FB020000000004595A
+...
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml
new file mode 100644
index 0000000..63c82ba
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-no-lzma.yaml
@@ -0,0 +1,24 @@
+# REQUIRES: !lzma
+
+# This test checks that a warning is printed when we're trying
+# to decompress a .gnu_debugdata section when no LZMA support was compiled in.
+
+# RUN: yaml2obj %s > %t.obj
+
+# RUN: %lldb -b -o 'image dump symtab' %t.obj 2>&1 | FileCheck %s
+
+# CHECK: warning: (x86_64) {{.*}}.obj No LZMA support found for reading .gnu_debugdata section
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+  Entry:           0x00000000004004C0
+Sections:
+  - Name:            .gnu_debugdata
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         FD377A585A000004E6D6B4460200210116000000742FE5A3E0180F05BA5D003F914584683D89A6DA8ACC93E24ED90802EC1FE2A7102958F4A42B6A7134F23922F6F35F529E133A8B5588025CFAC876C68510A157DBBCF8CA75E9854DED10FDD5CE0CDC136F6459B13B9847AEF79E9B1C7CD70EF4F3AF709F5DA0C1F40780154D72120A6A62A3F1A216E20DC597CE55BB23B48785957321A15FEE48808C1428B925DBC8022541CC594BD0AF2B51C6BE2854C81611017704DF6E509D21013B80BEC27D8919ACD3157E89353A08F4C86781ED708E89AB322D010F0F1605DAD9B9CE2B13C387769C83F5F85C647FD9C551E0E9C7D4A5CBE297970E486CB94AC283F98A7C6412A57F9C37952327549EEC4634D2CFA55B0F99923A14992D4293E0D87CEEF7FB6160C45928DE25074EEBF5329B5579AF01DB23DF22CBD48C8037B68FFFBE5CEA6CD26A936DD07D9B2E6006B7C6E5CC751072185EFE995D3F3C8DACF9039D4BEFB1F376B491568F6F00DB50FF477F36B90413E4FA30AE7C561A1249FD45FDFF884F70247FC21E57195A764151D8E341267E724D856C512BD243CDB33AB313758443877B2CB58F7F8F0461DE9766647F333A3531BDC4A26E9537EB314708D31212FCF4C21E9CB139F4DBFD21BB16A126C35E2BB3F7E30BF5A54961CECD4DD4D91A3757356F618754B21533C34F2BD97D70A02B1F338588BDBA9CDF5FC9FBE973E550194F07EC7A1E8E3C005FD60F8853223427628987E82E701CA7E2FDFA1B0ED564C37D115A72C3EC01E29C85C3630D8A385C4AE12F4F75F9F0BC12F2698345DD62A1F546A5953AF5CF3C0F22C7DA510F6739EB8CDB0E8A5A3BC13CFC31C1875C313908EFF23678869B76A6E1C10FE699E43BFFDE8F0752ED994A4A84BC0AD9D7381131D457C4917C4F6656F5C95D3221A79166C802D5F5A7C68554E54C42CA535465D224C7B641CF3417C3EAFD03CE5709BEA33DC7C9155CAC9D3C8033AF7CDA622020606A7C139D77FF85BC19323BF956C9C4662F60079BC7FE5F67B46211716A1A6CE4AB8AAB307D6444310CBC101071703EECC0B4622D91D705F5DA2932DA8BCEDA8E1CB0CDB20AAD652B8F86A521D3421287F1C175AE3BE6458AE6F8F3FB6FB7ED97B616B580D791E5FE0B74973F8604F419039B5B9D9A14397EE509F2B33AE404FF96DD0551472C5302E67910F0794B15CFE837351C6AF89B2FE88488B557BE8ACFFA331FB7AD553D35CAEB7D8BCEFB6CFF4A58E91355FE931408CF4CAFA9B97518B9E5C02078F64CE81279801B090348213DCAA7D12DC098BFF58C5A3202EFC38F64AD894379747B54AB5A9843F82E5FF1F394C8B783C3A8F1655DDEF8D5FE09EBB3E703853ABD716743507000696FB6B35216B088E499F53880375521442ED45DCDD1B31AAEBDAD3C7DA958593425206C4B2A0BC6CADE3B0B1598499E08016E84F33E3EB9D7B03B9C9DFA91B8CE5C74DEF2BC97FEE9982B0AEC16C75EEB7AE9A858A9C37F6C12B040C68A49111DCF0F3A4780F3879E93D904676BE908FDC66373D34AA715A39EFBC2795C6C8F058CA24392FB2591AD06ACD6AED8746F926886180C2B007ED58C9884A8BEF6CCA1F549F5C4FB411A3FF78770D1147363AC80B98B5A8FDB3DEC4E61709F66A622BDA835B1FD67B7C7CB166ABB163FB7C5204AE200C71C6A18B532C407647323B8F2FAC7ECB68C250877FC8DD5FE05B2B39E66F687EBB6EEFB7D5209E22F451B76F57D90BB6641DFFDE1A1821C4D783E4756F3CEE7F63B9BA284F8E114B0D9A086D83233BED4A8F5B60933DC16AF4DDE19C9FC59BCC1646343ECE7007B1C4DC65C4A939CDD47F6ED8855913183149BECE66D8FE7793AE607EB8E28513749B9548252764110D3B58D1D8B348DB18F7F24F8CA0C7D9CB515D90F7F1848FF58472B2EF52EBAB123AFC7F87890CE9FC55B31160014294A9B7F81638A27335E29E15A10B1068D5E049B1C239814DBBCC1BB30E11EEBAD5ACF8FB1B986C4F48D73FEA6129D9708A0B5AC435402BEC8C79C71DB94394811B9A604141A125A4669F9A139A0264E93E822117BE8E0D93A1487C51214E9FBF5763A3FBE9DA700B9C9B435472AF9F0B4446B000000003239307DD8B645100001D60B90300000CA1EC9E9B1C467FB020000000004595A
+...
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test
new file mode 100644
index 0000000..cf073fc
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/minidebuginfo-set-and-hit-breakpoint.test
@@ -0,0 +1,89 @@
+# REQUIRES: system-linux, lzma, xz
+
+# We want to keep the symbol "multiplyByThree" in the .dynamic section and not
+# have it put the default .symtab section.
+# RUN: echo "{multiplyByThree;};" > %T/dynmic-symbols.txt
+# RUN: %clang_host -Wl,--dynamic-list=%T/dynmic-symbols.txt -g -o %t.binary %p/Inputs/minidebuginfo-main.c
+
+# The following section is adapted from GDB's official documentation:
+# http://sourceware.org/gdb/current/onlinedocs/gdb/MiniDebugInfo.html#MiniDebugInfo
+
+# Extract the dynamic symbols from the main binary, there is no need
+# to also have these in the normal symbol table.
+
+# IGNORE: llvm-nm -D %t.binary --format=posix --defined-only | awk '{ print $1 }' | sort > %t.dynsyms
+
+# Extract all the text (i.e. function) symbols from the debuginfo.
+# (Note that we actually also accept "D" symbols, for the benefit
+# of platforms like PowerPC64 that use function descriptors.)
+
+# IGNORE: llvm-nm %t.binary --format=posix --defined-only | awk '{ if ($2 == "T" || $2 == "t" || $2 == "D") print $1 }' | sort > %t.funcsyms
+
+# Keep all the function symbols not already in the dynamic symbol
+# table.
+
+# IGNORE: comm -13 %t.dynsyms %t.funcsyms > %t.keep_symbols
+# The result of the preceeding command can be hardcoded
+# because we know what symbol to keep.
+# RUN: echo "multiplyByFour" > %t.keep_symbols
+
+# Separate full debug info into debug binary.
+
+# RUN: llvm-objcopy --only-keep-debug %t.binary %t.debug
+
+# Copy the full debuginfo, keeping only a minimal set of symbols and
+# removing some unnecessary sections.
+
+# RUN: llvm-objcopy -S --remove-section .gdb_index --remove-section .comment --keep-symbols=%t.keep_symbols %t.debug %t.mini_debuginfo
+
+# This command is not from the GDB manual but it slims down embedded minidebug
+# info. On top if that, it ensures that we only have the multiplyByThree symbol
+# in the .dynsym section of the main binary. The bits removing .rela.plt,
+# .rela.dyn and .dynsym sections can be removed once llvm-objcopy
+# --only-keep-debug starts to work.
+# RUN: llvm-objcopy --remove-section=.rela.plt --remove-section=.rela.dyn \
+# RUN:   --remove-section=.gnu.version --remove-section=.gnu.hash --remove-section=.hash --remove-section=.dynsym %t.mini_debuginfo
+
+# Drop the full debug info from the original binary.
+
+# RUN: llvm-strip --strip-all -R .comment %t.binary
+
+# Inject the compressed data into the .gnu_debugdata section of the
+# original binary.
+
+# RUN: xz --force --keep %t.mini_debuginfo
+
+# RUN: llvm-objcopy --add-section .gnu_debugdata=%t.mini_debuginfo.xz %t.binary
+
+# Now run the binary and see that we can set and hit a breakpoint
+# from within the .dynsym section (multiplyByThree) and one from
+# the .symtab section embedded in the .gnu_debugdata section (multiplyByFour).
+
+# RUN: %lldb -b -o 'b multiplyByThree' -o 'b multiplyByFour' -o 'run' -o 'continue' -o 'breakpoint list -v' %t.binary | FileCheck %s
+
+# CHECK: (lldb) b multiplyByThree
+# CHECK-NEXT: Breakpoint 1: where = minidebuginfo-set-and-hit-breakpoint.test.tmp.binary`multiplyByThree, address = 0x{{.*}}
+
+# CHECK: (lldb) b multiplyByFour
+# CHECK-NEXT: Breakpoint 2: where = minidebuginfo-set-and-hit-breakpoint.test.tmp.binary`multiplyByFour, address = 0x{{.*}}
+
+# CHECK: * thread #1, name = 'minidebuginfo-s', stop reason = breakpoint 1.1
+# CHECK: * thread #1, name = 'minidebuginfo-s', stop reason = breakpoint 2.1
+
+# CHECK: (lldb) breakpoint list -v
+# CHECK-NEXT: Current breakpoints:
+# CHECK-NEXT: 1: name = 'multiplyByThree'
+# CHECK-NEXT:  1.1: 
+# CHECK-NEXT:  module = {{.*}}/minidebuginfo-set-and-hit-breakpoint.test.tmp.binary
+# CHECK-NEXT:  symbol = multiplyByThree
+# CHECK-NEXT:  address = 0x{{.*}}
+# CHECK-NEXT:  resolved = true
+# CHECK-NEXT:  hit count = 1 
+
+# CHECK: 2: name = 'multiplyByFour'
+# CHECK-NEXT:  2.1: 
+# CHECK-NEXT:  module = {{.*}}/minidebuginfo-set-and-hit-breakpoint.test.tmp.binary
+# CHECK-NEXT:  symbol = multiplyByFour
+# CHECK-NEXT:  address = 0x{{.*}}
+# CHECK-NEXT:  resolved = true
+# CHECK-NEXT:  hit count = 1 
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/netbsd-core-amd64.test b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/netbsd-core-amd64.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/netbsd-core-amd64.test
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/netbsd-core-amd64.test
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/netbsd-exec-8.99.30-amd64.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/netbsd-exec-8.99.30-amd64.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/netbsd-exec-8.99.30-amd64.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/netbsd-exec-8.99.30-amd64.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/section-addresses.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-addresses.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/section-addresses.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-addresses.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/section-overlap.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-overlap.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/section-overlap.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-overlap.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/section-permissions.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-permissions.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/section-permissions.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-permissions.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/section-types-edgecases.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-types-edgecases.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/section-types-edgecases.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-types-edgecases.yaml
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-types.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-types.yaml
new file mode 100644
index 0000000..7d59b3b
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/section-types.yaml
@@ -0,0 +1,130 @@
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test object-file %t | FileCheck %s
+
+# CHECK-LABEL: Name: .text
+# CHECK-NEXT: Type: code
+
+# CHECK-LABEL: Name: .debug_info
+# CHECK-NEXT: Type: dwarf-info
+
+# CHECK-LABEL: Name: .debug_types
+# CHECK-NEXT: Type: dwarf-types
+
+# CHECK-LABEL: Name: .debug_types.dwo
+# CHECK-NEXT: Type: dwarf-types-dwo
+
+# CHECK-LABEL: Name: .debug_loc
+# CHECK-NEXT: Type: dwarf-loc
+
+# CHECK-LABEL: Name: .debug_loc.dwo
+# CHECK-NEXT: Type: dwarf-loc-dwo
+
+# CHECK-LABEL: Name: .debug_loclists
+# CHECK-NEXT: Type: dwarf-loclists
+
+# CHECK-LABEL: Name: .debug_loclists.dwo
+# CHECK-NEXT: Type: dwarf-loclists-dwo
+
+# CHECK-LABEL: Name: .debug_rnglists
+# CHECK-NEXT: Type: dwarf-rnglists
+
+# CHECK-LABEL: Name: .debug_rnglists.dwo
+# CHECK-NEXT: Type: dwarf-rnglists-dwo
+
+# CHECK-LABEL: Name: .debug_names
+# CHECK-NEXT: Type: dwarf-names
+
+# CHECK-LABEL: Name: .gnu_debugaltlink
+# CHECK-NEXT: Type: dwarf-gnu-debugaltlink
+
+# CHECK-LABEL: Name: __codesection
+# CHECK-NEXT: Type: code
+
+# CHECK-LABEL: Name: .data
+# CHECK-NEXT: Type: data
+# CHECK: Thread specific: no
+
+# CHECK-LABEL: Name: .tdata
+# CHECK-NEXT: Type: data
+# CHECK: Thread specific: yes
+
+# CHECK-LABEL: Name: .tbss
+# CHECK-NEXT: Type: zero-fill
+# CHECK: Thread specific: yes
+
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_REL
+  Machine:         EM_X86_64
+  Entry:           0x00000000000007A0
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_info
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_types
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_types.dwo
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_loc
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_loc.dwo
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_loclists
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_loclists.dwo
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_rnglists
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_rnglists.dwo
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .debug_names
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            .gnu_debugaltlink
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
+  - Name:            __codesection
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Content:         DEADBEEFBAADF00D
+  - Name:            .data
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC ]
+    AddressAlign:    0x0000000000000004
+    Content:         2F000000
+  - Name:            .tdata
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC, SHF_TLS ]
+    AddressAlign:    0x0000000000000004
+    Content:         2F000000
+  - Name:            .tbss
+    Type:            SHT_NOBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC, SHF_TLS ]
+    AddressAlign:    0x0000000000000004
+    Size:            0x0000000000000004
+...
diff --git a/src/llvm-project/lldb/lit/Modules/ELF/short-build-id.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/ELF/short-build-id.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/ELF/short-build-id.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/ELF/short-build-id.yaml
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/MachO/lc_build_version.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/MachO/lc_build_version.yaml
new file mode 100644
index 0000000..763525c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/MachO/lc_build_version.yaml
@@ -0,0 +1,219 @@
+# RUN: yaml2obj %s > %t.out
+# RUN: lldb-test symbols %t.out | FileCheck %s
+# Test that the deployment target is parsed from the load commands.
+# CHECK: x86_64-apple-macosx10.14.0
+# CHECK: x86_64-apple-ios12.0.0-macabi
+--- !mach-o
+FileHeader:      
+  magic:           0xFEEDFACF
+  cputype:         0x01000007
+  cpusubtype:      0x80000003
+  filetype:        0x00000002
+  ncmds:           15
+  sizeofcmds:      776
+  flags:           0x00200085
+  reserved:        0x00000000
+LoadCommands:    
+  - cmd:             LC_SEGMENT_64
+    cmdsize:         72
+    segname:         __PAGEZERO
+    vmaddr:          0
+    vmsize:          4294967296
+    fileoff:         0
+    filesize:        0
+    maxprot:         0
+    initprot:        0
+    nsects:          0
+    flags:           0
+  - cmd:             LC_SEGMENT_64
+    cmdsize:         232
+    segname:         __TEXT
+    vmaddr:          4294967296
+    vmsize:          4096
+    fileoff:         0
+    filesize:        4096
+    maxprot:         7
+    initprot:        5
+    nsects:          2
+    flags:           0
+    Sections:        
+      - sectname:        __text
+        segname:         __TEXT
+        addr:            0x0000000100000FB0
+        size:            8
+        offset:          0x00000FB0
+        align:           4
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x80000400
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+      - sectname:        __unwind_info
+        segname:         __TEXT
+        addr:            0x0000000100000FB8
+        size:            72
+        offset:          0x00000FB8
+        align:           2
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x00000000
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+  - cmd:             LC_SEGMENT_64
+    cmdsize:         72
+    segname:         __LINKEDIT
+    vmaddr:          4294971392
+    vmsize:          4096
+    fileoff:         4096
+    filesize:        152
+    maxprot:         7
+    initprot:        1
+    nsects:          0
+    flags:           0
+  - cmd:             LC_DYLD_INFO_ONLY
+    cmdsize:         48
+    rebase_off:      0
+    rebase_size:     0
+    bind_off:        0
+    bind_size:       0
+    weak_bind_off:   0
+    weak_bind_size:  0
+    lazy_bind_off:   0
+    lazy_bind_size:  0
+    export_off:      4096
+    export_size:     48
+  - cmd:             LC_SYMTAB
+    cmdsize:         24
+    symoff:          4152
+    nsyms:           3
+    stroff:          4200
+    strsize:         48
+  - cmd:             LC_DYSYMTAB
+    cmdsize:         80
+    ilocalsym:       0
+    nlocalsym:       0
+    iextdefsym:      0
+    nextdefsym:      2
+    iundefsym:       2
+    nundefsym:       1
+    tocoff:          0
+    ntoc:            0
+    modtaboff:       0
+    nmodtab:         0
+    extrefsymoff:    0
+    nextrefsyms:     0
+    indirectsymoff:  0
+    nindirectsyms:   0
+    extreloff:       0
+    nextrel:         0
+    locreloff:       0
+    nlocrel:         0
+  - cmd:             LC_LOAD_DYLINKER
+    cmdsize:         32
+    name:            12
+    PayloadString:   /usr/lib/dyld
+    ZeroPadBytes:    7
+  - cmd:             LC_UUID
+    cmdsize:         24
+    uuid:            8F41E140-23B9-3720-AC28-4E7AF9D159BA
+  - cmd:             LC_BUILD_VERSION
+    cmdsize:         32
+    platform:        1
+    minos:           658944
+    sdk:             658944
+    ntools:          1
+    Tools:           
+      - tool:            3
+        version:         26738944
+  - cmd:             LC_SOURCE_VERSION
+    cmdsize:         16
+    version:         0
+  - cmd:             LC_MAIN
+    cmdsize:         24
+    entryoff:        4016
+    stacksize:       0
+  - cmd:             LC_LOAD_DYLIB
+    cmdsize:         56
+    dylib:           
+      name:            24
+      timestamp:       2
+      current_version: 82102276
+      compatibility_version: 65536
+    PayloadString:   /usr/lib/libSystem.B.dylib
+    ZeroPadBytes:    6
+  - cmd:             LC_FUNCTION_STARTS
+    cmdsize:         16
+    dataoff:         4144
+    datasize:        8
+  - cmd:             LC_DATA_IN_CODE
+    cmdsize:         16
+    dataoff:         4152
+    datasize:        0
+  - cmd:             LC_BUILD_VERSION
+    cmdsize:         32
+    platform:        6
+    minos:           786432
+    sdk:             786432
+    ntools:          1
+    Tools:
+      - tool:            3
+        version:         26738944
+LinkEditData:    
+  ExportTrie:      
+    TerminalSize:    0
+    NodeOffset:      0
+    Name:            ''
+    Flags:           0x0000000000000000
+    Address:         0x0000000000000000
+    Other:           0x0000000000000000
+    ImportName:      ''
+    Children:        
+      - TerminalSize:    0
+        NodeOffset:      5
+        Name:            _
+        Flags:           0x0000000000000000
+        Address:         0x0000000000000000
+        Other:           0x0000000000000000
+        ImportName:      ''
+        Children:        
+          - TerminalSize:    2
+            NodeOffset:      33
+            Name:            _mh_execute_header
+            Flags:           0x0000000000000000
+            Address:         0x0000000000000000
+            Other:           0x0000000000000000
+            ImportName:      ''
+          - TerminalSize:    3
+            NodeOffset:      37
+            Name:            main
+            Flags:           0x0000000000000000
+            Address:         0x0000000000000FB0
+            Other:           0x0000000000000000
+            ImportName:      ''
+  NameList:        
+    - n_strx:          2
+      n_type:          0x0F
+      n_sect:          1
+      n_desc:          16
+      n_value:         4294967296
+    - n_strx:          22
+      n_type:          0x0F
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294971312
+    - n_strx:          28
+      n_type:          0x01
+      n_sect:          0
+      n_desc:          256
+      n_value:         0
+  StringTable:     
+    - ' '
+    - __mh_execute_header
+    - _main
+    - dyld_stub_binder
+    - ''
+    - ''
+    - ''
+...
diff --git a/src/llvm-project/lldb/lit/Modules/MachO/lc_build_version_notools.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/MachO/lc_build_version_notools.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/MachO/lc_build_version_notools.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/MachO/lc_build_version_notools.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/MachO/lc_version_min.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/MachO/lc_version_min.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/MachO/lc_version_min.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/MachO/lc_version_min.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/MachO/subsections.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/MachO/subsections.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/MachO/subsections.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/MachO/subsections.yaml
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/MachO/symtab.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/MachO/symtab.yaml
new file mode 100644
index 0000000..9f5e1a0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/MachO/symtab.yaml
@@ -0,0 +1,689 @@
+# Tests that the symbol table properly merges the two entries for
+# global_constant, even when the debug symbol comes last.
+# RUN: mkdir -p %t
+# RUN: yaml2obj %s -o %t/a.out
+# RUN: %lldb %t/a.out -o "target modules dump symtab a.out" | FileCheck %s
+# CHECK: global_constant
+# CHECK-NOT: global_constant
+--- !mach-o
+FileHeader:
+  magic:           0xFEEDFACF
+  cputype:         0x01000007
+  cpusubtype:      0x80000003
+  filetype:        0x00000002
+  ncmds:           20
+  sizeofcmds:      1992
+  flags:           0x00200085
+  reserved:        0x00000000
+LoadCommands:
+  - cmd:             LC_SEGMENT_64
+    cmdsize:         72
+    segname:         __PAGEZERO
+    vmaddr:          0
+    vmsize:          4294967296
+    fileoff:         0
+    filesize:        0
+    maxprot:         0
+    initprot:        0
+    nsects:          0
+    flags:           0
+  - cmd:             LC_SEGMENT_64
+    cmdsize:         552
+    segname:         __TEXT
+    vmaddr:          4294967296
+    vmsize:          4096
+    fileoff:         0
+    filesize:        4096
+    maxprot:         5
+    initprot:        5
+    nsects:          6
+    flags:           0
+    Sections:
+      - sectname:        __text
+        segname:         __TEXT
+        addr:            0x0000000100000DE0
+        size:            383
+        offset:          0x00000DE0
+        align:           4
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x80000400
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+      - sectname:        __stubs
+        segname:         __TEXT
+        addr:            0x0000000100000F60
+        size:            18
+        offset:          0x00000F60
+        align:           1
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x80000408
+        reserved1:       0x00000000
+        reserved2:       0x00000006
+        reserved3:       0x00000000
+      - sectname:        __stub_helper
+        segname:         __TEXT
+        addr:            0x0000000100000F74
+        size:            46
+        offset:          0x00000F74
+        align:           2
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x80000400
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+      - sectname:        __swift5_typeref
+        segname:         __TEXT
+        addr:            0x0000000100000FA2
+        size:            7
+        offset:          0x00000FA2
+        align:           1
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x00000000
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+      - sectname:        __const
+        segname:         __TEXT
+        addr:            0x0000000100000FAA
+        size:            2
+        offset:          0x00000FAA
+        align:           1
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x00000000
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+      - sectname:        __unwind_info
+        segname:         __TEXT
+        addr:            0x0000000100000FAC
+        size:            80
+        offset:          0x00000FAC
+        align:           2
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x00000000
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+  - cmd:             LC_SEGMENT_64
+    cmdsize:         232
+    segname:         __DATA_CONST
+    vmaddr:          4294971392
+    vmsize:          4096
+    fileoff:         4096
+    filesize:        4096
+    maxprot:         3
+    initprot:        3
+    nsects:          2
+    flags:           16
+    Sections:
+      - sectname:        __got
+        segname:         __DATA_CONST
+        addr:            0x0000000100001000
+        size:            8
+        offset:          0x00001000
+        align:           3
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x00000006
+        reserved1:       0x00000003
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+      - sectname:        __objc_imageinfo
+        segname:         __DATA_CONST
+        addr:            0x0000000100001008
+        size:            8
+        offset:          0x00001008
+        align:           2
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x00000000
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+  - cmd:             LC_SEGMENT_64
+    cmdsize:         312
+    segname:         __DATA
+    vmaddr:          4294975488
+    vmsize:          4096
+    fileoff:         8192
+    filesize:        4096
+    maxprot:         3
+    initprot:        3
+    nsects:          3
+    flags:           0
+    Sections:
+      - sectname:        __la_symbol_ptr
+        segname:         __DATA
+        addr:            0x0000000100002000
+        size:            24
+        offset:          0x00002000
+        align:           3
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x00000007
+        reserved1:       0x00000004
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+      - sectname:        __data
+        segname:         __DATA
+        addr:            0x0000000100002018
+        size:            16
+        offset:          0x00002018
+        align:           3
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x00000000
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+      - sectname:        __common
+        segname:         __DATA
+        addr:            0x0000000100002028
+        size:            16
+        offset:          0x00000000
+        align:           3
+        reloff:          0x00000000
+        nreloc:          0
+        flags:           0x00000001
+        reserved1:       0x00000000
+        reserved2:       0x00000000
+        reserved3:       0x00000000
+  - cmd:             LC_SEGMENT_64
+    cmdsize:         72
+    segname:         __LINKEDIT
+    vmaddr:          4294979584
+    vmsize:          4096
+    fileoff:         12288
+    filesize:        1924
+    maxprot:         1
+    initprot:        1
+    nsects:          0
+    flags:           0
+  - cmd:             LC_DYLD_INFO_ONLY
+    cmdsize:         48
+    rebase_off:      12288
+    rebase_size:     8
+    bind_off:        12296
+    bind_size:       24
+    weak_bind_off:   0
+    weak_bind_size:  0
+    lazy_bind_off:   12320
+    lazy_bind_size:  96
+    export_off:      12416
+    export_size:     48
+  - cmd:             LC_SYMTAB
+    cmdsize:         24
+    symoff:          12472
+    nsyms:           41
+    stroff:          13156
+    strsize:         1056
+  - cmd:             LC_DYSYMTAB
+    cmdsize:         80
+    ilocalsym:       0
+    nlocalsym:       35
+    iextdefsym:      35
+    nextdefsym:      2
+    iundefsym:       37
+    nundefsym:       4
+    tocoff:          0
+    ntoc:            0
+    modtaboff:       0
+    nmodtab:         0
+    extrefsymoff:    0
+    nextrefsyms:     0
+    indirectsymoff:  13128
+    nindirectsyms:   7
+    extreloff:       0
+    nextrel:         0
+    locreloff:       0
+    nlocrel:         0
+  - cmd:             LC_LOAD_DYLINKER
+    cmdsize:         32
+    name:            12
+    PayloadString:   '/usr/lib/dyld'
+    ZeroPadBytes:    7
+  - cmd:             LC_UUID
+    cmdsize:         24
+    uuid:            A89F9D23-8190-3946-A70B-B8E833E68640
+  - cmd:             LC_BUILD_VERSION
+    cmdsize:         32
+    platform:        1
+    minos:           659200
+    sdk:             659200
+    ntools:          1
+    Tools:
+      - tool:            3
+        version:         36176384
+  - cmd:             LC_SOURCE_VERSION
+    cmdsize:         16
+    version:         0
+  - cmd:             LC_MAIN
+    cmdsize:         24
+    entryoff:        3552
+    stacksize:       0
+  - cmd:             LC_LOAD_DYLIB
+    cmdsize:         56
+    dylib:
+      name:            24
+      timestamp:       2
+      current_version: 14942208
+      compatibility_version: 65536
+    PayloadString:   '/usr/lib/libobjc.A.dylib'
+    ZeroPadBytes:    8
+  - cmd:             LC_LOAD_DYLIB
+    cmdsize:         56
+    dylib:
+      name:            24
+      timestamp:       2
+      current_version: 83951616
+      compatibility_version: 65536
+    PayloadString:   '/usr/lib/libSystem.B.dylib'
+    ZeroPadBytes:    6
+  - cmd:             LC_LOAD_DYLIB
+    cmdsize:         64
+    dylib:
+      name:            24
+      timestamp:       2
+      current_version: 0
+      compatibility_version: 65536
+    PayloadString:   '/usr/lib/swift/libswiftCore.dylib'
+    ZeroPadBytes:    7
+  - cmd:             LC_RPATH
+    cmdsize:         136
+    path:            12
+    PayloadString:   '/Volumes/Jonas/internal-stable/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/swift-macosx-x86_64/lib/swift/macosx'
+    ZeroPadBytes:    2
+  - cmd:             LC_RPATH
+    cmdsize:         128
+    path:            12
+    PayloadString:   '/Applications/XcodeY.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/lib/swift'
+    ZeroPadBytes:    2
+  - cmd:             LC_FUNCTION_STARTS
+    cmdsize:         16
+    dataoff:         12464
+    datasize:        8
+  - cmd:             LC_DATA_IN_CODE
+    cmdsize:         16
+    dataoff:         12472
+    datasize:        0
+LinkEditData:
+  RebaseOpcodes:
+    - Opcode:          REBASE_OPCODE_SET_TYPE_IMM
+      Imm:             1
+    - Opcode:          REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
+      Imm:             3
+      ExtraData:
+        - 0x0000000000000000
+    - Opcode:          REBASE_OPCODE_DO_REBASE_IMM_TIMES
+      Imm:             3
+    - Opcode:          REBASE_OPCODE_DONE
+      Imm:             0
+  BindOpcodes:
+    - Opcode:          BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
+      Imm:             2
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
+      Imm:             0
+      Symbol:          dyld_stub_binder
+    - Opcode:          BIND_OPCODE_SET_TYPE_IMM
+      Imm:             1
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
+      Imm:             2
+      ULEBExtraData:
+        - 0x0000000000000000
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DO_BIND
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DONE
+      Imm:             0
+      Symbol:          ''
+  LazyBindOpcodes:
+    - Opcode:          BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
+      Imm:             3
+      ULEBExtraData:
+        - 0x0000000000000000
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
+      Imm:             3
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
+      Imm:             0
+      Symbol:          _swift_beginAccess
+    - Opcode:          BIND_OPCODE_DO_BIND
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DONE
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
+      Imm:             3
+      ULEBExtraData:
+        - 0x0000000000000008
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
+      Imm:             3
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
+      Imm:             0
+      Symbol:          _swift_endAccess
+    - Opcode:          BIND_OPCODE_DO_BIND
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DONE
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB
+      Imm:             3
+      ULEBExtraData:
+        - 0x0000000000000010
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_DYLIB_ORDINAL_IMM
+      Imm:             3
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_SET_SYMBOL_TRAILING_FLAGS_IMM
+      Imm:             0
+      Symbol:          _swift_getTypeByMangledNameInContext
+    - Opcode:          BIND_OPCODE_DO_BIND
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DONE
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DONE
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DONE
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DONE
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DONE
+      Imm:             0
+      Symbol:          ''
+    - Opcode:          BIND_OPCODE_DONE
+      Imm:             0
+      Symbol:          ''
+  ExportTrie:
+    TerminalSize:    0
+    NodeOffset:      0
+    Name:            ''
+    Flags:           0x0000000000000000
+    Address:         0x0000000000000000
+    Other:           0x0000000000000000
+    ImportName:      ''
+    Children:
+      - TerminalSize:    0
+        NodeOffset:      5
+        Name:            _
+        Flags:           0x0000000000000000
+        Address:         0x0000000000000000
+        Other:           0x0000000000000000
+        ImportName:      ''
+        Children:
+          - TerminalSize:    2
+            NodeOffset:      33
+            Name:            _mh_execute_header
+            Flags:           0x0000000000000000
+            Address:         0x0000000000000000
+            Other:           0x0000000000000000
+            ImportName:      ''
+          - TerminalSize:    3
+            NodeOffset:      37
+            Name:            main
+            Flags:           0x0000000000000000
+            Address:         0x0000000000000DE0
+            Other:           0x0000000000000000
+            ImportName:      ''
+  NameList:
+    - n_strx:          118
+      n_type:          0x1E
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294970976
+    - n_strx:          133
+      n_type:          0x1E
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294971008
+    - n_strx:          151
+      n_type:          0x1E
+      n_sect:          1
+      n_desc:          128
+      n_value:         4294971104
+    - n_strx:          199
+      n_type:          0x1E
+      n_sect:          4
+      n_desc:          128
+      n_value:         4294971298
+    - n_strx:          216
+      n_type:          0x1E
+      n_sect:          5
+      n_desc:          128
+      n_value:         4294971306
+    - n_strx:          244
+      n_type:          0x0E
+      n_sect:          10
+      n_desc:          0
+      n_value:         4294975512
+    - n_strx:          259
+      n_type:          0x1E
+      n_sect:          10
+      n_desc:          128
+      n_value:         4294975520
+    - n_strx:          271
+      n_type:          0x1E
+      n_sect:          11
+      n_desc:          0
+      n_value:         4294975528
+    - n_strx:          298
+      n_type:          0x1E
+      n_sect:          11
+      n_desc:          0
+      n_value:         4294975536
+    - n_strx:          325
+      n_type:          0x32
+      n_sect:          0
+      n_desc:          0
+      n_value:         1570141141
+    - n_strx:          540
+      n_type:          0x64
+      n_sect:          0
+      n_desc:          0
+      n_value:         0
+    - n_strx:          633
+      n_type:          0x64
+      n_sect:          0
+      n_desc:          0
+      n_value:         0
+    - n_strx:          644
+      n_type:          0x66
+      n_sect:          3
+      n_desc:          1
+      n_value:         1570141203
+    - n_strx:          1
+      n_type:          0x2E
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294970848
+    - n_strx:          852
+      n_type:          0x24
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294970848
+    - n_strx:          1
+      n_type:          0x24
+      n_sect:          0
+      n_desc:          0
+      n_value:         128
+    - n_strx:          1
+      n_type:          0x4E
+      n_sect:          1
+      n_desc:          0
+      n_value:         128
+    - n_strx:          1
+      n_type:          0x2E
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294970976
+    - n_strx:          858
+      n_type:          0x24
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294970976
+    - n_strx:          1
+      n_type:          0x24
+      n_sect:          0
+      n_desc:          0
+      n_value:         32
+    - n_strx:          1
+      n_type:          0x4E
+      n_sect:          1
+      n_desc:          0
+      n_value:         32
+    - n_strx:          1
+      n_type:          0x2E
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294971008
+    - n_strx:          873
+      n_type:          0x24
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294971008
+    - n_strx:          1
+      n_type:          0x24
+      n_sect:          0
+      n_desc:          0
+      n_value:         96
+    - n_strx:          1
+      n_type:          0x4E
+      n_sect:          1
+      n_desc:          0
+      n_value:         96
+    - n_strx:          1
+      n_type:          0x2E
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294971104
+    - n_strx:          891
+      n_type:          0x24
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294971104
+    - n_strx:          1
+      n_type:          0x24
+      n_sect:          0
+      n_desc:          0
+      n_value:         127
+    - n_strx:          1
+      n_type:          0x4E
+      n_sect:          1
+      n_desc:          0
+      n_value:         127
+    - n_strx:          939
+      n_type:          0x20
+      n_sect:          0
+      n_desc:          0
+      n_value:         0
+    - n_strx:          956
+      n_type:          0x20
+      n_sect:          0
+      n_desc:          0
+      n_value:         0
+    - n_strx:          984
+      n_type:          0x20
+      n_sect:          0
+      n_desc:          0
+      n_value:         0
+    - n_strx:          996
+      n_type:          0x20
+      n_sect:          0
+      n_desc:          0
+      n_value:         0
+    - n_strx:          1023
+      n_type:          0x20
+      n_sect:          0
+      n_desc:          0
+      n_value:         0
+    - n_strx:          1
+      n_type:          0x64
+      n_sect:          1
+      n_desc:          0
+      n_value:         0
+    - n_strx:          2
+      n_type:          0x0F
+      n_sect:          1
+      n_desc:          16
+      n_value:         4294967296
+    - n_strx:          22
+      n_type:          0x0F
+      n_sect:          1
+      n_desc:          0
+      n_value:         4294970848
+    - n_strx:          28
+      n_type:          0x01
+      n_sect:          0
+      n_desc:          768
+      n_value:         0
+    - n_strx:          47
+      n_type:          0x01
+      n_sect:          0
+      n_desc:          768
+      n_value:         0
+    - n_strx:          64
+      n_type:          0x01
+      n_sect:          0
+      n_desc:          768
+      n_value:         0
+    - n_strx:          101
+      n_type:          0x01
+      n_sect:          0
+      n_desc:          512
+      n_value:         0
+  StringTable:
+    - ' '
+    - __mh_execute_header
+    - _main
+    - _swift_beginAccess
+    - _swift_endAccess
+    - _swift_getTypeByMangledNameInContext
+    - dyld_stub_binder
+    - '_$s1a3useyyxlF'
+    - '_$s1a1fyySi_SiztF'
+    - ___swift_instantiateConcreteTypeFromMangledName
+    - _symbolic Si_Sit
+    - ___swift_reflection_version
+    - __dyld_private
+    - '_$sSi_SitMD'
+    - '_$s1a15global_constantSivp'
+    - '_$s1a15global_variableSivp'
+    - '/Volumes/Jonas/internal-stable/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/lldb-macosx-x86_64/lldb-test-build.noindex/lang/swift/variables/let/TestSwiftLetConstants.test_let_constants_dwarf/a.swiftmodule'
+    - '/Volumes/Jonas/internal-stable/lldb/packages/Python/lldbsuite/test/lang/swift/variables/let/'
+    - main.swift
+    - '/Volumes/Jonas/internal-stable/build/Ninja-RelWithDebInfoAssert+stdlib-RelWithDebInfo/lldb-macosx-x86_64/lldb-test-build.noindex/lang/swift/variables/let/TestSwiftLetConstants.test_let_constants_dwarf/main.o'
+    - _main
+    - '_$s1a3useyyxlF'
+    - '_$s1a1fyySi_SiztF'
+    - ___swift_instantiateConcreteTypeFromMangledName
+    - _symbolic Si_Sit
+    - ___swift_reflection_version
+    - '_$sSi_SitMD'
+    - '_$s1a15global_constantSivp'
+    - '_$s1a15global_variableSivp'
+    - ''
+    - ''
+    - ''
+    - ''
+    - ''
+    - ''
+...
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
new file mode 100644
index 0000000..39ef947
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm.yaml
@@ -0,0 +1,86 @@
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test object-file %t | FileCheck %s
+
+# CHECK: Plugin name: pe-coff
+# CHECK: Architecture: armv7-pc-windows-msvc
+# CHECK: UUID: 
+# CHECK: Executable: true
+# CHECK: Stripped: false
+# CHECK: Type: executable
+# CHECK: Strata: user
+# CHECK: Base VM address: 0x40000
+
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4097
+  ImageBase:       4194304
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ImportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  CertificateTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Architecture:
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader:
+    RelativeVirtualAddress: 0
+    Size:            0
+header:
+  Machine:         IMAGE_FILE_MACHINE_ARMNT
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_32BIT_MACHINE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     2
+    SectionData:     '7047'
+symbols:         []
+...
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
new file mode 100644
index 0000000..d8af4425
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/basic-info-arm64.yaml
@@ -0,0 +1,86 @@
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test object-file %t | FileCheck %s
+
+# CHECK: Plugin name: pe-coff
+# CHECK: Architecture: aarch64-pc-windows-msvc
+# CHECK: UUID: 
+# CHECK: Executable: true
+# CHECK: Stripped: false
+# CHECK: Type: executable
+# CHECK: Strata: user
+# CHECK: Base VM address: 0x40000000
+
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4096
+  ImageBase:       1073741824
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ImportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  CertificateTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Architecture:
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader:
+    RelativeVirtualAddress: 0
+    Size:            0
+header:
+  Machine:         IMAGE_FILE_MACHINE_ARM64
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     4
+    SectionData:     C0035FD6
+symbols:         []
+...
diff --git a/src/llvm-project/lldb/lit/Modules/PECOFF/basic-info.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/PECOFF/basic-info.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/basic-info.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/PECOFF/dep-modules.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/dep-modules.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/PECOFF/dep-modules.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/dep-modules.yaml
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml
new file mode 100644
index 0000000..5515824
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/disassemble-thumb.yaml
@@ -0,0 +1,94 @@
+# REQUIRES: arm
+
+# RUN: yaml2obj %s > %t.exe
+# RUN: %lldb %t.exe -o "disassemble -b -n entry" -b | FileCheck %s
+
+# CHECK: {{.*}}.exe[0x401000] <+0>: 0x0040 lsls   r0, r0, #0x1
+# CHECK: {{.*}}.exe[0x401002] <+2>: 0x4770 bx     lr
+
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4097
+  ImageBase:       4194304
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ImportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  CertificateTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Architecture:
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader:
+    RelativeVirtualAddress: 0
+    Size:            0
+header:
+  Machine:         IMAGE_FILE_MACHINE_ARMNT
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_32BIT_MACHINE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     4
+    SectionData:     '40007047'
+symbols:
+  - Name:            .text
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+  - Name:            entry
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml
new file mode 100644
index 0000000..c1ada73
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/export-dllfunc.yaml
@@ -0,0 +1,180 @@
+# REQUIRES: lld
+# RUN: yaml2obj < %s > %t.obj
+#
+# RUN: lld-link /machine:x64 /out:%t.dll /noentry /nodefaultlib /debug /dll %t.obj /export:DllFunc
+#
+# RUN: lldb-test object-file %t.dll | FileCheck -check-prefix=BASIC-CHECK %s
+# RUN: lldb-test object-file -dep-modules %t.dll | FileCheck -check-prefix=DEPS %s
+
+# BASIC-CHECK: Plugin name: pe-coff
+
+# UUID should not be empty if the module is built with debug info.
+# BASIC-CHECK-DAG: UUID: {{[0-9A-F]{7,}[0-9A-F]}}-{{.*}}
+
+# BASIC-CHECK: Showing 4 sections
+#
+# BASIC-CHECK:  Index: 0
+# BASIC-CHECK:  Name: PECOFF header
+#
+# BASIC-CHECK:  Index: 1
+# BASIC-CHECK:  Name: .text
+# BASIC-CHECK:  Type: code
+# BASIC-CHECK:  VM size: 22
+# BASIC-CHECK:  File size: 512
+#
+# BASIC-CHECK:  Index: 2
+# BASIC-CHECK:  Name: .rdata
+# BASIC-CHECK:  Type: data
+# BASIC-CHECK:  VM size: {{.}}
+# BASIC-CHECK:  File size: 512
+#
+# BASIC-CHECK:  Index: 3
+# BASIC-CHECK:  Name: .pdata
+# BASIC-CHECK:  Type: data
+# BASIC-CHECK:  VM size: 12
+# BASIC-CHECK:  File size: 512
+#
+# DEPS: Showing 0 dependent module(s)
+
+
+--- !COFF
+header:          
+  Machine:         IMAGE_FILE_MACHINE_AMD64
+  Characteristics: [  ]
+sections:        
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    Alignment:       16
+    SectionData:     50894C24048B4C24040FAF4C2404890C248B042459C3
+  - Name:            .data
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+    Alignment:       4
+    SectionData:     ''
+  - Name:            .bss
+    Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+    Alignment:       4
+    SectionData:     ''
+  - Name:            .xdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    Alignment:       4
+    SectionData:     '0101010001020000'
+  - Name:            .drectve
+    Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
+    Alignment:       1
+    SectionData:     202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962
+  - Name:            .pdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    Alignment:       4
+    SectionData:     '000000001600000000000000'
+    Relocations:     
+      - VirtualAddress:  0
+        SymbolName:      'DllFunc'
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  4
+        SymbolName:      'DllFunc'
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+      - VirtualAddress:  8
+        SymbolName:      .xdata
+        Type:            IMAGE_REL_AMD64_ADDR32NB
+  - Name:            .llvm_addrsig
+    Characteristics: [ IMAGE_SCN_LNK_REMOVE ]
+    Alignment:       1
+    SectionData:     ''
+symbols:         
+  - Name:            .text
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    SectionDefinition: 
+      Length:          22
+      NumberOfRelocations: 0
+      NumberOfLinenumbers: 0
+      CheckSum:        3054557294
+      Number:          1
+  - Name:            .data
+    Value:           0
+    SectionNumber:   2
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    SectionDefinition: 
+      Length:          0
+      NumberOfRelocations: 0
+      NumberOfLinenumbers: 0
+      CheckSum:        0
+      Number:          2
+  - Name:            .bss
+    Value:           0
+    SectionNumber:   3
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    SectionDefinition: 
+      Length:          0
+      NumberOfRelocations: 0
+      NumberOfLinenumbers: 0
+      CheckSum:        0
+      Number:          3
+  - Name:            .xdata
+    Value:           0
+    SectionNumber:   4
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    SectionDefinition: 
+      Length:          8
+      NumberOfRelocations: 0
+      NumberOfLinenumbers: 0
+      CheckSum:        448359300
+      Number:          4
+  - Name:            .drectve
+    Value:           0
+    SectionNumber:   5
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    SectionDefinition: 
+      Length:          48
+      NumberOfRelocations: 0
+      NumberOfLinenumbers: 0
+      CheckSum:        149686238
+      Number:          5
+  - Name:            .pdata
+    Value:           0
+    SectionNumber:   6
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    SectionDefinition: 
+      Length:          12
+      NumberOfRelocations: 3
+      NumberOfLinenumbers: 0
+      CheckSum:        3134470316
+      Number:          6
+  - Name:            .llvm_addrsig
+    Value:           0
+    SectionNumber:   7
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+    SectionDefinition: 
+      Length:          0
+      NumberOfRelocations: 0
+      NumberOfLinenumbers: 0
+      CheckSum:        0
+      Number:          7
+  - Name:            '@feat.00'
+    Value:           0
+    SectionNumber:   -1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+  - Name:            'DllFunc'
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml
new file mode 100644
index 0000000..7956727
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml
@@ -0,0 +1,81 @@
+## Test that errors in loading an exe doesn't crash lldb.
+## The ExportTable RelativeVirtualAddress is out of bounds here.
+
+# RUN: yaml2obj %s > %t.exe
+# RUN: %lldb %t.exe 2>&1 | FileCheck %s
+
+# CHECK: error: '{{.*}}' doesn't contain any {{.*}} platform architectures
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4096
+  ImageBase:       1073741824
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:
+    RelativeVirtualAddress: 12345678
+    Size:            100
+  ImportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  CertificateTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Architecture:
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader:
+    RelativeVirtualAddress: 0
+    Size:            0
+header:
+  Machine:         IMAGE_FILE_MACHINE_AMD64
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     1
+    SectionData:     C3
+symbols:         []
+...
diff --git a/src/llvm-project/lldb/lit/Modules/PECOFF/lit.local.cfg b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/lit.local.cfg
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/PECOFF/lit.local.cfg
rename to src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/lit.local.cfg
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml
new file mode 100644
index 0000000..caf9555
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/section-types.yaml
@@ -0,0 +1,92 @@
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test object-file %t | FileCheck %s
+
+# CHECK-LABEL: Name: .text
+# CHECK-NEXT: Type: code
+
+# CHECK-LABEL: Name: .eh_fram
+# CHECK-NEXT: Type: eh-frame
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4096
+  ImageBase:       4194304
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_NO_SEH, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ImportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  CertificateTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable:
+    RelativeVirtualAddress: 12288
+    Size:            12
+  Debug:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Architecture:
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader:
+    RelativeVirtualAddress: 0
+    Size:            0
+header:
+  Machine:         IMAGE_FILE_MACHINE_I386
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_32BIT_MACHINE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     5
+    SectionData:     5589E55DC3
+  - Name:            .eh_fram
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  8192
+    VirtualSize:     52
+    SectionData:     1400000000000000017A5200017C0801000C040488010000180000001C000000001040000500000000410E088502420D05000000
+  - Name:            .reloc
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  12288
+    VirtualSize:     12
+    SectionData:     002000000C00000020300000
+symbols:
+...
diff --git a/src/llvm-project/lldb/lit/Modules/PECOFF/sections-names.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/PECOFF/sections-names.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/sections-names.yaml
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
new file mode 100644
index 0000000..d41427e
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/sections.yaml
@@ -0,0 +1,70 @@
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test object-file %t | FileCheck %s
+
+
+# CHECK:      Showing 3 sections
+# CHECK-NEXT:   Index: 0
+# CHECK-NEXT:   ID: 0xffffffffffffffff
+# CHECK-NEXT:   Name: PECOFF header
+# CHECK-NEXT:   Type: regular
+# CHECK-NEXT:   Permissions: r--
+# CHECK-NEXT:   Thread specific: no
+# CHECK-NEXT:   VM address: 0x40000000
+# CHECK-NEXT:   VM size: 512
+# CHECK-NEXT:   File size: 512
+# CHECK-EMPTY: 
+# CHECK-NEXT:   Index: 1
+# CHECK-NEXT:   ID: 0x1
+# CHECK-NEXT:   Name: .text
+# CHECK-NEXT:   Type: code
+# CHECK-NEXT:   Permissions: r-x
+# CHECK-NEXT:   Thread specific: no
+# CHECK-NEXT:   VM address: 0x40001000
+# CHECK-NEXT:   VM size: 64
+# CHECK-NEXT:   File size: 512
+# CHECK-EMPTY:
+# CHECK-NEXT:   Index: 2
+# CHECK-NEXT:   ID: 0x2
+# CHECK-NEXT:   Name: .data
+# CHECK-NEXT:   Type: data
+# CHECK-NEXT:   Permissions: r--
+# CHECK-NEXT:   Thread specific: no
+# CHECK-NEXT:   VM address: 0x40002000
+# CHECK-NEXT:   VM size: 64
+# CHECK-NEXT:   File size: 512
+
+
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4616
+  ImageBase:       1073741824
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+header:
+  Machine:         IMAGE_FILE_MACHINE_AMD64
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     64
+    SectionData:     DEADBEEFBAADF00D
+  - Name:            .data
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  8192
+    VirtualSize:     64
+    SectionData:     DEADBEEFBAADF00D
+symbols:         []
+...
diff --git a/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml
new file mode 100644
index 0000000..1d79e70
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml
@@ -0,0 +1,116 @@
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test symbols %t | FileCheck %s
+
+# CHECK: Type File Address/Value {{.*}} Size            Flags           Name
+# CHECK: Code 0x0000000040001000        0x{{[0-9a-f]+}} 0x{{[0-9a-f]+}} entry
+# CHECK:      0x0000000040002000        0x{{[0-9a-f]+}} 0x{{[0-9a-f]+}} variable
+
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4096
+  ImageBase:       1073741824
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ImportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  CertificateTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Architecture:
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader:
+    RelativeVirtualAddress: 0
+    Size:            0
+header:
+  Machine:         IMAGE_FILE_MACHINE_AMD64
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     1
+    SectionData:     C3
+  - Name:            .data
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
+    VirtualAddress:  8192
+    VirtualSize:     4
+    SectionData:     ''
+symbols:
+  - Name:            .text
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+  - Name:            .data
+    Value:           0
+    SectionNumber:   2
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+  - Name:            .bss
+    Value:           0
+    SectionNumber:   2
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_STATIC
+  - Name:            entry
+    Value:           0
+    SectionNumber:   1
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+  - Name:            variable
+    Value:           0
+    SectionNumber:   2
+    SimpleType:      IMAGE_SYM_TYPE_NULL
+    ComplexType:     IMAGE_SYM_DTYPE_NULL
+    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
+...
diff --git a/src/llvm-project/lldb/lit/Modules/PECOFF/uuid.yaml b/src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/PECOFF/uuid.yaml
rename to src/llvm-project/lldb/test/Shell/ObjectFile/PECOFF/uuid.yaml
diff --git a/src/llvm-project/lldb/lit/Modules/lit.local.cfg b/src/llvm-project/lldb/test/Shell/ObjectFile/lit.local.cfg
similarity index 100%
rename from src/llvm-project/lldb/lit/Modules/lit.local.cfg
rename to src/llvm-project/lldb/test/Shell/ObjectFile/lit.local.cfg
diff --git a/src/llvm-project/lldb/lit/Process/Inputs/env.cpp b/src/llvm-project/lldb/test/Shell/Process/Inputs/env.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Process/Inputs/env.cpp
rename to src/llvm-project/lldb/test/Shell/Process/Inputs/env.cpp
diff --git a/src/llvm-project/lldb/test/Shell/Process/TestEnvironment.test b/src/llvm-project/lldb/test/Shell/Process/TestEnvironment.test
new file mode 100644
index 0000000..a9c624b
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Process/TestEnvironment.test
@@ -0,0 +1,9 @@
+UNSUPPORTED: system-windows
+
+The double quotes around "BAR" ensure we don't match the command.
+
+RUN: %clangxx_host -std=c++11 %p/Inputs/env.cpp -o %t
+RUN: %lldb %t -o 'process launch --environment FOO="BAR"' | FileCheck %s
+RUN: %lldb %t -o 'env FOO="BAR"' -o 'process launch' | FileCheck %s
+
+CHECK: FOO=BAR
diff --git a/src/llvm-project/lldb/lit/Process/Windows/exception_access_violation.cpp b/src/llvm-project/lldb/test/Shell/Process/Windows/exception_access_violation.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Process/Windows/exception_access_violation.cpp
rename to src/llvm-project/lldb/test/Shell/Process/Windows/exception_access_violation.cpp
diff --git a/src/llvm-project/lldb/test/Shell/Process/Windows/launch_failure.yaml b/src/llvm-project/lldb/test/Shell/Process/Windows/launch_failure.yaml
new file mode 100644
index 0000000..be723ef
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Process/Windows/launch_failure.yaml
@@ -0,0 +1,90 @@
+## Test that we don't crash when the process fails to launch before reaching
+## the initial stop. This test exe has a dependency on NonExistent.dll.
+
+# REQUIRES: system-windows
+# REQUIRES: native && target-x86_64
+
+# RUN: yaml2obj %s > %t.exe
+# RUN: %lldb %t.exe -o run 2>&1 | FileCheck %s
+
+# CHECK: error: process launch failed: unknown error
+
+--- !COFF
+OptionalHeader:
+  AddressOfEntryPoint: 4096
+  ImageBase:       1073741824
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT, IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ImportTable:
+    RelativeVirtualAddress: 8192
+    Size:            40
+  ResourceTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  CertificateTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:
+    RelativeVirtualAddress: 0
+    Size:            0
+  Architecture:
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable:
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:
+    RelativeVirtualAddress: 8248
+    Size:            16
+  DelayImportDescriptor:
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader:
+    RelativeVirtualAddress: 0
+    Size:            0
+header:
+  Machine:         IMAGE_FILE_MACHINE_AMD64
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
+sections:
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     7
+    SectionData:     48FF2531100000
+  - Name:            .rdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  8192
+    VirtualSize:     96
+    SectionData:     282000000000000000000000502000003820000000000000000000000000000000000000000000004820000000000000000000000000000048200000000000000000000000000000000066756E6300004E6F6E4578697374656E742E646C6C00
+symbols:         []
+...
diff --git a/src/llvm-project/lldb/lit/Quit/TestQuitExitCode-30.test b/src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCode-30.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Quit/TestQuitExitCode-30.test
rename to src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCode-30.test
diff --git a/src/llvm-project/lldb/lit/Quit/TestQuitExitCode0.test b/src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCode0.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Quit/TestQuitExitCode0.test
rename to src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCode0.test
diff --git a/src/llvm-project/lldb/lit/Quit/TestQuitExitCode30.test b/src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCode30.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Quit/TestQuitExitCode30.test
rename to src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCode30.test
diff --git a/src/llvm-project/lldb/lit/Quit/TestQuitExitCodeHex0.test b/src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeHex0.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Quit/TestQuitExitCodeHex0.test
rename to src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeHex0.test
diff --git a/src/llvm-project/lldb/lit/Quit/TestQuitExitCodeHexA.test b/src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeHexA.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Quit/TestQuitExitCodeHexA.test
rename to src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeHexA.test
diff --git a/src/llvm-project/lldb/lit/Quit/TestQuitExitCodeImplicit0.test b/src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeImplicit0.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Quit/TestQuitExitCodeImplicit0.test
rename to src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeImplicit0.test
diff --git a/src/llvm-project/lldb/lit/Quit/TestQuitExitCodeNonInt.test b/src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeNonInt.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Quit/TestQuitExitCodeNonInt.test
rename to src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeNonInt.test
diff --git a/src/llvm-project/lldb/lit/Quit/TestQuitExitCodeTooManyArgs.test b/src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeTooManyArgs.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Quit/TestQuitExitCodeTooManyArgs.test
rename to src/llvm-project/lldb/test/Shell/Quit/TestQuitExitCodeTooManyArgs.test
diff --git a/src/llvm-project/lldb/lit/Quit/expect_exit_code.py b/src/llvm-project/lldb/test/Shell/Quit/expect_exit_code.py
similarity index 100%
rename from src/llvm-project/lldb/lit/Quit/expect_exit_code.py
rename to src/llvm-project/lldb/test/Shell/Quit/expect_exit_code.py
diff --git a/src/llvm-project/lldb/test/Shell/Register/Inputs/aarch64-fp-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/aarch64-fp-read.cpp
new file mode 100644
index 0000000..c1bf659
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/Inputs/aarch64-fp-read.cpp
@@ -0,0 +1,19 @@
+int main() {
+  asm volatile(
+    "fmov     d0,  #0.5\n\t"
+    "fmov     d1,  #1.5\n\t"
+    "fmov     d2,  #2.5\n\t"
+    "fmov     d3,  #3.5\n\t"
+    "fmov     s4,  #4.5\n\t"
+    "fmov     s5,  #5.5\n\t"
+    "fmov     s6,  #6.5\n\t"
+    "fmov     s7,  #7.5\n\t"
+    "\n\t"
+    "brk      #0\n\t"
+    :
+    :
+    : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7"
+  );
+
+  return 0;
+}
diff --git a/src/llvm-project/lldb/test/Shell/Register/Inputs/aarch64-gp-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/aarch64-gp-read.cpp
new file mode 100644
index 0000000..4bda5fc
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/Inputs/aarch64-gp-read.cpp
@@ -0,0 +1,47 @@
+#include <cstdint>
+
+struct alignas(16) vec_t {
+  uint64_t a, b;
+};
+
+int main() {
+  constexpr uint64_t gprs[] = {
+    0x0001020304050607,
+    0x1011121314151617,
+    0x2021222324252627,
+    0x3031323334353637,
+    0x4041424344454647,
+    0x5051525354555657,
+    0x6061626364656667,
+    0x7071727374757677,
+  };
+
+  constexpr vec_t vecs[] = {
+    { 0x0F0E0D0C0B0A0908, 0x1716151413121110, },
+    { 0x100F0E0D0C0B0A09, 0x1817161514131211, },
+    { 0x11100F0E0D0C0B0A, 0x1918171615141312, },
+    { 0x1211100F0E0D0C0B, 0x1A19181716151413, },
+    { 0x131211100F0E0D0C, 0x1B1A191817161514, },
+    { 0x14131211100F0E0D, 0x1C1B1A1918171615, },
+    { 0x1514131211100F0E, 0x1D1C1B1A19181716, },
+    { 0x161514131211100F, 0x1E1D1C1B1A191817, },
+  };
+
+  asm volatile(
+    "ldp      x0,  x1,  [%0]\n\t"
+    "ldp      x2,  x3,  [%0, #16]\n\t"
+    "ldp      x4,  x5,  [%0, #32]\n\t"
+    "ldp      x6,  x7,  [%0, #48]\n\t"
+    "\n\t"
+    "ld1      {v0.2d, v1.2d, v2.2d, v3.2d}, [%1], #64\n\t"
+    "ld1      {v4.2d, v5.2d, v6.2d, v7.2d}, [%1], #64\n\t"
+    "\n\t"
+    "brk      #0\n\t"
+    :
+    : "r"(gprs), "r"(vecs)
+    : "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7",
+      "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7"
+  );
+
+  return 0;
+}
diff --git a/src/llvm-project/lldb/test/Shell/Register/Inputs/arm-fp-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/arm-fp-read.cpp
new file mode 100644
index 0000000..2dce2ed
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/Inputs/arm-fp-read.cpp
@@ -0,0 +1,19 @@
+int main() {
+  asm volatile(
+    "vmov.f64 d0,  #0.5\n\t"
+    "vmov.f64 d1,  #1.5\n\t"
+    "vmov.f64 d2,  #2.5\n\t"
+    "vmov.f64 d3,  #3.5\n\t"
+    "vmov.f32 s8,  #4.5\n\t"
+    "vmov.f32 s9,  #5.5\n\t"
+    "vmov.f32 s10, #6.5\n\t"
+    "vmov.f32 s11, #7.5\n\t"
+    "\n\t"
+    "bkpt     #0\n\t"
+    :
+    :
+    : "d0", "d1", "d2", "d3", "s8", "s9", "s10", "s11"
+  );
+
+  return 0;
+}
diff --git a/src/llvm-project/lldb/test/Shell/Register/Inputs/arm-gp-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/arm-gp-read.cpp
new file mode 100644
index 0000000..fd891c4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/Inputs/arm-gp-read.cpp
@@ -0,0 +1,44 @@
+#include <cstdint>
+
+struct alignas(16) vec_t {
+  uint64_t a, b;
+};
+
+int main() {
+  constexpr uint32_t gprs[] = {
+    0x00010203,
+    0x10111213,
+    0x20212223,
+    0x30313233,
+    0x40414243,
+    0x50515253,
+    0x60616263,
+    0x70717273,
+  };
+
+  constexpr vec_t vecs[] = {
+    { 0x0F0E0D0C0B0A0908, 0x1716151413121110, },
+    { 0x100F0E0D0C0B0A09, 0x1817161514131211, },
+    { 0x11100F0E0D0C0B0A, 0x1918171615141312, },
+    { 0x1211100F0E0D0C0B, 0x1A19181716151413, },
+  };
+  const vec_t *vec_ptr = vecs;
+
+  asm volatile(
+    "ldrd     r0,  r1,  [%1]\n\t"
+    "ldrd     r2,  r3,  [%1, #8]\n\t"
+    "ldrd     r4,  r5,  [%1, #16]\n\t"
+    "ldrd     r6,  r7,  [%1, #24]\n\t"
+    "\n\t"
+    "vld1.64  {q0, q1}, [%0]!\n\t"
+    "vld1.64  {q2, q3}, [%0]!\n\t"
+    "\n\t"
+    "bkpt     #0\n\t"
+    : "+r"(vec_ptr)
+    : "r"(gprs)
+    : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+      "q0", "q1", "q2", "q3"
+  );
+
+  return 0;
+}
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-64-gp-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-64-gp-read.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-64-gp-read.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-64-gp-read.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-64-gp-write.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-64-gp-write.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-64-gp-write.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-64-gp-write.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-64-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-64-read.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-64-read.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-64-read.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-64-write.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-64-write.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-64-write.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-64-write.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-gp-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-gp-read.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-gp-read.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-gp-read.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-gp-write.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-gp-write.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-gp-write.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-gp-write.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-mm-xmm-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-mm-xmm-read.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-mm-xmm-read.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-mm-xmm-read.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-mm-xmm-write.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-mm-xmm-write.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-mm-xmm-write.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-mm-xmm-write.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-ymm-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-ymm-read.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-ymm-read.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-ymm-read.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-ymm-write.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-ymm-write.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-ymm-write.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-ymm-write.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-zmm-read.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-zmm-read.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-zmm-read.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-zmm-read.cpp
diff --git a/src/llvm-project/lldb/lit/Register/Inputs/x86-zmm-write.cpp b/src/llvm-project/lldb/test/Shell/Register/Inputs/x86-zmm-write.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Register/Inputs/x86-zmm-write.cpp
rename to src/llvm-project/lldb/test/Shell/Register/Inputs/x86-zmm-write.cpp
diff --git a/src/llvm-project/lldb/test/Shell/Register/aarch64-fp-read.test b/src/llvm-project/lldb/test/Shell/Register/aarch64-fp-read.test
new file mode 100644
index 0000000..b433c72
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/aarch64-fp-read.test
@@ -0,0 +1,21 @@
+# REQUIRES: native && target-aarch64
+# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/aarch64-fp-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read d0
+register read d1
+register read d2
+register read d3
+register read s4
+register read s5
+register read s6
+register read s7
+# CHECK-DAG: d0 = 0.5
+# CHECK-DAG: d1 = 1.5
+# CHECK-DAG: d2 = 2.5
+# CHECK-DAG: d3 = 3.5
+# CHECK-DAG: s4 = 4.5
+# CHECK-DAG: s5 = 5.5
+# CHECK-DAG: s6 = 6.5
+# CHECK-DAG: s7 = 7.5
diff --git a/src/llvm-project/lldb/test/Shell/Register/aarch64-gp-read.test b/src/llvm-project/lldb/test/Shell/Register/aarch64-gp-read.test
new file mode 100644
index 0000000..8a51e66
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/aarch64-gp-read.test
@@ -0,0 +1,24 @@
+# REQUIRES: native && target-aarch64
+# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/aarch64-gp-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: x0 = 0x0001020304050607
+# CHECK-DAG: x1 = 0x1011121314151617
+# CHECK-DAG: x2 = 0x2021222324252627
+# CHECK-DAG: x3 = 0x3031323334353637
+# CHECK-DAG: x4 = 0x4041424344454647
+# CHECK-DAG: x5 = 0x5051525354555657
+# CHECK-DAG: x6 = 0x6061626364656667
+# CHECK-DAG: x7 = 0x7071727374757677
+# CHECK-DAG: w0 = 0x04050607
+
+# CHECK-DAG: v0 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17}
+# CHECK-DAG: v1 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18}
+# CHECK-DAG: v2 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19}
+# CHECK-DAG: v3 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}
+# CHECK-DAG: v4 = {0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b}
+# CHECK-DAG: v5 = {0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c}
+# CHECK-DAG: v6 = {0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d}
+# CHECK-DAG: v7 = {0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e}
diff --git a/src/llvm-project/lldb/test/Shell/Register/arm-fp-read.test b/src/llvm-project/lldb/test/Shell/Register/arm-fp-read.test
new file mode 100644
index 0000000..538d6af
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/arm-fp-read.test
@@ -0,0 +1,21 @@
+# REQUIRES: native && target-arm
+# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/arm-fp-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read d0
+register read d1
+register read d2
+register read d3
+register read s8
+register read s9
+register read s10
+register read s11
+# CHECK-DAG: d0 = 0.5
+# CHECK-DAG: d1 = 1.5
+# CHECK-DAG: d2 = 2.5
+# CHECK-DAG: d3 = 3.5
+# CHECK-DAG: s8 = 4.5
+# CHECK-DAG: s9 = 5.5
+# CHECK-DAG: s10 = 6.5
+# CHECK-DAG: s11 = 7.5
diff --git a/src/llvm-project/lldb/test/Shell/Register/arm-gp-read.test b/src/llvm-project/lldb/test/Shell/Register/arm-gp-read.test
new file mode 100644
index 0000000..bcb289b
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/arm-gp-read.test
@@ -0,0 +1,19 @@
+# REQUIRES: native && target-arm
+# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/arm-gp-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: r0 = 0x00010203
+# CHECK-DAG: r1 = 0x10111213
+# CHECK-DAG: r2 = 0x20212223
+# CHECK-DAG: r3 = 0x30313233
+# CHECK-DAG: r4 = 0x40414243
+# CHECK-DAG: r5 = 0x50515253
+# CHECK-DAG: r6 = 0x60616263
+# CHECK-DAG: r7 = 0x70717273
+
+# CHECK-DAG: q0 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17}
+# CHECK-DAG: q1 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18}
+# CHECK-DAG: q2 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19}
+# CHECK-DAG: q3 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-gp-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-gp-read.test
new file mode 100644
index 0000000..142f3d9
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-gp-read.test
@@ -0,0 +1,42 @@
+# XFAIL: system-windows
+# REQUIRES: native && target-x86_64
+# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/x86-64-gp-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: rax = 0x0102030405060708
+# CHECK-DAG: rbx = 0x1112131415161718
+# CHECK-DAG: rcx = 0x2122232425262728
+# CHECK-DAG: rdx = 0x3132333435363738
+# CHECK-DAG: rdi = 0x7172737475767778
+# CHECK-DAG: rsi = 0x6162636465666768
+# CHECK-DAG: rbp = 0x5152535455565758
+# CHECK-DAG: rsp = 0x4142434445464748
+# CHECK-DAG: eax = 0x05060708
+# CHECK-DAG: ebx = 0x15161718
+# CHECK-DAG: ecx = 0x25262728
+# CHECK-DAG: edx = 0x35363738
+# CHECK-DAG: edi = 0x75767778
+# CHECK-DAG: esi = 0x65666768
+# CHECK-DAG: ebp = 0x55565758
+# CHECK-DAG: esp = 0x45464748
+# CHECK-DAG: ax = 0x0708
+# CHECK-DAG: bx = 0x1718
+# CHECK-DAG: cx = 0x2728
+# CHECK-DAG: dx = 0x3738
+# CHECK-DAG: di = 0x7778
+# CHECK-DAG: si = 0x6768
+# CHECK-DAG: bp = 0x5758
+# CHECK-DAG: sp = 0x4748
+# CHECK-DAG: ah = 0x07
+# CHECK-DAG: bh = 0x17
+# CHECK-DAG: ch = 0x27
+# CHECK-DAG: dh = 0x37
+# CHECK-DAG: al = 0x08
+# CHECK-DAG: bl = 0x18
+# CHECK-DAG: cl = 0x28
+# CHECK-DAG: dl = 0x38
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-gp-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-gp-write.test
new file mode 100644
index 0000000..747ab59
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-gp-write.test
@@ -0,0 +1,26 @@
+# UNSUPPORTED: system-darwin
+# REQUIRES: native && target-x86_64
+# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/x86-64-gp-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write rax 0x0102030405060708
+register write rbx 0x1112131415161718
+register write rcx 0x2122232425262728
+register write rdx 0x3132333435363738
+register write rsp 0x4142434445464748
+register write rbp 0x5152535455565758
+register write rsi 0x6162636465666768
+register write rdi 0x7172737475767778
+
+process continue
+# CHECK-DAG: rax = 0x0102030405060708
+# CHECK-DAG: rbx = 0x1112131415161718
+# CHECK-DAG: rcx = 0x2122232425262728
+# CHECK-DAG: rdx = 0x3132333435363738
+# CHECK-DAG: rsp = 0x4142434445464748
+# CHECK-DAG: rbp = 0x5152535455565758
+# CHECK-DAG: rsi = 0x6162636465666768
+# CHECK-DAG: rdi = 0x7172737475767778
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-read.test
new file mode 100644
index 0000000..fc09319
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-read.test
@@ -0,0 +1,51 @@
+# XFAIL: system-windows
+# REQUIRES: native && target-x86_64
+# RUN: %clangxx_host %p/Inputs/x86-64-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: r8 = 0x0001020304050607
+# CHECK-DAG: r9 = 0x1011121314151617
+# CHECK-DAG: r10 = 0x2021222324252627
+# CHECK-DAG: r11 = 0x3031323334353637
+# CHECK-DAG: r12 = 0x4041424344454647
+# CHECK-DAG: r13 = 0x5051525354555657
+# CHECK-DAG: r14 = 0x6061626364656667
+# CHECK-DAG: r15 = 0x7071727374757677
+# CHECK-DAG: r8d = 0x04050607
+# CHECK-DAG: r9d = 0x14151617
+# CHECK-DAG: r10d = 0x24252627
+# CHECK-DAG: r11d = 0x34353637
+# CHECK-DAG: r12d = 0x44454647
+# CHECK-DAG: r13d = 0x54555657
+# CHECK-DAG: r14d = 0x64656667
+# CHECK-DAG: r15d = 0x74757677
+# CHECK-DAG: r8w = 0x0607
+# CHECK-DAG: r9w = 0x1617
+# CHECK-DAG: r10w = 0x2627
+# CHECK-DAG: r11w = 0x3637
+# CHECK-DAG: r12w = 0x4647
+# CHECK-DAG: r13w = 0x5657
+# CHECK-DAG: r14w = 0x6667
+# CHECK-DAG: r15w = 0x7677
+# CHECK-DAG: r8l = 0x07
+# CHECK-DAG: r9l = 0x17
+# CHECK-DAG: r10l = 0x27
+# CHECK-DAG: r11l = 0x37
+# CHECK-DAG: r12l = 0x47
+# CHECK-DAG: r13l = 0x57
+# CHECK-DAG: r14l = 0x67
+# CHECK-DAG: r15l = 0x77
+
+# CHECK-DAG: xmm8 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17}
+# CHECK-DAG: xmm9 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18}
+# CHECK-DAG: xmm10 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19}
+# CHECK-DAG: xmm11 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}
+# CHECK-DAG: xmm12 = {0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b}
+# CHECK-DAG: xmm13 = {0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c}
+# CHECK-DAG: xmm14 = {0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d}
+# CHECK-DAG: xmm15 = {0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e}
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-write.test
new file mode 100644
index 0000000..76a9d23
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-write.test
@@ -0,0 +1,47 @@
+# XFAIL: system-darwin
+# XFAIL: system-windows
+# REQUIRES: native && (target-x86 || target-x86_64) && native-cpu-sse
+# RUN: %clangxx_host %p/Inputs/x86-64-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write r8 0x0001020304050607
+register write r9 0x1011121314151617
+register write r10 0x2021222324252627
+register write r11 0x3031323334353637
+register write r12 0x4041424344454647
+register write r13 0x5051525354555657
+register write r14 0x6061626364656667
+register write r15 0x7071727374757677
+
+register write xmm8 "{0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17}"
+register write xmm9 "{0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18}"
+register write xmm10 "{0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19}"
+register write xmm11 "{0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}"
+register write xmm12 "{0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b}"
+register write xmm13 "{0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c}"
+register write xmm14 "{0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d}"
+register write xmm15 "{0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e}"
+
+process continue
+# CHECK: process continue
+
+# CHECK-DAG: r8 = 0x0001020304050607
+# CHECK-DAG: r9 = 0x1011121314151617
+# CHECK-DAG: r10 = 0x2021222324252627
+# CHECK-DAG: r11 = 0x3031323334353637
+# CHECK-DAG: r12 = 0x4041424344454647
+# CHECK-DAG: r13 = 0x5051525354555657
+# CHECK-DAG: r14 = 0x6061626364656667
+# CHECK-DAG: r15 = 0x7071727374757677
+
+# CHECK-DAG: xmm8 = { 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 }
+# CHECK-DAG: xmm9 = { 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 }
+# CHECK-DAG: xmm10 = { 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 }
+# CHECK-DAG: xmm11 = { 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a }
+# CHECK-DAG: xmm12 = { 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b }
+# CHECK-DAG: xmm13 = { 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c }
+# CHECK-DAG: xmm14 = { 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d }
+# CHECK-DAG: xmm15 = { 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e }
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-xmm16-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-xmm16-read.test
new file mode 100644
index 0000000..3e6b8b0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-xmm16-read.test
@@ -0,0 +1,30 @@
+# XFAIL: system-freebsd
+# XFAIL: system-linux
+# XFAIL: system-netbsd
+# XFAIL: system-windows
+# XFAIL: system-darwin
+# REQUIRES: native && target-x86_64 && native-cpu-avx512f
+# RUN: %clangxx_host %p/Inputs/x86-zmm-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: xmm16 = {0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}
+# CHECK-DAG: xmm17 = {0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}
+# CHECK-DAG: xmm18 = {0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}
+# CHECK-DAG: xmm19 = {0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}
+# CHECK-DAG: xmm20 = {0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}
+# CHECK-DAG: xmm21 = {0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}
+# CHECK-DAG: xmm22 = {0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}
+# CHECK-DAG: xmm23 = {0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}
+# CHECK-DAG: xmm24 = {0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27}
+# CHECK-DAG: xmm25 = {0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28}
+# CHECK-DAG: xmm26 = {0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29}
+# CHECK-DAG: xmm27 = {0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a}
+# CHECK-DAG: xmm28 = {0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b}
+# CHECK-DAG: xmm29 = {0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c}
+# CHECK-DAG: xmm30 = {0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d}
+# CHECK-DAG: xmm31 = {0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e}
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-xmm16-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-xmm16-write.test
new file mode 100644
index 0000000..447e2d7
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-xmm16-write.test
@@ -0,0 +1,48 @@
+# XFAIL: system-darwin
+# XFAIL: system-freebsd
+# XFAIL: system-linux
+# XFAIL: system-netbsd
+# XFAIL: system-windows
+# REQUIRES: native && target-x86 && native-cpu-avx512f
+# RUN: %clangxx_host %p/Inputs/x86-zmm-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write xmm16 "{0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}"
+register write xmm17 "{0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}"
+register write xmm18 "{0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}"
+register write xmm19 "{0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}"
+register write xmm20 "{0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}"
+register write xmm21 "{0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}"
+register write xmm22 "{0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}"
+register write xmm23 "{0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}"
+register write xmm24 "{0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27}"
+register write xmm25 "{0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28}"
+register write xmm26 "{0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29}"
+register write xmm27 "{0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a}"
+register write xmm28 "{0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b}"
+register write xmm29 "{0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c}"
+register write xmm30 "{0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d}"
+register write xmm31 "{0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e}"
+
+process continue
+# CHECK: process continue
+
+# CHECK-DAG: zmm16 = { 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm17 = { 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm18 = { 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm19 = { 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm20 = { 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm21 = { 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm22 = { 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm23 = { 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm24 = { 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm25 = { 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm26 = { 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm27 = { 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm28 = { 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm29 = { 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm30 = { 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm31 = { 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm-read.test
new file mode 100644
index 0000000..0d01b09
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm-read.test
@@ -0,0 +1,43 @@
+# XFAIL: system-windows
+# REQUIRES: native && target-x86_64 && native-cpu-avx
+# RUN: %clangxx_host %p/Inputs/x86-ymm-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: xmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f}
+# CHECK-DAG: xmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}
+# CHECK-DAG: xmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11}
+# CHECK-DAG: xmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12}
+# CHECK-DAG: xmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13}
+# CHECK-DAG: xmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14}
+# CHECK-DAG: xmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15}
+# CHECK-DAG: xmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16}
+# CHECK-DAG: xmm8 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17}
+# CHECK-DAG: xmm9 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18}
+# CHECK-DAG: xmm10 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19}
+# CHECK-DAG: xmm11 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a}
+# CHECK-DAG: xmm12 = {0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b}
+# CHECK-DAG: xmm13 = {0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c}
+# CHECK-DAG: xmm14 = {0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d}
+# CHECK-DAG: xmm15 = {0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e}
+
+# CHECK-DAG: ymm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}
+# CHECK-DAG: ymm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}
+# CHECK-DAG: ymm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}
+# CHECK-DAG: ymm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}
+# CHECK-DAG: ymm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}
+# CHECK-DAG: ymm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}
+# CHECK-DAG: ymm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}
+# CHECK-DAG: ymm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}
+# CHECK-DAG: ymm8 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27}
+# CHECK-DAG: ymm9 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28}
+# CHECK-DAG: ymm10 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29}
+# CHECK-DAG: ymm11 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a}
+# CHECK-DAG: ymm12 = {0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b}
+# CHECK-DAG: ymm13 = {0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c}
+# CHECK-DAG: ymm14 = {0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d}
+# CHECK-DAG: ymm15 = {0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e}
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm-write.test
new file mode 100644
index 0000000..05b3c2f
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm-write.test
@@ -0,0 +1,45 @@
+# XFAIL: system-darwin
+# XFAIL: system-windows
+# REQUIRES: native && target-x86_64 && native-cpu-avx
+# RUN: %clangxx_host %p/Inputs/x86-ymm-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write ymm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}"
+register write ymm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}"
+register write ymm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}"
+register write ymm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}"
+register write ymm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}"
+register write ymm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}"
+register write ymm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}"
+register write ymm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}"
+register write ymm8 "{0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27}"
+register write ymm9 "{0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28}"
+register write ymm10 "{0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29}"
+register write ymm11 "{0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a}"
+register write ymm12 "{0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b}"
+register write ymm13 "{0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c}"
+register write ymm14 "{0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d}"
+register write ymm15 "{0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e}"
+
+process continue
+# CHECK: process continue
+
+# CHECK-DAG: ymm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f }
+# CHECK-DAG: ymm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 }
+# CHECK-DAG: ymm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 }
+# CHECK-DAG: ymm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 }
+# CHECK-DAG: ymm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 }
+# CHECK-DAG: ymm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 }
+# CHECK-DAG: ymm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 }
+# CHECK-DAG: ymm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 }
+# CHECK-DAG: ymm8 = { 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 }
+# CHECK-DAG: ymm9 = { 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 }
+# CHECK-DAG: ymm10 = { 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 }
+# CHECK-DAG: ymm11 = { 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a }
+# CHECK-DAG: ymm12 = { 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b }
+# CHECK-DAG: ymm13 = { 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c }
+# CHECK-DAG: ymm14 = { 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d }
+# CHECK-DAG: ymm15 = { 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e }
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm16-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm16-read.test
new file mode 100644
index 0000000..ee78779
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm16-read.test
@@ -0,0 +1,30 @@
+# XFAIL: system-freebsd
+# XFAIL: system-linux
+# XFAIL: system-netbsd
+# XFAIL: system-windows
+# XFAIL: system-darwin
+# REQUIRES: native && target-x86_64 && native-cpu-avx512f
+# RUN: %clangxx_host %p/Inputs/x86-zmm-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: ymm16 = {0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f}
+# CHECK-DAG: ymm17 = {0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30}
+# CHECK-DAG: ymm18 = {0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31}
+# CHECK-DAG: ymm19 = {0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32}
+# CHECK-DAG: ymm20 = {0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33}
+# CHECK-DAG: ymm21 = {0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34}
+# CHECK-DAG: ymm22 = {0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35}
+# CHECK-DAG: ymm23 = {0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36}
+# CHECK-DAG: ymm24 = {0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37}
+# CHECK-DAG: ymm25 = {0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38}
+# CHECK-DAG: ymm26 = {0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39}
+# CHECK-DAG: ymm27 = {0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a}
+# CHECK-DAG: ymm28 = {0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b}
+# CHECK-DAG: ymm29 = {0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c}
+# CHECK-DAG: ymm30 = {0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d}
+# CHECK-DAG: ymm31 = {0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e}
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm16-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm16-write.test
new file mode 100644
index 0000000..aa62d4f
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-ymm16-write.test
@@ -0,0 +1,48 @@
+# XFAIL: system-darwin
+# XFAIL: system-freebsd
+# XFAIL: system-linux
+# XFAIL: system-netbsd
+# XFAIL: system-windows
+# REQUIRES: native && target-x86 && native-cpu-avx512f
+# RUN: %clangxx_host %p/Inputs/x86-zmm-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write ymm16 "{0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f}"
+register write ymm17 "{0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30}"
+register write ymm18 "{0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31}"
+register write ymm19 "{0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32}"
+register write ymm20 "{0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33}"
+register write ymm21 "{0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34}"
+register write ymm22 "{0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35}"
+register write ymm23 "{0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36}"
+register write ymm24 "{0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37}"
+register write ymm25 "{0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38}"
+register write ymm26 "{0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39}"
+register write ymm27 "{0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a}"
+register write ymm28 "{0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b}"
+register write ymm29 "{0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c}"
+register write ymm30 "{0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d}"
+register write ymm31 "{0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e}"
+
+process continue
+# CHECK: process continue
+
+# CHECK-DAG: zmm16 = { 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm17 = { 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm18 = { 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm19 = { 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm20 = { 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm21 = { 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm22 = { 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm23 = { 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm24 = { 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm25 = { 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm26 = { 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm27 = { 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm28 = { 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm29 = { 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm30 = { 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+# CHECK-DAG: zmm31 = { 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 0xf0 }
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-zmm-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-zmm-read.test
new file mode 100644
index 0000000..92d9735
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-zmm-read.test
@@ -0,0 +1,45 @@
+# XFAIL: system-freebsd
+# XFAIL: system-linux
+# XFAIL: system-netbsd
+# XFAIL: system-windows
+# REQUIRES: native && target-x86_64 && native-cpu-avx512f
+# RUN: %clangxx_host %p/Inputs/x86-zmm-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: zmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f}
+# CHECK-DAG: zmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40}
+# CHECK-DAG: zmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41}
+# CHECK-DAG: zmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42}
+# CHECK-DAG: zmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43}
+# CHECK-DAG: zmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44}
+# CHECK-DAG: zmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45}
+# CHECK-DAG: zmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46}
+# CHECK-DAG: zmm8 = {0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47}
+# CHECK-DAG: zmm9 = {0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48}
+# CHECK-DAG: zmm10 = {0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49}
+# CHECK-DAG: zmm11 = {0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a}
+# CHECK-DAG: zmm12 = {0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b}
+# CHECK-DAG: zmm13 = {0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c}
+# CHECK-DAG: zmm14 = {0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d}
+# CHECK-DAG: zmm15 = {0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e}
+# CHECK-DAG: zmm16 = {0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f}
+# CHECK-DAG: zmm17 = {0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50}
+# CHECK-DAG: zmm18 = {0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51}
+# CHECK-DAG: zmm19 = {0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52}
+# CHECK-DAG: zmm20 = {0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53}
+# CHECK-DAG: zmm21 = {0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54}
+# CHECK-DAG: zmm22 = {0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55}
+# CHECK-DAG: zmm23 = {0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56}
+# CHECK-DAG: zmm24 = {0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57}
+# CHECK-DAG: zmm25 = {0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58}
+# CHECK-DAG: zmm26 = {0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59}
+# CHECK-DAG: zmm27 = {0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a}
+# CHECK-DAG: zmm28 = {0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b}
+# CHECK-DAG: zmm29 = {0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c}
+# CHECK-DAG: zmm30 = {0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d}
+# CHECK-DAG: zmm31 = {0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e}
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-64-zmm-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-64-zmm-write.test
new file mode 100644
index 0000000..4b22235
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-64-zmm-write.test
@@ -0,0 +1,80 @@
+# XFAIL: system-darwin
+# XFAIL: system-freebsd
+# XFAIL: system-linux
+# XFAIL: system-netbsd
+# XFAIL: system-windows
+# REQUIRES: native && target-x86_64 && native-cpu-avx512f
+# RUN: %clangxx_host %p/Inputs/x86-zmm-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write zmm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f}"
+register write zmm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40}"
+register write zmm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41}"
+register write zmm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42}"
+register write zmm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43}"
+register write zmm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44}"
+register write zmm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45}"
+register write zmm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46}"
+register write zmm8 "{0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47}"
+register write zmm9 "{0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48}"
+register write zmm10 "{0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49}"
+register write zmm11 "{0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a}"
+register write zmm12 "{0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b}"
+register write zmm13 "{0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c}"
+register write zmm14 "{0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d}"
+register write zmm15 "{0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e}"
+register write zmm16 "{0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f}"
+register write zmm17 "{0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50}"
+register write zmm18 "{0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51}"
+register write zmm19 "{0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52}"
+register write zmm20 "{0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53}"
+register write zmm21 "{0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54}"
+register write zmm22 "{0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55}"
+register write zmm23 "{0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56}"
+register write zmm24 "{0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57}"
+register write zmm25 "{0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58}"
+register write zmm26 "{0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59}"
+register write zmm27 "{0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a}"
+register write zmm28 "{0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b}"
+register write zmm29 "{0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c}"
+register write zmm30 "{0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d}"
+register write zmm31 "{0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e}"
+
+process continue
+# CHECK: process continue
+
+# CHECK-DAG: zmm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f }
+# CHECK-DAG: zmm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 }
+# CHECK-DAG: zmm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 }
+# CHECK-DAG: zmm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 }
+# CHECK-DAG: zmm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 }
+# CHECK-DAG: zmm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 }
+# CHECK-DAG: zmm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 }
+# CHECK-DAG: zmm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 }
+# CHECK-DAG: zmm8 = { 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 }
+# CHECK-DAG: zmm9 = { 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 }
+# CHECK-DAG: zmm10 = { 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 }
+# CHECK-DAG: zmm11 = { 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a }
+# CHECK-DAG: zmm12 = { 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b }
+# CHECK-DAG: zmm13 = { 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c }
+# CHECK-DAG: zmm14 = { 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d }
+# CHECK-DAG: zmm15 = { 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e }
+# CHECK-DAG: zmm16 = { 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f }
+# CHECK-DAG: zmm17 = { 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 }
+# CHECK-DAG: zmm18 = { 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 }
+# CHECK-DAG: zmm19 = { 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 }
+# CHECK-DAG: zmm20 = { 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 }
+# CHECK-DAG: zmm21 = { 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 }
+# CHECK-DAG: zmm22 = { 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 }
+# CHECK-DAG: zmm23 = { 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 }
+# CHECK-DAG: zmm24 = { 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 }
+# CHECK-DAG: zmm25 = { 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 }
+# CHECK-DAG: zmm26 = { 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 }
+# CHECK-DAG: zmm27 = { 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a }
+# CHECK-DAG: zmm28 = { 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b }
+# CHECK-DAG: zmm29 = { 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c }
+# CHECK-DAG: zmm30 = { 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d }
+# CHECK-DAG: zmm31 = { 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 0x47 0x48 0x49 0x4a 0x4b 0x4c 0x4d 0x4e 0x4f 0x50 0x51 0x52 0x53 0x54 0x55 0x56 0x57 0x58 0x59 0x5a 0x5b 0x5c 0x5d 0x5e }
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-gp-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-gp-read.test
new file mode 100644
index 0000000..1cac59d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-gp-read.test
@@ -0,0 +1,34 @@
+# XFAIL: system-windows
+# REQUIRES: native && target-x86
+# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/x86-gp-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: eax = 0x05060708
+# CHECK-DAG: ebx = 0x15161718
+# CHECK-DAG: ecx = 0x25262728
+# CHECK-DAG: edx = 0x35363738
+# CHECK-DAG: edi = 0x75767778
+# CHECK-DAG: esi = 0x65666768
+# CHECK-DAG: ebp = 0x55565758
+# CHECK-DAG: esp = 0x45464748
+# CHECK-DAG: ax = 0x0708
+# CHECK-DAG: bx = 0x1718
+# CHECK-DAG: cx = 0x2728
+# CHECK-DAG: dx = 0x3738
+# CHECK-DAG: di = 0x7778
+# CHECK-DAG: si = 0x6768
+# CHECK-DAG: bp = 0x5758
+# CHECK-DAG: sp = 0x4748
+# CHECK-DAG: ah = 0x07
+# CHECK-DAG: bh = 0x17
+# CHECK-DAG: ch = 0x27
+# CHECK-DAG: dh = 0x37
+# CHECK-DAG: al = 0x08
+# CHECK-DAG: bl = 0x18
+# CHECK-DAG: cl = 0x28
+# CHECK-DAG: dl = 0x38
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-gp-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-gp-write.test
new file mode 100644
index 0000000..c422ffd
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-gp-write.test
@@ -0,0 +1,26 @@
+# XFAIL: system-windows
+# REQUIRES: native && target-x86
+# RUN: %clangxx_host -fomit-frame-pointer %p/Inputs/x86-gp-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write eax 0x01020304
+register write ebx 0x11121314
+register write ecx 0x21222324
+register write edx 0x31323334
+register write esp 0x41424344
+register write ebp 0x51525354
+register write esi 0x61626364
+register write edi 0x71727374
+
+process continue
+# CHECK-DAG: eax = 0x01020304
+# CHECK-DAG: ebx = 0x11121314
+# CHECK-DAG: ecx = 0x21222324
+# CHECK-DAG: edx = 0x31323334
+# CHECK-DAG: esp = 0x41424344
+# CHECK-DAG: ebp = 0x51525354
+# CHECK-DAG: esi = 0x61626364
+# CHECK-DAG: edi = 0x71727374
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-mm-xmm-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-mm-xmm-read.test
new file mode 100644
index 0000000..bdf193b
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-mm-xmm-read.test
@@ -0,0 +1,28 @@
+# XFAIL: system-darwin
+# XFAIL: system-windows
+# REQUIRES: native && (target-x86 || target-x86_64) && native-cpu-sse
+# RUN: %clangxx_host %p/Inputs/x86-mm-xmm-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: mm0 = 0x0001020304050607
+# CHECK-DAG: mm1 = 0x1011121314151617
+# CHECK-DAG: mm2 = 0x2021222324252627
+# CHECK-DAG: mm3 = 0x3031323334353637
+# CHECK-DAG: mm4 = 0x4041424344454647
+# CHECK-DAG: mm5 = 0x5051525354555657
+# CHECK-DAG: mm6 = 0x6061626364656667
+# CHECK-DAG: mm7 = 0x7071727374757677
+
+# CHECK-DAG: xmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f}
+# CHECK-DAG: xmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}
+# CHECK-DAG: xmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11}
+# CHECK-DAG: xmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12}
+# CHECK-DAG: xmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13}
+# CHECK-DAG: xmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14}
+# CHECK-DAG: xmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15}
+# CHECK-DAG: xmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16}
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-mm-xmm-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-mm-xmm-write.test
new file mode 100644
index 0000000..6f380bd
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-mm-xmm-write.test
@@ -0,0 +1,47 @@
+# XFAIL: system-darwin
+# XFAIL: system-windows
+# REQUIRES: native && (target-x86 || target-x86_64) && native-cpu-sse
+# RUN: %clangxx_host %p/Inputs/x86-mm-xmm-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write mm0 0x0001020304050607
+register write mm1 0x1011121314151617
+register write mm2 0x2021222324252627
+register write mm3 0x3031323334353637
+register write mm4 0x4041424344454647
+register write mm5 0x5051525354555657
+register write mm6 0x6061626364656667
+register write mm7 0x7071727374757677
+
+register write xmm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f}"
+register write xmm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}"
+register write xmm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11}"
+register write xmm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12}"
+register write xmm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13}"
+register write xmm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14}"
+register write xmm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15}"
+register write xmm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16}"
+
+process continue
+# CHECK: process continue
+
+# CHECK-DAG: mm0 = 0x0001020304050607
+# CHECK-DAG: mm1 = 0x1011121314151617
+# CHECK-DAG: mm2 = 0x2021222324252627
+# CHECK-DAG: mm3 = 0x3031323334353637
+# CHECK-DAG: mm4 = 0x4041424344454647
+# CHECK-DAG: mm5 = 0x5051525354555657
+# CHECK-DAG: mm6 = 0x6061626364656667
+# CHECK-DAG: mm7 = 0x7071727374757677
+
+# CHECK-DAG: xmm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f }
+# CHECK-DAG: xmm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 }
+# CHECK-DAG: xmm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 }
+# CHECK-DAG: xmm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 }
+# CHECK-DAG: xmm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 }
+# CHECK-DAG: xmm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 }
+# CHECK-DAG: xmm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 }
+# CHECK-DAG: xmm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 }
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-ymm-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-ymm-read.test
new file mode 100644
index 0000000..c59b0b9
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-ymm-read.test
@@ -0,0 +1,27 @@
+# XFAIL: system-windows
+# REQUIRES: native && target-x86 && native-cpu-avx
+# RUN: %clangxx_host %p/Inputs/x86-ymm-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: xmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f}
+# CHECK-DAG: xmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10}
+# CHECK-DAG: xmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11}
+# CHECK-DAG: xmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12}
+# CHECK-DAG: xmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13}
+# CHECK-DAG: xmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14}
+# CHECK-DAG: xmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15}
+# CHECK-DAG: xmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16}
+
+# CHECK-DAG: ymm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}
+# CHECK-DAG: ymm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}
+# CHECK-DAG: ymm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}
+# CHECK-DAG: ymm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}
+# CHECK-DAG: ymm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}
+# CHECK-DAG: ymm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}
+# CHECK-DAG: ymm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}
+# CHECK-DAG: ymm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-ymm-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-ymm-write.test
new file mode 100644
index 0000000..2eafd8f3
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-ymm-write.test
@@ -0,0 +1,28 @@
+# XFAIL: system-windows
+# REQUIRES: native && target-x86 && native-cpu-avx
+# RUN: %clangxx_host %p/Inputs/x86-ymm-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write ymm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f}"
+register write ymm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20}"
+register write ymm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21}"
+register write ymm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22}"
+register write ymm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23}"
+register write ymm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24}"
+register write ymm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25}"
+register write ymm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26}"
+
+process continue
+# CHECK: process continue
+
+# CHECK-DAG: ymm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f }
+# CHECK-DAG: ymm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 }
+# CHECK-DAG: ymm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 }
+# CHECK-DAG: ymm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 }
+# CHECK-DAG: ymm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 }
+# CHECK-DAG: ymm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 }
+# CHECK-DAG: ymm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 }
+# CHECK-DAG: ymm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 }
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-zmm-read.test b/src/llvm-project/lldb/test/Shell/Register/x86-zmm-read.test
new file mode 100644
index 0000000..77ccb38
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-zmm-read.test
@@ -0,0 +1,21 @@
+# XFAIL: system-freebsd
+# XFAIL: system-linux
+# XFAIL: system-netbsd
+# XFAIL: system-windows
+# REQUIRES: native && target-x86 && native-cpu-avx512f
+# RUN: %clangxx_host %p/Inputs/x86-zmm-read.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register read --all
+# CHECK-DAG: zmm0 = {0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f}
+# CHECK-DAG: zmm1 = {0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40}
+# CHECK-DAG: zmm2 = {0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41}
+# CHECK-DAG: zmm3 = {0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42}
+# CHECK-DAG: zmm4 = {0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43}
+# CHECK-DAG: zmm5 = {0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44}
+# CHECK-DAG: zmm6 = {0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45}
+# CHECK-DAG: zmm7 = {0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46}
+
+process continue
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Register/x86-zmm-write.test b/src/llvm-project/lldb/test/Shell/Register/x86-zmm-write.test
new file mode 100644
index 0000000..ebf84af
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Register/x86-zmm-write.test
@@ -0,0 +1,31 @@
+# XFAIL: system-freebsd
+# XFAIL: system-linux
+# XFAIL: system-netbsd
+# XFAIL: system-windows
+# REQUIRES: native && target-x86 && native-cpu-avx512f
+# RUN: %clangxx_host %p/Inputs/x86-zmm-write.cpp -o %t
+# RUN: %lldb -b -s %s %t | FileCheck %s
+process launch
+
+register write zmm0 "{0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f}"
+register write zmm1 "{0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40}"
+register write zmm2 "{0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41}"
+register write zmm3 "{0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42}"
+register write zmm4 "{0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43}"
+register write zmm5 "{0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44}"
+register write zmm6 "{0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45}"
+register write zmm7 "{0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46}"
+
+process continue
+# CHECK: process continue
+
+# CHECK-DAG: zmm0 = { 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f }
+# CHECK-DAG: zmm1 = { 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 }
+# CHECK-DAG: zmm2 = { 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 }
+# CHECK-DAG: zmm3 = { 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 }
+# CHECK-DAG: zmm4 = { 0x04 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 }
+# CHECK-DAG: zmm5 = { 0x05 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 }
+# CHECK-DAG: zmm6 = { 0x06 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 }
+# CHECK-DAG: zmm7 = { 0x07 0x08 0x09 0x0a 0x0b 0x0c 0x0d 0x0e 0x0f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f 0x20 0x21 0x22 0x23 0x24 0x25 0x26 0x27 0x28 0x29 0x2a 0x2b 0x2c 0x2d 0x2e 0x2f 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x39 0x3a 0x3b 0x3c 0x3d 0x3e 0x3f 0x40 0x41 0x42 0x43 0x44 0x45 0x46 }
+
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/Reproducer/Functionalities/Inputs/DataFormatter.in b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/Inputs/DataFormatter.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Functionalities/Inputs/DataFormatter.in
rename to src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/Inputs/DataFormatter.in
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/Inputs/ExpressionEvaluation.in b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/Inputs/ExpressionEvaluation.in
new file mode 100644
index 0000000..8887c20
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/Inputs/ExpressionEvaluation.in
@@ -0,0 +1,10 @@
+breakpoint set -f foo.cpp -l 11
+run
+p foo
+next
+p Foo(2, 3.33);
+p $1
+p foo = Foo(3, 4.44);
+p foo
+cont
+reproducer generate
diff --git a/src/llvm-project/lldb/lit/Reproducer/Functionalities/Inputs/foo.cpp b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/Inputs/foo.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Functionalities/Inputs/foo.cpp
rename to src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/Inputs/foo.cpp
diff --git a/src/llvm-project/lldb/lit/Reproducer/Functionalities/Inputs/stepping.c b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/Inputs/stepping.c
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Functionalities/Inputs/stepping.c
rename to src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/Inputs/stepping.c
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestDataFormatter.test b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestDataFormatter.test
new file mode 100644
index 0000000..7db8bc4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestDataFormatter.test
@@ -0,0 +1,16 @@
+# UNSUPPORTED: system-windows, system-freebsd
+
+# This tests that data formatters continue to work when replaying a reproducer.
+
+# RUN: rm -rf %t.repro
+# RUN: %clangxx_host %S/Inputs/foo.cpp -g -o %t.out
+
+# RUN: %lldb -x -b -s %S/Inputs/DataFormatter.in --capture --capture-path %t.repro %t.out | FileCheck %s
+# RUN: %lldb --replay %t.repro | FileCheck %s
+
+# CHECK: stop reason = breakpoint 1.1
+# CHECK: (Foo) foo = (m_i = 0, m_d = 0)
+# CHECK: stop reason = step over
+# CHECK: (Foo) foo = (m_i = 1, m_d = 2)
+# CHECK: Process {{.*}} resuming
+# CHECK: Process {{.*}} exited with status = 0
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestExpressionEvaluation.test b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestExpressionEvaluation.test
new file mode 100644
index 0000000..e2bcb2d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestExpressionEvaluation.test
@@ -0,0 +1,22 @@
+# UNSUPPORTED: system-windows, system-freebsd
+# XFAIL: system-netbsd
+
+# Flaky
+# UNSUPPORTED: system-linux
+
+# This tests that expression evaluation continues to work when replaying a
+# reproducer.
+
+# RUN: rm -rf %t.repro
+# RUN: %clangxx_host %S/Inputs/foo.cpp -g -o %t.out
+
+# RUN: %lldb -x -b -s %S/Inputs/ExpressionEvaluation.in --capture --capture-path %t.repro %t.out | FileCheck %s
+# RUN: %lldb --replay %t.repro | FileCheck %s
+
+# CHECK: stop reason = breakpoint 1.1
+# CHECK: (Foo) $0 = (m_i = 0, m_d = 0)
+# CHECK: stop reason = step over
+# CHECK: (Foo) $1 = (m_i = 2, m_d = 3)
+# CHECK: (Foo) $1 = (m_i = 2, m_d = 3)
+# CHECK: (Foo) $2 = (m_i = 3, m_d = 4)
+# CHECK: (Foo) $3 = (m_i = 3, m_d = 4)
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestImageList.test b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestImageList.test
new file mode 100644
index 0000000..db31909
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestImageList.test
@@ -0,0 +1,30 @@
+# UNSUPPORTED: system-windows, system-freebsd
+
+# This tests that image list works when replaying. We arbitrarily assume
+# there's at least two entries and compare that they're identical.
+
+# RUN: %clang_host %S/Inputs/stepping.c -g -o %t.out
+
+# RUN: rm -rf %t.txt
+
+# RUN: echo "CAPTURE" >> %t.txt
+# RUN: %lldb -x -b  --capture --capture-path %t.repro \
+# RUN:    -o 'run' \
+# RUN:    -o 'image list' \
+# RUN:    -o 'reproducer generate' \
+# RUN:    %t.out >> %t.txt 2>&1
+
+# RUN: echo "REPLAY" >> %t.txt
+# RUN: %lldb -x -b --replay %t.repro >> %t.txt 2>&1
+
+# RUN: cat %t.txt | FileCheck %s
+
+# CHECK: CAPTURE
+# CHECK: image list
+# CHECK: [  0] [[ZERO:.*]]
+# CHECK: [  1] [[ONE:.*]]
+
+# CHECK: REPLAY
+# CHECK: image list
+# CHECK: [  0] {{.*}}[[ZERO]]
+# CHECK: [  1] {{.*}}[[ONE]]
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestStepping.test b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestStepping.test
new file mode 100644
index 0000000..1dec9a0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Functionalities/TestStepping.test
@@ -0,0 +1,100 @@
+# UNSUPPORTED: system-windows, system-freebsd
+
+# This tests that stepping continues to work when replaying a reproducer.
+
+# RUN: rm -rf %t.repro
+# RUN: %clang_host %S/Inputs/stepping.c -O0 -g -o %t.out
+# RUN: grep -v '#' %s > %t.in
+
+# RUN: %lldb -x -b -s %t.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK
+# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK
+
+# Set breakpoints in a,b and c and verify we stop there when stepping.
+
+breakpoint set -f stepping.c -l 28
+# CHECK: Breakpoint 1: {{.*}} stepping.c:28
+
+breakpoint set -f stepping.c -l 10
+# CHECK: Breakpoint 2: {{.*}} stepping.c:10
+
+breakpoint set -f stepping.c -l 19
+# CHECK: Breakpoint 3: {{.*}} stepping.c:19
+
+breakpoint set -f stepping.c -l 23
+# CHECK: Breakpoint 4: {{.*}} stepping.c:23
+
+run
+# CHECK: Process {{.*}} stopped
+# CHECK: stop reason = breakpoint 1.1
+
+next
+# CHECK: Process {{.*}} stopped
+# CHECK: stop reason = breakpoint 2.1
+
+next
+# CHECK: Process {{.*}} stopped
+# CHECK: stop reason = breakpoint 3.1
+
+next
+# CHECK: Process {{.*}} stopped
+# CHECK: stop reason = breakpoint 4.1
+
+bt
+# CHECK: frame #0: {{.*}}`c
+# CHECK: frame #1: {{.*}}`b
+# CHECK: frame #2: {{.*}}`a
+
+# Continue and stop resulting from the step overs.
+
+cont
+# CHECK: Process {{.*}} resuming
+# CHECK: Process {{.*}} stopped
+# CHECK: stop reason = step over
+cont
+# CHECK: Process {{.*}} resuming
+# CHECK: Process {{.*}} stopped
+# CHECK: stop reason = step over
+cont
+# CHECK: Process {{.*}} resuming
+# CHECK: Process {{.*}} stopped
+# CHECK: stop reason = step over
+
+breakpoint disable 1
+# CHECK: 1 breakpoints disabled.
+
+breakpoint disable 2
+# CHECK: 1 breakpoints disabled.
+
+breakpoint disable 3
+# CHECK: 1 breakpoints disabled.
+
+breakpoint disable 4
+# CHECK: 1 breakpoints disabled.
+
+# Continue to line 48.
+
+next
+# CHECK: stop reason = step over
+next
+# CHECK: stop reason = step over
+
+# Step into c.
+thread step-in
+# CHECK: stop reason = step in
+thread step-in
+# CHECK: stop reason = step in
+thread step-in
+# CHECK: stop reason = step in
+thread step-in
+# CHECK: stop reason = step in
+thread step-in
+# CHECK: stop reason = step in
+
+# Finally continue until the end.
+
+cont
+# CHECK: Process {{.*}} resuming
+# CHECK: Process {{.*}} exited with status = 0
+
+# Generate the reproducer.
+reproducer generate
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/Discard.in b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/Discard.in
new file mode 100644
index 0000000..a2c4e48
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/Discard.in
@@ -0,0 +1,5 @@
+breakpoint set -f simple.c -l 12
+run
+bt
+cont
+reproducer status
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/FileCapture.in b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/FileCapture.in
new file mode 100644
index 0000000..2c69487
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/FileCapture.in
@@ -0,0 +1,4 @@
+run
+reproducer status
+reproducer dump -p files
+reproducer generate
diff --git a/src/llvm-project/lldb/lit/Reproducer/Inputs/GDBRemoteCapture.in b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/GDBRemoteCapture.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Inputs/GDBRemoteCapture.in
rename to src/llvm-project/lldb/test/Shell/Reproducer/Inputs/GDBRemoteCapture.in
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/GDBRemoteCrashCapture.in b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/GDBRemoteCrashCapture.in
new file mode 100644
index 0000000..1a733f4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/GDBRemoteCrashCapture.in
@@ -0,0 +1,6 @@
+breakpoint set -f simple.c -l 12
+run
+bt
+cont
+reproducer status
+reproducer xcrash -s SIGSEGV
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/MultipleTargetsCapture.in b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/MultipleTargetsCapture.in
new file mode 100644
index 0000000..c78d6276
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/MultipleTargetsCapture.in
@@ -0,0 +1,12 @@
+target select 0
+breakpoint set -f simple.c -l 12
+run
+target select 1
+breakpoint set -f simple.c -l 16
+run
+target select 0
+cont
+target select 1
+cont
+reproducer status
+reproducer generate
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/WorkingDir.in b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/WorkingDir.in
new file mode 100644
index 0000000..4803ef3
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/WorkingDir.in
@@ -0,0 +1,4 @@
+run
+reproducer status
+reproducer dump -p cwd
+reproducer generate
diff --git a/src/llvm-project/lldb/lit/Reproducer/Inputs/simple.c b/src/llvm-project/lldb/test/Shell/Reproducer/Inputs/simple.c
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Inputs/simple.c
rename to src/llvm-project/lldb/test/Shell/Reproducer/Inputs/simple.c
diff --git a/src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/Bar.h b/src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/Bar.h
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/Bar.h
rename to src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/Bar.h
diff --git a/src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/Foo.h b/src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/Foo.h
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/Foo.h
rename to src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/Foo.h
diff --git a/src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/ModuleCXX.in b/src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/ModuleCXX.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/ModuleCXX.in
rename to src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/ModuleCXX.in
diff --git a/src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/main.cpp b/src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/main.cpp
rename to src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/main.cpp
diff --git a/src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/module.modulemap b/src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/module.modulemap
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/Modules/Inputs/module.modulemap
rename to src/llvm-project/lldb/test/Shell/Reproducer/Modules/Inputs/module.modulemap
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/Modules/TestModuleCXX.test b/src/llvm-project/lldb/test/Shell/Reproducer/Modules/TestModuleCXX.test
new file mode 100644
index 0000000..67a11d4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/Modules/TestModuleCXX.test
@@ -0,0 +1,37 @@
+# REQUIRES: system-darwin
+
+# Start fresh.
+# RUN: rm -rf %t.repro
+# RUN: rm -rf %t.root
+# RUN: rm -rf %t.clang-cache
+# RUN: rm -rf %t.lldb-cache
+
+# Create a temporary root we can remove later.
+# RUN: mkdir -p %t.root
+# RUN: mkdir -p %t.clang-cache
+# RUN: mkdir -p %t.lldb-cache
+# RUN: cp %S/Inputs/main.cpp %t.root
+# RUN: cp %S/Inputs/Foo.h %t.root
+# RUN: cp %S/Inputs/Bar.h %t.root
+# RUN: cp %S/Inputs/module.modulemap %t.root
+
+# Compile the test case form the temporary root.
+# RUN: %clang_host %t.root/main.cpp -g -fmodules -fcxx-modules -fmodules-cache-path=%t.clang-cache -o %t.root/a.out
+
+# Capture the debug session.
+# RUN: %lldb -x -b -o 'settings set symbols.clang-modules-cache-path %t.lldb-cache' -s %S/Inputs/ModuleCXX.in --capture --capture-path %t.repro %t.root/a.out | FileCheck %s --check-prefix CAPTURE
+# CAPTURE: (success = 0)
+
+# RUN: cat %t.repro/files.yaml | FileCheck %s --check-prefix YAML
+# YAML-DAG: Foo.h
+# YAML-DAG: Bar.h
+# YAML-DAG: module.modulemap
+
+# Remove the temporary root.
+# RUN: rm -rf %t.root
+# RUN: rm -rf %t.clang-cache
+# RUN: rm -rf %t.lldb-cache
+
+# Replay the debug session.
+# RUN: %lldb -x -b -o 'settings set symbols.clang-modules-cache-path %t.lldb-cache' -s %S/Inputs/ModuleCXX.in --replay %t.repro %t.root/a.out | FileCheck %s --check-prefix REPLAY
+# REPLAY: (success = 0)
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestCaptureEnvOverride.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestCaptureEnvOverride.test
new file mode 100644
index 0000000..a8e7bde
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestCaptureEnvOverride.test
@@ -0,0 +1,20 @@
+# UNSUPPORTED: system-windows
+# This tests the LLDB_CAPTURE_REPRODUCER override.
+
+# RUN: %lldb -b -o 'reproducer status' --capture --capture-path %t.repro /bin/ls | FileCheck %s --check-prefix CAPTURE
+# RUN: %lldb -b -o 'reproducer status' --capture | FileCheck %s --check-prefix CAPTURE
+
+# RUN: LLDB_CAPTURE_REPRODUCER=1 %lldb -b -o 'reproducer status' | FileCheck %s --check-prefix CAPTURE
+# RUN: LLDB_CAPTURE_REPRODUCER=ON %lldb -b -o 'reproducer status' | FileCheck %s --check-prefix CAPTURE
+# RUN: LLDB_CAPTURE_REPRODUCER=on %lldb -b -o 'reproducer status' | FileCheck %s --check-prefix CAPTURE
+
+# RUN: LLDB_CAPTURE_REPRODUCER=0 %lldb -b -o 'reproducer status' --capture --capture-path %t.repro | FileCheck %s --check-prefix OFF
+# RUN: LLDB_CAPTURE_REPRODUCER=0 %lldb -b -o 'reproducer status' --capture | FileCheck %s --check-prefix OFF
+# RUN: LLDB_CAPTURE_REPRODUCER=OFF %lldb -b -o 'reproducer status' --capture --capture-path %t.repro | FileCheck %s --check-prefix OFF
+# RUN: LLDB_CAPTURE_REPRODUCER=off %lldb -b -o 'reproducer status' --capture | FileCheck %s --check-prefix OFF
+
+# RUN: LLDB_CAPTURE_REPRODUCER=bogus %lldb -b -o 'reproducer status' --capture | FileCheck %s --check-prefix CAPTURE
+# RUN: LLDB_CAPTURE_REPRODUCER=bogus %lldb -b -o 'reproducer status' | FileCheck %s --check-prefix OFF
+
+# CAPTURE: Reproducer is in capture mode.
+# OFF: Reproducer is off.
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestCrash.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestCrash.test
new file mode 100644
index 0000000..cb0c09a
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestCrash.test
@@ -0,0 +1,13 @@
+# UNSUPPORTED: system-windows
+# This tests that a reproducer is generated when LLDB crashes.
+
+# Start clean.
+# RUN: rm -rf %t.repro
+
+# RUN: %lldb -b --capture --capture-path %t.repro -o 'reproducer xcrash -s SIGSEGV' | FileCheck %s
+# RUN: %lldb -b --capture --capture-path %t.repro -o 'reproducer xcrash -s SIGILL' | FileCheck %s
+
+# CHECK: ********************
+# CHECK: Crash reproducer for
+# CHECK: Reproducer written to
+# CHECK: ********************
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestDiscard.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestDiscard.test
new file mode 100644
index 0000000..db9614a
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestDiscard.test
@@ -0,0 +1,13 @@
+# UNSUPPORTED: system-windows
+# This ensures that the reproducer properly cleans up after itself.
+
+# Build the inferior.
+# RUN: mkdir -p %t
+# RUN: rm -rf %t.repro
+# RUN: %clang_host %S/Inputs/simple.c -g -o %t/reproducer.out
+
+# Capture but don't generate the reproducer.
+# RUN: %lldb -x -b -s %S/Inputs/Discard.in --capture --capture-path %t.repro %t/reproducer.out
+
+# Make sure the directory doesn't exist.
+# RUN: mkdir %t.repro
diff --git a/src/llvm-project/lldb/lit/Reproducer/TestDriverOptions.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestDriverOptions.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Reproducer/TestDriverOptions.test
rename to src/llvm-project/lldb/test/Shell/Reproducer/TestDriverOptions.test
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestDump.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestDump.test
new file mode 100644
index 0000000..3d4d21d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestDump.test
@@ -0,0 +1,26 @@
+# UNSUPPORTED: system-windows
+# This tests the reproducer dump functionality.
+
+# Generate a reproducer.
+# RUN: mkdir -p %t
+# RUN: rm -rf %t.repro
+# RUN: %clang_host %S/Inputs/simple.c -g -o %t/reproducer.out
+# RUN: %lldb -x -b -s %S/Inputs/FileCapture.in -o 'reproducer dump -p files' --capture --capture-path %t.repro %t/reproducer.out
+
+# RUN: %lldb -b -o 'reproducer dump -p files -f %t.repro' | FileCheck %s --check-prefix FILES
+# FILES-DAG: 'reproducer.out'
+# FILES-DAG: 'FileCapture.in'
+
+# RUN: %lldb -b -o 'reproducer dump -p version -f %t.repro' | FileCheck %s --check-prefix VERSION
+# VERSION: lldb version
+
+# RUN: %lldb -b -o 'reproducer dump -p commands -f %t.repro' | FileCheck %s --check-prefix COMMANDS
+# COMMANDS: command source
+# COMMANDS: target create
+# COMMANDS: command source
+
+# RUN: %lldb -b -o 'reproducer dump -p gdb -f %t.repro' | FileCheck %s --check-prefix GDB
+# GDB: send packet: $QStartNoAckMode#b0
+# GDB: read packet: $OK#9a
+
+# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix FILES
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestFileRepro.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestFileRepro.test
new file mode 100644
index 0000000..0fc3d52
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestFileRepro.test
@@ -0,0 +1,24 @@
+# REQUIRES: system-darwin
+
+# This tests the replaying of GDB remote packets.
+#
+# We issue the same commands and ensure the output is identical to the original
+# process. To ensure we're not actually running the original binary we check
+# that the string "testing" is not printed.
+
+# RUN: rm -rf %t.repro
+# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out
+# RUN: %lldb -x -b -s %S/Inputs/FileCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
+# RUN: rm %t.out
+# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
+# RUN: cat %t.repro/version.txt | FileCheck %s --check-prefix VERSION
+
+# CAPTURE: testing
+# REPLAY-NOT: testing
+
+# CHECK: Process {{.*}} exited
+
+# CAPTURE: Reproducer is in capture mode.
+# CAPTURE: Reproducer written
+
+# VERSION: lldb version
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test
new file mode 100644
index 0000000..609c839
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestGDBRemoteRepro.test
@@ -0,0 +1,34 @@
+# UNSUPPORTED: system-windows, system-freebsd
+
+# This tests the replaying of GDB remote packets.
+#
+# We issue the same commands and ensure the output is identical to the original
+# process. To ensure we're not actually running the original binary we check
+# that the string "testing" is not printed.
+
+# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out
+
+# Test reproducer generate command.
+# RUN: rm -rf %t.repro
+# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
+# RUN: env FOO=BAR %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
+
+# Test crash reproducer.
+# RUN: rm -rf %t.repro
+# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCrashCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
+# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
+
+# CHECK: Breakpoint 1
+# CHECK: Process {{.*}} stopped
+# CHECK: Process {{.*}} launched
+# CHECK: thread {{.*}} stop reason = breakpoint
+# CHECK: frame {{.*}} simple.c
+
+# CAPTURE: testing
+# REPLAY-NOT: testing
+
+# CHECK: Process {{.*}} resuming
+# CHECK: Process {{.*}} exited
+
+# CAPTURE: Reproducer is in capture mode.
+# CAPTURE: Reproducer written
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestMultipleTargets.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestMultipleTargets.test
new file mode 100644
index 0000000..f36dbf6
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestMultipleTargets.test
@@ -0,0 +1,23 @@
+# UNSUPPORTED: system-windows, system-freebsd
+
+# This tests the replaying with multiple targets.
+
+# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out
+
+# RUN: rm -rf %t.repro
+# RUN: %lldb -x -b --capture --capture-path %t.repro -o 'target create %t.out' -o 'target create %t.out' -s %S/Inputs/MultipleTargetsCapture.in  | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
+# RUN: env FOO=BAR %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
+
+# CHECK: Process [[TARGET0:[0-9]+]] stopped
+# CHECK: stop reason = breakpoint 1.1
+# CHECK: simple.c:12:5
+# CHECK: Process [[TARGET1:[0-9]+]] stopped
+# CHECK: stop reason = breakpoint 1.1
+# CHECK: simple.c:16:5
+# CHECK: Process [[TARGET0]] resuming
+# CHECK: Process [[TARGET0]] exited
+# CHECK: Process [[TARGET1]] resuming
+# CHECK: Process [[TARGET1]] exited
+
+# CAPTURE: Reproducer is in capture mode.
+# CAPTURE: Reproducer written
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestRelativePath.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestRelativePath.test
new file mode 100644
index 0000000..2ee4bf0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestRelativePath.test
@@ -0,0 +1,9 @@
+# UNSUPPORTED: system-windows
+# This tests relative capture paths.
+
+# RUN: mkdir -p %t
+# RUN: cd %t
+# RUN: rm -rf ./foo
+# RUN: %clang_host %S/Inputs/simple.c -g -o %t/reproducer.out
+# RUN: %lldb -x -b -s %S/Inputs/FileCapture.in -o 'reproducer dump -p files' --capture --capture-path ./foo %t/reproducer.out
+# RUN: %lldb --replay ./foo
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestReuseDirectory.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestReuseDirectory.test
new file mode 100644
index 0000000..31b71a0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestReuseDirectory.test
@@ -0,0 +1,17 @@
+# UNSUPPORTED: system-windows, system-freebsd
+
+# Test that we can capture twice to the same directory without breaking the
+# reproducer functionality.
+
+# RUN: rm -rf %t.repro
+# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out
+# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE
+# RUN: %lldb -x -b -s %S/Inputs/GDBRemoteCapture.in --capture --capture-path %t.repro %t.out | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix CAPTURE
+# RUN: %lldb --replay %t.repro | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix REPLAY
+
+# Test that we can replay from a different location, i.e. that the reproducer
+# is relocatable.
+
+# RUN: rm -rf %t.repro_moved
+# RUN: mv %t.repro %t.repro_moved
+# RUN: %lldb --replay %t.repro_moved | FileCheck %S/TestGDBRemoteRepro.test --check-prefix CHECK --check-prefix REPLAY
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestSynchronous.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestSynchronous.test
new file mode 100644
index 0000000..c62cbe8
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestSynchronous.test
@@ -0,0 +1,15 @@
+# REQUIRES: python
+# UNSUPPORTED: system-windows
+# Ensure that replay happens in synchronous mode.
+
+# RUN: rm -rf %t.repro
+# RUN: %lldb -x -b --capture --capture-path %t.repro -o 'script lldb.debugger.SetAsync(True)' -o 'script lldb.debugger.GetAsync()' -o 'reproducer generate' | FileCheck %s --check-prefix CAPTURE
+# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix REPLAY
+
+# CAPTURE: script lldb.debugger.SetAsync(True)
+# CAPTURE-NEXT: script lldb.debugger.GetAsync()
+# CAPTURE-NEXT: True
+
+# REPLAY: script lldb.debugger.SetAsync(True)
+# REPLAY-NEXT: script lldb.debugger.GetAsync()
+# REPLAY-NEXT: False
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestVersionCheck.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestVersionCheck.test
new file mode 100644
index 0000000..e3fb603
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestVersionCheck.test
@@ -0,0 +1,29 @@
+# REQUIRES: system-darwin
+
+# This tests the reproducer version check.
+
+# RUN: rm -rf %t.repro
+# RUN: %clang_host %S/Inputs/simple.c -g -o %t.out
+# RUN: %lldb -x -b -s %S/Inputs/FileCapture.in --capture --capture-path %t.repro %t.out | FileCheck %s --check-prefix CHECK --check-prefix CAPTURE
+
+# Make sure that replay works.
+# RUN: %lldb --replay %t.repro | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
+
+# Change the reproducer version.
+# RUN: echo "bogus" >> %t.repro/version.txt
+
+# Make sure that replay works.
+# RUN: not %lldb --replay %t.repro 2>&1 | FileCheck %s --check-prefix ERROR
+
+# Make sure that we can circumvent the version check with -reproducer-skip-version-check.
+# RUN: %lldb --replay %t.repro -reproducer-skip-version-check | FileCheck %s --check-prefix CHECK --check-prefix REPLAY
+
+# CAPTURE: testing
+# REPLAY-NOT: testing
+
+# CHECK: Process {{.*}} exited
+
+# CAPTURE: Reproducer is in capture mode.
+# CAPTURE: Reproducer written
+
+# ERROR: error: reproducer replay failed: reproducer capture and replay version don't match
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/TestWorkingDir.test b/src/llvm-project/lldb/test/Shell/Reproducer/TestWorkingDir.test
new file mode 100644
index 0000000..707916b
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/TestWorkingDir.test
@@ -0,0 +1,19 @@
+# XFAIL: system-windows
+
+# This tests that the reproducer can deal with relative files. We create a
+# binary in a subdirectory and pass its relative path to LLDB. The subdirectory
+# is removed before replay so that it only exists in the reproducer's VFS.
+
+# RUN: echo "CHECK: %t" > %t.check
+
+# RUN: rm -rf %t.repro
+# RUN: mkdir -p %t.repro
+# RUN: mkdir -p %t
+# RUN: mkdir -p %t/binary
+# RUN: cd %t
+# RUN: %clang_host %S/Inputs/simple.c -g -o binary/reproducer.out
+# RUN: %lldb -x -b -s %S/Inputs/WorkingDir.in --capture --capture-path %t.repro binary/reproducer.out
+# RUN: rm -rf %t/binary
+
+# RUN: cat %t.repro/cwd.txt | FileCheck %t.check
+# RUN: %lldb --replay %t.repro | FileCheck %t.check
diff --git a/src/llvm-project/lldb/test/Shell/Reproducer/lit.local.cfg b/src/llvm-project/lldb/test/Shell/Reproducer/lit.local.cfg
new file mode 100644
index 0000000..dbb37b1
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Reproducer/lit.local.cfg
@@ -0,0 +1,6 @@
+# Enable crash reports for the reproducer tests.
+if 'LLVM_DISABLE_CRASH_REPORT' in config.environment:
+  del config.environment['LLVM_DISABLE_CRASH_REPORT']
+
+if 'LLDB_CAPTURE_REPRODUCER' in config.environment:
+  del config.environment['LLDB_CAPTURE_REPRODUCER']
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/independent_state.in b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/independent_state.in
new file mode 100644
index 0000000..6e15a8f
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/independent_state.in
@@ -0,0 +1,6 @@
+script foobar = 40 + 7
+script print(foobar)
+script d = lldb.SBDebugger.Create()
+script d:HandleCommand("script foobar = 40 + 2")
+script print(foobar)
+script d:HandleCommand("script print(foobar)")
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/nested_sessions.in b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/nested_sessions.in
new file mode 100644
index 0000000..75c57e3
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/nested_sessions.in
@@ -0,0 +1,6 @@
+script
+print(lldb.target, lldb.debugger:GetSelectedTarget())
+lldb.debugger:SetSelectedTarget(lldb.debugger:GetTargetAtIndex(0))
+print(lldb.target, lldb.debugger:GetSelectedTarget())
+lldb.debugger:HandleCommand("script print(lldb.target, lldb.debugger:GetSelectedTarget())")
+print(lldb.target, lldb.debugger:GetSelectedTarget())
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/nested_sessions_2.in b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/nested_sessions_2.in
new file mode 100644
index 0000000..a8cc2a5
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/nested_sessions_2.in
@@ -0,0 +1,2 @@
+script
+print(lldb.target, lldb.debugger:GetSelectedTarget())
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/testmodule.lua b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/testmodule.lua
new file mode 100644
index 0000000..fcf4eb0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/Inputs/testmodule.lua
@@ -0,0 +1,7 @@
+local mymodule = {}
+
+function mymodule.foo()
+  print("Hello World!")
+end
+
+return mymodule
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/bindings.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/bindings.test
new file mode 100644
index 0000000..aeafbec
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/bindings.test
@@ -0,0 +1,6 @@
+# REQUIRES: lua
+# RUN: cat %s | %lldb --script-language lua 2>&1 | FileCheck %s
+script
+debugger = lldb.SBDebugger.Create()
+print("debugger is valid:", tostring(debugger:IsValid()))
+# CHECK: debugger is valid: true
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/breakpoint_callback.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/breakpoint_callback.test
new file mode 100644
index 0000000..4dbf286
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/breakpoint_callback.test
@@ -0,0 +1,5 @@
+# REQUIRES: lua
+# RUN: %lldb -s %s --script-language lua 2>&1 | FileCheck %s
+b main
+breakpoint command add -s lua
+# CHECK: error: This script interpreter does not support breakpoint callbacks
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/command_script_import.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/command_script_import.test
new file mode 100644
index 0000000..6a0692d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/command_script_import.test
@@ -0,0 +1,13 @@
+# REQUIRES: lua
+# RUN: %lldb --script-language lua -o 'command script import %S/Inputs/testmodule.lua' -o 'script testmodule.foo()' 2>&1 | FileCheck %s
+# CHECK: Hello World!
+
+# RUN: mkdir -p %t
+# RUN: cp %S/Inputs/testmodule.lua %t/testmodule.notlua
+# RUN: %lldb --script-language lua -o 'command script import %t/testmodule.notlua' -o 'script testmodule.foo()' 2>&1 | FileCheck %s --check-prefix EXTENSION
+# EXTENSION: error: module importing failed: lua failed to import '{{.*}}testmodule.notlua': invalid extension
+# EXTENSION-NOT: Hello World!
+
+# RUN: %lldb --script-language lua -o 'command script import %S/Inputs/bogus' -o 'script testmodule.foo()' 2>&1 | FileCheck %s --check-prefix NONEXISTING
+# NONEXISTING: error: module importing failed: lua failed to import '{{.*}}bogus': invalid path
+# NONEXISTING-NOT: Hello World!
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/convenience_variables.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/convenience_variables.test
new file mode 100644
index 0000000..e962fc7
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/convenience_variables.test
@@ -0,0 +1,17 @@
+# REQUIRES: lua
+#
+# This tests that the convenience variables are not nil. Given that there is no
+# target we only expect the debugger to be valid.
+#
+# RUN: cat %s | %lldb --script-language lua 2>&1 | FileCheck %s
+script
+print("lldb.debugger is valid: ", tostring(lldb.debugger:IsValid()))
+print("lldb.target is valid: ", tostring(lldb.target:IsValid()))
+print("lldb.process is valid: ", tostring(lldb.process:IsValid()))
+print("lldb.thread is valid: ", tostring(lldb.thread:IsValid()))
+print("lldb.frame is valid: ", tostring(lldb.frame:IsValid()))
+# CHECK: debugger is valid: true
+# CHECK: target is valid: false
+# CHECK: process is valid: false
+# CHECK: thread is valid: false
+# CHECK: frame is valid: false
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/independent_state.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/independent_state.test
new file mode 100644
index 0000000..2ade1b9
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/independent_state.test
@@ -0,0 +1,6 @@
+# REQUIRES: lua
+#
+# RUN:  %lldb --script-language lua -s %S/Inputs/independent_state.in 2>&1 | FileCheck %s
+# CHECK: 47
+# CHECK: 47
+# CHECK: 42
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/lua.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/lua.test
new file mode 100644
index 0000000..70184ed
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/lua.test
@@ -0,0 +1,3 @@
+# REQUIRES: lua
+# RUN: %lldb --script-language lua -o 'script print(1000+100+10+1)' 2>&1 | FileCheck %s
+# CHECK: 1111
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/nested_sessions.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/nested_sessions.test
new file mode 100644
index 0000000..a81418b
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/nested_sessions.test
@@ -0,0 +1,12 @@
+# REQUIRES: lua
+# RUN: mkdir -p %t
+# RUN: echo "int main() { return 0; }" | %clang_host -x c - -o %t/foo
+# RUN: echo "int main() { return 0; }" | %clang_host -x c - -o %t/bar
+# RUN:  %lldb --script-language lua -o "file %t/bar" -o "file %t/foo" -s %S/Inputs/nested_sessions.in  -s %S/Inputs/nested_sessions_2.in 2>&1 | FileCheck %s
+# CHECK: script
+# CHECK-NEXT: foo foo
+# CHECK-NEXT: foo bar
+# CHECK-NEXT: foo bar
+# CHECK-NEXT: foo bar
+# CHECK: script
+# CHECK-NEXT: bar bar
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/persistent_state.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/persistent_state.test
new file mode 100644
index 0000000..4cdea15
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/persistent_state.test
@@ -0,0 +1,3 @@
+# REQUIRES: lua
+# RUN: %lldb --script-language lua -o 'script foo = 1010' -o 'script bar = 101' -o 'script print(foo+bar)' 2>&1 | FileCheck %s
+# CHECK: 1111
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/watchpoint_callback.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/watchpoint_callback.test
new file mode 100644
index 0000000..c0bddbc
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Lua/watchpoint_callback.test
@@ -0,0 +1,8 @@
+# REQUIRES: lua
+# RUN: echo "int main() { return 0; }" | %clang_host -x c - -o %t
+# RUN: %lldb -s %s --script-language lua %t 2>&1 | FileCheck %s
+b main
+r
+watchpoint set expr 0x0
+watchpoint command add -s lua
+# CHECK: error: This script interpreter does not support watchpoint callbacks
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/None/import_module.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/None/import_module.test
new file mode 100644
index 0000000..0af7bfa
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/None/import_module.test
@@ -0,0 +1,2 @@
+# RUN: %lldb --script-language none -o 'command script import %t' 2>&1 | FileCheck %s
+# CHECK: error: module importing failed: This script interpreter does not support importing modules.
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/None/none.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/None/none.test
new file mode 100644
index 0000000..d6ef8d4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/None/none.test
@@ -0,0 +1,2 @@
+# RUN: %lldb --script-language none -o 'script' 2>&1 | FileCheck %s
+# CHECK: error: the script-lang setting is set to none - scripting not available
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Python/crashlog.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Python/crashlog.test
new file mode 100644
index 0000000..047cb80
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Python/crashlog.test
@@ -0,0 +1,135 @@
+#                                                                 -*- python -*-
+# REQUIRES: system-darwin
+# DEBUG: cd %S/../../../../examples/python && cat %s | %lldb && false
+# RUN: cd %S/../../../../examples/python && cat %s | %lldb | FileCheck %s
+# CHECK-LABEL: {{S}}KIP BEYOND CHECKS
+script
+import crashlog
+cl = crashlog.CrashLog
+images = [
+"0x10b60b000 - 0x10f707fff com.apple.LLDB.framework (1.1000.11.38.2 - 1000.11.38.2) <96E36F5C-1A83-39A1-8713-5FDD9701C3F1> /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/LLDB",
+# CHECK: 0x10b60b000
+# CHECK: 0x10f707fff
+# CHECK: com.apple.LLDB.framework
+# CHECK: 96E36F5C-1A83-39A1-8713-5FDD9701C3F1
+# CHECK: /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/LLDB
+
+"0x104591000 - 0x1055cfff7 +llvm-dwarfdump (0) <B104CFA1-046A-36A6-8EB4-07DDD7CC2DF3> /Users/USER 1/Documents/*/llvm-dwarfdump",
+# CHECK: 0x104591000
+# CHECK: 0x1055cfff7
+# CHECK: llvm-dwarfdump
+# CHECK: (0)
+# CHECK: B104CFA1-046A-36A6-8EB4-07DDD7CC2DF3
+# CHECK: /Users/USER 1/Documents/*/llvm-dwarfdump
+
+"0x7fff63f20000 - 0x7fff63f77ff7  libc++.1.dylib (400.9.4) <D4AB366F-48A9-3C7D-91BD-41198F69DD57> /usr/lib/libc++.1.dylib",
+# CHECK: 0x7fff63f20000
+# CHECK: 0x7fff63f77ff7
+# CHECK: libc++.1.dylib
+# CHECK: (400.9.4)
+# CHECK: D4AB366F-48A9-3C7D-91BD-41198F69DD57
+# CHECK: /usr/lib/libc++.1.dylib
+
+"0x1111111 - 0x22222 +MyApp Pro arm64  <01234> /tmp/MyApp Pro.app/MyApp Pro",
+# CHECK: 0x1111111
+# CHECK: 0x22222
+# CHECK: MyApp Pro
+# CHECK: arm64
+# CHECK: 01234
+# CHECK: /tmp/MyApp Pro.app/MyApp Pro
+
+"0x1111111 - 0x22222 +MyApp Pro (0) <01234> /tmp/MyApp Pro.app/MyApp Pro",
+# CHECK: 0x1111111
+# CHECK: 0x22222
+# CHECK: MyApp Pro
+# CHECK: (0)
+# CHECK: 01234
+# CHECK: /tmp/MyApp Pro.app/MyApp Pro
+
+"0x1111111 - 0x2222222 MyFramework Plus.dylib (1.11 - MyFramework 1.11) <01234> /tmp/MyFramework Plus.dylib",
+# CHECK: 0x1111111
+# CHECK: 0x2222222
+# CHECK: MyFramework Plus.dylib
+# CHECK: ({{.*}}
+# CHECK: 1.11 - MyFramework 1.11
+# CHECK: <{{.*}}
+# CHECK: 01234
+# CHECK: /tmp/MyFramework Plus.dylib
+
+"0x1111111 - 0x2222222 MyFramework-dev.dylib (1.0.0svn - 1.0.0svn) <01234> /MyFramework-dev.dylib",
+# CHECK: 0x1111111
+# CHECK: 0x2222222
+# CHECK: MyFramework-dev.dylib
+# CHECK: ({{.*}}
+# CHECK: 1.0.0svn - 1.0.0svn
+# CHECK: <{{.*}}
+# CHECK: 01234
+# CHECK: /MyFramework-dev.dylib
+
+"0x7fff63f20000 - 0x7fff63f77ff7  libc++.1.dylib (400.9.4) /usr/lib/libc++.1.dylib",
+# CHECK: 0x7fff63f20000
+# CHECK: 0x7fff63f77ff7
+# CHECK: libc++.1.dylib
+# CHECK: ({{.*}}
+# CHECK: 400.9.4
+# CHECK: None
+# CHECK: None
+# CHECK: /usr/lib/libc++.1.dylib
+
+"0x1047b8000 - 0x10481ffff dyld arm64e  <cfa789d10da63f9a8996daf84ed9d04f> /usr/lib/dyld"
+# CHECK: 0x1047b8000
+# CHECK: 0x10481ffff
+# CHECK: dyld
+# CHECK: {{.*}}
+# CHECK: arm64e
+# CHECK: <{{.*}}
+# CHECK: cfa789d10da63f9a8996daf84ed9d04f
+# CHECK: /usr/lib/dyld
+]
+# CHECK-LABEL: FRAMES
+frames = [
+"0 libsystem_kernel.dylib        	0x00007fff684b78a6 read + 10",
+# CHECK: 0
+# CHECK: libsystem_kernel.dylib
+# CHECK: 0x00007fff684b78a6
+# CHECK: read + 10
+"1   com.apple.LLDB.framework      	0x000000010f7954af lldb_private::HostNativeThreadBase::ThreadCreateTrampoline(void*) + 105",
+# CHECK: 1
+# CHECK: com.apple.LLDB.framework
+# CHECK: 0x000000010f7954af
+# CHECK: lldb_private{{.*}} + 105
+"2   MyApp Pro arm64    	0x000000019b0db3a8 foo + 72",
+# CHECK: 2
+# CHECK: MyApp Pro
+# CHECK: a
+# CHECK: arm64
+# CHECK: a
+# CHECK: 0x000000019b0db3a8
+# CHECK: foo + 72
+"3   He 0x1    	0x000000019b0db3a8 foo + 72"
+# CHECK: 3
+# CHECK: He 0x1
+# CHECK: 0x000000019b0db3a8
+# CHECK: foo + 72
+]
+
+
+# Avoid matching the text inside the input.
+print("SKIP BEYOND CHECKS")
+for image in images:
+    print('"%s"'%image)
+    print("--------------")
+    match = cl.image_regex_uuid.search(image)
+    for group in match.groups():
+        print(group)
+
+print("FRAMES")
+for frame in frames:
+    print('"%s"'%frame)
+    print("--------------")
+    match = cl.frame_regex.search(frame)
+    for group in match.groups():
+        print(group)
+
+exit()
+quit
diff --git a/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint.test b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint.test
new file mode 100644
index 0000000..c49124a
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/ScriptInterpreter/Python/scripted_breakpoint.test
@@ -0,0 +1,11 @@
+# REQUIRES: python
+#
+# Test that the scripting language argument to "breakpoint command" is honored
+# even if the global scripting language is different.
+#
+# RUN: cat %s | %lldb --script-language none 2>&1 | FileCheck %s
+b main
+breakpoint command add -s python
+print("foo")
+DONE
+# CHECK: Enter your Python command(s). Type 'DONE' to end.
diff --git a/src/llvm-project/lldb/test/Shell/Settings/Inputs/DontStopCommandSource.in b/src/llvm-project/lldb/test/Shell/Settings/Inputs/DontStopCommandSource.in
new file mode 100644
index 0000000..e33a1e3
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Settings/Inputs/DontStopCommandSource.in
@@ -0,0 +1,3 @@
+settings set interpreter.stop-command-source-on-error false
+bogus
+print 123400000 + 56789
diff --git a/src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsAll.out b/src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsAll.out
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsAll.out
rename to src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsAll.out
diff --git a/src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsNoComments.out b/src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsNoComments.out
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsNoComments.out
rename to src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsNoComments.out
diff --git a/src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsNone.out b/src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsNone.out
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsNone.out
rename to src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsNone.out
diff --git a/src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsQuiet.out b/src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsQuiet.out
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsQuiet.out
rename to src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsQuiet.out
diff --git a/src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsTest.in b/src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsTest.in
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/Inputs/EchoCommandsTest.in
rename to src/llvm-project/lldb/test/Shell/Settings/Inputs/EchoCommandsTest.in
diff --git a/src/llvm-project/lldb/test/Shell/Settings/Inputs/StopCommandSource.in b/src/llvm-project/lldb/test/Shell/Settings/Inputs/StopCommandSource.in
new file mode 100644
index 0000000..19974c0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Settings/Inputs/StopCommandSource.in
@@ -0,0 +1,3 @@
+settings set interpreter.stop-command-source-on-error true
+bogus
+print 123400000 + 56789
diff --git a/src/llvm-project/lldb/lit/Settings/Inputs/main.c b/src/llvm-project/lldb/test/Shell/Settings/Inputs/main.c
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/Inputs/main.c
rename to src/llvm-project/lldb/test/Shell/Settings/Inputs/main.c
diff --git a/src/llvm-project/lldb/test/Shell/Settings/Inputs/main.cpp b/src/llvm-project/lldb/test/Shell/Settings/Inputs/main.cpp
new file mode 100644
index 0000000..98bbcd3
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Settings/Inputs/main.cpp
@@ -0,0 +1,15 @@
+class MyClass {
+public:
+  MyClass() {}
+  void foo();
+};
+
+void MyClass::foo() {
+  return; // Set break point at this line.
+}
+
+int main() {
+  MyClass mc;
+  mc.foo();
+  return 0;
+}
diff --git a/src/llvm-project/lldb/lit/Settings/TestDisableColor.test b/src/llvm-project/lldb/test/Shell/Settings/TestDisableColor.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/TestDisableColor.test
rename to src/llvm-project/lldb/test/Shell/Settings/TestDisableColor.test
diff --git a/src/llvm-project/lldb/lit/Settings/TestDisassemblyFormat.test b/src/llvm-project/lldb/test/Shell/Settings/TestDisassemblyFormat.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/TestDisassemblyFormat.test
rename to src/llvm-project/lldb/test/Shell/Settings/TestDisassemblyFormat.test
diff --git a/src/llvm-project/lldb/lit/Settings/TestEchoCommands.test b/src/llvm-project/lldb/test/Shell/Settings/TestEchoCommands.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/TestEchoCommands.test
rename to src/llvm-project/lldb/test/Shell/Settings/TestEchoCommands.test
diff --git a/src/llvm-project/lldb/test/Shell/Settings/TestFrameFormatColor.test b/src/llvm-project/lldb/test/Shell/Settings/TestFrameFormatColor.test
new file mode 100644
index 0000000..970d723
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Settings/TestFrameFormatColor.test
@@ -0,0 +1,12 @@
+# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out
+# RUN: %lldb -x -b -s %s %t.out | FileCheck %s
+settings set use-color true
+settings set -f frame-format "frame #${frame.index}: \`${ansi.fg.green}{${function.name-with-args}${ansi.normal}\n"
+b foo
+run
+bt
+c
+q
+
+# Check the ASCII escape code
+# CHECK: 
diff --git a/src/llvm-project/lldb/test/Shell/Settings/TestFrameFormatMangling.test b/src/llvm-project/lldb/test/Shell/Settings/TestFrameFormatMangling.test
new file mode 100644
index 0000000..cc19ce4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Settings/TestFrameFormatMangling.test
@@ -0,0 +1,12 @@
+# UNSUPPORTED: system-windows
+# RUN: %clangxx_host -g -O0 %S/Inputs/main.cpp -o %t.out
+# RUN: %lldb -b -s %s %t.out | FileCheck %s
+br set -p "Set break"
+run
+frame info
+# CHECK: frame #0: {{.*}}MyClass::foo(
+set set frame-format "frame #${frame.index}: {${function.mangled-name}}\n"
+frame info
+# CHECK: frame #0: _ZN7MyClass3fooEv
+c
+q
diff --git a/src/llvm-project/lldb/test/Shell/Settings/TestFrameFormatNoColor.test b/src/llvm-project/lldb/test/Shell/Settings/TestFrameFormatNoColor.test
new file mode 100644
index 0000000..2bcdb8e
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Settings/TestFrameFormatNoColor.test
@@ -0,0 +1,12 @@
+# RUN: %clang_host -g -O0 %S/Inputs/main.c -o %t.out
+# RUN: %lldb -x -b -s %s %t.out | FileCheck %s
+settings set use-color false
+settings set -f frame-format "frame #${frame.index}: \`${ansi.fg.green}{${function.name-with-args}${ansi.normal}\n"
+b foo
+run
+bt
+c
+q
+
+# Check the ASCII escape code
+# CHECK-NOT: 
diff --git a/src/llvm-project/lldb/test/Shell/Settings/TestModuleCacheSanity.test b/src/llvm-project/lldb/test/Shell/Settings/TestModuleCacheSanity.test
new file mode 100644
index 0000000..f16f40d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Settings/TestModuleCacheSanity.test
@@ -0,0 +1,4 @@
+# This is a sanity check that verifies that the module cache path is set
+# correctly and points inside the default test build directory.
+RUN: %lldb -o 'settings show symbols.clang-modules-cache-path' | FileCheck  %s
+CHECK: lldb-test-build.noindex{{.*}}module-cache-lldb
diff --git a/src/llvm-project/lldb/lit/Settings/TestSettingsSet.test b/src/llvm-project/lldb/test/Shell/Settings/TestSettingsSet.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/TestSettingsSet.test
rename to src/llvm-project/lldb/test/Shell/Settings/TestSettingsSet.test
diff --git a/src/llvm-project/lldb/lit/Settings/TestSettingsWrite.test b/src/llvm-project/lldb/test/Shell/Settings/TestSettingsWrite.test
similarity index 100%
rename from src/llvm-project/lldb/lit/Settings/TestSettingsWrite.test
rename to src/llvm-project/lldb/test/Shell/Settings/TestSettingsWrite.test
diff --git a/src/llvm-project/lldb/test/Shell/Settings/TestStopCommandSourceOnError.test b/src/llvm-project/lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
new file mode 100644
index 0000000..a53dc2c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Settings/TestStopCommandSourceOnError.test
@@ -0,0 +1,24 @@
+# Modifying the interpreter settings is tricky because they don't take effect
+# until we create a new command interpreter, which should be merely an
+# implementation detail. This leads to confusing and unexpected scenarios.
+#
+# Below are a few scenarios that we should fix.
+
+# CONTINUE: 123456789
+# STOP-NOT: 111111111
+# STOP-NOT: 123456789
+
+# FIXME: Should stop
+# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %S/Inputs/StopCommandSource.in | FileCheck %s --check-prefix CONTINUE
+
+# FIXME: Should continue
+# RUN: %lldb -b -s %S/Inputs/DontStopCommandSource.in -o 'bogus' -o 'print 111100000 + 11111' | FileCheck %s --check-prefix STOP
+
+# FIXME: Should continue
+# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -o 'bogus' -o 'print 123400000 + 56789'  | FileCheck %s --check-prefix STOP
+
+# FIXME: Should continue
+# RUN: %lldb -b -s %S/Inputs/DontStopCommandSource.in | FileCheck %s --check-prefix STOP
+
+# FIXME: Should continue
+# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error true' -s %S/Inputs/DontStopCommandSource.in | FileCheck %s --check-prefix STOP
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-elf.yaml b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-elf.yaml
new file mode 100644
index 0000000..905dc25
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-elf.yaml
@@ -0,0 +1,33 @@
+# A very basic ELF file to serve as a recipient of breakpad info
+
+--- !ELF
+FileHeader:      
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+  Entry:           0x0000000000400000
+Sections:        
+  - Name:            .text1
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x0000000000400000
+    AddressAlign:    0x0000000000001000
+    Size:            0xb0
+  - Name:            .text2
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x00000000004000B0
+    AddressAlign:    0x0000000000000010
+    Size:            0x42
+Symbols:         
+DynamicSymbols:  
+ProgramHeaders:
+  - Type: PT_LOAD
+    Flags: [ PF_X, PF_R ]
+    VAddr: 0x400000
+    Align: 0x1000
+    Sections:
+      - Section: .text1
+      - Section: .text2
+...
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/basic-macho.yaml b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-macho.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/basic-macho.yaml
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/basic-macho.yaml
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table-discontinuous-file-ids.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-discontinuous-file-ids.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table-discontinuous-file-ids.syms
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-discontinuous-file-ids.syms
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-edgecases.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-edgecases.syms
new file mode 100644
index 0000000..558a69c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-edgecases.syms
@@ -0,0 +1,7 @@
+MODULE Linux x86_64h 761550E08086333960A9074A9CE2895C0 a.out
+INFO CODE_ID E05015768680393360A9074A9CE2895C
+FILE 0 /tmp/a.c
+a0 1 1 0
+FUNC b0 10 0 func
+FUNC c0 10 0 func2
+c0 2 2 0
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table-missing-file.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-missing-file.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table-missing-file.syms
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-missing-file.syms
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table-mixed-path-styles.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-mixed-path-styles.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table-mixed-path-styles.syms
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table-mixed-path-styles.syms
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/line-table.syms
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/line-table.syms
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.syms
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.syms
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.yaml b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.yaml
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/stack-cfi-parsing.yaml
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/symtab-macho.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab-macho.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/symtab-macho.syms
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab-macho.syms
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/symtab.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/symtab.syms
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/symtab.syms
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-raSearch.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-raSearch.syms
new file mode 100644
index 0000000..329a280
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-raSearch.syms
@@ -0,0 +1,15 @@
+MODULE windows x86 897DD83EA8C8411897F3A925EE4BF7411 unwind-via-stack-win.pdb
+INFO CODE_ID 5D499B5C5000 unwind-via-stack-win.exe
+PUBLIC  0 0 dummy
+PUBLIC 10 0 call_many
+PUBLIC 80 0 main
+PUBLIC 90 0 many_pointer_args
+PUBLIC 100 0 complex_rasearch
+PUBLIC 110 0 esp_rasearch
+PUBLIC 120 0 nonzero_frame_size
+STACK WIN 4 10 6d 0 0 0 0 0 0 1 $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
+STACK WIN 4 80 8 0 0 0 0 0 0 1 $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
+STACK WIN 4 90 5 0 0 50 0 0 0 1 $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
+STACK WIN 4 100 4 0 0 0 0 0 0 1 $T0 .raSearch 80 + = $eip $T0 ^ = $esp $T0 4 + =
+STACK WIN 4 110 4 0 0 0 0 0 0 1 $T0 .raSearch = $eip $T0 ^ = $esp .raSearch 4 + =
+STACK WIN 4 120 4 0 0 0 4 8 0 1 $T0 .raSearch = $eip $T0 ^ = $esp $T0 4 + =
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.syms
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.syms
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.syms
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.yaml b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.yaml
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.yaml
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-cfi.yaml
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.syms b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.syms
new file mode 100644
index 0000000..b9b8a67
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.syms
@@ -0,0 +1,17 @@
+MODULE windows x86 897DD83EA8C8411897F3A925EE4BF7411 unwind-via-stack-win.pdb
+INFO CODE_ID 5D499B5C5000 unwind-via-stack-win.exe
+PUBLIC  0 0 dummy
+PUBLIC 10 0 call_many
+PUBLIC 80 0 main
+PUBLIC 90 0 many_pointer_args
+PUBLIC 100 0 bogus_rule
+PUBLIC 110 0 bogus_cfa_rhs
+PUBLIC 120 0 bogus_esp_rhs
+PUBLIC 130 0 temporary_var
+STACK WIN 4 10 6d 0 0 0 0 0 0 1 $T0 $esp 80 + = $eip $T0 ^ = $esp $T0 4 + =
+STACK WIN 4 80 8 0 0 0 0 0 0 1 $T0 $esp = $eip $T0 ^ = $esp $T0 4 + =
+STACK WIN 4 90 5 0 0 50 0 0 0 1 $T0 $esp = $eip $T0 ^ = $esp $T0 4 + =
+STACK WIN 4 100 4 0 0 0 0 0 0 1 bogus
+STACK WIN 4 110 4 0 0 0 0 0 0 1 $T0 $bogus = $eip $T0 ^ = $esp $T0 4 + =
+STACK WIN 4 120 4 0 0 0 0 0 0 1 $T0 $esp = $eip $T0 ^ = $esp $bogus 4 + =
+STACK WIN 4 130 4 0 0 0 0 0 0 1 $T0 $esp = $bogus $T0 = $eip $bogus ^ = $esp $T0 4 + =
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.yaml b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.yaml
new file mode 100644
index 0000000..e014006
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/Inputs/unwind-via-stack-win.yaml
@@ -0,0 +1,51 @@
+--- !minidump
+Streams:
+  - Type:            ThreadList
+    Threads:
+      - Thread Id:       0x0000290C
+        Priority Class:  0x00000020
+        Environment Block: 0x0000000000A98000
+        Context:         3F0001000000000000000000000000000000000000000000000000007F02000000000000FFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002B000000530000002B0000002B00000080100B0080100B000050A90080100B0080100B0000000000E4FECF0092100B0023000000440301007CFECF002B0000007F0200000000000000000000000000000000000000000000801F0000FFFF020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144E3D6C2000000001000000EA1E00F4C000E50700000000FC0100002CE3C014D8E202010000E507880F401D839DC60100000000400000007F00000000000000880F401D0A000000900F401D0000000000000100EA1E00009808E5077F00000000000000000000009008E507990100006002E5072CABC87708346474B42300000100000044E3C014200000000000000020532777A80F401D4F346474D00F401D6F378CCC5C4CD5010000000000000000000000000000000000000000000000003AFCD72F90E3C01418CE3470B4230000B80F401DC00F401DC80F401DD00F401D
+        Stack:
+          Start of Memory Range: 0x0000000000CFFE78
+          Content:         0000000079100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0085100B0094842777
+  - Type:            ModuleList
+    Modules:
+      - Base of Image:   0x00000000000B1000
+        Size of Image:   0x00004000
+        Module Name:     'unwind-via-stack-win.exe'
+        CodeView Record: 525344533ED87D89C8A8184197F3A925EE4BF74101000000433A5C70726F6A656374735C746573745F6170705C436F6E736F6C654170706C69636174696F6E315C44656275675C436F6E736F6C654170706C69636174696F6E312E70646200
+      - Base of Image:   0x0000000077260000
+        Size of Image:   0x000E0000
+        Module Name:     'C:\Windows\System32\kernel32.dll'
+        CodeView Record: 5253445300F90A57CF8DED8A463A90390318CD4401000000776B65726E656C33322EFFFFFFFF
+  - Type:            MemoryList
+    Memory Ranges:
+      - Start of Memory Range: 0x0000000000CFFE78
+        Content:         0000000079100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0085100B0094842777
+  - Type:            MemoryInfoList
+    Memory Ranges:
+      - Base Address:    0x00000000000B1000
+        Allocation Base: 0x0000000000000000
+        Allocation Protect: [  ]
+        Region Size:     0x0000000000004000
+        State:           [ MEM_COMMIT ]
+        Protect:         [ PAGE_EXECUTE ]
+        Type:            [ MEM_IMAGE ]
+      - Base Address:    0x0000000077260000
+        Allocation Base: 0x0000000000000000
+        Allocation Protect: [  ]
+        Region Size:     0x00000000000E0000
+        State:           [ MEM_COMMIT ]
+        Protect:         [ PAGE_EXECUTE ]
+        Type:            [ MEM_IMAGE ]
+  - Type:            SystemInfo
+    Processor Arch:  X86
+    Platform ID:     Win32NT
+    CPU:
+      Vendor ID:       AuthenticAMD
+      Version Info:    0x00800F82
+      Feature Info:    0x178BFBFF
+  - Type:            MiscInfo
+    Content:         54050000F703000008290000C883495D0000000000000000AC0D000098080000AC0D00000200000002000000002000000D0000000000000002000000C4FFFFFF430065006E007400720061006C0020004500750072006F007000650020005300740061006E0064006100720064002000540069006D006500000000000000000000000A0000000500030000000000000000000000430065006E007400720061006C0020004500750072006F00700065002000530075006D006D00650072002000540069006D00650000000000000000000000000000000300000005000200000000000000C4FFFFFF310037003100330034002E0031002E007800380036006600720065002E007200730034005F00720065006C0065006100730065002E003100380030003400310030002D00310038003000340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064006200670063006F00720065002E0069003300380036002C00310030002E0030002E00310037003100330034002E0031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006C816B92
+...
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table-discontinuous-file-ids.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table-edgecases.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table-edgecases.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table-edgecases.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table-missing-file.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table-missing-file.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table-missing-file.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table-mixed-path-styles.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table-mixed-path-styles.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table-mixed-path-styles.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/line-table.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/line-table.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/stack-cfi-parsing.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/stack-cfi-parsing.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/stack-cfi-parsing.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Breakpad/symtab-macho.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Breakpad/symtab-macho.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/symtab-macho.test
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/symtab.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/symtab.test
new file mode 100644
index 0000000..65bf951
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/symtab.test
@@ -0,0 +1,25 @@
+# RUN: yaml2obj %S/Inputs/basic-elf.yaml > %T/symtab.out
+# RUN: %lldb %T/symtab.out -o "target symbols add -s symtab.out %S/Inputs/symtab.syms" \
+# RUN:   -s %s | FileCheck %s
+
+# CHECK-LABEL: (lldb) image dump symtab symtab.out
+# CHECK: Symtab, file = {{.*}}symtab.out, num_symbols = 5:
+# CHECK: Index   UserID DSX Type            File Address/Value Load Address       Size               Flags      Name
+# CHECK: [    0]      0  SX Code            0x0000000000400000                    0x00000000000000b0 0x00000000 ___lldb_unnamed_symbol{{[0-9]*}}$$symtab.out
+# CHECK: [    1]      0   X Code            0x00000000004000c0                    0x0000000000000010 0x00000000 f2
+# CHECK: [    2]      0   X Code            0x00000000004000d0                    0x0000000000000022 0x00000000 _start
+# CHECK: [    3]      0   X Code            0x00000000004000a0                    0x000000000000000d 0x00000000 func_only
+# CHECK: [    4]      0   X Code            0x00000000004000b0                    0x000000000000000c 0x00000000 f1_func
+
+# CHECK-LABEL: (lldb) image lookup -a 0x4000b0 -v
+# CHECK: Address: symtab.out[0x00000000004000b0] (symtab.out.PT_LOAD[0]..text2 + 0)
+# CHECK: Symbol: id = {0x00000000}, range = [0x00000000004000b0-0x00000000004000bc), name="f1_func"
+
+# CHECK-LABEL: (lldb) image lookup -n f2 -v
+# CHECK: Address: symtab.out[0x00000000004000c0] (symtab.out.PT_LOAD[0]..text2 + 16)
+# CHECK: Symbol: id = {0x00000000}, range = [0x00000000004000c0-0x00000000004000d0), name="f2"
+
+image dump symtab symtab.out
+image lookup -a 0x4000b0 -v
+image lookup -n f2 -v
+exit
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test
new file mode 100644
index 0000000..ea259a9
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-raSearch.test
@@ -0,0 +1,43 @@
+# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml > %t
+# RUN: %lldb -c %t \
+# RUN:   -o "target symbols add %S/Inputs/unwind-via-raSearch.syms" \
+# RUN:   -s %s -b | FileCheck %s
+
+# First check that unwind plan generation works correctly.
+# This function has a "typical" unwind rule.
+image show-unwind -n call_many
+# CHECK-LABEL: image show-unwind -n call_many
+# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`call_many
+# CHECK: Symbol file UnwindPlan:
+# CHECK: This UnwindPlan originally sourced from breakpad STACK WIN
+# CHECK: This UnwindPlan is sourced from the compiler: yes.
+# CHECK: This UnwindPlan is valid at all instruction locations: no.
+# CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 16-0x0000007d)
+# CHECK: row[0]:    0: CFA=RaSearch@SP+0 => esp=DW_OP_pick 0x00, DW_OP_consts +4, DW_OP_plus  eip=DW_OP_pick 0x00, DW_OP_deref
+
+image show-unwind -n nonzero_frame_size
+# CHECK-LABEL: image show-unwind -n nonzero_frame_size
+# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`nonzero_frame_size
+# CHECK: Symbol file UnwindPlan:
+# CHECK: row[0]:    0: CFA=RaSearch@SP+12 => esp=DW_OP_pick 0x00, DW_OP_consts +4, DW_OP_plus  eip=DW_OP_pick 0x00, DW_OP_deref
+
+# Then, some invalid rules.
+image show-unwind -n complex_rasearch
+# CHECK-LABEL: image show-unwind -n complex_rasearch
+# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`complex_rasearch
+# CHECK-NOT: Symbol file
+
+image show-unwind -n esp_rasearch
+# CHECK-LABEL: image show-unwind -n esp_rasearch
+# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`esp_rasearch
+# CHECK-NOT: Symbol file
+
+# And finally, check that backtracing works as a whole by unwinding a simple
+# stack.
+thread backtrace
+# CHECK-LABEL: thread backtrace
+# CHECK: frame #0: 0x000b1092 unwind-via-stack-win.exe`many_pointer_args
+# CHECK: frame #1: 0x000b1079 unwind-via-stack-win.exe`call_many + 105
+# CHECK: frame #2: 0x000b1085 unwind-via-stack-win.exe`main + 5
+# CHECK: frame #3: 0x77278494 kernel32.dll
+# CHECK-NOT: frame
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test
new file mode 100644
index 0000000..0a67cb3
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-cfi.test
@@ -0,0 +1,22 @@
+# REQUIRES: x86
+
+# RUN: yaml2obj %S/Inputs/unwind-via-stack-cfi.yaml > %t
+# RUN: %lldb -c %t -o "target symbols add %S/Inputs/unwind-via-stack-cfi.syms" \
+# RUN:   -s %s -b | FileCheck %s
+
+image show-unwind -n bar
+# CHECK-LABEL: image show-unwind -n bar
+# CHECK: Asynchronous (not restricted to call-sites) UnwindPlan is 'breakpad STACK CFI'
+# CHECK: Synchronous (restricted to call-sites) UnwindPlan is 'breakpad STACK CFI'
+# CHECK:      Symbol file UnwindPlan:
+# CHECK-NEXT: This UnwindPlan originally sourced from breakpad STACK CFI
+# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes.
+# CHECK-NEXT: This UnwindPlan is valid at all instruction locations: no.
+# CHECK-NEXT: Address range of this UnwindPlan: [unwind-via-stack-cfi..module_image + 1056-0x0000000000000449)
+# CHECK-NEXT: row[0]: 0: CFA=DW_OP_breg6 +0, DW_OP_deref => rbp=DW_OP_pick 0x00, DW_OP_deref rsp=DW_OP_pick 0x00, DW_OP_consts +16, DW_OP_plus rip=DW_OP_pick 0x00, DW_OP_consts +8, DW_OP_plus , DW_OP_deref
+
+thread backtrace
+# CHECK-LABEL: thread backtrace
+# CHECK: frame #0: 0x0000000000400430 unwind-via-stack-cfi`bar + 16
+# CHECK: frame #1: 0x0000000000400497 unwind-via-stack-cfi`_start + 23
+# CHECK-NOT: frame
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml
new file mode 100644
index 0000000..5fb7553
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win-no-memory-info.yaml
@@ -0,0 +1,133 @@
+# RUN: yaml2obj --docnum=1 %s > %t.dmp
+# RUN: yaml2obj --docnum=2 %s > %t.exe
+# RUN: %lldb -c %t.dmp %t.exe \
+# RUN:   -o "target symbols add %S/Inputs/unwind-via-raSearch.syms" \
+# RUN:   -o "thread backtrace" -b | FileCheck %s
+
+# CHECK-LABEL: thread backtrace
+# CHECK: frame #0: 0x000b1092 unwind-via-stack-win.exe`many_pointer_args
+# CHECK: frame #1: 0x000b1079 unwind-via-stack-win.exe`call_many + 105
+# CHECK: frame #2: 0x000b1085 unwind-via-stack-win.exe`main + 5
+# CHECK: frame #3: 0x77278494 kernel32.dll
+# CHECK-NOT: frame
+
+--- !minidump
+Streams:
+  - Type:            ThreadList
+    Threads:
+      - Thread Id:       0x0000290C
+        Priority Class:  0x00000020
+        Environment Block: 0x0000000000A98000
+        Context:         3F0001000000000000000000000000000000000000000000000000007F02000000000000FFFF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002B000000530000002B0000002B00000080100B0080100B000050A90080100B0080100B0000000000E4FECF0092100B0023000000440301007CFECF002B0000007F0200000000000000000000000000000000000000000000801F0000FFFF020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000144E3D6C2000000001000000EA1E00F4C000E50700000000FC0100002CE3C014D8E202010000E507880F401D839DC60100000000400000007F00000000000000880F401D0A000000900F401D0000000000000100EA1E00009808E5077F00000000000000000000009008E507990100006002E5072CABC87708346474B42300000100000044E3C014200000000000000020532777A80F401D4F346474D00F401D6F378CCC5C4CD5010000000000000000000000000000000000000000000000003AFCD72F90E3C01418CE3470B4230000B80F401DC00F401DC80F401DD00F401D
+        Stack:
+          Start of Memory Range: 0x0000000000CFFE78
+          Content:         0000000079100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0085100B0094842777
+  - Type:            ModuleList
+    Modules:
+      - Base of Image:   0x00000000000B1000
+        Size of Image:   0x00004000
+        Module Name:     'unwind-via-stack-win.exe'
+        CodeView Record: 525344533ED87D89C8A8184197F3A925EE4BF74101000000433A5C70726F6A656374735C746573745F6170705C436F6E736F6C654170706C69636174696F6E315C44656275675C436F6E736F6C654170706C69636174696F6E312E70646200
+      - Base of Image:   0x0000000077260000
+        Size of Image:   0x000E0000
+        Module Name:     'C:\Windows\System32\kernel32.dll'
+        CodeView Record: 5253445300F90A57CF8DED8A463A90390318CD4401000000776B65726E656C33322EFFFFFFFF
+  - Type:            MemoryList
+    Memory Ranges:
+      - Start of Memory Range: 0x0000000000CFFE78
+        Content:         0000000079100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0000100B0085100B0094842777
+  - Type:            SystemInfo
+    Processor Arch:  X86
+    Platform ID:     Win32NT
+    CPU:
+      Vendor ID:       AuthenticAMD
+      Version Info:    0x00800F82
+      Feature Info:    0x178BFBFF
+  - Type:            MiscInfo
+    Content:         54050000F703000008290000C883495D0000000000000000AC0D000098080000AC0D00000200000002000000002000000D0000000000000002000000C4FFFFFF430065006E007400720061006C0020004500750072006F007000650020005300740061006E0064006100720064002000540069006D006500000000000000000000000A0000000500030000000000000000000000430065006E007400720061006C0020004500750072006F00700065002000530075006D006D00650072002000540069006D00650000000000000000000000000000000300000005000200000000000000C4FFFFFF310037003100330034002E0031002E007800380036006600720065002E007200730034005F00720065006C0065006100730065002E003100380030003400310030002D00310038003000340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000064006200670063006F00720065002E0069003300380036002C00310030002E0030002E00310037003100330034002E0031000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006C816B92
+...
+
+--- !COFF
+OptionalHeader:  
+  AddressOfEntryPoint: 0
+  ImageBase:       720896
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_GUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:     
+    RelativeVirtualAddress: 8327
+    Size:            90
+  ImportTable:     
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:   
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:  
+    RelativeVirtualAddress: 12288
+    Size:            12
+  CertificateTable: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:           
+    RelativeVirtualAddress: 8192
+    Size:            28
+  Architecture:    
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:       
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:        
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:     
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:             
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader: 
+    RelativeVirtualAddress: 0
+    Size:            0
+header:          
+  Machine:         IMAGE_FILE_MACHINE_AMD64
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
+sections:        
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     22
+    SectionData:     50894C24048B4C24040FAF4C2404890C248B042459C3
+  - Name:            .rdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  8192
+    VirtualSize:     236
+    SectionData:     00000000A565B65C00000000020000006B0000001C2000001C060000525344533ED87D89C8A8184197F3A925EE4BF74101000000443A5C757073747265616D5C6275696C645C746F6F6C735C6C6C64625C6C69745C4D6F64756C65735C5045434F46465C4F75747075745C6578706F72742D646C6C66756E632E79616D6C2E746D702E70646200000000000000000000000000AF200000000000000200000001000000CB200000D3200000D72000006578706F72742D646C6C66756E632E79616D6C2E746D702E646C6C000000000000100000D92000000100446C6C46756E63000000000101010001020000
+  - Name:            .pdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  12288
+    VirtualSize:     12
+    SectionData:     '0010000016100000E4200000'
+symbols:         []
+...
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test
new file mode 100644
index 0000000..e462d8e
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Breakpad/unwind-via-stack-win.test
@@ -0,0 +1,56 @@
+# REQUIRES: x86
+
+# RUN: yaml2obj %S/Inputs/unwind-via-stack-win.yaml > %t
+# RUN: %lldb -c %t \
+# RUN:   -o "target symbols add %S/Inputs/unwind-via-stack-win.syms" \
+# RUN:   -s %s -b | FileCheck %s
+
+# First check that unwind plan generation works correctly.
+# This function has a "typical" unwind rule.
+image show-unwind -n call_many
+# CHECK-LABEL: image show-unwind -n call_many
+# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`call_many
+# CHECK: Symbol file UnwindPlan:
+# CHECK: This UnwindPlan originally sourced from breakpad STACK WIN
+# CHECK: This UnwindPlan is sourced from the compiler: yes.
+# CHECK: This UnwindPlan is valid at all instruction locations: no.
+# CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 16-0x0000007d)
+# CHECK: row[0]:    0: CFA=DW_OP_breg7 +0, DW_OP_consts +80, DW_OP_plus  => esp=DW_OP_pick 0x00, DW_OP_consts +4, DW_OP_plus  eip=DW_OP_pick 0x00, DW_OP_deref
+
+# Then, some invalid rules.
+image show-unwind -n bogus_rule
+# CHECK-LABEL: image show-unwind -n bogus_rule
+# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`bogus_rule
+# CHECK-NOT: Symbol file
+
+image show-unwind -n bogus_cfa_rhs
+# CHECK-LABEL: image show-unwind -n bogus_cfa_rhs
+# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`bogus_cfa_rhs
+# CHECK-NOT: Symbol file
+
+image show-unwind -n bogus_esp_rhs
+# CHECK-LABEL: image show-unwind -n bogus_esp_rhs
+# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`bogus_esp_rhs
+# CHECK-NOT: Symbol file
+
+# We don't treat unknown lhs as an error, as it can be just a temporary
+# variable used in other rules.
+image show-unwind -n temporary_var
+# CHECK-LABEL: image show-unwind -n temporary_var
+# CHECK: UNWIND PLANS for unwind-via-stack-win.exe`temporary_var
+# CHECK: Symbol file UnwindPlan:
+# CHECK: This UnwindPlan originally sourced from breakpad STACK WIN
+# CHECK: This UnwindPlan is sourced from the compiler: yes.
+# CHECK: This UnwindPlan is valid at all instruction locations: no.
+# CHECK: Address range of this UnwindPlan: [unwind-via-stack-win.exe..module_image + 304-0x00000134)
+# CHECK: row[0]:    0: CFA=DW_OP_breg7 +0 => esp=DW_OP_pick 0x00, DW_OP_consts +4, DW_OP_plus  eip=DW_OP_pick 0x00, DW_OP_deref
+
+# And finally, check that backtracing works as a whole by unwinding a simple
+# stack.
+thread backtrace
+# CHECK-LABEL: thread backtrace
+# CHECK: frame #0: 0x000b1092 unwind-via-stack-win.exe`many_pointer_args
+# CHECK: frame #1: 0x000b1079 unwind-via-stack-win.exe`call_many + 105
+# CHECK: frame #2: 0x000b1085 unwind-via-stack-win.exe`main + 5
+# CHECK: frame #3: 0x77278494 kernel32.dll
+# CHECK-NOT: frame
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_AT_loclists_base.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_AT_loclists_base.s
new file mode 100644
index 0000000..831db30
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_AT_loclists_base.s
@@ -0,0 +1,132 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
+# RUN: %lldb %t -o "image lookup -v -s lookup_loclists" -o exit | FileCheck %s
+
+# CHECK-LABEL: image lookup -v -s lookup_loclists
+# CHECK: Variable: {{.*}}, name = "x0", type = "int", location = DW_OP_reg0 RAX,
+# CHECK: Variable: {{.*}}, name = "x1", type = "int", location = ,
+
+loclists:
+        nop
+.Ltmp0:
+        nop
+lookup_loclists:
+.Ltmp1:
+        nop
+.Ltmp2:
+        nop
+.Ltmp3:
+        nop
+.Ltmp4:
+        nop
+.Lloclists_end:
+
+        .section        .debug_loclists,"",@progbits
+        .long   .Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0 # Length
+.Ldebug_loclist_table_start0:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   1                       # Offset entry count
+.Lloclists_table_base:
+        .long   .Ldebug_loc0-.Lloclists_table_base
+        .long   .Ldebug_loc1-.Lloclists_table_base
+.Ldebug_loc0:
+        .byte   4                       # DW_LLE_offset_pair
+        .uleb128 loclists-loclists
+        .uleb128  .Ltmp2-loclists
+        .uleb128 1                      # Expression size
+        .byte   80                      # super-register DW_OP_reg0
+        .byte   0                       # DW_LLE_end_of_list
+.Ldebug_loc1:
+        .byte   4                       # DW_LLE_offset_pair
+        .uleb128 .Ltmp3-loclists
+        .uleb128  .Ltmp4-loclists
+        .uleb128 1                      # Expression size
+        .byte   81                      # super-register DW_OP_reg1
+        .byte   0                       # DW_LLE_end_of_list
+.Ldebug_loclist_table_end0:
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   19                      # DW_AT_language
+        .byte   5                       # DW_FORM_data2
+        .uleb128 0x8c                   # DW_AT_loclists_base
+        .byte   0x17                    # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   3                       # Abbreviation Code
+        .byte   5                       # DW_TAG_formal_parameter
+        .byte   0                       # DW_CHILDREN_no
+        .byte   2                       # DW_AT_location
+        .byte   0x22                    # DW_FORM_loclistx
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   4                       # Abbreviation Code
+        .byte   36                      # DW_TAG_base_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   62                      # DW_AT_encoding
+        .byte   11                      # DW_FORM_data1
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   1                       # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .short  12                      # DW_AT_language
+        .long   .Lloclists_table_base   # DW_AT_loclists_base
+        .byte   2                       # Abbrev [2] 0x2a:0x29 DW_TAG_subprogram
+        .quad   loclists                # DW_AT_low_pc
+        .long   .Lloclists_end-loclists # DW_AT_high_pc
+        .asciz  "loclists"              # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .uleb128 0                      # DW_AT_location
+        .asciz  "x0"                    # DW_AT_name
+        .long   .Lint-.Lcu_begin0       # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .uleb128 1                      # DW_AT_location
+        .asciz  "x1"                    # DW_AT_name
+        .long   .Lint-.Lcu_begin0       # DW_AT_type
+        .byte   0                       # End Of Children Mark
+.Lint:
+        .byte   4                       # Abbrev [4] 0x53:0x7 DW_TAG_base_type
+        .asciz  "int"                   # DW_AT_name
+        .byte   5                       # DW_AT_encoding
+        .byte   4                       # DW_AT_byte_size
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_AT_low_pc-addrx.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_AT_low_pc-addrx.s
new file mode 100644
index 0000000..df08966
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_AT_low_pc-addrx.s
@@ -0,0 +1,106 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
+# RUN: %lldb %t -o "image lookup -v -s lookup_rnglists" \
+# RUN:   -o exit | FileCheck %s
+
+# CHECK-LABEL: image lookup -v -s lookup_rnglists
+# CHECK:  Function: id = {0x7fffffff0000002d}, name = "rnglists", range = [0x0000000000000000-0x0000000000000003)
+# CHECK:    Blocks: id = {0x7fffffff0000002d}, range = [0x00000000-0x00000003)
+# CHECK-NEXT:       id = {0x7fffffff00000043}, range = [0x00000001-0x00000002)
+
+        .text
+rnglists:
+        nop
+.Lblock1_begin:
+lookup_rnglists:
+        nop
+.Lblock1_end:
+        nop
+.Lrnglists_end:
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   17                      # DW_AT_low_pc
+        .byte   27                      # DW_FORM_addrx
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   116                     # DW_AT_rnglists_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   115                     # DW_AT_addr_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   5                       # Abbreviation Code
+        .byte   11                      # DW_TAG_lexical_block
+        .byte   0                       # DW_CHILDREN_no
+        .byte   85                      # DW_AT_ranges
+        .byte   35                      # DW_FORM_rnglistx
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   1                       # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .byte   0                       # DW_AT_low_pc
+        .long   .Lrnglists_end-rnglists # DW_AT_high_pc
+        .long   .Lrnglists_table_base0  # DW_AT_rnglists_base
+        .long   .Laddr_table_base0      # DW_AT_addr_base
+        .byte   2                       # Abbrev [2] 0x2b:0x37 DW_TAG_subprogram
+        .quad   rnglists                # DW_AT_low_pc
+        .long   .Lrnglists_end-rnglists # DW_AT_high_pc
+        .asciz  "rnglists"              # DW_AT_name
+        .byte   5                       # Abbrev [5] 0x52:0xf DW_TAG_lexical_block
+        .byte   0                       # DW_AT_ranges
+        .byte   0                       # End Of Children Mark
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end0:
+
+        .section        .debug_addr,"",@progbits
+        .long   .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
+.Ldebug_addr_start0:
+        .short  5                       # DWARF version number
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+.Laddr_table_base0:
+        .quad   rnglists
+.Ldebug_addr_end0:
+
+        .section        .debug_rnglists,"",@progbits
+        .long   .Ldebug_rnglist_table_end0-.Ldebug_rnglist_table_start0 # Length
+.Ldebug_rnglist_table_start0:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   1                       # Offset entry count
+.Lrnglists_table_base0:
+        .long   .Ldebug_ranges0-.Lrnglists_table_base0
+.Ldebug_ranges0:
+        .byte   4                       # DW_RLE_offset_pair
+        .uleb128 .Lblock1_begin-rnglists  #   starting offset
+        .uleb128 .Lblock1_end-rnglists    #   ending offset
+        .byte   0                       # DW_RLE_end_of_list
+.Ldebug_rnglist_table_end0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_OP_piece-struct.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_OP_piece-struct.s
new file mode 100644
index 0000000..1809cf9
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/DW_OP_piece-struct.s
@@ -0,0 +1,113 @@
+# RUN: llvm-mc -filetype=obj -o %t -triple x86_64-pc-linux %s
+# RUN: %lldb %t -o "target variable reset" -b | FileCheck %s
+
+# CHECK: (lldb) target variable reset
+# CHECK: (auto_reset) reset = {
+# CHECK:   ptr = 0xdeadbeefbaadf00d
+# CHECK:   prev = false
+# CHECK: }
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   52                      # DW_TAG_variable
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   2                       # DW_AT_location
+        .byte   24                      # DW_FORM_exprloc
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   3                       # Abbreviation Code
+        .byte   36                      # DW_TAG_base_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   62                      # DW_AT_encoding
+        .byte   11                      # DW_FORM_data1
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   4                       # Abbreviation Code
+        .byte   19                      # DW_TAG_structure_type
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   5                       # Abbreviation Code
+        .byte   13                      # DW_TAG_member
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   56                      # DW_AT_data_member_location
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   6                       # Abbreviation Code
+        .byte   15                      # DW_TAG_pointer_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Lcu_end-.Lcu_start     # Length of Unit
+.Lcu_start:
+        .short  4                       # DWARF version number
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   8                       # Address Size (in bytes)
+        .byte   1                       # Abbrev [1] 0xb:0x6c DW_TAG_compile_unit
+.Lbool:
+        .byte   3                       # Abbrev [3] 0x33:0x7 DW_TAG_base_type
+        .asciz  "bool"                  # DW_AT_name
+        .byte   2                       # DW_AT_encoding
+        .byte   1                       # DW_AT_byte_size
+        .byte   2                       # Abbrev [2] 0x3a:0x15 DW_TAG_variable
+        .asciz  "reset"                 # DW_AT_name
+        .long   .Lstruct                # DW_AT_type
+        .byte   2f-1f                   # DW_AT_location
+1:
+        .byte   0xe                     # DW_OP_constu
+        .quad   0xdeadbeefbaadf00d
+        .byte   0x9f                    # DW_OP_stack_value
+        .byte   0x93                    # DW_OP_piece
+        .uleb128 8
+        .byte   0xe                     # DW_OP_constu
+        .quad   0
+        .byte   0x9f                    # DW_OP_stack_value
+        .byte   0x93                    # DW_OP_piece
+        .uleb128 8
+2:
+.Lstruct:
+        .byte   4                       # Abbrev [4] 0x4f:0x22 DW_TAG_structure_type
+        .asciz  "auto_reset"            # DW_AT_name
+        .byte   16                      # DW_AT_byte_size
+        .byte   5                       # Abbrev [5] 0x58:0xc DW_TAG_member
+        .asciz  "ptr"                   # DW_AT_name
+        .long   .Lbool_ptr              # DW_AT_type
+        .byte   0                       # DW_AT_data_member_location
+        .byte   5                       # Abbrev [5] 0x64:0xc DW_TAG_member
+        .asciz  "prev"                  # DW_AT_name
+        .long   .Lbool                  # DW_AT_type
+        .byte   8                       # DW_AT_data_member_location
+        .byte   0                       # End Of Children Mark
+.Lbool_ptr:
+        .byte   6                       # Abbrev [6] 0x71:0x5 DW_TAG_pointer_type
+        .long   .Lbool                  # DW_AT_type
+        .byte   0                       # End Of Children Mark
+.Lcu_end:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-line-basic.script b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-line-basic.script
new file mode 100644
index 0000000..7f3a1b9
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-line-basic.script
@@ -0,0 +1,14 @@
+PHDRS {
+  text PT_LOAD;
+}
+SECTIONS {
+  .shstrtab     : { *(.shstrtab    ) }
+  .debug_info   : { *(.debug_info  ) }
+  .debug_line   : { *(.debug_line  ) }
+  .debug_str    : { *(.debug_str   ) }
+  .debug_abbrev : { *(.debug_abbrev) }
+
+  . = 0x201000;
+  .text : { *(.text .text.f) } :text
+  /DISCARD/ : { *(*) }
+}
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/debug-types-basic.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-basic.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/debug-types-basic.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-basic.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug-types-expressions.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug_loc-aslr.yaml b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug_loc-aslr.yaml
new file mode 100644
index 0000000..05d7e10
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/debug_loc-aslr.yaml
@@ -0,0 +1,30 @@
+--- !minidump
+Streams:         
+  - Type:            ThreadList
+    Threads:         
+      - Thread Id:       0x00003E81
+        Context:         0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B001000000000006CAE000000006B7FC05A0000C81D415A0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000A2BF9E5A6B7F0000000000000000000000000000000000008850C14BFD7F00009850C14BFD7F00000100000000000000B04AC14BFD7F0000000000000000000060812D01000000000800000000000000B065E05A6B7F00008004400000000000E050C14BFD7F00000000000000000000000000000000000001004700000000007F03FFFF0000FFFFFFFFFFFF000000000000000000000000801F00006B7F00000400000000000000B84CC14BFD7F0000304D405A6B7F0000C84DC14BFD7F0000C0AA405A6B7F00004F033D0000000000B84DC14BFD7F0000E84DC14BFD7F0000000000000000000000000000000000000070E05A6B7F000078629E5A6B7F0000C81D415A6B7F0000804F9E5A6B7F00000000000001000000E603000001000000E093115A6B7F0000804EC14BFD7F0000584EC14BFD7F000099ADC05A6B7F00000100000000000000AAAAD77D0000000002000000000000000800000000000000B065E05A6B7F0000E6B7C05A6B7F0000010000006B7F0000884DC14BFD7F0000106F7C5A6B7F0000984EC14BFD7F0000488B7C5A6B7F0000C4A71CB90000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F0000702AE25A6B7F0000D84DC14BFD7F000030489E5A6B7F0000E84EC14BFD7F0000E05E9E5A6B7F00000991F0460000000001000000000000000800000000000000B065E05A6B7F000048B6C05A6B7F00000100000000000000284EC14BFD7F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
+        Stack:           
+          Start of Memory Range: 0x00007FFCEB34A000
+          Content:         DEAD
+  - Type:            SystemInfo
+    Processor Arch:  AMD64
+    Processor Level: 6
+    Processor Revision: 15876
+    Number of Processors: 40
+    Platform ID:     Linux
+    CSD Version:     'Linux 3.13.0-91-generic'
+    CPU:             
+      Vendor ID:       GenuineIntel
+      Version Info:    0x00000000
+      Feature Info:    0x00000000
+  - Type:            LinuxProcStatus
+    Text:             |
+      Name:	linux-x86_64
+      State:	t (tracing stop)
+      Tgid:	29917
+      Ngid:	0
+      Pid:	29917
+      PPid:	29370
+
+...
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/dir-separator-posix.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-posix.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/dir-separator-posix.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-posix.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/dir-separator-windows.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-windows.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/dir-separator-windows.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/dir-separator-windows.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/find-variable-file-2.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/find-variable-file-2.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/Inputs/find-variable-file-2.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/Inputs/find-variable-file-2.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/anon_class_w_and_wo_export_symbols.ll b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/anon_class_w_and_wo_export_symbols.ll
new file mode 100644
index 0000000..40a8ac0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/anon_class_w_and_wo_export_symbols.ll
@@ -0,0 +1,79 @@
+; UNSUPPORTED: system-windows
+;
+; This test verifies that we do the right thing with DIFlagExportSymbols which is the new
+; behavioir and without the DIFlagExportSymbols which is the old behavior for the given
+; definitions below.
+;
+;```
+; struct A{
+;   struct {
+;    int x;
+;   };
+;   struct {
+;    int y;
+;   };
+;   struct {
+;    int z;
+;   } unnamed;
+; } a;
+;```
+;
+; RUN: %clangxx_host -g -c -o %t.o %s
+; RUN: lldb-test symbols -dump-clang-ast %t.o | FileCheck %s
+; RUN: llvm-dwarfdump %t.o | FileCheck %s --check-prefix DWARFDUMP
+
+%struct.A = type { %struct.anon, %struct.anon.0, %struct.anon.1 }
+%struct.anon = type { i32 }
+%struct.anon.0 = type { i32 }
+%struct.anon.1 = type { i32 }
+
+@a = global %struct.A zeroinitializer, align 4, !dbg !0
+
+!llvm.module.flags = !{!21, !22}
+!llvm.dbg.cu = !{!2}
+!llvm.ident = !{!23}
+
+!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+!1 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 11, type: !6, isLocal: false, isDefinition: true)
+!2 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus_14, file: !3, producer: "clang version 10.0.0", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4, globals: !5, nameTableKind: None)
+!3 = !DIFile(filename: "anon_old_new.cpp", directory: "/dir")
+!4 = !{}
+!5 = !{!0}
+!6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "A", file: !3, line: 1, size: 96, flags: DIFlagTypePassByValue, elements: !7, identifier: "_ZTS1A")
+; CHECK: struct A definition
+!7 = !{!8, !13, !17}
+!8 = !DIDerivedType(tag: DW_TAG_member, scope: !6, file: !3, line: 2, baseType: !9, size: 32)
+!9 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !6, file: !3, line: 2, size: 32, flags: DIFlagExportSymbols | DIFlagTypePassByValue, elements: !10, identifier: "_ZTSN1AUt_E")
+; Correctly identify an anonymous class with DIFlagExportSymbols
+; CHECK: struct definition
+; CHECK: DefinitionData is_anonymous pass_in_registers aggregate standard_layout trivially_copyable pod trivial literal
+!10 = !{!11}
+!11 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !9, file: !3, line: 3, baseType: !12, size: 32)
+!12 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!13 = !DIDerivedType(tag: DW_TAG_member, scope: !6, file: !3, line: 5, baseType: !14, size: 32, offset: 32)
+!14 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !6, file: !3, line: 5, size: 32, flags: DIFlagTypePassByValue, elements: !15, identifier: "_ZTSN1AUt0_E")
+; Correctly identify an anonymous class without DIFlagExportSymbols
+; This works b/c we have additional checks when we fields to A.
+; CHECK: struct definition
+; CHECK: DefinitionData is_anonymous pass_in_registers aggregate standard_layout trivially_copyable pod trivial literal
+!15 = !{!16}
+!16 = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !14, file: !3, line: 6, baseType: !12, size: 32)
+!17 = !DIDerivedType(tag: DW_TAG_member, name: "unnamed", scope: !6, file: !3, line: 10, baseType: !18, size: 32, offset: 64)
+!18 = distinct !DICompositeType(tag: DW_TAG_structure_type, scope: !6, file: !3, line: 8, size: 32, flags: DIFlagTypePassByValue, elements: !19, identifier: "_ZTSN1AUt1_E")
+; Correctly identify an unamed class
+; CHECK: struct definition
+; CHECK: DefinitionData pass_in_registers aggregate standard_layout trivially_copyable pod trivial literal
+!19 = !{!20}
+!20 = !DIDerivedType(tag: DW_TAG_member, name: "z", scope: !18, file: !3, line: 9, baseType: !12, size: 32)
+!21 = !{i32 2, !"Dwarf Version", i32 4}
+!22 = !{i32 2, !"Debug Info Version", i32 3}
+!23 = !{!"clang version 10.0.0"}
+
+; DWARFDUMP: DW_TAG_structure_type
+; DWARFDUMP: DW_AT_name	("A")
+;
+; DWARFDUMP: DW_TAG_structure_type
+; DWARFDUMP: DW_AT_export_symbols	(true)
+;
+; DWARFDUMP: DW_TAG_structure_type
+; DWARFDUMP-NOT: DW_AT_export_symbols   (true)
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/apple-index-is-used.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/apple-index-is-used.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/apple-index-is-used.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/apple-index-is-used.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/array-sizes.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/array-sizes.s
new file mode 100644
index 0000000..b810527
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/array-sizes.s
@@ -0,0 +1,147 @@
+# This tests a bug where we would incorrectly parse the size of an array if that
+# size happened to match an existing DIE offset. This happened because we
+# misinterpreted that value as a reference to a DIE specifying the VLA size even
+# though the form was a data form (as it should be).
+
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
+# RUN: ld.lld %t.o -o %t
+# RUN: lldb-test symbols %t | FileCheck %s
+
+# CHECK: Variable{0x7fffffff0000001e}, name = "X"
+# CHECK-SAME: type = {7fffffff00000033} 0x{{[0-9A-F]*}} (char [56])
+
+
+# Generated from "char X[47];"
+# The array size was modified by hand.
+
+	.text
+	.file	"-"
+	.file	1 "/tmp" "<stdin>"
+	.type	X,@object               # @X
+	.comm	X,63,16
+	.section	.debug_str,"MS",@progbits,1
+.Linfo_string0:
+	.asciz	"clang version 8.0.0 (trunk 349604) (llvm/trunk 349608)" # string offset=0
+.Linfo_string1:
+	.asciz	"-"                     # string offset=55
+.Linfo_string2:
+	.asciz	"/tmp"                  # string offset=57
+.Linfo_string3:
+	.asciz	"X"                     # string offset=62
+.Linfo_string4:
+	.asciz	"char"                  # string offset=64
+.Linfo_string5:
+	.asciz	"__ARRAY_SIZE_TYPE__"   # string offset=69
+	.section	.debug_abbrev,"",@progbits
+	.byte	1                       # Abbreviation Code
+	.byte	17                      # DW_TAG_compile_unit
+	.byte	1                       # DW_CHILDREN_yes
+	.byte	37                      # DW_AT_producer
+	.byte	14                      # DW_FORM_strp
+	.byte	19                      # DW_AT_language
+	.byte	5                       # DW_FORM_data2
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	16                      # DW_AT_stmt_list
+	.byte	23                      # DW_FORM_sec_offset
+	.byte	27                      # DW_AT_comp_dir
+	.byte	14                      # DW_FORM_strp
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	2                       # Abbreviation Code
+	.byte	52                      # DW_TAG_variable
+	.byte	0                       # DW_CHILDREN_no
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	73                      # DW_AT_type
+	.byte	19                      # DW_FORM_ref4
+	.byte	63                      # DW_AT_external
+	.byte	25                      # DW_FORM_flag_present
+	.byte	58                      # DW_AT_decl_file
+	.byte	11                      # DW_FORM_data1
+	.byte	59                      # DW_AT_decl_line
+	.byte	11                      # DW_FORM_data1
+	.byte	2                       # DW_AT_location
+	.byte	24                      # DW_FORM_exprloc
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	3                       # Abbreviation Code
+	.byte	1                       # DW_TAG_array_type
+	.byte	1                       # DW_CHILDREN_yes
+	.byte	73                      # DW_AT_type
+	.byte	19                      # DW_FORM_ref4
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	4                       # Abbreviation Code
+	.byte	33                      # DW_TAG_subrange_type
+	.byte	0                       # DW_CHILDREN_no
+	.byte	73                      # DW_AT_type
+	.byte	19                      # DW_FORM_ref4
+	.byte	55                      # DW_AT_count
+	.byte	11                      # DW_FORM_data1
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	5                       # Abbreviation Code
+	.byte	36                      # DW_TAG_base_type
+	.byte	0                       # DW_CHILDREN_no
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	62                      # DW_AT_encoding
+	.byte	11                      # DW_FORM_data1
+	.byte	11                      # DW_AT_byte_size
+	.byte	11                      # DW_FORM_data1
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	6                       # Abbreviation Code
+	.byte	36                      # DW_TAG_base_type
+	.byte	0                       # DW_CHILDREN_no
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	11                      # DW_AT_byte_size
+	.byte	11                      # DW_FORM_data1
+	.byte	62                      # DW_AT_encoding
+	.byte	11                      # DW_FORM_data1
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	0                       # EOM(3)
+	.section	.debug_info,"",@progbits
+.Lcu_begin0:
+	.long	.Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+	.short	4                       # DWARF version number
+	.long	.debug_abbrev           # Offset Into Abbrev. Section
+	.byte	8                       # Address Size (in bytes)
+	.byte	1                       # Abbrev [1] 0xb:0x43 DW_TAG_compile_unit
+	.long	.Linfo_string0          # DW_AT_producer
+	.short	12                      # DW_AT_language
+	.long	.Linfo_string1          # DW_AT_name
+	.long	0                       # DW_AT_stmt_list
+	.long	.Linfo_string2          # DW_AT_comp_dir
+	.byte	2                       # Abbrev [2] 0x1e:0x15 DW_TAG_variable
+	.long	.Linfo_string3          # DW_AT_name
+	.long	51                      # DW_AT_type
+                                        # DW_AT_external
+	.byte	1                       # DW_AT_decl_file
+	.byte	1                       # DW_AT_decl_line
+	.byte	9                       # DW_AT_location
+	.byte	3
+	.quad	X
+	.byte	3                       # Abbrev [3] 0x33:0xc DW_TAG_array_type
+	.long	63                      # DW_AT_type
+.Ldie:
+	.byte	4                       # Abbrev [4] 0x38:0x6 DW_TAG_subrange_type
+	.long	70                      # DW_AT_type
+	.byte	.Ldie-.Lcu_begin0       # DW_AT_count - should match the offset of an existing die
+	.byte	0                       # End Of Children Mark
+	.byte	5                       # Abbrev [5] 0x3f:0x7 DW_TAG_base_type
+	.long	.Linfo_string4          # DW_AT_name
+	.byte	6                       # DW_AT_encoding
+	.byte	1                       # DW_AT_byte_size
+	.byte	6                       # Abbrev [6] 0x46:0x7 DW_TAG_base_type
+	.long	.Linfo_string5          # DW_AT_name
+	.byte	8                       # DW_AT_byte_size
+	.byte	7                       # DW_AT_encoding
+	.byte	0                       # End Of Children Mark
+.Ldebug_info_end0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/childless-compile-unit.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/childless-compile-unit.s
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/childless-compile-unit.s
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/childless-compile-unit.s
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-objc-property.m b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-objc-property.m
new file mode 100644
index 0000000..88d8406
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-objc-property.m
@@ -0,0 +1,29 @@
+// REQUIRES: system-darwin
+//
+// RUN: %clang_host -g -c -o %t.o %s
+// RUN: lldb-test symbols -dump-clang-ast %t.o | FileCheck %s
+
+__attribute__((objc_root_class))
+@interface Root
+@property (readonly) int ro_number;
+@property int rw_number;
+@property (readonly, getter=custom_getter) int manual;
+- (int)custom_getter;
+@property (class, readonly) int class_property;
+@end
+
+Root *obj;
+
+// CHECK: |-ObjCPropertyDecl {{.*}} ro_number 'int' readonly
+// CHECK: | `-getter ObjCMethod [[READONLY:0x[0-9a-f]+]] 'ro_number'
+// CHECK: |-ObjCMethodDecl [[READONLY]] {{.*}} implicit - ro_number 'int'
+// CHECK: |-ObjCPropertyDecl {{.*}} rw_number 'int' assign readwrite
+// CHECK: | |-getter ObjCMethod {{.*}} 'rw_number'
+// CHECK: | `-setter ObjCMethod {{.*}} 'setRw_number:'
+// CHECK: |-ObjCPropertyDecl {{.*}} manual 'int' readonly
+// CHECK: | `-getter ObjCMethod [[CUSTOM:0x[0-9a-f]+]] 'custom_getter'
+// CHECK: |-ObjCMethodDecl [[CUSTOM]] {{.*}} - custom_getter 'int'
+// CHECK: |-ObjCPropertyDecl {{.*}} class_property 'int' readonly class
+// CHECK: | `-getter ObjCMethod [[CLASS:0x[0-9a-f]+]] 'class_property'
+// CHECK: `-ObjCMethodDecl [[CLASS]] {{.*}} + class_property 'int'
+
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp
new file mode 100644
index 0000000..4d267f0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp
@@ -0,0 +1,21 @@
+// UNSUPPORTED: system-windows
+//
+// Test to verify we are correctly generating anonymous flags when parsing
+// anonymous class and unnamed structs from DWARF to the a clang AST node.
+
+// RUN: %clangxx_host -g -c -o %t.o %s
+// RUN: lldb-test symbols -dump-clang-ast %t.o | FileCheck %s
+
+struct A {
+  struct {
+    int x;
+  };
+  struct {
+    int y;
+  } C;
+} a;
+
+// CHECK: A::(anonymous struct)
+// CHECK: |-DefinitionData is_anonymous pass_in_registers aggregate standard_layout trivially_copyable pod trivial literal
+// CHECK: A::(anonymous struct)
+// CHECK: |-DefinitionData pass_in_registers aggregate standard_layout trivially_copyable pod trivial literal
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll
new file mode 100644
index 0000000..8589d0f
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/compilercontext.ll
@@ -0,0 +1,52 @@
+; Test finding types by CompilerContext.
+; RUN: llc %s -filetype=obj -o %t.o
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN:   -compiler-context="Module:CModule,Module:SubModule,Struct:FromSubmoduleX" \
+; RUN:   | FileCheck %s --check-prefix=NORESULTS
+; RUN: lldb-test symbols %t.o -find=type --language=C++ \
+; RUN:   -compiler-context="Module:CModule,Module:SubModule,Struct:FromSubmodule" \
+; RUN:   | FileCheck %s --check-prefix=NORESULTS
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN:   -compiler-context="Module:CModule,Module:SubModule,Struct:FromSubmodule" \
+; RUN:   | FileCheck %s
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN:   -compiler-context="Module:CModule,AnyModule:*,Struct:FromSubmodule" \
+; RUN:   | FileCheck %s
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN:   -compiler-context="AnyModule:*,Struct:FromSubmodule" \
+; RUN:   | FileCheck %s
+; RUN: lldb-test symbols %t.o -find=type --language=C99 \
+; RUN:   -compiler-context="Module:CModule,Module:SubModule,AnyType:FromSubmodule" \
+; RUN:   | FileCheck %s
+;
+; NORESULTS: Found 0 types
+; CHECK: Found 1 types:
+; CHECK: struct FromSubmodule {
+; CHECK-NEXT:     unsigned int x;
+; CHECK-NEXT:     unsigned int y;
+; CHECK-NEXT:     unsigned int z;
+; CHECK-NEXT: }
+
+source_filename = "/t.c"
+target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-apple-macosx10.14.0"
+
+!llvm.dbg.cu = !{!2}
+!llvm.linker.options = !{}
+!llvm.module.flags = !{!18, !19}
+!llvm.ident = !{!22}
+
+; This simulates the debug info for a Clang module.
+!2 = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, nameTableKind: GNU, retainedTypes: !{!11})
+!3 = !DIFile(filename: "t.c", directory: "/")
+!8 = !DIModule(scope: !9, name: "SubModule", includePath: "", sysroot: "/")
+!9 = !DIModule(scope: null, name: "CModule", includePath: "", sysroot: "/")
+!11 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "FromSubmodule", scope: !8, file: !3, line: 1, size: 96, elements: !13)
+!13 = !{!14, !16, !17}
+!14 = !DIDerivedType(tag: DW_TAG_member, name: "x", scope: !11, file: !3, line: 2, baseType: !15, size: 32)
+!15 = !DIBasicType(name: "unsigned int", size: 32, encoding: DW_ATE_unsigned)
+!16 = !DIDerivedType(tag: DW_TAG_member, name: "y", scope: !11, file: !3, line: 2, baseType: !15, size: 32, offset: 32)
+!17 = !DIDerivedType(tag: DW_TAG_member, name: "z", scope: !11, file: !3, line: 2, baseType: !15, size: 32, offset: 64)
+!18 = !{i32 2, !"Dwarf Version", i32 4}
+!19 = !{i32 2, !"Debug Info Version", i32 3}
+!22 = !{!"clang version 10.0.0 (https://github.com/llvm/llvm-project 056f1b5cc7c2133f0cb3e30e7f24808d321096d7)"}
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-line-basic.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-line-basic.s
new file mode 100644
index 0000000..a1100ba
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-line-basic.s
@@ -0,0 +1,86 @@
+# Test basics of debug_line parsing. This test uses a linker script which
+# ensures the code is placed at the end of a module to test the boundary
+# condition when the final end-of-sequence line table entry points to an address
+# that is outside the range of memory covered by the module.
+
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
+# RUN: ld.lld --script=%S/Inputs/debug-line-basic.script %t.o -o %t
+# RUN: %lldb %t -o "image dump line-table -v a.c" -o exit | FileCheck %s
+
+	.text
+	.globl	_start
+_start:
+# CHECK: Line table for /tmp/a.c
+	.file	1 "/tmp/b.c"
+	.loc	1 0 0
+        nop
+# CHECK-NEXT: 0x0000000000201000: /tmp/b.c, is_start_of_statement = TRUE{{$}}
+	.loc	1 1 0
+        nop
+# CHECK-NEXT: 0x0000000000201001: /tmp/b.c:1, is_start_of_statement = TRUE{{$}}
+        .loc   1 1 1
+        nop
+# CHECK-NEXT: 0x0000000000201002: /tmp/b.c:1:1, is_start_of_statement = TRUE{{$}}
+        .loc   1 2 0 is_stmt 0
+        nop
+# CHECK-NEXT: 0x0000000000201003: /tmp/b.c:2{{$}}
+        .loc   1 2 0 is_stmt 0 basic_block
+        nop
+# CHECK-NEXT: 0x0000000000201004: /tmp/b.c:2, is_start_of_basic_block = TRUE{{$}}
+        .loc   1 2 0 is_stmt 0 prologue_end
+        nop
+# CHECK-NEXT: 0x0000000000201005: /tmp/b.c:2, is_prologue_end = TRUE{{$}}
+        .loc   1 2 0 is_stmt 0 epilogue_begin
+        nop
+# CHECK-NEXT: 0x0000000000201006: /tmp/b.c:2, is_epilogue_begin = TRUE{{$}}
+	.file  2 "/tmp/c.c"
+	.loc   2 1 0 is_stmt 0
+        nop
+# CHECK-NEXT: 0x0000000000201007: /tmp/c.c:1{{$}}
+# CHECK-NEXT: 0x0000000000201008: /tmp/c.c:1, is_terminal_entry = TRUE{{$}}
+
+	.section	.text.f,"ax",@progbits
+f:
+        .loc   1 3 0 is_stmt 0
+        nop
+# CHECK-NEXT: 0x0000000000201008: /tmp/b.c:3{{$}}
+# CHECK-NEXT: 0x0000000000201009: /tmp/b.c:3, is_terminal_entry = TRUE{{$}}
+
+
+	.section	.debug_str,"MS",@progbits,1
+.Linfo_string1:
+	.asciz	"a.c"
+.Linfo_string2:
+	.asciz	"/tmp"
+	.section	.debug_abbrev,"",@progbits
+	.byte	1                       # Abbreviation Code
+	.byte	17                      # DW_TAG_compile_unit
+	.byte	0                       # DW_CHILDREN_no
+	.byte	19                      # DW_AT_language
+	.byte	5                       # DW_FORM_data2
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	16                      # DW_AT_stmt_list
+	.byte	23                      # DW_FORM_sec_offset
+	.byte	27                      # DW_AT_comp_dir
+	.byte	14                      # DW_FORM_strp
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	0                       # EOM(3)
+	.section	.debug_info,"",@progbits
+.Lcu_begin0:
+	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
+.Lcu_start0:
+	.short	4                       # DWARF version number
+	.long	.debug_abbrev           # Offset Into Abbrev. Section
+	.byte	8                       # Address Size (in bytes)
+	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
+	.short	12                      # DW_AT_language
+	.long	.Linfo_string1          # DW_AT_name
+	.long	.Lline_table_start0     # DW_AT_stmt_list
+	.long	.Linfo_string2          # DW_AT_comp_dir
+.Lcu_end0:
+	.section	.debug_line,"",@progbits
+.Lline_table_start0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-names-compressed.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-names-compressed.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-address-ranges.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-address-ranges.s
new file mode 100644
index 0000000..e87f8c8
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-address-ranges.s
@@ -0,0 +1,340 @@
+# Check address lookup works correctly in the presence of type units.
+# Specifically check that we don't use the line table pointed to by the
+# DW_AT_stmt_list of the type unit (which used only for the file names) to
+# compute address range for the type unit as type units don't describe any
+# addresses. The addresses should always resolve to the relevant compile units.
+
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -dwarf-version=5 -triple x86_64-pc-linux %s -filetype=obj >%t.o
+# RUN: ld.lld %t.o -o %t -image-base=0x47000 -z separate-code
+# RUN: %lldb %t -o "image lookup -a 0x48000 -v" -o exit | FileCheck %s
+
+# CHECK:   CompileUnit: id = {0x00000001}, file = "/tmp/a.cc", language = "c++"
+# CHECK:      Function: id = {0x7fffffff0000006a}, name = "::_start({{.*}})", range = [0x0000000000048000-0x000000000004800c)
+# CHECK:     LineEntry: [0x0000000000048000-0x000000000004800a): /tmp/a.cc:4
+# CHECK:        Symbol: id = {0x00000002}, range = [0x0000000000048000-0x000000000004800c), name="_start"
+# CHECK:      Variable: id = {0x7fffffff00000075}, name = "v1", {{.*}} decl = a.cc:4
+# CHECK:      Variable: id = {0x7fffffff00000080}, name = "v2", {{.*}} decl = a.cc:4
+
+
+# Output generated via
+# clang -g -fdebug-types-section -gdwarf-5 -S
+# from
+# enum E1 { e1 };
+# enum E2 { e2 };
+# extern "C" void _start(E1 v1, E2 v2) {}
+# The output was modified to place the compile unit in between the two type
+# units.
+
+        .text
+        .file   "a.cc"
+        .file   0 "/tmp" "a.cc"
+
+        .text
+        .globl  _start                  # -- Begin function _start
+        .p2align        4, 0x90
+        .type   _start,@function
+_start:                                 # @_start
+.Lfunc_begin0:
+        .loc    0 4 0                   # /tmp/a.cc:4:0
+        .cfi_startproc
+# %bb.0:                                # %entry
+        pushq   %rbp
+        .cfi_def_cfa_offset 16
+        .cfi_offset %rbp, -16
+        movq    %rsp, %rbp
+        .cfi_def_cfa_register %rbp
+        movl    %edi, -4(%rbp)
+        movl    %esi, -8(%rbp)
+.Ltmp0:
+        .loc    0 4 23 prologue_end     # /tmp/a.cc:4:23
+        popq    %rbp
+        .cfi_def_cfa %rsp, 8
+        retq
+.Ltmp1:
+.Lfunc_end0:
+        .size   _start, .Lfunc_end0-_start
+        .cfi_endproc
+                                        # -- End function
+        .section        .debug_str_offsets,"",@progbits
+        .long   52
+        .short  5
+        .short  0
+.Lstr_offsets_base0:
+        .section        .debug_str,"MS",@progbits,1
+.Linfo_string0:
+        .asciz  "clang version 9.0.0 (trunk 360907) (llvm/trunk 360908)"
+.Linfo_string1:
+        .asciz  "a.cc"
+.Linfo_string2:
+        .asciz  "/tmp"
+.Linfo_string3:
+        .asciz  "unsigned int"
+.Linfo_string4:
+        .asciz  "e1"
+.Linfo_string5:
+        .asciz  "E1"
+.Linfo_string6:
+        .asciz  "e2"
+.Linfo_string7:
+        .asciz  "E2"
+.Linfo_string8:
+        .asciz  "_start"
+.Linfo_string9:
+        .asciz  "f"
+.Linfo_string10:
+        .asciz  "v1"
+.Linfo_string11:
+        .asciz  "v2"
+        .section        .debug_str_offsets,"",@progbits
+        .long   .Linfo_string0
+        .long   .Linfo_string1
+        .long   .Linfo_string2
+        .long   .Linfo_string3
+        .long   .Linfo_string4
+        .long   .Linfo_string5
+        .long   .Linfo_string6
+        .long   .Linfo_string7
+        .long   .Linfo_string8
+        .long   .Linfo_string9
+        .long   .Linfo_string10
+        .long   .Linfo_string11
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   65                      # DW_TAG_type_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   19                      # DW_AT_language
+        .byte   5                       # DW_FORM_data2
+        .byte   16                      # DW_AT_stmt_list
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   114                     # DW_AT_str_offsets_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   4                       # DW_TAG_enumeration_type
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   3                       # DW_AT_name
+        .byte   37                      # DW_FORM_strx1
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   58                      # DW_AT_decl_file
+        .byte   11                      # DW_FORM_data1
+        .byte   59                      # DW_AT_decl_line
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   3                       # Abbreviation Code
+        .byte   40                      # DW_TAG_enumerator
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   37                      # DW_FORM_strx1
+        .byte   28                      # DW_AT_const_value
+        .byte   15                      # DW_FORM_udata
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   4                       # Abbreviation Code
+        .byte   36                      # DW_TAG_base_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   37                      # DW_FORM_strx1
+        .byte   62                      # DW_AT_encoding
+        .byte   11                      # DW_FORM_data1
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   5                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   37                      # DW_FORM_strx1
+        .byte   19                      # DW_AT_language
+        .byte   5                       # DW_FORM_data2
+        .byte   3                       # DW_AT_name
+        .byte   37                      # DW_FORM_strx1
+        .byte   114                     # DW_AT_str_offsets_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   16                      # DW_AT_stmt_list
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   27                      # DW_AT_comp_dir
+        .byte   37                      # DW_FORM_strx1
+        .byte   17                      # DW_AT_low_pc
+        .byte   27                      # DW_FORM_addrx
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   115                     # DW_AT_addr_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   6                       # Abbreviation Code
+        .byte   4                       # DW_TAG_enumeration_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   60                      # DW_AT_declaration
+        .byte   25                      # DW_FORM_flag_present
+        .byte   105                     # DW_AT_signature
+        .byte   32                      # DW_FORM_ref_sig8
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   7                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   27                      # DW_FORM_addrx
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   64                      # DW_AT_frame_base
+        .byte   24                      # DW_FORM_exprloc
+        .byte   3                       # DW_AT_name
+        .byte   37                      # DW_FORM_strx1
+        .byte   58                      # DW_AT_decl_file
+        .byte   11                      # DW_FORM_data1
+        .byte   59                      # DW_AT_decl_line
+        .byte   11                      # DW_FORM_data1
+        .byte   63                      # DW_AT_external
+        .byte   25                      # DW_FORM_flag_present
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   8                       # Abbreviation Code
+        .byte   5                       # DW_TAG_formal_parameter
+        .byte   0                       # DW_CHILDREN_no
+        .byte   2                       # DW_AT_location
+        .byte   24                      # DW_FORM_exprloc
+        .byte   3                       # DW_AT_name
+        .byte   37                      # DW_FORM_strx1
+        .byte   58                      # DW_AT_decl_file
+        .byte   11                      # DW_FORM_data1
+        .byte   59                      # DW_AT_decl_line
+        .byte   11                      # DW_FORM_data1
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  5                       # DWARF version number
+        .byte   2                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .quad   -6180787752776176174    # Type Signature
+        .long   35                      # Type DIE Offset
+        .byte   1                       # Abbrev [1] 0x18:0x1d DW_TAG_type_unit
+        .short  4                       # DW_AT_language
+        .long   .Lline_table_start0     # DW_AT_stmt_list
+        .long   .Lstr_offsets_base0     # DW_AT_str_offsets_base
+        .byte   2                       # Abbrev [2] 0x23:0xd DW_TAG_enumeration_type
+        .long   48                      # DW_AT_type
+        .byte   5                       # DW_AT_name
+        .byte   4                       # DW_AT_byte_size
+        .byte   0                       # DW_AT_decl_file
+        .byte   1                       # DW_AT_decl_line
+        .byte   3                       # Abbrev [3] 0x2c:0x3 DW_TAG_enumerator
+        .byte   4                       # DW_AT_name
+        .byte   0                       # DW_AT_const_value
+        .byte   0                       # End Of Children Mark
+        .byte   4                       # Abbrev [4] 0x30:0x4 DW_TAG_base_type
+        .byte   3                       # DW_AT_name
+        .byte   7                       # DW_AT_encoding
+        .byte   4                       # DW_AT_byte_size
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end0:
+
+        .long   .Ldebug_info_end2-.Ldebug_info_start2 # Length of Unit
+.Ldebug_info_start2:
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   5                       # Abbrev [5] 0xc:0x4d DW_TAG_compile_unit
+        .byte   0                       # DW_AT_producer
+        .short  4                       # DW_AT_language
+        .byte   1                       # DW_AT_name
+        .long   .Lstr_offsets_base0     # DW_AT_str_offsets_base
+        .long   .Lline_table_start0     # DW_AT_stmt_list
+        .byte   2                       # DW_AT_comp_dir
+        .byte   0                       # DW_AT_low_pc
+        .long   .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
+        .long   .Laddr_table_base0      # DW_AT_addr_base
+        .byte   6                       # Abbrev [6] 0x23:0x9 DW_TAG_enumeration_type
+                                        # DW_AT_declaration
+        .quad   -6180787752776176174    # DW_AT_signature
+        .byte   6                       # Abbrev [6] 0x2c:0x9 DW_TAG_enumeration_type
+                                        # DW_AT_declaration
+        .quad   7818257750321376053     # DW_AT_signature
+        .byte   7                       # Abbrev [7] 0x35:0x23 DW_TAG_subprogram
+        .byte   0                       # DW_AT_low_pc
+        .long   .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
+        .byte   1                       # DW_AT_frame_base
+        .byte   86
+        .byte   8                       # DW_AT_name
+        .byte   0                       # DW_AT_decl_file
+        .byte   4                       # DW_AT_decl_line
+                                        # DW_AT_external
+        .byte   8                       # Abbrev [8] 0x41:0xb DW_TAG_formal_parameter
+        .byte   2                       # DW_AT_location
+        .byte   145
+        .byte   124
+        .byte   10                      # DW_AT_name
+        .byte   0                       # DW_AT_decl_file
+        .byte   4                       # DW_AT_decl_line
+        .long   35                      # DW_AT_type
+        .byte   8                       # Abbrev [8] 0x4c:0xb DW_TAG_formal_parameter
+        .byte   2                       # DW_AT_location
+        .byte   145
+        .byte   120
+        .byte   11                      # DW_AT_name
+        .byte   0                       # DW_AT_decl_file
+        .byte   4                       # DW_AT_decl_line
+        .long   44                      # DW_AT_type
+        .byte   0                       # End Of Children Mark
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end2:
+
+        .long   .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
+.Ldebug_info_start1:
+        .short  5                       # DWARF version number
+        .byte   2                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .quad   7818257750321376053     # Type Signature
+        .long   35                      # Type DIE Offset
+        .byte   1                       # Abbrev [1] 0x18:0x1d DW_TAG_type_unit
+        .short  4                       # DW_AT_language
+        .long   .Lline_table_start0     # DW_AT_stmt_list
+        .long   .Lstr_offsets_base0     # DW_AT_str_offsets_base
+        .byte   2                       # Abbrev [2] 0x23:0xd DW_TAG_enumeration_type
+        .long   48                      # DW_AT_type
+        .byte   7                       # DW_AT_name
+        .byte   4                       # DW_AT_byte_size
+        .byte   0                       # DW_AT_decl_file
+        .byte   2                       # DW_AT_decl_line
+        .byte   3                       # Abbrev [3] 0x2c:0x3 DW_TAG_enumerator
+        .byte   6                       # DW_AT_name
+        .byte   0                       # DW_AT_const_value
+        .byte   0                       # End Of Children Mark
+        .byte   4                       # Abbrev [4] 0x30:0x4 DW_TAG_base_type
+        .byte   3                       # DW_AT_name
+        .byte   7                       # DW_AT_encoding
+        .byte   4                       # DW_AT_byte_size
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end1:
+        .section        .debug_macinfo,"",@progbits
+        .byte   0                       # End Of Macro List Mark
+        .section        .debug_addr,"",@progbits
+        .long   .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
+.Ldebug_addr_start0:
+        .short  5                       # DWARF version number
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+.Laddr_table_base0:
+        .quad   .Lfunc_begin0
+.Ldebug_addr_end0:
+
+        .section        .debug_line,"",@progbits
+.Lline_table_start0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-basic.test b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-basic.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-basic.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-basic.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-dwarf5.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-dwarf5.s
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-dwarf5.s
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-dwarf5.s
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-dwo-cross-reference.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-dwo-cross-reference.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-dwo-cross-reference.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-dwo-cross-reference.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test
new file mode 100644
index 0000000..5964eea
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-expressions.test
@@ -0,0 +1,53 @@
+# UNSUPPORTED: system-darwin, system-windows
+
+# Make sure DWARF v4 type units work.
+# RUN: %clangxx_host %S/Inputs/debug-types-expressions.cpp \
+# RUN:   -g -gdwarf-4 -fdebug-types-section -o %t4
+# RUN: %lldb %t4 -s %s -o exit | FileCheck %s
+
+# Now do the same for DWARF v5.
+# RUN: %clangxx_host %S/Inputs/debug-types-expressions.cpp \
+# RUN:   -g -gdwarf-5 -fdebug-types-section -o %t5
+# RUN: %lldb %t5 -s %s -o exit | FileCheck %s
+
+# Test type units in dwo files.
+# RUN: %clangxx_host %S/Inputs/debug-types-expressions.cpp \
+# RUN:   -g -gdwarf-4 -fdebug-types-section -o %t4dwo
+# RUN: %lldb %t4dwo -s %s -o exit | FileCheck %s
+
+# And type units+dwo+dwarf5.
+# RUN: %clangxx_host %S/Inputs/debug-types-expressions.cpp \
+# RUN:   -g -gdwarf-5 -fdebug-types-section -o %t5dwo
+# RUN: %lldb %t5dwo -s %s -o exit | FileCheck %s
+
+breakpoint set -n foo
+process launch
+
+# CHECK: Process {{.*}} stopped
+
+frame variable a
+# CHECK-LABEL: frame variable a
+# CHECK: (B *) a =
+
+frame variable *a
+# CHECK-LABEL: frame variable *a
+# CHECK:      (B) *a = {
+# CHECK-NEXT:   A = (i = 47)
+# CHECK-NEXT:   j = 42
+# CHECK-NEXT: }
+
+print a->f()
+# CHECK-LABEL: print a->f()
+# CHECK: (int) $0 = 47
+
+print ns::A()
+# CHECK-LABEL: print ns::A()
+# CHECK: (ns::A) $1 = (i = 147)
+
+print ns::A().i + a->i
+# CHECK-LABEL: print ns::A().i + a->i
+# CHECK: (int) $2 = 194
+
+print ns::A().getA()
+# CHECK-LABEL: ns::A().getA()
+# CHECK: (A) $3 = (i = 146)
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-line-tables.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-line-tables.s
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-line-tables.s
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-line-tables.s
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-missing-signature.test b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-missing-signature.test
new file mode 100644
index 0000000..f9c0206
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-missing-signature.test
@@ -0,0 +1,26 @@
+Create a dangling DW_AT_signature reference by stripping the debug_types
+section, and make sure lldb does something reasonable.
+RUN: %clangxx -target x86_64-pc-linux %S/Inputs/debug-types-basic.cpp \
+RUN:   -g -gdwarf-4 -fdebug-types-section -c -o %t.o
+RUN: llvm-objcopy --remove-section=.debug_types %t.o %t
+
+
+RUN: %lldb %t -b -o "type lookup A" | FileCheck --check-prefix=LOOKUPA %s
+LOOKUPA: no type was found matching 'A'
+
+RUN: %lldb %t -b -o "type lookup E" | FileCheck --check-prefix=LOOKUPE %s
+LOOKUPE: no type was found matching 'E'
+
+RUN: %lldb %t -b -o "type lookup EC" | FileCheck --check-prefix=LOOKUPEC %s
+LOOKUPEC: no type was found matching 'EC'
+
+RUN: %lldb %t -b -o "print (E) 1" 2>&1 | FileCheck --check-prefix=PRINTE %s
+PRINTE: use of undeclared identifier 'E'
+
+RUN: %lldb %t -b -o "print (EC) 1" 2>&1 | FileCheck --check-prefix=PRINTEC %s
+PRINTEC: use of undeclared identifier 'EC'
+
+RUN: %lldb %t -b -o "target variable a e ec" | FileCheck --check-prefix=VARS %s
+VARS: (const (anonymous struct)) a = {}
+VARS: (const (anonymous enum)) e = 0x1
+VARS: (const (anonymous enum)) ec = 0x1
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-signature-loop.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-signature-loop.s
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/debug-types-signature-loop.s
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-types-signature-loop.s
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_aranges-empty-section.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_aranges-empty-section.s
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_aranges-empty-section.s
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_aranges-empty-section.s
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_line-relative_path.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_line-relative_path.s
new file mode 100644
index 0000000..8bbf30b
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_line-relative_path.s
@@ -0,0 +1,49 @@
+# This tests handling of debug info with fully relative paths, such as those
+# produced by "clang -fdebug-compilation-dir <something-relative>". This is one
+# of the techniques used to produce "relocatable" debug info.
+
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux -o %t %s
+# RUN: %lldb %t -o "image dump line-table t.c" | FileCheck %s
+
+# CHECK: 0x0000000000000000: {{q[\\/]w[\\/]e[\\/]r[\\/]t}}.c:1
+
+        .text
+main:
+        .file   1 "w/e/r" "t.c"
+        .loc    1 1 0                   # w/e/r/t.c:1:0
+        retq
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   0                       # DW_CHILDREN_no
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   16                      # DW_AT_stmt_list
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   27                      # DW_AT_comp_dir
+        .byte   8                       # DW_FORM_string
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  4                       # DWARF version number
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   8                       # Address Size (in bytes)
+        .byte   1                       # Abbrev [1] 0xb:0x40 DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .asciz  "w/e/r/t.c"             # DW_AT_name
+        .long   .Lline_table_start0     # DW_AT_stmt_list
+        .asciz  "q"                     # DW_AT_comp_dir
+.Ldebug_info_end0:
+
+        .section        .debug_line,"",@progbits
+.Lline_table_start0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loc-aslr.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loc-aslr.s
new file mode 100644
index 0000000..bdf5926
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loc-aslr.s
@@ -0,0 +1,129 @@
+# This test checks the handling of location lists in the case when the module is
+# not loaded at the address at which it was linked (as happens with ASLR for
+# instance).
+
+# REQUIRES: x86
+
+# RUN: yaml2obj %S/Inputs/debug_loc-aslr.yaml >%t.dmp
+# RUN: llvm-mc --triple=x86_64-pc-linux --filetype=obj %s >%t.o
+# RUN: %lldb -c %t.dmp -o "image add %t.o" \
+# RUN:   -o "image load --file %t.o --slide 0x470000" \
+# RUN:   -o "thread info" -o "frame variable" -o exit | FileCheck %s
+
+# CHECK: thread #1: tid = 16001, 0x0000000000470001 {{.*}}`_start
+# CHECK: (int) x = 47
+# CHECK: (int) y = 74
+
+        .text
+        .globl _start
+_start:
+        nop
+        retq
+.Lstart_end:
+
+        .section        .debug_loc,"",@progbits
+# This location list implicitly uses the base address of the compile unit.
+.Ldebug_loc0:
+        .quad   _start-_start
+        .quad   .Lstart_end-_start
+        .short  3                       # Loc expr size
+        .byte   8                       # DW_OP_const1u
+        .byte   47
+        .byte   159                     # DW_OP_stack_value
+        .quad   0
+        .quad   0
+
+# This is an equivalent location list to the first one, but here the base
+# address is set explicitly.
+.Ldebug_loc1:
+        .quad   -1
+        .quad   _start
+        .quad   _start-_start
+        .quad   .Lstart_end-_start
+        .short  3                       # Loc expr size
+        .byte   8                       # DW_OP_const1u
+        .byte   74
+        .byte   159                     # DW_OP_stack_value
+        .quad   0
+        .quad   0
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   19                      # DW_AT_language
+        .byte   5                       # DW_FORM_data2
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   4                       # Abbreviation Code
+        .byte   52                      # DW_TAG_variable
+        .byte   0                       # DW_CHILDREN_no
+        .byte   2                       # DW_AT_location
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   6                       # Abbreviation Code
+        .byte   36                      # DW_TAG_base_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   62                      # DW_AT_encoding
+        .byte   11                      # DW_FORM_data1
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  4                       # DWARF version number
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   8                       # Address Size (in bytes)
+        .byte   1                       # Abbrev [1] 0xb:0x6a DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .short  12                      # DW_AT_language
+        .quad   _start                  # DW_AT_low_pc
+        .long   .Lstart_end-_start      # DW_AT_high_pc
+        .byte   2                       # Abbrev [2] 0x2a:0x43 DW_TAG_subprogram
+        .quad   _start                  # DW_AT_low_pc
+        .long   .Lstart_end-_start      # DW_AT_high_pc
+        .asciz  "_start"                # DW_AT_name
+        .byte   4                       # Abbrev [4] 0x52:0xf DW_TAG_variable
+        .long   .Ldebug_loc0            # DW_AT_location
+        .asciz  "x"                     # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   4                       # Abbrev [4] 0x52:0xf DW_TAG_variable
+        .long   .Ldebug_loc1            # DW_AT_location
+        .asciz  "y"                     # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   0                       # End Of Children Mark
+.Lint:
+        .byte   6                       # Abbrev [6] 0x6d:0x7 DW_TAG_base_type
+        .asciz  "int"                   # DW_AT_name
+        .byte   5                       # DW_AT_encoding
+        .byte   4                       # DW_AT_byte_size
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loc.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loc.s
new file mode 100644
index 0000000..0892b5f
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loc.s
@@ -0,0 +1,247 @@
+# Test location list handling, including the cases of invalid input. The exact
+# behavior in the invalid cases is not particularly important, but it should be
+# "reasonable".
+
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s --defsym LOC=0 > %t
+# RUN: %lldb %t -o "image lookup -v -a 0" -o "image lookup -v -a 2" \
+# RUN:   -o "image dump symfile" -o exit | FileCheck %s
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s --defsym LOCLISTS=0 > %t
+# RUN: %lldb %t -o "image lookup -v -a 0" -o "image lookup -v -a 2" \
+# RUN:   -o "image dump symfile" -o exit | FileCheck %s --check-prefix=CHECK --check-prefix=LOCLISTS
+
+# CHECK-LABEL: image lookup -v -a 0
+# CHECK: Variable: {{.*}}, name = "x0", type = "int", location = DW_OP_reg5 RDI,
+# CHECK: Variable: {{.*}}, name = "x1", type = "int", location = ,
+
+# CHECK-LABEL: image lookup -v -a 2
+# CHECK: Variable: {{.*}}, name = "x0", type = "int", location = DW_OP_reg0 RAX,
+# CHECK: Variable: {{.*}}, name = "x1", type = "int", location = ,
+# CHECK: Variable: {{.*}}, name = "x3", type = "int", location = DW_OP_reg1 RDX,
+
+# CHECK-LABEL: image dump symfile
+# CHECK: CompileUnit{0x00000000}
+# CHECK:   Function{
+# CHECK:     Variable{{.*}}, name = "x0", {{.*}}, scope = parameter, location =
+# CHECK-NEXT:  [0x0000000000000000, 0x0000000000000001): DW_OP_reg5 RDI
+# CHECK-NEXT:  [0x0000000000000001, 0x0000000000000006): DW_OP_reg0 RAX
+# CHECK:     Variable{{.*}}, name = "x1", {{.*}}, scope = parameter
+# CHECK:     Variable{{.*}}, name = "x2", {{.*}}, scope = parameter, location =
+# CHECK-NEXT:  error: unexpected end of data
+# CHECK:     Variable{{.*}}, name = "x3", {{.*}}, scope = parameter, location =
+# CHECK-NEXT:  [0x0000000000000002, 0x0000000000000003): DW_OP_reg1 RDX
+# LOCLISTS:  Variable{{.*}}, name = "x4", {{.*}}, scope = parameter, location =
+# LOCLISTS-NEXT: DW_LLE_startx_length   (0x000000000000dead, 0x0000000000000001): DW_OP_reg2 RCX
+
+.ifdef LOC
+.macro OFFSET_PAIR lo hi
+        .quad \lo
+        .quad \hi
+.endm
+
+.macro BASE_ADDRESS base
+        .quad -1
+        .quad \base
+.endm
+
+.macro EXPR_SIZE sz
+        .short \sz
+.endm
+
+.macro END_OF_LIST
+        .quad 0
+        .quad 0
+.endm
+.endif
+
+.ifdef LOCLISTS
+.macro OFFSET_PAIR lo hi
+        .byte   4                       # DW_LLE_offset_pair
+        .uleb128 \lo
+        .uleb128 \hi
+.endm
+
+.macro BASE_ADDRESS base
+        .byte   6                       # DW_LLE_base_address
+        .quad \base
+.endm
+
+.macro EXPR_SIZE sz
+        .uleb128 \sz
+.endm
+
+.macro END_OF_LIST
+        .byte   0                       # DW_LLE_end_of_list
+.endm
+.endif
+
+        .type   f,@function
+f:                                      # @f
+.Lfunc_begin0:
+        nop
+.Ltmp0:
+        nop
+.Ltmp1:
+        nop
+.Ltmp2:
+        nop
+.Ltmp3:
+        nop
+.Ltmp4:
+        nop
+.Lfunc_end0:
+        .size   f, .Lfunc_end0-f
+
+        .section        .debug_str,"MS",@progbits,1
+.Linfo_string0:
+        .asciz  "Hand-written DWARF"
+.Linfo_string3:
+        .asciz  "f"
+.Linfo_string4:
+        .asciz  "int"
+
+.ifdef LOC
+        .section        .debug_loc,"",@progbits
+.endif
+.ifdef LOCLISTS
+        .section        .debug_loclists,"",@progbits
+        .long   .Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0 # Length
+.Ldebug_loclist_table_start0:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   0                       # Offset entry count
+.endif
+.Ldebug_loc0:
+        OFFSET_PAIR .Lfunc_begin0-.Lfunc_begin0, .Ltmp0-.Lfunc_begin0
+        EXPR_SIZE 1
+        .byte   85                      # super-register DW_OP_reg5
+        OFFSET_PAIR   .Ltmp0-.Lfunc_begin0, .Lfunc_end0-.Lfunc_begin0
+        EXPR_SIZE 1
+        .byte   80                      # super-register DW_OP_reg0
+        END_OF_LIST
+
+.Ldebug_loc3:
+        BASE_ADDRESS .Ltmp1
+        OFFSET_PAIR .Ltmp1-.Ltmp1, .Ltmp2-.Ltmp1
+        EXPR_SIZE 1
+        .byte   81                      # super-register DW_OP_reg1
+        END_OF_LIST
+
+.ifdef LOCLISTS
+.Ldebug_loc4:
+        .byte   3                       # DW_LLE_startx_length
+        .uleb128 0xdead
+        .uleb128 1
+        EXPR_SIZE 1
+        .byte   82                      # super-register DW_OP_reg2
+        END_OF_LIST
+.endif
+
+.Ldebug_loc2:
+        OFFSET_PAIR .Lfunc_begin0-.Lfunc_begin0, .Lfunc_end0-.Lfunc_begin0
+        EXPR_SIZE  0xdead
+.Ldebug_loclist_table_end0:
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   14                      # DW_FORM_strp
+        .byte   19                      # DW_AT_language
+        .byte   5                       # DW_FORM_data2
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   3                       # DW_AT_name
+        .byte   14                      # DW_FORM_strp
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   3                       # Abbreviation Code
+        .byte   5                       # DW_TAG_formal_parameter
+        .byte   0                       # DW_CHILDREN_no
+        .byte   2                       # DW_AT_location
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   4                       # Abbreviation Code
+        .byte   36                      # DW_TAG_base_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   14                      # DW_FORM_strp
+        .byte   62                      # DW_AT_encoding
+        .byte   11                      # DW_FORM_data1
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+.ifdef LOC
+        .short  4                       # DWARF version number
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   8                       # Address Size (in bytes)
+.endif
+.ifdef LOCLISTS
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+.endif
+        .byte   1                       # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
+        .long   .Linfo_string0          # DW_AT_producer
+        .short  12                      # DW_AT_language
+        .byte   2                       # Abbrev [2] 0x2a:0x29 DW_TAG_subprogram
+        .quad   .Lfunc_begin0           # DW_AT_low_pc
+        .long   .Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
+        .long   .Linfo_string3          # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .long   .Ldebug_loc0            # DW_AT_location
+        .asciz  "x0"                    # DW_AT_name
+        .long   .Lint-.Lcu_begin0       # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .long   0xdeadbeef              # DW_AT_location
+        .asciz  "x1"                    # DW_AT_name
+        .long   .Lint-.Lcu_begin0       # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .long   .Ldebug_loc2            # DW_AT_location
+        .asciz  "x2"                    # DW_AT_name
+        .long   .Lint-.Lcu_begin0       # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .long   .Ldebug_loc3            # DW_AT_location
+        .asciz  "x3"                    # DW_AT_name
+        .long   .Lint-.Lcu_begin0       # DW_AT_type
+.ifdef LOCLISTS
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .long   .Ldebug_loc4            # DW_AT_location
+        .asciz  "x4"                    # DW_AT_name
+        .long   .Lint-.Lcu_begin0       # DW_AT_type
+.endif
+        .byte   0                       # End Of Children Mark
+.Lint:
+        .byte   4                       # Abbrev [4] 0x53:0x7 DW_TAG_base_type
+        .long   .Linfo_string4          # DW_AT_name
+        .byte   5                       # DW_AT_encoding
+        .byte   4                       # DW_AT_byte_size
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loc_and_loclists.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loc_and_loclists.s
new file mode 100644
index 0000000..05bccbe
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loc_and_loclists.s
@@ -0,0 +1,154 @@
+# Test that we can handle DWARF 4 and 5 location lists in the same object file
+# (but different compile units).
+
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
+# RUN: %lldb %t -o "image lookup -v -s loc" -o "image lookup -v -s loclists" \
+# RUN:   -o exit | FileCheck %s
+
+
+# CHECK-LABEL: image lookup -v -s loc
+# CHECK: Variable: {{.*}}, name = "x0", type = "int", location = DW_OP_reg5 RDI,
+
+# CHECK-LABEL: image lookup -v -s loclists
+# CHECK: Variable: {{.*}}, name = "x1", type = "int", location = DW_OP_reg0 RAX,
+
+
+loc:
+        nop
+.Lloc_end:
+
+loclists:
+        nop
+.Lloclists_end:
+
+        .section        .debug_loc,"",@progbits
+.Lloc_list:
+        .quad loc-loc
+        .quad .Lloc_end-loc
+        .short 1
+        .byte   85                      # super-register DW_OP_reg5
+        .quad 0
+        .quad 0
+
+        .section        .debug_loclists,"",@progbits
+        .long   .Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0 # Length
+.Ldebug_loclist_table_start0:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   0                       # Offset entry count
+
+.Lloclists_list:
+        .byte   4                       # DW_LLE_offset_pair
+        .uleb128 loclists-loclists
+        .uleb128 .Lloclists_end-loclists
+        .uleb128 1
+        .byte   80                      # super-register DW_OP_reg0
+        .byte   0                       # DW_LLE_end_of_list
+.Ldebug_loclist_table_end0:
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   19                      # DW_AT_language
+        .byte   5                       # DW_FORM_data2
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   16                      # DW_FORM_ref_addr
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   3                       # Abbreviation Code
+        .byte   5                       # DW_TAG_formal_parameter
+        .byte   0                       # DW_CHILDREN_no
+        .byte   2                       # DW_AT_location
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   16                      # DW_FORM_ref_addr
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   4                       # Abbreviation Code
+        .byte   36                      # DW_TAG_base_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   62                      # DW_AT_encoding
+        .byte   11                      # DW_FORM_data1
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+        .long   .Lloc_cu_end-.Lloc_cu_start # Length of Unit
+.Lloc_cu_start:
+        .short  4                       # DWARF version number
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   8                       # Address Size (in bytes)
+        .byte   1                       # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .short  12                      # DW_AT_language
+        .quad   loc                     # DW_AT_low_pc
+        .long   .Lloc_end-loc           # DW_AT_high_pc
+        .byte   2                       # Abbrev [2] 0x2a:0x29 DW_TAG_subprogram
+        .quad   loc                     # DW_AT_low_pc
+        .long   .Lloc_end-loc           # DW_AT_high_pc
+        .asciz  "loc"                   # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .long   .Lloc_list              # DW_AT_location
+        .asciz  "x0"                    # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   0                       # End Of Children Mark
+.Lint:
+        .byte   4                       # Abbrev [4] 0x53:0x7 DW_TAG_base_type
+        .asciz  "int"                   # DW_AT_name
+        .byte   5                       # DW_AT_encoding
+        .byte   4                       # DW_AT_byte_size
+        .byte   0                       # End Of Children Mark
+.Lloc_cu_end:
+
+        .long   .Lloclists_cu_end-.Lloclists_cu_start # Length of Unit
+.Lloclists_cu_start:
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   1                       # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .short  12                      # DW_AT_language
+        .quad   loclists                # DW_AT_low_pc
+        .long   .Lloclists_end-loclists # DW_AT_high_pc
+        .byte   2                       # Abbrev [2] 0x2a:0x29 DW_TAG_subprogram
+        .quad   loclists                # DW_AT_low_pc
+        .long   .Lloclists_end-loclists # DW_AT_high_pc
+        .asciz  "loclists"              # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .long   .Lloclists_list         # DW_AT_location
+        .asciz  "x1"                    # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   0                       # End Of Children Mark
+        .byte   0                       # End Of Children Mark
+.Lloclists_cu_end:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loclists-dwo.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loclists-dwo.s
new file mode 100644
index 0000000..b045d7d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_loclists-dwo.s
@@ -0,0 +1,195 @@
+# REQUIRES: x86
+
+# RUN: cd %T
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s >debug_loclists-dwo.o
+# RUN: %lldb debug_loclists-dwo.o -o "image lookup -v -s lookup_loclists" -o exit | FileCheck %s
+
+# CHECK-LABEL: image lookup -v -s lookup_loclists
+# CHECK: Variable: {{.*}}, name = "x0", type = "int", location = DW_OP_reg0 RAX,
+# CHECK: Variable: {{.*}}, name = "x1", type = "int", location = DW_OP_reg1 RDX,
+
+loclists:
+        nop
+.Ltmp0:
+        nop
+.Ltmp1:
+lookup_loclists:
+        nop
+.Ltmp2:
+        nop
+.Ltmp3:
+        nop
+.Lloclists_end:
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   0                       # DW_CHILDREN_no
+        .byte   0x76                    # DW_AT_dwo_name
+        .byte   8                       # DW_FORM_string
+        .byte   115                     # DW_AT_addr_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   85                      # DW_AT_ranges
+        .byte   35                      # DW_FORM_rnglistx
+        .byte   116                     # DW_AT_rnglists_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  5                       # DWARF version number
+        .byte   4                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .quad   0xdeadbeefbaadf00d      # DWO id
+        .byte   1                       # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit
+        .asciz  "debug_loclists-dwo.o"  # DW_AT_dwo_name
+        .long   .Laddr_table_base0      # DW_AT_addr_base
+        .quad   loclists                # DW_AT_low_pc
+        .byte   0                       # DW_AT_ranges
+        .long   .Lskel_rnglists_table_base # DW_AT_rnglists_base
+.Ldebug_info_end0:
+
+        .section        .debug_rnglists,"",@progbits
+        .long   .Lskel_rnglist_table_end-.Lskel_rnglist_table_start # Length
+.Lskel_rnglist_table_start:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   1                       # Offset entry count
+.Lskel_rnglists_table_base:
+        .long   .Lskel_ranges0-.Lskel_rnglists_table_base
+.Lskel_ranges0:
+        .byte   7                       # DW_RLE_start_length
+        .quad   loclists
+        .uleb128   .Lloclists_end-loclists
+        .byte   0                       # DW_RLE_end_of_list
+.Lskel_rnglist_table_end:
+        .section        .debug_addr,"",@progbits
+        .long   .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
+.Ldebug_addr_start0:
+        .short  5                       # DWARF version number
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+.Laddr_table_base0:
+        .quad   loclists
+        .quad   .Ltmp1
+.Ldebug_addr_end0:
+
+# The presence of an extra non-dwo loclists section should not confuse us.
+# .debug_info.dwo always refers to .debug_loclists.dwo
+        .section        .debug_loclists,"",@progbits
+        .quad 0xdeadbeefbaadf00d
+
+        .section        .debug_loclists.dwo,"e",@progbits
+        .long   .Ldebug_loclist_table_end0-.Ldebug_loclist_table_start0 # Length
+.Ldebug_loclist_table_start0:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   2                       # Offset entry count
+.Lloclists_table_base:
+        .long   .Ldebug_loc0-.Lloclists_table_base
+        .long   .Ldebug_loc1-.Lloclists_table_base
+.Ldebug_loc0:
+        .byte   4                       # DW_LLE_offset_pair
+        .uleb128 loclists-loclists
+        .uleb128  .Ltmp2-loclists
+        .uleb128 1                      # Expression size
+        .byte   80                      # super-register DW_OP_reg0
+        .byte   0                       # DW_LLE_end_of_list
+.Ldebug_loc1:
+        .byte   3                       # DW_LLE_startx_length
+        .uleb128 1
+        .uleb128  .Ltmp3-.Ltmp1
+        .uleb128 1                      # Expression size
+        .byte   81                      # super-register DW_OP_reg1
+        .byte   0                       # DW_LLE_end_of_list
+.Ldebug_loclist_table_end0:
+
+        .section        .debug_abbrev.dwo,"e",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   19                      # DW_AT_language
+        .byte   5                       # DW_FORM_data2
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   27                      # DW_FORM_addrx
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   3                       # Abbreviation Code
+        .byte   5                       # DW_TAG_formal_parameter
+        .byte   0                       # DW_CHILDREN_no
+        .byte   2                       # DW_AT_location
+        .byte   0x22                    # DW_FORM_loclistx
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   4                       # Abbreviation Code
+        .byte   36                      # DW_TAG_base_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   62                      # DW_AT_encoding
+        .byte   11                      # DW_FORM_data1
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info.dwo,"e",@progbits
+.Lcu_begin1:
+        .long   .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
+.Ldebug_info_start1:
+        .short  5                       # DWARF version number
+        .byte   5                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .quad   0xdeadbeefbaadf00d      # DWO id
+        .byte   1                       # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .short  12                      # DW_AT_language
+        .byte   2                       # Abbrev [2] 0x2a:0x29 DW_TAG_subprogram
+        .byte   0                       # DW_AT_low_pc
+        .long   .Lloclists_end-loclists # DW_AT_high_pc
+        .asciz  "loclists"              # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .uleb128 0                      # DW_AT_location
+        .asciz  "x0"                    # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   3                       # Abbrev [3] DW_TAG_formal_parameter
+        .uleb128 1                      # DW_AT_location
+        .asciz  "x1"                    # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   0                       # End Of Children Mark
+.Lint:
+        .byte   4                       # Abbrev [4] 0x53:0x7 DW_TAG_base_type
+        .asciz  "int"                   # DW_AT_name
+        .byte   5                       # DW_AT_encoding
+        .byte   4                       # DW_AT_byte_size
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end1:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_ranges-missing-section.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_ranges-missing-section.s
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_ranges-missing-section.s
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_ranges-missing-section.s
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s
new file mode 100644
index 0000000..13eea1b
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_ranges.s
@@ -0,0 +1,84 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
+# RUN: %lldb %t -o "image lookup -v -s lookup_ranges" -o exit | FileCheck %s
+
+# CHECK:  Function: id = {0x7fffffff0000002b}, name = "ranges", range = [0x0000000000000000-0x0000000000000004)
+# CHECK:    Blocks: id = {0x7fffffff0000002b}, range = [0x00000000-0x00000004)
+# CHECK-NEXT:       id = {0x7fffffff0000003f}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004)
+
+        .text
+        .p2align 12
+ranges:
+        nop
+.Lblock1_begin:
+lookup_ranges:
+        nop
+.Lblock1_end:
+        nop
+.Lblock2_begin:
+        nop
+.Lblock2_end:
+.Lranges_end:
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   5                       # Abbreviation Code
+        .byte   11                      # DW_TAG_lexical_block
+        .byte   0                       # DW_CHILDREN_no
+        .byte   85                      # DW_AT_ranges
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  4                       # DWARF version number
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   8                       # Address Size (in bytes)
+        .byte   1                       # Abbrev [1] 0xb:0x7b DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .quad   ranges                  # DW_AT_low_pc
+        .long   .Lranges_end-ranges     # DW_AT_high_pc
+        .byte   2                       # Abbrev [2] 0x2a:0x4d DW_TAG_subprogram
+        .quad   ranges                  # DW_AT_low_pc
+        .long   .Lranges_end-ranges     # DW_AT_high_pc
+        .asciz  "ranges"                # DW_AT_name
+        .byte   5                       # Abbrev [5] 0x61:0x15 DW_TAG_lexical_block
+        .long   .Ldebug_ranges0         # DW_AT_ranges
+        .byte   0                       # End Of Children Mark
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end0:
+
+        .section        .debug_ranges,"",@progbits
+.Ldebug_ranges0:
+        .quad   .Lblock1_begin-ranges
+        .quad   .Lblock1_end-ranges
+        .quad   .Lblock2_begin-ranges
+        .quad   .Lblock2_end-ranges
+        .quad   0
+        .quad   0
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_ranges_and_rnglists.test b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_ranges_and_rnglists.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/debug_ranges_and_rnglists.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_ranges_and_rnglists.test
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists-dwo.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists-dwo.s
new file mode 100644
index 0000000..17ed6a7
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists-dwo.s
@@ -0,0 +1,156 @@
+# REQUIRES: x86
+
+# RUN: cd %T
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s >debug_rnglists-dwo.o
+# RUN: %lldb debug_rnglists-dwo.o -o "image lookup -v -s lookup_rnglists" \
+# RUN:   -o exit | FileCheck %s
+
+# CHECK-LABEL: image lookup -v -s lookup_rnglists
+# CHECK:  Function: id = {0x00000028}, name = "rnglists", range = [0x0000000000000000-0x0000000000000003)
+# CHECK:    Blocks: id = {0x00000028}, range = [0x00000000-0x00000003)
+# CHECK-NEXT:       id = {0x00000037}, range = [0x00000001-0x00000002)
+
+        .text
+rnglists:
+        nop
+.Lblock1_begin:
+lookup_rnglists:
+        nop
+.Lblock1_end:
+        nop
+.Lrnglists_end:
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   0                       # DW_CHILDREN_no
+        .byte   0x76                    # DW_AT_dwo_name
+        .byte   8                       # DW_FORM_string
+        .byte   115                     # DW_AT_addr_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   85                      # DW_AT_ranges
+        .byte   35                      # DW_FORM_rnglistx
+        .byte   116                     # DW_AT_rnglists_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  5                       # DWARF version number
+        .byte   4                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .quad   0xdeadbeefbaadf00d      # DWO id
+        .byte   1                       # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit
+        .asciz  "debug_rnglists-dwo.o"  # DW_AT_dwo_name
+        .long   .Laddr_table_base0      # DW_AT_addr_base
+        .byte   0                       # DW_AT_ranges
+        .long   .Lskel_rnglists_table_base # DW_AT_rnglists_base
+.Ldebug_info_end0:
+
+        .section        .debug_addr,"",@progbits
+        .long   .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
+.Ldebug_addr_start0:
+        .short  5                       # DWARF version number
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+.Laddr_table_base0:
+        .quad   rnglists
+        .quad   .Lblock1_begin
+.Ldebug_addr_end0:
+
+        .section        .debug_rnglists,"",@progbits
+        # A fake rnglists contribution so that range list bases for the skeleton
+        # and split units differ.
+        .long   .Lfake_rnglist_table_end-.Lfake_rnglist_table_start # Length
+.Lfake_rnglist_table_start:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   0                       # Offset entry count
+.Lfake_rnglists_table_base:
+.Lfake_rnglist_table_end:
+
+        .long   .Lskel_rnglist_table_end-.Lskel_rnglist_table_start # Length
+.Lskel_rnglist_table_start:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   1                       # Offset entry count
+.Lskel_rnglists_table_base:
+        .long   .Lskel_ranges0-.Lskel_rnglists_table_base
+.Lskel_ranges0:
+        .byte   7                       # DW_RLE_start_length
+        .quad   rnglists
+        .uleb128   .Lrnglists_end-rnglists
+        .byte   0                       # DW_RLE_end_of_list
+.Lskel_rnglist_table_end:
+
+        .section        .debug_abbrev.dwo,"e",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   27                      # DW_FORM_addrx
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   5                       # Abbreviation Code
+        .byte   11                      # DW_TAG_lexical_block
+        .byte   0                       # DW_CHILDREN_no
+        .byte   85                      # DW_AT_ranges
+        .byte   35                      # DW_FORM_rnglistx
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info.dwo,"e",@progbits
+.Lcu_begin1:
+        .long   .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
+.Ldebug_info_start1:
+        .short  5                       # DWARF version number
+        .byte   5                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .quad   0xdeadbeefbaadf00d      # DWO id
+        .byte   1                       # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .byte   2                       # Abbrev [2] 0x2b:0x37 DW_TAG_subprogram
+        .byte   0                       # DW_AT_low_pc
+        .long   .Lrnglists_end-rnglists # DW_AT_high_pc
+        .asciz  "rnglists"              # DW_AT_name
+        .byte   5                       # Abbrev [5] 0x52:0xf DW_TAG_lexical_block
+        .byte   0                       # DW_AT_ranges
+        .byte   0                       # End Of Children Mark
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end1:
+
+        .section        .debug_rnglists.dwo,"e",@progbits
+        .long   .Ldwo_rnglist_table_end-.Ldwo_rnglist_table_start # Length
+.Ldwo_rnglist_table_start:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   1                       # Offset entry count
+.Ldwo_rnglists_table_base:
+        .long   .Ldwo_ranges-.Ldwo_rnglists_table_base
+.Ldwo_ranges:
+        .byte   3                       # DW_RLE_startx_length
+        .uleb128 1
+        .uleb128 .Lblock1_end-.Lblock1_begin
+        .byte   0                       # DW_RLE_end_of_list
+.Ldwo_rnglist_table_end:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s
new file mode 100644
index 0000000..1d71805
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug_rnglists.s
@@ -0,0 +1,151 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
+# RUN: %lldb %t -o "image lookup -v -s lookup_rnglists" \
+# RUN:   -o "image lookup -v -s lookup_rnglists2" -o exit | FileCheck %s
+
+# CHECK-LABEL: image lookup -v -s lookup_rnglists
+# CHECK:  Function: id = {0x7fffffff00000030}, name = "rnglists", range = [0x0000000000000000-0x0000000000000004)
+# CHECK:    Blocks: id = {0x7fffffff00000030}, range = [0x00000000-0x00000004)
+# CHECK-NEXT:       id = {0x7fffffff00000046}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004)
+
+# CHECK-LABEL: image lookup -v -s lookup_rnglists2
+# CHECK:  Function: id = {0x7fffffff0000007a}, name = "rnglists2", range = [0x0000000000000004-0x0000000000000007)
+# CHECK:    Blocks: id = {0x7fffffff0000007a}, range = [0x00000004-0x00000007)
+# CHECK-NEXT:       id = {0x7fffffff00000091}, range = [0x00000005-0x00000007)
+
+        .text
+        .p2align 12
+rnglists:
+        nop
+.Lblock1_begin:
+lookup_rnglists:
+        nop
+.Lblock1_end:
+        nop
+.Lblock2_begin:
+        nop
+.Lblock2_end:
+.Lrnglists_end:
+
+rnglists2:
+        nop
+.Lblock3_begin:
+lookup_rnglists2:
+        nop
+        nop
+.Lblock3_end:
+.Lrnglists2_end:
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   116                     # DW_AT_rnglists_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   46                      # DW_TAG_subprogram
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   5                       # Abbreviation Code
+        .byte   11                      # DW_TAG_lexical_block
+        .byte   0                       # DW_CHILDREN_no
+        .byte   85                      # DW_AT_ranges
+        .byte   35                      # DW_FORM_rnglistx
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   1                       # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .quad   rnglists                # DW_AT_low_pc
+        .long   .Lrnglists_end-rnglists # DW_AT_high_pc
+        .long   .Lrnglists_table_base0  # DW_AT_rnglists_base
+        .byte   2                       # Abbrev [2] 0x2b:0x37 DW_TAG_subprogram
+        .quad   rnglists                # DW_AT_low_pc
+        .long   .Lrnglists_end-rnglists # DW_AT_high_pc
+        .asciz  "rnglists"              # DW_AT_name
+        .byte   5                       # Abbrev [5] 0x52:0xf DW_TAG_lexical_block
+        .byte   0                       # DW_AT_ranges
+        .byte   0                       # End Of Children Mark
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end0:
+
+.Lcu_begin1:
+        .long   .Ldebug_info_end1-.Ldebug_info_start1 # Length of Unit
+.Ldebug_info_start1:
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   1                       # Abbrev [1] 0xc:0x5f DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .quad   rnglists2               # DW_AT_low_pc
+        .long   .Lrnglists2_end-rnglists2 # DW_AT_high_pc
+        .long   .Lrnglists_table_base1  # DW_AT_rnglists_base
+        .byte   2                       # Abbrev [2] 0x2b:0x37 DW_TAG_subprogram
+        .quad   rnglists2               # DW_AT_low_pc
+        .long   .Lrnglists2_end-rnglists2 # DW_AT_high_pc
+        .asciz  "rnglists2"             # DW_AT_name
+        .byte   5                       # Abbrev [5] 0x52:0xf DW_TAG_lexical_block
+        .byte   0                       # DW_AT_ranges
+        .byte   0                       # End Of Children Mark
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end1:
+
+        .section        .debug_rnglists,"",@progbits
+        .long   .Ldebug_rnglist_table_end0-.Ldebug_rnglist_table_start0 # Length
+.Ldebug_rnglist_table_start0:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   1                       # Offset entry count
+.Lrnglists_table_base0:
+        .long   .Ldebug_ranges0-.Lrnglists_table_base0
+.Ldebug_ranges0:
+        .byte   4                       # DW_RLE_offset_pair
+        .uleb128 .Lblock1_begin-rnglists  #   starting offset
+        .uleb128 .Lblock1_end-rnglists    #   ending offset
+        .byte   4                       # DW_RLE_offset_pair
+        .uleb128 .Lblock2_begin-rnglists  #   starting offset
+        .uleb128 .Lblock2_end-rnglists    #   ending offset
+        .byte   0                       # DW_RLE_end_of_list
+.Ldebug_rnglist_table_end0:
+
+        .long   .Ldebug_rnglist_table_end1-.Ldebug_rnglist_table_start1 # Length
+.Ldebug_rnglist_table_start1:
+        .short  5                       # Version
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .long   1                       # Offset entry count
+.Lrnglists_table_base1:
+        .long   .Ldebug_ranges1-.Lrnglists_table_base1
+.Ldebug_ranges1:
+        .byte   4                       # DW_RLE_offset_pair
+        .uleb128 .Lblock3_begin-rnglists2 #   starting offset
+        .uleb128 .Lblock3_end-rnglists2   #   ending offset
+        .byte   0                       # DW_RLE_end_of_list
+.Ldebug_rnglist_table_end1:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
new file mode 100644
index 0000000..9e79f23
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/deterministic-build.cpp
@@ -0,0 +1,11 @@
+// Test that binaries linked deterministically (N_OSO has timestamp 0) can still
+// have their object files loaded by lldb. Note that the env var ZERO_AR_DATE
+// requires the ld64 linker, which clang invokes by default.
+// REQUIRES: system-darwin
+// RUN: %clang_host %s -g -c -o %t.o
+// RUN: ZERO_AR_DATE=1 %clang_host %t.o -g -o %t
+// RUN: %lldb %t -o "breakpoint set -f %s -l 11" -o run -o exit | FileCheck %s
+// CHECK: stop reason = breakpoint
+
+
+int main() { return 0; }
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s
new file mode 100644
index 0000000..7fee15d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-no-comp-dir-relative-name.s
@@ -0,0 +1,63 @@
+# Test that parsing of line tables works reasonably. In this case the debug info
+# does not have enough information for our heuristics to determine the path
+# style, so we will just treat them as native host paths.
+
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
+# RUN: ld.lld %t.o -o %t -z separate-code
+# RUN: %lldb %t -s %S/Inputs/dir-separator-no-comp-dir-relative-name.lldbinit -o exit | FileCheck %s
+
+# CHECK-LABEL: image dump line-table a.c
+# CHECK: Line table for foo{{.}}a.c
+# CHECK-NEXT: 0x0000000000201000: foo{{.}}a.c:1
+# CHECK-NEXT: 0x0000000000201001: foo{{.}}b.c:1
+# CHECK-NEXT: 0x0000000000201002: foo{{.}}b.c:1
+# CHECK-EMPTY:
+
+# CHECK-LABEL: breakpoint set -f a.c -l 1
+# CHECK: Breakpoint 1: {{.*}}`_start,
+
+# CHECK-LABEL: breakpoint set -f foo/b.c -l 1
+# CHECK: Breakpoint 2: {{.*}}`_start + 1,
+
+	.text
+	.globl	_start
+_start:
+	.file	1 "foo/a.c"
+	.loc	1 1 0
+        nop
+	.file	2 "foo/b.c"
+	.loc	2 1 0
+        nop
+
+	.section	.debug_str,"MS",@progbits,1
+.Linfo_string1:
+	.asciz	"foo/a.c"
+	.section	.debug_abbrev,"",@progbits
+	.byte	1                       # Abbreviation Code
+	.byte	17                      # DW_TAG_compile_unit
+	.byte	0                       # DW_CHILDREN_no
+	.byte	19                      # DW_AT_language
+	.byte	5                       # DW_FORM_data2
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	16                      # DW_AT_stmt_list
+	.byte	23                      # DW_FORM_sec_offset
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	0                       # EOM(3)
+	.section	.debug_info,"",@progbits
+.Lcu_begin0:
+	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
+.Lcu_start0:
+	.short	4                       # DWARF version number
+	.long	.debug_abbrev           # Offset Into Abbrev. Section
+	.byte	8                       # Address Size (in bytes)
+	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
+	.short	12                      # DW_AT_language
+	.long	.Linfo_string1          # DW_AT_name
+	.long	.Lline_table_start0     # DW_AT_stmt_list
+.Lcu_end0:
+	.section	.debug_line,"",@progbits
+.Lline_table_start0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-no-comp-dir.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-no-comp-dir.s
new file mode 100644
index 0000000..de6bde9
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-no-comp-dir.s
@@ -0,0 +1,62 @@
+# Test that we properly determine the path syntax of a compile unit even if the
+# compile unit does not have a DW_AT_comp_dir attribute.
+
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
+# RUN: ld.lld %t.o -o %t -z separate-code
+# RUN: %lldb %t -s %S/Inputs/dir-separator-windows.lldbinit -o exit | FileCheck %s
+
+# CHECK-LABEL: image dump line-table a.c
+# CHECK: Line table for C:\tmp\a.c
+# CHECK-NEXT: 0x0000000000201000: C:\tmp\a.c:1
+# CHECK-NEXT: 0x0000000000201001: C:\tmp\b.c:1
+# CHECK-NEXT: 0x0000000000201002: C:\tmp\b.c:1
+# CHECK-EMPTY:
+
+# CHECK-LABEL: breakpoint set -f a.c -l 1
+# CHECK: Breakpoint 1: {{.*}}`_start,
+
+# CHECK-LABEL: breakpoint set -f C:/tmp/b.c -l 1
+# CHECK: Breakpoint 2: {{.*}}`_start + 1,
+
+	.text
+	.globl	_start
+_start:
+	.file	1 "C:\\tmp\\a.c"
+	.loc	1 1 0
+        nop
+	.file	2 "C:\\tmp\\b.c"
+	.loc	2 1 0
+        nop
+
+	.section	.debug_str,"MS",@progbits,1
+.Linfo_string1:
+	.asciz	"C:\\tmp\\a.c"
+	.section	.debug_abbrev,"",@progbits
+	.byte	1                       # Abbreviation Code
+	.byte	17                      # DW_TAG_compile_unit
+	.byte	0                       # DW_CHILDREN_no
+	.byte	19                      # DW_AT_language
+	.byte	5                       # DW_FORM_data2
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	16                      # DW_AT_stmt_list
+	.byte	23                      # DW_FORM_sec_offset
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	0                       # EOM(3)
+	.section	.debug_info,"",@progbits
+.Lcu_begin0:
+	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
+.Lcu_start0:
+	.short	4                       # DWARF version number
+	.long	.debug_abbrev           # Offset Into Abbrev. Section
+	.byte	8                       # Address Size (in bytes)
+	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
+	.short	12                      # DW_AT_language
+	.long	.Linfo_string1          # DW_AT_name
+	.long	.Lline_table_start0     # DW_AT_stmt_list
+.Lcu_end0:
+	.section	.debug_line,"",@progbits
+.Lline_table_start0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-posix.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-posix.s
new file mode 100644
index 0000000..d646670
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-posix.s
@@ -0,0 +1,67 @@
+# Test that parsing of line tables works reasonably, even if the host directory
+# separator does not match the separator of the compile unit.
+
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
+# RUN: ld.lld %t.o -o %t -z separate-code
+# RUN: %lldb %t -s %S/Inputs/dir-separator-posix.lldbinit -o exit | FileCheck %s
+
+# CHECK-LABEL: image dump line-table a.c
+# CHECK: Line table for /tmp/a.c
+# CHECK-NEXT: 0x0000000000201000: /tmp/a.c:1
+# CHECK-NEXT: 0x0000000000201001: /tmp/b.c:1
+# CHECK-NEXT: 0x0000000000201002: /tmp/b.c:1
+# CHECK-EMPTY:
+
+# CHECK-LABEL: breakpoint set -f a.c -l 1
+# CHECK: Breakpoint 1: {{.*}}`_start,
+
+# CHECK-LABEL: breakpoint set -f /tmp/b.c -l 1
+# CHECK: Breakpoint 2: {{.*}}`_start + 1,
+
+	.text
+	.globl	_start
+_start:
+	.file	1 "/tmp/a.c"
+	.loc	1 1 0
+        nop
+	.file	2 "/tmp/b.c"
+	.loc	2 1 0
+        nop
+
+	.section	.debug_str,"MS",@progbits,1
+.Linfo_string1:
+	.asciz	"a.c"
+.Linfo_string2:
+	.asciz	"/tmp"
+	.section	.debug_abbrev,"",@progbits
+	.byte	1                       # Abbreviation Code
+	.byte	17                      # DW_TAG_compile_unit
+	.byte	0                       # DW_CHILDREN_no
+	.byte	19                      # DW_AT_language
+	.byte	5                       # DW_FORM_data2
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	16                      # DW_AT_stmt_list
+	.byte	23                      # DW_FORM_sec_offset
+	.byte	27                      # DW_AT_comp_dir
+	.byte	14                      # DW_FORM_strp
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	0                       # EOM(3)
+	.section	.debug_info,"",@progbits
+.Lcu_begin0:
+	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
+.Lcu_start0:
+	.short	4                       # DWARF version number
+	.long	.debug_abbrev           # Offset Into Abbrev. Section
+	.byte	8                       # Address Size (in bytes)
+	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
+	.short	12                      # DW_AT_language
+	.long	.Linfo_string1          # DW_AT_name
+	.long	.Lline_table_start0     # DW_AT_stmt_list
+	.long	.Linfo_string2          # DW_AT_comp_dir
+.Lcu_end0:
+	.section	.debug_line,"",@progbits
+.Lline_table_start0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-windows.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-windows.s
new file mode 100644
index 0000000..d640335
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dir-separator-windows.s
@@ -0,0 +1,67 @@
+# Test that parsing of line tables works reasonably, even if the host directory
+# separator does not match the separator of the compile unit.
+
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
+# RUN: ld.lld %t.o -o %t -z separate-code
+# RUN: %lldb %t -s %S/Inputs/dir-separator-windows.lldbinit -o exit | FileCheck %s
+
+# CHECK-LABEL: image dump line-table a.c
+# CHECK: Line table for C:\tmp\a.c
+# CHECK-NEXT: 0x0000000000201000: C:\tmp\a.c:1
+# CHECK-NEXT: 0x0000000000201001: C:\tmp\b.c:1
+# CHECK-NEXT: 0x0000000000201002: C:\tmp\b.c:1
+# CHECK-EMPTY:
+
+# CHECK-LABEL: breakpoint set -f a.c -l 1
+# CHECK: Breakpoint 1: {{.*}}`_start,
+
+# CHECK-LABEL: breakpoint set -f C:/tmp/b.c -l 1
+# CHECK: Breakpoint 2: {{.*}}`_start + 1,
+
+	.text
+	.globl	_start
+_start:
+	.file	1 "C:\\tmp\\a.c"
+	.loc	1 1 0
+        nop
+	.file	2 "C:\\tmp\\b.c"
+	.loc	2 1 0
+        nop
+
+	.section	.debug_str,"MS",@progbits,1
+.Linfo_string1:
+	.asciz	"a.c"
+.Linfo_string2:
+	.asciz	"C:\\tmp"
+	.section	.debug_abbrev,"",@progbits
+	.byte	1                       # Abbreviation Code
+	.byte	17                      # DW_TAG_compile_unit
+	.byte	0                       # DW_CHILDREN_no
+	.byte	19                      # DW_AT_language
+	.byte	5                       # DW_FORM_data2
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	16                      # DW_AT_stmt_list
+	.byte	23                      # DW_FORM_sec_offset
+	.byte	27                      # DW_AT_comp_dir
+	.byte	14                      # DW_FORM_strp
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	0                       # EOM(3)
+	.section	.debug_info,"",@progbits
+.Lcu_begin0:
+	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
+.Lcu_start0:
+	.short	4                       # DWARF version number
+	.long	.debug_abbrev           # Offset Into Abbrev. Section
+	.byte	8                       # Address Size (in bytes)
+	.byte	1                       # Abbrev [1] 0xb:0x1f DW_TAG_compile_unit
+	.short	12                      # DW_AT_language
+	.long	.Linfo_string1          # DW_AT_name
+	.long	.Lline_table_start0     # DW_AT_stmt_list
+	.long	.Linfo_string2          # DW_AT_comp_dir
+.Lcu_end0:
+	.section	.debug_line,"",@progbits
+.Lline_table_start0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s
new file mode 100644
index 0000000..79573a0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-atomic.s
@@ -0,0 +1,120 @@
+# REQUIRES: x86
+
+# RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s > %t
+# RUN: %lldb %t -o "target variable integer structure" -o exit | FileCheck %s
+
+# CHECK: (_Atomic(int)) integer = 14159
+# CHECK: (_Atomic(struct_type)) structure = (member = 71828)
+
+        .data
+integer:
+        .long 14159
+structure:
+        .long 71828
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   19                      # DW_AT_language
+        .byte   5                       # DW_FORM_data2
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   52                      # DW_TAG_variable
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   2                       # DW_AT_location
+        .byte   24                      # DW_FORM_exprloc
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   3                       # Abbreviation Code
+        .byte   71                      # DW_TAG_atomic_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   4                       # Abbreviation Code
+        .byte   36                      # DW_TAG_base_type
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   62                      # DW_AT_encoding
+        .byte   11                      # DW_FORM_data1
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   5                       # Abbreviation Code
+        .byte   19                      # DW_TAG_structure_type
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   11                      # DW_AT_byte_size
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   6                       # Abbreviation Code
+        .byte   13                      # DW_TAG_member
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   73                      # DW_AT_type
+        .byte   19                      # DW_FORM_ref4
+        .byte   56                      # DW_AT_data_member_location
+        .byte   11                      # DW_FORM_data1
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   1                       # Abbrev [1] 0xb:0x50 DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .short  12                      # DW_AT_language
+        .byte   2                       # Abbrev [2] DW_TAG_variable
+        .asciz  "integer"               # DW_AT_name
+        .long   .Latomic_int            # DW_AT_type
+        .byte   9                       # DW_AT_location
+        .byte   3
+        .quad   integer
+        .byte   2                       # Abbrev [2] DW_TAG_variable
+        .asciz  "structure"             # DW_AT_name
+        .long   .Latomic_struct         # DW_AT_type
+        .byte   9                       # DW_AT_location
+        .byte   3
+        .quad   structure
+.Latomic_int:
+        .byte   3                       # Abbrev [3] DW_TAG_atomic_type
+        .long   .Lint                   # DW_AT_type
+.Lint:
+        .byte   4                       # Abbrev [4] 0x53:0x7 DW_TAG_base_type
+        .asciz  "int"                   # DW_AT_name
+        .byte   5                       # DW_AT_encoding
+        .byte   4                       # DW_AT_byte_size
+.Latomic_struct:
+        .byte   3                       # Abbrev [3] DW_TAG_atomic_type
+        .long   .Lstruct                # DW_AT_type
+.Lstruct:
+        .byte   5                       # Abbrev [5] DW_TAG_structure_type
+        .asciz  "struct_type"           # DW_AT_name
+        .byte   4                       # DW_AT_byte_size
+        .byte   6                       # Abbrev [6] DW_TAG_member
+        .asciz  "member"                # DW_AT_name
+        .long   .Lint                   # DW_AT_type
+        .byte   0                       # DW_AT_data_member_location
+        .byte   0                       # End Of Children Mark
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-debug_line.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-debug_line.s
new file mode 100644
index 0000000..d15f310
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-debug_line.s
@@ -0,0 +1,129 @@
+# Test handling of DWARF5 line tables. In particular, test that we handle files
+# which are present in the line table more than once.
+
+# REQUIRES: x86
+
+# RUN: llvm-mc -filetype=obj -o %t -triple x86_64-pc-linux %s
+# RUN: %lldb %t -o "source info -f file0.c" -o "source info -f file1.c" \
+# RUN:   -o "breakpoint set -f file0.c -l 42" \
+# RUN:   -o "breakpoint set -f file0.c -l 47" \
+# RUN:   -o exit | FileCheck %s
+
+# CHECK-LABEL: source info -f file0.c
+# CHECK: [0x0000000000000000-0x0000000000000001): /file0.c:42
+# CHECK-LABEL: source info -f file1.c
+# CHECK: [0x0000000000000001-0x0000000000000002): /file1.c:47
+# CHECK-LABEL: breakpoint set -f file0.c -l 42
+# CHECK: Breakpoint 1: {{.*}}`foo,
+# CHECK-LABEL: breakpoint set -f file0.c -l 47
+# CHECK: Breakpoint 2: {{.*}}`foo + 2,
+
+        .text
+        .globl  foo
+foo:
+        nop
+        nop
+        nop
+.Lfoo_end:
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   0                       # DW_CHILDREN_no
+        .byte   37                      # DW_AT_producer
+        .byte   8                       # DW_FORM_string
+        .byte   19                      # DW_AT_language
+        .byte   5                       # DW_FORM_data2
+        .byte   3                       # DW_AT_name
+        .byte   8                       # DW_FORM_string
+        .byte   16                      # DW_AT_stmt_list
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   27                      # DW_AT_comp_dir
+        .byte   8                       # DW_FORM_string
+        .byte   17                      # DW_AT_low_pc
+        .byte   1                       # DW_FORM_addr
+        .byte   18                      # DW_AT_high_pc
+        .byte   6                       # DW_FORM_data4
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+
+        .section        .debug_info,"",@progbits
+.Lcu_begin0:
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   1                       # Abbrev [1] 0xc:0x23 DW_TAG_compile_unit
+        .asciz  "Hand-written DWARF"    # DW_AT_producer
+        .short  12                      # DW_AT_language
+        .asciz  "file0.c"               # DW_AT_name
+        .long   .Lline_table_begin      # DW_AT_stmt_list
+        .asciz  "/"                     # DW_AT_comp_dir
+        .quad   foo                     # DW_AT_low_pc
+        .long   .Lfoo_end-foo           # DW_AT_high_pc
+.Ldebug_info_end0:
+
+        .section        .debug_line,"",@progbits
+.Lline_table_begin:
+        .long .Lline_end-.Lline_start
+.Lline_start:
+        .short  5                       # DWARF version number
+        .byte   8                       # Address Size (in bytes)
+        .byte   0                       # Segment Selector Size
+        .long   .Lheader_end-.Lheader_start
+.Lheader_start:
+        .byte   1                       # Minimum Instruction Length
+        .byte   1                       # Maximum Operations per Instruction
+        .byte   1                       # Default is_stmt
+        .byte   0                       # Line Base
+        .byte   0                       # Line Range
+        .byte   5                       # Opcode Base
+        .byte   0, 1, 1, 1              # Standard Opcode Lengths
+
+        # Directory table format
+        .byte   1                       # One element per directory entry
+        .byte   1                       # DW_LNCT_path
+        .byte   0x08                    # DW_FORM_string
+
+        # Directory table entries
+        .byte   1                       # 1 directory
+        .asciz  "/"
+
+        # File table format
+        .byte   2                       # 2 elements per file entry
+        .byte   1                       # DW_LNCT_path
+        .byte   0x08                    # DW_FORM_string
+        .byte   2                       # DW_LNCT_directory_index
+        .byte   0x0b                    # DW_FORM_data1
+
+        # File table entries
+        .byte   3                       # 3 files
+        .asciz  "file0.c"
+        .byte   0
+        .asciz  "file1.c"
+        .byte   0
+        .asciz  "file0.c"
+        .byte   0
+.Lheader_end:
+
+        .byte   4, 0                    # DW_LNS_set_file 0
+        .byte   0, 9, 2                 # DW_LNE_set_address
+        .quad   foo
+        .byte   3, 41                   # DW_LNS_advance_line 41
+        .byte   1                       # DW_LNS_copy
+
+        .byte   4, 1                    # DW_LNS_set_file 1
+        .byte   2, 1                    # DW_LNS_advance_pc 1
+        .byte   3, 5                    # DW_LNS_advance_line 5
+        .byte   1                       # DW_LNS_copy
+
+        .byte   4, 2                    # DW_LNS_set_file 2
+        .byte   2, 1                    # DW_LNS_advance_pc 1
+        .byte   1                       # DW_LNS_copy
+
+        .byte   2, 1                    # DW_LNS_advance_pc 1
+        .byte   0, 1, 1                 # DW_LNE_end_sequence
+.Lline_end:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dwarf5-index-is-used.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-index-is-used.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/dwarf5-index-is-used.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-index-is-used.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/dwarf5-partial-index.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-partial-index.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/dwarf5-partial-index.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5-partial-index.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5_locations.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5_locations.s
new file mode 100644
index 0000000..4093ea0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/dwarf5_locations.s
@@ -0,0 +1,68 @@
+# This tests that lldb is able to process DW_OP_addrx tags introduced in dwarf5.
+
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -g -dwarf-version=5 -triple x86_64-unknown-linux-gnu %s -filetype=obj > %t.o
+# RUN: ld.lld -m elf_x86_64 %t.o -o %t 
+# RUN: lldb-test symbols %t | FileCheck %s
+
+# CHECK: Variable{0x7fffffff00000011}, name = "color"
+# CHECK-SAME: location = DW_OP_addrx 0x0
+
+        .text
+        .section        .debug_str,"MS",@progbits,1
+.Lstr_offsets_base0:
+        .asciz  "color"
+
+        .section        .debug_str_offsets,"",@progbits
+        .long   .Lstr_offsets_base0
+
+        .section        .debug_abbrev,"",@progbits
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   114                     # DW_AT_str_offsets_base
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   2                       # Abbreviation Code
+        .byte   52                      # DW_TAG_variable
+        .byte   0                       # DW_CHILDREN_no
+        .byte   3                       # DW_AT_name
+        .byte   37                      # DW_FORM_strx1
+        .byte   63                      # DW_AT_external
+        .byte   25                      # DW_FORM_flag_present
+        .byte   2                       # DW_AT_location
+        .byte   24                      # DW_FORM_exprloc
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+        .byte   0                       # EOM(4)
+
+        .section        .debug_info,"",@progbits
+        .long   .Ldebug_info_end0-.Ldebug_info_start0 # Length of Unit
+.Ldebug_info_start0:
+        .short  5                       # DWARF version number
+        .byte   1                       # DWARF Unit Type
+        .byte   8                       # Address Size (in bytes)
+        .long   .debug_abbrev           # Offset Into Abbrev. Section
+        .byte   1                       # Abbrev [1] 0xc:0x22 DW_TAG_compile_unit
+        .long   .Lstr_offsets_base0     # DW_AT_str_offsets_base
+        .byte   2                       # Abbrev [2] 0x1e:0xb DW_TAG_variable
+        .byte   0                       # DW_AT_name
+                                        # DW_AT_external
+        .byte   2                       # DW_AT_location
+        .byte   161
+        .byte   0
+        .byte   0                       # End Of Children Mark
+.Ldebug_info_end0:
+
+        .section        .debug_addr,"",@progbits
+        .long   .Ldebug_addr_end0-.Ldebug_addr_start0 # Length of contribution
+.Ldebug_addr_start0:
+        .short  5                       # DWARF version number
+        .byte   8                       # Address size
+        .byte   0                       # Segment selector size
+        .quad   color
+.Ldebug_addr_end0:
+
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-basic-function.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-basic-function.cpp
new file mode 100644
index 0000000..a05b068
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-basic-function.cpp
@@ -0,0 +1,108 @@
+// REQUIRES: lld
+
+// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable
+// RUN: ld.lld %t.o -o %t
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \
+// RUN:   FileCheck --check-prefix=BASE %s
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
+// RUN:   FileCheck --check-prefix=METHOD %s
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
+// RUN:   FileCheck --check-prefix=FULL %s
+// RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
+// RUN:   FileCheck --check-prefix=FULL-MANGLED %s
+// RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
+// RUN:   FileCheck --check-prefix=CONTEXT %s
+// RUN: lldb-test symbols --name=not_there --find=function %t | \
+// RUN:   FileCheck --check-prefix=EMPTY %s
+//
+// RUN: %clang %s -g -c -o %t --target=x86_64-apple-macosx
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \
+// RUN:   FileCheck --check-prefix=BASE %s
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
+// RUN:   FileCheck --check-prefix=METHOD %s
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
+// RUN:   FileCheck --check-prefix=FULL-APPLE %s
+// RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
+// RUN:   FileCheck --check-prefix=FULL-MANGLED %s
+// RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
+// RUN:   FileCheck --check-prefix=CONTEXT %s
+// RUN: lldb-test symbols --name=not_there --find=function %t | \
+// RUN:   FileCheck --check-prefix=EMPTY %s
+
+// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf
+// RUN: ld.lld %t.o -o %t
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \
+// RUN:   FileCheck --check-prefix=BASE %s
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
+// RUN:   FileCheck --check-prefix=METHOD %s
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
+// RUN:   FileCheck --check-prefix=FULL %s
+// RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
+// RUN:   FileCheck --check-prefix=FULL-MANGLED %s
+// RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
+// RUN:   FileCheck --check-prefix=CONTEXT %s
+// RUN: lldb-test symbols --name=not_there --find=function %t | \
+// RUN:   FileCheck --check-prefix=EMPTY %s
+
+// BASE: Found 4 functions:
+// BASE-DAG: name = "foo()", mangled = "_Z3foov"
+// BASE-DAG: name = "foo(int)", mangled = "_Z3fooi"
+// BASE-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"
+// BASE-DAG: name = "bar::baz::foo()", mangled = "_ZN3bar3baz3fooEv"
+
+// METHOD: Found 3 functions:
+// METHOD-DAG: name = "sbar::foo()", mangled = "_ZN4sbar3fooEv"
+// METHOD-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
+// METHOD-DAG: name = "ffbar()::sbaz::foo()", mangled = "_ZZ5ffbarvEN4sbaz3fooEv"
+
+// FULL-APPLE: Found 7 functions:
+// FULL-APPLE-DAG: name = "foo()", mangled = "_Z3foov"
+// FULL-APPLE-DAG: name = "foo(int)", mangled = "_Z3fooi"
+// FULL-APPLE-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"
+// FULL-APPLE-DAG: name = "bar::baz::foo()", mangled = "_ZN3bar3baz3fooEv"
+// FULL-APPLE-DAG: name = "sbar::foo()", mangled = "_ZN4sbar3fooEv"
+// FULL-APPLE-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
+// FULL-APPLE-DAG: name = "ffbar()::sbaz::foo()", mangled = "_ZZ5ffbarvEN4sbaz3fooEv"
+
+// FULL: Found 0 functions:
+
+// FULL-MANGLED: Found 1 functions:
+// FULL-MANGLED-DAG: name = "foo(int)", mangled = "_Z3fooi"
+
+// CONTEXT: Found 1 functions:
+// CONTEXT-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"
+
+// EMPTY: Found 0 functions:
+
+void foo() {}
+void foo(int) {}
+
+namespace bar {
+int context;
+void foo() {}
+namespace baz {
+void foo() {}
+} // namespace baz
+} // namespace bar
+
+struct foo {};
+void fbar(struct foo) {}
+
+void Foo() {}
+
+struct sbar {
+  void foo();
+  static void foo(int);
+};
+void sbar::foo() {}
+void sbar::foo(int) {}
+
+void ffbar() {
+  struct sbaz {
+    void foo() {}
+  };
+  sbaz a;
+  a.foo();
+}
+
+extern "C" void _start() {}
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-basic-namespace.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-basic-namespace.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-basic-namespace.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-basic-type.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-basic-type.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-basic-type.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-basic-type.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-basic-variable.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-basic-variable.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-basic-variable.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-basic-variable.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-function-regex.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-function-regex.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-function-regex.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-function-regex.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-inline-method.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-inline-method.s
new file mode 100644
index 0000000..cfc5ef0
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-inline-method.s
@@ -0,0 +1,152 @@
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -triple x86_64-pc-linux %s -filetype=obj > %t.o
+# RUN: ld.lld %t.o -o %t -z separate-code
+# RUN: lldb-test symbols --find=function --name=inl --function-flags=method %t \
+# RUN:   | FileCheck %s
+
+# CHECK: Function: {{.*}} mangled = "_Z8externali"
+# CHECK: Blocks: {{.*}} range = [0x00201000-0x00201002)
+# CHECK-NEXT: range = [0x00201000-0x00201002), name = "inl", mangled = _ZN1S3inlEi
+
+
+# Generated via:
+#   clang -O2 -g -S
+
+# from file:
+#   int forward(int);
+#   struct S {
+#     static int inl(int a) { return forward(a); }
+#   };
+#   int external(int a) { return S::inl(a); }
+
+# and then simplified.
+
+	.text
+_Z8externali:
+.Lfunc_begin0:
+	jmp	_Z7forwardi
+.Lfunc_end0:
+
+.globl _start
+_start:
+_Z7forwardi:
+        ret
+
+	.section	.debug_str,"MS",@progbits,1
+.Linfo_string0:
+	.asciz	"clang version 7.0.0 (trunk 332830) (llvm/trunk 332835) with manual modifications"
+.Linfo_string3:
+	.asciz	"_ZN1S3inlEi"
+.Linfo_string4:
+	.asciz	"inl"
+.Linfo_string6:
+	.asciz	"S"
+.Linfo_string8:
+	.asciz	"_Z8externali"
+.Linfo_string9:
+	.asciz	"external"
+	.section	.debug_abbrev,"",@progbits
+	.byte	1                       # Abbreviation Code
+	.byte	17                      # DW_TAG_compile_unit
+	.byte	1                       # DW_CHILDREN_yes
+	.byte	37                      # DW_AT_producer
+	.byte	14                      # DW_FORM_strp
+	.byte	19                      # DW_AT_language
+	.byte	5                       # DW_FORM_data2
+	.byte	17                      # DW_AT_low_pc
+	.byte	1                       # DW_FORM_addr
+	.byte	18                      # DW_AT_high_pc
+	.byte	6                       # DW_FORM_data4
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	2                       # Abbreviation Code
+	.byte	19                      # DW_TAG_structure_type
+	.byte	1                       # DW_CHILDREN_yes
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	11                      # DW_AT_byte_size
+	.byte	11                      # DW_FORM_data1
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	3                       # Abbreviation Code
+	.byte	46                      # DW_TAG_subprogram
+	.byte	0                       # DW_CHILDREN_no
+	.byte	110                     # DW_AT_linkage_name
+	.byte	14                      # DW_FORM_strp
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	6                       # Abbreviation Code
+	.byte	46                      # DW_TAG_subprogram
+	.byte	0                       # DW_CHILDREN_no
+	.byte	71                      # DW_AT_specification
+	.byte	19                      # DW_FORM_ref4
+	.byte	32                      # DW_AT_inline
+	.byte	11                      # DW_FORM_data1
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	8                       # Abbreviation Code
+	.byte	46                      # DW_TAG_subprogram
+	.byte	1                       # DW_CHILDREN_yes
+	.byte	17                      # DW_AT_low_pc
+	.byte	1                       # DW_FORM_addr
+	.byte	18                      # DW_AT_high_pc
+	.byte	6                       # DW_FORM_data4
+	.byte	110                     # DW_AT_linkage_name
+	.byte	14                      # DW_FORM_strp
+	.byte	3                       # DW_AT_name
+	.byte	14                      # DW_FORM_strp
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	10                      # Abbreviation Code
+	.byte	29                      # DW_TAG_inlined_subroutine
+	.byte	1                       # DW_CHILDREN_yes
+	.byte	49                      # DW_AT_abstract_origin
+	.byte	19                      # DW_FORM_ref4
+	.byte	17                      # DW_AT_low_pc
+	.byte	1                       # DW_FORM_addr
+	.byte	18                      # DW_AT_high_pc
+	.byte	6                       # DW_FORM_data4
+	.byte	0                       # EOM(1)
+	.byte	0                       # EOM(2)
+	.byte	0                       # EOM(3)
+	.section	.debug_info,"",@progbits
+.Lcu_begin0:
+	.long	.Lcu_end0-.Lcu_start0   # Length of Unit
+.Lcu_start0:
+	.short	4                       # DWARF version number
+	.long	.debug_abbrev           # Offset Into Abbrev. Section
+	.byte	8                       # Address Size (in bytes)
+	.byte	1                       # Abbrev [1] 0xb:0x9e DW_TAG_compile_unit
+	.long	.Linfo_string0          # DW_AT_producer
+	.short	4                       # DW_AT_language
+	.quad	.Lfunc_begin0           # DW_AT_low_pc
+	.long	.Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
+	.byte	2                       # Abbrev [2] 0x2a:0x1f DW_TAG_structure_type
+	.long	.Linfo_string6          # DW_AT_name
+	.byte	1                       # DW_AT_byte_size
+.Linl_spec:
+	.byte	3                       # Abbrev [3] 0x33:0x15 DW_TAG_subprogram
+	.long	.Linfo_string3          # DW_AT_linkage_name
+	.long	.Linfo_string4          # DW_AT_name
+	.byte	0                       # End Of Children Mark
+.Linl_abstract:
+	.byte	6                       # Abbrev [6] 0x50:0x12 DW_TAG_subprogram
+	.long	.Linl_spec              # DW_AT_specification
+	.byte	1                       # DW_AT_inline
+.Linl_a_abstract:
+	.byte	8                       # Abbrev [8] 0x62:0x46 DW_TAG_subprogram
+	.quad	.Lfunc_begin0           # DW_AT_low_pc
+	.long	.Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
+	.long	.Linfo_string8          # DW_AT_linkage_name
+	.long	.Linfo_string9          # DW_AT_name
+	.byte	10                      # Abbrev [10] 0x8c:0x1b DW_TAG_inlined_subroutine
+	.long	.Linl_abstract          # DW_AT_abstract_origin
+	.quad	.Lfunc_begin0           # DW_AT_low_pc
+	.long	.Lfunc_end0-.Lfunc_begin0 # DW_AT_high_pc
+	.byte	0                       # End Of Children Mark
+	.byte	0                       # End Of Children Mark
+	.byte	0                       # End Of Children Mark
+.Lcu_end0:
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-method-local-struct.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-method-local-struct.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-method-local-struct.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-method-local-struct.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-method.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-method.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-qualified-variable.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-qualified-variable.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-qualified-variable.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-qualified-variable.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-type-in-function.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-type-in-function.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-type-in-function.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-type-in-function.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-variable-dwo.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-variable-dwo.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-variable-dwo.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-variable-dwo.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/find-variable-file.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/find-variable-file.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/forward-declarations.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/forward-declarations.s
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/forward-declarations.s
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/forward-declarations.s
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/gnu-style-compression.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/gnu-style-compression.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/gnu-style-compression.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/gnu-style-compression.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/inline-function-address-shared.test b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/inline-function-address-shared.test
new file mode 100644
index 0000000..5aa7759
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/inline-function-address-shared.test
@@ -0,0 +1,6 @@
+# REQUIRES: lld, x86
+; RUN: llc -mtriple x86_64-pc-linux %S/inline-function-address.ll -filetype=obj -o %t.o
+; RUN: ld.lld %t.o %t.o -o %t -shared
+; RUN: lldb-test symbols --find=function --name=foo --function-flags=full %t | FileCheck %s
+; CHECK: Function: {{.*}} "foo"
+; CHECK-NOT: Function: {{.*}} "foo"
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/inline-function-address.ll b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/inline-function-address.ll
new file mode 100644
index 0000000..fde90d2
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/inline-function-address.ll
@@ -0,0 +1,28 @@
+; REQUIRES: lld, x86
+; RUN: llc -mtriple x86_64-pc-linux %s -filetype=obj -o %t.o
+; RUN: ld.lld %t.o %t.o -o %t
+; "foo" is defined in both compilation units, but there should be only one meaningful debuginfo entry
+; RUN: lldb-test symbols --find=function --name=foo --function-flags=full %t | FileCheck %s
+; CHECK: Function: {{.*}} "foo"
+; CHECK-NOT: Function: {{.*}} "foo"
+
+$foo = comdat any
+define void @foo() comdat !dbg !6 {
+entry:
+  ret void
+}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2, isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !{}, imports: !{}, splitDebugInlining: false, nameTableKind: None)
+!1 = !DIFile(filename: "inline-function-address.h", directory: "")
+!2 = !DIFile(filename: "inline-function-address.c", directory: "")
+!3 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+!4 = !DISubroutineType(types: !{})
+!5 = !DISubprogram(name: "foo", file: !1, line: 12, type: !4, flags: DIFlagPrototyped, spFlags: 0)
+!6 = distinct !DISubprogram(name: "foo", file: !1, line: 12, type: !4, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, declaration: !5)
+
+!llvm.dbg.cu = !{!0}
+!llvm.module.flags = !{!7, !8, !9}
+!llvm.ident = !{}
+!7 = !{i32 7, !"Dwarf Version", i32 4}
+!8 = !{i32 2, !"Debug Info Version", i32 3}
+!9 = !{i32 1, !"wchar_size", i32 4}
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/lit.local.cfg b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/lit.local.cfg
new file mode 100644
index 0000000..8c4600c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/lit.local.cfg
@@ -0,0 +1 @@
+config.suffixes = ['.cpp', '.m', '.s', '.test', '.ll']
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/parallel-indexing-stress.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/parallel-indexing-stress.s
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/parallel-indexing-stress.s
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/parallel-indexing-stress.s
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/split-dwarf-inlining.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/split-dwarf-inlining.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/split-dwarf-inlining.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/split-dwarf-inlining.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/DWARF/split-dwarf-multiple-cu.ll b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/split-dwarf-multiple-cu.ll
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/DWARF/split-dwarf-multiple-cu.ll
rename to src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/split-dwarf-multiple-cu.ll
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/win-i386-line-table.s b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/win-i386-line-table.s
new file mode 100644
index 0000000..2fa5ba5
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/DWARF/win-i386-line-table.s
@@ -0,0 +1,55 @@
+# Test that lldb can read a line table for an architecture with a different
+# address size than the one that of the host.
+
+# REQUIRES: lld, x86
+
+# RUN: llvm-mc -triple i686-windows-gnu %s -filetype=obj > %t.o
+# RUN: lld-link %t.o -out:%t.exe -debug:dwarf -entry:entry -subsystem:console -lldmingw
+# RUN: %lldb %t.exe -o "image dump line-table -v win-i386-line-table.c" -b | FileCheck %s
+
+# CHECK: Line table for win-i386-line-table.c in `win-i386-line-table.s.tmp.exe
+# CHECK: 0x00401000: win-i386-line-table.c:2:1
+# CHECK: 0x00401001: win-i386-line-table.c:2:1
+
+        .text
+        .file   "win-i386-line-table.c"
+        .globl  _entry                  # -- Begin function entry
+_entry:                                 # @entry
+        .file   1 "" "win-i386-line-table.c"
+        .loc    1 1 0                   # win-i386-line-table.c:1:0
+        .cfi_sections .debug_frame
+        .cfi_startproc
+        .loc    1 2 1 prologue_end      # win-i386-line-table.c:2:1
+        retl
+        .cfi_endproc
+                                        # -- End function
+        .section        .debug_str,"dr"
+Linfo_string1:
+        .asciz  "win-i386-line-table.c"
+        .section        .debug_abbrev,"dr"
+Lsection_abbrev:
+        .byte   1                       # Abbreviation Code
+        .byte   17                      # DW_TAG_compile_unit
+        .byte   1                       # DW_CHILDREN_yes
+        .byte   3                       # DW_AT_name
+        .byte   14                      # DW_FORM_strp
+        .byte   16                      # DW_AT_stmt_list
+        .byte   23                      # DW_FORM_sec_offset
+        .byte   0                       # EOM(1)
+        .byte   0                       # EOM(2)
+        .byte   0                       # EOM(3)
+        .section        .debug_info,"dr"
+Lsection_info:
+Lcu_begin0:
+        .long   Ldebug_info_end0-Ldebug_info_start0 # Length of Unit
+Ldebug_info_start0:
+        .short  4                       # DWARF version number
+        .secrel32       Lsection_abbrev # Offset Into Abbrev. Section
+        .byte   4                       # Address Size (in bytes)
+        .byte   1                       # Abbrev [1] 0xb:0x2d DW_TAG_compile_unit
+        .secrel32       Linfo_string1   # DW_AT_name
+        .secrel32       Lline_table_start0 # DW_AT_stmt_list
+        .byte   0                       # End Of Children Mark
+Ldebug_info_end0:
+        .section        .debug_line,"dr"
+Lline_table_start0:
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/Inputs/symbol-binding.s b/src/llvm-project/lldb/test/Shell/SymbolFile/Inputs/symbol-binding.s
new file mode 100644
index 0000000..b797684
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/Inputs/symbol-binding.s
@@ -0,0 +1,22 @@
+        .text
+        .byte   0
+sizeless:
+sizeful:
+        .byte   0
+        .byte   0
+sizeend:
+        .size   sizeful, sizeend - sizeful
+        .byte   0
+case1_local:
+case1_global:
+        .globl  case1_global
+        .byte   0
+case2_local:
+case2_weak:
+        .weak   case2_weak
+        .byte   0
+case3_weak:
+        .weak   case3_weak
+case3_global:
+        .globl  case3_global
+        .byte   0
diff --git a/src/llvm-project/lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c b/src/llvm-project/lldb/test/Shell/SymbolFile/Inputs/target-symbols-add-unwind.c
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/Inputs/target-symbols-add-unwind.c
rename to src/llvm-project/lldb/test/Shell/SymbolFile/Inputs/target-symbols-add-unwind.c
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/ast-functions.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-functions.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/ast-functions.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-functions.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/ast-methods.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-methods.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/ast-methods.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-methods.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/ast-types.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-types.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/ast-types.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/ast-types.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/bitfields.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/bitfields.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/bitfields.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/bitfields.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-function.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/break-by-line.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/disassembly.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/disassembly.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/disassembly.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/disassembly.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/function-types-builtins.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-builtins.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/function-types-builtins.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-builtins.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/function-types-calling-conv.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-calling-conv.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/function-types-calling-conv.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-calling-conv.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/function-types-classes.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-classes.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/function-types-classes.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/function-types-classes.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-bss.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/globals-classes.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-classes.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/globals-classes.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-classes.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/globals-fundamental.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-fundamental.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/globals-fundamental.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/globals-fundamental.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/local-variables.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/nested-types.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/nested-types.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/nested-types.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/nested-types.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/s_constant.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/s_constant.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.lldbinit
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.s b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.s
new file mode 100644
index 0000000..6eaa80c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/s_constant.s
@@ -0,0 +1,971 @@
+	.text
+	.def	 @feat.00;
+	.scl	3;
+	.type	0;
+	.endef
+	.globl	@feat.00
+.set @feat.00, 0
+	.intel_syntax noprefix
+	.def	 main;
+	.scl	2;
+	.type	32;
+	.endef
+	.globl	main                    # -- Begin function main
+	.p2align	4, 0x90
+main:                                   # @main
+.Lfunc_begin0:
+	.cv_func_id 0
+	.cv_file	1 "D:\\src\\llvm-mono\\lldb\\lit\\SymbolFile\\NativePDB\\s_constant.cpp" "7F1DA683A9B72A1360C1FDEDD7550E06" 1
+	.cv_loc	0 1 79 0                # D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp:79:0
+.seh_proc main
+# %bb.0:                                # %entry
+	sub	rsp, 24
+	.seh_stackalloc 24
+	.seh_endprologue
+	xor	eax, eax
+	mov	dword ptr [rsp + 20], 0
+	mov	qword ptr [rsp + 8], rdx
+	mov	dword ptr [rsp + 4], ecx
+.Ltmp0:
+	.cv_loc	0 1 80 0                # D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp:80:0
+	add	rsp, 24
+	ret
+.Ltmp1:
+.Lfunc_end0:
+	.seh_handlerdata
+	.text
+	.seh_endproc
+                                        # -- End function
+	.section	.rdata,"dr"
+	.p2align	3               # @GlobalLUEA
+GlobalLUEA:
+	.quad	0                       # 0x0
+
+	.p2align	3               # @GlobalLUEB
+GlobalLUEB:
+	.quad	1000                    # 0x3e8
+
+	.p2align	3               # @GlobalLUEC
+GlobalLUEC:
+	.quad	-16                     # 0xfffffffffffffff0
+
+	.p2align	3               # @GlobalLSEA
+GlobalLSEA:
+	.quad	0                       # 0x0
+
+	.p2align	3               # @GlobalLSEB
+GlobalLSEB:
+	.quad	9223372036854775000     # 0x7ffffffffffffcd8
+
+	.p2align	3               # @GlobalLSEC
+GlobalLSEC:
+	.quad	-9223372036854775000    # 0x8000000000000328
+
+	.p2align	2               # @GlobalUEA
+GlobalUEA:
+	.long	0                       # 0x0
+
+	.p2align	2               # @GlobalUEB
+GlobalUEB:
+	.long	1000                    # 0x3e8
+
+	.p2align	2               # @GlobalUEC
+GlobalUEC:
+	.long	4294000000              # 0xfff13d80
+
+	.p2align	2               # @GlobalSEA
+GlobalSEA:
+	.long	0                       # 0x0
+
+	.p2align	2               # @GlobalSEB
+GlobalSEB:
+	.long	2147000000              # 0x7ff89ec0
+
+	.p2align	2               # @GlobalSEC
+GlobalSEC:
+	.long	2147967296              # 0x80076140
+
+GlobalSUEA:                             # @GlobalSUEA
+	.byte	0                       # 0x0
+
+GlobalSUEB:                             # @GlobalSUEB
+	.byte	100                     # 0x64
+
+GlobalSUEC:                             # @GlobalSUEC
+	.byte	200                     # 0xc8
+
+GlobalSSEA:                             # @GlobalSSEA
+	.byte	0                       # 0x0
+
+GlobalSSEB:                             # @GlobalSSEB
+	.byte	100                     # 0x64
+
+GlobalSSEC:                             # @GlobalSSEC
+	.byte	156                     # 0x9c
+
+	.section	.drectve,"yn"
+	.ascii	" /DEFAULTLIB:libcmt.lib"
+	.ascii	" /DEFAULTLIB:oldnames.lib"
+	.section	.debug$S,"dr"
+	.p2align	2
+	.long	4                       # Debug section magic
+	.long	241
+	.long	.Ltmp3-.Ltmp2           # Subsection size
+.Ltmp2:
+	.short	.Ltmp5-.Ltmp4           # Record length
+.Ltmp4:
+	.short	4412                    # Record kind: S_COMPILE3
+	.long	1                       # Flags and language
+	.short	208                     # CPUType
+	.short	8                       # Frontend version
+	.short	0
+	.short	0
+	.short	0
+	.short	8000                    # Backend version
+	.short	0
+	.short	0
+	.short	0
+	.asciz	"clang version 8.0.0 "  # Null-terminated compiler version string
+.Ltmp5:
+.Ltmp3:
+	.p2align	2
+	.long	241                     # Symbol subsection for main
+	.long	.Ltmp7-.Ltmp6           # Subsection size
+.Ltmp6:
+	.short	.Ltmp9-.Ltmp8           # Record length
+.Ltmp8:
+	.short	4423                    # Record kind: S_GPROC32_ID
+	.long	0                       # PtrParent
+	.long	0                       # PtrEnd
+	.long	0                       # PtrNext
+	.long	.Lfunc_end0-main        # Code size
+	.long	0                       # Offset after prologue
+	.long	0                       # Offset before epilogue
+	.long	4099                    # Function type index
+	.secrel32	main            # Function section relative address
+	.secidx	main                    # Function section index
+	.byte	0                       # Flags
+	.asciz	"main"                  # Function name
+.Ltmp9:
+	.short	.Ltmp11-.Ltmp10         # Record length
+.Ltmp10:
+	.short	4114                    # Record kind: S_FRAMEPROC
+	.long	24                      # FrameSize
+	.long	0                       # Padding
+	.long	0                       # Offset of padding
+	.long	0                       # Bytes of callee saved registers
+	.long	0                       # Exception handler offset
+	.short	0                       # Exception handler section
+	.long	81920                   # Flags (defines frame register)
+.Ltmp11:
+	.short	.Ltmp13-.Ltmp12         # Record length
+.Ltmp12:
+	.short	4414                    # Record kind: S_LOCAL
+	.long	116                     # TypeIndex
+	.short	1                       # Flags
+	.asciz	"argc"
+.Ltmp13:
+	.cv_def_range	 .Ltmp0 .Ltmp1, frame_ptr_rel, 4
+	.short	.Ltmp15-.Ltmp14         # Record length
+.Ltmp14:
+	.short	4414                    # Record kind: S_LOCAL
+	.long	4096                    # TypeIndex
+	.short	1                       # Flags
+	.asciz	"argv"
+.Ltmp15:
+	.cv_def_range	 .Ltmp0 .Ltmp1, frame_ptr_rel, 8
+	.short	2                       # Record length
+	.short	4431                    # Record kind: S_PROC_ID_END
+.Ltmp7:
+	.p2align	2
+	.cv_linetable	0, main, .Lfunc_end0
+	.long	241                     # Symbol subsection for globals
+	.long	.Ltmp17-.Ltmp16         # Subsection size
+.Ltmp16:
+	.short	.Ltmp19-.Ltmp18         # Record length
+.Ltmp18:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4104                    # Type
+	.short  0					    # Value
+	.asciz	"GlobalLUEA"            # Name
+.Ltmp19:
+	.short	.Ltmp21-.Ltmp20         # Record length
+.Ltmp20:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4104                    # Type
+	.short  1000				    # Value
+	.asciz	"GlobalLUEB"            # Name
+.Ltmp21:
+	.short	.Ltmp23-.Ltmp22         # Record length
+.Ltmp22:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4104                    # Type
+	.byte   0x00, 0x80, 0xf0		# Value
+	.asciz	"GlobalLUEC"            # Name
+.Ltmp23:
+	.short	.Ltmp25-.Ltmp24         # Record length
+.Ltmp24:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4108                    # Type
+	.byte   0x00, 0x00				# Value
+	.asciz	"GlobalLSEA"            # Name
+.Ltmp25:
+	.short	.Ltmp27-.Ltmp26         # Record length
+.Ltmp26:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4108                    # Type
+	.byte   0x0A, 0x80, 0xD8, 0xFC  # Value
+	.byte   0xFF, 0xFF, 0xFF, 0xFF
+	.byte   0xFF, 0x7F
+	.asciz	"GlobalLSEB"            # Name
+.Ltmp27:
+	.short	.Ltmp29-.Ltmp28         # Record length
+.Ltmp28:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4108                    # Type
+	.byte   0x09, 0x80, 0x28, 0x03  # Value
+	.byte   0x00, 0x00, 0x00, 0x00
+	.byte   0x00, 0x80
+	.asciz	"GlobalLSEC"            # Name
+.Ltmp29:
+	.short	.Ltmp31-.Ltmp30         # Record length
+.Ltmp30:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4112                    # Type
+	.byte   0x00, 0x00              # Value
+	.asciz	"GlobalUEA"             # Name
+.Ltmp31:
+	.short	.Ltmp33-.Ltmp32         # Record length
+.Ltmp32:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4112                    # Type
+	.byte   0xe8, 0x03              # Value
+	.asciz	"GlobalUEB"             # Name
+.Ltmp33:
+	.short	.Ltmp35-.Ltmp34         # Record length
+.Ltmp34:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4112                    # Type
+	.byte   0x04, 0x80, 0x80, 0x3d  # Value
+	.byte   0xf1, 0xff
+	.asciz	"GlobalUEC"             # Name
+.Ltmp35:
+	.short	.Ltmp37-.Ltmp36         # Record length
+.Ltmp36:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4116                    # Type
+	.byte   0x00, 0x00              # Value
+	.asciz	"GlobalSEA"             # Name
+.Ltmp37:
+	.short	.Ltmp39-.Ltmp38         # Record length
+.Ltmp38:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4116                    # Type
+	.byte   0x04, 0x80, 0xc0, 0x9e  # Value
+	.byte   0xf8, 0x7f
+	.asciz	"GlobalSEB"             # Name
+.Ltmp39:
+	.short	.Ltmp41-.Ltmp40         # Record length
+.Ltmp40:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4116                    # Type
+	.byte   0x03, 0x80, 0x40, 0x61  # Value
+	.byte   0x07, 0x80
+	.asciz	"GlobalSEC"             # Name
+.Ltmp41:
+	.short	.Ltmp43-.Ltmp42         # Record length
+.Ltmp42:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4120                    # Type
+	.byte   0x00, 0x00              # Value
+	.asciz	"GlobalSUEA"            # Name
+.Ltmp43:
+	.short	.Ltmp45-.Ltmp44         # Record length
+.Ltmp44:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4120                    # Type
+	.byte   0x64, 0x00              # Value
+	.asciz	"GlobalSUEB"            # Name
+.Ltmp45:
+	.short	.Ltmp47-.Ltmp46         # Record length
+.Ltmp46:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4120                    # Type
+	.byte   0xc8, 0x00              # Value
+	.asciz	"GlobalSUEC"            # Name
+.Ltmp47:
+	.short	.Ltmp49-.Ltmp48         # Record length
+.Ltmp48:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4124                    # Type
+	.byte   0x00, 0x00              # Value
+	.asciz	"GlobalSSEA"            # Name
+.Ltmp49:
+	.short	.Ltmp51-.Ltmp50         # Record length
+.Ltmp50:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4124                    # Type
+	.byte   0x64, 0x00              # Value
+	.asciz	"GlobalSSEB"            # Name
+.Ltmp51:
+	.short	.Ltmp53-.Ltmp52         # Record length
+.Ltmp52:
+	.short	4359                    # Record kind: S_CONSTANT
+	.long	4124                    # Type
+	.byte   0x00, 0x80, 0x9c        # Value
+	.asciz	"GlobalSSEC"            # Name
+.Ltmp53:
+.Ltmp17:
+	.p2align	2
+	.cv_filechecksums               # File index to string table offset subsection
+	.cv_stringtable                 # String table
+	.long	241
+	.long	.Ltmp55-.Ltmp54         # Subsection size
+.Ltmp54:
+	.short	6                       # Record length
+	.short	4428                    # Record kind: S_BUILDINFO
+	.long	4127                    # LF_BUILDINFO index
+.Ltmp55:
+	.p2align	2
+	.section	.debug$T,"dr"
+	.p2align	2
+	.long	4                       # Debug section magic
+	# Pointer (0x1000) {
+	#   TypeLeafKind: LF_POINTER (0x1002)
+	#   PointeeType: char* (0x670)
+	#   PointerAttributes: 0x1000C
+	#   PtrType: Near64 (0xC)
+	#   PtrMode: Pointer (0x0)
+	#   IsFlat: 0
+	#   IsConst: 0
+	#   IsVolatile: 0
+	#   IsUnaligned: 0
+	#   IsRestrict: 0
+	#   SizeOf: 8
+	# }
+	.byte	0x0a, 0x00, 0x02, 0x10
+	.byte	0x70, 0x06, 0x00, 0x00
+	.byte	0x0c, 0x00, 0x01, 0x00
+	# ArgList (0x1001) {
+	#   TypeLeafKind: LF_ARGLIST (0x1201)
+	#   NumArgs: 2
+	#   Arguments [
+	#     ArgType: int (0x74)
+	#     ArgType: char** (0x1000)
+	#   ]
+	# }
+	.byte	0x0e, 0x00, 0x01, 0x12
+	.byte	0x02, 0x00, 0x00, 0x00
+	.byte	0x74, 0x00, 0x00, 0x00
+	.byte	0x00, 0x10, 0x00, 0x00
+	# Procedure (0x1002) {
+	#   TypeLeafKind: LF_PROCEDURE (0x1008)
+	#   ReturnType: int (0x74)
+	#   CallingConvention: NearC (0x0)
+	#   FunctionOptions [ (0x0)
+	#   ]
+	#   NumParameters: 2
+	#   ArgListType: (int, char**) (0x1001)
+	# }
+	.byte	0x0e, 0x00, 0x08, 0x10
+	.byte	0x74, 0x00, 0x00, 0x00
+	.byte	0x00, 0x00, 0x02, 0x00
+	.byte	0x01, 0x10, 0x00, 0x00
+	# FuncId (0x1003) {
+	#   TypeLeafKind: LF_FUNC_ID (0x1601)
+	#   ParentScope: 0x0
+	#   FunctionType: int (int, char**) (0x1002)
+	#   Name: main
+	# }
+	.byte	0x12, 0x00, 0x01, 0x16
+	.byte	0x00, 0x00, 0x00, 0x00
+	.byte	0x02, 0x10, 0x00, 0x00
+	.byte	0x6d, 0x61, 0x69, 0x6e
+	.byte	0x00, 0xf3, 0xf2, 0xf1
+	# FieldList (0x1004) {
+	#   TypeLeafKind: LF_FIELDLIST (0x1203)
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 0
+	#     Name: LUE_A
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 1000
+	#     Name: LUE_B
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 18446744073709551600
+	#     Name: LUE_C
+	#   }
+	# }
+	.byte	0x2e, 0x00, 0x03, 0x12
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x00, 0x00, 0x4c, 0x55
+	.byte	0x45, 0x5f, 0x41, 0x00
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0xe8, 0x03, 0x4c, 0x55
+	.byte	0x45, 0x5f, 0x42, 0x00
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x0a, 0x80, 0xf0, 0xff
+	.byte	0xff, 0xff, 0xff, 0xff
+	.byte	0xff, 0xff, 0x4c, 0x55
+	.byte	0x45, 0x5f, 0x43, 0x00
+	# Enum (0x1005) {
+	#   TypeLeafKind: LF_ENUM (0x1507)
+	#   NumEnumerators: 3
+	#   Properties [ (0x200)
+	#     HasUniqueName (0x200)
+	#   ]
+	#   UnderlyingType: unsigned __int64 (0x23)
+	#   FieldListType: <field list> (0x1004)
+	#   Name: A::B::C::LargeUnsignedEnum
+	#   LinkageName: .?AW4LargeUnsignedEnum@C@B@A@@
+	# }
+	.byte	0x4a, 0x00, 0x07, 0x15
+	.byte	0x03, 0x00, 0x00, 0x02
+	.byte	0x23, 0x00, 0x00, 0x00
+	.byte	0x04, 0x10, 0x00, 0x00
+	.byte	0x41, 0x3a, 0x3a, 0x42
+	.byte	0x3a, 0x3a, 0x43, 0x3a
+	.byte	0x3a, 0x4c, 0x61, 0x72
+	.byte	0x67, 0x65, 0x55, 0x6e
+	.byte	0x73, 0x69, 0x67, 0x6e
+	.byte	0x65, 0x64, 0x45, 0x6e
+	.byte	0x75, 0x6d, 0x00, 0x2e
+	.byte	0x3f, 0x41, 0x57, 0x34
+	.byte	0x4c, 0x61, 0x72, 0x67
+	.byte	0x65, 0x55, 0x6e, 0x73
+	.byte	0x69, 0x67, 0x6e, 0x65
+	.byte	0x64, 0x45, 0x6e, 0x75
+	.byte	0x6d, 0x40, 0x43, 0x40
+	.byte	0x42, 0x40, 0x41, 0x40
+	.byte	0x40, 0x00, 0xf2, 0xf1
+	# StringId (0x1006) {
+	#   TypeLeafKind: LF_STRING_ID (0x1605)
+	#   Id: 0x0
+	#   StringData: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp
+	# }
+	.byte	0x46, 0x00, 0x05, 0x16
+	.byte	0x00, 0x00, 0x00, 0x00
+	.byte	0x44, 0x3a, 0x5c, 0x73
+	.byte	0x72, 0x63, 0x5c, 0x6c
+	.byte	0x6c, 0x76, 0x6d, 0x2d
+	.byte	0x6d, 0x6f, 0x6e, 0x6f
+	.byte	0x5c, 0x6c, 0x6c, 0x64
+	.byte	0x62, 0x5c, 0x6c, 0x69
+	.byte	0x74, 0x5c, 0x53, 0x79
+	.byte	0x6d, 0x62, 0x6f, 0x6c
+	.byte	0x46, 0x69, 0x6c, 0x65
+	.byte	0x5c, 0x4e, 0x61, 0x74
+	.byte	0x69, 0x76, 0x65, 0x50
+	.byte	0x44, 0x42, 0x5c, 0x73
+	.byte	0x5f, 0x63, 0x6f, 0x6e
+	.byte	0x73, 0x74, 0x61, 0x6e
+	.byte	0x74, 0x2e, 0x63, 0x70
+	.byte	0x70, 0x00, 0xf2, 0xf1
+	# UdtSourceLine (0x1007) {
+	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+	#   UDT: A::B::C::LargeUnsignedEnum (0x1005)
+	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+	#   LineNumber: 14
+	# }
+	.byte	0x0e, 0x00, 0x06, 0x16
+	.byte	0x05, 0x10, 0x00, 0x00
+	.byte	0x06, 0x10, 0x00, 0x00
+	.byte	0x0e, 0x00, 0x00, 0x00
+	# Modifier (0x1008) {
+	#   TypeLeafKind: LF_MODIFIER (0x1001)
+	#   ModifiedType: A::B::C::LargeUnsignedEnum (0x1005)
+	#   Modifiers [ (0x1)
+	#     Const (0x1)
+	#   ]
+	# }
+	.byte	0x0a, 0x00, 0x01, 0x10
+	.byte	0x05, 0x10, 0x00, 0x00
+	.byte	0x01, 0x00, 0xf2, 0xf1
+	# FieldList (0x1009) {
+	#   TypeLeafKind: LF_FIELDLIST (0x1203)
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 0
+	#     Name: LSE_A
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 9223372036854775000
+	#     Name: LSE_B
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 9223372036854776616
+	#     Name: LSE_C
+	#   }
+	# }
+	.byte	0x36, 0x00, 0x03, 0x12
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x00, 0x00, 0x4c, 0x53
+	.byte	0x45, 0x5f, 0x41, 0x00
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x0a, 0x80, 0xd8, 0xfc
+	.byte	0xff, 0xff, 0xff, 0xff
+	.byte	0xff, 0x7f, 0x4c, 0x53
+	.byte	0x45, 0x5f, 0x42, 0x00
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x0a, 0x80, 0x28, 0x03
+	.byte	0x00, 0x00, 0x00, 0x00
+	.byte	0x00, 0x80, 0x4c, 0x53
+	.byte	0x45, 0x5f, 0x43, 0x00
+	# Enum (0x100A) {
+	#   TypeLeafKind: LF_ENUM (0x1507)
+	#   NumEnumerators: 3
+	#   Properties [ (0x200)
+	#     HasUniqueName (0x200)
+	#   ]
+	#   UnderlyingType: __int64 (0x13)
+	#   FieldListType: <field list> (0x1009)
+	#   Name: A::B::C::LargeSignedEnum
+	#   LinkageName: .?AW4LargeSignedEnum@C@B@A@@
+	# }
+	.byte	0x46, 0x00, 0x07, 0x15
+	.byte	0x03, 0x00, 0x00, 0x02
+	.byte	0x13, 0x00, 0x00, 0x00
+	.byte	0x09, 0x10, 0x00, 0x00
+	.byte	0x41, 0x3a, 0x3a, 0x42
+	.byte	0x3a, 0x3a, 0x43, 0x3a
+	.byte	0x3a, 0x4c, 0x61, 0x72
+	.byte	0x67, 0x65, 0x53, 0x69
+	.byte	0x67, 0x6e, 0x65, 0x64
+	.byte	0x45, 0x6e, 0x75, 0x6d
+	.byte	0x00, 0x2e, 0x3f, 0x41
+	.byte	0x57, 0x34, 0x4c, 0x61
+	.byte	0x72, 0x67, 0x65, 0x53
+	.byte	0x69, 0x67, 0x6e, 0x65
+	.byte	0x64, 0x45, 0x6e, 0x75
+	.byte	0x6d, 0x40, 0x43, 0x40
+	.byte	0x42, 0x40, 0x41, 0x40
+	.byte	0x40, 0x00, 0xf2, 0xf1
+	# UdtSourceLine (0x100B) {
+	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+	#   UDT: A::B::C::LargeSignedEnum (0x100A)
+	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+	#   LineNumber: 20
+	# }
+	.byte	0x0e, 0x00, 0x06, 0x16
+	.byte	0x0a, 0x10, 0x00, 0x00
+	.byte	0x06, 0x10, 0x00, 0x00
+	.byte	0x14, 0x00, 0x00, 0x00
+	# Modifier (0x100C) {
+	#   TypeLeafKind: LF_MODIFIER (0x1001)
+	#   ModifiedType: A::B::C::LargeSignedEnum (0x100A)
+	#   Modifiers [ (0x1)
+	#     Const (0x1)
+	#   ]
+	# }
+	.byte	0x0a, 0x00, 0x01, 0x10
+	.byte	0x0a, 0x10, 0x00, 0x00
+	.byte	0x01, 0x00, 0xf2, 0xf1
+	# FieldList (0x100D) {
+	#   TypeLeafKind: LF_FIELDLIST (0x1203)
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 0
+	#     Name: UE_A
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 1000
+	#     Name: UE_B
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 4294000000
+	#     Name: UE_C
+	#   }
+	# }
+	.byte	0x2a, 0x00, 0x03, 0x12
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x00, 0x00, 0x55, 0x45
+	.byte	0x5f, 0x41, 0x00, 0xf1
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0xe8, 0x03, 0x55, 0x45
+	.byte	0x5f, 0x42, 0x00, 0xf1
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x04, 0x80, 0x80, 0x3d
+	.byte	0xf1, 0xff, 0x55, 0x45
+	.byte	0x5f, 0x43, 0x00, 0xf1
+	# Enum (0x100E) {
+	#   TypeLeafKind: LF_ENUM (0x1507)
+	#   NumEnumerators: 3
+	#   Properties [ (0x200)
+	#     HasUniqueName (0x200)
+	#   ]
+	#   UnderlyingType: unsigned (0x75)
+	#   FieldListType: <field list> (0x100D)
+	#   Name: A::B::C::UnsignedEnum
+	#   LinkageName: .?AW4UnsignedEnum@C@B@A@@
+	# }
+	.byte	0x3e, 0x00, 0x07, 0x15
+	.byte	0x03, 0x00, 0x00, 0x02
+	.byte	0x75, 0x00, 0x00, 0x00
+	.byte	0x0d, 0x10, 0x00, 0x00
+	.byte	0x41, 0x3a, 0x3a, 0x42
+	.byte	0x3a, 0x3a, 0x43, 0x3a
+	.byte	0x3a, 0x55, 0x6e, 0x73
+	.byte	0x69, 0x67, 0x6e, 0x65
+	.byte	0x64, 0x45, 0x6e, 0x75
+	.byte	0x6d, 0x00, 0x2e, 0x3f
+	.byte	0x41, 0x57, 0x34, 0x55
+	.byte	0x6e, 0x73, 0x69, 0x67
+	.byte	0x6e, 0x65, 0x64, 0x45
+	.byte	0x6e, 0x75, 0x6d, 0x40
+	.byte	0x43, 0x40, 0x42, 0x40
+	.byte	0x41, 0x40, 0x40, 0x00
+	# UdtSourceLine (0x100F) {
+	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+	#   UDT: A::B::C::UnsignedEnum (0x100E)
+	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+	#   LineNumber: 26
+	# }
+	.byte	0x0e, 0x00, 0x06, 0x16
+	.byte	0x0e, 0x10, 0x00, 0x00
+	.byte	0x06, 0x10, 0x00, 0x00
+	.byte	0x1a, 0x00, 0x00, 0x00
+	# Modifier (0x1010) {
+	#   TypeLeafKind: LF_MODIFIER (0x1001)
+	#   ModifiedType: A::B::C::UnsignedEnum (0x100E)
+	#   Modifiers [ (0x1)
+	#     Const (0x1)
+	#   ]
+	# }
+	.byte	0x0a, 0x00, 0x01, 0x10
+	.byte	0x0e, 0x10, 0x00, 0x00
+	.byte	0x01, 0x00, 0xf2, 0xf1
+	# FieldList (0x1011) {
+	#   TypeLeafKind: LF_FIELDLIST (0x1203)
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 0
+	#     Name: SE_A
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 2147000000
+	#     Name: SE_B
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 18446744071562551616
+	#     Name: SE_C
+	#   }
+	# }
+	.byte	0x32, 0x00, 0x03, 0x12
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x00, 0x00, 0x53, 0x45
+	.byte	0x5f, 0x41, 0x00, 0xf1
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x04, 0x80, 0xc0, 0x9e
+	.byte	0xf8, 0x7f, 0x53, 0x45
+	.byte	0x5f, 0x42, 0x00, 0xf1
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x0a, 0x80, 0x40, 0x61
+	.byte	0x07, 0x80, 0xff, 0xff
+	.byte	0xff, 0xff, 0x53, 0x45
+	.byte	0x5f, 0x43, 0x00, 0xf1
+	# Enum (0x1012) {
+	#   TypeLeafKind: LF_ENUM (0x1507)
+	#   NumEnumerators: 3
+	#   Properties [ (0x200)
+	#     HasUniqueName (0x200)
+	#   ]
+	#   UnderlyingType: int (0x74)
+	#   FieldListType: <field list> (0x1011)
+	#   Name: A::B::C::SignedEnum
+	#   LinkageName: .?AW4SignedEnum@C@B@A@@
+	# }
+	.byte	0x3a, 0x00, 0x07, 0x15
+	.byte	0x03, 0x00, 0x00, 0x02
+	.byte	0x74, 0x00, 0x00, 0x00
+	.byte	0x11, 0x10, 0x00, 0x00
+	.byte	0x41, 0x3a, 0x3a, 0x42
+	.byte	0x3a, 0x3a, 0x43, 0x3a
+	.byte	0x3a, 0x53, 0x69, 0x67
+	.byte	0x6e, 0x65, 0x64, 0x45
+	.byte	0x6e, 0x75, 0x6d, 0x00
+	.byte	0x2e, 0x3f, 0x41, 0x57
+	.byte	0x34, 0x53, 0x69, 0x67
+	.byte	0x6e, 0x65, 0x64, 0x45
+	.byte	0x6e, 0x75, 0x6d, 0x40
+	.byte	0x43, 0x40, 0x42, 0x40
+	.byte	0x41, 0x40, 0x40, 0x00
+	# UdtSourceLine (0x1013) {
+	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+	#   UDT: A::B::C::SignedEnum (0x1012)
+	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+	#   LineNumber: 32
+	# }
+	.byte	0x0e, 0x00, 0x06, 0x16
+	.byte	0x12, 0x10, 0x00, 0x00
+	.byte	0x06, 0x10, 0x00, 0x00
+	.byte	0x20, 0x00, 0x00, 0x00
+	# Modifier (0x1014) {
+	#   TypeLeafKind: LF_MODIFIER (0x1001)
+	#   ModifiedType: A::B::C::SignedEnum (0x1012)
+	#   Modifiers [ (0x1)
+	#     Const (0x1)
+	#   ]
+	# }
+	.byte	0x0a, 0x00, 0x01, 0x10
+	.byte	0x12, 0x10, 0x00, 0x00
+	.byte	0x01, 0x00, 0xf2, 0xf1
+	# FieldList (0x1015) {
+	#   TypeLeafKind: LF_FIELDLIST (0x1203)
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 0
+	#     Name: SUE_A
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 100
+	#     Name: SUE_B
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 200
+	#     Name: SUE_C
+	#   }
+	# }
+	.byte	0x26, 0x00, 0x03, 0x12
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x00, 0x00, 0x53, 0x55
+	.byte	0x45, 0x5f, 0x41, 0x00
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x64, 0x00, 0x53, 0x55
+	.byte	0x45, 0x5f, 0x42, 0x00
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0xc8, 0x00, 0x53, 0x55
+	.byte	0x45, 0x5f, 0x43, 0x00
+	# Enum (0x1016) {
+	#   TypeLeafKind: LF_ENUM (0x1507)
+	#   NumEnumerators: 3
+	#   Properties [ (0x200)
+	#     HasUniqueName (0x200)
+	#   ]
+	#   UnderlyingType: unsigned char (0x20)
+	#   FieldListType: <field list> (0x1015)
+	#   Name: A::B::C::SmallUnsignedEnum
+	#   LinkageName: .?AW4SmallUnsignedEnum@C@B@A@@
+	# }
+	.byte	0x4a, 0x00, 0x07, 0x15
+	.byte	0x03, 0x00, 0x00, 0x02
+	.byte	0x20, 0x00, 0x00, 0x00
+	.byte	0x15, 0x10, 0x00, 0x00
+	.byte	0x41, 0x3a, 0x3a, 0x42
+	.byte	0x3a, 0x3a, 0x43, 0x3a
+	.byte	0x3a, 0x53, 0x6d, 0x61
+	.byte	0x6c, 0x6c, 0x55, 0x6e
+	.byte	0x73, 0x69, 0x67, 0x6e
+	.byte	0x65, 0x64, 0x45, 0x6e
+	.byte	0x75, 0x6d, 0x00, 0x2e
+	.byte	0x3f, 0x41, 0x57, 0x34
+	.byte	0x53, 0x6d, 0x61, 0x6c
+	.byte	0x6c, 0x55, 0x6e, 0x73
+	.byte	0x69, 0x67, 0x6e, 0x65
+	.byte	0x64, 0x45, 0x6e, 0x75
+	.byte	0x6d, 0x40, 0x43, 0x40
+	.byte	0x42, 0x40, 0x41, 0x40
+	.byte	0x40, 0x00, 0xf2, 0xf1
+	# UdtSourceLine (0x1017) {
+	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+	#   UDT: A::B::C::SmallUnsignedEnum (0x1016)
+	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+	#   LineNumber: 38
+	# }
+	.byte	0x0e, 0x00, 0x06, 0x16
+	.byte	0x16, 0x10, 0x00, 0x00
+	.byte	0x06, 0x10, 0x00, 0x00
+	.byte	0x26, 0x00, 0x00, 0x00
+	# Modifier (0x1018) {
+	#   TypeLeafKind: LF_MODIFIER (0x1001)
+	#   ModifiedType: A::B::C::SmallUnsignedEnum (0x1016)
+	#   Modifiers [ (0x1)
+	#     Const (0x1)
+	#   ]
+	# }
+	.byte	0x0a, 0x00, 0x01, 0x10
+	.byte	0x16, 0x10, 0x00, 0x00
+	.byte	0x01, 0x00, 0xf2, 0xf1
+	# FieldList (0x1019) {
+	#   TypeLeafKind: LF_FIELDLIST (0x1203)
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 0
+	#     Name: SSE_A
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 100
+	#     Name: SSE_B
+	#   }
+	#   Enumerator {
+	#     TypeLeafKind: LF_ENUMERATE (0x1502)
+	#     AccessSpecifier: Public (0x3)
+	#     EnumValue: 18446744073709551516
+	#     Name: SSE_C
+	#   }
+	# }
+	.byte	0x2e, 0x00, 0x03, 0x12
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x00, 0x00, 0x53, 0x53
+	.byte	0x45, 0x5f, 0x41, 0x00
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x64, 0x00, 0x53, 0x53
+	.byte	0x45, 0x5f, 0x42, 0x00
+	.byte	0x02, 0x15, 0x03, 0x00
+	.byte	0x0a, 0x80, 0x9c, 0xff
+	.byte	0xff, 0xff, 0xff, 0xff
+	.byte	0xff, 0xff, 0x53, 0x53
+	.byte	0x45, 0x5f, 0x43, 0x00
+	# Enum (0x101A) {
+	#   TypeLeafKind: LF_ENUM (0x1507)
+	#   NumEnumerators: 3
+	#   Properties [ (0x200)
+	#     HasUniqueName (0x200)
+	#   ]
+	#   UnderlyingType: char (0x70)
+	#   FieldListType: <field list> (0x1019)
+	#   Name: A::B::C::SmallSignedEnum
+	#   LinkageName: .?AW4SmallSignedEnum@C@B@A@@
+	# }
+	.byte	0x46, 0x00, 0x07, 0x15
+	.byte	0x03, 0x00, 0x00, 0x02
+	.byte	0x70, 0x00, 0x00, 0x00
+	.byte	0x19, 0x10, 0x00, 0x00
+	.byte	0x41, 0x3a, 0x3a, 0x42
+	.byte	0x3a, 0x3a, 0x43, 0x3a
+	.byte	0x3a, 0x53, 0x6d, 0x61
+	.byte	0x6c, 0x6c, 0x53, 0x69
+	.byte	0x67, 0x6e, 0x65, 0x64
+	.byte	0x45, 0x6e, 0x75, 0x6d
+	.byte	0x00, 0x2e, 0x3f, 0x41
+	.byte	0x57, 0x34, 0x53, 0x6d
+	.byte	0x61, 0x6c, 0x6c, 0x53
+	.byte	0x69, 0x67, 0x6e, 0x65
+	.byte	0x64, 0x45, 0x6e, 0x75
+	.byte	0x6d, 0x40, 0x43, 0x40
+	.byte	0x42, 0x40, 0x41, 0x40
+	.byte	0x40, 0x00, 0xf2, 0xf1
+	# UdtSourceLine (0x101B) {
+	#   TypeLeafKind: LF_UDT_SRC_LINE (0x1606)
+	#   UDT: A::B::C::SmallSignedEnum (0x101A)
+	#   SourceFile: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\s_constant.cpp (0x1006)
+	#   LineNumber: 44
+	# }
+	.byte	0x0e, 0x00, 0x06, 0x16
+	.byte	0x1a, 0x10, 0x00, 0x00
+	.byte	0x06, 0x10, 0x00, 0x00
+	.byte	0x2c, 0x00, 0x00, 0x00
+	# Modifier (0x101C) {
+	#   TypeLeafKind: LF_MODIFIER (0x1001)
+	#   ModifiedType: A::B::C::SmallSignedEnum (0x101A)
+	#   Modifiers [ (0x1)
+	#     Const (0x1)
+	#   ]
+	# }
+	.byte	0x0a, 0x00, 0x01, 0x10
+	.byte	0x1a, 0x10, 0x00, 0x00
+	.byte	0x01, 0x00, 0xf2, 0xf1
+	# StringId (0x101D) {
+	#   TypeLeafKind: LF_STRING_ID (0x1605)
+	#   Id: 0x0
+	#   StringData: D:\\src\\llvmbuild\\ninja-x64
+	# }
+	.byte	0x26, 0x00, 0x05, 0x16
+	.byte	0x00, 0x00, 0x00, 0x00
+	.byte	0x44, 0x3a, 0x5c, 0x5c
+	.byte	0x73, 0x72, 0x63, 0x5c
+	.byte	0x5c, 0x6c, 0x6c, 0x76
+	.byte	0x6d, 0x62, 0x75, 0x69
+	.byte	0x6c, 0x64, 0x5c, 0x5c
+	.byte	0x6e, 0x69, 0x6e, 0x6a
+	.byte	0x61, 0x2d, 0x78, 0x36
+	.byte	0x34, 0x00, 0xf2, 0xf1
+	# StringId (0x101E) {
+	#   TypeLeafKind: LF_STRING_ID (0x1605)
+	#   Id: 0x0
+	#   StringData: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\variable.cpp
+	# }
+	.byte	0x42, 0x00, 0x05, 0x16
+	.byte	0x00, 0x00, 0x00, 0x00
+	.byte	0x44, 0x3a, 0x5c, 0x73
+	.byte	0x72, 0x63, 0x5c, 0x6c
+	.byte	0x6c, 0x76, 0x6d, 0x2d
+	.byte	0x6d, 0x6f, 0x6e, 0x6f
+	.byte	0x5c, 0x6c, 0x6c, 0x64
+	.byte	0x62, 0x5c, 0x6c, 0x69
+	.byte	0x74, 0x5c, 0x53, 0x79
+	.byte	0x6d, 0x62, 0x6f, 0x6c
+	.byte	0x46, 0x69, 0x6c, 0x65
+	.byte	0x5c, 0x4e, 0x61, 0x74
+	.byte	0x69, 0x76, 0x65, 0x50
+	.byte	0x44, 0x42, 0x5c, 0x76
+	.byte	0x61, 0x72, 0x69, 0x61
+	.byte	0x62, 0x6c, 0x65, 0x2e
+	.byte	0x63, 0x70, 0x70, 0x00
+	# BuildInfo (0x101F) {
+	#   TypeLeafKind: LF_BUILDINFO (0x1603)
+	#   NumArgs: 5
+	#   Arguments [
+	#     ArgType: D:\\src\\llvmbuild\\ninja-x64 (0x101D)
+	#     ArgType: 0x0
+	#     ArgType: D:\src\llvm-mono\lldb\lit\SymbolFile\NativePDB\variable.cpp (0x101E)
+	#     ArgType: 0x0
+	#     ArgType: 0x0
+	#   ]
+	# }
+	.byte	0x1a, 0x00, 0x03, 0x16
+	.byte	0x05, 0x00, 0x1d, 0x10
+	.byte	0x00, 0x00, 0x00, 0x00
+	.byte	0x00, 0x00, 0x1e, 0x10
+	.byte	0x00, 0x00, 0x00, 0x00
+	.byte	0x00, 0x00, 0x00, 0x00
+	.byte	0x00, 0x00, 0xf2, 0xf1
+
+	.addrsig
+	.addrsig_sym GlobalLUEA
+	.addrsig_sym GlobalLUEB
+	.addrsig_sym GlobalLUEC
+	.addrsig_sym GlobalLSEA
+	.addrsig_sym GlobalLSEB
+	.addrsig_sym GlobalLSEC
+	.addrsig_sym GlobalUEA
+	.addrsig_sym GlobalUEB
+	.addrsig_sym GlobalUEC
+	.addrsig_sym GlobalSEA
+	.addrsig_sym GlobalSEB
+	.addrsig_sym GlobalSEC
+	.addrsig_sym GlobalSUEA
+	.addrsig_sym GlobalSUEB
+	.addrsig_sym GlobalSUEC
+	.addrsig_sym GlobalSSEA
+	.addrsig_sym GlobalSSEB
+	.addrsig_sym GlobalSSEC
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/source-list.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/source-list.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/source-list.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/source-list.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/stack_unwinding01.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/stack_unwinding01.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/stack_unwinding01.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/stack_unwinding01.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/tag-types.lldbinit b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/tag-types.lldbinit
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/Inputs/tag-types.lldbinit
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/Inputs/tag-types.lldbinit
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/ast-functions-msvc.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/ast-functions-msvc.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/ast-functions-msvc.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/ast-functions-msvc.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/ast-functions.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/ast-functions.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/ast-functions.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/ast-methods.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/ast-methods.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/ast-methods.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/ast-types.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/ast-types.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/ast-types.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/bitfields.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/bitfields.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/bitfields.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/break-by-function.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/break-by-function.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/break-by-function.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/break-by-line.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/break-by-line.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/break-by-line.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp
new file mode 100644
index 0000000..be05755
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/disassembly.cpp
@@ -0,0 +1,38 @@
+// clang-format off
+// REQUIRES: lld
+
+// Test that we can show disassembly and source.
+// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
+// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN:     %p/Inputs/disassembly.lldbinit | FileCheck %s
+
+// Some context lines before the function.
+
+int foo() { return 42; }
+
+int main(int argc, char **argv) {
+  foo();
+  return 0;
+}
+
+
+// CHECK:      (lldb) disassemble --flavor=intel -m -n main
+// CHECK:         12   int foo() { return 42; }
+// CHECK-NEXT:    13
+// CHECK-NEXT: ** 14   int main(int argc, char **argv) {
+// CHECK:      disassembly.cpp.tmp.exe`main:
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+0>:  sub    rsp, 0x38
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+4>:  mov    dword ptr [rsp + 0x34], 0x0
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+12>: mov    qword ptr [rsp + 0x28], rdx
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+17>: mov    dword ptr [rsp + 0x24], ecx
+// CHECK:      ** 15     foo();
+// CHECK:      disassembly.cpp.tmp.exe[{{.*}}] <+21>: call   {{.*}}               ; foo at disassembly.cpp:12
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+26>: xor    ecx, ecx
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+28>: mov    dword ptr [rsp + 0x20], eax
+// CHECK:      ** 16     return 0;
+// CHECK-NEXT:    17   }
+// CHECK-NEXT:    18
+// CHECK:      disassembly.cpp.tmp.exe[{{.*}}] <+32>: mov    eax, ecx
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+34>: add    rsp, 0x38
+// CHECK-NEXT: disassembly.cpp.tmp.exe[{{.*}}] <+38>: ret
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/function-types-builtins.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/function-types-builtins.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/function-types-builtins.cpp
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp
new file mode 100644
index 0000000..312fd1e
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/function-types-calling-conv.cpp
@@ -0,0 +1,33 @@
+// clang-format off
+// REQUIRES: lld
+
+// RUN: %clang_cl --target=i386-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
+// RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
+// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
+// RUN:     %p/Inputs/function-types-calling-conv.lldbinit | FileCheck %s
+
+
+void __stdcall StdcallFn() {}
+void __fastcall FastcallFn() {}
+void __thiscall ThiscallFn() {}
+void __cdecl CdeclFn() {}
+void __vectorcall VectorcallFn() {}
+
+auto sfn = &StdcallFn;
+// CHECK: (void (*)() __attribute__((stdcall))) sfn = {{.*}}
+
+auto ffn = &FastcallFn;
+// CHECK: (void (*)() __attribute__((fastcall))) ffn = {{.*}}
+
+auto tfn = &ThiscallFn;
+// CHECK: (void (*)() __attribute__((thiscall))) tfn = {{.*}}
+
+auto cfn = &CdeclFn;
+// CHECK: (void (*)()) cfn = {{.*}}
+
+auto vfn = &VectorcallFn;
+// CHECK: (void (*)() __attribute__((vectorcall))) vfn = {{.*}}
+
+int main(int argc, char **argv) {
+  return 0;
+}
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/function-types-classes.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/function-types-classes.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/function-types-classes.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/global-classes.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/global-classes.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/global-classes.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/globals-bss.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/globals-bss.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/globals-bss.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/globals-fundamental.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/globals-fundamental.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/globals-fundamental.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/local-variables.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/local-variables.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/local-variables.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/nested-types.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/nested-types.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/nested-types.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/s_constant.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/s_constant.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/s_constant.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/s_constant.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/source-list.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/source-list.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/source-list.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/stack_unwinding01.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/stack_unwinding01.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/tag-types.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/tag-types.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/tag-types.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/NativePDB/typedefs.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/typedefs.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/NativePDB/typedefs.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/NativePDB/typedefs.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/AstRestoreTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/AstRestoreTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/AstRestoreTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/AstRestoreTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/CallingConventionsTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/CallingConventionsTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/CallingConventionsTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/CallingConventionsTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ClassLayoutTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ClassLayoutTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ClassLayoutTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ClassLayoutTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/CompilandsTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/CompilandsTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/CompilandsTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/CompilandsTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest0.script b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest0.script
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest0.script
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest0.script
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest1.script b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest1.script
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest1.script
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest1.script
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest2.script b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest2.script
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/ExpressionsTest2.script
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/ExpressionsTest2.script
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FuncSymbols.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FuncSymbols.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FuncSymbols.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FuncSymbols.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FuncSymbolsTestMain.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FuncSymbolsTestMain.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FuncSymbolsTestMain.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FuncSymbolsTestMain.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.h b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.h
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.h
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.h
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.ord b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.ord
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.ord
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FunctionLevelLinkingTest.ord
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/FunctionNestedBlockTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/PointerTypeTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/PointerTypeTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/PointerTypeTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/PointerTypeTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/SimpleTypesTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/TypeQualsTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/TypeQualsTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/TypeQualsTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/TypeQualsTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/UdtLayoutTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/UdtLayoutTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/UdtLayoutTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/UdtLayoutTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/UdtLayoutTest.script b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/UdtLayoutTest.script
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/UdtLayoutTest.script
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/UdtLayoutTest.script
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VBases.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VBases.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VBases.script b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.script
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VBases.script
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VBases.script
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VariablesLocationsTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VariablesLocationsTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.script b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VariablesLocationsTest.script
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VariablesLocationsTest.script
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VariablesLocationsTest.script
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VariablesTest.cpp b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VariablesTest.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/Inputs/VariablesTest.cpp
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/Inputs/VariablesTest.cpp
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/ast-restore.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/ast-restore.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/ast-restore.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/ast-restore.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/calling-conventions.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/calling-conventions.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/calling-conventions.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/calling-conventions.test
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/class-layout.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/class-layout.test
new file mode 100644
index 0000000..fcd6b61
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/class-layout.test
@@ -0,0 +1,92 @@
+REQUIRES: system-windows, msvc
+RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.obj %S/Inputs/ClassLayoutTest.cpp
+RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.exe %T/ClassLayoutTest.cpp.obj
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck %s
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=ENUM %s
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=UNION %s
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=STRUCT %s
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=COMPLEX %s
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=LIST %s
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=UNNAMED-STRUCT %s
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=BASE %s
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=FRIEND %s
+RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=CLASS %s
+
+CHECK: Module [[MOD:.*]]
+CHECK: SymbolFile pdb ([[MOD]])
+CHECK: {{^[0-9A-F]+}}:   CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\ClassLayoutTest.cpp'
+
+ENUM:  name = "Enum", size = 4,  decl = ClassLayoutTest.cpp:5
+ENUM-SAME: enum Enum {
+ENUM:    RED,
+ENUM:    GREEN,
+ENUM:    BLUE
+ENUM:}
+
+UNION:  name = "Union", size = 4, decl = ClassLayoutTest.cpp:9
+UNION-SAME: union Union {
+UNION:    short Row;
+UNION:    unsigned short Col;
+UNION:    int Line : 16;
+UNION:    long Table;
+UNION:}
+
+STRUCT:  name = "Struct", size = 64, decl = ClassLayoutTest.cpp:22
+STRUCT-SAME: struct Struct {
+STRUCT:    bool A;
+STRUCT:    unsigned char UCharVar;
+STRUCT:    unsigned int UIntVar;
+STRUCT:    long long LongLongVar;
+STRUCT:    Enum EnumVar;
+STRUCT:    int array[10];
+STRUCT:}
+
+COMPLEX:  name = "Complex", size = 368, decl = ClassLayoutTest.cpp:33
+COMPLEX-SAME: struct Complex {
+COMPLEX:    _List *array[90];
+COMPLEX:    int x;
+COMPLEX:    int a;
+COMPLEX:    float b;
+COMPLEX:}
+
+LIST:  name = "_List", size = 12, decl = ClassLayoutTest.cpp:45
+LIST-SAME: struct _List {
+LIST:    _List *current;
+LIST:    _List *previous;
+LIST:    _List *next;
+LIST:}
+
+UNNAMED-STRUCT:  name = "UnnamedStruct", size = 4, decl = ClassLayoutTest.cpp:52
+UNNAMED-STRUCT-SAME: struct UnnamedStruct {
+UNNAMED-STRUCT:   int a;
+UNNAMED-STRUCT:}
+
+BASE:  name = "Base", size = 4,  decl = ClassLayoutTest.cpp:59
+BASE-SAME: class Base {
+BASE:    int a;
+BASE:    Base();
+BASE:    ~Base();
+BASE:    int Get();
+BASE:}
+
+FRIEND:  name = "Friend", size = 1, decl = ClassLayoutTest.cpp:70
+FRIEND-SAME: class Friend {
+FRIEND:    int f();
+FRIEND: }
+
+CLASS:  name = "Class", size = 88, decl = ClassLayoutTest.cpp:74
+CLASS-SAME: class Class : public MemberTest::Base {
+CLASS:    static int m_static;
+CLASS:    int m_public;
+CLASS:    Struct m_struct;
+CLASS:    Union m_union;
+CLASS:    int m_private;
+CLASS:    int m_protected;
+CLASS:    Class();
+CLASS:    Class(int);
+CLASS:    ~Class();
+CLASS:    static int {{.*}}StaticMemberFunc(int, ...);
+CLASS:    int Get();
+CLASS:    int f(MemberTest::Friend);
+CLASS:    bool operator==(const MemberTest::Class &)
+CLASS:}
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/compilands.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/compilands.test
new file mode 100644
index 0000000..0bda82e
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/compilands.test
@@ -0,0 +1,11 @@
+REQUIRES: system-windows, msvc
+RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/CompilandsTest.cpp.obj %S/Inputs/CompilandsTest.cpp
+RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/CompilandsTest.cpp.exe %T/CompilandsTest.cpp.obj
+RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols %T/CompilandsTest.cpp.exe | FileCheck %s
+RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols %T/CompilandsTest.cpp.exe | FileCheck %s
+
+; Link default libraries
+
+CHECK: Module [[CU:.*]]
+CHECK: SymbolFile pdb ([[CU]])
+CHECK: {{^[0-9A-F]+}}:   CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\CompilandsTest.cpp'
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/enums-layout.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/enums-layout.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/enums-layout.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/enums-layout.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/expressions.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/expressions.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/expressions.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/expressions.test
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/func-symbols.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/func-symbols.test
new file mode 100644
index 0000000..676be1c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/func-symbols.test
@@ -0,0 +1,46 @@
+REQUIRES: system-windows, lld
+RUN: %build --compiler=clang-cl --arch=32 --nodefaultlib --output=%T/FuncSymbolsTest.exe %S/Inputs/FuncSymbolsTestMain.cpp %S/Inputs/FuncSymbols.cpp
+RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-ONE %s
+RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-TWO %s
+
+; Link multiple objects
+; In this test, We don't check demangled name of a mangled function.
+
+CHECK-ONE: Module [[MD:.*]]
+CHECK-ONE-DAG: SymbolFile pdb ([[MD]])
+CHECK-ONE-DAG: [[TY0:.*]]:   Type{[[UID0:.*]]} , name = "Func_arg_array", decl = FuncSymbolsTestMain.cpp:3, compiler_type = {{.*}} int (int *)
+CHECK-ONE-DAG: [[TY1:.*]]:   Type{[[UID1:.*]]} , name = "Func_arg_void", decl = FuncSymbolsTestMain.cpp:4, compiler_type = {{.*}} void (void)
+CHECK-ONE-DAG: [[TY2:.*]]:   Type{[[UID2:.*]]} , name = "Func_arg_none", decl = FuncSymbolsTestMain.cpp:5, compiler_type = {{.*}} void (void)
+CHECK-ONE-DAG: [[TY3:.*]]:   Type{[[UID3:.*]]} , name = "Func_varargs", decl = FuncSymbolsTestMain.cpp:6, compiler_type = {{.*}} void (...)
+CHECK-ONE-DAG: [[TY4:.*]]:   Type{[[UID4:.*]]} , name = "Func", decl = FuncSymbolsTestMain.cpp:28, compiler_type = {{.*}} void (char, int)
+CHECK-ONE-DAG: [[TY5:.*]]:   Type{[[UID5:.*]]} , name = "main", decl = FuncSymbolsTestMain.cpp:44, compiler_type = {{.*}} int (void)
+CHECK-ONE-DAG: [[TY6:.*]]:   Type{[[UID6:.*]]} , name = "Func", decl = FuncSymbolsTestMain.cpp:24, compiler_type = {{.*}} void (int, const long, volatile _Bool, ...)
+CHECK-ONE-DAG: [[TY7:.*]]:   Type{[[UID7:.*]]} , name = "StaticFunction", decl = FuncSymbolsTestMain.cpp:35, compiler_type = {{.*}} long (int)
+CHECK-ONE-DAG: [[TY8:.*]]:   Type{[[UID8:.*]]} , name = "Func", decl = FuncSymbolsTestMain.cpp:12, compiler_type = {{.*}} int (int, ...)
+CHECK-ONE-DAG: [[TY9:.*]]:   Type{[[UID9:.*]]} , name = "TemplateFunc<1,int>", decl = FuncSymbolsTestMain.cpp:18, compiler_type = {{.*}} void (int)
+CHECK-ONE-DAG: [[TY10:.*]]:   Type{[[UID10:.*]]} , name = "TemplateFunc<1,int,int,int>", decl = FuncSymbolsTestMain.cpp:18, compiler_type = {{.*}} void (int, int, int)
+CHECK-ONE-DAG: [[TY11:.*]]:   Type{[[UID11:.*]]} , name = "InlinedFunction", decl = FuncSymbolsTestMain.cpp:40, compiler_type = {{.*}} void (long)
+
+CHECK-ONE: {{.*}}:   CompileUnit{{.*}}, language = "c++", file = '{{.*}}\FuncSymbolsTestMain.cpp'
+CHECK-ONE-DAG: Function{[[UID0]]}, mangled = ?Func_arg_array@@YAHQAH@Z, demangled = {{.*}}, type = [[TY0]]
+CHECK-ONE-DAG: Function{[[UID1]]}, mangled = ?Func_arg_void@@YAXXZ, demangled = {{.*}}, type = [[TY1]]
+CHECK-ONE-DAG: Function{[[UID2]]}, mangled = ?Func_arg_none@@YAXXZ, demangled = {{.*}}, type = [[TY2]]
+CHECK-ONE-DAG: Function{[[UID3]]}, mangled = ?Func_varargs@@YAXZZ, demangled = {{.*}}, type = [[TY3]]
+CHECK-ONE-DAG: Function{[[UID4]]}, mangled = ?Func@NS@@YAXDH@Z, demangled = {{.*}}, type = [[TY4]]
+CHECK-ONE-DAG: Function{[[UID5]]}, mangled = _main, demangled = {{.*}}, type = [[TY5]]
+CHECK-ONE-DAG: Function{[[UID6]]}, demangled = {{.*}}`anonymous namespace'::Func{{.*}}, type = [[TY6]]
+CHECK-ONE-DAG: Function{[[UID7]]}, demangled = {{.*}}StaticFunction{{.*}}, type = [[TY7]]
+CHECK-ONE-DAG: Function{[[UID8]]}, mangled = ?Func@A@MemberTest@@QAAHHZZ, demangled = {{.*}}, type = [[TY8]]
+CHECK-ONE-DAG: Function{[[UID9]]}, mangled = ??$TemplateFunc@$00H@@YAXH@Z, demangled = {{.*}}, type = [[TY9]]
+CHECK-ONE-DAG: Function{[[UID10]]}, mangled = ??$TemplateFunc@$00HHH@@YAXHHH@Z, demangled = {{.*}}, type = [[TY10]]
+CHECK-ONE-DAG: Function{[[UID11]]}, mangled = ?InlinedFunction@@YAXJ@Z, demangled = {{.*}}, type = [[TY11]]
+
+; We expect new types observed in another compile unit
+CHECK-TWO-DAG: [[TY30:.*]]:   Type{[[UID30:.*]]} , name = "FunctionCall", decl = FuncSymbols.cpp:13, compiler_type = {{.*}} void (void)
+CHECK-TWO-DAG: [[TY31:.*]]:   Type{[[UID31:.*]]} , name = "StaticFunction", decl = FuncSymbols.cpp:4, compiler_type = {{.*}} long (int)
+CHECK-TWO-DAG: [[TY32:.*]]:   Type{[[UID32:.*]]} , name = "InlinedFunction", decl = FuncSymbols.cpp:10, compiler_type = {{.*}} int (long)
+
+CHECK-TWO: {{.*}}:   CompileUnit{{.*}}, language = "c++", file = '{{.*}}\FuncSymbols.cpp'
+CHECK-TWO-DAG: Function{[[UID30]]}, mangled = ?FunctionCall@@YAXXZ, demangled = {{.*}}, type = [[TY30]]
+CHECK-TWO-DAG: Function{[[UID31]]}, demangled = {{.*}}`anonymous namespace'::StaticFunction{{.*}}, type = [[TY31]]
+CHECK-TWO-DAG: Function{[[UID32]]}, demangled = {{.*}}InlinedFunction{{.*}}, type = [[TY32]]
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test
new file mode 100644
index 0000000..ec0ef57
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/function-level-linking.test
@@ -0,0 +1,5 @@
+REQUIRES: system-windows, lld
+RUN: %clang_cl_host /c /Zi /Gy %S/Inputs/FunctionLevelLinkingTest.cpp /o %t.obj
+RUN: lld-link /debug:full /nodefaultlib /entry:main /order:@%S/Inputs/FunctionLevelLinkingTest.ord %t.obj /out:%t.exe
+RUN: env LLDB_USE_NATIVE_PDB_READER=1 lldb-test symbols -verify %t.exe
+RUN: env LLDB_USE_NATIVE_PDB_READER=0 lldb-test symbols -verify %t.exe
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/function-nested-block.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/function-nested-block.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/function-nested-block.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/function-nested-block.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/pointers.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/pointers.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/pointers.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/pointers.test
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/type-quals.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/type-quals.test
new file mode 100644
index 0000000..cf65c79
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/type-quals.test
@@ -0,0 +1,39 @@
+REQUIRES: system-windows, msvc
+RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/TypeQualsTest.cpp.obj %S/Inputs/TypeQualsTest.cpp
+RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/TypeQualsTest.cpp.exe %T/TypeQualsTest.cpp.obj
+RUN: lldb-test symbols %T/TypeQualsTest.cpp.exe | FileCheck %s
+
+CHECK: Module [[MOD:.*]]
+CHECK-DAG: SymbolFile pdb ([[MOD]])
+CHECK-DAG:      Type{{.*}} , name = "const int", size = 4, compiler_type = {{.*}} const int
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int *
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int **const
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int *const
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int *const *
+CHECK-DAG:      Type{{.*}} , name = "Func1", {{.*}}, compiler_type = {{.*}} void (const int *, const int *, const int **const, const int *const *)
+
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} volatile int *
+CHECK-DAG:      Type{{.*}} , name = "Func2", {{.*}}, compiler_type = {{.*}} void (volatile int *, volatile int *)
+
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int *
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int *&
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int &&
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int &
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} const int &
+CHECK-DAG:      Type{{.*}} , name = "Func3", {{.*}}, compiler_type = {{.*}} void (int *&, int &, const int &, int &&)
+
+// FIXME: __unaligned is not supported.
+CHECK-DAG:      Type{{.*}} , name = "Func4", {{.*}}, compiler_type = {{.*}} void (int *, int *)
+
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int *__restrict
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} int &__restrict
+CHECK-DAG:      Type{{.*}} , name = "Func5", {{.*}}, compiler_type = {{.*}} void (int, int *__restrict, int &__restrict)
+
+CHECK-DAG:      Type{{.*}} , name = "Func6", {{.*}}, compiler_type = {{.*}} void (const volatile int *__restrict)
+
+CHECK-DAG:      Type{{.*}} , size = 400, compiler_type = {{.*}} volatile int *[100]
+CHECK-DAG:      Type{{.*}} , size = 4000, compiler_type = {{.*}} volatile int *[10][100]
+
+CHECK-DAG:      Type{{.*}} , size = 4, compiler_type = {{.*}} long *__restrict
+
+CHECK-DAG: {{^[0-9A-F]+}}:   CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\TypeQualsTest.cpp'
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/typedefs.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/typedefs.test
new file mode 100644
index 0000000..5f70d87
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/typedefs.test
@@ -0,0 +1,59 @@
+REQUIRES: system-windows, msvc
+RUN: %build --compiler=msvc --arch=32 --nodefaultlib --output=%T/SimpleTypesTest.cpp.typedefs.exe %S/Inputs/SimpleTypesTest.cpp
+RUN: lldb-test symbols %T/SimpleTypesTest.cpp.typedefs.exe | FileCheck %s
+
+; Generate 32-bit target
+
+; FIXME: PDB does not have line information for typedef statements so source
+; and line information for them is not tested.
+
+; Note, types `long double` and `double` have same bit size in MSVC and there
+; is no information in the PDB to distinguish them. So the compiler type for
+; both of them is the same.
+
+CHECK: Module [[MOD:.*]]
+CHECK: SymbolFile pdb ([[MOD]])
+CHECK-DAG: name = "char32_t", size = 4, compiler_type = {{.*}} char32_t
+CHECK-DAG: name = "char16_t", size = 2, compiler_type = {{.*}} char16_t
+CHECK-DAG: Type{{.*}} , name = "unsigned long", size = 4, compiler_type = {{.*}} unsigned long
+CHECK-DAG: Type{{.*}} , size = 40, compiler_type = {{.*}} unsigned long [10]
+CHECK-DAG: Type{{.*}} , name = "ULongArrayTypedef", compiler_type = {{.*}} typedef ULongArrayTypedef
+
+; Note: compiler_type of `long double` is represented by the one for `double`
+CHECK-DAG: Type{{.*}} , name = "double", size = 8, compiler_type = {{.*}} double
+CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} double *
+CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} double *&
+CHECK-DAG: Type{{.*}} , name = "RefTypedef", compiler_type = {{.*}} typedef RefTypedef
+
+CHECK-DAG: Type{{.*}} , name = "wchar_t", size = 2, compiler_type = {{.*}} wchar_t
+
+CHECK-DAG: Type{{.*}} , name = "int", size = 4, compiler_type = {{.*}} int
+CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} int &
+CHECK-DAG: Type{{.*}} , name = "unsigned char", size = 1, compiler_type = {{.*}} unsigned char
+CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} unsigned char *
+CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} unsigned char **
+CHECK-DAG: Type{{.*}} , name = "short", size = 2, compiler_type = {{.*}} short
+CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} short *
+CHECK-DAG: Type{{.*}} , name = "const double", size = 8, compiler_type = {{.*}} const double
+CHECK-DAG: Type{{.*}} , name = "volatile bool", size = 1, compiler_type = {{.*}} volatile _Bool
+CHECK-DAG: Type{{.*}} , name = "long long", size = 8, compiler_type = {{.*}} long long
+CHECK-DAG: Type{{.*}} , compiler_type = {{.*}} long long (int &, unsigned char **, short *, const double, volatile _Bool)
+CHECK-DAG: Type{{.*}} , name = "FuncPtrTypedef", compiler_type = {{.*}} typedef FuncPtrTypedef
+
+CHECK-DAG: Type{{.*}} , name = "void", compiler_type = {{.*}} void
+CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} void *
+CHECK-DAG: Type{{.*}} , name = "long", size = 4, compiler_type = {{.*}} long
+CHECK-DAG: Type{{.*}} , name = "unsigned short", size = 2, compiler_type = {{.*}} unsigned short
+CHECK-DAG: Type{{.*}} , name = "unsigned int", size = 4, compiler_type = {{.*}} unsigned int
+CHECK-DAG: Type{{.*}} , name = "char", size = 1, compiler_type = {{.*}} char
+CHECK-DAG: Type{{.*}} , name = "signed char", size = 1, compiler_type = {{.*}} signed char
+CHECK-DAG: Type{{.*}} , compiler_type = {{.*}} char (void *, long, unsigned short, unsigned int, ...)
+CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} char (*)(void *, long, unsigned short, unsigned int, ...)
+CHECK-DAG: Type{{.*}} , name = "VarArgsFuncTypedef", compiler_type = {{.*}} typedef VarArgsFuncTypedef
+
+CHECK-DAG: Type{{.*}} , name = "float", size = 4, compiler_type = {{.*}} float
+CHECK-DAG: Type{{.*}} , compiler_type = {{.*}} float (...)
+CHECK-DAG: Type{{.*}} , size = 4, compiler_type = {{.*}} float (*)(...)
+CHECK-DAG: Type{{.*}} , name = "VarArgsFuncTypedefA", compiler_type = {{.*}} typedef VarArgsFuncTypedefA
+
+CHECK-DAG: {{^[0-9A-F]+}}:   CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\SimpleTypesTest.cpp'
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/udt-layout.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/udt-layout.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/udt-layout.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/udt-layout.test
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/variables-locations.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/variables-locations.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/variables-locations.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/variables-locations.test
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/variables.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/variables.test
new file mode 100644
index 0000000..ae14f02
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/variables.test
@@ -0,0 +1,66 @@
+REQUIRES: system-windows, msvc
+RUN: %build --compiler=clang-cl --mode=compile --arch=64 --nodefaultlib --output=%T/VariablesTest.cpp.obj %S/Inputs/VariablesTest.cpp
+RUN: %build --compiler=msvc --mode=link --arch=64 --nodefaultlib --output=%T/VariablesTest.cpp.exe %T/VariablesTest.cpp.obj
+RUN: lldb-test symbols %T/VariablesTest.cpp.exe > %T/VariablesTest.out
+RUN: FileCheck --check-prefix=GLOBALS --input-file=%T/VariablesTest.out %s
+RUN: FileCheck --check-prefix=FUNC-F --input-file=%T/VariablesTest.out %s
+RUN: FileCheck --check-prefix=FUNC-MAIN --input-file=%T/VariablesTest.out %s
+RUN: FileCheck --check-prefix=FUNC-CONSTRUCTOR --input-file=%T/VariablesTest.out %s
+RUN: FileCheck --check-prefix=FUNC-MEMBER --input-file=%T/VariablesTest.out %s
+
+GLOBALS: Module [[MOD:.*]]
+GLOBALS: SymbolFile pdb ([[MOD]])
+GLOBALS:     CompileUnit{{.*}}, language = "c++", file = '{{.*}}\VariablesTest.cpp'
+GLOBALS-DAG:   Variable{{.*}}, name = "g_IntVar"
+GLOBALS-SAME:  scope = global, location = {{.*}}, external
+GLOBALS-DAG:   Variable{{.*}}, name = "m_StaticClassMember"
+GLOBALS-SAME:  scope = global, location = {{.*}}, external
+GLOBALS-DAG:   Variable{{.*}}, name = "g_pConst"
+GLOBALS-SAME:  scope = global, location = {{.*}}, external
+GLOBALS-DAG:   Variable{{.*}}, name = "same_name_var"
+GLOBALS-SAME:  scope = global, location = {{.*}}, external
+GLOBALS-DAG:   Variable{{.*}}, name = "g_EnumVar"
+GLOBALS-SAME:  scope = global, location = {{.*}}, external
+GLOBALS-DAG:   Variable{{.*}}, name = "g_tls"
+GLOBALS-SAME:  scope = thread local, location = {{.*}}, external
+GLOBALS-DAG:   Variable{{.*}}, name = "ClassVar"
+GLOBALS-SAME:  scope = global, location = {{.*}}, external
+GLOBALS-DAG:   Variable{{.*}}, name = "g_Const"
+GLOBALS-SAME:  scope = ??? (2)
+GLOBALS:     Function
+
+FUNC-F:      Function{{.*}}, mangled = ?f@@YAHHH@Z
+FUNC-F-NEXT:   Block
+FUNC-F-NEXT:     Variable{{.*}}, name = "var_arg1"
+FUNC-F-SAME:                     scope = parameter
+FUNC-F-NEXT:     Variable{{.*}}, name = "var_arg2"
+FUNC-F-SAME:                     scope = parameter
+FUNC-F-NEXT:     Variable{{.*}}, name = "same_name_var"
+FUNC-F-SAME:                     scope = local
+
+FUNC-MAIN:      Function{{.*}}, mangled = main
+FUNC-MAIN-NEXT:   Block
+FUNC-MAIN-NEXT:     Variable{{.*}}, name = "same_name_var"
+FUNC-MAIN-SAME:                     scope = local
+FUNC-MAIN-NEXT:     Variable{{.*}}, name = "local_const"
+FUNC-MAIN-SAME:                     scope = local
+FUNC-MAIN-NEXT:     Variable{{.*}}, name = "local_CString"
+FUNC-MAIN-SAME:                     scope = local
+FUNC-MAIN-NEXT:     Variable{{.*}}, name = "local_pCString"
+FUNC-MAIN-SAME:                     scope = local
+FUNC-MAIN-NEXT:     Variable{{.*}}, name = "a"
+FUNC-MAIN-SAME:                     scope = local
+
+FUNC-CONSTRUCTOR:      Function{{.*}}, mangled = ??0Class@@QEAA@H@Z
+FUNC-CONSTRUCTOR-NEXT:   Block
+FUNC-CONSTRUCTOR-NEXT:     Variable{{.*}}, name = "this"
+FUNC-CONSTRUCTOR-SAME:                     scope = parameter
+FUNC-CONSTRUCTOR-SAME:                     artificial
+FUNC-CONSTRUCTOR-NEXT:     Variable{{.*}}, name = "a"
+FUNC-CONSTRUCTOR-SAME:                     scope = parameter
+
+FUNC-MEMBER:      Function{{.*}}, mangled = ?Func@Class@@QEAAXXZ
+FUNC-MEMBER-NEXT:   Block
+FUNC-MEMBER-NEXT:     Variable{{.*}}, name = "this"
+FUNC-MEMBER-SAME:                     scope = parameter
+FUNC-MEMBER-SAME:                     artificial
diff --git a/src/llvm-project/lldb/lit/SymbolFile/PDB/vbases.test b/src/llvm-project/lldb/test/Shell/SymbolFile/PDB/vbases.test
similarity index 100%
rename from src/llvm-project/lldb/lit/SymbolFile/PDB/vbases.test
rename to src/llvm-project/lldb/test/Shell/SymbolFile/PDB/vbases.test
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/dissassemble-entry-point.s b/src/llvm-project/lldb/test/Shell/SymbolFile/dissassemble-entry-point.s
new file mode 100644
index 0000000..c805999
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/dissassemble-entry-point.s
@@ -0,0 +1,13 @@
+# REQUIRES: lld, arm
+
+# RUN: llvm-mc -triple=thumbv7-eabi %s -filetype=obj -o %t.o
+# RUN: ld.lld %t.o -o %t --section-start=.text=0x8074 -e 0x8075 -s
+# RUN: %lldb -x -b -o 'dis -s 0x8074 -e 0x8080' -- %t | FileCheck %s
+# CHECK:      {{.*}}[0x8074] <+0>: movs   r0, #0x2a
+# CHECK-NEXT: {{.*}}[0x8076] <+2>: movs   r7, #0x1
+# CHECK-NEXT: {{.*}}[0x8078] <+4>: svc    #0x0
+
+_start:
+    movs r0, #0x2a
+    movs r7, #0x1
+    svc #0x0
\ No newline at end of file
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/symbol-binding.test b/src/llvm-project/lldb/test/Shell/SymbolFile/symbol-binding.test
new file mode 100644
index 0000000..ce8a5af
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/symbol-binding.test
@@ -0,0 +1,22 @@
+# Some targets do not have the .size directive.
+# RUN: %clang -target x86_64-unknown-unknown-elf %S/Inputs/symbol-binding.s -c -o %t.o
+# RUN: %lldb %t.o -s %s -o quit | FileCheck %s
+
+image lookup --address 4
+# CHECK: Summary: symbol-binding.test.tmp.o`case1_global
+image lookup --address 5
+# CHECK: Summary: symbol-binding.test.tmp.o`case2_weak
+image lookup --address 6
+# CHECK: Summary: symbol-binding.test.tmp.o`case3_global
+image dump symtab
+# CHECK:     Index   UserID DSX Type            File Address/Value Load Address       Size               Flags      Name
+# CHECK-NEXT:------- ------ --- --------------- ------------------ ------------------ ------------------ ---------- ----------------------------------
+# CHECK-NEXT:[    0]      1     Code            0x0000000000000004                    0x0000000000000001 0x00000000 case1_local
+# CHECK-NEXT:[    1]      2     Code            0x0000000000000005                    0x0000000000000001 0x00000000 case2_local
+# CHECK-NEXT:[    2]      3     Code            0x0000000000000003                    0x0000000000000001 0x00000000 sizeend
+# CHECK-NEXT:[    3]      4     Code            0x0000000000000001                    0x0000000000000002 0x00000000 sizeful
+# CHECK-NEXT:[    4]      5     Code            0x0000000000000001                    0x0000000000000002 0x00000000 sizeless
+# CHECK-NEXT:[    5]      6   X Code            0x0000000000000004                    0x0000000000000001 0x00000010 case1_global
+# CHECK-NEXT:[    6]      7     Code            0x0000000000000005                    0x0000000000000001 0x00000020 case2_weak
+# CHECK-NEXT:[    7]      8   X Code            0x0000000000000006                    0x0000000000000001 0x00000010 case3_global
+# CHECK-NEXT:[    8]      9     Code            0x0000000000000006                    0x0000000000000001 0x00000020 case3_weak
diff --git a/src/llvm-project/lldb/test/Shell/SymbolFile/target-symbols-add-unwind.test b/src/llvm-project/lldb/test/Shell/SymbolFile/target-symbols-add-unwind.test
new file mode 100644
index 0000000..b4f0cc4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/SymbolFile/target-symbols-add-unwind.test
@@ -0,0 +1,26 @@
+# TODO: When it's possible to run "image show-unwind" without a running
+# process, we can remove the unsupported line below, and hard-code an ELF
+# triple in the test.
+# UNSUPPORTED: system-windows, system-darwin
+
+# RUN: cd %T
+# RUN: %clang_host %S/Inputs/target-symbols-add-unwind.c -g \
+# RUN:   -fno-unwind-tables -o target-symbols-add-unwind.debug
+# RUN: llvm-objcopy --strip-debug target-symbols-add-unwind.debug \
+# RUN:   target-symbols-add-unwind.stripped
+# RUN: %lldb target-symbols-add-unwind.stripped -s %s -o quit | FileCheck %s
+
+process launch --stop-at-entry
+image show-unwind -n main
+# CHECK-LABEL: image show-unwind -n main
+# CHECK-NOT: debug_frame UnwindPlan:
+
+target symbols add -s target-symbols-add-unwind.stripped target-symbols-add-unwind.debug
+# CHECK-LABEL: target symbols add
+# CHECK: symbol file {{.*}} has been added to {{.*}}
+
+image show-unwind -n main
+# CHECK-LABEL: image show-unwind -n main
+# CHECK: debug_frame UnwindPlan:
+# CHECK-NEXT: This UnwindPlan originally sourced from DWARF CFI
+# CHECK-NEXT: This UnwindPlan is sourced from the compiler: yes.
diff --git a/src/llvm-project/lldb/lit/Unwind/Inputs/call-asm.c b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/call-asm.c
similarity index 100%
rename from src/llvm-project/lldb/lit/Unwind/Inputs/call-asm.c
rename to src/llvm-project/lldb/test/Shell/Unwind/Inputs/call-asm.c
diff --git a/src/llvm-project/lldb/lit/Unwind/Inputs/eh-frame-dwarf-unwind.s b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind.s
similarity index 100%
rename from src/llvm-project/lldb/lit/Unwind/Inputs/eh-frame-dwarf-unwind.s
rename to src/llvm-project/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind.s
diff --git a/src/llvm-project/lldb/test/Shell/Unwind/Inputs/eh-frame-small-fde.s b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/eh-frame-small-fde.s
new file mode 100644
index 0000000..b08436a
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/eh-frame-small-fde.s
@@ -0,0 +1,43 @@
+        .text
+
+        .type   bar, @function
+bar:
+        .cfi_startproc
+        leal    (%edi, %edi), %eax
+        ret
+        .cfi_endproc
+        .size   bar, .-bar
+
+        .type   foo, @function
+foo:
+        nop # Make the FDE entry start one byte later than the actual function.
+        .cfi_startproc
+        .cfi_register %rip, %r13
+        call    bar
+        addl    $1, %eax
+        jmp     *%r13 # Return
+        .cfi_endproc
+        .size   foo, .-foo
+
+        .globl  main
+        .type   main, @function
+main:
+        .cfi_startproc
+        pushq   %rbp
+        .cfi_def_cfa_offset 16
+        .cfi_offset 6, -16
+        movq    %rsp, %rbp
+        .cfi_def_cfa_register 6
+        movl    $47, %edi
+
+        # Non-standard calling convention. Put return address in r13.
+        pushq   %r13
+        leaq    1f(%rip), %r13
+        jmp     foo # call
+1:
+        popq    %r13
+        popq    %rbp
+        .cfi_def_cfa 7, 8
+        ret
+        .cfi_endproc
+        .size   main, .-main
diff --git a/src/llvm-project/lldb/lit/Unwind/Inputs/prefer-debug-over-eh-frame.s b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/prefer-debug-over-eh-frame.s
similarity index 100%
rename from src/llvm-project/lldb/lit/Unwind/Inputs/prefer-debug-over-eh-frame.s
rename to src/llvm-project/lldb/test/Shell/Unwind/Inputs/prefer-debug-over-eh-frame.s
diff --git a/src/llvm-project/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s
new file mode 100644
index 0000000..dd4453c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/thread-step-out-ret-addr-check.s
@@ -0,0 +1,25 @@
+        .text
+        .globl  asm_main
+asm_main:
+        sub $0x8, %rsp
+        movq $0, (%rsp)
+        push %rsp
+        jmp nonstandard_stub
+
+# Takes a single pointer argument via the stack, which is nonstandard for x64.
+# Executing 'thread step-out' here will initially attempt to write a
+# breakpoint to that stack address, but should fail because of the executable
+# memory check.
+        .globl nonstandard_stub
+nonstandard_stub:
+        mov (%rsp), %rdi
+        mov (%rdi), %rsi
+        add $1, %rsi
+        mov %rsi, (%rdi)
+
+        add $0x10, %rsp
+        ret
+
+#ifdef __linux__
+        .section .note.GNU-stack,"",@progbits
+#endif
diff --git a/src/llvm-project/lldb/test/Shell/Unwind/Inputs/trap_frame_sym_ctx.s b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/trap_frame_sym_ctx.s
new file mode 100644
index 0000000..50ede2d
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/trap_frame_sym_ctx.s
@@ -0,0 +1,42 @@
+        .text
+        .globl  bar
+bar:
+        .cfi_startproc
+        leal    (%edi, %edi), %eax
+        ret
+        .cfi_endproc
+
+        .globl  asm_main
+asm_main:
+        .cfi_startproc
+        pushq   %rbp
+        .cfi_def_cfa_offset 16
+        .cfi_offset %rbp, -16
+        movq    %rsp, %rbp
+        .cfi_def_cfa_register %rbp
+        movl    $47, %edi
+
+        # install tramp as return address
+        # (similar to signal return trampolines on some platforms)
+        leaq    tramp(%rip), %rax
+        pushq   %rax
+        jmp     bar # call, with return address pointing to tramp
+
+        popq    %rbp
+        .cfi_def_cfa %rsp, 8
+        ret
+        .cfi_endproc
+
+        .globl  tramp
+tramp:
+        .cfi_startproc
+        .cfi_signal_frame
+        # Emit cfi to line up with the frame created by asm_main
+        .cfi_def_cfa_offset 16
+        .cfi_offset %rbp, -16
+        .cfi_def_cfa_register %rbp
+        # copy asm_main's epilog to clean up the frame
+        popq    %rbp
+        .cfi_def_cfa %rsp, 8
+        ret
+        .cfi_endproc
diff --git a/src/llvm-project/lldb/lit/Unwind/Inputs/unwind-plan-dwarf-dump.s b/src/llvm-project/lldb/test/Shell/Unwind/Inputs/unwind-plan-dwarf-dump.s
similarity index 100%
rename from src/llvm-project/lldb/lit/Unwind/Inputs/unwind-plan-dwarf-dump.s
rename to src/llvm-project/lldb/test/Shell/Unwind/Inputs/unwind-plan-dwarf-dump.s
diff --git a/src/llvm-project/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test b/src/llvm-project/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test
new file mode 100644
index 0000000..c0b6e5e
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Unwind/eh-frame-dwarf-unwind.test
@@ -0,0 +1,23 @@
+# Test handing of dwarf expressions specifying the location of registers, if
+# those expressions refer to the frame's CFA value.
+
+# UNSUPPORTED: system-windows
+# REQUIRES: target-x86_64, native
+
+# RUN: %clang_host %p/Inputs/call-asm.c %p/Inputs/eh-frame-dwarf-unwind.s -o %t
+# RUN: %lldb %t -s %s -o exit | FileCheck %s
+
+breakpoint set -n bar
+# CHECK: Breakpoint 1: where = {{.*}}`bar
+
+process launch
+# CHECK: stop reason = breakpoint 1.1
+
+thread backtrace
+# CHECK: frame #0: {{.*}}`bar
+# CHECK: frame #1: {{.*}}`foo + 5
+# CHECK: frame #2: {{.*}}`asm_main + 22
+
+target modules show-unwind -n foo
+# CHECK: eh_frame UnwindPlan:
+# CHECK: row[0]: 0: CFA=rsp +8 => rip=DW_OP_lit8 , DW_OP_minus , DW_OP_deref , DW_OP_const1u 0x47, DW_OP_minus
diff --git a/src/llvm-project/lldb/test/Shell/Unwind/eh-frame-small-fde.test b/src/llvm-project/lldb/test/Shell/Unwind/eh-frame-small-fde.test
new file mode 100644
index 0000000..0ece6c2
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Unwind/eh-frame-small-fde.test
@@ -0,0 +1,22 @@
+# This test that we are able to unwind using eh_frame in case an FDE entry does
+# not cover the entire range of a function we are unwinding through.
+
+# REQUIRES: target-x86_64, system-linux, native
+
+# RUN: %clang_host %p/Inputs/eh-frame-small-fde.s -o %t
+# RUN: %lldb %t -s %s -o exit | FileCheck %s
+
+breakpoint set -n bar
+# CHECK: Breakpoint 1: where = {{.*}}`bar
+
+process launch
+# CHECK: stop reason = breakpoint 1.1
+
+thread backtrace
+# CHECK: frame #0: {{.*}}`bar
+# CHECK: frame #1: {{.*}}`foo + 6
+# CHECK: frame #2: {{.*}}`main + 20
+
+target modules show-unwind -n foo
+# CHECK: eh_frame UnwindPlan:
+# CHECK: row[0]: 0: CFA=rsp +8 => rip=r13
diff --git a/src/llvm-project/lldb/test/Shell/Unwind/prefer-debug-over-eh-frame.test b/src/llvm-project/lldb/test/Shell/Unwind/prefer-debug-over-eh-frame.test
new file mode 100644
index 0000000..19e3ae1
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Unwind/prefer-debug-over-eh-frame.test
@@ -0,0 +1,24 @@
+# Test that we prefer debug_frame over eh_frame unwind plans. They usually
+# contain the same information, and we rarely have both kinds of entries for a
+# single function. However, in theory the debug_frame plan can be more complete,
+# whereas eh_frame is only required to be correct at places where exceptions can
+# be thrown.
+
+# UNSUPPORTED: system-windows
+# XFAIL: system-darwin
+# REQUIRES: target-x86_64, native
+
+# RUN: %clang_host -g %p/Inputs/call-asm.c %p/Inputs/prefer-debug-over-eh-frame.s -o %t
+# RUN: %lldb %t -s %s -o exit | FileCheck %s
+
+breakpoint set -n bar
+# CHECK: Breakpoint 1: where = {{.*}}`bar
+
+process launch
+# CHECK: stop reason = breakpoint 1.1
+
+target modules show-unwind -n foo
+# CHECK: Asynchronous (not restricted to call-sites) UnwindPlan is 'DWARF CFI plus augmentation from assembly parsing'
+# CHECK: Synchronous (restricted to call-sites) UnwindPlan is 'DWARF CFI'
+# CHECK: eh_frame UnwindPlan:
+# CHECK: debug_frame UnwindPlan:
diff --git a/src/llvm-project/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test b/src/llvm-project/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
new file mode 100644
index 0000000..e748b4e
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Unwind/thread-step-out-ret-addr-check.test
@@ -0,0 +1,18 @@
+# Test that `thread step-out` fails when the "return address"
+# points to non-executable memory.
+
+# REQUIRES: target-x86_64
+# UNSUPPORTED: system-windows
+
+# RUN: %clang_host %p/Inputs/call-asm.c -x assembler-with-cpp %p/Inputs/thread-step-out-ret-addr-check.s -o %t
+# RUN: %lldb %t -s %s -b 2>&1 | FileCheck %s
+
+breakpoint set -n nonstandard_stub
+# CHECK: Breakpoint 1: where = {{.*}}`nonstandard_stub
+
+process launch
+# CHECK: stop reason = breakpoint 1.1
+
+thread step-out
+# CHECK: Could not create return address breakpoint.
+# CHECK: Return address (0x{{[a-f0-9]*}}) did not point to executable memory.
diff --git a/src/llvm-project/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test b/src/llvm-project/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test
new file mode 100644
index 0000000..1bf1fb1
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Unwind/trap_frame_sym_ctx.test
@@ -0,0 +1,21 @@
+# Test that symbol contexts for trap handler frames are set correctly even when
+# the pc is at the start of the function.
+
+# UNSUPPORTED: system-windows
+# REQUIRES: target-x86_64, native
+
+# RUN: %clang_host %p/Inputs/call-asm.c %p/Inputs/trap_frame_sym_ctx.s -o %t
+# RUN: %lldb %t -s %s -o exit | FileCheck %s
+
+settings append target.trap-handler-names tramp
+
+breakpoint set -n bar
+# CHECK: Breakpoint 1: where = {{.*}}`bar
+
+process launch
+# CHECK: stop reason = breakpoint 1.1
+
+thread backtrace
+# CHECK: frame #0: {{.*}}`bar
+# CHECK: frame #1: {{.*}}`tramp
+# CHECK: frame #2: {{.*}}`main
diff --git a/src/llvm-project/lldb/test/Shell/Unwind/unwind-plan-dwarf-dump.test b/src/llvm-project/lldb/test/Shell/Unwind/unwind-plan-dwarf-dump.test
new file mode 100644
index 0000000..67b482b
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Unwind/unwind-plan-dwarf-dump.test
@@ -0,0 +1,14 @@
+# REQUIRES: target-x86_64, system-linux, native
+
+# RUN: %clang_host %p/Inputs/unwind-plan-dwarf-dump.s -o %t
+# RUN: %lldb %t -s %s -o exit | FileCheck %s
+
+breakpoint set -n main
+# CHECK: Breakpoint 1:
+
+process launch
+# CHECK: stop reason = breakpoint 1.1
+
+target modules show-unwind -n main
+# CHECK: eh_frame UnwindPlan:
+# CHECK: row[0]:    0: CFA=DW_OP_breg7 +0, DW_OP_const1u 0x00, DW_OP_plus  => rip=DW_OP_const1s -8, DW_OP_plus , DW_OP_deref
diff --git a/src/llvm-project/lldb/lit/Watchpoint/Inputs/main.cpp b/src/llvm-project/lldb/test/Shell/Watchpoint/Inputs/main.cpp
similarity index 100%
rename from src/llvm-project/lldb/lit/Watchpoint/Inputs/main.cpp
rename to src/llvm-project/lldb/test/Shell/Watchpoint/Inputs/main.cpp
diff --git a/src/llvm-project/lldb/test/Shell/Watchpoint/Inputs/thread-dbreg.c b/src/llvm-project/lldb/test/Shell/Watchpoint/Inputs/thread-dbreg.c
new file mode 100644
index 0000000..14f3474
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Watchpoint/Inputs/thread-dbreg.c
@@ -0,0 +1,23 @@
+#include <pthread.h>
+
+int g_watchme = 0;
+
+void *thread_func(void *arg) {
+  /* watchpoint trigger from subthread */
+  g_watchme = 2;
+  return 0;
+}
+
+int main() {
+  pthread_t thread;
+  if (pthread_create(&thread, 0, thread_func, 0))
+    return 1;
+
+  /* watchpoint trigger from main thread */
+  g_watchme = 1;
+
+  if (pthread_join(thread, 0))
+    return 2;
+
+  return 0;
+}
diff --git a/src/llvm-project/lldb/test/Shell/Watchpoint/SetErrorCases.test b/src/llvm-project/lldb/test/Shell/Watchpoint/SetErrorCases.test
new file mode 100644
index 0000000..cc67d0a
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Watchpoint/SetErrorCases.test
@@ -0,0 +1,28 @@
+# RUN: %clangxx_host %p/Inputs/main.cpp -g -o %t.out
+# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %s %t.out 2>&1 | FileCheck %s
+
+settings show interpreter.stop-command-source-on-error
+# CHECK: interpreter.stop-command-source-on-error (boolean) = false
+
+b main.cpp:11
+run
+# CHECK: stopped
+# CHECK-NEXT: stop reason = breakpoint
+
+watchpoint set
+# CHECK: Commands for setting a watchpoint.
+# CHECK: The following subcommands are supported:
+# CHECK: Set a watchpoint on an address by supplying an expression.
+# CHECK: Set a watchpoint on a variable.
+
+watchpoint set variable -w read_write
+# CHECK: error: required argument missing
+
+watchpoint set expression -w write --
+# CHECK: error: expression evaluation of address to watch failed
+
+watchpoint set expression MyAggregateDataType
+# CHECK: error: expression did not evaluate to an address
+
+watchpoint set variable -s -128
+# CHECK: error: invalid enumeration value
diff --git a/src/llvm-project/lldb/test/Shell/Watchpoint/netbsd-nouserdbregs.test b/src/llvm-project/lldb/test/Shell/Watchpoint/netbsd-nouserdbregs.test
new file mode 100644
index 0000000..884636c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/Watchpoint/netbsd-nouserdbregs.test
@@ -0,0 +1,22 @@
+# Check that 'watchpoint set' errors out gracefully when we can't set dbregs
+# and that new threads are monitored correctly even though we can't copy dbregs.
+
+# REQUIRES: system-netbsd && (target-x86 || target-x86_64) && !dbregs-set
+# RUN: %clang_host %p/Inputs/thread-dbreg.c -pthread -g -o %t.out
+# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %s %t.out 2>&1 | FileCheck %s
+
+settings show interpreter.stop-command-source-on-error
+# CHECK: interpreter.stop-command-source-on-error (boolean) = false
+
+b main
+# CHECK: Breakpoint {{[0-9]+}}: where = {{.*}}`main
+b thread_func
+# CHECK: Breakpoint {{[0-9]+}}: where = {{.*}}`thread_func
+run
+# CHECK: stop reason = breakpoint
+watchpoint set variable g_watchme
+# CHECK: error: Watchpoint creation failed
+cont
+# CHECK: stop reason = breakpoint
+cont
+# CHECK: Process {{[0-9]+}} exited with status = 0
diff --git a/src/llvm-project/lldb/lit/helper/__init__.py b/src/llvm-project/lldb/test/Shell/helper/__init__.py
similarity index 100%
rename from src/llvm-project/lldb/lit/helper/__init__.py
rename to src/llvm-project/lldb/test/Shell/helper/__init__.py
diff --git a/src/llvm-project/lldb/lit/helper/build.py b/src/llvm-project/lldb/test/Shell/helper/build.py
similarity index 100%
rename from src/llvm-project/lldb/lit/helper/build.py
rename to src/llvm-project/lldb/test/Shell/helper/build.py
diff --git a/src/llvm-project/lldb/test/Shell/helper/toolchain.py b/src/llvm-project/lldb/test/Shell/helper/toolchain.py
new file mode 100644
index 0000000..9d144bb
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/helper/toolchain.py
@@ -0,0 +1,137 @@
+import os
+import itertools
+import platform
+import subprocess
+import sys
+
+import lit.util
+from lit.llvm import llvm_config
+from lit.llvm.subst import FindTool
+from lit.llvm.subst import ToolSubst
+
+def use_lldb_substitutions(config):
+    # Set up substitutions for primary tools.  These tools must come from config.lldb_tools_dir
+    # which is basically the build output directory.  We do not want to find these in path or
+    # anywhere else, since they are specifically the programs which are actually being tested.
+
+    dsname = 'debugserver' if platform.system() in ['Darwin'] else 'lldb-server'
+    dsargs = [] if platform.system() in ['Darwin'] else ['gdbserver']
+
+    build_script = os.path.dirname(__file__)
+    build_script = os.path.join(build_script, 'build.py')
+    build_script_args = [build_script,
+                        '--compiler=any', # Default to best compiler
+                        '--arch=' + str(config.lldb_bitness)]
+    if config.lldb_lit_tools_dir:
+        build_script_args.append('--tools-dir={0}'.format(config.lldb_lit_tools_dir))
+    if config.lldb_tools_dir:
+        build_script_args.append('--tools-dir={0}'.format(config.lldb_tools_dir))
+    if config.llvm_libs_dir:
+        build_script_args.append('--libs-dir={0}'.format(config.llvm_libs_dir))
+
+    lldb_init = os.path.join(config.test_exec_root, 'Shell', 'lit-lldb-init')
+
+    primary_tools = [
+        ToolSubst('%lldb',
+                  command=FindTool('lldb'),
+                  extra_args=['--no-lldbinit', '-S', lldb_init]),
+        ToolSubst('%lldb-init',
+                  command=FindTool('lldb'),
+                  extra_args=['-S', lldb_init]),
+        ToolSubst('%debugserver',
+                  command=FindTool(dsname),
+                  extra_args=dsargs,
+                  unresolved='ignore'),
+        ToolSubst('%platformserver',
+                  command=FindTool('lldb-server'),
+                  extra_args=['platform'],
+                  unresolved='ignore'),
+        'lldb-test',
+        'lldb-instr',
+        ToolSubst('%build',
+                  command="'" + sys.executable + "'",
+                  extra_args=build_script_args)
+        ]
+
+    llvm_config.add_tool_substitutions(primary_tools,
+                                       [config.lldb_tools_dir])
+
+def _use_msvc_substitutions(config):
+    # If running from a Visual Studio Command prompt (e.g. vcvars), this will
+    # detect the include and lib paths, and find cl.exe and link.exe and create
+    # substitutions for each of them that explicitly specify /I and /L paths
+    cl = lit.util.which('cl')
+    link = lit.util.which('link')
+
+    if not cl or not link:
+        return
+
+    cl = '"' + cl + '"'
+    link = '"' + link + '"'
+    includes = os.getenv('INCLUDE', '').split(';')
+    libs = os.getenv('LIB', '').split(';')
+
+    config.available_features.add('msvc')
+    compiler_flags = ['"/I{}"'.format(x) for x in includes if os.path.exists(x)]
+    linker_flags = ['"/LIBPATH:{}"'.format(x) for x in libs if os.path.exists(x)]
+
+    tools = [
+        ToolSubst('%msvc_cl', command=cl, extra_args=compiler_flags),
+        ToolSubst('%msvc_link', command=link, extra_args=linker_flags)]
+    llvm_config.add_tool_substitutions(tools)
+    return
+
+def use_support_substitutions(config):
+    # Set up substitutions for support tools.  These tools can be overridden at the CMake
+    # level (by specifying -DLLDB_LIT_TOOLS_DIR), installed, or as a last resort, we can use
+    # the just-built version.
+    host_flags = ['--target=' + config.host_triple]
+    if platform.system() in ['Darwin']:
+        try:
+            out = subprocess.check_output(['xcrun', '--show-sdk-path']).strip()
+            res = 0
+        except OSError:
+            res = -1
+        if res == 0 and out:
+            sdk_path = lit.util.to_string(out)
+            llvm_config.lit_config.note('using SDKROOT: %r' % sdk_path)
+            host_flags += ['-isysroot', sdk_path]
+    elif platform.system() in ['NetBSD', 'OpenBSD', 'Linux']:
+        host_flags += ['-pthread']
+
+    if sys.platform.startswith('netbsd'):
+        # needed e.g. to use freshly built libc++
+        host_flags += ['-L' + config.llvm_libs_dir,
+                  '-Wl,-rpath,' + config.llvm_libs_dir]
+
+    # The clang module cache is used for building inferiors.
+    host_flags += ['-fmodules-cache-path={}'.format(config.clang_module_cache)]
+
+    host_flags = ' '.join(host_flags)
+    config.substitutions.append(('%clang_host', '%clang ' + host_flags))
+    config.substitutions.append(('%clangxx_host', '%clangxx ' + host_flags))
+    config.substitutions.append(('%clang_cl_host', '%clang_cl --target='+config.host_triple))
+
+    additional_tool_dirs=[]
+    if config.lldb_lit_tools_dir:
+        additional_tool_dirs.append(config.lldb_lit_tools_dir)
+
+    llvm_config.use_clang(additional_flags=['--target=specify-a-target-or-use-a-_host-substitution'],
+                          additional_tool_dirs=additional_tool_dirs,
+                          required=True)
+
+
+    if sys.platform == 'win32':
+        _use_msvc_substitutions(config)
+
+    have_lld = llvm_config.use_lld(additional_tool_dirs=additional_tool_dirs,
+                                   required=False)
+    if have_lld:
+        config.available_features.add('lld')
+
+
+    support_tools = ['yaml2obj', 'obj2yaml', 'llvm-pdbutil',
+                     'llvm-mc', 'llvm-readobj', 'llvm-objdump',
+                     'llvm-objcopy', 'lli']
+    additional_tool_dirs += [config.lldb_tools_dir, config.llvm_tools_dir]
+    llvm_config.add_tool_substitutions(support_tools, additional_tool_dirs)
diff --git a/src/llvm-project/lldb/test/Shell/lit-lldb-init.in b/src/llvm-project/lldb/test/Shell/lit-lldb-init.in
new file mode 100644
index 0000000..2c1925c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/lit-lldb-init.in
@@ -0,0 +1,5 @@
+# LLDB init file for the LIT tests.
+settings set symbols.enable-external-lookup false
+settings set plugin.process.gdb-remote.packet-timeout 60
+settings set interpreter.echo-comment-commands false
+settings set symbols.clang-modules-cache-path "@LLDB_TEST_MODULE_CACHE_LLDB@"
diff --git a/src/llvm-project/lldb/test/Shell/lit.cfg.py b/src/llvm-project/lldb/test/Shell/lit.cfg.py
new file mode 100644
index 0000000..cc6155f
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/lit.cfg.py
@@ -0,0 +1,127 @@
+# -*- Python -*-
+
+import os
+import platform
+import re
+import shutil
+import site
+import subprocess
+import sys
+
+import lit.formats
+from lit.llvm import llvm_config
+from lit.llvm.subst import FindTool
+from lit.llvm.subst import ToolSubst
+from distutils.spawn import find_executable
+
+site.addsitedir(os.path.dirname(__file__))
+from helper import toolchain
+
+# name: The name of this test suite.
+config.name = 'lldb-shell'
+
+# testFormat: The test format to use to interpret tests.
+config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
+
+# suffixes: A list of file extensions to treat as test files. This is overriden
+# by individual lit.local.cfg files in the test subdirectories.
+config.suffixes = ['.test', '.cpp', '.s']
+
+# excludes: A list of directories to exclude from the testsuite. The 'Inputs'
+# subdirectories contain auxiliary inputs for various tests in their parent
+# directories.
+config.excludes = ['Inputs', 'CMakeLists.txt', 'README.txt', 'LICENSE.txt']
+
+# test_source_root: The root path where tests are located.
+config.test_source_root = os.path.dirname(__file__)
+
+# test_exec_root: The root path where tests should be run.
+config.test_exec_root = os.path.join(config.lldb_obj_root, 'test')
+
+# Propagate LLDB_CAPTURE_REPRODUCER
+if 'LLDB_CAPTURE_REPRODUCER' in os.environ:
+  config.environment['LLDB_CAPTURE_REPRODUCER'] = os.environ[
+      'LLDB_CAPTURE_REPRODUCER']
+
+llvm_config.use_default_substitutions()
+toolchain.use_lldb_substitutions(config)
+toolchain.use_support_substitutions(config)
+
+
+if re.match(r'^arm(hf.*-linux)|(.*-linux-gnuabihf)', config.target_triple):
+    config.available_features.add("armhf-linux")
+
+def calculate_arch_features(arch_string):
+    # This will add a feature such as x86, arm, mips, etc for each built
+    # target
+    features = []
+    for arch in arch_string.split():
+        features.append(arch.lower())
+    return features
+
+# Run llvm-config and add automatically add features for whether we have
+# assertions enabled, whether we are in debug mode, and what targets we
+# are built for.
+llvm_config.feature_config(
+    [('--assertion-mode', {'ON': 'asserts'}),
+     ('--build-mode', {'DEBUG': 'debug'}),
+     ('--targets-built', calculate_arch_features)
+     ])
+
+# Clean the module caches in the test build directory. This is necessary in an
+# incremental build whenever clang changes underneath, so doing it once per
+# lit.py invocation is close enough.
+for cachedir in [config.clang_module_cache, config.lldb_module_cache]:
+  if os.path.isdir(cachedir):
+     print("Deleting module cache at %s."%cachedir)
+     shutil.rmtree(cachedir)
+
+# Set a default per-test timeout of 10 minutes. Setting a timeout per test
+# requires that killProcessAndChildren() is supported on the platform and
+# lit complains if the value is set but it is not supported.
+supported, errormsg = lit_config.maxIndividualTestTimeIsSupported
+if supported:
+    lit_config.maxIndividualTestTime = 600
+else:
+    lit_config.warning("Could not set a default per-test timeout. " + errormsg)
+
+
+# If running tests natively, check for CPU features needed for some tests.
+
+if 'native' in config.available_features:
+    cpuid_exe = lit.util.which('lit-cpuid', config.lldb_tools_dir)
+    if cpuid_exe is None:
+        lit_config.warning("lit-cpuid not found, tests requiring CPU extensions will be skipped")
+    else:
+        out, err, exitcode = lit.util.executeCommand([cpuid_exe])
+        if exitcode == 0:
+            for x in out.split():
+                config.available_features.add('native-cpu-%s' % x)
+        else:
+            lit_config.warning("lit-cpuid failed: %s" % err)
+
+if config.lldb_enable_python:
+    config.available_features.add('python')
+
+if config.lldb_enable_lua:
+    config.available_features.add('lua')
+
+if config.lldb_enable_lzma:
+    config.available_features.add('lzma')
+
+if find_executable('xz') != None:
+    config.available_features.add('xz')
+
+# NetBSD permits setting dbregs either if one is root
+# or if user_set_dbregs is enabled
+can_set_dbregs = True
+if platform.system() == 'NetBSD' and os.geteuid() != 0:
+    try:
+        output = subprocess.check_output(["/sbin/sysctl", "-n",
+          "security.models.extensions.user_set_dbregs"]).decode().strip()
+        if output != "1":
+            can_set_dbregs = False
+    except subprocess.CalledProcessError:
+        can_set_dbregs = False
+if can_set_dbregs:
+    config.available_features.add('dbregs-set')
diff --git a/src/llvm-project/lldb/test/Shell/lit.site.cfg.py.in b/src/llvm-project/lldb/test/Shell/lit.site.cfg.py.in
new file mode 100644
index 0000000..d998a0c
--- /dev/null
+++ b/src/llvm-project/lldb/test/Shell/lit.site.cfg.py.in
@@ -0,0 +1,45 @@
+@LIT_SITE_CFG_IN_HEADER@
+
+config.llvm_src_root = "@LLVM_SOURCE_DIR@"
+config.llvm_obj_root = "@LLVM_BINARY_DIR@"
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
+config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
+config.llvm_shlib_dir = "@SHLIBDIR@"
+config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
+config.lldb_obj_root = "@LLDB_BINARY_DIR@"
+config.lldb_libs_dir = "@LLDB_LIBS_DIR@"
+config.lldb_tools_dir = "@LLDB_TOOLS_DIR@"
+# Since it comes from the command line, it may have backslashes which
+# should not need to be escaped.
+config.lldb_lit_tools_dir = r"@LLDB_LIT_TOOLS_DIR@"
+config.target_triple = "@TARGET_TRIPLE@"
+config.python_executable = "@PYTHON_EXECUTABLE@"
+config.have_zlib = @LLVM_ENABLE_ZLIB@
+config.lldb_enable_lzma = @LLDB_ENABLE_LZMA@
+config.host_triple = "@LLVM_HOST_TRIPLE@"
+config.lldb_bitness = 64 if @LLDB_IS_64_BITS@ else 32
+config.lldb_enable_python = @LLDB_ENABLE_PYTHON@
+config.lldb_enable_lua = @LLDB_ENABLE_LUA@
+config.lldb_build_directory = "@LLDB_TEST_BUILD_DIRECTORY@"
+# The shell tests use their own module caches.
+config.lldb_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_LLDB@", "lldb-shell")
+config.clang_module_cache = os.path.join("@LLDB_TEST_MODULE_CACHE_CLANG@", "lldb-shell")
+
+# Support substitution of the tools and libs dirs with user parameters. This is
+# used when we can't determine the tool dir at configuration time.
+try:
+    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
+    config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
+    config.lldb_libs_dir = config.lldb_libs_dir % lit_config.params
+    config.lldb_tools_dir = config.lldb_tools_dir % lit_config.params
+    config.lldb_lit_tools_dir = config.lldb_lit_tools_dir % lit_config.params
+except KeyError as e:
+    key, = e.args
+    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
+
+import lit.llvm
+lit.llvm.initialize(lit_config, config)
+
+# Let the main config do the real work.
+lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/Shell/lit.cfg.py")
diff --git a/src/llvm-project/lldb/test/Unit/CMakeLists.txt b/src/llvm-project/lldb/test/Unit/CMakeLists.txt
new file mode 100644
index 0000000..e9b3d9e
--- /dev/null
+++ b/src/llvm-project/lldb/test/Unit/CMakeLists.txt
@@ -0,0 +1,7 @@
+# Configure the Unit test suite.
+configure_lit_site_cfg(
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
+  ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
+  MAIN_CONFIG
+  ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py)
+
diff --git a/src/llvm-project/lldb/test/Unit/README.md b/src/llvm-project/lldb/test/Unit/README.md
new file mode 100644
index 0000000..0302747
--- /dev/null
+++ b/src/llvm-project/lldb/test/Unit/README.md
@@ -0,0 +1,4 @@
+# LLDB Unit Tests
+
+This directory only exists for the lit test driver. The actual tests live in
+the `unittest` directory in top level LLDB directory.
diff --git a/src/llvm-project/lldb/test/Unit/lit.cfg.py b/src/llvm-project/lldb/test/Unit/lit.cfg.py
new file mode 100644
index 0000000..e53bcd3
--- /dev/null
+++ b/src/llvm-project/lldb/test/Unit/lit.cfg.py
@@ -0,0 +1,30 @@
+# -*- Python -*-
+
+# Configuration file for the 'lit' test runner.
+
+import os
+import sys
+
+import lit.formats
+from lit.llvm import llvm_config
+
+# name: The name of this test suite.
+config.name = 'lldb-unit'
+
+# suffixes: A list of file extensions to treat as test files.
+config.suffixes =  []
+
+# test_source_root: The root path where unit test binaries are located.
+# test_exec_root: The root path where tests should be run.
+config.test_source_root = os.path.join(config.lldb_obj_root, 'unittests')
+config.test_exec_root = config.test_source_root
+
+# One of our unit tests dynamically links against python.dll, and on Windows
+# it needs to be able to find it at runtime.  This is fine if Python is on your
+# system PATH, but if it's not, then this unit test executable will fail to run.
+# We can solve this by forcing the Python directory onto the system path here.
+llvm_config.with_system_environment('PATH')
+llvm_config.with_environment('PATH', os.path.dirname(sys.executable), append_path=True)
+
+# testFormat: The test format to use to interpret tests.
+config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, 'Tests')
diff --git a/src/llvm-project/lldb/test/Unit/lit.site.cfg.py.in b/src/llvm-project/lldb/test/Unit/lit.site.cfg.py.in
new file mode 100644
index 0000000..9d9bcd4
--- /dev/null
+++ b/src/llvm-project/lldb/test/Unit/lit.site.cfg.py.in
@@ -0,0 +1,29 @@
+@LIT_SITE_CFG_IN_HEADER@
+
+config.test_exec_root = "@LLDB_BINARY_DIR@"
+config.llvm_src_root = "@LLVM_SOURCE_DIR@"
+config.llvm_obj_root = "@LLVM_BINARY_DIR@"
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
+config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
+config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
+config.lldb_obj_root = "@LLDB_BINARY_DIR@"
+config.lldb_src_root = "@LLDB_SOURCE_DIR@"
+config.target_triple = "@TARGET_TRIPLE@"
+config.python_executable = "@PYTHON_EXECUTABLE@"
+
+# Support substitution of the tools and libs dirs with user parameters. This is
+# used when we can't determine the tool dir at configuration time.
+try:
+    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
+    config.llvm_build_mode = config.llvm_build_mode % lit_config.params
+except KeyError as e:
+    key, = e.args
+    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
+
+import lit.llvm
+lit.llvm.initialize(lit_config, config)
+
+# Let the main config do the real work.
+lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/Unit/lit.cfg.py")
diff --git a/src/llvm-project/lldb/test/lit.cfg.py b/src/llvm-project/lldb/test/lit.cfg.py
new file mode 100644
index 0000000..f8ab797
--- /dev/null
+++ b/src/llvm-project/lldb/test/lit.cfg.py
@@ -0,0 +1,15 @@
+# -*- Python -*-
+
+import os
+
+import lit.formats
+from lit.llvm import llvm_config
+
+# This is the top level configuration. Most of these configuration options will
+# be overriden by individual lit configuration files in the test
+# subdirectories. Anything configured here will *not* be loaded when pointing
+# lit at on of the subdirectories.
+
+config.name = 'lldb'
+config.test_source_root = os.path.dirname(__file__)
+config.test_exec_root = os.path.join(config.lldb_obj_root, 'test')
diff --git a/src/llvm-project/lldb/test/lit.site.cfg.py.in b/src/llvm-project/lldb/test/lit.site.cfg.py.in
new file mode 100644
index 0000000..49d789d
--- /dev/null
+++ b/src/llvm-project/lldb/test/lit.site.cfg.py.in
@@ -0,0 +1,29 @@
+@LIT_SITE_CFG_IN_HEADER@
+
+config.test_exec_root = "@LLDB_BINARY_DIR@"
+config.llvm_src_root = "@LLVM_SOURCE_DIR@"
+config.llvm_obj_root = "@LLVM_BINARY_DIR@"
+config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
+config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
+config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
+config.lldb_obj_root = "@LLDB_BINARY_DIR@"
+config.lldb_src_root = "@LLDB_SOURCE_DIR@"
+config.target_triple = "@TARGET_TRIPLE@"
+config.python_executable = "@PYTHON_EXECUTABLE@"
+
+# Support substitution of the tools and libs dirs with user parameters. This is
+# used when we can't determine the tool dir at configuration time.
+try:
+    config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+    config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
+    config.llvm_build_mode = config.llvm_build_mode % lit_config.params
+except KeyError as e:
+    key, = e.args
+    lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
+
+import lit.llvm
+lit.llvm.initialize(lit_config, config)
+
+# Let the main config do the real work.
+lit_config.load_config(config, "@LLDB_SOURCE_DIR@/test/lit.cfg.py")
diff --git a/src/llvm-project/lldb/test/testcases b/src/llvm-project/lldb/test/testcases
deleted file mode 120000
index f4a13dc..0000000
--- a/src/llvm-project/lldb/test/testcases
+++ /dev/null
@@ -1 +0,0 @@
-../packages/Python/lldbsuite/test
\ No newline at end of file
diff --git a/src/llvm-project/lldb/third_party/Python/module/pexpect-4.6/pexpect/pty_spawn.py b/src/llvm-project/lldb/third_party/Python/module/pexpect-4.6/pexpect/pty_spawn.py
index e0e2b54..6b9ad3f 100644
--- a/src/llvm-project/lldb/third_party/Python/module/pexpect-4.6/pexpect/pty_spawn.py
+++ b/src/llvm-project/lldb/third_party/Python/module/pexpect-4.6/pexpect/pty_spawn.py
@@ -640,7 +640,7 @@
             # this to happen. I think isalive() reports True, but the
             # process is dead to the kernel.
             # Make one last attempt to see if the kernel is up to date.
-            time.sleep(self.delayafterterminate)
+            time.sleep(self.delayafterterminate * 10)
             if not self.isalive():
                 return True
             else:
diff --git a/src/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/case.py b/src/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/case.py
index 7d6c54e..c567037 100644
--- a/src/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/case.py
+++ b/src/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/case.py
@@ -753,7 +753,7 @@
             elements = (seq_type_name.capitalize(), seq1_repr, seq2_repr)
             differing = '%ss differ: %s != %s\n' % elements
 
-            for i in xrange(min(len1, len2)):
+            for i in range(min(len1, len2)):
                 try:
                     item1 = seq1[i]
                 except (TypeError, IndexError, NotImplementedError):
diff --git a/src/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/loader.py b/src/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/loader.py
index 996dd76..87edddc 100644
--- a/src/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/loader.py
+++ b/src/llvm-project/lldb/third_party/Python/module/unittest2/unittest2/loader.py
@@ -117,7 +117,7 @@
             return self.loadTestsFromModule(obj)
         elif isinstance(obj, type) and issubclass(obj, unittest.TestCase):
             return self.loadTestsFromTestCase(obj)
-        elif (isinstance(obj, types.UnboundMethodType) and
+        elif (isinstance(obj, (types.MethodType, types.FunctionType)) and
               isinstance(parent, type) and
               issubclass(parent, case.TestCase)):
             return self.suiteClass([parent(obj.__name__)])
diff --git a/src/llvm-project/lldb/tools/CMakeLists.txt b/src/llvm-project/lldb/tools/CMakeLists.txt
index 80fec62..1585fd4 100644
--- a/src/llvm-project/lldb/tools/CMakeLists.txt
+++ b/src/llvm-project/lldb/tools/CMakeLists.txt
@@ -8,12 +8,13 @@
 add_subdirectory(lldb-test EXCLUDE_FROM_ALL)
 
 add_lldb_tool_subdirectory(lldb-instr)
-add_lldb_tool_subdirectory(lldb-mi)
 add_lldb_tool_subdirectory(lldb-vscode)
 
 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
-  add_subdirectory(darwin-debug)
-  add_subdirectory(debugserver)
+  add_lldb_tool_subdirectory(darwin-debug)
+  if(NOT LLDB_USE_SYSTEM_DEBUGSERVER)
+    add_lldb_tool_subdirectory(debugserver)
+  endif()
 endif()
 
 if (LLDB_CAN_USE_LLDB_SERVER)
diff --git a/src/llvm-project/lldb/tools/argdumper/CMakeLists.txt b/src/llvm-project/lldb/tools/argdumper/CMakeLists.txt
index d076748..9249463 100644
--- a/src/llvm-project/lldb/tools/argdumper/CMakeLists.txt
+++ b/src/llvm-project/lldb/tools/argdumper/CMakeLists.txt
@@ -1,6 +1,6 @@
 add_lldb_tool(lldb-argdumper ADD_TO_FRAMEWORK
   argdumper.cpp
 
-  LINK_LIBS
-    lldbUtility
+  LINK_COMPONENTS
+    Support
 )
diff --git a/src/llvm-project/lldb/tools/argdumper/argdumper.cpp b/src/llvm-project/lldb/tools/argdumper/argdumper.cpp
index 7fd8999..1cf0d6d 100644
--- a/src/llvm-project/lldb/tools/argdumper/argdumper.cpp
+++ b/src/llvm-project/lldb/tools/argdumper/argdumper.cpp
@@ -6,27 +6,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "lldb/Utility/JSON.h"
-#include "lldb/Utility/StreamString.h"
+#include "llvm/Support/JSON.h"
 
-#include <iostream>
-
-using namespace lldb_private;
+using namespace llvm;
 
 int main(int argc, char *argv[]) {
-  JSONArray::SP arguments(new JSONArray());
+  json::Array Arguments;
   for (int i = 1; i < argc; i++) {
-    arguments->AppendObject(JSONString::SP(new JSONString(argv[i])));
+    Arguments.push_back(argv[i]);
   }
-
-  JSONObject::SP object(new JSONObject());
-  object->SetObject("arguments", arguments);
-
-  StreamString ss;
-
-  object->Write(ss);
-
-  std::cout << ss.GetData() << std::endl;
-
+  llvm::outs() << json::Object({{"arguments", std::move(Arguments)}});
   return 0;
 }
diff --git a/src/llvm-project/lldb/tools/compact-unwind/compact-unwind-dumper.c b/src/llvm-project/lldb/tools/compact-unwind/compact-unwind-dumper.c
index 570c429..d4706ea 100644
--- a/src/llvm-project/lldb/tools/compact-unwind/compact-unwind-dumper.c
+++ b/src/llvm-project/lldb/tools/compact-unwind/compact-unwind-dumper.c
@@ -1149,7 +1149,7 @@
     print_encoding_x86_64(baton, function_start, encoding);
   } else if (baton.cputype == CPU_TYPE_I386) {
     print_encoding_i386(baton, function_start, encoding);
-  } else if (baton.cputype == CPU_TYPE_ARM64) {
+  } else if (baton.cputype == CPU_TYPE_ARM64 || baton.cputype == CPU_TYPE_ARM64_32) {
     print_encoding_arm64(baton, function_start, encoding);
   } else if (baton.cputype == CPU_TYPE_ARM) {
     print_encoding_armv7(baton, function_start, encoding);
diff --git a/src/llvm-project/lldb/tools/debugserver/source/CMakeLists.txt b/src/llvm-project/lldb/tools/debugserver/source/CMakeLists.txt
index 303fd28..a7d789d 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/src/llvm-project/lldb/tools/debugserver/source/CMakeLists.txt
@@ -28,7 +28,7 @@
   if(LLDB_CODESIGN_IDENTITY)
     set(${result} ${LLDB_CODESIGN_IDENTITY} PARENT_SCOPE)
     check_certificate(${LLDB_CODESIGN_IDENTITY} available)
-    if(NOT available AND NOT LLDB_USE_SYSTEM_DEBUGSERVER)
+    if(NOT available)
       message(WARNING "LLDB_CODESIGN_IDENTITY not found: '${LLDB_CODESIGN_IDENTITY}' ${not_found_help}")
     endif()
     return()
@@ -41,9 +41,7 @@
     return()
   endif()
 
-  if(NOT LLDB_USE_SYSTEM_DEBUGSERVER)
-    message(WARNING "Development code sign identiy not found: 'lldb_codesign' ${not_found_help}")
-  endif()
+  message(WARNING "Development code sign identiy not found: 'lldb_codesign' ${not_found_help}")
 
   # LLVM pendant: fallback if available
   if(LLVM_CODESIGNING_IDENTITY)
@@ -109,8 +107,6 @@
     if(NOT BACKBOARD_LIBRARY)
       set(SKIP_TEST_DEBUGSERVER ON CACHE BOOL "" FORCE)
     endif()
-  else()
-    find_library(COCOA_LIBRARY Cocoa)
   endif()
 endif()
 
@@ -127,132 +123,150 @@
   endif()
 endif()
 
-#if(build_and_sign_debugserver)
-  set(generated_mach_interfaces
-    ${CMAKE_CURRENT_BINARY_DIR}/mach_exc.h
-    ${CMAKE_CURRENT_BINARY_DIR}/mach_excServer.c
-    ${CMAKE_CURRENT_BINARY_DIR}/mach_excUser.c
-    )
-  add_custom_command(OUTPUT ${generated_mach_interfaces}
-    COMMAND mig ${CMAKE_CURRENT_SOURCE_DIR}/MacOSX/dbgnub-mig.defs
-    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MacOSX/dbgnub-mig.defs
-    )
-
-  set(DEBUGSERVER_VERS_GENERATED_FILE ${CMAKE_CURRENT_BINARY_DIR}/debugserver_vers.c)
-  set_source_files_properties(${DEBUGSERVER_VERS_GENERATED_FILE} PROPERTIES GENERATED 1)
-
-  add_custom_command(OUTPUT ${DEBUGSERVER_VERS_GENERATED_FILE}
-    COMMAND ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
-            ${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj debugserver
-            > ${DEBUGSERVER_VERS_GENERATED_FILE}
-    DEPENDS ${LLDB_SOURCE_DIR}/scripts/generate-vers.pl
-            ${LLDB_SOURCE_DIR}/lldb.xcodeproj/project.pbxproj
-    )
-
-  set(lldbDebugserverCommonSources
-    DNBArch.cpp
-    DNBBreakpoint.cpp
-    DNB.cpp
-    DNBDataRef.cpp
-    DNBError.cpp
-    DNBLog.cpp
-    DNBRegisterInfo.cpp
-    DNBThreadResumeActions.cpp
-    JSON.cpp
-    StdStringExtractor.cpp
-    # JSON reader depends on the following LLDB-common files
-    ${LLDB_SOURCE_DIR}/source/Host/common/StringConvert.cpp
-    ${LLDB_SOURCE_DIR}/source/Host/common/SocketAddress.cpp
-    # end JSON reader dependencies
-    libdebugserver.cpp
-    PseudoTerminal.cpp
-    PThreadEvent.cpp
-    PThreadMutex.cpp
-    RNBContext.cpp
-    RNBRemote.cpp
-    RNBServices.cpp
-    RNBSocket.cpp
-    SysSignal.cpp
-    TTYState.cpp
-
-    MacOSX/CFBundle.cpp
-    MacOSX/CFString.cpp
-    MacOSX/Genealogy.cpp
-    MacOSX/MachException.cpp
-    MacOSX/MachProcess.mm
-    MacOSX/MachTask.mm
-    MacOSX/MachThread.cpp
-    MacOSX/MachThreadList.cpp
-    MacOSX/MachVMMemory.cpp
-    MacOSX/MachVMRegion.cpp
-    MacOSX/OsLogger.cpp
-    ${generated_mach_interfaces}
-    ${DEBUGSERVER_VERS_GENERATED_FILE})
-
-  add_library(lldbDebugserverCommon ${lldbDebugserverCommonSources})
-  set_target_properties(lldbDebugserverCommon PROPERTIES FOLDER "lldb libraries/debugserver")
-
-  target_link_libraries(lldbDebugserverCommon
-                        INTERFACE ${COCOA_LIBRARY}
-                        ${CORE_FOUNDATION_LIBRARY}
-                        ${FOUNDATION_LIBRARY}
-                        ${BACKBOARD_LIBRARY}
-                        ${FRONTBOARD_LIBRARY}
-                        ${SPRINGBOARD_LIBRARY}
-                        ${MOBILESERVICES_LIBRARY}
-                        ${LOCKDOWN_LIBRARY}
-                        lldbDebugserverArchSupport
-                        lldbDebugserverDarwin_DarwinLog
-                        ${LIBCOMPRESSION})
-  if(HAVE_LIBCOMPRESSION)
-    set_property(TARGET lldbDebugserverCommon APPEND PROPERTY
-                 COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
-  endif()
-  set(LLVM_OPTIONAL_SOURCES ${lldbDebugserverCommonSources})
-  add_lldb_tool(debugserver ADD_TO_FRAMEWORK
-    debugserver.cpp
-    LINK_LIBS lldbDebugserverCommon
-    ENTITLEMENTS ${entitlements}
+set(generated_mach_interfaces
+  ${CMAKE_CURRENT_BINARY_DIR}/mach_exc.h
+  ${CMAKE_CURRENT_BINARY_DIR}/mach_excServer.c
+  ${CMAKE_CURRENT_BINARY_DIR}/mach_excUser.c
+  )
+add_custom_command(OUTPUT ${generated_mach_interfaces}
+  COMMAND mig ${CMAKE_CURRENT_SOURCE_DIR}/MacOSX/dbgnub-mig.defs
+  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/MacOSX/dbgnub-mig.defs
   )
 
-  set_target_properties(debugserver PROPERTIES FOLDER "lldb libraries/debugserver")
+set(DEBUGSERVER_VERS_GENERATED_FILE ${CMAKE_CURRENT_BINARY_DIR}/debugserver_vers.c)
+configure_file(debugserver_vers.c.in
+               ${DEBUGSERVER_VERS_GENERATED_FILE} @ONLY)
 
-  if(IOS)
-    set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_DEFINITIONS
-      WITH_LOCKDOWN
-      WITH_FBS
-      WITH_BKS
-      )
-    set_property(TARGET debugserver APPEND PROPERTY COMPILE_DEFINITIONS
-      WITH_LOCKDOWN
-      WITH_FBS
-      WITH_BKS
-      )
-    set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_FLAGS
-      -F${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
-      )
+set(lldbDebugserverCommonSources
+  DNBArch.cpp
+  DNBBreakpoint.cpp
+  DNB.cpp
+  DNBDataRef.cpp
+  DNBError.cpp
+  DNBLog.cpp
+  DNBRegisterInfo.cpp
+  DNBThreadResumeActions.cpp
+  JSON.cpp
+  StdStringExtractor.cpp
+  # JSON reader depends on the following LLDB-common files
+  ${LLDB_SOURCE_DIR}/source/Host/common/StringConvert.cpp
+  ${LLDB_SOURCE_DIR}/source/Host/common/SocketAddress.cpp
+  # end JSON reader dependencies
+  libdebugserver.cpp
+  PseudoTerminal.cpp
+  PThreadEvent.cpp
+  PThreadMutex.cpp
+  RNBContext.cpp
+  RNBRemote.cpp
+  RNBServices.cpp
+  RNBSocket.cpp
+  SysSignal.cpp
+  TTYState.cpp
 
-    add_library(lldbDebugserverCommon_NonUI ${lldbDebugserverCommonSources})
-    target_link_libraries(lldbDebugserverCommon_NonUI
-                        INTERFACE ${COCOA_LIBRARY}
-                        ${CORE_FOUNDATION_LIBRARY}
-                        ${FOUNDATION_LIBRARY}
-                        lldbDebugserverArchSupport
-                        lldbDebugserverDarwin_DarwinLog
-                        ${LIBCOMPRESSION})
-    if(HAVE_LIBCOMPRESSION)
-      set_property(TARGET lldbDebugserverCommon_NonUI APPEND PROPERTY
-                   COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
-    endif()
+  MacOSX/CFBundle.cpp
+  MacOSX/CFString.cpp
+  MacOSX/Genealogy.cpp
+  MacOSX/MachException.cpp
+  MacOSX/MachProcess.mm
+  MacOSX/MachTask.mm
+  MacOSX/MachThread.cpp
+  MacOSX/MachThreadList.cpp
+  MacOSX/MachVMMemory.cpp
+  MacOSX/MachVMRegion.cpp
+  MacOSX/OsLogger.cpp
+  ${generated_mach_interfaces}
+  ${DEBUGSERVER_VERS_GENERATED_FILE})
 
-    add_lldb_tool(debugserver-nonui
-      debugserver.cpp
+add_library(lldbDebugserverCommon ${lldbDebugserverCommonSources})
+set_target_properties(lldbDebugserverCommon PROPERTIES FOLDER "lldb libraries/debugserver")
 
-      LINK_LIBS
-        lldbDebugserverCommon_NonUI
+target_link_libraries(lldbDebugserverCommon
+                      INTERFACE ${COCOA_LIBRARY}
+                      ${CORE_FOUNDATION_LIBRARY}
+                      ${FOUNDATION_LIBRARY}
+                      ${BACKBOARD_LIBRARY}
+                      ${FRONTBOARD_LIBRARY}
+                      ${SPRINGBOARD_LIBRARY}
+                      ${MOBILESERVICES_LIBRARY}
+                      ${LOCKDOWN_LIBRARY}
+                      lldbDebugserverArchSupport
+                      lldbDebugserverDarwin_DarwinLog
+                      ${LIBCOMPRESSION})
+if(HAVE_LIBCOMPRESSION)
+  set_property(TARGET lldbDebugserverCommon APPEND PROPERTY
+                COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
+endif()
+set(LLVM_OPTIONAL_SOURCES ${lldbDebugserverCommonSources})
+add_lldb_tool(debugserver ADD_TO_FRAMEWORK
+  debugserver.cpp
+  LINK_LIBS lldbDebugserverCommon
+  ENTITLEMENTS ${entitlements}
+)
 
-      ENTITLEMENTS
-        ${entitlements}
-      )
+# Workaround for Xcode-specific code-signing behavior:
+# The XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY option causes debugserver to be copied
+# into the framework first and code-signed afterwards. Sign the copy manually.
+if (debugserver_codesign_identity AND LLDB_BUILD_FRAMEWORK AND
+    CMAKE_GENERATOR STREQUAL "Xcode")
+  if(NOT CMAKE_CODESIGN_ALLOCATE)
+    execute_process(
+      COMMAND xcrun -f codesign_allocate
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+      OUTPUT_VARIABLE CMAKE_CODESIGN_ALLOCATE
+    )
   endif()
-#endif()
+  if(entitlements)
+    set(pass_entitlements --entitlements ${entitlements})
+  endif()
+
+  set(copy_location ${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}/LLDB.framework/Versions/${LLDB_FRAMEWORK_VERSION}/Resources/debugserver)
+
+  add_custom_command(TARGET debugserver POST_BUILD
+    COMMAND ${CMAKE_COMMAND} -E
+            env CODESIGN_ALLOCATE=${CMAKE_CODESIGN_ALLOCATE}
+            xcrun codesign -f -s ${debugserver_codesign_identity}
+            ${pass_entitlements} ${copy_location}
+    COMMENT "Code-sign debugserver copy in the build-tree framework: ${copy_location}"
+  )
+endif()
+
+set_target_properties(debugserver PROPERTIES FOLDER "lldb libraries/debugserver")
+
+if(IOS)
+  set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_DEFINITIONS
+    WITH_LOCKDOWN
+    WITH_FBS
+    WITH_BKS
+    )
+  set_property(TARGET debugserver APPEND PROPERTY COMPILE_DEFINITIONS
+    WITH_LOCKDOWN
+    WITH_FBS
+    WITH_BKS
+    )
+  set_property(TARGET lldbDebugserverCommon APPEND PROPERTY COMPILE_FLAGS
+    -F${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
+    )
+
+  add_library(lldbDebugserverCommon_NonUI ${lldbDebugserverCommonSources})
+  target_link_libraries(lldbDebugserverCommon_NonUI
+                      INTERFACE ${COCOA_LIBRARY}
+                      ${CORE_FOUNDATION_LIBRARY}
+                      ${FOUNDATION_LIBRARY}
+                      lldbDebugserverArchSupport
+                      lldbDebugserverDarwin_DarwinLog
+                      ${LIBCOMPRESSION})
+  if(HAVE_LIBCOMPRESSION)
+    set_property(TARGET lldbDebugserverCommon_NonUI APPEND PROPERTY
+                  COMPILE_DEFINITIONS HAVE_LIBCOMPRESSION)
+  endif()
+
+  add_lldb_tool(debugserver-nonui
+    debugserver.cpp
+
+    LINK_LIBS
+      lldbDebugserverCommon_NonUI
+
+    ENTITLEMENTS
+      ${entitlements}
+    )
+endif()
diff --git a/src/llvm-project/lldb/tools/debugserver/source/DNB.cpp b/src/llvm-project/lldb/tools/debugserver/source/DNB.cpp
index 32a7348..8d9c691 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/DNB.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/DNB.cpp
@@ -1695,6 +1695,10 @@
   return MachProcess::GetOSVersionNumbers(major, minor, patch);
 }
 
+std::string DNBGetMacCatalystVersionString() {
+  return MachProcess::GetMacCatalystVersionString();
+}
+
 void DNBInitialize() {
   DNBLogThreadedIf(LOG_PROCESS, "DNBInitialize ()");
 #if defined(__i386__) || defined(__x86_64__)
@@ -1715,6 +1719,11 @@
     else if ((strcasecmp(arch, "x86_64") == 0) ||
              (strcasecmp(arch, "x86_64h") == 0))
       return DNBArchProtocol::SetArchitecture(CPU_TYPE_X86_64);
+    else if (strstr(arch, "arm64_32") == arch || 
+             strstr(arch, "aarch64_32") == arch)
+      return DNBArchProtocol::SetArchitecture(CPU_TYPE_ARM64_32);
+    else if (strstr(arch, "arm64e") == arch)
+      return DNBArchProtocol::SetArchitecture(CPU_TYPE_ARM64);
     else if (strstr(arch, "arm64") == arch || strstr(arch, "armv8") == arch ||
              strstr(arch, "aarch64") == arch)
       return DNBArchProtocol::SetArchitecture(CPU_TYPE_ARM64);
diff --git a/src/llvm-project/lldb/tools/debugserver/source/DNB.h b/src/llvm-project/lldb/tools/debugserver/source/DNB.h
index 074d0aa..e29fa0f 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/DNB.h
+++ b/src/llvm-project/lldb/tools/debugserver/source/DNB.h
@@ -20,6 +20,8 @@
 #include "MacOSX/ThreadInfo.h"
 #include <mach/thread_info.h>
 #include <string>
+#include <Availability.h>
+#include <mach/machine.h>
 
 #define DNB_EXPORT __attribute__((visibility("default")))
 
@@ -27,6 +29,10 @@
 #define CPU_TYPE_ARM64 ((cpu_type_t)12 | 0x01000000)
 #endif
 
+#ifndef CPU_TYPE_ARM64_32
+#define CPU_TYPE_ARM64_32 ((cpu_type_t)12 | 0x02000000)
+#endif
+
 typedef bool (*DNBShouldCancelCallback)(void *);
 
 void DNBInitialize();
@@ -226,5 +232,6 @@
 nub_bool_t DNBResolveExecutablePath(const char *path, char *resolved_path,
                                     size_t resolved_path_size);
 bool DNBGetOSVersionNumbers(uint64_t *major, uint64_t *minor, uint64_t *patch);
-
+/// \return the iOSSupportVersion of the host OS.
+std::string DNBGetMacCatalystVersionString();
 #endif
diff --git a/src/llvm-project/lldb/tools/debugserver/source/DNBDefs.h b/src/llvm-project/lldb/tools/debugserver/source/DNBDefs.h
index cd61b31..22cfce1 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/DNBDefs.h
+++ b/src/llvm-project/lldb/tools/debugserver/source/DNBDefs.h
@@ -341,6 +341,7 @@
       (1 << 8), // Assume eProfileMemory, get Anonymous memory as well.
 
   eProfileEnergy = (1 << 9),
+  eProfileEnergyCPUCap = (1 << 10),
 
   eProfileMemoryCap = (1 << 15),
 
diff --git a/src/llvm-project/lldb/tools/debugserver/source/JSON.cpp b/src/llvm-project/lldb/tools/debugserver/source/JSON.cpp
index 1b37767..12d96d4 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/JSON.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/JSON.cpp
@@ -516,13 +516,16 @@
   std::string value;
   std::string key;
   while (true) {
-    JSONValue::SP value_sp = ParseJSONValue();
+    JSONParser::Token token = GetToken(value);
+    if (token == JSONParser::Token::ArrayEnd)
+      return JSONValue::SP(array_up.release());
+    JSONValue::SP value_sp = ParseJSONValue(value, token);
     if (value_sp)
       array_up->AppendObject(value_sp);
     else
       break;
 
-    JSONParser::Token token = GetToken(value);
+    token = GetToken(value);
     if (token == JSONParser::Token::Comma) {
       continue;
     } else if (token == JSONParser::Token::ArrayEnd) {
@@ -537,6 +540,11 @@
 JSONValue::SP JSONParser::ParseJSONValue() {
   std::string value;
   const JSONParser::Token token = GetToken(value);
+  return ParseJSONValue(value, token);
+}
+
+JSONValue::SP JSONParser::ParseJSONValue(const std::string &value,
+                                         const Token &token) {
   switch (token) {
   case JSONParser::Token::ObjectStart:
     return ParseJSONObject();
diff --git a/src/llvm-project/lldb/tools/debugserver/source/JSON.h b/src/llvm-project/lldb/tools/debugserver/source/JSON.h
index b1c4a4c..70bfdd7 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/JSON.h
+++ b/src/llvm-project/lldb/tools/debugserver/source/JSON.h
@@ -292,6 +292,8 @@
   JSONValue::SP ParseJSONValue();
 
 protected:
+  JSONValue::SP ParseJSONValue(const std::string &value, const Token &token);
+
   JSONValue::SP ParseJSONObject();
 
   JSONValue::SP ParseJSONArray();
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt
index 7ad4a06..73ba649 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/CMakeLists.txt
@@ -1,14 +1,32 @@
-if("${CMAKE_OSX_ARCHITECTURES}" MATCHES ".*arm.*")
+# The debugserver build needs to conditionally include files depending on the
+# target architecture.
+#
+# Switch on the architecture specified by TARGET_TRIPLE, as
+# the llvm and swift build systems use this variable to identify the
+# target (through LLVM_HOST_TRIPLE).
+#
+# It would be possible to switch on CMAKE_OSX_ARCHITECTURES, but the swift
+# build does not provide it, preferring instead to pass arch-specific
+# CFLAGS etc explicitly. Switching on LLVM_HOST_TRIPLE is also an option,
+# but it breaks down when cross-compiling.
+
+if(TARGET_TRIPLE)
+  string(REGEX MATCH "^[^-]*" LLDB_DEBUGSERVER_ARCH ${TARGET_TRIPLE})
+else()
+  set(LLDB_DEBUGSERVER_ARCH ${CMAKE_OSX_ARCHITECTURES})
+endif()
+
+if("${LLDB_DEBUGSERVER_ARCH}" MATCHES ".*arm.*")
   list(APPEND SOURCES arm/DNBArchImpl.cpp arm64/DNBArchImplARM64.cpp)
   include_directories(${CURRENT_SOURCE_DIR}/arm ${CURRENT_SOURCE_DIR}/arm64)
 endif()
 
-if(NOT CMAKE_OSX_ARCHITECTURES OR "${CMAKE_OSX_ARCHITECTURES}" MATCHES ".*86.*")
+if(NOT LLDB_DEBUGSERVER_ARCH OR "${LLDB_DEBUGSERVER_ARCH}" MATCHES ".*86.*")
   list(APPEND SOURCES i386/DNBArchImplI386.cpp x86_64/DNBArchImplX86_64.cpp)
   include_directories(${CURRENT_SOURCE_DIR}/i386 ${CURRENT_SOURCE_DIR}/x86_64)
 endif()
 
-if("${CMAKE_OSX_ARCHITECTURES}" MATCHES ".*ppc.*")
+if("${LLDB_DEBUGSERVER_ARCH}" MATCHES ".*ppc.*")
   list(APPEND SOURCES ppc/DNBArchImpl.cpp)
   include_directories(${CURRENT_SOURCE_DIR}/ppc)
 endif()
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
index be50f04..a9f8956 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
@@ -690,9 +690,10 @@
   if (!m_activity_stream)
     return;
 
-  DNBLogThreadedIf(LOG_DARWIN_LOG, "DarwinLogCollector::%s(): canceling "
-                                   "activity stream %p",
-                   __FUNCTION__, reinterpret_cast<void *>(m_activity_stream));
+  DNBLogThreadedIf(LOG_DARWIN_LOG,
+                   "DarwinLogCollector::%s(): canceling "
+                   "activity stream %p",
+                   __FUNCTION__, static_cast<void *>(m_activity_stream));
   (*s_os_activity_stream_cancel)(m_activity_stream);
   m_activity_stream = nullptr;
 }
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachException.cpp b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachException.cpp
index 5023eb5..8690960 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachException.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachException.cpp
@@ -489,8 +489,10 @@
     return "EXC_MACH_SYSCALL";
   case EXC_RPC_ALERT:
     return "EXC_RPC_ALERT";
+#ifdef EXC_CRASH
   case EXC_CRASH:
     return "EXC_CRASH";
+#endif
   case EXC_RESOURCE:
     return "EXC_RESOURCE";
 #ifdef EXC_GUARD
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.h b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.h
index 0b8e1f4..e31486c 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.h
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.h
@@ -116,6 +116,7 @@
 #endif
   static bool GetOSVersionNumbers(uint64_t *major, uint64_t *minor,
                                   uint64_t *patch);
+  static std::string GetMacCatalystVersionString();
 #ifdef WITH_BKS
   static void BKSCleanupAfterAttach(const void *attach_token,
                                     DNBError &err_str);
@@ -233,12 +234,13 @@
   GetDeploymentInfo(const struct load_command&, uint64_t load_command_address,
                     uint32_t& major_version, uint32_t& minor_version,
                     uint32_t& patch_version);
-  bool GetMachOInformationFromMemory(nub_addr_t mach_o_header_addr,
+  bool GetMachOInformationFromMemory(uint32_t platform,
+                                     nub_addr_t mach_o_header_addr,
                                      int wordsize,
                                      struct mach_o_information &inf);
   JSONGenerator::ObjectSP FormatDynamicLibrariesIntoJSON(
       const std::vector<struct binary_image_information> &image_infos);
-  void GetAllLoadedBinariesViaDYLDSPI(
+  uint32_t GetAllLoadedBinariesViaDYLDSPI(
       std::vector<struct binary_image_information> &image_infos);
   JSONGenerator::ObjectSP GetLoadedDynamicLibrariesInfos(
       nub_process_t pid, nub_addr_t image_list_address, nub_addr_t image_count);
@@ -425,6 +427,7 @@
                                    const uuid_t uuid, const char *path));
   void (*m_dyld_process_info_release)(void *info);
   void (*m_dyld_process_info_get_cache)(void *info, void *cacheInfo);
+  uint32_t (*m_dyld_process_info_get_platform)(void *info);
 };
 
 #endif // __MachProcess_h__
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.mm b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
index 15a3477..40facdf 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachProcess.mm
@@ -44,6 +44,30 @@
 #include "CFBundle.h"
 #include "CFString.h"
 
+#ifndef PLATFORM_BRIDGEOS
+#define PLATFORM_BRIDGEOS 5
+#endif
+
+#ifndef PLATFORM_MACCATALYST
+#define PLATFORM_MACCATALYST 6
+#endif
+
+#ifndef PLATFORM_IOSSIMULATOR
+#define PLATFORM_IOSSIMULATOR 7
+#endif
+
+#ifndef PLATFORM_TVOSSIMULATOR
+#define PLATFORM_TVOSSIMULATOR 8
+#endif
+
+#ifndef PLATFORM_WATCHOSSIMULATOR
+#define PLATFORM_WATCHOSSIMULATOR 9
+#endif
+
+#ifndef PLATFORM_DRIVERKIT
+#define PLATFORM_DRIVERKIT 10
+#endif
+
 #ifdef WITH_SPRINGBOARD
 
 #include <CoreFoundation/CoreFoundation.h>
@@ -62,7 +86,7 @@
 #if defined(WITH_BKS) || defined(WITH_FBS)
 #import <Foundation/Foundation.h>
 static const int OPEN_APPLICATION_TIMEOUT_ERROR = 111;
-typedef void (*SetErrorFunction)(NSInteger, DNBError &);
+typedef void (*SetErrorFunction)(NSInteger, std::string, DNBError &);
 typedef bool (*CallOpenApplicationFunction)(NSString *bundleIDNSStr,
                                             NSDictionary *options,
                                             DNBError &error, pid_t *return_pid);
@@ -98,6 +122,7 @@
   mach_port_t client_port = [system_service createClientPort];
   __block dispatch_semaphore_t semaphore = dispatch_semaphore_create(0);
   __block ErrorFlavor open_app_error = no_error_enum_value;
+  __block std::string open_app_error_string;
   bool wants_pid = (return_pid != NULL);
   __block pid_t pid_in_block;
 
@@ -135,6 +160,9 @@
              } else {
                const char *error_str =
                    [(NSString *)[bks_error localizedDescription] UTF8String];
+               if (error_str) {
+                 open_app_error_string = error_str;
+               }
                DNBLogThreadedIf(LOG_PROCESS, "In completion handler for send "
                                              "event, got error \"%s\"(%ld).",
                                 error_str ? error_str : "<unknown error>",
@@ -166,7 +194,7 @@
     error.SetError(OPEN_APPLICATION_TIMEOUT_ERROR, DNBError::Generic);
     error.SetErrorString("timed out trying to launch app");
   } else if (open_app_error != no_error_enum_value) {
-    error_function(open_app_error, error);
+    error_function(open_app_error, open_app_error_string, error);
     DNBLogError("unable to launch the application with CFBundleIdentifier '%s' "
                 "bks_error = %u",
                 cstr, open_app_error);
@@ -221,19 +249,19 @@
   return app_state != BKSApplicationStateUnknown;
 }
 
-static void SetBKSError(NSInteger error_code, DNBError &error) {
+static void SetBKSError(NSInteger error_code, 
+                        std::string error_description, 
+                        DNBError &error) {
   error.SetError(error_code, DNBError::BackBoard);
   NSString *err_nsstr = ::BKSOpenApplicationErrorCodeToString(
       (BKSOpenApplicationErrorCode)error_code);
-  const char *err_str = NULL;
-  if (err_nsstr == NULL)
-    err_str = "unknown BKS error";
-  else {
+  std::string err_str = "unknown BKS error";
+  if (error_description.empty() == false) {
+    err_str = error_description;
+  } else if (err_nsstr != nullptr) {
     err_str = [err_nsstr UTF8String];
-    if (err_str == NULL)
-      err_str = "unknown BKS error";
   }
-  error.SetErrorString(err_str);
+  error.SetErrorString(err_str.c_str());
 }
 
 static bool BKSAddEventDataToOptions(NSMutableDictionary *options,
@@ -331,19 +359,19 @@
 }
 #endif
 
-static void SetFBSError(NSInteger error_code, DNBError &error) {
+static void SetFBSError(NSInteger error_code, 
+                        std::string error_description, 
+                        DNBError &error) {
   error.SetError((DNBError::ValueType)error_code, DNBError::FrontBoard);
   NSString *err_nsstr = ::FBSOpenApplicationErrorCodeToString(
       (FBSOpenApplicationErrorCode)error_code);
-  const char *err_str = NULL;
-  if (err_nsstr == NULL)
-    err_str = "unknown FBS error";
-  else {
+  std::string err_str = "unknown FBS error";
+  if (error_description.empty() == false) {
+    err_str = error_description;
+  } else if (err_nsstr != nullptr) {
     err_str = [err_nsstr UTF8String];
-    if (err_str == NULL)
-      err_str = "unknown FBS error";
   }
-  error.SetErrorString(err_str);
+  error.SetErrorString(err_str.c_str());
 }
 
 static bool FBSAddEventDataToOptions(NSMutableDictionary *options,
@@ -480,6 +508,8 @@
       (void (*)(void *info))dlsym(RTLD_DEFAULT, "_dyld_process_info_release");
   m_dyld_process_info_get_cache = (void (*)(void *info, void *cacheInfo))dlsym(
       RTLD_DEFAULT, "_dyld_process_info_get_cache");
+  m_dyld_process_info_get_platform = (uint32_t (*)(void *info))dlsym(
+      RTLD_DEFAULT, "_dyld_process_info_get_platform");
 
   DNBLogThreadedIf(LOG_PROCESS | LOG_VERBOSE, "%s", __PRETTY_FUNCTION__);
 }
@@ -600,11 +630,6 @@
     }
   }
 #if defined (LC_BUILD_VERSION)
-#ifndef PLATFORM_IOSSIMULATOR
-#define PLATFORM_IOSSIMULATOR 7
-#define PLATFORM_TVOSSIMULATOR 8
-#define PLATFORM_WATCHOSSIMULATOR 9
-#endif
   if (cmd == LC_BUILD_VERSION) {
     struct build_version_command build_vers;
     if (ReadMemory(load_command_address, sizeof(struct build_version_command),
@@ -618,6 +643,8 @@
     switch (build_vers.platform) {
     case PLATFORM_MACOS:
       return "macosx";
+    case PLATFORM_MACCATALYST:
+      return "maccatalyst";
     case PLATFORM_IOS:
     case PLATFORM_IOSSIMULATOR:
       return "ios";
@@ -629,6 +656,8 @@
       return "watchos";
     case PLATFORM_BRIDGEOS:
       return "bridgeos";
+    case PLATFORM_DRIVERKIT:
+      return "driverkit";
     }
   }
 #endif
@@ -643,7 +672,7 @@
 // commands.
 
 bool MachProcess::GetMachOInformationFromMemory(
-    nub_addr_t mach_o_header_addr, int wordsize,
+    uint32_t dyld_platform, nub_addr_t mach_o_header_addr, int wordsize,
     struct mach_o_information &inf) {
   uint64_t load_cmds_p;
   if (wordsize == 4) {
@@ -735,17 +764,48 @@
     }
 
     uint32_t major_version, minor_version, patch_version;
-    if (const char *platform = GetDeploymentInfo(lc, load_cmds_p,
-                                                 major_version, minor_version,
-                                                 patch_version)) {
-      inf.min_version_os_name = platform;
-      inf.min_version_os_version = "";
-      inf.min_version_os_version += std::to_string(major_version);
-      inf.min_version_os_version += ".";
-      inf.min_version_os_version += std::to_string(minor_version);
-      if (patch_version != 0) {
+    if (const char *lc_platform = GetDeploymentInfo(
+            lc, load_cmds_p, major_version, minor_version, patch_version)) {
+      // macCatalyst support.
+      //
+      // This handles two special cases:
+      //
+      // 1. Frameworks that have both a PLATFORM_MACOS and a
+      //    PLATFORM_MACCATALYST load command.  Make sure to select
+      //    the requested one.
+      //
+      // 2. The xctest binary is a pure macOS binary but is launched
+      //    with DYLD_FORCE_PLATFORM=6.
+      if (dyld_platform == PLATFORM_MACCATALYST &&
+          inf.mach_header.filetype == MH_EXECUTE &&
+          inf.min_version_os_name.empty() &&
+          (strcmp("macosx", lc_platform) == 0)) {
+        // DYLD says this *is* a macCatalyst process. If we haven't
+        // parsed any load commands, transform a macOS load command
+        // into a generic macCatalyst load command. It will be
+        // overwritten by a more specific one if there is one.  This
+        // is only done for the main executable. It is perfectly fine
+        // for a macCatalyst binary to link against a macOS-only framework.
+        inf.min_version_os_name = "maccatalyst";
+        inf.min_version_os_version = GetMacCatalystVersionString();
+      } else if (dyld_platform != PLATFORM_MACCATALYST &&
+                 inf.min_version_os_name == "macosx") {
+        // This is a binary with both PLATFORM_MACOS and
+        // PLATFORM_MACCATALYST load commands and the process is not
+        // running as PLATFORM_MACCATALYST. Stick with the
+        // "macosx" load command that we've already processed,
+        // ignore this one, which is presumed to be a
+        // PLATFORM_MACCATALYST one.
+      } else {
+        inf.min_version_os_name = lc_platform;
+        inf.min_version_os_version = "";
+        inf.min_version_os_version += std::to_string(major_version);
         inf.min_version_os_version += ".";
-        inf.min_version_os_version += std::to_string(patch_version);
+        inf.min_version_os_version += std::to_string(minor_version);
+        if (patch_version != 0) {
+          inf.min_version_os_version += ".";
+          inf.min_version_os_version += std::to_string(patch_version);
+        }
       }
     }
 
@@ -941,7 +1001,10 @@
     ////  Second, read the mach header / load commands for all the dylibs
 
     for (size_t i = 0; i < image_count; i++) {
-      if (!GetMachOInformationFromMemory(image_infos[i].load_address,
+      // The SPI to provide platform is not available on older systems.
+      uint32_t platform = 0;
+      if (!GetMachOInformationFromMemory(platform,
+                                         image_infos[i].load_address,
                                          pointer_size,
                                          image_infos[i].macho_info)) {
         return reply_sp;
@@ -972,8 +1035,9 @@
 // binary_image_information' - call
 // GetMachOInformationFromMemory to fill in the mach-o header/load command
 // details.
-void MachProcess::GetAllLoadedBinariesViaDYLDSPI(
+uint32_t MachProcess::GetAllLoadedBinariesViaDYLDSPI(
     std::vector<struct binary_image_information> &image_infos) {
+  uint32_t platform = 0;
   kern_return_t kern_ret;
   if (m_dyld_process_info_create) {
     dyld_process_info info =
@@ -988,9 +1052,12 @@
             image.load_address = mach_header_addr;
             image_infos.push_back(image);
           });
+      if (m_dyld_process_info_get_platform)
+        platform = m_dyld_process_info_get_platform(info);
       m_dyld_process_info_release(info);
     }
   }
+  return platform;
 }
 
 // Fetch information about all shared libraries using the dyld SPIs that exist
@@ -1011,10 +1078,11 @@
       pointer_size = 8;
 
     std::vector<struct binary_image_information> image_infos;
-    GetAllLoadedBinariesViaDYLDSPI(image_infos);
+    uint32_t platform = GetAllLoadedBinariesViaDYLDSPI(image_infos);
     const size_t image_count = image_infos.size();
     for (size_t i = 0; i < image_count; i++) {
-      GetMachOInformationFromMemory(image_infos[i].load_address, pointer_size,
+      GetMachOInformationFromMemory(platform,
+                                    image_infos[i].load_address, pointer_size,
                                     image_infos[i].macho_info);
     }
     return FormatDynamicLibrariesIntoJSON(image_infos);
@@ -1040,7 +1108,7 @@
       pointer_size = 8;
 
     std::vector<struct binary_image_information> all_image_infos;
-    GetAllLoadedBinariesViaDYLDSPI(all_image_infos);
+    uint32_t platform = GetAllLoadedBinariesViaDYLDSPI(all_image_infos);
 
     std::vector<struct binary_image_information> image_infos;
     const size_t macho_addresses_count = macho_addresses.size();
@@ -1055,7 +1123,8 @@
 
     const size_t image_infos_count = image_infos.size();
     for (size_t i = 0; i < image_infos_count; i++) {
-      GetMachOInformationFromMemory(image_infos[i].load_address, pointer_size,
+      GetMachOInformationFromMemory(platform,
+                                    image_infos[i].load_address, pointer_size,
                                     image_infos[i].macho_info);
     }
     return FormatDynamicLibrariesIntoJSON(image_infos);
@@ -1348,29 +1417,29 @@
 bool MachProcess::Signal(int signal, const struct timespec *timeout_abstime) {
   DNBLogThreadedIf(LOG_PROCESS,
                    "MachProcess::Signal (signal = %d, timeout = %p)", signal,
-                   reinterpret_cast<const void *>(timeout_abstime));
+                   static_cast<const void *>(timeout_abstime));
   nub_state_t state = GetState();
   if (::kill(ProcessID(), signal) == 0) {
     // If we were running and we have a timeout, wait for the signal to stop
     if (IsRunning(state) && timeout_abstime) {
-      DNBLogThreadedIf(LOG_PROCESS, "MachProcess::Signal (signal = %d, timeout "
-                                    "= %p) waiting for signal to stop "
-                                    "process...",
-                       signal, reinterpret_cast<const void *>(timeout_abstime));
+      DNBLogThreadedIf(LOG_PROCESS,
+                       "MachProcess::Signal (signal = %d, timeout "
+                       "= %p) waiting for signal to stop "
+                       "process...",
+                       signal, static_cast<const void *>(timeout_abstime));
       m_private_events.WaitForSetEvents(eEventProcessStoppedStateChanged,
                                         timeout_abstime);
       state = GetState();
       DNBLogThreadedIf(
           LOG_PROCESS,
           "MachProcess::Signal (signal = %d, timeout = %p) state = %s", signal,
-          reinterpret_cast<const void *>(timeout_abstime),
-          DNBStateAsString(state));
+          static_cast<const void *>(timeout_abstime), DNBStateAsString(state));
       return !IsRunning(state);
     }
     DNBLogThreadedIf(
         LOG_PROCESS,
         "MachProcess::Signal (signal = %d, timeout = %p) not waiting...",
-        signal, reinterpret_cast<const void *>(timeout_abstime));
+        signal, static_cast<const void *>(timeout_abstime));
     return true;
   }
   DNBError err(errno, DNBError::POSIX);
@@ -1674,10 +1743,10 @@
     bp = m_breakpoints.Add(addr, length, hardware);
 
   if (EnableBreakpoint(addr)) {
-    DNBLogThreadedIf(LOG_BREAKPOINTS, "MachProcess::CreateBreakpoint ( addr = "
-                                      "0x%8.8llx, length = %llu) => %p",
-                     (uint64_t)addr, (uint64_t)length,
-                     reinterpret_cast<void *>(bp));
+    DNBLogThreadedIf(LOG_BREAKPOINTS,
+                     "MachProcess::CreateBreakpoint ( addr = "
+                     "0x%8.8llx, length = %llu) => %p",
+                     (uint64_t)addr, (uint64_t)length, static_cast<void *>(bp));
     return bp;
   } else if (bp->Release() == 0) {
     m_breakpoints.Remove(addr);
@@ -1706,10 +1775,10 @@
   wp->SetIsWatchpoint(watch_flags);
 
   if (EnableWatchpoint(addr)) {
-    DNBLogThreadedIf(LOG_WATCHPOINTS, "MachProcess::CreateWatchpoint ( addr = "
-                                      "0x%8.8llx, length = %llu) => %p",
-                     (uint64_t)addr, (uint64_t)length,
-                     reinterpret_cast<void *>(wp));
+    DNBLogThreadedIf(LOG_WATCHPOINTS,
+                     "MachProcess::CreateWatchpoint ( addr = "
+                     "0x%8.8llx, length = %llu) => %p",
+                     (uint64_t)addr, (uint64_t)length, static_cast<void *>(wp));
     return wp;
   } else {
     DNBLogThreadedIf(LOG_WATCHPOINTS, "MachProcess::CreateWatchpoint ( addr = "
@@ -2238,7 +2307,7 @@
 
 size_t MachProcess::GetAvailableSTDOUT(char *buf, size_t buf_size) {
   DNBLogThreadedIf(LOG_PROCESS, "MachProcess::%s (&%p[%llu]) ...", __FUNCTION__,
-                   reinterpret_cast<void *>(buf), (uint64_t)buf_size);
+                   static_cast<void *>(buf), (uint64_t)buf_size);
   PTHREAD_MUTEX_LOCKER(locker, m_stdio_mutex);
   size_t bytes_available = m_stdout_data.size();
   if (bytes_available > 0) {
@@ -2398,7 +2467,7 @@
 
 size_t MachProcess::GetAsyncProfileData(char *buf, size_t buf_size) {
   DNBLogThreadedIf(LOG_PROCESS, "MachProcess::%s (&%p[%llu]) ...", __FUNCTION__,
-                   reinterpret_cast<void *>(buf), (uint64_t)buf_size);
+                   static_cast<void *>(buf), (uint64_t)buf_size);
   PTHREAD_MUTEX_LOCKER(locker, m_profile_data_mutex);
   if (m_profile_data.empty())
     return 0;
@@ -2543,6 +2612,18 @@
 #endif
 }
 
+std::string MachProcess::GetMacCatalystVersionString() {
+  @autoreleasepool {
+    NSDictionary *version_info =
+      [NSDictionary dictionaryWithContentsOfFile:
+       @"/System/Library/CoreServices/SystemVersion.plist"];
+    NSString *version_value = [version_info objectForKey: @"iOSSupportVersion"];
+    if (const char *version_str = [version_value UTF8String])
+      return version_str;
+  }
+  return {};
+}
+
 // Do the process specific setup for attach.  If this returns NULL, then there's
 // no
 // platform specific stuff to be done to wait for the attach.  If you get
@@ -2677,7 +2758,8 @@
           "debugserver timed out waiting for openApplication to complete.");
       attach_err.SetError(OPEN_APPLICATION_TIMEOUT_ERROR, DNBError::Generic);
     } else if (attach_error_code != FBSOpenApplicationErrorCodeNone) {
-      SetFBSError(attach_error_code, attach_err);
+      std::string empty_str;
+      SetFBSError(attach_error_code, empty_str, attach_err);
       DNBLogError("unable to launch the application with CFBundleIdentifier "
                   "'%s' bks_error = %ld",
                   bundleIDStr.c_str(), (NSInteger)attach_error_code);
@@ -2754,7 +2836,8 @@
           "debugserver timed out waiting for openApplication to complete.");
       attach_err.SetError(OPEN_APPLICATION_TIMEOUT_ERROR, DNBError::Generic);
     } else if (attach_error_code != BKSOpenApplicationErrorCodeNone) {
-      SetBKSError(attach_error_code, attach_err);
+      std::string empty_str;
+      SetBKSError(attach_error_code, empty_str, attach_err);
       DNBLogError("unable to launch the application with CFBundleIdentifier "
                   "'%s' bks_error = %ld",
                   bundleIDStr.c_str(), attach_error_code);
@@ -2918,8 +3001,8 @@
   DNBLogThreadedIf(LOG_PROCESS,
                    "%s( path = '%s', argv = %p, envp = %p, "
                    "launch_flavor = %u, disable_aslr = %d )",
-                   __FUNCTION__, path, reinterpret_cast<const void *>(argv),
-                   reinterpret_cast<const void *>(envp), launch_flavor,
+                   __FUNCTION__, path, static_cast<const void *>(argv),
+                   static_cast<const void *>(envp), launch_flavor,
                    disable_aslr);
 
   // Fork a child process for debugging
@@ -3061,11 +3144,12 @@
     MachProcess *process, int disable_aslr, DNBError &err) {
   posix_spawnattr_t attr;
   short flags;
-  DNBLogThreadedIf(LOG_PROCESS, "%s ( path='%s', argv=%p, envp=%p, "
-                                "working_dir=%s, stdin=%s, stdout=%s "
-                                "stderr=%s, no-stdio=%i)",
-                   __FUNCTION__, path, reinterpret_cast<const void *>(argv),
-                   reinterpret_cast<const void *>(envp), working_directory,
+  DNBLogThreadedIf(LOG_PROCESS,
+                   "%s ( path='%s', argv=%p, envp=%p, "
+                   "working_dir=%s, stdin=%s, stdout=%s "
+                   "stderr=%s, no-stdio=%i)",
+                   __FUNCTION__, path, static_cast<const void *>(argv),
+                   static_cast<const void *>(envp), working_directory,
                    stdin_path, stdout_path, stderr_path, no_stdio);
 
   err.SetError(::posix_spawnattr_init(&attr), DNBError::POSIX);
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachTask.mm b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachTask.mm
index 6aa4fb2..0d5a63a 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachTask.mm
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachTask.mm
@@ -754,7 +754,7 @@
       // to get all currently available exceptions for this task
       err = exception_message.Receive(
           mach_task->ExceptionPort(),
-          MACH_RCV_MSG | MACH_RCV_INTERRUPT | MACH_RCV_TIMEOUT, 0);
+          MACH_RCV_MSG | MACH_RCV_INTERRUPT | MACH_RCV_TIMEOUT, 1);
     } else if (periodic_timeout > 0) {
       // We need to stop periodically in this loop, so try and get a mach
       // message with a valid timeout (ms)
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachThread.cpp b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachThread.cpp
index b51ea69..80d6042 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachThread.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachThread.cpp
@@ -49,7 +49,7 @@
   DNBLogThreadedIf(LOG_THREAD | LOG_VERBOSE,
                    "MachThread::MachThread ( process = %p, tid = 0x%8.8" PRIx64
                    ", seq_id = %u )",
-                   reinterpret_cast<void *>(&m_process), m_unique_id, m_seq_id);
+                   static_cast<void *>(&m_process), m_unique_id, m_seq_id);
 }
 
 MachThread::~MachThread() {
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp
index 0fa4437..d2aae9d 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp
@@ -12,6 +12,7 @@
 
 #include "MachThreadList.h"
 
+#include "DNB.h"
 #include "DNBLog.h"
 #include "DNBThreadResumeActions.h"
 #include "MachProcess.h"
@@ -278,8 +279,12 @@
 #elif defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
     if (m_is_64_bit)
       DNBArchProtocol::SetArchitecture(CPU_TYPE_ARM64);
-    else
-      DNBArchProtocol::SetArchitecture(CPU_TYPE_ARM);
+    else {
+      if (process->GetCPUType() == CPU_TYPE_ARM64_32)
+        DNBArchProtocol::SetArchitecture(CPU_TYPE_ARM64_32);
+      else
+        DNBArchProtocol::SetArchitecture(CPU_TYPE_ARM);
+    }
 #endif
   }
 
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp
index 74ddae6..2b039c7 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/MachVMMemory.cpp
@@ -20,7 +20,7 @@
 
 #if defined(WITH_FBS) || defined(WITH_BKS)
 extern "C" {
-#import <sys/kern_memorystatus.h>
+#import <System/sys/kern_memorystatus.h>
 }
 #endif
 
diff --git a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
index ca4b46a..f99dbc4 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp
@@ -26,6 +26,10 @@
 #include <inttypes.h>
 #include <sys/sysctl.h>
 
+#if __has_feature(ptrauth_calls)
+#include <ptrauth.h>
+#endif
+
 // Break only in privileged or user mode
 // (PAC bits in the DBGWVRn_EL1 watchpoint control register)
 #define S_USER ((uint32_t)(2u << 1))
@@ -49,8 +53,6 @@
 
 static const uint8_t g_arm64_breakpoint_opcode[] = {
     0x00, 0x00, 0x20, 0xD4}; // "brk #0", 0xd4200000 in BE byte order
-static const uint8_t g_arm_breakpoint_opcode[] = {
-    0xFE, 0xDE, 0xFF, 0xE7}; // this armv7 insn also works in arm64
 
 // If we need to set one logical watchpoint by using
 // two hardware watchpoint registers, the watchpoint
@@ -69,6 +71,14 @@
 
   // Register this arch plug-in with the main protocol class
   DNBArchProtocol::RegisterArchPlugin(arch_plugin_info);
+
+  DNBArchPluginInfo arch_plugin_info_32 = {
+      CPU_TYPE_ARM64_32, DNBArchMachARM64::Create,
+      DNBArchMachARM64::GetRegisterSetInfo,
+      DNBArchMachARM64::SoftwareBreakpointOpcode};
+
+  // Register this arch plug-in with the main protocol class
+  DNBArchProtocol::RegisterArchPlugin(arch_plugin_info_32);
 }
 
 DNBArchProtocol *DNBArchMachARM64::Create(MachThread *thread) {
@@ -79,7 +89,7 @@
 
 const uint8_t *
 DNBArchMachARM64::SoftwareBreakpointOpcode(nub_size_t byte_size) {
-  return g_arm_breakpoint_opcode;
+  return g_arm64_breakpoint_opcode;
 }
 
 uint32_t DNBArchMachARM64::GetCPUType() { return CPU_TYPE_ARM64; }
@@ -87,7 +97,11 @@
 uint64_t DNBArchMachARM64::GetPC(uint64_t failValue) {
   // Get program counter
   if (GetGPRState(false) == KERN_SUCCESS)
+#if defined(__LP64__)
+    return arm_thread_state64_get_pc(m_state.context.gpr);
+#else
     return m_state.context.gpr.__pc;
+#endif
   return failValue;
 }
 
@@ -95,7 +109,17 @@
   // Get program counter
   kern_return_t err = GetGPRState(false);
   if (err == KERN_SUCCESS) {
+#if defined(__LP64__)
+#if __has_feature(ptrauth_calls)
+    // The incoming value could be garbage.  Strip it to avoid
+    // trapping when it gets resigned in the thread state.
+    value = (uint64_t) ptrauth_strip((void*) value, ptrauth_key_function_pointer);
+    value = (uint64_t) ptrauth_sign_unauthenticated((void*) value, ptrauth_key_function_pointer, 0);
+#endif
+    arm_thread_state64_set_pc_fptr (m_state.context.gpr, (void*) value);
+#else
     m_state.context.gpr.__pc = value;
+#endif
     err = SetGPRState();
   }
   return err == KERN_SUCCESS;
@@ -104,7 +128,11 @@
 uint64_t DNBArchMachARM64::GetSP(uint64_t failValue) {
   // Get stack pointer
   if (GetGPRState(false) == KERN_SUCCESS)
+#if defined(__LP64__)
+    return arm_thread_state64_get_sp(m_state.context.gpr);
+#else
     return m_state.context.gpr.__sp;
+#endif
   return failValue;
 }
 
@@ -161,8 +189,15 @@
         x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[0], x[11],
         x[12], x[13], x[14], x[15], x[16], x[17], x[18], x[19], x[20], x[21],
         x[22], x[23], x[24], x[25], x[26], x[27], x[28],
+#if defined(__LP64__)
+        (uint64_t) arm_thread_state64_get_fp (m_state.context.gpr),
+        (uint64_t) arm_thread_state64_get_lr (m_state.context.gpr),
+        (uint64_t) arm_thread_state64_get_sp (m_state.context.gpr),
+        (uint64_t) arm_thread_state64_get_pc (m_state.context.gpr),
+#else
         m_state.context.gpr.__fp, m_state.context.gpr.__lr,
         m_state.context.gpr.__sp, m_state.context.gpr.__pc,
+#endif
         m_state.context.gpr.__cpsr);
   }
   m_state.SetError(set, Read, kret);
@@ -558,12 +593,20 @@
   if (enable) {
     DNBLogThreadedIf(LOG_STEP,
                      "%s: Setting MDSCR_EL1 Single Step bit at pc 0x%llx",
+#if defined(__LP64__)
+                     __FUNCTION__, (uint64_t)arm_thread_state64_get_pc (m_state.context.gpr));
+#else
                      __FUNCTION__, (uint64_t)m_state.context.gpr.__pc);
+#endif
     m_state.dbg.__mdscr_el1 |= SS_ENABLE;
   } else {
     DNBLogThreadedIf(LOG_STEP,
                      "%s: Clearing MDSCR_EL1 Single Step bit at pc 0x%llx",
+#if defined(__LP64__)
+                     __FUNCTION__, (uint64_t)arm_thread_state64_get_pc (m_state.context.gpr));
+#else
                      __FUNCTION__, (uint64_t)m_state.context.gpr.__pc);
+#endif
     m_state.dbg.__mdscr_el1 &= ~(SS_ENABLE);
   }
 
@@ -646,27 +689,35 @@
   if (size > 8)
     return INVALID_NUB_HW_INDEX;
 
-  // arm64 watchpoints really have an 8-byte alignment requirement.  You can put
-  // a watchpoint on a 4-byte
-  // offset address but you can only watch 4 bytes with that watchpoint.
-
-  // arm64 watchpoints on an 8-byte (double word) aligned addr can watch any
-  // bytes in that
-  // 8-byte long region of memory.  They can watch the 1st byte, the 2nd byte,
-  // 3rd byte, etc, or any
-  // combination therein by setting the bits in the BAS [12:5] (Byte Address
-  // Select) field of
-  // the DBGWCRn_EL1 reg for the watchpoint.
-
-  // If the MASK [28:24] bits in the DBGWCRn_EL1 allow a single watchpoint to
-  // monitor a larger region
-  // of memory (16 bytes, 32 bytes, or 2GB) but the Byte Address Select bitfield
-  // then selects a larger
-  // range of bytes, instead of individual bytes.  See the ARMv8 Debug
-  // Architecture manual for details.
-  // This implementation does not currently use the MASK bits; the largest
-  // single region watched by a single
-  // watchpoint right now is 8-bytes.
+  // Aarch64 watchpoints are in one of two forms: (1) 1-8 bytes, aligned to
+  // an 8 byte address, or (2) a power-of-two size region of memory; minimum
+  // 8 bytes, maximum 2GB; the starting address must be aligned to that power
+  // of two.
+  // 
+  // For (1), 1-8 byte watchpoints, using the Byte Address Selector field in
+  // DBGWCR<n>.BAS.  Any of the bytes may be watched, but if multiple bytes
+  // are watched, the bytes selected must be contiguous.  The start address
+  // watched must be doubleword (8-byte) aligned; if the start address is
+  // word (4-byte) aligned, only 4 bytes can be watched.
+  // 
+  // For (2), the MASK field in DBGWCR<n>.MASK is used.
+  // 
+  // See the ARM ARM, section "Watchpoint exceptions", and more specifically,
+  // "Watchpoint data address comparisons".
+  //
+  // debugserver today only supports (1) - the Byte Address Selector 1-8 byte
+  // watchpoints that are 8-byte aligned.  To support larger watchpoints,
+  // debugserver would need to interpret the mach exception when the watched
+  // region was hit, see if the address accessed lies within the subset
+  // of the power-of-two region that lldb asked us to watch (v. ARM ARM,
+  // "Determining the memory location that caused a Watchpoint exception"),
+  // and silently resume the inferior (disable watchpoint, stepi, re-enable
+  // watchpoint) if the address lies outside the region that lldb asked us
+  // to watch.  
+  //
+  // Alternatively, lldb would need to be prepared for a larger region 
+  // being watched than it requested, and silently resume the inferior if
+  // the accessed address is outside the region lldb wants to watch.
 
   nub_addr_t aligned_wp_address = addr & ~0x7;
   uint32_t addr_dword_offset = addr & 0x7;
@@ -1403,10 +1454,28 @@
     DEFINE_GPR_IDX(26, x26, NULL, INVALID_NUB_REGNUM),
     DEFINE_GPR_IDX(27, x27, NULL, INVALID_NUB_REGNUM),
     DEFINE_GPR_IDX(28, x28, NULL, INVALID_NUB_REGNUM),
-    DEFINE_GPR_NAME(fp, "x29", GENERIC_REGNUM_FP),
-    DEFINE_GPR_NAME(lr, "x30", GENERIC_REGNUM_RA),
-    DEFINE_GPR_NAME(sp, "xsp", GENERIC_REGNUM_SP),
-    DEFINE_GPR_NAME(pc, NULL, GENERIC_REGNUM_PC),
+    // For the G/g packet we want to show where the offset into the regctx
+    // is for fp/lr/sp/pc, but we cannot directly access them on arm64e
+    // devices (and therefore can't offsetof() them)) - add the offset based
+    // on the last accessible register by hand for advertising the location
+    // in the regctx to lldb.  We'll go through the accessor functions when
+    // we read/write them here.
+    {
+       e_regSetGPR, gpr_fp, "fp", "x29", Uint, Hex, 8, GPR_OFFSET_IDX(28) + 8,
+       dwarf_fp, dwarf_fp, GENERIC_REGNUM_FP, debugserver_gpr_fp, NULL, NULL
+    },
+    {
+       e_regSetGPR, gpr_lr, "lr", "x30", Uint, Hex, 8, GPR_OFFSET_IDX(28) + 16,
+       dwarf_lr, dwarf_lr, GENERIC_REGNUM_RA, debugserver_gpr_lr, NULL, NULL
+    },
+    {
+       e_regSetGPR, gpr_sp, "sp", "xsp", Uint, Hex, 8, GPR_OFFSET_IDX(28) + 24,
+       dwarf_sp, dwarf_sp, GENERIC_REGNUM_SP, debugserver_gpr_sp, NULL, NULL
+    },
+    {
+       e_regSetGPR, gpr_pc, "pc", NULL, Uint, Hex, 8, GPR_OFFSET_IDX(28) + 32,
+       dwarf_pc, dwarf_pc, GENERIC_REGNUM_PC, debugserver_gpr_pc, NULL, NULL
+    },
 
     // in armv7 we specify that writing to the CPSR should invalidate r8-12, sp,
     // lr.
@@ -1763,7 +1832,20 @@
     switch (set) {
     case e_regSetGPR:
       if (reg <= gpr_pc) {
+#if defined(__LP64__)
+        if (reg == gpr_pc)
+          value->value.uint64 = arm_thread_state64_get_pc (m_state.context.gpr);
+        else if (reg == gpr_lr)
+          value->value.uint64 = arm_thread_state64_get_lr (m_state.context.gpr);
+        else if (reg == gpr_sp)
+          value->value.uint64 = arm_thread_state64_get_sp (m_state.context.gpr);
+        else if (reg == gpr_fp)
+          value->value.uint64 = arm_thread_state64_get_fp (m_state.context.gpr);
+        else
         value->value.uint64 = m_state.context.gpr.__x[reg];
+#else
+        value->value.uint64 = m_state.context.gpr.__x[reg];
+#endif
         return true;
       } else if (reg == gpr_cpsr) {
         value->value.uint32 = m_state.context.gpr.__cpsr;
@@ -1853,7 +1935,27 @@
     switch (set) {
     case e_regSetGPR:
       if (reg <= gpr_pc) {
+#if defined(__LP64__)
+          uint64_t signed_value = value->value.uint64;
+#if __has_feature(ptrauth_calls)
+          // The incoming value could be garbage.  Strip it to avoid
+          // trapping when it gets resigned in the thread state.
+          signed_value = (uint64_t) ptrauth_strip((void*) signed_value, ptrauth_key_function_pointer);
+          signed_value = (uint64_t) ptrauth_sign_unauthenticated((void*) signed_value, ptrauth_key_function_pointer, 0);
+#endif
+        if (reg == gpr_pc) 
+         arm_thread_state64_set_pc_fptr (m_state.context.gpr, (void*) signed_value);
+        else if (reg == gpr_lr)
+          arm_thread_state64_set_lr_fptr (m_state.context.gpr, (void*) signed_value);
+        else if (reg == gpr_sp)
+          arm_thread_state64_set_sp (m_state.context.gpr, value->value.uint64);
+        else if (reg == gpr_fp)
+          arm_thread_state64_set_fp (m_state.context.gpr, value->value.uint64);
+        else
+          m_state.context.gpr.__x[reg] = value->value.uint64;
+#else
         m_state.context.gpr.__x[reg] = value->value.uint64;
+#endif
         success = true;
       } else if (reg == gpr_cpsr) {
         m_state.context.gpr.__cpsr = value->value.uint32;
diff --git a/src/llvm-project/lldb/tools/debugserver/source/RNBRemote.cpp b/src/llvm-project/lldb/tools/debugserver/source/RNBRemote.cpp
index 3a4035b..64e3bc4 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/RNBRemote.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/RNBRemote.cpp
@@ -1287,6 +1287,9 @@
   if (sizeof(char *) == 8) {
     return CPU_TYPE_ARM64;
   } else {
+#if defined (__ARM64_ARCH_8_32__)
+    return CPU_TYPE_ARM64_32;
+#endif
     return CPU_TYPE_ARM;
   }
 #elif defined(__i386__) || defined(__x86_64__)
@@ -2088,9 +2091,6 @@
         } else if (strncmp(p, "LOG_SHLIB", sizeof("LOG_SHLIB") - 1) == 0) {
           p += sizeof("LOG_SHLIB") - 1;
           bitmask |= LOG_SHLIB;
-        } else if (strncmp(p, "LOG_MEMORY", sizeof("LOG_MEMORY") - 1) == 0) {
-          p += sizeof("LOG_MEMORY") - 1;
-          bitmask |= LOG_MEMORY;
         } else if (strncmp(p, "LOG_MEMORY_DATA_SHORT",
                            sizeof("LOG_MEMORY_DATA_SHORT") - 1) == 0) {
           p += sizeof("LOG_MEMORY_DATA_SHORT") - 1;
@@ -2103,6 +2103,9 @@
                            sizeof("LOG_MEMORY_PROTECTIONS") - 1) == 0) {
           p += sizeof("LOG_MEMORY_PROTECTIONS") - 1;
           bitmask |= LOG_MEMORY_PROTECTIONS;
+        } else if (strncmp(p, "LOG_MEMORY", sizeof("LOG_MEMORY") - 1) == 0) {
+          p += sizeof("LOG_MEMORY") - 1;
+          bitmask |= LOG_MEMORY;
         } else if (strncmp(p, "LOG_BREAKPOINTS",
                            sizeof("LOG_BREAKPOINTS") - 1) == 0) {
           p += sizeof("LOG_BREAKPOINTS") - 1;
@@ -2664,6 +2667,17 @@
   }
 }
 
+std::string cstring_to_asciihex_string(const char *str) {
+  std::string hex_str;
+  hex_str.reserve (strlen (str) * 2);
+  while (str && *str) {
+    char hexbuf[5];
+    snprintf (hexbuf, sizeof(hexbuf), "%02x", *str++);
+    hex_str += hexbuf;
+  }
+  return hex_str;
+}
+
 void append_hexified_string(std::ostream &ostrm, const std::string &string) {
   size_t string_size = string.size();
   const char *string_buf = string.c_str();
@@ -3815,8 +3829,13 @@
             }
           }
           if (attach_failed_due_to_sip) {
-            SendPacket("E87"); // E87 is the magic value which says that we are
-                               // not allowed to attach
+            std::string return_message = "E96;";
+            return_message += cstring_to_asciihex_string(
+                "Process attach denied, possibly because "
+                "System Integrity Protection is enabled and "
+                "process does not allow attaching.");
+
+            SendPacket(return_message.c_str());
             DNBLogError("Attach failed because process does not allow "
                         "attaching: \"%s\".",
                         err_str);
@@ -4557,6 +4576,8 @@
     break;
   case CPU_TYPE_ARM64:
     return "arm64";
+  case CPU_TYPE_ARM64_32:
+    return "arm64_32";
   case CPU_TYPE_I386:
     return "i386";
   case CPU_TYPE_X86_64:
@@ -4590,6 +4611,10 @@
           g_host_cputype |= CPU_ARCH_ABI64;
         }
       }
+#if defined (TARGET_OS_WATCH) && TARGET_OS_WATCH == 1
+      if (g_host_cputype == CPU_TYPE_ARM64 && sizeof (void*) == 4)
+        g_host_cputype = CPU_TYPE_ARM64_32;
+#endif
     }
 
     len = sizeof(uint32_t);
@@ -4599,6 +4624,16 @@
           g_host_cpusubtype == CPU_SUBTYPE_486)
         g_host_cpusubtype = CPU_SUBTYPE_X86_64_ALL;
     }
+#if defined (TARGET_OS_WATCH) && TARGET_OS_WATCH == 1
+    // on arm64_32 devices, the machine's native cpu type is
+    // CPU_TYPE_ARM64 and subtype is 2 indicating arm64e.
+    // But we change the cputype to CPU_TYPE_ARM64_32 because
+    // the user processes are all ILP32 processes today.
+    // We also need to rewrite the cpusubtype so we vend 
+    // a valid cputype + cpusubtype combination.
+    if (g_host_cputype == CPU_TYPE_ARM64_32)
+      g_host_cpusubtype = CPU_SUBTYPE_ARM64_32_V8;
+#endif
   }
 
   cputype = g_host_cputype;
@@ -4608,6 +4643,24 @@
   return g_host_cputype != 0;
 }
 
+static bool GetAddressingBits(uint32_t &addressing_bits) {
+  static uint32_t g_addressing_bits = 0;
+  static bool g_tried_addressing_bits_syscall = false;
+  if (g_tried_addressing_bits_syscall == false) {
+    size_t len = sizeof (uint32_t);
+    if (::sysctlbyname("machdep.virtual_address_size",
+          &g_addressing_bits, &len, NULL, 0) != 0) {
+      g_addressing_bits = 0;
+    }
+  }
+  g_tried_addressing_bits_syscall = true;
+  addressing_bits = g_addressing_bits;
+  if (addressing_bits > 0)
+    return true;
+  else
+    return false;
+}
+
 rnb_err_t RNBRemote::HandlePacket_qHostInfo(const char *p) {
   std::ostringstream strm;
 
@@ -4620,10 +4673,16 @@
     strm << "cpusubtype:" << std::dec << cpusubtype << ';';
   }
 
+  uint32_t addressing_bits = 0;
+  if (GetAddressingBits(addressing_bits)) {
+    strm << "addressing_bits:" << std::dec << addressing_bits << ';';
+  }
+
   // The OS in the triple should be "ios" or "macosx" which doesn't match our
   // "Darwin" which gets returned from "kern.ostype", so we need to hardcode
   // this for now.
-  if (cputype == CPU_TYPE_ARM || cputype == CPU_TYPE_ARM64) {
+  if (cputype == CPU_TYPE_ARM || cputype == CPU_TYPE_ARM64
+      || cputype == CPU_TYPE_ARM64_32) {
 #if defined(TARGET_OS_TV) && TARGET_OS_TV == 1
     strm << "ostype:tvos;";
 #elif defined(TARGET_OS_WATCH) && TARGET_OS_WATCH == 1
@@ -4660,6 +4719,12 @@
     strm << ";";
   }
 
+  std::string maccatalyst_version = DNBGetMacCatalystVersionString();
+  if (!maccatalyst_version.empty() &&
+      std::all_of(maccatalyst_version.begin(), maccatalyst_version.end(),
+                  [](char c) { return (c >= '0' && c <= '9') || c == '.'; }))
+    strm << "maccatalyst_version:" << maccatalyst_version << ";";
+
 #if defined(__LITTLE_ENDIAN__)
   strm << "endian:little;";
 #elif defined(__BIG_ENDIAN__)
@@ -6034,6 +6099,17 @@
         cpusubtype = 12; // CPU_SUBTYPE_ARM_V7K
       }
     }
+#if defined (TARGET_OS_WATCH) && TARGET_OS_WATCH == 1
+    // on arm64_32 devices, the machine's native cpu type is
+    // CPU_TYPE_ARM64 and subtype is 2 indicating arm64e.
+    // But we change the cputype to CPU_TYPE_ARM64_32 because
+    // the user processes are all ILP32 processes today.
+    // We also need to rewrite the cpusubtype so we vend 
+    // a valid cputype + cpusubtype combination.
+    if (cputype == CPU_TYPE_ARM64_32 && cpusubtype == 2)
+      cpusubtype = CPU_SUBTYPE_ARM64_32_V8;
+#endif
+
     rep << "cpusubtype:" << std::hex << cpusubtype << ';';
   }
 
@@ -6080,7 +6156,8 @@
     // The OS in the triple should be "ios" or "macosx" which doesn't match our
     // "Darwin" which gets returned from "kern.ostype", so we need to hardcode
     // this for now.
-    if (cputype == CPU_TYPE_ARM || cputype == CPU_TYPE_ARM64) {
+    if (cputype == CPU_TYPE_ARM || cputype == CPU_TYPE_ARM64
+        || cputype == CPU_TYPE_ARM64_32) {
 #if defined(TARGET_OS_TV) && TARGET_OS_TV == 1
       rep << "ostype:tvos;";
 #elif defined(TARGET_OS_WATCH) && TARGET_OS_WATCH == 1
diff --git a/src/llvm-project/lldb/tools/debugserver/source/StdStringExtractor.cpp b/src/llvm-project/lldb/tools/debugserver/source/StdStringExtractor.cpp
index e32689c..a4cad2d 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/StdStringExtractor.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/StdStringExtractor.cpp
@@ -281,34 +281,6 @@
   return bytes_extracted;
 }
 
-// Consume ASCII hex nibble character pairs until we have decoded byte_size
-// bytes of data.
-
-uint64_t StdStringExtractor::GetHexWithFixedSize(uint32_t byte_size,
-                                                 bool little_endian,
-                                                 uint64_t fail_value) {
-  if (byte_size <= 8 && GetBytesLeft() >= byte_size * 2) {
-    uint64_t result = 0;
-    uint32_t i;
-    if (little_endian) {
-      // Little Endian
-      uint32_t shift_amount;
-      for (i = 0, shift_amount = 0; i < byte_size && IsGood();
-           ++i, shift_amount += 8) {
-        result |= ((uint64_t)GetHexU8() << shift_amount);
-      }
-    } else {
-      // Big Endian
-      for (i = 0; i < byte_size && IsGood(); ++i) {
-        result <<= 8;
-        result |= GetHexU8();
-      }
-    }
-  }
-  m_index = UINT64_MAX;
-  return fail_value;
-}
-
 size_t StdStringExtractor::GetHexByteString(std::string &str) {
   str.clear();
   str.reserve(GetBytesLeft() / 2);
diff --git a/src/llvm-project/lldb/tools/debugserver/source/StdStringExtractor.h b/src/llvm-project/lldb/tools/debugserver/source/StdStringExtractor.h
index 2cad0f1..5165240 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/StdStringExtractor.h
+++ b/src/llvm-project/lldb/tools/debugserver/source/StdStringExtractor.h
@@ -38,8 +38,6 @@
 
   void SkipSpaces();
 
-  std::string &GetStringRef() { return m_packet; }
-
   const std::string &GetStringRef() const { return m_packet; }
 
   bool Empty() { return m_packet.empty(); }
@@ -83,9 +81,6 @@
 
   size_t GetHexBytesAvail(void *dst, size_t dst_len);
 
-  uint64_t GetHexWithFixedSize(uint32_t byte_size, bool little_endian,
-                               uint64_t fail_value);
-
   size_t GetHexByteString(std::string &str);
 
   size_t GetHexByteStringFixedLength(std::string &str, uint32_t nibble_length);
diff --git a/src/llvm-project/lldb/tools/debugserver/source/debugserver.cpp b/src/llvm-project/lldb/tools/debugserver/source/debugserver.cpp
index fa19bba..42205de 100644
--- a/src/llvm-project/lldb/tools/debugserver/source/debugserver.cpp
+++ b/src/llvm-project/lldb/tools/debugserver/source/debugserver.cpp
@@ -789,6 +789,12 @@
   ::fflush((FILE *)baton);
 }
 
+void show_version_and_exit(int exit_code) {
+  printf("%s-%s for %s.\n", DEBUGSERVER_PROGRAM_NAME, DEBUGSERVER_VERSION_STR,
+         RNB_ARCH);
+  exit(exit_code);
+}
+
 void show_usage_and_exit(int exit_code) {
   RNBLogSTDERR(
       "Usage:\n  %s host:port [program-name program-arg1 program-arg2 ...]\n",
@@ -811,6 +817,7 @@
     {"debug", no_argument, NULL, 'g'},
     {"kill-on-error", no_argument, NULL, 'K'},
     {"verbose", no_argument, NULL, 'v'},
+    {"version", no_argument, NULL, 'V'},
     {"lockdown", no_argument, &g_lockdown_opt, 1}, // short option "-k"
     {"applist", no_argument, &g_applist_opt, 1},   // short option "-t"
     {"log-file", required_argument, NULL, 'l'},
@@ -1173,6 +1180,10 @@
       DNBLogSetVerbose(1);
       break;
 
+    case 'V':
+      show_version_and_exit(0);
+      break;
+
     case 's':
       ctx.GetSTDIN().assign(optarg);
       ctx.GetSTDOUT().assign(optarg);
diff --git a/src/llvm-project/lldb/tools/debugserver/source/debugserver_vers.c.in b/src/llvm-project/lldb/tools/debugserver/source/debugserver_vers.c.in
new file mode 100644
index 0000000..00e34c2
--- /dev/null
+++ b/src/llvm-project/lldb/tools/debugserver/source/debugserver_vers.c.in
@@ -0,0 +1,2 @@
+const unsigned char debugserverVersionString[] __attribute__ ((used)) = "@(#)PROGRAM:LLDB  PROJECT:lldb-@LLDB_VERSION_MAJOR@.@LLDB_VERSION_MINOR@.@LLDB_VERSION_PATCH@" "\n";
+const double debugserverVersionNumber __attribute__ ((used)) = (double)@LLDB_VERSION_MAJOR@.@LLDB_VERSION_MINOR@;
diff --git a/src/llvm-project/lldb/tools/driver/CMakeLists.txt b/src/llvm-project/lldb/tools/driver/CMakeLists.txt
index 06dc88a..c31863b 100644
--- a/src/llvm-project/lldb/tools/driver/CMakeLists.txt
+++ b/src/llvm-project/lldb/tools/driver/CMakeLists.txt
@@ -3,8 +3,12 @@
 add_public_tablegen_target(LLDBOptionsTableGen)
 
 if(APPLE)
+  configure_file(
+    ${CMAKE_CURRENT_SOURCE_DIR}/lldb-Info.plist.in
+    ${CMAKE_CURRENT_BINARY_DIR}/lldb-Info.plist
+    )
   # Inline info plist in binary (use target_link_options for this as soon as CMake 3.13 is available)
-  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-sectcreate,__TEXT,__info_plist,${LLDB_SOURCE_DIR}/tools/driver/lldb-Info.plist")
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/lldb-Info.plist")
 endif()
 
 add_lldb_tool(lldb
@@ -33,10 +37,9 @@
 if(LLDB_BUILD_FRAMEWORK)
   # In the build-tree, we know the exact path to the framework directory.
   # The installed framework can be in different locations.
-  get_target_property(framework_build_dir liblldb LIBRARY_OUTPUT_DIRECTORY)
   lldb_setup_rpaths(lldb
     BUILD_RPATH
-      "${framework_build_dir}"
+      "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}"
     INSTALL_RPATH
       "@loader_path/../../../SharedFrameworks"
       "@loader_path/../../System/Library/PrivateFrameworks"
diff --git a/src/llvm-project/lldb/tools/driver/Driver.cpp b/src/llvm-project/lldb/tools/driver/Driver.cpp
index 043aba7..7387438 100644
--- a/src/llvm-project/lldb/tools/driver/Driver.cpp
+++ b/src/llvm-project/lldb/tools/driver/Driver.cpp
@@ -11,6 +11,7 @@
 #include "lldb/API/SBCommandInterpreter.h"
 #include "lldb/API/SBCommandReturnObject.h"
 #include "lldb/API/SBDebugger.h"
+#include "lldb/API/SBFile.h"
 #include "lldb/API/SBHostOS.h"
 #include "lldb/API/SBLanguageRuntime.h"
 #include "lldb/API/SBReproducer.h"
@@ -18,10 +19,9 @@
 #include "lldb/API/SBStringList.h"
 
 #include "llvm/ADT/StringRef.h"
-#include "llvm/Support/ConvertUTF.h"
 #include "llvm/Support/Format.h"
+#include "llvm/Support/InitLLVM.h"
 #include "llvm/Support/Path.h"
-#include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Process.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/WithColor.h"
@@ -229,6 +229,7 @@
 
   if (args.hasArg(OPT_no_use_colors)) {
     m_debugger.SetUseColor(false);
+    m_option_data.m_debug_mode = true;
   }
 
   if (auto *arg = args.getLastArg(OPT_file)) {
@@ -262,14 +263,6 @@
     m_debugger.SetScriptLanguage(m_debugger.GetScriptingLanguage(arg_value));
   }
 
-  if (args.hasArg(OPT_no_use_colors)) {
-    m_option_data.m_debug_mode = true;
-  }
-
-  if (args.hasArg(OPT_no_use_colors)) {
-    m_debugger.SetUseColor(false);
-  }
-
   if (args.hasArg(OPT_source_quietly)) {
     m_option_data.m_source_quietly = true;
   }
@@ -506,16 +499,16 @@
   SBCommandReturnObject result;
   sb_interpreter.SourceInitFileInHomeDirectory(result);
   if (m_option_data.m_debug_mode) {
-    result.PutError(m_debugger.GetErrorFileHandle());
-    result.PutOutput(m_debugger.GetOutputFileHandle());
+    result.PutError(m_debugger.GetErrorFile());
+    result.PutOutput(m_debugger.GetOutputFile());
   }
 
   // Source the local .lldbinit file if it exists and we're allowed to source.
   // Here we want to always print the return object because it contains the
   // warning and instructions to load local lldbinit files.
   sb_interpreter.SourceInitFileInCurrentWorkingDirectory(result);
-  result.PutError(m_debugger.GetErrorFileHandle());
-  result.PutOutput(m_debugger.GetOutputFileHandle());
+  result.PutError(m_debugger.GetErrorFile());
+  result.PutOutput(m_debugger.GetOutputFile());
 
   // We allow the user to specify an exit code when calling quit which we will
   // return when exiting.
@@ -581,8 +574,8 @@
   }
 
   if (m_option_data.m_debug_mode) {
-    result.PutError(m_debugger.GetErrorFileHandle());
-    result.PutOutput(m_debugger.GetOutputFileHandle());
+    result.PutError(m_debugger.GetErrorFile());
+    result.PutOutput(m_debugger.GetOutputFile());
   }
 
   const bool handle_events = true;
@@ -739,8 +732,30 @@
   signal(signo, sigcont_handler);
 }
 
+void reproducer_handler(void *argv0) {
+  if (SBReproducer::Generate()) {
+    auto exe = static_cast<const char *>(argv0);
+    llvm::outs() << "********************\n";
+    llvm::outs() << "Crash reproducer for ";
+    llvm::outs() << lldb::SBDebugger::GetVersionString() << '\n';
+    llvm::outs() << '\n';
+    llvm::outs() << "Reproducer written to '" << SBReproducer::GetPath()
+                 << "'\n";
+    llvm::outs() << '\n';
+    llvm::outs() << "Before attaching the reproducer to a bug report:\n";
+    llvm::outs() << " - Look at the directory to ensure you're willing to "
+                    "share its content.\n";
+    llvm::outs()
+        << " - Make sure the reproducer works by replaying the reproducer.\n";
+    llvm::outs() << '\n';
+    llvm::outs() << "Replay the reproducer with the following command:\n";
+    llvm::outs() << exe << " -replay " << SBReproducer::GetPath() << "\n";
+    llvm::outs() << "********************\n";
+  }
+}
+
 static void printHelp(LLDBOptTable &table, llvm::StringRef tool_name) {
-  std::string usage_str = tool_name.str() + "options";
+  std::string usage_str = tool_name.str() + " [options]";
   table.PrintHelp(llvm::outs(), usage_str.c_str(), "LLDB", false);
 
   std::string examples = R"___(
@@ -776,14 +791,15 @@
     lldb -K /source/before/crash -k /source/after/crash
 
   Note: In REPL mode no file is loaded, so commands specified to run after
-  loading the file (via -o or -s) will be ignored.
-  )___";
-  llvm::outs() << examples;
+  loading the file (via -o or -s) will be ignored.)___";
+  llvm::outs() << examples << '\n';
 }
 
 llvm::Optional<int> InitializeReproducer(opt::InputArgList &input_args) {
   if (auto *replay_path = input_args.getLastArg(OPT_replay)) {
-    if (const char *error = SBReproducer::Replay(replay_path->getValue())) {
+    const bool skip_version_check = input_args.hasArg(OPT_skip_version_check);
+    if (const char *error =
+            SBReproducer::Replay(replay_path->getValue(), skip_version_check)) {
       WithColor::error() << "reproducer replay failed: " << error << '\n';
       return 1;
     }
@@ -813,28 +829,10 @@
   return llvm::None;
 }
 
-int
-#ifdef _MSC_VER
-wmain(int argc, wchar_t const *wargv[])
-#else
-main(int argc, char const *argv[])
-#endif
-{
-#ifdef _MSC_VER
-  // Convert wide arguments to UTF-8
-  std::vector<std::string> argvStrings(argc);
-  std::vector<const char *> argvPointers(argc);
-  for (int i = 0; i != argc; ++i) {
-    llvm::convertWideToUTF8(wargv[i], argvStrings[i]);
-    argvPointers[i] = argvStrings[i].c_str();
-  }
-  const char **argv = argvPointers.data();
-#endif
-
-  // Print stack trace on crash.
-  llvm::StringRef ToolName = llvm::sys::path::filename(argv[0]);
-  llvm::sys::PrintStackTraceOnErrorSignal(ToolName);
-  llvm::PrettyStackTraceProgram X(argc, argv);
+int main(int argc, char const *argv[]) {
+  // Setup LLVM signal handlers and make sure we call llvm_shutdown() on
+  // destruction.
+  llvm::InitLLVM IL(argc, argv, /*InstallPipeSignalExitHandler=*/false);
 
   // Parse arguments.
   LLDBOptTable T;
@@ -844,7 +842,7 @@
   opt::InputArgList input_args = T.ParseArgs(arg_arr, MAI, MAC);
 
   if (input_args.hasArg(OPT_help)) {
-    printHelp(T, ToolName);
+    printHelp(T, llvm::sys::path::filename(argv[0]));
     return 0;
   }
 
@@ -857,6 +855,9 @@
     return *exit_code;
   }
 
+  // Register the reproducer signal handler.
+  llvm::sys::AddSignalHandler(reproducer_handler, const_cast<char *>(argv[0]));
+
   SBError error = SBDebugger::InitializeWithErrorHandling();
   if (error.Fail()) {
     WithColor::error() << "initialization failed: " << error.GetCString()
diff --git a/src/llvm-project/lldb/tools/driver/Options.td b/src/llvm-project/lldb/tools/driver/Options.td
index 4ea98ee..c237f56 100644
--- a/src/llvm-project/lldb/tools/driver/Options.td
+++ b/src/llvm-project/lldb/tools/driver/Options.td
@@ -5,6 +5,8 @@
 class R<list<string> prefixes, string name>
   : Option<prefixes, name, KIND_REMAINING_ARGS>;
 
+// Please keep this in sync with the man page in docs/man/lldb.rst
+
 // Attaching options.
 def grp_attach : OptionGroup<"attaching">, HelpText<"ATTACHING">;
 
@@ -117,7 +119,7 @@
 
 def one_line_on_crash: Separate<["--", "-"], "one-line-on-crash">,
   MetaVarName<"<command>">,
-  HelpText<"When in batch mode, tells the debugger to source this file of lldb commands if the target crashes.">,
+  HelpText<"When in batch mode, tells the debugger to run this one-line lldb command if the target crashes.">,
   Group<grp_command>;
 def: Separate<["-"], "k">,
   Alias<one_line_on_crash>,
@@ -230,5 +232,7 @@
 def replay: Separate<["--", "-"], "replay">,
   MetaVarName<"<filename>">,
   HelpText<"Tells the debugger to replay a reproducer from <filename>.">;
+def skip_version_check: F<"reproducer-skip-version-check">,
+  HelpText<"Skip the reproducer version check.">;
 
 def REM : R<["--"], "">;
diff --git a/src/llvm-project/lldb/tools/driver/Platform.h b/src/llvm-project/lldb/tools/driver/Platform.h
index 0644915..cf6c4ec 100644
--- a/src/llvm-project/lldb/tools/driver/Platform.h
+++ b/src/llvm-project/lldb/tools/driver/Platform.h
@@ -9,12 +9,17 @@
 #ifndef lldb_Platform_h_
 #define lldb_Platform_h_
 
+#include "lldb/Host/Config.h"
+
 #if defined(_WIN32)
 
 #include <io.h>
 #if defined(_MSC_VER)
 #include <signal.h>
 #endif
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
 #include "lldb/Host/windows/windows.h"
 #include <inttypes.h>
 
diff --git a/src/llvm-project/lldb/tools/driver/lldb-Info.plist b/src/llvm-project/lldb/tools/driver/lldb-Info.plist
deleted file mode 100644
index 5a68a8b..0000000
--- a/src/llvm-project/lldb/tools/driver/lldb-Info.plist
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.apple.lldb</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>lldb</string>
-	<key>CFBundleVersion</key>
-	<string>360.99.0</string>
-	<key>SecTaskAccess</key>
-	<array>
-		<string>allowed</string>
-		<string>debug</string>
-	</array>
-</dict>
-</plist>
diff --git a/src/llvm-project/lldb/tools/driver/lldb-Info.plist.in b/src/llvm-project/lldb/tools/driver/lldb-Info.plist.in
new file mode 100644
index 0000000..a875129
--- /dev/null
+++ b/src/llvm-project/lldb/tools/driver/lldb-Info.plist.in
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.apple.lldb</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>lldb</string>
+	<key>CFBundleVersion</key>
+	<string>${LLDB_VERSION}</string>
+	<key>SecTaskAccess</key>
+	<array>
+		<string>allowed</string>
+		<string>debug</string>
+	</array>
+</dict>
+</plist>
diff --git a/src/llvm-project/lldb/tools/intel-features/CMakeLists.txt b/src/llvm-project/lldb/tools/intel-features/CMakeLists.txt
index b531654..aff75d7 100644
--- a/src/llvm-project/lldb/tools/intel-features/CMakeLists.txt
+++ b/src/llvm-project/lldb/tools/intel-features/CMakeLists.txt
@@ -23,7 +23,7 @@
 endif()
 
 # Add python wrapper if python not disabled
-if (NOT LLDB_DISABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
+if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
   set(LLDB_INTEL_FEATURES_PYTHON_WRAP
      ${LLDB_BINARY_DIR}/tools/intel-features/scripts/IntelFeaturesPythonWrap.cpp)
   set_source_files_properties(${LLDB_INTEL_FEATURES_PYTHON_WRAP}
@@ -59,7 +59,7 @@
   )
 
 # Add link dependencies for python wrapper
-if (NOT LLDB_DISABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
+if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
   add_dependencies(lldbIntelFeatures intel-features-swig_wrapper)
 endif()
 
diff --git a/src/llvm-project/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp b/src/llvm-project/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
index b706ee7..5bffd27 100644
--- a/src/llvm-project/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
+++ b/src/llvm-project/lldb/tools/intel-features/intel-mpx/cli-wrapper-mpxtable.cpp
@@ -1,5 +1,4 @@
-//===-- cli-wrapper-mpxtable.cpp----------------------------------*- C++
-//-*-===//
+//===-- cli-wrapper-mpxtable.cpp --------------------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
diff --git a/src/llvm-project/lldb/tools/lldb-instr/CMakeLists.txt b/src/llvm-project/lldb/tools/lldb-instr/CMakeLists.txt
index e3dbeba..8da453b 100644
--- a/src/llvm-project/lldb/tools/lldb-instr/CMakeLists.txt
+++ b/src/llvm-project/lldb/tools/lldb-instr/CMakeLists.txt
@@ -1,7 +1,7 @@
 add_lldb_tool(lldb-instr
   Instrument.cpp
 
-  LINK_LIBS
+  CLANG_LIBS
     clangAST
     clangBasic
     clangCodeGen
diff --git a/src/llvm-project/lldb/tools/lldb-instr/Instrument.cpp b/src/llvm-project/lldb/tools/lldb-instr/Instrument.cpp
index f30707c..9b29700 100644
--- a/src/llvm-project/lldb/tools/lldb-instr/Instrument.cpp
+++ b/src/llvm-project/lldb/tools/lldb-instr/Instrument.cpp
@@ -335,7 +335,7 @@
   std::unique_ptr<ASTConsumer> CreateASTConsumer(CompilerInstance &CI,
                                                  StringRef File) override {
     MyRewriter.setSourceMgr(CI.getSourceManager(), CI.getLangOpts());
-    return llvm::make_unique<SBConsumer>(MyRewriter, CI.getASTContext());
+    return std::make_unique<SBConsumer>(MyRewriter, CI.getASTContext());
   }
 
 private:
@@ -348,8 +348,8 @@
                          "instrumentation framework.");
 
   auto PCHOpts = std::make_shared<PCHContainerOperations>();
-  PCHOpts->registerWriter(llvm::make_unique<ObjectFilePCHContainerWriter>());
-  PCHOpts->registerReader(llvm::make_unique<ObjectFilePCHContainerReader>());
+  PCHOpts->registerWriter(std::make_unique<ObjectFilePCHContainerWriter>());
+  PCHOpts->registerReader(std::make_unique<ObjectFilePCHContainerReader>());
 
   ClangTool T(OP.getCompilations(), OP.getSourcePathList(), PCHOpts);
   return T.run(newFrontendActionFactory<SBAction>().get());
diff --git a/src/llvm-project/lldb/tools/lldb-mi/CMakeLists.txt b/src/llvm-project/lldb/tools/lldb-mi/CMakeLists.txt
deleted file mode 100644
index db1634e..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/CMakeLists.txt
+++ /dev/null
@@ -1,109 +0,0 @@
-if ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
-  add_definitions( -DIMPORT_LIBLLDB )
-  list(APPEND extra_libs lldbHost)
-endif ()
-
-if (HAVE_LIBPTHREAD)
-  list(APPEND extra_libs pthread)
-endif ()
-
-# We need to include the llvm components we depend on manually, as liblldb does
-# not re-export those.
-set(LLVM_LINK_COMPONENTS Support)
-add_lldb_tool(lldb-mi
-  MICmdArgContext.cpp
-  MICmdArgSet.cpp
-  MICmdArgValBase.cpp
-  MICmdArgValConsume.cpp
-  MICmdArgValFile.cpp
-  MICmdArgValListBase.cpp
-  MICmdArgValListOfN.cpp
-  MICmdArgValNumber.cpp
-  MICmdArgValOptionLong.cpp
-  MICmdArgValOptionShort.cpp
-  MICmdArgValPrintValues.cpp
-  MICmdArgValString.cpp
-  MICmdArgValThreadGrp.cpp
-  MICmdBase.cpp
-  MICmdCommands.cpp
-  MICmdCmd.cpp
-  MICmdCmdBreak.cpp
-  MICmdCmdData.cpp
-  MICmdCmdEnviro.cpp
-  MICmdCmdExec.cpp
-  MICmdCmdFile.cpp
-  MICmdCmdGdbInfo.cpp
-  MICmdCmdGdbSet.cpp
-  MICmdCmdGdbShow.cpp
-  MICmdCmdGdbThread.cpp
-  MICmdCmdMiscellanous.cpp
-  MICmdCmdStack.cpp
-  MICmdCmdSupportInfo.cpp
-  MICmdCmdSupportList.cpp
-  MICmdCmdSymbol.cpp
-  MICmdCmdTarget.cpp
-  MICmdCmdThread.cpp
-  MICmdCmdTrace.cpp
-  MICmdCmdVar.cpp
-  MICmdData.cpp
-  MICmdFactory.cpp
-  MICmdInterpreter.cpp
-  MICmdInvoker.cpp
-  MICmdMgr.cpp
-  MICmdMgrSetCmdDeleteCallback.cpp
-  MICmnBase.cpp
-  MICmnLLDBBroadcaster.cpp
-  MICmnLLDBDebugger.cpp
-  MICmnLLDBDebuggerHandleEvents.cpp
-  MICmnLLDBDebugSessionInfo.cpp
-  MICmnLLDBDebugSessionInfoVarObj.cpp
-  MICmnLLDBProxySBValue.cpp
-  MICmnLLDBUtilSBValue.cpp
-  MICmnLog.cpp
-  MICmnLogMediumFile.cpp
-  MICmnMIOutOfBandRecord.cpp
-  MICmnMIResultRecord.cpp
-  MICmnMIValue.cpp
-  MICmnMIValueConst.cpp
-  MICmnMIValueList.cpp
-  MICmnMIValueResult.cpp
-  MICmnMIValueTuple.cpp
-  MICmnResources.cpp
-  MICmnStreamStderr.cpp
-  MICmnStreamStdin.cpp
-  MICmnStreamStdout.cpp
-  MICmnThreadMgrStd.cpp
-  MIDriver.cpp
-  MIDriverBase.cpp
-  MIDriverMain.cpp
-  MIDriverMgr.cpp
-  MIUtilDateTimeStd.cpp
-  MIUtilDebug.cpp
-  MIUtilFileStd.cpp
-  MIUtilMapIdToVariant.cpp
-  MIUtilString.cpp
-  MIUtilThreadBaseStd.cpp
-  MIUtilVariant.cpp
-
-  LINK_LIBS
-    liblldb
-    ${host_lib}
-    ${extra_libs}
-
-  LINK_COMPONENTS
-    Support
-  )
-
-if(LLDB_BUILD_FRAMEWORK)
-  # In the build-tree, we know the exact path to the framework directory.
-  # The installed framework can be in different locations.
-  get_target_property(framework_build_dir liblldb LIBRARY_OUTPUT_DIRECTORY)
-  lldb_setup_rpaths(lldb-mi
-    BUILD_RPATH
-      "${framework_build_dir}"
-    INSTALL_RPATH
-      "@loader_path/../../../SharedFrameworks"
-      "@loader_path/../../System/Library/PrivateFrameworks"
-      "@loader_path/../../Library/PrivateFrameworks"
-  )
-endif()
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgContext.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgContext.cpp
deleted file mode 100644
index 18da5b5..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgContext.cpp
+++ /dev/null
@@ -1,221 +0,0 @@
-//===-- MICmdArgContext.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgContext.h"
-
-//++
-// Details: CMICmdArgContext constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgContext::CMICmdArgContext() {}
-
-//++
-// Details: CMICmdArgContext constructor.
-// Type:    Method.
-// Args:    vrCmdLineArgsRaw    - (R) The text description of the arguments
-// options.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgContext::CMICmdArgContext(const CMIUtilString &vrCmdLineArgsRaw)
-    : m_strCmdArgsAndOptions(vrCmdLineArgsRaw) {}
-
-//++
-// Details: CMICmdArgContext destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgContext::~CMICmdArgContext() {}
-
-//++
-// Details: Retrieve the remainder of the command's argument options left to
-// parse.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - Argument options text.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmdArgContext::GetArgsLeftToParse() const {
-  return m_strCmdArgsAndOptions;
-}
-
-//++
-// Details: Ask if this arguments string has any arguments.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Has one or more arguments present, false = no
-// arguments.
-// Throws:  None.
-//--
-bool CMICmdArgContext::IsEmpty() const {
-  return m_strCmdArgsAndOptions.empty();
-}
-
-//++
-// Details: Remove the argument from the options text and any space after the
-// argument
-//          if applicable.
-// Type:    Method.
-// Args:    vArg    - (R) The name of the argument.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgContext::RemoveArg(const CMIUtilString &vArg) {
-  if (vArg.empty())
-    return MIstatus::success;
-
-  const size_t nLen = vArg.length();
-  const size_t nLenCntxt = m_strCmdArgsAndOptions.length();
-  if (nLen > nLenCntxt)
-    return MIstatus::failure;
-
-  size_t nExtraSpace = 0;
-  size_t nPos = m_strCmdArgsAndOptions.find(vArg);
-  while (1) {
-    if (nPos == std::string::npos)
-      return MIstatus::success;
-
-    bool bPass1 = false;
-    if (nPos != 0) {
-      if (m_strCmdArgsAndOptions[nPos - 1] == ' ')
-        bPass1 = true;
-    } else
-      bPass1 = true;
-
-    const size_t nEnd = nPos + nLen;
-
-    if (bPass1) {
-      bool bPass2 = false;
-      if (nEnd < nLenCntxt) {
-        if (m_strCmdArgsAndOptions[nEnd] == ' ') {
-          bPass2 = true;
-          nExtraSpace = 1;
-        }
-      } else
-        bPass2 = true;
-
-      if (bPass2)
-        break;
-    }
-
-    nPos = m_strCmdArgsAndOptions.find(vArg, nEnd);
-  }
-
-  const size_t nPosEnd = nLen + nExtraSpace;
-  m_strCmdArgsAndOptions = m_strCmdArgsAndOptions.replace(nPos, nPosEnd, "");
-  m_strCmdArgsAndOptions = m_strCmdArgsAndOptions.Trim();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Remove the argument at the Nth word position along in the context
-// string.
-//          Any space after the argument is removed if applicable. A search is
-//          not
-//          performed as there may be more than one vArg with the same 'name' in
-//          the
-//          context string.
-// Type:    Method.
-// Args:    vArg        - (R) The name of the argument.
-//          nArgIndex   - (R) The word count position to which to remove the
-//          vArg word.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgContext::RemoveArgAtPos(const CMIUtilString &vArg,
-                                      size_t nArgIndex) {
-  size_t nWordIndex = 0;
-  CMIUtilString strBuildContextUp;
-  const CMIUtilString::VecString_t vecWords(GetArgs());
-  const bool bSpaceRequired(GetNumberArgsPresent() > 2);
-
-  CMIUtilString::VecString_t::const_iterator it = vecWords.begin();
-  const CMIUtilString::VecString_t::const_iterator itEnd = vecWords.end();
-  while (it != itEnd) {
-    const CMIUtilString &rWord(*it);
-    if (nWordIndex++ != nArgIndex) {
-      // Single words
-      strBuildContextUp += rWord;
-      if (bSpaceRequired)
-        strBuildContextUp += " ";
-    } else {
-      // If quoted loose quoted text
-      if (++it != itEnd) {
-        CMIUtilString words = rWord;
-        while (vArg != words) {
-          if (bSpaceRequired)
-            words += " ";
-          words += *it;
-          if (++it == itEnd)
-            break;
-        }
-        if (it != itEnd)
-          --it;
-      }
-    }
-
-    // Next
-    if (it != itEnd)
-      ++it;
-  }
-
-  m_strCmdArgsAndOptions = strBuildContextUp;
-  m_strCmdArgsAndOptions = m_strCmdArgsAndOptions.Trim();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve number of arguments or options present in the command's
-// option text.
-// Type:    Method.
-// Args:    None.
-// Return:  size_t  - 0 to n arguments present.
-// Throws:  None.
-//--
-size_t CMICmdArgContext::GetNumberArgsPresent() const {
-  CMIUtilString::VecString_t vecOptions;
-  return m_strCmdArgsAndOptions.SplitConsiderQuotes(" ", vecOptions);
-}
-
-//++
-// Details: Retrieve all the arguments or options remaining in *this context.
-// Type:    Method.
-// Args:    None.
-// Return:  MIUtilString::VecString_t   - List of args remaining.
-// Throws:  None.
-//--
-CMIUtilString::VecString_t CMICmdArgContext::GetArgs() const {
-  CMIUtilString::VecString_t vecOptions;
-  m_strCmdArgsAndOptions.SplitConsiderQuotes(" ", vecOptions);
-  return vecOptions;
-}
-
-//++
-// Details: Copy assignment operator.
-// Type:    Method.
-// Args:    vOther  - (R) The variable to copy from.
-// Return:  CMIUtilString & - this object.
-// Throws:  None.
-//--
-CMICmdArgContext &CMICmdArgContext::operator=(const CMICmdArgContext &vOther) {
-  if (this != &vOther) {
-    m_strCmdArgsAndOptions = vOther.m_strCmdArgsAndOptions;
-  }
-
-  return *this;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgContext.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgContext.h
deleted file mode 100644
index 801d2d9..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgContext.h
+++ /dev/null
@@ -1,43 +0,0 @@
-//===-- MICmdArgContext.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI common code class. Command arguments and options string. Holds
-//          the context string.
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgContext {
-  // Methods:
-public:
-  /* ctor */ CMICmdArgContext();
-  /* ctor */ CMICmdArgContext(const CMIUtilString &vrCmdLineArgsRaw);
-  //
-  const CMIUtilString &GetArgsLeftToParse() const;
-  size_t GetNumberArgsPresent() const;
-  CMIUtilString::VecString_t GetArgs() const;
-  bool IsEmpty() const;
-  bool RemoveArg(const CMIUtilString &vArg);
-  bool RemoveArgAtPos(const CMIUtilString &vArg, size_t nArgIndex);
-  //
-  CMICmdArgContext &operator=(const CMICmdArgContext &vOther);
-
-  // Overridden:
-public:
-  // From CMIUtilString
-  /* dtor */ virtual ~CMICmdArgContext();
-
-  // Attributes:
-private:
-  CMIUtilString m_strCmdArgsAndOptions;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgSet.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgSet.cpp
deleted file mode 100644
index 0d67c03..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgSet.cpp
+++ /dev/null
@@ -1,386 +0,0 @@
-//===-- MICmdArgSet.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgSet.h"
-#include "MICmdArgValBase.h"
-#include "MICmnLog.h"
-#include "MICmnResources.h"
-
-//++
-// Details: CMICmdArgSet constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgSet::CMICmdArgSet()
-    : m_bIsArgsPresentButNotHandledByCmd(false), m_constStrCommaSpc(", ") {}
-
-//++
-// Details: CMICmdArgSet destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgSet::~CMICmdArgSet() {
-  // Tidy up
-  Destroy();
-}
-
-//++
-// Details: Release resources used by *this container object.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdArgSet::Destroy() {
-  // Delete command argument objects
-  if (!m_setCmdArgs.empty()) {
-    SetCmdArgs_t::iterator it = m_setCmdArgs.begin();
-    while (it != m_setCmdArgs.end()) {
-      CMICmdArgValBase *pArg(*it);
-      delete pArg;
-
-      // Next
-      ++it;
-    }
-    m_setCmdArgs.clear();
-  }
-
-  m_setCmdArgsThatNotValid.clear();
-  m_setCmdArgsThatAreMissing.clear();
-  m_setCmdArgsNotHandledByCmd.clear();
-  m_setCmdArgsMissingInfo.clear();
-  m_bIsArgsPresentButNotHandledByCmd = false;
-}
-
-//++
-// Details: Retrieve the state flag indicating that the command set up ready to
-// parse
-//          command arguments or options found that one or more arguments was
-//          indeed
-//          present but not handled. This is given as a warning in the MI log
-//          file.
-// Type:    Method.
-// Args:    None.
-// Return:  bool - True = one or more args not handled, false = all args handled
-// Throws:  None.
-//--
-bool CMICmdArgSet::IsArgsPresentButNotHandledByCmd() const {
-  return m_bIsArgsPresentButNotHandledByCmd;
-}
-
-//++
-// Details: Add the list of command's arguments to parse and validate another
-// one.
-// Type:    Method.
-// Args:    vArg    - (R) A command argument object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdArgSet::Add(CMICmdArgValBase *vArg) { m_setCmdArgs.push_back(vArg); }
-
-//++
-// Details: After validating an options line of text (the context) and there is
-// a failure,
-//          it is likely a mandatory command argument that is required is
-//          missing. This
-//          function returns the argument that should be present.
-// Type:    Method.
-// Args:    None.
-// Return:  SetCmdArgs_t & - Set of argument objects.
-// Throws:  None.
-//--
-const CMICmdArgSet::SetCmdArgs_t &CMICmdArgSet::GetArgsThatAreMissing() const {
-  return m_setCmdArgsThatAreMissing;
-}
-
-//++
-// Details: After validating an options line of text (the context) and there is
-// a failure,
-//          it may be because one or more arguments were unable to extract a
-//          value. This
-//          function returns the argument that were found to be invalid.
-// Type:    Method.
-// Args:    None.
-// Return:  SetCmdArgs_t & - Set of argument objects.
-// Throws:  None.
-//--
-const CMICmdArgSet::SetCmdArgs_t &CMICmdArgSet::GetArgsThatInvalid() const {
-  return m_setCmdArgsThatNotValid;
-}
-
-//++
-// Details: The list of argument or option (objects) that were specified by the
-// command
-//          and so recognised when parsed but were not handled. Ideally the
-//          command
-//          should handle all arguments and options presented to it. The command
-//          sends
-//          warning to the MI log file to say that these options were not
-//          handled.
-//          Used as one way to determine option that maybe should really be
-//          implemented
-//          and not just ignored.
-// Type:    Method.
-// Args:    None.
-// Return:  SetCmdArgs_t & - Set of argument objects.
-// Throws:  None.
-//--
-const CMICmdArgSet::SetCmdArgs_t &CMICmdArgSet::GetArgsNotHandledByCmd() const {
-  return m_setCmdArgsNotHandledByCmd;
-}
-
-//++
-// Details: Given a set of command argument objects parse the context option
-// string to
-//          find those argument and retrieve their value. If the function fails
-//          call
-//          GetArgsThatAreMissing() to see which commands that were mandatory
-//          were
-//          missing or failed to parse.
-// Type:    Method.
-// Args:    vStrMiCmd       - (R)  Command's name.
-//          vCmdArgsText    - (RW) A command's options or argument.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgSet::Validate(const CMIUtilString &vStrMiCmd,
-                            CMICmdArgContext &vwCmdArgsText) {
-  m_cmdArgContext = vwCmdArgsText;
-
-  // Iterate all the arguments or options required by a command
-  SetCmdArgs_t::const_iterator it = m_setCmdArgs.begin();
-  while (it != m_setCmdArgs.end()) {
-    CMICmdArgValBase *pArg = *it;
-
-    if (!pArg->Validate(vwCmdArgsText)) {
-      if (pArg->GetFound()) {
-        if (pArg->GetIsMissingOptions())
-          m_setCmdArgsMissingInfo.push_back(pArg);
-        else if (!pArg->GetValid())
-          m_setCmdArgsThatNotValid.push_back(pArg);
-      } else if (pArg->GetIsMandatory())
-        m_setCmdArgsThatAreMissing.push_back(pArg);
-    }
-
-    if (pArg->GetFound() && !pArg->GetIsHandledByCmd()) {
-      m_bIsArgsPresentButNotHandledByCmd = true;
-      m_setCmdArgsNotHandledByCmd.push_back(pArg);
-    }
-
-    // Next
-    ++it;
-  }
-
-  // report any issues with arguments/options
-  if (IsArgsPresentButNotHandledByCmd())
-    WarningArgsNotHandledbyCmdLogFile(vStrMiCmd);
-
-  return ValidationFormErrorMessages(vwCmdArgsText);
-}
-
-//++
-// Details: Having validated the command's options text and failed for some
-// reason form
-//          the error message made up with the faults found.
-// Type:    Method.
-//          vCmdArgsText    - (RW) A command's options or argument.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgSet::ValidationFormErrorMessages(
-    const CMICmdArgContext &vwCmdArgsText) {
-  CMIUtilString strListMissing;
-  CMIUtilString strListInvalid;
-  CMIUtilString strListMissingInfo;
-  const bool bArgsMissing = (m_setCmdArgsThatAreMissing.size() > 0);
-  const bool bArgsInvalid = (m_setCmdArgsThatNotValid.size() > 0);
-  const bool bArgsMissingInfo = (m_setCmdArgsMissingInfo.size() > 0);
-  if (!(bArgsMissing || bArgsInvalid || bArgsMissingInfo))
-    return MIstatus::success;
-  if (bArgsMissing) {
-    MIuint i = 0;
-    SetCmdArgs_t::const_iterator it = m_setCmdArgsThatAreMissing.begin();
-    while (it != m_setCmdArgsThatAreMissing.end()) {
-      if (i++ > 0)
-        strListMissing += m_constStrCommaSpc;
-
-      const CMICmdArgValBase *pArg(*it);
-      strListMissing += pArg->GetName();
-
-      // Next
-      ++it;
-    }
-  }
-  if (bArgsInvalid) {
-    MIuint i = 0;
-    SetCmdArgs_t::const_iterator it = m_setCmdArgsThatNotValid.begin();
-    while (it != m_setCmdArgsThatNotValid.end()) {
-      if (i++ > 0)
-        strListMissing += m_constStrCommaSpc;
-
-      const CMICmdArgValBase *pArg(*it);
-      strListInvalid += pArg->GetName();
-
-      // Next
-      ++it;
-    }
-  }
-  if (bArgsMissingInfo) {
-    MIuint i = 0;
-    SetCmdArgs_t::const_iterator it = m_setCmdArgsMissingInfo.begin();
-    while (it != m_setCmdArgsMissingInfo.end()) {
-      if (i++ > 0)
-        strListMissingInfo += m_constStrCommaSpc;
-
-      const CMICmdArgValBase *pArg(*it);
-      strListMissingInfo += pArg->GetName();
-
-      // Next
-      ++it;
-    }
-  }
-
-  bool bHaveOneError = false;
-  CMIUtilString strError = MIRSRC(IDS_CMD_ARGS_ERR_PREFIX_MSG);
-  if (bArgsMissing && bArgsInvalid) {
-    bHaveOneError = true;
-    strError +=
-        CMIUtilString::Format(MIRSRC(IDS_CMD_ARGS_ERR_VALIDATION_MAN_INVALID),
-                              strListMissing.c_str(), strListInvalid.c_str());
-  }
-  if (bArgsMissing) {
-    if (bHaveOneError)
-      strError += ". ";
-    bHaveOneError = true;
-    strError += CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ARGS_ERR_VALIDATION_MANDATORY), strListMissing.c_str());
-  }
-  if (bArgsMissingInfo) {
-    if (bHaveOneError)
-      strError += ". ";
-    bHaveOneError = true;
-    strError +=
-        CMIUtilString::Format(MIRSRC(IDS_CMD_ARGS_ERR_VALIDATION_MISSING_INF),
-                              strListMissingInfo.c_str());
-  }
-  if (bArgsInvalid) {
-    if (bHaveOneError)
-      strError += ". ";
-    bHaveOneError = true;
-    strError += CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ARGS_ERR_VALIDATION_INVALID), strListInvalid.c_str());
-  }
-  if (!vwCmdArgsText.IsEmpty()) {
-    if (bHaveOneError)
-      strError += ". ";
-    bHaveOneError = true;
-    strError +=
-        CMIUtilString::Format(MIRSRC(IDS_CMD_ARGS_ERR_CONTEXT_NOT_ALL_EATTEN),
-                              vwCmdArgsText.GetArgsLeftToParse().c_str());
-  }
-
-  if (bHaveOneError) {
-    SetErrorDescription(strError);
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Ask if the command's argument options text had any arguments.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Has one or more arguments present, false = no
-// arguments.
-// Throws:  None.
-//--
-bool CMICmdArgSet::IsArgContextEmpty() const {
-  return m_cmdArgContext.IsEmpty();
-}
-
-//++
-// Details: Retrieve the number of arguments that are being used for the
-// command.
-// Type:    Method.
-// Args:    None.
-// Return:  size_t - Argument count.
-// Throws:  None.
-//--
-size_t CMICmdArgSet::GetCount() const { return m_setCmdArgs.size(); }
-
-//++
-// Details: Given a set of command argument objects retrieve the argument with
-// the
-//          specified name.
-// Type:    Method.
-// Args:    vpArg   - (W) A pointer to a command's argument object.
-// Return:  True - Argument found.
-//          False - Argument not found.
-// Throws:  None.
-//--
-bool CMICmdArgSet::GetArg(const CMIUtilString &vArgName,
-                          CMICmdArgValBase *&vpArg) const {
-  bool bFound = false;
-  SetCmdArgs_t::const_iterator it = m_setCmdArgs.begin();
-  while (it != m_setCmdArgs.end()) {
-    CMICmdArgValBase *pArg(*it);
-    if (pArg->GetName() == vArgName) {
-      bFound = true;
-      vpArg = pArg;
-      break;
-    }
-
-    // Next
-    ++it;
-  }
-
-  return bFound;
-}
-
-//++
-// Details: Write a warning message to the MI Log file about the command's
-// arguments or
-//          options that were found present but not handled.
-// Type:    Method.
-// Args:    vrCmdName   - (R) The command's name.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdArgSet::WarningArgsNotHandledbyCmdLogFile(
-    const CMIUtilString &vrCmdName) {
-#if MICONFIG_GIVE_WARNING_CMD_ARGS_NOT_HANDLED
-
-  CMIUtilString strArgsNotHandled;
-  const CMICmdArgSet::SetCmdArgs_t &rSetArgs = GetArgsNotHandledByCmd();
-  MIuint nCnt = 0;
-  CMICmdArgSet::SetCmdArgs_t::const_iterator it = rSetArgs.begin();
-  while (it != rSetArgs.end()) {
-    if (nCnt++ > 0)
-      strArgsNotHandled += m_constStrCommaSpc;
-    const CMICmdArgValBase *pArg = *it;
-    strArgsNotHandled += pArg->GetName();
-
-    // Next
-    ++it;
-  }
-
-  const CMIUtilString strWarningMsg(
-      CMIUtilString::Format(MIRSRC(IDS_CMD_WRN_ARGS_NOT_HANDLED),
-                            vrCmdName.c_str(), strArgsNotHandled.c_str()));
-  m_pLog->WriteLog(strWarningMsg);
-
-#endif // MICONFIG_GIVE_WARNING_CMD_ARGS_NOT_HANDLED
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgSet.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgSet.h
deleted file mode 100644
index 4df5aaf..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgSet.h
+++ /dev/null
@@ -1,107 +0,0 @@
-//===-- MICmdArgSet.h -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-#include <vector>
-
-#include "MICmdArgContext.h"
-#include "MICmnBase.h"
-
-// Declarations:
-class CMICmdArgValBase;
-
-//++
-//============================================================================
-// Details: MI common code class. Command arguments container class.
-//          A command may have one or more arguments of which some may be
-//          optional.
-//          *this class contains a list of the command's arguments which are
-//          validates against the commands argument options string (context
-//          string).
-//          Each argument tries to extract the value it is looking for.
-//          Argument objects added to *this container are owned by this
-//          container
-//          and are deleted when this container goes out of scope. Allocate
-//          argument
-//          objects on the heap.
-//          It is assumed the arguments to be parsed are read from left to right
-//          in
-//          order. The order added to *this container is the order they will
-//          parsed.
-//--
-class CMICmdArgSet : public CMICmnBase {
-  // Classes:
-public:
-  //++
-  // Description: ArgSet's interface for command arguments to implement.
-  //--
-  class IArg {
-  public:
-    virtual bool GetFound() const = 0;
-    virtual bool GetIsHandledByCmd() const = 0;
-    virtual bool GetIsMandatory() const = 0;
-    virtual bool GetIsMissingOptions() const = 0;
-    virtual const CMIUtilString &GetName() const = 0;
-    virtual bool GetValid() const = 0;
-    virtual bool Validate(CMICmdArgContext &vwArgContext) = 0;
-
-    virtual ~IArg() = default;
-  };
-
-  // Typedefs:
-  typedef std::vector<CMICmdArgValBase *> SetCmdArgs_t;
-
-  // Methods:
-  CMICmdArgSet();
-
-  void Add(CMICmdArgValBase *vArg);
-  bool GetArg(const CMIUtilString &vArgName, CMICmdArgValBase *&vpArg) const;
-  const SetCmdArgs_t &GetArgsThatAreMissing() const;
-  const SetCmdArgs_t &GetArgsThatInvalid() const;
-  size_t GetCount() const;
-  bool IsArgContextEmpty() const;
-  bool IsArgsPresentButNotHandledByCmd() const;
-  void WarningArgsNotHandledbyCmdLogFile(const CMIUtilString &vrCmdName);
-  bool Validate(const CMIUtilString &vStrMiCmd,
-                CMICmdArgContext &vwCmdArgsText);
-
-  // Overrideable:
-  ~CMICmdArgSet() override;
-
-  // Methods:
-private:
-  const SetCmdArgs_t &GetArgsNotHandledByCmd() const;
-  void Destroy(); // Release resources used by *this object
-  bool ValidationFormErrorMessages(const CMICmdArgContext &vwCmdArgsText);
-
-  // Attributes:
-  bool m_bIsArgsPresentButNotHandledByCmd; // True = The driver's client
-                                           // presented the command with options
-                                           // recognised but not handled by
-  // a command, false = all args handled
-  SetCmdArgs_t m_setCmdArgs; // The set of arguments that are that the command
-                             // is expecting to find in the options string
-  SetCmdArgs_t m_setCmdArgsThatAreMissing; // The set of arguments that are
-                                           // required by the command but are
-                                           // missing
-  SetCmdArgs_t m_setCmdArgsThatNotValid;   // The set of arguments found in the
-                                           // text but for some reason unable to
-                                           // extract a value
-  SetCmdArgs_t m_setCmdArgsNotHandledByCmd; // The set of arguments specified by
-                                            // the command which were present to
-                                            // the command but not handled
-  SetCmdArgs_t m_setCmdArgsMissingInfo;     // The set of arguments that were
-                                        // present but were found to be missing
-                                        // additional information i.e.
-  // --thread 3 but 3 is missing
-  CMICmdArgContext m_cmdArgContext; // Copy of the command's argument options
-                                    // text before validate takes place (empties
-                                    // it of content)
-  const CMIUtilString m_constStrCommaSpc;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValBase.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValBase.cpp
deleted file mode 100644
index dc9c7e0..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValBase.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-//===-- MICmdArgValBase.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "MICmdArgValBase.h"
-#include "MICmdArgContext.h"
-#include "MIUtilString.h"
-
-//++
-// Details: CMICmdArgValBase constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValBase::CMICmdArgValBase()
-    : m_bFound(false), m_bValid(false), m_bMandatory(false), m_bHandled(false),
-      m_bIsMissingOptions(false) {}
-
-//++
-// Details: CMICmdArgValBase constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValBase::CMICmdArgValBase(const CMIUtilString &vrArgName,
-                                   const bool vbMandatory,
-                                   const bool vbHandleByCmd)
-    : m_bFound(false), m_bValid(false), m_bMandatory(vbMandatory),
-      m_strArgName(vrArgName), m_bHandled(vbHandleByCmd),
-      m_bIsMissingOptions(false) {}
-
-//++
-// Details: Retrieve the state flag of whether the argument is handled by the
-// command or
-//          not.
-// Type:    Method.
-// Args:    None.
-// Return:  True - Command needs more information.
-//          False - All information is present as expected.
-// Throws:  None.
-//--
-bool CMICmdArgValBase::GetIsMissingOptions() const {
-  return m_bIsMissingOptions;
-}
-
-//++
-// Details: Retrieve the state flag of whether the argument is handled by the
-// command or
-//          not.
-// Type:    Method.
-// Args:    None.
-// Return:  True - Command handles *this argument or option.
-//          False - Not handled (argument specified but ignored).
-// Throws:  None.
-//--
-bool CMICmdArgValBase::GetIsHandledByCmd() const { return m_bHandled; }
-
-//++
-// Details: Retrieve the name of *this argument.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - Return the text name.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmdArgValBase::GetName() const { return m_strArgName; }
-
-//++
-// Details: Retrieve the state flag of whether the argument was found in the
-// command's
-//          argument / options string.
-// Type:    Method.
-// Args:    None.
-// Return:  True - Argument found.
-//          False - Argument not found.
-// Throws:  None.
-//--
-bool CMICmdArgValBase::GetFound() const { return m_bFound; }
-
-//++
-// Details: Retrieve the state flag indicating whether the value was obtained
-// from the
-//          text arguments string and is valid.
-// Type:    Method.
-// Args:    None.
-// Return:  True - Argument valid.
-//          False - Argument not valid.
-// Throws:  None.
-//--
-bool CMICmdArgValBase::GetValid() const { return m_bValid; }
-
-//++
-// Details: Retrieve the state flag indicating whether *this argument is a
-// mandatory
-//          argument for the command or is optional to be present.
-// Type:    Method.
-// Args:    None.
-// Return:  True - Mandatory.
-//          False - Optional.
-// Throws:  None.
-//--
-bool CMICmdArgValBase::GetIsMandatory() const { return m_bMandatory; }
-
-//++
-// Details: Parse the command's argument options string and try to extract the
-// value *this
-//          argument is looking for.
-// Type:    Overrideable.
-// Args:    vArgContext - (RW) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValBase::Validate(CMICmdArgContext &vwArgContext) {
-  MIunused(vwArgContext);
-
-  // Override to implement
-
-  return MIstatus::failure;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValBase.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValBase.h
deleted file mode 100644
index feb7fe4..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValBase.h
+++ /dev/null
@@ -1,115 +0,0 @@
-//===-- MICmdArgValBase.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-#include "MICmdArgSet.h"
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument base class. Arguments objects
-//          needing specialization derived from *this class. An argument knows
-//          what type of argument it is and how it is to interpret the options
-//          (context) string to find and validate a matching argument and so
-//          extract a value from it.
-//          Argument objects are added to the CMICmdArgSet container object.
-//          Once added the container they belong to that contain and will be
-//          deleted when the container goes out of scope. Allocate argument
-//          objects on the heap and pass in to the Add().
-//          Note the code is written such that a command will produce an error
-//          should it be presented with arguments or options it does not
-//          understand.
-//          A command can recognise an option or argument then ignore if it
-//          wishes (a warning is sent to the MI's Log file). This is so it is
-//          hardwired to fail and catch arguments or options that presented by
-//          different driver clients.
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValBase : public CMICmdArgSet::IArg {
-  // Methods:
-public:
-  CMICmdArgValBase();
-  CMICmdArgValBase(const CMIUtilString &vrArgName, const bool vbMandatory,
-                   const bool vbHandleByCmd);
-
-  // Overrideable:
-  ~CMICmdArgValBase() override = default;
-
-  // Overridden:
-  // From CMICmdArgSet::IArg
-  bool GetFound() const override;
-  bool GetIsHandledByCmd() const override;
-  bool GetIsMandatory() const override;
-  bool GetIsMissingOptions() const override;
-  const CMIUtilString &GetName() const override;
-  bool GetValid() const override;
-  bool Validate(CMICmdArgContext &vwArgContext) override;
-
-  // Attributes:
-protected:
-  bool
-      m_bFound; // True = yes found in arguments options text, false = not found
-  bool m_bValid; // True = yes argument parsed and valid, false = not valid
-  bool
-      m_bMandatory; // True = yes arg must be present, false = optional argument
-  CMIUtilString m_strArgName;
-  bool m_bHandled; // True = Command processes *this option, false = not handled
-  bool m_bIsMissingOptions; // True = Command needs more information, false = ok
-};
-
-//++
-//============================================================================
-// Details: MI common code class. Templated command argument base class.
-//--
-template <class T> class CMICmdArgValBaseTemplate : public CMICmdArgValBase {
-  // Methods:
-public:
-  CMICmdArgValBaseTemplate() = default;
-  CMICmdArgValBaseTemplate(const CMIUtilString &vrArgName,
-                           const bool vbMandatory, const bool vbHandleByCmd);
-  //
-  const T &GetValue() const;
-
-  // Overrideable:
-  ~CMICmdArgValBaseTemplate() override = default;
-
-  // Attributes:
-protected:
-  T m_argValue;
-};
-
-//++
-// Details: CMICmdArgValBaseTemplate constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-// Return:  None.
-// Throws:  None.
-//--
-template <class T>
-CMICmdArgValBaseTemplate<T>::CMICmdArgValBaseTemplate(
-    const CMIUtilString &vrArgName, const bool vbMandatory,
-    const bool vbHandleByCmd)
-    : CMICmdArgValBase(vrArgName, vbMandatory, vbHandleByCmd) {}
-
-//++
-// Details: Retrieve the value the argument parsed from the command's argument /
-// options
-//          text string.
-// Type:    Method.
-// Args:    None.
-// Return:  Template type & - The arg value of *this object.
-// Throws:  None.
-//--
-template <class T> const T &CMICmdArgValBaseTemplate<T>::GetValue() const {
-  return m_argValue;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValConsume.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValConsume.cpp
deleted file mode 100644
index 01d0013..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValConsume.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//===-- MICmdArgValConsume.cpp ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValConsume.h"
-#include "MICmdArgContext.h"
-
-//++
-// Details: CMICmdArgValConsume constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValConsume::CMICmdArgValConsume() {}
-
-//++
-// Details: CMICmdArgValConsume constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValConsume::CMICmdArgValConsume(const CMIUtilString &vrArgName,
-                                         const bool vbMandatory)
-    : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, true) {}
-
-//++
-// Details: CMICmdArgValConsume destructor.
-// Type:    Overidden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValConsume::~CMICmdArgValConsume() {}
-
-//++
-// Details: Parse the command's argument options string and try to extract the
-// value *this
-//          argument is looking for.
-// Type:    Overridden.
-// Args:    vwArgContext    - (R) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValConsume::Validate(CMICmdArgContext &vwArgContext) {
-  if (vwArgContext.IsEmpty())
-    return m_bMandatory ? MIstatus::failure : MIstatus::success;
-
-  // Consume the optional file, line, linenum arguments till the mode '--'
-  // argument
-  const CMIUtilString::VecString_t vecOptions(vwArgContext.GetArgs());
-  CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
-  while (it != vecOptions.end()) {
-    const CMIUtilString &rTxt(*it);
-
-    if (rTxt == "--") {
-      m_bFound = true;
-      m_bValid = true;
-      if (!vwArgContext.RemoveArg(rTxt))
-        return MIstatus::failure;
-      return MIstatus::success;
-    }
-    // Next
-    ++it;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Nothing to examine as we just want to consume the argument or option
-// (ignore
-//          it).
-// Type:    Method.
-// Args:    None.
-// Return:  bool -  True = yes ok, false = not ok.
-// Throws:  None.
-//--
-bool CMICmdArgValConsume::IsOk() const { return true; }
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValConsume.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValConsume.h
deleted file mode 100644
index 62207f0..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValConsume.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- MICmdArgValConsume.h ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmdArgValBase.h"
-
-// Declarations:
-class CMICmdArgContext;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument class. Arguments object
-//          needing specialization derived from the CMICmdArgValBase class.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          argument. This type having recognised its argument name just
-//          consumes
-//          that argument or option (ignores it). This is the so the validation
-//          process can then ask if all arguments or options have been
-//          recognised
-//          other an error will occurred "argument not recognised". For example
-//          this can be used to consume the "--" text which is not an argument
-//          in
-//          itself. Normally the GetValue() function (in base class) would
-//          return
-//          a value for the argument but is not the case for *this argument type
-//          object.
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValConsume : public CMICmdArgValBaseTemplate<CMIUtilString> {
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValConsume();
-  /* ctor */ CMICmdArgValConsume(const CMIUtilString &vrArgName,
-                                 const bool vbMandatory);
-  //
-  bool IsOk() const;
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValConsume() override;
-  // From CMICmdArgSet::IArg
-  bool Validate(CMICmdArgContext &vwArgContext) override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValFile.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValFile.cpp
deleted file mode 100644
index 7171b0f..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValFile.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-//===-- MICmdArgValFile.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValFile.h"
-#include "MICmdArgContext.h"
-
-//++
-// Details: CMICmdArgValFile constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValFile::CMICmdArgValFile() {}
-
-//++
-// Details: CMICmdArgValFile constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValFile::CMICmdArgValFile(const CMIUtilString &vrArgName,
-                                   const bool vbMandatory,
-                                   const bool vbHandleByCmd)
-    : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, vbHandleByCmd) {}
-
-//++
-// Details: CMICmdArgValFile destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValFile::~CMICmdArgValFile() {}
-
-//++
-// Details: Parse the command's argument options string and try to extract the
-// value *this
-//          argument is looking for.
-// Type:    Overridden.
-// Args:    vwArgContext    - (R) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValFile::Validate(CMICmdArgContext &vwArgContext) {
-  if (vwArgContext.IsEmpty())
-    return m_bMandatory ? MIstatus::failure : MIstatus::success;
-
-  // The GDB/MI spec suggests there is only parameter
-
-  if (vwArgContext.GetNumberArgsPresent() == 1) {
-    const CMIUtilString &rFile(vwArgContext.GetArgsLeftToParse());
-    if (IsFilePath(rFile)) {
-      m_bFound = true;
-      m_bValid = true;
-      m_argValue = rFile.Trim('"');
-      vwArgContext.RemoveArg(rFile);
-      return MIstatus::success;
-    } else
-      return MIstatus::failure;
-  }
-
-  // In reality there are more than one option,  if so the file option
-  // is the last one (don't handle that here - find the best looking one)
-  const CMIUtilString::VecString_t vecOptions(vwArgContext.GetArgs());
-  CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
-  while (it != vecOptions.end()) {
-    const CMIUtilString &rTxt(*it);
-    if (IsFilePath(rTxt)) {
-      m_bFound = true;
-
-      if (vwArgContext.RemoveArg(rTxt)) {
-        m_bValid = true;
-        m_argValue = rTxt.Trim('"');
-        return MIstatus::success;
-      } else
-        return MIstatus::success;
-    }
-
-    // Next
-    ++it;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Given some text extract the file name path from it. If a space is
-// found in
-//          path done return the path surrounded in quotes.
-// Type:    Method.
-// Args:    vrTxt   - (R) The text to extract the file name path from.
-// Return:  CMIUtilString - File name and or path.
-// Throws:  None.
-//--
-CMIUtilString
-CMICmdArgValFile::GetFileNamePath(const CMIUtilString &vrTxt) const {
-  CMIUtilString fileNamePath(vrTxt);
-
-  // Look for a space in the path
-  const char cSpace = ' ';
-  const size_t nPos = fileNamePath.find(cSpace);
-  if (nPos != std::string::npos)
-    fileNamePath = CMIUtilString::Format("\"%s\"", fileNamePath.c_str());
-
-  return fileNamePath;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid file name path.
-// Type:    Method.
-// Args:    vrFileNamePath  - (R) File's name and directory path.
-// Return:  bool -  True = yes valid file path, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValFile::IsFilePath(const CMIUtilString &vrFileNamePath) const {
-  if (vrFileNamePath.empty())
-    return false;
-
-  const bool bHavePosSlash = (vrFileNamePath.find('/') != std::string::npos);
-  const bool bHaveBckSlash = (vrFileNamePath.find('\\') != std::string::npos);
-
-  // Look for --someLongOption
-  size_t nPos = vrFileNamePath.find("--");
-  const bool bLong = (nPos == 0);
-  if (bLong)
-    return false;
-
-  // Look for -f type short parameters
-  nPos = vrFileNamePath.find('-');
-  const bool bShort = (nPos == 0);
-  if (bShort)
-    return false;
-
-  // Look for i1 i2 i3....
-  nPos = vrFileNamePath.find('i');
-  const bool bFoundI1 = ((nPos == 0) && (::isdigit(vrFileNamePath[1])));
-  if (bFoundI1)
-    return false;
-
-  const bool bValidChars = IsValidChars(vrFileNamePath);
-  return bValidChars || bHavePosSlash || bHaveBckSlash;
-}
-
-//++
-// Details: Determine if the path contains valid characters for a file path.
-// Letters can be
-//          either upper or lower case.
-// Type:    Method.
-// Args:    vrText  - (R) The text data to examine.
-// Return:  bool - True = yes valid, false = one or more chars is valid.
-// Throws:  None.
-//--
-bool CMICmdArgValFile::IsValidChars(const CMIUtilString &vrText) const {
-  static CMIUtilString s_strSpecialCharacters(".'\"`@#$%^&*()_+-={}[]| ");
-  const char *pPtr = vrText.c_str();
-  for (MIuint i = 0; i < vrText.length(); i++, pPtr++) {
-    const char c = *pPtr;
-    if (::isalnum((int)c) == 0) {
-      if (s_strSpecialCharacters.find(c) == CMIUtilString::npos)
-        return false;
-    }
-  }
-
-  return true;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValFile.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValFile.h
deleted file mode 100644
index 8030cb7..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValFile.h
+++ /dev/null
@@ -1,47 +0,0 @@
-//===-- MICmdArgValFile.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmdArgValBase.h"
-
-// Declarations:
-class CMICmdArgContext;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument class. Arguments object
-//          needing specialization derived from the CMICmdArgValBase class.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          argument and so extract a value from it .
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValFile : public CMICmdArgValBaseTemplate<CMIUtilString> {
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValFile();
-  /* ctor */ CMICmdArgValFile(const CMIUtilString &vrArgName,
-                              const bool vbMandatory, const bool vbHandleByCmd);
-  //
-  bool IsFilePath(const CMIUtilString &vrFileNamePath) const;
-  CMIUtilString GetFileNamePath(const CMIUtilString &vrTxt) const;
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValFile() override;
-  // From CMICmdArgSet::IArg
-  bool Validate(CMICmdArgContext &vwArgContext) override;
-
-  // Methods:
-private:
-  bool IsValidChars(const CMIUtilString &vrText) const;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListBase.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListBase.cpp
deleted file mode 100644
index bd175f3..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListBase.cpp
+++ /dev/null
@@ -1,209 +0,0 @@
-//===-- MICmdArgValListBase.cpp ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValListBase.h"
-#include "MICmdArgContext.h"
-#include "MICmdArgValConsume.h"
-#include "MICmdArgValFile.h"
-#include "MICmdArgValNumber.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValString.h"
-#include "MICmdArgValThreadGrp.h"
-
-//++
-// Details: CMICmdArgValListBase constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValListBase::CMICmdArgValListBase()
-    : m_eArgType(eArgValType_invalid) {}
-
-//++
-// Details: CMICmdArgValListBase constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValListBase::CMICmdArgValListBase(const CMIUtilString &vrArgName,
-                                           const bool vbMandatory,
-                                           const bool vbHandleByCmd)
-    : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, vbHandleByCmd),
-      m_eArgType(eArgValType_invalid) {}
-
-//++
-// Details: CMICmdArgValListBase constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-//          veType          - (R) The type of argument to look for and create
-//          argument object of a certain type.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValListBase::CMICmdArgValListBase(const CMIUtilString &vrArgName,
-                                           const bool vbMandatory,
-                                           const bool vbHandleByCmd,
-                                           const ArgValType_e veType)
-    : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, vbHandleByCmd),
-      m_eArgType(veType) {}
-
-//++
-// Details: CMICmdArgValListBase destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValListBase::~CMICmdArgValListBase() {
-  // Tidy up
-  Destroy();
-}
-
-//++
-// Details: Tear down resources used by *this object.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdArgValListBase::Destroy() {
-  // Tidy up
-  VecArgObjPtr_t::const_iterator it = m_argValue.begin();
-  while (it != m_argValue.end()) {
-    CMICmdArgValBase *pArgObj = *it;
-    delete pArgObj;
-
-    // Next
-    ++it;
-  }
-  m_argValue.clear();
-}
-
-//++
-// Details: Create an CMICmdArgValBase derived object matching the type
-// specified
-//          and put the option or argument's value inside it.
-// Type:    Method.
-// Args:    vrTxt   - (R) Text version the option or argument.
-//          veType  - (R) The type of argument or option object to create.
-// Return:  CMICmdArgValBase * - Option object holding the value.
-//                              - NULL = Functional failed.
-// Throws:  None.
-//--
-CMICmdArgValBase *
-CMICmdArgValListBase::CreationObj(const CMIUtilString &vrTxt,
-                                  const ArgValType_e veType) const {
-  CMICmdArgValBase *pOptionObj = nullptr;
-  switch (veType) {
-  case eArgValType_File:
-    pOptionObj = new CMICmdArgValFile();
-    break;
-  case eArgValType_Consume:
-    pOptionObj = new CMICmdArgValConsume();
-    break;
-  case eArgValType_Number:
-    pOptionObj = new CMICmdArgValNumber();
-    break;
-  case eArgValType_OptionLong:
-    pOptionObj = new CMICmdArgValOptionLong();
-    break;
-  case eArgValType_OptionShort:
-    pOptionObj = new CMICmdArgValOptionShort();
-    break;
-  case eArgValType_String:
-    pOptionObj = new CMICmdArgValString();
-    break;
-  case eArgValType_StringQuoted:
-    pOptionObj = new CMICmdArgValString(true, false, false);
-    break;
-  case eArgValType_StringQuotedNumber:
-    pOptionObj = new CMICmdArgValString(true, true, false);
-    break;
-  case eArgValType_StringQuotedNumberPath:
-    pOptionObj = new CMICmdArgValString(true, true, true);
-    break;
-  case eArgValType_StringAnything:
-    pOptionObj = new CMICmdArgValString(true);
-    break;
-  case eArgValType_ThreadGrp:
-    pOptionObj = new CMICmdArgValThreadGrp();
-    break;
-  default:
-    return nullptr;
-  }
-
-  CMICmdArgContext argCntxt(vrTxt);
-  if (!pOptionObj->Validate(argCntxt))
-    return nullptr;
-
-  return pOptionObj;
-}
-
-//++
-// Details: Validate the option or argument is the correct type.
-// Type:    Method.
-// Args:    vrTxt   - (R) Text version the option or argument.
-//          veType  - (R) The type of value to expect.
-// Return:  bool    - True = Yes expected type present, False = no.
-// Throws:  None.
-//--
-bool CMICmdArgValListBase::IsExpectedCorrectType(
-    const CMIUtilString &vrTxt, const ArgValType_e veType) const {
-  bool bValid = false;
-  switch (veType) {
-  case eArgValType_File:
-    bValid = CMICmdArgValFile().IsFilePath(vrTxt);
-    break;
-  case eArgValType_Consume:
-    bValid = CMICmdArgValConsume().IsOk();
-    break;
-  case eArgValType_Number:
-    bValid = CMICmdArgValNumber().IsArgNumber(vrTxt);
-    break;
-  case eArgValType_OptionLong:
-    bValid = CMICmdArgValOptionLong().IsArgLongOption(vrTxt);
-    break;
-  case eArgValType_OptionShort:
-    bValid = CMICmdArgValOptionShort().IsArgShortOption(vrTxt);
-    break;
-  case eArgValType_String:
-    bValid = CMICmdArgValString().IsStringArg(vrTxt);
-    break;
-  case eArgValType_StringQuoted:
-    bValid = CMICmdArgValString(true, false, false).IsStringArg(vrTxt);
-    break;
-  case eArgValType_StringQuotedNumber:
-    bValid = CMICmdArgValString(true, true, false).IsStringArg(vrTxt);
-    break;
-  case eArgValType_StringQuotedNumberPath:
-    bValid = CMICmdArgValString(true, true, true).IsStringArg(vrTxt);
-    break;
-  case eArgValType_StringAnything:
-    bValid = CMICmdArgValString(true).IsStringArg(vrTxt);
-    break;
-  case eArgValType_ThreadGrp:
-    bValid = CMICmdArgValThreadGrp().IsArgThreadGrp(vrTxt);
-    break;
-  default:
-    return false;
-  }
-
-  return bValid;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListBase.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListBase.h
deleted file mode 100644
index 4437ae1..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListBase.h
+++ /dev/null
@@ -1,101 +0,0 @@
-//===-- MICmdArgValListBase.h -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include <vector>
-
-// In-house headers:
-#include "MICmdArgValBase.h"
-
-// Declarations:
-class CMICmdArgContext;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument with addition options class.
-//          For example --recurse 1 2 4 [group ...]. Arguments object that
-//          require a list of options associated with them derive from the
-//          CMICmdArgValListBase class. Additional options are also extracted
-//          from
-//          the command arguments text string.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          options and so extract a values from it .
-//          The CMICmdArgValBase objects are added to the derived argument
-//          class's
-//          container. The option arguments belong to that derived class and
-//          will
-//          be deleted that object goes out of scope.
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValListBase
-    : public CMICmdArgValBaseTemplate<std::vector<CMICmdArgValBase *>> {
-  // Typedef:
-public:
-  typedef std::vector<CMICmdArgValBase *> VecArgObjPtr_t;
-
-  // Enums:
-public:
-  //++
-  // Details: CMICmdArgValListBase needs to know what type of argument to look
-  // for in
-  //          the command options text. It also needs to create argument objects
-  //          of
-  //          a specific type.
-  //--
-  enum ArgValType_e {
-    eArgValType_File = 0,
-    eArgValType_Consume,
-    eArgValType_Number,
-    eArgValType_OptionLong,
-    eArgValType_OptionShort,
-    eArgValType_String,
-    eArgValType_StringQuoted,
-    eArgValType_StringQuotedNumber,
-    eArgValType_StringQuotedNumberPath,
-    eArgValType_StringAnything, // Accept any words for a string 'type' even if
-                                // they look like --longOptions for example
-    eArgValType_ThreadGrp,
-    eArgValType_count, // Always the last one
-    eArgValType_invalid
-  };
-
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValListBase();
-  /* ctor */ CMICmdArgValListBase(const CMIUtilString &vrArgName,
-                                  const bool vbMandatory,
-                                  const bool vbHandleByCmd);
-  /* ctor */ CMICmdArgValListBase(const CMIUtilString &vrArgName,
-                                  const bool vbMandatory,
-                                  const bool vbHandleByCmd,
-                                  const ArgValType_e veType);
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValListBase() override;
-
-  // Methods:
-protected:
-  bool IsExpectedCorrectType(const CMIUtilString &vrTxt,
-                             const ArgValType_e veType) const;
-  CMICmdArgValBase *CreationObj(const CMIUtilString &vrTxt,
-                                const ArgValType_e veType) const;
-
-  // Attributes:
-protected:
-  ArgValType_e m_eArgType;
-
-  // Methods:
-private:
-  void Destroy();
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListOfN.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListOfN.cpp
deleted file mode 100644
index b534245..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListOfN.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-//===-- MICmdArgValListOfN.cpp ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValListOfN.h"
-#include "MICmdArgContext.h"
-#include "MICmdArgValFile.h"
-#include "MICmdArgValNumber.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValString.h"
-#include "MICmdArgValThreadGrp.h"
-
-//++
-// Details: CMICmdArgValListOfN constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValListOfN::CMICmdArgValListOfN() {}
-
-//++
-// Details: CMICmdArgValListOfN constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-//          veType          - (R) The type of argument to look for and create
-//          argument object of a certain type.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValListOfN::CMICmdArgValListOfN(const CMIUtilString &vrArgName,
-                                         const bool vbMandatory,
-                                         const bool vbHandleByCmd,
-                                         const ArgValType_e veType)
-    : CMICmdArgValListBase(vrArgName, vbMandatory, vbHandleByCmd, veType) {}
-
-//++
-// Details: CMICmdArgValListOfN destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValListOfN::~CMICmdArgValListOfN() {}
-
-//++
-// Details: Parse the command's argument options string and try to extract the
-// list of
-//          arguments based on the argument object type to look for.
-// Type:    Overridden.
-// Args:    vwArgContext    - (RW) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValListOfN::Validate(CMICmdArgContext &vwArgContext) {
-  if (m_eArgType >= eArgValType_count) {
-    m_eArgType = eArgValType_invalid;
-    return MIstatus::failure;
-  }
-
-  if (vwArgContext.IsEmpty())
-    return m_bMandatory ? MIstatus::failure : MIstatus::success;
-
-  const CMIUtilString &rArg(vwArgContext.GetArgsLeftToParse());
-  if (IsListOfN(rArg) && CreateList(rArg)) {
-    m_bFound = true;
-    m_bValid = true;
-    vwArgContext.RemoveArg(rArg);
-    return MIstatus::success;
-  } else
-    return MIstatus::failure;
-}
-
-//++
-// Details: Create list of argument objects each holding a value extract from
-// the command
-//          options line.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some options text.
-// Return:  bool -  True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValListOfN::CreateList(const CMIUtilString &vrTxt) {
-  CMIUtilString::VecString_t vecOptions;
-  if ((m_eArgType == eArgValType_StringQuoted) ||
-      (m_eArgType == eArgValType_StringQuotedNumber) ||
-      (m_eArgType == eArgValType_StringQuotedNumberPath) ||
-      (m_eArgType == eArgValType_StringAnything)) {
-    if (vrTxt.SplitConsiderQuotes(" ", vecOptions) == 0)
-      return MIstatus::failure;
-  } else if (vrTxt.Split(" ", vecOptions) == 0)
-    return MIstatus::failure;
-
-  CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
-  while (it != vecOptions.end()) {
-    const CMIUtilString &rOption = *it;
-    CMICmdArgValBase *pOption = CreationObj(rOption, m_eArgType);
-    if (pOption != nullptr)
-      m_argValue.push_back(pOption);
-    else
-      return MIstatus::failure;
-
-    // Next
-    ++it;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid string type
-// argument.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool -  True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValListOfN::IsListOfN(const CMIUtilString &vrTxt) const {
-  CMIUtilString::VecString_t vecOptions;
-  if ((m_eArgType == eArgValType_StringQuoted) ||
-      (m_eArgType == eArgValType_StringQuotedNumber) ||
-      (m_eArgType == eArgValType_StringQuotedNumberPath) ||
-      (m_eArgType == eArgValType_StringAnything)) {
-    if (vrTxt.SplitConsiderQuotes(" ", vecOptions) == 0)
-      return false;
-  } else if (vrTxt.Split(" ", vecOptions) == 0)
-    return false;
-
-  CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
-  while (it != vecOptions.end()) {
-    const CMIUtilString &rOption = *it;
-    if (!IsExpectedCorrectType(rOption, m_eArgType))
-      break;
-
-    // Next
-    ++it;
-  }
-
-  return true;
-}
-
-//++
-// Details: Retrieve the list of CMICmdArgValBase derived option objects found
-// following
-//          *this long option argument. For example "list-thread-groups [
-//          --recurse 1 ]"
-//          where 1 is the list of expected option to follow.
-// Type:    Method.
-// Args:    None.
-// Return:  CMICmdArgValListBase::VecArgObjPtr_t & -    List of options.
-// Throws:  None.
-//--
-const CMICmdArgValListBase::VecArgObjPtr_t &
-CMICmdArgValListOfN::GetExpectedOptions() const {
-  return m_argValue;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListOfN.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListOfN.h
deleted file mode 100644
index 74e8c16..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValListOfN.h
+++ /dev/null
@@ -1,92 +0,0 @@
-//===-- MICmdArgValListOfN.h ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include <vector>
-
-// In-house headers:
-#include "MICmdArgValListBase.h"
-
-// Declarations:
-class CMICmdArgContext;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument class. Arguments object
-//          needing specialization derived from the CMICmdArgValBase class.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          argument and so extract a value from it .
-//          The CMICmdArgValBase objects added to *this ListOfN container belong
-//          to this container and will be deleted when *this object goes out of
-//          scope.
-//          To parse arguments like 'thread-id ...' i.e. 1 10 12 13 ...
-//          If vbMandatory argument is true it takes on the (...)+ specification
-//          otherwise assumed to be (...)* specification.
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValListOfN : public CMICmdArgValListBase {
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValListOfN();
-  /* ctor */ CMICmdArgValListOfN(const CMIUtilString &vrArgName,
-                                 const bool vbMandatory,
-                                 const bool vbHandleByCmd,
-                                 const ArgValType_e veType);
-  //
-  const VecArgObjPtr_t &GetExpectedOptions() const;
-  template <class T1, typename T2>
-  bool GetExpectedOption(T2 &vrwValue,
-                         const VecArgObjPtr_t::size_type vnAt = 0) const;
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValListOfN() override;
-  // From CMICmdArgSet::IArg
-  bool Validate(CMICmdArgContext &vArgContext) override;
-
-  // Methods:
-private:
-  bool IsListOfN(const CMIUtilString &vrTxt) const;
-  bool CreateList(const CMIUtilString &vrTxt);
-};
-
-//++
-// Details: Retrieve the first argument or option value from the list of 1 or
-// more options
-//          parsed from the command's options string.
-// Type:    Template method.
-// Args:    vrwValue    - (W) Templated type return value.
-//          vnAt        - (R) Value at the specific position.
-//          T1          - The argument value's class type of the data hold in
-//          the list of options.
-//          T2          - The type pf the variable which holds the value wanted.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed. List of object was empty.
-// Throws:  None.
-//--
-template <class T1, typename T2>
-bool CMICmdArgValListOfN::GetExpectedOption(
-    T2 &vrwValue, const VecArgObjPtr_t::size_type vnAt) const {
-  const VecArgObjPtr_t &rVecOptions(GetExpectedOptions());
-  if (rVecOptions.size() <= vnAt)
-    return MIstatus::failure;
-
-  VecArgObjPtr_t::const_iterator it2 = rVecOptions.begin() + vnAt;
-  if (it2 != rVecOptions.end()) {
-    const T1 *pOption = static_cast<T1 *>(*it2);
-    vrwValue = pOption->GetValue();
-    return MIstatus::success;
-  }
-
-  return MIstatus::failure;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValNumber.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValNumber.cpp
deleted file mode 100644
index ad2df79..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValNumber.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-//===-- MICmdArgValNumber.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValNumber.h"
-#include "MICmdArgContext.h"
-
-//++
-// Details: CMICmdArgValNumber constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValNumber::CMICmdArgValNumber()
-    : m_nNumberFormatMask(CMICmdArgValNumber::eArgValNumberFormat_Decimal),
-      m_nNumber(0) {}
-
-//++
-// Details: CMICmdArgValNumber constructor.
-// Type:    Method.
-// Args:    vrArgName          - (R) Argument's name to search by.
-//          vbMandatory        - (R) True = Yes must be present, false =
-//          optional argument.
-//          vbHandleByCmd      - (R) True = Command processes *this option,
-//          false = not handled.
-//          vnNumberFormatMask - (R) Mask of the number formats. (Dflt =
-//          CMICmdArgValNumber::eArgValNumberFormat_Decimal)
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValNumber::CMICmdArgValNumber(
-    const CMIUtilString &vrArgName, const bool vbMandatory,
-    const bool vbHandleByCmd,
-    const MIuint
-        vnNumberFormatMask /* = CMICmdArgValNumber::eArgValNumberFormat_Decimal*/)
-    : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, vbHandleByCmd),
-      m_nNumberFormatMask(vnNumberFormatMask), m_nNumber(0) {}
-
-//++
-// Details: CMICmdArgValNumber destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValNumber::~CMICmdArgValNumber() {}
-
-//++
-// Details: Parse the command's argument options string and try to extract the
-// value *this
-//          argument is looking for.
-// Type:    Overridden.
-// Args:    vwArgContext    - (RW) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValNumber::Validate(CMICmdArgContext &vwArgContext) {
-  if (vwArgContext.IsEmpty())
-    return m_bMandatory ? MIstatus::failure : MIstatus::success;
-
-  if (vwArgContext.GetNumberArgsPresent() == 1) {
-    const CMIUtilString &rArg(vwArgContext.GetArgsLeftToParse());
-    if (IsArgNumber(rArg) && ExtractNumber(rArg)) {
-      m_bFound = true;
-      m_bValid = true;
-      m_argValue = GetNumber();
-      vwArgContext.RemoveArg(rArg);
-      return MIstatus::success;
-    } else
-      return MIstatus::failure;
-  }
-
-  // More than one option...
-  const CMIUtilString::VecString_t vecOptions(vwArgContext.GetArgs());
-  CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
-  while (it != vecOptions.end()) {
-    const CMIUtilString &rArg(*it);
-    if (IsArgNumber(rArg) && ExtractNumber(rArg)) {
-      m_bFound = true;
-
-      if (vwArgContext.RemoveArg(rArg)) {
-        m_bValid = true;
-        m_argValue = GetNumber();
-        return MIstatus::success;
-      } else
-        return MIstatus::failure;
-    }
-
-    // Next
-    ++it;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid string type
-// argument.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValNumber::IsArgNumber(const CMIUtilString &vrTxt) const {
-  const bool bFormatDecimal(m_nNumberFormatMask &
-                            CMICmdArgValNumber::eArgValNumberFormat_Decimal);
-  const bool bFormatHexadecimal(
-      m_nNumberFormatMask &
-      CMICmdArgValNumber::eArgValNumberFormat_Hexadecimal);
-
-  // Look for --someLongOption
-  if (std::string::npos != vrTxt.find("--"))
-    return false;
-
-  if (bFormatDecimal && vrTxt.IsNumber())
-    return true;
-
-  if (bFormatHexadecimal && vrTxt.IsHexadecimalNumber())
-    return true;
-
-  return false;
-}
-
-//++
-// Details: Extract the thread group number from the thread group argument.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValNumber::ExtractNumber(const CMIUtilString &vrTxt) {
-  MIint64 nNumber = 0;
-  bool bOk = vrTxt.ExtractNumber(nNumber);
-  if (bOk) {
-    m_nNumber = static_cast<MIint64>(nNumber);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Retrieve the thread group ID found in the argument.
-// Type:    Method.
-// Args:    None.
-// Return:  MIuint - Thread group ID.
-// Throws:  None.
-//--
-MIint64 CMICmdArgValNumber::GetNumber() const { return m_nNumber; }
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValNumber.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValNumber.h
deleted file mode 100644
index 23c888e..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValNumber.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//===-- MICmdArgValNumber.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmdArgValBase.h"
-
-// Declarations:
-class CMICmdArgContext;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument class. Arguments object
-//          needing specialization derived from the CMICmdArgValBase class.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          argument and so extract a value from it .
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValNumber : public CMICmdArgValBaseTemplate<MIint64> {
-  // Enums:
-public:
-  //++
-  // Details: CMICmdArgValNumber needs to know what format of argument to look
-  // for in
-  //          the command options text.
-  //--
-  enum ArgValNumberFormat_e {
-    eArgValNumberFormat_Decimal = (1u << 0),
-    eArgValNumberFormat_Hexadecimal = (1u << 1),
-    eArgValNumberFormat_Auto =
-        ((eArgValNumberFormat_Hexadecimal << 1) -
-         1u) ///< Indicates to try and lookup everything up during a query.
-  };
-
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValNumber();
-  /* ctor */ CMICmdArgValNumber(
-      const CMIUtilString &vrArgName, const bool vbMandatory,
-      const bool vbHandleByCmd,
-      const MIuint vnNumberFormatMask = eArgValNumberFormat_Decimal);
-  //
-  bool IsArgNumber(const CMIUtilString &vrTxt) const;
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValNumber() override;
-  // From CMICmdArgSet::IArg
-  bool Validate(CMICmdArgContext &vwArgContext) override;
-
-  // Methods:
-private:
-  bool ExtractNumber(const CMIUtilString &vrTxt);
-  MIint64 GetNumber() const;
-
-  // Attributes:
-private:
-  MIuint m_nNumberFormatMask;
-  MIint64 m_nNumber;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp
deleted file mode 100644
index 3dc9d40..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp
+++ /dev/null
@@ -1,291 +0,0 @@
-//===-- MICmdArgValOptionLong.cpp -------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgContext.h"
-
-//++
-// Details: CMICmdArgValOptionLong constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValOptionLong::CMICmdArgValOptionLong()
-    : m_nExpectingNOptions(0), m_eExpectingOptionType(eArgValType_invalid) {}
-
-//++
-// Details: CMICmdArgValOptionLong constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValOptionLong::CMICmdArgValOptionLong(const CMIUtilString &vrArgName,
-                                               const bool vbMandatory,
-                                               const bool vbHandleByCmd)
-    : CMICmdArgValListBase(vrArgName, vbMandatory, vbHandleByCmd),
-      m_nExpectingNOptions(0), m_eExpectingOptionType(eArgValType_invalid) {}
-
-//++
-// Details: CMICmdArgValOptionLong constructor.
-// Type:    Method.
-// Args:    vrArgName           - (R) Argument's name to search by.
-//          vbMandatory         - (R) True = Yes must be present, false =
-//          optional argument.
-//          vbHandleByCmd       - (R) True = Command processes *this option,
-//          false = not handled.
-//          veType              - (R) The type of argument to look for and
-//          create argument object of a certain type.
-//          vnExpectingNOptions - (R) The number of options expected to read
-//          following *this argument.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValOptionLong::CMICmdArgValOptionLong(const CMIUtilString &vrArgName,
-                                               const bool vbMandatory,
-                                               const bool vbHandleByCmd,
-                                               const ArgValType_e veType,
-                                               const MIuint vnExpectingNOptions)
-    : CMICmdArgValListBase(vrArgName, vbMandatory, vbHandleByCmd),
-      m_nExpectingNOptions(vnExpectingNOptions),
-      m_eExpectingOptionType(veType) {}
-
-//++
-// Details: CMICmdArgValOptionLong destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValOptionLong::~CMICmdArgValOptionLong() {
-  // Tidy up
-  Destroy();
-}
-
-//++
-// Details: Tear down resources used by *this object.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdArgValOptionLong::Destroy() {
-  // Tidy up
-  VecArgObjPtr_t::const_iterator it = m_vecArgsExpected.begin();
-  while (it != m_vecArgsExpected.end()) {
-    CMICmdArgValBase *pOptionObj = *it;
-    delete pOptionObj;
-
-    // Next
-    ++it;
-  }
-  m_vecArgsExpected.clear();
-}
-
-//++
-// Details: Parse the command's argument options string and try to extract the
-// long
-//          argument *this argument type is looking for.
-// Type:    Overridden.
-// Args:    vwArgContext    - (RW) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValOptionLong::Validate(CMICmdArgContext &vwArgContext) {
-  if (vwArgContext.IsEmpty())
-    return m_bMandatory ? MIstatus::failure : MIstatus::success;
-
-  if (vwArgContext.GetNumberArgsPresent() == 1) {
-    const CMIUtilString &rArg(vwArgContext.GetArgsLeftToParse());
-    if (IsArgLongOption(rArg) && ArgNameMatch(rArg)) {
-      m_bFound = true;
-
-      if (!vwArgContext.RemoveArg(rArg))
-        return MIstatus::failure;
-
-      if (m_nExpectingNOptions == 0) {
-        m_bValid = true;
-        return MIstatus::success;
-      }
-
-      m_bIsMissingOptions = true;
-      return MIstatus::failure;
-    } else
-      return MIstatus::failure;
-  }
-
-  // More than one option...
-  MIuint nArgIndex = 0;
-  const CMIUtilString::VecString_t vecOptions(vwArgContext.GetArgs());
-  CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
-  while (it != vecOptions.end()) {
-    const CMIUtilString &rArg(*it);
-    if (IsArgOptionCorrect(rArg) && ArgNameMatch(rArg)) {
-      m_bFound = true;
-
-      if (!vwArgContext.RemoveArg(rArg))
-        return MIstatus::failure;
-
-      if (m_nExpectingNOptions != 0) {
-        if (ExtractExpectedOptions(vwArgContext, nArgIndex)) {
-          m_bValid = true;
-          return MIstatus::success;
-        }
-
-        m_bIsMissingOptions = true;
-        return MIstatus::failure;
-      } else {
-        m_bValid = true;
-        return MIstatus::success;
-      }
-    }
-
-    // Next
-    ++it;
-    ++nArgIndex;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Parse the text following *this argument and extract the options the
-// values of
-//          CMICmdArgValListBase::m_eArgType forming argument objects for each
-//          of those
-//          options extracted.
-// Type:    Method.
-// Args:    vrwTxt      - (RW)  The command's argument options string.
-//          nArgIndex   - (R)   The Nth arg position in argument context from
-//          the left.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValOptionLong::ExtractExpectedOptions(CMICmdArgContext &vrwTxt,
-                                                    const MIuint nArgIndex) {
-  CMIUtilString::VecString_t vecOptions = vrwTxt.GetArgs();
-  if (vecOptions.size() == 0)
-    return MIstatus::failure;
-
-  MIuint nArgIndexCnt = 0;
-  MIuint nTypeCnt = 0;
-  MIuint nTypeCnt2 = 0;
-  MIuint nFoundNOptionsCnt = 0;
-  CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
-  while (it != vecOptions.end()) {
-    // Move to the Nth argument position from left before do validation/checking
-    if (nArgIndexCnt++ == nArgIndex) {
-      nTypeCnt++;
-      const CMIUtilString &rOption(*it);
-      if (IsExpectedCorrectType(rOption, m_eExpectingOptionType)) {
-        nTypeCnt2++;
-        CMICmdArgValBase *pOptionObj =
-            CreationObj(rOption, m_eExpectingOptionType);
-        if ((pOptionObj != nullptr) &&
-            vrwTxt.RemoveArgAtPos(rOption, nArgIndex)) {
-          nFoundNOptionsCnt++;
-          m_vecArgsExpected.push_back(pOptionObj);
-        }
-      }
-
-      // Is the sequence 'options' of same type broken. Expecting the same type
-      // until the
-      // next argument.
-      if (nTypeCnt != nTypeCnt2)
-        return MIstatus::failure;
-
-      if (nFoundNOptionsCnt == m_nExpectingNOptions)
-        return MIstatus::success;
-    }
-
-    // Next
-    ++it;
-  }
-  if (nFoundNOptionsCnt != m_nExpectingNOptions)
-    return MIstatus::failure;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid long type option
-// argument.
-//          Long type argument looks like --someLongOption.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValOptionLong::IsArgLongOption(const CMIUtilString &vrTxt) const {
-  const bool bHavePosSlash = (vrTxt.find('/') != std::string::npos);
-  const bool bHaveBckSlash = (vrTxt.find('\\') != std::string::npos);
-  if (bHavePosSlash || bHaveBckSlash)
-    return false;
-
-  const size_t nPos = vrTxt.find("--");
-  if (nPos != 0)
-    return false;
-
-  if (vrTxt.length() < 3)
-    return false;
-
-  const CMIUtilString strArg = vrTxt.substr(2);
-  return !strArg.IsNumber();
-}
-
-//++
-// Details: Examine the string and determine if it is a valid long type option
-// argument.
-//          Long type argument looks like --someLongOption.
-// Type:    Overideable.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValOptionLong::IsArgOptionCorrect(
-    const CMIUtilString &vrTxt) const {
-  return IsArgLongOption(vrTxt);
-}
-
-//++
-// Details: Does the argument name of the argument being parsed ATM match the
-// name of
-//          *this argument object.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes arg name matched, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValOptionLong::ArgNameMatch(const CMIUtilString &vrTxt) const {
-  const CMIUtilString strArg = vrTxt.substr(2);
-  return (strArg == GetName());
-}
-
-//++
-// Details: Retrieve the list of CMICmdArgValBase derived option objects found
-// following
-//          *this long option argument. For example "list-thread-groups [
-//          --recurse 1 ]"
-//          where 1 is the list of expected option to follow.
-// Type:    Method.
-// Args:    None.
-// Return:  CMICmdArgValListBase::VecArgObjPtr_t & - List of options.
-// Throws:  None.
-//--
-const CMICmdArgValListBase::VecArgObjPtr_t &
-CMICmdArgValOptionLong::GetExpectedOptions() const {
-  return m_vecArgsExpected;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionLong.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionLong.h
deleted file mode 100644
index 2408297..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionLong.h
+++ /dev/null
@@ -1,104 +0,0 @@
-//===-- MICmdArgValOptionLong.h ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmdArgValListBase.h"
-
-// Declarations:
-class CMICmdArgContext;
-class CMIUtilString;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument class. Arguments object
-//          needing specialization derived from the CMICmdArgValBase class.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          argument and so extract a value from it.
-//          If *this argument has expected options following it the option
-//          objects
-//          created to hold each of those option's values belong to *this
-//          argument
-//          object and so are deleted when *this object goes out of scope.
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValOptionLong : public CMICmdArgValListBase {
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValOptionLong();
-  /* ctor */ CMICmdArgValOptionLong(const CMIUtilString &vrArgName,
-                                    const bool vbMandatory,
-                                    const bool vbHandleByCmd);
-  /* ctor */ CMICmdArgValOptionLong(const CMIUtilString &vrArgName,
-                                    const bool vbMandatory,
-                                    const bool vbHandleByCmd,
-                                    const ArgValType_e veType,
-                                    const MIuint vnExpectingNOptions);
-  //
-  bool IsArgLongOption(const CMIUtilString &vrTxt) const;
-  const VecArgObjPtr_t &GetExpectedOptions() const;
-  template <class T1, typename T2> bool GetExpectedOption(T2 &vrwValue) const;
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValOptionLong() override;
-  // From CMICmdArgSet::IArg
-  bool Validate(CMICmdArgContext &vArgContext) override;
-
-  // Methods:
-protected:
-  bool ExtractExpectedOptions(CMICmdArgContext &vrwTxt, const MIuint nArgIndex);
-
-  // Overrideable:
-protected:
-  virtual bool IsArgOptionCorrect(const CMIUtilString &vrTxt) const;
-  virtual bool ArgNameMatch(const CMIUtilString &vrTxt) const;
-
-  // Methods:
-private:
-  void Destroy();
-
-  // Attributes:
-private:
-  MIuint m_nExpectingNOptions;         // The number of options expected to read
-                                       // following *this argument
-  VecArgObjPtr_t m_vecArgsExpected;    // The option objects holding the value
-                                       // extracted following *this argument
-  ArgValType_e m_eExpectingOptionType; // The type of options expected to read
-                                       // following *this argument
-};
-
-//++
-// Details: Retrieve the first argument or option value from the list of 1 or
-// more options
-//          parsed from the command's options string.
-// Type:    Template method.
-// Args:    vrwValue    - (W) Templated type return value.
-//          T1          - The argument value's class type of the data hold in
-//          the list of options.
-//          T2          - The type pf the variable which holds the value wanted.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed. List of object was empty.
-// Throws:  None.
-//--
-template <class T1, typename T2>
-bool CMICmdArgValOptionLong::GetExpectedOption(T2 &vrwValue) const {
-  const VecArgObjPtr_t &rVecOptions(GetExpectedOptions());
-  VecArgObjPtr_t::const_iterator it2 = rVecOptions.begin();
-  if (it2 != rVecOptions.end()) {
-    const T1 *pOption = static_cast<T1 *>(*it2);
-    vrwValue = pOption->GetValue();
-    return MIstatus::success;
-  }
-
-  return MIstatus::failure;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp
deleted file mode 100644
index 7b7116c..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionShort.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-//===-- MICmdArgValOptionShort.cpp ------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgContext.h"
-
-//++
-// Details: CMICmdArgValOptionShort constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValOptionShort::CMICmdArgValOptionShort() {}
-
-//++
-// Details: CMICmdArgValOptionShort constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValOptionShort::CMICmdArgValOptionShort(const CMIUtilString &vrArgName,
-                                                 const bool vbMandatory,
-                                                 const bool vbHandleByCmd)
-    : CMICmdArgValOptionLong(vrArgName, vbMandatory, vbHandleByCmd) {}
-
-//++
-// Details: CMICmdArgValOptionLong constructor.
-// Type:    Method.
-// Args:    vrArgName           - (R) Argument's name to search by.
-//          vbMandatory         - (R) True = Yes must be present, false =
-//          optional argument.
-//          vbHandleByCmd       - (R) True = Command processes *this option,
-//          false = not handled.
-//          veType              - (R) The type of argument to look for and
-//          create argument object of a certain type.
-//          vnExpectingNOptions - (R) The number of options expected to read
-//          following *this argument.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValOptionShort::CMICmdArgValOptionShort(
-    const CMIUtilString &vrArgName, const bool vbMandatory,
-    const bool vbHandleByCmd, const ArgValType_e veType,
-    const MIuint vnExpectingNOptions)
-    : CMICmdArgValOptionLong(vrArgName, vbMandatory, vbHandleByCmd, veType,
-                             vnExpectingNOptions) {}
-
-//++
-// Details: CMICmdArgValOptionShort destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValOptionShort::~CMICmdArgValOptionShort() {}
-
-//++
-// Details: Examine the string and determine if it is a valid short type option
-// argument.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValOptionShort::IsArgShortOption(
-    const CMIUtilString &vrTxt) const {
-  // Look for --someLongOption
-  MIint nPos = vrTxt.find("--");
-  if (nPos == 0)
-    return false;
-
-  // Look for -f short option
-  nPos = vrTxt.find('-');
-  if (nPos != 0)
-    return false;
-
-  if (vrTxt.length() > 2)
-    return false;
-
-  return true;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid short type option
-// argument.
-//          Long type argument looks like -f some short option.
-// Type:    Overridden.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValOptionShort::IsArgOptionCorrect(
-    const CMIUtilString &vrTxt) const {
-  return IsArgShortOption(vrTxt);
-}
-
-//++
-// Details: Does the argument name of the argument being parsed ATM match the
-// name of
-//          *this argument object.
-// Type:    Overridden.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes arg name matched, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValOptionShort::ArgNameMatch(const CMIUtilString &vrTxt) const {
-  const CMIUtilString strArg = vrTxt.substr(1);
-  return (strArg == GetName());
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionShort.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionShort.h
deleted file mode 100644
index fd39c9e..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValOptionShort.h
+++ /dev/null
@@ -1,59 +0,0 @@
-//===-- MICmdArgValOptionShort.h --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmdArgValOptionLong.h"
-
-// Declarations:
-class CMICmdArgContext;
-class CMIUtilString;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument class. Arguments object
-//          needing specialization derived from the CMICmdArgValOptionLong
-//          class.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          argument and so extract a value from it.
-//          If *this argument has expected options following it the option
-//          objects
-//          created to hold each of those option's values belong to *this
-//          argument
-//          object and so are deleted when *this object goes out of scope.
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValOptionShort : public CMICmdArgValOptionLong {
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValOptionShort();
-  /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName,
-                                     const bool vbMandatory,
-                                     const bool vbHandleByCmd);
-  /* ctor */ CMICmdArgValOptionShort(const CMIUtilString &vrArgName,
-                                     const bool vbMandatory,
-                                     const bool vbHandleByCmd,
-                                     const ArgValType_e veType,
-                                     const MIuint vnExpectingNOptions);
-  //
-  bool IsArgShortOption(const CMIUtilString &vrTxt) const;
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValOptionShort() override;
-
-  // Overridden:
-private:
-  // From CMICmdArgValOptionLong
-  bool IsArgOptionCorrect(const CMIUtilString &vrTxt) const override;
-  bool ArgNameMatch(const CMIUtilString &vrTxt) const override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValPrintValues.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValPrintValues.cpp
deleted file mode 100644
index a2ce452..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValPrintValues.cpp
+++ /dev/null
@@ -1,125 +0,0 @@
-//===-- MICmdArgValPrintValues.cpp ------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValPrintValues.h"
-#include "MICmdArgContext.h"
-
-//++
-// Details: CMICmdArgValPrintValues constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValPrintValues::CMICmdArgValPrintValues() : m_nPrintValues(0) {}
-
-//++
-// Details: CMICmdArgValPrintValues constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValPrintValues::CMICmdArgValPrintValues(const CMIUtilString &vrArgName,
-                                                 const bool vbMandatory,
-                                                 const bool vbHandleByCmd)
-    : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, vbHandleByCmd),
-      m_nPrintValues(0) {}
-
-//++
-// Details: CMICmdArgValPrintValues destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValPrintValues::~CMICmdArgValPrintValues() {}
-
-//++
-// Details: Parse the command's argument options string and try to extract the
-// value *this
-//          argument is looking for.
-// Type:    Overridden.
-// Args:    vwArgContext    - (RW) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValPrintValues::Validate(CMICmdArgContext &vwArgContext) {
-  if (vwArgContext.IsEmpty())
-    return m_bMandatory ? MIstatus::failure : MIstatus::success;
-
-  const CMIUtilString strArg(vwArgContext.GetArgs()[0]);
-  if (IsArgPrintValues(strArg) && ExtractPrintValues(strArg)) {
-    m_bFound = true;
-    m_bValid = true;
-    m_argValue = GetPrintValues();
-    vwArgContext.RemoveArg(strArg);
-    return MIstatus::success;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid string type
-// argument.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValPrintValues::IsArgPrintValues(
-    const CMIUtilString &vrTxt) const {
-  return (CMIUtilString::Compare(vrTxt, "0") ||
-          CMIUtilString::Compare(vrTxt, "--no-values") ||
-          CMIUtilString::Compare(vrTxt, "1") ||
-          CMIUtilString::Compare(vrTxt, "--all-values") ||
-          CMIUtilString::Compare(vrTxt, "2") ||
-          CMIUtilString::Compare(vrTxt, "--simple-values"));
-}
-
-//++
-// Details: Extract the print-values from the print-values argument.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValPrintValues::ExtractPrintValues(const CMIUtilString &vrTxt) {
-  if (CMIUtilString::Compare(vrTxt, "0") ||
-      CMIUtilString::Compare(vrTxt, "--no-values"))
-    m_nPrintValues = 0;
-  else if (CMIUtilString::Compare(vrTxt, "1") ||
-           CMIUtilString::Compare(vrTxt, "--all-values"))
-    m_nPrintValues = 1;
-  else if (CMIUtilString::Compare(vrTxt, "2") ||
-           CMIUtilString::Compare(vrTxt, "--simple-values"))
-    m_nPrintValues = 2;
-  else
-    return MIstatus::failure;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the print-values found in the argument.
-// Type:    Method.
-// Args:    None.
-// Return:  MIuint - The print-values.
-// Throws:  None.
-//--
-MIuint CMICmdArgValPrintValues::GetPrintValues() const {
-  return m_nPrintValues;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValPrintValues.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValPrintValues.h
deleted file mode 100644
index 3fa8142..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValPrintValues.h
+++ /dev/null
@@ -1,56 +0,0 @@
-//===-- MICmdArgValPrintValues.h --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmdArgValBase.h"
-
-// Declarations:
-class CMICmdArgContext;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument class. Arguments object
-//          needing specialization derived from the CMICmdArgValBase class.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          argument and so extract a value from it. The print-values looks
-//          like:
-//            0 or --no-values
-//            1 or --all-values
-//            2 or --simple-values
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValPrintValues : public CMICmdArgValBaseTemplate<MIuint> {
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValPrintValues();
-  /* ctor */ CMICmdArgValPrintValues(const CMIUtilString &vrArgName,
-                                     const bool vbMandatory,
-                                     const bool vbHandleByCmd);
-  //
-  bool IsArgPrintValues(const CMIUtilString &vrTxt) const;
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValPrintValues() override;
-  // From CMICmdArgSet::IArg
-  bool Validate(CMICmdArgContext &vArgContext) override;
-
-  // Methods:
-private:
-  bool ExtractPrintValues(const CMIUtilString &vrTxt);
-  MIuint GetPrintValues() const;
-
-  // Attributes:
-private:
-  MIuint m_nPrintValues;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValString.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValString.cpp
deleted file mode 100644
index bd105bc..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValString.cpp
+++ /dev/null
@@ -1,380 +0,0 @@
-//===-- MICmdArgValString.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValString.h"
-#include "MICmdArgContext.h"
-
-//++
-// Details: CMICmdArgValString constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValString::CMICmdArgValString()
-    : m_bHandleQuotedString(false), m_bAcceptNumbers(false),
-      m_bHandleDirPaths(false), m_bHandleAnything(false) {}
-
-//++
-// Details: CMICmdArgValString constructor.
-// Type:    Method.
-// Args:    vbAnything  - (R) True = Parse a string and accept anything, false =
-// do not accept anything.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValString::CMICmdArgValString(const bool vbAnything)
-    : m_bHandleQuotedString(vbAnything), m_bAcceptNumbers(false),
-      m_bHandleDirPaths(false), m_bHandleAnything(vbAnything) {}
-
-//++
-// Details: CMICmdArgValString constructor.
-// Type:    Method.
-// Args:    vbHandleQuotes      - (R) True = Parse a string surrounded by quotes
-// spaces are not delimiters, false = only text up to
-// next delimiting space character.
-//          vbAcceptNumbers     - (R) True = Parse a string and accept as a
-//          number if number, false = numbers not recognised
-// as string types.
-//          vbHandleDirPaths    - (R) True = Parse a string and accept as a file
-//          path if a path, false = file paths are not
-// recognised as string types.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValString::CMICmdArgValString(const bool vbHandleQuotes,
-                                       const bool vbAcceptNumbers,
-                                       const bool vbHandleDirPaths)
-    : m_bHandleQuotedString(vbHandleQuotes), m_bAcceptNumbers(vbAcceptNumbers),
-      m_bHandleDirPaths(vbHandleDirPaths), m_bHandleAnything(false) {}
-
-//++
-// Details: CMICmdArgValString constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-//          vbHandleQuotes  - (R) True = Parse a string surrounded by quotes
-//          spaces are not delimiters, false = only text up to
-// next delimiting space character. (Dflt = false)
-//          vbAcceptNumbers - (R) True = Parse a string and accept as a number
-//          if number, false = numbers not recognised as
-// string types. (Dflt = false)
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValString::CMICmdArgValString(const CMIUtilString &vrArgName,
-                                       const bool vbMandatory,
-                                       const bool vbHandleByCmd,
-                                       const bool vbHandleQuotes /* = false */,
-                                       const bool vbAcceptNumbers /* = false */)
-    : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, vbHandleByCmd),
-      m_bHandleQuotedString(vbHandleQuotes), m_bAcceptNumbers(vbAcceptNumbers),
-      m_bHandleDirPaths(false), m_bHandleAnything(false) {}
-
-//++
-// Details: CMICmdArgValString constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-//          vbHandleQuotes  - (R) True = Parse a string surrounded by quotes
-//          spaces are not delimiters, false = only text up to
-// next delimiting space character.
-//          vbAcceptNumbers - (R) True = Parse a string and accept as a number
-//          if number, false = numbers not recognised as
-//          vbHandleDirPaths - (R) True = Parse a string and accept as a file
-//          path if a path, false = file paths are not
-// string types.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValString::CMICmdArgValString(const CMIUtilString &vrArgName,
-                                       const bool vbMandatory,
-                                       const bool vbHandleByCmd,
-                                       const bool vbHandleQuotes,
-                                       const bool vbAcceptNumbers,
-                                       const bool vbHandleDirPaths)
-    : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, vbHandleByCmd),
-      m_bHandleQuotedString(vbHandleQuotes), m_bAcceptNumbers(vbAcceptNumbers),
-      m_bHandleDirPaths(vbHandleDirPaths), m_bHandleAnything(false) {}
-
-//++
-// Details: CMICmdArgValString destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValString::~CMICmdArgValString() {}
-
-//++
-// Details: Parse the command's argument options string and try to extract the
-// value *this
-//          argument is looking for.
-// Type:    Overridden.
-// Args:    vrwArgContext   - (RW) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValString::Validate(CMICmdArgContext &vrwArgContext) {
-  if (vrwArgContext.IsEmpty())
-    return m_bMandatory ? MIstatus::failure : MIstatus::success;
-
-  if (m_bHandleQuotedString)
-    return ValidateQuotedText(vrwArgContext);
-
-  return ValidateSingleText(vrwArgContext);
-}
-
-//++
-// Details: Parse the command's argument options string and try to extract only
-// the next
-//          word delimited by the next space.
-// Type:    Method.
-// Args:    vrwArgContext   - (RW) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValString::ValidateSingleText(CMICmdArgContext &vrwArgContext) {
-  const CMIUtilString::VecString_t vecOptions(vrwArgContext.GetArgs());
-  CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
-  while (it != vecOptions.end()) {
-    const CMIUtilString &rArg(*it);
-    if (IsStringArg(rArg)) {
-      m_bFound = true;
-
-      if (vrwArgContext.RemoveArg(rArg)) {
-        m_bValid = true;
-        m_argValue = rArg.StripSlashes();
-        return MIstatus::success;
-      } else
-        return MIstatus::failure;
-    }
-
-    // Next
-    ++it;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Parse the command's argument options string and try to extract all
-// the words
-//          between quotes then delimited by the next space.
-// Type:    Method.
-// Args:    vrwArgContext   - (RW) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValString::ValidateQuotedText(CMICmdArgContext &vrwArgContext) {
-  const CMIUtilString::VecString_t vecOptions(vrwArgContext.GetArgs());
-  if (vecOptions.size() == 0)
-    return MIstatus::failure;
-
-  const CMIUtilString &rArg(vecOptions[0]);
-  if (!IsStringArg(rArg))
-    return MIstatus::failure;
-
-  m_bFound = true;
-
-  if (vrwArgContext.RemoveArg(rArg)) {
-    m_bValid = true;
-    const char cQuote = '"';
-    m_argValue = rArg.Trim(cQuote).StripSlashes();
-    return MIstatus::success;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid string type
-// argument.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValString::IsStringArg(const CMIUtilString &vrTxt) const {
-  if (m_bHandleQuotedString)
-    return (IsStringArgQuotedText(vrTxt) ||
-            IsStringArgQuotedTextEmbedded(vrTxt) ||
-            IsStringArgQuotedQuotedTextEmbedded(vrTxt) ||
-            IsStringArgSingleText(
-                vrTxt)); // Still test for this as could just be one word still
-
-  return IsStringArgSingleText(vrTxt);
-}
-
-//++
-// Details: Examine the string and determine if it is a valid string type
-// argument or
-//          option value. If the string looks like a long option, short option,
-//          a thread
-//          group ID or just a number it is rejected as a string type value.
-//          There is an
-//          option to allow the string to accept a number as a string type.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid argument value, false = something else.
-// Throws:  None.
-//--
-bool CMICmdArgValString::IsStringArgSingleText(
-    const CMIUtilString &vrTxt) const {
-  if (!m_bHandleDirPaths) {
-    // Look for directory file paths, if found reject
-    const bool bHavePosSlash = (vrTxt.find('/') != std::string::npos);
-    const bool bHaveBckSlash = (vrTxt.find('\\') != std::string::npos);
-    if (bHavePosSlash || bHaveBckSlash)
-      return false;
-  }
-
-  // Look for --someLongOption, if found reject
-  if (0 == vrTxt.find("--"))
-    return false;
-
-  // Look for -f type short options, if found reject
-  if ((0 == vrTxt.find('-')) && (vrTxt.length() == 2))
-    return false;
-
-  // Look for thread group i1 i2 i3...., if found reject
-  if ((vrTxt.find('i') == 0) && ::isdigit(vrTxt[1]))
-    return false;
-
-  // Look for numbers, if found reject
-  if (!m_bAcceptNumbers && vrTxt.IsNumber())
-    return false;
-
-  return true;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid string type
-// argument.
-//          Take into account quotes surrounding the text. Note this function
-//          falls
-//          through to IsStringArgSingleText() should the criteria match fail.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValString::IsStringArgQuotedText(
-    const CMIUtilString &vrTxt) const {
-  // Accept anything as string word
-  if (m_bHandleAnything)
-    return true;
-
-  // CODETAG_QUOTEDTEXT_SIMILAR_CODE
-  const char cQuote = '"';
-  const size_t nPos = vrTxt.find(cQuote);
-  if (nPos == std::string::npos)
-    return false;
-
-  // Is one and only quote at end of the string
-  if (nPos == (vrTxt.length() - 1))
-    return false;
-
-  // Quote must be the first character in the string or be preceded by a space
-  // Also check for embedded string formating quote
-  const char cBckSlash = '\\';
-  const char cSpace = ' ';
-  if ((nPos > 1) && (vrTxt[nPos - 1] == cBckSlash) &&
-      (vrTxt[nPos - 2] != cSpace)) {
-    return false;
-  }
-  if ((nPos > 0) && (vrTxt[nPos - 1] != cSpace))
-    return false;
-
-  // Need to find the other quote
-  const size_t nPos2 = vrTxt.rfind(cQuote);
-  if (nPos2 == std::string::npos)
-    return false;
-
-  // Make sure not same quote, need two quotes
-  if (nPos == nPos2)
-    return MIstatus::failure;
-
-  return true;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid string type
-// argument.
-//          Take into account quotes surrounding the text. Take into account
-//          string format
-//          embedded quotes surrounding the text i.e. "\\\"%5d\\\"". Note this
-//          function falls
-//          through to IsStringArgQuotedText() should the criteria match fail.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValString::IsStringArgQuotedTextEmbedded(
-    const CMIUtilString &vrTxt) const {
-  // CODETAG_QUOTEDTEXT_SIMILAR_CODE
-  const char cBckSlash = '\\';
-  const size_t nPos = vrTxt.find(cBckSlash);
-  if (nPos == std::string::npos)
-    return false;
-
-  // Slash must be the first character in the string or be preceded by a space
-  const char cSpace = ' ';
-  if ((nPos > 0) && (vrTxt[nPos - 1] != cSpace))
-    return false;
-
-  // Need to find the other matching slash
-  const size_t nPos2 = vrTxt.rfind(cBckSlash);
-  if (nPos2 == std::string::npos)
-    return false;
-
-  // Make sure not same back slash, need two slashes
-  if (nPos == nPos2)
-    return MIstatus::failure;
-
-  return false;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid string type
-// argument.
-//          Take into account quotes surrounding the text. Take into account
-//          string format
-//          embedded quotes surrounding the text i.e. "\\\"%5d\\\"". Note this
-//          function falls
-//          through to IsStringArgQuotedTextEmbedded() should the criteria match
-//          fail.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValString::IsStringArgQuotedQuotedTextEmbedded(
-    const CMIUtilString &vrTxt) const {
-  const size_t nPos = vrTxt.find("\"\\\"");
-  if (nPos == std::string::npos)
-    return false;
-
-  const size_t nPos2 = vrTxt.rfind("\\\"\"");
-  if (nPos2 == std::string::npos)
-    return false;
-
-  const size_t nLen = vrTxt.length();
-  return !((nLen > 5) && ((nPos + 2) == (nPos2 - 2)));
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValString.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValString.h
deleted file mode 100644
index 77041c2..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValString.h
+++ /dev/null
@@ -1,82 +0,0 @@
-//===-- MICmdArgValString.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmdArgValBase.h"
-
-// Declarations:
-class CMICmdArgContext;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument class. Arguments object
-//          needing specialization derived from the CMICmdArgValBase class.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          argument and so extract a value from it .
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValString : public CMICmdArgValBaseTemplate<CMIUtilString> {
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValString();
-  /* ctor */ CMICmdArgValString(const bool vbAnything);
-  /* ctor */ CMICmdArgValString(const bool vbHandleQuotes,
-                                const bool vbAcceptNumbers,
-                                const bool vbHandleDirPaths);
-  /* ctor */ CMICmdArgValString(const CMIUtilString &vrArgName,
-                                const bool vbMandatory,
-                                const bool vbHandleByCmd,
-                                const bool vbHandleQuotes = false,
-                                const bool vbAcceptNumbers = false);
-  /* ctor */ CMICmdArgValString(const CMIUtilString &vrArgName,
-                                const bool vbMandatory,
-                                const bool vbHandleByCmd,
-                                const bool vbHandleQuotes,
-                                const bool vbAcceptNumbers,
-                                const bool vbHandleDirPaths);
-  //
-  bool IsStringArg(const CMIUtilString &vrTxt) const;
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValString() override;
-  // From CMICmdArgSet::IArg
-  bool Validate(CMICmdArgContext &vrwArgContext) override;
-
-  // Methods:
-private:
-  bool ValidateSingleText(CMICmdArgContext &vrwArgContext);
-  bool ValidateQuotedText(CMICmdArgContext &vrwArgContext);
-  bool ValidateQuotedTextEmbedded(CMICmdArgContext &vrwArgContext);
-  bool ValidateQuotedQuotedTextEmbedded(CMICmdArgContext &vrwArgContext);
-  bool IsStringArgSingleText(const CMIUtilString &vrTxt) const;
-  bool IsStringArgQuotedText(const CMIUtilString &vrTxt) const;
-  bool IsStringArgQuotedTextEmbedded(const CMIUtilString &vrTxt) const;
-  bool IsStringArgQuotedQuotedTextEmbedded(const CMIUtilString &vrTxt) const;
-
-  // Attribute:
-private:
-  bool m_bHandleQuotedString; // True = Parse a string surrounded by quotes
-                              // spaces are not delimiters, false = only text up
-                              // to next
-                              // delimiting space character
-  bool m_bAcceptNumbers;      // True = Parse a string and accept as a number if
-                         // number, false = numbers not recognised as string
-                         // types
-  bool m_bHandleDirPaths; // True = Parse a string and accept directory file
-                          // style string if present, false = directory file
-                          // path not
-                          // accepted
-  bool m_bHandleAnything; // True = Parse a string and accept anything if
-                          // present, false = validate for criteria matches
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValThreadGrp.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValThreadGrp.cpp
deleted file mode 100644
index 201d516..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValThreadGrp.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-//===-- MICmdArgValThreadGrp.cpp --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdArgValThreadGrp.h"
-#include "MICmdArgContext.h"
-
-//++
-// Details: CMICmdArgValThreadGrp constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValThreadGrp::CMICmdArgValThreadGrp() : m_nThreadGrp(0) {}
-
-//++
-// Details: CMICmdArgValThreadGrp constructor.
-// Type:    Method.
-// Args:    vrArgName       - (R) Argument's name to search by.
-//          vbMandatory     - (R) True = Yes must be present, false = optional
-//          argument.
-//          vbHandleByCmd   - (R) True = Command processes *this option, false =
-//          not handled.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValThreadGrp::CMICmdArgValThreadGrp(const CMIUtilString &vrArgName,
-                                             const bool vbMandatory,
-                                             const bool vbHandleByCmd)
-    : CMICmdArgValBaseTemplate(vrArgName, vbMandatory, vbHandleByCmd),
-      m_nThreadGrp(0) {}
-
-//++
-// Details: CMICmdArgValThreadGrp destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdArgValThreadGrp::~CMICmdArgValThreadGrp() {}
-
-//++
-// Details: Parse the command's argument options string and try to extract the
-// value *this
-//          argument is looking for.
-// Type:    Overridden.
-// Args:    vwArgContext    - (RW) The command's argument options string.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValThreadGrp::Validate(CMICmdArgContext &vwArgContext) {
-  if (vwArgContext.IsEmpty())
-    return m_bMandatory ? MIstatus::failure : MIstatus::success;
-
-  if (vwArgContext.GetNumberArgsPresent() == 1) {
-    const CMIUtilString &rArg(vwArgContext.GetArgsLeftToParse());
-    if (IsArgThreadGrp(rArg) && ExtractNumber(rArg)) {
-      m_bFound = true;
-      m_bValid = true;
-      m_argValue = GetNumber();
-      vwArgContext.RemoveArg(rArg);
-      return MIstatus::success;
-    } else
-      return MIstatus::failure;
-  }
-
-  // More than one option...
-  const CMIUtilString::VecString_t vecOptions(vwArgContext.GetArgs());
-  CMIUtilString::VecString_t::const_iterator it = vecOptions.begin();
-  while (it != vecOptions.end()) {
-    const CMIUtilString &rArg(*it);
-    if (IsArgThreadGrp(rArg) && ExtractNumber(rArg)) {
-      m_bFound = true;
-
-      if (vwArgContext.RemoveArg(rArg)) {
-        m_bValid = true;
-        m_argValue = GetNumber();
-        return MIstatus::success;
-      } else
-        return MIstatus::failure;
-    }
-
-    // Next
-    ++it;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Examine the string and determine if it is a valid string type
-// argument.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  bool    - True = yes valid arg, false = no.
-// Throws:  None.
-//--
-bool CMICmdArgValThreadGrp::IsArgThreadGrp(const CMIUtilString &vrTxt) const {
-  // Look for i1 i2 i3....
-  const MIint nPos = vrTxt.find('i');
-  if (nPos != 0)
-    return false;
-
-  const CMIUtilString strNum = vrTxt.substr(1);
-  return strNum.IsNumber();
-}
-
-//++
-// Details: Extract the thread group number from the thread group argument.
-// Type:    Method.
-// Args:    vrTxt   - (R) Some text.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdArgValThreadGrp::ExtractNumber(const CMIUtilString &vrTxt) {
-  const CMIUtilString strNum = vrTxt.substr(1);
-  MIint64 nNumber = 0;
-  bool bOk = strNum.ExtractNumber(nNumber);
-  if (bOk) {
-    m_nThreadGrp = static_cast<MIuint>(nNumber);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Retrieve the thread group ID found in the argument.
-// Type:    Method.
-// Args:    None.
-// Return:  MIuint - Thread group ID.
-// Throws:  None.
-//--
-MIuint CMICmdArgValThreadGrp::GetNumber() const { return m_nThreadGrp; }
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValThreadGrp.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValThreadGrp.h
deleted file mode 100644
index 12d3a1e..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdArgValThreadGrp.h
+++ /dev/null
@@ -1,53 +0,0 @@
-//===-- MICmdArgValThreadGrp.h ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmdArgValBase.h"
-
-// Declarations:
-class CMICmdArgContext;
-
-//++
-//============================================================================
-// Details: MI common code class. Command argument class. Arguments object
-//          needing specialization derived from the CMICmdArgValBase class.
-//          An argument knows what type of argument it is and how it is to
-//          interpret the options (context) string to find and validate a
-//          matching
-//          argument and so extract a value from it. Thread group looks like
-//          "i1" in the options text.
-//          Based on the Interpreter pattern.
-//--
-class CMICmdArgValThreadGrp : public CMICmdArgValBaseTemplate<MIuint> {
-  // Methods:
-public:
-  /* ctor */ CMICmdArgValThreadGrp();
-  /* ctor */ CMICmdArgValThreadGrp(const CMIUtilString &vrArgName,
-                                   const bool vbMandatory,
-                                   const bool vbHandleByCmd);
-  //
-  bool IsArgThreadGrp(const CMIUtilString &vrTxt) const;
-
-  // Overridden:
-public:
-  // From CMICmdArgValBase
-  /* dtor */ ~CMICmdArgValThreadGrp() override;
-  // From CMICmdArgSet::IArg
-  bool Validate(CMICmdArgContext &vArgContext) override;
-
-  // Methods:
-private:
-  bool ExtractNumber(const CMIUtilString &vrTxt);
-  MIuint GetNumber() const;
-
-  // Attributes:
-private:
-  MIuint m_nThreadGrp;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdBase.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdBase.cpp
deleted file mode 100644
index df36cfe..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdBase.cpp
+++ /dev/null
@@ -1,329 +0,0 @@
-//===-- MICmdBase.cpp -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmdArgValConsume.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnMIValueConst.h"
-
-//++
-// Details: CMICmdBase constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdBase::CMICmdBase()
-    : m_pSelfCreatorFn(nullptr),
-      m_rLLDBDebugSessionInfo(CMICmnLLDBDebugSessionInfo::Instance()),
-      m_bHasResultRecordExtra(false), m_constStrArgThreadGroup("thread-group"),
-      m_constStrArgThread("thread"), m_constStrArgFrame("frame"),
-      m_constStrArgConsume("--"), m_ThreadGrpArgMandatory(false),
-      m_ThreadArgMandatory(false), m_FrameArgMandatory(false) {}
-
-//++
-// Details: CMICmdBase destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdBase::~CMICmdBase() {}
-
-//++
-// Details: The invoker requires this function.
-// Type:    Overridden.
-// Args:    None.
-// Return:  SMICmdData & -  *this command's present status/data/information.
-// Throws:  None.
-//--
-const SMICmdData &CMICmdBase::GetCmdData() const { return m_cmdData; }
-
-//++
-// Details: The invoker requires this function.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString & -   *this command's current error description.
-//                              Empty string indicates command status ok.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmdBase::GetErrorDescription() const {
-  return m_strCurrentErrDescription;
-}
-
-//++
-// Details: The CMICmdFactory requires this function. Retrieve the command and
-// argument
-//          options description string.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString & -   Command description.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmdBase::GetMiCmd() const { return m_strMiCmd; }
-
-//++
-// Details: Help parse the arguments that are common to all commands.
-// Args:    None.
-// Return:  None
-// Throws:  None.
-//--
-void CMICmdBase::AddCommonArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValOptionLong(
-      m_constStrArgThreadGroup, m_ThreadGrpArgMandatory, true,
-      CMICmdArgValListBase::eArgValType_ThreadGrp, 1));
-  m_setCmdArgs.Add(new CMICmdArgValOptionLong(
-      m_constStrArgThread, m_ThreadArgMandatory, true,
-      CMICmdArgValListBase::eArgValType_Number, 1));
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionLong(m_constStrArgFrame, m_FrameArgMandatory, true,
-                                 CMICmdArgValListBase::eArgValType_Number, 1));
-  m_setCmdArgs.Add(new CMICmdArgValConsume(m_constStrArgConsume, false));
-}
-
-//++
-// Details: The invoker requires this function. A command must be given working
-// data and
-//          provide data about its status or provide information to other
-//          objects.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdBase::SetCmdData(const SMICmdData &vCmdData) {
-  m_cmdData = vCmdData;
-}
-
-//++
-// Details: The command factory requires this function. The factory calls this
-// function
-//          so it can obtain *this command's creation function.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMICmdFactory::CmdCreatorFnPtr - Function pointer.
-// Throws:  None.
-//--
-CMICmdFactory::CmdCreatorFnPtr CMICmdBase::GetCmdCreatorFn() const {
-  return m_pSelfCreatorFn;
-}
-
-//++
-// Details: If a command is an event type (has callbacks registered with
-// SBListener) it
-//          needs to inform the Invoker that it has finished its work so that
-//          the
-//          Invoker can tidy up and call the commands Acknowledge function (yes
-//          the
-//          command itself could call the Acknowledge itself but not doing that
-//          way).
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdBase::CmdFinishedTellInvoker() const {
-  CMICmdInvoker::Instance().CmdExecuteFinished(const_cast<CMICmdBase &>(*this));
-}
-
-//++
-// Details: Returns the final version of the MI result record built up in the
-// command's
-//          Acknowledge function. The one line text of MI result.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString & - MI text version of the MI result record.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmdBase::GetMIResultRecord() const {
-  return m_miResultRecord.GetString();
-}
-
-//++
-// Details: Retrieve from the command additional MI result to its 1 line
-// response.
-//          Because of using LLDB additional 'fake'/hack output is sometimes
-//          required to
-//          help the driver client operate i.e. Eclipse.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString & - MI text version of the MI result record.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmdBase::GetMIResultRecordExtra() const {
-  return m_miResultRecordExtra;
-}
-
-//++
-// Details: Hss *this command got additional MI result to its 1 line response.
-//          Because of using LLDB additional 'fake'/hack output is sometimes
-//          required to
-//          help the driver client operate i.e. Eclipse.
-// Type:    Overridden.
-// Args:    None.
-// Return:  bool    - True = Yes have additional MI output, false = no nothing
-// extra.
-// Throws:  None.
-//--
-bool CMICmdBase::HasMIResultRecordExtra() const {
-  return m_bHasResultRecordExtra;
-}
-
-//++
-// Details: Short cut function to enter error information into the command's
-// metadata
-//          object and set the command's error status.
-// Type:    Method.
-// Args:    rErrMsg - (R) Status description.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdBase::SetError(const CMIUtilString &rErrMsg) {
-  m_cmdData.bCmdValid = false;
-  m_cmdData.strErrorDescription = rErrMsg;
-  m_cmdData.bCmdExecutedSuccessfully = false;
-
-  const CMICmnMIValueResult valueResult("msg", CMICmnMIValueConst(rErrMsg));
-  const CMICmnMIResultRecord miResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      valueResult);
-  m_miResultRecord = miResultRecord;
-  m_cmdData.strMiCmdResultRecord = miResultRecord.GetString();
-}
-
-//++
-// Details: Short cut function to check MI command's execute status and
-//          set an error in case of failure.
-// Type:    Method.
-// Args:    error - (R) Error description object.
-//          successHandler - (R) function describing actions to execute
-//          in case of success state of passed SBError object.
-//          errorHandler - (R) function describing actions to execute
-//          in case of fail status of passed SBError object.
-// Return:  bool.
-// Throws:  None.
-//--
-bool CMICmdBase::HandleSBError(const lldb::SBError &error,
-                               const std::function<bool()> &successHandler,
-                               const std::function<void()> &errorHandler) {
-  if (error.Success())
-    return successHandler();
-
-  SetError(error.GetCString());
-  errorHandler();
-  return MIstatus::failure;
-}
-
-//++
-// Details: Short cut function to check MI command's execute status and
-//          call specified handler function for success case.
-// Type:    Method.
-// Args:    error - (R) Error description object.
-//          successHandler - (R) function describing actions to execute
-//          in case of success state of passed SBError object.
-// Return:  bool.
-// Throws:  None.
-//--
-bool CMICmdBase::HandleSBErrorWithSuccess(
-    const lldb::SBError &error,
-    const std::function<bool()> &successHandler) {
-  return HandleSBError(error, successHandler);
-}
-
-//++
-// Details: Short cut function to check MI command's execute status and
-//          call specified handler function for error case.
-// Type:    Method.
-// Args:    error - (R) Error description object.
-//          errorHandler - (R) function describing actions to execute
-//          in case of fail status of passed SBError object.
-// Return:  bool.
-// Throws:  None.
-//--
-bool CMICmdBase::HandleSBErrorWithFailure(
-    const lldb::SBError &error,
-    const std::function<void()> &errorHandler) {
-  return HandleSBError(error, [] { return MIstatus::success; }, errorHandler);
-}
-
-//++
-// Details: Ask a command to provide its unique identifier.
-// Type:    Method.
-// Args:    A unique identifier for this command class.
-// Return:  None.
-// Throws:  None.
-//--
-MIuint CMICmdBase::GetGUID() {
-  MIuint64 vptr = reinterpret_cast<MIuint64>(this);
-  MIuint id = (vptr)&0xFFFFFFFF;
-  id ^= (vptr >> 32) & 0xFFFFFFFF;
-
-  return id;
-}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdBase::ParseArgs() {
-  // Do nothing - override to implement
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Having previously given CMICmdArgSet m_setCmdArgs all the argument
-// or option
-//          definitions for the command to handle proceed to parse and validate
-//          the
-//          command's options text for those arguments and extract the values
-//          for each if
-//          any.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdBase::ParseValidateCmdOptions() {
-  CMICmdArgContext argCntxt(m_cmdData.strMiCmdOption);
-  if (m_setCmdArgs.Validate(m_cmdData.strMiCmd, argCntxt))
-    return MIstatus::success;
-
-  SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_ARGS),
-                                 m_cmdData.strMiCmd.c_str(),
-                                 m_setCmdArgs.GetErrorDescription().c_str()));
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: If the MI Driver is not operating via a client i.e. Eclipse but say
-// operating
-//          on a executable passed in as a argument to the drive then what
-//          should the driver
-//          do on a command failing? Either continue operating or exit the
-//          application.
-//          Override this function where a command failure cannot allow the
-//          driver to
-//          continue operating.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  bool - True = Fatal if command fails, false = can continue if
-// command fails.
-// Throws:  None.
-//--
-bool CMICmdBase::GetExitAppOnCommandFailure() const { return false; }
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdBase.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdBase.h
deleted file mode 100644
index 4e32ed6..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdBase.h
+++ /dev/null
@@ -1,193 +0,0 @@
-//===-- MICmdBase.h ---------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-#include <functional>
-
-#include "lldb/API/SBError.h"
-
-#include "MICmdArgSet.h"
-#include "MICmdData.h"
-#include "MICmdFactory.h"
-#include "MICmdInvoker.h"
-#include "MICmnBase.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnResources.h"
-#include "MIUtilString.h"
-
-// Declarations:
-class CMICmnLLDBDebugSessionInfo;
-
-//++
-//============================================================================
-// Details: MI command base class. MI commands derive from this base class.
-//          The Command Factory creates command objects and passes them to the
-//          Command Invoker. The Invoker takes ownership of any commands created
-//          which means it is the only object to delete them when a command is
-//          finished working. Commands do not delete themselves.
-//          There are two types of command implicitly defined by the state of
-//          the m_bWaitForEventFromSBDebugger flag. There is the event type
-//          command which registers (command fn) callbacks with the SBListener
-//          does some work then wakes up again when called back, does more work
-//          perhaps, ends, then the Invoker calls the command's Acknowledge
-//          function. The other type of command is one that just does some work,
-//          ends, then the Invoker calls the command's Acknowledge function. No
-//          events set up.
-//          A command's Execute(), Acknowledge() and event callback functions
-//          are
-//          carried out in the main thread.
-//          A command may use the argument derived object classes
-//          (CMICmdArgValBase)
-//          to factor handling and parsing of different types of arguments
-//          presented to a command. A command will produce an error should it
-//          be presented with arguments or options it does not understand.
-//--
-class CMICmdBase : public CMICmnBase,
-                   public CMICmdInvoker::ICmd,
-                   public CMICmdFactory::ICmd {
-  // Methods:
-public:
-  CMICmdBase();
-
-  // Overridden:
-  // From CMICmdInvoker::ICmd
-  const SMICmdData &GetCmdData() const override;
-  const CMIUtilString &GetErrorDescription() const override;
-  void SetCmdData(const SMICmdData &vCmdData) override;
-  void CmdFinishedTellInvoker() const override;
-  const CMIUtilString &GetMIResultRecord() const override;
-  const CMIUtilString &GetMIResultRecordExtra() const override;
-  bool HasMIResultRecordExtra() const override;
-  bool ParseArgs() override;
-  // From CMICmdFactory::ICmd
-  const CMIUtilString &GetMiCmd() const override;
-  CMICmdFactory::CmdCreatorFnPtr GetCmdCreatorFn() const override;
-
-  virtual MIuint GetGUID();
-  void AddCommonArgs();
-
-  // Overrideable:
-  ~CMICmdBase() override;
-  virtual bool GetExitAppOnCommandFailure() const;
-
-  // Methods:
-protected:
-  void SetError(const CMIUtilString &rErrMsg);
-  bool HandleSBError(const lldb::SBError &error,
-                     const std::function<bool()> &successHandler =
-                     [] { return MIstatus::success; },
-                     const std::function<void()> &errorHandler = [] {});
-  bool HandleSBErrorWithSuccess(const lldb::SBError &error,
-                                const std::function<bool()> &successHandler);
-  bool HandleSBErrorWithFailure(const lldb::SBError &error,
-                                const std::function<void()> &errorHandler);
-  template <class T> T *GetOption(const CMIUtilString &vStrOptionName);
-  bool ParseValidateCmdOptions();
-
-  // Attributes:
-  CMICmdFactory::CmdCreatorFnPtr m_pSelfCreatorFn;
-  CMIUtilString m_strCurrentErrDescription; // Reason for Execute or Acknowledge
-                                            // function failure
-  SMICmdData m_cmdData; // Holds information/status of *this command. Used by
-                        // other MI code to report or determine state of a
-                        // command.
-  bool m_bWaitForEventFromSBDebugger; // True = yes event type command wait,
-                                      // false = command calls Acknowledge()
-                                      // straight after Execute()
-                                      // no waiting
-  CMIUtilString
-      m_strMiCmd; // The MI text identifying *this command i.e. 'break-insert'
-  CMICmnMIResultRecord m_miResultRecord; // This is completed in the
-                                         // Acknowledge() function and returned
-                                         // to the Command Invoker to proceed
-  // stdout output. Each command forms 1 response to its input.
-  CMIUtilString m_miResultRecordExtra; // This is completed in the Acknowledge()
-                                       // function and returned to the Command
-                                       // Invoker to proceed
-  // stdout output. Hack command produce more response text to help the client
-  // because of using LLDB
-  CMICmnLLDBDebugSessionInfo &m_rLLDBDebugSessionInfo; // Access to command
-                                                       // sharing information or
-                                                       // data across any and
-                                                       // all command based
-                                                       // derived classes.
-  bool m_bHasResultRecordExtra; // True = Yes command produced additional MI
-                                // output to its 1 line response, false = no
-                                // extra MI output
-                                // formed.
-  CMICmdArgSet m_setCmdArgs;    // The list of arguments *this command needs to
-                             // parse from the options string to carry out work.
-  const CMIUtilString m_constStrArgThreadGroup;
-  const CMIUtilString m_constStrArgThread;
-  const CMIUtilString m_constStrArgFrame;
-  const CMIUtilString m_constStrArgConsume;
-
-  // These 3 members can be used by the derived classes to make any of
-  // "thread", "frame" or "thread-group" mandatory.
-  bool m_ThreadGrpArgMandatory;
-  bool m_ThreadArgMandatory;
-  bool m_FrameArgMandatory;
-};
-
-//++
-// Details: Retrieve the command argument or option object pointer so that it
-// can be
-//          examined. If the option found and valid get the value (number,
-//          string or list
-//          - see CMICmdArgValBase class) from it to use with the command's
-//          decision
-//          making. If the argument is not found the command's error description
-//          is set
-//          describing the error condition.
-// Type:    Template method.
-// Args:    vStrOptionName  - (R)   The text name of the argument or option to
-// search for in
-//                                  the list of the command's possible arguments
-//                                  or options.
-// Return:  T * - CMICmdArgValBase derived object.
-//              - nullptr = function has failed, unable to retrieve the
-//              option/arg object.
-// Throws:  None.
-//--
-template <class T>
-T *CMICmdBase::GetOption(const CMIUtilString &vStrOptionName) {
-  CMICmdArgValBase *pPtrBase = nullptr;
-  if (!m_setCmdArgs.GetArg(vStrOptionName, pPtrBase)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   vStrOptionName.c_str()));
-    return nullptr;
-  }
-
-  return static_cast<T *>(pPtrBase);
-}
-
-//++
-// Details: Retrieve the command argument or option object pointer using
-// template function
-//          CMICmdBase::GetOption(). Should the argument (by name) not be found
-//          the
-//          command will exit with a failure (set in GetOption()).
-// Type:    Preprocessor macro.
-// Args:    a   - (R) The actual variable's name.
-//          b   - (R) The type of variable (appended to CMICmdArgVal i.e.
-//          CMICmdArgValString).
-//          c   - (R) The text name of the argument or option to search for in
-//          the list of
-//                    the command's possible arguments or options.
-// Return:  T * - CMICmdArgValBase derived object.
-//              - nullptr = function has failed, unable to retrieve the
-//              option/arg object.
-// Throws:  None.
-//--
-#define CMICMDBASE_GETOPTION(a, b, c)                                          \
-  CMICmdArgVal##b *a = CMICmdBase::GetOption<CMICmdArgVal##b>(c);              \
-  if (a == nullptr)                                                            \
-    return MIstatus::failure;
-// This comment is to stop compile warning for #define
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmd.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmd.cpp
deleted file mode 100644
index 081cff6..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmd.cpp
+++ /dev/null
@@ -1,158 +0,0 @@
-//===-- MICmdCmd.cpp --------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdEnablePrettyPrinting   implementation.
-//              CMICmdCmdSource                 implementation.
-//
-
-// In-house headers:
-#include "MICmdCmd.h"
-
-//++
-// Details: CMICmdCmdEnablePrettyPrinting constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdEnablePrettyPrinting::CMICmdCmdEnablePrettyPrinting() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "enable-pretty-printing";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdEnablePrettyPrinting::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdEnablePrettyPrinting destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdEnablePrettyPrinting::~CMICmdCmdEnablePrettyPrinting() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdEnablePrettyPrinting::Execute() {
-  // Do nothing
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdEnablePrettyPrinting::Acknowledge() {
-  const CMICmnMIValueConst miValueConst("0");
-  const CMICmnMIValueResult miValueResult("supported", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdEnablePrettyPrinting::CreateSelf() {
-  return new CMICmdCmdEnablePrettyPrinting();
-}
-
-
-//++
-// Details: CMICmdCmdSource constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdSource::CMICmdCmdSource() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "source";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdSource::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdSource destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdSource::~CMICmdCmdSource() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSource::Execute() {
-  // Do nothing
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSource::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdSource::CreateSelf() { return new CMICmdCmdSource(); }
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmd.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmd.h
deleted file mode 100644
index aeaaa4b..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmd.h
+++ /dev/null
@@ -1,90 +0,0 @@
-//===-- MICmdCmd.h ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdEnablePrettyPrinting   interface.
-//              CMICmdCmdSource                 interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-/*
-MI commands implemented are:
-        See MICmdCommands.cpp
-*/
-
-#pragma once
-
-// Third party headers:
-#include "lldb/API/SBBreakpoint.h"
-#include "lldb/API/SBCommandReturnObject.h"
-#include <vector>
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "enable-pretty-printing".
-//          Enables Python base pretty printing.
-// Ref:
-// http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Variable-Objects.html
-//--
-class CMICmdCmdEnablePrettyPrinting : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdEnablePrettyPrinting();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdEnablePrettyPrinting() override;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "source".
-//--
-class CMICmdCmdSource : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdSource();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdSource() override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdBreak.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdBreak.cpp
deleted file mode 100644
index 1cd0bac..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdBreak.cpp
+++ /dev/null
@@ -1,1024 +0,0 @@
-//===-- MICmdCmdBreak.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdBreakInsert            implementation.
-//              CMICmdCmdBreakDelete            implementation.
-//              CMICmdCmdBreakDisable           implementation.
-//              CMICmdCmdBreakEnable            implementation.
-//              CMICmdCmdBreakAfter             implementation.
-//              CMICmdCmdBreakCondition         implementation.
-
-// Third Party Headers:
-#include "lldb/API/SBBreakpointLocation.h"
-
-// In-house headers:
-#include "MICmdArgValFile.h"
-#include "MICmdArgValListOfN.h"
-#include "MICmdArgValNumber.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValString.h"
-#include "MICmdArgValThreadGrp.h"
-#include "MICmdCmdBreak.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnMIOutOfBandRecord.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnStreamStdout.h"
-
-//++
-// Details: CMICmdCmdBreakInsert constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakInsert::CMICmdCmdBreakInsert()
-    : m_bBrkPtIsTemp(false), m_bBrkPtIsPending(false), m_nBrkPtIgnoreCount(0),
-      m_bBrkPtEnabled(false), m_bBrkPtCondition(false), m_bBrkPtThreadId(false),
-      m_nBrkPtThreadId(0), m_constStrArgNamedTempBrkPt("t"),
-      m_constStrArgNamedHWBrkPt("h"), m_constStrArgNamedPendinfBrkPt("f"),
-      m_constStrArgNamedDisableBrkPt("d"), m_constStrArgNamedTracePt("a"),
-      m_constStrArgNamedConditionalBrkPt("c"), m_constStrArgNamedInoreCnt("i"),
-      m_constStrArgNamedRestrictBrkPtToThreadId("p"),
-      m_constStrArgNamedLocation("location") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "break-insert";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdBreakInsert::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdBreakInsert destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakInsert::~CMICmdCmdBreakInsert() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakInsert::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionShort(m_constStrArgNamedTempBrkPt, false, true));
-  // Not implemented m_setCmdArgs.Add(new CMICmdArgValOptionShort(
-  // m_constStrArgNamedHWBrkPt, false, false));
-  m_setCmdArgs.Add(new CMICmdArgValOptionShort(
-      m_constStrArgNamedPendinfBrkPt, false, true,
-      CMICmdArgValListBase::eArgValType_StringQuotedNumberPath, 1));
-  m_setCmdArgs.Add(new CMICmdArgValOptionShort(m_constStrArgNamedDisableBrkPt,
-                                               false, false));
-  // Not implemented m_setCmdArgs.Add(new CMICmdArgValOptionShort(
-  // m_constStrArgNamedTracePt, false, false));
-  m_setCmdArgs.Add(new CMICmdArgValOptionShort(
-      m_constStrArgNamedConditionalBrkPt, false, true,
-      CMICmdArgValListBase::eArgValType_StringQuoted, 1));
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionShort(m_constStrArgNamedInoreCnt, false, true,
-                                  CMICmdArgValListBase::eArgValType_Number, 1));
-  m_setCmdArgs.Add(new CMICmdArgValOptionShort(
-      m_constStrArgNamedRestrictBrkPtToThreadId, false, true,
-      CMICmdArgValListBase::eArgValType_Number, 1));
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedLocation, false,
-                                          true, false, false, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Helper function for CMICmdCmdBreakInsert::Execute().
-//
-// Given a string, return the position of the ':' separator in 'file:func'
-// or 'file:line', if any.  If not found, return npos.  For example, return
-// 5 for 'foo.c:std::string'.
-//--
-static size_t findFileSeparatorPos(const std::string &x) {
-  // Full paths in windows can have ':' after a drive letter, so we
-  // search backwards, taking care to skip C++ namespace tokens '::'.
-  size_t n = x.rfind(':');
-  while (n != std::string::npos && n > 1 && x[n - 1] == ':') {
-    n = x.rfind(':', n - 2);
-  }
-  return n;
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakInsert::Execute() {
-  CMICMDBASE_GETOPTION(pArgTempBrkPt, OptionShort, m_constStrArgNamedTempBrkPt);
-  CMICMDBASE_GETOPTION(pArgThreadGroup, OptionLong, m_constStrArgThreadGroup);
-  CMICMDBASE_GETOPTION(pArgLocation, String, m_constStrArgNamedLocation);
-  CMICMDBASE_GETOPTION(pArgIgnoreCnt, OptionShort, m_constStrArgNamedInoreCnt);
-  CMICMDBASE_GETOPTION(pArgPendingBrkPt, OptionShort,
-                       m_constStrArgNamedPendinfBrkPt);
-  CMICMDBASE_GETOPTION(pArgDisableBrkPt, OptionShort,
-                       m_constStrArgNamedDisableBrkPt);
-  CMICMDBASE_GETOPTION(pArgConditionalBrkPt, OptionShort,
-                       m_constStrArgNamedConditionalBrkPt);
-  CMICMDBASE_GETOPTION(pArgRestrictBrkPtToThreadId, OptionShort,
-                       m_constStrArgNamedRestrictBrkPtToThreadId);
-
-  // Ask LLDB for the target to check if we have valid or dummy one.
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
-
-  m_bBrkPtEnabled = !pArgDisableBrkPt->GetFound();
-  m_bBrkPtIsTemp = pArgTempBrkPt->GetFound();
-  m_bHaveArgOptionThreadGrp = pArgThreadGroup->GetFound();
-  if (m_bHaveArgOptionThreadGrp) {
-    MIuint nThreadGrp = 0;
-    pArgThreadGroup->GetExpectedOption<CMICmdArgValThreadGrp, MIuint>(
-        nThreadGrp);
-    m_strArgOptionThreadGrp = CMIUtilString::Format("i%d", nThreadGrp);
-  }
-
-  if (sbTarget == rSessionInfo.GetDebugger().GetDummyTarget())
-    m_bBrkPtIsPending = true;
-  else {
-    m_bBrkPtIsPending = pArgPendingBrkPt->GetFound();
-    if (!m_bBrkPtIsPending) {
-      CMIUtilString pending;
-      if (m_rLLDBDebugSessionInfo.SharedDataRetrieve("breakpoint.pending", pending)) {
-        m_bBrkPtIsPending = pending == "on";
-      }
-    }
-  }
-
-  if (pArgLocation->GetFound())
-    m_brkName = pArgLocation->GetValue();
-  else if (m_bBrkPtIsPending) {
-    pArgPendingBrkPt->GetExpectedOption<CMICmdArgValString, CMIUtilString>(
-        m_brkName);
-  }
-  if (pArgIgnoreCnt->GetFound()) {
-    pArgIgnoreCnt->GetExpectedOption<CMICmdArgValNumber, MIuint>(
-        m_nBrkPtIgnoreCount);
-  }
-  m_bBrkPtCondition = pArgConditionalBrkPt->GetFound();
-  if (m_bBrkPtCondition) {
-    pArgConditionalBrkPt->GetExpectedOption<CMICmdArgValString, CMIUtilString>(
-        m_brkPtCondition);
-  }
-  m_bBrkPtThreadId = pArgRestrictBrkPtToThreadId->GetFound();
-  if (m_bBrkPtCondition) {
-    pArgRestrictBrkPtToThreadId->GetExpectedOption<CMICmdArgValNumber, MIuint>(
-        m_nBrkPtThreadId);
-  }
-
-  // Determine if break on a file line or at a function
-  BreakPoint_e eBrkPtType = eBreakPoint_NotDefineYet;
-  CMIUtilString fileName;
-  MIuint nFileLine = 0;
-  CMIUtilString strFileFn;
-  CMIUtilString rStrLineOrFn;
-  // Is the string in the form 'file:func' or 'file:line'?
-  // If so, find the position of the ':' separator.
-  const size_t nPosColon = findFileSeparatorPos(m_brkName);
-  if (nPosColon != std::string::npos) {
-    // Extract file name and line number from it
-    fileName = m_brkName.substr(0, nPosColon);
-    rStrLineOrFn =
-        m_brkName.substr(nPosColon + 1, m_brkName.size() - nPosColon - 1);
-
-    if (rStrLineOrFn.empty())
-      eBrkPtType = eBreakPoint_ByName;
-    else {
-      MIint64 nValue = 0;
-      if (rStrLineOrFn.ExtractNumber(nValue)) {
-        nFileLine = static_cast<MIuint>(nValue);
-        eBrkPtType = eBreakPoint_ByFileLine;
-      } else {
-        strFileFn = rStrLineOrFn;
-        eBrkPtType = eBreakPoint_ByFileFn;
-      }
-    }
-  }
-
-  // Determine if break defined as an address
-  lldb::addr_t nAddress = 0;
-  if (eBrkPtType == eBreakPoint_NotDefineYet) {
-    MIint64 nValue = 0;
-    if (m_brkName.ExtractNumber(nValue)) {
-      nAddress = static_cast<lldb::addr_t>(nValue);
-      eBrkPtType = eBreakPoint_ByAddress;
-    }
-  }
-
-  // Break defined as an function
-  if (eBrkPtType == eBreakPoint_NotDefineYet) {
-    eBrkPtType = eBreakPoint_ByName;
-  }
-
-  // Ask LLDB to create a breakpoint
-  bool bOk = MIstatus::success;
-  switch (eBrkPtType) {
-  case eBreakPoint_ByAddress:
-    m_brkPt = sbTarget.BreakpointCreateByAddress(nAddress);
-    break;
-  case eBreakPoint_ByFileFn: {
-    lldb::SBFileSpecList module; // search in all modules
-    lldb::SBFileSpecList compUnit;
-    compUnit.Append(lldb::SBFileSpec(fileName.c_str()));
-    m_brkPt =
-        sbTarget.BreakpointCreateByName(strFileFn.c_str(), module, compUnit);
-    break;
-  }
-  case eBreakPoint_ByFileLine:
-    m_brkPt = sbTarget.BreakpointCreateByLocation(fileName.c_str(), nFileLine);
-    break;
-  case eBreakPoint_ByName:
-    m_brkPt = sbTarget.BreakpointCreateByName(m_brkName.c_str(), nullptr);
-    break;
-  case eBreakPoint_count:
-  case eBreakPoint_NotDefineYet:
-  case eBreakPoint_Invalid:
-    bOk = MIstatus::failure;
-    break;
-  }
-
-  if (bOk) {
-    if (!m_bBrkPtIsPending && (m_brkPt.GetNumLocations() == 0)) {
-      sbTarget.BreakpointDelete(m_brkPt.GetID());
-      SetError(
-          CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_LOCATION_NOT_FOUND),
-                                m_cmdData.strMiCmd.c_str(), m_brkName.c_str()));
-      return MIstatus::failure;
-    }
-
-    m_brkPt.SetEnabled(m_bBrkPtEnabled);
-    m_brkPt.SetIgnoreCount(m_nBrkPtIgnoreCount);
-    if (m_bBrkPtCondition)
-      m_brkPt.SetCondition(m_brkPtCondition.c_str());
-    if (m_bBrkPtThreadId)
-      m_brkPt.SetThreadID(m_nBrkPtThreadId);
-  }
-
-  // CODETAG_LLDB_BREAKPOINT_CREATION
-  // This is in the main thread
-  // Record break point information to be by LLDB event handler function
-  CMICmnLLDBDebugSessionInfo::SBrkPtInfo sBrkPtInfo;
-  if (!rSessionInfo.GetBrkPtInfo(m_brkPt, sBrkPtInfo))
-    return MIstatus::failure;
-  sBrkPtInfo.m_id = m_brkPt.GetID();
-  sBrkPtInfo.m_bDisp = m_bBrkPtIsTemp;
-  sBrkPtInfo.m_bEnabled = m_bBrkPtEnabled;
-  sBrkPtInfo.m_bHaveArgOptionThreadGrp = m_bHaveArgOptionThreadGrp;
-  sBrkPtInfo.m_strOptThrdGrp = m_strArgOptionThreadGrp;
-  sBrkPtInfo.m_nTimes = m_brkPt.GetHitCount();
-  sBrkPtInfo.m_strOrigLoc = m_brkName;
-  sBrkPtInfo.m_nIgnore = m_nBrkPtIgnoreCount;
-  sBrkPtInfo.m_bPending = m_bBrkPtIsPending;
-  sBrkPtInfo.m_bCondition = m_bBrkPtCondition;
-  sBrkPtInfo.m_strCondition = m_brkPtCondition;
-  sBrkPtInfo.m_bBrkPtThreadId = m_bBrkPtThreadId;
-  sBrkPtInfo.m_nBrkPtThreadId = m_nBrkPtThreadId;
-
-  bOk = bOk && rSessionInfo.RecordBrkPtInfo(m_brkPt.GetID(), sBrkPtInfo);
-  if (!bOk) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_brkName.c_str()));
-    return MIstatus::failure;
-  }
-
-  // CODETAG_LLDB_BRKPT_ID_MAX
-  if (m_brkPt.GetID() > (lldb::break_id_t)rSessionInfo.m_nBrkPointCntMax) {
-    SetError(CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_BRKPT_CNT_EXCEEDED), m_cmdData.strMiCmd.c_str(),
-        rSessionInfo.m_nBrkPointCntMax, m_brkName.c_str()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakInsert::Acknowledge() {
-  // Get breakpoint information
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  CMICmnLLDBDebugSessionInfo::SBrkPtInfo sBrkPtInfo;
-  if (!rSessionInfo.RecordBrkPtInfoGet(m_brkPt.GetID(), sBrkPtInfo))
-    return MIstatus::failure;
-
-  // MI print
-  // "^done,bkpt={number=\"%d\",type=\"breakpoint\",disp=\"%s\",enabled=\"%c\",addr=\"0x%016"
-  // PRIx64
-  // "\",func=\"%s\",file=\"%s\",fullname=\"%s/%s\",line=\"%d\",thread-groups=[\"%s\"],times=\"%d\",original-location=\"%s\"}"
-  CMICmnMIValueTuple miValueTuple;
-  if (!rSessionInfo.MIResponseFormBrkPtInfo(sBrkPtInfo, miValueTuple))
-    return MIstatus::failure;
-
-  const CMICmnMIValueResult miValueResultD("bkpt", miValueTuple);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResultD);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdBreakInsert::CreateSelf() {
-  return new CMICmdCmdBreakInsert();
-}
-
-
-//++
-// Details: CMICmdCmdBreakDelete constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakDelete::CMICmdCmdBreakDelete()
-    : m_constStrArgNamedBrkPt("breakpoint") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "break-delete";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdBreakDelete::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdBreakDelete destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakDelete::~CMICmdCmdBreakDelete() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakDelete::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true,
-                              CMICmdArgValListBase::eArgValType_Number));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakDelete::Execute() {
-  CMICMDBASE_GETOPTION(pArgBrkPt, ListOfN, m_constStrArgNamedBrkPt);
-
-  // ATM we only handle one break point ID
-  MIuint64 nBrk = UINT64_MAX;
-  if (!pArgBrkPt->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nBrk)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgNamedBrkPt.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  const bool bBrkPt = rSessionInfo.GetTarget().BreakpointDelete(
-      static_cast<lldb::break_id_t>(nBrk));
-  if (!bBrkPt) {
-    const CMIUtilString strBrkNum(CMIUtilString::Format("%d", nBrk));
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   strBrkNum.c_str()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakDelete::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdBreakDelete::CreateSelf() {
-  return new CMICmdCmdBreakDelete();
-}
-
-
-//++
-// Details: CMICmdCmdBreakDisable constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakDisable::CMICmdCmdBreakDisable()
-    : m_constStrArgNamedBrkPt("breakpoint"), m_bBrkPtDisabledOk(false),
-      m_nBrkPtId(0) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "break-disable";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdBreakDisable::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdBreakDisable destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakDisable::~CMICmdCmdBreakDisable() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakDisable::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true,
-                              CMICmdArgValListBase::eArgValType_Number));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakDisable::Execute() {
-  CMICMDBASE_GETOPTION(pArgBrkPt, ListOfN, m_constStrArgNamedBrkPt);
-
-  // ATM we only handle one break point ID
-  MIuint64 nBrk = UINT64_MAX;
-  if (!pArgBrkPt->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nBrk)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgNamedBrkPt.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBBreakpoint brkPt = rSessionInfo.GetTarget().FindBreakpointByID(
-      static_cast<lldb::break_id_t>(nBrk));
-  if (brkPt.IsValid()) {
-    m_bBrkPtDisabledOk = true;
-    brkPt.SetEnabled(false);
-    m_nBrkPtId = nBrk;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakDisable::Acknowledge() {
-  if (m_bBrkPtDisabledOk) {
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  const CMIUtilString strBrkPtId(CMIUtilString::Format("%d", m_nBrkPtId));
-  const CMICmnMIValueConst miValueConst(CMIUtilString::Format(
-      MIRSRC(IDS_CMD_ERR_BRKPT_INVALID), strBrkPtId.c_str()));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdBreakDisable::CreateSelf() {
-  return new CMICmdCmdBreakDisable();
-}
-
-
-//++
-// Details: CMICmdCmdBreakEnable constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakEnable::CMICmdCmdBreakEnable()
-    : m_constStrArgNamedBrkPt("breakpoint"), m_bBrkPtEnabledOk(false),
-      m_nBrkPtId(0) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "break-enable";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdBreakEnable::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdBreakEnable destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakEnable::~CMICmdCmdBreakEnable() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakEnable::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValListOfN(m_constStrArgNamedBrkPt, true, true,
-                              CMICmdArgValListBase::eArgValType_Number));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakEnable::Execute() {
-  CMICMDBASE_GETOPTION(pArgBrkPt, ListOfN, m_constStrArgNamedBrkPt);
-
-  // ATM we only handle one break point ID
-  MIuint64 nBrk = UINT64_MAX;
-  if (!pArgBrkPt->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nBrk)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgNamedBrkPt.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBBreakpoint brkPt = rSessionInfo.GetTarget().FindBreakpointByID(
-      static_cast<lldb::break_id_t>(nBrk));
-  if (brkPt.IsValid()) {
-    m_bBrkPtEnabledOk = true;
-    brkPt.SetEnabled(true);
-    m_nBrkPtId = nBrk;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakEnable::Acknowledge() {
-  if (m_bBrkPtEnabledOk) {
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  const CMIUtilString strBrkPtId(CMIUtilString::Format("%d", m_nBrkPtId));
-  const CMICmnMIValueConst miValueConst(CMIUtilString::Format(
-      MIRSRC(IDS_CMD_ERR_BRKPT_INVALID), strBrkPtId.c_str()));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdBreakEnable::CreateSelf() {
-  return new CMICmdCmdBreakEnable();
-}
-
-
-//++
-// Details: CMICmdCmdBreakAfter constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakAfter::CMICmdCmdBreakAfter()
-    : m_constStrArgNamedNumber("number"), m_constStrArgNamedCount("count"),
-      m_nBrkPtId(0), m_nBrkPtCount(0) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "break-after";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdBreakAfter::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdBreakAfter destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakAfter::~CMICmdCmdBreakAfter() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakAfter::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNamedCount, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakAfter::Execute() {
-  CMICMDBASE_GETOPTION(pArgNumber, Number, m_constStrArgNamedNumber);
-  CMICMDBASE_GETOPTION(pArgCount, Number, m_constStrArgNamedCount);
-
-  m_nBrkPtId = pArgNumber->GetValue();
-  m_nBrkPtCount = pArgCount->GetValue();
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBBreakpoint brkPt = rSessionInfo.GetTarget().FindBreakpointByID(
-      static_cast<lldb::break_id_t>(m_nBrkPtId));
-  if (brkPt.IsValid()) {
-    brkPt.SetIgnoreCount(m_nBrkPtCount);
-
-    CMICmnLLDBDebugSessionInfo::SBrkPtInfo sBrkPtInfo;
-    if (!rSessionInfo.RecordBrkPtInfoGet(m_nBrkPtId, sBrkPtInfo)) {
-      SetError(
-          CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_INFO_OBJ_NOT_FOUND),
-                                m_cmdData.strMiCmd.c_str(), m_nBrkPtId));
-      return MIstatus::failure;
-    }
-    sBrkPtInfo.m_nIgnore = m_nBrkPtCount;
-    rSessionInfo.RecordBrkPtInfo(m_nBrkPtId, sBrkPtInfo);
-  } else {
-    const CMIUtilString strBrkPtId(CMIUtilString::Format("%d", m_nBrkPtId));
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   strBrkPtId.c_str()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakAfter::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdBreakAfter::CreateSelf() {
-  return new CMICmdCmdBreakAfter();
-}
-
-
-//++
-// Details: CMICmdCmdBreakCondition constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakCondition::CMICmdCmdBreakCondition()
-    : m_constStrArgNamedNumber("number"), m_constStrArgNamedExpr("expr"),
-      m_constStrArgNamedExprNoQuotes(
-          "expression not surround by quotes") // Not specified in MI spec, we
-                                               // need to handle expressions not
-                                               // surrounded by quotes
-      ,
-      m_nBrkPtId(0) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "break-condition";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdBreakCondition::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdBreakCondition destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdBreakCondition::~CMICmdCmdBreakCondition() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakCondition::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValNumber(m_constStrArgNamedNumber, true, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgNamedExpr, true, true, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValListOfN(
-      m_constStrArgNamedExprNoQuotes, false, false,
-      CMICmdArgValListBase::eArgValType_StringQuotedNumber));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakCondition::Execute() {
-  CMICMDBASE_GETOPTION(pArgNumber, Number, m_constStrArgNamedNumber);
-  CMICMDBASE_GETOPTION(pArgExpr, String, m_constStrArgNamedExpr);
-
-  m_nBrkPtId = pArgNumber->GetValue();
-  m_strBrkPtExpr = pArgExpr->GetValue();
-  m_strBrkPtExpr += GetRestOfExpressionNotSurroundedInQuotes();
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBBreakpoint brkPt = rSessionInfo.GetTarget().FindBreakpointByID(
-      static_cast<lldb::break_id_t>(m_nBrkPtId));
-  if (brkPt.IsValid()) {
-    brkPt.SetCondition(m_strBrkPtExpr.c_str());
-
-    CMICmnLLDBDebugSessionInfo::SBrkPtInfo sBrkPtInfo;
-    if (!rSessionInfo.RecordBrkPtInfoGet(m_nBrkPtId, sBrkPtInfo)) {
-      SetError(
-          CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_INFO_OBJ_NOT_FOUND),
-                                m_cmdData.strMiCmd.c_str(), m_nBrkPtId));
-      return MIstatus::failure;
-    }
-    sBrkPtInfo.m_strCondition = m_strBrkPtExpr;
-    rSessionInfo.RecordBrkPtInfo(m_nBrkPtId, sBrkPtInfo);
-  } else {
-    const CMIUtilString strBrkPtId(CMIUtilString::Format("%d", m_nBrkPtId));
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_BRKPT_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   strBrkPtId.c_str()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdBreakCondition::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdBreakCondition::CreateSelf() {
-  return new CMICmdCmdBreakCondition();
-}
-
-//++
-// Details: A breakpoint expression can be passed to *this command as:
-//              a single string i.e. '2' -> ok.
-//              a quoted string i.e. "a > 100" -> ok
-//              a non quoted string i.e. 'a > 100' -> not ok
-//          CMICmdArgValString only extracts the first space separated string,
-//          the "a".
-//          This function using the optional argument type CMICmdArgValListOfN
-//          collects
-//          the rest of the expression so that is may be added to the 'a' part
-//          to form a
-//          complete expression string i.e. "a > 100".
-//          If the expression value was guaranteed to be surrounded by quotes
-//          them this
-//          function would not be necessary.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Rest of the breakpoint expression.
-// Throws:  None.
-//--
-CMIUtilString
-CMICmdCmdBreakCondition::GetRestOfExpressionNotSurroundedInQuotes() {
-  CMIUtilString strExpression;
-
-  CMICmdArgValListOfN *pArgExprNoQuotes =
-      CMICmdBase::GetOption<CMICmdArgValListOfN>(
-          m_constStrArgNamedExprNoQuotes);
-  if (pArgExprNoQuotes != nullptr) {
-    const CMICmdArgValListBase::VecArgObjPtr_t &rVecExprParts(
-        pArgExprNoQuotes->GetExpectedOptions());
-    if (!rVecExprParts.empty()) {
-      CMICmdArgValListBase::VecArgObjPtr_t::const_iterator it =
-          rVecExprParts.begin();
-      while (it != rVecExprParts.end()) {
-        const CMICmdArgValString *pPartExpr =
-            static_cast<CMICmdArgValString *>(*it);
-        const CMIUtilString &rPartExpr = pPartExpr->GetValue();
-        strExpression += " ";
-        strExpression += rPartExpr;
-
-        // Next
-        ++it;
-      }
-      strExpression = strExpression.Trim();
-    }
-  }
-
-  return strExpression;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdBreak.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdBreak.h
deleted file mode 100644
index 00c5aa2..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdBreak.h
+++ /dev/null
@@ -1,262 +0,0 @@
-//===-- MICmdCmdBreak.h -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdBreakInsert            interface.
-//              CMICmdCmdBreakDelete            interface.
-//              CMICmdCmdBreakDisable           interface.
-//              CMICmdCmdBreakEnable            interface.
-//              CMICmdCmdBreakAfter             interface.
-//              CMICmdCmdBreakCondition         interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// Third party headers:
-#include "lldb/API/SBBreakpoint.h"
-
-// In-house headers:
-#include "MICmdBase.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "break-insert".
-//          This command does not follow the MI documentation exactly.
-//--
-class CMICmdCmdBreakInsert : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdBreakInsert();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdBreakInsert() override;
-
-  // Enumerations:
-private:
-  //++ ===================================================================
-  // Details: The type of break point give in the MI command text.
-  //--
-  enum BreakPoint_e {
-    eBreakPoint_Invalid = 0,
-    eBreakPoint_ByFileLine,
-    eBreakPoint_ByFileFn,
-    eBreakPoint_ByName,
-    eBreakPoint_ByAddress,
-    eBreakPoint_count,
-    eBreakPoint_NotDefineYet
-  };
-
-  // Attributes:
-private:
-  bool m_bBrkPtIsTemp;
-  bool m_bHaveArgOptionThreadGrp;
-  CMIUtilString m_brkName;
-  CMIUtilString m_strArgOptionThreadGrp;
-  lldb::SBBreakpoint m_brkPt;
-  bool m_bBrkPtIsPending;
-  MIuint m_nBrkPtIgnoreCount;
-  bool m_bBrkPtEnabled;
-  bool m_bBrkPtCondition;
-  CMIUtilString m_brkPtCondition;
-  bool m_bBrkPtThreadId;
-  MIuint m_nBrkPtThreadId;
-  const CMIUtilString m_constStrArgNamedTempBrkPt;
-  const CMIUtilString m_constStrArgNamedHWBrkPt; // Not handled by *this command
-  const CMIUtilString m_constStrArgNamedPendinfBrkPt;
-  const CMIUtilString m_constStrArgNamedDisableBrkPt;
-  const CMIUtilString m_constStrArgNamedTracePt; // Not handled by *this command
-  const CMIUtilString m_constStrArgNamedConditionalBrkPt;
-  const CMIUtilString m_constStrArgNamedInoreCnt;
-  const CMIUtilString m_constStrArgNamedRestrictBrkPtToThreadId;
-  const CMIUtilString m_constStrArgNamedLocation;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "break-delete".
-//--
-class CMICmdCmdBreakDelete : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdBreakDelete();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdBreakDelete() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNamedBrkPt;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "break-disable".
-//--
-class CMICmdCmdBreakDisable : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdBreakDisable();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdBreakDisable() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNamedBrkPt;
-  bool m_bBrkPtDisabledOk;
-  MIuint m_nBrkPtId;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "break-enable".
-//--
-class CMICmdCmdBreakEnable : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdBreakEnable();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdBreakEnable() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNamedBrkPt;
-  bool m_bBrkPtEnabledOk;
-  MIuint m_nBrkPtId;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "break-after".
-//--
-class CMICmdCmdBreakAfter : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdBreakAfter();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdBreakAfter() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNamedNumber;
-  const CMIUtilString m_constStrArgNamedCount;
-  MIuint m_nBrkPtId;
-  MIuint m_nBrkPtCount;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "break-condition".
-//--
-class CMICmdCmdBreakCondition : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdBreakCondition();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdBreakCondition() override;
-
-  // Methods:
-private:
-  CMIUtilString GetRestOfExpressionNotSurroundedInQuotes();
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNamedNumber;
-  const CMIUtilString m_constStrArgNamedExpr;
-  const CMIUtilString m_constStrArgNamedExprNoQuotes; // Not specified in MI
-                                                      // spec, we need to handle
-                                                      // expressions not
-                                                      // surrounded by quotes
-  MIuint m_nBrkPtId;
-  CMIUtilString m_strBrkPtExpr;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdData.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdData.cpp
deleted file mode 100644
index e0a1657..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdData.cpp
+++ /dev/null
@@ -1,1673 +0,0 @@
-//===-- MICmdCmdData.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdDataEvaluateExpression     implementation.
-//              CMICmdCmdDataDisassemble            implementation.
-//              CMICmdCmdDataReadMemoryBytes        implementation.
-//              CMICmdCmdDataReadMemory             implementation.
-//              CMICmdCmdDataListRegisterNames      implementation.
-//              CMICmdCmdDataListRegisterValues     implementation.
-//              CMICmdCmdDataListRegisterChanged    implementation.
-//              CMICmdCmdDataWriteMemoryBytes       implementation.
-//              CMICmdCmdDataWriteMemory            implementation.
-//              CMICmdCmdDataInfoLine               implementation.
-
-// Third Party Headers:
-#include "lldb/API/SBInstruction.h"
-#include "lldb/API/SBInstructionList.h"
-#include "lldb/API/SBStream.h"
-#include "lldb/API/SBThread.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/Twine.h"
-#include <inttypes.h>
-#include <string>
-
-// In-house headers:
-#include "MICmdArgValConsume.h"
-#include "MICmdArgValListOfN.h"
-#include "MICmdArgValNumber.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValString.h"
-#include "MICmdArgValThreadGrp.h"
-#include "MICmdCmdData.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugSessionInfoVarObj.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnLLDBProxySBValue.h"
-#include "MICmnLLDBUtilSBValue.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "Platform.h"
-
-namespace {
-CMIUtilString IntToHexAddrStr(uint32_t number) {
-  return CMIUtilString("0x" + llvm::Twine::utohexstr(number).str());
-}
-} // namespace
-
-//++
-// Details: CMICmdCmdDataEvaluateExpression constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataEvaluateExpression::CMICmdCmdDataEvaluateExpression()
-    : m_bExpressionValid(true), m_bEvaluatedExpression(true), m_strValue("??"),
-      m_bFoundInvalidChar(false), m_cExpressionInvalidChar(0x00),
-      m_constStrArgExpr("expr") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-evaluate-expression";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataEvaluateExpression::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataEvaluateExpression destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataEvaluateExpression::~CMICmdCmdDataEvaluateExpression() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataEvaluateExpression::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgExpr, true, true, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataEvaluateExpression::Execute() {
-  CMICMDBASE_GETOPTION(pArgExpr, String, m_constStrArgExpr);
-
-  const CMIUtilString &rExpression(pArgExpr->GetValue());
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  lldb::SBThread thread = sbProcess.GetSelectedThread();
-  m_bExpressionValid = (thread.GetNumFrames() > 0);
-  if (!m_bExpressionValid)
-    return MIstatus::success;
-
-  lldb::SBFrame frame = thread.GetSelectedFrame();
-  lldb::SBValue value = frame.EvaluateExpression(rExpression.c_str());
-  m_Error = value.GetError();
-  if (!value.IsValid() || m_Error.Fail())
-    value = frame.FindVariable(rExpression.c_str());
-  const CMICmnLLDBUtilSBValue utilValue(value, true);
-  if (!utilValue.IsValid() || utilValue.IsValueUnknown()) {
-    m_bEvaluatedExpression = false;
-    return MIstatus::success;
-  }
-  if (!utilValue.HasName()) {
-    if (HaveInvalidCharacterInExpression(rExpression,
-                                         m_cExpressionInvalidChar)) {
-      m_bFoundInvalidChar = true;
-      return MIstatus::success;
-    }
-
-    m_strValue = rExpression;
-    return MIstatus::success;
-  }
-  if (rExpression.IsQuoted()) {
-    m_strValue = rExpression.Trim('\"');
-    return MIstatus::success;
-  }
-  m_strValue = utilValue.GetValue(true).Escape().AddSlashes();
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataEvaluateExpression::Acknowledge() {
-  if (m_bExpressionValid) {
-    if (m_bEvaluatedExpression) {
-      if (m_bFoundInvalidChar) {
-        const CMICmnMIValueConst miValueConst(CMIUtilString::Format(
-            "Invalid character '%c' in expression", m_cExpressionInvalidChar));
-        const CMICmnMIValueResult miValueResult("msg", miValueConst);
-        const CMICmnMIResultRecord miRecordResult(
-            m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-            miValueResult);
-        m_miResultRecord = miRecordResult;
-        return MIstatus::success;
-      }
-
-      const CMICmnMIValueConst miValueConst(m_strValue);
-      const CMICmnMIValueResult miValueResult("value", miValueConst);
-      const CMICmnMIResultRecord miRecordResult(
-          m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-          miValueResult);
-      m_miResultRecord = miRecordResult;
-      return MIstatus::success;
-    }
-    CMIUtilString mi_error_msg = "Could not evaluate expression";
-    if (const char *err_msg = m_Error.GetCString())
-      mi_error_msg = err_msg;
-    const CMICmnMIValueConst miValueConst(mi_error_msg.Escape(true));
-    const CMICmnMIValueResult miValueResult("msg", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  const CMICmnMIValueConst miValueConst("Invalid expression");
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataEvaluateExpression::CreateSelf() {
-  return new CMICmdCmdDataEvaluateExpression();
-}
-
-//++
-// Details: Examine the expression string to see if it contains invalid
-// characters.
-// Type:    Method.
-// Args:    vrExpr          - (R) Expression string given to *this command.
-//          vrwInvalidChar  - (W) True = Invalid character found, false =
-//          nothing found.
-// Return:  bool - True = Invalid character found, false = nothing found.
-// Throws:  None.
-//--
-bool CMICmdCmdDataEvaluateExpression::HaveInvalidCharacterInExpression(
-    const CMIUtilString &vrExpr, char &vrwInvalidChar) {
-  static const std::string strInvalidCharacters(";#\\");
-  const size_t nInvalidCharacterOffset =
-      vrExpr.find_first_of(strInvalidCharacters);
-  const bool bFoundInvalidCharInExpression =
-      (nInvalidCharacterOffset != CMIUtilString::npos);
-  vrwInvalidChar =
-      bFoundInvalidCharInExpression ? vrExpr[nInvalidCharacterOffset] : 0x00;
-  return bFoundInvalidCharInExpression;
-}
-
-
-//++
-// Details: CMICmdCmdDataDisassemble constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataDisassemble::CMICmdCmdDataDisassemble()
-    : m_constStrArgAddrStart("s"), m_constStrArgAddrEnd("e"),
-      m_constStrArgMode("mode"), m_miValueList(true) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-disassemble";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataDisassemble::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataDisassemble destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataDisassemble::~CMICmdCmdDataDisassemble() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataDisassemble::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValOptionShort(
-      m_constStrArgAddrStart, true, true,
-      CMICmdArgValListBase::eArgValType_StringQuotedNumber, 1));
-  m_setCmdArgs.Add(new CMICmdArgValOptionShort(
-      m_constStrArgAddrEnd, true, true,
-      CMICmdArgValListBase::eArgValType_StringQuotedNumber, 1));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgMode, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataDisassemble::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-  CMICMDBASE_GETOPTION(pArgAddrStart, OptionShort, m_constStrArgAddrStart);
-  CMICMDBASE_GETOPTION(pArgAddrEnd, OptionShort, m_constStrArgAddrEnd);
-  CMICMDBASE_GETOPTION(pArgMode, Number, m_constStrArgMode);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-  CMIUtilString strAddrStart;
-  if (!pArgAddrStart->GetExpectedOption<CMICmdArgValString, CMIUtilString>(
-          strAddrStart)) {
-    SetError(CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_DISASM_ADDR_START_INVALID),
-        m_cmdData.strMiCmd.c_str(), m_constStrArgAddrStart.c_str()));
-    return MIstatus::failure;
-  }
-  MIint64 nAddrStart = 0;
-  if (!strAddrStart.ExtractNumber(nAddrStart)) {
-    SetError(CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_DISASM_ADDR_START_INVALID),
-        m_cmdData.strMiCmd.c_str(), m_constStrArgAddrStart.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMIUtilString strAddrEnd;
-  if (!pArgAddrEnd->GetExpectedOption<CMICmdArgValString, CMIUtilString>(
-          strAddrEnd)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_DISASM_ADDR_END_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgAddrEnd.c_str()));
-    return MIstatus::failure;
-  }
-  MIint64 nAddrEnd = 0;
-  if (!strAddrEnd.ExtractNumber(nAddrEnd)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_DISASM_ADDR_END_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgAddrEnd.c_str()));
-    return MIstatus::failure;
-  }
-  const MIuint nDisasmMode = pArgMode->GetValue();
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
-  lldb::addr_t lldbStartAddr = static_cast<lldb::addr_t>(nAddrStart);
-  lldb::SBInstructionList instructions = sbTarget.ReadInstructions(
-      lldb::SBAddress(lldbStartAddr, sbTarget), nAddrEnd - nAddrStart);
-  const MIuint nInstructions = instructions.GetSize();
-  // Calculate the offset of first instruction so that we can generate offset
-  // starting at 0
-  lldb::addr_t start_offset = 0;
-  if (nInstructions > 0)
-    start_offset =
-        instructions.GetInstructionAtIndex(0).GetAddress().GetOffset();
-
-  for (size_t i = 0; i < nInstructions; i++) {
-    const char *pUnknown = "??";
-    lldb::SBInstruction instrt = instructions.GetInstructionAtIndex(i);
-    const char *pStrMnemonic = instrt.GetMnemonic(sbTarget);
-    pStrMnemonic = (pStrMnemonic != nullptr) ? pStrMnemonic : pUnknown;
-    const char *pStrComment = instrt.GetComment(sbTarget);
-    CMIUtilString strComment;
-    if (pStrComment != nullptr && *pStrComment != '\0')
-      strComment = CMIUtilString::Format("; %s", pStrComment);
-    lldb::SBAddress address = instrt.GetAddress();
-    lldb::addr_t addr = address.GetLoadAddress(sbTarget);
-    const char *pFnName = address.GetFunction().GetName();
-    pFnName = (pFnName != nullptr) ? pFnName : pUnknown;
-    lldb::addr_t addrOffSet = address.GetOffset() - start_offset;
-    const char *pStrOperands = instrt.GetOperands(sbTarget);
-    pStrOperands = (pStrOperands != nullptr) ? pStrOperands : pUnknown;
-    const size_t instrtSize = instrt.GetByteSize();
-
-    // MI "{address=\"0x%016" PRIx64
-    // "\",func-name=\"%s\",offset=\"%lld\",inst=\"%s %s\"}"
-    const CMICmnMIValueConst miValueConst(
-        CMIUtilString::Format("0x%016" PRIx64, addr));
-    const CMICmnMIValueResult miValueResult("address", miValueConst);
-    CMICmnMIValueTuple miValueTuple(miValueResult);
-    const CMICmnMIValueConst miValueConst2(pFnName);
-    const CMICmnMIValueResult miValueResult2("func-name", miValueConst2);
-    miValueTuple.Add(miValueResult2);
-    const CMICmnMIValueConst miValueConst3(
-        CMIUtilString::Format("%lld", addrOffSet));
-    const CMICmnMIValueResult miValueResult3("offset", miValueConst3);
-    miValueTuple.Add(miValueResult3);
-    const CMICmnMIValueConst miValueConst4(
-        CMIUtilString::Format("%d", instrtSize));
-    const CMICmnMIValueResult miValueResult4("size", miValueConst4);
-    miValueTuple.Add(miValueResult4);
-    const CMICmnMIValueConst miValueConst5(
-        CMIUtilString::Format("%s %s%s", pStrMnemonic, pStrOperands,
-                              strComment.Escape(true).c_str()));
-    const CMICmnMIValueResult miValueResult5("inst", miValueConst5);
-    miValueTuple.Add(miValueResult5);
-
-    if (nDisasmMode == 1) {
-      lldb::SBLineEntry lineEntry = address.GetLineEntry();
-      const MIuint nLine = lineEntry.GetLine();
-      const char *pFileName = lineEntry.GetFileSpec().GetFilename();
-      pFileName = (pFileName != nullptr) ? pFileName : pUnknown;
-      // Get a full path to the file.
-      char pathBuffer[PATH_MAX];
-      lineEntry.GetFileSpec().GetPath(pathBuffer, PATH_MAX);
-
-      // MI "src_and_asm_line={line=\"%u\",file=\"%s\",line_asm_insn=[ ],
-      // fullname=\"%s\"}"
-      const CMICmnMIValueConst miValueConst(
-          CMIUtilString::Format("%u", nLine));
-      const CMICmnMIValueResult miValueResult("line", miValueConst);
-      CMICmnMIValueTuple miValueTuple2(miValueResult);
-      const CMICmnMIValueConst miValueConst2(pFileName);
-      const CMICmnMIValueResult miValueResult2("file", miValueConst2);
-      miValueTuple2.Add(miValueResult2);
-      const CMICmnMIValueList miValueList(miValueTuple);
-      const CMICmnMIValueResult miValueResult3("line_asm_insn", miValueList);
-      miValueTuple2.Add(miValueResult3);
-      const CMICmnMIValueConst miValueConst5(pathBuffer);
-      const CMICmnMIValueResult miValueResult5("fullname", miValueConst5);
-      miValueTuple2.Add(miValueResult5);
-      const CMICmnMIValueResult miValueResult4("src_and_asm_line",
-                                               miValueTuple2);
-      m_miValueList.Add(miValueResult4);
-    } else {
-      m_miValueList.Add(miValueTuple);
-    }
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataDisassemble::Acknowledge() {
-  const CMICmnMIValueResult miValueResult("asm_insns", m_miValueList);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataDisassemble::CreateSelf() {
-  return new CMICmdCmdDataDisassemble();
-}
-
-
-//++
-// Details: CMICmdCmdDataReadMemoryBytes constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataReadMemoryBytes::CMICmdCmdDataReadMemoryBytes()
-    : m_constStrArgByteOffset("o"), m_constStrArgAddrExpr("address"),
-      m_constStrArgNumBytes("count"), m_pBufferMemory(nullptr), m_nAddrStart(0),
-      m_nAddrNumBytesToRead(0) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-read-memory-bytes";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataReadMemoryBytes::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataReadMemoryBytes destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataReadMemoryBytes::~CMICmdCmdDataReadMemoryBytes() {
-  if (m_pBufferMemory != nullptr) {
-    delete[] m_pBufferMemory;
-    m_pBufferMemory = nullptr;
-  }
-}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataReadMemoryBytes::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionShort(m_constStrArgByteOffset, false, true,
-                                  CMICmdArgValListBase::eArgValType_Number, 1));
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgAddrExpr, true, true, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumBytes, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataReadMemoryBytes::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-  CMICMDBASE_GETOPTION(pArgFrame, OptionLong, m_constStrArgFrame);
-  CMICMDBASE_GETOPTION(pArgAddrOffset, OptionShort, m_constStrArgByteOffset);
-  CMICMDBASE_GETOPTION(pArgAddrExpr, String, m_constStrArgAddrExpr);
-  CMICMDBASE_GETOPTION(pArgNumBytes, Number, m_constStrArgNumBytes);
-
-  // get the --thread option value
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-
-  // get the --frame option value
-  MIuint64 nFrame = UINT64_MAX;
-  if (pArgFrame->GetFound() &&
-      !pArgFrame->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nFrame)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgFrame.c_str()));
-    return MIstatus::failure;
-  }
-
-  // get the -o option value
-  MIuint64 nAddrOffset = 0;
-  if (pArgAddrOffset->GetFound() &&
-      !pArgAddrOffset->GetExpectedOption<CMICmdArgValNumber, MIuint64>(
-          nAddrOffset)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgByteOffset.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  if (!sbProcess.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PROCESS),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBThread thread = (nThreadId != UINT64_MAX)
-                              ? sbProcess.GetThreadByIndexID(nThreadId)
-                              : sbProcess.GetSelectedThread();
-  if (!thread.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_INVALID),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBFrame frame = (nFrame != UINT64_MAX) ? thread.GetFrameAtIndex(nFrame)
-                                               : thread.GetSelectedFrame();
-  if (!frame.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_FRAME_INVALID),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  const CMIUtilString &rAddrExpr = pArgAddrExpr->GetValue();
-  lldb::SBValue addrExprValue = frame.EvaluateExpression(rAddrExpr.c_str());
-  lldb::SBError error = addrExprValue.GetError();
-  if (error.Fail()) {
-    SetError(error.GetCString());
-    return MIstatus::failure;
-  } else if (!addrExprValue.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_EXPR_INVALID),
-                                   rAddrExpr.c_str()));
-    return MIstatus::failure;
-  }
-
-  MIuint64 nAddrStart = 0;
-  if (!CMICmnLLDBProxySBValue::GetValueAsUnsigned(addrExprValue, nAddrStart)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_EXPR_INVALID),
-                                   rAddrExpr.c_str()));
-    return MIstatus::failure;
-  }
-
-  nAddrStart += nAddrOffset;
-  const MIuint64 nAddrNumBytes = pArgNumBytes->GetValue();
-
-  m_pBufferMemory = new unsigned char[nAddrNumBytes];
-  if (m_pBufferMemory == nullptr) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_MEMORY_ALLOC_FAILURE),
-                                   m_cmdData.strMiCmd.c_str(), nAddrNumBytes));
-    return MIstatus::failure;
-  }
-
-  const MIuint64 nReadBytes =
-      sbProcess.ReadMemory(static_cast<lldb::addr_t>(nAddrStart),
-                           (void *)m_pBufferMemory, nAddrNumBytes, error);
-  if (nReadBytes != nAddrNumBytes) {
-    SetError(CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_LLDB_ERR_NOT_READ_WHOLE_BLK),
-        m_cmdData.strMiCmd.c_str(), nAddrNumBytes, nAddrStart));
-    return MIstatus::failure;
-  }
-  if (error.Fail()) {
-    lldb::SBStream err;
-    const bool bOk = error.GetDescription(err);
-    MIunused(bOk);
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_LLDB_ERR_READ_MEM_BYTES),
-                                   m_cmdData.strMiCmd.c_str(), nAddrNumBytes,
-                                   nAddrStart, err.GetData()));
-    return MIstatus::failure;
-  }
-
-  m_nAddrStart = nAddrStart;
-  m_nAddrNumBytesToRead = nAddrNumBytes;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataReadMemoryBytes::Acknowledge() {
-  // MI: memory=[{begin=\"0x%016" PRIx64 "\",offset=\"0x%016" PRIx64"
-  // \",end=\"0x%016" PRIx64 "\",contents=\" \" }]"
-  const CMICmnMIValueConst miValueConst(
-      CMIUtilString::Format("0x%016" PRIx64, m_nAddrStart));
-  const CMICmnMIValueResult miValueResult("begin", miValueConst);
-  CMICmnMIValueTuple miValueTuple(miValueResult);
-  const MIuint64 nAddrOffset = 0;
-  const CMICmnMIValueConst miValueConst2(
-      CMIUtilString::Format("0x%016" PRIx64, nAddrOffset));
-  const CMICmnMIValueResult miValueResult2("offset", miValueConst2);
-  miValueTuple.Add(miValueResult2);
-  const CMICmnMIValueConst miValueConst3(CMIUtilString::Format(
-      "0x%016" PRIx64, m_nAddrStart + m_nAddrNumBytesToRead));
-  const CMICmnMIValueResult miValueResult3("end", miValueConst3);
-  miValueTuple.Add(miValueResult3);
-
-  // MI: contents=\" \"
-  CMIUtilString strContent;
-  strContent.reserve((m_nAddrNumBytesToRead << 1) + 1);
-  for (MIuint64 i = 0; i < m_nAddrNumBytesToRead; i++) {
-    strContent += CMIUtilString::Format("%02hhx", m_pBufferMemory[i]);
-  }
-  const CMICmnMIValueConst miValueConst4(strContent);
-  const CMICmnMIValueResult miValueResult4("contents", miValueConst4);
-  miValueTuple.Add(miValueResult4);
-  const CMICmnMIValueList miValueList(miValueTuple);
-  const CMICmnMIValueResult miValueResult5("memory", miValueList);
-
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult5);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataReadMemoryBytes::CreateSelf() {
-  return new CMICmdCmdDataReadMemoryBytes();
-}
-
-
-//++
-// Details: CMICmdCmdDataReadMemory constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataReadMemory::CMICmdCmdDataReadMemory() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-read-memory";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataReadMemory::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataReadMemory destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataReadMemory::~CMICmdCmdDataReadMemory() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataReadMemory::Execute() {
-  // Do nothing - command deprecated use "data-read-memory-bytes" command
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataReadMemory::Acknowledge() {
-  // Command CMICmdCmdSupportListFeatures sends "data-read-memory-bytes" which
-  // causes this command not to be called
-  const CMICmnMIValueConst miValueConst(
-      MIRSRC(IDS_CMD_ERR_NOT_IMPLEMENTED_DEPRECATED));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataReadMemory::CreateSelf() {
-  return new CMICmdCmdDataReadMemory();
-}
-
-
-//++
-// Details: CMICmdCmdDataListRegisterNames constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataListRegisterNames::CMICmdCmdDataListRegisterNames()
-    : m_constStrArgRegNo("regno"), m_miValueList(true) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-list-register-names";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataListRegisterNames::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataReadMemoryBytes destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataListRegisterNames::~CMICmdCmdDataListRegisterNames() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataListRegisterNames::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValListOfN(m_constStrArgRegNo, false, false,
-                              CMICmdArgValListBase::eArgValType_Number));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataListRegisterNames::Execute() {
-  CMICMDBASE_GETOPTION(pArgRegNo, ListOfN, m_constStrArgRegNo);
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  if (!sbProcess.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PROCESS),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  const CMICmdArgValListBase::VecArgObjPtr_t &rVecRegNo(
-      pArgRegNo->GetExpectedOptions());
-  if (!rVecRegNo.empty()) {
-    // List of required registers
-    CMICmdArgValListBase::VecArgObjPtr_t::const_iterator it = rVecRegNo.begin();
-    while (it != rVecRegNo.end()) {
-      const CMICmdArgValNumber *pRegNo = static_cast<CMICmdArgValNumber *>(*it);
-      const MIuint nRegIndex = pRegNo->GetValue();
-      lldb::SBValue regValue = GetRegister(nRegIndex);
-      if (regValue.IsValid()) {
-        const CMICmnMIValueConst miValueConst(
-            CMICmnLLDBUtilSBValue(regValue).GetName());
-        m_miValueList.Add(miValueConst);
-      }
-
-      // Next
-      ++it;
-    }
-  } else {
-    // List of all registers
-    lldb::SBThread thread = sbProcess.GetSelectedThread();
-    lldb::SBFrame frame = thread.GetSelectedFrame();
-    lldb::SBValueList registers = frame.GetRegisters();
-    const MIuint nRegisters = registers.GetSize();
-    for (MIuint i = 0; i < nRegisters; i++) {
-      lldb::SBValue value = registers.GetValueAtIndex(i);
-      const MIuint nRegChildren = value.GetNumChildren();
-      for (MIuint j = 0; j < nRegChildren; j++) {
-        lldb::SBValue regValue = value.GetChildAtIndex(j);
-        if (regValue.IsValid()) {
-          const CMICmnMIValueConst miValueConst(
-              CMICmnLLDBUtilSBValue(regValue).GetName());
-          m_miValueList.Add(miValueConst);
-        }
-      }
-    }
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataListRegisterNames::Acknowledge() {
-  const CMICmnMIValueResult miValueResult("register-names", m_miValueList);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataListRegisterNames::CreateSelf() {
-  return new CMICmdCmdDataListRegisterNames();
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Method.
-// Args:    None.
-// Return:  lldb::SBValue - LLDB SBValue object.
-// Throws:  None.
-//--
-lldb::SBValue
-CMICmdCmdDataListRegisterNames::GetRegister(const MIuint vRegisterIndex) const {
-  lldb::SBThread thread =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess().GetSelectedThread();
-  lldb::SBFrame frame = thread.GetSelectedFrame();
-  lldb::SBValueList registers = frame.GetRegisters();
-  const MIuint nRegisters = registers.GetSize();
-  MIuint nRegisterIndex(vRegisterIndex);
-  for (MIuint i = 0; i < nRegisters; i++) {
-    lldb::SBValue value = registers.GetValueAtIndex(i);
-    const MIuint nRegChildren = value.GetNumChildren();
-    if (nRegisterIndex >= nRegChildren) {
-      nRegisterIndex -= nRegChildren;
-      continue;
-    }
-
-    lldb::SBValue value2 = value.GetChildAtIndex(nRegisterIndex);
-    if (value2.IsValid()) {
-      return value2;
-    }
-  }
-
-  return lldb::SBValue();
-}
-
-
-//++
-// Details: CMICmdCmdDataListRegisterValues constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataListRegisterValues::CMICmdCmdDataListRegisterValues()
-    : m_constStrArgSkip("skip-unavailable"), m_constStrArgFormat("fmt"),
-      m_constStrArgRegNo("regno"), m_miValueList(true) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-list-register-values";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataListRegisterValues::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataListRegisterValues destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataListRegisterValues::~CMICmdCmdDataListRegisterValues() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataListRegisterValues::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionLong(m_constStrArgThread, false, false,
-                                 CMICmdArgValListBase::eArgValType_Number, 1));
-  m_setCmdArgs.Add(new CMICmdArgValOptionLong(m_constStrArgSkip, false, false));
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgFormat, true, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValListOfN(m_constStrArgRegNo, false, true,
-                              CMICmdArgValListBase::eArgValType_Number));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataListRegisterValues::Execute() {
-  CMICMDBASE_GETOPTION(pArgFormat, String, m_constStrArgFormat);
-  CMICMDBASE_GETOPTION(pArgRegNo, ListOfN, m_constStrArgRegNo);
-
-  const CMIUtilString &rStrFormat(pArgFormat->GetValue());
-  if (rStrFormat.length() != 1) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_FORMAT_TYPE),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rStrFormat.c_str()));
-    return MIstatus::failure;
-  }
-  const CMICmnLLDBDebugSessionInfoVarObj::varFormat_e eFormat =
-      CMICmnLLDBDebugSessionInfoVarObj::GetVarFormatForChar(rStrFormat[0]);
-  if (eFormat == CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Invalid) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_FORMAT_TYPE),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rStrFormat.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  if (!sbProcess.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PROCESS),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  const CMICmdArgValListBase::VecArgObjPtr_t &rVecRegNo(
-      pArgRegNo->GetExpectedOptions());
-  if (!rVecRegNo.empty()) {
-    // List of required registers
-    CMICmdArgValListBase::VecArgObjPtr_t::const_iterator it = rVecRegNo.begin();
-    while (it != rVecRegNo.end()) {
-      const CMICmdArgValNumber *pRegNo = static_cast<CMICmdArgValNumber *>(*it);
-      const MIuint nRegIndex = pRegNo->GetValue();
-      lldb::SBValue regValue = GetRegister(nRegIndex);
-      if (regValue.IsValid()) {
-        AddToOutput(nRegIndex, regValue, eFormat);
-      }
-
-      // Next
-      ++it;
-    }
-  } else {
-    // No register numbers are provided. Output all registers.
-    lldb::SBThread thread = sbProcess.GetSelectedThread();
-    lldb::SBFrame frame = thread.GetSelectedFrame();
-    lldb::SBValueList registers = frame.GetRegisters();
-    const MIuint nRegisters = registers.GetSize();
-    MIuint nRegIndex = 0;
-    for (MIuint i = 0; i < nRegisters; i++) {
-      lldb::SBValue value = registers.GetValueAtIndex(i);
-      const MIuint nRegChildren = value.GetNumChildren();
-      for (MIuint j = 0; j < nRegChildren; j++) {
-        lldb::SBValue regValue = value.GetChildAtIndex(j);
-        if (regValue.IsValid()) {
-          AddToOutput(nRegIndex, regValue, eFormat);
-        }
-
-        // Next
-        ++nRegIndex;
-      }
-    }
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataListRegisterValues::Acknowledge() {
-  const CMICmnMIValueResult miValueResult("register-values", m_miValueList);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataListRegisterValues::CreateSelf() {
-  return new CMICmdCmdDataListRegisterValues();
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Method.
-// Args:    None.
-// Return:  lldb::SBValue - LLDB SBValue object.
-// Throws:  None.
-//--
-lldb::SBValue CMICmdCmdDataListRegisterValues::GetRegister(
-    const MIuint vRegisterIndex) const {
-  lldb::SBThread thread =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess().GetSelectedThread();
-  lldb::SBFrame frame = thread.GetSelectedFrame();
-  lldb::SBValueList registers = frame.GetRegisters();
-  const MIuint nRegisters = registers.GetSize();
-  MIuint nRegisterIndex(vRegisterIndex);
-  for (MIuint i = 0; i < nRegisters; i++) {
-    lldb::SBValue value = registers.GetValueAtIndex(i);
-    const MIuint nRegChildren = value.GetNumChildren();
-    if (nRegisterIndex >= nRegChildren) {
-      nRegisterIndex -= nRegChildren;
-      continue;
-    }
-
-    lldb::SBValue value2 = value.GetChildAtIndex(nRegisterIndex);
-    if (value2.IsValid()) {
-      return value2;
-    }
-  }
-
-  return lldb::SBValue();
-}
-
-//++
-// Details: Adds the register value to the output list.
-// Type:    Method.
-// Args:    Value of the register, its index and output format.
-// Return:  None
-// Throws:  None.
-//--
-void CMICmdCmdDataListRegisterValues::AddToOutput(
-    const MIuint vnIndex, const lldb::SBValue &vrValue,
-    CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veVarFormat) {
-  const CMICmnMIValueConst miValueConst(CMIUtilString::Format("%u", vnIndex));
-  const CMICmnMIValueResult miValueResult("number", miValueConst);
-  CMICmnMIValueTuple miValueTuple(miValueResult);
-  const CMIUtilString strRegValue(
-      CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted(vrValue,
-                                                                veVarFormat));
-  const CMICmnMIValueConst miValueConst2(strRegValue);
-  const CMICmnMIValueResult miValueResult2("value", miValueConst2);
-  miValueTuple.Add(miValueResult2);
-  m_miValueList.Add(miValueTuple);
-}
-
-
-//++
-// Details: CMICmdCmdDataListRegisterChanged constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataListRegisterChanged::CMICmdCmdDataListRegisterChanged() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-list-changed-registers";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataListRegisterChanged::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataListRegisterChanged destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataListRegisterChanged::~CMICmdCmdDataListRegisterChanged() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataListRegisterChanged::Execute() {
-  // Do nothing
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataListRegisterChanged::Acknowledge() {
-  const CMICmnMIValueConst miValueConst(MIRSRC(IDS_WORD_NOT_IMPLEMENTED));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataListRegisterChanged::CreateSelf() {
-  return new CMICmdCmdDataListRegisterChanged();
-}
-
-
-//++
-// Details: CMICmdCmdDataWriteMemoryBytes constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataWriteMemoryBytes::CMICmdCmdDataWriteMemoryBytes()
-    : m_constStrArgAddr("address"), m_constStrArgContents("contents"),
-      m_constStrArgCount("count") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-write-memory-bytes";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataWriteMemoryBytes::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataWriteMemoryBytes destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataWriteMemoryBytes::~CMICmdCmdDataWriteMemoryBytes() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataWriteMemoryBytes::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgAddr, true, true, false, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgContents, true, true, true, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgCount, false, true, false, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataWriteMemoryBytes::Execute() {
-  // Do nothing - not reproduceable (yet) in Eclipse
-  // CMICMDBASE_GETOPTION( pArgOffset, OptionShort, m_constStrArgOffset );
-  // CMICMDBASE_GETOPTION( pArgAddr, String, m_constStrArgAddr );
-  // CMICMDBASE_GETOPTION( pArgNumber, String, m_constStrArgNumber );
-  // CMICMDBASE_GETOPTION( pArgContents, String, m_constStrArgContents );
-  //
-  // Numbers extracts as string types as they could be hex numbers
-  // '&' is not recognised and so has to be removed
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataWriteMemoryBytes::Acknowledge() {
-  const CMICmnMIValueConst miValueConst(MIRSRC(IDS_WORD_NOT_IMPLEMENTED));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataWriteMemoryBytes::CreateSelf() {
-  return new CMICmdCmdDataWriteMemoryBytes();
-}
-
-
-//++
-// Details: CMICmdCmdDataWriteMemory constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataWriteMemory::CMICmdCmdDataWriteMemory()
-    : m_constStrArgOffset("o"), m_constStrArgAddr("address"),
-      m_constStrArgD("d"), m_constStrArgNumber("a number"),
-      m_constStrArgContents("contents"), m_nAddr(0), m_nCount(0),
-      m_pBufferMemory(nullptr) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-write-memory";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataWriteMemory::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataWriteMemory destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataWriteMemory::~CMICmdCmdDataWriteMemory() {
-  if (m_pBufferMemory != nullptr) {
-    delete[] m_pBufferMemory;
-    m_pBufferMemory = nullptr;
-  }
-}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataWriteMemory::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionShort(m_constStrArgOffset, false, true,
-                                  CMICmdArgValListBase::eArgValType_Number, 1));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgAddr, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgD, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgContents, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataWriteMemory::Execute() {
-  CMICMDBASE_GETOPTION(pArgOffset, OptionShort, m_constStrArgOffset);
-  CMICMDBASE_GETOPTION(pArgAddr, Number, m_constStrArgAddr);
-  CMICMDBASE_GETOPTION(pArgNumber, Number, m_constStrArgNumber);
-  CMICMDBASE_GETOPTION(pArgContents, Number, m_constStrArgContents);
-
-  MIuint nAddrOffset = 0;
-  if (pArgOffset->GetFound() &&
-      !pArgOffset->GetExpectedOption<CMICmdArgValNumber, MIuint>(nAddrOffset)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ARGS_ERR_VALIDATION_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgAddr.c_str()));
-    return MIstatus::failure;
-  }
-  m_nAddr = pArgAddr->GetValue();
-  m_nCount = pArgNumber->GetValue();
-  const MIuint64 nValue = pArgContents->GetValue();
-
-  m_pBufferMemory = new unsigned char[m_nCount];
-  if (m_pBufferMemory == nullptr) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_MEMORY_ALLOC_FAILURE),
-                                   m_cmdData.strMiCmd.c_str(), m_nCount));
-    return MIstatus::failure;
-  }
-  *m_pBufferMemory = static_cast<char>(nValue);
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  lldb::SBError error;
-  lldb::addr_t addr = static_cast<lldb::addr_t>(m_nAddr + nAddrOffset);
-  const size_t nBytesWritten = sbProcess.WriteMemory(
-      addr, (const void *)m_pBufferMemory, (size_t)m_nCount, error);
-  if (nBytesWritten != static_cast<size_t>(m_nCount)) {
-    SetError(
-        CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_LLDB_ERR_NOT_WRITE_WHOLEBLK),
-                              m_cmdData.strMiCmd.c_str(), m_nCount, addr));
-    return MIstatus::failure;
-  }
-  if (error.Fail()) {
-    lldb::SBStream err;
-    const bool bOk = error.GetDescription(err);
-    MIunused(bOk);
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_LLDB_ERR_WRITE_MEM_BYTES),
-                                   m_cmdData.strMiCmd.c_str(), m_nCount, addr,
-                                   err.GetData()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataWriteMemory::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataWriteMemory::CreateSelf() {
-  return new CMICmdCmdDataWriteMemory();
-}
-
-
-//++
-// Details: CMICmdCmdDataInfoLine constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataInfoLine::CMICmdCmdDataInfoLine()
-    : m_constStrArgLocation("location"),
-      m_resultRecord(m_cmdData.strMiCmdToken,
-                     CMICmnMIResultRecord::eResultClass_Done) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "data-info-line";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdDataInfoLine::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdDataInfoLine destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdDataInfoLine::~CMICmdCmdDataInfoLine() = default;
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataInfoLine::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgLocation, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataInfoLine::Execute() {
-  CMICMDBASE_GETOPTION(pArgLocation, String, m_constStrArgLocation);
-
-  lldb::SBLineEntry line;
-  bool found_line = false;
-  const CMIUtilString &strLocation(pArgLocation->GetValue());
-  lldb::SBTarget target = CMICmnLLDBDebugSessionInfo::Instance().GetTarget();
-
-  if (strLocation.at(0) == '*') {
-    // Parse argument:
-    // *0x12345
-    // ^^^^^^^^^ -- address
-    lldb::addr_t address = 0x0;
-    if (llvm::StringRef(strLocation.substr(1)).getAsInteger(0, address)) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_SOME_ERROR),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     "Failed to parse address."));
-      return MIstatus::failure;
-    }
-    line = target.ResolveFileAddress(address).GetLineEntry();
-    // Check that found line is valid.
-    if (line.GetLine())
-      found_line = true;
-  } else {
-    const size_t nLineStartPos = strLocation.rfind(':');
-    if ((nLineStartPos == std::string::npos) || (nLineStartPos == 0) ||
-        (nLineStartPos == strLocation.length() - 1)) {
-      SetError(CMIUtilString::Format(
-          MIRSRC(IDS_CMD_ERR_INVALID_LOCATION_FORMAT),
-          m_cmdData.strMiCmd.c_str(), strLocation.c_str()));
-      return MIstatus::failure;
-    }
-    // Parse argument:
-    // hello.cpp:5
-    // ^^^^^^^^^ -- file
-    //           ^ -- line
-    const CMIUtilString &strFile(strLocation.substr(0, nLineStartPos));
-    uint32_t numLine = 0;
-    llvm::StringRef(strLocation.substr(nLineStartPos + 1))
-        .getAsInteger(0, numLine);
-    lldb::SBSymbolContextList sc_cu_list =
-        target.FindCompileUnits(lldb::SBFileSpec(strFile.c_str(), false));
-    for (uint32_t i = 0, e = sc_cu_list.GetSize(); i < e; ++i) {
-      const lldb::SBCompileUnit &cu =
-        sc_cu_list.GetContextAtIndex(i).GetCompileUnit();
-      // Break if we have already found requested line.
-      if (found_line)
-        break;
-      for (uint32_t j = 0, e = cu.GetNumLineEntries(); j < e; ++j) {
-        const lldb::SBLineEntry &curLine = cu.GetLineEntryAtIndex(j);
-        if (curLine.GetLine() == numLine) {
-          line = curLine;
-          found_line = true;
-          break;
-        }
-      }
-    }
-  }
-  if (!found_line) {
-    SetError(CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_SOME_ERROR), m_cmdData.strMiCmd.c_str(),
-        "The LineEntry is absent or has an unknown format."));
-    return MIstatus::failure;
-  }
-  // Start address.
-  m_resultRecord.Add(CMICmnMIValueResult(
-      "start", CMICmnMIValueConst(IntToHexAddrStr(
-               line.GetStartAddress().GetFileAddress()))));
-  // End address.
-  m_resultRecord.Add(CMICmnMIValueResult(
-      "end", CMICmnMIValueConst(IntToHexAddrStr(
-             line.GetEndAddress().GetFileAddress()))));
-  // File.
-  std::unique_ptr<char[]> upPath(new char[PATH_MAX]);
-  line.GetFileSpec().GetPath(upPath.get(), PATH_MAX);
-  m_resultRecord.Add(CMICmnMIValueResult(
-      "file", CMICmnMIValueConst(CMIUtilString(upPath.get()))));
-  // Line.
-  m_resultRecord.Add(CMICmnMIValueResult(
-      "line", CMICmnMIValueConst(std::to_string(line.GetLine()))));
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdDataInfoLine::Acknowledge() {
-  m_miResultRecord = m_resultRecord;
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdDataInfoLine::CreateSelf() {
-  return new CMICmdCmdDataInfoLine();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdData.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdData.h
deleted file mode 100644
index 19c5319..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdData.h
+++ /dev/null
@@ -1,381 +0,0 @@
-//===-- MICmdCmdData.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdDataEvaluateExpression     interface.
-//              CMICmdCmdDataDisassemble            interface.
-//              CMICmdCmdDataReadMemoryBytes        interface.
-//              CMICmdCmdDataReadMemory             interface.
-//              CMICmdCmdDataListRegisterNames      interface.
-//              CMICmdCmdDataListRegisterValues     interface.
-//              CMICmdCmdDataListRegisterChanged    interface.
-//              CMICmdCmdDataWriteMemoryBytes       interface.
-//              CMICmdCmdDataWriteMemory            interface.
-//              CMICmdCmdDataInfoLine               interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-//
-
-#pragma once
-
-// Third party headers:
-#include "lldb/API/SBError.h"
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnLLDBDebugSessionInfoVarObj.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-#include "MICmnMIResultRecord.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-evaluate-expression".
-//--
-class CMICmdCmdDataEvaluateExpression : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataEvaluateExpression();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataEvaluateExpression() override;
-
-  // Methods:
-private:
-  bool HaveInvalidCharacterInExpression(const CMIUtilString &vrExpr,
-                                        char &vrwInvalidChar);
-
-  // Attributes:
-private:
-  bool m_bExpressionValid;     // True = yes is valid, false = not valid
-  bool m_bEvaluatedExpression; // True = yes is expression evaluated, false =
-                               // failed
-  lldb::SBError m_Error;       // Status object, which is examined when
-                               // m_bEvaluatedExpression is false
-  CMIUtilString m_strValue;
-  CMICmnMIValueTuple m_miValueTuple;
-  bool m_bFoundInvalidChar; // True = yes found unexpected character in the
-                            // expression, false = all ok
-  char m_cExpressionInvalidChar;
-  const CMIUtilString m_constStrArgExpr;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-disassemble".
-//--
-class CMICmdCmdDataDisassemble : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataDisassemble();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataDisassemble() override;
-
-  // Attributes:
-private:
-  const CMIUtilString
-      m_constStrArgAddrStart; // MI spec non mandatory, *this command mandatory
-  const CMIUtilString
-      m_constStrArgAddrEnd; // MI spec non mandatory, *this command mandatory
-  const CMIUtilString m_constStrArgMode;
-  CMICmnMIValueList m_miValueList;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-read-memory-bytes".
-//--
-class CMICmdCmdDataReadMemoryBytes : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataReadMemoryBytes();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataReadMemoryBytes() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgByteOffset;
-  const CMIUtilString m_constStrArgAddrExpr;
-  const CMIUtilString m_constStrArgNumBytes;
-  unsigned char *m_pBufferMemory;
-  MIuint64 m_nAddrStart;
-  MIuint64 m_nAddrNumBytesToRead;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-read-memory".
-//--
-class CMICmdCmdDataReadMemory : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataReadMemory();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataReadMemory() override;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-list-register-names".
-//--
-class CMICmdCmdDataListRegisterNames : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataListRegisterNames();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataListRegisterNames() override;
-
-  // Methods:
-private:
-  lldb::SBValue GetRegister(const MIuint vRegisterIndex) const;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgRegNo; // Not handled by *this command
-  CMICmnMIValueList m_miValueList;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-list-register-values".
-//--
-class CMICmdCmdDataListRegisterValues : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataListRegisterValues();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataListRegisterValues() override;
-
-  // Methods:
-private:
-  lldb::SBValue GetRegister(const MIuint vRegisterIndex) const;
-  void AddToOutput(const MIuint vnIndex, const lldb::SBValue &vrValue,
-                   CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veVarFormat);
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgSkip; // Not handled by *this command
-  const CMIUtilString m_constStrArgFormat;
-  const CMIUtilString m_constStrArgRegNo;
-  CMICmnMIValueList m_miValueList;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-list-changed-registers".
-//--
-class CMICmdCmdDataListRegisterChanged : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataListRegisterChanged();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataListRegisterChanged() override;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-read-memory-bytes".
-//--
-class CMICmdCmdDataWriteMemoryBytes : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataWriteMemoryBytes();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataWriteMemoryBytes() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgAddr;
-  const CMIUtilString m_constStrArgContents;
-  const CMIUtilString m_constStrArgCount;
-  CMIUtilString m_strContents;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-read-memory".
-//          Not specified in MI spec but Eclipse gives *this command.
-//--
-class CMICmdCmdDataWriteMemory : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataWriteMemory();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataWriteMemory() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgOffset; // Not specified in MI spec but
-                                           // Eclipse gives this option.
-  const CMIUtilString m_constStrArgAddr; // Not specified in MI spec but Eclipse
-                                         // gives this option.
-  const CMIUtilString
-      m_constStrArgD; // Not specified in MI spec but Eclipse gives this option.
-  const CMIUtilString m_constStrArgNumber;   // Not specified in MI spec but
-                                             // Eclipse gives this option.
-  const CMIUtilString m_constStrArgContents; // Not specified in MI spec but
-                                             // Eclipse gives this option.
-  MIuint64 m_nAddr;
-  CMIUtilString m_strContents;
-  MIuint64 m_nCount;
-  unsigned char *m_pBufferMemory;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "data-info-line".
-//          See MIExtensions.txt for details.
-//--
-class CMICmdCmdDataInfoLine : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdDataInfoLine();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdDataInfoLine() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgLocation;
-  CMICmnMIResultRecord m_resultRecord;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdEnviro.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdEnviro.cpp
deleted file mode 100644
index e7a92f3..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdEnviro.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-//===-- MICmdCmdEnviro.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdEnvironmentCd          implementation.
-
-// In-house headers:
-#include "MICmdCmdEnviro.h"
-#include "MICmdArgValFile.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-
-//++
-// Details: CMICmdCmdEnvironmentCd constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdEnvironmentCd::CMICmdCmdEnvironmentCd()
-    : m_constStrArgNamePathDir("pathdir") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "environment-cd";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdEnvironmentCd::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdEnvironmentCd destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdEnvironmentCd::~CMICmdCmdEnvironmentCd() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdEnvironmentCd::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValFile(m_constStrArgNamePathDir, true, true));
-  CMICmdArgContext argCntxt(m_cmdData.strMiCmdOption);
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdEnvironmentCd::Execute() {
-  CMICMDBASE_GETOPTION(pArgPathDir, File, m_constStrArgNamePathDir);
-  const CMIUtilString &strWkDir(pArgPathDir->GetValue());
-  CMICmnLLDBDebugger &rDbg(CMICmnLLDBDebugger::Instance());
-  lldb::SBDebugger &rLldbDbg = rDbg.GetTheDebugger();
-  bool bOk = rLldbDbg.SetCurrentPlatformSDKRoot(strWkDir.c_str());
-  if (bOk) {
-    const CMIUtilString &rStrKeyWkDir(
-        m_rLLDBDebugSessionInfo.m_constStrSharedDataKeyWkDir);
-    if (!m_rLLDBDebugSessionInfo.SharedDataAdd<CMIUtilString>(rStrKeyWkDir,
-                                                              strWkDir)) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_ADD),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     rStrKeyWkDir.c_str()));
-      bOk = MIstatus::failure;
-    }
-  } else
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_FNFAILED),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   "SetCurrentPlatformSDKRoot()"));
-
-  lldb::SBTarget sbTarget = m_rLLDBDebugSessionInfo.GetTarget();
-  if (sbTarget.IsValid()) {
-    lldb::SBLaunchInfo sbLaunchInfo = sbTarget.GetLaunchInfo();
-    sbLaunchInfo.SetWorkingDirectory(strWkDir.c_str());
-    sbTarget.SetLaunchInfo(sbLaunchInfo);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdEnvironmentCd::Acknowledge() {
-  const CMIUtilString &rStrKeyWkDir(
-      m_rLLDBDebugSessionInfo.m_constStrSharedDataKeyWkDir);
-  CMIUtilString strWkDir;
-  const bool bOk = m_rLLDBDebugSessionInfo.SharedDataRetrieve<CMIUtilString>(
-      rStrKeyWkDir, strWkDir);
-  if (bOk) {
-    const CMICmnMIValueConst miValueConst(strWkDir);
-    const CMICmnMIValueResult miValueResult("path", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_SHARED_DATA_NOT_FOUND),
-                                 m_cmdData.strMiCmd.c_str(),
-                                 rStrKeyWkDir.c_str()));
-  return MIstatus::failure;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdEnvironmentCd::CreateSelf() {
-  return new CMICmdCmdEnvironmentCd();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdEnviro.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdEnviro.h
deleted file mode 100644
index 461ccd8..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdEnviro.h
+++ /dev/null
@@ -1,57 +0,0 @@
-//===-- MICmdCmdEnviro.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdEnvironmentCd          interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "environment-cd".
-//--
-class CMICmdCmdEnvironmentCd : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdEnvironmentCd();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdEnvironmentCd() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNamePathDir;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdExec.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdExec.cpp
deleted file mode 100644
index ffdf171..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdExec.cpp
+++ /dev/null
@@ -1,1115 +0,0 @@
-//===-- MICmdCmdExec.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdExecRun                implementation.
-//              CMICmdCmdExecContinue           implementation.
-//              CMICmdCmdExecNext               implementation.
-//              CMICmdCmdExecStep               implementation.
-//              CMICmdCmdExecNextInstruction    implementation.
-//              CMICmdCmdExecStepInstruction    implementation.
-//              CMICmdCmdExecFinish             implementation.
-//              CMICmdCmdExecInterrupt          implementation.
-//              CMICmdCmdExecArguments          implementation.
-//              CMICmdCmdExecAbort              implementation.
-
-// Third Party Headers:
-#include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBProcess.h"
-#include "lldb/API/SBStream.h"
-#include "lldb/API/SBThread.h"
-#include "lldb/lldb-enumerations.h"
-
-// In-house headers:
-#include "MICmdArgValListOfN.h"
-#include "MICmdArgValNumber.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValString.h"
-#include "MICmdArgValThreadGrp.h"
-#include "MICmdCmdExec.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnMIOutOfBandRecord.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnStreamStdout.h"
-#include "MIDriver.h"
-
-//++
-// Details: CMICmdCmdExecRun constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecRun::CMICmdCmdExecRun() : m_constStrArgStart("start") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-run";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecRun::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecRun destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecRun::~CMICmdCmdExecRun() {}
-
-//++
-// Details: The invoker requires this function. It parses the command line
-// options'
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecRun::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValOptionLong(
-      m_constStrArgStart, false, true,
-      CMICmdArgValListBase::eArgValType_OptionLong, 0));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecRun::Execute() {
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  {
-    // Check we have a valid target.
-    // Note: target created via 'file-exec-and-symbols' command.
-    lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
-    if (!sbTarget.IsValid() ||
-        sbTarget == rSessionInfo.GetDebugger().GetDummyTarget()) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
-                                     m_cmdData.strMiCmd.c_str()));
-      return MIstatus::failure;
-    }
-  }
-
-  lldb::SBError error;
-  lldb::SBStream errMsg;
-  lldb::SBLaunchInfo launchInfo = rSessionInfo.GetTarget().GetLaunchInfo();
-  launchInfo.SetListener(rSessionInfo.GetListener());
-
-  // Run to first instruction or main() requested?
-  CMICMDBASE_GETOPTION(pArgStart, OptionLong, m_constStrArgStart);
-  if (pArgStart->GetFound()) {
-    launchInfo.SetLaunchFlags(launchInfo.GetLaunchFlags() |
-                              lldb::eLaunchFlagStopAtEntry);
-  }
-
-  lldb::SBProcess process = rSessionInfo.GetTarget().Launch(launchInfo, error);
-  if (!process.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PROCESS),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   errMsg.GetData()));
-    return MIstatus::failure;
-  }
-
-  const auto successHandler = [this] {
-    if (!CMIDriver::Instance().SetDriverStateRunningDebugging()) {
-      const CMIUtilString &rErrMsg(CMIDriver::Instance().GetErrorDescription());
-      SetError(CMIUtilString::Format(
-          MIRSRC(IDS_CMD_ERR_SET_NEW_DRIVER_STATE),
-          m_cmdData.strMiCmd.c_str(), rErrMsg.c_str()));
-      return MIstatus::failure;
-    }
-    return MIstatus::success;
-  };
-
-  return HandleSBErrorWithSuccess(error, successHandler);
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-//          Called only if Execute() set status as successful on completion.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecRun::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running);
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::pid_t pid = rSessionInfo.GetProcess().GetProcessID();
-  // Give the client '=thread-group-started,id="i1" pid="xyz"'
-  m_bHasResultRecordExtra = true;
-  const CMICmnMIValueConst miValueConst2("i1");
-  const CMICmnMIValueResult miValueResult2("id", miValueConst2);
-  const CMIUtilString strPid(CMIUtilString::Format("%lld", pid));
-  const CMICmnMIValueConst miValueConst(strPid);
-  const CMICmnMIValueResult miValueResult("pid", miValueConst);
-  CMICmnMIOutOfBandRecord miOutOfBand(
-      CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted, miValueResult2);
-  miOutOfBand.Add(miValueResult);
-  m_miResultRecordExtra = miOutOfBand.GetString();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecRun::CreateSelf() { return new CMICmdCmdExecRun(); }
-
-
-//++
-// Details: CMICmdCmdExecContinue constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecContinue::CMICmdCmdExecContinue() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-continue";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecContinue::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecContinue destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecContinue::~CMICmdCmdExecContinue() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecContinue::Execute() {
-  const auto successHandler = [this] {
-    // CODETAG_DEBUG_SESSION_RUNNING_PROG_RECEIVED_SIGINT_PAUSE_PROGRAM
-    if (!CMIDriver::Instance().SetDriverStateRunningDebugging()) {
-      const CMIUtilString &rErrMsg(CMIDriver::Instance().GetErrorDescription());
-      SetError(CMIUtilString::Format(
-          MIRSRC(IDS_CMD_ERR_SET_NEW_DRIVER_STATE),
-          m_cmdData.strMiCmd.c_str(), rErrMsg.c_str()));
-      return MIstatus::failure;
-    }
-    return MIstatus::success;
-  };
-
-  return HandleSBErrorWithSuccess(
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess().Continue(),
-      successHandler);
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecContinue::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecContinue::CreateSelf() {
-  return new CMICmdCmdExecContinue();
-}
-
-
-//++
-// Details: CMICmdCmdExecNext constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecNext::CMICmdCmdExecNext() : m_constStrArgNumber("number") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-next";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecNext::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecNext destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecNext::~CMICmdCmdExecNext() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecNext::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, false, false));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecNext::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  lldb::SBError error;
-  if (nThreadId != UINT64_MAX) {
-    lldb::SBThread sbThread = rSessionInfo.GetProcess().GetThreadByIndexID(nThreadId);
-    if (!sbThread.IsValid()) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_INVALID),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgThread.c_str()));
-      return MIstatus::failure;
-    }
-    sbThread.StepOver(lldb::eOnlyDuringStepping, error);
-  } else
-    rSessionInfo.GetProcess().GetSelectedThread().StepOver(
-        lldb::eOnlyDuringStepping, error);
-
-  return HandleSBError(error);
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecNext::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecNext::CreateSelf() { return new CMICmdCmdExecNext(); }
-
-
-//++
-// Details: CMICmdCmdExecStep constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecStep::CMICmdCmdExecStep() : m_constStrArgNumber("number") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-step";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecStep::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecStep destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecStep::~CMICmdCmdExecStep() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecStep::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, false, false));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecStep::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  lldb::SBError error;
-  if (nThreadId != UINT64_MAX) {
-    lldb::SBThread sbThread =
-        rSessionInfo.GetProcess().GetThreadByIndexID(nThreadId);
-    if (!sbThread.IsValid()) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_INVALID),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgThread.c_str()));
-      return MIstatus::failure;
-    }
-    sbThread.StepInto(nullptr, LLDB_INVALID_LINE_NUMBER, error);
-  } else
-    rSessionInfo.GetProcess().GetSelectedThread().StepInto(
-        nullptr, LLDB_INVALID_LINE_NUMBER, error);
-
-  return HandleSBError(error);
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecStep::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecStep::CreateSelf() { return new CMICmdCmdExecStep(); }
-
-
-//++
-// Details: CMICmdCmdExecNextInstruction constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecNextInstruction::CMICmdCmdExecNextInstruction()
-    : m_constStrArgNumber("number") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-next-instruction";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecNextInstruction::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecNextInstruction destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecNextInstruction::~CMICmdCmdExecNextInstruction() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecNextInstruction::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, false, false));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecNextInstruction::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  lldb::SBError error;
-  if (nThreadId != UINT64_MAX) {
-    lldb::SBThread sbThread =
-        rSessionInfo.GetProcess().GetThreadByIndexID(nThreadId);
-    if (!sbThread.IsValid()) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_INVALID),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgThread.c_str()));
-      return MIstatus::failure;
-    }
-    sbThread.StepInstruction(true, error);
-  } else
-    rSessionInfo.GetProcess().GetSelectedThread().StepInstruction(
-        true, error);
-
-  return HandleSBError(error);
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecNextInstruction::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecNextInstruction::CreateSelf() {
-  return new CMICmdCmdExecNextInstruction();
-}
-
-
-//++
-// Details: CMICmdCmdExecStepInstruction constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecStepInstruction::CMICmdCmdExecStepInstruction()
-    : m_constStrArgNumber("number") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-step-instruction";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecStepInstruction::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecStepInstruction destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecStepInstruction::~CMICmdCmdExecStepInstruction() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecStepInstruction::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgNumber, false, false));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecStepInstruction::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  lldb::SBError error;
-  if (nThreadId != UINT64_MAX) {
-    lldb::SBThread sbThread =
-        rSessionInfo.GetProcess().GetThreadByIndexID(nThreadId);
-    if (!sbThread.IsValid()) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_INVALID),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgThread.c_str()));
-      return MIstatus::failure;
-    }
-    sbThread.StepInstruction(false, error);
-  } else
-    rSessionInfo.GetProcess().GetSelectedThread().StepInstruction(
-        false, error);
-
-  return HandleSBError(error);
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecStepInstruction::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecStepInstruction::CreateSelf() {
-  return new CMICmdCmdExecStepInstruction();
-}
-
-
-//++
-// Details: CMICmdCmdExecFinish constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecFinish::CMICmdCmdExecFinish() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-finish";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecFinish::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecFinish destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecFinish::~CMICmdCmdExecFinish() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecFinish::ParseArgs() { return ParseValidateCmdOptions(); }
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecFinish::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  lldb::SBError error;
-  if (nThreadId != UINT64_MAX) {
-    lldb::SBThread sbThread =
-        rSessionInfo.GetProcess().GetThreadByIndexID(nThreadId);
-    if (!sbThread.IsValid()) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_INVALID),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgThread.c_str()));
-      return MIstatus::failure;
-    }
-    sbThread.StepOut(error);
-  } else
-    rSessionInfo.GetProcess().GetSelectedThread().StepOut(error);
-
-  return HandleSBError(error);
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecFinish::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Running);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecFinish::CreateSelf() {
-  return new CMICmdCmdExecFinish();
-}
-
-
-//++
-// Details: CMICmdCmdExecInterrupt constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecInterrupt::CMICmdCmdExecInterrupt() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-interrupt";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecInterrupt::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecInterrupt destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecInterrupt::~CMICmdCmdExecInterrupt() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecInterrupt::Execute() {
-  const auto successHandler = [this] {
-    // CODETAG_DEBUG_SESSION_RUNNING_PROG_RECEIVED_SIGINT_PAUSE_PROGRAM
-    if (!CMIDriver::Instance().SetDriverStateRunningNotDebugging()) {
-      const CMIUtilString &rErrMsg(CMIDriver::Instance().GetErrorDescription());
-      SetErrorDescription(CMIUtilString::Format(
-          MIRSRC(IDS_CMD_ERR_SET_NEW_DRIVER_STATE),
-          m_cmdData.strMiCmd.c_str(),
-          rErrMsg.c_str()));
-      return MIstatus::failure;
-    }
-    return MIstatus::success;
-  };
-
-  return HandleSBErrorWithSuccess(
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess().Stop(),
-      successHandler);
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecInterrupt::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecInterrupt::CreateSelf() {
-  return new CMICmdCmdExecInterrupt();
-}
-
-
-//++
-// Details: CMICmdCmdExecArguments constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecArguments::CMICmdCmdExecArguments()
-    : m_constStrArgArguments("arguments") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-arguments";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecArguments::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecArguments destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecArguments::~CMICmdCmdExecArguments() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecArguments::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValListOfN(
-      m_constStrArgArguments, false, true,
-      CMICmdArgValListBase::eArgValType_StringAnything));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecArguments::Execute() {
-  CMICMDBASE_GETOPTION(pArgArguments, ListOfN, m_constStrArgArguments);
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
-  if (!sbTarget.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBLaunchInfo sbLaunchInfo = sbTarget.GetLaunchInfo();
-  sbLaunchInfo.SetArguments(nullptr, false);
-
-  CMIUtilString strArg;
-  size_t nArgIndex = 0;
-  while (pArgArguments->GetExpectedOption<CMICmdArgValString, CMIUtilString>(
-      strArg, nArgIndex)) {
-    const char *argv[2] = {strArg.c_str(), nullptr};
-    sbLaunchInfo.SetArguments(argv, true);
-    ++nArgIndex;
-  }
-
-  sbTarget.SetLaunchInfo(sbLaunchInfo);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecArguments::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecArguments::CreateSelf() {
-  return new CMICmdCmdExecArguments();
-}
-
-
-//++
-// Details: CMICmdCmdExecAbort constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecAbort::CMICmdCmdExecAbort() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "exec-abort";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdExecAbort::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdExecAbort destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdExecAbort::~CMICmdCmdExecAbort() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecAbort::Execute() {
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  if (!sbProcess.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PROCESS),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBError sbError = sbProcess.Destroy();
-  if (sbError.Fail()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_LLDBPROCESS_DESTROY),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   sbError.GetCString()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdExecAbort::Acknowledge() {
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdExecAbort::CreateSelf() {
-  return new CMICmdCmdExecAbort();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdExec.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdExec.h
deleted file mode 100644
index 8533915..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdExec.h
+++ /dev/null
@@ -1,316 +0,0 @@
-//===-- MICmdCmdExec.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdExecRun                interface.
-//              CMICmdCmdExecContinue           interface.
-//              CMICmdCmdExecNext               interface.
-//              CMICmdCmdExecStep               interface.
-//              CMICmdCmdExecNextInstruction    interface.
-//              CMICmdCmdExecStepInstruction    interface.
-//              CMICmdCmdExecFinish             interface.
-//              CMICmdCmdExecInterrupt          interface.
-//              CMICmdCmdExecArguments          interface.
-//              CMICmdCmdExecAbort              interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// Third party headers:
-// In-house headers:
-#include "MICmdBase.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-run".
-//--
-class CMICmdCmdExecRun : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecRun();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecRun() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgStart; // StopAtEntry - run to first
-                                          // instruction or main() if specified
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-continue".
-//--
-class CMICmdCmdExecContinue : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecContinue();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecContinue() override;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-next".
-//--
-class CMICmdCmdExecNext : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecNext();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecNext() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but
-                                           // Eclipse gives this option
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-step".
-//--
-class CMICmdCmdExecStep : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecStep();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecStep() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but
-                                           // Eclipse gives this option
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-next-instruction".
-//--
-class CMICmdCmdExecNextInstruction : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecNextInstruction();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecNextInstruction() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but
-                                           // Eclipse gives this option
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-step-instruction".
-//--
-class CMICmdCmdExecStepInstruction : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecStepInstruction();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecStepInstruction() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNumber; // Not specified in MI spec but
-                                           // Eclipse gives this option
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-finish".
-//--
-class CMICmdCmdExecFinish : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecFinish();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecFinish() override;
-};
-
-// CODETAG_DEBUG_SESSION_RUNNING_PROG_RECEIVED_SIGINT_PAUSE_PROGRAM
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-interrupt".
-// Gotchas: Using Eclipse this command is injected into the command system when
-// a
-//          SIGINT signal is received while running an inferior program.
-//--
-class CMICmdCmdExecInterrupt : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecInterrupt();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecInterrupt() override;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-arguments".
-//--
-class CMICmdCmdExecArguments : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecArguments();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecArguments() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgArguments;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "exec-abort".
-//--
-class CMICmdCmdExecAbort : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdExecAbort();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdExecAbort() override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdFile.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdFile.cpp
deleted file mode 100644
index 8b105eb..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdFile.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-//===-- MICmdCmdFile.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdFileExecAndSymbols     implementation.
-
-// Third Party Headers:
-#include "lldb/API/SBStream.h"
-
-// In-house headers:
-#include "MICmdArgValFile.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValString.h"
-#include "MICmdCmdFile.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnMIResultRecord.h"
-#include "MIUtilFileStd.h"
-
-//++
-// Details: CMICmdCmdFileExecAndSymbols constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdFileExecAndSymbols::CMICmdCmdFileExecAndSymbols()
-    : m_constStrArgNameFile("file"), m_constStrArgNamedPlatformName("p"),
-      m_constStrArgNamedRemotePath("r") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "file-exec-and-symbols";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdFileExecAndSymbols::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdFileExecAndSymbols destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdFileExecAndSymbols::~CMICmdCmdFileExecAndSymbols() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdFileExecAndSymbols::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValFile(m_constStrArgNameFile, true, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionShort(m_constStrArgNamedPlatformName, false, true,
-                                  CMICmdArgValListBase::eArgValType_String, 1));
-  m_setCmdArgs.Add(new CMICmdArgValOptionShort(
-      m_constStrArgNamedRemotePath, false, true,
-      CMICmdArgValListBase::eArgValType_StringQuotedNumberPath, 1));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-//          Synopsis: -file-exec-and-symbols file
-//          Ref:
-//          http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-File-Commands.html#GDB_002fMI-File-Commands
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdFileExecAndSymbols::Execute() {
-  CMICMDBASE_GETOPTION(pArgNamedFile, File, m_constStrArgNameFile);
-  CMICMDBASE_GETOPTION(pArgPlatformName, OptionShort,
-                       m_constStrArgNamedPlatformName);
-  CMICMDBASE_GETOPTION(pArgRemotePath, OptionShort,
-                       m_constStrArgNamedRemotePath);
-  CMICmdArgValFile *pArgFile = static_cast<CMICmdArgValFile *>(pArgNamedFile);
-  const CMIUtilString &strExeFilePath(pArgFile->GetValue());
-  bool bPlatformName = pArgPlatformName->GetFound();
-  CMIUtilString platformName;
-  if (bPlatformName) {
-    pArgPlatformName->GetExpectedOption<CMICmdArgValString, CMIUtilString>(
-        platformName);
-  }
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBDebugger &rDbgr = rSessionInfo.GetDebugger();
-  lldb::SBError error;
-  const char *pTargetTriple = nullptr; // Let LLDB discover the triple required
-  const char *pTargetPlatformName = platformName.c_str();
-  const bool bAddDepModules = false;
-  lldb::SBTarget target =
-      rDbgr.CreateTarget(strExeFilePath.c_str(), pTargetTriple,
-                         pTargetPlatformName, bAddDepModules, error);
-  CMIUtilString strWkDir;
-  const CMIUtilString &rStrKeyWkDir(rSessionInfo.m_constStrSharedDataKeyWkDir);
-  if (!rSessionInfo.SharedDataRetrieve<CMIUtilString>(rStrKeyWkDir, strWkDir)) {
-    strWkDir = CMIUtilFileStd::StripOffFileName(strExeFilePath);
-    if (!rSessionInfo.SharedDataAdd<CMIUtilString>(rStrKeyWkDir, strWkDir)) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_ADD),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     rStrKeyWkDir.c_str()));
-      return MIstatus::failure;
-    }
-  }
-  if (!rDbgr.SetCurrentPlatformSDKRoot(strWkDir.c_str())) {
-
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_FNFAILED),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   "SetCurrentPlatformSDKRoot()"));
-    return MIstatus::failure;
-  }
-  if (pArgRemotePath->GetFound()) {
-    CMIUtilString remotePath;
-    pArgRemotePath->GetExpectedOption<CMICmdArgValString, CMIUtilString>(
-        remotePath);
-    lldb::SBModule module = target.FindModule(target.GetExecutable());
-    if (module.IsValid()) {
-      module.SetPlatformFileSpec(lldb::SBFileSpec(remotePath.c_str()));
-    }
-  }
-  lldb::SBStream err;
-  if (error.Fail()) {
-    const bool bOk = error.GetDescription(err);
-    MIunused(bOk);
-  }
-  if (!target.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   strExeFilePath.c_str(), err.GetData()));
-    return MIstatus::failure;
-  }
-  if (error.Fail()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_CREATE_TARGET),
-                                   m_cmdData.strMiCmd.c_str(), err.GetData()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdFileExecAndSymbols::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdFileExecAndSymbols::CreateSelf() {
-  return new CMICmdCmdFileExecAndSymbols();
-}
-
-//++
-// Details: If the MI Driver is not operating via a client i.e. Eclipse but say
-// operating
-//          on a executable passed in as a argument to the drive then what
-//          should the driver
-//          do on a command failing? Either continue operating or exit the
-//          application.
-//          Override this function where a command failure cannot allow the
-//          driver to
-//          continue operating.
-// Type:    Overridden.
-// Args:    None.
-// Return:  bool - True = Fatal if command fails, false = can continue if
-// command fails.
-// Throws:  None.
-//--
-bool CMICmdCmdFileExecAndSymbols::GetExitAppOnCommandFailure() const {
-  return true;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdFile.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdFile.h
deleted file mode 100644
index 4607f74..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdFile.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//===-- MICmdCmdFile.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdFileExecAndSymbols     interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "file-exec-and-symbols".
-//          This command does not follow the MI documentation exactly.
-// Gotchas: This command has additional flags that were not available in GDB MI.
-//          See MIextensions.txt for details.
-//--
-class CMICmdCmdFileExecAndSymbols : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdFileExecAndSymbols();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdFileExecAndSymbols() override;
-  bool GetExitAppOnCommandFailure() const override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNameFile;
-  const CMIUtilString
-      m_constStrArgNamedPlatformName; // Added to support iOS platform selection
-  const CMIUtilString m_constStrArgNamedRemotePath; // Added to support iOS
-                                                    // device remote file
-                                                    // location
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp
deleted file mode 100644
index b351353..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbInfo.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-//===-- MICmdCmdGdbInfo.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbInfo        implementation.
-
-// Third party headers:
-#include "lldb/API/SBCommandReturnObject.h"
-#include <inttypes.h>
-
-// In-house headers:
-#include "MICmdArgValString.h"
-#include "MICmdCmdGdbInfo.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnStreamStdout.h"
-
-// Instantiations:
-const CMICmdCmdGdbInfo::MapPrintFnNameToPrintFn_t
-    CMICmdCmdGdbInfo::ms_mapPrintFnNameToPrintFn = {
-        {"sharedlibrary", &CMICmdCmdGdbInfo::PrintFnSharedLibrary}};
-
-//++
-// Details: CMICmdCmdGdbInfo constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbInfo::CMICmdCmdGdbInfo()
-    : m_constStrArgNamedPrint("print"), m_bPrintFnRecognised(true),
-      m_bPrintFnSuccessful(false),
-      m_strPrintFnError(MIRSRC(IDS_WORD_ERR_MSG_NOT_IMPLEMENTED_BRKTS)) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "info";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdGdbInfo::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdGdbInfo destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbInfo::~CMICmdCmdGdbInfo() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbInfo::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedPrint, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbInfo::Execute() {
-  CMICMDBASE_GETOPTION(pArgPrint, String, m_constStrArgNamedPrint);
-  const CMIUtilString &rPrintRequest(pArgPrint->GetValue());
-
-  FnPrintPtr pPrintRequestFn = nullptr;
-  if (!GetPrintFn(rPrintRequest, pPrintRequestFn)) {
-    m_strPrintFnName = rPrintRequest;
-    m_bPrintFnRecognised = false;
-    return MIstatus::success;
-  }
-
-  m_bPrintFnSuccessful = (this->*(pPrintRequestFn))();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbInfo::Acknowledge() {
-  if (!m_bPrintFnRecognised) {
-    const CMICmnMIValueConst miValueConst(CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_INFO_PRINTFN_NOT_FOUND), m_strPrintFnName.c_str()));
-    const CMICmnMIValueResult miValueResult("msg", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  if (m_bPrintFnSuccessful) {
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  const CMICmnMIValueConst miValueConst(CMIUtilString::Format(
-      MIRSRC(IDS_CMD_ERR_INFO_PRINTFN_FAILED), m_strPrintFnError.c_str()));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdGdbInfo::CreateSelf() { return new CMICmdCmdGdbInfo(); }
-
-//++
-// Details: Retrieve the print function's pointer for the matching print
-// request.
-// Type:    Method.
-// Args:    vrPrintFnName   - (R) The info requested.
-//          vrwpFn          - (W) The print function's pointer of the function
-//          to carry out
-// Return:  bool    - True = Print request is implemented, false = not found.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbInfo::GetPrintFn(const CMIUtilString &vrPrintFnName,
-                                  FnPrintPtr &vrwpFn) const {
-  vrwpFn = nullptr;
-
-  const MapPrintFnNameToPrintFn_t::const_iterator it =
-      ms_mapPrintFnNameToPrintFn.find(vrPrintFnName);
-  if (it != ms_mapPrintFnNameToPrintFn.end()) {
-    vrwpFn = (*it).second;
-    return true;
-  }
-
-  return false;
-}
-
-//++
-// Details: Carry out work to complete the request to prepare and send back
-// information
-//          asked for.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbInfo::PrintFnSharedLibrary() {
-  bool bOk = CMICmnStreamStdout::TextToStdout(
-      "~\"From        To          Syms Read   Shared Object Library\"");
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBTarget sbTarget = rSessionInfo.GetTarget();
-  const MIuint nModules = sbTarget.GetNumModules();
-  for (MIuint i = 0; bOk && (i < nModules); i++) {
-    lldb::SBModule module = sbTarget.GetModuleAtIndex(i);
-    if (module.IsValid()) {
-      const CMIUtilString strModuleFilePath(
-          module.GetFileSpec().GetDirectory());
-      const CMIUtilString strModuleFileName(module.GetFileSpec().GetFilename());
-      const CMIUtilString strModuleFullPath(CMIUtilString::Format(
-          "%s/%s", strModuleFilePath.c_str(), strModuleFileName.c_str()));
-      const CMIUtilString strHasSymbols =
-          (module.GetNumSymbols() > 0) ? "Yes" : "No";
-      lldb::addr_t addrLoadS = 0xffffffffffffffff;
-      lldb::addr_t addrLoadSize = 0;
-      bool bHaveAddrLoad = false;
-      const MIuint nSections = module.GetNumSections();
-      for (MIuint j = 0; j < nSections; j++) {
-        lldb::SBSection section = module.GetSectionAtIndex(j);
-        lldb::addr_t addrLoad = section.GetLoadAddress(sbTarget);
-        if (addrLoad != (lldb::addr_t)-1) {
-          if (!bHaveAddrLoad) {
-            bHaveAddrLoad = true;
-            addrLoadS = addrLoad;
-          }
-
-          addrLoadSize += section.GetByteSize();
-        }
-      }
-      bOk = bOk &&
-        CMICmnStreamStdout::TextToStdout(CMIUtilString::Format(
-                "~\"0x%016" PRIx64 "\t0x%016" PRIx64 "\t%s\t\t%s\"", addrLoadS,
-                addrLoadS + addrLoadSize, strHasSymbols.c_str(),
-                strModuleFullPath.c_str()));
-    }
-  }
-
-  return bOk;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbInfo.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbInfo.h
deleted file mode 100644
index 8ad69c4..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbInfo.h
+++ /dev/null
@@ -1,87 +0,0 @@
-//===-- MICmdCmdGdbInfo.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbInfo    interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// Third party headers:
-#include <map>
-
-// In-house headers:
-#include "MICmdBase.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements GDB command "info".
-//          The design of matching the info request to a request action (or
-//          command) is very simple. The request function which carries out
-//          the task of information gathering and printing to stdout is part of
-//          *this class. Should the request function become more complicated
-//          then
-//          that request should really reside in a command type class. Then this
-//          class instantiates a request info command for a matching request.
-//          The
-//          design/code of *this class then does not then become bloated. Use a
-//          lightweight version of the current MI command system.
-//--
-class CMICmdCmdGdbInfo : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdGdbInfo();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdGdbInfo() override;
-
-  // Typedefs:
-private:
-  typedef bool (CMICmdCmdGdbInfo::*FnPrintPtr)();
-  typedef std::map<CMIUtilString, FnPrintPtr> MapPrintFnNameToPrintFn_t;
-
-  // Methods:
-private:
-  bool GetPrintFn(const CMIUtilString &vrPrintFnName, FnPrintPtr &vrwpFn) const;
-  bool PrintFnSharedLibrary();
-
-  // Attributes:
-private:
-  const static MapPrintFnNameToPrintFn_t ms_mapPrintFnNameToPrintFn;
-  //
-  const CMIUtilString m_constStrArgNamedPrint;
-  bool m_bPrintFnRecognised; // True = This command has a function with a name
-                             // that matches the Print argument, false = not
-                             // found
-  bool m_bPrintFnSuccessful; // True = The print function completed its task ok,
-                             // false = function failed for some reason
-  CMIUtilString m_strPrintFnName;
-  CMIUtilString m_strPrintFnError;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp
deleted file mode 100644
index 162e3d5..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbSet.cpp
+++ /dev/null
@@ -1,491 +0,0 @@
-//===-- MICmdCmdGdbSet.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbSet implementation.
-
-// In-house headers:
-#include "MICmdCmdGdbSet.h"
-#include "MICmdArgValListOfN.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValString.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-
-// Instantiations:
-const CMICmdCmdGdbSet::MapGdbOptionNameToFnGdbOptionPtr_t
-    CMICmdCmdGdbSet::ms_mapGdbOptionNameToFnGdbOptionPtr = {
-        {"target-async", &CMICmdCmdGdbSet::OptionFnTargetAsync},
-        {"print", &CMICmdCmdGdbSet::OptionFnPrint},
-        // { "auto-solib-add", &CMICmdCmdGdbSet::OptionFnAutoSolibAdd },    //
-        // Example code if need to implement GDB set other options
-        {"output-radix", &CMICmdCmdGdbSet::OptionFnOutputRadix},
-        {"solib-search-path", &CMICmdCmdGdbSet::OptionFnSolibSearchPath},
-        {"disassembly-flavor", &CMICmdCmdGdbSet::OptionFnDisassemblyFlavor},
-        {"fallback", &CMICmdCmdGdbSet::OptionFnFallback},
-        {"breakpoint", &CMICmdCmdGdbSet::OptionFnBreakpoint}};
-
-//++
-// Details: CMICmdCmdGdbSet constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbSet::CMICmdCmdGdbSet()
-    : m_constStrArgNamedGdbOption("option"), m_bGdbOptionRecognised(true),
-      m_bGdbOptionFnSuccessful(false), m_bGbbOptionFnHasError(false),
-      m_strGdbOptionFnError(MIRSRC(IDS_WORD_ERR_MSG_NOT_IMPLEMENTED_BRKTS)) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "gdb-set";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdGdbSet::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdGdbSet destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbSet::~CMICmdCmdGdbSet() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValListOfN(
-      m_constStrArgNamedGdbOption, true, true,
-      CMICmdArgValListBase::eArgValType_StringAnything));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command is executed in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::Execute() {
-  CMICMDBASE_GETOPTION(pArgGdbOption, ListOfN, m_constStrArgNamedGdbOption);
-  const CMICmdArgValListBase::VecArgObjPtr_t &rVecWords(
-      pArgGdbOption->GetExpectedOptions());
-
-  // Get the gdb-set option to carry out. This option will be used as an action
-  // which should be done. Further arguments will be used as parameters for it.
-  CMICmdArgValListBase::VecArgObjPtr_t::const_iterator it = rVecWords.begin();
-  const CMICmdArgValString *pOption =
-      static_cast<const CMICmdArgValString *>(*it);
-  const CMIUtilString strOption(pOption->GetValue());
-  ++it;
-
-  // Retrieve the parameter(s) for the option
-  CMIUtilString::VecString_t vecWords;
-  while (it != rVecWords.end()) {
-    const CMICmdArgValString *pWord =
-        static_cast<const CMICmdArgValString *>(*it);
-    vecWords.push_back(pWord->GetValue());
-
-    // Next
-    ++it;
-  }
-
-  FnGdbOptionPtr pPrintRequestFn = nullptr;
-  if (!GetOptionFn(strOption, pPrintRequestFn)) {
-    // For unimplemented option handlers, fallback on a generic handler
-    // ToDo: Remove this when ALL options have been implemented
-    if (!GetOptionFn("fallback", pPrintRequestFn)) {
-      m_bGdbOptionRecognised = false;
-      m_strGdbOptionName = "fallback"; // This would be the strOption name
-      return MIstatus::success;
-    }
-  }
-
-  m_bGdbOptionFnSuccessful = (this->*(pPrintRequestFn))(vecWords);
-  if (!m_bGdbOptionFnSuccessful && !m_bGbbOptionFnHasError)
-    return MIstatus::failure;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute() method.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::Acknowledge() {
-  // Print error if option isn't recognized:
-  // ^error,msg="The request '%s' was not recognized, not implemented"
-  if (!m_bGdbOptionRecognised) {
-    const CMICmnMIValueConst miValueConst(
-        CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INFO_PRINTFN_NOT_FOUND),
-                              m_strGdbOptionName.c_str()));
-    const CMICmnMIValueResult miValueResult("msg", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  // ^done,value="%s"
-  if (m_bGdbOptionFnSuccessful) {
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  // Print error if request failed:
-  // ^error,msg="The request '%s' failed.
-  const CMICmnMIValueConst miValueConst(CMIUtilString::Format(
-      MIRSRC(IDS_CMD_ERR_INFO_PRINTFN_FAILED), m_strGdbOptionFnError.c_str()));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdGdbSet::CreateSelf() { return new CMICmdCmdGdbSet(); }
-
-//++
-// Details: Retrieve the print function's pointer for the matching print
-// request.
-// Type:    Method.
-// Args:    vrPrintFnName   - (R) The info requested.
-//          vrwpFn          - (W) The print function's pointer of the function
-//          to carry out
-// Return:  bool    - True = Print request is implemented, false = not found.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::GetOptionFn(const CMIUtilString &vrPrintFnName,
-                                  FnGdbOptionPtr &vrwpFn) const {
-  vrwpFn = nullptr;
-
-  const MapGdbOptionNameToFnGdbOptionPtr_t::const_iterator it =
-      ms_mapGdbOptionNameToFnGdbOptionPtr.find(vrPrintFnName);
-  if (it != ms_mapGdbOptionNameToFnGdbOptionPtr.end()) {
-    vrwpFn = (*it).second;
-    return true;
-  }
-
-  return false;
-}
-
-//++
-// Details: Carry out work to complete the GDB set option 'target-async' to
-// prepare
-//          and send back information asked for.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::OptionFnTargetAsync(
-    const CMIUtilString::VecString_t &vrWords) {
-  bool bAsyncMode = false;
-  bool bOk = true;
-
-  if (vrWords.size() > 1)
-    // Too many arguments.
-    bOk = false;
-  else if (vrWords.size() == 0)
-    // If no arguments, default is "on".
-    bAsyncMode = true;
-  else if (CMIUtilString::Compare(vrWords[0], "on"))
-    bAsyncMode = true;
-  else if (CMIUtilString::Compare(vrWords[0], "off"))
-    bAsyncMode = false;
-  else
-    // Unrecognized argument.
-    bOk = false;
-
-  if (!bOk) {
-    // Report error.
-    m_bGbbOptionFnHasError = true;
-    m_strGdbOptionFnError = MIRSRC(IDS_CMD_ERR_GDBSET_OPT_TARGETASYNC);
-    return MIstatus::failure;
-  }
-
-  // Turn async mode on/off.
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  rSessionInfo.GetDebugger().SetAsync(bAsyncMode);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB set option
-// 'print-char-array-as-string' to
-//          prepare and send back information asked for.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::OptionFnPrint(const CMIUtilString::VecString_t &vrWords) {
-  const bool bAllArgs(vrWords.size() == 2);
-  const bool bArgOn(bAllArgs && (CMIUtilString::Compare(vrWords[1], "on") ||
-                                 CMIUtilString::Compare(vrWords[1], "1")));
-  const bool bArgOff(bAllArgs && (CMIUtilString::Compare(vrWords[1], "off") ||
-                                  CMIUtilString::Compare(vrWords[1], "0")));
-  if (!bAllArgs || (!bArgOn && !bArgOff)) {
-    m_bGbbOptionFnHasError = true;
-    m_strGdbOptionFnError = MIRSRC(IDS_CMD_ERR_GDBSET_OPT_PRINT_BAD_ARGS);
-    return MIstatus::failure;
-  }
-
-  const CMIUtilString strOption(vrWords[0]);
-  CMIUtilString strOptionKey;
-  if (CMIUtilString::Compare(strOption, "char-array-as-string"))
-    strOptionKey = m_rLLDBDebugSessionInfo.m_constStrPrintCharArrayAsString;
-  else if (CMIUtilString::Compare(strOption, "expand-aggregates"))
-    strOptionKey = m_rLLDBDebugSessionInfo.m_constStrPrintExpandAggregates;
-  else if (CMIUtilString::Compare(strOption, "aggregate-field-names"))
-    strOptionKey = m_rLLDBDebugSessionInfo.m_constStrPrintAggregateFieldNames;
-  else {
-    m_bGbbOptionFnHasError = true;
-    m_strGdbOptionFnError = CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_GDBSET_OPT_PRINT_UNKNOWN_OPTION), strOption.c_str());
-    return MIstatus::failure;
-  }
-
-  const bool bOptionValue(bArgOn);
-  if (!m_rLLDBDebugSessionInfo.SharedDataAdd<bool>(strOptionKey,
-                                                   bOptionValue)) {
-    m_bGbbOptionFnHasError = false;
-    SetError(CMIUtilString::Format(MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_ADD),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   strOptionKey.c_str()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB set option 'solib-search-path' to
-// prepare
-//          and send back information asked for.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::OptionFnSolibSearchPath(
-    const CMIUtilString::VecString_t &vrWords) {
-  // Check we have at least one argument
-  if (vrWords.size() < 1) {
-    m_bGbbOptionFnHasError = true;
-    m_strGdbOptionFnError = MIRSRC(IDS_CMD_ERR_GDBSET_OPT_SOLIBSEARCHPATH);
-    return MIstatus::failure;
-  }
-  const CMIUtilString &rStrValSolibPath(vrWords[0]);
-
-  // Add 'solib-search-path' to the shared data list
-  const CMIUtilString &rStrKeySolibPath(
-      m_rLLDBDebugSessionInfo.m_constStrSharedDataSolibPath);
-  if (!m_rLLDBDebugSessionInfo.SharedDataAdd<CMIUtilString>(rStrKeySolibPath,
-                                                            rStrValSolibPath)) {
-    m_bGbbOptionFnHasError = false;
-    SetError(CMIUtilString::Format(MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_ADD),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rStrKeySolibPath.c_str()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB set option 'output-radix' to
-// prepare
-//          and send back information asked for.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::OptionFnOutputRadix(
-    const CMIUtilString::VecString_t &vrWords) {
-  // Check we have at least one argument
-  if (vrWords.size() < 1) {
-    m_bGbbOptionFnHasError = true;
-    m_strGdbOptionFnError = MIRSRC(IDS_CMD_ERR_GDBSET_OPT_SOLIBSEARCHPATH);
-    return MIstatus::failure;
-  }
-  const CMIUtilString &rStrValOutputRadix(vrWords[0]);
-
-  CMICmnLLDBDebugSessionInfoVarObj::varFormat_e format =
-      CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Invalid;
-  MIint64 radix;
-  if (rStrValOutputRadix.ExtractNumber(radix)) {
-    switch (radix) {
-    case 8:
-      format = CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Octal;
-      break;
-    case 10:
-      format = CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Natural;
-      break;
-    case 16:
-      format = CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Hex;
-      break;
-    default:
-      format = CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Invalid;
-      break;
-    }
-  }
-  if (format == CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Invalid) {
-    m_bGbbOptionFnHasError = false;
-    SetError(CMIUtilString::Format(MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_ADD),
-                                   m_cmdData.strMiCmd.c_str(), "Output Radix"));
-    return MIstatus::failure;
-  }
-  CMICmnLLDBDebugSessionInfoVarObj::VarObjSetFormat(format);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB set option 'disassembly-flavor'
-// to prepare
-//          and send back information asked for.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::OptionFnDisassemblyFlavor(
-    const CMIUtilString::VecString_t &vrWords) {
-  // Check we have at least one argument
-  if (vrWords.size() < 1) {
-    m_bGbbOptionFnHasError = true;
-    // m_strGdbOptionFnError = MIRSRC(IDS_CMD_ERR_GDBSET_OPT_SOLIBSEARCHPATH);
-    return MIstatus::failure;
-  }
-  const CMIUtilString &rStrValDisasmFlavor(vrWords[0]);
-
-  lldb::SBDebugger &rDbgr = m_rLLDBDebugSessionInfo.GetDebugger();
-  lldb::SBError error = lldb::SBDebugger::SetInternalVariable(
-      "target.x86-disassembly-flavor", rStrValDisasmFlavor.c_str(),
-      rDbgr.GetInstanceName());
-  if (error.Fail()) {
-    m_strGdbOptionFnError = error.GetCString();
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB set option 'breakpoint' to
-// prepare
-//          and send back information asked for.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::OptionFnBreakpoint(
-    const CMIUtilString::VecString_t &vrWords) {
-  bool bPending = false;
-  bool bOk = true;
-
-  if (vrWords.size() != 2)
-    // Wrong number of arguments.
-    bOk = false;
-  else if (CMIUtilString::Compare(vrWords[0], "pending") &&
-           (CMIUtilString::Compare(vrWords[1], "on") ||
-            CMIUtilString::Compare(vrWords[1], "1")))
-    bPending = true;
-  else if (CMIUtilString::Compare(vrWords[0], "pending") &&
-           (CMIUtilString::Compare(vrWords[1], "off") ||
-            CMIUtilString::Compare(vrWords[1], "0")))
-    bPending = false;
-  else
-    // Unrecognized argument(s).
-    bOk = false;
-
-  if (!bOk) {
-    // Report error.
-    m_bGbbOptionFnHasError = false;
-    SetError(MIRSRC(IDS_CMD_ERR_GDBSET_OPT_BREAKPOINT));
-    return MIstatus::failure;
-  }
-
-  CMIUtilString sPendingVal = bPending ? "on" : "off";
-  CMIUtilString sKey = "breakpoint.pending";
-  if (!m_rLLDBDebugSessionInfo.SharedDataAdd(sKey, sPendingVal)) {
-    m_bGbbOptionFnHasError = false;
-    SetError(CMIUtilString::Format(MIRSRC(IDS_DBGSESSION_ERR_SHARED_DATA_ADD),
-                                   m_cmdData.strMiCmd.c_str(), sKey.c_str()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB set option to prepare and send
-// back the
-//          requested information.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbSet::OptionFnFallback(
-    const CMIUtilString::VecString_t &vrWords) {
-  MIunused(vrWords);
-
-  // Do nothing - intentional. This is a fallback function to do nothing.
-  // This allows the search for gdb-set options to always succeed when the
-  // option is not
-  // found (implemented).
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbSet.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbSet.h
deleted file mode 100644
index c88f997..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbSet.h
+++ /dev/null
@@ -1,101 +0,0 @@
-//===-- MICmdCmdGdbSet.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbSet interface.
-//
-//              To implement new MI commands, derive a new command class from
-//              the command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "gdb-set".
-//          This command does not follow the MI documentation exactly. While
-//          *this
-//          command is implemented it does not do anything with the gdb-set
-//          variable past in.
-//          The design of matching the info request to a request action (or
-//          command) is very simple. The request function which carries out
-//          the task of information gathering and printing to stdout is part of
-//          *this class. Should the request function become more complicated
-//          then
-//          that request should really reside in a command type class. Then this
-//          class instantiates a request info command for a matching request.
-//          The
-//          design/code of *this class then does not then become bloated. Use a
-//          lightweight version of the current MI command system.
-//--
-class CMICmdCmdGdbSet : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdGdbSet();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdGdbSet() override;
-
-  // Typedefs:
-private:
-  typedef bool (CMICmdCmdGdbSet::*FnGdbOptionPtr)(
-      const CMIUtilString::VecString_t &vrWords);
-  typedef std::map<CMIUtilString, FnGdbOptionPtr>
-      MapGdbOptionNameToFnGdbOptionPtr_t;
-
-  // Methods:
-private:
-  bool GetOptionFn(const CMIUtilString &vrGdbOptionName,
-                   FnGdbOptionPtr &vrwpFn) const;
-  bool OptionFnTargetAsync(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnPrint(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnSolibSearchPath(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnOutputRadix(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnDisassemblyFlavor(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnBreakpoint(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnFallback(const CMIUtilString::VecString_t &vrWords);
-
-  // Attributes:
-private:
-  const static MapGdbOptionNameToFnGdbOptionPtr_t
-      ms_mapGdbOptionNameToFnGdbOptionPtr;
-  //
-  const CMIUtilString m_constStrArgNamedGdbOption;
-  bool m_bGdbOptionRecognised; // True = This command has a function with a name
-                               // that matches the Print argument, false = not
-                               // found
-  bool m_bGdbOptionFnSuccessful; // True = The print function completed its task
-                                 // ok, false = function failed for some reason
-  bool m_bGbbOptionFnHasError;   // True = The option function has an error
-                                 // condition (not the command!), false = option
-                                 // function ok.
-  CMIUtilString m_strGdbOptionName;
-  CMIUtilString m_strGdbOptionFnError;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbShow.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbShow.cpp
deleted file mode 100644
index 9ebd362..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbShow.cpp
+++ /dev/null
@@ -1,395 +0,0 @@
-//===-- MICmdCmdGdbShow.cpp -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbShow implementation.
-
-// Third party headers:
-#include "lldb/API/SBCompileUnit.h"
-#include "lldb/API/SBFrame.h"
-#include "lldb/API/SBLanguageRuntime.h"
-#include "lldb/API/SBStringList.h"
-#include "lldb/API/SBThread.h"
-
-// In-house headers:
-#include "MICmdArgValListOfN.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValString.h"
-#include "MICmdCmdGdbShow.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-
-// Instantiations:
-const CMICmdCmdGdbShow::MapGdbOptionNameToFnGdbOptionPtr_t
-    CMICmdCmdGdbShow::ms_mapGdbOptionNameToFnGdbOptionPtr = {
-        {"target-async", &CMICmdCmdGdbShow::OptionFnTargetAsync},
-        {"print", &CMICmdCmdGdbShow::OptionFnPrint},
-        {"language", &CMICmdCmdGdbShow::OptionFnLanguage},
-        {"disassembly-flavor", &CMICmdCmdGdbShow::OptionFnDisassemblyFlavor},
-        {"fallback", &CMICmdCmdGdbShow::OptionFnFallback},
-        {"breakpoint", &CMICmdCmdGdbShow::OptionFnBreakpoint}};
-
-//++
-// Details: CMICmdCmdGdbShow constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbShow::CMICmdCmdGdbShow()
-    : m_constStrArgNamedGdbOption("option"), m_bGdbOptionRecognised(true),
-      m_bGdbOptionFnSuccessful(false), m_bGbbOptionFnHasError(false),
-      m_strGdbOptionFnError(MIRSRC(IDS_WORD_ERR_MSG_NOT_IMPLEMENTED_BRKTS)) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "gdb-show";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdGdbShow::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdGdbShow destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbShow::~CMICmdCmdGdbShow() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValListOfN(
-      m_constStrArgNamedGdbOption, true, true,
-      CMICmdArgValListBase::eArgValType_StringAnything));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command is executed in this
-// function.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::Execute() {
-  CMICMDBASE_GETOPTION(pArgGdbOption, ListOfN, m_constStrArgNamedGdbOption);
-  const CMICmdArgValListBase::VecArgObjPtr_t &rVecWords(
-      pArgGdbOption->GetExpectedOptions());
-
-  // Get the gdb-show option to carry out. This option will be used as an action
-  // which should be done. Further arguments will be used as parameters for it.
-  CMICmdArgValListBase::VecArgObjPtr_t::const_iterator it = rVecWords.begin();
-  const CMICmdArgValString *pOption =
-      static_cast<const CMICmdArgValString *>(*it);
-  const CMIUtilString strOption(pOption->GetValue());
-  ++it;
-
-  // Retrieve the parameter(s) for the option
-  CMIUtilString::VecString_t vecWords;
-  while (it != rVecWords.end()) {
-    const CMICmdArgValString *pWord =
-        static_cast<const CMICmdArgValString *>(*it);
-    vecWords.push_back(pWord->GetValue());
-
-    // Next
-    ++it;
-  }
-
-  FnGdbOptionPtr pPrintRequestFn = nullptr;
-  if (!GetOptionFn(strOption, pPrintRequestFn)) {
-    // For unimplemented option handlers, fallback to a generic handler
-    // ToDo: Remove this when ALL options have been implemented
-    if (!GetOptionFn("fallback", pPrintRequestFn)) {
-      m_bGdbOptionRecognised = false;
-      m_strGdbOptionName = "fallback"; // This would be the strOption name
-      return MIstatus::success;
-    }
-  }
-
-  m_bGdbOptionFnSuccessful = (this->*(pPrintRequestFn))(vecWords);
-  if (!m_bGdbOptionFnSuccessful && !m_bGbbOptionFnHasError)
-    return MIstatus::failure;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute() method.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::Acknowledge() {
-  // Print error if option isn't recognized:
-  // ^error,msg="The request '%s' was not recognized, not implemented"
-  if (!m_bGdbOptionRecognised) {
-    const CMICmnMIValueConst miValueConst(
-        CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INFO_PRINTFN_NOT_FOUND),
-                              m_strGdbOptionName.c_str()));
-    const CMICmnMIValueResult miValueResult("msg", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  // ^done,value="%s"
-  if (m_bGdbOptionFnSuccessful && !m_strValue.empty()) {
-    const CMICmnMIValueConst miValueConst(m_strValue);
-    const CMICmnMIValueResult miValueResult("value", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  } else if (m_bGdbOptionFnSuccessful) {
-    // Ignore empty value (for fallback)
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  // Print error if request failed:
-  // ^error,msg="The request '%s' failed.
-  const CMICmnMIValueConst miValueConst(CMIUtilString::Format(
-      MIRSRC(IDS_CMD_ERR_INFO_PRINTFN_FAILED), m_strGdbOptionFnError.c_str()));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdGdbShow::CreateSelf() { return new CMICmdCmdGdbShow(); }
-
-//++
-// Details: Retrieve the print function's pointer for the matching print
-// request.
-// Type:    Method.
-// Args:    vrPrintFnName   - (R) The info requested.
-//          vrwpFn          - (W) The print function's pointer of the function
-//          to carry out
-// Return:  bool    - True = Print request is implemented, false = not found.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::GetOptionFn(const CMIUtilString &vrPrintFnName,
-                                   FnGdbOptionPtr &vrwpFn) const {
-  vrwpFn = nullptr;
-
-  const MapGdbOptionNameToFnGdbOptionPtr_t::const_iterator it =
-      ms_mapGdbOptionNameToFnGdbOptionPtr.find(vrPrintFnName);
-  if (it != ms_mapGdbOptionNameToFnGdbOptionPtr.end()) {
-    vrwpFn = (*it).second;
-    return true;
-  }
-
-  return false;
-}
-
-//++
-// Details: Carry out work to complete the GDB show option 'target-async' to
-// prepare
-//          and send back the requested information.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::OptionFnTargetAsync(
-    const CMIUtilString::VecString_t &vrWords) {
-  MIunused(vrWords);
-
-  // Get async mode
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  const bool bAsyncMode = rSessionInfo.GetDebugger().GetAsync();
-
-  m_strValue = bAsyncMode ? "on" : "off";
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB show option 'print' to prepare
-// and send
-//          back the requested information.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::OptionFnPrint(
-    const CMIUtilString::VecString_t &vrWords) {
-  const bool bAllArgs(vrWords.size() == 1);
-  if (!bAllArgs) {
-    m_bGbbOptionFnHasError = true;
-    m_strGdbOptionFnError = MIRSRC(IDS_CMD_ERR_GDBSHOW_OPT_PRINT_BAD_ARGS);
-    return MIstatus::failure;
-  }
-
-  const CMIUtilString strOption(vrWords[0]);
-  CMIUtilString strOptionKey;
-  bool bOptionValueDefault = false;
-  if (CMIUtilString::Compare(strOption, "char-array-as-string"))
-    strOptionKey = m_rLLDBDebugSessionInfo.m_constStrPrintCharArrayAsString;
-  else if (CMIUtilString::Compare(strOption, "expand-aggregates"))
-    strOptionKey = m_rLLDBDebugSessionInfo.m_constStrPrintExpandAggregates;
-  else if (CMIUtilString::Compare(strOption, "aggregate-field-names")) {
-    strOptionKey = m_rLLDBDebugSessionInfo.m_constStrPrintAggregateFieldNames;
-    bOptionValueDefault = true;
-  } else {
-    m_bGbbOptionFnHasError = true;
-    m_strGdbOptionFnError = CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_GDBSHOW_OPT_PRINT_UNKNOWN_OPTION),
-        strOption.c_str());
-    return MIstatus::failure;
-  }
-
-  bool bOptionValue = false;
-  bOptionValue = bOptionValueDefault
-                     ? !m_rLLDBDebugSessionInfo.SharedDataRetrieve<bool>(
-                           strOptionKey, bOptionValue) ||
-                           bOptionValue
-                     : m_rLLDBDebugSessionInfo.SharedDataRetrieve<bool>(
-                           strOptionKey, bOptionValue) &&
-                           bOptionValue;
-
-  m_strValue = bOptionValue ? "on" : "off";
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB show option 'language' to prepare
-//          and send back the requested information.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::OptionFnLanguage(
-    const CMIUtilString::VecString_t &vrWords) {
-  MIunused(vrWords);
-
-  // Get current language
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBThread sbThread = rSessionInfo.GetProcess().GetSelectedThread();
-  const lldb::SBFrame sbFrame = sbThread.GetSelectedFrame();
-  lldb::SBCompileUnit sbCompileUnit = sbFrame.GetCompileUnit();
-  const lldb::LanguageType eLanguageType = sbCompileUnit.GetLanguage();
-
-  m_strValue = lldb::SBLanguageRuntime::GetNameForLanguageType(eLanguageType);
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB show option 'disassembly-flavor' to prepare
-//          and send back the requested information.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::OptionFnDisassemblyFlavor(const CMIUtilString::VecString_t &vrWords) {
-  MIunused(vrWords);
-
-  // Get current disassembly flavor
-  lldb::SBDebugger &rDbgr = m_rLLDBDebugSessionInfo.GetDebugger();
-  m_strValue = lldb::SBDebugger::GetInternalVariableValue("target.x86-disassembly-flavor",
-                                                          rDbgr.GetInstanceName()).GetStringAtIndex(0);
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB show option 'breakpoint' to
-// prepare
-//          and send back the requested information.
-// Type:    Method.
-// Args:    vrWords - (R) List of additional parameters used by this option.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::OptionFnBreakpoint(
-    const CMIUtilString::VecString_t &vrWords) {
-  if (vrWords.size() != 1) {
-    m_bGbbOptionFnHasError = true;
-    m_strGdbOptionFnError = MIRSRC(IDS_CMD_ERR_GDBSHOW_OPT_BREAKPOINT_BAD_ARGS);
-    return MIstatus::failure;
-  }
-
-  const CMIUtilString strOption(vrWords[0]);
-  if (!CMIUtilString::Compare(strOption, "pending")) {
-    m_bGbbOptionFnHasError = true;
-    m_strGdbOptionFnError = CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_GDBSHOW_OPT_BREAKPOINT_UNKNOWN_OPTION),
-        strOption.c_str());
-    return MIstatus::failure;
-  }
-
-  if (!m_rLLDBDebugSessionInfo.SharedDataRetrieve("breakpoint.pending",
-                                                  m_strValue)) {
-    if (m_strValue.empty())
-      m_strValue = "off";
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Carry out work to complete the GDB show option to prepare and send
-// back the
-//          requested information.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbShow::OptionFnFallback(
-    const CMIUtilString::VecString_t &vrWords) {
-  MIunused(vrWords);
-
-  // Do nothing - intentional. This is a fallback function to do nothing.
-  // This allows the search for gdb-show options to always succeed when the
-  // option is not
-  // found (implemented).
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbShow.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbShow.h
deleted file mode 100644
index 9de034c..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbShow.h
+++ /dev/null
@@ -1,101 +0,0 @@
-//===-- MICmdCmdGdbShow.h ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbShow interface.
-//
-//              To implement new MI commands, derive a new command class from
-//              the command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "gdb-show".
-//          This command does not follow the MI documentation exactly. While
-//          *this
-//          command is implemented it does not do anything with the gdb-set
-//          variable past in.
-//          The design of matching the info request to a request action (or
-//          command) is very simple. The request function which carries out
-//          the task of information gathering and printing to stdout is part of
-//          *this class. Should the request function become more complicated
-//          then
-//          that request should really reside in a command type class. Then this
-//          class instantiates a request info command for a matching request.
-//          The
-//          design/code of *this class then does not then become bloated. Use a
-//          lightweight version of the current MI command system.
-//--
-class CMICmdCmdGdbShow : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdGdbShow();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdGdbShow() override;
-
-  // Typedefs:
-private:
-  typedef bool (CMICmdCmdGdbShow::*FnGdbOptionPtr)(
-      const CMIUtilString::VecString_t &vrWords);
-  typedef std::map<CMIUtilString, FnGdbOptionPtr>
-      MapGdbOptionNameToFnGdbOptionPtr_t;
-
-  // Methods:
-private:
-  bool GetOptionFn(const CMIUtilString &vrGdbOptionName,
-                   FnGdbOptionPtr &vrwpFn) const;
-  bool OptionFnTargetAsync(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnPrint(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnLanguage(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnDisassemblyFlavor(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnFallback(const CMIUtilString::VecString_t &vrWords);
-  bool OptionFnBreakpoint(const CMIUtilString::VecString_t &vrWords);
-
-  // Attributes:
-private:
-  const static MapGdbOptionNameToFnGdbOptionPtr_t
-      ms_mapGdbOptionNameToFnGdbOptionPtr;
-
-  const CMIUtilString m_constStrArgNamedGdbOption;
-  bool m_bGdbOptionRecognised; // True = This command has a function with a name
-                               // that matches the Print argument, false = not
-                               // found
-  bool m_bGdbOptionFnSuccessful; // True = The print function completed its task
-                                 // ok, false = function failed for some reason
-  bool m_bGbbOptionFnHasError;   // True = The option function has an error
-                                 // condition (not the command!), false = option
-                                 // function ok.
-  CMIUtilString m_strGdbOptionName;
-  CMIUtilString m_strGdbOptionFnError;
-  CMIUtilString m_strValue;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbThread.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbThread.cpp
deleted file mode 100644
index 132cf2c..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbThread.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-//===-- MICmdCmdGdbThread.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbThread      implementation.
-
-// In-house headers:
-#include "MICmdCmdGdbThread.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-
-//++
-// Details: CMICmdCmdGdbThread constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbThread::CMICmdCmdGdbThread() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "thread";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdGdbThread::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdThread destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbThread::~CMICmdCmdGdbThread() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbThread::Execute() {
-  // Do nothing
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbThread::Acknowledge() {
-  const CMICmnMIValueConst miValueConst(MIRSRC(IDS_WORD_NOT_IMPLEMENTED));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdGdbThread::CreateSelf() {
-  return new CMICmdCmdGdbThread();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbThread.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbThread.h
deleted file mode 100644
index 963001f..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdGdbThread.h
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- MICmdCmdGdbThread.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbThread      interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements GDB command "thread".
-//--
-class CMICmdCmdGdbThread : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdGdbThread();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdGdbThread() override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdMiscellanous.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdMiscellanous.cpp
deleted file mode 100644
index 5aa7959..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdMiscellanous.cpp
+++ /dev/null
@@ -1,586 +0,0 @@
-//===-- MICmdCmdMiscellanous.cpp --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbExit                implementation.
-//              CMICmdCmdListThreadGroups       implementation.
-//              CMICmdCmdInterpreterExec        implementation.
-//              CMICmdCmdInferiorTtySet         implementation.
-
-// Third Party Headers:
-#include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBThread.h"
-
-// In-house headers:
-#include "MICmdArgValFile.h"
-#include "MICmdArgValListOfN.h"
-#include "MICmdArgValNumber.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValString.h"
-#include "MICmdArgValThreadGrp.h"
-#include "MICmdCmdMiscellanous.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnMIOutOfBandRecord.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnStreamStderr.h"
-#include "MICmnStreamStdout.h"
-#include "MIDriverBase.h"
-
-//++
-// Details: CMICmdCmdGdbExit constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbExit::CMICmdCmdGdbExit() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "gdb-exit";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdGdbExit::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdGdbExit destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdGdbExit::~CMICmdCmdGdbExit() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbExit::Execute() {
-  CMICmnLLDBDebugger::Instance().GetDriver().SetExitApplicationFlag(true);
-  const lldb::SBError sbErr = m_rLLDBDebugSessionInfo.GetProcess().Destroy();
-  // Do not check for sbErr.Fail() here, m_lldbProcess is likely !IsValid()
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdGdbExit::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Exit);
-  m_miResultRecord = miRecordResult;
-
-  // Prod the client i.e. Eclipse with out-of-band results to help it 'continue'
-  // because it is using LLDB debugger
-  // Give the client '=thread-group-exited,id="i1"'
-  m_bHasResultRecordExtra = true;
-  const CMICmnMIValueConst miValueConst2("i1");
-  const CMICmnMIValueResult miValueResult2("id", miValueConst2);
-  const CMICmnMIOutOfBandRecord miOutOfBand(
-      CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupExited, miValueResult2);
-  m_miResultRecordExtra = miOutOfBand.GetString();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdGdbExit::CreateSelf() { return new CMICmdCmdGdbExit(); }
-
-
-//++
-// Details: CMICmdCmdListThreadGroups constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdListThreadGroups::CMICmdCmdListThreadGroups()
-    : m_bIsI1(false), m_bHaveArgOption(false), m_bHaveArgRecurse(false),
-      m_constStrArgNamedAvailable("available"),
-      m_constStrArgNamedRecurse("recurse"), m_constStrArgNamedGroup("group"),
-      m_constStrArgNamedThreadGroup("i1") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "list-thread-groups";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdListThreadGroups::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdListThreadGroups destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdListThreadGroups::~CMICmdCmdListThreadGroups() {
-  m_vecMIValueTuple.clear();
-}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdListThreadGroups::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionLong(m_constStrArgNamedAvailable, false, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionLong(m_constStrArgNamedRecurse, false, true,
-                                 CMICmdArgValListBase::eArgValType_Number, 1));
-  m_setCmdArgs.Add(
-      new CMICmdArgValListOfN(m_constStrArgNamedGroup, false, true,
-                              CMICmdArgValListBase::eArgValType_Number));
-  m_setCmdArgs.Add(
-      new CMICmdArgValThreadGrp(m_constStrArgNamedThreadGroup, false, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-//          Synopsis: -list-thread-groups [ --available ] [ --recurse 1 ] [
-//          group ... ]
-//          This command does not follow the MI documentation exactly. Has an
-//          extra
-//          argument "i1" to handle.
-//          Ref:
-// http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Miscellaneous-Commands.html#GDB_002fMI-Miscellaneous-Commands
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdListThreadGroups::Execute() {
-  if (m_setCmdArgs.IsArgContextEmpty())
-    // No options so "top level thread groups"
-    return MIstatus::success;
-
-  CMICMDBASE_GETOPTION(pArgAvailable, OptionLong, m_constStrArgNamedAvailable);
-  CMICMDBASE_GETOPTION(pArgRecurse, OptionLong, m_constStrArgNamedRecurse);
-  CMICMDBASE_GETOPTION(pArgThreadGroup, ThreadGrp,
-                       m_constStrArgNamedThreadGroup);
-
-  // Got some options so "threads"
-  if (pArgAvailable->GetFound()) {
-    if (pArgRecurse->GetFound()) {
-      m_bHaveArgRecurse = true;
-      return MIstatus::success;
-    }
-
-    m_bHaveArgOption = true;
-    return MIstatus::success;
-  }
-  // "i1" as first argument (pos 0 of possible arg)
-  if (!pArgThreadGroup->GetFound())
-    return MIstatus::success;
-  m_bIsI1 = true;
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-
-  // Note do not check for sbProcess is IsValid(), continue
-
-  m_vecMIValueTuple.clear();
-  const MIuint nThreads = sbProcess.GetNumThreads();
-  for (MIuint i = 0; i < nThreads; i++) {
-    //  GetThreadAtIndex() uses a base 0 index
-    //  GetThreadByIndexID() uses a base 1 index
-    lldb::SBThread thread = sbProcess.GetThreadAtIndex(i);
-
-    if (thread.IsValid()) {
-      CMICmnMIValueTuple miTuple;
-      if (!rSessionInfo.MIResponseFormThreadInfo(
-              m_cmdData, thread,
-              CMICmnLLDBDebugSessionInfo::eThreadInfoFormat_NoFrames, miTuple))
-        return MIstatus::failure;
-
-      m_vecMIValueTuple.push_back(miTuple);
-    }
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdListThreadGroups::Acknowledge() {
-  if (m_bHaveArgOption) {
-    if (m_bHaveArgRecurse) {
-      const CMICmnMIValueConst miValueConst(
-          MIRSRC(IDS_WORD_NOT_IMPLEMENTED_BRKTS));
-      const CMICmnMIValueResult miValueResult("msg", miValueConst);
-      const CMICmnMIResultRecord miRecordResult(
-          m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-          miValueResult);
-      m_miResultRecord = miRecordResult;
-
-      return MIstatus::success;
-    }
-
-    const CMICmnMIValueConst miValueConst1("i1");
-    const CMICmnMIValueResult miValueResult1("id", miValueConst1);
-    CMICmnMIValueTuple miTuple(miValueResult1);
-
-    const CMICmnMIValueConst miValueConst2("process");
-    const CMICmnMIValueResult miValueResult2("type", miValueConst2);
-    miTuple.Add(miValueResult2);
-
-    CMICmnLLDBDebugSessionInfo &rSessionInfo(
-        CMICmnLLDBDebugSessionInfo::Instance());
-    if (rSessionInfo.GetProcess().IsValid()) {
-      const lldb::pid_t pid = rSessionInfo.GetProcess().GetProcessID();
-      const CMIUtilString strPid(CMIUtilString::Format("%lld", pid));
-      const CMICmnMIValueConst miValueConst3(strPid);
-      const CMICmnMIValueResult miValueResult3("pid", miValueConst3);
-      miTuple.Add(miValueResult3);
-    }
-
-    const CMICmnMIValueConst miValueConst4(
-        MIRSRC(IDS_WORD_NOT_IMPLEMENTED_BRKTS));
-    const CMICmnMIValueResult miValueResult4("num_children", miValueConst4);
-    miTuple.Add(miValueResult4);
-
-    const CMICmnMIValueConst miValueConst5(
-        MIRSRC(IDS_WORD_NOT_IMPLEMENTED_BRKTS));
-    const CMICmnMIValueResult miValueResult5("cores", miValueConst5);
-    miTuple.Add(miValueResult5);
-
-    const CMICmnMIValueList miValueList(miTuple);
-    const CMICmnMIValueResult miValueResult6("groups", miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult6);
-    m_miResultRecord = miRecordResult;
-
-    return MIstatus::success;
-  }
-
-  if (!m_bIsI1) {
-    const CMICmnMIValueConst miValueConst1("i1");
-    const CMICmnMIValueResult miValueResult1("id", miValueConst1);
-    CMICmnMIValueTuple miTuple(miValueResult1);
-
-    const CMICmnMIValueConst miValueConst2("process");
-    const CMICmnMIValueResult miValueResult2("type", miValueConst2);
-    miTuple.Add(miValueResult2);
-
-    CMICmnLLDBDebugSessionInfo &rSessionInfo(
-        CMICmnLLDBDebugSessionInfo::Instance());
-    if (rSessionInfo.GetProcess().IsValid()) {
-      const lldb::pid_t pid = rSessionInfo.GetProcess().GetProcessID();
-      const CMIUtilString strPid(CMIUtilString::Format("%lld", pid));
-      const CMICmnMIValueConst miValueConst3(strPid);
-      const CMICmnMIValueResult miValueResult3("pid", miValueConst3);
-      miTuple.Add(miValueResult3);
-    }
-
-    if (rSessionInfo.GetTarget().IsValid()) {
-      lldb::SBTarget sbTrgt = rSessionInfo.GetTarget();
-      const char *pDir = sbTrgt.GetExecutable().GetDirectory();
-      const char *pFileName = sbTrgt.GetExecutable().GetFilename();
-      const CMIUtilString strFile(
-          CMIUtilString::Format("%s/%s",
-                                CMIUtilString::WithNullAsEmpty(pDir),
-                                CMIUtilString::WithNullAsEmpty(pFileName)));
-      const CMICmnMIValueConst miValueConst4(strFile);
-      const CMICmnMIValueResult miValueResult4("executable", miValueConst4);
-      miTuple.Add(miValueResult4);
-    }
-
-    const CMICmnMIValueList miValueList(miTuple);
-    const CMICmnMIValueResult miValueResult5("groups", miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult5);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  // Build up a list of thread information from tuples
-  VecMIValueTuple_t::const_iterator it = m_vecMIValueTuple.begin();
-  if (it == m_vecMIValueTuple.end()) {
-    const CMICmnMIValueConst miValueConst("[]");
-    const CMICmnMIValueResult miValueResult("threads", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-  CMICmnMIValueList miValueList(*it);
-  ++it;
-  while (it != m_vecMIValueTuple.end()) {
-    const CMICmnMIValueTuple &rTuple(*it);
-    miValueList.Add(rTuple);
-
-    // Next
-    ++it;
-  }
-
-  const CMICmnMIValueResult miValueResult("threads", miValueList);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdListThreadGroups::CreateSelf() {
-  return new CMICmdCmdListThreadGroups();
-}
-
-
-//++
-// Details: CMICmdCmdInterpreterExec constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdInterpreterExec::CMICmdCmdInterpreterExec()
-    : m_constStrArgNamedInterpreter("interpreter"),
-      m_constStrArgNamedCommand("command") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "interpreter-exec";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdInterpreterExec::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdInterpreterExec destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdInterpreterExec::~CMICmdCmdInterpreterExec() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdInterpreterExec::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgNamedInterpreter, true, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgNamedCommand, true, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdInterpreterExec::Execute() {
-  CMICMDBASE_GETOPTION(pArgInterpreter, String, m_constStrArgNamedInterpreter);
-  CMICMDBASE_GETOPTION(pArgCommand, String, m_constStrArgNamedCommand);
-
-  // Handle the interpreter parameter by do nothing on purpose (set to 'handled'
-  // in the arg definition above)
-  const CMIUtilString &rStrInterpreter(pArgInterpreter->GetValue());
-  MIunused(rStrInterpreter);
-
-  const CMIUtilString &rStrCommand(pArgCommand->GetValue());
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  const lldb::ReturnStatus rtn =
-      rSessionInfo.GetDebugger().GetCommandInterpreter().HandleCommand(
-          rStrCommand.c_str(), m_lldbResult, true);
-  MIunused(rtn);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdInterpreterExec::Acknowledge() {
-  if (m_lldbResult.GetOutputSize() > 0) {
-    const CMIUtilString line(m_lldbResult.GetOutput());
-    const bool bEscapeQuotes(true);
-    CMICmnMIValueConst miValueConst(line.Escape(bEscapeQuotes));
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_ConsoleStreamOutput, miValueConst);
-    const bool bOk = CMICmnStreamStdout::TextToStdout(miOutOfBandRecord.GetString());
-    if (!bOk)
-      return MIstatus::failure;
-  }
-  if (m_lldbResult.GetErrorSize() > 0) {
-    const CMIUtilString line(m_lldbResult.GetError());
-    const bool bEscapeQuotes(true);
-    CMICmnMIValueConst miValueConst(line.Escape(bEscapeQuotes));
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(CMICmnMIOutOfBandRecord::eOutOfBand_LogStreamOutput, miValueConst);
-    const bool bOk = CMICmnStreamStdout::TextToStdout(miOutOfBandRecord.GetString());
-    if (!bOk)
-      return MIstatus::failure;
-  }
-
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdInterpreterExec::CreateSelf() {
-  return new CMICmdCmdInterpreterExec();
-}
-
-
-//++
-// Details: CMICmdCmdInferiorTtySet constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdInferiorTtySet::CMICmdCmdInferiorTtySet() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "inferior-tty-set";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdInferiorTtySet::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdInferiorTtySet destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdInferiorTtySet::~CMICmdCmdInferiorTtySet() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdInferiorTtySet::Execute() {
-  // Do nothing
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdInferiorTtySet::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdInferiorTtySet::CreateSelf() {
-  return new CMICmdCmdInferiorTtySet();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdMiscellanous.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdMiscellanous.h
deleted file mode 100644
index 614638e5..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdMiscellanous.h
+++ /dev/null
@@ -1,156 +0,0 @@
-//===-- MICmdCmdMiscellanous.h ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdGdbExit                interface.
-//              CMICmdCmdListThreadGroups       interface.
-//              CMICmdCmdInterpreterExec        interface.
-//              CMICmdCmdInferiorTtySet         interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// Third party headers:
-#include "lldb/API/SBCommandReturnObject.h"
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "gdb-exit".
-//--
-class CMICmdCmdGdbExit : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdGdbExit();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdGdbExit() override;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "list-thread-groups".
-//          This command does not follow the MI documentation exactly.
-//          http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Miscellaneous-Commands.html#GDB_002fMI-Miscellaneous-Commands
-//--
-class CMICmdCmdListThreadGroups : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdListThreadGroups();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdListThreadGroups() override;
-
-  // Typedefs:
-private:
-  typedef std::vector<CMICmnMIValueTuple> VecMIValueTuple_t;
-
-  // Attributes:
-private:
-  bool m_bIsI1; // True = Yes command argument equal "i1", false = no match
-  bool m_bHaveArgOption;  // True = Yes "--available" present, false = not found
-  bool m_bHaveArgRecurse; // True = Yes command argument "--recurse", false = no
-                          // found
-  VecMIValueTuple_t m_vecMIValueTuple;
-  const CMIUtilString m_constStrArgNamedAvailable;
-  const CMIUtilString m_constStrArgNamedRecurse;
-  const CMIUtilString m_constStrArgNamedGroup;
-  const CMIUtilString m_constStrArgNamedThreadGroup;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "interpreter-exec".
-//--
-class CMICmdCmdInterpreterExec : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdInterpreterExec();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdInterpreterExec() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNamedInterpreter;
-  const CMIUtilString m_constStrArgNamedCommand;
-  lldb::SBCommandReturnObject m_lldbResult;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "inferior-tty-set".
-//--
-class CMICmdCmdInferiorTtySet : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdInferiorTtySet();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdInferiorTtySet() override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdStack.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdStack.cpp
deleted file mode 100644
index 599db37..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdStack.cpp
+++ /dev/null
@@ -1,1053 +0,0 @@
-//===-- MICmdCmdStack.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdStackInfoDepth         implementation.
-//              CMICmdCmdStackInfoFrame         implementation.
-//              CMICmdCmdStackListFrames        implementation.
-//              CMICmdCmdStackListArguments     implementation.
-//              CMICmdCmdStackListLocals        implementation.
-//              CMICmdCmdStackSelectFrame       implementation.
-
-// Third Party Headers:
-#include "lldb/API/SBThread.h"
-
-// In-house headers:
-#include "MICmdArgValListOfN.h"
-#include "MICmdArgValNumber.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValPrintValues.h"
-#include "MICmdArgValString.h"
-#include "MICmdArgValThreadGrp.h"
-#include "MICmdCmdStack.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnMIOutOfBandRecord.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-
-#include <algorithm>
-
-//++
-// Details: CMICmdCmdStackInfoDepth constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackInfoDepth::CMICmdCmdStackInfoDepth()
-    : m_nThreadFrames(0), m_constStrArgMaxDepth("max-depth") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "stack-info-depth";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdStackInfoDepth::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdStackInfoDepth destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackInfoDepth::~CMICmdCmdStackInfoDepth() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackInfoDepth::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgMaxDepth, false, false));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackInfoDepth::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-  CMICMDBASE_GETOPTION(pArgMaxDepth, Number, m_constStrArgMaxDepth);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  lldb::SBThread thread = (nThreadId != UINT64_MAX)
-                              ? sbProcess.GetThreadByIndexID(nThreadId)
-                              : sbProcess.GetSelectedThread();
-  m_nThreadFrames = thread.GetNumFrames();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackInfoDepth::Acknowledge() {
-  const CMIUtilString strDepth(CMIUtilString::Format("%d", m_nThreadFrames));
-  const CMICmnMIValueConst miValueConst(strDepth);
-  const CMICmnMIValueResult miValueResult("depth", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdStackInfoDepth::CreateSelf() {
-  return new CMICmdCmdStackInfoDepth();
-}
-
-
-//++
-// Details: CMICmdCmdStackInfoFrame constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackInfoFrame::CMICmdCmdStackInfoFrame() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "stack-info-frame";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdStackInfoFrame::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdStackInfoFrame destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackInfoFrame::~CMICmdCmdStackInfoFrame() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackInfoFrame::ParseArgs() { return ParseValidateCmdOptions(); }
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackInfoFrame::Execute() {
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  if (!sbProcess.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PROCESS),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBThread sbThread = sbProcess.GetSelectedThread();
-  MIuint nFrameId = sbThread.GetSelectedFrame().GetFrameID();
-  if (!rSessionInfo.MIResponseFormFrameInfo(
-          sbThread, nFrameId,
-          CMICmnLLDBDebugSessionInfo::eFrameInfoFormat_NoArguments,
-          m_miValueTuple))
-    return MIstatus::failure;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackInfoFrame::Acknowledge() {
-  const CMICmnMIValueResult miValueResult("frame", m_miValueTuple);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdStackInfoFrame::CreateSelf() {
-  return new CMICmdCmdStackInfoFrame();
-}
-
-
-//++
-// Details: CMICmdCmdStackListFrames constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackListFrames::CMICmdCmdStackListFrames()
-    : m_nThreadFrames(0), m_constStrArgFrameLow("low-frame"),
-      m_constStrArgFrameHigh("high-frame") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "stack-list-frames";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdStackListFrames::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdStackListFrames destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackListFrames::~CMICmdCmdStackListFrames() {
-  m_vecMIValueResult.clear();
-}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListFrames::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrameLow, false, true));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrameHigh, false, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListFrames::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-  CMICMDBASE_GETOPTION(pArgFrameLow, Number, m_constStrArgFrameLow);
-  CMICMDBASE_GETOPTION(pArgFrameHigh, Number, m_constStrArgFrameHigh);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-
-  // Frame low and high options are not mandatory
-  MIuint nFrameHigh =
-      pArgFrameHigh->GetFound() ? pArgFrameHigh->GetValue() : UINT32_MAX;
-  const MIuint nFrameLow =
-      pArgFrameLow->GetFound() ? pArgFrameLow->GetValue() : 0;
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  lldb::SBThread thread = (nThreadId != UINT64_MAX)
-                              ? sbProcess.GetThreadByIndexID(nThreadId)
-                              : sbProcess.GetSelectedThread();
-  MIuint nThreadFrames = thread.GetNumFrames();
-
-  // Adjust nThreadFrames for the nFrameHigh argument as we use nFrameHigh+1 in
-  // the min calc as the arg
-  // is not an index, but a frame id value.
-  if (nFrameHigh < UINT32_MAX) {
-    nFrameHigh++;
-    nThreadFrames = (nFrameHigh < nThreadFrames) ? nFrameHigh : nThreadFrames;
-  }
-
-  m_nThreadFrames = nThreadFrames;
-  if (nThreadFrames == 0)
-    return MIstatus::success;
-
-  m_vecMIValueResult.clear();
-  for (MIuint nLevel = nFrameLow; nLevel < nThreadFrames; nLevel++) {
-    CMICmnMIValueTuple miValueTuple;
-    if (!rSessionInfo.MIResponseFormFrameInfo(
-            thread, nLevel,
-            CMICmnLLDBDebugSessionInfo::eFrameInfoFormat_NoArguments,
-            miValueTuple))
-      return MIstatus::failure;
-
-    const CMICmnMIValueResult miValueResult8("frame", miValueTuple);
-    m_vecMIValueResult.push_back(miValueResult8);
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListFrames::Acknowledge() {
-  if (m_nThreadFrames == 0) {
-    // MI print "3^done,stack=[{}]"
-    const CMICmnMIValueTuple miValueTuple;
-    const CMICmnMIValueList miValueList(miValueTuple);
-    const CMICmnMIValueResult miValueResult("stack", miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-
-    return MIstatus::success;
-  }
-
-  // Build up a list of thread information from tuples
-  VecMIValueResult_t::const_iterator it = m_vecMIValueResult.begin();
-  if (it == m_vecMIValueResult.end()) {
-    // MI print "3^done,stack=[{}]"
-    const CMICmnMIValueTuple miValueTuple;
-    const CMICmnMIValueList miValueList(miValueTuple);
-    const CMICmnMIValueResult miValueResult("stack", miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-  CMICmnMIValueList miValueList(*it);
-  ++it;
-  while (it != m_vecMIValueResult.end()) {
-    const CMICmnMIValueResult &rTuple(*it);
-    miValueList.Add(rTuple);
-
-    // Next
-    ++it;
-  }
-  const CMICmnMIValueResult miValueResult("stack", miValueList);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdStackListFrames::CreateSelf() {
-  return new CMICmdCmdStackListFrames();
-}
-
-
-//++
-// Details: CMICmdCmdStackListArguments constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackListArguments::CMICmdCmdStackListArguments()
-    : m_bThreadInvalid(false), m_miValueList(true),
-      m_constStrArgPrintValues("print-values"),
-      m_constStrArgFrameLow("low-frame"), m_constStrArgFrameHigh("high-frame") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "stack-list-arguments";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdStackListArguments::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdStackListArguments destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackListArguments::~CMICmdCmdStackListArguments() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListArguments::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrameLow, false, true));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrameHigh, false, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListArguments::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-  CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);
-  CMICMDBASE_GETOPTION(pArgFrameLow, Number, m_constStrArgFrameLow);
-  CMICMDBASE_GETOPTION(pArgFrameHigh, Number, m_constStrArgFrameHigh);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound()) {
-    if (!pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(
-            nThreadId)) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgThread.c_str()));
-      return MIstatus::failure;
-    }
-  }
-
-  const CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat =
-      static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(
-          pArgPrintValues->GetValue());
-
-  MIuint nFrameLow = 0;
-  MIuint nFrameHigh = UINT32_MAX;
-  if (pArgFrameLow->GetFound() && pArgFrameHigh->GetFound()) {
-    nFrameLow = pArgFrameLow->GetValue();
-    nFrameHigh = pArgFrameHigh->GetValue() + 1;
-  } else if (pArgFrameLow->GetFound() || pArgFrameHigh->GetFound()) {
-    // Only low-frame or high-frame was specified but both are required
-    SetError(
-        CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_FRAME_RANGE_INVALID),
-                              m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  lldb::SBThread thread = (nThreadId != UINT64_MAX)
-                              ? sbProcess.GetThreadByIndexID(nThreadId)
-                              : sbProcess.GetSelectedThread();
-  m_bThreadInvalid = !thread.IsValid();
-  if (m_bThreadInvalid)
-    return MIstatus::success;
-
-  const lldb::StopReason eStopReason = thread.GetStopReason();
-  if ((eStopReason == lldb::eStopReasonNone) ||
-      (eStopReason == lldb::eStopReasonInvalid)) {
-    m_bThreadInvalid = true;
-    return MIstatus::success;
-  }
-
-  const MIuint nFrames = thread.GetNumFrames();
-  if (nFrameLow >= nFrames) {
-    // The low-frame is larger than the actual number of frames
-    SetError(
-        CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_THREAD_FRAME_RANGE_INVALID),
-                              m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  nFrameHigh = std::min(nFrameHigh, nFrames);
-  for (MIuint i = nFrameLow; i < nFrameHigh; i++) {
-    lldb::SBFrame frame = thread.GetFrameAtIndex(i);
-    CMICmnMIValueList miValueList(true);
-    const MIuint maskVarTypes =
-        CMICmnLLDBDebugSessionInfo::eVariableType_Arguments;
-    if (!rSessionInfo.MIResponseFormVariableInfo(frame, maskVarTypes,
-                                                 eVarInfoFormat, miValueList))
-      return MIstatus::failure;
-    const CMICmnMIValueConst miValueConst(CMIUtilString::Format("%d", i));
-    const CMICmnMIValueResult miValueResult("level", miValueConst);
-    CMICmnMIValueTuple miValueTuple(miValueResult);
-    const CMICmnMIValueResult miValueResult2("args", miValueList);
-    miValueTuple.Add(miValueResult2);
-    const CMICmnMIValueResult miValueResult3("frame", miValueTuple);
-    m_miValueList.Add(miValueResult3);
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListArguments::Acknowledge() {
-  if (m_bThreadInvalid) {
-    // MI print "%s^done,stack-args=[]"
-    const CMICmnMIValueList miValueList(true);
-    const CMICmnMIValueResult miValueResult("stack-args", miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  // MI print
-  // "%s^done,stack-args=[frame={level=\"0\",args=[%s]},frame={level=\"1\",args=[%s]}]"
-  const CMICmnMIValueResult miValueResult4("stack-args", m_miValueList);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult4);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdStackListArguments::CreateSelf() {
-  return new CMICmdCmdStackListArguments();
-}
-
-
-//++
-// Details: CMICmdCmdStackListLocals constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackListLocals::CMICmdCmdStackListLocals()
-    : m_bThreadInvalid(false), m_miValueList(true),
-      m_constStrArgPrintValues("print-values") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "stack-list-locals";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdStackListLocals::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdStackListLocals destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackListLocals::~CMICmdCmdStackListLocals() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListLocals::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListLocals::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-  CMICMDBASE_GETOPTION(pArgFrame, OptionLong, m_constStrArgFrame);
-  CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound()) {
-    if (!pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(
-            nThreadId)) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgThread.c_str()));
-      return MIstatus::failure;
-    }
-  }
-
-  MIuint64 nFrame = UINT64_MAX;
-  if (pArgFrame->GetFound()) {
-    if (!pArgFrame->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nFrame)) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgFrame.c_str()));
-      return MIstatus::failure;
-    }
-  }
-
-  const CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat =
-      static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(
-          pArgPrintValues->GetValue());
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  lldb::SBThread thread = (nThreadId != UINT64_MAX)
-                              ? sbProcess.GetThreadByIndexID(nThreadId)
-                              : sbProcess.GetSelectedThread();
-  m_bThreadInvalid = !thread.IsValid();
-  if (m_bThreadInvalid)
-    return MIstatus::success;
-
-  const lldb::StopReason eStopReason = thread.GetStopReason();
-  if ((eStopReason == lldb::eStopReasonNone) ||
-      (eStopReason == lldb::eStopReasonInvalid)) {
-    m_bThreadInvalid = true;
-    return MIstatus::success;
-  }
-
-  lldb::SBFrame frame = (nFrame != UINT64_MAX) ? thread.GetFrameAtIndex(nFrame)
-                                               : thread.GetSelectedFrame();
-
-  CMICmnMIValueList miValueList(true);
-  const MIuint maskVarTypes = CMICmnLLDBDebugSessionInfo::eVariableType_Locals |
-                              CMICmnLLDBDebugSessionInfo::eVariableType_InScope;
-  if (!rSessionInfo.MIResponseFormVariableInfo(frame, maskVarTypes,
-                                               eVarInfoFormat, miValueList))
-    return MIstatus::failure;
-
-  m_miValueList = miValueList;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListLocals::Acknowledge() {
-  if (m_bThreadInvalid) {
-    // MI print "%s^done,locals=[]"
-    const CMICmnMIValueList miValueList(true);
-    const CMICmnMIValueResult miValueResult("locals", miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  // MI print "%s^done,locals=[%s]"
-  const CMICmnMIValueResult miValueResult("locals", m_miValueList);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdStackListLocals::CreateSelf() {
-  return new CMICmdCmdStackListLocals();
-}
-
-
-//++
-// Details: CMICmdCmdStackListVariables constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackListVariables::CMICmdCmdStackListVariables()
-    : m_bThreadInvalid(false), m_miValueList(true),
-      m_constStrArgPrintValues("print-values") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "stack-list-variables";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdStackListVariables::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdStackListVariables destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackListVariables::~CMICmdCmdStackListVariables() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListVariables::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValPrintValues(m_constStrArgPrintValues, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListVariables::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-  CMICMDBASE_GETOPTION(pArgFrame, OptionLong, m_constStrArgFrame);
-  CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound()) {
-    if (!pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(
-            nThreadId)) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgThread.c_str()));
-      return MIstatus::failure;
-    }
-  }
-
-  MIuint64 nFrame = UINT64_MAX;
-  if (pArgFrame->GetFound()) {
-    if (!pArgFrame->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nFrame)) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgFrame.c_str()));
-      return MIstatus::failure;
-    }
-  }
-
-  const CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat =
-      static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(
-          pArgPrintValues->GetValue());
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  lldb::SBThread thread = (nThreadId != UINT64_MAX)
-                              ? sbProcess.GetThreadByIndexID(nThreadId)
-                              : sbProcess.GetSelectedThread();
-  m_bThreadInvalid = !thread.IsValid();
-  if (m_bThreadInvalid)
-    return MIstatus::success;
-
-  const lldb::StopReason eStopReason = thread.GetStopReason();
-  if ((eStopReason == lldb::eStopReasonNone) ||
-      (eStopReason == lldb::eStopReasonInvalid)) {
-    m_bThreadInvalid = true;
-    return MIstatus::success;
-  }
-
-  lldb::SBFrame frame = (nFrame != UINT64_MAX) ? thread.GetFrameAtIndex(nFrame)
-                                               : thread.GetSelectedFrame();
-
-  CMICmnMIValueList miValueList(true);
-  const MIuint maskVarTypes =
-      CMICmnLLDBDebugSessionInfo::eVariableType_Arguments |
-      CMICmnLLDBDebugSessionInfo::eVariableType_Locals |
-      CMICmnLLDBDebugSessionInfo::eVariableType_InScope;
-  if (!rSessionInfo.MIResponseFormVariableInfo(
-          frame, maskVarTypes, eVarInfoFormat, miValueList, 10, true))
-    return MIstatus::failure;
-  m_miValueList = miValueList;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackListVariables::Acknowledge() {
-  if (m_bThreadInvalid) {
-    // MI print "%s^done,variables=[]"
-    const CMICmnMIValueList miValueList(true);
-    const CMICmnMIValueResult miValueResult("variables", miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  // MI print "%s^done,variables=[%s]"
-  const CMICmnMIValueResult miValueResult("variables", m_miValueList);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdStackListVariables::CreateSelf() {
-  return new CMICmdCmdStackListVariables();
-}
-
-
-//++
-// Details: CMICmdCmdStackSelectFrame constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackSelectFrame::CMICmdCmdStackSelectFrame()
-    : m_bFrameInvalid(false), m_constStrArgFrameId("frame_id") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "stack-select-frame";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdStackSelectFrame::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdStackSelectFrame destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdStackSelectFrame::~CMICmdCmdStackSelectFrame() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackSelectFrame::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrameId, true, false));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackSelectFrame::Execute() {
-  CMICMDBASE_GETOPTION(pArgFrame, Number, m_constStrArgFrameId);
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBThread sbThread = rSessionInfo.GetProcess().GetSelectedThread();
-
-  const MIuint nFrameId = pArgFrame->GetValue();
-  m_bFrameInvalid = (nFrameId >= sbThread.GetNumFrames());
-  if (m_bFrameInvalid)
-    return MIstatus::success;
-
-  lldb::SBFrame sbFrame = sbThread.SetSelectedFrame(nFrameId);
-  m_bFrameInvalid = !sbFrame.IsValid();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmdCmdStackSelectFrame::Acknowledge() {
-  if (m_bFrameInvalid) {
-    // MI print "%s^error,msg=\"Command '-stack-select-frame'. Frame ID
-    // invalid\""
-    const CMICmnMIValueConst miValueConst(CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_FRAME_INVALID), m_cmdData.strMiCmd.c_str()));
-    const CMICmnMIValueResult miValueResult("msg", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-
-    return MIstatus::success;
-  }
-
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdStackSelectFrame::CreateSelf() {
-  return new CMICmdCmdStackSelectFrame();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdStack.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdStack.h
deleted file mode 100644
index 04aeb5d..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdStack.h
+++ /dev/null
@@ -1,256 +0,0 @@
-//===-- MICmdCmdStack.h -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdStackInfoDepth         interface.
-//              CMICmdCmdStackInfoFrame         interface.
-//              CMICmdCmdStackListFrames        interface.
-//              CMICmdCmdStackListArguments     interface.
-//              CMICmdCmdStackListLocals        interface.
-//              CMICmdCmdStackSelectFrame       interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "stack-info-depth".
-//--
-class CMICmdCmdStackInfoDepth : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdStackInfoDepth();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdStackInfoDepth() override;
-
-  // Attributes:
-private:
-  MIuint m_nThreadFrames;
-  const CMIUtilString m_constStrArgMaxDepth; // Not handled by *this command
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "stack-info-frame".
-//--
-class CMICmdCmdStackInfoFrame : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdStackInfoFrame();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdStackInfoFrame() override;
-
-  // Attributes:
-private:
-  CMICmnMIValueTuple m_miValueTuple;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "stack-list-frames".
-//--
-class CMICmdCmdStackListFrames : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdStackListFrames();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdStackListFrames() override;
-
-  // Typedefs:
-private:
-  typedef std::vector<CMICmnMIValueResult> VecMIValueResult_t;
-
-  // Attributes:
-private:
-  MIuint m_nThreadFrames;
-  VecMIValueResult_t m_vecMIValueResult;
-  const CMIUtilString m_constStrArgFrameLow;
-  const CMIUtilString m_constStrArgFrameHigh;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "stack-list-arguments".
-//--
-class CMICmdCmdStackListArguments : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdStackListArguments();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdStackListArguments() override;
-
-  // Attributes:
-private:
-  bool m_bThreadInvalid; // True = yes invalid thread, false = thread object
-                         // valid
-  CMICmnMIValueList m_miValueList;
-  const CMIUtilString m_constStrArgPrintValues;
-  const CMIUtilString m_constStrArgFrameLow;
-  const CMIUtilString m_constStrArgFrameHigh;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "stack-list-locals".
-//--
-class CMICmdCmdStackListLocals : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdStackListLocals();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdStackListLocals() override;
-
-  // Attributes:
-private:
-  bool m_bThreadInvalid; // True = yes invalid thread, false = thread object
-                         // valid
-  CMICmnMIValueList m_miValueList;
-  const CMIUtilString m_constStrArgPrintValues;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "stack-list-variables".
-//--
-class CMICmdCmdStackListVariables : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdStackListVariables();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdStackListVariables() override;
-
-  // Attributes
-private:
-  bool m_bThreadInvalid; // True = yes invalid thread, false = thread object
-                         // valid
-  CMICmnMIValueList m_miValueList;
-  const CMIUtilString m_constStrArgPrintValues;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "stack-select-frame".
-//--
-class CMICmdCmdStackSelectFrame : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdStackSelectFrame();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdStackSelectFrame() override;
-
-  // Attributes:
-private:
-  bool m_bFrameInvalid; // True = yes invalid frame, false = ok
-  const CMIUtilString m_constStrArgFrameId;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportInfo.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportInfo.cpp
deleted file mode 100644
index e17f70a..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportInfo.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-//===-- MICmdCmdSupportInfo.cpp ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdSupportInfoMiCmdQuery          implementation.
-
-// In-house headers:
-#include "MICmdCmdSupportInfo.h"
-#include "MICmdArgValString.h"
-#include "MICmdFactory.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnMIValueTuple.h"
-
-//++
-// Details: CMICmdCmdSupportInfoMiCmdQuery constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdSupportInfoMiCmdQuery::CMICmdCmdSupportInfoMiCmdQuery()
-    : m_bCmdFound(false), m_constStrArgCmdName("cmd_name") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "info-gdb-mi-command";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdSupportInfoMiCmdQuery::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdSupportInfoMiCmdQuery destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdSupportInfoMiCmdQuery::~CMICmdCmdSupportInfoMiCmdQuery() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSupportInfoMiCmdQuery::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgCmdName, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSupportInfoMiCmdQuery::Execute() {
-  CMICMDBASE_GETOPTION(pArgNamedCmdName, String, m_constStrArgCmdName);
-  const CMIUtilString &rCmdToQuery(pArgNamedCmdName->GetValue());
-  const MIuint nLen = rCmdToQuery.length();
-  const CMICmdFactory &rCmdFactory = CMICmdFactory::Instance();
-  if ((nLen > 1) && (rCmdToQuery[0] == '-'))
-    m_bCmdFound = rCmdFactory.CmdExist(rCmdToQuery.substr(1, nLen - 1).c_str());
-  else
-    m_bCmdFound = rCmdFactory.CmdExist(rCmdToQuery);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSupportInfoMiCmdQuery::Acknowledge() {
-  const CMICmnMIValueConst miValueConst(m_bCmdFound ? "true" : "false");
-  const CMICmnMIValueResult miValueResult("exists", miValueConst);
-  const CMICmnMIValueTuple miValueTuple(miValueResult);
-  const CMICmnMIValueResult miValueResult2("command", miValueTuple);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult2);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdSupportInfoMiCmdQuery::CreateSelf() {
-  return new CMICmdCmdSupportInfoMiCmdQuery();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportInfo.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportInfo.h
deleted file mode 100644
index ba3e4a6..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportInfo.h
+++ /dev/null
@@ -1,58 +0,0 @@
-//===-- MICmdCmdSupportInfo.h -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdSupportInfoMiCmdQuery          interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "info-gdb-mi-command".
-//          This command does not follow the MI documentation exactly.
-//--
-class CMICmdCmdSupportInfoMiCmdQuery : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdSupportInfoMiCmdQuery();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdSupportInfoMiCmdQuery() override;
-
-  // Attributes:
-private:
-  bool m_bCmdFound; // True = query for the command in command factory found,
-                    // false = not found not recognised
-  const CMIUtilString m_constStrArgCmdName;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportList.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportList.cpp
deleted file mode 100644
index e457e01..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportList.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-//===-- MICmdCmdSupportList.cpp ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdSupportListFeatures            implementation.
-
-// In-house headers:
-#include "MICmdCmdSupportList.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnMIValueList.h"
-
-//++
-// Details: CMICmdCmdSupportListFeatures constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdSupportListFeatures::CMICmdCmdSupportListFeatures() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "list-features";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdSupportListFeatures::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdSupportListFeatures destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdSupportListFeatures::~CMICmdCmdSupportListFeatures() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSupportListFeatures::Execute() {
-  // Do nothing
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSupportListFeatures::Acknowledge() {
-  // Declare supported features here
-  const CMICmnMIValueConst miValueConst1("data-read-memory-bytes");
-  const CMICmnMIValueConst miValueConst2("exec-run-start-option");
-  // Some features may depend on host and/or target, decide what to add below
-  CMICmnMIValueList miValueList(true);
-  miValueList.Add(miValueConst1);
-  miValueList.Add(miValueConst2);
-  const CMICmnMIValueResult miValueResult("features", miValueList);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdSupportListFeatures::CreateSelf() {
-  return new CMICmdCmdSupportListFeatures();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportList.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportList.h
deleted file mode 100644
index 9e8a64b..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSupportList.h
+++ /dev/null
@@ -1,51 +0,0 @@
-//===-- MICmdCmdSupportList.h -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdSupportListFeatures            interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "list-features".
-//          This command does not follow the MI documentation exactly.
-//--
-class CMICmdCmdSupportListFeatures : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdSupportListFeatures();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdSupportListFeatures() override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSymbol.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSymbol.cpp
deleted file mode 100644
index d57d1b0..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSymbol.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-//===-- MICmdCmdSymbol.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdSymbolListLines     implementation.
-
-// Third Party Headers:
-#include "llvm/ADT/Twine.h"
-#include "lldb/API/SBAddress.h"
-#include "lldb/API/SBLineEntry.h"
-#include "lldb/API/SBFileSpec.h"
-#include "lldb/API/SBCompileUnit.h"
-#include "lldb/API/SBSymbolContext.h"
-#include "lldb/API/SBSymbolContextList.h"
-
-// In-house headers:
-#include "MICmdArgValFile.h"
-#include "MICmdCmdSymbol.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueTuple.h"
-#include "MICmnMIValueResult.h"
-
-namespace {
-const CMICmnMIValueTuple
-CreateMITuplePCLine(const uint32_t addr, const uint32_t line_number) {
-  const CMICmnMIValueConst miValueConstAddr("0x" + llvm::Twine::utohexstr(addr).str());
-  const CMICmnMIValueConst miValueConstLine(llvm::Twine(line_number).str());
-  const CMICmnMIValueResult miValueResultAddr("pc", miValueConstAddr);
-  const CMICmnMIValueResult miValueResultLine("line", miValueConstLine);
-  CMICmnMIValueTuple miValueTuple(miValueResultAddr);
-  miValueTuple.Add(miValueResultLine);
-  return miValueTuple;
-}
-} // namespace
-
-using namespace lldb; // For operator==(const SBAddress &, const SBAddress &).
-
-//++
-// Details: CMICmdCmdSymbolListLines constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdSymbolListLines::CMICmdCmdSymbolListLines()
-    : m_resultList(false), m_constStrArgNameFile("file") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "symbol-list-lines";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdSymbolListLines::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdSymbolListLines destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdSymbolListLines::~CMICmdCmdSymbolListLines() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSymbolListLines::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValFile(m_constStrArgNameFile, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-//          Synopsis: -symbol-list-lines file
-//          Ref:
-//          http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Symbol-Query.html#GDB_002fMI-Symbol-Query
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSymbolListLines::Execute() {
-  CMICMDBASE_GETOPTION(pArgFile, File, m_constStrArgNameFile);
-
-  const auto &rSessionInfo(CMICmnLLDBDebugSessionInfo::Instance());
-  if (rSessionInfo.GetTarget() == rSessionInfo.GetDebugger().GetDummyTarget()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  const lldb::SBFileSpec source_file_spec(pArgFile->GetValue().c_str(), true);
-  const char *source_file_name = source_file_spec.GetFilename();
-  const char *source_file_directory = source_file_spec.GetDirectory();
-  const bool has_path = source_file_directory;
-
-  lldb::SBSymbolContextList sc_cu_list =
-      CMICmnLLDBDebugSessionInfo::Instance().GetTarget().FindCompileUnits(
-          source_file_spec);
-
-  bool found_something = false;
-  for (uint32_t i = 0, e = sc_cu_list.GetSize(); i < e; ++i) {
-    const lldb::SBCompileUnit cu =
-        sc_cu_list.GetContextAtIndex(i).GetCompileUnit();
-    for (uint32_t j = 0, e = cu.GetNumLineEntries(); j < e; ++j) {
-      const lldb::SBLineEntry line = cu.GetLineEntryAtIndex(j);
-      const lldb::SBFileSpec line_spec = line.GetFileSpec();
-      if (line_spec.GetFilename() == source_file_name) {
-        if (has_path && (line_spec.GetDirectory() != source_file_directory))
-          continue;
-        // We don't need a line with start address equals to end one,
-        // so just skip it.
-        const lldb::SBAddress line_start_address = line.GetStartAddress();
-        const lldb::SBAddress line_end_address = line.GetEndAddress();
-        if (line_start_address == line_end_address)
-          continue;
-        // We have a matching line.
-        found_something = true;
-        m_resultList.Add(CreateMITuplePCLine(
-            line_start_address.GetFileAddress(),
-            line.GetLine()));
-      }
-    }
-  }
-  if (!found_something) {
-    SetError(MIRSRC(IDS_UTIL_FILE_ERR_INVALID_PATHNAME));
-    return MIstatus::failure;
-  }
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdSymbolListLines::Acknowledge() {
-  // MI print "%s^done,lines=[{pc=\"%d\",line=\"%d\"}...]"
-  const CMICmnMIValueResult miValueResult("lines", m_resultList);
-  m_miResultRecord = CMICmnMIResultRecord(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdSymbolListLines::CreateSelf() {
-  return new CMICmdCmdSymbolListLines();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSymbol.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSymbol.h
deleted file mode 100644
index 839b015..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdSymbol.h
+++ /dev/null
@@ -1,59 +0,0 @@
-//===-- MICmdCmdSymbol.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdSymbolListLines     interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// Third party headers:
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnMIValueList.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "symbol-list-lines".
-//--
-class CMICmdCmdSymbolListLines : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdSymbolListLines();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdSymbolListLines() override;
-
-  // Attributes:
-private:
-  CMICmnMIValueList m_resultList;
-  const CMIUtilString m_constStrArgNameFile;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTarget.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTarget.cpp
deleted file mode 100644
index 18ce038..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTarget.cpp
+++ /dev/null
@@ -1,447 +0,0 @@
-//===-- MICmdCmdTarget.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdTargetSelect           implementation.
-
-// Third Party Headers:
-#include "lldb/API/SBStream.h"
-#include "lldb/API/SBError.h"
-
-// In-house headers:
-#include "MICmdArgValNumber.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValString.h"
-#include "MICmdCmdTarget.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnMIOutOfBandRecord.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-
-//++
-// Details: CMICmdCmdTargetSelect constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdTargetSelect::CMICmdCmdTargetSelect()
-    : m_constStrArgNamedType("type"),
-      m_constStrArgNamedParameters("parameters") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "target-select";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdTargetSelect::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdTargetSelect destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdTargetSelect::~CMICmdCmdTargetSelect() = default;
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTargetSelect::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgNamedType, true, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgNamedParameters, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-//          Synopsis: -target-select type parameters ...
-//          Ref:
-//          http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTargetSelect::Execute() {
-  CMICMDBASE_GETOPTION(pArgType, String, m_constStrArgNamedType);
-  CMICMDBASE_GETOPTION(pArgParameters, String, m_constStrArgNamedParameters);
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBTarget target = rSessionInfo.GetTarget();
-
-  // Check we have a valid target.
-  // Note: target created via 'file-exec-and-symbols' command.
-  if (!target.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  // Verify that we are executing remotely.
-  const CMIUtilString &rRemoteType(pArgType->GetValue());
-  if (rRemoteType != "remote") {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_TYPE),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rRemoteType.c_str()));
-    return MIstatus::failure;
-  }
-
-  // Create a URL pointing to the remote gdb stub.
-  const CMIUtilString strUrl =
-      CMIUtilString::Format("connect://%s", pArgParameters->GetValue().c_str());
-
-  lldb::SBError error;
-  // Ask LLDB to connect to the target port.
-  const char *pPlugin("gdb-remote");
-  lldb::SBProcess process = target.ConnectRemote(
-      rSessionInfo.GetListener(), strUrl.c_str(), pPlugin, error);
-
-  // Verify that we have managed to connect successfully.
-  if (!process.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_PLUGIN),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   error.GetCString()));
-    return MIstatus::failure;
-  }
-
-  // Set the environment path if we were given one.
-  CMIUtilString strWkDir;
-  if (rSessionInfo.SharedDataRetrieve<CMIUtilString>(
-          rSessionInfo.m_constStrSharedDataKeyWkDir, strWkDir)) {
-    lldb::SBDebugger &rDbgr = rSessionInfo.GetDebugger();
-    if (!rDbgr.SetCurrentPlatformSDKRoot(strWkDir.c_str())) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_FNFAILED),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     "target-select"));
-      return MIstatus::failure;
-    }
-  }
-
-  // Set the shared object path if we were given one.
-  CMIUtilString strSolibPath;
-  if (rSessionInfo.SharedDataRetrieve<CMIUtilString>(
-          rSessionInfo.m_constStrSharedDataSolibPath, strSolibPath))
-    target.AppendImageSearchPath(".", strSolibPath.c_str(), error);
-
-  return HandleSBError(error);
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTargetSelect::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Connected);
-  m_miResultRecord = miRecordResult;
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::pid_t pid = rSessionInfo.GetProcess().GetProcessID();
-  // Prod the client i.e. Eclipse with out-of-band results to help it 'continue'
-  // because it is using LLDB debugger
-  // Give the client '=thread-group-started,id="i1"'
-  m_bHasResultRecordExtra = true;
-  const CMICmnMIValueConst miValueConst2("i1");
-  const CMICmnMIValueResult miValueResult2("id", miValueConst2);
-  const CMIUtilString strPid(CMIUtilString::Format("%lld", pid));
-  const CMICmnMIValueConst miValueConst(strPid);
-  const CMICmnMIValueResult miValueResult("pid", miValueConst);
-  CMICmnMIOutOfBandRecord miOutOfBand(
-      CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted, miValueResult2);
-  miOutOfBand.Add(miValueResult);
-  m_miResultRecordExtra = miOutOfBand.GetString();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdTargetSelect::CreateSelf() {
-  return new CMICmdCmdTargetSelect();
-}
-
-//++
-// Details: CMICmdCmdTargetAttach constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdTargetAttach::CMICmdCmdTargetAttach()
-    : m_constStrArgPid("pid"), m_constStrArgNamedFile("n"),
-      m_constStrArgWaitFor("waitfor") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "target-attach";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdTargetAttach::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdTargetAttach destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdTargetAttach::~CMICmdCmdTargetAttach() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTargetAttach::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgPid, false, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionShort(m_constStrArgNamedFile, false, true,
-                                  CMICmdArgValListBase::eArgValType_String, 1));
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionLong(m_constStrArgWaitFor, false, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-//          Synopsis: -target-attach file
-//          Ref:
-//          http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTargetAttach::Execute() {
-  CMICMDBASE_GETOPTION(pArgPid, Number, m_constStrArgPid);
-  CMICMDBASE_GETOPTION(pArgFile, OptionShort, m_constStrArgNamedFile);
-  CMICMDBASE_GETOPTION(pArgWaitFor, OptionLong, m_constStrArgWaitFor);
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  // If the current target is invalid, create one
-  lldb::SBTarget target = rSessionInfo.GetTarget();
-  if (!target.IsValid()) {
-    target = rSessionInfo.GetDebugger().CreateTarget(nullptr);
-    if (!target.IsValid()) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_TARGET_CURRENT),
-                                     m_cmdData.strMiCmd.c_str()));
-      return MIstatus::failure;
-    }
-  }
-
-  lldb::SBError error;
-  lldb::SBListener listener;
-  if (pArgPid->GetFound() && pArgPid->GetValid()) {
-    lldb::pid_t pid;
-    pid = pArgPid->GetValue();
-    target.AttachToProcessWithID(listener, pid, error);
-  } else if (pArgFile->GetFound() && pArgFile->GetValid()) {
-    bool bWaitFor = (pArgWaitFor->GetFound());
-    CMIUtilString file;
-    pArgFile->GetExpectedOption<CMICmdArgValString>(file);
-    target.AttachToProcessWithName(listener, file.c_str(), bWaitFor, error);
-  } else {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_ATTACH_BAD_ARGS),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBStream errMsg;
-  if (error.Fail()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_ATTACH_FAILED),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   errMsg.GetData()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTargetAttach::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::pid_t pid = rSessionInfo.GetProcess().GetProcessID();
-  // Prod the client i.e. Eclipse with out-of-band results to help it 'continue'
-  // because it is using LLDB debugger
-  // Give the client '=thread-group-started,id="i1"'
-  m_bHasResultRecordExtra = true;
-  const CMICmnMIValueConst miValueConst2("i1");
-  const CMICmnMIValueResult miValueResult2("id", miValueConst2);
-  const CMIUtilString strPid(CMIUtilString::Format("%lld", pid));
-  const CMICmnMIValueConst miValueConst(strPid);
-  const CMICmnMIValueResult miValueResult("pid", miValueConst);
-  CMICmnMIOutOfBandRecord miOutOfBand(
-      CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted, miValueResult2);
-  miOutOfBand.Add(miValueResult);
-  m_miResultRecordExtra = miOutOfBand.GetString();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdTargetAttach::CreateSelf() {
-  return new CMICmdCmdTargetAttach();
-}
-
-//++
-// Details: CMICmdCmdTargetDetach constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdTargetDetach::CMICmdCmdTargetDetach() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "target-detach";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdTargetDetach::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdTargetDetach destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdTargetDetach::~CMICmdCmdTargetDetach() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTargetDetach::ParseArgs() { return MIstatus::success; }
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-//          Synopsis: -target-attach file
-//          Ref:
-//          http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTargetDetach::Execute() {
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  lldb::SBProcess process = rSessionInfo.GetProcess();
-
-  if (!process.IsValid()) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_INVALID_PROCESS),
-                                   m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  process.Detach();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTargetDetach::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdTargetDetach::CreateSelf() {
-  return new CMICmdCmdTargetDetach();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTarget.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTarget.h
deleted file mode 100644
index 5cb140f..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTarget.h
+++ /dev/null
@@ -1,117 +0,0 @@
-//===-- MICmdCmdTarget.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdTargetSelect           interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "target-select".
-//          http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation
-//--
-class CMICmdCmdTargetSelect : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdTargetSelect();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdTargetSelect() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgNamedType;
-  const CMIUtilString m_constStrArgNamedParameters;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "target-attach".
-//          http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation
-//--
-class CMICmdCmdTargetAttach : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdTargetAttach();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdTargetAttach() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgPid;
-  const CMIUtilString m_constStrArgNamedFile;
-  const CMIUtilString m_constStrArgWaitFor;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "target-attach".
-//          http://sourceware.org/gdb/onlinedocs/gdb/GDB_002fMI-Target-Manipulation.html#GDB_002fMI-Target-Manipulation
-//--
-class CMICmdCmdTargetDetach : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdTargetDetach();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdTargetDetach() override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdThread.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdThread.cpp
deleted file mode 100644
index e0c74f9..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdThread.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-//===-- MICmdCmdThread.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdThreadInfo     implementation.
-
-// Third Party Headers:
-#include "lldb/API/SBBreakpointLocation.h"
-#include "lldb/API/SBThread.h"
-
-// In-house headers:
-#include "MICmdArgValNumber.h"
-#include "MICmdCmdThread.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-
-//++
-// Details: CMICmdCmdThreadInfo constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdThreadInfo::CMICmdCmdThreadInfo()
-    : m_bSingleThread(false), m_bThreadInvalid(true),
-      m_constStrArgNamedThreadId("thread-id"), m_bHasCurrentThread(false) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "thread-info";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdThreadInfo::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdThreadInfo destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdThreadInfo::~CMICmdCmdThreadInfo() { m_vecMIValueTuple.clear(); }
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdThreadInfo::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValNumber(m_constStrArgNamedThreadId, false, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdThreadInfo::Execute() {
-  CMICMDBASE_GETOPTION(pArgThreadId, Number, m_constStrArgNamedThreadId);
-  MIuint nThreadId = 0;
-  if (pArgThreadId->GetFound() && pArgThreadId->GetValid()) {
-    m_bSingleThread = true;
-    nThreadId = static_cast<MIuint>(pArgThreadId->GetValue());
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  lldb::SBThread thread = sbProcess.GetSelectedThread();
-
-  if (m_bSingleThread) {
-    thread = sbProcess.GetThreadByIndexID(nThreadId);
-    m_bThreadInvalid = !thread.IsValid();
-    if (m_bThreadInvalid)
-      return MIstatus::success;
-
-    CMICmnMIValueTuple miTuple;
-    if (!rSessionInfo.MIResponseFormThreadInfo(
-            m_cmdData, thread,
-            CMICmnLLDBDebugSessionInfo::eThreadInfoFormat_AllFrames, miTuple))
-      return MIstatus::failure;
-
-    m_miValueTupleThread = miTuple;
-
-    return MIstatus::success;
-  }
-
-  // Multiple threads
-  m_vecMIValueTuple.clear();
-  const MIuint nThreads = sbProcess.GetNumThreads();
-  for (MIuint i = 0; i < nThreads; i++) {
-    lldb::SBThread thread = sbProcess.GetThreadAtIndex(i);
-    if (thread.IsValid()) {
-      CMICmnMIValueTuple miTuple;
-      if (!rSessionInfo.MIResponseFormThreadInfo(
-              m_cmdData, thread,
-              CMICmnLLDBDebugSessionInfo::eThreadInfoFormat_AllFrames, miTuple))
-        return MIstatus::failure;
-
-      m_vecMIValueTuple.push_back(miTuple);
-    }
-  }
-
-  // -thread-info with multiple threads ends with the current thread id if any
-  if (thread.IsValid()) {
-    const CMIUtilString strId(CMIUtilString::Format("%d", thread.GetIndexID()));
-    CMICmnMIValueConst miValueCurrThreadId(strId);
-    m_miValueCurrThreadId = miValueCurrThreadId;
-    m_bHasCurrentThread = true;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdThreadInfo::Acknowledge() {
-  if (m_bSingleThread) {
-    if (m_bThreadInvalid) {
-      const CMICmnMIValueConst miValueConst("invalid thread id");
-      const CMICmnMIValueResult miValueResult("msg", miValueConst);
-      const CMICmnMIResultRecord miRecordResult(
-          m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-          miValueResult);
-      m_miResultRecord = miRecordResult;
-      return MIstatus::success;
-    }
-
-    // MI print
-    // "%s^done,threads=[{id=\"%d\",target-id=\"%s\",frame={},state=\"%s\"}]
-    const CMICmnMIValueList miValueList(m_miValueTupleThread);
-    const CMICmnMIValueResult miValueResult("threads", miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  // Build up a list of thread information from tuples
-  VecMIValueTuple_t::const_iterator it = m_vecMIValueTuple.begin();
-  if (it == m_vecMIValueTuple.end()) {
-    const CMICmnMIValueConst miValueConst("[]");
-    const CMICmnMIValueResult miValueResult("threads", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-  CMICmnMIValueList miValueList(*it);
-  ++it;
-  while (it != m_vecMIValueTuple.end()) {
-    const CMICmnMIValueTuple &rTuple(*it);
-    miValueList.Add(rTuple);
-
-    // Next
-    ++it;
-  }
-
-  CMICmnMIValueResult miValueResult("threads", miValueList);
-  if (m_bHasCurrentThread) {
-    CMIUtilString strCurrThreadId = "current-thread-id";
-    miValueResult.Add(strCurrThreadId, m_miValueCurrThreadId);
-  }
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdThreadInfo::CreateSelf() {
-  return new CMICmdCmdThreadInfo();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdThread.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdThread.h
deleted file mode 100644
index 413e293..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdThread.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//===-- MICmdCmdThread.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdThreadInfo interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "thread-info".
-//--
-class CMICmdCmdThreadInfo : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdThreadInfo();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdThreadInfo() override;
-
-  // Typedefs:
-private:
-  typedef std::vector<CMICmnMIValueTuple> VecMIValueTuple_t;
-
-  // Attributes:
-private:
-  CMICmnMIValueTuple m_miValueTupleThread;
-  bool m_bSingleThread;  // True = yes single thread, false = multiple threads
-  bool m_bThreadInvalid; // True = invalid, false = ok
-  VecMIValueTuple_t m_vecMIValueTuple;
-  const CMIUtilString m_constStrArgNamedThreadId;
-
-  // mi value of current-thread-id if multiple threads are requested
-  bool m_bHasCurrentThread;
-  CMICmnMIValue m_miValueCurrThreadId;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTrace.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTrace.cpp
deleted file mode 100644
index 1daa180..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTrace.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//===-- MICmdCmdTrace.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdTraceStatus    implementation.
-
-// In-house headers:
-#include "MICmdCmdTrace.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-
-//++
-// Details: CMICmdCmdTraceStatus constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdTraceStatus::CMICmdCmdTraceStatus() {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "trace-status";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdTraceStatus::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdTraceStatus destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdTraceStatus::~CMICmdCmdTraceStatus() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTraceStatus::Execute() {
-  // Do nothing
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdTraceStatus::Acknowledge() {
-  const CMICmnMIValueConst miValueConst(MIRSRC(IDS_CMD_ERR_NOT_IMPLEMENTED));
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdTraceStatus::CreateSelf() {
-  return new CMICmdCmdTraceStatus();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTrace.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTrace.h
deleted file mode 100644
index 8796de5..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdTrace.h
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- MICmdCmdTrace.h -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdTraceStatus            interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "trace-status".
-//--
-class CMICmdCmdTraceStatus : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdTraceStatus();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdTraceStatus() override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdVar.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdVar.cpp
deleted file mode 100644
index 3063b1b..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdVar.cpp
+++ /dev/null
@@ -1,1460 +0,0 @@
-//===-- MICmdCmdVar.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdVarCreate                  implementation.
-//              CMICmdCmdVarUpdate                  implementation.
-//              CMICmdCmdVarDelete                  implementation.
-//              CMICmdCmdVarAssign                  implementation.
-//              CMICmdCmdVarSetFormat               implementation.
-//              CMICmdCmdVarListChildren            implementation.
-//              CMICmdCmdVarEvaluateExpression      implementation.
-//              CMICmdCmdVarInfoPathExpression      implementation.
-//              CMICmdCmdVarShowAttributes          implementation.
-
-// Third Party Headers:
-#include "lldb/API/SBStream.h"
-#include "lldb/API/SBThread.h"
-#include "lldb/API/SBType.h"
-
-// In-house headers:
-#include "MICmdArgValListOfN.h"
-#include "MICmdArgValNumber.h"
-#include "MICmdArgValOptionLong.h"
-#include "MICmdArgValOptionShort.h"
-#include "MICmdArgValPrintValues.h"
-#include "MICmdArgValString.h"
-#include "MICmdArgValThreadGrp.h"
-#include "MICmdCmdVar.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnLLDBProxySBValue.h"
-#include "MICmnLLDBUtilSBValue.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-
-#include <algorithm>
-
-//++
-// Details: CMICmdCmdVarCreate constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarCreate::CMICmdCmdVarCreate()
-    : m_nChildren(0), m_nThreadId(0), m_strType("??"), m_bValid(false),
-      m_strValue("??"), m_constStrArgName("name"),
-      m_constStrArgFrameAddr("frame-addr"),
-      m_constStrArgExpression("expression") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "var-create";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdVarCreate::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdVarCreate destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarCreate::~CMICmdCmdVarCreate() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarCreate::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, false, true));
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgFrameAddr, false, true));
-  m_setCmdArgs.Add(
-      new CMICmdArgValString(m_constStrArgExpression, true, true, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarCreate::Execute() {
-  CMICMDBASE_GETOPTION(pArgThread, OptionLong, m_constStrArgThread);
-  CMICMDBASE_GETOPTION(pArgFrame, OptionLong, m_constStrArgFrame);
-  CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);
-  CMICMDBASE_GETOPTION(pArgFrameAddr, String, m_constStrArgFrameAddr);
-  CMICMDBASE_GETOPTION(pArgExpression, String, m_constStrArgExpression);
-
-  // Retrieve the --thread option's thread ID (only 1)
-  MIuint64 nThreadId = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgThread->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nThreadId)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgThread.c_str()));
-    return MIstatus::failure;
-  }
-
-  // Retrieve the --frame option's number
-  MIuint64 nFrame = UINT64_MAX;
-  if (pArgThread->GetFound() &&
-      !pArgFrame->GetExpectedOption<CMICmdArgValNumber, MIuint64>(nFrame)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   m_constStrArgFrame.c_str()));
-    return MIstatus::failure;
-  }
-
-  const CMICmdArgValOptionLong::VecArgObjPtr_t &rVecFrameId(
-      pArgFrame->GetExpectedOptions());
-  CMICmdArgValOptionLong::VecArgObjPtr_t::const_iterator it2 =
-      rVecFrameId.begin();
-  if (it2 != rVecFrameId.end()) {
-    const CMICmdArgValNumber *pOption = static_cast<CMICmdArgValNumber *>(*it2);
-    nFrame = pOption->GetValue();
-  }
-
-  m_strVarName = "<unnamedvariable>";
-  if (pArgName->GetFound()) {
-    const CMIUtilString &rArg = pArgName->GetValue();
-    const bool bAutoName = (rArg == "-");
-    if (bAutoName) {
-      m_strVarName = CMIUtilString::Format(
-          "var%u", CMICmnLLDBDebugSessionInfoVarObj::VarObjIdGet());
-      CMICmnLLDBDebugSessionInfoVarObj::VarObjIdInc();
-    } else
-      m_strVarName = rArg;
-  }
-
-  bool bCurrentFrame = false;
-  if (pArgFrameAddr->GetFound()) {
-    const CMIUtilString &rStrFrameAddr(pArgFrameAddr->GetValue());
-    bCurrentFrame = CMIUtilString::Compare(rStrFrameAddr, "*");
-    if (!bCurrentFrame && (nFrame == UINT64_MAX)) {
-      // FIXME: *addr isn't implemented. Exit with error if --thread isn't
-      // specified.
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_OPTION_NOT_FOUND),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     m_constStrArgFrame.c_str()));
-      return MIstatus::failure;
-    }
-  }
-
-  const CMIUtilString &rStrExpression(pArgExpression->GetValue());
-  m_strExpression = rStrExpression;
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  lldb::SBThread thread = (nThreadId != UINT64_MAX)
-                              ? sbProcess.GetThreadByIndexID(nThreadId)
-                              : sbProcess.GetSelectedThread();
-  m_nThreadId = thread.GetIndexID();
-  lldb::SBFrame frame = bCurrentFrame ? thread.GetSelectedFrame()
-                                      : thread.GetFrameAtIndex(nFrame);
-  lldb::SBValue value;
-
-  if (rStrExpression[0] == '$') {
-    const CMIUtilString rStrRegister(rStrExpression.substr(1));
-    value = frame.FindRegister(rStrRegister.c_str());
-  } else {
-    const bool bArgs = true;
-    const bool bLocals = true;
-    const bool bStatics = true;
-    const bool bInScopeOnly = true;
-    const lldb::SBValueList valueList =
-        frame.GetVariables(bArgs, bLocals, bStatics, bInScopeOnly);
-    value = valueList.GetFirstValueByName(rStrExpression.c_str());
-  }
-
-  if (!value.IsValid())
-    value = frame.EvaluateExpression(rStrExpression.c_str());
-
-  if (value.IsValid() && value.GetError().Success()) {
-    CompleteSBValue(value);
-    m_bValid = true;
-    m_nChildren = value.GetNumChildren();
-    m_strType = CMICmnLLDBUtilSBValue(value).GetTypeNameDisplay();
-
-    // This gets added to CMICmnLLDBDebugSessionInfoVarObj static container of
-    // varObjs
-    CMICmnLLDBDebugSessionInfoVarObj varObj(rStrExpression, m_strVarName,
-                                            value);
-    m_strValue = varObj.GetValueFormatted();
-  } else {
-    m_strValue = value.GetError().GetCString();
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarCreate::Acknowledge() {
-  if (m_bValid) {
-    // MI print
-    // "%s^done,name=\"%s\",numchild=\"%d\",value=\"%s\",type=\"%s\",thread-id=\"%llu\",has_more=\"%u\""
-    const CMICmnMIValueConst miValueConst(m_strVarName);
-    CMICmnMIValueResult miValueResultAll("name", miValueConst);
-    const CMIUtilString strNumChild(CMIUtilString::Format("%d", m_nChildren));
-    const CMICmnMIValueConst miValueConst2(strNumChild);
-    miValueResultAll.Add("numchild", miValueConst2);
-    const CMICmnMIValueConst miValueConst3(m_strValue);
-    miValueResultAll.Add("value", miValueConst3);
-    const CMICmnMIValueConst miValueConst4(m_strType);
-    miValueResultAll.Add("type", miValueConst4);
-    const CMIUtilString strThreadId(CMIUtilString::Format("%llu", m_nThreadId));
-    const CMICmnMIValueConst miValueConst5(strThreadId);
-    miValueResultAll.Add("thread-id", miValueConst5);
-    const CMICmnMIValueConst miValueConst6("0");
-    miValueResultAll.Add("has_more", miValueConst6);
-
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResultAll);
-    m_miResultRecord = miRecordResult;
-
-    return MIstatus::success;
-  }
-
-  CMIUtilString strErrMsg(m_strValue);
-  if (m_strValue.empty())
-    strErrMsg = CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_VARIABLE_CREATION_FAILED), m_strExpression.c_str());
-  const CMICmnMIValueConst miValueConst(
-      strErrMsg.Escape(true /* vbEscapeQuotes */));
-  CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdVarCreate::CreateSelf() {
-  return new CMICmdCmdVarCreate();
-}
-
-//++
-// Details: Complete SBValue object and its children to get
-// SBValue::GetValueDidChange
-//          work.
-// Type:    Method.
-// Args:    vrwValue    - (R)   Value to update.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-void CMICmdCmdVarCreate::CompleteSBValue(lldb::SBValue &vrwValue) {
-  // Force a value to update
-  vrwValue.GetValueDidChange();
-
-  // And update its children
-  lldb::SBType valueType = vrwValue.GetType();
-  if (!valueType.IsPointerType() && !valueType.IsReferenceType()) {
-    const MIuint nChildren = vrwValue.GetNumChildren();
-    for (MIuint i = 0; i < nChildren; ++i) {
-      lldb::SBValue member = vrwValue.GetChildAtIndex(i);
-      if (member.IsValid())
-        CompleteSBValue(member);
-    }
-  }
-}
-
-
-//++
-// Details: CMICmdCmdVarUpdate constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarUpdate::CMICmdCmdVarUpdate()
-    : m_constStrArgPrintValues("print-values"), m_constStrArgName("name"),
-      m_bValueChanged(false), m_miValueList(true) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "var-update";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdVarUpdate::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdVarUpdate destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarUpdate::~CMICmdCmdVarUpdate() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarUpdate::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true));
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarUpdate::Execute() {
-  CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);
-  CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);
-
-  CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat =
-      CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;
-  if (pArgPrintValues->GetFound())
-    eVarInfoFormat =
-        static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(
-            pArgPrintValues->GetValue());
-
-  const CMIUtilString &rVarObjName(pArgName->GetValue());
-  CMICmnLLDBDebugSessionInfoVarObj varObj;
-  if (!CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(rVarObjName, varObj)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_DOESNOTEXIST),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rVarObjName.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBValue &rValue = varObj.GetValue();
-  if (!ExamineSBValueForChange(rValue, m_bValueChanged))
-    return MIstatus::failure;
-
-  if (m_bValueChanged) {
-    varObj.UpdateValue();
-    const bool bPrintValue(
-        (eVarInfoFormat ==
-         CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues) ||
-        (eVarInfoFormat ==
-             CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues &&
-         rValue.GetNumChildren() == 0));
-    const CMIUtilString strValue(bPrintValue ? varObj.GetValueFormatted() : "");
-    const CMIUtilString strInScope(rValue.IsInScope() ? "true" : "false");
-    MIFormResponse(rVarObjName, bPrintValue ? strValue.c_str() : nullptr,
-                   strInScope);
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarUpdate::Acknowledge() {
-  if (m_bValueChanged) {
-    // MI print
-    // "%s^done,changelist=[{name=\"%s\",value=\"%s\",in_scope=\"%s\",type_changed=\"false\",has_more=\"0\"}]"
-    CMICmnMIValueResult miValueResult("changelist", m_miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-  } else {
-    // MI print "%s^done,changelist=[]"
-    const CMICmnMIValueList miValueList(true);
-    CMICmnMIValueResult miValueResult6("changelist", miValueList);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult6);
-    m_miResultRecord = miRecordResult;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdVarUpdate::CreateSelf() {
-  return new CMICmdCmdVarUpdate();
-}
-
-//++
-// Details: Form the MI response for multiple variables.
-// Type:    Method.
-// Args:    vrStrVarName    - (R)   Session var object's name.
-//          vpValue         - (R)   Text version of the value held in the
-//          variable.
-//          vrStrScope      - (R)   In scope "yes" or "no".
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdCmdVarUpdate::MIFormResponse(const CMIUtilString &vrStrVarName,
-                                        const char *const vpValue,
-                                        const CMIUtilString &vrStrScope) {
-  // MI print
-  // "[{name=\"%s\",value=\"%s\",in_scope=\"%s\",type_changed=\"false\",has_more=\"0\"}]"
-  const CMICmnMIValueConst miValueConst(vrStrVarName);
-  const CMICmnMIValueResult miValueResult("name", miValueConst);
-  CMICmnMIValueTuple miValueTuple(miValueResult);
-  if (vpValue != nullptr) {
-    const CMICmnMIValueConst miValueConst2(vpValue);
-    const CMICmnMIValueResult miValueResult2("value", miValueConst2);
-    miValueTuple.Add(miValueResult2);
-  }
-  const CMICmnMIValueConst miValueConst3(vrStrScope);
-  const CMICmnMIValueResult miValueResult3("in_scope", miValueConst3);
-  miValueTuple.Add(miValueResult3);
-  const CMICmnMIValueConst miValueConst4("false");
-  const CMICmnMIValueResult miValueResult4("type_changed", miValueConst4);
-  miValueTuple.Add(miValueResult4);
-  const CMICmnMIValueConst miValueConst5("0");
-  const CMICmnMIValueResult miValueResult5("has_more", miValueConst5);
-  miValueTuple.Add(miValueResult5);
-  m_miValueList.Add(miValueTuple);
-}
-
-//++
-// Details: Determine if the var object was changed.
-// Type:    Method.
-// Args:    vrVarObj    - (R)   Session var object to examine.
-//          vrwbChanged - (W)   True = The var object was changed,
-//                              False = It was not changed.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarUpdate::ExamineSBValueForChange(lldb::SBValue &vrwValue,
-                                                 bool &vrwbChanged) {
-  if (vrwValue.GetValueDidChange()) {
-    vrwbChanged = true;
-    return MIstatus::success;
-  }
-
-  const MIuint nChildren = vrwValue.GetNumChildren();
-  for (MIuint i = 0; i < nChildren; ++i) {
-    lldb::SBValue member = vrwValue.GetChildAtIndex(i);
-    if (!member.IsValid())
-      continue;
-
-    // skip pointers and references to avoid infinite loop
-    if (member.GetType().GetTypeFlags() &
-        (lldb::eTypeIsPointer | lldb::eTypeIsReference))
-      continue;
-
-    // Handle composite types (i.e. struct or arrays)
-    if (ExamineSBValueForChange(member, vrwbChanged) && vrwbChanged)
-      return MIstatus::success;
-  }
-  vrwbChanged = false;
-  return MIstatus::success;
-}
-
-
-//++
-// Details: CMICmdCmdVarDelete constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarDelete::CMICmdCmdVarDelete() : m_constStrArgName("name") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "var-delete";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdVarDelete::CreateSelf;
-}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarDelete::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: CMICmdCmdVarDelete destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarDelete::~CMICmdCmdVarDelete() {}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarDelete::Execute() {
-  CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);
-
-  const CMIUtilString &rVarObjName(pArgName->GetValue());
-  CMICmnLLDBDebugSessionInfoVarObj::VarObjDelete(rVarObjName);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarDelete::Acknowledge() {
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdVarDelete::CreateSelf() {
-  return new CMICmdCmdVarDelete();
-}
-
-
-//++
-// Details: CMICmdCmdVarAssign constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarAssign::CMICmdCmdVarAssign()
-    : m_bOk(true), m_constStrArgName("name"),
-      m_constStrArgExpression("expression") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "var-assign";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdVarAssign::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdVarAssign destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarAssign::~CMICmdCmdVarAssign() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarAssign::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgExpression, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarAssign::Execute() {
-  CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);
-  CMICMDBASE_GETOPTION(pArgExpression, String, m_constStrArgExpression);
-
-  const CMIUtilString &rVarObjName(pArgName->GetValue());
-  const CMIUtilString &rExpression(pArgExpression->GetValue());
-
-  CMICmnLLDBDebugSessionInfoVarObj varObj;
-  if (!CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(rVarObjName, varObj)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_DOESNOTEXIST),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rVarObjName.c_str()));
-    return MIstatus::failure;
-  }
-  m_varObjName = rVarObjName;
-
-  CMIUtilString strExpression(rExpression.Trim());
-  strExpression = strExpression.Trim('"');
-  lldb::SBValue &rValue(const_cast<lldb::SBValue &>(varObj.GetValue()));
-  m_bOk = rValue.SetValueFromCString(strExpression.c_str());
-  if (m_bOk)
-    varObj.UpdateValue();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarAssign::Acknowledge() {
-  if (m_bOk) {
-    // MI print "%s^done,value=\"%s\""
-    CMICmnLLDBDebugSessionInfoVarObj varObj;
-    CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(m_varObjName, varObj);
-    const CMICmnMIValueConst miValueConst(varObj.GetValueFormatted());
-    const CMICmnMIValueResult miValueResult("value", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-
-    return MIstatus::success;
-  }
-
-  const CMICmnMIValueConst miValueConst("expression could not be evaluated");
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdVarAssign::CreateSelf() {
-  return new CMICmdCmdVarAssign();
-}
-
-
-//++
-// Details: CMICmdCmdVarSetFormat constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarSetFormat::CMICmdCmdVarSetFormat()
-    : m_constStrArgName("name"), m_constStrArgFormatSpec("format-spec") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "var-set-format";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdVarSetFormat::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdVarSetFormat destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarSetFormat::~CMICmdCmdVarSetFormat() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarSetFormat::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgFormatSpec, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarSetFormat::Execute() {
-  CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);
-  CMICMDBASE_GETOPTION(pArgFormatSpec, String, m_constStrArgFormatSpec);
-
-  const CMIUtilString &rVarObjName(pArgName->GetValue());
-  const CMIUtilString &rExpression(pArgFormatSpec->GetValue());
-
-  CMICmnLLDBDebugSessionInfoVarObj varObj;
-  if (!CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(rVarObjName, varObj)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_DOESNOTEXIST),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rVarObjName.c_str()));
-    return MIstatus::failure;
-  }
-  if (!varObj.SetVarFormat(
-          CMICmnLLDBDebugSessionInfoVarObj::GetVarFormatForString(
-              rExpression))) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_ENUM_INVALID),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rVarObjName.c_str(), rExpression.c_str()));
-    return MIstatus::failure;
-  }
-  varObj.UpdateValue();
-
-  m_varObjName = rVarObjName;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarSetFormat::Acknowledge() {
-  // MI print
-  // "%s^done,changelist=[{name=\"%s\",value=\"%s\",in_scope=\"%s\",type_changed=\"false\",has_more=\"0\"}]"
-  CMICmnLLDBDebugSessionInfoVarObj varObj;
-  CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(m_varObjName, varObj);
-  const CMICmnMIValueConst miValueConst(m_varObjName);
-  const CMICmnMIValueResult miValueResult("name", miValueConst);
-  CMICmnMIValueTuple miValueTuple(miValueResult);
-  const CMICmnMIValueConst miValueConst2(varObj.GetValueFormatted());
-  const CMICmnMIValueResult miValueResult2("value", miValueConst2);
-  miValueTuple.Add(miValueResult2);
-  lldb::SBValue &rValue = const_cast<lldb::SBValue &>(varObj.GetValue());
-  const CMICmnMIValueConst miValueConst3(rValue.IsInScope() ? "true" : "false");
-  const CMICmnMIValueResult miValueResult3("in_scope", miValueConst3);
-  miValueTuple.Add(miValueResult3);
-  const CMICmnMIValueConst miValueConst4("false");
-  const CMICmnMIValueResult miValueResult4("type_changed", miValueConst4);
-  miValueTuple.Add(miValueResult4);
-  const CMICmnMIValueConst miValueConst5("0");
-  const CMICmnMIValueResult miValueResult5("type_changed", miValueConst5);
-  miValueTuple.Add(miValueResult5);
-  const CMICmnMIValueList miValueList(miValueTuple);
-  const CMICmnMIValueResult miValueResult6("changelist", miValueList);
-
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult6);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdVarSetFormat::CreateSelf() {
-  return new CMICmdCmdVarSetFormat();
-}
-
-
-//++
-// Details: CMICmdCmdVarListChildren constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarListChildren::CMICmdCmdVarListChildren()
-    : m_constStrArgPrintValues("print-values"), m_constStrArgName("name"),
-      m_constStrArgFrom("from"), m_constStrArgTo("to"), m_bValueValid(false),
-      m_nChildren(0), m_miValueList(true), m_bHasMore(false) {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "var-list-children";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdVarListChildren::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdVarListChildren destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarListChildren::~CMICmdCmdVarListChildren() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarListChildren::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValPrintValues(m_constStrArgPrintValues, false, true));
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true, true));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgFrom, false, true));
-  m_setCmdArgs.Add(new CMICmdArgValNumber(m_constStrArgTo, false, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarListChildren::Execute() {
-  CMICMDBASE_GETOPTION(pArgPrintValues, PrintValues, m_constStrArgPrintValues);
-  CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);
-  CMICMDBASE_GETOPTION(pArgFrom, Number, m_constStrArgFrom);
-  CMICMDBASE_GETOPTION(pArgTo, Number, m_constStrArgTo);
-
-  CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e eVarInfoFormat =
-      CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_NoValues;
-  if (pArgPrintValues->GetFound())
-    eVarInfoFormat =
-        static_cast<CMICmnLLDBDebugSessionInfo::VariableInfoFormat_e>(
-            pArgPrintValues->GetValue());
-
-  const CMIUtilString &rVarObjName(pArgName->GetValue());
-  CMICmnLLDBDebugSessionInfoVarObj varObj;
-  if (!CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(rVarObjName, varObj)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_DOESNOTEXIST),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rVarObjName.c_str()));
-    return MIstatus::failure;
-  }
-
-  MIuint nFrom = 0;
-  MIuint nTo = UINT32_MAX;
-  if (pArgFrom->GetFound() && pArgTo->GetFound()) {
-    nFrom = pArgFrom->GetValue();
-    nTo = pArgTo->GetValue();
-  } else if (pArgFrom->GetFound() || pArgTo->GetFound()) {
-    // Only from or to was specified but both are required
-    SetError(
-        CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_CHILD_RANGE_INVALID),
-                              m_cmdData.strMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBValue &rValue = const_cast<lldb::SBValue &>(varObj.GetValue());
-  m_bValueValid = rValue.IsValid();
-  if (!m_bValueValid)
-    return MIstatus::success;
-
-  const MIuint nChildren = rValue.GetNumChildren();
-  m_bHasMore = nTo < nChildren;
-  nTo = std::min(nTo, nChildren);
-  m_nChildren = nFrom < nTo ? nTo - nFrom : 0;
-  for (MIuint i = nFrom; i < nTo; i++) {
-    lldb::SBValue member = rValue.GetChildAtIndex(i);
-    const CMICmnLLDBUtilSBValue utilValue(member);
-    const CMIUtilString strExp = utilValue.GetName();
-    const CMIUtilString name(
-        strExp.empty() ? CMIUtilString::Format("%s.$%u", rVarObjName.c_str(), i)
-                       : CMIUtilString::Format("%s.%s", rVarObjName.c_str(),
-                                               strExp.c_str()));
-    const MIuint nChildren = member.GetNumChildren();
-    const CMIUtilString strThreadId(
-        CMIUtilString::Format("%u", member.GetThread().GetIndexID()));
-
-    // Varobj gets added to CMICmnLLDBDebugSessionInfoVarObj static container of
-    // varObjs
-    CMICmnLLDBDebugSessionInfoVarObj var(strExp, name, member, rVarObjName);
-
-    // MI print
-    // "child={name=\"%s\",exp=\"%s\",numchild=\"%d\",value=\"%s\",type=\"%s\",thread-id=\"%u\",has_more=\"%u\"}"
-    const CMICmnMIValueConst miValueConst(name);
-    const CMICmnMIValueResult miValueResult("name", miValueConst);
-    CMICmnMIValueTuple miValueTuple(miValueResult);
-    const CMICmnMIValueConst miValueConst2(strExp);
-    const CMICmnMIValueResult miValueResult2("exp", miValueConst2);
-    miValueTuple.Add(miValueResult2);
-    const CMIUtilString strNumChild(CMIUtilString::Format("%u", nChildren));
-    const CMICmnMIValueConst miValueConst3(strNumChild);
-    const CMICmnMIValueResult miValueResult3("numchild", miValueConst3);
-    miValueTuple.Add(miValueResult3);
-    const CMICmnMIValueConst miValueConst5(utilValue.GetTypeNameDisplay());
-    const CMICmnMIValueResult miValueResult5("type", miValueConst5);
-    miValueTuple.Add(miValueResult5);
-    const CMICmnMIValueConst miValueConst6(strThreadId);
-    const CMICmnMIValueResult miValueResult6("thread-id", miValueConst6);
-    miValueTuple.Add(miValueResult6);
-    // nChildren == 0 is used to check for simple values
-    if (eVarInfoFormat ==
-            CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_AllValues ||
-        (eVarInfoFormat ==
-             CMICmnLLDBDebugSessionInfo::eVariableInfoFormat_SimpleValues &&
-         nChildren == 0)) {
-      const CMIUtilString strValue(
-          CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted(
-              member, CMICmnLLDBDebugSessionInfoVarObj::eVarFormat_Natural));
-      const CMICmnMIValueConst miValueConst7(strValue);
-      const CMICmnMIValueResult miValueResult7("value", miValueConst7);
-      miValueTuple.Add(miValueResult7);
-    }
-    const CMICmnMIValueConst miValueConst8("0");
-    const CMICmnMIValueResult miValueResult8("has_more", miValueConst8);
-    miValueTuple.Add(miValueResult8);
-    const CMICmnMIValueResult miValueResult9("child", miValueTuple);
-    m_miValueList.Add(miValueResult9);
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarListChildren::Acknowledge() {
-  if (m_bValueValid) {
-    // MI print "%s^done,numchild=\"%u\",children=[%s],has_more=\"%d\""
-    const CMIUtilString strNumChild(CMIUtilString::Format("%u", m_nChildren));
-    const CMICmnMIValueConst miValueConst(strNumChild);
-    CMICmnMIValueResult miValueResult("numchild", miValueConst);
-    if (m_nChildren != 0)
-      miValueResult.Add("children", m_miValueList);
-    const CMIUtilString strHasMore(m_bHasMore ? "1" : "0");
-    const CMICmnMIValueConst miValueConst2(strHasMore);
-    miValueResult.Add("has_more", miValueConst2);
-
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-
-    return MIstatus::success;
-  }
-
-  // MI print "%s^error,msg=\"variable invalid\""
-  const CMICmnMIValueConst miValueConst("variable invalid");
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdVarListChildren::CreateSelf() {
-  return new CMICmdCmdVarListChildren();
-}
-
-
-//++
-// Details: CMICmdCmdVarEvaluateExpression constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarEvaluateExpression::CMICmdCmdVarEvaluateExpression()
-    : m_bValueValid(true), m_constStrArgFormatSpec("-f"),
-      m_constStrArgName("name") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "var-evaluate-expression";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdVarEvaluateExpression::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdVarEvaluateExpression destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarEvaluateExpression::~CMICmdCmdVarEvaluateExpression() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarEvaluateExpression::ParseArgs() {
-  m_setCmdArgs.Add(
-      new CMICmdArgValOptionShort(m_constStrArgFormatSpec, false, false,
-                                  CMICmdArgValListBase::eArgValType_String, 1));
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarEvaluateExpression::Execute() {
-  CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);
-
-  const CMIUtilString &rVarObjName(pArgName->GetValue());
-  CMICmnLLDBDebugSessionInfoVarObj varObj;
-  if (!CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(rVarObjName, varObj)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_DOESNOTEXIST),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rVarObjName.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBValue &rValue = const_cast<lldb::SBValue &>(varObj.GetValue());
-  m_bValueValid = rValue.IsValid();
-  if (!m_bValueValid)
-    return MIstatus::success;
-
-  m_varObjName = rVarObjName;
-  varObj.UpdateValue();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarEvaluateExpression::Acknowledge() {
-  if (m_bValueValid) {
-    CMICmnLLDBDebugSessionInfoVarObj varObj;
-    CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(m_varObjName, varObj);
-    const CMICmnMIValueConst miValueConst(varObj.GetValueFormatted());
-    const CMICmnMIValueResult miValueResult("value", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  const CMICmnMIValueConst miValueConst("variable invalid");
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdVarEvaluateExpression::CreateSelf() {
-  return new CMICmdCmdVarEvaluateExpression();
-}
-
-
-//++
-// Details: CMICmdCmdVarInfoPathExpression constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarInfoPathExpression::CMICmdCmdVarInfoPathExpression()
-    : m_bValueValid(true), m_constStrArgName("name") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "var-info-path-expression";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdVarInfoPathExpression::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdVarInfoPathExpression destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarInfoPathExpression::~CMICmdCmdVarInfoPathExpression() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarInfoPathExpression::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarInfoPathExpression::Execute() {
-  CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);
-
-  const CMIUtilString &rVarObjName(pArgName->GetValue());
-  CMICmnLLDBDebugSessionInfoVarObj varObj;
-  if (!CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(rVarObjName, varObj)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_DOESNOTEXIST),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rVarObjName.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBValue &rValue = const_cast<lldb::SBValue &>(varObj.GetValue());
-  m_bValueValid = rValue.IsValid();
-  if (!m_bValueValid)
-    return MIstatus::success;
-
-  lldb::SBStream stream;
-  if (!rValue.GetExpressionPath(stream, true)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_EXPRESSIONPATH),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rVarObjName.c_str()));
-    return MIstatus::failure;
-  }
-
-  const char *pPathExpression = stream.GetData();
-  if (pPathExpression == nullptr) {
-    // Build expression from what we do know
-    m_strPathExpression = varObj.GetNameReal();
-    return MIstatus::success;
-  }
-
-  // Has LLDB returned a var signature of it's own
-  if (pPathExpression[0] != '$') {
-    m_strPathExpression = pPathExpression;
-    return MIstatus::success;
-  }
-
-  // Build expression from what we do know
-  const CMIUtilString &rVarParentName(varObj.GetVarParentName());
-  if (rVarParentName.empty()) {
-    m_strPathExpression = varObj.GetNameReal();
-  } else {
-    CMICmnLLDBDebugSessionInfoVarObj varObjParent;
-    if (!CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(rVarParentName,
-                                                     varObjParent)) {
-      SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_DOESNOTEXIST),
-                                     m_cmdData.strMiCmd.c_str(),
-                                     rVarParentName.c_str()));
-      return MIstatus::failure;
-    }
-    m_strPathExpression =
-        CMIUtilString::Format("%s.%s", varObjParent.GetNameReal().c_str(),
-                              varObj.GetNameReal().c_str());
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarInfoPathExpression::Acknowledge() {
-  if (m_bValueValid) {
-    const CMICmnMIValueConst miValueConst(m_strPathExpression);
-    const CMICmnMIValueResult miValueResult("path_expr", miValueConst);
-    const CMICmnMIResultRecord miRecordResult(
-        m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-        miValueResult);
-    m_miResultRecord = miRecordResult;
-    return MIstatus::success;
-  }
-
-  const CMICmnMIValueConst miValueConst("variable invalid");
-  const CMICmnMIValueResult miValueResult("msg", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdVarInfoPathExpression::CreateSelf() {
-  return new CMICmdCmdVarInfoPathExpression();
-}
-
-
-//++
-// Details: CMICmdCmdVarShowAttributes constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarShowAttributes::CMICmdCmdVarShowAttributes()
-    : m_constStrArgName("name") {
-  // Command factory matches this name with that received from the stdin stream
-  m_strMiCmd = "var-show-attributes";
-
-  // Required by the CMICmdFactory when registering *this command
-  m_pSelfCreatorFn = &CMICmdCmdVarShowAttributes::CreateSelf;
-}
-
-//++
-// Details: CMICmdCmdVarShowAttributes destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdCmdVarShowAttributes::~CMICmdCmdVarShowAttributes() {}
-
-//++
-// Details: The invoker requires this function. The parses the command line
-// options
-//          arguments to extract values for each of those arguments.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarShowAttributes::ParseArgs() {
-  m_setCmdArgs.Add(new CMICmdArgValString(m_constStrArgName, true, true));
-  return ParseValidateCmdOptions();
-}
-
-//++
-// Details: The invoker requires this function. The command does work in this
-// function.
-//          The command is likely to communicate with the LLDB SBDebugger in
-//          here.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarShowAttributes::Execute() {
-  CMICMDBASE_GETOPTION(pArgName, String, m_constStrArgName);
-
-  const CMIUtilString &rVarObjName(pArgName->GetValue());
-  CMICmnLLDBDebugSessionInfoVarObj varObj;
-  if (!CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(rVarObjName, varObj)) {
-    SetError(CMIUtilString::Format(MIRSRC(IDS_CMD_ERR_VARIABLE_DOESNOTEXIST),
-                                   m_cmdData.strMiCmd.c_str(),
-                                   rVarObjName.c_str()));
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The invoker requires this function. The command prepares a MI Record
-// Result
-//          for the work carried out in the Execute().
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdCmdVarShowAttributes::Acknowledge() {
-  // MI output: "%s^done,status=\"editable\"]"
-  const CMICmnMIValueConst miValueConst("editable");
-  const CMICmnMIValueResult miValueResult("status", miValueConst);
-  const CMICmnMIResultRecord miRecordResult(
-      m_cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Done,
-      miValueResult);
-  m_miResultRecord = miRecordResult;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Required by the CMICmdFactory when registering *this command. The
-// factory
-//          calls this function to create an instance of *this command.
-// Type:    Static method.
-// Args:    None.
-// Return:  CMICmdBase * - Pointer to a new command.
-// Throws:  None.
-//--
-CMICmdBase *CMICmdCmdVarShowAttributes::CreateSelf() {
-  return new CMICmdCmdVarShowAttributes();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdVar.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdVar.h
deleted file mode 100644
index cdd0366..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCmdVar.h
+++ /dev/null
@@ -1,348 +0,0 @@
-//===-- MICmdCmdVar.h -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    CMICmdCmdVarCreate              interface.
-//              CMICmdCmdVarUpdate              interface.
-//              CMICmdCmdVarDelete              interface.
-//              CMICmdCmdVarAssign              interface.
-//              CMICmdCmdVarSetFormat           interface.
-//              CMICmdCmdVarListChildren        interface.
-//              CMICmdCmdVarEvaluateExpression  interface.
-//              CMICmdCmdVarInfoPathExpression  interface.
-//              CMICmdCmdVarShowAttributes      interface.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-//              For an introduction to adding a new command see
-//              CMICmdCmdSupportInfoMiCmdQuery
-//              command class as an example.
-
-#pragma once
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugSessionInfoVarObj.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-
-// Declarations:
-class CMICmnLLDBDebugSessionInfoVarObj;
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "var-create".
-//--
-class CMICmdCmdVarCreate : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdVarCreate();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdVarCreate() override;
-
-  // Methods:
-private:
-  void CompleteSBValue(lldb::SBValue &vrwValue);
-
-  // Attribute:
-private:
-  CMIUtilString m_strVarName;
-  MIuint m_nChildren;
-  MIuint64 m_nThreadId;
-  CMIUtilString m_strType;
-  bool m_bValid; // True = Variable is valid, false = not valid
-  CMIUtilString m_strExpression;
-  CMIUtilString m_strValue;
-  const CMIUtilString m_constStrArgName;
-  const CMIUtilString m_constStrArgFrameAddr;
-  const CMIUtilString m_constStrArgExpression;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "var-update".
-//--
-class CMICmdCmdVarUpdate : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdVarUpdate();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdVarUpdate() override;
-
-  // Methods:
-private:
-  bool ExamineSBValueForChange(lldb::SBValue &vrwValue, bool &vrwbChanged);
-  void MIFormResponse(const CMIUtilString &vrStrVarName,
-                      const char *const vpValue,
-                      const CMIUtilString &vrStrScope);
-
-  // Attribute:
-private:
-  const CMIUtilString m_constStrArgPrintValues;
-  const CMIUtilString m_constStrArgName;
-  bool m_bValueChanged; // True = yes value changed, false = no change
-  CMICmnMIValueList m_miValueList;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "var-delete".
-//--
-class CMICmdCmdVarDelete : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdVarDelete();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdVarDelete() override;
-
-  // Attribute:
-private:
-  const CMIUtilString m_constStrArgName;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "var-assign".
-//--
-class CMICmdCmdVarAssign : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdVarAssign();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdVarAssign() override;
-
-  // Attributes:
-private:
-  bool m_bOk; // True = success, false = failure
-  CMIUtilString m_varObjName;
-  const CMIUtilString m_constStrArgName;
-  const CMIUtilString m_constStrArgExpression;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "var-set-format".
-//--
-class CMICmdCmdVarSetFormat : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdVarSetFormat();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdVarSetFormat() override;
-
-  // Attributes:
-private:
-  CMIUtilString m_varObjName;
-  const CMIUtilString m_constStrArgName;
-  const CMIUtilString m_constStrArgFormatSpec;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "var-list-children".
-//--
-class CMICmdCmdVarListChildren : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdVarListChildren();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdVarListChildren() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgPrintValues;
-  const CMIUtilString m_constStrArgName;
-  const CMIUtilString m_constStrArgFrom;
-  const CMIUtilString m_constStrArgTo;
-  bool m_bValueValid; // True = yes SBValue object is valid, false = not valid
-  MIuint m_nChildren;
-  CMICmnMIValueList m_miValueList;
-  bool m_bHasMore;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "var-evaluate-expression".
-//--
-class CMICmdCmdVarEvaluateExpression : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdVarEvaluateExpression();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdVarEvaluateExpression() override;
-
-  // Attributes:
-private:
-  bool m_bValueValid; // True = yes SBValue object is valid, false = not valid
-  CMIUtilString m_varObjName;
-  const CMIUtilString m_constStrArgFormatSpec; // Not handled by *this command
-  const CMIUtilString m_constStrArgName;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "var-info-path-expression".
-//--
-class CMICmdCmdVarInfoPathExpression : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdVarInfoPathExpression();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdVarInfoPathExpression() override;
-
-  // Attributes:
-private:
-  bool m_bValueValid; // True = yes SBValue object is valid, false = not valid
-  CMIUtilString m_strPathExpression;
-  const CMIUtilString m_constStrArgName;
-};
-
-//++
-//============================================================================
-// Details: MI command class. MI commands derived from the command base class.
-//          *this class implements MI command "var-show-attributes".
-//--
-class CMICmdCmdVarShowAttributes : public CMICmdBase {
-  // Statics:
-public:
-  // Required by the CMICmdFactory when registering *this command
-  static CMICmdBase *CreateSelf();
-
-  // Methods:
-public:
-  /* ctor */ CMICmdCmdVarShowAttributes();
-
-  // Overridden:
-public:
-  // From CMICmdInvoker::ICmd
-  bool Execute() override;
-  bool Acknowledge() override;
-  bool ParseArgs() override;
-  // From CMICmnBase
-  /* dtor */ ~CMICmdCmdVarShowAttributes() override;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constStrArgName;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCommands.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdCommands.cpp
deleted file mode 100644
index cffc50a..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCommands.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-//===-- MICmdCommands.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    MI command are registered with the MI command factory.
-//
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-
-// In-house headers:
-#include "MICmdCommands.h"
-#include "MICmdCmd.h"
-#include "MICmdCmdBreak.h"
-#include "MICmdCmdData.h"
-#include "MICmdCmdEnviro.h"
-#include "MICmdCmdExec.h"
-#include "MICmdCmdFile.h"
-#include "MICmdCmdGdbInfo.h"
-#include "MICmdCmdGdbSet.h"
-#include "MICmdCmdGdbShow.h"
-#include "MICmdCmdGdbThread.h"
-#include "MICmdCmdMiscellanous.h"
-#include "MICmdCmdStack.h"
-#include "MICmdCmdSupportInfo.h"
-#include "MICmdCmdSupportList.h"
-#include "MICmdCmdSymbol.h"
-#include "MICmdCmdTarget.h"
-#include "MICmdCmdThread.h"
-#include "MICmdCmdTrace.h"
-#include "MICmdCmdVar.h"
-#include "MICmdFactory.h"
-
-namespace MICmnCommands {
-template <typename T> static bool Register();
-}
-
-//++
-// Details: Command to command factory registration function.
-// Type:    Template function.
-// Args:    typename T  - A command type class.
-// Return:  bool  - True = yes command is registered, false = command failed to
-// register.
-// Throws:  None.
-//--
-template <typename T> static bool MICmnCommands::Register() {
-  static CMICmdFactory &rCmdFactory = CMICmdFactory::Instance();
-  const CMIUtilString strMiCmd = T().GetMiCmd();
-  CMICmdFactory::CmdCreatorFnPtr fn = T().GetCmdCreatorFn();
-  return rCmdFactory.CmdRegister(strMiCmd, fn);
-}
-
-//++
-// Details: Register commands with MI command factory
-// Type:    Function.
-// Args:    None.
-// Return:  bool  - True = yes all commands are registered,
-//                  false = one or more commands failed to register.
-// Throws:  None.
-//--
-bool MICmnCommands::RegisterAll() {
-  bool bOk = MIstatus::success;
-
-  bOk &= Register<CMICmdCmdSupportInfoMiCmdQuery>();
-  bOk &= Register<CMICmdCmdBreakAfter>();
-  bOk &= Register<CMICmdCmdBreakCondition>();
-  bOk &= Register<CMICmdCmdBreakDelete>();
-  bOk &= Register<CMICmdCmdBreakDisable>();
-  bOk &= Register<CMICmdCmdBreakEnable>();
-  bOk &= Register<CMICmdCmdBreakInsert>();
-  bOk &= Register<CMICmdCmdDataDisassemble>();
-  bOk &= Register<CMICmdCmdDataEvaluateExpression>();
-  bOk &= Register<CMICmdCmdDataInfoLine>();
-  bOk &= Register<CMICmdCmdDataReadMemoryBytes>();
-  bOk &= Register<CMICmdCmdDataReadMemory>();
-  bOk &= Register<CMICmdCmdDataListRegisterNames>();
-  bOk &= Register<CMICmdCmdDataListRegisterValues>();
-  bOk &= Register<CMICmdCmdDataWriteMemory>();
-  bOk &= Register<CMICmdCmdEnablePrettyPrinting>();
-  bOk &= Register<CMICmdCmdEnvironmentCd>();
-  bOk &= Register<CMICmdCmdExecAbort>();
-  bOk &= Register<CMICmdCmdExecArguments>();
-  bOk &= Register<CMICmdCmdExecContinue>();
-  bOk &= Register<CMICmdCmdExecInterrupt>();
-  bOk &= Register<CMICmdCmdExecFinish>();
-  bOk &= Register<CMICmdCmdExecNext>();
-  bOk &= Register<CMICmdCmdExecNextInstruction>();
-  bOk &= Register<CMICmdCmdExecRun>();
-  bOk &= Register<CMICmdCmdExecStep>();
-  bOk &= Register<CMICmdCmdExecStepInstruction>();
-  bOk &= Register<CMICmdCmdFileExecAndSymbols>();
-  bOk &= Register<CMICmdCmdGdbExit>();
-  bOk &= Register<CMICmdCmdGdbInfo>();
-  bOk &= Register<CMICmdCmdGdbSet>();
-  bOk &= Register<CMICmdCmdGdbShow>();
-  bOk &= Register<CMICmdCmdGdbThread>();
-  bOk &= Register<CMICmdCmdInferiorTtySet>();
-  bOk &= Register<CMICmdCmdInterpreterExec>();
-  bOk &= Register<CMICmdCmdListThreadGroups>();
-  bOk &= Register<CMICmdCmdSource>();
-  bOk &= Register<CMICmdCmdStackInfoDepth>();
-  bOk &= Register<CMICmdCmdStackInfoFrame>();
-  bOk &= Register<CMICmdCmdStackListFrames>();
-  bOk &= Register<CMICmdCmdStackListArguments>();
-  bOk &= Register<CMICmdCmdStackListLocals>();
-  bOk &= Register<CMICmdCmdStackListVariables>();
-  bOk &= Register<CMICmdCmdStackSelectFrame>();
-  bOk &= Register<CMICmdCmdSupportListFeatures>();
-  bOk &= Register<CMICmdCmdSymbolListLines>();
-  bOk &= Register<CMICmdCmdTargetSelect>();
-  bOk &= Register<CMICmdCmdTargetAttach>();
-  bOk &= Register<CMICmdCmdTargetDetach>();
-  bOk &= Register<CMICmdCmdThreadInfo>();
-  bOk &= Register<CMICmdCmdVarAssign>();
-  bOk &= Register<CMICmdCmdVarCreate>();
-  bOk &= Register<CMICmdCmdVarDelete>();
-  bOk &= Register<CMICmdCmdVarEvaluateExpression>();
-  bOk &= Register<CMICmdCmdVarInfoPathExpression>();
-  bOk &= Register<CMICmdCmdVarListChildren>();
-  bOk &= Register<CMICmdCmdVarSetFormat>();
-  bOk &= Register<CMICmdCmdVarShowAttributes>();
-  bOk &= Register<CMICmdCmdVarUpdate>();
-
-  return bOk;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdCommands.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdCommands.h
deleted file mode 100644
index f2e3bfd..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdCommands.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- MICmdCommands.h -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-namespace MICmnCommands {
-
-//++
-//============================================================================
-// Details: MI Command are instantiated and registered automatically with the
-//          Command Factory
-//--
-bool RegisterAll();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdData.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdData.cpp
deleted file mode 100644
index 6d0b679..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdData.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-//===-- MICmdData.cpp -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdData.h"
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdData.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdData.h
deleted file mode 100644
index 3e46b54..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdData.h
+++ /dev/null
@@ -1,58 +0,0 @@
-//===-- MICmdData.h ---------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnResources.h"
-
-//++
-//============================================================================
-// Details: MI command metadata. Holds the command's name, MI number and options
-//          as found on stdin. Holds the command's MI output (written to
-//          stdout).
-//--
-struct SMICmdData {
-  SMICmdData()
-      : id(0), bCmdValid(false), bCmdExecutedSuccessfully(false),
-        bMIOldStyle(false), bHasResultRecordExtra(false) {}
-
-  MIuint id;                    // A command's unique ID i.e. GUID
-  CMIUtilString strMiCmdToken;  // The command's MI token (a number)
-  CMIUtilString strMiCmd;       // The command's name
-  CMIUtilString strMiCmdOption; // The command's arguments or options
-  CMIUtilString strMiCmdAll;    // The text as received from the client
-  CMIUtilString
-      strMiCmdResultRecord; // Each command forms 1 response to its input
-  CMIUtilString strMiCmdResultRecordExtra; // Hack command produce more response
-                                           // text to help the client because of
-                                           // using LLDB
-  bool bCmdValid; // True = Valid MI format command, false = invalid
-  bool bCmdExecutedSuccessfully; // True = Command finished successfully, false
-                                 // = Did not start/did not complete
-  CMIUtilString strErrorDescription; // Command failed this is why
-  bool bMIOldStyle; // True = format "3thread", false = format "3-thread"
-  bool bHasResultRecordExtra; // True = Yes command produced additional MI
-                              // output to its 1 line response, false = no extra
-                              // MI output formed
-
-  void Clear() {
-    id = 0;
-    strMiCmdToken.clear();
-    strMiCmd = MIRSRC(IDS_CMD_ERR_CMD_RUN_BUT_NO_ACTION);
-    strMiCmdOption.clear();
-    strMiCmdAll.clear();
-    strMiCmdResultRecord.clear();
-    strMiCmdResultRecordExtra.clear();
-    bCmdValid = false;
-    bCmdExecutedSuccessfully = false;
-    strErrorDescription.clear();
-    bMIOldStyle = false;
-    bHasResultRecordExtra = false;
-  }
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdFactory.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdFactory.cpp
deleted file mode 100644
index 3099583..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdFactory.cpp
+++ /dev/null
@@ -1,206 +0,0 @@
-//===-- MICmdFactory.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdFactory.h"
-#include "MICmdBase.h"
-#include "MICmdCommands.h"
-#include "MICmdData.h"
-#include "MICmnResources.h"
-
-//++
-// Details: CMICmdFactory constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdFactory::CMICmdFactory() {}
-
-//++
-// Details: CMICmdFactory destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdFactory::~CMICmdFactory() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this Command factory.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdFactory::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = true;
-
-  MICmnCommands::RegisterAll();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Release resources for *this Command Factory.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdFactory::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_mapMiCmdToCmdCreatorFn.clear();
-
-  m_bInitialized = false;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Register a command's creator function with the command identifier
-// the MI
-//          command name i.e. 'file-exec-and-symbols'.
-// Type:    Method.
-// Args:    vMiCmd          - (R) Command's name, the MI command.
-//          vCmdCreateFn    - (R) Command's creator function pointer.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdFactory::CmdRegister(const CMIUtilString &vMiCmd,
-                                CmdCreatorFnPtr vCmdCreateFn) {
-  if (!IsValid(vMiCmd)) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_CMDFACTORY_ERR_INVALID_CMD_NAME), vMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-  if (vCmdCreateFn == nullptr) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_CMDFACTORY_ERR_INVALID_CMD_CR8FN), vMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  if (HaveAlready(vMiCmd)) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_CMDFACTORY_ERR_CMD_ALREADY_REGED), vMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  MapPairMiCmdToCmdCreatorFn_t pr(vMiCmd, vCmdCreateFn);
-  m_mapMiCmdToCmdCreatorFn.insert(pr);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Check a command is already registered.
-// Type:    Method.
-// Args:    vMiCmd  - (R) Command's name, the MI command.
-// Return:  True - registered.
-//          False - not found.
-// Throws:  None.
-//--
-bool CMICmdFactory::HaveAlready(const CMIUtilString &vMiCmd) const {
-  const MapMiCmdToCmdCreatorFn_t::const_iterator it =
-      m_mapMiCmdToCmdCreatorFn.find(vMiCmd);
-  return it != m_mapMiCmdToCmdCreatorFn.end();
-}
-
-//++
-// Details: Check a command's name is valid:
-//              - name is not empty
-//              - name does not have spaces
-// Type:    Method.
-// Args:    vMiCmd  - (R) Command's name, the MI command.
-// Return:  True - valid.
-//          False - not valid.
-// Throws:  None.
-//--
-bool CMICmdFactory::IsValid(const CMIUtilString &vMiCmd) const {
-  bool bValid = true;
-
-  if (vMiCmd.empty()) {
-    bValid = false;
-    return false;
-  }
-
-  const size_t nPos = vMiCmd.find(' ');
-  if (nPos != std::string::npos)
-    bValid = false;
-
-  return bValid;
-}
-
-//++
-// Details: Check a command is already registered.
-// Type:    Method.
-// Args:    vMiCmd  - (R) Command's name, the MI command.
-// Return:  True - registered.
-//          False - not found.
-// Throws:  None.
-//--
-bool CMICmdFactory::CmdExist(const CMIUtilString &vMiCmd) const {
-  return HaveAlready(vMiCmd);
-}
-
-//++
-// Details: Create a command given the specified MI command name. The command
-// data object
-//          contains the options for the command.
-// Type:    Method.
-// Args:    vMiCmd      - (R) Command's name, the MI command.
-//          vCmdData    - (RW) Command's metadata status/information/result
-//          object.
-//          vpNewCmd    - (W) New command instance.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdFactory::CmdCreate(const CMIUtilString &vMiCmd,
-                              const SMICmdData &vCmdData,
-                              CMICmdBase *&vpNewCmd) {
-  vpNewCmd = nullptr;
-
-  if (!IsValid(vMiCmd)) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_CMDFACTORY_ERR_INVALID_CMD_NAME), vMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-  if (!HaveAlready(vMiCmd)) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_CMDFACTORY_ERR_CMD_NOT_REGISTERED), vMiCmd.c_str()));
-    return MIstatus::failure;
-  }
-
-  const MapMiCmdToCmdCreatorFn_t::const_iterator it =
-      m_mapMiCmdToCmdCreatorFn.find(vMiCmd);
-  const CMIUtilString &rMiCmd((*it).first);
-  MIunused(rMiCmd);
-  CmdCreatorFnPtr pFn = (*it).second;
-  CMICmdBase *pCmd = (*pFn)();
-
-  SMICmdData cmdData(vCmdData);
-  cmdData.id = pCmd->GetGUID();
-  pCmd->SetCmdData(cmdData);
-  vpNewCmd = pCmd;
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdFactory.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdFactory.h
deleted file mode 100644
index 19987c2..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdFactory.h
+++ /dev/null
@@ -1,84 +0,0 @@
-//===-- MICmdFactory.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers
-#include <map>
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-
-// Declarations:
-class CMICmdBase;
-struct SMICmdData;
-
-//++
-//============================================================================
-// Details: MI Command Factory. Holds a list of registered MI commands that
-//          MI application understands to interpret. Creates commands objects.
-//          The Command Factory is carried out in the main thread.
-//          A singleton class.
-//--
-class CMICmdFactory : public CMICmnBase, public MI::ISingleton<CMICmdFactory> {
-  friend class MI::ISingleton<CMICmdFactory>;
-
-  // Typedefs:
-public:
-  typedef CMICmdBase *(*CmdCreatorFnPtr)();
-
-  // Class:
-public:
-  //++
-  // Description: Command's factory's interface for commands to implement.
-  //--
-  class ICmd {
-  public:
-    virtual const CMIUtilString &GetMiCmd() const = 0;
-    virtual CmdCreatorFnPtr GetCmdCreatorFn() const = 0;
-    // virtual CMICmdBase *         CreateSelf( void ) = 0;             // Not
-    // possible as require a static creator
-    // function in the command class, here for awareness
-
-    /* dtor */ virtual ~ICmd() {}
-  };
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-  bool CmdRegister(const CMIUtilString &vMiCmd, CmdCreatorFnPtr vCmdCreateFn);
-  bool CmdCreate(const CMIUtilString &vMiCmd, const SMICmdData &vCmdData,
-                 CMICmdBase *&vpNewCmd);
-  bool CmdExist(const CMIUtilString &vMiCmd) const;
-
-  // Methods:
-private:
-  /* ctor */ CMICmdFactory();
-  /* ctor */ CMICmdFactory(const CMICmdFactory &);
-  void operator=(const CMICmdFactory &);
-
-  bool HaveAlready(const CMIUtilString &vMiCmd) const;
-  bool IsValid(const CMIUtilString &vMiCmd) const;
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmdFactory() override;
-
-  // Typedefs:
-private:
-  typedef std::map<CMIUtilString, CmdCreatorFnPtr> MapMiCmdToCmdCreatorFn_t;
-  typedef std::pair<CMIUtilString, CmdCreatorFnPtr>
-      MapPairMiCmdToCmdCreatorFn_t;
-
-  // Attributes:
-private:
-  MapMiCmdToCmdCreatorFn_t m_mapMiCmdToCmdCreatorFn;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdInterpreter.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdInterpreter.cpp
deleted file mode 100644
index 9e37ac2..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdInterpreter.cpp
+++ /dev/null
@@ -1,290 +0,0 @@
-//===-- MICmdInterpreter.cpp ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdInterpreter.h"
-#include "MICmdFactory.h"
-
-//++
-// Details: CMICmdInterpreter constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdInterpreter::CMICmdInterpreter()
-    : m_rCmdFactory(CMICmdFactory::Instance()) {}
-
-//++
-// Details: CMICmdInterpreter destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdInterpreter::~CMICmdInterpreter() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this Command Interpreter.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdInterpreter::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = true;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Release resources for *this Command Interpreter.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdInterpreter::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = false;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Establish whether the text data is an MI format type command.
-// Type:    Method.
-// Args:    vTextLine               - (R) Text data to interpret.
-//          vwbYesValid             - (W) True = MI type command, false = not
-//          recognised.
-//          vwbCmdNotInCmdFactor    - (W) True = MI command not found in the
-//          command factory, false = recognised.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdInterpreter::ValidateIsMi(const CMIUtilString &vTextLine,
-                                     bool &vwbYesValid,
-                                     bool &vwbCmdNotInCmdFactor,
-                                     SMICmdData &rwCmdData) {
-  vwbYesValid = false;
-  vwbCmdNotInCmdFactor = false;
-  rwCmdData.Clear();
-
-  if (vTextLine.empty())
-    return MIstatus::success;
-
-  // MI format is [cmd #]-[command name]<space>[command arg(s)]
-  // i.e. 1-file-exec-and-symbols --thread-group i1 DEVICE_EXECUTABLE
-  //      5-data-evaluate-expression --thread 1 --frame 0 *(argv)
-
-  m_miCmdData.Clear();
-  m_miCmdData.strMiCmd = vTextLine;
-
-  // The following change m_miCmdData as valid parts are identified
-  vwbYesValid = (MiHasCmdTokenEndingHyphen(vTextLine) ||
-                 MiHasCmdTokenEndingAlpha(vTextLine));
-  vwbYesValid = vwbYesValid && MiHasCmd(vTextLine);
-  if (vwbYesValid) {
-    vwbCmdNotInCmdFactor = !HasCmdFactoryGotMiCmd(MiGetCmdData());
-    vwbYesValid = !vwbCmdNotInCmdFactor;
-  }
-
-  // Update command's meta data valid state
-  m_miCmdData.bCmdValid = vwbYesValid;
-
-  // Ok to return new updated command information
-  rwCmdData = MiGetCmdData();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Establish whether the command name entered on the stdin stream is
-// recognised by
-//          the MI driver.
-// Type:    Method.
-// Args:    vCmd    - (R) Command information structure.
-// Return:  bool  - True = yes command is recognised, false = command not
-// recognised.
-// Throws:  None.
-//--
-bool CMICmdInterpreter::HasCmdFactoryGotMiCmd(const SMICmdData &vCmd) const {
-  return m_rCmdFactory.CmdExist(vCmd.strMiCmd);
-}
-
-//++
-// Details: Does the command entered match the criteria for a MI command format.
-//          The format to validate against is 'nn-' where there can be 1 to n
-//          digits.
-//          I.e. '2-gdb-exit'.
-//          Is the execution token present? The command token is entered into
-//          the
-//          command meta data structure whether correct or not for reporting or
-//          later
-//          command execution purposes.
-// Type:    Method.
-// Args:    vTextLine   - (R) Text data to interpret.
-// Return:  bool  - True = yes command token present, false = command not
-// recognised.
-// Throws:  None.
-//--
-bool CMICmdInterpreter::MiHasCmdTokenEndingHyphen(
-    const CMIUtilString &vTextLine) {
-  // The hyphen is mandatory
-  const size_t nPos = vTextLine.find('-', 0);
-  if ((nPos == std::string::npos))
-    return false;
-
-  if (MiHasCmdTokenPresent(vTextLine)) {
-    const std::string strNum = vTextLine.substr(0, nPos);
-    if (!CMIUtilString(strNum).IsNumber())
-      return false;
-
-    m_miCmdData.strMiCmdToken = strNum;
-  }
-
-  m_miCmdData.bMIOldStyle = false;
-
-  return true;
-}
-
-//++
-// Details: Does the command entered match the criteria for a MI command format.
-//          The format to validate against is 'nnA' where there can be 1 to n
-//          digits.
-//          'A' represents any non numeric token. I.e. '1source .gdbinit'.
-//          Is the execution token present? The command token is entered into
-//          the
-//          command meta data structure whether correct or not for reporting or
-//          later
-//          command execution purposes.
-// Type:    Method.
-// Args:    vTextLine   - (R) Text data to interpret.
-// Return:  bool  - True = yes command token present, false = command not
-// recognised.
-// Throws:  None.
-//--
-bool CMICmdInterpreter::MiHasCmdTokenEndingAlpha(
-    const CMIUtilString &vTextLine) {
-  char cChar = vTextLine[0];
-  MIuint i = 0;
-  while (::isdigit(cChar) != 0) {
-    cChar = vTextLine[++i];
-  }
-  if (::isalpha(cChar) == 0)
-    return false;
-  if (i == 0)
-    return false;
-
-  const std::string strNum = vTextLine.substr(0, i);
-  m_miCmdData.strMiCmdToken = strNum.c_str();
-  m_miCmdData.bMIOldStyle = true;
-
-  return true;
-}
-
-//++
-// Details: Does the command entered match the criteria for a MI command format.
-//          Is the command token present before the hyphen?
-// Type:    Method.
-// Args:    vTextLine - (R) Text data to interpret.
-// Return:  bool  - True = yes command token present, false = token not present.
-// Throws:  None.
-//--
-bool CMICmdInterpreter::MiHasCmdTokenPresent(const CMIUtilString &vTextLine) {
-  const size_t nPos = vTextLine.find('-', 0);
-  return (nPos > 0);
-}
-
-//++
-// Details: Does the command name entered match the criteria for a MI command
-// format.
-//          Is a recognised command present? The command name is entered into
-//          the
-//          command meta data structure whether correct or not for reporting or
-//          later
-//          command execution purposes. Command options is present are also put
-//          into the
-//          command meta data structure.
-// Type:    Method.
-// Args:    vTextLine   - (R) Command information structure.
-// Return:  bool  - True = yes command name present, false = command not
-// recognised.
-// Throws:  None.
-//--
-bool CMICmdInterpreter::MiHasCmd(const CMIUtilString &vTextLine) {
-  size_t nPos = 0;
-  if (m_miCmdData.bMIOldStyle) {
-    char cChar = vTextLine[0];
-    size_t i = 0;
-    while (::isdigit(cChar) != 0) {
-      cChar = vTextLine[++i];
-    }
-    nPos = --i;
-  } else {
-    nPos = vTextLine.find('-', 0);
-  }
-
-  bool bFoundCmd = false;
-  const size_t nLen = vTextLine.length();
-  const size_t nPos2 = vTextLine.find(' ', nPos);
-  if (nPos2 != std::string::npos) {
-    if (nPos2 == nLen)
-      return false;
-    const CMIUtilString cmd =
-        CMIUtilString(vTextLine.substr(nPos + 1, nPos2 - nPos - 1));
-    if (cmd.empty())
-      return false;
-
-    m_miCmdData.strMiCmd = cmd;
-
-    if (nPos2 < nLen)
-      m_miCmdData.strMiCmdOption =
-          CMIUtilString(vTextLine.substr(nPos2 + 1, nLen - nPos2 - 1));
-
-    bFoundCmd = true;
-  } else {
-    const CMIUtilString cmd =
-        CMIUtilString(vTextLine.substr(nPos + 1, nLen - nPos - 1));
-    if (cmd.empty())
-      return false;
-    m_miCmdData.strMiCmd = cmd;
-    bFoundCmd = true;
-  }
-
-  if (bFoundCmd)
-    m_miCmdData.strMiCmdAll = vTextLine;
-
-  return bFoundCmd;
-}
-
-//++
-// Details: Retrieve the just entered new command from stdin. It contains the
-// command
-//          name, number and any options.
-// Type:    Method.
-// Args:    vTextLine   - (R) Command information structure.
-// Return:  SMICmdData & - Command meta data information/result/status.
-// Throws:  None.
-//--
-const SMICmdData &CMICmdInterpreter::MiGetCmdData() const {
-  return m_miCmdData;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdInterpreter.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdInterpreter.h
deleted file mode 100644
index 100d309..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdInterpreter.h
+++ /dev/null
@@ -1,62 +0,0 @@
-//===-- MICmdInterpreter.h --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmdData.h"
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-
-// Declarations:
-class CMICmdFactory;
-
-//++
-//============================================================================
-// Details: MI command interpreter. It takes text data from the MI driver
-//          (which got it from Stdin singleton) and validate the text to see if
-//          matches Machine Interface (MI) format and commands defined in the
-//          MI application.
-//          A singleton class.
-//--
-class CMICmdInterpreter : public CMICmnBase,
-                          public MI::ISingleton<CMICmdInterpreter> {
-  friend MI::ISingleton<CMICmdInterpreter>;
-
-  // Methods:
-public:
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-  bool ValidateIsMi(const CMIUtilString &vTextLine, bool &vwbYesValid,
-                    bool &vwbCmdNotInCmdFactor, SMICmdData &rwCmdData);
-
-  // Methods:
-private:
-  /* ctor */ CMICmdInterpreter();
-  /* ctor */ CMICmdInterpreter(const CMICmdInterpreter &);
-  void operator=(const CMICmdInterpreter &);
-
-  bool HasCmdFactoryGotMiCmd(const SMICmdData &vCmdData) const;
-  bool MiHasCmdTokenEndingHyphen(const CMIUtilString &vTextLine);
-  bool MiHasCmdTokenEndingAlpha(const CMIUtilString &vTextLine);
-  bool MiHasCmd(const CMIUtilString &vTextLine);
-  bool MiHasCmdTokenPresent(const CMIUtilString &vTextLine);
-  const SMICmdData &MiGetCmdData() const;
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmdInterpreter() override;
-
-  // Attributes:
-private:
-  SMICmdData m_miCmdData; // Filled in on each new line being interpreted
-  CMICmdFactory &m_rCmdFactory;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdInvoker.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdInvoker.cpp
deleted file mode 100644
index f4150a2..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdInvoker.cpp
+++ /dev/null
@@ -1,321 +0,0 @@
-//===-- MICmdInvoker.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdInvoker.h"
-#include "MICmdBase.h"
-#include "MICmdMgr.h"
-#include "MICmnLog.h"
-#include "MICmnStreamStdout.h"
-#include "MIDriver.h"
-
-//++
-// Details: CMICmdInvoker constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdInvoker::CMICmdInvoker() : m_rStreamOut(CMICmnStreamStdout::Instance()) {}
-
-//++
-// Details: CMICmdInvoker destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdInvoker::~CMICmdInvoker() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this Command Invoker.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdInvoker::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = true;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Release resources for *this Stdin stream.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdInvoker::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  CmdDeleteAll();
-
-  m_bInitialized = false;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Empty the map of invoked commands doing work. Command objects are
-// deleted too.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdInvoker::CmdDeleteAll() {
-  CMICmdMgr &rMgr = CMICmdMgr::Instance();
-  MapCmdIdToCmd_t::const_iterator it = m_mapCmdIdToCmd.begin();
-  while (it != m_mapCmdIdToCmd.end()) {
-    const MIuint cmdId((*it).first);
-    MIunused(cmdId);
-    CMICmdBase *pCmd = (*it).second;
-    const CMIUtilString &rCmdName(pCmd->GetCmdData().strMiCmd);
-    MIunused(rCmdName);
-    rMgr.CmdDelete(pCmd->GetCmdData());
-
-    // Next
-    ++it;
-  }
-  m_mapCmdIdToCmd.clear();
-}
-
-//++
-// Details: Remove from the map of invoked commands doing work a command that
-// has finished
-//          its work. The command object is deleted too.
-// Type:    Method.
-// Args:    vId             - (R) Command object's unique ID.
-//          vbYesDeleteCmd  - (R) True = Delete command object, false = delete
-//          via the Command Manager.
-// Return:  None.
-// Throws:  None.
-//--
-bool CMICmdInvoker::CmdDelete(const MIuint vId,
-                              const bool vbYesDeleteCmd /*= false*/) {
-  CMICmdMgr &rMgr = CMICmdMgr::Instance();
-  MapCmdIdToCmd_t::const_iterator it = m_mapCmdIdToCmd.find(vId);
-  if (it != m_mapCmdIdToCmd.end()) {
-    CMICmdBase *pCmd = (*it).second;
-    if (vbYesDeleteCmd) {
-      // Via registered interest command manager callback *this object to delete
-      // the command
-      m_mapCmdIdToCmd.erase(it);
-      delete pCmd;
-    } else
-      // Notify other interested object of this command's pending deletion
-      rMgr.CmdDelete(pCmd->GetCmdData());
-  }
-
-  if (m_mapCmdIdToCmd.empty())
-    rMgr.CmdUnregisterForDeleteNotification(*this);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Add to the map of invoked commands doing work a command that is
-// about to
-//          start to do work.
-// Type:    Method.
-// Args:    vCmd    - (R) Command object.
-// Return:  None.
-// Throws:  None.
-//--
-bool CMICmdInvoker::CmdAdd(const CMICmdBase &vCmd) {
-  if (m_mapCmdIdToCmd.empty()) {
-    CMICmdMgr &rMgr = CMICmdMgr::Instance();
-    rMgr.CmdRegisterForDeleteNotification(*this);
-  }
-
-  const MIuint &cmdId(vCmd.GetCmdData().id);
-  MapCmdIdToCmd_t::const_iterator it = m_mapCmdIdToCmd.find(cmdId);
-  if (it != m_mapCmdIdToCmd.end())
-    return MIstatus::success;
-
-  MapPairCmdIdToCmd_t pr(cmdId, const_cast<CMICmdBase *>(&vCmd));
-  m_mapCmdIdToCmd.insert(pr);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Having previously had the potential command validated and found
-// valid now
-//          get the command executed.
-//          If the Functionality returns MIstatus::failure call
-//          GetErrorDescription().
-//          This function is used by the application's main thread.
-// Type:    Method.
-// Args:    vCmd    - (RW) Command object.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdInvoker::CmdExecute(CMICmdBase &vCmd) {
-  bool bOk = CmdAdd(vCmd);
-
-  if (bOk) {
-    vCmd.AddCommonArgs();
-    if (!vCmd.ParseArgs()) {
-      // Report command execution failed
-      const SMICmdData cmdData(vCmd.GetCmdData());
-      CmdStdout(cmdData);
-      CmdCauseAppExit(vCmd);
-      CmdDelete(cmdData.id);
-
-      // Proceed to wait or execute next command
-      return MIstatus::success;
-    }
-  }
-
-  if (bOk && !vCmd.Execute()) {
-    // Report command execution failed
-    const SMICmdData cmdData(vCmd.GetCmdData());
-    CmdStdout(cmdData);
-    CmdCauseAppExit(vCmd);
-    CmdDelete(cmdData.id);
-
-    // Proceed to wait or execute next command
-    return MIstatus::success;
-  }
-
-  bOk = CmdExecuteFinished(vCmd);
-
-  return bOk;
-}
-
-//++
-// Details: Called when a command has finished its Execution() work either
-// synchronously
-//          because the command executed was the type a non event type or
-//          asynchronously
-//          via the command's callback (because of an SB Listener event). Needs
-//          to be called
-//          so that *this invoker call do some house keeping and then proceed to
-//          call
-//          the command's Acknowledge() function.
-// Type:    Method.
-// Args:    vCmd    - (R) Command object.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdInvoker::CmdExecuteFinished(CMICmdBase &vCmd) {
-  // Command finished now get the command to gather it's information and form
-  // the MI
-  // Result record
-  if (!vCmd.Acknowledge()) {
-    // Report command acknowledge functionality failed
-    const SMICmdData cmdData(vCmd.GetCmdData());
-    CmdStdout(cmdData);
-    CmdCauseAppExit(vCmd);
-    CmdDelete(cmdData.id);
-
-    // Proceed to wait or execute next command
-    return MIstatus::success;
-  }
-
-  // Retrieve the command's latest data/information. Needed for commands of the
-  // event type so have
-  // a record of commands pending finishing execution.
-  const CMIUtilString &rMIResultRecord(vCmd.GetMIResultRecord());
-  SMICmdData cmdData(
-      vCmd.GetCmdData()); // Make a copy as the command will be deleted soon
-  cmdData.strMiCmdResultRecord = rMIResultRecord; // Precautionary copy as the
-                                                  // command might forget to do
-                                                  // this
-  if (vCmd.HasMIResultRecordExtra()) {
-    cmdData.bHasResultRecordExtra = true;
-    const CMIUtilString &rMIExtra(vCmd.GetMIResultRecordExtra());
-    cmdData.strMiCmdResultRecordExtra =
-        rMIExtra; // Precautionary copy as the command might forget to do this
-  }
-
-  // Send command's MI response to the client
-  bool bOk = CmdStdout(cmdData);
-
-  // Delete the command object as do not require anymore
-  bOk = bOk && CmdDelete(vCmd.GetCmdData().id);
-
-  return bOk;
-}
-
-//++
-// Details: If the MI Driver is not operating via a client i.e. Eclipse check
-// the command
-//          on failure suggests the application exits. A command can be such
-//          that a
-//          failure cannot the allow the application to continue operating.
-// Args:    vCmd    - (R) Command object.
-// Return:  None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdInvoker::CmdCauseAppExit(const CMICmdBase &vCmd) const {
-  if (vCmd.GetExitAppOnCommandFailure()) {
-    CMIDriver &rDriver(CMIDriver::Instance());
-    if (rDriver.IsDriverDebuggingArgExecutable()) {
-      rDriver.SetExitApplicationFlag(true);
-    }
-  }
-}
-
-//++
-// Details: Write to stdout and the Log file the command's MI formatted result.
-// Type:    vCmdData    - (R) A command's information.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Return:  None.
-// Throws:  None.
-//--
-bool CMICmdInvoker::CmdStdout(const SMICmdData &vCmdData) const {
-  bool bOk = m_pLog->WriteLog(vCmdData.strMiCmdAll);
-  const bool bLock = bOk && m_rStreamOut.Lock();
-  bOk = bOk && bLock &&
-        m_rStreamOut.WriteMIResponse(vCmdData.strMiCmdResultRecord);
-  if (bOk && vCmdData.bHasResultRecordExtra) {
-    bOk = m_rStreamOut.WriteMIResponse(vCmdData.strMiCmdResultRecordExtra);
-  }
-  bOk = bLock && m_rStreamOut.Unlock();
-
-  return bOk;
-}
-
-//++
-// Details: Required by the CMICmdMgr::ICmdDeleteCallback. *this object is
-// registered
-//          with the Command Manager to receive callbacks when a command is
-//          being deleted.
-//          An object, *this invoker, does not delete a command object itself
-//          but calls
-//          the Command Manager to delete a command object. This function is the
-//          Invoker's
-//          called.
-//          The Invoker owns the command objects and so can delete them but must
-//          do it
-//          via the manager so other objects can be notified of the deletion.
-// Type:    Method.
-// Args:    vCmd    - (RW) Command.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmdInvoker::Delete(SMICmdData &vCmd) { CmdDelete(vCmd.id, true); }
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdInvoker.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdInvoker.h
deleted file mode 100644
index 5db8d36..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdInvoker.h
+++ /dev/null
@@ -1,103 +0,0 @@
-//===-- MICmdInvoker.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers
-#include <map>
-
-// In-house headers:
-#include "MICmdData.h"
-#include "MICmdMgrSetCmdDeleteCallback.h"
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-
-// Declarations:
-class CMICmdBase;
-class CMICmnStreamStdout;
-
-//++
-//============================================================================
-// Details: MI Command Invoker. The Invoker works on the command pattern design.
-//          There two main jobs; action command Execute() function, followed by
-//          the command's Acknowledge() function. When a command has finished
-//          its
-//          execute function it returns to the invoker. The invoker then calls
-//          the
-//          command's Acknowledge() function to do more work, form and give
-//          back a MI result. In the meantime the Command Monitor is monitoring
-//          the each command doing their Execute() function work so they do not
-//          exceed a time limit which if it exceeds informs the command(s) to
-//          stop work.
-//          The work by the Invoker is carried out in the main thread.
-//          The Invoker takes ownership of any commands created which means it
-//          is the only object to delete them when a command is finished
-//          working.
-//          A singleton class.
-//--
-class CMICmdInvoker : public CMICmnBase,
-                      public CMICmdMgrSetCmdDeleteCallback::ICallback,
-                      public MI::ISingleton<CMICmdInvoker> {
-  friend class MI::ISingleton<CMICmdInvoker>;
-
-  // Class:
-public:
-  //++
-  // Description: Invoker's interface for commands to implement.
-  //--
-  class ICmd {
-  public:
-    virtual bool Acknowledge() = 0;
-    virtual bool Execute() = 0;
-    virtual bool ParseArgs() = 0;
-    virtual void SetCmdData(const SMICmdData &vCmdData) = 0;
-    virtual const SMICmdData &GetCmdData() const = 0;
-    virtual const CMIUtilString &GetErrorDescription() const = 0;
-    virtual void CmdFinishedTellInvoker() const = 0;
-    virtual const CMIUtilString &GetMIResultRecord() const = 0;
-    virtual const CMIUtilString &GetMIResultRecordExtra() const = 0;
-    virtual bool HasMIResultRecordExtra() const = 0;
-
-    /* dtor */ virtual ~ICmd() {}
-  };
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-  bool CmdExecute(CMICmdBase &vCmd);
-  bool CmdExecuteFinished(CMICmdBase &vCmd);
-
-  // Typedefs:
-private:
-  typedef std::map<MIuint, CMICmdBase *> MapCmdIdToCmd_t;
-  typedef std::pair<MIuint, CMICmdBase *> MapPairCmdIdToCmd_t;
-
-  // Methods:
-private:
-  /* ctor */ CMICmdInvoker();
-  /* ctor */ CMICmdInvoker(const CMICmdInvoker &);
-  void operator=(const CMICmdInvoker &);
-  void CmdDeleteAll();
-  bool CmdDelete(const MIuint vCmdId, const bool vbYesDeleteCmd = false);
-  bool CmdAdd(const CMICmdBase &vCmd);
-  bool CmdStdout(const SMICmdData &vCmdData) const;
-  void CmdCauseAppExit(const CMICmdBase &vCmd) const;
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmdInvoker() override;
-  // From CMICmdMgrSetCmdDeleteCallback::ICallback
-  void Delete(SMICmdData &vCmd) override;
-
-  // Attributes:
-private:
-  MapCmdIdToCmd_t m_mapCmdIdToCmd;
-  CMICmnStreamStdout &m_rStreamOut;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdMgr.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdMgr.cpp
deleted file mode 100644
index 453ffed..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdMgr.cpp
+++ /dev/null
@@ -1,248 +0,0 @@
-//===-- MICmdMgr.cpp --------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdMgr.h"
-#include "MICmdBase.h"
-#include "MICmdFactory.h"
-#include "MICmdInterpreter.h"
-#include "MICmdInvoker.h"
-#include "MICmnLog.h"
-#include "MICmnResources.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilSingletonHelper.h"
-
-//++
-// Details: CMICmdMgr constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdMgr::CMICmdMgr()
-    : m_interpretor(CMICmdInterpreter::Instance()),
-      m_factory(CMICmdFactory::Instance()),
-      m_invoker(CMICmdInvoker::Instance()) {}
-
-//++
-// Details: CMICmdMgr destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmdMgr::~CMICmdMgr() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this Command Manager.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdMgr::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  // Note initialization order is important here as some resources depend on
-  // previous
-  MI::ModuleInit<CMICmnLog>(IDS_MI_INIT_ERR_LOG, bOk, errMsg);
-  MI::ModuleInit<CMICmnResources>(IDS_MI_INIT_ERR_RESOURCES, bOk, errMsg);
-  if (bOk && !m_interpretor.Initialize()) {
-    bOk = false;
-    errMsg = CMIUtilString::Format(MIRSRC(IDS_MI_INIT_ERR_CMDINTERPRETER),
-                                   m_interpretor.GetErrorDescription().c_str());
-  }
-  if (bOk && !m_factory.Initialize()) {
-    bOk = false;
-    errMsg = CMIUtilString::Format(MIRSRC(IDS_MI_INIT_ERR_CMDFACTORY),
-                                   m_factory.GetErrorDescription().c_str());
-  }
-  if (bOk && !m_invoker.Initialize()) {
-    bOk = false;
-    errMsg = CMIUtilString::Format(MIRSRC(IDS_MI_INIT_ERR_CMDINVOKER),
-                                   m_invoker.GetErrorDescription().c_str());
-  }
-  m_bInitialized = bOk;
-
-  if (!bOk) {
-    CMIUtilString strInitError(
-        CMIUtilString::Format(MIRSRC(IDS_MI_INIT_ERR_CMDMGR), errMsg.c_str()));
-    SetErrorDescription(strInitError);
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Release resources for *this Command Manager.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdMgr::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = false;
-
-  ClrErrorDescription();
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  // Tidy up
-  m_setCmdDeleteCallback.clear();
-
-  // Note shutdown order is important here
-  if (!m_invoker.Shutdown()) {
-    bOk = false;
-    errMsg += CMIUtilString::Format(MIRSRC(IDS_MI_SHTDWN_ERR_CMDINVOKER),
-                                    m_invoker.GetErrorDescription().c_str());
-  }
-  if (!m_factory.Shutdown()) {
-    bOk = false;
-    if (!errMsg.empty())
-      errMsg += ", ";
-    errMsg += CMIUtilString::Format(MIRSRC(IDS_MI_SHTDWN_ERR_CMDFACTORY),
-                                    m_factory.GetErrorDescription().c_str());
-  }
-  if (!m_interpretor.Shutdown()) {
-    bOk = false;
-    if (!errMsg.empty())
-      errMsg += ", ";
-    errMsg +=
-        CMIUtilString::Format(MIRSRC(IDS_MI_SHTDWN_ERR_CMDINTERPRETER),
-                              m_interpretor.GetErrorDescription().c_str());
-  }
-  MI::ModuleShutdown<CMICmnResources>(IDS_MI_INIT_ERR_RESOURCES, bOk, errMsg);
-  MI::ModuleShutdown<CMICmnLog>(IDS_MI_INIT_ERR_LOG, bOk, errMsg);
-
-  if (!bOk) {
-    SetErrorDescriptionn(MIRSRC(IDS_MI_SHUTDOWN_ERR), errMsg.c_str());
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Establish whether the text data is an MI format type command.
-// Type:    Method.
-// Args:    vTextLine               - (R) Text data to interpret.
-//          vwbYesValid             - (W) True = MI type command, false = not
-//          recognised.
-//          vwbCmdNotInCmdFactor    - (W) True = MI command not found in the
-//          command factor, false = recognised.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdMgr::CmdInterpret(const CMIUtilString &vTextLine, bool &vwbYesValid,
-                             bool &vwbCmdNotInCmdFactor,
-                             SMICmdData &rwCmdData) {
-  return m_interpretor.ValidateIsMi(vTextLine, vwbYesValid,
-                                    vwbCmdNotInCmdFactor, rwCmdData);
-}
-
-//++
-// Details: Having previously had the potential command validated and found
-// valid now
-//          get the command executed.
-//          If the Functionality returns MIstatus::failure call
-//          GetErrorDescription().
-//          This function is used by the application's main thread.
-// Type:    Method.
-// Args:    vCmdData    - (RW) Command meta data.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmdMgr::CmdExecute(const SMICmdData &vCmdData) {
-  bool bOk = MIstatus::success;
-
-  // Pass the command's meta data structure to the command
-  // so it can update it if required. (Need to copy it out of the
-  // command before the command is deleted)
-  CMICmdBase *pCmd = nullptr;
-  bOk = m_factory.CmdCreate(vCmdData.strMiCmd, vCmdData, pCmd);
-  if (!bOk) {
-    const CMIUtilString errMsg(
-        CMIUtilString::Format(MIRSRC(IDS_CMDMGR_ERR_CMD_FAILED_CREATE),
-                              m_factory.GetErrorDescription().c_str()));
-    SetErrorDescription(errMsg);
-    return MIstatus::failure;
-  }
-
-  bOk = m_invoker.CmdExecute(*pCmd);
-  if (!bOk) {
-    const CMIUtilString errMsg(
-        CMIUtilString::Format(MIRSRC(IDS_CMDMGR_ERR_CMD_INVOKER),
-                              m_invoker.GetErrorDescription().c_str()));
-    SetErrorDescription(errMsg);
-    return MIstatus::failure;
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Iterate all interested clients and tell them a command is being
-// deleted.
-// Type:    Method.
-// Args:    vCmdData    - (RW) The command to be deleted.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdMgr::CmdDelete(SMICmdData vCmdData) {
-  // Note vCmdData is a copy! The command holding its copy will be deleted soon
-  // we still need to iterate callback clients after a command object is deleted
-
-  m_setCmdDeleteCallback.Delete(vCmdData);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Register an object to be called when a command object is deleted.
-// Type:    Method.
-// Args:    vObject - (R) A new interested client.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdMgr::CmdRegisterForDeleteNotification(
-    CMICmdMgrSetCmdDeleteCallback::ICallback &vObject) {
-  return m_setCmdDeleteCallback.Register(vObject);
-}
-
-//++
-// Details: Unregister an object from being called when a command object is
-// deleted.
-// Type:    Method.
-// Args:    vObject - (R) The was interested client.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmdMgr::CmdUnregisterForDeleteNotification(
-    CMICmdMgrSetCmdDeleteCallback::ICallback &vObject) {
-  return m_setCmdDeleteCallback.Unregister(vObject);
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdMgr.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdMgr.h
deleted file mode 100644
index 307ef89..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdMgr.h
+++ /dev/null
@@ -1,69 +0,0 @@
-//===-- MICmdMgr.h ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers
-#include <set>
-
-// In-house headers:
-#include "MICmdBase.h"
-#include "MICmdMgrSetCmdDeleteCallback.h"
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-
-// Declarations:
-class CMICmdInterpreter;
-class CMICmdFactory;
-class CMICmdInvoker;
-class CMICmdBase;
-
-//++
-//============================================================================
-// Details: MI command manager. Oversees command operations, controls command
-//          production and the running of commands.
-//          Command Invoker, Command Factory and Command Monitor while
-//          independent
-//          units are overseen/managed by *this manager.
-//          A singleton class.
-//--
-class CMICmdMgr : public CMICmnBase, public MI::ISingleton<CMICmdMgr> {
-  friend class MI::ISingleton<CMICmdMgr>;
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-
-  bool CmdInterpret(const CMIUtilString &vTextLine, bool &vwbYesValid,
-                    bool &vwbCmdNotInCmdFactor, SMICmdData &rwCmdData);
-  bool CmdExecute(const SMICmdData &vCmdData);
-  bool CmdDelete(SMICmdData vCmdData);
-  bool CmdRegisterForDeleteNotification(
-      CMICmdMgrSetCmdDeleteCallback::ICallback &vObject);
-  bool CmdUnregisterForDeleteNotification(
-      CMICmdMgrSetCmdDeleteCallback::ICallback &vObject);
-
-  // Methods:
-private:
-  /* ctor */ CMICmdMgr();
-  /* ctor */ CMICmdMgr(const CMICmdMgr &);
-  void operator=(const CMICmdMgr &);
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmdMgr() override;
-
-  // Attributes:
-private:
-  CMICmdInterpreter &m_interpretor;
-  CMICmdFactory &m_factory;
-  CMICmdInvoker &m_invoker;
-  CMICmdMgrSetCmdDeleteCallback::CSetClients m_setCmdDeleteCallback;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.cpp
deleted file mode 100644
index d6146b8..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-//===-- MICmdMgrSetCmdDeleteCallback.cpp ------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmdMgrSetCmdDeleteCallback.h"
-
-namespace CMICmdMgrSetCmdDeleteCallback {
-
-//++
-// Details: CSetClients constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CSetClients::CSetClients() : m_bClientUnregistered(false) {}
-
-//++
-// Details: CSetClients destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CSetClients::~CSetClients() {}
-
-//++
-// Details: Register an object to be called when a command object is deleted.
-// Type:    Method.
-// Args:    vObject - (R) A new interested client.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CSetClients::Register(ICallback &vObject) {
-  insert(&vObject);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Unregister an object from being called when a command object is
-// deleted.
-// Type:    Method.
-// Args:    vObject - (R) The was interested client.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CSetClients::Unregister(ICallback &vObject) {
-  m_bClientUnregistered = true;
-  erase(&vObject);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Iterate all interested clients and tell them a command is being
-// deleted.
-// Type:    Method.
-// Args:    vCmd    - (RW) The command to be deleted.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-void CSetClients::Delete(SMICmdData &vCmd) {
-  m_bClientUnregistered = false; // Reset
-  iterator it = begin();
-  while (it != end()) {
-    ICallback *pObj = *it;
-    pObj->Delete(vCmd);
-
-    if (m_bClientUnregistered) {
-      m_bClientUnregistered = false; // Reset
-      it = begin();
-    } else
-      // Next
-      ++it;
-  }
-}
-
-} // namespace CMICmdMgrSetCmdDeleteCallback
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h b/src/llvm-project/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h
deleted file mode 100644
index 30df5e9..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmdMgrSetCmdDeleteCallback.h
+++ /dev/null
@@ -1,72 +0,0 @@
-//===-- MICmdMgrSetCmdDeleteCallback.h --------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//--
-
-#pragma once
-
-// Third party headers:
-#include <set>
-
-// In-house headers:
-#include "MICmnBase.h"
-
-// Declarations:
-struct SMICmdData;
-
-namespace CMICmdMgrSetCmdDeleteCallback {
-
-//++
-//============================================================================
-// Details: MI Command Manager interface for client call back.
-//          Objects that want to be notified of a command being deleted
-//          inherit this interface and register interest in command object
-//          deletion. An object deleting a command must not do it itself but
-//          call
-//          the Command Manager CmdDelete() function to delete a command object.
-//--
-class ICallback {
-public:
-  virtual void Delete(SMICmdData &vCmd) = 0;
-
-  /* dtor */ virtual ~ICallback() {}
-};
-
-//++
-//============================================================================
-// Details: MI Command Manager container for clients registered interest in
-// command
-//          objects being deleted. Objects register an interest so when a
-//          command
-//          is to be deleted that object wanting the delete calls the Command
-//          Manager to delete the command object. In so do all other registered
-//          objects get called to about the deletion including the object
-//          wanting
-//          to do the delete in the first place.
-//--
-class CSetClients : public std::set<class ICallback *>, public CMICmnBase {
-  // Methods:
-public:
-  /* ctor */ CSetClients();
-
-  bool Register(class ICallback &vObject);
-  bool Unregister(class ICallback &vObject);
-  void Delete(SMICmdData &vCmdData);
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CSetClients() override;
-
-  // Attributes:
-private:
-  bool m_bClientUnregistered; // True = yes while deleting a client
-                              // unregistered, false = no client unregistered
-                              // during deletion
-};
-
-} // namespace CMICmdMgrSetCmdDeleteCallback
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnBase.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnBase.cpp
deleted file mode 100644
index 9d87064..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnBase.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-//===-- MICmnBase.cpp -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers
-#include <stdarg.h>
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MICmnLog.h"
-#include "MICmnStreamStderr.h"
-
-//++
-// Details: CMICmnBase constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnBase::CMICmnBase()
-    : m_strMILastErrorDescription(CMIUtilString()), m_bInitialized(false),
-      m_pLog(&CMICmnLog::Instance()), m_clientUsageRefCnt(0) {}
-
-//++
-// Details: CMICmnBase destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnBase::~CMICmnBase() { m_pLog = nullptr; }
-
-//++
-// Details: Retrieve whether *this object has an error description set.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Yes already defined, false = empty description.
-// Throws:  None.
-//--
-bool CMICmnBase::HaveErrorDescription() const {
-  return m_strMILastErrorDescription.empty();
-}
-
-//++
-// Details: Retrieve MI's last error condition.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - Text description.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnBase::GetErrorDescription() const {
-  return m_strMILastErrorDescription;
-}
-
-//++
-// Details: Set MI's error condition description. This may be accessed by
-// clients and
-//          seen by users.  Message is available to the client using the server
-//          and sent
-//          to the Logger.
-// Type:    Method.
-// Args:    vrTxt   - (R) Text description.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnBase::SetErrorDescription(const CMIUtilString &vrTxt) const {
-  m_strMILastErrorDescription = vrTxt;
-  if (!vrTxt.empty()) {
-    const CMIUtilString txt(CMIUtilString::Format("Error: %s", vrTxt.c_str()));
-    CMICmnStreamStderr::Instance().Write(txt);
-  }
-}
-
-//++
-// Details: Set MI's error condition description. This may be accessed by
-// clients and
-//          seen by users.  Message is available to the client using the server
-//          and sent
-//          to the Logger.
-// Type:    Method.
-// Args:    vrTxt   - (R) Text description.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnBase::SetErrorDescriptionNoLog(const CMIUtilString &vrTxt) const {
-  m_strMILastErrorDescription = vrTxt;
-}
-
-//++
-// Details: Clear MI's error condition description.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnBase::ClrErrorDescription() const {
-  m_strMILastErrorDescription.clear();
-}
-
-//++
-// Details: Set MI's error condition description. This may be accessed by
-// clients and
-//          seen by users. Message is available to the client using the server
-//          and sent
-//          to the Logger.
-// Type:    Method.
-// Args:    vFormat - (R) Format string.
-//          ...     - (R) Variable number of CMIUtilString type objects.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnBase::SetErrorDescriptionn(const char *vFormat, ...) const {
-  va_list args;
-  va_start(args, vFormat);
-  CMIUtilString strResult = CMIUtilString::FormatValist(vFormat, args);
-  va_end(args);
-
-  SetErrorDescription(strResult);
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnBase.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnBase.h
deleted file mode 100644
index 368e912..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnBase.h
+++ /dev/null
@@ -1,46 +0,0 @@
-//===-- MICmnBase.h ---------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MIDataTypes.h"
-#include "MIUtilString.h"
-
-// Declarations:
-class CMICmnLog;
-
-//++
-//============================================================================
-// Details: MI common code implementation base class.
-//--
-class CMICmnBase {
-  // Methods:
-public:
-  /* ctor */ CMICmnBase();
-
-  bool HaveErrorDescription() const;
-  const CMIUtilString &GetErrorDescription() const;
-  void SetErrorDescription(const CMIUtilString &vrTxt) const;
-  void SetErrorDescriptionn(const char *vFormat, ...) const;
-  void SetErrorDescriptionNoLog(const CMIUtilString &vrTxt) const;
-  void ClrErrorDescription() const;
-
-  // Overrideable:
-public:
-  /* dtor */ virtual ~CMICmnBase();
-
-  // Attributes:
-protected:
-  mutable CMIUtilString m_strMILastErrorDescription;
-  bool m_bInitialized; // True = yes successfully initialized, false = no yet or
-                       // failed
-  CMICmnLog *m_pLog;   // Allow all derived classes to use the logger
-  MIint m_clientUsageRefCnt; // Count of client using *this object so not
-                             // shutdown() object to early
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnConfig.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnConfig.h
deleted file mode 100644
index 9dd5792..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnConfig.h
+++ /dev/null
@@ -1,19 +0,0 @@
-//===-- MICmnConfig.h -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//--
-#pragma once
-
-// 1 = Show debug process attach modal dialog, 0 = do not show
-// For windows only ATM, other OS's code is an infinite loop which a debugger
-// must change a value to continue
-#define MICONFIG_DEBUG_SHOW_ATTACH_DBG_DLG 0
-
-// 1 = Write to MI's Log file warnings about commands that did not handle
-// arguments or
-// options present to them by the driver's client, 0 = no warnings given
-#define MICONFIG_GIVE_WARNING_CMD_ARGS_NOT_HANDLED 1
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.cpp
deleted file mode 100644
index 554ec1f..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-//===-- MICmnLLDBBroadcaster.cpp --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnLLDBBroadcaster.h"
-
-//++
-// Details: CMICmnLLDBBroadcaster constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBBroadcaster::CMICmnLLDBBroadcaster()
-    : lldb::SBBroadcaster("MI driver") {}
-
-//++
-// Details: CMICmnLLDBBroadcaster destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBBroadcaster::~CMICmnLLDBBroadcaster() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this broadcaster object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBBroadcaster::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = MIstatus::success;
-
-  return m_bInitialized;
-}
-
-//++
-// Details: Release resources for *this broadcaster object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBBroadcaster::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = false;
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.h
deleted file mode 100644
index 326b676..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBBroadcaster.h
+++ /dev/null
@@ -1,44 +0,0 @@
-//===-- MICmnLLDBBroadcaster.h ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-#include "lldb/API/SBBroadcaster.h"
-
-//++
-//============================================================================
-// Details: MI derived class from LLDB SBBroadcaster API.
-//
-//          *** This class (files) is a place holder until we know we need it or
-//          *** not
-//
-//          A singleton class.
-//--
-class CMICmnLLDBBroadcaster : public CMICmnBase,
-                              public lldb::SBBroadcaster,
-                              public MI::ISingleton<CMICmnLLDBBroadcaster> {
-  friend MI::ISingleton<CMICmnLLDBBroadcaster>;
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-  // Methods:
-private:
-  /* ctor */ CMICmnLLDBBroadcaster();
-  /* ctor */ CMICmnLLDBBroadcaster(const CMICmnLLDBBroadcaster &);
-  void operator=(const CMICmnLLDBBroadcaster &);
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnLLDBBroadcaster() override;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
deleted file mode 100644
index 5ec2c58..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp
+++ /dev/null
@@ -1,863 +0,0 @@
-//===-- MICmnLLDBDebugSessionInfo.cpp ---------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers:
-#include "lldb/API/SBThread.h"
-#include <inttypes.h>
-#ifdef _WIN32
-#include <io.h>
-#else
-#include <unistd.h>
-#endif              // _WIN32
-#include "lldb/API/SBBreakpointLocation.h"
-
-// In-house headers:
-#include "MICmdData.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnLLDBUtilSBValue.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-#include "MICmnResources.h"
-#include "Platform.h"
-
-//++
-// Details: CMICmnLLDBDebugSessionInfo constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfo::CMICmnLLDBDebugSessionInfo()
-    : m_nBrkPointCntMax(INT32_MAX),
-      m_currentSelectedThread(LLDB_INVALID_THREAD_ID),
-      m_constStrSharedDataKeyWkDir("Working Directory"),
-      m_constStrSharedDataSolibPath("Solib Path"),
-      m_constStrPrintCharArrayAsString("Print CharArrayAsString"),
-      m_constStrPrintExpandAggregates("Print ExpandAggregates"),
-      m_constStrPrintAggregateFieldNames("Print AggregateFieldNames") {}
-
-//++
-// Details: CMICmnLLDBDebugSessionInfo destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfo::~CMICmnLLDBDebugSessionInfo() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  m_currentSelectedThread = LLDB_INVALID_THREAD_ID;
-  CMICmnLLDBDebugSessionInfoVarObj::VarObjIdResetToZero();
-
-  m_bInitialized = MIstatus::success;
-
-  return m_bInitialized;
-}
-
-//++
-// Details: Release resources for *this object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  // Tidy up
-  SharedDataDestroy();
-
-  m_vecActiveThreadId.clear();
-  CMICmnLLDBDebugSessionInfoVarObj::VarObjClear();
-
-  m_bInitialized = false;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Command instances can create and share data between other instances
-// of commands.
-//          Data can also be assigned by a command and retrieved by LLDB event
-//          handler.
-//          This function takes down those resources build up over the use of
-//          the commands.
-//          This function should be called when the creation and running of
-//          command has
-//          stopped i.e. application shutdown.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfo::SharedDataDestroy() {
-  m_mapIdToSessionData.Clear();
-  m_vecVarObj.clear();
-  m_mapBrkPtIdToBrkPtInfo.clear();
-}
-
-//++
-// Details: Record information about a LLDB break point so that is can be
-// recalled in other
-//          commands or LLDB event handling functions.
-// Type:    Method.
-// Args:    vBrkPtId        - (R) LLDB break point ID.
-//          vrBrkPtInfo     - (R) Break point information object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::RecordBrkPtInfo(
-    const MIuint vnBrkPtId, const SBrkPtInfo &vrBrkPtInfo) {
-  MapPairBrkPtIdToBrkPtInfo_t pr(vnBrkPtId, vrBrkPtInfo);
-  m_mapBrkPtIdToBrkPtInfo.insert(pr);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve information about a LLDB break point previous recorded
-// either by
-//          commands or LLDB event handling functions.
-// Type:    Method.
-// Args:    vBrkPtId        - (R) LLDB break point ID.
-//          vrwBrkPtInfo    - (W) Break point information object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::RecordBrkPtInfoGet(
-    const MIuint vnBrkPtId, SBrkPtInfo &vrwBrkPtInfo) const {
-  const MapBrkPtIdToBrkPtInfo_t::const_iterator it =
-      m_mapBrkPtIdToBrkPtInfo.find(vnBrkPtId);
-  if (it != m_mapBrkPtIdToBrkPtInfo.end()) {
-    vrwBrkPtInfo = (*it).second;
-    return MIstatus::success;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Delete information about a specific LLDB break point object. This
-// function
-//          should be called when a LLDB break point is deleted.
-// Type:    Method.
-// Args:    vBrkPtId        - (R) LLDB break point ID.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::RecordBrkPtInfoDelete(const MIuint vnBrkPtId) {
-  const MapBrkPtIdToBrkPtInfo_t::const_iterator it =
-      m_mapBrkPtIdToBrkPtInfo.find(vnBrkPtId);
-  if (it != m_mapBrkPtIdToBrkPtInfo.end()) {
-    m_mapBrkPtIdToBrkPtInfo.erase(it);
-    return MIstatus::success;
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Retrieve the specified thread's frame information.
-// Type:    Method.
-// Args:    vCmdData        - (R) A command's information.
-//          vThreadIdx      - (R) Thread index.
-//          vwrThreadFrames - (W) Frame data.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::GetThreadFrames(
-    const SMICmdData &vCmdData, const MIuint vThreadIdx,
-    const FrameInfoFormat_e veFrameInfoFormat, CMIUtilString &vwrThreadFrames) {
-  lldb::SBThread thread = GetProcess().GetThreadByIndexID(vThreadIdx);
-  const uint32_t nFrames = thread.GetNumFrames();
-  if (nFrames == 0) {
-    // MI print "frame={}"
-    CMICmnMIValueTuple miValueTuple;
-    CMICmnMIValueResult miValueResult("frame", miValueTuple);
-    vwrThreadFrames = miValueResult.GetString();
-    return MIstatus::success;
-  }
-
-  // MI print
-  // "frame={level=\"%d\",addr=\"0x%016" PRIx64
-  // "\",func=\"%s\",args=[%s],file=\"%s\",fullname=\"%s\",line=\"%d\"},frame={level=\"%d\",addr=\"0x%016"
-  // PRIx64 "\",func=\"%s\",args=[%s],file=\"%s\",fullname=\"%s\",line=\"%d\"},
-  // ..."
-  CMIUtilString strListCommaSeparated;
-  for (MIuint nLevel = 0; nLevel < nFrames; nLevel++) {
-    CMICmnMIValueTuple miValueTuple;
-    if (!MIResponseFormFrameInfo(thread, nLevel, veFrameInfoFormat,
-                                 miValueTuple))
-      return MIstatus::failure;
-
-    const CMICmnMIValueResult miValueResult2("frame", miValueTuple);
-    if (nLevel != 0)
-      strListCommaSeparated += ",";
-    strListCommaSeparated += miValueResult2.GetString();
-  }
-
-  vwrThreadFrames = strListCommaSeparated;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Return the resolved file's path for the given file.
-// Type:    Method.
-// Args:    vCmdData        - (R) A command's information.
-//          vPath           - (R) Original path.
-//          vwrResolvedPath - (W) Resolved path.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::ResolvePath(const SMICmdData &vCmdData,
-                                             const CMIUtilString &vPath,
-                                             CMIUtilString &vwrResolvedPath) {
-  // ToDo: Verify this code as it does not work as vPath is always empty
-
-  CMIUtilString strResolvedPath;
-  if (!SharedDataRetrieve<CMIUtilString>(m_constStrSharedDataKeyWkDir,
-                                         strResolvedPath)) {
-    vwrResolvedPath = "";
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_CMD_ERR_SHARED_DATA_NOT_FOUND), vCmdData.strMiCmd.c_str(),
-        m_constStrSharedDataKeyWkDir.c_str()));
-    return MIstatus::failure;
-  }
-
-  vwrResolvedPath = vPath;
-
-  return ResolvePath(strResolvedPath, vwrResolvedPath);
-}
-
-//++
-// Details: Return the resolved file's path for the given file.
-// Type:    Method.
-// Args:    vstrUnknown     - (R)   String assigned to path when resolved path
-// is empty.
-//          vwrResolvedPath - (RW)  The original path overwritten with resolved
-//          path.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::ResolvePath(const CMIUtilString &vstrUnknown,
-                                             CMIUtilString &vwrResolvedPath) {
-  if (vwrResolvedPath.size() < 1) {
-    vwrResolvedPath = vstrUnknown;
-    return MIstatus::success;
-  }
-
-  bool bOk = MIstatus::success;
-
-  CMIUtilString::VecString_t vecPathFolders;
-  const MIuint nSplits = vwrResolvedPath.Split("/", vecPathFolders);
-  MIunused(nSplits);
-  MIuint nFoldersBack = 1; // 1 is just the file (last element of vector)
-  while (bOk && (vecPathFolders.size() >= nFoldersBack)) {
-    CMIUtilString strTestPath;
-    MIuint nFoldersToAdd = nFoldersBack;
-    while (nFoldersToAdd > 0) {
-      strTestPath += "/";
-      strTestPath += vecPathFolders[vecPathFolders.size() - nFoldersToAdd];
-      nFoldersToAdd--;
-    }
-    bool bYesAccessible = false;
-    bOk = AccessPath(strTestPath, bYesAccessible);
-    if (bYesAccessible) {
-      vwrResolvedPath = strTestPath;
-      return MIstatus::success;
-    } else
-      nFoldersBack++;
-  }
-
-  // No files exist in the union of working directory and debuginfo path
-  // Simply use the debuginfo path and let the IDE handle it.
-
-  return bOk;
-}
-
-//++
-// Details: Determine the given file path exists or not.
-// Type:    Method.
-// Args:    vPath               - (R) File name path.
-//          vwbYesAccessible    - (W) True - file exists, false = does not
-//          exist.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::AccessPath(const CMIUtilString &vPath,
-                                            bool &vwbYesAccessible) {
-#ifdef _WIN32
-  vwbYesAccessible = (::_access(vPath.c_str(), 0) == 0);
-#else
-  vwbYesAccessible = (::access(vPath.c_str(), 0) == 0);
-#endif // _WIN32
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Form MI partial response by appending more MI value type objects to
-// the
-//          tuple type object past in.
-// Type:    Method.
-// Args:    vCmdData        - (R) A command's information.
-//          vrThread        - (R) LLDB thread object.
-//          vwrMIValueTuple - (W) MI value tuple object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::MIResponseFormThreadInfo(
-    const SMICmdData &vCmdData, const lldb::SBThread &vrThread,
-    const ThreadInfoFormat_e veThreadInfoFormat,
-    CMICmnMIValueTuple &vwrMIValueTuple) {
-  lldb::SBThread &rThread = const_cast<lldb::SBThread &>(vrThread);
-
-  const bool bSuspended = rThread.IsSuspended();
-  const lldb::StopReason eReason = rThread.GetStopReason();
-  const bool bValidReason = !((eReason == lldb::eStopReasonNone) ||
-                              (eReason == lldb::eStopReasonInvalid));
-  const CMIUtilString strState((bSuspended || bValidReason) ? "stopped"
-                                                            : "running");
-
-  // Add "id"
-  const CMIUtilString strId(CMIUtilString::Format("%d", rThread.GetIndexID()));
-  const CMICmnMIValueConst miValueConst1(strId);
-  const CMICmnMIValueResult miValueResult1("id", miValueConst1);
-  vwrMIValueTuple.Add(miValueResult1);
-
-  // Add "target-id"
-  const char *pThreadName = rThread.GetName();
-  const MIuint len = CMIUtilString(pThreadName).length();
-  const bool bHaveName = (len > 0) && (len < 32) && // 32 is arbitrary number
-                         CMIUtilString::IsAllValidAlphaAndNumeric(pThreadName);
-  const char *pThrdFmt = bHaveName ? "%s" : "Thread %d";
-  CMIUtilString strThread;
-  if (bHaveName)
-    strThread = CMIUtilString::Format(pThrdFmt, pThreadName);
-  else
-    strThread = CMIUtilString::Format(pThrdFmt, rThread.GetIndexID());
-  const CMICmnMIValueConst miValueConst2(strThread);
-  const CMICmnMIValueResult miValueResult2("target-id", miValueConst2);
-  vwrMIValueTuple.Add(miValueResult2);
-
-  // Add "frame"
-  if (veThreadInfoFormat != eThreadInfoFormat_NoFrames) {
-    CMIUtilString strFrames;
-    if (!GetThreadFrames(vCmdData, rThread.GetIndexID(),
-                         eFrameInfoFormat_AllArgumentsInSimpleForm, strFrames))
-      return MIstatus::failure;
-
-    const CMICmnMIValueConst miValueConst3(strFrames, true);
-    vwrMIValueTuple.Add(miValueConst3, false);
-  }
-
-  // Add "state"
-  const CMICmnMIValueConst miValueConst4(strState);
-  const CMICmnMIValueResult miValueResult4("state", miValueConst4);
-  vwrMIValueTuple.Add(miValueResult4);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Form MI partial response by appending more MI value type objects to
-// the
-//          tuple type object past in.
-// Type:    Method.
-// Args:    vrFrame         - (R)   LLDB thread object.
-//          vMaskVarTypes   - (R)   Construed according to VariableType_e.
-//          veVarInfoFormat - (R)   The type of variable info that should be
-//          shown.
-//          vwrMIValueList  - (W)   MI value list object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::MIResponseFormVariableInfo(
-    const lldb::SBFrame &vrFrame, const MIuint vMaskVarTypes,
-    const VariableInfoFormat_e veVarInfoFormat,
-    CMICmnMIValueList &vwrMiValueList, const MIuint vnMaxDepth, /* = 10 */
-    const bool vbMarkArgs /* = false*/) {
-  bool bOk = MIstatus::success;
-  lldb::SBFrame &rFrame = const_cast<lldb::SBFrame &>(vrFrame);
-
-  const bool bArg = (vMaskVarTypes & eVariableType_Arguments);
-  const bool bLocals = (vMaskVarTypes & eVariableType_Locals);
-  const bool bStatics = (vMaskVarTypes & eVariableType_Statics);
-  const bool bInScopeOnly = (vMaskVarTypes & eVariableType_InScope);
-
-  // Handle arguments first
-  lldb::SBValueList listArg = rFrame.GetVariables(bArg, false, false, false);
-  bOk = bOk && MIResponseForVariableInfoInternal(veVarInfoFormat,
-                                                 vwrMiValueList, listArg,
-                                                 vnMaxDepth, true, vbMarkArgs);
-
-  // Handle remaining variables
-  lldb::SBValueList listVars =
-      rFrame.GetVariables(false, bLocals, bStatics, bInScopeOnly);
-  bOk = bOk && MIResponseForVariableInfoInternal(veVarInfoFormat,
-                                                 vwrMiValueList, listVars,
-                                                 vnMaxDepth, false, vbMarkArgs);
-
-  return bOk;
-}
-
-bool CMICmnLLDBDebugSessionInfo::MIResponseForVariableInfoInternal(
-    const VariableInfoFormat_e veVarInfoFormat,
-    CMICmnMIValueList &vwrMiValueList, const lldb::SBValueList &vwrSBValueList,
-    const MIuint vnMaxDepth, const bool vbIsArgs, const bool vbMarkArgs) {
-  const MIuint nArgs = vwrSBValueList.GetSize();
-  for (MIuint i = 0; i < nArgs; i++) {
-    CMICmnMIValueTuple miValueTuple;
-    lldb::SBValue value = vwrSBValueList.GetValueAtIndex(i);
-    // If one stops inside try block with, which catch clause type is unnamed
-    // (e.g std::exception&) then value name will be nullptr as well as value
-    // pointer
-    const char *name = value.GetName();
-    if (name == nullptr)
-      continue;
-    const CMICmnMIValueConst miValueConst(name);
-    const CMICmnMIValueResult miValueResultName("name", miValueConst);
-    if (vbMarkArgs && vbIsArgs) {
-      const CMICmnMIValueConst miValueConstArg("1");
-      const CMICmnMIValueResult miValueResultArg("arg", miValueConstArg);
-      miValueTuple.Add(miValueResultArg);
-    }
-    if (veVarInfoFormat != eVariableInfoFormat_NoValues) {
-      miValueTuple.Add(miValueResultName); // name
-      if (veVarInfoFormat == eVariableInfoFormat_SimpleValues) {
-        const CMICmnMIValueConst miValueConst3(value.GetTypeName());
-        const CMICmnMIValueResult miValueResult3("type", miValueConst3);
-        miValueTuple.Add(miValueResult3);
-      }
-      const MIuint nChildren = value.GetNumChildren();
-      const bool bIsPointerType = value.GetType().IsPointerType();
-      if (nChildren == 0 ||                                 // no children
-          (bIsPointerType && nChildren == 1) ||             // pointers
-          veVarInfoFormat == eVariableInfoFormat_AllValues) // show all values
-      {
-        CMIUtilString strValue;
-        if (GetVariableInfo(value, vnMaxDepth == 0, strValue)) {
-          const CMICmnMIValueConst miValueConst2(
-              strValue.Escape().AddSlashes());
-          const CMICmnMIValueResult miValueResult2("value", miValueConst2);
-          miValueTuple.Add(miValueResult2);
-        }
-      }
-      vwrMiValueList.Add(miValueTuple);
-      continue;
-    }
-
-    if (vbMarkArgs) {
-      // If we are printing names only with vbMarkArgs, we still need to add the
-      // name to the value tuple
-      miValueTuple.Add(miValueResultName); // name
-      vwrMiValueList.Add(miValueTuple);
-    } else {
-      // If we are printing name only then no need to put it in the tuple.
-      vwrMiValueList.Add(miValueResultName);
-    }
-  }
-  return MIstatus::success;
-}
-
-//++
-// Details: Extract the value's name and value or recurse into child value
-// object.
-// Type:    Method.
-// Args:    vrValue         - (R)  LLDB value object.
-//          vbInSimpleForm  - (R)  True = Get variable info in simple form (i.e.
-//          don't expand aggregates).
-//                          -      False = Get variable info (and expand
-//                          aggregates if any).
-//          vwrStrValue  t  - (W)  The string representation of this value.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::GetVariableInfo(const lldb::SBValue &vrValue,
-                                                 const bool vbInSimpleForm,
-                                                 CMIUtilString &vwrStrValue) {
-  const CMICmnLLDBUtilSBValue utilValue(vrValue, true, false);
-  const bool bExpandAggregates = !vbInSimpleForm;
-  vwrStrValue = utilValue.GetValue(bExpandAggregates);
-  return MIstatus::success;
-}
-
-//++
-// Details: Form MI partial response by appending more MI value type objects to
-// the
-//          tuple type object past in.
-// Type:    Method.
-// Args:    vrThread        - (R) LLDB thread object.
-//          vwrMIValueTuple - (W) MI value tuple object.
-//          vArgInfo        - (R) Args information in MI response form.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::MIResponseFormFrameInfo(
-    const lldb::SBThread &vrThread, const MIuint vnLevel,
-    const FrameInfoFormat_e veFrameInfoFormat,
-    CMICmnMIValueTuple &vwrMiValueTuple) {
-  lldb::SBThread &rThread = const_cast<lldb::SBThread &>(vrThread);
-
-  lldb::SBFrame frame = rThread.GetFrameAtIndex(vnLevel);
-  lldb::addr_t pc = 0;
-  CMIUtilString fnName;
-  CMIUtilString fileName;
-  CMIUtilString path;
-  MIuint nLine = 0;
-  if (!GetFrameInfo(frame, pc, fnName, fileName, path, nLine))
-    return MIstatus::failure;
-
-  // MI print "{level=\"0\",addr=\"0x%016" PRIx64
-  // "\",func=\"%s\",file=\"%s\",fullname=\"%s\",line=\"%d\"}"
-  const CMIUtilString strLevel(CMIUtilString::Format("%d", vnLevel));
-  const CMICmnMIValueConst miValueConst(strLevel);
-  const CMICmnMIValueResult miValueResult("level", miValueConst);
-  vwrMiValueTuple.Add(miValueResult);
-  const CMIUtilString strAddr(CMIUtilString::Format("0x%016" PRIx64, pc));
-  const CMICmnMIValueConst miValueConst2(strAddr);
-  const CMICmnMIValueResult miValueResult2("addr", miValueConst2);
-  vwrMiValueTuple.Add(miValueResult2);
-  const CMICmnMIValueConst miValueConst3(fnName);
-  const CMICmnMIValueResult miValueResult3("func", miValueConst3);
-  vwrMiValueTuple.Add(miValueResult3);
-  if (veFrameInfoFormat != eFrameInfoFormat_NoArguments) {
-    CMICmnMIValueList miValueList(true);
-    const MIuint maskVarTypes = eVariableType_Arguments;
-    if (veFrameInfoFormat == eFrameInfoFormat_AllArgumentsInSimpleForm) {
-      if (!MIResponseFormVariableInfo(frame, maskVarTypes,
-                                      eVariableInfoFormat_AllValues,
-                                      miValueList, 0))
-        return MIstatus::failure;
-    } else if (!MIResponseFormVariableInfo(frame, maskVarTypes,
-                                           eVariableInfoFormat_AllValues,
-                                           miValueList))
-      return MIstatus::failure;
-
-    const CMICmnMIValueResult miValueResult4("args", miValueList);
-    vwrMiValueTuple.Add(miValueResult4);
-  }
-  const CMICmnMIValueConst miValueConst5(fileName);
-  const CMICmnMIValueResult miValueResult5("file", miValueConst5);
-  vwrMiValueTuple.Add(miValueResult5);
-  const CMICmnMIValueConst miValueConst6(path);
-  const CMICmnMIValueResult miValueResult6("fullname", miValueConst6);
-  vwrMiValueTuple.Add(miValueResult6);
-  const CMIUtilString strLine(CMIUtilString::Format("%d", nLine));
-  const CMICmnMIValueConst miValueConst7(strLine);
-  const CMICmnMIValueResult miValueResult7("line", miValueConst7);
-  vwrMiValueTuple.Add(miValueResult7);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the frame information from LLDB frame object.
-// Type:    Method.
-// Args:    vrFrame         - (R) LLDB thread object.
-//          vPc             - (W) Address number.
-//          vFnName         - (W) Function name.
-//          vFileName       - (W) File name text.
-//          vPath           - (W) Full file name and path text.
-//          vnLine          - (W) File line number.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::GetFrameInfo(
-    const lldb::SBFrame &vrFrame, lldb::addr_t &vwPc, CMIUtilString &vwFnName,
-    CMIUtilString &vwFileName, CMIUtilString &vwPath, MIuint &vwnLine) {
-  lldb::SBFrame &rFrame = const_cast<lldb::SBFrame &>(vrFrame);
-
-  static char pBuffer[PATH_MAX];
-  const MIuint nBytes =
-      rFrame.GetLineEntry().GetFileSpec().GetPath(&pBuffer[0], sizeof(pBuffer));
-  MIunused(nBytes);
-  CMIUtilString strResolvedPath(&pBuffer[0]);
-  const char *pUnkwn = "??";
-  if (!ResolvePath(pUnkwn, strResolvedPath))
-    return MIstatus::failure;
-  vwPath = strResolvedPath;
-
-  vwPc = rFrame.GetPC();
-
-  const char *pFnName = rFrame.GetFunctionName();
-  vwFnName = (pFnName != nullptr) ? pFnName : pUnkwn;
-
-  const char *pFileName = rFrame.GetLineEntry().GetFileSpec().GetFilename();
-  vwFileName = (pFileName != nullptr) ? pFileName : pUnkwn;
-
-  vwnLine = rFrame.GetLineEntry().GetLine();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Form MI partial response by appending more MI value type objects to
-// the
-//          tuple type object past in.
-// Type:    Method.
-// Args:    vrBrkPtInfo     - (R) Break point information object.
-//          vwrMIValueTuple - (W) MI value tuple object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfo::MIResponseFormBrkPtFrameInfo(
-    const SBrkPtInfo &vrBrkPtInfo, CMICmnMIValueTuple &vwrMiValueTuple) {
-  const CMIUtilString strAddr(
-      CMIUtilString::Format("0x%016" PRIx64, vrBrkPtInfo.m_pc));
-  const CMICmnMIValueConst miValueConst2(strAddr);
-  const CMICmnMIValueResult miValueResult2("addr", miValueConst2);
-  vwrMiValueTuple.Add(miValueResult2);
-  const CMICmnMIValueConst miValueConst3(vrBrkPtInfo.m_fnName);
-  const CMICmnMIValueResult miValueResult3("func", miValueConst3);
-  vwrMiValueTuple.Add(miValueResult3);
-  const CMICmnMIValueConst miValueConst5(vrBrkPtInfo.m_fileName);
-  const CMICmnMIValueResult miValueResult5("file", miValueConst5);
-  vwrMiValueTuple.Add(miValueResult5);
-  const CMIUtilString strN5 = CMIUtilString::Format(
-      "%s/%s", vrBrkPtInfo.m_path.c_str(), vrBrkPtInfo.m_fileName.c_str());
-  const CMICmnMIValueConst miValueConst6(strN5);
-  const CMICmnMIValueResult miValueResult6("fullname", miValueConst6);
-  vwrMiValueTuple.Add(miValueResult6);
-  const CMIUtilString strLine(CMIUtilString::Format("%d", vrBrkPtInfo.m_nLine));
-  const CMICmnMIValueConst miValueConst7(strLine);
-  const CMICmnMIValueResult miValueResult7("line", miValueConst7);
-  vwrMiValueTuple.Add(miValueResult7);
-}
-
-//++
-// Details: Form MI partial response by appending more MI value type objects to
-// the
-//          tuple type object past in.
-// Type:    Method.
-// Args:    vrBrkPtInfo     - (R) Break point information object.
-//          vwrMIValueTuple - (W) MI value tuple object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::MIResponseFormBrkPtInfo(
-    const SBrkPtInfo &vrBrkPtInfo, CMICmnMIValueTuple &vwrMiValueTuple) {
-  // MI print
-  // "=breakpoint-modified,bkpt={number=\"%d\",type=\"breakpoint\",disp=\"%s\",enabled=\"%c\",addr=\"0x%016"
-  // PRIx64 "\",
-  // func=\"%s\",file=\"%s\",fullname=\"%s/%s\",line=\"%d\",times=\"%d\",original-location=\"%s\"}"
-
-  // "number="
-  const CMICmnMIValueConst miValueConst(
-      CMIUtilString::Format("%d", vrBrkPtInfo.m_id));
-  const CMICmnMIValueResult miValueResult("number", miValueConst);
-  CMICmnMIValueTuple miValueTuple(miValueResult);
-  // "type="
-  const CMICmnMIValueConst miValueConst2(vrBrkPtInfo.m_strType);
-  const CMICmnMIValueResult miValueResult2("type", miValueConst2);
-  miValueTuple.Add(miValueResult2);
-  // "disp="
-  const CMICmnMIValueConst miValueConst3(vrBrkPtInfo.m_bDisp ? "del" : "keep");
-  const CMICmnMIValueResult miValueResult3("disp", miValueConst3);
-  miValueTuple.Add(miValueResult3);
-  // "enabled="
-  const CMICmnMIValueConst miValueConst4(vrBrkPtInfo.m_bEnabled ? "y" : "n");
-  const CMICmnMIValueResult miValueResult4("enabled", miValueConst4);
-  miValueTuple.Add(miValueResult4);
-  // "addr="
-  // "func="
-  // "file="
-  // "fullname="
-  // "line="
-  MIResponseFormBrkPtFrameInfo(vrBrkPtInfo, miValueTuple);
-  // "pending="
-  if (vrBrkPtInfo.m_bPending) {
-    const CMICmnMIValueConst miValueConst(vrBrkPtInfo.m_strOrigLoc);
-    const CMICmnMIValueList miValueList(miValueConst);
-    const CMICmnMIValueResult miValueResult("pending", miValueList);
-    miValueTuple.Add(miValueResult);
-  }
-  if (vrBrkPtInfo.m_bHaveArgOptionThreadGrp) {
-    const CMICmnMIValueConst miValueConst(vrBrkPtInfo.m_strOptThrdGrp);
-    const CMICmnMIValueList miValueList(miValueConst);
-    const CMICmnMIValueResult miValueResult("thread-groups", miValueList);
-    miValueTuple.Add(miValueResult);
-  }
-  // "times="
-  const CMICmnMIValueConst miValueConstB(
-      CMIUtilString::Format("%d", vrBrkPtInfo.m_nTimes));
-  const CMICmnMIValueResult miValueResultB("times", miValueConstB);
-  miValueTuple.Add(miValueResultB);
-  // "thread="
-  if (vrBrkPtInfo.m_bBrkPtThreadId) {
-    const CMICmnMIValueConst miValueConst(
-        CMIUtilString::Format("%d", vrBrkPtInfo.m_nBrkPtThreadId));
-    const CMICmnMIValueResult miValueResult("thread", miValueConst);
-    miValueTuple.Add(miValueResult);
-  }
-  // "cond="
-  if (vrBrkPtInfo.m_bCondition) {
-    const CMICmnMIValueConst miValueConst(vrBrkPtInfo.m_strCondition);
-    const CMICmnMIValueResult miValueResult("cond", miValueConst);
-    miValueTuple.Add(miValueResult);
-  }
-  // "ignore="
-  if (vrBrkPtInfo.m_nIgnore != 0) {
-    const CMICmnMIValueConst miValueConst(
-        CMIUtilString::Format("%d", vrBrkPtInfo.m_nIgnore));
-    const CMICmnMIValueResult miValueResult("ignore", miValueConst);
-    miValueTuple.Add(miValueResult);
-  }
-  // "original-location="
-  const CMICmnMIValueConst miValueConstC(vrBrkPtInfo.m_strOrigLoc);
-  const CMICmnMIValueResult miValueResultC("original-location", miValueConstC);
-  miValueTuple.Add(miValueResultC);
-
-  vwrMiValueTuple = miValueTuple;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve breakpoint information and write into the given breakpoint
-// information
-//          object. Note not all possible information is retrieved and so the
-//          information
-//          object may need to be filled in with more information after calling
-//          this
-//          function. Mainly breakpoint location information of information that
-//          is
-//          unlikely to change.
-// Type:    Method.
-// Args:    vBrkPt      - (R) LLDB break point object.
-//          vrBrkPtInfo - (W) Break point information object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfo::GetBrkPtInfo(const lldb::SBBreakpoint &vBrkPt,
-                                              SBrkPtInfo &vrwBrkPtInfo) const {
-  lldb::SBBreakpoint &rBrkPt = const_cast<lldb::SBBreakpoint &>(vBrkPt);
-  lldb::SBBreakpointLocation brkPtLoc = rBrkPt.GetLocationAtIndex(0);
-  lldb::SBAddress brkPtAddr = brkPtLoc.GetAddress();
-  lldb::SBSymbolContext symbolCntxt =
-      brkPtAddr.GetSymbolContext(lldb::eSymbolContextEverything);
-  const char *pUnkwn = "??";
-  lldb::SBModule rModule = symbolCntxt.GetModule();
-  const char *pModule =
-      rModule.IsValid() ? rModule.GetFileSpec().GetFilename() : pUnkwn;
-  MIunused(pModule);
-  const char *pFile = pUnkwn;
-  const char *pFn = pUnkwn;
-  const char *pFilePath = pUnkwn;
-  size_t nLine = 0;
-  lldb::addr_t nAddr = brkPtAddr.GetLoadAddress(GetTarget());
-  if (nAddr == LLDB_INVALID_ADDRESS)
-    nAddr = brkPtAddr.GetFileAddress();
-
-  lldb::SBCompileUnit rCmplUnit = symbolCntxt.GetCompileUnit();
-  if (rCmplUnit.IsValid()) {
-    lldb::SBFileSpec rFileSpec = rCmplUnit.GetFileSpec();
-    pFile = rFileSpec.GetFilename();
-    pFilePath = rFileSpec.GetDirectory();
-    lldb::SBFunction rFn = symbolCntxt.GetFunction();
-    if (rFn.IsValid())
-      pFn = rFn.GetName();
-    lldb::SBLineEntry rLnEntry = symbolCntxt.GetLineEntry();
-    if (rLnEntry.GetLine() > 0)
-      nLine = rLnEntry.GetLine();
-  }
-
-  vrwBrkPtInfo.m_id = vBrkPt.GetID();
-  vrwBrkPtInfo.m_strType = "breakpoint";
-  vrwBrkPtInfo.m_pc = nAddr;
-  vrwBrkPtInfo.m_fnName = pFn;
-  vrwBrkPtInfo.m_fileName = pFile;
-  vrwBrkPtInfo.m_path = pFilePath;
-  vrwBrkPtInfo.m_nLine = nLine;
-  vrwBrkPtInfo.m_nTimes = vBrkPt.GetHitCount();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Get current debugger.
-// Type:    Method.
-// Args:    None.
-// Return:  lldb::SBDebugger   - current debugger.
-// Throws:  None.
-//--
-lldb::SBDebugger &CMICmnLLDBDebugSessionInfo::GetDebugger() const {
-  return CMICmnLLDBDebugger::Instance().GetTheDebugger();
-}
-
-//++
-// Details: Get current listener.
-// Type:    Method.
-// Args:    None.
-// Return:  lldb::SBListener   - current listener.
-// Throws:  None.
-//--
-lldb::SBListener &CMICmnLLDBDebugSessionInfo::GetListener() const {
-  return CMICmnLLDBDebugger::Instance().GetTheListener();
-}
-
-//++
-// Details: Get current target.
-// Type:    Method.
-// Args:    None.
-// Return:  lldb::SBTarget   - current target.
-// Throws:  None.
-//--
-lldb::SBTarget CMICmnLLDBDebugSessionInfo::GetTarget() const {
-  auto target = GetDebugger().GetSelectedTarget();
-  if (target.IsValid())
-    return target;
-  return GetDebugger().GetDummyTarget();
-}
-
-//++
-// Details: Get current process.
-// Type:    Method.
-// Args:    None.
-// Return:  lldb::SBProcess   - current process.
-// Throws:  None.
-//--
-lldb::SBProcess CMICmnLLDBDebugSessionInfo::GetProcess() const {
-  return GetTarget().GetProcess();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
deleted file mode 100644
index 1fa8195..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.h
+++ /dev/null
@@ -1,292 +0,0 @@
-//===-- MICmnLLDBDebugSessionInfo.h -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include "lldb/API/SBDebugger.h"
-#include "lldb/API/SBListener.h"
-#include "lldb/API/SBProcess.h"
-#include "lldb/API/SBTarget.h"
-#include <map>
-#include <vector>
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MICmnLLDBDebugSessionInfoVarObj.h"
-#include "MICmnMIValueTuple.h"
-#include "MIUtilMapIdToVariant.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilThreadBaseStd.h"
-
-// Declarations:
-class CMICmnLLDBDebugger;
-struct SMICmdData;
-class CMICmnMIValueTuple;
-class CMICmnMIValueList;
-
-//++
-//============================================================================
-// Details: MI debug session object that holds debugging information between
-//          instances of MI commands executing their work and producing MI
-//          result records. Information/data is set by one or many commands then
-//          retrieved by the same or other subsequent commands.
-//          It primarily holds LLDB type objects.
-//          A singleton class.
-//--
-class CMICmnLLDBDebugSessionInfo
-    : public CMICmnBase,
-      public MI::ISingleton<CMICmnLLDBDebugSessionInfo> {
-  friend class MI::ISingleton<CMICmnLLDBDebugSessionInfo>;
-
-  // Structs:
-public:
-  //++
-  //============================================================================
-  // Details: Break point information object. Used to easily pass information
-  // about
-  //          a break around and record break point information to be recalled
-  //          by
-  //          other commands or LLDB event handling functions.
-  //--
-  struct SBrkPtInfo {
-    SBrkPtInfo()
-        : m_id(0), m_bDisp(false), m_bEnabled(false), m_pc(0), m_nLine(0),
-          m_bHaveArgOptionThreadGrp(false), m_nTimes(0), m_bPending(false),
-          m_nIgnore(0), m_bCondition(false), m_bBrkPtThreadId(false),
-          m_nBrkPtThreadId(0) {}
-
-    MIuint m_id;              // LLDB break point ID.
-    CMIUtilString m_strType;  // Break point type.
-    bool m_bDisp;             // True = "del", false = "keep".
-    bool m_bEnabled;          // True = enabled, false = disabled break point.
-    lldb::addr_t m_pc;        // Address number.
-    CMIUtilString m_fnName;   // Function name.
-    CMIUtilString m_fileName; // File name text.
-    CMIUtilString m_path;     // Full file name and path text.
-    MIuint m_nLine;           // File line number.
-    bool m_bHaveArgOptionThreadGrp; // True = include MI field, false = do not
-                                    // include "thread-groups".
-    CMIUtilString m_strOptThrdGrp;  // Thread group number.
-    MIuint m_nTimes;                // The count of the breakpoint existence.
-    CMIUtilString m_strOrigLoc;     // The name of the break point.
-    bool m_bPending;  // True = the breakpoint has not been established yet,
-                      // false = location found
-    MIuint m_nIgnore; // The number of time the breakpoint is run over before it
-                      // is stopped on a hit
-    bool m_bCondition; // True = break point is conditional, use condition
-                       // expression, false = no condition
-    CMIUtilString m_strCondition; // Break point condition expression
-    bool m_bBrkPtThreadId; // True = break point is specified to work with a
-                           // specific thread, false = no specified thread given
-    MIuint
-        m_nBrkPtThreadId; // Restrict the breakpoint to the specified thread-id
-  };
-
-  // Enumerations:
-public:
-  //++ ===================================================================
-  // Details: The type of variable used by MIResponseFormVariableInfo family
-  // functions.
-  //--
-  enum VariableType_e {
-    eVariableType_InScope = (1u << 0),  // In scope only.
-    eVariableType_Statics = (1u << 1),  // Statics.
-    eVariableType_Locals = (1u << 2),   // Locals.
-    eVariableType_Arguments = (1u << 3) // Arguments.
-  };
-
-  //++ ===================================================================
-  // Details: Determine the information that should be shown by using
-  // MIResponseFormVariableInfo family functions.
-  //--
-  enum VariableInfoFormat_e {
-    eVariableInfoFormat_NoValues = 0,
-    eVariableInfoFormat_AllValues = 1,
-    eVariableInfoFormat_SimpleValues = 2
-  };
-
-  //++ ===================================================================
-  // Details: Determine the information that should be shown by using
-  // MIResponseFormThreadInfo family functions.
-  //--
-  enum ThreadInfoFormat_e {
-    eThreadInfoFormat_NoFrames,
-    eThreadInfoFormat_AllFrames
-  };
-
-  //++ ===================================================================
-  // Details: Determine the information that should be shown by using
-  // MIResponseFormFrameInfo family functions.
-  //--
-  enum FrameInfoFormat_e {
-    eFrameInfoFormat_NoArguments,
-    eFrameInfoFormat_AllArguments,
-    eFrameInfoFormat_AllArgumentsInSimpleForm
-  };
-
-  // Typedefs:
-public:
-  typedef std::vector<uint32_t> VecActiveThreadId_t;
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-
-  // Variant type data which can be assigned and retrieved across all command
-  // instances
-  template <typename T>
-  bool SharedDataAdd(const CMIUtilString &vKey, const T &vData);
-  template <typename T>
-  bool SharedDataRetrieve(const CMIUtilString &vKey, T &vwData);
-  void SharedDataDestroy();
-
-  //  Common command required functionality
-  bool AccessPath(const CMIUtilString &vPath, bool &vwbYesAccessible);
-  bool ResolvePath(const SMICmdData &vCmdData, const CMIUtilString &vPath,
-                   CMIUtilString &vwrResolvedPath);
-  bool ResolvePath(const CMIUtilString &vstrUnknown,
-                   CMIUtilString &vwrResolvedPath);
-  bool MIResponseFormFrameInfo(const lldb::SBThread &vrThread,
-                               const MIuint vnLevel,
-                               const FrameInfoFormat_e veFrameInfoFormat,
-                               CMICmnMIValueTuple &vwrMiValueTuple);
-  bool MIResponseFormThreadInfo(const SMICmdData &vCmdData,
-                                const lldb::SBThread &vrThread,
-                                const ThreadInfoFormat_e veThreadInfoFormat,
-                                CMICmnMIValueTuple &vwrMIValueTuple);
-  bool MIResponseFormVariableInfo(const lldb::SBFrame &vrFrame,
-                                  const MIuint vMaskVarTypes,
-                                  const VariableInfoFormat_e veVarInfoFormat,
-                                  CMICmnMIValueList &vwrMiValueList,
-                                  const MIuint vnMaxDepth = 10,
-                                  const bool vbMarkArgs = false);
-  void MIResponseFormBrkPtFrameInfo(const SBrkPtInfo &vrBrkPtInfo,
-                                    CMICmnMIValueTuple &vwrMiValueTuple);
-  bool MIResponseFormBrkPtInfo(const SBrkPtInfo &vrBrkPtInfo,
-                               CMICmnMIValueTuple &vwrMiValueTuple);
-  bool GetBrkPtInfo(const lldb::SBBreakpoint &vBrkPt,
-                    SBrkPtInfo &vrwBrkPtInfo) const;
-  bool RecordBrkPtInfo(const MIuint vnBrkPtId, const SBrkPtInfo &vrBrkPtInfo);
-  bool RecordBrkPtInfoGet(const MIuint vnBrkPtId,
-                          SBrkPtInfo &vrwBrkPtInfo) const;
-  bool RecordBrkPtInfoDelete(const MIuint vnBrkPtId);
-  CMIUtilThreadMutex &GetSessionMutex() { return m_sessionMutex; }
-  lldb::SBDebugger &GetDebugger() const;
-  lldb::SBListener &GetListener() const;
-  lldb::SBTarget GetTarget() const;
-  lldb::SBProcess GetProcess() const;
-
-  // Attributes:
-public:
-  // The following are available to all command instances
-  const MIuint m_nBrkPointCntMax;
-  VecActiveThreadId_t m_vecActiveThreadId;
-  lldb::tid_t m_currentSelectedThread;
-
-  // These are keys that can be used to access the shared data map
-  // Note: This list is expected to grow and will be moved and abstracted in the
-  // future.
-  const CMIUtilString m_constStrSharedDataKeyWkDir;
-  const CMIUtilString m_constStrSharedDataSolibPath;
-  const CMIUtilString m_constStrPrintCharArrayAsString;
-  const CMIUtilString m_constStrPrintExpandAggregates;
-  const CMIUtilString m_constStrPrintAggregateFieldNames;
-
-  // Typedefs:
-private:
-  typedef std::vector<CMICmnLLDBDebugSessionInfoVarObj> VecVarObj_t;
-  typedef std::map<MIuint, SBrkPtInfo> MapBrkPtIdToBrkPtInfo_t;
-  typedef std::pair<MIuint, SBrkPtInfo> MapPairBrkPtIdToBrkPtInfo_t;
-
-  // Methods:
-private:
-  /* ctor */ CMICmnLLDBDebugSessionInfo();
-  /* ctor */ CMICmnLLDBDebugSessionInfo(const CMICmnLLDBDebugSessionInfo &);
-  void operator=(const CMICmnLLDBDebugSessionInfo &);
-  //
-  bool GetVariableInfo(const lldb::SBValue &vrValue, const bool vbInSimpleForm,
-                       CMIUtilString &vwrStrValue);
-  bool GetFrameInfo(const lldb::SBFrame &vrFrame, lldb::addr_t &vwPc,
-                    CMIUtilString &vwFnName, CMIUtilString &vwFileName,
-                    CMIUtilString &vwPath, MIuint &vwnLine);
-  bool GetThreadFrames(const SMICmdData &vCmdData, const MIuint vThreadIdx,
-                       const FrameInfoFormat_e veFrameInfoFormat,
-                       CMIUtilString &vwrThreadFrames);
-  bool
-  MIResponseForVariableInfoInternal(const VariableInfoFormat_e veVarInfoFormat,
-                                    CMICmnMIValueList &vwrMiValueList,
-                                    const lldb::SBValueList &vwrSBValueList,
-                                    const MIuint vnMaxDepth,
-                                    const bool vbIsArgs, const bool vbMarkArgs);
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnLLDBDebugSessionInfo() override;
-
-  // Attributes:
-private:
-  CMIUtilMapIdToVariant m_mapIdToSessionData; // Hold and retrieve key to value
-                                              // data available across all
-                                              // commands
-  VecVarObj_t m_vecVarObj; // Vector of session variable objects
-  MapBrkPtIdToBrkPtInfo_t m_mapBrkPtIdToBrkPtInfo;
-  CMIUtilThreadMutex m_sessionMutex;
-};
-
-//++
-// Details: Command instances can create and share data between other instances
-// of commands.
-//          This function adds new data to the shared data. Using the same ID
-//          more than
-//          once replaces any previous matching data keys.
-// Type:    Template method.
-// Args:    T       - The type of the object to be stored.
-//          vKey    - (R) A non empty unique data key to retrieve the data by.
-//          vData   - (R) Data to be added to the share.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-template <typename T>
-bool CMICmnLLDBDebugSessionInfo::SharedDataAdd(const CMIUtilString &vKey,
-                                               const T &vData) {
-  if (!m_mapIdToSessionData.Add<T>(vKey, vData)) {
-    SetErrorDescription(m_mapIdToSessionData.GetErrorDescription());
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Command instances can create and share data between other instances
-// of commands.
-//          This function retrieves data from the shared data container.
-// Type:    Method.
-// Args:    T     - The type of the object being retrieved.
-//          vKey  - (R) A non empty unique data key to retrieve the data by.
-//          vData - (W) The data.
-// Return:  bool  - True = data found, false = data not found or an error
-// occurred trying to fetch.
-// Throws:  None.
-//--
-template <typename T>
-bool CMICmnLLDBDebugSessionInfo::SharedDataRetrieve(const CMIUtilString &vKey,
-                                                    T &vwData) {
-  bool bDataFound = false;
-
-  if (!m_mapIdToSessionData.Get<T>(vKey, vwData, bDataFound)) {
-    SetErrorDescription(m_mapIdToSessionData.GetErrorDescription());
-    return MIstatus::failure;
-  }
-
-  return bDataFound;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
deleted file mode 100644
index fc0f76b..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
+++ /dev/null
@@ -1,573 +0,0 @@
-//===-- MICmnLLDBDebugSessionInfoVarObj.cpp ---------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnLLDBDebugSessionInfoVarObj.h"
-#include "MICmnLLDBProxySBValue.h"
-#include "MICmnLLDBUtilSBValue.h"
-
-// Instantiations:
-const char *CMICmnLLDBDebugSessionInfoVarObj::ms_aVarFormatStrings[] = {
-    // CODETAG_SESSIONINFO_VARFORMAT_ENUM
-    // *** Order is import here.
-    "<Invalid var format>", "binary", "octal", "decimal",
-    "hexadecimal",          "natural"};
-const char *CMICmnLLDBDebugSessionInfoVarObj::ms_aVarFormatChars[] = {
-    // CODETAG_SESSIONINFO_VARFORMAT_ENUM
-    // *** Order is import here.
-    "<Invalid var format>", "t", "o", "d", "x", "N"};
-CMICmnLLDBDebugSessionInfoVarObj::MapKeyToVarObj_t
-    CMICmnLLDBDebugSessionInfoVarObj::ms_mapVarIdToVarObj;
-MIuint CMICmnLLDBDebugSessionInfoVarObj::ms_nVarUniqueId = 0; // Index from 0
-CMICmnLLDBDebugSessionInfoVarObj::varFormat_e
-    CMICmnLLDBDebugSessionInfoVarObj::ms_eDefaultFormat = eVarFormat_Natural;
-
-//++
-// Details: CMICmnLLDBDebugSessionInfoVarObj constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::CMICmnLLDBDebugSessionInfoVarObj()
-    : m_eVarFormat(eVarFormat_Natural), m_eVarType(eVarType_Internal) {
-  // Do not call UpdateValue() in here as not necessary
-}
-
-//++
-// Details: CMICmnLLDBDebugSessionInfoVarObj constructor.
-// Type:    Method.
-// Args:    vrStrNameReal   - (R) The actual name of the variable, the
-// expression.
-//          vrStrName       - (R) The name given for *this var object.
-//          vrValue         - (R) The LLDB SBValue object represented by *this
-//          object.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::CMICmnLLDBDebugSessionInfoVarObj(
-    const CMIUtilString &vrStrNameReal, const CMIUtilString &vrStrName,
-    const lldb::SBValue &vrValue)
-    : m_eVarFormat(eVarFormat_Natural), m_eVarType(eVarType_Internal),
-      m_strName(vrStrName), m_SBValue(vrValue), m_strNameReal(vrStrNameReal) {
-  UpdateValue();
-}
-
-//++
-// Details: CMICmnLLDBDebugSessionInfoVarObj constructor.
-// Type:    Method.
-// Args:    vrStrNameReal           - (R) The actual name of the variable, the
-// expression.
-//          vrStrName               - (R) The name given for *this var object.
-//          vrValue                 - (R) The LLDB SBValue object represented by
-//          *this object.
-//          vrStrVarObjParentName   - (R) The var object parent to *this var
-//          object (LLDB SBValue equivalent).
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::CMICmnLLDBDebugSessionInfoVarObj(
-    const CMIUtilString &vrStrNameReal, const CMIUtilString &vrStrName,
-    const lldb::SBValue &vrValue, const CMIUtilString &vrStrVarObjParentName)
-    : m_eVarFormat(eVarFormat_Natural), m_eVarType(eVarType_Internal),
-      m_strName(vrStrName), m_SBValue(vrValue), m_strNameReal(vrStrNameReal),
-      m_strVarObjParentName(vrStrVarObjParentName) {
-  UpdateValue();
-}
-
-//++
-// Details: CMICmnLLDBDebugSessionInfoVarObj copy constructor.
-// Type:    Method.
-// Args:    vrOther - (R) The object to copy from.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::CMICmnLLDBDebugSessionInfoVarObj(
-    const CMICmnLLDBDebugSessionInfoVarObj &vrOther) {
-  CopyOther(vrOther);
-}
-
-//++
-// Details: CMICmnLLDBDebugSessionInfoVarObj copy constructor.
-// Type:    Method.
-// Args:    vrOther - (R) The object to copy from.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::CMICmnLLDBDebugSessionInfoVarObj(
-    CMICmnLLDBDebugSessionInfoVarObj &vrOther) {
-  CopyOther(vrOther);
-}
-
-//++
-// Details: CMICmnLLDBDebugSessionInfoVarObj move constructor.
-// Type:    Method.
-// Args:    vrwOther    - (R) The object to copy from.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::CMICmnLLDBDebugSessionInfoVarObj(
-    CMICmnLLDBDebugSessionInfoVarObj &&vrwOther) {
-  MoveOther(vrwOther);
-}
-
-//++
-// Details: CMICmnLLDBDebugSessionInfoVarObj assignment operator.
-// Type:    Method.
-// Args:    vrOther - (R) The object to copy from.
-// Return:  CMICmnLLDBDebugSessionInfoVarObj & - Updated *this object.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj &CMICmnLLDBDebugSessionInfoVarObj::
-operator=(const CMICmnLLDBDebugSessionInfoVarObj &vrOther) {
-  CopyOther(vrOther);
-
-  return *this;
-}
-
-//++
-// Details: CMICmnLLDBDebugSessionInfoVarObj assignment operator.
-// Type:    Method.
-// Args:    vrwOther    - (R) The object to copy from.
-// Return:  CMICmnLLDBDebugSessionInfoVarObj & - Updated *this object.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj &CMICmnLLDBDebugSessionInfoVarObj::
-operator=(CMICmnLLDBDebugSessionInfoVarObj &&vrwOther) {
-  MoveOther(vrwOther);
-
-  return *this;
-}
-
-//++
-// Details: Copy the other instance of that object to *this object.
-// Type:    Method.
-// Args:    vrOther - (R) The object to copy from.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfoVarObj::CopyOther(
-    const CMICmnLLDBDebugSessionInfoVarObj &vrOther) {
-  // Check for self-assignment
-  if (this == &vrOther)
-    return MIstatus::success;
-
-  m_eVarFormat = vrOther.m_eVarFormat;
-  m_eVarType = vrOther.m_eVarType;
-  m_strName = vrOther.m_strName;
-  m_SBValue = vrOther.m_SBValue;
-  m_strNameReal = vrOther.m_strNameReal;
-  m_strFormattedValue = vrOther.m_strFormattedValue;
-  m_strVarObjParentName = vrOther.m_strVarObjParentName;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Move that object to *this object.
-// Type:    Method.
-// Args:    vrwOther    - (RW) The object to copy from.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfoVarObj::MoveOther(
-    CMICmnLLDBDebugSessionInfoVarObj &vrwOther) {
-  // Check for self-assignment
-  if (this == &vrwOther)
-    return MIstatus::success;
-
-  CopyOther(vrwOther);
-  vrwOther.m_eVarFormat = eVarFormat_Natural;
-  vrwOther.m_eVarType = eVarType_Internal;
-  vrwOther.m_strName.clear();
-  vrwOther.m_SBValue.Clear();
-  vrwOther.m_strNameReal.clear();
-  vrwOther.m_strFormattedValue.clear();
-  vrwOther.m_strVarObjParentName.clear();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: CMICmnLLDBDebugSessionInfoVarObj destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::~CMICmnLLDBDebugSessionInfoVarObj() {}
-
-//++
-// Details: Retrieve the var format enumeration for the specified string.
-// Type:    Static method.
-// Args:    vrStrFormat - (R) Text description of the var format.
-// Return:  varFormat_e - Var format enumeration.
-//                      - No match found return eVarFormat_Invalid.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::varFormat_e
-CMICmnLLDBDebugSessionInfoVarObj::GetVarFormatForString(
-    const CMIUtilString &vrStrFormat) {
-  // CODETAG_SESSIONINFO_VARFORMAT_ENUM
-  for (MIuint i = 0; i < eVarFormat_count; i++) {
-    const char *pVarFormatString = ms_aVarFormatStrings[i];
-    if (vrStrFormat == pVarFormatString)
-      return static_cast<varFormat_e>(i);
-  }
-
-  return eVarFormat_Invalid;
-}
-
-//++
-// Details: Retrieve the var format enumeration for the specified character.
-// Type:    Static method.
-// Args:    vcFormat    - Character representing the var format.
-// Return:  varFormat_e - Var format enumeration.
-//                      - No match found return eVarFormat_Invalid.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::varFormat_e
-CMICmnLLDBDebugSessionInfoVarObj::GetVarFormatForChar(char vcFormat) {
-  if ('r' == vcFormat)
-    return eVarFormat_Hex;
-
-  // CODETAG_SESSIONINFO_VARFORMAT_ENUM
-  for (MIuint i = 0; i < eVarFormat_count; i++) {
-    const char *pVarFormatChar = ms_aVarFormatChars[i];
-    if (*pVarFormatChar == vcFormat)
-      return static_cast<varFormat_e>(i);
-  }
-
-  return eVarFormat_Invalid;
-}
-
-//++
-// Details: Return the equivalent var value formatted string for the given value
-// type,
-//          which was prepared for printing (i.e. value was escaped and now it's
-//          ready
-//          for wrapping into quotes).
-//          The SBValue vrValue parameter is checked by LLDB private code for
-//          valid
-//          scalar type via MI Driver proxy function as the valued returned can
-//          also be
-//          an error condition. The proxy function determines if the check was
-//          valid
-//          otherwise return an error condition state by other means saying so.
-// Type:    Static method.
-// Args:    vrValue     - (R) The var value object.
-//          veVarFormat - (R) Var format enumeration.
-// Returns: CMIUtilString   - Value formatted string.
-// Throws:  None.
-//--
-CMIUtilString CMICmnLLDBDebugSessionInfoVarObj::GetValueStringFormatted(
-    const lldb::SBValue &vrValue,
-    const CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veVarFormat) {
-  const CMICmnLLDBUtilSBValue utilValue(vrValue, true);
-  if (utilValue.IsIntegerType()) {
-    MIuint64 nValue = 0;
-    if (CMICmnLLDBProxySBValue::GetValueAsUnsigned(vrValue, nValue)) {
-      lldb::SBValue &rValue = const_cast<lldb::SBValue &>(vrValue);
-      return GetStringFormatted(nValue, rValue.GetValue(), veVarFormat);
-    }
-  }
-
-  return utilValue.GetValue().AddSlashes();
-}
-
-//++
-// Details: Return number formatted string according to the given value type.
-// Type:    Static method.
-// Args:    vnValue             - (R) The number value to get formatted.
-//          vpStrValueNatural   - (R) The natural representation of the number
-//          value.
-//          veVarFormat         - (R) Var format enumeration.
-// Returns: CMIUtilString       - Numerical formatted string.
-// Throws:  None.
-//--
-CMIUtilString CMICmnLLDBDebugSessionInfoVarObj::GetStringFormatted(
-    const MIuint64 vnValue, const char *vpStrValueNatural,
-    const CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veVarFormat) {
-  CMIUtilString strFormattedValue;
-  CMICmnLLDBDebugSessionInfoVarObj::varFormat_e veFormat = veVarFormat;
-  if (ms_eDefaultFormat != eVarFormat_Invalid &&
-      veVarFormat == eVarFormat_Natural) {
-    veFormat = ms_eDefaultFormat;
-  }
-
-  switch (veFormat) {
-  case eVarFormat_Binary:
-    strFormattedValue = CMIUtilString::FormatBinary(vnValue);
-    break;
-  case eVarFormat_Octal:
-    strFormattedValue = CMIUtilString::Format("0%llo", vnValue);
-    break;
-  case eVarFormat_Decimal:
-    strFormattedValue = CMIUtilString::Format("%lld", vnValue);
-    break;
-  case eVarFormat_Hex:
-    strFormattedValue = CMIUtilString::Format("0x%llx", vnValue);
-    break;
-  case eVarFormat_Natural:
-  default: {
-    strFormattedValue = (vpStrValueNatural != nullptr) ? vpStrValueNatural : "";
-  }
-  }
-
-  return strFormattedValue;
-}
-
-//++
-// Details: Delete internal container contents.
-// Type:    Static method.
-// Args:    None.
-// Returns: None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfoVarObj::VarObjClear() {
-  ms_mapVarIdToVarObj.clear();
-}
-
-//++
-// Details: Add a var object to the internal container.
-// Type:    Static method.
-// Args:    vrVarObj    - (R) The var value object.
-// Returns: None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfoVarObj::VarObjAdd(
-    const CMICmnLLDBDebugSessionInfoVarObj &vrVarObj) {
-  VarObjDelete(vrVarObj.GetName());
-  MapPairKeyToVarObj_t pr(vrVarObj.GetName(), vrVarObj);
-  ms_mapVarIdToVarObj.insert(pr);
-}
-
-//++
-// Details: Delete the var object from the internal container matching the
-// specified name.
-// Type:    Static method.
-// Args:    vrVarName   - (R) The var value name.
-// Returns: None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfoVarObj::VarObjDelete(
-    const CMIUtilString &vrVarName) {
-  const MapKeyToVarObj_t::const_iterator it =
-      ms_mapVarIdToVarObj.find(vrVarName);
-  if (it != ms_mapVarIdToVarObj.end()) {
-    ms_mapVarIdToVarObj.erase(it);
-  }
-}
-
-//++
-// Details: Update an existing var object in the internal container.
-// Type:    Static method.
-// Args:    vrVarObj    - (R) The var value object.
-// Returns: None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfoVarObj::VarObjUpdate(
-    const CMICmnLLDBDebugSessionInfoVarObj &vrVarObj) {
-  VarObjAdd(vrVarObj);
-}
-
-//++
-// Details: Retrieve the var object matching the specified name.
-// Type:    Static method.
-// Args:    vrVarName   - (R) The var value name.
-//          vrwVarObj   - (W) A var object.
-// Returns: bool    - True = object found, false = object not found.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfoVarObj::VarObjGet(
-    const CMIUtilString &vrVarName,
-    CMICmnLLDBDebugSessionInfoVarObj &vrwVarObj) {
-  const MapKeyToVarObj_t::const_iterator it =
-      ms_mapVarIdToVarObj.find(vrVarName);
-  if (it != ms_mapVarIdToVarObj.end()) {
-    const CMICmnLLDBDebugSessionInfoVarObj &rVarObj = (*it).second;
-    vrwVarObj = rVarObj;
-    return true;
-  }
-
-  return false;
-}
-
-//++
-// Details: A count is kept of the number of var value objects created. This is
-// count is
-//          used to ID the var value object. Reset the count to 0.
-// Type:    Static method.
-// Args:    None.
-// Returns: None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfoVarObj::VarObjIdResetToZero() {
-  ms_nVarUniqueId = 0;
-}
-
-//++
-// Details: Default format is globally used as the data format when "natural" is
-// in effect, that is, this overrides the default
-// Type:    Static method.
-// Args:    None.
-// Returns: None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfoVarObj::VarObjSetFormat(
-    varFormat_e eDefaultFormat) {
-  ms_eDefaultFormat = eDefaultFormat;
-}
-
-//++
-// Details: A count is kept of the number of var value objects created. This is
-// count is
-//          used to ID the var value object. Increment the count by 1.
-// Type:    Static method.
-// Args:    None.
-// Returns: None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfoVarObj::VarObjIdInc() { ms_nVarUniqueId++; }
-
-//++
-// Details: A count is kept of the number of var value objects created. This is
-// count is
-//          used to ID the var value object. Retrieve ID.
-// Type:    Static method.
-// Args:    None.
-// Returns: None.
-// Throws:  None.
-//--
-MIuint CMICmnLLDBDebugSessionInfoVarObj::VarObjIdGet() {
-  return ms_nVarUniqueId;
-}
-
-//++
-// Details: Retrieve the value formatted object's name.
-// Type:    Method.
-// Args:    None.
-// Returns: CMIUtilString & - Value's var%u name text.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnLLDBDebugSessionInfoVarObj::GetName() const {
-  return m_strName;
-}
-
-//++
-// Details: Retrieve the value formatted object's variable name as given in the
-// MI command
-//          to create the var object.
-// Type:    Method.
-// Args:    None.
-// Returns: CMIUtilString & - Value's real name text.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnLLDBDebugSessionInfoVarObj::GetNameReal() const {
-  return m_strNameReal;
-}
-
-//++
-// Details: Retrieve the value formatted string.
-// Type:    Method.
-// Args:    None.
-// Returns: CMIUtilString & - Value formatted string.
-// Throws:  None.
-//--
-const CMIUtilString &
-CMICmnLLDBDebugSessionInfoVarObj::GetValueFormatted() const {
-  return m_strFormattedValue;
-}
-
-//++
-// Details: Retrieve the LLDB Value object.
-// Type:    Method.
-// Args:    None.
-// Returns: lldb::SBValue & - LLDB Value object.
-// Throws:  None.
-//--
-lldb::SBValue &CMICmnLLDBDebugSessionInfoVarObj::GetValue() {
-  return m_SBValue;
-}
-
-//++
-// Details: Retrieve the LLDB Value object.
-// Type:    Method.
-// Args:    None.
-// Returns: lldb::SBValue & - Constant LLDB Value object.
-// Throws:  None.
-//--
-const lldb::SBValue &CMICmnLLDBDebugSessionInfoVarObj::GetValue() const {
-  return m_SBValue;
-}
-
-//++
-// Details: Set the var format type for *this object and update the formatting.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugSessionInfoVarObj::SetVarFormat(
-    const varFormat_e veVarFormat) {
-  if (veVarFormat >= eVarFormat_count)
-    return MIstatus::failure;
-
-  m_eVarFormat = veVarFormat;
-  UpdateValue();
-  return MIstatus::success;
-}
-
-//++
-// Details: Update *this var obj. Update it's value and type.
-// Type:    Method.
-// Args:    None.
-// Returns: None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugSessionInfoVarObj::UpdateValue() {
-  m_strFormattedValue = GetValueStringFormatted(m_SBValue, m_eVarFormat);
-
-  MIuint64 nValue = 0;
-  if (CMICmnLLDBProxySBValue::GetValueAsUnsigned(m_SBValue, nValue) ==
-      MIstatus::failure)
-    m_eVarType = eVarType_Composite;
-
-  CMICmnLLDBDebugSessionInfoVarObj::VarObjUpdate(*this);
-}
-
-//++
-// Details: Retrieve the enumeration type of the var object.
-// Type:    Method.
-// Args:    None.
-// Returns: varType_e   - Enumeration value.
-// Throws:  None.
-//--
-CMICmnLLDBDebugSessionInfoVarObj::varType_e
-CMICmnLLDBDebugSessionInfoVarObj::GetType() const {
-  return m_eVarType;
-}
-
-//++
-// Details: Retrieve the parent var object's name, the parent var object  to
-// *this var
-//          object (if assigned). The parent is equivalent to LLDB SBValue
-//          variable's
-//          parent.
-// Type:    Method.
-// Args:    None.
-// Returns: CMIUtilString & - Pointer to var object, NULL = no parent.
-// Throws:  None.
-//--
-const CMIUtilString &
-CMICmnLLDBDebugSessionInfoVarObj::GetVarParentName() const {
-  return m_strVarObjParentName;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
deleted file mode 100644
index 6cee598..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
+++ /dev/null
@@ -1,139 +0,0 @@
-//===-- MICmnLLDBDebugSessionInfoVarObj.h -----------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third Party Headers:
-#include "lldb/API/SBValue.h"
-#include <map>
-
-// In-house headers:
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI debug session variable object. The static functionality in *this
-//          class manages a map container of *these variable objects.
-//--
-class CMICmnLLDBDebugSessionInfoVarObj {
-  // Enums:
-public:
-  //++ ----------------------------------------------------------------------
-  // Details: Enumeration of a variable type that is not a composite type
-  //--
-  enum varFormat_e {
-    // CODETAG_SESSIONINFO_VARFORMAT_ENUM
-    // *** Order is import here ***
-    eVarFormat_Invalid = 0,
-    eVarFormat_Binary,
-    eVarFormat_Octal,
-    eVarFormat_Decimal,
-    eVarFormat_Hex,
-    eVarFormat_Natural,
-    eVarFormat_count // Always last one
-  };
-
-  //++ ----------------------------------------------------------------------
-  // Details: Enumeration of a variable type by composite or internal type
-  //--
-  enum varType_e {
-    eVarType_InValid = 0,
-    eVarType_Composite, // i.e. struct
-    eVarType_Internal,  // i.e. int
-    eVarType_count      // Always last one
-  };
-
-  // Statics:
-public:
-  static varFormat_e GetVarFormatForString(const CMIUtilString &vrStrFormat);
-  static varFormat_e GetVarFormatForChar(char vcFormat);
-  static CMIUtilString GetValueStringFormatted(const lldb::SBValue &vrValue,
-                                               const varFormat_e veVarFormat);
-  static void VarObjAdd(const CMICmnLLDBDebugSessionInfoVarObj &vrVarObj);
-  static void VarObjDelete(const CMIUtilString &vrVarName);
-  static bool VarObjGet(const CMIUtilString &vrVarName,
-                        CMICmnLLDBDebugSessionInfoVarObj &vrwVarObj);
-  static void VarObjUpdate(const CMICmnLLDBDebugSessionInfoVarObj &vrVarObj);
-  static void VarObjIdInc();
-  static MIuint VarObjIdGet();
-  static void VarObjIdResetToZero();
-  static void VarObjClear();
-  static void VarObjSetFormat(varFormat_e eDefaultFormat);
-
-  // Methods:
-public:
-  /* ctor */ CMICmnLLDBDebugSessionInfoVarObj();
-  /* ctor */ CMICmnLLDBDebugSessionInfoVarObj(
-      const CMIUtilString &vrStrNameReal, const CMIUtilString &vrStrName,
-      const lldb::SBValue &vrValue);
-  /* ctor */ CMICmnLLDBDebugSessionInfoVarObj(
-      const CMIUtilString &vrStrNameReal, const CMIUtilString &vrStrName,
-      const lldb::SBValue &vrValue, const CMIUtilString &vrStrVarObjParentName);
-  /* ctor */ CMICmnLLDBDebugSessionInfoVarObj(
-      const CMICmnLLDBDebugSessionInfoVarObj &vrOther);
-  /* ctor */ CMICmnLLDBDebugSessionInfoVarObj(
-      CMICmnLLDBDebugSessionInfoVarObj &vrOther);
-  /* ctor */ CMICmnLLDBDebugSessionInfoVarObj(
-      CMICmnLLDBDebugSessionInfoVarObj &&vrOther);
-  //
-  CMICmnLLDBDebugSessionInfoVarObj &
-  operator=(const CMICmnLLDBDebugSessionInfoVarObj &vrOther);
-  CMICmnLLDBDebugSessionInfoVarObj &
-  operator=(CMICmnLLDBDebugSessionInfoVarObj &&vrwOther);
-  //
-  const CMIUtilString &GetName() const;
-  const CMIUtilString &GetNameReal() const;
-  const CMIUtilString &GetValueFormatted() const;
-  lldb::SBValue &GetValue();
-  const lldb::SBValue &GetValue() const;
-  varType_e GetType() const;
-  bool SetVarFormat(const varFormat_e veVarFormat);
-  const CMIUtilString &GetVarParentName() const;
-  void UpdateValue();
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ virtual ~CMICmnLLDBDebugSessionInfoVarObj();
-
-  // Typedefs:
-private:
-  typedef std::map<CMIUtilString, CMICmnLLDBDebugSessionInfoVarObj>
-      MapKeyToVarObj_t;
-  typedef std::pair<CMIUtilString, CMICmnLLDBDebugSessionInfoVarObj>
-      MapPairKeyToVarObj_t;
-
-  // Statics:
-private:
-  static CMIUtilString GetStringFormatted(const MIuint64 vnValue,
-                                          const char *vpStrValueNatural,
-                                          varFormat_e veVarFormat);
-
-  // Methods:
-private:
-  bool CopyOther(const CMICmnLLDBDebugSessionInfoVarObj &vrOther);
-  bool MoveOther(CMICmnLLDBDebugSessionInfoVarObj &vrwOther);
-
-  // Attributes:
-private:
-  static const char *ms_aVarFormatStrings[];
-  static const char *ms_aVarFormatChars[];
-  static MapKeyToVarObj_t ms_mapVarIdToVarObj;
-  static MIuint ms_nVarUniqueId;
-  static varFormat_e ms_eDefaultFormat; // overrides "natural" format
-  //
-  // *** Update the copy move constructors and assignment operator ***
-  varFormat_e m_eVarFormat;
-  varType_e m_eVarType;
-  CMIUtilString m_strName;
-  lldb::SBValue m_SBValue;
-  CMIUtilString m_strNameReal;
-  CMIUtilString m_strFormattedValue;
-  CMIUtilString m_strVarObjParentName;
-  // *** Update the copy move constructors and assignment operator ***
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp
deleted file mode 100644
index b22e7d9..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugger.cpp
+++ /dev/null
@@ -1,905 +0,0 @@
-//===-- MICmnLLDBDebugger.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers:
-#include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBProcess.h"
-#include "lldb/API/SBStream.h"
-#include "lldb/API/SBTarget.h"
-#include "lldb/API/SBThread.h"
-#include "lldb/API/SBType.h"
-#include "lldb/API/SBTypeCategory.h"
-#include "lldb/API/SBTypeNameSpecifier.h"
-#include "lldb/API/SBTypeSummary.h"
-#include <cassert>
-
-// In-house headers:
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnLLDBDebuggerHandleEvents.h"
-#include "MICmnLog.h"
-#include "MICmnResources.h"
-#include "MICmnThreadMgrStd.h"
-#include "MIDriverBase.h"
-#include "MIUtilSingletonHelper.h"
-
-//++
-// MI private summary providers
-static inline bool MI_char_summary_provider(lldb::SBValue value,
-                                            lldb::SBTypeSummaryOptions options,
-                                            lldb::SBStream &stream) {
-  if (!value.IsValid())
-    return false;
-
-  lldb::SBType value_type = value.GetType();
-  if (!value_type.IsValid())
-    return false;
-
-  lldb::BasicType type_code = value_type.GetBasicType();
-  if (type_code == lldb::eBasicTypeSignedChar)
-    stream.Printf("%d %s", (int)value.GetValueAsSigned(),
-                  CMIUtilString::WithNullAsEmpty(value.GetValue()));
-  else if (type_code == lldb::eBasicTypeUnsignedChar)
-    stream.Printf("%u %s", (unsigned)value.GetValueAsUnsigned(),
-                  CMIUtilString::WithNullAsEmpty(value.GetValue()));
-  else
-    return false;
-
-  return true;
-}
-
-//++
-// MI summary helper routines
-static inline bool MI_add_summary(lldb::SBTypeCategory category,
-                                  const char *typeName,
-                                  lldb::SBTypeSummary::FormatCallback cb,
-                                  uint32_t options, bool regex = false) {
-#if defined(LLDB_DISABLE_PYTHON)
-  return false;
-#else
-  lldb::SBTypeSummary summary =
-      lldb::SBTypeSummary::CreateWithCallback(cb, options);
-  return summary.IsValid()
-             ? category.AddTypeSummary(
-                   lldb::SBTypeNameSpecifier(typeName, regex), summary)
-             : false;
-#endif
-}
-
-//++
-// Details: CMICmnLLDBDebugger constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugger::CMICmnLLDBDebugger()
-    : m_constStrThisThreadId("MI debugger event") {}
-
-//++
-// Details: CMICmnLLDBDebugger destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebugger::~CMICmnLLDBDebugger() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this debugger object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-  ClrErrorDescription();
-
-  if (m_pClientDriver == nullptr) {
-    bOk = false;
-    errMsg = MIRSRC(IDS_LLDBDEBUGGER_ERR_CLIENTDRIVER);
-  }
-
-  // Note initialization order is important here as some resources depend on
-  // previous
-  MI::ModuleInit<CMICmnLog>(IDS_MI_INIT_ERR_LOG, bOk, errMsg);
-  MI::ModuleInit<CMICmnResources>(IDS_MI_INIT_ERR_RESOURCES, bOk, errMsg);
-  MI::ModuleInit<CMICmnThreadMgrStd>(IDS_MI_INIT_ERR_THREADMGR, bOk, errMsg);
-  MI::ModuleInit<CMICmnLLDBDebuggerHandleEvents>(
-      IDS_MI_INIT_ERR_OUTOFBANDHANDLER, bOk, errMsg);
-  MI::ModuleInit<CMICmnLLDBDebugSessionInfo>(IDS_MI_INIT_ERR_DEBUGSESSIONINFO,
-                                             bOk, errMsg);
-
-  // Note order is important here!
-  if (bOk)
-    lldb::SBDebugger::Initialize();
-  if (bOk && !InitSBDebugger()) {
-    bOk = false;
-    if (!errMsg.empty())
-      errMsg += ", ";
-    errMsg += GetErrorDescription().c_str();
-  }
-  if (bOk && !InitSBListener()) {
-    bOk = false;
-    if (!errMsg.empty())
-      errMsg += ", ";
-    errMsg += GetErrorDescription().c_str();
-  }
-  bOk = bOk && InitStdStreams();
-  bOk = bOk && RegisterMISummaryProviders();
-  m_bInitialized = bOk;
-
-  if (!bOk && !HaveErrorDescription()) {
-    CMIUtilString strInitError(CMIUtilString::Format(
-        MIRSRC(IDS_MI_INIT_ERR_LLDBDEBUGGER), errMsg.c_str()));
-    SetErrorDescription(strInitError);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Release resources for *this debugger object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = false;
-
-  ClrErrorDescription();
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  // Explicitly delete the remote target in case MI needs to exit prematurely
-  // otherwise
-  // LLDB debugger may hang in its Destroy() fn waiting on events
-  lldb::SBTarget sbTarget = CMICmnLLDBDebugSessionInfo::Instance().GetTarget();
-  m_lldbDebugger.DeleteTarget(sbTarget);
-
-  // Debug: May need this but does seem to work without it so commented out the
-  // fudge 19/06/2014
-  // It appears we need to wait as hang does not occur when hitting a debug
-  // breakpoint here
-  // const std::chrono::milliseconds time( 1000 );
-  // std::this_thread::sleep_for( time );
-
-  lldb::SBDebugger::Destroy(m_lldbDebugger);
-  lldb::SBDebugger::Terminate();
-  m_pClientDriver = nullptr;
-  m_mapBroadcastClassNameToEventMask.clear();
-  m_mapIdToEventMask.clear();
-
-  // Note shutdown order is important here
-  MI::ModuleShutdown<CMICmnLLDBDebugSessionInfo>(
-      IDS_MI_INIT_ERR_DEBUGSESSIONINFO, bOk, errMsg);
-  MI::ModuleShutdown<CMICmnLLDBDebuggerHandleEvents>(
-      IDS_MI_INIT_ERR_OUTOFBANDHANDLER, bOk, errMsg);
-  MI::ModuleShutdown<CMICmnThreadMgrStd>(IDS_MI_INIT_ERR_THREADMGR, bOk,
-                                         errMsg);
-  MI::ModuleShutdown<CMICmnResources>(IDS_MI_INIT_ERR_RESOURCES, bOk, errMsg);
-  MI::ModuleShutdown<CMICmnLog>(IDS_MI_INIT_ERR_LOG, bOk, errMsg);
-
-  if (!bOk) {
-    SetErrorDescriptionn(MIRSRC(IDS_MI_SHTDWN_ERR_LLDBDEBUGGER),
-                         errMsg.c_str());
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Return the LLDB debugger instance created for this debug session.
-// Type:    Method.
-// Args:    None.
-// Return:  lldb::SBDebugger & - LLDB debugger object reference.
-// Throws:  None.
-//--
-lldb::SBDebugger &CMICmnLLDBDebugger::GetTheDebugger() {
-  return m_lldbDebugger;
-}
-
-//++
-// Details: Return the LLDB listener instance created for this debug session.
-// Type:    Method.
-// Args:    None.
-// Return:  lldb::SBListener & - LLDB listener object reference.
-// Throws:  None.
-//--
-lldb::SBListener &CMICmnLLDBDebugger::GetTheListener() {
-  return m_lldbListener;
-}
-
-//++
-// Details: Set the client driver that wants to use *this LLDB debugger. Call
-// this function
-//          prior to Initialize().
-// Type:    Method.
-// Args:    vClientDriver   - (R) A driver.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::SetDriver(const CMIDriverBase &vClientDriver) {
-  m_pClientDriver = const_cast<CMIDriverBase *>(&vClientDriver);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Get the client driver that is use *this LLDB debugger.
-// Type:    Method.
-// Args:    vClientDriver   - (R) A driver.
-// Return:  CMIDriverBase & - A driver instance.
-// Throws:  None.
-//--
-CMIDriverBase &CMICmnLLDBDebugger::GetDriver() const {
-  return *m_pClientDriver;
-}
-
-//++
-// Details: Wait until all events have been handled.
-//          This function works in pair with
-//          CMICmnLLDBDebugger::MonitorSBListenerEvents
-//          that handles events from queue. When all events were handled and
-//          queue is
-//          empty the MonitorSBListenerEvents notifies this function that it's
-//          ready to
-//          go on. To synchronize them the m_mutexEventQueue and
-//          m_conditionEventQueueEmpty are used.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugger::WaitForHandleEvent() {
-  std::unique_lock<std::mutex> lock(m_mutexEventQueue);
-
-  lldb::SBEvent event;
-  if (ThreadIsActive() && m_lldbListener.PeekAtNextEvent(event))
-    m_conditionEventQueueEmpty.wait(lock);
-}
-
-//++
-// Details: Check if need to rebroadcast stop event. This function will return
-// true if
-//          debugger is in synchronouse mode. In such case the
-//          CMICmnLLDBDebugger::RebroadcastStopEvent should be called to
-//          rebroadcast
-//          a new stop event (if any).
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Need to rebroadcast stop event, false = otherwise.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::CheckIfNeedToRebroadcastStopEvent() {
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  if (!rSessionInfo.GetDebugger().GetAsync()) {
-    const bool include_expression_stops = false;
-    m_nLastStopId =
-        CMICmnLLDBDebugSessionInfo::Instance().GetProcess().GetStopID(
-            include_expression_stops);
-    return true;
-  }
-
-  return false;
-}
-
-//++
-// Details: Rebroadcast stop event if needed. This function should be called
-// only if the
-//          CMICmnLLDBDebugger::CheckIfNeedToRebroadcastStopEvent() returned
-//          true.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnLLDBDebugger::RebroadcastStopEvent() {
-  lldb::SBProcess process = CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  const bool include_expression_stops = false;
-  const uint32_t nStopId = process.GetStopID(include_expression_stops);
-  if (m_nLastStopId != nStopId) {
-    lldb::SBEvent event = process.GetStopEventForStopID(nStopId);
-    process.GetBroadcaster().BroadcastEvent(event);
-  }
-}
-
-//++
-// Details: Initialize the LLDB Debugger object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::InitSBDebugger() {
-  m_lldbDebugger = lldb::SBDebugger::Create(false);
-  if (!m_lldbDebugger.IsValid()) {
-    SetErrorDescription(MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDDEBUGGER));
-    return MIstatus::failure;
-  }
-
-  m_lldbDebugger.GetCommandInterpreter().SetPromptOnQuit(false);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Set the LLDB Debugger's std in, err and out streams. (Not
-// implemented left
-//          here for reference. Was called in the
-//          CMICmnLLDBDebugger::Initialize() )
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::InitStdStreams() {
-  // This is not required when operating the MI driver's code as it has its own
-  // streams. Setting the Stdin for the lldbDebugger especially on LINUX will
-  // cause
-  // another thread to run and partially consume stdin data meant for MI stdin
-  // handler
-  // m_lldbDebugger.SetErrorFileHandle( m_pClientDriver->GetStderr(), false );
-  // m_lldbDebugger.SetOutputFileHandle( m_pClientDriver->GetStdout(), false );
-  // m_lldbDebugger.SetInputFileHandle( m_pClientDriver->GetStdin(), false );
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Set up the events from the SBDebugger's we would like to listen to.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::InitSBListener() {
-  m_lldbListener = m_lldbDebugger.GetListener();
-  if (!m_lldbListener.IsValid()) {
-    SetErrorDescription(MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDLISTENER));
-    return MIstatus::failure;
-  }
-
-  const CMIUtilString strDbgId("CMICmnLLDBDebugger1");
-  MIuint eventMask = lldb::SBTarget::eBroadcastBitBreakpointChanged |
-                     lldb::SBTarget::eBroadcastBitModulesLoaded |
-                     lldb::SBTarget::eBroadcastBitModulesUnloaded |
-                     lldb::SBTarget::eBroadcastBitWatchpointChanged |
-                     lldb::SBTarget::eBroadcastBitSymbolsLoaded;
-  bool bOk = RegisterForEvent(
-      strDbgId, CMIUtilString(lldb::SBTarget::GetBroadcasterClassName()),
-      eventMask);
-
-  eventMask = lldb::SBThread::eBroadcastBitStackChanged;
-  bOk = bOk &&
-        RegisterForEvent(
-            strDbgId, CMIUtilString(lldb::SBThread::GetBroadcasterClassName()),
-            eventMask);
-
-  eventMask = lldb::SBProcess::eBroadcastBitStateChanged |
-              lldb::SBProcess::eBroadcastBitInterrupt |
-              lldb::SBProcess::eBroadcastBitSTDOUT |
-              lldb::SBProcess::eBroadcastBitSTDERR |
-              lldb::SBProcess::eBroadcastBitProfileData |
-              lldb::SBProcess::eBroadcastBitStructuredData;
-  bOk = bOk &&
-        RegisterForEvent(
-            strDbgId, CMIUtilString(lldb::SBProcess::GetBroadcasterClassName()),
-            eventMask);
-
-  eventMask = lldb::SBCommandInterpreter::eBroadcastBitQuitCommandReceived |
-              lldb::SBCommandInterpreter::eBroadcastBitThreadShouldExit |
-              lldb::SBCommandInterpreter::eBroadcastBitAsynchronousOutputData |
-              lldb::SBCommandInterpreter::eBroadcastBitAsynchronousErrorData;
-  bOk = bOk &&
-        RegisterForEvent(
-            strDbgId, m_lldbDebugger.GetCommandInterpreter().GetBroadcaster(),
-            eventMask);
-
-  return bOk;
-}
-
-//++
-// Details: Register with the debugger, the SBListener, the type of events you
-// are interested
-//          in. Others, like commands, may have already set the mask.
-// Type:    Method.
-// Args:    vClientName         - (R) ID of the client who wants these events
-// set.
-//          vBroadcasterClass   - (R) The SBBroadcaster's class name.
-//          vEventMask          - (R) The mask of events to listen for.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::RegisterForEvent(
-    const CMIUtilString &vClientName, const CMIUtilString &vBroadcasterClass,
-    const MIuint vEventMask) {
-  MIuint existingMask = 0;
-  if (!BroadcasterGetMask(vBroadcasterClass, existingMask))
-    return MIstatus::failure;
-
-  if (!ClientSaveMask(vClientName, vBroadcasterClass, vEventMask))
-    return MIstatus::failure;
-
-  const char *pBroadCasterName = vBroadcasterClass.c_str();
-  MIuint eventMask = vEventMask;
-  eventMask += existingMask;
-  const MIuint result = m_lldbListener.StartListeningForEventClass(
-      m_lldbDebugger, pBroadCasterName, eventMask);
-  if (result == 0) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_LLDBDEBUGGER_ERR_STARTLISTENER), pBroadCasterName));
-    return MIstatus::failure;
-  }
-
-  return BroadcasterSaveMask(vBroadcasterClass, eventMask);
-}
-
-//++
-// Details: Register with the debugger, the SBListener, the type of events you
-// are interested
-//          in. Others, like commands, may have already set the mask.
-// Type:    Method.
-// Args:    vClientName     - (R) ID of the client who wants these events set.
-//          vBroadcaster    - (R) An SBBroadcaster's derived class.
-//          vEventMask      - (R) The mask of events to listen for.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::RegisterForEvent(
-    const CMIUtilString &vClientName, const lldb::SBBroadcaster &vBroadcaster,
-    const MIuint vEventMask) {
-  const char *pBroadcasterName = vBroadcaster.GetName();
-  if (pBroadcasterName == nullptr) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_BROADCASTER_NAME),
-                              MIRSRC(IDS_WORD_INVALIDNULLPTR)));
-    return MIstatus::failure;
-  }
-  CMIUtilString broadcasterName(pBroadcasterName);
-  if (broadcasterName.length() == 0) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_BROADCASTER_NAME),
-                              MIRSRC(IDS_WORD_INVALIDEMPTY)));
-    return MIstatus::failure;
-  }
-
-  MIuint existingMask = 0;
-  if (!BroadcasterGetMask(broadcasterName, existingMask))
-    return MIstatus::failure;
-
-  if (!ClientSaveMask(vClientName, broadcasterName, vEventMask))
-    return MIstatus::failure;
-
-  MIuint eventMask = vEventMask;
-  eventMask += existingMask;
-  const MIuint result =
-      m_lldbListener.StartListeningForEvents(vBroadcaster, eventMask);
-  if (result == 0) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_LLDBDEBUGGER_ERR_STARTLISTENER), pBroadcasterName));
-    return MIstatus::failure;
-  }
-
-  return BroadcasterSaveMask(broadcasterName, eventMask);
-}
-
-//++
-// Details: Unregister with the debugger, the SBListener, the type of events you
-// are no
-//          longer interested in. Others, like commands, may still remain
-//          interested so
-//          an event may not necessarily be stopped.
-// Type:    Method.
-// Args:    vClientName         - (R) ID of the client who no longer requires
-// these events.
-//          vBroadcasterClass   - (R) The SBBroadcaster's class name.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::UnregisterForEvent(
-    const CMIUtilString &vClientName, const CMIUtilString &vBroadcasterClass) {
-  MIuint clientsEventMask = 0;
-  if (!ClientGetTheirMask(vClientName, vBroadcasterClass, clientsEventMask))
-    return MIstatus::failure;
-  if (!ClientRemoveTheirMask(vClientName, vBroadcasterClass))
-    return MIstatus::failure;
-
-  const MIuint otherClientsEventMask =
-      ClientGetMaskForAllClients(vBroadcasterClass);
-  MIuint newEventMask = 0;
-  for (MIuint i = 0; i < 32; i++) {
-    const MIuint bit = MIuint(1) << i;
-    const MIuint clientBit = bit & clientsEventMask;
-    const MIuint othersBit = bit & otherClientsEventMask;
-    if ((clientBit != 0) && (othersBit == 0)) {
-      newEventMask += clientBit;
-    }
-  }
-
-  const char *pBroadCasterName = vBroadcasterClass.c_str();
-  if (!m_lldbListener.StopListeningForEventClass(
-          m_lldbDebugger, pBroadCasterName, newEventMask)) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_STOPLISTENER),
-                              vClientName.c_str(), pBroadCasterName));
-    return MIstatus::failure;
-  }
-
-  return BroadcasterSaveMask(vBroadcasterClass, otherClientsEventMask);
-}
-
-//++
-// Details: Given the SBBroadcaster class name retrieve it's current event mask.
-// Type:    Method.
-// Args:    vBroadcasterClass   - (R) The SBBroadcaster's class name.
-//          vEventMask          - (W) The mask of events to listen for.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::BroadcasterGetMask(
-    const CMIUtilString &vBroadcasterClass, MIuint &vwEventMask) const {
-  vwEventMask = 0;
-
-  if (vBroadcasterClass.empty()) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDBROADCASTER),
-                              vBroadcasterClass.c_str()));
-    return MIstatus::failure;
-  }
-
-  const MapBroadcastClassNameToEventMask_t::const_iterator it =
-      m_mapBroadcastClassNameToEventMask.find(vBroadcasterClass);
-  if (it != m_mapBroadcastClassNameToEventMask.end()) {
-    vwEventMask = (*it).second;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Remove the event mask for the specified SBBroadcaster class name.
-// Type:    Method.
-// Args:    vBroadcasterClass - (R) The SBBroadcaster's class name.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::BroadcasterRemoveMask(
-    const CMIUtilString &vBroadcasterClass) {
-  MapBroadcastClassNameToEventMask_t::const_iterator it =
-      m_mapBroadcastClassNameToEventMask.find(vBroadcasterClass);
-  if (it != m_mapBroadcastClassNameToEventMask.end()) {
-    m_mapBroadcastClassNameToEventMask.erase(it);
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Given the SBBroadcaster class name save it's current event mask.
-// Type:    Method.
-// Args:    vBroadcasterClass - (R) The SBBroadcaster's class name.
-//          vEventMask        - (R) The mask of events to listen for.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::BroadcasterSaveMask(
-    const CMIUtilString &vBroadcasterClass, const MIuint vEventMask) {
-  if (vBroadcasterClass.empty()) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDBROADCASTER),
-                              vBroadcasterClass.c_str()));
-    return MIstatus::failure;
-  }
-
-  BroadcasterRemoveMask(vBroadcasterClass);
-  MapPairBroadcastClassNameToEventMask_t pr(vBroadcasterClass, vEventMask);
-  m_mapBroadcastClassNameToEventMask.insert(pr);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Iterate all the clients who have registered event masks against
-// particular
-//          SBBroadcasters and build up the mask that is for all of them.
-// Type:    Method.
-// Args:    vBroadcasterClass   - (R) The broadcaster to retrieve the mask for.
-// Return:  MIuint - Event mask.
-// Throws:  None.
-//--
-MIuint CMICmnLLDBDebugger::ClientGetMaskForAllClients(
-    const CMIUtilString &vBroadcasterClass) const {
-  MIuint mask = 0;
-  MapIdToEventMask_t::const_iterator it = m_mapIdToEventMask.begin();
-  while (it != m_mapIdToEventMask.end()) {
-    const CMIUtilString &rId((*it).first);
-    if (rId.find(vBroadcasterClass) != std::string::npos) {
-      const MIuint clientsMask = (*it).second;
-      mask |= clientsMask;
-    }
-
-    // Next
-    ++it;
-  }
-
-  return mask;
-}
-
-//++
-// Details: Given the client save its particular event requirements.
-// Type:    Method.
-// Args:    vClientName       - (R) The Client's unique ID.
-//          vBroadcasterClass - (R) The SBBroadcaster's class name targeted for
-//          the events.
-//          vEventMask        - (R) The mask of events to listen for.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::ClientSaveMask(const CMIUtilString &vClientName,
-                                        const CMIUtilString &vBroadcasterClass,
-                                        const MIuint vEventMask) {
-  if (vClientName.empty()) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDCLIENTNAME), vClientName.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMIUtilString strId(vBroadcasterClass);
-  strId += vClientName;
-
-  ClientRemoveTheirMask(vClientName, vBroadcasterClass);
-  MapPairIdToEventMask_t pr(strId, vEventMask);
-  m_mapIdToEventMask.insert(pr);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Given the client remove it's particular event requirements.
-// Type:    Method.
-// Args:    vClientName       - (R) The Client's unique ID.
-//          vBroadcasterClass - (R) The SBBroadcaster's class name.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::ClientRemoveTheirMask(
-    const CMIUtilString &vClientName, const CMIUtilString &vBroadcasterClass) {
-  if (vClientName.empty()) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDCLIENTNAME), vClientName.c_str()));
-    return MIstatus::failure;
-  }
-
-  CMIUtilString strId(vBroadcasterClass);
-  strId += vClientName;
-
-  const MapIdToEventMask_t::const_iterator it = m_mapIdToEventMask.find(strId);
-  if (it != m_mapIdToEventMask.end()) {
-    m_mapIdToEventMask.erase(it);
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the client's event mask used for on a particular
-// SBBroadcaster.
-// Type:    Method.
-// Args:    vClientName       - (R) The Client's unique ID.
-//          vBroadcasterClass - (R) The SBBroadcaster's class name.
-//          vwEventMask       - (W) The client's mask.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::ClientGetTheirMask(
-    const CMIUtilString &vClientName, const CMIUtilString &vBroadcasterClass,
-    MIuint &vwEventMask) {
-  vwEventMask = 0;
-
-  if (vClientName.empty()) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_LLDBDEBUGGER_ERR_INVALIDCLIENTNAME), vClientName.c_str()));
-    return MIstatus::failure;
-  }
-
-  const CMIUtilString strId(vBroadcasterClass + vClientName);
-  const MapIdToEventMask_t::const_iterator it = m_mapIdToEventMask.find(strId);
-  if (it != m_mapIdToEventMask.end()) {
-    vwEventMask = (*it).second;
-  }
-
-  SetErrorDescription(CMIUtilString::Format(
-      MIRSRC(IDS_LLDBDEBUGGER_ERR_CLIENTNOTREGISTERED), vClientName.c_str()));
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Momentarily wait for an events being broadcast and inspect those
-// that do
-//          come this way. Check if the target should exit event if so start
-//          shutting
-//          down this thread and the application. Any other events pass on to
-//          the
-//          Out-of-band handler to further determine what kind of event arrived.
-//          This function runs in the thread "MI debugger event".
-// Type:    Method.
-// Args:    vrbIsAlive  - (W) False = yes exit event monitoring thread, true =
-// continue.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::MonitorSBListenerEvents(bool &vrbIsAlive) {
-  vrbIsAlive = true;
-
-  // Lock the mutex of event queue
-  // Note that it should be locked while we are in
-  // CMICmnLLDBDebugger::MonitorSBListenerEvents to
-  // avoid a race condition with CMICmnLLDBDebugger::WaitForHandleEvent
-  std::unique_lock<std::mutex> lock(m_mutexEventQueue);
-
-  lldb::SBEvent event;
-  const bool bGotEvent = m_lldbListener.GetNextEvent(event);
-  if (!bGotEvent) {
-    // Notify that we are finished and unlock the mutex of event queue before
-    // sleeping
-    m_conditionEventQueueEmpty.notify_one();
-    lock.unlock();
-
-    // Wait a bit to reduce CPU load
-    const std::chrono::milliseconds time(1);
-    std::this_thread::sleep_for(time);
-    return MIstatus::success;
-  }
-  assert(event.IsValid());
-  assert(event.GetBroadcaster().IsValid());
-
-  // Debugging
-  m_pLog->WriteLog(CMIUtilString::Format("##### An event occurred: %s",
-                                         event.GetBroadcasterClass()));
-
-  bool bHandledEvent = false;
-  bool bOk = false;
-  {
-    // Lock Mutex before handling events so that we don't disturb a running cmd
-    CMIUtilThreadLock lock(
-        CMICmnLLDBDebugSessionInfo::Instance().GetSessionMutex());
-    bOk = CMICmnLLDBDebuggerHandleEvents::Instance().HandleEvent(event,
-                                                                 bHandledEvent);
-  }
-
-  if (!bHandledEvent) {
-    const CMIUtilString msg(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBDEBUGGER_WRN_UNKNOWN_EVENT),
-                              event.GetBroadcasterClass()));
-    m_pLog->WriteLog(msg);
-  }
-
-  if (!bOk)
-    m_pLog->WriteLog(
-        CMICmnLLDBDebuggerHandleEvents::Instance().GetErrorDescription());
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The main worker method for this thread.
-// Type:    Method.
-// Args:    vrbIsAlive  - (W) True = *this thread is working, false = thread has
-// exited.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::ThreadRun(bool &vrbIsAlive) {
-  return MonitorSBListenerEvents(vrbIsAlive);
-}
-
-//++
-// Details: Let this thread clean up after itself.
-// Type:    Method.
-// Args:
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::ThreadFinish() { return MIstatus::success; }
-
-//++
-// Details: Retrieve *this thread object's name.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString & - Text.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnLLDBDebugger::ThreadGetName() const {
-  return m_constStrThisThreadId;
-}
-
-//++
-// Details: Loads lldb-mi formatters
-// Type:    Method.
-// Args:    None.
-// Return:  true - Functionality succeeded.
-//          false - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::LoadMIFormatters(lldb::SBTypeCategory miCategory) {
-  if (!MI_add_summary(miCategory, "char", MI_char_summary_provider,
-                      lldb::eTypeOptionHideValue |
-                          lldb::eTypeOptionSkipPointers))
-    return false;
-
-  if (!MI_add_summary(miCategory, "unsigned char", MI_char_summary_provider,
-                      lldb::eTypeOptionHideValue |
-                          lldb::eTypeOptionSkipPointers))
-    return false;
-
-  if (!MI_add_summary(miCategory, "signed char", MI_char_summary_provider,
-                      lldb::eTypeOptionHideValue |
-                          lldb::eTypeOptionSkipPointers))
-    return false;
-
-  return true;
-}
-
-//++
-// Details: Registers lldb-mi custom summary providers
-// Type:    Method.
-// Args:    None.
-// Return:  true - Functionality succeeded.
-//          false - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebugger::RegisterMISummaryProviders() {
-  static const char *miCategoryName = "lldb-mi";
-  lldb::SBTypeCategory miCategory =
-      m_lldbDebugger.CreateCategory(miCategoryName);
-  if (!miCategory.IsValid())
-    return false;
-
-  if (!LoadMIFormatters(miCategory)) {
-    m_lldbDebugger.DeleteCategory(miCategoryName);
-    return false;
-  }
-  miCategory.SetEnabled(true);
-  return true;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugger.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugger.h
deleted file mode 100644
index 29cf941..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebugger.h
+++ /dev/null
@@ -1,134 +0,0 @@
-//===-- MICmnLLDBDebugger.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers
-#include "lldb/API/SBDebugger.h"
-#include "lldb/API/SBEvent.h"
-#include "lldb/API/SBListener.h"
-#include <condition_variable>
-#include <map>
-#include <mutex>
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilThreadBaseStd.h"
-
-// Declarations:
-class CMIDriverBase;
-class CMICmnLLDBDebuggerHandleEvents;
-
-//++
-//============================================================================
-// Details: MI proxy/adapter for the LLDB public SBDebugger API. The CMIDriver
-//          requires *this object. Command classes make calls on *this object
-//          to facilitate their work effort. The instance runs in its own worker
-//          thread.
-//          A singleton class.
-//--
-class CMICmnLLDBDebugger : public CMICmnBase,
-                           public CMIUtilThreadActiveObjBase,
-                           public MI::ISingleton<CMICmnLLDBDebugger> {
-  friend class MI::ISingleton<CMICmnLLDBDebugger>;
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-
-  bool SetDriver(const CMIDriverBase &vClientDriver);
-  CMIDriverBase &GetDriver() const;
-  lldb::SBDebugger &GetTheDebugger();
-  lldb::SBListener &GetTheListener();
-  void WaitForHandleEvent();
-  bool CheckIfNeedToRebroadcastStopEvent();
-  void RebroadcastStopEvent();
-
-  // MI Commands can use these functions to listen for events they require
-  bool RegisterForEvent(const CMIUtilString &vClientName,
-                        const CMIUtilString &vBroadcasterClass,
-                        const MIuint vEventMask);
-  bool UnregisterForEvent(const CMIUtilString &vClientName,
-                          const CMIUtilString &vBroadcasterClass);
-  bool RegisterForEvent(const CMIUtilString &vClientName,
-                        const lldb::SBBroadcaster &vBroadcaster,
-                        const MIuint vEventMask);
-  bool UnregisterForEvent(const CMIUtilString &vClientName,
-                          const lldb::SBBroadcaster &vBroadcaster);
-
-  // Overridden:
-public:
-  // From CMIUtilThreadActiveObjBase
-  const CMIUtilString &ThreadGetName() const override;
-
-  // Overridden:
-protected:
-  // From CMIUtilThreadActiveObjBase
-  bool ThreadRun(bool &vrIsAlive) override;
-  bool ThreadFinish() override;
-
-  // Typedefs:
-private:
-  typedef std::map<CMIUtilString, MIuint> MapBroadcastClassNameToEventMask_t;
-  typedef std::pair<CMIUtilString, MIuint>
-      MapPairBroadcastClassNameToEventMask_t;
-  typedef std::map<CMIUtilString, MIuint> MapIdToEventMask_t;
-  typedef std::pair<CMIUtilString, MIuint> MapPairIdToEventMask_t;
-
-  // Methods:
-private:
-  /* ctor */ CMICmnLLDBDebugger();
-  /* ctor */ CMICmnLLDBDebugger(const CMICmnLLDBDebugger &);
-  void operator=(const CMICmnLLDBDebugger &);
-
-  bool InitSBDebugger();
-  bool InitSBListener();
-  bool InitStdStreams();
-  bool MonitorSBListenerEvents(bool &vrbYesExit);
-
-  bool BroadcasterGetMask(const CMIUtilString &vBroadcasterClass,
-                          MIuint &vEventMask) const;
-  bool BroadcasterRemoveMask(const CMIUtilString &vBroadcasterClass);
-  bool BroadcasterSaveMask(const CMIUtilString &vBroadcasterClass,
-                           const MIuint vEventMask);
-
-  MIuint
-  ClientGetMaskForAllClients(const CMIUtilString &vBroadcasterClass) const;
-  bool ClientSaveMask(const CMIUtilString &vClientName,
-                      const CMIUtilString &vBroadcasterClass,
-                      const MIuint vEventMask);
-  bool ClientRemoveTheirMask(const CMIUtilString &vClientName,
-                             const CMIUtilString &vBroadcasterClass);
-  bool ClientGetTheirMask(const CMIUtilString &vClientName,
-                          const CMIUtilString &vBroadcasterClass,
-                          MIuint &vwEventMask);
-  bool LoadMIFormatters(lldb::SBTypeCategory miCategory);
-  bool RegisterMISummaryProviders();
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnLLDBDebugger() override;
-
-  // Attributes:
-private:
-  CMIDriverBase
-      *m_pClientDriver; // The driver that wants to use *this LLDB debugger
-  lldb::SBDebugger m_lldbDebugger; // SBDebugger is the primordial object that
-                                   // creates SBTargets and provides access to
-                                   // them
-  lldb::SBListener m_lldbListener; // API clients can register its own listener
-                                   // to debugger events
-  const CMIUtilString m_constStrThisThreadId;
-  MapBroadcastClassNameToEventMask_t m_mapBroadcastClassNameToEventMask;
-  MapIdToEventMask_t m_mapIdToEventMask;
-  std::mutex m_mutexEventQueue;
-  std::condition_variable m_conditionEventQueueEmpty;
-  uint32_t m_nLastStopId;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
deleted file mode 100644
index 60cfd35..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp
+++ /dev/null
@@ -1,1883 +0,0 @@
-//===-- MICmnLLDBDebuggerHandleEvents.cpp -----------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers:
-#include "lldb/API/SBAddress.h"
-#include "lldb/API/SBBreakpoint.h"
-#include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBCommandReturnObject.h"
-#include "lldb/API/SBEvent.h"
-#include "lldb/API/SBProcess.h"
-#include "lldb/API/SBStream.h"
-#include "lldb/API/SBTarget.h"
-#include "lldb/API/SBThread.h"
-#include "lldb/API/SBUnixSignals.h"
-#include "llvm/Support/Compiler.h"
-#ifdef _WIN32
-#include <io.h>
-#else
-#include <unistd.h>
-#endif              // _WIN32
-
-// In-house headers:
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnLLDBDebuggerHandleEvents.h"
-#include "MICmnLog.h"
-#include "MICmnMIOutOfBandRecord.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnMIValueList.h"
-#include "MICmnResources.h"
-#include "MICmnStreamStderr.h"
-#include "MICmnStreamStdout.h"
-#include "MIDriver.h"
-#include "MIUtilDebug.h"
-#include "Platform.h"
-
-#include <algorithm>
-
-//++
-// Details: CMICmnLLDBDebuggerHandleEvents constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebuggerHandleEvents::CMICmnLLDBDebuggerHandleEvents() {}
-
-//++
-// Details: CMICmnLLDBDebuggerHandleEvents destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBDebuggerHandleEvents::~CMICmnLLDBDebuggerHandleEvents() {
-  Shutdown();
-}
-
-//++
-// Details: Initialize resources for *this broadcaster object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = MIstatus::success;
-  m_bSignalsInitialized = false;
-  m_SIGINT = 0;
-  m_SIGSTOP = 0;
-  m_SIGSEGV = 0;
-  m_SIGTRAP = 0;
-
-  return m_bInitialized;
-}
-
-//++
-// Details: Release resources for *this broadcaster object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = false;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Interpret the event object to ascertain the action to take or
-// information to
-//          to form and put in a MI Out-of-band record object which is given to
-//          stdout.
-// Type:    Method.
-// Args:    vEvent          - (R) An LLDB broadcast event.
-//          vrbHandledEvent - (W) True - event handled, false = not handled.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEvent(const lldb::SBEvent &vEvent,
-                                                 bool &vrbHandledEvent) {
-  bool bOk = MIstatus::success;
-  vrbHandledEvent = false;
-
-  if (lldb::SBProcess::EventIsProcessEvent(vEvent)) {
-    vrbHandledEvent = true;
-    bOk = HandleEventSBProcess(vEvent);
-  } else if (lldb::SBBreakpoint::EventIsBreakpointEvent(vEvent)) {
-    vrbHandledEvent = true;
-    bOk = HandleEventSBBreakPoint(vEvent);
-  } else if (lldb::SBThread::EventIsThreadEvent(vEvent)) {
-    vrbHandledEvent = true;
-    bOk = HandleEventSBThread(vEvent);
-  } else if (lldb::SBTarget::EventIsTargetEvent(vEvent)) {
-    vrbHandledEvent = true;
-    bOk = HandleEventSBTarget(vEvent);
-  } else if (lldb::SBCommandInterpreter::EventIsCommandInterpreterEvent(
-                 vEvent)) {
-    vrbHandledEvent = true;
-    bOk = HandleEventSBCommandInterpreter(vEvent);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Handle a LLDB SBProcess event.
-// Type:    Method.
-// Args:    vEvent          - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBProcess(
-    const lldb::SBEvent &vEvent) {
-  bool bOk = MIstatus::success;
-
-  const char *pEventType = "";
-  const MIuint nEventType = vEvent.GetType();
-  switch (nEventType) {
-  case lldb::SBProcess::eBroadcastBitInterrupt:
-    pEventType = "eBroadcastBitInterrupt";
-    break;
-  case lldb::SBProcess::eBroadcastBitProfileData:
-    pEventType = "eBroadcastBitProfileData";
-    break;
-  case lldb::SBProcess::eBroadcastBitStructuredData:
-    pEventType = "eBroadcastBitStructuredData";
-    break;
-  case lldb::SBProcess::eBroadcastBitStateChanged:
-    pEventType = "eBroadcastBitStateChanged";
-    bOk = HandleProcessEventBroadcastBitStateChanged(vEvent);
-    break;
-  case lldb::SBProcess::eBroadcastBitSTDERR:
-    pEventType = "eBroadcastBitSTDERR";
-    bOk = GetProcessStderr();
-    break;
-  case lldb::SBProcess::eBroadcastBitSTDOUT:
-    pEventType = "eBroadcastBitSTDOUT";
-    bOk = GetProcessStdout();
-    break;
-  default: {
-    const CMIUtilString msg(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_UNKNOWN_EVENT),
-                              "SBProcess", (MIuint)nEventType));
-    SetErrorDescription(msg);
-    return MIstatus::failure;
-  }
-  }
-  m_pLog->WriteLog(CMIUtilString::Format(
-      "##### An SB Process event occurred: %s", pEventType));
-
-  return bOk;
-}
-
-//++
-// Details: Handle a LLDB SBBreakpoint event.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBBreakPoint(
-    const lldb::SBEvent &vEvent) {
-  bool bOk = MIstatus::success;
-
-  const char *pEventType = "";
-  const lldb::BreakpointEventType eEvent =
-      lldb::SBBreakpoint::GetBreakpointEventTypeFromEvent(vEvent);
-  switch (eEvent) {
-  case lldb::eBreakpointEventTypeThreadChanged:
-    pEventType = "eBreakpointEventTypeThreadChanged";
-    break;
-  case lldb::eBreakpointEventTypeLocationsRemoved:
-    pEventType = "eBreakpointEventTypeLocationsRemoved";
-    break;
-  case lldb::eBreakpointEventTypeInvalidType:
-    pEventType = "eBreakpointEventTypeInvalidType";
-    break;
-  case lldb::eBreakpointEventTypeLocationsAdded:
-    pEventType = "eBreakpointEventTypeLocationsAdded";
-    bOk = HandleEventSBBreakpointLocationsAdded(vEvent);
-    break;
-  case lldb::eBreakpointEventTypeAdded:
-    pEventType = "eBreakpointEventTypeAdded";
-    bOk = HandleEventSBBreakpointAdded(vEvent);
-    break;
-  case lldb::eBreakpointEventTypeRemoved:
-    pEventType = "eBreakpointEventTypeRemoved";
-    bOk = HandleEventSBBreakpointCmn(vEvent);
-    break;
-  case lldb::eBreakpointEventTypeLocationsResolved:
-    pEventType = "eBreakpointEventTypeLocationsResolved";
-    bOk = HandleEventSBBreakpointCmn(vEvent);
-    break;
-  case lldb::eBreakpointEventTypeEnabled:
-    pEventType = "eBreakpointEventTypeEnabled";
-    bOk = HandleEventSBBreakpointCmn(vEvent);
-    break;
-  case lldb::eBreakpointEventTypeDisabled:
-    pEventType = "eBreakpointEventTypeDisabled";
-    bOk = HandleEventSBBreakpointCmn(vEvent);
-    break;
-  case lldb::eBreakpointEventTypeCommandChanged:
-    pEventType = "eBreakpointEventTypeCommandChanged";
-    bOk = HandleEventSBBreakpointCmn(vEvent);
-    break;
-  case lldb::eBreakpointEventTypeConditionChanged:
-    pEventType = "eBreakpointEventTypeConditionChanged";
-    bOk = HandleEventSBBreakpointCmn(vEvent);
-    break;
-  case lldb::eBreakpointEventTypeIgnoreChanged:
-    pEventType = "eBreakpointEventTypeIgnoreChanged";
-    bOk = HandleEventSBBreakpointCmn(vEvent);
-    break;
-  case lldb::eBreakpointEventTypeAutoContinueChanged:
-    pEventType = "eBreakpointEventTypeAutoContinueChanged";
-    bOk = HandleEventSBBreakpointCmn(vEvent);
-    break;
-  }
-  m_pLog->WriteLog(CMIUtilString::Format(
-      "##### An SB Breakpoint event occurred: %s", pEventType));
-
-  return bOk;
-}
-
-//++
-// Details: Handle a LLDB SBBreakpoint event.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBBreakpointLocationsAdded(
-    const lldb::SBEvent &vEvent) {
-  const MIuint nLoc =
-      lldb::SBBreakpoint::GetNumBreakpointLocationsFromEvent(vEvent);
-  if (nLoc == 0)
-    return MIstatus::success;
-
-  lldb::SBBreakpoint brkPt = lldb::SBBreakpoint::GetBreakpointFromEvent(vEvent);
-  const CMIUtilString plural((nLoc == 1) ? "" : "s");
-  const CMIUtilString msg(
-      CMIUtilString::Format("%d location%s added to breakpoint %d", nLoc,
-                            plural.c_str(), brkPt.GetID()));
-
-  return TextToStdout(msg);
-}
-
-//++
-// Details: Handle a LLDB SBBreakpoint event.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBBreakpointCmn(
-    const lldb::SBEvent &vEvent) {
-  lldb::SBBreakpoint brkPt = lldb::SBBreakpoint::GetBreakpointFromEvent(vEvent);
-  if (!brkPt.IsValid())
-    return MIstatus::success;
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  CMICmnLLDBDebugSessionInfo::SBrkPtInfo sBrkPtInfo;
-  if (!rSessionInfo.GetBrkPtInfo(brkPt, sBrkPtInfo)) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_BRKPT_INFO_GET),
-                              "HandleEventSBBreakpointCmn()", brkPt.GetID()));
-    return MIstatus::failure;
-  }
-
-  // CODETAG_LLDB_BREAKPOINT_CREATION
-  // This is in a worker thread
-  // Add more breakpoint information or overwrite existing information
-  CMICmnLLDBDebugSessionInfo::SBrkPtInfo sBrkPtInfoRec;
-  if (!rSessionInfo.RecordBrkPtInfoGet(brkPt.GetID(), sBrkPtInfoRec)) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_BRKPT_NOTFOUND),
-                              "HandleEventSBBreakpointCmn()", brkPt.GetID()));
-    return MIstatus::failure;
-  }
-  sBrkPtInfo.m_bDisp = sBrkPtInfoRec.m_bDisp;
-  sBrkPtInfo.m_bEnabled = brkPt.IsEnabled();
-  sBrkPtInfo.m_bHaveArgOptionThreadGrp = false;
-  sBrkPtInfo.m_strOptThrdGrp = "";
-  sBrkPtInfo.m_nTimes = brkPt.GetHitCount();
-  sBrkPtInfo.m_strOrigLoc = sBrkPtInfoRec.m_strOrigLoc;
-  sBrkPtInfo.m_nIgnore = sBrkPtInfoRec.m_nIgnore;
-  sBrkPtInfo.m_bPending = sBrkPtInfoRec.m_bPending;
-  sBrkPtInfo.m_bCondition = sBrkPtInfoRec.m_bCondition;
-  sBrkPtInfo.m_strCondition = sBrkPtInfoRec.m_strCondition;
-  sBrkPtInfo.m_bBrkPtThreadId = sBrkPtInfoRec.m_bBrkPtThreadId;
-  sBrkPtInfo.m_nBrkPtThreadId = sBrkPtInfoRec.m_nBrkPtThreadId;
-
-  // MI print
-  // "=breakpoint-modified,bkpt={number=\"%d\",type=\"breakpoint\",disp=\"%s\",enabled=\"%c\",addr=\"0x%016"
-  // PRIx64 "\",
-  // func=\"%s\",file=\"%s\",fullname=\"%s/%s\",line=\"%d\",times=\"%d\",original-location=\"%s\"}"
-  CMICmnMIValueTuple miValueTuple;
-  if (!rSessionInfo.MIResponseFormBrkPtInfo(sBrkPtInfo, miValueTuple)) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_FORM_MI_RESPONSE),
-                              "HandleEventSBBreakpointCmn()"));
-    return MIstatus::failure;
-  }
-
-  const CMICmnMIValueResult miValueResultC("bkpt", miValueTuple);
-  const CMICmnMIOutOfBandRecord miOutOfBandRecord(
-      CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified, miValueResultC);
-  bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-  bOk = bOk && CMICmnStreamStdout::WritePrompt();
-
-  return bOk;
-}
-
-//++
-// Details: Handle a LLDB SBBreakpoint added event.
-//          Add more breakpoint information or overwrite existing information.
-//          Normally a break point session info objects exists by now when an MI
-//          command
-//          was issued to insert a break so the retrieval would normally always
-//          succeed
-//          however should a user type "b main" into a console then LLDB will
-//          create a
-//          breakpoint directly, hence no MI command, hence no previous record
-//          of the
-//          breakpoint so RecordBrkPtInfoGet() will fail. We still get the event
-//          though
-//          so need to create a breakpoint info object here and send appropriate
-//          MI
-//          response.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBBreakpointAdded(
-    const lldb::SBEvent &vEvent) {
-  lldb::SBBreakpoint brkPt = lldb::SBBreakpoint::GetBreakpointFromEvent(vEvent);
-  if (!brkPt.IsValid())
-    return MIstatus::success;
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  CMICmnLLDBDebugSessionInfo::SBrkPtInfo sBrkPtInfo;
-  if (!rSessionInfo.GetBrkPtInfo(brkPt, sBrkPtInfo)) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_BRKPT_INFO_GET),
-                              "HandleEventSBBreakpointAdded()", brkPt.GetID()));
-    return MIstatus::failure;
-  }
-
-  // CODETAG_LLDB_BREAKPOINT_CREATION
-  // This is in a worker thread
-  CMICmnLLDBDebugSessionInfo::SBrkPtInfo sBrkPtInfoRec;
-  const bool bBrkPtExistAlready =
-      rSessionInfo.RecordBrkPtInfoGet(brkPt.GetID(), sBrkPtInfoRec);
-  if (bBrkPtExistAlready) {
-    // Update breakpoint information object
-    sBrkPtInfo.m_bDisp = sBrkPtInfoRec.m_bDisp;
-    sBrkPtInfo.m_bEnabled = brkPt.IsEnabled();
-    sBrkPtInfo.m_bHaveArgOptionThreadGrp = false;
-    sBrkPtInfo.m_strOptThrdGrp.clear();
-    sBrkPtInfo.m_nTimes = brkPt.GetHitCount();
-    sBrkPtInfo.m_strOrigLoc = sBrkPtInfoRec.m_strOrigLoc;
-    sBrkPtInfo.m_nIgnore = sBrkPtInfoRec.m_nIgnore;
-    sBrkPtInfo.m_bPending = sBrkPtInfoRec.m_bPending;
-    sBrkPtInfo.m_bCondition = sBrkPtInfoRec.m_bCondition;
-    sBrkPtInfo.m_strCondition = sBrkPtInfoRec.m_strCondition;
-    sBrkPtInfo.m_bBrkPtThreadId = sBrkPtInfoRec.m_bBrkPtThreadId;
-    sBrkPtInfo.m_nBrkPtThreadId = sBrkPtInfoRec.m_nBrkPtThreadId;
-  } else {
-    // Create a breakpoint information object
-    sBrkPtInfo.m_bDisp = brkPt.IsOneShot();
-    sBrkPtInfo.m_bEnabled = brkPt.IsEnabled();
-    sBrkPtInfo.m_bHaveArgOptionThreadGrp = false;
-    sBrkPtInfo.m_strOptThrdGrp.clear();
-    sBrkPtInfo.m_strOrigLoc = CMIUtilString::Format(
-        "%s:%d", sBrkPtInfo.m_fileName.c_str(), sBrkPtInfo.m_nLine);
-    sBrkPtInfo.m_nIgnore = brkPt.GetIgnoreCount();
-    sBrkPtInfo.m_bPending = false;
-    const char *pStrCondition = brkPt.GetCondition();
-    sBrkPtInfo.m_bCondition = pStrCondition != nullptr;
-    sBrkPtInfo.m_strCondition =
-        (pStrCondition != nullptr) ? pStrCondition : "??";
-    sBrkPtInfo.m_bBrkPtThreadId = brkPt.GetThreadID() != 0;
-    sBrkPtInfo.m_nBrkPtThreadId = brkPt.GetThreadID();
-  }
-
-  CMICmnMIValueTuple miValueTuple;
-  if (!rSessionInfo.MIResponseFormBrkPtInfo(sBrkPtInfo, miValueTuple)) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_FORM_MI_RESPONSE),
-                              "HandleEventSBBreakpointAdded()"));
-    return MIstatus::failure;
-  }
-
-  bool bOk = MIstatus::success;
-  if (bBrkPtExistAlready) {
-    // MI print
-    // "=breakpoint-modified,bkpt={number=\"%d\",type=\"breakpoint\",disp=\"%s\",enabled=\"%c\",addr=\"0x%016"
-    // PRIx64
-    // "\",func=\"%s\",file=\"%s\",fullname=\"%s/%s\",line=\"%d\",times=\"%d\",original-location=\"%s\"}"
-    const CMICmnMIValueResult miValueResult("bkpt", miValueTuple);
-    const CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified, miValueResult);
-    bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    bOk = bOk && CMICmnStreamStdout::WritePrompt();
-  } else {
-    // CODETAG_LLDB_BRKPT_ID_MAX
-    if (brkPt.GetID() > (lldb::break_id_t)rSessionInfo.m_nBrkPointCntMax) {
-      SetErrorDescription(CMIUtilString::Format(
-          MIRSRC(IDS_CMD_ERR_BRKPT_CNT_EXCEEDED),
-          "HandleEventSBBreakpointAdded()", rSessionInfo.m_nBrkPointCntMax,
-          sBrkPtInfo.m_id));
-      return MIstatus::failure;
-    }
-    if (!rSessionInfo.RecordBrkPtInfo(brkPt.GetID(), sBrkPtInfo)) {
-      SetErrorDescription(CMIUtilString::Format(
-          MIRSRC(IDS_LLDBOUTOFBAND_ERR_BRKPT_INFO_SET),
-          "HandleEventSBBreakpointAdded()", sBrkPtInfo.m_id));
-      return MIstatus::failure;
-    }
-
-    // MI print
-    // "=breakpoint-created,bkpt={number=\"%d\",type=\"breakpoint\",disp=\"%s\",enabled=\"%c\",addr=\"0x%016"
-    // PRIx64
-    // "\",func=\"%s\",file=\"%s\",fullname=\"%s/%s\",line=\"%d\",times=\"%d\",original-location=\"%s\"}"
-    const CMICmnMIValueResult miValueResult("bkpt", miValueTuple);
-    const CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointCreated, miValueResult);
-    bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    bOk = bOk && CMICmnStreamStdout::WritePrompt();
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Handle a LLDB SBThread event.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBThread(
-    const lldb::SBEvent &vEvent) {
-  if (!ChkForStateChanges())
-    return MIstatus::failure;
-
-  bool bOk = MIstatus::success;
-  const char *pEventType = "";
-  const MIuint nEventType = vEvent.GetType();
-  switch (nEventType) {
-  case lldb::SBThread::eBroadcastBitStackChanged:
-    pEventType = "eBroadcastBitStackChanged";
-    bOk = HandleEventSBThreadBitStackChanged(vEvent);
-    break;
-  case lldb::SBThread::eBroadcastBitThreadSuspended:
-    pEventType = "eBroadcastBitThreadSuspended";
-    bOk = HandleEventSBThreadSuspended(vEvent);
-    break;
-  case lldb::SBThread::eBroadcastBitThreadResumed:
-    pEventType = "eBroadcastBitThreadResumed";
-    break;
-  case lldb::SBThread::eBroadcastBitSelectedFrameChanged:
-    pEventType = "eBroadcastBitSelectedFrameChanged";
-    break;
-  case lldb::SBThread::eBroadcastBitThreadSelected:
-    pEventType = "eBroadcastBitThreadSelected";
-    break;
-  default: {
-    const CMIUtilString msg(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_UNKNOWN_EVENT),
-                              "SBThread", (MIuint)nEventType));
-    SetErrorDescription(msg);
-    return MIstatus::failure;
-  }
-  }
-  m_pLog->WriteLog(CMIUtilString::Format("##### An SBThread event occurred: %s",
-                                         pEventType));
-
-  return bOk;
-}
-
-//++
-// Details: Handle a LLDB SBThread event.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBThreadSuspended(
-    const lldb::SBEvent &vEvent) {
-  lldb::SBThread thread = lldb::SBThread::GetThreadFromEvent(vEvent);
-  if (!thread.IsValid())
-    return MIstatus::success;
-
-  const lldb::StopReason eStopReason = thread.GetStopReason();
-  if (eStopReason != lldb::eStopReasonSignal)
-    return MIstatus::success;
-
-  // MI print "@thread=%d,signal=%lld"
-  const MIuint64 nId = thread.GetStopReasonDataAtIndex(0);
-  const CMIUtilString strThread(
-      CMIUtilString::Format("%d", thread.GetThreadID()));
-  const CMICmnMIValueConst miValueConst(strThread);
-  const CMICmnMIValueResult miValueResult("thread", miValueConst);
-  CMICmnMIOutOfBandRecord miOutOfBandRecord(
-      CMICmnMIOutOfBandRecord::eOutOfBand_Thread, miValueResult);
-  const CMIUtilString strSignal(CMIUtilString::Format("%lld", nId));
-  const CMICmnMIValueConst miValueConst2(strSignal);
-  const CMICmnMIValueResult miValueResult2("signal", miValueConst2);
-  miOutOfBandRecord.Add(miValueResult2);
-  return MiOutOfBandRecordToStdout(miOutOfBandRecord);
-}
-
-//++
-// Details: Handle a LLDB SBThread event.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBThreadBitStackChanged(
-    const lldb::SBEvent &vEvent) {
-  lldb::SBThread thread = lldb::SBThread::GetThreadFromEvent(vEvent);
-  if (!thread.IsValid())
-    return MIstatus::success;
-
-  lldb::SBStream streamOut;
-  const bool bOk = thread.GetStatus(streamOut);
-  return bOk && TextToStdout(streamOut.GetData());
-}
-
-//++
-// Details: Handle a LLDB SBTarget event.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBTarget(
-    const lldb::SBEvent &vEvent) {
-  if (!ChkForStateChanges())
-    return MIstatus::failure;
-
-  bool bOk = MIstatus::success;
-  const char *pEventType = "";
-  const MIuint nEventType = vEvent.GetType();
-  switch (nEventType) {
-  case lldb::SBTarget::eBroadcastBitBreakpointChanged:
-    pEventType = "eBroadcastBitBreakpointChanged";
-    break;
-  case lldb::SBTarget::eBroadcastBitModulesLoaded:
-    pEventType = "eBroadcastBitModulesLoaded";
-    bOk = HandleTargetEventBroadcastBitModulesLoaded(vEvent);
-    break;
-  case lldb::SBTarget::eBroadcastBitModulesUnloaded:
-    pEventType = "eBroadcastBitModulesUnloaded";
-    bOk = HandleTargetEventBroadcastBitModulesUnloaded(vEvent);
-    break;
-  case lldb::SBTarget::eBroadcastBitWatchpointChanged:
-    pEventType = "eBroadcastBitWatchpointChanged";
-    break;
-  case lldb::SBTarget::eBroadcastBitSymbolsLoaded:
-    pEventType = "eBroadcastBitSymbolsLoaded";
-    break;
-  default: {
-    const CMIUtilString msg(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_UNKNOWN_EVENT),
-                              "SBTarget", (MIuint)nEventType));
-    SetErrorDescription(msg);
-    return MIstatus::failure;
-  }
-  }
-  m_pLog->WriteLog(CMIUtilString::Format("##### An SBTarget event occurred: %s",
-                                         pEventType));
-
-  return bOk;
-}
-
-//++
-// Details: Print to stdout
-// "=library-loaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded="%d"[,symbols-path=\"%s\"],loaded_addr=\"0x%016"
-// PRIx64"\""
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleTargetEventBroadcastBitModulesLoaded(
-    const lldb::SBEvent &vEvent) {
-  bool bOk = MIstatus::failure;
-  const MIuint nSize = lldb::SBTarget::GetNumModulesFromEvent(vEvent);
-  for (MIuint nIndex = 0; nIndex < nSize; ++nIndex) {
-    const lldb::SBModule sbModule =
-        lldb::SBTarget::GetModuleAtIndexFromEvent(nIndex, vEvent);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded);
-    const bool bWithExtraFields = true;
-    bOk = MiHelpGetModuleInfo(sbModule, bWithExtraFields, miOutOfBandRecord);
-    bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    if (!bOk)
-      break;
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Print to stdout
-// "=library-unloaded,id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded="%d"[,symbols-path=\"%s\"],loaded_addr=\"0x%016"
-// PRIx64"\""
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::
-    HandleTargetEventBroadcastBitModulesUnloaded(const lldb::SBEvent &vEvent) {
-  bool bOk = MIstatus::failure;
-  const MIuint nSize = lldb::SBTarget::GetNumModulesFromEvent(vEvent);
-  for (MIuint nIndex = 0; nIndex < nSize; ++nIndex) {
-    const lldb::SBModule sbModule =
-        lldb::SBTarget::GetModuleAtIndexFromEvent(nIndex, vEvent);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleUnloaded);
-    const bool bWithExtraFields = false;
-    bOk = MiHelpGetModuleInfo(sbModule, bWithExtraFields, miOutOfBandRecord);
-    bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    if (!bOk)
-      break;
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Build module information for =library-loaded/=library-unloaded:
-// "id=\"%s\",target-name=\"%s\",host-name=\"%s\",symbols-loaded="%d"[,symbols-path=\"%s\"],loaded_addr=\"0x%016"
-// PRIx64"\""
-// Type:    Method.
-// Args:    vwrMiValueList    - (W) MI value list object.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::MiHelpGetModuleInfo(
-    const lldb::SBModule &vModule, const bool vbWithExtraFields,
-    CMICmnMIOutOfBandRecord &vwrMiOutOfBandRecord) {
-  bool bOk = MIstatus::success;
-
-  // First, build standard fields:
-  // Build "id" field
-  std::unique_ptr<char[]> apPath(new char[PATH_MAX]);
-  vModule.GetFileSpec().GetPath(apPath.get(), PATH_MAX);
-  const CMIUtilString strTargetPath(apPath.get());
-  const CMICmnMIValueConst miValueConst(strTargetPath.AddSlashes());
-  const CMICmnMIValueResult miValueResult("id", miValueConst);
-  vwrMiOutOfBandRecord.Add(miValueResult);
-  // Build "target-name" field
-  const CMICmnMIValueConst miValueConst2(strTargetPath.AddSlashes());
-  const CMICmnMIValueResult miValueResult2("target-name", miValueConst2);
-  vwrMiOutOfBandRecord.Add(miValueResult2);
-  // Build "host-name" field
-  vModule.GetPlatformFileSpec().GetPath(apPath.get(), PATH_MAX);
-  const CMIUtilString strHostPath(apPath.get());
-  const CMICmnMIValueConst miValueConst3(strHostPath.AddSlashes());
-  const CMICmnMIValueResult miValueResult3("host-name", miValueConst3);
-  vwrMiOutOfBandRecord.Add(miValueResult3);
-
-  // Then build extra fields if needed:
-  if (vbWithExtraFields) {
-    // Build "symbols-loaded" field
-    vModule.GetSymbolFileSpec().GetPath(apPath.get(), PATH_MAX);
-    const CMIUtilString strSymbolsPath(apPath.get());
-    const bool bSymbolsLoaded =
-        !CMIUtilString::Compare(strHostPath, strSymbolsPath);
-    const CMICmnMIValueConst miValueConst4(
-        CMIUtilString::Format("%d", bSymbolsLoaded));
-    const CMICmnMIValueResult miValueResult4("symbols-loaded", miValueConst4);
-    vwrMiOutOfBandRecord.Add(miValueResult4);
-    // Build "symbols-path" field
-    if (bSymbolsLoaded) {
-      const CMICmnMIValueConst miValueConst5(strSymbolsPath.AddSlashes());
-      const CMICmnMIValueResult miValueResult5("symbols-path", miValueConst5);
-      vwrMiOutOfBandRecord.Add(miValueResult5);
-    }
-    // Build "loaded_addr" field
-    lldb::SBAddress sbAddress(vModule.GetObjectFileHeaderAddress());
-    CMICmnLLDBDebugSessionInfo &rSessionInfo(
-        CMICmnLLDBDebugSessionInfo::Instance());
-    const lldb::addr_t nLoadAddress(
-        sbAddress.GetLoadAddress(rSessionInfo.GetTarget()));
-    const CMIUtilString strLoadedAddr(
-        nLoadAddress != LLDB_INVALID_ADDRESS
-            ? CMIUtilString::Format("0x%016" PRIx64, nLoadAddress)
-            : "-");
-    const CMICmnMIValueConst miValueConst6(strLoadedAddr);
-    const CMICmnMIValueResult miValueResult6("loaded_addr", miValueConst6);
-    vwrMiOutOfBandRecord.Add(miValueResult6);
-
-    // Build "size" field
-    lldb::SBSection sbSection = sbAddress.GetSection();
-    const CMIUtilString strSize(
-        CMIUtilString::Format("%" PRIu64, sbSection.GetByteSize()));
-    const CMICmnMIValueConst miValueConst7(strSize);
-    const CMICmnMIValueResult miValueResult7("size", miValueConst7);
-    vwrMiOutOfBandRecord.Add(miValueResult7);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Handle a LLDB SBCommandInterpreter event.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB command interpreter event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleEventSBCommandInterpreter(
-    const lldb::SBEvent &vEvent) {
-  // This function is not used
-  // *** This function is under development
-
-  const char *pEventType = "";
-  const MIuint nEventType = vEvent.GetType();
-  switch (nEventType) {
-  case lldb::SBCommandInterpreter::eBroadcastBitThreadShouldExit:
-    pEventType = "eBroadcastBitThreadShouldExit";
-    // ToDo: IOR: Reminder to maybe handle this here
-    // const MIuint nEventType = event.GetType();
-    // if (nEventType &
-    // lldb::SBCommandInterpreter::eBroadcastBitThreadShouldExit)
-    //{
-    //  m_pClientDriver->SetExitApplicationFlag();
-    //  vrbYesExit = true;
-    //  return MIstatus::success;
-    //}
-    break;
-  case lldb::SBCommandInterpreter::eBroadcastBitResetPrompt:
-    pEventType = "eBroadcastBitResetPrompt";
-    break;
-  case lldb::SBCommandInterpreter::eBroadcastBitQuitCommandReceived: {
-    pEventType = "eBroadcastBitQuitCommandReceived";
-    const bool bForceExit = true;
-    CMICmnLLDBDebugger::Instance().GetDriver().SetExitApplicationFlag(
-        bForceExit);
-    break;
-  }
-  case lldb::SBCommandInterpreter::eBroadcastBitAsynchronousOutputData:
-    pEventType = "eBroadcastBitAsynchronousOutputData";
-    break;
-  case lldb::SBCommandInterpreter::eBroadcastBitAsynchronousErrorData:
-    pEventType = "eBroadcastBitAsynchronousErrorData";
-    break;
-  default: {
-    const CMIUtilString msg(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_UNKNOWN_EVENT),
-                              "SBCommandInterpreter", (MIuint)nEventType));
-    SetErrorDescription(msg);
-    return MIstatus::failure;
-  }
-  }
-  m_pLog->WriteLog(CMIUtilString::Format(
-      "##### An SBCommandInterpreter event occurred: %s", pEventType));
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Handle SBProcess event eBroadcastBitStateChanged.
-// Type:    Method.
-// Args:    vEvent          - (R) An LLDB event object.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleProcessEventBroadcastBitStateChanged(
-    const lldb::SBEvent &vEvent) {
-  // Make sure the program hasn't been auto-restarted:
-  if (lldb::SBProcess::GetRestartedFromEvent(vEvent))
-    return MIstatus::success;
-
-  bool bOk = ChkForStateChanges();
-  bOk = bOk && GetProcessStdout();
-  bOk = bOk && GetProcessStderr();
-  if (!bOk)
-    return MIstatus::failure;
-
-  // Something changed in the process; get the event and report the process's
-  // current
-  // status and location
-  const lldb::StateType eEventState =
-      lldb::SBProcess::GetStateFromEvent(vEvent);
-  if (eEventState == lldb::eStateInvalid)
-    return MIstatus::success;
-
-  lldb::SBProcess process = lldb::SBProcess::GetProcessFromEvent(vEvent);
-  if (!process.IsValid()) {
-    const CMIUtilString msg(CMIUtilString::Format(
-        MIRSRC(IDS_LLDBOUTOFBAND_ERR_PROCESS_INVALID), "SBProcess",
-        "HandleProcessEventBroadcastBitStateChanged()"));
-    SetErrorDescription(msg);
-    return MIstatus::failure;
-  }
-
-  bool bShouldBrk = true;
-  const char *pEventType = "";
-  switch (eEventState) {
-  case lldb::eStateUnloaded:
-    pEventType = "eStateUnloaded";
-    break;
-  case lldb::eStateConnected:
-    pEventType = "eStateConnected";
-    break;
-  case lldb::eStateAttaching:
-    pEventType = "eStateAttaching";
-    break;
-  case lldb::eStateLaunching:
-    pEventType = "eStateLaunching";
-    break;
-  case lldb::eStateStopped:
-    pEventType = "eStateStopped";
-    bOk = HandleProcessEventStateStopped(vEvent, bShouldBrk);
-    if (bShouldBrk)
-      break;
-    LLVM_FALLTHROUGH;
-  case lldb::eStateCrashed:
-  case lldb::eStateSuspended:
-    pEventType = "eStateSuspended";
-    bOk = HandleProcessEventStateSuspended(vEvent);
-    break;
-  case lldb::eStateRunning:
-    pEventType = "eStateRunning";
-    bOk = HandleProcessEventStateRunning();
-    break;
-  case lldb::eStateStepping:
-    pEventType = "eStateStepping";
-    break;
-  case lldb::eStateDetached:
-    pEventType = "eStateDetached";
-    break;
-  case lldb::eStateExited:
-    // Don't exit from lldb-mi here. We should be able to re-run target.
-    pEventType = "eStateExited";
-    bOk = HandleProcessEventStateExited();
-    break;
-  default: {
-    const CMIUtilString msg(CMIUtilString::Format(
-        MIRSRC(IDS_LLDBOUTOFBAND_ERR_UNKNOWN_EVENT),
-        "SBProcess BroadcastBitStateChanged", (MIuint)eEventState));
-    SetErrorDescription(msg);
-    return MIstatus::failure;
-  }
-  }
-
-  // ToDo: Remove when finished coding application
-  m_pLog->WriteLog(CMIUtilString::Format(
-      "##### An SB Process event BroadcastBitStateChanged occurred: %s",
-      pEventType));
-
-  return bOk;
-}
-
-//++
-// Details: Asynchronous event handler for LLDB Process state suspended.
-// Type:    Method.
-// Args:    vEvent  - (R) An LLDB event object.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateSuspended(
-    const lldb::SBEvent &vEvent) {
-  bool bOk = MIstatus::success;
-  lldb::SBStream streamOut;
-  lldb::SBDebugger &rDebugger =
-      CMICmnLLDBDebugSessionInfo::Instance().GetDebugger();
-  lldb::SBProcess sbProcess =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  lldb::SBTarget target = sbProcess.GetTarget();
-  if (rDebugger.GetSelectedTarget() == target) {
-    if (!UpdateSelectedThread())
-      return MIstatus::failure;
-    sbProcess.GetDescription(streamOut);
-    // Add a delimiter between process' and threads' info.
-    streamOut.Printf("\n");
-    for (uint32_t i = 0, e = sbProcess.GetNumThreads(); i < e; ++i) {
-      const lldb::SBThread thread = sbProcess.GetThreadAtIndex(i);
-      if (!thread.IsValid())
-        continue;
-      thread.GetDescription(streamOut);
-    }
-    bOk = TextToStdout(streamOut.GetData());
-  } else {
-    const MIuint nTargetIndex = rDebugger.GetIndexOfTarget(target);
-    if (nTargetIndex != UINT_MAX)
-      streamOut.Printf("Target %" PRIu64 ": (", (uint64_t)nTargetIndex);
-    else
-      streamOut.Printf("Target <unknown index>: (");
-    target.GetDescription(streamOut, lldb::eDescriptionLevelBrief);
-    streamOut.Printf(") stopped.\n");
-    bOk = TextToStdout(streamOut.GetData());
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Print to stdout MI formatted text to indicate process stopped.
-// Type:    Method.
-// Args:    vwrbShouldBrk   - (W) True = Yes break, false = do not.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateStopped(
-    const lldb::SBEvent &vrEvent, bool &vwrbShouldBrk) {
-  if (!UpdateSelectedThread())
-    return MIstatus::failure;
-
-  const char *pEventType = "";
-  bool bOk = MIstatus::success;
-  lldb::SBProcess sbProcess =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  const lldb::StopReason eStoppedReason =
-      sbProcess.GetSelectedThread().GetStopReason();
-  switch (eStoppedReason) {
-  case lldb::eStopReasonInvalid:
-    pEventType = "eStopReasonInvalid";
-    vwrbShouldBrk = false;
-    break;
-  case lldb::eStopReasonNone:
-    pEventType = "eStopReasonNone";
-    break;
-  case lldb::eStopReasonTrace:
-    pEventType = "eStopReasonTrace";
-    bOk = HandleProcessEventStopReasonTrace();
-    break;
-  case lldb::eStopReasonBreakpoint:
-    pEventType = "eStopReasonBreakpoint";
-    bOk = HandleProcessEventStopReasonBreakpoint();
-    break;
-  case lldb::eStopReasonWatchpoint:
-    pEventType = "eStopReasonWatchpoint";
-    break;
-  case lldb::eStopReasonSignal:
-    pEventType = "eStopReasonSignal";
-    bOk = HandleProcessEventStopSignal(vrEvent);
-    break;
-  case lldb::eStopReasonException:
-    pEventType = "eStopReasonException";
-    bOk = HandleProcessEventStopException();
-    break;
-  case lldb::eStopReasonExec:
-    pEventType = "eStopReasonExec";
-    break;
-  case lldb::eStopReasonPlanComplete:
-    pEventType = "eStopReasonPlanComplete";
-    bOk = HandleProcessEventStopReasonTrace();
-    break;
-  case lldb::eStopReasonThreadExiting:
-    pEventType = "eStopReasonThreadExiting";
-    break;
-  case lldb::eStopReasonInstrumentation:
-    pEventType = "eStopReasonInstrumentation";
-    break;
-  }
-
-  // ToDo: Remove when finished coding application
-  m_pLog->WriteLog(CMIUtilString::Format(
-      "##### An SB Process event stop state occurred: %s", pEventType));
-
-  return bOk;
-}
-
-//++
-// Details: Asynchronous event handler for LLDB Process stop signal.
-// Type:    Method.
-// Args:    vrEvent           - (R) An LLDB broadcast event.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopSignal(
-    const lldb::SBEvent &vrEvent) {
-  bool bOk = MIstatus::success;
-
-  InitializeSignals();
-  lldb::SBProcess sbProcess =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  const MIuint64 nStopReason =
-      sbProcess.GetSelectedThread().GetStopReasonDataAtIndex(0);
-  const bool bInterrupted = lldb::SBProcess::GetInterruptedFromEvent(vrEvent);
-  if (nStopReason == m_SIGINT || (nStopReason == m_SIGSTOP && bInterrupted)) {
-    // MI print
-    // "*stopped,reason=\"signal-received\",signal-name=\"SIGINT\",signal-meaning=\"Interrupt\",frame={%s},thread-id=\"%d\",stopped-threads=\"all\""
-    const CMICmnMIValueConst miValueConst("signal-received");
-    const CMICmnMIValueResult miValueResult("reason", miValueConst);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
-    const CMICmnMIValueConst miValueConst2("SIGINT");
-    const CMICmnMIValueResult miValueResult2("signal-name", miValueConst2);
-    miOutOfBandRecord.Add(miValueResult2);
-    const CMICmnMIValueConst miValueConst3("Interrupt");
-    const CMICmnMIValueResult miValueResult3("signal-meaning", miValueConst3);
-    miOutOfBandRecord.Add(miValueResult3);
-    CMICmnMIValueTuple miValueTuple;
-    bOk = bOk && MiHelpGetCurrentThreadFrame(miValueTuple);
-    const CMICmnMIValueResult miValueResult4("frame", miValueTuple);
-    miOutOfBandRecord.Add(miValueResult4);
-    const CMIUtilString strThreadId(CMIUtilString::Format(
-        "%" PRIu32, sbProcess.GetSelectedThread().GetIndexID()));
-    const CMICmnMIValueConst miValueConst5(strThreadId);
-    const CMICmnMIValueResult miValueResult5("thread-id", miValueConst5);
-    miOutOfBandRecord.Add(miValueResult5);
-    const CMICmnMIValueConst miValueConst6("all");
-    const CMICmnMIValueResult miValueResult6("stopped-threads", miValueConst6);
-    miOutOfBandRecord.Add(miValueResult6);
-    bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    bOk = bOk && CMICmnStreamStdout::WritePrompt();
-  } else if (nStopReason == m_SIGSTOP) {
-    // MI print
-    // "*stopped,reason=\"signal-received\",signal-name=\"SIGSTOP\",signal-meaning=\"Stop\",frame={%s},thread-id=\"%d\",stopped-threads=\"all\""
-    const CMICmnMIValueConst miValueConst("signal-received");
-    const CMICmnMIValueResult miValueResult("reason", miValueConst);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
-    const CMICmnMIValueConst miValueConst2("SIGSTOP");
-    const CMICmnMIValueResult miValueResult2("signal-name", miValueConst2);
-    miOutOfBandRecord.Add(miValueResult2);
-    const CMICmnMIValueConst miValueConst3("Stop");
-    const CMICmnMIValueResult miValueResult3("signal-meaning", miValueConst3);
-    miOutOfBandRecord.Add(miValueResult3);
-    CMICmnMIValueTuple miValueTuple;
-    bOk = bOk && MiHelpGetCurrentThreadFrame(miValueTuple);
-    const CMICmnMIValueResult miValueResult4("frame", miValueTuple);
-    miOutOfBandRecord.Add(miValueResult4);
-    const CMIUtilString strThreadId(CMIUtilString::Format(
-        "%" PRIu32, sbProcess.GetSelectedThread().GetIndexID()));
-    const CMICmnMIValueConst miValueConst5(strThreadId);
-    const CMICmnMIValueResult miValueResult5("thread-id", miValueConst5);
-    miOutOfBandRecord.Add(miValueResult5);
-    const CMICmnMIValueConst miValueConst6("all");
-    const CMICmnMIValueResult miValueResult6("stopped-threads", miValueConst6);
-    miOutOfBandRecord.Add(miValueResult6);
-    bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    bOk = bOk && CMICmnStreamStdout::WritePrompt();
-  } else if (nStopReason == m_SIGSEGV) {
-    // MI print
-    // "*stopped,reason=\"signal-received\",signal-name=\"SIGSEGV\",signal-meaning=\"Segmentation
-    // fault\",thread-id=\"%d\",frame={%s}"
-    const CMICmnMIValueConst miValueConst("signal-received");
-    const CMICmnMIValueResult miValueResult("reason", miValueConst);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
-    const CMICmnMIValueConst miValueConst2("SIGSEGV");
-    const CMICmnMIValueResult miValueResult2("signal-name", miValueConst2);
-    miOutOfBandRecord.Add(miValueResult2);
-    const CMICmnMIValueConst miValueConst3("Segmentation fault");
-    const CMICmnMIValueResult miValueResult3("signal-meaning", miValueConst3);
-    miOutOfBandRecord.Add(miValueResult3);
-    CMICmnMIValueTuple miValueTuple;
-    bOk = bOk && MiHelpGetCurrentThreadFrame(miValueTuple);
-    const CMICmnMIValueResult miValueResult4("frame", miValueTuple);
-    miOutOfBandRecord.Add(miValueResult4);
-    const CMIUtilString strThreadId(CMIUtilString::Format(
-        "%d", sbProcess.GetSelectedThread().GetIndexID()));
-    const CMICmnMIValueConst miValueConst5(strThreadId);
-    const CMICmnMIValueResult miValueResult5("thread-id", miValueConst5);
-    miOutOfBandRecord.Add(miValueResult5);
-    bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    // Note no "(gdb)" output here
-  } else if (nStopReason == m_SIGTRAP) {
-    lldb::SBThread thread = sbProcess.GetSelectedThread();
-    const MIuint nFrames = thread.GetNumFrames();
-    if (nFrames > 0) {
-      lldb::SBFrame frame = thread.GetFrameAtIndex(0);
-      const char *pFnName = frame.GetFunctionName();
-      if (pFnName != nullptr) {
-        const CMIUtilString fnName = CMIUtilString(pFnName);
-        static const CMIUtilString threadCloneFn =
-            CMIUtilString("__pthread_clone");
-
-        if (CMIUtilString::Compare(threadCloneFn, fnName)) {
-          if (sbProcess.IsValid())
-            sbProcess.Continue();
-        }
-      }
-    }
-  } else {
-    // MI print
-    // "*stopped,reason=\"signal-received\",signal-name=\"%s\",thread-id=\"%d\",stopped-threads=\"all\""
-    // MI print
-    // "*stopped,reason=\"signal-received\",signal=\"%d\",thread-id=\"%d\",stopped-threads=\"all\""
-    const CMICmnMIValueConst miValueConst("signal-received");
-    const CMICmnMIValueResult miValueResult("reason", miValueConst);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
-    lldb::SBUnixSignals sbUnixSignals = sbProcess.GetUnixSignals();
-    const char *pSignal = sbUnixSignals.GetSignalAsCString(nStopReason);
-    if (pSignal) {
-      const CMICmnMIValueConst miValueConst2(pSignal);
-      const CMICmnMIValueResult miValueResult2("signal-name", miValueConst2);
-      miOutOfBandRecord.Add(miValueResult2);
-    } else {
-      const CMIUtilString strSignal(
-          CMIUtilString::Format("%" PRIu64, nStopReason));
-      const CMICmnMIValueConst miValueConst2(strSignal);
-      const CMICmnMIValueResult miValueResult2("signal", miValueConst2);
-      miOutOfBandRecord.Add(miValueResult2);
-    }
-    const CMIUtilString strThreadId(CMIUtilString::Format(
-        "%d", sbProcess.GetSelectedThread().GetIndexID()));
-    const CMICmnMIValueConst miValueConst3(strThreadId);
-    const CMICmnMIValueResult miValueResult3("thread-id", miValueConst3);
-    miOutOfBandRecord.Add(miValueResult3);
-    const CMICmnMIValueConst miValueConst4("all");
-    const CMICmnMIValueResult miValueResult4("stopped-threads", miValueConst4);
-    miOutOfBandRecord.Add(miValueResult4);
-    bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    bOk = bOk && CMICmnStreamStdout::WritePrompt();
-  }
-  return bOk;
-}
-
-//++
-// Details: Asynchronous event handler for LLDB Process stop exception.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopException() {
-  const lldb::SBProcess sbProcess =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  lldb::SBThread sbThread = sbProcess.GetSelectedThread();
-  const size_t nStopDescriptionLen = sbThread.GetStopDescription(nullptr, 0);
-  std::unique_ptr<char[]> apStopDescription(new char[nStopDescriptionLen]);
-  sbThread.GetStopDescription(apStopDescription.get(), nStopDescriptionLen);
-
-  // MI print
-  // "*stopped,reason=\"exception-received\",exception=\"%s\",thread-id=\"%d\",stopped-threads=\"all\""
-  const CMICmnMIValueConst miValueConst("exception-received");
-  const CMICmnMIValueResult miValueResult("reason", miValueConst);
-  CMICmnMIOutOfBandRecord miOutOfBandRecord(
-      CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
-  const CMIUtilString strReason(apStopDescription.get());
-  const CMICmnMIValueConst miValueConst2(strReason);
-  const CMICmnMIValueResult miValueResult2("exception", miValueConst2);
-  miOutOfBandRecord.Add(miValueResult2);
-  const CMIUtilString strThreadId(
-      CMIUtilString::Format("%d", sbThread.GetIndexID()));
-  const CMICmnMIValueConst miValueConst3(strThreadId);
-  const CMICmnMIValueResult miValueResult3("thread-id", miValueConst3);
-  miOutOfBandRecord.Add(miValueResult3);
-  const CMICmnMIValueConst miValueConst4("all");
-  const CMICmnMIValueResult miValueResult4("stopped-threads", miValueConst4);
-  miOutOfBandRecord.Add(miValueResult4);
-  bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-  bOk = bOk && CMICmnStreamStdout::WritePrompt();
-
-  return bOk;
-}
-
-//++
-// Details: Form partial MI response in a MI value tuple object.
-// Type:    Method.
-// Args:    vwrMiValueTuple   - (W) MI value tuple object.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::MiHelpGetCurrentThreadFrame(
-    CMICmnMIValueTuple &vwrMiValueTuple) {
-  CMIUtilString strThreadFrame;
-  lldb::SBProcess sbProcess =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  lldb::SBThread thread = sbProcess.GetSelectedThread();
-  const MIuint nFrame = thread.GetNumFrames();
-  if (nFrame == 0) {
-    // MI print
-    // "addr=\"??\",func=\"??\",file=\"??\",fullname=\"??\",line=\"??\""
-    const CMICmnMIValueConst miValueConst("??");
-    const CMICmnMIValueResult miValueResult("addr", miValueConst);
-    CMICmnMIValueTuple miValueTuple(miValueResult);
-    const CMICmnMIValueResult miValueResult2("func", miValueConst);
-    miValueTuple.Add(miValueResult2);
-    const CMICmnMIValueResult miValueResult4("file", miValueConst);
-    miValueTuple.Add(miValueResult4);
-    const CMICmnMIValueResult miValueResult5("fullname", miValueConst);
-    miValueTuple.Add(miValueResult5);
-    const CMICmnMIValueResult miValueResult6("line", miValueConst);
-    miValueTuple.Add(miValueResult6);
-
-    vwrMiValueTuple = miValueTuple;
-
-    return MIstatus::success;
-  }
-
-  CMICmnMIValueTuple miValueTuple;
-  if (!CMICmnLLDBDebugSessionInfo::Instance().MIResponseFormFrameInfo(
-          thread, 0, CMICmnLLDBDebugSessionInfo::eFrameInfoFormat_NoArguments,
-          miValueTuple)) {
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_LLDBOUTOFBAND_ERR_FORM_MI_RESPONSE),
-                              "MiHelpGetCurrentThreadFrame()"));
-    return MIstatus::failure;
-  }
-
-  vwrMiValueTuple = miValueTuple;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Asynchronous event handler for LLDB Process stop reason breakpoint.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopReasonBreakpoint() {
-  // CODETAG_DEBUG_SESSION_RUNNING_PROG_RECEIVED_SIGINT_PAUSE_PROGRAM
-  if (!CMIDriver::Instance().SetDriverStateRunningNotDebugging()) {
-    const CMIUtilString &rErrMsg(CMIDriver::Instance().GetErrorDescription());
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_LLDBOUTOFBAND_ERR_SETNEWDRIVERSTATE),
-        "HandleProcessEventStopReasonBreakpoint()", rErrMsg.c_str()));
-    return MIstatus::failure;
-  }
-
-  lldb::SBProcess sbProcess =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  const MIuint64 brkPtId =
-      sbProcess.GetSelectedThread().GetStopReasonDataAtIndex(0);
-  lldb::SBBreakpoint brkPt =
-      CMICmnLLDBDebugSessionInfo::Instance().GetTarget().GetBreakpointAtIndex(
-          (MIuint)brkPtId);
-
-  return MiStoppedAtBreakPoint(brkPtId, brkPt);
-}
-
-//++
-// Details: Form the MI Out-of-band response for stopped reason on hitting a
-// break point.
-// Type:    Method.
-// Args:    vBrkPtId    - (R) The LLDB break point's ID
-//          vBrkPt      - (R) THe LLDB break point object.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::MiStoppedAtBreakPoint(
-    const MIuint64 vBrkPtId, const lldb::SBBreakpoint &vBrkPt) {
-  bool bOk = MIstatus::success;
-
-  lldb::SBProcess sbProcess =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  lldb::SBThread thread = sbProcess.GetSelectedThread();
-  const MIuint nFrame = thread.GetNumFrames();
-  if (nFrame == 0) {
-    // MI print
-    // "*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"%d\",frame={},thread-id=\"%d\",stopped-threads=\"all\""
-    const CMICmnMIValueConst miValueConst("breakpoint-hit");
-    const CMICmnMIValueResult miValueResult("reason", miValueConst);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
-    const CMICmnMIValueConst miValueConst2("del");
-    const CMICmnMIValueResult miValueResult2("disp", miValueConst2);
-    miOutOfBandRecord.Add(miValueResult2);
-    const CMIUtilString strBkp(CMIUtilString::Format("%d", vBrkPtId));
-    const CMICmnMIValueConst miValueConst3(strBkp);
-    CMICmnMIValueResult miValueResult3("bkptno", miValueConst3);
-    miOutOfBandRecord.Add(miValueResult3);
-    const CMICmnMIValueConst miValueConst4("{}");
-    const CMICmnMIValueResult miValueResult4("frame", miValueConst4);
-    miOutOfBandRecord.Add(miValueResult4);
-    const CMIUtilString strThreadId(
-        CMIUtilString::Format("%d", vBrkPt.GetThreadIndex()));
-    const CMICmnMIValueConst miValueConst5(strThreadId);
-    const CMICmnMIValueResult miValueResult5("thread-id", miValueConst5);
-    miOutOfBandRecord.Add(miValueResult5);
-    const CMICmnMIValueConst miValueConst6("all");
-    const CMICmnMIValueResult miValueResult6("stopped-threads", miValueConst6);
-    miOutOfBandRecord.Add(miValueResult6);
-    bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    bOk = bOk && CMICmnStreamStdout::WritePrompt();
-    return bOk;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  // MI print
-  // "*stopped,reason=\"breakpoint-hit\",disp=\"del\",bkptno=\"%d\",frame={addr=\"0x%016"
-  // PRIx64
-  // "\",func=\"%s\",args=[],file=\"%s\",fullname=\"%s\",line=\"%d\"},thread-id=\"%d\",stopped-threads=\"all\""
-  const CMICmnMIValueConst miValueConst("breakpoint-hit");
-  const CMICmnMIValueResult miValueResult("reason", miValueConst);
-  CMICmnMIOutOfBandRecord miOutOfBandRecord(
-      CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
-  const CMICmnMIValueConst miValueConstA("del");
-  const CMICmnMIValueResult miValueResultA("disp", miValueConstA);
-  miOutOfBandRecord.Add(miValueResultA);
-  const CMIUtilString strBkp(CMIUtilString::Format("%d", vBrkPtId));
-  const CMICmnMIValueConst miValueConstB(strBkp);
-  CMICmnMIValueResult miValueResultB("bkptno", miValueConstB);
-  miOutOfBandRecord.Add(miValueResultB);
-
-  // frame={addr=\"0x%016" PRIx64
-  // "\",func=\"%s\",args=[],file=\"%s\",fullname=\"%s\",line=\"%d\"}
-  if (bOk) {
-    CMICmnMIValueTuple miValueTuple;
-    bOk = bOk &&
-          rSessionInfo.MIResponseFormFrameInfo(
-              thread, 0,
-              CMICmnLLDBDebugSessionInfo::eFrameInfoFormat_AllArguments,
-              miValueTuple);
-    const CMICmnMIValueResult miValueResult8("frame", miValueTuple);
-    miOutOfBandRecord.Add(miValueResult8);
-  }
-
-  // Add to MI thread-id=\"%d\",stopped-threads=\"all\"
-  if (bOk) {
-    const CMIUtilString strThreadId(
-        CMIUtilString::Format("%d", thread.GetIndexID()));
-    const CMICmnMIValueConst miValueConst8(strThreadId);
-    const CMICmnMIValueResult miValueResult8("thread-id", miValueConst8);
-    miOutOfBandRecord.Add(miValueResult8);
-  }
-  if (bOk) {
-    const CMICmnMIValueConst miValueConst9("all");
-    const CMICmnMIValueResult miValueResult9("stopped-threads", miValueConst9);
-    miOutOfBandRecord.Add(miValueResult9);
-    bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    bOk = bOk && CMICmnStreamStdout::WritePrompt();
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Asynchronous event handler for LLDB Process stop reason trace.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStopReasonTrace() {
-  bool bOk = true;
-  lldb::SBProcess sbProcess =
-      CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  lldb::SBThread thread = sbProcess.GetSelectedThread();
-  const MIuint nFrame = thread.GetNumFrames();
-  if (nFrame == 0) {
-    // MI print "*stopped,reason=\"trace\",stopped-threads=\"all\""
-    const CMICmnMIValueConst miValueConst("trace");
-    const CMICmnMIValueResult miValueResult("reason", miValueConst);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord(
-        CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
-    const CMICmnMIValueConst miValueConst2("all");
-    const CMICmnMIValueResult miValueResult2("stopped-threads", miValueConst2);
-    miOutOfBandRecord.Add(miValueResult2);
-    bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-    bOk = bOk && CMICmnStreamStdout::WritePrompt();
-    return bOk;
-  }
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-
-  // MI print
-  // "*stopped,reason=\"end-stepping-range\",frame={addr=\"0x%016" PRIx64
-  // "\",func=\"%s\",args=[\"%s\"],file=\"%s\",fullname=\"%s\",line=\"%d\"},thread-id=\"%d\",stopped-threads=\"all\""
-
-  // Function args
-  CMICmnMIValueTuple miValueTuple;
-  if (!rSessionInfo.MIResponseFormFrameInfo(
-          thread, 0, CMICmnLLDBDebugSessionInfo::eFrameInfoFormat_AllArguments,
-          miValueTuple))
-    return MIstatus::failure;
-
-  const CMICmnMIValueConst miValueConst("end-stepping-range");
-  const CMICmnMIValueResult miValueResult("reason", miValueConst);
-  CMICmnMIOutOfBandRecord miOutOfBandRecord(
-      CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult);
-  const CMICmnMIValueResult miValueResult2("frame", miValueTuple);
-  miOutOfBandRecord.Add(miValueResult2);
-
-  // Add to MI thread-id=\"%d\",stopped-threads=\"all\"
-  const CMIUtilString strThreadId(
-      CMIUtilString::Format("%d", thread.GetIndexID()));
-  const CMICmnMIValueConst miValueConst8(strThreadId);
-  const CMICmnMIValueResult miValueResult8("thread-id", miValueConst8);
-  miOutOfBandRecord.Add(miValueResult8);
-
-  const CMICmnMIValueConst miValueConst9("all");
-  const CMICmnMIValueResult miValueResult9("stopped-threads", miValueConst9);
-  miOutOfBandRecord.Add(miValueResult9);
-  bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-  bOk = bOk && CMICmnStreamStdout::WritePrompt();
-
-  return bOk;
-}
-
-//++
-// Details: Asynchronous function update selected thread.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::UpdateSelectedThread() {
-  lldb::SBProcess process = CMICmnLLDBDebugSessionInfo::Instance()
-                                .GetDebugger()
-                                .GetSelectedTarget()
-                                .GetProcess();
-  if (!process.IsValid())
-    return MIstatus::success;
-
-  lldb::SBThread currentThread = process.GetSelectedThread();
-  lldb::SBThread thread;
-  const lldb::StopReason eCurrentThreadStoppedReason =
-      currentThread.GetStopReason();
-  if (!currentThread.IsValid() ||
-      (eCurrentThreadStoppedReason == lldb::eStopReasonInvalid) ||
-      (eCurrentThreadStoppedReason == lldb::eStopReasonNone)) {
-    // Prefer a thread that has just completed its plan over another thread as
-    // current thread
-    lldb::SBThread planThread;
-    lldb::SBThread otherThread;
-    const size_t nThread = process.GetNumThreads();
-    for (MIuint i = 0; i < nThread; i++) {
-      //  GetThreadAtIndex() uses a base 0 index
-      //  GetThreadByIndexID() uses a base 1 index
-      thread = process.GetThreadAtIndex(i);
-      const lldb::StopReason eThreadStopReason = thread.GetStopReason();
-      switch (eThreadStopReason) {
-      case lldb::eStopReasonTrace:
-      case lldb::eStopReasonBreakpoint:
-      case lldb::eStopReasonWatchpoint:
-      case lldb::eStopReasonSignal:
-      case lldb::eStopReasonException:
-        if (!otherThread.IsValid())
-          otherThread = thread;
-        break;
-      case lldb::eStopReasonPlanComplete:
-        if (!planThread.IsValid())
-          planThread = thread;
-        break;
-      case lldb::eStopReasonInvalid:
-      case lldb::eStopReasonNone:
-      default:
-        break;
-      }
-    }
-    if (planThread.IsValid())
-      process.SetSelectedThread(planThread);
-    else if (otherThread.IsValid())
-      process.SetSelectedThread(otherThread);
-    else {
-      if (currentThread.IsValid())
-        thread = currentThread;
-      else
-        thread = process.GetThreadAtIndex(0);
-
-      if (thread.IsValid())
-        process.SetSelectedThread(thread);
-    }
-  } // if( !currentThread.IsValid() || (eCurrentThreadStoppedReason ==
-    // lldb::eStopReasonInvalid) || (eCurrentThreadStoppedReason ==
-  // lldb::eStopReasonNone) )
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Print to stdout "*running,thread-id=\"all\"", "(gdb)".
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateRunning() {
-  CMICmnMIValueConst miValueConst("all");
-  CMICmnMIValueResult miValueResult("thread-id", miValueConst);
-  CMICmnMIOutOfBandRecord miOutOfBandRecord(
-      CMICmnMIOutOfBandRecord::eOutOfBand_Running, miValueResult);
-  bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-  bOk = bOk && CMICmnStreamStdout::WritePrompt();
-
-  return bOk;
-}
-
-//++
-// Details: Print to stdout "=thread-exited,id=\"%ld\",group-id=\"i1\"",
-//                          "=thread-group-exited,id=\"i1\",exit-code=\"0\""),
-//                          "*stopped,reason=\"exited-normally\"",
-//                          "(gdb)"
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::HandleProcessEventStateExited() {
-  const CMIUtilString strId(CMIUtilString::Format("%ld", 1));
-  CMICmnMIValueConst miValueConst(strId);
-  CMICmnMIValueResult miValueResult("id", miValueConst);
-  CMICmnMIOutOfBandRecord miOutOfBandRecord(
-      CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited, miValueResult);
-  CMICmnMIValueConst miValueConst2("i1");
-  CMICmnMIValueResult miValueResult2("group-id", miValueConst2);
-  miOutOfBandRecord.Add(miValueResult2);
-  bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-  if (bOk) {
-    CMICmnMIValueConst miValueConst3("i1");
-    CMICmnMIValueResult miValueResult3("id", miValueConst3);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord2(
-        CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupExited, miValueResult3);
-    CMICmnMIValueConst miValueConst2("0");
-    CMICmnMIValueResult miValueResult2("exit-code", miValueConst2);
-    miOutOfBandRecord2.Add(miValueResult2);
-    bOk = bOk && MiOutOfBandRecordToStdout(miOutOfBandRecord2);
-  }
-  if (bOk) {
-    CMICmnMIValueConst miValueConst4("exited-normally");
-    CMICmnMIValueResult miValueResult4("reason", miValueConst4);
-    CMICmnMIOutOfBandRecord miOutOfBandRecord3(
-        CMICmnMIOutOfBandRecord::eOutOfBand_Stopped, miValueResult4);
-    bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord3);
-  }
-  bOk = bOk && CMICmnStreamStdout::WritePrompt();
-
-  return bOk;
-}
-
-//++
-// Details: Drain all stdout so we don't see any output come after we print our
-// prompts.
-//          The process has stuff waiting for stdout; get it and write it out to
-//          the
-//          appropriate place.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::GetProcessStdout() {
-  CMIUtilString text;
-  std::unique_ptr<char[]> apStdoutBuffer(new char[1024]);
-  lldb::SBProcess process = CMICmnLLDBDebugSessionInfo::Instance()
-                                .GetDebugger()
-                                .GetSelectedTarget()
-                                .GetProcess();
-  while (1) {
-    const size_t nBytes = process.GetSTDOUT(apStdoutBuffer.get(), 1024);
-    text.append(apStdoutBuffer.get(), nBytes);
-
-    while (1) {
-      const size_t nNewLine = text.find('\n');
-      if (nNewLine == std::string::npos)
-        break;
-
-      const CMIUtilString line(text.substr(0, nNewLine + 1));
-      text.erase(0, nNewLine + 1);
-      const bool bEscapeQuotes(true);
-      CMICmnMIValueConst miValueConst(line.Escape(bEscapeQuotes));
-      CMICmnMIOutOfBandRecord miOutOfBandRecord(
-          CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput, miValueConst);
-      const bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-      if (!bOk)
-        return MIstatus::failure;
-    }
-
-    if (nBytes == 0) {
-      if (!text.empty()) {
-        const bool bEscapeQuotes(true);
-        CMICmnMIValueConst miValueConst(text.Escape(bEscapeQuotes));
-        CMICmnMIOutOfBandRecord miOutOfBandRecord(
-            CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput,
-            miValueConst);
-        return MiOutOfBandRecordToStdout(miOutOfBandRecord);
-      }
-      break;
-    }
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Drain all stderr so we don't see any output come after we print our
-// prompts.
-//          The process has stuff waiting for stderr; get it and write it out to
-//          the
-//          appropriate place.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::GetProcessStderr() {
-  CMIUtilString text;
-  std::unique_ptr<char[]> apStderrBuffer(new char[1024]);
-  lldb::SBProcess process = CMICmnLLDBDebugSessionInfo::Instance()
-                                .GetDebugger()
-                                .GetSelectedTarget()
-                                .GetProcess();
-  while (1) {
-    const size_t nBytes = process.GetSTDERR(apStderrBuffer.get(), 1024);
-    text.append(apStderrBuffer.get(), nBytes);
-
-    while (1) {
-      const size_t nNewLine = text.find('\n');
-      if (nNewLine == std::string::npos)
-        break;
-
-      const CMIUtilString line(text.substr(0, nNewLine + 1));
-      const bool bEscapeQuotes(true);
-      CMICmnMIValueConst miValueConst(line.Escape(bEscapeQuotes));
-      CMICmnMIOutOfBandRecord miOutOfBandRecord(
-          CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput, miValueConst);
-      const bool bOk = MiOutOfBandRecordToStdout(miOutOfBandRecord);
-      if (!bOk)
-        return MIstatus::failure;
-    }
-
-    if (nBytes == 0) {
-      if (!text.empty()) {
-        const bool bEscapeQuotes(true);
-        CMICmnMIValueConst miValueConst(text.Escape(bEscapeQuotes));
-        CMICmnMIOutOfBandRecord miOutOfBandRecord(
-            CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput,
-            miValueConst);
-        return MiOutOfBandRecordToStdout(miOutOfBandRecord);
-      }
-      break;
-    }
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Asynchronous event function check for state changes.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::ChkForStateChanges() {
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  if (!sbProcess.IsValid())
-    return MIstatus::success;
-
-  // Check for created threads
-  const MIuint nThread = sbProcess.GetNumThreads();
-  for (MIuint i = 0; i < nThread; i++) {
-    //  GetThreadAtIndex() uses a base 0 index
-    //  GetThreadByIndexID() uses a base 1 index
-    lldb::SBThread thread = sbProcess.GetThreadAtIndex(i);
-    if (!thread.IsValid())
-      continue;
-
-    const MIuint threadIndexID = thread.GetIndexID();
-    const bool bFound =
-        std::find(rSessionInfo.m_vecActiveThreadId.cbegin(),
-                  rSessionInfo.m_vecActiveThreadId.cend(),
-                  threadIndexID) != rSessionInfo.m_vecActiveThreadId.end();
-    if (!bFound) {
-      rSessionInfo.m_vecActiveThreadId.push_back(threadIndexID);
-
-      // Form MI "=thread-created,id=\"%d\",group-id=\"i1\""
-      const CMIUtilString strValue(CMIUtilString::Format("%d", threadIndexID));
-      const CMICmnMIValueConst miValueConst(strValue);
-      const CMICmnMIValueResult miValueResult("id", miValueConst);
-      CMICmnMIOutOfBandRecord miOutOfBand(
-          CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated, miValueResult);
-      const CMICmnMIValueConst miValueConst2("i1");
-      const CMICmnMIValueResult miValueResult2("group-id", miValueConst2);
-      miOutOfBand.Add(miValueResult2);
-      bool bOk = MiOutOfBandRecordToStdout(miOutOfBand);
-      if (!bOk)
-        return MIstatus::failure;
-    }
-  }
-
-  lldb::SBThread currentThread = sbProcess.GetSelectedThread();
-  if (currentThread.IsValid()) {
-    const MIuint currentThreadIndexID = currentThread.GetIndexID();
-    if (rSessionInfo.m_currentSelectedThread != currentThreadIndexID) {
-      rSessionInfo.m_currentSelectedThread = currentThreadIndexID;
-
-      // Form MI "=thread-selected,id=\"%d\""
-      const CMIUtilString strValue(
-          CMIUtilString::Format("%d", currentThreadIndexID));
-      const CMICmnMIValueConst miValueConst(strValue);
-      const CMICmnMIValueResult miValueResult("id", miValueConst);
-      CMICmnMIOutOfBandRecord miOutOfBand(
-          CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected, miValueResult);
-      if (!MiOutOfBandRecordToStdout(miOutOfBand))
-        return MIstatus::failure;
-    }
-  }
-
-  // Check for invalid (removed) threads
-  CMICmnLLDBDebugSessionInfo::VecActiveThreadId_t::iterator it =
-      rSessionInfo.m_vecActiveThreadId.begin();
-  while (it != rSessionInfo.m_vecActiveThreadId.end()) {
-    const MIuint threadIndexID = *it;
-    lldb::SBThread thread = sbProcess.GetThreadByIndexID(threadIndexID);
-    if (!thread.IsValid()) {
-      // Form MI "=thread-exited,id=\"%ld\",group-id=\"i1\""
-      const CMIUtilString strValue(CMIUtilString::Format("%ld", threadIndexID));
-      const CMICmnMIValueConst miValueConst(strValue);
-      const CMICmnMIValueResult miValueResult("id", miValueConst);
-      CMICmnMIOutOfBandRecord miOutOfBand(
-          CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited, miValueResult);
-      const CMICmnMIValueConst miValueConst2("i1");
-      const CMICmnMIValueResult miValueResult2("group-id", miValueConst2);
-      miOutOfBand.Add(miValueResult2);
-      bool bOk = MiOutOfBandRecordToStdout(miOutOfBand);
-      if (!bOk)
-        return MIstatus::failure;
-
-      // Remove current thread from cache and get next
-      it = rSessionInfo.m_vecActiveThreadId.erase(it);
-    } else
-      // Next
-      ++it;
-  }
-
-  return CMICmnStreamStdout::WritePrompt();
-}
-
-//++
-// Details: Take a fully formed MI result record and send to the stdout stream.
-//          Also output to the MI Log file.
-// Type:    Method.
-// Args:    vrMiResultRecord  - (R) MI result record object.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::MiResultRecordToStdout(
-    const CMICmnMIResultRecord &vrMiResultRecord) {
-  return TextToStdout(vrMiResultRecord.GetString());
-}
-
-//++
-// Details: Take a fully formed MI Out-of-band record and send to the stdout
-// stream.
-//          Also output to the MI Log file.
-// Type:    Method.
-// Args:    vrMiOutOfBandRecord - (R) MI Out-of-band record object.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::MiOutOfBandRecordToStdout(
-    const CMICmnMIOutOfBandRecord &vrMiOutOfBandRecord) {
-  return TextToStdout(vrMiOutOfBandRecord.GetString());
-}
-
-//++
-// Details: Take a text data and send to the stdout stream. Also output to the
-// MI Log
-//          file.
-// Type:    Method.
-// Args:    vrTxt   - (R) Text.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::TextToStdout(const CMIUtilString &vrTxt) {
-  return CMICmnStreamStdout::TextToStdout(vrTxt);
-}
-
-//++
-// Details: Take a text data and send to the stderr stream. Also output to the
-// MI Log
-//          file.
-// Type:    Method.
-// Args:    vrTxt   - (R) Text.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBDebuggerHandleEvents::TextToStderr(const CMIUtilString &vrTxt) {
-  return CMICmnStreamStderr::TextToStderr(vrTxt);
-}
-
-//++
-// Details: Initialize the member variables with the signal values in this
-// process
-//          file.
-// Type:    Method.
-// Args:    None
-// Return:  Noen
-// Throws:  None.
-//--
-void CMICmnLLDBDebuggerHandleEvents::InitializeSignals() {
-  if (!m_bSignalsInitialized) {
-    lldb::SBProcess sbProcess =
-        CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-    if (sbProcess.IsValid()) {
-      lldb::SBUnixSignals unix_signals = sbProcess.GetUnixSignals();
-      m_SIGINT = unix_signals.GetSignalNumberFromName("SIGINT");
-      m_SIGSTOP = unix_signals.GetSignalNumberFromName("SIGSTOP");
-      m_SIGSEGV = unix_signals.GetSignalNumberFromName("SIGSEGV");
-      m_SIGTRAP = unix_signals.GetSignalNumberFromName("SIGTRAP");
-      m_bSignalsInitialized = true;
-    }
-  }
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h
deleted file mode 100644
index 378d85e..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.h
+++ /dev/null
@@ -1,99 +0,0 @@
-//===-- MICmnLLDBDebuggerHandleEvents.h -------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MICmnMIValueList.h"
-#include "MICmnMIValueTuple.h"
-#include "MIUtilSingletonBase.h"
-#include "lldb/API/SBEvent.h"
-
-// Declarations:
-class CMICmnLLDBDebugSessionInfo;
-class CMICmnMIResultRecord;
-class CMICmnStreamStdout;
-class CMICmnMIOutOfBandRecord;
-
-//++
-//============================================================================
-// Details: MI class to take LLDB SBEvent objects, filter them and form
-//          MI Out-of-band records from the information inside the event object.
-//          These records are then pushed to stdout.
-//          A singleton class.
-//--
-class CMICmnLLDBDebuggerHandleEvents
-    : public CMICmnBase,
-      public MI::ISingleton<CMICmnLLDBDebuggerHandleEvents> {
-  friend class MI::ISingleton<CMICmnLLDBDebuggerHandleEvents>;
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-  //
-  bool HandleEvent(const lldb::SBEvent &vEvent, bool &vrbHandledEvent);
-
-  // Methods:
-private:
-  /* ctor */ CMICmnLLDBDebuggerHandleEvents();
-  /* ctor */ CMICmnLLDBDebuggerHandleEvents(
-      const CMICmnLLDBDebuggerHandleEvents &);
-  void operator=(const CMICmnLLDBDebuggerHandleEvents &);
-  //
-  bool ChkForStateChanges();
-  bool GetProcessStdout();
-  bool GetProcessStderr();
-  bool HandleEventSBBreakPoint(const lldb::SBEvent &vEvent);
-  bool HandleEventSBBreakpointCmn(const lldb::SBEvent &vEvent);
-  bool HandleEventSBBreakpointAdded(const lldb::SBEvent &vEvent);
-  bool HandleEventSBBreakpointLocationsAdded(const lldb::SBEvent &vEvent);
-  bool HandleEventSBProcess(const lldb::SBEvent &vEvent);
-  bool HandleEventSBTarget(const lldb::SBEvent &vEvent);
-  bool HandleEventSBThread(const lldb::SBEvent &vEvent);
-  bool HandleEventSBThreadBitStackChanged(const lldb::SBEvent &vEvent);
-  bool HandleEventSBThreadSuspended(const lldb::SBEvent &vEvent);
-  bool HandleEventSBCommandInterpreter(const lldb::SBEvent &vEvent);
-  bool HandleProcessEventBroadcastBitStateChanged(const lldb::SBEvent &vEvent);
-  bool HandleProcessEventStateRunning();
-  bool HandleProcessEventStateExited();
-  bool HandleProcessEventStateStopped(const lldb::SBEvent &vrEvent,
-                                      bool &vwrbShouldBrk);
-  bool HandleProcessEventStopReasonTrace();
-  bool HandleProcessEventStopReasonBreakpoint();
-  bool HandleProcessEventStopSignal(const lldb::SBEvent &vrEvent);
-  bool HandleProcessEventStopException();
-  bool HandleProcessEventStateSuspended(const lldb::SBEvent &vEvent);
-  bool HandleTargetEventBroadcastBitModulesLoaded(const lldb::SBEvent &vEvent);
-  bool
-  HandleTargetEventBroadcastBitModulesUnloaded(const lldb::SBEvent &vEvent);
-  bool MiHelpGetModuleInfo(const lldb::SBModule &vModule,
-                           const bool vbWithExtraFields,
-                           CMICmnMIOutOfBandRecord &vwrMiOutOfBandRecord);
-  bool MiHelpGetCurrentThreadFrame(CMICmnMIValueTuple &vwrMiValueTuple);
-  bool MiResultRecordToStdout(const CMICmnMIResultRecord &vrMiResultRecord);
-  bool
-  MiOutOfBandRecordToStdout(const CMICmnMIOutOfBandRecord &vrMiResultRecord);
-  bool MiStoppedAtBreakPoint(const MIuint64 vBrkPtId,
-                             const lldb::SBBreakpoint &vBrkPt);
-  bool TextToStdout(const CMIUtilString &vrTxt);
-  bool TextToStderr(const CMIUtilString &vrTxt);
-  bool UpdateSelectedThread();
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnLLDBDebuggerHandleEvents() override;
-  void InitializeSignals();
-  bool m_bSignalsInitialized;
-  MIuint64 m_SIGINT;
-  MIuint64 m_SIGSTOP;
-  MIuint64 m_SIGSEGV;
-  MIuint64 m_SIGTRAP;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.cpp
deleted file mode 100644
index 14e39cd..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-//===-- MICmnLLDBProxySBValue.cpp -------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include <stdlib.h>
-
-// Third Party Headers:
-#include "lldb/API/SBError.h"
-
-// In-house headers:
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBProxySBValue.h"
-#include "MIUtilString.h"
-
-//++
-// Details: Retrieve the numerical value from the SBValue object. If the
-// function fails
-//          it could indicate the SBValue object does not represent an internal
-//          type.
-// Type:    Static method.
-// Args:    vrValue - (R) The SBValue object to get a value from.
-//          vwValue - (W) The numerical value.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBProxySBValue::GetValueAsUnsigned(const lldb::SBValue &vrValue,
-                                                MIuint64 &vwValue) {
-  lldb::SBValue &rValue = const_cast<lldb::SBValue &>(vrValue);
-  bool bCompositeType = true;
-  MIuint64 nFailValue = 0;
-  MIuint64 nValue = rValue.GetValueAsUnsigned(nFailValue);
-  if (nValue == nFailValue) {
-    nFailValue = 5; // Some arbitrary number
-    nValue = rValue.GetValueAsUnsigned(nFailValue);
-    if (nValue != nFailValue) {
-      bCompositeType = false;
-      vwValue = nValue;
-    }
-  } else {
-    bCompositeType = false;
-    vwValue = nValue;
-  }
-
-  return (bCompositeType ? MIstatus::failure : MIstatus::success);
-}
-
-//++
-// Details: Retrieve the numerical value from the SBValue object. If the
-// function fails
-//          it could indicate the SBValue object does not represent an internal
-//          type.
-// Type:    Static method.
-// Args:    vrValue - (R) The SBValue object to get a value from.
-//          vwValue - (W) The numerical value.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBProxySBValue::GetValueAsSigned(const lldb::SBValue &vrValue,
-                                              MIint64 &vwValue) {
-  lldb::SBValue &rValue = const_cast<lldb::SBValue &>(vrValue);
-  bool bCompositeType = true;
-  MIuint64 nFailValue = 0;
-  MIuint64 nValue = rValue.GetValueAsSigned(nFailValue);
-  if (nValue == nFailValue) {
-    nFailValue = 5; // Some arbitrary number
-    nValue = rValue.GetValueAsSigned(nFailValue);
-    if (nValue != nFailValue) {
-      bCompositeType = false;
-      vwValue = nValue;
-    }
-  } else {
-    bCompositeType = false;
-    vwValue = nValue;
-  }
-
-  return (bCompositeType ? MIstatus::failure : MIstatus::success);
-}
-
-//++
-// Details: Retrieve the NUL terminated string from the SBValue object if it of
-// the type
-//          unsigned char *.
-// Type:    Static method.
-// Args:    vrValue     - (R) The SBValue object to get a value from.
-//          vwCString   - (W) The text data '\0' terminated.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed, not suitable type.
-// Throws:  None.
-//--
-bool CMICmnLLDBProxySBValue::GetCString(const lldb::SBValue &vrValue,
-                                        CMIUtilString &vwCString) {
-  lldb::SBValue &rValue = const_cast<lldb::SBValue &>(vrValue);
-  const char *pCType = rValue.GetTypeName();
-  if (pCType == nullptr)
-    return MIstatus::failure;
-
-  const char *pType = "unsigned char *";
-  if (!CMIUtilString::Compare(pCType, pType))
-    return MIstatus::failure;
-
-  const CMIUtilString strAddr(rValue.GetValue());
-  MIint64 nNum = 0;
-  if (!strAddr.ExtractNumber(nNum))
-    return MIstatus::failure;
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  lldb::SBProcess sbProcess = rSessionInfo.GetProcess();
-  MIuint nBufferSize = 64;
-  bool bNeedResize = false;
-  char *pBuffer = static_cast<char *>(::malloc(nBufferSize));
-  do {
-    lldb::SBError error;
-    const size_t nReadSize = sbProcess.ReadCStringFromMemory(
-        (lldb::addr_t)nNum, pBuffer, nBufferSize, error);
-    if (nReadSize == (nBufferSize - 1)) {
-      bNeedResize = true;
-      nBufferSize = nBufferSize << 1;
-      pBuffer = static_cast<char *>(::realloc(pBuffer, nBufferSize));
-    } else
-      bNeedResize = false;
-  } while (bNeedResize);
-
-  vwCString = pBuffer;
-  free((void *)pBuffer);
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.h
deleted file mode 100644
index 4852b60..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBProxySBValue.h
+++ /dev/null
@@ -1,34 +0,0 @@
-//===-- MICmnLLDBProxySBValue.h ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third Party Headers:
-#include "lldb/API/SBValue.h"
-
-// In-house headers:
-#include "MIDataTypes.h"
-
-// Declarations:
-class CMIUtilString;
-
-//++
-//============================================================================
-// Details: MI proxy wrapper class to lldb::SBValue. The class provides
-// functionality
-//          to assist in the use of SBValue's particular function usage.
-//--
-class CMICmnLLDBProxySBValue {
-  // Statics:
-public:
-  static bool GetValueAsSigned(const lldb::SBValue &vrValue, MIint64 &vwValue);
-  static bool GetValueAsUnsigned(const lldb::SBValue &vrValue,
-                                 MIuint64 &vwValue);
-  static bool GetCString(const lldb::SBValue &vrValue,
-                         CMIUtilString &vwCString);
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
deleted file mode 100644
index 0e7df52..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.cpp
+++ /dev/null
@@ -1,497 +0,0 @@
-//===-- MICmnLLDBUtilSBValue.cpp --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers:
-#include "lldb/API/SBTypeSummary.h"
-#include <cinttypes>
-
-// In-house headers:
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBUtilSBValue.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnMIValueTuple.h"
-#include "MIUtilString.h"
-
-static const char *kUnknownValue = "??";
-static const char *kUnresolvedCompositeValue = "{...}";
-
-//++
-// Details: CMICmnLLDBUtilSBValue constructor.
-// Type:    Method.
-// Args:    vrValue             - (R) The LLDB value object.
-//          vbHandleCharType    - (R) True = Yes return text molding to char
-//          type,
-//                                    False = just return data.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBUtilSBValue::CMICmnLLDBUtilSBValue(
-    const lldb::SBValue &vrValue, const bool vbHandleCharType /* = false */,
-    const bool vbHandleArrayType /* = true */)
-    : m_rValue(const_cast<lldb::SBValue &>(vrValue)),
-      m_bHandleCharType(vbHandleCharType),
-      m_bHandleArrayType(vbHandleArrayType) {
-  m_bValidSBValue = m_rValue.IsValid();
-}
-
-//++
-// Details: CMICmnLLDBUtilSBValue destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLLDBUtilSBValue::~CMICmnLLDBUtilSBValue() {}
-
-//++
-// Details: Retrieve from the LLDB SB Value object the name of the variable. If
-// the name
-//          is invalid (or the SBValue object invalid) then "??" is returned.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString   - Name of the variable or "??" for unknown.
-// Throws:  None.
-//--
-CMIUtilString CMICmnLLDBUtilSBValue::GetName() const {
-  const char *pName = m_bValidSBValue ? m_rValue.GetName() : nullptr;
-  const CMIUtilString text((pName != nullptr) ? pName : CMIUtilString());
-
-  return text;
-}
-
-//++
-// Details: Retrieve from the LLDB SB Value object the value of the variable
-// described in
-//          text. If the value is invalid (or the SBValue object invalid) then
-//          "??" is
-//          returned.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString   - Text description of the variable's value or "??".
-// Throws:  None.
-//--
-CMIUtilString CMICmnLLDBUtilSBValue::GetValue(
-    const bool vbExpandAggregates /* = false */) const {
-  if (!m_bValidSBValue)
-    return kUnknownValue;
-
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  bool bPrintExpandAggregates = false;
-  bPrintExpandAggregates = rSessionInfo.SharedDataRetrieve<bool>(
-                               rSessionInfo.m_constStrPrintExpandAggregates,
-                               bPrintExpandAggregates) &&
-                           bPrintExpandAggregates;
-
-  const bool bHandleArrayTypeAsSimple =
-      m_bHandleArrayType && !vbExpandAggregates && !bPrintExpandAggregates;
-  CMIUtilString value;
-  const bool bIsSimpleValue = GetSimpleValue(bHandleArrayTypeAsSimple, value);
-  if (bIsSimpleValue)
-    return value;
-
-  if (!vbExpandAggregates && !bPrintExpandAggregates)
-    return kUnresolvedCompositeValue;
-
-  bool bPrintAggregateFieldNames = false;
-  bPrintAggregateFieldNames =
-      !rSessionInfo.SharedDataRetrieve<bool>(
-          rSessionInfo.m_constStrPrintAggregateFieldNames,
-          bPrintAggregateFieldNames) ||
-      bPrintAggregateFieldNames;
-
-  CMICmnMIValueTuple miValueTuple;
-  const bool bOk = GetCompositeValue(bPrintAggregateFieldNames, miValueTuple);
-  if (!bOk)
-    return kUnknownValue;
-
-  value = miValueTuple.GetString();
-  return value;
-}
-
-//++
-// Details: Retrieve from the LLDB SB Value object the value of the variable
-// described in
-//          text if it has a simple format (not composite).
-// Type:    Method.
-// Args:    vwrValue          - (W) The SBValue in a string format.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::GetSimpleValue(const bool vbHandleArrayType,
-                                           CMIUtilString &vwrValue) const {
-  const MIuint nChildren = m_rValue.GetNumChildren();
-  if (nChildren == 0) {
-    vwrValue = GetValueSummary(!m_bHandleCharType && IsCharType(), kUnknownValue);
-    return MIstatus::success;
-  } else if (IsPointerType()) {
-    vwrValue =
-        GetValueSummary(!m_bHandleCharType && IsPointeeCharType(), kUnknownValue);
-    return MIstatus::success;
-  } else if (IsArrayType()) {
-    CMICmnLLDBDebugSessionInfo &rSessionInfo(
-        CMICmnLLDBDebugSessionInfo::Instance());
-    bool bPrintCharArrayAsString = false;
-    bPrintCharArrayAsString = rSessionInfo.SharedDataRetrieve<bool>(
-                                  rSessionInfo.m_constStrPrintCharArrayAsString,
-                                  bPrintCharArrayAsString) &&
-                              bPrintCharArrayAsString;
-    if (bPrintCharArrayAsString && m_bHandleCharType &&
-        IsFirstChildCharType()) {
-      vwrValue = GetValueSummary(false);
-      return MIstatus::success;
-    } else if (vbHandleArrayType) {
-      vwrValue = CMIUtilString::Format("[%u]", nChildren);
-      return MIstatus::success;
-    }
-  } else {
-    // Treat composite value which has registered summary
-    // (for example with AddCXXSummary) as simple value
-    vwrValue = GetValueSummary(false);
-    if (!vwrValue.empty())
-      return MIstatus::success;
-  }
-
-  // Composite variable type i.e. struct
-  return MIstatus::failure;
-}
-
-bool CMICmnLLDBUtilSBValue::GetCompositeValue(
-    const bool vbPrintFieldNames, CMICmnMIValueTuple &vwrMiValueTuple,
-    const MIuint vnDepth /* = 1 */) const {
-  const MIuint nMaxDepth = 10;
-  const MIuint nChildren = m_rValue.GetNumChildren();
-  for (MIuint i = 0; i < nChildren; ++i) {
-    const lldb::SBValue member = m_rValue.GetChildAtIndex(i);
-    const CMICmnLLDBUtilSBValue utilMember(member, m_bHandleCharType,
-                                           m_bHandleArrayType);
-    const bool bHandleArrayTypeAsSimple = false;
-    CMIUtilString value;
-    const bool bIsSimpleValue =
-        utilMember.GetSimpleValue(bHandleArrayTypeAsSimple, value);
-    if (bIsSimpleValue) {
-      // OK. Value is simple (not composite) and was successfully got
-    } else if (vnDepth < nMaxDepth) {
-      // Need to get value from composite type
-      CMICmnMIValueTuple miValueTuple;
-      const bool bOk = utilMember.GetCompositeValue(vbPrintFieldNames,
-                                                    miValueTuple, vnDepth + 1);
-      if (!bOk)
-        // Can't obtain composite type
-        value = kUnknownValue;
-      else
-        // OK. Value is composite and was successfully got
-        value = miValueTuple.GetString();
-    } else {
-      // Need to get value from composite type, but vnMaxDepth is reached
-      value = kUnresolvedCompositeValue;
-    }
-    const bool bNoQuotes = true;
-    const CMICmnMIValueConst miValueConst(value, bNoQuotes);
-    if (vbPrintFieldNames) {
-      const bool bUseSpacing = true;
-      const CMICmnMIValueResult miValueResult(utilMember.GetName(),
-                                              miValueConst, bUseSpacing);
-      vwrMiValueTuple.Add(miValueResult, bUseSpacing);
-    } else {
-      const bool bUseSpacing = false;
-      vwrMiValueTuple.Add(miValueConst, bUseSpacing);
-    }
-  }
-
-  return MIstatus::success;
-}
-
-// Returns value or value + summary, depending on valueOnly parameter value.
-// If result is an empty string returns failVal.
-CMIUtilString
-CMICmnLLDBUtilSBValue::GetValueSummary(bool valueOnly,
-                                       const CMIUtilString &failVal) const {
-  if (!m_rValue.IsValid())
-    return failVal;
-
-  CMIUtilString value, valSummary;
-  const char *c_value = m_rValue.GetValue();
-  if (valueOnly)
-    return c_value == nullptr ? failVal : c_value;
-
-  const char *c_summary = m_rValue.GetSummary();
-  if (c_value)
-    value = c_value;
-  else if (c_summary == nullptr)
-    return failVal;
-
-  if (c_summary && c_summary[0]) {
-    valSummary = c_summary;
-    lldb::SBTypeSummary summary = m_rValue.GetTypeSummary();
-    if (summary.IsValid() && summary.DoesPrintValue(m_rValue) &&
-        !value.empty()) {
-      valSummary.insert(0, value + " ");
-    }
-    return valSummary;
-  }
-  // no summary - return just value
-  return value;
-}
-
-//++
-// Details: Check that basic type is a char type. Char type can be signed or
-// unsigned.
-// Type:    Static.
-// Args:    eType   - type to check
-// Return:  bool    - True = Yes is a char type, false = some other type.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsCharBasicType(lldb::BasicType eType) {
-  switch (eType) {
-  case lldb::eBasicTypeChar:
-  case lldb::eBasicTypeSignedChar:
-  case lldb::eBasicTypeUnsignedChar:
-  case lldb::eBasicTypeChar16:
-  case lldb::eBasicTypeChar32:
-    return true;
-  default:
-    return false;
-  }
-}
-
-//++
-// Details: Retrieve the flag stating whether this value object is a char type
-// or some
-//          other type. Char type can be signed or unsigned.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Yes is a char type, false = some other type.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsCharType() const {
-  const lldb::BasicType eType = m_rValue.GetType().GetBasicType();
-  return IsCharBasicType(eType);
-}
-
-//++
-// Details: Retrieve the flag stating whether first child value object of *this
-// object is
-//          a char type or some other type. Returns false if there are not
-//          children. Char
-//          type can be signed or unsigned.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Yes is a char type, false = some other type.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsFirstChildCharType() const {
-  const MIuint nChildren = m_rValue.GetNumChildren();
-
-  // Is it a basic type
-  if (nChildren == 0)
-    return false;
-
-  const lldb::SBValue member = m_rValue.GetChildAtIndex(0);
-  const CMICmnLLDBUtilSBValue utilValue(member);
-  return utilValue.IsCharType();
-}
-
-//++
-// Details: Retrieve the flag stating whether pointee object of *this object is
-//          a char type or some other type. Returns false if there are not
-//          children. Char
-//          type can be signed or unsigned.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Yes is a char type, false = some other type.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsPointeeCharType() const {
-  const MIuint nChildren = m_rValue.GetNumChildren();
-
-  // Is it a basic type
-  if (nChildren == 0)
-    return false;
-
-  const lldb::BasicType eType =
-      m_rValue.GetType().GetPointeeType().GetBasicType();
-  return IsCharBasicType(eType);
-}
-
-//++
-// Details: Retrieve the flag stating whether this value object is a integer
-// type or some
-//          other type. Char type can be signed or unsigned and short or
-//          long/very long.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Yes is a integer type, false = some other type.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsIntegerType() const {
-  const lldb::BasicType eType = m_rValue.GetType().GetBasicType();
-  return ((eType == lldb::eBasicTypeShort) ||
-          (eType == lldb::eBasicTypeUnsignedShort) ||
-          (eType == lldb::eBasicTypeInt) ||
-          (eType == lldb::eBasicTypeUnsignedInt) ||
-          (eType == lldb::eBasicTypeLong) ||
-          (eType == lldb::eBasicTypeUnsignedLong) ||
-          (eType == lldb::eBasicTypeLongLong) ||
-          (eType == lldb::eBasicTypeUnsignedLongLong) ||
-          (eType == lldb::eBasicTypeInt128) ||
-          (eType == lldb::eBasicTypeUnsignedInt128));
-}
-
-//++
-// Details: Retrieve the flag stating whether this value object is a pointer
-// type or some
-//          other type.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Yes is a pointer type, false = some other type.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsPointerType() const {
-  return m_rValue.GetType().IsPointerType();
-}
-
-//++
-// Details: Retrieve the flag stating whether this value object is an array type
-// or some
-//          other type.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Yes is an array type, false = some other type.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsArrayType() const {
-  return m_rValue.GetType().IsArrayType();
-}
-
-//++
-// Details: Retrieve the C string data of value object by read the memory where
-// the
-//          variable is held.
-// Type:    Method.
-// Args:    vrValue         - (R) LLDB SBValue variable object.
-// Return:  CMIUtilString   - Text description of the variable's value.
-// Throws:  None.
-//--
-template <typename charT>
-CMIUtilString
-CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory(lldb::SBValue &vrValue,
-                                                 const MIuint vnMaxLen) const {
-  std::string result;
-  lldb::addr_t addr = vrValue.GetLoadAddress(),
-               end_addr = addr + vnMaxLen * sizeof(charT);
-  lldb::SBProcess process = CMICmnLLDBDebugSessionInfo::Instance().GetProcess();
-  lldb::SBError error;
-  while (addr < end_addr) {
-    charT ch;
-    const MIuint64 nReadBytes =
-        process.ReadMemory(addr, &ch, sizeof(ch), error);
-    if (error.Fail() || nReadBytes != sizeof(ch))
-      return kUnknownValue;
-    else if (ch == 0)
-      break;
-    result.append(
-        CMIUtilString::ConvertToPrintableASCII(ch, true /* bEscapeQuotes */));
-    addr += sizeof(ch);
-  }
-
-  return result;
-}
-
-//++
-// Details: Retrieve the state of the value object's name.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = yes name is indeterminate, false = name is valid.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsNameUnknown() const {
-  const CMIUtilString name(GetName());
-  return (name == kUnknownValue);
-}
-
-//++
-// Details: Retrieve the state of the value object's value data.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = yes value is indeterminate, false = value valid.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsValueUnknown() const {
-  const CMIUtilString value(GetValue());
-  return (value == kUnknownValue);
-}
-
-//++
-// Details: Retrieve the value object's type name if valid.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString   - The type name or "??".
-// Throws:  None.
-//--
-CMIUtilString CMICmnLLDBUtilSBValue::GetTypeName() const {
-  const char *pName = m_bValidSBValue ? m_rValue.GetTypeName() : nullptr;
-  const CMIUtilString text((pName != nullptr) ? pName : kUnknownValue);
-
-  return text;
-}
-
-//++
-// Details: Retrieve the value object's display type name if valid.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString   - The type name or "??".
-// Throws:  None.
-//--
-CMIUtilString CMICmnLLDBUtilSBValue::GetTypeNameDisplay() const {
-  const char *pName = m_bValidSBValue ? m_rValue.GetDisplayTypeName() : nullptr;
-  const CMIUtilString text((pName != nullptr) ? pName : kUnknownValue);
-
-  return text;
-}
-
-//++
-// Details: Retrieve whether the value object's is valid or not.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = valid, false = not valid.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsValid() const { return m_bValidSBValue; }
-
-//++
-// Details: Retrieve the value object' has a name. A value object can be valid
-// but still
-//          have no name which suggest it is not a variable.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = valid, false = not valid.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::HasName() const {
-  bool bHasAName = false;
-
-  const char *pName = m_bValidSBValue ? m_rValue.GetDisplayTypeName() : nullptr;
-  if (pName != nullptr) {
-    bHasAName = (CMIUtilString(pName).length() > 0);
-  }
-
-  return bHasAName;
-}
-
-//++
-// Details: Determine if the value object' represents a LLDB variable i.e. "$0".
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = Yes LLDB variable, false = no.
-// Throws:  None.
-//--
-bool CMICmnLLDBUtilSBValue::IsLLDBVariable() const {
-  return (GetName().at(0) == '$');
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.h
deleted file mode 100644
index 6804402..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLLDBUtilSBValue.h
+++ /dev/null
@@ -1,77 +0,0 @@
-//===-- MICmnLLDBUtilSBValue.h ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third Party Headers:
-#include "lldb/API/SBValue.h"
-
-// In-house headers:
-#include "MICmnMIValueTuple.h"
-#include "MIDataTypes.h"
-
-// Declarations:
-class CMIUtilString;
-
-//++
-//============================================================================
-// Details: Utility helper class to lldb::SBValue. Using a lldb::SBValue extract
-//          value object information to help form verbose debug information.
-//--
-class CMICmnLLDBUtilSBValue {
-  // Methods:
-public:
-  /* ctor */ CMICmnLLDBUtilSBValue(const lldb::SBValue &vrValue,
-                                   const bool vbHandleCharType = false,
-                                   const bool vbHandleArrayType = true);
-  /* dtor */ ~CMICmnLLDBUtilSBValue();
-  //
-  CMIUtilString GetName() const;
-  CMIUtilString GetValue(const bool vbExpandAggregates = false) const;
-  CMIUtilString GetTypeName() const;
-  CMIUtilString GetTypeNameDisplay() const;
-  bool IsCharType() const;
-  bool IsFirstChildCharType() const;
-  bool IsPointeeCharType() const;
-  bool IsIntegerType() const;
-  bool IsPointerType() const;
-  bool IsArrayType() const;
-  bool IsLLDBVariable() const;
-  bool IsNameUnknown() const;
-  bool IsValueUnknown() const;
-  bool IsValid() const;
-  bool HasName() const;
-
-  // Methods:
-private:
-  template <typename charT>
-  CMIUtilString
-  ReadCStringFromHostMemory(lldb::SBValue &vrValue,
-                            const MIuint vnMaxLen = UINT32_MAX) const;
-  bool GetSimpleValue(const bool vbHandleArrayType,
-                      CMIUtilString &vrValue) const;
-  bool GetCompositeValue(const bool vbPrintFieldNames,
-                         CMICmnMIValueTuple &vwrMiValueTuple,
-                         const MIuint vnDepth = 1) const;
-  CMIUtilString
-  GetValueSummary(bool valueOnly,
-                  const CMIUtilString &failVal = CMIUtilString()) const;
-
-  // Statics:
-private:
-  static bool IsCharBasicType(lldb::BasicType eType);
-
-  // Attributes:
-private:
-  lldb::SBValue &m_rValue;
-  bool m_bValidSBValue; // True = SBValue is a valid object, false = not valid.
-  bool m_bHandleCharType;  // True = Yes return text molding to char type, false
-                           // = just return data.
-  bool m_bHandleArrayType; // True = Yes return special stub for array type,
-                           // false = just return data.
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLog.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnLog.cpp
deleted file mode 100644
index fc4c314..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLog.cpp
+++ /dev/null
@@ -1,330 +0,0 @@
-//===-- MICmnLog.cpp --------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnLog.h"
-#include "MICmnLogMediumFile.h"
-#include "MICmnResources.h"
-#include "MIDriverMgr.h"
-#include "MIUtilDateTimeStd.h"
-
-//++
-// Details: CMICmnLog constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLog::CMICmnLog() : m_bEnabled(false), m_bInitializingATM(false) {
-  // Do not use this constructor, use Initialize()
-}
-
-//++
-// Details: CMICmnLog destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLog::~CMICmnLog() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this Logger.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLog::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  ClrErrorDescription();
-
-  // Mediums set inside because explicitly initing in MIDriverMain.cpp causes
-  // compile errors with CAtlFile
-  CMICmnLogMediumFile &rFileLog(CMICmnLogMediumFile::Instance());
-  bool bOk = RegisterMedium(rFileLog);
-  if (bOk) {
-    // Set the Log trace file's header
-    const CMIUtilString &rCR(rFileLog.GetLineReturn());
-    CMIUtilDateTimeStd date;
-    CMIUtilString msg;
-    msg = CMIUtilString::Format(
-        "%s\n", CMIDriverMgr::Instance().GetAppVersion().c_str());
-    CMIUtilString logHdr(msg);
-    msg = CMIUtilString::Format(MIRSRC(IDS_LOG_MSG_CREATION_DATE),
-                                date.GetDate().c_str(), date.GetTime().c_str(),
-                                rCR.c_str());
-    logHdr += msg;
-    msg =
-        CMIUtilString::Format(MIRSRC(IDS_LOG_MSG_FILE_LOGGER_PATH),
-                              rFileLog.GetFileNamePath().c_str(), rCR.c_str());
-    logHdr += msg;
-
-    bOk = rFileLog.SetHeaderTxt(logHdr);
-
-    // Note log file medium's status is not available until we write at least
-    // once to the file (so just write the title 1st line)
-    m_bInitializingATM = true;
-    CMICmnLog::WriteLog(".");
-    if (!rFileLog.IsOk()) {
-      const CMIUtilString msg(
-          CMIUtilString::Format(MIRSRC(IDS_LOG_ERR_FILE_LOGGER_DISABLED),
-                                rFileLog.GetErrorDescription().c_str()));
-      CMICmnLog::WriteLog(msg);
-    }
-    m_bInitializingATM = false;
-  }
-
-  m_bInitialized = bOk;
-
-  return bOk;
-}
-
-//++
-// Details: Release resources for *this Logger.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLog::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  ClrErrorDescription();
-
-  const bool bOk = UnregisterMediumAll();
-
-  m_bInitialized = bOk;
-
-  return bOk;
-}
-
-//++
-// Details: Enabled or disable *this Logger from writing any data to registered
-// clients.
-// Type:    Method.
-// Args:    vbYes   - (R) True = Logger enabled, false = disabled.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLog::SetEnabled(const bool vbYes) {
-  m_bEnabled = vbYes;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve state whether *this Logger is enabled writing data to
-// registered clients.
-// Type:    Method.
-// Args:    None.
-// Return:  True = Logger enable.
-//          False = disabled.
-// Throws:  None.
-//--
-bool CMICmnLog::GetEnabled() const { return m_bEnabled; }
-
-//++
-// Details: Unregister all the Mediums registered with *this Logger.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLog::UnregisterMediumAll() {
-  MapMediumToName_t::const_iterator it = m_mapMediumToName.begin();
-  for (; it != m_mapMediumToName.end(); it++) {
-    IMedium *pMedium = (*it).first;
-    pMedium->Shutdown();
-  }
-
-  m_mapMediumToName.clear();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Register a Medium with *this Logger.
-// Type:    Method.
-// Args:    vrMedium    - (R) The medium to register.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLog::RegisterMedium(const IMedium &vrMedium) {
-  if (HaveMediumAlready(vrMedium))
-    return MIstatus::success;
-
-  IMedium *pMedium = const_cast<IMedium *>(&vrMedium);
-  if (!pMedium->Initialize()) {
-    const CMIUtilString &rStrMedName(pMedium->GetName());
-    const CMIUtilString &rStrMedErr(pMedium->GetError());
-    SetErrorDescription(CMIUtilString::Format(MIRSRC(IDS_LOG_MEDIUM_ERR_INIT),
-                                              rStrMedName.c_str(),
-                                              rStrMedErr.c_str()));
-    return MIstatus::failure;
-  }
-
-  MapPairMediumToName_t pr(pMedium, pMedium->GetName());
-  m_mapMediumToName.insert(pr);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Query the Logger to see if a medium is already registered.
-// Type:    Method.
-// Args:    vrMedium    - (R) The medium to query.
-// Return:  True - registered.
-//          False - not registered.
-// Throws:  None.
-//--
-bool CMICmnLog::HaveMediumAlready(const IMedium &vrMedium) const {
-  IMedium *pMedium = const_cast<IMedium *>(&vrMedium);
-  const MapMediumToName_t::const_iterator it = m_mapMediumToName.find(pMedium);
-  return it != m_mapMediumToName.end();
-}
-
-//++
-// Details: Unregister a medium from the Logger.
-// Type:    Method.
-// Args:    vrMedium    - (R) The medium to unregister.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLog::UnregisterMedium(const IMedium &vrMedium) {
-  IMedium *pMedium = const_cast<IMedium *>(&vrMedium);
-  m_mapMediumToName.erase(pMedium);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: The callee client uses this function to write to the Logger. The
-// data to be
-//          written is given out to all the mediums registered. The verbosity
-//          type parameter
-//          indicates to the medium(s) the type of data or message given to it.
-//          The medium has
-//          modes of verbosity and depending on the verbosity set determines
-//          which writes
-//          go in to the logger.
-//          The logger must be initialized successfully before a write to any
-//          registered
-//          can be carried out.
-// Type:    Method.
-// Args:    vData       - (R) The data to write to the logger.
-//          veType      - (R) Verbosity type.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLog::Write(const CMIUtilString &vData, const ELogVerbosity veType) {
-  if (!m_bInitialized && !m_bInitializingATM)
-    return MIstatus::success;
-  if (m_bRecursiveDive)
-    return MIstatus::success;
-  if (!m_bEnabled)
-    return MIstatus::success;
-
-  m_bRecursiveDive = true;
-
-  MIuint cnt = 0;
-  MIuint cntErr = 0;
-  {
-    MapMediumToName_t::const_iterator it = m_mapMediumToName.begin();
-    while (it != m_mapMediumToName.end()) {
-      IMedium *pMedium = (*it).first;
-      const CMIUtilString &rNameMedium = (*it).second;
-      MIunused(rNameMedium);
-      if (pMedium->Write(vData, veType))
-        cnt++;
-      else
-        cntErr++;
-
-      // Next
-      ++it;
-    }
-  }
-
-  bool bOk = MIstatus::success;
-  const MIuint mediumCnt = m_mapMediumToName.size();
-  if ((cnt == 0) && (mediumCnt > 0)) {
-    SetErrorDescription(MIRSRC(IDS_LOG_MEDIUM_ERR_WRITE_ANY));
-    bOk = MIstatus::failure;
-  }
-  if (bOk && (cntErr != 0)) {
-    SetErrorDescription(MIRSRC(IDS_LOG_MEDIUM_ERR_WRITE_MEDIUMFAIL));
-    bOk = MIstatus::failure;
-  }
-
-  m_bRecursiveDive = false;
-
-  return bOk;
-}
-
-//++
-// Details: Short cut function call to write only to the Log file.
-//          The logger must be initialized successfully before a write to any
-//          registered
-//          can be carried out.
-// Type:    Static.
-// Args:    vData   - (R) The data to write to the logger.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLog::WriteLog(const CMIUtilString &vData) {
-  return CMICmnLog::Instance().Write(vData, CMICmnLog::eLogVerbosity_Log);
-}
-
-//++
-// Details: Retrieve a string detailing the last error.
-// Type:    Method.
-// Args:    None,
-// Return:  CMIUtilString.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnLog::GetErrorDescription() const {
-  return m_strMILastErrorDescription;
-}
-
-//++
-// Details: Set the internal description of the last error.
-// Type:    Method.
-// Args:    (R) String containing a description of the last error.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnLog::SetErrorDescription(const CMIUtilString &vrTxt) const {
-  m_strMILastErrorDescription = vrTxt;
-}
-
-//++
-// Details: Clear the last error.
-// Type:    None.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnLog::ClrErrorDescription() const {
-  m_strMILastErrorDescription = CMIUtilString("");
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLog.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnLog.h
deleted file mode 100644
index 909dc61..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLog.h
+++ /dev/null
@@ -1,138 +0,0 @@
-//===-- MICmnLog.h ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include <map>
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI common code implementation class. Handle application trace
-//          activity logging. Medium objects derived from the Medium abstract
-///          class are registered with this logger. The function Write is called
-//          by a client callee to log information. That information is given to
-//          registered relevant mediums. The medium file is registered during
-//          *this logs initialization so it will always have a file log for the
-//          application.
-//          Singleton class.
-//--
-class CMICmnLog : public MI::ISingleton<CMICmnLog> {
-  friend MI::ISingleton<CMICmnLog>;
-
-  // Enumeration:
-public:
-  //++
-  // Description: Data given to the Logger can be of several types. The Logger
-  // can be
-  //              set at levels of verbosity. Can determine how data is sent to
-  //              one or
-  //              mediums.
-  //--
-  enum ELogVerbosity { // Descriptions of what 'may' occur, depends ultimately
-                       // on the medium itself. See the medium.
-    eLogVerbosity_FnTrace = 0x00000004,   // Debug function stack call tracing
-    eLogVerbosity_DbgOp = 0x00000008,     // Send a string to the debugger for
-                                          // display (not implemented)
-    eLogVerbosity_ClientMsg = 0x00000010, // A client using MI can insert
-                                          // messages into the log (not
-                                          // implemented)
-    eLogVerbosity_Log = 0x00000020        // Send to only the Log file.
-  };
-
-  // Class:
-public:
-  //++
-  // Description: Register a medium derived from this interface which will be
-  //              called writing log trace data i.e. a file or a console.
-  //              Medium objects registered are not owned by *this logger.
-  //--
-  class IMedium {
-  public:
-    virtual bool Initialize() = 0;
-    virtual const CMIUtilString &GetName() const = 0;
-    virtual bool Write(const CMIUtilString &vData,
-                       const ELogVerbosity veType) = 0;
-    virtual const CMIUtilString &GetError() const = 0;
-    virtual bool Shutdown() = 0;
-
-    // Not part of the interface, ignore
-    // AD:  This virtual destructor seems to hit a bug in the stdlib
-    //      where vector delete is incorrectly called.  Workaround is
-    //      to comment this out while I investigate.
-    /* dtor */ virtual ~IMedium() {}
-  };
-
-  // Statics:
-public:
-  static bool WriteLog(const CMIUtilString &vData);
-
-  // Methods:
-public:
-  bool RegisterMedium(const IMedium &vrMedium);
-  bool UnregisterMedium(const IMedium &vrMedium);
-  bool Write(const CMIUtilString &vData, const ELogVerbosity veType);
-  bool SetEnabled(const bool vbYes);
-  bool GetEnabled() const;
-
-  // MI common object handling - duplicate of CMICmnBase functions, necessary
-  // for LINUX build
-  // Done to stop locking on object construction init circular dependency.
-  const CMIUtilString &GetErrorDescription() const;
-  void SetErrorDescription(const CMIUtilString &vrTxt) const;
-  void ClrErrorDescription() const;
-
-  // Overridden:
-public:
-  // From MI::ISingleton
-  bool Initialize() override;
-  bool Shutdown() override;
-
-  // Methods:
-private:
-  /* ctor */ CMICmnLog();
-  /* ctor */ CMICmnLog(const CMICmnLog &);
-  void operator=(const CMICmnLog &);
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnLog() override;
-
-  // Typedef:
-private:
-  typedef std::map<IMedium *, CMIUtilString> MapMediumToName_t;
-  typedef std::pair<IMedium *, CMIUtilString> MapPairMediumToName_t;
-
-  // Methods:
-private:
-  bool HaveMediumAlready(const IMedium &vrMedium) const;
-  bool UnregisterMediumAll();
-
-  // Attributes:
-private:
-  bool m_bRecursiveDive; // True = yes recursive, false = no
-  MapMediumToName_t m_mapMediumToName;
-  bool m_bEnabled; // True = Logger enabled for writing to mediums, false =
-                   // medium not written to
-  bool m_bInitializingATM; // True = Yes in process of initing *this logger,
-                           // false = not initing
-  //
-  // MI common object handling - duplicate of CMICmnBase functions, necessary
-  // for LINUX build
-  bool m_bInitialized; // True = yes successfully initialized, false = no yet or
-                       // failed
-  mutable CMIUtilString m_strMILastErrorDescription;
-  MIint m_clientUsageRefCnt; // Count of client using *this object so not
-                             // shutdown() object to early
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLogMediumFile.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnLogMediumFile.cpp
deleted file mode 100644
index 7fbe28f..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLogMediumFile.cpp
+++ /dev/null
@@ -1,385 +0,0 @@
-//===-- MICmnLogMediumFile.cpp ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnLogMediumFile.h"
-#include "MICmnResources.h"
-
-//++
-// Details: CMICmnLogMediumFile constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLogMediumFile::CMICmnLogMediumFile()
-    : m_constThisMediumName(MIRSRC(IDS_MEDIUMFILE_NAME)),
-      m_constMediumFileNameFormat("lldb-mi-%s.log"),
-      m_strMediumFileName(MIRSRC(IDS_MEDIUMFILE_ERR_INVALID_PATH)),
-      m_strMediumFileDirectory("."),
-      m_fileNamePath(MIRSRC(IDS_MEDIUMFILE_ERR_INVALID_PATH)),
-      m_eVerbosityType(CMICmnLog::eLogVerbosity_Log),
-      m_strDate(CMIUtilDateTimeStd().GetDate()),
-      m_fileHeaderTxt(MIRSRC(IDS_MEDIUMFILE_ERR_FILE_HEADER)) {}
-
-//++
-// Details: CMICmnLogMediumFile destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnLogMediumFile::~CMICmnLogMediumFile() {}
-
-//++
-// Details: Get the singleton instance of *this class.
-// Type:    Static.
-// Args:    None.
-// Return:  CMICmnLogMediumFile - Reference to *this object.
-// Throws:  None.
-//--
-CMICmnLogMediumFile &CMICmnLogMediumFile::Instance() {
-  static CMICmnLogMediumFile instance;
-
-  return instance;
-}
-
-//++
-// Details: Initialize setup *this medium ready for use.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::Initialize() {
-  m_bInitialized = true;
-  return FileFormFileNamePath();
-}
-
-//++
-// Details: Unbind detach or release resources used by *this medium.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::Shutdown() {
-  if (m_bInitialized) {
-    m_bInitialized = false;
-    m_file.Close();
-  }
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the name of *this medium.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString - Text data.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnLogMediumFile::GetName() const {
-  return m_constThisMediumName;
-}
-
-//++
-// Details: The callee client calls the write function on the Logger. The data
-// to be
-//          written is given out to all the mediums registered. The verbosity
-//          type parameter
-//          indicates to the medium the type of data or message given to it. The
-//          medium has
-//          modes of verbosity and depending on the verbosity set determines
-//          which data is
-//          sent to the medium's output.
-// Type:    Method.
-// Args:    vData       - (R) The data to write to the logger.
-//          veType      - (R) Verbosity type.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::Write(const CMIUtilString &vData,
-                                const CMICmnLog::ELogVerbosity veType) {
-  if (m_bInitialized && m_file.IsOk()) {
-    const bool bDoWrite = (m_eVerbosityType & veType);
-    if (bDoWrite) {
-      bool bNewCreated = false;
-      bool bOk = m_file.CreateWrite(m_fileNamePath, bNewCreated);
-      if (bOk) {
-        if (bNewCreated)
-          bOk = FileWriteHeader();
-        bOk = bOk && FileWriteEnglish(MassagedData(vData, veType));
-      }
-      return bOk;
-    }
-  }
-
-  return MIstatus::failure;
-}
-
-//++
-// Details: Retrieve *this medium's last error condition.
-// Type:    Method.
-// Args:    None.
-// Return:  CString & -  Text description.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnLogMediumFile::GetError() const {
-  return m_strMILastErrorDescription;
-}
-
-//++
-// Details: Set the verbosity mode for this medium.
-// Type:    Method.
-// Args:    veType  - (R) Mask value.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::SetVerbosity(const MIuint veType) {
-  m_eVerbosityType = veType;
-  return MIstatus::success;
-}
-
-//++
-// Details: Get the verbosity mode for this medium.
-// Type:    Method.
-// Args:    veType  - (R) Mask value.
-// Return:  CMICmnLog::ELogVerbosity - Mask value.
-// Throws:  None.
-//--
-MIuint CMICmnLogMediumFile::GetVerbosity() const { return m_eVerbosityType; }
-
-//++
-// Details: Write data to a file English font.
-// Type:    Method.
-// Args:    vData   - (R) The data to write to the logger.
-// Return:  None.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::FileWriteEnglish(const CMIUtilString &vData) {
-  return m_file.Write(vData);
-}
-
-//++
-// Details: Determine and form the medium file's directory path and name.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::FileFormFileNamePath() {
-  ClrErrorDescription();
-
-  m_fileNamePath = MIRSRC(IDS_MEDIUMFILE_ERR_INVALID_PATH);
-
-  CMIUtilDateTimeStd date;
-  m_strMediumFileName =
-      CMIUtilString::Format(m_constMediumFileNameFormat.c_str(),
-                            date.GetDateTimeLogFilename().c_str());
-
-#if defined(_MSC_VER)
-  m_fileNamePath = CMIUtilString::Format(
-      "%s\\%s", m_strMediumFileDirectory.c_str(), m_strMediumFileName.c_str());
-#else
-  m_fileNamePath = CMIUtilString::Format(
-      "%s/%s", m_strMediumFileDirectory.c_str(), m_strMediumFileName.c_str());
-#endif // defined ( _MSC_VER )
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the medium file's directory path and name.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - File path.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnLogMediumFile::GetFileNamePath() const {
-  return m_fileNamePath;
-}
-
-//++
-// Details: Retrieve the medium file's name.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - File name.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnLogMediumFile::GetFileName() const {
-  return m_strMediumFileName;
-}
-
-//++
-// Details: Massage the data to behave correct when submitted to file. Insert
-// extra log
-//          specific text. The veType is there to allow in the future to parse
-//          the log and
-//          filter in out specific types of message to make viewing the log more
-//          manageable.
-// Type:    Method.
-// Args:    vData   - (R) Raw data.
-//          veType  - (R) Message type.
-// Return:  CMIUtilString - Massaged data.
-// Throws:  None.
-//--
-CMIUtilString
-CMICmnLogMediumFile::MassagedData(const CMIUtilString &vData,
-                                  const CMICmnLog::ELogVerbosity veType) {
-  const CMIUtilString strCr("\n");
-  CMIUtilString data;
-  const char verbosityCode(ConvertLogVerbosityTypeToId(veType));
-  const CMIUtilString dt(CMIUtilString::Format("%s %s", m_strDate.c_str(),
-                                               m_dateTime.GetTime().c_str()));
-
-  data = CMIUtilString::Format("%c,%s,%s", verbosityCode, dt.c_str(),
-                               vData.c_str());
-  data = ConvertCr(data);
-
-  // Look for EOL...
-  const size_t pos = vData.rfind(strCr);
-  if (pos == vData.size())
-    return data;
-
-  // ... did not have an EOL so add one
-  data += GetLineReturn();
-
-  return data;
-}
-
-//++
-// Details: Convert the Log's verbosity type number into a single char
-// character.
-// Type:    Method.
-// Args:    veType  - (R) Message type.
-// Return:  wchar_t - A letter.
-// Throws:  None.
-//--
-char CMICmnLogMediumFile::ConvertLogVerbosityTypeToId(
-    const CMICmnLog::ELogVerbosity veType) const {
-  char c = 0;
-  if (veType != 0) {
-    MIuint cnt = 0;
-    MIuint number(veType);
-    while (1 != number) {
-      number = number >> 1;
-      ++cnt;
-    }
-    c = 'A' + cnt;
-  } else {
-    c = '*';
-  }
-
-  return c;
-}
-
-//++
-// Details: Retrieve state of whether the file medium is ok.
-// Type:    Method.
-// Args:    None.
-// Return:  True - file ok.
-//          False - file has a problem.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::IsOk() const { return m_file.IsOk(); }
-
-//++
-// Details: Status on the file log medium existing already.
-// Type:    Method.
-// Args:    None.
-// Return:  True - Exists.
-//          False - Not found.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::IsFileExist() const {
-  return m_file.IsFileExist(GetFileNamePath());
-}
-
-//++
-// Details: Write the header text the logger file.
-// Type:    Method.
-// Args:    vText   - (R) Text.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::FileWriteHeader() {
-  return FileWriteEnglish(ConvertCr(m_fileHeaderTxt));
-}
-
-//++
-// Details: Convert any carriage line returns to be compatible with the platform
-// the
-//          Log file is being written to.
-// Type:    Method.
-// Args:    vData   - (R) Text data.
-// Return:  CMIUtilString - Converted string data.
-// Throws:  None.
-//--
-CMIUtilString CMICmnLogMediumFile::ConvertCr(const CMIUtilString &vData) const {
-  const CMIUtilString strCr("\n");
-  const CMIUtilString &rCrCmpat(GetLineReturn());
-
-  if (strCr == rCrCmpat)
-    return vData;
-
-  const size_t nSizeCmpat(rCrCmpat.size());
-  const size_t nSize(strCr.size());
-  CMIUtilString strConv(vData);
-  size_t pos = strConv.find(strCr);
-  while (pos != CMIUtilString::npos) {
-    strConv.replace(pos, nSize, rCrCmpat);
-    pos = strConv.find(strCr, pos + nSizeCmpat);
-  }
-
-  return strConv;
-}
-
-//++
-// Details: Set the header text that is written to the logger file at the
-// beginning.
-// Type:    Method.
-// Args:    vText   - (R) Text.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::SetHeaderTxt(const CMIUtilString &vText) {
-  m_fileHeaderTxt = vText;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the file current carriage line return characters used.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - Text.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnLogMediumFile::GetLineReturn() const {
-  return m_file.GetLineReturn();
-}
-
-//++
-// Details: Set the directory to place the log file.
-// Type:    Method.
-// Args:    vPath   - (R) Path to log.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnLogMediumFile::SetDirectory(const CMIUtilString &vPath) {
-  m_strMediumFileDirectory = vPath;
-
-  return FileFormFileNamePath();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnLogMediumFile.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnLogMediumFile.h
deleted file mode 100644
index 85b0a9d..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnLogMediumFile.h
+++ /dev/null
@@ -1,84 +0,0 @@
-//===-- MICmnLogMediumFile.h ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MICmnLog.h"
-#include "MIUtilDateTimeStd.h"
-#include "MIUtilFileStd.h"
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI common code implementation class. Logs application fn
-// trace/message/
-//          error messages to a file. Used as part of the CMICmnLog Logger
-//          system. When instantiated *this object is register with the Logger
-//          which the Logger when given data to write to registered medium comes
-//          *this medium.
-//          Singleton class.
-//--
-class CMICmnLogMediumFile : public CMICmnBase, public CMICmnLog::IMedium {
-  // Statics:
-public:
-  static CMICmnLogMediumFile &Instance();
-
-  // Methods:
-public:
-  bool SetHeaderTxt(const CMIUtilString &vText);
-  bool SetVerbosity(const MIuint veType);
-  MIuint GetVerbosity() const;
-  const CMIUtilString &GetFileName() const;
-  const CMIUtilString &GetFileNamePath() const;
-  bool IsOk() const;
-  bool IsFileExist() const;
-  const CMIUtilString &GetLineReturn() const;
-  bool SetDirectory(const CMIUtilString &vPath);
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnLogMediumFile() override;
-  // From CMICmnLog::IMedium
-  bool Initialize() override;
-  const CMIUtilString &GetName() const override;
-  bool Write(const CMIUtilString &vData,
-             const CMICmnLog::ELogVerbosity veType) override;
-  const CMIUtilString &GetError() const override;
-  bool Shutdown() override;
-
-  // Methods:
-private:
-  /* ctor */ CMICmnLogMediumFile();
-  /* ctor */ CMICmnLogMediumFile(const CMICmnLogMediumFile &);
-  void operator=(const CMICmnLogMediumFile &);
-
-  bool FileWriteEnglish(const CMIUtilString &vData);
-  bool FileFormFileNamePath();
-  CMIUtilString MassagedData(const CMIUtilString &vData,
-                             const CMICmnLog::ELogVerbosity veType);
-  bool FileWriteHeader();
-  char ConvertLogVerbosityTypeToId(const CMICmnLog::ELogVerbosity veType) const;
-  CMIUtilString ConvertCr(const CMIUtilString &vData) const;
-
-  // Attributes:
-private:
-  const CMIUtilString m_constThisMediumName;
-  const CMIUtilString m_constMediumFileNameFormat;
-  //
-  CMIUtilString m_strMediumFileName;
-  CMIUtilString m_strMediumFileDirectory;
-  CMIUtilString m_fileNamePath;
-  MIuint m_eVerbosityType;
-  CMIUtilString m_strDate;
-  CMIUtilString m_fileHeaderTxt;
-  CMIUtilFileStd m_file;
-  CMIUtilDateTimeStd m_dateTime;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
deleted file mode 100644
index 59856a6..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.cpp
+++ /dev/null
@@ -1,202 +0,0 @@
-//===-- MICmnMIOutOfBandRecord.cpp ------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third Party Headers:
-#include <assert.h>
-
-// In-house headers:
-#include "MICmnMIOutOfBandRecord.h"
-#include "MICmnResources.h"
-
-// Instantiations:
-static const char *
-MapOutOfBandToText(CMICmnMIOutOfBandRecord::OutOfBand_e veType) {
-  switch (veType) {
-  case CMICmnMIOutOfBandRecord::eOutOfBand_Running:
-    return "running";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_Stopped:
-    return "stopped";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointCreated:
-    return "breakpoint-created";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified:
-    return "breakpoint-modified";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_Thread:
-    return ""; // "" Meant to be empty
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupAdded:
-    return "thread-group-added";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupExited:
-    return "thread-group-exited";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupRemoved:
-    return "thread-group-removed";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted:
-    return "thread-group-started";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated:
-    return "thread-created";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited:
-    return "thread-exited";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected:
-    return "thread-selected";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded:
-    return "library-loaded";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleUnloaded:
-    return "library-unloaded";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput:
-    return "";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ConsoleStreamOutput:
-    return "";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_LogStreamOutput:
-    return "";
-  }
-  assert(false && "unknown CMICmnMIOutofBandRecord::OutOfBand_e");
-  return nullptr;
-}
-
-static const char *
-MapOutOfBandToToken(CMICmnMIOutOfBandRecord::OutOfBand_e veType) {
-  switch (veType) {
-  case CMICmnMIOutOfBandRecord::eOutOfBand_Running:
-    return "*";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_Stopped:
-    return "*";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointCreated:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_BreakPointModified:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_Thread:
-    return "@";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupAdded:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupExited:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupRemoved:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadGroupStarted:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadCreated:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadExited:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ThreadSelected:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleLoaded:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_TargetModuleUnloaded:
-    return "=";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_TargetStreamOutput:
-    return "@";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_ConsoleStreamOutput:
-    return "~";
-  case CMICmnMIOutOfBandRecord::eOutOfBand_LogStreamOutput:
-    return "&";
-  }
-  assert(false && "unknown CMICmnMIOutofBandRecord::OutOfBand_e");
-  return nullptr;
-}
-
-//++
-// Details: Build the Out-of-band record's mandatory data part. The part up to
-// the first
-//          (additional) result i.e. async-record ==>  "*" type.
-// Args:    veType      - (R) A MI Out-of-Band enumeration.
-// Return:  CMIUtilString - The async record text.
-// Throws:  None.
-//--
-static CMIUtilString
-BuildAsyncRecord(CMICmnMIOutOfBandRecord::OutOfBand_e veType) {
-  auto Token = MapOutOfBandToToken(veType);
-  auto Text = MapOutOfBandToText(veType);
-  return CMIUtilString::Format("%s%s", CMIUtilString::WithNullAsEmpty(Token),
-                               CMIUtilString::WithNullAsEmpty(Text));
-}
-
-//++
-// Details: CMICmnMIOutOfBandRecord constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord()
-    : m_strAsyncRecord(MIRSRC(IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION)) {}
-
-//++
-// Details: CMICmnMIOutOfBandRecord constructor.
-// Type:    Method.
-// Args:    veType      - (R) A MI Out-of-Bound enumeration.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(OutOfBand_e veType)
-    : m_strAsyncRecord(BuildAsyncRecord(veType)) {}
-
-//++
-// Details: CMICmnMIOutOfBandRecord constructor.
-// Type:    Method.
-// Args:    veType      - (R) A MI Out-of-Bound enumeration.
-//          vConst      - (R) A MI const object.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(
-    OutOfBand_e veType, const CMICmnMIValueConst &vConst)
-    : m_strAsyncRecord(BuildAsyncRecord(veType)) {
-  m_strAsyncRecord += vConst.GetString();
-}
-
-//++
-// Details: CMICmnMIOutOfBandRecord constructor.
-// Type:    Method.
-// Args:    veType      - (R) A MI Out-of-Bound enumeration.
-//          vResult     - (R) A MI result object.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIOutOfBandRecord::CMICmnMIOutOfBandRecord(
-    OutOfBand_e veType, const CMICmnMIValueResult &vResult)
-    : m_strAsyncRecord(BuildAsyncRecord(veType)) {
-  Add(vResult);
-}
-
-//++
-// Details: CMICmnMIOutOfBandRecord destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIOutOfBandRecord::~CMICmnMIOutOfBandRecord() {}
-
-//++
-// Details: Return the MI Out-of-band record as a string. The string is a direct
-// result of
-//          work done on *this Out-of-band record so if not enough data is added
-//          then it is
-//          possible to return a malformed Out-of-band record. If nothing has
-//          been set or
-//          added to *this MI Out-of-band record object then text "<Invalid>"
-//          will be returned.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - MI output text.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnMIOutOfBandRecord::GetString() const {
-  return m_strAsyncRecord;
-}
-
-//++
-// Details: Add to *this Out-of-band record additional information.
-// Type:    Method.
-// Args:    vResult           - (R) A MI result object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIOutOfBandRecord::Add(const CMICmnMIValueResult &vResult) {
-  m_strAsyncRecord += ",";
-  m_strAsyncRecord += vResult.GetString();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h
deleted file mode 100644
index ab1faab..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIOutOfBandRecord.h
+++ /dev/null
@@ -1,93 +0,0 @@
-//===-- MICmnMIOutOfBandRecord.h --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnMIValueResult.h"
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI common code MI Out-of-band (Async) Record class. A class that
-// encapsulates
-//          MI result record data and the forming/format of data added to it.
-//          Out-of-band records are used to notify the GDB/MI client of
-//          additional
-//          changes that have occurred. Those changes can either be a
-//          consequence
-//          of GDB/MI (e.g., a breakpoint modified) or a result of target
-//          activity
-//          (e.g., target stopped).
-//          The syntax is as follows:
-//          "*" type ( "," result )*
-//          type ==> running | stopped
-//
-//          The Out-of-band record can be retrieve at any time *this object is
-//          instantiated so unless work is done on *this Out-of-band record then
-//          it is
-//          possible to return a malformed Out-of-band record. If nothing has
-//          been set
-//          or added to *this MI Out-of-band record object then text "<Invalid>"
-//          will
-//          be returned.
-//
-//          More information see:
-//          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html//
-//--
-class CMICmnMIOutOfBandRecord : public CMICmnBase {
-  // Enumerations:
-public:
-  //++
-  // Details: Enumeration of the type of Out-of-band for *this Out-of-band
-  // record
-  //--
-  enum OutOfBand_e {
-    eOutOfBand_Running = 0,
-    eOutOfBand_Stopped,
-    eOutOfBand_BreakPointCreated,
-    eOutOfBand_BreakPointModified,
-    eOutOfBand_Thread,
-    eOutOfBand_ThreadGroupAdded,
-    eOutOfBand_ThreadGroupExited,
-    eOutOfBand_ThreadGroupRemoved,
-    eOutOfBand_ThreadGroupStarted,
-    eOutOfBand_ThreadCreated,
-    eOutOfBand_ThreadExited,
-    eOutOfBand_ThreadSelected,
-    eOutOfBand_TargetModuleLoaded,
-    eOutOfBand_TargetModuleUnloaded,
-    eOutOfBand_TargetStreamOutput,
-    eOutOfBand_ConsoleStreamOutput,
-    eOutOfBand_LogStreamOutput
-  };
-
-  // Methods:
-public:
-  /* ctor */ CMICmnMIOutOfBandRecord();
-  /* ctor */ CMICmnMIOutOfBandRecord(OutOfBand_e veType);
-  /* ctor */ CMICmnMIOutOfBandRecord(OutOfBand_e veType,
-                                     const CMICmnMIValueConst &vConst);
-  /* ctor */ CMICmnMIOutOfBandRecord(OutOfBand_e veType,
-                                     const CMICmnMIValueResult &vResult);
-  //
-  const CMIUtilString &GetString() const;
-  void Add(const CMICmnMIValueResult &vResult);
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnMIOutOfBandRecord() override;
-
-  // Attributes:
-private:
-  CMIUtilString
-      m_strAsyncRecord; // Holds the text version of the result record to date
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIResultRecord.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIResultRecord.cpp
deleted file mode 100644
index 93bb5a6..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIResultRecord.cpp
+++ /dev/null
@@ -1,133 +0,0 @@
-//===-- MICmnMIResultRecord.cpp ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third Party Headers:
-#include <assert.h>
-
-// In-house headers:
-#include "MICmnMIResultRecord.h"
-#include "MICmnResources.h"
-
-//++
-// Details: Map a result class to the corresponding string.
-// Args:    veType      - (R) A MI result class enumeration.
-// Return:  const char* - The string corresponding to the result class.
-// Throws:  None.
-//--
-static const char *
-MapResultClassToResultClassText(CMICmnMIResultRecord::ResultClass_e veType) {
-  switch (veType) {
-  case CMICmnMIResultRecord::eResultClass_Done:
-    return "done";
-  case CMICmnMIResultRecord::eResultClass_Running:
-    return "running";
-  case CMICmnMIResultRecord::eResultClass_Connected:
-    return "connected";
-  case CMICmnMIResultRecord::eResultClass_Error:
-    return "error";
-  case CMICmnMIResultRecord::eResultClass_Exit:
-    return "exit";
-  }
-  assert(false && "unknown CMICmnMIResultRecord::ResultClass_e");
-  return nullptr;
-}
-
-//++
-// Details: Build the result record's mandatory data part. The part up to the
-// first
-//          (additional) result i.e. result-record ==>  [ token ] "^"
-//          result-class.
-// Args:    vrToken     - (R) The command's transaction ID or token.
-//          veType      - (R) A MI result class enumeration.
-// Return:  CMIUtilString & - MI result record mandatory data
-// Throws:  None.
-//--
-static const CMIUtilString
-BuildResultRecord(const CMIUtilString &vrToken,
-                  CMICmnMIResultRecord::ResultClass_e veType) {
-  const char *pStrResultRecord = MapResultClassToResultClassText(veType);
-  return CMIUtilString::Format("%s^%s", vrToken.c_str(),
-                               CMIUtilString::WithNullAsEmpty(pStrResultRecord));
-}
-
-//++
-// Details: CMICmnMIResultRecord constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIResultRecord::CMICmnMIResultRecord()
-    : m_strResultRecord(MIRSRC(IDS_CMD_ERR_CMD_RUN_BUT_NO_ACTION)) {}
-
-//++
-// Details: CMICmnMIResultRecord constructor.
-// Type:    Method.
-// Args:    vrToken - (R) The command's transaction ID or token.
-//          veType  - (R) A MI result class enumeration.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIResultRecord::CMICmnMIResultRecord(const CMIUtilString &vrToken,
-                                           ResultClass_e veType)
-    : m_strResultRecord(BuildResultRecord(vrToken, veType)) {}
-
-//++
-// Details: CMICmnMIResultRecord constructor.
-// Type:    Method.
-// Args:    vrToken     - (R) The command's transaction ID or token.
-//          veType      - (R) A MI result class enumeration.
-//          vMIResult   - (R) A MI result object.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIResultRecord::CMICmnMIResultRecord(const CMIUtilString &vrToken,
-                                           ResultClass_e veType,
-                                           const CMICmnMIValueResult &vValue)
-    : m_strResultRecord(BuildResultRecord(vrToken, veType)) {
-  Add(vValue);
-}
-
-//++
-// Details: CMICmnMIResultRecord destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIResultRecord::~CMICmnMIResultRecord() {}
-
-//++
-// Details: Return the MI result record as a string. The string is a direct
-// result of
-//          work done on *this result record so if not enough data is added then
-//          it is
-//          possible to return a malformed result record. If nothing has been
-//          set or
-//          added to *this MI result record object then text "<Invalid>" will be
-//          returned.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - MI output text.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnMIResultRecord::GetString() const {
-  return m_strResultRecord;
-}
-
-//++
-// Details: Add to *this result record additional information.
-// Type:    Method.
-// Args:    vMIValue    - (R) A MI value derived object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIResultRecord::Add(const CMICmnMIValue &vMIValue) {
-  m_strResultRecord += ",";
-  m_strResultRecord += vMIValue.GetString();
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIResultRecord.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIResultRecord.h
deleted file mode 100644
index ae57007..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIResultRecord.h
+++ /dev/null
@@ -1,79 +0,0 @@
-//===-- MICmnMIResultRecord.h -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MICmnMIValueResult.h"
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI common code MI Result Record class. A class that encapsulates
-//          MI result record data and the forming/format of data added to it.
-//          The syntax is as follows:
-//          result-record ==>  [ token ] "^" result-class ( "," result )* nl
-//          token = any sequence of digits
-//          * = 0 to many
-//          nl = CR | CR_LF
-//          result-class ==> "done" | "running" | "connected" | "error" | "exit"
-//          result ==> variable "=" value
-//          value ==> const | tuple | list
-//          const ==> c-string (7 bit iso c string content) i.e. "all" inc
-//          quotes
-//          tuple ==>  "{}" | "{" result ( "," result )* "}"
-//          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
-//          result )* "]"
-//
-//          The result record can be retrieve at any time *this object is
-//          instantiated so unless work is done on *this result record then it
-//          is
-//          possible to return a malformed result record. If nothing has been
-//          set
-//          or added to *this MI result record object then text "<Invalid>" will
-//          be returned.
-//          More information see:
-//          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
-//--
-class CMICmnMIResultRecord : public CMICmnBase {
-  // Enumerations:
-public:
-  //++
-  // Details: Enumeration of the result class for *this result record
-  //--
-  enum ResultClass_e {
-    eResultClass_Done = 0,
-    eResultClass_Running,
-    eResultClass_Connected,
-    eResultClass_Error,
-    eResultClass_Exit
-  };
-
-  // Methods:
-public:
-  /* ctor */ CMICmnMIResultRecord();
-  /* ctor */ CMICmnMIResultRecord(const CMIUtilString &vrToken,
-                                  ResultClass_e veType);
-  /* ctor */ CMICmnMIResultRecord(const CMIUtilString &vrToken,
-                                  ResultClass_e veType,
-                                  const CMICmnMIValueResult &vValue);
-  //
-  const CMIUtilString &GetString() const;
-  void Add(const CMICmnMIValue &vMIValue);
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnMIResultRecord() override;
-
-  // Attributes:
-private:
-  CMIUtilString
-      m_strResultRecord; // Holds the text version of the result record to date
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValue.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValue.cpp
deleted file mode 100644
index 05ed71e..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValue.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-//===-- MICmnMIValue.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnMIValue.h"
-#include "MICmnResources.h"
-
-//++
-// Details: CMICmnMIValue constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValue::CMICmnMIValue()
-    : m_strValue(MIRSRC(IDS_WORD_INVALIDBRKTS)), m_bJustConstructed(true) {}
-
-//++
-// Details: CMICmnMIValue destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValue::~CMICmnMIValue() {}
-
-//++
-// Details: Return the MI value as a string. The string is a direct result of
-//          work done on *this value so if not enough data is added then it is
-//          possible to return a malformed value. If nothing has been set or
-//          added to *this MI value object then text "<Invalid>" will be
-//          returned.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - MI output text.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnMIValue::GetString() const { return m_strValue; }
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValue.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValue.h
deleted file mode 100644
index 8f10c67..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValue.h
+++ /dev/null
@@ -1,50 +0,0 @@
-//===-- MICmnMIValue.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-
-//++
-//============================================================================
-// Details: MI common code MI Result class. Part of the CMICmnMIValueRecord
-//          set of objects.
-//          The syntax is as follows:
-//          result-record ==>  [ token ] "^" result-class ( "," result )* nl
-//          token = any sequence of digits
-//          * = 0 to many
-//          nl = CR | CR_LF
-//          result-class ==> "done" | "running" | "connected" | "error" | "exit"
-//          result ==> variable "=" value
-//          value ==> const | tuple | list
-//          const ==> c-string (7 bit iso c string content)
-//          tuple ==>  "{}" | "{" result ( "," result )* "}"
-//          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
-//          result )* "]"
-//          More information see:
-//          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
-//--
-class CMICmnMIValue : public CMICmnBase {
-  // Methods:
-public:
-  /* ctor */ CMICmnMIValue();
-  //
-  const CMIUtilString &GetString() const;
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnMIValue() override;
-
-  // Attributes:
-protected:
-  CMIUtilString m_strValue;
-  bool m_bJustConstructed; // True = *this just constructed with no value, false
-                           // = *this has had value added to it
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueConst.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueConst.cpp
deleted file mode 100644
index 1cdbc64..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueConst.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-//===-- MICmnMIValueConst.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnMIValueConst.h"
-
-// Instantiations:
-const CMIUtilString CMICmnMIValueConst::ms_constStrDblQuote("\"");
-
-//++
-// Details: CMICmnMIValueConst constructor.
-// Type:    Method.
-// Args:    vString - (R) MI Const c-string value.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueConst::CMICmnMIValueConst(const CMIUtilString &vString)
-    : m_strPartConst(vString), m_bNoQuotes(false) {
-  BuildConst();
-}
-
-//++
-// Details: CMICmnMIValueConst constructor.
-// Type:    Method.
-// Args:    vString     - (R) MI Const c-string value.
-//          vbNoQuotes  - (R) True = return string not surrounded with quotes,
-//          false = use quotes.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueConst::CMICmnMIValueConst(const CMIUtilString &vString,
-                                       const bool vbNoQuotes)
-    : m_strPartConst(vString), m_bNoQuotes(vbNoQuotes) {
-  BuildConst();
-}
-
-//++
-// Details: CMICmnMIValueConst destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueConst::~CMICmnMIValueConst() {}
-
-//++
-// Details: Build the Value Const data.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnMIValueConst::BuildConst() {
-  if (m_strPartConst.length() != 0) {
-    const CMIUtilString strValue(m_strPartConst.StripCREndOfLine());
-    if (m_bNoQuotes) {
-      m_strValue = strValue;
-    } else {
-      const char *pFormat = "%s%s%s";
-      m_strValue =
-          CMIUtilString::Format(pFormat, ms_constStrDblQuote.c_str(),
-                                strValue.c_str(), ms_constStrDblQuote.c_str());
-    }
-  } else {
-    const char *pFormat = "%s%s";
-    m_strValue = CMIUtilString::Format(pFormat, ms_constStrDblQuote.c_str(),
-                                       ms_constStrDblQuote.c_str());
-  }
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueConst.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueConst.h
deleted file mode 100644
index 4bac086..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueConst.h
+++ /dev/null
@@ -1,59 +0,0 @@
-//===-- MICmnMIValueConst.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnMIValue.h"
-
-//++
-//============================================================================
-// Details: MI common code MI Result class. Part of the CMICmnMIValueConstRecord
-//          set of objects.
-//          The syntax is as follows:
-//          result-record ==>  [ token ] "^" result-class ( "," result )* nl
-//          token = any sequence of digits
-//          * = 0 to many
-//          nl = CR | CR_LF
-//          result-class ==> "done" | "running" | "connected" | "error" | "exit"
-//          result ==> variable "=" value
-//          value ==> const | tuple | list
-//          const ==> c-string (7 bit iso c string content)
-//          tuple ==>  "{}" | "{" result ( "," result )* "}"
-//          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
-//          result )* "]"
-//          More information see:
-//          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
-//
-//          The text formed in *this Result class is stripped of any '\n'
-//          characters.
-//--
-class CMICmnMIValueConst : public CMICmnMIValue {
-  // Methods:
-public:
-  /* ctor */ CMICmnMIValueConst(const CMIUtilString &vString);
-  /* ctor */ CMICmnMIValueConst(const CMIUtilString &vString,
-                                const bool vbNoQuotes);
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnMIValueConst() override;
-
-  // Methods:
-private:
-  bool BuildConst();
-
-  // Attributes:
-private:
-  static const CMIUtilString ms_constStrDblQuote;
-  //
-  CMIUtilString m_strPartConst;
-  bool m_bNoQuotes; // True = return string not surrounded with quotes, false =
-                    // use quotes
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueList.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueList.cpp
deleted file mode 100644
index 038d3ae..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueList.cpp
+++ /dev/null
@@ -1,177 +0,0 @@
-//===-- MICmnMIValueList.cpp ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnMIValueList.h"
-#include "MICmnResources.h"
-
-//++
-// Details: CMICmnMIValueList constructor.
-// Type:    Method.
-// Args:    vbValueTypeList - (R) True = yes value type list, false = result
-// type list.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueList::CMICmnMIValueList(const bool vbValueTypeList) {
-  m_strValue = "[]";
-}
-
-//++
-// Details: CMICmnMIValueList constructor.
-//          Construct a results only list.
-//          return MIstatus::failure.
-// Type:    Method.
-// Args:    vResult - (R) MI result object.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueList::CMICmnMIValueList(const CMICmnMIValueResult &vResult) {
-  m_strValue = vResult.GetString();
-  BuildList();
-  m_bJustConstructed = false;
-}
-
-//++
-// Details: CMICmnMIValueList constructor.
-//          Construct a value only list.
-// Type:    Method.
-// Args:    vValue  - (R) MI value object.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueList::CMICmnMIValueList(const CMICmnMIValue &vValue) {
-  m_strValue = vValue.GetString();
-  BuildList();
-  m_bJustConstructed = false;
-}
-
-//++
-// Details: CMICmnMIValueList destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueList::~CMICmnMIValueList() {}
-
-//++
-// Details: Build the result value's mandatory data part, one tuple
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueList::BuildList() {
-  const char *pFormat = "[%s]";
-  m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str());
-}
-
-//++
-// Details: Add another MI result object to  the value list's of list is
-// results.
-//          Only result objects can be added to a list of result otherwise this
-//          function
-//          will return MIstatus::failure.
-// Type:    Method.
-// Args:    vResult - (R) The MI result object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueList::Add(const CMICmnMIValueResult &vResult) {
-  BuildList(vResult);
-}
-
-//++
-// Details: Add another MI value object to  the value list's of list is values.
-//          Only values objects can be added to a list of values otherwise this
-//          function
-//          will return MIstatus::failure.
-// Type:    Method.
-// Args:    vValue  - (R) The MI value object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueList::Add(const CMICmnMIValue &vValue) { BuildList(vValue); }
-
-//++
-// Details: Add another MI result object to  the value list's of list is
-// results.
-//          Only result objects can be added to a list of result otherwise this
-//          function
-//          will return MIstatus::failure.
-// Type:    Method.
-// Args:    vResult - (R) The MI result object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueList::BuildList(const CMICmnMIValueResult &vResult) {
-  // Clear out the default "<Invalid>" text
-  if (m_bJustConstructed) {
-    m_bJustConstructed = false;
-    m_strValue = vResult.GetString();
-    BuildList();
-    return;
-  }
-
-  const CMIUtilString data(ExtractContentNoBrackets());
-  const char *pFormat = "[%s,%s]";
-  m_strValue =
-      CMIUtilString::Format(pFormat, data.c_str(), vResult.GetString().c_str());
-}
-
-//++
-// Details: Add another MI value object to  the value list's of list is values.
-//          Only values objects can be added to a list of values otherwise this
-//          function
-//          will return MIstatus::failure.
-// Type:    Method.
-// Args:    vValue  - (R) The MI value object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueList::BuildList(const CMICmnMIValue &vValue) {
-  // Clear out the default "<Invalid>" text
-  if (m_bJustConstructed) {
-    m_bJustConstructed = false;
-    m_strValue = vValue.GetString();
-    BuildList();
-    return;
-  }
-
-  // Remove already present '[' and ']' from the start and end
-  m_strValue = m_strValue.Trim();
-  size_t len = m_strValue.size();
-  if ((len > 1) && (m_strValue[0] == '[') && (m_strValue[len - 1] == ']'))
-    m_strValue = m_strValue.substr(1, len - 2);
-  const char *pFormat = "[%s,%s]";
-  m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str(),
-                                     vValue.GetString().c_str());
-}
-
-//++
-// Details: Retrieve the contents of *this value object but without the outer
-// most
-//          brackets.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Data within the object.
-// Throws:  None.
-//--
-CMIUtilString CMICmnMIValueList::ExtractContentNoBrackets() const {
-  CMIUtilString data(m_strValue);
-
-  if (data[0] == '[') {
-    data = data.substr(1, data.length() - 1);
-  }
-  if (data[data.size() - 1] == ']') {
-    data = data.substr(0, data.length() - 1);
-  }
-
-  return data;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueList.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueList.h
deleted file mode 100644
index 76062d0..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueList.h
+++ /dev/null
@@ -1,55 +0,0 @@
-//===-- MICmnMIValueList.h --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnMIValue.h"
-#include "MICmnMIValueResult.h"
-
-//++
-//============================================================================
-// Details: MI common code MI Result class. Part of the CMICmnMIValueListRecord
-//          set of objects.
-//          The syntax is as follows:
-//          result-record ==>  [ token ] "^" result-class ( "," result )* nl
-//          token = any sequence of digits
-//          * = 0 to many
-//          nl = CR | CR_LF
-//          result-class ==> "done" | "running" | "connected" | "error" | "exit"
-//          result ==> variable "=" value
-//          value ==> const | tuple | list
-//          const ==> c-string (7 bit iso c string content)
-//          tuple ==>  "{}" | "{" result ( "," result )* "}"
-//          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
-//          result )* "]"
-//          More information see:
-//          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
-//--
-class CMICmnMIValueList : public CMICmnMIValue {
-  // Methods:
-public:
-  /* ctor */ CMICmnMIValueList(const bool vbValueTypeList);
-  /* ctor */ CMICmnMIValueList(const CMICmnMIValueResult &vResult);
-  /* ctor */ CMICmnMIValueList(const CMICmnMIValue &vValue);
-  //
-  void Add(const CMICmnMIValueResult &vResult);
-  void Add(const CMICmnMIValue &vValue);
-  CMIUtilString ExtractContentNoBrackets() const;
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnMIValueList() override;
-
-  // Methods:
-private:
-  void BuildList();
-  void BuildList(const CMICmnMIValueResult &vResult);
-  void BuildList(const CMICmnMIValue &vResult);
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueResult.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueResult.cpp
deleted file mode 100644
index 5ef6074..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueResult.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-//===-- MICmnMIValueResult.cpp ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnMIValueResult.h"
-#include "MICmnResources.h"
-
-// Instantiations:
-const CMIUtilString CMICmnMIValueResult::ms_constStrEqual("=");
-
-//++
-// Details: CMICmnMIValueResult constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueResult::CMICmnMIValueResult() : m_bEmptyConstruction(true) {}
-
-//++
-// Details: CMICmnMIValueResult constructor.
-// Type:    Method.
-// Args:    vrVariable  - (R) MI value's name.
-//          vrValue     - (R) The MI value.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueResult::CMICmnMIValueResult(const CMIUtilString &vrVariable,
-                                         const CMICmnMIValue &vrValue)
-    : m_strPartVariable(vrVariable), m_partMIValue(vrValue),
-      m_bEmptyConstruction(false), m_bUseSpacing(false) {
-  BuildResult();
-}
-
-//++
-// Details: CMICmnMIValueResult constructor.
-// Type:    Method.
-// Args:    vrVariable      - (R) MI value's name.
-//          vrValue         - (R) The MI value.
-//          vbUseSpacing    - (R) True = put space separators into the string,
-//          false = no spaces used.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueResult::CMICmnMIValueResult(const CMIUtilString &vrVariable,
-                                         const CMICmnMIValue &vrValue,
-                                         const bool vbUseSpacing)
-    : m_strPartVariable(vrVariable), m_partMIValue(vrValue),
-      m_bEmptyConstruction(false), m_bUseSpacing(vbUseSpacing) {
-  BuildResult();
-}
-
-//++
-// Details: CMICmnMIValueResult destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueResult::~CMICmnMIValueResult() {}
-
-//++
-// Details: Build the MI value result string.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueResult::BuildResult() {
-  const char *pFormat = m_bUseSpacing ? "%s %s %s" : "%s%s%s";
-  m_strValue = CMIUtilString::Format(pFormat, m_strPartVariable.c_str(),
-                                     ms_constStrEqual.c_str(),
-                                     m_partMIValue.GetString().c_str());
-}
-
-//++
-// Details: Build the MI value result string.
-// Type:    Method.
-// Args:    vrVariable  - (R) MI value's name.
-//          vrValue     - (R) The MI value.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueResult::BuildResult(const CMIUtilString &vVariable,
-                                      const CMICmnMIValue &vValue) {
-  const char *pFormat = m_bUseSpacing ? "%s, %s %s %s" : "%s,%s%s%s";
-  m_strValue = CMIUtilString::Format(
-      pFormat, m_strValue.c_str(), vVariable.c_str(), ms_constStrEqual.c_str(),
-      vValue.GetString().c_str());
-}
-
-//++
-// Details: Append another MI value object to *this MI value result.
-// Type:    Method.
-// Args:    vrVariable  - (R) MI value's name.
-//          vrValue     - (R) The MI value.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-void CMICmnMIValueResult::Add(const CMIUtilString &vrVariable,
-                              const CMICmnMIValue &vrValue) {
-  if (!m_bEmptyConstruction)
-    BuildResult(vrVariable, vrValue);
-  else {
-    m_bEmptyConstruction = false;
-    m_strPartVariable = vrVariable;
-    m_partMIValue = vrValue;
-    BuildResult();
-  }
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueResult.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueResult.h
deleted file mode 100644
index cfa101b..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueResult.h
+++ /dev/null
@@ -1,66 +0,0 @@
-//===-- MICmnMIValueResult.h ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnMIValue.h"
-
-//++
-//============================================================================
-// Details: MI common code MI Result class. Part of the
-// CMICmnMIValueResultRecord
-//          set of objects.
-//          The syntax is as follows:
-//          result-record ==>  [ token ] "^" result-class ( "," result )* nl
-//          token = any sequence of digits
-//          * = 0 to many
-//          nl = CR | CR_LF
-//          result-class ==> "done" | "running" | "connected" | "error" | "exit"
-//          result ==> variable "=" value
-//          value ==> const | tuple | list
-//          const ==> c-string (7 bit iso c string content)
-//          tuple ==>  "{}" | "{" result ( "," result )* "}"
-//          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
-//          result )* "]"
-//          More information see:
-//          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
-//--
-class CMICmnMIValueResult : public CMICmnMIValue {
-  // Methods:
-public:
-  /* ctor */ CMICmnMIValueResult();
-  /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable,
-                                 const CMICmnMIValue &vValue);
-  /* ctor */ CMICmnMIValueResult(const CMIUtilString &vVariable,
-                                 const CMICmnMIValue &vValue,
-                                 const bool vbUseSpacing);
-  //
-  void Add(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnMIValueResult() override;
-
-  // Methods:
-private:
-  void BuildResult();
-  void BuildResult(const CMIUtilString &vVariable, const CMICmnMIValue &vValue);
-
-  // Attributes:
-private:
-  static const CMIUtilString ms_constStrEqual;
-  //
-  CMIUtilString m_strPartVariable;
-  CMICmnMIValue m_partMIValue;
-  bool m_bEmptyConstruction; // True = *this object used constructor with no
-                             // parameters, false = constructor with parameters
-  bool m_bUseSpacing; // True = put space separators into the string, false = no
-                      // spaces used
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueTuple.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueTuple.cpp
deleted file mode 100644
index 2f05d21..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueTuple.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-//===-- MICmnMIValueTuple.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnMIValueTuple.h"
-
-//++
-// Details: CMICmnMIValueTuple constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueTuple::CMICmnMIValueTuple() : m_bSpaceAfterComma(false) {
-  m_strValue = "{}";
-}
-
-//++
-// Details: CMICmnMIValueTuple constructor.
-// Type:    Method.
-// Args:    vResult - (R) MI result object.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueTuple::CMICmnMIValueTuple(const CMICmnMIValueResult &vResult)
-    : m_bSpaceAfterComma(false) {
-  m_strValue = vResult.GetString();
-  BuildTuple();
-  m_bJustConstructed = false;
-}
-
-//++
-// Details: CMICmnMIValueTuple constructor.
-// Type:    Method.
-// Args:    vResult         - (R) MI result object.
-//          vbUseSpacing    - (R) True = put space separators into the string,
-//          false = no spaces used.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueTuple::CMICmnMIValueTuple(const CMICmnMIValueResult &vResult,
-                                       const bool vbUseSpacing)
-    : m_bSpaceAfterComma(vbUseSpacing) {
-  m_strValue = vResult.GetString();
-  BuildTuple();
-  m_bJustConstructed = false;
-}
-
-//++
-// Details: CMICmnMIValueTuple destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnMIValueTuple::~CMICmnMIValueTuple() {}
-
-//++
-// Details: Build the result value's mandatory data part, one tuple
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueTuple::BuildTuple() {
-  const char *pFormat = "{%s}";
-  m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str());
-}
-
-//++
-// Details: Add another MI result object to the value's list of tuples.
-// Type:    Method.
-// Args:    vResult - (R) The MI result object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueTuple::BuildTuple(const CMICmnMIValueResult &vResult) {
-  // Clear out the default "<Invalid>" text
-  if (m_bJustConstructed) {
-    m_bJustConstructed = false;
-    m_strValue = vResult.GetString();
-    BuildTuple();
-    return;
-  }
-
-  if (m_strValue[0] == '{') {
-    m_strValue = m_strValue.substr(1, m_strValue.size() - 1);
-  }
-  if (m_strValue[m_strValue.size() - 1] == '}') {
-    m_strValue = m_strValue.substr(0, m_strValue.size() - 1);
-  }
-
-  const char *pFormat = m_bSpaceAfterComma ? "{%s, %s}" : "{%s,%s}";
-  m_strValue = CMIUtilString::Format(pFormat, m_strValue.c_str(),
-                                     vResult.GetString().c_str());
-}
-
-//++
-// Details: Add string value to the value's list of tuples.
-// Type:    Method.
-// Args:    vValue  - (R) The string object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueTuple::BuildTuple(const CMIUtilString &vValue) {
-  // Clear out the default "<Invalid>" text
-  if (m_bJustConstructed) {
-    m_bJustConstructed = false;
-    m_strValue = vValue;
-    BuildTuple();
-    return;
-  }
-
-  const CMIUtilString data(ExtractContentNoBrackets());
-  const char *pFormat = m_bSpaceAfterComma ? "{%s, %s}" : "{%s,%s}";
-  m_strValue = CMIUtilString::Format(pFormat, data.c_str(), vValue.c_str());
-}
-
-//++
-// Details: Add another MI value object to  the value list's of list is values.
-//          Only values objects can be added to a list of values otherwise this
-//          function
-//          will return MIstatus::failure.
-// Type:    Method.
-// Args:    vValue  - (R) The MI value object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueTuple::Add(const CMICmnMIValueResult &vResult) {
-  BuildTuple(vResult);
-}
-
-//++
-// Details: Add another MI value object to  the value list's of list is values.
-//          Only values objects can be added to a list of values otherwise this
-//          function
-//          will return MIstatus::failure.
-// Type:    Method.
-// Args:    vValue          - (R) The MI value object.
-//          vbUseSpacing    - (R) True = put space separators into the string,
-//          false = no spaces used.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueTuple::Add(const CMICmnMIValueResult &vResult,
-                             const bool vbUseSpacing) {
-  m_bSpaceAfterComma = vbUseSpacing;
-  BuildTuple(vResult);
-}
-
-//++
-// Details: Add another MI value object to  the value list's of list is values.
-//          Only values objects can be added to a list of values otherwise this
-//          function
-//          will return MIstatus::failure.
-// Type:    Method.
-// Args:    vValue          - (R) The MI value object.
-//          vbUseSpacing    - (R) True = put space separators into the string,
-//          false = no spaces used.
-// Return:  None.
-// Throws:  None.
-//--
-void CMICmnMIValueTuple::Add(const CMICmnMIValueConst &vValue,
-                             const bool vbUseSpacing) {
-  m_bSpaceAfterComma = vbUseSpacing;
-  BuildTuple(vValue.GetString());
-}
-
-//++
-// Details: Retrieve the contents of *this value object but without the outer
-// most
-//          brackets.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Data within the object.
-// Throws:  None.
-//--
-CMIUtilString CMICmnMIValueTuple::ExtractContentNoBrackets() const {
-  CMIUtilString data(m_strValue);
-
-  if (data[0] == '{') {
-    data = data.substr(1, data.length() - 1);
-  }
-  if (data[data.size() - 1] == '}') {
-    data = data.substr(0, data.length() - 1);
-  }
-
-  return data;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueTuple.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueTuple.h
deleted file mode 100644
index 4a04fd9..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnMIValueTuple.h
+++ /dev/null
@@ -1,63 +0,0 @@
-//===-- MICmnMIValueTuple.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnMIValue.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnMIValueResult.h"
-
-//++
-//============================================================================
-// Details: MI common code MI Result class. Part of the CMICmnMIValueTupleRecord
-//          set of objects.
-//          The syntax is as follows:
-//          result-record ==>  [ token ] "^" result-class ( "," result )* nl
-//          token = any sequence of digits
-//          * = 0 to many
-//          nl = CR | CR_LF
-//          result-class ==> "done" | "running" | "connected" | "error" | "exit"
-//          result ==> variable "=" value
-//          value ==> const | tuple | list
-//          const ==> c-string (7 bit iso c string content)
-//          tuple ==>  "{}" | "{" result ( "," result )* "}"
-//          list ==>  "[]" | "[" value ( "," value )* "]" | "[" result ( ","
-//          result )* "]"
-//          More information see:
-//          http://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_chapter/gdb_22.html
-//--
-class CMICmnMIValueTuple : public CMICmnMIValue {
-  // Methods:
-public:
-  /* ctor */ CMICmnMIValueTuple();
-  /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult);
-  /* ctor */ CMICmnMIValueTuple(const CMICmnMIValueResult &vResult,
-                                const bool vbUseSpacing);
-  //
-  void Add(const CMICmnMIValueResult &vResult);
-  void Add(const CMICmnMIValueResult &vResult, const bool vbUseSpacing);
-  void Add(const CMICmnMIValueConst &vValue, const bool vbUseSpacing);
-  CMIUtilString ExtractContentNoBrackets() const;
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnMIValueTuple() override;
-
-  // Methods:
-private:
-  void BuildTuple();
-  void BuildTuple(const CMICmnMIValueResult &vResult);
-  void BuildTuple(const CMIUtilString &vValue);
-
-  // Attributes:
-private:
-  bool m_bSpaceAfterComma; // True = put space separators into the string, false
-                           // = no spaces used
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnResources.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnResources.cpp
deleted file mode 100644
index 3925f0b..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnResources.cpp
+++ /dev/null
@@ -1,619 +0,0 @@
-//===-- MICmnResources.cpp --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers
-#include "assert.h"
-#include <inttypes.h>
-
-// In-house headers:
-#include "MICmnResources.h"
-
-// Instantiations:
-const CMICmnResources::SRsrcTextData
-    CMICmnResources::ms_pResourceId2TextData[] = {
-        {IDS_PROJNAME,
-         "LLDB Machine Interface Driver (MI) All rights reserved"},
-        {IDS_MI_VERSION_DESCRIPTION_DEBUG,
-         "Version: 1.0.0.9 (Debug)"}, // See version history in MIDriverMain.cpp
-        {IDS_MI_VERSION_DESCRIPTION, "Version: 1.0.0.9"},
-        {IDS_MI_APPNAME_SHORT, "MI"},
-        {IDS_MI_APPNAME_LONG, "Machine Interface Driver"},
-        {IDS_MI_APP_FILEPATHNAME, "Application: %s"},
-        {IDS_MI_APP_ARGS, "Command line args: "},
-        {IDE_MI_VERSION_GDB, "Version: GNU gdb (GDB) 7.4 \n(This is a MI stub "
-                             "on top of LLDB and not GDB)\nAll rights "
-                             "reserved.\n"}, // *** Eclipse needs this
-                                             // exactly!!
-        {IDS_UTIL_FILE_ERR_INVALID_PATHNAME,
-         "File Handler. Invalid file name path"},
-        {IDS_UTIL_FILE_ERR_OPENING_FILE, "File Handler. Error %s opening '%s'"},
-        {IDS_UTIL_FILE_ERR_OPENING_FILE_UNKNOWN,
-         "File Handler. Unknown error opening '%s'"},
-        {IDE_UTIL_FILE_ERR_WRITING_FILE, "File Handler. Error %s writing '%s'"},
-        {IDE_UTIL_FILE_ERR_WRITING_NOTOPEN,
-         "File Handler. File '%s' not open for write"},
-        {IDS_RESOURCES_ERR_STRING_NOT_FOUND,
-         "Resources. String (%d) not found in resources"},
-        {IDS_RESOURCES_ERR_STRING_TABLE_INVALID,
-         "Resources. String resource table is not set up"},
-        {IDS_MI_CLIENT_MSG, "Client message: \"%s\""},
-        {IDS_LOG_MSG_CREATION_DATE, "Creation date %s time %s%s"},
-        {IDS_LOG_MSG_FILE_LOGGER_PATH, "File logger path: %s%s"},
-        {IDS_LOG_MSG_VERSION, "Version: %s%s"},
-        {IDS_LOG_ERR_FILE_LOGGER_DISABLED,
-         "Log. File logger temporarily disabled due to file error '%s'"},
-        {IDS_LOG_MEDIUM_ERR_INIT, "Log. Medium '%s' initialise failed. %s"},
-        {IDS_LOG_MEDIUM_ERR_WRITE_ANY,
-         "Log. Failed to write log data to any medium."},
-        {IDS_LOG_MEDIUM_ERR_WRITE_MEDIUMFAIL,
-         "Log. One or mediums failed writing log data."},
-        {IDS_MEDIUMFILE_NAME, "File"},
-        {IDS_MEDIUMFILE_ERR_INVALID_PATH, "<Invalid - not set>"},
-        {IDS_MEDIUMFILE_ERR_FILE_HEADER, "<Invalid - header not set>"},
-        {IDS_MEDIUMFILE_NAME_LOG, "File medium. %s"},
-        {IDE_OS_ERR_UNKNOWN, "Unknown OS error"},
-        {IDE_OS_ERR_RETRIEVING, "Unabled to retrieve OS error message"},
-        {IDS_DRIVERMGR_DRIVER_ERR_INIT,
-         "Driver Manager. Driver '%s' (ID:'%s') initialise failed. %s"},
-        {IDE_MEDIUMSTDERR_NAME, "Stderr"},
-        {IDE_MEDIUMSTDOUT_NAME, "Stdout"},
-        {IDE_MI_APP_DESCRIPTION,
-         "Description:\nThe Machine Interface Driver (MI Driver) is a stand "
-         "alone executable\nthat either be used via "
-         "a client i.e. Eclipse or directly from the command\nline. It "
-         "processes MI commands, actions those commands "
-         "using the internal\ndebugger then forms MI response formatted text "
-         "which is returned to the\nclient."},
-        {IDE_MI_APP_INFORMATION,
-         "Information:\nCurrent limitations. The MI Driver currently only "
-         "handles remote target\ndebugging. Local "
-         "debugging has not been implemented. The MI Driver has\nbeen designed "
-         "primarily to be used with Eclipse Juno "
-         "and a custom plugin.\nThe custom plugin is not necessary to operate "
-         "the MI Driver."},
-        {IDE_MI_APP_ARG_USAGE, "\nMI driver usage:\n\n\tlldb-mi [--longOption] "
-                               "[-s hortOption] [executable]\n\n[] = optional "
-                               "argument."},
-        {IDE_MI_APP_ARG_HELP, "-h\n--help\n\tPrints out usage information for "
-                              "the MI debugger. Exit the MI\n\tDriver "
-                              "immediately."},
-        {IDE_MI_APP_ARG_VERSION, "--version\n\tPrints out GNU (gdb) version "
-                                 "information. Exit the MI "
-                                 "Driver\n\timmediately."},
-        {IDE_MI_APP_ARG_VERSION_LONG, "--versionLong\n\tPrints out MI Driver "
-                                      "version information. Exit the MI "
-                                      "Driver\n\timmediately."},
-        {IDE_MI_APP_ARG_INTERPRETER, "--interpreter\n\t This option is kept "
-                                     "for backward compatibility. This "
-                                     "executable always run in MI mode"},
-        {IDE_MI_APP_ARG_EXECUTEABLE, "--executable\n\tUse the MI Driver in MI "
-                                     "mode for the debugging the specified "
-                                     "executable."},
-        {IDE_MI_APP_ARG_SOURCE, "-s <filename>\n--source <filename>\n\t"
-                                "Tells the debugger to read in and execute the "
-                                "lldb commands in the\n\t"
-                                "given file, after any file provided on the "
-                                "command line has been\n\tloaded."},
-        {IDE_MI_APP_ARG_APP_LOG, "--log\n\tUse this argument to tell the MI "
-                                 "Driver to update it's log\n\tfile '%s'."},
-        {IDE_MI_APP_ARG_APP_LOG_DIR,
-         "--log-dir\n\tUse this argument to specify the directory the MI "
-         "Driver\n\twill place the log file in, i.e --log-dir=/tmp."},
-        {IDE_MI_APP_ARG_EXAMPLE, "Example MI command:\n\t3-info-gdb-mi-command "
-                                 "gdb-set\n\t3^done,command={exists=\"true\"}"},
-        {IDE_MI_APP_ARG_EXECUTABLE, "executable (NOT IMPLEMENTED)\n\tThe file "
-                                    "path to the executable i.e. '\"C:\\My "
-                                    "Dev\\foo.exe\"'."},
-        {IDE_MI_APP_ARG_SYNCHRONOUS, "--synchronous\n\tBlock until each command "
-                                     "has finished executing.\n\tUsed for testing only."},
-        {IDS_STDIN_ERR_INVALID_PROMPT,
-         "Stdin. Invalid prompt description '%s'"},
-        {IDS_STDIN_ERR_THREAD_CREATION_FAILED,
-         "Stdin. Thread creation failed '%s'"},
-        {IDS_STDIN_ERR_THREAD_DELETE, "Stdin. Thread failed to delete '%s'"},
-        {IDS_STDIN_ERR_CHKING_BYTE_AVAILABLE,
-         "Stdin. Peeking on stdin stream '%s'"},
-        {IDS_STDIN_INPUT_CTRL_CHARS,
-         "Stdin. Receive characters not handled as a command: "},
-        {IDS_CMD_QUIT_HELP,
-         "MI Driver Command: quit\n\tExit the MI Driver application."},
-        {IDS_THREADMGR_ERR_THREAD_ID_INVALID,
-         "Thread Mgr. Thread ID '%s' is not valid"},
-        {IDS_THREADMGR_ERR_THREAD_FAIL_CREATE,
-         "Thread Mgr: Failed to create thread '%s'"},
-        {IDS_THREADMGR_ERR_THREAD_ID_NOT_FOUND,
-         "Thread Mgr: Thread with ID '%s' not found"},
-        {IDS_THREADMGR_ERR_THREAD_STILL_ALIVE, "Thread Mgr: The thread(s) are "
-                                               "still alive at Thread Mgr "
-                                               "shutdown: %s"},
-        {IDS_FALLTHRU_DRIVER_CMD_RECEIVED,
-         "Fall Thru Driver. Received command '%s'. Is was %shandled"},
-        {IDS_CMDFACTORY_ERR_INVALID_CMD_NAME,
-         "Command factory. MI command name '%s' is invalid"},
-        {IDS_CMDFACTORY_ERR_INVALID_CMD_CR8FN,
-         "Command factory. Command creation function invalid for command '%s'. "
-         "Does function exist? Pointer assigned to it?"},
-        {IDS_CMDFACTORY_ERR_CMD_NOT_REGISTERED,
-         "Command factory. Command '%s' not registered"},
-        {IDS_CMDFACTORY_ERR_CMD_ALREADY_REGED,
-         "Command factory. Command '%s' by that name already registered"},
-        {IDS_CMDMGR_ERR_CMD_FAILED_CREATE,
-         "Command manager. Command creation failed. %s"},
-        {IDS_CMDMGR_ERR_CMD_INVOKER, "Command manager. %s "},
-        {IDS_MI_INIT_ERR_LOG, "Log. Error occurred during initialisation %s"},
-        {IDS_MI_INIT_ERR_RESOURCES,
-         "Resources. Error occurred during initialisation %s"},
-        {IDS_MI_INIT_ERR_INIT,
-         "Driver. Error occurred during initialisation %s"},
-        {IDS_MI_INIT_ERR_STREAMSTDIN,
-         "Stdin. Error occurred during initialisation %s"},
-        {IDS_MI_INIT_ERR_STREAMSTDIN_OSHANDLER, "Stdin. The OS specific stdin "
-                                                "stream handler has not been "
-                                                "specified for this OS"},
-        {IDS_MI_INIT_ERR_OS_STDIN_HANDLER,
-         "Stdin handler. Error occurred during initialisation %s"},
-        {IDS_MI_INIT_ERR_STREAMSTDOUT,
-         "Stdout. Error occurred during initialisation %s"},
-        {IDS_MI_INIT_ERR_STREAMSTDERR,
-         "Stderr. Error occurred during initialisation %s"},
-        {IDS_MI_INIT_ERR_FALLTHRUDRIVER,
-         "Fall Through Driver. Error occurred during initialisation %s"},
-        {IDS_MI_INIT_ERR_THREADMGR,
-         "Thread Mgr. Error occurred during initialisation %s"},
-        {IDS_MI_INIT_ERR_CMDINTERPRETER, "Command interpreter. %s"},
-        {IDS_MI_INIT_ERR_CMDMGR, "Command manager. %s"},
-        {IDS_MI_INIT_ERR_CMDFACTORY, "Command factory. %s"},
-        {IDS_MI_INIT_ERR_CMDINVOKER, "Command invoker. %s"},
-        {IDS_MI_INIT_ERR_CMDMONITOR, "Command monitor. %s"},
-        {IDS_MI_INIT_ERR_LLDBDEBUGGER, "LLDB Debugger. %s"},
-        {IDS_MI_INIT_ERR_DRIVERMGR, "Driver manager. %s"},
-        {IDS_MI_INIT_ERR_DRIVER, "Driver. %s"},
-        {IDS_MI_INIT_ERR_OUTOFBANDHANDLER, "Out-of-band handler. %s "},
-        {IDS_MI_INIT_ERR_DEBUGSESSIONINFO, "LLDB debug session info. %s "},
-        {IDS_MI_INIT_ERR_THREADMANAGER, "Unable to init thread manager."},
-        {IDS_MI_INIT_ERR_CLIENT_USING_DRIVER,
-         "Initialising the client to this driver failed."},
-        {IDS_MI_INIT_ERR_LOCAL_DEBUG_SESSION,
-         "Initialising a local debug session failed."},
-        {IDS_CODE_ERR_INVALID_PARAMETER_VALUE,
-         "Code. Invalid parameter passed to function '%s'"},
-        {IDS_CODE_ERR_INVALID_PARAM_NULL_POINTER,
-         "Code. NULL pointer passes as a parameter to function '%s'"},
-        {IDS_CODE_ERR_INVALID_ENUMERATION_VALUE,
-         "Code. Invalid enumeration value encountered in function '%s'"},
-        {
-            IDS_LLDBDEBUGGER_ERR_INVALIDLISTENER,
-            "LLDB Debugger. LLDB Listener is not valid",
-        },
-        {
-            IDS_LLDBDEBUGGER_ERR_INVALIDDEBUGGER,
-            "LLDB Debugger. LLDB Debugger is not valid",
-        },
-        {IDS_LLDBDEBUGGER_ERR_CLIENTDRIVER,
-         "LLDB Debugger. CMIDriverBase derived driver needs to be set prior to "
-         "CMICmnLLDBDDebugger initialisation"},
-        {IDS_LLDBDEBUGGER_ERR_STARTLISTENER,
-         "LLDB Debugger. Starting listening events for '%s' failed"},
-        {IDS_LLDBDEBUGGER_ERR_THREADCREATIONFAIL,
-         "LLDB Debugger. Thread creation failed '%s'"},
-        {IDS_LLDBDEBUGGER_ERR_THREAD_DELETE,
-         "LLDB Debugger. Thread failed to delete '%s'"},
-        {IDS_LLDBDEBUGGER_ERR_INVALIDBROADCASTER,
-         "LLDB Debugger. Invalid SB broadcaster class name '%s' "},
-        {IDS_LLDBDEBUGGER_ERR_INVALIDCLIENTNAME,
-         "LLDB Debugger. Invalid client name '%s' "},
-        {IDS_LLDBDEBUGGER_ERR_CLIENTNOTREGISTERED,
-         "LLDB Debugger. Client name '%s' not registered for listening events"},
-        {IDS_LLDBDEBUGGER_ERR_STOPLISTENER, "LLDB Debugger. Failure occurred "
-                                            "stopping event for client '%s' "
-                                            "SBBroadcaster '%s'"},
-        {IDS_LLDBDEBUGGER_ERR_BROADCASTER_NAME,
-         "LLDB Debugger. Broadcaster's name '%s' is not valid"},
-        {IDS_LLDBDEBUGGER_WRN_UNKNOWN_EVENT,
-         "LLDB Debugger. Unhandled event '%s'"},
-        {IDS_LLDBOUTOFBAND_ERR_UNKNOWN_EVENT,
-         "LLDB Out-of-band. Handling event for '%s', an event enumeration '%d' "
-         "not recognised"},
-        {IDS_LLDBOUTOFBAND_ERR_PROCESS_INVALID,
-         "LLDB Out-of-band. Invalid '%s' in '%s'"},
-        {IDS_LLDBOUTOFBAND_ERR_BRKPT_NOTFOUND, "LLDB Out-of-band. %s. "
-                                               "Breakpoint information for "
-                                               "breakpoint ID %d not found"},
-        {IDS_LLDBOUTOFBAND_ERR_BRKPT_INFO_GET,
-         "LLDB Out-of-band. %s. Failed to retrieve breakpoint information for "
-         "for breakpoint ID %d"},
-        {IDS_LLDBOUTOFBAND_ERR_BRKPT_INFO_SET, "LLDB Out-of-band. %s. Failed "
-                                               "to set breakpoint information "
-                                               "for for breakpoint ID %d"},
-        {IDS_LLDBOUTOFBAND_ERR_FORM_MI_RESPONSE,
-         "LLDB Out-of-band. %s. Failed to form the MI Out-of-band response"},
-        {IDS_LLDBOUTOFBAND_ERR_FRAME_INFO_GET,
-         "LLDB Out-of-band. %s. Failed to retrieve frame information"},
-        {IDS_LLDBOUTOFBAND_ERR_SETNEWDRIVERSTATE,
-         "LLDB Out-of-band. %s. Event handler tried to set new MI Driver "
-         "running state and failed. %s"},
-        {IDS_LLDBOUTOFBAND_ERR_BRKPT_CNT_EXCEEDED,
-         "LLDB Out-of-band. '%s'. Number of valid breakpoint exceeded %d. "
-         "Cannot create new breakpoint with ID %d"},
-        {IDS_DBGSESSION_ERR_SHARED_DATA_ADD, "LLDB debug session info. Failed "
-                                             "to add '%s' data to the shared "
-                                             "data command container"},
-        {IDS_MI_SHTDWN_ERR_LOG, "Log. Error occurred during shutdown. %s"},
-        {IDS_MI_SHUTDOWN_ERR, "Server shutdown failure. %s"},
-        {IDE_MI_SHTDWN_ERR_RESOURCES,
-         "Resources. Error occurred during shutdown. %s"},
-        {IDE_MI_SHTDWN_ERR_STREAMSTDIN,
-         "Stdin. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_OS_STDIN_HANDLER,
-         "Stdin handler. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_STREAMSTDOUT,
-         "Stdout. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_STREAMSTDERR,
-         "Stderr. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_THREADMGR,
-         "Thread Mgr. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_CMDINTERPRETER,
-         "Command interpreter. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_CMDMGR,
-         "Command manager. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_CMDFACTORY,
-         "Command factory. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_CMDMONITOR,
-         "Command invoker. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_CMDINVOKER,
-         "Command monitor. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_LLDBDEBUGGER,
-         "LLDB Debugger. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_DRIVERMGR,
-         "Driver manager. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_DRIVER,
-         "Driver. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_OUTOFBANDHANDLER,
-         "Out-of-band handler. Error occurred during shutdown. %s"},
-        {IDS_MI_SHTDWN_ERR_DEBUGSESSIONINFO,
-         "LLDB debug session info. Error occurred during shutdown. %s"},
-        {IDE_MI_SHTDWN_ERR_THREADMANAGER, "Unable to shutdown thread manager"},
-        {IDS_DRIVER_ERR_PARSE_ARGS,
-         "Driver. Driver '%s'. Parse args error '%s'"},
-        {IDS_DRIVER_ERR_PARSE_ARGS_UNKNOWN,
-         "Driver. Driver '%s'. Parse args error unknown"},
-        {IDS_DRIVER_ERR_CURRENT_NOT_SET,
-         "Driver. Current working driver has not been set. Call "
-         "CMIDriverMgr::SetUseThisDriverToDoWork()"},
-        {IDS_DRIVER_ERR_NON_REGISTERED, "Driver. No suitable drivers "
-                                        "registered with the CMIDriverMgr to "
-                                        "do work"},
-        {IDS_DRIVER_SAY_DRIVER_USING, "Driver. Using driver '%s' internally"},
-        {IDS_DRIVER_ERR_ID_INVALID, "Driver. Driver '%s' invalid ID '%s'"},
-        {IDS_DRIVER_ERR_FALLTHRU_DRIVER_ERR,
-         "Driver. Fall through driver '%s' (ID:'%s') error '%s'"},
-        {IDS_DRIVER_CMD_RECEIVED,
-         "Driver. Received command '%s'. It was %shandled%s"},
-        {IDS_DRIVER_CMD_NOT_IN_FACTORY,
-         ". Command '%s' not in Command Factory"},
-        {
-            IDS_DRIVER_ERR_DRIVER_STATE_ERROR,
-            "Driver. Driver running state error. Cannot go to next state from "
-            "present state as not allowed",
-        },
-        {IDS_DRIVER_WAITING_STDIN_DATA, "Driver. Main thread suspended waiting "
-                                        "on Stdin Monitor to resume main "
-                                        "thread"},
-        {IDS_DRIVER_ERR_MAINLOOP, "Driver. Error in do main loop. %s"},
-        {IDS_DRIVER_ERR_LOCAL_DEBUG_NOT_IMPL, "Driver. --executable argument "
-                                              "given. Local debugging is not "
-                                              "implemented."},
-        {IDS_DRIVER_ERR_LOCAL_DEBUG_INIT, "Driver. --executable argument "
-                                          "given. Initialising local debugging "
-                                          "failed."},
-        {IDS_STDERR_ERR_NOT_ALL_DATA_WRITTEN,
-         "Stderr. Not all data was written to stream. The data '%s'"},
-        {IDS_CMD_ARGS_ERR_OPTION_NOT_FOUND,
-         "Command Args. Option '%s' not found"},
-        {IDS_CMD_ARGS_ERR_VALIDATION_MANDATORY, "Mandatory args not found: %s"},
-        {IDS_CMD_ARGS_ERR_VALIDATION_INVALID, "Invalid args: %s"},
-        {IDS_CMD_ARGS_ERR_VALIDATION_MAN_INVALID,
-         "Mandatory args not found: %s. Invalid args: %s"},
-        {IDS_CMD_ARGS_ERR_VALIDATION_MISSING_INF,
-         "Args missing additional information: %s"},
-        {IDS_CMD_ARGS_ERR_CONTEXT_NOT_ALL_EATTEN,
-         "Not all arguments or options were recognised: %s"},
-        {IDS_CMD_ARGS_ERR_PREFIX_MSG, "Command Args. Validation failed. "},
-        {IDS_VARIANT_ERR_USED_BASECLASS, "Variant container: Variant object "
-                                         "used the base class. See "
-                                         "CMIUtilVariant"},
-        {IDS_VARIANT_ERR_MAP_KEY_INVALID, "Variant container: Invalid ID '%s'"},
-        {IDS_WORD_INVALIDBRKTS, "<Invalid>"},
-        {IDS_WORD_NONE, "None"},
-        {IDS_WORD_NOT, "not"},
-        {IDS_WORD_INVALIDEMPTY, "<empty>"},
-        {IDS_WORD_INVALIDNULLPTR, "<NULL ptr>"},
-        {IDS_WORD_UNKNOWNBRKTS, "<unknown>"},
-        {IDS_WORD_NOT_IMPLEMENTED, "Not implemented"},
-        {IDS_WORD_NOT_IMPLEMENTED_BRKTS, "<not implemented>"},
-        {IDS_WORD_UNKNOWNTYPE_BRKTS, "<unknowntype>"},
-        {IDS_WORD_ERR_MSG_NOT_IMPLEMENTED_BRKTS,
-         "<error message not implemented>"},
-        {IDS_CMD_ERR_N_OPTIONS_REQUIRED,
-         "Command '%s'. Missing options, %d required"},
-        {IDS_CMD_ERR_OPTION_NOT_FOUND, "Command '%s'. Option '%s' not found"},
-        {IDS_CMD_ERR_ARGS, "Command '%s'. %s"},
-        {IDS_CMD_WRN_ARGS_NOT_HANDLED, "Command '%s'. Warning the following "
-                                       "options not handled by the command: "
-                                       "%s"},
-        {IDS_CMD_ERR_FNFAILED, "Command '%s'. Fn '%s' failed"},
-        {IDS_CMD_ERR_SHARED_DATA_NOT_FOUND,
-         "Command '%s'. Shared data '%s' not found"},
-        {IDS_CMD_ERR_LLDBPROCESS_DETACH,
-         "Command '%s'. Process detach failed. '%s'"},
-        {IDS_CMD_ERR_LLDBPROCESS_DESTROY,
-         "Command '%s'. Process destroy failed. '%s'"},
-        {IDS_CMD_ERR_SETWKDIR,
-         "Command '%s'. Failed to set working directory '%s'"},
-        {IDS_CMD_ERR_INVALID_TARGET,
-         "Command '%s'. Target binary '%s' is invalid. %s"},
-        {IDS_CMD_ERR_INVALID_TARGET_CURRENT,
-         "Command '%s'. Current SBTarget is invalid"},
-        {IDS_CMD_ERR_INVALID_TARGET_TYPE,
-         "Command '%s'. Target type '%s' is not recognised"},
-        {IDS_CMD_ERR_INVALID_TARGET_PLUGIN,
-         "Command '%s'. Target plugin is invalid. %s"},
-        {IDS_CMD_ERR_CONNECT_TO_TARGET,
-         "Command '%s'. Error connecting to target: '%s'"},
-        {IDS_CMD_ERR_INVALID_TARGETPLUGINCURRENT,
-         "Command '%s'. Current target plugin is invalid"},
-        {IDS_CMD_ERR_NOT_IMPLEMENTED, "Command '%s'. Command not implemented"},
-        {IDS_CMD_ERR_NOT_IMPLEMENTED_DEPRECATED,
-         "Command '%s'. Command not implemented as it has been deprecated"},
-        {IDS_CMD_ERR_CREATE_TARGET, "Command '%s'. Create target failed: %s"},
-        {IDS_CMD_ERR_BRKPT_LOCATION_FORMAT,
-         "Command '%s'. Incorrect format for breakpoint location '%s'"},
-        {IDS_CMD_ERR_BRKPT_LOCATION_NOT_FOUND,
-         "Command '%s'. Breakpoint location '%s' not found"},
-        {IDS_CMD_ERR_BRKPT_INVALID, "Command '%s'. Breakpoint '%s' invalid"},
-        {IDS_CMD_ERR_BRKPT_CNT_EXCEEDED, "Command '%s'. Number of valid "
-                                         "breakpoint exceeded %d. Cannot "
-                                         "create new breakpoint '%s'"},
-        {IDS_CMD_ERR_SOME_ERROR, "Command '%s'. Error: %s"},
-        {IDS_CMD_ERR_THREAD_INVALID, "Command '%s'. Thread ID invalid"},
-        {IDS_CMD_ERR_THREAD_FRAME_RANGE_INVALID,
-         "Command '%s'. Thread frame range invalid"},
-        {IDS_CMD_ERR_FRAME_INVALID, "Command '%s'. Frame ID invalid"},
-        {IDS_CMD_ERR_VARIABLE_DOESNOTEXIST,
-         "Command '%s'. Variable '%s' does not exist"},
-        {IDS_CMD_ERR_VARIABLE_ENUM_INVALID, "Command '%s'. Invalid enumeration "
-                                            "for variable '%s' formatted "
-                                            "string '%s'"},
-        {IDS_CMD_ERR_VARIABLE_EXPRESSIONPATH,
-         "Command '%s'. Failed to get expression for variable '%s'"},
-        {IDS_CMD_ERR_VARIABLE_CREATION_FAILED,
-         "Failed to create variable object for '%s'"},
-        {IDS_CMD_ERR_VARIABLE_CHILD_RANGE_INVALID,
-         "Command '%s'. Variable children range invalid"},
-        {IDS_CMD_ERR_CMD_RUN_BUT_NO_ACTION, "<Error: Command run but command "
-                                            "did not do anything useful. No MI "
-                                            "response formed>"},
-        {IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION,
-         "<Error: Command run and event caught, did nothing useful. No MI "
-         "Out-of-Bound formed>"},
-        {IDS_CMD_ERR_DISASM_ADDR_START_INVALID,
-         "Command '%s'. Invalid start value '%s'"},
-        {IDS_CMD_ERR_DISASM_ADDR_END_INVALID,
-         "Command '%s'. Invalid end value '%s'"},
-        {IDS_CMD_ERR_MEMORY_ALLOC_FAILURE,
-         "Command '%s'. Failed to allocate memory %d bytes"},
-        {IDS_CMD_ERR_LLDB_ERR_NOT_READ_WHOLE_BLK,
-         "Command '%s'. LLDB unable to read entire memory block of %u bytes at "
-         "address 0x%016" PRIx64},
-        {IDS_CMD_ERR_LLDB_ERR_READ_MEM_BYTES, "Command '%s'. Unable to read "
-                                              "memory block of %u bytes at "
-                                              "address 0x%016" PRIx64 ": %s "},
-        {IDS_CMD_ERR_INVALID_PROCESS,
-         "Command '%s'. Invalid process during debug session"},
-        {IDS_CMD_ERR_INVALID_PRINT_VALUES,
-         "Command '%s'. Unknown value for PRINT_VALUES: must be: 0 or "
-         "\"--no-values\", 1 or \"--all-values\", 2 or \"--simple-values\""},
-        {IDS_CMD_ERR_INVALID_LOCATION_FORMAT,
-         "Command '%s'. Invalid location format '%s'"},
-        {IDS_CMD_ERR_INVALID_FORMAT_TYPE,
-         "Command '%s'. Invalid var format type '%s'"},
-        {IDS_CMD_ERR_BRKPT_INFO_OBJ_NOT_FOUND,
-         "Command '%s'. Breakpoint information for breakpoint ID %d not found"},
-        {IDS_CMD_ERR_LLDB_ERR_WRITE_MEM_BYTES, "Command '%s'. Unable to write "
-                                               "memory block of %u bytes at "
-                                               "address 0x%016" PRIx64 ": %s "},
-        {IDS_CMD_ERR_LLDB_ERR_NOT_WRITE_WHOLEBLK,
-         "Command '%s'. LLDB unable to write entire memory block of %u bytes "
-         "at address 0x%016" PRIX64},
-        {IDS_CMD_ERR_SET_NEW_DRIVER_STATE, "Command '%s'. Command tried to set "
-                                           "new MI Driver running state and "
-                                           "failed. %s"},
-        {IDS_CMD_ERR_INFO_PRINTFN_NOT_FOUND,
-         "The request '%s' was not recognised, not implemented"},
-        {IDS_CMD_ERR_INFO_PRINTFN_FAILED, "The request '%s' failed."},
-        {IDS_CMD_ERR_GDBSET_OPT_TARGETASYNC,
-         "'target-async' expects \"on\" or \"off\""},
-        {IDS_CMD_ERR_GDBSET_OPT_BREAKPOINT,
-         "'breakpoint' expects \"pending on\" or \"pending off\""},
-        {IDS_CMD_ERR_GDBSET_OPT_SOLIBSEARCHPATH,
-         "'solib-search-path' requires at least one argument"},
-        {IDS_CMD_ERR_GDBSET_OPT_PRINT_BAD_ARGS,
-         "'print' expects option-name and \"on\" or \"off\""},
-        {IDS_CMD_ERR_GDBSET_OPT_PRINT_UNKNOWN_OPTION,
-         "'print' error. The option '%s' not found"},
-        {IDS_CMD_ERR_GDBSHOW_OPT_PRINT_BAD_ARGS,
-         "'print' expects option-name and \"on\" or \"off\""},
-        {IDS_CMD_ERR_GDBSHOW_OPT_PRINT_UNKNOWN_OPTION,
-         "'print' error. The option '%s' not found"},
-        {IDS_CMD_ERR_GDBSHOW_OPT_BREAKPOINT_BAD_ARGS,
-        "'breakpoint' expects option-name"},
-        {IDS_CMD_ERR_GDBSHOW_OPT_BREAKPOINT_UNKNOWN_OPTION,
-        "'breakpoint' error. The option '%s' not found"},
-        {IDS_CMD_ERR_EXPR_INVALID, "Failed to evaluate expression: %s"},
-        {IDS_CMD_ERR_ATTACH_FAILED,
-         "Command '%s'. Attach to process failed: %s"},
-        {IDS_CMD_ERR_ATTACH_BAD_ARGS,
-         "Command '%s'. Must specify either a PID or a Name"}};
-
-//++
-// Details: CMICmnResources constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnResources::CMICmnResources() : m_nResourceId2TextDataSize(0) {
-  // Do not use this constructor, use Initialize()
-}
-
-//++
-// Details: CMICmnResources destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnResources::~CMICmnResources() {
-  // Do not use this destructor, use Shutdown()
-}
-
-//++
-// Details: Initialize the resources and set locality for the server.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnResources::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = ReadResourceStringData();
-
-  return m_bInitialized;
-}
-
-//++
-// Details: Release resources for *this object.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnResources::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  // Tear down resource explicitly
-  m_mapRscrIdToTextData.clear();
-
-  m_bInitialized = false;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Initialize the resources and set locality for the server.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnResources::ReadResourceStringData() {
-  m_nResourceId2TextDataSize =
-      sizeof ms_pResourceId2TextData / sizeof ms_pResourceId2TextData[0];
-  for (MIuint i = 0; i < m_nResourceId2TextDataSize; i++) {
-    const SRsrcTextData *pRscrData = &ms_pResourceId2TextData[i];
-    MapPairRscrIdToTextData_t pr(pRscrData->id, pRscrData->pTextData);
-    m_mapRscrIdToTextData.insert(pr);
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the corresponding text assigned to the resource ID.
-// Type:    Method.
-// Args:    vResourceId - (R) MI resource ID.
-// Return:  CMIUtilString - Resource text.
-// Throws:  None.
-//--
-CMIUtilString CMICmnResources::GetString(const MIuint vResourceId) const {
-  CMIUtilString str;
-  const bool bFound = GetStringFromResource(vResourceId, str);
-  MIunused(bFound);
-  assert(bFound);
-
-  return str;
-}
-
-//++
-// Details: Determine the MI resource ID existings.
-// Type:    Method.
-// Args:    vResourceId - (R) MI resource ID.
-// Return:  True - Exists.
-//          False - Not found.
-// Throws:  None.
-//--
-bool CMICmnResources::HasString(const MIuint vResourceId) const {
-  CMIUtilString str;
-  return GetStringFromResource(vResourceId, str);
-}
-
-//++
-// Details: Retrieve the resource text data for the given resource ID. If a
-// resource ID
-//          cannot be found and error is given returning the ID of the resource
-//          that
-//          cannot be located.
-// Type:    Method.
-// Args:    vResourceId         - (R) MI resource ID.
-//          vrwResourceString   - (W) Text.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnResources::GetStringFromResource(
-    const MIuint vResourceId, CMIUtilString &vrwResourceString) const {
-  MapRscrIdToTextData_t::const_iterator it =
-      m_mapRscrIdToTextData.find(vResourceId);
-  if (it == m_mapRscrIdToTextData.end()) {
-    // Check this is a static variable init that needs this before we are ready
-    if (!m_bInitialized) {
-      (const_cast<CMICmnResources *>(this))->Initialize();
-      it = m_mapRscrIdToTextData.find(vResourceId);
-      if (it == m_mapRscrIdToTextData.end()) {
-        vrwResourceString = MIRSRC(IDS_RESOURCES_ERR_STRING_TABLE_INVALID);
-        return MIstatus::failure;
-      }
-    }
-
-    if (it == m_mapRscrIdToTextData.end()) {
-      vrwResourceString = CMIUtilString::Format(
-          MIRSRC(IDS_RESOURCES_ERR_STRING_NOT_FOUND), vResourceId);
-      return MIstatus::failure;
-    }
-  }
-
-  const MIuint nRsrcId((*it).first);
-  MIunused(nRsrcId);
-  const char *pRsrcData((*it).second);
-
-  // Return result
-  vrwResourceString = pRsrcData;
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnResources.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnResources.h
deleted file mode 100644
index 111b0c3..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnResources.h
+++ /dev/null
@@ -1,339 +0,0 @@
-//===-- MICmnResources.h ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers
-#include <map>
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI string test data resource definitions. These IDs match up with
-//          actual string data in a map internal to CMICmnResources.
-//          *** Be sure to update ms_pResourceId2TextData[] array ****
-enum {
-  IDS_PROJNAME = 1,
-  IDS_MI_VERSION_DESCRIPTION_DEBUG,
-  IDS_MI_VERSION_DESCRIPTION,
-  IDS_MI_APPNAME_SHORT,
-  IDS_MI_APPNAME_LONG,
-  IDS_MI_APP_FILEPATHNAME,
-  IDS_MI_APP_ARGS,
-  IDE_MI_VERSION_GDB,
-
-  IDS_UTIL_FILE_ERR_INVALID_PATHNAME,
-  IDS_UTIL_FILE_ERR_OPENING_FILE,
-  IDS_UTIL_FILE_ERR_OPENING_FILE_UNKNOWN,
-  IDE_UTIL_FILE_ERR_WRITING_FILE,
-  IDE_UTIL_FILE_ERR_WRITING_NOTOPEN,
-
-  IDS_RESOURCES_ERR_STRING_NOT_FOUND,
-  IDS_RESOURCES_ERR_STRING_TABLE_INVALID,
-
-  IDS_MI_CLIENT_MSG,
-
-  IDS_LOG_MSG_CREATION_DATE,
-  IDS_LOG_MSG_FILE_LOGGER_PATH,
-  IDS_LOG_MSG_VERSION,
-  IDS_LOG_ERR_FILE_LOGGER_DISABLED,
-  IDS_LOG_MEDIUM_ERR_INIT,
-  IDS_LOG_MEDIUM_ERR_WRITE_ANY,
-  IDS_LOG_MEDIUM_ERR_WRITE_MEDIUMFAIL,
-
-  IDS_MEDIUMFILE_NAME,
-  IDS_MEDIUMFILE_ERR_INVALID_PATH,
-  IDS_MEDIUMFILE_ERR_FILE_HEADER,
-  IDS_MEDIUMFILE_NAME_LOG,
-
-  IDE_OS_ERR_UNKNOWN,
-  IDE_OS_ERR_RETRIEVING,
-
-  IDS_DRIVERMGR_DRIVER_ERR_INIT,
-
-  IDE_MEDIUMSTDERR_NAME,
-  IDE_MEDIUMSTDOUT_NAME,
-
-  IDE_MI_APP_DESCRIPTION,
-  IDE_MI_APP_INFORMATION,
-  IDE_MI_APP_ARG_USAGE,
-  IDE_MI_APP_ARG_HELP,
-  IDE_MI_APP_ARG_VERSION,
-  IDE_MI_APP_ARG_VERSION_LONG,
-  IDE_MI_APP_ARG_INTERPRETER,
-  IDE_MI_APP_ARG_EXECUTEABLE,
-  IDE_MI_APP_ARG_SOURCE,
-  IDE_MI_APP_ARG_APP_LOG,
-  IDE_MI_APP_ARG_APP_LOG_DIR,
-  IDE_MI_APP_ARG_EXAMPLE,
-  IDE_MI_APP_ARG_EXECUTABLE,
-  IDE_MI_APP_ARG_SYNCHRONOUS,
-
-  IDS_STDIN_ERR_INVALID_PROMPT,
-  IDS_STDIN_ERR_THREAD_CREATION_FAILED,
-  IDS_STDIN_ERR_THREAD_DELETE,
-  IDS_STDIN_ERR_CHKING_BYTE_AVAILABLE,
-  IDS_STDIN_INPUT_CTRL_CHARS,
-
-  IDS_CMD_QUIT_HELP,
-
-  IDS_THREADMGR_ERR_THREAD_ID_INVALID,
-  IDS_THREADMGR_ERR_THREAD_FAIL_CREATE,
-  IDS_THREADMGR_ERR_THREAD_ID_NOT_FOUND,
-  IDS_THREADMGR_ERR_THREAD_STILL_ALIVE,
-
-  IDS_FALLTHRU_DRIVER_CMD_RECEIVED,
-
-  IDS_CMDFACTORY_ERR_INVALID_CMD_NAME,
-  IDS_CMDFACTORY_ERR_INVALID_CMD_CR8FN,
-  IDS_CMDFACTORY_ERR_CMD_NOT_REGISTERED,
-  IDS_CMDFACTORY_ERR_CMD_ALREADY_REGED,
-
-  IDS_CMDMGR_ERR_CMD_FAILED_CREATE,
-  IDS_CMDMGR_ERR_CMD_INVOKER,
-
-  IDS_MI_INIT_ERR_LOG,
-  IDS_MI_INIT_ERR_RESOURCES,
-  IDS_MI_INIT_ERR_INIT,
-  IDS_MI_INIT_ERR_STREAMSTDIN,
-  IDS_MI_INIT_ERR_STREAMSTDIN_OSHANDLER,
-  IDS_MI_INIT_ERR_OS_STDIN_HANDLER,
-  IDS_MI_INIT_ERR_STREAMSTDOUT,
-  IDS_MI_INIT_ERR_STREAMSTDERR,
-  IDS_MI_INIT_ERR_FALLTHRUDRIVER,
-  IDS_MI_INIT_ERR_THREADMGR,
-  IDS_MI_INIT_ERR_CMDINTERPRETER,
-  IDS_MI_INIT_ERR_CMDMGR,
-  IDS_MI_INIT_ERR_CMDFACTORY,
-  IDS_MI_INIT_ERR_CMDINVOKER,
-  IDS_MI_INIT_ERR_CMDMONITOR,
-  IDS_MI_INIT_ERR_LLDBDEBUGGER,
-  IDS_MI_INIT_ERR_DRIVERMGR,
-  IDS_MI_INIT_ERR_DRIVER,
-  IDS_MI_INIT_ERR_OUTOFBANDHANDLER,
-  IDS_MI_INIT_ERR_DEBUGSESSIONINFO,
-  IDS_MI_INIT_ERR_THREADMANAGER,
-  IDS_MI_INIT_ERR_CLIENT_USING_DRIVER,
-  IDS_MI_INIT_ERR_LOCAL_DEBUG_SESSION,
-
-  IDS_CODE_ERR_INVALID_PARAMETER_VALUE,
-  IDS_CODE_ERR_INVALID_PARAM_NULL_POINTER,
-  IDS_CODE_ERR_INVALID_ENUMERATION_VALUE,
-
-  IDS_LLDBDEBUGGER_ERR_INVALIDLISTENER,
-  IDS_LLDBDEBUGGER_ERR_INVALIDDEBUGGER,
-  IDS_LLDBDEBUGGER_ERR_CLIENTDRIVER,
-  IDS_LLDBDEBUGGER_ERR_STARTLISTENER,
-  IDS_LLDBDEBUGGER_ERR_THREADCREATIONFAIL,
-  IDS_LLDBDEBUGGER_ERR_THREAD_DELETE,
-  IDS_LLDBDEBUGGER_ERR_INVALIDBROADCASTER,
-  IDS_LLDBDEBUGGER_ERR_INVALIDCLIENTNAME,
-  IDS_LLDBDEBUGGER_ERR_CLIENTNOTREGISTERED,
-  IDS_LLDBDEBUGGER_ERR_STOPLISTENER,
-  IDS_LLDBDEBUGGER_ERR_BROADCASTER_NAME,
-  IDS_LLDBDEBUGGER_WRN_UNKNOWN_EVENT,
-
-  IDS_LLDBOUTOFBAND_ERR_UNKNOWN_EVENT,
-  IDS_LLDBOUTOFBAND_ERR_PROCESS_INVALID,
-  IDS_LLDBOUTOFBAND_ERR_BRKPT_NOTFOUND,
-  IDS_LLDBOUTOFBAND_ERR_BRKPT_INFO_GET,
-  IDS_LLDBOUTOFBAND_ERR_BRKPT_INFO_SET,
-  IDS_LLDBOUTOFBAND_ERR_FORM_MI_RESPONSE,
-  IDS_LLDBOUTOFBAND_ERR_FRAME_INFO_GET,
-  IDS_LLDBOUTOFBAND_ERR_SETNEWDRIVERSTATE,
-  IDS_LLDBOUTOFBAND_ERR_BRKPT_CNT_EXCEEDED,
-
-  IDS_DBGSESSION_ERR_SHARED_DATA_ADD,
-
-  IDS_MI_SHTDWN_ERR_LOG,
-  IDS_MI_SHUTDOWN_ERR,
-  IDE_MI_SHTDWN_ERR_RESOURCES,
-  IDE_MI_SHTDWN_ERR_STREAMSTDIN,
-  IDS_MI_SHTDWN_ERR_OS_STDIN_HANDLER,
-  IDS_MI_SHTDWN_ERR_STREAMSTDOUT,
-  IDS_MI_SHTDWN_ERR_STREAMSTDERR,
-  IDS_MI_SHTDWN_ERR_THREADMGR,
-  IDS_MI_SHTDWN_ERR_CMDINTERPRETER,
-  IDS_MI_SHTDWN_ERR_CMDMGR,
-  IDS_MI_SHTDWN_ERR_CMDFACTORY,
-  IDS_MI_SHTDWN_ERR_CMDINVOKER,
-  IDS_MI_SHTDWN_ERR_CMDMONITOR,
-  IDS_MI_SHTDWN_ERR_LLDBDEBUGGER,
-  IDS_MI_SHTDWN_ERR_DRIVERMGR,
-  IDS_MI_SHTDWN_ERR_DRIVER,
-  IDS_MI_SHTDWN_ERR_OUTOFBANDHANDLER,
-  IDS_MI_SHTDWN_ERR_DEBUGSESSIONINFO,
-  IDE_MI_SHTDWN_ERR_THREADMANAGER,
-
-  IDS_DRIVER_ERR_PARSE_ARGS,
-  IDS_DRIVER_ERR_PARSE_ARGS_UNKNOWN,
-  IDS_DRIVER_ERR_CURRENT_NOT_SET,
-  IDS_DRIVER_ERR_NON_REGISTERED,
-  IDS_DRIVER_SAY_DRIVER_USING,
-  IDS_DRIVER_ERR_ID_INVALID,
-  IDS_DRIVER_ERR_FALLTHRU_DRIVER_ERR,
-  IDS_DRIVER_CMD_RECEIVED,
-  IDS_DRIVER_CMD_NOT_IN_FACTORY,
-  IDS_DRIVER_ERR_DRIVER_STATE_ERROR,
-  IDS_DRIVER_ERR_MAINLOOP,
-  IDS_DRIVER_ERR_LOCAL_DEBUG_NOT_IMPL,
-  IDS_DRIVER_ERR_LOCAL_DEBUG_INIT,
-
-  IDS_DRIVER_WAITING_STDIN_DATA,
-
-  IDS_STDERR_ERR_NOT_ALL_DATA_WRITTEN,
-
-  IDS_CMD_ARGS_ERR_OPTION_NOT_FOUND,
-  IDS_CMD_ARGS_ERR_VALIDATION_MANDATORY,
-  IDS_CMD_ARGS_ERR_VALIDATION_INVALID,
-  IDS_CMD_ARGS_ERR_VALIDATION_MAN_INVALID,
-  IDS_CMD_ARGS_ERR_VALIDATION_MISSING_INF,
-  IDS_CMD_ARGS_ERR_CONTEXT_NOT_ALL_EATTEN,
-  IDS_CMD_ARGS_ERR_PREFIX_MSG,
-
-  IDS_VARIANT_ERR_USED_BASECLASS,
-  IDS_VARIANT_ERR_MAP_KEY_INVALID,
-
-  IDS_WORD_INVALIDBRKTS,
-  IDS_WORD_NONE,
-  IDS_WORD_NOT,
-  IDS_WORD_INVALIDEMPTY,
-  IDS_WORD_INVALIDNULLPTR,
-  IDS_WORD_UNKNOWNBRKTS,
-  IDS_WORD_NOT_IMPLEMENTED,
-  IDS_WORD_NOT_IMPLEMENTED_BRKTS,
-  IDS_WORD_UNKNOWNTYPE_BRKTS,
-  IDS_WORD_ERR_MSG_NOT_IMPLEMENTED_BRKTS,
-
-  IDS_CMD_ERR_N_OPTIONS_REQUIRED,
-  IDS_CMD_ERR_OPTION_NOT_FOUND,
-  IDS_CMD_ERR_ARGS,
-  IDS_CMD_WRN_ARGS_NOT_HANDLED,
-  IDS_CMD_ERR_FNFAILED,
-  IDS_CMD_ERR_SHARED_DATA_NOT_FOUND,
-  IDS_CMD_ERR_LLDBPROCESS_DETACH,
-  IDS_CMD_ERR_LLDBPROCESS_DESTROY,
-  IDS_CMD_ERR_SETWKDIR,
-  IDS_CMD_ERR_INVALID_TARGET,
-  IDS_CMD_ERR_INVALID_TARGET_CURRENT,
-  IDS_CMD_ERR_INVALID_TARGET_TYPE,
-  IDS_CMD_ERR_INVALID_TARGET_PLUGIN,
-  IDS_CMD_ERR_CONNECT_TO_TARGET,
-  IDS_CMD_ERR_INVALID_TARGETPLUGINCURRENT,
-  IDS_CMD_ERR_NOT_IMPLEMENTED,
-  IDS_CMD_ERR_NOT_IMPLEMENTED_DEPRECATED,
-  IDS_CMD_ERR_CREATE_TARGET,
-  IDS_CMD_ERR_BRKPT_LOCATION_FORMAT,
-  IDS_CMD_ERR_BRKPT_LOCATION_NOT_FOUND,
-  IDS_CMD_ERR_BRKPT_INVALID,
-  IDS_CMD_ERR_BRKPT_CNT_EXCEEDED,
-  IDS_CMD_ERR_SOME_ERROR,
-  IDS_CMD_ERR_THREAD_INVALID,
-  IDS_CMD_ERR_THREAD_FRAME_RANGE_INVALID,
-  IDS_CMD_ERR_FRAME_INVALID,
-  IDS_CMD_ERR_VARIABLE_DOESNOTEXIST,
-  IDS_CMD_ERR_VARIABLE_ENUM_INVALID,
-  IDS_CMD_ERR_VARIABLE_EXPRESSIONPATH,
-  IDS_CMD_ERR_VARIABLE_CREATION_FAILED,
-  IDS_CMD_ERR_VARIABLE_CHILD_RANGE_INVALID,
-  IDS_CMD_ERR_CMD_RUN_BUT_NO_ACTION,
-  IDS_CMD_ERR_EVENT_HANDLED_BUT_NO_ACTION,
-  IDS_CMD_ERR_DISASM_ADDR_START_INVALID,
-  IDS_CMD_ERR_DISASM_ADDR_END_INVALID,
-  IDS_CMD_ERR_MEMORY_ALLOC_FAILURE,
-  IDS_CMD_ERR_LLDB_ERR_NOT_READ_WHOLE_BLK,
-  IDS_CMD_ERR_LLDB_ERR_READ_MEM_BYTES,
-  IDS_CMD_ERR_INVALID_PROCESS,
-  IDS_CMD_ERR_INVALID_PRINT_VALUES,
-  IDS_CMD_ERR_INVALID_LOCATION_FORMAT,
-  IDS_CMD_ERR_INVALID_FORMAT_TYPE,
-  IDS_CMD_ERR_BRKPT_INFO_OBJ_NOT_FOUND,
-  IDS_CMD_ERR_LLDB_ERR_WRITE_MEM_BYTES,
-  IDS_CMD_ERR_LLDB_ERR_NOT_WRITE_WHOLEBLK,
-  IDS_CMD_ERR_SET_NEW_DRIVER_STATE,
-  IDS_CMD_ERR_INFO_PRINTFN_NOT_FOUND,
-  IDS_CMD_ERR_INFO_PRINTFN_FAILED,
-  IDS_CMD_ERR_GDBSET_OPT_TARGETASYNC,
-  IDS_CMD_ERR_GDBSET_OPT_BREAKPOINT,
-  IDS_CMD_ERR_GDBSET_OPT_SOLIBSEARCHPATH,
-  IDS_CMD_ERR_GDBSET_OPT_PRINT_BAD_ARGS,
-  IDS_CMD_ERR_GDBSET_OPT_PRINT_UNKNOWN_OPTION,
-  IDS_CMD_ERR_GDBSHOW_OPT_PRINT_BAD_ARGS,
-  IDS_CMD_ERR_GDBSHOW_OPT_PRINT_UNKNOWN_OPTION,
-  IDS_CMD_ERR_GDBSHOW_OPT_BREAKPOINT_BAD_ARGS,
-  IDS_CMD_ERR_GDBSHOW_OPT_BREAKPOINT_UNKNOWN_OPTION,
-  IDS_CMD_ERR_EXPR_INVALID,
-  IDS_CMD_ERR_ATTACH_FAILED,
-  IDS_CMD_ERR_ATTACH_BAD_ARGS
-};
-
-//++
-//============================================================================
-// Details: MI common code implementation class. Handle application resources
-//          and locality.
-//          Singleton class.
-//--
-class CMICmnResources : public CMICmnBase,
-                        public MI::ISingleton<CMICmnResources> {
-  friend class MI::ISingleton<CMICmnResources>;
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-
-  CMIUtilString GetString(const MIuint vResourceId) const;
-  bool HasString(const MIuint vResourceId) const;
-
-  // Typedef:
-private:
-  typedef std::map<MIuint, const char *> MapRscrIdToTextData_t;
-  typedef std::pair<MIuint, const char *> MapPairRscrIdToTextData_t;
-
-  // Enumerations:
-private:
-  enum Buffer_e { eBufferSize = 2048 };
-
-  // Structs:
-private:
-  struct SRsrcTextData {
-    MIuint id;
-    const char *pTextData;
-  };
-
-  // Methods:
-private:
-  /* ctor */ CMICmnResources();
-  /* ctor */ CMICmnResources(const CMICmnResources &);
-  void operator=(const CMICmnResources &);
-
-  bool GetStringFromResource(const MIuint vResourceId,
-                             CMIUtilString &vrwResourceString) const;
-  bool ReadResourceStringData();
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnResources() override;
-
-  // Attributes:
-private:
-  static const SRsrcTextData ms_pResourceId2TextData[];
-  //
-  MIuint m_nResourceId2TextDataSize;
-  MapRscrIdToTextData_t m_mapRscrIdToTextData;
-};
-
-//++ =========================================================================
-// Details: Macro short cut for retrieving a text data resource
-//--
-#define MIRSRC(x) CMICmnResources::Instance().GetString(x).c_str()
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStderr.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStderr.cpp
deleted file mode 100644
index f4f6a3a..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStderr.cpp
+++ /dev/null
@@ -1,249 +0,0 @@
-//===-- MICmnStreamStderr.cpp ------------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnStreamStderr.h"
-#include "MICmnLog.h"
-#include "MICmnResources.h"
-#include "MIDriver.h"
-
-//++
-// Details: CMICmnStreamStderr constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnStreamStderr::CMICmnStreamStderr() {}
-
-//++
-// Details: CMICmnStreamStderr destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnStreamStderr::~CMICmnStreamStderr() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this stderr stream.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStderr::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  bool bOk = MIstatus::success;
-
-#ifdef _MSC_VER
-// Debugging / I/O issues with client.
-// This is only required on Windows if you do not use ::flush(stderr). MI uses
-// ::flush(stderr)
-// It trys to ensure the process attached to the stderr steam gets ALL the data.
-//::setbuf( stderr, NULL );
-#endif // _MSC_VER
-
-  m_bInitialized = bOk;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Release resources for *this stderr stream.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStderr::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  ClrErrorDescription();
-
-  m_bInitialized = false;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Write text data to stderr. Prefix the message with "MI:". The text
-// data does
-//          not need to include a carriage line return as this is added to the
-//          text. The
-//          function also then passes the text data into the CMICmnLog logger.
-// Type:    Method.
-// Args:    vText       - (R) Text data.
-//          vbSendToLog - (R) True = Yes send to the Log file too, false = do
-//          not. (Dflt = true)
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStderr::Write(const CMIUtilString &vText,
-                               const bool vbSendToLog /* = true */) {
-  if (vText.length() == 0)
-    return MIstatus::failure;
-
-  const CMIUtilString strPrefixed(CMIUtilString::Format(
-      "%s: %s", CMIDriver::Instance().GetAppNameShort().c_str(),
-      vText.c_str()));
-
-  return WritePriv(strPrefixed, vText, vbSendToLog);
-}
-
-//++
-// Details: Write an LLDB text message to stderr.
-//          The text data does not need to include a carriage line return as
-//          this is added
-//          to the text. The function also then passes the text data into the
-//          CMICmnLog
-//          logger.
-// Type:    Method.
-// Args:    vText       - (R) Text data.
-//          vbSendToLog - (R) True = Yes send to the Log file too, false = do
-//          not. (Dflt = true)
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStderr::WriteLLDBMsg(const CMIUtilString &vText,
-                                      const bool vbSendToLog /* = true */) {
-  if (vText.length() == 0)
-    return MIstatus::failure;
-
-  const CMIUtilString strPrefixed(
-      CMIUtilString::Format("LLDB: %s", vText.c_str()));
-
-  return WritePriv(vText, strPrefixed, vbSendToLog);
-}
-
-//++
-// Details: Write text data to stderr. The text data does not need to
-//          include a carriage line return as this is added to the text. The
-//          function also
-//          then passes the text data into the CMICmnLog logger.
-// Type:    Method.
-// Args:    vText           - (R) Text data. May be prefixed with MI app's short
-// name.
-//          vTxtForLogFile  - (R) Text data.
-//          vbSendToLog     - (R) True = Yes send to the Log file too, false =
-//          do not. (Dflt = true)
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStderr::WritePriv(const CMIUtilString &vText,
-                                   const CMIUtilString &vTxtForLogFile,
-                                   const bool vbSendToLog /* = true */) {
-  if (vText.length() == 0)
-    return MIstatus::failure;
-
-  bool bOk = MIstatus::success;
-  {
-    // Grab the stderr thread lock while we print
-    CMIUtilThreadLock _lock(m_mutex);
-
-    // Send this text to stderr
-    const MIint status = ::fputs(vText.c_str(), stderr);
-    if (status == EOF) {
-      const CMIUtilString errMsg(CMIUtilString::Format(
-          MIRSRC(IDS_STDERR_ERR_NOT_ALL_DATA_WRITTEN), vText.c_str()));
-      SetErrorDescription(errMsg);
-      bOk = MIstatus::failure;
-    } else {
-      ::fprintf(stderr, "\n");
-      ::fflush(stderr);
-    }
-
-    // Send this text to the log
-    if (bOk && vbSendToLog)
-      bOk &= m_pLog->WriteLog(vTxtForLogFile);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Lock the availability of the stream stderr. Other users of *this
-// stream will
-//          be stalled until it is available (Unlock()).
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStderr::Lock() {
-  m_mutex.Lock();
-  return MIstatus::success;
-}
-
-//++
-// Details: Release a previously locked stderr.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStderr::Unlock() {
-  m_mutex.Unlock();
-  return MIstatus::success;
-}
-
-//++
-// Details: Take MI Driver text message and send to the stderr stream. Also
-// output to the
-//           MI Log file.
-// Type:    Static method.
-// Args:    vrTxt   - (R) Text.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStderr::TextToStderr(const CMIUtilString &vrTxt) {
-  const bool bLock = CMICmnStreamStderr::Instance().Lock();
-  const bool bOk = bLock && CMICmnStreamStderr::Instance().Write(vrTxt);
-  bLock &&CMICmnStreamStderr::Instance().Unlock();
-
-  return bOk;
-}
-
-//++
-// Details: Take an LLDB message and send to the stderr stream. The message is
-// not always
-//          an error message. The user has typed a command in to the Eclipse
-//          console (by-
-//          passing Eclipse) and this is the result message from LLDB back to
-//          the user.
-//          Also output to the MI Log file.
-// Type:    Static method.
-// Args:    vrTxt   - (R) Text.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStderr::LLDBMsgToConsole(const CMIUtilString &vrTxt) {
-  const bool bLock = CMICmnStreamStderr::Instance().Lock();
-  const bool bOk = bLock && CMICmnStreamStderr::Instance().WriteLLDBMsg(vrTxt);
-  bLock &&CMICmnStreamStderr::Instance().Unlock();
-
-  return bOk;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStderr.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStderr.h
deleted file mode 100644
index 65eea44..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStderr.h
+++ /dev/null
@@ -1,61 +0,0 @@
-//===-- MICmnStreamStderr.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilString.h"
-#include "MIUtilThreadBaseStd.h"
-
-//++
-//============================================================================
-// Details: MI common code class. The MI driver requires this object.
-//          CMICmnStreamStderr sets up and tears downs stderr for the driver.
-//
-//          Singleton class.
-//--
-class CMICmnStreamStderr : public CMICmnBase,
-                           public MI::ISingleton<CMICmnStreamStderr> {
-  friend class MI::ISingleton<CMICmnStreamStderr>;
-
-  // Statics:
-public:
-  static bool TextToStderr(const CMIUtilString &vrTxt);
-  static bool LLDBMsgToConsole(const CMIUtilString &vrTxt);
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-  //
-  bool Lock();
-  bool Unlock();
-  bool Write(const CMIUtilString &vText, const bool vbSendToLog = true);
-  bool WriteLLDBMsg(const CMIUtilString &vText, const bool vbSendToLog = true);
-
-  // Methods:
-private:
-  /* ctor */ CMICmnStreamStderr();
-  /* ctor */ CMICmnStreamStderr(const CMICmnStreamStderr &);
-  void operator=(const CMICmnStreamStderr &);
-  //
-  bool WritePriv(const CMIUtilString &vText,
-                 const CMIUtilString &vTxtForLogFile,
-                 const bool vbSendToLog = true);
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnStreamStderr() override;
-
-  // Attributes:
-private:
-  CMIUtilThreadMutex m_mutex; // Mutex object for sync during Write()
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdin.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdin.cpp
deleted file mode 100644
index 4084b36..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdin.cpp
+++ /dev/null
@@ -1,218 +0,0 @@
-//===-- MICmnStreamStdin.cpp ------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third Party Headers
-#ifdef _MSC_VER
-#include <windows.h>
-#endif
-#include <string.h>
-
-// In-house headers:
-#include "MICmnLog.h"
-#include "MICmnResources.h"
-#include "MICmnStreamStdin.h"
-#include "MICmnStreamStdout.h"
-#include "MIDriver.h"
-#include "MIUtilSingletonHelper.h"
-
-//++
-// Details: CMICmnStreamStdin constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnStreamStdin::CMICmnStreamStdin()
-    : m_strPromptCurrent("(gdb)"), m_bShowPrompt(true), m_pCmdBuffer(nullptr) {}
-
-//++
-// Details: CMICmnStreamStdin destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnStreamStdin::~CMICmnStreamStdin() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this Stdin stream.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdin::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  // Note initialisation order is important here as some resources depend on
-  // previous
-  MI::ModuleInit<CMICmnLog>(IDS_MI_INIT_ERR_LOG, bOk, errMsg);
-  MI::ModuleInit<CMICmnResources>(IDS_MI_INIT_ERR_RESOURCES, bOk, errMsg);
-
-  if (bOk) {
-    m_pCmdBuffer = new char[m_constBufferSize];
-  } else {
-    CMIUtilString strInitError(CMIUtilString::Format(
-        MIRSRC(IDS_MI_INIT_ERR_STREAMSTDIN), errMsg.c_str()));
-    SetErrorDescription(strInitError);
-
-    return MIstatus::failure;
-  }
-  m_bInitialized = bOk;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Release resources for *this Stdin stream.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdin::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = false;
-
-  ClrErrorDescription();
-
-  if (m_pCmdBuffer != nullptr) {
-    delete[] m_pCmdBuffer;
-    m_pCmdBuffer = nullptr;
-  }
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  MI::ModuleShutdown<CMICmnResources>(IDE_MI_SHTDWN_ERR_RESOURCES, bOk, errMsg);
-  MI::ModuleShutdown<CMICmnLog>(IDS_MI_SHTDWN_ERR_LOG, bOk, errMsg);
-
-  if (!bOk) {
-    SetErrorDescriptionn(MIRSRC(IDE_MI_SHTDWN_ERR_STREAMSTDIN), errMsg.c_str());
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Validate and set the text that forms the prompt on the command line.
-// Type:    Method.
-// Args:    vNewPrompt  - (R) Text description.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdin::SetPrompt(const CMIUtilString &vNewPrompt) {
-  if (vNewPrompt.empty()) {
-    const CMIUtilString msg(CMIUtilString::Format(
-        MIRSRC(IDS_STDIN_ERR_INVALID_PROMPT), vNewPrompt.c_str()));
-    CMICmnStreamStdout::Instance().Write(msg);
-    return MIstatus::failure;
-  }
-
-  m_strPromptCurrent = vNewPrompt;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the command line prompt text currently being used.
-// Type:    Method.
-// Args:    None.
-// Return:  const CMIUtilString & - Functional failed.
-// Throws:  None.
-//--
-const CMIUtilString &CMICmnStreamStdin::GetPrompt() const {
-  return m_strPromptCurrent;
-}
-
-//++
-// Details: Set whether to display optional command line prompt. The prompt is
-// output to
-//          stdout. Disable it when this may interfere with the client reading
-//          stdout as
-//          input and it tries to interpret the prompt text to.
-// Type:    Method.
-// Args:    vbYes   - (R) True = Yes prompt is shown/output to the user
-// (stdout), false = no prompt.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-void CMICmnStreamStdin::SetEnablePrompt(const bool vbYes) {
-  m_bShowPrompt = vbYes;
-}
-
-//++
-// Details: Get whether to display optional command line prompt. The prompt is
-// output to
-//          stdout. Disable it when this may interfere with the client reading
-//          stdout as
-//          input and it tries to interpret the prompt text to.
-// Type:    Method.
-// Args:    None.
-// Return:  bool - True = Yes prompt is shown/output to the user (stdout), false
-// = no prompt.
-// Throws:  None.
-//--
-bool CMICmnStreamStdin::GetEnablePrompt() const { return m_bShowPrompt; }
-
-//++
-// Details: Wait on new line of data from stdin stream (completed by '\n' or
-// '\r').
-// Type:    Method.
-// Args:    vwErrMsg    - (W) Empty string ok or error description.
-// Return:  char * - text buffer pointer or NULL on failure.
-// Throws:  None.
-//--
-const char *CMICmnStreamStdin::ReadLine(CMIUtilString &vwErrMsg) {
-  vwErrMsg.clear();
-
-  // Read user input
-  const char *pText = ::fgets(&m_pCmdBuffer[0], m_constBufferSize, stdin);
-  if (pText == nullptr) {
-#ifdef _MSC_VER
-    // Was Ctrl-C hit?
-    // On Windows, Ctrl-C gives an ERROR_OPERATION_ABORTED as error on the
-    // command-line.
-    // The end-of-file indicator is also set, so without this check we will exit
-    // next if statement.
-    if (::GetLastError() == ERROR_OPERATION_ABORTED)
-      return nullptr;
-#endif
-    if (::feof(stdin)) {
-      const bool bForceExit = true;
-      CMIDriver::Instance().SetExitApplicationFlag(bForceExit);
-    } else if (::ferror(stdin) != 0)
-      vwErrMsg = ::strerror(errno);
-    return nullptr;
-  }
-
-  // Strip off new line characters
-  for (char *pI = m_pCmdBuffer; *pI != '\0'; pI++) {
-    if ((*pI == '\n') || (*pI == '\r')) {
-      *pI = '\0';
-      break;
-    }
-  }
-
-  return pText;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdin.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdin.h
deleted file mode 100644
index b193757..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdin.h
+++ /dev/null
@@ -1,60 +0,0 @@
-//===-- MICmnStreamStdin.h --------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilString.h"
-#include "MIUtilThreadBaseStd.h"
-
-//++
-//============================================================================
-// Details: MI common code class. Used to handle stream data from Stdin.
-//          Singleton class using the Visitor pattern. A driver using the
-//          interface
-//          provide can receive callbacks when a new line of data is received.
-//          Each line is determined by a carriage return.
-//          A singleton class.
-//--
-class CMICmnStreamStdin : public CMICmnBase,
-                          public MI::ISingleton<CMICmnStreamStdin> {
-  // Give singleton access to private constructors
-  friend MI::ISingleton<CMICmnStreamStdin>;
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-  //
-  const CMIUtilString &GetPrompt() const;
-  bool SetPrompt(const CMIUtilString &vNewPrompt);
-  void SetEnablePrompt(const bool vbYes);
-  bool GetEnablePrompt() const;
-  const char *ReadLine(CMIUtilString &vwErrMsg);
-
-  // Methods:
-private:
-  /* ctor */ CMICmnStreamStdin();
-  /* ctor */ CMICmnStreamStdin(const CMICmnStreamStdin &);
-  void operator=(const CMICmnStreamStdin &);
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnStreamStdin() override;
-
-  // Attributes:
-private:
-  CMIUtilString m_strPromptCurrent; // Command line prompt as shown to the user
-  bool m_bShowPrompt; // True = Yes prompt is shown/output to the user (stdout),
-                      // false = no prompt
-  static const int m_constBufferSize = 2048;
-  char *m_pCmdBuffer;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdout.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdout.cpp
deleted file mode 100644
index 4a0e2d1..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdout.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-//===-- MICmnStreamStdout.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnStreamStdout.h"
-#include "MICmnLog.h"
-#include "MICmnResources.h"
-#include "MIDriver.h"
-
-//++
-// Details: CMICmnStreamStdout constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnStreamStdout::CMICmnStreamStdout() {}
-
-//++
-// Details: CMICmnStreamStdout destructor.
-// Type:    Overridable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnStreamStdout::~CMICmnStreamStdout() { Shutdown(); }
-
-//++
-// Details: Initialize resources for *this Stdout stream.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdout::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  bool bOk = MIstatus::success;
-
-#ifdef _MSC_VER
-// Debugging / I/O issues with client.
-// This is only required on Windows if you do not use ::flush(stdout). MI uses
-// ::flush(stdout)
-// It trys to ensure the process attached to the stdout steam gets ALL the data.
-//::setbuf( stdout, NULL );
-#endif // _MSC_VER
-
-  m_bInitialized = bOk;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Release resources for *this Stdout stream.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdout::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  ClrErrorDescription();
-
-  m_bInitialized = false;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Write an MI format type response to stdout. The text data does not
-// need to
-//          include a carriage line return as this is added to the text. The
-//          function also
-//          then passes the text data into the CMICmnLog logger.
-// Type:    Method.
-// Args:    vText       - (R) MI formatted text.
-//          vbSendToLog - (R) True = Yes send to the Log file too, false = do
-//          not. (Dflt = true)
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdout::WriteMIResponse(const CMIUtilString &vText,
-                                         const bool vbSendToLog /* = true */) {
-  return WritePriv(vText, vText, vbSendToLog);
-}
-
-//++
-// Details: Write text data to stdout. The text data does not need to
-//          include a carriage line return as this is added to the text. The
-//          function also
-//          then passes the text data into the CMICmnLog logger.
-// Type:    Method.
-// Args:    vText       - (R) Text data.
-//          vbSendToLog - (R) True = Yes send to the Log file too, false = do
-//          not. (Dflt = true)
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdout::Write(const CMIUtilString &vText,
-                               const bool vbSendToLog /* = true */) {
-  if (vText.length() == 0)
-    return MIstatus::failure;
-
-  const CMIUtilString strPrefixed(CMIUtilString::Format(
-      "%s: %s", CMIDriver::Instance().GetAppNameShort().c_str(),
-      vText.c_str()));
-
-  return WritePriv(strPrefixed, vText, vbSendToLog);
-}
-
-//++
-// Details: Write text data to stdout. The text data does not need to
-//          include a carriage line return as this is added to the text. The
-//          function also
-//          then passes the text data into the CMICmnLog logger.
-// Type:    Method.
-// Args:    vText           - (R) Text data prefixed with MI app's short name.
-//          vTxtForLogFile  - (R) Text data.
-//          vbSendToLog     - (R) True = Yes send to the Log file too, false =
-//          do not. (Dflt = true)
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdout::WritePriv(const CMIUtilString &vText,
-                                   const CMIUtilString &vTxtForLogFile,
-                                   const bool vbSendToLog /* = true */) {
-  if (vText.length() == 0)
-    return MIstatus::failure;
-
-  bool bOk = MIstatus::success;
-  {
-    // Grab the stdout thread lock while we print
-    CMIUtilThreadLock _lock(m_mutex);
-
-    // Send this text to stdout
-    const MIint status = ::fputs(vText.c_str(), stdout);
-    if (status == EOF)
-      // Don't call the CMICmnBase::SetErrorDescription() because it will cause
-      // a stack overflow:
-      // CMICmnBase::SetErrorDescription -> CMICmnStreamStdout::Write ->
-      // CMICmnStreamStdout::WritePriv -> CMICmnBase::SetErrorDescription
-      bOk = MIstatus::failure;
-    else {
-      ::fprintf(stdout, "\n");
-      ::fflush(stdout);
-    }
-
-    // Send this text to the log
-    if (bOk && vbSendToLog)
-      bOk &= m_pLog->WriteLog(vTxtForLogFile);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Lock the availability of the stream stdout. Other users of *this
-// stream will
-//          be stalled until it is available (Unlock()).
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdout::Lock() {
-  m_mutex.Lock();
-  return MIstatus::success;
-}
-
-//++
-// Details: Release a previously locked stdout.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdout::Unlock() {
-  m_mutex.Unlock();
-  return MIstatus::success;
-}
-
-//++
-// Details: Take a text data and send to the stdout stream. Also output to the
-// MI Log
-//          file.
-// Type:    Static method.
-// Args:    vrTxt   - (R) Text.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdout::TextToStdout(const CMIUtilString &vrTxt) {
-  const bool bSendToLog = true;
-  return CMICmnStreamStdout::Instance().WriteMIResponse(vrTxt, bSendToLog);
-}
-
-//++
-// Details: Write prompt to stdout if it's enabled.
-// Type:    Static method.
-// Args:    None.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMICmnStreamStdout::WritePrompt() {
-  const CMICmnStreamStdin &rStdinMan = CMICmnStreamStdin::Instance();
-  if (rStdinMan.GetEnablePrompt())
-    return TextToStdout(rStdinMan.GetPrompt());
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdout.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdout.h
deleted file mode 100644
index f73b56c..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnStreamStdout.h
+++ /dev/null
@@ -1,62 +0,0 @@
-//===-- MICmnStreamStdout.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilString.h"
-#include "MIUtilThreadBaseStd.h"
-
-//++
-//============================================================================
-// Details: MI common code class. The MI driver requires this object.
-//          CMICmnStreamStdout sets up and tears downs stdout for the driver.
-//
-//          Singleton class.
-//--
-class CMICmnStreamStdout : public CMICmnBase,
-                           public MI::ISingleton<CMICmnStreamStdout> {
-  friend class MI::ISingleton<CMICmnStreamStdout>;
-
-  // Statics:
-public:
-  static bool TextToStdout(const CMIUtilString &vrTxt);
-  static bool WritePrompt();
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-  //
-  bool Lock();
-  bool Unlock();
-  bool Write(const CMIUtilString &vText, const bool vbSendToLog = true);
-  bool WriteMIResponse(const CMIUtilString &vText,
-                       const bool vbSendToLog = true);
-
-  // Methods:
-private:
-  /* ctor */ CMICmnStreamStdout();
-  /* ctor */ CMICmnStreamStdout(const CMICmnStreamStdout &);
-  void operator=(const CMICmnStreamStdout &);
-  //
-  bool WritePriv(const CMIUtilString &vText,
-                 const CMIUtilString &vTxtForLogFile,
-                 const bool vbSendToLog = true);
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnStreamStdout() override;
-
-  // Attributes:
-private:
-  CMIUtilThreadMutex m_mutex; // Mutex object for sync during writing to stream
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnThreadMgrStd.cpp b/src/llvm-project/lldb/tools/lldb-mi/MICmnThreadMgrStd.cpp
deleted file mode 100644
index 25afbbc..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnThreadMgrStd.cpp
+++ /dev/null
@@ -1,145 +0,0 @@
-//===-- MICmnThreadMgrStd.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MICmnThreadMgrStd.h"
-#include "MICmnLog.h"
-#include "MICmnResources.h"
-#include "MIUtilSingletonHelper.h"
-
-//++
-// Details: CMICmnThreadMgr constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnThreadMgrStd::CMICmnThreadMgrStd() {}
-
-//++
-// Details: CMICmnThreadMgr destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMICmnThreadMgrStd::~CMICmnThreadMgrStd() { Shutdown(); }
-
-//++
-// Details: Initialise resources for *this thread manager.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnThreadMgrStd::Initialize() {
-  m_clientUsageRefCnt++;
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  bool bOk = MIstatus::success;
-
-  ClrErrorDescription();
-  CMIUtilString errMsg;
-
-  // Note initialisation order is important here as some resources depend on
-  // previous
-  MI::ModuleInit<CMICmnLog>(IDS_MI_INIT_ERR_LOG, bOk, errMsg);
-  MI::ModuleInit<CMICmnResources>(IDS_MI_INIT_ERR_RESOURCES, bOk, errMsg);
-
-  m_bInitialized = bOk;
-
-  if (!bOk) {
-    CMIUtilString strInitError(CMIUtilString::Format(
-        MIRSRC(IDS_MI_INIT_ERR_THREADMGR), errMsg.c_str()));
-    SetErrorDescription(strInitError);
-    return MIstatus::failure;
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Release resources for *this thread manager.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnThreadMgrStd::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = false;
-
-  ClrErrorDescription();
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  // Tidy up
-  ThreadAllTerminate();
-
-  // Note shutdown order is important here
-  MI::ModuleShutdown<CMICmnResources>(IDE_MI_SHTDWN_ERR_RESOURCES, bOk, errMsg);
-  MI::ModuleShutdown<CMICmnLog>(IDS_MI_SHTDWN_ERR_LOG, bOk, errMsg);
-
-  if (!bOk) {
-    SetErrorDescriptionn(MIRSRC(IDS_MI_SHUTDOWN_ERR), errMsg.c_str());
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Ask the thread manager to kill all threads and wait until they have
-// died
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnThreadMgrStd::ThreadAllTerminate() {
-  ThreadList_t::const_iterator it = m_threadList.begin();
-  for (; it != m_threadList.end(); ++it) {
-    // If the thread is still running
-    CMIUtilThreadActiveObjBase *pThread = *it;
-    if (pThread->ThreadIsActive()) {
-      // Ask this thread to kill itself
-      pThread->ThreadKill();
-
-      // Wait for this thread to die
-      pThread->ThreadJoin();
-    }
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Add a thread object to *this manager's list of thread objects. The
-// list to
-//          used to manage thread objects centrally.
-// Type:    Method.
-// Args:    vrObj   - (R) A thread object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMICmnThreadMgrStd::AddThread(const CMIUtilThreadActiveObjBase &vrObj) {
-  m_threadList.push_back(const_cast<CMIUtilThreadActiveObjBase *>(&vrObj));
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MICmnThreadMgrStd.h b/src/llvm-project/lldb/tools/lldb-mi/MICmnThreadMgrStd.h
deleted file mode 100644
index ce8dd705..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MICmnThreadMgrStd.h
+++ /dev/null
@@ -1,123 +0,0 @@
-//===-- MICmnThreadMgrStd.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include <vector>
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MICmnResources.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilThreadBaseStd.h"
-
-//++
-//============================================================================
-// Details: MI's worker thread (active thread) manager.
-//          The manager creates threads and behalf of clients. Client are
-//          responsible for their threads and can delete them when necessary.
-//          This manager will stop and delete all threads on *this manager's
-//          shutdown.
-//          Singleton class.
-//--
-class CMICmnThreadMgrStd : public CMICmnBase,
-                           public MI::ISingleton<CMICmnThreadMgrStd> {
-  friend MI::ISingleton<CMICmnThreadMgrStd>;
-
-  // Methods:
-public:
-  bool Initialize() override;
-  bool Shutdown() override;
-  bool ThreadAllTerminate(); // Ask all threads to stop (caution)
-  template <typename T> // Ask the thread manager to start and stop threads on
-                        // our behalf
-                        bool ThreadStart(T &vrwObject);
-
-  // Typedef:
-private:
-  typedef std::vector<CMIUtilThreadActiveObjBase *> ThreadList_t;
-
-  // Methods:
-private:
-  /* ctor */ CMICmnThreadMgrStd();
-  /* ctor */ CMICmnThreadMgrStd(const CMICmnThreadMgrStd &);
-  void operator=(const CMICmnThreadMgrStd &);
-  //
-  bool AddThread(const CMIUtilThreadActiveObjBase &
-                     vrObj); // Add a thread for monitoring by the threadmanager
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMICmnThreadMgrStd() override;
-
-  // Attributes:
-private:
-  CMIUtilThreadMutex m_mutex;
-  ThreadList_t m_threadList;
-};
-
-//++
-// Details: Given a thread object start its (worker) thread to do work. The
-// object is
-//          added to the *this manager for housekeeping and deletion of all
-//          thread objects.
-// Type:    Template method.
-// Args:    vrwThreadObj      - (RW) A CMIUtilThreadActiveObjBase derived
-// object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-template <typename T> bool CMICmnThreadMgrStd::ThreadStart(T &vrwThreadObj) {
-  bool bOk = MIstatus::success;
-
-  // Grab a reference to the base object type
-  CMIUtilThreadActiveObjBase &rObj =
-      static_cast<CMIUtilThreadActiveObjBase &>(vrwThreadObj);
-
-  // Add to the thread managers internal database
-  bOk &= AddThread(rObj);
-  if (!bOk) {
-    const CMIUtilString errMsg(
-        CMIUtilString::Format(MIRSRC(IDS_THREADMGR_ERR_THREAD_FAIL_CREATE),
-                              vrwThreadObj.ThreadGetName().c_str()));
-    SetErrorDescription(errMsg);
-    return MIstatus::failure;
-  }
-
-  // Grab a reference on behalf of the caller
-  bOk &= vrwThreadObj.Acquire();
-  if (!bOk) {
-    const CMIUtilString errMsg(
-        CMIUtilString::Format(MIRSRC(IDS_THREADMGR_ERR_THREAD_FAIL_CREATE),
-                              vrwThreadObj.ThreadGetName().c_str()));
-    SetErrorDescription(errMsg);
-    return MIstatus::failure;
-  }
-
-  // Thread is already started
-  // This call must come after the reference count increment
-  if (vrwThreadObj.ThreadIsActive()) {
-    // Early exit on thread already running condition
-    return MIstatus::success;
-  }
-
-  // Start the thread running
-  bOk &= vrwThreadObj.ThreadExecute();
-  if (!bOk) {
-    const CMIUtilString errMsg(
-        CMIUtilString::Format(MIRSRC(IDS_THREADMGR_ERR_THREAD_FAIL_CREATE),
-                              vrwThreadObj.ThreadGetName().c_str()));
-    SetErrorDescription(errMsg);
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIDataTypes.h b/src/llvm-project/lldb/tools/lldb-mi/MIDataTypes.h
deleted file mode 100644
index c1ed764..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIDataTypes.h
+++ /dev/null
@@ -1,60 +0,0 @@
-//===-- MIDataTypes.h -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    Common global switches, macros, etc.
-//
-//              This file contains common data types required by applications
-//              generally. If supported by the compiler, this file should be
-//              #include'd as part of the project's PCH (precompiled header).
-
-#pragma once
-
-// Windows headers:
-#ifdef _WIN32
-
-// Debugging:
-#ifdef _DEBUG
-#include <crtdbg.h>
-#endif              // _DEBUG
-
-#endif // _WIN32
-
-// Common definitions:
-
-// Function return status
-namespace MIstatus {
-const bool success = true;
-const bool failure = false;
-}
-
-// Use to avoid "unused parameter" compiler warnings:
-#define MIunused(x) (void)x;
-
-// Portability issues
-#ifdef _WIN64
-typedef unsigned __int64 size_t;
-typedef __int64 MIint;
-typedef unsigned __int64 MIuint;
-#else
-#ifdef _WIN32
-typedef unsigned int size_t;
-typedef int MIint;
-typedef unsigned int MIuint;
-#else
-typedef int MIint;
-typedef unsigned int MIuint;
-
-#define MAX_PATH 4096
-#endif // _WIN32
-#endif // _WIN64
-
-// Common types:
-
-// Fundamentals:
-typedef long long MIint64;           // 64bit signed integer.
-typedef unsigned long long MIuint64; // 64bit unsigned integer.
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIDriver.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIDriver.cpp
deleted file mode 100644
index 3bf888e..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIDriver.cpp
+++ /dev/null
@@ -1,1318 +0,0 @@
-//===-- MIDriver.cpp --------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers:
-#include "lldb/API/SBError.h"
-#include <cassert>
-#include <csignal>
-#include <fstream>
-
-// In-house headers:
-#include "MICmdArgValFile.h"
-#include "MICmdArgValString.h"
-#include "MICmdMgr.h"
-#include "MICmnConfig.h"
-#include "MICmnLLDBDebugSessionInfo.h"
-#include "MICmnLLDBDebugger.h"
-#include "MICmnLog.h"
-#include "MICmnMIResultRecord.h"
-#include "MICmnMIValueConst.h"
-#include "MICmnResources.h"
-#include "MICmnStreamStderr.h"
-#include "MICmnStreamStdout.h"
-#include "MICmnThreadMgrStd.h"
-#include "MIDriver.h"
-#include "MIUtilDebug.h"
-#include "MIUtilSingletonHelper.h"
-
-// Instantiations:
-#if _DEBUG
-const CMIUtilString CMIDriver::ms_constMIVersion =
-    MIRSRC(IDS_MI_VERSION_DESCRIPTION_DEBUG);
-#else
-const CMIUtilString CMIDriver::ms_constMIVersion =
-    MIRSRC(IDS_MI_VERSION_DESCRIPTION); // Matches version in resources file
-#endif // _DEBUG
-const CMIUtilString
-    CMIDriver::ms_constAppNameShort(MIRSRC(IDS_MI_APPNAME_SHORT));
-const CMIUtilString CMIDriver::ms_constAppNameLong(MIRSRC(IDS_MI_APPNAME_LONG));
-
-//++
-// Details: CMIDriver constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIDriver::CMIDriver()
-    : m_bFallThruToOtherDriverEnabled(false), m_bDriverIsExiting(false),
-      m_handleMainThread(nullptr), m_rStdin(CMICmnStreamStdin::Instance()),
-      m_rLldbDebugger(CMICmnLLDBDebugger::Instance()),
-      m_rStdOut(CMICmnStreamStdout::Instance()),
-      m_eCurrentDriverState(eDriverState_NotRunning),
-      m_bHaveExecutableFileNamePathOnCmdLine(false),
-      m_bDriverDebuggingArgExecutable(false),
-      m_bHaveCommandFileNamePathOnCmdLine(false) {}
-
-//++
-// Details: CMIDriver destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIDriver::~CMIDriver() {}
-
-//++
-// Details: Set whether *this driver (the parent) is enabled to pass a command
-// to its
-//          fall through (child) driver to interpret the command and do work
-//          instead
-//          (if *this driver decides it can't handle the command).
-// Type:    Method.
-// Args:    vbYes   - (R) True = yes fall through, false = do not pass on
-// command.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::SetEnableFallThru(const bool vbYes) {
-  m_bFallThruToOtherDriverEnabled = vbYes;
-  return MIstatus::success;
-}
-
-//++
-// Details: Get whether *this driver (the parent) is enabled to pass a command
-// to its
-//          fall through (child) driver to interpret the command and do work
-//          instead
-//          (if *this driver decides it can't handle the command).
-// Type:    Method.
-// Args:    None.
-// Return:  bool - True = yes fall through, false = do not pass on command.
-// Throws:  None.
-//--
-bool CMIDriver::GetEnableFallThru() const {
-  return m_bFallThruToOtherDriverEnabled;
-}
-
-//++
-// Details: Retrieve MI's application name of itself.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - Text description.
-// Throws:  None.
-//--
-const CMIUtilString &CMIDriver::GetAppNameShort() const {
-  return ms_constAppNameShort;
-}
-
-//++
-// Details: Retrieve MI's application name of itself.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - Text description.
-// Throws:  None.
-//--
-const CMIUtilString &CMIDriver::GetAppNameLong() const {
-  return ms_constAppNameLong;
-}
-
-//++
-// Details: Retrieve MI's version description of itself.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - Text description.
-// Throws:  None.
-//--
-const CMIUtilString &CMIDriver::GetVersionDescription() const {
-  return ms_constMIVersion;
-}
-
-//++
-// Details: Initialize setup *this driver ready for use.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::Initialize() {
-  m_eCurrentDriverState = eDriverState_Initialising;
-  m_clientUsageRefCnt++;
-
-  ClrErrorDescription();
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  // Initialize all of the modules we depend on
-  MI::ModuleInit<CMICmnLog>(IDS_MI_INIT_ERR_LOG, bOk, errMsg);
-  MI::ModuleInit<CMICmnStreamStdout>(IDS_MI_INIT_ERR_STREAMSTDOUT, bOk, errMsg);
-  MI::ModuleInit<CMICmnStreamStderr>(IDS_MI_INIT_ERR_STREAMSTDERR, bOk, errMsg);
-  MI::ModuleInit<CMICmnResources>(IDS_MI_INIT_ERR_RESOURCES, bOk, errMsg);
-  MI::ModuleInit<CMICmnThreadMgrStd>(IDS_MI_INIT_ERR_THREADMANAGER, bOk,
-                                     errMsg);
-  MI::ModuleInit<CMICmnStreamStdin>(IDS_MI_INIT_ERR_STREAMSTDIN, bOk, errMsg);
-  MI::ModuleInit<CMICmdMgr>(IDS_MI_INIT_ERR_CMDMGR, bOk, errMsg);
-  bOk &= m_rLldbDebugger.SetDriver(*this);
-  MI::ModuleInit<CMICmnLLDBDebugger>(IDS_MI_INIT_ERR_LLDBDEBUGGER, bOk, errMsg);
-
-  m_bExitApp = false;
-
-  m_bInitialized = bOk;
-
-  if (!bOk) {
-    const CMIUtilString msg =
-        CMIUtilString::Format(MIRSRC(IDS_MI_INIT_ERR_DRIVER), errMsg.c_str());
-    SetErrorDescription(msg);
-    return MIstatus::failure;
-  }
-
-  m_eCurrentDriverState = eDriverState_RunningNotDebugging;
-
-  return bOk;
-}
-
-//++
-// Details: Unbind detach or release resources used by *this driver.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::Shutdown() {
-  if (--m_clientUsageRefCnt > 0)
-    return MIstatus::success;
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_eCurrentDriverState = eDriverState_ShuttingDown;
-
-  ClrErrorDescription();
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  // Shutdown all of the modules we depend on
-  MI::ModuleShutdown<CMICmnLLDBDebugger>(IDS_MI_INIT_ERR_LLDBDEBUGGER, bOk,
-                                         errMsg);
-  MI::ModuleShutdown<CMICmdMgr>(IDS_MI_INIT_ERR_CMDMGR, bOk, errMsg);
-  MI::ModuleShutdown<CMICmnStreamStdin>(IDS_MI_INIT_ERR_STREAMSTDIN, bOk,
-                                        errMsg);
-  MI::ModuleShutdown<CMICmnThreadMgrStd>(IDS_MI_INIT_ERR_THREADMANAGER, bOk,
-                                         errMsg);
-  MI::ModuleShutdown<CMICmnResources>(IDS_MI_INIT_ERR_RESOURCES, bOk, errMsg);
-  MI::ModuleShutdown<CMICmnStreamStderr>(IDS_MI_INIT_ERR_STREAMSTDERR, bOk,
-                                         errMsg);
-  MI::ModuleShutdown<CMICmnStreamStdout>(IDS_MI_INIT_ERR_STREAMSTDOUT, bOk,
-                                         errMsg);
-  MI::ModuleShutdown<CMICmnLog>(IDS_MI_INIT_ERR_LOG, bOk, errMsg);
-
-  if (!bOk) {
-    SetErrorDescriptionn(MIRSRC(IDS_MI_SHUTDOWN_ERR), errMsg.c_str());
-  }
-
-  m_eCurrentDriverState = eDriverState_NotRunning;
-
-  return bOk;
-}
-
-//++
-// Details: Work function. Client (the driver's user) is able to append their
-// own message
-//          in to the MI's Log trace file.
-// Type:    Method.
-// Args:    vMessage          - (R) Client's text message.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::WriteMessageToLog(const CMIUtilString &vMessage) {
-  CMIUtilString msg;
-  msg = CMIUtilString::Format(MIRSRC(IDS_MI_CLIENT_MSG), vMessage.c_str());
-  return m_pLog->Write(msg, CMICmnLog::eLogVerbosity_ClientMsg);
-}
-
-//++
-// Details: CDriverMgr calls *this driver initialize setup ready for use.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::DoInitialize() { return CMIDriver::Instance().Initialize(); }
-
-//++
-// Details: CDriverMgr calls *this driver to unbind detach or release resources
-// used by
-//          *this driver.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::DoShutdown() { return CMIDriver::Instance().Shutdown(); }
-
-//++
-// Details: Retrieve the name for *this driver.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString & - Driver name.
-// Throws:  None.
-//--
-const CMIUtilString &CMIDriver::GetName() const {
-  const CMIUtilString &rName = GetAppNameLong();
-  const CMIUtilString &rVsn = GetVersionDescription();
-  static CMIUtilString strName =
-      CMIUtilString::Format("%s %s", rName.c_str(), rVsn.c_str());
-
-  return strName;
-}
-
-//++
-// Details: Retrieve *this driver's last error condition.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString - Text description.
-// Throws:  None.
-//--
-CMIUtilString CMIDriver::GetError() const { return GetErrorDescription(); }
-
-//++
-// Details: Call *this driver to return it's debugger.
-// Type:    Overridden.
-// Args:    None.
-// Return:  lldb::SBDebugger & - LLDB debugger object reference.
-// Throws:  None.
-//--
-lldb::SBDebugger &CMIDriver::GetTheDebugger() {
-  return m_rLldbDebugger.GetTheDebugger();
-}
-
-//++
-// Details: Specify another driver *this driver can call should this driver not
-// be able
-//          to handle the client data input. DoFallThruToAnotherDriver() makes
-//          the call.
-// Type:    Overridden.
-// Args:    vrOtherDriver     - (R) Reference to another driver object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) {
-  m_pDriverFallThru = const_cast<CMIDriverBase *>(&vrOtherDriver);
-
-  return m_pDriverFallThru->SetDriverParent(*this);
-}
-
-//++
-// Details: Proxy function CMIDriverMgr IDriver interface implementation. *this
-// driver's
-//          implementation called from here to match the existing function name
-//          of the
-//          original LLDB driver class (the extra indirection is not necessarily
-//          required).
-//          Check the arguments that were passed to this program to make sure
-//          they are
-//          valid and to get their argument values (if any).
-// Type:    Overridden.
-// Args:    argc        - (R)   An integer that contains the count of arguments
-// that follow in
-//                              argv. The argc parameter is always greater than
-//                              or equal to 1.
-//          argv        - (R)   An array of null-terminated strings representing
-//          command-line
-//                              arguments entered by the user of the program. By
-//                              convention,
-//                              argv[0] is the command with which the program is
-//                              invoked.
-//          vpStdOut    - (R)   Pointer to a standard output stream.
-//          vwbExiting  - (W)   True = *this want to exit, Reasons: help,
-//          invalid arg(s),
-//                              version information only.
-//                              False = Continue to work, start debugger i.e.
-//                              Command
-//                              interpreter.
-// Return:  lldb::SBError - LLDB current error status.
-// Throws:  None.
-//--
-lldb::SBError CMIDriver::DoParseArgs(const int argc, const char *argv[],
-                                     FILE *vpStdOut, bool &vwbExiting) {
-  return ParseArgs(argc, argv, vpStdOut, vwbExiting);
-}
-
-//++
-// Details: Check the arguments that were passed to this program to make sure
-// they are
-//          valid and to get their argument values (if any). The following are
-//          options
-//          that are only handled by *this driver:
-//              --executable <file>
-//              --source <file> or -s <file>
-//              --synchronous
-//          The application's options --interpreter and --executable in code act
-//          very similar.
-//          The --executable is necessary to differentiate whether the MI Driver
-//          is being
-//          used by a client (e.g. Eclipse) or from the command line. Eclipse
-//          issues the option
-//          --interpreter and also passes additional arguments which can be
-//          interpreted as an
-//          executable if called from the command line. Using --executable tells
-//          the MI Driver
-//          it is being called from the command line and to prepare to launch
-//          the executable
-//          argument for a debug session. Using --interpreter on the command
-//          line does not
-//          issue additional commands to initialise a debug session.
-//          Option --synchronous disables an asynchronous mode in the lldb-mi driver.
-// Type:    Overridden.
-// Args:    argc        - (R)   An integer that contains the count of arguments
-// that follow in
-//                              argv. The argc parameter is always greater than
-//                              or equal to 1.
-//          argv        - (R)   An array of null-terminated strings representing
-//          command-line
-//                              arguments entered by the user of the program. By
-//                              convention,
-//                              argv[0] is the command with which the program is
-//                              invoked.
-//          vpStdOut    - (R)   Pointer to a standard output stream.
-//          vwbExiting  - (W)   True = *this want to exit, Reasons: help,
-//          invalid arg(s),
-//                              version information only.
-//                              False = Continue to work, start debugger i.e.
-//                              Command
-//                              interpreter.
-// Return:  lldb::SBError - LLDB current error status.
-// Throws:  None.
-//--
-lldb::SBError CMIDriver::ParseArgs(const int argc, const char *argv[],
-                                   FILE *vpStdOut, bool &vwbExiting) {
-  lldb::SBError errStatus;
-  const bool bHaveArgs(argc >= 2);
-
-  // *** Add any args handled here to GetHelpOnCmdLineArgOptions() ***
-
-  // CODETAG_MIDRIVE_CMD_LINE_ARG_HANDLING
-  // Look for the command line options
-  bool bHaveExecutableFileNamePath = false;
-  bool bHaveExecutableLongOption = false;
-
-  if (bHaveArgs) {
-    // Search right to left to look for filenames
-    for (MIint i = argc - 1; i > 0; i--) {
-      const CMIUtilString strArg(argv[i]);
-      const CMICmdArgValFile argFile;
-
-      // Check for a filename
-      if (argFile.IsFilePath(strArg) ||
-          CMICmdArgValString(true, false, true).IsStringArg(strArg)) {
-        // Is this the command file for the '-s' or '--source' options?
-        const CMIUtilString strPrevArg(argv[i - 1]);
-        if (strPrevArg == "-s" || strPrevArg == "--source") {
-          m_strCmdLineArgCommandFileNamePath = strArg;
-          m_bHaveCommandFileNamePathOnCmdLine = true;
-          i--; // skip '-s' on the next loop
-          continue;
-        }
-        // Else, must be the executable
-        bHaveExecutableFileNamePath = true;
-        m_strCmdLineArgExecuteableFileNamePath = strArg;
-        m_bHaveExecutableFileNamePathOnCmdLine = true;
-      }
-      // Report error if no command file was specified for the '-s' or
-      // '--source' options
-      else if (strArg == "-s" || strArg == "--source") {
-        vwbExiting = true;
-        const CMIUtilString errMsg = CMIUtilString::Format(
-            MIRSRC(IDS_CMD_ARGS_ERR_VALIDATION_MISSING_INF), strArg.c_str());
-        errStatus.SetErrorString(errMsg.c_str());
-        break;
-      }
-      // This argument is also checked for in CMIDriverMgr::ParseArgs()
-      else if (strArg == "--executable") // Used to specify that
-                                         // there is executable
-                                         // argument also on the
-                                         // command line
-      {                                  // See fn description.
-        bHaveExecutableLongOption = true;
-      } else if (strArg == "--synchronous") {
-        CMICmnLLDBDebugSessionInfo::Instance().GetDebugger().SetAsync(false);
-      }
-    }
-  }
-
-  if (bHaveExecutableFileNamePath && bHaveExecutableLongOption) {
-    SetDriverDebuggingArgExecutable();
-  }
-
-  return errStatus;
-}
-
-//++
-// Details: A client can ask if *this driver is GDB/MI compatible.
-// Type:    Overridden.
-// Args:    None.
-// Return:  True - GBD/MI compatible LLDB front end.
-//          False - Not GBD/MI compatible LLDB front end.
-// Throws:  None.
-//--
-bool CMIDriver::GetDriverIsGDBMICompatibleDriver() const { return true; }
-
-//++
-// Details: Start worker threads for the driver.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::StartWorkerThreads() {
-  bool bOk = MIstatus::success;
-
-  // Grab the thread manager
-  CMICmnThreadMgrStd &rThreadMgr = CMICmnThreadMgrStd::Instance();
-
-  // Start the event polling thread
-  if (bOk && !rThreadMgr.ThreadStart<CMICmnLLDBDebugger>(m_rLldbDebugger)) {
-    const CMIUtilString errMsg = CMIUtilString::Format(
-        MIRSRC(IDS_THREADMGR_ERR_THREAD_FAIL_CREATE),
-        CMICmnThreadMgrStd::Instance().GetErrorDescription().c_str());
-    SetErrorDescription(errMsg);
-    return MIstatus::failure;
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Stop worker threads for the driver.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::StopWorkerThreads() {
-  CMICmnThreadMgrStd &rThreadMgr = CMICmnThreadMgrStd::Instance();
-  return rThreadMgr.ThreadAllTerminate();
-}
-
-//++
-// Details: Call this function puts *this driver to work.
-//          This function is used by the application's main thread.
-// Type:    Overridden.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::DoMainLoop() {
-  if (!InitClientIDEToMIDriver()) // Init Eclipse IDE
-  {
-    SetErrorDescriptionn(MIRSRC(IDS_MI_INIT_ERR_CLIENT_USING_DRIVER));
-    return MIstatus::failure;
-  }
-
-  if (!StartWorkerThreads())
-    return MIstatus::failure;
-
-  bool bOk = MIstatus::success;
-
-  if (HaveExecutableFileNamePathOnCmdLine()) {
-    if (!LocalDebugSessionStartupExecuteCommands()) {
-      SetErrorDescription(MIRSRC(IDS_MI_INIT_ERR_LOCAL_DEBUG_SESSION));
-      bOk = MIstatus::failure;
-    }
-  }
-
-  // App is not quitting currently
-  m_bExitApp = false;
-
-  // Handle source file
-  if (m_bHaveCommandFileNamePathOnCmdLine) {
-    const bool bAsyncMode = false;
-    ExecuteCommandFile(bAsyncMode);
-  }
-
-  // While the app is active
-  while (bOk && !m_bExitApp) {
-    CMIUtilString errorText;
-    const char *pCmd = m_rStdin.ReadLine(errorText);
-    if (pCmd != nullptr) {
-      CMIUtilString lineText(pCmd);
-      if (!lineText.empty()) {
-        // Check that the handler thread is alive (otherwise we stuck here)
-        assert(CMICmnLLDBDebugger::Instance().ThreadIsActive());
-
-        {
-          // Lock Mutex before processing commands so that we don't disturb an
-          // event
-          // being processed
-          CMIUtilThreadLock lock(
-              CMICmnLLDBDebugSessionInfo::Instance().GetSessionMutex());
-          bOk = InterpretCommand(lineText);
-        }
-
-        // Draw prompt if desired
-        bOk = bOk && CMICmnStreamStdout::WritePrompt();
-
-        // Wait while the handler thread handles incoming events
-        CMICmnLLDBDebugger::Instance().WaitForHandleEvent();
-      }
-    }
-  }
-
-  // Signal that the application is shutting down
-  DoAppQuit();
-
-  // Close and wait for the workers to stop
-  StopWorkerThreads();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Set things in motion, set state etc that brings *this driver (and
-// the
-//          application) to a tidy shutdown.
-//          This function is used by the application's main thread.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::DoAppQuit() {
-  bool bYesQuit = true;
-
-  // Shutdown stuff, ready app for exit
-  {
-    CMIUtilThreadLock lock(m_threadMutex);
-    m_bDriverIsExiting = true;
-  }
-
-  return bYesQuit;
-}
-
-//++
-// Details: *this driver passes text commands to a fall through driver is it
-// does not
-//          understand them (the LLDB driver).
-//          This function is used by the application's main thread.
-// Type:    Method.
-// Args:    vTextLine           - (R) Text data representing a possible command.
-//          vwbCmdYesValid      - (W) True = Command valid, false = command not
-//          handled.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::InterpretCommandFallThruDriver(const CMIUtilString &vTextLine,
-                                               bool &vwbCmdYesValid) {
-  MIunused(vTextLine);
-  MIunused(vwbCmdYesValid);
-
-  // ToDo: Implement when less urgent work to be done or decide remove as not
-  // required
-  // bool bOk = MIstatus::success;
-  // bool bCmdNotUnderstood = true;
-  // if( bCmdNotUnderstood && GetEnableFallThru() )
-  //{
-  //  CMIUtilString errMsg;
-  //  bOk = DoFallThruToAnotherDriver( vStdInBuffer, errMsg );
-  //  if( !bOk )
-  //  {
-  //      errMsg = errMsg.StripCREndOfLine();
-  //      errMsg = errMsg.StripCRAll();
-  //      const CMIDriverBase * pOtherDriver = GetDriverToFallThruTo();
-  //      const char * pName = pOtherDriver->GetDriverName().c_str();
-  //      const char * pId = pOtherDriver->GetDriverId().c_str();
-  //      const CMIUtilString msg( CMIUtilString::Format( MIRSRC(
-  //      IDS_DRIVER_ERR_FALLTHRU_DRIVER_ERR ), pName, pId, errMsg.c_str() )
-  //);
-  //      m_pLog->WriteMsg( msg );
-  //  }
-  //}
-  //
-  // vwbCmdYesValid = bOk;
-  // CMIUtilString strNot;
-  // if( vwbCmdYesValid)
-  //  strNot = CMIUtilString::Format( "%s ", MIRSRC( IDS_WORD_NOT ) );
-  // const CMIUtilString msg( CMIUtilString::Format( MIRSRC(
-  // IDS_FALLTHRU_DRIVER_CMD_RECEIVED ), vTextLine.c_str(), strNot.c_str() ) );
-  // m_pLog->WriteLog( msg );
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the name for *this driver.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString & - Driver name.
-// Throws:  None.
-//--
-const CMIUtilString &CMIDriver::GetDriverName() const { return GetName(); }
-
-//++
-// Details: Get the unique ID for *this driver.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString & - Text description.
-// Throws:  None.
-//--
-const CMIUtilString &CMIDriver::GetDriverId() const { return GetId(); }
-
-//++
-// Details: This function allows *this driver to call on another driver to
-// perform work
-//          should this driver not be able to handle the client data input.
-//          SetDriverToFallThruTo() specifies the fall through to driver.
-//          Check the error message if the function returns a failure.
-// Type:    Overridden.
-// Args:    vCmd        - (R) Command instruction to interpret.
-//          vwErrMsg    - (W) Status description on command failing.
-// Return:  MIstatus::success - Command succeeded.
-//          MIstatus::failure - Command failed.
-// Throws:  None.
-//--
-bool CMIDriver::DoFallThruToAnotherDriver(const CMIUtilString &vCmd,
-                                          CMIUtilString &vwErrMsg) {
-  bool bOk = MIstatus::success;
-
-  CMIDriverBase *pOtherDriver = GetDriverToFallThruTo();
-  if (pOtherDriver == nullptr)
-    return bOk;
-
-  return pOtherDriver->DoFallThruToAnotherDriver(vCmd, vwErrMsg);
-}
-
-//++
-// Details: *this driver provides a file stream to other drivers on which *this
-// driver
-//          write's out to and they read as expected input. *this driver is
-//          passing
-//          through commands to the (child) pass through assigned driver.
-// Type:    Overrdidden.
-// Args:    None.
-// Return:  FILE * - Pointer to stream.
-// Throws:  None.
-//--
-FILE *CMIDriver::GetStdin() const {
-  // Note this fn is called on CMIDriverMgr register driver so stream has to be
-  // available before *this driver has been initialized! Flaw?
-
-  // This very likely to change later to a stream that the pass thru driver
-  // will read and we write to give it 'input'
-  return stdin;
-}
-
-//++
-// Details: *this driver provides a file stream to other pass through assigned
-// drivers
-//          so they know what to write to.
-// Type:    Overidden.
-// Args:    None.
-// Return:  FILE * - Pointer to stream.
-// Throws:  None.
-//--
-FILE *CMIDriver::GetStdout() const {
-  // Note this fn is called on CMIDriverMgr register driver so stream has to be
-  // available before *this driver has been initialized! Flaw?
-
-  // Do not want to pass through driver to write to stdout
-  return nullptr;
-}
-
-//++
-// Details: *this driver provides a error file stream to other pass through
-// assigned drivers
-//          so they know what to write to.
-// Type:    Overidden.
-// Args:    None.
-// Return:  FILE * - Pointer to stream.
-// Throws:  None.
-//--
-FILE *CMIDriver::GetStderr() const {
-  // Note this fn is called on CMIDriverMgr register driver so stream has to be
-  // available before *this driver has been initialized! Flaw?
-
-  // This very likely to change later to a stream that the pass thru driver
-  // will write to and *this driver reads from to pass on the CMICmnLog object
-  return stderr;
-}
-
-//++
-// Details: Set a unique ID for *this driver. It cannot be empty.
-// Type:    Overridden.
-// Args:    vId - (R) Text description.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::SetId(const CMIUtilString &vId) {
-  if (vId.empty()) {
-    SetErrorDescriptionn(MIRSRC(IDS_DRIVER_ERR_ID_INVALID), GetName().c_str(),
-                         vId.c_str());
-    return MIstatus::failure;
-  }
-
-  m_strDriverId = vId;
-  return MIstatus::success;
-}
-
-//++
-// Details: Get the unique ID for *this driver.
-// Type:    Overridden.
-// Args:    None.
-// Return:  CMIUtilString & - Text description.
-// Throws:  None.
-//--
-const CMIUtilString &CMIDriver::GetId() const { return m_strDriverId; }
-
-//++
-// Details: Interpret the text data and match against current commands to see if
-// there
-//          is a match. If a match then the command is issued and actioned on.
-//          The
-//          text data if not understood by *this driver is past on to the Fall
-//          Thru
-//          driver.
-//          This function is used by the application's main thread.
-// Type:    Method.
-// Args:    vTextLine   - (R) Text data representing a possible command.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::InterpretCommand(const CMIUtilString &vTextLine) {
-  const bool bNeedToRebroadcastStopEvent =
-      m_rLldbDebugger.CheckIfNeedToRebroadcastStopEvent();
-  bool bCmdYesValid = false;
-  bool bOk = InterpretCommandThisDriver(vTextLine, bCmdYesValid);
-  if (bOk && !bCmdYesValid)
-    bOk = InterpretCommandFallThruDriver(vTextLine, bCmdYesValid);
-
-  if (bNeedToRebroadcastStopEvent)
-    m_rLldbDebugger.RebroadcastStopEvent();
-
-  return bOk;
-}
-
-//++
-// Details: Helper function for CMIDriver::InterpretCommandThisDriver.
-//          Convert a CLI command to MI command (just wrap any CLI command
-//          into "<tokens>-interpreter-exec command \"<CLI command>\"").
-// Type:    Method.
-// Args:    vTextLine   - (R) Text data representing a possible command.
-// Return:  CMIUtilString   - The original MI command or converted CLI command.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-CMIUtilString
-CMIDriver::WrapCLICommandIntoMICommand(const CMIUtilString &vTextLine) const {
-  // Tokens contain following digits
-  static const CMIUtilString digits("0123456789");
-
-  // Consider an algorithm on the following example:
-  // 001-file-exec-and-symbols "/path/to/file"
-  //
-  // 1. Skip a command token
-  // For example:
-  // 001-file-exec-and-symbols "/path/to/file"
-  // 001target create "/path/to/file"
-  //    ^ -- command starts here (in both cases)
-  // Also possible case when command not found:
-  // 001
-  //    ^ -- i.e. only tokens are present (or empty string at all)
-  const size_t nCommandOffset = vTextLine.find_first_not_of(digits);
-
-  // 2. Check if command is empty
-  // For example:
-  // 001-file-exec-and-symbols "/path/to/file"
-  // 001target create "/path/to/file"
-  //    ^ -- command not empty (in both cases)
-  // or:
-  // 001
-  //    ^ -- command wasn't found
-  const bool bIsEmptyCommand = (nCommandOffset == CMIUtilString::npos);
-
-  // 3. Check and exit if it isn't a CLI command
-  // For example:
-  // 001-file-exec-and-symbols "/path/to/file"
-  // 001
-  //    ^ -- it isn't CLI command (in both cases)
-  // or:
-  // 001target create "/path/to/file"
-  //    ^ -- it's CLI command
-  const bool bIsCliCommand =
-      !bIsEmptyCommand && (vTextLine.at(nCommandOffset) != '-');
-  if (!bIsCliCommand)
-    return vTextLine;
-
-  // 4. Wrap CLI command to make it MI-compatible
-  //
-  // 001target create "/path/to/file"
-  // ^^^ -- token
-  const std::string vToken(vTextLine.begin(),
-                           vTextLine.begin() + nCommandOffset);
-  // 001target create "/path/to/file"
-  //    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- CLI command
-  const CMIUtilString vCliCommand(std::string(vTextLine, nCommandOffset));
-
-  // 5. Escape special characters and embed the command in a string
-  // Result: it looks like -- target create \"/path/to/file\".
-  const std::string vShieldedCliCommand(vCliCommand.AddSlashes());
-
-  // 6. Turn the CLI command into an MI command, as in:
-  // 001-interpreter-exec command "target create \"/path/to/file\""
-  // ^^^ -- token
-  //    ^^^^^^^^^^^^^^^^^^^^^^^^^^^                               ^ -- wrapper
-  //                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- shielded
-  //                               CLI command
-  return CMIUtilString::Format("%s-interpreter-exec command \"%s\"",
-                               vToken.c_str(), vShieldedCliCommand.c_str());
-}
-
-//++
-// Details: Interpret the text data and match against current commands to see if
-// there
-//          is a match. If a match then the command is issued and actioned on.
-//          If a
-//          command cannot be found to match then vwbCmdYesValid is set to false
-//          and
-//          nothing else is done here.
-//          This function is used by the application's main thread.
-// Type:    Method.
-// Args:    vTextLine           - (R) Text data representing a possible command.
-//          vwbCmdYesValid      - (W) True = Command valid, false = command not
-//          handled.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::InterpretCommandThisDriver(const CMIUtilString &vTextLine,
-                                           bool &vwbCmdYesValid) {
-  // Convert any CLI commands into MI commands
-  const CMIUtilString vMITextLine(WrapCLICommandIntoMICommand(vTextLine));
-
-  vwbCmdYesValid = false;
-  bool bCmdNotInCmdFactor = false;
-  SMICmdData cmdData;
-  CMICmdMgr &rCmdMgr = CMICmdMgr::Instance();
-  if (!rCmdMgr.CmdInterpret(vMITextLine, vwbCmdYesValid, bCmdNotInCmdFactor,
-                            cmdData))
-    return MIstatus::failure;
-
-  if (vwbCmdYesValid) {
-    // For debugging only
-    // m_pLog->WriteLog( cmdData.strMiCmdAll.c_str() );
-
-    return ExecuteCommand(cmdData);
-  }
-
-  // Check for escape character, may be cursor control characters
-  // This code is not necessary for application operation, just want to keep
-  // tabs on what
-  // has been given to the driver to try and interpret.
-  if (vMITextLine.at(0) == 27) {
-    CMIUtilString logInput(MIRSRC(IDS_STDIN_INPUT_CTRL_CHARS));
-    for (MIuint i = 0; i < vMITextLine.length(); i++) {
-      logInput += CMIUtilString::Format("%d ", vMITextLine.at(i));
-    }
-    m_pLog->WriteLog(logInput);
-    return MIstatus::success;
-  }
-
-  // Write to the Log that a 'command' was not valid.
-  // Report back to the MI client via MI result record.
-  CMIUtilString strNotInCmdFactory;
-  if (bCmdNotInCmdFactor)
-    strNotInCmdFactory = CMIUtilString::Format(
-        MIRSRC(IDS_DRIVER_CMD_NOT_IN_FACTORY), cmdData.strMiCmd.c_str());
-  const CMIUtilString strNot(
-      CMIUtilString::Format("%s ", MIRSRC(IDS_WORD_NOT)));
-  const CMIUtilString msg(CMIUtilString::Format(
-      MIRSRC(IDS_DRIVER_CMD_RECEIVED), vMITextLine.c_str(), strNot.c_str(),
-      strNotInCmdFactory.c_str()));
-  const CMICmnMIValueConst vconst = CMICmnMIValueConst(msg);
-  const CMICmnMIValueResult valueResult("msg", vconst);
-  const CMICmnMIResultRecord miResultRecord(
-      cmdData.strMiCmdToken, CMICmnMIResultRecord::eResultClass_Error,
-      valueResult);
-  const bool bOk = m_rStdOut.WriteMIResponse(miResultRecord.GetString());
-
-  // Proceed to wait for or execute next command
-  return bOk;
-}
-
-//++
-// Details: Having previously had the potential command validated and found
-// valid now
-//          get the command executed.
-//          This function is used by the application's main thread.
-// Type:    Method.
-// Args:    vCmdData    - (RW) Command meta data.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriver::ExecuteCommand(const SMICmdData &vCmdData) {
-  CMICmdMgr &rCmdMgr = CMICmdMgr::Instance();
-  return rCmdMgr.CmdExecute(vCmdData);
-}
-
-//++
-// Details: Set the MI Driver's exit application flag. The application checks
-// this flag
-//          after every stdin line is read so the exit may not be instantaneous.
-//          If vbForceExit is false the MI Driver queries its state and
-//          determines if is
-//          should exit or continue operating depending on that running state.
-//          This is related to the running state of the MI driver.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIDriver::SetExitApplicationFlag(const bool vbForceExit) {
-  if (vbForceExit) {
-    CMIUtilThreadLock lock(m_threadMutex);
-    m_bExitApp = true;
-    return;
-  }
-
-  // CODETAG_DEBUG_SESSION_RUNNING_PROG_RECEIVED_SIGINT_PAUSE_PROGRAM
-  // Did we receive a SIGINT from the client during a running debug program, if
-  // so then SIGINT is not to be taken as meaning kill the MI driver application
-  // but halt the inferior program being debugged instead
-  if (m_eCurrentDriverState == eDriverState_RunningDebugging) {
-    InterpretCommand("-exec-interrupt");
-    return;
-  }
-
-  m_bExitApp = true;
-}
-
-//++
-// Details: Get the  MI Driver's exit exit application flag.
-//          This is related to the running state of the MI driver.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True = MI Driver is shutting down, false = MI driver is
-// running.
-// Throws:  None.
-//--
-bool CMIDriver::GetExitApplicationFlag() const { return m_bExitApp; }
-
-//++
-// Details: Get the current running state of the MI Driver.
-// Type:    Method.
-// Args:    None.
-// Return:  DriverState_e   - The current running state of the application.
-// Throws:  None.
-//--
-CMIDriver::DriverState_e CMIDriver::GetCurrentDriverState() const {
-  return m_eCurrentDriverState;
-}
-
-//++
-// Details: Set the current running state of the MI Driver to running and
-// currently not in
-//          a debug session.
-// Type:    Method.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Return:  DriverState_e   - The current running state of the application.
-// Throws:  None.
-//--
-bool CMIDriver::SetDriverStateRunningNotDebugging() {
-  // CODETAG_DEBUG_SESSION_RUNNING_PROG_RECEIVED_SIGINT_PAUSE_PROGRAM
-
-  if (m_eCurrentDriverState == eDriverState_RunningNotDebugging)
-    return MIstatus::success;
-
-  // Driver cannot be in the following states to set
-  // eDriverState_RunningNotDebugging
-  switch (m_eCurrentDriverState) {
-  case eDriverState_NotRunning:
-  case eDriverState_Initialising:
-  case eDriverState_ShuttingDown: {
-    SetErrorDescription(MIRSRC(IDS_DRIVER_ERR_DRIVER_STATE_ERROR));
-    return MIstatus::failure;
-  }
-  case eDriverState_RunningDebugging:
-  case eDriverState_RunningNotDebugging:
-    break;
-  case eDriverState_count:
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_CODE_ERR_INVALID_ENUMERATION_VALUE),
-                              "SetDriverStateRunningNotDebugging()"));
-    return MIstatus::failure;
-  }
-
-  // Driver must be in this state to set eDriverState_RunningNotDebugging
-  if (m_eCurrentDriverState != eDriverState_RunningDebugging) {
-    SetErrorDescription(MIRSRC(IDS_DRIVER_ERR_DRIVER_STATE_ERROR));
-    return MIstatus::failure;
-  }
-
-  m_eCurrentDriverState = eDriverState_RunningNotDebugging;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Set the current running state of the MI Driver to running and
-// currently not in
-//          a debug session. The driver's state must in the state running and in
-//          a
-//          debug session to set this new state.
-// Type:    Method.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Return:  DriverState_e   - The current running state of the application.
-// Throws:  None.
-//--
-bool CMIDriver::SetDriverStateRunningDebugging() {
-  // CODETAG_DEBUG_SESSION_RUNNING_PROG_RECEIVED_SIGINT_PAUSE_PROGRAM
-
-  if (m_eCurrentDriverState == eDriverState_RunningDebugging)
-    return MIstatus::success;
-
-  // Driver cannot be in the following states to set
-  // eDriverState_RunningDebugging
-  switch (m_eCurrentDriverState) {
-  case eDriverState_NotRunning:
-  case eDriverState_Initialising:
-  case eDriverState_ShuttingDown: {
-    SetErrorDescription(MIRSRC(IDS_DRIVER_ERR_DRIVER_STATE_ERROR));
-    return MIstatus::failure;
-  }
-  case eDriverState_RunningDebugging:
-  case eDriverState_RunningNotDebugging:
-    break;
-  case eDriverState_count:
-    SetErrorDescription(
-        CMIUtilString::Format(MIRSRC(IDS_CODE_ERR_INVALID_ENUMERATION_VALUE),
-                              "SetDriverStateRunningDebugging()"));
-    return MIstatus::failure;
-  }
-
-  // Driver must be in this state to set eDriverState_RunningDebugging
-  if (m_eCurrentDriverState != eDriverState_RunningNotDebugging) {
-    SetErrorDescription(MIRSRC(IDS_DRIVER_ERR_DRIVER_STATE_ERROR));
-    return MIstatus::failure;
-  }
-
-  m_eCurrentDriverState = eDriverState_RunningDebugging;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Prepare the client IDE so it will start working/communicating with
-// *this MI
-//          driver.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMIDriver::InitClientIDEToMIDriver() const {
-  // Put other IDE init functions here
-  return InitClientIDEEclipse();
-}
-
-//++
-// Details: The IDE Eclipse when debugging locally expects "(gdb)\n" character
-//          sequence otherwise it refuses to communicate and times out. This
-//          should be
-//          sent to Eclipse before anything else.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMIDriver::InitClientIDEEclipse() const {
-  return CMICmnStreamStdout::WritePrompt();
-}
-
-//++
-// Details: Ask *this driver whether it found an executable in the MI Driver's
-// list of
-//          arguments which to open and debug. If so instigate commands to set
-//          up a debug
-//          session for that executable.
-// Type:    Method.
-// Args:    None.
-// Return:  bool - True = True = Yes executable given as one of the parameters
-// to the MI
-//                 Driver.
-//                 False = not found.
-// Throws:  None.
-//--
-bool CMIDriver::HaveExecutableFileNamePathOnCmdLine() const {
-  return m_bHaveExecutableFileNamePathOnCmdLine;
-}
-
-//++
-// Details: Retrieve from *this driver executable file name path to start a
-// debug session
-//          with (if present see HaveExecutableFileNamePathOnCmdLine()).
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - Executeable file name path or empty string.
-// Throws:  None.
-//--
-const CMIUtilString &CMIDriver::GetExecutableFileNamePathOnCmdLine() const {
-  return m_strCmdLineArgExecuteableFileNamePath;
-}
-
-//++
-// Details: Execute commands (by injecting them into the stdin line queue
-// container) and
-//          other code to set up the MI Driver such that is can take the
-//          executable
-//          argument passed on the command and create a debug session for it.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functionality succeeded.
-//          MIstatus::failure - Functionality failed.
-// Throws:  None.
-//--
-bool CMIDriver::LocalDebugSessionStartupExecuteCommands() {
-  const CMIUtilString strCmd(CMIUtilString::Format(
-      "-file-exec-and-symbols \"%s\"",
-      m_strCmdLineArgExecuteableFileNamePath.AddSlashes().c_str()));
-  bool bOk = CMICmnStreamStdout::TextToStdout(strCmd);
-  bOk = bOk && InterpretCommand(strCmd);
-  bOk = bOk && CMICmnStreamStdout::WritePrompt();
-  return bOk;
-}
-
-//++
-// Details: Set the MI Driver into "its debugging an executable passed as an
-// argument"
-//          mode as against running via a client like Eclipse.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIDriver::SetDriverDebuggingArgExecutable() {
-  m_bDriverDebuggingArgExecutable = true;
-}
-
-//++
-// Details: Retrieve the MI Driver state indicating if it is operating in "its
-// debugging
-//          an executable passed as an argument" mode as against running via a
-//          client
-//          like Eclipse.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-bool CMIDriver::IsDriverDebuggingArgExecutable() const {
-  return m_bDriverDebuggingArgExecutable;
-}
-
-//++
-// Details: Execute commands from command source file in specified mode, and
-//          set exit-flag if needed.
-// Type:    Method.
-// Args:    vbAsyncMode       - (R) True = execute commands in asynchronous
-// mode, false = otherwise.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-bool CMIDriver::ExecuteCommandFile(const bool vbAsyncMode) {
-  std::ifstream ifsStartScript(m_strCmdLineArgCommandFileNamePath.c_str());
-  if (!ifsStartScript.is_open()) {
-    const CMIUtilString errMsg(
-        CMIUtilString::Format(MIRSRC(IDS_UTIL_FILE_ERR_OPENING_FILE_UNKNOWN),
-                              m_strCmdLineArgCommandFileNamePath.c_str()));
-    SetErrorDescription(errMsg.c_str());
-    const bool bForceExit = true;
-    SetExitApplicationFlag(bForceExit);
-    return MIstatus::failure;
-  }
-
-  // Switch lldb to synchronous mode
-  CMICmnLLDBDebugSessionInfo &rSessionInfo(
-      CMICmnLLDBDebugSessionInfo::Instance());
-  const bool bAsyncSetting = rSessionInfo.GetDebugger().GetAsync();
-  rSessionInfo.GetDebugger().SetAsync(vbAsyncMode);
-
-  // Execute commands from file
-  bool bOk = MIstatus::success;
-  CMIUtilString strCommand;
-  while (!m_bExitApp && std::getline(ifsStartScript, strCommand)) {
-    // Print command
-    bOk = CMICmnStreamStdout::TextToStdout(strCommand);
-
-    // Skip if it's a comment or empty line
-    if (strCommand.empty() || strCommand[0] == '#')
-      continue;
-
-    // Execute if no error
-    if (bOk) {
-      CMIUtilThreadLock lock(rSessionInfo.GetSessionMutex());
-      bOk = InterpretCommand(strCommand);
-    }
-
-    // Draw the prompt after command will be executed (if enabled)
-    bOk = bOk && CMICmnStreamStdout::WritePrompt();
-
-    // Exit if there is an error
-    if (!bOk) {
-      const bool bForceExit = true;
-      SetExitApplicationFlag(bForceExit);
-      break;
-    }
-
-    // Wait while the handler thread handles incoming events
-    CMICmnLLDBDebugger::Instance().WaitForHandleEvent();
-  }
-
-  // Switch lldb back to initial mode
-  rSessionInfo.GetDebugger().SetAsync(bAsyncSetting);
-
-  return bOk;
-}
-
-//++
-// Details: Gets called when lldb-mi gets a signal. Stops the process if it was
-// SIGINT.
-//
-// Type:    Method.
-// Args:    signal that was delivered
-// Return:  None.
-// Throws:  None.
-//--
-void CMIDriver::DeliverSignal(int signal) {
-  if (signal == SIGINT &&
-      (m_eCurrentDriverState == eDriverState_RunningDebugging))
-    InterpretCommand("-exec-interrupt");
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIDriver.h b/src/llvm-project/lldb/tools/lldb-mi/MIDriver.h
deleted file mode 100644
index 03bbb3e..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIDriver.h
+++ /dev/null
@@ -1,180 +0,0 @@
-//===-- MIDriver.h ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers
-#include <queue>
-
-// In-house headers:
-#include "MICmdData.h"
-#include "MICmnBase.h"
-#include "MICmnConfig.h"
-#include "MICmnStreamStdin.h"
-#include "MIDriverBase.h"
-#include "MIDriverMgr.h"
-#include "MIUtilSingletonBase.h"
-
-// Declarations:
-class CMICmnLLDBDebugger;
-class CMICmnStreamStdout;
-
-//++
-//============================================================================
-// Details: MI driver implementation class. A singleton class derived from
-//          LLDB SBBroadcaster class. Register the instance of *this class with
-//          the CMIDriverMgr. The CMIDriverMgr sets the driver(s) of to start
-//          work depending on the one selected to work. A driver can if not able
-//          to handle an instruction or 'command' can pass that command onto
-//          another driver object registered with the Driver Manager.
-//--
-class CMIDriver : public CMICmnBase,
-                  public CMIDriverMgr::IDriver,
-                  public CMIDriverBase,
-                  public MI::ISingleton<CMIDriver> {
-  friend class MI::ISingleton<CMIDriver>;
-
-  // Enumerations:
-public:
-  //++ ----------------------------------------------------------------------
-  // Details: The MI Driver has a running state which is used to help determine
-  //          which specific action(s) it should take or not allow.
-  //          The driver when operational and not shutting down alternates
-  //          between eDriverState_RunningNotDebugging and
-  //          eDriverState_RunningDebugging. eDriverState_RunningNotDebugging
-  //          is normally set when a breakpoint is hit or halted.
-  //          eDriverState_RunningDebugging is normally set when "exec-continue"
-  //          or "exec-run" is issued.
-  //--
-  enum DriverState_e {
-    eDriverState_NotRunning = 0,      // The MI Driver is not operating
-    eDriverState_Initialising,        // The MI Driver is setting itself up
-    eDriverState_RunningNotDebugging, // The MI Driver is operational acting on
-                                      // any MI commands sent to it
-    eDriverState_RunningDebugging, // The MI Driver is currently overseeing an
-                                   // inferior program that is running
-    eDriverState_ShuttingDown, // The MI Driver is tearing down resources and
-                               // about exit
-    eDriverState_count         // Always last
-  };
-
-  // Methods:
-public:
-  // MI system
-  bool Initialize() override;
-  bool Shutdown() override;
-
-  // MI state
-  bool GetExitApplicationFlag() const;
-  DriverState_e GetCurrentDriverState() const;
-  bool SetDriverStateRunningNotDebugging();
-  bool SetDriverStateRunningDebugging();
-  void SetDriverDebuggingArgExecutable();
-  bool IsDriverDebuggingArgExecutable() const;
-
-  // MI information about itself
-  const CMIUtilString &GetAppNameShort() const;
-  const CMIUtilString &GetAppNameLong() const;
-  const CMIUtilString &GetVersionDescription() const;
-
-  // MI do work
-  bool WriteMessageToLog(const CMIUtilString &vMessage);
-  bool SetEnableFallThru(const bool vbYes);
-  bool GetEnableFallThru() const;
-  bool HaveExecutableFileNamePathOnCmdLine() const;
-  const CMIUtilString &GetExecutableFileNamePathOnCmdLine() const;
-
-  // Overridden:
-public:
-  // From CMIDriverMgr::IDriver
-  bool DoInitialize() override;
-  bool DoShutdown() override;
-  bool DoMainLoop() override;
-  lldb::SBError DoParseArgs(const int argc, const char *argv[], FILE *vpStdOut,
-                            bool &vwbExiting) override;
-  CMIUtilString GetError() const override;
-  const CMIUtilString &GetName() const override;
-  lldb::SBDebugger &GetTheDebugger() override;
-  bool GetDriverIsGDBMICompatibleDriver() const override;
-  bool SetId(const CMIUtilString &vId) override;
-  const CMIUtilString &GetId() const override;
-  // From CMIDriverBase
-  void SetExitApplicationFlag(const bool vbForceExit) override;
-  bool DoFallThruToAnotherDriver(const CMIUtilString &vCmd,
-                                 CMIUtilString &vwErrMsg) override;
-  bool SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) override;
-  FILE *GetStdin() const override;
-  FILE *GetStdout() const override;
-  FILE *GetStderr() const override;
-  const CMIUtilString &GetDriverName() const override;
-  const CMIUtilString &GetDriverId() const override;
-  void DeliverSignal(int signal) override;
-
-  // Typedefs:
-private:
-  typedef std::queue<CMIUtilString> QueueStdinLine_t;
-
-  // Methods:
-private:
-  /* ctor */ CMIDriver();
-  /* ctor */ CMIDriver(const CMIDriver &);
-  void operator=(const CMIDriver &);
-
-  lldb::SBError ParseArgs(const int argc, const char *argv[], FILE *vpStdOut,
-                          bool &vwbExiting);
-  bool DoAppQuit();
-  bool InterpretCommand(const CMIUtilString &vTextLine);
-  bool InterpretCommandThisDriver(const CMIUtilString &vTextLine,
-                                  bool &vwbCmdYesValid);
-  CMIUtilString
-  WrapCLICommandIntoMICommand(const CMIUtilString &vTextLine) const;
-  bool InterpretCommandFallThruDriver(const CMIUtilString &vTextLine,
-                                      bool &vwbCmdYesValid);
-  bool ExecuteCommand(const SMICmdData &vCmdData);
-  bool StartWorkerThreads();
-  bool StopWorkerThreads();
-  bool InitClientIDEToMIDriver() const;
-  bool InitClientIDEEclipse() const;
-  bool LocalDebugSessionStartupExecuteCommands();
-  bool ExecuteCommandFile(const bool vbAsyncMode);
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMIDriver() override;
-
-  // Attributes:
-private:
-  static const CMIUtilString ms_constAppNameShort;
-  static const CMIUtilString ms_constAppNameLong;
-  static const CMIUtilString ms_constMIVersion;
-  //
-  bool m_bFallThruToOtherDriverEnabled; // True = yes fall through, false = do
-                                        // not pass on command
-  CMIUtilThreadMutex m_threadMutex;
-  bool m_bDriverIsExiting;  // True = yes, driver told to quit, false = continue
-                            // working
-  void *m_handleMainThread; // *this driver is run by the main thread
-  CMICmnStreamStdin &m_rStdin;
-  CMICmnLLDBDebugger &m_rLldbDebugger;
-  CMICmnStreamStdout &m_rStdOut;
-  DriverState_e m_eCurrentDriverState;
-  bool m_bHaveExecutableFileNamePathOnCmdLine; // True = yes, executable given
-                                               // as one of the parameters to
-                                               // the MI Driver, false = not
-                                               // found
-  CMIUtilString m_strCmdLineArgExecuteableFileNamePath;
-  bool m_bDriverDebuggingArgExecutable; // True = the MI Driver (MI mode) is
-                                        // debugging executable passed as
-                                        // argument,
-  // false = running via a client (e.g. Eclipse)
-  bool m_bHaveCommandFileNamePathOnCmdLine; // True = file with initial commands
-                                            // given as one of the parameters to
-                                            // the MI Driver, false = not found
-  CMIUtilString m_strCmdLineArgCommandFileNamePath;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIDriverBase.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIDriverBase.cpp
deleted file mode 100644
index b8844e2..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIDriverBase.cpp
+++ /dev/null
@@ -1,179 +0,0 @@
-//===-- MIDriverBase.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers:
-#include "lldb/API/SBBroadcaster.h"
-#include "lldb/API/SBEvent.h"
-
-// In-house headers:
-#include "MIDriverBase.h"
-
-//++
-// Details: CMIDriverBase constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIDriverBase::CMIDriverBase()
-    : m_pDriverFallThru(nullptr), m_pDriverParent(nullptr), m_bExitApp(false) {}
-
-//++
-// Details: CMIDriverBase destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIDriverBase::~CMIDriverBase() { m_pDriverFallThru = nullptr; }
-
-//++
-// Details: This function allows *this driver to call on another driver to
-// perform work
-//          should this driver not be able to handle the client data input.
-// Type:    Overrideable.
-//          Check the error message if the function returns a failure.
-// Type:    Overridden.
-// Args:    vCmd        - (R) Command instruction to interpret.
-//          vwErrMsg    - (W) Status description on command failing.
-// Return:  MIstatus::success - Command succeeded.
-//          MIstatus::failure - Command failed.
-// Throws:  None.
-//--
-bool CMIDriverBase::DoFallThruToAnotherDriver(const CMIUtilString &vCmd,
-                                              CMIUtilString &vwErrMsg) {
-  // Do nothing - override and implement. Use m_pDriverFallThru.
-  return MIstatus::success;
-}
-
-//++
-// Details: This function allows *this driver to call on another driver to
-// perform work
-//          should this driver not be able to handle the client data input.
-// Type:    Overrideable.
-// Args:    vrOtherDriver   - (R) Reference to another driver object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverBase::SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver) {
-  MIunused(vrOtherDriver);
-
-  // Do nothing - override and implement. Set m_pDriverFallThru.
-
-  return MIstatus::success;
-}
-
-//++
-// Details: This function allows *this driver to call functionality on the
-// parent driver
-//          ask for information for example.
-// Type:    Overrideable.
-// Args:    vrOtherDriver     - (R) Reference to another driver object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverBase::SetDriverParent(const CMIDriverBase &vrOtherDriver) {
-  MIunused(vrOtherDriver);
-
-  // Do nothing - override and implement. Set m_pDriverParent.
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Retrieve the parent driver to *this driver if one assigned. If
-// assigned *this
-//          is the pass through driver that the parent driver passes work to.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIDriverBase * - Pointer to a driver object.
-//                          - NULL = there is not parent to *this driver.
-// Throws:  None.
-//--
-CMIDriverBase *CMIDriverBase::GetDriversParent() const {
-  return m_pDriverParent;
-}
-
-//++
-// Details: Retrieve the pointer to the other fall through driver *this driver
-// is using
-//          (or not using).
-// Type:    Method.
-// Args:    None.
-// Return:  CMIDriverBase * - Pointer to other driver.
-//                          - NULL if no driver set.
-// Throws:  None.
-//--
-CMIDriverBase *CMIDriverBase::GetDriverToFallThruTo() const {
-  return m_pDriverFallThru;
-}
-
-//++
-// Details: *this driver provides a file stream to other drivers on which *this
-// driver
-//          write's out to and they read as expected input. *this driver is
-//          passing
-//          through commands to the (child) pass through assigned driver.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  FILE * - Pointer to stream.
-// Throws:  None.
-//--
-FILE *CMIDriverBase::GetStdin() const {
-  // Do nothing - override and implement
-  return nullptr;
-}
-
-//++
-// Details: *this driver provides a file stream to other pass through assigned
-// drivers
-//          so they know what to write to.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  FILE * - Pointer to stream.
-// Throws:  None.
-//--
-FILE *CMIDriverBase::GetStdout() const {
-  // Do nothing - override and implement
-  return nullptr;
-}
-
-//++
-// Details: *this driver provides a error file stream to other pass through
-// assigned drivers
-//          so they know what to write to.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  FILE * - Pointer to stream.
-// Throws:  None.
-//--
-FILE *CMIDriverBase::GetStderr() const {
-  // Do nothing - override and implement
-  return nullptr;
-}
-
-//++
-// Details: Set the MI Driver's exit application flag. The application checks
-// this flag
-//          after every stdin line is read so the exit may not be instantaneous.
-//          If vbForceExit is false the MI Driver queries its state and
-//          determines if is
-//          should exit or continue operating depending on that running state.
-// Type:    Overrideable.
-// Args:    vbForceExit - (R) True = Do not query, set state to exit, false =
-// query if can/should exit right now.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIDriverBase::SetExitApplicationFlag(const bool vbForceExit) {
-  MIunused(vbForceExit);
-
-  // Do nothing - override and implement
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIDriverBase.h b/src/llvm-project/lldb/tools/lldb-mi/MIDriverBase.h
deleted file mode 100644
index aec306e..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIDriverBase.h
+++ /dev/null
@@ -1,67 +0,0 @@
-//===-- MIDriverBase.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include "lldb/API/SBBroadcaster.h"
-#include "lldb/API/SBDebugger.h"
-
-// In-house headers:
-#include "MIUtilString.h"
-
-// Declarations:
-namespace lldb {
-class SBBroadcaster;
-}
-
-//++
-//============================================================================
-// Details: MI driver base implementation class. This class has been created so
-//          not have to edit the lldb::SBBroadcaster class code. Functionality
-//          and attributes need to be common to the LLDB Driver class and the
-//          MI Driver class (derived from lldb::SBBroadcaster) so they can call
-//          upon each other for functionality fall through and allow the
-//          CDriverMgr to manage either (any) driver to be operated on.
-//          Each driver instance (the CMIDriver, LLDB::Driver) has its own
-//          LLDB::SBDebugger object.
-//--
-class CMIDriverBase {
-  // Methods:
-public:
-  /* ctor */ CMIDriverBase();
-
-  CMIDriverBase *GetDriverToFallThruTo() const;
-  CMIDriverBase *GetDriversParent() const;
-
-  // Overrideable:
-public:
-  /* dtor */ virtual ~CMIDriverBase();
-
-  virtual bool DoFallThruToAnotherDriver(const CMIUtilString &vCmd,
-                                         CMIUtilString &vwErrMsg);
-  virtual bool SetDriverToFallThruTo(const CMIDriverBase &vrOtherDriver);
-  virtual bool SetDriverParent(const CMIDriverBase &vrOtherDriver);
-  virtual const CMIUtilString &GetDriverName() const = 0;
-  virtual const CMIUtilString &GetDriverId() const = 0;
-  virtual void SetExitApplicationFlag(const bool vbForceExit);
-
-  // MI provide information for the pass through (child) assigned driver
-  virtual FILE *GetStdin() const;
-  virtual FILE *GetStdout() const;
-  virtual FILE *GetStderr() const;
-
-  // Attributes:
-protected:
-  CMIDriverBase *m_pDriverFallThru; // Child driver to use should *this driver
-                                    // not be able to handle client input
-  CMIDriverBase *m_pDriverParent; // The parent driver who passes work to *this
-                                  // driver to do work
-  CMIUtilString m_strDriverId;
-  bool m_bExitApp; // True = Yes, exit application, false = continue execution
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIDriverMain.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIDriverMain.cpp
deleted file mode 100644
index 8bc4571..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIDriverMain.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-//===-- MIDriverMain.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Overview:    Defines the entry point for the console application.
-//              The MI application (project name MI) runs in two modes:
-//              An LLDB native driver mode where it acts no different from the
-//              LLDB driver.
-//              The other mode is the MI when it finds on the command line
-//              the --interpreter option. Command line argument --help on its
-//              own will give
-//              help for the LLDB driver. If entered with --interpreter then MI
-//              help will
-//              provided.
-//              To implement new MI commands derive a new command class from the
-//              command base
-//              class. To enable the new command for interpretation add the new
-//              command class
-//              to the command factory. The files of relevance are:
-//                  MICmdCommands.cpp
-//                  MICmdBase.h / .cpp
-//                  MICmdCmd.h / .cpp
-
-// Third party headers:
-#include "lldb/API/SBHostOS.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/Support/PrettyStackTrace.h"
-#include "llvm/Support/Signals.h"
-#include <atomic>
-#include <csignal>
-#include <stdio.h>
-
-// In house headers:
-#include "MICmnConfig.h"
-#include "MICmnResources.h"
-#include "MICmnStreamStdin.h"
-#include "MIDriver.h"
-#include "MIDriverMgr.h"
-#include "MIUtilDebug.h"
-#include "Platform.h"
-
-#if defined(_MSC_VER)
-#pragma warning(                                                               \
-    once : 4530) // Warning C4530: C++ exception handler used, but unwind
-                 // semantics are not enabled. Specify /EHsc
-#endif           // _MSC_VER
-
-// CODETAG_IOR_SIGNALS
-//++
-// Details: The SIGINT signal is sent to a process by its controlling terminal
-// when a
-//          user wishes to interrupt the process. This is typically initiated by
-//          pressing
-//          Control-C, but on some systems, the "delete" character or "break"
-//          key can be
-//          used.
-//          Be aware this function may be called on another thread besides the
-//          main thread.
-// Type:    Function.
-// Args:    vSigno  - (R) Signal number.
-// Return:  None.
-// Throws:  None.
-//--
-void sigint_handler(int vSigno) {
-#ifdef _WIN32 // Restore handler as it is not persistent on Windows
-  signal(SIGINT, sigint_handler);
-#endif
-  static std::atomic_flag g_interrupt_sent = ATOMIC_FLAG_INIT;
-  CMIDriverMgr &rDriverMgr = CMIDriverMgr::Instance();
-  lldb::SBDebugger *pDebugger = rDriverMgr.DriverGetTheDebugger();
-  if (pDebugger != nullptr) {
-    if (!g_interrupt_sent.test_and_set()) {
-      pDebugger->DispatchInputInterrupt();
-      g_interrupt_sent.clear();
-    }
-  }
-
-  // Send signal to driver so that it can take suitable action
-  rDriverMgr.DeliverSignal(vSigno);
-}
-
-//++
-// Details: Init the MI driver system. Initialize the whole driver system which
-// includes
-//          both the original LLDB driver and the MI driver.
-// Type:    Function.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool DriverSystemInit() {
-  bool bOk = MIstatus::success;
-  CMIDriver &rMIDriver = CMIDriver::Instance();
-  CMIDriverMgr &rDriverMgr = CMIDriverMgr::Instance();
-  bOk = rDriverMgr.Initialize();
-
-  // Register MIDriver first as it needs to initialize and be ready
-  // for the Driver to get information from MIDriver when it initializes
-  // (LLDB Driver is registered with the Driver Manager in MI's Initialize())
-  bOk = bOk &&
-        rDriverMgr.RegisterDriver(rMIDriver, "MIDriver"); // Will be main driver
-
-  return bOk;
-}
-
-//++
-// Details: Shutdown the debugger system. Release / terminate resources external
-// to
-//          specifically the MI driver.
-// Type:    Function.
-// Args:    vbAppExitOk - (R) True = No problems, false = App exiting with
-// problems (investigate!).
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool DriverSystemShutdown(const bool vbAppExitOk) {
-  bool bOk = MIstatus::success;
-
-  // *** Order is important here ***
-  CMIDriverMgr::Instance().Shutdown();
-  return bOk;
-}
-
-//++
-// Details: MI's application start point of execution. The application runs in
-// two modes.
-//          An LLDB native driver mode where it acts no different from the LLDB
-//          driver.
-//          The other mode is the MI when it finds on the command line
-//          the --interpreter option. Command line argument --help on its own
-//          will give
-//          help for the LLDB driver. If entered with --interpreter then
-//          application
-//          help will provided.
-// Type:    Method.
-// Args:    argc    - (R) An integer that contains the count of arguments that
-// follow in
-//                        argv. The argc parameter is always greater than or
-//                        equal to 1.
-//          argv    - (R) An array of null-terminated strings representing
-//          command-line
-//                        arguments entered by the user of the program. By
-//                        convention,
-//                        argv[0] is the command with which the program is
-//                        invoked.
-// Return:  int -  0 =   Normal exit, program success.
-//                >0    = Program success with status i.e. Control-C signal
-//                status
-//                <0    = Program failed.
-//              -1      = Program failed reason not specified here, see MI log
-//              file.
-//              -1000   = Program failed did not initialize successfully.
-// Throws:  None.
-//--
-int main(int argc, char const *argv[]) {
-#if MICONFIG_DEBUG_SHOW_ATTACH_DBG_DLG
-  CMIUtilDebug::WaitForDbgAttachInfinteLoop();
-#endif // MICONFIG_DEBUG_SHOW_ATTACH_DBG_DLG
-
-  llvm::StringRef ToolName = argv[0];
-  llvm::sys::PrintStackTraceOnErrorSignal(ToolName);
-  llvm::PrettyStackTraceProgram X(argc, argv);
-
-  // *** Order is important here ***
-  bool bOk = DriverSystemInit();
-  if (!bOk) {
-    DriverSystemShutdown(bOk);
-    return -1000;
-  }
-
-  // CODETAG_IOR_SIGNALS
-  signal(SIGINT, sigint_handler);
-
-  bool bExiting = false;
-  CMIDriverMgr &rDriverMgr = CMIDriverMgr::Instance();
-  bOk = bOk && rDriverMgr.ParseArgs(argc, argv, bExiting);
-  if (bOk && !bExiting)
-    bOk = rDriverMgr.DriverParseArgs(argc, argv, stdout, bExiting);
-  if (bOk && !bExiting)
-    bOk = rDriverMgr.DriverMainLoop();
-
-  // Logger and other resources shutdown now
-  DriverSystemShutdown(bOk);
-
-  const int appResult = bOk ? 0 : -1;
-
-  return appResult;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIDriverMgr.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIDriverMgr.cpp
deleted file mode 100644
index 26195cd..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIDriverMgr.cpp
+++ /dev/null
@@ -1,727 +0,0 @@
-//===-- MIDriverMgr.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third Party Headers:
-#include "lldb/API/SBError.h"
-
-// In-house headers:
-#include "MICmnLog.h"
-#include "MICmnLogMediumFile.h"
-#include "MICmnResources.h"
-#include "MICmnStreamStdout.h"
-#include "MIDriver.h"
-#include "MIDriverMgr.h"
-#include "MIUtilSingletonHelper.h"
-
-//++
-// Details: CMIDriverMgr constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIDriverMgr::CMIDriverMgr() : m_pDriverCurrent(nullptr), m_bInMi2Mode(false) {}
-
-//++
-// Details: CMIDriverMgr destructor.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIDriverMgr::~CMIDriverMgr() { Shutdown(); }
-
-//++
-// Details: Initialize *this manager.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverMgr::Initialize() {
-  m_clientUsageRefCnt++;
-
-  ClrErrorDescription();
-
-  if (m_bInitialized)
-    return MIstatus::success;
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  // Note initialisation order is important here as some resources depend on
-  // previous
-  MI::ModuleInit<CMICmnLog>(IDS_MI_INIT_ERR_LOG, bOk, errMsg);
-  MI::ModuleInit<CMICmnResources>(IDS_MI_INIT_ERR_RESOURCES, bOk, errMsg);
-
-  m_bInitialized = bOk;
-
-  if (!bOk) {
-    CMIUtilString strInitError(CMIUtilString::Format(
-        MIRSRC(IDS_MI_INIT_ERR_DRIVERMGR), errMsg.c_str()));
-    SetErrorDescription(strInitError);
-    return MIstatus::failure;
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Unbind detach or release resources used by this server in general
-// common
-//          functionality shared between versions of any server interfaces
-//          implemented.
-// Type:    Method.
-// Args:    vbAppExitOk - (R) True = No problems, false = App exiting with
-// problems (investigate!).
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverMgr::Shutdown() {
-  // Do not want a ref counter because this function needs to be called how ever
-  // this
-  // application stops running
-  // if( --m_clientUsageRefCnt > 0 )
-  //  return MIstatus::success;
-
-  ClrErrorDescription();
-
-  if (!m_bInitialized)
-    return MIstatus::success;
-
-  m_bInitialized = false;
-
-  bool bOk = MIstatus::success;
-  CMIUtilString errMsg;
-
-  // Tidy up
-  UnregisterDriverAll();
-
-  // Note shutdown order is important here
-  MI::ModuleShutdown<CMICmnResources>(IDE_MI_SHTDWN_ERR_RESOURCES, bOk, errMsg);
-  MI::ModuleShutdown<CMICmnLog>(IDS_MI_SHTDWN_ERR_LOG, bOk, errMsg);
-
-  if (!bOk) {
-    SetErrorDescriptionn(MIRSRC(IDS_MI_SHTDWN_ERR_DRIVERMGR), errMsg.c_str());
-  }
-
-  return bOk;
-}
-//++
-// Details: Unregister all the Driver registered with *this manager. The manager
-// also
-//          deletes
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverMgr::UnregisterDriverAll() {
-  MapDriverIdToDriver_t::const_iterator it = m_mapDriverIdToDriver.begin();
-  while (it != m_mapDriverIdToDriver.end()) {
-    IDriver *pDriver = (*it).second;
-    pDriver->DoShutdown();
-
-    // Next
-    ++it;
-  }
-
-  m_mapDriverIdToDriver.clear();
-  m_pDriverCurrent = nullptr;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Register a driver with *this Driver Manager. Call
-// SetUseThisDriverToDoWork()
-//          inform the manager which driver is the one to the work. The manager
-//          calls
-//          the driver's init function which must be successful in order to
-//          complete the
-//          registration.
-// Type:    Method.
-// Args:    vrDriver    - (R) The driver to register.
-//          vrDriverID  - (R) The driver's ID to lookup by.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverMgr::RegisterDriver(const IDriver &vrDriver,
-                                  const CMIUtilString &vrDriverID) {
-  if (HaveDriverAlready(vrDriver))
-    return MIstatus::success;
-
-  IDriver *pDriver = const_cast<IDriver *>(&vrDriver);
-  if (!pDriver->SetId(vrDriverID))
-    return MIstatus::failure;
-  if (!pDriver->DoInitialize()) {
-    SetErrorDescriptionn(MIRSRC(IDS_DRIVERMGR_DRIVER_ERR_INIT),
-                         pDriver->GetName().c_str(), vrDriverID.c_str(),
-                         pDriver->GetError().c_str());
-    return MIstatus::failure;
-  }
-
-  MapPairDriverIdToDriver_t pr(vrDriverID, pDriver);
-  m_mapDriverIdToDriver.insert(pr);
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Query the Driver Manager to see if *this manager has the driver
-// already
-//          registered.
-// Type:    Method.
-// Args:    vrDriver    - (R) The driver to query.
-// Return:  True - registered.
-//          False - not registered.
-// Throws:  None.
-//--
-bool CMIDriverMgr::HaveDriverAlready(const IDriver &vrDriver) const {
-  MapDriverIdToDriver_t::const_iterator it = m_mapDriverIdToDriver.begin();
-  while (it != m_mapDriverIdToDriver.end()) {
-    const IDriver *pDrvr = (*it).second;
-    if (pDrvr == &vrDriver)
-      return true;
-
-    // Next
-    ++it;
-  }
-
-  return false;
-}
-
-//++
-// Details: Unregister a driver from the Driver Manager. Call the
-// SetUseThisDriverToDoWork()
-//          function to define another driver to do work if the one being
-//          unregistered did
-//          the work previously.
-// Type:    Method.
-// Args:    vrDriver    - (R) The driver to unregister.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverMgr::UnregisterDriver(const IDriver &vrDriver) {
-  const IDriver *pDrvr = nullptr;
-  MapDriverIdToDriver_t::const_iterator it = m_mapDriverIdToDriver.begin();
-  while (it != m_mapDriverIdToDriver.end()) {
-    pDrvr = (*it).second;
-    if (pDrvr == &vrDriver)
-      break;
-
-    // Next
-    ++it;
-  }
-  m_mapDriverIdToDriver.erase(it);
-
-  if (m_pDriverCurrent == pDrvr)
-    m_pDriverCurrent = nullptr;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Specify the driver to do work. The Driver Manager drives this
-// driver. Any
-//          previous driver doing work is not called anymore (so be sure the
-//          previous
-//          driver is in a tidy state before stopping it working).
-// Type:    Method.
-// Args:    vrADriver   - (R) A lldb::SBBroadcaster/IDriver derived object.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverMgr::SetUseThisDriverToDoWork(const IDriver &vrADriver) {
-  m_pDriverCurrent = const_cast<IDriver *>(&vrADriver);
-
-  const CMIUtilString msg(
-      CMIUtilString::Format(MIRSRC(IDS_DRIVER_SAY_DRIVER_USING),
-                            m_pDriverCurrent->GetName().c_str()));
-  m_pLog->Write(msg, CMICmnLog::eLogVerbosity_Log);
-
-  m_bInMi2Mode = m_pDriverCurrent->GetDriverIsGDBMICompatibleDriver();
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Ask *this manager which driver is currently doing the work.
-// Type:    Method.
-// Args:    None.
-// Return:  IDriver * - Pointer to a driver, NULL if there is no current working
-// driver.
-// Throws:  None.
-//--
-CMIDriverMgr::IDriver *CMIDriverMgr::GetUseThisDriverToDoWork() const {
-  return m_pDriverCurrent;
-}
-
-//++
-// Details: Call this function puts *this driver to work.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverMgr::DriverMainLoop() {
-  if (m_pDriverCurrent != nullptr) {
-    if (!m_pDriverCurrent->DoMainLoop()) {
-      const CMIUtilString errMsg(
-          CMIUtilString::Format(MIRSRC(IDS_DRIVER_ERR_MAINLOOP),
-                                m_pDriverCurrent->GetError().c_str()));
-      CMICmnStreamStdout::Instance().Write(errMsg, true);
-      return MIstatus::failure;
-    }
-  } else {
-    const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
-    CMICmnStreamStdout::Instance().Write(errMsg, true);
-    return MIstatus::failure;
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Get the current driver to validate executable command line
-// arguments.
-// Type:    Method.
-// Args:    argc        - (R)   An integer that contains the count of arguments
-// that follow in
-//                              argv. The argc parameter is always greater than
-//                              or equal to 1.
-//          argv        - (R)   An array of null-terminated strings representing
-//          command-line
-//                              arguments entered by the user of the program. By
-//                              convention,
-//                              argv[0] is the command with which the program is
-//                              invoked.
-//          vpStdOut    - (R)   Point to a standard output stream.
-//          vwbExiting  - (W)   True = *this want to exit, false = continue to
-//          work.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIDriverMgr::DriverParseArgs(const int argc, const char *argv[],
-                                   FILE *vpStdOut, bool &vwbExiting) {
-  if (m_pDriverCurrent == nullptr) {
-    const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
-    CMICmnStreamStdout::Instance().Write(errMsg, true);
-    return MIstatus::failure;
-  }
-
-  const lldb::SBError error(
-      m_pDriverCurrent->DoParseArgs(argc, argv, vpStdOut, vwbExiting));
-  bool bOk = !error.Fail();
-  if (!bOk) {
-    CMIUtilString errMsg;
-    const char *pErrorCstr = error.GetCString();
-    if (pErrorCstr != nullptr)
-      errMsg = CMIUtilString::Format(MIRSRC(IDS_DRIVER_ERR_PARSE_ARGS),
-                                     m_pDriverCurrent->GetName().c_str(),
-                                     pErrorCstr);
-    else
-      errMsg = CMIUtilString::Format(MIRSRC(IDS_DRIVER_ERR_PARSE_ARGS_UNKNOWN),
-                                     m_pDriverCurrent->GetName().c_str());
-
-    bOk = CMICmnStreamStdout::Instance().Write(errMsg, true);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Retrieve the current driver's last error condition.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Text description.
-// Throws:  None.
-//--
-CMIUtilString CMIDriverMgr::DriverGetError() const {
-  if (m_pDriverCurrent != nullptr)
-    return m_pDriverCurrent->GetError();
-  else {
-    const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
-    CMICmnStreamStdout::Instance().Write(errMsg, true);
-  }
-
-  return CMIUtilString();
-}
-
-//++
-// Details: Retrieve the current driver's name.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Driver name.
-//                          Empty string = no current working driver specified.
-// Throws:  None.
-//--
-CMIUtilString CMIDriverMgr::DriverGetName() const {
-  if (m_pDriverCurrent != nullptr)
-    return m_pDriverCurrent->GetName();
-  else {
-    const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
-    CMICmnStreamStdout::Instance().Write(errMsg, true);
-  }
-
-  return CMIUtilString();
-}
-
-//++
-// Details: Retrieve the current driver's debugger object.
-// Type:    Method.
-// Args:    None.
-// Return:  lldb::SBDebugger * - Ptr to driver's debugger object.
-//                             - NULL = no current working driver specified.
-// Throws:  None.
-//--
-lldb::SBDebugger *CMIDriverMgr::DriverGetTheDebugger() {
-  lldb::SBDebugger *pDebugger = nullptr;
-  if (m_pDriverCurrent != nullptr)
-    pDebugger = &m_pDriverCurrent->GetTheDebugger();
-  else {
-    const CMIUtilString errMsg(MIRSRC(IDS_DRIVER_ERR_CURRENT_NOT_SET));
-    CMICmnStreamStdout::Instance().Write(errMsg, true);
-  }
-
-  return pDebugger;
-}
-
-//++
-// Details: Check the arguments given on the command line. The main purpose of
-// this
-//          function is to check for the presence of the --interpreter option.
-//          Having
-//          this option present tells *this manager to set the CMIDriver to do
-//          work. If
-//          not use the LLDB driver. The following are options that are only
-//          handled by
-//          the CMIDriverMgr are:
-//              --help or -h
-//              --interpreter
-//              --version
-//              --versionLong
-//              --log
-//              --executable
-//              --log-dir
-//          The above arguments are not handled by any driver object except for
-//          --executable.
-//          The options --interpreter and --executable in code act very similar.
-//          The
-//          --executable is necessary to differentiate whither the MI Driver is
-//          being using
-//          by a client i.e. Eclipse or from the command line. Eclipse issues
-//          the option
-//          --interpreter and also passes additional arguments which can be
-//          interpreted as an
-//          executable if called from the command line. Using --executable tells
-//          the MI
-//          Driver is being called the command line and that the executable
-//          argument is indeed
-//          a specified executable an so actions commands to set up the
-//          executable for a
-//          debug session. Using --interpreter on the command line does not
-//          action additional
-//          commands to initialise a debug session and so be able to launch the
-//          process. The directory
-//          where the log file is created is specified using --log-dir.
-// Type:    Method.
-// Args:    argc        - (R)   An integer that contains the count of arguments
-// that follow in
-//                              argv. The argc parameter is always greater than
-//                              or equal to 1.
-//          argv        - (R)   An array of null-terminated strings representing
-//          command-line
-//                              arguments entered by the user of the program. By
-//                              convention,
-//                              argv[0] is the command with which the program is
-//                              invoked.
-//          vwbExiting  - (W)   True = *this want to exit, Reasons: help,
-//          invalid arg(s),
-//                              version information only.
-//                              False = Continue to work, start debugger i.e.
-//                              Command
-//                              interpreter.
-// Return:  lldb::SBError - LLDB current error status.
-// Throws:  None.
-//--
-bool CMIDriverMgr::ParseArgs(const int argc, const char *argv[],
-                             bool &vwbExiting) {
-  bool bOk = MIstatus::success;
-
-  vwbExiting = false;
-
-  // Print MI application path to the Log file
-  const CMIUtilString appPath(
-      CMIUtilString::Format(MIRSRC(IDS_MI_APP_FILEPATHNAME), argv[0]));
-  bOk = m_pLog->Write(appPath, CMICmnLog::eLogVerbosity_Log);
-
-  // Print application arguments to the Log file
-  const bool bHaveArgs(argc >= 2);
-  CMIUtilString strArgs(MIRSRC(IDS_MI_APP_ARGS));
-  if (!bHaveArgs) {
-    strArgs += MIRSRC(IDS_WORD_NONE);
-    bOk = bOk && m_pLog->Write(strArgs, CMICmnLog::eLogVerbosity_Log);
-  } else {
-    for (MIint i = 1; i < argc; i++) {
-      strArgs += CMIUtilString::Format("%d:'%s' ", i,
-                                       CMIUtilString::WithNullAsEmpty(argv[i]));
-    }
-    bOk = bOk && m_pLog->Write(strArgs, CMICmnLog::eLogVerbosity_Log);
-  }
-
-  // Look for the command line options
-  bool bHaveArgInterpret = false;
-  bool bHaveArgVersion = false;
-  bool bHaveArgVersionLong = false;
-  bool bHaveArgLog = false;
-  bool bHaveArgLogDir = false;
-  bool bHaveArgHelp = false;
-  CMIUtilString strLogDir;
-
-  bHaveArgInterpret = true;
-  if (bHaveArgs) {
-    // CODETAG_MIDRIVE_CMD_LINE_ARG_HANDLING
-    for (MIint i = 1; i < argc; i++) {
-      // *** Add args to help in GetHelpOnCmdLineArgOptions() ***
-      const CMIUtilString strArg(argv[i]);
-
-      // Argument "--executable" is also check for in CMIDriver::ParseArgs()
-      if (("--interpreter" == strArg) || // Given by the client such as Eclipse
-          ("--executable" == strArg))    // Used to specify that there
-                                         // is executable argument also
-                                         // on the command line
-      {                                  // See fn description.
-        bHaveArgInterpret = true;
-      }
-      if ("--version" == strArg) {
-        bHaveArgVersion = true;
-      }
-      if ("--versionLong" == strArg) {
-        bHaveArgVersionLong = true;
-      }
-      if ("--log" == strArg) {
-        bHaveArgLog = true;
-      }
-      if (0 == strArg.compare(0, 10, "--log-dir=")) {
-        strLogDir = strArg.substr(10, CMIUtilString::npos);
-        bHaveArgLogDir = true;
-      }
-      if (("--help" == strArg) || ("-h" == strArg)) {
-        bHaveArgHelp = true;
-      }
-    }
-  }
-
-  if (bHaveArgLog) {
-    CMICmnLog::Instance().SetEnabled(true);
-  }
-
-  if (bHaveArgLogDir) {
-    bOk = bOk && CMICmnLogMediumFile::Instance().SetDirectory(strLogDir);
-  }
-
-  // Todo: Remove this output when MI is finished. It is temporary to persuade
-  // Eclipse plugin to work.
-  //       Eclipse reads this literally and will not work unless it gets this
-  //       exact version text.
-  // Handle --version option (ignore the --interpreter option if present)
-  if (bHaveArgVersion) {
-    vwbExiting = true;
-    bOk = bOk &&
-          CMICmnStreamStdout::Instance().WriteMIResponse(
-              MIRSRC(IDE_MI_VERSION_GDB));
-    return bOk;
-  }
-
-  // Todo: Make this the --version when the above --version version is removed
-  // Handle --versionlong option (ignore the --interpreter option if present)
-  if (bHaveArgVersionLong) {
-    vwbExiting = true;
-    bOk =
-        bOk && CMICmnStreamStdout::Instance().WriteMIResponse(GetAppVersion());
-    return bOk;
-  }
-
-  // Both '--help' and '--interpreter' means give help for MI only. Without
-  // '--interpreter' help the LLDB driver is working and so help is for that.
-  if (bHaveArgHelp && bHaveArgInterpret) {
-    vwbExiting = true;
-    bOk = bOk &&
-          CMICmnStreamStdout::Instance().WriteMIResponse(
-              GetHelpOnCmdLineArgOptions());
-    return bOk;
-  }
-
-  // This makes the assumption that there is at least one MI compatible
-  // driver registered and one LLDB driver registered and the CMIDriver
-  // is the first one found.
-  // ToDo: Implement a better solution that handle any order, any number
-  // of drivers. Or this 'feature' may be removed if deemed not required.
-  IDriver *pLldbDriver = GetFirstNonMIDriver();
-  IDriver *pMi2Driver = GetFirstMIDriver();
-  if (bHaveArgInterpret && (pMi2Driver != nullptr))
-    bOk = bOk && SetUseThisDriverToDoWork(*pMi2Driver);
-  else if (pLldbDriver != nullptr)
-    bOk = bOk && SetUseThisDriverToDoWork(*pLldbDriver);
-  else {
-    if (bOk) {
-      vwbExiting = true;
-      const CMIUtilString msg(MIRSRC(IDS_DRIVER_ERR_NON_REGISTERED));
-      bOk = bOk && CMICmnStreamStdout::Instance().WriteMIResponse(msg);
-    }
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Return formatted application version and name information.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Text data.
-// Throws:  None.
-//--
-CMIUtilString CMIDriverMgr::GetAppVersion() const {
-  const CMIUtilString strProj(MIRSRC(IDS_PROJNAME));
-  const CMIUtilString strVsn(CMIDriver::Instance().GetVersionDescription());
-  const CMIUtilString strGdb(MIRSRC(IDE_MI_VERSION_GDB));
-  const CMIUtilString strVrsnInfo(CMIUtilString::Format(
-      "%s\n%s\n%s", strProj.c_str(), strVsn.c_str(), strGdb.c_str()));
-
-  return strVrsnInfo;
-}
-
-//++
-// Details: Return formatted help information on all the MI command line
-// options.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Text data.
-// Throws:  None.
-//--
-CMIUtilString CMIDriverMgr::GetHelpOnCmdLineArgOptions() const {
-  const CMIUtilString pHelp[] = {
-      MIRSRC(IDE_MI_APP_DESCRIPTION), MIRSRC(IDE_MI_APP_INFORMATION),
-      MIRSRC(IDE_MI_APP_ARG_USAGE), MIRSRC(IDE_MI_APP_ARG_HELP),
-      MIRSRC(IDE_MI_APP_ARG_VERSION), MIRSRC(IDE_MI_APP_ARG_VERSION_LONG),
-      MIRSRC(IDE_MI_APP_ARG_INTERPRETER), MIRSRC(IDE_MI_APP_ARG_SOURCE),
-      MIRSRC(IDE_MI_APP_ARG_EXECUTEABLE),
-      MIRSRC(IDE_MI_APP_ARG_SYNCHRONOUS),
-      CMIUtilString::Format(
-          MIRSRC(IDE_MI_APP_ARG_APP_LOG),
-          CMICmnLogMediumFile::Instance().GetFileName().c_str()),
-      MIRSRC(IDE_MI_APP_ARG_APP_LOG_DIR), MIRSRC(IDE_MI_APP_ARG_EXECUTABLE),
-      MIRSRC(IDS_CMD_QUIT_HELP), MIRSRC(IDE_MI_APP_ARG_EXAMPLE)};
-  const MIuint nHelpItems = sizeof pHelp / sizeof pHelp[0];
-  CMIUtilString strHelp;
-  for (MIuint i = 0; i < nHelpItems; i++) {
-    strHelp += pHelp[i];
-    strHelp += "\n\n";
-  }
-
-  return strHelp;
-}
-
-//++
-// Details: Search the registered drivers and return the first driver which says
-// it is
-//          GDB/MI compatible i.e. the CMIDriver class.
-// Type:    Method.
-// Args:    None.
-// Return:  IDriver * - Ptr to driver, NULL = no driver found.
-// Throws:  None.
-//--
-CMIDriverMgr::IDriver *CMIDriverMgr::GetFirstMIDriver() const {
-  IDriver *pDriver = nullptr;
-  MapDriverIdToDriver_t::const_iterator it = m_mapDriverIdToDriver.begin();
-  while (it != m_mapDriverIdToDriver.end()) {
-    const CMIUtilString &rDrvId = (*it).first;
-    MIunused(rDrvId);
-    IDriver *pDvr = (*it).second;
-    if (pDvr->GetDriverIsGDBMICompatibleDriver()) {
-      pDriver = pDvr;
-      break;
-    }
-
-    // Next
-    ++it;
-  }
-
-  return pDriver;
-}
-
-//++
-// Details: Search the registered drivers and return the first driver which says
-// it is
-//          not GDB/MI compatible i.e. the LLDB Driver class.
-// Type:    Method.
-// Args:    None.
-// Return:  IDriver * - Ptr to driver, NULL = no driver found.
-// Throws:  None.
-//--
-CMIDriverMgr::IDriver *CMIDriverMgr::GetFirstNonMIDriver() const {
-  IDriver *pDriver = nullptr;
-  MapDriverIdToDriver_t::const_iterator it = m_mapDriverIdToDriver.begin();
-  while (it != m_mapDriverIdToDriver.end()) {
-    const CMIUtilString &rDrvId = (*it).first;
-    MIunused(rDrvId);
-    IDriver *pDvr = (*it).second;
-    if (!pDvr->GetDriverIsGDBMICompatibleDriver()) {
-      pDriver = pDvr;
-      break;
-    }
-
-    // Next
-    ++it;
-  }
-
-  return pDriver;
-}
-
-//++
-// Details: Search the registered drivers and return driver with the specified
-// ID.
-// Type:    Method.
-// Args:    vrDriverId  - (R) ID of a driver.
-// Return:  IDriver * - Ptr to driver, NULL = no driver found.
-// Throws:  None.
-//--
-CMIDriverMgr::IDriver *
-CMIDriverMgr::GetDriver(const CMIUtilString &vrDriverId) const {
-  MapDriverIdToDriver_t::const_iterator it =
-      m_mapDriverIdToDriver.find(vrDriverId);
-  if (it == m_mapDriverIdToDriver.end())
-    return nullptr;
-
-  IDriver *pDriver = (*it).second;
-
-  return pDriver;
-}
-
-//++
-// Details: Gets called when lldb-mi gets a signal. Passed signal to current
-// driver.
-//
-// Type:    Method.
-// Args:    signal that was delivered
-// Return:  None.
-// Throws:  None.
-//--
-void CMIDriverMgr::DeliverSignal(int signal) {
-  if (m_pDriverCurrent != nullptr)
-    m_pDriverCurrent->DeliverSignal(signal);
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIDriverMgr.h b/src/llvm-project/lldb/tools/lldb-mi/MIDriverMgr.h
deleted file mode 100644
index a7a1dbb..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIDriverMgr.h
+++ /dev/null
@@ -1,128 +0,0 @@
-//===-- MIDriverMgr.h -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include "lldb/API/SBDebugger.h"
-#include <map>
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MICmnLog.h"
-#include "MIUtilSingletonBase.h"
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI Driver Manager. Register lldb::SBBroadcaster derived Driver type
-//          objects with *this manager. The manager does not own driver objects
-//          registered with it and so will not delete when this manager is
-//          shutdown. The Driver flagged as "use this one" will be set as
-//          current
-//          driver and will be the one that is used. Other drivers are not
-//          operated. A Driver can call another Driver should it not handle a
-//          command.
-//          It also initializes other resources as part it's setup such as the
-//          Logger and Resources objects (explicit indicate *this object
-//          requires
-//          those objects (modules/components) to support it's own
-//          functionality).
-//          The Driver manager is the first object instantiated as part of the
-//          MI code base. It is also the first thing to interpret the command
-//          line arguments passed to the executable. Bases on options it
-//          understands the manage will set up the appropriate driver or give
-//          help information. Other options are passed on to the driver chosen
-//          to do work.
-//          Each driver instance (the CMIDriver, LLDB::Driver) has its own
-//          LLDB::SBDebugger.
-//          Singleton class.
-//--
-class CMIDriverMgr : public CMICmnBase, public MI::ISingleton<CMIDriverMgr> {
-  friend MI::ISingleton<CMIDriverMgr>;
-
-  // Class:
-public:
-  //++
-  // Description: Driver deriver objects need this interface to work with
-  //              *this manager.
-  //--
-  class IDriver {
-  public:
-    virtual bool DoInitialize() = 0;
-    virtual bool DoShutdown() = 0;
-    virtual bool DoMainLoop() = 0;
-    virtual lldb::SBError DoParseArgs(const int argc, const char *argv[],
-                                      FILE *vpStdOut, bool &vwbExiting) = 0;
-    virtual CMIUtilString GetError() const = 0;
-    virtual const CMIUtilString &GetName() const = 0;
-    virtual lldb::SBDebugger &GetTheDebugger() = 0;
-    virtual bool GetDriverIsGDBMICompatibleDriver() const = 0;
-    virtual bool SetId(const CMIUtilString &vId) = 0;
-    virtual const CMIUtilString &GetId() const = 0;
-    virtual void DeliverSignal(int signal) = 0;
-
-    // Not part of the interface, ignore
-    /* dtor */ virtual ~IDriver() {}
-  };
-
-  // Methods:
-public:
-  // MI system
-  bool Initialize() override;
-  bool Shutdown() override;
-  //
-  CMIUtilString GetAppVersion() const;
-  bool RegisterDriver(const IDriver &vrADriver,
-                      const CMIUtilString &vrDriverID);
-  bool UnregisterDriver(const IDriver &vrADriver);
-  bool SetUseThisDriverToDoWork(
-      const IDriver &vrADriver); // Specify working main driver
-  IDriver *GetUseThisDriverToDoWork() const;
-  bool ParseArgs(const int argc, const char *argv[], bool &vwbExiting);
-  IDriver *GetDriver(const CMIUtilString &vrDriverId) const;
-  //
-  // MI Proxy fn to current specified working driver
-  bool DriverMainLoop();
-  bool DriverParseArgs(const int argc, const char *argv[], FILE *vpStdOut,
-                       bool &vwbExiting);
-  CMIUtilString DriverGetError() const;
-  CMIUtilString DriverGetName() const;
-  lldb::SBDebugger *DriverGetTheDebugger();
-  void DeliverSignal(int signal);
-
-  // Typedef:
-private:
-  typedef std::map<CMIUtilString, IDriver *> MapDriverIdToDriver_t;
-  typedef std::pair<CMIUtilString, IDriver *> MapPairDriverIdToDriver_t;
-
-  // Methods:
-private:
-  /* ctor */ CMIDriverMgr();
-  /* ctor */ CMIDriverMgr(const CMIDriverMgr &);
-  void operator=(const CMIDriverMgr &);
-  //
-  bool HaveDriverAlready(const IDriver &vrMedium) const;
-  bool UnregisterDriverAll();
-  IDriver *GetFirstMIDriver() const;
-  IDriver *GetFirstNonMIDriver() const;
-  CMIUtilString GetHelpOnCmdLineArgOptions() const;
-
-  // Overridden:
-private:
-  // From CMICmnBase
-  /* dtor */ ~CMIDriverMgr() override;
-
-  // Attributes:
-private:
-  MapDriverIdToDriver_t m_mapDriverIdToDriver;
-  IDriver *m_pDriverCurrent; // This driver is used by this manager to do work.
-                             // It is the main driver.
-  bool m_bInMi2Mode; // True = --interpreter entered on the cmd line, false =
-                     // operate LLDB driver (non GDB)
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIExtensions.txt b/src/llvm-project/lldb/tools/lldb-mi/MIExtensions.txt
deleted file mode 100644
index 70508b1..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIExtensions.txt
+++ /dev/null
@@ -1,104 +0,0 @@
-# -file-exec-and-symbols now takes two new (optional) options:
-
-Synopsis
-
-	-file-exec-and-symbols <file> [-p <platform>] [-r <remote-file>]
-
-Specify the executable file to be debugged. This file is the one from which the symbol table is also read. 
-When debugging remote targets specify a remote-file for execution and a file from which symbols are read. 
-The optional platform is the name of the platform, e.g., "remote-ios" or "ios-simulator". The remote-file 
-is the on-device path to the exe.
-
-# -data-info-line
-
-Synopsis
-
-	-data-info-line *<address>
-	-data-info-line <file>:<line>
-
-Provides information about a source line. The input can be <address> like 0x12345678 or <file>:<line>
-where file is a name of source file and line is the line number. As a result the command returns the following
-fields:
-    start - address of the first instruction which refers to that source line
-    end - address of the last instruction which refers to that source line
-    file - the file name
-    line - the line number
-The last two fields are useful in case you have specified a source line using its address.
-
-Example:
-    -data-info-line *0x100000f80
-    ^done,start="0x0000000100000f80",end="0x0000000100000f94",file="/Users/IliaK/p/hello.cpp",line="15"
-
-    -data-info-line hello.cpp:15
-    ^done,start="0x0000000100000f80",end="0x0000000100000f94",file="/Users/IliaK/p/hello.cpp",line="15"
-
-# -data-read-memory-bytes
-
-Synopsis
-
-	-data-read-memory-bytes [--thread <thread-id>] [--frame <frame-index>] [-o <byte-offset>] <address> <count>
-
-Where:
-
-	`address`
-		An expression specifying the start of the memory range to read.
-	`count`
-		Number of bytes to read.
-	`byte-offset`
-		Relative offset in bytes from `address` where reading should start.
-	`thread-id`
-		Integer identifier of the thread within which the expression should be evaluated,
-		if this option is omitted the currently selected thread will be used.
-		This option is not in the MI specification but is implemented by GDB.
-	`frame-index`
-		Index of the frame within which the expression should be evaluated,
-		if this option is omitted the currently selected frame will be used.
-		This option is not in the MI specification but is implemented by GDB.
-
-Reads a block of memory from the specified range.
-
-Note that currently this command works in an all-or-nothing fashion where it either reads the entire
-block of memory successfully and returns it as a single block, or it returns an error. This doesn't
-quite match up with the MI specification that says that subsets of the specified range may be
-returned as individual blocks if only some of the memory within the specified range is accessible.
-
-The result record for this command may contain one or more tuples representing the blocks of memory
-that were read, where each tuple has the following fields:
-
-	`begin`
-		The start of the address range for this block (in hex notation).
-	`end`
-		The end of the address range for this block (in hex notation).
-	`offset`
-		Offset of this block from `address` (that was passed in as an argument).
-	`contents`
-		The actual data in this block (in hex notation).
-
-Example:
-
-	(gdb)
-	-data-read-memory-bytes &array 4
-	^done,memory=[{begin="0x00007fffffffeccc",offset="0x0000000000000000",end="0x00007fffffffecd0",contents="01020304"}]
-	(gdb)
-
-# =library-loaded notification
-
-The =library-loaded notification has 4 extra fields:
-    symbols-loaded - indicates that there are symbols for the loaded library
-    symbols-path   - if symbols are exist then it contains a path for symbols of the loaded library
-    loaded_addr    - contains an address of the loaded library or "-" if address isn't resolved yet
-    size           - contains the size in bytes of the section loaded at 'loaded_addr'
-
-For example:
-    =library-loaded,id="/Users/IliaK/p/hello",target-name="/Users/IliaK/p/hello",host-name="/Users/IliaK/p/hello",symbols-loaded="1",symbols-path="/Users/IliaK/p/hello.dSYM/Contents/Resources/DWARF/hello",loaded_addr="-",size="4096"
-    =library-loaded,id="/usr/lib/dyld",target-name="/usr/lib/dyld",host-name="/usr/lib/dyld",symbols-loaded="0",loaded_addr="0x00007fff5fc00000",size="4096"
-
-# -target-attach
-
-Synopsis
-
-Additional syntax provided by lldb-mi:
-    -target-attach -n <executable-name> [--waitfor]
-
-Attach to an executable. Using -n allows specifying an executable name to attach to. 
-Using this with --watifor can do a deffered attach. The flags -n and --waitfor match the syntax of lldb proper's 'process attach' command.
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIReadMe.txt b/src/llvm-project/lldb/tools/lldb-mi/MIReadMe.txt
deleted file mode 100644
index 51316ed..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIReadMe.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-========================================================================
-    The MI Driver - LLDB Machine Interface V2 (MI)  Project Overview
-========================================================================
-
-The MI Driver is a stand alone executable that either be used via a 
-client i.e. Eclipse or directly from the command line. 
-
-For help information on using the MI driver type at the command line:
-
-	lldb-mi --interpreter --help
-
-A blog about the MI Driver is available on CodePlay's website. Although it may not be
-completely accurate after the recent changes in lldb-mi.
-http://www.codeplay.com/portal/lldb-mi-driver---part-1-introduction
-
-In MI mode and invoked with --log option, lldb-mi generates lldb-mi-log.txt 
-This file keeps a history of the MI Driver's activity for one session. It is
-used to aid the debugging of the MI Driver. It also gives warnings about
-command's which do not support certain argument or options.  
-
-Note any command or text sent to the MI Driver in MI mode that is not a command 
-registered in the MI Driver's Command Factory will be rejected and an error message
-will be generated.
-
-All the files prefix with MI are specifically for the MI driver code only.
-File MIDriverMain.cpp contains the executables main() function.
-
-=========================================================================
-Current limitations:
-1. Not all commands and their options have been implemented. Please see
-the source code for details.
-2. LLDB-MI may have additional arguments not used in GDB MI. Please see
-MIExtensions.txt
-
-=========================================================================
-The MI Driver build configuration:
-MICmnConfig.h defines various preprocessor build options.
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilDateTimeStd.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIUtilDateTimeStd.cpp
deleted file mode 100644
index e92250a..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilDateTimeStd.cpp
+++ /dev/null
@@ -1,84 +0,0 @@
-//===-- MIUtilDateTimeStd.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MIUtilDateTimeStd.h"
-#include "MICmnResources.h"
-
-//++
-// Details: CMIUtilDateTimeStd constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilDateTimeStd::CMIUtilDateTimeStd() {}
-
-//++
-// Details: CMIUtilDateTimeStd destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilDateTimeStd::~CMIUtilDateTimeStd() {}
-
-//++
-// Details: Retrieve system local current date. Format is MM/DD/YYYY.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Text description.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilDateTimeStd::GetDate() {
-  CMIUtilString strDate(MIRSRC(IDS_WORD_INVALIDBRKTS));
-
-  std::time(&m_rawTime);
-  const std::tm *pTi = std::localtime(&m_rawTime);
-  if (std::strftime(&m_pScratch[0], sizeof(m_pScratch), "%d/%m/%y", pTi) > 0)
-    strDate = m_pScratch;
-
-  return strDate;
-}
-
-//++
-// Details: Retrieve system local current time. Format is HH:MM:SS 24 hour
-// clock.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Text description.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilDateTimeStd::GetTime() {
-  std::time(&m_rawTime);
-  const std::tm *pTi = std::localtime(&m_rawTime);
-  const CMIUtilString seconds(CMIUtilString::Format("%d", pTi->tm_sec));
-  const CMIUtilString zero((seconds.length() == 1) ? "0" : "");
-  const CMIUtilString strTime(CMIUtilString::Format(
-      "%d:%d:%s%s", pTi->tm_hour, pTi->tm_min, zero.c_str(), seconds.c_str()));
-
-  return strTime;
-}
-
-//++
-// Details: Retrieve system local current date and time in yyyy-MM-dd--HH-mm-ss
-// format for log file names.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Text description.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilDateTimeStd::GetDateTimeLogFilename() {
-  std::time(&m_rawTime);
-  const std::tm *pTi = std::localtime(&m_rawTime);
-  const CMIUtilString strTime(CMIUtilString::Format(
-      "%d%02d%02d%02d%02d%02d", pTi->tm_year + 1900, pTi->tm_mon, pTi->tm_mday,
-      pTi->tm_hour, pTi->tm_min, pTi->tm_sec));
-
-  return strTime;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilDateTimeStd.h b/src/llvm-project/lldb/tools/lldb-mi/MIUtilDateTimeStd.h
deleted file mode 100644
index 1a8e30c..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilDateTimeStd.h
+++ /dev/null
@@ -1,40 +0,0 @@
-//===-- MIUtilDateTimeStd.h -------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers
-#include <ctime>
-
-// In-house headers:
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI common code utility class. Used to retrieve system local date
-//          time.
-//--
-class CMIUtilDateTimeStd {
-  // Methods:
-public:
-  /* ctor */ CMIUtilDateTimeStd();
-
-  CMIUtilString GetDate();
-  CMIUtilString GetTime();
-  CMIUtilString GetDateTimeLogFilename();
-
-  // Overrideable:
-public:
-  // From CMICmnBase
-  /* dtor */ virtual ~CMIUtilDateTimeStd();
-
-  // Attributes:
-private:
-  std::time_t m_rawTime;
-  char m_pScratch[16];
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilDebug.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIUtilDebug.cpp
deleted file mode 100644
index 4b418f3..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilDebug.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-//===-- MIUtilDebug.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers:
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
-// In-house headers:
-#include "MICmnLog.h"
-#include "MIDriver.h"
-#include "MIUtilDebug.h"
-
-//++
-// Details: CMIUtilDebug constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilDebug::CMIUtilDebug() {}
-
-//++
-// Details: CMIUtilDebug destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilDebug::~CMIUtilDebug() {}
-
-//++
-// Details: Temporarily stall the process/application to give the programmer the
-//          opportunity to attach a debugger. How to use: Put a break in the
-//          programmer
-//          where you want to visit, run the application then attach your
-//          debugger to the
-//          application. Hit the debugger's pause button and the debugger should
-//          should
-//          show this loop. Change the i variable value to break out of the loop
-//          and
-//          visit your break point.
-// Type:    Static method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilDebug::WaitForDbgAttachInfinteLoop() {
-  MIuint i = 0;
-  while (i == 0) {
-    const std::chrono::milliseconds time(100);
-    std::this_thread::sleep_for(time);
-  }
-}
-
-
-// Instantiations:
-CMICmnLog &CMIUtilDebugFnTrace::ms_rLog = CMICmnLog::Instance();
-MIuint CMIUtilDebugFnTrace::ms_fnDepthCnt = 0;
-
-//++
-// Details: CMIUtilDebugFnTrace constructor.
-// Type:    Method.
-// Args:    vFnName - (R) The text to insert into the log.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilDebugFnTrace::CMIUtilDebugFnTrace(const CMIUtilString &vFnName)
-    : m_strFnName(vFnName) {
-  const CMIUtilString txt(
-      CMIUtilString::Format("%d>%s", ++ms_fnDepthCnt, m_strFnName.c_str()));
-  ms_rLog.Write(txt, CMICmnLog::eLogVerbosity_FnTrace);
-}
-
-//++
-// Details: CMIUtilDebugFnTrace destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilDebugFnTrace::~CMIUtilDebugFnTrace() {
-  const CMIUtilString txt(
-      CMIUtilString::Format("%d<%s", ms_fnDepthCnt--, m_strFnName.c_str()));
-  ms_rLog.Write(txt, CMICmnLog::eLogVerbosity_FnTrace);
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilDebug.h b/src/llvm-project/lldb/tools/lldb-mi/MIUtilDebug.h
deleted file mode 100644
index 537907a..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilDebug.h
+++ /dev/null
@@ -1,79 +0,0 @@
-//===-- MIUtilDebug.h -------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-#define MI_USE_DEBUG_TRACE_FN // Undefine to compile out fn trace code
-
-// In-house headers:
-#include "MIUtilString.h"
-
-// Declarations:
-class CMICmnLog;
-
-//++
-//============================================================================
-// Details: MI debugging aid utility class.
-//--
-class CMIUtilDebug {
-  // Statics:
-public:
-  static void WaitForDbgAttachInfinteLoop();
-
-  // Methods:
-public:
-  /* ctor */ CMIUtilDebug();
-
-  // Overrideable:
-public:
-  // From CMICmnBase
-  /* dtor */ virtual ~CMIUtilDebug();
-};
-
-//++
-//============================================================================
-// Details: MI debug utility class. Used to indicate the current function
-//          depth in the call stack. It uses the CMIlCmnLog logger to output
-//          the current fn trace information.
-//          Use macro MI_TRACEFN( "Some fn name" ) and implement the scope of
-//          the functions you wish to build up a trace off.
-//          Use preprocessor definition MI_USE_DEBUG_TRACE_FN to turn off or on
-//          tracing code.
-//--
-class CMIUtilDebugFnTrace {
-  // Methods:
-public:
-  /* ctor */ CMIUtilDebugFnTrace(const CMIUtilString &vFnName);
-
-  // Overrideable:
-public:
-  // From CMICmnBase
-  /* dtor */ virtual ~CMIUtilDebugFnTrace();
-
-  // Attributes:
-private:
-  const CMIUtilString m_strFnName;
-
-  static CMICmnLog &ms_rLog;
-  static MIuint ms_fnDepthCnt; // Increment count as fn depth increases,
-                               // decrement count as fn stack pops off
-};
-
-//++
-//============================================================================
-// Details: Take the given text and send it to the server's Logger to output to
-// the
-//          trace file.
-// Type:    Compile preprocess.
-// Args:    x   - (R) Message (may be seen by user).
-//--
-#ifdef MI_USE_DEBUG_TRACE_FN
-#define MI_TRACEFN(x) CMIUtilDebugFnTrace __MITrace(x)
-#else
-#define MI_TRACEFN(x)
-#endif // MI_USE_DEBUG_TRACE_FN
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilFileStd.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIUtilFileStd.cpp
deleted file mode 100644
index 2d8a059..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilFileStd.cpp
+++ /dev/null
@@ -1,282 +0,0 @@
-//===-- MIUtilFileStd.cpp ---------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers
-#include <assert.h>
-#include <cerrno>
-#include <stdio.h>
-#include <string.h>
-
-// In-house headers:
-#include "MICmnResources.h"
-#include "MIUtilFileStd.h"
-#include "lldb/Host/FileSystem.h"
-
-#include "llvm/Support/ConvertUTF.h"
-#include "llvm/Support/Errno.h"
-
-//++
-// Details: CMIUtilFileStd constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilFileStd::CMIUtilFileStd()
-    : m_fileNamePath(CMIUtilString()), m_pFileHandle(nullptr)
-#if defined(_MSC_VER)
-      ,
-      m_constCharNewLine("\r\n")
-#else
-      ,
-      m_constCharNewLine("\n")
-#endif // #if defined( _MSC_VER )
-      ,
-      m_bFileError(false) {
-}
-
-//++
-// Details: CMIUtilFileStd destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilFileStd::~CMIUtilFileStd() { Close(); }
-
-//++
-// Details: Open file for writing. On the first call to this function after
-// *this object
-//          is created the file is either created or replace, from then on open
-//          only opens
-//          an existing file.
-// Type:    Method.
-// Args:    vFileNamePath   - (R) File name path.
-//          vwrbNewCreated  - (W) True - file recreated, false - file appended
-//          too.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilFileStd::CreateWrite(const CMIUtilString &vFileNamePath,
-                                 bool &vwrbNewCreated) {
-  // Reset
-  m_bFileError = false;
-  vwrbNewCreated = false;
-
-  if (vFileNamePath.empty()) {
-    m_bFileError = true;
-    SetErrorDescription(MIRSRC(IDS_UTIL_FILE_ERR_INVALID_PATHNAME));
-    return MIstatus::failure;
-  }
-
-  // File is already open so exit
-  if (m_pFileHandle != nullptr)
-    return MIstatus::success;
-
-#if !defined(_MSC_VER)
-  // Open with 'write' and 'binary' mode
-  m_pFileHandle = llvm::sys::RetryAfterSignal(nullptr, ::fopen,
-      vFileNamePath.c_str(), "wb");
-#else
-  // Open a file with exclusive write and shared read permissions
-  std::wstring path;
-  if (llvm::ConvertUTF8toWide(vFileNamePath.c_str(), path))
-    m_pFileHandle = ::_wfsopen(path.c_str(), L"wb", _SH_DENYWR);
-  else {
-    errno = EINVAL;
-    m_pFileHandle = nullptr;
-  }
-#endif // !defined( _MSC_VER )
-
-  if (m_pFileHandle == nullptr) {
-    m_bFileError = true;
-    SetErrorDescriptionn(MIRSRC(IDS_UTIL_FILE_ERR_OPENING_FILE),
-                         strerror(errno), vFileNamePath.c_str());
-    return MIstatus::failure;
-  }
-
-  vwrbNewCreated = true;
-  m_fileNamePath = vFileNamePath;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Write data to existing opened file.
-// Type:    Method.
-// Args:    vData - (R) Text data.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilFileStd::Write(const CMIUtilString &vData) {
-  if (vData.size() == 0)
-    return MIstatus::success;
-
-  if (m_bFileError)
-    return MIstatus::failure;
-
-  if (m_pFileHandle == nullptr) {
-    m_bFileError = true;
-    SetErrorDescriptionn(MIRSRC(IDE_UTIL_FILE_ERR_WRITING_NOTOPEN),
-                         m_fileNamePath.c_str());
-    return MIstatus::failure;
-  }
-
-  // Get the string size
-  MIuint size = vData.size();
-  if (::fwrite(vData.c_str(), 1, size, m_pFileHandle) == size) {
-    // Flush the data to the file
-    ::fflush(m_pFileHandle);
-    return MIstatus::success;
-  }
-
-  // Not all of the data has been transferred
-  m_bFileError = true;
-  SetErrorDescriptionn(MIRSRC(IDE_UTIL_FILE_ERR_WRITING_FILE),
-                       m_fileNamePath.c_str());
-  return MIstatus::failure;
-}
-
-//++
-// Details: Write data to existing opened file.
-// Type:    Method.
-// Args:    vData       - (R) Text data.
-//          vCharCnt    - (R) Text data length.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilFileStd::Write(const char *vpData, const MIuint vCharCnt) {
-  if (vCharCnt == 0)
-    return MIstatus::success;
-
-  if (m_bFileError)
-    return MIstatus::failure;
-
-  if (m_pFileHandle == nullptr) {
-    m_bFileError = true;
-    SetErrorDescriptionn(MIRSRC(IDE_UTIL_FILE_ERR_WRITING_NOTOPEN),
-                         m_fileNamePath.c_str());
-    return MIstatus::failure;
-  }
-
-  if (::fwrite(vpData, 1, vCharCnt, m_pFileHandle) == vCharCnt) {
-    // Flush the data to the file
-    ::fflush(m_pFileHandle);
-    return MIstatus::success;
-  }
-
-  // Not all of the data has been transferred
-  m_bFileError = true;
-  SetErrorDescriptionn(MIRSRC(IDE_UTIL_FILE_ERR_WRITING_FILE),
-                       m_fileNamePath.c_str());
-  return MIstatus::failure;
-}
-
-//++
-// Details: Close existing opened file. Note Close() must must an open!
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilFileStd::Close() {
-  if (m_pFileHandle == nullptr)
-    return;
-
-  ::fclose(m_pFileHandle);
-  m_pFileHandle = nullptr;
-  // m_bFileError = false; Do not reset as want to remain until next attempt at
-  // open or create
-}
-
-//++
-// Details: Retrieve state of whether the file is ok.
-// Type:    Method.
-// Args:    None.
-// Return:  True - file ok.
-//          False - file has a problem.
-// Throws:  None.
-//--
-bool CMIUtilFileStd::IsOk() const { return !m_bFileError; }
-
-//++
-// Details: Status on a file existing already.
-// Type:    Method.
-// Args:    vFileNamePath.
-// Return:  True - Exists.
-//          False - Not found.
-// Throws:  None.
-//--
-bool CMIUtilFileStd::IsFileExist(const CMIUtilString &vFileNamePath) const {
-  if (vFileNamePath.empty())
-    return false;
-
-  FILE *pTmp = nullptr;
-  pTmp = llvm::sys::RetryAfterSignal(nullptr, ::fopen,
-      vFileNamePath.c_str(), "wb");
-  if (pTmp != nullptr) {
-    ::fclose(pTmp);
-    return true;
-  }
-
-  return false;
-}
-
-//++
-// Details: Retrieve the file current carriage line return characters used.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString & - Text.
-// Throws:  None.
-//--
-const CMIUtilString &CMIUtilFileStd::GetLineReturn() const {
-  return m_constCharNewLine;
-}
-
-//++
-// Details: Given a file name directory path, strip off the filename and return
-// the path.
-//          It look for either backslash or forward slash.
-// Type:    Method.
-// Args:    vDirectoryPath  - (R) Text directory path.
-// Return:  CMIUtilString - Directory path.
-// Throws:  None.
-//--
-CMIUtilString
-CMIUtilFileStd::StripOffFileName(const CMIUtilString &vDirectoryPath) {
-  const size_t nPos = vDirectoryPath.rfind('\\');
-  size_t nPos2 = vDirectoryPath.rfind('/');
-  if ((nPos == std::string::npos) && (nPos2 == std::string::npos))
-    return vDirectoryPath;
-
-  if (nPos > nPos2)
-    nPos2 = nPos;
-
-  const CMIUtilString strPath(vDirectoryPath.substr(0, nPos2).c_str());
-  return strPath;
-}
-
-//++
-// Details: Return either backslash or forward slash appropriate to the OS this
-// application
-//          is running on.
-// Type:    Static method.
-// Args:    None.
-// Return:  char - '/' or '\' character.
-// Throws:  None.
-//--
-char CMIUtilFileStd::GetSlash() {
-#if !defined(_MSC_VER)
-  return '/';
-#else
-  return '\\';
-#endif // !defined( _MSC_VER )
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilFileStd.h b/src/llvm-project/lldb/tools/lldb-mi/MIUtilFileStd.h
deleted file mode 100644
index e2e590b..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilFileStd.h
+++ /dev/null
@@ -1,48 +0,0 @@
-//===-- MIUtilFileStd.h -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI common code utility class. File handling.
-//--
-class CMIUtilFileStd : public CMICmnBase {
-  // Static:
-public:
-  static char GetSlash();
-
-  // Methods:
-public:
-  /* ctor */ CMIUtilFileStd();
-  //
-  bool CreateWrite(const CMIUtilString &vFileNamePath, bool &vwrbNewCreated);
-  bool Write(const CMIUtilString &vData);
-  bool Write(const char *vpData, const MIuint vCharCnt);
-  void Close();
-  bool IsOk() const;
-  bool IsFileExist(const CMIUtilString &vFileNamePath) const;
-  const CMIUtilString &GetLineReturn() const;
-  static CMIUtilString StripOffFileName(const CMIUtilString &vDirectoryPath);
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMIUtilFileStd() override;
-
-  // Attributes:
-private:
-  CMIUtilString m_fileNamePath;
-  FILE *m_pFileHandle;
-  CMIUtilString m_constCharNewLine;
-  bool m_bFileError; // True = have a file error ATM, false = all ok
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilMapIdToVariant.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIUtilMapIdToVariant.cpp
deleted file mode 100644
index 9361ced..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilMapIdToVariant.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-//===-- MIUtilMapIdToVariant.cpp --------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MIUtilMapIdToVariant.h"
-
-//++
-// Details: CMIUtilMapIdToVariant constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilMapIdToVariant::CMIUtilMapIdToVariant() {}
-
-//++
-// Details: CMIUtilMapIdToVariant destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilMapIdToVariant::~CMIUtilMapIdToVariant() {}
-
-//++
-// Details: Remove at the data from *this container.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilMapIdToVariant::Clear() { m_mapKeyToVariantValue.clear(); }
-
-//++
-// Details: Check an ID is present already in *this container.
-// Type:    Method.
-// Args:    vId - (R) Unique ID i.e. GUID.
-// Return:  True - registered.
-//          False - not found.
-// Throws:  None.
-//--
-bool CMIUtilMapIdToVariant::HaveAlready(const CMIUtilString &vId) const {
-  const MapKeyToVariantValue_t::const_iterator it =
-      m_mapKeyToVariantValue.find(vId);
-  return it != m_mapKeyToVariantValue.end();
-}
-
-//++
-// Details: Determine if *this container is currently holding any data.
-// Type:    Method.
-// Args:    None.
-// Return:  bool    - True - Yes empty, false - one or more data object present.
-// Throws:  None.
-//--
-bool CMIUtilMapIdToVariant::IsEmpty() const {
-  return m_mapKeyToVariantValue.empty();
-}
-
-//++
-// Details: Check the ID is valid to be registered.
-// Type:    Method.
-// Args:    vId - (R) Unique ID i.e. GUID.
-// Return:  True - valid.
-//          False - not valid.
-// Throws:  None.
-//--
-bool CMIUtilMapIdToVariant::IsValid(const CMIUtilString &vId) const {
-  bool bValid = true;
-
-  if (vId.empty())
-    bValid = false;
-
-  return bValid;
-}
-
-//++
-// Details: Remove from *this contain a data object specified by ID. The data
-// object
-//          when removed also calls its destructor should it have one.
-// Type:    Method.
-// Args:    vId - (R) Unique ID i.e. GUID.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilMapIdToVariant::Remove(const CMIUtilString &vId) {
-  const MapKeyToVariantValue_t::const_iterator it =
-      m_mapKeyToVariantValue.find(vId);
-  if (it != m_mapKeyToVariantValue.end()) {
-    m_mapKeyToVariantValue.erase(it);
-  }
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilMapIdToVariant.h b/src/llvm-project/lldb/tools/lldb-mi/MIUtilMapIdToVariant.h
deleted file mode 100644
index ba3e176..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilMapIdToVariant.h
+++ /dev/null
@@ -1,129 +0,0 @@
-//===-- MIUtilMapIdToVariant.h ----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include <map>
-
-// In-house headers:
-#include "MICmnBase.h"
-#include "MICmnResources.h"
-#include "MIUtilString.h"
-#include "MIUtilVariant.h"
-
-//++
-//============================================================================
-// Details: MI common code utility class. Map type container that hold general
-//          object types (by being a variant wrapper)
-//          objects by ID.
-//--
-class CMIUtilMapIdToVariant : public CMICmnBase {
-  // Methods:
-public:
-  /* ctor */ CMIUtilMapIdToVariant();
-
-  template <typename T> bool Add(const CMIUtilString &vId, const T &vData);
-  void Clear();
-  template <typename T>
-  bool Get(const CMIUtilString &vId, T &vrwData, bool &vrwbFound) const;
-  bool HaveAlready(const CMIUtilString &vId) const;
-  bool IsEmpty() const;
-  bool Remove(const CMIUtilString &vId);
-
-  // Overridden:
-public:
-  // From CMICmnBase
-  /* dtor */ ~CMIUtilMapIdToVariant() override;
-
-  // Typedefs:
-private:
-  typedef std::map<CMIUtilString, CMIUtilVariant> MapKeyToVariantValue_t;
-  typedef std::pair<CMIUtilString, CMIUtilVariant> MapPairKeyToVariantValue_t;
-
-  // Methods:
-private:
-  bool IsValid(const CMIUtilString &vId) const;
-
-  // Attributes:
-  MapKeyToVariantValue_t m_mapKeyToVariantValue;
-};
-
-//++
-// Details: Add to *this container a data object of general type identified by
-// an ID.
-//          If the data with that ID already exists in the container it is
-//          replace with
-//          the new data specified.
-// Type:    Method.
-// Args:    T       - The data object's variable type.
-//          vId     - (R) Unique ID i.e. GUID.
-//          vData   - (R) The general data object to be stored of some type.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-template <typename T>
-bool CMIUtilMapIdToVariant::Add(const CMIUtilString &vId, const T &vData) {
-  if (!IsValid(vId)) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_VARIANT_ERR_MAP_KEY_INVALID), vId.c_str()));
-    return MIstatus::failure;
-  }
-
-  const bool bOk = HaveAlready(vId) ? Remove(vId) : MIstatus::success;
-  if (bOk) {
-    CMIUtilVariant data;
-    data.Set<T>(vData);
-    MapPairKeyToVariantValue_t pr(vId, data);
-    m_mapKeyToVariantValue.insert(pr);
-  }
-
-  return bOk;
-}
-
-//++
-// Details: Retrieve a data object from *this container identified by the
-// specified ID.
-// Type:    Method.
-// Args:    T           - The data object's variable type.
-//          vId         - (R) Unique ID i.e. GUID.
-//          vrwData     - (W) Copy of the data object held.
-//          vrwbFound   - (W) True = data found, false = data not found.
-// Return:  MIstatus::success - Function succeeded.
-//          MIstatus::failure - Function failed.
-// Throws:  None.
-//--
-template <typename T>
-bool CMIUtilMapIdToVariant::Get(const CMIUtilString &vId, T &vrwData,
-                                bool &vrwbFound) const {
-  vrwbFound = false;
-
-  if (!IsValid(vId)) {
-    SetErrorDescription(CMIUtilString::Format(
-        MIRSRC(IDS_VARIANT_ERR_MAP_KEY_INVALID), vId.c_str()));
-    return MIstatus::failure;
-  }
-
-  const MapKeyToVariantValue_t::const_iterator it =
-      m_mapKeyToVariantValue.find(vId);
-  if (it != m_mapKeyToVariantValue.end()) {
-    const CMIUtilVariant &rData = (*it).second;
-    const T *pDataObj = rData.Get<T>();
-    if (pDataObj != nullptr) {
-      vrwbFound = true;
-      vrwData = *pDataObj;
-      return MIstatus::success;
-    } else {
-      SetErrorDescription(MIRSRC(IDS_VARIANT_ERR_USED_BASECLASS));
-      return MIstatus::failure;
-    }
-  }
-
-  return MIstatus::success;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilSingletonBase.h b/src/llvm-project/lldb/tools/lldb-mi/MIUtilSingletonBase.h
deleted file mode 100644
index e76fff7..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilSingletonBase.h
+++ /dev/null
@@ -1,52 +0,0 @@
-//===-- MIUtilSingletonBase.h -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-namespace MI {
-
-//   MI::ISingleton base class usage:
-//
-//   class CMIDerivedClass
-//       : public MI::ISingleton< CMIDerivedClass >
-//   {
-//       friend MI::ISingleton< CMIDerivedClass >;
-//
-//   // Overridden:
-//   public:
-//       // From MI::ISingleton
-//       bool Initialize() override;
-//       bool Shutdown() override;
-//   };
-
-//++
-//============================================================================
-// Details: Base class for the singleton pattern.
-// Gotchas: Derived class must specify MI::ISingleton<> as a friend class.
-//--
-template <typename T> class ISingleton {
-  // Statics:
-public:
-  // Return an instance of the derived class
-  static T &Instance() {
-    // This will fail if the derived class has not
-    // declared itself to be a friend of MI::ISingleton
-    static T instance;
-
-    return instance;
-  }
-
-  // Overrideable:
-public:
-  virtual bool Initialize() = 0;
-  virtual bool Shutdown() = 0;
-  //
-  /* dtor */ virtual ~ISingleton() {}
-};
-
-} // namespace MI
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilSingletonHelper.h b/src/llvm-project/lldb/tools/lldb-mi/MIUtilSingletonHelper.h
deleted file mode 100644
index b9ac61a..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilSingletonHelper.h
+++ /dev/null
@@ -1,81 +0,0 @@
-//===-- MIUtilSingletonHelper.h ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In house headers:
-#include "MICmnResources.h"
-#include "MIUtilString.h"
-
-namespace MI {
-
-//++
-//============================================================================
-// Details: Short cut helper function to simplify repeated initialisation of
-//          MI components (singletons) required by a client module.
-// Type:    Template method.
-// Args:    vErrorResrcId   - (R)  The string resource ID error message
-// identifier to place in errMsg.
-//          vwrbOk          - (RW) On input True = Try to initialize MI driver
-//          module.
-//                                 On output True = MI driver module initialise
-//                                 successfully.
-//          vwrErrMsg       - (W)  MI driver module initialise error description
-//          on failure.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-//--
-template <typename T>
-bool ModuleInit(const MIint vErrorResrcId, bool &vwrbOk,
-                CMIUtilString &vwrErrMsg) {
-  if (vwrbOk && !T::Instance().Initialize()) {
-    vwrbOk = MIstatus::failure;
-    vwrErrMsg = CMIUtilString::Format(
-        MIRSRC(vErrorResrcId), T::Instance().GetErrorDescription().c_str());
-  }
-
-  return vwrbOk;
-}
-
-//++
-//============================================================================
-// Details: Short cut helper function to simplify repeated shutdown of
-//          MI components (singletons) required by a client module.
-// Type:    Template method.
-// Args:    vErrorResrcId   - (R)  The string resource ID error message
-// identifier
-//                                 to place in errMsg.
-//          vwrbOk          - (W)  If not already false make false on module
-//                                 shutdown failure.
-//          vwrErrMsg       - (RW) Append to existing error description string
-//          MI
-//                                 driver module initialise error description on
-//                                 failure.
-// Return:  True - Module shutdown succeeded.
-//          False - Module shutdown failed.
-//--
-template <typename T>
-bool ModuleShutdown(const MIint vErrorResrcId, bool &vwrbOk,
-                    CMIUtilString &vwrErrMsg) {
-  bool bOk = MIstatus::success;
-
-  if (!T::Instance().Shutdown()) {
-    const bool bMoreThanOneError(!vwrErrMsg.empty());
-    bOk = MIstatus::failure;
-    if (bMoreThanOneError)
-      vwrErrMsg += ", ";
-    vwrErrMsg += CMIUtilString::Format(
-        MIRSRC(vErrorResrcId), T::Instance().GetErrorDescription().c_str());
-  }
-
-  vwrbOk = bOk ? vwrbOk : MIstatus::failure;
-
-  return bOk;
-}
-
-} // namespace MI
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilString.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIUtilString.cpp
deleted file mode 100644
index 986de96..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilString.cpp
+++ /dev/null
@@ -1,915 +0,0 @@
-//===-- MIUtilString.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third party headers
-#include "llvm/Support/Compiler.h"
-#include <cstdlib>
-#include <inttypes.h>
-#include <limits.h>
-#include <memory>
-#include <sstream>
-#include <stdarg.h>
-#include <string.h>
-
-// In-house headers:
-#include "MIUtilString.h"
-
-//++
-// Details: CMIUtilString constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilString::CMIUtilString() : std::string() {}
-
-//++
-// Details: CMIUtilString constructor.
-// Type:    Method.
-// Args:    vpData  - Pointer to UTF8 text data.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilString::CMIUtilString(const char *vpData)
-  : std::string(WithNullAsEmpty(vpData)) {}
-
-//++
-// Details: CMIUtilString constructor.
-// Type:    Method.
-// Args:    vpStr  - Text data.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilString::CMIUtilString(const std::string &vrStr) : std::string(vrStr) {}
-
-//++
-// Details: CMIUtilString assignment operator.
-// Type:    Method.
-// Args:    vpRhs   - Pointer to UTF8 text data.
-// Return:  CMIUtilString & - *this string.
-// Throws:  None.
-//--
-CMIUtilString &CMIUtilString::operator=(const char *vpRhs) {
-  assign(WithNullAsEmpty(vpRhs));
-  return *this;
-}
-
-//++
-// Details: CMIUtilString assignment operator.
-// Type:    Method.
-// Args:    vrRhs   - The other string to copy from.
-// Return:  CMIUtilString & - *this string.
-// Throws:  None.
-//--
-CMIUtilString &CMIUtilString::operator=(const std::string &vrRhs) {
-  assign(vrRhs);
-  return *this;
-}
-
-//++
-// Details: CMIUtilString destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilString::~CMIUtilString() {}
-
-//++
-// Details: Perform a snprintf format style on a string data. A new string
-// object is
-//          created and returned.
-// Type:    Static method.
-// Args:    vrFormat      - (R) Format string data instruction.
-//          vArgs         - (R) Var list args of any type.
-// Return:  CMIUtilString - Number of splits found in the string data.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::FormatPriv(const CMIUtilString &vrFormat,
-                                        va_list vArgs) {
-  CMIUtilString strResult;
-  MIint nFinal = 0;
-  MIint n = vrFormat.size();
-
-  // IOR: mysterious crash in this function on some windows builds not able to
-  // duplicate but found article which may be related. Crash occurs in
-  // vsnprintf() or va_copy().
-  // Duplicate vArgs va_list argument pointer to ensure that it can be safely
-  // used in a new frame.
-  // http://julipedia.meroh.net/2011/09/using-vacopy-to-safely-pass-ap.html
-  va_list argsDup;
-  va_copy(argsDup, vArgs);
-
-  // Create a copy va_list to reset when we spin
-  va_list argsCpy;
-  va_copy(argsCpy, argsDup);
-
-  if (n == 0)
-    return strResult;
-
-  n = n << 4; // Reserve 16 times as much the length of the vrFormat
-
-  std::unique_ptr<char[]> pFormatted;
-  while (1) {
-    pFormatted.reset(new char[n + 1]); // +1 for safety margin
-    ::strncpy(&pFormatted[0], vrFormat.c_str(), n);
-
-    // We need to restore the variable argument list pointer to the start again
-    // before running vsnprintf() more then once
-    va_copy(argsDup, argsCpy);
-
-    nFinal = ::vsnprintf(&pFormatted[0], n, vrFormat.c_str(), argsDup);
-    if ((nFinal < 0) || (nFinal >= n))
-      n += abs(nFinal - n + 1);
-    else
-      break;
-  }
-
-  va_end(argsCpy);
-  va_end(argsDup);
-
-  strResult = pFormatted.get();
-
-  return strResult;
-}
-
-//++
-// Details: Perform a snprintf format style on a string data. A new string
-// object is
-//          created and returned.
-// Type:    Static method.
-// Args:    vFormat       - (R) Format string data instruction.
-//          ...           - (R) Var list args of any type.
-// Return:  CMIUtilString - Number of splits found in the string data.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::Format(const char *vFormating, ...) {
-  va_list args;
-  va_start(args, vFormating);
-  CMIUtilString strResult =
-      CMIUtilString::FormatPriv(WithNullAsEmpty(vFormating), args);
-  va_end(args);
-
-  return strResult;
-}
-
-//++
-// Details: Perform a snprintf format style on a string data. A new string
-// object is
-//          created and returned.
-// Type:    Static method.
-// Args:    vrFormat      - (R) Format string data instruction.
-//          vArgs         - (R) Var list args of any type.
-// Return:  CMIUtilString - Number of splits found in the string data.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::FormatValist(const CMIUtilString &vrFormating,
-                                          va_list vArgs) {
-  return CMIUtilString::FormatPriv(vrFormating, vArgs);
-}
-
-//++
-// Details: Splits string into array of strings using delimiter. If multiple
-// delimiter
-//          are found in sequence then they are not added to the list of splits.
-// Type:    Method.
-// Args:    vData       - (R) String data to be split up.
-//          vDelimiter  - (R) Delimiter char or text.
-//          vwVecSplits - (W) Container of splits found in string data.
-// Return:  size_t - Number of splits found in the string data.
-// Throws:  None.
-//--
-size_t CMIUtilString::Split(const CMIUtilString &vDelimiter,
-                            VecString_t &vwVecSplits) const {
-  vwVecSplits.clear();
-
-  if (this->empty() || vDelimiter.empty())
-    return 0;
-
-  const size_t nLen(length());
-  size_t nOffset(0);
-  do {
-    // Find first occurrence which doesn't match to the delimiter
-    const size_t nSectionPos(FindFirstNot(vDelimiter, nOffset));
-    if (nSectionPos == std::string::npos)
-      break;
-
-    // Find next occurrence of the delimiter after section
-    size_t nNextDelimiterPos(FindFirst(vDelimiter, nSectionPos));
-    if (nNextDelimiterPos == std::string::npos)
-      nNextDelimiterPos = nLen;
-
-    // Extract string between delimiters
-    const size_t nSectionLen(nNextDelimiterPos - nSectionPos);
-    const std::string strSection(substr(nSectionPos, nSectionLen));
-    vwVecSplits.push_back(strSection);
-
-    // Next
-    nOffset = nNextDelimiterPos + 1;
-  } while (nOffset < nLen);
-
-  return vwVecSplits.size();
-}
-
-//++
-// Details: Splits string into array of strings using delimiter. However the
-// string is
-//          also considered for text surrounded by quotes. Text with quotes
-//          including the
-//          delimiter is treated as a whole. If multiple delimiter are found in
-//          sequence
-//          then they are not added to the list of splits. Quotes that are
-//          embedded in
-//          the string as string formatted quotes are ignored (proceeded by a
-//          '\\') i.e.
-//          "\"MI GDB local C++.cpp\":88".
-// Type:    Method.
-// Args:    vData       - (R) String data to be split up.
-//          vDelimiter  - (R) Delimiter char or text.
-//          vwVecSplits - (W) Container of splits found in string data.
-// Return:  size_t - Number of splits found in the string data.
-// Throws:  None.
-//--
-size_t CMIUtilString::SplitConsiderQuotes(const CMIUtilString &vDelimiter,
-                                          VecString_t &vwVecSplits) const {
-  vwVecSplits.clear();
-
-  if (this->empty() || vDelimiter.empty())
-    return 0;
-
-  const size_t nLen(length());
-  size_t nOffset(0);
-  do {
-    // Find first occurrence which doesn't match to the delimiter
-    const size_t nSectionPos(FindFirstNot(vDelimiter, nOffset));
-    if (nSectionPos == std::string::npos)
-      break;
-
-    // Find next occurrence of the delimiter after (quoted) section
-    const bool bSkipQuotedText(true);
-    bool bUnmatchedQuote(false);
-    size_t nNextDelimiterPos(
-        FindFirst(vDelimiter, bSkipQuotedText, bUnmatchedQuote, nSectionPos));
-    if (bUnmatchedQuote) {
-      vwVecSplits.clear();
-      return 0;
-    }
-    if (nNextDelimiterPos == std::string::npos)
-      nNextDelimiterPos = nLen;
-
-    // Extract string between delimiters
-    const size_t nSectionLen(nNextDelimiterPos - nSectionPos);
-    const std::string strSection(substr(nSectionPos, nSectionLen));
-    vwVecSplits.push_back(strSection);
-
-    // Next
-    nOffset = nNextDelimiterPos + 1;
-  } while (nOffset < nLen);
-
-  return vwVecSplits.size();
-}
-
-//++
-// Details: Split string into lines using \n and return an array of strings.
-// Type:    Method.
-// Args:    vwVecSplits - (W) Container of splits found in string data.
-// Return:  size_t - Number of splits found in the string data.
-// Throws:  None.
-//--
-size_t CMIUtilString::SplitLines(VecString_t &vwVecSplits) const {
-  return Split("\n", vwVecSplits);
-}
-
-//++
-// Details: Remove '\n' from the end of string if found. It does not alter
-//          *this string.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - New version of the string.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::StripCREndOfLine() const {
-  const size_t nPos = rfind('\n');
-  if (nPos == std::string::npos)
-    return *this;
-
-  const CMIUtilString strNew(substr(0, nPos));
-
-  return strNew;
-}
-
-//++
-// Details: Remove all '\n' from the string and replace with a space. It does
-// not alter
-//          *this string.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - New version of the string.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::StripCRAll() const {
-  return FindAndReplace("\n", " ");
-}
-
-//++
-// Details: Find and replace all matches of a sub string with another string. It
-// does not
-//          alter *this string.
-// Type:    Method.
-// Args:    vFind         - (R) The string to look for.
-//          vReplaceWith  - (R) The string to replace the vFind match.
-// Return:  CMIUtilString - New version of the string.
-// Throws:  None.
-//--
-CMIUtilString
-CMIUtilString::FindAndReplace(const CMIUtilString &vFind,
-                              const CMIUtilString &vReplaceWith) const {
-  if (vFind.empty() || this->empty())
-    return *this;
-
-  size_t nPos = find(vFind);
-  if (nPos == std::string::npos)
-    return *this;
-
-  CMIUtilString strNew(*this);
-  while (nPos != std::string::npos) {
-    strNew.replace(nPos, vFind.length(), vReplaceWith);
-    nPos += vReplaceWith.length();
-    nPos = strNew.find(vFind, nPos);
-  }
-
-  return strNew;
-}
-
-//++
-// Details: Check if *this string is a decimal number.
-// Type:    Method.
-// Args:    None.
-// Return:  bool - True = yes number, false not a number.
-// Throws:  None.
-//--
-bool CMIUtilString::IsNumber() const {
-  if (empty())
-    return false;
-
-  if ((at(0) == '-') && (length() == 1))
-    return false;
-
-  const size_t nPos = find_first_not_of("-.0123456789");
-  return nPos == std::string::npos;
-}
-
-//++
-// Details: Check if *this string is a hexadecimal number.
-// Type:    Method.
-// Args:    None.
-// Return:  bool - True = yes number, false not a number.
-// Throws:  None.
-//--
-bool CMIUtilString::IsHexadecimalNumber() const {
-  // Compare '0x..' prefix
-  if ((strncmp(c_str(), "0x", 2) != 0) && (strncmp(c_str(), "0X", 2) != 0))
-    return false;
-
-  // Skip '0x..' prefix
-  const size_t nPos = find_first_not_of("01234567890ABCDEFabcedf", 2);
-  return nPos == std::string::npos;
-}
-
-//++
-// Details: Extract the number from the string. The number can be either a
-// hexadecimal or
-//          natural number. It cannot contain other non-numeric characters.
-// Type:    Method.
-// Args:    vwrNumber   - (W) Number extracted from the string.
-// Return:  bool - True = yes number, false not a number.
-// Throws:  None.
-//--
-bool CMIUtilString::ExtractNumber(MIint64 &vwrNumber) const {
-  vwrNumber = 0;
-
-  if (!IsNumber()) {
-    return ExtractNumberFromHexadecimal(vwrNumber);
-  }
-
-  std::stringstream ss(const_cast<CMIUtilString &>(*this));
-  ss >> vwrNumber;
-
-  return true;
-}
-
-//++
-// Details: Extract the number from the hexadecimal string..
-// Type:    Method.
-// Args:    vwrNumber   - (W) Number extracted from the string.
-// Return:  bool - True = yes number, false not a number.
-// Throws:  None.
-//--
-bool CMIUtilString::ExtractNumberFromHexadecimal(MIint64 &vwrNumber) const {
-  vwrNumber = 0;
-
-  const size_t nPos = find_first_not_of("xX01234567890ABCDEFabcedf");
-  if (nPos != std::string::npos)
-    return false;
-
-  errno = 0;
-  const MIuint64 nNum = ::strtoull(this->c_str(), nullptr, 16);
-  if (errno == ERANGE)
-    return false;
-
-  vwrNumber = static_cast<MIint64>(nNum);
-
-  return true;
-}
-
-//++
-// Details: Determine if the text is all valid alpha numeric characters. Letters
-// can be
-//          either upper or lower case.
-// Type:    Static method.
-// Args:    vpText  - (R) The text data to examine.
-// Return:  bool - True = yes all alpha, false = one or more chars is non alpha.
-// Throws:  None.
-//--
-bool CMIUtilString::IsAllValidAlphaAndNumeric(const char *vpText) {
-  const size_t len = ::strlen(WithNullAsEmpty(vpText));
-  if (len == 0)
-    return false;
-
-  for (size_t i = 0; i < len; i++, vpText++) {
-    const char c = *vpText;
-    if (::isalnum((int)c) == 0)
-      return false;
-  }
-
-  return true;
-}
-
-//++
-// Details: Check if two strings share equal contents.
-// Type:    Method.
-// Args:    vrLhs   - (R) String A.
-//          vrRhs   - (R) String B.
-// Return:  bool - True = yes equal, false - different.
-// Throws:  None.
-//--
-bool CMIUtilString::Compare(const CMIUtilString &vrLhs,
-                            const CMIUtilString &vrRhs) {
-  // Check the sizes match
-  if (vrLhs.size() != vrRhs.size())
-    return false;
-
-  return (::strncmp(vrLhs.c_str(), vrRhs.c_str(), vrLhs.size()) == 0);
-}
-
-//++
-// Details: Remove from either end of *this string the following: " \t\n\v\f\r".
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Trimmed string.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::Trim() const {
-  CMIUtilString strNew(*this);
-  const char *pWhiteSpace = " \t\n\v\f\r";
-  const size_t nPos = find_last_not_of(pWhiteSpace);
-  if (nPos != std::string::npos) {
-    strNew = substr(0, nPos + 1);
-  }
-  const size_t nPos2 = strNew.find_first_not_of(pWhiteSpace);
-  if (nPos2 != std::string::npos) {
-    strNew = strNew.substr(nPos2);
-  }
-
-  return strNew;
-}
-
-//++
-// Details: Remove from either end of *this string the specified character.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - Trimmed string.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::Trim(const char vChar) const {
-  CMIUtilString strNew(*this);
-  const size_t nLen = strNew.length();
-  if (nLen > 1) {
-    if ((strNew[0] == vChar) && (strNew[nLen - 1] == vChar))
-      strNew = strNew.substr(1, nLen - 2);
-  }
-
-  return strNew;
-}
-
-//++
-// Details: Do a printf equivalent for printing a number in binary i.e. "b%llB".
-// Type:    Static method.
-// Args:    vnDecimal   - (R) The number to represent in binary.
-// Return:  CMIUtilString - Binary number in text.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::FormatBinary(const MIuint64 vnDecimal) {
-  CMIUtilString strBinaryNumber;
-
-  const MIuint nConstBits = 64;
-  MIuint nRem[nConstBits + 1];
-  MIint i = 0;
-  MIuint nLen = 0;
-  MIuint64 nNum = vnDecimal;
-  while ((nNum > 0) && (nLen < nConstBits)) {
-    nRem[i++] = nNum % 2;
-    nNum = nNum >> 1;
-    nLen++;
-  }
-  char pN[nConstBits + 1];
-  MIuint j = 0;
-  for (i = nLen; i > 0; --i, j++) {
-    pN[j] = '0' + nRem[i - 1];
-  }
-  pN[j] = 0; // String NUL termination
-
-  strBinaryNumber = CMIUtilString::Format("0b%s", &pN[0]);
-
-  return strBinaryNumber;
-}
-
-//++
-// Details: Remove from a string doubled up characters so only one set left.
-// Characters
-//          are only removed if the previous character is already a same
-//          character.
-// Type:    Method.
-// Args:    vChar   - (R) The character to search for and remove adjacent
-// duplicates.
-// Return:  CMIUtilString - New version of the string.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::RemoveRepeatedCharacters(const char vChar) {
-  return RemoveRepeatedCharacters(0, vChar);
-}
-
-//++
-// Details: Recursively remove from a string doubled up characters so only one
-// set left.
-//          Characters are only removed if the previous character is already a
-//          same
-//          character.
-// Type:    Method.
-// Args:    vChar   - (R) The character to search for and remove adjacent
-// duplicates.
-//          vnPos   - Character position in the string.
-// Return:  CMIUtilString - New version of the string.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::RemoveRepeatedCharacters(size_t vnPos,
-                                                      const char vChar) {
-  const char cQuote = '"';
-
-  // Look for first quote of two
-  const size_t nPos = find(cQuote, vnPos);
-  if (nPos == std::string::npos)
-    return *this;
-
-  const size_t nPosNext = nPos + 1;
-  if (nPosNext > length())
-    return *this;
-
-  if (at(nPosNext) == cQuote) {
-    *this = substr(0, nPos) + substr(nPosNext, length());
-    RemoveRepeatedCharacters(nPosNext, vChar);
-  }
-
-  return *this;
-}
-
-//++
-// Details: Is the text in *this string surrounded by quotes.
-// Type:    Method.
-// Args:    None.
-// Return:  bool - True = Yes string is quoted, false = no quoted.
-// Throws:  None.
-//--
-bool CMIUtilString::IsQuoted() const {
-  const char cQuote = '"';
-
-  if (at(0) != cQuote)
-    return false;
-
-  const size_t nLen = length();
-  return !((nLen > 0) && (at(nLen - 1) != cQuote));
-}
-
-//++
-// Details: Find first occurrence in *this string which matches the pattern.
-// Type:    Method.
-// Args:    vrPattern   - (R) The pattern to search for.
-//          vnPos       - The starting position at which to start searching.
-//          (Dflt = 0)
-// Return:  size_t - The position of the first substring that match.
-// Throws:  None.
-//--
-size_t CMIUtilString::FindFirst(const CMIUtilString &vrPattern,
-                                size_t vnPos /* = 0 */) const {
-  return find(vrPattern, vnPos);
-}
-
-//++
-// Details: Find first occurrence in *this string which matches the pattern and
-// isn't surrounded by quotes.
-// Type:    Method.
-// Args:    vrPattern                 - (R) The pattern to search for.
-//          vbSkipQuotedText          - (R) True = don't look at quoted text,
-//          false = otherwise.
-//          vrwbNotFoundClosedQuote   - (W) True = parsing error: unmatched
-//          quote, false = otherwise.
-//          vnPos                     - Position of the first character in the
-//          string to be considered in the search. (Dflt = 0)
-// Return:  size_t - The position of the first substring that matches and isn't
-// quoted.
-// Throws:  None.
-//--
-size_t CMIUtilString::FindFirst(const CMIUtilString &vrPattern,
-                                const bool vbSkipQuotedText,
-                                bool &vrwbNotFoundClosedQuote,
-                                size_t vnPos /* = 0 */) const {
-  vrwbNotFoundClosedQuote = false;
-
-  if (!vbSkipQuotedText)
-    return FindFirst(vrPattern, vnPos);
-
-  const size_t nLen(length());
-
-  size_t nPos = vnPos;
-  do {
-    const size_t nQuotePos(FindFirstQuote(nPos));
-    const size_t nPatternPos(FindFirst(vrPattern, nPos));
-    if (nQuotePos == std::string::npos)
-      return nPatternPos;
-
-    const size_t nQuoteClosedPos = FindFirstQuote(nQuotePos + 1);
-    if (nQuoteClosedPos == std::string::npos) {
-      vrwbNotFoundClosedQuote = true;
-      return std::string::npos;
-    }
-
-    if ((nPatternPos == std::string::npos) || (nPatternPos < nQuotePos))
-      return nPatternPos;
-
-    nPos = nQuoteClosedPos + 1;
-  } while (nPos < nLen);
-
-  return std::string::npos;
-}
-
-//++
-// Details: Find first occurrence in *this string which doesn't match the
-// pattern.
-// Type:    Method.
-// Args:    vrPattern   - (R) The pattern to search for.
-//          vnPos       - Position of the first character in the string to be
-//          considered in the search. (Dflt = 0)
-// Return:  size_t - The position of the first character that doesn't match.
-// Throws:  None.
-//--
-size_t CMIUtilString::FindFirstNot(const CMIUtilString &vrPattern,
-                                   size_t vnPos /* = 0 */) const {
-  const size_t nLen(length());
-  const size_t nPatternLen(vrPattern.length());
-
-  size_t nPatternPos(vnPos);
-  do {
-    const bool bMatchPattern(compare(nPatternPos, nPatternLen, vrPattern) == 0);
-    if (!bMatchPattern)
-      return nPatternPos;
-    nPatternPos += nPatternLen;
-  } while (nPatternPos < nLen);
-
-  return std::string::npos;
-}
-
-//++
-// Details: Find first occurrence of not escaped quotation mark in *this string.
-// Type:    Method.
-// Args:    vnPos   - Position of the first character in the string to be
-// considered in the search.
-// Return:  size_t - The position of the quotation mark.
-// Throws:  None.
-//--
-size_t CMIUtilString::FindFirstQuote(size_t vnPos) const {
-  const char cBckSlash('\\');
-  const char cQuote('"');
-  const size_t nLen(length());
-
-  size_t nPos = vnPos;
-  do {
-    const size_t nBckSlashPos(find(cBckSlash, nPos));
-    const size_t nQuotePos(find(cQuote, nPos));
-    if ((nBckSlashPos == std::string::npos) || (nQuotePos == std::string::npos))
-      return nQuotePos;
-
-    if (nQuotePos < nBckSlashPos)
-      return nQuotePos;
-
-    // Skip 2 characters: First is '\', second is that which is escaped by '\'
-    nPos = nBckSlashPos + 2;
-  } while (nPos < nLen);
-
-  return std::string::npos;
-}
-
-//++
-// Details: Get escaped string from *this string.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - The escaped version of the initial string.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::Escape(bool vbEscapeQuotes /* = false */) const {
-  const size_t nLen(length());
-  CMIUtilString strNew;
-  strNew.reserve(nLen);
-  for (size_t nIndex(0); nIndex < nLen; ++nIndex) {
-    const char cUnescapedChar((*this)[nIndex]);
-    if (cUnescapedChar == '"' && vbEscapeQuotes)
-      strNew.append("\\\"");
-    else
-      strNew.append(ConvertToPrintableASCII((char)cUnescapedChar));
-  }
-  return strNew;
-}
-
-//++
-// Details: Get string with backslashes in front of double quote '"' and
-// backslash '\\'
-//          characters.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - The wrapped version of the initial string.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::AddSlashes() const {
-  const char cBckSlash('\\');
-  const size_t nLen(length());
-  CMIUtilString strNew;
-  strNew.reserve(nLen);
-
-  size_t nOffset(0);
-  while (nOffset < nLen) {
-    const size_t nUnescapedCharPos(find_first_of("\"\\", nOffset));
-    const bool bUnescapedCharNotFound(nUnescapedCharPos == std::string::npos);
-    if (bUnescapedCharNotFound) {
-      const size_t nAppendAll(std::string::npos);
-      strNew.append(*this, nOffset, nAppendAll);
-      break;
-    }
-    const size_t nAppendLen(nUnescapedCharPos - nOffset);
-    strNew.append(*this, nOffset, nAppendLen);
-    strNew.push_back(cBckSlash);
-    const char cUnescapedChar((*this)[nUnescapedCharPos]);
-    strNew.push_back(cUnescapedChar);
-    nOffset = nUnescapedCharPos + 1;
-  }
-
-  return strNew;
-}
-
-//++
-// Details: Remove backslashes added by CMIUtilString::AddSlashes.
-// Type:    Method.
-// Args:    None.
-// Return:  CMIUtilString - The initial version of wrapped string.
-// Throws:  None.
-//--
-CMIUtilString CMIUtilString::StripSlashes() const {
-  const char cBckSlash('\\');
-  const size_t nLen(length());
-  CMIUtilString strNew;
-  strNew.reserve(nLen);
-
-  size_t nOffset(0);
-  while (nOffset < nLen) {
-    const size_t nBckSlashPos(find(cBckSlash, nOffset));
-    const bool bBckSlashNotFound(nBckSlashPos == std::string::npos);
-    if (bBckSlashNotFound) {
-      const size_t nAppendAll(std::string::npos);
-      strNew.append(*this, nOffset, nAppendAll);
-      break;
-    }
-    const size_t nAppendLen(nBckSlashPos - nOffset);
-    strNew.append(*this, nOffset, nAppendLen);
-    const bool bBckSlashIsLast(nBckSlashPos == nLen);
-    if (bBckSlashIsLast) {
-      strNew.push_back(cBckSlash);
-      break;
-    }
-    const char cEscapedChar((*this)[nBckSlashPos + 1]);
-    const size_t nEscapedCharPos(std::string("\"\\").find(cEscapedChar));
-    const bool bEscapedCharNotFound(nEscapedCharPos == std::string::npos);
-    if (bEscapedCharNotFound)
-      strNew.push_back(cBckSlash);
-    strNew.push_back(cEscapedChar);
-    nOffset = nBckSlashPos + 2;
-  }
-
-  return strNew;
-}
-
-CMIUtilString CMIUtilString::ConvertToPrintableASCII(const char vChar,
-                                                     bool bEscapeQuotes) {
-  switch (vChar) {
-  case '\a':
-    return "\\a";
-  case '\b':
-    return "\\b";
-  case '\t':
-    return "\\t";
-  case '\n':
-    return "\\n";
-  case '\v':
-    return "\\v";
-  case '\f':
-    return "\\f";
-  case '\r':
-    return "\\r";
-  case '\033':
-    return "\\e";
-  case '\\':
-    return "\\\\";
-  case '"':
-    if (bEscapeQuotes)
-      return "\\\"";
-    LLVM_FALLTHROUGH;
-  default:
-    if (::isprint(vChar))
-      return Format("%c", vChar);
-    else
-      return Format("\\x%02" PRIx8, vChar);
-  }
-}
-
-CMIUtilString
-CMIUtilString::ConvertCharValueToPrintableASCII(char vChar,
-                                                bool bEscapeQuotes) {
-  switch (vChar) {
-  case '\a':
-    return "\\a";
-  case '\b':
-    return "\\b";
-  case '\t':
-    return "\\t";
-  case '\n':
-    return "\\n";
-  case '\v':
-    return "\\v";
-  case '\f':
-    return "\\f";
-  case '\r':
-    return "\\r";
-  case '\033':
-    return "\\e";
-  case '\\':
-    return "\\\\";
-  case '"':
-    if (bEscapeQuotes)
-      return "\\\"";
-    LLVM_FALLTHROUGH;
-  default:
-    if (::isprint(vChar))
-      return Format("%c", vChar);
-    else
-      return CMIUtilString();
-  }
-}
-
-CMIUtilString CMIUtilString::ConvertToPrintableASCII(const char16_t vChar16,
-                                                     bool bEscapeQuotes) {
-  if (vChar16 == (char16_t)(char)vChar16) {
-    // Convert char16_t to char (if possible)
-    CMIUtilString str =
-        ConvertCharValueToPrintableASCII((char)vChar16, bEscapeQuotes);
-    if (str.length() > 0)
-      return str;
-  }
-  return Format("\\u%02" PRIx8 "%02" PRIx8, (vChar16 >> 8) & 0xff,
-                vChar16 & 0xff);
-}
-
-CMIUtilString CMIUtilString::ConvertToPrintableASCII(const char32_t vChar32,
-                                                     bool bEscapeQuotes) {
-  if (vChar32 == (char32_t)(char)vChar32) {
-    // Convert char32_t to char (if possible)
-    CMIUtilString str =
-        ConvertCharValueToPrintableASCII((char)vChar32, bEscapeQuotes);
-    if (str.length() > 0)
-      return str;
-  }
-  return Format("\\U%02" PRIx8 "%02" PRIx8 "%02" PRIx8 "%02" PRIx8,
-                (vChar32 >> 24) & 0xff, (vChar32 >> 16) & 0xff,
-                (vChar32 >> 8) & 0xff, vChar32 & 0xff);
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilString.h b/src/llvm-project/lldb/tools/lldb-mi/MIUtilString.h
deleted file mode 100644
index e9d3af7..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilString.h
+++ /dev/null
@@ -1,95 +0,0 @@
-//===-- MIUtilString.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include <cinttypes>
-#include <cstdarg>
-#include <string>
-#include <vector>
-
-// In-house headers:
-#include "MIDataTypes.h"
-
-//++
-//============================================================================
-// Details: MI common code utility class. Used to help handle text.
-//          Derived from std::string
-//--
-class CMIUtilString : public std::string {
-  // Typedefs:
-public:
-  typedef std::vector<CMIUtilString> VecString_t;
-
-  // Static method:
-public:
-  static CMIUtilString Format(const char *vFormating, ...);
-  static CMIUtilString FormatBinary(const MIuint64 vnDecimal);
-  static CMIUtilString FormatValist(const CMIUtilString &vrFormating,
-                                    va_list vArgs);
-  static bool IsAllValidAlphaAndNumeric(const char *vpText);
-  static const char *WithNullAsEmpty(const char *vpText) {
-    return vpText ? vpText : "";
-  }
-  static bool Compare(const CMIUtilString &vrLhs, const CMIUtilString &vrRhs);
-  static CMIUtilString ConvertToPrintableASCII(const char vChar,
-                                               bool bEscapeQuotes = false);
-  static CMIUtilString ConvertToPrintableASCII(const char16_t vChar16,
-                                               bool bEscapeQuotes = false);
-  static CMIUtilString ConvertToPrintableASCII(const char32_t vChar32,
-                                               bool bEscapeQuotes = false);
-
-  // Methods:
-public:
-  /* ctor */ CMIUtilString();
-  /* ctor */ CMIUtilString(const char *vpData);
-  /* ctor */ CMIUtilString(const std::string &vrStr);
-  //
-  bool ExtractNumber(MIint64 &vwrNumber) const;
-  CMIUtilString FindAndReplace(const CMIUtilString &vFind,
-                               const CMIUtilString &vReplaceWith) const;
-  bool IsNumber() const;
-  bool IsHexadecimalNumber() const;
-  bool IsQuoted() const;
-  CMIUtilString RemoveRepeatedCharacters(const char vChar);
-  size_t Split(const CMIUtilString &vDelimiter, VecString_t &vwVecSplits) const;
-  size_t SplitConsiderQuotes(const CMIUtilString &vDelimiter,
-                             VecString_t &vwVecSplits) const;
-  size_t SplitLines(VecString_t &vwVecSplits) const;
-  CMIUtilString StripCREndOfLine() const;
-  CMIUtilString StripCRAll() const;
-  CMIUtilString Trim() const;
-  CMIUtilString Trim(const char vChar) const;
-  size_t FindFirst(const CMIUtilString &vrPattern, size_t vnPos = 0) const;
-  size_t FindFirst(const CMIUtilString &vrPattern, bool vbSkipQuotedText,
-                   bool &vrwbNotFoundClosedQuote, size_t vnPos = 0) const;
-  size_t FindFirstNot(const CMIUtilString &vrPattern, size_t vnPos = 0) const;
-  CMIUtilString Escape(bool vbEscapeQuotes = false) const;
-  CMIUtilString AddSlashes() const;
-  CMIUtilString StripSlashes() const;
-  //
-  CMIUtilString &operator=(const char *vpRhs);
-  CMIUtilString &operator=(const std::string &vrRhs);
-
-  // Overrideable:
-public:
-  /* dtor */ virtual ~CMIUtilString();
-
-  // Static method:
-private:
-  static CMIUtilString FormatPriv(const CMIUtilString &vrFormat, va_list vArgs);
-  static CMIUtilString ConvertCharValueToPrintableASCII(char vChar,
-                                                        bool bEscapeQuotes);
-
-  // Methods:
-private:
-  bool ExtractNumberFromHexadecimal(MIint64 &vwrNumber) const;
-  CMIUtilString RemoveRepeatedCharacters(size_t vnPos, const char vChar);
-  size_t FindFirstQuote(size_t vnPos) const;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilThreadBaseStd.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIUtilThreadBaseStd.cpp
deleted file mode 100644
index 72cf147..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilThreadBaseStd.cpp
+++ /dev/null
@@ -1,302 +0,0 @@
-//===-- MIUtilThreadBaseStd.cpp ---------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// Third Party Headers:
-#include <assert.h>
-
-// In-house headers:
-#include "MICmnThreadMgrStd.h"
-#include "MIUtilThreadBaseStd.h"
-
-//++
-// Details: Constructor.
-// Type:    None.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilThreadActiveObjBase::CMIUtilThreadActiveObjBase()
-    : m_references(0), m_bHasBeenKilled(false) {}
-
-//++
-// Details: Destructor.
-// Type:    None.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilThreadActiveObjBase::~CMIUtilThreadActiveObjBase() {
-  // Make sure our thread is not alive before we die
-  m_thread.Join();
-}
-
-//++
-// Details: Check if an object is already running.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilThreadActiveObjBase::ThreadIsActive() {
-  // Create a new thread to occupy this threads Run() function
-  return m_thread.IsActive();
-}
-
-//++
-// Details: Set up *this thread.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilThreadActiveObjBase::ThreadExecute() {
-  // Create a new thread to occupy this threads Run() function
-  return m_thread.Start(ThreadEntry, this);
-}
-
-//++
-// Details: Acquire a reference to CMIUtilThreadActiveObjBase.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilThreadActiveObjBase::Acquire() {
-  // Access to this function is serial
-  CMIUtilThreadLock serial(m_mutex);
-
-  // >0 == *this thread is alive
-  m_references++;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Release a reference to CMIUtilThreadActiveObjBase.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilThreadActiveObjBase::Release() {
-  // Access to this function is serial
-  CMIUtilThreadLock serial(m_mutex);
-
-  // 0 == kill off *this thread
-  m_references--;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Force this thread to stop, regardless of references
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilThreadActiveObjBase::ThreadKill() {
-  // Access to this function is serial
-  CMIUtilThreadLock serial(m_mutex);
-
-  // Set this thread to killed status
-  m_bHasBeenKilled = true;
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Proxy to thread join.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilThreadActiveObjBase::ThreadJoin() { return m_thread.Join(); }
-
-//++
-// Details: This function is the entry point of this object thread.
-//          It is a trampoline to an instances operation manager.
-// Type:    Static method.
-// Args:    vpThisClass - (R) From the system (our CMIUtilThreadActiveObjBase
-// from the ctor).
-// Return:  MIuint - 0 = success.
-// Throws:  None.
-//--
-MIuint CMIUtilThreadActiveObjBase::ThreadEntry(void *vpThisClass) {
-  // The argument is a pointer to a CMIUtilThreadActiveObjBase class
-  // as passed from the initialize function, so we can safely cast it.
-  assert(vpThisClass != nullptr);
-  CMIUtilThreadActiveObjBase *pActive =
-      reinterpret_cast<CMIUtilThreadActiveObjBase *>(vpThisClass);
-
-  // Start the management routine of this object
-  pActive->ThreadManage();
-
-  // Thread death
-  return 0;
-}
-
-//++
-// Details: This function forms a small management routine, to handle the
-// thread's running.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilThreadActiveObjBase::ThreadManage() {
-  bool bAlive = true;
-
-  // Infinite loop
-  while (bAlive) {
-    // Scope the lock while we access m_isDying
-    {
-      // Lock down access to the interface
-      CMIUtilThreadLock serial(m_mutex);
-
-      // Quit the run loop if we are dying
-      if (m_references == 0)
-        break;
-    }
-    // Execute the run routine
-    if (!ThreadRun(bAlive))
-      // Thread's run function failed (MIstatus::failure)
-      break;
-
-    // We will die if we have been signaled to die
-    bAlive &= !m_bHasBeenKilled;
-  }
-
-  // Execute the finish routine just before we die
-  // to give the object a chance to clean up
-  ThreadFinish();
-
-  m_thread.Finish();
-}
-
-
-//
-CMIUtilThread::CMIUtilThread() : m_pThread(nullptr), m_bIsActive(false) {}
-
-//++
-// Details: CMIUtilThread destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilThread::~CMIUtilThread() { Join(); }
-
-//++
-// Details: Wait for thread to stop.
-// Type:    Method.
-// Args:    None.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilThread::Join() {
-  if (m_pThread != nullptr) {
-    // Wait for this thread to die
-    m_pThread->join();
-
-    // Scope the thread lock while we modify the pointer
-    {
-      CMIUtilThreadLock _lock(m_mutex);
-      delete m_pThread;
-      m_pThread = nullptr;
-    }
-  }
-
-  return MIstatus::success;
-}
-
-//++
-// Details: Is the thread doing work.
-// Type:    Method.
-// Args:    None.
-// Return:  bool - True = Yes active, false = not active.
-// Throws:  None.
-//--
-bool CMIUtilThread::IsActive() {
-  // Lock while we access the thread status
-  CMIUtilThreadLock _lock(m_mutex);
-  return m_bIsActive;
-}
-
-//++
-// Details: Finish this thread
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilThread::Finish() {
-  // Lock while we access the thread status
-  CMIUtilThreadLock _lock(m_mutex);
-  m_bIsActive = false;
-}
-
-//++
-// Details: Set up *this thread.
-// Type:    Method.
-// Args:    vpFn    (R) - Function pointer to thread's main function.
-//          vpArg   (R) - Pointer arguments to pass to the thread.
-// Return:  MIstatus::success - Functional succeeded.
-//          MIstatus::failure - Functional failed.
-// Throws:  None.
-//--
-bool CMIUtilThread::Start(FnThreadProc vpFn, void *vpArg) {
-  // Lock while we access the thread pointer and status
-  CMIUtilThreadLock _lock(m_mutex);
-
-  // Create the std thread, which starts immediately and update its status
-  m_pThread = new std::thread(vpFn, vpArg);
-  m_bIsActive = true;
-
-  // We expect to always be able to create one
-  assert(m_pThread != nullptr);
-
-  return MIstatus::success;
-}
-
-
-//++
-// Details: Take resource.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilThreadMutex::Lock() { m_mutex.lock(); }
-
-//++
-// Details: Release resource.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilThreadMutex::Unlock() { m_mutex.unlock(); }
-
-//++
-// Details: Take resource if available. Immediately return in either case.
-// Type:    Method.
-// Args:    None.
-// Return:  True    - mutex has been locked.
-//          False   - mutex could not be locked.
-// Throws:  None.
-//--
-bool CMIUtilThreadMutex::TryLock() { return m_mutex.try_lock(); }
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h b/src/llvm-project/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h
deleted file mode 100644
index 3fa03b6..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilThreadBaseStd.h
+++ /dev/null
@@ -1,140 +0,0 @@
-//===-- MIUtilThreadBaseStd.h -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// Third party headers:
-#include <mutex>
-#include <thread>
-
-// In-house headers:
-#include "MIDataTypes.h"
-#include "MIUtilString.h"
-
-//++
-//============================================================================
-// Details: MI common code utility class. Handle thread mutual exclusion.
-//          Embed Mutexes in your Active Object and then use them through Locks.
-//--
-class CMIUtilThreadMutex {
-  // Methods:
-public:
-  /* ctor */ CMIUtilThreadMutex() {}
-  //
-  void Lock();    // Wait until mutex can be obtained
-  void Unlock();  // Release the mutex
-  bool TryLock(); // Gain the lock if available
-
-  // Overrideable:
-public:
-  // From CMICmnBase
-  /* dtor */ virtual ~CMIUtilThreadMutex() {}
-
-  // Attributes:
-private:
-  std::recursive_mutex m_mutex;
-};
-
-//++
-//============================================================================
-// Details: MI common code utility class. Thread object.
-//--
-class CMIUtilThread {
-  // Typedef:
-public:
-  typedef MIuint (*FnThreadProc)(void *vpThisClass);
-
-  // Methods:
-public:
-  /* ctor */ CMIUtilThread();
-  //
-  bool Start(FnThreadProc vpFn, void *vpArg); // Start execution of this thread
-  bool Join();                                // Wait for this thread to stop
-  bool IsActive(); // Returns true if this thread is running
-  void Finish();   // Finish this thread
-
-  // Overrideable:
-public:
-  /* dtor */ virtual ~CMIUtilThread();
-
-  // Methods:
-private:
-  CMIUtilThreadMutex m_mutex;
-  std::thread *m_pThread;
-  bool m_bIsActive;
-};
-
-//++
-//============================================================================
-// Details: MI common code utility class. Base class for a worker thread active
-//          object. Runs an 'captive thread'.
-//--
-class CMIUtilThreadActiveObjBase {
-  // Methods:
-public:
-  /* ctor */ CMIUtilThreadActiveObjBase();
-  //
-  bool Acquire();        // Obtain a reference to this object
-  bool Release();        // Release a reference to this object
-  bool ThreadIsActive(); // Return true if this object is running
-  bool ThreadJoin();     // Wait for this thread to stop running
-  bool ThreadKill();     // Force this thread to stop, regardless of references
-  bool ThreadExecute();  // Start this objects execution in another thread
-  void ThreadManage();
-
-  // Overrideable:
-public:
-  /* dtor */ virtual ~CMIUtilThreadActiveObjBase();
-  //
-  // Each thread object must supple a unique name that can be used to locate it
-  virtual const CMIUtilString &ThreadGetName() const = 0;
-
-  // Statics:
-protected:
-  static MIuint ThreadEntry(void *vpThisClass); // Thread entry point
-
-  // Overrideable:
-protected:
-  virtual bool ThreadRun(bool &vrIsAlive) = 0; // Call the main worker method
-  virtual bool ThreadFinish() = 0;             // Finish of what you were doing
-
-  // Attributes:
-protected:
-  volatile MIuint m_references; // Stores the current lifetime state of this
-                                // thread, 0 = running, > 0 = shutting down
-  volatile bool
-      m_bHasBeenKilled;       // Set to true when this thread has been killed
-  CMIUtilThread m_thread;     // The execution thread
-  CMIUtilThreadMutex m_mutex; // This mutex allows us to safely communicate with
-                              // this thread object across the interface from
-                              // multiple threads
-};
-
-//++
-//============================================================================
-// Details: MI common code utility class. Handle thread resource locking.
-//          Put Locks inside all the methods of your Active Object that access
-//          data shared with the captive thread.
-//--
-class CMIUtilThreadLock {
-  // Methods:
-public:
-  /* ctor */
-  CMIUtilThreadLock(CMIUtilThreadMutex &vMutex) : m_rMutex(vMutex) {
-    m_rMutex.Lock();
-  }
-
-  // Overrideable:
-public:
-  /* dtor */
-  virtual ~CMIUtilThreadLock() { m_rMutex.Unlock(); }
-
-  // Attributes:
-private:
-  CMIUtilThreadMutex &m_rMutex;
-};
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilVariant.cpp b/src/llvm-project/lldb/tools/lldb-mi/MIUtilVariant.cpp
deleted file mode 100644
index 062dce8..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilVariant.cpp
+++ /dev/null
@@ -1,344 +0,0 @@
-//===-- MIUtilVariant.cpp----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// In-house headers:
-#include "MIUtilVariant.h"
-
-//++
-// Details: CDataObjectBase constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CDataObjectBase::CDataObjectBase() {}
-
-//++
-// Details: CDataObjectBase copy constructor.
-// Type:    Method.
-// Args:    vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CDataObjectBase::CDataObjectBase(
-    const CDataObjectBase &vrOther) {
-  MIunused(vrOther);
-}
-
-//++
-// Details: CDataObjectBase copy constructor.
-// Type:    Method.
-// Args:    vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CDataObjectBase::CDataObjectBase(CDataObjectBase &vrOther) {
-  MIunused(vrOther);
-}
-
-//++
-// Details: CDataObjectBase move constructor.
-// Type:    Method.
-// Args:    vrwOther    - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CDataObjectBase::CDataObjectBase(CDataObjectBase &&vrwOther) {
-  MIunused(vrwOther);
-}
-
-//++
-// Details: CDataObjectBase destructor.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CDataObjectBase::~CDataObjectBase() { Destroy(); }
-
-//++
-// Details: CDataObjectBase copy assignment.
-// Type:    Method.
-// Args:    vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CDataObjectBase &CMIUtilVariant::CDataObjectBase::
-operator=(const CDataObjectBase &vrOther) {
-  Copy(vrOther);
-  return *this;
-}
-
-//++
-// Details: CDataObjectBase move assignment.
-// Type:    Method.
-// Args:    vrwOther    - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CDataObjectBase &CMIUtilVariant::CDataObjectBase::
-operator=(CDataObjectBase &&vrwOther) {
-  Copy(vrwOther);
-  vrwOther.Destroy();
-  return *this;
-}
-
-//++
-// Details: Create a new copy of *this class.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  CDataObjectBase *   - Pointer to a new object.
-// Throws:  None.
-//--
-CMIUtilVariant::CDataObjectBase *
-CMIUtilVariant::CDataObjectBase::CreateCopyOfSelf() {
-  // Override to implement copying of variant's data object
-  return new CDataObjectBase();
-}
-
-//++
-// Details: Determine if *this object is a derived from CDataObjectBase.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  bool    - True = *this is derived from CDataObjectBase, false =
-// *this is instance of the this base class.
-// Throws:  None.
-//--
-bool CMIUtilVariant::CDataObjectBase::GetIsDerivedClass() const {
-  // Override to in the derived class and return true
-  return false;
-}
-
-//++
-// Details: Perform a bitwise copy of *this object.
-// Type:    Overrideable.
-// Args:    vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilVariant::CDataObjectBase::Copy(const CDataObjectBase &vrOther) {
-  // Override to implement
-  MIunused(vrOther);
-}
-
-//++
-// Details: Release any resources used by *this object.
-// Type:    Overrideable.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilVariant::CDataObjectBase::Destroy() {
-  // Do nothing - override to implement
-}
-
-
-//++
-// Details: CDataObject copy constructor.
-// Type:    Method.
-// Args:    T       - The object's type.
-//          vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T>
-CMIUtilVariant::CDataObject<T>::CDataObject(const CDataObject &vrOther) {
-  if (this == &vrOther)
-    return;
-  Copy(vrOther);
-}
-
-//++
-// Details: CDataObject copy constructor.
-// Type:    Method.
-// Args:    T       - The object's type.
-//          vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T>
-CMIUtilVariant::CDataObject<T>::CDataObject(CDataObject &vrOther) {
-  if (this == &vrOther)
-    return;
-  Copy(vrOther);
-}
-
-//++
-// Details: CDataObject move constructor.
-// Type:    Method.
-// Args:    T           - The object's type.
-//          vrwOther    - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T>
-CMIUtilVariant::CDataObject<T>::CDataObject(CDataObject &&vrwOther) {
-  if (this == &vrwOther)
-    return;
-  Copy(vrwOther);
-  vrwOther.Destroy();
-}
-
-//++
-// Details: CDataObject copy assignment.
-// Type:    Method.
-// Args:    T       - The object's type.
-//          vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T>
-CMIUtilVariant::CDataObject<T> &CMIUtilVariant::CDataObject<T>::
-operator=(const CDataObject &vrOther) {
-  if (this == &vrOther)
-    return *this;
-  Copy(vrOther);
-  return *this;
-}
-
-//++
-// Details: CDataObject move assignment.
-// Type:    Method.
-// Args:    T           - The object's type.
-//          vrwOther    - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T>
-CMIUtilVariant::CDataObject<T> &CMIUtilVariant::CDataObject<T>::
-operator=(CDataObject &&vrwOther) {
-  if (this == &vrwOther)
-    return *this;
-  Copy(vrwOther);
-  vrwOther.Destroy();
-  return *this;
-}
-
-
-//++
-// Details: CMIUtilVariant constructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CMIUtilVariant() : m_pDataObject(nullptr) {}
-
-//++
-// Details: CMIUtilVariant copy constructor.
-// Type:    Method.
-// Args:    vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CMIUtilVariant(const CMIUtilVariant &vrOther)
-    : m_pDataObject(nullptr) {
-  if (this == &vrOther)
-    return;
-
-  Copy(vrOther);
-}
-
-//++
-// Details: CMIUtilVariant copy constructor.
-// Type:    Method.
-// Args:    vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CMIUtilVariant(CMIUtilVariant &vrOther)
-    : m_pDataObject(nullptr) {
-  if (this == &vrOther)
-    return;
-
-  Copy(vrOther);
-}
-
-//++
-// Details: CMIUtilVariant move constructor.
-// Type:    Method.
-// Args:    vrwOther    - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::CMIUtilVariant(CMIUtilVariant &&vrwOther)
-    : m_pDataObject(nullptr) {
-  if (this == &vrwOther)
-    return;
-
-  Copy(vrwOther);
-  vrwOther.Destroy();
-}
-
-//++
-// Details: CMIUtilVariant destructor.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant::~CMIUtilVariant() { Destroy(); }
-
-//++
-// Details: CMIUtilVariant copy assignment.
-// Type:    Method.
-// Args:    vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant &CMIUtilVariant::operator=(const CMIUtilVariant &vrOther) {
-  if (this == &vrOther)
-    return *this;
-
-  Copy(vrOther);
-  return *this;
-}
-
-//++
-// Details: CMIUtilVariant move assignment.
-// Type:    Method.
-// Args:    vrwOther    - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-CMIUtilVariant &CMIUtilVariant::operator=(CMIUtilVariant &&vrwOther) {
-  if (this == &vrwOther)
-    return *this;
-
-  Copy(vrwOther);
-  vrwOther.Destroy();
-  return *this;
-}
-
-//++
-// Details: Release the resources used by *this object.
-// Type:    Method.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilVariant::Destroy() {
-  if (m_pDataObject != nullptr)
-    delete m_pDataObject;
-  m_pDataObject = nullptr;
-}
-
-//++
-// Details: Bitwise copy another data object to *this variant object.
-// Type:    Method.
-// Args:    vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-void CMIUtilVariant::Copy(const CMIUtilVariant &vrOther) {
-  Destroy();
-
-  if (vrOther.m_pDataObject != nullptr) {
-    m_pDataObject = vrOther.m_pDataObject->CreateCopyOfSelf();
-  }
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/MIUtilVariant.h b/src/llvm-project/lldb/tools/lldb-mi/MIUtilVariant.h
deleted file mode 100644
index 4c9db33..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/MIUtilVariant.h
+++ /dev/null
@@ -1,247 +0,0 @@
-//===-- MIUtilVariant.h -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#pragma once
-
-// In-house headers:
-#include "MIDataTypes.h"
-
-//++
-//============================================================================
-// Details: MI common code utility class. The class implements behaviour of a
-//          variant object which holds any data object of type T. A copy of the
-//          data object specified is made and stored in *this wrapper. When the
-//          *this object is destroyed the data object hold within calls its
-//          destructor should it have one.
-//--
-class CMIUtilVariant {
-  // Methods:
-public:
-  /* ctor */ CMIUtilVariant();
-  /* ctor */ CMIUtilVariant(const CMIUtilVariant &vrOther);
-  /* ctor */ CMIUtilVariant(CMIUtilVariant &vrOther);
-  /* ctor */ CMIUtilVariant(CMIUtilVariant &&vrwOther);
-  /* dtor */ ~CMIUtilVariant();
-
-  template <typename T> void Set(const T &vArg);
-  template <typename T> T *Get() const;
-
-  CMIUtilVariant &operator=(const CMIUtilVariant &vrOther);
-  CMIUtilVariant &operator=(CMIUtilVariant &&vrwOther);
-
-  // Classes:
-private:
-  //++ ----------------------------------------------------------------------
-  // Details: Base class wrapper to hold the variant's data object when
-  //          assigned to it by the Set() function. Do not use the
-  //          CDataObjectBase
-  //          to create objects, use only CDataObjectBase derived objects,
-  //          see CDataObject() class.
-  //--
-  class CDataObjectBase {
-    // Methods:
-  public:
-    /* ctor */ CDataObjectBase();
-    /* ctor */ CDataObjectBase(const CDataObjectBase &vrOther);
-    /* ctor */ CDataObjectBase(CDataObjectBase &vrOther);
-    /* ctor */ CDataObjectBase(CDataObjectBase &&vrwOther);
-    //
-    CDataObjectBase &operator=(const CDataObjectBase &vrOther);
-    CDataObjectBase &operator=(CDataObjectBase &&vrwOther);
-
-    // Overrideable:
-  public:
-    virtual ~CDataObjectBase();
-    virtual CDataObjectBase *CreateCopyOfSelf();
-    virtual bool GetIsDerivedClass() const;
-
-    // Overrideable:
-  protected:
-    virtual void Copy(const CDataObjectBase &vrOther);
-    virtual void Destroy();
-  };
-
-  //++ ----------------------------------------------------------------------
-  // Details: Derived from CDataObjectBase, this class is the wrapper for the
-  //          data object as it has an aggregate of type T which is a copy
-  //          of the data object assigned to the variant object.
-  //--
-  template <typename T> class CDataObject : public CDataObjectBase {
-    // Methods:
-  public:
-    /* ctor */ CDataObject();
-    /* ctor */ CDataObject(const T &vArg);
-    /* ctor */ CDataObject(const CDataObject &vrOther);
-    /* ctor */ CDataObject(CDataObject &vrOther);
-    /* ctor */ CDataObject(CDataObject &&vrwOther);
-    //
-    CDataObject &operator=(const CDataObject &vrOther);
-    CDataObject &operator=(CDataObject &&vrwOther);
-    //
-    T &GetDataObject();
-
-    // Overridden:
-  public:
-    // From CDataObjectBase
-    ~CDataObject() override;
-    CDataObjectBase *CreateCopyOfSelf() override;
-    bool GetIsDerivedClass() const override;
-
-    // Overrideable:
-  private:
-    virtual void Duplicate(const CDataObject &vrOther);
-
-    // Overridden:
-  private:
-    // From CDataObjectBase
-    void Destroy() override;
-
-    // Attributes:
-  private:
-    T m_dataObj;
-  };
-
-  // Methods
-private:
-  void Destroy();
-  void Copy(const CMIUtilVariant &vrOther);
-
-  // Attributes:
-private:
-  CDataObjectBase *m_pDataObject;
-};
-
-
-//++
-// Details: CDataObject constructor.
-// Type:    Method.
-// Args:    T   - The object's type.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T> CMIUtilVariant::CDataObject<T>::CDataObject() {}
-
-//++
-// Details: CDataObject constructor.
-// Type:    Method.
-// Args:    T       - The object's type.
-//          vArg    - (R) The data object to be stored in the variant object.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T>
-CMIUtilVariant::CDataObject<T>::CDataObject(const T &vArg) {
-  m_dataObj = vArg;
-}
-
-//++
-// Details: CDataObject destructor.
-// Type:    Overridden.
-// Args:    T   - The object's type.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T> CMIUtilVariant::CDataObject<T>::~CDataObject() {
-  Destroy();
-}
-
-//++
-// Details: Retrieve the data object hold by *this object wrapper.
-// Type:    Method.
-// Args:    T   - The object's type.
-// Return:  T & - Reference to the data object.
-// Throws:  None.
-//--
-template <typename T> T &CMIUtilVariant::CDataObject<T>::GetDataObject() {
-  return m_dataObj;
-}
-
-//++
-// Details: Create a new copy of *this class.
-// Type:    Overridden.
-// Args:    T   - The object's type.
-// Return:  CDataObjectBase *   - Pointer to a new object.
-// Throws:  None.
-//--
-template <typename T>
-CMIUtilVariant::CDataObjectBase *
-CMIUtilVariant::CDataObject<T>::CreateCopyOfSelf() {
-  CDataObject *pCopy = new CDataObject<T>(m_dataObj);
-
-  return pCopy;
-}
-
-//++
-// Details: Determine if *this object is a derived from CDataObjectBase.
-// Type:    Overridden.
-// Args:    T   - The object's type.
-// Return:  bool    - True = *this is derived from CDataObjectBase
-//                  - False = *this is an instance of the base class.
-// Throws:  None.
-//--
-template <typename T>
-bool CMIUtilVariant::CDataObject<T>::GetIsDerivedClass() const {
-  return true;
-}
-
-//++
-// Details: Perform a bitwise copy of *this object.
-// Type:    Overrideable.
-// Args:    T       - The object's type.
-//          vrOther - (R) The other object.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T>
-void CMIUtilVariant::CDataObject<T>::Duplicate(const CDataObject &vrOther) {
-  CDataObjectBase::Copy(vrOther);
-  m_dataObj = vrOther.m_dataObj;
-}
-
-//++
-// Details: Release any resources used by *this object.
-// Type:    Overridden.
-// Args:    None.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T> void CMIUtilVariant::CDataObject<T>::Destroy() {
-  CDataObjectBase::Destroy();
-}
-
-
-//++
-// Details: Assign to the variant an object of a specified type.
-// Type:    Template method.
-// Args:    T       - The object's type.
-//          vArg    - (R) The object to store.
-// Return:  None.
-// Throws:  None.
-//--
-template <typename T> void CMIUtilVariant::Set(const T &vArg) {
-  m_pDataObject = new CDataObject<T>(vArg);
-}
-
-//++
-// Details: Retrieve the data object from *this variant.
-// Type:    Template method.
-// Args:    T   - The object's type.
-// Return:  T * - Pointer the data object, NULL = data object not assigned to
-// *this variant.
-// Throws:  None.
-//--
-template <typename T> T *CMIUtilVariant::Get() const {
-  if ((m_pDataObject != nullptr) && m_pDataObject->GetIsDerivedClass()) {
-    CDataObject<T> *pDataObj = static_cast<CDataObject<T> *>(m_pDataObject);
-    return &pDataObj->GetDataObject();
-  }
-
-  // Do not use a CDataObjectBase object, use only CDataObjectBase derived
-  // objects
-  return nullptr;
-}
diff --git a/src/llvm-project/lldb/tools/lldb-mi/Platform.h b/src/llvm-project/lldb/tools/lldb-mi/Platform.h
deleted file mode 100644
index aa999f5..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/Platform.h
+++ /dev/null
@@ -1,87 +0,0 @@
-//===-- Platform.h ----------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-#pragma once
-
-#if defined(_MSC_VER)
-
-#include <inttypes.h>
-#include <io.h>
-#include <signal.h>
-
-#include "lldb/Host/HostGetOpt.h"
-#include "lldb/Host/windows/windows.h"
-
-struct winsize {
-  long ws_col;
-};
-
-typedef unsigned char cc_t;
-typedef unsigned int speed_t;
-typedef unsigned int tcflag_t;
-
-// fcntl.h // This is not used by MI
-#define O_NOCTTY 0400
-
-// ioctls.h
-#define TIOCGWINSZ 0x5413
-
-// tcsetattr arguments
-#define TCSANOW 0
-
-#define NCCS 32
-struct termios {
-  tcflag_t c_iflag; // input mode flags
-  tcflag_t c_oflag; // output mode flags
-  tcflag_t c_cflag; // control mode flags
-  tcflag_t c_lflag; // local mode flags
-  cc_t c_line;      // line discipline
-  cc_t c_cc[NCCS];  // control characters
-  speed_t c_ispeed; // input speed
-  speed_t c_ospeed; // output speed
-};
-
-typedef long pid_t;
-
-#define STDIN_FILENO 0
-#define PATH_MAX 32768
-#define snprintf _snprintf
-
-extern int ioctl(int d, int request, ...);
-extern int kill(pid_t pid, int sig);
-extern int tcsetattr(int fd, int optional_actions,
-                     const struct termios *termios_p);
-extern int tcgetattr(int fildes, struct termios *termios_p);
-
-// signal handler function pointer type
-typedef void (*sighandler_t)(int);
-
-// CODETAG_IOR_SIGNALS
-// signal.h
-#define SIGQUIT 3   // Terminal quit signal
-#define SIGKILL 9   // Kill (cannot be caught or ignored)
-#define SIGPIPE 13  // Write on a pipe with no one to read it
-#define SIGCONT 18  // Continue executing, if stopped.
-#define SIGTSTP 20  // Terminal stop signal
-#define SIGSTOP 23  // Stop executing (cannot be caught or ignored)
-#define SIGWINCH 28 // (== SIGVTALRM)
-
-#else
-
-#include <inttypes.h>
-#include <limits.h>
-
-#include <getopt.h>
-#include <libgen.h>
-#include <sys/ioctl.h>
-#include <termios.h>
-#include <unistd.h>
-
-#include <pthread.h>
-#include <sys/time.h>
-
-#endif
diff --git a/src/llvm-project/lldb/tools/lldb-mi/lldb-Info.plist b/src/llvm-project/lldb/tools/lldb-mi/lldb-Info.plist
deleted file mode 100644
index 7955126..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/lldb-Info.plist
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.apple.lldb</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>lldb-mi</string>
-	<key>CFBundleVersion</key>
-	<string>2</string>
-	<key>SecTaskAccess</key>
-	<array>
-		<string>allowed</string>
-		<string>debug</string>
-	</array>
-</dict>
-</plist>
diff --git a/src/llvm-project/lldb/tools/lldb-mi/module.modulemap b/src/llvm-project/lldb/tools/lldb-mi/module.modulemap
deleted file mode 100644
index 01f6a2b..0000000
--- a/src/llvm-project/lldb/tools/lldb-mi/module.modulemap
+++ /dev/null
@@ -1,79 +0,0 @@
-module lldb_mi {
-  module MICmdArgContext { header "MICmdArgContext.h" export * }
-  module MICmdArgSet { header "MICmdArgSet.h" export * }
-  module MICmdArgValBase { header "MICmdArgValBase.h" export * }
-  module MICmdArgValConsume { header "MICmdArgValConsume.h" export * }
-  module MICmdArgValFile { header "MICmdArgValFile.h" export * }
-  module MICmdArgValListBase { header "MICmdArgValListBase.h" export * }
-  module MICmdArgValListOfN { header "MICmdArgValListOfN.h" export * }
-  module MICmdArgValNumber { header "MICmdArgValNumber.h" export * }
-  module MICmdArgValOptionLong { header "MICmdArgValOptionLong.h" export * }
-  module MICmdArgValOptionShort { header "MICmdArgValOptionShort.h" export * }
-  module MICmdArgValPrintValues { header "MICmdArgValPrintValues.h" export * }
-  module MICmdArgValString { header "MICmdArgValString.h" export * }
-  module MICmdArgValThreadGrp { header "MICmdArgValThreadGrp.h" export * }
-  module MICmdBase { header "MICmdBase.h" export * }
-  module MICmdCmdBreak { header "MICmdCmdBreak.h" export * }
-  module MICmdCmdData { header "MICmdCmdData.h" export * }
-  module MICmdCmdEnviro { header "MICmdCmdEnviro.h" export * }
-  module MICmdCmdExec { header "MICmdCmdExec.h" export * }
-  module MICmdCmdFile { header "MICmdCmdFile.h" export * }
-  module MICmdCmdGdbInfo { header "MICmdCmdGdbInfo.h" export * }
-  module MICmdCmdGdbSet { header "MICmdCmdGdbSet.h" export * }
-  module MICmdCmdGdbShow { header "MICmdCmdGdbShow.h" export * }
-  module MICmdCmdGdbThread { header "MICmdCmdGdbThread.h" export * }
-  module MICmdCmd { header "MICmdCmd.h" export * }
-  module MICmdCmdMiscellanous { header "MICmdCmdMiscellanous.h" export * }
-  module MICmdCmdStack { header "MICmdCmdStack.h" export * }
-  module MICmdCmdSupportInfo { header "MICmdCmdSupportInfo.h" export * }
-  module MICmdCmdSupportList { header "MICmdCmdSupportList.h" export * }
-  module MICmdCmdSymbol { header "MICmdCmdSymbol.h" export * }
-  module MICmdCmdTarget { header "MICmdCmdTarget.h" export * }
-  module MICmdCmdThread { header "MICmdCmdThread.h" export * }
-  module MICmdCmdTrace { header "MICmdCmdTrace.h" export * }
-  module MICmdCmdVar { header "MICmdCmdVar.h" export * }
-  module MICmdCommands { header "MICmdCommands.h" export * }
-  module MICmdData { header "MICmdData.h" export * }
-  module MICmdFactory { header "MICmdFactory.h" export * }
-  module MICmdInterpreter { header "MICmdInterpreter.h" export * }
-  module MICmdInvoker { header "MICmdInvoker.h" export * }
-  module MICmdMgr { header "MICmdMgr.h" export * }
-  module MICmdMgrSetCmdDeleteCallback { header "MICmdMgrSetCmdDeleteCallback.h" export * }
-  module MICmnBase { header "MICmnBase.h" export * }
-  module MICmnConfig { header "MICmnConfig.h" export * }
-  module MICmnLLDBBroadcaster { header "MICmnLLDBBroadcaster.h" export * }
-  module MICmnLLDBDebugger { header "MICmnLLDBDebugger.h" export * }
-  module MICmnLLDBDebuggerHandleEvents { header "MICmnLLDBDebuggerHandleEvents.h" export * }
-  module MICmnLLDBDebugSessionInfo { header "MICmnLLDBDebugSessionInfo.h" export * }
-  module MICmnLLDBDebugSessionInfoVarObj { header "MICmnLLDBDebugSessionInfoVarObj.h" export * }
-  module MICmnLLDBProxySBValue { header "MICmnLLDBProxySBValue.h" export * }
-  module MICmnLLDBUtilSBValue { header "MICmnLLDBUtilSBValue.h" export * }
-  module MICmnLog { header "MICmnLog.h" export * }
-  module MICmnLogMediumFile { header "MICmnLogMediumFile.h" export * }
-  module MICmnMIOutOfBandRecord { header "MICmnMIOutOfBandRecord.h" export * }
-  module MICmnMIResultRecord { header "MICmnMIResultRecord.h" export * }
-  module MICmnMIValueConst { header "MICmnMIValueConst.h" export * }
-  module MICmnMIValue { header "MICmnMIValue.h" export * }
-  module MICmnMIValueList { header "MICmnMIValueList.h" export * }
-  module MICmnMIValueResult { header "MICmnMIValueResult.h" export * }
-  module MICmnMIValueTuple { header "MICmnMIValueTuple.h" export * }
-  module MICmnResources { header "MICmnResources.h" export * }
-  module MICmnStreamStderr { header "MICmnStreamStderr.h" export * }
-  module MICmnStreamStdin { header "MICmnStreamStdin.h" export * }
-  module MICmnStreamStdout { header "MICmnStreamStdout.h" export * }
-  module MICmnThreadMgrStd { header "MICmnThreadMgrStd.h" export * }
-  module MIDataTypes { header "MIDataTypes.h" export * }
-  module MIDriverBase { header "MIDriverBase.h" export * }
-  module MIDriver { header "MIDriver.h" export * }
-  module MIDriverMgr { header "MIDriverMgr.h" export * }
-  module MIUtilDateTimeStd { header "MIUtilDateTimeStd.h" export * }
-  module MIUtilDebug { header "MIUtilDebug.h" export * }
-  module MIUtilFileStd { header "MIUtilFileStd.h" export * }
-  module MIUtilMapIdToVariant { header "MIUtilMapIdToVariant.h" export * }
-  module MIUtilSingletonBase { header "MIUtilSingletonBase.h" export * }
-  module MIUtilSingletonHelper { header "MIUtilSingletonHelper.h" export * }
-  module MIUtilString { header "MIUtilString.h" export * }
-  module MIUtilThreadBaseStd { header "MIUtilThreadBaseStd.h" export * }
-  module MIUtilVariant { header "MIUtilVariant.h" export * }
-  module Platform { header "Platform.h" export * }
-}
diff --git a/src/llvm-project/lldb/tools/lldb-server/CMakeLists.txt b/src/llvm-project/lldb/tools/lldb-server/CMakeLists.txt
index f1c826b..7443c6c 100644
--- a/src/llvm-project/lldb/tools/lldb-server/CMakeLists.txt
+++ b/src/llvm-project/lldb/tools/lldb-server/CMakeLists.txt
@@ -1,29 +1,3 @@
-if ( CMAKE_SYSTEM_NAME MATCHES "Linux" )
-include_directories(
-  ../../../../llvm/include
-  ../../source/Plugins/Process/Linux
-  ../../source/Plugins/Process/POSIX
-  )
-endif ()
-
-if ( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
-include_directories(
-  ../../../../llvm/include
-  ../../source/Plugins/Process/FreeBSD
-  ../../source/Plugins/Process/POSIX
-  )
-endif ()
-
-if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
-include_directories(
-  ../../../../llvm/include
-  ../../source/Plugins/Process/NetBSD
-  ../../source/Plugins/Process/POSIX
-  )
-endif ()
-
-include_directories(../../source)
-
 set(LLDB_PLUGINS)
 
 if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android")
@@ -76,4 +50,5 @@
       Support
 )
 
+target_include_directories(lldb-server PRIVATE "${LLDB_SOURCE_DIR}/source")
 target_link_libraries(lldb-server PRIVATE ${LLDB_SYSTEM_LIBS})
diff --git a/src/llvm-project/lldb/tools/lldb-server/LLDBServerUtilities.cpp b/src/llvm-project/lldb/tools/lldb-server/LLDBServerUtilities.cpp
index 095d281..7f9271e 100644
--- a/src/llvm-project/lldb/tools/lldb-server/LLDBServerUtilities.cpp
+++ b/src/llvm-project/lldb/tools/lldb-server/LLDBServerUtilities.cpp
@@ -24,7 +24,7 @@
   if (!log_file.empty()) {
     std::error_code EC;
     std::shared_ptr<raw_ostream> stream_sp = std::make_shared<raw_fd_ostream>(
-        log_file, EC, sys::fs::F_Text | sys::fs::F_Append);
+        log_file, EC, sys::fs::OF_Text | sys::fs::OF_Append);
     if (!EC)
       return stream_sp;
     errs() << llvm::formatv(
diff --git a/src/llvm-project/lldb/tools/lldb-server/lldb-gdbserver.cpp b/src/llvm-project/lldb/tools/lldb-server/lldb-gdbserver.cpp
index b479c21..5f06503 100644
--- a/src/llvm-project/lldb/tools/lldb-server/lldb-gdbserver.cpp
+++ b/src/llvm-project/lldb/tools/lldb-server/lldb-gdbserver.cpp
@@ -22,6 +22,7 @@
 #include "LLDBServerUtilities.h"
 #include "Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h"
 #include "Plugins/Process/gdb-remote/ProcessGDBRemoteLog.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Host/ConnectionFileDescriptor.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostGetOpt.h"
@@ -39,6 +40,8 @@
 #include "Plugins/Process/Linux/NativeProcessLinux.h"
 #elif defined(__NetBSD__)
 #include "Plugins/Process/NetBSD/NativeProcessNetBSD.h"
+#elif defined(_WIN32)
+#include "Plugins/Process/Windows/Common/NativeProcessWindows.h"
 #endif
 
 #ifndef LLGS_PROGRAM_NAME
@@ -60,6 +63,8 @@
 typedef process_linux::NativeProcessLinux::Factory NativeProcessFactory;
 #elif defined(__NetBSD__)
 typedef process_netbsd::NativeProcessNetBSD::Factory NativeProcessFactory;
+#elif defined(_WIN32)
+typedef NativeProcessWindows::Factory NativeProcessFactory;
 #else
 // Dummy implementation to make sure the code compiles
 class NativeProcessFactory : public NativeProcessProtocol::Factory {
@@ -104,17 +109,16 @@
     {"fd", required_argument, nullptr, 'F'},
     {nullptr, 0, nullptr, 0}};
 
+#ifndef _WIN32
 // Watch for signals
 static int g_sighup_received_count = 0;
 
-#ifndef _WIN32
 static void sighup_handler(MainLoopBase &mainloop) {
   ++g_sighup_received_count;
 
   Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS));
-  if (log)
-    log->Printf("lldb-server:%s swallowing SIGHUP (receive count=%d)",
-                __FUNCTION__, g_sighup_received_count);
+  LLDB_LOGF(log, "lldb-server:%s swallowing SIGHUP (receive count=%d)",
+            __FUNCTION__, g_sighup_received_count);
 
   if (g_sighup_received_count >= 2)
     mainloop.RequestTermination();
@@ -234,7 +238,7 @@
     snprintf(connection_url, sizeof(connection_url), "fd://%d", connection_fd);
 
     // Create the connection.
-#if !defined LLDB_DISABLE_POSIX && !defined _WIN32
+#if LLDB_ENABLE_POSIX && !defined _WIN32
     ::fcntl(connection_fd, F_SETFD, FD_CLOEXEC);
 #endif
     connection_up.reset(new ConnectionFileDescriptor);
@@ -479,9 +483,9 @@
 
   Log *log(lldb_private::GetLogIfAnyCategoriesSet(GDBR_LOG_PROCESS));
   if (log) {
-    log->Printf("lldb-server launch");
+    LLDB_LOGF(log, "lldb-server launch");
     for (int i = 0; i < argc; i++) {
-      log->Printf("argv[%i] = '%s'", i, argv[i]);
+      LLDB_LOGF(log, "argv[%i] = '%s'", i, argv[i]);
     }
   }
 
@@ -515,10 +519,10 @@
     handle_launch(gdb_server, argc, argv);
 
   // Print version info.
-  printf("%s-%s", LLGS_PROGRAM_NAME, LLGS_VERSION_STR);
+  printf("%s-%s\n", LLGS_PROGRAM_NAME, LLGS_VERSION_STR);
 
   ConnectToRemote(mainloop, gdb_server, reverse_connect, host_and_port,
-                  progname, subcommand, named_pipe_path.c_str(), 
+                  progname, subcommand, named_pipe_path.c_str(),
                   unnamed_pipe, connection_fd);
 
   if (!gdb_server.IsConnected()) {
diff --git a/src/llvm-project/lldb/tools/lldb-server/lldb-platform.cpp b/src/llvm-project/lldb/tools/lldb-server/lldb-platform.cpp
index af78f62..a6fb563 100644
--- a/src/llvm-project/lldb/tools/lldb-server/lldb-platform.cpp
+++ b/src/llvm-project/lldb/tools/lldb-server/lldb-platform.cpp
@@ -15,12 +15,14 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#if !defined(_WIN32)
 #include <sys/wait.h>
-
+#endif
 #include <fstream>
 
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/FileUtilities.h"
+#include "llvm/Support/raw_ostream.h"
 
 #include "Acceptor.h"
 #include "LLDBServerUtilities.h"
@@ -67,6 +69,7 @@
 #define HIGH_PORT (49151u)
 #endif
 
+#if !defined(_WIN32)
 // Watch for signals
 static void signal_handler(int signo) {
   switch (signo) {
@@ -81,6 +84,7 @@
     break;
   }
 }
+#endif
 
 static void display_usage(const char *progname, const char *subcommand) {
   fprintf(stderr, "Usage:\n  %s %s [--log-file log-file-name] [--log-channels "
@@ -100,29 +104,36 @@
 
   llvm::SmallString<64> temp_file_path;
   temp_file_spec.AppendPathComponent("port-file.%%%%%%");
-  int FD;
-  auto err_code = llvm::sys::fs::createUniqueFile(temp_file_spec.GetPath(), FD,
-                                                  temp_file_path);
-  if (err_code)
-    return Status("Failed to create temp file: %s", err_code.message().c_str());
 
-  llvm::FileRemover tmp_file_remover(temp_file_path);
+  Status status;
+  if (auto Err =
+          handleErrors(llvm::writeFileAtomically(
+                           temp_file_path, temp_file_spec.GetPath(), socket_id),
+                       [&status, &file_spec](const AtomicFileWriteError &E) {
+                         std::string ErrorMsgBuffer;
+                         llvm::raw_string_ostream S(ErrorMsgBuffer);
+                         E.log(S);
 
-  {
-    llvm::raw_fd_ostream temp_file(FD, true);
-    temp_file << socket_id;
-    temp_file.close();
-    if (temp_file.has_error())
-      return Status("Failed to write to port file.");
+                         switch (E.Error) {
+                         case atomic_write_error::failed_to_create_uniq_file:
+                           status = Status("Failed to create temp file: %s",
+                                           ErrorMsgBuffer.c_str());
+                           break;
+                         case atomic_write_error::output_stream_error:
+                           status = Status("Failed to write to port file.");
+                           break;
+                         case atomic_write_error::failed_to_rename_temp_file:
+                           status = Status("Failed to rename file %s to %s: %s",
+                                           ErrorMsgBuffer.c_str(),
+                                           file_spec.GetPath().c_str(),
+                                           ErrorMsgBuffer.c_str());
+                           break;
+                         }
+                       })) {
+    return Status("Failed to atomically write file %s",
+                  file_spec.GetPath().c_str());
   }
-
-  err_code = llvm::sys::fs::rename(temp_file_path, file_spec.GetPath());
-  if (err_code)
-    return Status("Failed to rename file %s to %s: %s", temp_file_path.c_str(),
-                  file_spec.GetPath().c_str(), err_code.message().c_str());
-
-  tmp_file_remover.releaseFile();
-  return Status();
+  return status;
 }
 
 // main
@@ -131,8 +142,10 @@
   const char *subcommand = argv[1];
   argc--;
   argv++;
+#if !defined(_WIN32)
   signal(SIGPIPE, SIG_IGN);
   signal(SIGHUP, signal_handler);
+#endif
   int long_option_index = 0;
   Status error;
   std::string listen_host_port;
@@ -309,8 +322,10 @@
     printf("Connection established.\n");
     if (g_server) {
       // Collect child zombie processes.
+#if !defined(_WIN32)
       while (waitpid(-1, nullptr, WNOHANG) > 0)
         ;
+#endif
       if (fork()) {
         // Parent doesn't need a connection to the lldb client
         delete conn;
diff --git a/src/llvm-project/lldb/tools/lldb-server/lldb-server.cpp b/src/llvm-project/lldb/tools/lldb-server/lldb-server.cpp
index 690aa62..749a381 100644
--- a/src/llvm-project/lldb/tools/lldb-server/lldb-server.cpp
+++ b/src/llvm-project/lldb/tools/lldb-server/lldb-server.cpp
@@ -12,6 +12,7 @@
 
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/InitLLVM.h"
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
@@ -39,7 +40,7 @@
 namespace llgs {
 static void initialize() {
   if (auto e = g_debugger_lifetime->Initialize(
-          llvm::make_unique<SystemInitializerLLGS>(), nullptr))
+          std::make_unique<SystemInitializerLLGS>(), nullptr))
     llvm::consumeError(std::move(e));
 }
 
@@ -48,6 +49,7 @@
 
 // main
 int main(int argc, char *argv[]) {
+  llvm::InitLLVM IL(argc, argv, /*InstallPipeSignalExitHandler=*/false);
   llvm::StringRef ToolName = argv[0];
   llvm::sys::PrintStackTraceOnErrorSignal(ToolName);
   llvm::PrettyStackTraceProgram X(argc, argv);
diff --git a/src/llvm-project/lldb/tools/lldb-test/SystemInitializerTest.cpp b/src/llvm-project/lldb/tools/lldb-test/SystemInitializerTest.cpp
index 44b960c..8841e4d 100644
--- a/src/llvm-project/lldb/tools/lldb-test/SystemInitializerTest.cpp
+++ b/src/llvm-project/lldb/tools/lldb-test/SystemInitializerTest.cpp
@@ -28,6 +28,7 @@
 #include "Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h"
 #include "Plugins/ABI/SysV-s390x/ABISysV_s390x.h"
 #include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h"
+#include "Plugins/ABI/Windows-x86_64/ABIWindows_x86_64.h"
 #include "Plugins/Architecture/Arm/ArchitectureArm.h"
 #include "Plugins/Architecture/PPC64/ArchitecturePPC64.h"
 #include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h"
@@ -111,6 +112,38 @@
 
 SystemInitializerTest::~SystemInitializerTest() {}
 
+#define LLDB_PROCESS_AArch64(op)                                               \
+  ABIMacOSX_arm64::op();                                                       \
+  ABISysV_arm64::op();
+#define LLDB_PROCESS_ARM(op)                                                   \
+  ABIMacOSX_arm::op();                                                         \
+  ABISysV_arm::op();
+#define LLDB_PROCESS_Hexagon(op) ABISysV_hexagon::op();
+#define LLDB_PROCESS_Mips(op)                                                  \
+  ABISysV_mips::op();                                                          \
+  ABISysV_mips64::op();
+#define LLDB_PROCESS_PowerPC(op)                                               \
+  ABISysV_ppc::op();                                                          \
+  ABISysV_ppc64::op();
+#define LLDB_PROCESS_SystemZ(op) ABISysV_s390x::op();
+#define LLDB_PROCESS_X86(op)                                                   \
+  ABIMacOSX_i386::op();                                                        \
+  ABISysV_i386::op();                                                          \
+  ABISysV_x86_64::op();                                                        \
+  ABIWindows_x86_64::op();
+
+#define LLDB_PROCESS_AMDGPU(op)
+#define LLDB_PROCESS_ARC(op)
+#define LLDB_PROCESS_AVR(op)
+#define LLDB_PROCESS_BPF(op)
+#define LLDB_PROCESS_Lanai(op)
+#define LLDB_PROCESS_MSP430(op)
+#define LLDB_PROCESS_NVPTX(op)
+#define LLDB_PROCESS_RISCV(op)
+#define LLDB_PROCESS_Sparc(op)
+#define LLDB_PROCESS_WebAssembly(op)
+#define LLDB_PROCESS_XCore(op)
+
 llvm::Error SystemInitializerTest::Initialize() {
   if (auto e = SystemInitializerCommon::Initialize())
     return e;
@@ -144,19 +177,8 @@
 
   ClangASTContext::Initialize();
 
-  ABIMacOSX_i386::Initialize();
-  ABIMacOSX_arm::Initialize();
-  ABIMacOSX_arm64::Initialize();
-  ABISysV_arm::Initialize();
-  ABISysV_arm64::Initialize();
-  ABISysV_hexagon::Initialize();
-  ABISysV_i386::Initialize();
-  ABISysV_x86_64::Initialize();
-  ABISysV_ppc::Initialize();
-  ABISysV_ppc64::Initialize();
-  ABISysV_mips::Initialize();
-  ABISysV_mips64::Initialize();
-  ABISysV_s390x::Initialize();
+#define LLVM_TARGET(t) LLDB_PROCESS_ ## t(Initialize)
+#include "llvm/Config/Targets.def"
 
   ArchitectureArm::Initialize();
   ArchitecturePPC64::Initialize();
@@ -246,19 +268,9 @@
 
   ClangASTContext::Terminate();
 
-  ABIMacOSX_i386::Terminate();
-  ABIMacOSX_arm::Terminate();
-  ABIMacOSX_arm64::Terminate();
-  ABISysV_arm::Terminate();
-  ABISysV_arm64::Terminate();
-  ABISysV_hexagon::Terminate();
-  ABISysV_i386::Terminate();
-  ABISysV_x86_64::Terminate();
-  ABISysV_ppc::Terminate();
-  ABISysV_ppc64::Terminate();
-  ABISysV_mips::Terminate();
-  ABISysV_mips64::Terminate();
-  ABISysV_s390x::Terminate();
+#define LLVM_TARGET(t) LLDB_PROCESS_ ## t(Terminate)
+#include "llvm/Config/Targets.def"
+
   DisassemblerLLVMC::Terminate();
 
   JITLoaderGDB::Terminate();
diff --git a/src/llvm-project/lldb/tools/lldb-test/lldb-test.cpp b/src/llvm-project/lldb/tools/lldb-test/lldb-test.cpp
index 478da8c..66c9a87 100644
--- a/src/llvm-project/lldb/tools/lldb-test/lldb-test.cpp
+++ b/src/llvm-project/lldb/tools/lldb-test/lldb-test.cpp
@@ -19,20 +19,21 @@
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Symbol/ClangASTContext.h"
-#include "lldb/Symbol/ClangASTImporter.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/LineTable.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/TypeList.h"
+#include "lldb/Symbol/TypeMap.h"
 #include "lldb/Symbol/VariableList.h"
+#include "lldb/Target/Language.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/CleanUp.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/State.h"
 #include "lldb/Utility/StreamString.h"
 
 #include "llvm/ADT/IntervalMap.h"
+#include "llvm/ADT/ScopeExit.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/ManagedStatic.h"
@@ -41,6 +42,7 @@
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/Signals.h"
 #include "llvm/Support/WithColor.h"
+
 #include <cstdio>
 #include <thread>
 
@@ -138,6 +140,15 @@
             cl::desc("Restrict search to the context of the given variable."),
             cl::value_desc("variable"), cl::sub(SymbolsSubcommand));
 
+static cl::opt<std::string> CompilerContext(
+    "compiler-context",
+    cl::desc("Specify a compiler context as \"kind:name,...\"."),
+    cl::value_desc("context"), cl::sub(SymbolsSubcommand));
+
+static cl::opt<std::string>
+    Language("language", cl::desc("Specify a language type, like C99."),
+             cl::value_desc("language"), cl::sub(SymbolsSubcommand));
+
 static cl::list<FunctionNameType> FunctionNameFlags(
     "function-flags", cl::desc("Function search flags:"),
     cl::values(clEnumValN(eFunctionNameTypeAuto, "auto",
@@ -158,6 +169,10 @@
 static cl::opt<bool> DumpAST("dump-ast",
                              cl::desc("Dump AST restored from symbols."),
                              cl::sub(SymbolsSubcommand));
+static cl::opt<bool>
+    DumpClangAST("dump-clang-ast",
+                 cl::desc("Dump clang AST restored from symbols."),
+                 cl::sub(SymbolsSubcommand));
 
 static cl::opt<bool> Verify("verify", cl::desc("Verify symbol information."),
                             cl::sub(SymbolsSubcommand));
@@ -168,7 +183,7 @@
 static cl::opt<int> Line("line", cl::desc("Line to search."),
                          cl::sub(SymbolsSubcommand));
 
-static Expected<CompilerDeclContext> getDeclContext(SymbolVendor &Vendor);
+static Expected<CompilerDeclContext> getDeclContext(SymbolFile &Symfile);
 
 static Error findFunctions(lldb_private::Module &Module);
 static Error findBlocks(lldb_private::Module &Module);
@@ -177,6 +192,7 @@
 static Error findVariables(lldb_private::Module &Module);
 static Error dumpModule(lldb_private::Module &Module);
 static Error dumpAST(lldb_private::Module &Module);
+static Error dumpClangAST(lldb_private::Module &Module);
 static Error verify(lldb_private::Module &Module);
 
 static Expected<Error (*)(lldb_private::Module &)> getAction();
@@ -219,6 +235,46 @@
 
 } // namespace opts
 
+std::vector<CompilerContext> parseCompilerContext() {
+  std::vector<CompilerContext> result;
+  if (opts::symbols::CompilerContext.empty())
+    return result;
+
+  StringRef str{opts::symbols::CompilerContext};
+  SmallVector<StringRef, 8> entries_str;
+  str.split(entries_str, ',', /*maxSplit*/-1, /*keepEmpty=*/false);
+  for (auto entry_str : entries_str) {
+    StringRef key, value;
+    std::tie(key, value) = entry_str.split(':');
+    auto kind =
+        StringSwitch<CompilerContextKind>(key)
+            .Case("TranslationUnit", CompilerContextKind::TranslationUnit)
+            .Case("Module", CompilerContextKind::Module)
+            .Case("Namespace", CompilerContextKind::Namespace)
+            .Case("Class", CompilerContextKind::Class)
+            .Case("Struct", CompilerContextKind::Struct)
+            .Case("Union", CompilerContextKind::Union)
+            .Case("Function", CompilerContextKind::Function)
+            .Case("Variable", CompilerContextKind::Variable)
+            .Case("Enum", CompilerContextKind::Enum)
+            .Case("Typedef", CompilerContextKind::Typedef)
+            .Case("AnyModule", CompilerContextKind::AnyModule)
+            .Case("AnyType", CompilerContextKind::AnyType)
+            .Default(CompilerContextKind::Invalid);
+    if (value.empty()) {
+      WithColor::error() << "compiler context entry has no \"name\"\n";
+      exit(1);
+    }
+    result.push_back({kind, ConstString{value}});
+  }
+  outs() << "Search context: {\n";
+  for (auto entry: result)
+    entry.Dump();
+  outs() << "}\n";
+
+  return result;
+}
+
 template <typename... Args>
 static Error make_string_error(const char *Format, Args &&... args) {
   return llvm::make_error<llvm::StringError>(
@@ -335,11 +391,11 @@
 }
 
 Expected<CompilerDeclContext>
-opts::symbols::getDeclContext(SymbolVendor &Vendor) {
+opts::symbols::getDeclContext(SymbolFile &Symfile) {
   if (Context.empty())
     return CompilerDeclContext();
   VariableList List;
-  Vendor.FindGlobalVariables(ConstString(Context), nullptr, UINT32_MAX, List);
+  Symfile.FindGlobalVariables(ConstString(Context), nullptr, UINT32_MAX, List);
   if (List.Empty())
     return make_string_error("Context search didn't find a match.");
   if (List.GetSize() > 1)
@@ -348,7 +404,7 @@
 }
 
 Error opts::symbols::findFunctions(lldb_private::Module &Module) {
-  SymbolVendor &Vendor = *Module.GetSymbolVendor();
+  SymbolFile &Symfile = *Module.GetSymbolFile();
   SymbolContextList List;
   if (!File.empty()) {
     assert(Line != 0);
@@ -380,16 +436,18 @@
   } else if (Regex) {
     RegularExpression RE(Name);
     assert(RE.IsValid());
-    Vendor.FindFunctions(RE, true, false, List);
+    List.Clear();
+    Symfile.FindFunctions(RE, true, List);
   } else {
-    Expected<CompilerDeclContext> ContextOr = getDeclContext(Vendor);
+    Expected<CompilerDeclContext> ContextOr = getDeclContext(Symfile);
     if (!ContextOr)
       return ContextOr.takeError();
     CompilerDeclContext *ContextPtr =
         ContextOr->IsValid() ? &*ContextOr : nullptr;
 
-    Vendor.FindFunctions(ConstString(Name), ContextPtr, getFunctionNameFlags(),
-                         true, false, List);
+    List.Clear();
+    Symfile.FindFunctions(ConstString(Name), ContextPtr, getFunctionNameFlags(),
+                         true, List);
   }
   outs() << formatv("Found {0} functions:\n", List.GetSize());
   StreamString Stream;
@@ -436,15 +494,15 @@
 }
 
 Error opts::symbols::findNamespaces(lldb_private::Module &Module) {
-  SymbolVendor &Vendor = *Module.GetSymbolVendor();
-  Expected<CompilerDeclContext> ContextOr = getDeclContext(Vendor);
+  SymbolFile &Symfile = *Module.GetSymbolFile();
+  Expected<CompilerDeclContext> ContextOr = getDeclContext(Symfile);
   if (!ContextOr)
     return ContextOr.takeError();
   CompilerDeclContext *ContextPtr =
       ContextOr->IsValid() ? &*ContextOr : nullptr;
 
   CompilerDeclContext Result =
-      Vendor.FindNamespace(ConstString(Name), ContextPtr);
+      Symfile.FindNamespace(ConstString(Name), ContextPtr);
   if (Result)
     outs() << "Found namespace: "
            << Result.GetScopeQualifiedName().GetStringRef() << "\n";
@@ -454,17 +512,24 @@
 }
 
 Error opts::symbols::findTypes(lldb_private::Module &Module) {
-  SymbolVendor &Vendor = *Module.GetSymbolVendor();
-  Expected<CompilerDeclContext> ContextOr = getDeclContext(Vendor);
+  SymbolFile &Symfile = *Module.GetSymbolFile();
+  Expected<CompilerDeclContext> ContextOr = getDeclContext(Symfile);
   if (!ContextOr)
     return ContextOr.takeError();
   CompilerDeclContext *ContextPtr =
       ContextOr->IsValid() ? &*ContextOr : nullptr;
 
+  LanguageSet languages;
+  if (!Language.empty())
+    languages.Insert(Language::GetLanguageTypeFromString(Language));
+  
   DenseSet<SymbolFile *> SearchedFiles;
   TypeMap Map;
-  Vendor.FindTypes(ConstString(Name), ContextPtr, true, UINT32_MAX,
-                   SearchedFiles, Map);
+  if (!Name.empty())
+    Symfile.FindTypes(ConstString(Name), ContextPtr, UINT32_MAX, SearchedFiles,
+                      Map);
+  else
+    Module.FindTypes(parseCompilerContext(), languages, SearchedFiles, Map);
 
   outs() << formatv("Found {0} types:\n", Map.GetSize());
   StreamString Stream;
@@ -474,17 +539,18 @@
 }
 
 Error opts::symbols::findVariables(lldb_private::Module &Module) {
-  SymbolVendor &Vendor = *Module.GetSymbolVendor();
+  SymbolFile &Symfile = *Module.GetSymbolFile();
   VariableList List;
   if (Regex) {
     RegularExpression RE(Name);
     assert(RE.IsValid());
-    Vendor.FindGlobalVariables(RE, UINT32_MAX, List);
+    Symfile.FindGlobalVariables(RE, UINT32_MAX, List);
   } else if (!File.empty()) {
     CompUnitSP CU;
     for (size_t Ind = 0; !CU && Ind < Module.GetNumCompileUnits(); ++Ind) {
       CompUnitSP Candidate = Module.GetCompileUnitAtIndex(Ind);
-      if (!Candidate || Candidate->GetFilename().GetStringRef() != File)
+      if (!Candidate ||
+          Candidate->GetPrimaryFile().GetFilename().GetStringRef() != File)
         continue;
       if (CU)
         return make_string_error("Multiple compile units for file `{0}` found.",
@@ -497,13 +563,13 @@
 
     List.AddVariables(CU->GetVariableList(true).get());
   } else {
-    Expected<CompilerDeclContext> ContextOr = getDeclContext(Vendor);
+    Expected<CompilerDeclContext> ContextOr = getDeclContext(Symfile);
     if (!ContextOr)
       return ContextOr.takeError();
     CompilerDeclContext *ContextPtr =
         ContextOr->IsValid() ? &*ContextOr : nullptr;
 
-    Vendor.FindGlobalVariables(ConstString(Name), ContextPtr, UINT32_MAX, List);
+    Symfile.FindGlobalVariables(ConstString(Name), ContextPtr, UINT32_MAX, List);
   }
   outs() << formatv("Found {0} variables:\n", List.GetSize());
   StreamString Stream;
@@ -521,23 +587,25 @@
 }
 
 Error opts::symbols::dumpAST(lldb_private::Module &Module) {
-  SymbolVendor &plugin = *Module.GetSymbolVendor();
-   Module.ParseAllDebugSymbols();
+  Module.ParseAllDebugSymbols();
 
-  auto symfile = plugin.GetSymbolFile();
+  SymbolFile *symfile = Module.GetSymbolFile();
   if (!symfile)
     return make_string_error("Module has no symbol file.");
 
-  auto clang_ast_ctx = llvm::dyn_cast_or_null<ClangASTContext>(
-      symfile->GetTypeSystemForLanguage(eLanguageTypeC_plus_plus));
+  llvm::Expected<TypeSystem &> type_system_or_err =
+      symfile->GetTypeSystemForLanguage(eLanguageTypeC_plus_plus);
+  if (!type_system_or_err)
+    return make_string_error("Can't retrieve ClangASTContext");
+
+  auto *clang_ast_ctx =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
   if (!clang_ast_ctx)
-    return make_string_error("Can't retrieve Clang AST context.");
+    return make_string_error("Retrieved TypeSystem was not a ClangASTContext");
 
-  auto ast_ctx = clang_ast_ctx->getASTContext();
-  if (!ast_ctx)
-    return make_string_error("Can't retrieve AST context.");
+  clang::ASTContext &ast_ctx = clang_ast_ctx->getASTContext();
 
-  auto tu = ast_ctx->getTranslationUnitDecl();
+  clang::TranslationUnitDecl *tu = ast_ctx.getTranslationUnitDecl();
   if (!tu)
     return make_string_error("Can't retrieve translation unit declaration.");
 
@@ -546,10 +614,32 @@
   return Error::success();
 }
 
-Error opts::symbols::verify(lldb_private::Module &Module) {
-  SymbolVendor &plugin = *Module.GetSymbolVendor();
+Error opts::symbols::dumpClangAST(lldb_private::Module &Module) {
+  Module.ParseAllDebugSymbols();
 
-  SymbolFile *symfile = plugin.GetSymbolFile();
+  SymbolFile *symfile = Module.GetSymbolFile();
+  if (!symfile)
+    return make_string_error("Module has no symbol file.");
+
+  llvm::Expected<TypeSystem &> type_system_or_err =
+      symfile->GetTypeSystemForLanguage(eLanguageTypeObjC_plus_plus);
+  if (!type_system_or_err)
+    return make_string_error("Can't retrieve ClangASTContext");
+
+  auto *clang_ast_ctx =
+      llvm::dyn_cast_or_null<ClangASTContext>(&type_system_or_err.get());
+  if (!clang_ast_ctx)
+    return make_string_error("Retrieved TypeSystem was not a ClangASTContext");
+
+  StreamString Stream;
+  clang_ast_ctx->DumpFromSymbolFile(Stream, Name);
+  outs() << Stream.GetData() << "\n";
+
+  return Error::success();
+}
+
+Error opts::symbols::verify(lldb_private::Module &Module) {
+  SymbolFile *symfile = Module.GetSymbolFile();
   if (!symfile)
     return make_string_error("Module has no symbol file.");
 
@@ -558,11 +648,12 @@
   outs() << "Found " << comp_units_count << " compile units.\n";
 
   for (uint32_t i = 0; i < comp_units_count; i++) {
-    lldb::CompUnitSP comp_unit = symfile->ParseCompileUnitAtIndex(i);
+    lldb::CompUnitSP comp_unit = symfile->GetCompileUnitAtIndex(i);
     if (!comp_unit)
       return make_string_error("Connot parse compile unit {0}.", i);
 
-    outs() << "Processing '" << comp_unit->GetFilename().AsCString()
+    outs() << "Processing '"
+           << comp_unit->GetPrimaryFile().GetFilename().AsCString()
            << "' compile unit.\n";
 
     LineTable *lt = comp_unit->GetLineTable();
@@ -626,6 +717,16 @@
     return dumpAST;
   }
 
+  if (DumpClangAST) {
+    if (Find != FindType::None)
+      return make_string_error("Cannot both search and dump clang AST.");
+    if (Regex || !Context.empty() || !File.empty() || Line != 0)
+      return make_string_error(
+          "-regex, -context, -name, -file and -line options are not "
+          "applicable for dumping clang AST.");
+    return dumpClangAST;
+  }
+
   if (Regex && !Context.empty())
     return make_string_error(
         "Cannot search using both regular expressions and context.");
@@ -676,6 +777,9 @@
     if (Regex || !File.empty() || Line != 0)
       return make_string_error("Cannot search for types using regular "
                                "expressions, file names or line numbers.");
+    if (!Name.empty() && !CompilerContext.empty())
+      return make_string_error("Name is ignored if compiler context present.");
+
     return findTypes;
 
   case FindType::Variable:
@@ -702,8 +806,8 @@
   Spec.GetSymbolFileSpec().SetFile(Symbols, FileSpec::Style::native);
 
   auto ModulePtr = std::make_shared<lldb_private::Module>(Spec);
-  SymbolVendor *Vendor = ModulePtr->GetSymbolVendor();
-  if (!Vendor) {
+  SymbolFile *Symfile = ModulePtr->GetSymbolFile();
+  if (!Symfile) {
     WithColor::error() << "Module has no symbol vendor.\n";
     return 1;
   }
@@ -769,7 +873,7 @@
 
     // Fetch symbol vendor before we get the section list to give the symbol
     // vendor a chance to populate it.
-    ModulePtr->GetSymbolVendor();
+    ModulePtr->GetSymbolFile();
     SectionList *Sections = ModulePtr->GetSectionList();
     if (!Sections) {
       llvm::errs() << "Could not load sections for module " << File << "\n";
@@ -966,16 +1070,21 @@
 
   SystemLifetimeManager DebuggerLifetime;
   if (auto e = DebuggerLifetime.Initialize(
-          llvm::make_unique<SystemInitializerTest>(), nullptr)) {
+          std::make_unique<SystemInitializerTest>(), nullptr)) {
     WithColor::error() << "initialization failed: " << toString(std::move(e))
                        << '\n';
     return 1;
   }
 
-  CleanUp TerminateDebugger([&] { DebuggerLifetime.Terminate(); });
+  auto TerminateDebugger =
+      llvm::make_scope_exit([&] { DebuggerLifetime.Terminate(); });
 
   auto Dbg = lldb_private::Debugger::CreateInstance();
   ModuleList::GetGlobalModuleListProperties().SetEnableExternalLookup(false);
+  CommandReturnObject Result;
+  Dbg->GetCommandInterpreter().HandleCommand(
+      "settings set plugin.process.gdb-remote.packet-timeout 60",
+      /*add_to_history*/ eLazyBoolNo, Result);
 
   if (!opts::Log.empty())
     Dbg->EnableLog("lldb", {"all"}, opts::Log, 0, errs());
diff --git a/src/llvm-project/lldb/tools/lldb-vscode/CMakeLists.txt b/src/llvm-project/lldb/tools/lldb-vscode/CMakeLists.txt
index a39a27d7..b527add 100644
--- a/src/llvm-project/lldb/tools/lldb-vscode/CMakeLists.txt
+++ b/src/llvm-project/lldb/tools/lldb-vscode/CMakeLists.txt
@@ -7,6 +7,16 @@
   list(APPEND extra_libs pthread)
 endif ()
 
+
+if(APPLE)
+  configure_file(
+    ${CMAKE_CURRENT_SOURCE_DIR}/lldb-vscode-Info.plist.in
+    ${CMAKE_CURRENT_BINARY_DIR}/lldb-vscode-Info.plist
+    )
+  # Inline info plist in binary (use target_link_options for this as soon as CMake 3.13 is available)
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/lldb-vscode-Info.plist")
+endif()
+
 # We need to include the llvm components we depend on manually, as liblldb does
 # not re-export those.
 set(LLVM_LINK_COMPONENTS Support)
@@ -33,10 +43,9 @@
 if(LLDB_BUILD_FRAMEWORK)
   # In the build-tree, we know the exact path to the framework directory.
   # The installed framework can be in different locations.
-  get_target_property(framework_build_dir liblldb LIBRARY_OUTPUT_DIRECTORY)
   lldb_setup_rpaths(lldb-vscode
     BUILD_RPATH
-      "${framework_build_dir}"
+      "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}"
     INSTALL_RPATH
       "@loader_path/../../../SharedFrameworks"
       "@loader_path/../../System/Library/PrivateFrameworks"
diff --git a/src/llvm-project/lldb/tools/lldb-vscode/LLDBUtils.h b/src/llvm-project/lldb/tools/lldb-vscode/LLDBUtils.h
index 4e0da17..82c17eb 100644
--- a/src/llvm-project/lldb/tools/lldb-vscode/LLDBUtils.h
+++ b/src/llvm-project/lldb/tools/lldb-vscode/LLDBUtils.h
@@ -113,8 +113,8 @@
 /// breakpoint ID in the lower BREAKPOINT_ID_SHIFT bits and the
 /// breakpoint location ID in the upper BREAKPOINT_ID_SHIFT bits.
 ///
-/// \param[in] frame
-///     The LLDB stack frame object generate the ID for
+/// \param[in] bp_loc
+///     The LLDB break point location.
 ///
 /// \return
 ///     A unique integer that allows us to easily find the right
diff --git a/src/llvm-project/lldb/tools/lldb-vscode/VSCode.cpp b/src/llvm-project/lldb/tools/lldb-vscode/VSCode.cpp
index 3b314a2..2f85627 100644
--- a/src/llvm-project/lldb/tools/lldb-vscode/VSCode.cpp
+++ b/src/llvm-project/lldb/tools/lldb-vscode/VSCode.cpp
@@ -16,7 +16,7 @@
 
 #if defined(_WIN32)
 #define NOMINMAX
-#include <Windows.h>
+#include <windows.h>
 #include <fcntl.h>
 #include <io.h>
 #endif
@@ -44,8 +44,11 @@
 // Windows opens stdout and stdin in text mode which converts \n to 13,10
 // while the value is just 10 on Darwin/Linux. Setting the file mode to binary
 // fixes this.
-  assert(_setmode(fileno(stdout), _O_BINARY));
-  assert(_setmode(fileno(stdin), _O_BINARY));
+  int result = _setmode(fileno(stdout), _O_BINARY);
+  assert(result);
+  result = _setmode(fileno(stdin), _O_BINARY);
+  (void)result;
+  assert(result);
 #endif
   if (log_file_path)
     log.reset(new std::ofstream(log_file_path));
@@ -301,4 +304,3 @@
 }
 
 } // namespace lldb_vscode
-
diff --git a/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode-Info.plist b/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode-Info.plist
deleted file mode 100644
index a6b8243..0000000
--- a/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode-Info.plist
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleIdentifier</key>
-	<string>com.apple.lldb-vscode</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<string>lldb-vscode</string>
-	<key>CFBundleVersion</key>
-	<string>360.99.0</string>
-	<key>SecTaskAccess</key>
-	<array>
-		<string>allowed</string>
-		<string>debug</string>
-	</array>
-</dict>
-</plist>
diff --git a/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode-Info.plist.in b/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode-Info.plist.in
new file mode 100644
index 0000000..2098e19
--- /dev/null
+++ b/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode-Info.plist.in
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.apple.lldb-vscode</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>lldb-vscode</string>
+	<key>CFBundleVersion</key>
+	<string>${LLDB_VERSION}</string>
+	<key>SecTaskAccess</key>
+	<array>
+		<string>allowed</string>
+		<string>debug</string>
+	</array>
+</dict>
+</plist>
diff --git a/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode.cpp b/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode.cpp
index d5b5123..6d638a6 100644
--- a/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode.cpp
+++ b/src/llvm-project/lldb/tools/lldb-vscode/lldb-vscode.cpp
@@ -50,7 +50,9 @@
 #include "VSCode.h"
 
 #if defined(_WIN32)
+#ifndef PATH_MAX
 #define PATH_MAX MAX_PATH
+#endif
 typedef int socklen_t;
 constexpr const char *dev_null_path = "nul";
 
@@ -91,8 +93,9 @@
     } else {
       listen(sockfd, 5);
       socklen_t clilen = sizeof(cli_addr);
-      newsockfd = llvm::sys::RetryAfterSignal(-1, accept,
-          sockfd, (struct sockaddr *)&cli_addr, &clilen);
+      newsockfd =
+          llvm::sys::RetryAfterSignal(static_cast<SOCKET>(-1), accept, sockfd,
+                                      (struct sockaddr *)&cli_addr, &clilen);
       if (newsockfd < 0)
         if (g_vsc.log)
           *g_vsc.log << "error: accept (" << strerror(errno) << ")"
@@ -433,7 +436,7 @@
       }
       auto mapFrom = GetAsString((*mapping)[0]);
       auto mapTo = GetAsString((*mapping)[1]);
-      strm << "\"" << mapFrom << "\" \"" << mapTo << "\"";
+      strm << "\"" << mapFrom << "\" \"" << mapTo << "\" ";
     }
   } else {
     if (ObjectContainsKey(arguments, "sourceMap")) {
@@ -818,6 +821,152 @@
   g_vsc.SendJSON(llvm::json::Value(std::move(response)));
 }
 
+// "CompletionsRequest": {
+//   "allOf": [ { "$ref": "#/definitions/Request" }, {
+//     "type": "object",
+//     "description": "Returns a list of possible completions for a given caret position and text.\nThe CompletionsRequest may only be called if the 'supportsCompletionsRequest' capability exists and is true.",
+//     "properties": {
+//       "command": {
+//         "type": "string",
+//         "enum": [ "completions" ]
+//       },
+//       "arguments": {
+//         "$ref": "#/definitions/CompletionsArguments"
+//       }
+//     },
+//     "required": [ "command", "arguments"  ]
+//   }]
+// },
+// "CompletionsArguments": {
+//   "type": "object",
+//   "description": "Arguments for 'completions' request.",
+//   "properties": {
+//     "frameId": {
+//       "type": "integer",
+//       "description": "Returns completions in the scope of this stack frame. If not specified, the completions are returned for the global scope."
+//     },
+//     "text": {
+//       "type": "string",
+//       "description": "One or more source lines. Typically this is the text a user has typed into the debug console before he asked for completion."
+//     },
+//     "column": {
+//       "type": "integer",
+//       "description": "The character position for which to determine the completion proposals."
+//     },
+//     "line": {
+//       "type": "integer",
+//       "description": "An optional line for which to determine the completion proposals. If missing the first line of the text is assumed."
+//     }
+//   },
+//   "required": [ "text", "column" ]
+// },
+// "CompletionsResponse": {
+//   "allOf": [ { "$ref": "#/definitions/Response" }, {
+//     "type": "object",
+//     "description": "Response to 'completions' request.",
+//     "properties": {
+//       "body": {
+//         "type": "object",
+//         "properties": {
+//           "targets": {
+//             "type": "array",
+//             "items": {
+//               "$ref": "#/definitions/CompletionItem"
+//             },
+//             "description": "The possible completions for ."
+//           }
+//         },
+//         "required": [ "targets" ]
+//       }
+//     },
+//     "required": [ "body" ]
+//   }]
+// },
+// "CompletionItem": {
+//   "type": "object",
+//   "description": "CompletionItems are the suggestions returned from the CompletionsRequest.",
+//   "properties": {
+//     "label": {
+//       "type": "string",
+//       "description": "The label of this completion item. By default this is also the text that is inserted when selecting this completion."
+//     },
+//     "text": {
+//       "type": "string",
+//       "description": "If text is not falsy then it is inserted instead of the label."
+//     },
+//     "sortText": {
+//       "type": "string",
+//       "description": "A string that should be used when comparing this item with other items. When `falsy` the label is used."
+//     },
+//     "type": {
+//       "$ref": "#/definitions/CompletionItemType",
+//       "description": "The item's type. Typically the client uses this information to render the item in the UI with an icon."
+//     },
+//     "start": {
+//       "type": "integer",
+//       "description": "This value determines the location (in the CompletionsRequest's 'text' attribute) where the completion text is added.\nIf missing the text is added at the location specified by the CompletionsRequest's 'column' attribute."
+//     },
+//     "length": {
+//       "type": "integer",
+//       "description": "This value determines how many characters are overwritten by the completion text.\nIf missing the value 0 is assumed which results in the completion text being inserted."
+//     }
+//   },
+//   "required": [ "label" ]
+// },
+// "CompletionItemType": {
+//   "type": "string",
+//   "description": "Some predefined types for the CompletionItem. Please note that not all clients have specific icons for all of them.",
+//   "enum": [ "method", "function", "constructor", "field", "variable", "class", "interface", "module", "property", "unit", "value", "enum", "keyword", "snippet", "text", "color", "file", "reference", "customcolor" ]
+// }
+void request_completions(const llvm::json::Object &request) {
+  llvm::json::Object response;
+  FillResponse(request, response);
+  llvm::json::Object body;
+  auto arguments = request.getObject("arguments");
+  std::string text = GetString(arguments, "text");
+  auto original_column = GetSigned(arguments, "column", text.size());
+  auto actual_column = original_column - 1;
+  llvm::json::Array targets;
+  // NOTE: the 'line' argument is not needed, as multiline expressions
+  // work well already
+  // TODO: support frameID. Currently
+  // g_vsc.debugger.GetCommandInterpreter().HandleCompletionWithDescriptions
+  // is frame-unaware.
+
+  if (!text.empty() && text[0] == '`') {
+    text = text.substr(1);
+    actual_column--;
+  } else {
+    text = "p " + text;
+    actual_column += 2;
+  }
+  lldb::SBStringList matches;
+  lldb::SBStringList descriptions;
+  g_vsc.debugger.GetCommandInterpreter().HandleCompletionWithDescriptions(
+    text.c_str(),
+    actual_column,
+    0, -1, matches, descriptions);
+  size_t count = std::min((uint32_t)50, matches.GetSize());
+  targets.reserve(count);
+  for (size_t i = 0; i < count; i++) {
+    std::string match = matches.GetStringAtIndex(i);
+    std::string description = descriptions.GetStringAtIndex(i);
+
+    llvm::json::Object item;
+    EmplaceSafeString(item, "text", match);
+    if (description.empty())
+      EmplaceSafeString(item, "label", match);
+    else
+      EmplaceSafeString(item, "label", match + " -- " + description);
+
+    targets.emplace_back(std::move(item));
+  }
+
+  body.try_emplace("targets", std::move(targets));
+  response.try_emplace("body", std::move(body));
+  g_vsc.SendJSON(llvm::json::Value(std::move(response)));
+}
+
 //  "EvaluateRequest": {
 //    "allOf": [ { "$ref": "#/definitions/Request" }, {
 //      "type": "object",
@@ -1104,7 +1253,7 @@
   // The debug adapter supports the stepInTargetsRequest.
   body.try_emplace("supportsStepInTargetsRequest", false);
   // The debug adapter supports the completionsRequest.
-  body.try_emplace("supportsCompletionsRequest", false);
+  body.try_emplace("supportsCompletionsRequest", true);
   // The debug adapter supports the modules request.
   body.try_emplace("supportsModulesRequest", false);
   // The set of additional module information exposed by the debug adapter.
@@ -1180,6 +1329,7 @@
   g_vsc.pre_run_commands = GetStrings(arguments, "preRunCommands");
   g_vsc.stop_commands = GetStrings(arguments, "stopCommands");
   g_vsc.exit_commands = GetStrings(arguments, "exitCommands");
+  auto launchCommands = GetStrings(arguments, "launchCommands");
   g_vsc.stop_at_entry = GetBoolean(arguments, "stopOnEntry", false);
   const auto debuggerRoot = GetString(arguments, "debuggerRoot");
 
@@ -1252,11 +1402,19 @@
 
   // Run any pre run LLDB commands the user specified in the launch.json
   g_vsc.RunPreRunCommands();
+  if (launchCommands.empty()) {
+    // Disable async events so the launch will be successful when we return from
+    // the launch call and the launch will happen synchronously
+    g_vsc.debugger.SetAsync(false);
+    g_vsc.target.Launch(g_vsc.launch_info, error);
+    g_vsc.debugger.SetAsync(true);
+  } else {
+    g_vsc.RunLLDBCommands("Running launchCommands:", launchCommands);
+    // The custom commands might have created a new target so we should use the
+    // selected target after these commands are run.
+    g_vsc.target = g_vsc.debugger.GetSelectedTarget();
+  }
 
-  // Disable async events so the launch will be successful when we return from
-  // the launch call and the launch will happen synchronously
-  g_vsc.debugger.SetAsync(false);
-  g_vsc.target.Launch(g_vsc.launch_info, error);
   if (error.Fail()) {
     response["success"] = llvm::json::Value(false);
     EmplaceSafeString(response, "message", std::string(error.GetCString()));
@@ -1266,7 +1424,7 @@
   SendProcessEvent(Launch);
   g_vsc.SendJSON(llvm::json::Value(CreateEventObject("initialized")));
   // Reenable async events and start the event thread to catch async events.
-  g_vsc.debugger.SetAsync(true);
+  // g_vsc.debugger.SetAsync(true);
 }
 
 // "NextRequest": {
@@ -2008,6 +2166,8 @@
         break;
       stackFrames.emplace_back(CreateStackFrame(frame));
     }
+    const auto totalFrames = thread.GetNumFrames();
+    body.try_emplace("totalFrames", totalFrames);
   }
   body.try_emplace("stackFrames", std::move(stackFrames));
   response.try_emplace("body", std::move(body));
@@ -2544,6 +2704,7 @@
   static std::map<std::string, RequestCallback> g_request_handlers = {
       // VSCode Debug Adaptor requests
       REQUEST_CALLBACK(attach),
+      REQUEST_CALLBACK(completions),
       REQUEST_CALLBACK(continue),
       REQUEST_CALLBACK(configurationDone),
       REQUEST_CALLBACK(disconnect),
@@ -2570,7 +2731,7 @@
 #undef REQUEST_CALLBACK
   return g_request_handlers;
 }
-  
+
 } // anonymous namespace
 
 int main(int argc, char *argv[]) {
diff --git a/src/llvm-project/lldb/unittests/CMakeLists.txt b/src/llvm-project/lldb/unittests/CMakeLists.txt
index 8e6b3e7..bf11703 100644
--- a/src/llvm-project/lldb/unittests/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/CMakeLists.txt
@@ -1,5 +1,6 @@
 add_custom_target(LLDBUnitTests)
 set_target_properties(LLDBUnitTests PROPERTIES FOLDER "lldb tests")
+add_dependencies(lldb-test-deps LLDBUnitTests)
 
 include_directories(${LLDB_SOURCE_ROOT})
 include_directories(${LLDB_PROJECT_ROOT}/unittests)
@@ -60,6 +61,7 @@
 add_subdirectory(TestingSupport)
 add_subdirectory(Breakpoint)
 add_subdirectory(Core)
+add_subdirectory(DataFormatter)
 add_subdirectory(Disassembler)
 add_subdirectory(Editline)
 add_subdirectory(Expression)
@@ -78,6 +80,6 @@
 add_subdirectory(UnwindAssembly)
 add_subdirectory(Utility)
 
-if(LLDB_CAN_USE_DEBUGSERVER AND NOT LLDB_USE_SYSTEM_DEBUGSERVER)
+if(LLDB_CAN_USE_DEBUGSERVER AND LLDB_TOOL_DEBUGSERVER_BUILD AND NOT LLDB_USE_SYSTEM_DEBUGSERVER)
   add_subdirectory(debugserver)
 endif()
diff --git a/src/llvm-project/lldb/unittests/Core/CMakeLists.txt b/src/llvm-project/lldb/unittests/Core/CMakeLists.txt
index f6c6e25..688a39d 100644
--- a/src/llvm-project/lldb/unittests/Core/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/Core/CMakeLists.txt
@@ -9,14 +9,9 @@
     lldbHost
     lldbSymbol
     lldbPluginObjectFileELF
-    lldbPluginSymbolVendorELF
+    lldbPluginSymbolFileSymtab
     lldbUtilityHelpers
     LLVMTestingSupport
   LINK_COMPONENTS
     Support
   )
-
-set(test_inputs
-  mangled-function-names.yaml
-  )
-add_unittest_inputs(LLDBCoreTests "${test_inputs}")
diff --git a/src/llvm-project/lldb/unittests/Core/Inputs/mangled-function-names.yaml b/src/llvm-project/lldb/unittests/Core/Inputs/mangled-function-names.yaml
deleted file mode 100644
index 9fb6289..0000000
--- a/src/llvm-project/lldb/unittests/Core/Inputs/mangled-function-names.yaml
+++ /dev/null
@@ -1,129 +0,0 @@
---- !ELF
-FileHeader:      
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_EXEC
-  Machine:         EM_X86_64
-Sections:        
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    AddressAlign:    0x0000000000000010
-    Content:         554889E58B0425A80000005DC30F1F00
-  - Name:            .anothertext
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Address:         0x0000000000000010
-    AddressAlign:    0x0000000000000010
-    Content:         554889E54883EC20488D0425A8000000C745FC00000000488945F0488B45F08B08894DECE8C7FFFFFF8B4DEC01C189C84883C4205D746573742073747200C3
-  - Name:            .eh_frame
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC ]
-    Address:         0x0000000000000050
-    AddressAlign:    0x0000000000000008
-    Content:         1400000000000000017A5200017810011B0C0708900100001C0000001C00000090FFFFFF0D00000000410E108602430D06000000000000001C0000003C00000080FFFFFF3F00000000410E108602430D0600000000000000
-  - Name:            .data
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_WRITE, SHF_ALLOC ]
-    Address:         0x00000000000000A8
-    AddressAlign:    0x0000000000000004
-    Content:         '01000000'
-  - Name:            .comment
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_MERGE, SHF_STRINGS ]
-    AddressAlign:    0x0000000000000001
-    Content:         5562756E747520636C616E672076657273696F6E20332E352D317562756E74753120287472756E6B2920286261736564206F6E204C4C564D20332E352900
-Symbols:
-  - Type:            STT_SECTION
-    Section:         .text
-  - Type:            STT_SECTION
-    Section:         .anothertext
-    Value:           0x0000000000000010
-  - Type:            STT_SECTION
-    Section:         .eh_frame
-    Value:           0x0000000000000050
-  - Type:            STT_SECTION
-    Section:         .data
-    Value:           0x00000000000000A8
-  - Type:            STT_SECTION
-    Section:         .comment
-  - Name:            /tmp/a.c
-    Type:            STT_FILE
-  - Type:            STT_FILE          
-  - Name:            somedata
-    Type:            STT_OBJECT
-    Section:         .anothertext
-    Value:           0x0000000000000045
-    Binding:         STB_GLOBAL
-  - Name:            main
-    Type:            STT_FUNC
-    Section:         .anothertext
-    Value:           0x0000000000000010
-    Size:            0x000000000000003F
-    Binding:         STB_GLOBAL
-  - Name:            _Z3foov
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            puts@GLIBC_2.5
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            puts@GLIBC_2.6
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            _Z5annotv@VERSION3
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            _ZN1AC2Ev
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            _ZN1AD2Ev
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            _ZN1A3barEv
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            _ZGVZN4llvm4dbgsEvE7thestrm
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            _ZZN4llvm4dbgsEvE7thestrm
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            _ZTVN5clang4DeclE
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            -[ObjCfoo]
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            +[B ObjCbar(WithCategory)]
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-  - Name:            _Z12undemangableEvx42
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x000000000000000D
-    Binding:         STB_GLOBAL
-...
diff --git a/src/llvm-project/lldb/unittests/Core/MangledTest.cpp b/src/llvm-project/lldb/unittests/Core/MangledTest.cpp
index 85d2723..ffa7b1e 100644
--- a/src/llvm-project/lldb/unittests/Core/MangledTest.cpp
+++ b/src/llvm-project/lldb/unittests/Core/MangledTest.cpp
@@ -7,7 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
-#include "Plugins/SymbolVendor/ELF/SymbolVendorELF.h"
+#include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 
 #include "lldb/Core/Mangled.h"
@@ -29,9 +30,7 @@
 
 TEST(MangledTest, ResultForValidName) {
   ConstString MangledName("_ZN1a1b1cIiiiEEvm");
-  bool IsMangled = true;
-
-  Mangled TheMangled(MangledName, IsMangled);
+  Mangled TheMangled(MangledName);
   ConstString TheDemangled =
       TheMangled.GetDemangledName(eLanguageTypeC_plus_plus);
 
@@ -39,11 +38,20 @@
   EXPECT_STREQ(ExpectedResult.GetCString(), TheDemangled.GetCString());
 }
 
+TEST(MangledTest, ResultForBlockInvocation) {
+  ConstString MangledName("___Z1fU13block_pointerFviE_block_invoke");
+  Mangled TheMangled(MangledName);
+  ConstString TheDemangled =
+      TheMangled.GetDemangledName(eLanguageTypeC_plus_plus);
+
+  ConstString ExpectedResult(
+      "invocation function for block in f(void (int) block_pointer)");
+  EXPECT_STREQ(ExpectedResult.GetCString(), TheDemangled.GetCString());
+}
+
 TEST(MangledTest, EmptyForInvalidName) {
   ConstString MangledName("_ZN1a1b1cmxktpEEvm");
-  bool IsMangled = true;
-
-  Mangled TheMangled(MangledName, IsMangled);
+  Mangled TheMangled(MangledName);
   ConstString TheDemangled =
       TheMangled.GetDemangledName(eLanguageTypeC_plus_plus);
 
@@ -51,25 +59,122 @@
 }
 
 TEST(MangledTest, NameIndexes_FindFunctionSymbols) {
-  FileSystem::Initialize();
-  HostInfo::Initialize();
-  ObjectFileELF::Initialize();
-  SymbolVendorELF::Initialize();
+  SubsystemRAII<FileSystem, HostInfo, ObjectFileELF, SymbolFileSymtab>
+      subsystems;
 
-  llvm::SmallString<128> Obj;
-  ASSERT_NO_ERROR(llvm::sys::fs::createTemporaryFile(
-      "mangled-function-names-%%%%%%", "obj", Obj));
-  llvm::FileRemover Deleter(Obj);
-  ASSERT_THAT_ERROR(ReadYAMLObjectFile("mangled-function-names.yaml", Obj),
-                    llvm::Succeeded());
+  auto ExpectedFile = TestFile::fromYaml(R"(
+--- !ELF
+FileHeader:      
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+Sections:        
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    AddressAlign:    0x0000000000000010
+    Size:            0x20
+  - Name:            .anothertext
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x0000000000000010
+    AddressAlign:    0x0000000000000010
+    Size:            0x40
+  - Name:            .data
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC ]
+    Address:         0x00000000000000A8
+    AddressAlign:    0x0000000000000004
+    Content:         '01000000'
+Symbols:
+  - Name:            somedata
+    Type:            STT_OBJECT
+    Section:         .anothertext
+    Value:           0x0000000000000045
+    Binding:         STB_GLOBAL
+  - Name:            main
+    Type:            STT_FUNC
+    Section:         .anothertext
+    Value:           0x0000000000000010
+    Size:            0x000000000000003F
+    Binding:         STB_GLOBAL
+  - Name:            _Z3foov
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            puts@GLIBC_2.5
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            puts@GLIBC_2.6
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            _Z5annotv@VERSION3
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            _ZN1AC2Ev
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            _ZN1AD2Ev
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            _ZN1A3barEv
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            _ZGVZN4llvm4dbgsEvE7thestrm
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            _ZZN4llvm4dbgsEvE7thestrm
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            _ZTVN5clang4DeclE
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            -[ObjCfoo]
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            +[B ObjCbar(WithCategory)]
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+  - Name:            _Z12undemangableEvx42
+    Type:            STT_FUNC
+    Section:         .text
+    Size:            0x000000000000000D
+    Binding:         STB_GLOBAL
+...
+)");
+  ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded());
 
-  ModuleSpec Spec{FileSpec(Obj)};
-  Spec.GetSymbolFileSpec().SetFile(Obj, FileSpec::Style::native);
+  ModuleSpec Spec{FileSpec(ExpectedFile->name())};
   auto M = std::make_shared<Module>(Spec);
 
   auto Count = [M](const char *Name, FunctionNameType Type) -> int {
     SymbolContextList SymList;
-    return M->FindFunctionSymbols(ConstString(Name), Type, SymList);
+    M->FindFunctionSymbols(ConstString(Name), Type, SymList);
+    return SymList.GetSize();
   };
 
   // Unmangled
@@ -145,9 +250,4 @@
   EXPECT_EQ(0, Count("_Z12undemangableEvx42", eFunctionNameTypeMethod));
   EXPECT_EQ(0, Count("undemangable", eFunctionNameTypeBase));
   EXPECT_EQ(0, Count("undemangable", eFunctionNameTypeMethod));
-
-  SymbolVendorELF::Terminate();
-  ObjectFileELF::Terminate();
-  HostInfo::Terminate();
-  FileSystem::Terminate();
 }
diff --git a/src/llvm-project/lldb/unittests/DataFormatter/CMakeLists.txt b/src/llvm-project/lldb/unittests/DataFormatter/CMakeLists.txt
new file mode 100644
index 0000000..fc60bff
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/DataFormatter/CMakeLists.txt
@@ -0,0 +1,13 @@
+add_lldb_unittest(LLDBFormatterTests
+  FormatManagerTests.cpp
+
+  LINK_LIBS
+    lldbCore
+    lldbInterpreter
+    lldbSymbol
+    lldbTarget
+    lldbUtility
+
+  LINK_COMPONENTS
+    Support
+  )
diff --git a/src/llvm-project/lldb/unittests/DataFormatter/FormatManagerTests.cpp b/src/llvm-project/lldb/unittests/DataFormatter/FormatManagerTests.cpp
new file mode 100644
index 0000000..acfafdb
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/DataFormatter/FormatManagerTests.cpp
@@ -0,0 +1,36 @@
+//===-- FormatManagerTests.cpp ----------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/DataFormatters/FormatManager.h"
+
+#include "gtest/gtest.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+TEST(FormatManagerTests, CompatibleLangs) {
+  std::vector<LanguageType> candidates = {eLanguageTypeC_plus_plus,
+                                          eLanguageTypeObjC};
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC), candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC89), candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC99), candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC11), candidates);
+
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus),
+            candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_03),
+            candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_11),
+            candidates);
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeC_plus_plus_14),
+            candidates);
+
+  candidates = {eLanguageTypeObjC};
+  EXPECT_EQ(FormatManager::GetCandidateLanguages(eLanguageTypeObjC),
+            candidates);
+}
diff --git a/src/llvm-project/lldb/unittests/Editline/EditlineTest.cpp b/src/llvm-project/lldb/unittests/Editline/EditlineTest.cpp
index eeaa0a3..41f8e47 100644
--- a/src/llvm-project/lldb/unittests/Editline/EditlineTest.cpp
+++ b/src/llvm-project/lldb/unittests/Editline/EditlineTest.cpp
@@ -6,7 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLDB_DISABLE_LIBEDIT
+#include "lldb/Host/Config.h"
+
+#if LLDB_ENABLE_LIBEDIT
 
 #define EDITLINE_TEST_DUMP_OUTPUT 0
 
@@ -18,6 +20,7 @@
 #include <memory>
 #include <thread>
 
+#include "TestingSupport/SubsystemRAII.h"
 #include "lldb/Host/Editline.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Pipe.h"
@@ -196,8 +199,8 @@
   int start_block_count = 0;
   int brace_balance = 0;
 
-  for (size_t i = 0; i < lines.GetSize(); ++i) {
-    for (auto ch : lines[i]) {
+  for (const std::string &line : lines) {
+    for (auto ch : line) {
       if (ch == '{') {
         ++start_block_count;
         ++brace_balance;
@@ -240,7 +243,7 @@
 }
 
 class EditlineTestFixture : public ::testing::Test {
-private:
+  SubsystemRAII<FileSystem> subsystems;
   EditlineAdapter _el_adapter;
   std::shared_ptr<std::thread> _sp_output_thread;
 
@@ -251,8 +254,6 @@
   }
 
   void SetUp() override {
-    FileSystem::Initialize();
-
     // Validate the editline adapter.
     EXPECT_TRUE(_el_adapter.IsValid());
     if (!_el_adapter.IsValid())
@@ -267,8 +268,6 @@
     _el_adapter.CloseInput();
     if (_sp_output_thread)
       _sp_output_thread->join();
-
-    FileSystem::Terminate();
   }
 
   EditlineAdapter &GetEditlineAdapter() { return _el_adapter; }
@@ -312,8 +311,8 @@
   // Without any auto indentation support, our output should directly match our
   // input.
   std::vector<std::string> reported_lines;
-  for (size_t i = 0; i < el_reported_lines.GetSize(); ++i)
-    reported_lines.push_back(el_reported_lines[i]);
+  for (const std::string &line : el_reported_lines)
+    reported_lines.push_back(line);
 
   EXPECT_THAT(reported_lines, testing::ContainerEq(input_lines));
 }
diff --git a/src/llvm-project/lldb/unittests/Expression/CMakeLists.txt b/src/llvm-project/lldb/unittests/Expression/CMakeLists.txt
index fbb314b..25e94f4 100644
--- a/src/llvm-project/lldb/unittests/Expression/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/Expression/CMakeLists.txt
@@ -1,6 +1,9 @@
 add_lldb_unittest(ExpressionTests
-  DWARFExpressionTest.cpp
   ClangParserTest.cpp
+  ClangExpressionDeclMapTest.cpp
+  DiagnosticManagerTest.cpp
+  DWARFExpressionTest.cpp
+  CppModuleConfigurationTest.cpp
 
   LINK_LIBS
     lldbCore
diff --git a/src/llvm-project/lldb/unittests/Expression/ClangExpressionDeclMapTest.cpp b/src/llvm-project/lldb/unittests/Expression/ClangExpressionDeclMapTest.cpp
new file mode 100644
index 0000000..582aed0
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/Expression/ClangExpressionDeclMapTest.cpp
@@ -0,0 +1,123 @@
+//===-- ClangExpressionDeclMapTest.cpp ------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h"
+#include "TestingSupport/SubsystemRAII.h"
+#include "TestingSupport/Symbol/ClangTestUtils.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/ClangUtil.h"
+#include "lldb/lldb-defines.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+using namespace lldb;
+
+namespace {
+struct FakeClangExpressionDeclMap : public ClangExpressionDeclMap {
+  FakeClangExpressionDeclMap(const ClangASTImporterSP &importer)
+      : ClangExpressionDeclMap(false, nullptr, lldb::TargetSP(), importer,
+                               nullptr) {
+    m_scratch_context = clang_utils::createAST();
+  }
+  std::unique_ptr<ClangASTContext> m_scratch_context;
+  /// Adds a persistent decl that can be found by the ClangExpressionDeclMap
+  /// via GetPersistentDecl.
+  void AddPersistentDeclForTest(clang::NamedDecl *d) {
+    // The declaration needs to have '$' prefix in its name like every
+    // persistent declaration and must be inside the scratch AST context.
+    assert(d);
+    assert(d->getName().startswith("$"));
+    assert(&d->getASTContext() == &m_scratch_context->getASTContext());
+    m_persistent_decls[d->getName()] = d;
+  }
+
+protected:
+  // ClangExpressionDeclMap hooks.
+
+  clang::NamedDecl *GetPersistentDecl(ConstString name) override {
+    // ClangExpressionDeclMap wants to know if there is a persistent decl
+    // with the given name. Check the
+    return m_persistent_decls.lookup(name.GetStringRef());
+  }
+
+private:
+  /// The persistent decls in this test with their names as keys.
+  llvm::DenseMap<llvm::StringRef, clang::NamedDecl *> m_persistent_decls;
+};
+} // namespace
+
+namespace {
+struct ClangExpressionDeclMapTest : public testing::Test {
+  SubsystemRAII<FileSystem, HostInfo> subsystems;
+
+  /// The ClangASTImporter used during the test.
+  ClangASTImporterSP importer;
+  /// The ExpressionDeclMap for the current test case.
+  std::unique_ptr<FakeClangExpressionDeclMap> decl_map;
+
+  /// The target AST that lookup results should be imported to.
+  std::unique_ptr<ClangASTContext> target_ast;
+
+  void SetUp() override {
+    importer = std::make_shared<ClangASTImporter>();
+    decl_map = std::make_unique<FakeClangExpressionDeclMap>(importer);
+    target_ast = clang_utils::createAST();
+    decl_map->InstallASTContext(*target_ast);
+  }
+
+  void TearDown() override {
+    importer.reset();
+    decl_map.reset();
+    target_ast.reset();
+  }
+};
+} // namespace
+
+TEST_F(ClangExpressionDeclMapTest, TestUnknownIdentifierLookup) {
+  // Tests looking up an identifier that can't be found anywhere.
+
+  // Setup a NameSearchContext for 'foo'.
+  llvm::SmallVector<clang::NamedDecl *, 16> decls;
+  clang::DeclarationName name =
+      clang_utils::getDeclarationName(*target_ast, "foo");
+  const clang::DeclContext *dc = target_ast->GetTranslationUnitDecl();
+  NameSearchContext search(*decl_map, decls, name, dc);
+
+  decl_map->FindExternalVisibleDecls(search);
+
+  // This shouldn't exist so we should get no lookups.
+  EXPECT_EQ(0U, decls.size());
+}
+
+TEST_F(ClangExpressionDeclMapTest, TestPersistentDeclLookup) {
+  // Tests looking up a persistent decl from the scratch AST context.
+
+  // Create a '$persistent_class' record and add it as a persistent variable
+  // to the scratch AST context.
+  llvm::StringRef decl_name = "$persistent_class";
+  CompilerType persistent_type =
+      clang_utils::createRecord(*decl_map->m_scratch_context, decl_name);
+  decl_map->AddPersistentDeclForTest(ClangUtil::GetAsTagDecl(persistent_type));
+
+  // Setup a NameSearchContext for $persistent_class;
+  llvm::SmallVector<clang::NamedDecl *, 16> decls;
+  clang::DeclarationName name =
+      clang_utils::getDeclarationName(*target_ast, decl_name);
+  const clang::DeclContext *dc = target_ast->GetTranslationUnitDecl();
+  NameSearchContext search(*decl_map, decls, name, dc);
+
+  // Search and check that we found $persistent_class.
+  decl_map->FindExternalVisibleDecls(search);
+  EXPECT_EQ(1U, decls.size());
+  EXPECT_EQ(decl_name, decls.front()->getQualifiedNameAsString());
+  auto *record = llvm::cast<clang::RecordDecl>(decls.front());
+  // The class was minimally imported from the scratch AST context.
+  EXPECT_TRUE(record->hasExternalLexicalStorage());
+}
diff --git a/src/llvm-project/lldb/unittests/Expression/ClangParserTest.cpp b/src/llvm-project/lldb/unittests/Expression/ClangParserTest.cpp
index bc3bb89..ade0f53 100644
--- a/src/llvm-project/lldb/unittests/Expression/ClangParserTest.cpp
+++ b/src/llvm-project/lldb/unittests/Expression/ClangParserTest.cpp
@@ -9,6 +9,7 @@
 #include "clang/Basic/Version.h"
 
 #include "Plugins/ExpressionParser/Clang/ClangHost.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
@@ -20,14 +21,7 @@
 
 namespace {
 struct ClangHostTest : public testing::Test {
-  static void SetUpTestCase() {
-    FileSystem::Initialize();
-    HostInfo::Initialize();
-  }
-  static void TearDownTestCase() {
-    HostInfo::Terminate();
-    FileSystem::Terminate();
-  }
+  SubsystemRAII<FileSystem, HostInfo> subsystems;
 };
 } // namespace
 
diff --git a/src/llvm-project/lldb/unittests/Expression/CppModuleConfigurationTest.cpp b/src/llvm-project/lldb/unittests/Expression/CppModuleConfigurationTest.cpp
new file mode 100644
index 0000000..7ef66f6
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/Expression/CppModuleConfigurationTest.cpp
@@ -0,0 +1,160 @@
+//===-- CppModuleConfigurationTest.cpp ---------------------------*- C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Plugins/ExpressionParser/Clang/CppModuleConfiguration.h"
+#include "Plugins/ExpressionParser/Clang/ClangHost.h"
+#include "TestingSupport/SubsystemRAII.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
+
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+
+namespace {
+struct CppModuleConfigurationTest : public testing::Test {
+  SubsystemRAII<FileSystem, HostInfo> subsystems;
+};
+} // namespace
+
+/// Returns the Clang resource include directory.
+static std::string ResourceInc() {
+  llvm::SmallString<256> resource_dir;
+  llvm::sys::path::append(resource_dir, GetClangResourceDir().GetPath(),
+                          "include");
+  return resource_dir.str().str();
+}
+
+/// Utility function turningn a list of paths into a FileSpecList.
+static FileSpecList makeFiles(llvm::ArrayRef<std::string> paths) {
+  FileSpecList result;
+  for (const std::string &path : paths)
+    result.Append(FileSpec(path, FileSpec::Style::posix));
+  return result;
+}
+
+TEST_F(CppModuleConfigurationTest, Linux) {
+  // Test the average Linux configuration.
+  std::string libcpp = "/usr/include/c++/v1";
+  std::string usr = "/usr/include";
+  CppModuleConfiguration config(
+      makeFiles({usr + "/bits/types.h", libcpp + "/vector"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std"));
+  EXPECT_THAT(config.GetIncludeDirs(),
+              testing::ElementsAre(libcpp, ResourceInc(), usr));
+}
+
+TEST_F(CppModuleConfigurationTest, Sysroot) {
+  // Test that having a sysroot for the whole system works fine.
+  std::string libcpp = "/home/user/sysroot/usr/include/c++/v1";
+  std::string usr = "/home/user/sysroot/usr/include";
+  CppModuleConfiguration config(
+      makeFiles({usr + "/bits/types.h", libcpp + "/vector"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std"));
+  EXPECT_THAT(config.GetIncludeDirs(),
+              testing::ElementsAre(libcpp, ResourceInc(), usr));
+}
+
+TEST_F(CppModuleConfigurationTest, LinuxLocalLibCpp) {
+  // Test that a locally build libc++ is detected.
+  std::string libcpp = "/home/user/llvm-build/include/c++/v1";
+  std::string usr = "/usr/include";
+  CppModuleConfiguration config(
+      makeFiles({usr + "/bits/types.h", libcpp + "/vector"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std"));
+  EXPECT_THAT(config.GetIncludeDirs(),
+              testing::ElementsAre(libcpp, ResourceInc(), usr));
+}
+
+TEST_F(CppModuleConfigurationTest, UnrelatedLibrary) {
+  // Test that having an unrelated library in /usr/include doesn't break.
+  std::string libcpp = "/home/user/llvm-build/include/c++/v1";
+  std::string usr = "/usr/include";
+  CppModuleConfiguration config(makeFiles(
+      {usr + "/bits/types.h", libcpp + "/vector", usr + "/boost/vector"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std"));
+  EXPECT_THAT(config.GetIncludeDirs(),
+              testing::ElementsAre(libcpp, ResourceInc(), usr));
+}
+
+TEST_F(CppModuleConfigurationTest, Xcode) {
+  // Test detection of libc++ coming from Xcode with generic platform names.
+  std::string p = "/Applications/Xcode.app/Contents/Developer/";
+  std::string libcpp = p + "Toolchains/B.xctoolchain/usr/include/c++/v1";
+  std::string usr =
+      p + "Platforms/A.platform/Developer/SDKs/OSVers.sdk/usr/include";
+  CppModuleConfiguration config(
+      makeFiles({libcpp + "/unordered_map", usr + "/stdio.h"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std"));
+  EXPECT_THAT(config.GetIncludeDirs(),
+              testing::ElementsAre(libcpp, ResourceInc(), usr));
+}
+
+TEST_F(CppModuleConfigurationTest, LibCppV2) {
+  // Test that a "v2" of libc++ is still correctly detected.
+  CppModuleConfiguration config(
+      makeFiles({"/usr/include/bits/types.h", "/usr/include/c++/v2/vector"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std"));
+  EXPECT_THAT(config.GetIncludeDirs(),
+              testing::ElementsAre("/usr/include/c++/v2", ResourceInc(),
+                                   "/usr/include"));
+}
+
+TEST_F(CppModuleConfigurationTest, UnknownLibCppFile) {
+  // Test that having some unknown file in the libc++ path doesn't break
+  // anything.
+  CppModuleConfiguration config(makeFiles(
+      {"/usr/include/bits/types.h", "/usr/include/c++/v1/non_existing_file"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre("std"));
+  EXPECT_THAT(config.GetIncludeDirs(),
+              testing::ElementsAre("/usr/include/c++/v1", ResourceInc(),
+                                   "/usr/include"));
+}
+
+TEST_F(CppModuleConfigurationTest, MissingUsrInclude) {
+  // Test that we don't load 'std' if we can't find the C standard library.
+  CppModuleConfiguration config(makeFiles({"/usr/include/c++/v1/vector"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre());
+  EXPECT_THAT(config.GetIncludeDirs(), testing::ElementsAre());
+}
+
+TEST_F(CppModuleConfigurationTest, MissingLibCpp) {
+  // Test that we don't load 'std' if we don't have a libc++.
+  CppModuleConfiguration config(makeFiles({"/usr/include/bits/types.h"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre());
+  EXPECT_THAT(config.GetIncludeDirs(), testing::ElementsAre());
+}
+
+TEST_F(CppModuleConfigurationTest, IgnoreLibStdCpp) {
+  // Test that we don't do anything bad when we encounter libstdc++ paths.
+  CppModuleConfiguration config(makeFiles(
+      {"/usr/include/bits/types.h", "/usr/include/c++/8.0.1/vector"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre());
+  EXPECT_THAT(config.GetIncludeDirs(), testing::ElementsAre());
+}
+
+TEST_F(CppModuleConfigurationTest, AmbiguousCLib) {
+  // Test that we don't do anything when we are not sure where the
+  // right C standard library is.
+  CppModuleConfiguration config(
+      makeFiles({"/usr/include/bits/types.h", "/usr/include/c++/v1/vector",
+                 "/sysroot/usr/include/bits/types.h"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre());
+  EXPECT_THAT(config.GetIncludeDirs(), testing::ElementsAre());
+}
+
+TEST_F(CppModuleConfigurationTest, AmbiguousLibCpp) {
+  // Test that we don't do anything when we are not sure where the
+  // right libc++ is.
+  CppModuleConfiguration config(
+      makeFiles({"/usr/include/bits/types.h", "/usr/include/c++/v1/vector",
+                 "/usr/include/c++/v2/vector"}));
+  EXPECT_THAT(config.GetImportedModules(), testing::ElementsAre());
+  EXPECT_THAT(config.GetIncludeDirs(), testing::ElementsAre());
+}
diff --git a/src/llvm-project/lldb/unittests/Expression/DWARFExpressionTest.cpp b/src/llvm-project/lldb/unittests/Expression/DWARFExpressionTest.cpp
index 6ce7ce8..4587615 100644
--- a/src/llvm-project/lldb/unittests/Expression/DWARFExpressionTest.cpp
+++ b/src/llvm-project/lldb/unittests/Expression/DWARFExpressionTest.cpp
@@ -7,29 +7,207 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Expression/DWARFExpression.h"
+#include "../../source/Plugins/SymbolFile/DWARF/DWARFUnit.h"
+#include "../../source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
+#include "TestingSupport/SubsystemRAII.h"
+#include "lldb/Core/Module.h"
+#include "lldb/Core/Section.h"
 #include "lldb/Core/Value.h"
 #include "lldb/Core/dwarf.h"
+#include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/StreamString.h"
 #include "llvm/ADT/StringExtras.h"
+#include "llvm/ObjectYAML/DWARFEmitter.h"
 #include "llvm/Testing/Support/Error.h"
 #include "gtest/gtest.h"
 
 using namespace lldb_private;
 
-static llvm::Expected<Scalar> Evaluate(llvm::ArrayRef<uint8_t> expr) {
+static llvm::Expected<Scalar> Evaluate(llvm::ArrayRef<uint8_t> expr,
+                                       lldb::ModuleSP module_sp = {},
+                                       DWARFUnit *unit = nullptr) {
   DataExtractor extractor(expr.data(), expr.size(), lldb::eByteOrderLittle,
                           /*addr_size*/ 4);
-
   Value result;
   Status status;
   if (!DWARFExpression::Evaluate(
-          /*exe_ctx*/ nullptr, /*reg_ctx*/ nullptr, /*opcode_ctx*/ nullptr,
-          extractor, /*dwarf_cu*/ nullptr, /*offset*/ 0, expr.size(),
-          lldb::eRegisterKindLLDB, /*initial_value_ptr*/ nullptr,
+          /*exe_ctx*/ nullptr, /*reg_ctx*/ nullptr, module_sp, extractor, unit,
+          lldb::eRegisterKindLLDB,
+          /*initial_value_ptr*/ nullptr,
           /*object_address_ptr*/ nullptr, result, &status))
     return status.ToError();
 
-  return result.GetScalar();
+  switch (result.GetValueType()) {
+  case Value::eValueTypeScalar:
+    return result.GetScalar();
+  case Value::eValueTypeHostAddress: {
+    // Convert small buffers to scalars to simplify the tests.
+    DataBufferHeap &buf = result.GetBuffer();
+    if (buf.GetByteSize() <= 8) {
+      uint64_t val = 0;
+      memcpy(&val, buf.GetBytes(), buf.GetByteSize());
+      return Scalar(llvm::APInt(buf.GetByteSize()*8, val, false));
+    }
+  }
+    LLVM_FALLTHROUGH;
+  default:
+    return status.ToError();
+  }
+}
+
+/// A mock module holding an object file parsed from YAML.
+class YAMLModule : public lldb_private::Module {
+public:
+  YAMLModule(ArchSpec &arch) : Module(FileSpec("test"), arch) {}
+  void SetObjectFile(lldb::ObjectFileSP obj_file) { m_objfile_sp = obj_file; }
+  ObjectFile *GetObjectFile() override { return m_objfile_sp.get(); }
+};
+
+/// A mock object file that can be parsed from YAML.
+class YAMLObjectFile : public lldb_private::ObjectFile {
+  const lldb::ModuleSP m_module_sp;
+  llvm::StringMap<std::unique_ptr<llvm::MemoryBuffer>> &m_section_map;
+  /// Because there is only one DataExtractor in the ObjectFile
+  /// interface, all sections are copied into a contiguous buffer.
+  std::vector<char> m_buffer;
+
+public:
+  YAMLObjectFile(const lldb::ModuleSP &module_sp,
+                 llvm::StringMap<std::unique_ptr<llvm::MemoryBuffer>> &map)
+      : ObjectFile(module_sp, &module_sp->GetFileSpec(), /*file_offset*/ 0,
+                   /*length*/ 0, /*data_sp*/ nullptr, /*data_offset*/ 0),
+        m_module_sp(module_sp), m_section_map(map) {}
+
+  /// Callback for initializing the module's list of sections.
+  void CreateSections(SectionList &unified_section_list) override {
+    lldb::offset_t total_bytes = 0;
+    for (auto &entry : m_section_map)
+      total_bytes += entry.getValue()->getBufferSize();
+    m_buffer.reserve(total_bytes);
+    m_data =
+        DataExtractor(m_buffer.data(), total_bytes, lldb::eByteOrderLittle, 4);
+
+    lldb::user_id_t sect_id = 1;
+    for (auto &entry : m_section_map) {
+      llvm::StringRef name = entry.getKey();
+      lldb::SectionType sect_type =
+          llvm::StringSwitch<lldb::SectionType>(name)
+              .Case("debug_info", lldb::eSectionTypeDWARFDebugInfo)
+              .Case("debug_abbrev", lldb::eSectionTypeDWARFDebugAbbrev);
+      auto &membuf = entry.getValue();
+      lldb::addr_t file_vm_addr = 0;
+      lldb::addr_t vm_size = 0;
+      lldb::offset_t file_offset = m_buffer.size();
+      lldb::offset_t file_size = membuf->getBufferSize();
+      m_buffer.resize(file_offset + file_size);
+      memcpy(m_buffer.data() + file_offset, membuf->getBufferStart(),
+             file_size);
+      uint32_t log2align = 0;
+      uint32_t flags = 0;
+      auto section_sp = std::make_shared<lldb_private::Section>(
+          m_module_sp, this, sect_id++, ConstString(name), sect_type,
+          file_vm_addr, vm_size, file_offset, file_size, log2align, flags);
+      unified_section_list.AddSection(section_sp);
+    }
+  }
+
+  /// \{
+  /// Stub methods that aren't needed here.
+  ConstString GetPluginName() override { return ConstString("YAMLObjectFile"); }
+  uint32_t GetPluginVersion() override { return 0; }
+  void Dump(Stream *s) override {}
+  uint32_t GetAddressByteSize() const override { return 8; }
+  uint32_t GetDependentModules(FileSpecList &file_list) override { return 0; }
+  bool IsExecutable() const override { return 0; }
+  ArchSpec GetArchitecture() override { return {}; }
+  Symtab *GetSymtab() override { return nullptr; }
+  bool IsStripped() override { return false; }
+  UUID GetUUID() override { return {}; }
+  lldb::ByteOrder GetByteOrder() const override {
+    return lldb::eByteOrderLittle;
+  }
+  bool ParseHeader() override { return false; }
+  Type CalculateType() override { return {}; }
+  Strata CalculateStrata() override { return {}; }
+  /// \}
+};
+
+/// Helper class that can construct a module from YAML and evaluate
+/// DWARF expressions on it.
+class YAMLModuleTester {
+  SubsystemRAII<FileSystem> subsystems;
+  llvm::StringMap<std::unique_ptr<llvm::MemoryBuffer>> m_sections_map;
+  lldb::ModuleSP m_module_sp;
+  lldb::ObjectFileSP m_objfile_sp;
+  DWARFUnitSP m_dwarf_unit;
+  std::unique_ptr<SymbolFileDWARF> m_symfile_dwarf;
+
+public:
+  /// Parse the debug info sections from the YAML description.
+  YAMLModuleTester(llvm::StringRef yaml_data, llvm::StringRef triple) {
+    auto sections_map = llvm::DWARFYAML::EmitDebugSections(yaml_data, true);
+    if (!sections_map)
+      return;
+    m_sections_map = std::move(*sections_map);
+    ArchSpec arch(triple);
+    m_module_sp = std::make_shared<YAMLModule>(arch);
+    m_objfile_sp = std::make_shared<YAMLObjectFile>(m_module_sp, m_sections_map);
+    static_cast<YAMLModule *>(m_module_sp.get())->SetObjectFile(m_objfile_sp);
+
+    lldb::user_id_t uid = 0;
+    llvm::StringRef raw_debug_info = m_sections_map["debug_info"]->getBuffer();
+    lldb_private::DataExtractor debug_info(
+        raw_debug_info.data(), raw_debug_info.size(),
+        m_objfile_sp->GetByteOrder(), m_objfile_sp->GetAddressByteSize());
+    lldb::offset_t offset_ptr = 0;
+    m_symfile_dwarf = std::make_unique<SymbolFileDWARF>(m_objfile_sp, nullptr);
+    llvm::Expected<DWARFUnitSP> dwarf_unit = DWARFUnit::extract(
+        *m_symfile_dwarf, uid,
+        *static_cast<lldb_private::DWARFDataExtractor *>(&debug_info),
+        DIERef::DebugInfo, &offset_ptr);
+    if (dwarf_unit)
+      m_dwarf_unit = dwarf_unit.get();
+  }
+  DWARFUnitSP GetDwarfUnit() { return m_dwarf_unit; }
+
+  // Evaluate a raw DWARF expression.
+  llvm::Expected<Scalar> Eval(llvm::ArrayRef<uint8_t> expr) {
+    return ::Evaluate(expr, m_module_sp, m_dwarf_unit.get());
+  }
+};
+
+/// Unfortunately Scalar's operator==() is really picky.
+static Scalar GetScalar(unsigned bits, uint64_t value, bool sign) {
+  Scalar scalar;
+  auto type = Scalar::GetBestTypeForBitSize(bits, sign);
+  switch (type) {
+  case Scalar::e_sint:
+    scalar = Scalar((int)value);
+    break;
+  case Scalar::e_slong:
+    scalar = Scalar((long)value);
+    break;
+  case Scalar::e_slonglong:
+    scalar = Scalar((long long)value);
+    break;
+  case Scalar::e_uint:
+    scalar = Scalar((unsigned int)value);
+    break;
+  case Scalar::e_ulong:
+    scalar = Scalar((unsigned long)value);
+    break;
+  case Scalar::e_ulonglong:
+    scalar = Scalar((unsigned long long)value);
+    break;
+  default:
+    llvm_unreachable("not implemented");
+  }
+  scalar.TruncOrExtendTo(type, bits);
+  if (sign)
+    scalar.MakeSigned();
+  else
+    scalar.MakeUnsigned();
+  return scalar;
 }
 
 TEST(DWARFExpression, DW_OP_pick) {
@@ -40,3 +218,146 @@
   EXPECT_THAT_EXPECTED(Evaluate({DW_OP_lit1, DW_OP_lit0, DW_OP_pick, 2}),
                        llvm::Failed());
 }
+
+TEST(DWARFExpression, DW_OP_convert) {
+  /// Auxiliary debug info.
+  const char *yamldata =
+      "debug_abbrev:\n"
+      "  - Code:            0x00000001\n"
+      "    Tag:             DW_TAG_compile_unit\n"
+      "    Children:        DW_CHILDREN_yes\n"
+      "    Attributes:\n"
+      "      - Attribute:       DW_AT_language\n"
+      "        Form:            DW_FORM_data2\n"
+      "  - Code:            0x00000002\n"
+      "    Tag:             DW_TAG_base_type\n"
+      "    Children:        DW_CHILDREN_no\n"
+      "    Attributes:\n"
+      "      - Attribute:       DW_AT_encoding\n"
+      "        Form:            DW_FORM_data1\n"
+      "      - Attribute:       DW_AT_byte_size\n"
+      "        Form:            DW_FORM_data1\n"
+      "debug_info:\n"
+      "  - Length:\n"
+      "      TotalLength:     0\n"
+      "    Version:         4\n"
+      "    AbbrOffset:      0\n"
+      "    AddrSize:        8\n"
+      "    Entries:\n"
+      "      - AbbrCode:        0x00000001\n"
+      "        Values:\n"
+      "          - Value:           0x000000000000000C\n"
+      // 0x0000000e:
+      "      - AbbrCode:        0x00000002\n"
+      "        Values:\n"
+      "          - Value:           0x0000000000000007\n" // DW_ATE_unsigned
+      "          - Value:           0x0000000000000004\n"
+      // 0x00000011:
+      "      - AbbrCode:        0x00000002\n"
+      "        Values:\n"
+      "          - Value:           0x0000000000000007\n" // DW_ATE_unsigned
+      "          - Value:           0x0000000000000008\n"
+      // 0x00000014:
+      "      - AbbrCode:        0x00000002\n"
+      "        Values:\n"
+      "          - Value:           0x0000000000000005\n" // DW_ATE_signed
+      "          - Value:           0x0000000000000008\n"
+      // 0x00000017:
+      "      - AbbrCode:        0x00000002\n"
+      "        Values:\n"
+      "          - Value:           0x0000000000000008\n" // DW_ATE_unsigned_char
+      "          - Value:           0x0000000000000001\n"
+      // 0x0000001a:
+      "      - AbbrCode:        0x00000002\n"
+      "        Values:\n"
+      "          - Value:           0x0000000000000006\n" // DW_ATE_signed_char
+      "          - Value:           0x0000000000000001\n"
+      // 0x0000001d:
+      "      - AbbrCode:        0x00000002\n"
+      "        Values:\n"
+      "          - Value:           0x000000000000000b\n" // DW_ATE_numeric_string
+      "          - Value:           0x0000000000000001\n"
+      ""
+      "      - AbbrCode:        0x00000000\n"
+      "        Values:          []\n";
+  uint8_t offs_uint32_t = 0x0000000e;
+  uint8_t offs_uint64_t = 0x00000011;
+  uint8_t offs_sint64_t = 0x00000014;
+  uint8_t offs_uchar = 0x00000017;
+  uint8_t offs_schar = 0x0000001a;
+
+  YAMLModuleTester t(yamldata, "i386-unknown-linux");
+  ASSERT_TRUE((bool)t.GetDwarfUnit());
+
+  // Constant is given as little-endian.
+  bool is_signed = true;
+  bool not_signed = false;
+
+  //
+  // Positive tests.
+  //
+
+  // Truncate to default unspecified (pointer-sized) type.
+  EXPECT_THAT_EXPECTED(
+      t.Eval({DW_OP_const8u, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, //
+              DW_OP_convert, 0x00}),
+      llvm::HasValue(GetScalar(32, 0x44332211, not_signed)));
+  // Truncate to 32 bits.
+  EXPECT_THAT_EXPECTED(t.Eval({DW_OP_const8u, //
+                               0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88,//
+                               DW_OP_convert, offs_uint32_t}),
+                       llvm::HasValue(GetScalar(32, 0x44332211, not_signed)));
+
+  // Leave as is.
+  EXPECT_THAT_EXPECTED(
+      t.Eval({DW_OP_const8u, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, //
+              DW_OP_convert, offs_uint64_t}),
+      llvm::HasValue(GetScalar(64, 0x8877665544332211, not_signed)));
+
+  // Sign-extend to 64 bits.
+  EXPECT_THAT_EXPECTED(
+      t.Eval({DW_OP_const4s, 0xcc, 0xdd, 0xee, 0xff, //
+              DW_OP_convert, offs_sint64_t}),
+      llvm::HasValue(GetScalar(64, 0xffffffffffeeddcc, is_signed)));
+
+  // Truncate to 8 bits.
+  EXPECT_THAT_EXPECTED(t.Eval({DW_OP_const4s, 'A', 'B', 'C', 'D', 0xee, 0xff, //
+                               DW_OP_convert, offs_uchar}),
+                       llvm::HasValue(GetScalar(8, 'A', not_signed)));
+
+  // Also truncate to 8 bits.
+  EXPECT_THAT_EXPECTED(t.Eval({DW_OP_const4s, 'A', 'B', 'C', 'D', 0xee, 0xff, //
+                               DW_OP_convert, offs_schar}),
+                       llvm::HasValue(GetScalar(8, 'A', is_signed)));
+
+  //
+  // Errors.
+  //
+
+  // No Module.
+  EXPECT_THAT_ERROR(Evaluate({DW_OP_const1s, 'X', DW_OP_convert, 0x00}, nullptr,
+                             t.GetDwarfUnit().get())
+                        .takeError(),
+                    llvm::Failed());
+
+  // No DIE.
+  EXPECT_THAT_ERROR(
+      t.Eval({DW_OP_const1s, 'X', DW_OP_convert, 0x01}).takeError(),
+      llvm::Failed());
+
+  // Unsupported.
+  EXPECT_THAT_ERROR(
+      t.Eval({DW_OP_const1s, 'X', DW_OP_convert, 0x1d}).takeError(),
+      llvm::Failed());
+}
+
+TEST(DWARFExpression, DW_OP_piece) {
+  EXPECT_THAT_EXPECTED(Evaluate({DW_OP_const2u, 0x11, 0x22, DW_OP_piece, 2,
+                                 DW_OP_const2u, 0x33, 0x44, DW_OP_piece, 2}),
+                       llvm::HasValue(GetScalar(32, 0x44332211, true)));
+  EXPECT_THAT_EXPECTED(
+      Evaluate({DW_OP_piece, 1, DW_OP_const1u, 0xff, DW_OP_piece, 1}),
+      // Note that the "00" should really be "undef", but we can't
+      // represent that yet.
+      llvm::HasValue(GetScalar(16, 0xff00, true)));
+}
diff --git a/src/llvm-project/lldb/unittests/Expression/DiagnosticManagerTest.cpp b/src/llvm-project/lldb/unittests/Expression/DiagnosticManagerTest.cpp
new file mode 100644
index 0000000..f012632
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/Expression/DiagnosticManagerTest.cpp
@@ -0,0 +1,210 @@
+//===-- DiagnosticManagerTest.cpp --------------------------------*- C++-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Expression/DiagnosticManager.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+
+static const uint32_t custom_diag_id = 42;
+
+namespace {
+class FixItDiag : public Diagnostic {
+  bool m_has_fixits;
+
+public:
+  FixItDiag(llvm::StringRef msg, bool has_fixits)
+      : Diagnostic(msg, DiagnosticSeverity::eDiagnosticSeverityError,
+                   DiagnosticOrigin::eDiagnosticOriginLLDB, custom_diag_id),
+        m_has_fixits(has_fixits) {}
+  bool HasFixIts() const override { return m_has_fixits; }
+};
+} // namespace
+
+namespace {
+class TextDiag : public Diagnostic {
+public:
+  TextDiag(llvm::StringRef msg, DiagnosticSeverity severity)
+      : Diagnostic(msg, severity, DiagnosticOrigin::eDiagnosticOriginLLDB,
+                   custom_diag_id) {}
+};
+} // namespace
+
+TEST(DiagnosticManagerTest, AddDiagnostic) {
+  DiagnosticManager mgr;
+  EXPECT_EQ(0U, mgr.Diagnostics().size());
+
+  std::string msg = "foo bar has happened";
+  DiagnosticSeverity severity = DiagnosticSeverity::eDiagnosticSeverityError;
+  DiagnosticOrigin origin = DiagnosticOrigin::eDiagnosticOriginLLDB;
+  auto diag =
+      std::make_unique<Diagnostic>(msg, severity, origin, custom_diag_id);
+  mgr.AddDiagnostic(std::move(diag));
+  EXPECT_EQ(1U, mgr.Diagnostics().size());
+  const Diagnostic *got = mgr.Diagnostics().front().get();
+  EXPECT_EQ(DiagnosticOrigin::eDiagnosticOriginLLDB, got->getKind());
+  EXPECT_EQ(msg, got->GetMessage());
+  EXPECT_EQ(severity, got->GetSeverity());
+  EXPECT_EQ(custom_diag_id, got->GetCompilerID());
+  EXPECT_EQ(false, got->HasFixIts());
+}
+
+TEST(DiagnosticManagerTest, HasFixits) {
+  DiagnosticManager mgr;
+  // By default we shouldn't have any fixits.
+  EXPECT_FALSE(mgr.HasFixIts());
+  // Adding a diag without fixits shouldn't make HasFixIts return true.
+  mgr.AddDiagnostic(std::make_unique<FixItDiag>("no fixit", false));
+  EXPECT_FALSE(mgr.HasFixIts());
+  // Adding a diag with fixits will mark the manager as containing fixits.
+  mgr.AddDiagnostic(std::make_unique<FixItDiag>("fixit", true));
+  EXPECT_TRUE(mgr.HasFixIts());
+  // Adding another diag without fixit shouldn't make it return false.
+  mgr.AddDiagnostic(std::make_unique<FixItDiag>("no fixit", false));
+  EXPECT_TRUE(mgr.HasFixIts());
+  // Adding a diag with fixits. The manager should still return true.
+  mgr.AddDiagnostic(std::make_unique<FixItDiag>("fixit", true));
+  EXPECT_TRUE(mgr.HasFixIts());
+}
+
+TEST(DiagnosticManagerTest, GetStringNoDiags) {
+  DiagnosticManager mgr;
+  EXPECT_EQ("", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, GetStringBasic) {
+  DiagnosticManager mgr;
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("abc", eDiagnosticSeverityError));
+  EXPECT_EQ("error: abc\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, GetStringMultiline) {
+  DiagnosticManager mgr;
+
+  // Multiline diagnostics should only get one severity label.
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("b\nc", eDiagnosticSeverityError));
+  EXPECT_EQ("error: b\nc\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, GetStringMultipleDiags) {
+  DiagnosticManager mgr;
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("abc", eDiagnosticSeverityError));
+  EXPECT_EQ("error: abc\n", mgr.GetString());
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("def", eDiagnosticSeverityError));
+  EXPECT_EQ("error: abc\nerror: def\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, GetStringSeverityLabels) {
+  DiagnosticManager mgr;
+
+  // Different severities should cause different labels.
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("foo", eDiagnosticSeverityError));
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("bar", eDiagnosticSeverityWarning));
+  // Remarks have no labels.
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("baz", eDiagnosticSeverityRemark));
+  EXPECT_EQ("error: foo\nwarning: bar\nbaz\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, GetStringPreserveOrder) {
+  DiagnosticManager mgr;
+
+  // Make sure we preserve the diagnostic order and do not sort them in any way.
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("baz", eDiagnosticSeverityRemark));
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("bar", eDiagnosticSeverityWarning));
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("foo", eDiagnosticSeverityError));
+  EXPECT_EQ("baz\nwarning: bar\nerror: foo\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, AppendMessageNoDiag) {
+  DiagnosticManager mgr;
+
+  // FIXME: This *really* should not just fail silently.
+  mgr.AppendMessageToDiagnostic("no diag has been pushed yet");
+  EXPECT_EQ(0U, mgr.Diagnostics().size());
+}
+
+TEST(DiagnosticManagerTest, AppendMessageAttachToLastDiag) {
+  DiagnosticManager mgr;
+
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("foo", eDiagnosticSeverityError));
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("bar", eDiagnosticSeverityError));
+  // This should append to 'bar' and not to 'foo'.
+  mgr.AppendMessageToDiagnostic("message text");
+
+  EXPECT_EQ("error: foo\nerror: bar\nmessage text\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, AppendMessageSubsequentDiags) {
+  DiagnosticManager mgr;
+
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("bar", eDiagnosticSeverityError));
+  mgr.AppendMessageToDiagnostic("message text");
+  // Pushing another diag after the message should work fine.
+  mgr.AddDiagnostic(
+      std::make_unique<TextDiag>("foo", eDiagnosticSeverityError));
+
+  EXPECT_EQ("error: bar\nmessage text\nerror: foo\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, PutString) {
+  DiagnosticManager mgr;
+
+  mgr.PutString(eDiagnosticSeverityError, "foo");
+  EXPECT_EQ(1U, mgr.Diagnostics().size());
+  EXPECT_EQ(eDiagnosticOriginLLDB, mgr.Diagnostics().front()->getKind());
+  EXPECT_EQ("error: foo\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, PutStringMultiple) {
+  DiagnosticManager mgr;
+
+  // Multiple PutString should behave like multiple diagnostics.
+  mgr.PutString(eDiagnosticSeverityError, "foo");
+  mgr.PutString(eDiagnosticSeverityError, "bar");
+  EXPECT_EQ(2U, mgr.Diagnostics().size());
+  EXPECT_EQ("error: foo\nerror: bar\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, PutStringSeverities) {
+  DiagnosticManager mgr;
+
+  // Multiple PutString with different severities should behave like we
+  // created multiple diagnostics.
+  mgr.PutString(eDiagnosticSeverityError, "foo");
+  mgr.PutString(eDiagnosticSeverityWarning, "bar");
+  EXPECT_EQ(2U, mgr.Diagnostics().size());
+  EXPECT_EQ("error: foo\nwarning: bar\n", mgr.GetString());
+}
+
+TEST(DiagnosticManagerTest, FixedExpression) {
+  DiagnosticManager mgr;
+
+  // By default there should be no fixed expression.
+  EXPECT_EQ("", mgr.GetFixedExpression());
+
+  // Setting the fixed expression should change it.
+  mgr.SetFixedExpression("foo");
+  EXPECT_EQ("foo", mgr.GetFixedExpression());
+
+  // Setting the fixed expression again should also change it.
+  mgr.SetFixedExpression("bar");
+  EXPECT_EQ("bar", mgr.GetFixedExpression());
+}
diff --git a/src/llvm-project/lldb/unittests/Host/CMakeLists.txt b/src/llvm-project/lldb/unittests/Host/CMakeLists.txt
index cf7c7ca..b88aa97 100644
--- a/src/llvm-project/lldb/unittests/Host/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/Host/CMakeLists.txt
@@ -2,6 +2,7 @@
   ConnectionFileDescriptorTest.cpp
   FileActionTest.cpp
   FileSystemTest.cpp
+  FileTest.cpp
   HostInfoTest.cpp
   HostTest.cpp
   MainLoopTest.cpp
diff --git a/src/llvm-project/lldb/unittests/Host/ConnectionFileDescriptorTest.cpp b/src/llvm-project/lldb/unittests/Host/ConnectionFileDescriptorTest.cpp
index 229e0ee..a5930f2 100644
--- a/src/llvm-project/lldb/unittests/Host/ConnectionFileDescriptorTest.cpp
+++ b/src/llvm-project/lldb/unittests/Host/ConnectionFileDescriptorTest.cpp
@@ -9,6 +9,7 @@
 #include "SocketTestUtilities.h"
 #include "gtest/gtest.h"
 
+#include "TestingSupport/SubsystemRAII.h"
 #include "lldb/Host/posix/ConnectionFileDescriptorPosix.h"
 #include "lldb/Utility/UriParser.h"
 
@@ -16,11 +17,7 @@
 
 class ConnectionFileDescriptorTest : public testing::Test {
 public:
-  void SetUp() override {
-    ASSERT_THAT_ERROR(Socket::Initialize(), llvm::Succeeded());
-  }
-
-  void TearDown() override { Socket::Terminate(); }
+  SubsystemRAII<Socket> subsystems;
 
   void TestGetURI(std::string ip) {
     std::unique_ptr<TCPSocket> socket_a_up;
@@ -47,4 +44,4 @@
 
 TEST_F(ConnectionFileDescriptorTest, TCPGetURIv4) { TestGetURI("127.0.0.1"); }
 
-TEST_F(ConnectionFileDescriptorTest, TCPGetURIv6) { TestGetURI("::1"); }
\ No newline at end of file
+TEST_F(ConnectionFileDescriptorTest, TCPGetURIv6) { TestGetURI("::1"); }
diff --git a/src/llvm-project/lldb/unittests/Host/FileSystemTest.cpp b/src/llvm-project/lldb/unittests/Host/FileSystemTest.cpp
index 7fea3b3..31184d9 100644
--- a/src/llvm-project/lldb/unittests/Host/FileSystemTest.cpp
+++ b/src/llvm-project/lldb/unittests/Host/FileSystemTest.cpp
@@ -288,3 +288,18 @@
   EXPECT_THAT(visited,
               testing::UnorderedElementsAre("/foo", "/bar", "/baz", "/qux"));
 }
+
+TEST(FileSystemTest, OpenErrno) {
+#ifdef _WIN32
+  FileSpec spec("C:\\FILE\\THAT\\DOES\\NOT\\EXIST.TXT");
+#else
+  FileSpec spec("/file/that/does/not/exist.txt");
+#endif
+  FileSystem fs;
+  auto file = fs.Open(spec, File::eOpenOptionRead, 0, true);
+  ASSERT_FALSE(file);
+  std::error_code code = errorToErrorCode(file.takeError());
+  EXPECT_EQ(code.category(), std::system_category());
+  EXPECT_EQ(code.value(), ENOENT);
+}
+
diff --git a/src/llvm-project/lldb/unittests/Host/FileTest.cpp b/src/llvm-project/lldb/unittests/Host/FileTest.cpp
new file mode 100644
index 0000000..6a04343
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/Host/FileTest.cpp
@@ -0,0 +1,57 @@
+//===-- FileTest.cpp --------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Host/File.h"
+#include "llvm/ADT/SmallString.h"
+#include "llvm/Support/FileSystem.h"
+#include "llvm/Support/FileUtilities.h"
+#include "llvm/Support/Path.h"
+#include "llvm/Support/Program.h"
+#include "gtest/gtest.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+TEST(File, GetWaitableHandleFileno) {
+  const auto *Info = testing::UnitTest::GetInstance()->current_test_info();
+
+  llvm::SmallString<128> name;
+  int fd;
+  llvm::sys::fs::createTemporaryFile(llvm::Twine(Info->test_case_name()) + "-" +
+                                         Info->name(),
+                                     "test", fd, name);
+  llvm::FileRemover remover(name);
+  ASSERT_GE(fd, 0);
+
+  FILE *stream = fdopen(fd, "r");
+  ASSERT_TRUE(stream);
+
+  NativeFile file(stream, true);
+  EXPECT_EQ(file.GetWaitableHandle(), fd);
+}
+
+TEST(File, GetStreamFromDescriptor) {
+  const auto *Info = testing::UnitTest::GetInstance()->current_test_info();
+  llvm::SmallString<128> name;
+  int fd;
+  llvm::sys::fs::createTemporaryFile(llvm::Twine(Info->test_case_name()) + "-" +
+                                         Info->name(),
+                                     "test", fd, name);
+
+  llvm::FileRemover remover(name);
+  ASSERT_GE(fd, 0);
+
+  NativeFile file(fd, File::eOpenOptionWrite, true);
+  ASSERT_TRUE(file.IsValid());
+
+  FILE *stream = file.GetStream();
+  ASSERT_TRUE(stream != NULL);
+
+  EXPECT_EQ(file.GetDescriptor(), fd);
+  EXPECT_EQ(file.GetWaitableHandle(), fd);
+}
diff --git a/src/llvm-project/lldb/unittests/Host/HostInfoTest.cpp b/src/llvm-project/lldb/unittests/Host/HostInfoTest.cpp
index fb50e29..c332606 100644
--- a/src/llvm-project/lldb/unittests/Host/HostInfoTest.cpp
+++ b/src/llvm-project/lldb/unittests/Host/HostInfoTest.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Host/HostInfo.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/lldb-defines.h"
@@ -17,15 +18,7 @@
 
 namespace {
 class HostInfoTest : public ::testing::Test {
-public:
-  void SetUp() override {
-    FileSystem::Initialize();
-    HostInfo::Initialize();
-  }
-  void TearDown() override {
-    HostInfo::Terminate();
-    FileSystem::Terminate();
-  }
+  SubsystemRAII<FileSystem, HostInfo> subsystems;
 };
 } // namespace
 
diff --git a/src/llvm-project/lldb/unittests/Host/MainLoopTest.cpp b/src/llvm-project/lldb/unittests/Host/MainLoopTest.cpp
index d77bd09..da509b9 100644
--- a/src/llvm-project/lldb/unittests/Host/MainLoopTest.cpp
+++ b/src/llvm-project/lldb/unittests/Host/MainLoopTest.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Host/MainLoop.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "lldb/Host/ConnectionFileDescriptor.h"
 #include "lldb/Host/PseudoTerminal.h"
 #include "lldb/Host/common/TCPSocket.h"
@@ -19,11 +20,7 @@
 namespace {
 class MainLoopTest : public testing::Test {
 public:
-  static void SetUpTestCase() {
-    ASSERT_THAT_ERROR(Socket::Initialize(), llvm::Succeeded());
-  }
-
-  static void TearDownTestCase() { Socket::Terminate(); }
+  SubsystemRAII<Socket> subsystems;
 
   void SetUp() override {
     bool child_processes_inherit = false;
@@ -102,15 +99,12 @@
 }
 
 #ifdef LLVM_ON_UNIX
-// NetBSD currently does not report slave pty EOF via kevent
-// causing this test to hang forever.
-#ifndef __NetBSD__
 TEST_F(MainLoopTest, DetectsEOF) {
 
   PseudoTerminal term;
   ASSERT_TRUE(term.OpenFirstAvailableMaster(O_RDWR, nullptr, 0));
   ASSERT_TRUE(term.OpenSlave(O_RDWR | O_NOCTTY, nullptr, 0));
-  auto conn = llvm::make_unique<ConnectionFileDescriptor>(
+  auto conn = std::make_unique<ConnectionFileDescriptor>(
       term.ReleaseMasterFileDescriptor(), true);
 
   Status error;
@@ -123,7 +117,6 @@
   ASSERT_TRUE(loop.Run().Success());
   ASSERT_EQ(1u, callback_count);
 }
-#endif
 
 TEST_F(MainLoopTest, Signal) {
   MainLoop loop;
diff --git a/src/llvm-project/lldb/unittests/Host/NativeProcessProtocolTest.cpp b/src/llvm-project/lldb/unittests/Host/NativeProcessProtocolTest.cpp
index bf61951..c5516b1 100644
--- a/src/llvm-project/lldb/unittests/Host/NativeProcessProtocolTest.cpp
+++ b/src/llvm-project/lldb/unittests/Host/NativeProcessProtocolTest.cpp
@@ -9,6 +9,7 @@
 #include "TestingSupport/Host/NativeProcessTestUtils.h"
 
 #include "lldb/Host/common/NativeProcessProtocol.h"
+#include "llvm/Support/Process.h"
 #include "llvm/Testing/Support/Error.h"
 #include "gmock/gmock.h"
 
@@ -96,3 +97,53 @@
   EXPECT_THAT_EXPECTED(Process.ReadMemoryWithoutTrap(4, 2),
                        llvm::HasValue(std::vector<uint8_t>{4, 5}));
 }
+
+TEST(NativeProcessProtocolTest, ReadCStringFromMemory) {
+  NiceMock<MockDelegate> DummyDelegate;
+  MockProcess<NativeProcessProtocol> Process(DummyDelegate,
+                                             ArchSpec("aarch64-pc-linux"));
+  FakeMemory M({'h', 'e', 'l', 'l', 'o', 0, 'w', 'o'});
+  EXPECT_CALL(Process, ReadMemory(_, _))
+      .WillRepeatedly(Invoke(&M, &FakeMemory::Read));
+
+  char string[1024];
+  size_t bytes_read;
+  EXPECT_THAT_EXPECTED(Process.ReadCStringFromMemory(
+                           0x0, &string[0], sizeof(string), bytes_read),
+                       llvm::HasValue(llvm::StringRef("hello")));
+  EXPECT_EQ(bytes_read, 6UL);
+}
+
+TEST(NativeProcessProtocolTest, ReadCStringFromMemory_MaxSize) {
+  NiceMock<MockDelegate> DummyDelegate;
+  MockProcess<NativeProcessProtocol> Process(DummyDelegate,
+                                             ArchSpec("aarch64-pc-linux"));
+  FakeMemory M({'h', 'e', 'l', 'l', 'o', 0, 'w', 'o'});
+  EXPECT_CALL(Process, ReadMemory(_, _))
+      .WillRepeatedly(Invoke(&M, &FakeMemory::Read));
+
+  char string[4];
+  size_t bytes_read;
+  EXPECT_THAT_EXPECTED(Process.ReadCStringFromMemory(
+                           0x0, &string[0], sizeof(string), bytes_read),
+                       llvm::HasValue(llvm::StringRef("hel")));
+  EXPECT_EQ(bytes_read, 3UL);
+}
+
+TEST(NativeProcessProtocolTest, ReadCStringFromMemory_CrossPageBoundary) {
+  NiceMock<MockDelegate> DummyDelegate;
+  MockProcess<NativeProcessProtocol> Process(DummyDelegate,
+                                             ArchSpec("aarch64-pc-linux"));
+  unsigned string_start = llvm::sys::Process::getPageSizeEstimate() - 3;
+  FakeMemory M({'h', 'e', 'l', 'l', 'o', 0, 'w', 'o'}, string_start);
+  EXPECT_CALL(Process, ReadMemory(_, _))
+      .WillRepeatedly(Invoke(&M, &FakeMemory::Read));
+
+  char string[1024];
+  size_t bytes_read;
+  EXPECT_THAT_EXPECTED(Process.ReadCStringFromMemory(string_start, &string[0],
+                                                     sizeof(string),
+                                                     bytes_read),
+                       llvm::HasValue(llvm::StringRef("hello")));
+  EXPECT_EQ(bytes_read, 6UL);
+}
\ No newline at end of file
diff --git a/src/llvm-project/lldb/unittests/Host/SocketAddressTest.cpp b/src/llvm-project/lldb/unittests/Host/SocketAddressTest.cpp
index 81bc5dc..8abf9c3 100644
--- a/src/llvm-project/lldb/unittests/Host/SocketAddressTest.cpp
+++ b/src/llvm-project/lldb/unittests/Host/SocketAddressTest.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Host/SocketAddress.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "lldb/Host/Socket.h"
 #include "llvm/Testing/Support/Error.h"
 
@@ -17,10 +18,7 @@
 namespace {
 class SocketAddressTest : public testing::Test {
 public:
-  static void SetUpTestCase() {
-    ASSERT_THAT_ERROR(Socket::Initialize(), llvm::Succeeded());
-  }
-  static void TearDownTestCase() { Socket::Terminate(); }
+  SubsystemRAII<Socket> subsystems;
 };
 } // namespace
 
diff --git a/src/llvm-project/lldb/unittests/Host/SocketTest.cpp b/src/llvm-project/lldb/unittests/Host/SocketTest.cpp
index 4e89797..d4e8917 100644
--- a/src/llvm-project/lldb/unittests/Host/SocketTest.cpp
+++ b/src/llvm-project/lldb/unittests/Host/SocketTest.cpp
@@ -7,6 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "SocketTestUtilities.h"
+#include "TestingSupport/SubsystemRAII.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Utility/UriParser.h"
 #include "gtest/gtest.h"
 
@@ -14,11 +16,7 @@
 
 class SocketTest : public testing::Test {
 public:
-  void SetUp() override {
-    ASSERT_THAT_ERROR(Socket::Initialize(), llvm::Succeeded());
-  }
-
-  void TearDown() override { Socket::Terminate(); }
+  SubsystemRAII<Socket> subsystems;
 };
 
 TEST_F(SocketTest, DecodeHostAndPort) {
@@ -87,14 +85,16 @@
   EXPECT_TRUE(error.Success());
 }
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 TEST_F(SocketTest, DomainListenConnectAccept) {
   llvm::SmallString<64> Path;
   std::error_code EC = llvm::sys::fs::createUniqueDirectory("DomainListenConnectAccept", Path);
   ASSERT_FALSE(EC);
   llvm::sys::path::append(Path, "test");
-  // If this fails, $TMPDIR is too long to hold a domain socket.
-  EXPECT_LE(Path.size(), 107u);
+
+  // Skip the test if the $TMPDIR is too long to hold a domain socket.
+  if (Path.size() > 107u)
+    return;
 
   std::unique_ptr<DomainSocket> socket_a_up;
   std::unique_ptr<DomainSocket> socket_b_up;
@@ -189,15 +189,17 @@
   EXPECT_EQ(scheme, "udp");
 }
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 TEST_F(SocketTest, DomainGetConnectURI) {
   llvm::SmallString<64> domain_path;
   std::error_code EC =
       llvm::sys::fs::createUniqueDirectory("DomainListenConnectAccept", domain_path);
   ASSERT_FALSE(EC);
   llvm::sys::path::append(domain_path, "test");
-  // If this fails, $TMPDIR is too long to hold a domain socket.
-  EXPECT_LE(domain_path.size(), 107u);
+
+  // Skip the test if the $TMPDIR is too long to hold a domain socket.
+  if (domain_path.size() > 107u)
+    return;
 
   std::unique_ptr<DomainSocket> socket_a_up;
   std::unique_ptr<DomainSocket> socket_b_up;
diff --git a/src/llvm-project/lldb/unittests/Host/SocketTestUtilities.cpp b/src/llvm-project/lldb/unittests/Host/SocketTestUtilities.cpp
index 660aba0..6e7345b 100644
--- a/src/llvm-project/lldb/unittests/Host/SocketTestUtilities.cpp
+++ b/src/llvm-project/lldb/unittests/Host/SocketTestUtilities.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "SocketTestUtilities.h"
+#include "lldb/Host/Config.h"
 #include "lldb/Utility/StreamString.h"
 
 #ifdef _WIN32
@@ -82,7 +83,7 @@
   return true;
 }
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 void lldb_private::CreateDomainConnectedSockets(
     llvm::StringRef path, std::unique_ptr<DomainSocket> *socket_a_up,
     std::unique_ptr<DomainSocket> *socket_b_up) {
diff --git a/src/llvm-project/lldb/unittests/Host/SocketTestUtilities.h b/src/llvm-project/lldb/unittests/Host/SocketTestUtilities.h
index 4e51be9..3562782 100644
--- a/src/llvm-project/lldb/unittests/Host/SocketTestUtilities.h
+++ b/src/llvm-project/lldb/unittests/Host/SocketTestUtilities.h
@@ -21,7 +21,7 @@
 #include "llvm/Support/Path.h"
 #include "llvm/Testing/Support/Error.h"
 
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 #include "lldb/Host/posix/DomainSocket.h"
 #endif
 
@@ -34,7 +34,7 @@
 bool CreateTCPConnectedSockets(std::string listen_remote_ip,
                                std::unique_ptr<TCPSocket> *a_up,
                                std::unique_ptr<TCPSocket> *b_up);
-#ifndef LLDB_DISABLE_POSIX
+#if LLDB_ENABLE_POSIX
 void CreateDomainConnectedSockets(llvm::StringRef path,
                                   std::unique_ptr<DomainSocket> *a_up,
                                   std::unique_ptr<DomainSocket> *b_up);
diff --git a/src/llvm-project/lldb/unittests/Interpreter/TestCompletion.cpp b/src/llvm-project/lldb/unittests/Interpreter/TestCompletion.cpp
index 6ad0442..838a7a9 100644
--- a/src/llvm-project/lldb/unittests/Interpreter/TestCompletion.cpp
+++ b/src/llvm-project/lldb/unittests/Interpreter/TestCompletion.cpp
@@ -15,6 +15,7 @@
 #include "gtest/gtest.h"
 
 #include "TestingSupport/MockTildeExpressionResolver.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/FileSystem.h"
@@ -29,6 +30,8 @@
 namespace {
 
 class CompletionTest : public testing::Test {
+  SubsystemRAII<FileSystem> subsystems;
+
 protected:
   /// Unique temporary directory in which all created filesystem entities must
   /// be placed. It is removed at the end of the test suite.
@@ -56,8 +59,6 @@
   SmallString<128> FileBaz;
 
   void SetUp() override {
-    FileSystem::Initialize();
-
     // chdir back into the original working dir this test binary started with.
     // A previous test may have have changed the working dir.
     ASSERT_NO_ERROR(fs::set_current_path(OriginalWorkingDir));
@@ -100,7 +101,6 @@
 
   void TearDown() override {
     ASSERT_NO_ERROR(fs::remove_directories(BaseDir));
-    FileSystem::Terminate();
   }
 
   static bool HasEquivalentFile(const Twine &Path, const StringList &Paths) {
@@ -116,20 +116,16 @@
                         StringList &Results) {
     // When a partial name matches, it returns all matches.  If it matches both
     // a full name AND some partial names, it returns all of them.
-    uint32_t Count =
-        CommandCompletions::DiskDirectories(Prefix + "foo", Results, Resolver);
-    ASSERT_EQ(4u, Count);
-    ASSERT_EQ(Count, Results.GetSize());
+    CommandCompletions::DiskDirectories(Prefix + "foo", Results, Resolver);
+    ASSERT_EQ(4u, Results.GetSize());
     EXPECT_TRUE(HasEquivalentFile(DirFoo, Results));
     EXPECT_TRUE(HasEquivalentFile(DirFooA, Results));
     EXPECT_TRUE(HasEquivalentFile(DirFooB, Results));
     EXPECT_TRUE(HasEquivalentFile(DirFooC, Results));
 
     // If it matches only partial names, it still works as expected.
-    Count = CommandCompletions::DiskDirectories(Twine(Prefix) + "b", Results,
-                                                Resolver);
-    ASSERT_EQ(2u, Count);
-    ASSERT_EQ(Count, Results.GetSize());
+    CommandCompletions::DiskDirectories(Twine(Prefix) + "b", Results, Resolver);
+    ASSERT_EQ(2u, Results.GetSize());
     EXPECT_TRUE(HasEquivalentFile(DirBar, Results));
     EXPECT_TRUE(HasEquivalentFile(DirBaz, Results));
   }
@@ -160,21 +156,17 @@
   // When a directory is specified that doesn't end in a slash, it searches
   // for that directory, not items under it.
   // Sanity check that the path we complete on exists and isn't too long.
-  size_t Count = CommandCompletions::DiskDirectories(Twine(BaseDir) + "/fooa",
-                                                     Results, Resolver);
-  ASSERT_EQ(1u, Count);
-  ASSERT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskDirectories(Twine(BaseDir) + "/fooa", Results,
+                                      Resolver);
+  ASSERT_EQ(1u, Results.GetSize());
   EXPECT_TRUE(HasEquivalentFile(DirFooA, Results));
 
-  Count = CommandCompletions::DiskDirectories(Twine(BaseDir) + "/.", Results,
-                                              Resolver);
-  ASSERT_EQ(0u, Count);
-  ASSERT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskDirectories(Twine(BaseDir) + "/.", Results, Resolver);
+  ASSERT_EQ(0u, Results.GetSize());
 
   // When the same directory ends with a slash, it finds all children.
-  Count = CommandCompletions::DiskDirectories(Prefixes[0], Results, Resolver);
-  ASSERT_EQ(7u, Count);
-  ASSERT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskDirectories(Prefixes[0], Results, Resolver);
+  ASSERT_EQ(7u, Results.GetSize());
   EXPECT_TRUE(HasEquivalentFile(DirFoo, Results));
   EXPECT_TRUE(HasEquivalentFile(DirFooA, Results));
   EXPECT_TRUE(HasEquivalentFile(DirFooB, Results));
@@ -197,25 +189,19 @@
   StringList Results;
   // When an item is specified that doesn't end in a slash but exactly matches
   // one item, it returns that item.
-  size_t Count = CommandCompletions::DiskFiles(Twine(BaseDir) + "/fooa",
-                                               Results, Resolver);
-  ASSERT_EQ(1u, Count);
-  ASSERT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskFiles(Twine(BaseDir) + "/fooa", Results, Resolver);
+  ASSERT_EQ(1u, Results.GetSize());
   EXPECT_TRUE(HasEquivalentFile(DirFooA, Results));
 
   // The previous check verified a directory match.  But it should work for
   // files too.
-  Count =
-      CommandCompletions::DiskFiles(Twine(BaseDir) + "/aa", Results, Resolver);
-  ASSERT_EQ(1u, Count);
-  ASSERT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskFiles(Twine(BaseDir) + "/aa", Results, Resolver);
+  ASSERT_EQ(1u, Results.GetSize());
   EXPECT_TRUE(HasEquivalentFile(FileAA, Results));
 
   // When it ends with a slash, it should find all files and directories.
-  Count =
-      CommandCompletions::DiskFiles(Twine(BaseDir) + "/", Results, Resolver);
-  ASSERT_EQ(13u, Count);
-  ASSERT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskFiles(Twine(BaseDir) + "/", Results, Resolver);
+  ASSERT_EQ(13u, Results.GetSize());
   EXPECT_TRUE(HasEquivalentFile(DirFoo, Results));
   EXPECT_TRUE(HasEquivalentFile(DirFooA, Results));
   EXPECT_TRUE(HasEquivalentFile(DirFooB, Results));
@@ -232,10 +218,8 @@
   EXPECT_TRUE(HasEquivalentFile(FileBaz, Results));
 
   // When a partial name matches, it returns all file & directory matches.
-  Count =
-      CommandCompletions::DiskFiles(Twine(BaseDir) + "/foo", Results, Resolver);
-  ASSERT_EQ(5u, Count);
-  ASSERT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskFiles(Twine(BaseDir) + "/foo", Results, Resolver);
+  ASSERT_EQ(5u, Results.GetSize());
   EXPECT_TRUE(HasEquivalentFile(DirFoo, Results));
   EXPECT_TRUE(HasEquivalentFile(DirFooA, Results));
   EXPECT_TRUE(HasEquivalentFile(DirFooB, Results));
@@ -254,42 +238,35 @@
   // Just resolving current user's home directory by itself should return the
   // directory.
   StringList Results;
-  size_t Count = CommandCompletions::DiskDirectories("~", Results, Resolver);
-  EXPECT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskDirectories("~", Results, Resolver);
   EXPECT_THAT(toVector(Results), UnorderedElementsAre("~" + sep));
 
   // With a slash appended, it should return all items in the directory.
-  Count = CommandCompletions::DiskDirectories("~/", Results, Resolver);
+  CommandCompletions::DiskDirectories("~/", Results, Resolver);
   EXPECT_THAT(toVector(Results),
               UnorderedElementsAre(
                   "~/foo" + sep, "~/fooa" + sep, "~/foob" + sep, "~/fooc" + sep,
                   "~/bar" + sep, "~/baz" + sep, "~/test_folder" + sep));
-  EXPECT_EQ(Count, Results.GetSize());
 
   // Check that we can complete directories in nested paths
-  Count = CommandCompletions::DiskDirectories("~/foo/", Results, Resolver);
-  EXPECT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskDirectories("~/foo/", Results, Resolver);
   EXPECT_THAT(toVector(Results), UnorderedElementsAre("~/foo/nested" + sep));
 
-  Count = CommandCompletions::DiskDirectories("~/foo/nes", Results, Resolver);
-  EXPECT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskDirectories("~/foo/nes", Results, Resolver);
   EXPECT_THAT(toVector(Results), UnorderedElementsAre("~/foo/nested" + sep));
 
   // With ~username syntax it should return one match if there is an exact
   // match.  It shouldn't translate to the actual directory, it should keep the
   // form the user typed.
-  Count = CommandCompletions::DiskDirectories("~Lars", Results, Resolver);
-  EXPECT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskDirectories("~Lars", Results, Resolver);
   EXPECT_THAT(toVector(Results), UnorderedElementsAre("~Lars" + sep));
 
   // But with a username that is not found, no results are returned.
-  Count = CommandCompletions::DiskDirectories("~Dave", Results, Resolver);
-  EXPECT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskDirectories("~Dave", Results, Resolver);
   EXPECT_THAT(toVector(Results), UnorderedElementsAre());
 
   // And if there are multiple matches, it should return all of them.
-  Count = CommandCompletions::DiskDirectories("~La", Results, Resolver);
-  EXPECT_EQ(Count, Results.GetSize());
+  CommandCompletions::DiskDirectories("~La", Results, Resolver);
   EXPECT_THAT(toVector(Results),
               UnorderedElementsAre("~Lars" + sep, "~Larry" + sep));
 }
diff --git a/src/llvm-project/lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp b/src/llvm-project/lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
index 150bef1..deb6c7d 100644
--- a/src/llvm-project/lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
+++ b/src/llvm-project/lldb/unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
@@ -191,6 +191,8 @@
   EXPECT_THAT(FindAlternate("_ZN1A1fEx"), Contains("_ZN1A1fEl"));
   EXPECT_THAT(FindAlternate("_ZN1A1fEy"), Contains("_ZN1A1fEm"));
   EXPECT_THAT(FindAlternate("_ZN1A1fEai"), Contains("_ZN1A1fEci"));
+  EXPECT_THAT(FindAlternate("_ZN1AC1Ev"), Contains("_ZN1AC2Ev"));
+  EXPECT_THAT(FindAlternate("_ZN1AD1Ev"), Contains("_ZN1AD2Ev"));
   EXPECT_THAT(FindAlternate("_bogus"), IsEmpty());
 }
 
diff --git a/src/llvm-project/lldb/unittests/Language/Highlighting/HighlighterTest.cpp b/src/llvm-project/lldb/unittests/Language/Highlighting/HighlighterTest.cpp
index 71457ed..5d155ff 100644
--- a/src/llvm-project/lldb/unittests/Language/Highlighting/HighlighterTest.cpp
+++ b/src/llvm-project/lldb/unittests/Language/Highlighting/HighlighterTest.cpp
@@ -14,33 +14,18 @@
 #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
 #include "Plugins/Language/ObjC/ObjCLanguage.h"
 #include "Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h"
+#include "TestingSupport/SubsystemRAII.h"
 
 using namespace lldb_private;
 
 namespace {
 class HighlighterTest : public testing::Test {
-public:
-  static void SetUpTestCase();
-  static void TearDownTestCase();
+  SubsystemRAII<FileSystem, CPlusPlusLanguage, ObjCLanguage,
+                ObjCPlusPlusLanguage>
+      subsystems;
 };
 } // namespace
 
-void HighlighterTest::SetUpTestCase() {
-  // The HighlighterManager uses the language plugins under the hood, so we
-  // have to initialize them here for our test process.
-  FileSystem::Initialize();
-  CPlusPlusLanguage::Initialize();
-  ObjCLanguage::Initialize();
-  ObjCPlusPlusLanguage::Initialize();
-}
-
-void HighlighterTest::TearDownTestCase() {
-  CPlusPlusLanguage::Terminate();
-  ObjCLanguage::Terminate();
-  ObjCPlusPlusLanguage::Terminate();
-  FileSystem::Terminate();
-}
-
 static std::string getName(lldb::LanguageType type) {
   HighlighterManager m;
   return m.getHighlighterFor(type, "").GetName().str();
@@ -205,6 +190,44 @@
             highlightC("#include \"foo\" //c", s));
 }
 
+TEST_F(HighlighterTest, ClangPreserveNewLine) {
+  HighlightStyle s;
+  s.comment.Set("<cc>", "</cc>");
+
+  EXPECT_EQ("<cc>//</cc>\n", highlightC("//\n", s));
+}
+
+TEST_F(HighlighterTest, ClangTrailingBackslashBeforeNewline) {
+  HighlightStyle s;
+
+  EXPECT_EQ("\\\n", highlightC("\\\n", s));
+  EXPECT_EQ("\\\r\n", highlightC("\\\r\n", s));
+
+  EXPECT_EQ("#define a \\\n", highlightC("#define a \\\n", s));
+  EXPECT_EQ("#define a \\\r\n", highlightC("#define a \\\r\n", s));
+  EXPECT_EQ("#define a \\\r", highlightC("#define a \\\r", s));
+}
+
+TEST_F(HighlighterTest, ClangTrailingBackslashWithWhitespace) {
+  HighlightStyle s;
+
+  EXPECT_EQ("\\  \n", highlightC("\\  \n", s));
+  EXPECT_EQ("\\ \t\n", highlightC("\\ \t\n", s));
+  EXPECT_EQ("\\ \n", highlightC("\\ \n", s));
+  EXPECT_EQ("\\\t\n", highlightC("\\\t\n", s));
+
+  EXPECT_EQ("#define a \\  \n", highlightC("#define a \\  \n", s));
+  EXPECT_EQ("#define a \\ \t\n", highlightC("#define a \\ \t\n", s));
+  EXPECT_EQ("#define a \\ \n", highlightC("#define a \\ \n", s));
+  EXPECT_EQ("#define a \\\t\n", highlightC("#define a \\\t\n", s));
+}
+
+TEST_F(HighlighterTest, ClangTrailingBackslashMissingNewLine) {
+  HighlightStyle s;
+  EXPECT_EQ("\\", highlightC("\\", s));
+  EXPECT_EQ("#define a\\", highlightC("#define a\\", s));
+}
+
 TEST_F(HighlighterTest, ClangComments) {
   HighlightStyle s;
   s.comment.Set("<cc>", "</cc>");
diff --git a/src/llvm-project/lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp b/src/llvm-project/lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp
index acf788a..b27d2b7 100644
--- a/src/llvm-project/lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp
+++ b/src/llvm-project/lldb/unittests/ObjectFile/Breakpad/BreakpadRecordsTest.cpp
@@ -20,6 +20,7 @@
   EXPECT_EQ(Record::Func, Record::classify("FUNC"));
   EXPECT_EQ(Record::Public, Record::classify("PUBLIC"));
   EXPECT_EQ(Record::StackCFI, Record::classify("STACK CFI"));
+  EXPECT_EQ(Record::StackWin, Record::classify("STACK WIN"));
 
   // Any obviously incorrect lines will be classified as such.
   EXPECT_EQ(llvm::None, Record::classify("STACK"));
@@ -119,3 +120,34 @@
   EXPECT_EQ(llvm::None, StackCFIRecord::parse("FILE 47 foo"));
   EXPECT_EQ(llvm::None, StackCFIRecord::parse("42 47"));
 }
+
+TEST(StackWinRecord, parse) {
+  EXPECT_EQ(
+      StackWinRecord(0x47, 0x8, 3, 4, 5, llvm::StringRef("$eip $esp ^ =")),
+      StackWinRecord::parse("STACK WIN 4 47 8 1 2 3 4 5 6 1 $eip $esp ^ ="));
+
+  EXPECT_EQ(llvm::None, StackWinRecord::parse(
+                            "STACK WIN 0 47 8 1 0 0 0 0 0 1 $eip $esp ^ ="));
+  EXPECT_EQ(llvm::None,
+            StackWinRecord::parse("STACK WIN 4 47 8 1 0 0 0 0 0 0 1"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse(
+                            "STACK WIN 3 47 8 1 0 0 0 0 0 1 $eip $esp ^ ="));
+  EXPECT_EQ(llvm::None,
+            StackWinRecord::parse("STACK WIN 3 47 8 1 0 0 0 0 0 0 1"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse(
+                            "STACK WIN 4 47 8 1 0 0 0 0 1 $eip $esp ^ ="));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN 4 47 8 1 0 0 0 0 0"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN 4 47 8 1 0 0 0 0"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN 4 47 8 1 0 0 0"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN 4 47 8 1 0 0"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN 4 47 8 1 0"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN 4 47 8 1"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN 4 47 8"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN 4 47"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN 4"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK WIN"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse("STACK"));
+  EXPECT_EQ(llvm::None, StackWinRecord::parse(""));
+  EXPECT_EQ(llvm::None, StackCFIRecord::parse("FILE 47 foo"));
+  EXPECT_EQ(llvm::None, StackCFIRecord::parse("42 47"));
+}
diff --git a/src/llvm-project/lldb/unittests/ObjectFile/CMakeLists.txt b/src/llvm-project/lldb/unittests/ObjectFile/CMakeLists.txt
index 62c003e..a9b42ea 100644
--- a/src/llvm-project/lldb/unittests/ObjectFile/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/ObjectFile/CMakeLists.txt
@@ -1,2 +1,3 @@
 add_subdirectory(Breakpad)
 add_subdirectory(ELF)
+add_subdirectory(PECOFF)
diff --git a/src/llvm-project/lldb/unittests/ObjectFile/ELF/CMakeLists.txt b/src/llvm-project/lldb/unittests/ObjectFile/ELF/CMakeLists.txt
index ccce062..4c59ca1 100644
--- a/src/llvm-project/lldb/unittests/ObjectFile/ELF/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/ObjectFile/ELF/CMakeLists.txt
@@ -3,7 +3,7 @@
 
   LINK_LIBS
     lldbPluginObjectFileELF
-    lldbPluginSymbolVendorELF
+    lldbPluginSymbolFileSymtab
     lldbCore
     lldbUtilityHelpers
     LLVMTestingSupport
@@ -11,7 +11,5 @@
 
 set(test_inputs
   early-section-headers.so
-  debug-info-relocations.pcm.yaml
-  sections-resolve-consistently.yaml
   )
 add_unittest_inputs(ObjectFileELFTests "${test_inputs}")
diff --git a/src/llvm-project/lldb/unittests/ObjectFile/ELF/Inputs/debug-info-relocations.pcm.yaml b/src/llvm-project/lldb/unittests/ObjectFile/ELF/Inputs/debug-info-relocations.pcm.yaml
deleted file mode 100644
index 10f5e59..0000000
--- a/src/llvm-project/lldb/unittests/ObjectFile/ELF/Inputs/debug-info-relocations.pcm.yaml
+++ /dev/null
@@ -1,182 +0,0 @@
---- !ELF
-FileHeader:      
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_REL
-  Machine:         EM_AARCH64
-Sections:        
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    AddressAlign:    0x0000000000000004
-    Content:         E0031B32C0035FD6
-  - Name:            .debug_str
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_MERGE, SHF_STRINGS ]
-    AddressAlign:    0x0000000000000001
-    Content:         636C616E672076657273696F6E20362E302E312028746167732F52454C454153455F3630312F66696E616C2900726564756365642E68002F746D702F617364666173646673646661006600696E7400
-  - Name:            .debug_abbrev
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         011101250E1305030E10171B0EB44219110112060000022E00110112064018030E3A0B3B0B271949133F190000032400030E3E0B0B0B000000
-  - Name:            .debug_info
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         470000000400000000000801000000000C0000000000000000000000000000000000000000000800000002000000000000000008000000016F000000000102430000000300000000050400
-  - Name:            .rela.debug_info
-    Type:            SHT_RELA
-    Link:            .symtab
-    AddressAlign:    0x0000000000000008
-    Info:            .debug_info
-    Relocations:     
-      - Offset:          0x0000000000000006
-        Symbol:          .debug_abbrev
-        Type:            R_AARCH64_ABS32
-      - Offset:          0x000000000000000C
-        Symbol:          .debug_str
-        Type:            R_AARCH64_ABS32
-      - Offset:          0x0000000000000012
-        Symbol:          .debug_str
-        Type:            R_AARCH64_ABS32
-        Addend:          45
-      - Offset:          0x0000000000000016
-        Symbol:          .debug_line
-        Type:            R_AARCH64_ABS32
-      - Offset:          0x000000000000001A
-        Symbol:          .debug_str
-        Type:            R_AARCH64_ABS32
-        Addend:          55
-      - Offset:          0x000000000000001E
-        Symbol:          .text
-        Type:            R_AARCH64_ABS64
-      - Offset:          0x000000000000002B
-        Symbol:          .text
-        Type:            R_AARCH64_ABS64
-      - Offset:          0x0000000000000039
-        Symbol:          .debug_str
-        Type:            R_AARCH64_ABS32
-        Addend:          73
-      - Offset:          0x0000000000000044
-        Symbol:          .debug_str
-        Type:            R_AARCH64_ABS32
-        Addend:          75
-  - Name:            .debug_ranges
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         ''
-  - Name:            .debug_macinfo
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         '00'
-  - Name:            .debug_pubnames
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         140000000200000000004B0000002A000000660000000000
-  - Name:            .rela.debug_pubnames
-    Type:            SHT_RELA
-    Link:            .symtab
-    AddressAlign:    0x0000000000000008
-    Info:            .debug_pubnames
-    Relocations:     
-      - Offset:          0x0000000000000006
-        Symbol:          .debug_info
-        Type:            R_AARCH64_ABS32
-  - Name:            .debug_pubtypes
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         160000000200000000004B00000043000000696E740000000000
-  - Name:            .rela.debug_pubtypes
-    Type:            SHT_RELA
-    Link:            .symtab
-    AddressAlign:    0x0000000000000008
-    Info:            .debug_pubtypes
-    Relocations:     
-      - Offset:          0x0000000000000006
-        Symbol:          .debug_info
-        Type:            R_AARCH64_ABS32
-  - Name:            .comment
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_MERGE, SHF_STRINGS ]
-    AddressAlign:    0x0000000000000001
-    Content:         00636C616E672076657273696F6E20362E302E312028746167732F52454C454153455F3630312F66696E616C2900
-  - Name:            .note.GNU-stack
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         ''
-  - Name:            .debug_frame
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000008
-    Content:         14000000FFFFFFFF04000800017C1E0C1F00000000000000140000000000000000000000000000000800000000000000
-  - Name:            .rela.debug_frame
-    Type:            SHT_RELA
-    Link:            .symtab
-    AddressAlign:    0x0000000000000008
-    Info:            .debug_frame
-    Relocations:     
-      - Offset:          0x000000000000001C
-        Symbol:          .debug_frame
-        Type:            R_AARCH64_ABS32
-      - Offset:          0x0000000000000020
-        Symbol:          .text
-        Type:            R_AARCH64_ABS64
-  - Name:            .debug_line
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000001
-    Content:         3C000000040021000000010101FB0E0D00010101010000000100000100726564756365642E68000000000000090200000000000000001305030A4B0204000101
-  - Name:            .rela.debug_line
-    Type:            SHT_RELA
-    Link:            .symtab
-    AddressAlign:    0x0000000000000008
-    Info:            .debug_line
-    Relocations:     
-      - Offset:          0x000000000000002E
-        Symbol:          .text
-        Type:            R_AARCH64_ABS64
-Symbols:         
-  - Name:            reduced.h
-    Type:            STT_FILE
-  - Name:            '$d.1'
-    Section:         .debug_str
-  - Name:            '$d.2'
-    Section:         .debug_abbrev
-  - Name:            '$d.3'
-    Section:         .debug_info
-  - Name:            '$d.4'
-    Section:         .debug_macinfo
-  - Name:            '$d.5'
-    Section:         .debug_pubnames
-  - Name:            '$d.6'
-    Section:         .debug_pubtypes
-  - Name:            '$d.7'
-    Section:         .comment
-  - Name:            '$d.8'
-    Section:         .debug_frame
-  - Name:            '$d.9'
-    Section:         .debug_line
-  - Name:            '$x.0'
-    Section:         .text
-  - Name:            .text
-    Type:            STT_SECTION
-    Section:         .text
-  - Name:            .debug_str
-    Type:            STT_SECTION
-    Section:         .debug_str
-  - Name:            .debug_abbrev
-    Type:            STT_SECTION
-    Section:         .debug_abbrev
-  - Name:            .debug_info
-    Type:            STT_SECTION
-    Section:         .debug_info
-  - Name:            .debug_frame
-    Type:            STT_SECTION
-    Section:         .debug_frame
-  - Name:            .debug_line
-    Type:            STT_SECTION
-    Section:         .debug_line
-  - Name:            f
-    Type:            STT_FUNC
-    Section:         .text
-    Size:            0x0000000000000008
-    Binding:         STB_GLOBAL
-DynamicSymbols:  
-...
diff --git a/src/llvm-project/lldb/unittests/ObjectFile/ELF/Inputs/sections-resolve-consistently.yaml b/src/llvm-project/lldb/unittests/ObjectFile/ELF/Inputs/sections-resolve-consistently.yaml
deleted file mode 100644
index 8a4bcd2..0000000
--- a/src/llvm-project/lldb/unittests/ObjectFile/ELF/Inputs/sections-resolve-consistently.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
---- !ELF
-FileHeader:
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_EXEC
-  Machine:         EM_X86_64
-  Entry:           0x0000000000400180
-Sections:
-  - Name:            .note.gnu.build-id
-    Type:            SHT_NOTE
-    Flags:           [ SHF_ALLOC ]
-    Address:         0x0000000000400158
-    AddressAlign:    0x0000000000000004
-    Content:         040000001400000003000000474E55003F3EC29E3FD83E49D18C4D49CD8A730CC13117B6
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Address:         0x0000000000400180
-    AddressAlign:    0x0000000000000010
-    Content:         554889E58B042500106000890425041060005DC3
-  - Name:            .data
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_WRITE, SHF_ALLOC ]
-    Address:         0x0000000000601000
-    AddressAlign:    0x0000000000000004
-    Content:         2F000000
-  - Name:            .bss
-    Type:            SHT_NOBITS
-    Flags:           [ SHF_WRITE, SHF_ALLOC ]
-    Address:         0x0000000000601004
-    AddressAlign:    0x0000000000000004
-    Size:            0x0000000000000004
-Symbols:
-  - Name:            Y
-    Type:            STT_OBJECT
-    Section:         .data
-    Value:           0x0000000000601000
-    Size:            0x0000000000000004
-    Binding:         STB_GLOBAL
-  - Name:            _start
-    Type:            STT_FUNC
-    Section:         .text
-    Value:           0x0000000000400180
-    Size:            0x0000000000000014
-    Binding:         STB_GLOBAL
-  - Name:            X
-    Type:            STT_OBJECT
-    Section:         .bss
-    Value:           0x0000000000601004
-    Size:            0x0000000000000004
-    Binding:         STB_GLOBAL
-...
diff --git a/src/llvm-project/lldb/unittests/ObjectFile/ELF/TestObjectFileELF.cpp b/src/llvm-project/lldb/unittests/ObjectFile/ELF/TestObjectFileELF.cpp
index a74986b..01ad2ab 100644
--- a/src/llvm-project/lldb/unittests/ObjectFile/ELF/TestObjectFileELF.cpp
+++ b/src/llvm-project/lldb/unittests/ObjectFile/ELF/TestObjectFileELF.cpp
@@ -8,7 +8,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
-#include "Plugins/SymbolVendor/ELF/SymbolVendorELF.h"
+#include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -29,35 +30,70 @@
 using namespace lldb;
 
 class ObjectFileELFTest : public testing::Test {
-public:
-  void SetUp() override {
-    FileSystem::Initialize();
-    HostInfo::Initialize();
-    ObjectFileELF::Initialize();
-    SymbolVendorELF::Initialize();
-  }
-
-  void TearDown() override {
-    SymbolVendorELF::Terminate();
-    ObjectFileELF::Terminate();
-    HostInfo::Terminate();
-    FileSystem::Terminate();
-  }
-
-protected:
+  SubsystemRAII<FileSystem, HostInfo, ObjectFileELF, SymbolFileSymtab>
+      subsystems;
 };
 
 TEST_F(ObjectFileELFTest, SectionsResolveConsistently) {
-  llvm::SmallString<128> obj;
-  ASSERT_NO_ERROR(llvm::sys::fs::createTemporaryFile(
-      "sections-resolve-consistently-%%%%%%", "obj", obj));
-  llvm::FileRemover remover(obj);
-  ASSERT_THAT_ERROR(
-      ReadYAMLObjectFile("sections-resolve-consistently.yaml", obj),
-      llvm::Succeeded());
+  auto ExpectedFile = TestFile::fromYaml(R"(
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_X86_64
+  Entry:           0x0000000000400180
+Sections:
+  - Name:            .note.gnu.build-id
+    Type:            SHT_NOTE
+    Flags:           [ SHF_ALLOC ]
+    Address:         0x0000000000400158
+    AddressAlign:    0x0000000000000004
+    Content:         040000001400000003000000474E55003F3EC29E3FD83E49D18C4D49CD8A730CC13117B6
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x0000000000400180
+    AddressAlign:    0x0000000000000010
+    Content:         554889E58B042500106000890425041060005DC3
+  - Name:            .data
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC ]
+    Address:         0x0000000000601000
+    AddressAlign:    0x0000000000000004
+    Content:         2F000000
+  - Name:            .bss
+    Type:            SHT_NOBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC ]
+    Address:         0x0000000000601004
+    AddressAlign:    0x0000000000000004
+    Size:            0x0000000000000004
+Symbols:
+  - Name:            Y
+    Type:            STT_OBJECT
+    Section:         .data
+    Value:           0x0000000000601000
+    Size:            0x0000000000000004
+    Binding:         STB_GLOBAL
+  - Name:            _start
+    Type:            STT_FUNC
+    Section:         .text
+    Value:           0x0000000000400180
+    Size:            0x0000000000000014
+    Binding:         STB_GLOBAL
+  - Name:            X
+    Type:            STT_OBJECT
+    Section:         .bss
+    Value:           0x0000000000601004
+    Size:            0x0000000000000004
+    Binding:         STB_GLOBAL
+...
+)");
+  ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded());
 
-  ModuleSpec spec{FileSpec(obj)};
-  spec.GetSymbolFileSpec().SetFile(obj, FileSpec::Style::native);
+  ModuleSpec spec{FileSpec(ExpectedFile->name())};
+  spec.GetSymbolFileSpec().SetFile(ExpectedFile->name(),
+                                   FileSpec::Style::native);
   auto module_sp = std::make_shared<Module>(spec);
   SectionList *list = module_sp->GetSectionList();
   ASSERT_NE(nullptr, list);
@@ -124,61 +160,128 @@
   EXPECT_EQ(Spec.GetUUID(), Uuid);
 }
 
-static void CHECK_ABS32(uint8_t *bytes, uint32_t offset, uint32_t addend) {
-  uint32_t res;
-  memcpy(&res, reinterpret_cast<uint32_t *>(bytes + offset), sizeof(uint32_t));
-  ASSERT_EQ(addend, res);
-}
+TEST_F(ObjectFileELFTest, GetSymtab_NoSymEntryPointArmThumbAddressClass) {
+  /*
+  // nosym-entrypoint-arm-thumb.s
+  .thumb_func
+  _start:
+      mov r0, #42
+      mov r7, #1
+      svc #0
+  // arm-linux-androideabi-as nosym-entrypoint-arm-thumb.s
+  //   -o nosym-entrypoint-arm-thumb.o
+  // arm-linux-androideabi-ld nosym-entrypoint-arm-thumb.o
+  //   -o nosym-entrypoint-arm-thumb -e 0x8075 -s
+  */
+  auto ExpectedFile = TestFile::fromYaml(R"(
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS32
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_ARM
+  Flags:           [ EF_ARM_SOFT_FLOAT, EF_ARM_EABI_VER5 ]
+  Entry:           0x0000000000008075
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x0000000000008074
+    AddressAlign:    0x0000000000000002
+    Content:         2A20012700DF
+  - Name:            .data
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC ]
+    Address:         0x0000000000009000
+    AddressAlign:    0x0000000000000001
+    Content:         ''
+  - Name:            .bss
+    Type:            SHT_NOBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC ]
+    Address:         0x0000000000009000
+    AddressAlign:    0x0000000000000001
+  - Name:            .note.gnu.gold-version
+    Type:            SHT_NOTE
+    AddressAlign:    0x0000000000000004
+    Content:         040000000900000004000000474E5500676F6C6420312E3131000000
+  - Name:            .ARM.attributes
+    Type:            SHT_ARM_ATTRIBUTES
+    AddressAlign:    0x0000000000000001
+    Content:         '4113000000616561626900010900000006020901'
+...
+)");
+  ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded());
 
-static void CHECK_ABS64(uint8_t *bytes, uint64_t offset, uint64_t addend) {
-  uint64_t res;
-  memcpy(&res, reinterpret_cast<uint64_t *>(bytes + offset), sizeof(uint64_t));
-  ASSERT_EQ(addend, res);
-}
-
-TEST_F(ObjectFileELFTest, TestAARCH64Relocations) {
-  llvm::SmallString<128> obj;
-  ASSERT_NO_ERROR(llvm::sys::fs::createTemporaryFile(
-      "debug-info-relocations-%%%%%%", "obj", obj));
-  llvm::FileRemover remover(obj);
-  ASSERT_THAT_ERROR(ReadYAMLObjectFile("debug-info-relocations.pcm.yaml", obj),
-                    llvm::Succeeded());
-
-  ModuleSpec spec{FileSpec(obj)};
-  spec.GetSymbolFileSpec().SetFile(obj, FileSpec::Style::native);
+  ModuleSpec spec{FileSpec(ExpectedFile->name())};
+  spec.GetSymbolFileSpec().SetFile(ExpectedFile->name(),
+                                   FileSpec::Style::native);
   auto module_sp = std::make_shared<Module>(spec);
 
-  auto objfile = static_cast<ObjectFileELF *>(module_sp->GetObjectFile());
-  SectionList *section_list = objfile->GetSectionList();
-  ASSERT_NE(nullptr, section_list);
-
-  auto debug_info_sp =
-      section_list->FindSectionByName(ConstString(".debug_info"));
-  ASSERT_NE(nullptr, debug_info_sp);
-  objfile->RelocateSection(debug_info_sp.get());
-
-  DataExtractor data;
-  // length of 0x10 is not needed but length 0x0 crashes
-  objfile->GetData(0x00, 0x10, data);
-  DataBufferSP &data_buffer_sp = data.GetSharedDataBuffer();
-  uint8_t *bytes = data_buffer_sp->GetBytes();
-
-  addr_t debug_info_offset = debug_info_sp->GetFileOffset();
-  bytes += debug_info_offset;
-
-  // Sanity check - The first byte from the yaml file is 0x47
-  ASSERT_EQ(0x47, *bytes);
-
-  // .rela.debug_info contains 9 relocations:
-  // 7 R_AARCH64_ABS32 - 2 R_AARCH64_ABS64
-  // None have a value. Four have addends.
-  CHECK_ABS32(bytes, 0x6, 0);
-  CHECK_ABS32(bytes, 0xC, 0);
-  CHECK_ABS32(bytes, 0x12, 45);
-  CHECK_ABS32(bytes, 0x16, 0);
-  CHECK_ABS32(bytes, 0x1A, 55);
-  CHECK_ABS64(bytes, 0x1E, 0);
-  CHECK_ABS64(bytes, 0x2B, 0);
-  CHECK_ABS32(bytes, 0x39, 73);
-  CHECK_ABS32(bytes, 0x44, 75);
+  auto entry_point_addr = module_sp->GetObjectFile()->GetEntryPointAddress();
+  ASSERT_TRUE(entry_point_addr.GetOffset() & 1);
+  // Decrease the offsite by 1 to make it into a breakable address since this
+  // is Thumb.
+  entry_point_addr.SetOffset(entry_point_addr.GetOffset() - 1);
+  ASSERT_EQ(entry_point_addr.GetAddressClass(),
+            AddressClass::eCodeAlternateISA);
 }
+
+TEST_F(ObjectFileELFTest, GetSymtab_NoSymEntryPointArmAddressClass) {
+  /*
+  // nosym-entrypoint-arm.s
+  _start:
+      movs r0, #42
+      movs r7, #1
+      svc #0
+  // arm-linux-androideabi-as nosym-entrypoint-arm.s
+  //   -o nosym-entrypoint-arm.o
+  // arm-linux-androideabi-ld nosym-entrypoint-arm.o
+  //   -o nosym-entrypoint-arm -e 0x8074 -s
+  */
+  auto ExpectedFile = TestFile::fromYaml(R"(
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS32
+  Data:            ELFDATA2LSB
+  Type:            ET_EXEC
+  Machine:         EM_ARM
+  Flags:           [ EF_ARM_SOFT_FLOAT, EF_ARM_EABI_VER5 ]
+  Entry:           0x0000000000008074
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x0000000000008074
+    AddressAlign:    0x0000000000000004
+    Content:         2A00A0E30170A0E3000000EF
+  - Name:            .data
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC ]
+    Address:         0x0000000000009000
+    AddressAlign:    0x0000000000000001
+    Content:         ''
+  - Name:            .bss
+    Type:            SHT_NOBITS
+    Flags:           [ SHF_WRITE, SHF_ALLOC ]
+    Address:         0x0000000000009000
+    AddressAlign:    0x0000000000000001
+  - Name:            .note.gnu.gold-version
+    Type:            SHT_NOTE
+    AddressAlign:    0x0000000000000004
+    Content:         040000000900000004000000474E5500676F6C6420312E3131000000
+  - Name:            .ARM.attributes
+    Type:            SHT_ARM_ATTRIBUTES
+    AddressAlign:    0x0000000000000001
+    Content:         '4113000000616561626900010900000006010801'
+...
+)");
+  ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded());
+
+  ModuleSpec spec{FileSpec(ExpectedFile->name())};
+  spec.GetSymbolFileSpec().SetFile(ExpectedFile->name(),
+                                   FileSpec::Style::native);
+  auto module_sp = std::make_shared<Module>(spec);
+
+  auto entry_point_addr = module_sp->GetObjectFile()->GetEntryPointAddress();
+  ASSERT_EQ(entry_point_addr.GetAddressClass(), AddressClass::eCode);
+}
\ No newline at end of file
diff --git a/src/llvm-project/lldb/unittests/ObjectFile/PECOFF/CMakeLists.txt b/src/llvm-project/lldb/unittests/ObjectFile/PECOFF/CMakeLists.txt
new file mode 100644
index 0000000..3ce5a7b
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/ObjectFile/PECOFF/CMakeLists.txt
@@ -0,0 +1,8 @@
+add_lldb_unittest(ObjectFilePECOFFTests
+  TestPECallFrameInfo.cpp
+
+  LINK_LIBS
+    lldbUtilityHelpers
+    lldbPluginObjectFilePECOFF
+    LLVMTestingSupport
+  )
diff --git a/src/llvm-project/lldb/unittests/ObjectFile/PECOFF/TestPECallFrameInfo.cpp b/src/llvm-project/lldb/unittests/ObjectFile/PECOFF/TestPECallFrameInfo.cpp
new file mode 100644
index 0000000..4e9182ec
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/ObjectFile/PECOFF/TestPECallFrameInfo.cpp
@@ -0,0 +1,328 @@
+//===-- TestPECallFrameInfo.cpp ------------------------------*- C++ -*-===//
+//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "gtest/gtest.h"
+
+#include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
+#include "Plugins/Process/Utility/lldb-x86-register-enums.h"
+#include "TestingSupport/SubsystemRAII.h"
+#include "TestingSupport/TestUtilities.h"
+
+#include "lldb/Core/Module.h"
+#include "lldb/Symbol/CallFrameInfo.h"
+#include "lldb/Symbol/UnwindPlan.h"
+#include "llvm/Testing/Support/Error.h"
+
+using namespace lldb_private;
+using namespace lldb;
+
+class PECallFrameInfoTest : public testing::Test {
+  SubsystemRAII<FileSystem, ObjectFilePECOFF> subsystems;
+
+protected:
+  void GetUnwindPlan(addr_t file_addr, UnwindPlan &plan) const;
+};
+
+void PECallFrameInfoTest::GetUnwindPlan(addr_t file_addr, UnwindPlan &plan) const {
+  llvm::Expected<TestFile> ExpectedFile = TestFile::fromYaml(
+      R"(
+--- !COFF
+OptionalHeader:  
+  AddressOfEntryPoint: 0
+  ImageBase:       16777216
+  SectionAlignment: 4096
+  FileAlignment:   512
+  MajorOperatingSystemVersion: 6
+  MinorOperatingSystemVersion: 0
+  MajorImageVersion: 0
+  MinorImageVersion: 0
+  MajorSubsystemVersion: 6
+  MinorSubsystemVersion: 0
+  Subsystem:       IMAGE_SUBSYSTEM_WINDOWS_CUI
+  DLLCharacteristics: [ IMAGE_DLL_CHARACTERISTICS_HIGH_ENTROPY_VA, IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE, IMAGE_DLL_CHARACTERISTICS_NX_COMPAT ]
+  SizeOfStackReserve: 1048576
+  SizeOfStackCommit: 4096
+  SizeOfHeapReserve: 1048576
+  SizeOfHeapCommit: 4096
+  ExportTable:     
+    RelativeVirtualAddress: 0
+    Size:            0
+  ImportTable:     
+    RelativeVirtualAddress: 0
+    Size:            0
+  ResourceTable:   
+    RelativeVirtualAddress: 0
+    Size:            0
+  ExceptionTable:  
+    RelativeVirtualAddress: 12288
+    Size:            60
+  CertificateTable: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  BaseRelocationTable: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  Debug:           
+    RelativeVirtualAddress: 0
+    Size:            0
+  Architecture:    
+    RelativeVirtualAddress: 0
+    Size:            0
+  GlobalPtr:       
+    RelativeVirtualAddress: 0
+    Size:            0
+  TlsTable:        
+    RelativeVirtualAddress: 0
+    Size:            0
+  LoadConfigTable: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  BoundImport:     
+    RelativeVirtualAddress: 0
+    Size:            0
+  IAT:             
+    RelativeVirtualAddress: 0
+    Size:            0
+  DelayImportDescriptor: 
+    RelativeVirtualAddress: 0
+    Size:            0
+  ClrRuntimeHeader: 
+    RelativeVirtualAddress: 0
+    Size:            0
+header:          
+  Machine:         IMAGE_FILE_MACHINE_AMD64
+  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE ]
+sections:        
+  - Name:            .text
+    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  4096
+    VirtualSize:     4096
+  - Name:            .rdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  8192
+    VirtualSize:     68
+    SectionData:     010C06000C3208F006E00470036002302105020005540D0000100000001100000020000019400E352F74670028646600213465001A3315015E000EF00CE00AD008C00650
+
+
+# Unwind info at 0x2000:
+# 01 0C 06 00    No chained info, prolog size = 0xC, unwind codes size is 6 words, no frame register
+# 0C 32          UOP_AllocSmall(2) 3 * 8 + 8 bytes, offset in prolog is 0xC
+# 08 F0          UOP_PushNonVol(0) R15(0xF), offset in prolog is 8
+# 06 E0          UOP_PushNonVol(0) R14(0xE), offset in prolog is 6
+# 04 70          UOP_PushNonVol(0) RDI(7), offset in prolog is 4
+# 03 60          UOP_PushNonVol(0) RSI(6), offset in prolog is 3
+# 02 30          UOP_PushNonVol(0) RBX(3), offset in prolog is 2
+# Corresponding prolog:
+# 00    push    rbx

+# 02    push    rsi

+# 03    push    rdi

+# 04    push    r14

+# 06    push    r15

+# 08    sub     rsp, 20h

+
+# Unwind info at 0x2010:
+# 21 05 02 00    Has chained info, prolog size = 5, unwind codes size is 2 words, no frame register
+# 05 54 0D 00    UOP_SaveNonVol(4) RBP(5) to RSP + 0xD * 8, offset in prolog is 5
+# Chained runtime function:
+# 00 10 00 00    Start address is 0x1000
+# 00 11 00 00    End address is 0x1100
+# 00 20 00 00    Unwind info RVA is 0x2000
+# Corresponding prolog:
+# 00    mov     [rsp+68h], rbp
+
+# Unwind info at 0x2024:
+# 19 40 0E 35    No chained info, prolog size = 0x40, unwind codes size is 0xE words, frame register is RBP, frame register offset is RSP + 3 * 16
+# 2F 74 67 00    UOP_SaveNonVol(4) RDI(7) to RSP + 0x67 * 8, offset in prolog is 0x2F
+# 28 64 66 00    UOP_SaveNonVol(4) RSI(6) to RSP + 0x66 * 8, offset in prolog is 0x28
+# 21 34 65 00    UOP_SaveNonVol(4) RBX(3) to RSP + 0x65 * 8, offset in prolog is 0x21
+# 1A 33          UOP_SetFPReg(3), offset in prolog is 0x1A
+# 15 01 5E 00    UOP_AllocLarge(1) 0x5E * 8 bytes, offset in prolog is 0x15
+# 0E F0          UOP_PushNonVol(0) R15(0xF), offset in prolog is 0xE
+# 0C E0          UOP_PushNonVol(0) R14(0xE), offset in prolog is 0xC
+# 0A D0          UOP_PushNonVol(0) R13(0xD), offset in prolog is 0xA
+# 08 C0          UOP_PushNonVol(0) R12(0xC), offset in prolog is 8
+# 06 50          UOP_PushNonVol(0) RBP(5), offset in prolog is 6
+# Corresponding prolog:
+# 00    mov     [rsp+8], rcx

+# 05    push    rbp

+# 06    push    r12

+# 08    push    r13

+# 0A    push    r14

+# 0C    push    r15

+# 0E    sub     rsp, 2F0h

+# 15    lea     rbp, [rsp+30h]

+# 1A    mov     [rbp+2F8h], rbx

+# 21    mov     [rbp+300h], rsi

+# 28    mov     [rbp+308h], rdi

+
+  - Name:            .pdata
+    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
+    VirtualAddress:  12288
+    VirtualSize:     60
+    SectionData:     000000000000000000000000000000000000000000000000001000000011000000200000001100000012000010200000001200000013000024200000
+
+# 00 00 00 00
+# 00 00 00 00    Test correct processing of empty runtime functions at begin
+# 00 00 00 00
+
+# 00 00 00 00
+# 00 00 00 00    Test correct processing of empty runtime functions at begin
+# 00 00 00 00
+
+# 00 10 00 00    Start address is 0x1000
+# 00 11 00 00    End address is 0x1100
+# 00 20 00 00    Unwind info RVA is 0x2000
+
+# 00 11 00 00    Start address is 0x1100
+# 00 12 00 00    End address is 0x1200
+# 10 20 00 00    Unwind info RVA is 0x2010
+
+# 00 12 00 00    Start address is 0x1200
+# 00 13 00 00    End address is 0x1300
+# 24 20 00 00    Unwind info RVA is 0x2024
+
+symbols:         []
+...
+)");
+  ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded());
+
+  ModuleSP module_sp = std::make_shared<Module>(ModuleSpec(FileSpec(ExpectedFile->name())));
+  ObjectFile *object_file = module_sp->GetObjectFile();
+  ASSERT_NE(object_file, nullptr);
+
+  std::unique_ptr<CallFrameInfo> cfi = object_file->CreateCallFrameInfo();
+  ASSERT_NE(cfi.get(), nullptr);
+
+  SectionList *sect_list = object_file->GetSectionList();
+  ASSERT_NE(sect_list, nullptr);
+
+  EXPECT_TRUE(cfi->GetUnwindPlan(Address(file_addr, sect_list), plan));
+}
+
+TEST_F(PECallFrameInfoTest, Basic_eh) {
+  UnwindPlan plan(eRegisterKindLLDB);
+  GetUnwindPlan(0x1001080, plan);
+  EXPECT_EQ(plan.GetRowCount(), 7);
+
+  UnwindPlan::Row row;
+  row.SetOffset(0);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 8);
+  row.SetRegisterLocationToIsCFAPlusOffset(lldb_rsp_x86_64, 0, true);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rip_x86_64, -8, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(0), row);
+
+  row.SetOffset(2);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x10);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rbx_x86_64, -0x10, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(1), row);
+
+  row.SetOffset(3);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x18);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rsi_x86_64, -0x18, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(2), row);
+
+  row.SetOffset(4);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x20);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rdi_x86_64, -0x20, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(3), row);
+
+  row.SetOffset(6);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x28);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_r14_x86_64, -0x28, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(4), row);
+
+  row.SetOffset(8);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x30);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_r15_x86_64, -0x30, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(5), row);
+
+  row.SetOffset(0xC);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x50);
+  EXPECT_EQ(*plan.GetRowAtIndex(6), row);
+}
+
+TEST_F(PECallFrameInfoTest, Chained_eh) {
+  UnwindPlan plan(eRegisterKindLLDB);
+  GetUnwindPlan(0x1001180, plan);
+  EXPECT_EQ(plan.GetRowCount(), 2);
+
+  UnwindPlan::Row row;
+  row.SetOffset(0);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x50);
+  row.SetRegisterLocationToIsCFAPlusOffset(lldb_rsp_x86_64, 0, true);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rip_x86_64, -8, true);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rbx_x86_64, -0x10, true);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rsi_x86_64, -0x18, true);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rdi_x86_64, -0x20, true);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_r14_x86_64, -0x28, true);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_r15_x86_64, -0x30, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(0), row);
+
+  row.SetOffset(5);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rbp_x86_64, 0x18, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(1), row);
+}
+
+TEST_F(PECallFrameInfoTest, Frame_reg_eh) {
+  UnwindPlan plan(eRegisterKindLLDB);
+  GetUnwindPlan(0x1001280, plan);
+  EXPECT_EQ(plan.GetRowCount(), 11);
+
+  UnwindPlan::Row row;
+  row.SetOffset(0);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 8);
+  row.SetRegisterLocationToIsCFAPlusOffset(lldb_rsp_x86_64, 0, true);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rip_x86_64, -8, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(0), row);
+
+  row.SetOffset(6);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x10);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rbp_x86_64, -0x10, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(1), row);
+
+  row.SetOffset(8);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x18);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_r12_x86_64, -0x18, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(2), row);
+
+  row.SetOffset(0xA);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x20);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_r13_x86_64, -0x20, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(3), row);
+
+  row.SetOffset(0xC);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x28);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_r14_x86_64, -0x28, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(4), row);
+
+  row.SetOffset(0xE);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x30);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_r15_x86_64, -0x30, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(5), row);
+
+  row.SetOffset(0x15);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rsp_x86_64, 0x320);
+  EXPECT_EQ(*plan.GetRowAtIndex(6), row);
+
+  row.SetOffset(0x1A);
+  row.GetCFAValue().SetIsRegisterPlusOffset(lldb_rbp_x86_64, 0x2F0);
+  EXPECT_EQ(*plan.GetRowAtIndex(7), row);
+
+  row.SetOffset(0x21);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rbx_x86_64, 8, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(8), row);
+
+  row.SetOffset(0x28);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rsi_x86_64, 0x10, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(9), row);
+
+  row.SetOffset(0x2F);
+  row.SetRegisterLocationToAtCFAPlusOffset(lldb_rdi_x86_64, 0x18, true);
+  EXPECT_EQ(*plan.GetRowAtIndex(10), row);
+}
diff --git a/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp b/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp
index afba5c6..d56e9cf 100644
--- a/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp
+++ b/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteClientBaseTest.cpp
@@ -12,7 +12,7 @@
 #include "Plugins/Process/Utility/LinuxSignals.h"
 #include "Plugins/Process/gdb-remote/GDBRemoteClientBase.h"
 #include "Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h"
-#include "lldb/Utility/StreamGDBRemote.h"
+#include "lldb/Utility/GDBRemote.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Testing/Support/Error.h"
 
diff --git a/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp b/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
index 4a5741c..e52f378 100644
--- a/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
+++ b/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
@@ -384,9 +384,9 @@
 
   // Since the line is exceeding 80 characters.
   std::string expected_packet1 =
-      R"(jTraceStart:{"buffersize" : 8192,"metabuffersize" : 8192,"params" :)";
+      R"(jTraceStart:{"buffersize":8192,"metabuffersize":8192,"params":)";
   std::string expected_packet2 =
-      R"( {"psb" : 1,"tracetech" : "intel-pt"},"threadid" : 35,"type" : 1})";
+      R"({"psb":1,"tracetech":"intel-pt"},"threadid":35,"type":1})";
   HandlePacket(server, (expected_packet1 + expected_packet2), "1");
   ASSERT_TRUE(error.Success());
   ASSERT_EQ(result.get(), 1u);
@@ -409,8 +409,7 @@
     return client.SendStopTracePacket(trace_id, thread_id);
   });
 
-  const char *expected_packet =
-      R"(jTraceStop:{"threadid" : 35,"traceid" : 3})";
+  const char *expected_packet = R"(jTraceStop:{"threadid":35,"traceid":3})";
   HandlePacket(server, expected_packet, "OK");
   ASSERT_TRUE(result.get().Success());
 
@@ -435,8 +434,8 @@
   });
 
   std::string expected_packet1 =
-      R"(jTraceBufferRead:{"buffersize" : 32,"offset" : 0,"threadid" : 35,)";
-  std::string expected_packet2 = R"("traceid" : 3})";
+      R"(jTraceBufferRead:{"buffersize":32,"offset":0,"threadid":35,)";
+  std::string expected_packet2 = R"("traceid":3})";
   HandlePacket(server, expected_packet1+expected_packet2, "123456");
   ASSERT_TRUE(result.get().Success());
   ASSERT_EQ(buffer.size(), 3u);
@@ -467,8 +466,8 @@
   });
 
   std::string expected_packet1 =
-      R"(jTraceMetaRead:{"buffersize" : 32,"offset" : 0,"threadid" : 35,)";
-  std::string expected_packet2 = R"("traceid" : 3})";
+      R"(jTraceMetaRead:{"buffersize":32,"offset":0,"threadid":35,)";
+  std::string expected_packet2 = R"("traceid":3})";
   HandlePacket(server, expected_packet1+expected_packet2, "123456");
   ASSERT_TRUE(result.get().Success());
   ASSERT_EQ(buffer.size(), 3u);
@@ -497,11 +496,10 @@
   });
 
   const char *expected_packet =
-      R"(jTraceConfigRead:{"threadid" : 35,"traceid" : 3})";
+      R"(jTraceConfigRead:{"threadid":35,"traceid":3})";
   std::string response1 =
-      R"({"buffersize" : 8192,"params" : {"psb" : 1,"tracetech" : "intel-pt"})";
-  std::string response2 =
-      R"(],"metabuffersize" : 8192,"threadid" : 35,"type" : 1}])";
+      R"({"buffersize":8192,"params":{"psb":1,"tracetech":"intel-pt"})";
+  std::string response2 = R"(],"metabuffersize":8192,"threadid":35,"type":1}])";
   HandlePacket(server, expected_packet, response1+response2);
   ASSERT_TRUE(result.get().Success());
   ASSERT_EQ(options.getTraceBufferSize(), 8192u);
diff --git a/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h b/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h
index 76f92d8..53e94a3 100644
--- a/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h
+++ b/src/llvm-project/lldb/unittests/Process/gdb-remote/GDBRemoteTestUtils.h
@@ -46,6 +46,8 @@
     return dst_len;
   };
 
+  lldb::IOObjectSP GetReadObject() { return lldb::IOObjectSP(); }
+
   std::vector<std::string> *m_packets;
 };
 
diff --git a/src/llvm-project/lldb/unittests/Process/minidump/CMakeLists.txt b/src/llvm-project/lldb/unittests/Process/minidump/CMakeLists.txt
index bc4b713..ad5f188 100644
--- a/src/llvm-project/lldb/unittests/Process/minidump/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/Process/minidump/CMakeLists.txt
@@ -19,7 +19,6 @@
    fizzbuzz_no_heap.dmp
    fizzbuzz_wow64.dmp
    linux-x86_64.dmp
-   linux-x86_64_not_crashed.dmp
    regions-memlist64.dmp
    )
 
diff --git a/src/llvm-project/lldb/unittests/Process/minidump/Inputs/dump-content.dmp b/src/llvm-project/lldb/unittests/Process/minidump/Inputs/dump-content.dmp
deleted file mode 100644
index 18eb59f..0000000
--- a/src/llvm-project/lldb/unittests/Process/minidump/Inputs/dump-content.dmp
+++ /dev/null
Binary files differ
diff --git a/src/llvm-project/lldb/unittests/Process/minidump/Inputs/linux-x86_64_not_crashed.dmp b/src/llvm-project/lldb/unittests/Process/minidump/Inputs/linux-x86_64_not_crashed.dmp
deleted file mode 100644
index ad4b61a..0000000
--- a/src/llvm-project/lldb/unittests/Process/minidump/Inputs/linux-x86_64_not_crashed.dmp
+++ /dev/null
Binary files differ
diff --git a/src/llvm-project/lldb/unittests/Process/minidump/MinidumpParserTest.cpp b/src/llvm-project/lldb/unittests/Process/minidump/MinidumpParserTest.cpp
index cd02d95..94bb1b3 100644
--- a/src/llvm-project/lldb/unittests/Process/minidump/MinidumpParserTest.cpp
+++ b/src/llvm-project/lldb/unittests/Process/minidump/MinidumpParserTest.cpp
@@ -10,6 +10,7 @@
 #include "Plugins/Process/minidump/MinidumpTypes.h"
 #include "Plugins/Process/minidump/RegisterContextMinidump_x86_32.h"
 #include "Plugins/Process/minidump/RegisterContextMinidump_x86_64.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Target/MemoryRegionInfo.h"
@@ -19,10 +20,11 @@
 #include "lldb/Utility/FileSpec.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/Optional.h"
-#include "llvm/ObjectYAML/MinidumpYAML.h"
+#include "llvm/ObjectYAML/yaml2obj.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
+#include "llvm/Support/YAMLTraits.h"
 #include "llvm/Testing/Support/Error.h"
 #include "gtest/gtest.h"
 
@@ -36,9 +38,7 @@
 
 class MinidumpParserTest : public testing::Test {
 public:
-  void SetUp() override { FileSystem::Initialize(); }
-
-  void TearDown() override { FileSystem::Terminate(); }
+  SubsystemRAII<FileSystem> subsystems;
 
   void SetUpData(const char *minidump_filename) {
     std::string filename = GetInputFilePath(minidump_filename);
@@ -54,8 +54,10 @@
   llvm::Error SetUpFromYaml(llvm::StringRef yaml) {
     std::string data;
     llvm::raw_string_ostream os(data);
-    if (llvm::Error E = llvm::MinidumpYAML::writeAsBinary(yaml, os))
-      return E;
+    llvm::yaml::Input YIn(yaml);
+    if (!llvm::yaml::convertYAML(YIn, os, [](const llvm::Twine &Msg) {}))
+      return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                     "convertYAML() failed");
 
     os.flush();
     auto data_buffer_sp =
@@ -73,16 +75,16 @@
 TEST_F(MinidumpParserTest, InvalidMinidump) {
   std::string duplicate_streams;
   llvm::raw_string_ostream os(duplicate_streams);
-  ASSERT_THAT_ERROR(llvm::MinidumpYAML::writeAsBinary(R"(
+  llvm::yaml::Input YIn(R"(
 --- !minidump
 Streams:
   - Type:            LinuxAuxv
     Content:         DEADBEEFBAADF00D
   - Type:            LinuxAuxv
     Content:         DEADBEEFBAADF00D
-  )",
-                                                      os),
-                    llvm::Succeeded());
+  )");
+
+  ASSERT_TRUE(llvm::yaml::convertYAML(YIn, os, [](const llvm::Twine &Msg){}));
   os.flush();
   auto data_buffer_sp = std::make_shared<DataBufferHeap>(
       duplicate_streams.data(), duplicate_streams.size());
@@ -249,10 +251,10 @@
 
 TEST_F(MinidumpParserTest, GetExceptionStream) {
   SetUpData("linux-x86_64.dmp");
-  const MinidumpExceptionStream *exception_stream =
+  const llvm::minidump::ExceptionStream *exception_stream =
       parser->GetExceptionStream();
   ASSERT_NE(nullptr, exception_stream);
-  ASSERT_EQ(11UL, exception_stream->exception_record.exception_code);
+  ASSERT_EQ(11UL, exception_stream->ExceptionRecord.ExceptionCode);
 }
 
 void check_mem_range_exists(MinidumpParser &parser, const uint64_t range_start,
@@ -329,55 +331,63 @@
   EXPECT_FALSE(parser->FindMemoryRange(0x7ffe0000 + 4096).hasValue());
 }
 
-void check_region(MinidumpParser &parser, lldb::addr_t addr, lldb::addr_t start,
-                  lldb::addr_t end, MemoryRegionInfo::OptionalBool read,
-                  MemoryRegionInfo::OptionalBool write,
-                  MemoryRegionInfo::OptionalBool exec,
-                  MemoryRegionInfo::OptionalBool mapped,
-                  ConstString name = ConstString()) {
-  auto range_info = parser.GetMemoryRegionInfo(addr);
-  EXPECT_EQ(start, range_info.GetRange().GetRangeBase());
-  EXPECT_EQ(end, range_info.GetRange().GetRangeEnd());
-  EXPECT_EQ(read, range_info.GetReadable());
-  EXPECT_EQ(write, range_info.GetWritable());
-  EXPECT_EQ(exec, range_info.GetExecutable());
-  EXPECT_EQ(mapped, range_info.GetMapped());
-  EXPECT_EQ(name, range_info.GetName());
-}
-
-// Same as above function where addr == start
-void check_region(MinidumpParser &parser, lldb::addr_t start, lldb::addr_t end,
-                  MemoryRegionInfo::OptionalBool read,
-                  MemoryRegionInfo::OptionalBool write,
-                  MemoryRegionInfo::OptionalBool exec,
-                  MemoryRegionInfo::OptionalBool mapped,
-                  ConstString name = ConstString()) {
-  check_region(parser, start, start, end, read, write, exec, mapped, name);
-}
-
-
 constexpr auto yes = MemoryRegionInfo::eYes;
 constexpr auto no = MemoryRegionInfo::eNo;
 constexpr auto unknown = MemoryRegionInfo::eDontKnow;
 
 TEST_F(MinidumpParserTest, GetMemoryRegionInfo) {
-  SetUpData("fizzbuzz_wow64.dmp");
+  ASSERT_THAT_ERROR(SetUpFromYaml(R"(
+--- !minidump
+Streams:
+  - Type:            MemoryInfoList
+    Memory Ranges:
+      - Base Address:    0x0000000000000000
+        Allocation Protect: [  ]
+        Region Size:     0x0000000000010000
+        State:           [ MEM_FREE ]
+        Protect:         [ PAGE_NO_ACCESS ]
+        Type:            [  ]
+      - Base Address:    0x0000000000010000
+        Allocation Protect: [ PAGE_READ_WRITE ]
+        Region Size:     0x0000000000021000
+        State:           [ MEM_COMMIT ]
+        Type:            [ MEM_MAPPED ]
+      - Base Address:    0x0000000000040000
+        Allocation Protect: [ PAGE_EXECUTE_WRITE_COPY ]
+        Region Size:     0x0000000000001000
+        State:           [ MEM_COMMIT ]
+        Protect:         [ PAGE_READ_ONLY ]
+        Type:            [ MEM_IMAGE ]
+      - Base Address:    0x000000007FFE0000
+        Allocation Protect: [ PAGE_READ_ONLY ]
+        Region Size:     0x0000000000001000
+        State:           [ MEM_COMMIT ]
+        Type:            [ MEM_PRIVATE ]
+      - Base Address:    0x000000007FFE1000
+        Allocation Base: 0x000000007FFE0000
+        Allocation Protect: [ PAGE_READ_ONLY ]
+        Region Size:     0x000000000000F000
+        State:           [ MEM_RESERVE ]
+        Protect:         [ PAGE_NO_ACCESS ]
+        Type:            [ MEM_PRIVATE ]
+...
+)"),
+                    llvm::Succeeded());
 
-  check_region(*parser, 0x00000000, 0x00010000, no, no, no, no);
-  check_region(*parser, 0x00010000, 0x00020000, yes, yes, no, yes);
-  check_region(*parser, 0x00020000, 0x00030000, yes, yes, no, yes);
-  check_region(*parser, 0x00030000, 0x00031000, yes, yes, no, yes);
-  check_region(*parser, 0x00031000, 0x00040000, no, no, no, no);
-  check_region(*parser, 0x00040000, 0x00041000, yes, no, no, yes);
-
-  // Check addresses contained inside ranges
-  check_region(*parser, 0x00000001, 0x00000000, 0x00010000, no, no, no, no);
-  check_region(*parser, 0x0000ffff, 0x00000000, 0x00010000, no, no, no, no);
-  check_region(*parser, 0x00010001, 0x00010000, 0x00020000, yes, yes, no, yes);
-  check_region(*parser, 0x0001ffff, 0x00010000, 0x00020000, yes, yes, no, yes);
-
-  // Test that an address after the last entry maps to rest of the memory space
-  check_region(*parser, 0x7fff0000, 0x7fff0000, UINT64_MAX, no, no, no, no);
+  EXPECT_THAT(
+      parser->BuildMemoryRegions(),
+      testing::Pair(testing::ElementsAre(
+                        MemoryRegionInfo({0x0, 0x10000}, no, no, no, no,
+                                         ConstString(), unknown, 0),
+                        MemoryRegionInfo({0x10000, 0x21000}, yes, yes, no, yes,
+                                         ConstString(), unknown, 0),
+                        MemoryRegionInfo({0x40000, 0x1000}, yes, no, no, yes,
+                                         ConstString(), unknown, 0),
+                        MemoryRegionInfo({0x7ffe0000, 0x1000}, yes, no, no, yes,
+                                         ConstString(), unknown, 0),
+                        MemoryRegionInfo({0x7ffe1000, 0xf000}, no, no, no, yes,
+                                         ConstString(), unknown, 0)),
+                    true));
 }
 
 TEST_F(MinidumpParserTest, GetMemoryRegionInfoFromMemoryList) {
@@ -393,30 +403,33 @@
 ...
 )"),
                     llvm::Succeeded());
+
   // Test we can get memory regions from the MINIDUMP_MEMORY_LIST stream when
   // we don't have a MemoryInfoListStream.
 
-  // Test addres before the first entry comes back with nothing mapped up
-  // to first valid region info
-  check_region(*parser, 0x00000000, 0x00001000, no, no, no, no);
-  check_region(*parser, 0x00001000, 0x00001010, yes, unknown, unknown, yes);
-  check_region(*parser, 0x00001010, 0x00002000, no, no, no, no);
-  check_region(*parser, 0x00002000, 0x00002020, yes, unknown, unknown, yes);
-  check_region(*parser, 0x00002020, UINT64_MAX, no, no, no, no);
+  EXPECT_THAT(
+      parser->BuildMemoryRegions(),
+      testing::Pair(testing::ElementsAre(
+                        MemoryRegionInfo({0x1000, 0x10}, yes, unknown, unknown,
+                                         yes, ConstString(), unknown, 0),
+                        MemoryRegionInfo({0x2000, 0x20}, yes, unknown, unknown,
+                                         yes, ConstString(), unknown, 0)),
+                    false));
 }
 
 TEST_F(MinidumpParserTest, GetMemoryRegionInfoFromMemory64List) {
   SetUpData("regions-memlist64.dmp");
+
   // Test we can get memory regions from the MINIDUMP_MEMORY64_LIST stream when
   // we don't have a MemoryInfoListStream.
-
-  // Test addres before the first entry comes back with nothing mapped up
-  // to first valid region info
-  check_region(*parser, 0x00000000, 0x00001000, no, no, no, no);
-  check_region(*parser, 0x00001000, 0x00001010, yes, unknown, unknown, yes);
-  check_region(*parser, 0x00001010, 0x00002000, no, no, no, no);
-  check_region(*parser, 0x00002000, 0x00002020, yes, unknown, unknown, yes);
-  check_region(*parser, 0x00002020, UINT64_MAX, no, no, no, no);
+  EXPECT_THAT(
+      parser->BuildMemoryRegions(),
+      testing::Pair(testing::ElementsAre(
+                        MemoryRegionInfo({0x1000, 0x10}, yes, unknown, unknown,
+                                         yes, ConstString(), unknown, 0),
+                        MemoryRegionInfo({0x2000, 0x20}, yes, unknown, unknown,
+                                         yes, ConstString(), unknown, 0)),
+                    false));
 }
 
 TEST_F(MinidumpParserTest, GetMemoryRegionInfoLinuxMaps) {
@@ -428,57 +441,34 @@
       400d9000-400db000 r-xp 00000000 b3:04 227        /system/bin/app_process
       400db000-400dc000 r--p 00001000 b3:04 227        /system/bin/app_process
       400dc000-400dd000 rw-p 00000000 00:00 0
-      400dd000-400ec000 r-xp 00000000 b3:04 300        /system/bin/linker
       400ec000-400ed000 r--p 00000000 00:00 0
-      400ed000-400ee000 r--p 0000f000 b3:04 300        /system/bin/linker
       400ee000-400ef000 rw-p 00010000 b3:04 300        /system/bin/linker
-      400ef000-400fb000 rw-p 00000000 00:00 0
-      400fb000-400fc000 r-xp 00000000 b3:04 1096       /system/lib/liblog.so
       400fc000-400fd000 rwxp 00001000 b3:04 1096       /system/lib/liblog.so
-      400fd000-400ff000 r-xp 00002000 b3:04 1096       /system/lib/liblog.so
-      400ff000-40100000 r--p 00003000 b3:04 1096       /system/lib/liblog.so
-      40100000-40101000 rw-p 00004000 b3:04 1096       /system/lib/liblog.so
-      40101000-40122000 r-xp 00000000 b3:04 955        /system/lib/libc.so
-      40122000-40123000 rwxp 00021000 b3:04 955        /system/lib/libc.so
-      40123000-40167000 r-xp 00022000 b3:04 955        /system/lib/libc.so
-      40167000-40169000 r--p 00065000 b3:04 955        /system/lib/libc.so
-      40169000-4016b000 rw-p 00067000 b3:04 955        /system/lib/libc.so
-      4016b000-40176000 rw-p 00000000 00:00 0
 
 ...
 )"),
                     llvm::Succeeded());
   // Test we can get memory regions from the linux /proc/<pid>/maps stream when
   // we don't have a MemoryInfoListStream.
-
-  // Test addres before the first entry comes back with nothing mapped up
-  // to first valid region info
-  ConstString a("/system/bin/app_process");
-  ConstString b("/system/bin/linker");
-  ConstString c("/system/lib/liblog.so");
-  ConstString d("/system/lib/libc.so");
-  ConstString n;
-  check_region(*parser, 0x00000000, 0x400d9000, no, no, no, no, n);
-  check_region(*parser, 0x400d9000, 0x400db000, yes, no, yes, yes, a);
-  check_region(*parser, 0x400db000, 0x400dc000, yes, no, no, yes, a);
-  check_region(*parser, 0x400dc000, 0x400dd000, yes, yes, no, yes, n);
-  check_region(*parser, 0x400dd000, 0x400ec000, yes, no, yes, yes, b);
-  check_region(*parser, 0x400ec000, 0x400ed000, yes, no, no, yes, n);
-  check_region(*parser, 0x400ed000, 0x400ee000, yes, no, no, yes, b);
-  check_region(*parser, 0x400ee000, 0x400ef000, yes, yes, no, yes, b);
-  check_region(*parser, 0x400ef000, 0x400fb000, yes, yes, no, yes, n);
-  check_region(*parser, 0x400fb000, 0x400fc000, yes, no, yes, yes, c);
-  check_region(*parser, 0x400fc000, 0x400fd000, yes, yes, yes, yes, c);
-  check_region(*parser, 0x400fd000, 0x400ff000, yes, no, yes, yes, c);
-  check_region(*parser, 0x400ff000, 0x40100000, yes, no, no, yes, c);
-  check_region(*parser, 0x40100000, 0x40101000, yes, yes, no, yes, c);
-  check_region(*parser, 0x40101000, 0x40122000, yes, no, yes, yes, d);
-  check_region(*parser, 0x40122000, 0x40123000, yes, yes, yes, yes, d);
-  check_region(*parser, 0x40123000, 0x40167000, yes, no, yes, yes, d);
-  check_region(*parser, 0x40167000, 0x40169000, yes, no, no, yes, d);
-  check_region(*parser, 0x40169000, 0x4016b000, yes, yes, no, yes, d);
-  check_region(*parser, 0x4016b000, 0x40176000, yes, yes, no, yes, n);
-  check_region(*parser, 0x40176000, UINT64_MAX, no, no, no, no, n);
+  ConstString app_process("/system/bin/app_process");
+  ConstString linker("/system/bin/linker");
+  ConstString liblog("/system/lib/liblog.so");
+  EXPECT_THAT(
+      parser->BuildMemoryRegions(),
+      testing::Pair(testing::ElementsAre(
+                        MemoryRegionInfo({0x400d9000, 0x2000}, yes, no, yes,
+                                         yes, app_process, unknown, 0),
+                        MemoryRegionInfo({0x400db000, 0x1000}, yes, no, no, yes,
+                                         app_process, unknown, 0),
+                        MemoryRegionInfo({0x400dc000, 0x1000}, yes, yes, no,
+                                         yes, ConstString(), unknown, 0),
+                        MemoryRegionInfo({0x400ec000, 0x1000}, yes, no, no, yes,
+                                         ConstString(), unknown, 0),
+                        MemoryRegionInfo({0x400ee000, 0x1000}, yes, yes, no,
+                                         yes, linker, unknown, 0),
+                        MemoryRegionInfo({0x400fc000, 0x1000}, yes, yes, yes,
+                                         yes, liblog, unknown, 0)),
+                    true));
 }
 
 // Windows Minidump tests
diff --git a/src/llvm-project/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp b/src/llvm-project/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp
index adc65d4..265da63 100644
--- a/src/llvm-project/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp
+++ b/src/llvm-project/lldb/unittests/Process/minidump/RegisterContextMinidumpTest.cpp
@@ -10,7 +10,9 @@
 #include "Plugins/Process/Utility/RegisterContextLinux_x86_64.h"
 #include "Plugins/Process/minidump/RegisterContextMinidump_x86_32.h"
 #include "Plugins/Process/minidump/RegisterContextMinidump_x86_64.h"
+#include "Plugins/Process/minidump/RegisterContextMinidump_ARM.h"
 #include "lldb/Utility/DataBuffer.h"
+#include "llvm/ADT/StringRef.h"
 #include "gtest/gtest.h"
 
 using namespace lldb_private;
@@ -51,7 +53,7 @@
                                      sizeof(Context));
 
   ArchSpec arch("i386-pc-linux");
-  auto RegInterface = llvm::make_unique<RegisterContextLinux_i386>(arch);
+  auto RegInterface = std::make_unique<RegisterContextLinux_i386>(arch);
   lldb::DataBufferSP Buf =
       ConvertMinidumpContext_x86_32(ContextRef, RegInterface.get());
   ASSERT_EQ(RegInterface->GetGPRSize(), Buf->GetByteSize());
@@ -112,7 +114,7 @@
                                      sizeof(Context));
 
   ArchSpec arch("x86_64-pc-linux");
-  auto RegInterface = llvm::make_unique<RegisterContextLinux_x86_64>(arch);
+  auto RegInterface = std::make_unique<RegisterContextLinux_x86_64>(arch);
   lldb::DataBufferSP Buf =
       ConvertMinidumpContext_x86_64(ContextRef, RegInterface.get());
   ASSERT_EQ(RegInterface->GetGPRSize(), Buf->GetByteSize());
@@ -143,3 +145,57 @@
   EXPECT_EQ(Context.ds, reg64(*Buf, Info[lldb_ds_x86_64]));
   EXPECT_EQ(Context.es, reg64(*Buf, Info[lldb_es_x86_64]));
 }
+
+static void TestARMRegInfo(const lldb_private::RegisterInfo *info) {
+  // Make sure we have valid register numbers for eRegisterKindEHFrame and
+  // eRegisterKindDWARF for GPR registers r0-r15 so that we can unwind
+  // correctly when using this information.
+  llvm::StringRef name(info->name);
+  llvm::StringRef alt_name(info->alt_name);
+  if (name.startswith("r") || alt_name.startswith("r")) {
+    EXPECT_NE(info->kinds[lldb::eRegisterKindEHFrame], LLDB_INVALID_REGNUM);
+    EXPECT_NE(info->kinds[lldb::eRegisterKindDWARF], LLDB_INVALID_REGNUM);
+  }
+  // Verify generic register are set correctly
+  if (name == "r0") {
+    EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric],
+              (uint32_t)LLDB_REGNUM_GENERIC_ARG1);
+  } else if (name == "r1") {
+    EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric],
+              (uint32_t)LLDB_REGNUM_GENERIC_ARG2);
+  } else if (name == "r2") {
+    EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric],
+              (uint32_t)LLDB_REGNUM_GENERIC_ARG3);
+  } else if (name == "r3") {
+    EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric],
+              (uint32_t)LLDB_REGNUM_GENERIC_ARG4);
+  } else if (name == "sp") {
+    EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric],
+              (uint32_t)LLDB_REGNUM_GENERIC_SP);
+  } else if (name == "fp") {
+    EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric],
+              (uint32_t)LLDB_REGNUM_GENERIC_FP);
+  } else if (name == "lr") {
+    EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric],
+              (uint32_t)LLDB_REGNUM_GENERIC_RA);
+  } else if (name == "pc") {
+    EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric],
+              (uint32_t)LLDB_REGNUM_GENERIC_PC);
+  } else if (name == "cpsr") {
+    EXPECT_EQ(info->kinds[lldb::eRegisterKindGeneric],
+              (uint32_t)LLDB_REGNUM_GENERIC_FLAGS);
+  }
+}
+
+TEST(RegisterContextMinidump, CheckRegisterContextMinidump_ARM) {
+  size_t num_regs = RegisterContextMinidump_ARM::GetRegisterCountStatic();
+  const lldb_private::RegisterInfo *reg_info;
+  for (size_t reg=0; reg<num_regs; ++reg) {
+    reg_info = RegisterContextMinidump_ARM::GetRegisterInfoAtIndexStatic(reg,
+                                                                         true);
+    TestARMRegInfo(reg_info);
+    reg_info = RegisterContextMinidump_ARM::GetRegisterInfoAtIndexStatic(reg,
+                                                                         false);
+    TestARMRegInfo(reg_info);
+  }
+}
diff --git a/src/llvm-project/lldb/unittests/ScriptInterpreter/CMakeLists.txt b/src/llvm-project/lldb/unittests/ScriptInterpreter/CMakeLists.txt
index 667e7a7..82cd128 100644
--- a/src/llvm-project/lldb/unittests/ScriptInterpreter/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/ScriptInterpreter/CMakeLists.txt
@@ -1,3 +1,6 @@
-if (NOT LLDB_DISABLE_PYTHON)
+if (LLDB_ENABLE_PYTHON)
   add_subdirectory(Python)
 endif()
+if (LLDB_ENABLE_LUA)
+  add_subdirectory(Lua)
+endif()
diff --git a/src/llvm-project/lldb/unittests/ScriptInterpreter/Lua/CMakeLists.txt b/src/llvm-project/lldb/unittests/ScriptInterpreter/Lua/CMakeLists.txt
new file mode 100644
index 0000000..aa8a95c
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/ScriptInterpreter/Lua/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_lldb_unittest(ScriptInterpreterLuaTests
+  LuaTests.cpp
+  ScriptInterpreterTests.cpp
+
+  LINK_LIBS
+    lldbHost
+    lldbPluginScriptInterpreterLua
+    lldbPluginPlatformLinux
+    LLVMTestingSupport
+  LINK_COMPONENTS
+    Support
+  )
\ No newline at end of file
diff --git a/src/llvm-project/lldb/unittests/ScriptInterpreter/Lua/LuaTests.cpp b/src/llvm-project/lldb/unittests/ScriptInterpreter/Lua/LuaTests.cpp
new file mode 100644
index 0000000..464babc
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/ScriptInterpreter/Lua/LuaTests.cpp
@@ -0,0 +1,28 @@
+//===-- LuaTests.cpp ------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Plugins/ScriptInterpreter/Lua/Lua.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+
+extern "C" int luaopen_lldb(lua_State *L) { return 0; }
+
+TEST(LuaTest, RunValid) {
+  Lua lua;
+  llvm::Error error = lua.Run("foo = 1");
+  EXPECT_FALSE(static_cast<bool>(error));
+}
+
+TEST(LuaTest, RunInvalid) {
+  Lua lua;
+  llvm::Error error = lua.Run("nil = foo");
+  EXPECT_TRUE(static_cast<bool>(error));
+  EXPECT_EQ(llvm::toString(std::move(error)),
+            "[string \"buffer\"]:1: unexpected symbol near 'nil'\n");
+}
diff --git a/src/llvm-project/lldb/unittests/ScriptInterpreter/Lua/ScriptInterpreterTests.cpp b/src/llvm-project/lldb/unittests/ScriptInterpreter/Lua/ScriptInterpreterTests.cpp
new file mode 100644
index 0000000..b5324f6
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/ScriptInterpreter/Lua/ScriptInterpreterTests.cpp
@@ -0,0 +1,62 @@
+//===-- LuaTests.cpp ------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Plugins/Platform/Linux/PlatformLinux.h"
+#include "Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h"
+#include "lldb/Core/Debugger.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Interpreter/CommandReturnObject.h"
+#include "lldb/Target/Platform.h"
+#include "lldb/Utility/Reproducer.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+using namespace lldb_private::repro;
+using namespace lldb;
+
+namespace {
+class ScriptInterpreterTest : public ::testing::Test {
+public:
+  void SetUp() override {
+    llvm::cantFail(Reproducer::Initialize(ReproducerMode::Off, llvm::None));
+    FileSystem::Initialize();
+    HostInfo::Initialize();
+
+    // Pretend Linux is the host platform.
+    platform_linux::PlatformLinux::Initialize();
+    ArchSpec arch("powerpc64-pc-linux");
+    Platform::SetHostPlatform(
+        platform_linux::PlatformLinux::CreateInstance(true, &arch));
+  }
+  void TearDown() override {
+    platform_linux::PlatformLinux::Terminate();
+    HostInfo::Terminate();
+    FileSystem::Terminate();
+    Reproducer::Terminate();
+  }
+};
+} // namespace
+
+TEST_F(ScriptInterpreterTest, Plugin) {
+  EXPECT_EQ(ScriptInterpreterLua::GetPluginNameStatic(), "script-lua");
+  EXPECT_EQ(ScriptInterpreterLua::GetPluginDescriptionStatic(),
+            "Lua script interpreter");
+}
+
+TEST_F(ScriptInterpreterTest, ExecuteOneLine) {
+  DebuggerSP debugger_sp = Debugger::CreateInstance();
+  ASSERT_TRUE(debugger_sp);
+
+  ScriptInterpreterLua script_interpreter(*debugger_sp);
+  CommandReturnObject result;
+  EXPECT_TRUE(script_interpreter.ExecuteOneLine("foo = 1", &result));
+  EXPECT_FALSE(script_interpreter.ExecuteOneLine("nil = foo", &result));
+  EXPECT_TRUE(result.GetErrorData().startswith(
+      "error: lua failed attempting to evaluate 'nil = foo'"));
+}
diff --git a/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt b/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
index fdb86db..471f4c6 100644
--- a/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/CMakeLists.txt
@@ -1,11 +1,11 @@
 add_lldb_unittest(ScriptInterpreterPythonTests
   PythonDataObjectsTests.cpp
-  PythonExceptionStateTests.cpp
   PythonTestSuite.cpp
 
   LINK_LIBS
     lldbHost
     lldbPluginScriptInterpreterPython
+    LLVMTestingSupport
   LINK_COMPONENTS
     Support
   )
\ No newline at end of file
diff --git a/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index d43da01..ec5d02e 100644
--- a/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -15,18 +15,21 @@
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/lldb-enumerations.h"
+#include "llvm/Testing/Support/Error.h"
 
 #include "PythonTestSuite.h"
 
 using namespace lldb_private;
+using namespace lldb_private::python;
+using llvm::Error;
+using llvm::Expected;
 
 class PythonDataObjectsTest : public PythonTestSuite {
 public:
   void SetUp() override {
     PythonTestSuite::SetUp();
 
-    PythonString sys_module("sys");
-    m_sys_module.Reset(PyRefType::Owned, PyImport_Import(sys_module.get()));
+    m_sys_module = unwrapIgnoringErrors(PythonModule::Import("sys"));
     m_main_module = PythonModule::MainModule();
     m_builtins_module = PythonModule::BuiltinsModule();
   }
@@ -68,13 +71,10 @@
   PythonDictionary dict(PyInitialValue::Empty);
 
   PyObject *new_dict = PyDict_New();
-  dict.Reset(PyRefType::Owned, new_dict);
+  dict = Take<PythonDictionary>(new_dict);
   EXPECT_EQ(new_dict, dict.get());
 
-  dict.Reset(PyRefType::Owned, nullptr);
-  EXPECT_EQ(nullptr, dict.get());
-
-  dict.Reset(PyRefType::Owned, PyDict_New());
+  dict = Take<PythonDictionary>(PyDict_New());
   EXPECT_NE(nullptr, dict.get());
   dict.Reset();
   EXPECT_EQ(nullptr, dict.get());
@@ -321,8 +321,8 @@
   PythonList list(PyRefType::Owned, py_list);
 
   PythonObject list_items[list_size];
-  list_items[0].Reset(PythonInteger(long_value0));
-  list_items[1].Reset(PythonString(string_value1));
+  list_items[0] = PythonInteger(long_value0);
+  list_items[1] = PythonString(string_value1);
 
   for (unsigned i = 0; i < list_size; ++i)
     list.SetItemAtIndex(i, list_items[i]);
@@ -467,10 +467,10 @@
   PythonObject py_keys[dict_entries];
   PythonObject py_values[dict_entries];
 
-  py_keys[0].Reset(PythonString(key_0));
-  py_keys[1].Reset(PythonInteger(key_1));
-  py_values[0].Reset(PythonInteger(value_0));
-  py_values[1].Reset(PythonString(value_1));
+  py_keys[0] = PythonString(key_0);
+  py_keys[1] = PythonInteger(key_1);
+  py_values[0] = PythonInteger(value_0);
+  py_values[1] = PythonString(value_1);
 
   PyObject *py_dict = PyDict_New();
   EXPECT_TRUE(PythonDictionary::Check(py_dict));
@@ -507,10 +507,10 @@
   PythonString keys[dict_entries];
   PythonObject values[dict_entries];
 
-  keys[0].Reset(PythonString(key_0));
-  keys[1].Reset(PythonString(key_1));
-  values[0].Reset(PythonInteger(value_0));
-  values[1].Reset(PythonString(value_1));
+  keys[0] = PythonString(key_0);
+  keys[1] = PythonString(key_1);
+  values[0] = PythonInteger(value_0);
+  values[1] = PythonString(value_1);
 
   PythonDictionary dict(PyInitialValue::Empty);
   for (int i = 0; i < 2; ++i)
@@ -581,11 +581,12 @@
 }
 
 TEST_F(PythonDataObjectsTest, TestPythonFile) {
-  File file;
-  FileSystem::Instance().Open(file, FileSpec(FileSystem::DEV_NULL),
-                              File::eOpenOptionRead);
-  PythonFile py_file(file, "r");
-  EXPECT_TRUE(PythonFile::Check(py_file.get()));
+  auto file = FileSystem::Instance().Open(FileSpec(FileSystem::DEV_NULL),
+                                          File::eOpenOptionRead);
+  ASSERT_THAT_EXPECTED(file, llvm::Succeeded());
+  auto py_file = PythonFile::FromFile(*file.get(), "r");
+  ASSERT_THAT_EXPECTED(py_file, llvm::Succeeded());
+  EXPECT_TRUE(PythonFile::Check(py_file.get().get()));
 }
 
 TEST_F(PythonDataObjectsTest, TestObjectAttributes) {
@@ -624,3 +625,237 @@
     }
   }
 }
+
+TEST_F(PythonDataObjectsTest, TestCallable) {
+
+  PythonDictionary globals(PyInitialValue::Empty);
+  auto builtins = PythonModule::BuiltinsModule();
+  llvm::Error error = globals.SetItem("__builtins__", builtins);
+  ASSERT_FALSE(error);
+
+  {
+    PyObject *o = PyRun_String("lambda x : x", Py_eval_input, globals.get(),
+                               globals.get());
+    ASSERT_FALSE(o == NULL);
+    auto lambda = Take<PythonCallable>(o);
+    auto arginfo = lambda.GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 1u);
+  }
+
+  {
+    PyObject *o = PyRun_String("lambda x,y=0: x", Py_eval_input, globals.get(),
+                               globals.get());
+    ASSERT_FALSE(o == NULL);
+    auto lambda = Take<PythonCallable>(o);
+    auto arginfo = lambda.GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 2u);
+  }
+
+  {
+    PyObject *o = PyRun_String("lambda x,y=0, **kw: x", Py_eval_input,
+                               globals.get(), globals.get());
+    ASSERT_FALSE(o == NULL);
+    auto lambda = Take<PythonCallable>(o);
+    auto arginfo = lambda.GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 2u);
+  }
+
+  {
+    PyObject *o = PyRun_String("lambda x,y,*a: x", Py_eval_input, globals.get(),
+                               globals.get());
+    ASSERT_FALSE(o == NULL);
+    auto lambda = Take<PythonCallable>(o);
+    auto arginfo = lambda.GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args,
+              PythonCallable::ArgInfo::UNBOUNDED);
+  }
+
+  {
+    PyObject *o = PyRun_String("lambda x,y,*a,**kw: x", Py_eval_input,
+                               globals.get(), globals.get());
+    ASSERT_FALSE(o == NULL);
+    auto lambda = Take<PythonCallable>(o);
+    auto arginfo = lambda.GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args,
+              PythonCallable::ArgInfo::UNBOUNDED);
+  }
+
+  {
+    const char *script = R"(
+class Foo:
+  def bar(self, x):
+     return x
+  @classmethod
+  def classbar(cls, x):
+     return x
+  @staticmethod
+  def staticbar(x):
+     return x
+  def __call__(self, x):
+     return x
+obj = Foo()
+bar_bound   = Foo().bar
+bar_class   = Foo().classbar
+bar_static  = Foo().staticbar
+bar_unbound = Foo.bar
+
+
+class OldStyle:
+  def __init__(self, one, two, three):
+    pass
+
+class NewStyle(object):
+  def __init__(self, one, two, three):
+    pass
+
+)";
+    PyObject *o =
+        PyRun_String(script, Py_file_input, globals.get(), globals.get());
+    ASSERT_FALSE(o == NULL);
+    Take<PythonObject>(o);
+
+    auto bar_bound = As<PythonCallable>(globals.GetItem("bar_bound"));
+    ASSERT_THAT_EXPECTED(bar_bound, llvm::Succeeded());
+    auto arginfo = bar_bound.get().GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 1u);
+
+    auto bar_unbound = As<PythonCallable>(globals.GetItem("bar_unbound"));
+    ASSERT_THAT_EXPECTED(bar_unbound, llvm::Succeeded());
+    arginfo = bar_unbound.get().GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 2u);
+
+    auto bar_class = As<PythonCallable>(globals.GetItem("bar_class"));
+    ASSERT_THAT_EXPECTED(bar_class, llvm::Succeeded());
+    arginfo = bar_class.get().GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 1u);
+
+    auto bar_static = As<PythonCallable>(globals.GetItem("bar_static"));
+    ASSERT_THAT_EXPECTED(bar_static, llvm::Succeeded());
+    arginfo = bar_static.get().GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 1u);
+
+    auto obj = As<PythonCallable>(globals.GetItem("obj"));
+    ASSERT_THAT_EXPECTED(obj, llvm::Succeeded());
+    arginfo = obj.get().GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 1u);
+
+    auto oldstyle = As<PythonCallable>(globals.GetItem("OldStyle"));
+    ASSERT_THAT_EXPECTED(oldstyle, llvm::Succeeded());
+    arginfo = oldstyle.get().GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 3u);
+
+    auto newstyle = As<PythonCallable>(globals.GetItem("NewStyle"));
+    ASSERT_THAT_EXPECTED(newstyle, llvm::Succeeded());
+    arginfo = newstyle.get().GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 3u);
+  }
+
+#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 3
+
+  // the old implementation of GetArgInfo just doesn't work on builtins.
+
+  {
+    auto builtins = PythonModule::BuiltinsModule();
+    auto hex = As<PythonCallable>(builtins.GetAttribute("hex"));
+    ASSERT_THAT_EXPECTED(hex, llvm::Succeeded());
+    auto arginfo = hex.get().GetArgInfo();
+    ASSERT_THAT_EXPECTED(arginfo, llvm::Succeeded());
+    EXPECT_EQ(arginfo.get().max_positional_args, 1u);
+  }
+
+#endif
+}
+
+TEST_F(PythonDataObjectsTest, TestScript) {
+
+  static const char script[] = R"(
+def factorial(n):
+  if n > 1:
+    return n * factorial(n-1)
+  else:
+    return 1;
+main = factorial
+)";
+
+  PythonScript factorial(script);
+
+  EXPECT_THAT_EXPECTED(As<long long>(factorial(5ll)), llvm::HasValue(120));
+}
+
+TEST_F(PythonDataObjectsTest, TestExceptions) {
+
+  static const char script[] = R"(
+def foo():
+  return bar()
+def bar():
+  return baz()
+def baz():
+  return 1 / 0
+main = foo
+)";
+
+  PythonScript foo(script);
+
+  EXPECT_THAT_EXPECTED(
+      foo(), llvm::Failed<PythonException>(testing::Property(
+                 &PythonException::ReadBacktrace,
+                 testing::AllOf(testing::ContainsRegex("line 3, in foo"),
+                                testing::ContainsRegex("line 5, in bar"),
+                                testing::ContainsRegex("line 7, in baz"),
+                                testing::ContainsRegex("ZeroDivisionError")))));
+
+  static const char script2[] = R"(
+class MyError(Exception):
+  def __str__(self):
+    return self.my_message
+
+def main():
+  raise MyError("lol")
+
+)";
+
+  PythonScript lol(script2);
+
+  EXPECT_THAT_EXPECTED(lol(),
+                       llvm::Failed<PythonException>(testing::Property(
+                           &PythonException::ReadBacktrace,
+                           testing::ContainsRegex("unprintable MyError"))));
+}
+
+TEST_F(PythonDataObjectsTest, TestRun) {
+
+  PythonDictionary globals(PyInitialValue::Empty);
+
+  auto x = As<long long>(runStringOneLine("40 + 2", globals, globals));
+  ASSERT_THAT_EXPECTED(x, llvm::Succeeded());
+  EXPECT_EQ(x.get(), 42l);
+
+  Expected<PythonObject> r = runStringOneLine("n = 42", globals, globals);
+  ASSERT_THAT_EXPECTED(r, llvm::Succeeded());
+  auto y = As<long long>(globals.GetItem("n"));
+  ASSERT_THAT_EXPECTED(y, llvm::Succeeded());
+  EXPECT_EQ(y.get(), 42l);
+
+  const char script[] = R"(
+def foobar():
+  return "foo" + "bar" + "baz"
+g = foobar()
+)";
+
+  r = runStringMultiLine(script, globals, globals);
+  ASSERT_THAT_EXPECTED(r, llvm::Succeeded());
+  auto g = As<std::string>(globals.GetItem("g"));
+  ASSERT_THAT_EXPECTED(g, llvm::HasValue("foobarbaz"));
+}
\ No newline at end of file
diff --git a/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonExceptionStateTests.cpp b/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonExceptionStateTests.cpp
deleted file mode 100644
index 8334e64..0000000
--- a/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonExceptionStateTests.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-//===-- PythonExceptionStateTest.cpp ------------------------------*- C++
-//-*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "gtest/gtest.h"
-
-#include "Plugins/ScriptInterpreter/Python/PythonDataObjects.h"
-#include "Plugins/ScriptInterpreter/Python/PythonExceptionState.h"
-#include "Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h"
-#include "Plugins/ScriptInterpreter/Python/lldb-python.h"
-
-#include "PythonTestSuite.h"
-
-using namespace lldb_private;
-
-class PythonExceptionStateTest : public PythonTestSuite {
-public:
-protected:
-  void RaiseException() {
-    PyErr_SetString(PyExc_RuntimeError, "PythonExceptionStateTest test error");
-  }
-};
-
-TEST_F(PythonExceptionStateTest, TestExceptionStateChecking) {
-  PyErr_Clear();
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-
-  RaiseException();
-  EXPECT_TRUE(PythonExceptionState::HasErrorOccurred());
-
-  PyErr_Clear();
-}
-
-TEST_F(PythonExceptionStateTest, TestAcquisitionSemantics) {
-  PyErr_Clear();
-  PythonExceptionState no_error(false);
-  EXPECT_FALSE(no_error.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-
-  PyErr_Clear();
-  RaiseException();
-  PythonExceptionState error(false);
-  EXPECT_TRUE(error.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-  error.Discard();
-
-  PyErr_Clear();
-  RaiseException();
-  error.Acquire(false);
-  EXPECT_TRUE(error.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-
-  PyErr_Clear();
-}
-
-TEST_F(PythonExceptionStateTest, TestDiscardSemantics) {
-  PyErr_Clear();
-
-  // Test that discarding an exception does not restore the exception
-  // state even when auto-restore==true is set
-  RaiseException();
-  PythonExceptionState error(true);
-  EXPECT_TRUE(error.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-
-  error.Discard();
-  EXPECT_FALSE(error.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-}
-
-TEST_F(PythonExceptionStateTest, TestResetSemantics) {
-  PyErr_Clear();
-
-  // Resetting when auto-restore is true should restore.
-  RaiseException();
-  PythonExceptionState error(true);
-  EXPECT_TRUE(error.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-  error.Reset();
-  EXPECT_FALSE(error.IsError());
-  EXPECT_TRUE(PythonExceptionState::HasErrorOccurred());
-
-  PyErr_Clear();
-
-  // Resetting when auto-restore is false should discard.
-  RaiseException();
-  PythonExceptionState error2(false);
-  EXPECT_TRUE(error2.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-  error2.Reset();
-  EXPECT_FALSE(error2.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-
-  PyErr_Clear();
-}
-
-TEST_F(PythonExceptionStateTest, TestManualRestoreSemantics) {
-  PyErr_Clear();
-  RaiseException();
-  PythonExceptionState error(false);
-  EXPECT_TRUE(error.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-
-  error.Restore();
-  EXPECT_FALSE(error.IsError());
-  EXPECT_TRUE(PythonExceptionState::HasErrorOccurred());
-
-  PyErr_Clear();
-}
-
-TEST_F(PythonExceptionStateTest, TestAutoRestoreSemantics) {
-  PyErr_Clear();
-  // Test that using the auto-restore flag correctly restores the exception
-  // state on destruction, and not using the auto-restore flag correctly
-  // does NOT restore the state on destruction.
-  {
-    RaiseException();
-    PythonExceptionState error(false);
-    EXPECT_TRUE(error.IsError());
-    EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-  }
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-
-  PyErr_Clear();
-  {
-    RaiseException();
-    PythonExceptionState error(true);
-    EXPECT_TRUE(error.IsError());
-    EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-  }
-  EXPECT_TRUE(PythonExceptionState::HasErrorOccurred());
-
-  PyErr_Clear();
-}
-
-TEST_F(PythonExceptionStateTest, TestAutoRestoreChanged) {
-  // Test that if we re-acquire with different auto-restore semantics,
-  // that the new semantics are respected.
-  PyErr_Clear();
-
-  RaiseException();
-  PythonExceptionState error(false);
-  EXPECT_TRUE(error.IsError());
-
-  error.Reset();
-  EXPECT_FALSE(error.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-
-  RaiseException();
-  error.Acquire(true);
-  EXPECT_TRUE(error.IsError());
-  EXPECT_FALSE(PythonExceptionState::HasErrorOccurred());
-
-  error.Reset();
-  EXPECT_FALSE(error.IsError());
-  EXPECT_TRUE(PythonExceptionState::HasErrorOccurred());
-
-  PyErr_Clear();
-}
diff --git a/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp b/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
index f6b617d..8bc510b 100644
--- a/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
+++ b/src/llvm-project/lldb/unittests/ScriptInterpreter/Python/PythonTestSuite.cpp
@@ -59,13 +59,31 @@
 #define LLDBSwigPyInit init_lldb
 #endif
 
-extern "C" bool LLDBSwigPythonBreakpointCallbackFunction(
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
+
+// Disable warning C4190: 'LLDBSwigPythonBreakpointCallbackFunction' has
+// C-linkage specified, but returns UDT 'llvm::Expected<bool>' which is
+// incompatible with C
+#if _MSC_VER
+#pragma warning (push)
+#pragma warning (disable : 4190)
+#endif
+
+extern "C" llvm::Expected<bool> LLDBSwigPythonBreakpointCallbackFunction(
     const char *python_function_name, const char *session_dictionary_name,
     const lldb::StackFrameSP &sb_frame,
-    const lldb::BreakpointLocationSP &sb_bp_loc) {
+    const lldb::BreakpointLocationSP &sb_bp_loc,
+    StructuredDataImpl *args_impl) {
   return false;
 }
 
+#if _MSC_VER
+#pragma warning (pop)
+#endif
+
+#pragma clang diagnostic pop
+
 extern "C" bool LLDBSwigPythonWatchpointCallbackFunction(
     const char *python_function_name, const char *session_dictionary_name,
     const lldb::StackFrameSP &sb_frame, const lldb::WatchpointSP &sb_wp) {
@@ -95,6 +113,8 @@
 
 extern "C" void *LLDBSwigPythonCreateScriptedThreadPlan(
     const char *python_class_name, const char *session_dictionary_name,
+    StructuredDataImpl *args_data,
+    std::string &error_string,
     const lldb::ThreadPlanSP &thread_plan_sp) {
   return nullptr;
 }
diff --git a/src/llvm-project/lldb/unittests/Symbol/CMakeLists.txt b/src/llvm-project/lldb/unittests/Symbol/CMakeLists.txt
index 1fbb1d8..02875b8 100644
--- a/src/llvm-project/lldb/unittests/Symbol/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/Symbol/CMakeLists.txt
@@ -2,6 +2,7 @@
   LocateSymbolFileTest.cpp
   PostfixExpressionTest.cpp
   TestClangASTContext.cpp
+  TestClangASTImporter.cpp
   TestDWARFCallFrameInfo.cpp
   TestType.cpp
   TestLineEntry.cpp
@@ -13,11 +14,11 @@
     lldbPluginObjectFileELF
     lldbPluginObjectFileMachO
     lldbPluginSymbolFileDWARF
+    lldbPluginSymbolFileSymtab
     LLVMTestingSupport
   )
 
 set(test_inputs
-  basic-call-frame-info.yaml
   inlined-functions.yaml
   )
 add_unittest_inputs(SymbolTests "${test_inputs}")
diff --git a/src/llvm-project/lldb/unittests/Symbol/Inputs/basic-call-frame-info.yaml b/src/llvm-project/lldb/unittests/Symbol/Inputs/basic-call-frame-info.yaml
deleted file mode 100644
index 7f58b6e..0000000
--- a/src/llvm-project/lldb/unittests/Symbol/Inputs/basic-call-frame-info.yaml
+++ /dev/null
@@ -1,140 +0,0 @@
---- !ELF
-FileHeader:
-  Class:           ELFCLASS64
-  Data:            ELFDATA2LSB
-  Type:            ET_DYN
-  Machine:         EM_X86_64
-  Entry:           0x0000000000000260
-Sections:
-  - Name:            .text
-    Type:            SHT_PROGBITS
-    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
-    Address:         0x0000000000000260
-    AddressAlign:    0x0000000000000010
-    Content:         554889E5897DFC8B45FC5DC30F1F4000554889E5897DFC8B45FC5DC30F1F4000554889E5897DFC8B45FC5DC3
-#0000000000000260 <eh_frame>:
-# 260:	55                   	push   %rbp
-# 261:	48 89 e5             	mov    %rsp,%rbp
-# 264:	89 7d fc             	mov    %edi,-0x4(%rbp)
-# 267:	8b 45 fc             	mov    -0x4(%rbp),%eax
-# 26a:	5d                   	pop    %rbp
-# 26b:	c3                   	retq
-# 26c:	0f 1f 40 00          	nopl   0x0(%rax)
-#
-#0000000000000270 <debug_frame3>:
-# 270:	55                   	push   %rbp
-# 271:	48 89 e5             	mov    %rsp,%rbp
-# 274:	89 7d fc             	mov    %edi,-0x4(%rbp)
-# 277:	8b 45 fc             	mov    -0x4(%rbp),%eax
-# 27a:	5d                   	pop    %rbp
-# 27b:	c3                   	retq
-# 27c:	0f 1f 40 00          	nopl   0x0(%rax)
-#
-#0000000000000280 <debug_frame4>:
-# 280:	55                   	push   %rbp
-# 281:	48 89 e5             	mov    %rsp,%rbp
-# 284:	89 7d fc             	mov    %edi,-0x4(%rbp)
-# 287:	8b 45 fc             	mov    -0x4(%rbp),%eax
-# 28a:	5d                   	pop    %rbp
-# 28b:	c3                   	retq
-  - Name:            .eh_frame
-    Type:            SHT_X86_64_UNWIND
-    Flags:           [ SHF_ALLOC ]
-    Address:         0x0000000000000290
-    AddressAlign:    0x0000000000000008
-    Content:         1400000000000000017A5200017810011B0C0708900100001C0000001C000000B0FFFFFF0C00000000410E108602430D0600000000000000
-#00000000 0000000000000014 00000000 CIE
-#  Version:               1
-#  Augmentation:          "zR"
-#  Code alignment factor: 1
-#  Data alignment factor: -8
-#  Return address column: 16
-#  Augmentation data:     1b
-#
-#  DW_CFA_def_cfa: r7 (rsp) ofs 8
-#  DW_CFA_offset: r16 (rip) at cfa-8
-#  DW_CFA_nop
-#  DW_CFA_nop
-#
-#00000018 000000000000001c 0000001c FDE cie=00000000 pc=ffffffffffffffd0..ffffffffffffffdc
-#  DW_CFA_advance_loc: 1 to ffffffffffffffd1
-#  DW_CFA_def_cfa_offset: 16
-#  DW_CFA_offset: r6 (rbp) at cfa-16
-#  DW_CFA_advance_loc: 3 to ffffffffffffffd4
-#  DW_CFA_def_cfa_register: r6 (rbp)
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-  - Name:            .debug_frame
-    Type:            SHT_PROGBITS
-    AddressAlign:    0x0000000000000008
-    Content:         14000000FFFFFFFF03000178100C070890010000000000001C0000000000000070020000000000000C00000000000000410E108602430D0614000000FFFFFFFF040008000178100C07089001000000001C0000003800000080020000000000000C00000000000000410E108602430D06
-#00000000 0000000000000014 ffffffff CIE
-#  Version:               3
-#  Augmentation:          ""
-#  Code alignment factor: 1
-#  Data alignment factor: -8
-#  Return address column: 16
-#
-#  DW_CFA_def_cfa: r7 (rsp) ofs 8
-#  DW_CFA_offset: r16 (rip) at cfa-8
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#
-#00000018 000000000000001c 00000000 FDE cie=00000000 pc=0000000000000270..000000000000027c
-#  DW_CFA_advance_loc: 1 to 0000000000000271
-#  DW_CFA_def_cfa_offset: 16
-#  DW_CFA_offset: r6 (rbp) at cfa-16
-#  DW_CFA_advance_loc: 3 to 0000000000000274
-#  DW_CFA_def_cfa_register: r6 (rbp)
-#
-#00000038 0000000000000014 ffffffff CIE
-#  Version:               4
-#  Augmentation:          ""
-#  Pointer Size:          8
-#  Segment Size:          0
-#  Code alignment factor: 1
-#  Data alignment factor: -8
-#  Return address column: 16
-#
-#  DW_CFA_def_cfa: r7 (rsp) ofs 8
-#  DW_CFA_offset: r16 (rip) at cfa-8
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#  DW_CFA_nop
-#
-#00000050 000000000000001c 00000038 FDE cie=00000038 pc=0000000000000280..000000000000028c
-#  DW_CFA_advance_loc: 1 to 0000000000000281
-#  DW_CFA_def_cfa_offset: 16
-#  DW_CFA_offset: r6 (rbp) at cfa-16
-#  DW_CFA_advance_loc: 3 to 0000000000000284
-#  DW_CFA_def_cfa_register: r6 (rbp)
-Symbols:
-  - Name:            eh_frame
-    Type:            STT_FUNC
-    Section:         .text
-    Value:           0x0000000000000260
-    Size:            0x000000000000000C
-    Binding:         STB_GLOBAL
-  - Name:            debug_frame3
-    Type:            STT_FUNC
-    Section:         .text
-    Value:           0x0000000000000270
-    Size:            0x000000000000000C
-    Binding:         STB_GLOBAL
-  - Name:            debug_frame4
-    Type:            STT_FUNC
-    Section:         .text
-    Value:           0x0000000000000280
-    Size:            0x000000000000000C
-    Binding:         STB_GLOBAL
-...
diff --git a/src/llvm-project/lldb/unittests/Symbol/LocateSymbolFileTest.cpp b/src/llvm-project/lldb/unittests/Symbol/LocateSymbolFileTest.cpp
index 205c4e4..58a0eeb 100644
--- a/src/llvm-project/lldb/unittests/Symbol/LocateSymbolFileTest.cpp
+++ b/src/llvm-project/lldb/unittests/Symbol/LocateSymbolFileTest.cpp
@@ -8,6 +8,7 @@
 
 #include "gtest/gtest.h"
 
+#include "TestingSupport/SubsystemRAII.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
@@ -19,14 +20,7 @@
 namespace {
 class SymbolsTest : public ::testing::Test {
 public:
-  void SetUp() override {
-    FileSystem::Initialize();
-    HostInfo::Initialize();
-  }
-  void TearDown() override {
-    HostInfo::Terminate();
-    FileSystem::Terminate();
-  }
+  SubsystemRAII<FileSystem, HostInfo> subsystems;
 };
 } // namespace
 
diff --git a/src/llvm-project/lldb/unittests/Symbol/PostfixExpressionTest.cpp b/src/llvm-project/lldb/unittests/Symbol/PostfixExpressionTest.cpp
index 59c8183..b7fa73c 100644
--- a/src/llvm-project/lldb/unittests/Symbol/PostfixExpressionTest.cpp
+++ b/src/llvm-project/lldb/unittests/Symbol/PostfixExpressionTest.cpp
@@ -12,6 +12,7 @@
 #include "lldb/Utility/StreamString.h"
 #include "llvm/Support/FormatVariadic.h"
 #include "llvm/Support/raw_ostream.h"
+#include "gmock/gmock.h"
 #include "gtest/gtest.h"
 
 using namespace lldb_private;
@@ -71,40 +72,66 @@
   }
 };
 
-static std::string ParseAndStringify(llvm::StringRef expr) {
+static std::string ParseOneAndStringify(llvm::StringRef expr) {
   llvm::BumpPtrAllocator alloc;
-  return ASTPrinter::Print(Parse(expr, alloc));
+  return ASTPrinter::Print(ParseOneExpression(expr, alloc));
 }
 
-TEST(PostfixExpression, Parse) {
-  EXPECT_EQ("int(47)", ParseAndStringify("47"));
-  EXPECT_EQ("$foo", ParseAndStringify("$foo"));
-  EXPECT_EQ("+(int(1), int(2))", ParseAndStringify("1 2 +"));
-  EXPECT_EQ("-(int(1), int(2))", ParseAndStringify("1 2 -"));
-  EXPECT_EQ("@(int(1), int(2))", ParseAndStringify("1 2 @"));
-  EXPECT_EQ("+(int(1), +(int(2), int(3)))", ParseAndStringify("1 2 3 + +"));
-  EXPECT_EQ("+(+(int(1), int(2)), int(3))", ParseAndStringify("1 2 + 3 +"));
-  EXPECT_EQ("^(int(1))", ParseAndStringify("1 ^"));
-  EXPECT_EQ("^(^(int(1)))", ParseAndStringify("1 ^ ^"));
-  EXPECT_EQ("^(+(int(1), ^(int(2))))", ParseAndStringify("1 2 ^ + ^"));
-  EXPECT_EQ("-($foo, int(47))", ParseAndStringify("$foo 47 -"));
-  EXPECT_EQ("+(int(47), int(-42))", ParseAndStringify("47 -42 +"));
+TEST(PostfixExpression, ParseOneExpression) {
+  EXPECT_EQ("int(47)", ParseOneAndStringify("47"));
+  EXPECT_EQ("$foo", ParseOneAndStringify("$foo"));
+  EXPECT_EQ("+(int(1), int(2))", ParseOneAndStringify("1 2 +"));
+  EXPECT_EQ("-(int(1), int(2))", ParseOneAndStringify("1 2 -"));
+  EXPECT_EQ("@(int(1), int(2))", ParseOneAndStringify("1 2 @"));
+  EXPECT_EQ("+(int(1), +(int(2), int(3)))", ParseOneAndStringify("1 2 3 + +"));
+  EXPECT_EQ("+(+(int(1), int(2)), int(3))", ParseOneAndStringify("1 2 + 3 +"));
+  EXPECT_EQ("^(int(1))", ParseOneAndStringify("1 ^"));
+  EXPECT_EQ("^(^(int(1)))", ParseOneAndStringify("1 ^ ^"));
+  EXPECT_EQ("^(+(int(1), ^(int(2))))", ParseOneAndStringify("1 2 ^ + ^"));
+  EXPECT_EQ("-($foo, int(47))", ParseOneAndStringify("$foo 47 -"));
+  EXPECT_EQ("+(int(47), int(-42))", ParseOneAndStringify("47 -42 +"));
 
-  EXPECT_EQ("nullptr", ParseAndStringify("+"));
-  EXPECT_EQ("nullptr", ParseAndStringify("^"));
-  EXPECT_EQ("nullptr", ParseAndStringify("1 +"));
-  EXPECT_EQ("nullptr", ParseAndStringify("1 2 ^"));
-  EXPECT_EQ("nullptr", ParseAndStringify("1 2 3 +"));
-  EXPECT_EQ("nullptr", ParseAndStringify("^ 1"));
-  EXPECT_EQ("nullptr", ParseAndStringify("+ 1 2"));
-  EXPECT_EQ("nullptr", ParseAndStringify("1 + 2"));
-  EXPECT_EQ("nullptr", ParseAndStringify("1 2"));
-  EXPECT_EQ("nullptr", ParseAndStringify(""));
+  EXPECT_EQ("nullptr", ParseOneAndStringify("+"));
+  EXPECT_EQ("nullptr", ParseOneAndStringify("^"));
+  EXPECT_EQ("nullptr", ParseOneAndStringify("1 +"));
+  EXPECT_EQ("nullptr", ParseOneAndStringify("1 2 ^"));
+  EXPECT_EQ("nullptr", ParseOneAndStringify("1 2 3 +"));
+  EXPECT_EQ("nullptr", ParseOneAndStringify("^ 1"));
+  EXPECT_EQ("nullptr", ParseOneAndStringify("+ 1 2"));
+  EXPECT_EQ("nullptr", ParseOneAndStringify("1 + 2"));
+  EXPECT_EQ("nullptr", ParseOneAndStringify("1 2"));
+  EXPECT_EQ("nullptr", ParseOneAndStringify(""));
+}
+
+static std::vector<std::pair<std::string, std::string>>
+ParseFPOAndStringify(llvm::StringRef prog) {
+  llvm::BumpPtrAllocator alloc;
+  std::vector<std::pair<llvm::StringRef, Node *>> parsed =
+      ParseFPOProgram(prog, alloc);
+  std::vector<std::pair<std::string, std::string>> result;
+  for (const auto &p : parsed)
+    result.emplace_back(p.first, ASTPrinter::Print(p.second));
+  return result;
+}
+
+TEST(PostfixExpression, ParseFPOProgram) {
+  EXPECT_THAT(ParseFPOAndStringify("a 1 ="),
+              testing::ElementsAre(std::make_pair("a", "int(1)")));
+  EXPECT_THAT(ParseFPOAndStringify("a 1 = b 2 3 + ="),
+              testing::ElementsAre(std::make_pair("a", "int(1)"),
+                                   std::make_pair("b", "+(int(2), int(3))")));
+
+  EXPECT_THAT(ParseFPOAndStringify(""), testing::IsEmpty());
+  EXPECT_THAT(ParseFPOAndStringify("="), testing::IsEmpty());
+  EXPECT_THAT(ParseFPOAndStringify("a 1"), testing::IsEmpty());
+  EXPECT_THAT(ParseFPOAndStringify("a 1 = ="), testing::IsEmpty());
+  EXPECT_THAT(ParseFPOAndStringify("a 1 + ="), testing::IsEmpty());
+  EXPECT_THAT(ParseFPOAndStringify("= a 1 ="), testing::IsEmpty());
 }
 
 static std::string ParseAndGenerateDWARF(llvm::StringRef expr) {
   llvm::BumpPtrAllocator alloc;
-  Node *ast = Parse(expr, alloc);
+  Node *ast = ParseOneExpression(expr, alloc);
   if (!ast)
     return "Parse failed.";
   if (!ResolveSymbols(ast, [&](SymbolNode &symbol) -> Node * {
diff --git a/src/llvm-project/lldb/unittests/Symbol/TestClangASTContext.cpp b/src/llvm-project/lldb/unittests/Symbol/TestClangASTContext.cpp
index ae146d0..99ef3ed 100644
--- a/src/llvm-project/lldb/unittests/Symbol/TestClangASTContext.cpp
+++ b/src/llvm-project/lldb/unittests/Symbol/TestClangASTContext.cpp
@@ -1,6 +1,4 @@
-//===-- TestClangASTContext.cpp ---------------------------------------*- C++
-//-*-===//
-
+//===-- TestClangASTContext.cpp ---------------------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -8,15 +6,16 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "gtest/gtest.h"
-
-#include "clang/AST/DeclCXX.h"
-
+#include "TestingSupport/SubsystemRAII.h"
+#include "TestingSupport/Symbol/ClangTestUtils.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/ClangUtil.h"
 #include "lldb/Symbol/Declaration.h"
+#include "clang/AST/DeclCXX.h"
+#include "clang/AST/ExprCXX.h"
+#include "gtest/gtest.h"
 
 using namespace clang;
 using namespace lldb;
@@ -24,19 +23,10 @@
 
 class TestClangASTContext : public testing::Test {
 public:
-  static void SetUpTestCase() {
-    FileSystem::Initialize();
-    HostInfo::Initialize();
-  }
-
-  static void TearDownTestCase() {
-    HostInfo::Terminate();
-    FileSystem::Terminate();
-  }
+  SubsystemRAII<FileSystem, HostInfo> subsystems;
 
   void SetUp() override {
-    std::string triple = HostInfo::GetTargetTriple();
-    m_ast.reset(new ClangASTContext(triple.c_str()));
+    m_ast.reset(new ClangASTContext(HostInfo::GetTargetTriple()));
   }
 
   void TearDown() override { m_ast.reset(); }
@@ -55,67 +45,66 @@
 };
 
 TEST_F(TestClangASTContext, TestGetBasicTypeFromEnum) {
-  clang::ASTContext *context = m_ast->getASTContext();
+  clang::ASTContext &context = m_ast->getASTContext();
 
   EXPECT_TRUE(
-      context->hasSameType(GetBasicQualType(eBasicTypeBool), context->BoolTy));
+      context.hasSameType(GetBasicQualType(eBasicTypeBool), context.BoolTy));
   EXPECT_TRUE(
-      context->hasSameType(GetBasicQualType(eBasicTypeChar), context->CharTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeChar16),
-                                   context->Char16Ty));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeChar32),
-                                   context->Char32Ty));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeDouble),
-                                   context->DoubleTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeDoubleComplex),
-                                   context->DoubleComplexTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeFloat),
-                                   context->FloatTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeFloatComplex),
-                                   context->FloatComplexTy));
+      context.hasSameType(GetBasicQualType(eBasicTypeChar), context.CharTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeChar16),
+                                  context.Char16Ty));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeChar32),
+                                  context.Char32Ty));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeDouble),
+                                  context.DoubleTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeDoubleComplex),
+                                  context.DoubleComplexTy));
   EXPECT_TRUE(
-      context->hasSameType(GetBasicQualType(eBasicTypeHalf), context->HalfTy));
+      context.hasSameType(GetBasicQualType(eBasicTypeFloat), context.FloatTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeFloatComplex),
+                                  context.FloatComplexTy));
   EXPECT_TRUE(
-      context->hasSameType(GetBasicQualType(eBasicTypeInt), context->IntTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeInt128),
-                                   context->Int128Ty));
+      context.hasSameType(GetBasicQualType(eBasicTypeHalf), context.HalfTy));
   EXPECT_TRUE(
-      context->hasSameType(GetBasicQualType(eBasicTypeLong), context->LongTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeLongDouble),
-                                   context->LongDoubleTy));
+      context.hasSameType(GetBasicQualType(eBasicTypeInt), context.IntTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeInt128),
+                                  context.Int128Ty));
   EXPECT_TRUE(
-      context->hasSameType(GetBasicQualType(eBasicTypeLongDoubleComplex),
-                           context->LongDoubleComplexTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeLongLong),
-                                   context->LongLongTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeNullPtr),
-                                   context->NullPtrTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeObjCClass),
-                                   context->getObjCClassType()));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeObjCID),
-                                   context->getObjCIdType()));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeObjCSel),
-                                   context->getObjCSelType()));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeShort),
-                                   context->ShortTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeSignedChar),
-                                   context->SignedCharTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeUnsignedChar),
-                                   context->UnsignedCharTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeUnsignedInt),
-                                   context->UnsignedIntTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeUnsignedInt128),
-                                   context->UnsignedInt128Ty));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeUnsignedLong),
-                                   context->UnsignedLongTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeUnsignedLongLong),
-                                   context->UnsignedLongLongTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeUnsignedShort),
-                                   context->UnsignedShortTy));
+      context.hasSameType(GetBasicQualType(eBasicTypeLong), context.LongTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeLongDouble),
+                                  context.LongDoubleTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeLongDoubleComplex),
+                                  context.LongDoubleComplexTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeLongLong),
+                                  context.LongLongTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeNullPtr),
+                                  context.NullPtrTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeObjCClass),
+                                  context.getObjCClassType()));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeObjCID),
+                                  context.getObjCIdType()));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeObjCSel),
+                                  context.getObjCSelType()));
   EXPECT_TRUE(
-      context->hasSameType(GetBasicQualType(eBasicTypeVoid), context->VoidTy));
-  EXPECT_TRUE(context->hasSameType(GetBasicQualType(eBasicTypeWChar),
-                                   context->WCharTy));
+      context.hasSameType(GetBasicQualType(eBasicTypeShort), context.ShortTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeSignedChar),
+                                  context.SignedCharTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedChar),
+                                  context.UnsignedCharTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedInt),
+                                  context.UnsignedIntTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedInt128),
+                                  context.UnsignedInt128Ty));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedLong),
+                                  context.UnsignedLongTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedLongLong),
+                                  context.UnsignedLongLongTy));
+  EXPECT_TRUE(context.hasSameType(GetBasicQualType(eBasicTypeUnsignedShort),
+                                  context.UnsignedShortTy));
+  EXPECT_TRUE(
+      context.hasSameType(GetBasicQualType(eBasicTypeVoid), context.VoidTy));
+  EXPECT_TRUE(
+      context.hasSameType(GetBasicQualType(eBasicTypeWChar), context.WCharTy));
 }
 
 TEST_F(TestClangASTContext, TestGetBasicTypeFromName) {
@@ -169,10 +158,12 @@
   EXPECT_EQ(GetBasicQualType(eBasicTypeNullPtr), GetBasicQualType("nullptr"));
 }
 
-void VerifyEncodingAndBitSize(clang::ASTContext *context,
+void VerifyEncodingAndBitSize(ClangASTContext &clang_context,
                               lldb::Encoding encoding, unsigned int bit_size) {
-  CompilerType type = ClangASTContext::GetBuiltinTypeForEncodingAndBitSize(
-      context, encoding, bit_size);
+  clang::ASTContext &context = clang_context.getASTContext();
+
+  CompilerType type =
+      clang_context.GetBuiltinTypeForEncodingAndBitSize(encoding, bit_size);
   EXPECT_TRUE(type.IsValid());
 
   QualType qtype = ClangUtil::GetQualType(type);
@@ -180,7 +171,7 @@
   if (qtype.isNull())
     return;
 
-  uint64_t actual_size = context->getTypeSize(qtype);
+  uint64_t actual_size = context.getTypeSize(qtype);
   EXPECT_EQ(bit_size, actual_size);
 
   const clang::Type *type_ptr = qtype.getTypePtr();
@@ -206,8 +197,6 @@
 }
 
 TEST_F(TestClangASTContext, TestBuiltinTypeForEncodingAndBitSize) {
-  clang::ASTContext *context = m_ast->getASTContext();
-
   // Make sure we can get types of every possible size in every possible
   // encoding.
   // We can't make any guarantee about which specific type we get, because the
@@ -215,26 +204,26 @@
   // isn't that specific.  We only need to make sure the compiler hands us some
   // type that
   // is both a builtin type and matches the requested bit size.
-  VerifyEncodingAndBitSize(context, eEncodingSint, 8);
-  VerifyEncodingAndBitSize(context, eEncodingSint, 16);
-  VerifyEncodingAndBitSize(context, eEncodingSint, 32);
-  VerifyEncodingAndBitSize(context, eEncodingSint, 64);
-  VerifyEncodingAndBitSize(context, eEncodingSint, 128);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 8);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 16);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 32);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 64);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingSint, 128);
 
-  VerifyEncodingAndBitSize(context, eEncodingUint, 8);
-  VerifyEncodingAndBitSize(context, eEncodingUint, 16);
-  VerifyEncodingAndBitSize(context, eEncodingUint, 32);
-  VerifyEncodingAndBitSize(context, eEncodingUint, 64);
-  VerifyEncodingAndBitSize(context, eEncodingUint, 128);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 8);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 16);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 32);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 64);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingUint, 128);
 
-  VerifyEncodingAndBitSize(context, eEncodingIEEE754, 32);
-  VerifyEncodingAndBitSize(context, eEncodingIEEE754, 64);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingIEEE754, 32);
+  VerifyEncodingAndBitSize(*m_ast, eEncodingIEEE754, 64);
 }
 
 TEST_F(TestClangASTContext, TestIsClangType) {
-  clang::ASTContext *context = m_ast->getASTContext();
+  clang::ASTContext &context = m_ast->getASTContext();
   lldb::opaque_compiler_type_t bool_ctype =
-      ClangASTContext::GetOpaqueCompilerType(context, lldb::eBasicTypeBool);
+      ClangASTContext::GetOpaqueCompilerType(&context, lldb::eBasicTypeBool);
   CompilerType bool_type(m_ast.get(), bool_ctype);
   CompilerType record_type = m_ast->CreateRecordType(
       nullptr, lldb::eAccessPublic, "FooRecord", clang::TTK_Struct,
@@ -317,8 +306,7 @@
 }
 
 TEST_F(TestClangASTContext, TestRecordHasFields) {
-  CompilerType int_type =
-      ClangASTContext::GetBasicType(m_ast->getASTContext(), eBasicTypeInt);
+  CompilerType int_type = m_ast->GetBasicType(eBasicTypeInt);
 
   // Test that a record with no fields returns false
   CompilerType empty_base = m_ast->CreateRecordType(
@@ -396,11 +384,11 @@
 TEST_F(TestClangASTContext, TemplateArguments) {
   ClangASTContext::TemplateParameterInfos infos;
   infos.names.push_back("T");
-  infos.args.push_back(TemplateArgument(m_ast->getASTContext()->IntTy));
+  infos.args.push_back(TemplateArgument(m_ast->getASTContext().IntTy));
   infos.names.push_back("I");
   llvm::APSInt arg(llvm::APInt(8, 47));
-  infos.args.push_back(TemplateArgument(*m_ast->getASTContext(), arg,
-                                        m_ast->getASTContext()->IntTy));
+  infos.args.push_back(TemplateArgument(m_ast->getASTContext(), arg,
+                                        m_ast->getASTContext().IntTy));
 
   // template<typename T, int I> struct foo;
   ClassTemplateDecl *decl = m_ast->CreateClassTemplateDecl(
@@ -419,15 +407,17 @@
 
   // typedef foo<int, 47> foo_def;
   CompilerType typedef_type = m_ast->CreateTypedefType(
-      type, "foo_def",
-      CompilerDeclContext(m_ast.get(), m_ast->GetTranslationUnitDecl()));
+      type, "foo_def", m_ast->CreateDeclContext(m_ast->GetTranslationUnitDecl()));
 
-  CompilerType auto_type(m_ast->getASTContext(),
-                         m_ast->getASTContext()->getAutoType(
-                             ClangUtil::GetCanonicalQualType(typedef_type),
-                             clang::AutoTypeKeyword::Auto, false));
+  CompilerType auto_type(
+      m_ast.get(),
+      m_ast->getASTContext()
+          .getAutoType(ClangUtil::GetCanonicalQualType(typedef_type),
+                       clang::AutoTypeKeyword::Auto, false)
+          .getAsOpaquePtr());
 
-  CompilerType int_type(m_ast->getASTContext(), m_ast->getASTContext()->IntTy);
+  CompilerType int_type(m_ast.get(),
+                        m_ast->getASTContext().IntTy.getAsOpaquePtr());
   for (CompilerType t : {type, typedef_type, auto_type}) {
     SCOPED_TRACE(t.GetTypeName().AsCString());
 
@@ -448,3 +438,88 @@
     EXPECT_EQ(int_type, result->type);
   }
 }
+
+static QualType makeConstInt(clang::ASTContext &ctxt) {
+  QualType result(ctxt.IntTy);
+  result.addConst();
+  return result;
+}
+
+TEST_F(TestClangASTContext, TestGetTypeClassDeclType) {
+  clang::ASTContext &ctxt = m_ast->getASTContext();
+  auto *nullptr_expr = new (ctxt) CXXNullPtrLiteralExpr(ctxt.NullPtrTy, SourceLocation());
+  QualType t = ctxt.getDecltypeType(nullptr_expr, makeConstInt(ctxt));
+  EXPECT_EQ(lldb::eTypeClassBuiltin, m_ast->GetTypeClass(t.getAsOpaquePtr()));
+}
+
+TEST_F(TestClangASTContext, TestGetTypeClassTypeOf) {
+  clang::ASTContext &ctxt = m_ast->getASTContext();
+  QualType t = ctxt.getTypeOfType(makeConstInt(ctxt));
+  EXPECT_EQ(lldb::eTypeClassBuiltin, m_ast->GetTypeClass(t.getAsOpaquePtr()));
+}
+
+TEST_F(TestClangASTContext, TestGetTypeClassTypeOfExpr) {
+  clang::ASTContext &ctxt = m_ast->getASTContext();
+  auto *nullptr_expr = new (ctxt) CXXNullPtrLiteralExpr(ctxt.NullPtrTy, SourceLocation());
+  QualType t = ctxt.getTypeOfExprType(nullptr_expr);
+  EXPECT_EQ(lldb::eTypeClassBuiltin, m_ast->GetTypeClass(t.getAsOpaquePtr()));
+}
+
+TEST_F(TestClangASTContext, TestGetTypeClassNested) {
+  clang::ASTContext &ctxt = m_ast->getASTContext();
+  QualType t_base = ctxt.getTypeOfType(makeConstInt(ctxt));
+  QualType t = ctxt.getTypeOfType(t_base);
+  EXPECT_EQ(lldb::eTypeClassBuiltin, m_ast->GetTypeClass(t.getAsOpaquePtr()));
+}
+
+TEST_F(TestClangASTContext, TestFunctionTemplateConstruction) {
+  // Tests creating a function template.
+
+  CompilerType int_type = m_ast->GetBasicType(lldb::eBasicTypeInt);
+  clang::TranslationUnitDecl *TU = m_ast->GetTranslationUnitDecl();
+
+  // Prepare the declarations/types we need for the template.
+  CompilerType clang_type =
+      m_ast->CreateFunctionType(int_type, nullptr, 0U, false, 0U);
+  FunctionDecl *func =
+      m_ast->CreateFunctionDeclaration(TU, "foo", clang_type, 0, false);
+  ClangASTContext::TemplateParameterInfos empty_params;
+
+  // Create the actual function template.
+  clang::FunctionTemplateDecl *func_template =
+      m_ast->CreateFunctionTemplateDecl(TU, func, "foo", empty_params);
+
+  EXPECT_EQ(TU, func_template->getDeclContext());
+  EXPECT_EQ("foo", func_template->getName());
+  EXPECT_EQ(clang::AccessSpecifier::AS_none, func_template->getAccess());
+}
+
+TEST_F(TestClangASTContext, TestFunctionTemplateInRecordConstruction) {
+  // Tests creating a function template inside a record.
+
+  CompilerType int_type = m_ast->GetBasicType(lldb::eBasicTypeInt);
+  clang::TranslationUnitDecl *TU = m_ast->GetTranslationUnitDecl();
+
+  // Create a record we can put the function template int.
+  CompilerType record_type =
+      clang_utils::createRecordWithField(*m_ast, "record", int_type, "field");
+  clang::TagDecl *record = ClangUtil::GetAsTagDecl(record_type);
+
+  // Prepare the declarations/types we need for the template.
+  CompilerType clang_type =
+      m_ast->CreateFunctionType(int_type, nullptr, 0U, false, 0U);
+  // We create the FunctionDecl for the template in the TU DeclContext because:
+  // 1. FunctionDecls can't be in a Record (only CXXMethodDecls can).
+  // 2. It is mirroring the behavior of DWARFASTParserClang::ParseSubroutine.
+  FunctionDecl *func =
+      m_ast->CreateFunctionDeclaration(TU, "foo", clang_type, 0, false);
+  ClangASTContext::TemplateParameterInfos empty_params;
+
+  // Create the actual function template.
+  clang::FunctionTemplateDecl *func_template =
+      m_ast->CreateFunctionTemplateDecl(record, func, "foo", empty_params);
+
+  EXPECT_EQ(record, func_template->getDeclContext());
+  EXPECT_EQ("foo", func_template->getName());
+  EXPECT_EQ(clang::AccessSpecifier::AS_public, func_template->getAccess());
+}
diff --git a/src/llvm-project/lldb/unittests/Symbol/TestClangASTImporter.cpp b/src/llvm-project/lldb/unittests/Symbol/TestClangASTImporter.cpp
new file mode 100644
index 0000000..4f99d40
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/Symbol/TestClangASTImporter.cpp
@@ -0,0 +1,231 @@
+//===-- TestClangASTImporter.cpp --------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "gtest/gtest.h"
+
+#include "TestingSupport/SubsystemRAII.h"
+#include "TestingSupport/Symbol/ClangTestUtils.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/ClangASTImporter.h"
+#include "lldb/Symbol/ClangASTMetadata.h"
+#include "lldb/Symbol/ClangUtil.h"
+#include "lldb/Symbol/Declaration.h"
+#include "clang/AST/DeclCXX.h"
+
+using namespace clang;
+using namespace lldb;
+using namespace lldb_private;
+
+class TestClangASTImporter : public testing::Test {
+public:
+  SubsystemRAII<FileSystem, HostInfo> subsystems;
+};
+
+TEST_F(TestClangASTImporter, CanImportInvalidType) {
+  ClangASTImporter importer;
+  EXPECT_FALSE(importer.CanImport(CompilerType()));
+}
+
+TEST_F(TestClangASTImporter, ImportInvalidType) {
+  ClangASTImporter importer;
+  EXPECT_FALSE(importer.Import(CompilerType()));
+}
+
+TEST_F(TestClangASTImporter, CopyDeclTagDecl) {
+  // Tests that the ClangASTImporter::CopyDecl can copy TagDecls.
+  clang_utils::SourceASTWithRecord source;
+
+  std::unique_ptr<ClangASTContext> target_ast = clang_utils::createAST();
+
+  ClangASTImporter importer;
+  clang::Decl *imported =
+      importer.CopyDecl(&target_ast->getASTContext(), source.record_decl);
+  ASSERT_NE(nullptr, imported);
+
+  // Check that we got the correct decl by just comparing their qualified name.
+  clang::TagDecl *imported_tag_decl = llvm::cast<clang::TagDecl>(imported);
+  EXPECT_EQ(source.record_decl->getQualifiedNameAsString(),
+            imported_tag_decl->getQualifiedNameAsString());
+  // We did a minimal import of the tag decl.
+  EXPECT_TRUE(imported_tag_decl->hasExternalLexicalStorage());
+
+  // Check that origin was set for the imported declaration.
+  ClangASTImporter::DeclOrigin origin = importer.GetDeclOrigin(imported);
+  EXPECT_TRUE(origin.Valid());
+  EXPECT_EQ(origin.ctx, &source.ast->getASTContext());
+  EXPECT_EQ(origin.decl, source.record_decl);
+}
+
+TEST_F(TestClangASTImporter, CopyTypeTagDecl) {
+  // Tests that the ClangASTImporter::CopyType can copy TagDecls types.
+  clang_utils::SourceASTWithRecord source;
+
+  std::unique_ptr<ClangASTContext> target_ast = clang_utils::createAST();
+
+  ClangASTImporter importer;
+  CompilerType imported = importer.CopyType(*target_ast, source.record_type);
+  ASSERT_TRUE(imported.IsValid());
+
+  // Check that we got the correct decl by just comparing their qualified name.
+  clang::TagDecl *imported_tag_decl = ClangUtil::GetAsTagDecl(imported);
+  EXPECT_EQ(source.record_decl->getQualifiedNameAsString(),
+            imported_tag_decl->getQualifiedNameAsString());
+  // We did a minimal import of the tag decl.
+  EXPECT_TRUE(imported_tag_decl->hasExternalLexicalStorage());
+
+  // Check that origin was set for the imported declaration.
+  ClangASTImporter::DeclOrigin origin =
+      importer.GetDeclOrigin(imported_tag_decl);
+  EXPECT_TRUE(origin.Valid());
+  EXPECT_EQ(origin.ctx, &source.ast->getASTContext());
+  EXPECT_EQ(origin.decl, source.record_decl);
+}
+
+TEST_F(TestClangASTImporter, DeportDeclTagDecl) {
+  // Tests that the ClangASTImporter::DeportDecl completely copies TagDecls.
+  clang_utils::SourceASTWithRecord source;
+
+  std::unique_ptr<ClangASTContext> target_ast = clang_utils::createAST();
+
+  ClangASTImporter importer;
+  clang::Decl *imported =
+      importer.DeportDecl(&target_ast->getASTContext(), source.record_decl);
+  ASSERT_NE(nullptr, imported);
+
+  // Check that we got the correct decl by just comparing their qualified name.
+  clang::TagDecl *imported_tag_decl = llvm::cast<clang::TagDecl>(imported);
+  EXPECT_EQ(source.record_decl->getQualifiedNameAsString(),
+            imported_tag_decl->getQualifiedNameAsString());
+  // The record should be completed as we deported it.
+  EXPECT_FALSE(imported_tag_decl->hasExternalLexicalStorage());
+
+  // Deporting doesn't update the origin map.
+  EXPECT_FALSE(importer.GetDeclOrigin(imported_tag_decl).Valid());
+}
+
+TEST_F(TestClangASTImporter, DeportTypeTagDecl) {
+  // Tests that the ClangASTImporter::CopyType can deport TagDecl types.
+  clang_utils::SourceASTWithRecord source;
+
+  std::unique_ptr<ClangASTContext> target_ast = clang_utils::createAST();
+
+  ClangASTImporter importer;
+  CompilerType imported = importer.DeportType(*target_ast, source.record_type);
+  ASSERT_TRUE(imported.IsValid());
+
+  // Check that we got the correct decl by just comparing their qualified name.
+  clang::TagDecl *imported_tag_decl = ClangUtil::GetAsTagDecl(imported);
+  EXPECT_EQ(source.record_decl->getQualifiedNameAsString(),
+            imported_tag_decl->getQualifiedNameAsString());
+  // The record should be completed as we deported it.
+  EXPECT_FALSE(imported_tag_decl->hasExternalLexicalStorage());
+
+  // Deporting doesn't update the origin map.
+  EXPECT_FALSE(importer.GetDeclOrigin(imported_tag_decl).Valid());
+}
+
+TEST_F(TestClangASTImporter, MetadataPropagation) {
+  // Tests that AST metadata is propagated when copying declarations.
+
+  clang_utils::SourceASTWithRecord source;
+
+  const lldb::user_id_t metadata = 123456;
+  source.ast->SetMetadataAsUserID(source.record_decl, metadata);
+
+  std::unique_ptr<ClangASTContext> target_ast = clang_utils::createAST();
+
+  ClangASTImporter importer;
+  clang::Decl *imported =
+      importer.CopyDecl(&target_ast->getASTContext(), source.record_decl);
+  ASSERT_NE(nullptr, imported);
+
+  // Check that we got the same Metadata.
+  ASSERT_NE(nullptr, importer.GetDeclMetadata(imported));
+  EXPECT_EQ(metadata, importer.GetDeclMetadata(imported)->GetUserID());
+}
+
+TEST_F(TestClangASTImporter, MetadataPropagationIndirectImport) {
+  // Tests that AST metadata is propagated when copying declarations when
+  // importing one declaration into a temporary context and then to the
+  // actual destination context.
+
+  clang_utils::SourceASTWithRecord source;
+
+  const lldb::user_id_t metadata = 123456;
+  source.ast->SetMetadataAsUserID(source.record_decl, metadata);
+
+  std::unique_ptr<ClangASTContext> temporary_ast = clang_utils::createAST();
+
+  ClangASTImporter importer;
+  clang::Decl *temporary_imported =
+      importer.CopyDecl(&temporary_ast->getASTContext(), source.record_decl);
+  ASSERT_NE(nullptr, temporary_imported);
+
+  std::unique_ptr<ClangASTContext> target_ast = clang_utils::createAST();
+  clang::Decl *imported =
+      importer.CopyDecl(&target_ast->getASTContext(), temporary_imported);
+  ASSERT_NE(nullptr, imported);
+
+  // Check that we got the same Metadata.
+  ASSERT_NE(nullptr, importer.GetDeclMetadata(imported));
+  EXPECT_EQ(metadata, importer.GetDeclMetadata(imported)->GetUserID());
+}
+
+TEST_F(TestClangASTImporter, MetadataPropagationAfterCopying) {
+  // Tests that AST metadata is propagated when copying declarations even
+  // when the metadata was set after the declaration has already been copied.
+
+  clang_utils::SourceASTWithRecord source;
+  const lldb::user_id_t metadata = 123456;
+
+  std::unique_ptr<ClangASTContext> target_ast = clang_utils::createAST();
+
+  ClangASTImporter importer;
+  clang::Decl *imported =
+      importer.CopyDecl(&target_ast->getASTContext(), source.record_decl);
+  ASSERT_NE(nullptr, imported);
+
+  // The TagDecl has been imported. Now set the metadata of the source and
+  // make sure the imported one will directly see it.
+  source.ast->SetMetadataAsUserID(source.record_decl, metadata);
+
+  // Check that we got the same Metadata.
+  ASSERT_NE(nullptr, importer.GetDeclMetadata(imported));
+  EXPECT_EQ(metadata, importer.GetDeclMetadata(imported)->GetUserID());
+}
+
+TEST_F(TestClangASTImporter, RecordLayout) {
+  // Test that it is possible to register RecordDecl layouts and then later
+  // correctly retrieve them.
+
+  clang_utils::SourceASTWithRecord source;
+
+  ClangASTImporter importer;
+  ClangASTImporter::LayoutInfo layout_info;
+  layout_info.bit_size = 15;
+  layout_info.alignment = 2;
+  layout_info.field_offsets[source.field_decl] = 1;
+  importer.SetRecordLayout(source.record_decl, layout_info);
+
+  uint64_t bit_size;
+  uint64_t alignment;
+  llvm::DenseMap<const clang::FieldDecl *, uint64_t> field_offsets;
+  llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits> base_offsets;
+  llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits> vbase_offsets;
+  importer.LayoutRecordType(source.record_decl, bit_size, alignment,
+                            field_offsets, base_offsets, vbase_offsets);
+
+  EXPECT_EQ(15U, bit_size);
+  EXPECT_EQ(2U, alignment);
+  EXPECT_EQ(1U, field_offsets.size());
+  EXPECT_EQ(1U, field_offsets[source.field_decl]);
+  EXPECT_EQ(0U, base_offsets.size());
+  EXPECT_EQ(0U, vbase_offsets.size());
+}
diff --git a/src/llvm-project/lldb/unittests/Symbol/TestDWARFCallFrameInfo.cpp b/src/llvm-project/lldb/unittests/Symbol/TestDWARFCallFrameInfo.cpp
index c0bfa55..f7180a1 100644
--- a/src/llvm-project/lldb/unittests/Symbol/TestDWARFCallFrameInfo.cpp
+++ b/src/llvm-project/lldb/unittests/Symbol/TestDWARFCallFrameInfo.cpp
@@ -11,6 +11,8 @@
 
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
 #include "Plugins/Process/Utility/RegisterContext_x86.h"
+#include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 
 #include "lldb/Core/Module.h"
@@ -31,18 +33,8 @@
 using namespace lldb;
 
 class DWARFCallFrameInfoTest : public testing::Test {
-public:
-  void SetUp() override {
-    FileSystem::Initialize();
-    HostInfo::Initialize();
-    ObjectFileELF::Initialize();
-  }
-
-  void TearDown() override {
-    ObjectFileELF::Terminate();
-    HostInfo::Terminate();
-    FileSystem::Terminate();
-  }
+  SubsystemRAII<FileSystem, HostInfo, ObjectFileELF, SymbolFileSymtab>
+      subsystems;
 
 protected:
   void TestBasic(DWARFCallFrameInfo::Type type, llvm::StringRef symbol);
@@ -84,14 +76,152 @@
 
 void DWARFCallFrameInfoTest::TestBasic(DWARFCallFrameInfo::Type type,
                                        llvm::StringRef symbol) {
-  llvm::SmallString<128> obj;
-  ASSERT_NO_ERROR(llvm::sys::fs::createTemporaryFile(
-      "basic-call-frame-info-%%%%%%", "obj", obj));
-  llvm::FileRemover obj_remover(obj);
-  ASSERT_THAT_ERROR(ReadYAMLObjectFile("basic-call-frame-info.yaml", obj),
-                    llvm::Succeeded());
+  auto ExpectedFile = TestFile::fromYaml(R"(
+--- !ELF
+FileHeader:
+  Class:           ELFCLASS64
+  Data:            ELFDATA2LSB
+  Type:            ET_DYN
+  Machine:         EM_X86_64
+  Entry:           0x0000000000000260
+Sections:
+  - Name:            .text
+    Type:            SHT_PROGBITS
+    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
+    Address:         0x0000000000000260
+    AddressAlign:    0x0000000000000010
+    Content:         554889E5897DFC8B45FC5DC30F1F4000554889E5897DFC8B45FC5DC30F1F4000554889E5897DFC8B45FC5DC3
+#0000000000000260 <eh_frame>:
+# 260:	55                   	push   %rbp
+# 261:	48 89 e5             	mov    %rsp,%rbp
+# 264:	89 7d fc             	mov    %edi,-0x4(%rbp)
+# 267:	8b 45 fc             	mov    -0x4(%rbp),%eax
+# 26a:	5d                   	pop    %rbp
+# 26b:	c3                   	retq
+# 26c:	0f 1f 40 00          	nopl   0x0(%rax)
+#
+#0000000000000270 <debug_frame3>:
+# 270:	55                   	push   %rbp
+# 271:	48 89 e5             	mov    %rsp,%rbp
+# 274:	89 7d fc             	mov    %edi,-0x4(%rbp)
+# 277:	8b 45 fc             	mov    -0x4(%rbp),%eax
+# 27a:	5d                   	pop    %rbp
+# 27b:	c3                   	retq
+# 27c:	0f 1f 40 00          	nopl   0x0(%rax)
+#
+#0000000000000280 <debug_frame4>:
+# 280:	55                   	push   %rbp
+# 281:	48 89 e5             	mov    %rsp,%rbp
+# 284:	89 7d fc             	mov    %edi,-0x4(%rbp)
+# 287:	8b 45 fc             	mov    -0x4(%rbp),%eax
+# 28a:	5d                   	pop    %rbp
+# 28b:	c3                   	retq
+  - Name:            .eh_frame
+    Type:            SHT_X86_64_UNWIND
+    Flags:           [ SHF_ALLOC ]
+    Address:         0x0000000000000290
+    AddressAlign:    0x0000000000000008
+    Content:         1400000000000000017A5200017810011B0C0708900100001C0000001C000000B0FFFFFF0C00000000410E108602430D0600000000000000
+#00000000 0000000000000014 00000000 CIE
+#  Version:               1
+#  Augmentation:          "zR"
+#  Code alignment factor: 1
+#  Data alignment factor: -8
+#  Return address column: 16
+#  Augmentation data:     1b
+#
+#  DW_CFA_def_cfa: r7 (rsp) ofs 8
+#  DW_CFA_offset: r16 (rip) at cfa-8
+#  DW_CFA_nop
+#  DW_CFA_nop
+#
+#00000018 000000000000001c 0000001c FDE cie=00000000 pc=ffffffffffffffd0..ffffffffffffffdc
+#  DW_CFA_advance_loc: 1 to ffffffffffffffd1
+#  DW_CFA_def_cfa_offset: 16
+#  DW_CFA_offset: r6 (rbp) at cfa-16
+#  DW_CFA_advance_loc: 3 to ffffffffffffffd4
+#  DW_CFA_def_cfa_register: r6 (rbp)
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+  - Name:            .debug_frame
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000008
+    Content:         14000000FFFFFFFF03000178100C070890010000000000001C0000000000000070020000000000000C00000000000000410E108602430D0614000000FFFFFFFF040008000178100C07089001000000001C0000003800000080020000000000000C00000000000000410E108602430D06
+#00000000 0000000000000014 ffffffff CIE
+#  Version:               3
+#  Augmentation:          ""
+#  Code alignment factor: 1
+#  Data alignment factor: -8
+#  Return address column: 16
+#
+#  DW_CFA_def_cfa: r7 (rsp) ofs 8
+#  DW_CFA_offset: r16 (rip) at cfa-8
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#
+#00000018 000000000000001c 00000000 FDE cie=00000000 pc=0000000000000270..000000000000027c
+#  DW_CFA_advance_loc: 1 to 0000000000000271
+#  DW_CFA_def_cfa_offset: 16
+#  DW_CFA_offset: r6 (rbp) at cfa-16
+#  DW_CFA_advance_loc: 3 to 0000000000000274
+#  DW_CFA_def_cfa_register: r6 (rbp)
+#
+#00000038 0000000000000014 ffffffff CIE
+#  Version:               4
+#  Augmentation:          ""
+#  Pointer Size:          8
+#  Segment Size:          0
+#  Code alignment factor: 1
+#  Data alignment factor: -8
+#  Return address column: 16
+#
+#  DW_CFA_def_cfa: r7 (rsp) ofs 8
+#  DW_CFA_offset: r16 (rip) at cfa-8
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#  DW_CFA_nop
+#
+#00000050 000000000000001c 00000038 FDE cie=00000038 pc=0000000000000280..000000000000028c
+#  DW_CFA_advance_loc: 1 to 0000000000000281
+#  DW_CFA_def_cfa_offset: 16
+#  DW_CFA_offset: r6 (rbp) at cfa-16
+#  DW_CFA_advance_loc: 3 to 0000000000000284
+#  DW_CFA_def_cfa_register: r6 (rbp)
+Symbols:
+  - Name:            eh_frame
+    Type:            STT_FUNC
+    Section:         .text
+    Value:           0x0000000000000260
+    Size:            0x000000000000000C
+    Binding:         STB_GLOBAL
+  - Name:            debug_frame3
+    Type:            STT_FUNC
+    Section:         .text
+    Value:           0x0000000000000270
+    Size:            0x000000000000000C
+    Binding:         STB_GLOBAL
+  - Name:            debug_frame4
+    Type:            STT_FUNC
+    Section:         .text
+    Value:           0x0000000000000280
+    Size:            0x000000000000000C
+    Binding:         STB_GLOBAL
+...
+)");
+  ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded());
 
-  auto module_sp = std::make_shared<Module>(ModuleSpec(FileSpec(obj)));
+  auto module_sp =
+      std::make_shared<Module>(ModuleSpec(FileSpec(ExpectedFile->name())));
   SectionList *list = module_sp->GetSectionList();
   ASSERT_NE(nullptr, list);
 
diff --git a/src/llvm-project/lldb/unittests/Symbol/TestLineEntry.cpp b/src/llvm-project/lldb/unittests/Symbol/TestLineEntry.cpp
index c032335..cb2adba 100644
--- a/src/llvm-project/lldb/unittests/Symbol/TestLineEntry.cpp
+++ b/src/llvm-project/lldb/unittests/Symbol/TestLineEntry.cpp
@@ -14,6 +14,7 @@
 #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
 #include "Plugins/SymbolFile/DWARF/DWARFASTParserClang.h"
 #include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 #include "lldb/Symbol/ClangASTContext.h"
 
@@ -22,7 +23,6 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Utility/StreamString.h"
 
 #include "llvm/Support/FileUtilities.h"
 #include "llvm/Support/Program.h"
@@ -32,62 +32,35 @@
 using namespace lldb;
 
 class LineEntryTest : public testing::Test {
-public:
-  void SetUp() override {
-    FileSystem::Initialize();
-    HostInfo::Initialize();
-    ObjectFileMachO::Initialize();
-    SymbolFileDWARF::Initialize();
-    ClangASTContext::Initialize();
-  }
+  SubsystemRAII<FileSystem, HostInfo, ObjectFileMachO, SymbolFileDWARF,
+                ClangASTContext>
+      subsystem;
 
-  void TearDown() override {
-    ClangASTContext::Terminate();
-    SymbolFileDWARF::Terminate();
-    ObjectFileMachO::Terminate();
-    HostInfo::Terminate();
-    FileSystem::Terminate();
-  }
+public:
+  void SetUp() override;
 
 protected:
-  llvm::Expected<ModuleSP> GetModule();
   llvm::Expected<LineEntry> GetLineEntryForLine(uint32_t line);
+  llvm::Optional<TestFile> m_file;
   ModuleSP m_module_sp;
 };
 
-llvm::Expected<ModuleSP> LineEntryTest::GetModule() {
-  if (m_module_sp)
-    return m_module_sp;
-
-  llvm::SmallString<128> obj;
-  if (auto ec = llvm::sys::fs::createTemporaryFile("source-%%%%%%", "obj", obj))
-    return llvm::errorCodeToError(ec);
-  llvm::FileRemover obj_remover(obj);
-  if (auto error = ReadYAMLObjectFile("inlined-functions.yaml", obj))
-    return llvm::Error(std::move(error));
-
-  m_module_sp = std::make_shared<Module>(ModuleSpec(FileSpec(obj)));
-  // Preload because the temporary file will be gone once we exit this function.
-  m_module_sp->PreloadSymbols();
-  return m_module_sp;
+void LineEntryTest::SetUp() {
+  auto ExpectedFile = TestFile::fromYamlFile("inlined-functions.yaml");
+  ASSERT_THAT_EXPECTED(ExpectedFile, llvm::Succeeded());
+  m_file.emplace(std::move(*ExpectedFile));
+  m_module_sp = std::make_shared<Module>(ModuleSpec(FileSpec(m_file->name())));
 }
 
 llvm::Expected<LineEntry> LineEntryTest::GetLineEntryForLine(uint32_t line) {
-  auto expected_module_so = GetModule();
-
-  if (!expected_module_so)
-    return llvm::createStringError(llvm::inconvertibleErrorCode(),
-                                   "Not able to get module for test object.");
-
-  auto module = expected_module_so->get();
   bool check_inlines = true;
   bool exact = true;
   SymbolContextList sc_comp_units;
   SymbolContextList sc_line_entries;
   FileSpec file_spec("inlined-functions.cpp");
-  module->ResolveSymbolContextsForFileSpec(file_spec, line, check_inlines,
-                                           lldb::eSymbolContextCompUnit,
-                                           sc_comp_units);
+  m_module_sp->ResolveSymbolContextsForFileSpec(file_spec, line, check_inlines,
+                                                lldb::eSymbolContextCompUnit,
+                                                sc_comp_units);
   if (sc_comp_units.GetSize() == 0)
     return llvm::createStringError(llvm::inconvertibleErrorCode(),
                                    "No comp unit found on the test object.");
diff --git a/src/llvm-project/lldb/unittests/Symbol/TestType.cpp b/src/llvm-project/lldb/unittests/Symbol/TestType.cpp
index 4b9b7bf..d23d7a5 100644
--- a/src/llvm-project/lldb/unittests/Symbol/TestType.cpp
+++ b/src/llvm-project/lldb/unittests/Symbol/TestType.cpp
@@ -48,3 +48,47 @@
       "std::set<int, std::less<int>>::iterator<bool>", true,
       "std::set<int, std::less<int>>::", "iterator<bool>");
 }
+
+TEST(Type, CompilerContextPattern) {
+  std::vector<CompilerContext> mms = {
+      {CompilerContextKind::Module, ConstString("A")},
+      {CompilerContextKind::Module, ConstString("B")},
+      {CompilerContextKind::Struct, ConstString("S")}};
+  EXPECT_TRUE(contextMatches(mms, mms));
+  std::vector<CompilerContext> mmc = {
+      {CompilerContextKind::Module, ConstString("A")},
+      {CompilerContextKind::Module, ConstString("B")},
+      {CompilerContextKind::Class, ConstString("S")}};
+  EXPECT_FALSE(contextMatches(mms, mmc));
+  std::vector<CompilerContext> ms = {
+      {CompilerContextKind::Module, ConstString("A")},
+      {CompilerContextKind::Struct, ConstString("S")}};
+  std::vector<CompilerContext> mas = {
+      {CompilerContextKind::Module, ConstString("A")},
+      {CompilerContextKind::AnyModule, ConstString("*")},
+      {CompilerContextKind::Struct, ConstString("S")}};
+  EXPECT_TRUE(contextMatches(mms, mas));
+  EXPECT_TRUE(contextMatches(ms, mas));
+  EXPECT_FALSE(contextMatches(mas, ms));
+  std::vector<CompilerContext> mmms = {
+      {CompilerContextKind::Module, ConstString("A")},
+      {CompilerContextKind::Module, ConstString("B")},
+      {CompilerContextKind::Module, ConstString("C")},
+      {CompilerContextKind::Struct, ConstString("S")}};
+  EXPECT_TRUE(contextMatches(mmms, mas));
+  std::vector<CompilerContext> mme = {
+      {CompilerContextKind::Module, ConstString("A")},
+      {CompilerContextKind::Module, ConstString("B")},
+      {CompilerContextKind::Enum, ConstString("S")}};
+  std::vector<CompilerContext> mma = {
+      {CompilerContextKind::Module, ConstString("A")},
+      {CompilerContextKind::Module, ConstString("B")},
+      {CompilerContextKind::AnyType, ConstString("S")}};
+  EXPECT_TRUE(contextMatches(mme, mma));
+  EXPECT_TRUE(contextMatches(mms, mma));
+  std::vector<CompilerContext> mme2 = {
+      {CompilerContextKind::Module, ConstString("A")},
+      {CompilerContextKind::Module, ConstString("B")},
+      {CompilerContextKind::Enum, ConstString("S2")}};
+  EXPECT_FALSE(contextMatches(mme2, mma));
+}
diff --git a/src/llvm-project/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt b/src/llvm-project/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
index b2ece4e..57ee463 100644
--- a/src/llvm-project/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/SymbolFile/DWARF/CMakeLists.txt
@@ -1,4 +1,5 @@
 add_lldb_unittest(SymbolFileDWARFTests
+  DWARFASTParserClangTests.cpp
   SymbolFileDWARFTests.cpp
 
   LINK_LIBS
diff --git a/src/llvm-project/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp b/src/llvm-project/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
new file mode 100644
index 0000000..8f0368d
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
@@ -0,0 +1,60 @@
+//===-- DWARFASTParserClangTests.cpp ----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Plugins/SymbolFile/DWARF/DWARFASTParserClang.h"
+#include "Plugins/SymbolFile/DWARF/DWARFDIE.h"
+#include "TestingSupport/SubsystemRAII.h"
+#include "lldb/Host/HostInfo.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+
+using namespace lldb;
+using namespace lldb_private;
+
+class DWARFASTParserClangTests : public testing::Test {
+  SubsystemRAII<FileSystem, HostInfo, ClangASTContext> subsystems;
+};
+
+namespace {
+class DWARFASTParserClangStub : public DWARFASTParserClang {
+public:
+  using DWARFASTParserClang::DWARFASTParserClang;
+  using DWARFASTParserClang::LinkDeclContextToDIE;
+
+  std::vector<const clang::DeclContext *> GetDeclContextToDIEMapKeys() {
+    std::vector<const clang::DeclContext *> keys;
+    for (const auto &it : m_decl_ctx_to_die)
+      keys.push_back(it.first);
+    return keys;
+  }
+};
+} // namespace
+
+// If your implementation needs to dereference the dummy pointers we are
+// defining here, causing this test to fail, feel free to delete it.
+TEST_F(DWARFASTParserClangTests,
+       EnsureAllDIEsInDeclContextHaveBeenParsedParsesOnlyMatchingEntries) {
+  ClangASTContext ast_ctx(HostInfoBase::GetTargetTriple());
+  DWARFASTParserClangStub ast_parser(ast_ctx);
+
+  DWARFUnit *unit = nullptr;
+  std::vector<DWARFDIE> dies = {DWARFDIE(unit, (DWARFDebugInfoEntry *)1LL),
+                                DWARFDIE(unit, (DWARFDebugInfoEntry *)2LL),
+                                DWARFDIE(unit, (DWARFDebugInfoEntry *)3LL),
+                                DWARFDIE(unit, (DWARFDebugInfoEntry *)4LL)};
+  std::vector<clang::DeclContext *> decl_ctxs = {
+      (clang::DeclContext *)1LL, (clang::DeclContext *)2LL,
+      (clang::DeclContext *)2LL, (clang::DeclContext *)3LL};
+  for (int i = 0; i < 4; ++i)
+    ast_parser.LinkDeclContextToDIE(decl_ctxs[i], dies[i]);
+  ast_parser.EnsureAllDIEsInDeclContextHaveBeenParsed(
+      CompilerDeclContext(nullptr, decl_ctxs[1]));
+
+  EXPECT_THAT(ast_parser.GetDeclContextToDIEMapKeys(),
+              testing::UnorderedElementsAre(decl_ctxs[0], decl_ctxs[3]));
+}
diff --git a/src/llvm-project/lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp b/src/llvm-project/lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp
index a1a0005..e971439 100644
--- a/src/llvm-project/lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp
+++ b/src/llvm-project/lldb/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp
@@ -20,6 +20,7 @@
 #include "Plugins/SymbolFile/DWARF/DWARFDebugAbbrev.h"
 #include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
 #include "Plugins/SymbolFile/PDB/SymbolFilePDB.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 #include "lldb/Core/Address.h"
 #include "lldb/Core/Module.h"
@@ -29,7 +30,6 @@
 #include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/LineTable.h"
-#include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataEncoder.h"
 #include "lldb/Utility/FileSpec.h"
@@ -41,28 +41,13 @@
 using namespace lldb_private;
 
 class SymbolFileDWARFTests : public testing::Test {
+  SubsystemRAII<FileSystem, HostInfo, ObjectFilePECOFF, SymbolFileDWARF,
+                ClangASTContext, SymbolFilePDB>
+      subsystems;
+
 public:
   void SetUp() override {
-// Initialize and TearDown the plugin every time, so we get a brand new
-// AST every time so that modifications to the AST from each test don't
-// leak into the next test.
-FileSystem::Initialize();
-HostInfo::Initialize();
-ObjectFilePECOFF::Initialize();
-SymbolFileDWARF::Initialize();
-ClangASTContext::Initialize();
-SymbolFilePDB::Initialize();
-
-m_dwarf_test_exe = GetInputFilePath("test-dwarf.exe");
-  }
-
-  void TearDown() override {
-    SymbolFilePDB::Terminate();
-    ClangASTContext::Initialize();
-    SymbolFileDWARF::Terminate();
-    ObjectFilePECOFF::Terminate();
-    HostInfo::Terminate();
-    FileSystem::Terminate();
+    m_dwarf_test_exe = GetInputFilePath("test-dwarf.exe");
   }
 
 protected:
@@ -75,10 +60,8 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
-  EXPECT_NE(nullptr, plugin);
-  SymbolFile *symfile = plugin->GetSymbolFile();
-  EXPECT_NE(nullptr, symfile);
+  SymbolFile *symfile = module->GetSymbolFile();
+  ASSERT_NE(nullptr, symfile);
   EXPECT_EQ(symfile->GetPluginName(), SymbolFileDWARF::GetPluginNameStatic());
 
   uint32_t expected_abilities = SymbolFile::kAllAbilities;
diff --git a/src/llvm-project/lldb/unittests/SymbolFile/PDB/CMakeLists.txt b/src/llvm-project/lldb/unittests/SymbolFile/PDB/CMakeLists.txt
index dd7e224..75e4b50 100644
--- a/src/llvm-project/lldb/unittests/SymbolFile/PDB/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/SymbolFile/PDB/CMakeLists.txt
@@ -9,6 +9,7 @@
     lldbPluginSymbolFileDWARF
     lldbPluginSymbolFilePDB
     lldbUtilityHelpers
+    LLVMTestingSupport
   LINK_COMPONENTS
     Support
     DebugInfoPDB
diff --git a/src/llvm-project/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp b/src/llvm-project/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
index ecb25c9..c0163f6 100644
--- a/src/llvm-project/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
+++ b/src/llvm-project/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
@@ -13,6 +13,7 @@
 #include "llvm/DebugInfo/PDB/PDBSymbolExe.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
+#include "llvm/Testing/Support/Error.h"
 
 #include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
 #include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
@@ -26,11 +27,11 @@
 #include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/LineTable.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/TypeMap.h"
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 
-#if defined(_MSC_VER)
+#if defined(_WIN32)
 #include "lldb/Host/windows/windows.h"
 #include <objbase.h>
 #endif
@@ -45,7 +46,7 @@
 // Initialize and TearDown the plugin every time, so we get a brand new
 // AST every time so that modifications to the AST from each test don't
 // leak into the next test.
-#if defined(_MSC_VER)
+#if defined(_WIN32)
     ::CoInitializeEx(nullptr, COINIT_MULTITHREADED);
 #endif
 
@@ -68,7 +69,7 @@
     HostInfo::Terminate();
     FileSystem::Terminate();
 
-#if defined(_MSC_VER)
+#if defined(_WIN32)
     ::CoUninitialize();
 #endif
   }
@@ -108,7 +109,7 @@
                            const FileSpec &spec) const {
     for (size_t i = 0; i < sc_list.GetSize(); ++i) {
       const SymbolContext &sc = sc_list[i];
-      if (FileSpecMatchesAsBaseOrFull(*sc.comp_unit, spec))
+      if (FileSpecMatchesAsBaseOrFull(sc.comp_unit->GetPrimaryFile(), spec))
         return true;
     }
     return false;
@@ -150,9 +151,7 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
-  EXPECT_NE(nullptr, plugin);
-  SymbolFile *symfile = plugin->GetSymbolFile();
+  SymbolFile *symfile = module->GetSymbolFile();
   EXPECT_NE(nullptr, symfile);
   EXPECT_EQ(symfile->GetPluginName(), SymbolFilePDB::GetPluginNameStatic());
 
@@ -168,9 +167,7 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
-  EXPECT_NE(nullptr, plugin);
-  SymbolFile *symfile = plugin->GetSymbolFile();
+  SymbolFile *symfile = module->GetSymbolFile();
 
   FileSpec header_spec("test-pdb.cpp");
   SymbolContextList sc_list;
@@ -188,9 +185,7 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
-  EXPECT_NE(nullptr, plugin);
-  SymbolFile *symfile = plugin->GetSymbolFile();
+  SymbolFile *symfile = module->GetSymbolFile();
 
   FileSpec header_spec(
       R"spec(D:\src\llvm\tools\lldb\unittests\SymbolFile\PDB\Inputs\test-pdb.cpp)spec");
@@ -211,9 +206,7 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
-  EXPECT_NE(nullptr, plugin);
-  SymbolFile *symfile = plugin->GetSymbolFile();
+  SymbolFile *symfile = module->GetSymbolFile();
 
   FileSpec header_specs[] = {FileSpec("test-pdb.h"),
                              FileSpec("test-pdb-nested.h")};
@@ -239,9 +232,7 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
-  EXPECT_NE(nullptr, plugin);
-  SymbolFile *symfile = plugin->GetSymbolFile();
+  SymbolFile *symfile = module->GetSymbolFile();
 
   FileSpec header_specs[] = {FileSpec("test-pdb.h"),
                              FileSpec("test-pdb-nested.h")};
@@ -261,8 +252,7 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
-  SymbolFile *symfile = plugin->GetSymbolFile();
+  SymbolFile *symfile = module->GetSymbolFile();
 
   FileSpec source_file("test-pdb.cpp");
   FileSpec header1("test-pdb.h");
@@ -311,8 +301,7 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
-  SymbolFile *symfile = plugin->GetSymbolFile();
+  SymbolFile *symfile = module->GetSymbolFile();
 
   FileSpec source_file("test-pdb.cpp");
   FileSpec header1("test-pdb.h");
@@ -361,14 +350,12 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
   SymbolFilePDB *symfile =
-      static_cast<SymbolFilePDB *>(plugin->GetSymbolFile());
+      static_cast<SymbolFilePDB *>(module->GetSymbolFile());
   llvm::pdb::IPDBSession &session = symfile->GetPDBSession();
   llvm::DenseSet<SymbolFile *> searched_files;
   TypeMap results;
-  EXPECT_EQ(1u, symfile->FindTypes(ConstString("Class"), nullptr, false, 0,
-                                   searched_files, results));
+  symfile->FindTypes(ConstString("Class"), nullptr, 0, searched_files, results);
   EXPECT_EQ(1u, results.GetSize());
   lldb::TypeSP udt_type = results.GetTypeAtIndex(0);
   EXPECT_EQ(ConstString("Class"), udt_type->GetName());
@@ -383,19 +370,21 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
   SymbolFilePDB *symfile =
-      static_cast<SymbolFilePDB *>(plugin->GetSymbolFile());
+      static_cast<SymbolFilePDB *>(module->GetSymbolFile());
   llvm::pdb::IPDBSession &session = symfile->GetPDBSession();
   llvm::DenseSet<SymbolFile *> searched_files;
   TypeMap results;
 
-  auto clang_ast_ctx = llvm::dyn_cast_or_null<ClangASTContext>(
-      symfile->GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus));
+  auto clang_ast_ctx_or_err =
+      symfile->GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  ASSERT_THAT_EXPECTED(clang_ast_ctx_or_err, llvm::Succeeded());
+
+  auto clang_ast_ctx =
+      llvm::dyn_cast_or_null<ClangASTContext>(&clang_ast_ctx_or_err.get());
   EXPECT_NE(nullptr, clang_ast_ctx);
 
-  EXPECT_EQ(1u, symfile->FindTypes(ConstString("Class"), nullptr, false, 0,
-                                   searched_files, results));
+  symfile->FindTypes(ConstString("Class"), nullptr, 0, searched_files, results);
   EXPECT_EQ(1u, results.GetSize());
 
   auto Class = results.GetTypeAtIndex(0);
@@ -412,13 +401,14 @@
   // and one is global. We process correctly this case and create the same
   // compiler type for both, but `FindTypes` may return more than one type
   // (with the same compiler type) because the symbols have different IDs.
-  auto ClassCompilerDeclCtx = CompilerDeclContext(clang_ast_ctx, ClassDeclCtx);
-  EXPECT_LE(1u, symfile->FindTypes(ConstString("NestedClass"),
-                                   &ClassCompilerDeclCtx, false, 0,
-                                   searched_files, results));
-  EXPECT_LE(1u, results.GetSize());
 
-  lldb::TypeSP udt_type = results.GetTypeAtIndex(0);
+  TypeMap more_results;
+  auto ClassCompilerDeclCtx = CompilerDeclContext(clang_ast_ctx, ClassDeclCtx);
+  symfile->FindTypes(ConstString("NestedClass"), &ClassCompilerDeclCtx, 0,
+                     searched_files, more_results);
+  EXPECT_LE(1u, more_results.GetSize());
+
+  lldb::TypeSP udt_type = more_results.GetTypeAtIndex(0);
   EXPECT_EQ(ConstString("NestedClass"), udt_type->GetName());
 
   CompilerType compiler_type = udt_type->GetForwardCompilerType();
@@ -433,21 +423,23 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
   SymbolFilePDB *symfile =
-      static_cast<SymbolFilePDB *>(plugin->GetSymbolFile());
+      static_cast<SymbolFilePDB *>(module->GetSymbolFile());
   llvm::pdb::IPDBSession &session = symfile->GetPDBSession();
   llvm::DenseSet<SymbolFile *> searched_files;
   TypeMap results;
 
-  auto clang_ast_ctx = llvm::dyn_cast_or_null<ClangASTContext>(
-      symfile->GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus));
+  auto clang_ast_ctx_or_err =
+      symfile->GetTypeSystemForLanguage(lldb::eLanguageTypeC_plus_plus);
+  ASSERT_THAT_EXPECTED(clang_ast_ctx_or_err, llvm::Succeeded());
+
+  auto clang_ast_ctx =
+      llvm::dyn_cast_or_null<ClangASTContext>(&clang_ast_ctx_or_err.get());
   EXPECT_NE(nullptr, clang_ast_ctx);
 
-  auto ast_ctx = clang_ast_ctx->getASTContext();
-  EXPECT_NE(nullptr, ast_ctx);
+  clang::ASTContext &ast_ctx = clang_ast_ctx->getASTContext();
 
-  auto tu = ast_ctx->getTranslationUnitDecl();
+  auto tu = ast_ctx.getTranslationUnitDecl();
   EXPECT_NE(nullptr, tu);
 
   symfile->ParseDeclsForContext(CompilerDeclContext(
@@ -456,8 +448,8 @@
   auto ns_namespace = symfile->FindNamespace(ConstString("NS"), nullptr);
   EXPECT_TRUE(ns_namespace.IsValid());
 
-  EXPECT_EQ(1u, symfile->FindTypes(ConstString("NSClass"), &ns_namespace, false,
-                                   0, searched_files, results));
+  symfile->FindTypes(ConstString("NSClass"), &ns_namespace, 0, searched_files,
+                     results);
   EXPECT_EQ(1u, results.GetSize());
 
   lldb::TypeSP udt_type = results.GetTypeAtIndex(0);
@@ -475,16 +467,14 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
   SymbolFilePDB *symfile =
-      static_cast<SymbolFilePDB *>(plugin->GetSymbolFile());
+      static_cast<SymbolFilePDB *>(module->GetSymbolFile());
   llvm::pdb::IPDBSession &session = symfile->GetPDBSession();
   llvm::DenseSet<SymbolFile *> searched_files;
   const char *EnumsToCheck[] = {"Enum", "ShortEnum"};
   for (auto Enum : EnumsToCheck) {
     TypeMap results;
-    EXPECT_EQ(1u, symfile->FindTypes(ConstString(Enum), nullptr, false, 0,
-                                     searched_files, results));
+    symfile->FindTypes(ConstString(Enum), nullptr, 0, searched_files, results);
     EXPECT_EQ(1u, results.GetSize());
     lldb::TypeSP enum_type = results.GetTypeAtIndex(0);
     EXPECT_EQ(ConstString(Enum), enum_type->GetName());
@@ -521,9 +511,8 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
   SymbolFilePDB *symfile =
-      static_cast<SymbolFilePDB *>(plugin->GetSymbolFile());
+      static_cast<SymbolFilePDB *>(module->GetSymbolFile());
   llvm::pdb::IPDBSession &session = symfile->GetPDBSession();
   llvm::DenseSet<SymbolFile *> searched_files;
   TypeMap results;
@@ -533,8 +522,8 @@
                                    "VariadicFuncPointerTypedef"};
   for (auto Typedef : TypedefsToCheck) {
     TypeMap results;
-    EXPECT_EQ(1u, symfile->FindTypes(ConstString(Typedef), nullptr, false, 0,
-                                     searched_files, results));
+    symfile->FindTypes(ConstString(Typedef), nullptr, 0, searched_files,
+                       results);
     EXPECT_EQ(1u, results.GetSize());
     lldb::TypeSP typedef_type = results.GetTypeAtIndex(0);
     EXPECT_EQ(ConstString(Typedef), typedef_type->GetName());
@@ -556,9 +545,8 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
   SymbolFilePDB *symfile =
-      static_cast<SymbolFilePDB *>(plugin->GetSymbolFile());
+      static_cast<SymbolFilePDB *>(module->GetSymbolFile());
   TypeMap results;
 
   symfile->FindTypesByRegex(RegularExpression(".*"), 0, results);
@@ -575,25 +563,23 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
   SymbolFilePDB *symfile =
-      static_cast<SymbolFilePDB *>(plugin->GetSymbolFile());
+      static_cast<SymbolFilePDB *>(module->GetSymbolFile());
   llvm::DenseSet<SymbolFile *> searched_files;
   TypeMap results;
   const ConstString name("ClassTypedef");
-  uint32_t num_results =
-      symfile->FindTypes(name, nullptr, false, 0, searched_files, results);
-  // Try to limit ourselves from 1 to 10 results, otherwise we could be doing
-  // this thousands of times.
-  // The idea is just to make sure that for a variety of values, the number of
-  // limited results always
-  // comes out to the number we are expecting.
+  symfile->FindTypes(name, nullptr, 0, searched_files, results);
+  // Try to limit ourselves from 1 to 10 results, otherwise we could
+  // be doing this thousands of times.  The idea is just to make sure
+  // that for a variety of values, the number of limited results
+  // always comes out to the number we are expecting.
+  uint32_t num_results = results.GetSize();
   uint32_t iterations = std::min(num_results, 10u);
   for (uint32_t i = 1; i <= iterations; ++i) {
-    uint32_t num_limited_results =
-        symfile->FindTypes(name, nullptr, false, i, searched_files, results);
+    TypeMap more_results;
+    symfile->FindTypes(name, nullptr, i, searched_files, more_results);
+    uint32_t num_limited_results = more_results.GetSize();
     EXPECT_EQ(i, num_limited_results);
-    EXPECT_EQ(num_limited_results, results.GetSize());
   }
 }
 
@@ -602,14 +588,11 @@
   ArchSpec aspec("i686-pc-windows");
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
-  SymbolVendor *plugin = module->GetSymbolVendor();
   SymbolFilePDB *symfile =
-      static_cast<SymbolFilePDB *>(plugin->GetSymbolFile());
+      static_cast<SymbolFilePDB *>(module->GetSymbolFile());
   llvm::DenseSet<SymbolFile *> searched_files;
   TypeMap results;
-  uint32_t num_results = symfile->FindTypes(ConstString(), nullptr, false, 0,
-                                            searched_files, results);
-  EXPECT_EQ(0u, num_results);
+  symfile->FindTypes(ConstString(), nullptr, 0, searched_files, results);
   EXPECT_EQ(0u, results.GetSize());
 }
 
@@ -619,9 +602,8 @@
   lldb::ModuleSP module = std::make_shared<Module>(fspec, aspec);
 
   SymbolContextList sc_list;
-  EXPECT_EQ(1u,
-            module->FindSymbolsWithNameAndType(ConstString("?foo@@YAHH@Z"),
-                                               lldb::eSymbolTypeAny, sc_list));
+  module->FindSymbolsWithNameAndType(ConstString("?foo@@YAHH@Z"),
+                                     lldb::eSymbolTypeAny, sc_list);
   EXPECT_EQ(1u, sc_list.GetSize());
 
   SymbolContext sc;
diff --git a/src/llvm-project/lldb/unittests/Target/CMakeLists.txt b/src/llvm-project/lldb/unittests/Target/CMakeLists.txt
index ba3039e..e63b1d07 100644
--- a/src/llvm-project/lldb/unittests/Target/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/Target/CMakeLists.txt
@@ -1,15 +1,17 @@
 add_lldb_unittest(TargetTests
+  ExecutionContextTest.cpp
   MemoryRegionInfoTest.cpp
   ModuleCacheTest.cpp
   PathMappingListTest.cpp
-  ProcessInstanceInfoTest.cpp
 
   LINK_LIBS
       lldbCore
       lldbHost
+      lldbPluginObjectFileELF
+      lldbPluginPlatformLinux
+      lldbPluginSymbolFileSymtab
       lldbSymbol
       lldbUtility
-      lldbPluginObjectFileELF
       lldbUtilityHelpers
     LINK_COMPONENTS
       Support
diff --git a/src/llvm-project/lldb/unittests/Target/ExecutionContextTest.cpp b/src/llvm-project/lldb/unittests/Target/ExecutionContextTest.cpp
new file mode 100644
index 0000000..587ce2e
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/Target/ExecutionContextTest.cpp
@@ -0,0 +1,120 @@
+//===-- ExecutionContextTest.cpp --------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Target/ExecutionContext.h"
+#include "Plugins/Platform/Linux/PlatformLinux.h"
+#include "lldb/Core/Debugger.h"
+#include "lldb/Host/FileSystem.h"
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Target/Platform.h"
+#include "lldb/Target/Process.h"
+#include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
+#include "lldb/Utility/Endian.h"
+#include "lldb/Utility/Reproducer.h"
+#include "lldb/lldb-enumerations.h"
+#include "lldb/lldb-forward.h"
+#include "lldb/lldb-private-enumerations.h"
+#include "lldb/lldb-private.h"
+#include "llvm/Support/FormatVariadic.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+using namespace lldb_private::repro;
+using namespace lldb;
+
+namespace {
+class ExecutionContextTest : public ::testing::Test {
+public:
+  void SetUp() override {
+    llvm::cantFail(Reproducer::Initialize(ReproducerMode::Off, llvm::None));
+    FileSystem::Initialize();
+    HostInfo::Initialize();
+    platform_linux::PlatformLinux::Initialize();
+  }
+  void TearDown() override {
+    platform_linux::PlatformLinux::Terminate();
+    HostInfo::Terminate();
+    FileSystem::Terminate();
+    Reproducer::Terminate();
+  }
+};
+
+class DummyProcess : public Process {
+public:
+  using Process::Process;
+
+  virtual bool CanDebug(lldb::TargetSP target, bool plugin_specified_by_name) {
+    return true;
+  }
+  virtual Status DoDestroy() { return {}; }
+  virtual void RefreshStateAfterStop() {}
+  virtual size_t DoReadMemory(lldb::addr_t vm_addr, void *buf, size_t size,
+                              Status &error) {
+    return 0;
+  }
+  virtual bool UpdateThreadList(ThreadList &old_thread_list,
+                                ThreadList &new_thread_list) {
+    return false;
+  }
+  virtual ConstString GetPluginName() { return ConstString("Dummy"); }
+  virtual uint32_t GetPluginVersion() { return 0; }
+};
+} // namespace
+
+TEST_F(ExecutionContextTest, GetByteOrder) {
+  ExecutionContext exe_ctx(nullptr, nullptr, nullptr);
+  EXPECT_EQ(endian::InlHostByteOrder(), exe_ctx.GetByteOrder());
+}
+
+TEST_F(ExecutionContextTest, GetByteOrderTarget) {
+  ArchSpec arch("powerpc64-pc-linux");
+
+  Platform::SetHostPlatform(
+      platform_linux::PlatformLinux::CreateInstance(true, &arch));
+
+  DebuggerSP debugger_sp = Debugger::CreateInstance();
+  ASSERT_TRUE(debugger_sp);
+
+  TargetSP target_sp;
+  PlatformSP platform_sp;
+  Status error = debugger_sp->GetTargetList().CreateTarget(
+      *debugger_sp, "", arch, eLoadDependentsNo, platform_sp, target_sp);
+  ASSERT_TRUE(target_sp);
+  ASSERT_TRUE(target_sp->GetArchitecture().IsValid());
+  ASSERT_TRUE(platform_sp);
+
+  ExecutionContext target_ctx(target_sp, false);
+  EXPECT_EQ(target_sp->GetArchitecture().GetByteOrder(),
+            target_ctx.GetByteOrder());
+}
+
+TEST_F(ExecutionContextTest, GetByteOrderProcess) {
+  ArchSpec arch("powerpc64-pc-linux");
+
+  Platform::SetHostPlatform(
+      platform_linux::PlatformLinux::CreateInstance(true, &arch));
+
+  DebuggerSP debugger_sp = Debugger::CreateInstance();
+  ASSERT_TRUE(debugger_sp);
+
+  TargetSP target_sp;
+  PlatformSP platform_sp;
+  Status error = debugger_sp->GetTargetList().CreateTarget(
+      *debugger_sp, "", arch, eLoadDependentsNo, platform_sp, target_sp);
+  ASSERT_TRUE(target_sp);
+  ASSERT_TRUE(target_sp->GetArchitecture().IsValid());
+  ASSERT_TRUE(platform_sp);
+
+  ListenerSP listener_sp(Listener::MakeListener("dummy"));
+  ProcessSP process_sp = std::make_shared<DummyProcess>(target_sp, listener_sp);
+  ASSERT_TRUE(process_sp);
+
+  ExecutionContext process_ctx(process_sp);
+  EXPECT_EQ(process_sp->GetByteOrder(), process_ctx.GetByteOrder());
+}
diff --git a/src/llvm-project/lldb/unittests/Target/ModuleCacheTest.cpp b/src/llvm-project/lldb/unittests/Target/ModuleCacheTest.cpp
index 9678bb0..60e0537 100644
--- a/src/llvm-project/lldb/unittests/Target/ModuleCacheTest.cpp
+++ b/src/llvm-project/lldb/unittests/Target/ModuleCacheTest.cpp
@@ -5,6 +5,8 @@
 #include "llvm/Support/Path.h"
 
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
+#include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
+#include "TestingSupport/SubsystemRAII.h"
 #include "TestingSupport/TestUtilities.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -19,23 +21,21 @@
 namespace {
 
 class ModuleCacheTest : public testing::Test {
-public:
-  static void SetUpTestCase();
+  SubsystemRAII<FileSystem, HostInfo, ObjectFileELF, SymbolFileSymtab>
+      subsystems;
 
-  static void TearDownTestCase();
+public:
+  void SetUp() override;
 
 protected:
-  static FileSpec s_cache_dir;
-  static std::string s_test_executable;
+  FileSpec s_cache_dir;
+  std::string s_test_executable;
 
   void TryGetAndPut(const FileSpec &cache_dir, const char *hostname,
                     bool expect_download);
 };
 }
 
-FileSpec ModuleCacheTest::s_cache_dir;
-std::string ModuleCacheTest::s_test_executable;
-
 static const char dummy_hostname[] = "dummy_hostname";
 static const char dummy_remote_dir[] = "bin";
 static const char module_name[] = "TestModule.so";
@@ -65,21 +65,11 @@
   return spec;
 }
 
-void ModuleCacheTest::SetUpTestCase() {
-  FileSystem::Initialize();
-  HostInfo::Initialize();
-  ObjectFileELF::Initialize();
-
+void ModuleCacheTest::SetUp() {
   s_cache_dir = HostInfo::GetProcessTempDir();
   s_test_executable = GetInputFilePath(module_name);
 }
 
-void ModuleCacheTest::TearDownTestCase() {
-  ObjectFileELF::Terminate();
-  HostInfo::Terminate();
-  FileSystem::Terminate();
-}
-
 static void VerifyDiskState(const FileSpec &cache_dir, const char *hostname) {
   FileSpec uuid_view = GetUuidView(cache_dir);
   EXPECT_TRUE(FileSystem::Instance().Exists(uuid_view))
@@ -105,8 +95,8 @@
 
   Status error = mc.GetAndPut(
       cache_dir, hostname, module_spec,
-      [&download_called](const ModuleSpec &module_spec,
-                         const FileSpec &tmp_download_file_spec) {
+      [&download_called, this](const ModuleSpec &module_spec,
+                               const FileSpec &tmp_download_file_spec) {
         download_called = true;
         EXPECT_STREQ(GetDummyRemotePath().GetCString(),
                      module_spec.GetFileSpec().GetCString());
@@ -126,8 +116,9 @@
   ASSERT_TRUE(bool(module_sp));
 
   SymbolContextList sc_list;
-  EXPECT_EQ(1u, module_sp->FindFunctionSymbols(ConstString("boom"),
-                                               eFunctionNameTypeFull, sc_list));
+  module_sp->FindFunctionSymbols(ConstString("boom"), eFunctionNameTypeFull,
+                                 sc_list);
+  EXPECT_EQ(1u, sc_list.GetSize());
   EXPECT_STREQ(GetDummyRemotePath().GetCString(),
                module_sp->GetPlatformFileSpec().GetCString());
   EXPECT_STREQ(module_uuid, module_sp->GetUUID().GetAsString().c_str());
diff --git a/src/llvm-project/lldb/unittests/Target/ProcessInstanceInfoTest.cpp b/src/llvm-project/lldb/unittests/Target/ProcessInstanceInfoTest.cpp
deleted file mode 100644
index 80be01d..0000000
--- a/src/llvm-project/lldb/unittests/Target/ProcessInstanceInfoTest.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//===-- ProcessInstanceInfoTest.cpp -----------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Target/Process.h"
-#include "gtest/gtest.h"
-
-using namespace lldb_private;
-
-namespace {
-/// A very simple resolver which fails for even ids and returns a simple string
-/// for odd ones.
-class DummyUserIDResolver : public UserIDResolver {
-protected:
-  llvm::Optional<std::string> DoGetUserName(id_t uid) override {
-    if (uid % 2)
-      return ("user" + llvm::Twine(uid)).str();
-    return llvm::None;
-  }
-
-  llvm::Optional<std::string> DoGetGroupName(id_t gid) override {
-    if (gid % 2)
-      return ("group" + llvm::Twine(gid)).str();
-    return llvm::None;
-  }
-};
-} // namespace
-
-TEST(ProcessInstanceInfo, Dump) {
-  ProcessInstanceInfo info("a.out", ArchSpec("x86_64-pc-linux"), 47);
-  info.SetUserID(1);
-  info.SetEffectiveUserID(2);
-  info.SetGroupID(3);
-  info.SetEffectiveGroupID(4);
-
-  DummyUserIDResolver resolver;
-  StreamString s;
-  info.Dump(s, resolver);
-  EXPECT_STREQ(R"(    pid = 47
-   name = a.out
-   file = a.out
-   arch = x86_64-pc-linux
-    uid = 1     (user1)
-    gid = 3     (group3)
-   euid = 2     ()
-   egid = 4     ()
-)",
-               s.GetData());
-}
-
-TEST(ProcessInstanceInfo, DumpTable) {
-  ProcessInstanceInfo info("a.out", ArchSpec("x86_64-pc-linux"), 47);
-  info.SetUserID(1);
-  info.SetEffectiveUserID(2);
-  info.SetGroupID(3);
-  info.SetEffectiveGroupID(4);
-
-  DummyUserIDResolver resolver;
-  StreamString s;
-
-  const bool show_args = false;
-  const bool verbose = true;
-  ProcessInstanceInfo::DumpTableHeader(s, show_args, verbose);
-  info.DumpAsTableRow(s, resolver, show_args, verbose);
-  EXPECT_STREQ(
-      R"(PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                   ARGUMENTS
-====== ====== ========== ========== ========== ========== ======================== ============================
-47     0      user1      group3     2          4          x86_64-pc-linux          
-)",
-      s.GetData());
-}
diff --git a/src/llvm-project/lldb/unittests/TestingSupport/CMakeLists.txt b/src/llvm-project/lldb/unittests/TestingSupport/CMakeLists.txt
index f59c0c8..7efe6f5 100644
--- a/src/llvm-project/lldb/unittests/TestingSupport/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/TestingSupport/CMakeLists.txt
@@ -1,4 +1,4 @@
-set(EXCLUDE_FROM_ALL ON)
+set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL ON)
 add_lldb_library(lldbUtilityHelpers
   MockTildeExpressionResolver.cpp
   TestUtilities.cpp
@@ -8,7 +8,6 @@
 
   LINK_COMPONENTS
     Support
+    ObjectYAML
   )
-
-add_dependencies(lldbUtilityHelpers yaml2obj)
-add_definitions(-DYAML2OBJ="$<TARGET_FILE:yaml2obj>")
\ No newline at end of file
+include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
diff --git a/src/llvm-project/lldb/unittests/TestingSupport/SubsystemRAII.h b/src/llvm-project/lldb/unittests/TestingSupport/SubsystemRAII.h
new file mode 100644
index 0000000..3df104b
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/TestingSupport/SubsystemRAII.h
@@ -0,0 +1,90 @@
+//===- SubsystemRAII.h ------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_UNITTESTS_TESTINGSUPPORT_SUBSYSTEMRAII_H
+#define LLDB_UNITTESTS_TESTINGSUPPORT_SUBSYSTEMRAII_H
+
+#include "llvm/Support/Error.h"
+#include "llvm/Testing/Support/Error.h"
+#include "gtest/gtest.h"
+#include <type_traits>
+
+namespace lldb_private {
+
+namespace detail {
+/// Initializes and deinitializes a single subsystem.
+/// @see SubsystemRAII
+template <typename T> struct SubsystemRAIICase {
+
+  /// Calls ::Initialize if it has a void return type.
+  template <typename U = T>
+  typename std::enable_if<
+      std::is_same<decltype(U::Initialize()), void>::value>::type
+  CallInitialize() {
+    T::Initialize();
+  }
+
+  /// Calls ::Initialize if it has a llvm::Error return type and checks
+  /// the Error instance for success.
+  template <typename U = T>
+  typename std::enable_if<
+      std::is_same<decltype(U::Initialize()), llvm::Error>::value>::type
+  CallInitialize() {
+    ASSERT_THAT_ERROR(T::Initialize(), llvm::Succeeded());
+  }
+
+  SubsystemRAIICase() { CallInitialize(); }
+  ~SubsystemRAIICase() { T::Terminate(); }
+};
+} // namespace detail
+
+template <typename... T> class SubsystemRAII {};
+
+/// RAII for initializing and deinitializing LLDB subsystems.
+///
+/// This RAII takes care of calling the Initialize and Terminate functions for
+/// the subsystems specified by its template arguments. The ::Initialize
+/// functions are called on construction for each subsystem template parameter
+/// in the order in which they are passed as template parameters.
+/// The ::Terminate functions are called in the reverse order at destruction
+/// time.
+///
+/// If the ::Initialize function returns an llvm::Error this function handles
+/// the Error instance (by checking that there is no error).
+///
+/// Constructing this RAII in a scope like this:
+///
+///   @code{.cpp}
+///   {
+///     SubsystemRAII<FileSystem, HostInfo, Socket> Subsystems;
+///     DoingTestWork();
+///   }
+///   @endcode
+///
+/// is equivalent to the following code:
+///
+///   @code{.cpp}
+///   {
+///     FileSystem::Initialize();
+///     HostInfo::Initialize();
+///     ASSERT_THAT_ERROR(Socket::Initialize(), llvm::Succeeded());
+///
+///     DoingTestWork();
+///
+///     Socket::Terminate();
+///     FileSystem::Terminate();
+///     HostInfo::Terminate();
+///   }
+///   @endcode
+template <typename T, typename... Ts> class SubsystemRAII<T, Ts...> {
+  detail::SubsystemRAIICase<T> CurrentSubsystem;
+  SubsystemRAII<Ts...> RemainingSubsystems;
+};
+} // namespace lldb_private
+
+#endif // LLDB_UNITTESTS_TESTINGSUPPORT_SUBSYSTEMRAII_H
diff --git a/src/llvm-project/lldb/unittests/TestingSupport/Symbol/ClangTestUtils.h b/src/llvm-project/lldb/unittests/TestingSupport/Symbol/ClangTestUtils.h
new file mode 100644
index 0000000..2c94aa5
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/TestingSupport/Symbol/ClangTestUtils.h
@@ -0,0 +1,73 @@
+//===- ClangTestUtils.h -----------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLDB_UNITTESTS_TESTINGSUPPORT_SYMBOL_CLANGTESTUTILS_H
+#define LLDB_UNITTESTS_TESTINGSUPPORT_SYMBOL_CLANGTESTUTILS_H
+
+#include "lldb/Host/HostInfo.h"
+#include "lldb/Symbol/ClangASTContext.h"
+#include "lldb/Symbol/ClangUtil.h"
+
+namespace lldb_private {
+namespace clang_utils {
+inline clang::DeclarationName getDeclarationName(ClangASTContext &ast,
+                                                 llvm::StringRef name) {
+  clang::IdentifierInfo &II = ast.getASTContext().Idents.get(name);
+  return ast.getASTContext().DeclarationNames.getIdentifier(&II);
+}
+
+inline std::unique_ptr<ClangASTContext> createAST() {
+  return std::make_unique<ClangASTContext>(HostInfo::GetTargetTriple());
+}
+
+inline CompilerType createRecord(ClangASTContext &ast, llvm::StringRef name) {
+  return ast.CreateRecordType(ast.getASTContext().getTranslationUnitDecl(),
+                              lldb::AccessType::eAccessPublic, name, 0,
+                              lldb::LanguageType::eLanguageTypeC);
+}
+
+/// Create a record with the given name and a field with the given type
+/// and name.
+inline CompilerType createRecordWithField(ClangASTContext &ast,
+                                          llvm::StringRef record_name,
+                                          CompilerType field_type,
+                                          llvm::StringRef field_name) {
+  CompilerType t = createRecord(ast, record_name);
+
+  ClangASTContext::StartTagDeclarationDefinition(t);
+  ast.AddFieldToRecordType(t, field_name, field_type,
+                           lldb::AccessType::eAccessPublic, 7);
+  ClangASTContext::CompleteTagDeclarationDefinition(t);
+
+  return t;
+}
+
+/// Constructs a ClangASTContext that contains a single RecordDecl that contains
+/// a single FieldDecl. Utility class as this setup is a common starting point
+/// for unit test that exercise the ASTImporter.
+struct SourceASTWithRecord {
+  std::unique_ptr<ClangASTContext> ast;
+  CompilerType record_type;
+  clang::RecordDecl *record_decl = nullptr;
+  clang::FieldDecl *field_decl = nullptr;
+  SourceASTWithRecord() {
+    ast = createAST();
+    record_type = createRecordWithField(
+        *ast, "Source", ast->GetBasicType(lldb::BasicType::eBasicTypeChar),
+        "a_field");
+    record_decl =
+        llvm::cast<clang::RecordDecl>(ClangUtil::GetAsTagDecl(record_type));
+    field_decl = *record_decl->fields().begin();
+    assert(field_decl);
+  }
+};
+
+} // namespace clang_utils
+} // namespace lldb_private
+
+#endif
diff --git a/src/llvm-project/lldb/unittests/TestingSupport/TestUtilities.cpp b/src/llvm-project/lldb/unittests/TestingSupport/TestUtilities.cpp
index 38f470a..f4f6f79 100644
--- a/src/llvm-project/lldb/unittests/TestingSupport/TestUtilities.cpp
+++ b/src/llvm-project/lldb/unittests/TestingSupport/TestUtilities.cpp
@@ -8,9 +8,14 @@
 
 #include "TestUtilities.h"
 #include "llvm/ADT/SmallString.h"
+#include "llvm/ObjectYAML/yaml2obj.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Support/Program.h"
+#include "llvm/Support/YAMLTraits.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
 
 extern const char *TestMainArgv0;
 
@@ -21,23 +26,40 @@
   return result.str();
 }
 
-llvm::Error
-lldb_private::ReadYAMLObjectFile(const llvm::Twine &yaml_name,
-                                 llvm::SmallString<128> &object_file) {
-  std::string yaml = GetInputFilePath(yaml_name);
-  llvm::StringRef args[] = {YAML2OBJ, yaml};
-  llvm::StringRef obj_ref = object_file;
-  const llvm::Optional<llvm::StringRef> redirects[] = {llvm::None, obj_ref,
-                                                       llvm::None};
-  if (llvm::sys::ExecuteAndWait(YAML2OBJ, args, llvm::None, redirects) != 0)
-    return llvm::createStringError(llvm::inconvertibleErrorCode(),
-                                   "Error running yaml2obj %s.", yaml.c_str());
-  uint64_t size;
-  if (auto ec = llvm::sys::fs::file_size(object_file, size))
-    return llvm::errorCodeToError(ec);
-  if (size == 0)
-    return llvm::createStringError(
-        llvm::inconvertibleErrorCode(),
-        "Empty object file created from yaml2obj %s.", yaml.c_str());
-  return llvm::Error::success();
-}
\ No newline at end of file
+llvm::Expected<TestFile> TestFile::fromYaml(llvm::StringRef Yaml) {
+  const auto *Info = testing::UnitTest::GetInstance()->current_test_info();
+  assert(Info);
+  llvm::SmallString<128> Name;
+  int FD;
+  if (std::error_code EC = llvm::sys::fs::createTemporaryFile(
+          llvm::Twine(Info->test_case_name()) + "-" + Info->name(), "test", FD,
+          Name))
+    return llvm::errorCodeToError(EC);
+  llvm::FileRemover Remover(Name);
+  {
+    llvm::raw_fd_ostream OS(FD, /*shouldClose*/ true);
+    llvm::yaml::Input YIn(Yaml);
+    if (!llvm::yaml::convertYAML(YIn, OS, [](const llvm::Twine &Msg) {}))
+      return llvm::createStringError(llvm::inconvertibleErrorCode(),
+                                     "convertYAML() failed");
+  }
+  return TestFile(Name, std::move(Remover));
+}
+
+llvm::Expected<TestFile> TestFile::fromYamlFile(const llvm::Twine &Name) {
+  auto BufferOrError =
+      llvm::MemoryBuffer::getFile(GetInputFilePath(Name), /*FileSize*/ -1,
+                                  /*RequiresNullTerminator*/ false);
+  if (!BufferOrError)
+    return llvm::errorCodeToError(BufferOrError.getError());
+  return fromYaml(BufferOrError.get()->getBuffer());
+}
+
+TestFile::~TestFile() {
+  if (!Name)
+    return;
+  if (std::error_code EC =
+          llvm::sys::fs::remove(*Name, /*IgnoreNonExisting*/ false))
+    GTEST_LOG_(WARNING) << "Failed to delete `" << Name->c_str()
+                        << "`: " << EC.message();
+}
diff --git a/src/llvm-project/lldb/unittests/TestingSupport/TestUtilities.h b/src/llvm-project/lldb/unittests/TestingSupport/TestUtilities.h
index cb9f1df..407ff4a 100644
--- a/src/llvm-project/lldb/unittests/TestingSupport/TestUtilities.h
+++ b/src/llvm-project/lldb/unittests/TestingSupport/TestUtilities.h
@@ -12,6 +12,7 @@
 #include "llvm/ADT/SmallString.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/Support/Error.h"
+#include "llvm/Support/FileUtilities.h"
 #include <string>
 
 #define ASSERT_NO_ERROR(x)                                                     \
@@ -27,8 +28,28 @@
 
 namespace lldb_private {
 std::string GetInputFilePath(const llvm::Twine &name);
-llvm::Error ReadYAMLObjectFile(const llvm::Twine &yaml_name,
-                               llvm::SmallString<128> &obj);
+
+class TestFile {
+public:
+  static llvm::Expected<TestFile> fromYaml(llvm::StringRef Yaml);
+  static llvm::Expected<TestFile> fromYamlFile(const llvm::Twine &Name);
+
+  TestFile(TestFile &&RHS) : Name(std::move(RHS.Name)) {
+    RHS.Name = llvm::None;
+  }
+
+  ~TestFile();
+
+  llvm::StringRef name() { return *Name; }
+
+private:
+  TestFile(llvm::StringRef Name, llvm::FileRemover &&Remover) : Name(Name) {
+    Remover.releaseFile();
+  }
+  void operator=(const TestFile &) = delete;
+
+  llvm::Optional<std::string> Name;
+};
 }
 
 #endif
diff --git a/src/llvm-project/lldb/unittests/TestingSupport/module.modulemap b/src/llvm-project/lldb/unittests/TestingSupport/module.modulemap
new file mode 100644
index 0000000..b73ac27
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/TestingSupport/module.modulemap
@@ -0,0 +1,16 @@
+
+module lldb_TestingSupport {
+  requires cplusplus
+  module TestUtilities { header "TestUtilities.h" export * }
+  module MockTildeExpressionResolver { header "MockTildeExpressionResolver.h" export * }
+}
+
+module lldb_TestingSupport_Host {
+  requires cplusplus
+  module NativeProcessTestUtils { header "Host/NativeProcessTestUtils.h" export * }
+}
+
+module lldb_TestingSupport_Symbol {
+  requires cplusplus
+  module ClangTestUtils { header "Symbol/ClangTestUtils.h" export * }
+}
diff --git a/src/llvm-project/lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp b/src/llvm-project/lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
index f8308c3..083a817 100644
--- a/src/llvm-project/lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
+++ b/src/llvm-project/lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
@@ -2199,6 +2199,97 @@
   EXPECT_EQ(-40, regloc.GetOffset());
 }
 
+TEST_F(Testx86AssemblyInspectionEngine, TestSpArithx86_64Augmented) {
+  UnwindPlan::Row::RegisterLocation regloc;
+  UnwindPlan::RowSP row_sp;
+  AddressRange sample_range;
+  UnwindPlan unwind_plan(eRegisterKindLLDB);
+  std::unique_ptr<x86AssemblyInspectionEngine> engine64 = Getx86_64Inspector();
+
+  uint8_t data[] = {
+      0x55,             // pushq %rbp
+      0x48, 0x89, 0xe5, // movq %rsp, %rbp
+
+      // x86AssemblyInspectionEngine::AugmentUnwindPlanFromCallSite
+      // has a bug where it can't augment a function that is just
+      // prologue+epilogue - it needs at least one other instruction
+      // in between.
+
+      0x90,                            // nop
+      0x48, 0x81, 0xec, 0x88, 0, 0, 0, // subq   $0x88, %rsp
+      0x90,                            // nop
+      0x48, 0x81, 0xc4, 0x88, 0, 0, 0, // addq   $0x88, %rsp
+
+      0x5d, // popq %rbp
+      0xc3  // retq
+  };
+
+  sample_range = AddressRange(0x1000, sizeof(data));
+
+  unwind_plan.SetSourceName("unit testing hand-created unwind plan");
+  unwind_plan.SetPlanValidAddressRange(sample_range);
+  unwind_plan.SetRegisterKind(eRegisterKindLLDB);
+
+  row_sp = std::make_shared<UnwindPlan::Row>();
+
+  // Describe offset 0
+  row_sp->SetOffset(0);
+  row_sp->GetCFAValue().SetIsRegisterPlusOffset(k_rsp, 8);
+
+  regloc.SetAtCFAPlusOffset(-8);
+  row_sp->SetRegisterInfo(k_rip, regloc);
+
+  unwind_plan.AppendRow(row_sp);
+
+  // Allocate a new Row, populate it with the existing Row contents.
+  UnwindPlan::Row *new_row = new UnwindPlan::Row;
+  *new_row = *row_sp.get();
+  row_sp.reset(new_row);
+
+  // Describe offset 1
+  row_sp->SetOffset(1);
+  row_sp->GetCFAValue().SetIsRegisterPlusOffset(k_rsp, 16);
+  regloc.SetAtCFAPlusOffset(-16);
+  row_sp->SetRegisterInfo(k_rbp, regloc);
+  unwind_plan.AppendRow(row_sp);
+
+  // Allocate a new Row, populate it with the existing Row contents.
+  new_row = new UnwindPlan::Row;
+  *new_row = *row_sp.get();
+  row_sp.reset(new_row);
+
+  // Describe offset 4
+  row_sp->SetOffset(4);
+  row_sp->GetCFAValue().SetIsRegisterPlusOffset(k_rsp, 16);
+  unwind_plan.AppendRow(row_sp);
+
+  RegisterContextSP reg_ctx_sp;
+  EXPECT_TRUE(engine64->AugmentUnwindPlanFromCallSite(
+      data, sizeof(data), sample_range, unwind_plan, reg_ctx_sp));
+
+  // Before we touch the stack pointer, we should still refer to the
+  // row from after the prologue.
+  row_sp = unwind_plan.GetRowForFunctionOffset(5);
+  EXPECT_EQ(4ull, row_sp->GetOffset());
+
+  // Check the first stack pointer update.
+  row_sp = unwind_plan.GetRowForFunctionOffset(12);
+  EXPECT_EQ(12ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
+  EXPECT_EQ(152, row_sp->GetCFAValue().GetOffset());
+
+  // After the nop, we should still refer to the same row.
+  row_sp = unwind_plan.GetRowForFunctionOffset(13);
+  EXPECT_EQ(12ull, row_sp->GetOffset());
+
+  // Check that the second stack pointer update is reflected in the
+  // unwind plan.
+  row_sp = unwind_plan.GetRowForFunctionOffset(20);
+  EXPECT_EQ(20ull, row_sp->GetOffset());
+  EXPECT_TRUE(row_sp->GetCFAValue().GetRegisterNumber() == k_rsp);
+  EXPECT_EQ(16, row_sp->GetCFAValue().GetOffset());
+}
+
 TEST_F(Testx86AssemblyInspectionEngine, TestSimplex86_64Augmented) {
   UnwindPlan::Row::RegisterLocation regloc;
   UnwindPlan::RowSP row_sp;
diff --git a/src/llvm-project/lldb/unittests/Utility/AnsiTerminalTest.cpp b/src/llvm-project/lldb/unittests/Utility/AnsiTerminalTest.cpp
index 5982825..5361b0b 100644
--- a/src/llvm-project/lldb/unittests/Utility/AnsiTerminalTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/AnsiTerminalTest.cpp
@@ -10,7 +10,7 @@
 
 #include "lldb/Utility/AnsiTerminal.h"
 
-using namespace lldb_utility;
+using namespace lldb_private;
 
 TEST(AnsiTerminal, Empty) { EXPECT_EQ("", ansi::FormatAnsiTerminalCodes("")); }
 
diff --git a/src/llvm-project/lldb/unittests/Utility/ArchSpecTest.cpp b/src/llvm-project/lldb/unittests/Utility/ArchSpecTest.cpp
index 318626d..9115808 100644
--- a/src/llvm-project/lldb/unittests/Utility/ArchSpecTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/ArchSpecTest.cpp
@@ -157,8 +157,13 @@
     ArchSpec A("aarch64");
     ArchSpec B("aarch64--linux-android");
 
+    ArchSpec C("arm64_32");
+    ArchSpec D("arm64_32--watchos");
+
     EXPECT_TRUE(A.IsValid());
     EXPECT_TRUE(B.IsValid());
+    EXPECT_TRUE(C.IsValid());
+    EXPECT_TRUE(D.IsValid());
 
     EXPECT_EQ(llvm::Triple::ArchType::aarch64, B.GetTriple().getArch());
     EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor,
@@ -174,6 +179,17 @@
     EXPECT_EQ(llvm::Triple::OSType::Linux, A.GetTriple().getOS());
     EXPECT_EQ(llvm::Triple::EnvironmentType::Android,
               A.GetTriple().getEnvironment());
+
+    EXPECT_EQ(llvm::Triple::ArchType::aarch64_32, D.GetTriple().getArch());
+    EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor,
+              D.GetTriple().getVendor());
+    EXPECT_EQ(llvm::Triple::OSType::WatchOS, D.GetTriple().getOS());
+
+    C.MergeFrom(D);
+    EXPECT_EQ(llvm::Triple::ArchType::aarch64_32, C.GetTriple().getArch());
+    EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor,
+              C.GetTriple().getVendor());
+    EXPECT_EQ(llvm::Triple::OSType::WatchOS, C.GetTriple().getOS());
   }
   {
     ArchSpec A, B;
@@ -200,6 +216,41 @@
     EXPECT_EQ(llvm::Triple::EnvironmentType::UnknownEnvironment,
               A.GetTriple().getEnvironment());
   }
+  {
+    ArchSpec A("arm--linux-eabihf");
+    ArchSpec B("armv8l--linux-gnueabihf");
+
+    EXPECT_TRUE(A.IsValid());
+    EXPECT_TRUE(B.IsValid());
+
+    EXPECT_EQ(llvm::Triple::ArchType::arm, A.GetTriple().getArch());
+    EXPECT_EQ(llvm::Triple::ArchType::arm, B.GetTriple().getArch());
+
+    EXPECT_EQ(ArchSpec::eCore_arm_generic, A.GetCore());
+    EXPECT_EQ(ArchSpec::eCore_arm_armv8l, B.GetCore());
+
+    EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor,
+              A.GetTriple().getVendor());
+    EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor,
+              B.GetTriple().getVendor());
+
+    EXPECT_EQ(llvm::Triple::OSType::Linux, A.GetTriple().getOS());
+    EXPECT_EQ(llvm::Triple::OSType::Linux, B.GetTriple().getOS());
+
+    EXPECT_EQ(llvm::Triple::EnvironmentType::EABIHF,
+              A.GetTriple().getEnvironment());
+    EXPECT_EQ(llvm::Triple::EnvironmentType::GNUEABIHF,
+              B.GetTriple().getEnvironment());
+
+    A.MergeFrom(B);
+    EXPECT_EQ(llvm::Triple::ArchType::arm, A.GetTriple().getArch());
+    EXPECT_EQ(ArchSpec::eCore_arm_armv8l, A.GetCore());
+    EXPECT_EQ(llvm::Triple::VendorType::UnknownVendor,
+              A.GetTriple().getVendor());
+    EXPECT_EQ(llvm::Triple::OSType::Linux, A.GetTriple().getOS());
+    EXPECT_EQ(llvm::Triple::EnvironmentType::EABIHF,
+              A.GetTriple().getEnvironment());
+  }
 }
 
 TEST(ArchSpecTest, MergeFromMachOUnknown) {
diff --git a/src/llvm-project/lldb/unittests/Utility/ArgsTest.cpp b/src/llvm-project/lldb/unittests/Utility/ArgsTest.cpp
index b4bb9ca..ec352cd 100644
--- a/src/llvm-project/lldb/unittests/Utility/ArgsTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/ArgsTest.cpp
@@ -37,6 +37,34 @@
   EXPECT_STREQ(args.GetArgumentAtIndex(0), "arg with space");
 }
 
+TEST(ArgsTest, TestTrailingBackslash) {
+  Args args;
+  args.SetCommandString("arg\\");
+  EXPECT_EQ(1u, args.GetArgumentCount());
+  EXPECT_STREQ(args.GetArgumentAtIndex(0), "arg\\");
+}
+
+TEST(ArgsTest, TestQuotedTrailingBackslash) {
+  Args args;
+  args.SetCommandString("\"arg\\");
+  EXPECT_EQ(1u, args.GetArgumentCount());
+  EXPECT_STREQ(args.GetArgumentAtIndex(0), "arg\\");
+}
+
+TEST(ArgsTest, TestUnknownEscape) {
+  Args args;
+  args.SetCommandString("arg\\y");
+  EXPECT_EQ(1u, args.GetArgumentCount());
+  EXPECT_STREQ(args.GetArgumentAtIndex(0), "arg\\y");
+}
+
+TEST(ArgsTest, TestQuotedUnknownEscape) {
+  Args args;
+  args.SetCommandString("\"arg\\y");
+  EXPECT_EQ(1u, args.GetArgumentCount());
+  EXPECT_STREQ(args.GetArgumentAtIndex(0), "arg\\y");
+}
+
 TEST(ArgsTest, TestMultipleArgs) {
   Args args;
   args.SetCommandString("this has multiple args");
@@ -124,9 +152,9 @@
        << "baz";
   Args args(list);
   ASSERT_EQ(3u, args.GetArgumentCount());
-  EXPECT_EQ("foo", args[0].ref);
-  EXPECT_EQ("bar", args[1].ref);
-  EXPECT_EQ("baz", args[2].ref);
+  EXPECT_EQ("foo", args[0].ref());
+  EXPECT_EQ("bar", args[1].ref());
+  EXPECT_EQ("baz", args[2].ref());
 }
 
 TEST(ArgsTest, GetQuotedCommandString) {
@@ -214,3 +242,43 @@
   EXPECT_EQ("quux\t", Args::EscapeLLDBCommandArgument(quux, '`'));
   EXPECT_EQ("quux\t", Args::EscapeLLDBCommandArgument(quux, '"'));
 }
+
+TEST(ArgsTest, ReplaceArgumentAtIndexShort) {
+  Args args;
+  args.SetCommandString("foo ba b");
+  args.ReplaceArgumentAtIndex(0, "f");
+  EXPECT_EQ(3u, args.GetArgumentCount());
+  EXPECT_STREQ(args.GetArgumentAtIndex(0), "f");
+}
+
+TEST(ArgsTest, ReplaceArgumentAtIndexEqual) {
+  Args args;
+  args.SetCommandString("foo ba b");
+  args.ReplaceArgumentAtIndex(0, "bar");
+  EXPECT_EQ(3u, args.GetArgumentCount());
+  EXPECT_STREQ(args.GetArgumentAtIndex(0), "bar");
+}
+
+TEST(ArgsTest, ReplaceArgumentAtIndexLonger) {
+  Args args;
+  args.SetCommandString("foo ba b");
+  args.ReplaceArgumentAtIndex(0, "baar");
+  EXPECT_EQ(3u, args.GetArgumentCount());
+  EXPECT_STREQ(args.GetArgumentAtIndex(0), "baar");
+}
+
+TEST(ArgsTest, ReplaceArgumentAtIndexOutOfRange) {
+  Args args;
+  args.SetCommandString("foo ba b");
+  args.ReplaceArgumentAtIndex(3, "baar");
+  EXPECT_EQ(3u, args.GetArgumentCount());
+  EXPECT_STREQ(args.GetArgumentAtIndex(2), "b");
+}
+
+TEST(ArgsTest, ReplaceArgumentAtIndexFarOutOfRange) {
+  Args args;
+  args.SetCommandString("foo ba b");
+  args.ReplaceArgumentAtIndex(4, "baar");
+  EXPECT_EQ(3u, args.GetArgumentCount());
+  EXPECT_STREQ(args.GetArgumentAtIndex(2), "b");
+}
diff --git a/src/llvm-project/lldb/unittests/Utility/CMakeLists.txt b/src/llvm-project/lldb/unittests/Utility/CMakeLists.txt
index ad73fdf..8dc1332 100644
--- a/src/llvm-project/lldb/unittests/Utility/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/Utility/CMakeLists.txt
@@ -4,26 +4,25 @@
   OptionsWithRawTest.cpp
   ArchSpecTest.cpp
   BroadcasterTest.cpp
-  CleanUpTest.cpp
   ConstStringTest.cpp
   CompletionRequestTest.cpp
   DataExtractorTest.cpp
   EnvironmentTest.cpp
   EventTest.cpp
-  FileCollectorTest.cpp
   FileSpecTest.cpp
   FlagsTest.cpp
-  JSONTest.cpp
   ListenerTest.cpp
   LogTest.cpp
   NameMatchesTest.cpp
   PredicateTest.cpp
   ProcessInfoTest.cpp
+  ProcessInstanceInfoTest.cpp
   RangeMapTest.cpp
   RangeTest.cpp
   RegisterValueTest.cpp
-  ReproducerTest.cpp
+  RegularExpressionTest.cpp
   ReproducerInstrumentationTest.cpp
+  ReproducerTest.cpp
   ScalarTest.cpp
   StateTest.cpp
   StatusTest.cpp
@@ -33,6 +32,7 @@
   StringLexerTest.cpp
   StringListTest.cpp
   StructuredDataTest.cpp
+  SubsystemRAIITest.cpp
   TildeExpressionResolverTest.cpp
   TimeoutTest.cpp
   TimerTest.cpp
diff --git a/src/llvm-project/lldb/unittests/Utility/CleanUpTest.cpp b/src/llvm-project/lldb/unittests/Utility/CleanUpTest.cpp
deleted file mode 100644
index ce6bc83..0000000
--- a/src/llvm-project/lldb/unittests/Utility/CleanUpTest.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-//===-- CleanUpTest.cpp -----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Utility/CleanUp.h"
-#include "gtest/gtest.h"
-
-using namespace lldb_private;
-
-TEST(CleanUpTest, no_args) {
-  bool f = false;
-  {
-    CleanUp cleanup([&] { f = true; });
-  }
-  ASSERT_TRUE(f);
-}
-
-TEST(CleanUpTest, multiple_args) {
-  bool f1 = false;
-  bool f2 = false;
-  bool f3 = false;
-  {
-    CleanUp cleanup(
-        [](bool arg1, bool *arg2, bool &arg3) {
-          ASSERT_FALSE(arg1);
-          *arg2 = true;
-          arg3 = true;
-        },
-        f1, &f2, f3);
-  }
-  ASSERT_TRUE(f2);
-  ASSERT_FALSE(f3);
-}
-
-TEST(CleanUpTest, disable) {
-  bool f = false;
-  {
-    CleanUp cleanup([&] { f = true; });
-    cleanup.disable();
-  }
-  ASSERT_FALSE(f);
-}
diff --git a/src/llvm-project/lldb/unittests/Utility/CompletionRequestTest.cpp b/src/llvm-project/lldb/unittests/Utility/CompletionRequestTest.cpp
index 40675df..f197171 100644
--- a/src/llvm-project/lldb/unittests/Utility/CompletionRequestTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/CompletionRequestTest.cpp
@@ -14,27 +14,103 @@
 TEST(CompletionRequest, Constructor) {
   std::string command = "a bad c";
   const unsigned cursor_pos = 3;
-  const int arg_index = 1;
-  const int arg_cursor_pos = 1;
-  const int match_start = 2345;
-  const int match_max_return = 12345;
+  const size_t arg_index = 1;
   StringList matches;
   CompletionResult result;
 
-  CompletionRequest request(command, cursor_pos, match_start, match_max_return,
-                            result);
+  CompletionRequest request(command, cursor_pos, result);
   result.GetMatches(matches);
 
   EXPECT_STREQ(request.GetRawLine().str().c_str(), command.c_str());
   EXPECT_EQ(request.GetRawCursorPos(), cursor_pos);
   EXPECT_EQ(request.GetCursorIndex(), arg_index);
-  EXPECT_EQ(request.GetCursorCharPosition(), arg_cursor_pos);
-  EXPECT_EQ(request.GetMatchStartPoint(), match_start);
-  EXPECT_EQ(request.GetMaxReturnElements(), match_max_return);
-  EXPECT_EQ(request.GetWordComplete(), false);
 
-  EXPECT_EQ(request.GetPartialParsedLine().GetArgumentCount(), 2u);
-  EXPECT_STREQ(request.GetPartialParsedLine().GetArgumentAtIndex(1), "b");
+  EXPECT_EQ(request.GetParsedLine().GetArgumentCount(), 2u);
+  EXPECT_EQ(request.GetCursorArgumentPrefix().str(), "b");
+}
+
+TEST(CompletionRequest, FakeLastArg) {
+  // We insert an empty fake argument into the argument list when the
+  // cursor is after a space.
+  std::string command = "a bad c ";
+  const unsigned cursor_pos = command.size();
+  CompletionResult result;
+
+  CompletionRequest request(command, cursor_pos, result);
+
+  EXPECT_STREQ(request.GetRawLine().str().c_str(), command.c_str());
+  EXPECT_EQ(request.GetRawCursorPos(), cursor_pos);
+  EXPECT_EQ(request.GetCursorIndex(), 3U);
+
+  EXPECT_EQ(request.GetParsedLine().GetArgumentCount(), 4U);
+  EXPECT_EQ(request.GetCursorArgumentPrefix().str(), "");
+}
+
+TEST(CompletionRequest, TryCompleteCurrentArgGood) {
+  std::string command = "a bad c";
+  StringList matches, descriptions;
+  CompletionResult result;
+
+  CompletionRequest request(command, 3, result);
+  request.TryCompleteCurrentArg("boo", "car");
+  result.GetMatches(matches);
+  result.GetDescriptions(descriptions);
+
+  EXPECT_EQ(1U, result.GetResults().size());
+  EXPECT_STREQ("boo", matches.GetStringAtIndex(0U));
+  EXPECT_EQ(1U, descriptions.GetSize());
+  EXPECT_STREQ("car", descriptions.GetStringAtIndex(0U));
+}
+
+TEST(CompletionRequest, TryCompleteCurrentArgBad) {
+  std::string command = "a bad c";
+  CompletionResult result;
+
+  CompletionRequest request(command, 3, result);
+  request.TryCompleteCurrentArg("car", "card");
+
+  EXPECT_EQ(0U, result.GetResults().size());
+}
+
+TEST(CompletionRequest, TryCompleteCurrentArgMode) {
+  std::string command = "a bad c";
+  CompletionResult result;
+
+  CompletionRequest request(command, 3, result);
+  request.TryCompleteCurrentArg<CompletionMode::Partial>("bar", "bard");
+
+  EXPECT_EQ(1U, result.GetResults().size());
+  EXPECT_EQ(CompletionMode::Partial, result.GetResults()[0].GetMode());
+}
+
+TEST(CompletionRequest, ShiftArguments) {
+  std::string command = "a bad c";
+  const unsigned cursor_pos = 3;
+  const size_t arg_index = 1;
+  StringList matches;
+  CompletionResult result;
+
+  CompletionRequest request(command, cursor_pos, result);
+  result.GetMatches(matches);
+
+  EXPECT_STREQ(request.GetRawLine().str().c_str(), command.c_str());
+  EXPECT_EQ(request.GetRawCursorPos(), cursor_pos);
+  EXPECT_EQ(request.GetCursorIndex(), arg_index);
+
+  EXPECT_EQ(request.GetParsedLine().GetArgumentCount(), 2u);
+  EXPECT_STREQ(request.GetParsedLine().GetArgumentAtIndex(1), "b");
+
+  // Shift away the 'a' argument.
+  request.ShiftArguments();
+
+  // The raw line/cursor stays identical.
+  EXPECT_STREQ(request.GetRawLine().str().c_str(), command.c_str());
+  EXPECT_EQ(request.GetRawCursorPos(), cursor_pos);
+
+  // Partially parsed line and cursor should be updated.
+  EXPECT_EQ(request.GetCursorIndex(), arg_index - 1U);
+  EXPECT_EQ(request.GetParsedLine().GetArgumentCount(), 1u);
+  EXPECT_EQ(request.GetCursorArgumentPrefix().str(), "b");
 }
 
 TEST(CompletionRequest, DuplicateFiltering) {
@@ -43,23 +119,23 @@
   StringList matches;
 
   CompletionResult result;
-  CompletionRequest request(command, cursor_pos, 0, 0, result);
+  CompletionRequest request(command, cursor_pos, result);
   result.GetMatches(matches);
 
-  EXPECT_EQ(0U, request.GetNumberOfMatches());
+  EXPECT_EQ(0U, result.GetNumberOfResults());
 
   // Add foo twice
   request.AddCompletion("foo");
   result.GetMatches(matches);
 
-  EXPECT_EQ(1U, request.GetNumberOfMatches());
+  EXPECT_EQ(1U, result.GetNumberOfResults());
   EXPECT_EQ(1U, matches.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
 
   request.AddCompletion("foo");
   result.GetMatches(matches);
 
-  EXPECT_EQ(1U, request.GetNumberOfMatches());
+  EXPECT_EQ(1U, result.GetNumberOfResults());
   EXPECT_EQ(1U, matches.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
 
@@ -67,7 +143,7 @@
   request.AddCompletion("bar");
   result.GetMatches(matches);
 
-  EXPECT_EQ(2U, request.GetNumberOfMatches());
+  EXPECT_EQ(2U, result.GetNumberOfResults());
   EXPECT_EQ(2U, matches.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
   EXPECT_STREQ("bar", matches.GetStringAtIndex(1));
@@ -75,7 +151,7 @@
   request.AddCompletion("bar");
   result.GetMatches(matches);
 
-  EXPECT_EQ(2U, request.GetNumberOfMatches());
+  EXPECT_EQ(2U, result.GetNumberOfResults());
   EXPECT_EQ(2U, matches.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
   EXPECT_STREQ("bar", matches.GetStringAtIndex(1));
@@ -84,7 +160,7 @@
   request.AddCompletion("foo");
   result.GetMatches(matches);
 
-  EXPECT_EQ(2U, request.GetNumberOfMatches());
+  EXPECT_EQ(2U, result.GetNumberOfResults());
   EXPECT_EQ(2U, matches.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
   EXPECT_STREQ("bar", matches.GetStringAtIndex(1));
@@ -93,7 +169,7 @@
   request.AddCompletion("foobar");
   result.GetMatches(matches);
 
-  EXPECT_EQ(3U, request.GetNumberOfMatches());
+  EXPECT_EQ(3U, result.GetNumberOfResults());
   EXPECT_EQ(3U, matches.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
   EXPECT_STREQ("bar", matches.GetStringAtIndex(1));
@@ -106,18 +182,18 @@
   StringList matches, descriptions;
 
   CompletionResult result;
-  CompletionRequest request(command, cursor_pos, 0, 0, result);
+  CompletionRequest request(command, cursor_pos, result);
   result.GetMatches(matches);
   result.GetDescriptions(descriptions);
 
-  EXPECT_EQ(0U, request.GetNumberOfMatches());
+  EXPECT_EQ(0U, result.GetNumberOfResults());
 
   // Add foo twice with same comment
   request.AddCompletion("foo", "comment");
   result.GetMatches(matches);
   result.GetDescriptions(descriptions);
 
-  EXPECT_EQ(1U, request.GetNumberOfMatches());
+  EXPECT_EQ(1U, result.GetNumberOfResults());
   EXPECT_EQ(1U, matches.GetSize());
   EXPECT_EQ(1U, descriptions.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -127,7 +203,7 @@
   result.GetMatches(matches);
   result.GetDescriptions(descriptions);
 
-  EXPECT_EQ(1U, request.GetNumberOfMatches());
+  EXPECT_EQ(1U, result.GetNumberOfResults());
   EXPECT_EQ(1U, matches.GetSize());
   EXPECT_EQ(1U, descriptions.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -138,7 +214,7 @@
   result.GetMatches(matches);
   result.GetDescriptions(descriptions);
 
-  EXPECT_EQ(2U, request.GetNumberOfMatches());
+  EXPECT_EQ(2U, result.GetNumberOfResults());
   EXPECT_EQ(2U, matches.GetSize());
   EXPECT_EQ(2U, descriptions.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -148,7 +224,7 @@
   result.GetMatches(matches);
   result.GetDescriptions(descriptions);
 
-  EXPECT_EQ(3U, request.GetNumberOfMatches());
+  EXPECT_EQ(3U, result.GetNumberOfResults());
   EXPECT_EQ(3U, matches.GetSize());
   EXPECT_EQ(3U, descriptions.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -163,7 +239,7 @@
   result.GetMatches(matches);
   result.GetDescriptions(descriptions);
 
-  EXPECT_EQ(4U, request.GetNumberOfMatches());
+  EXPECT_EQ(4U, result.GetNumberOfResults());
   EXPECT_EQ(4U, matches.GetSize());
   EXPECT_EQ(4U, descriptions.GetSize());
   EXPECT_STREQ("foo", matches.GetStringAtIndex(0));
@@ -182,7 +258,7 @@
   StringList matches;
 
   CompletionResult result;
-  CompletionRequest request(command, cursor_pos, 0, 0, result);
+  CompletionRequest request(command, cursor_pos, result);
 
   std::string Temporary = "bar";
   request.AddCompletion(Temporary);
@@ -191,6 +267,6 @@
   Temporary[0] = 'f';
 
   result.GetMatches(matches);
-  EXPECT_EQ(1U, request.GetNumberOfMatches());
+  EXPECT_EQ(1U, result.GetNumberOfResults());
   EXPECT_STREQ("bar", matches.GetStringAtIndex(0));
 }
diff --git a/src/llvm-project/lldb/unittests/Utility/DataExtractorTest.cpp b/src/llvm-project/lldb/unittests/Utility/DataExtractorTest.cpp
index 1a974f2..4dfa951 100644
--- a/src/llvm-project/lldb/unittests/Utility/DataExtractorTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/DataExtractorTest.cpp
@@ -13,7 +13,7 @@
 using namespace lldb_private;
 
 TEST(DataExtractorTest, GetBitfield) {
-  uint8_t buffer[] = {0x01, 0x23, 0x45, 0x67};
+  uint8_t buffer[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
   DataExtractor LE(buffer, sizeof(buffer), lldb::eByteOrderLittle,
                    sizeof(void *));
   DataExtractor BE(buffer, sizeof(buffer), lldb::eByteOrderBig, sizeof(void *));
@@ -24,6 +24,15 @@
   ASSERT_EQ(buffer[1], LE.GetMaxU64Bitfield(&offset, sizeof(buffer), 8, 8));
   offset = 0;
   ASSERT_EQ(buffer[1], BE.GetMaxU64Bitfield(&offset, sizeof(buffer), 8, 8));
+  offset = 0;
+  ASSERT_EQ(static_cast<uint64_t>(0x0123456789ABCDEF),
+            BE.GetMaxU64Bitfield(&offset, sizeof(buffer), 64, 0));
+  offset = 0;
+  ASSERT_EQ(static_cast<uint64_t>(0x01234567),
+            BE.GetMaxU64Bitfield(&offset, sizeof(buffer), 32, 0));
+  offset = 0;
+  ASSERT_EQ(static_cast<uint64_t>(0x012345678),
+            BE.GetMaxU64Bitfield(&offset, sizeof(buffer), 36, 0));
 
   offset = 0;
   ASSERT_EQ(int8_t(buffer[1]),
@@ -49,6 +58,51 @@
   EXPECT_EQ(nullptr, E.PeekData(4, 1));
 }
 
+TEST(DataExtractorTest, GetCStr) {
+  uint8_t buffer[] = {'X', 'f', 'o', 'o', '\0'};
+  DataExtractor E(buffer, sizeof buffer, lldb::eByteOrderLittle, 4);
+
+  lldb::offset_t offset = 1;
+  EXPECT_STREQ("foo", E.GetCStr(&offset));
+  EXPECT_EQ(5U, offset);
+}
+
+TEST(DataExtractorTest, GetCStrEmpty) {
+  uint8_t buffer[] = {'X', '\0'};
+  DataExtractor E(buffer, sizeof buffer, lldb::eByteOrderLittle, 4);
+
+  lldb::offset_t offset = 1;
+  EXPECT_STREQ("", E.GetCStr(&offset));
+  EXPECT_EQ(2U, offset);
+}
+
+TEST(DataExtractorTest, GetCStrUnterminated) {
+  uint8_t buffer[] = {'X', 'f', 'o', 'o'};
+  DataExtractor E(buffer, sizeof buffer, lldb::eByteOrderLittle, 4);
+
+  lldb::offset_t offset = 1;
+  EXPECT_EQ(nullptr, E.GetCStr(&offset));
+  EXPECT_EQ(1U, offset);
+}
+
+TEST(DataExtractorTest, GetCStrAtEnd) {
+  uint8_t buffer[] = {'X'};
+  DataExtractor E(buffer, sizeof buffer, lldb::eByteOrderLittle, 4);
+
+  lldb::offset_t offset = 1;
+  EXPECT_EQ(nullptr, E.GetCStr(&offset));
+  EXPECT_EQ(1U, offset);
+}
+
+TEST(DataExtractorTest, GetCStrAtNullOffset) {
+  uint8_t buffer[] = {'f', 'o', 'o', '\0'};
+  DataExtractor E(buffer, sizeof buffer, lldb::eByteOrderLittle, 4);
+
+  lldb::offset_t offset = 0;
+  EXPECT_STREQ("foo", E.GetCStr(&offset));
+  EXPECT_EQ(4U, offset);
+}
+
 TEST(DataExtractorTest, GetMaxU64) {
   uint8_t buffer[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};
   DataExtractor LE(buffer, sizeof(buffer), lldb::eByteOrderLittle,
diff --git a/src/llvm-project/lldb/unittests/Utility/FileCollectorTest.cpp b/src/llvm-project/lldb/unittests/Utility/FileCollectorTest.cpp
deleted file mode 100644
index 348b4cc..0000000
--- a/src/llvm-project/lldb/unittests/Utility/FileCollectorTest.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-//===-- FileCollectorTest.cpp -----------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
-
-#include "lldb/Utility/FileCollector.h"
-#include "lldb/Utility/FileSpec.h"
-
-#include "llvm/Support/FileSystem.h"
-
-using namespace llvm;
-using namespace lldb_private;
-
-namespace llvm {
-namespace vfs {
-inline bool operator==(const llvm::vfs::YAMLVFSEntry &LHS,
-                       const llvm::vfs::YAMLVFSEntry &RHS) {
-  return LHS.VPath == RHS.VPath && LHS.RPath == RHS.RPath;
-}
-} // namespace vfs
-} // namespace llvm
-
-namespace {
-class TestingFileCollector : public FileCollector {
-public:
-  using FileCollector::FileCollector;
-  using FileCollector::m_root;
-  using FileCollector::m_seen;
-  using FileCollector::m_symlink_map;
-  using FileCollector::m_vfs_writer;
-
-  bool HasSeen(FileSpec fs) {
-    return m_seen.find(fs.GetPath()) != m_seen.end();
-  }
-};
-
-struct ScopedDir {
-  SmallString<128> Path;
-  ScopedDir(const Twine &Name, bool Unique = false) {
-    std::error_code EC;
-    if (Unique) {
-      EC = llvm::sys::fs::createUniqueDirectory(Name, Path);
-    } else {
-      Path = Name.str();
-      EC = llvm::sys::fs::create_directory(Twine(Path));
-    }
-    if (EC)
-      Path = "";
-    EXPECT_FALSE(EC);
-    // Ensure the path is the real path so tests can use it to compare against
-    // realpath output.
-    SmallString<128> RealPath;
-    if (!llvm::sys::fs::real_path(Path, RealPath))
-      Path.swap(RealPath);
-  }
-  ~ScopedDir() {
-    if (Path != "") {
-      EXPECT_FALSE(llvm::sys::fs::remove_directories(Path.str()));
-    }
-  }
-  operator StringRef() { return Path.str(); }
-};
-
-struct ScopedLink {
-  SmallString<128> Path;
-  ScopedLink(const Twine &To, const Twine &From) {
-    Path = From.str();
-    std::error_code EC = sys::fs::create_link(To, From);
-    if (EC)
-      Path = "";
-    EXPECT_FALSE(EC);
-  }
-  ~ScopedLink() {
-    if (Path != "") {
-      EXPECT_FALSE(llvm::sys::fs::remove(Path.str()));
-    }
-  }
-  operator StringRef() { return Path.str(); }
-};
-
-struct ScopedFile {
-  SmallString<128> Path;
-  ScopedFile(const Twine &Name) {
-    std::error_code EC;
-    EC = llvm::sys::fs::createUniqueFile(Name, Path);
-    if (EC)
-      Path = "";
-    EXPECT_FALSE(EC);
-  }
-  ~ScopedFile() {
-    if (Path != "") {
-      EXPECT_FALSE(llvm::sys::fs::remove(Path.str()));
-    }
-  }
-  operator StringRef() { return Path.str(); }
-};
-} // end anonymous namespace
-
-TEST(FileCollectorTest, AddFile) {
-  ScopedDir root("add_file_root", true);
-  FileSpec root_fs(root.Path);
-  TestingFileCollector file_collector(root_fs, root_fs);
-
-  file_collector.AddFile(FileSpec("/path/to/a"));
-  file_collector.AddFile(FileSpec("/path/to/b"));
-  file_collector.AddFile(FileSpec("/path/to/c"));
-
-  // Make sure the root is correct.
-  EXPECT_EQ(file_collector.m_root, root_fs);
-
-  // Make sure we've seen all the added files.
-  EXPECT_TRUE(file_collector.HasSeen(FileSpec("/path/to/a")));
-  EXPECT_TRUE(file_collector.HasSeen(FileSpec("/path/to/b")));
-  EXPECT_TRUE(file_collector.HasSeen(FileSpec("/path/to/c")));
-
-  // Make sure we've only seen the added files.
-  EXPECT_FALSE(file_collector.HasSeen(FileSpec("/path/to/d")));
-}
-
-TEST(FileCollectorTest, CopyFiles) {
-  ScopedDir file_root("file_root", true);
-  ScopedFile a(file_root + "/aaa");
-  ScopedFile b(file_root + "/bbb");
-  ScopedFile c(file_root + "/ccc");
-
-  // Create file collector and add files.
-  ScopedDir root("copy_files_root", true);
-  FileSpec root_fs(root.Path);
-  TestingFileCollector file_collector(root_fs, root_fs);
-  file_collector.AddFile(a.Path);
-  file_collector.AddFile(b.Path);
-  file_collector.AddFile(c.Path);
-
-  // Make sure we can copy the files.
-  std::error_code ec = file_collector.CopyFiles(true);
-  EXPECT_FALSE(ec);
-
-  // Now add a bogus file and make sure we error out.
-  file_collector.AddFile("/some/bogus/file");
-  ec = file_collector.CopyFiles(true);
-  EXPECT_TRUE(ec);
-
-  // However, if stop_on_error is true the copy should still succeed.
-  ec = file_collector.CopyFiles(false);
-  EXPECT_FALSE(ec);
-}
-
-#ifndef _WIN32
-TEST(FileCollectorTest, Symlinks) {
-  // Root where the original files live.
-  ScopedDir file_root("file_root", true);
-
-  // Create some files in the file root.
-  ScopedFile a(file_root + "/aaa");
-  ScopedFile b(file_root + "/bbb");
-  ScopedFile c(file_root + "/ccc");
-
-  // Create a directory foo with file ddd.
-  ScopedDir foo(file_root + "/foo");
-  ScopedFile d(foo + "/ddd");
-
-  // Create a file eee in the foo's parent directory.
-  ScopedFile e(foo + "/../eee");
-
-  // Create a symlink bar pointing to foo.
-  ScopedLink symlink(file_root + "/foo", file_root + "/bar");
-
-  // Root where files are copied to.
-  ScopedDir reproducer_root("reproducer_root", true);
-  FileSpec root_fs(reproducer_root.Path);
-  TestingFileCollector file_collector(root_fs, root_fs);
-
-  // Add all the files to the collector.
-  file_collector.AddFile(a.Path);
-  file_collector.AddFile(b.Path);
-  file_collector.AddFile(c.Path);
-  file_collector.AddFile(d.Path);
-  file_collector.AddFile(e.Path);
-  file_collector.AddFile(file_root + "/bar/ddd");
-
-  auto mapping = file_collector.m_vfs_writer.getMappings();
-
-  {
-    // Make sure the common case works.
-    std::string vpath = (file_root + "/aaa").str();
-    std::string rpath = (reproducer_root.Path + file_root.Path + "/aaa").str();
-    printf("%s -> %s\n", vpath.c_str(), rpath.c_str());
-    EXPECT_THAT(mapping, testing::Contains(vfs::YAMLVFSEntry(vpath, rpath)));
-  }
-
-  {
-    // Make sure the virtual path points to the real source path.
-    std::string vpath = (file_root + "/bar/ddd").str();
-    std::string rpath =
-        (reproducer_root.Path + file_root.Path + "/foo/ddd").str();
-    printf("%s -> %s\n", vpath.c_str(), rpath.c_str());
-    EXPECT_THAT(mapping, testing::Contains(vfs::YAMLVFSEntry(vpath, rpath)));
-  }
-
-  {
-    // Make sure that .. is removed from the source path.
-    std::string vpath = (file_root + "/eee").str();
-    std::string rpath = (reproducer_root.Path + file_root.Path + "/eee").str();
-    printf("%s -> %s\n", vpath.c_str(), rpath.c_str());
-    EXPECT_THAT(mapping, testing::Contains(vfs::YAMLVFSEntry(vpath, rpath)));
-  }
-}
-#endif
diff --git a/src/llvm-project/lldb/unittests/Utility/FileSpecTest.cpp b/src/llvm-project/lldb/unittests/Utility/FileSpecTest.cpp
index 0f5b165..d5f1091 100644
--- a/src/llvm-project/lldb/unittests/Utility/FileSpecTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/FileSpecTest.cpp
@@ -12,6 +12,14 @@
 
 using namespace lldb_private;
 
+static FileSpec PosixSpec(llvm::StringRef path) {
+  return FileSpec(path, FileSpec::Style::posix);
+}
+
+static FileSpec WindowsSpec(llvm::StringRef path) {
+  return FileSpec(path, FileSpec::Style::windows);
+}
+
 TEST(FileSpecTest, FileAndDirectoryComponents) {
   FileSpec fs_posix("/foo/bar", FileSpec::Style::posix);
   EXPECT_STREQ("/foo/bar", fs_posix.GetCString());
@@ -106,8 +114,7 @@
 }
 
 TEST(FileSpecTest, CopyByAppendingPathComponent) {
-  FileSpec fs = FileSpec("/foo", FileSpec::Style::posix)
-                    .CopyByAppendingPathComponent("bar");
+  FileSpec fs = PosixSpec("/foo").CopyByAppendingPathComponent("bar");
   EXPECT_STREQ("/foo/bar", fs.GetCString());
   EXPECT_STREQ("/foo", fs.GetDirectory().GetCString());
   EXPECT_STREQ("bar", fs.GetFilename().GetCString());
@@ -136,9 +143,7 @@
 }
 
 TEST(FileSpecTest, EqualSeparator) {
-  FileSpec backward("C:\\foo\\bar", FileSpec::Style::windows);
-  FileSpec forward("C:/foo/bar", FileSpec::Style::windows);
-  EXPECT_EQ(forward, backward);
+  EXPECT_EQ(WindowsSpec("C:\\foo\\bar"), WindowsSpec("C:/foo/bar"));
 }
 
 TEST(FileSpecTest, EqualDotsWindows) {
@@ -153,9 +158,8 @@
   };
 
   for (const auto &test : tests) {
-    FileSpec one(test.first, FileSpec::Style::windows);
-    FileSpec two(test.second, FileSpec::Style::windows);
-    EXPECT_EQ(one, two);
+    SCOPED_TRACE(llvm::Twine(test.first) + " <=> " + test.second);
+    EXPECT_EQ(WindowsSpec(test.first), WindowsSpec(test.second));
   }
 }
 
@@ -169,9 +173,8 @@
   };
 
   for (const auto &test : tests) {
-    FileSpec one(test.first, FileSpec::Style::posix);
-    FileSpec two(test.second, FileSpec::Style::posix);
-    EXPECT_EQ(one, two);
+    SCOPED_TRACE(llvm::Twine(test.first) + " <=> " + test.second);
+    EXPECT_EQ(PosixSpec(test.first), PosixSpec(test.second));
   }
 }
 
@@ -183,9 +186,8 @@
   };
 
   for (const auto &test : tests) {
-    FileSpec one(test.first, FileSpec::Style::posix);
-    FileSpec two(test.second, FileSpec::Style::posix);
-    EXPECT_EQ(one, two);
+    SCOPED_TRACE(llvm::Twine(test.first) + " <=> " + test.second);
+    EXPECT_EQ(PosixSpec(test.first), PosixSpec(test.second));
   }
 }
 
@@ -200,7 +202,7 @@
   EXPECT_EQ(llvm::None, FileSpec::GuessPathStyle("foo/bar.txt"));
 }
 
-TEST(FileSpecTest, GetNormalizedPath) {
+TEST(FileSpecTest, GetPath) {
   std::pair<const char *, const char *> posix_tests[] = {
       {"/foo/.././bar", "/bar"},
       {"/foo/./../bar", "/bar"},
@@ -230,8 +232,7 @@
   };
   for (auto test : posix_tests) {
     SCOPED_TRACE(llvm::Twine("test.first = ") + test.first);
-    EXPECT_EQ(test.second,
-              FileSpec(test.first, FileSpec::Style::posix).GetPath());
+    EXPECT_EQ(test.second, PosixSpec(test.first).GetPath());
   }
 
   std::pair<const char *, const char *> windows_tests[] = {
@@ -262,9 +263,8 @@
       {R"(..\..\foo)", R"(..\..\foo)"},
   };
   for (auto test : windows_tests) {
-    EXPECT_EQ(test.second,
-              FileSpec(test.first, FileSpec::Style::windows).GetPath())
-        << "Original path: " << test.first;
+    SCOPED_TRACE(llvm::Twine("test.first = ") + test.first);
+    EXPECT_EQ(test.second, WindowsSpec(test.first).GetPath());
   }
 }
 
@@ -315,8 +315,8 @@
     "/foo/../.",
   };
   for (const auto &path: not_relative) {
-    FileSpec spec(path, FileSpec::Style::posix);
-    EXPECT_FALSE(spec.IsRelative());
+    SCOPED_TRACE(path);
+    EXPECT_FALSE(PosixSpec(path).IsRelative());
   }
   llvm::StringRef is_relative[] = {
     ".",
@@ -333,8 +333,8 @@
     "./foo/bar.c"
   };
   for (const auto &path: is_relative) {
-    FileSpec spec(path, FileSpec::Style::posix);
-    EXPECT_TRUE(spec.IsRelative());
+    SCOPED_TRACE(path);
+    EXPECT_TRUE(PosixSpec(path).IsRelative());
   }
 }
 
@@ -379,3 +379,44 @@
   EXPECT_FALSE(fs_windows.RemoveLastPathComponent());
   EXPECT_STREQ("C:", fs_windows.GetCString());
 }
+
+TEST(FileSpecTest, Equal) {
+  auto Eq = [](const char *a, const char *b, bool full) {
+    return FileSpec::Equal(PosixSpec(a), PosixSpec(b), full);
+  };
+  EXPECT_TRUE(Eq("/foo/bar", "/foo/bar", true));
+  EXPECT_TRUE(Eq("/foo/bar", "/foo/bar", false));
+
+  EXPECT_FALSE(Eq("/foo/bar", "/foo/baz", true));
+  EXPECT_FALSE(Eq("/foo/bar", "/foo/baz", false));
+
+  EXPECT_FALSE(Eq("/bar/foo", "/baz/foo", true));
+  EXPECT_FALSE(Eq("/bar/foo", "/baz/foo", false));
+
+  EXPECT_FALSE(Eq("/bar/foo", "foo", true));
+  EXPECT_TRUE(Eq("/bar/foo", "foo", false));
+
+  EXPECT_FALSE(Eq("foo", "/bar/foo", true));
+  EXPECT_TRUE(Eq("foo", "/bar/foo", false));
+}
+
+TEST(FileSpecTest, Match) {
+  auto Match = [](const char *pattern, const char *file) {
+    return FileSpec::Match(PosixSpec(pattern), PosixSpec(file));
+  };
+  EXPECT_TRUE(Match("/foo/bar", "/foo/bar"));
+  EXPECT_FALSE(Match("/foo/bar", "/oof/bar"));
+  EXPECT_FALSE(Match("/foo/bar", "/foo/baz"));
+  EXPECT_FALSE(Match("/foo/bar", "bar"));
+  EXPECT_FALSE(Match("/foo/bar", ""));
+
+  EXPECT_TRUE(Match("bar", "/foo/bar"));
+  EXPECT_FALSE(Match("bar", "/foo/baz"));
+  EXPECT_TRUE(Match("bar", "bar"));
+  EXPECT_FALSE(Match("bar", "baz"));
+  EXPECT_FALSE(Match("bar", ""));
+
+  EXPECT_TRUE(Match("", "/foo/bar"));
+  EXPECT_TRUE(Match("", ""));
+
+}
diff --git a/src/llvm-project/lldb/unittests/Utility/FlagsTest.cpp b/src/llvm-project/lldb/unittests/Utility/FlagsTest.cpp
index e26b620..6a46bcc 100644
--- a/src/llvm-project/lldb/unittests/Utility/FlagsTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/FlagsTest.cpp
@@ -30,19 +30,18 @@
   Flags f;
   f.Reset(0x3);
   EXPECT_EQ(0x3U, f.Get());
-  EXPECT_EQ(2U, f.SetCount());
 }
 
 TEST(Flags, Clear) {
   Flags f;
   f.Reset(0x3);
-  EXPECT_EQ(2U, f.SetCount());
+  EXPECT_EQ(0x3U, f.Get());
 
   f.Clear(0x5);
-  EXPECT_EQ(1U, f.SetCount());
+  EXPECT_EQ(0x2U, f.Get());
 
   f.Clear();
-  EXPECT_EQ(0U, f.SetCount());
+  EXPECT_EQ(0x0U, f.Get());
 }
 
 TEST(Flags, AllSet) {
@@ -162,37 +161,3 @@
   EXPECT_TRUE(f.IsClear(eFlag0));
   EXPECT_TRUE(f.IsClear(eFlag1));
 }
-
-TEST(Flags, ClearCount) {
-  Flags f;
-  EXPECT_EQ(32U, f.ClearCount());
-
-  f.Set(eFlag0);
-  EXPECT_EQ(31U, f.ClearCount());
-
-  f.Set(eFlag0);
-  EXPECT_EQ(31U, f.ClearCount());
-
-  f.Set(eFlag1);
-  EXPECT_EQ(30U, f.ClearCount());
-
-  f.Set(eAllFlags);
-  EXPECT_EQ(29U, f.ClearCount());
-}
-
-TEST(Flags, SetCount) {
-  Flags f;
-  EXPECT_EQ(0U, f.SetCount());
-
-  f.Set(eFlag0);
-  EXPECT_EQ(1U, f.SetCount());
-
-  f.Set(eFlag0);
-  EXPECT_EQ(1U, f.SetCount());
-
-  f.Set(eFlag1);
-  EXPECT_EQ(2U, f.SetCount());
-
-  f.Set(eAllFlags);
-  EXPECT_EQ(3U, f.SetCount());
-}
diff --git a/src/llvm-project/lldb/unittests/Utility/JSONTest.cpp b/src/llvm-project/lldb/unittests/Utility/JSONTest.cpp
deleted file mode 100644
index 0c23350..0000000
--- a/src/llvm-project/lldb/unittests/Utility/JSONTest.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-#include "gtest/gtest.h"
-
-#include "lldb/Utility/JSON.h"
-#include "lldb/Utility/StreamString.h"
-
-using namespace lldb_private;
-
-TEST(JSONTest, Dictionary) {
-  JSONObject o;
-  o.SetObject("key", std::make_shared<JSONString>("value"));
-
-  StreamString stream;
-  o.Write(stream);
-
-  ASSERT_EQ(stream.GetString(), R"({"key":"value"})");
-}
-
-TEST(JSONTest, Newlines) {
-  JSONObject o;
-  o.SetObject("key", std::make_shared<JSONString>("hello\nworld"));
-
-  StreamString stream;
-  o.Write(stream);
-
-  ASSERT_EQ(stream.GetString(), R"({"key":"hello\nworld"})");
-}
diff --git a/src/llvm-project/lldb/unittests/Utility/NameMatchesTest.cpp b/src/llvm-project/lldb/unittests/Utility/NameMatchesTest.cpp
index b007a1f..7b09018 100644
--- a/src/llvm-project/lldb/unittests/Utility/NameMatchesTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/NameMatchesTest.cpp
@@ -49,8 +49,8 @@
 TEST(NameMatchesTest, RegularExpression) {
   EXPECT_TRUE(NameMatches("foobar", NameMatch::RegularExpression, "foo"));
   EXPECT_TRUE(NameMatches("foobar", NameMatch::RegularExpression, "f[oa]o"));
-  EXPECT_TRUE(NameMatches("foo", NameMatch::RegularExpression, ""));
-  EXPECT_TRUE(NameMatches("", NameMatch::RegularExpression, ""));
+  EXPECT_FALSE(NameMatches("foo", NameMatch::RegularExpression, ""));
+  EXPECT_FALSE(NameMatches("", NameMatch::RegularExpression, ""));
   EXPECT_FALSE(NameMatches("foo", NameMatch::RegularExpression, "b"));
   EXPECT_FALSE(NameMatches("", NameMatch::RegularExpression, "b"));
   EXPECT_FALSE(NameMatches("^a", NameMatch::RegularExpression, "^a"));
diff --git a/src/llvm-project/lldb/unittests/Utility/ProcessInstanceInfoTest.cpp b/src/llvm-project/lldb/unittests/Utility/ProcessInstanceInfoTest.cpp
new file mode 100644
index 0000000..1d363ac
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/Utility/ProcessInstanceInfoTest.cpp
@@ -0,0 +1,110 @@
+//===-- ProcessInstanceInfoTest.cpp -----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Target/Process.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+
+namespace {
+/// A very simple resolver which fails for even ids and returns a simple string
+/// for odd ones.
+class DummyUserIDResolver : public UserIDResolver {
+protected:
+  llvm::Optional<std::string> DoGetUserName(id_t uid) override {
+    if (uid % 2)
+      return ("user" + llvm::Twine(uid)).str();
+    return llvm::None;
+  }
+
+  llvm::Optional<std::string> DoGetGroupName(id_t gid) override {
+    if (gid % 2)
+      return ("group" + llvm::Twine(gid)).str();
+    return llvm::None;
+  }
+};
+} // namespace
+
+TEST(ProcessInstanceInfo, Dump) {
+  ProcessInstanceInfo info("a.out", ArchSpec("x86_64-pc-linux"), 47);
+  info.SetUserID(1);
+  info.SetEffectiveUserID(2);
+  info.SetGroupID(3);
+  info.SetEffectiveGroupID(4);
+
+  DummyUserIDResolver resolver;
+  StreamString s;
+  info.Dump(s, resolver);
+  EXPECT_STREQ(R"(    pid = 47
+   name = a.out
+   file = a.out
+   arch = x86_64-pc-linux
+    uid = 1     (user1)
+    gid = 3     (group3)
+   euid = 2     ()
+   egid = 4     ()
+)",
+               s.GetData());
+}
+
+TEST(ProcessInstanceInfo, DumpTable) {
+  ProcessInstanceInfo info("a.out", ArchSpec("x86_64-pc-linux"), 47);
+  info.SetUserID(1);
+  info.SetEffectiveUserID(2);
+  info.SetGroupID(3);
+  info.SetEffectiveGroupID(4);
+
+  DummyUserIDResolver resolver;
+  StreamString s;
+
+  const bool show_args = false;
+  const bool verbose = true;
+  ProcessInstanceInfo::DumpTableHeader(s, show_args, verbose);
+  info.DumpAsTableRow(s, resolver, show_args, verbose);
+  EXPECT_STREQ(
+      R"(PID    PARENT USER       GROUP      EFF USER   EFF GROUP  TRIPLE                         ARGUMENTS
+====== ====== ========== ========== ========== ========== ============================== ============================
+47     0      user1      group3     2          4          x86_64-pc-linux                
+)",
+      s.GetData());
+}
+
+TEST(ProcessInstanceInfo, DumpTable_invalidUID) {
+  ProcessInstanceInfo info("a.out", ArchSpec("aarch64-unknown-linux-android"), 47);
+
+  DummyUserIDResolver resolver;
+  StreamString s;
+
+  const bool show_args = false;
+  const bool verbose = false;
+  ProcessInstanceInfo::DumpTableHeader(s, show_args, verbose);
+  info.DumpAsTableRow(s, resolver, show_args, verbose);
+  EXPECT_STREQ(
+      R"(PID    PARENT USER       TRIPLE                         NAME
+====== ====== ========== ============================== ============================
+47     0                 aarch64-unknown-linux-android  a.out
+)",
+      s.GetData());
+}
+
+TEST(ProcessInstanceInfoMatch, Name) {
+  ProcessInstanceInfo info_bar, info_empty;
+  info_bar.GetExecutableFile().SetFile("/foo/bar", FileSpec::Style::posix);
+
+  ProcessInstanceInfoMatch match;
+  match.SetNameMatchType(NameMatch::Equals);
+  match.GetProcessInfo().GetExecutableFile().SetFile("bar",
+                                                     FileSpec::Style::posix);
+
+  EXPECT_TRUE(match.Matches(info_bar));
+  EXPECT_FALSE(match.Matches(info_empty));
+
+  match.GetProcessInfo().GetExecutableFile() = FileSpec();
+  EXPECT_TRUE(match.Matches(info_bar));
+  EXPECT_TRUE(match.Matches(info_empty));
+}
diff --git a/src/llvm-project/lldb/unittests/Utility/RangeMapTest.cpp b/src/llvm-project/lldb/unittests/Utility/RangeMapTest.cpp
index ebb49cc..9f9b965 100644
--- a/src/llvm-project/lldb/unittests/Utility/RangeMapTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/RangeMapTest.cpp
@@ -52,3 +52,45 @@
   // TODO: This should probably return the range (0, 40) as well.
   EXPECT_THAT(Map.FindEntryThatContains(35), nullptr);
 }
+
+TEST(RangeDataVector, CustomSort) {
+  // First the default ascending order sorting of the data field.
+  auto Map = RangeDataVectorT();
+  Map.Append(EntryT(0, 10, 50));
+  Map.Append(EntryT(0, 10, 52));
+  Map.Append(EntryT(0, 10, 53));
+  Map.Append(EntryT(0, 10, 51));
+  Map.Sort();
+
+  EXPECT_THAT(Map.GetSize(), 4);
+  EXPECT_THAT(Map.GetEntryRef(0).data, 50);
+  EXPECT_THAT(Map.GetEntryRef(1).data, 51);
+  EXPECT_THAT(Map.GetEntryRef(2).data, 52);
+  EXPECT_THAT(Map.GetEntryRef(3).data, 53);
+
+  // And then a custom descending order sorting of the data field.
+  class CtorParam {};
+  class CustomSort {
+  public:
+    CustomSort(CtorParam) {}
+    bool operator()(const uint32_t a_data, const uint32_t b_data) {
+      return a_data > b_data;
+    }
+  };
+  using RangeDataVectorCustomSortT =
+      RangeDataVector<uint32_t, uint32_t, uint32_t, 0, CustomSort>;
+  using EntryT = RangeDataVectorT::Entry;
+
+  auto MapC = RangeDataVectorCustomSortT(CtorParam());
+  MapC.Append(EntryT(0, 10, 50));
+  MapC.Append(EntryT(0, 10, 52));
+  MapC.Append(EntryT(0, 10, 53));
+  MapC.Append(EntryT(0, 10, 51));
+  MapC.Sort();
+
+  EXPECT_THAT(MapC.GetSize(), 4);
+  EXPECT_THAT(MapC.GetEntryRef(0).data, 53);
+  EXPECT_THAT(MapC.GetEntryRef(1).data, 52);
+  EXPECT_THAT(MapC.GetEntryRef(2).data, 51);
+  EXPECT_THAT(MapC.GetEntryRef(3).data, 50);
+}
diff --git a/src/llvm-project/lldb/unittests/Utility/RegularExpressionTest.cpp b/src/llvm-project/lldb/unittests/Utility/RegularExpressionTest.cpp
new file mode 100644
index 0000000..4ac8f49
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/Utility/RegularExpressionTest.cpp
@@ -0,0 +1,65 @@
+//===-- RegularExpressionTest.cpp -----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "lldb/Utility/RegularExpression.h"
+#include "llvm/ADT/SmallVector.h"
+#include "gtest/gtest.h"
+
+using namespace lldb_private;
+using namespace llvm;
+
+TEST(RegularExpression, Valid) {
+  RegularExpression r1("^[0-9]+$");
+  cantFail(r1.GetError());
+  EXPECT_TRUE(r1.IsValid());
+  EXPECT_EQ("^[0-9]+$", r1.GetText());
+  EXPECT_TRUE(r1.Execute("916"));
+}
+
+TEST(RegularExpression, CopyAssignment) {
+  RegularExpression r1("^[0-9]+$");
+  RegularExpression r2 = r1;
+  cantFail(r2.GetError());
+  EXPECT_TRUE(r2.IsValid());
+  EXPECT_EQ("^[0-9]+$", r2.GetText());
+  EXPECT_TRUE(r2.Execute("916"));
+}
+
+TEST(RegularExpression, Empty) {
+  RegularExpression r1("");
+  Error err = r1.GetError();
+  EXPECT_TRUE(static_cast<bool>(err));
+  consumeError(std::move(err));
+  EXPECT_FALSE(r1.IsValid());
+  EXPECT_EQ("", r1.GetText());
+  EXPECT_FALSE(r1.Execute("916"));
+}
+
+TEST(RegularExpression, Invalid) {
+  RegularExpression r1("a[b-");
+  Error err = r1.GetError();
+  EXPECT_TRUE(static_cast<bool>(err));
+  consumeError(std::move(err));
+  EXPECT_FALSE(r1.IsValid());
+  EXPECT_EQ("a[b-", r1.GetText());
+  EXPECT_FALSE(r1.Execute("ab"));
+}
+
+TEST(RegularExpression, Match) {
+  RegularExpression r1("[0-9]+([a-f])?:([0-9]+)");
+  cantFail(r1.GetError());
+  EXPECT_TRUE(r1.IsValid());
+  EXPECT_EQ("[0-9]+([a-f])?:([0-9]+)", r1.GetText());
+
+  SmallVector<StringRef, 3> matches;
+  EXPECT_TRUE(r1.Execute("9a:513b", &matches));
+  EXPECT_EQ(3u, matches.size());
+  EXPECT_EQ("9a:513", matches[0].str());
+  EXPECT_EQ("a", matches[1].str());
+  EXPECT_EQ("513", matches[2].str());
+}
diff --git a/src/llvm-project/lldb/unittests/Utility/ReproducerTest.cpp b/src/llvm-project/lldb/unittests/Utility/ReproducerTest.cpp
index a89812a..e4ac030 100644
--- a/src/llvm-project/lldb/unittests/Utility/ReproducerTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/ReproducerTest.cpp
@@ -52,14 +52,19 @@
   EXPECT_EQ(nullptr, reproducer.GetLoader());
 
   // Enable capture and check that means we have a generator.
-  EXPECT_THAT_ERROR(reproducer.SetCapture(FileSpec("/bogus/path")),
-                    Succeeded());
+  EXPECT_THAT_ERROR(
+      reproducer.SetCapture(FileSpec("//bogus/path", FileSpec::Style::posix)),
+      Succeeded());
   EXPECT_NE(nullptr, reproducer.GetGenerator());
-  EXPECT_EQ(FileSpec("/bogus/path"), reproducer.GetGenerator()->GetRoot());
-  EXPECT_EQ(FileSpec("/bogus/path"), reproducer.GetReproducerPath());
+  EXPECT_EQ(FileSpec("//bogus/path", FileSpec::Style::posix),
+            reproducer.GetGenerator()->GetRoot());
+  EXPECT_EQ(FileSpec("//bogus/path", FileSpec::Style::posix),
+            reproducer.GetReproducerPath());
 
   // Ensure that we cannot enable replay.
-  EXPECT_THAT_ERROR(reproducer.SetReplay(FileSpec("/bogus/path")), Failed());
+  EXPECT_THAT_ERROR(
+      reproducer.SetReplay(FileSpec("//bogus/path", FileSpec::Style::posix)),
+      Failed());
   EXPECT_EQ(nullptr, reproducer.GetLoader());
 
   // Ensure we can disable the generator again.
@@ -76,36 +81,45 @@
   EXPECT_EQ(nullptr, reproducer.GetLoader());
 
   // Expected to fail because we can't load the index.
-  EXPECT_THAT_ERROR(reproducer.SetReplay(FileSpec("/bogus/path")), Failed());
+  EXPECT_THAT_ERROR(
+      reproducer.SetReplay(FileSpec("//bogus/path", FileSpec::Style::posix)),
+      Failed());
   // However the loader should still be set, which we check here.
   EXPECT_NE(nullptr, reproducer.GetLoader());
 
   // Make sure the bogus path is correctly set.
-  EXPECT_EQ(FileSpec("/bogus/path"), reproducer.GetLoader()->GetRoot());
-  EXPECT_EQ(FileSpec("/bogus/path"), reproducer.GetReproducerPath());
+  EXPECT_EQ(FileSpec("//bogus/path", FileSpec::Style::posix),
+            reproducer.GetLoader()->GetRoot());
+  EXPECT_EQ(FileSpec("//bogus/path", FileSpec::Style::posix),
+            reproducer.GetReproducerPath());
 
   // Ensure that we cannot enable replay.
-  EXPECT_THAT_ERROR(reproducer.SetCapture(FileSpec("/bogus/path")), Failed());
+  EXPECT_THAT_ERROR(
+      reproducer.SetCapture(FileSpec("//bogus/path", FileSpec::Style::posix)),
+      Failed());
   EXPECT_EQ(nullptr, reproducer.GetGenerator());
 }
 
 TEST(GeneratorTest, Create) {
   DummyReproducer reproducer;
 
-  EXPECT_THAT_ERROR(reproducer.SetCapture(FileSpec("/bogus/path")),
-                    Succeeded());
+  EXPECT_THAT_ERROR(
+      reproducer.SetCapture(FileSpec("//bogus/path", FileSpec::Style::posix)),
+      Succeeded());
   auto &generator = *reproducer.GetGenerator();
 
   auto *provider = generator.Create<DummyProvider>();
   EXPECT_NE(nullptr, provider);
-  EXPECT_EQ(FileSpec("/bogus/path"), provider->GetRoot());
+  EXPECT_EQ(FileSpec("//bogus/path", FileSpec::Style::posix),
+            provider->GetRoot());
 }
 
 TEST(GeneratorTest, Get) {
   DummyReproducer reproducer;
 
-  EXPECT_THAT_ERROR(reproducer.SetCapture(FileSpec("/bogus/path")),
-                    Succeeded());
+  EXPECT_THAT_ERROR(
+      reproducer.SetCapture(FileSpec("//bogus/path", FileSpec::Style::posix)),
+      Succeeded());
   auto &generator = *reproducer.GetGenerator();
 
   auto *provider = generator.Create<DummyProvider>();
@@ -118,12 +132,14 @@
 TEST(GeneratorTest, GetOrCreate) {
   DummyReproducer reproducer;
 
-  EXPECT_THAT_ERROR(reproducer.SetCapture(FileSpec("/bogus/path")),
-                    Succeeded());
+  EXPECT_THAT_ERROR(
+      reproducer.SetCapture(FileSpec("//bogus/path", FileSpec::Style::posix)),
+      Succeeded());
   auto &generator = *reproducer.GetGenerator();
 
   auto &provider = generator.GetOrCreate<DummyProvider>();
-  EXPECT_EQ(FileSpec("/bogus/path"), provider.GetRoot());
+  EXPECT_EQ(FileSpec("//bogus/path", FileSpec::Style::posix),
+            provider.GetRoot());
 
   auto &provider_alt = generator.GetOrCreate<DummyProvider>();
   EXPECT_EQ(&provider, &provider_alt);
diff --git a/src/llvm-project/lldb/unittests/Utility/ScalarTest.cpp b/src/llvm-project/lldb/unittests/Utility/ScalarTest.cpp
index d4a0849..3a955e9 100644
--- a/src/llvm-project/lldb/unittests/Utility/ScalarTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/ScalarTest.cpp
@@ -16,7 +16,9 @@
 #include "llvm/Testing/Support/Error.h"
 
 using namespace lldb_private;
-using namespace llvm;
+using llvm::APInt;
+using llvm::Failed;
+using llvm::Succeeded;
 
 template <typename T>
 bool checkInequality(T c1, T c2) {
@@ -272,7 +274,7 @@
   }
 
   Scalar B(APInt(64, 42));
-  EXPECT_EQ(B.GetType(), Scalar::e_slonglong);
+  EXPECT_EQ(B.GetType(), Scalar::GetBestTypeForBitSize(64, true));
   Scalar C(APInt(128, 96));
   EXPECT_EQ(C.GetType(), Scalar::e_sint128);
   Scalar D(APInt(256, 156));
diff --git a/src/llvm-project/lldb/unittests/Utility/StreamTest.cpp b/src/llvm-project/lldb/unittests/Utility/StreamTest.cpp
index 2e2bcb3..c740c27 100644
--- a/src/llvm-project/lldb/unittests/Utility/StreamTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/StreamTest.cpp
@@ -36,6 +36,94 @@
 };
 }
 
+TEST_F(StreamTest, AddressPrefix) {
+  DumpAddress(s.AsRawOstream(), 0x1, 1, "foo");
+  EXPECT_EQ("foo0x01", TakeValue());
+}
+
+TEST_F(StreamTest, AddressEmptyPrefix) {
+  DumpAddress(s.AsRawOstream(), 0x1, 1, nullptr);
+  EXPECT_EQ("0x01", TakeValue());
+  DumpAddress(s.AsRawOstream(), 0x1, 1, "");
+  EXPECT_EQ("0x01", TakeValue());
+}
+
+TEST_F(StreamTest, AddressSuffix) {
+  DumpAddress(s.AsRawOstream(), 0x1, 1, nullptr, "foo");
+  EXPECT_EQ("0x01foo", TakeValue());
+}
+
+TEST_F(StreamTest, AddressNoSuffix) {
+  DumpAddress(s.AsRawOstream(), 0x1, 1, nullptr, nullptr);
+  EXPECT_EQ("0x01", TakeValue());
+  DumpAddress(s.AsRawOstream(), 0x1, 1, nullptr, "");
+  EXPECT_EQ("0x01", TakeValue());
+}
+
+TEST_F(StreamTest, AddressPrefixAndSuffix) {
+  DumpAddress(s.AsRawOstream(), 0x1, 1, "foo", "bar");
+  EXPECT_EQ("foo0x01bar", TakeValue());
+}
+
+TEST_F(StreamTest, AddressSize) {
+  DumpAddress(s.AsRawOstream(), 0x0, 0);
+  EXPECT_EQ("0x0", TakeValue());
+  DumpAddress(s.AsRawOstream(), 0x1, 0);
+  EXPECT_EQ("0x1", TakeValue());
+
+  DumpAddress(s.AsRawOstream(), 0x1, 1);
+  EXPECT_EQ("0x01", TakeValue());
+  DumpAddress(s.AsRawOstream(), 0xf1, 1);
+  EXPECT_EQ("0xf1", TakeValue());
+  DumpAddress(s.AsRawOstream(), 0xff, 1);
+  EXPECT_EQ("0xff", TakeValue());
+  DumpAddress(s.AsRawOstream(), 0x100, 1);
+  EXPECT_EQ("0x100", TakeValue());
+
+  DumpAddress(s.AsRawOstream(), 0xf00, 4);
+  EXPECT_EQ("0x00000f00", TakeValue());
+  DumpAddress(s.AsRawOstream(), 0x100, 8);
+  EXPECT_EQ("0x0000000000000100", TakeValue());
+}
+
+TEST_F(StreamTest, AddressRange) {
+  DumpAddressRange(s.AsRawOstream(), 0x100, 0x101, 2);
+  EXPECT_EQ("[0x0100-0x0101)", TakeValue());
+}
+
+TEST_F(StreamTest, AddressRangeEmptyRange) {
+  DumpAddressRange(s.AsRawOstream(), 0x100, 0x100, 2);
+  EXPECT_EQ("[0x0100-0x0100)", TakeValue());
+  DumpAddressRange(s.AsRawOstream(), 0x0, 0x0, 2);
+  EXPECT_EQ("[0x0000-0x0000)", TakeValue());
+}
+
+TEST_F(StreamTest, AddressRangeInvalidRange) {
+  DumpAddressRange(s.AsRawOstream(), 0x100, 0x0FF, 2);
+  EXPECT_EQ("[0x0100-0x00ff)", TakeValue());
+  DumpAddressRange(s.AsRawOstream(), 0x100, 0x0, 2);
+  EXPECT_EQ("[0x0100-0x0000)", TakeValue());
+}
+
+TEST_F(StreamTest, AddressRangeSize) {
+  DumpAddressRange(s.AsRawOstream(), 0x100, 0x101, 0);
+  EXPECT_EQ("[0x100-0x101)", TakeValue());
+  DumpAddressRange(s.AsRawOstream(), 0x100, 0x101, 2);
+  EXPECT_EQ("[0x0100-0x0101)", TakeValue());
+  DumpAddressRange(s.AsRawOstream(), 0x100, 0x101, 4);
+  EXPECT_EQ("[0x00000100-0x00000101)", TakeValue());
+
+  DumpAddressRange(s.AsRawOstream(), 0x100, 0x101, 4);
+  EXPECT_EQ("[0x00000100-0x00000101)", TakeValue());
+  DumpAddressRange(s.AsRawOstream(), 0x1, 0x101, 4);
+  EXPECT_EQ("[0x00000001-0x00000101)", TakeValue());
+  DumpAddressRange(s.AsRawOstream(), 0x101, 0x1, 4);
+  EXPECT_EQ("[0x00000101-0x00000001)", TakeValue());
+
+  DumpAddressRange(s.AsRawOstream(), 0x1, 0x101, 1);
+  EXPECT_EQ("[0x01-0x101)", TakeValue());
+}
+
 TEST_F(StreamTest, ChangingByteOrder) {
   s.SetByteOrder(lldb::eByteOrderPDP);
   EXPECT_EQ(lldb::eByteOrderPDP, s.GetByteOrder());
@@ -295,24 +383,6 @@
   EXPECT_EQ("cstring\nllvm::StringRef\n", TakeValue());
 }
 
-TEST_F(StreamTest, ShiftOperatorInts) {
-  s << std::numeric_limits<int8_t>::max() << " ";
-  s << std::numeric_limits<int16_t>::max() << " ";
-  s << std::numeric_limits<int32_t>::max() << " ";
-  s << std::numeric_limits<int64_t>::max();
-  EXPECT_EQ(40U, s.GetWrittenBytes());
-  EXPECT_EQ("127 32767 2147483647 9223372036854775807", TakeValue());
-}
-
-TEST_F(StreamTest, ShiftOperatorUInts) {
-  s << std::numeric_limits<uint8_t>::max() << " ";
-  s << std::numeric_limits<uint16_t>::max() << " ";
-  s << std::numeric_limits<uint32_t>::max() << " ";
-  s << std::numeric_limits<uint64_t>::max();
-  EXPECT_EQ(33U, s.GetWrittenBytes());
-  EXPECT_EQ("ff ffff ffffffff ffffffffffffffff", TakeValue());
-}
-
 TEST_F(StreamTest, ShiftOperatorPtr) {
   // This test is a bit tricky because pretty much everything related to
   // pointer printing seems to lead to UB or IB. So let's make the most basic
diff --git a/src/llvm-project/lldb/unittests/Utility/StringExtractorTest.cpp b/src/llvm-project/lldb/unittests/Utility/StringExtractorTest.cpp
index b86e466..1908cf3 100644
--- a/src/llvm-project/lldb/unittests/Utility/StringExtractorTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/StringExtractorTest.cpp
@@ -5,34 +5,34 @@
 
 namespace {
 class StringExtractorTest : public ::testing::Test {};
-}
+} // namespace
 
 TEST_F(StringExtractorTest, InitEmpty) {
-  const char kEmptyString[] = "";
+  llvm::StringRef kEmptyString = "";
   StringExtractor ex(kEmptyString);
 
   ASSERT_EQ(true, ex.IsGood());
   ASSERT_EQ(0u, ex.GetFilePos());
-  ASSERT_STREQ(kEmptyString, ex.GetStringRef().c_str());
+  ASSERT_EQ(kEmptyString, ex.GetStringRef());
   ASSERT_EQ(true, ex.Empty());
   ASSERT_EQ(0u, ex.GetBytesLeft());
   ASSERT_EQ(nullptr, ex.Peek());
 }
 
 TEST_F(StringExtractorTest, InitMisc) {
-  const char kInitMiscString[] = "Hello, StringExtractor!";
+  llvm::StringRef kInitMiscString = "Hello, StringExtractor!";
   StringExtractor ex(kInitMiscString);
 
   ASSERT_EQ(true, ex.IsGood());
   ASSERT_EQ(0u, ex.GetFilePos());
-  ASSERT_STREQ(kInitMiscString, ex.GetStringRef().c_str());
+  ASSERT_EQ(kInitMiscString, ex.GetStringRef());
   ASSERT_EQ(false, ex.Empty());
-  ASSERT_EQ(sizeof(kInitMiscString) - 1, ex.GetBytesLeft());
+  ASSERT_EQ(kInitMiscString.size(), ex.GetBytesLeft());
   ASSERT_EQ(kInitMiscString[0], *ex.Peek());
 }
 
 TEST_F(StringExtractorTest, DecodeHexU8_Underflow) {
-  const char kEmptyString[] = "";
+  llvm::StringRef kEmptyString = "";
   StringExtractor ex(kEmptyString);
 
   ASSERT_EQ(-1, ex.DecodeHexU8());
@@ -44,8 +44,7 @@
 }
 
 TEST_F(StringExtractorTest, DecodeHexU8_Underflow2) {
-  const char kEmptyString[] = "1";
-  StringExtractor ex(kEmptyString);
+  StringExtractor ex("1");
 
   ASSERT_EQ(-1, ex.DecodeHexU8());
   ASSERT_EQ(true, ex.IsGood());
@@ -55,7 +54,7 @@
 }
 
 TEST_F(StringExtractorTest, DecodeHexU8_InvalidHex) {
-  const char kInvalidHex[] = "xa";
+  llvm::StringRef kInvalidHex = "xa";
   StringExtractor ex(kInvalidHex);
 
   ASSERT_EQ(-1, ex.DecodeHexU8());
@@ -66,7 +65,7 @@
 }
 
 TEST_F(StringExtractorTest, DecodeHexU8_InvalidHex2) {
-  const char kInvalidHex[] = "ax";
+  llvm::StringRef kInvalidHex = "ax";
   StringExtractor ex(kInvalidHex);
 
   ASSERT_EQ(-1, ex.DecodeHexU8());
@@ -77,7 +76,7 @@
 }
 
 TEST_F(StringExtractorTest, DecodeHexU8_Exact) {
-  const char kValidHexPair[] = "12";
+  llvm::StringRef kValidHexPair = "12";
   StringExtractor ex(kValidHexPair);
 
   ASSERT_EQ(0x12, ex.DecodeHexU8());
@@ -88,7 +87,7 @@
 }
 
 TEST_F(StringExtractorTest, DecodeHexU8_Extra) {
-  const char kValidHexPair[] = "1234";
+  llvm::StringRef kValidHexPair = "1234";
   StringExtractor ex(kValidHexPair);
 
   ASSERT_EQ(0x12, ex.DecodeHexU8());
@@ -99,7 +98,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_Underflow) {
-  const char kEmptyString[] = "";
+  llvm::StringRef kEmptyString = "";
   StringExtractor ex(kEmptyString);
 
   ASSERT_EQ(0xab, ex.GetHexU8(0xab));
@@ -111,7 +110,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_Underflow2) {
-  const char kOneNibble[] = "1";
+  llvm::StringRef kOneNibble = "1";
   StringExtractor ex(kOneNibble);
 
   ASSERT_EQ(0xbc, ex.GetHexU8(0xbc));
@@ -122,7 +121,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_InvalidHex) {
-  const char kInvalidHex[] = "xx";
+  llvm::StringRef kInvalidHex = "xx";
   StringExtractor ex(kInvalidHex);
 
   ASSERT_EQ(0xcd, ex.GetHexU8(0xcd));
@@ -133,7 +132,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_Exact) {
-  const char kValidHexPair[] = "12";
+  llvm::StringRef kValidHexPair = "12";
   StringExtractor ex(kValidHexPair);
 
   ASSERT_EQ(0x12, ex.GetHexU8(0x12));
@@ -144,7 +143,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_Extra) {
-  const char kValidHexPair[] = "1234";
+  llvm::StringRef kValidHexPair = "1234";
   StringExtractor ex(kValidHexPair);
 
   ASSERT_EQ(0x12, ex.GetHexU8(0x12));
@@ -155,7 +154,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_Underflow_NoEof) {
-  const char kEmptyString[] = "";
+  llvm::StringRef kEmptyString = "";
   StringExtractor ex(kEmptyString);
   const bool kSetEofOnFail = false;
 
@@ -169,7 +168,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_Underflow2_NoEof) {
-  const char kOneNibble[] = "1";
+  llvm::StringRef kOneNibble = "1";
   StringExtractor ex(kOneNibble);
   const bool kSetEofOnFail = false;
 
@@ -181,7 +180,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_InvalidHex_NoEof) {
-  const char kInvalidHex[] = "xx";
+  llvm::StringRef kInvalidHex = "xx";
   StringExtractor ex(kInvalidHex);
   const bool kSetEofOnFail = false;
 
@@ -193,7 +192,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_Exact_NoEof) {
-  const char kValidHexPair[] = "12";
+  llvm::StringRef kValidHexPair = "12";
   StringExtractor ex(kValidHexPair);
   const bool kSetEofOnFail = false;
 
@@ -205,7 +204,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexU8_Extra_NoEof) {
-  const char kValidHexPair[] = "1234";
+  llvm::StringRef kValidHexPair = "1234";
   StringExtractor ex(kValidHexPair);
   const bool kSetEofOnFail = false;
 
@@ -217,7 +216,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytes) {
-  const char kHexEncodedBytes[] = "abcdef0123456789xyzw";
+  llvm::StringRef kHexEncodedBytes = "abcdef0123456789xyzw";
   const size_t kValidHexPairs = 8;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -240,7 +239,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytes_FullString) {
-  const char kHexEncodedBytes[] = "abcdef0123456789";
+  llvm::StringRef kHexEncodedBytes = "abcdef0123456789";
   const size_t kValidHexPairs = 8;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -257,7 +256,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytes_OddPair) {
-  const char kHexEncodedBytes[] = "abcdef012345678w";
+  llvm::StringRef kHexEncodedBytes = "abcdef012345678w";
   const size_t kValidHexPairs = 7;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -276,7 +275,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytes_OddPair2) {
-  const char kHexEncodedBytes[] = "abcdef012345678";
+  llvm::StringRef kHexEncodedBytes = "abcdef012345678";
   const size_t kValidHexPairs = 7;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -294,7 +293,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytes_Underflow) {
-  const char kHexEncodedBytes[] = "abcdef0123456789xyzw";
+  llvm::StringRef kHexEncodedBytes = "abcdef0123456789xyzw";
   const size_t kValidHexPairs = 8;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -322,7 +321,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytes_Partial) {
-  const char kHexEncodedBytes[] = "abcdef0123456789xyzw";
+  llvm::StringRef kHexEncodedBytes = "abcdef0123456789xyzw";
   const size_t kReadBytes = 4;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -353,7 +352,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytesAvail) {
-  const char kHexEncodedBytes[] = "abcdef0123456789xyzw";
+  llvm::StringRef kHexEncodedBytes = "abcdef0123456789xyzw";
   const size_t kValidHexPairs = 8;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -376,7 +375,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytesAvail_FullString) {
-  const char kHexEncodedBytes[] = "abcdef0123456789";
+  llvm::StringRef kHexEncodedBytes = "abcdef0123456789";
   const size_t kValidHexPairs = 8;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -393,7 +392,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytesAvail_OddPair) {
-  const char kHexEncodedBytes[] = "abcdef012345678w";
+  llvm::StringRef kHexEncodedBytes = "abcdef012345678w";
   const size_t kValidHexPairs = 7;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -409,7 +408,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytesAvail_OddPair2) {
-  const char kHexEncodedBytes[] = "abcdef012345678";
+  llvm::StringRef kHexEncodedBytes = "abcdef012345678";
   const size_t kValidHexPairs = 7;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -425,7 +424,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytesAvail_Underflow) {
-  const char kHexEncodedBytes[] = "abcdef0123456789xyzw";
+  llvm::StringRef kHexEncodedBytes = "abcdef0123456789xyzw";
   const size_t kValidHexPairs = 8;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -454,7 +453,7 @@
 }
 
 TEST_F(StringExtractorTest, GetHexBytesAvail_Partial) {
-  const char kHexEncodedBytes[] = "abcdef0123456789xyzw";
+  llvm::StringRef kHexEncodedBytes = "abcdef0123456789xyzw";
   const size_t kReadBytes = 4;
   StringExtractor ex(kHexEncodedBytes);
 
@@ -484,7 +483,7 @@
 }
 
 TEST_F(StringExtractorTest, GetNameColonValueSuccess) {
-  const char kNameColonPairs[] = "key1:value1;key2:value2;";
+  llvm::StringRef kNameColonPairs = "key1:value1;key2:value2;";
   StringExtractor ex(kNameColonPairs);
 
   llvm::StringRef name;
@@ -499,7 +498,7 @@
 }
 
 TEST_F(StringExtractorTest, GetNameColonValueContainsColon) {
-  const char kNameColonPairs[] = "key1:value1:value2;key2:value3;";
+  llvm::StringRef kNameColonPairs = "key1:value1:value2;key2:value3;";
   StringExtractor ex(kNameColonPairs);
 
   llvm::StringRef name;
@@ -514,7 +513,7 @@
 }
 
 TEST_F(StringExtractorTest, GetNameColonValueNoSemicolon) {
-  const char kNameColonPairs[] = "key1:value1";
+  llvm::StringRef kNameColonPairs = "key1:value1";
   StringExtractor ex(kNameColonPairs);
 
   llvm::StringRef name;
@@ -524,7 +523,7 @@
 }
 
 TEST_F(StringExtractorTest, GetNameColonValueNoColon) {
-  const char kNameColonPairs[] = "key1value1;";
+  llvm::StringRef kNameColonPairs = "key1value1;";
   StringExtractor ex(kNameColonPairs);
 
   llvm::StringRef name;
diff --git a/src/llvm-project/lldb/unittests/Utility/StringLexerTest.cpp b/src/llvm-project/lldb/unittests/Utility/StringLexerTest.cpp
index b68dc5e..1d8c918 100644
--- a/src/llvm-project/lldb/unittests/Utility/StringLexerTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/StringLexerTest.cpp
@@ -9,7 +9,7 @@
 #include "lldb/Utility/StringLexer.h"
 #include "gtest/gtest.h"
 
-using namespace lldb_utility;
+using namespace lldb_private;
 
 TEST(StringLexerTest, GetUnlexed) {
   StringLexer l("foo");
diff --git a/src/llvm-project/lldb/unittests/Utility/StringListTest.cpp b/src/llvm-project/lldb/unittests/Utility/StringListTest.cpp
index 7d62631..926f75f 100644
--- a/src/llvm-project/lldb/unittests/Utility/StringListTest.cpp
+++ b/src/llvm-project/lldb/unittests/Utility/StringListTest.cpp
@@ -8,6 +8,7 @@
 
 #include "lldb/Utility/StringList.h"
 #include "lldb/Utility/StreamString.h"
+#include "gmock/gmock.h"
 #include "gtest/gtest.h"
 
 using namespace lldb_private;
@@ -214,8 +215,7 @@
 
 TEST(StringListTest, LongestCommonPrefixEmpty) {
   StringList s;
-  std::string prefix = "this should be cleared";
-  s.LongestCommonPrefix(prefix);
+  std::string prefix = s.LongestCommonPrefix();
   EXPECT_EQ("", prefix);
 }
 
@@ -226,8 +226,7 @@
   s.AppendString("foo");
   s.AppendString("foozar");
 
-  std::string prefix = "this should be cleared";
-  s.LongestCommonPrefix(prefix);
+  std::string prefix = s.LongestCommonPrefix();
   EXPECT_EQ("foo", prefix);
 }
 
@@ -235,8 +234,7 @@
   StringList s;
   s.AppendString("foo");
 
-  std::string prefix = "this should be cleared";
-  s.LongestCommonPrefix(prefix);
+  std::string prefix = s.LongestCommonPrefix();
   EXPECT_EQ("foo", prefix);
 }
 
@@ -245,8 +243,7 @@
   s.AppendString("foo");
   s.AppendString("foo");
 
-  std::string prefix = "this should be cleared";
-  s.LongestCommonPrefix(prefix);
+  std::string prefix = s.LongestCommonPrefix();
   EXPECT_EQ("foo", prefix);
 }
 
@@ -257,8 +254,7 @@
   s.AppendString("2foo");
   s.AppendString("3foozar");
 
-  std::string prefix = "this should be cleared";
-  s.LongestCommonPrefix(prefix);
+  std::string prefix = s.LongestCommonPrefix();
   EXPECT_EQ("", prefix);
 }
 
@@ -509,3 +505,20 @@
   StringList s;
   EXPECT_EQ(0U, s.GetMaxStringLength());
 }
+
+TEST(StringListTest, ForRangeEmpty) {
+  StringList s;
+  for (const std::string &e : s)
+    FAIL() << "Shouldn't have hit an element in for range" << e;
+}
+
+TEST(StringListTest, ForRange) {
+  StringList s;
+  s.AppendString("a");
+  s.AppendString("b");
+  s.AppendString("c");
+  std::vector<std::string> recorded;
+  for (const std::string &e : s)
+    recorded.push_back(e);
+  EXPECT_THAT(recorded, testing::ElementsAre("a", "b", "c"));
+}
diff --git a/src/llvm-project/lldb/unittests/Utility/SubsystemRAIITest.cpp b/src/llvm-project/lldb/unittests/Utility/SubsystemRAIITest.cpp
new file mode 100644
index 0000000..38cb247
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/Utility/SubsystemRAIITest.cpp
@@ -0,0 +1,99 @@
+//===-- SubsystemRAIITest.cpp -----------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "gtest/gtest-spi.h"
+#include "gtest/gtest.h"
+
+#include "TestingSupport/SubsystemRAII.h"
+
+using namespace lldb_private;
+
+namespace {
+
+enum class SystemState {
+  /// Start state of the subsystem.
+  Start,
+  /// Initialize has been called but Terminate hasn't been called yet.
+  Initialized,
+  /// Terminate has been called.
+  Terminated
+};
+
+struct TestSubsystem {
+  static SystemState state;
+  static void Initialize() {
+    assert(state == SystemState::Start);
+    state = SystemState::Initialized;
+  }
+  static void Terminate() {
+    assert(state == SystemState::Initialized);
+    state = SystemState::Terminated;
+  }
+};
+} // namespace
+
+SystemState TestSubsystem::state = SystemState::Start;
+
+TEST(SubsystemRAIITest, NormalSubsystem) {
+  // Tests that SubsystemRAII handles Initialize functions that return void.
+  EXPECT_EQ(SystemState::Start, TestSubsystem::state);
+  {
+    SubsystemRAII<TestSubsystem> subsystem;
+    EXPECT_EQ(SystemState::Initialized, TestSubsystem::state);
+  }
+  EXPECT_EQ(SystemState::Terminated, TestSubsystem::state);
+}
+
+static const char *SubsystemErrorString = "Initialize failed";
+
+namespace {
+struct TestSubsystemWithError {
+  static SystemState state;
+  static bool will_fail;
+  static llvm::Error Initialize() {
+    assert(state == SystemState::Start);
+    state = SystemState::Initialized;
+    if (will_fail)
+      return llvm::make_error<llvm::StringError>(
+          SubsystemErrorString, llvm::inconvertibleErrorCode());
+    return llvm::Error::success();
+  }
+  static void Terminate() {
+    assert(state == SystemState::Initialized);
+    state = SystemState::Terminated;
+  }
+  /// Reset the subsystem to the default state for testing.
+  static void Reset() { state = SystemState::Start; }
+};
+} // namespace
+
+SystemState TestSubsystemWithError::state = SystemState::Start;
+bool TestSubsystemWithError::will_fail = false;
+
+TEST(SubsystemRAIITest, SubsystemWithErrorSuccess) {
+  // Tests that SubsystemRAII handles llvm::success() returned from
+  // Initialize.
+  TestSubsystemWithError::Reset();
+  EXPECT_EQ(SystemState::Start, TestSubsystemWithError::state);
+  {
+    TestSubsystemWithError::will_fail = false;
+    SubsystemRAII<TestSubsystemWithError> subsystem;
+    EXPECT_EQ(SystemState::Initialized, TestSubsystemWithError::state);
+  }
+  EXPECT_EQ(SystemState::Terminated, TestSubsystemWithError::state);
+}
+
+TEST(SubsystemRAIITest, SubsystemWithErrorFailure) {
+  // Tests that SubsystemRAII handles any errors returned from
+  // Initialize.
+  TestSubsystemWithError::Reset();
+  EXPECT_EQ(SystemState::Start, TestSubsystemWithError::state);
+  TestSubsystemWithError::will_fail = true;
+  EXPECT_FATAL_FAILURE(SubsystemRAII<TestSubsystemWithError> subsystem,
+                       SubsystemErrorString);
+}
diff --git a/src/llvm-project/lldb/unittests/debugserver/CMakeLists.txt b/src/llvm-project/lldb/unittests/debugserver/CMakeLists.txt
index adb8fb0..a72b805 100644
--- a/src/llvm-project/lldb/unittests/debugserver/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/debugserver/CMakeLists.txt
@@ -8,6 +8,7 @@
                     ${LLDB_SOURCE_DIR}/tools/debugserver/source/MacOSX)
 
 add_lldb_unittest(debugserverTests
+  JSONTest.cpp
   RNBSocketTest.cpp
   debugserver_LogCallback.cpp
 
@@ -24,8 +25,9 @@
       WITH_FBS
       WITH_BKS
       )
-  
+
   add_lldb_unittest(debugserverNonUITests
+    JSONTest.cpp
     RNBSocketTest.cpp
     debugserver_LogCallback.cpp
 
diff --git a/src/llvm-project/lldb/unittests/debugserver/JSONTest.cpp b/src/llvm-project/lldb/unittests/debugserver/JSONTest.cpp
new file mode 100644
index 0000000..54f6f96
--- /dev/null
+++ b/src/llvm-project/lldb/unittests/debugserver/JSONTest.cpp
@@ -0,0 +1,89 @@
+//===-- JSONTest.cpp --------------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
+
+#include "JSON.h"
+
+template <typename T>
+void TestJSON(JSONValue *json_val, const std::function<void(T &)> &test_func) {
+  ASSERT_THAT(json_val, testing::NotNull());
+  ASSERT_TRUE(T::classof(json_val));
+  test_func(static_cast<T &>(*json_val));
+}
+
+JSONValue::SP ParseJSON(const char *json_string) {
+  return JSONParser(json_string).ParseJSONValue();
+}
+
+template <typename T>
+void ParseAndTestJSON(
+    const char *json_string,
+    const std::function<void(T &)> &test_func = [](T &) {}) {
+  auto json_val = ParseJSON(json_string);
+  TestJSON<T>(json_val.get(), test_func);
+}
+
+TEST(JSON, Parse) {
+  ParseAndTestJSON<JSONString>("\"foo\"", [](JSONString &string_val) {
+    EXPECT_EQ(string_val.GetData(), "foo");
+  });
+  EXPECT_THAT(ParseJSON("\"foo"), testing::IsNull());
+  ParseAndTestJSON<JSONNumber>("3", [](JSONNumber &number_val) {
+    EXPECT_EQ(number_val.GetAsSigned(), 3);
+    EXPECT_EQ(number_val.GetAsUnsigned(), 3u);
+    EXPECT_EQ(number_val.GetAsDouble(), 3.0);
+  });
+  ParseAndTestJSON<JSONNumber>("-5", [](JSONNumber &number_val) {
+    EXPECT_EQ(number_val.GetAsSigned(), -5);
+    EXPECT_EQ(number_val.GetAsDouble(), -5.0);
+  });
+  ParseAndTestJSON<JSONNumber>("-6.4", [](JSONNumber &number_val) {
+    EXPECT_EQ(number_val.GetAsSigned(), -6);
+    EXPECT_EQ(number_val.GetAsDouble(), -6.4);
+  });
+  EXPECT_THAT(ParseJSON("-1.2.3"), testing::IsNull());
+  ParseAndTestJSON<JSONTrue>("true");
+  ParseAndTestJSON<JSONFalse>("false");
+  ParseAndTestJSON<JSONNull>("null");
+  ParseAndTestJSON<JSONObject>(
+      "{ \"key1\": 4, \"key2\": \"foobar\" }", [](JSONObject &obj_val) {
+        TestJSON<JSONNumber>(obj_val.GetObject("key1").get(),
+                             [](JSONNumber &number_val) {
+                               EXPECT_EQ(number_val.GetAsSigned(), 4);
+                               EXPECT_EQ(number_val.GetAsUnsigned(), 4u);
+                               EXPECT_EQ(number_val.GetAsDouble(), 4.0);
+                             });
+        TestJSON<JSONString>(obj_val.GetObject("key2").get(),
+                             [](JSONString &string_val) {
+                               EXPECT_EQ(string_val.GetData(), "foobar");
+                             });
+      });
+  ParseAndTestJSON<JSONArray>("[1, \"bar\", 3.14]", [](JSONArray &array_val) {
+    EXPECT_EQ(array_val.GetNumElements(), 3u);
+    TestJSON<JSONNumber>(array_val.GetObject(0).get(),
+                         [](JSONNumber &number_val) {
+                           EXPECT_EQ(number_val.GetAsSigned(), 1);
+                           EXPECT_EQ(number_val.GetAsUnsigned(), 1u);
+                           EXPECT_EQ(number_val.GetAsDouble(), 1.0);
+                         });
+    TestJSON<JSONString>(
+        array_val.GetObject(1).get(),
+        [](JSONString &string_val) { EXPECT_EQ(string_val.GetData(), "bar"); });
+    TestJSON<JSONNumber>(array_val.GetObject(2).get(),
+                         [](JSONNumber &number_val) {
+                           EXPECT_EQ(number_val.GetAsSigned(), 3);
+                           EXPECT_EQ(number_val.GetAsUnsigned(), 3u);
+                           EXPECT_EQ(number_val.GetAsDouble(), 3.14);
+                         });
+  });
+  ParseAndTestJSON<JSONArray>("[]", [](JSONArray &array_val) {
+    EXPECT_EQ(array_val.GetNumElements(), 0u);
+  });
+}
diff --git a/src/llvm-project/lldb/unittests/tools/CMakeLists.txt b/src/llvm-project/lldb/unittests/tools/CMakeLists.txt
index 4c65786..055fc6e 100644
--- a/src/llvm-project/lldb/unittests/tools/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/tools/CMakeLists.txt
@@ -1,6 +1,3 @@
-if(LLDB_TOOL_LLDB_MI_BUILD)
-  add_subdirectory(lldb-mi)
-endif()
 if(LLDB_TOOL_LLDB_SERVER_BUILD)
   add_subdirectory(lldb-server)
 endif()
diff --git a/src/llvm-project/lldb/unittests/tools/lldb-mi/CMakeLists.txt b/src/llvm-project/lldb/unittests/tools/lldb-mi/CMakeLists.txt
deleted file mode 100644
index 1d21162..0000000
--- a/src/llvm-project/lldb/unittests/tools/lldb-mi/CMakeLists.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-include_directories(${LLDB_SOURCE_DIR}/tools/lldb-mi)
-add_subdirectory(utils)
diff --git a/src/llvm-project/lldb/unittests/tools/lldb-mi/utils/CMakeLists.txt b/src/llvm-project/lldb/unittests/tools/lldb-mi/utils/CMakeLists.txt
deleted file mode 100644
index 7615dd7..0000000
--- a/src/llvm-project/lldb/unittests/tools/lldb-mi/utils/CMakeLists.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-add_library(lldb-mi-utils OBJECT
-  ${LLDB_SOURCE_DIR}/tools/lldb-mi/MIUtilString.cpp
-  )
-
-add_lldb_unittest(LLDBMiUtilTests
-  $<TARGET_OBJECTS:lldb-mi-utils>
-  StringTest.cpp
-
-  LINK_COMPONENTS
-    Support
-  )
-
-set_target_properties(lldb-mi-utils PROPERTIES FOLDER "lldb libraries")
diff --git a/src/llvm-project/lldb/unittests/tools/lldb-mi/utils/StringTest.cpp b/src/llvm-project/lldb/unittests/tools/lldb-mi/utils/StringTest.cpp
deleted file mode 100644
index 9f76f46..0000000
--- a/src/llvm-project/lldb/unittests/tools/lldb-mi/utils/StringTest.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-//===-- StringTest.cpp ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "MIUtilString.h"
-#include "gtest/gtest.h"
-
-TEST(StringTest, ConstructFromNullptr) {
-  auto str = CMIUtilString(nullptr);
-  EXPECT_TRUE(str.empty());
-  EXPECT_NE(nullptr, str.c_str());
-  EXPECT_EQ(CMIUtilString(""), str);
-}
-
-TEST(StringTest, AssignNullptr) {
-  CMIUtilString str;
-  str = nullptr;
-  EXPECT_TRUE(str.empty());
-  EXPECT_NE(nullptr, str.c_str());
-  EXPECT_EQ(CMIUtilString(""), str);
-}
-
-TEST(StringTest, IsAllValidAlphaAndNumeric) {
-  EXPECT_TRUE(CMIUtilString::IsAllValidAlphaAndNumeric("123abc"));
-  EXPECT_FALSE(CMIUtilString::IsAllValidAlphaAndNumeric(""));
-  EXPECT_FALSE(CMIUtilString::IsAllValidAlphaAndNumeric(nullptr));
-}
-
diff --git a/src/llvm-project/lldb/unittests/tools/lldb-server/CMakeLists.txt b/src/llvm-project/lldb/unittests/tools/lldb-server/CMakeLists.txt
index 7d52181..1a76030 100644
--- a/src/llvm-project/lldb/unittests/tools/lldb-server/CMakeLists.txt
+++ b/src/llvm-project/lldb/unittests/tools/lldb-server/CMakeLists.txt
@@ -13,7 +13,7 @@
 add_lldb_test_executable(thread_inferior inferior/thread_inferior.cpp)
 add_lldb_test_executable(environment_check inferior/environment_check.cpp)
 
-if(LLDB_CAN_USE_DEBUGSERVER)
+if(LLDB_CAN_USE_DEBUGSERVER AND (LLDB_TOOL_DEBUGSERVER_BUILD OR LLDB_USE_SYSTEM_DEBUGSERVER))
   if(LLDB_USE_SYSTEM_DEBUGSERVER)
     lldb_find_system_debugserver(debugserver_path)
   else()
diff --git a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/LLGSTest.cpp b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/LLGSTest.cpp
index 1b060f7..1cd8e0d 100644
--- a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/LLGSTest.cpp
+++ b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/LLGSTest.cpp
@@ -14,6 +14,13 @@
 using namespace lldb_private;
 using namespace llvm;
 
+#ifdef SendMessage
+#undef SendMessage
+#endif
+
+// Disable this test on Windows as it appears to have a race condition
+// that causes lldb-server not to exit after the inferior hangs up.
+#if !defined(_WIN32)
 TEST_F(TestBase, LaunchModePreservesEnvironment) {
   putenv(const_cast<char *>("LLDB_TEST_MAGIC_VARIABLE=LLDB_TEST_MAGIC_VALUE"));
 
@@ -28,6 +35,7 @@
       HasValue(testing::Property(&StopReply::getKind,
                                  WaitStatus{WaitStatus::Exit, 0})));
 }
+#endif
 
 TEST_F(TestBase, DS_TEST(DebugserverEnv)) {
   // Test that --env takes precedence over inherited environment variables.
diff --git a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/MessageObjects.cpp b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/MessageObjects.cpp
index de4c46b..e4f1a92 100644
--- a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/MessageObjects.cpp
+++ b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/MessageObjects.cpp
@@ -319,7 +319,7 @@
   if (!RegistersOr)
     return RegistersOr.takeError();
 
-  return llvm::make_unique<StopReplyStop>(Signal, Thread, Name,
+  return std::make_unique<StopReplyStop>(Signal, Thread, Name,
                                           std::move(ThreadPcs),
                                           std::move(*RegistersOr), Reason);
 }
@@ -329,7 +329,7 @@
   uint8_t Status;
   if (!to_integer(Response, Status, 16))
     return make_parsing_error("StopReply: exit status");
-  return llvm::make_unique<StopReplyExit>(Status);
+  return std::make_unique<StopReplyExit>(Status);
 }
 
 //====== Globals ===============================================================
diff --git a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/TestBase.h b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/TestBase.h
index 053ee8f..bfccbd2 100644
--- a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/TestBase.h
+++ b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/TestBase.h
@@ -12,6 +12,7 @@
 #include "TestClient.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/HostInfo.h"
+#include "lldb/Host/Socket.h"
 #include "llvm/Support/Path.h"
 #include "llvm/Testing/Support/Error.h"
 #include "gtest/gtest.h"
@@ -23,9 +24,11 @@
   static void SetUpTestCase() {
     lldb_private::FileSystem::Initialize();
     lldb_private::HostInfo::Initialize();
+    ASSERT_THAT_ERROR(lldb_private::Socket::Initialize(), llvm::Succeeded());
   }
 
   static void TearDownTestCase() {
+    lldb_private::Socket::Terminate();
     lldb_private::HostInfo::Terminate();
     lldb_private::FileSystem::Terminate();
   }
diff --git a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/TestClient.cpp b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
index 67516a7..7e51a38 100644
--- a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
+++ b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/TestClient.cpp
@@ -25,6 +25,10 @@
 using namespace llvm;
 using namespace llgs_tests;
 
+#ifdef SendMessage
+#undef SendMessage
+#endif
+
 TestClient::TestClient(std::unique_ptr<Connection> Conn) {
   SetConnection(Conn.release());
   SetPacketTimeout(std::chrono::seconds(10));
@@ -107,7 +111,7 @@
 
   Socket *accept_socket;
   listen_socket.Accept(accept_socket);
-  auto Conn = llvm::make_unique<ConnectionFileDescriptor>(accept_socket);
+  auto Conn = std::make_unique<ConnectionFileDescriptor>(accept_socket);
   auto Client = std::unique_ptr<TestClient>(new TestClient(std::move(Conn)));
 
   if (Error E = Client->initializeConnection())
diff --git a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/ThreadIdsInJstopinfoTest.cpp b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/ThreadIdsInJstopinfoTest.cpp
index 8a3dac3..acc70841 100644
--- a/src/llvm-project/lldb/unittests/tools/lldb-server/tests/ThreadIdsInJstopinfoTest.cpp
+++ b/src/llvm-project/lldb/unittests/tools/lldb-server/tests/ThreadIdsInJstopinfoTest.cpp
@@ -22,7 +22,13 @@
 using namespace lldb;
 using namespace testing;
 
-TEST_F(StandardStartupTest, TestStopReplyContainsThreadPcs) {
+#ifdef __NetBSD__
+#define SKIP_ON_NETBSD(x) DISABLED_ ## x
+#else
+#define SKIP_ON_NETBSD(x) x
+#endif
+
+TEST_F(StandardStartupTest, SKIP_ON_NETBSD(TestStopReplyContainsThreadPcs)) {
   // This inferior spawns 4 threads, then forces a break.
   ASSERT_THAT_ERROR(
       Client->SetInferior({getInferiorPath("thread_inferior"), "4"}),
diff --git a/src/llvm-project/lldb/utils/TableGen/CMakeLists.txt b/src/llvm-project/lldb/utils/TableGen/CMakeLists.txt
index 45a5d36..47a6400 100644
--- a/src/llvm-project/lldb/utils/TableGen/CMakeLists.txt
+++ b/src/llvm-project/lldb/utils/TableGen/CMakeLists.txt
@@ -1,14 +1,18 @@
 # tablegen targets get exported via llvm for LLVMConfig.cmake. So standalone
 # builds of lldb can potentially import this via LLVMConfig and also attempt to
 # build it in tree. So only build it if it doesn't exist.
-if (TARGET lldb-tblgen)
-  set(LLDB_TABLEGEN_EXE $<TARGET_FILE:lldb-tblgen> CACHE STRING "")
-else()
-  set(LLVM_LINK_COMPONENTS Support)
+if (NOT DEFINED LLDB_TABLEGEN_EXE)
+  if (TARGET lldb-tblgen)
+    set(LLDB_TABLEGEN_EXE $<TARGET_FILE:lldb-tblgen> CACHE STRING "")
+  else()
+    set(LLVM_LINK_COMPONENTS Support)
 
-  add_tablegen(lldb-tblgen LLDB
-    LLDBOptionDefEmitter.cpp
-    LLDBTableGen.cpp
-    )
-  set_target_properties(lldb-tblgen PROPERTIES FOLDER "LLDB tablegenning")
+    add_tablegen(lldb-tblgen LLDB
+      LLDBOptionDefEmitter.cpp
+      LLDBPropertyDefEmitter.cpp
+      LLDBTableGen.cpp
+      LLDBTableGenUtils.cpp
+      )
+    set_target_properties(lldb-tblgen PROPERTIES FOLDER "LLDB tablegenning")
+  endif()
 endif()
diff --git a/src/llvm-project/lldb/utils/TableGen/LLDBOptionDefEmitter.cpp b/src/llvm-project/lldb/utils/TableGen/LLDBOptionDefEmitter.cpp
index 4e62197..6e73d0c 100644
--- a/src/llvm-project/lldb/utils/TableGen/LLDBOptionDefEmitter.cpp
+++ b/src/llvm-project/lldb/utils/TableGen/LLDBOptionDefEmitter.cpp
@@ -1,4 +1,4 @@
-//===- TableGen.cpp - Top-Level TableGen implementation for Clang ---------===//
+//===- LLDBOptionDefEmitter.cpp -------------------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -12,140 +12,174 @@
 //===----------------------------------------------------------------------===//
 
 #include "LLDBTableGenBackends.h"
+#include "LLDBTableGenUtils.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/TableGen/Record.h"
 #include "llvm/TableGen/StringMatcher.h"
 #include "llvm/TableGen/TableGenBackend.h"
-#include <map>
 #include <vector>
 
 using namespace llvm;
+using namespace lldb_private;
 
-/// Map of command names to their associated records. Also makes sure our
-/// commands are sorted in a deterministic way.
-typedef std::map<std::string, std::vector<Record *>> RecordsByCommand;
-
-/// Groups all records by their command.
-static RecordsByCommand getCommandList(std::vector<Record *> Options) {
-  RecordsByCommand result;
-  for (Record *Option : Options)
-    result[Option->getValueAsString("Command").str()].push_back(Option);
-  return result;
-}
-
-static void emitOption(Record *Option, raw_ostream &OS) {
-  OS << "  {";
-
-  // List of option groups this option is in.
+namespace {
+struct CommandOption {
   std::vector<std::string> GroupsArg;
+  bool Required = false;
+  std::string FullName;
+  std::string ShortName;
+  std::string ArgType;
+  bool OptionalArg = false;
+  std::string Validator;
+  std::string ArgEnum;
+  std::vector<StringRef> Completions;
+  std::string Description;
 
-  if (Option->getValue("Groups")) {
-    // The user specified a list of groups.
-    auto Groups = Option->getValueAsListOfInts("Groups");
-    for (int Group : Groups)
-      GroupsArg.push_back("LLDB_OPT_SET_" + std::to_string(Group));
-  } else if (Option->getValue("GroupStart")) {
-    // The user specified a range of groups (with potentially only one element).
-    int GroupStart = Option->getValueAsInt("GroupStart");
-    int GroupEnd = Option->getValueAsInt("GroupEnd");
-    for (int i = GroupStart; i <= GroupEnd; ++i)
-      GroupsArg.push_back("LLDB_OPT_SET_" + std::to_string(i));
+  CommandOption() = default;
+  CommandOption(Record *Option) {
+    if (Option->getValue("Groups")) {
+      // The user specified a list of groups.
+      auto Groups = Option->getValueAsListOfInts("Groups");
+      for (int Group : Groups)
+        GroupsArg.push_back("LLDB_OPT_SET_" + std::to_string(Group));
+    } else if (Option->getValue("GroupStart")) {
+      // The user specified a range of groups (with potentially only one
+      // element).
+      int GroupStart = Option->getValueAsInt("GroupStart");
+      int GroupEnd = Option->getValueAsInt("GroupEnd");
+      for (int i = GroupStart; i <= GroupEnd; ++i)
+        GroupsArg.push_back("LLDB_OPT_SET_" + std::to_string(i));
+    }
+
+    // Check if this option is required.
+    Required = Option->getValue("Required");
+
+    // Add the full and short name for this option.
+    FullName = Option->getValueAsString("FullName");
+    ShortName = Option->getValueAsString("ShortName");
+
+    if (auto A = Option->getValue("ArgType"))
+      ArgType = A->getValue()->getAsUnquotedString();
+    OptionalArg = Option->getValue("OptionalArg") != nullptr;
+
+    if (Option->getValue("Validator"))
+      Validator = Option->getValueAsString("Validator");
+
+    if (Option->getValue("ArgEnum"))
+      ArgEnum = Option->getValueAsString("ArgEnum");
+
+    if (Option->getValue("Completions"))
+      Completions = Option->getValueAsListOfStrings("Completions");
+
+    if (auto D = Option->getValue("Description"))
+      Description = D->getValue()->getAsUnquotedString();
   }
+};
+} // namespace
+
+static void emitOption(const CommandOption &O, raw_ostream &OS) {
+  OS << "  {";
 
   // If we have any groups, we merge them. Otherwise we move this option into
   // the all group.
-  if (GroupsArg.empty())
+  if (O.GroupsArg.empty())
     OS << "LLDB_OPT_SET_ALL";
   else
-    OS << llvm::join(GroupsArg.begin(), GroupsArg.end(), " | ");
+    OS << llvm::join(O.GroupsArg.begin(), O.GroupsArg.end(), " | ");
 
   OS << ", ";
 
   // Check if this option is required.
-  OS << (Option->getValue("Required") ? "true" : "false");
+  OS << (O.Required ? "true" : "false");
 
   // Add the full and short name for this option.
-  OS << ", \"" << Option->getValueAsString("FullName") << "\", ";
-  OS << '\'' << Option->getValueAsString("ShortName") << "'";
-
-  auto ArgType = Option->getValue("ArgType");
-  bool IsOptionalArg = Option->getValue("OptionalArg") != nullptr;
+  OS << ", \"" << O.FullName << "\", ";
+  OS << '\'' << O.ShortName << "'";
 
   // Decide if we have either an option, required or no argument for this
   // option.
   OS << ", OptionParser::";
-  if (ArgType) {
-    if (IsOptionalArg)
+  if (!O.ArgType.empty()) {
+    if (O.OptionalArg)
       OS << "eOptionalArgument";
     else
       OS << "eRequiredArgument";
   } else
     OS << "eNoArgument";
-  OS << ", nullptr, ";
+  OS << ", ";
 
-  if (Option->getValue("ArgEnum"))
-    OS << Option->getValueAsString("ArgEnum");
+  if (!O.Validator.empty())
+    OS << O.Validator;
+  else
+    OS << "nullptr";
+  OS << ", ";
+
+  if (!O.ArgEnum.empty())
+    OS << O.ArgEnum;
   else
     OS << "{}";
   OS << ", ";
 
   // Read the tab completions we offer for this option (if there are any)
-  if (Option->getValue("Completions")) {
-    auto Completions = Option->getValueAsListOfStrings("Completions");
+  if (!O.Completions.empty()) {
     std::vector<std::string> CompletionArgs;
-    for (llvm::StringRef Completion : Completions)
+    for (llvm::StringRef Completion : O.Completions)
       CompletionArgs.push_back("CommandCompletions::e" + Completion.str() +
                                "Completion");
 
     OS << llvm::join(CompletionArgs.begin(), CompletionArgs.end(), " | ");
-  } else {
+  } else
     OS << "CommandCompletions::eNoCompletion";
-  }
 
   // Add the argument type.
   OS << ", eArgType";
-  if (ArgType) {
-    OS << ArgType->getValue()->getAsUnquotedString();
+  if (!O.ArgType.empty()) {
+    OS << O.ArgType;
   } else
     OS << "None";
   OS << ", ";
 
   // Add the description if there is any.
-  if (auto D = Option->getValue("Description"))
-    OS << D->getValue()->getAsString();
-  else
+  if (!O.Description.empty()) {
+    OS << "\"";
+    llvm::printEscapedString(O.Description, OS);
+    OS << "\"";
+  } else
     OS << "\"\"";
   OS << "},\n";
 }
 
 /// Emits all option initializers to the raw_ostream.
-static void emitOptions(std::string Command, std::vector<Record *> Option,
+static void emitOptions(std::string Command, std::vector<Record *> Records,
                         raw_ostream &OS) {
+  std::vector<CommandOption> Options;
+  for (Record *R : Records)
+    Options.emplace_back(R);
+
+  std::string ID = Command;
+  std::replace(ID.begin(), ID.end(), ' ', '_');
   // Generate the macro that the user needs to define before including the
   // *.inc file.
-  std::string NeededMacro = "LLDB_OPTIONS_" + Command;
-  std::replace(NeededMacro.begin(), NeededMacro.end(), ' ', '_');
+  std::string NeededMacro = "LLDB_OPTIONS_" + ID;
 
   // All options are in one file, so we need put them behind macros and ask the
   // user to define the macro for the options that are needed.
   OS << "// Options for " << Command << "\n";
   OS << "#ifdef " << NeededMacro << "\n";
-  for (Record *R : Option)
-    emitOption(R, OS);
+  OS << "constexpr static OptionDefinition g_" + ID + "_options[] = {\n";
+  for (CommandOption &CO : Options)
+    emitOption(CO, OS);
   // We undefine the macro for the user like Clang's include files are doing it.
+  OS << "};\n";
   OS << "#undef " << NeededMacro << "\n";
   OS << "#endif // " << Command << " command\n\n";
 }
 
 void lldb_private::EmitOptionDefs(RecordKeeper &Records, raw_ostream &OS) {
-
-  std::vector<Record *> Options = Records.getAllDerivedDefinitions("Option");
-
   emitSourceFileHeader("Options for LLDB command line commands.", OS);
 
-  RecordsByCommand ByCommand = getCommandList(Options);
-
-  for (auto &CommandRecordPair : ByCommand) {
+  std::vector<Record *> Options = Records.getAllDerivedDefinitions("Option");
+  for (auto &CommandRecordPair : getRecordsByName(Options, "Command")) {
     emitOptions(CommandRecordPair.first, CommandRecordPair.second, OS);
   }
 }
diff --git a/src/llvm-project/lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp b/src/llvm-project/lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp
new file mode 100644
index 0000000..f36deee
--- /dev/null
+++ b/src/llvm-project/lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp
@@ -0,0 +1,180 @@
+//===- LLDBPropertyDefEmitter.cpp -----------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// These tablegen backends emits LLDB's PropertyDefinition values.
+//
+//===----------------------------------------------------------------------===//
+
+#include "LLDBTableGenBackends.h"
+#include "LLDBTableGenUtils.h"
+#include "llvm/ADT/StringExtras.h"
+#include "llvm/TableGen/Record.h"
+#include "llvm/TableGen/StringMatcher.h"
+#include "llvm/TableGen/TableGenBackend.h"
+#include <vector>
+
+using namespace llvm;
+using namespace lldb_private;
+
+static void emitPropertyEnum(Record *Property, raw_ostream &OS) {
+  OS << "eProperty";
+  OS << Property->getName();
+  OS << ",\n";
+}
+
+static void emitProperty(Record *Property, raw_ostream &OS) {
+  OS << "  {";
+
+  // Emit the property name.
+  OS << "\"" << Property->getValueAsString("Name") << "\"";
+  OS << ", ";
+
+  // Emit the property type.
+  OS << "OptionValue::eType";
+  OS << Property->getValueAsString("Type");
+  OS << ", ";
+
+  // Emit the property's global value.
+  OS << (Property->getValue("Global") ? "true" : "false");
+  OS << ", ";
+
+  bool hasDefaultUnsignedValue = Property->getValue("HasDefaultUnsignedValue");
+  bool hasDefaultEnumValue = Property->getValue("HasDefaultEnumValue");
+  bool hasDefaultStringValue = Property->getValue("HasDefaultStringValue");
+
+  // Guarantee that every property has a default value.
+  assert((hasDefaultUnsignedValue || hasDefaultEnumValue ||
+          hasDefaultStringValue) &&
+         "Property must have a default value");
+
+  // Guarantee that no property has both a default unsigned value and a default
+  // enum value, since they're bothed stored in the same field.
+  assert(!(hasDefaultUnsignedValue && hasDefaultEnumValue) &&
+         "Property cannot have both a unsigned and enum default value.");
+
+  // Guarantee that every boolean property has a boolean default value.
+  assert(!(Property->getValueAsString("Type") == "Boolean" &&
+           !Property->getValue("HasDefaultBooleanValue")) &&
+         "Boolean property must have a boolean default value.");
+
+  // Guarantee that every string property has a string default value.
+  assert(!(Property->getValueAsString("Type") == "String" &&
+           !hasDefaultStringValue) &&
+         "String property must have a string default value.");
+
+  // Guarantee that every enum property has an enum default value.
+  assert(
+      !(Property->getValueAsString("Type") == "Enum" && !hasDefaultEnumValue) &&
+      "Enum property must have a enum default value.");
+
+  // Emit the default uint value.
+  if (hasDefaultUnsignedValue) {
+    OS << std::to_string(Property->getValueAsInt("DefaultUnsignedValue"));
+  } else if (hasDefaultEnumValue) {
+    OS << Property->getValueAsString("DefaultEnumValue");
+  } else {
+    OS << "0";
+  }
+  OS << ", ";
+
+  // Emit the default string value.
+  if (hasDefaultStringValue) {
+    if (auto D = Property->getValue("DefaultStringValue")) {
+      OS << "\"";
+      OS << D->getValue()->getAsUnquotedString();
+      OS << "\"";
+    } else {
+      OS << "\"\"";
+    }
+  } else {
+    OS << "nullptr";
+  }
+  OS << ", ";
+
+  // Emit the enum values value.
+  if (Property->getValue("EnumValues"))
+    OS << Property->getValueAsString("EnumValues");
+  else
+    OS << "{}";
+  OS << ", ";
+
+  // Emit the property description.
+  if (auto D = Property->getValue("Description")) {
+    OS << "\"";
+    OS << D->getValue()->getAsUnquotedString();
+    OS << "\"";
+  } else {
+    OS << "\"\"";
+  }
+
+  OS << "},\n";
+}
+
+/// Emits all property initializers to the raw_ostream.
+static void emityProperties(std::string PropertyName,
+                            std::vector<Record *> PropertyRecords,
+                            raw_ostream &OS) {
+  // Generate the macro that the user needs to define before including the
+  // *.inc file.
+  std::string NeededMacro = "LLDB_PROPERTIES_" + PropertyName;
+  std::replace(NeededMacro.begin(), NeededMacro.end(), ' ', '_');
+
+  // All options are in one file, so we need put them behind macros and ask the
+  // user to define the macro for the options that are needed.
+  OS << "// Property definitions for " << PropertyName << "\n";
+  OS << "#ifdef " << NeededMacro << "\n";
+  OS << "static constexpr PropertyDefinition g_" << PropertyName
+     << "_properties[] = {\n";
+  for (Record *R : PropertyRecords)
+    emitProperty(R, OS);
+  OS << "};\n";
+  // We undefine the macro for the user like Clang's include files are doing it.
+  OS << "#undef " << NeededMacro << "\n";
+  OS << "#endif // " << PropertyName << " Property\n\n";
+}
+
+/// Emits all property initializers to the raw_ostream.
+static void emitPropertyEnum(std::string PropertyName,
+                             std::vector<Record *> PropertyRecords,
+                             raw_ostream &OS) {
+  // Generate the macro that the user needs to define before including the
+  // *.inc file.
+  std::string NeededMacro = "LLDB_PROPERTIES_" + PropertyName;
+  std::replace(NeededMacro.begin(), NeededMacro.end(), ' ', '_');
+
+  // All options are in one file, so we need put them behind macros and ask the
+  // user to define the macro for the options that are needed.
+  OS << "// Property enum cases for " << PropertyName << "\n";
+  OS << "#ifdef " << NeededMacro << "\n";
+  for (Record *R : PropertyRecords)
+    emitPropertyEnum(R, OS);
+  // We undefine the macro for the user like Clang's include files are doing it.
+  OS << "#undef " << NeededMacro << "\n";
+  OS << "#endif // " << PropertyName << " Property\n\n";
+}
+
+void lldb_private::EmitPropertyDefs(RecordKeeper &Records, raw_ostream &OS) {
+  emitSourceFileHeader("Property definitions for LLDB.", OS);
+
+  std::vector<Record *> Properties =
+      Records.getAllDerivedDefinitions("Property");
+  for (auto &PropertyRecordPair : getRecordsByName(Properties, "Definition")) {
+    emityProperties(PropertyRecordPair.first, PropertyRecordPair.second, OS);
+  }
+}
+
+void lldb_private::EmitPropertyEnumDefs(RecordKeeper &Records,
+                                        raw_ostream &OS) {
+  emitSourceFileHeader("Property definition enum for LLDB.", OS);
+
+  std::vector<Record *> Properties =
+      Records.getAllDerivedDefinitions("Property");
+  for (auto &PropertyRecordPair : getRecordsByName(Properties, "Definition")) {
+    emitPropertyEnum(PropertyRecordPair.first, PropertyRecordPair.second, OS);
+  }
+}
diff --git a/src/llvm-project/lldb/utils/TableGen/LLDBTableGen.cpp b/src/llvm-project/lldb/utils/TableGen/LLDBTableGen.cpp
index 9325fe0..abb6589 100644
--- a/src/llvm-project/lldb/utils/TableGen/LLDBTableGen.cpp
+++ b/src/llvm-project/lldb/utils/TableGen/LLDBTableGen.cpp
@@ -1,4 +1,4 @@
-//===- TableGen.cpp - Top-Level TableGen implementation for Clang ---------===//
+//===- LLDBTableGen.cpp - Top-Level TableGen implementation for LLDB ------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file contains the main function for Clang's TableGen.
+// This file contains the main function for LLDB's TableGen.
 //
 //===----------------------------------------------------------------------===//
 
@@ -25,16 +25,22 @@
   PrintRecords,
   DumpJSON,
   GenOptionDefs,
+  GenPropertyDefs,
+  GenPropertyEnumDefs,
 };
 
-static cl::opt<ActionType>
-    Action(cl::desc("Action to perform:"),
-           cl::values(clEnumValN(PrintRecords, "print-records",
-                                 "Print all records to stdout (default)"),
-                      clEnumValN(DumpJSON, "dump-json",
-                                 "Dump all records as machine-readable JSON"),
-                      clEnumValN(GenOptionDefs, "gen-lldb-option-defs",
-                                 "Generate clang attribute clases")));
+static cl::opt<ActionType> Action(
+    cl::desc("Action to perform:"),
+    cl::values(clEnumValN(PrintRecords, "print-records",
+                          "Print all records to stdout (default)"),
+               clEnumValN(DumpJSON, "dump-json",
+                          "Dump all records as machine-readable JSON"),
+               clEnumValN(GenOptionDefs, "gen-lldb-option-defs",
+                          "Generate lldb option definitions"),
+               clEnumValN(GenPropertyDefs, "gen-lldb-property-defs",
+                          "Generate lldb property definitions"),
+               clEnumValN(GenPropertyEnumDefs, "gen-lldb-property-enum-defs",
+                          "Generate lldb property enum definitions")));
 
 static bool LLDBTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
   switch (Action) {
@@ -47,6 +53,12 @@
   case GenOptionDefs:
     EmitOptionDefs(Records, OS);
     break;
+  case GenPropertyDefs:
+    EmitPropertyDefs(Records, OS);
+    break;
+  case GenPropertyEnumDefs:
+    EmitPropertyEnumDefs(Records, OS);
+    break;
   }
   return false;
 }
diff --git a/src/llvm-project/lldb/utils/TableGen/LLDBTableGenBackends.h b/src/llvm-project/lldb/utils/TableGen/LLDBTableGenBackends.h
index eb14d80..b424abf 100644
--- a/src/llvm-project/lldb/utils/TableGen/LLDBTableGenBackends.h
+++ b/src/llvm-project/lldb/utils/TableGen/LLDBTableGenBackends.h
@@ -1,4 +1,4 @@
-//===- TableGen.cpp - Top-Level TableGen implementation for Clang ---------===//
+//===- LLDBTableGenBackends.h -----------------------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -7,19 +7,21 @@
 //===----------------------------------------------------------------------===//
 //
 // This file contains the declarations for all of the LLDB TableGen
-// backends. A "TableGen backend" is just a function. See
-// "$LLVM_ROOT/utils/TableGen/TableGenBackends.h" for more info.
+// backends. A "TableGen backend" is just a function.
+//
+// See "$LLVM_ROOT/utils/TableGen/TableGenBackends.h" for more info.
 //
 //===----------------------------------------------------------------------===//
 
 #ifndef LLVM_LLDB_UTILS_TABLEGEN_TABLEGENBACKENDS_H
 #define LLVM_LLDB_UTILS_TABLEGEN_TABLEGENBACKENDS_H
 
-#include <string>
+#include "llvm/ADT/StringRef.h"
 
 namespace llvm {
 class raw_ostream;
 class RecordKeeper;
+class Record;
 } // namespace llvm
 
 using llvm::raw_ostream;
@@ -28,6 +30,8 @@
 namespace lldb_private {
 
 void EmitOptionDefs(RecordKeeper &RK, raw_ostream &OS);
+void EmitPropertyDefs(RecordKeeper &RK, raw_ostream &OS);
+void EmitPropertyEnumDefs(RecordKeeper &RK, raw_ostream &OS);
 
 } // namespace lldb_private
 
diff --git a/src/llvm-project/lldb/utils/TableGen/LLDBTableGenUtils.cpp b/src/llvm-project/lldb/utils/TableGen/LLDBTableGenUtils.cpp
new file mode 100644
index 0000000..8b4c758
--- /dev/null
+++ b/src/llvm-project/lldb/utils/TableGen/LLDBTableGenUtils.cpp
@@ -0,0 +1,21 @@
+//===- LLDBTableGenUtils.cpp ----------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "LLDBTableGenUtils.h"
+#include "llvm/TableGen/Record.h"
+
+using namespace llvm;
+using namespace lldb_private;
+
+RecordsByName lldb_private::getRecordsByName(std::vector<Record *> Records,
+                                             StringRef Name) {
+  RecordsByName Result;
+  for (Record *R : Records)
+    Result[R->getValueAsString(Name).str()].push_back(R);
+  return Result;
+}
diff --git a/src/llvm-project/lldb/utils/TableGen/LLDBTableGenUtils.h b/src/llvm-project/lldb/utils/TableGen/LLDBTableGenUtils.h
new file mode 100644
index 0000000..5553cec
--- /dev/null
+++ b/src/llvm-project/lldb/utils/TableGen/LLDBTableGenUtils.h
@@ -0,0 +1,34 @@
+//===- LLDBTableGenUtils.h --------------------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LLDB_UTILS_TABLEGEN_TABLEGENUTILS_H
+#define LLVM_LLDB_UTILS_TABLEGEN_TABLEGENUTILS_H
+
+#include "llvm/ADT/StringRef.h"
+#include <map>
+#include <string>
+#include <vector>
+
+namespace llvm {
+class RecordKeeper;
+class Record;
+} // namespace llvm
+
+namespace lldb_private {
+
+/// Map of names to their associated records. This map also ensures that our
+/// records are sorted in a deterministic way.
+typedef std::map<std::string, std::vector<llvm::Record *>> RecordsByName;
+
+/// Return records grouped by name.
+RecordsByName getRecordsByName(std::vector<llvm::Record *> Records,
+                               llvm::StringRef);
+
+} // namespace lldb_private
+
+#endif
diff --git a/src/llvm-project/lldb/utils/git-svn/convert.py b/src/llvm-project/lldb/utils/git-svn/convert.py
deleted file mode 100755
index b6e54ed..0000000
--- a/src/llvm-project/lldb/utils/git-svn/convert.py
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Convert the raw message sources from git patch emails to git-am friendly files.
-
-Usage:
-
-1. Mail.app -> Save As -> api.eml (Raw Message Source)
-2. .../convert.py api.eml
-3. git am [--signoff] < api.eml
-4. git svn dcommit [--commit-url https://[email protected]/svn/llvm-project/lldb/trunk]
-"""
-
-from __future__ import print_function
-
-import os
-import re
-import sys
-import io
-
-
-def usage(problem_file=None):
-    if problem_file:
-        print("%s is not a file" % problem_file)
-    print("Usage: convert.py raw-message-source [raw-message-source2 ...]")
-    sys.exit(0)
-
-
-def do_convert(file):
-    """Skip all preceding mail message headers until 'From: ' is encountered.
-    Then for each line ('From: ' header included), replace the dos style CRLF
-    end-of-line with unix style LF end-of-line.
-    """
-    print("converting %s ..." % file)
-
-    with open(file, 'r') as f_in:
-        content = f_in.read()
-
-    # The new content to be written back to the same file.
-    new_content = io.StringIO()
-
-    # Boolean flag controls whether to start printing lines.
-    from_header_seen = False
-
-    # By default, splitlines() don't include line breaks.  CRLF should be gone.
-    for line in content.splitlines():
-        # Wait till we scan the 'From: ' header before start printing the
-        # lines.
-        if not from_header_seen:
-            if not line.startswith('From: '):
-                continue
-            else:
-                from_header_seen = True
-
-        print(line, file=new_content)
-
-    with open(file, 'w') as f_out:
-        f_out.write(new_content.getvalue())
-
-    print("done")
-
-
-def main():
-    if len(sys.argv) == 1:
-        usage()
-    # Convert the raw message source one by one.
-    for file in sys.argv[1:]:
-        if not os.path.isfile(file):
-            usage(file)
-        do_convert(file)
-
-if __name__ == '__main__':
-    main()
diff --git a/src/llvm-project/lldb/utils/lit-cpuid/CMakeLists.txt b/src/llvm-project/lldb/utils/lit-cpuid/CMakeLists.txt
index bc9d313..f365447 100644
--- a/src/llvm-project/lldb/utils/lit-cpuid/CMakeLists.txt
+++ b/src/llvm-project/lldb/utils/lit-cpuid/CMakeLists.txt
@@ -1,4 +1,4 @@
-add_llvm_utility(lit-cpuid
+add_lldb_executable(lit-cpuid
   lit-cpuid.cpp
   )
 
diff --git a/src/llvm-project/lldb/utils/lldb-dotest/CMakeLists.txt b/src/llvm-project/lldb/utils/lldb-dotest/CMakeLists.txt
index 0c61b2b..4f1bd73 100644
--- a/src/llvm-project/lldb/utils/lldb-dotest/CMakeLists.txt
+++ b/src/llvm-project/lldb/utils/lldb-dotest/CMakeLists.txt
@@ -1,6 +1,6 @@
 # Make lldb-dotest a custom target.
 add_custom_target(lldb-dotest)
-add_dependencies(lldb-dotest ${LLDB_TEST_DEPS})
+add_dependencies(lldb-dotest lldb-test-deps)
 set_target_properties(lldb-dotest PROPERTIES FOLDER "lldb utils")
 
 get_property(LLDB_DOTEST_ARGS GLOBAL PROPERTY LLDB_DOTEST_ARGS_PROPERTY)
diff --git a/src/llvm-project/lldb/utils/lldb-dotest/lldb-dotest.in b/src/llvm-project/lldb/utils/lldb-dotest/lldb-dotest.in
index 18a73ae..bab3f8b 100755
--- a/src/llvm-project/lldb/utils/lldb-dotest/lldb-dotest.in
+++ b/src/llvm-project/lldb/utils/lldb-dotest/lldb-dotest.in
@@ -2,15 +2,27 @@
 import subprocess
 import sys
 
-dotest_path = '@LLDB_SOURCE_DIR@/test/dotest.py'
+dotest_path = '@LLDB_SOURCE_DIR@/test/API/dotest.py'
+build_dir = '@LLDB_TEST_BUILD_DIRECTORY@'
 dotest_args_str = '@LLDB_DOTEST_ARGS@'
+arch = '@LLDB_TEST_ARCH@'
+executable = '@LLDB_TEST_EXECUTABLE@'
+compiler = '@LLDB_TEST_COMPILER@'
+dsymutil = '@LLDB_TEST_DSYMUTIL@'
+filecheck = '@LLDB_TEST_FILECHECK@'
 
 if __name__ == '__main__':
     wrapper_args = sys.argv[1:]
     dotest_args = dotest_args_str.split(';')
     # Build dotest.py command.
-    cmd = [sys.executable, dotest_path, '-q']
+    cmd = [sys.executable, dotest_path]
+    cmd.extend(['--arch', arch])
     cmd.extend(dotest_args)
+    cmd.extend(['--build-dir', build_dir])
+    cmd.extend(['--executable', executable])
+    cmd.extend(['--compiler', compiler])
+    cmd.extend(['--dsymutil', dsymutil])
+    cmd.extend(['--filecheck', filecheck])
     cmd.extend(wrapper_args)
     # Invoke dotest.py and return exit code.
     print(' '.join(cmd))
diff --git a/src/llvm-project/lldb/utils/misc/grep-svn-log.py b/src/llvm-project/lldb/utils/misc/grep-svn-log.py
deleted file mode 100755
index a149047..0000000
--- a/src/llvm-project/lldb/utils/misc/grep-svn-log.py
+++ /dev/null
@@ -1,97 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Greps and returns the first svn log entry containing a line matching the regular
-expression pattern passed as the only arg.
-
-Example:
-
-svn log -v | grep-svn-log.py '^   D.+why_are_you_missing.h$'
-"""
-from __future__ import print_function
-
-import fileinput
-import re
-import sys
-import io
-
-# Separator string for "svn log -v" output.
-separator = '-' * 72
-
-usage = """Usage: grep-svn-log.py line-pattern
-Example:
-    svn log -v | grep-svn-log.py '^   D.+why_are_you_missing.h'"""
-
-
-class Log(io.StringIO):
-    """Simple facade to keep track of the log content."""
-
-    def __init__(self):
-        self.reset()
-
-    def add_line(self, a_line):
-        """Add a line to the content, if there is a previous line, commit it."""
-        global separator
-        if self.prev_line is not None:
-            print(self.prev_line, file=self)
-        self.prev_line = a_line
-        self.separator_added = (a_line == separator)
-
-    def del_line(self):
-        """Forget about the previous line, do not commit it."""
-        self.prev_line = None
-
-    def reset(self):
-        """Forget about the previous lines entered."""
-        io.StringIO.__init__(self)
-        self.prev_line = None
-
-    def finish(self):
-        """Call this when you're finished with populating content."""
-        if self.prev_line is not None:
-            print(self.prev_line, file=self)
-        self.prev_line = None
-
-
-def grep(regexp):
-    # The log content to be written out once a match is found.
-    log = Log()
-
-    LOOKING_FOR_MATCH = 0
-    FOUND_LINE_MATCH = 1
-    state = LOOKING_FOR_MATCH
-
-    while True:
-        line = sys.stdin.readline()
-        if not line:
-            return
-        line = line.splitlines()[0]
-        if state == FOUND_LINE_MATCH:
-            # At this state, we keep on accumulating lines until the separator
-            # is encountered.  At which point, we can return the log content.
-            if line == separator:
-                log.finish()
-                print(log.getvalue())
-                return
-            log.add_line(line)
-
-        elif state == LOOKING_FOR_MATCH:
-            if line == separator:
-                log.reset()
-            log.add_line(line)
-            # Update next state if necessary.
-            if regexp.search(line):
-                state = FOUND_LINE_MATCH
-
-
-def main():
-    if len(sys.argv) != 2:
-        print(usage)
-        sys.exit(0)
-
-    regexp = re.compile(sys.argv[1])
-    grep(regexp)
-    sys.stdin.close()
-
-if __name__ == '__main__':
-    main()
diff --git a/src/llvm-project/lldb/utils/sync-source/README.txt b/src/llvm-project/lldb/utils/sync-source/README.txt
deleted file mode 100644
index 5d1dc64..0000000
--- a/src/llvm-project/lldb/utils/sync-source/README.txt
+++ /dev/null
@@ -1,293 +0,0 @@
-syncsource.py
-
-OVERVIEW
-
-The syncsource.py utility transfers groups of files between
-computers. The primary use case is to enable developing LLVM project
-software on one machine, transfer it efficiently to other machines ---
-possibly of other architectures --- and test it there. syncsource.py
-supports configurable, named source-to-destination mappings and has a
-transfer agent plug-in architecture. The current distribution provides
-an rsync-over-ssh transfer agent.
-
-The primary benefits of using syncsource.py are:
-
-* Provides a simple, reliable way to get a mirror copy of primary-
-  machine files onto several different destinations without concern
-  of compromising the patch during testing on different machines.
-
-* Handles directory-mapping differences between two machines.  For
-  LLDB, this is helpful when going between OS X and any other non-OS X
-  target system.
-
-EXAMPLE WORKFLOW
-
-This utility was developed in the context of working on the LLDB
-project.  Below we show the transfers we'd like to have happen,
-and the configuration that supports it.
-
-Workflow Example:
-
-* Develop on OS X (primary machine)
-* Test candidate changes on OS X.
-* Test candidate changes on a Linux machine (machine-name: lldb-linux).
-* Test candidate changes on a FreeBSD machine (machine-name: lldb-freebsd).
-* Do check-ins from OS X machine.
-
-Requirements:
-
-* OS X machine requires the lldb source layout: lldb, lldb/llvm,
-  lldb/llvm/tools/clang. Note this is different than the canonical
-  llvm, llvm/tools/clang, llvm/tools/lldb layout that we'll want on
-  the Linux and FreeBSD test machines.
-
-* Linux machine requires the llvm, llvm/tools/clang and
-  llvm/tools/lldb layout.
-
-* FreeBSD machine requires the same layout as the llvm machine.
-
-syncsource.py configuration in ~/.syncsourcerc:
-
-# This is my configuration with a comment.  Configuration
-# files are JSON-based.
-{ "configurations": [
-    # Here we have a collection of named configuration blocks.
-    # Configuration blocks can chain back to a parent by name.
-    {
-        # Every block has a name so it can be referenced from
-        # the command line or chained back to by a child block
-        # for sharing.
-        "name": "base_tot_settings",
-
-        # This directive lists the "directory ids" that we'll care
-        # about.  If your local repository has additional directories
-        # for other projects that need to ride along, add them here.
-        # For defaulting purposes, it makes sense to name the
-        # directory IDs as the most likely name for the directory
-        # itself.  For stock LLDB from top of tree, we generally only
-        # care about lldb, llvm and clang.
-        "dir_names": [ "llvm", "clang", "lldb" ],
-
-        # This section describes where the source files live on
-        # the primary machine.  There should always be a base_dir
-        # entry, which indicates where in the local filesystem the
-        # projects are rooted.  For each dir in dir_names, there
-        # should be either:
-        # 1. an entry named {dir-id}_dir (e.g. llvm_dir), which
-        #    specifies the source directory for the given dir id
-        #    relative to the base_dir entry, OR
-        # 2. no entry, in which case the directory is assumed to
-        #    be the same as {dir-id}.  In the example below, the
-        #    base_dir-relative directory for the "lldb" dir-id is
-        #    defaulted to being "lldb".  That's exactly what
-        #    we need in an OS X-style lldb dir layout.
-        "source": {
-            "base_dir": "~/work/lldb-tot",
-            "llvm_dir": "lldb/llvm",
-            "clang_dir": "lldb/llvm/tools/clang"
-        },
-
-        # source_excludes covers any exclusions that:
-        # * should be applied when copying files from the source
-        # * should be excluded from deletion on the destination
-        #
-        # By default, ".git", ".svn" and ".pyc" are added to
-        # all dir-id exclusions.  The default excludes can be
-        # controlled by the syncsource.py --default-excludes
-        # option.
-        #
-        # Below, I have transfer of the lldb dir skip everything
-        # rooted at "/llvm" below the lldb dir.  This is
-        # because we want the source OS X lldb to move to
-        # a destination of {some-dest-root}/llvm/tools/lldb, and
-        # not have the OS-X-inverted llvm copy over with the lldb
-        # transfer portion.  We'll see the complete picture of
-        # how this works when we get to specifying destinations
-        # later on in the config.
-        #
-        # We also exclude the "/build" and "/llvm-build" dir rooted in
-        # the OS X-side sources.  The Xcode configuration on this
-        # OS X machine will dump lldb builds in the /build directory
-        # relative to the lldb dir, and it will build llvm+clang in
-        # the /llvm-build dir relative to the lldb dir.
-        #
-        # Note the first forward slash in "/build" indicates to the
-        # transfer agent that we only want to exclude the
-        # ~/work/lldb-tot/lldb/build dir, not just any file or
-        # directory named "build" somewhere underneath the lldb
-        # directory.  Without the leading forward slash, any file
-        # or directory called build anywhere underneath the lldb dir
-        # will be excluded, which is definitely not what we want here.
-        #
-        # For the llvm dir, we do a source-side exclude for
-        # "/tools/clang".  We manage the clang transfer as a separate
-        # entity, so we don't want the movement of llvm to also move
-        # clang.
-        #
-        # The llvm_dir exclusion of "/tools/lldb" is the first example
-        # of an exclude targeting a requirement of the destination
-        # side.  Normally the transfer agent will delete anything on
-        # the destination that is not present on the source.  It is
-        # trying to mirror, and ensure both sides have the same
-        # content.  The source side of llvm on OS X does not have a
-        # "/tools/lldb", so at first this exclude looks non-sensical.
-        # But on the canonical destination layout, lldb lives in
-        # {some-dest-root}/llvm/tools/lldb.  Without this exclude,
-        # the transfer agent would blow away the tools/lldb directory
-        # on the destination every time we transfer, and then have to
-        # copy the lldb dir all over again.  For rsync+ssh, that
-        # totally would defeat the huge transfer efficiencies gained
-        # by using rsync in the first place.
-        #
-        # Note the overloading of both source and dest style excludes
-        # ultimately comes from the rsync-style exclude mechanism.
-        # If it wasn't for that, I would have separated source and
-        # dest excludes out better.
-        "source_excludes": {
-            "lldb_dir": ["/llvm", "/build", "/llvm-build"],
-            "llvm_dir": ["/tools/lldb", "/tools/clang"]
-        }
-    },
-
-    # Top of tree public, common settings for all destinations.
-    {
-        # The name for this config block.
-        "name": "common_tot",
-
-        # Here is our first chaining back to a parent config block.
-        # Any settings in "common_tot" not specified here are going
-        # to be retrieved from the parent.
-        "parent": "base_tot_settings",
-
-        # The transfer agent class to use.  Right now, the only one
-        # available is this one here that uses rsync over ssh.
-        # If some other mechanism is needed to reach this destination,
-        # it can be specified here in full [[package.]module.]class form.
-        "transfer_class": "transfer.rsync.RsyncOverSsh",
-
-        # Specifies the destination-root-relative directories.
-        # Here our desination is rooted at:
-        # {some-yet-to-be-specified-destination-root} + "base_dir".
-        # In other words, each destination will have some kind of root
-        # for all relative file placement.  We'll see those defined
-        # later, as they can change per destination machine.
-        # The block below describes the settings relative to that
-        # destination root.
-        #
-        # As before, each dir-id used in this configuration is
-        # expected to have either:
-        # 1. an entry named {dir-id}_dir (e.g. llvm_dir), which
-        #    specifies the destination directory for the given dir id
-        #    relative to the dest_root+base_dir entries, OR
-        # 2. no entry, in which case the directory is assumed to
-        #    be the same as {dir-id}.  In the example below, the
-        #    dest_root+base_dir-relative directory for the "llvm" dir-id is
-        #    defaulted to being "llvm".  That's exactly what
-        #    we need in a canonical llvm/clang/lldb setup on
-        #    Linux/FreeBSD.
-        #
-        #    Note we see the untangling of the OS X lldb-centric
-        #    directory structure to the canonical llvm,
-        #    llvm/tools/clang, llvm/tools/lldb structure below.
-        #    We are mapping lldb into a subdirectory of the llvm
-        #    directory.
-        #
-        #    The transfer logic figures out which directories to copy
-        #    first by finding the shortest destination absolute path
-        #    and doing them in that order.  For our case, this ensures
-        #    llvm is copied over before lldb or clang.
-        "dest": {
-            "base_dir": "work/mirror/git",
-            "lldb_dir": "llvm/tools/lldb",
-            "clang_dir": "llvm/tools/clang"
-        }
-    },
-
-    # Describe the lldb-linux destination.  With this,
-    # we're done with the mapping for transfer setup
-    # for the lldb-linux box.  This configuration can
-    # be used either by:
-    # 1. having a parent "default" blockthat points to this one,
-    #    which then gets used by default, or
-    # 2. using the --configuration/-c CONFIG option to
-    #    specify using this name on the syncsource.py command line.
-    {
-        "name": "lldb-linux"
-        "parent": "common_tot",
-
-        # The ssh block is understood by the rsync+ssh transfer
-        # agent.  Other agents would probably require different
-        # agent-specific details that they could read from
-        # other blocks.
-        "ssh": {
-            # This specifies the host name (or IP address) as would
-            # be used as the target for an ssh command.
-            "dest_host": "lldb-linux.example.com",
-
-            # root_dir specifies the global root directory for
-            # this destination.  All destinations on this target
-            # will be in a directory that is built from
-            # root_dir + base_dir + {dir_id}_dir.
-            "root_dir" : "/home/tfiala",
-
-            # The ssh user is specified here.
-            "user": "tfiala",
-
-            # The ssh port is specified here.
-            "port": 22
-        }
-    },
-
-    # Describe the lldb-freebsd destination.
-    # Very similar to the lldb-linux one.
-    {
-        "name": "lldb-freebsd"
-        "parent": "common_tot",
-        "ssh": {
-            "dest_host": "lldb-freebsd.example.com",
-            # Specify a different destination-specific root dir here.
-            "root_dir" : "/mnt/ssd02/fialato",
-            "user": "fialato",
-            # The ssh port is specified here.
-            "port": 2022
-        }
-    },
-
-    # If a block named "default" exists, and if no configuration
-    # is specified on the command line, then the default block
-    # will be used.  Use this block to point to the most common
-    # transfer destination you would use.
-    {
-        "name": "default",
-        "parent": "lldb-linux"
-    }
-]
-}
-
-Using it
-
-Now that we have a .syncsourcerc file set up, we can do a transfer.
-The .syncsourcerc file will be searched for as follows, using the
-first one that is found:
-
-* First check the --rc-file RCFILE option.  If this is specified
-  and doesn't exist, it will raise an error and quit.
-
-* Check if the current directory has a .syncsourcerc file.  If so,
-  use that.
-
-* Use the .syncsourcerc file from the user's home directory.
-
-Run the command:
-python /path/to/syncsource.rc -c {configuration-name}
-
-The -c {configuration-name} can be left off, in which case a
-configuration with the name 'default' will be used.
-
-After that, the transfer will occur.  With the rsync-over-ssh
-transfer agent, one rsync per dir-id will be used.  rsync output
-is redirected to the console.
-
-FEEDBACK
-
-Feel free to pass feedback along to Todd Fiala ([email protected]).
diff --git a/src/llvm-project/lldb/utils/sync-source/lib/transfer/__init__.py b/src/llvm-project/lldb/utils/sync-source/lib/transfer/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/src/llvm-project/lldb/utils/sync-source/lib/transfer/__init__.py
+++ /dev/null
diff --git a/src/llvm-project/lldb/utils/sync-source/lib/transfer/protocol.py b/src/llvm-project/lldb/utils/sync-source/lib/transfer/protocol.py
deleted file mode 100644
index 0f89db7..0000000
--- a/src/llvm-project/lldb/utils/sync-source/lib/transfer/protocol.py
+++ /dev/null
@@ -1,8 +0,0 @@
-class Protocol(object):
-
-    def __init__(self, options, config):
-        self.options = options
-        self.config = config
-
-    def transfer(transfer_specs, dry_run):
-        raise "transfer must be overridden by transfer implementation"
diff --git a/src/llvm-project/lldb/utils/sync-source/lib/transfer/rsync.py b/src/llvm-project/lldb/utils/sync-source/lib/transfer/rsync.py
deleted file mode 100644
index b90d108..0000000
--- a/src/llvm-project/lldb/utils/sync-source/lib/transfer/rsync.py
+++ /dev/null
@@ -1,61 +0,0 @@
-import os.path
-import pprint
-import subprocess
-import sys
-
-import transfer.protocol
-
-
-class RsyncOverSsh(transfer.protocol.Protocol):
-
-    def __init__(self, options, config):
-        super(RsyncOverSsh, self).__init__(options, config)
-        self.ssh_config = config.get_value("ssh")
-
-    def build_rsync_command(self, transfer_spec, dry_run):
-        dest_path = os.path.join(
-            self.ssh_config["root_dir"],
-            transfer_spec.dest_path)
-        flags = "-avz"
-        if dry_run:
-            flags += "n"
-        cmd = [
-            "rsync",
-            flags,
-            "-e",
-            "ssh -p {}".format(self.ssh_config["port"]),
-            "--rsync-path",
-            # The following command needs to know the right way to do
-            # this on the dest platform - ensures the target dir exists.
-            "mkdir -p {} && rsync".format(dest_path)
-        ]
-
-        # Add source dir exclusions
-        if transfer_spec.exclude_paths:
-            for exclude_path in transfer_spec.exclude_paths:
-                cmd.append("--exclude")
-                cmd.append(exclude_path)
-
-        cmd.extend([
-            "--delete",
-            transfer_spec.source_path + "/",
-            "{}@{}:{}".format(
-                self.ssh_config["user"],
-                self.ssh_config["dest_host"],
-                dest_path)])
-        return cmd
-
-    def transfer(self, transfer_specs, dry_run):
-        if self.options.verbose:
-            printer = pprint.PrettyPrinter()
-            for spec in transfer_specs:
-                printer.pprint(spec)
-
-        for spec in transfer_specs:
-            cmd = self.build_rsync_command(spec, dry_run)
-            if self.options.verbose:
-                print("executing the following command:\n{}".format(cmd))
-            result = subprocess.call(
-                cmd, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr)
-            if result != 0:
-                return result
diff --git a/src/llvm-project/lldb/utils/sync-source/lib/transfer/transfer_spec.py b/src/llvm-project/lldb/utils/sync-source/lib/transfer/transfer_spec.py
deleted file mode 100644
index 12da8b6..0000000
--- a/src/llvm-project/lldb/utils/sync-source/lib/transfer/transfer_spec.py
+++ /dev/null
@@ -1,12 +0,0 @@
-class TransferSpec(object):
-
-    def __init__(self, source_path, exclude_paths, dest_path):
-        self.source_path = source_path
-        self.exclude_paths = exclude_paths
-        self.dest_path = dest_path
-
-    def __repr__(self):
-        fmt = (
-            "TransferSpec(source_path='{}', exclude_paths='{}', "
-            "dest_path='{}')")
-        return fmt.format(self.source_path, self.exclude_paths, self.dest_path)
diff --git a/src/llvm-project/lldb/utils/sync-source/pylintrc b/src/llvm-project/lldb/utils/sync-source/pylintrc
deleted file mode 100644
index d20e5bd..0000000
--- a/src/llvm-project/lldb/utils/sync-source/pylintrc
+++ /dev/null
@@ -1,2 +0,0 @@
-[Master]
-init-hook='import os; import sys; sys.path.append(os.path.join(os.getcwd(), "lib")); print("hello from {}".format(os.getcwd()))'
diff --git a/src/llvm-project/lldb/utils/sync-source/syncsource.py b/src/llvm-project/lldb/utils/sync-source/syncsource.py
deleted file mode 100644
index 6cf2612..0000000
--- a/src/llvm-project/lldb/utils/sync-source/syncsource.py
+++ /dev/null
@@ -1,270 +0,0 @@
-#!/usr/bin/env python
-"""
-Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-See https://llvm.org/LICENSE.txt for license information.
-SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-
-Sync lldb and related source from a local machine to a remote machine.
-
-This facilitates working on the lldb sourcecode on multiple machines
-and multiple OS types, verifying changes across all.
-"""
-
-import argparse
-import io
-import importlib
-import json
-import os.path
-import re
-import sys
-
-# Add the local lib directory to the python path.
-LOCAL_LIB_PATH = os.path.join(
-    os.path.dirname(os.path.realpath(__file__)),
-    "lib")
-sys.path.append(LOCAL_LIB_PATH)
-
-import transfer.transfer_spec
-
-
-DOTRC_BASE_FILENAME = ".syncsourcerc"
-
-
-class Configuration(object):
-    """Provides chaining configuration lookup."""
-
-    def __init__(self, rcdata_configs):
-        self.__rcdata_configs = rcdata_configs
-
-    def get_value(self, key):
-        """
-        Return the first value in the parent chain that has the key.
-
-        The traversal starts from the most derived configuration (i.e.
-        child) and works all the way up the parent chain.
-
-        @return the value of the first key in the parent chain that
-        contains a value for the given key.
-        """
-        for config in self.__rcdata_configs:
-            if key in config:
-                return config[key]
-        return None
-
-    def __getitem__(self, key):
-        value = self.get_value(key)
-        if value:
-            return value
-        else:
-            raise KeyError(key)
-
-
-def parse_args():
-    """@return options parsed from the command line."""
-    parser = argparse.ArgumentParser()
-    parser.add_argument(
-        "--config-name", "-c", action="store", default="default",
-        help="specify configuration name to use")
-    parser.add_argument(
-        "--default-excludes", action="store", default="*.git,*.svn,*.pyc",
-        help=("comma-separated list of default file patterns to exclude "
-              "from each source directory and to protect from deletion "
-              "on each destination directory; if starting with forward "
-              "slash, it only matches at the top of the base directory"))
-    parser.add_argument(
-        "--dry-run", "-n", action="store_true",
-        help="do a dry run of the transfer operation, don't really transfer")
-    parser.add_argument(
-        "--rc-file", "-r", action="store",
-        help="specify the sync-source rc file to use for configurations")
-    parser.add_argument(
-        "--verbose", "-v", action="store_true", help="turn on verbose output")
-    return parser.parse_args()
-
-
-def read_rcfile(filename):
-    """Returns the json-parsed contents of the input file."""
-
-    # First parse file contents, removing all comments but
-    # preserving the line count.
-    regex = re.compile(r"#.*$")
-
-    comment_stripped_file = io.StringIO()
-    with open(filename, "r") as json_file:
-        for line in json_file:
-            comment_stripped_file.write(regex.sub("", line))
-    return json.load(io.StringIO(comment_stripped_file.getvalue()))
-
-
-def find_appropriate_rcfile(options):
-    # Use an options-specified rcfile if specified.
-    if options.rc_file and len(options.rc_file) > 0:
-        if not os.path.isfile(options.rc_file):
-            # If it doesn't exist, error out here.
-            raise "rcfile '{}' specified but doesn't exist".format(
-                options.rc_file)
-        return options.rc_file
-
-    # Check if current directory .sync-sourcerc exists.  If so, use it.
-    local_rc_filename = os.path.abspath(DOTRC_BASE_FILENAME)
-    if os.path.isfile(local_rc_filename):
-        return local_rc_filename
-
-    # Check if home directory .sync-sourcerc exists.  If so, use it.
-    homedir_rc_filename = os.path.abspath(
-        os.path.join(os.path.expanduser("~"), DOTRC_BASE_FILENAME))
-    if os.path.isfile(homedir_rc_filename):
-        return homedir_rc_filename
-
-    # Nothing matched.  We don't have an rc filename candidate.
-    return None
-
-
-def get_configuration(options, rcdata, config_name):
-    rcdata_configs = []
-    next_config_name = config_name
-    while next_config_name:
-        # Find the next rcdata configuration for the given name.
-        rcdata_config = next(
-            config for config in rcdata["configurations"]
-            if config["name"] == next_config_name)
-
-        # See if we found it.
-        if rcdata_config:
-            # This is our next configuration to use in the chain.
-            rcdata_configs.append(rcdata_config)
-
-            # If we have a parent, check that next.
-            if "parent" in rcdata_config:
-                next_config_name = rcdata_config["parent"]
-            else:
-                next_config_name = None
-        else:
-            raise "failed to find specified parent config '{}'".format(
-                next_config_name)
-    return Configuration(rcdata_configs)
-
-
-def create_transfer_agent(options, configuration):
-    transfer_class_spec = configuration.get_value("transfer_class")
-    if options.verbose:
-        print("specified transfer class: '{}'".format(transfer_class_spec))
-
-    # Load the module (possibly package-qualified).
-    components = transfer_class_spec.split(".")
-    module = importlib.import_module(".".join(components[:-1]))
-
-    # Create the class name we need to load.
-    clazz = getattr(module, components[-1])
-    return clazz(options, configuration)
-
-
-def sync_configured_sources(options, configuration, default_excludes):
-    # Look up the transfer method.
-    transfer_agent = create_transfer_agent(options, configuration)
-
-    # For each configured dir_names source, do the following transfer:
-    #   1. Start with base_dir + {source-dir-name}_dir
-    #   2. Copy all files recursively, but exclude
-    #      all dirs specified by source_excludes:
-    #      skip all base_dir + {source-dir-name}_dir +
-    #      {source-dir-name}_dir excludes.
-    source_dirs = configuration.get_value("source")
-    source_excludes = configuration.get_value("source_excludes")
-    dest_dirs = configuration.get_value("dest")
-
-    source_base_dir = source_dirs["base_dir"]
-    dest_base_dir = dest_dirs["base_dir"]
-    dir_ids = configuration.get_value("dir_names")
-    transfer_specs = []
-
-    for dir_id in dir_ids:
-        dir_key = "{}_dir".format(dir_id)
-
-        # Build the source dir (absolute) that we're copying from.
-        # Defaults the base-relative source dir to the source id (e.g. lldb)
-        rel_source_dir = source_dirs.get(dir_key, dir_id)
-        transfer_source_dir = os.path.expanduser(
-            os.path.join(source_base_dir, rel_source_dir))
-
-        # Exclude dirs do two things:
-        # 1) stop items from being copied on the source side, and
-        # 2) protect things from being deleted on the dest side.
-        #
-        # In both cases, they are specified relative to the base
-        # directory on either the source or dest side.
-        #
-        # Specifying a leading '/' in the directory will limit it to
-        # be rooted in the base directory.  i.e. "/.git" will only
-        # match {base-dir}/.git, not {base-dir}/subdir/.git, but
-        # ".svn" will match {base-dir}/.svn and
-        # {base-dir}/subdir/.svn.
-        #
-        # If excludes are specified for this dir_id, then pass along
-        # the excludes.  These are relative to the dir_id directory
-        # source, and get passed along that way as well.
-        transfer_source_excludes = []
-
-        # Add the source excludes for this dir.
-        skip_defaults = False
-        if source_excludes and dir_key in source_excludes:
-            transfer_source_excludes.extend(source_excludes[dir_key])
-            if "<no-defaults>" in source_excludes[dir_key]:
-                skip_defaults = True
-                transfer_source_excludes.remove("<no-defaults>")
-
-        if not skip_defaults and default_excludes is not None:
-            transfer_source_excludes.extend(list(default_excludes))
-
-        # Build the destination-base-relative dest dir into which
-        # we'll be syncing.  Relative directory defaults to the
-        # dir id
-        rel_dest_dir = dest_dirs.get(dir_key, dir_id)
-        transfer_dest_dir = os.path.join(dest_base_dir, rel_dest_dir)
-
-        # Add the exploded paths to the list that we'll ask the
-        # transfer agent to transfer for us.
-        transfer_specs.append(
-            transfer.transfer_spec.TransferSpec(
-                transfer_source_dir,
-                transfer_source_excludes,
-                transfer_dest_dir))
-
-    # Do the transfer.
-    if len(transfer_specs) > 0:
-        transfer_agent.transfer(transfer_specs, options.dry_run)
-    else:
-        raise Exception("nothing to transfer, bad configuration?")
-
-
-def main():
-    """Drives the main program."""
-    options = parse_args()
-
-    if options.default_excludes and len(options.default_excludes) > 0:
-        default_excludes = options.default_excludes.split(",")
-    else:
-        default_excludes = []
-
-    # Locate the rc filename to load, then load it.
-    rc_filename = find_appropriate_rcfile(options)
-    if rc_filename:
-        if options.verbose:
-            print("reading rc data from file '{}'".format(rc_filename))
-        rcdata = read_rcfile(rc_filename)
-    else:
-        sys.stderr.write("no rcfile specified, cannot guess configuration")
-        exit(1)
-
-    # Find configuration.
-    configuration = get_configuration(options, rcdata, options.config_name)
-    if not configuration:
-        sys.stderr.write("failed to find configuration for {}".format(
-            options.config_data))
-        exit(2)
-
-    # Kick off the transfer.
-    sync_configured_sources(options, configuration, default_excludes)
-
-if __name__ == "__main__":
-    main()
diff --git a/src/llvm-project/lldb/utils/vim-lldb/README b/src/llvm-project/lldb/utils/vim-lldb/README
deleted file mode 100644
index 721054a..0000000
--- a/src/llvm-project/lldb/utils/vim-lldb/README
+++ /dev/null
@@ -1,59 +0,0 @@
-
-=================
-LLDB Vim Frontend
-=================
-
-Prerequisites
--------------
-
-This plugin is known to work with the following flavours of Vim:
-
-  * Linux (tested on Ubuntu 12.04/12.10):
-      * vim/gvim (from vim-gnome package version 7.3)
-
-  * Mac OS X (tested on Mountain Lion)
-      * Vim command-line (7.3 from Xcode)
-      * MacVim 7.3
-
-To install the plugin, ensure you have
-  * a working version of lldb on your path, or the environment variable LLDB
-    pointing to the lldb binary you would like to use.
-  * a python-enabled vim (check with ":python print 2")
-
-
-Installation
-------------
-
-1) Install the Vim pathogen plugin (it keeps installed plugins organized):
-
-    https://github.com/tpope/vim-pathogen
-
-  Or, for the impatient:
-
-mkdir -p ~/.vim/autoload ~/.vim/bundle; \
-curl -Sso ~/.vim/autoload/pathogen.vim \
-    https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
-
-2) Symlink (or copy) ~/.vim/bundle/vim-lldb to this directory:
-
-ln -sf <lldb-dir>/utils/vim-lldb ~/.vim/bundle/vim-lldb
-
-3) Update your help-tags. Start vim, do:
-
-    :Helptags
-
-4) Have fun!
-
-
-Usage/Getting Help
-------------------
-All LLDB commands (with tab-completion) can be accessed in Vim's
-command mode. Try it out by typing:
-
-:L<tab>
-
-There are several sources of help available:
-
-:help lldb                  -- Documentation for this plugin
-:Lhelp                      -- LLDB's built-in help system (i.e lldb 'help' command)
-:Lscript help (lldb)        -- Complete LLDB Python API reference
diff --git a/src/llvm-project/lldb/utils/vim-lldb/doc/lldb.txt b/src/llvm-project/lldb/utils/vim-lldb/doc/lldb.txt
deleted file mode 100644
index e7415d9..0000000
--- a/src/llvm-project/lldb/utils/vim-lldb/doc/lldb.txt
+++ /dev/null
@@ -1,115 +0,0 @@
-*lldb.txt* A plugin that enables debugging from your favourite editor
-
-Author:   Daniel Malea <[email protected]>
-License:  Same terms as Vim itself (see |license|)
-
-INTRODUCTION                                    *lldb*
-
-Installing this plugin enables a set of commands in Vim to control the
-LLDB (http://lldb.llvm.org) debugger.
-
-COMMANDS                                        *lldb-commands*
-
-The LLDB command interpreter is exposed to Vim's command mode using the
-':L' prefix. Tab-completion is available and will cycle through commands.
-Some commands have modified behaviour in Vim; for example, :Lbreakpoint
-with no arguments will set a breakpoint at the current cursor, rather than
-printing the standard help information for the LLDB command 'breakpoint'.
-
-                                                *lldb-windows*
-
-In addition to the standard commands available under the LLDB interpreter,
-there are also commands to display or hide informational debugger panes.
-
-Windows can be shown or hidden using the ':Lhide <name>' or ':Lshow <name>'
-commands.
-                                                *lldb-:Lhide*
-:Lhide [windowname]     Hide informational debugger pane named 'windowname'. 
-
-                                                *lldb-:Lshow*
-:Lshow [windowname]     Show informational debugger pane named 'windowname'. 
-
-Possible window name arguments to the Lhide and Lshow commands include:
-
-    * backtrace
-    * breakpoints
-    * disassembly
-    * locals
-    * registers
-    * threads
-                                                *lldb-:Lattach*
-:Lattach <process-name> Attach to a process by name.
-
-                                                *lldb-:Ldetach*
-:Ldetach                Detach from the current process.
-
-                                                *lldb-:Ltarget*
-:Ltarget [[create] executable]
-                        Create a target with the specified executable. If
-                        run with a single argument, that argument is assumed
-                        to be a path to the executable to be debugged.
-                        Otherwise, all arguments are passed into LLDB's command
-                        interpreter.
-
-                                                *lldb-:Lstart*
-:Lstart                 Create a process by executing the current target
-                        and wait for LLDB to attach.
-
-                                                *lldb-:Lrun*
-:Lrun                   Create a process by executing the current target
-                        without waiting for LLDB to attach.
-
-                                                *lldb-:Lcontinue*
-:Lcontinue              Continue execution of the process until the next
-                        breakpoint is hit or the process exits.
-
-                                                *lldb-:Lthread*
-:Lthread <args>         Passes through to LLDB. See :Lhelp thread. 
-
-                                                *lldb-:Lstep*
-:Lstep                  Step into the current function call.
-
-                                                *lldb-:Lstepin*
-:Lstepin                Step into the current function call.
-
-                                                *lldb-:Lstepinst*
-:Lstepinst              Step one instruction.
-
-                                                *lldb-:Lstepinstover*
-:Lstepinstover          Step one instruction, but skip over jump or call
-                        instructions.
-
-                                                *lldb-:Lnext*
-:Lnext                  Step to the next line.
-
-                                                *lldb-:Lfinish*
-:Lfinish                Step out of the current function.
-
-                                                *lldb-:Lbreakpoint*
-:Lbreakpoint [args]     When arguments are provided, the lldb breakpoint
-                        command is invoked. If no arguments are provided,
-                        a breakpoint at the location under the cursor.
-
-                                                *lldb-:Lprint*
-                                                *lldb-:Lpo*
-                                                *lldb-:LpO*
-:Lprint <expr>          Aliases to the lldb print and po commands. Cursor
-:Lpo <expr>             word (cursor WORD for LpO) will be used when 
-:LpO <expr>             expression omitted.
-
-MAPPINGS                                        *lldb-mappings*
-
-On Mac OS X (under MacVim) , the following key mappings are available:
-
-<Command-B>             Insert a breakpoint at the line under cursor
-
-
-ABOUT                                           *lldb-about*
-
-Grab the latest version of this plugin (and LLDB sources) with:
-  git clone https://github.com/llvm/llvm-project.git
-
-File any bugs at:
-  http://llvm.org/bugs/enter_bug.cgi?product=lldb
-
- vim:tw=78:et:ft=help:norl:
diff --git a/src/llvm-project/lldb/utils/vim-lldb/plugin/lldb.vim b/src/llvm-project/lldb/utils/vim-lldb/plugin/lldb.vim
deleted file mode 100644
index ac5cfe3..0000000
--- a/src/llvm-project/lldb/utils/vim-lldb/plugin/lldb.vim
+++ /dev/null
@@ -1,151 +0,0 @@
-
-" Vim script glue code for LLDB integration
-
-function! s:FindPythonScriptDir()
-  for dir in pathogen#split(&runtimepath)
-    let searchstr = "python-vim-lldb"
-    let candidates = pathogen#glob_directories(dir . "/" . searchstr)
-    if len(candidates) > 0
-      return candidates[0]
-    endif
-  endfor
-  return
-endfunction()
-
-function! s:InitLldbPlugin()
-  if has('python') == 0
-    call confirm('ERROR: This Vim installation does not have python support. lldb.vim will not work.')
-    return
-  endif
-  
-  " Key-Bindings
-  " FIXME: choose sensible keybindings for:
-  " - process: start, interrupt, continue, continue-to-cursor
-  " - step: instruction, in, over, out
-  "
-  if has('gui_macvim')
-    " Apple-B toggles breakpoint on cursor
-    map <D-B>     :Lbreakpoint<CR>
-  endif
-
-  "
-  " Setup the python interpreter path
-  "
-  let vim_lldb_pydir = s:FindPythonScriptDir()
-  execute 'python import sys; sys.path.append("' . vim_lldb_pydir . '")'
-
-  "
-  " Register :L<Command>
-  " The LLDB CommandInterpreter provides tab-completion in Vim's command mode.
-  " FIXME: this list of commands, at least partially should be auto-generated
-  "
-
-  " Window show/hide commands
-  command -complete=custom,s:CompleteWindow -nargs=1 Lhide               python ctrl.doHide('<args>')
-  command -complete=custom,s:CompleteWindow -nargs=0 Lshow               python ctrl.doShow('<args>')
- 
-  " Launching convenience commands (no autocompletion)
-  command -nargs=* Lstart                                                python ctrl.doLaunch(True,  '<args>')
-  command -nargs=* Lrun                                                  python ctrl.doLaunch(False, '<args>')
-  command -nargs=1 Lattach                                               python ctrl.doAttach('<args>')
-  command -nargs=0 Ldetach                                               python ctrl.doDetach()
-
-  " Regexp-commands: because vim's command mode does not support '_' or '-'
-  " characters in command names, we omit them when creating the :L<cmd>
-  " equivalents.
-  command -complete=custom,s:CompleteCommand -nargs=* Lregexpattach      python ctrl.doCommand('_regexp-attach', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lregexpbreak       python ctrl.doCommand('_regexp-break', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lregexpbt          python ctrl.doCommand('_regexp-bt', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lregexpdown        python ctrl.doCommand('_regexp-down', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lregexptbreak      python ctrl.doCommand('_regexp-tbreak', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lregexpdisplay     python ctrl.doCommand('_regexp-display', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lregexpundisplay   python ctrl.doCommand('_regexp-undisplay', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lregexpup          python ctrl.doCommand('_regexp-up', '<args>')
-
-  command -complete=custom,s:CompleteCommand -nargs=* Lapropos           python ctrl.doCommand('apropos', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lbacktrace         python ctrl.doCommand('bt', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lbreakpoint        python ctrl.doBreakpoint('<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lcommand           python ctrl.doCommand('command', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Ldisassemble       python ctrl.doCommand('disassemble', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lexpression        python ctrl.doCommand('expression', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lhelp              python ctrl.doCommand('help', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Llog               python ctrl.doCommand('log', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lplatform          python ctrl.doCommand('platform','<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lplugin            python ctrl.doCommand('plugin', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lprocess           python ctrl.doProcess('<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lregister          python ctrl.doCommand('register', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lscript            python ctrl.doCommand('script', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lsettings          python ctrl.doCommand('settings','<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lsource            python ctrl.doCommand('source', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Ltype              python ctrl.doCommand('type', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lversion           python ctrl.doCommand('version', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=* Lwatchpoint        python ctrl.doCommand('watchpoint', '<args>')
- 
-  " Convenience (shortcut) LLDB commands
-  command -complete=custom,s:CompleteCommand -nargs=* Lprint             python ctrl.doCommand('print', vim.eval("s:CursorWord('<args>')"))
-  command -complete=custom,s:CompleteCommand -nargs=* Lpo                python ctrl.doCommand('po', vim.eval("s:CursorWord('<args>')"))
-  command -complete=custom,s:CompleteCommand -nargs=* LpO                python ctrl.doCommand('po', vim.eval("s:CursorWORD('<args>')"))
-  command -complete=custom,s:CompleteCommand -nargs=* Lbt                python ctrl.doCommand('bt', '<args>')
-
-  " Frame/Thread-Selection (commands that also do an Uupdate but do not
-  " generate events in LLDB)
-  command -complete=custom,s:CompleteCommand -nargs=* Lframe             python ctrl.doSelect('frame', '<args>')
-  command -complete=custom,s:CompleteCommand -nargs=? Lup                python ctrl.doCommand('up', '<args>',     print_on_success=False, goto_file=True)
-  command -complete=custom,s:CompleteCommand -nargs=? Ldown              python ctrl.doCommand('down', '<args>', print_on_success=False, goto_file=True)
-  command -complete=custom,s:CompleteCommand -nargs=* Lthread            python ctrl.doSelect('thread', '<args>')
-
-  command -complete=custom,s:CompleteCommand -nargs=* Ltarget            python ctrl.doTarget('<args>')
-
-  " Continue
-  command -complete=custom,s:CompleteCommand -nargs=* Lcontinue          python ctrl.doContinue()
-
-  " Thread-Stepping (no autocompletion)
-  command -nargs=0 Lstepinst                                             python ctrl.doStep(StepType.INSTRUCTION)
-  command -nargs=0 Lstepinstover                                         python ctrl.doStep(StepType.INSTRUCTION_OVER)
-  command -nargs=0 Lstepin                                               python ctrl.doStep(StepType.INTO)
-  command -nargs=0 Lstep                                                 python ctrl.doStep(StepType.INTO)
-  command -nargs=0 Lnext                                                 python ctrl.doStep(StepType.OVER)
-  command -nargs=0 Lfinish                                               python ctrl.doStep(StepType.OUT)
-
-  " hack: service the LLDB event-queue when the cursor moves
-  " FIXME: some threaded solution would be better...but it
-  "        would have to be designed carefully because Vim's APIs are non threadsafe;
-  "        use of the vim module **MUST** be restricted to the main thread.
-  command -nargs=0 Lrefresh python ctrl.doRefresh()
-  autocmd CursorMoved * :Lrefresh
-  autocmd CursorHold  * :Lrefresh
-  autocmd VimLeavePre * python ctrl.doExit()
-
-  execute 'pyfile ' . vim_lldb_pydir . '/plugin.py'
-endfunction()
-
-function! s:CompleteCommand(A, L, P)
-  python << EOF
-a = vim.eval("a:A")
-l = vim.eval("a:L")
-p = vim.eval("a:P")
-returnCompleteCommand(a, l, p)
-EOF
-endfunction()
-
-function! s:CompleteWindow(A, L, P)
-  python << EOF
-a = vim.eval("a:A")
-l = vim.eval("a:L")
-p = vim.eval("a:P")
-returnCompleteWindow(a, l, p)
-EOF
-endfunction()
-
-" Returns cword if search term is empty
-function! s:CursorWord(term) 
-  return empty(a:term) ? expand('<cword>') : a:term 
-endfunction()
-
-" Returns cleaned cWORD if search term is empty
-function! s:CursorWORD(term) 
-  " Will strip all non-alphabetic characters from both sides
-  return empty(a:term) ?  substitute(expand('<cWORD>'), '^\A*\(.\{-}\)\A*$', '\1', '') : a:term 
-endfunction()
-
-call s:InitLldbPlugin()
diff --git a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/import_lldb.py b/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/import_lldb.py
deleted file mode 100644
index 41cb42b..0000000
--- a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/import_lldb.py
+++ /dev/null
@@ -1,71 +0,0 @@
-
-# Locate and load the lldb python module
-
-import os
-import sys
-
-
-def import_lldb():
-    """ Find and import the lldb modules. This function tries to find the lldb module by:
-        1. Simply by doing "import lldb" in case the system python installation is aware of lldb. If that fails,
-        2. Executes the lldb executable pointed to by the LLDB environment variable (or if unset, the first lldb
-           on PATH") with the -P flag to determine the PYTHONPATH to set. If the lldb executable returns a valid
-           path, it is added to sys.path and the import is attempted again. If that fails, 3. On Mac OS X the
-           default Xcode 4.5 installation path.
-    """
-
-    # Try simple 'import lldb', in case of a system-wide install or a
-    # pre-configured PYTHONPATH
-    try:
-        import lldb
-        return True
-    except ImportError:
-        pass
-
-    # Allow overriding default path to lldb executable with the LLDB
-    # environment variable
-    lldb_executable = 'lldb'
-    if 'LLDB' in os.environ and os.path.exists(os.environ['LLDB']):
-        lldb_executable = os.environ['LLDB']
-
-    # Try using builtin module location support ('lldb -P')
-    from subprocess import check_output, CalledProcessError
-    try:
-        with open(os.devnull, 'w') as fnull:
-            lldb_minus_p_path = check_output(
-                "%s -P" %
-                lldb_executable,
-                shell=True,
-                stderr=fnull).strip()
-        if not os.path.exists(lldb_minus_p_path):
-            # lldb -P returned invalid path, probably too old
-            pass
-        else:
-            sys.path.append(lldb_minus_p_path)
-            import lldb
-            return True
-    except CalledProcessError:
-        # Cannot run 'lldb -P' to determine location of lldb python module
-        pass
-    except ImportError:
-        # Unable to import lldb module from path returned by `lldb -P`
-        pass
-
-    # On Mac OS X, use the try the default path to XCode lldb module
-    if "darwin" in sys.platform:
-        xcode_python_path = "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/Current/Resources/Python/"
-        sys.path.append(xcode_python_path)
-        try:
-            import lldb
-            return True
-        except ImportError:
-            # Unable to import lldb module from default Xcode python path
-            pass
-
-    return False
-
-if not import_lldb():
-    import vim
-    vim.command(
-        'redraw | echo "%s"' %
-        " Error loading lldb module; vim-lldb will be disabled. Check LLDB installation or set LLDB environment variable.")
diff --git a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/lldb_controller.py b/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/lldb_controller.py
deleted file mode 100644
index 0e59cc5..0000000
--- a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/lldb_controller.py
+++ /dev/null
@@ -1,415 +0,0 @@
-
-#
-# This file defines the layer that talks to lldb
-#
-
-from __future__ import print_function
-
-import os
-import re
-import sys
-import lldb
-import vim
-from vim_ui import UI
-
-# =================================================
-# Convert some enum value to its string counterpart
-# =================================================
-
-# Shamelessly copy/pasted from lldbutil.py in the test suite
-
-
-def state_type_to_str(enum):
-    """Returns the stateType string given an enum."""
-    if enum == lldb.eStateInvalid:
-        return "invalid"
-    elif enum == lldb.eStateUnloaded:
-        return "unloaded"
-    elif enum == lldb.eStateConnected:
-        return "connected"
-    elif enum == lldb.eStateAttaching:
-        return "attaching"
-    elif enum == lldb.eStateLaunching:
-        return "launching"
-    elif enum == lldb.eStateStopped:
-        return "stopped"
-    elif enum == lldb.eStateRunning:
-        return "running"
-    elif enum == lldb.eStateStepping:
-        return "stepping"
-    elif enum == lldb.eStateCrashed:
-        return "crashed"
-    elif enum == lldb.eStateDetached:
-        return "detached"
-    elif enum == lldb.eStateExited:
-        return "exited"
-    elif enum == lldb.eStateSuspended:
-        return "suspended"
-    else:
-        raise Exception("Unknown StateType enum")
-
-
-class StepType:
-    INSTRUCTION = 1
-    INSTRUCTION_OVER = 2
-    INTO = 3
-    OVER = 4
-    OUT = 5
-
-
-class LLDBController(object):
-    """ Handles Vim and LLDB events such as commands and lldb events. """
-
-    # Timeouts (sec) for waiting on new events. Because vim is not multi-threaded, we are restricted to
-    # servicing LLDB events from the main UI thread. Usually, we only process events that are already
-    # sitting on the queue. But in some situations (when we are expecting an event as a result of some
-    # user interaction) we want to wait for it. The constants below set these wait period in which the
-    # Vim UI is "blocked". Lower numbers will make Vim more responsive, but LLDB will be delayed and higher
-    # numbers will mean that LLDB events are processed faster, but the Vim UI may appear less responsive at
-    # times.
-    eventDelayStep = 2
-    eventDelayLaunch = 1
-    eventDelayContinue = 1
-
-    def __init__(self):
-        """ Creates the LLDB SBDebugger object and initializes the UI class. """
-        self.target = None
-        self.process = None
-        self.load_dependent_modules = True
-
-        self.dbg = lldb.SBDebugger.Create()
-        self.commandInterpreter = self.dbg.GetCommandInterpreter()
-
-        self.ui = UI()
-
-    def completeCommand(self, a, l, p):
-        """ Returns a list of viable completions for command a with length l and cursor at p  """
-
-        assert l[0] == 'L'
-        # Remove first 'L' character that all commands start with
-        l = l[1:]
-
-        # Adjust length as string has 1 less character
-        p = int(p) - 1
-
-        result = lldb.SBStringList()
-        num = self.commandInterpreter.HandleCompletion(l, p, 1, -1, result)
-
-        if num == -1:
-            # FIXME: insert completion character... what's a completion
-            # character?
-            pass
-        elif num == -2:
-            # FIXME: replace line with result.GetStringAtIndex(0)
-            pass
-
-        if result.GetSize() > 0:
-            results = [_f for _f in [result.GetStringAtIndex(x)
-                                    for x in range(result.GetSize())] if _f]
-            return results
-        else:
-            return []
-
-    def doStep(self, stepType):
-        """ Perform a step command and block the UI for eventDelayStep seconds in order to process
-            events on lldb's event queue.
-            FIXME: if the step does not complete in eventDelayStep seconds, we relinquish control to
-                   the main thread to avoid the appearance of a "hang". If this happens, the UI will
-                   update whenever; usually when the user moves the cursor. This is somewhat annoying.
-        """
-        if not self.process:
-            sys.stderr.write("No process to step")
-            return
-
-        t = self.process.GetSelectedThread()
-        if stepType == StepType.INSTRUCTION:
-            t.StepInstruction(False)
-        if stepType == StepType.INSTRUCTION_OVER:
-            t.StepInstruction(True)
-        elif stepType == StepType.INTO:
-            t.StepInto()
-        elif stepType == StepType.OVER:
-            t.StepOver()
-        elif stepType == StepType.OUT:
-            t.StepOut()
-
-        self.processPendingEvents(self.eventDelayStep, True)
-
-    def doSelect(self, command, args):
-        """ Like doCommand, but suppress output when "select" is the first argument."""
-        a = args.split(' ')
-        return self.doCommand(command, args, "select" != a[0], True)
-
-    def doProcess(self, args):
-        """ Handle 'process' command. If 'launch' is requested, use doLaunch() instead
-            of the command interpreter to start the inferior process.
-        """
-        a = args.split(' ')
-        if len(args) == 0 or (len(a) > 0 and a[0] != 'launch'):
-            self.doCommand("process", args)
-            #self.ui.update(self.target, "", self)
-        else:
-            self.doLaunch('-s' not in args, "")
-
-    def doAttach(self, process_name):
-        """ Handle process attach.  """
-        error = lldb.SBError()
-
-        self.processListener = lldb.SBListener("process_event_listener")
-        self.target = self.dbg.CreateTarget('')
-        self.process = self.target.AttachToProcessWithName(
-            self.processListener, process_name, False, error)
-        if not error.Success():
-            sys.stderr.write("Error during attach: " + str(error))
-            return
-
-        self.ui.activate()
-        self.pid = self.process.GetProcessID()
-
-        print("Attached to %s (pid=%d)" % (process_name, self.pid))
-
-    def doDetach(self):
-        if self.process is not None and self.process.IsValid():
-            pid = self.process.GetProcessID()
-            state = state_type_to_str(self.process.GetState())
-            self.process.Detach()
-            self.processPendingEvents(self.eventDelayLaunch)
-
-    def doLaunch(self, stop_at_entry, args):
-        """ Handle process launch.  """
-        error = lldb.SBError()
-
-        fs = self.target.GetExecutable()
-        exe = os.path.join(fs.GetDirectory(), fs.GetFilename())
-        if self.process is not None and self.process.IsValid():
-            pid = self.process.GetProcessID()
-            state = state_type_to_str(self.process.GetState())
-            self.process.Destroy()
-
-        launchInfo = lldb.SBLaunchInfo(args.split(' '))
-        self.process = self.target.Launch(launchInfo, error)
-        if not error.Success():
-            sys.stderr.write("Error during launch: " + str(error))
-            return
-
-        # launch succeeded, store pid and add some event listeners
-        self.pid = self.process.GetProcessID()
-        self.processListener = lldb.SBListener("process_event_listener")
-        self.process.GetBroadcaster().AddListener(
-            self.processListener, lldb.SBProcess.eBroadcastBitStateChanged)
-
-        print("Launched %s %s (pid=%d)" % (exe, args, self.pid))
-
-        if not stop_at_entry:
-            self.doContinue()
-        else:
-            self.processPendingEvents(self.eventDelayLaunch)
-
-    def doTarget(self, args):
-        """ Pass target command to interpreter, except if argument is not one of the valid options, or
-            is create, in which case try to create a target with the argument as the executable. For example:
-              target list        ==> handled by interpreter
-              target create blah ==> custom creation of target 'blah'
-              target blah        ==> also creates target blah
-        """
-        target_args = [  # "create",
-            "delete",
-            "list",
-            "modules",
-            "select",
-            "stop-hook",
-            "symbols",
-            "variable"]
-
-        a = args.split(' ')
-        if len(args) == 0 or (len(a) > 0 and a[0] in target_args):
-            self.doCommand("target", args)
-            return
-        elif len(a) > 1 and a[0] == "create":
-            exe = a[1]
-        elif len(a) == 1 and a[0] not in target_args:
-            exe = a[0]
-
-        err = lldb.SBError()
-        self.target = self.dbg.CreateTarget(
-            exe, None, None, self.load_dependent_modules, err)
-        if not self.target:
-            sys.stderr.write(
-                "Error creating target %s. %s" %
-                (str(exe), str(err)))
-            return
-
-        self.ui.activate()
-        self.ui.update(self.target, "created target %s" % str(exe), self)
-
-    def doContinue(self):
-        """ Handle 'contiue' command.
-            FIXME: switch to doCommand("continue", ...) to handle -i ignore-count param.
-        """
-        if not self.process or not self.process.IsValid():
-            sys.stderr.write("No process to continue")
-            return
-
-        self.process.Continue()
-        self.processPendingEvents(self.eventDelayContinue)
-
-    def doBreakpoint(self, args):
-        """ Handle breakpoint command with command interpreter, except if the user calls
-            "breakpoint" with no other args, in which case add a breakpoint at the line
-            under the cursor.
-        """
-        a = args.split(' ')
-        if len(args) == 0:
-            show_output = False
-
-            # User called us with no args, so toggle the bp under cursor
-            cw = vim.current.window
-            cb = vim.current.buffer
-            name = cb.name
-            line = cw.cursor[0]
-
-            # Since the UI is responsbile for placing signs at bp locations, we have to
-            # ask it if there already is one or more breakpoints at (file,
-            # line)...
-            if self.ui.haveBreakpoint(name, line):
-                bps = self.ui.getBreakpoints(name, line)
-                args = "delete %s" % " ".join([str(b.GetID()) for b in bps])
-                self.ui.deleteBreakpoints(name, line)
-            else:
-                args = "set -f %s -l %d" % (name, line)
-        else:
-            show_output = True
-
-        self.doCommand("breakpoint", args, show_output)
-        return
-
-    def doRefresh(self):
-        """ process pending events and update UI on request """
-        status = self.processPendingEvents()
-
-    def doShow(self, name):
-        """ handle :Lshow <name> """
-        if not name:
-            self.ui.activate()
-            return
-
-        if self.ui.showWindow(name):
-            self.ui.update(self.target, "", self)
-
-    def doHide(self, name):
-        """ handle :Lhide <name> """
-        if self.ui.hideWindow(name):
-            self.ui.update(self.target, "", self)
-
-    def doExit(self):
-        self.dbg.Terminate()
-        self.dbg = None
-
-    def getCommandResult(self, command, command_args):
-        """ Run cmd in the command interpreter and returns (success, output) """
-        result = lldb.SBCommandReturnObject()
-        cmd = "%s %s" % (command, command_args)
-
-        self.commandInterpreter.HandleCommand(cmd, result)
-        return (result.Succeeded(), result.GetOutput()
-                if result.Succeeded() else result.GetError())
-
-    def doCommand(
-            self,
-            command,
-            command_args,
-            print_on_success=True,
-            goto_file=False):
-        """ Run cmd in interpreter and print result (success or failure) on the vim status line. """
-        (success, output) = self.getCommandResult(command, command_args)
-        if success:
-            self.ui.update(self.target, "", self, goto_file)
-            if len(output) > 0 and print_on_success:
-                print(output)
-        else:
-            sys.stderr.write(output)
-
-    def getCommandOutput(self, command, command_args=""):
-        """ runs cmd in the command interpreter andreturns (status, result) """
-        result = lldb.SBCommandReturnObject()
-        cmd = "%s %s" % (command, command_args)
-        self.commandInterpreter.HandleCommand(cmd, result)
-        return (result.Succeeded(), result.GetOutput()
-                if result.Succeeded() else result.GetError())
-
-    def processPendingEvents(self, wait_seconds=0, goto_file=True):
-        """ Handle any events that are queued from the inferior.
-            Blocks for at most wait_seconds, or if wait_seconds == 0,
-            process only events that are already queued.
-        """
-
-        status = None
-        num_events_handled = 0
-
-        if self.process is not None:
-            event = lldb.SBEvent()
-            old_state = self.process.GetState()
-            new_state = None
-            done = False
-            if old_state == lldb.eStateInvalid or old_state == lldb.eStateExited:
-                # Early-exit if we are in 'boring' states
-                pass
-            else:
-                while not done and self.processListener is not None:
-                    if not self.processListener.PeekAtNextEvent(event):
-                        if wait_seconds > 0:
-                            # No events on the queue, but we are allowed to wait for wait_seconds
-                            # for any events to show up.
-                            self.processListener.WaitForEvent(
-                                wait_seconds, event)
-                            new_state = lldb.SBProcess.GetStateFromEvent(event)
-
-                            num_events_handled += 1
-
-                        done = not self.processListener.PeekAtNextEvent(event)
-                    else:
-                        # An event is on the queue, process it here.
-                        self.processListener.GetNextEvent(event)
-                        new_state = lldb.SBProcess.GetStateFromEvent(event)
-
-                        # continue if stopped after attaching
-                        if old_state == lldb.eStateAttaching and new_state == lldb.eStateStopped:
-                            self.process.Continue()
-
-                        # If needed, perform any event-specific behaviour here
-                        num_events_handled += 1
-
-        if num_events_handled == 0:
-            pass
-        else:
-            if old_state == new_state:
-                status = ""
-            self.ui.update(self.target, status, self, goto_file)
-
-
-def returnCompleteCommand(a, l, p):
-    """ Returns a "\n"-separated string with possible completion results
-        for command a with length l and cursor at p.
-    """
-    separator = "\n"
-    results = ctrl.completeCommand(a, l, p)
-    vim.command('return "%s%s"' % (separator.join(results), separator))
-
-
-def returnCompleteWindow(a, l, p):
-    """ Returns a "\n"-separated string with possible completion results
-        for commands that expect a window name parameter (like hide/show).
-        FIXME: connect to ctrl.ui instead of hardcoding the list here
-    """
-    separator = "\n"
-    results = [
-        'breakpoints',
-        'backtrace',
-        'disassembly',
-        'locals',
-        'threads',
-        'registers']
-    vim.command('return "%s%s"' % (separator.join(results), separator))
-
-global ctrl
-ctrl = LLDBController()
diff --git a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/plugin.py b/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/plugin.py
deleted file mode 100644
index c59546c..0000000
--- a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/plugin.py
+++ /dev/null
@@ -1,16 +0,0 @@
-
-# Try to import all dependencies, catch and handle the error gracefully if
-# it fails.
-
-import import_lldb
-
-try:
-    import lldb
-    import vim
-except ImportError:
-    sys.stderr.write(
-        "Unable to load vim/lldb module. Check lldb is on the path is available (or LLDB is set) and that script is invoked inside Vim with :pyfile")
-    pass
-else:
-    # Everthing went well, so use import to start the plugin controller
-    from lldb_controller import *
diff --git a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/vim_panes.py b/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/vim_panes.py
deleted file mode 100644
index b0c804d..0000000
--- a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/vim_panes.py
+++ /dev/null
@@ -1,669 +0,0 @@
-#
-# This file contains implementations of the LLDB display panes in VIM
-#
-# The most generic way to define a new window is to inherit from VimPane
-# and to implement:
-# - get_content() - returns a string with the pane contents
-#
-# Optionally, to highlight text, implement:
-# - get_highlights() - returns a map
-#
-# And call:
-# - define_highlight(unique_name, colour)
-# at some point in the constructor.
-#
-#
-# If the pane shows some key-value data that is in the context of a
-# single frame, inherit from FrameKeyValuePane and implement:
-# - get_frame_content(self, SBFrame frame)
-#
-#
-# If the pane presents some information that can be retrieved with
-# a simple LLDB command while the subprocess is stopped, inherit
-# from StoppedCommandPane and call:
-# - self.setCommand(command, command_args)
-# at some point in the constructor.
-#
-# Optionally, you can implement:
-# - get_selected_line()
-# to highlight a selected line and place the cursor there.
-#
-#
-# FIXME: implement WatchlistPane to displayed watched expressions
-# FIXME: define interface for interactive panes, like catching enter
-#        presses to change selected frame/thread...
-#
-
-import lldb
-import vim
-
-import sys
-
-# ==============================================================
-# Get the description of an lldb object or None if not available
-# ==============================================================
-
-# Shamelessly copy/pasted from lldbutil.py in the test suite
-
-
-def get_description(obj, option=None):
-    """Calls lldb_obj.GetDescription() and returns a string, or None.
-
-    For SBTarget, SBBreakpointLocation, and SBWatchpoint lldb objects, an extra
-    option can be passed in to describe the detailed level of description
-    desired:
-        o lldb.eDescriptionLevelBrief
-        o lldb.eDescriptionLevelFull
-        o lldb.eDescriptionLevelVerbose
-    """
-    method = getattr(obj, 'GetDescription')
-    if not method:
-        return None
-    tuple = (lldb.SBTarget, lldb.SBBreakpointLocation, lldb.SBWatchpoint)
-    if isinstance(obj, tuple):
-        if option is None:
-            option = lldb.eDescriptionLevelBrief
-
-    stream = lldb.SBStream()
-    if option is None:
-        success = method(stream)
-    else:
-        success = method(stream, option)
-    if not success:
-        return None
-    return stream.GetData()
-
-
-def get_selected_thread(target):
-    """ Returns a tuple with (thread, error) where thread == None if error occurs """
-    process = target.GetProcess()
-    if process is None or not process.IsValid():
-        return (None, VimPane.MSG_NO_PROCESS)
-
-    thread = process.GetSelectedThread()
-    if thread is None or not thread.IsValid():
-        return (None, VimPane.MSG_NO_THREADS)
-    return (thread, "")
-
-
-def get_selected_frame(target):
-    """ Returns a tuple with (frame, error) where frame == None if error occurs """
-    (thread, error) = get_selected_thread(target)
-    if thread is None:
-        return (None, error)
-
-    frame = thread.GetSelectedFrame()
-    if frame is None or not frame.IsValid():
-        return (None, VimPane.MSG_NO_FRAME)
-    return (frame, "")
-
-
-def _cmd(cmd):
-    vim.command("call confirm('%s')" % cmd)
-    vim.command(cmd)
-
-
-def move_cursor(line, col=0):
-    """ moves cursor to specified line and col """
-    cw = vim.current.window
-    if cw.cursor[0] != line:
-        vim.command("execute \"normal %dgg\"" % line)
-
-
-def winnr():
-    """ Returns currently selected window number """
-    return int(vim.eval("winnr()"))
-
-
-def bufwinnr(name):
-    """ Returns window number corresponding with buffer name """
-    return int(vim.eval("bufwinnr('%s')" % name))
-
-
-def goto_window(nr):
-    """ go to window number nr"""
-    if nr != winnr():
-        vim.command(str(nr) + ' wincmd w')
-
-
-def goto_next_window():
-    """ go to next window. """
-    vim.command('wincmd w')
-    return (winnr(), vim.current.buffer.name)
-
-
-def goto_previous_window():
-    """ go to previously selected window """
-    vim.command("execute \"normal \\<c-w>p\"")
-
-
-def have_gui():
-    """ Returns True if vim is in a gui (Gvim/MacVim), False otherwise. """
-    return int(vim.eval("has('gui_running')")) == 1
-
-
-class PaneLayout(object):
-    """ A container for a (vertical) group layout of VimPanes """
-
-    def __init__(self):
-        self.panes = {}
-
-    def havePane(self, name):
-        """ Returns true if name is a registered pane, False otherwise """
-        return name in self.panes
-
-    def prepare(self, panes=[]):
-        """ Draw panes on screen. If empty list is provided, show all. """
-
-        # If we can't select a window contained in the layout, we are doing a
-        # first draw
-        first_draw = not self.selectWindow(True)
-        did_first_draw = False
-
-        # Prepare each registered pane
-        for name in self.panes:
-            if name in panes or len(panes) == 0:
-                if first_draw:
-                    # First window in layout will be created with :vsp, and
-                    # closed later
-                    vim.command(":vsp")
-                    first_draw = False
-                    did_first_draw = True
-                self.panes[name].prepare()
-
-        if did_first_draw:
-            # Close the split window
-            vim.command(":q")
-
-        self.selectWindow(False)
-
-    def contains(self, bufferName=None):
-        """ Returns True if window with name bufferName is contained in the layout, False otherwise.
-            If bufferName is None, the currently selected window is checked.
-        """
-        if not bufferName:
-            bufferName = vim.current.buffer.name
-
-        for p in self.panes:
-            if bufferName is not None and bufferName.endswith(p):
-                return True
-        return False
-
-    def selectWindow(self, select_contained=True):
-        """ Selects a window contained in the layout (if select_contained = True) and returns True.
-            If select_contained = False, a window that is not contained is selected. Returns False
-            if no group windows can be selected.
-        """
-        if select_contained == self.contains():
-            # Simple case: we are already selected
-            return True
-
-        # Otherwise, switch to next window until we find a contained window, or
-        # reach the first window again.
-        first = winnr()
-        (curnum, curname) = goto_next_window()
-
-        while not select_contained == self.contains(
-                curname) and curnum != first:
-            (curnum, curname) = goto_next_window()
-
-        return self.contains(curname) == select_contained
-
-    def hide(self, panes=[]):
-        """ Hide panes specified. If empty list provided, hide all. """
-        for name in self.panes:
-            if name in panes or len(panes) == 0:
-                self.panes[name].destroy()
-
-    def registerForUpdates(self, p):
-        self.panes[p.name] = p
-
-    def update(self, target, controller):
-        for name in self.panes:
-            self.panes[name].update(target, controller)
-
-
-class VimPane(object):
-    """ A generic base class for a pane that displays stuff """
-    CHANGED_VALUE_HIGHLIGHT_NAME_GUI = 'ColorColumn'
-    CHANGED_VALUE_HIGHLIGHT_NAME_TERM = 'lldb_changed'
-    CHANGED_VALUE_HIGHLIGHT_COLOUR_TERM = 'darkred'
-
-    SELECTED_HIGHLIGHT_NAME_GUI = 'Cursor'
-    SELECTED_HIGHLIGHT_NAME_TERM = 'lldb_selected'
-    SELECTED_HIGHLIGHT_COLOUR_TERM = 'darkblue'
-
-    MSG_NO_TARGET = "Target does not exist."
-    MSG_NO_PROCESS = "Process does not exist."
-    MSG_NO_THREADS = "No valid threads."
-    MSG_NO_FRAME = "No valid frame."
-
-    # list of defined highlights, so we avoid re-defining them
-    highlightTypes = []
-
-    def __init__(self, owner, name, open_below=False, height=3):
-        self.owner = owner
-        self.name = name
-        self.buffer = None
-        self.maxHeight = 20
-        self.openBelow = open_below
-        self.height = height
-        self.owner.registerForUpdates(self)
-
-    def isPrepared(self):
-        """ check window is OK """
-        if self.buffer is None or len(
-                dir(self.buffer)) == 0 or bufwinnr(self.name) == -1:
-            return False
-        return True
-
-    def prepare(self, method='new'):
-        """ check window is OK, if not then create """
-        if not self.isPrepared():
-            self.create(method)
-
-    def on_create(self):
-        pass
-
-    def destroy(self):
-        """ destroy window """
-        if self.buffer is None or len(dir(self.buffer)) == 0:
-            return
-        vim.command('bdelete ' + self.name)
-
-    def create(self, method):
-        """ create window """
-
-        if method != 'edit':
-            belowcmd = "below" if self.openBelow else ""
-            vim.command('silent %s %s %s' % (belowcmd, method, self.name))
-        else:
-            vim.command('silent %s %s' % (method, self.name))
-
-        self.window = vim.current.window
-
-        # Set LLDB pane options
-        vim.command("setlocal buftype=nofile")  # Don't try to open a file
-        vim.command("setlocal noswapfile")     # Don't use a swap file
-        vim.command("set nonumber")            # Don't display line numbers
-        # vim.command("set nowrap")              # Don't wrap text
-
-        # Save some parameters and reference to buffer
-        self.buffer = vim.current.buffer
-        self.width = int(vim.eval("winwidth(0)"))
-        self.height = int(vim.eval("winheight(0)"))
-
-        self.on_create()
-        goto_previous_window()
-
-    def update(self, target, controller):
-        """ updates buffer contents """
-        self.target = target
-        if not self.isPrepared():
-            # Window is hidden, or otherwise not ready for an update
-            return
-
-        original_cursor = self.window.cursor
-
-        # Select pane
-        goto_window(bufwinnr(self.name))
-
-        # Clean and update content, and apply any highlights.
-        self.clean()
-
-        if self.write(self.get_content(target, controller)):
-            self.apply_highlights()
-
-            cursor = self.get_selected_line()
-            if cursor is None:
-                # Place the cursor at its original position in the window
-                cursor_line = min(original_cursor[0], len(self.buffer))
-                cursor_col = min(
-                    original_cursor[1], len(
-                        self.buffer[
-                            cursor_line - 1]))
-            else:
-                # Place the cursor at the location requested by a VimPane
-                # implementation
-                cursor_line = min(cursor, len(self.buffer))
-                cursor_col = self.window.cursor[1]
-
-            self.window.cursor = (cursor_line, cursor_col)
-
-        goto_previous_window()
-
-    def get_selected_line(self):
-        """ Returns the line number to move the cursor to, or None to leave
-            it where the user last left it.
-            Subclasses implement this to define custom behaviour.
-        """
-        return None
-
-    def apply_highlights(self):
-        """ Highlights each set of lines in  each highlight group """
-        highlights = self.get_highlights()
-        for highlightType in highlights:
-            lines = highlights[highlightType]
-            if len(lines) == 0:
-                continue
-
-            cmd = 'match %s /' % highlightType
-            lines = ['\%' + '%d' % line + 'l' for line in lines]
-            cmd += '\\|'.join(lines)
-            cmd += '/'
-            vim.command(cmd)
-
-    def define_highlight(self, name, colour):
-        """ Defines highlihght """
-        if name in VimPane.highlightTypes:
-            # highlight already defined
-            return
-
-        vim.command(
-            "highlight %s ctermbg=%s guibg=%s" %
-            (name, colour, colour))
-        VimPane.highlightTypes.append(name)
-
-    def write(self, msg):
-        """ replace buffer with msg"""
-        self.prepare()
-
-        msg = str(msg.encode("utf-8", "replace")).split('\n')
-        try:
-            self.buffer.append(msg)
-            vim.command("execute \"normal ggdd\"")
-        except vim.error:
-            # cannot update window; happens when vim is exiting.
-            return False
-
-        move_cursor(1, 0)
-        return True
-
-    def clean(self):
-        """ clean all datas in buffer """
-        self.prepare()
-        vim.command(':%d')
-        #self.buffer[:] = None
-
-    def get_content(self, target, controller):
-        """ subclasses implement this to provide pane content """
-        assert(0 and "pane subclass must implement this")
-        pass
-
-    def get_highlights(self):
-        """ Subclasses implement this to provide pane highlights.
-            This function is expected to return a map of:
-              { highlight_name ==> [line_number, ...], ... }
-        """
-        return {}
-
-
-class FrameKeyValuePane(VimPane):
-
-    def __init__(self, owner, name, open_below):
-        """ Initialize parent, define member variables, choose which highlight
-            to use based on whether or not we have a gui (MacVim/Gvim).
-        """
-
-        VimPane.__init__(self, owner, name, open_below)
-
-        # Map-of-maps key/value history { frame --> { variable_name,
-        # variable_value } }
-        self.frameValues = {}
-
-        if have_gui():
-            self.changedHighlight = VimPane.CHANGED_VALUE_HIGHLIGHT_NAME_GUI
-        else:
-            self.changedHighlight = VimPane.CHANGED_VALUE_HIGHLIGHT_NAME_TERM
-            self.define_highlight(VimPane.CHANGED_VALUE_HIGHLIGHT_NAME_TERM,
-                                  VimPane.CHANGED_VALUE_HIGHLIGHT_COLOUR_TERM)
-
-    def format_pair(self, key, value, changed=False):
-        """ Formats a key/value pair. Appends a '*' if changed == True """
-        marker = '*' if changed else ' '
-        return "%s %s = %s\n" % (marker, key, value)
-
-    def get_content(self, target, controller):
-        """ Get content for a frame-aware pane. Also builds the list of lines that
-            need highlighting (i.e. changed values.)
-        """
-        if target is None or not target.IsValid():
-            return VimPane.MSG_NO_TARGET
-
-        self.changedLines = []
-
-        (frame, err) = get_selected_frame(target)
-        if frame is None:
-            return err
-
-        output = get_description(frame)
-        lineNum = 1
-
-        # Retrieve the last values displayed for this frame
-        frameId = get_description(frame.GetBlock())
-        if frameId in self.frameValues:
-            frameOldValues = self.frameValues[frameId]
-        else:
-            frameOldValues = {}
-
-        # Read the frame variables
-        vals = self.get_frame_content(frame)
-        for (key, value) in vals:
-            lineNum += 1
-            if len(frameOldValues) == 0 or (
-                    key in frameOldValues and frameOldValues[key] == value):
-                output += self.format_pair(key, value)
-            else:
-                output += self.format_pair(key, value, True)
-                self.changedLines.append(lineNum)
-
-        # Save values as oldValues
-        newValues = {}
-        for (key, value) in vals:
-            newValues[key] = value
-        self.frameValues[frameId] = newValues
-
-        return output
-
-    def get_highlights(self):
-        ret = {}
-        ret[self.changedHighlight] = self.changedLines
-        return ret
-
-
-class LocalsPane(FrameKeyValuePane):
-    """ Pane that displays local variables """
-
-    def __init__(self, owner, name='locals'):
-        FrameKeyValuePane.__init__(self, owner, name, open_below=True)
-
-        # FIXME: allow users to customize display of args/locals/statics/scope
-        self.arguments = True
-        self.show_locals = True
-        self.show_statics = True
-        self.show_in_scope_only = True
-
-    def format_variable(self, var):
-        """ Returns a Tuple of strings "(Type) Name", "Value" for SBValue var """
-        val = var.GetValue()
-        if val is None:
-            # If the value is too big, SBValue.GetValue() returns None; replace
-            # with ...
-            val = "..."
-
-        return ("(%s) %s" % (var.GetTypeName(), var.GetName()), "%s" % val)
-
-    def get_frame_content(self, frame):
-        """ Returns list of key-value pairs of local variables in frame """
-        vals = frame.GetVariables(self.arguments,
-                                  self.show_locals,
-                                  self.show_statics,
-                                  self.show_in_scope_only)
-        return [self.format_variable(x) for x in vals]
-
-
-class RegistersPane(FrameKeyValuePane):
-    """ Pane that displays the contents of registers """
-
-    def __init__(self, owner, name='registers'):
-        FrameKeyValuePane.__init__(self, owner, name, open_below=True)
-
-    def format_register(self, reg):
-        """ Returns a tuple of strings ("name", "value") for SBRegister reg. """
-        name = reg.GetName()
-        val = reg.GetValue()
-        if val is None:
-            val = "..."
-        return (name, val.strip())
-
-    def get_frame_content(self, frame):
-        """ Returns a list of key-value pairs ("name", "value") of registers in frame """
-
-        result = []
-        for register_sets in frame.GetRegisters():
-            # hack the register group name into the list of registers...
-            result.append((" = = %s =" % register_sets.GetName(), ""))
-
-            for reg in register_sets:
-                result.append(self.format_register(reg))
-        return result
-
-
-class CommandPane(VimPane):
-    """ Pane that displays the output of an LLDB command """
-
-    def __init__(self, owner, name, open_below, process_required=True):
-        VimPane.__init__(self, owner, name, open_below)
-        self.process_required = process_required
-
-    def setCommand(self, command, args=""):
-        self.command = command
-        self.args = args
-
-    def get_content(self, target, controller):
-        output = ""
-        if not target:
-            output = VimPane.MSG_NO_TARGET
-        elif self.process_required and not target.GetProcess():
-            output = VimPane.MSG_NO_PROCESS
-        else:
-            (success, output) = controller.getCommandOutput(
-                self.command, self.args)
-        return output
-
-
-class StoppedCommandPane(CommandPane):
-    """ Pane that displays the output of an LLDB command when the process is
-        stopped; otherwise displays process status. This class also implements
-        highlighting for a single line (to show a single-line selected entity.)
-    """
-
-    def __init__(self, owner, name, open_below):
-        """ Initialize parent and define highlight to use for selected line. """
-        CommandPane.__init__(self, owner, name, open_below)
-        if have_gui():
-            self.selectedHighlight = VimPane.SELECTED_HIGHLIGHT_NAME_GUI
-        else:
-            self.selectedHighlight = VimPane.SELECTED_HIGHLIGHT_NAME_TERM
-            self.define_highlight(VimPane.SELECTED_HIGHLIGHT_NAME_TERM,
-                                  VimPane.SELECTED_HIGHLIGHT_COLOUR_TERM)
-
-    def get_content(self, target, controller):
-        """ Returns the output of a command that relies on the process being stopped.
-            If the process is not in 'stopped' state, the process status is returned.
-        """
-        output = ""
-        if not target or not target.IsValid():
-            output = VimPane.MSG_NO_TARGET
-        elif not target.GetProcess() or not target.GetProcess().IsValid():
-            output = VimPane.MSG_NO_PROCESS
-        elif target.GetProcess().GetState() == lldb.eStateStopped:
-            (success, output) = controller.getCommandOutput(
-                self.command, self.args)
-        else:
-            (success, output) = controller.getCommandOutput("process", "status")
-        return output
-
-    def get_highlights(self):
-        """ Highlight the line under the cursor. Users moving the cursor has
-            no effect on the selected line.
-        """
-        ret = {}
-        line = self.get_selected_line()
-        if line is not None:
-            ret[self.selectedHighlight] = [line]
-            return ret
-        return ret
-
-    def get_selected_line(self):
-        """ Subclasses implement this to control where the cursor (and selected highlight)
-            is placed.
-        """
-        return None
-
-
-class DisassemblyPane(CommandPane):
-    """ Pane that displays disassembly around PC """
-
-    def __init__(self, owner, name='disassembly'):
-        CommandPane.__init__(self, owner, name, open_below=True)
-
-        # FIXME: let users customize the number of instructions to disassemble
-        self.setCommand("disassemble", "-c %d -p" % self.maxHeight)
-
-
-class ThreadPane(StoppedCommandPane):
-    """ Pane that displays threads list """
-
-    def __init__(self, owner, name='threads'):
-        StoppedCommandPane.__init__(self, owner, name, open_below=False)
-        self.setCommand("thread", "list")
-
-# FIXME: the function below assumes threads are listed in sequential order,
-#        which turns out to not be the case. Highlighting of selected thread
-#        will be disabled until this can be fixed. LLDB prints a '*' anyways
-#        beside the selected thread, so this is not too big of a problem.
-#  def get_selected_line(self):
-#    """ Place the cursor on the line with the selected entity.
-#        Subclasses should override this to customize selection.
-#        Formula: selected_line = selected_thread_id + 1
-#    """
-#    (thread, err) = get_selected_thread(self.target)
-#    if thread is None:
-#      return None
-#    else:
-#      return thread.GetIndexID() + 1
-
-
-class BacktracePane(StoppedCommandPane):
-    """ Pane that displays backtrace """
-
-    def __init__(self, owner, name='backtrace'):
-        StoppedCommandPane.__init__(self, owner, name, open_below=False)
-        self.setCommand("bt", "")
-
-    def get_selected_line(self):
-        """ Returns the line number in the buffer with the selected frame.
-            Formula: selected_line = selected_frame_id + 2
-            FIXME: the above formula hack does not work when the function return
-                   value is printed in the bt window; the wrong line is highlighted.
-        """
-
-        (frame, err) = get_selected_frame(self.target)
-        if frame is None:
-            return None
-        else:
-            return frame.GetFrameID() + 2
-
-
-class BreakpointsPane(CommandPane):
-
-    def __init__(self, owner, name='breakpoints'):
-        super(
-            BreakpointsPane,
-            self).__init__(
-            owner,
-            name,
-            open_below=False,
-            process_required=False)
-        self.setCommand("breakpoint", "list")
diff --git a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/vim_signs.py b/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/vim_signs.py
deleted file mode 100644
index 94f79ec..0000000
--- a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/vim_signs.py
+++ /dev/null
@@ -1,81 +0,0 @@
-
-# Classes responsible for drawing signs in the Vim user interface.
-
-import vim
-
-
-class VimSign(object):
-    SIGN_TEXT_BREAKPOINT_RESOLVED = "B>"
-    SIGN_TEXT_BREAKPOINT_UNRESOLVED = "b>"
-    SIGN_TEXT_PC = "->"
-    SIGN_HIGHLIGHT_COLOUR_PC = 'darkblue'
-
-    # unique sign id (for ':[sign/highlight] define)
-    sign_id = 1
-
-    # unique name id (for ':sign place')
-    name_id = 1
-
-    # Map of {(sign_text, highlight_colour) --> sign_name}
-    defined_signs = {}
-
-    def __init__(self, sign_text, buffer, line_number, highlight_colour=None):
-        """ Define the sign and highlight (if applicable) and show the sign. """
-
-        # Get the sign name, either by defining it, or looking it up in the map
-        # of defined signs
-        key = (sign_text, highlight_colour)
-        if key not in VimSign.defined_signs:
-            name = self.define(sign_text, highlight_colour)
-        else:
-            name = VimSign.defined_signs[key]
-
-        self.show(name, buffer.number, line_number)
-        pass
-
-    def define(self, sign_text, highlight_colour):
-        """ Defines sign and highlight (if highlight_colour is not None). """
-        sign_name = "sign%d" % VimSign.name_id
-        if highlight_colour is None:
-            vim.command("sign define %s text=%s" % (sign_name, sign_text))
-        else:
-            self.highlight_name = "highlight%d" % VimSign.name_id
-            vim.command(
-                "highlight %s ctermbg=%s guibg=%s" %
-                (self.highlight_name, highlight_colour, highlight_colour))
-            vim.command(
-                "sign define %s text=%s linehl=%s texthl=%s" %
-                (sign_name, sign_text, self.highlight_name, self.highlight_name))
-        VimSign.defined_signs[(sign_text, highlight_colour)] = sign_name
-        VimSign.name_id += 1
-        return sign_name
-
-    def show(self, name, buffer_number, line_number):
-        self.id = VimSign.sign_id
-        VimSign.sign_id += 1
-        vim.command("sign place %d name=%s line=%d buffer=%s" %
-                    (self.id, name, line_number, buffer_number))
-        pass
-
-    def hide(self):
-        vim.command("sign unplace %d" % self.id)
-        pass
-
-
-class BreakpointSign(VimSign):
-
-    def __init__(self, buffer, line_number, is_resolved):
-        txt = VimSign.SIGN_TEXT_BREAKPOINT_RESOLVED if is_resolved else VimSign.SIGN_TEXT_BREAKPOINT_UNRESOLVED
-        super(BreakpointSign, self).__init__(txt, buffer, line_number)
-
-
-class PCSign(VimSign):
-
-    def __init__(self, buffer, line_number, is_selected_thread):
-        super(
-            PCSign,
-            self).__init__(
-            VimSign.SIGN_TEXT_PC,
-            buffer,
-            line_number,
-            VimSign.SIGN_HIGHLIGHT_COLOUR_PC if is_selected_thread else None)
diff --git a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/vim_ui.py b/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/vim_ui.py
deleted file mode 100644
index bc5b6a4..0000000
--- a/src/llvm-project/lldb/utils/vim-lldb/python-vim-lldb/vim_ui.py
+++ /dev/null
@@ -1,257 +0,0 @@
-
-# LLDB UI state in the Vim user interface.
-
-from __future__ import print_function
-
-import os
-import re
-import sys
-import lldb
-import vim
-from vim_panes import *
-from vim_signs import *
-
-
-def is_same_file(a, b):
-    """ returns true if paths a and b are the same file """
-    a = os.path.realpath(a)
-    b = os.path.realpath(b)
-    return a in b or b in a
-
-
-class UI:
-
-    def __init__(self):
-        """ Declare UI state variables """
-
-        # Default panes to display
-        self.defaultPanes = [
-            'breakpoints',
-            'backtrace',
-            'locals',
-            'threads',
-            'registers',
-            'disassembly']
-
-        # map of tuples (filename, line) --> SBBreakpoint
-        self.markedBreakpoints = {}
-
-        # Currently shown signs
-        self.breakpointSigns = {}
-        self.pcSigns = []
-
-        # Container for panes
-        self.paneCol = PaneLayout()
-
-        # All possible LLDB panes
-        self.backtracePane = BacktracePane(self.paneCol)
-        self.threadPane = ThreadPane(self.paneCol)
-        self.disassemblyPane = DisassemblyPane(self.paneCol)
-        self.localsPane = LocalsPane(self.paneCol)
-        self.registersPane = RegistersPane(self.paneCol)
-        self.breakPane = BreakpointsPane(self.paneCol)
-
-    def activate(self):
-        """ Activate UI: display default set of panes """
-        self.paneCol.prepare(self.defaultPanes)
-
-    def get_user_buffers(self, filter_name=None):
-        """ Returns a list of buffers that are not a part of the LLDB UI. That is, they
-            are not contained in the PaneLayout object self.paneCol.
-        """
-        ret = []
-        for w in vim.windows:
-            b = w.buffer
-            if not self.paneCol.contains(b.name):
-                if filter_name is None or filter_name in b.name:
-                    ret.append(b)
-        return ret
-
-    def update_pc(self, process, buffers, goto_file):
-        """ Place the PC sign on the PC location of each thread's selected frame """
-
-        def GetPCSourceLocation(thread):
-            """ Returns a tuple (thread_index, file, line, column) that represents where
-                the PC sign should be placed for a thread.
-            """
-
-            frame = thread.GetSelectedFrame()
-            frame_num = frame.GetFrameID()
-            le = frame.GetLineEntry()
-            while not le.IsValid() and frame_num < thread.GetNumFrames():
-                frame_num += 1
-                le = thread.GetFrameAtIndex(frame_num).GetLineEntry()
-
-            if le.IsValid():
-                path = os.path.join(
-                    le.GetFileSpec().GetDirectory(),
-                    le.GetFileSpec().GetFilename())
-                return (
-                    thread.GetIndexID(),
-                    path,
-                    le.GetLine(),
-                    le.GetColumn())
-            return None
-
-        # Clear all existing PC signs
-        del_list = []
-        for sign in self.pcSigns:
-            sign.hide()
-            del_list.append(sign)
-        for sign in del_list:
-            self.pcSigns.remove(sign)
-            del sign
-
-        # Select a user (non-lldb) window
-        if not self.paneCol.selectWindow(False):
-            # No user window found; avoid clobbering by splitting
-            vim.command(":vsp")
-
-        # Show a PC marker for each thread
-        for thread in process:
-            loc = GetPCSourceLocation(thread)
-            if not loc:
-                # no valid source locations for PCs. hide all existing PC
-                # markers
-                continue
-
-            buf = None
-            (tid, fname, line, col) = loc
-            buffers = self.get_user_buffers(fname)
-            is_selected = thread.GetIndexID() == process.GetSelectedThread().GetIndexID()
-            if len(buffers) == 1:
-                buf = buffers[0]
-                if buf != vim.current.buffer:
-                    # Vim has an open buffer to the required file: select it
-                    vim.command('execute ":%db"' % buf.number)
-            elif is_selected and vim.current.buffer.name not in fname and os.path.exists(fname) and goto_file:
-                # FIXME: If current buffer is modified, vim will complain when we try to switch away.
-                # Find a way to detect if the current buffer is modified,
-                # and...warn instead?
-                vim.command('execute ":e %s"' % fname)
-                buf = vim.current.buffer
-            elif len(buffers) > 1 and goto_file:
-                # FIXME: multiple open buffers match PC location
-                continue
-            else:
-                continue
-
-            self.pcSigns.append(PCSign(buf, line, is_selected))
-
-            if is_selected and goto_file:
-                # if the selected file has a PC marker, move the cursor there
-                # too
-                curname = vim.current.buffer.name
-                if curname is not None and is_same_file(curname, fname):
-                    move_cursor(line, 0)
-                elif move_cursor:
-                    print("FIXME: not sure where to move cursor because %s != %s " % (vim.current.buffer.name, fname))
-
-    def update_breakpoints(self, target, buffers):
-        """ Decorates buffer with signs corresponding to breakpoints in target. """
-
-        def GetBreakpointLocations(bp):
-            """ Returns a list of tuples (resolved, filename, line) where a breakpoint was resolved. """
-            if not bp.IsValid():
-                sys.stderr.write("breakpoint is invalid, no locations")
-                return []
-
-            ret = []
-            numLocs = bp.GetNumLocations()
-            for i in range(numLocs):
-                loc = bp.GetLocationAtIndex(i)
-                desc = get_description(loc, lldb.eDescriptionLevelFull)
-                match = re.search('at\ ([^:]+):([\d]+)', desc)
-                try:
-                    lineNum = int(match.group(2).strip())
-                    ret.append((loc.IsResolved(), match.group(1), lineNum))
-                except ValueError as e:
-                    sys.stderr.write(
-                        "unable to parse breakpoint location line number: '%s'" %
-                        match.group(2))
-                    sys.stderr.write(str(e))
-
-            return ret
-
-        if target is None or not target.IsValid():
-            return
-
-        needed_bps = {}
-        for bp_index in range(target.GetNumBreakpoints()):
-            bp = target.GetBreakpointAtIndex(bp_index)
-            locations = GetBreakpointLocations(bp)
-            for (is_resolved, file, line) in GetBreakpointLocations(bp):
-                for buf in buffers:
-                    if file in buf.name:
-                        needed_bps[(buf, line, is_resolved)] = bp
-
-        # Hide any signs that correspond with disabled breakpoints
-        del_list = []
-        for (b, l, r) in self.breakpointSigns:
-            if (b, l, r) not in needed_bps:
-                self.breakpointSigns[(b, l, r)].hide()
-                del_list.append((b, l, r))
-        for d in del_list:
-            del self.breakpointSigns[d]
-
-        # Show any signs for new breakpoints
-        for (b, l, r) in needed_bps:
-            bp = needed_bps[(b, l, r)]
-            if self.haveBreakpoint(b.name, l):
-                self.markedBreakpoints[(b.name, l)].append(bp)
-            else:
-                self.markedBreakpoints[(b.name, l)] = [bp]
-
-            if (b, l, r) not in self.breakpointSigns:
-                s = BreakpointSign(b, l, r)
-                self.breakpointSigns[(b, l, r)] = s
-
-    def update(self, target, status, controller, goto_file=False):
-        """ Updates debugger info panels and breakpoint/pc marks and prints
-            status to the vim status line. If goto_file is True, the user's
-            cursor is moved to the source PC location in the selected frame.
-        """
-
-        self.paneCol.update(target, controller)
-        self.update_breakpoints(target, self.get_user_buffers())
-
-        if target is not None and target.IsValid():
-            process = target.GetProcess()
-            if process is not None and process.IsValid():
-                self.update_pc(process, self.get_user_buffers, goto_file)
-
-        if status is not None and len(status) > 0:
-            print(status)
-
-    def haveBreakpoint(self, file, line):
-        """ Returns True if we have a breakpoint at file:line, False otherwise  """
-        return (file, line) in self.markedBreakpoints
-
-    def getBreakpoints(self, fname, line):
-        """ Returns the LLDB SBBreakpoint object at fname:line """
-        if self.haveBreakpoint(fname, line):
-            return self.markedBreakpoints[(fname, line)]
-        else:
-            return None
-
-    def deleteBreakpoints(self, name, line):
-        del self.markedBreakpoints[(name, line)]
-
-    def showWindow(self, name):
-        """ Shows (un-hides) window pane specified by name """
-        if not self.paneCol.havePane(name):
-            sys.stderr.write("unknown window: %s" % name)
-            return False
-        self.paneCol.prepare([name])
-        return True
-
-    def hideWindow(self, name):
-        """ Hides window pane specified by name """
-        if not self.paneCol.havePane(name):
-            sys.stderr.write("unknown window: %s" % name)
-            return False
-        self.paneCol.hide([name])
-        return True
-
-global ui
-ui = UI()